diff --git a/.gdbinit b/.gdbinit index a0fae7f59a1..6b3f9b72a49 100644 --- a/.gdbinit +++ b/.gdbinit @@ -349,23 +349,45 @@ define dump_allocator printf "Allocator free list:\n" set $i = 0 set $max =(sizeof $arg0->free)/(sizeof $arg0->free[0]) + set $kb = 0 while $i < $max set $node = $arg0->free[$i] if $node != 0 printf " #%2d: ", $i while $node != 0 - printf "%d, ", $node->endp - $node->first_avail + printf "%d, ", 4096 << $node->index + set $kb = $kb + (4 << $node->index) set $node = $node->next end printf "ends.\n" end set $i = $i + 1 end + printf "Sum of free blocks: %dkiB\n", $kb end document dump_allocator Print status of an allocator and its freelists. end +define dump_one_pool + set $p = $arg0 + set $size = 0 + set $free = 0 + set $nodes = 0 + set $node = $arg0->active + set $done = 0 + while $done == 0 + set $size = $size + (4096 << $node->index) + set $free = $free + ($node->endp - $node->first_avail) + set $nodes = $nodes + 1 + set $node = $node->next + if $node == $arg0->active + set $done = 1 + end + end + printf "Pool '%s' [%p]: %d/%d free (%d blocks)\n", $p->tag, $p, $free, $size, $nodes +end + # Set sane defaults for common signals: handle SIGPIPE noprint pass nostop handle SIGUSR1 print pass nostop diff --git a/ABOUT_APACHE b/ABOUT_APACHE index 8611b6e3d49..d013e5b2f65 100644 --- a/ABOUT_APACHE +++ b/ABOUT_APACHE @@ -147,13 +147,13 @@ rest of the core members agree. The core group focus is more on than on mainstream code development. The term "The Apache Group" technically refers to this core of project contributors. -The Apache project is a meritocracy -- the more work you have done, the more +The Apache project is a meritocracy--the more work you have done, the more you are allowed to do. The group founders set the original rules, but they can be changed by vote of the active members. There is a group of people who have logins on our server (apache.org) and access to the svn repository. Everyone has access to the svn snapshots. Changes to the code are proposed on the mailing list and usually voted on by active -members -- three +1 (yes votes) and no -1 (no votes, or vetoes) are needed +members--three +1 (yes votes) and no -1 (no votes, or vetoes) are needed to commit a code change during a release cycle; docs are usually committed first and then changed as needed, with conflicts resolved by majority vote. @@ -225,17 +225,17 @@ by using it often contribute back to it by providing feature enhancements, bug fixes, and support for others in public newsgroups. The amount of effort expended by any particular individual is usually fairly light, but the resulting product is made very strong. This kind of community can -only happen with freeware -- when someone pays for software, they usually +only happen with freeware--when someone pays for software, they usually aren't willing to fix its bugs. One can argue, then, that Apache's strength comes from the fact that it's free, and if it were made "not free" it would suffer tremendously, even if that money were spent on a real development team. -We want to see Apache httpd used very widely -- by large companies, small +We want to see Apache httpd used very widely--by large companies, small companies, research institutions, schools, individuals, in the intranet -environment, everywhere -- even though this may mean that companies who +environment, everywhere--even though this may mean that companies who could afford commercial software, and would pay for it without blinking, -might get a "free ride" by using Apache httpd . We would even be happy if +might get a "free ride" by using Apache httpd. We would even be happy if some commercial software companies completely dropped their own HTTP server development plans and used Apache httpd as a base, with the proper attributions as described in the LICENSE file. diff --git a/Apache-apr2.dsw b/Apache-apr2.dsw index f2c9bf1d282..1f4509ebcc1 100644 --- a/Apache-apr2.dsw +++ b/Apache-apr2.dsw @@ -48,6 +48,9 @@ Package=<4> Project_Dep_Name BuildBin End Project Dependency Begin Project Dependency + Project_Dep_Name mod_authnz_ldap + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_bucketeer End Project Dependency Begin Project Dependency @@ -65,9 +68,6 @@ Package=<4> Begin Project Dependency Project_Dep_Name mod_example_ipc End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_lbmethod_rr - End Project Dependency }}} ############################################################################### @@ -96,6 +96,9 @@ Package=<4> Project_Dep_Name mod_alias End Project Dependency Begin Project Dependency + Project_Dep_Name mod_allowmethods + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_asis End Project Dependency Begin Project Dependency @@ -126,7 +129,7 @@ Package=<4> Project_Dep_Name mod_authn_socache End Project Dependency Begin Project Dependency - Project_Dep_Name mod_authnz_ldap + Project_Dep_Name mod_authnz_fcgi End Project Dependency Begin Project Dependency Project_Dep_Name mod_authz_core @@ -159,6 +162,9 @@ Package=<4> Project_Dep_Name mod_cache_disk End Project Dependency Begin Project Dependency + Project_Dep_Name mod_cache_socache + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_cern_meta End Project Dependency Begin Project Dependency @@ -168,6 +174,9 @@ Package=<4> Project_Dep_Name mod_charset_lite End Project Dependency Begin Project Dependency + Project_Dep_Name mod_data + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_dav_fs End Project Dependency Begin Project Dependency @@ -243,6 +252,9 @@ Package=<4> Project_Dep_Name mod_logio End Project Dependency Begin Project Dependency + Project_Dep_Name mod_macro + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_mime End Project Dependency Begin Project Dependency @@ -270,12 +282,18 @@ Package=<4> Project_Dep_Name mod_proxy_ftp End Project Dependency Begin Project Dependency + Project_Dep_Name mod_proxy_hcheck + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_proxy_http End Project Dependency Begin Project Dependency Project_Dep_Name mod_proxy_scgi End Project Dependency Begin Project Dependency + Project_Dep_Name mod_proxy_wstunnel + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_ratelimit End Project Dependency Begin Project Dependency @@ -783,6 +801,24 @@ Package=<4> ############################################################################### +Project: "mod_allowmethods"=.\modules\aaa\mod_allowmethods.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_asis"=.\modules\generators\mod_asis.dsp - Package Owner=<4> Package=<5> @@ -1000,6 +1036,24 @@ Package=<4> ############################################################################### +Project: "mod_authnz_fcgi"=.\modules\aaa\mod_authnz_fcgi.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_authnz_ldap"=.\modules\aaa\mod_authnz_ldap.dsp - Package Owner=<4> Package=<5> @@ -1333,6 +1387,24 @@ Package=<4> ############################################################################### +Project: "mod_data"=.\modules\filters\mod_data.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_dav"=.\modules\dav\main\mod_dav.dsp - Package Owner=<4> Package=<5> @@ -1468,6 +1540,27 @@ Package=<4> ############################################################################### +Project: "mod_cache_socache"=.\modules\cache\mod_cache_socache.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_cache + End Project Dependency +}}} + +############################################################################### + Project: "mod_dumpio"=.\modules\debugging\mod_dumpio.dsp - Package Owner=<4> Package=<5> @@ -1630,6 +1723,24 @@ Package=<4> ############################################################################### +Project: "mod_http2"=.\modules\http2\mod_http2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_headers"=.\modules\metadata\mod_headers.dsp - Package Owner=<4> Package=<5> @@ -1876,7 +1987,7 @@ Package=<4> ############################################################################### -Project: "mod_lbmethod_rr"=.\modules\proxy\examples\mod_lbmethod_rr.dsp - Package Owner=<4> +Project: "mod_ldap"=.\modules\ldap\mod_ldap.dsp - Package Owner=<4> Package=<5> {{{ @@ -1890,17 +2001,11 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_proxy - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_proxy_balancer - End Project Dependency }}} ############################################################################### -Project: "mod_ldap"=.\modules\ldap\mod_ldap.dsp - Package Owner=<4> +Project: "mod_log_config"=.\modules\loggers\mod_log_config.dsp - Package Owner=<4> Package=<5> {{{ @@ -1918,7 +2023,7 @@ Package=<4> ############################################################################### -Project: "mod_log_config"=.\modules\loggers\mod_log_config.dsp - Package Owner=<4> +Project: "mod_log_debug"=.\modules\loggers\mod_log_debug.dsp - Package Owner=<4> Package=<5> {{{ @@ -1936,7 +2041,7 @@ Package=<4> ############################################################################### -Project: "mod_log_debug"=.\modules\loggers\mod_log_debug.dsp - Package Owner=<4> +Project: "mod_log_forensic"=.\modules\loggers\mod_log_forensic.dsp - Package Owner=<4> Package=<5> {{{ @@ -1954,7 +2059,7 @@ Package=<4> ############################################################################### -Project: "mod_log_forensic"=.\modules\loggers\mod_log_forensic.dsp - Package Owner=<4> +Project: "mod_logio"=.\modules\loggers\mod_logio.dsp - Package Owner=<4> Package=<5> {{{ @@ -1972,7 +2077,7 @@ Package=<4> ############################################################################### -Project: "mod_logio"=.\modules\loggers\mod_logio.dsp - Package Owner=<4> +Project: "mod_lua"=.\modules\lua\mod_lua.dsp - Package Owner=<4> Package=<5> {{{ @@ -1990,7 +2095,7 @@ Package=<4> ############################################################################### -Project: "mod_lua"=.\modules\lua\mod_lua.dsp - Package Owner=<4> +Project: "mod_macro"=.\modules\core\mod_macro.dsp - Package Owner=<4> Package=<5> {{{ @@ -2207,6 +2312,28 @@ Package=<4> ############################################################################### +Project: "mod_proxy_hcheck"=.\modules\proxy\mod_proxy_hcheck.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency +}}} + +############################################################################### +############################################################################### + Project: "mod_proxy_html"=.\modules\filters\mod_proxy_html.dsp - Package Owner=<4> Package=<5> @@ -2246,7 +2373,7 @@ Package=<4> ############################################################################### -Project: "mod_proxy_scgi"=.\modules\proxy\mod_proxy_scgi.dsp - Package Owner=<4> +Project: "mod_proxy_http2"=.\modules\http2\mod_proxy_http2.dsp - Package Owner=<4> Package=<5> {{{ @@ -2261,14 +2388,16 @@ Package=<4> Project_Dep_Name libhttpd End Project Dependency Begin Project Dependency + Project_Dep_Name mod_http2 + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_proxy End Project Dependency }}} - ############################################################################### -Project: "mod_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> +Project: "mod_proxy_scgi"=.\modules\proxy\mod_proxy_scgi.dsp - Package Owner=<4> Package=<5> {{{ @@ -2282,11 +2411,15 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency }}} + ############################################################################### -Project: "mod_reflector"=.\modules\filters\mod_reflector.dsp - Package Owner=<4> +Project: "mod_proxy_wstunnel"=.\modules\proxy\mod_proxy_wstunnel.dsp - Package Owner=<4> Package=<5> {{{ @@ -2300,11 +2433,14 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency }}} ############################################################################### -Project: "mod_remoteip"=.\modules\metadata\mod_remoteip.dsp - Package Owner=<4> +Project: "mod_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> Package=<5> {{{ @@ -2322,7 +2458,7 @@ Package=<4> ############################################################################### -Project: "mod_reqtimeout"=.\modules\filters\mod_reqtimeout.dsp - Package Owner=<4> +Project: "mod_reflector"=.\modules\filters\mod_reflector.dsp - Package Owner=<4> Package=<5> {{{ @@ -2340,7 +2476,7 @@ Package=<4> ############################################################################### -Project: "mod_request"=.\modules\filters\mod_request.dsp - Package Owner=<4> +Project: "mod_remoteip"=.\modules\metadata\mod_remoteip.dsp - Package Owner=<4> Package=<5> {{{ @@ -2358,7 +2494,7 @@ Package=<4> ############################################################################### -Project: "mod_rewrite"=.\modules\mappers\mod_rewrite.dsp - Package Owner=<4> +Project: "mod_reqtimeout"=.\modules\filters\mod_reqtimeout.dsp - Package Owner=<4> Package=<5> {{{ @@ -2376,7 +2512,7 @@ Package=<4> ############################################################################### -Project: "mod_sed"=.\modules\filters\mod_sed.dsp - Package Owner=<4> +Project: "mod_request"=.\modules\filters\mod_request.dsp - Package Owner=<4> Package=<5> {{{ @@ -2394,7 +2530,7 @@ Package=<4> ############################################################################### -Project: "mod_serf"=.\modules\proxy\mod_serf.dsp - Package Owner=<4> +Project: "mod_rewrite"=.\modules\mappers\mod_rewrite.dsp - Package Owner=<4> Package=<5> {{{ @@ -2408,8 +2544,23 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency +}}} + +############################################################################### + +Project: "mod_sed"=.\modules\filters\mod_sed.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ Begin Project Dependency - Project_Dep_Name mod_proxy + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd End Project Dependency }}} diff --git a/Apache.dsw b/Apache.dsw index 9db05632af7..af13918322f 100644 --- a/Apache.dsw +++ b/Apache.dsw @@ -71,9 +71,6 @@ Package=<4> Begin Project Dependency Project_Dep_Name mod_example_ipc End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_lbmethod_rr - End Project Dependency }}} ############################################################################### @@ -111,6 +108,9 @@ Package=<4> Project_Dep_Name mod_alias End Project Dependency Begin Project Dependency + Project_Dep_Name mod_allowmethods + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_asis End Project Dependency Begin Project Dependency @@ -141,6 +141,9 @@ Package=<4> Project_Dep_Name mod_authn_socache End Project Dependency Begin Project Dependency + Project_Dep_Name mod_authnz_fcgi + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_authnz_ldap End Project Dependency Begin Project Dependency @@ -174,6 +177,9 @@ Package=<4> Project_Dep_Name mod_cache_disk End Project Dependency Begin Project Dependency + Project_Dep_Name mod_cache_socache + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_cern_meta End Project Dependency Begin Project Dependency @@ -183,6 +189,9 @@ Package=<4> Project_Dep_Name mod_charset_lite End Project Dependency Begin Project Dependency + Project_Dep_Name mod_data + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_dav_fs End Project Dependency Begin Project Dependency @@ -258,6 +267,9 @@ Package=<4> Project_Dep_Name mod_logio End Project Dependency Begin Project Dependency + Project_Dep_Name mod_macro + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_mime End Project Dependency Begin Project Dependency @@ -285,12 +297,18 @@ Package=<4> Project_Dep_Name mod_proxy_ftp End Project Dependency Begin Project Dependency + Project_Dep_Name mod_proxy_hcheck + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_proxy_http End Project Dependency Begin Project Dependency Project_Dep_Name mod_proxy_scgi End Project Dependency Begin Project Dependency + Project_Dep_Name mod_proxy_wstunnel + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_ratelimit End Project Dependency Begin Project Dependency @@ -957,6 +975,27 @@ Package=<4> ############################################################################### +Project: "mod_allowmethods"=.\modules\aaa\mod_allowmethods.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_asis"=.\modules\generators\mod_asis.dsp - Package Owner=<4> Package=<5> @@ -1207,6 +1246,27 @@ Package=<4> ############################################################################### +Project: "mod_authnz_fcgi"=.\modules\aaa\mod_authnz_fcgi.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_authnz_ldap"=.\modules\aaa\mod_authnz_ldap.dsp - Package Owner=<4> Package=<5> @@ -1591,6 +1651,27 @@ Package=<4> ############################################################################### +Project: "mod_data"=.\modules\filters\mod_data.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_dav"=.\modules\dav\main\mod_dav.dsp - Package Owner=<4> Package=<5> @@ -1747,6 +1828,30 @@ Package=<4> ############################################################################### +Project: "mod_cache_socache"=.\modules\cache\mod_cache_socache.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_cache + End Project Dependency +}}} + +############################################################################### + Project: "mod_dumpio"=.\modules\debugging\mod_dumpio.dsp - Package Owner=<4> Package=<5> @@ -1936,6 +2041,27 @@ Package=<4> ############################################################################### +Project: "mod_http2"=.\modules\http2\mod_http2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency +}}} + +############################################################################### + Project: "mod_headers"=.\modules\metadata\mod_headers.dsp - Package Owner=<4> Package=<5> @@ -2218,7 +2344,7 @@ Package=<4> ############################################################################### -Project: "mod_lbmethod_rr"=.\modules\proxy\examples\mod_lbmethod_rr.dsp - Package Owner=<4> +Project: "mod_ldap"=.\modules\ldap\mod_ldap.dsp - Package Owner=<4> Package=<5> {{{ @@ -2235,17 +2361,11 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_proxy - End Project Dependency - Begin Project Dependency - Project_Dep_Name mod_proxy_balancer - End Project Dependency }}} ############################################################################### -Project: "mod_ldap"=.\modules\ldap\mod_ldap.dsp - Package Owner=<4> +Project: "mod_log_config"=.\modules\loggers\mod_log_config.dsp - Package Owner=<4> Package=<5> {{{ @@ -2266,7 +2386,7 @@ Package=<4> ############################################################################### -Project: "mod_log_config"=.\modules\loggers\mod_log_config.dsp - Package Owner=<4> +Project: "mod_log_debug"=.\modules\loggers\mod_log_debug.dsp - Package Owner=<4> Package=<5> {{{ @@ -2278,16 +2398,13 @@ Package=<4> Project_Dep_Name libapr End Project Dependency Begin Project Dependency - Project_Dep_Name libaprutil - End Project Dependency - Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency }}} ############################################################################### -Project: "mod_log_debug"=.\modules\loggers\mod_log_debug.dsp - Package Owner=<4> +Project: "mod_log_forensic"=.\modules\loggers\mod_log_forensic.dsp - Package Owner=<4> Package=<5> {{{ @@ -2299,13 +2416,16 @@ Package=<4> Project_Dep_Name libapr End Project Dependency Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency }}} ############################################################################### -Project: "mod_log_forensic"=.\modules\loggers\mod_log_forensic.dsp - Package Owner=<4> +Project: "mod_logio"=.\modules\loggers\mod_logio.dsp - Package Owner=<4> Package=<5> {{{ @@ -2326,7 +2446,7 @@ Package=<4> ############################################################################### -Project: "mod_logio"=.\modules\loggers\mod_logio.dsp - Package Owner=<4> +Project: "mod_lua"=.\modules\lua\mod_lua.dsp - Package Owner=<4> Package=<5> {{{ @@ -2347,7 +2467,7 @@ Package=<4> ############################################################################### -Project: "mod_lua"=.\modules\lua\mod_lua.dsp - Package Owner=<4> +Project: "mod_macro"=.\modules\core\mod_macro.dsp - Package Owner=<4> Package=<5> {{{ @@ -2597,6 +2717,30 @@ Package=<4> ############################################################################### +Project: "mod_proxy_hcheck"=.\modules\proxy\mod_proxy_hcheck.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency + Begin Project Dependency + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd + End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency +}}} + +############################################################################### + Project: "mod_proxy_html"=.\modules\filters\mod_proxy_html.dsp - Package Owner=<4> Package=<5> @@ -2642,7 +2786,7 @@ Package=<4> ############################################################################### -Project: "mod_proxy_scgi"=.\modules\proxy\mod_proxy_scgi.dsp - Package Owner=<4> +Project: "mod_proxy_http2"=.\modules\http2\mod_proxy_http2.dsp - Package Owner=<4> Package=<5> {{{ @@ -2660,13 +2804,16 @@ Package=<4> Project_Dep_Name libhttpd End Project Dependency Begin Project Dependency + Project_Dep_Name mod_http2 + End Project Dependency + Begin Project Dependency Project_Dep_Name mod_proxy End Project Dependency }}} ############################################################################### -Project: "mod_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> +Project: "mod_proxy_scgi"=.\modules\proxy\mod_proxy_scgi.dsp - Package Owner=<4> Package=<5> {{{ @@ -2683,11 +2830,14 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency }}} ############################################################################### -Project: "mod_reflector"=.\modules\filters\mod_reflector.dsp - Package Owner=<4> +Project: "mod_proxy_wstunnel"=.\modules\proxy\mod_proxy_wstunnel.dsp - Package Owner=<4> Package=<5> {{{ @@ -2704,11 +2854,14 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency + Begin Project Dependency + Project_Dep_Name mod_proxy + End Project Dependency }}} ############################################################################### -Project: "mod_remoteip"=.\modules\metadata\mod_remoteip.dsp - Package Owner=<4> +Project: "mod_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> Package=<5> {{{ @@ -2729,7 +2882,7 @@ Package=<4> ############################################################################### -Project: "mod_reqtimeout"=.\modules\filters\mod_reqtimeout.dsp - Package Owner=<4> +Project: "mod_reflector"=.\modules\filters\mod_reflector.dsp - Package Owner=<4> Package=<5> {{{ @@ -2750,7 +2903,7 @@ Package=<4> ############################################################################### -Project: "mod_request"=.\modules\filters\mod_request.dsp - Package Owner=<4> +Project: "mod_remoteip"=.\modules\metadata\mod_remoteip.dsp - Package Owner=<4> Package=<5> {{{ @@ -2771,7 +2924,7 @@ Package=<4> ############################################################################### -Project: "mod_rewrite"=.\modules\mappers\mod_rewrite.dsp - Package Owner=<4> +Project: "mod_reqtimeout"=.\modules\filters\mod_reqtimeout.dsp - Package Owner=<4> Package=<5> {{{ @@ -2792,7 +2945,7 @@ Package=<4> ############################################################################### -Project: "mod_sed"=.\modules\filters\mod_sed.dsp - Package Owner=<4> +Project: "mod_request"=.\modules\filters\mod_request.dsp - Package Owner=<4> Package=<5> {{{ @@ -2813,7 +2966,7 @@ Package=<4> ############################################################################### -Project: "mod_serf"=.\modules\proxy\mod_serf.dsp - Package Owner=<4> +Project: "mod_rewrite"=.\modules\mappers\mod_rewrite.dsp - Package Owner=<4> Package=<5> {{{ @@ -2830,8 +2983,26 @@ Package=<4> Begin Project Dependency Project_Dep_Name libhttpd End Project Dependency +}}} + +############################################################################### + +Project: "mod_sed"=.\modules\filters\mod_sed.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name libapr + End Project Dependency Begin Project Dependency - Project_Dep_Name mod_proxy + Project_Dep_Name libaprutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name libhttpd End Project Dependency }}} diff --git a/BuildBin.dsp b/BuildBin.dsp index 0a557ea74a4..5707042fbda 100644 --- a/BuildBin.dsp +++ b/BuildBin.dsp @@ -39,7 +39,7 @@ CFG=BuildBin - Win32 Debug # PROP Use_Debug_Libraries 0 # PROP Output_Dir "" # PROP Intermediate_Dir "" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" LONG=Release _trydb _trylua _tryxml _tryssl _tryzlib _tryserf _dummy" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" LONG=Release _trydb _trylua _tryxml _tryssl _tryzlib _trynghttp2 _dummy" # PROP Rebuild_Opt "" # PROP Target_File "\Apache2\bin\httpd.exe" # PROP Bsc_Name ".\Browse\httpd.bsc" @@ -58,7 +58,7 @@ CFG=BuildBin - Win32 Debug # PROP Use_Debug_Libraries 1 # PROP Output_Dir "" # PROP Intermediate_Dir "" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" LONG=Debug _trydb _trylua _tryxml _tryssl _tryzlib _tryserf _dummy" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2" LONG=Debug _trydb _trylua _tryxml _tryssl _tryzlib _trynghttp2 _dummy" # PROP Rebuild_Opt "" # PROP Target_File "\Apache2\bin\httpd.exe" # PROP Bsc_Name ".\Browse\httpd.bsc" diff --git a/CHANGES b/CHANGES index 1e5b0a59f42..de731959796 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,2892 @@ -*- coding: utf-8 -*- + +Changes with Apache 2.4.26 + + *) mod_http2: cleanup beamer registry on server reload, Fixes PR60510. + [Pavel Mateja , Stefan Eissing] + + *) mod_ext_filter: Don't interfere with "error buckets" issued by other + modules. PR60375. [Eric Covener, Lubos Uhliarik] + + *) mod_http2: fixes https://github.com/icing/mod_h2/issues/126 e.g. beam + bucket lifetime handling when data is sent over temporary pools. + [Stefan Eissing] + +Changes with Apache 2.4.25 + + *) Fix some build issues related to various modules. + [Rainer Jung] + +Changes with Apache 2.4.24 + + *) SECURITY: CVE-2016-8740 (cve.mitre.org) + mod_http2: Mitigate DoS memory exhaustion via endless + CONTINUATION frames. + [Naveen Tiwari and CDF/SEFCOM at Arizona State + University, Stefan Eissing] + + *) SECURITY: CVE-2016-5387 (cve.mitre.org) + core: Mitigate [f]cgi "httpoxy" issues. + [Dominic Scheirlinck , Yann Ylavic] + + *) SECURITY: CVE-2016-2161 (cve.mitre.org) + mod_auth_digest: Prevent segfaults during client entry allocation when + the shared memory space is exhausted. + [Maksim Malyutin , Eric Covener, Jacob Champion] + + *) SECURITY: CVE-2016-0736 (cve.mitre.org) + mod_session_crypto: Authenticate the session data/cookie with a + MAC (SipHash) to prevent deciphering or tampering with a padding + oracle attack. [Yann Ylavic, Colm MacCarthaigh] + + *) SECURITY: CVE-2016-8743 (cve.mitre.org) + Enforce HTTP request grammar corresponding to RFC7230 for request lines + and request headers, to prevent response splitting and cache pollution by + malicious clients or downstream proxies. [William Rowe, Stefan Fritsch] + + *) Validate HTTP response header grammar defined by RFC7230, resulting + in a 500 error in the event that invalid response header contents are + detected when serving the response, to avoid response splitting and cache + pollution by malicious clients, upstream servers or faulty modules. + [Stefan Fritsch, Eric Covener, Yann Ylavic] + + *) mod_rewrite: Limit runaway memory use by short circuiting some kinds of + looping RewriteRules when the local path significantly exceeds + LimitRequestLine. PR 60478. [Jeff Wheelhouse ] + + *) mod_ratelimit: Allow for initial "burst" amount at full speed before + throttling: PR 60145 [Andy Valencia , + Jim Jagielski] + + *) mod_socache_memcache: Provide memcache stats to mod_status. + [Jim Jagielski] + + *) http_filters: Fix potential looping in new check_headers() due to new + pattern of ap_die() from http header filter. Explicitly clear the + previous headers and body. + + *) core: Drop Content-Length header and message-body from HTTP 204 responses. + PR 51350 [Luca Toscano] + + *) mod_proxy: Honor a server scoped ProxyPass exception when ProxyPass is + configured in , like in 2.2. PR 60458. + [Eric Covener] + + *) mod_lua: Fix default value of LuaInherit directive. It should be + 'parent-first' instead of 'none', as per documentation. PR 60419 + [Christophe Jaillet] + + *) core: New directive HttpProtocolOptions to control httpd enforcement + of various RFC7230 requirements. [Stefan Fritsch, William Rowe] + + *) core: Permit unencoded ';' characters to appear in proxy requests and + Location: response headers. Corresponds to modern browser behavior. + [William Rowe] + + *) core: ap_rgetline_core now pulls from r->proto_input_filters. + + *) core: Correctly parse an IPv6 literal host specification in an absolute + URL in the request line. [Stefan Fritsch] + + *) core: New directive RegisterHttpMethod for registering non-standard + HTTP methods. [Stefan Fritsch] + + *) mod_socache_memcache: Pass expiration time through to memcached. + [Faidon Liambotis , Joe Orton] + + *) mod_cache: Use the actual URI path and query-string for identifying the + cached entity (key), such that rewrites are taken into account when + running afterwards (CacheQuickHandler off). PR 21935. [Yann Ylavic] + + *) mod_http2: new directive 'H2EarlyHints' to enable sending of HTTP status + 103 interim responses. Disabled by default. [Stefan Eissing] + + *) mod_ssl: Fix quick renegotiation (OptRenegotiaton) with no intermediate + in the client certificate chain. PR 55786. [Yann Ylavic] + + *) event: Allow to use the whole allocated scoreboard (up to ServerLimit + slots) to avoid scoreboard full errors when some processes are finishing + gracefully. Also, make gracefully finishing processes close all + keep-alive connections. PR 53555. [Stefan Fritsch] + + *) mpm_event: Don't take over scoreboard slots from gracefully finishing + threads. [Stefan Fritsch] + + *) mpm_event: Free memory earlier when shutting down processes. + [Stefan Fritsch] + + *) mod_status: Display the process slot number in the async connection + overview. [Stefan Fritsch] + + *) mod_dir: Responses that go through "FallbackResource" might appear to + hang due to unterminated chunked encoding. PR58292. [Eric Covener] + + *) mod_dav: Fix a potential cause of unbounded memory usage or incorrect + behavior in a routine that sends 's to the output filters. + [Evgeny Kotkov] + + *) mod_http2: new directive 'H2PushResource' to enable early pushes before + processing of the main request starts. Resources are announced to the + client in Link headers on a 103 early hint response. + All responses with status code <400 are inspected for Link header and + trigger pushes accordingly. 304 still does prevent pushes. + 'H2PushResource' can mark resources as 'critical' which gives them higher + priority than the main resource. This leads to preferred scheduling for + processing and, when content is available, will send it first. 'critical' + is also recognized on Link headers. [Stefan Eissing] + + *) mod_proxy_http2: uris in Link headers are now mapped back to a suitable + local url when available. Relative uris with an absolute path are mapped + as well. This makes reverse proxy mapping available for resources + announced in this header. + With 103 interim responses being forwarded to the main client connection, + this effectively allows early pushing of resources by a reverse proxied + backend server. [Stefan Eissing] + + *) mod_proxy_http2: adding support for newly proposed 103 status code. + [Stefan Eissing] + + *) mpm_unix: Apache fails to start if previously crashed then restarted with + the same PID (e.g. in container). PR 60261. + [Val , Yann Ylavic] + + *) mod_http2: unannounced and multiple interim responses (status code < 200) + are parsed and forwarded to client until a final response arrives. + [Stefan Eissing] + + *) mod_proxy_http2: improved robustness when main connection is closed early + by resetting all ongoing streams against the backend. + [Stefan Eissing] + + *) mod_http2: allocators from slave connections are released earlier, + resulting in less overall memory use on busy, long lived connections. + [Stefan Eissing] + + *) mod_remoteip: Pick up where we left off during a subrequest rather + than running with the modified XFF but original TCP address. + PR 49839/PR 60251 + + *) http: Respond with "408 Request Timeout" when a timeout occurs while + reading the request body. [Yann Ylavic] + + *) mod_http2: connection shutdown revisited: corrected edge cases on + shutting down ongoing streams, changed log warnings to be less noisy + when waiting on long running tasks. [Stefan Eissing] + + *) mod_http2: changed all AP_DEBUG_ASSERT to ap_assert to have them + available also in normal deployments. [Stefan Eissing] + + *) mod_http2/mod_proxy_http2: 100-continue handling now properly implemented + up to the backend. Reused HTTP/2 proxy connections with more than a second + not used will block request bodies until a PING answer is received. + Requests headers are not delayed by this, since they are repeatable in + case of failure. This greatly increases robustness, especially with + busy server and/or low keepalive connections. [Stefan Eissing] + + *) mod_proxy_http2: fixed duplicate symbols with mod_http2. + [Stefan Eissing] + + *) mod_http2: rewrite of how responses and trailers are transferred between + master and slave connection. Reduction of internal states for tasks + and streams, stability. Heuristic id generation for slave connections + to better keep promise of connection ids unique at given point int time. + Fix for mod_cgid interop in high load situtations. + Fix for handling of incoming trailers when no request body is sent. + [Stefan Eissing] + + *) mod_http2: fix suspended handling for streams. Output could become + blocked in rare cases. [Stefan Eissing] + + *) mpm_winnt: Prevent a denial of service when the 'data' AcceptFilter is in + use by replacing it with the 'connect' filter. PR 59970. [Jacob Champion] + + *) mod_cgid: Resolve a case where a short CGI response causes a subsequent + CGI to be killed prematurely, resulting in a truncated subsequent + response. [Eric Covener] + + *) mod_proxy_hcheck: Set health check URI and expression correctly for health + check worker. PR 60038 [zdeno ] + + *) mod_http2: if configured with nghttp2 1.14.0 and onward, invalid request + headers will immediately reset the stream with a PROTOCOL error. Feature + logged by module on startup as 'INVHD' in info message. + [Stefan Eissing] + + *) mod_http2: fixed handling of stream buffers during shutdown. + [Stefan Eissing] + + *) mod_reqtimeout: Fix body timeout disabling for CONNECT requests to avoid + triggering mod_proxy_connect's AH01018 once the tunnel is established. + [Yann Ylavic] + + *) ab: Set the Server Name Indication (SNI) extension on outgoing TLS + connections (unless -I is specified), according to the Host header (if + any) or the requested URL's hostname otherwise. [Yann Ylavic] + + *) mod_proxy_fcgi: avoid loops when ProxyErrorOverride is enabled + and the error documents are proxied. PR 55415. [Luca Toscano] + + *) mod_proxy_fcgi: read the whole FCGI response even when the content + has not been modified (HTTP 304) or in case of a precondition failure + (HTTP 412) to avoid subsequent bogus reads and confusing + error messages logged. [Luca Toscano] + + *) mod_http2: h2 status resource follows latest draft, see + http://www.ietf.org/id/draft-benfield-http2-debug-state-01.txt + [Stefan Eissing] + + *) mod_http2: handling graceful shutdown gracefully, e.g. handling existing + streams to the end. [Stefan Eissing] + + *) mod_proxy_{http,ajp,fcgi}: don't reuse backend connections with data + available before the request is sent. PR 57832. [Yann Ylavic] + + *) mod_proxy_balancer: Prevent redirect loops between workers within a + balancer by limiting the number of redirects to the number balancer + members. PR 59864 [Ruediger Pluem] + + *) mod_proxy: Correctly consider error response codes by the backend when + processing failonstatus. PR 59869 [Ruediger Pluem] + + *) mod_dav: Add dav_get_provider_name() function to obtain the name + of the provider from mod_dav. [Graham Leggett] + + *) mod_dav: Add support for childtags to dav_error. + [Jari Urpalainen ] + + *) mod_proxy_fcgi: Fix 2.4.23 breakage for mod_rewrite per-dir and query + string showing up in SCRIPT_FILENAME. PR59815 + + *) mod_include: Fix a potential memory misuse while evaluating expressions. + PR59844. [Eric Covener] + + *) mod_http2: new H2CopyFiles directive that changes treatment of file + handles in responses. Necessary in order to fix broken lifetime handling + in modules such as mod_wsgi. + + *) mod_http2: removing timeouts on master connection while requests are + being processed. Requests may timeout, but the master only times out when + no more requests are active. [Stefan Eissing] + + *) mod_http2: fixes connection flush when answering SETTINGS without any + stream open. [Moto Ishizawa <@summerwind>, Stefan Eissing] + +Changes with Apache 2.4.23 + + *) mod_ssl: reset client-verify state of ssl when aborting renegotiations. + [Erki Aring , Stefan Eissing] + + *) mod_sed: Fix 'x' command processing. [Christophe Jaillet] + + *) configure: Fix ./configure edge-case failures around dependencies + of mod_proxy_hcheck. [William Rowe, Ruediger Pluem, Jeff Trawick] + +Changes with Apache 2.4.22 + + *) mod_http2: fix for request abort when connections drops, introduced in + 1.5.8 + +Changes with Apache 2.4.21 + + *) ab: Use caseless matching for HTTP tokens (e.g. content-length). PR 59111. + [Yann Ylavic] + + *) mod_http2: more rigid error handling in DATA frame assembly, leading + to deterministic connection errors if assembly fails. + [Stefan Eissing, Pal Nilsen ] + + *) abs: Include OPENSSL_Applink when compiling on Windows, to resolve + failures under Visual Studio 2015 and other mismatched MSVCRT flavors. + PR59630 [Jan Ehrhardt ] + + *) mod_ssl: Add "no_crl_for_cert_ok" flag to SSLCARevocationCheck directive + to opt-in previous behaviour (2.2) with CRLs verification when checking + certificate(s) with no corresponding CRL. [Yann Ylavic] + + *) mpm_event, mpm_worker: Fix computation of MinSpareThreads' lower bound + according the number of listeners buckets. [Yann Ylavic] + + *) Add ap_cstr_casecmp[n]() - placeholder of apr_cstr_casecmp[n] functions + for case-insensitive C/POSIX-locale token comparison. + [Jim Jagielski, William Rowe, Yann Ylavic, Branko Čibej] + + *) mod_userdir: Constify and save a few bytes in the conf pool when + parsing the "UserDir" directive. [Christophe Jaillet] + + *) mod_cache: Fix (max-stale with no '=') and enforce (check + integers after '=') Cache-Control header parsing. + [Christophe Jaillet] + + *) core: Add -DDUMP_INCLUDES configtest option to show the tree + of Included configuration files. + [Jacob Champion ] + + *) mod_proxy_fcgi: Avoid passing a filename of proxy:fcgi:// as + SCRIPT_FILENAME to a FastCGI server. PR59618. + [Jacob Champion ] + + *) mod_dav: Add dav_get_provider_name() function to obtain the name + of the provider from mod_dav. + [Jari Urpalainen ] + + *) mod_proxy_http2: properly care for HTTP2 flow control of the frontend + connection is HTTP/1.1. [Patch supplied by Evgeny Kotkov] + + *) mod_http2: improved cleanup of connection/streams/tasks to always + have deterministic order regardless of event initiating it. Addresses + reported crashes due to memory read after free issues. + [Stefan Eissing] + + *) mod_ssl: Correct the interaction between SSLProxyCheckPeerCN and newer + SSLProxyCheckPeerName directives since release 2.4.5, such that disabling + either disables both, and that enabling either triggers the new, more + comprehensive SSLProxyCheckPeerName behavior. Only a single configuration + remains to enable the legacy behavior, which is to explicitly disable + SSLProxyCheckPeerName, and enable SSLProxyCheckPeerCN. [William Rowe] + + *) mod_include: add the + statements. [Christophe Jaillet] + + *) split-logfile: Fix perl error: 'Can't use string ("example.org:80") + as a symbol ref while "strict refs"'. PR 56329. + [Holger Mauermann ] + + *) mod_proxy: Prevent ProxyPassReverse from doing a substitution when + the URL parameter interpolates to an empty string. PR 56603. + [] + + *) core: Fix -D[efined] or [d] variables lifetime across restarts. + PR 57328. [Armin Abfalterer , Yann Ylavic]. + + *) mod_proxy: Preserve original request headers even if they differ + from the ones to be forwarded to the backend. PR 45387. + [Yann Ylavic] + + *) mod_ssl: dump SSL IO/state for the write side of the connection(s), + like reads (level TRACE4). [Yann Ylavic] + + *) mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198. + [Jan Kaluza] + + *) mod_ssl: Do not crash when looking up SSL related variables during + expression evaluation on non SSL connections. PR 57070 [Ruediger Pluem] + + *) mod_proxy_ajp: Fix handling of the default port (8009) in the + ProxyPass and configurations. PR 57259. [Yann Ylavic] + + *) mpm_event: Avoid a possible use after free when notifying the end of + connection during lingering close. PR 57268. [Eric Covener, Yann Ylavic] + + *) mod_ssl: Fix recognition of OCSP stapling responses that are encoded + improperly or too large. [Jeff Trawick] + + *) core: Add ap_log_data(), ap_log_rdata(), etc. for logging buffers. + [Jeff Trawick] + + *) mod_proxy_fcgi, mod_authnz_fcgi: stop reading the response and issue an + error when parsing or forwarding the response fails. [Yann Ylavic] + + *) mod_ssl: Fix a memory leak in case of graceful restarts with OpenSSL >= 0.9.8e + PR 53435 [tadanori , Sebastian Wiedenroth ] + + *) mod_proxy_connect: Don't issue AH02447 on sockets hangups, let the read + determine whether it is a normal close or a real error. PR 57168. [Yann + Ylavic] + + *) mod_proxy_wstunnel: abort backend connection on polling error to avoid + further processing. [Yann Ylavic] + + *) core: Support custom ErrorDocuments for HTTP 501 and 414 status codes. + PR 57167 [Edward Lu ] + + *) mod_proxy_connect: Fix ProxyRemote to https:// backends on EBCDIC + systems. PR 57092 [Edward Lu ] + + *) mod_cache: Avoid a 304 response to an unconditional requst when an AH00752 + CacheLock error occurs during cache revalidation. [Eric Covener] + + *) mod_ssl: Move OCSP stapling information from a per-certificate store to + a per-server hash. PR 54357, PR 56919. [Alex Bligh , + Yann Ylavic, Kaspar Brand] + + *) mod_cache_socache: Change average object size hint from 32 bytes to + 2048 bytes. [Rainer Jung] + + *) mod_cache_socache: Add cache status to server-status. [Rainer Jung] + + *) event: Fix worker-listener deadlock in graceful restart. + PR 56960. + + *) Concat strings at compile time when possible. PR 53741. + + *) mod_substitute: Restrict configuration in .htaccess to + FileInfo as documented. [Rainer Jung] + + *) mod_substitute: Make maximum line length configurable. [Rainer Jung] + + *) mod_substitute: Fix line length limitation in case of regexp plus flatten. + [Rainer Jung] + + *) mod_proxy: Truncated character worker names are no longer fatal + errors. PR53218. [Jim Jagielski] + + *) mod_dav: Set r->status_line in dav_error_response. PR 55426. + + *) mod_proxy_http, mod_cache: Avoid (unlikely) accesses to freed memory. + [Yann Ylavic, Christophe Jaillet] + + *) http_protocol: fix logic in ap_method_list_(add|remove) in order: + - to correctly reset bits + - not to modify the 'method_mask' bitfield unnecessarily + [Christophe Jaillet] + + *) mod_slotmem_shm: Increase log level for some originally debug messages. + [Jim Jagielski] + + *) mod_ldap: In 2.4.10, some LDAP searches or comparisons might be done with + the wrong credentials when a backend connection is reused. + [Eric Covener] + + *) mod_macro: Add missing APLOGNO for some Warning log messages. + [Christophe Jaillet] + + *) mod_cache: Avoid sending 304 responses during failed revalidations + PR56881. [Eric Covener] + + *) mod_status: Honor client IP address using mod_remoteip. PR 55886. + [Jim Jagielski] + + *) cmake-based build for Windows: Fix incompatibility with cmake 2.8.12 + and later. PR 56615. [Chuck Liu , Jeff Trawick] + + *) mod_ratelimit: Drop severity of AH01455 and AH01457 (ap_pass_brigade + failed) messages from ERROR to TRACE1. Other filters do not bother + re-reporting failures from lower level filters. PR56832. [Eric Covener] + + *) core: Avoid useless warning message when parsing a section guarded by + if $(foo) is used within the section. + PR 56503 [Christophe Jaillet] + + *) mod_proxy_fcgi: Fix faulty logging of large amounts of stderr from the + application. PR 56858. [Manuel Mausz ] + + *) mod_proxy_http: Proxy responses with error status and + "ProxyErrorOverride On" hang until proxy timeout. + PR53420 [Rainer Jung] + + *) mod_log_config: Allow three character log formats to be registered. For + backwards compatibility, the first character of a three-character format + must be the '^' (caret) character. [Eric Covener] + + *) mod_lua: Don't quote Expires and Path values. PR 56734. + [Keith Mashinter, ] + + *) mod_authz_core: Allow 'es to be seen from auth + stanzas under virtual hosts. PR 56870. [Eric Covener] + +Changes with Apache 2.4.10 + + *) SECURITY: CVE-2014-0117 (cve.mitre.org) + mod_proxy: Fix crash in Connection header handling which allowed a denial + of service attack against a reverse proxy with a threaded MPM. + [Ben Reser] + + *) SECURITY: CVE-2014-3523 (cve.mitre.org) + Fix a memory consumption denial of service in the WinNT MPM, used in all + Windows installations. Workaround: AcceptFilter {none|connect} + [Jeff Trawick] + + *) SECURITY: CVE-2014-0226 (cve.mitre.org) + Fix a race condition in scoreboard handling, which could lead to + a heap buffer overflow. [Joe Orton, Eric Covener] + + *) SECURITY: CVE-2014-0118 (cve.mitre.org) + mod_deflate: The DEFLATE input filter (inflates request bodies) now + limits the length and compression ratio of inflated request bodies to + avoid denial of service via highly compressed bodies. See directives + DeflateInflateLimitRequestBody, DeflateInflateRatioLimit, + and DeflateInflateRatioBurst. [Yann Ylavic, Eric Covener] + + *) SECURITY: CVE-2014-0231 (cve.mitre.org) + mod_cgid: Fix a denial of service against CGI scripts that do + not consume stdin that could lead to lingering HTTPD child processes + filling up the scoreboard and eventually hanging the server. By + default, the client I/O timeout (Timeout directive) now applies to + communication with scripts. The CGIDScriptTimeout directive can be + used to set a different timeout for communication with scripts. + [Rainer Jung, Eric Covener, Yann Ylavic] + + *) mod_ssl: Extend the scope of SSLSessionCacheTimeout to sessions + resumed by TLS session resumption (RFC 5077). [Rainer Jung] + + *) mod_deflate: Don't fail when flushing inflated data to the user-agent + and that coincides with the end of stream ("Zlib error flushing inflate + buffer"). PR 56196. [Christoph Fausak ] + + *) mod_proxy_ajp: Forward local IP address as a custom request attribute + like we already do for the remote port. [Rainer Jung] + + *) core: Include any error notes set by modules in the canned error + response for 403 errors. [Jeff Trawick] + + *) mod_ssl: Set an error note for requests rejected due to + SSLStrictSNIVHostCheck. [Jeff Trawick] + + *) mod_ssl: Fix issue with redirects to error documents when handling + SNI errors. [Jeff Trawick] + + *) mod_ssl: Fix tmp DH parameter leak, adjust selection to prefer + larger keys and support up to 8192-bit keys. [Ruediger Pluem, + Joe Orton] + + *) mod_dav: Fix improper encoding in PROPFIND responses. PR 56480. + [Ben Reser] + + *) WinNT MPM: Improve error handling for termination events in child. + [Jeff Trawick] + + *) mod_proxy: When ping/pong is configured for a worker, don't send or + forward "100 Continue" (interim) response to the client if it does + not expect one. [Yann Ylavic] + + *) mod_ldap: Be more conservative with the last-used time for + LDAPConnectionPoolTTL. PR54587 [Eric Covener] + + *) mod_ldap: LDAP connections used for authn were not respecting + LDAPConnectionPoolTTL. PR54587 [Eric Covener] + + *) mod_proxy_fcgi: Fix occasional high CPU when handling request bodies. + [Jeff Trawick] + + *) event MPM: Fix possible crashes (third-party modules accessing c->sbh) + or occasional missed mod_status updates under load. PR 56639. + [Edward Lu ] + + *) mod_authnz_ldap: Support primitive LDAP servers do not accept + filters, such as "SDBM-backed LDAP" on z/OS, by allowing a special + filter "none" to be specified in AuthLDAPURL. [Eric Covener] + + *) mod_deflate: Fix inflation of files larger than 4GB. PR 56062. + [Lukas Bezdicka ] + + *) mod_deflate: Handle Zlib header and validation bytes received in multiple + chunks. PR 46146. [Yann Ylavic] + + *) mod_proxy: Allow reverse-proxy to be set via explicit handler. + [ryo takatsuki ] + + *) ab: support custom HTTP method with -m argument. PR 56604. + [Roman Jurkov ] + + *) mod_proxy_balancer: Correctly encode user provided data in management + interface. PR 56532 [Maksymilian, ] + + *) mod_proxy: Don't limit the size of the connectable Unix Domain Socket + paths. [Graham Dumpleton, Christophe Jaillet, Yann Ylavic] + + *) mod_proxy_fcgi: Support iobuffersize parameter. [Jeff Trawick] + + *) event: Send the SSL close notify alert when the KeepAliveTimeout + expires. PR54998. [Yann Ylavic] + + *) mod_ssl: Ensure that the SSL close notify alert is flushed to the client. + PR54998. [Tim Kosse , Yann Ylavic] + + *) mod_proxy: Shutdown (eg. SSL close notify) the backend connection before + closing. [Yann Ylavic] + + *) mod_auth_form: Add a debug message when the fields on a form are not + recognised. [Graham Leggett] + + *) mod_cache: Preserve non-cacheable headers forwarded from an origin 304 + response. PR 55547. [Yann Ylavic] + + *) mod_proxy_wstunnel: Fix the use of SSL connections with the "wss:" + scheme. PR55320. [Alex Liu ] + + *) mod_socache_shmcb: Correct counting of expirations for status display. + Expirations happening during retrieval were not counted. [Rainer Jung] + + *) mod_cache: Retry unconditional request with the full URL (including the + query-string) when the origin server's 304 response does not match the + conditions used to revalidate the stale entry. [Yann Ylavic]. + + *) mod_alias: Stop setting CONTEXT_PREFIX and CONTEXT_DOCUMENT environment + variables as a result of AliasMatch. [Eric Covener] + + *) mod_cache: Don't add cached/revalidated entity headers to a 304 response. + PR 55547. [Yann Ylavic] + + *) mod_proxy_scgi: Support Unix sockets. ap_proxy_port_of_scheme(): + Support default SCGI port (4000). [Jeff Trawick] + + *) mod_cache: Fix AH00784 errors on Windows when the the CacheLock directive + is enabled. [Eric Covener] + + *) mod_expires: don't add Expires header to error responses (4xx/5xx), + be they generated or forwarded. PR 55669. [Yann Ylavic] + + *) mod_proxy_fcgi: Don't segfault when failing to connect to the backend. + (regression in 2.4.9 release) [Jeff Trawick] + + *) mod_authn_socache: Fix crash at startup in certain configurations. + PR 56371. (regression in 2.4.7) [Jan Kaluza] + + *) mod_ssl: restore argument structure for "exec"-type SSLPassPhraseDialog + programs to the form used in releases up to 2.4.7, and emulate + a backwards-compatible behavior for existing setups. [Kaspar Brand] + + *) mod_ssl: Add SSLOCSPUseRequestNonce directive to control whether or not + OCSP requests should use a nonce to be checked against the responder's + one. PR 56233. [Yann Ylavic, Kaspar Brand] + + *) mod_ssl: "SSLEngine off" will now override a Listen-based default + and does disable mod_ssl for the vhost. [Joe Orton] + + *) mod_lua: Enforce the max post size allowed via r:parsebody() + [Daniel Gruno] + + *) mod_lua: Use binary comparison to find boundaries for multipart + objects, as to not terminate our search prematurely when hitting + a NULL byte. [Daniel Gruno] + + *) mod_ssl: add workaround for SSLCertificateFile when using OpenSSL + versions before 0.9.8h and not specifying an SSLCertificateChainFile + (regression introduced with 2.4.8). PR 56410. [Kaspar Brand] + + *) mod_ssl: bring SNI behavior into better conformance with RFC 6066: + no longer send warning-level unrecognized_name(112) alerts, + and limit startup warnings to cases where an OpenSSL version + without TLS extension support is used. PR 56241. [Kaspar Brand] + + *) mod_proxy_html: Avoid some possible memory access violation in case of + specially crafted files, when the ProxyHTMLMeta directive is turned on. + Follow up of PR 56287 [Christophe Jaillet] + + *) mod_auth_form: Make sure the optional functions are loaded even when + the AuthFormProvider isn't specified. [Graham Leggett] + + *) mod_ssl: avoid processing bogus SSLCertificateKeyFile values + (and logging garbled file names). PR 56306. [Kaspar Brand] + + *) mod_ssl: fix merging of global and vhost-level settings with the + SSLCertificateFile, SSLCertificateKeyFile, and SSLOpenSSLConfCmd + directives. PR 56353. [Kaspar Brand] + + *) mod_headers: Allow the "value" parameter of Header and RequestHeader to + contain an ap_expr expression if prefixed with "expr=". [Eric Covener] + + *) rotatelogs: Avoid creation of zombie processes when -p is used on + Unix platforms. [Joe Orton] + + *) mod_authnz_fcgi: New module to enable FastCGI authorizer + applications to authenticate and/or authorize clients. + [Jeff Trawick] + + *) mod_proxy: Do not try to parse the regular expressions passed by + ProxyPassMatch as URL as they do not follow their syntax. + PR 56074. [Ruediger Pluem] + + *) mod_reqtimeout: Resolve unexpected timeouts on keepalive requests + under the Event MPM. PR56216. [Frank Meier ] + + *) mod_proxy_fcgi: Fix sending of response without some HTTP headers + that might be set by filters. PR 55558. [Jim Riggs ] + + *) mod_proxy_html: Do not delete the wrong data from HTML code when a + "http-equiv" meta tag specifies a Content-Type behind any other + "http-equiv" meta tag. PR 56287 [Micha Lenk ] + + *) mod_proxy: Don't reuse a SSL backend connection whose requested SNI + differs. PR 55782. [Yann Ylavic] + + *) Add suspend_connection and resume_connection hooks to notify modules + when the thread/connection relationship changes. (Should be implemented + for any third-party async MPMs.) [Jeff Trawick] + + *) mod_proxy_wstunnel: Don't issue AH02447 and log a 500 on routine + hangups from websockets origin servers. PR 56299 + [Yann Ylavic, Edward Lu , Eric Covener] + + *) mod_proxy_wstunnel: Don't pool backend websockets connections, + because we need to handshake every time. PR 55890. + [Eric Covener] + + *) mod_lua: Redesign how request record table access behaves, + in order to utilize the request record from within these tables. + [Daniel Gruno] + + *) mod_lua: Add r:wspeek for peeking at WebSocket frames. [Daniel Gruno] + + *) mod_lua: Log an error when the initial parsing of a Lua file fails. + [Daniel Gruno, Felipe Daragon ] + + *) mod_lua: Reformat and escape script error output. + [Daniel Gruno, Felipe Daragon ] + + *) mod_lua: URL-escape cookie keys/values to prevent tainted cookie data + from causing response splitting. + [Daniel Gruno, Felipe Daragon ] + + *) mod_lua: Disallow newlines in table values inside the request_rec, + to prevent HTTP Response Splitting via tainted headers. + [Daniel Gruno, Felipe Daragon ] + + *) mod_lua: Remove the non-working early/late arguments for + LuaHookCheckUserID. [Daniel Gruno] + + *) mod_lua: Change IVM storage to use shm [Daniel Gruno] + + *) mod_lua: More verbose error logging when a handler function cannot be + found. [Daniel Gruno] + +Changes with Apache 2.4.9 + + *) mod_ssl: Work around a bug in some older versions of OpenSSL that + would cause a crash in SSL_get_certificate for servers where the + certificate hadn't been sent. [Stephen Henson] + + *) mod_lua: Add a fixups hook that checks if the original request is intended + for LuaMapHandler. This fixes a bug where FallbackResource invalidates the + LuaMapHandler directive in certain cases by changing the URI before the map + handler code executes [Daniel Gruno, Daniel Ferradal ]. + +Changes with Apache 2.4.8 (not released) + + *) SECURITY: CVE-2014-0098 (cve.mitre.org) + Clean up cookie logging with fewer redundant string parsing passes. + Log only cookies with a value assignment. Prevents segfaults when + logging truncated cookies. + [William Rowe, Ruediger Pluem, Jim Jagielski] + + *) SECURITY: CVE-2013-6438 (cve.mitre.org) + mod_dav: Keep track of length of cdata properly when removing + leading spaces. Eliminates a potential denial of service from + specifically crafted DAV WRITE requests + [Amin Tora ] + + *) core: Support named groups and backreferences within the LocationMatch, + DirectoryMatch, FilesMatch and ProxyMatch directives. (Requires + non-ancient PCRE library) [Graham Leggett] + + *) core: draft-ietf-httpbis-p1-messaging-23 corrections regarding + TE/CL conflicts. [Yann Ylavic, Jim Jagielski] + + *) core: Detect incomplete request and response bodies, log an error and + forward it to the underlying filters. PR 55475 [Yann Ylavic] + + *) mod_dir: Add DirectoryCheckHandler to allow a 2.2-like behavior, skipping + execution when a handler is already set. PR53929. [Eric Covener] + + *) mod_ssl: Do not perform SNI / Host header comparison in case of a + forward proxy request. [Ruediger Pluem] + + *) mod_ssl: Remove the hardcoded algorithm-type dependency for the + SSLCertificateFile and SSLCertificateKeyFile directives, to enable + future algorithm agility, and deprecate the SSLCertificateChainFile + directive (obsoleted by SSLCertificateFile). [Kaspar Brand] + + *) mod_rewrite: Add RewriteOptions InheritDown, InheritDownBefore, + and IgnoreInherit to allow RewriteRules to be pushed from parent scopes + to child scopes without explicitly configuring each child scope. + PR56153. [Edward Lu ] + + *) prefork: Fix long delays when doing a graceful restart. + PR 54852 [Jim Jagielski, Arkadiusz Miskiewicz ] + + *) FreeBSD: Disable IPv4-mapped listening sockets by default for versions + 5+ instead of just for FreeBSD 5. PR 53824. [Jeff Trawick] + + *) mod_proxy_wstunnel: Avoid busy loop on client errors, drop message + IDs 02445, 02446, and 02448 to TRACE1 from DEBUG. PR 56145. + [Joffroy Christen , Eric Covener] + + *) mod_remoteip: Correct the trusted proxy match test. PR 54651. + [Yoshinori Ehara , Eugene L ] + + *) mod_proxy_fcgi: Fix error message when an unexpected protocol version + number is received from the application. PR 56110. [Jeff Trawick] + + *) mod_remoteip: Use the correct IP addresses to populate the proxy_ips field. + PR 55972. [Mike Rumph] + + *) mod_lua: Update r:setcookie() to accept a table of options and add domain, + path and httponly to the list of options available to set. + PR 56128 [Edward Lu , Daniel Gruno] + + *) mod_lua: Fix r:setcookie() to add, rather than replace, + the Set-Cookie header. PR56105 + [Kevin J Walters , Edward Lu ] + + *) mod_lua: Allow for database results to be returned as a hash with + row-name/value pairs instead of just row-number/value. [Daniel Gruno] + + *) mod_rewrite: Add %{CONN_REMOTE_ADDR} as the non-useragent counterpart to + %{REMOTE_ADDR}. PR 56094. [Edward Lu ] + + *) WinNT MPM: If ap_run_pre_connection() fails or sets c->aborted, don't + save the socket for reuse by the next worker as if it were an + APR_SO_DISCONNECTED socket. Restores 2.2 behavior. [Eric Covener] + + *) mod_dir: Don't search for a DirectoryIndex or DirectorySlash on a URL + that was just rewritten by mod_rewrite. PR53929. [Eric Covener] + + *) mod_session: When we have a session we were unable to decode, + behave as if there was no session at all. [Thomas Eckert + ] + + *) mod_session: Fix problems interpreting the SessionInclude and + SessionExclude configuration. PR 56038. [Erik Pearson + ] + + *) mod_authn_core: Allow 'es to be seen from auth + stanzas under virtual hosts. PR 55622. [Eric Covener] + + *) mod_proxy_fcgi: Use apr_socket_timeout_get instead of hard-coded + 30 seconds timeout. [Jan Kaluza] + + *) build: only search for modules (config*.m4) in known subdirectories, see + build/config-stubs. [Stefan Fritsch] + + *) mod_cache_disk: Fix potential hangs on Windows when using mod_cache_disk. + PR 55833. [Eric Covener] + + *) mod_ssl: Add support for OpenSSL configuration commands by introducing + the SSLOpenSSLConfCmd directive. [Stephen Henson, Kaspar Brand] + + *) mod_proxy: Remove (never documented) syntax which + is equivalent to . [Christophe Jaillet] + + *) mod_authz_user, mod_authz_host, mod_authz_groupfile, mod_authz_dbm, + mod_authz_dbd, mod_authnz_ldap: Support the expression parser within the + require directives. [Graham Leggett] + + *) mod_proxy_http: Core dumped under high load. PR 50335. + [Jan Kaluza ] + + *) mod_socache_shmcb.c: Remove arbitrary restriction on shared memory size + previously limited to 64MB. [Jens Låås ] + + *) mod_lua: Use binary copy when dealing with uploads through r:parsebody() + to prevent truncating files. [Daniel Gruno] + +Changes with Apache 2.4.7 + + *) SECURITY: CVE-2013-4352 (cve.mitre.org) + mod_cache: Fix a NULL pointer deference which allowed untrusted + origin servers to crash mod_cache in a forward proxy + configuration. [Graham Leggett] + + *) APR 1.5.0 or later is now required for the event MPM. + + *) slotmem_shm: Error detection. [Jim Jagielski] + + *) event: Use skiplist data structure. [Jim Jagielski] + + *) event: Fail at startup with message AP02405 if the APR atomic + implementation is not compatible with the MPM. [Jim Jagielski] + + *) mpm_unix: Add ap_mpm_podx_* implementation to avoid code duplication + and align w/ trunk. [Jim Jagielski] + + *) Fix potential rejection of valid MaxMemFree and ThreadStackSize + directives. [Mike Rumph ] + + *) mod_proxy_fcgi: Remove 64K limit on encoded length of all envvars. + An individual envvar with an encoded length of more than 16K will be + omitted. [Jeff Trawick] + + *) mod_proxy_fcgi: Handle reading protocol data that is split between + packets. [Jeff Trawick] + + *) mod_ssl: Improve handling of ephemeral DH and ECDH keys by + allowing custom parameters to be configured via SSLCertificateFile, + and by adding standardized DH parameters for 1024/2048/3072/4096 bits. + Unless custom parameters are configured, the standardized parameters + are applied based on the certificate's RSA/DSA key size. [Kaspar Brand] + + *) mod_ssl, configure: Require OpenSSL 0.9.8a or later. [Kaspar Brand] + + *) mod_ssl: drop support for export-grade ciphers with ephemeral RSA + keys, and unconditionally disable aNULL, eNULL and EXP ciphers + (not overridable via SSLCipherSuite). [Kaspar Brand] + + *) mod_proxy: Added support for unix domain sockets as the + backend server endpoint. This also introduces an unintended + incompatibility for third party modules using the mod_proxy + proxy_worker_shared structure, especially for balancer lbmethod + modules. [Jim Jagielski, Blaise Tarr ] + + *) Add experimental cmake-based build system for Windows. [Jeff Trawick, + Tom Donovan] + + *) event MPM: Fix possible crashes (third party modules accessing c->sbh) + or occasional missed mod_status updates for some keepalive requests + under load. [Eric Covener] + + *) mod_authn_socache: Support optional initialization arguments for + socache providers. [Chris Darroch] + + *) mod_session: Reset the max-age on session save. PR 47476. [Alexey + Varlamov ] + + *) mod_session: After parsing the value of the header specified by the + SessionHeader directive, remove the value from the response. PR 55279. + [Graham Leggett] + + *) mod_headers: Allow for format specifiers in the substitution string + when using Header edit. [Daniel Ruggeri] + + *) mod_dav: dav_resource->uri is treated as unencoded. This was an + unnecessary ABI changed introduced in 2.4.6. PR 55397. + + *) mod_dav: Don't require lock tokens for COPY source. PR 55306. + + *) core: Don't truncate output when sending is interrupted by a signal, + such as from an exiting CGI process. PR 55643. [Jeff Trawick] + + *) WinNT MPM: Exit the child if the parent process crashes or is terminated. + [Oracle Corporation] + + *) Windows: Correct failure to discard stderr in some error log + configurations. (Error message AH00093) [Jeff Trawick] + + *) mod_session_crypto: Allow using exec: calls to obtain session + encryption key. [Daniel Ruggeri] + + *) core: Add missing Reason-Phrase in HTTP response headers. + PR 54946. [Rainer Jung] + + *) mod_rewrite: Make rewrite websocket-aware to allow proxying. + PR 55598. [Chris Harris ] + + *) mod_ldap: When looking up sub-groups, use an implicit objectClass=* + instead of an explicit cn=* filter. [David Hawes ] + + *) ab: Add wait time, fix processing time, and output write errors only if + they occurred. [Christophe Jaillet] + + *) worker MPM: Don't forcibly kill worker threads if the child process is + exiting gracefully. [Oracle Corporation] + + *) core: apachectl -S prints wildcard name-based virtual hosts twice. + PR54948 [Eric Covener] + + *) mod_auth_basic: Add AuthBasicUseDigestAlgorithm directive to + allow migration of passwords from digest to basic authentication. + [Chris Darroch] + + *) ab: Add a new -l parameter in order not to check the length of the responses. + This can be useful with dynamic pages. + PR9945, PR27888, PR42040 [] + + *) Suppress formatting of startup messages written to the console when + ErrorLogFormat is used. [Jeff Trawick] + + *) mod_auth_digest: Be more specific when the realm mismatches because the + realm has not been specified. [Graham Leggett] + + *) mod_proxy: Add a note in the balancer manager stating whether changes + will or will not be persisted and whether settings are inherited. + [Daniel Ruggeri, Jim Jagielski] + + *) core: Add util_fcgi.h and associated definitions and support + routines for FastCGI, based largely on mod_proxy_fcgi. + [Jeff Trawick] + + *) mod_headers: Add 'Header note header-name note-name' for copying a response + headers value into a note. [Eric Covener] + + *) mod_headers: Add 'setifempty' command to Header and RequestHeader. + [Eric Covener] + + *) mod_logio: new format-specifier %S (sum) which is the sum of received + and sent byte counts. + PR54015 [Christophe Jaillet] + + *) mod_deflate: Improve error detection when decompressing request bodies + with trailing garbage: handle case where trailing bytes are in + the same bucket. [Rainer Jung] + + *) mod_authz_groupfile, mod_authz_user: Reduce severity of AH01671 and AH01663 + from ERROR to DEBUG, since these modules do not know what mod_authz_core + is doing with their AUTHZ_DENIED return value. [Eric Covener] + + *) mod_ldap: add TRACE5 for LDAP retries. [Eric Covener] + + *) mod_ldap: retry on an LDAP timeout during authn. [Eric Covener] + + *) mod_ldap: Change "LDAPReferrals off" to actually set the underlying LDAP + SDK option to OFF, and introduce "LDAPReferrals default" to take the SDK + default, sans rebind authentication callback. + [Jan Kaluza ] + + *) core: Log a message at TRACE1 when the client aborts a connection. + [Eric Covener] + + *) WinNT MPM: Don't crash during child process initialization if the + Listen protocol is unrecognized. [Jeff Trawick] + + *) modules: Fix some compiler warnings. [Guenter Knauf] + + *) Sync 2.4 and trunk + - Avoid some memory allocation and work when TRACE1 is not activated + - fix typo in include guard + - indent + - No need to lower the string before removing the path, it is just + a waste of time... + - Save a few cycles + [Christophe Jaillet ] + + *) mod_filter: Add "change=no" as a proto-flag to FilterProtocol + to remove a providers initial flags set at registration time. + [Eric Covener] + + *) core, mod_ssl: Enable the ability for a module to reverse the sense of + a poll event from a read to a write or vice versa. This is a step on + the way to allow mod_ssl taking full advantage of the event MPM. + [Graham Leggett] + + *) Makefile.win: Install proper pcre DLL file during debug build install. + PR 55235. [Ben Reser ] + + *) mod_ldap: Fix a potential memory leak or corruption. PR 54936. + [Zhenbo Xu ] + + *) ab: Fix potential buffer overflows when processing the T and X + command-line options. PR 55360. + [Mike Rumph ] + + *) fcgistarter: Specify SO_REUSEADDR to allow starting a server + with old connections in TIME_WAIT. [Jeff Trawick] + + *) core: Add open_htaccess hook which, in conjunction with dirwalk_stat + and post_perdir_config (introduced in 2.4.5), allows mpm-itk to be + used without patches to httpd core. [Stefan Fritsch] + + *) support/htdbm: fix processing of -t command line switch. Regression + introduced in 2.4.4 + PR 55264 [Jo Rhett ] + + *) mod_lua: add websocket support via r:wsupgrade, r:wswrite, r:wsread + and r:wsping. [Daniel Gruno] + + *) mod_lua: add support for writing/reading cookies via r:getcookie and + r:setcookie. [Daniel Gruno] + + *) mod_lua: If the first yield() of a LuaOutputFilter returns a string, it should + be prefixed to the response as documented. [Eric Covener] + Note: Not present in 2.4.7 CHANGES + + *) mod_lua: Remove ETAG, Content-Length, and Content-MD5 when a LuaOutputFilter + is configured without mod_filter. [Eric Covener] + Note: Not present in 2.4.7 CHANGES + + *) mod_lua: Register LuaOutputFilter scripts as changing the content and + content-length by default, when run my mod_filter. Previously, + growing or shrinking a response that started with Content-Length set + would require mod_filter and FilterProtocol change=yes. [Eric Covener] + Note: Not present in 2.4.7 CHANGES + + *) mod_lua: Return a 500 error if a LuaHook* script doesn't return a + numeric return code. [Eric Covener] + Note: Not present in 2.4.7 CHANGES + +Changes with Apache 2.4.6 + + *) Revert a broken fix for PR54948 that was applied to 2.4.5 (which was + not released) and found post-2.4.5 tagging. + +Changes with Apache 2.4.5 + + *) SECURITY: CVE-2013-1896 (cve.mitre.org) + mod_dav: Sending a MERGE request against a URI handled by mod_dav_svn with + the source href (sent as part of the request body as XML) pointing to a + URI that is not configured for DAV will trigger a segfault. [Ben Reser + ] + + *) SECURITY: CVE-2013-2249 (cve.mitre.org) + mod_session_dbd: Make sure that dirty flag is respected when saving + sessions, and ensure the session ID is changed each time the session + changes. This changes the format of the updatesession SQL statement. + Existing configurations must be changed. + [Takashi Sato, Graham Leggett] + + *) mod_auth_basic: Add a generic mechanism to fake basic authentication + using the ap_expr parser. AuthBasicFake allows the administrator to + construct their own username and password for basic authentication based + on their needs. [Graham Leggett] + + *) mpm_event: Check that AsyncRequestWorkerFactor is not negative. PR 54254. + [Jackie Zhang ] + + *) mod_proxy: Ensure we don't attempt to amend a table we are iterating + through, ensuring that all headers listed by Connection are removed. + [Graham Leggett, Co-Advisor ] + + *) mod_proxy_http: Make the proxy-interim-response environment variable + effective by formally overriding origin server behaviour. [Graham + Leggett, Co-Advisor ] + + *) mod_proxy: Fix seg-faults when using the global pool on threaded + MPMs [Thomas Eckert , Graham Leggett, + Jim Jagielski] + + *) mod_deflate: Remove assumptions as to when an EOS bucket might arrive. + Gracefully step aside if the body size is zero. [Graham Leggett] + + *) mod_ssl: Fix possible truncation of OCSP responses when reading from the + server. [Joe Orton] + + *) core: Support the SINGLE_LISTEN_UNSERIALIZED_ACCEPT optimization + on Linux kernel versions 3.x and above. PR 55121. [Bradley Heilbrun + ] + + *) mod_cache_socache: Make sure the CacheSocacheMaxSize directive is merged + correctly. [Jens Låås ] + + *) rotatelogs: add -n number-of-files option to rotate through a number + of fixed-name logfiles. [Eric Covener] + + *) mod_proxy: Support web-socket tunnels via mod_proxy_wstunnel. + [Jim Jagielski] + + *) mod_cache_socache: Use the name of the socache implementation when performing + a lookup rather than using the raw arguments. [Martin Ksellmann + ] + + *) core: Add dirwalk_stat hook. [Jeff Trawick] + + *) core: Add post_perdir_config hook. + [Steinar Gunderson ] + + *) proxy_util: NULL terminate the right buffer in 'send_http_connect'. + [Christophe Jaillet] + + *) mod_remoteip: close file in error path. [Christophe Jaillet] + + *) core: make the "default" parameter of the "ErrorDocument" option case + insensitive. PR 54419 [Tianyin Xu ] + + *) mod_proxy_html: make the "ProxyHTMLFixups" options case insensitive. + PR 54420 [Tianyin Xu ] + + *) mod_cache: Make option "CacheDisable" in mod_cache case insensitive. + PR 54462 [Tianyin Xu ] + + *) mod_cache: If a 304 response indicates an entity not currently cached, then + the cache MUST disregard the response and repeat the request without the + conditional. [Graham Leggett, Co-Advisor ] + + *) mod_cache: Ensure that we don't attempt to replace a cached response + with an older response as per RFC2616 13.12. [Graham Leggett, Co-Advisor + ] + + *) core, mod_cache: Ensure RFC2616 compliance in ap_meets_conditions() + with weak validation combined with If-Range and Range headers. Break + out explicit conditional header checks to be useable elsewhere in the + server. Ensure weak validation RFC compliance in the byteranges filter. + Ensure RFC validation compliance when serving cached entities. PR 16142 + [Graham Leggett, Co-Advisor ] + + *) core: Add the ability to do explicit matching on weak and strong ETags + as per RFC2616 Section 13.3.3. [Graham Leggett, Co-Advisor + ] + + *) mod_cache: Ensure that updated responses to HEAD requests don't get + mistakenly paired with a previously cached body. Ensure that any existing + body is removed when a HEAD request is cached. [Graham Leggett, + Co-Advisor ] + + *) mod_cache: Honour Cache-Control: no-store in a request. [Graham Leggett] + + *) mod_cache: Make sure that contradictory entity headers present in a 304 + Not Modified response are caught and cause the entity to be removed. + [Graham Leggett] + + *) mod_cache: Make sure Vary processing handles multivalued Vary headers and + multivalued headers referred to via Vary. [Graham Leggett] + + *) mod_cache: When serving from cache, only the last header of a multivalued + header was taken into account. Fixed. Ensure that Warning headers are + correctly handled as per RFC2616. [Graham Leggett] + + *) mod_cache: Ignore response headers specified by no-cache=header and + private=header as specified by RFC2616 14.9.1 What is Cacheable. Ensure + that these headers are still processed when multiple Cache-Control + headers are present in the response. PR 54706 [Graham Leggett, + Yann Ylavic ] + + *) mod_cache: Invalidate cached entities in response to RFC2616 Section + 13.10 Invalidation After Updates or Deletions. PR 15868 [Graham + Leggett] + + *) mod_dav: Improve error handling in dav_method_put(), add new + dav_join_error() function. PR 54145. [Ben Reser ] + + *) mod_dav: Do not fail PROPPATCH when prop namespace is not known. + PR 52559 [Diego Santa Cruz ] + + *) mod_dav: When a PROPPATCH attempts to remove a non-existent dead + property on a resource for which there is no dead property in the same + namespace httpd segfaults. PR 52559 [Diego Santa Cruz + ] + + *) mod_dav: Sending an If or If-Match header with an invalid ETag doesn't + result in a 412 Precondition Failed for a COPY operation. PR54610 + [Timothy Wood ] + + *) mod_dav: Make sure that when we prepare an If URL for Etag comparison, + we compare unencoded paths. PR 53910 [Timothy Wood ] + + *) mod_deflate: Remove assumptions as to when an EOS bucket might arrive. + Gracefully step aside if the body size is zero. [Graham Leggett] + + *) 'AuthGroupFile' and 'AuthUserFile' do not accept anymore the optional + 'standard' keyword . It was unused and not documented. + PR54463 [Tianyin Xu and Christophe Jaillet] + + *) core: Do not over allocate memory within 'ap_rgetline_core' for + the common case. [Christophe Jaillet] + + *) core: speed up (for common cases) and reduce memory usage of + ap_escape_logitem(). This should save 70-100 bytes in the request + pool for a default config. [Christophe Jaillet] + + *) mod_dav: Ensure URI is correctly uriencoded on return. PR 54611 + [Timothy Wood ] + + *) mod_proxy: Reject invalid values for Max-Forwards. [Graham Leggett, + Co-Advisor ] + + *) mod_cache: RFC2616 14.9.3 The s-maxage directive also implies the + semantics of the proxy-revalidate directive. [Graham Leggett] + + *) mod_ssl: add support for subjectAltName-based host name checking + in proxy mode (SSLProxyCheckPeerName). PR 54030. [Kaspar Brand] + + *) core: Use the proper macro for HTTP/1.1. [Graham Leggett] + + *) event MPM: Provide error handling for ThreadStackSize. PR 54311 + [Tianyin Xu , Christophe Jaillet] + + *) mod_dav: Do not segfault on PROPFIND with a zero length DBM. + PR 52559 [Diego Santa Cruz ] + + *) core: Improve error message where client's request-line exceeds + LimitRequestLine. PR 54384 [Christophe Jaillet] + + *) mod_macro: New module that provides macros within configuration files. + [Fabien Coelho] + + *) mod_cache_socache: New cache implementation backed by mod_socache + that replaces mod_mem_cache known from httpd 2.2. [Graham + Leggett] + + *) htpasswd: Add -v option to verify a password. [Stefan Fritsch] + + *) mod_proxy: Add BalancerInherit and ProxyPassInherit to control + whether Proxy Balancers and Workers are inherited by vhosts + (default is On). [Jim Jagielski] + + *) mod_authnz_ldap: Allow using exec: calls to obtain LDAP bind + password. [Daniel Ruggeri] + + *) Added balancer parameter failontimeout to allow server admin + to configure an IO timeout as an error in the balancer. + [Daniel Ruggeri] + + *) mod_auth_digest: Fix crashes if shm initialization failed. [Stefan + Fritsch] + + *) htpasswd, htdbm: Fix password generation. PR 54735. [Stefan Fritsch] + + *) core: Add workaround for gcc bug on sparc/64bit. PR 52900. + [Stefan Fritsch] + + *) mod_setenvif: Fix crash in case SetEnvif and SetEnvIfExpr are used + together. PR 54881. [Ruediger Pluem] + + *) htdigest: Fix buffer overflow when reading digest password file + with very long lines. PR 54893. [Rainer Jung] + + *) ap_expr: Add the ability to base64 encode and base64 decode + strings and to generate their SHA1 and MD5 hash. + [Graham Leggett, Stefan Fritsch] + + *) mod_log_config: Fix crash when logging request end time for a failed + request. PR 54828 [Rainer Jung] + + *) mod_ssl: Catch missing, mismatched or encrypted client cert/key pairs + with SSLProxyMachineCertificateFile/Path directives. PR 52212, PR 54698. + [Keith Burdis , Joe Orton, Kaspar Brand] + + *) mod_ssl: Quiet FIPS mode weak keys disabled and FIPS not selected emits + in the error log to debug level. [William Rowe] + + *) mod_cache_disk: CacheMinFileSize and CacheMaxFileSize were always + using compiled in defaults of 1000000/1 respectively. [Eric Covener] + + *) mod_lbmethod_heartbeat, mod_heartmonitor: Respect DefaultRuntimeDir/ + DEFAULT_REL_RUNTIMEDIR for the heartbeat storage file. [Jeff Trawick] + + *) mod_include: Use new ap_expr for 'elif', like 'if', + if legacy parser is not specified. PR 54548 [Tom Donovan] + + *) mod_lua: Add some new functions: r:htpassword(), r:mkdir(), r:mkrdir(), + r:rmdir(), r:touch(), r:get_direntries(), r.date_parse_rfc(). + [Guenter Knauf] + + *) mod_lua: Add multipart form data handling. [Daniel Gruno] + + *) mod_lua: If a LuaMapHandler doesn't return any value, log a warning + and treat it as apache2.OK. [Eric Covener] + + *) mod_lua: Add bindings for apr_dbd/mod_dbd database access + [Daniel Gruno] + + *) mod_lua: Add LuaInputFilter/LuaOutputFilter for creating content + filters in Lua [Daniel Gruno] + + *) mod_lua: Allow scripts handled by the lua-script handler to return + a status code to the client (such as a 302 or a 500) [Daniel Gruno] + + *) mod_lua: Decline handling 'lua-script' if the file doesn't exist, + rather than throwing an internal server error. [Daniel Gruno] + + *) mod_lua: Add functions r:flush and r:sendfile as well as additional + request information to the request_rec structure. [Daniel Gruno] + + *) mod_lua: Add a server scope for Lua states, which creates a pool of + states with manageable minimum and maximum size. [Daniel Gruno] + + *) mod_lua: Add new directive, LuaMapHandler, for dynamically mapping + URIs to Lua scripts and functions using regular expressions. + [Daniel Gruno] + + *) mod_lua: Add new directive LuaCodeCache for controlling in-memory + caching of lua scripts. [Daniel Gruno] + +Changes with Apache 2.4.4 + + *) SECURITY: CVE-2012-3499 (cve.mitre.org) + Various XSS flaws due to unescaped hostnames and URIs HTML output in + mod_info, mod_status, mod_imagemap, mod_ldap, and mod_proxy_ftp. + [Jim Jagielski, Stefan Fritsch, Niels Heinen ] + + *) SECURITY: CVE-2012-4558 (cve.mitre.org) + XSS in mod_proxy_balancer manager interface. [Jim Jagielski, + Niels Heinen ] + + *) mod_dir: Add support for the value 'disabled' in FallbackResource. + [Vincent Deffontaines] + + *) mod_proxy_connect: Don't keepalive the connection to the client if the + backend closes the connection. PR 54474. [Pavel Mateja ] + + *) mod_lua: Add bindings for mod_dbd/apr_dbd database access. + [Daniel Gruno] + + *) mod_proxy: Allow for persistence of local changes made via the + balancer-manager between graceful/normal restarts and power + cycles. [Jim Jagielski] + + *) mod_proxy: Fix startup crash with mis-defined balancers. + PR 52402. [Jim Jagielski] + + *) --with-module: Fix failure to integrate them into some existing + module directories. PR 40097. [Jeff Trawick] + + *) htcacheclean: Fix potential segfault if "-p" is omitted. [Joe Orton] + + *) mod_proxy_http: Honour special value 0 (unlimited) of LimitRequestBody + PR 54435. [Pavel Mateja ] + + *) mod_proxy_ajp: Support unknown HTTP methods. PR 54416. + [Rainer Jung] + + *) htcacheclean: Fix list options "-a" and "-A". + [Rainer Jung] + + *) mod_slotmem_shm: Fix mistaken reset of num_free for restored shm. + [Jim Jagielski] + + *) mod_proxy: non-existence of byrequests is not an immediate error. + [Jim Jagielski] + + *) mod_proxy_balancer: Improve output of balancer-manager (re: Drn, + Dis, Ign, Stby). PR 52478 [Danijel ] + + *) configure: Fix processing of --disable-FEATURE for various features. + [Jeff Trawick] + + *) mod_dialup/mod_http: Prevent a crash in mod_dialup in case of internal + redirect. PR 52230. + + *) various modules, rotatelogs: Replace use of apr_file_write() with + apr_file_write_full() to prevent incomplete writes. PR 53131. + [Nicolas Viennot , Stefan Fritsch] + + *) ab: Support socket timeout (-s timeout). + [Guido Serra ] + + *) httxt2dbm: Correct length computation for the 'value' stored in the + DBM file. PR 47650 [jon buckybox com] + + *) core: Be more correct about rejecting directives that cannot work in + sections. [Stefan Fritsch] + + *) core: Fix directives like LogLevel that need to know if they are invoked + at virtual host context or in Directory/Files/Location/If sections to + work properly in If sections that are not in a Directory/Files/Location. + [Stefan Fritsch] + + *) mod_xml2enc: Fix problems with charset conversion altering the + Content-Length. [Micha Lenk ] + + *) ap_expr: Add req_novary function that allows HTTP header lookups + without adding the name to the Vary header. [Stefan Fritsch] + + *) mod_slotmem_*: Add in new fgrab() function which forces a grab and + slot allocation on a specified slot. Allow for clearing of inuse + array. [Jim Jagielski] + + *) mod_proxy_ftp: Fix segfaults on IPv4 requests to hosts with DNS + AAAA records. PR 40841. [Andrew Rucker Jones , , Jim Jagielski] + + *) mod_auth_form: Make sure that get_notes_auth() sets the user as does + get_form_auth() and get_session_auth(). Makes sure that REMOTE_USER + does not vanish during mod_include driven subrequests. [Graham + Leggett] + + *) mod_cache_disk: Resolve errors while revalidating disk-cached files on + Windows ("...rename tempfile to datafile failed..."). PR 38827 + [Eric Covener] + + *) mod_proxy_balancer: Bring XML output up to date. [Jim Jagielski] + + *) htpasswd, htdbm: Optionally read passwords from stdin, as more + secure alternative to -b. PR 40243. [Adomas Paltanavicius , Stefan Fritsch] + + *) htpasswd, htdbm: Add support for bcrypt algorithm (requires + apr-util 1.5 or higher). PR 49288. [Stefan Fritsch] + + *) htpasswd, htdbm: Put full 48bit of entropy into salt, improve + error handling. Add some of htpasswd's improvements to htdbm, + e.g. warn if password is truncated by crypt(). [Stefan Fritsch] + + *) mod_auth_form: Support the expr parser in the + AuthFormLoginRequiredLocation, AuthFormLoginSuccessLocation and + AuthFormLogoutLocation directives. [Graham Leggett] + + *) mod_ssl: Add support for TLS-SRP (Secure Remote Password key exchange + for TLS, RFC 5054). PR 51075. [Quinn Slack , + Christophe Renou, Peter Sylvester] + + *) mod_rewrite: Stop mergeing RewriteBase down to subdirectories + unless new option 'RewriteOptions MergeBase' is configured. + PR 53963. [Eric Covener] + + *) mod_header: Allow for exposure of loadavg and server load using new + format specifiers %l, %i, %b [Jim Jagielski] + + *) core: Make ap_regcomp() return AP_REG_ESPACE if out of memory. Make + ap_pregcomp() abort if out of memory. This raises the minimum PCRE + requirement to version 6.0. [Stefan Fritsch] + + *) mod_proxy: Add ability to configure the sticky session separator. + PR 53893. [, Jim Jagielski] + + *) mod_dumpio: Correctly log large messages + PR 54179 [Marek Wianecki ] + + *) core: Don't fail at startup with AH00554 when Include points to + a directory without any wildcard character. [Eric Covener] + + *) core: Fail startup if the argument to ServerTokens is unrecognized. + [Jackie Zhang ] + + *) mod_log_forensic: Don't log a spurious "-" if a request has been rejected + before mod_log_forensic could attach its id to it. [Stefan Fritsch] + + *) rotatelogs: Omit the second argument for the first invocation of + a post-rotate program when -p is used, per the documentation. + [Joe Orton] + + *) mod_session_dbd: fix a segmentation fault in the function dbd_remove. + PR 53452. [, Reimo Rebane] + + *) core: Functions to provide server load values: ap_get_sload() and + ap_get_loadavg(). [Jim Jagielski, Jan Kaluza , + Jeff Trawick] + + *) mod_ldap: Fix regression in handling "server unavailable" errors on + Windows. PR 54140. [Eric Covener] + + *) syslog logging: Remove stray ", referer" at the end of some messages. + [Jeff Trawick] + + *) "Iterate" directives: Report an error if no arguments are provided. + [Jeff Trawick] + + *) mod_ssl: Change default for SSLCompression to off, as compression + causes security issues in most setups. (The so called "CRIME" attack). + [Stefan Fritsch] + + *) ab: add TLS1.1/TLS1.2 options to -f switch, and adapt output + to more accurately report the negotiated protocol. PR 53916. + [Nicolás Pernas Maradei , Kaspar Brand] + + *) core: ErrorDocument now works for requests without a Host header. + PR 48357. [Jeff Trawick] + + *) prefork: Avoid logging harmless errors during graceful stop. + [Joe Orton, Jeff Trawick] + + *) mod_proxy: When concatting for PPR, avoid cases where we + concat ".../" and "/..." to create "...//..." [Jim Jagielski] + + *) mod_cache: Wrong content type and character set when + mod_cache serves stale content because of a proxy error. + PR 53539. [Rainer Jung, Ruediger Pluem] + + *) mod_proxy_ajp: Fix crash in packet dump code when logging + with LogLevel trace7 or trace8. PR 53730. [Rainer Jung] + + *) httpd.conf: Removed the configuration directives setting a bad_DNT + environment introduced in 2.4.3. The actual directives are commented + out in the default conf file. + + *) core: Apply length limit when logging Status header values. + [Jeff Trawick, Chris Darroch] + + *) mod_proxy_balancer: The nonce is only derived from the UUID iff + not set via the 'nonce' balancer param. [Jim Jagielski] + + *) mod_ssl: Match wildcard SSL certificate names in proxy mode. + PR 53006. [Joe Orton] + + *) Windows: Fix output of -M, -L, and similar command-line options + which display information about the server configuration. + [Jeff Trawick] + +Changes with Apache 2.4.3 + + *) SECURITY: CVE-2012-3502 (cve.mitre.org) + mod_proxy_ajp, mod_proxy_http: Fix an issue in back end + connection closing which could lead to privacy issues due + to a response mixup. PR 53727. [Rainer Jung] + + *) SECURITY: CVE-2012-2687 (cve.mitre.org) + mod_negotiation: Escape filenames in variant list to prevent a + possible XSS for a site where untrusted users can upload files to + a location with MultiViews enabled. [Niels Heinen ] + + *) mod_authnz_ldap: Don't try a potentially expensive nested groups + search before exhausting all AuthLDAPGroupAttribute checks on the + current group. PR 52464 [Eric Covener] + + *) mod_lua: Add new directive LuaAuthzProvider to allow implementing an + authorization provider in lua. [Stefan Fritsch] + + *) core: Be less strict when checking whether Content-Type is set to + "application/x-www-form-urlencoded" when parsing POST data, + or we risk losing data with an appended charset. PR 53698 + [Petter Berntsen ] + + *) httpd.conf: Added configuration directives to set a bad_DNT environment + variable based on User-Agent and to remove the DNT header field from + incoming requests when a match occurs. This currently has the effect of + removing DNT from requests by MSIE 10.0 because it deliberately violates + the current specification of DNT semantics for HTTP. [Roy T. Fielding] + + *) mod_socache_shmcb: Fix bus error due to a misalignment + in some 32 bit builds, especially on Solaris Sparc. + PR 53040. [Rainer Jung] + + *) mod_cache: Set content type in case we return stale content. + [Ruediger Pluem] + + *) Windows: Fix SSL failures on windows with AcceptFilter https none. + PR 52476. [Jeff Trawick] + + *) ab: Fix read failure when targeting SSL server. [Jeff Trawick] + + *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR: + - mod_auth_digest: shared memory file + [Jeff Trawick] + + *) htpasswd: Use correct file mode for checking if file is writable. + PR 45923. [Stefan Fritsch] + + *) mod_rewrite: Fix crash with dbd RewriteMaps. PR 53663. [Mikhail T. + ] + + *) mod_ssl: Add new directive SSLCompression to disable TLS-level + compression. PR 53219. [Björn Jacke , Stefan Fritsch] + + *) mod_lua: Add a few missing request_rec fields. Rename remote_ip to + client_ip to match conn_rec. [Stefan Fritsch] + + *) mod_lua: Change prototype of vm_construct, to work around gcc bug which + causes a segfault. PR 52779. [Dick Snippe ] + + *) mpm_event: Don't count connections in lingering close state when + calculating how many additional connections may be accepted. + [Stefan Fritsch] + + *) mod_ssl: If exiting during initialization because of a fatal error, + log a message to the main error log pointing to the appropriate + virtual host error log. [Stefan Fritsch] + + *) mod_proxy_ajp: Reduce memory usage in case of many keep-alive requests on + one connection. PR 52275. [Naohiro Ooiwa ] + + *) mod_proxy_balancer: Restore balancing after a failed worker has + recovered when using lbmethod_bybusyness. PR 48735. [Jeff Trawick] + + *) mod_setenvif: Compile some global regex only once during startup. + This should save some memory, especially with .htaccess. + [Stefan Fritsch] + + *) core: Add the port number to the vhost's name in the scoreboard. + [Stefan Fritsch] + + *) mod_proxy: Fix ProxyPassReverse for balancer configurations. + PR 45434. [Joe Orton] + + *) mod_lua: Add the parsebody function for parsing POST data. PR 53064. + [Daniel Gruno] + + *) apxs: Use LDFLAGS from config_vars.mk in addition to CFLAGS and CPPFLAGS. + [Stefan Fritsch] + + *) mod_proxy: Fix memory leak or possible corruption in ProxyBlock + implementation. [Ruediger Pluem, Joe Orton] + + *) mod_proxy: Check hostname from request URI against ProxyBlock list, + not forward proxy, if ProxyRemote* is configured. [Joe Orton] + + *) mod_proxy_connect: Avoid DNS lookup on hostname from request URI + if ProxyRemote* is configured. PR 43697. [Joe Orton] + + *) mpm_event, mpm_worker: Remain active amidst prevalent child process + resource shortages. [Jeff Trawick] + + *) Add "strict" and "warnings" pragmas to Perl scripts. [Rich Bowen] + + *) The following now respect DefaultRuntimeDir/DEFAULT_REL_RUNTIMEDIR: + - core: the scoreboard (ScoreBoardFile), pid file (PidFile), and + mutexes (Mutex) + [Jim Jagielski] + + *) ab: Fix bind() errors. [Joe Orton] + + *) mpm_event: Don't do a blocking write when starting a lingering close + from the listener thread. PR 52229. [Stefan Fritsch] + + *) mod_so: If a filename without slashes is specified for LoadFile or + LoadModule and the file cannot be found in the server root directory, + try to use the standard dlopen() search path. [Stefan Fritsch] + + *) mpm_event, mpm_worker: Fix cases where the spawn rate wasn't reduced + after child process resource shortages. [Jeff Trawick] + + *) mpm_prefork: Reduce spawn rate after a child process exits due to + unexpected poll or accept failure. [Jeff Trawick] + + *) core: Log value of Status header line in script responses rather + than the fixed header name. [Chris Darroch] + + *) mod_ssl: Fix handling of empty response from OCSP server. + [Jim Meyering , Joe Orton] + + *) mpm_event: Fix handling of MaxConnectionsPerChild. [Stefan Fritsch] + + *) mod_authz_core: If an expression in "Require expr" returns denied and + references %{REMOTE_USER}, trigger authentication and retry. PR 52892. + [Stefan Fritsch] + + *) core: Always log if LimitRequestFieldSize triggers. [Stefan Fritsch] + + *) mod_deflate: Skip compression if compression is enabled at SSL level. + [Stefan Fritsch] + + *) core: Add missing HTTP status codes registered with IANA. + [Julian Reschke , Rainer Jung] + + *) mod_ldap: Treat the "server unavailable" condition as a transient + error with all LDAP SDKs. [Filip Valder ] + + *) core: Fix spurious "not allowed here" error returned when the Options + directive is used in .htaccess and "AllowOverride Options" (with no + specific options restricted) is configured. PR 53444. [Eric Covener] + + *) mod_authz_core: Fix parsing of Require arguments in . + PR 53048. [Stefan Fritsch] + + *) mod_log_config: Fix %{abc}C truncating cookie values at first "=". + PR 53104. [Greg Ames] + + *) mod_ext_filter: Fix error_log spam when input filters are configured. + [Joe Orton] + + *) mod_rewrite: Add "AllowAnyURI" option. PR 52774. [Joe Orton] + + *) htdbm, htpasswd: Don't crash if crypt() fails (e.g. with FIPS enabled). + [Paul Wouters , Joe Orton] + + *) core: Use a TLS 1.0 close_notify alert for internal dummy connection if + the chosen listener is configured for https. [Joe Orton] + + *) mod_proxy: Use the the same hostname for SNI as for the HTTP request when + forwarding to SSL backends. PR 53134. + [Michael Weiser , Ruediger Pluem] + + *) mod_info: Display all registered providers. [Stefan Fritsch] + + *) mod_ssl: Send the error message for speaking http to an https port using + HTTP/1.0 instead of HTTP/0.9, and omit the link that may be wrong when + using SNI. PR 50823. [Stefan Fritsch] + + *) core: Fix segfault in logging if r->useragent_addr or c->client_addr is + unset. PR 53265. [Stefan Fritsch] + + *) log_server_status: Bring Perl style forward to the present, use + standard modules, update for new format of server-status output. + PR 45424. [Richard Bowen, Dave Brondsema, and others] + + *) mod_sed, mod_log_debug, mod_rewrite: Symbol namespace cleanups. + [Joe Orton, André Malo] + + *) core: Prevent "httpd -k restart" from killing server in presence of + config error. [Joe Orton] + + *) mod_proxy_fcgi: If there is an error reading the headers from the + backend, send an error to the client. PR 52879. [Stefan Fritsch] + +Changes with Apache 2.4.2 + + *) SECURITY: CVE-2012-0883 (cve.mitre.org) + envvars: Fix insecure handling of LD_LIBRARY_PATH that could lead to the + current working directory to be searched for DSOs. [Stefan Fritsch] + + *) mod_slotmem_shm: Honor DefaultRuntimeDir [Jim Jagielski] + + *) mod_ssl: Fix crash with threaded MPMs due to race condition when + initializing EC temporary keys. [Stefan Fritsch] + + *) mod_rewrite: Fix RewriteCond integer checks to be parsed correctly. + PR 53023. [Axel Reinhold , André Malo] + + *) mod_proxy: Add the forcerecovery balancer parameter that determines if + recovery for balancer workers is enforced. [Ruediger Pluem] + + *) Fix MPM DSO load failure on AIX. [Jeff Trawick] + + *) mod_proxy: Correctly set up reverse proxy worker. PR 52935. + [Petter Berntsen ] + + *) mod_sed: Don't define PATH_MAX to a potentially undefined value, causing + compile problems on GNU hurd. [Stefan Fritsch] + + *) core: Add ap_runtime_dir_relative() and DefaultRuntimeDir. + [Jeff Trawick] + + *) core: Fix breakage of Listen directives with MPMs that use a + per-directory config. PR 52904. [Stefan Fritsch] + + *) core: Disallow directives in AllowOverrideList which are only allowed + in VirtualHost or server context. These are usually not prepared to be + called in .htaccess files. [Stefan Fritsch] + + *) core: In AllowOverrideList, do not allow 'None' together with other + directives. PR 52823. [Stefan Fritsch] + + *) mod_slotmem_shm: Support DEFAULT_REL_RUNTIMEDIR for file-based shm. + [Jim Jagielski] + + *) core: Fix merging of AllowOverrideList and ContentDigest. + [Stefan Fritsch] + + *) mod_request: Fix validation of the KeptBodySize argument so it + doesn't always throw a configuration error. PR 52981 [Eric Covener] + + *) core: Add filesystem paths to access denied / access failed messages + AH00035 and AH00036. [Eric Covener] + + *) mod_dumpio: Properly handle errors from subsequent input filters. + PR 52914. [Stefan Fritsch] + + *) Unix MPMs: Fix small memory leak in parent process if connect() + failed when waking up children. [Joe Orton] + + *) "DirectoryIndex disabled" now undoes DirectoryIndex settings in + the current configuration section, not just previous config sections. + PR 52845. [Eric Covener] + + *) mod_xml2enc: Fix broken handling of EOS buckets which could lead to + response headers not being sent. PR 52766. [Stefan Fritsch] + + *) mod_ssl: Properly free the GENERAL_NAMEs. PR 32652. [Kaspar Brand] + + *) core: Check during config test that directories for the access + logs actually exist. PR 29941. [Stefan Fritsch] + + *) mod_xml2enc, mod_proxy_html: Enable per-module loglevels. + [Stefan Fritsch] + + *) mod_filter: Fix segfault with AddOutputFilterByType. PR 52755. + [Stefan Fritsch] + + *) mod_session: Sessions are encoded as application/x-www-form-urlencoded + strings, however we do not handle the encoding of spaces properly. + Fixed. [Graham Leggett] + + *) Configuration: Example in comment should use a path consistent + with the default configuration. PR 52715. + [Rich Bowen, Jens Schleusener, Rainer Jung] + + *) Configuration: Switch documentation links from trunk to 2.4. + [Rainer Jung] + + *) configure: Fix out of tree build using apr and apr-util in srclib. + [Rainer Jung] + +Changes with Apache 2.4.1 + + *) SECURITY: CVE-2012-0053 (cve.mitre.org) + Fix an issue in error responses that could expose "httpOnly" cookies + when no custom ErrorDocument is specified for status code 400. + [Eric Covener] + + *) mod_proxy_balancer: Fix crash on Windows. PR 52402 [Mladen Turk] + + *) core: Check during configtest that the directories for error logs exist. + PR 29941 [Stefan Fritsch] + + *) Core configuration: add AllowOverride option to treat syntax + errors in .htaccess as non-fatal. PR 52439 [Nick Kew, Jim Jagielski] + + *) core: Fix memory consumption in core output filter with streaming + bucket types like CGI or PIPE. [Joe Orton, Stefan Fritsch] + + *) configure: Disable modules at configure time if a prerequisite module + is not enabled. PR 52487. [Stefan Fritsch] + + *) Rewrite and proxy now decline what they don't support rather + than fail the request. [Joe Orton] + + *) Fix building against external apr plus apr-util if apr is not installed + in a system default path. [Rainer Jung] + + *) Doxygen fixes and improvements. [Joe Orton, Igor Galić] + + *) core: Fix building against PCRE 8.30 by switching from the obsolete + pcre_info() to pcre_fullinfo(). PR 52623 [Ruediger Pluem, Rainer Jung] + +Changes with Apache 2.4.0 + + *) SECURITY: CVE-2012-0031 (cve.mitre.org) + Fix scoreboard issue which could allow an unprivileged child process + to cause the parent to crash at shutdown rather than terminate + cleanly. [Joe Orton] + + *) mod_ssl: Fix compilation with xlc on AIX. PR 52394. [Stefan Fritsch] + + *) SECURITY: CVE-2012-0021 (cve.mitre.org) + mod_log_config: Fix segfault (crash) when the '%{cookiename}C' log format + string is in use and a client sends a nameless, valueless cookie, causing + a denial of service. The issue existed since version 2.2.17 and 2.3.3. + PR 52256. [Rainer Canavan ] + + *) mod_ssl: when compiled against OpenSSL 1.0.1 or later, allow explicit + control of TLSv1.1 and TLSv1.2 through the SSLProtocol directive. + [Kaspar Brand] + + *) mod_ssl: set OPENSSL_NO_SSL_INTERN when compiling against OpenSSL 1.0.1 + or later, to improve binary compatibility with future OpenSSL releases. + [Kaspar Brand] + + *) mod_mime: Don't arbitrarily bypass AddOutputFilter during a ProxyPass, + but then allow AddOutputFilter during a RewriteRule [P]. Make mod_mime + behave identically in both cases. PR52342. [Graham Leggett] + + *) Move ab, logresolve, httxt2dbm and apxs to bin from sbin, along with + corresponding man pages. [Graham Leggett] + + *) Distinguish properly between the bindir and sbindir directories when + installing binaries. Previously all binaries were silently installed to + sbindir, whether they were system administration commands or not. + [Graham Leggett] + Changes with Apache 2.3.16 + *) SECURITY: CVE-2011-4317 (cve.mitre.org) + Resolve additional cases of URL rewriting with ProxyPassMatch or + RewriteRule, where particular request-URIs could result in undesired + backend network exposure in some configurations. + [Joe Orton] + + *) core: Limit line length in .htaccess to 8K like in 2.2.x, to avoid + additional DoS potential. [Stefan Fritsch] + + *) core, all modules: Add unique tag to most error log messages. [Stefan + Fritsch] + + *) mod_socache_memcache: Change provider name from "mc" to "memcache" to + match module name. [Stefan Fritsch] + + *) mod_slotmem_shm: Change provider name from "shared" to "shm" to match + module name. [Stefan Fritsch] + + *) mod_ldap: Fix segfault with Solaris LDAP when enabling ldaps. This + requires an apr-util fix in which is available in apr-util >= 1.4.0. + PR 42682. [Stefan Fritsch] + + *) mod_rewrite: Add the AllowNoSlash RewriteOption, which makes it possible + for RewriteRules to be placed in .htaccess files that match the directory + with no trailing slash. PR 48304. + [Matthew Byng-Maddick ] + + *) mod_session_crypto: Add a SessionCryptoPassphraseFile directive so that + the administrator can hide the keys from the configuration. [Graham + Leggett] + + *) Introduce a per request version of the remote IP address, which can be + optionally modified by a module when the effective IP of the client + is not the same as the real IP of the client (such as a load balancer). + Introduce a per connection "peer_ip" and a per request "client_ip" to + distinguish between the raw IP address of the connection and the effective + IP address of the request. [Graham Leggett] + + *) ap_pass_brigade_fchk() function added. [Jim Jagielski] + + *) core: Pass ap_errorlog_info struct to error log hook. [Stefan Fritsch] + + *) mod_cache_disk: Make sure we check return codes on all writes and + attempts to close, and clean up after ourselves in these cases. + PR43589. [Graham Leggett] + + *) mod_cache_disk: Remove the unnecessary intermediate brigade while + writing to disk. Fixes a problem where mod_disk_cache was leaving + buckets in the intermediate brigade and not passing them to out on + exit. [Florian S. , Graham Leggett] + + *) mod_ssl: use a shorter setting for SSLCipherSuite in the default + default configuration file, and add some more information about + configuring a speed-optimized alternative. + [Kaspar Brand] + + *) mod_ssl: drop support for the SSLv2 protocol. [Kaspar Brand] + + *) mod_lua: Stop losing track of all but the most specific LuaHook* directives + when multiple per-directory config sections are used. Adds LuaInherit + directive to control how parent sections are merged. [Eric Covener] + + *) Server directive display (-L): Include directives of DSOs. + [Jeff Trawick] + + *) mod_cache: Make sure we merge headers correctly when we handle a + non cacheable conditional response. PR52120. [Graham Leggett] + + *) Pre GA removal of components that will not be included: + - mod_noloris was superseded by mod_reqtimeout + - mod_serf + - mpm_simple + [Rainer Jung] + + *) core: Set MaxMemFree 2048 by default. [Stefan Fritsch] + + *) mpm_event: Fix assertion failure during very high load. [Stefan Fritsch] + + *) configure: Additional modules loaded by default: mod_headers. + Modules moved from module set "few" to "most" and no longer loaded + by default: mod_actions, mod_allowmethods, mod_auth_form, mod_buffer, + mod_cgi(d), mod_include, mod_negotiation, mod_ratelimit, mod_request, + mod_userdir. [Rainer Jung] + + *) mod_lua: Use the right lua scope when used as a hook. [Rainer Jung] + + *) configure: Only load the really imporant modules (i.e. those enabled by + the 'few' selection) by default. Don't handle modules enabled with + --enable-foo specially. [Stefan Fritsch] + *) end-generation hook: Fix false notification of end-of-generation for temporary intervals with no active MPM children. [Jeff Trawick] - *) mod_ssl: Add support for RFC 5077 TLS Session tickets. - [Paul Querna] + *) mod_ssl: Add support for configuring persistent TLS session ticket + encryption/decryption keys (useful for clustered environments). + [Paul Querna, Kaspar Brand] *) mod_usertrack: Use random value instead of remote IP address. [Stefan Fritsch] @@ -27,6 +2908,11 @@ Changes with Apache 2.3.15 core: Fix integer overflow in ap_pregsub. This can be triggered e.g. with mod_setenvif via a malicious .htaccess. [Stefan Fritsch] + *) SECURITY: CVE-2011-3368 (cve.mitre.org) + Reject requests where the request-URI does not match the HTTP + specification, preventing unexpected expansion of target URLs in + some reverse proxy configurations. [Joe Orton] + *) configure: Load all modules in the generated default configuration when using --enable-load-all-modules. [Rainer Jung] @@ -71,7 +2957,7 @@ Changes with Apache 2.3.15 *) rotatelogs: Add -c option to force logfile creation in every rotation interval, even if empty. [Jan Kaluža ] - + *) core: Limit ap_pregsub() to 64K, add ap_pregsub_ex() for longer strings. [Stefan Fritsch] @@ -86,7 +2972,7 @@ Changes with Apache 2.3.15 *) mod_lua: add r:construct_url as a wrapper for ap_construct_url. [Eric Covener] - + *) mod_remote_ip: Fix configuration of internal proxies. PR 49272. [Jim Riggs ] @@ -102,20 +2988,20 @@ Changes with Apache 2.3.15 ] *) mpm_event: Check the return value from ap_run_create_connection. - PR: 41194. [Davi Arnaut] + PR 41194. [Davi Arnaut] *) mod_mime_magic: Add signatures for PNG and SWF to the example config. - PR: 48352. [Jeremy Wagner-Kaiser ] + PR 48352. [Jeremy Wagner-Kaiser ] *) core, unixd: Add -D DUMP_RUN_CFG option to dump some configuration items from the parsed (or default) config. This is useful for init scripts that need to setup temporary directories and permissions. [Stefan Fritsch] *) core, mod_actions, mod_asis: Downgrade error log messages which accompany - a 404 request status from loglevel error to info. PR: 35768. [Stefan + a 404 request status from loglevel error to info. PR 35768. [Stefan Fritsch] - *) core: Fix hook sorting with Perl modules. PR: 45076. [Torsten Foertsch + *) core: Fix hook sorting with Perl modules. PR 45076. [Torsten Foertsch ] *) core: Enforce LimitRequestFieldSize after multiple headers with the same @@ -334,7 +3220,7 @@ Changes with Apache 2.3.14 binary needs PCRE. [Rainer Jung] *) configure: tolerate dependency checking failures for modules if - they have been enabled implicitely. [Rainer Jung] + they have been enabled implicitly. [Rainer Jung] *) configure: Allow to specify module specific custom linker flags via the MOD_XXX_LDADD variables. [Rainer Jung] @@ -440,7 +3326,7 @@ Changes with Apache 2.3.13 state after a timeout when discarding a request body. PR 51103. [Stefan Fritsch] - *) core: Add various file existance test operators to ap_expr. + *) core: Add various file existence test operators to ap_expr. [Stefan Fritsch] *) mod_proxy_express: New mass reverse-proxy switch extension for @@ -549,10 +3435,6 @@ Changes with Apache 2.3.11 *) core: new hook: ap_run_pre_read_request. [Jim Jagielski] - *) mod_cache: When a request other than GET or HEAD arrives, we must - invalidate existing cache entities as per RFC2616 13.10. PR 15868. - [Graham Leggett] - *) modules: Fix many modules that were not correctly initializing if they were not active during server startup but got enabled later during a graceful restart. [Stefan Fritsch] @@ -570,7 +3452,7 @@ Changes with Apache 2.3.11 *) mod_cache: When a bad Expires date is present, we need to behave as if the Expires is in the past, not as if the Expires is missing. PR 16521. - [Co-Advisor ] + [Co-Advisor ] *) mod_cache: We must ignore quoted-string values that appear in a Cache-Control header. PR 50199. [Graham Leggett] @@ -624,7 +3506,7 @@ Changes with Apache 2.3.11 per-balancer 'nonce' parameter. [Jim Jagielski] *) mod_status: Don't show slots which are disabled by MaxClients as open. - PR: 47022 [Jordi Prats , Stefan Fritsch] + PR 47022 [Jordi Prats , Stefan Fritsch] *) mpm_prefork: Fix ap_mpm_query results for AP_MPMQ_MAX_DAEMONS and AP_MPMQ_MAX_THREADS. @@ -1015,7 +3897,7 @@ Changes with Apache 2.3.7 *) SECURITY: CVE-2010-1452 (cve.mitre.org) mod_dav, mod_cache, mod_session: Fix Handling of requests without a path - segment. PR: 49246 [Mark Drayton, Jeff Trawick] + segment. PR 49246 [Mark Drayton, Jeff Trawick] *) mod_ldap: Properly check the result returned by apr_ldap_init. PR 46076. [Stefan Fritsch] @@ -1416,6 +4298,7 @@ Changes with Apache 2.3.3 *) SECURITY: CVE-2009-3094 (cve.mitre.org) mod_proxy_ftp: NULL pointer dereference on error paths. [Stefan Fritsch , Joe Orton] + *) mod_ssl: enable support for ECC keys and ECDH ciphers. Tested against OpenSSL 1.0.0b3. [Vipul Gupta , Sander Temme] @@ -1525,7 +4408,8 @@ Changes with Apache 2.3.3 *) mod_cache: Introduce the option to run the cache from within the normal request handler, and to allow fine grained control over - where in the filter chain content is cached. [Graham Leggett] + where in the filter chain content is cached. Adds CacheQuickHandler + directive. [Graham Leggett] *) core: Treat timeout reading request as 408 error, not 400. Log 408 errors in access log as was done in Apache 1.3.x. @@ -1718,7 +4602,7 @@ Changes with Apache 2.3.2 *) mod_mime_magic: Fix detection of compressed content. [Rainer Jung] - *) mod_negotiation: Escape pathes of filenames in 406 responses to avoid + *) mod_negotiation: Escape paths of filenames in 406 responses to avoid HTML injections and HTTP response splitting. PR 46837. [Geoff Keating ] diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..c2324a341a3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,942 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Read README.cmake before using this. + +PROJECT(HTTPD C) + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +INCLUDE(CheckSymbolExists) +INCLUDE(CheckCSourceCompiles) + +FIND_PACKAGE(LibXml2) +FIND_PACKAGE(Lua51) +FIND_PACKAGE(OpenSSL) +FIND_PACKAGE(ZLIB) + +# Options for support libraries not supported by cmake-bundled FindFOO + +# Default to using APR trunk (libapr-2.lib) if it exists in PREFIX/lib; +# otherwise, default to APR 1.x + APR-util 1.x +IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib") + SET(default_apr_libraries "${CMAKE_INSTALL_PREFIX}/lib/libapr-2.lib") +ELSEIF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib") + SET(ldaplib "${CMAKE_INSTALL_PREFIX}/lib/apr_ldap-1.lib") + IF(NOT EXISTS ${ldaplib}) + SET(ldaplib) + ENDIF() + SET(default_apr_libraries ${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib ${CMAKE_INSTALL_PREFIX}/lib/libaprutil-1.lib ${ldaplib}) +ELSE() + SET(default_apr_libraries) +ENDIF() + +# PCRE names its libraries differently for debug vs. release builds. +# We can't query our own CMAKE_BUILD_TYPE at configure time. +# If the debug version exists in PREFIX/lib, default to that one. +IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/pcred.lib") + SET(default_pcre_libraries ${CMAKE_INSTALL_PREFIX}/lib/pcred.lib) +ELSE() + SET(default_pcre_libraries ${CMAKE_INSTALL_PREFIX}/lib/pcre.lib) +ENDIF() + +IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/nghttp2d.lib") + SET(default_nghttp2_libraries "${CMAKE_INSTALL_PREFIX}/lib/nghttp2d.lib") +ELSE() + SET(default_nghttp2_libraries "${CMAKE_INSTALL_PREFIX}/lib/nghttp2.lib") +ENDIF() + +SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR[-Util] include files") +SET(APR_LIBRARIES ${default_apr_libraries} CACHE STRING "APR libraries to link with") +SET(NGHTTP2_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with NGHTTP2 include files within nghttp2 subdirectory") +SET(NGHTTP2_LIBRARIES ${default_nghttp2_libraries} CACHE STRING "NGHTTP2 libraries to link with") +SET(PCRE_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with PCRE include files") +SET(PCRE_LIBRARIES ${default_pcre_libraries} CACHE STRING "PCRE libraries to link with") +SET(LIBXML2_ICONV_INCLUDE_DIR "" CACHE STRING "Directory with iconv include files for libxml2") +SET(LIBXML2_ICONV_LIBRARIES "" CACHE STRING "iconv libraries to link with for libxml2") +# end support library configuration + +# Misc. options +OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) +OPTION(INSTALL_MANUAL "Install manual" ON) + +SET(ENABLE_MODULES "O" CACHE STRING "Minimum module enablement (e.g., \"i\" to build all but those without prerequisites)") +SET(WITH_MODULES "" CACHE STRING "comma-separated paths to single-file modules to statically link into the server") +SET(EXTRA_INCLUDES "" CACHE STRING "Extra include directories") +SET(EXTRA_LIBS "" CACHE STRING "Extra libraries") +SET(EXTRA_COMPILE_FLAGS "" CACHE STRING "Extra compile flags") + +IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +ENDIF() +FOREACH(onelib ${APR_LIBRARIES}) + IF(NOT EXISTS ${onelib}) + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() +ENDFOREACH() + +MACRO(DEFINE_WITH_BLANKS output_definition input_symbol input_value) + IF(MSVC_IDE OR ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} VERSION_GREATER 2.8.11) + SET(${output_definition} "-D${input_symbol}=\"${input_value}\"") + ELSE() + # command-line tool + older cmake, where extra quotes must be added and + # escaped to survive + SET(${output_definition} "-D${input_symbol}=\"\\\"${input_value}\\\"\"") + ENDIF() +ENDMACRO() + +MACRO(GET_MOD_ENABLE_RANK macro_modname macro_mod_enable_val macro_output_rank) + IF(${macro_mod_enable_val} STREQUAL "O") + SET(${macro_output_rank} 0) + ELSEIF(${macro_mod_enable_val} STREQUAL "i") + SET(${macro_output_rank} 1) + ELSEIF(${macro_mod_enable_val} STREQUAL "I") + SET(${macro_output_rank} 2) + ELSEIF(${macro_mod_enable_val} STREQUAL "a") + SET(${macro_output_rank} 3) + ELSEIF(${macro_mod_enable_val} STREQUAL "A") + SET(${macro_output_rank} 4) + ELSE() + MESSAGE(FATAL_ERROR "Unexpected enablement value \"${macro_mod_enable_val}\" for ${macro_modname}") + ENDIF() +ENDMACRO() + +GET_MOD_ENABLE_RANK("ENABLE_MODULES setting" ${ENABLE_MODULES} enable_modules_rank) + +# Figure out what APR/APU features are available +# +# CHECK_APR_FEATURE checks for features defined to 1 or 0 in apr.h or apu.h +# The symbol representing the feature will be set to TRUE or FALSE for +# compatibility with the feature tests set by FindFooPackage. +# +# (unclear why CHECK_SYMBOL_EXISTS is needed, but I was getting "found" for anything +# not defined to either 1 or 0) + +MACRO(CHECK_APR_FEATURE which_define) + SET(CMAKE_REQUIRED_INCLUDES "${APR_INCLUDE_DIR}") + CHECK_SYMBOL_EXISTS(${which_define} "apr.h;apu.h" tmp_${which_define}) + IF(${tmp_${which_define}}) + CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\" + #include \"${APR_INCLUDE_DIR}/apu.h\" + int main() { + #ifndef ${which_define} + #error gobble + #endif + #if !${which_define} + #error gobble + #endif + return 1;}" ${which_define}) + ELSE() + SET(${which_define}) + ENDIF() + IF(${${which_define}}) + SET(${which_define} TRUE) + ELSE() + SET(${which_define} FALSE) + ENDIF() +ENDMACRO() + +CHECK_APR_FEATURE(APR_HAS_XLATE) +CHECK_APR_FEATURE(APU_HAVE_CRYPTO) + +# APR_HAS_LDAP is defined in apr_ldap.h, which exists only in apr 1.x, so use +# special code instead of CHECK_APR_FEATURE() +# As with CHECK_APR_FEATURE(), convert to a TRUE/FALSE result. +CHECK_C_SOURCE_COMPILES("#include \"${APR_INCLUDE_DIR}/apr.h\" +#include \"${APR_INCLUDE_DIR}/apr_ldap.h\" +int main() { +#if !APR_HAS_LDAP +#error gobble +#endif +return 1;}" APR_HAS_LDAP) +IF(${APR_HAS_LDAP}) + SET(APR_HAS_LDAP TRUE) +ELSE() + SET(APR_HAS_LDAP FALSE) +ENDIF() + +# See if nghttp2 exists in a configured or defaulted location +SET(NGHTTP2_FOUND TRUE) +IF(EXISTS "${NGHTTP2_INCLUDE_DIR}/nghttp2/nghttp2.h") + FOREACH(onelib ${NGHTTP2_LIBRARIES}) + IF(NOT EXISTS ${onelib}) + SET(NGHTTP2_FOUND FALSE) + ENDIF() + ENDFOREACH() +ELSE() + SET(NGHTTP2_FOUND FALSE) +ENDIF() + +MESSAGE(STATUS "") +MESSAGE(STATUS "Summary of feature detection:") +MESSAGE(STATUS "") +MESSAGE(STATUS "LIBXML2_FOUND ............ : ${LIBXML2_FOUND}") +MESSAGE(STATUS "LUA51_FOUND .............. : ${LUA51_FOUND}") +MESSAGE(STATUS "NGHTTP2_FOUND ............ : ${NGHTTP2_FOUND}") +MESSAGE(STATUS "OPENSSL_FOUND ............ : ${OPENSSL_FOUND}") +MESSAGE(STATUS "ZLIB_FOUND ............... : ${ZLIB_FOUND}") +MESSAGE(STATUS "APR_HAS_LDAP ............. : ${APR_HAS_LDAP}") +MESSAGE(STATUS "APR_HAS_XLATE ............ : ${APR_HAS_XLATE}") +MESSAGE(STATUS "APU_HAVE_CRYPTO .......... : ${APU_HAVE_CRYPTO}") +MESSAGE(STATUS "") + +# Options for each available module +# "A" ("A"ctive) means installed and active in default .conf, fail if can't be built +# "I" ("I"nactive) means installed and inactive (LoadModule commented out) in default .conf, fail if can't be built +# "O" ("O"mit) means not installed, no LoadModule +# "a" - like "A", but ignore with a warning if any prereqs aren't available +# "i" - like "I", but ignore with a warning if any prereqs aren't available + +# Current heuristic for default enablement: +# +# Module requires a prereq and -> O +# finding/usingprereq isn't implemented +# yet +# +# Module is included by default in -> a if it has prereqs, A otherwise +# autoconf-based build +# +# Module is included in -> i if it has prereqs, I otherwise +# --enable-modules=most +# +# Otherwise -> O +# +SET(MODULE_LIST + "modules/aaa/mod_access_compat+A+mod_access compatibility" + "modules/aaa/mod_allowmethods+I+restrict allowed HTTP methods" + "modules/aaa/mod_auth_basic+A+basic authentication" + "modules/aaa/mod_auth_digest+I+RFC2617 Digest authentication" + "modules/aaa/mod_auth_form+I+form authentication" + "modules/aaa/mod_authn_anon+I+anonymous user authentication control" + "modules/aaa/mod_authn_core+A+core authentication module" + "modules/aaa/mod_authn_dbd+I+SQL-based authentication control" + "modules/aaa/mod_authn_dbm+I+DBM-based authentication control" + "modules/aaa/mod_authn_file+A+file-based authentication control" + "modules/aaa/mod_authn_socache+I+Cached authentication control" + "modules/aaa/mod_authnz_fcgi+I+FastCGI authorizer-based authentication and authorization" + "modules/aaa/mod_authnz_ldap+i+LDAP based authentication" + "modules/aaa/mod_authz_core+A+core authorization provider vector module" + "modules/aaa/mod_authz_dbd+I+SQL based authorization and Login/Session support" + "modules/aaa/mod_authz_dbm+I+DBM-based authorization control" + "modules/aaa/mod_authz_groupfile+A+'require group' authorization control" + "modules/aaa/mod_authz_host+A+host-based authorization control" + "modules/aaa/mod_authz_owner+I+'require file-owner' authorization control" + "modules/aaa/mod_authz_user+A+'require user' authorization control" + "modules/arch/win32/mod_isapi+I+isapi extension support" + "modules/cache/mod_cache+I+dynamic file caching. At least one storage management module (e.g. mod_cache_disk) is also necessary." + "modules/cache/mod_cache_disk+I+disk caching module" + "modules/cache/mod_cache_socache+I+shared object caching module" + "modules/cache/mod_file_cache+I+File cache" + "modules/cache/mod_socache_dbm+I+dbm small object cache provider" + "modules/cache/mod_socache_dc+O+distcache small object cache provider" + "modules/cache/mod_socache_memcache+I+memcache small object cache provider" + "modules/cache/mod_socache_shmcb+I+ shmcb small object cache provider" + "modules/cluster/mod_heartbeat+I+Generates Heartbeats" + "modules/cluster/mod_heartmonitor+I+Collects Heartbeats" + "modules/core/mod_macro+I+Define and use macros in configuration files" + "modules/core/mod_watchdog+I+Watchdog module" + "modules/database/mod_dbd+I+Apache DBD Framework" + "modules/dav/fs/mod_dav_fs+I+DAV provider for the filesystem." + "modules/dav/lock/mod_dav_lock+I+DAV provider for generic locking" + "modules/dav/main/mod_dav+I+WebDAV protocol handling." + "modules/debugging/mod_bucketeer+O+buckets manipulation filter. Useful only for developers and testing purposes." + "modules/debugging/mod_dumpio+I+I/O dump filter" + "modules/echo/mod_echo+O+ECHO server" + "modules/examples/mod_case_filter+O+Example uppercase conversion filter" + "modules/examples/mod_case_filter_in+O+Example uppercase conversion input filter" + "modules/examples/mod_example_hooks+O+Example hook callback handler module" + "modules/examples/mod_example_ipc+O+Example of shared memory and mutex usage" + "modules/filters/mod_buffer+I+Filter Buffering" + "modules/filters/mod_charset_lite+i+character set translation" + "modules/filters/mod_data+O+RFC2397 data encoder" + "modules/filters/mod_deflate+i+Deflate transfer encoding support" + "modules/filters/mod_ext_filter+I+external filter module" + "modules/filters/mod_filter+A+Smart Filtering" + "modules/filters/mod_include+I+Server Side Includes" + "modules/filters/mod_proxy_html+i+Fix HTML Links in a Reverse Proxy" + "modules/filters/mod_ratelimit+I+Output Bandwidth Limiting" + "modules/filters/mod_reflector+O+Reflect request through the output filter stack" + "modules/filters/mod_reqtimeout+A+Limit time waiting for request from client" + "modules/filters/mod_request+I+Request Body Filtering" + "modules/filters/mod_sed+I+filter request and/or response bodies through sed" + "modules/filters/mod_substitute+I+response content rewrite-like filtering" + "modules/filters/mod_xml2enc+i+i18n support for markup filters" + "modules/generators/mod_asis+I+as-is filetypes" + "modules/generators/mod_autoindex+A+directory listing" + "modules/generators/mod_cgi+I+CGI scripts" + "modules/generators/mod_info+I+server information" + "modules/generators/mod_status+I+process/thread monitoring" + "modules/http/mod_mime+A+mapping of file-extension to MIME. Disabling this module is normally not recommended." + "modules/http2/mod_http2+i+HTTP/2 protocol support" + "modules/ldap/mod_ldap+i+LDAP caching and connection pooling services" + "modules/loggers/mod_log_config+A+logging configuration. You won't be able to log requests to the server without this module." + "modules/loggers/mod_log_debug+I+configurable debug logging" + "modules/loggers/mod_log_forensic+I+forensic logging" + "modules/loggers/mod_logio+I+input and output logging" + "modules/lua/mod_lua+i+Apache Lua Framework" + "modules/mappers/mod_actions+I+Action triggering on requests" + "modules/mappers/mod_alias+A+mapping of requests to different filesystem parts" + "modules/mappers/mod_dir+A+directory request handling" + "modules/mappers/mod_imagemap+I+server-side imagemaps" + "modules/mappers/mod_negotiation+I+content negotiation" + "modules/mappers/mod_rewrite+I+rule based URL manipulation" + "modules/mappers/mod_speling+I+correct common URL misspellings" + "modules/mappers/mod_userdir+I+mapping of requests to user-specific directories" + "modules/mappers/mod_vhost_alias+I+mass virtual hosting module" + "modules/metadata/mod_cern_meta+O+CERN-type meta files" + "modules/metadata/mod_env+A+clearing/setting of ENV vars" + "modules/metadata/mod_expires+I+Expires header control" + "modules/metadata/mod_headers+A+HTTP header control" + "modules/metadata/mod_ident+O+RFC 1413 identity check" + "modules/metadata/mod_mime_magic+O+automagically determining MIME type" + "modules/metadata/mod_remoteip+I+translate header contents to an apparent client remote_ip" + "modules/metadata/mod_setenvif+A+basing ENV vars on headers" + "modules/metadata/mod_unique_id+I+per-request unique ids" + "modules/metadata/mod_usertrack+I+user-session tracking" + "modules/metadata/mod_version+A+determining httpd version in config files" + "modules/proxy/balancers/mod_lbmethod_bybusyness+I+Apache proxy Load balancing by busyness" + "modules/proxy/balancers/mod_lbmethod_byrequests+I+Apache proxy Load balancing by request counting" + "modules/proxy/balancers/mod_lbmethod_bytraffic+I+Apache proxy Load balancing by traffic counting" + "modules/proxy/balancers/mod_lbmethod_heartbeat+I+Apache proxy Load balancing from Heartbeats" + "modules/proxy/mod_proxy_ajp+I+Apache proxy AJP module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_balancer+I+Apache proxy BALANCER module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy+I+Apache proxy module" + "modules/proxy/mod_proxy_connect+I+Apache proxy CONNECT module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_express+I+mass reverse-proxy module. Requires --enable-proxy." + "modules/proxy/mod_proxy_fcgi+I+Apache proxy FastCGI module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_ftp+I+Apache proxy FTP module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_http+I+Apache proxy HTTP module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_hcheck+I+Apache proxy health check module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_scgi+I+Apache proxy SCGI module. Requires and is enabled by --enable-proxy." + "modules/proxy/mod_proxy_wstunnel+I+Apache proxy Websocket Tunnel module. Requires and is enabled by --enable-proxy." + "modules/http2/mod_proxy_http2+i+Apache proxy HTTP/2 module. Requires --enable-proxy." + "modules/session/mod_session+I+session module" + "modules/session/mod_session_cookie+I+session cookie module" + "modules/session/mod_session_crypto+i+session crypto module" + "modules/session/mod_session_dbd+I+session dbd module" + "modules/slotmem/mod_slotmem_plain+I+slotmem provider that uses plain memory" + "modules/slotmem/mod_slotmem_shm+I+slotmem provider that uses shared memory" + "modules/ssl/mod_ssl+i+SSL/TLS support" + "modules/test/mod_dialup+O+rate limits static files to dialup modem speeds" + "modules/test/mod_optional_fn_export+O+example optional function exporter" + "modules/test/mod_optional_fn_import+O+example optional function importer" + "modules/test/mod_optional_hook_export+O+example optional hook exporter" + "modules/test/mod_optional_hook_import+O+example optional hook importer" +) + +# Track which modules actually built have APIs to link against. +SET(installed_mod_libs_exps) + +# Define extra definitions, sources, headers, etc. required by some modules. +# This could be included in the master list of modules above, though it +# certainly would get a lot more unreadable. +SET(mod_apreq_extra_defines APREQ_DECLARE_EXPORT) +SET(mod_apreq_extra_sources modules/apreq/handle.c) +SET(mod_apreq_main_source modules/apreq/filter.c) +SET(mod_authz_dbd_extra_defines AUTHZ_DBD_DECLARE_EXPORT) +SET(mod_authnz_ldap_requires APR_HAS_LDAP) +SET(mod_authnz_ldap_extra_libs mod_ldap) +SET(mod_cache_extra_defines CACHE_DECLARE_EXPORT) +SET(mod_cache_extra_sources + modules/cache/cache_storage.c modules/cache/cache_util.c +) +SET(mod_cache_install_lib 1) +SET(mod_cache_disk_extra_libs mod_cache) +SET(mod_cache_socache_extra_libs mod_cache) +SET(mod_charset_lite_requires APR_HAS_XLATE) +SET(mod_dav_extra_defines DAV_DECLARE_EXPORT) +SET(mod_dav_extra_sources + modules/dav/main/liveprop.c modules/dav/main/props.c + modules/dav/main/std_liveprop.c modules/dav/main/providers.c + modules/dav/main/util.c modules/dav/main/util_lock.c +) +SET(mod_dav_install_lib 1) +SET(mod_dav_fs_extra_sources + modules/dav/fs/dbm.c modules/dav/fs/lock.c + modules/dav/fs/repos.c +) +SET(mod_dav_fs_extra_libs mod_dav) +SET(mod_dav_lock_extra_sources modules/dav/lock/locks.c) +SET(mod_dav_lock_extra_libs mod_dav) +SET(mod_dbd_extra_defines DBD_DECLARE_EXPORT) +SET(mod_deflate_requires ZLIB_FOUND) +IF(ZLIB_FOUND) + SET(mod_deflate_extra_includes ${ZLIB_INCLUDE_DIR}) + SET(mod_deflate_extra_libs ${ZLIB_LIBRARIES}) +ENDIF() +SET(mod_firehose_requires SOMEONE_TO_MAKE_IT_COMPILE_ON_WINDOWS) +SET(mod_heartbeat_extra_libs mod_watchdog) +SET(mod_http2_requires NGHTTP2_FOUND) +SET(mod_http2_extra_defines ssize_t=long) +SET(mod_http2_extra_libs ${NGHTTP2_LIBRARIES}) +SET(mod_http2_extra_sources + modules/http2/h2_alt_svc.c modules/http2/h2_bucket_eoc.c + modules/http2/h2_bucket_eos.c modules/http2/h2_config.c + modules/http2/h2_conn.c modules/http2/h2_conn_io.c + modules/http2/h2_ctx.c modules/http2/h2_filter.c + modules/http2/h2_from_h1.c modules/http2/h2_h2.c + modules/http2/h2_bucket_beam.c + modules/http2/h2_mplx.c modules/http2/h2_push.c + modules/http2/h2_request.c modules/http2/h2_headers.c + modules/http2/h2_session.c modules/http2/h2_stream.c + modules/http2/h2_switch.c modules/http2/h2_ngn_shed.c + modules/http2/h2_task.c modules/http2/h2_util.c + modules/http2/h2_worker.c modules/http2/h2_workers.c +) +SET(mod_ldap_extra_defines LDAP_DECLARE_EXPORT) +SET(mod_ldap_extra_libs wldap32) +SET(mod_ldap_extra_sources + modules/ldap/util_ldap_cache.c modules/ldap/util_ldap_cache_mgr.c +) +SET(mod_ldap_main_source modules/ldap/util_ldap.c) +SET(mod_ldap_requires APR_HAS_LDAP) +SET(mod_lua_extra_defines AP_LUA_DECLARE_EXPORT) +SET(mod_lua_extra_includes ${LUA_INCLUDE_DIR}) +SET(mod_lua_extra_libs ${LUA_LIBRARIES}) +SET(mod_lua_extra_sources + modules/lua/lua_apr.c modules/lua/lua_config.c + modules/lua/lua_passwd.c modules/lua/lua_request.c + modules/lua/lua_vmprep.c modules/lua/lua_dbd.c +) +SET(mod_lua_requires LUA51_FOUND) +SET(mod_optional_hook_export_extra_defines AP_DECLARE_EXPORT) # bogus reuse of core API prefix +SET(mod_proxy_extra_defines PROXY_DECLARE_EXPORT) +SET(mod_proxy_extra_sources modules/proxy/proxy_util.c) +SET(mod_proxy_install_lib 1) +SET(mod_proxy_ajp_extra_sources + modules/proxy/ajp_header.c modules/proxy/ajp_link.c + modules/proxy/ajp_msg.c modules/proxy/ajp_utils.c +) +SET(mod_proxy_ajp_extra_libs mod_proxy) +SET(mod_proxy_balancer_extra_libs mod_proxy) +SET(mod_proxy_connect_extra_libs mod_proxy) +SET(mod_proxy_express_extra_libs mod_proxy) +SET(mod_proxy_fcgi_extra_libs mod_proxy) +SET(mod_proxy_ftp_extra_libs mod_proxy) +SET(mod_proxy_hcheck_extra_libs mod_proxy) +SET(mod_proxy_http_extra_libs mod_proxy) +SET(mod_proxy_html_requires LIBXML2_FOUND) +IF(LIBXML2_FOUND) + SET(mod_proxy_html_extra_includes "${LIBXML2_INCLUDE_DIR};${LIBXML2_ICONV_INCLUDE_DIR}") + SET(mod_proxy_html_extra_libs "${LIBXML2_LIBRARIES};${LIBXML2_ICONV_LIBRARIES}") +ENDIF() +SET(mod_proxy_scgi_extra_libs mod_proxy) +SET(mod_proxy_wstunnel_extra_libs mod_proxy) +SET(mod_proxy_http2_requires NGHTTP2_FOUND) +SET(mod_proxy_http2_extra_defines ssize_t=long) +SET(mod_proxy_http2_extra_includes ${NGHTTP2_INCLUDE_DIR}) +SET(mod_proxy_http2_extra_libs ${NGHTTP2_LIBRARIES} mod_proxy) +SET(mod_proxy_http2_extra_sources + modules/http2/h2_proxy_session.c modules/http2/h2_proxy_util.c +) +SET(mod_ratelimit_extra_defines AP_RL_DECLARE_EXPORT) +SET(mod_sed_extra_sources + modules/filters/regexp.c modules/filters/sed0.c + modules/filters/sed1.c +) +SET(mod_serf_requires AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT) +SET(mod_session_extra_defines SESSION_DECLARE_EXPORT) +SET(mod_session_install_lib 1) +SET(mod_session_cookie_extra_libs mod_session) +SET(mod_session_crypto_requires APU_HAVE_CRYPTO) +SET(mod_session_crypto_extra_libs mod_session) +SET(mod_session_dbd_extra_libs mod_session) +SET(mod_socache_dc_requires AN_UNIMPLEMENTED_SUPPORT_LIBRARY_REQUIREMENT) +SET(mod_ssl_extra_defines SSL_DECLARE_EXPORT) +SET(mod_ssl_requires OPENSSL_FOUND) +IF(OPENSSL_FOUND) + SET(mod_ssl_extra_includes ${OPENSSL_INCLUDE_DIR}) + SET(mod_ssl_extra_libs ${OPENSSL_LIBRARIES}) +ENDIF() +SET(mod_ssl_extra_sources + modules/ssl/ssl_engine_config.c + modules/ssl/ssl_engine_init.c modules/ssl/ssl_engine_io.c + modules/ssl/ssl_engine_kernel.c modules/ssl/ssl_engine_log.c + modules/ssl/ssl_engine_mutex.c modules/ssl/ssl_engine_ocsp.c + modules/ssl/ssl_engine_pphrase.c modules/ssl/ssl_engine_rand.c + modules/ssl/ssl_engine_vars.c modules/ssl/ssl_scache.c + modules/ssl/ssl_util.c modules/ssl/ssl_util_ocsp.c + modules/ssl/ssl_util_ssl.c modules/ssl/ssl_util_stapling.c +) +SET(mod_status_extra_defines STATUS_DECLARE_EXPORT) +SET(mod_watchdog_install_lib 1) +SET(mod_xml2enc_requires LIBXML2_FOUND) +IF(LIBXML2_FOUND) + SET(mod_xml2enc_extra_includes "${LIBXML2_INCLUDE_DIR};${LIBXML2_ICONV_INCLUDE_DIR}") + SET(mod_xml2enc_extra_libs "${LIBXML2_LIBRARIES};${LIBXML2_ICONV_LIBRARIES}") +ENDIF() +SET(mod_watchdog_extra_defines AP_WD_DECLARE_EXPORT) + +SET(MODULE_PATHS) +FOREACH (modinfo ${MODULE_LIST}) + STRING(REGEX REPLACE "([^+]*)\\+([^+]*)\\+([^+]*)" "\\1;\\2;\\3" modinfolist ${modinfo}) + SET(path_to_module) + SET(defaultenable) + SET(helptext) + FOREACH(i ${modinfolist}) + IF("${path_to_module}" STREQUAL "") + SET(path_to_module ${i}) + ELSEIF("${defaultenable}" STREQUAL "") + SET(defaultenable ${i}) + ELSEIF("${helptext}" STREQUAL "") + SET(helptext ${i}) + ELSE() + MESSAGE(FATAL_ERROR "Unexpected field or plus sign in >${modinfo}<") + ENDIF() + ENDFOREACH() + + # MESSAGE(" path to module: ${path_to_module}") + # MESSAGE("enablement by default: ${defaultenable}") + # MESSAGE(" help text: ${helptext}") + + STRING(REGEX REPLACE ".*/(mod_[^\\+]+)" "\\1" mod_name ${path_to_module}) + STRING(REGEX REPLACE "mod_(.*)" "\\1" mod_shortname ${mod_name}) + + STRING(TOUPPER "ENABLE_${mod_shortname}" mod_option_name) + + SET(${mod_option_name} ${defaultenable} CACHE STRING ${helptext}) + SET(MODULE_PATHS "${MODULE_PATHS};${path_to_module}") + +ENDFOREACH() + +SET(install_targets) +SET(install_bin_pdb) +SET(install_modules) # special handling vs. other installed targets +SET(install_modules_pdb) +SET(builtin_module_shortnames "win32 mpm_winnt http so") # core added automatically +SET(extra_builtin_modules) # the ones specified with -DWITH_MODULES= + +IF(WITH_MODULES) # modules statically linked with the server + STRING(REPLACE "," ";" WITH_MODULE_LIST ${WITH_MODULES}) + FOREACH(static_mod ${WITH_MODULE_LIST}) + STRING(REGEX MATCH "[^/]+\\.c" mod_basename ${static_mod}) + STRING(REGEX REPLACE "^mod_(.*)\\.c" "\\1" mod_module_name ${mod_basename}) + SET(builtin_module_shortnames "${builtin_module_shortnames} ${mod_module_name}") + CONFIGURE_FILE(${static_mod} ${PROJECT_BINARY_DIR}/ COPYONLY) + SET(extra_builtin_modules ${extra_builtin_modules} ${PROJECT_BINARY_DIR}/${mod_basename}) + ENDFOREACH() + EXECUTE_PROCESS(COMMAND cmd /c "echo ${builtin_module_shortnames}| awk -f ${CMAKE_CURRENT_SOURCE_DIR}/build/build-modules-c.awk > ${PROJECT_BINARY_DIR}/modules.c" RESULT_VARIABLE rv) + IF(rv) + MESSAGE(FATAL_ERROR "build-modules-c.awk failed (${rv})") + ENDIF() +ELSE() + # no extra built-in modules; use the default modules.c to avoid the awk prereq + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/os/win32/modules.c ${PROJECT_BINARY_DIR}/ COPYONLY) +ENDIF() + +# for easy reference from .dll/.so builds +CONFIGURE_FILE(os/win32/BaseAddr.ref ${PROJECT_BINARY_DIR}/ COPYONLY) + +ADD_EXECUTABLE(gen_test_char server/gen_test_char.c) +GET_TARGET_PROPERTY(GEN_TEST_CHAR_EXE gen_test_char LOCATION) +ADD_CUSTOM_COMMAND( + COMMENT "Generating character tables, test_char.h, for current locale" + DEPENDS gen_test_char + COMMAND ${GEN_TEST_CHAR_EXE} > ${PROJECT_BINARY_DIR}/test_char.h + OUTPUT ${PROJECT_BINARY_DIR}/test_char.h +) +ADD_CUSTOM_TARGET( + test_char_header ALL + DEPENDS ${PROJECT_BINARY_DIR}/test_char.h +) + +SET(HTTPD_MAIN_SOURCES + server/main.c +) + +SET(LIBHTTPD_SOURCES + ${extra_builtin_modules} + ${PROJECT_BINARY_DIR}/modules.c + modules/arch/win32/mod_win32.c + modules/core/mod_so.c + modules/http/byterange_filter.c + modules/http/chunk_filter.c + modules/http/http_core.c + modules/http/http_etag.c + modules/http/http_filters.c + modules/http/http_protocol.c + modules/http/http_request.c + os/win32/ap_regkey.c + os/win32/util_win32.c + server/buildmark.c + server/config.c + server/connection.c + server/core.c + server/core_filters.c + server/eoc_bucket.c + server/eor_bucket.c + server/error_bucket.c + server/listen.c + server/log.c + server/mpm/winnt/child.c + server/mpm/winnt/mpm_winnt.c + server/mpm/winnt/nt_eventlog.c + server/mpm/winnt/service.c + server/mpm_common.c + server/protocol.c + server/provider.c + server/request.c + server/scoreboard.c + server/util.c + server/util_cfgtree.c + server/util_cookies.c + server/util_expr_eval.c + server/util_expr_parse.c + server/util_fcgi.c + server/util_expr_scan.c + server/util_filter.c + server/util_md5.c + server/util_mutex.c + server/util_pcre.c + server/util_regex.c + server/util_script.c + server/util_time.c + server/util_xml.c + server/vhost.c +) + +CONFIGURE_FILE(os/win32/win32_config_layout.h + ${PROJECT_BINARY_DIR}/ap_config_layout.h) + +SET(HTTPD_INCLUDE_DIRECTORIES + ${PROJECT_BINARY_DIR} + ${EXTRA_INCLUDES} + # see discussion in cmake bug 13188 regarding oddities with relative paths + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/os/win32 + ${CMAKE_CURRENT_SOURCE_DIR}/modules/core + ${CMAKE_CURRENT_SOURCE_DIR}/modules/database + ${CMAKE_CURRENT_SOURCE_DIR}/modules/dav/main + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filters + ${CMAKE_CURRENT_SOURCE_DIR}/modules/generators + ${CMAKE_CURRENT_SOURCE_DIR}/modules/proxy + ${CMAKE_CURRENT_SOURCE_DIR}/modules/session + ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl + ${CMAKE_CURRENT_SOURCE_DIR}/server + ${APR_INCLUDE_DIR} + ${PCRE_INCLUDE_DIR} +) + +# The .h files we install from outside the main include directory +# largely parallel the include directories above. +SET(other_installed_h + ${PROJECT_BINARY_DIR}/ap_config_layout.h + ${CMAKE_CURRENT_SOURCE_DIR}/os/win32/os.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/cache/mod_cache.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/cache/cache_common.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/core/mod_so.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/core/mod_watchdog.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/database/mod_dbd.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/dav/main/mod_dav.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filters/mod_include.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/filters/mod_xml2enc.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/generators/mod_cgi.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/generators/mod_status.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/loggers/mod_log_config.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/mappers/mod_rewrite.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/proxy/mod_proxy.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/session/mod_session.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl/mod_ssl.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/ssl/mod_ssl_openssl.h +) +# When mod_serf is buildable, don't forget to copy modules/proxy/mod_serf.h + +INCLUDE_DIRECTORIES(${HTTPD_INCLUDE_DIRECTORIES}) + +SET(HTTPD_SYSTEM_LIBS + ws2_32 + mswsock +) + +########### HTTPD MODULES ############ +SET(LoadModules) +SET(mods_built_and_loaded) +SET(mods_built_but_not_loaded) +SET(mods_omitted) +FOREACH (mod ${MODULE_PATHS}) + # Build different forms of the module name; e.g., + # mod_name->mod_cgi, mod_module_name->cgi_module, mod_shortname->cgi + STRING(REGEX REPLACE ".*/(mod_[^\\+]+)" "\\1" mod_name ${mod}) + STRING(REGEX REPLACE "mod_(.*)" "\\1_module" mod_module_name ${mod_name}) + STRING(REGEX REPLACE "mod_(.*)" "\\1" mod_shortname ${mod_name}) + + # Is it enabled? + STRING(TOUPPER "ENABLE_${mod_shortname}" enable_mod) + SET(enable_mod_val ${${enable_mod}}) + + # Is ENABLE_MODULES set to a higher value? + GET_MOD_ENABLE_RANK(${mod_name} ${enable_mod_val} this_mod_rank) + IF(this_mod_rank LESS enable_modules_rank) + # Use the value from ENABLE_MODULES + SET(enable_mod_val ${ENABLE_MODULES}) + ENDIF() + + IF(NOT ${enable_mod_val} STREQUAL "O") # build of module is desired + SET(mod_requires "${mod_name}_requires") + STRING(TOUPPER ${enable_mod_val} enable_mod_val_upper) + IF(NOT ${${mod_requires}} STREQUAL "") # module has some prerequisite + IF(NOT ${${mod_requires}}) # prerequisite doesn't exist + IF(NOT ${enable_mod_val} STREQUAL ${enable_mod_val_upper}) # lower case, so optional based on prereq + MESSAGE(STATUS "${mod_name} was requested but couldn't be built due to a missing prerequisite (${${mod_requires}})") + SET(enable_mod_val_upper "O") # skip due to missing prerequisite + ELSE() # must be upper case "A" or "I" (or coding error above) + MESSAGE(FATAL_ERROR "${mod_name} was requested but couldn't be built due to a missing prerequisite (${${mod_requires}})") + ENDIF() + ENDIF() + ENDIF() + # map a->A, i->I, O->O for remaining logic since prereq checking is over + SET(enable_mod_val ${enable_mod_val_upper}) + ENDIF() + + IF(${enable_mod_val} STREQUAL "O") + # ignore + SET(mods_omitted ${mods_omitted} ${mod_name}) + ELSE() + # Handle whether or not the LoadModule is commented out. + IF(${enable_mod_val} STREQUAL "A") + SET(LoadModules "${LoadModules}LoadModule ${mod_module_name} modules/${mod_name}.so\n") + SET(mods_built_and_loaded ${mods_built_and_loaded} ${mod_name}) + ELSEIF(${enable_mod_val} STREQUAL "I") + SET(LoadModules "${LoadModules}# LoadModule ${mod_module_name} modules/${mod_name}.so\n") + SET(mods_built_but_not_loaded ${mods_built_but_not_loaded} ${mod_name}) + ELSE() + MESSAGE(FATAL_ERROR "${enable_mod} must be set to \"A\", \"I\", or \"O\" instead of \"${enable_mod_val}\"") + ENDIF() + + # Handle building it. + SET(mod_main_source "${mod_name}_main_source") + SET(mod_extra_sources "${mod_name}_extra_sources") + + IF("${${mod_main_source}}" STREQUAL "") + SET(tmp_mod_main_source "${mod}.c") + ELSE() + SET(tmp_mod_main_source ${${mod_main_source}}) + ENDIF() + SET(all_mod_sources ${tmp_mod_main_source} ${${mod_extra_sources}}) + ADD_LIBRARY(${mod_name} SHARED ${all_mod_sources} build/win32/httpd.rc) + SET(install_modules ${install_modules} ${mod_name}) + SET(install_modules_pdb ${install_modules_pdb} "$") + IF("${${mod_name}_install_lib}") + SET(installed_mod_libs_exps + ${installed_mod_libs_exps} + "$" + "$/${mod_name}.exp" + ) + ENDIF() + SET(mod_extra_libs "${mod_name}_extra_libs") + SET_TARGET_PROPERTIES(${mod_name} PROPERTIES + SUFFIX .so + LINK_FLAGS /base:@${PROJECT_BINARY_DIR}/BaseAddr.ref,${mod_name}.so + ) + TARGET_LINK_LIBRARIES(${mod_name} ${${mod_extra_libs}} libhttpd ${EXTRA_LIBS} ${APR_LIBRARIES} ${HTTPD_SYSTEM_LIBS}) + DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "${mod_name} for Apache HTTP Server") + SET_TARGET_PROPERTIES(${mod_name} PROPERTIES COMPILE_FLAGS "${define_long_name} -DBIN_NAME=${mod_name}.so ${EXTRA_COMPILE_FLAGS}") + + # Extra defines? + SET(mod_extra_defines "${mod_name}_extra_defines") + IF(NOT ${${mod_extra_defines}} STREQUAL "") + SET_TARGET_PROPERTIES(${mod_name} PROPERTIES COMPILE_DEFINITIONS ${${mod_extra_defines}}) + ENDIF() + + # Extra includes? + SET(mod_extra_includes "${mod_name}_extra_includes") + IF(NOT "${${mod_extra_includes}}" STREQUAL "") + SET(tmp_includes ${HTTPD_INCLUDE_DIRECTORIES} ${${mod_extra_includes}}) + SET_TARGET_PROPERTIES(${mod_name} PROPERTIES INCLUDE_DIRECTORIES "${tmp_includes}") + GET_PROPERTY(tmp_includes TARGET ${mod_name} PROPERTY INCLUDE_DIRECTORIES) + ENDIF() + + ENDIF() +ENDFOREACH() + +########### HTTPD LIBRARIES ############ +ADD_LIBRARY(libhttpd SHARED ${LIBHTTPD_SOURCES} build/win32/httpd.rc) +SET_TARGET_PROPERTIES(libhttpd PROPERTIES + LINK_FLAGS /base:@${PROJECT_BINARY_DIR}/BaseAddr.ref,libhttpd.dll +) +SET(install_targets ${install_targets} libhttpd) +SET(install_bin_pdb ${install_bin_pdb} $) +TARGET_LINK_LIBRARIES(libhttpd ${EXTRA_LIBS} ${APR_LIBRARIES} ${PCRE_LIBRARIES} ${HTTPD_SYSTEM_LIBS}) +DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "Apache HTTP Server Core") +SET_TARGET_PROPERTIES(libhttpd PROPERTIES COMPILE_FLAGS "-DAP_DECLARE_EXPORT ${define_long_name} -DBIN_NAME=libhttpd.dll ${EXTRA_COMPILE_FLAGS}") +ADD_DEPENDENCIES(libhttpd test_char_header) + +########### HTTPD EXECUTABLES ########## +ADD_EXECUTABLE(httpd server/main.c build/win32/httpd.rc) +SET(install_targets ${install_targets} httpd) +SET(install_bin_pdb ${install_bin_pdb} $) +DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "Apache HTTP Server") +SET_TARGET_PROPERTIES(httpd PROPERTIES COMPILE_FLAGS "-DAPP_FILE ${define_long_name} -DBIN_NAME=httpd.exe -DICON_FILE=${CMAKE_SOURCE_DIR}/build/win32/apache.ico ${EXTRA_COMPILE_FLAGS}") +TARGET_LINK_LIBRARIES(httpd libhttpd ${EXTRA_LIBS}) + +SET(standard_support + ab + htcacheclean + htdbm + htdigest + htpasswd + httxt2dbm + logresolve + rotatelogs +) + +SET(htdbm_extra_sources support/passwd_common.c) +SET(htpasswd_extra_sources support/passwd_common.c) + +FOREACH(pgm ${standard_support}) + SET(extra_sources ${pgm}_extra_sources) + ADD_EXECUTABLE(${pgm} support/${pgm}.c ${${extra_sources}} build/win32/httpd.rc) + SET(install_targets ${install_targets} ${pgm}) + SET(install_bin_pdb ${install_bin_pdb} $) + DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "Apache HTTP Server ${pgm} program") + SET_TARGET_PROPERTIES(${pgm} PROPERTIES COMPILE_FLAGS "-DAPP_FILE ${define_long_name} -DBIN_NAME=${pgm}.exe ${EXTRA_COMPILE_FLAGS}") + TARGET_LINK_LIBRARIES(${pgm} ${EXTRA_LIBS} ${APR_LIBRARIES}) +ENDFOREACH() + +IF(OPENSSL_FOUND) + ADD_EXECUTABLE(abs support/ab.c build/win32/httpd.rc) + SET(install_targets ${install_targets} abs) + SET(install_bin_pdb ${install_bin_pdb} $) + SET_TARGET_PROPERTIES(abs PROPERTIES COMPILE_DEFINITIONS HAVE_OPENSSL) + SET(tmp_includes ${HTTPD_INCLUDE_DIRECTORIES} ${OPENSSL_INCLUDE_DIR}) + SET_TARGET_PROPERTIES(abs PROPERTIES INCLUDE_DIRECTORIES "${tmp_includes}") + DEFINE_WITH_BLANKS(define_long_name "LONG_NAME" "Apache HTTP Server ab/SSL program") + SET_TARGET_PROPERTIES(abs PROPERTIES COMPILE_FLAGS "-DAPP_FILE ${define_long_name} -DBIN_NAME=abs.exe ${EXTRA_COMPILE_FLAGS}") + TARGET_LINK_LIBRARIES(abs ${EXTRA_LIBS} ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) +ENDIF() +GET_PROPERTY(tmp_includes TARGET ab PROPERTY INCLUDE_DIRECTORIES) + +# getting duplicate manifest error with ApacheMonitor +# ADD_EXECUTABLE(ApacheMonitor support/win32/ApacheMonitor.c support/win32/ApacheMonitor.rc) +# SET(install_targets ${install_targets} ApacheMonitor) +# SET(install_bin_pdb ${install_bin_pdb} $) +# SET_TARGET_PROPERTIES(ApacheMonitor PROPERTIES WIN32_EXECUTABLE TRUE) +# SET_TARGET_PROPERTIES(ApacheMonitor PROPERTIES COMPILE_FLAGS "-DAPP_FILE -DLONG_NAME=ApacheMonitor -DBIN_NAME=ApacheMonitor.exe ${EXTRA_COMPILE_FLAGS}") +# TARGET_LINK_LIBRARIES(ApacheMonitor ${EXTRA_LIBS} ${HTTPD_SYSTEM_LIBS} comctl32 wtsapi32) + +########### CONFIGURATION FILES ########### +# Set up variables used in the .conf file templates +SET(LoadModule "${LoadModules}") +SET(Port "80" CACHE STRING "http port to listen on") +SET(SSLPort "443" CACHE STRING "https port to listen on") +SET(ServerRoot "${CMAKE_INSTALL_PREFIX}") +SET(exp_cgidir "${CMAKE_INSTALL_PREFIX}/cgi-bin") +SET(exp_htdocsdir "${CMAKE_INSTALL_PREFIX}/htdocs") +SET(exp_iconsdir "${CMAKE_INSTALL_PREFIX}/icons") +SET(exp_errordir "${CMAKE_INSTALL_PREFIX}/error") +SET(exp_manualdir "${CMAKE_INSTALL_PREFIX}/manual") +SET(rel_logfiledir "logs") +SET(rel_runtimedir "logs") +SET(rel_sysconfdir "conf") +FILE(GLOB_RECURSE conffiles RELATIVE ${CMAKE_SOURCE_DIR}/docs/conf "docs/conf/*") +FOREACH(template ${conffiles}) + STRING(REPLACE ".conf.in" ".conf" conf ${template}) + FILE(READ "docs/conf/${template}" template_text) + IF(template MATCHES ".conf.in$") + # substitute @var@/@@var@@ in .conf.in + STRING(REPLACE "@@" "@" template_text ${template_text}) + STRING(CONFIGURE "${template_text}" template_text @ONLY) + ENDIF() + FILE(WRITE ${CMAKE_BINARY_DIR}/conf/original/${conf} "${template_text}") + FILE(WRITE ${CMAKE_BINARY_DIR}/conf/${conf} "${template_text}") +ENDFOREACH() + +########### INSTALLATION ########### +INSTALL(TARGETS ${install_targets} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +INSTALL(TARGETS ${install_modules} + RUNTIME DESTINATION modules + ) + +IF(INSTALL_PDB) + INSTALL(FILES ${install_bin_pdb} + DESTINATION bin + CONFIGURATIONS RelWithDebInfo Debug) + + INSTALL(FILES ${install_modules_pdb} + DESTINATION modules + CONFIGURATIONS RelWithDebInfo Debug) +ENDIF() + +INSTALL(DIRECTORY include/ DESTINATION include + FILES_MATCHING PATTERN "*.h" +) +INSTALL(FILES ${other_installed_h} DESTINATION include) +INSTALL(FILES ${installed_mod_libs_exps} DESTINATION lib) +INSTALL(FILES "$/libhttpd.exp" DESTINATION LIB) + +IF(INSTALL_MANUAL) # Silly? This takes a while, and a dev doesn't need it. + INSTALL(DIRECTORY docs/manual/ DESTINATION manual) +ENDIF() + +INSTALL(DIRECTORY DESTINATION logs) +INSTALL(DIRECTORY DESTINATION cgi-bin) + +INSTALL(CODE "EXECUTE_PROCESS(COMMAND perl \"${CMAKE_CURRENT_SOURCE_DIR}/build/cpR_noreplace.pl\" \"${CMAKE_CURRENT_SOURCE_DIR}/docs/error\" \"${CMAKE_INSTALL_PREFIX}/error\" ifdestmissing)") + +INSTALL(CODE "EXECUTE_PROCESS(COMMAND perl \"${CMAKE_CURRENT_SOURCE_DIR}/build/cpR_noreplace.pl\" \"${CMAKE_CURRENT_SOURCE_DIR}/docs/docroot\" \"${CMAKE_INSTALL_PREFIX}/htdocs\" ifdestmissing)") + +INSTALL(CODE "EXECUTE_PROCESS(COMMAND perl \"${CMAKE_CURRENT_SOURCE_DIR}/build/cpR_noreplace.pl\" \"${CMAKE_CURRENT_SOURCE_DIR}/docs/icons\" \"${CMAKE_INSTALL_PREFIX}/icons\" ifdestmissing)") + +# Copy generated .conf files from the build directory to the install, +# without overwriting stuff already there. +INSTALL(CODE "EXECUTE_PROCESS(COMMAND perl \"${CMAKE_CURRENT_SOURCE_DIR}/build/cpR_noreplace.pl\" \"${CMAKE_BINARY_DIR}/conf\" \"${CMAKE_INSTALL_PREFIX}/conf\")") +# But conf/original is supposed to be overwritten. +# Note: FILE(TO_NATIVE_PATH ...) leaves the backslashes unescaped, which +# generates warnings. Just do it manually since this build only supports +# Windows anyway. +STRING(REPLACE "/" "\\\\" native_src ${CMAKE_BINARY_DIR}/conf/original) +STRING(REPLACE "/" "\\\\" native_dest ${CMAKE_INSTALL_PREFIX}/conf/original) +INSTALL(CODE "EXECUTE_PROCESS(COMMAND xcopy \"${native_src}\" \"${native_dest}\" /Q /S /Y)") + +STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) +MESSAGE(STATUS "") +MESSAGE(STATUS "") +MESSAGE(STATUS "Apache httpd configuration summary:") +MESSAGE(STATUS "") +MESSAGE(STATUS " Build type ...................... : ${CMAKE_BUILD_TYPE}") +MESSAGE(STATUS " Install .pdb (if available)...... : ${INSTALL_PDB}") +MESSAGE(STATUS " Install manual .................. : ${INSTALL_MANUAL}") +MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") +MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") +MESSAGE(STATUS " APR include directory ........... : ${APR_INCLUDE_DIR}") +MESSAGE(STATUS " APR libraries ................... : ${APR_LIBRARIES}") +MESSAGE(STATUS " OpenSSL include directory ....... : ${OPENSSL_INCLUDE_DIR}") +MESSAGE(STATUS " OpenSSL libraries ............... : ${OPENSSL_LIBRARIES}") +MESSAGE(STATUS " PCRE include directory .......... : ${PCRE_INCLUDE_DIR}") +MESSAGE(STATUS " PCRE libraries .................. : ${PCRE_LIBRARIES}") +MESSAGE(STATUS " libxml2 iconv prereq include dir. : ${LIBXML2_ICONV_INCLUDE_DIR}") +MESSAGE(STATUS " libxml2 iconv prereq libraries .. : ${LIBXML2_ICONV_LIBRARIES}") +MESSAGE(STATUS " Extra include directories ....... : ${EXTRA_INCLUDES}") +MESSAGE(STATUS " Extra compile flags ............. : ${EXTRA_COMPILE_FLAGS}") +MESSAGE(STATUS " Extra libraries ................. : ${EXTRA_LIBS}") + +MESSAGE(STATUS " Modules built and loaded:") +FOREACH(mod ${mods_built_and_loaded}) + MESSAGE(STATUS " ${mod}") +ENDFOREACH() + +MESSAGE(STATUS " Modules built but not loaded:") +FOREACH(mod ${mods_built_but_not_loaded}) + MESSAGE(STATUS " ${mod}") +ENDFOREACH() + +MESSAGE(STATUS " Modules not built:") +FOREACH(mod ${mods_omitted}) + MESSAGE(STATUS " ${mod}") +ENDFOREACH() diff --git a/INSTALL b/INSTALL index 7cc31da46a6..538fc56dcfd 100644 --- a/INSTALL +++ b/INSTALL @@ -5,7 +5,7 @@ ------------------ For complete installation documentation, see [ht]docs/manual/install.html or - http://httpd.apache.org/docs/2.3/install.html + http://httpd.apache.org/docs/2.4/install.html $ ./configure --prefix=PREFIX $ make @@ -17,16 +17,21 @@ might use "/usr/local/apache2" for PREFIX (without the quotes). - * Consider if you need to use the bundled APR and APR-Util - via ./configure's --with-included-apr option, to use the - bundled source instead of a previously installed APR and - APR-Util (such as those provided with many OSes). This - is required if you don't have the compiler which the - system APR was built with. This can be advantageous if - you are a developer who will be linking your code with - Apache or using a debugger to step through server code, - as it removes the possibility of version or compile-option - mismatches with APR and APR-util code. + * Consider if you want to use a previously installed APR and + APR-Util (such as those provided with many OSes) or if you + need to use the APR and APR-Util from the apr.apache.org + project. If the latter, download the latest versions and + unpack them to ./srclib/apr and ./srclib/apr-util (no + version numbers in the directory names) and use + ./configure's --with-included-apr option. This is required + if you don't have the compiler which the system APR was + built with. It can also be advantageous if you are a + developer who will be linking your code with Apache or using + a debugger to step through server code, as it removes the + possibility of version or compile-option mismatches with APR + and APR-Util code. As a convenience, prepackaged source-code + bundles of APR and APR-Util are occasionally also provided + as a httpd-2.X.X-deps.tar.gz download. * If you are a developer building Apache directly from Subversion, you will need to run ./buildconf before running @@ -59,54 +64,24 @@ --enable-rewrite=shared \ --enable-speling=shared - The easiest way to find all of the configuration flags for Apache 2.3 + The easiest way to find all of the configuration flags for Apache 2.4 is to run ./configure --help. Quick Start - Windows --------------------- - For complete documentation, see [ht]docs/manual/platform/windows.html or - http://httpd.apache.org/docs/2.3/platform/windows.html. - - The Apache/Win32 binaries are primarily distributed as a Windows Installer - package (.msi), and may be available as a .zip file as well. These packages - are named apache-2.3.xx-win32-x86.msi and apache-2.3.xx-win32-x86.zip. - Please choose the .msi package if at all possible. Note that Apache version - 2.3 is a development version and binaries may not be available. Use a - released version from the stable 2.2 branch instead. - - If you have unpacked a source distribution (named httpd-2.3-xx.zip, without - any -win32-x86 notation) you must compile the package yourself, see the links - mentioned above. Unless you intended to do this, please look again for the - binary package from http://www.apache.org/dist/httpd/binaries/win32/ and - install that .msi (or .zip package, if you must.) - - If you have unpacked this binary distribution from the .zip package, you - _must_ edit the conf/httpd.conf file (with notepad or another text editor) - to reflect the correct ServerName, Domain, and directory paths. Search for - the text "@@" to discover what you must edit. To install and start the - service after you have corrected the httpd.conf file, use the command - - bin\httpd.exe -k install - bin\httpd.exe -k start - - The .msi package configures the httpd.conf file, and installs and starts - the Apache2 service for you. It also installs plenty of useful shortcuts - and the taskbar ApacheMonitor. We strongly encourage you to use it. + For complete documentation, see manual/platform/windows.html.en or + Postscript ---------- - The Apache HTTP Server group cannot field user's installation questions. - There are many valuable forums to help you get started. Please refer your - questions to the appropriate forum, such as the Users Mailing List at - http://httpd.apache.org/userslist.html or the usenet newsgroups - comp.infosystems.www.servers.unix or - comp.infosystems.www.servers.ms-windows. + To obtain help with installation problems, please see the resources at + - Thanks for using the Apache HTTP Server, version 2.3. + Thanks for using the Apache HTTP Server, version 2.4. The Apache Software Foundation http://www.apache.org/ diff --git a/InstallBin.dsp b/InstallBin.dsp index 64290afef52..e2a7aa91616 100644 --- a/InstallBin.dsp +++ b/InstallBin.dsp @@ -33,15 +33,15 @@ CFG=InstallBin - Win32 Debug # PROP BASE Intermediate_Dir "Release" # PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" # PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "\Apache2x\bin\httpd.exe" +# PROP BASE Target_File "\Apache24\bin\httpd.exe" # PROP BASE Bsc_Name "InstallBin.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2x" SHORT=R LONG=Release _install" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache24" SHORT=R LONG=Release _install" # PROP Rebuild_Opt "" -# PROP Target_File "\Apache2x\bin\httpd.exe" +# PROP Target_File "\Apache24\bin\httpd.exe" # PROP Bsc_Name "Browse\httpd.bsc" # PROP Target_Dir "" @@ -52,15 +52,15 @@ CFG=InstallBin - Win32 Debug # PROP BASE Intermediate_Dir "Debug" # PROP BASE Cmd_Line "NMAKE /f InstallBin.mak" # PROP BASE Rebuild_Opt "/a" -# PROP BASE Target_File "\Apache2x\bin\httpd.exe" +# PROP BASE Target_File "\Apache24\bin\httpd.exe" # PROP BASE Bsc_Name "InstallBin.bsc" # PROP BASE Target_Dir "" # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" -# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache2x" SHORT=D LONG=Debug _install" +# PROP Cmd_Line "NMAKE /f makefile.win INSTDIR="\Apache24" SHORT=D LONG=Debug _install" # PROP Rebuild_Opt "" -# PROP Target_File "\Apache2x\bin\httpd.exe" +# PROP Target_File "\Apache24\bin\httpd.exe" # PROP Bsc_Name "" # PROP Target_Dir "" diff --git a/LAYOUT b/LAYOUT index 9a630689c99..b5faadb1320 100644 --- a/LAYOUT +++ b/LAYOUT @@ -108,7 +108,6 @@ modules/ ................ Manditory and Add-In Apache stock modules mod_ssl.c ............... main source file containing API structures mod_ssl.h ............... common header file of mod_ssl ssl_engine_config.c ..... module configuration handling - ssl_engine_dh.c ......... DSA/DH support ssl_engine_init.c ....... module initialization ssl_engine_io.c ......... I/O support ssl_engine_kernel.c ..... SSL engine kernel diff --git a/LICENSE b/LICENSE index c7aa5ffdc3c..cfe471617e6 100644 --- a/LICENSE +++ b/LICENSE @@ -544,4 +544,5 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + ==================================================================== diff --git a/Makefile.in b/Makefile.in index ca5e806c7c2..6d952b24a1e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -12,8 +12,8 @@ PROGRAM_DEPENDENCIES = \ $(MPM_LIB) \ os/$(OS_DIR)/libos.la -PROGRAMS = $(PROGRAM_NAME) -TARGETS = $(PROGRAMS) $(shared_build) $(other_targets) +sbin_PROGRAMS = $(PROGRAM_NAME) +TARGETS = $(sbin_PROGRAMS) $(shared_build) $(other_targets) INSTALL_TARGETS = install-conf install-htdocs install-error install-icons \ install-other install-cgi install-include install-suexec install-build \ install-man @@ -41,7 +41,7 @@ install-conf: done; \ for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \ cd $$j ; \ - for i in httpd.conf extra/httpd-*.conf; do \ + for i in httpd.conf extra/*.conf; do \ if [ -f $$i ] ; then \ ( \ n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \ @@ -58,6 +58,16 @@ install-conf: -e 's#@@SSLPort@@#$(SSLPORT)#g' \ -e 'p' \ < $$i; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgi " > /dev/null ; then \ + have_cgi="1"; \ + else \ + have_cgi="0"; \ + fi; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgid " > /dev/null ; then \ + have_cgid="1"; \ + else \ + have_cgid="0"; \ + fi; \ for j in $(DSO_MODULES) "^EOL^"; do \ if test $$j != "^EOL^"; then \ if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \ @@ -68,8 +78,18 @@ install-conf: if test "$(LOAD_ALL_MODULES)" = "yes"; then \ loading_disabled=""; \ fi; \ - echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ - fi; \ + if test $$j = "cgid" -a "$$have_cgi" = "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + elif test $$j = "cgi" -a "$$have_cgid" = "1"; then \ + echo ""; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo ""; \ + else \ + echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + fi; \ + fi; \ done; \ sed -e '1,/@@LoadModule@@/d' \ -e '/@@LoadModule@@/d' \ @@ -125,6 +145,14 @@ docs: echo ' http://httpd.apache.org/docs-project/docsformat.html'; \ fi +validate-xml: + @if test -d $(top_srcdir)/docs/manual/build; then \ + cd $(top_srcdir)/docs/manual/build && ./build.sh validate-xml; \ + else \ + echo 'For details on generating the docs, please read:'; \ + echo ' http://httpd.apache.org/docs-project/docsformat.html'; \ + fi + dox: doxygen $(top_srcdir)/docs/doxygen.conf @@ -194,17 +222,19 @@ INSTALL_HEADERS = \ $(srcdir)/modules/core/mod_so.h \ $(srcdir)/modules/core/mod_watchdog.h \ $(srcdir)/modules/cache/mod_cache.h \ + $(srcdir)/modules/cache/cache_common.h \ $(srcdir)/modules/database/mod_dbd.h \ $(srcdir)/modules/dav/main/mod_dav.h \ $(srcdir)/modules/filters/mod_include.h \ + $(srcdir)/modules/filters/mod_xml2enc.h \ $(srcdir)/modules/generators/mod_cgi.h \ $(srcdir)/modules/generators/mod_status.h \ $(srcdir)/modules/loggers/mod_log_config.h \ $(srcdir)/modules/mappers/mod_rewrite.h \ $(srcdir)/modules/proxy/mod_proxy.h \ - $(srcdir)/modules/proxy/mod_serf.h \ $(srcdir)/modules/session/mod_session.h \ $(srcdir)/modules/ssl/mod_ssl.h \ + $(srcdir)/modules/ssl/mod_ssl_openssl.h \ $(srcdir)/os/$(OS_DIR)/*.h install-include: diff --git a/Makefile.win b/Makefile.win index 1a54237f978..9bdbb95089e 100644 --- a/Makefile.win +++ b/Makefile.win @@ -13,7 +13,7 @@ # The following install defaults may be customized; # # Option Default -# INSTDIR /Apache2x +# INSTDIR /Apache24 # PORT 80 # SSLPORT 443 # DOMAINNAME example.com @@ -42,7 +42,7 @@ # so the server root should be given in forward slashes (quoted), # preferably with the drive designation! -!IF EXIST("httpd.vcproj") && ([devenv /help > NUL 2>&1] == 0) \ +!IF EXIST("Apache.sln") && ([devenv /help > NUL 2>&1] == 0) \ && !defined(USEMAK) && !defined(USEDSW) USESLN=1 USEMAK=0 @@ -136,32 +136,6 @@ _tryssl: !ENDIF # NOT EXIST("srclib\openssl") -!IF EXIST("srclib\serf") - -_tryserf: -!IF $(USEMAK) == 1 - cd modules\proxy - $(MAKE) $(MAKEOPT) -f mod_serf.mak CFG="mod_serf - Win32 $(LONG)" RECURSE=0 $(CTARGET) - cd ..\.. -!ELSEIF $(USESLN) == 1 - devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_serf -!ELSE - @msdev $(TLP).dsw /USEENV /MAKE \ - "mod_serf - Win32 $(LONG)" /NORECURSE $(CTARGET) -!ENDIF - -!ELSE -# NOT EXIST("srclib\serf") - -_tryserf: - @echo ----- - @echo mod_serf will not build unless libserf.dll is built in srclib\serf - @echo For purposes of alpha, libserf release 0.3.0 works, but only with - @echo http://people.apache.org/~wrowe/fixserf-win32-0.3.0.patch - -!ENDIF -# NOT EXIST("srclib\serf") - !IF EXIST("srclib\zlib") _tryzlib: @@ -241,6 +215,34 @@ _trylua: !ENDIF +!IF EXIST("srclib\nghttp2") + +_trynghttp2: +!IF $(USEMAK) == 1 + cd modules\http2 + $(MAKE) $(MAKEOPT) -f mod_http2.mak CFG="mod_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_proxy_http2.mak CFG="mod_proxy_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. +!ELSEIF $(USESLN) == 1 + devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_http2 + devenv $(TLP).sln /useenv $(CTARGET) $(LONG) /project mod_proxy_http2 +!ELSE + @msdev $(TLP).dsw /USEENV /MAKE \ + "mod_http2 - Win32 $(LONG)" /NORECURSE $(CTARGET) + @msdev $(TLP).dsw /USEENV /MAKE \ + "mod_proxy_http2 - Win32 $(LONG)" /NORECURSE $(CTARGET) +!ENDIF + +!ELSE +# NOT EXIST("srclib\nghttp2") + +_trynghttp2: + @echo ----- + @echo mod_http2 will not build unless nghttp2 is installed in srclib\nghttp2. + @echo Version 1.0 includes an lib\makefile.msvc that will satisfy this + @echo requirement. + +!ENDIF _trydb: !IF $(USEMAK) == 1 @@ -267,7 +269,7 @@ _trydb: !IF "$(INSTDIR)" == "" -INSTDIR=\Apache2x +INSTDIR=\Apache24 !ENDIF !IF "$(DOMAINNAME)" == "" DOMAINNAME=example.com @@ -408,6 +410,7 @@ _build: cd ..\.. cd modules\aaa $(MAKE) $(MAKEOPT) -f mod_access_compat.mak CFG="mod_access_compat - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_allowmethods.mak CFG="mod_allowmethods - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_auth_basic.mak CFG="mod_auth_basic - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_auth_digest.mak CFG="mod_auth_digest - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_auth_form.mak CFG="mod_auth_form - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -417,6 +420,7 @@ _build: $(MAKE) $(MAKEOPT) -f mod_authn_dbm.mak CFG="mod_authn_dbm - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_file.mak CFG="mod_authn_file - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authn_socache.mak CFG="mod_authn_socache - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_authnz_fcgi.mak CFG="mod_authnz_fcgi - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authnz_ldap.mak CFG="mod_authnz_ldap - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authz_core.mak CFG="mod_authz_core - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_authz_dbd.mak CFG="mod_authz_dbd - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -432,6 +436,7 @@ _build: cd modules\cache $(MAKE) $(MAKEOPT) -f mod_cache.mak CFG="mod_cache - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_cache_disk.mak CFG="mod_cache_disk - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_cache_socache.mak CFG="mod_cache_socache - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_file_cache.mak CFG="mod_file_cache - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_socache_dbm.mak CFG="mod_socache_dbm - Win32 $(LONG)" RECURSE=0 $(CTARGET) # $(MAKE) $(MAKEOPT) -f mod_socache_dc.mak CFG="mod_socache_dc - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -439,6 +444,7 @@ _build: $(MAKE) $(MAKEOPT) -f mod_socache_shmcb.mak CFG="mod_socache_shmcb - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\.. cd modules\core + $(MAKE) $(MAKEOPT) -f mod_macro.mak CFG="mod_macro - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_watchdog.mak CFG="mod_watchdog - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\.. cd modules\cluster @@ -476,6 +482,7 @@ _build: cd modules\filters $(MAKE) $(MAKEOPT) -f mod_buffer.mak CFG="mod_buffer - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_charset_lite.mak CFG="mod_charset_lite - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_data.mak CFG="mod_data - Win32 $(LONG)" RECURSE=0 $(CTARGET) !IF EXIST("srclib\zlib") $(MAKE) $(MAKEOPT) -f mod_deflate.mak CFG="mod_deflate - Win32 $(LONG)" RECURSE=0 $(CTARGET) !ENDIF @@ -546,11 +553,10 @@ _build: $(MAKE) $(MAKEOPT) -f mod_proxy_express.mak CFG="mod_proxy_express - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_proxy_fcgi.mak CFG="mod_proxy_fcgi - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_proxy_ftp.mak CFG="mod_proxy_ftp - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_proxy_hcheck.mak CFG="mod_proxy_hcheck - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_proxy_http.mak CFG="mod_proxy_http - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_proxy_scgi.mak CFG="mod_proxy_scgi - Win32 $(LONG)" RECURSE=0 $(CTARGET) -!IF EXIST("srclib\serf") - $(MAKE) $(MAKEOPT) -f mod_serf.mak CFG="mod_serf - Win32 $(LONG)" RECURSE=0 $(CTARGET) -!ENDIF + $(MAKE) $(MAKEOPT) -f mod_proxy_wstunnel.mak CFG="mod_proxy_wstunnel - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\.. cd modules\proxy\balancers $(MAKE) $(MAKEOPT) -f mod_lbmethod_bybusyness.mak CFG="mod_lbmethod_bybusyness - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -558,10 +564,12 @@ _build: $(MAKE) $(MAKEOPT) -f mod_lbmethod_bytraffic.mak CFG="mod_lbmethod_bytraffic - Win32 $(LONG)" RECURSE=0 $(CTARGET) $(MAKE) $(MAKEOPT) -f mod_lbmethod_heartbeat.mak CFG="mod_lbmethod_heartbeat - Win32 $(LONG)" RECURSE=0 $(CTARGET) cd ..\..\.. -!IFDEF ALL - cd modules\proxy\examples - $(MAKE) $(MAKEOPT) -f mod_lbmethod_rr.mak CFG="mod_lbmethod_rr - Win32 $(LONG)" RECURSE=0 $(CTARGET) - cd ..\..\.. +# mod_proxy_http2 must be built after mod_proxy and mod_http2 +!IF EXIST("srclib\nghttp2") + cd modules\http2 + $(MAKE) $(MAKEOPT) -f mod_http2.mak CFG="mod_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET) + $(MAKE) $(MAKEOPT) -f mod_proxy_http2.mak CFG="mod_proxy_http2 - Win32 $(LONG)" RECURSE=0 $(CTARGET) + cd ..\.. !ENDIF cd modules\session $(MAKE) $(MAKEOPT) -f mod_session.mak CFG="mod_session - Win32 $(LONG)" RECURSE=0 $(CTARGET) @@ -692,11 +700,13 @@ _copybin: for %d in ($(DBM_LIST) x) do if not %d == x ( \ copy srclib\$(UTILDIR)\dbm\$(LONG)\apr_dbm_%d-1.$(src_dll) "$(inst_dll)" <.y \ ) -!IF EXIST("srclib\serf") - copy srclib\serf\$(LONG)\libserf.$(src_dll) "$(inst_dll)" <.y -!ENDIF +!IF "$(SHORT)" == "D" + copy srclib\pcre\pcred.$(src_dll) "$(inst_dll)" <.y +!ELSE copy srclib\pcre\pcre.$(src_dll) "$(inst_dll)" <.y +!ENDIF copy modules\aaa\$(LONG)\mod_access_compat.$(src_so) "$(inst_so)" <.y + copy modules\aaa\$(LONG)\mod_allowmethods.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_auth_basic.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_auth_digest.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_auth_form.$(src_so) "$(inst_so)" <.y @@ -706,6 +716,7 @@ _copybin: copy modules\aaa\$(LONG)\mod_authn_dbm.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_file.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authn_socache.$(src_so) "$(inst_so)" <.y + copy modules\aaa\$(LONG)\mod_authnz_fcgi.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authnz_ldap.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authz_core.$(src_so) "$(inst_so)" <.y copy modules\aaa\$(LONG)\mod_authz_dbd.$(src_so) "$(inst_so)" <.y @@ -718,11 +729,13 @@ _copybin: copy modules\arch\win32\$(LONG)\mod_isapi.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_cache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_cache_disk.$(src_so) "$(inst_so)" <.y + copy modules\cache\$(LONG)\mod_cache_socache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_file_cache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_socache_dbm.$(src_so) "$(inst_so)" <.y # copy modules\cache\$(LONG)\mod_socache_dc.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_socache_memcache.$(src_so) "$(inst_so)" <.y copy modules\cache\$(LONG)\mod_socache_shmcb.$(src_so) "$(inst_so)" <.y + copy modules\core\$(LONG)\mod_macro.$(src_so) "$(inst_so)" <.y copy modules\core\$(LONG)\mod_watchdog.$(src_so) "$(inst_so)" <.y copy modules\cluster\$(LONG)\mod_heartbeat.$(src_so) "$(inst_so)" <.y copy modules\cluster\$(LONG)\mod_heartmonitor.$(src_so) "$(inst_so)" <.y @@ -743,6 +756,7 @@ _copybin: !ENDIF copy modules\filters\$(LONG)\mod_buffer.$(src_so) "$(inst_so)" <.y copy modules\filters\$(LONG)\mod_charset_lite.$(src_so) "$(inst_so)" <.y + copy modules\filters\$(LONG)\mod_data.$(src_so) "$(inst_so)" <.y !IF EXIST("srclib\zlib") copy modules\filters\$(LONG)\mod_deflate.$(src_so) "$(inst_so)" <.y !IF EXIST("srclib\zlib\zlib1.$(src_dll)") @@ -771,6 +785,15 @@ _copybin: copy modules\generators\$(LONG)\mod_info.$(src_so) "$(inst_so)" <.y copy modules\generators\$(LONG)\mod_status.$(src_so) "$(inst_so)" <.y copy modules\http\$(LONG)\mod_mime.$(src_so) "$(inst_so)" <.y +!IF EXIST("srclib\nghttp2") + copy modules\http2\$(LONG)\mod_http2.$(src_so) "$(inst_so)" <.y + copy modules\http2\$(LONG)\mod_proxy_http2.$(src_so) "$(inst_so)" <.y +!IF "$(SHORT)" == "D" + copy srclib\nghttp2\lib\MSVC_obj\nghttp2d.$(src_dll) "$(inst_dll)" <.y +!ELSE + copy srclib\nghttp2\lib\MSVC_obj\nghttp2.$(src_dll) "$(inst_dll)" <.y +!ENDIF +!ENDIF copy modules\ldap\$(LONG)\mod_ldap.$(src_so) "$(inst_so)" <.y copy modules\loggers\$(LONG)\mod_log_config.$(src_so) "$(inst_so)" <.y copy modules\loggers\$(LONG)\mod_log_debug.$(src_so) "$(inst_so)" <.y @@ -809,18 +832,14 @@ _copybin: copy modules\proxy\$(LONG)\mod_proxy_express.$(src_so) "$(inst_so)" <.y copy modules\proxy\$(LONG)\mod_proxy_fcgi.$(src_so) "$(inst_so)" <.y copy modules\proxy\$(LONG)\mod_proxy_ftp.$(src_so) "$(inst_so)" <.y + copy modules\proxy\$(LONG)\mod_proxy_hcheck.$(src_so) "$(inst_so)" <.y copy modules\proxy\$(LONG)\mod_proxy_http.$(src_so) "$(inst_so)" <.y copy modules\proxy\$(LONG)\mod_proxy_scgi.$(src_so) "$(inst_so)" <.y -!IF EXIST("srclib\serf") - copy modules\proxy\$(LONG)\mod_serf.$(src_so) "$(inst_so)" <.y -!ENDIF + copy modules\proxy\$(LONG)\mod_proxy_wstunnel.$(src_so) "$(inst_so)" <.y copy modules\proxy\balancers\$(LONG)\mod_lbmethod_bybusyness.$(src_so) "$(inst_so)" <.y copy modules\proxy\balancers\$(LONG)\mod_lbmethod_byrequests.$(src_so) "$(inst_so)" <.y copy modules\proxy\balancers\$(LONG)\mod_lbmethod_bytraffic.$(src_so) "$(inst_so)" <.y copy modules\proxy\balancers\$(LONG)\mod_lbmethod_heartbeat.$(src_so) "$(inst_so)" <.y -!IFDEF ALL - copy modules\proxy\examples\$(LONG)\mod_lbmethod_rr.$(src_so) "$(inst_so)" <.y -!ENDIF copy modules\session\$(LONG)\mod_session.$(src_so) "$(inst_so)" <.y copy modules\session\$(LONG)\mod_session_cookie.$(src_so) "$(inst_so)" <.y copy modules\session\$(LONG)\mod_session_dbd.$(src_so) "$(inst_so)" <.y @@ -921,10 +940,10 @@ BEGIN { << copy << "$(INSTDIR)\OPENSSL-NEWS.txt" <.y - Apache HTTP Server 2.3 Limited OpenSSL Distribution + Apache HTTP Server 2.4 Limited OpenSSL Distribution This binary distribution includes the minimal components of OpenSSL required - to support mod_ssl for Apache HTTP Server version 2.3 (details are listed + to support mod_ssl for Apache HTTP Server version 2.4 (details are listed in OPENSSL-README.txt.) For the complete list of CHANGES to this and later versions of OpenSSL, please refer to the definative source, , or see the CHANGES file in the @@ -940,7 +959,7 @@ BEGIN { + srclib\openssl\NEWS "$(INSTDIR)\OPENSSL-NEWS.txt" copy << "$(INSTDIR)\OPENSSL-README.txt" <.y - Apache HTTP Server 2.3 Limited OpenSSL Distribution + Apache HTTP Server 2.4 Limited OpenSSL Distribution This binary installation of OpenSSL is a limited distribution of the files derived from the OpenSSL project: @@ -954,7 +973,7 @@ BEGIN { bin\openssl.exe These are the minimal libraries and tools required to use mod_ssl as - distributed with Apache HTTP Server version 2.3. No library link files, + distributed with Apache HTTP Server version 2.4. No library link files, headers or sources are distributed with this binary distribution. Please refer to the site for complete source or binary distributions. @@ -1018,6 +1037,46 @@ BEGIN { exit 0; } << +!ENDIF +!IF EXIST("srclib\libxml2") + type << >> "$(INSTDIR)\NOTICE.txt" + +This binary distributions of mod_proxy_html.so and mod_xml2enc.so include the +libxml2 C library written by Daniel Veillard (daniel veillard.com), Bjorn +Reese (breese users.sourceforge.net) and Gary Pennington (Gary.Pennington +uk.sun.com). For complete information, visit LibXML2's web site at +https://http://www.xmlsoft.org/ +<< + -awk -f <> "$(INSTDIR)\LICENSE.txt" +BEGIN { + print ""; + print "For the mod_proxy_html and mod_xml2enc components:"; + print ""; + while ( getline > 0 ) { + print $$0; + } + exit 0; +} +<< +!ENDIF +!IF EXIST("srclib\nghttp2") + type << >> "$(INSTDIR)\NOTICE.txt" + +This binary distribution of mod_http2.so includes nghttp2 C library written +by Tatsuhiro Tsujikawa. For complete information, visit nghttp2's web site +at https://nghttp2.org/ +<< + -awk -f <> "$(INSTDIR)\LICENSE.txt" +BEGIN { + print ""; + print "For the mod_http2 component:"; + print ""; + while ( getline > 0 ) { + print $$0; + } + exit 0; +} +<< !ENDIF $(MAKE) $(MAKEOPT) -f Makefile.win SHORT=$(SHORT) LONG=$(LONG) \ _copybin src_exe=exe src_dll=dll src_so=so \ @@ -1059,12 +1118,10 @@ BEGIN { srclib\apr-util\xml\expat\lib\expat.h \ srclib\apr\include\*.h \ srclib\apr-util\include\*.h \ -!IF EXIST("srclib\serf") - srclib\serf\*.h \ -!ENDIF include\*.h \ os\win32\os.h \ modules\cache\mod_cache.h \ + modules\cache\cache_common.h \ modules\core\mod_so.h \ modules\core\mod_watchdog.h \ modules\database\mod_dbd.h \ @@ -1075,8 +1132,8 @@ BEGIN { modules\loggers\mod_log_config.h \ modules\mappers\mod_rewrite.h \ modules\proxy\mod_proxy.h \ - modules\proxy\mod_serf.h \ modules\ssl\mod_ssl.h \ + modules\ssl\mod_ssl_openssl.h \ ) do \ @copy %f "$(INSTDIR)\include" < .y > nul copy srclib\apr\Lib$(SHORT)\apr-1.lib "$(INSTDIR)\lib" <.y @@ -1098,10 +1155,6 @@ BEGIN { copy srclib\expat\win32\$(LONG)\libexpat.lib "$(INSTDIR)\lib" <.y copy srclib\expat\win32\$(LONG)\libexpat.exp "$(INSTDIR)\lib" <.y copy srclib\expat\win32\$(LONG)\libexpat.dll "$(INSTDIR)\bin" <.y -!ENDIF -!IF EXIST("srclib\serf") - copy srclib\serf\$(LONG)\libserf.lib "$(INSTDIR)\lib" <.y - copy srclib\serf\$(LONG)\libserf.exp "$(INSTDIR)\lib" <.y !ENDIF copy $(LONG)\libhttpd.exp "$(INSTDIR)\lib" <.y copy $(LONG)\libhttpd.lib "$(INSTDIR)\lib" <.y diff --git a/NOTICE b/NOTICE index b5c6cfb86b0..3e80c98a83b 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache HTTP Server -Copyright 2009 The Apache Software Foundation. +Copyright 2016 The Apache Software Foundation. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/NWGNUmakefile b/NWGNUmakefile index f120e85b1c9..904430d2c45 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -273,6 +273,7 @@ FILES_nlm_objs = \ $(OBJDIR)/util_expr_eval.o \ $(OBJDIR)/util_expr_parse.o \ $(OBJDIR)/util_expr_scan.o \ + $(OBJDIR)/util_fcgi.o \ $(OBJDIR)/util_filter.o \ $(OBJDIR)/util_md5.o \ $(OBJDIR)/util_mutex.o \ @@ -360,17 +361,20 @@ FILES_lib_objs = \ else FILES_lib_objs = \ + $(OBJDIR)/chartables.o \ $(OBJDIR)/pcre_compile.o \ $(OBJDIR)/pcre_exec.o \ $(OBJDIR)/pcre_fullinfo.o \ $(OBJDIR)/pcre_globals.o \ - $(OBJDIR)/pcre_info.o \ $(OBJDIR)/pcre_newline.o \ $(OBJDIR)/pcre_tables.o \ - $(OBJDIR)/pcre_try_flipped.o \ $(OBJDIR)/pcre_version.o \ - $(OBJDIR)/chartables.o \ $(EOLIST) +ifeq "$(wildcard $(PCRE)/pcre_try_flipped.c)" "$(PCRE)/pcre_try_flipped.c" +FILES_lib_objs += \ + $(OBJDIR)/pcre_try_flipped.o \ + $(EOLIST) +endif endif @@ -386,7 +390,7 @@ nlms :: libs $(TARGET_nlm) # Updated this target to create necessary directories and copy files to the # correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples) # -MKCNF = $(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_MOD_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build/mkconfNW.awk $1 > $2 +MKCNF = $(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build/mkconfNW.awk $1 > $2 install :: nlms instscripts FORCE $(call COPY,$(OBJDIR)/$(NLM_NAME).nlm, $(INSTALLBASE)/) @@ -416,6 +420,7 @@ install :: nlms instscripts FORCE $(call MKCNF,docs/conf/extra/httpd-userdir.conf.in, $(INSTALLBASE)/conf/extra/httpd-userdir.conf) $(call MKCNF,docs/conf/extra/httpd-vhosts.conf.in, $(INSTALLBASE)/conf/extra/httpd-vhosts.conf) $(call MKCNF,docs/conf/extra/httpd-ssl.conf.in, $(INSTALLBASE)/conf/extra/httpd-ssl.conf) + $(call MKCNF,docs/conf/extra/proxy-html.conf.in, $(INSTALLBASE)/conf/extra/proxy-html.conf) $(call COPYR,docs/docroot, $(INSTALLBASE)/htdocs) $(call COPYR,docs/error, $(INSTALLBASE)/error) $(call COPYR,docs/icons, $(INSTALLBASE)/icons) @@ -430,6 +435,7 @@ installdev :: FORCE $(call COPY,$(STDMOD)/core/mod_so.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/core/mod_watchdog.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/cache/mod_cache.h, $(INSTALLBASE)/include/) + $(call COPY,$(STDMOD)/cache/cache_common.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/database/mod_dbd.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/dav/main/mod_dav.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/filters/mod_include.h, $(INSTALLBASE)/include/) @@ -438,9 +444,9 @@ installdev :: FORCE $(call COPY,$(STDMOD)/loggers/mod_log_config.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/mappers/mod_rewrite.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/proxy/mod_proxy.h, $(INSTALLBASE)/include/) - $(call COPY,$(STDMOD)/proxy/mod_serf.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/session/mod_session.h, $(INSTALLBASE)/include/) $(call COPY,$(STDMOD)/ssl/mod_ssl.h, $(INSTALLBASE)/include/) + $(call COPY,$(STDMOD)/ssl/mod_ssl_openssl.h, $(INSTALLBASE)/include/) $(call COPY,$(APR)/*.imp, $(INSTALLBASE)/lib/) $(call COPY,$(NWOS)/*.imp, $(INSTALLBASE)/lib/) $(call COPY,$(NWOS)/*.xdc, $(INSTALLBASE)/lib/) diff --git a/README b/README index 7f90fb1987f..603374420f0 100644 --- a/README +++ b/README @@ -24,7 +24,7 @@ The documentation available as of the date of this release is included in HTML format in the docs/manual/ directory. The most up-to-date documentation can be found at - http://httpd.apache.org/docs/trunk/. + http://httpd.apache.org/docs/2.4/. Installation ------------ @@ -70,11 +70,14 @@ SSL facilities. In addition, some versions of apr-util provide an abstract interface - for SSL encrypted network sockets in the files under the directory - srclib/apr-util/ssl/ - that makes use of a general-purpose encryption library, such as - OpenSSL or the operating system's platform-specific SSL facilities. - Apache httpd currently does not use that apr-util interface. + for symmetrical cryptographic functions that make use of a + general-purpose encryption library, such as OpenSSL, NSS, or the + operating system's platform-specific facilities. This interface is + known as the apr_crypto interface, with implementation beneath the + /crypto directory. The apr_crypto interface is used by the + mod_session_crypto module available under + modules/session + for optional encryption of session information. Some object code distributions of Apache httpd, indicated with the word "crypto" in the package name, may include object code for the @@ -95,22 +98,11 @@ subscribe to the apache-announce mailing list as described under - o If you want freely available support for running Apache please join the - Apache user community by subscribing to Users Mailing List at - or one of the following - USENET newsgroups: - comp.infosystems.www.servers.unix - comp.infosystems.www.servers.ms-windows - Also available at: - - - o If you want commercial support for running Apache please contact - one of the companies and contractors which are listed at - - - o If you have a concrete bug report for Apache please go to the - Apache Group Bug Database and submit your report: - + o If you want freely available support for running Apache please see the + resources at + + o If you have a concrete bug report for Apache please see the instructions + for bug reporting at o If you want to participate in actively developing Apache please subscribe to the `dev@httpd.apache.org' mailing list as described at diff --git a/README.cmake b/README.cmake new file mode 100644 index 00000000000..60fcc422da5 --- /dev/null +++ b/README.cmake @@ -0,0 +1,329 @@ +Experimental cmake-based build support for Apache httpd on Microsoft Windows + +Status +------ + +This build support is currently intended only for Microsoft Windows. + +This build support is experimental. Specifically, + +* It does not support all features of Apache httpd. +* Some components may not be built correctly and/or in a manner + compatible with the previous Windows build support. +* Build interfaces, such as the mechanisms which are used to enable + optional functionality or specify prerequisites, may change from + release to release as feedback is received from users and bugs and + limitations are resolved. + +Important: Refer to the "Known Bugs and Limitations" section for further + information. + + It is beyond the scope of this document to document or explain + how to utilize the various cmake features, such as different + build backends or provisions for finding support libraries. + + Please refer to the cmake documentation for additional information + that applies to building any project with cmake. + +Prerequisites +------------- + +The following tools must be in PATH: + +* cmake, version 2.8 or later + cmake version 3.1.3 or later is required to work with current OpenSSL + releases. (OpenSSL is an optional prerequisite of httpd.) +* Perl +* If the WITH_MODULES feature is used: awk +* If using a command-line compiler: compiler and linker and related tools + (Refer to the cmake documentation for more information.) + +The following support libraries are mandatory: + +* APR, built with cmake + + Either APR 2.0-dev (trunk) or APR 1.5.x and APR-Util 1.5.x. + + When building APR (but not APR-Util), specify the build option + APR_INSTALL_PRIVATE_H so that non-standard files required for building + Apache httpd are installed. + + Additional APR settings affect httpd but are not mandatory, such as + APR_HAVE_IPV6. +* PCRE + +Certain optional features of APR 2.0-dev (trunk) or APR-Util 1.5.x +allow some optional features of httpd to be enabled. For example, +APU_HAVE_CRYPTO is required for mod_session_crypto. + +Additional support libraries allow some optional features of httpd to be +enabled: + +* libxml2 (e.g., mod_proxy_html) +* lua 5.1 (mod_lua) +* nghttp2 (mod_http2) +* openssl (mod_ssl and https support for ab) +* zlib (mod_deflate) + +OpenSSL +------- + +If you have a binary install of OpenSSL in a well-known directory (e.g., +%HOME%\OpenSSL-Win64) and you wish to build httpd against a different +install of OpenSSL, the cmake build may unexpectedly select OpenSSL +libraries in the well-known directory even if the expected include files +are used. Check the cmake output from your httpd build to confirm that +the expected OpenSSL libraries and include files are used. + +The cmake FindOpenSSL module searches for OpenSSL libraries in a "VC" +subdirectory of the OpenSSL install with filenames that indicate the build +type (e.g., "/lib/VC/ssleay32MD.lib"); defining CMAKE_PREFIX_PATH +or OPENSSL_ROOT_DIR or even OPENSSL_LIBRARIES does not circumvent finding +these libraries. + +To work around this issue, rename the well-known OpenSSL directory while +building httpd. Let us know if you find a better solution. + +nghttp2 +------- + +This is required for mod_http2. + +cmake-based build support for nghttp2 for Windows can be found at +https://github.com/trawick/nghttp2-minimal-cmake. That easily fits into +a build system that already uses cmake for httpd, apr, and perhaps other +packages. A dynamic build of nghttp2 using its normal Windows build +system should also be usable by nghttp2. + +How to build +------------ + +1. cd to a clean directory for building (i.e., don't build in your + source tree) + +2. Make sure cmake and Perl are in PATH. Additionally, some backends + require compile tools in PATH. (Hint: "Visual Studio Command Prompt") + In the unlikely event that you use -DWITH_MODULES, described below, make + sure awk is in PATH. + +3. cmake -G "some backend, like 'NMake Makefiles'" + -DCMAKE_INSTALL_PREFIX=d:/path/to/httpdinst + -DENABLE_foo=A|I|O|a|i + -DENABLE_MODULES=A|I|O|a|i + d:/path/to/httpdsource + + Alternately, you can use the cmake-gui and update settings in the GUI. + + PCRE_INCLUDE_DIR, PCRE_LIBRARIES, APR_INCLUDE_DIR, APR_LIBRARIES, + NGHTTP2_INCLUDE_DIR, NGHTTP2_LIBRARIES: + + cmake doesn't bundle FindXXX for these packages, so the crucial + information has to be specified in this manner if they aren't found + in their default location. + + -DPCRE_INCLUDE_DIR=d:/path/to/pcreinst/include + -DPCRE_LIBRARIES=d:/path/to/pcreinst/lib/pcre[d].lib + + These will have to be specified only if PCRE is installed to a different + directory than httpd, or if debug *and* release builds of PCRE were + installed there and you want to control which is used. (Currently the + build will use pcred.lib (debug) if it is found in the default location + and not overridden with -DPCRE_LIBRARIES.) + + -DAPR_INCLUDE_DIR=d:/path/to/aprinst/include + -DAPR_LIBRARIES="d:/path/to/aprinst/lib/libapr-1.lib;d:/path/to/aprinst/lib/libaprutil-1.lib" + + These will have to be specified if APR[-Util] was installed to a + different directory than httpd. + + When building with APR trunk (future APR 2.x, with integrated APR-Util), + specify just the path to libapr-2.lib: + + -DAPR_LIBRARIES=d:/path/to/aprinst/lib/libapr-2.lib + + APR+APR-Util 1.x vs. APR trunk will be detected automatically if they + are installed to the same location as httpd. + + APR-Util 1.x has an optional LDAP library. If APR-Util has LDAP enabled + and httpd's mod_ldap and mod_authnz_ldap are being used, include the + path to the LDAP library in the APR_LIBRARIES setting. (If APR and + APR-Util are found in the default location, the LDAP library will be + included if it is present. + + -DNGHTTP2_INCLUDE_DIR=d:/path/to/nghttp2inst/include (which has nghttp2/*.h) + -DNGHTTP2_LIBRARIES=d:/path/to/nghttp2inst/lib/nghttp2.lib" + + These will have to be specified if nghttp2 was installed to a different + directory than httpd. + + LIBXML2_ICONV_INCLUDE_DIR, LIBXML2_ICONV_LIBRARIES + + If using a module that requires libxml2 *and* the build of libxml2 requires + iconv, set these variables to allow iconv includes and libraries to be + used. For example: + + -DLIBXML2_ICONV_INCLUDE_DIR=c:\iconv-1.9.2.win32\include + -DLIBXML2_ICONV_LIBRARIES=c:\iconv-1.9.2.win32\lib\iconv.lib + + CMAKE_C_FLAGS_RELEASE, _DEBUG, _RELWITHDEBINFO, _MINSIZEREL + CMAKE_BUILD_TYPE + + For NMake Makefiles the choices are at least DEBUG, RELEASE, + RELWITHDEBINFO, and MINSIZEREL + Other backends may have other selections. + + ENABLE_foo: + + Each module has a default setting which can be overridden with one of + the following values: + A build and Activate module + a build and Activate module IFF prereqs are available; if + prereqs are unavailable, don't build it + I build module but leave it Inactive (commented-out + LoadModule directive) + i build module but leave it Inactive IFF prereqs are + available; if prereqs are unavailable, don't build it + O Omit module completely + + Examples: -DENABLE_ACCESS_COMPAT=O + -DENABLE_PROXY_HTML=i + + ENABLE_MODULES: + + This changes the *minimum* enablement of all modules to the specified + value (one of A, a, I, i, O, as described under ENABLE_foo above). + + The ranking of enablement from lowest to highest is O, i, I, a, A. + If a specific module has a higher rank enablement setting, either from + a built-in default or from -DENABLE_foo, ENABLE_MODULES won't affect + that module. However, if a specific module has a lower-rank enablement + setting, presumably from a built-in default, the value of ENABLE_MODULES + will be used for that module. + + Explanations for possible values: + + -DENABLE_MODULES=a build and activate all possible modules, + ignoring any with missing prereqs + (doesn't affect modules with A for ENABLE_foo) + + -DENABLE_MODULES=i build but leave inactive all possible + modules, ignoring any with missing + prereqs + (doesn't affect modules with A, a, or I for + ENABLE_foo) + + -DENABLE_MODULES=O no impact, since all modules are either + already disabled or have a higher setting + + -DENABLE_MODULES=A build and activate all possible modules, + failing the build if any module is missing + a prereq + + -DENABLE_MODULES=I similar to -DENABLE_MODULES=A + (doesn't affect modules with A or a for + ENABLE_foo) + + WITH_MODULES: + + Comma-separated paths to single file modules to statically linked into + the server, like the --with-module=modpath:/path/to/mod_foo.c with + the autoconf-based build. Key differences: The modpath (e.g., + "generators") isn't provided or used, and the copy of the module + source being built is automatically updated when it changes. + See also EXTRA_COMPILE_FLAGS, EXTRA_INCLUDES, and EXTRA_LIBS. + + EXTRA_COMPILE_FLAGS: + + Space-delimited compile flags to define with the build. + + EXTRA_INCLUDES: + + List of additional directories to search for .h files. This may + be necessary when including third-party modules in the httpd build + via WITH_MODULES. + + EXTRA_LIBS: + + List of additional libraries to link with. This may be necessary when + including third-party modules in the httpd build via WITH_MODULES. + + Port and SSLPort: + + Port numbers for substitution into default .conf files. (The defaults + are 80 and 443.) + + INSTALL_PDB: + + If .pdb files are generated for debugging, install them. + Default: ON + + The .pdb files are generally needed for debugging low-level code + problems. If they aren't installed, they are still available in the + build directory for use by alternate packaging implementations or when + debugging on the build machine. + + INSTALL_MANUAL: + + Install the Apache HTTP Server manual. + Default: ON + + This could be turned off when developing changes in order to speed up + installation time. + +4. Build using the chosen generator (e.g., "nmake install" for cmake's "NMake + Makefiles" generator). + +Running the server and support programs +--------------------------------------- + +This build system does not copy binaries such as dlls from other projects +into the httpd install location. Without taking some precautions, httpd +and support programs can fail to start or modules can fail to load because +a support library can't be found in PATH or in the directory of the httpd +binary. + +This can be resolved in several different ways: + +* Install httpd and the various support libraries to a common install + prefix so that support libraries and httpd programs are installed in + the same bin directory and are found without setting PATH. + +* Update PATH to include the bin directories of all necessary support + libraries. + + Depending on where PATH is set, it may not affect starting httpd as + a service. + +* Maintain a script which combines required binaries into a common + location, such as the httpd installion bin directory, and use that + script after building or otherwise installing or updating support + libraries. + +* AVOID THE USE of any unrepeatable process of copying dll files around + from different install locations until something starts working. The + result is that when you later update a support library to pick up a + security fix, httpd will likely continue to use the old, vulnerable + library file. + +Known Bugs and Limitations +-------------------------- + +* no standard script or makefile is provided to tie together the builds + of httpd and support libraries in a manner suitable for typical users +* no logic to find support libraries or otherwise build these modules: + + mod_socache_dc (requires distcache), mod_serf (requires serf) + + additionally, mod_firehose doesn't compile on Windows anyway +* buildmark.c isn't necessarily rebuilt when httpd.exe is regenerated +* ApacheMonitor has a build error and is disabled +* CGI examples aren't installed +* dbmmanage.pl and wintty aren't built/installed +* module enablement defaults are not in sync with the autoconf-based build +* no support for static support library builds; unclear if that is a + requirement; if so: taking PCRE as an example, we'd need to detect that it + is static and then turn on PCRE_STATIC for the libhttpd build + +Generally: + +* Many httpd features have not been tested with this build. +* Developers need to examine the existing Windows build in great detail and see + what is missing from the cmake-based build, whether a feature or some build + nuance. +* Any feedback you can provide on your experiences with this build will be + helpful. diff --git a/README.platforms b/README.platforms index 061a4e32c4f..a377079ff14 100644 --- a/README.platforms +++ b/README.platforms @@ -18,28 +18,9 @@ well as the fact that the bundled versions are up-to-date: autoconf 2.52 and (g)libtool 1.4.2. - Earlier versions of OS X are not so fortunate, and the bundled tools - are not only older versions, but also, for the most part, do not work - well. If you are interested in developing under Darwin, we - recommend that you obtain and install replacement versions of what - are normally installed on Darwin (and OS X, as of v10.1.5). If - you build your own versions of autoconf 2.52 and libtool 1.4.2, be - aware that there are some Darwin specific patches to the official - code that still must be applied for them to fully work. A useful - page to check out is: - - http://fink.sourceforge.net/doc/porting/libtool.php - - Pier Fumagalli also provides pre-built Darwin packages of the - patched autoconf and libtool suites, available at: - - http://www.apache.org/~pier/macosx/ - You will note that GNU libtool should actually be installed as glibtool, to avoid conflict with a Darwin program of the same - name. Pier's packages have this change already. All files are - installed under /usr/local/ so to use these versions, and be sure - that /usr/local/bin is earlier in your PATH. + name. There have been some reports that autoconf 2.52 prevents Apache's build system from correctly handling passing multi-value envvars @@ -56,11 +37,9 @@ This is a known issue and will be fixed in a later version of the autoconf suite. These errors can be safely ignored. - With Darwin 10, the default C compiler (gcc) will try to build - multi-architecture bundles. This causes problems with APR, which - needs to know various data-type sizes which it assumes are universal - for platforms. Until this is fully fixed, we recommend using the - '-arch i386' gcc option when building both Apache and APR. + For later versions of OS X, (10.8 and 10.9), be sure to have Xcode + AND Xcode Command Line Tools installed. httpd will built both with + gcc and clang. ========== FreeBSD: diff --git a/STATUS b/STATUS index 739410f045d..2cf13fa5a2c 100644 --- a/STATUS +++ b/STATUS @@ -1,24 +1,32 @@ -APACHE 2.3 STATUS: -*-text-*- +APACHE 2.4 STATUS: -*- mode: text; coding: utf-8 -*- Last modified at [$Date$] The current version of this file can be found at: - * http://svn.apache.org/repos/asf/httpd/httpd/trunk/STATUS + * http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x/STATUS -Documentation status is maintained seperately and can be found at: +Documentation status is maintained separately and can be found at: * docs/STATUS in this source tree, or - * http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/STATUS + * http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x/docs/STATUS + +The current development branch of this software can be found at: + + * http://svn.apache.org/repos/asf/httpd/httpd/trunk Consult the following STATUS files for information on related projects: * http://svn.apache.org/repos/asf/apr/apr/trunk/STATUS - * http://svn.apache.org/repos/asf/apr/apr-util/trunk/STATUS + * http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x/STATUS + * http://svn.apache.org/repos/asf/apr/apr-util/branches/1.4.x/STATUS + * http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x/STATUS + * http://svn.apache.org/repos/asf/apr/apr-util/branches/1.5.x/STATUS Patches considered for backport are noted in their branches' STATUS: * http://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x/STATUS * http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x/STATUS + * http://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x/STATUS @@ -26,8 +34,35 @@ Release history: [NOTE that x.{odd}.z versions are strictly Alpha/Beta releases, while x.{even}.z versions are Stable/GA releases.] - 2.3.16 : In Development. - 2.3.15 : Tagged on November 8, 2011. + 2.4.26 : In development. + 2.4.25 : Tagged on December 16, 2016. Released on December 21, 2016. + 2.4.24 : Tagged on December 16, 2016, not released. + 2.4.23 : Tagged on June 30, 2016. Released on July 05, 2016. + 2.4.22 : Tagged on June 20, 2016, not released. + 2.4.21 : Tagged on June 16, 2016, not released. + 2.4.20 : Tagged on April 4, 2016. Released on April 11, 2016. + 2.4.19 : Tagged on March 21, 2016, not released. + 2.4.18 : Tagged on December 8, 2015. Released on December 14, 2015. + 2.4.17 : Tagged on October 9, 2015. Released October 13, 2015. + 2.4.16 : Tagged on July 9, 2015. Released July 15, 2015 + 2.4.15 : Tagged on June 19, 2015. Not released. + 2.4.14 : Tagged on June 11, 2015. Not released. + 2.4.13 : Tagged on June 4, 2015. Not released. + 2.4.12 : Tagged on January 22, 2015. Released Jan 29, 2015 + 2.4.11 : Tagged on January 15, 2015. Not released. + 2.4.10 : Tagged on July 15, 2014. Released July 21, 2014 + 2.4.9 : Tagged on March 13, 2014. Released on March 17, 2014 + 2.4.8 : Tagged on March 11, 2014. Not released. + 2.4.7 : Tagged on November 19, 2013. Released on Nov 25, 2013 + 2.4.6 : Tagged on July 15, 2013. Released July, 22, 2013 + 2.4.5 : Tagged on July 11, 2013, not released. + 2.4.4 : Tagged on February 18, 2013. Released Feb 25, 2013 + 2.4.3 : Tagged on August 17, 2012. Released Aug 18, 2012 + 2.4.2 : Tagged on April 5, 2012. Released Apr 17, 2012. + 2.4.1 : Tagged on February 13, 2012. Released Feb 21, 2012. + 2.4.0 : Tagged on January 16, 2012, not released. + 2.3.16 : Tagged on December 15, 2011. + 2.3.15 : Tagged on November 8, 2011. Released Nov. 15, 2011. 2.3.14 : Tagged on August 1, 2011. Released Aug. 9, 2011. 2.3.13 : Tagged on June 28, 2011, not released. 2.3.12 : Tagged on May 11, 2011. Released May 23, 2011. @@ -63,403 +98,310 @@ Contributors looking for a mission: CURRENT RELEASE NOTES: + * Forward binary compatibility is expected of Apache 2.4.x releases, such + that no MMN major number changes will occur after 2.4.1. Such changes can + only be made in the trunk. -GA PLAN: + * All commits to branches/2.4.x must be reflected in SVN trunk, + as well, if they apply. Logical progression is commit to trunk + then merge into branches/2.4.x, as applicable. - Jim proposes final beta release the mid/end of Sept, with a - GA in October (at the latest). Jim volunteers to RM these. + * Current exceptions for RTC for this branch: + . http/2 - mod_http2 + . mod_lua + . documentation + . non-Unix build + . non-Unix, single-platform code RELEASE SHOWSTOPPERS: - FOR GA: - - * Modules that are not ready for production use must be removed. - The same for modules without documentation. - - These modulese will be removed after branching 2.4.x from trunk. - If anyone disagrees, please comment. - - - MPM simple (unfinished; buggy) - - mod_serf (which is optimal for async httpd anyways; didn't work - with MPM event last time sf tested it) - - mod_noloris (in experimental; obsoleted by mod_reqtimeout) - - See https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/STATUS - under 'modules docs' for a more comprehensive list of undocumented modules. - - * The mod_session* modules need to be checked that their hooks respect - the returning of int (HTTP status codes) and apr_status_t as appropriate, - and any anomolies fixed. - jim sez: from what I can see, mod_session* is no worse that other - modules that mix these 2 types... clean up is - forthcoming but should not be considered a blocker, imo - pgollucci: +1 jim - wrowe asks: what's the API change required? - wrowe asks; why are we shipping this if it requires apr_ssl - - * mod_ssl's proxy support only allows one proxy client certificate per - frontend virtual host. Lift this restriction. - jim sez: Why a blocker?, pgollucci +1 jim - wrowe asks: what's the API change required? - - * INCLUDE mod_fcgid with 2.4.0, esp to help php users etc to enjoy - a painless event mpm experience. - sf: can be done in 2.4.x>0 - - * Decide and document the API guarantees for mod_lua. Current consensous at - the hackathon seems to be that mod_lua should be released as experimental - with a note that the API may change during 2.4.x. - - * mpm_event can abort under very high load with - (17)File exists: process_socket: apr_pollset_add failure - file event.c, line 952, assertion "rc == 0" failed - child pid 18196 exit signal Aborted (6) - - FOR BETA: - - - OLD ISSUES THAT WERE THOUGHT TO BE SHOWSTOPPERS FOR 2.2 BUT OBVIOUSLY WEREN'T: - - * Handling of non-trailing / config by non-default handler is broken - http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=105451701628081&w=2 - jerenkrantz asks: Why should this block a release? - wsanchez agrees: this may be a change in behavior, but isn't - clearly wrong, and even if so, it doesn't seem like a - showstopper. - - * the edge connection filter cannot be removed - http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=105366252619530&w=2 - - jerenkrantz asks: Why should this block a release? - - stas replies: because it requires a rewrite of the filters stack - implementation (you have suggested that) and once 2.2 is - released you can't do that anymore. - - pgollucci: this affects mod_perl I'm pretty sure. - -CURRENT VOTES: - - * Name the Server (version 2.4 or 3.0, depending on the final call) - Recent discussion indicates we should designate a (short name). - This is not yet a [Vote] - Your nominations please: - * Apache HTTP Server (httpd) - +1: sctemme (why mess with it?), pgollucci - -RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP: - - * Clean up all the kruft and *extremely* outdated stuff below... - - * Maybe remove Limit/LimitExcept or at least make it log warnings when - mis-used. - - * Patches submitted to the bug database: - http://issues.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=Apache+httpd-2&keywords=PatchAvailable - - * Filter stacks and subrequests, redirects and fast redirects. - There's at least one PR that suffers from the current unclean behaviour - (which lets the server send garbage): PR 17629 - nd says: Every subrequest should get its own filter stack with the - subreq_core filter as bottom-most. That filter does two things: - - swallow EOS buckets - - redirect the data stream to the upper request's (rr->main) - filter chain directly after the subrequest's starting - point. - Once we have a clean solution, we can try to optimize - it, so that the server won't be slow down too much. - - * RFC 2616 violations. - Closed PRs: 15852, 15857, 15859, 15861, 15864, 15869, 15870, 16120, - 16125, 16135, 16136, 16137, 16138, 16139, 16140, 16518, - 16520, 49825 - Open PRs: 15865, 15866, 15868, 16126, 16133, 16142, 16521, 42978 - jerenkrantz says: need to decide how many we need to backport and/or - if these rise to showstopper status. - wrowe suggests: it would be nice to see "MUST" v.s. "SHOULD" v.s. "MAY" - out of this list, without reviewing them individually. - - * pipes deadlock on all platforms with limited pipe buffers (e.g. both - Linux and Win32, as opposed to only Win32 on 1.3). The right solution - is either GStein's proposal for a "CGI Brigade", or OtherBill's proposal - for "Poll Buckets" for "Polling Filter Chains". Or maybe both :-) - - * All handlers should always send content down even if r->header_only - is set. If not, it means that the HEAD requests don't generate the - same headers as a GET which is wrong. - - * exec cmd and suexec arg-passing enhancements - Status: Patches proposed - Message-ID: <20020526041748.A29148@prodigy.Redbrick.DCU.IE> - (see the "proc.patch" and "suexec-shell.patch" links in this message) - - * The 2.0.36 worker MPM graceless shutdown changes work but are - a bit clunky on some platforms; eg, on Linux, the loop to - join each worker thread seems to hang, and the parent ends up - killing off the child with SIGKILL. But at least it shuts down. - - chrisd: Has this been fixed by the changes for PR 38737? - - * We do not properly substitute the prefix-variables in the configuration - scripts or generated-configs. (i.e. if sysconfdir is etc, - httpd-std.conf points to conf.) - - * If any request gets through ap_process_request_internal() and is - scheduled to be served by the core handler, without a flag that this - r->filename was tested by dir/file_walk, we need to 500 at the very - end of the ap_process_request_internal() processing so sub_req-esters - know this request cannot be run. This provides authors of older - modules better compatibility, while still improving the security and - robustness of 2.0. - - Status: still need to decide where this goes, OtherBill comments... - Message-ID: <065701c14526$495203b0$96c0b0d0@roweclan.net> - [Deleted comments regarding the ap_run_handler phase, as irrelevant - as BillS points out that "common case will be caught in - default_handler already (with the r->finfo.filetype == 0 check)" - and the issue is detecting this -before- we try to run the req.] - - gregames says: can this happen somehow without a broken module - being involved? If not, why waste cycles trying to defend against - potential broken modules? It seems futile. - wrowe counters: no, it shouldn't happen unless the module is broken. - But the right answer is to fail the request up-front in dir/file - walk if the path was entirely invalid; and we can't do that either - UNTIL 2.1 or we break modules that haven't hooked map_to_storage. - - * Can a static httpd be built reliably? - Message-ID: <20020207142751.T31582@clove.org> - - * Usage of APR_BRIGADE_NORMALIZE in core_input_filter should be - removed if possible. - Message-ID: - - Jeff wonders if we still care about this. It is no longer an - API issue but simply an extra trip through the brigade. - - * Try to get libtool inter-library dependency code working on AIX. - Message-ID: - - Justin says: If we get it working on AIX, we can enable this - on all platforms and clean up our build system somewhat. - Jeff says: I thought I tested a patch for you sometime in - January that you were going to commit within a few days. - - * Handling of %2f in URIs. Currently both 1.3 and 2.0 - completely disallow %2f in the request URI path (see - ap_unescape_url() in util.c). It's permitted and passed - through in the query string, however. Roy says the - original reason for disallowing it, from five years ago, - was to protect CGI scripts that applied PATH_INFO to - a filesystem location and which might be tricked by - ..%2f..%2f(...). We *should* allow path-info of the - form 'http://foo.com/index.cgi/path/to/path%2finfo'. - Since we've revamped a lot of our processing of path - segments, it would be nice to allow this, or at least - allow it conditionally with a directive. - - OtherBill adds that %2f as the SECOND character of a multibyte - sequence causes the request to fail! This happens notably in - the ja-jis encoding. - - * There is increasing demand from module writers for an API - that will allow them to control the server à la apachectl. - Reasons include sole-function servers that need to die if - an external dependency (e.g., a database) fails, et cetera. - Perhaps something in the (ever more abused) scoreboard? - - On the other hand, we already have a pipe that goes between parent - and child for graceful shutdown events, along with an API that - can be used to send a message down that pipe. In threaded MPMs, - it is easy enough to make that one pipe be used for graceful - and graceless events, and it is also easy to open that pipe - to both parent and child for writing. Then we just need to - figure out how to do graceless on non-threaded MPMs. - - * Allow the DocumentRoot directive within scopes? This - allows the beloved (crusty) Alias /foo/ /somepath/foo/ followed - by a to become simply - DocumentRoot /somefile/foo (IMHO a bit more legible - and in-your-face.) DocumentRoot unset would be accepted [and would - not permit content to be served, only virtual resources such as - server-info or server-status. - This proposed change would _not_ depricate Alias. - striker: See the thread starting with Message-ID: - JLEGKKNELMHCJPNMOKHOGEEJFBAA.striker@apache.org. - - * Win32: Rotatelogs sometimes is not terminated when Apache - goes down hard. FirstBill was looking at possibly tracking the - child's-child processes in the parent process. - stoddard: Shared scoreboard might offer a good way for the parent - to keep track of 'other child' processes and whack them if the child - goes down. - Other thoughts on walking the process chain using the NT kernel - have also been proposed on APR. - - * Eliminate unnecessary creation of pipes in mod_cgid - - * Combine log_child and piped_log_spawn. Clean up http_log.c. - Common logging API. - - * Platforms that do not support fork (primarily Win32 and AS/400) - Architect start-up code that avoids initializing all the modules - in the parent process on platforms that do not support fork. - - * There are still a number of places in the code where we are - losing error status (i.e. throwing away the error returned by a - system call and replacing it with a generic error code) - - * Mass vhosting version of suEXEC. - - * All DBMs suffer from confusion in support/dbmmanage (perl script) since - the dbmmanage employs the first-matched dbm format. This is not - necessarily the library that Apache was built with. Aught to - rewrite dbmmanage upon installation to bin/ with the proper library - for predictable mod_auth_dbm administration. - Questions; htdbm exists, time to kill dbmmanage, or does it remain - useful as a perl dbm management example? If we keep it, - do we address the issue above? - - * Integrate mod_dav. - Some additional items remaining: - - case_preserved_filename stuff - (use the new canonical name stuff?) - - find a new home for ap_text(_header) - - is it possible to remove the DAV: namespace stuff from util_xml? - - * ap_core_translate() and its use by mod_mmap_static and mod_file_cache - are a bit wonky. The function should probably be exposed as a utility - function (such as ap_translate_url2fs() or ap_validate_fs_url() or - something). Another approach would be a new hook phase after - "translate" which would allow the module to munge what the - translation has decided to do. - Status: Greg +1 (volunteers) - - * Explore use of a post-config hook for the code in http_main.c which - calls ap_fixup_virutal_hosts(), ap_fini_vhost_config(), and - ap_sort_hooks() [to reduce the logic in main()] - - * read the config tree just once, and process N times (as necessary) - - * (possibly) use UUIDs in mod_unique_id and/or mod_usertrack - - * (possibly) port the bug fix for PR 6942 (segv when LoadModule is put - into a VirtualHost container) to 2.0. - - * shift stuff to mod_core.h - - * callers of ap_run_create_request() should check the return value - for failure (Doug volunteers) - - * Fix the worker MPM to use POD to kill child processes instead - of ap_os_killpg, regardless of how they should die. - - chrisd: Is this done, by any chance? See r92598 and r93358. - - * Scoreboard structures could be changed in the future such that - proper alignment is not maintained, leading to segfaults on - some systems. Cliff posted a patch to deal with this issue but - later recanted. See this message to dev@apr.apache.org: - Message-ID: - - - * APXS either needs to be fixed completely for use when apr is out of tree, - or it should drop query mode altogether, and we just grow an - httpd-config or similar arrangement. - To quote a discussion in STATUS earlier: - - thommay: this doesn't fix all the problems with apxs and out of - tree apr/apr-util, but it's a good start. There's still the - query cases; but I'm beginning to think that in these cases - the app should be querying ap{r,u}-config directly - deprecate -q: add htpd-config: gstein, pquerna, minfrin, pgollucci - other: - -TODO ISSUES REMAINING IN MOD_SSL: - - * Do we need SSL_set_read_ahead()? - - * SSLRequire directive (parsing of) leaks memory - - * Diffie-Hellman-Parameters for temporary keys are hardcoded in - ssl_engine_dh.c, while the comment in ssl_engine_kernel.c says: - "it is suggested that keys be changed daily or every 500 - transactions, and more often if possible." - - * ssl_var_lookup could be rewritten to be MUCH faster - - * CRL callback should be pluggable - - * session cache store should be pluggable - - * init functions should return status code rather than ssl_die() - - * ssl_engine_pphrase.c needs to be reworked so it is generic enough - to also decrypt proxy keys - - * output warning when allowing SSL v2.0 ? its so old - -WISH LIST - * mod_proxy: Ability to run SSL over proxy gateway connections, - encrypting (or reencrypting) at the proxy. - - * mod_cache: Handle ESI tags. - - * mod_cache: Resolve issue of how to cache page fragments (or perhaps - -if- we want to cache page fragments). Today, mod_cache/mod_mem_cache - will cache #include 'virtual' requests (but not #include 'file' - requests). This was accomplished by making CACHE_IN a - CONTENT_SET-1 filter to force it to run before the SUBREQ_CORE - filter. But now responses cannot be cached that include the - effects of having been run through CONTENT_SET filters - (mod_deflate, mod_expires, etc). We could rerun all the - CONTENT_SET filters on the cached response, but this will not - work in all cases. For example, mod_expires relies on installing - the EXPIRATION filter during fixups. Contents served out of - mod_cache (out of the quick_handler) bypass -all- the request - line server hooks (Ryan really hated this. It is great for - performance, but bad because of the complications listed above). - - mod_cache/mod_mem_cache/mod_cache_disk: - - * mod_mem_cache: Consider adding a RevalidateTimeout directive to - specify time at which local cached content is to be revalidated - (ie, underlying file stat'ed to see if it has changed). - - * mod_cache: CacheEnable/CacheDisable should accept regular expressions. - jerenkrantz says: Too slow. Get regexs away from speedy caches by - default. Introduce a new CacheEnableRegex if you want. - - * mod_mem_cache/mod_cache_disk: Need to be able to query cache - status (num of entries, cache object properties, etc.). - mod_status could be extended to query optional hooks defined - by modules for the purpose of reporting module status. - mod_cache (et. al.) could define optional hooks that are called - to collect status. Status should be queryable by - HTTP or SNMP? - jerenkrantz says: Yawn. Who cares. - * Regex containers don't work in an intutive way - Status: No one has come up with an efficient way to fix this - behavior. Dean has suggested getting rid of regex containers - completely. - OtherBill suggests: We at least seem to agree on eliminating - the forms, and using only - semantics. - - * orig_ct in the byterange/multipart handling may not be - needed. Apache 1.3 just never stashed "multipart" into - r->content_type. We should probably follow suit since the - byterange stuff doesn't want the rest of the code to see the - multipart content-type; the other code should still think it is - dealing with the stuff. - Status: Greg volunteers to investigate (esp. since he was most - likely the one to break it :-) - -EXPERIMENTAL MODULES: - - Experimental modules should eventually be be promoted to fully supported - status or removed from the repository entirely (ie, the - 'experiment' failed). This section tracks what needs to happen to - get the modules promoted to fully supported status. +PATCHES ACCEPTED TO BACKPORT FROM TRUNK: + [ start all new proposals below, under PATCHES PROPOSED. ] + + +PATCHES PROPOSED TO BACKPORT FROM TRUNK: + [ New proposals should be added at the end of the list ] + + *) mod_proxy, mod_ssl: Handle SSLProxy* directives in sections, + allowing per backend TLS configuration. + trunk patch: http://svn.apache.org/r1740928 + http://svn.apache.org/r1740960 + http://svn.apache.org/r1740967 + http://svn.apache.org/r1740987 + http://svn.apache.org/r1740998 + http://svn.apache.org/r1742697 + http://svn.apache.org/r1756976 + 2.4.x patch: http://home.apache.org/~ylavic/patches/httpd-2.4.x-r1740928_and_co.patch + +1: ylavic + + *) event: close a race condition where we might re-enable listeners while they + are already or about to be closed. + trunk patch: http://svn.apache.org/r1774541 + 2.4.x patch: trunk works + +1: ylavic, jim + + *) util_fcgi: Fix crash with empty-valued envvars. PR60275 + trunk patch: http://svn.apache.org/r1775487. + 2.4.x patch: trunk works + +1 covener, jim + + *) mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established + backend connection, happening with LogLevel trace2 or higher configured, + or at any log level with compilers not detected as C99 compliant (e.g. + MSVC on Windows). + trunk patch: http://svn.apache.org/r1775775 + 2.4 patch: trunk works (modulo CHANGES) + +1: ylavic, jim + + +PATCHES/ISSUES THAT ARE BEING WORKED + [ New entried should be added at the START of the list ] + + *) mod_ssl: Return 502 instead of 500 when SSL peer check or + proxy_post_handshake hook fails. + Trunk patch: r1645529 (works) + 2.4.x patch which adds CHANGES: https://emptyhammock.com/media/downloads/r1645529-to-2.4.x.txt + +1: trawick + ylavic: there may be missing bits, see thread for commit r1736510. + + *) core: Drop an invalid Last-Modified header value coming + from a (F)CGI script instead of replacing it with Unix epoch. + Warn the users about Last-Modified header value replacements + and violations of the RFC. + trunk patch: http://svn.apache.org/r1748379 + http://svn.apache.org/r1750747 + http://svn.apache.org/r1750749 + http://svn.apache.org/r1750953 + http://svn.apache.org/r1751138 + http://svn.apache.org/r1751139 + http://svn.apache.org/r1751147 + http://svn.apache.org/r1757818 + 2.4.x: trunk patches work, final view: + http://home.apache.org/~elukey/httpd-2.4.x-core-last_modified_tz_logging.patch + The problem has been discussed in dev@ extensively but we did not reach a common + agreement about how to proceed in the long term. While we wait, I would really like + to introduce useful logs for the users (the starting point of this change was a users@ + email thread). If this is not the right way to go I will move the patch to other + sections of STATUS (stalled or being worked). + The code has been tested with a simple PHP script returning different Last-Modified + headers (GMT now, GMT now Europe/Paris, GMT tomorrow, GMT yesterday, PST now). + +1: elukey + + *) http: Don't remove the Content-Length of zero from a HEAD response if + it comes from an origin server, module or script. Allow the previous + behaviour (for legacy/buggy modules only, not origin) by also backporting + the HttpContentLengthHeadZero directive (and also HttpExpectStrict which + comes for free with the same commit). + trunk patch: http://svn.apache.org/r1554303 + http://svn.apache.org/r1678215 + 2.4.x patch: http://people.apache.org/~ylavic/httpd-2.4.x-preserve_head_cl_zero.patch + +1: ylavic, jim + ylavic: r1554303 issued a major MMN bump, but since the ABI change is two + ints added at the end of core_server_config, the proposed merge + does a minor bump only. + minfrin: Two new directives need to be documented. + + * mod_proxy_http: Don't establish or reuse a backend connection before pre- + fetching the request body, so to minimize the delay between it is supposed + to be alive and the first bytes sent: this is a best effort to prevent the + backend from closing because of idle or keepalive timeout in the meantime. + Also, handle a new "proxy-flushall" environment variable which allows to + flush any forwarded body data immediately. PR 56541+37920. + trunk patch: http://svn.apache.org/r1656259 + http://svn.apache.org/r1656359 (CHANGES entry) + 2.4.x patch: trunk works (modulo CHANGES, docs/log-message-tags) + +1: ylavic + -0: jim: This seems to be a hit to normal performance, to handle an + error and/or non-normal condition. The pre-fetch is + expensive, and is always done, even before we know that + the backend is available to rec' it. I understand the + error described, but is the fix actually worth it (plus + it seems to allow for a DDoS vector). + ylavic: It seems to me that the problem is real since we reuse the + connection before prefetching 16K (either controlled by the + client, or by an input filter), we currently always prefetch + these bytes already. Regarding performance I don't see any + difference (more cycles) compared with the current code. + However I think I failed to rebuild the header_brigade when + the proxy loop is retried (ping), so I need to rework this. + Do you think we'd better remove the prefetch, or maybe just + make it nonblocking (by default)? + jim: Non-blocking seems the best way to handle... + + * mod_dav: Allow other modules to become providers and add ACLs + to the DAV response. Requires a release of apr-util v1.6. + trunk patch: http://svn.apache.org/r1748322 + 2.4.x: trunk works modulo CHANGES/MMN + +1: minfrin + rpluem asks: Will this compile with apr-util < v1.6 and keep + mod_dav working (without the new features of the patch of course)? + I doubt that we will require apr-util 1.6 for the lifetime of 2.4.x + (see the discussion around ap_cstr_casecmp[n] an apr 1.6) + minfrin: Yes, as you can see in the patch everything applies only + if APR_XML_X2T_PARSED is defined, and the patch was tested with + both apr-util v1.6 and apr-util v1.5. + -1: jorton, breaks binary backwards compat per dev@ discuss + msgid <20160902120654.GA12674@redhat.com> + (& also, making the structure change with apr-util version + means it breaks binary compat across an apr-util upgrade?) + + * mod_auth_digest: Reduce severity from NOTICE to DEBUG this + once-per-restart msg (I guess the concern was that the RNG + could block after this message) + + AH01757: generating secret for digest authentication ... + + trunk patch: This was fixed in trunk as a trivial part of http://svn.apache.org/r1492395 + 2.4.x patch: Just change the loglevel to DEBUG. + +1 covener + +PATCHES/ISSUES THAT ARE STALLED + + * core: Add ap_errorlog_provider to make ErrorLog logging modular. This + backport keeps syslog logging as part of httpd core and only adds + API to allow other modules to be used for error logging. + trunk patch: http://svn.apache.org/r1525597 + http://svn.apache.org/r1525664 + http://svn.apache.org/r1525845 + http://svn.apache.org/r1527003 + http://svn.apache.org/r1527005 + http://svn.apache.org/r1532344 + http://svn.apache.org/r1539988 + http://svn.apache.org/r1541029 + http://svn.apache.org/r1543979 + http://svn.apache.org/r1544156 + http://svn.apache.org/r1626978 + 2.4.x patch: http://people.apache.org/~jkaluza/patches/httpd-2.4.x-errorlog_provider.patch + +1: jkaluza + +1: covener w/ doc or code to fix syntax (providername:providerarg not supported like syslog or socacheproviders, + needs 2 args which is not valid in ErrorLog manual) + trawick: nit: fix "writing" in "/* NULL if we are writing to syslog */" + (sorry, haven't finished reviewing completely) + jim: What is the status of this?? + + * mod_proxy: Add ap_proxy_define_match_worker() and use it for ProxyPassMatch + and ProxyMatch section to distinguish between normal workers and workers + with regex substitutions in the name. Implement handling of such workers + in ap_proxy_get_worker(). Fixes the bug when regex workers were not + matched and used for request. PR 43513. + trunk patch: http://svn.apache.org/r1609680 + http://svn.apache.org/r1609688 + http://svn.apache.org/r1641381 + ylavic: Merge patch provided (reusing new->real to avoid double de_socketfy() call). + Also added missing r1609688 to the patchset. + 2.4.x patch: http://people.apache.org/~ylavic/httpd-2.4.x-ap_proxy_define_match_worker.patch + +1: ylavic + -0: covener tried to review this one in Austin with Jeff. Does the added match function + really cover a very narrow set of parameters with the way it skips over backreferences? + Also, why a new API vs. just setting the field inline? + + * mod_systemd: New module, for integration with systemd on Linux. + trunk patch: http://svn.apache.org/r1393976 + http://svn.apache.org/r1393997 + http://svn.apache.org/r1484554 + http://svn.apache.org/r1528032 + http://svn.apache.org/r1528034 + http://svn.apache.org/r1614821 + http://svn.apache.org/r1618579 + http://svn.apache.org/r1618588 + 2.4.x patch: http://people.apache.org/~jkaluza/patches/mod_systemd/httpd-2.4.x-mod_systemd.patch + +1: jkaluza + sf comments: The IdleShutdown logic seems broken. Consider a single + active connection that is stalled for 10 seconds. That + connection will be broken after GracefulShutdownTimeout. + A better logic would be to check if there is any open + connection that is not in keep-alive state. + + * mod_journald: Add new module mod_journald to log error logs into journald. + This patch needs changes done in mod_systemd patch (already + proposed for 2.4.x). + trunk patch: http://svn.apache.org/r1610339 + http://svn.apache.org/r1621806 + 2.4.x patch: http://people.apache.org/~jkaluza/patches/httpd-2.4.x-mod_journald.patch + +1: jkaluza, jim + rjung, minfrin: Not understanding "This patch needs changes done in + mod_systemd patch", am I right in understanding this patch is + already committed? + jkaluza: No, that patch is not committed yet. It is in STALLED section. + The link for that patch is: http://people.apache.org/~jkaluza/patches/mod_systemd/httpd-2.4.x-mod_systemd.patch + + * core: Add support for systemd socket activation. + trunk patch: http://svn.apache.org/r1511033 + http://svn.apache.org/r1608686 + http://svn.apache.org/r1608694 + http://svn.apache.org/r1608703 + http://svn.apache.org/r1608721 + http://svn.apache.org/r1608744 + 2.4.x patch: http://people.apache.org/~jkaluza/patches/mod_systemd/httpd-2.4.x-socket-activation.patch + +1: jkaluza + + * mod_proxy: Ensure network errors detected by the proxy are returned as + 504 Gateway Timeout as opposed to 502 Bad Gateway + trunk patch: https://svn.apache.org/viewvc?view=revision&revision=1480058 + 2.4.x patch: trunk patch works modulo CHANGES + +1: + -1: rpluem: This change is still disputed. See + http://mail-archives.apache.org/mod_mbox/httpd-dev/201305.mbox/%3C1B16B9E3-87BA-4EEF-939C-7C7313B54714%40gbiv.com%3E + + * cross-compile: allow to provide CC_FOR_BUILD so that gen_test_char will be + compiled by the build compiler instead of the host compiler. + Also set CC_FOR_BUILD to 'cc' when cross-compilation is detected. + Trunk patches: http://svn.apache.org/viewvc?view=revision&revision=1327907 + http://svn.apache.org/viewvc?view=revision&revision=1328390 + http://svn.apache.org/viewvc?view=revision&revision=1328714 + 2.4 patch: http://people.apache.org/~fuankg/diffs/httpd-2.4.x-cross_compile.diff + fuankg: on hold until we agree for a better and more simple solution ... + + * Makefile.win: Added copying of .vbs / .wsf CGIs to Windows install target. + Moved fixing of shebang to separate target so that it is + no longer executed by default and all CGIs remain inactive. + trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1387984 + http://svn.apache.org/viewvc?view=revision&revision=1421203 + http://svn.apache.org/viewvc?view=revision&revision=1421591 + 2.4.x patch: http://people.apache.org/~fuankg/diffs/httpd-2.4.x-Makefile.win.diff + +1 fuankg, gsmith + -.8: trawick + This commit is essentially deciding that an httpd install on + Windows now has printenv/testcgi written in 2 more languages. + To the extent that the usefulness is that it shows how to make scripts + of these types executable by httpd, I believe that the documentation + is the proper place to solve that. To the extent that the usefullness + is to show how to implement a CGI in these particular languages, I believe + that the httpd distribution and documentation in general is not the + place for that. Historically these types of scripts have caused problems + for downstream vendorsas well as newbies (and sometimes the intersection + of those two groups) who don't understand that these are information leaks + once they are enabled, and the subtlety of the way they are disabled ("Apache + messed up the first line; let me fix that") contributes to that. + fuankg notes: I've just added a big warning to all CGI scripts which should now + make absolutely clear that these CGIs are for testing purpose only - so those + who enable those scripts with inserting the right shebang should be 100% aware + of any risks (this should cover your last point). + jim: trawick, does the above address your concerns? + trawick: to some extent (somebody reading the script gets an idea) + Why isn't the configuration requirement documented instead + of described indirectly in a sample? + Why are these new samples added to the install without three + votes? (I didn't veto it; put your name next to the two + existing ones and I'll be satisfied that enough people + considered this addition as an appropriate solution for a + real httpd usability problem.) + wrowe: I'd agree with trawick, and suggest that these scripts can begin + their life somewhere in the manual/ tree. This really seems like + the place where /usr/share/httpd/examples/ would be useful, but + there isn't an ordinary directory for that. Since we want none + of the scripts to function 'out of the box', what about a new + cgi-examples/ dir alongside cgi-bin/? Otherwise manual/cgi/examples + might work? + + * core: block Define and Undefine in vhost and directory context. Because + it is EXEC_ON_READ, it "breaks out" of these contexts anyway. + trunk patch: http://svn.apache.org/r1656063 + http://svn.apache.org/r1656122 + 2.4.x patch: http://people.apache.org/~covener/patches/2.4.x-define-limits.diff + +1: covener (I need to review the docs manually in this area) + -1: wrowe (blocking will break "working" .conf files on a subversion update + meant to pick up security fixes. "Alerting" I would agree to.) diff --git a/acinclude.m4 b/acinclude.m4 index 76d79fcb52d..2605e20cec5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -4,25 +4,27 @@ dnl Autoconf 2.50 can not handle substr correctly. It does have dnl AC_HELP_STRING, so let's try to call it if we can. dnl Note: this define must be on one line so that it can be properly returned dnl as the help string. -AC_DEFUN(APACHE_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl +AC_DEFUN([APACHE_HELP_STRING],[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl dnl APACHE_SUBST(VARIABLE) dnl Makes VARIABLE available in generated files dnl (do not use @variable@ in Makefiles, but $(variable)) -AC_DEFUN(APACHE_SUBST,[ +AC_DEFUN([APACHE_SUBST],[ APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1" AC_SUBST($1) ]) dnl APACHE_FAST_OUTPUT(FILENAME) dnl Perform substitutions on FILENAME (Makefiles only) -AC_DEFUN(APACHE_FAST_OUTPUT,[ +AC_DEFUN([APACHE_FAST_OUTPUT],[ APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1" ]) dnl APACHE_GEN_CONFIG_VARS dnl Creates config_vars.mk -AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ +AC_DEFUN([APACHE_GEN_CONFIG_VARS],[ + APACHE_SUBST(HTTPD_VERSION) + APACHE_SUBST(HTTPD_MMN) APACHE_SUBST(abs_srcdir) APACHE_SUBST(bindir) APACHE_SUBST(sbindir) @@ -102,7 +104,7 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ abs_srcdir="`(cd $srcdir && pwd)`" - echo creating config_vars.mk + AC_MSG_NOTICE([creating config_vars.mk]) test -d build || $mkdir_p build > build/config_vars.mk for i in $APACHE_VAR_SUBST; do @@ -112,23 +114,16 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[ dnl APACHE_GEN_MAKEFILES dnl Creates Makefiles -AC_DEFUN(APACHE_GEN_MAKEFILES,[ +AC_DEFUN([APACHE_GEN_MAKEFILES],[ $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES ]) -dnl ## APACHE_OUTPUT(file) -dnl ## adds "file" to the list of files generated by AC_OUTPUT -dnl ## This macro can be used several times. -AC_DEFUN(APACHE_OUTPUT, [ - APACHE_OUTPUT_FILES="$APACHE_OUTPUT_FILES $1" -]) - dnl dnl APACHE_TYPE_RLIM_T dnl dnl If rlim_t is not defined, define it to int dnl -AC_DEFUN(APACHE_TYPE_RLIM_T, [ +AC_DEFUN([APACHE_TYPE_RLIM_T], [ AC_CACHE_CHECK([for rlim_t], ac_cv_type_rlim_t, [ AC_TRY_COMPILE([ #include @@ -145,20 +140,33 @@ AC_DEFUN(APACHE_TYPE_RLIM_T, [ fi ]) +dnl the list of build variables which are available for customization on a +dnl per module subdir basis (to be inserted into modules.mk with a "MOD_" +dnl prefix, i.e. MOD_CFLAGS etc.). Used in APACHE_MODPATH_{INIT,FINISH}. +define(mod_buildvars, [CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS INCLUDES]) +dnl dnl APACHE_MODPATH_INIT(modpath) -AC_DEFUN(APACHE_MODPATH_INIT,[ +AC_DEFUN([APACHE_MODPATH_INIT],[ current_dir=$1 modpath_current=modules/$1 modpath_static= modpath_shared= + for var in mod_buildvars; do + eval MOD_$var= + done test -d $1 || $srcdir/build/mkdir.sh $modpath_current > $modpath_current/modules.mk ])dnl dnl -AC_DEFUN(APACHE_MODPATH_FINISH,[ +AC_DEFUN([APACHE_MODPATH_FINISH],[ echo "DISTCLEAN_TARGETS = modules.mk" >> $modpath_current/modules.mk echo "static = $modpath_static" >> $modpath_current/modules.mk echo "shared = $modpath_shared" >> $modpath_current/modules.mk + for var in mod_buildvars; do + if eval val=\"\$MOD_$var\"; test -n "$val"; then + echo "MOD_$var = $val" >> $modpath_current/modules.mk + fi + done if test ! -z "$modpath_static" -o ! -z "$modpath_shared"; then MODULE_DIRS="$MODULE_DIRS $current_dir" else @@ -168,7 +176,7 @@ AC_DEFUN(APACHE_MODPATH_FINISH,[ ])dnl dnl dnl APACHE_MODPATH_ADD(name[, shared[, objects [, ldflags[, libs]]]]) -AC_DEFUN(APACHE_MODPATH_ADD,[ +AC_DEFUN([APACHE_MODPATH_ADD],[ if test -z "$3"; then objects="mod_$1.lo" else @@ -214,7 +222,7 @@ dnl config -- configuration logic to run if the MPM is enabled dnl path -- relative path to MPM (default: server/mpm/mpmname) dnl libs -- libs needed by this MPM dnl -AC_DEFUN(APACHE_MPM_MODULE,[ +AC_DEFUN([APACHE_MPM_MODULE],[ if ap_mpm_is_enabled $1; then if test -z "$3"; then objects="$1.lo" @@ -254,9 +262,9 @@ DISTCLEAN_TARGETS = modules.mk static = shared = $libname EOF + DSO_MODULES="$DSO_MODULES mpm_$1" # add default MPM to LoadModule list if test $1 = $default_mpm; then - DSO_MODULES="$DSO_MODULES mpm_$1" ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},mpm_$1" fi fi @@ -265,7 +273,7 @@ EOF ])dnl dnl -dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]]) +dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config[, prereq_module]]]]]) dnl dnl default is one of: dnl yes -- enabled by default. user must explicitly disable. @@ -282,43 +290,54 @@ dnl setting. otherwise, fall under the "all" setting. dnl explicit yes/no always overrides, except if the user selects dnl "reallyall". dnl -AC_DEFUN(APACHE_MODULE,[ +dnl prereq_module is a module (without the "mod_" prefix) that must be enabled +dnl if the current module is enabled. If the current module is built +dnl statically, prereq_module must be built statically, too. If these +dnl conditions are not fulfilled, configure will abort if the current module +dnl has been enabled explicitly. Otherwise, configure will disable the +dnl current module. +dnl prereq_module's APACHE_MODULE() statement must have been processed +dnl before the current APACHE_MODULE() statement. +dnl +AC_DEFUN([APACHE_MODULE],[ AC_MSG_CHECKING(whether to enable mod_$1) define([optname],[--]ifelse($5,yes,disable,enable)[-]translit($1,_,-))dnl AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),force_$1=$enableval,enable_$1=ifelse($5,,maybe-all,$5)) undefine([optname])dnl _apmod_extra_msg="" - dnl When --enable-modules=most or --enable-modules=(really)all is set and the - dnl module was not explicitly requested, allow a module to disable itself if + dnl If the module was not explicitly requested, allow it to disable itself if dnl its pre-reqs fail. case "$enable_$1" in yes|static|shared) _apmod_required="yes" ;; *) - case "$module_selection" in - reallyall|all|most) - _apmod_required="no" - ;; - *) - _apmod_required="yes" - ;; - esac + _apmod_required="no" + ;; esac - if test "$enable_$1" = "static"; then - enable_$1=static + if test "$enable_$1" = "static" -o "$enable_$1" = "shared"; then + : elif test "$enable_$1" = "yes"; then enable_$1=$module_default + elif test "$enable_$1" = "few"; then + if test "$module_selection" = "few" -o "$module_selection" = "most" -o \ + "$module_selection" = "all" -o "$module_selection" = "reallyall" + then + enable_$1=$module_default + else + enable_$1=no + fi + _apmod_extra_msg=" ($module_selection)" elif test "$enable_$1" = "most"; then if test "$module_selection" = "most" -o "$module_selection" = "all" -o \ "$module_selection" = "reallyall" then enable_$1=$module_default - elif test "$module_selection" = "few" -o "$module_selection" = "none"; then + else enable_$1=no fi _apmod_extra_msg=" ($module_selection)" - elif test "$enable_$1" = "maybe-all"; then + elif test "$enable_$1" = "all" -o "$enable_$1" = "maybe-all"; then if test "$module_selection" = "all" -o "$module_selection" = "reallyall" then enable_$1=$module_default @@ -326,24 +345,39 @@ AC_DEFUN(APACHE_MODULE,[ else enable_$1=no fi - elif test "$enable_$1" = "no" -a "$module_selection" = "reallyall" -a \ - "$force_$1" != "no" ; then + elif test "$enable_$1" = "reallyall" -o "$enable_$1" = "no" ; then + if test "$module_selection" = "reallyall" -a "$force_$1" != "no" ; then enable_$1=$module_default _apmod_extra_msg=" ($module_selection)" + else + enable_$1=no + fi + else + enable_$1=no fi if test "$enable_$1" != "no"; then dnl If we plan to enable it, allow the module to run some autoconf magic dnl that may disable it because of missing dependencies. - ifelse([$6],,:,[AC_MSG_RESULT([checking dependencies]) - $6 - AC_MSG_CHECKING(whether to enable mod_$1) - if test "$enable_$1" = "no"; then - if test "$_apmod_required" = "no"; then - _apmod_extra_msg=" (disabled)" - else - AC_MSG_ERROR([mod_$1 has been requested but can not be built due to prerequisite failures]) - fi - fi]) + ifelse([$6$7],,:, + [AC_MSG_RESULT([checking dependencies]) + ifelse([$7],,:,[m4_foreach([prereq],[$7], + [if test "$enable_[]prereq" = "no" ; then + enable_$1=no + AC_MSG_WARN("mod_[]prereq is disabled but required for mod_$1") + elif test "$enable_$1" = "static" && test "$enable_[]prereq" != "static" ; then + enable_$1=$enable_[]prereq + AC_MSG_WARN("building mod_$1 shared because mod_[]prereq is built shared") + el])se]) + ifelse([$6],,:,[ $6]) + ifelse([$7],,:,[fi]) + AC_MSG_CHECKING(whether to enable mod_$1) + if test "$enable_$1" = "no"; then + if test "$_apmod_required" = "no"; then + _apmod_extra_msg=" (disabled)" + else + AC_MSG_ERROR([mod_$1 has been requested but can not be built due to prerequisite failures]) + fi + fi]) fi AC_MSG_RESULT($enable_$1$_apmod_extra_msg) if test "$enable_$1" != "no"; then @@ -355,11 +389,10 @@ AC_DEFUN(APACHE_MODULE,[ fi shared="";; *) - enable_$1=`echo $enable_$1|sed 's/shared,*//'` sharedobjs=yes shared=yes DSO_MODULES="$DSO_MODULES $1" - if test "$_apmod_required" = "yes" ; then + if test "$5" = "yes" ; then ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},$1" fi ;; @@ -374,7 +407,7 @@ AC_DEFUN(APACHE_MODULE,[ dnl dnl APACHE_ENABLE_MODULES dnl -AC_DEFUN(APACHE_ENABLE_MODULES,[ +AC_DEFUN([APACHE_ENABLE_MODULES],[ module_selection=most module_default=shared @@ -434,7 +467,7 @@ AC_DEFUN(APACHE_ENABLE_MODULES,[ ]) ]) -AC_DEFUN(APACHE_REQUIRE_CXX,[ +AC_DEFUN([APACHE_REQUIRE_CXX],[ if test -z "$apache_cxx_done"; then AC_PROG_CXX AC_PROG_CXXCPP @@ -448,17 +481,19 @@ dnl dnl Configure for OpenSSL, giving preference to dnl "--with-ssl=" if it was specified. dnl -AC_DEFUN(APACHE_CHECK_OPENSSL,[ +AC_DEFUN([APACHE_CHECK_OPENSSL],[ AC_CACHE_CHECK([for OpenSSL], [ac_cv_openssl], [ dnl initialise the variables we use ac_cv_openssl=no ap_openssl_found="" ap_openssl_base="" ap_openssl_libs="" + ap_openssl_mod_cflags="" + ap_openssl_mod_ldflags="" dnl Determine the OpenSSL base directory, if any AC_MSG_CHECKING([for user-provided OpenSSL base directory]) - AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,OpenSSL base directory), [ + AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=PATH,OpenSSL installation directory), [ dnl If --with-ssl specifies a directory, we use that directory if test "x$withval" != "xyes" -a "x$withval" != "x"; then dnl This ensures $withval is actually a directory and that it is absolute @@ -475,7 +510,6 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[ saved_CPPFLAGS="$CPPFLAGS" saved_LIBS="$LIBS" saved_LDFLAGS="$LDFLAGS" - SSL_LIBS="" dnl Before doing anything else, load in pkg-config variables if test -n "$PKGCONFIG"; then @@ -487,15 +521,24 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[ PKG_CONFIG_PATH="${ap_openssl_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}" export PKG_CONFIG_PATH fi - ap_openssl_libs="`$PKGCONFIG --libs-only-l openssl 2>&1`" + AC_ARG_ENABLE(ssl-staticlib-deps,APACHE_HELP_STRING(--enable-ssl-staticlib-deps,[link mod_ssl with dependencies of OpenSSL's static libraries (as indicated by "pkg-config --static"). Must be specified in addition to --enable-ssl.]), [ + if test "$enableval" = "yes"; then + PKGCONFIG_LIBOPTS="--static" + fi + ]) + ap_openssl_libs="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-l --silence-errors openssl`" if test $? -eq 0; then ap_openssl_found="yes" pkglookup="`$PKGCONFIG --cflags-only-I openssl`" APR_ADDTO(CPPFLAGS, [$pkglookup]) - APR_ADDTO(INCLUDES, [$pkglookup]) - pkglookup="`$PKGCONFIG --libs-only-L --libs-only-other openssl`" + APR_ADDTO(MOD_CFLAGS, [$pkglookup]) + APR_ADDTO(ab_CFLAGS, [$pkglookup]) + pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-L openssl`" + APR_ADDTO(LDFLAGS, [$pkglookup]) + APR_ADDTO(MOD_LDFLAGS, [$pkglookup]) + pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-other openssl`" APR_ADDTO(LDFLAGS, [$pkglookup]) - APR_ADDTO(SSL_LIBS, [$pkglookup]) + APR_ADDTO(MOD_LDFLAGS, [$pkglookup]) fi PKG_CONFIG_PATH="$saved_PKG_CONFIG_PATH" fi @@ -503,21 +546,22 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[ dnl fall back to the user-supplied directory if not found via pkg-config if test "x$ap_openssl_base" != "x" -a "x$ap_openssl_found" = "x"; then APR_ADDTO(CPPFLAGS, [-I$ap_openssl_base/include]) - APR_ADDTO(INCLUDES, [-I$ap_openssl_base/include]) + APR_ADDTO(MOD_CFLAGS, [-I$ap_openssl_base/include]) + APR_ADDTO(ab_CFLAGS, [-I$ap_openssl_base/include]) APR_ADDTO(LDFLAGS, [-L$ap_openssl_base/lib]) - APR_ADDTO(SSL_LIBS, [-L$ap_openssl_base/lib]) + APR_ADDTO(MOD_LDFLAGS, [-L$ap_openssl_base/lib]) if test "x$ap_platform_runtime_link_flag" != "x"; then APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib]) - APR_ADDTO(SSL_LIBS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib]) + APR_ADDTO(MOD_LDFLAGS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib]) fi fi - AC_MSG_CHECKING([for OpenSSL version >= 0.9.7]) + AC_MSG_CHECKING([for OpenSSL version >= 0.9.8a]) AC_TRY_COMPILE([#include ],[ #if !defined(OPENSSL_VERSION_NUMBER) #error "Missing OpenSSL version" #endif -#if OPENSSL_VERSION_NUMBER < 0x0090700f +#if OPENSSL_VERSION_NUMBER < 0x0090801f #error "Unsupported OpenSSL version " OPENSSL_VERSION_TEXT #endif], [AC_MSG_RESULT(OK) @@ -525,16 +569,18 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[ [AC_MSG_RESULT(FAILED)]) if test "x$ac_cv_openssl" = "xyes"; then - ap_openssl_libs="-lssl -lcrypto `$apr_config --libs`" - APR_ADDTO(SSL_LIBS, [$ap_openssl_libs]) + ap_openssl_libs="${ap_openssl_libs:--lssl -lcrypto} `$apr_config --libs`" + APR_ADDTO(MOD_LDFLAGS, [$ap_openssl_libs]) APR_ADDTO(LIBS, [$ap_openssl_libs]) - APACHE_SUBST(SSL_LIBS) + APR_SETVAR(ab_LDFLAGS, [$MOD_LDFLAGS]) + APACHE_SUBST(ab_CFLAGS) + APACHE_SUBST(ab_LDFLAGS) dnl Run library and function checks liberrors="" AC_CHECK_HEADERS([openssl/engine.h]) AC_CHECK_FUNCS([SSLeay_version SSL_CTX_new], [], [liberrors="yes"]) - AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines]) + AC_CHECK_FUNCS([ENGINE_init ENGINE_load_builtin_engines RAND_egd]) if test "x$liberrors" != "x"; then AC_MSG_WARN([OpenSSL libraries are unusable]) fi @@ -546,68 +592,32 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[ CPPFLAGS="$saved_CPPFLAGS" LIBS="$saved_LIBS" LDFLAGS="$saved_LDFLAGS" + + dnl cache MOD_LDFLAGS, MOD_CFLAGS + ap_openssl_mod_cflags=$MOD_CFLAGS + ap_openssl_mod_ldflags=$MOD_LDFLAGS ]) if test "x$ac_cv_openssl" = "xyes"; then AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL is available]) + APR_ADDTO(MOD_LDFLAGS, [$ap_openssl_mod_ldflags]) + APR_ADDTO(MOD_CFLAGS, [$ap_openssl_mod_cflags]) fi ]) -dnl -dnl APACHE_CHECK_SERF -dnl -dnl Configure for the detected libserf, giving preference to -dnl "--with-serf=" if it was specified. -dnl -AC_DEFUN([APACHE_CHECK_SERF], [ - AC_CACHE_CHECK([for libserf], [ac_cv_serf], [ - ac_cv_serf=no - serf_prefix=/usr - SERF_LIBS="" - AC_ARG_WITH(serf, APACHE_HELP_STRING([--with-serf=PREFIX], - [Serf client library]), - [ - if test "$withval" = "yes" ; then - serf_prefix=/usr - else - serf_prefix=$withval - fi - ]) - - if test "$serf_prefix" != "no" ; then - save_cppflags="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $APR_INCLUDES $APU_INCLUDES -I$serf_prefix/include/serf-0" - AC_CHECK_HEADERS(serf.h,[ - save_ldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$serf_prefix/lib" - AC_CHECK_LIB(serf-0, serf_context_create,[ac_cv_serf="yes"]) - LDFLAGS="$save_ldflags"]) - CPPFLAGS="$save_cppflags" - fi - ]) - - APACHE_SUBST(SERF_LIBS) - if test "$ac_cv_serf" = "yes"; then - AC_DEFINE(HAVE_SERF, 1, [Define if libserf is available]) - APR_SETVAR(SERF_LIBS, [-L$serf_prefix/lib -lserf-0]) - APR_ADDTO(INCLUDES, [-I$serf_prefix/include/serf-0]) - fi -]) - - dnl dnl APACHE_EXPORT_ARGUMENTS dnl Export (via APACHE_SUBST) the various path-related variables that dnl apache will use while generating scripts like autoconf and apxs and dnl the default config file. -AC_DEFUN(APACHE_SUBST_EXPANDED_ARG,[ +AC_DEFUN([APACHE_SUBST_EXPANDED_ARG],[ APR_EXPAND_VAR(exp_$1, [$]$1) APACHE_SUBST(exp_$1) APR_PATH_RELATIVE(rel_$1, [$]exp_$1, ${prefix}) APACHE_SUBST(rel_$1) ]) -AC_DEFUN(APACHE_EXPORT_ARGUMENTS,[ +AC_DEFUN([APACHE_EXPORT_ARGUMENTS],[ APACHE_SUBST_EXPANDED_ARG(exec_prefix) APACHE_SUBST_EXPANDED_ARG(bindir) APACHE_SUBST_EXPANDED_ARG(sbindir) @@ -724,7 +734,7 @@ AC_DEFUN([APACHE_ADD_GCC_CFLAG], [ AC_CACHE_CHECK([whether gcc accepts $1], ap_gcc_ckvar, [ save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" - AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo() { return 0; }])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ap_gcc_ckvar=yes], [ap_gcc_ckvar=no]) CFLAGS="$save_CFLAGS" ]) diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index 162365c16fe..0e510c0b859 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -49,6 +49,12 @@ ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h" $(error LDAPSDK does not point to a valid Novell CLDAP SDK) endif +ifdef WITH_HTTP2 +ifneq "$(wildcard $(NGH2SRC)/lib/nghttp2_hd.h)" "$(NGH2SRC)/lib/nghttp2_hd.h" +$(error NGH2SRC does not point to a valid NGHTTP2 source tree) +endif +endif + ifndef PCRESRC PCRESRC = $(AP_WORK)/srclib/pcre endif @@ -212,16 +218,16 @@ PLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++/MWCPP ifeq "$(OS)" "Windows_NT" # MetroWerks Win32 build flags to create build tools -MWCW_MSL = "$(METROWERKS)/MSL" -MWCW_W32 = "$(METROWERKS)/Win32-x86 Support" -HOST_CC = $(WIN_CC) -HOST_CFLAGS = -O2 -gccinc -nodefaults -proc 586 -w off -HOST_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32) -HOST_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib +MWCW_MSL = "$(METROWERKS)/MSL" +MWCW_W32 = "$(METROWERKS)/Win32-x86 Support" +CC_FOR_BUILD = $(WIN_CC) +CFLAGS_FOR_BUILD = -O2 -gccinc -nodefaults -proc 586 -w off +CFLAGS_FOR_BUILD += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32) +CFLAGS_FOR_BUILD += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib else # GNUC build flags to create build tools -HOST_CC = gcc -HOST_CFLAGS = -Wall -O2 +CC_FOR_BUILD = gcc +CFLAGS_FOR_BUILD = -Wall -O2 endif # Base compile flags @@ -230,7 +236,7 @@ endif # The default flags are as follows: # # -c compile only, no link -# -nosyspath treat #include <...> like #include "..." +# -gccinc search directory of referencing file first for #includes # -Cpp_exceptions off disable C++ exceptions # -RTTI off disable C++ run-time typing information # -align 4 align on 4 byte bounderies @@ -238,7 +244,13 @@ endif # -proc PII generate code base on Pentium II instruction set # -inst mmx use MMX extensions (Not used) -CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII +CFLAGS += -c -w nocmdline -gccinc -Cpp_exceptions off -RTTI off -align 4 -proc PII + +ifdef CC_MAX_ERRORS +CFLAGS += -maxerrors $(CC_MAX_ERRORS) +else +CFLAGS += -maxerrors 1 +endif ifeq "$(REQUIRE_PROTOTYPES)" "1" CFLAGS += -r diff --git a/build/NWGNUhead.inc b/build/NWGNUhead.inc index 78a96db7c6a..2ef4dace6ab 100644 --- a/build/NWGNUhead.inc +++ b/build/NWGNUhead.inc @@ -82,8 +82,10 @@ clobber_prebuild :: $(SUBDIRS) : FORCE ifneq "$(MAKECMDGOALS)" "clean" +ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_" @$(ECHONL) @echo $(DL)Building $(CURDIR)/$@$(DL) +endif endif $(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)" @$(ECHONL) diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile index 8e588aeae73..1954257eb57 100644 --- a/build/NWGNUmakefile +++ b/build/NWGNUmakefile @@ -23,7 +23,7 @@ FILES_prebuild_headers = \ $(PCRE)/pcre.h \ $(EOLIST) -nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp +nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp $(STDMOD)/cache/mod_cache.imp libs :: chkapr $(NWOS)/chartables.c @@ -31,6 +31,10 @@ $(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h @echo $(DL)GEN $@$(DL) $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@ +$(STDMOD)/cache/mod_cache.imp: make_nw_export.awk $(STDMOD)/cache/mod_cache.h $(STDMOD)/cache/cache_util.h + @echo $(DL)GEN $@$(DL) + $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@ + $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i @echo $(DL)GEN $@$(DL) $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@ @@ -75,7 +79,7 @@ $(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c %.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h @echo $(DL)Creating Build Helper $@$(DL) - $(HOST_CC) $(HOST_CFLAGS) -DHAVE_CONFIG_H $< -o $@ + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DHAVE_CONFIG_H $< -o $@ $(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c @echo $(DL)GEN $@$(DL) @@ -83,7 +87,7 @@ $(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c %.exe: $(SERVER)/%.c @echo $(DL)Creating Build Helper $@$(DL) - $(HOST_CC) $(HOST_CFLAGS) -DCROSS_COMPILE $< -o $@ + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE $< -o $@ else @@ -114,6 +118,7 @@ clean :: $(call DEL,$(SRC)/include/ap_config_layout.h) $(call DEL,$(PCRE)/config.h) $(call DEL,$(PCRE)/pcre.h) + $(call DEL,$(STDMOD)/cache/mod_cache.imp) $(call DEL,$(DAV)/main/dav.imp) $(call DEL,$(NWOS)/httpd.imp) $(call DEL,nw_export.i) diff --git a/build/NWGNUscripts.inc b/build/NWGNUscripts.inc index 7b0aa0d7093..27029ebb744 100644 --- a/build/NWGNUscripts.inc +++ b/build/NWGNUscripts.inc @@ -1,43 +1,43 @@ -# Include for creating start/stop/restart NCF scripts. - -instscripts:: FORCE $(INSTALLBASE)/ap2start.ncf $(INSTALLBASE)/ap2auto.ncf $(INSTALLBASE)/ap2rest.ncf $(INSTALLBASE)/ap2stop.ncf - -$(INSTALLBASE)/ap2start.ncf: - @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ - @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ - @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ - @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ - @echo $(DL)load address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ - @echo $(DL)# If you have problems with 3rd-party modules try to load in OS space.$(DL)>> $@ - @echo $(DL)# load SYS:/$(BASEDIR)/apache2$(DL)>> $@ - @$(ECHONL)>> $@ - -$(INSTALLBASE)/ap2auto.ncf: - @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ - @echo $(DL)# and let automatically restart in case it crashes$(DL)>> $@ - @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ - @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ - @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ - @echo $(DL)restart address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ - @$(ECHONL)>> $@ - -$(INSTALLBASE)/ap2rest.ncf: - @echo $(DL)# NCF to restart Apache 2.x in own address space$(DL)> $@ - @echo $(DL)apache2 restart -p $(BASEDIR)$(DL)>> $@ - @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ - @echo $(DL)# apache2 restart$(DL)>> $@ - @$(ECHONL)>> $@ - -$(INSTALLBASE)/ap2stop.ncf: - @echo $(DL)# NCF to stop Apache 2.x in own address space$(DL)> $@ - @echo $(DL)apache2 shutdown -p $(BASEDIR)$(DL)>> $@ - @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ - @echo $(DL)# apache2 shutdown$(DL)>> $@ - @$(ECHONL)>> $@ - -$(INSTALLBASE)/ap2prod.ncf: - @echo $(DL)# NCF to create a product record for Apache 2.x in product database$(DL)> $@ - @echo $(DL)PRODSYNC DEL APACHE$(VERSION_MAJMIN)$(DL)>> $@ - @echo $(DL)PRODSYNC ADD APACHE$(VERSION_MAJMIN) ProductRecord "$(VERSION_STR)" "Apache $(VERSION_STR) Webserver"$(DL)>> $@ - @$(ECHONL)>> $@ - +# Include for creating start/stop/restart NCF scripts. + +instscripts:: FORCE $(INSTALLBASE)/ap2start.ncf $(INSTALLBASE)/ap2auto.ncf $(INSTALLBASE)/ap2rest.ncf $(INSTALLBASE)/ap2stop.ncf + +$(INSTALLBASE)/ap2start.ncf: + @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ + @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ + @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ + @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ + @echo $(DL)load address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ + @echo $(DL)# If you have problems with 3rd-party modules try to load in OS space.$(DL)>> $@ + @echo $(DL)# load SYS:/$(BASEDIR)/apache2$(DL)>> $@ + @$(ECHONL)>> $@ + +$(INSTALLBASE)/ap2auto.ncf: + @echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@ + @echo $(DL)# and let automatically restart in case it crashes$(DL)>> $@ + @echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@ + @echo $(DL)# httpcloseport 80 /silent$(DL)>> $@ + @echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@ + @echo $(DL)restart address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@ + @$(ECHONL)>> $@ + +$(INSTALLBASE)/ap2rest.ncf: + @echo $(DL)# NCF to restart Apache 2.x in own address space$(DL)> $@ + @echo $(DL)apache2 restart -p $(BASEDIR)$(DL)>> $@ + @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ + @echo $(DL)# apache2 restart$(DL)>> $@ + @$(ECHONL)>> $@ + +$(INSTALLBASE)/ap2stop.ncf: + @echo $(DL)# NCF to stop Apache 2.x in own address space$(DL)> $@ + @echo $(DL)apache2 shutdown -p $(BASEDIR)$(DL)>> $@ + @echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@ + @echo $(DL)# apache2 shutdown$(DL)>> $@ + @$(ECHONL)>> $@ + +$(INSTALLBASE)/ap2prod.ncf: + @echo $(DL)# NCF to create a product record for Apache 2.x in product database$(DL)> $@ + @echo $(DL)PRODSYNC DEL APACHE$(VERSION_MAJMIN)$(DL)>> $@ + @echo $(DL)PRODSYNC ADD APACHE$(VERSION_MAJMIN) ProductRecord "$(VERSION_STR)" "Apache $(VERSION_STR) Webserver"$(DL)>> $@ + @$(ECHONL)>> $@ + diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc index 0c4a92d571d..4c19a6392f5 100644 --- a/build/NWGNUtail.inc +++ b/build/NWGNUtail.inc @@ -95,20 +95,26 @@ CPPOPT_DEPENDS = $(CCOPT_DEPENDS) # Generic compiler rules # -ifneq ($(MAKECMDGOALS),clean) +ifneq "$(MAKECMDGOALS)" "clean" +ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_" $(APBUILD)/NWGNUversion.inc: $(APBUILD)/nw_ver.awk $(SRC)/include/ap_release.h -# @echo Generating $@ @echo $(DL)GEN $@$(DL) - $(AWK) -f $^ > $@ + $(AWK) -f $^ $(SRC)/.svn/all-wcprops > $@ -include $(APBUILD)/NWGNUversion.inc ifneq "$(strip $(VERSION_STR))" "" VERSION_INC = $(APBUILD)/NWGNUversion.inc else -VERSION = 2,3,0 -VERSION_STR = 2.3.0 -VERSION_MAJMIN = 23 +VERSION = 2,4,0 +VERSION_STR = 2.4.0 +VERSION_MAJMIN = 24 +endif +endif +endif +ifeq "$(USE_SVNREV)" "1" +ifneq "$(strip $(SVN_REVISION))" "" +CFLAGS += -DAP_SERVER_ADD_STRING=\"$(SVN_REVISION)\" endif endif @@ -215,6 +221,7 @@ $(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS) $(call DEL,$@) $(call DEL,$(@:.opt=.def)) @echo $(DL)GEN $@$(DL) + @echo $(DL)-nlmversion=$(NLM_VERSION)$(DL)>> $@ @echo $(DL)-warnings off$(DL)>> $@ @echo $(DL)-zerobss$(DL)>> $@ @echo $(DL)-o $(TARGET_nlm)$(DL)>> $@ @@ -278,7 +285,7 @@ endif @echo $(DL)threadname "$(NLM_THREAD_NAME)"$(DL)>> $(@:.opt=.def) @echo $(DL)screenname "$(NLM_SCREEN_NAME)"$(DL)>> $(@:.opt=.def) @echo $(DL)stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE))))$(DL)>> $(@:.opt=.def) - @echo $(DL)version $(NLM_VERSION) $(DL)>> $(@:.opt=.def) +# @echo $(DL)version $(NLM_VERSION) $(DL)>> $(@:.opt=.def) @echo $(DL)start $(NLM_ENTRY_SYM)$(DL)>> $(@:.opt=.def) @echo $(DL)exit $(NLM_EXIT_SYM)$(DL)>> $(@:.opt=.def) ifneq "$(NLM_CHECK_SYM)" "" diff --git a/build/aix/README b/build/aix/README new file mode 100644 index 00000000000..3b87bd149cc --- /dev/null +++ b/build/aix/README @@ -0,0 +1,66 @@ +The script buildaix.ksh will attempt to build a AIX installp fileset +out of a source tree for ASF project + +REQUIREMENTS: + Fileset Level State Type Description (Uninstaller) + ---------------------------------------------------------------------------- + bos.adt.insttools 5.3.7.2 C F Tool to Create installp + Packages + Fileset Level State Type Description (Uninstaller) + ---------------------------------------------------------------------------- + rpm.rte 3.0.5.41 C F RPM Package Manager + +Additional: +Preferred: download zlib sources and copy zlib.h and zconf.h to /opt/include +and, if configure cannot find them directly, add symbolic links from /usr/include to /opt/include + +To build a package, make sure you are in the root of the source tree, +and run: + +build/aix/buildaix.ksh + +An AIX fileset named $PKG.$NAME.$ARCH.$VERSION.I will be +created in the build/aix directory. the .template file created is also there. + +KNOWN issues: +on AIX libtool is known to have issues with the install command. +Some of these issues have been resolved by extracting the apr/apu utilities +from the projects (i.e. NOT using the embedded version) +In case of problems I recommend that you install the GNU 'install' program (part of coreutils) +If make DESTDIR=$TEMPDIR install command continues to fail, try 'make install' and then run +the buildaix.ksh command again + +TODO +Add Copyright display/banner +Add Apache LICENSE to fileset and require acceptance +Add special instructions for TCB - to ignore /etc/* /var/httpd/htdocs/* +Add _config_i scripts to setup autostart +Add _pre_i scripts to verify pre-requisites, required users/groups, etc. + +# This layout is intended to put customizeable data in /etc and /var +# the file listing will be used to create an exceptions file to modify +# the behavior of syschk checksum generation. +# AIX layout + + prefix: /opt/httpd + exec_prefix: /opt/httpd + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + libdir: ${exec_prefix}/lib + libexecdir: ${exec_prefix}/libexec + mandir: /usr/share/man + sysconfdir: /etc/httpd + datadir: /var/httpd + installbuilddir: ${datadir}/build + errordir: ${datadir}/error + htdocsdir: ${datadir}/htdocs + cgidir: ${datadir}/cgi-bin + iconsdir: ${prefix}/icons + manualdir: ${prefix}/manual + includedir: ${prefix}/include + localstatedir: /var/httpd + runtimedir: ${localstatedir}/run + logfiledir: ${localstatedir}/logs + proxycachedir: ${localstatedir}/proxy + + diff --git a/build/aix/aixinfo b/build/aix/aixinfo new file mode 100644 index 00000000000..58ac3a1d3e0 --- /dev/null +++ b/build/aix/aixinfo @@ -0,0 +1,16 @@ + +PKG="ASF" +NAME="httpd" +ARCH="powerpc" +VERSION="2.2.22" +CATEGORY="application" +VENDOR="Apache Software Foundation" +EMAIL="dev@httpd.apache.org" +VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER` +REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER` +VERSION=`echo $REVISION | cut -d- -s -f1` +RELEASE=`echo $REVISION | cut -d- -s -f2` +if [ "x$VERSION" = "x" ]; then + VERSION=$REVISION + RELEASE=0 +fi diff --git a/build/aix/aixproto.ksh b/build/aix/aixproto.ksh new file mode 100755 index 00000000000..5c5c471a72b --- /dev/null +++ b/build/aix/aixproto.ksh @@ -0,0 +1,78 @@ +#!/usr/bin/ksh +TEMPDIR=$1 +BUILD=`pwd` +. build/aix/pkginfo + +package=$PKG +name=$NAME +vrmf=$VERSION +descr="$VENDOR $NAME for $ARCH" +umask 022 +INFO=$BUILD/build/aix/.info +mkdir -p $INFO + +template=${INFO}/${PKG}.${NAME}.${vrmf}.template +>$template + +cd ${TEMPDIR} +rm -rf .info lpp_name tmp +# get the directory sizes in blocks +for d in etc opt var +do + set `du -s $d/${NAME}` + let sz$d=$1+1 +done +set `du -s usr/share/man` +szman=$1+1 + +files=./httpd-root +cd ${TEMPDIR}/.. +find ${files} -type d -exec chmod og+rx {} \; +chmod -R go+r ${files} +chown -R 0:0 ${files} + +cat - <>$template +Package Name: ${package}.${NAME} +Package VRMF: ${vrmf}.0 +Update: N +Fileset + Fileset Name: ${package}.${NAME}.rte + Fileset VRMF: ${vrmf}.0 + Fileset Description: ${descr} + USRLIBLPPFiles + EOUSRLIBLPPFiles + Bosboot required: N + License agreement acceptance required: N + Include license files in this package: N + Requisites: + Upsize: /usr/share/man ${szman}; + Upsize: /etc/${NAME} $szetc; + Upsize: /opt/${NAME} $szopt; + Upsize: /var/${NAME} $szvar; + USRFiles +EOF + +find ${files} | sed -e s#^${files}## | sed -e "/^$/d" >>$template + +cat - <>$template + EOUSRFiles + ROOT Part: N + ROOTFiles + EOROOTFiles + Relocatable: N +EOFileset +EOF + +cp ${template} ${BUILD}/build/aix + +# use mkinstallp to create the fileset. result is in ${TEMPDIR}/tmp +mkinstallp -d ${TEMPDIR} -T ${template} + +cp ${TEMPDIR}/tmp/$PKG.$NAME.$VERSION.0.bff ${BUILD}/build/aix +cd $BUILD/build/aix +rm -f $PKG.$NAME.$VERSION.$ARCH.I +mv $PKG.$NAME.$VERSION.0.bff $PKG.$NAME.$VERSION.$ARCH.I +rm .toc +inutoc . +installp -d . -ap ${PKG}.${NAME} +installp -d . -L diff --git a/build/aix/buildaix.ksh b/build/aix/buildaix.ksh new file mode 100755 index 00000000000..83521d4154a --- /dev/null +++ b/build/aix/buildaix.ksh @@ -0,0 +1,127 @@ +#!/usr/bin/ksh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# buildaix.ksh: This script builds an AIX fileset of Apache httpd + +# if arguments - try to run fast +cmd=$0 + +export CFLAGS='-O2 -qlanglvl=extc99' + +lslpp -L bos.adt.insttools >/dev/null + [[ $? -ne 0 ]] && echo "must have bos.adt.insttools installed" && exit -1 + +apr_config=`which apr-1-config` +apu_config=`which apu-1-config` + +if [[ -z ${apr_config} && -z ${apu_config} ]] +then + export PATH=/opt/bin:${PATH} + apr_config=`which apr-1-config` + apu_config=`which apu-1-config` +fi + +while test $# -gt 0 +do + # Normalize + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case "$1" in + --with-apr=*) + apr_config=$optarg + ;; + esac + + case "$1" in + --with-apr-util=*) + apu_config=$optarg + ;; + esac + + shift + argc-- +done + +if [ ! -f "$apr_config" -a ! -f "$apr_config/configure.in" ]; then + echo "The apr source directory / apr-1-config could not be found" + echo "If available, install the ASF.apu.rte and ASF.apr.rte filesets" + echo "Usage: $cmd [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]" + exit 1 +fi + +if [ ! -f "$apu_config" -a ! -f "$apu_config/configure.in" ]; then + echo "The apu source directory / apu-1-config could not be found" + echo "If available, install the ASF.apu.rte and ASF.apr.rte filesets" + echo "Usage: $cmd [--with-apr=[dir|file]] [--with-apr-util=[dir|file]]" + exit 1 +fi + +. build/aix/aixinfo +LAYOUT=AIX +TEMPDIR=/var/tmp/$USER/${NAME}.${VERSION} +rm -rf $TEMPDIR + +if [[ ! -e ./Makefile ]] # if Makefile exists go faster +then +# --with-mpm=worker \n\ + echo "+ ./configure \n\ + --enable-layout=$LAYOUT \n\ + --with-apr=$apr_config \n\ + --with-apr-util=$apu_config \n\ + --enable-mpms-shared=all \n\ + --enable-mods-shared=all \n\ + --disable-lua > build/aix/configure.out" + +# --with-mpm=worker \ + ./configure \ + --enable-layout=$LAYOUT \ + --with-apr=$apr_config \ + --with-apr-util=$apu_config \ + --enable-mpms-shared=all \ + --enable-mods-shared=all \ + --disable-lua > build/aix/configure.out + [[ $? -ne 0 ]] && echo './configure' returned an error && exit -1 +else + echo $0: using existing Makefile + echo $0: run make distclean to get a standard AIX configure + echo + ls -l ./Makefile config.* + echo +fi + +echo "+ make > build/aix/make.out" +make > build/aix/make.out + [[ $? -ne 0 ]] && echo 'make' returned an error && exit -1 + +echo "+ make install DESTDIR=$TEMPDIR > build/aix/install.out" +make install DESTDIR=$TEMPDIR > build/aix/install.out + [[ $? -ne 0 ]] && echo 'make install' returned an error && exit -1 + +echo "+ build/aix/mkinstallp.ksh $TEMPDIR > build/aix/mkinstallp.out" +build/aix/mkinstallp.ksh $TEMPDIR > build/aix/mkinstallp.out + [[ $? -ne 0 ]] && echo mkinstallp.ksh returned an error && exit -1 + +rm -rf $TEMPDIR + +# list installable fileset(s) +echo ======================== +installp -d build/aix -L +echo ======================== diff --git a/build/aix/mkinstallp.ksh b/build/aix/mkinstallp.ksh new file mode 100755 index 00000000000..12049fc3f53 --- /dev/null +++ b/build/aix/mkinstallp.ksh @@ -0,0 +1,201 @@ +#!/usr/bin/ksh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# minstallp.ksh # create an installp image of ${NAME} (defined in aixinfo) +# from TEMPDIR using mkinstallp (part of bos.adt.insttools) + +[[ $# == 0 ]] && echo $0: Syntax error && echo "Syntax: $0 " && exit -1 + +umask 022 +TEMPDIR=$1 +BASE=`pwd` +cd ${TEMPDIR} +[[ $? != 0 ]] && echo $0: ${TEMPDIR} -- bad directory && exit -1 + +# clean up side-effects from DEBUG passes - usr/local might be there as +# a circular link i.e. usr/local points at /usr/local +# as we are not using /usr/local for ASF packaging, remove it! +# mkinstallp seems to make usr/local -> /usr/local +[[ -f usr/local ]] && rm -f usr/local && echo removed unexpected usr/local !! +[[ -L usr/local ]] && rm -f usr/local && echo removed unexpected usr/local !! +[[ -d usr/local ]] && rm -rf usr/local && echo removed unexpected usr/local !! + +# use the aixinfo for PKG NAME VERSION etc labels +cd ${BASE} +. build/aix/aixinfo +# INFO=${BASE}/build/aix/.info +# mkdir -p $INFO +INFO=${BASE}/build/aix +template=${INFO}/${PKG}.${NAME}.${VERSION}.template +>$template + +# mkinstallp template definitions +# TODO: add AIX oslevel/uname information for package filename +package=$PKG +name=$NAME +vrmf=$VERSION +release=$RELEASE +descr="$NAME version ${VERSION} for $ARCH ${VENDOR}" + +# copy LICENSE information +# TODO: setup template so that license acceptance is required +# TODO: add Copyright Information for display during install +mkdir -p ${TEMPDIR}/usr/swlag/en_US +cp ${BASE}/LICENSE ${TEMPDIR}/usr/swlag/en_US/${PKG}.${NAME}.la + +cd ${TEMPDIR} +# remove files we do not want as "part" possibly +# left-over from a previous packaging +rm -rf .info lpp_name tmp usr/lpp +[[ $? -ne 0 ]] && echo $cmd: cleanup error && pwd && ls -ltr && exit -1 + +#if we are going to add extra symbolic links - do it now +[[ -r build/aix/aixlinks ]] && ksh build/aix/aixlinks + +# get the directory sizes in blocks +for d in etc opt var +do + if [[ -d $d/${NAME} ]] + then + set `du -s $d/${NAME}` + else + [[ -d $d ]] && set `du -s $d` + fi + # make sure the argument exists before using setting values + if [[ -d $d ]] + then + eval nm$d=/"$2" + let sz$d=$1 + fi +done + +files=./${NAME}.${VERSION} +cd ${TEMPDIR}/.. +find ${files} -type d -exec chmod og+rx {} \; +chmod -R go+r ${files} +chown -R 0.0 ${files} + +cat - <>$template +Package Name: ${PKG}.${NAME} +Package VRMF: ${VERSION}.${RELEASE} +Update: N +Fileset + Fileset Name: ${PKG}.${NAME}.rte + Fileset VRMF: ${VERSION}.${RELEASE} + Fileset Description: ${descr} + USRLIBLPPFiles + EOUSRLIBLPPFiles + Bosboot required: N + License agreement acceptance required: N + Name of license agreement: + Include license files in this package: N + Requisites: +EOF + +[[ $szetc -ne 0 ]] && echo " Upsize: ${nmetc} $szetc;" >> $template +[[ $szopt -ne 0 ]] && echo " Upsize: ${nmopt} $szopt;" >> $template +[[ $szvar -ne 0 ]] && echo " Upsize: ${nmvar} $szvar;" >> $template +echo " USRFiles" >> $template + +# USR part -- i.e. files in /usr and /opt +cd ${TEMPDIR}/.. +find ${files}/usr/swlag ${files}/opt \ + | sed -e s#^${files}## | sed -e "/^$/d" >>$template +echo " EOUSRFiles" >> $template + +if [[ $szetc -gt 0 || $szvar -gt 0 ]] +then +INSTROOT=${TEMPDIR}/usr/lpp/${PKG}.${NAME}/inst_root +mkdir -p ${INSTROOT} +cd ${TEMPDIR} +[[ $szetc -gt 0 ]] && find ./etc -type d | backup -if - | (cd ${INSTROOT}; restore -xqf -) >/dev/null +[[ $szvar -gt 0 ]] && find ./var -type d | backup -if - | (cd ${INSTROOT}; restore -xqf -) >/dev/null +cat - <>$template + ROOT Part: Y + ROOTFiles +EOF + +# ROOT part +cd ${TEMPDIR}/.. +find ${files}/etc ${files}/var \ + | sed -e s#^${files}## | sed -e "/^$/d" >>$template +else +# no ROOT parts to include +cat - <>$template + ROOT Part: N + ROOTFiles +EOF +fi +cat - <>$template + EOROOTFiles + Relocatable: N +EOFileset +EOF +# man pages as separate fileset +cd ${TEMPDIR} +if [[ -d usr/share/man ]] +then + # manual pages, space required calculation + set `du -s usr/share/man` + szman=$1 + descr="$NAME ${VERSION} man pages ${VENDOR}" + cat - <>$template +Fileset + Fileset Name: ${PKG}.${NAME}.man.en_US + Fileset VRMF: ${VERSION}.${RELEASE} + Fileset Description: ${descr} + USRLIBLPPFiles + EOUSRLIBLPPFiles + Bosboot required: N + License agreement acceptance required: N + Name of license agreement: + Include license files in this package: N + Requisites: +EOF + + echo " Upsize: /usr/share/man ${szman};" >> $template + echo " USRFiles" >> $template + cd ${TEMPDIR}/.. + find ${files}/usr/share | sed -e s#^${files}## | sed -e "/^$/d" >>$template + cat - <>$template + EOUSRFiles + ROOT Part: N + ROOTFiles + EOROOTFiles + Relocatable: N +EOFileset + +EOF +fi + +# use mkinstallp to create the fileset. result is in ${TEMPDIR}/tmp +# must actually sit in TEMPDIR for ROOT part processing to succeed +# also - need "empty" directories to exist, as they do not get copied +# in the inst_root part +cd ${TEMPDIR} +mkinstallp -d ${TEMPDIR} -T ${template} +[[ $? -ne 0 ]] && echo mkinstallp returned error status && exit -1 + +# copy package to build/aix +# create TOC +cp ${TEMPDIR}/tmp/$PKG.$NAME.$VERSION.0.bff ${BASE}/build/aix +cd ${BASE}/build/aix +rm -f $PKG.$NAME.$VERSION.$ARCH.I +mv $PKG.$NAME.$VERSION.0.bff $PKG.$NAME.$ARCH.$VERSION.I +rm -f .toc +inutoc . diff --git a/build/config-stubs b/build/config-stubs index 425dc80268a..3cc6991175a 100755 --- a/build/config-stubs +++ b/build/config-stubs @@ -15,7 +15,7 @@ # config files without a number are sorted before those with a number. # -configfiles=`find . -name "config*.m4" | \ +configfiles=`find os server modules support -name "config*.m4" | \ sed 's#\(.*/config\)\(.*\).m4#\20 \1\2.m4#' | \ sort | \ sed 's#.* ##'` diff --git a/build/config_vars.sh.in b/build/config_vars.sh.in index 4a6eddafccd..cbb4a39decc 100644 --- a/build/config_vars.sh.in +++ b/build/config_vars.sh.in @@ -42,7 +42,7 @@ test -n "@APU_CONFIG@" && APU_INCLUDEDIR="`${APU_CONFIG} --includedir`" installbuilddir="@exp_installbuilddir@" exec sed " -/^[A-Z_]*_LDADD/d +/^[A-Z0-9_]*_LDADD/d /MPM_LIB/d /APACHECTL_ULIMIT/d /[a-z]*_LTFLAGS/d diff --git a/build/cpR_noreplace.pl b/build/cpR_noreplace.pl new file mode 100644 index 00000000000..054f572e362 --- /dev/null +++ b/build/cpR_noreplace.pl @@ -0,0 +1,71 @@ +#!/usr/bin/perl -w +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +use strict; +use File::Basename; +use File::Copy; +use File::Find; +use File::Path qw(mkpath); + +require 5.010; + +my $srcdir; +my $destdir; + +sub process_file { + return if $_ =~ /^\./; + + my $rel_to_srcdir = substr($File::Find::name, length($srcdir)); + my $destfile = "$destdir$rel_to_srcdir"; + + if (-d $File::Find::name) { + # If the directory is empty, it won't get created. + # Otherwise it will get created when copying a file. + } + else { + if (-f $destfile) { + # Preserve it. + } + else { + # Create it. + my $dir = dirname($destfile); + if (! -e $dir) { + mkpath($dir) or die "Failed to create directory $dir: $!"; + } + copy($File::Find::name, $destfile) or die "Copy $File::Find::name->$destfile failed: $!"; + } + } +} + +$srcdir = shift; +$destdir = shift; +if (scalar(@ARGV) > 0) { + my $mode = shift; + if ($mode eq "ifdestmissing") { + # Normally the check for possible overwrite is performed on a + # file-by-file basis. If "ifdestmissing" is specified and the + # destination directory exists, bail out. + if (-d $destdir) { + print "[PRESERVING EXISTING SUBDIR $destdir]\n"; + exit(0); + } + } + else { + die "bad mode $mode"; + } +} +find(\&process_file, ($srcdir)); diff --git a/build/installwinconf.awk b/build/installwinconf.awk index ec2d2327fdc..8f8b9b2491c 100644 --- a/build/installwinconf.awk +++ b/build/installwinconf.awk @@ -1,5 +1,5 @@ # -# InstallConf.awk Apache HTTP 2.2 script to rewrite the @@ServerRoot@@ +# InstallConf.awk Apache HTTP 2.x script to rewrite the @@ServerRoot@@ # tags in httpd.conf.in to original\httpd.conf - then duplicate the # conf files to the 'live' configuration if they don't already exist. # @@ -8,10 +8,10 @@ # that ARGV[] params are -not- '\' escaped to process the C:\Foo\Bar Win32 # path format. Note that awk var=path would not succeed, since it -does- # escape backslashes in the assignment. Note also, a trailing space is -# required for paths, or the trailing quote following the backslash is +# required for paths, or the trailing quote following the backslash is # escaped, rather than parsed. # -BEGIN { +BEGIN { domainname = ARGV[1]; servername = ARGV[2]; serveradmin = ARGV[3]; @@ -46,13 +46,13 @@ BEGIN { usertree = "C:/Documents and Settings"; } - print "Installing Apache HTTP 2.0 server with" >tstfl; - print " DomainName = " domainname >tstfl; - print " ServerName = " servername >tstfl; - print " ServerAdmin = " serveradmin >tstfl; - print " ServerPort = " serverport >tstfl; - print " ServerSslPort = " serverport >tstfl; - print " ServerRoot = " serverroot >tstfl; + print "Installing Apache HTTP Server 2.x with" >tstfl; + print " DomainName = " domainname >tstfl; + print " ServerName = " servername >tstfl; + print " ServerAdmin = " serveradmin >tstfl; + print " ServerPort = " serverport >tstfl; + print " ServerSslPort = " serversslport >tstfl; + print " ServerRoot = " serverroot >tstfl; filelist["httpd.conf"] = "httpd.conf.in"; filelist["httpd-autoindex.conf"] = "httpd-autoindex.conf.in"; @@ -66,13 +66,14 @@ BEGIN { filelist["httpd-ssl.conf"] = "httpd-ssl.conf.in"; filelist["httpd-userdir.conf"] = "httpd-userdir.conf.in"; filelist["httpd-vhosts.conf"] = "httpd-vhosts.conf.in"; + filelist["proxy-html.conf"] = "proxy-html.conf.in"; for ( conffile in filelist ) { if ( conffile == "httpd.conf" ) { srcfl = sourceroot filelist[conffile]; dstfl = confdefault conffile; - bswarning = 1; + bswarning = 1; } else { srcfl = sourceroot "extra/" filelist[conffile]; dstfl = confdefault "extra/" conffile; @@ -81,128 +82,157 @@ BEGIN { while ( ( getline < srcfl ) > 0 ) { - if ( bswarning && /^$/ ) { - print "#" > dstfl; - print "# NOTE: Where filenames are specified, you must use forward slashes" > dstfl; - print "# instead of backslashes (e.g., \"c:/apache\" instead of \"c:\\apache\")." > dstfl; - print "# If a drive letter is omitted, the drive on which httpd.exe is located" > dstfl; - print "# will be used by default. It is recommended that you always supply" > dstfl; - print "# an explicit drive letter in absolute paths to avoid confusion." > dstfl; - bswarning = 0; + if ( bswarning && /^$/ ) { + print "#" > dstfl; + print "# NOTE: Where filenames are specified, you must use forward slashes" > dstfl; + print "# instead of backslashes (e.g., \"c:/apache\" instead of \"c:\\apache\")." > dstfl; + print "# If a drive letter is omitted, the drive on which httpd.exe is located" > dstfl; + print "# will be used by default. It is recommended that you always supply" > dstfl; + print "# an explicit drive letter in absolute paths to avoid confusion." > dstfl; + bswarning = 0; } - if ( /@@LoadModule@@/ ) { - print "LoadModule access_compat_module modules/mod_access_compat.so" > dstfl; - print "LoadModule actions_module modules/mod_actions.so" > dstfl; - print "LoadModule alias_module modules/mod_alias.so" > dstfl; - print "LoadModule asis_module modules/mod_asis.so" > dstfl; - print "LoadModule auth_basic_module modules/mod_auth_basic.so" > dstfl; - print "#LoadModule auth_digest_module modules/mod_auth_digest.so" > dstfl; - print "#LoadModule authn_anon_module modules/mod_authn_anon.so" > dstfl; - print "LoadModule authn_core_module modules/mod_authn_core.so" > dstfl; - print "#LoadModule authn_dbd_module modules/mod_authn_dbd.so" > dstfl; - print "#LoadModule authn_dbm_module modules/mod_authn_dbm.so" > dstfl; - print "LoadModule authn_file_module modules/mod_authn_file.so" > dstfl; - print "#LoadModule authn_socache_module modules/mod_authn_socache.so" > dstfl; - print "#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so" > dstfl; - print "LoadModule authz_core_module modules/mod_authz_core.so" > dstfl; - print "#LoadModule authz_dbd_module modules/mod_authz_dbd.so" > dstfl; - print "#LoadModule authz_dbm_module modules/mod_authz_dbm.so" > dstfl; - print "LoadModule authz_groupfile_module modules/mod_authz_groupfile.so" > dstfl; - print "LoadModule authz_host_module modules/mod_authz_host.so" > dstfl; - print "#LoadModule authz_owner_module modules/mod_authz_owner.so" > dstfl; - print "LoadModule authz_user_module modules/mod_authz_user.so" > dstfl; - print "LoadModule autoindex_module modules/mod_autoindex.so" > dstfl; - print "#LoadModule cache_module modules/mod_cache.so" > dstfl; - print "#LoadModule cache_disk_module modules/mod_cache_disk.so" > dstfl; - print "#LoadModule cern_meta_module modules/mod_cern_meta.so" > dstfl; - print "LoadModule cgi_module modules/mod_cgi.so" > dstfl; - print "#LoadModule charset_lite_module modules/mod_charset_lite.so" > dstfl; - print "#LoadModule dav_module modules/mod_dav.so" > dstfl; - print "#LoadModule dav_fs_module modules/mod_dav_fs.so" > dstfl; - print "#LoadModule dav_lock_module modules/mod_dav_lock.so" > dstfl; - print "#LoadModule dbd_module modules/mod_dbd.so" > dstfl; - print "#LoadModule deflate_module modules/mod_deflate.so" > dstfl; - print "LoadModule dir_module modules/mod_dir.so" > dstfl; - print "#LoadModule dumpio_module modules/mod_dumpio.so" > dstfl; - print "LoadModule env_module modules/mod_env.so" > dstfl; - print "#LoadModule expires_module modules/mod_expires.so" > dstfl; - print "#LoadModule ext_filter_module modules/mod_ext_filter.so" > dstfl; - print "#LoadModule file_cache_module modules/mod_file_cache.so" > dstfl; - print "#LoadModule filter_module modules/mod_filter.so" > dstfl; - print "#LoadModule headers_module modules/mod_headers.so" > dstfl; - print "#LoadModule ident_module modules/mod_ident.so" > dstfl; - print "#LoadModule imagemap_module modules/mod_imagemap.so" > dstfl; - print "LoadModule include_module modules/mod_include.so" > dstfl; - print "#LoadModule info_module modules/mod_info.so" > dstfl; - print "LoadModule isapi_module modules/mod_isapi.so" > dstfl; - print "#LoadModule ldap_module modules/mod_ldap.so" > dstfl; - print "#LoadModule logio_module modules/mod_logio.so" > dstfl; - print "LoadModule log_config_module modules/mod_log_config.so" > dstfl; - print "#LoadModule log_debug_module modules/mod_log_debug.so" > dstfl; - print "#LoadModule log_forensic_module modules/mod_log_forensic.so" > dstfl; - print "LoadModule mime_module modules/mod_mime.so" > dstfl; - print "#LoadModule mime_magic_module modules/mod_mime_magic.so" > dstfl; - print "LoadModule negotiation_module modules/mod_negotiation.so" > dstfl; - print "#LoadModule proxy_module modules/mod_proxy.so" > dstfl; - print "#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so" > dstfl; - print "#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so" > dstfl; - print "#LoadModule proxy_connect_module modules/mod_proxy_connect.so" > dstfl; - print "#LoadModule proxy_express_module modules/mod_proxy_express.so" > dstfl; - print "#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so" > dstfl; - print "#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so" > dstfl; - print "#LoadModule proxy_html_module modules/mod_proxy_html.so" > dstfl; - print "#LoadModule proxy_http_module modules/mod_proxy_http.so" > dstfl; - print "#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so" > dstfl; - print "#LoadModule reqtimeout_module modules/mod_reqtimeout.so" > dstfl; - print "#LoadModule reflector_module modules/mod_reflector.so" > dstfl; - print "#LoadModule rewrite_module modules/mod_rewrite.so" > dstfl; - print "LoadModule setenvif_module modules/mod_setenvif.so" > dstfl; - print "#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so" > dstfl; - print "#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so" > dstfl; - print "#LoadModule speling_module modules/mod_speling.so" > dstfl; - print "#LoadModule ssl_module modules/mod_ssl.so" > dstfl; - print "#LoadModule status_module modules/mod_status.so" > dstfl; - print "#LoadModule substitute_module modules/mod_substitute.so" > dstfl; - print "#LoadModule unique_id_module modules/mod_unique_id.so" > dstfl; - print "#LoadModule userdir_module modules/mod_userdir.so" > dstfl; - print "#LoadModule usertrack_module modules/mod_usertrack.so" > dstfl; - print "#LoadModule version_module modules/mod_version.so" > dstfl; - print "#LoadModule vhost_alias_module modules/mod_vhost_alias.so" > dstfl; - print "#LoadModule xml2enc_module modules/mod_xml2enc.so" > dstfl; - continue; - } - gsub( /^SSLMutex.*/, "SSLMutex default" ); - gsub( /@@ServerRoot@@/, serverroot ); - gsub( /@exp_cgidir@/, serverroot "/cgi-bin" ); - gsub( /@exp_sysconfdir@/, serverroot "/conf" ); - gsub( /@exp_errordir@/, serverroot "/error" ); - gsub( /@exp_htdocsdir@/, serverroot "/htdocs" ); - gsub( /@exp_iconsdir@/, serverroot "/icons" ); - gsub( /@exp_manualdir@/, serverroot "/manual" ); - gsub( /@exp_runtimedir@/, serverroot "/logs" ); - if ( gsub( /@exp_logfiledir@/, serverroot "/logs" ) || - gsub( /@rel_logfiledir@/, "logs" ) ) { - gsub( /_log"/, ".log\"" ) - } - gsub( /@rel_runtimedir@/, "logs" ); - gsub( /@rel_sysconfdir@/, "conf" ); - gsub( /\/home\/\*\/public_html/, \ + if ( /@@LoadModule@@/ ) { + print "LoadModule access_compat_module modules/mod_access_compat.so" > dstfl; + print "LoadModule actions_module modules/mod_actions.so" > dstfl; + print "LoadModule alias_module modules/mod_alias.so" > dstfl; + print "LoadModule allowmethods_module modules/mod_allowmethods.so" > dstfl; + print "LoadModule asis_module modules/mod_asis.so" > dstfl; + print "LoadModule auth_basic_module modules/mod_auth_basic.so" > dstfl; + print "#LoadModule auth_digest_module modules/mod_auth_digest.so" > dstfl; + print "#LoadModule auth_form_module modules/mod_auth_form.so" > dstfl; + print "#LoadModule authn_anon_module modules/mod_authn_anon.so" > dstfl; + print "LoadModule authn_core_module modules/mod_authn_core.so" > dstfl; + print "#LoadModule authn_dbd_module modules/mod_authn_dbd.so" > dstfl; + print "#LoadModule authn_dbm_module modules/mod_authn_dbm.so" > dstfl; + print "LoadModule authn_file_module modules/mod_authn_file.so" > dstfl; + print "#LoadModule authn_socache_module modules/mod_authn_socache.so" > dstfl; + print "#LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so" > dstfl; + print "#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so" > dstfl; + print "LoadModule authz_core_module modules/mod_authz_core.so" > dstfl; + print "#LoadModule authz_dbd_module modules/mod_authz_dbd.so" > dstfl; + print "#LoadModule authz_dbm_module modules/mod_authz_dbm.so" > dstfl; + print "LoadModule authz_groupfile_module modules/mod_authz_groupfile.so" > dstfl; + print "LoadModule authz_host_module modules/mod_authz_host.so" > dstfl; + print "#LoadModule authz_owner_module modules/mod_authz_owner.so" > dstfl; + print "LoadModule authz_user_module modules/mod_authz_user.so" > dstfl; + print "LoadModule autoindex_module modules/mod_autoindex.so" > dstfl; + print "#LoadModule buffer_module modules/mod_buffer.so" > dstfl; + print "#LoadModule cache_module modules/mod_cache.so" > dstfl; + print "#LoadModule cache_disk_module modules/mod_cache_disk.so" > dstfl; + print "#LoadModule cache_socache_module modules/mod_cache_socache.so" > dstfl; + print "#LoadModule cern_meta_module modules/mod_cern_meta.so" > dstfl; + print "LoadModule cgi_module modules/mod_cgi.so" > dstfl; + print "#LoadModule charset_lite_module modules/mod_charset_lite.so" > dstfl; + print "#LoadModule data_module modules/mod_data.so" > dstfl; + print "#LoadModule dav_module modules/mod_dav.so" > dstfl; + print "#LoadModule dav_fs_module modules/mod_dav_fs.so" > dstfl; + print "#LoadModule dav_lock_module modules/mod_dav_lock.so" > dstfl; + print "#LoadModule dbd_module modules/mod_dbd.so" > dstfl; + print "#LoadModule deflate_module modules/mod_deflate.so" > dstfl; + print "LoadModule dir_module modules/mod_dir.so" > dstfl; + print "#LoadModule dumpio_module modules/mod_dumpio.so" > dstfl; + print "LoadModule env_module modules/mod_env.so" > dstfl; + print "#LoadModule expires_module modules/mod_expires.so" > dstfl; + print "#LoadModule ext_filter_module modules/mod_ext_filter.so" > dstfl; + print "#LoadModule file_cache_module modules/mod_file_cache.so" > dstfl; + print "#LoadModule filter_module modules/mod_filter.so" > dstfl; + print "#LoadModule http2_module modules/mod_http2.so" > dstfl; + print "#LoadModule headers_module modules/mod_headers.so" > dstfl; + print "#LoadModule heartbeat_module modules/mod_heartbeat.so" > dstfl; + print "#LoadModule heartmonitor_module modules/mod_heartmonitor.so" > dstfl; + print "#LoadModule ident_module modules/mod_ident.so" > dstfl; + print "#LoadModule imagemap_module modules/mod_imagemap.so" > dstfl; + print "LoadModule include_module modules/mod_include.so" > dstfl; + print "#LoadModule info_module modules/mod_info.so" > dstfl; + print "LoadModule isapi_module modules/mod_isapi.so" > dstfl; + print "#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so" > dstfl; + print "#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so" > dstfl; + print "#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so" > dstfl; + print "#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so" > dstfl; + print "#LoadModule ldap_module modules/mod_ldap.so" > dstfl; + print "#LoadModule logio_module modules/mod_logio.so" > dstfl; + print "LoadModule log_config_module modules/mod_log_config.so" > dstfl; + print "#LoadModule log_debug_module modules/mod_log_debug.so" > dstfl; + print "#LoadModule log_forensic_module modules/mod_log_forensic.so" > dstfl; + print "#LoadModule lua_module modules/mod_lua.so" > dstfl; + print "#LoadModule macro_module modules/mod_macro.so" > dstfl; + print "LoadModule mime_module modules/mod_mime.so" > dstfl; + print "#LoadModule mime_magic_module modules/mod_mime_magic.so" > dstfl; + print "LoadModule negotiation_module modules/mod_negotiation.so" > dstfl; + print "#LoadModule proxy_module modules/mod_proxy.so" > dstfl; + print "#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so" > dstfl; + print "#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so" > dstfl; + print "#LoadModule proxy_connect_module modules/mod_proxy_connect.so" > dstfl; + print "#LoadModule proxy_express_module modules/mod_proxy_express.so" > dstfl; + print "#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so" > dstfl; + print "#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so" > dstfl; + print "#LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so" > dstfl; + print "#LoadModule proxy_html_module modules/mod_proxy_html.so" > dstfl; + print "#LoadModule proxy_http_module modules/mod_proxy_http.so" > dstfl; + print "#LoadModule proxy_http2_module modules/mod_proxy_http2.so" > dstfl; + print "#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so" > dstfl; + print "#LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so" > dstfl; + print "#LoadModule ratelimit_module modules/mod_ratelimit.so" > dstfl; + print "#LoadModule reflector_module modules/mod_reflector.so" > dstfl; + print "#LoadModule remoteip_module modules/mod_remoteip.so" > dstfl; + print "#LoadModule request_module modules/mod_request.so" > dstfl; + print "#LoadModule reqtimeout_module modules/mod_reqtimeout.so" > dstfl; + print "#LoadModule rewrite_module modules/mod_rewrite.so" > dstfl; + print "#LoadModule sed_module modules/mod_sed.so" > dstfl; + print "#LoadModule session_module modules/mod_session.so" > dstfl; + print "#LoadModule session_cookie_module modules/mod_session_cookie.so" > dstfl; + print "#LoadModule session_crypto_module modules/mod_session_crypto.so" > dstfl; + print "#LoadModule session_dbd_module modules/mod_session_dbd.so" > dstfl; + print "LoadModule setenvif_module modules/mod_setenvif.so" > dstfl; + print "#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so" > dstfl; + print "#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so" > dstfl; + print "#LoadModule socache_dbm_module modules/mod_socache_dbm.so" > dstfl; + print "#LoadModule socache_memcache_module modules/mod_socache_memcache.so" > dstfl; + print "#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so" > dstfl; + print "#LoadModule speling_module modules/mod_speling.so" > dstfl; + print "#LoadModule ssl_module modules/mod_ssl.so" > dstfl; + print "#LoadModule status_module modules/mod_status.so" > dstfl; + print "#LoadModule substitute_module modules/mod_substitute.so" > dstfl; + print "#LoadModule unique_id_module modules/mod_unique_id.so" > dstfl; + print "#LoadModule userdir_module modules/mod_userdir.so" > dstfl; + print "#LoadModule usertrack_module modules/mod_usertrack.so" > dstfl; + print "#LoadModule version_module modules/mod_version.so" > dstfl; + print "#LoadModule vhost_alias_module modules/mod_vhost_alias.so" > dstfl; + print "#LoadModule watchdog_module modules/mod_watchdog.so" > dstfl; + print "#LoadModule xml2enc_module modules/mod_xml2enc.so" > dstfl; + continue; + } + gsub( /@@ServerRoot@@/, serverroot ); + gsub( /@exp_cgidir@/, serverroot "/cgi-bin" ); + gsub( /@exp_sysconfdir@/, serverroot "/conf" ); + gsub( /@exp_errordir@/, serverroot "/error" ); + gsub( /@exp_htdocsdir@/, serverroot "/htdocs" ); + gsub( /@exp_iconsdir@/, serverroot "/icons" ); + gsub( /@exp_manualdir@/, serverroot "/manual" ); + gsub( /@exp_runtimedir@/, serverroot "/logs" ); + if ( gsub( /@exp_logfiledir@/, serverroot "/logs" ) || + gsub( /@rel_logfiledir@/, "logs" ) ) { + gsub( /_log"/, ".log\"" ) + } + gsub( /@rel_runtimedir@/, "logs" ); + gsub( /@rel_sysconfdir@/, "conf" ); + gsub( /\/home\/\*\/public_html/, \ usertree "/*/My Documents/My Website" ); - gsub( /UserDir public_html/, "UserDir \"My Documents/My Website\"" ); - gsub( /@@ServerName@@|www.example.com/, servername ); + gsub( /UserDir public_html/, "UserDir \"My Documents/My Website\"" ); + gsub( /@@ServerName@@|www.example.com/, servername ); gsub( /@@ServerAdmin@@|you@example.com/, serveradmin ); gsub( /@@DomainName@@|example.com/, domainname ); gsub( /@@Port@@/, serverport ); - gsub( /@@SSLPort@@|443/, serversslport ); + gsub( /@@SSLPort@@|443/, serversslport ); print $0 > dstfl; } close(srcfl); if ( close(dstfl) >= 0 ) { print "Rewrote " srcfl "\n to " dstfl > tstfl; - gsub(/\//, "\\", srcfl); if ( sourceroot != "docs/conf/" ) { - if (system("del \"" srcfl "\"")) { + gsub(/\//, "\\", srcfl); + if (system("del 2>NUL \"" srcfl "\"")) { print "Failed to remove " srcfl > tstfl; } else { print "Successfully removed " srcfl > tstfl; @@ -223,12 +253,12 @@ BEGIN { srcfl = confdefault filelist[conffile] conffile; dstfl = confroot filelist[conffile] conffile; if ( ( getline < dstfl ) < 0 ) { - while ( ( getline < srcfl ) > 0 ) { - print $0 > dstfl; - } + while ( ( getline < srcfl ) > 0 ) { + print $0 > dstfl; + } print "Duplicated " srcfl "\n to " dstfl > tstfl; } else { - print "Existing file " dstfl " preserved" > tstfl; + print "Existing file " dstfl " preserved" > tstfl; } close(srcfl); close(dstfl); @@ -237,7 +267,7 @@ BEGIN { if ( sourceroot != "docs/conf/" ) { srcfl = confdefault "installwinconf.awk"; gsub(/\//, "\\", srcfl); - if (system("del \"" srcfl "\"")) { + if (system("del 2>NUL \"" srcfl "\"")) { print "Failed to remove " srcfl > tstfl; } else { print "Successfully removed " srcfl > tstfl; @@ -245,3 +275,4 @@ BEGIN { } close(tstfl); } + diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk index 52f43e531c9..8a5338c2444 100644 --- a/build/make_nw_export.awk +++ b/build/make_nw_export.awk @@ -29,8 +29,8 @@ function add_symbol(sym_name) { #/ap_some_name/{next} /ap_mpm_pod_/{next} -/^[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { - sub("[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "") +/^[ \t]*(AP|DAV|CACHE)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ { + sub("[ \t]*(AP|DAV|CACHE)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "") sub("[(].*", "") sub("([^ ]* (^([ \t]*[(])))+", "") add_symbol($0) @@ -83,8 +83,8 @@ function add_symbol(sym_name) { } /^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;/ { - gsub(/[*;\n\r]/, "", $NF) - gsub(/\[.*\]/, "", $NF) + gsub(/[*;\n\r]/, "") + gsub(/\[.*\]/, "") add_symbol($NF) } diff --git a/build/mkconfNW.awk b/build/mkconfNW.awk index 52858bffc25..c0028cef0c7 100644 --- a/build/mkconfNW.awk +++ b/build/mkconfNW.awk @@ -14,8 +14,7 @@ # limitations under the License. BEGIN { - - A["ServerRoot"] = "SYS:/"BDIR + A["ServerRoot"] = "\${SRVROOT}" A["Port"] = PORT A["SSLPort"] = SSLPORT A["cgidir"] = "cgi-bin" @@ -39,9 +38,14 @@ BEGIN { B["runtimedir"] = A["runtimedir"] } +/^ServerRoot / { + print "Define SRVROOT \"SYS:/" BDIR "\"" + print "" +} /@@LoadModule@@/ { print "#LoadModule access_compat_module modules/accesscompat.nlm" print "#LoadModule actions_module modules/actions.nlm" + print "#LoadModule allowmethods_module modules/allowmethods.nlm" print "#LoadModule auth_basic_module modules/authbasc.nlm" print "#LoadModule auth_digest_module modules/authdigt.nlm" print "#LoadModule authn_anon_module modules/authnano.nlm" @@ -56,12 +60,15 @@ BEGIN { print "#LoadModule ldap_module modules/utilldap.nlm" print "#LoadModule asis_module modules/mod_asis.nlm" print "LoadModule autoindex_module modules/autoindex.nlm" + print "#LoadModule buffer_module modules/modbuffer.nlm" print "#LoadModule cern_meta_module modules/cernmeta.nlm" print "LoadModule cgi_module modules/mod_cgi.nlm" + print "#LoadModule data_module modules/mod_data.nlm" print "#LoadModule dav_module modules/mod_dav.nlm" print "#LoadModule dav_fs_module modules/moddavfs.nlm" print "#LoadModule dav_lock_module modules/moddavlk.nlm" print "#LoadModule expires_module modules/expires.nlm" + print "#LoadModule filter_module modules/mod_filter.nlm" print "#LoadModule ext_filter_module modules/extfiltr.nlm" print "#LoadModule file_cache_module modules/filecach.nlm" print "#LoadModule headers_module modules/headers.nlm" @@ -84,6 +91,8 @@ BEGIN { print "#LoadModule userdir_module modules/userdir.nlm" print "#LoadModule vhost_alias_module modules/vhost.nlm" if (MODSSL) { + print "#LoadModule socache_dbm_module modules/socachedbm.nlm" + print "#LoadModule socache_shmcb_module modules/socacheshmcb.nlm" print "#LoadModule ssl_module modules/mod_ssl.nlm" } print "" @@ -137,11 +146,11 @@ match ($0,/^$/) { } END { - if ((ARGV[1] ~ /httpd.conf.in/) && !BSDSKT) { + if ((ARGV[1] ~ /httpd.conf.in/) && !BSDSKT) { print "" print "#" print "# SecureListen: Allows you to securely bind Apache to specific IP addresses " - print "# and/or ports." + print "# and/or ports (mod_nwssl)." print "#" print "# Change this to SecureListen on specific IP addresses as shown below to " print "# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)" diff --git a/build/mkdep.perl b/build/mkdep.perl index 10815d24836..7f776d8553c 100644 --- a/build/mkdep.perl +++ b/build/mkdep.perl @@ -1,7 +1,5 @@ #!/usr/bin/perl # -# $Id$ -# # Created: Thu Aug 15 11:57:33 1996 too # Last modified: Mon Dec 27 09:23:56 1999 too # diff --git a/build/nw_export.inc b/build/nw_export.inc index 0d448ec77a8..a97a18191b6 100644 --- a/build/nw_export.inc +++ b/build/nw_export.inc @@ -50,6 +50,7 @@ #include "util_charset.h" #include "util_cookies.h" #include "util_ebcdic.h" +#include "util_fcgi.h" #include "util_filter.h" /*#include "util_ldap.h"*/ #include "util_md5.h" diff --git a/build/nw_ver.awk b/build/nw_ver.awk index 385cd658cd6..22c7bc431cd 100644 --- a/build/nw_ver.awk +++ b/build/nw_ver.awk @@ -35,13 +35,27 @@ BEGIN { ver_devbuild = $3; } } + + if (ver_devbuild) { + ver_dev = "-dev" + if (ARGV[2]) { + while ((getline < ARGV[2]) > 0) { + if (match ($0, /^\/repos\/asf\/!svn\/ver\/[0-9]+\/httpd\/httpd\/(trunk|branches\/[0-9]\.[0-9]\.x)$/)) { + gsub(/^\/repos\/asf\/!svn\/ver\/|\/httpd\/httpd\/(trunk|branches\/[0-9]\.[0-9]\.x)$/, "", $0) + ver_dev = svn_rev = "-r" $0 + } + } + } + } + ver_nlm = ver_major "," ver_minor "," ver_patch; - ver_str = ver_major "." ver_minor "." ver_patch (ver_devbuild ? "-dev" : ""); + ver_str = ver_major "." ver_minor "." ver_patch ver_dev; print "VERSION = " ver_nlm ""; print "VERSION_STR = " ver_str ""; print "VERSION_MAJMIN = " ver_major ver_minor ""; print "COPYRIGHT_STR = " copyright_str ""; + print "SVN_REVISION = " svn_rev ""; } diff --git a/build/rpm/htcacheclean.init b/build/rpm/htcacheclean.init index df30f1af315..5aa10ab2aad 100755 --- a/build/rpm/htcacheclean.init +++ b/build/rpm/htcacheclean.init @@ -48,7 +48,7 @@ fi # Path to htcacheclean, server binary, and short-form for messages. htcacheclean=${HTTPD-/usr/sbin/htcacheclean} lockfile=${LOCKFILE-/var/lock/subsys/${prog}} -pidfile=/var/log/httpd/${prog}.pid +pidfile=/var/run/${prog}.pid interval=${INTERVAL-10} cachepath=${CACHEPATH-/var/cache/httpd/cache-root} limit=${LIMIT-100M} diff --git a/build/rpm/httpd.init b/build/rpm/httpd.init index 909aeeb5e24..c8c67596532 100755 --- a/build/rpm/httpd.init +++ b/build/rpm/httpd.init @@ -22,7 +22,7 @@ # description: The Apache HTTP Server is an efficient and extensible \ # server implementing the current HTTP standards. # processname: httpd -# pidfile: /var/log/httpd/httpd.pid +# pidfile: /var/run/httpd.pid # config: /etc/sysconfig/httpd # ### BEGIN INIT INFO @@ -58,7 +58,7 @@ INITLOG_ARGS="" # work correctly with a thread-based MPM; notably PHP will refuse to start. httpd=${HTTPD-/usr/sbin/httpd} -pidfile=${PIDFILE-/var/log/httpd/${prog}.pid} +pidfile=${PIDFILE-/var/run/${prog}.pid} lockfile=${LOCKFILE-/var/lock/subsys/${prog}} RETVAL=0 diff --git a/build/rpm/httpd.spec.in b/build/rpm/httpd.spec.in index 1e3025c0e8d..271fc5c51ab 100644 --- a/build/rpm/httpd.spec.in +++ b/build/rpm/httpd.spec.in @@ -1,28 +1,27 @@ %define contentdir /var/www %define suexec_caller apache %define mmn APACHE_MMN -%define mpms prefork event Summary: Apache HTTP Server Name: httpd Version: APACHE_VERSION Release: APACHE_RELEASE -Epoch: APACHE_EPOCH00%{release} URL: http://httpd.apache.org/ Vendor: Apache Software Foundation Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 License: Apache License, Version 2.0 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: apr-devel, apr-util-devel, openldap-devel, db4-devel, expat-devel, findutils, perl, pkgconfig, zlib-devel, pcre-devel >= 5.0, distcache-devel >= 1.4 -BuildRequires: /usr/bin/apr-1-config, /usr/bin/apu-1-config -Requires: apr >= 1.4.2, apr-util >= 1.3.10, pcre-devel >= 5.0, gawk, /usr/bin/find, openldap -Requires: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv -Requires: sh-utils, textutils, /usr/sbin/useradd +BuildRequires: autoconf, perl, pkgconfig, findutils +BuildRequires: zlib-devel, libselinux-devel, libuuid-devel +BuildRequires: apr-devel >= 1.4.0, apr-util-devel >= 1.4.0, pcre-devel >= 5.0 +Requires: initscripts >= 8.36, /etc/mime.types +Obsoletes: httpd-suexec +Requires(pre): /usr/sbin/useradd +Requires(post): chkconfig Provides: webserver +Provides: mod_dav = %{version}-%{release}, httpd-suexec = %{version}-%{release} Provides: httpd-mmn = %{mmn} -Conflicts: thttpd -Obsoletes: apache, secureweb, mod_dav %description Apache is a powerful, full-featured, efficient, and freely-available @@ -33,12 +32,13 @@ Internet. Group: Development/Libraries Summary: Development tools for the Apache HTTP server. Obsoletes: secureweb-devel, apache-devel -Requires: libtool, httpd = %{epoch}:%{version}-%{release} -Requires: apr-devel >= 1.4.2, apr-util-devel >= 1.3.10 +Requires: apr-devel, apr-util-devel, pkgconfig, libtool +Requires: httpd = %{version}-%{release} %description devel The httpd-devel package contains the APXS binary and other files -that you need to build Dynamic Shared Objects (DSOs) for Apache. +that you need to build Dynamic Shared Objects (DSOs) for the +Apache HTTP Server. If you are installing the Apache HTTP server and you want to be able to compile or develop additional modules for Apache, you need @@ -47,6 +47,7 @@ to install this package. %package manual Group: Documentation Summary: Documentation for the Apache HTTP server. +Requires: httpd = :%{version}-%{release} Obsoletes: secureweb-manual, apache-manual %description manual @@ -54,12 +55,66 @@ The httpd-manual package contains the complete manual and reference guide for the Apache HTTP server. The information can also be found at http://httpd.apache.org/docs/. +%package tools +Group: System Environment/Daemons +Summary: Tools for use with the Apache HTTP Server + +%description tools +The httpd-tools package contains tools which can be used with +the Apache HTTP Server. + +%package -n mod_authnz_ldap +Group: System Environment/Daemons +Summary: LDAP modules for the Apache HTTP server +BuildRequires: openldap-devel +Requires: httpd = %{version}-%{release}, httpd-mmn = %{mmn}, apr-util-ldap + +%description -n mod_authnz_ldap +The mod_authnz_ldap module for the Apache HTTP server provides +authentication and authorization against an LDAP server, while +mod_ldap provides an LDAP cache. + +%package -n mod_lua +Group: System Environment/Daemons +Summary: Lua language module for the Apache HTTP server +BuildRequires: lua-devel +Requires: httpd = %{version}-%{release}, httpd-mmn = %{mmn} + +%description -n mod_lua +The mod_lua module for the Apache HTTP server allows the server to be +extended with scripts written in the Lua programming language. + +%package -n mod_proxy_html +Group: System Environment/Daemons +Summary: Proxy HTML filter modules for the Apache HTTP server +Epoch: 1 +BuildRequires: libxml2-devel +Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmn} + +%description -n mod_proxy_html +The mod_proxy_html module for the Apache HTTP server provides +a filter to rewrite HTML links within web content when used within +a reverse proxy environment. The mod_xml2enc module provides +enhanced charset/internationalisation support for mod_proxy_html. + +%package -n mod_socache_dc +Group: System Environment/Daemons +Summary: Distcache shared object cache module for the Apache HTTP server +BuildRequires: distcache-devel +Requires: httpd = %{version}-%{release}, httpd-mmn = %{mmn} + +%description -n mod_socache_dc +The mod_socache_dc module for the Apache HTTP server allows the shared +object cache to use the distcache shared caching mechanism. + %package -n mod_ssl Group: System Environment/Daemons Summary: SSL/TLS module for the Apache HTTP server +Epoch: 1 BuildRequires: openssl-devel -Requires: openssl, dev, /bin/cat -Requires: httpd, make, httpd-mmn = %{mmn} +Requires(post): openssl, /bin/cat +Requires(pre): httpd +Requires: httpd = 0:%{version}-%{release}, httpd-mmn = %{mmn} %description -n mod_ssl The mod_ssl module provides strong cryptography for the Apache Web @@ -82,73 +137,34 @@ fi # forcibly prevent use of bundled apr, apr-util, pcre rm -rf srclib/{apr,apr-util,pcre} -# Before configure; fix location of build dir in generated apxs -%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \ - support/apxs.in - -function mpmbuild() -{ -mpm=$1; shift -mkdir $mpm; pushd $mpm -../configure \ - --prefix=%{_sysconfdir}/httpd \ - --with-apr=/usr/bin/apr-1-config \ - --with-apr-util=/usr/bin/apu-1-config \ - --with-pcre=/usr/bin/pcre-config \ - --exec-prefix=%{_prefix} \ - --bindir=%{_bindir} \ - --sbindir=%{_sbindir} \ - --mandir=%{_mandir} \ +%configure \ + --enable-layout=RPM \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir}/httpd/conf \ --includedir=%{_includedir}/httpd \ --libexecdir=%{_libdir}/httpd/modules \ --datadir=%{contentdir} \ --with-installbuilddir=%{_libdir}/httpd/build \ - --with-mpm=$mpm \ + --enable-mpms-shared=all \ + --with-apr=%{_prefix} --with-apr-util=%{_prefix} \ --enable-suexec --with-suexec \ --with-suexec-caller=%{suexec_caller} \ --with-suexec-docroot=%{contentdir} \ --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \ --with-suexec-bin=%{_sbindir}/suexec \ - --with-suexec-uidmin=500 --with-suexec-gidmin=500 \ + --with-suexec-uidmin=500 --with-suexec-gidmin=100 \ --enable-pie \ - $* - -make %{?_smp_mflags} -popd -} - -# Build everything and the kitchen sink with the worker build -mpmbuild worker \ + --with-pcre \ --enable-mods-shared=all \ - --enable-ssl --with-ssl --enable-distcache \ - --enable-proxy \ - --enable-cache \ - --enable-disk-cache \ - --enable-ldap --enable-authnz-ldap \ - --enable-cgid \ - --enable-authn-anon --enable-authn-alias \ - --enable-session --enable-session-cookie \ - --enable-session-dbd \ + --enable-ssl --with-ssl --enable-socache-dc --enable-bucketeer \ + --enable-case-filter --enable-case-filter-in \ --disable-imagemap -# For the other MPMs, just build httpd and no optional modules -for f in %{mpms}; do - mpmbuild $f --enable-modules=none -done +make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT - -pushd worker make DESTDIR=$RPM_BUILD_ROOT install -popd - -# install alternative MPMs -for f in %{mpms}; do - install -m 755 ${f}/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.${f} -done # for holding mod_dav lock database mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav @@ -157,17 +173,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl touch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem} -# move the build directory to within the library directory -mv $RPM_BUILD_ROOT%{contentdir}/build $RPM_BUILD_ROOT%{_libdir}/httpd/build - # Make the MMN accessible to module packages echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn -# docroot -mkdir $RPM_BUILD_ROOT%{contentdir}/html - # Set up /var directories -rmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd/cache-root @@ -245,16 +254,6 @@ if readelf -d $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.so | grep TEXTREL; then exit 1 fi -# Verify that the same modules were built into the httpd binaries -./worker/httpd -l | grep -v worker > worker.mods -for mpm in %{mpms}; do - ./${mpm}/httpd -l | grep -v ${mpm} > ${mpm}.mods - if ! diff -u worker.mods ${mpm}.mods; then - : Different modules built into httpd binaries, will not proceed - exit 1 - fi -done - %clean rm -rf $RPM_BUILD_ROOT @@ -282,6 +281,7 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-multilang-errordoc.conf %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-userdir.conf %config(noreplace) %{_sysconfdir}/httpd/conf/extra/httpd-vhosts.conf +%config(noreplace) %{_sysconfdir}/httpd/conf/extra/proxy-html.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-autoindex.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-dav.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-default.conf @@ -292,44 +292,136 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-multilang-errordoc.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-userdir.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/httpd-vhosts.conf +%config(noreplace) %{_sysconfdir}/httpd/conf/original/extra/proxy-html.conf %config(noreplace) %{_sysconfdir}/httpd/conf/original/httpd.conf %config %{_sysconfdir}/logrotate.d/httpd %config %{_sysconfdir}/rc.d/init.d/httpd %config %{_sysconfdir}/rc.d/init.d/htcacheclean -%{_sbindir}/ab %{_sbindir}/fcgistarter %{_sbindir}/htcacheclean -%{_sbindir}/htdbm -%{_sbindir}/htdigest -%{_sbindir}/htpasswd -%{_sbindir}/logresolve %{_sbindir}/httpd -%{_sbindir}/httpd.worker -%{_sbindir}/httpd.event -%{_sbindir}/httxt2dbm %{_sbindir}/apachectl -%{_sbindir}/rotatelogs %attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec %dir %{_libdir}/httpd %dir %{_libdir}/httpd/modules -# everything but mod_ssl.so: -%{_libdir}/httpd/modules/mod_[a-r]*.so -%{_libdir}/httpd/modules/mod_s[lopetu]*.so -%{_libdir}/httpd/modules/mod_[t-z]*.so +%{_libdir}/httpd/modules/mod_access_compat.so +%{_libdir}/httpd/modules/mod_actions.so +%{_libdir}/httpd/modules/mod_alias.so +%{_libdir}/httpd/modules/mod_allowmethods.so +%{_libdir}/httpd/modules/mod_asis.so +%{_libdir}/httpd/modules/mod_auth_basic.so +%{_libdir}/httpd/modules/mod_auth_digest.so +%{_libdir}/httpd/modules/mod_auth_form.so +%{_libdir}/httpd/modules/mod_authn_anon.so +%{_libdir}/httpd/modules/mod_authn_core.so +%{_libdir}/httpd/modules/mod_authn_dbd.so +%{_libdir}/httpd/modules/mod_authn_dbm.so +%{_libdir}/httpd/modules/mod_authn_file.so +%{_libdir}/httpd/modules/mod_authn_socache.so +%{_libdir}/httpd/modules/mod_authz_core.so +%{_libdir}/httpd/modules/mod_authz_dbd.so +%{_libdir}/httpd/modules/mod_authz_dbm.so +%{_libdir}/httpd/modules/mod_authz_groupfile.so +%{_libdir}/httpd/modules/mod_authz_host.so +%{_libdir}/httpd/modules/mod_authz_owner.so +%{_libdir}/httpd/modules/mod_authz_user.so +%{_libdir}/httpd/modules/mod_autoindex.so +%{_libdir}/httpd/modules/mod_bucketeer.so +%{_libdir}/httpd/modules/mod_buffer.so +%{_libdir}/httpd/modules/mod_cache_disk.so +%{_libdir}/httpd/modules/mod_cache_socache.so +%{_libdir}/httpd/modules/mod_cache.so +%{_libdir}/httpd/modules/mod_case_filter.so +%{_libdir}/httpd/modules/mod_case_filter_in.so +%{_libdir}/httpd/modules/mod_cgid.so +%{_libdir}/httpd/modules/mod_charset_lite.so +%{_libdir}/httpd/modules/mod_data.so +%{_libdir}/httpd/modules/mod_dav_fs.so +%{_libdir}/httpd/modules/mod_dav_lock.so +%{_libdir}/httpd/modules/mod_dav.so +%{_libdir}/httpd/modules/mod_dbd.so +%{_libdir}/httpd/modules/mod_deflate.so +%{_libdir}/httpd/modules/mod_dialup.so +%{_libdir}/httpd/modules/mod_dir.so +%{_libdir}/httpd/modules/mod_dumpio.so +%{_libdir}/httpd/modules/mod_echo.so +%{_libdir}/httpd/modules/mod_env.so +%{_libdir}/httpd/modules/mod_expires.so +%{_libdir}/httpd/modules/mod_ext_filter.so +%{_libdir}/httpd/modules/mod_file_cache.so +%{_libdir}/httpd/modules/mod_filter.so +%{_libdir}/httpd/modules/mod_headers.so +%{_libdir}/httpd/modules/mod_heartbeat.so +%{_libdir}/httpd/modules/mod_heartmonitor.so +%{_libdir}/httpd/modules/mod_include.so +%{_libdir}/httpd/modules/mod_info.so +%{_libdir}/httpd/modules/mod_lbmethod_bybusyness.so +%{_libdir}/httpd/modules/mod_lbmethod_byrequests.so +%{_libdir}/httpd/modules/mod_lbmethod_bytraffic.so +%{_libdir}/httpd/modules/mod_lbmethod_heartbeat.so +%{_libdir}/httpd/modules/mod_log_config.so +%{_libdir}/httpd/modules/mod_log_debug.so +%{_libdir}/httpd/modules/mod_log_forensic.so +%{_libdir}/httpd/modules/mod_logio.so +%{_libdir}/httpd/modules/mod_macro.so +%{_libdir}/httpd/modules/mod_mime_magic.so +%{_libdir}/httpd/modules/mod_mime.so +%{_libdir}/httpd/modules/mod_mpm_event.so +%{_libdir}/httpd/modules/mod_mpm_prefork.so +%{_libdir}/httpd/modules/mod_mpm_worker.so +%{_libdir}/httpd/modules/mod_negotiation.so +%{_libdir}/httpd/modules/mod_proxy_ajp.so +%{_libdir}/httpd/modules/mod_proxy_balancer.so +%{_libdir}/httpd/modules/mod_proxy_connect.so +%{_libdir}/httpd/modules/mod_proxy_express.so +%{_libdir}/httpd/modules/mod_proxy_fcgi.so +%{_libdir}/httpd/modules/mod_proxy_fdpass.so +%{_libdir}/httpd/modules/mod_proxy_ftp.so +%{_libdir}/httpd/modules/mod_proxy_http.so +%{_libdir}/httpd/modules/mod_proxy_scgi.so +%{_libdir}/httpd/modules/mod_proxy_wstunnel.so +%{_libdir}/httpd/modules/mod_proxy.so +%{_libdir}/httpd/modules/mod_ratelimit.so +%{_libdir}/httpd/modules/mod_reflector.so +%{_libdir}/httpd/modules/mod_remoteip.so +%{_libdir}/httpd/modules/mod_reqtimeout.so +%{_libdir}/httpd/modules/mod_request.so +%{_libdir}/httpd/modules/mod_rewrite.so +%{_libdir}/httpd/modules/mod_sed.so +%{_libdir}/httpd/modules/mod_session_cookie.so +%{_libdir}/httpd/modules/mod_session_crypto.so +%{_libdir}/httpd/modules/mod_session_dbd.so +%{_libdir}/httpd/modules/mod_session.so +%{_libdir}/httpd/modules/mod_setenvif.so +%{_libdir}/httpd/modules/mod_slotmem_plain.so +%{_libdir}/httpd/modules/mod_slotmem_shm.so +%{_libdir}/httpd/modules/mod_socache_dbm.so +%{_libdir}/httpd/modules/mod_socache_memcache.so +%{_libdir}/httpd/modules/mod_socache_shmcb.so +%{_libdir}/httpd/modules/mod_speling.so +%{_libdir}/httpd/modules/mod_status.so +%{_libdir}/httpd/modules/mod_substitute.so +%{_libdir}/httpd/modules/mod_suexec.so +%{_libdir}/httpd/modules/mod_unique_id.so +%{_libdir}/httpd/modules/mod_unixd.so +%{_libdir}/httpd/modules/mod_userdir.so +%{_libdir}/httpd/modules/mod_usertrack.so +%{_libdir}/httpd/modules/mod_version.so +%{_libdir}/httpd/modules/mod_vhost_alias.so +%{_libdir}/httpd/modules/mod_watchdog.so %dir %{contentdir} %dir %{contentdir}/cgi-bin -%dir %{contentdir}/htdocs %dir %{contentdir}/html %dir %{contentdir}/icons %dir %{contentdir}/error %dir %{contentdir}/error/include %{contentdir}/icons/* %{contentdir}/error/README -%{contentdir}/htdocs/index.html +%{contentdir}/html/index.html %config(noreplace) %{contentdir}/error/*.var %config(noreplace) %{contentdir}/error/include/*.html @@ -339,19 +431,53 @@ rm -rf $RPM_BUILD_ROOT %attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/cache-root %{_mandir}/man1/* -%{_mandir}/man8/ab* -%{_mandir}/man8/rotatelogs* -%{_mandir}/man8/logresolve* %{_mandir}/man8/suexec* %{_mandir}/man8/apachectl.8* %{_mandir}/man8/httpd.8* %{_mandir}/man8/htcacheclean.8* +%{_mandir}/man8/fcgistarter.8* %files manual %defattr(-,root,root) %{contentdir}/manual %{contentdir}/error/README +%files tools +%defattr(-,root,root) +%{_bindir}/ab +%{_bindir}/htdbm +%{_bindir}/htdigest +%{_bindir}/htpasswd +%{_bindir}/logresolve +%{_bindir}/httxt2dbm +%{_sbindir}/rotatelogs +%{_mandir}/man1/htdbm.1* +%{_mandir}/man1/htdigest.1* +%{_mandir}/man1/htpasswd.1* +%{_mandir}/man1/httxt2dbm.1* +%{_mandir}/man1/ab.1* +%{_mandir}/man1/logresolve.1* +%{_mandir}/man8/rotatelogs.8* +%doc LICENSE NOTICE + +%files -n mod_authnz_ldap +%defattr(-,root,root) +%{_libdir}/httpd/modules/mod_ldap.so +%{_libdir}/httpd/modules/mod_authnz_ldap.so + +%files -n mod_lua +%defattr(-,root,root) +%{_libdir}/httpd/modules/mod_lua.so + +%files -n mod_proxy_html +%defattr(-,root,root) +%{_libdir}/httpd/modules/mod_proxy_html.so +%{_libdir}/httpd/modules/mod_xml2enc.so + +%files -n mod_socache_dc +%defattr(-,root,root) +%{_libdir}/httpd/modules/mod_socache_dc.so + %files -n mod_ssl %defattr(-,root,root) %{_libdir}/httpd/modules/mod_ssl.so @@ -365,11 +491,12 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(-,root,root) %{_includedir}/httpd -%{_sbindir}/apxs +%{_bindir}/apxs %{_sbindir}/checkgid -%{_sbindir}/dbmmanage +%{_bindir}/dbmmanage %{_sbindir}/envvars* -%{_mandir}/man8/apxs.8* +%{_mandir}/man1/dbmmanage.1* +%{_mandir}/man1/apxs.1* %dir %{_libdir}/httpd/build %{_libdir}/httpd/build/*.mk %{_libdir}/httpd/build/instdso.sh diff --git a/build/rules.mk.in b/build/rules.mk.in index 2bf16fe6787..a1804fa9c5c 100644 --- a/build/rules.mk.in +++ b/build/rules.mk.in @@ -22,31 +22,34 @@ # the user-defined flags can always override the configure ones, if needed. # Note that includes are listed after the flags because -I options have # left-to-right precedence and CPPFLAGS may include user-defined overrides. +# The "MOD_" prefixed variable are provided to allow modules to insert their +# (per-subdirectory) settings through definitions in modules.mk, with highest +# precedence. # -ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS) -ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS) -ALL_CXXFLAGS = $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS) -ALL_LDFLAGS = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS) -ALL_LIBS = $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS) -ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) +ALL_CFLAGS = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS) +ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS) +ALL_CXXFLAGS = $(MOD_CXXFLAGS) $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS) +ALL_LDFLAGS = $(MOD_LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS) +ALL_LIBS = $(MOD_LIBS) $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS) +ALL_INCLUDES = $(MOD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) # Compile commands BASE_CC = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) BASE_CXX = $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES) -COMPILE = $(BASE_CC) @PICFLAGS@ -CXX_COMPILE = $(BASE_CXX) @PICFLAGS@ +COMPILE = $(BASE_CC) $(PICFLAGS) +CXX_COMPILE = $(BASE_CXX) $(PICFLAGS) -SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) @SHLTCFLAGS@ -c $< && touch $@ -SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CXX) @SHLTCFLAGS@ -c $< && touch $@ +SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) $(SHLTCFLAGS) -c $< && touch $@ +SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CXX) $(SHLTCFLAGS) -c $< && touch $@ -LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) @LTCFLAGS@ -c $< && touch $@ -LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) @LTCFLAGS@ -c $< && touch $@ +LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(LTCFLAGS) -c $< && touch $@ +LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) $(LTCFLAGS) -c $< && touch $@ # Link-related commands -LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) @PILDFLAGS@ $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ +LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(PILDFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ SH_LINK = $(SH_LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@ MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ @@ -166,9 +169,15 @@ local-extraclean: local-distclean x-local-extraclean fi program-install: $(TARGETS) $(SHARED_TARGETS) - @if test -n '$(PROGRAMS)'; then \ + @if test -n '$(bin_PROGRAMS)'; then \ + test -d $(DESTDIR)$(bindir) || $(MKINSTALLDIRS) $(DESTDIR)$(bindir); \ + list='$(bin_PROGRAMS)'; for i in $$list; do \ + $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir); \ + done; \ + fi + @if test -n '$(sbin_PROGRAMS)'; then \ test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir); \ - list='$(PROGRAMS)'; for i in $$list; do \ + list='$(sbin_PROGRAMS)'; for i in $$list; do \ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir); \ done; \ fi diff --git a/build/win32/httpd.rc b/build/win32/httpd.rc index 0c557ee1e02..06013f695e8 100644 --- a/build/win32/httpd.rc +++ b/build/win32/httpd.rc @@ -31,7 +31,7 @@ #ifdef ICON_FILE -1 ICON DISCARDABLE ICON_FILE +1 ICON DISCARDABLE APR_STRINGIFY(ICON_FILE) #endif #define LONG_NAME_STR APR_STRINGIFY(LONG_NAME) diff --git a/buildconf b/buildconf index 718cad19d4a..a58845d7c4a 100755 --- a/buildconf +++ b/buildconf @@ -118,7 +118,7 @@ if [ $apr_major_version -lt 2 ] ; then echo "or specify the location of the source with " echo "--with-apr-util=[path to apr-util]:" echo "" - echo " svn co http://svn.apache.org/repos/asf/apr/apr-util/trunk srclib/apr-util" + echo " svn co http://svn.apache.org/repos/asf/apr/apr-util/branches/1.5.x srclib/apr-util" echo "" should_exit=1 fi diff --git a/config.layout b/config.layout index af28f9f08f0..35a325ac03b 100644 --- a/config.layout +++ b/config.layout @@ -298,3 +298,75 @@ installbuilddir: ${prefix}/usr/share/apache2/build errordir: ${datadir}/error + +# Generic RPM layout + + prefix: /usr + exec_prefix: ${prefix} + bindir: ${prefix}/bin + sbindir: ${prefix}/sbin + libdir: ${prefix}/lib + libexecdir: ${libdir}/httpd/modules + mandir: ${prefix}/share/man + sysconfdir: /etc/httpd/conf + installbuilddir: ${libdir}/httpd/build + includedir: ${prefix}/include/httpd + localstatedir: /var + datadir: ${localstatedir}/www + errordir: ${datadir}/error + iconsdir: ${datadir}/icons + htdocsdir: ${datadir}/html + manualdir: ${datadir}/manual + cgidir: ${datadir}/cgi-bin + runtimedir: ${localstatedir}/run + logfiledir: ${localstatedir}/log/httpd + proxycachedir: ${localstatedir}/cache/httpd/cache-root + + +# AIX layout + + prefix: /opt/httpd + exec_prefix: /opt/httpd + bindir: ${exec_prefix}/bin + sbindir: ${exec_prefix}/sbin + libdir: ${exec_prefix}/lib + libexecdir: ${exec_prefix}/libexec + mandir: /usr/share/man + sysconfdir: /etc/httpd + datadir: /var/httpd + installbuilddir: ${datadir}/build + errordir: ${datadir}/error + htdocsdir: ${datadir}/htdocs + cgidir: ${datadir}/cgi-bin + iconsdir: ${prefix}/icons + manualdir: ${prefix}/manual + includedir: ${prefix}/include + localstatedir: /var/httpd + runtimedir: ${localstatedir}/run + logfiledir: ${localstatedir}/logs + proxycachedir: ${localstatedir}/proxy + + +# FHS layout + + prefix: /usr + exec_prefix: ${prefix} + bindir: ${prefix}/bin + sbindir: ${prefix}/sbin + libdir: ${prefix}/lib/httpd + libexecdir: ${prefix}/lib/httpd/modules + installbuilddir: ${prefix}/lib/httpd/build + mandir: ${prefix}/man + sysconfdir: /etc/httpd + datadir: /srv/httpd + iconsdir: ${datadir}/icons + htdocsdir: ${datadir}/htdocs + manualdir: ${htdocsdir}/manual + cgidir: ${datadir}/cgi-bin + errordir: ${datadir}/error + includedir: ${prefix}/include/httpd + localstatedir: /var + runtimedir: ${localstatedir}/run/httpd + logfiledir: ${localstatedir}/log/httpd + proxycachedir: ${localstatedir}/cache/httpd + diff --git a/configure.in b/configure.in index 9a32f686176..7ae20b83d03 100644 --- a/configure.in +++ b/configure.in @@ -10,6 +10,14 @@ AC_INIT(ABOUT_APACHE) AC_CONFIG_HEADER(include/ap_config_auto.h) AC_CONFIG_AUX_DIR(build) +dnl Absolute source/build directory +abs_srcdir=`(cd $srcdir && pwd)` +abs_builddir=`pwd` + +dnl Ensure that the httpd version is included +HTTPD_VERSION=`$abs_srcdir/build/get-version.sh all $abs_srcdir/include/ap_release.h AP_SERVER` +HTTPD_MMN=`$abs_srcdir/build/get-version.sh mmn $abs_srcdir/include/ap_mmn.h MODULE_MAGIC_NUMBER` + dnl # dnl # Include our own M4 macros along with those for APR and libtool dnl # @@ -72,15 +80,29 @@ AC_CANONICAL_SYSTEM orig_prefix="$prefix" -echo $ac_n "${nl}Configuring Apache Portable Runtime library ...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Configuring Apache Portable Runtime library...]) +AC_MSG_NOTICE([]) AC_ARG_WITH(included-apr, APACHE_HELP_STRING(--with-included-apr,Use bundled copies of APR/APR-Util)) if test "x$with_included_apr" = "xyes"; then - apr_found=reconfig + apr_found=reconfig + if test ! -d srclib/apr && test ! -d $srcdir/srclib/apr; then + AC_MSG_ERROR([Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.]) + fi else - APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2) + APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2, [ + version=`$apr_config --version` + case x${version} in + x1.[[0-3]].*) + AC_MSG_WARN([APR version 1.4.0 or later is required, found $version]) + apr_acceptable=no + ;; + esac + unset version + ]) fi if test "$apr_found" = "no"; then @@ -119,12 +141,17 @@ APR_VERSION=`$apr_config --version` apr_major_version=`echo ${APR_VERSION} | sed 's,\..*,,'` APR_CONFIG="$APR_BINDIR/apr-${apr_major_version}-config" -echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Configuring Apache Portable Runtime Utility library...]) +AC_MSG_NOTICE([]) if test "x${apr_major_version}" = "x2"; then - apu_found=obsolete + apu_found=obsolete elif test "x$with_included_apr" = "xyes"; then - apu_found=reconfig + apu_found=reconfig + if test ! -d srclib/apr-util && test ! -d $srcdir/srclib/apr-util; then + AC_MSG_ERROR([Bundled APR-Util requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.]) + fi else dnl If httpd is buildconf'ed against an apr 2.x tree, then 1.x dnl isn't supported. @@ -185,10 +212,6 @@ if test "x${cache_file}" = "x/dev/null"; then export CC; export CPP fi -dnl Absolute source/build directory -abs_srcdir=`(cd $srcdir && pwd)` -abs_builddir=`pwd` - AC_ARG_WITH(pcre, APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library)) @@ -203,6 +226,11 @@ if test "$PCRE_CONFIG" != "false"; then if $PCRE_CONFIG --version >/dev/null 2>&1; then :; else AC_MSG_ERROR([Did not find pcre-config script at $PCRE_CONFIG]) fi + case `$PCRE_CONFIG --version` in + [[1-5].*]) + AC_MSG_ERROR([Need at least pcre version 6.0]) + ;; + esac AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG]) APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`]) APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`]) @@ -211,7 +239,9 @@ else fi APACHE_SUBST(PCRE_LIBS) -echo $ac_n "${nl}Configuring Apache httpd ...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Configuring Apache httpd...]) +AC_MSG_NOTICE([]) dnl If the source dir is not equal to the build dir, dnl then we are running in VPATH mode. @@ -233,7 +263,9 @@ APR_ADDTO(INCLUDES, $APU_INCLUDES) dnl Add in path to PCRE includes APR_ADDTO(INCLUDES, $PCRE_INCLUDES) -echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Applying OS-specific hints for httpd...]) +AC_MSG_NOTICE([]) case $host in *os2*) @@ -283,10 +315,11 @@ case $host in ;; *-linux-*) case `uname -r` in - 2.[[2-9]]* ) - APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) + # Unserialized accept() was not recommended until Linux 2.2. + [[01]].* | 2.[[01]]* ) ;; * ) + APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) ;; esac ;; @@ -299,7 +332,7 @@ case $host in dnl solaris 8 and above don't have a thundering herd dnl not sure about rev's before this one. case `uname -r` in - 5.[567]*) + 5.[[567]]*) ;; * ) APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) @@ -408,7 +441,8 @@ strings.h \ sys/prctl.h \ sys/processor.h \ sys/sem.h \ -sys/sdt.h +sys/sdt.h \ +sys/loadavg.h ) AC_HEADER_SYS_WAIT @@ -442,7 +476,8 @@ bindprocessor \ prctl \ timegm \ getpgid \ -fopen64 +fopen64 \ +getloadavg ) dnl confirm that a void pointer is large enough to store a long integer @@ -504,8 +539,10 @@ DTRACE=true AC_ARG_ENABLE(dtrace,APACHE_HELP_STRING(--enable-dtrace,Enable DTrace probes), [ enable_dtrace=$enableval - APR_ADDTO(CPPFLAGS, -DAPR_DTRACE_PROVIDER) - AC_MSG_ERROR('DTrace Support in the build system is not complete. Patches Welcome!') + if test "$enableval" = "yes"; then + APR_ADDTO(CPPFLAGS, -DAPR_DTRACE_PROVIDER) + AC_MSG_ERROR('DTrace Support in the build system is not complete. Patches Welcome!') + fi ], [ enable_dtrace=no @@ -529,44 +566,70 @@ APACHE_SUBST(DTRACE) AC_ARG_ENABLE(hook-probes,APACHE_HELP_STRING(--enable-hook-probes,Enable APR hook probes), [ - AC_DEFINE(AP_HOOK_PROBES_ENABLED, 1, - [Enable the APR hook probes capability, reading from ap_hook_probes.h]) - APR_ADDTO(INTERNAL_CPPFLAGS, -DAP_HOOK_PROBES_ENABLED) + if test "$enableval" = "yes"; then + AC_DEFINE(AP_HOOK_PROBES_ENABLED, 1, + [Enable the APR hook probes capability, reading from ap_hook_probes.h]) + APR_ADDTO(INTERNAL_CPPFLAGS, -DAP_HOOK_PROBES_ENABLED) + fi ])dnl AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable fatal exception hook), [ - AC_DEFINE(AP_ENABLE_EXCEPTION_HOOK, 1, - [Allow modules to run hook after a fatal exception]) + if test "$enableval" = "yes"; then + AC_DEFINE(AP_ENABLE_EXCEPTION_HOOK, 1, + [Allow modules to run hook after a fatal exception]) + fi ])dnl -AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings), +AC_ARG_ENABLE(load-all-modules,APACHE_HELP_STRING(--enable-load-all-modules,Load all modules), [ - APR_ADDTO(CPPFLAGS, -DAP_DEBUG) - if test "$GCC" = "yes"; then - APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith]) - APACHE_ADD_GCC_CFLAG([-Wdeclaration-after-statement]) - APACHE_ADD_GCC_CFLAG([-Werror=declaration-after-statement]) - APACHE_ADD_GCC_CFLAG([-Wformat]) - APACHE_ADD_GCC_CFLAG([-Wformat-security]) - APACHE_ADD_GCC_CFLAG([-Werror=format-security]) - elif test "$AIX_XLC" = "yes"; then - APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + LOAD_ALL_MODULES=$enableval + AC_MSG_NOTICE([Setting "LOAD_ALL_MODULES" to $LOAD_ALL_MODULES]) +], +[ + LOAD_ALL_MODULES="no" +]) + +AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings and load all compiled modules), +[ + if test "$enableval" = "yes"; then + APR_ADDTO(CPPFLAGS, -DAP_DEBUG) + if test "$GCC" = "yes"; then + APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith]) + APACHE_ADD_GCC_CFLAG([-std=c89]) + APACHE_ADD_GCC_CFLAG([-Werror]) + APACHE_ADD_GCC_CFLAG([-Wdeclaration-after-statement]) + APACHE_ADD_GCC_CFLAG([-Wformat]) + APACHE_ADD_GCC_CFLAG([-Wformat-security]) + APACHE_ADD_GCC_CFLAG([-Wunused]) + elif test "$AIX_XLC" = "yes"; then + APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + fi + if test "x$enable_load_all_modules" = "x"; then + LOAD_ALL_MODULES=yes + AC_MSG_NOTICE([Maintainer mode setting "LOAD_ALL_MODULES" to $LOAD_ALL_MODULES]) + fi + if test "x$enable_bucketeer" = "x"; then + enable_bucketeer=yes + AC_MSG_NOTICE([Maintainer mode setting "enable_bucketeer" to yes]) + fi fi ])dnl AC_ARG_ENABLE(debugger-mode,APACHE_HELP_STRING(--enable-debugger-mode,Turn on debugging and compile time warnings and turn off optimization), [ - APR_ADDTO(CPPFLAGS, -DAP_DEBUG) - if test "$GCC" = "yes"; then - APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -O0]) - APACHE_ADD_GCC_CFLAG([-Wdeclaration-after-statement]) - APACHE_ADD_GCC_CFLAG([-Werror=declaration-after-statement]) - APACHE_ADD_GCC_CFLAG([-Wformat]) - APACHE_ADD_GCC_CFLAG([-Wformat-security]) - APACHE_ADD_GCC_CFLAG([-Werror=format-security]) - elif test "$AIX_XLC" = "yes"; then - APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + if test "$enableval" = "yes"; then + APR_ADDTO(CPPFLAGS, -DAP_DEBUG) + if test "$GCC" = "yes"; then + APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -O0]) + APACHE_ADD_GCC_CFLAG([-Wdeclaration-after-statement]) + APACHE_ADD_GCC_CFLAG([-Werror=declaration-after-statement]) + APACHE_ADD_GCC_CFLAG([-Wformat]) + APACHE_ADD_GCC_CFLAG([-Wformat-security]) + APACHE_ADD_GCC_CFLAG([-Werror=format-security]) + elif test "$AIX_XLC" = "yes"; then + APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + fi fi ])dnl @@ -590,8 +653,8 @@ if test "$enable_pie" = "yes"; then AC_ERROR([--enable-pie requested but $CC failed using PIE flags]) fi fi -AC_SUBST(PICFLAGS) -AC_SUBST(PILDFLAGS) +APACHE_SUBST(PICFLAGS) +APACHE_SUBST(PILDFLAGS) prefix="$orig_prefix" APACHE_ENABLE_MODULES @@ -712,7 +775,10 @@ AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets ], [ case $host in - *freebsd5*|*netbsd*|*openbsd*) + *freebsd[[1234]].*) + v4mapped=yes + ;; + *freebsd*|*netbsd*|*openbsd*) v4mapped=no ;; *) @@ -730,14 +796,6 @@ if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then [Allow IPv4 connections on IPv6 listening sockets]) fi -AC_ARG_ENABLE(load-all-modules,APACHE_HELP_STRING(--enable-load-all-modules,Load all modules), -[ - LOAD_ALL_MODULES=$enableval -], -[ - LOAD_ALL_MODULES="no" -]) - APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) APACHE_FAST_OUTPUT(os/Makefile server/Makefile) APACHE_FAST_OUTPUT(support/Makefile) @@ -747,7 +805,16 @@ if test -d ./test; then fi dnl ## Finalize the variables -echo $ac_n "${nl}Restore user-defined environment settings...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Restore user-defined environment settings...]) +AC_MSG_NOTICE([]) + +APACHE_CONF_SEL_CC=${CC} +APACHE_CONF_SEL_CFLAGS=${CFLAGS} +APACHE_CONF_SEL_LDFLAGS=${LDFLAGS} +APACHE_CONF_SEL_LIBS=${LIBS} +APACHE_CONF_SEL_CPPFLAGS=${CPPFLAGS} +APACHE_CONF_SEL_CPP=${CPP} APR_RESTORE_THE_ENVIRONMENT(CPPFLAGS, EXTRA_) APR_RESTORE_THE_ENVIRONMENT(CFLAGS, EXTRA_) @@ -756,7 +823,9 @@ APR_RESTORE_THE_ENVIRONMENT(LDFLAGS, EXTRA_) APR_RESTORE_THE_ENVIRONMENT(LIBS, EXTRA_) APR_RESTORE_THE_ENVIRONMENT(INCLUDES, EXTRA_) -echo $ac_n "${nl}Construct makefiles and header files...${nl}" +AC_MSG_NOTICE([]) +AC_MSG_NOTICE([Construct makefiles and header files...]) +AC_MSG_NOTICE([]) APACHE_GEN_CONFIG_VARS @@ -801,10 +870,17 @@ AC_SUBST(ap_make_delimiter) dnl Ensure that docs/conf is created. test -d docs/conf||$mkdir_p docs/conf -dnl Ensure that the httpd version is included -HTTPD_VERSION=`$abs_srcdir/build/get-version.sh all $abs_srcdir/include/ap_release.h AP_SERVER` -AC_SUBST(HTTPD_VERSION) - -AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd.conf docs/conf/extra/httpd-autoindex.conf docs/conf/extra/httpd-dav.conf docs/conf/extra/httpd-default.conf docs/conf/extra/httpd-info.conf docs/conf/extra/httpd-languages.conf docs/conf/extra/httpd-manual.conf docs/conf/extra/httpd-mpm.conf docs/conf/extra/httpd-multilang-errordoc.conf docs/conf/extra/httpd-ssl.conf docs/conf/extra/httpd-userdir.conf docs/conf/extra/httpd-vhosts.conf docs/conf/extra/proxy-html.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk build/pkg/pkginfo build/config_vars.sh,[true],[ - APACHE_GEN_MAKEFILES +AC_CONFIG_FILES(docs/conf/httpd.conf docs/conf/extra/httpd-autoindex.conf docs/conf/extra/httpd-dav.conf docs/conf/extra/httpd-default.conf docs/conf/extra/httpd-info.conf docs/conf/extra/httpd-languages.conf docs/conf/extra/httpd-manual.conf docs/conf/extra/httpd-mpm.conf docs/conf/extra/httpd-multilang-errordoc.conf docs/conf/extra/httpd-ssl.conf docs/conf/extra/httpd-userdir.conf docs/conf/extra/httpd-vhosts.conf docs/conf/extra/proxy-html.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk build/pkg/pkginfo build/config_vars.sh) +AC_CONFIG_COMMANDS([default], [true], [APACHE_GEN_MAKEFILES]) +AC_OUTPUT +AC_MSG_NOTICE([summary of build options: + + Server Version: ${HTTPD_VERSION} + Install prefix: ${prefix} + C compiler: ${APACHE_CONF_SEL_CC} + CFLAGS: ${APACHE_CONF_SEL_CFLAGS} + LDFLAGS: ${APACHE_CONF_SEL_LDFLAGS} + LIBS: ${APACHE_CONF_SEL_LIBS} + CPPFLAGS: ${APACHE_CONF_SEL_CPPFLAGS} + C preprocessor: ${APACHE_CONF_SEL_CPP} ]) diff --git a/docs/STATUS b/docs/STATUS deleted file mode 100644 index c2446f69a16..00000000000 --- a/docs/STATUS +++ /dev/null @@ -1,180 +0,0 @@ -Apache HTTP Server Trunk Documentation Status File. Last modified: $Date$ - -For more information on how to contribute to the Apache Documentation -Project, please see http://httpd.apache.org/docs-project/ and -http://httpd.apache.org/docs-project/docsformat.html - - ------------------------------ - -To Do List -======================= - -- Update the http://httpd.apache.org/docs-project/docsformat.html - document to be useful. In particular: - - Document the various macros that can be used in documents. - - Document the translation process. - - Generally update it to make it reflect the current reality of how - we work. - - Improving the documentation of the documentations' build system - itself (requirements, procedures) - -- Continue to enhance the FAQ, which is in the wiki: - http://wiki.apache.org/httpd/FAQ - -- Security docs are unhelpful, and assume that the reader knows nothing. - Need something a little more advanced, which either discusses - application-level security, or links to something that does. I'm not - even sure what to say needs done. Can we get someone to elaborate on - what, exactly, needs written? Ivan Ristic has said maybe he would be - willing to contribute. - - More content and better organisation - - mod_dav resources are owned by the httpd. Perhaps write up the - two-httpd dav setup covered in Rich Bowen's DAV Apachecon - presentation. - -- Performance doc "drop-in replace" wikified by Igor from Sander's - presentation: http://wiki.apache.org/httpd/PerformanceScalingUp - as well as: http://wiki.apache.org/httpd/PerformanceScalingOut - They both need review and updates to reflect the current state - of the art. - -- Windows platform docs are in desperate need of rewrites/updates for 2.x. - - Bill Rowe is a good contact for tech questions. - - "using apache" has been done, "compiling apache" is still open - - hints on uninstalling apache (exit monitor, close directories, - registry entries etc) (PR 10154) - - FAQ: UTF-8 config and URL encoding for non-ascii characters. - -- New Auth system - - Much clean-up and enhancement of aaa howto (Can someone clarify - exactly what needs cleaned up and enhanced?) - - Independent note on how to upgrade to new auth system - - Discussion of DBD auth, and, in particular, examples of how to set - up auth using each of the supported databases. - -- Expression syntax for , Require expr, SetEnvIfExpr, CustomLog, ... - Start is in expr.xml, igalic is working on this - -- modules docs - - the follwing modules added since 2.2 lack documentation - - mod_serf - - mod_watchdog - - mod_heartbeat - - mod_heartmonitor - - mod_lbmethod_heartbeat - - mod_socache_dbm - - mod_socache_memcache - - mod_socache_shmcb - - mpm_simple - the list may be incomplete - maybe some of the modules will not be included in 2.4 - - mod_suexec: very little documentation - -- mod_substitute and reverse proxies: Add example using mod_filter - (see: http://marc.info/?l=apache-httpd-users&m=128830729603423&w=2) - -- MPM documentation - - explain what the following command line options do - (perhaps in the developer/debugging docs): - -D DEBUG - -D ONE_PROCESS -- is this the same as -X, if not, should it be? - one-process-mode == no threads, i.e. only one - process handling the requests in a single loop? - -- Identify which documents are grossly out of date, and fix. - - platform/ebcdic.xml - needs major rework for 2.0 - - SSL docs need serious update and enhancement - - compat docs are wrong - - A basic how to has been started here: - http://wiki.apache.org/httpd/SettingUpModSSL - but it needs some work... - - http://blag.esotericsystems.at/2011/01/answering-trivial-and-interesting-questions-with-openssl/ - looks like a good starting point for overhauling the FAQ, and - has been placed at our disposal by the author. - -- API documentation - - Ben Laurie has written some hooks documentation - - authn provider API documentation could be useful - -- How does fit into sections.html? - -- Missing documentation for the support program checkgid - -- New user docs: Directory Handling (mod_dir/mod_autoindex/etc) - (draft available in wiki) - -- Enhancements to the DTD/XSL: - - New index: directives by context, including listing which directives - are available for each AllowOverride setting. - - New index: backout modules by type (aaa, mappers, loggers etc.) - probably by introducing a element in modulesynopsis - - Use a tag like in place of for things like the - listing. - - in progress - - add letter links to glossary and quickreference, - perhaps also a term overview (sidebar) - -- Provide example solutions for the mapping of encodings, especially - for .gz etc. (also in regard to our default configuration) - -- How-To style documents for more of the daily tasks - - Logging, log rotation, and log reporting - - Secure mod_dav configuration - -- Writing modules - Can we provide a basic intro to writing modules, - perhaps based around mod_example, or one of the other simple example - modules? - -- http://httpd.apache.org/docs/trunk/developer/ is a graveyard, and a - profound embarrassment. - - Purge all the dead links - - Introductory module authoring doc - - Verify links to external resources at least every year - -- Update the list of translations at - http://httpd.apache.org/docs-project/translations.html Some of those - are accurate, and others are way outdated. - -- I'd like to expand the discussion of conditional logging, and add a - few more useful exmaples. - That would be a good place to document logging of cache hit/miss: - https://issues.apache.org/bugzilla/show_bug.cgi?id=48241#c2 - -- Is it worth having a doc that discusses recommended (what does this - mean?) third-party modules like mod_security, mod_php, and so on - the - things that we all assume everyone uses, but some folks might not know - about. - -- Clarify which directives only affect requests when they're handled - by the default handler. (e.g. ForceType, TraceEnable, etc.) - -- Add examples using expr to mod_rewrite recipes. Possibly benchmark the - different approaches and make intelligent remarks about the - comparative value of each. - -- Fix this error message: - Request exceeded the limit of 10 internal redirects due to probable - configuration error. Use 'LimitInternalRecursion' to increase the limit - if necessary. Use 'LogLevel debug' to get a backtrace. - This error message is often returned when a RewriteRUle loops, in - which case setting LimitInternalRecursion won't do anything towards - fixing the problem. However, the error message is already very long. - Thoughts? - -LaTeX Todo list -================== - -- Dozens of other little problems with presentation, cross-referencing, - etc. - -- Cleanup xsl to make it more readable. Almost everything - that is currently in latex.xsl should probably be moved to common.xsl. - There may be a license problem with the atbeginend.sty file, since - latex style files rarely have explict licenses. At worst, we can - drop this and manually adjust the relevant spacing. - -- Reduce the size of the pdf (both bytes and pages) in any way possible. - -- Translations. - - diff --git a/docs/cgi-examples/printenv b/docs/cgi-examples/printenv index f815a7e5019..5b5035e268e 100644 --- a/docs/cgi-examples/printenv +++ b/docs/cgi-examples/printenv @@ -1,20 +1,25 @@ # # To permit this cgi, replace # on the first line above with the -# appropriate #!/path/to/perl shebang, and set this script executable -# with chmod 755. +# appropriate #!/path/to/perl shebang, and on Unix / Linux also +# set this script executable with chmod 755. # -# Note that it is subject to cross site scripting attacks on MS IE -# and any other browser which fails to honor RFC2616, so never use -# it in a live server environment, it is provided only for testing. +# ***** !!! WARNING !!! ***** +# This script echoes the server environment variables and therefore +# leaks information - so NEVER use it in a live server environment! +# It is provided only for testing purpose. +# Also note that it is subject to cross site scripting attacks on +# MS IE and any other browser which fails to honor RFC2616. ## ## printenv -- demo CGI program which just prints its environment ## +use strict; +use warnings; print "Content-type: text/plain; charset=iso-8859-1\n\n"; -foreach $var (sort(keys(%ENV))) { - $val = $ENV{$var}; +foreach my $var (sort(keys(%ENV))) { + my $val = $ENV{$var}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; print "${var}=\"${val}\"\n"; diff --git a/docs/cgi-examples/printenv.vbs b/docs/cgi-examples/printenv.vbs new file mode 100644 index 00000000000..9336d43263a --- /dev/null +++ b/docs/cgi-examples/printenv.vbs @@ -0,0 +1,32 @@ +' + +' To permit this cgi, replace ' on the first line above with the +' appropriate shebang, f.e. '!c:/windows/system32/cscript -nologo +' +' ***** !!! WARNING !!! ***** +' This script echoes the server environment variables and therefore +' leaks information - so NEVER use it in a live server environment! +' It is provided only for testing purpose. +' Also note that it is subject to cross site scripting attacks on +' MS IE and any other browser which fails to honor RFC2616. + +'' +'' printenv -- demo CGI program which just prints its environment +'' +Option Explicit + +Dim objShell, objArray, str, envvar, envval +Set objShell = CreateObject("WScript.Shell") +Set objArray = CreateObject("System.Collections.ArrayList") + +WScript.StdOut.WriteLine "Content-type: text/plain; charset=iso-8859-1" & vbLF +For Each str In objShell.Environment("PROCESS") + objArray.Add str +Next +objArray.Sort() +For Each str In objArray + envvar = Left(str, InStr(str, "=")) + envval = Replace(Mid(str, InStr(str, "=") + 1), vbLF, "\n") + WScript.StdOut.WriteLine envvar & Chr(34) & envval & Chr(34) +Next + diff --git a/docs/cgi-examples/printenv.wsf b/docs/cgi-examples/printenv.wsf new file mode 100644 index 00000000000..d982eac21f6 --- /dev/null +++ b/docs/cgi-examples/printenv.wsf @@ -0,0 +1,33 @@ +' + +' To permit this cgi, replace ' on the first line above with the +' appropriate shebang, f.e. '!c:/windows/system32/cscript -nologo +' +' ***** !!! WARNING !!! ***** +' This script echoes the server environment variables and therefore +' leaks information - so NEVER use it in a live server environment! +' It is provided only for testing purpose. +' Also note that it is subject to cross site scripting attacks on +' MS IE and any other browser which fails to honor RFC2616. + +'' +'' printenv -- demo CGI program which just prints its environment +'' + + + + diff --git a/docs/cgi-examples/test-cgi b/docs/cgi-examples/test-cgi index d92e0eccf83..eb80f3e4dbc 100644 --- a/docs/cgi-examples/test-cgi +++ b/docs/cgi-examples/test-cgi @@ -4,9 +4,12 @@ # appropriate #!/path/to/sh shebang, and set this script executable # with chmod 755. # -# Note that it is subject to cross site scripting attacks on MS IE -# and any other browser which fails to honor RFC2616, so never use -# it in a live server environment, it is provided only for testing. +# ***** !!! WARNING !!! ***** +# This script echoes the server environment variables and therefore +# leaks information - so NEVER use it in a live server environment! +# It is provided only for testing purpose. +# Also note that it is subject to cross site scripting attacks on +# MS IE and any other browser which fails to honor RFC2616. # disable filename globbing set -f diff --git a/docs/conf/extra/httpd-default.conf.in b/docs/conf/extra/httpd-default.conf.in index f1e7bc82a77..7196922866a 100644 --- a/docs/conf/extra/httpd-default.conf.in +++ b/docs/conf/extra/httpd-default.conf.in @@ -7,7 +7,7 @@ # # Timeout: The number of seconds before receives and sends time out. # -Timeout 300 +Timeout 60 # # KeepAlive: Whether or not to allow persistent connections (more than diff --git a/docs/conf/extra/httpd-manual.conf.in b/docs/conf/extra/httpd-manual.conf.in index 29b1094c1fd..4d7ee7e6aac 100644 --- a/docs/conf/extra/httpd-manual.conf.in +++ b/docs/conf/extra/httpd-manual.conf.in @@ -2,7 +2,7 @@ # Provide access to the documentation on your server as # http://yourserver.example.com/manual/ # The documentation is always available at -# http://httpd.apache.org/docs/trunk/ +# http://httpd.apache.org/docs/2.4/ # # Required modules: mod_alias, mod_authz_core, mod_authz_host, # mod_setenvif, mod_negotiation @@ -20,7 +20,7 @@ AliasMatch ^/manual(?:/(?:da|de|en|es|fr|ja|ko|pt-br|ru|tr|zh-cn))?(/.*)?$ "@exp # .tr is text/troff in mime.types! - ForceType text/html + ForceType "text/html; charset=utf-8" AddLanguage da .da diff --git a/docs/conf/extra/httpd-mpm.conf.in b/docs/conf/extra/httpd-mpm.conf.in index 3bd919a275d..bf29fafe003 100644 --- a/docs/conf/extra/httpd-mpm.conf.in +++ b/docs/conf/extra/httpd-mpm.conf.in @@ -18,14 +18,6 @@ # active mpm. # -# Simple MPM -# SimpleProcCount: Number of child processes launched at server startup -# SimpleThreadCount: Set the number of Worker Threads Per-Process - - SimpleProcCount 5 - SimpleThreadCount 5 - - # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare @@ -37,7 +29,7 @@ StartServers 5 MinSpareServers 5 MaxSpareServers 10 - MaxRequestWorkers 150 + MaxRequestWorkers 250 MaxConnectionsPerChild 0 @@ -50,11 +42,11 @@ # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating - StartServers 2 - MinSpareThreads 25 - MaxSpareThreads 75 + StartServers 3 + MinSpareThreads 75 + MaxSpareThreads 250 ThreadsPerChild 25 - MaxRequestWorkers 150 + MaxRequestWorkers 400 MaxConnectionsPerChild 0 @@ -67,11 +59,11 @@ # MaxConnectionsPerChild: maximum number of connections a server process serves # before terminating - StartServers 2 - MinSpareThreads 25 - MaxSpareThreads 75 + StartServers 3 + MinSpareThreads 75 + MaxSpareThreads 250 ThreadsPerChild 25 - MaxRequestWorkers 150 + MaxRequestWorkers 400 MaxConnectionsPerChild 0 @@ -92,7 +84,6 @@ MaxSpareThreads 250 MaxThreads 1000 MaxConnectionsPerChild 0 - MaxMemFree 100 # OS/2 MPM @@ -116,3 +107,13 @@ MaxConnectionsPerChild 0 +# The maximum number of free Kbytes that every allocator is allowed +# to hold without calling free(). In threaded MPMs, every thread has its own +# allocator. When not set, or when set to zero, the threshold will be set to +# unlimited. + + MaxMemFree 2048 + + + MaxMemFree 100 + diff --git a/docs/conf/extra/httpd-ssl.conf.in b/docs/conf/extra/httpd-ssl.conf.in index 144dfe7cc12..f093b328a53 100644 --- a/docs/conf/extra/httpd-ssl.conf.in +++ b/docs/conf/extra/httpd-ssl.conf.in @@ -2,7 +2,7 @@ # This is the Apache server configuration file providing SSL support. # It contains the configuration directives to instruct the server how to # serve pages over an https connection. For detailed information about these -# directives see +# directives see # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure @@ -33,9 +33,6 @@ # When we also provide SSL we have to listen to the # standard HTTP port (see above) and to the HTTPS port # -# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two -# Listen directives: "Listen [::]:@@SSLPort@@" and "Listen 0.0.0.0:@@SSLPort@@" -# Listen @@SSLPort@@ ## @@ -46,15 +43,41 @@ Listen @@SSLPort@@ ## # SSL Cipher Suite: -# List the ciphers that the client is permitted to negotiate. -# See the mod_ssl documentation for a complete list. -SSLCipherSuite RC4-SHA:AES128-SHA:ALL:!aNULL:!EXP:!LOW:!MD5:!SSLV2:!NULL +# List the ciphers that the client is permitted to negotiate, +# and that httpd will negotiate as the client of a proxied server. +# See the OpenSSL documentation for a complete list of ciphers, and +# ensure these follow appropriate best practices for this deployment. +# httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers, +# while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a. +SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4 +SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4 + +# By the end of 2016, only TLSv1.2 ciphers should remain in use. +# Older ciphers should be disallowed as soon as possible, while the +# kRSA ciphers do not offer forward secrecy. These changes inhibit +# older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy +# non-browser tooling) from successfully connecting. +# +# To restrict mod_ssl to use only TLSv1.2 ciphers, and disable +# those protocols which do not support forward secrecy, replace +# the SSLCipherSuite and SSLProxyCipherSuite directives above with +# the following two directives, as soon as practical. +# SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA +# SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA -# SSL Cipher Honor Order: -# On a busy HTTPS server you may want to enable this directive -# to force clients to use one of the faster ciphers like RC4-SHA -# or AES128-SHA in the order defined by SSLCipherSuite. -#SSLHonorCipherOrder on +# User agents such as web browsers are not configured for the user's +# own preference of either security or performance, therefore this +# must be the prerogative of the web server administrator who manages +# cpu load versus confidentiality, so enforce the server's cipher order. +SSLHonorCipherOrder on + +# SSL Protocol support: +# List the protocol versions which clients are allowed to connect with. +# Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be +# disabled as quickly as practical. By the end of 2016, only the TLSv1.2 +# protocol or later should remain in use. +SSLProtocol all -SSLv3 +SSLProxyProtocol all -SSLv3 # Pass Phrase Dialog: # Configure the pass phrase gathering process. @@ -69,6 +92,28 @@ SSLPassPhraseDialog builtin SSLSessionCache "shmcb:@exp_runtimedir@/ssl_scache(512000)" SSLSessionCacheTimeout 300 +# OCSP Stapling (requires OpenSSL 0.9.8h or later) +# +# This feature is disabled by default and requires at least +# the two directives SSLUseStapling and SSLStaplingCache. +# Refer to the documentation on OCSP Stapling in the SSL/TLS +# How-To for more information. +# +# Enable stapling for all SSL-enabled servers: +#SSLUseStapling On + +# Define a relatively small cache for OCSP Stapling using +# the same mechanism that is used for the SSL session cache +# above. If stapling is used with more than a few certificates, +# the size may need to be increased. (AH01929 will be logged.) +#SSLStaplingCache "shmcb:@exp_runtimedir@/ssl_stapling(32768)" + +# Seconds before valid OCSP responses are expired from the cache +#SSLStaplingStandardCacheTimeout 3600 + +# Seconds before invalid OCSP responses are expired from the cache +#SSLStaplingErrorCacheTimeout 600 + ## ## SSL Virtual Host Context ## @@ -150,6 +195,14 @@ SSLCertificateKeyFile "@exp_sysconfdir@/server.key" #SSLVerifyClient require #SSLVerifyDepth 10 +# TLS-SRP mutual authentication: +# Enable TLS-SRP and set the path to the OpenSSL SRP verifier +# file (containing login information for SRP user accounts). +# Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for +# detailed instructions on creating this file. Example: +# "openssl srp -srpvfile @exp_sysconfdir@/passwd.srpv -add username" +#SSLSRPVerifierFile "@exp_sysconfdir@/passwd.srpv" + # Access Control: # With SSLRequire you can do per-directory access control based # on arbitrary complex boolean expressions containing server diff --git a/docs/conf/extra/httpd-vhosts.conf.in b/docs/conf/extra/httpd-vhosts.conf.in index 5b3d946ae11..fbd2df4aa62 100644 --- a/docs/conf/extra/httpd-vhosts.conf.in +++ b/docs/conf/extra/httpd-vhosts.conf.in @@ -8,7 +8,7 @@ # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at -# +# # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host diff --git a/docs/conf/extra/proxy-html.conf.in b/docs/conf/extra/proxy-html.conf.in index 49afe98a099..683a0911bee 100644 --- a/docs/conf/extra/proxy-html.conf.in +++ b/docs/conf/extra/proxy-html.conf.in @@ -1,5 +1,10 @@ # Configuration example. # +# For detailed information about these directives see +# +# and for mod_xml2enc see +# +# # First, to load the module with its prerequisites. Note: mod_xml2enc # is not always necessary, but without it mod_proxy_html is likely to # mangle pages in encodings other than ASCII or Unicode (utf-8). diff --git a/docs/conf/httpd.conf.in b/docs/conf/httpd.conf.in index d59952f3668..37d7c0b4f34 100644 --- a/docs/conf/httpd.conf.in +++ b/docs/conf/httpd.conf.in @@ -1,9 +1,9 @@ # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. -# See for detailed information. +# See for detailed information. # In particular, see -# +# # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding @@ -13,9 +13,10 @@ # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin -# with "/", the value of ServerRoot is prepended -- so "@rel_logfiledir@/foo_log" -# with ServerRoot set to "@@ServerRoot@@" will be interpreted by the -# server as "@@ServerRoot@@/@rel_logfiledir@/foo_log". +# with "/", the value of ServerRoot is prepended -- so "logs/access_log" +# with ServerRoot set to "/usr/local/apache2" will be interpreted by the +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" +# will be interpreted as '/logs/access_log'. # # ServerRoot: The top of the directory tree under which the server's @@ -112,6 +113,7 @@ ServerAdmin you@example.com # blocks below. # + AllowOverride none Require all denied @@ -138,7 +140,7 @@ DocumentRoot "@exp_htdocsdir@" # doesn't give it to you. # # The Options directive is both complicated and important. Please see - # http://httpd.apache.org/docs/trunk/mod/core.html#options + # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks @@ -146,7 +148,7 @@ DocumentRoot "@exp_htdocsdir@" # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: - # Options FileInfo AuthConfig Limit + # AllowOverride FileInfo AuthConfig Limit # AllowOverride None @@ -253,7 +255,7 @@ LogLevel warn # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # - #Scriptsock @rel_runtimedir@/cgisock + #Scriptsock cgisock # @@ -266,6 +268,15 @@ LogLevel warn Require all granted + + # + # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied + # backend servers which have lingering "httpoxy" defects. + # 'Proxy' request header is undefined by the IETF, not listed by IANA + # + RequestHeader unset Proxy early + + # # TypesConfig points to the file containing the list of mappings from @@ -404,3 +415,4 @@ Include @rel_sysconfdir@/extra/proxy-html.conf SSLRandomSeed startup builtin SSLRandomSeed connect builtin + diff --git a/docs/conf/mime.types b/docs/conf/mime.types index 6a90929c0d2..49802001400 100644 --- a/docs/conf/mime.types +++ b/docs/conf/mime.types @@ -14,42 +14,78 @@ # MIME type (lowercased) Extensions # ============================================ ========== # application/1d-interleaved-parityfec +# application/3gpdash-qoe-report+xml # application/3gpp-ims+xml +# application/a2l # application/activemessage +# application/alto-costmap+json +# application/alto-costmapfilter+json +# application/alto-directory+json +# application/alto-endpointcost+json +# application/alto-endpointcostparams+json +# application/alto-endpointprop+json +# application/alto-endpointpropparams+json +# application/alto-error+json +# application/alto-networkmap+json +# application/alto-networkmapfilter+json +# application/aml application/andrew-inset ez # application/applefile application/applixware aw +# application/atf +# application/atfx application/atom+xml atom application/atomcat+xml atomcat +# application/atomdeleted+xml # application/atomicmail application/atomsvc+xml atomsvc +# application/atxml # application/auth-policy+xml +# application/bacnet-xdd+zip # application/batch-smtp # application/beep+xml +# application/calendar+json +# application/calendar+xml +# application/call-completion # application/cals-1840 +# application/cbor +# application/ccmp+xml application/ccxml+xml ccxml +# application/cdfx+xml application/cdmi-capability cdmia application/cdmi-container cdmic application/cdmi-domain cdmid application/cdmi-object cdmio application/cdmi-queue cdmiq +# application/cdni +# application/cea # application/cea-2018+xml # application/cellml+xml # application/cfw +# application/cms # application/cnrp+xml +# application/coap-group+json # application/commonground # application/conference-info+xml # application/cpl+xml +# application/csrattrs # application/csta+xml # application/cstadata+xml +# application/csvm+json application/cu-seeme cu # application/cybercash +# application/dash+xml +# application/dashdelta application/davmount+xml davmount # application/dca-rft +# application/dcd # application/dec-dx # application/dialog-info+xml # application/dicom +# application/dii +# application/dit # application/dns +application/docbook+xml dbk # application/dskpp+xml application/dssc+der dssc application/dssc+xml xdssc @@ -58,7 +94,15 @@ application/ecmascript ecma # application/edi-consent # application/edi-x12 # application/edifact +# application/efi +# application/emergencycalldata.comment+xml +# application/emergencycalldata.deviceinfo+xml +# application/emergencycalldata.providerinfo+xml +# application/emergencycalldata.serviceinfo+xml +# application/emergencycalldata.subscriberinfo+xml application/emma+xml emma +# application/emotionml+xml +# application/encaprtp # application/epp+xml application/epub+zip epub # application/eshop @@ -66,9 +110,17 @@ application/epub+zip epub application/exi exi # application/fastinfoset # application/fastsoap +# application/fdt+xml # application/fits +# application/font-sfnt application/font-tdpfr pfr +application/font-woff woff # application/framework-attributes+xml +# application/geo+json +application/gml+xml gml +application/gpx+xml gpx +application/gxf gxf +# application/gzip # application/h224 # application/held+xml # application/http @@ -83,18 +135,35 @@ application/hyperstudio stk # application/index.obj # application/index.response # application/index.vnd +application/inkml+xml ink inkml # application/iotp application/ipfix ipfix # application/ipp # application/isup +# application/its+xml application/java-archive jar application/java-serialized-object ser application/java-vm class application/javascript js +# application/jose +# application/jose+json +# application/jrd+json application/json json +# application/json-patch+json +# application/json-seq +application/jsonml+json jsonml +# application/jwk+json +# application/jwk-set+json +# application/jwt # application/kpml-request+xml # application/kpml-response+xml +# application/ld+json +# application/lgr+xml +# application/link-format +# application/load-control+xml application/lost+xml lostxml +# application/lostsync+xml +# application/lxf application/mac-binhex40 hqx application/mac-compactpro cpt # application/macwriteii @@ -102,9 +171,9 @@ application/mads+xml mads application/marc mrc application/marcxml+xml mrcx application/mathematica ma nb mb +application/mathml+xml mathml # application/mathml-content+xml # application/mathml-presentation+xml -application/mathml+xml mathml # application/mbms-associated-procedure-description+xml # application/mbms-deregister+xml # application/mbms-envelope+xml @@ -114,12 +183,17 @@ application/mathml+xml mathml # application/mbms-reception-report+xml # application/mbms-register+xml # application/mbms-register-response+xml +# application/mbms-schedule+xml # application/mbms-user-service-description+xml application/mbox mbox +# application/media-policy-dataset+xml # application/media_control+xml application/mediaservercontrol+xml mscml +# application/merge-patch+json +application/metalink+xml metalink application/metalink4+xml meta4 application/mets+xml mets +# application/mf4 # application/mikey application/mods+xml mods # application/moss-keys @@ -131,6 +205,8 @@ application/mp4 mp4s # application/mpeg4-generic # application/mpeg4-iod # application/mpeg4-iod-xmt +# application/mrb-consumer+xml +# application/mrb-publish+xml # application/msc-ivr+xml # application/msc-mixer+xml application/msword doc dot @@ -139,17 +215,23 @@ application/mxf mxf # application/news-checkgroups # application/news-groupinfo # application/news-transmission +# application/nlsml+xml # application/nss # application/ocsp-request # application/ocsp-response -application/octet-stream bin dms lha lrf lzh so iso dmg dist distz pkg bpk dump elc deploy +application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy application/oda oda +# application/odx application/oebps-package+xml opf application/ogg ogx +application/omdoc+xml omdoc application/onenote onetoc onetoc2 onetmp onepkg +application/oxps oxps +# application/p2p-overlay+xml # application/parityfec application/patch-ops-error+xml xer application/pdf pdf +# application/pdx application/pgp-encrypted pgp # application/pgp-keys application/pgp-signature asc sig @@ -157,6 +239,7 @@ application/pics-rules prf # application/pidf+xml # application/pidf-diff+xml application/pkcs10 p10 +# application/pkcs12 application/pkcs7-mime p7m p7c application/pkcs7-signature p7s application/pkcs8 p8 @@ -168,35 +251,54 @@ application/pkixcmp pki application/pls+xml pls # application/poc-settings+xml application/postscript ai eps ps +# application/ppsp-tracker+json +# application/problem+json +# application/problem+xml +# application/provenance+xml # application/prs.alvestrand.titrax-sheet application/prs.cww cww +# application/prs.hpub+zip # application/prs.nprend # application/prs.plucker # application/prs.rdf-xml-crypt # application/prs.xsf+xml application/pskc+xml pskcxml # application/qsig +# application/raptorfec +# application/rdap+json application/rdf+xml rdf application/reginfo+xml rif application/relax-ng-compact-syntax rnc # application/remote-printing +# application/reputon+json application/resource-lists+xml rl application/resource-lists-diff+xml rld +# application/rfc+xml # application/riscos # application/rlmi+xml application/rls-services+xml rs +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-roa roa +# application/rpki-updown application/rsd+xml rsd application/rss+xml rss application/rtf rtf +# application/rtploopback # application/rtx # application/samlassertion+xml # application/samlmetadata+xml application/sbml+xml sbml +# application/scaip+xml +# application/scim+json application/scvp-cv-request scq application/scvp-cv-response scs application/scvp-vp-request spq application/scvp-vp-response spp application/sdp sdp +# application/sep+xml +# application/sep-exi +# application/session-info # application/set-payment application/set-payment-initiation setpay # application/set-registration @@ -211,14 +313,17 @@ application/shf+xml shf # application/slate # application/smil application/smil+xml smi smil +# application/smpte336m # application/soap+fastinfoset # application/soap+xml application/sparql-query rq application/sparql-results+xml srx # application/spirits-event+xml +# application/sql application/srgs gram application/srgs+xml grxml application/sru+xml sru +application/ssdl+xml ssdl application/ssml+xml ssml # application/tamp-apex-update # application/tamp-apex-update-confirm @@ -236,24 +341,43 @@ application/thraud+xml tfi # application/timestamp-query # application/timestamp-reply application/timestamped-data tsd +# application/ttml+xml # application/tve-trigger # application/ulpfec +# application/urc-grpsheet+xml +# application/urc-ressheet+xml +# application/urc-targetdesc+xml +# application/urc-uisocketdesc+xml +# application/vcard+json +# application/vcard+xml # application/vemmi # application/vividence.scriptfile +# application/vnd.3gpp-prose+xml +# application/vnd.3gpp-prose-pc3ch+xml +# application/vnd.3gpp.access-transfer-events+xml # application/vnd.3gpp.bsf+xml +# application/vnd.3gpp.mid-call+xml application/vnd.3gpp.pic-bw-large plb application/vnd.3gpp.pic-bw-small psb application/vnd.3gpp.pic-bw-var pvb # application/vnd.3gpp.sms +# application/vnd.3gpp.sms+xml +# application/vnd.3gpp.srvcc-ext+xml +# application/vnd.3gpp.srvcc-info+xml +# application/vnd.3gpp.state-and-event-info+xml +# application/vnd.3gpp.ussd+xml # application/vnd.3gpp2.bcmcsinfo+xml # application/vnd.3gpp2.sms application/vnd.3gpp2.tcap tcap +# application/vnd.3lightssoftware.imagescal application/vnd.3m.post-it-notes pwn application/vnd.accpac.simply.aso aso application/vnd.accpac.simply.imp imp application/vnd.acucobol acu application/vnd.acucorp atc acutc application/vnd.adobe.air-application-installer-package+zip air +# application/vnd.adobe.flash.movie +application/vnd.adobe.formscentral.fcdt fcdt application/vnd.adobe.fxp fxp fxpl # application/vnd.adobe.partial-upload application/vnd.adobe.xdp+xml xdp @@ -264,40 +388,62 @@ application/vnd.ahead.space ahead application/vnd.airzip.filesecure.azf azf application/vnd.airzip.filesecure.azs azs application/vnd.amazon.ebook azw +# application/vnd.amazon.mobi8-ebook application/vnd.americandynamics.acc acc application/vnd.amiga.ami ami # application/vnd.amundsen.maze+xml application/vnd.android.package-archive apk +# application/vnd.anki application/vnd.anser-web-certificate-issue-initiation cii application/vnd.anser-web-funds-transfer-initiation fti application/vnd.antix.game-component atx +# application/vnd.apache.thrift.binary +# application/vnd.apache.thrift.compact +# application/vnd.apache.thrift.json +# application/vnd.api+json application/vnd.apple.installer+xml mpkg application/vnd.apple.mpegurl m3u8 # application/vnd.arastra.swi application/vnd.aristanetworks.swi swi +# application/vnd.artsquare +application/vnd.astraea-software.iota iota application/vnd.audiograph aep # application/vnd.autopackage # application/vnd.avistar+xml +# application/vnd.balsamiq.bmml+xml +# application/vnd.balsamiq.bmpr +# application/vnd.bekitzur-stech+json +# application/vnd.biopax.rdf+xml application/vnd.blueice.multipass mpm # application/vnd.bluetooth.ep.oob +# application/vnd.bluetooth.le.oob application/vnd.bmi bmi application/vnd.businessobjects rep # application/vnd.cab-jscript # application/vnd.canon-cpdl # application/vnd.canon-lips # application/vnd.cendio.thinlinc.clientconf +# application/vnd.century-systems.tcp_stream application/vnd.chemdraw+xml cdxml +# application/vnd.chess-pgn application/vnd.chipnuts.karaoke-mmd mmd application/vnd.cinderella cdy # application/vnd.cirpack.isdn-ext +# application/vnd.citationstyles.style+xml application/vnd.claymore cla application/vnd.cloanto.rp9 rp9 application/vnd.clonk.c4group c4g c4d c4f c4p c4u application/vnd.cluetrust.cartomobile-config c11amc application/vnd.cluetrust.cartomobile-config-pkg c11amz +# application/vnd.coffeescript +# application/vnd.collection+json +# application/vnd.collection.doc+json +# application/vnd.collection.next+json +# application/vnd.comicbook+zip # application/vnd.commerce-battelle application/vnd.commonspace csp application/vnd.contact.cmsg cdbcmsg +# application/vnd.coreos.ignition+json application/vnd.cosmocaller cmc application/vnd.crick.clicker clkx application/vnd.crick.clicker.keyboard clkk @@ -312,21 +458,35 @@ application/vnd.ctc-posml pml application/vnd.cups-ppd ppd # application/vnd.cups-raster # application/vnd.cups-raw +# application/vnd.curl application/vnd.curl.car car application/vnd.curl.pcurl pcurl +# application/vnd.cyan.dean.root+xml # application/vnd.cybank +application/vnd.dart dart application/vnd.data-vision.rdz rdz +# application/vnd.debian.binary-package application/vnd.dece.data uvf uvvf uvd uvvd application/vnd.dece.ttml+xml uvt uvvt application/vnd.dece.unspecified uvx uvvx +application/vnd.dece.zip uvz uvvz application/vnd.denovo.fcselayout-link fe_launch +# application/vnd.desmume.movie # application/vnd.dir-bi.plate-dl-nosuffix +# application/vnd.dm.delegation+xml application/vnd.dna dna +# application/vnd.document+json application/vnd.dolby.mlp mlp # application/vnd.dolby.mobile.1 # application/vnd.dolby.mobile.2 +# application/vnd.doremir.scorecloud-binary-document application/vnd.dpgraph dpg application/vnd.dreamfactory dfac +# application/vnd.drive+json +application/vnd.ds-keypoint kpxx +# application/vnd.dtg.local +# application/vnd.dtg.local.flash +# application/vnd.dtg.local.html application/vnd.dvb.ait ait # application/vnd.dvb.dvbj # application/vnd.dvb.esgcontainer @@ -348,6 +508,7 @@ application/vnd.dvb.ait ait application/vnd.dvb.service svc # application/vnd.dxr application/vnd.dynageo geo +# application/vnd.dzr # application/vnd.easykaraoke.cdgdownload # application/vnd.ecdis-update application/vnd.ecowin.chart mag @@ -358,6 +519,8 @@ application/vnd.ecowin.chart mag # application/vnd.ecowin.seriesupdate # application/vnd.emclient.accessrequest+xml application/vnd.enliven nml +# application/vnd.enphase.envoy +# application/vnd.eprints.data+xml application/vnd.epson.esf esf application/vnd.epson.msf msf application/vnd.epson.quickanime qam @@ -366,6 +529,8 @@ application/vnd.epson.ssf ssf # application/vnd.ericsson.quickcall application/vnd.eszigno3+xml es3 et3 # application/vnd.etsi.aoc+xml +# application/vnd.etsi.asic-e+zip +# application/vnd.etsi.asic-s+zip # application/vnd.etsi.cug+xml # application/vnd.etsi.iptvcommand+xml # application/vnd.etsi.iptvdiscovery+xml @@ -377,20 +542,26 @@ application/vnd.eszigno3+xml es3 et3 # application/vnd.etsi.iptvsync+xml # application/vnd.etsi.iptvueprofile+xml # application/vnd.etsi.mcid+xml +# application/vnd.etsi.mheg5 # application/vnd.etsi.overload-control-policy-dataset+xml +# application/vnd.etsi.pstn+xml # application/vnd.etsi.sci+xml # application/vnd.etsi.simservs+xml +# application/vnd.etsi.timestamp-token # application/vnd.etsi.tsl+xml # application/vnd.etsi.tsl.der # application/vnd.eudora.data application/vnd.ezpix-album ez2 application/vnd.ezpix-package ez3 # application/vnd.f-secure.mobile +# application/vnd.fastcopy-disk-image application/vnd.fdf fdf application/vnd.fdsn.mseed mseed application/vnd.fdsn.seed seed dataless # application/vnd.ffsns +# application/vnd.filmit.zfc # application/vnd.fints +# application/vnd.firemonkeys.cloudcell application/vnd.flographit gph application/vnd.fluxtime.clip ftc # application/vnd.font-fontforge-sfd @@ -405,13 +576,15 @@ application/vnd.fujitsu.oasysgp fg5 application/vnd.fujitsu.oasysprs bh2 # application/vnd.fujixerox.art-ex # application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl application/vnd.fujixerox.ddd ddd application/vnd.fujixerox.docuworks xdw application/vnd.fujixerox.docuworks.binder xbd +# application/vnd.fujixerox.docuworks.container +# application/vnd.fujixerox.hbpl # application/vnd.fut-misnet application/vnd.fuzzysheet fzs application/vnd.genomatix.tuxedo txd +# application/vnd.geo+json # application/vnd.geocube+xml application/vnd.geogebra.file ggb application/vnd.geogebra.tool ggt @@ -419,11 +592,15 @@ application/vnd.geometry-explorer gex gre application/vnd.geonext gxt application/vnd.geoplan g2w application/vnd.geospace g3w +# application/vnd.gerber # application/vnd.globalplatform.card-content-mgt # application/vnd.globalplatform.card-content-mgt-response application/vnd.gmx gmx application/vnd.google-earth.kml+xml kml application/vnd.google-earth.kmz kmz +# application/vnd.gov.sk.e-form+xml +# application/vnd.gov.sk.e-form+zip +# application/vnd.gov.sk.xmldatacontainer+xml application/vnd.grafeq gqf gqs # application/vnd.gridmp application/vnd.groove-account gac @@ -433,10 +610,13 @@ application/vnd.groove-injector grv application/vnd.groove-tool-message gtm application/vnd.groove-tool-template tpl application/vnd.groove-vcard vcg +# application/vnd.hal+json application/vnd.hal+xml hal application/vnd.handheld-entertainment+xml zmm application/vnd.hbci hbci # application/vnd.hcl-bireports +# application/vnd.hdt +# application/vnd.heroku+json application/vnd.hhe.lesson-player les application/vnd.hp-hpgl hpgl application/vnd.hp-hpid hpid @@ -446,7 +626,8 @@ application/vnd.hp-pcl pcl application/vnd.hp-pclxl pclxl # application/vnd.httphone application/vnd.hydrostatix.sof-data sfd-hdstx -application/vnd.hzn-3d-crossword x3d +# application/vnd.hyperdrive+json +# application/vnd.hzn-3d-crossword # application/vnd.ibm.afplinedata # application/vnd.ibm.electronic-media application/vnd.ibm.minipay mpy @@ -454,13 +635,24 @@ application/vnd.ibm.modcap afp listafp list3820 application/vnd.ibm.rights-management irm application/vnd.ibm.secure-container sc application/vnd.iccprofile icc icm +# application/vnd.ieee.1905 application/vnd.igloader igl application/vnd.immervision-ivp ivp application/vnd.immervision-ivu ivu +# application/vnd.ims.imsccv1p1 +# application/vnd.ims.imsccv1p2 +# application/vnd.ims.imsccv1p3 +# application/vnd.ims.lis.v2.result+json +# application/vnd.ims.lti.v2.toolconsumerprofile+json +# application/vnd.ims.lti.v2.toolproxy+json +# application/vnd.ims.lti.v2.toolproxy.id+json +# application/vnd.ims.lti.v2.toolsettings+json +# application/vnd.ims.lti.v2.toolsettings.simple+json # application/vnd.informedcontrol.rms+xml # application/vnd.informix-visionary # application/vnd.infotech.project # application/vnd.infotech.project+xml +# application/vnd.innopath.wamp.notification application/vnd.insors.igm igm application/vnd.intercon.formnet xpw xpx application/vnd.intergeo i2g @@ -468,10 +660,13 @@ application/vnd.intergeo i2g # application/vnd.intertrust.nncp application/vnd.intu.qbo qbo application/vnd.intu.qfx qfx +# application/vnd.iptc.g2.catalogitem+xml # application/vnd.iptc.g2.conceptitem+xml # application/vnd.iptc.g2.knowledgeitem+xml # application/vnd.iptc.g2.newsitem+xml +# application/vnd.iptc.g2.newsmessage+xml # application/vnd.iptc.g2.packageitem+xml +# application/vnd.iptc.g2.planningitem+xml application/vnd.ipunplugged.rcprofile rcprofile application/vnd.irepository.package+xml irp application/vnd.is-xpr xpr @@ -488,6 +683,7 @@ application/vnd.jam jam application/vnd.jcp.javame.midlet-rms rms application/vnd.jisp jisp application/vnd.joost.joda-archive joda +# application/vnd.jsk.isdn-ngn application/vnd.kahootz ktz ktr application/vnd.kde.karbon karbon application/vnd.kde.kchart chrt @@ -514,18 +710,24 @@ application/vnd.lotus-organizer org application/vnd.lotus-screencam scm application/vnd.lotus-wordpro lwp application/vnd.macports.portpkg portpkg +# application/vnd.mapbox-vector-tile # application/vnd.marlin.drm.actiontoken+xml # application/vnd.marlin.drm.conftoken+xml # application/vnd.marlin.drm.license+xml # application/vnd.marlin.drm.mdcf +# application/vnd.mason+json +# application/vnd.maxmind.maxmind-db application/vnd.mcd mcd application/vnd.medcalcdata mc1 application/vnd.mediastation.cdkey cdkey # application/vnd.meridian-slingshot application/vnd.mfer mwf application/vnd.mfmp mfm +# application/vnd.micro+json application/vnd.micrografx.flo flo application/vnd.micrografx.igx igx +# application/vnd.microsoft.portable-executable +# application/vnd.miele+json application/vnd.mif mif # application/vnd.minisoft-hp3000-save # application/vnd.mitsubishi.misty-guard.trustweb @@ -547,9 +749,11 @@ application/vnd.mophun.certificate mpc # application/vnd.motorola.flexsuite.wem # application/vnd.motorola.iprm application/vnd.mozilla.xul+xml xul +# application/vnd.ms-3mfdocument application/vnd.ms-artgalry cil # application/vnd.ms-asf application/vnd.ms-cab-compressed cab +# application/vnd.ms-color.iccprofile application/vnd.ms-excel xls xlm xla xlc xlt xlw application/vnd.ms-excel.addin.macroenabled.12 xlam application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb @@ -561,6 +765,8 @@ application/vnd.ms-ims ims application/vnd.ms-lrm lrm # application/vnd.ms-office.activex+xml application/vnd.ms-officetheme thmx +# application/vnd.ms-opentype +# application/vnd.ms-package.obfuscated-opentype application/vnd.ms-pki.seccat cat application/vnd.ms-pki.stl stl # application/vnd.ms-playready.initiator+xml @@ -570,8 +776,15 @@ application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm application/vnd.ms-powerpoint.slide.macroenabled.12 sldm application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm application/vnd.ms-powerpoint.template.macroenabled.12 potm +# application/vnd.ms-printdevicecapabilities+xml +# application/vnd.ms-printing.printticket+xml +# application/vnd.ms-printschematicket+xml application/vnd.ms-project mpp mpt # application/vnd.ms-tnef +# application/vnd.ms-windows.devicepairing +# application/vnd.ms-windows.nwprinting.oob +# application/vnd.ms-windows.printerpairing +# application/vnd.ms-windows.wsd.oob # application/vnd.ms-wmdrm.lic-chlg-req # application/vnd.ms-wmdrm.lic-resp # application/vnd.ms-wmdrm.meter-chlg-req @@ -581,6 +794,7 @@ application/vnd.ms-word.template.macroenabled.12 dotm application/vnd.ms-works wps wks wcm wdb application/vnd.ms-wpl wpl application/vnd.ms-xpsdocument xps +# application/vnd.msa-disk-image application/vnd.mseq mseq # application/vnd.msign # application/vnd.multiad.creator @@ -588,19 +802,23 @@ application/vnd.mseq mseq # application/vnd.music-niff application/vnd.musician mus application/vnd.muvee.style msty +application/vnd.mynfc taglet # application/vnd.ncd.control # application/vnd.ncd.reference # application/vnd.nervana # application/vnd.netfpx application/vnd.neurolanguage.nlu nlu +# application/vnd.nintendo.nitro.rom +# application/vnd.nintendo.snes.rom +application/vnd.nitf ntf nitf application/vnd.noblenet-directory nnd application/vnd.noblenet-sealer nns application/vnd.noblenet-web nnw # application/vnd.nokia.catalogs # application/vnd.nokia.conml+wbxml # application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets # application/vnd.nokia.iptv.config+xml +# application/vnd.nokia.isds-radio-presets # application/vnd.nokia.landmark+wbxml # application/vnd.nokia.landmark+xml # application/vnd.nokia.landmarkcollection+xml @@ -615,7 +833,9 @@ application/vnd.nokia.radio-presets rpss application/vnd.novadigm.edm edm application/vnd.novadigm.edx edx application/vnd.novadigm.ext ext +# application/vnd.ntt-local.content-share # application/vnd.ntt-local.file-transfer +# application/vnd.ntt-local.ogw_remote-access # application/vnd.ntt-local.sip-ta_remote # application/vnd.ntt-local.sip-ta_tcp_stream application/vnd.oasis.opendocument.chart odc @@ -636,6 +856,7 @@ application/vnd.oasis.opendocument.text-master odm application/vnd.oasis.opendocument.text-template ott application/vnd.oasis.opendocument.text-web oth # application/vnd.obn +# application/vnd.oftn.l10n+json # application/vnd.oipf.contentaccessdownload+xml # application/vnd.oipf.contentaccessstreaming+xml # application/vnd.oipf.cspg-hexbinary @@ -665,12 +886,18 @@ application/vnd.olpc-sugar xo # application/vnd.oma.bcast.sprov+xml # application/vnd.oma.bcast.stkm # application/vnd.oma.cab-address-book+xml +# application/vnd.oma.cab-feature-handler+xml # application/vnd.oma.cab-pcc+xml +# application/vnd.oma.cab-subs-invite+xml +# application/vnd.oma.cab-user-prefs+xml # application/vnd.oma.dcd # application/vnd.oma.dcdc application/vnd.oma.dd2+xml dd2 # application/vnd.oma.drm.risd+xml # application/vnd.oma.group-usage-list+xml +# application/vnd.oma.lwm2m+json +# application/vnd.oma.lwm2m+tlv +# application/vnd.oma.pal+xml # application/vnd.oma.poc.detailed-progress-report+xml # application/vnd.oma.poc.final-report+xml # application/vnd.oma.poc.groups+xml @@ -683,6 +910,10 @@ application/vnd.oma.dd2+xml dd2 # application/vnd.omads-file+xml # application/vnd.omads-folder+xml # application/vnd.omaloc-supl-init +# application/vnd.onepager +# application/vnd.openblox.game+xml +# application/vnd.openblox.game-binary +# application/vnd.openeye.oeb application/vnd.openofficeorg.extension oxt # application/vnd.openxmlformats-officedocument.custom-properties+xml # application/vnd.openxmlformats-officedocument.customxmlproperties+xml @@ -758,15 +989,21 @@ application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx # application/vnd.openxmlformats-package.core-properties+xml # application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml # application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument +# application/vnd.oracle.resource+json +# application/vnd.orange.indata # application/vnd.osa.netdeploy application/vnd.osgeo.mapguide.package mgp # application/vnd.osgi.bundle application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa # application/vnd.otps.ct-kip+xml +# application/vnd.oxli.countgraph +# application/vnd.pagerduty+json application/vnd.palm pdb pqa oprc +# application/vnd.panoply # application/vnd.paos.xml application/vnd.pawaafile paw +# application/vnd.pcos application/vnd.pg.format str application/vnd.pg.osasli ei6 # application/vnd.piaccess.application-licence @@ -788,7 +1025,9 @@ application/vnd.pvi.ptid1 ptid # application/vnd.pwg-multiplexed # application/vnd.pwg-xhtml-print+xml # application/vnd.qualcomm.brew-app-res +# application/vnd.quarantainenet application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb +# application/vnd.quobject-quoxdocument # application/vnd.radisys.moml+xml # application/vnd.radisys.msml+xml # application/vnd.radisys.msml-audit+xml @@ -806,6 +1045,7 @@ application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb # application/vnd.radisys.msml-dialog-transform+xml # application/vnd.rainstor.data # application/vnd.rapid +# application/vnd.rar application/vnd.realvnc.bed bed application/vnd.recordare.musicxml mxl application/vnd.recordare.musicxml+xml musicxml @@ -813,7 +1053,9 @@ application/vnd.recordare.musicxml+xml musicxml application/vnd.rig.cryptonote cryptonote application/vnd.rim.cod cod application/vnd.rn-realmedia rm +application/vnd.rn-realmedia-vbr rmvb application/vnd.route66.link66+xml link66 +# application/vnd.rs-274x # application/vnd.ruckus.download # application/vnd.s3sms application/vnd.sailingtracker.track st @@ -840,6 +1082,7 @@ application/vnd.shana.informed.formtemplate itp application/vnd.shana.informed.interchange iif application/vnd.shana.informed.package ipk application/vnd.simtech-mindmapper twd twds +# application/vnd.siren+json application/vnd.smaf mmf # application/vnd.smart.notebook application/vnd.smart.teacher teacher @@ -857,8 +1100,10 @@ application/vnd.stardivision.impress sdd application/vnd.stardivision.math smf application/vnd.stardivision.writer sdw vor application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip application/vnd.stepmania.stepchart sm # application/vnd.street-stream +# application/vnd.sun.wadl+xml application/vnd.sun.xml.calc sxc application/vnd.sun.xml.calc.template stc application/vnd.sun.xml.draw sxd @@ -869,7 +1114,6 @@ application/vnd.sun.xml.math sxm application/vnd.sun.xml.writer sxw application/vnd.sun.xml.writer.global sxg application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml application/vnd.sus-calendar sus susp application/vnd.svd svd # application/vnd.swiftview-ics @@ -878,8 +1122,15 @@ application/vnd.syncml+xml xsm application/vnd.syncml.dm+wbxml bdm application/vnd.syncml.dm+xml xdm # application/vnd.syncml.dm.notification +# application/vnd.syncml.dmddf+wbxml +# application/vnd.syncml.dmddf+xml +# application/vnd.syncml.dmtnds+wbxml +# application/vnd.syncml.dmtnds+xml # application/vnd.syncml.ds.notification application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap pcap cap dmp +# application/vnd.tmd.mediaflex.api+xml +# application/vnd.tml application/vnd.tmobile-livetv tmo application/vnd.trid.tpt tpt application/vnd.triscape.mxs mxs @@ -904,9 +1155,12 @@ application/vnd.uoml+xml uoml # application/vnd.uplanet.listcmd # application/vnd.uplanet.listcmd-wbxml # application/vnd.uplanet.signal +# application/vnd.uri-map +# application/vnd.valve.source.material application/vnd.vcx vcx # application/vnd.vd-study # application/vnd.vectorworks +# application/vnd.vel+json # application/vnd.verimatrix.vcas # application/vnd.vidsoft.vidconference application/vnd.visio vsd vst vss vsw @@ -919,7 +1173,9 @@ application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/vnd.webturbo wtb +# application/vnd.wfa.p2p # application/vnd.wfa.wsc +# application/vnd.windows.devicepairing # application/vnd.wmc # application/vnd.wmf.bootstrap # application/vnd.wolfram.mathematica @@ -932,6 +1188,7 @@ application/vnd.wt.stf stf # application/vnd.wv.csp+wbxml # application/vnd.wv.csp+xml # application/vnd.wv.ssp+xml +# application/vnd.xacml+json application/vnd.xara xar application/vnd.xfdl xfdl # application/vnd.xfdl.webform @@ -949,7 +1206,9 @@ application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg # application/vnd.yamaha.remote-setup application/vnd.yamaha.smaf-audio saf application/vnd.yamaha.smaf-phrase spf +# application/vnd.yamaha.through-ngn # application/vnd.yamaha.tunnel-udpencap +# application/vnd.yaoweme application/vnd.yellowriver-custom-menu cmp application/vnd.zul zir zirz application/vnd.zzazz.deck+xml zaz @@ -967,26 +1226,35 @@ application/wspolicy+xml wspolicy application/x-7z-compressed 7z application/x-abiword abw application/x-ace-compressed ace +# application/x-amf +application/x-apple-diskimage dmg application/x-authorware-bin aab x32 u32 vox application/x-authorware-map aam application/x-authorware-seg aas application/x-bcpio bcpio application/x-bittorrent torrent +application/x-blorb blb blorb application/x-bzip bz application/x-bzip2 bz2 boz +application/x-cbr cbr cba cbt cbz cb7 application/x-cdlink vcd +application/x-cfs-compressed cfs application/x-chat chat application/x-chess-pgn pgn # application/x-compress +application/x-conference nsc application/x-cpio cpio application/x-csh csh application/x-debian-package deb udeb +application/x-dgc-compressed dgc application/x-director dir dcr dxr cst cct cxt w3d fgd swa application/x-doom wad application/x-dtbncx+xml ncx application/x-dtbook+xml dtb application/x-dtbresource+xml res application/x-dvi dvi +application/x-envoy evy +application/x-eva eva application/x-font-bdf bdf # application/x-font-dos # application/x-font-framemaker @@ -1000,17 +1268,25 @@ application/x-font-snf snf # application/x-font-sunos-news application/x-font-ttf ttf ttc application/x-font-type1 pfa pfb pfm afm -application/x-font-woff woff # application/x-font-vfont +application/x-freearc arc application/x-futuresplash spl +application/x-gca-compressed gca +application/x-glulx ulx application/x-gnumeric gnumeric +application/x-gramps-xml gramps application/x-gtar gtar # application/x-gzip application/x-hdf hdf +application/x-install-instructions install +application/x-iso9660-image iso application/x-java-jnlp-file jnlp application/x-latex latex +application/x-lzh-compressed lzh lha +application/x-mie mie application/x-mobipocket-ebook prc mobi application/x-ms-application application +application/x-ms-shortcut lnk application/x-ms-wmd wmd application/x-ms-wmz wmz application/x-ms-xbap xbap @@ -1020,58 +1296,74 @@ application/x-mscardfile crd application/x-msclip clp application/x-msdownload exe dll com bat msi application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf +application/x-msmetafile wmf wmz emf emz application/x-msmoney mny application/x-mspublisher pub application/x-msschedule scd application/x-msterminal trm application/x-mswrite wri application/x-netcdf nc cdf +application/x-nzb nzb application/x-pkcs12 p12 pfx application/x-pkcs7-certificates p7b spc application/x-pkcs7-certreqresp p7r application/x-rar-compressed rar +application/x-research-info-systems ris application/x-sh sh application/x-shar shar application/x-shockwave-flash swf application/x-silverlight-app xap +application/x-sql sql application/x-stuffit sit application/x-stuffitx sitx +application/x-subrip srt application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc +application/x-t3vm-image t3 +application/x-tads gam application/x-tar tar application/x-tcl tcl application/x-tex tex application/x-tex-tfm tfm application/x-texinfo texinfo texi +application/x-tgif obj application/x-ustar ustar application/x-wais-source src +# application/x-www-form-urlencoded application/x-x509-ca-cert der crt application/x-xfig fig +application/x-xliff+xml xlf application/x-xpinstall xpi +application/x-xz xz +application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 # application/x400-bp +# application/xacml+xml +application/xaml+xml xaml # application/xcap-att+xml # application/xcap-caps+xml application/xcap-diff+xml xdf # application/xcap-el+xml # application/xcap-error+xml # application/xcap-ns+xml -# application/xcon-conference-info-diff+xml # application/xcon-conference-info+xml +# application/xcon-conference-info-diff+xml application/xenc+xml xenc application/xhtml+xml xhtml xht # application/xhtml-voice+xml application/xml xml xsl application/xml-dtd dtd # application/xml-external-parsed-entity +# application/xml-patch+xml # application/xmpp+xml application/xop+xml xop +application/xproc+xml xpl application/xslt+xml xslt application/xspf+xml xspf application/xv+xml mxml xhvml xvml xvm application/yang yang application/yin+xml yin application/zip zip +# application/zlib # audio/1d-interleaved-parityfec # audio/32kadpcm # audio/3gpp @@ -1081,6 +1373,7 @@ audio/adpcm adp # audio/amr # audio/amr-wb # audio/amr-wb+ +# audio/aptx # audio/asc # audio/atrac-advanced-lossless # audio/atrac-x @@ -1096,8 +1389,10 @@ audio/basic au snd # audio/dsr-es202050 # audio/dsr-es202211 # audio/dsr-es202212 +# audio/dv # audio/dvi4 # audio/eac3 +# audio/encaprtp # audio/evrc # audio/evrc-qcp # audio/evrc0 @@ -1105,10 +1400,16 @@ audio/basic au snd # audio/evrcb # audio/evrcb0 # audio/evrcb1 +# audio/evrcnw +# audio/evrcnw0 +# audio/evrcnw1 # audio/evrcwb # audio/evrcwb0 # audio/evrcwb1 +# audio/evs # audio/example +# audio/fwdred +# audio/g711-0 # audio/g719 # audio/g722 # audio/g7221 @@ -1126,6 +1427,8 @@ audio/basic au snd # audio/gsm-efr # audio/gsm-hr-08 # audio/ilbc +# audio/ip-mr_v2.5 +# audio/isac # audio/l16 # audio/l20 # audio/l24 @@ -1133,27 +1436,33 @@ audio/basic au snd # audio/lpc audio/midi mid midi kar rmi # audio/mobile-xmf -audio/mp4 mp4a +audio/mp4 m4a mp4a # audio/mp4a-latm # audio/mpa # audio/mpa-robust audio/mpeg mpga mp2 mp2a mp3 m2a m3a # audio/mpeg4-generic +# audio/musepack audio/ogg oga ogg spx +# audio/opus # audio/parityfec # audio/pcma # audio/pcma-wb -# audio/pcmu-wb # audio/pcmu +# audio/pcmu-wb # audio/prs.sid # audio/qcelp +# audio/raptorfec # audio/red # audio/rtp-enc-aescm128 # audio/rtp-midi +# audio/rtploopback # audio/rtx +audio/s3m s3m +audio/silk sil # audio/smv -# audio/smv0 # audio/smv-qcp +# audio/smv0 # audio/sp-midi # audio/speex # audio/t140c @@ -1186,6 +1495,7 @@ audio/vnd.digital-winds eol audio/vnd.dra dra audio/vnd.dts dts audio/vnd.dts.hd dtshd +# audio/vnd.dvb.file # audio/vnd.everad.plj # audio/vnd.hns.audio audio/vnd.lucent.voice lvp @@ -1206,12 +1516,17 @@ audio/vnd.rip rip audio/webm weba audio/x-aac aac audio/x-aiff aif aiff aifc +audio/x-caf caf +audio/x-flac flac +audio/x-matroska mka audio/x-mpegurl m3u audio/x-ms-wax wax audio/x-ms-wma wma audio/x-pn-realaudio ram ra audio/x-pn-realaudio-plugin rmp +# audio/x-tta audio/x-wav wav +audio/xm xm chemical/x-cdx cdx chemical/x-cif cif chemical/x-cmdf cmdf @@ -1221,11 +1536,14 @@ chemical/x-csml csml chemical/x-xyz xyz image/bmp bmp image/cgm cgm +# image/dicom-rle +# image/emf # image/example # image/fits image/g3fax g3 image/gif gif image/ief ief +# image/jls # image/jp2 image/jpeg jpeg jpg jpe # image/jpm @@ -1235,15 +1553,18 @@ image/ktx ktx image/png png image/prs.btif btif # image/prs.pti +# image/pwg-raster +image/sgi sgi image/svg+xml svg svgz # image/t38 image/tiff tiff tif # image/tiff-fx image/vnd.adobe.photoshop psd +# image/vnd.airzip.accelerator.azv # image/vnd.cns.inf2 image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub image/vnd.djvu djvu djv +image/vnd.dvb.subtitle sub image/vnd.dwg dwg image/vnd.dxf dxf image/vnd.fastbidsheet fbs @@ -1254,20 +1575,28 @@ image/vnd.fujixerox.edmics-rlc rlc # image/vnd.globalgraphics.pgb # image/vnd.microsoft.icon # image/vnd.mix +# image/vnd.mozilla.apng image/vnd.ms-modi mdi +image/vnd.ms-photo wdp image/vnd.net-fpx npx # image/vnd.radiance # image/vnd.sealed.png # image/vnd.sealedmedia.softseal.gif # image/vnd.sealedmedia.softseal.jpg # image/vnd.svf +# image/vnd.tencent.tap +# image/vnd.valve.source.texture image/vnd.wap.wbmp wbmp image/vnd.xiff xif +# image/vnd.zbrush.pcx image/webp webp +# image/wmf +image/x-3ds 3ds image/x-cmu-raster ras image/x-cmx cmx image/x-freehand fh fhc fh4 fh5 fh7 image/x-icon ico +image/x-mrsid-image sid image/x-pcx pcx image/x-pict pic pct image/x-portable-anymap pnm @@ -1275,6 +1604,7 @@ image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb +image/x-tga tga image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd @@ -1298,7 +1628,9 @@ message/rfc822 eml mime # message/sipfrag # message/tracking-status # message/vnd.si.simp +# message/vnd.wfa.wsc # model/example +# model/gltf+json model/iges igs iges model/mesh msh mesh silo model/vnd.collada+xml dae @@ -1310,10 +1642,18 @@ model/vnd.gdl gdl model/vnd.gtw gtw # model/vnd.moml+xml model/vnd.mts mts +# model/vnd.opengex # model/vnd.parasolid.transmit.binary # model/vnd.parasolid.transmit.text +# model/vnd.rosette.annotated-data-model +# model/vnd.valve.source.compiled-map model/vnd.vtu vtu model/vrml wrl vrml +model/x3d+binary x3db x3dbz +# model/x3d+fastinfoset +model/x3d+vrml x3dv x3dvz +model/x3d+xml x3d x3dz +# model/x3d-vrml # multipart/alternative # multipart/appledouble # multipart/byteranges @@ -1328,28 +1668,41 @@ model/vrml wrl vrml # multipart/report # multipart/signed # multipart/voice-message +# multipart/x-mixed-replace # text/1d-interleaved-parityfec +text/cache-manifest appcache text/calendar ics ifb text/css css text/csv csv +# text/csv-schema # text/directory # text/dns # text/ecmascript +# text/encaprtp # text/enriched # text/example +# text/fwdred +# text/grammar-ref-list text/html html htm # text/javascript +# text/jcr-cnd +# text/markdown +# text/mizar text/n3 n3 +# text/parameters # text/parityfec text/plain txt text conf def list log in +# text/provenance-notation # text/prs.fallenstein.rst text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout +# text/prs.prop.logic +# text/raptorfec # text/red # text/rfc822-headers text/richtext rtx # text/rtf # text/rtp-enc-aescm128 +# text/rtploopback # text/rtx text/sgml sgml sgm # text/t140 @@ -1358,12 +1711,16 @@ text/troff t tr roff man me ms text/turtle ttl # text/ulpfec text/uri-list uri uris urls +text/vcard vcard +# text/vnd.a # text/vnd.abc text/vnd.curl curl text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl text/vnd.curl.mcurl mcurl +text/vnd.curl.scurl scurl +# text/vnd.debian.copyright # text/vnd.dmclientscript +text/vnd.dvb.subtitle sub # text/vnd.esmertec.theme-descriptor text/vnd.fly fly text/vnd.fmi.flexstor flx @@ -1376,6 +1733,7 @@ text/vnd.in3d.spot spot # text/vnd.motorola.reflex # text/vnd.ms-mediapackage # text/vnd.net2phone.commcenter.command +# text/vnd.radisys.msml-basic-layout # text/vnd.si.uricatalogue text/vnd.sun.j2me.app-descriptor jad # text/vnd.trolltech.linguist @@ -1386,9 +1744,12 @@ text/vnd.wap.wmlscript wmls text/x-asm s asm text/x-c c cc cxx cpp h hh dic text/x-fortran f for f77 f90 -text/x-pascal p pas text/x-java-source java +text/x-nfo nfo +text/x-opml opml +text/x-pascal p pas text/x-setext etx +text/x-sfv sfv text/x-uuencode uu text/x-vcalendar vcs text/x-vcard vcf @@ -1402,6 +1763,7 @@ video/3gpp2 3g2 # video/bt656 # video/celb # video/dv +# video/encaprtp # video/example video/h261 h261 video/h263 h263 @@ -1410,6 +1772,8 @@ video/h263 h263 video/h264 h264 # video/h264-rcdo # video/h264-svc +# video/h265 +# video/iso.segment video/jpeg jpgv # video/jpeg2000 video/jpm jpm jpgm @@ -1427,8 +1791,10 @@ video/ogg ogv # video/parityfec # video/pointer video/quicktime qt mov +# video/raptorfec # video/raw # video/rtp-enc-aescm128 +# video/rtploopback # video/rtx # video/smpte292m # video/ulpfec @@ -1443,6 +1809,7 @@ video/vnd.dece.video uvv uvvv # video/vnd.directv.mpeg # video/vnd.directv.mpeg-tts # video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb video/vnd.fvt fvt # video/vnd.hns.video # video/vnd.iptvforum.1dparityfec-1010 @@ -1458,22 +1825,29 @@ video/vnd.ms-playready.media.pyv pyv # video/vnd.nokia.interleaved-multimedia # video/vnd.nokia.videovoip # video/vnd.objectvideo +# video/vnd.radgamettools.bink +# video/vnd.radgamettools.smacker # video/vnd.sealed.mpeg1 # video/vnd.sealed.mpeg4 # video/vnd.sealed.swf # video/vnd.sealedmedia.softseal.mov video/vnd.uvvu.mp4 uvu uvvu video/vnd.vivo viv +# video/vp8 video/webm webm video/x-f4v f4v video/x-fli fli video/x-flv flv video/x-m4v m4v +video/x-matroska mkv mk3d mks +video/x-mng mng video/x-ms-asf asf asx +video/x-ms-vob vob video/x-ms-wm wm video/x-ms-wmv wmv video/x-ms-wmx wmx video/x-ms-wvx wvx video/x-msvideo avi video/x-sgi-movie movie +video/x-smv smv x-conference/x-cooltalk ice diff --git a/docs/doxygen.conf b/docs/doxygen.conf index 95e11bc2ae0..dad045aaf09 100644 --- a/docs/doxygen.conf +++ b/docs/doxygen.conf @@ -13,6 +13,9 @@ EXTRACT_ALL=YES # add documentation for functions that are declared internal use only INTERNAL_DOCS=YES +HAVE_DOT=YES +CLASS_GRAPH=YES + ENABLE_PREPROCESSING=YES MACRO_EXPANSION=YES diff --git a/docs/error/HTTP_BAD_GATEWAY.html.var b/docs/error/HTTP_BAD_GATEWAY.html.var index 29ac361d895..a9061b30e2a 100644 --- a/docs/error/HTTP_BAD_GATEWAY.html.var +++ b/docs/error/HTTP_BAD_GATEWAY.html.var @@ -54,11 +54,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El servidor 'proxy' recibió información - inválida del servidor solicitante. + El servidor 'proxy' ha recibido; información + no válida del servidor de origen. @@ -176,6 +176,24 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Proxyserveren mottok et ugyldig svar fra + en oppstrøms server. + + + + + + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_BAD_REQUEST.html.var b/docs/error/HTTP_BAD_REQUEST.html.var index fb0d31cb3b1..8f892c781be 100644 --- a/docs/error/HTTP_BAD_REQUEST.html.var +++ b/docs/error/HTTP_BAD_REQUEST.html.var @@ -39,11 +39,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - Su buscador (o 'proxy') envió una solicitud - que el servidor no pudo entender. + Su navegador (o 'proxy') ha enviado una petición + que el servidor no ha podido entender. ----------es-- @@ -126,6 +126,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Din nettleser eller proxy sendte en forespørsel + som denne serveren ikke kunne forstå. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_FORBIDDEN.html.var b/docs/error/HTTP_FORBIDDEN.html.var index c95b2ecddc7..16995cab327 100644 --- a/docs/error/HTTP_FORBIDDEN.html.var +++ b/docs/error/HTTP_FORBIDDEN.html.var @@ -68,20 +68,20 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - Usted no tiene permiso para accesar al directorio solicitado. + Usted no tiene permiso para acceder al directorio solicitado. No existe un documento índice, o el directorio está protegido contra lectura. - Usted no tiene permiso de accesar al objeto solicitado. - El objeto está protegido contra lectura, o no - puede ser leido por el servidor. + Usted no tiene permiso para acceder al objeto solicitado. + El objeto está protegido contra lectura o + el servidor no puede leerlo. @@ -128,7 +128,7 @@ Body:----------ga-- Níl cead agat rochtain a dhéanamh ar an aidhm faoi iarratais. Is féidir go bhfuil cosaint ar lé air, nó go bhfuil - sé doléite don freastalaí. + sé doléite don freastalaí. @@ -225,6 +225,30 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + + + Du har ikke tilstrekkelige rettigheter for å få tilgang til den + ønskede katalogen. Det eksisterer ikke et indeksdokument, eller + katalogen er lesebeskyttet. + + + + Du har ikke tilstrekkelige rettigheter for å få adgang til det + ønskede dokumentet. Objektet er lesebeskyttet, eller ikke lesbart + for serveren. + + + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_GONE.html.var b/docs/error/HTTP_GONE.html.var index f9356dc983e..cd58bccfa9b 100644 --- a/docs/error/HTTP_GONE.html.var +++ b/docs/error/HTTP_GONE.html.var @@ -79,22 +79,22 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El URL solicitado actualmente no esta disponible en este servidor y - no existe una dirección a la cual referirlo. + La URL solicitada ya no está disponible en este servidor y + no existe una dirección a la cual remitirle. - Por favor comunique al autor de la + Por favor, comunique al autor de la ">página - que lo refirió que el URL es obsoleto. + que le ha remitido que la URL está obsoleta. - Si usted siguió el URL desde una página externa, - por favor contacte al autor de esa página. + Si usted ha seguido un enlace de una página externa, + por favor contacte con el autor de esa página. @@ -256,6 +256,32 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Den ønskede adressen er ikke lenger tilgjengelig hos denne + serveren og det finnes ingen adresse for videresending. + + + + Venligst informer forfatteren bak + ">den + aktuelle siden om at lenken er utdatert. + + + + Om du fulgte en lenke fra en ekstern side, venligst kontakt + forfatteren bak den siden. + + + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_INTERNAL_SERVER_ERROR.html.var b/docs/error/HTTP_INTERNAL_SERVER_ERROR.html.var index 825fedcd42b..7cb842038b8 100644 --- a/docs/error/HTTP_INTERNAL_SERVER_ERROR.html.var +++ b/docs/error/HTTP_INTERNAL_SERVER_ERROR.html.var @@ -85,11 +85,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - Se produjo un error interno en el servidor y le - fue imposible completar su solicitud. + Se ha producido un error interno en el servidor y no + se ha podido completar su solicitud. @@ -99,8 +99,10 @@ Body:----------es-- - El servidor puede estar sobrecargado, o hubo un - error en la ejecución de un programa 'CGI'. + Se ha producido un error interno en el servidor y no se + ha podido completar su solicitud. O el servidor está + sobrecargado o ha habido un fallo en la ejecución de + un programa CGI. @@ -274,6 +276,34 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + + + Det inntraff en intern feil hos serveren, og det var ikke mulig å + gjennomføre din forespørsel. + + + + Feilmelding: +
+ + + + Det inntraff en intern feil hos serveren, og det var ikke mulig å + gjennomføre din forespørsel. Serveren er enten overbelastet, eller + CGI-skriptet inneholder feil. + + + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_LENGTH_REQUIRED.html.var b/docs/error/HTTP_LENGTH_REQUIRED.html.var index d13c359c4f6..f542b9d4132 100644 --- a/docs/error/HTTP_LENGTH_REQUIRED.html.var +++ b/docs/error/HTTP_LENGTH_REQUIRED.html.var @@ -41,13 +41,12 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - Una solicitud con el método - requiere que el contenido de la variable de los encabezados - Content-Length sea válida. + Una petición con el método requiere que el encabezado + Content-Length sea válido. ----------es-- @@ -136,6 +135,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + En forespørsel med + metoden krever en korrekt Content-Length header. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_METHOD_NOT_ALLOWED.html.var b/docs/error/HTTP_METHOD_NOT_ALLOWED.html.var index 124cd58957c..1eefb9d7e35 100644 --- a/docs/error/HTTP_METHOD_NOT_ALLOWED.html.var +++ b/docs/error/HTTP_METHOD_NOT_ALLOWED.html.var @@ -39,11 +39,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El método - no está permitido para el URL solicitado. + No se permite el método + para la URL solicitada. ----------es-- @@ -126,6 +126,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + metoden er ikke + tillatt for den forespurte adressen. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_NOT_FOUND.html.var b/docs/error/HTTP_NOT_FOUND.html.var index 90fdcf7eee8..442f4968fdf 100644 --- a/docs/error/HTTP_NOT_FOUND.html.var +++ b/docs/error/HTTP_NOT_FOUND.html.var @@ -82,23 +82,23 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El URL solicitado no ha sido localizado en este servidor. + No se ha localizado la URL solicitada en este servidor. - El URL de la ">página que lo refirió - parece ser equivocado u obsoleto. Por favor comunique al autor - de ">esa - página acerca del error. + La URL de la ">página que le ha remitido + parece ser errónea o estar obsoleta. Por favor, informe del error + al autor de ">esa + página. - Si usted tecleó el URL manualmente, por favor revise su - ortografía y vuélvalo a intentar. + Si usted ha introducido la URL manualmente, por favor revise su + ortografía e inténtelo de nuevo. @@ -267,6 +267,33 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Den etterspurte adressen finnes ikke på denne serveren. + + + + Lenken på den + ">forrige siden +ser ut til å være feil eller utdatert. Venligst informer forfatteren av + ">siden + om feilen. + + + + Om du skrev inn adressen manuelt, vennligst kontroller stavingen og + forsøk igjen. + + + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_NOT_IMPLEMENTED.html.var b/docs/error/HTTP_NOT_IMPLEMENTED.html.var index 99f19f6a1a7..8dc2f7d9ff4 100644 --- a/docs/error/HTTP_NOT_IMPLEMENTED.html.var +++ b/docs/error/HTTP_NOT_IMPLEMENTED.html.var @@ -37,11 +37,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El servidor no tiene implementada la acción - solicitada por el buscador. + El servidor no soporta la acción + solicitada por el navegador. ----------es-- @@ -119,6 +119,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Serveren støtter ikke den handlingen som ønskes utført av + nettleseren. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- @@ -184,7 +197,7 @@ Content-language: sv Content-type: text/html; charset=UTF-8 Body:----------sv-- Servern stödjer inte den handling som önskades diff --git a/docs/error/HTTP_PRECONDITION_FAILED.html.var b/docs/error/HTTP_PRECONDITION_FAILED.html.var index ef93e6e149e..da69e2b6a53 100644 --- a/docs/error/HTTP_PRECONDITION_FAILED.html.var +++ b/docs/error/HTTP_PRECONDITION_FAILED.html.var @@ -38,11 +38,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - La pre-condición de la solicitud para el - URL no se evaluó positivamente. + No se ha evaluado positivamente la pre-condición + de la petición para la URL. ----------es-- @@ -121,6 +121,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Den nødvendige forutsetningen for forespørselen passerte ikke + vurderingen med positivt resultat. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var b/docs/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var index f3e0f6612fe..20bceff6088 100644 --- a/docs/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var +++ b/docs/error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var @@ -42,10 +42,10 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El método + El método no permite transmitir la información, o el volumen de la información excede los límites de capacidad del mismo. @@ -135,6 +135,20 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + metoden tillater ikke + de sendte data eller så overskrider datamengenden + kapasitetsbegrensningen. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_REQUEST_TIME_OUT.html.var b/docs/error/HTTP_REQUEST_TIME_OUT.html.var index 3f3956571d0..85004a0ea0e 100644 --- a/docs/error/HTTP_REQUEST_TIME_OUT.html.var +++ b/docs/error/HTTP_REQUEST_TIME_OUT.html.var @@ -40,11 +40,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El servidor cerró la conección de red - debido a que el buscador no termino la solicitud + El servidor ha cerrado la conexión de red + debido a que el navegador no ha finalizado la solicitud dentro del tiempo permitido. @@ -129,6 +129,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Serveren stengte forbindelsen fordi nettleseren ikke avsluttet + forespørselen innen tidsgrensen. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_REQUEST_URI_TOO_LARGE.html.var b/docs/error/HTTP_REQUEST_URI_TOO_LARGE.html.var index ba5b409ac80..4831c472a85 100644 --- a/docs/error/HTTP_REQUEST_URI_TOO_LARGE.html.var +++ b/docs/error/HTTP_REQUEST_URI_TOO_LARGE.html.var @@ -40,11 +40,11 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - La longitud del URL solicitado excede el límite de - capacidad para este servidor. La solicitud no puede ser procesada. + La longitud de la URL solicitada excede el límite de + capacidad para este servidor. No se puede procesar la solicitud. ----------es-- @@ -128,6 +128,20 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Lengden på adressen som etterspurtes overskrider + kapasitetsgrensen for denne serveren. Forespørselen kan + ikke prosesseres. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_SERVICE_UNAVAILABLE.html.var b/docs/error/HTTP_SERVICE_UNAVAILABLE.html.var index ec021344013..e5905ebbd48 100644 --- a/docs/error/HTTP_SERVICE_UNAVAILABLE.html.var +++ b/docs/error/HTTP_SERVICE_UNAVAILABLE.html.var @@ -43,13 +43,12 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - Por el momento el servidor no puede atender su solicitud - debido a que está en mantenimiento o a que tiene - problemas de capacidad. Por favor intente nuevamente - más tarde. + El servidor no puede procesar su solicitud en este momento + debido a tareas de mantenimiento o a problemas de capacidad. + Por favor, inténtelo de nuevo más tarde. ----------es-- @@ -138,6 +137,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Serveren er midlertidig ikke i stand til å utføre din + forespørsel. Vennligst prøv igjen senere. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_UNAUTHORIZED.html.var b/docs/error/HTTP_UNAUTHORIZED.html.var index bd7995790de..2a8994f06db 100644 --- a/docs/error/HTTP_UNAUTHORIZED.html.var +++ b/docs/error/HTTP_UNAUTHORIZED.html.var @@ -62,20 +62,20 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + El servidor no puede certificar que usted esté autorizado - para accesar el URL "". - Pudo haber suministrado información incorrecta (ej. - contraseña inválida) o, el buscador no sabe - como suministrar la información requerida. + para acceder a la URL "". + Ha podido suministrar información incorrecta (ej. + contraseña no válida) o el navegador no sabe + cómo suministrar la información requerida. - En caso de que a usted le este permitido accesar el documento, - verifique su nombre de usuario y contraseña y vuélvalo - a intentar. + En caso de que usted tenga permiso para acceder al documento, + por favor verifique su nombre de usuario y contraseña y + vuélvalo a intentar. ----------es-- @@ -209,6 +209,27 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Serveren kunne ikke verifisere at du har tillatelse til å besøke + adressen "". Enten + oppga du feil opplysninger (f.eks. feil passord) eller så støtter + ikke din nettleser dette autentiseringsystemet. + + + + Om du har tillatelse til å besøke siden, vennligst kontroler ditt + brukernavn og passord og forsøk igjen. + + +----------nb-- + + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var b/docs/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var index a5a74872a53..44094cdee73 100644 --- a/docs/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var +++ b/docs/error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var @@ -37,10 +37,10 @@ Body:----------en-- Content-language: es Content-type: text/html Body:----------es-- - + - El servidor no tiene implementado el tipo + El servidor no soporta el tipo de medio transmitido en la solicitud. @@ -120,6 +120,18 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + Serveren støtter ikke den mediatypen som ble forespurt. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/HTTP_VARIANT_ALSO_VARIES.html.var b/docs/error/HTTP_VARIANT_ALSO_VARIES.html.var index c38afd4761a..ba9609c674a 100644 --- a/docs/error/HTTP_VARIANT_ALSO_VARIES.html.var +++ b/docs/error/HTTP_VARIANT_ALSO_VARIES.html.var @@ -133,6 +133,19 @@ Body:----------nl-- ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- + + + En variant av den forespurte enheten er i seg selv en forhandelbar + ressurs. Tilgang ikke mulig. + + +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/error/README b/docs/error/README index b369187f7ca..b660d07e303 100644 --- a/docs/error/README +++ b/docs/error/README @@ -24,6 +24,7 @@ | Italian (it) | Luigi Rosa | | Japanese (ja) | TAKAHASHI Makoto | | Korean (ko) | Jaeho Shin | + | Norwegian Bokmål (nb) | Tom Fredrik Klaussen | | Polish (pl) | Tomasz Kepczynski | | Romanian (ro) | Andrei Besleaga | | Serbian (sr) | Nikola Smolenski | diff --git a/docs/error/contact.html.var b/docs/error/contact.html.var index 4dea0126ae9..62044cf048d 100644 --- a/docs/error/contact.html.var +++ b/docs/error/contact.html.var @@ -74,6 +74,13 @@ Indien u van oordeel bent dat deze server in fout is, gelieve de ">webmaster te contacteren. ----------nl-- +Content-language: nb +Content-type: text/html; charset=UTF-8 +Body:----------nb-- +Om du tror dette skyldes en serverfeil, venligst kontakt +">webansvarlig. +----------nb-- + Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- diff --git a/docs/icons/apache_pb.gif b/docs/icons/apache_pb.gif index 3a1c139fc42..2f4137e339a 100644 Binary files a/docs/icons/apache_pb.gif and b/docs/icons/apache_pb.gif differ diff --git a/docs/icons/apache_pb.png b/docs/icons/apache_pb.png index daa26b0b1cc..fa3f6471377 100644 Binary files a/docs/icons/apache_pb.png and b/docs/icons/apache_pb.png differ diff --git a/docs/icons/apache_pb.svg b/docs/icons/apache_pb.svg new file mode 100644 index 00000000000..a7b963f96fd --- /dev/null +++ b/docs/icons/apache_pb.svg @@ -0,0 +1,5879 @@ + + + + + + Powered By: Apache 2.4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Powered By: Apache 2.4 + October 2nd, 2012 + + + Daniel Gruno [humbedooh@apache.org] + + + + + Copyright 2012, Apache Software Foundation + + + + + Apache Software Foun + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Powered by httpd 2.4 + + + + + + + + + + + + + + diff --git a/docs/icons/apache_pb2.gif b/docs/icons/apache_pb2.gif index 192ae8157a2..c81cfc6c09c 100644 Binary files a/docs/icons/apache_pb2.gif and b/docs/icons/apache_pb2.gif differ diff --git a/docs/icons/apache_pb2.png b/docs/icons/apache_pb2.png index e2721037eae..e5af8fb37eb 100644 Binary files a/docs/icons/apache_pb2.png and b/docs/icons/apache_pb2.png differ diff --git a/docs/icons/apache_pb2_ani.gif b/docs/icons/apache_pb2_ani.gif deleted file mode 100644 index 177c6c0152e..00000000000 Binary files a/docs/icons/apache_pb2_ani.gif and /dev/null differ diff --git a/docs/man/ab.8 b/docs/man/ab.1 similarity index 58% rename from docs/man/ab.8 rename to docs/man/ab.1 index 3e1b73cd6a0..cbca2f80f6c 100644 --- a/docs/man/ab.8 +++ b/docs/man/ab.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "AB" 8 "2011-07-02" "Apache HTTP Server" "ab" +.TH "AB" 1 "2015-05-01" "Apache HTTP Server" "ab" .SH NAME ab \- Apache HTTP server benchmarking tool @@ -27,7 +27,7 @@ ab \- Apache HTTP server benchmarking tool .SH "SYNOPSIS" .PP -\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBB\fR \fIlocal-address\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBu\fR \fIPUT-file\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fI-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fI-attributes\fR ] [ -\fBz\fR \fI - + - + @@ -207,24 +226,38 @@ listfunction ::= listfuncname "(" word ")" - + - + + + - + - - - + + + - + + + + + + +
-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR +\fBab\fR [ -\fBA\fR \fIauth-username\fR:\fIpassword\fR ] [ -\fBb\fR \fIwindowsize\fR ] [ -\fBB\fR \fIlocal-address\fR ] [ -\fBc\fR \fIconcurrency\fR ] [ -\fBC\fR \fIcookie-name\fR=\fIvalue\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-file\fR ] [ -\fBf\fR \fIprotocol\fR ] [ -\fBg\fR \fIgnuplot-file\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIcustom-header\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBl\fR ] [ -\fBm\fR \fIHTTP-method\fR ] [ -\fBn\fR \fIrequests\fR ] [ -\fBp\fR \fIPOST-file\fR ] [ -\fBP\fR \fIproxy-auth-username\fR:\fIpassword\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR \fItimeout\fR ] [ -\fBS\fR ] [ -\fBt\fR \fItimelimit\fR ] [ -\fBT\fR \fIcontent-type\fR ] [ -\fBu\fR \fIPUT-file\fR ] [ -\fBv\fR \fIverbosity\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fI-attributes\fR ] [ -\fBX\fR \fIproxy\fR[:\fIport\fR] ] [ -\fBy\fR \fI-attributes\fR ] [ -\fBz\fR \fI - + + + - + - + - + - + - + - + - + - - +
-attributes\fR ] [ -\fBZ\fR \fIciphersuite\fR ] [http[s]://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR .SH "SUMMARY" @@ -62,7 +62,7 @@ Do not display the "percentage served within XX [ms] table"\&. (legacy support)\ Write a Comma separated value (CSV) file which contains for each percentage (from 1% to 100%) the time (in milliseconds) it took to serve that percentage of the requests\&. This is usually more useful than the 'gnuplot' file; as the results are already 'binned'\&. .TP -f \fIprotocol\fR -Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)\&. +Specify SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1\&.1, TLS1\&.2, or ALL)\&. TLS1\&.1 and TLS1\&.2 support available in 2\&.4\&.4 and later\&. .TP -g \fIgnuplot-file\fR Write all measured values out as a 'gnuplot' or TSV (Tab separate values) file\&. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor or even Excel\&. The labels are on the first line of the file\&. @@ -79,6 +79,12 @@ Do HEAD requests instead of GET\&. -k Enable the HTTP KeepAlive feature, \fIi\&.e\&.\fR, perform multiple requests within one HTTP session\&. Default is no KeepAlive\&. .TP +-l +Do not report errors if the length of the responses is not constant\&. This can be useful for dynamic pages\&. Available in 2\&.4\&.7 and later\&. +.TP +-m \fIHTTP-method\fR +Custom HTTP method for the requests\&. Available in 2\&.4\&.10 and later\&. +.TP -n \fIrequests\fR Number of requests to perform for the benchmarking session\&. The default is to just perform a single request which usually leads to non-representative benchmarking results\&. .TP @@ -94,8 +100,8 @@ When processing more than 150 requests, ab outputs a progress count on stderr ev -r Don't exit on socket receive errors\&. .TP --s -When compiled in (ab -h will show you) use the SSL protected https rather than the http protocol\&. This feature is experimental and \fIvery\fR rudimentary\&. You probably do not want to use it\&. +-s \fItimeout\fR +Maximum number of seconds to wait before the socket times out\&. Default is 30 seconds\&. Available in 2\&.4\&.4 and later\&. .TP -S Do not display the median and standard deviation values, nor display the warning/error messages when the average and median are more than one or two times the standard deviation apart\&. And default to the min/avg/max values\&. (legacy support)\&. @@ -104,7 +110,7 @@ Do not display the median and standard deviation values, nor display the warning Maximum number of seconds to spend for benchmarking\&. This implies a -n 50000 internally\&. Use this to benchmark the server within a fixed total amount of time\&. Per default there is no timelimit\&. .TP -T \fIcontent-type\fR -Content-type header to use for POST/PUT data, eg\&. application/x-www-form-urlencoded\&. Default: text/plain\&. +Content-type header to use for POST/PUT data, eg\&. application/x-www-form-urlencoded\&. Default is text/plain\&. .TP -u \fIPUT-file\fR File containing data to PUT\&. Remember to also set -T\&. @@ -133,6 +139,70 @@ String to use as attributes for \&. -Z \fIciphersuite\fR Specify SSL/TLS cipher suite (See openssl ciphers) +.SH "OUTPUT" + +.PP +The following list describes the values returned by ab: + + +.TP +Server Software +The value, if any, returned in the \fIserver\fR HTTP header of the first successful response\&. This includes all characters in the header from beginning to the point a character with decimal value of 32 (most notably: a space or CR/LF) is detected\&. +.TP +Server Hostname +The DNS or IP address given on the command line +.TP +Server Port +The port to which ab is connecting\&. If no port is given on the command line, this will default to 80 for http and 443 for https\&. +.TP +SSL/TLS Protocol +The protocol parameters negotiated between the client and server\&. This will only be printed if SSL is used\&. +.TP +Document Path +The request URI parsed from the command line string\&. +.TP +Document Length +This is the size in bytes of the first successfully returned document\&. If the document length changes during testing, the response is considered an error\&. +.TP +Concurrency Level +The number of concurrent clients used during the test +.TP +Time taken for tests +This is the time taken from the moment the first socket connection is created to the moment the last response is received +.TP +Complete requests +The number of successful responses received +.TP +Failed requests +The number of requests that were considered a failure\&. If the number is greater than zero, another line will be printed showing the number of requests that failed due to connecting, reading, incorrect content length, or exceptions\&. +.TP +Write errors +The number of errors that failed during write (broken pipe)\&. +.TP +Non-2xx responses +The number of responses that were not in the 200 series of response codes\&. If all responses were 200, this field is not printed\&. +.TP +Keep-Alive requests +The number of connections that resulted in Keep-Alive requests +.TP +Total body sent +If configured to send data as part of the test, this is the total number of bytes sent during the tests\&. This field is omitted if the test did not include a body to send\&. +.TP +Total transferred +The total number of bytes received from the server\&. This number is essentially the number of bytes sent over the wire\&. +.TP +HTML transferred +The total number of document bytes received from the server\&. This number excludes bytes received in HTTP headers +.TP +Requests per second +This is the number of requests per second\&. This value is the result of dividing the number of requests by the total time taken +.TP +Time per request +The average time spent per request\&. The first value is calculated with the formula concurrency * timetaken * 1000 / done while the second value is calculated with the formula timetaken * 1000 / done +.TP +Transfer rate +The rate of transfer as calculated by the formula totalread / 1024 / timetaken + .SH "BUGS" .PP diff --git a/docs/man/apxs.8 b/docs/man/apxs.1 similarity index 97% rename from docs/man/apxs.8 rename to docs/man/apxs.1 index 37a6a529aa4..46d396d06ee 100644 --- a/docs/man/apxs.8 +++ b/docs/man/apxs.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "APXS" 8 "2007-02-01" "Apache HTTP Server" "apxs" +.TH "APXS" 1 "2013-06-20" "Apache HTTP Server" "apxs" .SH NAME apxs \- APache eXtenSion tool @@ -139,6 +139,9 @@ This option passes \fIcompiler-flags\fR as additional flags to the libtool --mod .TP -Wl,\fIlinker-flags\fR This option passes \fIlinker-flags\fR as additional flags to the libtool --mode=link command\&. Use this to add local linker-specific options\&. +.TP +-p +This option causes apxs to link against the apr/apr-util libraries\&. This is useful when compiling helper programs that use the apr/apr-util libraries\&. .SS "DSO Installation and Configuration Options" diff --git a/docs/man/dbmmanage.1 b/docs/man/dbmmanage.1 index 88e4a7057e8..a0f9f780011 100644 --- a/docs/man/dbmmanage.1 +++ b/docs/man/dbmmanage.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "DBMMANAGE" 1 "2004-12-10" "Apache HTTP Server" "dbmmanage" +.TH "DBMMANAGE" 1 "2012-12-12" "Apache HTTP Server" "dbmmanage" .SH NAME dbmmanage \- Manage user authentication files in DBM format @@ -41,6 +41,9 @@ dbmmanage \- Manage user authentication files in DBM format .PP dbmmanage is used to create and update the DBM format files used to store usernames and password for basic authentication of HTTP users via mod_authn_dbm\&. Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by dbmmanage\&. This program can only be used when the usernames are stored in a DBM file\&. To use a flat-file database see htpasswd\&. +.PP +Another tool to maintain a DBM password database is htdbm\&. + .PP This manual page only lists the command line arguments\&. For details of the directives necessary to configure user authentication in httpd see the httpd manual, which is part of the Apache distribution or can be found at http://httpd\&.apache\&.org/\&. diff --git a/docs/man/fcgistarter.8 b/docs/man/fcgistarter.8 new file mode 100644 index 00000000000..cb4e79c422d --- /dev/null +++ b/docs/man/fcgistarter.8 @@ -0,0 +1,59 @@ +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.\" DO NOT EDIT! Generated from XML source. +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "FCGISTARTER" 8 "2013-04-18" "Apache HTTP Server" "fcgistarter" + +.SH NAME +fcgistarter \- Start a FastCGI program + +.SH "SYNOPSIS" + +.PP +\fBfcgistarter\fR -\fBc\fR \fIcommand\fR -\fBp\fR \fIport\fR [ -\fBi\fR \fIinterface\fR ] -\fBN\fR \fInum\fR + + +.SH "SUMMARY" + +.PP + + + +.SH "NOTE" + +.PP +Currently only works on Unix systems\&. + +.SH "OPTIONS" + + +.TP +-c \fIcommand\fR +FastCGI program +.TP +-p \fIport\fR +Port which the program will listen on +.TP +-i \fIinterface\fR +Interface which the program will listen on +.TP +-N \fInum\fR +Number of instances of the program + diff --git a/docs/man/htdbm.1 b/docs/man/htdbm.1 index 010755b45b6..61a691880c8 100644 --- a/docs/man/htdbm.1 +++ b/docs/man/htdbm.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTDBM" 1 "2009-03-27" "Apache HTTP Server" "htdbm" +.TH "HTDBM" 1 "2012-12-12" "Apache HTTP Server" "htdbm" .SH NAME htdbm \- Manipulate DBM password databases @@ -27,25 +27,25 @@ htdbm \- Manipulate DBM password databases .SH "SYNOPSIS" .PP -\fBhtdbm\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBx\fR ] \fIfilename\fR \fIusername\fR +\fBhtdbm\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR .PP -\fBhtdbm\fR -\fBb\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR \fIpassword\fR +\fBhtdbm\fR -\fBb\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR \fIpassword\fR .PP -\fBhtdbm\fR -\fBn\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIusername\fR +\fBhtdbm\fR -\fBn\fR [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIusername\fR .PP -\fBhtdbm\fR -\fBnb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIusername\fR \fIpassword\fR +\fBhtdbm\fR -\fBnb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIusername\fR \fIpassword\fR .PP -\fBhtdbm\fR -\fBv\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR +\fBhtdbm\fR -\fBv\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR .PP -\fBhtdbm\fR -\fBvb\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR \fIpassword\fR +\fBhtdbm\fR -\fBvb\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIfilename\fR \fIusername\fR \fIpassword\fR .PP -\fBhtdbm\fR -\fBx\fR [ -\fBT\fR\fIDBTYPE\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] \fIfilename\fR \fIusername\fR +\fBhtdbm\fR -\fBx\fR [ -\fBT\fR\fIDBTYPE\fR ] \fIfilename\fR \fIusername\fR .PP \fBhtdbm\fR -\fBl\fR [ -\fBT\fR\fIDBTYPE\fR ] @@ -62,7 +62,10 @@ htdbm is used to manipulate the DBM format files used to store usernames and pas .TP -b -Use batch mode; \fIi\&.e\&.\fR, get the password from the command line rather than prompting for it\&. This option should be used with extreme care, since \fBthe password is clearly visible\fR on the command line\&. +Use batch mode; \fIi\&.e\&.\fR, get the password from the command line rather than prompting for it\&. This option should be used with extreme care, since \fBthe password is clearly visible\fR on the command line\&. For script use see the -i option\&. +.TP +-i +Read the password from stdin without verification (for script usage)\&. .TP -c Create the \fIpasswdfile\fR\&. If \fIpasswdfile\fR already exists, it is rewritten and truncated\&. This option cannot be combined with the -n option\&. @@ -73,11 +76,17 @@ Display the results on standard output rather than updating a database\&. This o -m Use MD5 encryption for passwords\&. On Windows and Netware, this is the default\&. .TP +-B +Use bcrypt encryption for passwords\&. This is currently considered to be very secure\&. +.TP +-C +This flag is only allowed in combination with -B (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&. +.TP -d -Use crypt() encryption for passwords\&. The default on all platforms but Windows and Netware\&. Though possibly supported by htdbm on all platforms, it is not supported by the httpd server on Windows and Netware\&. +Use crypt() encryption for passwords\&. The default on all platforms but Windows and Netware\&. Though possibly supported by htdbm on all platforms, it is not supported by the httpd server on Windows and Netware\&. This algorithm is \fBinsecure\fR by today's standards\&. .TP -s -Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. +Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&. .TP -p Use plaintext passwords\&. Though htdbm will support creation on all platforms, the httpd daemon will only accept plain text passwords on Windows and Netware\&. @@ -85,15 +94,15 @@ Use plaintext passwords\&. Though htdbm will support creation on all platforms, -l Print each of the usernames and comments from the database on stdout\&. .TP --t -Interpret the final parameter as a comment\&. When this option is specified, an additional string can be appended to the command line; this string will be stored in the "Comment" field of the database, associated with the specified username\&. -.TP -v Verify the username and password\&. The program will print a message indicating whether the supplied password is valid\&. If the password is invalid, the program exits with error code 3\&. .TP -x Delete user\&. If the username exists in the specified DBM file, it will be deleted\&. .TP +-t +Interpret the final parameter as a comment\&. When this option is specified, an additional string can be appended to the command line; this string will be stored in the "Comment" field of the database, associated with the specified username\&. +.TP \fIfilename\fR The filename of the DBM format file\&. Usually without the extension \&.db, \&.pag, or \&.dir\&. If -c is given, the DBM file is created if it does not already exist, or updated if it does exist\&. .TP @@ -156,6 +165,15 @@ Web password files such as those managed by htdbm should \fInot\fR be within the .PP The use of the -b option is discouraged, since when it is used the unencrypted password appears on the command line\&. +.PP +When using the crypt() algorithm, note that only the first 8 characters of the password are used to form the password\&. If the supplied password is longer, the extra characters will be silently discarded\&. + +.PP +The SHA encryption format does not use salting: for a given password, there is only one encrypted representation\&. The crypt() and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&. + +.PP +The SHA and crypt() formats are insecure by today's standards\&. + .SH "RESTRICTIONS" .PP diff --git a/docs/man/htdigest.1 b/docs/man/htdigest.1 index 195ab89a94c..da775efefee 100644 --- a/docs/man/htdigest.1 +++ b/docs/man/htdigest.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTDIGEST" 1 "2007-02-08" "Apache HTTP Server" "htdigest" +.TH "HTDIGEST" 1 "2012-07-19" "Apache HTTP Server" "htdigest" .SH NAME htdigest \- manage user files for digest authentication @@ -50,7 +50,7 @@ Create the \fIpasswdfile\fR\&. If \fIpasswdfile\fR already exists, it is deleted Name of the file to contain the username, realm and password\&. If -c is given, this file is created if it does not already exist, or deleted and recreated if it does exist\&. .TP \fIrealm\fR -The realm name to which the user name belongs\&. +The realm name to which the user name belongs\&. See http://tools\&.ietf\&.org/html/rfc2617#section-3\&.2\&.1 for more details\&. .TP \fIusername\fR The user name to create or update in \fIpasswdfile\fR\&. If \fIusername\fR does not exist is this file, an entry is added\&. If it does exist, the password is changed\&. diff --git a/docs/man/htpasswd.1 b/docs/man/htpasswd.1 index 17fc3c6943f..4dbf31b5d6a 100644 --- a/docs/man/htpasswd.1 +++ b/docs/man/htpasswd.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTPASSWD" 1 "2009-10-19" "Apache HTTP Server" "htpasswd" +.TH "HTPASSWD" 1 "2014-06-24" "Apache HTTP Server" "htpasswd" .SH NAME htpasswd \- Manage user files for basic authentication @@ -27,16 +27,16 @@ htpasswd \- Manage user files for basic authentication .SH "SYNOPSIS" .PP -\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBm\fR ] [ -\fBD\fR ] \fIpasswdfile\fR \fIusername\fR +\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR .PP -\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBD\fR ] \fIpasswdfile\fR \fIusername\fR \fIpassword\fR +\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIpasswdfile\fR \fIusername\fR \fIpassword\fR .PP -\fBhtpasswd\fR -\fBn\fR [ -\fBm\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] \fIusername\fR +\fBhtpasswd\fR -\fBn\fR [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR .PP -\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] \fIusername\fR \fIpassword\fR +\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIcost\fR ] \fIusername\fR \fIpassword\fR .SH "SUMMARY" @@ -45,10 +45,10 @@ htpasswd \- Manage user files for basic authentication htpasswd is used to create and update the flat-files used to store usernames and password for basic authentication of HTTP users\&. If htpasswd cannot access a file, such as not being able to write to the output file or not being able to read the file in order to update it, it returns an error status and makes no changes\&. .PP -Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htpasswd\&. This program can only manage usernames and passwords stored in a flat-file\&. It can encrypt and display password information for use in other types of data stores, though\&. To use a DBM database see dbmmanage\&. +Resources available from the Apache HTTP server can be restricted to just the users listed in the files created by htpasswd\&. This program can only manage usernames and passwords stored in a flat-file\&. It can encrypt and display password information for use in other types of data stores, though\&. To use a DBM database see dbmmanage or htdbm\&. .PP -htpasswd encrypts passwords using either a version of MD5 modified for Apache, or the system's crypt() routine\&. Files managed by htpasswd may contain both types of passwords; some user records may have MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt()\&. +htpasswd encrypts passwords using either bcrypt, a version of MD5 modified for Apache, SHA1, or the system's crypt() routine\&. Files managed by htpasswd may contain a mixture of different encoding types of passwords; some user records may have bcrypt or MD5-encrypted passwords while others in the same file may have passwords encrypted with crypt()\&. .PP This manual page only lists the command line arguments\&. For details of the directives necessary to configure user authentication in httpd see the Apache manual, which is part of the Apache distribution or can be found at http://httpd\&.apache\&.org/\&. @@ -59,7 +59,10 @@ This manual page only lists the command line arguments\&. For details of the dir .TP -b -Use batch mode; \fIi\&.e\&.\fR, get the password from the command line rather than prompting for it\&. This option should be used with extreme care, since \fBthe password is clearly visible\fR on the command line\&. +Use batch mode; \fIi\&.e\&.\fR, get the password from the command line rather than prompting for it\&. This option should be used with extreme care, since \fBthe password is clearly visible\fR on the command line\&. For script use see the -i option\&. Available in 2\&.4\&.4 and later\&. +.TP +-i +Read the password from stdin without verification (for script usage)\&. .TP -c Create the \fIpasswdfile\fR\&. If \fIpasswdfile\fR already exists, it is rewritten and truncated\&. This option cannot be combined with the -n option\&. @@ -68,13 +71,19 @@ Create the \fIpasswdfile\fR\&. If \fIpasswdfile\fR already exists, it is rewritt Display the results on standard output rather than updating a file\&. This is useful for generating password records acceptable to Apache for inclusion in non-text data stores\&. This option changes the syntax of the command line, since the \fIpasswdfile\fR argument (usually the first one) is omitted\&. It cannot be combined with the -c option\&. .TP -m -Use MD5 encryption for passwords\&. This is the default\&. +Use MD5 encryption for passwords\&. This is the default (since version 2\&.2\&.18)\&. +.TP +-B +Use bcrypt encryption for passwords\&. This is currently considered to be very secure\&. +.TP +-C +This flag is only allowed in combination with -B (bcrypt encryption)\&. It sets the computing time used for the bcrypt algorithm (higher is more secure but slower, default: 5, valid: 4 to 31)\&. .TP -d -Use crypt() encryption for passwords\&. This is not supported by the httpd server on Windows and Netware\&. +Use crypt() encryption for passwords\&. This is not supported by the httpd server on Windows and Netware\&. This algorithm limits the password length to 8 characters\&. This algorithm is \fBinsecure\fR by today's standards\&. It used to be the default algorithm until version 2\&.2\&.17\&. .TP -s -Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. +Use SHA encryption for passwords\&. Facilitates migration from/to Netscape servers using the LDAP Directory Interchange Format (ldif)\&. This algorithm is \fBinsecure\fR by today's standards\&. .TP -p Use plaintext passwords\&. Though htpasswd will support creation on all platforms, the httpd daemon will only accept plain text passwords on Windows and Netware\&. @@ -82,6 +91,9 @@ Use plaintext passwords\&. Though htpasswd will support creation on all platform -D Delete user\&. If the username exists in the specified htpasswd file, it will be deleted\&. .TP +-v +Verify password\&. Verify that the given password matches the password of the user stored in the specified htpasswd file\&. Available in 2\&.4\&.5 and later\&. +.TP \fIpasswdfile\fR Name of the file to contain the user name and password\&. If -c is given, this file is created if it does not already exist, or rewritten and truncated if it does exist\&. .TP @@ -142,6 +154,9 @@ When using the crypt() algorithm, note that only the first 8 characters of the p .PP The SHA encryption format does not use salting: for a given password, there is only one encrypted representation\&. The crypt() and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult\&. +.PP +The SHA and crypt() formats are insecure by today's standards\&. + .SH "RESTRICTIONS" .PP diff --git a/docs/man/httpd.8 b/docs/man/httpd.8 index 203163203a3..5c529a6872f 100644 --- a/docs/man/httpd.8 +++ b/docs/man/httpd.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTTPD" 8 "2010-09-12" "Apache HTTP Server" "httpd" +.TH "HTTPD" 8 "2012-02-10" "Apache HTTP Server" "httpd" .SH NAME httpd \- Apache Hypertext Transfer Protocol Server @@ -56,7 +56,7 @@ Set the initial value for the ServerRoot directive to \fIserverroot\fR\&. This c Uses the directives in the file \fIconfig\fR on startup\&. If \fIconfig\fR does not begin with a /, then it is taken to be a path relative to the ServerRoot\&. The default is conf/httpd\&.conf\&. .TP -k start|restart|graceful|stop|graceful-stop -Signals httpd to start, restart, or stop\&. See Stopping Apache for more information\&. +Signals httpd to start, restart, or stop\&. See Stopping Apache httpd for more information\&. .TP -C \fIdirective\fR Process the configuration \fIdirective\fR before reading config files\&. @@ -88,7 +88,7 @@ Dump a list of loaded Static and Shared Modules\&. -S Show the settings as parsed from the config file (currently only shows the virtualhost settings)\&. .TP --T (Availabe in 2\&.3\&.8 and later) +-T (Available in 2\&.3\&.8 and later) Skip document root check at startup/restart\&. .TP -t @@ -109,10 +109,10 @@ The following arguments are available only on the Windows platform: .TP -k install|config|uninstall -Install Apache as a Windows NT service; change startup options for the Apache service; and uninstall the Apache service\&. +Install Apache httpd as a Windows NT service; change startup options for the Apache httpd service; and uninstall the Apache httpd service\&. .TP -n \fIname\fR -The \fIname\fR of the Apache service to signal\&. +The \fIname\fR of the Apache httpd service to signal\&. .TP -w Keep the console window open on error so that the error message can be read\&. diff --git a/docs/man/httxt2dbm.1 b/docs/man/httxt2dbm.1 new file mode 100644 index 00000000000..0844a845c1d --- /dev/null +++ b/docs/man/httxt2dbm.1 @@ -0,0 +1,65 @@ +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.\" DO NOT EDIT! Generated from XML source. +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "HTTXT2DBM" 1 "2013-03-20" "Apache HTTP Server" "httxt2dbm" + +.SH NAME +httxt2dbm \- Generate dbm files for use with RewriteMap + +.SH "SYNOPSIS" + +.PP +\fBhttxt2dbm\fR [ -\fBv\fR ] [ -\fBf\fR \fIDBM_TYPE\fR ] -\fBi\fR \fISOURCE_TXT\fR -\fBo\fR \fIOUTPUT_DBM\fR + + +.SH "SUMMARY" + +.PP +httxt2dbm is used to generate dbm files from text input, for use in RewriteMap with the dbm map type\&. + +.PP +If the output file already exists, it will not be truncated\&. New keys will be added and existing keys will be updated\&. + + +.SH "OPTIONS" + + +.TP +-v +More verbose output +.TP +-f \fIDBM_TYPE\fR +Specify the DBM type to be used for the output\&. If not specified, will use the APR Default\&. Available types are: GDBM for GDBM files, SDBM for SDBM files, DB for berkeley DB files, NDBM for NDBM files, default for the default DBM type\&. +.TP +-i \fISOURCE_TXT\fR +Input file from which the dbm is to be created\&. The file should be formated with one record per line, of the form: key value\&. See the documentation for RewriteMap for further details of this file's format and meaning\&. +.TP +-o \fIOUTPUT_DBM\fR +Name of the output dbm files\&. + +.SH "EXAMPLES" + +.nf + + httxt2dbm -i rewritemap\&.txt -o rewritemap\&.dbm + httxt2dbm -f SDBM -i rewritemap\&.txt -o rewritemap\&.dbm +.fi + diff --git a/docs/man/logresolve.8 b/docs/man/logresolve.1 similarity index 95% rename from docs/man/logresolve.8 rename to docs/man/logresolve.1 index 5820739e8b6..8ae74c4967b 100644 --- a/docs/man/logresolve.8 +++ b/docs/man/logresolve.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "LOGRESOLVE" 8 "2005-06-29" "Apache HTTP Server" "logresolve" +.TH "LOGRESOLVE" 1 "2012-01-09" "Apache HTTP Server" "logresolve" .SH NAME logresolve \- Resolve IP-addresses to hostnames in Apache log files diff --git a/docs/man/rotatelogs.8 b/docs/man/rotatelogs.8 index 407af8e3c14..9b66c616551 100644 --- a/docs/man/rotatelogs.8 +++ b/docs/man/rotatelogs.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ROTATELOGS" 8 "2011-10-28" "Apache HTTP Server" "rotatelogs" +.TH "ROTATELOGS" 8 "2015-01-01" "Apache HTTP Server" "rotatelogs" .SH NAME rotatelogs \- Piped logging program to rotate Apache logs @@ -27,7 +27,7 @@ rotatelogs \- Piped logging program to rotate Apache logs .SH "SYNOPSIS" .PP -\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBL\fR \fIlinkname\fR ] [ -\fBp\fR \fIprogram\fR ] [ -\fBf\fR ] [ -\fBv\fR ] [ -\fBe\fR ] [ -\fBc\fR ] \fIlogfile\fR \fIrotationtime\fR|\fIfilesize\fR(B|K|M|G) [ \fIoffset\fR ] +\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBL\fR \fIlinkname\fR ] [ -\fBp\fR \fIprogram\fR ] [ -\fBf\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBe\fR ] [ -\fBc\fR ] [ -\fBn\fR \fInumber-of-files\fR ] \fIlogfile\fR \fIrotationtime\fR|\fIfilesize\fR(B|K|M|G) [ \fIoffset\fR ] .SH "SUMMARY" @@ -64,8 +64,11 @@ Echo logs through to stdout\&. Useful when logs need to be further processed in -c Create log file for each interval, even if empty\&. .TP +-n \fInumber-of-files\fR +Use a circular list of filenames without timestamps\&. With -n 3, the series of log files opened would be "logfile", "logfile\&.1", "logfile\&.2", then overwriting "logfile"\&. Available in 2\&.4\&.5 and later\&. +.TP \fIlogfile\fR -.PP The path plus basename of the logfile\&. If \fIlogfile\fR includes any '%' characters, it is treated as a format string for strftime(3)\&. Otherwise, the suffix \fI\&.nnnnnnnnnn\fR is automatically added and is the time in seconds (unless the -t option is used)\&. Both formats compute the start time from the beginning of the current period\&. For example, if a rotation time of 86400 is specified, the hour, minute, and second fields created from the strftime(3) format will all be zero, referring to the beginning of the current 24-hour period (midnight)\&. .PP When using strftime(3) filename formatting, be sure the log file format has enough granularity to produce a different file name each time the logs are rotated\&. Otherwise rotation will overwrite the same file instead of starting a new one\&. For example, if \fIlogfile\fR was /var/logs/errorlog\&.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file\&. +.PP The path plus basename of the logfile\&. If \fIlogfile\fR includes any '%' characters, it is treated as a format string for strftime(3)\&. Otherwise, the suffix \fI\&.nnnnnnnnnn\fR is automatically added and is the time in seconds (unless the -t option is used)\&. Both formats compute the start time from the beginning of the current period\&. For example, if a rotation time of 86400 is specified, the hour, minute, and second fields created from the strftime(3) format will all be zero, referring to the beginning of the current 24-hour period (midnight)\&. .PP When using strftime(3) filename formatting, be sure the log file format has enough granularity to produce a different file name each time the logs are rotated\&. Otherwise rotation will overwrite the same file instead of starting a new one\&. For example, if \fIlogfile\fR was /var/log/errorlog\&.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file\&. .TP \fIrotationtime\fR The time between log file rotations in seconds\&. The rotation occurs at the beginning of this interval\&. For example, if the rotation time is 3600, the log file will be rotated at the beginning of every hour; if the rotation time is 86400, the log file will be rotated every night at midnight\&. (If no data is logged during an interval, no file will be created\&.) @@ -80,25 +83,25 @@ The number of minutes offset from UTC\&. If omitted, zero is assumed and UTC is .nf - CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs /var/log/logfile 86400" common .fi .PP -This creates the files /var/logs/logfile\&.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it)\&. At the end of each rotation time (here after 24 hours) a new log is started\&. +This creates the files /var/log/logfile\&.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it)\&. At the end of each rotation time (here after 24 hours) a new log is started\&. .nf - CustomLog "|bin/rotatelogs -l /var/logs/logfile\&.%Y\&.%m\&.%d 86400" common + CustomLog "|bin/rotatelogs -l /var/log/logfile\&.%Y\&.%m\&.%d 86400" common .fi .PP -This creates the files /var/logs/logfile\&.yyyy\&.mm\&.dd where yyyy is the year, mm is the month, and dd is the day of the month\&. Logging will switch to a new file every day at midnight, local time\&. +This creates the files /var/log/logfile\&.yyyy\&.mm\&.dd where yyyy is the year, mm is the month, and dd is the day of the month\&. Logging will switch to a new file every day at midnight, local time\&. .nf - CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common + CustomLog "|bin/rotatelogs /var/log/logfile 5M" common .fi @@ -107,7 +110,7 @@ This configuration will rotate the logfile whenever it reaches a size of 5 megab .nf - ErrorLog "|bin/rotatelogs /var/logs/errorlog\&.%Y-%m-%d-%H_%M_%S 5M" + ErrorLog "|bin/rotatelogs /var/log/errorlog\&.%Y-%m-%d-%H_%M_%S 5M" .fi @@ -116,12 +119,12 @@ This configuration will rotate the error logfile whenever it reaches a size of 5 .nf - CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs -t /var/log/logfile 86400" common .fi .PP -This creates the file /var/logs/logfile, truncating the file at startup and then truncating the file once per day\&. It is expected in this scenario that a separate process (such as tail) would process the file in real time\&. +This creates the file /var/log/logfile, truncating the file at startup and then truncating the file once per day\&. It is expected in this scenario that a separate process (such as tail) would process the file in real time\&. .SH "PORTABILITY" diff --git a/docs/man/suexec.8 b/docs/man/suexec.8 index a7f00f4ebce..347802c3f29 100644 --- a/docs/man/suexec.8 +++ b/docs/man/suexec.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "SUEXEC" 8 "2005-11-13" "Apache HTTP Server" "suexec" +.TH "SUEXEC" 8 "2013-07-01" "Apache HTTP Server" "suexec" .SH NAME suexec \- Switch user before executing external programs @@ -36,7 +36,7 @@ suexec \- Switch user before executing external programs suexec is used by the Apache HTTP Server to switch to another user before executing CGI programs\&. In order to achieve this, it must run as root\&. Since the HTTP daemon normally doesn't run as root, the suexec executable needs the setuid bit set and must be owned by root\&. It should never be writable for any other person than root\&. .PP -For further information about the concepts and and the security model of suexec please refer to the suexec documentation (http://httpd\&.apache\&.org/docs/trunk/suexec\&.html)\&. +For further information about the concepts and the security model of suexec please refer to the suexec documentation (http://httpd\&.apache\&.org/docs/2\&.4/suexec\&.html)\&. .SH "OPTIONS" diff --git a/docs/man/tr/ab.8 b/docs/man/tr/ab.1 similarity index 59% rename from docs/man/tr/ab.8 rename to docs/man/tr/ab.1 index c51b5a8a864..f9499e54846 100644 --- a/docs/man/tr/ab.8 +++ b/docs/man/tr/ab.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "AB" 8 "2009-11-03" "Apache HTTP Sunucusu" "ab" +.TH "AB" 1 "2014-06-24" "Apache HTTP Sunucusu" "ab" .nh .SH İSİM ab \- Apache HTTP sunucusu başarım ölçme aracı @@ -27,7 +27,7 @@ ab \- Apache HTTP sunucusu başarım ölçme aracı .SH "KULLANIM" .PP -\fBab\fR [ -\fBA\fR \fIyetkili-kullanıcı:parola\fR ] [ -\fBb\fR \fItampon-boyu\fR ] [ -\fBc\fR \fIbağlantı-sayısı\fR ] [ -\fBC\fR \fIçerez-ismi=değer\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-dosyası\fR ] [ -\fBf\fR \fIprotokol\fR ] [ -\fBg\fR \fIgnuplot-dosyası\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIözel-başlık\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBn\fR \fIistek-sayısı\fR ] [ -\fBp\fR \fIPOST-dosyası\fR ] [ -\fBP\fR \fIvekil-yetkilisi:parola\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR ] [ -\fBS\fR ] [ -\fBt\fR \fIsaniye\fR ] [ -\fBT\fR \fIiçerik-türü\fR ] [ -\fBu\fR \fIPUT-dosyası\fR ] [ -\fBv\fR \fIayrıntı-düzeyi\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fI-öznitelikleri\fR ] [ -\fBX\fR \fIvekil\fR[:\fIport\fR] ] [ -\fBy\fR \fI-öznitelikleri\fR ] [ -\fBz\fR \fI - + - + + (00, ..., 23) @@ -245,14 +270,16 @@ listfunction ::= listfuncname "(" word ")" - +
-öznitelikleri\fR ] [ -\fBZ\fR \fIşifre-kümesi\fR ] [http[s]://]\fIkonakadı\fR[:\fIport\fR]/\fIdizin\fR +\fBab\fR [ -\fBA\fR \fIyetkili-kullanıcı:parola\fR ] [ -\fBb\fR \fItampon-boyu\fR ] [ -\fBB\fR \fIyerel-adres\fR ] [ -\fBc\fR \fIbağlantı-sayısı\fR ] [ -\fBC\fR \fIçerez-ismi=değer\fR ] [ -\fBd\fR ] [ -\fBe\fR \fIcsv-dosyası\fR ] [ -\fBf\fR \fIprotokol\fR ] [ -\fBg\fR \fIgnuplot-dosyası\fR ] [ -\fBh\fR ] [ -\fBH\fR \fIözel-başlık\fR ] [ -\fBi\fR ] [ -\fBk\fR ] [ -\fBl\fR ] [ -\fBm\fR \fIHTTP-yöntemi\fR ] [ -\fBn\fR \fIistek-sayısı\fR ] [ -\fBp\fR \fIPOST-dosyası\fR ] [ -\fBP\fR \fIvekil-yetkilisi:parola\fR ] [ -\fBq\fR ] [ -\fBr\fR ] [ -\fBs\fR \fIzamanasimi\fR ] [ -\fBS\fR ] [ -\fBt\fR \fIsaniye\fR ] [ -\fBT\fR \fIiçerik-türü\fR ] [ -\fBu\fR \fIPUT-dosyası\fR ] [ -\fBv\fR \fIayrıntı-düzeyi\fR] [ -\fBV\fR ] [ -\fBw\fR ] [ -\fBx\fR \fI-öznitelikleri\fR ] [ -\fBX\fR \fIvekil\fR[:\fIport\fR] ] [ -\fBy\fR \fI-öznitelikleri\fR ] [ -\fBz\fR \fI - + - + @@ -202,27 +217,37 @@ listfunction ::= listfuncname "(" word ")" - + - + - + + + - + - - - + + + - + + + + + + +
-öznitelikleri\fR ] [ -\fBZ\fR \fIşifre-kümesi\fR ] [http[s]://]\fIkonakadı\fR[:\fIport\fR]/\fIdizin\fR .SH "ÖZET" @@ -46,6 +46,9 @@ Sunucuya TEMEL Kimlik Doğrulamada kullanılmak üzere kanıt sağlar\&. Kullan \fB-b\fR \fItampon-boyu\fR TCP gönderme/alma tamponlarının bayt cinsinden uzunluğu\&. .TP +\fB-B\fR \fIyerel-adres\fR +Uzak bağlantılar yaparken dinlenecek adres\&. +.TP \fB-c\fR \fIbağlantı-sayısı\fR Aynı anda işleme sokulacak bağlantı sayısı\&. Aynı anda bir bağlantı öntanımlı değerdir\&. .TP @@ -59,7 +62,7 @@ Aynı anda işleme sokulacak bağlantı sayısı\&. Aynı anda bir bağlantı ö Sunulan isteğin birim zamanda (milisaniye) ne kadarının (yüzde cinsinden) sunulduğunu gösteren virgül ayraçlı değerler (CSV) dosyası\&. Sonuçlar 'bobin haline' getirilmiş olduğundan doğal olarak 'gnuplot' dosyasından daha yararlıdır\&. .TP \fB-f\fR \fIprotokol\fR -SSL/TLS protokolü belirtilir (SSL2, SSL3, TLS1 veya ALL)\&. +SSL/TLS protokolü belirtilir (SSL2, SSL3, TLS1, TLS1\&.1, TLS1\&.2 veya ALL)\&. TLS1\&.1 ve TLS1\&.2 desteği 2\&.4\&.4 ve sonraki sürümler içindir\&. .TP \fB-g\fR \fIgnuplot-dosyası\fR Ölçülen değerler bir 'gnuplot' veya TSV (sekme ayraçlı değerler) dosyasına yazılır\&. Bu dosya, Gnuplot, IDL, Mathematica, Igor hatta Excel tarafından veri dosyası olarak kabul edilir\&. Veri sütunlarının başlıkları dosyanın ilk satırında bulunur\&. @@ -76,6 +79,12 @@ GET istekleri yerine HEAD istekleri yapılır\&. \fB-k\fR HTTP KeepAlive (kalıcı bağlantı) özelliğini etkinleştirir, yani tek bir oturum içinde çok sayıda isteğe hizmet sunulabilir\&. Özellik öntanımlı olarak kapalıdır\&. .TP +\fB-l\fR +Yanıtarın uzunluğu sabit değilse hataları raporlamaz\&. Özdevinimli sayfalarda kullanışlı olabilir\&. 2\&.4\&.7 ve sonraki sürümler içindir\&. +.TP +\fB-m\fR \fIHTTP-yöntemi\fR +İstekler için özel HTTP yöntemi, belirtilir\&. 2\&.4\&.10 ve sonraki sürümler içindir\&. +.TP \fB-n\fR \fIistek-sayısı\fR Kıyaslama oturumu sırasında sunucuya uygulanacak istek sayısı\&. Öntanımlı olarak hiçbir başarım ölçütü sağlamayan tek bir istek yapılır\&. .TP @@ -91,8 +100,8 @@ Vekil sunucuya TEMEL Kimlik Doğrulamasında kullanılacak kanıtları sağlar\& \fB-r\fR Soket hata alsa bile program çıkmaz\&. .TP -\fB-s\fR -Derlendiği takdirde (\fBab -h\fR bunu gösterir) http protokolü yerine SSL korumalı https protokolü kullanılır\&. Bu özellik henüz \fIemekleme\fR aşamasında olup geliştirilmeye devam edilmektedir\&. Bu bakımdan kullanımı önerilmez\&. +\fB-s\fR \fIzamanasimi\fR +Soket zaman aşımına uğramadan önce beklenecek azami saniye sayısı\&. 30 saniye öntanımlı süredir\&. 2\&.4\&.4 ve sonraki sürümler içindir\&. .TP \fB-S\fR Ortalama ve ortanca değerler arasında bir veya iki standart sapmadan fazlası varsa ne ortalama değer ne standart sapma değeri ne de uyarı/hata iletileri gösterilir\&. Öntanımlı olarak, asgari/ortalama/azami değerler gösterilir\&. (Geriye uyumluluk)\&. @@ -130,6 +139,70 @@ Sonuçları HTML tabloları olarak basar\&. Öntanımlı tablo, beyaz artalanlı -Z \fIşifre-kümesi\fR SSL/TLS şifre kümesi belirtilir (\fBopenssl\fR(1) şifrelerine bakınız)\&. +.SH "ÇIKTI" + +.PP +Aşağıda \fBab\fR tarafından döndürülen değerler açıklanmıştır: + + +.TP +Server Software +İlk başarılı yanıtın, varsa, \fIserver\fR HTTP başlığında döndürülen değer\&. Bu başlıktaki başlangıçtan 32 ondalık değerli karaktere (genellikle boşluk veya CR/LF karakteri) kadar tüm karakterleri içerir\&. +.TP +Server Hostname +Komut satırında belirtilen DNS veya IP adresi\&. +.TP +Server Port +\fBab\fR'nin bağlandığı port\&. Komut satırında port belirtilmemişse, öntanımlı olarak http için 80, https için 443'tür\&. +.TP +SSL/TLS Protocol +İstemci le sunucu arasında uzlaşılmış protokol değerleri\&. Bu sadece SSL kullanılıyorsa çıktılanır\&. +.TP +Document Path +Komut satırı dizgesinden çözümlenen isteğin URI'si\&. +.TP +Document Length +Başarıyla döndürülen ilk belgenin bayt cinsinden uzunluğu\&. Eğer belge uzunluğu sınama sırasında değişirse yanıt bir hata içerecektir\&. +.TP +Concurrency Level +Sınama sırasında kullanılan eşzamanlı istemcilerin sayısı\&. +.TP +Time taken for tests +İlk soket bağlantısının alındığı andan son yanıtın alındığı ana kadar geçen süre\&. +.TP +Complete requests +Alınan başarılı yanıtların sayısı\&. +.TP +Failed requests +Başarısızlık olarak addedilen isteklerin sayısı\&. Sayı sıfırdan büyükse, diğer satırda, bağlanma, okuma, yanlış içerik uzunluğu, istisnalar gibi sebeplerle başarısız olmuş istekler gösterilir\&. +.TP +Write errors +Başarısız yazma hatalarının (kırık boru) sayısı\&. +.TP +Non-2xx responses +200 serisi yanıt kodları ile açıklanamayan yanıtların sayısı\&. Tüm yanıtlar 200 olursa bu alan çıktılanmaz\&. +.TP +Keep-Alive requests +Keep-Alive isteklerinde sonuçlanan bağlantı sayısı\&. +.TP +Total body sent +Sınamanın parçası olarak veri gönderimi yapılandırılmışsa, bu sınama sırasında gönderilen toplam bayt sayısıdır\&. Sınama sırasında gövde gönderilmiyorsa bu alan çıktılanmaz\&. +.TP +Total transferred +Sunucudan alınan toplam bayt sayısı\&. Bu sayı aslında hattan gönderilen bayt sayısıdır\&. +.TP +HTML transferred +Sunucudan alınan belge baytlarının sayısı\&. Bu sayı HTTP başlıklarının bayt sayısını içermez\&. +.TP +Requests per second +Saniyedeki istek sayısı\&. İstek sayısının toplam süreye oranıdır\&. +.TP +Time per request +İstek başına harcanan süre\&. İlk değer eşzamanlılık * süre * 1000 / biten formülüyle hesaplanırken ikincisi için süre * 1000 / biten formülü kullanılır\&. +.TP +Transfer rate +okunantoplam / 1024 / süre formülüyle hesaplanan aktarım hızı\&. + .SH "BÖRTÜ BÖCEK" .PP diff --git a/docs/man/tr/apachectl.8 b/docs/man/tr/apachectl.8 index 2c288c9c642..9553bc089a4 100644 --- a/docs/man/tr/apachectl.8 +++ b/docs/man/tr/apachectl.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "APACHECTL" 8 "2009-02-16" "Apache HTTP Sunucusu" "apachectl" +.TH "APACHECTL" 8 "2013-04-17" "Apache HTTP Sunucusu" "apachectl" .nh .SH İSİM apachectl \- Apache HTTP Sunucusu Denetim Arayüzü diff --git a/docs/man/tr/apxs.8 b/docs/man/tr/apxs.1 similarity index 97% rename from docs/man/tr/apxs.8 rename to docs/man/tr/apxs.1 index dfc44b314f1..75216e5bb62 100644 --- a/docs/man/tr/apxs.8 +++ b/docs/man/tr/apxs.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "APXS" 8 "2009-02-16" "Apache HTTP Sunucusu" "apxs" +.TH "APXS" 1 "2013-08-16" "Apache HTTP Sunucusu" "apxs" .nh .SH İSİM apxs \- Apache Eklenti Aracı @@ -33,7 +33,7 @@ apxs \- Apache Eklenti Aracı \fBapxs\fR -\fBq\fR [ -\fBv\fR ] [ -\fBS\fR \fIisim=değer\fR ] \fIsorgu\fR \&.\&.\&. .PP -\fBapxs\fR -\fBc\fR [ -\fBS\fR \fIisim=değer\fR ] [ -\fBo\fR \fIdso-dosyası\fR ] [ -\fBI\fR \fIinclude-dizini\fR ] [ -\fBD\fR \fIisim=değer\fR ] [ -\fBL\fR \fIlib-dizini\fR ] [ -\fBl\fR \fIkütüphane-adı\fR ] [ -\fBWc,\fR\fIderleyici-seçenekleri\fR ] [ -\fBWl,\fR\fIilintileyici-seçenekleri\fR ] \fIdosya\fR \&.\&.\&. +\fBapxs\fR -\fBc\fR [ -\fBS\fR \fIisim=değer\fR ] [ -\fBo\fR \fIdso-dosyası\fR ] [ -\fBI\fR \fIinclude-dizini\fR ] [ -\fBD\fR \fIisim=değer\fR ] [ -\fBL\fR \fIlib-dizini\fR ] [ -\fBl\fR \fIkütüphane-adı\fR ] [ -\fBWc,\fR\fIderleyici-seçenekleri\fR ] [ -\fBWl,\fR\fIilintileyici-seçenekleri\fR ] [ -\fBp\fR ] \fIdosya\fR \&.\&.\&. .PP \fBapxs\fR -\fBi\fR [ -\fBS\fR \fIisim=değer\fR ] [ -\fBn\fR \fImodüladı\fR ] [ -\fBa\fR ] [ -\fBA\fR ] \fIdso-dosyası\fR \&.\&.\&. @@ -139,6 +139,9 @@ Bu seçenek libtool --mode=compile komutuna doğrudan seçenek aktarmak için ku .TP \fB-Wl\fR,\fIilintileyici-seçenekleri\fR Bu seçenek libtool --mode=link komutuna doğrudan seçenek aktarmak için kullanılır\&. Bu seçeneği yerel ilintileyiciniz için gereken ek seçenekleri belirtmek için kullanın\&. +.TP +\fB-p\fR +Bu seçenek apxs'in apr/apr-util kütüphaneleriyle ilintilenmesini sağlar\&. apr/apr-util kütüphanelerini kullanan yardımcı uygulamaları derlerken yararlıdır\&. .SS "DSO Kurulum ve Yapılandırma Seçenekleri" diff --git a/docs/man/tr/dbmmanage.1 b/docs/man/tr/dbmmanage.1 index 7ab37f50ccc..4e4b17cf188 100644 --- a/docs/man/tr/dbmmanage.1 +++ b/docs/man/tr/dbmmanage.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "DBMMANAGE" 1 "2009-02-16" "Apache HTTP Sunucusu" "dbmmanage" +.TH "DBMMANAGE" 1 "2013-04-17" "Apache HTTP Sunucusu" "dbmmanage" .nh .SH İSİM dbmmanage \- DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir @@ -41,6 +41,9 @@ dbmmanage \- DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir .PP \fBdbmmanage\fR, mod_authn_dbm üzerinden HTTP kullanıcılarının temel kimlik doğrulaması için kullanıcı isimlerinin ve parolalarının saklanmasında kullanılacak DBM dosyalarını oluşturmak ve güncellemek için kullanılır\&. Apache HTTP sunucusunun mevcut özkaynaklarının kullanımı sadece \fBdbmmanage\fR tarafından oluşturulan dosyalarda listelenmiş kullanıcılara tahsis edilebilir\&. Bu program sadece, kullanıcı isimleri bir DBM dosyasında saklanmak istenirse işe yarar\&. Düz metin bir veritabanı kullanmak isterseniz \fBhtpasswd\fR sayfasına bakınız\&. +.PP +DBM parola veritabanı sağlayan diğer bir araç da \fBhtdbm\fR'dir\&. + .PP Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler\&. Kullanıcı kimlik doğrulamasını \fBhttpd\fR'de yapılandırmak için gerekli yönergelerle ilgili ayrıntılar için Apache dağıtımının bir parçası olan ve http://httpd\&.apache\&.org/ adresinde de bulunan Apache HTTP Sunucusu Belgelerine bakınız\&. diff --git a/docs/man/tr/fcgistarter.8 b/docs/man/tr/fcgistarter.8 new file mode 100644 index 00000000000..bb1aad5701f --- /dev/null +++ b/docs/man/tr/fcgistarter.8 @@ -0,0 +1,59 @@ +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.\" DO NOT EDIT! Generated from XML source. +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "FCGİSTARTER" 8 "2013-11-22" "Apache HTTP Sunucusu" "fcgistarter" +.nh +.SH İSİM +fcgistarter \- Bir FastCGI programını çalıştır + +.SH "KULLANIM" + +.PP +\fBfcgistarter\fR -\fBc\fR \fIkomut\fR -\fBp\fR \fIport\fR [ -\fBi\fR \fIarabirim\fR ] -\fBN\fR \fIsayı\fR + + +.SH "ÖZET" + +.PP + + + +.SH "BİLGİNİZE" + +.PP +Şimdilik sadece Unix sistemlerinde çalışmaktadır\&. + +.SH "SEÇENEKLER" + + +.TP +\fB-c\fR \fIkomut\fR +Çalıştırılacak FastCGI programı +.TP +\fB-p\fR \fIport\fR +Programın dinleyeceği port +.TP +\fB-i\fR \fIarabirim\fR +Programın dinleyeceği arabirim +.TP +\fB-N\fR \fIsayı\fR +Program örneklerinin sayısı + diff --git a/docs/man/tr/htcacheclean.8 b/docs/man/tr/htcacheclean.8 index 8f5d1fc79ce..010dca200e6 100644 --- a/docs/man/tr/htcacheclean.8 +++ b/docs/man/tr/htcacheclean.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTCACHECLEAN" 8 "2009-02-16" "Apache HTTP Sunucusu" "htcacheclean" +.TH "HTCACHECLEAN" 8 "2013-04-17" "Apache HTTP Sunucusu" "htcacheclean" .nh .SH İSİM htcacheclean \- Disk arabelleğini temizler @@ -27,19 +27,25 @@ htcacheclean \- Disk arabelleğini temizler .SH "KULLANIM" .PP -\fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBr\fR ] [ -\fBn\fR ] -\fBp\fR\fIyol\fR -\fBl\fR\fIsınır\fR +\fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBr\fR ] [ -\fBn\fR ] [ -\fBR\fR\fIboyut\fR ] -\fBp\fR\fIyol\fR [ -\fBl\fR\fIsınır\fR | -\fBL\fR\fIlimit\fR ] .PP -\fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] -\fBd\fR\fIsüre\fR -\fBp\fR\fIyol\fR -\fBl\fR\fIsınır\fR +\fBhtcacheclean\fR [ -\fBn\fR ] [ -\fBt\fR ] [ -\fBi\fR ] [ -\fBP\fR\fIpiddosyası\fR ] [ -\fBR\fR\fIboyut\fR ] -\fBd\fR\fIsüre\fR -\fBp\fR\fIyol\fR [ -\fBl\fR\fIsınır\fR | -\fBL\fR\fIlimit\fR ] + +.PP +\fBhtcacheclean\fR [ -\fBv\fR ] [ -\fBR\fR\fIboyut\fR ] -\fBp\fR\fIyol\fR [ -\fBa\fR ] [ -\fBA\fR ] + +.PP +\fBhtcacheclean\fR [ -\fBD\fR ] [ -\fBv\fR ] [ -\fBt\fR ] [ -\fBR\fR\fIboyut\fR ] -\fBp\fR\fIyol\fR \fIurl\fR .SH "ÖZET" .PP -\fBhtcacheclean\fR, mod_disk_cache deposunun boyutlarını belli sınırlar içinde tutmak için kullanılır\&. Bu araç ya elle ya da bir artalan süreci olarak çalıştırılır\&. Artalan süreci olarak çalıştırıldığında, silinecek arabellek içeriğini tespit etmek için arabellek dizinlerine belli aralıklarla bakmak dışında uykuda olur\&. Artalan sürecini temiz olarak durdurmak için TERM veya INT sinyali göndermeniz yeterlidir\&. +\fBhtcacheclean\fR, mod_cache_disk deposunun boyutlarını belli sınırlar içinde veya kullanımdaki dosya düğümlerinin sınırları içinde tutmak için kullanılır\&. Bu araç ya elle ya da bir artalan süreci olarak çalıştırılır\&. Artalan süreci olarak çalıştırıldığında, silinecek arabellek içeriğini tespit etmek için arabellek dizinlerine belli aralıklarla bakmak dışında uykuda olur\&. Artalan sürecini temiz olarak durdurmak için TERM veya INT sinyali göndermeniz yeterlidir\&. Elle çalıştırıldığında, silinecek arabellek içeriğini tespit etmek için arabellek dizinlerine bir kereliğine bakar\&. Bir veya daha fazla URL belirtilmesi durumunda arabellekte olanlar arabellekten silinir\&. -.SH "OPTİONS" +.SH "SEÇENEKLER" .TP @@ -47,7 +53,7 @@ htcacheclean \- Disk arabelleğini temizler Artalanda çalışarak \fIsüre\fR dakikada bir arabelleği temizler\&. Bu seçenek \fB-D\fR, \fB-v\fR ve \fB-r\fR seçenekleri ile birlikte kullanılamaz\&. Artalan sürecini temiz olarak sonlandırmak için SIGTERM veya SIGINT göndermek yeterlidir\&. .TP \fB-D\fR -Kuru kuruya çalışıp, hiçbir şeyi silmez\&. \fB-d\fR seçeneği ile birlikte kullanılamaz\&. +Kuru kuruya çalışıp, hiçbir şeyi silmez\&. \fB-d\fR seçeneği ile birlikte kullanılamaz\&. Kuru çalıştırma sırasında \fB-t\fR seçeneği ile dizinler silinmek istenirse, statlarda silinmiş görünen dosya düğümleri silinmiş dizinler olarak hesaba katılmaz ve tahmini olarak imlenir\&. .TP \fB-v\fR Çıktı daha ayrıntılı olur\&. \fB-d\fR seçeneği ile birlikte kullanılamaz\&. @@ -64,14 +70,77 @@ Tüm boş dizinleri siler\&. Öntanımlı olarak, sadece arabellek dosyaları si \fB-p\fR\fI yol\fR \fIyol\fR, disk arabelleğinin kök dizini olarak belirtilir\&. CacheRoot yönergesinde belirtilen dizin olmalıdır\&. .TP +\fB-P\fR\fIpiddosyası\fR +Artalan süreci olarak çalışmada süreç kimliğinin yazılacağı dosyanın adını belirtmek için kullanılır\&. +.TP +\fB-R\fR\fIboyut\fR +Disk bloklarının boyunu denkleştirmek için yuvarlanacak üst boyutu belirtmekte kullanılır\&. Arabellek bölümünün blok boyutunu belirler\&. +.TP \fB-l\fR\fI sınır\fR \fIsınır\fR, disk arabelleğinin toplam boyutu olarak belirtilir\&. Değerin öntanımlı olarak bayt cinsinden belirtileceği varsayılır\&. Değerin sonuna kilobayt için K, megabayt M, bayt için B harfi konulabilir\&. .TP +\fB-L\fR\fIlimit\fR +Disk arabellek dosyası düğümü toplamının sınırını belirlemekte kullanılır\&. +.TP \fB-i\fR Akıllı olup sadece disk arabelleği değiştiği zaman çalışır\&. Bu seçenek \fB-d\fR seçeneği ile birlikte belirtilmek zorundadır\&. +.TP +\fB-a\fR +O an arabellekte saklanmakta olan URL'leri listeler\&. Birden fazla aynı URL varsa yalnız biri listelenir\&. +.TP +\fB-A\fR +O an arabellekte saklanmakta olan URL'leri öznitelikleri ile listeler\&. Öznitelikler şu sırayla verilir: url, header size, body size, status, entity version, date, expiry, request time, response time, body present, head request + +.SH "BELLİ BİR URL'NİN SİLİNMESİ" + +.PP +\fBhtcacheclean\fR tarafından aktarılan URL'ler arabellekten silinir\&. Bir URL birden fazla mevcutsa hepsi silinir\&. + +.PP +Ters vekilli bir URL silinmişse, etkin URL \fBHost\fR başlığı \fBport\fR, \fByol\fR ve \fBsorgu\fR ile oluşturulur\&. Bir sorgu dizgesi olsun olmasın, URL içinde '?' daima açıkça belirtilmelidir\&. Örneğin, \fBlocalhost\fR sunucusundaki \fB/\fR yolu silinmek istenirse silinecek URL \fBhttp://localhost:80/?\fR olurdu\&. + +.SH "ARABELLEKTEKİ URL'LERİN LİSTELENMESİ" + +.PP +\fBhtcacheclean\fR'e \fB-a\fR veya \fB-A\fR seçeneğinin aktarılmasıyla, arabellekteki URL'ler bulundukça her satıra bir URL gelecek biçemde listelenir\&. \fB-A\fR seçeneği URL'nin ardından arabellek içeriğini tamamını şu sırayla dökümler: + + +.TP +url +Öğenin URL'si\&. +.TP +header size +Bayt cinsinden başlık uzunluğu\&. +.TP +body size +Bayt cinsinden gövde uzunluğu\&. +.TP +status +Arabellekteki yanıtın durumu\&. +.TP +entity version +Öğenin silinmeksizin kaç kere doğrulandığı\&. +.TP +date +Yanıt tarihi\&. +.TP +expiry +Yanıtın zaman aşımı tarihi\&. +.TP +request time +İsteğin başlama zamanı\&. +.TP +response time +İsteğin bitiş zamanı\&. +.TP +body present +0 ise istekle birlikte gövde saklanmaz, 1 ise saklanır\&. +.TP +head request +1 ise, öğe, gövde olmaksızın arabellekli bir HEAD isteği içerir, 0 ise içermez\&. .SH "ÇIKIŞ DURUMU" .PP -\fBhtcacheclean\fR, tüm işlemler başarıyla yerine getirildiğinde 0, aksi takdirde 1 döndürür\&. +\fBhtcacheclean\fR, tüm işlemler başarıyla yerine getirildiğinde 0, aksi takdirde 1 döndürür\&. Bir URL belirtildiğinde, bu URL arablleklenmi ve silinmişse 0, aksi takdirde 2 döndürür\&. URL'nin silinmesi sırasında bir hata oluşursa 1 döndürür\&. diff --git a/docs/man/tr/htdbm.1 b/docs/man/tr/htdbm.1 index 4066bd3c551..ddd216be240 100644 --- a/docs/man/tr/htdbm.1 +++ b/docs/man/tr/htdbm.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTDBM" 1 "2009-03-28" "Apache HTTP Sunucusu" "htdbm" +.TH "HTDBM" 1 "2013-04-17" "Apache HTTP Sunucusu" "htdbm" .nh .SH İSİM htdbm \- DBM parola veritabanlarını yönetir @@ -27,25 +27,25 @@ htdbm \- DBM parola veritabanlarını yönetir .SH "KULLANIM" .PP -\fBhtdbm\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBx\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR +\fBhtdbm\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR .PP -\fBhtdbm\fR -\fBb\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR +\fBhtdbm\fR -\fBb\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR .PP -\fBhtdbm\fR -\fBn\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIkullanıcı\fR +\fBhtdbm\fR -\fBn\fR [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIkullanıcı\fR .PP -\fBhtdbm\fR -\fBnb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIkullanıcı\fR \fIparola\fR +\fBhtdbm\fR -\fBnb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIkullanıcı\fR \fIparola\fR .PP -\fBhtdbm\fR -\fBv\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR +\fBhtdbm\fR -\fBv\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBi\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR .PP -\fBhtdbm\fR -\fBvb\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR +\fBhtdbm\fR -\fBvb\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBt\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR .PP -\fBhtdbm\fR -\fBx\fR [ -\fBT\fR\fIVTtürü\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR +\fBhtdbm\fR -\fBx\fR [ -\fBT\fR\fIVTtürü\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR .PP \fBhtdbm\fR -\fBl\fR [ -\fBT\fR\fIVTtürü\fR ] @@ -62,7 +62,10 @@ htdbm \- DBM parola veritabanlarını yönetir .TP \fB-b\fR -Betik kipi; parola için istek yapmak yerine parola komut satırından verilir\&. \fBParola komut satırında görünür\fR olacağından çok dikkatli kullanmak gerekir\&. +Betik kipi; parola için istek yapmak yerine parola komut satırından verilir\&. \fBParola komut satırında görünür\fR olacağından çok dikkatli kullanmak gerekir\&. Betik kullanımı için \fB-i\fR seçeneğine bakınız\&. +.TP +\fB-i\fR +Parolayı doğrulamaksızın standart girdiden okur (betik kullanımı için)\&. .TP \fB-c\fR \fIparola-dosyası\fR oluşturur\&. Dosya mevcutsa, dosya silinip yeniden yazılır\&. Bu seçenek \fB-n\fR seçeneği ile birlikte kullanılamaz\&. @@ -73,11 +76,17 @@ Sonuçları veritabanında güncellemek yerine standart çıktıya gönderir\&. \fB-m\fR Parolalar için MD5 şifrelemesi kullanılır\&. Windows ve Netware için bu öntanımlıdır\&. .TP +\fB-B\fR +Parolalar için bcrypt şifrelemesi kullanılır\&. Şu an için çok güvenli kabul edilmektedir\&. +.TP +\fB-C\fR \fIbedel\fR +Bu seçenek sadece \fB-B\fR (bcrypt şifrelemesi) seçeneği ile birlikte kullanılabilir\&. Bcrypt algoritmasına hesaplama süresini belirtir (daha yüksek değerler daha güvenlidir, öntanımlı 5, geçerli değerler: 4 - 31)\&. +.TP \fB-d\fR -Parolaları şifrelemek için crypt() kullanılır\&. Windows, ve Netware dışında öntanımlıdır\&. \fBhtdbm\fR tarafından tüm platformlarda destekleniyor olsa da Windows ve Netware üzerinde httpd sunucusu tarafından desteklenmez\&. +Parolaları şifrelemek için crypt() kullanılır\&. Windows, ve Netware dışında öntanımlıdır\&. \fBhtdbm\fR tarafından tüm platformlarda destekleniyor olsa da Windows ve Netware üzerinde httpd sunucusu tarafından desteklenmez\&. Bu algoritma günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. .TP \fB-s\fR -Parolalar için SHA şifrelemesi kullanılır\&. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü kolaylaştırır\&. +Parolalar için SHA şifrelemesi kullanılır\&. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü kolaylaştırır\&. Bu algoritma günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. .TP \fB-p\fR Düz metin parolalar kullanılır\&. \fBhtdbm\fR tarafından tüm platformlarda destekleniyor olsa da Windows, Netware ve TPF üzerinde httpd sunucusu tarafından sadece düz metin parolalar kabul edilir\&. @@ -85,15 +94,15 @@ Düz metin parolalar kullanılır\&. \fBhtdbm\fR tarafından tüm platformlarda \fB-l\fR Veritabanındaki kullanıcıları açıklamalarıyla birlikte standart çıktıya gönderir\&. .TP -\fB-t\fR -Son değiştirgenin bir açıklama olarak yorumlanmasını sağlar\&. Bu seçenek kullanıldığında komut satırının sonuna fazladan bir dizge eklenebilir\&. Bu dizge, veritabanında belirtilen kullanıcının "Comment" alanında saklanır\&. -.TP \fB-v\fR Kullanıcı adını ve parolasını doğrular\&. Program belirtilen parolanın geçerli olup olmadığını belirten bir ileti basar\&. Eğer parola geçersizse program hata kodu 3 ile çıkar\&. .TP \fB-x\fR Kullanıcıyı siler\&. Kullanıcı belirtilen DBM dosyasında mevcutsa silinir\&. .TP +\fB-t\fR +Son değiştirgenin bir açıklama olarak yorumlanmasını sağlar\&. Bu seçenek kullanıldığında komut satırının sonuna fazladan bir dizge eklenebilir\&. Bu dizge, veritabanında belirtilen kullanıcının "Comment" alanında saklanır\&. +.TP \fIparola-dosyası\fR DBM dosyasının ismi\&. Genellikle, \&.db, \&.pag veya \&.dir eklentisi olmaksızın belirtilir\&. \fB-c\fR seçeneği ile birlikte verilmişse ve DBM dosyası mevcut değilse dosya oluşturulur, mevcutsa dosya güncellenir\&. .TP @@ -156,6 +165,15 @@ Komut satırından verilen parolayı (Pwd4Steve) MD5 algoritmasıyla şifreler v .PP Komut satırında parolanın şifrelenmemiş olarak görünmesi sebebiyle \fB-b\fR seçeneğinin kullanımından kaçınılmasını öneriyoruz\&. +.PP +crypt() algoritması kullanılırken, parolayı şekillendirmek için parolanın ilk 8 baytının kullanılacağına dikkat ediniz\&. Eğer parola 8 bayttan uzunsa kalanlar bir uyarı verilmeksizin iptal edilir\&. + +.PP +SHA şifreleme biçeminde tuz kullanılmaz; yani, bir parolanın sadece bir şifreli gösterimi olabilir\&. crypt() ve MD5 biçemleri parolanın önüne rasgele üretilmiş bir tuz dizgesi eklediklerinden sözlük saldırılarına karşı daha dayanıklıdır\&. + +.PP +SHA ve crypt() biçimleri günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. + .SH "KISITLAMALAR" .PP diff --git a/docs/man/tr/htdigest.1 b/docs/man/tr/htdigest.1 index 73f22e8aa28..5fecb4e78fc 100644 --- a/docs/man/tr/htdigest.1 +++ b/docs/man/tr/htdigest.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTDİGEST" 1 "2009-02-16" "Apache HTTP Sunucusu" "htdigest" +.TH "HTDİGEST" 1 "2013-04-17" "Apache HTTP Sunucusu" "htdigest" .nh .SH İSİM htdigest \- Özet kimlik doğrulama dosyalarını yönetir @@ -50,7 +50,7 @@ Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler\&. Kullan Kullanıcı ismi, parola ve bölge bilgilerini içeren dosyanın ismi\&. \fB-c\fR seçeneği verilmişse ve dosya mevcut değilse oluşturulur, dosya mevcutsa silinip yeniden oluşturulur\&. .TP \fIbölge\fR -Kullanıcının mensup olduğu bölge ismi\&. +Kullanıcının mensup olduğu bölge ismi\&. Daha fazla bilgi için: http://tools\&.ietf\&.org/html/rfc2617#section-3\&.2\&.1 .TP \fIkullanıcı\fR \fIparola-dosyası\fR'nda oluşturulacak veya güncellenecek kullanıcı ismi\&. \fIkullanıcı\fR bu dosyada mevcut değilse yeni bir girdi eklenir\&. Girdi mevcutsa parolası değiştirilir\&. diff --git a/docs/man/tr/htpasswd.1 b/docs/man/tr/htpasswd.1 index 5cc63286fdb..8f360355f0c 100644 --- a/docs/man/tr/htpasswd.1 +++ b/docs/man/tr/htpasswd.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTPASSWD" 1 "2009-11-03" "Apache HTTP Sunucusu" "htpasswd" +.TH "HTPASSWD" 1 "2014-06-24" "Apache HTTP Sunucusu" "htpasswd" .nh .SH İSİM htpasswd \- Temel kimlik doğrulama dosyalarını yönetir @@ -27,16 +27,16 @@ htpasswd \- Temel kimlik doğrulama dosyalarını yönetir .SH "KULLANIM" .PP -\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBm\fR ] [ -\fBD\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR +\fBhtpasswd\fR [ -\fBc\fR ] [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR .PP -\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBd\fR | -\fBp\fR | -\fBs\fR ] [ -\fBD\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR +\fBhtpasswd\fR -\fBb\fR [ -\fBc\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] [ -\fBD\fR ] [ -\fBv\fR ] \fIparola-dosyası\fR \fIkullanıcı\fR \fIparola\fR .PP -\fBhtpasswd\fR -\fBn\fR [ -\fBm\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] \fIkullanıcı\fR +\fBhtpasswd\fR -\fBn\fR [ -\fBi\fR ] [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] \fIkullanıcı\fR .PP -\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] \fIkullanıcı\fR \fIparola\fR +\fBhtpasswd\fR -\fBnb\fR [ -\fBm\fR | -\fBB\fR | -\fBd\fR | -\fBs\fR | -\fBp\fR ] [ -\fBC\fR \fIbedel\fR ] \fIkullanıcı\fR \fIparola\fR .SH "ÖZET" @@ -45,10 +45,10 @@ htpasswd \- Temel kimlik doğrulama dosyalarını yönetir \fBhtpasswd\fR, HTTP kullanıcılarının temel kimlik doğrulaması için kullanıcı isimlerinin ve parolalarının saklanmasında kullanılacak düz metin dosyalarını oluşturmak ve güncellemek için kullanılır\&. \fBhtpasswd\fR, güncelleme sırasında yazmak veya okumak için bir dosyaya erişemezse beklenen hiçbir işlemi yapmaz ve hata vererek çıkar\&. .PP -Apache HTTP sunucusunun mevcut özkaynaklarının kullanımı sadece \fBhtpasswd\fR tarafından oluşturulan dosyalarda listelenmiş kullanıcılara tahsis edilebilir\&. \fBhtpasswd\fR sadece düz metin dosyalarda saklanmış kullanıcı isimlerini ve parolalarını yönetirse de, diğer veri saklama türleri için parolayı şifreleyip gösterebilir\&. Bir DBM veritabanı kullanmak isterseniz \fBdbmmanage\fR sayfasına bakınız\&. +Apache HTTP sunucusunun mevcut özkaynaklarının kullanımı sadece \fBhtpasswd\fR tarafından oluşturulan dosyalarda listelenmiş kullanıcılara tahsis edilebilir\&. \fBhtpasswd\fR sadece düz metin dosyalarda saklanmış kullanıcı isimlerini ve parolalarını yönetirse de, diğer veri saklama türleri için parolayı şifreleyip gösterebilir\&. Bir DBM veritabanı kullanmak isterseniz \fBdbmmanage\fR ve \fBhtdbm\fR sayfasına bakınız\&. .PP -\fBhtpasswd\fR, parolaları şifrelemek için ya Apache'nin kendine özgü MD5 algoritmasını ya da sistemin crypt() yordamını kullanır\&. Bazı kullanıcılar MD5 şifreli parolalara, bazıları da crypt() ile şifrelenmiş parolalara sahip olabileceğinden \fBhtpasswd\fR tarafından yönetilen dosyalar her iki tür parolayı da içerebilir\&. +\fBhtpasswd\fR, parolaları şifrelemek için bcrypt, Apache'nin kendine özgü MD5 algoritması, SHA1 ya da sistemin crypt() yordamını kullanır\&. Bu bakımdan \fBhtpasswd\fR tarafından yönetilen dosyalar farklı algoritmalarla şifrelenmiş parolalar içerebilir\&. .PP Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler\&. Kullanıcı kimlik doğrulamasını \fBhttpd\fR'de yapılandırmak için gerekli yönergelerle ilgili ayrıntılar için Apache dağıtımının bir parçası olan ve http://httpd\&.apache\&.org/ adresinde de bulunan Apache HTTP Sunucusu Belgelerine bakınız\&. @@ -59,7 +59,10 @@ Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler\&. Kullan .TP \fB-b\fR -Betik kipi; parola için istek yapmak yerine parola komut satırından verilir\&. \fBParola komut satırında görünür\fR olacağından çok dikkatli kullanmak gerekir\&. +Betik kipi; parola için istek yapmak yerine parola komut satırından verilir\&. \fBParola komut satırında görünür\fR olacağından çok dikkatli kullanmak gerekir\&. Betik kullanımı için \fB-i\fR seçeneğine bakınız\&. 2\&.4\&.4 ve sonraki sürümler içindir\&. +.TP +\fB-i\fR +Parolayı doğrulamaksızın standart girdiden okur (betik kullanımı için)\&. .TP \fB-c\fR \fIparola-dosyası\fR oluşturur\&. Dosya mevcutsa, dosya silinip yeniden yazılır\&. Bu seçenek \fB-n\fR seçeneği ile birlikte kullanılamaz\&. @@ -68,13 +71,19 @@ Betik kipi; parola için istek yapmak yerine parola komut satırından verilir\& Sonuçları veritabanında güncellemek yerine standart çıktıya gönderir\&. Bu seçenek, Apache'nin metin veriler içermeyen veri depolarına dahil edilebilecek parolaları üretmekte yararlıdır\&. \fIparola-dosyası\fR belirtilmediğinden, bu seçenek komut satırı sözdizimini değiştirir\&. Bu seçenek \fB-c\fR seçeneği ile birlikte kullanılamaz\&. .TP \fB-m\fR -Parolalar için MD5 şifrelemesi kullanılır\&. Bu öntanımlıdır\&. +Parolalar için MD5 şifrelemesi kullanılır\&. Bu 2\&.2\&.18 sürümünden beri öntanımlıdır\&. +.TP +\fB-B\fR +Parolalar için bcrypt şifrelemesi kullanılır\&. Şu an için çok güvenli kabul edilmektedir\&. +.TP +\fB-C\fR \fIbedel\fR +Bu seçenek sadece \fB-B\fR (bcrypt şifrelemesi) seçeneği ile birlikte kullanılabilir\&. Bcrypt algoritmasına hesaplama süresini belirtir (daha yüksek değerler daha güvenlidir, öntanımlı 5, geçerli değerler: 4 - 31)\&. .TP \fB-d\fR -Parolaları şifrelemek için crypt() kullanılır\&. Windows, ve Netware dışında öntanımlıdır\&. \fBhtpasswd\fR tarafından tüm platformlarda destekleniyor olsa da Windows, Netware ve TPF üzerinde httpd sunucusu tarafından desteklenmez\&. +Parolaları şifrelemek için crypt() kullanılır\&. \fBhtpasswd\fR tarafından tüm platformlarda destekleniyor olsa da Windows, Netware ve TPF üzerinde httpd sunucusu tarafından desteklenmez\&. Bu algoritma günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. 2\&.2\&.17 sürümüne kadar öntanımlı algoritma olarak kullanılmıştı\&. .TP \fB-s\fR -Parolalar için SHA şifrelemesi kullanılır\&. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü kolaylaştırır\&. +Parolalar için SHA şifrelemesi kullanılır\&. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü kolaylaştırır\&.Bu algoritma günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. .TP \fB-p\fR Düz metin parolalar kullanılır\&. \fBhtpasswd\fR tarafından tüm platformlarda destekleniyor olsa da Windows, Netware ve TPF üzerinde httpd sunucusu tarafından sadece düz metin parolalar kabul edilir\&. @@ -82,6 +91,9 @@ Düz metin parolalar kullanılır\&. \fBhtpasswd\fR tarafından tüm platformlar \fB-D\fR Kullanıcıyı siler\&. Kullanıcı belirtilen dosyada mevcutsa silinir\&. .TP +-v +Parolayı doğrular\&. Verilen parolayı belitilen htpasswd dosyasında saklanan kullanıcı parolası ile karşılaştırarak doğrulama yapar\&. 2\&.4\&.5 ve sonraki sürümler içindir\&. +.TP \fIparola-dosyası\fR Kullanıcı ismini ve parolasını içeren dosyanın ismi\&. \fB-c\fR seçeneği verilmişse ve dosya mevcut değilse oluşturulur, dosya mevcutsa silinip yeniden oluşturulur\&. .TP @@ -142,6 +154,9 @@ crypt() algoritması kullanılırken, parolayı şekillendirmek için parolanın .PP SHA şifreleme biçeminde tuz kullanılmaz; yani, bir parolanın sadece bir şifreli gösterimi olabilir\&. crypt() ve MD5 biçemleri parolanın önüne rasgele üretilmiş bir tuz dizgesi eklediklerinden sözlük saldırılarına karşı daha dayanıklıdırlar\&. +.PP +SHA ve crypt() biçimleri günümüz standartlarında \fBgüvenilmez\fR kabul edilmektedir\&. + .SH "KISITLAMALAR" .PP diff --git a/docs/man/tr/httpd.8 b/docs/man/tr/httpd.8 index 07951660448..dbcb79b31ed 100644 --- a/docs/man/tr/httpd.8 +++ b/docs/man/tr/httpd.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTTPD" 8 "2009-02-16" "Apache HTTP Sunucusu" "httpd" +.TH "HTTPD" 8 "2014-06-24" "Apache HTTP Sunucusu" "httpd" .nh .SH İSİM httpd \- Apache Hiper Metin Aktarım Protokolü Sunucusu @@ -27,7 +27,7 @@ httpd \- Apache Hiper Metin Aktarım Protokolü Sunucusu .SH "KULLANIM" .PP -\fBhttpd\fR [ -\fBd\fR \fIsunucu-kök-dizini\fR ] [ -\fBf\fR \fIyapılandırma-dosyası\fR ] [ -\fBC\fR \fIyönerge\fR ] [ -\fBc\fR \fIyönerge\fR ] [ -\fBD\fR \fIparametre\fR ] [ -\fBe\fR \fIseviye\fR ] [ -\fBE\fR \fIdosya\fR ] [ \fB-k\fR start | restart | graceful | stop | graceful-stop ] [ -\fBR\fR \fIdizin\fR ] [ -\fBh\fR ] [ -\fBl\fR ] [ -\fBL\fR ] [ -\fBS\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBV\fR ] [ -\fBX\fR ] [ -\fBM\fR ] +\fBhttpd\fR [ -\fBd\fR \fIsunucu-kök-dizini\fR ] [ -\fBf\fR \fIyapılandırma-dosyası\fR ] [ -\fBC\fR \fIyönerge\fR ] [ -\fBc\fR \fIyönerge\fR ] [ -\fBD\fR \fIparametre\fR ] [ -\fBe\fR \fIseviye\fR ] [ -\fBE\fR \fIdosya\fR ] [ \fB-k\fR start | restart | graceful | stop | graceful-stop ] [ -\fBh\fR ] [ -\fBl\fR ] [ -\fBL\fR ] [ -\fBS\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBV\fR ] [ -\fBX\fR ] [ -\fBM\fR ] [ -\fBT\fR ] .PP Windows sistemlerinde, ek olarak şunlar vardır: @@ -56,7 +56,7 @@ Genelde, \fBhttpd\fR'nin doğrudan çağrılmaması gerekir\&. Unix ve benzerler Başlatma sırasında \fIyapılandırma-dosyası\fR'ndaki yönergeler kullanılır\&. Eğer \fIyapılandırma-dosyası\fR bir / ile başlamıyorsa dosyanın ServerRoot yönergesinin değerine göreli olduğu varsayılır\&. Seçenek belirtilmediği takdirde conf/httpd\&.conf öntanımlı değerdir\&. .TP \fB-k\fR start | restart | graceful | stop | graceful-stop -\fBhttpd\fR'yi başlatmak, durdurmak ve yeniden başlatmak için sinyal gönderir\&. Daha ayrıntılı bilgi edinmek için Apache'nin Durdurulması belgesine bakınız\&. +\fBhttpd\fR'yi başlatmak, durdurmak ve yeniden başlatmak için sinyal gönderir\&. Daha ayrıntılı bilgi edinmek için Apache httpd'nin Durdurulması belgesine bakınız\&. .TP \fB-C\fR \fIyönerge\fR Yapılandırma \fIyönerge\fR'sini yapılandırma dosyalarını okumadan önce işleme sokar\&. @@ -85,12 +85,12 @@ Durağan modüllerce sağlanmış yönergeleri olası değerleriyle geçerli kon \fB-M\fR Yüklü durağan ve paylaşımlı modülleri listeler\&. .TP -\fB-R\fR \fIdizin\fR -Sunucu SHARED_CORE kullanılarak derlendiği takdirde bu seçenek paylaşımlı nesne dosyaları için \fIdizin\fR belirtir\&. -.TP \fB-S\fR Yapılandırma dosyasından çözümlenmiş haliyle ayarları gösterir (şu an sadece sanal konak ayarları gösterilmektedir)\&. .TP +\fB-T\fR (2\&.3\&.8 ve sonrasında kullanılabilmektedir) +Başlatma ve yeniden başlatma sırasında belge kökü sınanmadan geçilir\&. +.TP \fB-t\fR Yapılandırma dosyasını sözdizimi hatalarına karşı denetler\&. Program sözdizimini denetledikten sonra sözdizimi geçerliyse 0 ile, değilse sıfırdan farklı bir değerle çıkar\&. \fB-D\fRDUMP_VHOSTS seçeneği ile birlikte kullanılmışsa ek olarak sanal konak ayrıntıları da basılır\&. \fB-D\fRDUMP_MODULES seçeneği ile ise ek olarak tüm modüller listelenir\&. .TP @@ -109,10 +109,10 @@ Aşağıdaki seçenekler sadece Windows platformunda geçerlidir: .TP \fB-k\fR install | config | uninstall -Parametreler bakımından sırasıyla: Apache bir Windows NT hizmeti haline getirilir; başlatma seçenekleri Apache hizmeti için değiştirilir; ve Apache hizmeti sistemden kaldırılır\&. +Parametreler bakımından sırasıyla: Apache httpd bir Windows NT hizmeti haline getirilir; başlatma seçenekleri Apache httpd hizmeti için değiştirilir; ve Apache httpd hizmeti sistemden kaldırılır\&. .TP \fB-n\fR \fIisim\fR -Sinyal gönderilecek Apache hizmetinin \fIismi\fR\&. +Sinyal gönderilecek Apache httpd hizmetinin \fIismi\fR\&. .TP \fB-w\fR Hata durumunda konsol penceresi açık tutularak hata iletilerinin okunması sağlanır\&. diff --git a/docs/man/tr/httxt2dbm.1 b/docs/man/tr/httxt2dbm.1 new file mode 100644 index 00000000000..b5d981445a3 --- /dev/null +++ b/docs/man/tr/httxt2dbm.1 @@ -0,0 +1,65 @@ +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.\" DO NOT EDIT! Generated from XML source. +.\" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +.de Sh \" Subsection +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Ip \" List item +.br +.ie \\n(.$>=3 .ne \\$3 +.el .ne 3 +.IP "\\$1" \\$2 +.. +.TH "HTTXT2DBM" 1 "2013-04-17" "Apache HTTP Sunucusu" "httxt2dbm" +.nh +.SH İSİM +httxt2dbm \- RewriteMap ile kullanmak için DBM dosyaları üretir + +.SH "KULLANIM" + +.PP +\fBhttxt2dbm\fR [ -\fBv\fR ] [ -\fBf\fR \fIDBM_türü\fR ] -\fBi\fR \fIkaynak_metin\fR -\fBo\fR \fIçıktı_DBM\fR + + +.SH "ÖZET" + +.PP +\fBhttxt2dbm\fR, RewriteMap ile kullanmak için düz metin dosyalardan DBM dosyaları üretir\&. + +.PP +Çıktı dosyası mevcutsa dosya kırpılmaz\&. Yeni anahtarlar eklenir, mevcutlar da güncellenir\&. + + +.SH "SEÇENEKLER" + + +.TP +\fB-v\fR +Çıktı daha ayrıntılı olur\&. +.TP +\fB-f\fR \fIDBM_türü\fR +Çıktı için kullanılacak DBM türü belirtilir\&. Belirtilmediği takdirde APR öntanımlısı kullanılır\&. Belirtilebilecek DBM türleri: GDBM dosyalar için GDBM, SDBM dosyalar için SDBM, Berkeley DB dosyalar için DB, NDBM dosyalar için NDBM, öntanımlı DBM türü için default +.TP +\fB-i\fR \fIkaynak_metin\fR +DBM dosyasının üretiminde kullanılacak girdi dosyası belirtilir\&. Bu dosya, her satırda bir kayıt bulunmak üzere her satırı şöyle biçemlenmiş olmalıdır: anahtar değer\&. Bu dosyanın biçemi ve manası ile ilgili ayrıntılar için RewriteMap yönergesinin açıklamasına bakınız\&. +.TP +\fB-o\fR \fIçıktı_DBM\fR +Çıktılanacak DBM dosyasının ismi belirtilir\&. + +.SH "ÖRNEKLER" + +.nf + + httxt2dbm -i rewritemap\&.txt -o rewritemap\&.dbm + httxt2dbm -f SDBM -i rewritemap\&.txt -o rewritemap\&.dbm +.fi + diff --git a/docs/man/tr/logresolve.8 b/docs/man/tr/logresolve.1 similarity index 95% rename from docs/man/tr/logresolve.8 rename to docs/man/tr/logresolve.1 index f0d0fe17414..7ec05a4995b 100644 --- a/docs/man/tr/logresolve.8 +++ b/docs/man/tr/logresolve.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "LOGRESOLVE" 8 "2009-02-16" "Apache HTTP Sunucusu" "logresolve" +.TH "LOGRESOLVE" 1 "2013-04-17" "Apache HTTP Sunucusu" "logresolve" .nh .SH İSİM logresolve \- Apache günlük dosyalarındaki IP adreslerini konak isimlerine dönüştürür diff --git a/docs/man/tr/rotatelogs.8 b/docs/man/tr/rotatelogs.8 index 143c005cff7..5a515aa10ec 100644 --- a/docs/man/tr/rotatelogs.8 +++ b/docs/man/tr/rotatelogs.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "ROTATELOGS" 8 "2009-02-16" "Apache HTTP Sunucusu" "rotatelogs" +.TH "ROTATELOGS" 8 "2015-01-18" "Apache HTTP Sunucusu" "rotatelogs" .nh .SH İSİM rotatelogs \- Apache günlüklerini döndürmek için borulu günlük kayıt programı @@ -27,7 +27,7 @@ rotatelogs \- Apache günlüklerini döndürmek için borulu günlük kayıt pro .SH "KULLANIM" .PP -\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBf\fR ] [ -\fBv\fR ] \fIdosyaismi\fR \fIsüre\fR|\fIboyut\fR(B|K|M|G) [ \fIsaat_farkı\fR ] +\fBrotatelogs\fR [ -\fBl\fR ] [ -\fBL\fR \fIisim\fR ] [ -\fBp\fR \fIprogram\fR ] [ -\fBf\fR ] [ -\fBt\fR ] [ -\fBv\fR ] [ -\fBe\fR ] [ -\fBc\fR ] [ -\fBn\fR \fIdosya_sayısı\fR ] \fIdosyaismi\fR \fIsüre\fR|\fIboyut\fR(B|K|M|G) [ \fIsaat_farkı\fR ] .SH "ÖZET" @@ -41,16 +41,34 @@ rotatelogs \- Apache günlüklerini döndürmek için borulu günlük kayıt pro .TP \fB-l\fR -GMT yerine yerel zamanın kullanılmasını sağlar\&. Zaman dilimi değişik olan ortamlarda (BST, DST gibi) bu seçeneğin kullanımı beklenmedik sonuçlar verebilir! +GMT yerine yerel zamanın kullanılmasını sağlar\&. +.TP +\fB-L\fR \fIbagismi\fR +Belirtilen bağ dosyası ismine geçerli günlük dosyasından kalıcı bir bağ oluşturulur\&. tail -F bagismi gibi bir komut kullanılarak günlüğün sürekli izlenmesi için kullanılabilir\&. +.TP +\fB-p\fR \fIprogram\fR +Belirtildiği takdirde, \fBrotatelogs\fR yeni bir günlük dosyasının her açılışında belirtilen programı çalıştırır\&. Yeni açılan dosyanın ismi programa ilk argüman olarak aktarılır\&. Bu işlem bir döndürme sonrası yapılırsa eski günlük dosyası ikinci argüman olarak aktarılır\&. \fBrotatelogs\fR işlemini sürdürmek için belirtilen programın sonlanmasını beklemez, dolayısıyla sonlanma soucunda döndürülen hata kodunu günlüğe kaydetmez\&. Çalıştırılan program \fBrotatelogs\fR ile aynı stdin, stdout ve stderr'i kullanır ve ortamı da miras alır\&. .TP \fB-f\fR İlk günlük giridisinin okunmasını beklemeden \fBrotatelogs\fR başlar başlamaz günlük dosyasının açılmasını sağlar\&. Çok meşgul sitelerde, sunucu başlatılıp ilk istek sunuluncaya kadar geçen zamanda günlük dosyasının yokluğu özdevinimli işlemler yapan bazı günlükleme araçlarında sorunlara yol açabilir\&. Bu seçenek bu gibi durumlarda yararlıdır\&. .TP +\fB-t\fR +Günlük dosyasının döndürülmek yerine tepeden kırpılmasına sebep olur\&. Günlüğün \fBtail\fR gibi bir araç tarafından gerçek zamanda işlendiği ve veriyi saklamanın gerekmediği durumda kullanışlıdır\&. Dosya ismine bir sonek eklenmez, ancak biçem dizgesi '%' karakteri içeriyorsa buna uyulur\&. +.TP \fB-v\fR Standart hataya verilen çıktı daha ayrıntılı olur\&. Çıktı, yapılandırma çözümlemesinin sonuçlarını ve tüm dosya açma/kapama işlemlerini içerir\&. .TP +\fB-e\fR +Günlüğü standart çıktıya basar\&. Günlüğün zincirdeki ilgili araç tarafından gerçek zamanda işlenmesi gerektiğinde kullanışlıdır\&. +.TP +\fB-c\fR +Create log file for each interval, even if empty\&. +.TP +\fB-n\fR \fIdosya_sayısı\fR +Zaman damgalarına bakılmaksızın bir dosya serisi açılır\&. Örneğin -n3 belirtilirse "logfile", "logfile\&.1", "logfile\&.2" serisi açılır ve "logfile" üzerine yazılır\&. 2\&.4\&.5 ve sonraki sürümler içindir\&. +.TP \fIdosyaismi\fR -Günlük dosyasının ismi yoluyla birlikte belirtilir\&. \fIdosyaismi\fR '%' karakterleri içeriyorsa bunlar strftime(3) biçem belirteçleri olarak ele alınır\&. Aksi takdirde, özdevinimli olarak \fI\&.nnnnnnnnnn\fR uzantısı üretilir\&. Uzantı saniye cinsindendir ve her iki durumda da bu değer, mevcut döngü diliminin başlangıcına göre hesaplanır\&. Örneğin, döndürmenin 86400 saniyede bir yapılacağı belirtilmişse, strftime(3) biçeminde oluşturulan saat, dakika ve saniye alanları, 24 saatlik sürenin başlangıcını (geceyarısı) göstermek üzere sıfırlarla doldurulur\&. +.PP Günlük dosyasının ismi yoluyla birlikte belirtilir\&. \fIdosyaismi\fR '%' karakterleri içeriyorsa bunlar strftime(3) biçem belirteçleri olarak ele alınır\&. Aksi takdirde, özdevinimli olarak \fI\&.nnnnnnnnnn\fR uzantısı üretilir\&. (\fB-t\fR seçeneği kullanılmadıkça) Uzantı saniye cinsindendir ve her iki durumda da bu değer, mevcut döngü diliminin başlangıcına göre hesaplanır\&. Örneğin, döndürmenin 86400 saniyede bir yapılacağı belirtilmişse, strftime(3) biçeminde oluşturulan saat, dakika ve saniye alanları, 24 saatlik sürenin başlangıcını (geceyarısı) göstermek üzere sıfırlarla doldurulur\&. .PP strftime(3) dosyaismi biçemlemesi kullanılırken, günlük dosyası biçeminin günlük dosyası döndürülürken her zaman farklı bir dosya ismi üretecek yeterlilikte parçacıklı yapıya sahip olduğundan emin olmalısınız\&. Aks takdirde döndürme işlemi yeni bir dosya başlatmak yerine hep aynı dosyanın üzerine yazar\&. Örneğin, \fIlogfile\fR için /var/log/errorlog\&.%Y-%m-%d belirtilmişse 5 mega baytta bir yeni bir günlük dosyasına başlanacaktır\&. Fakat 5 megabayta gün içinde iki kez ulaşılırsa aynı günlük dosyası üretilir ve günlük hep aynı dosyanın üzerine yazılır\&. .TP \fIsüre\fR Günlük dosyasının yenisinin kaç saniyede bir açılacağı belirtilir\&. Örneğin, bu süre 3600 saniye ise günlük dosyası her saat başında yenilenir; 86400 saniye ise her geceyarısı yenilenir\&. (Bu süre zarfında günlüğe kaydedilecek bir olay gerçekleşmemişse dosya oluşturulmaz\&.) @@ -65,25 +83,25 @@ Koordinatlı evrensel zamana göre "dakika" farkı\&. Belirtilmezse, sıfır ön .nf - CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs /var/log/logfile 86400" common .fi .PP -nnnn, günlük kaydının başladığı sistem zamanı olmak üzere /var/logs/logfile\&.nnnn dosyası oluşturulur\&. Bu zaman, daima döngü süresinin katları olacağından bunu cron betiklerinizi eşzamanlamakta kullanabilirsiniz\&. Her döngü süresinin sonunda (burada 24 saat sonra) yeni bir günlük dosyası açılır\&. +nnnn, günlük kaydının başladığı sistem zamanı olmak üzere /var/log/logfile\&.nnnn dosyası oluşturulur\&. Bu zaman, daima döngü süresinin katları olacağından bunu cron betiklerinizi eşzamanlamakta kullanabilirsiniz\&. Her döngü süresinin sonunda (burada 24 saat sonra) yeni bir günlük dosyası açılır\&. .nf - CustomLog "|bin/rotatelogs -l /var/logs/logfile\&.%Y\&.%m\&.%d 86400" common + CustomLog "|bin/rotatelogs -l /var/log/logfile\&.%Y\&.%m\&.%d 86400" common .fi .PP -yyyy, yıl; mm, ay; dd, ayın gününü belirtmek üzere /var/logs/logfile\&.yyyy\&.mm\&.dd dosyası oluşturulur\&. Her gün yerel zamanla geceyarısı yeni bir günlük dosyasına geçilecektir\&. +yyyy, yıl; mm, ay; dd, ayın gününü belirtmek üzere /var/log/logfile\&.yyyy\&.mm\&.dd dosyası oluşturulur\&. Her gün yerel zamanla geceyarısı yeni bir günlük dosyasına geçilecektir\&. .nf - CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common + CustomLog "|bin/rotatelogs /var/log/logfile 5M" common .fi @@ -92,13 +110,22 @@ Günlük dosyası 5 megabaytlık olunca yenisinin oluşturulmasını sağlar\&. .nf - ErrorLog "|bin/rotatelogs /var/logs/errorlog\&.%Y-%m-%d-%H_%M_%S 5M" + ErrorLog "|bin/rotatelogs /var/log/errorlog\&.%Y-%m-%d-%H_%M_%S 5M" .fi .PP Hata günlüğünün 5 megabaytta bir errorlog\&.YYYY-mm-dd-HH_MM_SS biçemli bir isimle oluşturulmasını sağlar\&. +.nf + + CustomLog "|bin/rotatelogs -t /var/log/logfile 86400" common + +.fi + +.PP +/var/log/logfile dosyasını oluşturur, sunucu başlatılırken ve günde bir kere dosyanın tepesi kırpılır\&. Bu senaryoda ayrı bir sürecin (tail gibi) dosyayı gerçek zamanlı işleyeceği umulur\&. + .SH "TAŞINABİLİRLİK" .PP diff --git a/docs/man/tr/suexec.8 b/docs/man/tr/suexec.8 index 34a81d71350..324d408e546 100644 --- a/docs/man/tr/suexec.8 +++ b/docs/man/tr/suexec.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "SUEXEC" 8 "2009-02-16" "Apache HTTP Sunucusu" "suexec" +.TH "SUEXEC" 8 "2013-08-16" "Apache HTTP Sunucusu" "suexec" .nh .SH İSİM suexec \- harici programları çalıştırmadan önce kullanıcıyı değiştirir @@ -36,7 +36,7 @@ suexec \- harici programları çalıştırmadan önce kullanıcıyı değiştiri \fBsuexec\fR, CGI programlarını çalıştırmadan önce Apache HTTP Sunucusu tarafından kullanıcı değiştirmek için kullanılır\&. Bunu yapabilmek için sunucunun root tarafından çalıştırılmış olması gerekir\&. HTTP artalan süreci normalde root aidiyetinde çalışmadığından \fBsuexec\fR'in çalıştırılabilir dosyasının sahibi root olmalı, setuid biti etkin (u+s) olmalı ve dosyaya root dışında hiç kimse yazamamalıdır\&. .PP -\fBsuexec\fR güvenlik modeli ve kavramlar hakkında bilgi edinmek için suexec belgesine (http://httpd\&.apache\&.org/docs/trunk/suexec\&.html) bakınız\&. +\fBsuexec\fR güvenlik modeli ve kavramlar hakkında bilgi edinmek için suexec belgesine (http://httpd\&.apache\&.org/docs/2\&.4/suexec\&.html) bakınız\&. .SH "SEÇENEKLER" diff --git a/docs/manual/bind.html.de b/docs/manual/bind.html.de index 92bce8a4b80..5851d02d0d2 100644 --- a/docs/manual/bind.html.de +++ b/docs/manual/bind.html.de @@ -1,22 +1,27 @@ - -Anbindung - Apache HTTP Server +An Adressen und Ports binden - Apache HTTP Server Version 2.4 - + + + + +

Apache HTTP Server Version 2.4

+
<-

An Adressen und Ports binden

Verfgbare Sprachen:  de  |  en  | @@ -25,17 +30,16 @@  ko  |  tr 

-
Diese bersetzung ist mglicherweise - nicht mehr aktuell. Bitte prfen Sie die englische Version auf - die neuesten nderungen.
-

Konfiguration der vom Apache verwendeten Adressen und Ports.

+

Konfiguration der vom Apache HTTP Server verwendeten Adressen und + Ports.

+ Apache
  • Kommentare
  • top

    berblick

    @@ -43,122 +47,150 @@ -

    Beim Start bindet sich der Apache an bestimmte Adressen und Ports - der lokalen Maschine und wartet auf eingehende Anfragen. - Standardmig lauscht er an allen Adressen des Systems. - Es kann jeodch notwendig sein, ihm mit zuteilen, nur an bestimmten Ports - zu lauschen oder nur an ausgewhlten Adressen, bzw. einer - Kombination aus beidem. Dies wird oft mit der Funktionalitt - virtueller Hosts kombiniert, die bestimmt, wie der Apache auf - verschiedene IP-Adressen, Hostnamen und Ports reagiert.

    +

    Beim Start bindet sich der httpd an bestimmte Adressen und Ports + der lokalen Maschine und wartet auf eingehende Anfragen. + Standardmig lauscht er an allen Adressen des Systems. + Es kann jeodch notwendig sein, ihm mit zuteilen, nur an bestimmten + Ports zu lauschen oder nur an ausgewhlten Adressen, bzw. einer + Kombination aus beidem. Dies wird oft mit der Funktionalitt virtueller Hosts kombiniert, die bestimmt, wie + der httpd auf verschiedene IP-Adressen, Hostnamen und + Ports reagiert.

    Die Direktive Listen - weist den Server an, eingehende Anfragen nur an bestimmten Ports oder - Adress/Port-Kombinationen zu akzeptieren. Wenn bei der Listen-Direktive nur eine Portnummer - angegeben wird, dann lauscht der Server auf allen Netzwerkinterfaces an - dem angegebenen Port. Ist auch eine IP-Adresse angegeben, dann lauscht der - Server an der angegebenen Schnittstelle auf dem angegebenen Port. Es - knnen mehrere Listen-Anweisungen verwendet werden, um - eine Reihe von Adressen und Ports anzugeben, an denen gelauscht werden - soll. Der Server wird dann auf Anfragen an jeder der abgehrten - Adressen und Ports antworten.

    + weist den Server an, eingehende Anfragen nur an bestimmten Port(s) + oder Adress/Port-Kombinationen zu akzeptieren. Wenn bei der + Listen-Direktive nur eine + Portnummer angegeben wird, dann lauscht der Server auf allen + Netzwerkinterfaces an dem angegebenen Port. Ist auch eine IP-Adresse + angegeben, dann lauscht der Server an der angegebenen Schnittstelle + auf dem angegebenen Port. Es knnen mehrere Listen-Anweisungen verwendet werden, + um eine Reihe von Adressen und Ports anzugeben, an denen gelauscht + werden soll. Der Server wird dann auf Anfragen an jeder der + abgehrten Adressen und Ports antworten.

    Um beispielsweise den Server zu veranlassen, auf allen - Netzwerkinterfaces sowohl an Port 80, als auch an Port 8000 Verbindungen - zu akzeptieren, geben Sie an:

    + Netzwerkinterfaces sowohl an Port 80, als auch an Port 8000 + Verbindungen zu akzeptieren, geben Sie an:

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    Um den Server Verbindungen an Port 80 auf einem Netzwerkinterface akzeptieren zu lassen und an Port 8080 auf einem anderen Interface, geben Sie an:

    -

    - Listen 192.0.2.1:80
    - Listen 192.0.2.5:8000 -

    +
    Listen 192.0.2.1:80
    +Listen 192.0.2.5:8000
    +

    IPv6-Adressen mssen wie im folgenden Beispiel in eckigen Klammern angegeben werden:

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +
    + +

    Sich berlappende Listen-Direktiven generieren einen + fatalen Fehler, der verhindert, dass der Server hochfhrt.

    +

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 + (48)Address already in use: make_sock: could not bind to address [::]:80

    + +

    Diese + Diskussion im Wiki gibt weitere Tipps zur Fehlerbehebung.

    +
    top

    Betrachtung von IPv6-Besonderheiten

    Eine wachsende Anzahl von Plattformen implementiert IPv6. Die - APR - untersttzt IPv6 auf den meisten dieser Plattformen und - ermglicht dem Apache, IPv6-Sockets zu verwenden und ber IPv6 - gesendete Anfragen zu behandeln.

    - -

    Fr Apache-Administratoren kommt erschwerend die Frage hinzu, ob - IPv6-Sockets sowohl IPv4- als auch IPv6-Verbindungen - handhaben knnen. Zum Betrieb von IPv4-Verbindungen an - IPv6-Sockets werden auf IPv6 abgebildete IPv4-Adressen - (Anm.d..: so genannete IPv4-gemappte IPv6-Adressen) - verwendet, welche standardmig auf den meisten Plattformen - erlaubt sind. Unter FreeBSD, NetBSD und OpenBSD jedoch sind sie - standardmig deaktiviert, um den Systemgrundstzen dieser - Plattformen zu entsprechen. Auf Systemen, wo dies - standardmig dekativiert ist, kann dieses Verhalten mit einem - speziellen configure-Parameter fr den Apache - gendert werden.

    - -

    Auf der anderen Seite ist die Verwendung von gemappten Adressen bei - einigen Plattformen wie Linux und True64 der einzige - Weg, sowohl IPv4 wie auch IPv6 zu verwenden. Wenn Sie mchten, dass - der Apache IPv4- und IPv6-Verbindungen mit einem Minimum an Sockets - behandelt, was die Verwendung von IPv4-gemappten IPv6-Adressen - erfordert, dann mssen Sie die configure-Option --enable-v4-mapped angeben.

    + APR untersttzt IPv6 auf den meisten + dieser Plattformen und ermglicht dem httpd, IPv6-Sockets zu + verwenden und ber IPv6 gesendete Anfragen zu behandeln.

    + +

    Fr httpd-Administratoren kommt erschwerend die Frage hinzu, + ob IPv6-Sockets sowohl IPv4- als auch IPv6-Verbindungen handhaben + knnen. Zum Betrieb von IPv4-Verbindungen an IPv6-Sockets + werden auf IPv6 abgebildete IPv4-Adressen (Anm.d..: so genannete + IPv4-gemappte IPv6-Adressen) verwendet, welche + standardmig auf den meisten Plattformen erlaubt sind. + Unter FreeBSD, NetBSD und OpenBSD jedoch sind sie + standardmig deaktiviert, um den Systemgrundstzen + dieser Plattformen zu entsprechen. Auf Systemen, wo dies + standardmig dekativiert ist, kann dieses Verhalten mit + einem speziellen configure-Parameter fr den + httpd gendert werden.

    + +

    Auf der anderen Seite ist die Verwendung von gemappten Adressen + bei einigen Plattformen wie Linux und True64 der + einzige Weg, sowohl IPv4 wie auch IPv6 zu + verwenden. Wenn Sie mchten, dass der httpd IPv4- + und IPv6-Verbindungen mit einem Minimum an Sockets behandelt, was + die Verwendung von IPv4-gemappten IPv6-Adressen erfordert, dann + mssen Sie die configure-Option + --enable-v4-mapped angeben.

    --enable-v4-mapped ist die Voreinstellung auf allen - Plattformen auer FreeBSD, NetBSD und OpenBSD, so dass Ihr Apache - wahrscheinlich so bersetzt wurde.

    + Plattformen auer FreeBSD, NetBSD und OpenBSD, so dass Ihr + httpd wahrscheinlich so bersetzt wurde.

    Geben Sie wie in dem folgenden Beispiel bei allen Listen-Anweisungen eine IPv4-Adresse - an, wenn Sie mchten, dass Ihr Apache lediglich IPv4-Adressen - behandelt, unabhngig davon, was Ihre Plattform und die APR - untersttzen:

    + an, wenn Sie mchten, dass Ihr httpd lediglich IPv4-Adressen + behandelt, unabhngig davon, was Ihre Plattform und die APR + untersttzen:

    -

    - Listen 0.0.0.0:80
    - Listen 192.0.2.1:80 -

    +
    Listen 0.0.0.0:80
    +Listen 192.0.2.1:80
    +
    -

    Wenn Sie mchten, dass der Apache IPv4- und IPv6-Verbindungen an - separaten Sockets behandelt (d.h. IPv4-gemappte Adressen deaktiviert - werden sollen) und Ihre Plattform es untersttzt, dann mssen - Sie die configure-Option - --disable-v4-mapped angeben. - Unter FreeBSD, NetBSD und OpenBSD ist --disable-v4-mapped - voreingestellt.

    +

    Wenn Sie mchten, dass der httpd IPv4- und IPv6-Verbindungen + an separaten Sockets behandelt (d.h. IPv4-gemappte Adressen + deaktiviert werden sollen) und Ihre Plattform es untersttzt, + dann mssen Sie die configure-Option + --disable-v4-mapped angeben. Unter FreeBSD, NetBSD und + OpenBSD ist --disable-v4-mapped voreingestellt.

    +
    top
    +
    +

    Angabe des Protokolls bei Listen

    + +

    Das optionale zweite Protokoll-Argument von Listen ist fr die meisten + Konfigurationen gar nicht erforderlich. Wenn nicht angegeben, sind + https fr Port 443 und http fr + alle anderen Ports die Voreinstellungen. Die Protokollangabe wird + sowohl dazu verwendet, herauszufinden, welches Modul Anfragen + verarbeiten soll, als auch, um protokollspezifische Optimierungen + bei der AcceptFilter-Direktive + zu aktivieren.

    + +

    Sie mssen das Protokoll nur angeben, wenn Sie + ungewhnliche Ports benutzen, beispielsweise https + auf Port 8443:

    + +
    Listen 192.170.2.1:8443 https
    +
    top

    Das Zusammenspiel mit virtuellen Hosts

    Die Direktive Listen - implementiert keine virtuellen Hosts - sie teilt dem Hauptserver lediglich - mit, an welchen Adressen und Ports er zu lauschen hat. Werden keine - <VirtualHost>-Container - verwendet, dann verhlt sich der Server bei allen angenommenen - Anfragen gleich. <VirtualHost>-Abschnitte knnen jedoch dazu - verwendet werden, ein unterschiedliches Verhalten fr eine oder - mehrere Adressen und Ports festzulegen. Um einen virtuellen Host - einzurichten, muss dem Server zunchst mitgeteilt werden, an den - betreffenden Adressen oder Ports zu lauschen. Dann sollte ein <VirtualHost>-Abschnitt fr - die angebene Adresse und den angegebenen Port erstellt werden, um das - Verhalten dieses virtuellen Hosts festzulegen. Beachten Sie bitte, dass - auf einen <VirtualHost> - nicht zugegriffen werden kann, wenn er fr eine Adresse und einen - Port eingerichtet wurde, an dem der Server nicht lauscht.

    + implementiert keine virtuellen Hosts - sie teilt dem Hauptserver + lediglich mit, an welchen Adressen und Ports er zu lauschen hat. + Werden keine <VirtualHost>-Container verwendet, dann + verhlt sich der Server bei allen angenommenen Anfragen gleich. + <VirtualHost>-Abschnitte knnen jedoch + dazu verwendet werden, ein unterschiedliches Verhalten fr eine + oder mehrere Adressen und Ports festzulegen. Um einen virtuellen + Host einzurichten, muss dem Server zunchst mitgeteilt werden, + an den betreffenden Adressen oder Ports zu lauschen. Dann sollte ein + <VirtualHost>-Abschnitt fr die + angebene Adresse und den angegebenen Port erstellt werden, um das + Verhalten dieses virtuellen Hosts festzulegen. Beachten Sie bitte, + dass auf einen <VirtualHost> nicht zugegriffen werden + kann, wenn er fr eine Adresse und einen Port eingerichtet + wurde, an dem der Server nicht lauscht.

    Verfgbare Sprachen:  de  | @@ -167,7 +199,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.html.en b/docs/manual/bind.html.en index 43224bd1047..5dec1298d1a 100644 --- a/docs/manual/bind.html.en +++ b/docs/manual/bind.html.en @@ -1,22 +1,27 @@ - -Binding to Addresses and Ports - Apache HTTP Server +Binding to Addresses and Ports - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Binding to Addresses and Ports

    +Apache > HTTP Server > Documentation > Version 2.4
    top

    Overview

    @@ -46,7 +51,7 @@ it listens to all addresses on the machine. However, it may need to be told to listen on specific ports, or only on selected addresses, or a combination of both. This is often combined with the - Virtual Host feature, which determines how + Virtual Host feature, which determines how httpd responds to different IP addresses, hostnames and ports.

    @@ -65,33 +70,34 @@

    For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    To make the server accept connections on port 80 for one interface, and port 8000 on another, use

    -

    - Listen 192.0.2.1:80
    - Listen 192.0.2.5:8000 -

    +
    Listen 192.0.2.1:80
    +Listen 192.0.2.5:8000
    +

    IPv6 addresses must be enclosed in square brackets, as in the following example:

    -

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 -

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +

    Overlapping Listen directives will result in a fatal error which will prevent the server from starting up.

    - (48)Address already in use: make_sock: could not bind to address [::]:80 + (48)Address already in use: make_sock: could not bind to address [::]:80

    -
    + +

    See the + discussion in the wiki for further troubleshooting tips.

    + +
    top
    @@ -128,10 +134,9 @@ Listen directives, as in the following examples:

    -

    - Listen 0.0.0.0:80
    - Listen 192.0.2.1:80 -

    +
    Listen 0.0.0.0:80
    +Listen 192.0.2.1:80
    +

    If your platform supports it and you want httpd to handle IPv4 and IPv6 connections on separate sockets (i.e., to disable IPv4-mapped @@ -153,9 +158,8 @@

    You only need to set the protocol if you are running on non-standard ports. For example, running an https site on port 8443:

    -

    - Listen 192.170.2.1:8443 https -

    +
    Listen 192.170.2.1:8443 https
    +
    top
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.html.fr b/docs/manual/bind.html.fr index 513a31447be..550934b4455 100644 --- a/docs/manual/bind.html.fr +++ b/docs/manual/bind.html.fr @@ -1,22 +1,27 @@ - -Ecoute slective - Serveur Apache HTTP +Ecoute slective - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    top

    Vue d'ensemble

    @@ -47,7 +52,8 @@ Par dfaut, le serveur coute toutes les adresses de l'hte local. Cependant, on peut lui prciser des ports et des adresses spcifiques couter, ou une combinaison des deux. - Tout ceci est souvent associ avec la fonctionnalit des htes virtuels + Tout ceci est souvent associ avec la fonctionnalit + des htes virtuels qui dtermine la manire dont httpd rpond aux diffrents ports, noms d'htes et adresses IP.

    @@ -67,34 +73,36 @@

    Par exemple, pour faire en sorte que le serveur accepte des connexions sur les ports 80 et 8000, sur toutes les interfaces, utilisez :

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    Pour faire en sorte que le serveur accepte des connexions sur le port 80 pour une interface, et sur le port 8000 pour une autre interface, utilisez :

    -

    - Listen 192.0.2.1:80
    - Listen 192.0.2.5:8000 -

    +
    Listen 192.0.2.1:80
    +Listen 192.0.2.5:8000
    +

    Les adresses IPv6 doivent tre mises entre crochets, comme dans l'exemple suivant :

    -

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 -

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +

    Des directives Listen imbriques provoqueront une erreur fatale qui empchera le serveur de dmarrer.

    - (48)Address already in use: make_sock: could not bind to address [::]:80 + (48)Address already in use: make_sock: could not bind to address [::]:80

    + +

    Voir cette + discussion dans le wiki pour plus de conseils pour rsoudre ce + problme.

    +
    top
    @@ -135,10 +143,9 @@ Listen, comme dans l'exemple suivant :

    -

    - Listen 0.0.0.0:80
    - Listen 192.0.2.1:80 -

    +
    Listen 0.0.0.0:80
    +Listen 192.0.2.1:80
    +

    Si votre plateforme le supporte et si vous souhaitez que httpd gre des connexions IPv4 et IPv6 sur des points de connexion spars @@ -162,9 +169,8 @@ des ports non standards. Par exemple, pour travailler en https sur le port 8443 :

    -

    - Listen 192.170.2.1:8443 https -

    +
    Listen 192.170.2.1:8443 https
    +
    top
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.html.ja.utf8 b/docs/manual/bind.html.ja.utf8 index 786309bb580..fb33a77f47d 100644 --- a/docs/manual/bind.html.ja.utf8 +++ b/docs/manual/bind.html.ja.utf8 @@ -1,40 +1,46 @@ - -バインド - Apache HTTP サーバ +バインド - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    バインド

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache が使用するアドレスとポートの設定をします。

    +

    参照

    top

    概要

    @@ -170,13 +176,34 @@ それにはアクセスできないということに注意してください。

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.html.ko.euc-kr b/docs/manual/bind.html.ko.euc-kr index d48aa5a7aa4..43ba624cbcb 100644 --- a/docs/manual/bind.html.ko.euc-kr +++ b/docs/manual/bind.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ּҿ Ʈ (Binding) - Apache HTTP Server +ּҿ Ʈ (Binding) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ּҿ Ʈ (Binding)

    +Apache > HTTP Server > Documentation > Version 2.4

    ּҿ Ʈ (Binding)

    top

    @@ -147,7 +152,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.html.tr.utf8 b/docs/manual/bind.html.tr.utf8 index 53eea28a846..7b2661d012f 100644 --- a/docs/manual/bind.html.tr.utf8 +++ b/docs/manual/bind.html.tr.utf8 @@ -1,22 +1,27 @@ - -Adresleri ve Portları Dinleme - Apache HTTP Sunucusu +Adresleri ve Portları Dinleme - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Adresleri ve Portları Dinleme

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Adresleri ve Portları Dinleme

    Mevcut Diller:  de  |  en  | @@ -25,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Apache HTTPD sunucusunun belli adresleri ve portları dinlemek üzere yapılandırılması.

    @@ -34,7 +38,7 @@
  • IPv6 Adreslerin Durumu
  • Protokolü Listen ile Belirtme
  • Sanal Konaklarla Nasıl Çalışır?
  • -

    Ayrıca bakınız:

    +

    Ayrıca bakınız:

    top

    Genel Bakış

    @@ -49,7 +53,7 @@ seçilmiş bazı adresleri ya da her ikisini de dinlemesi için bunun belirtilmesi gerekebilir. Bu çoğunlukla, httpd’nin farklı IP adreslerine, konak isimlerine ve portlarına nasıl yanıt vereceğinin - belirlendiği sanal konak özelliği ile birlikte + belirlendiği sanal konak özelliği ile birlikte yürür.

    Listen yönergesi sunucuya @@ -65,26 +69,23 @@

    Örneğin, sunucunun hem 80 portundan hem de 8000 portundan gelen bağlantıları kabul etmesini sağlamak için,

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    yapılandırmasını kullanabilirsiniz. Sunucunun 80 portuna gelen bağlantıları bir arabirimden 8000 portuna gelenleri ise başka bir arabirimden kabul etmesini sağlamak için ise,

    -

    - Listen 192.0.2.1:80
    - Listen 192.0.2.5:8000 -

    +
    Listen 192.0.2.1:80
    +Listen 192.0.2.5:8000
    +

    yapılandırmasını kullanabilirsiniz. IPv6 adresleri aşağıdaki örnekteki gibi köşeli ayraçlar içine alınarak belirtilmelidir:

    -

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 -

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +

    Bir Listen yönergesinin @@ -94,7 +95,11 @@

    (48)Address already in use: make_sock: could not bind to address [::]:80

    -
    + +

    Sorun giderme ile ilgili ipuçları için + wiki + belgesine bakınız.

    +
    top
    @@ -131,10 +136,9 @@ tüm Listen yönergelerinde örnekteki gibi IPv4 adresleri belirtiniz:

    -

    - Listen 0.0.0.0:80
    - Listen 192.0.2.1:80 -

    +
    Listen 0.0.0.0:80
    +Listen 192.0.2.1:80
    +

    Platformunuz IPv4 ve IPv6 adresleri ayrı soketlerden kabul ediyorsa ve httpd’nin de buna uygun davranmasını (yani IPv4 eşlemli IPv6 @@ -156,9 +160,8 @@ gerekir. Örneğin, birhttps sitesini port 8443 üzerinde çalıştırmak isterseniz:

    -

    - Listen 192.170.2.1:8443 https -

    +
    Listen 192.170.2.1:8443 https
    +
    top
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/bind.xml b/docs/manual/bind.xml index f64ced7d974..888ef9387ee 100644 --- a/docs/manual/bind.xml +++ b/docs/manual/bind.xml @@ -51,7 +51,7 @@ it listens to all addresses on the machine. However, it may need to be told to listen on specific ports, or only on selected addresses, or a combination of both. This is often combined with the - Virtual Host feature, which determines how + Virtual Host feature, which determines how httpd responds to different IP addresses, hostnames and ports.

    @@ -72,23 +72,29 @@ port 80 and port 8000, on all interfaces, use:

    - Listen 80
    - Listen 8000 + +Listen 80 +Listen 8000 +

    To make the server accept connections on port 80 for one interface, and port 8000 on another, use

    - Listen 192.0.2.1:80
    - Listen 192.0.2.5:8000 + +Listen 192.0.2.1:80 +Listen 192.0.2.5:8000 +

    IPv6 addresses must be enclosed in square brackets, as in the following example:

    + Listen [2001:db8::a00:20ff:fea7:ccea]:80 +

    Overlapping - (48)Address already in use: make_sock: could not bind to address [::]:80 + (48)Address already in use: make_sock: could not bind to address [::]:80 - + +

    See the + discussion in the wiki for further troubleshooting tips.

    + +
    @@ -137,8 +148,10 @@ following examples:

    - Listen 0.0.0.0:80
    - Listen 192.0.2.1:80 + +Listen 0.0.0.0:80 +Listen 192.0.2.1:80 +

    If your platform supports it and you want httpd to handle IPv4 and @@ -163,7 +176,9 @@ ports. For example, running an https site on port 8443:

    + Listen 192.170.2.1:8443 https + diff --git a/docs/manual/bind.xml.de b/docs/manual/bind.xml.de index 093b711f9cc..0c86f220ff9 100644 --- a/docs/manual/bind.xml.de +++ b/docs/manual/bind.xml.de @@ -1,7 +1,7 @@ - + - + + + + -Caching Guide - Apache HTTP Server +Caching Guide - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Caching Guide

    Available Languages:  en  |  fr  | @@ -29,47 +34,60 @@ proxy serving, while avoiding common problems and misconfigurations.

    +

    See also

    top

    Introduction

    - -

    As of Apache HTTP server version 2.2 mod_cache - and mod_file_cache are no longer marked - experimental and are considered suitable for production use. These - caching architectures provide a powerful means to accelerate HTTP - handling, both as an origin webserver and as a proxy.

    - -

    mod_cache and its provider modules - mod_cache_disk - provide intelligent, HTTP-aware caching. The content itself is stored - in the cache, and mod_cache aims to honor all of the various HTTP - headers and options that control the cachability of content. It can - handle both local and proxied content. mod_cache - is aimed at both simple and complex caching configurations, where - you are dealing with proxied content, dynamic local content or - have a need to speed up access to local files which change with - time.

    - -

    mod_file_cache on the other hand presents a more - basic, but sometimes useful, form of caching. Rather than maintain - the complexity of actively ensuring the cachability of URLs, - mod_file_cache offers file-handle and memory-mapping - tricks to keep a cache of files as they were when httpd was last - started. As such, mod_file_cache is aimed at improving - the access time to local static files which do not change very - often.

    - -

    As mod_file_cache presents a relatively simple - caching implementation, apart from the specific sections on CacheFile and MMapFile, the explanations - in this guide cover the mod_cache caching - architecture.

    + +

    The Apache HTTP server offers a range of caching features that + are designed to improve the performance of the server in various + ways.

    + +
    +
    Three-state RFC2616 HTTP caching
    +
    + mod_cache + and its provider modules + mod_cache_disk + provide intelligent, HTTP-aware caching. The content itself is stored + in the cache, and mod_cache aims to honor all of the various HTTP + headers and options that control the cacheability of content + as described in + Section + 13 of RFC2616. + mod_cache + is aimed at both simple and complex caching configurations, where + you are dealing with proxied content, dynamic local content or + have a need to speed up access to local files on a potentially + slow disk. +
    + +
    Two-state key/value shared object caching
    +
    + The shared object cache API (socache) + and its provider modules provide a + server wide key/value based shared object cache. These modules + are designed to cache low level data such as SSL sessions and + authentication credentials. Backends allow the data to be stored + server wide in shared memory, or datacenter wide in a cache such + as memcache or distcache. +
    + +
    Specialized file caching
    +
    + mod_file_cache + offers the ability to pre-load + files into memory on server startup, and can improve access + times and save file handles on files that are accessed often, + as there is no need to go to disk on each request. +
    +

    To get the most from this document, you should be familiar with the basics of HTTP, and have read the Users' Guides to @@ -78,86 +96,172 @@

    top
    -

    Caching Overview

    +

    Three-state RFC2616 HTTP caching

    - - -

    There are two main stages in mod_cache that can - occur in the lifetime of a request. First, mod_cache - is a URL mapping module, which means that if a URL has been cached, - and the cached version of that URL has not expired, the request will - be served directly by mod_cache.

    - -

    This means that any other stages that might ordinarily happen - in the process of serving a request -- for example being handled - by mod_proxy, or mod_rewrite -- - won't happen. But then this is the point of caching content in - the first place.

    - -

    If the URL is not found within the cache, mod_cache - will add a filter to the request handling. After - httpd has located the content by the usual means, the filter will be run - as the content is served. If the content is determined to be cacheable, - the content will be saved to the cache for future serving.

    - -

    If the URL is found within the cache, but also found to have expired, - the filter is added anyway, but mod_cache will create - a conditional request to the backend, to determine if the cached version - is still current. If the cached version is still current, its - meta-information will be updated and the request will be served from the - cache. If the cached version is no longer current, the cached version - will be deleted and the filter will save the updated content to the cache - as it is served.

    + + +

    The HTTP protocol contains built in support for an in-line caching + mechanism + + described by section 13 of RFC2616, and the + mod_cache module can be used to take advantage of + this.

    + +

    Unlike a simple two state key/value cache where the content + disappears completely when no longer fresh, an HTTP cache includes + a mechanism to retain stale content, and to ask the origin server + whether this stale content has changed and if not, make it fresh + again.

    + +

    An entry in an HTTP cache exists in one of three states:

    + +
    +
    Fresh
    +
    + If the content is new enough (younger than its freshness + lifetime), it is considered fresh. An + HTTP cache is free to serve fresh content without making any + calls to the origin server at all. +
    +
    Stale
    +
    +

    If the content is too old (older than its freshness + lifetime), it is considered stale. An + HTTP cache should contact the origin server and check whether + the content is still fresh before serving stale content to a + client. The origin server will either respond with replacement + content if not still valid, or ideally, the origin server will + respond with a code to tell the cache the content is still + fresh, without the need to generate or send the content again. + The content becomes fresh again and the cycle continues.

    + +

    The HTTP protocol does allow the cache to serve stale data + under certain circumstances, such as when an attempt to freshen + the data with an origin server has failed with a 5xx error, or + when another request is already in the process of freshening + the given entry. In these cases a Warning header + is added to the response.

    +
    +
    Non Existent
    +
    + If the cache gets full, it reserves the option to delete content + from the cache to make space. Content can be deleted at any time, + and can be stale or fresh. The htcacheclean tool can be + run on a once off basis, or deployed as a daemon to keep the size + of the cache within the given size, or the given number of inodes. + The tool attempts to delete stale content before attempting to + delete fresh content. +
    +
    + +

    Full details of how HTTP caching works can be found in + + Section 13 of RFC2616.

    + +

    Interaction with the Server

    + + +

    The mod_cache module hooks into the server in two + possible places depending on the value of the + CacheQuickHandler directive: +

    + +
    +
    Quick handler phase
    +
    +

    This phase happens very early on during the request processing, + just after the request has been parsed. If the content is + found within the cache, it is served immediately and almost + all request processing is bypassed.

    + +

    In this scenario, the cache behaves as if it has been "bolted + on" to the front of the server.

    + +

    This mode offers the best performance, as the majority of + server processing is bypassed. This mode however also bypasses the + authentication and authorization phases of server processing, so + this mode should be chosen with care when this is important.

    + +

    Requests with an "Authorization" header (for example, HTTP Basic + Authentication) are neither cacheable nor served from the cache + when mod_cache is running in this phase.

    +
    +
    Normal handler phase
    +
    +

    This phase happens late in the request processing, after all + the request phases have completed.

    + +

    In this scenario, the cache behaves as if it has been "bolted + on" to the back of the server.

    + +

    This mode offers the most flexibility, as the potential exists + for caching to occur at a precisely controlled point in the filter + chain, and cached content can be filtered or personalized before + being sent to the client.

    +
    +
    + +

    If the URL is not found within the cache, mod_cache + will add a filter to the filter stack in order + to record the response to the cache, and then stand down, allowing normal + request processing to continue. If the content is determined to be + cacheable, the content will be saved to the cache for future serving, + otherwise the content will be ignored.

    + +

    If the content found within the cache is stale, the + mod_cache module converts the request into a + conditional request. If the origin server responds with + a normal response, the normal response is cached, replacing the content + already cached. If the origin server responds with a 304 Not Modified + response, the content is marked as fresh again, and the cached content + is served by the filter instead of saving it.

    +

    Improving Cache Hits

    -

    When caching locally generated content, ensuring that - UseCanonicalName is set to - On can dramatically improve the ratio of cache hits. This - is because the hostname of the virtual-host serving the content forms - a part of the cache key. With the setting set to On +

    When a virtual host is known by one of many different server aliases, + ensuring that UseCanonicalName is + set to On can dramatically improve the ratio of cache hits. + This is because the hostname of the virtual-host serving the content is + used within the cache key. With the setting set to On virtual-hosts with multiple server names or aliases will not produce differently cached entities, and instead content will be cached as per the canonical hostname.

    -

    Because caching is performed within the URL to filename translation - phase, cached documents will only be served in response to URL requests. - Ordinarily this is of little consequence, but there is one circumstance - in which it matters: If you are using Server - Side Includes;

    - -

    -<!-- The following include can be cached -->
    -<!--#include virtual="/footer.html" -->
    -
    -<!-- The following include can not be cached -->
    -<!--#include file="/path/to/footer.html" --> -

    - -

    If you are using Server Side Includes, and want the benefit of speedy - serves from the cache, you should use virtual include - types.

    -

    Expiry Periods

    +

    Freshness Lifetime

    + + +

    Well formed content that is intended to be cached should declare an + explicit freshness lifetime with the Cache-Control + header's max-age or s-maxage fields, or + by including an Expires header.

    +

    At the same time, the origin server defined freshness lifetime can + be overridden by a client when the client presents their own + Cache-Control header within the request. In this case, + the lowest freshness lifetime between request and response wins.

    -

    The default expiry period for cached entities is one hour, however - this can be easily over-ridden by using the CacheDefaultExpire directive. This - default is only used when the original source of the content does not - specify an expire time or time of last modification.

    +

    When this freshness lifetime is missing from the request or the + response, a default freshness lifetime is applied. The default + freshness lifetime for cached entities is one hour, however + this can be easily over-ridden by using the CacheDefaultExpire directive.

    If a response does not include an Expires header but does include a Last-Modified header, mod_cache - can infer an expiry period based on the use of the CacheLastModifiedFactor directive.

    + can infer a freshness lifetime based on a heuristic, which can be + controlled through the use of the CacheLastModifiedFactor directive.

    -

    For local content, mod_expires may be used to - fine-tune the expiry period.

    +

    For local content, or for remote content that does not define its own + Expires header, mod_expires may be used to + fine-tune the freshness lifetime by adding max-age and + Expires.

    -

    The maximum expiry period may also be controlled by using the +

    The maximum freshness lifetime may also be controlled by using the CacheMaxExpire.

    @@ -165,57 +269,60 @@

    A Brief Guide to Conditional Requests

    -

    When content expires from the cache and is re-requested from the - backend or content provider, rather than pass on the original request, - httpd will use a conditional request instead.

    - -

    HTTP offers a number of headers which allow a client, or cache - to discern between different versions of the same content. For - example if a resource was served with an "Etag:" header, it is - possible to make a conditional request with an "If-None-Match:" - header. If a resource was served with a "Last-Modified:" header - it is possible to make a conditional request with an - "If-Modified-Since:" header, and so on.

    - -

    When such a conditional request is made, the response differs - depending on whether the content matches the conditions. If a request is - made with an "If-Modified-Since:" header, and the content has not been - modified since the time indicated in the request then a terse "304 Not - Modified" response is issued.

    - -

    If the content has changed, then it is served as if the request were - not conditional to begin with.

    - -

    The benefits of conditional requests in relation to caching are - twofold. Firstly, when making such a request to the backend, if the - content from the backend matches the content in the store, this can be - determined easily and without the overhead of transferring the entire - resource.

    - -

    Secondly, conditional requests are usually less strenuous on the - backend. For static files, typically all that is involved is a call - to stat() or similar system call, to see if the file has - changed in size or modification time. As such, even if httpd is - caching local content, even expired content may still be served faster - from the cache if it has not changed. As long as reading from the cache - store is faster than reading from the backend (e.g. mod_cache_disk with memory disk - compared to reading from disk).

    +

    When content expires from the cache and becomes stale, rather than + pass on the original request, httpd will modify the request to make + it conditional instead.

    + +

    When an ETag header exists in the original cached + response, mod_cache will add an + If-None-Match header to the request to the origin server. + When a Last-Modified header exists in the original + cached response, mod_cache will add an + If-Modified-Since header to the request to the origin + server. Performing either of these actions makes the request + conditional.

    + +

    When a conditional request is received by an origin server, the + origin server should check whether the ETag or the Last-Modified + parameter has changed, as appropriate for the request. If not, the + origin should respond with a terse "304 Not Modified" response. This + signals to the cache that the stale content is still fresh should be + used for subsequent requests until the content's new freshness lifetime + is reached again.

    + +

    If the content has changed, then the content is served as if the + request were not conditional to begin with.

    + +

    Conditional requests offer two benefits. Firstly, when making such + a request to the origin server, if the content from the origin + matches the content in the cache, this can be determined easily and + without the overhead of transferring the entire resource.

    + +

    Secondly, a well designed origin server will be designed in such + a way that conditional requests will be significantly cheaper to + produce than a full response. For static files, typically all that is + involved is a call to stat() or similar system call, to + see if the file has changed in size or modification time. As such, even + local content may still be served faster from the cache if it has not + changed.

    + +

    Origin servers should make every effort to support conditional + requests as is practical, however if conditional requests are not + supported, the origin will respond as if the request was not + conditional, and the cache will respond as if the content had changed + and save the new content to the cache. In this case, the cache will + behave like a simple two state cache, where content is effectively + either fresh or deleted.

    What Can be Cached?

    -

    As mentioned already, the two styles of caching in httpd work - differently, mod_file_cache caching maintains file - contents as they were when httpd was started. When a request is - made for a file that is cached by this module, it is intercepted - and the cached file is served.

    - -

    mod_cache caching on the other hand is more - complex. When serving a request, if it has not been cached - previously, the caching module will determine if the content - is cacheable. The conditions for determining cachability of - a response are;

    +

    The full definition of which responses can be cached by an HTTP + cache is defined in + + RFC2616 Section 13.4 Response Cacheability, and can be summed up as + follows:

    1. Caching must be enabled for this URL. See the CacheEnable and CacheDisable directives.
    2. @@ -225,12 +332,9 @@
    3. The request must be a HTTP GET request.
    4. -
    5. If the request contains an "Authorization:" header, the response - will not be cached.
    6. -
    7. If the response contains an "Authorization:" header, it must also contain an "s-maxage", "must-revalidate" or "public" option - in the "Cache-Control:" header.
    8. + in the "Cache-Control:" header, or it won't be cached.
    9. If the URL included a query string (e.g. from a HTML form GET method) it will not be cached unless the response specifies an @@ -263,28 +367,41 @@

      What Should Not be Cached?

      -

      In short, any content which is highly time-sensitive, or which varies - depending on the particulars of the request that are not covered by - HTTP negotiation, should not be cached.

      +

      It should be up to the client creating the request, or the origin + server constructing the response to decide whether or not the content + should be cacheable or not by correctly setting the + Cache-Control header, and mod_cache should + be left alone to honor the wishes of the client or server as appropriate. +

      + +

      Content that is time sensitive, or which varies depending on the + particulars of the request that are not covered by HTTP negotiation, + should not be cached. This content should declare itself uncacheable + using the Cache-Control header.

      + +

      If content changes often, expressed by a freshness lifetime of minutes + or seconds, the content can still be cached, however it is highly + desirable that the origin server supports + conditional requests correctly to ensure that + full responses do not have to be generated on a regular basis.

      -

      If you have dynamic content which changes depending on the IP address - of the requester, or changes every 5 minutes, it should almost certainly - not be cached.

      +

      Content that varies based on client provided request headers can be + cached through intelligent use of the Vary response + header.

      -

      If on the other hand, the content served differs depending on the - values of various HTTP headers, it might be possible - to cache it intelligently through the use of a "Vary" header.

      Variable/Negotiated Content

      -

      If a response with a "Vary" header is received by - mod_cache when requesting content by the backend it - will attempt to handle it intelligently. If possible, - mod_cache will detect the headers attributed in the - "Vary" response in future requests and serve the correct cached - response.

      +

      When the origin server is designed to respond with different content + based on the value of headers in the request, for example to serve + multiple languages at the same URL, HTTP's caching mechanism makes it + possible to cache multiple variants of the same page at the same URL.

      + +

      This is done by the origin server adding a Vary header + to indicate which headers must be taken into account by a cache when + determining whether two variants are different from one another.

      If for example, a response is received with a vary header such as;

      @@ -295,244 +412,43 @@ Vary: negotiate,accept-language,accept-charset

      mod_cache will only serve the cached content to requesters with accept-language and accept-charset headers matching those of the original request.

      - -
    top
    -
    -

    Security Considerations

    - - -

    Authorization and Access Control

    - -

    Using mod_cache is very much like having a built - in reverse-proxy. Requests will be served by the caching module unless - it determines that the backend should be queried. When caching local - resources, this drastically changes the security model of httpd.

    - -

    As traversing a filesystem hierarchy to examine potential - .htaccess files would be a very expensive operation, - partially defeating the point of caching (to speed up requests), - mod_cache makes no decision about whether a cached - entity is authorised for serving. In other words; if - mod_cache has cached some content, it will be served - from the cache as long as that content has not expired.

    - -

    If, for example, your configuration permits access to a resource by IP - address you should ensure that this content is not cached. You can do this - by using the CacheDisable - directive, or mod_expires. Left unchecked, - mod_cache - very much like a reverse proxy - would cache - the content when served and then serve it to any client, on any IP - address.

    - - -

    Local exploits

    - - -

    As requests to end-users can be served from the cache, the cache - itself can become a target for those wishing to deface or interfere with - content. It is important to bear in mind that the cache must at all - times be writable by the user which httpd is running as. This is in - stark contrast to the usually recommended situation of maintaining - all content unwritable by the Apache user.

    - -

    If the Apache user is compromised, for example through a flaw in - a CGI process, it is possible that the cache may be targeted. When - using mod_cache_disk, it is relatively easy to - insert or modify a cached entity.

    - -

    This presents a somewhat elevated risk in comparison to the other - types of attack it is possible to make as the Apache user. If you are - using mod_cache_disk you should bear this in mind - - ensure you upgrade httpd when security upgrades are announced and - run CGI processes as a non-Apache user using suEXEC if possible.

    - +

    Multiple variants of the content can be cached side by side, + mod_cache uses the Vary header and the + corresponding values of the request headers listed by Vary + to decide on which of many variants to return to the client.

    -

    Cache Poisoning

    - - -

    When running httpd as a caching proxy server, there is also the - potential for so-called cache poisoning. Cache Poisoning is a broad - term for attacks in which an attacker causes the proxy server to - retrieve incorrect (and usually undesirable) content from the backend. -

    - -

    For example if the DNS servers used by your system running - httpd - are vulnerable to DNS cache poisoning, an attacker may be able to control - where httpd connects to when requesting content from the origin server. - Another example is so-called HTTP request-smuggling attacks.

    - -

    This document is not the correct place for an in-depth discussion - of HTTP request smuggling (instead, try your favourite search engine) - however it is important to be aware that it is possible to make - a series of requests, and to exploit a vulnerability on an origin - webserver such that the attacker can entirely control the content - retrieved by the proxy.

    -
    top
    -

    File-Handle Caching

    - - - - -

    The act of opening a file can itself be a source of delay, particularly - on network filesystems. By maintaining a cache of open file descriptors - for commonly served files, httpd can avoid this delay. Currently - httpd - provides one implementation of File-Handle Caching.

    - -

    CacheFile

    - - -

    The most basic form of caching present in httpd is the file-handle - caching provided by mod_file_cache. Rather than caching - file-contents, this cache maintains a table of open file descriptors. Files - to be cached in this manner are specified in the configuration file using - the CacheFile - directive.

    +

    Cache Setup Examples

    -

    The - CacheFile directive - instructs httpd to open the file when it is started and to re-use - this file-handle for all subsequent access to this file.

    - -

    - CacheFile /usr/local/apache2/htdocs/index.html -

    - -

    If you intend to cache a large number of files in this manner, you - must ensure that your operating system's limit for the number of open - files is set appropriately.

    - -

    Although using CacheFile - does not cause the file-contents to be cached per-se, it does mean - that if the file changes while httpd is running these changes will - not be picked up. The file will be consistently served as it was - when httpd was started.

    - -

    If the file is removed while httpd is running, it will continue - to maintain an open file descriptor and serve the file as it was when - httpd was started. This usually also means that although the file - will have been deleted, and not show up on the filesystem, extra free - space will not be recovered until httpd is stopped and the file - descriptor closed.

    -
    top
    -
    -

    In-Memory Caching

    - + - - -

    Serving directly from system memory is universally the fastest method - of serving content. Reading files from a disk controller or, even worse, - from a remote network is orders of magnitude slower. Disk controllers - usually involve physical processes, and network access is limited by - your available bandwidth. Memory access on the other hand can take mere - nano-seconds.

    - -

    System memory isn't cheap though, byte for byte it's by far the most - expensive type of storage and it's important to ensure that it is used - efficiently. By caching files in memory you decrease the amount of - memory available on the system. As we'll see, in the case of operating - system caching, this is not so much of an issue, but when using - httpd's own in-memory caching it is important to make sure that you - do not allocate too much memory to a cache. Otherwise the system - will be forced to swap out memory, which will likely degrade - performance.

    - -

    Operating System Caching

    +

    Caching to Disk

    -

    Almost all modern operating systems cache file-data in memory managed - directly by the kernel. This is a powerful feature, and for the most - part operating systems get it right. For example, on Linux, let's look at - the difference in the time it takes to read a file for the first time - and the second time;

    +

    The mod_cache module relies on specific backend store + implementations in order to manage the cache, and for caching to disk + mod_cache_disk is provided to support this.

    -
    -colm@coroebus:~$ time cat testfile > /dev/null
    -real    0m0.065s
    -user    0m0.000s
    -sys     0m0.001s
    -colm@coroebus:~$ time cat testfile > /dev/null
    -real    0m0.003s
    -user    0m0.003s
    -sys     0m0.000s
    +

    Typically the module will be configured as so;

    -

    Even for this small file, there is a huge difference in the amount - of time it takes to read the file. This is because the kernel has cached - the file contents in memory.

    +
    CacheRoot   "/var/cache/apache/"
    +CacheEnable disk /
    +CacheDirLevels 2
    +CacheDirLength 1
    -

    By ensuring there is "spare" memory on your system, you can ensure - that more and more file-contents will be stored in this cache. This - can be a very efficient means of in-memory caching, and involves no - extra configuration of httpd at all.

    - -

    Additionally, because the operating system knows when files are - deleted or modified, it can automatically remove file contents from the - cache when necessary. This is a big advantage over httpd's in-memory - caching which has no way of knowing when a file has changed.

    - -

    Despite the performance and advantages of automatic operating system - caching there are some circumstances in which in-memory caching may be - better performed by httpd.

    +

    Importantly, as the cached files are locally stored, operating system + in-memory caching will typically be applied to their access also. So + although the files are stored on disk, if they are frequently accessed + it is likely the operating system will ensure that they are actually + served from memory.

    -

    MMapFile Caching

    - - -

    mod_file_cache provides the - MMapFile directive, which - allows you to have httpd map a static file's contents into memory at - start time (using the mmap system call). httpd will use the in-memory - contents for all subsequent accesses to this file.

    - -

    - MMapFile /usr/local/apache2/htdocs/index.html -

    - -

    As with the - CacheFile directive, any - changes in these files will not be picked up by httpd after it has - started.

    - -

    The MMapFile - directive does not keep track of how much memory it allocates, so - you must ensure not to over-use the directive. Each httpd child - process will replicate this memory, so it is critically important - to ensure that the files mapped are not so large as to cause the - system to swap memory.

    -
    top
    -
    -

    Disk-based Caching

    - - - - -

    mod_cache_disk provides a disk-based caching mechanism - for mod_cache. This cache is intelligent and content will - be served from the cache only as long as it is considered valid.

    - -

    Typically the module will be configured as so;

    - -

    -CacheRoot /var/cache/apache/
    -CacheEnable disk /
    -CacheDirLevels 2
    -CacheDirLength 1 -

    - -

    Importantly, as the cached files are locally stored, operating system - in-memory caching will typically be applied to their access also. So - although the files are stored on disk, if they are frequently accessed - it is likely the operating system will ensure that they are actually - served from memory.

    Understanding the Cache-Store

    @@ -540,7 +456,8 @@ CacheDirLength 1

    To store items in the cache, mod_cache_disk creates a 22 character hash of the URL being requested. This hash incorporates the hostname, protocol, port, path and any CGI arguments to the URL, - to ensure that multiple URLs do not collide.

    + as well as elements defined by the Vary header to ensure that multiple + URLs do not collide with one another.

    Each character may be any one of 64-different characters, which mean that overall there are 64^22 possible hashes. For example, a URL might @@ -592,13 +509,13 @@ CacheDirLength 1

    Maintaining the Disk Cache

    -

    Although mod_cache_disk will remove cached content - as it is expired, it does not maintain any information on the total - size of the cache or how little free space may be left.

    +

    The mod_cache_disk module makes no attempt to + regulate the amount of disk space used by the cache, although it + will gracefully stand down on any disk error and behave as if the + cache was never present.

    -

    Instead, provided with httpd is the htcacheclean tool which, as the name - suggests, allows you to clean the cache periodically. Determining - how frequently to run htcacheclean and what target size to +

    Instead, provided with httpd is the htcacheclean tool which allows you + to clean the cache periodically. Determining how frequently to run htcacheclean and what target size to use for the cache is somewhat complex and trial and error may be needed to select optimal values.

    @@ -608,6 +525,10 @@ CacheDirLength 1 or more to process very large (tens of gigabytes) caches and if you are running it from cron it is recommended that you determine how long a typical run takes, to avoid running more than one instance at a time.

    + +

    It is also recommended that an appropriate "nice" level is chosen for + htcacheclean so that the tool does not cause excessive disk io while the + server is running.


    @@ -620,12 +541,367 @@ CacheDirLength 1 leave enough "grow room" following a clean.

    +

    Caching to memcached

    + + +

    Using the mod_cache_socache module, mod_cache + can cache data from a variety of implementations (aka: "providers"). Using the + mod_socache_memcache module, for example, one can specify that + memcached is to be used as the + the backend storage mechanism.

    + +

    Typically the module will be configured as so:

    + +
    CacheEnable socache /
    +CacheSocache memcache:memcd.example.com:11211
    + + +

    Additional memcached servers can be specified by + appending them to the end of the CacheSocache memcache: + line separated by commas:

    + +
    CacheEnable socache /
    +CacheSocache memcache:mem1.example.com:11211,mem2.example.com:11212
    + + +

    This format is also used with the other various mod_cache_socache + providers. For example:

    + +
    CacheEnable socache /
    +CacheSocache shmcb:/path/to/datafile(512000)
    + + +
    CacheEnable socache /
    +CacheSocache dbm:/path/to/datafile
    + + + + +
    top
    +
    +

    General Two-state Key/Value Shared Object Caching

    + + + + + +

    The Apache HTTP server offers a low level shared object cache for + caching information such as SSL sessions, or authentication credentials, + within the socache interface.

    + +

    Additional modules are provided for each implementation, offering the + following backends:

    + +
    +
    mod_socache_dbm
    +
    DBM based shared object cache.
    +
    mod_socache_dc
    +
    Distcache based shared object cache.
    +
    mod_socache_memcache
    +
    Memcache based shared object cache.
    +
    mod_socache_shmcb
    +
    Shared memory based shared object cache.
    +
    + +

    Caching Authentication Credentials

    + + + + +

    The mod_authn_socache module allows the result of + authentication to be cached, relieving load on authentication backends.

    + + + +

    Caching SSL Sessions

    + + + + +

    The mod_ssl module uses the socache interface + to provide a session cache and a stapling cache.

    + + + +
    top
    +
    +

    Specialized File Caching

    + + + + + +

    On platforms where a filesystem might be slow, or where file + handles are expensive, the option exists to pre-load files into + memory on startup.

    + +

    On systems where opening files is slow, the option exists to + open the file on startup and cache the file handle. These + options can help on systems where access to static files is + slow.

    + +

    File-Handle Caching

    + + +

    The act of opening a file can itself be a source of delay, particularly + on network filesystems. By maintaining a cache of open file descriptors + for commonly served files, httpd can avoid this delay. Currently httpd + provides one implementation of File-Handle Caching.

    + +

    CacheFile

    + + +

    The most basic form of caching present in httpd is the file-handle + caching provided by mod_file_cache. Rather than caching + file-contents, this cache maintains a table of open file descriptors. Files + to be cached in this manner are specified in the configuration file using + the CacheFile + directive.

    + +

    The + CacheFile directive + instructs httpd to open the file when it is started and to re-use + this file-handle for all subsequent access to this file.

    + +
    CacheFile /usr/local/apache2/htdocs/index.html
    + + +

    If you intend to cache a large number of files in this manner, you + must ensure that your operating system's limit for the number of open + files is set appropriately.

    + +

    Although using CacheFile + does not cause the file-contents to be cached per-se, it does mean + that if the file changes while httpd is running these changes will + not be picked up. The file will be consistently served as it was + when httpd was started.

    + +

    If the file is removed while httpd is running, it will continue + to maintain an open file descriptor and serve the file as it was when + httpd was started. This usually also means that although the file + will have been deleted, and not show up on the filesystem, extra free + space will not be recovered until httpd is stopped and the file + descriptor closed.

    + + + + +

    In-Memory Caching

    + + +

    Serving directly from system memory is universally the fastest method + of serving content. Reading files from a disk controller or, even worse, + from a remote network is orders of magnitude slower. Disk controllers + usually involve physical processes, and network access is limited by + your available bandwidth. Memory access on the other hand can take mere + nano-seconds.

    + +

    System memory isn't cheap though, byte for byte it's by far the most + expensive type of storage and it's important to ensure that it is used + efficiently. By caching files in memory you decrease the amount of + memory available on the system. As we'll see, in the case of operating + system caching, this is not so much of an issue, but when using + httpd's own in-memory caching it is important to make sure that you + do not allocate too much memory to a cache. Otherwise the system + will be forced to swap out memory, which will likely degrade + performance.

    + +

    Operating System Caching

    + + +

    Almost all modern operating systems cache file-data in memory managed + directly by the kernel. This is a powerful feature, and for the most + part operating systems get it right. For example, on Linux, let's look at + the difference in the time it takes to read a file for the first time + and the second time;

    + +
    colm@coroebus:~$ time cat testfile > /dev/null
    +real    0m0.065s
    +user    0m0.000s
    +sys     0m0.001s
    +colm@coroebus:~$ time cat testfile > /dev/null
    +real    0m0.003s
    +user    0m0.003s
    +sys     0m0.000s
    + +

    Even for this small file, there is a huge difference in the amount + of time it takes to read the file. This is because the kernel has cached + the file contents in memory.

    + +

    By ensuring there is "spare" memory on your system, you can ensure + that more and more file-contents will be stored in this cache. This + can be a very efficient means of in-memory caching, and involves no + extra configuration of httpd at all.

    + +

    Additionally, because the operating system knows when files are + deleted or modified, it can automatically remove file contents from the + cache when necessary. This is a big advantage over httpd's in-memory + caching which has no way of knowing when a file has changed.

    + + +

    Despite the performance and advantages of automatic operating system + caching there are some circumstances in which in-memory caching may be + better performed by httpd.

    + +

    MMapFile Caching

    + + +

    mod_file_cache provides the + MMapFile directive, which + allows you to have httpd map a static file's contents into memory at + start time (using the mmap system call). httpd will use the in-memory + contents for all subsequent accesses to this file.

    + +
    MMapFile /usr/local/apache2/htdocs/index.html
    + + +

    As with the + CacheFile directive, any + changes in these files will not be picked up by httpd after it has + started.

    + +

    The MMapFile + directive does not keep track of how much memory it allocates, so + you must ensure not to over-use the directive. Each httpd child + process will replicate this memory, so it is critically important + to ensure that the files mapped are not so large as to cause the + system to swap memory.

    + + + +
    top
    +
    +

    Security Considerations

    + + +

    Authorization and Access Control

    + + +

    Using mod_cache in its default state where + CacheQuickHandler is set to + On is very much like having a caching reverse-proxy bolted + to the front of the server. Requests will be served by the caching module + unless it determines that the origin server should be queried just as an + external cache would, and this drastically changes the security model of + httpd.

    + +

    As traversing a filesystem hierarchy to examine potential + .htaccess files would be a very expensive operation, + partially defeating the point of caching (to speed up requests), + mod_cache makes no decision about whether a cached + entity is authorised for serving. In other words; if + mod_cache has cached some content, it will be served + from the cache as long as that content has not expired.

    + +

    If, for example, your configuration permits access to a resource by IP + address you should ensure that this content is not cached. You can do this + by using the CacheDisable + directive, or mod_expires. Left unchecked, + mod_cache - very much like a reverse proxy - would cache + the content when served and then serve it to any client, on any IP + address.

    + +

    When the CacheQuickHandler + directive is set to Off, the full set of request processing + phases are executed and the security model remains unchanged.

    + + +

    Local exploits

    + + +

    As requests to end-users can be served from the cache, the cache + itself can become a target for those wishing to deface or interfere with + content. It is important to bear in mind that the cache must at all + times be writable by the user which httpd is running as. This is in + stark contrast to the usually recommended situation of maintaining + all content unwritable by the Apache user.

    + +

    If the Apache user is compromised, for example through a flaw in + a CGI process, it is possible that the cache may be targeted. When + using mod_cache_disk, it is relatively easy to + insert or modify a cached entity.

    + +

    This presents a somewhat elevated risk in comparison to the other + types of attack it is possible to make as the Apache user. If you are + using mod_cache_disk you should bear this in mind - + ensure you upgrade httpd when security upgrades are announced and + run CGI processes as a non-Apache user using suEXEC if possible.

    + + + +

    Cache Poisoning

    + + +

    When running httpd as a caching proxy server, there is also the + potential for so-called cache poisoning. Cache Poisoning is a broad + term for attacks in which an attacker causes the proxy server to + retrieve incorrect (and usually undesirable) content from the origin + server.

    + +

    For example if the DNS servers used by your system running httpd + are vulnerable to DNS cache poisoning, an attacker may be able to control + where httpd connects to when requesting content from the origin server. + Another example is so-called HTTP request-smuggling attacks.

    + +

    This document is not the correct place for an in-depth discussion + of HTTP request smuggling (instead, try your favourite search engine) + however it is important to be aware that it is possible to make + a series of requests, and to exploit a vulnerability on an origin + webserver such that the attacker can entirely control the content + retrieved by the proxy.

    + + +

    Denial of Service / Cachebusting

    + + +

    The Vary mechanism allows multiple variants of the same URL to be + cached side by side. Depending on header values provided by the client, + the cache will select the correct variant to return to the client. This + mechanism can become a problem when an attempt is made to vary on a + header that is known to contain a wide range of possible values under + normal use, for example the User-Agent header. Depending + on the popularity of the particular web site thousands or millions of + duplicate cache entries could be created for the same URL, crowding + out other entries in the cache.

    + +

    In other cases, there may be a need to change the URL of a particular + resource on every request, usually by adding a "cachebuster" string to + the URL. If this content is declared cacheable by a server for a + significant freshness lifetime, these entries can crowd out + legitimate entries in a cache. While mod_cache + provides a + CacheIgnoreURLSessionIdentifiers + directive, this directive should be used with care to ensure that + downstream proxy or browser caches aren't subjected to the same denial + of service issue.

    +

    Available Languages:  en  |  fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/caching.html.fr b/docs/manual/caching.html.fr index bad0d62b4ad..3f368da5be8 100644 --- a/docs/manual/caching.html.fr +++ b/docs/manual/caching.html.fr @@ -1,22 +1,27 @@ - -Guide de la mise en cache - Serveur Apache HTTP +Guide de la mise en cache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Guide de la mise en cache

    +Apache > Serveur HTTP > Documentation > Version 2.4
    top

    Introduction

    -

    Depuis la version 2.2 du serveur HTTP Apache, les modules - mod_cache - et mod_file_cache ne sont plus jugs exprimentaux - et on considre qu'ils peuvent tre utiliss en production. Ces - architectures de mise en cache constituent un puissant concept - d'acclration de la gestion HTTP, tant comme serveur web originel - que comme mandataire.

    - -

    Le module mod_cache et son module de soutien - mod_cache_disk - permettent une mise en cache intelligente du point de vue HTTP. - Le contenu proprement dit est stock dans le cache, - et mod_cache tente d'honorer tous les en-ttes HTTP et les options - qui dfinissent la possibilit de mise en cache du contenu. Il gre non - seulement le contenu local, mais aussi le contenu mandat. - mod_cache - est conu pour des configurations de mise en cache simples ou complexes, - dans lesquels vous traitez de contenu mandat, de contenu local dynamique - ou avez besoin d'acclrer l'accs des fichiers locaux qui sont modifis - au cours du temps.

    - -

    Le module mod_file_cache quant lui, constitue une - forme de mise en cache plus basique, mais quelques fois intressante. - Plutt que de grer la complexit de s'assurer de manire active de la - possibilit de mise en cache d'URLs, - mod_file_cache fournit des mthodes pour la gestion - et l'dition de fichiers en mmoire afin de maintenir un cache de fichiers - dans l'tat o ils taient la dernire - fois qu'httpd a dmarr. - En tant que tel, mod_file_cache a t conu pour amliorer - le temps d'accs des fichiers locaux statiques qui ne sont modifis - que rarement.

    - -

    Etant donn que mod_file_cache constitue une - implmentation de mise en cache relativement simple, mises part les - sections spcifiques sur les directives CacheFile et MMapFile, les explications fournies - dans ce guide concernent l'architecture de mise en cache du - module mod_cache.

    +

    Le serveur HTTP Apache offre tout un ensemble de fonctionnalits + de mise en cache qui ont t conues pour amliorer les performances + du serveur de diffrentes manires.

    + +
    +
    Mise en cache HTTP trois tats RFC2616
    +
    mod_cache et son module de fournisseur + mod_cache_disk proposent une mise en cache + intelligente de niveau HTTP. Le contenu proprement dit est + stock dans le cache, et mod_cache vise respecter tous les + en-ttes HTTP, ainsi que les options qui contrlent la mise en + cache du contenu comme dcrit dans la Section + 13 de la RFC2616. mod_cache peut grer des + configurations de mise en cache simples, mais aussi complexes + comme dans les cas o vous avez faire des contenus mandats, + des contenus locaux dynamiques, ou lorsque vous avez besoin + d'acclrer l'accs aux fichiers locaux situs sur disque + suppos lent. +
    + +
    Mise en cache d'objets partags de forme cl/valeur deux + tats
    +
    + L'API du cache d'objets partags (socache) + et ses modules de fournisseurs + proposent une mise en cache d'objets partags base de + couples cl/valeur de niveau serveur. Ces modules sont + conus pour la mise en cache de donnes de bas niveau comme + les sessions SSL et les donnes d'authentification. les + serveurs d'arrire-plan permettent le stockage des donnes + au niveau serveur en mmoire partage, ou au niveau + datacenter dans un cache comme memcache ou distcache. +
    + +
    Mise en cache de fichiers spcialise
    +
    + mod_file_cache offre la possibilit de + prcharger des fichiers en mmoire au dmarrage du serveur, + et peut amliorer les temps d'accs et sauvegarder les + gestionnaires de fichiers pour les fichiers qui font l'objet + d'accs frquents, vitant ainsi d'avoir accder au disque + chaque requte. +
    +

    Pour tirer parti efficacement de ce document, les bases de HTTP doivent vous tre familires, et vous devez avoir lu les sections @@ -91,96 +103,190 @@

    top
    -

    Vue d'ensemble de la mise en cache

    +

    Mise en cache HTTP trois tats RFC2616

    - - -

    mod_cache peut faire intervenir deux phases - principales pendant la dure de vie d'une requte. - En premier lieu, mod_cache - est un module de mise en correspondance d'URLs, ce qui signifie que si - une URL a t mise en cache, et que la version du cache de cette URL n'est - pas arrive expiration, la requte sera traite directement par - mod_cache.

    - -

    Ceci entrane que toutes autres actions qui se drouleraient normalement - au cours du processus de traitement d'une requte -- par exemple un - traitement effectu par mod_proxy, ou - mod_rewrite -- - ne seront pas effectues. Mais c'est justement l'intrt - de la mise en cache pralable du contenu.

    - -

    Si l'URL ne se trouve pas dans le cache, mod_cache - va ajouter un filtre au traitement de la requte. - Une fois le contenu localis par httpd selon la conception courante, le - filtre sera excut en mme temps que le contenu sera servi. - S'il est dtermin que le contenu peut tre mis en cache, - il sera sauvegard dans le cache pour une utilisation future.

    - -

    Si l'URL se trouve dans le cache, mais est arrive expiration, - le filtre est quand-mme ajout, mais mod_cache va crer - une requte conditionnelle en arrire-plan, pour dterminer si la version - du cache est encore jour. Si la version du cache est encore jour, ses - meta-informations seront mises jour et la requte sera servie partir du - cache. Si la version du contenu n'est plus jour, elle sera supprime et le - filtre va sauvegarder le contenu mis jour dans le cache - au moment o il sera servi.

    + + +

    Le module mod_cache permet de tirer avantage du + mcanisme de mise en cache en ligne faisant partie + intgrante du protocole HTTP, et dcrit dans la section + 13 de la RFC2616.

    + +

    A la diffrence d'un cache simple cl/valeur deux tats o le + contenu est supprim lorsqu'il est prim, un cache HTTP comporte un + mcanisme permettant de conserver temporairement un contenu prim, + de demander au serveur original si ce contenu prim a t modifi, + et dans le cas contraire de le rendre nouveau valide.

    + +

    Une entre d'un cache HTTP peut se prsenter sous un de ces trois + tats :

    + +
    +
    Frais
    +
    + Si un contenu est suffisamment rcent (plus jeune que sa + dure de fracheur), il est considr comme + frais. Un cache HTTP peut servir un contenu + frais sans avoir demander quoi que ce soit au serveur + d'origine. +
    +
    Prim
    +
    +

    Si le contenu est trop ancien (plus vieux que sa + dure de fracheur), il est considr comme + prim. Un cache HTTP doit contacter le serveur + original pour vrifier si le contenu, mme s'il est prim, est + encore jour avant de le servir au client. Soit le serveur + original va rpondre en envoyant un contenu de remplacement si + le contenu prim n'est plus jour, soit dans le cas idal il + renverra un code pour signaler au cache que le contenu est + encore jour, et qu'il est inutile de le gnrer ou de + l'envoyer nouveau. Le contenu repasse l'tat "frais" et le + cycle continue.

    + +

    Le protocole HTTP permet au cache de servir des donnes + primes dans certaines circonstances, comme lorsqu'une + tentative de rafrachir une entre depuis un serveur original + se solde par un chec avec un code d'erreur 5xx, ou lorsqu'une + autre requte est dj en train d'essayer de rafrachir la mme + entre. Dans ces cas, un en-tte Warning est ajout + la rponse.

    +
    +
    Non Existent
    +
    + Si le cache est plein, il se rserve la possibilit de supprimer + des entres pour faire de la place. Une entre peut tre + supprime tout moment, qu'elle soit frache ou prime. + L'outil htcacheclean + peut tre utilis la demande, ou lanc en tant que dmon afin + de conserver la taille du cache ou le nombre d'inodes en de de + valeurs spcifies. Cet outil essaie cependant de + supprimer les entres primes avant les entres fraches. +
    +
    + +

    Le fonctionnement dtaill d'un cache HTTP est dcrit dans la Section + 13 de la RFC2616.

    + +

    Interaction avec le serveur

    + + +

    Le module mod_cache interagit avec le serveur + deux niveaux possibles en fonction de la directive CacheQuickHandler : +

    + +
    +
    Phase de gestion rapide
    +
    +

    Cette phase se droule trs tt au cours du traitement de + la requte, juste aprs l'interprtation de cette dernire. Si + le contenu se trouve dans le cache, il est servi immdiatement + et pratiquement tout le reste du traitement de la requte est + court-circuit.

    + +

    Dans ce scnario, le cache se comporte comme s'il avait + t "boulonn" l'entre du serveur.

    + +

    Ce mode possde les meilleures performances car la + majorit des traitements au niveau du serveur sont + court-circuits. Cependant, il court-circuite aussi les + phases d'authentification et d'autorisation du traitement + au niveau du serveur, et il doit donc tre utilis avec + prudence lorsque que ces phases sont importantes.

    + +

    Les requtes comportant un en-tte "Authorization" + (comme par exemple l'authentification HTTP basique) ne + peuvent tre ni mises en cache, ni servies depuis ce + dernier lorsque mod_cache s'excute dans + cette phase.

    +
    +
    Phase de gestion normale
    +
    +

    Cette phase se droule trs tard au cours du traitement + de la requte, en fait aprs toutes les phases de ce + traitement.

    + +

    Dans ce scnario, le cache se comporte comme s'il avait + t "boulonn" la sortie du serveur.

    + +

    Ce mode offre la plus grande souplesse, car il permet + de faire intervenir la mise en cache en un point + prcisment spcifi de la chane de filtrage, et le + contenu issu du cache peut tre filtr ou personnalis + avant d'tre servi au client.

    +
    +
    + +

    Si l'URL ne se trouve pas dans le cache, + mod_cache ajoutera un filtre la chane de filtrage afin + d'enregistrer la rponse dans le cache, puis passera la main + pour permettre le droulement normal de la suite du traitement + de la requte. Si la mise en cache du contenu est autorise, il + sera enregistr dans le cache pour pouvoir tre servi nouveau + ; dans le cas contraire, le contenu sera ignor.

    + +

    Si le contenu trouv dans le cache est prim, le module + mod_cache convertit la requte en + requte conditionnelle. Si le serveur original + renvoie une rponse normale, elle est enregistre dans le cache + en lieu et place du contenu prim. Si le serveur original + renvoie une rponse "304 Not Modified", le contenu repasse + l'tat "frais" et est servi par le filtre au lieu d'tre + sauvegard.

    +

    Amlioration du taux de prsence dans le cache

    -

    Lors de la mise en cache de contenu gnr localement, le - positionnement de la directive +

    Lorsqu'un serveur virtuel est connu sous la forme d'un des + nombreux alias du serveur, la dfinition de la directive UseCanonicalName - On peut amliorer de manire spectaculaire le taux de - prsence dans le cache. Ceci est du au fait que le nom d'hte de l'hte - virtuel qui sert le contenu constitue une partie de la cl de cache. + On peut augmenter de manire significative le nombre + de correspondances positives dans le cache. Ceci est du au fait + que la cl du cache contient le nom d'hte du serveur virtuel. Avec UseCanonicalName positionne On, les htes virtuels possdant plusieurs noms de serveur ou alias ne gnreront pas d'entits de cache diffrentes, et le contenu sera mis en cache en faisant rfrence au nom d'hte canonique.

    -

    Les documents mis en cache ne seront servis qu'en rponse des - requtes de type URL, car la mise en cache est effectue lors de la phase - de traduction de l'URL en nom de fichier. - En gnral, cela n'a que peu d'effet, moins que vous n'utilisiez les - Inclusions Ct Serveur (SSI);

    - -

    -<!-- L'inclusion suivante peut tre mise en cache -->
    -<!--#include virtual="/footer.html" -->
    -
    -<!-- L'inclusion suivante ne peut pas tre mise en cache -->
    -<!--#include file="/path/to/footer.html" -->
    -

    - -

    Si vous utilisez les SSI, et voulez bnficier de la vitesse de - service depuis le cache, vous devez utiliser des inclusions de type - virtual.

    -

    Priodes d'expiration

    +

    Dure de fracheur

    -

    La priode d'expiration par dfaut pour les entits du cache est - d'une heure; elle peut cependant tre facilement modifie l'aide de - la directive CacheDefaultExpire. Cette valeur par - dfaut n'est utilise que lorsque la source originale du contenu ne - prcise pas de priode d'expiration ou d'heure de dernire - modification.

    +

    Un contenu bien form destin tre mis en cache doit dclarer + explicitement une dure de fracheur via les champs + max-age ou s-maxage de l'en-tte + Cache-Control, ou en incluant un en-tte + Expires.

    + +

    De plus, un client peut passer outre la dure de fracheur + dfinie pour le serveur original en ajoutant son propre en-tte + Cache-Control la requte. Dans ce cas, c'est la + dure de fracheur la plus basse entre la requte et la rponse + qui l'emporte.

    + +

    Lorsque cette dure de fracheur est absente de la requte ou + de la rponse, une dure de fracheur par dfaut s'applique. La + dure de fracheur par dfaut des entres du cache est d'une heure + ; elle peut cependant tre facilement modifie l'aide de + la directive CacheDefaultExpire.

    Si une rponse ne contient pas d'en-tte Expires mais inclut un en-tte Last-Modified, mod_cache - peut dduire une priode d'expiration en se basant sur la valeur de la - directive CacheLastModifiedFactor.

    + peut dduire une dure de fracheur en se basant sur une + heuristique, qui peut tre contrle via la directive CacheLastModifiedFactor.

    -

    La priode d'expiration des contenus locaux peut tre ajuste finement - en utilisant le module mod_expires.

    +

    Pour les contenus locaux, ou les contenus distants qui ne + spcifient pas leur propre en-tte Expires, + mod_expires permet de rgler finement la dure de + fracheur via les paramtres max-age et + Expires.

    -

    On peut aussi contrler la priode d'expiration maximale en utilisant +

    On peut aussi contrler la dure de fracheur maximale en utilisant la directive CacheMaxExpire.

    @@ -188,64 +294,61 @@

    Guide succinct des requtes conditionnelles

    -

    Lorsqu'un contenu est arriv expiration dans le cache et fait - l'objet d'une nouvelle demande d'accs, plutt que traiter directement - la requte originale, httpd prfre utiliser une - requte conditionnelle.

    - -

    HTTP propose toute une panoplie d'en-ttes qui permettent un client, - ou au cache de distinguer les diffrentes versions d'un mme contenu. Par - exemple, si une ressource a t servie avec un en-tte "Etag:", il est - possible de crer une requte conditionnelle contenant un en-tte - "If-None-Match:". Si une ressource a t servie avec un en-tte - "Last-Modified:", il est possible de crer une requte conditionnelle - contenant un en-tte "If-Modified-Since:", etc....

    - -

    Lorsqu'une telle requte conditionnelle est cre, la reponse diffre - selon que le contenu satisfait ou non aux conditions. Si une requte est - cre avec un en-tte "If-Modified-Since:", et le contenu n'a pas t - modifi depuis le moment indiqu dans la requte, alors un laconique - "304 Not Modified" est retourn.

    - -

    Si le contenu a t modifi, il est servi comme si la requte n'avait - pas t conditionnelle l'origine.

    - -

    Les bnfices des requtes conditionnelles pour ce qui concerne la - mise en cache sont de deux sortes. Premirement, quand une telle requte - est envoye au processus en arrire-plan, il sera ais de dterminer - si le contenu que devra servir le processus en arrire-plan correspond - au contenu stock dans le cache, sans tre oblig de transmettre la - totalit de la ressource.

    - -

    Deuximement, les requtes conditionnelles sont en gnral moins - coteuses en ressources pour le processus en arrire-plan. - Pour ce qui est des fichiers - statiques, l'action type est un appel stat() ou un appel - systme similaire, pour dterminer si la taille du fichier ou sa date de - modification ont chang. Ainsi, mme si httpd met en cache le contenu - local, un contenu arriv expiration pourra tre servi plus rapidement - depuis le cache s'il n'a pas t modifi, parce que la lecture depuis le - cache est plus rapide que la lecture depuis le processus en arrire-plan - ( comparer la diffrence de vitesse entre la lecture depuis un cache en - mmoire avec mod_cache_disk et la lecture depuis un disque).

    +

    Lorsqu'un contenu du cache est prim, httpd modifie la requte + pour en faire une requte conditionnelle

    + +

    Lorsque la rponse originale du cache contient un en-tte + ETag, mod_cache ajoute un en-tte + If-None-Match la requte envoye au serveur + d'origine. Lorsque la rponse originale du cache contient un en-tte + Last-Modified, mod_cache ajoute un en-tte + If-Modified-Since la requte envoye au serveur + d'origine. Dans ces deux cas, la requte devient une requte + conditionnelle.

    + +

    Lorsqu'un serveur d'origine reoit une requte conditionnelle, + il vrifie si le paramtre Etag ou Last-Modified a t modifi en + fonction des paramtres de la requte. Si ce n'est pas le cas, il + rpondra avec le message lapidaire "304 Not Modified". Ceci + informe le cache que le contenu est prim mais encore jour, et + peut tre utilis tel quel pour les prochaines requtes jusqu' ce + qu'il atteigne nouveau sa date de premption.

    + +

    Si le contenu a t modifi, il est servi comme s'il s'agissait + d'une requte normale et non conditionnelle.

    + +

    Les requtes conditionnelles offrent deux avantages. D'une + part, il est facile de dterminer si le contenu du serveur + d'origine correspond celui situ + dans le cache, et ainsi d'conomiser la consommation de ressources + ncessaire au transfert du contenu dans son ensemble.

    + +

    D'autre part, un serveur d'origine bien conu sera configur de + telle manire que les requtes conditionnelles ncessitent pour + leur production bien moins de ressources qu'une rponse complte. + Dans le cas des fichiers statiques, il suffit en gnral d'un + appel systme de type stat() ou similaire pour + dterminer si la taille ou la date de modification du fichier a + t modifie. Ainsi, mme un contenu local pourra tre servi plus + rapidement depuis le cache s'il n'a pas t modifi.

    + +

    Il serait souhaitable que tous les serveurs d'origine + supportent les requtes conditionnelles, car dans le cas + contraire, ils rpondent comme s'il s'agissait d'une requte + normale, et le cache rpond comme si le contenu avait t + modifi et enregistre ce dernier. Le cache se comporte alors + comme un simple cache deux tat, o le contenu est servi s'il + est jour, ou supprim dans le cas contraire.

    Que peut-on mettre en cache ?

    -

    Comme mentionn plus haut, les deux styles de mise en - cache de httpd - fonctionnent diffremment; la mise en cache de - mod_file_cache conserve les contenus des fichiers - tels qu'ils taient au dmarrage de httpd. Quand une requte pour un - fichier mis en cache par ce module est envoye, elle est intercepte - et le fichier mis en cache est servi.

    - -

    La mise en cache de mod_cache, quant elle, est - plus complexe. Lors du traitement d'une requte, le module de mise en - cache dterminera si le contenu peut tre mis en cache, s'il ne l'a - pas dj t auparavant. Les conditions qui permettent de dterminer - la possibilit de mise en cache d'une rponse sont :

    +

    La liste complte des conditions ncessaires pour qu'une + rponse puisse tre enregistre dans un cache HTTP est fournie + dans la section + 13.4 Response Cacheability de la RFC2616, et peut se rsumer + ainsi :

    1. La mise en cache doit tre active pour cette URL. Voir les @@ -256,9 +359,6 @@
    2. La requte doit tre de type HTTP GET.
    3. -
    4. Si la requte contient un en-tte "Authorization:", la rponse ne - sera pas mise en cache.
    5. -
    6. Si la rponse contient un en-tte "Authorization:", elle doit aussi contenir une option "s-maxage", "must-revalidate" ou "public" dans l'en-tte "Cache-Control:".
    7. @@ -299,28 +399,46 @@

      Qu'est ce qui ne doit pas tre mis en cache ?

      -

      En bref, tout contenu qui varie beaucoup avec le temps, ou en fonction - de particularits de la requte qui ne sont pas couvertes par la - ngociation HTTP, ne doit pas tre mis en cache.

      - -

      Un contenu dynamique qui varie en fonction de l'adresse IP du - demandeur, ou est modifi toutes les 5 minutes, ne devra en gnral - pas tre mis en cache.

      +

      Le client qui cre la requte ou le serveur d'origine qui + gnre la rponse doit tre mme de dterminer si le contenu + doit pouvoir tre mis en cache ou non en dfinissant correctement + l'en-tte Cache-Control, et + mod_cache sera alors en mesure de satisfaire les + souhaits du client ou du serveur de manire approprie. +

      -

      Si par contre le contenu servi diffre en fonction de la valeur de - divers en-ttes HTTP, il se peut que l'on puisse le mettre en cache - intelligemment en utilisant un en-tte "Vary".

      +

      Les contenus qui varient au cours du temps, ou en fonction de + particularits de la requte non prises en compte par la + ngociation HTTP ne doivent pas tre mis en cache. Ce type de + contenu doit se dclarer lui-mme " ne pas mettre en cache" via + l'en-tte Cache-Control.

      + +

      Si le contenu change souvent, suite par exemple une dure de + fracheur de l'ordre de la minute ou de la seconde, il peut tout + de mme tre mis en cache, mais il est alors fortement souhaitable + que le serveur d'origine supporte correctement les + requtes conditionnelles afin que des rponses + compltes ne soient pas systmatiquement gnres.

      + +

      Un contenu qui varie en fonction d'en-ttes de requte fournis + par le client peut tre mis en cache, sous rserve d'une + utilisation approprie de l'en-tte de rponse Vary.

      Contenu variable et/ou ngoci

      -

      Si mod_cache reoit une rponse contenant un en-tte - "Vary", lorsqu'un contenu a t demand par un processus d'arrire-plan, - il va s'efforcer de la traiter intelligemment. Si possible, - mod_cache va dtecter les en-ttes attribus dans la - rponse "Vary" l'occasion des futures demandes, et servir une rponse - correcte partir du cache.

      +

      Lorsque le serveur d'origine est configur pour servir des + contenus diffrents en fonction de la valeur de certains en-ttes + de la requte, par exemple pour servir une ressource en plusieurs + langages partir d'une seule URL, le mcanisme de mise en cache + d'HTTP permet de mettre en cache plusieurs variantes de la mme + page partir d'une seule URL.

      + +

      Pour y parvenir, le serveur d'origine ajoute un en-tte + Vary pour indiquer quels en-ttes doivent tre pris + en compte par un cache pour dterminer si deux variantes sont + diffrentes l'une de l'autre.

      Si par exemple, une rponse est reue avec l'en-tte Vary suivant,

      @@ -331,171 +449,308 @@ Vary: negotiate,accept-language,accept-charset

      mod_cache ne servira aux demandeurs que le contenu mis en cache qui correspond au contenu des en-ttes accept-language et accept-charset de la requte originale.

      + +

      Plusieurs variantes d'un contenu peuvent tre mises en cache + simultanment ; mod_cache utilise l'en-tte + Vary et les valeurs correspondantes des en-ttes de + la requte spcifis dans ce dernier pour + dterminer quelle variante doit tre servie au client.

      + -
    top
    +
    top
    -

    Considrations sur la scurit

    +

    Exemples de configuration du cache

    + -

    Autorisation et contrle d'accs

    + + +

    Mise en cache sur disque

    -

    Utiliser mod_cache revient sensiblement la mme - chose qu'avoir un mandataire inverse intgr (reverse-proxy). Les requtes - seront servies par le module de mise en cache sauf si ce dernier - dtermine qu'un processus d'arrire-plan doit tre appel. La mise en - cache de ressources locales modifie considrablement le modle de - scurit de httpd.

    +

    Le module mod_cache s'appuie sur des + implmentations de stockage en arrire-plan spcifiques pour grer + le cache ; ce titre, mod_cache_disk fournit le + support de la mise en cache sur disque.

    -

    Comme le parcours de la hirarchie d'un systme de fichiers pour - examiner le contenu d'ventuels fichiers - .htaccess serait une opration trs coteuse en ressources, - annulant partiellement de ce fait l'intrt de la mise en cache - (acclrer le traitement des requtes), - mod_cache ne se proccupe pas de savoir s'il a - l'autorisation de servir une entit mise en cache. En d'autres termes, - si mod_cache a mis en cache un certain contenu, ce - dernier sera servi partir du cache tant qu'il ne sera pas arriv - expiration.

    +

    En gnral, le module se configure comme suit :

    + +
    CacheRoot   "/var/cache/apache/"
    +CacheEnable disk /
    +CacheDirLevels 2
    +CacheDirLength 1
    + + +

    Il est important de savoir que, les fichiers mis en cache tant stocks + localement, la mise en cache par l'intermdiaire du systme d'exploitation + sera en gnral aussi applique leurs accs. Si bien que mme si les + fichiers sont stocks sur disque, s'il font l'objet d'accs frquents, + il est probable que le systme d'exploitation s'appliquera ce qu'ils + soient servis partir de la mmoire.

    -

    Si par exemple, votre configuration autorise l'accs une ressource - en fonction de l'adresse IP, vous devez vous assurer que ce contenu n'est - pas mis en cache. Ceci est possible en utilisant la directive - CacheDisable, ou le module - mod_expires. Livr lui-mme, - mod_cache - pratiquement comme un mandataire inverse - - mettrait en cache le contenu lors de son service, et le servirait ensuite - tout client, vers n'importe quelle adresse IP.

    -

    Piratages locaux

    +

    Comprendre le stockage dans le cache

    -

    Etant donn que les requtes des utilisateurs finaux peuvent tre - servies depuis le cache, ce dernier est une cible potentielle pour ceux - qui veulent dfigurer un contenu ou interfrer avec lui. Il est important - de garder l'esprit que l'utilisateur sous lequel tourne - httpd doit - toujours avoir l'accs en criture dans le cache. Ceci est en contraste - total avec la recommandation usuelle d'interdire l'utilisateur sous - lequel tourne Apache - l'accs en criture tout contenu.

    +

    Pour stocker des entits dans le cache, + le module mod_cache_disk cre une empreinte (hash) de 22 + caractres de l'URL qui a fait l'objet d'une requte. Cette empreinte + comprend le nom d'hte, le protocole, le port, le chemin et tout argument + de type CGI associ l'URL, ainsi que les lments + spcifis dans l'en-tte Vary afin d'tre sur que plusieurs URLs + n'interfrent pas entre elles.

    -

    Si l'utilisateur sous lequel tourne Apache est compromis, - par exemple cause d'une - faille de scurit dans un processus CGI, il est possible que le cache - fasse l'objet d'une attaque. Il est relativement ais d'insrer ou de - modifier une entit dans le cache en utilisant le module - mod_cache_disk.

    +

    Chaque position de l'empreinte peut contenir un caractre + choisi parmi 64 caractres diffrents, il y a donc + 64^22 possibilits pour une empreinte. Par exemple, une URL peut possder + l'empreinte xyTGxSMO2b68mBCykqkp1w. Cette empreinte est + utilise pour prfixer les noms de fichiers spcifiques cette URL + l'intrieur du cache; cependant, elle est tout d'abord place dans les + rpertoires du cache selon les directives + CacheDirLevels et + CacheDirLength.

    -

    Cela reprsente un risque relativement lv par rapport aux autres - types d'attaques qu'il est possible de mener sous l'utilisateur apache. - Si vous utilisez mod_cache_disk, vous devez garder ceci - l'esprit : effectuez toujours les mises jour de - httpdquand des - correctifs de scurit sont annoncs et excutez les processus CGI sous - un utilisateur autre qu'apache en utilisant - suEXEC dans la mesure du possible.

    +

    La directive + CacheDirLevels + dfinit le nombre de niveaux de sous-rpertoires, et + CacheDirLength + le nombre de caractres composant le nom des sous-rpertoires. Dans + l'exemple donn plus haut, l'empreinte se trouvera : + /var/cache/apache/x/y/TGxSMO2b68mBCykqkp1w.

    + +

    Cette technique a pour but principal de rduire le nombre de + sous-rpertoires ou de fichiers contenus dans un rpertoire particulier, + car le fonctionnement de la plupart des systmes de fichiers est ralenti + quand ce nombre augmente. Avec la valeur "1" pour la directive + CacheDirLength, + il peut y avoir au plus 64 sous-rpertoires un niveau quelconque. + Avec la valeur "2", il peut y en avoir 64 * 64, etc... + A moins d'avoir une bonne raison pour ne pas le faire, l'utilisation de + la valeur "1" pour la directive + CacheDirLength + est recommande.

    + +

    Le paramtrage de la directive + CacheDirLevels + dpend du nombre de fichiers que vous pensez stocker dans le cache. + Avec une valeur de "2" comme dans l'exemple donn plus haut, + 4096 sous-rpertoires peuvent tre crs au total. Avec 1 million de + fichiers dans le cache, cela quivaut environ 245 URLs mises en cache + dans chaque rpertoire.

    + +

    Chaque URL ncessite au moins deux fichiers dans le cache. Ce sont en + gnral un fichier ".header", qui contient des meta-informations propos + de l'URL, comme la date de son arrive expiration, + et un fichier ".data" qui est la copie exacte du contenu servir.

    +

    Dans le cas d'un contenu ngoci via l'en-tte "Vary", un rpertoire + ".vary" sera cr pour l'URL en question. Ce rpertoire contiendra de + multiples fichiers ".data" correspondant aux diffrents contenus + ngocis.

    -

    Empoisonnement du cache (Cache Poisoning)

    +

    Maintenance du cache sur disque

    -

    Si vous utilisez httpd comme serveur mandataire avec mise en cache, - vous vous exposez aussi un ventuel "Empoisonnement du - cache" (Cache poisoning). L'empoisonnement du cache est un terme gnral - pour dsigner les attaques au cours desquelles l'attaquant fait en sorte - que le serveur mandataire renvoie un contenu incorrect (et souvent - indsirable) suite en provenance du serveur d'arrire-plan. -

    +

    Le module mod_cache_disk n'effectue aucune + rgulation de l'espace disque utilis par le cache, mais s'il + s'arrte en douceur en cas d'erreur disque et se comporte alors + comme si le cache n'avait jamais exist.

    + +

    Par contre l'utilitaire + htcacheclean fourni avec + httpd + vous permet de nettoyer le cache priodiquement. + Dterminer la frquence laquelle lancer htcacheclean et la taille souhaite + pour le cache est une tche relativement complexe et il vous faudra de + nombreux essais et erreurs pour arriver slectionner des valeurs + optimales.

    + +

    htcacheclean opre selon deux + modes. Il peut s'excuter comme dmon rsident, ou tre lanc + priodiquement par cron. htcacheclean peut mettre une heure + ou plus pour traiter de trs grands caches (plusieurs dizaines de + Gigaoctets) et si vous l'excutez partir de cron, il vous est + conseill de dterminer la dure typique d'un traitement, afin d'viter + d'excuter plusieurs instances la fois.

    + +

    Il est aussi conseill d'attribuer un niveau de priorit "nice" + appropri htcacheclean de faon ce qu'il n'effectue pas trop + d'accs disque pendant le fonctionnement du serveur.

    + +

    +
    + Figure 1: Croissance + typique du cache / squence de nettoyage.

    + +

    Comme mod_cache_disk ne tient pas compte de l'espace + utilis dans le cache, vous devez vous assurer que + htcacheclean est configur de + faon laisser suffisamment d'"espace de croissance" + la suite d'un nettoyage.

    + + +

    Cache en mmoire

    + + +

    En utilisant le module mod_cache_socache, + mod_cache peut mettre en cache des donnes partir de + diverses implmentations aussi nommes "fournisseurs". Par exemple, en + utilisant le module mod_socache_memcache, on peut + spcifier que c'est memcached qui doit + tre utilis comme mcanisme de stockage sous-jacent.

    + +

    Typiquement, le module sera configur comme suit :

    + +
    CacheEnable socache /
    +CacheSocache memcache:memcd.example.com:11211
    + + +

    En outre, il est possible de spcifier plusieurs serveurs + memcached en les ajoutant la fin de la ligne + CacheSocache memcache: et en les sparant par des virgules :

    + +
    CacheEnable socache /
    +CacheSocache memcache:mem1.example.com:11211,mem2.example.com:11212
    + + +

    Divers autres fournisseurs mod_cache_socache utilisent + aussi ce format. Par exemple :

    + +
    CacheEnable socache /
    +CacheSocache shmcb:/path/to/datafile(512000)
    + + +
    CacheEnable socache /
    +CacheSocache dbm:/path/to/datafile
    -

    Par exemple, si les serveur DNS qu'utilise votre systme o tourne - httpd sont vulnrables l'empoisonnement du cache des DNS, un attaquant - pourra contrler vers o httpd se connecte lorsqu'il demande un contenu - depuis le serveur d'origine. - Un autre exemple est constitu par les attaques ainsi nommes - "Dissimulation de requtes HTTP" (HTTP request-smuggling).

    -

    Ce document n'est pas le bon endroit pour une discussion approfondie - propos de la Dissimulation de requtes HTTP (utilisez plutt votre - moteur de recherche favori); il est cependant important de savoir qu'il - est possible d'laborer une srie de requtes, et d'exploiter une - vulnrabilit d'un serveur web d'origine de telle faon que l'attaquant - puisse contrler entirement le contenu renvoy par le mandataire.

    +
    top
    -

    Mise en cache de la gestion de fichier

    +

    Mise en cache gnrale d'objets partags deux tats de forme + cl/valeur

    + - + + +

    Le serveur HTTP Apache fournit un cache d'objets partags de bas + niveau pour la mise en cache d'informations comme les sessions SSL + ou les donnes d'authentification dans l'interface socache.

    + +

    Pour chaque implmentation un module supplmentaire est fourni + qui offre les services d'arrire-plan suivants :

    + +
    +
    mod_socache_dbm
    +
    Cache d'objets partags bas sur DBM.
    +
    mod_socache_dc
    +
    Cache d'objets partags bas sur Distcache.
    +
    mod_socache_memcache
    +
    Cache d'objets partags bas sur Memcache.
    +
    mod_socache_shmcb
    +
    Cache d'objets partags bas sur la mmoire partage.
    +
    + +

    Mise en cache des donnes d'authentification

    + -

    Le fait d'ouvrir un fichier peut en lui-mme introduire un dlai, - en particulier dans les systmes de fichiers rpartis - sur le rseau. httpd - peut s'affranchir de ce dlai en maintenant - un cache des descripteurs de fichiers - ouverts pour ce qui concerne les fichiers souvent - accds. httpd propose - actuellement une implmentation de mise en cache de la - gestion de fichier.

    + -

    Directive CacheFile

    - +

    Le module mod_authn_socache permet la mise en + cache des donnes issues d'une authentification, diminuant ainsi + la charge des serveurs d'authentification en arrire-plan.

    -

    La forme la plus lmentaire de mise en cache que - propose httpd est - fournie par le module mod_file_cache. - Plutt que de mettre en cache le contenu des fichiers, ce cache maintient - une table des descripteurs de fichiers ouverts. Les fichiers mettre en - cache de cette manire sont spcifis dans le fichier de configuration - en utilisant la directive - CacheFile.

    + -

    La directive - CacheFile demande - httpd - d'ouvrir le fichier lors de son dmarrage et de rutiliser le descripteur - de fichier labor cette occasion pour tous les - accs ultrieurs ce fichier.

    +

    Mise en cache des sessions SSL

    + -

    - CacheFile /usr/local/apache2/htdocs/index.html -

    + -

    Si vous avez l'intention de mettre en cache un grand nombre de - fichiers de cette manire, vous devez vous assurer que le nombre maximum - de fichiers ouverts par votre systme d'exploitation est correctement - dfini.

    - -

    Bien que l'utilisation de la directive - CacheFile - n'entrane pas la mise en cache du contenu du fichier, cela ne signifie - pas qu'en cas de modification du fichier pendant - l'excution de httpd, - ces changements seront pris en compte. Le fichier sera toujours servi - dans l'tat o il tait quand httpd a dmarr.

    - -

    Si le fichier est supprim pendant l'excution de - httpd, ce dernier - continuera maintenir un descripteur de fichier ouvert et servir le - fichier dans l'tat o il tait quand httpd a dmarr. Cela signifie - aussi habituellement que malgr le fait que le fichier ait t supprim, - et ne soit - plus accessible par le systme de fichiers, l'espace libr ne sera - restitu qu' l'arrt de httpd quand le - descripteur de fichier sera ferm.

    - +

    Le module mod_ssl utilise l'interface + socache pour fournir un cache de session et un cache + de base.

    +
    top
    -

    Mise en cache en mmoire

    +

    Mise en cache base de fichiers spcialiss

    + + + + + +

    Sur les plateformes o le systme de fichiers peut tre lent, ou + lorsque les descripteurs de fichiers sont gourmands en ressources, + il est possible de prcharger des fichiers en mmoire au dmarrage + du serveur.

    + +

    Sur les systmes o l'ouverture des fichiers est lente, il est + possible d'ouvrir le fichier au dmarrage du serveur et de mettre en + cache le descripteur de fichier. Ces options peuvent vous aider sur + les systmes o l'accs aux fichiers statiques est lent.

    + +

    Mise en cache des descripteurs de fichier

    + + +

    Le processus d'ouverture d'un fichier peut tre en soi une + source de ralentissement, en particulier sur les systmes de + fichiers sur le rseau. httpd permet d'viter ce ralentissement en + maintenant un cache des descripteurs de fichiers ouverts pour les + fichiers souvent servis. Actuellement, httpd fournit une seule + implmentation de mise en cache des descripteurs de fichiers.

    + +

    CacheFile

    + + +

    La forme la plus basique de mise en cache que propose httpd + est la mise en cache des descripteurs de fichiers fournie par le + module mod_file_cache. Plutt que de mettre en + cache le contenu des fichiers, ce cache maintient une table des + descripteurs de fichiers ouverts. Les fichiers devant faire + l'objet d'une mise en cache de ce type sont spcifis dans le + fichier de configuration via la directive CacheFile.

    + +

    La directive CacheFile informe httpd + qu'il doit ouvrir le fichier lors de son dmarrage et qu'il doit + rutiliser le descripteur de fichier mis en cache pour tous les + accs futurs ce fichier.

    + +
    CacheFile /usr/local/apache2/htdocs/index.html
    + + +

    Si vous dsirez mettre en cache un grand nombre de fichiers + de cette manire, vous devez vous assurer que le nombre maximal + de fichiers ouverts pour votre systme d'exploitation est dfini + une valeur suffisante.

    + +

    Bien que l'utilisation de la directive CacheFile n'entrane pas de + mise en cache du contenu du fichier proprement dit, elle + implique que si le fichier est modifi pendant l'excution du + serveur, ces modifications ne seront pas prises en compte. Le + fichier sera toujours servi dans l'tat o il se trouvait au + moment du dmarrage du serveur.

    + +

    Si le fichier est supprim pendant l'excution du serveur, ce + dernier conservera le descripteur de fichier ouvert associ et + servira le fichier dans l'tat o il se trouvait au + moment du dmarrage du serveur. Cela signifie aussi que mme si + le fichier a t supprim, et n'apparat donc plus dans le + systme de fichiers, l'espace disque libr ne sera disponible + qu'une fois le serveur httpd arrt et donc le descripteur de + fichier ferm.

    + + - +

    In-Memory Caching

    +

    Servir un contenu directement depuis la mmoire systme est universellement reconnu comme la mthode la plus rapide. Lire des fichiers @@ -516,7 +771,7 @@ Vary: negotiate,accept-language,accept-charset Sinon le systme sera contraint d'utiliser le swap, ce qui dgradera sensiblement les performances.

    -

    Mise en cache par l'intermdiaire du systme d'exploitation

    +

    Mise en cache par l'intermdiaire du systme d'exploitation

    Dans la plupart des systmes d'exploitation modernes, c'est le noyau @@ -527,8 +782,7 @@ Vary: negotiate,accept-language,accept-charset temps ncessaire la premire lecture d'un fichier et le temps ncessaire sa deuxime lecture;

    -
    -colm@coroebus:~$ time cat testfile > /dev/null
    +        
    colm@coroebus:~$ time cat testfile > /dev/null
     real    0m0.065s
     user    0m0.000s
     sys     0m0.001s
    @@ -554,14 +808,14 @@ sys     0m0.000s
    avantage par rapport la mise en cache en mmoire de httpd qui n'a aucune possibilit de savoir si un fichier a t modifi.

    - +

    En dpit des performances et des avantages de la mise en cache automatique par le systme d'exploitation, la mise en cache en mmoire peut tre effectue plus efficacement par httpd dans certaines circonstances.

    -

    Mise en cache l'aide de la directive MMapFile

    +

    Mise en cache l'aide de la directive MMapFile

    La directive MMapFile @@ -572,9 +826,8 @@ sys 0m0.000s

    utilisera le contenu charg en mmoire pour satisfaire ultrieurement toutes les demandes d'accs ce fichier.

    -

    - MMapFile /usr/local/apache2/htdocs/index.html -

    +
    MMapFile /usr/local/apache2/htdocs/index.html
    +

    Comme dans le cas de la directive CacheFile, toute @@ -588,139 +841,162 @@ sys 0m0.000s

    sa propre rplique de la mmoire alloue, il est donc d'une importance critique de s'assurer que les fichiers chargs ne sont pas d'une taille trop importante afin d'pargner au systme l'utilisation du swap.

    + -
    top
    -

    Mise en cache sur disque

    +

    Considrations sur la scurit

    - - -

    Le module mod_cache_disk fournit un mcanisme de mise - en cache sur disque au module mod_cache. Cette mise en cache est - intelligente et le contenu ne sera servi qu' partir du cache tant qu'il - sera considr comme valide.

    - -

    Typiquement, le module sera configur comme suit :

    +

    Autorisation et contrle d'accs

    + -

    -CacheRoot /var/cache/apache/
    -CacheEnable disk /
    -CacheDirLevels 2
    -CacheDirLength 1 -

    +

    Utiliser mod_cache revient sensiblement la mme + chose qu'avoir un mandataire inverse intgr (reverse-proxy). Les requtes + seront servies par le module de mise en cache sauf si ce dernier + dtermine qu'un processus d'arrire-plan doit tre appel. La mise en + cache de ressources locales modifie considrablement le modle de + scurit de httpd.

    -

    Il est important de savoir que, les fichiers mis en cache tant stocks - localement, la mise en cache par l'intermdiaire du systme d'exploitation - sera en gnral aussi applique leurs accs. Si bien que mme si les - fichiers sont stocks sur disque, s'il font l'objet d'accs frquents, - il est probable que le systme d'exploitation s'appliquera ce qu'ils - soient servis partir de la mmoire.

    +

    Comme le parcours de la hirarchie d'un systme de fichiers pour + examiner le contenu d'ventuels fichiers + .htaccess serait une opration trs coteuse en ressources, + annulant partiellement de ce fait l'intrt de la mise en cache + (acclrer le traitement des requtes), + mod_cache ne se proccupe pas de savoir s'il a + l'autorisation de servir une entit mise en cache. En d'autres termes, + si mod_cache a mis en cache un certain contenu, ce + dernier sera servi partir du cache tant qu'il ne sera pas arriv + expiration.

    -

    Comprendre le stockage dans le cache

    - +

    Si par exemple, votre configuration autorise l'accs une ressource + en fonction de l'adresse IP, vous devez vous assurer que ce contenu n'est + pas mis en cache. Ceci est possible en utilisant la directive + CacheDisable, ou le module + mod_expires. Livr lui-mme, + mod_cache - pratiquement comme un mandataire inverse - + mettrait en cache le contenu lors de son service, et le servirait ensuite + tout client, vers n'importe quelle adresse IP.

    -

    Pour stocker des entits dans le cache, - le module mod_cache_disk cre une empreinte (hash) de 22 - caractres de l'URL qui a fait l'objet d'une requte. Cette empreinte - comprend le nom d'hte, le protocole, le port, le chemin et tout argument - de type CGI associ l'URL, afin d'tre sur que plusieurs URLs - n'interfrent pas entre elles.

    +

    Lorsque la directive CacheQuickHandler est dfinie + Off, toutes les phases du traitement de la requte + sont excutes et le modle de scurit reste le mme.

    -

    Chaque position de l'empreinte peut contenir un caractre - choisi parmi 64 caractres diffrents, il y a donc - 64^22 possibilits pour une empreinte. Par exemple, une URL peut possder - l'empreinte xyTGxSMO2b68mBCykqkp1w. Cette empreinte est - utilise pour prfixer les noms de fichiers spcifiques cette URL - l'intrieur du cache; cependant, elle est tout d'abord place dans les - rpertoires du cache selon les directives - CacheDirLevels et - CacheDirLength.

    + -

    La directive - CacheDirLevels - dfinit le nombre de niveaux de sous-rpertoires, et - CacheDirLength - le nombre de caractres composant le nom des sous-rpertoires. Dans - l'exemple donn plus haut, l'empreinte se trouvera : - /var/cache/apache/x/y/TGxSMO2b68mBCykqkp1w.

    +

    Piratages locaux

    + -

    Cette technique a pour but principal de rduire le nombre de - sous-rpertoires ou de fichiers contenus dans un rpertoire particulier, - car le fonctionnement de la plupart des systmes de fichiers est ralenti - quand ce nombre augmente. Avec la valeur "1" pour la directive - CacheDirLength, - il peut y avoir au plus 64 sous-rpertoires un niveau quelconque. - Avec la valeur "2", il peut y en avoir 64 * 64, etc... - A moins d'avoir une bonne raison pour ne pas le faire, l'utilisation de - la valeur "1" pour la directive - CacheDirLength - est recommande.

    +

    Etant donn que les requtes des utilisateurs finaux peuvent tre + servies depuis le cache, ce dernier est une cible potentielle pour ceux + qui veulent dfigurer un contenu ou interfrer avec lui. Il est important + de garder l'esprit que l'utilisateur sous lequel tourne + httpd doit + toujours avoir l'accs en criture dans le cache. Ceci est en contraste + total avec la recommandation usuelle d'interdire l'utilisateur sous + lequel tourne Apache + l'accs en criture tout contenu.

    -

    Le paramtrage de la directive - CacheDirLevels - dpend du nombre de fichiers que vous pensez stocker dans le cache. - Avec une valeur de "2" comme dans l'exemple donn plus haut, - 4096 sous-rpertoires peuvent tre crs au total. Avec 1 million de - fichiers dans le cache, cela quivaut environ 245 URLs mises en cache - dans chaque rpertoire.

    +

    Si l'utilisateur sous lequel tourne Apache est compromis, + par exemple cause d'une + faille de scurit dans un processus CGI, il est possible que le cache + fasse l'objet d'une attaque. Il est relativement ais d'insrer ou de + modifier une entit dans le cache en utilisant le module + mod_cache_disk.

    -

    Chaque URL ncessite au moins deux fichiers dans le cache. Ce sont en - gnral un fichier ".header", qui contient des meta-informations propos - de l'URL, comme la date de son arrive expiration, - et un fichier ".data" qui est la copie exacte du contenu servir.

    +

    Cela reprsente un risque relativement lv par rapport aux autres + types d'attaques qu'il est possible de mener sous l'utilisateur apache. + Si vous utilisez mod_cache_disk, vous devez garder ceci + l'esprit : effectuez toujours les mises jour de + httpdquand des + correctifs de scurit sont annoncs et excutez les processus CGI sous + un utilisateur autre qu'apache en utilisant + suEXEC dans la mesure du possible.

    -

    Dans le cas d'un contenu ngoci via l'en-tte "Vary", un rpertoire - ".vary" sera cr pour l'URL en question. Ce rpertoire contiendra de - multiples fichiers ".data" correspondant aux diffrents contenus - ngocis.

    -

    Maintenance du cache sur disque

    +

    Empoisonnement du cache (Cache Poisoning)

    -

    Bien que le module mod_cache_disk supprime un contenu - du cache lorsqu'il est arriv expiration, il ne maintient aucune - information propos de la taille totale du cache ou de l'espace restant - disponible.

    +

    Si vous utilisez httpd comme serveur mandataire avec mise en cache, + vous vous exposez aussi un ventuel "Empoisonnement du + cache" (Cache poisoning). L'empoisonnement du cache est un terme gnral + pour dsigner les attaques au cours desquelles l'attaquant fait en sorte + que le serveur mandataire renvoie un contenu incorrect (et souvent + indsirable) suite en provenance du serveur d'arrire-plan. +

    -

    Par contre l'utilitaire - htcacheclean fourni avec - httpd - vous permet, comme son nom l'indique, de nettoyer le cache priodiquement. - Dterminer la frquence laquelle lancer htcacheclean et la taille souhaite - pour le cache est une tche relativement complexe et il vous faudra de - nombreux essais et erreurs pour arriver slectionner des valeurs - optimales.

    +

    Par exemple, si les serveur DNS qu'utilise votre systme o tourne + httpd sont vulnrables l'empoisonnement du cache des DNS, un attaquant + pourra contrler vers o httpd se connecte lorsqu'il demande un contenu + depuis le serveur d'origine. + Un autre exemple est constitu par les attaques ainsi nommes + "Dissimulation de requtes HTTP" (HTTP request-smuggling).

    -

    htcacheclean opre selon deux - modes. Il peut s'excuter comme dmon rsident, ou tre lanc - priodiquement par cron. htcacheclean peut mettre une heure - ou plus pour traiter de trs grands caches (plusieurs dizaines de - Gigaoctets) et si vous l'excutez partir de cron, il vous est - conseill de dterminer la dure typique d'un traitement, afin d'viter - d'excuter plusieurs instances la fois.

    +

    Ce document n'est pas le bon endroit pour une discussion approfondie + propos de la Dissimulation de requtes HTTP (utilisez plutt votre + moteur de recherche favori); il est cependant important de savoir qu'il + est possible d'laborer une srie de requtes, et d'exploiter une + vulnrabilit d'un serveur web d'origine de telle faon que l'attaquant + puisse contrler entirement le contenu renvoy par le mandataire.

    + -

    -
    - Figure 1: Croissance - typique du cache / squence de nettoyage.

    +

    Dni de Service / Cachebusting

    + -

    Comme mod_cache_disk ne tient pas compte de l'espace - utilis dans le cache, vous devez vous assurer que - htcacheclean est configur de - faon laisser suffisamment d'"espace de croissance" - la suite d'un nettoyage.

    +

    Le mcanisme utilis via l'en-tte Vary permet de mettre en + cache simultanment plusieurs variantes d'une ressource avec la + mme URL. Le cache slectionne la variante correcte envoyer au + client en fonction des valeurs d'en-tte fournies par ce dernier. + Ce mcanisme peut devenir un problme lorsqu'on tente d'appliquer + le mcanisme des variantes un en-tte connu pour pouvoir + possder un grand nombre de valeurs + possibles en utilisation normal, comme par exemple l'en-tte + User-Agent. En fonction de la popularit du site web, + des milliers ou mme des millions d'entres de cache dupliques + peuvent tre cres pour la mme URL, submergeant les autres + entres du cache.

    + +

    Dans d'autres cas, il peut tre ncessaire de modifier l'URL + d'une ressource particulire chaque requte, en gnral en lui + ajoutant une chane "cachebuster". Si ce contenu est dclar comme + pouvant tre mis en cache par un serveur avec une dure de + fracheur significative, ces entres peuvent submerger les entres + lgitimes du cache. Alors que mod_cache fournit + une directive CacheIgnoreURLSessionIdentifiers, + cette dernire doit tre utilise avec prudence pour s'assurer que + les caches du navigateur ou du mandataire le plus proche + (downstream proxy) ne sont pas victimes du mme problme de Dni de + service.

    -

    Langues Disponibles:  en  |  fr  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/caching.html.tr.utf8 b/docs/manual/caching.html.tr.utf8 index fa5b0d090e4..cdf30844c1a 100644 --- a/docs/manual/caching.html.tr.utf8 +++ b/docs/manual/caching.html.tr.utf8 @@ -1,28 +1,32 @@ - -Önbellek Kullanım Kılavuzu - Apache HTTP Sunucusu +Önbellek Kullanım Kılavuzu - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Önbellek Kullanım Kılavuzu

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Önbellek Kullanım Kılavuzu

    Mevcut Diller:  en  |  fr  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belge mod_cache, mod_cache_disk, mod_file_cache @@ -33,50 +37,54 @@ özelliklerinin nasıl kullanılacağı açıklanmıştır.

    +

    Ayrıca bakınız:

    top

    Giriş

    -

    Apache HTTP sunucusunun 2.2 sürümünden itibaren - mod_cache ve mod_file_cache modülleri - deneysel olmaktan çıkarılmış ve üretim amaçlı kullanılabileceğine karar - verilmiştir. Bu önbellekleme mimarileri gerek HTTP sunucusu gerekse - vekili olarak çalışmada HTTP işlemlerini hızlandırmak anlamında sunucuya - güç katarlar.

    - -

    mod_cache, ortam sağlayıcı modülü olan - mod_cache_disk ile birlikte HTTP önbelleklemesini - akıllıca yerine getirir. İçeriğin kendisi önbellekte saklanırken - mod_cache içeriğin önbelleklenebilmesini denetim - altında tutan HTTP başlıkları ve seçenekleri ile ilgilenir. Yerel ve - vekalet edilen içeriğin her ikisinin de aynı anda işlem görmesi - sağlanabilir. mod_cache, vekalet edilen içeriğe, - devingen yerel içeriğe veya zamanla değişen yerel dosyalara erişimi - hızlandırma ihtiyacına yönelik olarak hem basit hem de karmaşık - önbellekleme yapılandırmalarını mümkün kılar.

    - -

    mod_file_cache ise biraz daha temel ancak bazen daha - kullanışlı olabilen bir önbellekleme şekli ile ilgilenir. URL’lerin - önbelleklenebilmesini mümkün kılmanın karmaşıklığıyla boğuşmak yerine - mod_file_cache, dosyaların httpd’nin son başlatıldığı - zamanki durumlarını saklamak için dosyaların belleğe eşlenmek üzere ele - alınmasını sağlar. Böylelikle, mod_file_cache, çok sık - değişmeyen durağan yerel dosyalara erişim zamanını azaltmaya yardım - eder.

    - -

    CacheFile ve - MMapFile yönergeleri ile - ilgili bölümlerde anlatılanları saymazsak - mod_file_cache, bu belgenin asıl konusu olan - mod_cache önbellekleme mimarisine göre daha basit bir - önbellekleme gerçeklenimidir.

    +

    Apache HTTP sunucusu, sunucunun başarımını çeşitli yollarla arttırmak + üzere tasarlanmış bir dizi önbellekleme özelliğine sahiptir.

    + +
    +
    Üç durumlu RFC2616 HTTP önbelleklemesi
    +
    + mod_cache ve destek modülü + mod_cache_disk akılcı ve HTTP'ye uygun + önbellekleme sağlar. İçeriğin kendisi önbellekte saklanır ve + mod_cache, RFC2616'nın 13. bölümünde açıklandığı gibi, içeriğin + önbelleklenebilirliğini denetleyen çeşitli HTTP başlıklarının ve + seçeneklerinin tümünü onurlandırmayı hedefler. + Devingen yerel içerik veya vekalet edilen içerik ile ilgilendiğiniz + durumda veya muhtemel bir yavaş disk üzerinde yerel dosyalara + erişimi hızlandırmak ihtiyacında olduğunuz durumda + mod_cache hem basit hem de karmaşık önbellekleme + yapılandırmalarını hedefler. +
    +
    İki durumlu anahtar/değer paylaşımlı nesne önbellekleme
    +
    + Paylaşımlı nesne önbellek API'si + (socache) ve destek modülleri sunucu taraflı bir anahtar/değer + paylaşımlı nesne önbelleklemesi sağlar. Bu modüller SSL oturumları + ve kimlik doğrulama bilgileri gibi düşük seviyeli verileri + önbelleklemek için tasarlanmıştır. Destek modülleri verinin sunucu + tarafı bir paylaşımlı bellekte veya veri merkezi tarafı memcache + veya distcache gibi bir önbellekte saklanmasını mümkün kılar. +
    +
    Uzmanlaşmış dosya önbellekleme
    +
    + mod_file_cache dosyaların sunucunun başlatılması + sırasında belleğe yüklenmesi ile ilgilenir. Böylece dosyalara + erişim zamanını kısaltabilir, sıkça erişilen dosyaların dosya + tanıtıcılarını kaydedebilir, her istekte diske gitme ihtiyacını + ortadan kaldırır. +
    +

    Bu belgeden azami yararı sağlayabilmek için temel bir HTTP bilginizin olması ve URL’lerin Dosya Sistemine @@ -85,142 +93,220 @@

    top
    -

    Önbelleklemeye Bir Bakış

    +

    Üç durumlu RFC2616 HTTP önbelleklemesi

    - - -

    Bir istek sonuçlanıncaya kadar mod_cache modülünde iki - aşamadan geçer. İlkinde mod_cache bir URL eşleme modülü - olarak çalışır ve URL önbellekteyse ve zaman aşımına uğramamışsa isteğin - doğrudan mod_cache tarafından sunulmasını sağlar.

    - -

    Yani isteğin sunumu sırasında, isteğin örneğin, - mod_proxy veya mod_rewrite tarafından - ele alınması gerekse bile bu yapılmaz. Önbelleklenen içerik ilk alındığı - haliyle sunulur.

    - -

    Eğer URL önbellekte yoksa, mod_cache isteği bir süzgece tabi tutar. httpd içeriğin varlığını - saptamışsa içeriğin süzgeç tarafından sunulmasını sağladıktan sonra, - süzgeç içeriğin önbelleklenebileceğini saptamışsa gelecekte sunmak üzere - içeriği önbelleğe kaydeder.

    + + +

    HTTP protokolü + RFC2616'nın 13. bölümünde açıklanan satıriçi önbellekleme + mekanizması için yerleşik bir destek içerir ve bunun getirilerinden + yararlanmak için mod_cache modülü kullanılabilir.

    + +

    İçeriğin taze olmadığı durumda içeriğin kaybolmasına sebep olan basit + iki durumlu anahtar/değer önbelleklemesinin tersine, HTTP önbelleği + eskimiş içeriği tutan ve bu eski içeriğin değişip değişmediğini özgün + sunucuya soran ve duruma göre onu tekrar taze duruma getiren bir + mekanizma içerir.

    + +

    HTTP önbelleğinde bulunan bir girdi şu üç durumdan birinde olabilir:

    + +
    +
    Taze
    +
    + İçerik yeteri kadar yeni (tazelik ömründen daha genç) + ise taze sayılır. Bir HTTP önbelleği böyle bir içeriği + özgün sunucuya birşey sormadan sunabilir. +
    +
    Bayat
    +
    +

    İçerik çok eski (tazelik ömründen daha yaşlı) + ise bayat sayılır. Bir HTTP önbelleği böyle bir + içeriği istemciye sunmadan önce özgün sunucuya bağlanıp bayat içeriğin + hala yeterince taze olup olmadığına bakmalıdır. Özgün sunucu, içerik + geçersizse yenisini gönderecektir, aksi takdirde, (ideal olanı budur) + içeriğin hala geçerli olduğunu belirten bir kod ile yanıt verecektir. + İçerik tekrar taze hale gelince süreç kaldığı yerden devam eder.

    + +

    HTTP protokolü belli koşullar altında önbelleğin bayat içeriği + sunmasına izin vermez. Örneğin, bir içeriği özgün sunucuda tazeleme + çabasının bir 5xx hatasıyla başarısız olması veya başka bir tazeleme + isteğinin henüz sonuçlanmamış olması bu çeşit koşullardandır. Bu + durumlarda yanıta bir Warning başlığı eklenir.

    +
    +
    Yok
    +
    + Önbellekte yer kalmazsa yer açmak için içeriğin silinmesi seçenek + dahilindedir. İçerik taze olsun olmasın her zaman silinebilir. Önlem + olarak htcacheclean elle veya bir artalan süreci + olarak çalıştırılabilir. Böylece önbelleğin boyutunun belirtilen + boyutta veya belirtilen dosya düğümü sayısında kalması sağlanabilir. + Araç içeriği silerken bayat içeriğe öncelik verir. +
    +
    + +

    HTTP önbelleklemesinin çalışması ile ilgili bütün ayrıntılar + RFC2616'nın 13. bölümünde bulunabilir.

    + +

    Sunucu ile etkileşim

    + -

    Eğer URL önbellekte bulunmuş fakat içeriğin zaman aşımına uğradığı - anlaşılmışsa süzgeç yine de eklenir fakat bu kez - mod_cache önbellekteki sürümün hala geçerli olup - olmadığını saptamak için kaynağın bulunduğu sunucuya bir koşullu istek - gönderir. Önbellekteki sürüm hala geçerliyse temel verileri güncellenir - ve istek önbellekten sunulur. Önbellekteki sürüm artık geçerli değilse, - önbellekteki sürüm silinir ve süzgeç güncel içeriği önbelleğe kaydeder - ve isteği oradan sunar.

    +

    mod_cache modülü + CacheQuickHandler yönergesinin + değerine bağlı olarak iki olası yerde sunucuya bağlanır: +

    + +
    +
    Çabuk eylem aşaması
    +
    +

    Bu aşama çok erken gerçekleşen bir aşama olup isteğin işlenmesi + sırasında isteğin çözümlenmesinin hemen sonrasıdır. İçerik + önbellekte mevcutsa hemen sunulur ve geri kalan istek işleme işlemi + iptal edilir.

    + +

    Bu senaryoda önbellek sunucunun önüne vidalanmış gibi + davranır.

    + +

    Sunucuda gerçekleşecek bir dizi işlemin büyük çoğunluğunun + yapılmadan geçilmesi nedeniyle bu en yüksek başarımlı kiptir. + Bu kip ayrıca, sunucu işlemlerinin kimlik doğrulama ve yetkilendirme + aşamalarının da yapılmadan geçilmesini sağlar. Bu bakımdan bu kip + seçilirken bu durum dikkate alınmalıdır.

    + +

    "Authorization" başlığı içeren istekler (örneğin, HTTP Temel + Kimlik Kanıtlaması gibi) mod_cache bu kipte + çalışırken önbelleğe alınmadıkları gibi önbellekten bir işleme de + sokulmazlar.

    +
    +
    Normal eylem aşaması
    +
    +

    Bu aşama geç bir aşama olup, isteğin tamamen işlenmesinin + sonrasıdır.

    + +

    Bu senaryoda önbellek sunucunun arkasına vidalanmış gibi + davranır.

    + +

    Bu kip en esneğidir. Önbelleğin, süzme zincirinin hassas olarak + denetlenen bir noktasında oluşması sağlanabilir ve önbelleklenen + içerik istemciye gönderilmeden önce süzülüp + kişiselleştirilebilir.

    +
    +
    + +

    URL önbellekte yoksa mod_cache modülü yanıtı + önbelleğe kaydetme aşamasında süzgeç yığıtına bir + süzgeç ekler ve geri çekilerek normal istek + işlemlerinin devam etmesine izin verir. İçeriğin önbelleklenebilir + olduğu saptanırsa içerik gelecekte sunulmak üzere önbelleğe + kaydedilir, aksi takdirde içerik yok sayılır.

    + +

    Önbellekteki içerik bayatsa, mod_cache modülü + isteği bir koşullu istek haline getirir. Özgün + sunucu normal bir yanıt verirse bu yanıt mevcut içeriğin yerine + önbelleklenir. Özgün sunucu bir 304 Not Modified yanıtı + verirse içerik tekrar taze olarak imlenir ve önbellekteki içerik + süzgeç tarafından kaydedilmeden sunulur.

    +

    Önbelleğin Hızlandırılması

    -

    Yerel içerik önbelleklendiği takdirde UseCanonicalName yönergesine On +

    Bir sanal konak birçok farklı sunucu takma adından biri olarak + bilindiği takdirde UseCanonicalName yönergesine On değeri atanmışsa önbellekten sunulan sayfa sayısında büyük bir artış - olduduğu görülür. Bunun sebebi içeriği sunan sanal konağın isminin - önbellek anahtarının bir parçası olarak kullanılmasıdır. Yönergeye + olduğu görülür. Bunun sebebi içeriği sunan sanal konağın isminin + önbellek anahtarının içinde kullanılmasıdır. Yönergeye On değerini atamak suretiyle çok isimli ve rumuzlu sanal konaklar için farklı önbellek girdileri oluşturulmaz, bunun yerine her meşru sanal konak için ayrı bir önbellek tutulur.

    - -

    Önbellekleme, URL’nin dosya ismine dönüştürülmesi aşamasında - gerçekleştiğinden önbelleklenen belgeler sadece URL isteklerine bir - yanıt olarak sunulurlar. Sunucu Taraflı - İçerikleri kullanmazsanız genellikle bunun fazla bir önemi - olmaz.

    - -

    - <!-- Bu içerik önbelleklenebilir. -->
    - <!--#include virtual="/dipnot.html" -->
    -
    - <!-- Bu içerik önbelleklenemez. -->
    - <!--#include file="/bir/yol/dipnot.html" --> -

    - -

    Sunucu Taraflı İçerikleri kullanıyorsanız ve önbelleklemenin - sağladığı hız artışından da yaralanmak istiyorsanız içerik - yerleştirmek için virtual içerik türünü kullanınız.

    -

    Zaman Aşımı Süreleri

    +

    Tazelik Ömrü

    -

    Önbellekli öğeler için öntanımlı zaman aşımı süresi bir saat olmakla - birlikte CacheDefaultExpire - yönergesi kullanılarak bu değer kolaylıkla geçersiz kılınabilir. Bu - öntanımlı değer sadece içeriğin özgün kaynağı bir zaman aşımı süresi - veya son değişiklik tarihi belirtmediği takdirde kullanılır.

    +

    Önbelleklenmek üzere tasarlanmış iyi biçimli bir içerik tazelik ömrünü + Cache-Control başlığının max-age veya + s-maxage alanlarıyla ya da bir Expires + başlığını içererek bildirmelidir.

    + +

    Aynı zamanda, özgün sunucunun tanımladığı tazelik ömrü, bir istemci + tarafından istekte bir Cache-Control başlığı kullanılarak + geçersiz kılınmak istenebilir. Bu durumda hangi tazelik ömrü daha + kısaysa o geçerli olur.

    + +

    Tazelik ömrü istekte veya yanıtta mevcut değilse öntanımlı bir tazelik + ömrü kullanılır. Öntanımlı tazelik ömrü önbellekli içerik için bir saat + olmakla birlikte CacheDefaultExpire yönergesi + kullanılarak kolayca değiştirilebilir.

    Bir yanıt Expires başlığını değil de Last-Modified başlığını içeriyorsa - mod_cache zaman aşımı süresini CacheLastModifiedFactor yönergesinin - nasıl kullanıldığına bakarak saptar.

    + mod_cache tazelik ömrünü CacheLastModifiedFactor yönergesine + bakarak saptar.

    -

    Yerel içerik için, zaman aşımı süresini hassas olarak ayarlamak - gerekirse mod_expires kullanılabilir.

    +

    Yerel içerik için, ya da kendi Expires başlığını + tanımlamayan uzak içerik için tazelik ömrünü max-age ve + Expires ekleyerek hassas olarak ayarlamak + için mod_expires kullanılabilir.

    -

    Zaman aşımı süresinin üst sınırı CacheMaxExpire yönergesi ile +

    Tazelik ömrünün üst sınırı CacheMaxExpire yönergesi ile belirlenebilir.

    -

    Şartlı İstekler için Özlü Kılavuz

    -

    Önbellekteki içerik zaman aşımına uğrayıp, içerik sağlayıcıya veya - arka sunucuya özgün isteği aktarmak yerine ayrı bir istek yapılması - gereği httpd’nin şartlı bir istek yapması sonucunu doğurur.

    - -

    Bir istemcinin veya önbelleğin aynı içeriğin farklı sürümleri - arasında ayrım yapabilmesi için HTTP protokolü bazı başlık alanları - önerir. Örneğin, "Etag:" başlığıyla sunulan bir özkaynak için - "If-None-Match:" başlığıyla bir şartlı istek yapmak mümkün olduğu gibi - özkaynak "Last-Modified:" başlığıyla sunuluyorsa şartlı istek - "If-Modified-Since:" başlığıyla yapılabilir, vesaire.

    - -

    Böyle bir şartlı istek yapıldığında yanıt koşulun içerikle eşleşip - eşleşmediğine bağlı olarak farklı olur. Eğer istek bir - "If-Modified-Since:" başlığıyla yapılmışsa ve içerik istekte - belirtilen zamandan önce değiştirilmemişse kısa ve öz olarak bir "304 - Not Modified" (Bir değişiklik yok) iletisiyle yanıt verilir.

    - -

    Aksi takdirde bir şartlı istek yapılmamış gibi içeriğin kendisi +

    Önbellekteki içeriğin zaman aşımına uğrayıp bayat hale gelmesi, + httpd’nin özgün isteği aktarmak yerine isteği değişikliğe uğratarak + şartlı bir istek yapması sonucunu doğurur.

    + +

    Özgün önbellekli yanıtta bir ETag başlığı mevcutsa, + mod_cache modülü özgün sunucuya yapılan isteğe + bir If-None-Match başlığı ekler. + Özgün önbellekli yanıtta bir Last-Modified başlığı + mevcutsa, mod_cache modülü özgün sunucuya yapılan + isteğe bir If-Modified-Since başlığı ekler. Bunlardan + birinin varlığı isteği koşullu yapar.

    + +

    Bir koşullu istek özgün sunucu tarafından alındığında, özgün sunucu + ETag veya Last-Modified başlığının isteğe + uygun olarak değişip değişmediğine bakmalıdır. Değişmemişse, özgün + sunucu kısa ve öz bir "304 Not Modified" yanıtı ile yanıt vermelidir. + Bunun önbellekteki anlamı şudur: Eskimiş içerik hala tazedir ve içerik + yeni tazelik ömrüne ulaşıncaya kadar sonraki isteklerde + kullanılmalıdır.

    + +

    İçerik değişmişse, bir şartlı istek yapılmamış gibi içeriğin kendisi sunulur.

    -

    Önbellekleme ile ilgili şartlı istekler çifte yarar sağlar. Birinci - olarak, böyle bir istek arkadaki sunucuya yapılıyorsa ve iki içerik de - aynıysa bunu saptamak kolay olur ve özkaynağın tamamını aktarma - külfetinden kurtulunur.

    +

    Şartlı istekler çifte yarar sağlar. Birinci olarak, böyle bir istek + özgün sunucuya yapılıyorsa ve iki içerik de aynıysa bunu saptamak kolay + olur ve özkaynağın tamamını aktarma külfetinden kurtulunur.

    -

    İkinci olarak, şartlı istekler arka sunucuda normalden daha az - faaliyete sebep olur. Durağan dosyalar için bu genellikle +

    İkinci olarak, iyi tasarlanmış bir özgün sunucu, koşullu istekler tam + bir yanıt üretmekten önemli ölçüde ucuz olacak şekilde tasarlanmış + olacaktır. Durağan dosyalar için bu genellikle stat() veya benzeri bir sistem çağrısıyla dosya boyutları ve değişiklik zamanına bakmak şeklinde gerçekleşir. - Böylelikle httpd yerel içeriği önbellekliyor olsa bile ve hatta - içerik zaman aşımına da uğrasa önbellekteki dosyada bir değişiklik - olmadığı takdirde içeriği önbellekten sunmak daha hızlı olacaktır. - Çünkü dosyayı önbellekten okumak, arka sunucudan okumaktan daha - hızlıdır (bu, bellekten okumayla diskten okumayı karşılaştırmak - gibidir).

    + Böylelikle, yerel içeriği bir değişiklik olmadığı takdirde önbellekten + sunmak daha hızlı olacaktır.

    + +

    Özgün sunucular koşullu istekleri desteklemek için her türlü çabayı + göstermelidir. Ancak, koşullu istekler desteklenmiyorsa, özgün sunucu + istek koşullu değilmiş gibi yanıt vermeli, önbellek ise, içerik + değişmiş ve yani içerik önbelleğe kaydedilmiş gibi yanıt vermelidir. Bu + durumda, önbellek basit bir iki durumlu (içerik ya tazedir ya da + silinmiş) önbellek gibi davranacaktır.

    Neler Önbelleklenebilir?

    -

    Evvelce bahsedildiği gibi httpd’de iki tür önbellekleme yapılır ve - bunlar farklı yöntemlerle çalışır. mod_file_cache - önbelleklemesinde dosyalar httpd başlatıldığı zamanki içerikle - saklanır. Bu modül tarafından önbelleğe alınmış bir dosya için istek - geldiğinde isteğin yolu kesilip önbellekteki dosya sunulur.

    - -

    mod_cache önbelleklemesinde işler biraz daha - karışıktır. Bir isteğe hizmet sunulurken istenen içerik evvelce - önbelleklenmemişse önbellekleme modülü önce içeriğin - önbelleklenebilirliğine bakar. Bir yanıtın önbelleklenebilirliğini - belirleyen koşullar şunlardır:

    +

    HTTP önbelleğin tarafından önbelleklenebilecek içerik + + RFC2616 Section 13.4 Response Cacheability belgesinde tanımlanmış + olup, bunlar şöyle özetlenebilir:

    1. Önbellekleme bu URL ile etkin kılınabilmelidir. CacheEnable ve CacheDisable yönergelerine bakınız.
    2. @@ -229,12 +315,10 @@
    3. İstek bir HTTP GET isteği olmalıdır.
    4. -
    5. İstek bir "Authorization:" başlığı içeriyorsa yanıt önbelleğe - alınmayacaktır.
    6. -
    7. Eğer yanıt bir "Authorization:" başlığı içeriyorsa ayrıca "Cache-Control:" başlığında da "s-maxage", "must-revalidate" veya - "public" değerlerinden birini içermelidir.
    8. + "public" değerlerinden birini içermelidir, aksi takdirde + önbelleklenmez.
    9. Eğer URL (GET yöntemi kullanan bir HTML formunun yaptığı gibi) bir sorgu dizgesi içeriyorsa yanıt, RFC2616’nın 13.9. bölümünde @@ -245,8 +329,8 @@
    10. CacheIgnoreNoLastMod yönergesinin kullanımını gerektiren bir durum olmadıkça 200 durum koduna sahip bir yanıtın "Etag", "Last-Modified" ve "Expires" - başlıklarından birini veya "Cache-Control:" başlığının max-age veya - max-age yönergelerinden birini (en azından) içermesi gerekir.
    11. + başlıklarından birini veya "Cache-Control:" başlığının "max-age" veya + "s-maxage" yönergelerinden birini (en azından) içermesi gerekir.
    12. CacheStorePrivate yönergesinin kullanımını gerektiren bir durum olmadıkça yanıt @@ -265,26 +349,35 @@

      Neler Önbelleklenmemeli?

      -

      Kısaca, istek zamana aşırı bağımlıysa ya da istek kısmen bile olsa - HTTP uzlaşımıyla bağdaşmıyorsa önbelleğe alınmamalıdır.

      +

      İçerik zamana bağımlıysa ya da istek kısmen bile olsa HTTP uzlaşımıyla + bağdaşmıyorsa önbelleğe alınmamalıdır. Bu içerik önbelleklenemeyeceğini + Cache-Control başlığını kullanarak sunucuya + bildirmelidir.

      -

      İçeriği istekçinin IP adresine bağlı olarak değişen veya her beş - dakikada bir değişikliğe uğrayan bir devingen içeriğe sahipseniz böyle - bir içerik asla önbelleğe alınmamalıdır.

      +

      İçerik sıkça değişiyorsa, tazelik ömrü dakikalar veya saniyelerle + ifade ediliyorsa, içerik yine de önbelleklenebilir. Ancak, tam + yanıtların düzenli olarak üretilmemesinin temini için özgün sunucunun + koşullu istekleri doğru olarak desteklemesi + sağlanmalıdır.

      -

      Diğer taraftan, içerik HTTP başlığındaki değerlere bağlı olarak - değişiyorsa içeriğin bir "Vary" başlığı kullanılarak akıllıca - önbelleklenmesi imkanı mevcuttur.

      +

      İstemcinin sağladığı istek başlıklarına dayanarak değişen içerik, + Vary yanıt başlığının akıllıca kullanımıyla + önbelleklenebilir.

      Değişken/Uzlaşımlı İçerik

      -

      "Vary" başlıklı bir yanıt arka sunucudan istenirken - mod_cache tarafından alınmışsa akıllıca ele alınmaya - çalışılacaktır. Mümkünse, mod_cache gelecekte bu - içerikle ilgili isteklerin "Vary" başlıklı yanıtları olacağını - saptayacak ve önbellekten doğru içerikle yanıt verecektir.

      +

      Özgün sunucu, istekteki başlık değerlerine dayanarak farklı + içeriklerle yanıt vermeye ayarlandığı takdirde, örneğin aynı URL'de + farklı dillerde içerik sunmak gibi, HTTP'nin önbellekleme mekanizması + aynı URL'de aynı sayfanın değişik sürümlerini önbelleklemeyi mümkün + kılar.

      + +

      Bu özgün sunucu tarafından bir Vary başlığı eklenerek + yapılır. Bir sayfanın farklı sürümleri arasındaki farkları saptarken + önbellek tarafından hangi başlıkların hesaba katılacağını + Vary başlığı belirler.

      Örneğin, bir yanıt şöyle bir başlık ile alınmışsa,

      @@ -294,262 +387,51 @@

      mod_cache sadece accept-language ve accept-charset başlıkları özgün istekle eşleşen önbellekli içeriği sunacaktır.

      - -
    top
    -
    -

    Güvenlik Kaygıları

    +

    İçeriğin farklı sürümleri yan yana önbelleklenebilir. + mod_cache modülü Vary başlığını + kullanarak başlıkta listelenmiş istek başlıklarının uygun değerlerini + saptar ve istemciye hangi sürümle yanıt verileceğine karar verir.

    -

    Erişim Denetimi ve Yetkilendirme

    - - -

    mod_cache çoğunlukla bir karşı vekile sahip olmak - amacıyla kullanılır. Arka sunucunun sorgulanmasını gerektirmeyen tüm - istekler önbellekleme modülü tarafından karşılanacaktır. Yerel - özkaynakların önbelleklenmesi söz konusu olduğunda httpd’nin güvenlik - modeli büyükçe bir değişikliğe uğrar.

    - -

    Olası .htaccess dosyalarının dosya sisteminin tamamında - taranması çok pahalı bir işlem olduğundan mod_cache, - (işlemi hızlandırmak için) önbelleğe almanın temel amacını kısmen - gözardı ederek, önbellekteki içeriğin sunumu için gerekli - yetkilendirmenin olup olmadığı konusunda bir karar üretmez. Başka bir - deyişle, eğer mod_cache bir kısım içeriği önbelleğe - almışsa içerik zaman aşımına uğramadığı sürece bu içerik önbellekten - sunulacaktır.

    - -

    Örneğin, yapılandırmanız bir özkaynağa IP adresine göre erişime izin - veriyorsa bu içeriğin önbelleğe alınmayacağından emin olmalısınız. - Bunu CacheDisable - yönergesini veya mod_expires kullanarak - yapabilirsiniz. Bunu yapmaz, olayı kendi haline bırakırsanız - mod_cache bir karşı vekil gibi çalışarak sunulan her - içeriği arabelleğe alacak ve hangi IP adresinden gelirse gelsin her - istemciye bunu sunacaktır.

    - - -

    Yerel İstismarcılar

    - - -

    Son kullanıcılarıın isteklerine önbellekten hizmet sunulduğundan - önbelleğin kendisi içerikle etkileşime geçmek isteyenlerin veya - içeriği tahrif etmek isteyenlerin hedefi haline gelebilir. httpd’yi - çalıştıran kullanıcı tarafından her zaman önbelleğe yazılabileceğini - akıldan çıkarmamak önemlidir. Bu durumda alışılmışın tersine tüm - içeriğin Apache kullanıcısı tarafından yazılamamasının sağlanması - önerilir.

    - -

    Eğer Apache kullanıcısı, örneğin bir CGI sürecindeki açık nedeniyle - tehlikeye atılırsa, önbellek hedef alınabilir. - mod_cache_disk kullanılırken önbellekteki bir öğeyi - değiştirmek veya önbelleğe yeni bir öğe eklemek görece daha - kolaydır.

    - -

    Bu risk, Apache kullanıcısını kullanan diğer saldırı türleriyle - karşılaştırıldığında daha yüksektir. mod_cache_disk - kullanıyorsanız şunları aklınızdan çıkarmayın: (1) httpd güvenlik - güncellemelerini takip edin ve sunucunuzu buna göre güncelleyin. (2) - Mümkünse suEXEC kullanarak CGI süreçlerini - Apache kullanıcısı olmayan bir kullanıcının aidiyetinde çalıştırın.

    - - - -

    Önbellek Zehirlenmeleri

    - - -

    httpd bir önbellekli vekil sunucu olarak çalıştığında önbellek - zehirlenmesi adı verilen sorunla karşılaşılma olasılığı vardır. - Önbellek zehirlenmesi, vekil sunucunun arka sunucudan yanlış (ve - genellikle istenmeyen) içerik almasına sebep olan bir saldırı türünü - betimlemek için yaygın olarak kullanılan bir terimdir.

    - -

    Örneğin httpd’nin çalıştığı sistemin kullandığı DNS sunucuları DNS - önbellek zehirlenmesinden etkilenebilecek durumdaysa, bir saldırgan - httpd’nin istekleri almak için başvuracağı kaynak sunucunun yerini - değiştirebilir. Diğer bir örnek, HTTP istek kaçakçılığı adı verilen - bir saldırı türüdür.

    - -

    Bu belge HTTP istek kaçakçılığını derinliğine incelenmesi için uygun - yer değildir (böyle kaynaklara arama motorunuzla erişebilirsiniz). - Bununla birlikte, vekil tarafından kaynak sunucudan alınan içeriği - tamamen denetim altına almak amacıyla kaynak sunucudaki bir açığı - istismar etmeye yönelik bir dizi istek yapılabileceğinin olasılık - dahilinde olduğunu bilmenizde yarar vardır.

    -
    top
    -

    Dosya Tanıtıcı Önbelleklemesi

    - - - +

    Önbellek Ayarlama Örnekleri

    -

    Bir dosyanın açılması işlemi, özellikle de ağ dosya sistemlerinde - bulunan dosyalar için önemli bir gecikme kaynağı olabilir. Önbellekte, - çok sunulan dosyaların kendilerinin değil, açık dosya tanıtıcılarının - saklanması httpd’yi bu tür gecikmelerden koruyabilir. httpd’de tek türde - dosya tanıtıcı önbelleklemesi yapılabilmektedir.

    - -

    CacheFile yönergesi ile

    - - -

    httpd’de mevcut önbelleklemenin en temel şekli - mod_file_cache tarafından sağlanan dosya tanıtıcı - önbelleklemesidir. Bu önbellek türü dosyaların kendilerini değil açık - dosya tanıtıcılarının bir listesini saklar. Dosyaların bu anlamda - önbelleklenmesi, CacheFile yönergesi yapılandırma dosyasında belirtilerek - sağlanabilir.

    - -

    CacheFile yönergesi - belirtilen dosyanın httpd başlatıldığında açılmasını ve dosya için - yapılan sonraki her istekte bu dosya tanıtıcısının kullanılmasını - sağlar.

    - -

    - CacheFile /usr/local/apache2/htdocs/index.html -

    - -

    Büyük miktarda dosyayı bu anlamda önbelleklemeyi tasarlıyorsanız - işletim sisteminizin açık dosya tanıtıcılarının sayısı ile ilgili - sınırlamasını uygun bir değere ayarlamanız gerekebilir.

    - -

    CacheFile yönergesini - kullandığınız takdirde dosya içeriğindeki değişiklikleri anında isteğe - yansıtamazsınız. httpd dosyayı ilk başlatıldığındaki haliyle - sunar.

    - -

    Eğer httpd çalışırken dosya silinmişse httpd ilk başlatıldığındaki - haline ilişkin dosya tanıtıcıyı sağlamaya ve dolayısıyla dosya - içeriğini sunmaya devam edecektir. Yani, dosya silinmiş ve artık dosya - sisteminde görünmüyor olsa bile httpd durdurulup dosya tanıtıcıları - kapanmadıkça dosyaların silinmesiyle açılan yer serbest - kalmayacaktır.

    -
    top
    -
    -

    Sistem Belleğinde Önbellekleme

    - - - -

    İçeriğin sistem belleğinden sunulması içerik sunmanın evrensel olarak - en hızlı yoludur. Dosyaların bir disk denetleyiciden okunması ya da daha - kötüsü uzak bir ağdan okunması bellekten okumayla karşılaştırılamayacak - ölçüde yavaş işlemlerdir. Disk denetleyiciler genellikle fiziksel - süreçleri denetlerler. Ağ erişimi ise band genişliği sınırlamalarından - etkilenir. Halbuki bellek erişimi sadece nano saniyeler mertebesinde - gerçekleşir.

    + -

    Sistem belleği en pahalı saklama ortamı olması sebebiyle en verimli - şekilde kullanımı önemlidir. Dosyaları sistem belleğinde saklamakla - sistemin kullanabileceği bellek miktarını azaltmış olursunuz. İşletim - sistemi önbelleklemesinde göreceğiniz gibi bu öyle basit bir konu - değildir. httpd’nin kendi kullandığı belleğin bir kısmını önbellek - olarak ayırırken çok fazla bellek kullanmamak önemlidir. Aksi takdirde - işletim sistemi belleğin yetmediği noktada belleği diske - takaslayacağından istenen başarım artışı sağlanamayacaktır.

    - -

    İşletim Sistemi Önbelleklemesi

    +

    Disk Üzerinde Önbellekleme

    -

    Günümüz iştetim sistemlerinin hemen hemen tamamında bellek içi - dosya/veri saklama işlemlerini çekirdek yönetir. Bu güçlü bir - özelliktir ve işletim sistemlerinin büyük çoğunluğu bunu böyle yapar. - Örneğin, Linux’ta bir dosyanın ilk defa okunduğunda ve ikinci kez - okunduğunda işlemcinin ne kadar meşgul edildiğine bakalım:

    +

    mod_cache modülü önbelleği yönetmek için çeşitli + depolama ortamlarına özgü gerçeklenimleri kullanır. Diske önbellekleme + desteğini mod_cache_disk sağlar.

    -

    - colm@coroebus:~$ time cat testfile > /dev/null
    - real 0m0.065s
    - user 0m0.000s
    - sys 0m0.001s
    - colm@coroebus:~$ time cat testfile > /dev/null
    - real 0m0.003s
    - user 0m0.003s
    - sys 0m0.000s -

    +

    Tipik olarak modül şöyle yapılandırılır:

    -

    Küçük bir dosya için bile okuma süresi bakımından büyük fark ortaya - çıkmaktadır. Bunun sebebi çekirdeğin dosya içeriğini bellek daha - güncel amaçlar için lazım olana dek bellek içinde saklamasıdır.

    - -

    Sisteminizde yeterince yedek bellek olduğundan eminseniz, bu - önbellekte daha fazla dosya saklanacağından emin olabilirsiniz. - Bundan, önbelleğin sistem belleğinde verimli biçimde tutulması için - httpd’de ek bir yapılandırmaya gidilmesinin gerekmediği sonucu - çıkarılabilir.

    - -

    Bundan başka, işletim sistemi dosyaların değiştiği ve silindiği - zamanları bildiğinden bu tür dosyaların içerikleri gerektiğinde - önbellekten kendiliğinden silinmiş olur. Bellek içinde dosya saklarken - dosyaların değiştirilme zamanlarını bilme olanağı olmadığından bu - durum httpd’ye büyük yarar sağlar.

    - +
    CacheRoot   "/var/cache/apache/"
    +CacheEnable disk /
    +CacheDirLevels 2
    +CacheDirLength 1
    -

    İşletim sisteminin dosyaların önbelleklenmesi için sağladığı bunca - yarara ve başarım artışına karşın bellek içinde dosya önbelleklemenin - httpd tarafından yerine getirilmesinin daha iyi olacağı bazı durumlar - vardır.

    -

    MMapFile yönergesi ile

    - - -

    mod_file_cache modülü, bir durağan dosyanın - içeriğini sunucunun başlatılması sırasında (mmap sistem çağrısıyla) - belleğe eşlenmesini mümkün kılmak için MMapFile yönergesini sağlar. - httpd bu dosyaya gelecek sonraki istekler için dosyanın bellekiçi - içeriğini kullanacaktır.

    - -

    - MMapFile /usr/local/apache2/htdocs/index.html -

    - -

    CacheFile yönergesinde - olduğu gibi bu dosyalarda httpd başlatıldıktan sonra yapılacak bir - değişiklikten httpd’nin haberi olmayacaktır.

    - -

    MMapFile yönergesi - ayırdığı belleğin toplam miktarı ile ilgilenmez, dolayısıyla - yönergenin aşırı kullanımından kaçınmalısınız. httpd’nin çocuk - süreçlerinin her biri bu belleğin kendilerine ait birer kopyasını - yapacağından belleğe eşlenen dosyaların çok yer kaplamaması büyük önem - taşımaktadır; aksi takdirde işletim sistemi belleği diske - takaslayacağından beklenen fayda sağlanamayacaktır.

    - -
    top
    -
    -

    Disk Üzerinde Önbellekleme

    +

    En önemlisi önbelleklenen dosyaların yerel olarak saklanması olup + işletim sisteminin sağladığı bellekiçi önbelleklemeden de ayrıca + faydalanılmış olur. Bu bakımdan, dosyalar disk üzerinde saklansa bile + sıkça erişilen dosyalar işletim sistemi sayesinde aslında bellekten + sunulmuş olacaklardır.

    - - -

    mod_cache_disk modülü önbelleklemenin - mod_cache için disk üzerinde yapılmasını mümkün - kılar. Bbu önbellekleme akıllıca yapılır ve önbellekteki içerik - sadece geçerli kabul edildiği sürece sunulabilir.

    - -

    Modül bu amaçla genelde şöyle kullanılır:

    - -

    - CacheRoot /var/cache/apache/
    - CacheEnable disk /
    - CacheDirLevels 2
    - CacheDirLength 1 -

    - -

    En önemlisi önbelleklenen dosyaların yerel olarak saklanması olup - işletim sisteminin sağladığı bellekiçi önbelleklemeden de ayrıca - faydalanılmış olur. Bu bakımdan, dosyalar disk üzerinde saklansa bile - sıkça erişilen dosyalar işletim sistemi sayesinde aslında bellekten - sunulmuş olacaklardır.

    -

    Önbellekte Saklamanın Anlamı

    mod_cache_disk öğeleri önbellekte saklamak için istek yapılan URL’nin 22 karakterlik özetini oluşturur. Bu özet, çok sayıda URL’nin aynı özeti oluşturmaması için konak ismi, protokol, - port ve varsa CGI argümanlarından oluşur.

    + port ve varsa CGI argümanlarından başka Vary başlığında + tanımlı elemanlardan oluşur.

    Özeti oluşturan karakterler 64 karakterlik bir karakter kümesinden seçildiğinden oluşturulması olası farklı özet sayısı 64^22’dir. @@ -560,7 +442,8 @@ değerlerine göre önce dizinlere ayrılır.

    CacheDirLevels - yönergesi kaç alt seviye dizin olacağını belirler. Örneğin, yukarıdaki + yönergesi kaç alt seviye dizin olacağını ve CacheDirLength her dizinde kaç + karakter olacağını belirler. Örneğin, yukarıdaki özete sahip bir dosyanın isminin başına yukarıdaki yapılandırma örneğine uygun olarak /var/cache/apache/x/y/TGxSMO2b68mBCykqkp1w gibi bir önek @@ -615,23 +498,388 @@ htcacheclean’in çalıştırılma aralığını iyi belirlemek gerekir.

    +

    Ayrıca, htcacheclean için uygun bir "nice" seviyesi + seçilmesi önerilr. Böylece, sunucu çalışırken aracın ölçüsüz disk g/ç + yapmasına sebebiyet verilmemiş olur.

    +


    Şekil 1: Önbelleğin büyümesi ve düzenli aralıklarla temizlenmesi.

    -

    mod_cache_disk ne kadar önbellek alanı kullandığı - ile ilgili bir bilgi vermediğinden htcacheclean’in - bir temizlik sonrası yeterince büyük bir genişleme alanı kalacak - şekilde yapılandırılması önemlidir.

    +

    mod_cache_disk ne kadar bellek kullanıldığı hakkında + bilgi vermediğinden, htcacheclean'in bir temizliğin + ardından yeterli bir büyüme alanı kalacak şekilde yapılandırılması + temin edilmelidir.

    + + +

    memcached ile önbellekleme

    + + +

    mod_cache_socache modülünü kullanarak, + mod_cache çeşitli gerçeklenimlerden (diğer adıyla: + "sağlayıcılar"dan) gelen veriyi önbellekleyebilir. + mod_socache_memcache modülü kullanılarak, örneğin, + artalan saklama mekanizması olarak + memcached kullanıldığı + söylenebilir.

    + +

    Genelde modül şöyle yapılandırılır:

    + +
    CacheEnable socache /
    +CacheSocache memcache:memcd.example.com:11211
    + + +

    İlave memcached sunucular + CacheSocache memcache: satırının ardına virgüllerle + ayrılarak eklenebilir:

    + +
    CacheEnable socache /
    +CacheSocache memcache:mem1.example.com:11211,mem2.example.com:11212
    + + +

    Bu biçim diğer mod_cache_socache sağlayıcıları için de kullanılabilir:

    + +
    CacheEnable socache /
    +CacheSocache shmcb:/path/to/datafile(512000)
    + + +
    CacheEnable socache /
    +CacheSocache dbm:/path/to/datafile
    + + + + +
    top
    +
    +

    Genel İki durumlu Anahtar/Değer Paylaşımlı Nesne Önbellekleme

    + + + + +

    Apache HTTP sunucusu, SSL oturumları, kimlik doğrulama bilgileri gibi + önbelleklenebilen özel bilgiler için socache + arayüzü içinde düşük seviyeli bir paylaşımlı nesne önbelleğine + sahiptir.

    + +

    Her gerçeklenime uygun ek modüller de sağlanmıştır:

    + +
    +
    mod_socache_dbm
    +
    DBM tabanlı paylaşımlı nesne önbelleklemesi.
    +
    mod_socache_dc
    +
    Distcache tabanlı paylaşımlı nesne önbelleklemesi.
    +
    mod_socache_memcache
    +
    Memcache tabanlı paylaşımlı nesne önbelleklemesi.
    +
    mod_socache_shmcb
    +
    Paylaşımlı belleğe dayalı paylaşımlı nesne önbelleklemesi.
    +
    + +

    Kimlik Doğrulama Bilgilerinin Önbelleklenmesi

    + + + + +

    mod_authn_socache modülü kimlik doğrulama araçlarının + yükünün hafifletilmesini, kimlik doğrulama sonucunun önbelleklenmesini + sağlar.

    + + +

    SSL Oturumlarının Önbelleklenmesi

    + + + + +

    mod_ssl modülü, oturum önbelleği ve önbellek + zımbalaması sağlamak için socache arayüzünü kullanır.

    + +
    top
    +
    +

    Uzmanlaşmış Dosya Önbellekleme

    + + + + +

    Dosya sisteminin yavaş olabildiği veya dosya tanıtıcılarının + kullanımının pahalıya mal olduğu sistemlerde, sunucunun başlatılması + sırasında dosyaların belleğe yüklenmesi seçeneği vardır.

    + +

    Dosyaların açılmasının yavaş olduğu sistemlerde, dosyaların sunucunun + başlatılması sırasında açılması ve dosya tanıtıcısını önbelleklenmesi + seçeneği vardır. Bu seçeneklerin duruk dosyalara erişimin yavaş olduğu + sistemlere de bir yardımı olabilir.

    + +

    Dosya Tanıtıcı Önbelleklemesi

    + + +

    Bir dosyanın açılması işlemi, özellikle de ağ dosya sistemlerinde + bulunan dosyalar için önemli bir gecikme kaynağı olabilir. Önbellekte, + çok sunulan dosyaların kendilerinin değil, açık dosya tanıtıcılarının + saklanması httpd’yi bu tür gecikmelerden koruyabilir. httpd’de tek + türde dosya tanıtıcı önbelleklemesi yapılabilmektedir.

    + +

    CacheFile yönergesi ile

    + + +

    httpd’de mevcut önbelleklemenin en temel şekli + mod_file_cache tarafından sağlanan dosya tanıtıcı + önbelleklemesidir. Bu önbellek türü dosyaların kendilerini değil açık + dosya tanıtıcılarının bir listesini saklar. Dosyaların bu anlamda + önbelleklenmesi, CacheFile yönergesi yapılandırma dosyasında belirtilerek + sağlanabilir.

    + +

    CacheFile yönergesi + belirtilen dosyanın httpd başlatıldığında açılmasını ve dosya için + yapılan sonraki her istekte bu dosya tanıtıcısının kullanılmasını + sağlar.

    + +
    CacheFile /usr/local/apache2/htdocs/index.html
    + + +

    Büyük miktarda dosyayı bu anlamda önbelleklemeyi tasarlıyorsanız + işletim sisteminizin açık dosya tanıtıcılarının sayısı ile ilgili + sınırlamasını uygun bir değere ayarlamanız gerekebilir.

    + +

    CacheFile yönergesini + kullandığınız takdirde dosya içeriğindeki değişiklikleri anında + isteğe yansıtamazsınız. httpd dosyayı ilk başlatıldığındaki haliyle + sunar.

    + +

    Eğer httpd çalışırken dosya silinmişse httpd ilk başlatıldığındaki + haline ilişkin dosya tanıtıcıyı sağlamaya ve dolayısıyla dosya + içeriğini sunmaya devam edecektir. Yani, dosya silinmiş ve artık + dosya sisteminde görünmüyor olsa bile httpd durdurulup dosya + tanıtıcıları kapanmadıkça dosyaların silinmesiyle açılan yer serbest + kalmayacaktır.

    + + + + +

    Sistem Belleğinde Önbellekleme

    + + +

    İçeriğin sistem belleğinden sunulması içerik sunmanın evrensel olarak + en hızlı yoludur. Dosyaların bir disk denetleyiciden okunması ya da daha + kötüsü uzak bir ağdan okunması bellekten okumayla karşılaştırılamayacak + ölçüde yavaş işlemlerdir. Disk denetleyiciler genellikle fiziksel + süreçleri denetlerler. Ağ erişimi ise band genişliği sınırlamalarından + etkilenir. Halbuki bellek erişimi sadece nano saniyeler mertebesinde + gerçekleşir.

    + +

    Sistem belleği en pahalı saklama ortamı olması sebebiyle en verimli + şekilde kullanımı önemlidir. Dosyaları sistem belleğinde saklamakla + sistemin kullanabileceği bellek miktarını azaltmış olursunuz. İşletim + sistemi önbelleklemesinde göreceğiniz gibi bu öyle basit bir konu + değildir. httpd’nin kendi kullandığı belleğin bir kısmını önbellek + olarak ayırırken çok fazla bellek kullanmamak önemlidir. Aksi takdirde + işletim sistemi belleğin yetmediği noktada belleği diske + takaslayacağından istenen başarım artışı sağlanamayacaktır.

    + +

    İşletim Sistemi Önbelleklemesi

    + + +

    Günümüz iştetim sistemlerinin hemen hemen tamamında bellek içi + dosya/veri saklama işlemlerini çekirdek yönetir. Bu güçlü bir + özelliktir ve işletim sistemlerinin büyük çoğunluğu bunu böyle yapar. + Örneğin, Linux’ta bir dosyanın ilk defa okunduğunda ve ikinci kez + okunduğunda işlemcinin ne kadar meşgul edildiğine bakalım:

    + +

    + colm@coroebus:~$ time cat testfile > /dev/null
    + real 0m0.065s
    + user 0m0.000s
    + sys 0m0.001s
    + colm@coroebus:~$ time cat testfile > /dev/null
    + real 0m0.003s
    + user 0m0.003s
    + sys 0m0.000s +

    + +

    Küçük bir dosya için bile okuma süresi bakımından büyük fark ortaya + çıkmaktadır. Bunun sebebi çekirdeğin dosya içeriğini bellek daha + güncel amaçlar için lazım olana dek bellek içinde saklamasıdır.

    + +

    Sisteminizde yeterince yedek bellek olduğundan eminseniz, bu + önbellekte daha fazla dosya saklanacağından emin olabilirsiniz. + Bundan, önbelleğin sistem belleğinde verimli biçimde tutulması için + httpd’de ek bir yapılandırmaya gidilmesinin gerekmediği sonucu + çıkarılabilir.

    + +

    Bundan başka, işletim sistemi dosyaların değiştiği ve silindiği + zamanları bildiğinden bu tür dosyaların içerikleri gerektiğinde + önbellekten kendiliğinden silinmiş olur. Bellek içinde dosya + saklarken dosyaların değiştirilme zamanlarını bilme olanağı + olmadığından bu durum httpd’ye büyük yarar sağlar.

    + + +

    İşletim sisteminin dosyaların önbelleklenmesi için sağladığı bunca + yarara ve başarım artışına karşın bellek içinde dosya önbelleklemenin + httpd tarafından yerine getirilmesinin daha iyi olacağı bazı durumlar + vardır.

    + +

    MMapFile yönergesi ile

    + + +

    mod_file_cache modülü, bir durağan dosyanın + içeriğini sunucunun başlatılması sırasında (mmap sistem çağrısıyla) + belleğe eşlenmesini mümkün kılmak için MMapFile yönergesini sağlar. + httpd bu dosyaya gelecek sonraki istekler için dosyanın bellekiçi + içeriğini kullanacaktır.

    + +
    MMapFile /usr/local/apache2/htdocs/index.html
    + + +

    CacheFile + yönergesinde olduğu gibi bu dosyalarda httpd başlatıldıktan sonra + yapılacak bir değişiklikten httpd’nin haberi olmayacaktır.

    + +

    MMapFile yönergesi + ayırdığı belleğin toplam miktarı ile ilgilenmez, dolayısıyla + yönergenin aşırı kullanımından kaçınmalısınız. httpd’nin çocuk + süreçlerinin her biri bu belleğin kendilerine ait birer kopyasını + yapacağından belleğe eşlenen dosyaların çok yer kaplamaması büyük + önem taşımaktadır; aksi takdirde işletim sistemi belleği diske + takaslayacağından beklenen fayda sağlanamayacaktır.

    + + +
    top
    +
    +

    Güvenlik Kaygıları

    + + +

    Erişim Denetimi ve Yetkilendirme

    + + +

    CacheQuickHandler + yönergesine On değerinin atandığı öntanımlı durumda + mod_cache kullanımı, daha çok sunucunun önüne + vidalanmış önbelleklemeli bir karşı vekile sahip olmak gibidir. Özgün + sunucunun bir harici önbellekmiş gibi sorgulanmasını gerektirmeyen tüm + istekler önbellekleme modülü tarafından karşılanacaktır. Bu durum + httpd'nin güvenlik modelini büyük ölçüde değiştirir.

    + +

    Olası .htaccess dosyalarının dosya sisteminin tamamında + taranması çok pahalı bir işlem olduğundan mod_cache, + (işlemi hızlandırmak için) önbelleğe almanın temel amacını kısmen + gözardı ederek, önbellekteki içeriğin sunumu için gerekli + yetkilendirmenin olup olmadığı konusunda bir karar üretmez. Başka bir + deyişle, eğer mod_cache bir kısım içeriği önbelleğe + almışsa içerik zaman aşımına uğramadığı sürece bu içerik önbellekten + sunulacaktır.

    + +

    Örneğin, yapılandırmanız bir özkaynağa IP adresine göre erişime izin + veriyorsa bu içeriğin önbelleğe alınmayacağından emin olmalısınız. + Bunu CacheDisable + yönergesini veya mod_expires modülünü kullanarak + yapabilirsiniz. Bunu yapmaz, olayı kendi haline bırakırsanız + mod_cache bir karşı vekil gibi çalışarak sunulan her + içeriği önbelleğe alacak ve hangi IP adresinden gelirse gelsin her + istemciye bunu sunacaktır.

    + +

    CacheQuickHandler + yönergesine Off atandığı takdirde, istek işleme + aşamalarının tamamı yerine getirilir ve güvenlik modeli değişmeden + kalır.

    +

    Yerel İstismarcılar

    + + +

    Son kullanıcılarıın isteklerine önbellekten hizmet sunulduğundan + önbelleğin kendisi içerikle etkileşime geçmek isteyenlerin veya + içeriği tahrif etmek isteyenlerin hedefi haline gelebilir. httpd’yi + çalıştıran kullanıcı tarafından her zaman önbelleğe yazılabileceğini + akıldan çıkarmamak önemlidir. Bu durumda alışılmışın tersine tüm + içeriğin Apache kullanıcısı tarafından yazılamamasının sağlanması + önerilir.

    + +

    Eğer Apache kullanıcısı, örneğin bir CGI sürecindeki açık nedeniyle + tehlikeye atılırsa, önbellek hedef alınabilir. + mod_cache_disk kullanılırken önbellekteki bir öğeyi + değiştirmek veya önbelleğe yeni bir öğe eklemek görece daha + kolaydır.

    + +

    Bu risk, Apache kullanıcısını kullanan diğer saldırı türleriyle + karşılaştırıldığında daha yüksektir. mod_cache_disk + kullanıyorsanız şunları aklınızdan çıkarmayın: (1) httpd güvenlik + güncellemelerini takip edin ve sunucunuzu buna göre güncelleyin. (2) + Mümkünse suEXEC kullanarak CGI süreçlerini + Apache kullanıcısı olmayan bir kullanıcının aidiyetinde çalıştırın.

    + + +

    Önbellek Zehirlenmeleri

    + + +

    httpd bir önbellekli vekil sunucu olarak çalıştığında önbellek + zehirlenmesi adı verilen sorunla karşılaşılma olasılığı vardır. + Önbellek zehirlenmesi, vekil sunucunun özgün sunucudan yanlış (ve + genellikle istenmeyen) içerik almasına sebep olan bir saldırı türünü + betimlemek için yaygın olarak kullanılan bir terimdir.

    + +

    Örneğin httpd’nin çalıştığı sistemin kullandığı DNS sunucuları DNS + önbellek zehirlenmesinden etkilenebilecek durumdaysa, bir saldırgan + httpd’nin istekleri almak için başvuracağı kaynak sunucunun yerini + değiştirebilir. Diğer bir örnek, HTTP istek kaçakçılığı adı verilen + bir saldırı türüdür.

    + +

    Bu belge HTTP istek kaçakçılığını derinliğine incelenmesi için uygun + yer değildir (böyle kaynaklara arama motorunuzla erişebilirsiniz). + Bununla birlikte, vekil tarafından kaynak sunucudan alınan içeriği + tamamen denetim altına almak amacıyla kaynak sunucudaki bir açığı + istismar etmeye yönelik bir dizi istek yapılabileceğinin olasılık + dahilinde olduğunu bilmenizde yarar vardır.

    + + +

    Hizmet Reddi / Önbelleğin Engellenmesi

    + + +

    Vary mekanizması aynı URL'nin çok sayıda sürümünün yan yana + önbelleklenmesini mümkün kılar. İstemci tarafından sağlanan başlık + değerlerine bağlı olarak, önbellek istemciye gönderilecek doğru yanıtı + bulacaktır. Normal kullanımda olası değerlerin çok geniş olduğunun + bilindiği durumda bir başlığı (örn, User-Agent) + değişikliğe uğratma çabası bu mekanizmayı bir sorun haline getirebilir. + Sitenin tanınırlığına bağlı olarak aynı URL'nin binlerce hatta + milyonlarca önbellek girdisi oluşabilir ve bunlar önbellekteki diğer + girdilerin yerini alabilir.

    + +

    Diğer yandan, belli bir özkaynağın URL'sinin her istekte + değiştirilmesi ihtiyacı ortaya çıkabilir. Bu normalde URL dizgesine bir + "cachebuster" dizgesi eklenerek yapılır. Bu içerik sunucu tarafından + anlamlı bir tazelik ömrüyle önbelleklenebilir olarak imlenmişse bu + girdiler kısa zamanda önbellekteki meşru girdilerin yerini alabilir. + mod_cache modülü bunun önlenmesi için CacheIgnoreURLSessionIdentifiers + yönergesine sahipse de bu yönerge, yoldaki vekillerin veya tarayıcı + önbelleklerinin aynı hizmet reddi saldırısına maruz kalmamaları için + dikkatle kullanılmalıdır.

    +

    Mevcut Diller:  en  |  fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/caching.xml b/docs/manual/caching.xml index 20d5619f2a6..9131e342bdb 100644 --- a/docs/manual/caching.xml +++ b/docs/manual/caching.xml @@ -34,39 +34,50 @@
    Introduction - -

    As of Apache HTTP server version 2.2 mod_cache - and mod_file_cache are no longer marked - experimental and are considered suitable for production use. These - caching architectures provide a powerful means to accelerate HTTP - handling, both as an origin webserver and as a proxy.

    - -

    mod_cache and its provider modules - mod_cache_disk - provide intelligent, HTTP-aware caching. The content itself is stored - in the cache, and mod_cache aims to honor all of the various HTTP - headers and options that control the cachability of content. It can - handle both local and proxied content. mod_cache - is aimed at both simple and complex caching configurations, where - you are dealing with proxied content, dynamic local content or - have a need to speed up access to local files which change with - time.

    - -

    mod_file_cache on the other hand presents a more - basic, but sometimes useful, form of caching. Rather than maintain - the complexity of actively ensuring the cachability of URLs, - mod_file_cache offers file-handle and memory-mapping - tricks to keep a cache of files as they were when httpd was last - started. As such, mod_file_cache is aimed at improving - the access time to local static files which do not change very - often.

    - -

    As mod_file_cache presents a relatively simple - caching implementation, apart from the specific sections on CacheFile and MMapFile, the explanations - in this guide cover the mod_cache caching - architecture.

    + +

    The Apache HTTP server offers a range of caching features that + are designed to improve the performance of the server in various + ways.

    + +
    +
    Three-state RFC2616 HTTP caching
    +
    + mod_cache + and its provider modules + mod_cache_disk + provide intelligent, HTTP-aware caching. The content itself is stored + in the cache, and mod_cache aims to honor all of the various HTTP + headers and options that control the cacheability of content + as described in + Section + 13 of RFC2616. + mod_cache + is aimed at both simple and complex caching configurations, where + you are dealing with proxied content, dynamic local content or + have a need to speed up access to local files on a potentially + slow disk. +
    + +
    Two-state key/value shared object caching
    +
    + The shared object cache API (socache) + and its provider modules provide a + server wide key/value based shared object cache. These modules + are designed to cache low level data such as SSL sessions and + authentication credentials. Backends allow the data to be stored + server wide in shared memory, or datacenter wide in a cache such + as memcache or distcache. +
    + +
    Specialized file caching
    +
    + mod_file_cache + offers the ability to pre-load + files into memory on server startup, and can improve access + times and save file handles on files that are accessed often, + as there is no need to go to disk on each request. +
    +

    To get the most from this document, you should be familiar with the basics of HTTP, and have read the Users' Guides to @@ -75,102 +86,186 @@

    -
    +
    - Caching Overview + Three-state RFC2616 HTTP caching mod_cache mod_cache_disk - mod_file_cache CacheEnable CacheDisable - CacheFile - MMapFile UseCanonicalName CacheNegotiatedDocs -

    There are two main stages in mod_cache that can - occur in the lifetime of a request. First, mod_cache - is a URL mapping module, which means that if a URL has been cached, - and the cached version of that URL has not expired, the request will - be served directly by mod_cache.

    - -

    This means that any other stages that might ordinarily happen - in the process of serving a request -- for example being handled - by mod_proxy, or mod_rewrite -- - won't happen. But then this is the point of caching content in - the first place.

    - -

    If the URL is not found within the cache, mod_cache - will add a filter to the request handling. After - httpd has located the content by the usual means, the filter will be run - as the content is served. If the content is determined to be cacheable, - the content will be saved to the cache for future serving.

    - -

    If the URL is found within the cache, but also found to have expired, - the filter is added anyway, but mod_cache will create - a conditional request to the backend, to determine if the cached version - is still current. If the cached version is still current, its - meta-information will be updated and the request will be served from the - cache. If the cached version is no longer current, the cached version - will be deleted and the filter will save the updated content to the cache - as it is served.

    +

    The HTTP protocol contains built in support for an in-line caching + mechanism + + described by section 13 of RFC2616, and the + mod_cache module can be used to take advantage of + this.

    + +

    Unlike a simple two state key/value cache where the content + disappears completely when no longer fresh, an HTTP cache includes + a mechanism to retain stale content, and to ask the origin server + whether this stale content has changed and if not, make it fresh + again.

    + +

    An entry in an HTTP cache exists in one of three states:

    + +
    +
    Fresh
    +
    + If the content is new enough (younger than its freshness + lifetime), it is considered fresh. An + HTTP cache is free to serve fresh content without making any + calls to the origin server at all. +
    +
    Stale
    +
    +

    If the content is too old (older than its freshness + lifetime), it is considered stale. An + HTTP cache should contact the origin server and check whether + the content is still fresh before serving stale content to a + client. The origin server will either respond with replacement + content if not still valid, or ideally, the origin server will + respond with a code to tell the cache the content is still + fresh, without the need to generate or send the content again. + The content becomes fresh again and the cycle continues.

    + +

    The HTTP protocol does allow the cache to serve stale data + under certain circumstances, such as when an attempt to freshen + the data with an origin server has failed with a 5xx error, or + when another request is already in the process of freshening + the given entry. In these cases a Warning header + is added to the response.

    +
    +
    Non Existent
    +
    + If the cache gets full, it reserves the option to delete content + from the cache to make space. Content can be deleted at any time, + and can be stale or fresh. The htcacheclean tool can be + run on a once off basis, or deployed as a daemon to keep the size + of the cache within the given size, or the given number of inodes. + The tool attempts to delete stale content before attempting to + delete fresh content. +
    +
    + +

    Full details of how HTTP caching works can be found in + + Section 13 of RFC2616.

    + +
    + Interaction with the Server + +

    The mod_cache module hooks into the server in two + possible places depending on the value of the + CacheQuickHandler directive: +

    + +
    +
    Quick handler phase
    +
    +

    This phase happens very early on during the request processing, + just after the request has been parsed. If the content is + found within the cache, it is served immediately and almost + all request processing is bypassed.

    + +

    In this scenario, the cache behaves as if it has been "bolted + on" to the front of the server.

    + +

    This mode offers the best performance, as the majority of + server processing is bypassed. This mode however also bypasses the + authentication and authorization phases of server processing, so + this mode should be chosen with care when this is important.

    + +

    Requests with an "Authorization" header (for example, HTTP Basic + Authentication) are neither cacheable nor served from the cache + when mod_cache is running in this phase.

    +
    +
    Normal handler phase
    +
    +

    This phase happens late in the request processing, after all + the request phases have completed.

    + +

    In this scenario, the cache behaves as if it has been "bolted + on" to the back of the server.

    + +

    This mode offers the most flexibility, as the potential exists + for caching to occur at a precisely controlled point in the filter + chain, and cached content can be filtered or personalized before + being sent to the client.

    +
    +
    + +

    If the URL is not found within the cache, mod_cache + will add a filter to the filter stack in order + to record the response to the cache, and then stand down, allowing normal + request processing to continue. If the content is determined to be + cacheable, the content will be saved to the cache for future serving, + otherwise the content will be ignored.

    + +

    If the content found within the cache is stale, the + mod_cache module converts the request into a + conditional request. If the origin server responds with + a normal response, the normal response is cached, replacing the content + already cached. If the origin server responds with a 304 Not Modified + response, the content is marked as fresh again, and the cached content + is served by the filter instead of saving it.

    +
    Improving Cache Hits -

    When caching locally generated content, ensuring that - UseCanonicalName is set to - On can dramatically improve the ratio of cache hits. This - is because the hostname of the virtual-host serving the content forms - a part of the cache key. With the setting set to On +

    When a virtual host is known by one of many different server aliases, + ensuring that UseCanonicalName is + set to On can dramatically improve the ratio of cache hits. + This is because the hostname of the virtual-host serving the content is + used within the cache key. With the setting set to On virtual-hosts with multiple server names or aliases will not produce differently cached entities, and instead content will be cached as per the canonical hostname.

    -

    Because caching is performed within the URL to filename translation - phase, cached documents will only be served in response to URL requests. - Ordinarily this is of little consequence, but there is one circumstance - in which it matters: If you are using Server - Side Includes;

    - - -<!-- The following include can be cached -->
    -<!--#include virtual="/footer.html" -->
    -
    -<!-- The following include can not be cached -->
    -<!--#include file="/path/to/footer.html" --> -
    - -

    If you are using Server Side Includes, and want the benefit of speedy - serves from the cache, you should use virtual include - types.

    - Expiry Periods - -

    The default expiry period for cached entities is one hour, however + Freshness Lifetime + +

    Well formed content that is intended to be cached should declare an + explicit freshness lifetime with the Cache-Control + header's max-age or s-maxage fields, or + by including an Expires header.

    + +

    At the same time, the origin server defined freshness lifetime can + be overridden by a client when the client presents their own + Cache-Control header within the request. In this case, + the lowest freshness lifetime between request and response wins.

    + +

    When this freshness lifetime is missing from the request or the + response, a default freshness lifetime is applied. The default + freshness lifetime for cached entities is one hour, however this can be easily over-ridden by using the CacheDefaultExpire directive. This - default is only used when the original source of the content does not - specify an expire time or time of last modification.

    + module="mod_cache">CacheDefaultExpire directive.

    If a response does not include an Expires header but does include a Last-Modified header, mod_cache - can infer an expiry period based on the use of the CacheLastModifiedFactor directive.

    -

    For local content, mod_expires may be used to - fine-tune the expiry period.

    +

    For local content, or for remote content that does not define its own + Expires header, mod_expires may be used to + fine-tune the freshness lifetime by adding max-age and + Expires.

    -

    The maximum expiry period may also be controlled by using the +

    The maximum freshness lifetime may also be controlled by using the CacheMaxExpire.

    @@ -178,58 +273,60 @@
    A Brief Guide to Conditional Requests -

    When content expires from the cache and is re-requested from the - backend or content provider, rather than pass on the original request, - httpd will use a conditional request instead.

    - -

    HTTP offers a number of headers which allow a client, or cache - to discern between different versions of the same content. For - example if a resource was served with an "Etag:" header, it is - possible to make a conditional request with an "If-None-Match:" - header. If a resource was served with a "Last-Modified:" header - it is possible to make a conditional request with an - "If-Modified-Since:" header, and so on.

    - -

    When such a conditional request is made, the response differs - depending on whether the content matches the conditions. If a request is - made with an "If-Modified-Since:" header, and the content has not been - modified since the time indicated in the request then a terse "304 Not - Modified" response is issued.

    - -

    If the content has changed, then it is served as if the request were - not conditional to begin with.

    - -

    The benefits of conditional requests in relation to caching are - twofold. Firstly, when making such a request to the backend, if the - content from the backend matches the content in the store, this can be - determined easily and without the overhead of transferring the entire - resource.

    - -

    Secondly, conditional requests are usually less strenuous on the - backend. For static files, typically all that is involved is a call - to stat() or similar system call, to see if the file has - changed in size or modification time. As such, even if httpd is - caching local content, even expired content may still be served faster - from the cache if it has not changed. As long as reading from the cache - store is faster than reading from the backend (e.g. mod_cache_disk with memory disk - compared to reading from disk).

    +

    When content expires from the cache and becomes stale, rather than + pass on the original request, httpd will modify the request to make + it conditional instead.

    + +

    When an ETag header exists in the original cached + response, mod_cache will add an + If-None-Match header to the request to the origin server. + When a Last-Modified header exists in the original + cached response, mod_cache will add an + If-Modified-Since header to the request to the origin + server. Performing either of these actions makes the request + conditional.

    + +

    When a conditional request is received by an origin server, the + origin server should check whether the ETag or the Last-Modified + parameter has changed, as appropriate for the request. If not, the + origin should respond with a terse "304 Not Modified" response. This + signals to the cache that the stale content is still fresh should be + used for subsequent requests until the content's new freshness lifetime + is reached again.

    + +

    If the content has changed, then the content is served as if the + request were not conditional to begin with.

    + +

    Conditional requests offer two benefits. Firstly, when making such + a request to the origin server, if the content from the origin + matches the content in the cache, this can be determined easily and + without the overhead of transferring the entire resource.

    + +

    Secondly, a well designed origin server will be designed in such + a way that conditional requests will be significantly cheaper to + produce than a full response. For static files, typically all that is + involved is a call to stat() or similar system call, to + see if the file has changed in size or modification time. As such, even + local content may still be served faster from the cache if it has not + changed.

    + +

    Origin servers should make every effort to support conditional + requests as is practical, however if conditional requests are not + supported, the origin will respond as if the request was not + conditional, and the cache will respond as if the content had changed + and save the new content to the cache. In this case, the cache will + behave like a simple two state cache, where content is effectively + either fresh or deleted.

    What Can be Cached? -

    As mentioned already, the two styles of caching in httpd work - differently, mod_file_cache caching maintains file - contents as they were when httpd was started. When a request is - made for a file that is cached by this module, it is intercepted - and the cached file is served.

    - -

    mod_cache caching on the other hand is more - complex. When serving a request, if it has not been cached - previously, the caching module will determine if the content - is cacheable. The conditions for determining cachability of - a response are;

    +

    The full definition of which responses can be cached by an HTTP + cache is defined in + + RFC2616 Section 13.4 Response Cacheability, and can be summed up as + follows:

    1. Caching must be enabled for this URL. See the The request must be a HTTP GET request.
    2. -
    3. If the request contains an "Authorization:" header, the response - will not be cached.
    4. -
    5. If the response contains an "Authorization:" header, it must also contain an "s-maxage", "must-revalidate" or "public" option - in the "Cache-Control:" header.
    6. + in the "Cache-Control:" header, or it won't be cached.
    7. If the URL included a query string (e.g. from a HTML form GET method) it will not be cached unless the response specifies an @@ -279,28 +373,41 @@
      What Should Not be Cached? -

      In short, any content which is highly time-sensitive, or which varies - depending on the particulars of the request that are not covered by - HTTP negotiation, should not be cached.

      +

      It should be up to the client creating the request, or the origin + server constructing the response to decide whether or not the content + should be cacheable or not by correctly setting the + Cache-Control header, and mod_cache should + be left alone to honor the wishes of the client or server as appropriate. +

      -

      If you have dynamic content which changes depending on the IP address - of the requester, or changes every 5 minutes, it should almost certainly - not be cached.

      +

      Content that is time sensitive, or which varies depending on the + particulars of the request that are not covered by HTTP negotiation, + should not be cached. This content should declare itself uncacheable + using the Cache-Control header.

      + +

      If content changes often, expressed by a freshness lifetime of minutes + or seconds, the content can still be cached, however it is highly + desirable that the origin server supports + conditional requests correctly to ensure that + full responses do not have to be generated on a regular basis.

      + +

      Content that varies based on client provided request headers can be + cached through intelligent use of the Vary response + header.

      -

      If on the other hand, the content served differs depending on the - values of various HTTP headers, it might be possible - to cache it intelligently through the use of a "Vary" header.

      Variable/Negotiated Content -

      If a response with a "Vary" header is received by - mod_cache when requesting content by the backend it - will attempt to handle it intelligently. If possible, - mod_cache will detect the headers attributed in the - "Vary" response in future requests and serve the correct cached - response.

      +

      When the origin server is designed to respond with different content + based on the value of headers in the request, for example to serve + multiple languages at the same URL, HTTP's caching mechanism makes it + possible to cache multiple variants of the same page at the same URL.

      + +

      This is done by the origin server adding a Vary header + to indicate which headers must be taken into account by a cache when + determining whether two variants are different from one another.

      If for example, a response is received with a vary header such as;

      @@ -311,270 +418,58 @@ Vary: negotiate,accept-language,accept-charset

      mod_cache will only serve the cached content to requesters with accept-language and accept-charset headers matching those of the original request.

      + +

      Multiple variants of the content can be cached side by side, + mod_cache uses the Vary header and the + corresponding values of the request headers listed by Vary + to decide on which of many variants to return to the client.

      -
    - -
    - Security Considerations - -
    - Authorization and Access Control - -

    Using mod_cache is very much like having a built - in reverse-proxy. Requests will be served by the caching module unless - it determines that the backend should be queried. When caching local - resources, this drastically changes the security model of httpd.

    - -

    As traversing a filesystem hierarchy to examine potential - .htaccess files would be a very expensive operation, - partially defeating the point of caching (to speed up requests), - mod_cache makes no decision about whether a cached - entity is authorised for serving. In other words; if - mod_cache has cached some content, it will be served - from the cache as long as that content has not expired.

    - -

    If, for example, your configuration permits access to a resource by IP - address you should ensure that this content is not cached. You can do this - by using the CacheDisable - directive, or mod_expires. Left unchecked, - mod_cache - very much like a reverse proxy - would cache - the content when served and then serve it to any client, on any IP - address.

    -
    - -
    - Local exploits - -

    As requests to end-users can be served from the cache, the cache - itself can become a target for those wishing to deface or interfere with - content. It is important to bear in mind that the cache must at all - times be writable by the user which httpd is running as. This is in - stark contrast to the usually recommended situation of maintaining - all content unwritable by the Apache user.

    - -

    If the Apache user is compromised, for example through a flaw in - a CGI process, it is possible that the cache may be targeted. When - using mod_cache_disk, it is relatively easy to - insert or modify a cached entity.

    - -

    This presents a somewhat elevated risk in comparison to the other - types of attack it is possible to make as the Apache user. If you are - using mod_cache_disk you should bear this in mind - - ensure you upgrade httpd when security upgrades are announced and - run CGI processes as a non-Apache user using suEXEC if possible.

    - -
    - -
    - Cache Poisoning - -

    When running httpd as a caching proxy server, there is also the - potential for so-called cache poisoning. Cache Poisoning is a broad - term for attacks in which an attacker causes the proxy server to - retrieve incorrect (and usually undesirable) content from the backend. -

    - -

    For example if the DNS servers used by your system running - httpd - are vulnerable to DNS cache poisoning, an attacker may be able to control - where httpd connects to when requesting content from the origin server. - Another example is so-called HTTP request-smuggling attacks.

    -

    This document is not the correct place for an in-depth discussion - of HTTP request smuggling (instead, try your favourite search engine) - however it is important to be aware that it is possible to make - a series of requests, and to exploit a vulnerability on an origin - webserver such that the attacker can entirely control the content - retrieved by the proxy.

    -
    -
    - File-Handle Caching +
    - - - mod_file_cache - - - CacheFile - - - -

    The act of opening a file can itself be a source of delay, particularly - on network filesystems. By maintaining a cache of open file descriptors - for commonly served files, httpd can avoid this delay. Currently - httpd - provides one implementation of File-Handle Caching.

    - -
    - CacheFile - -

    The most basic form of caching present in httpd is the file-handle - caching provided by mod_file_cache. Rather than caching - file-contents, this cache maintains a table of open file descriptors. Files - to be cached in this manner are specified in the configuration file using - the CacheFile - directive.

    - -

    The - CacheFile directive - instructs httpd to open the file when it is started and to re-use - this file-handle for all subsequent access to this file.

    - - - CacheFile /usr/local/apache2/htdocs/index.html - - -

    If you intend to cache a large number of files in this manner, you - must ensure that your operating system's limit for the number of open - files is set appropriately.

    - -

    Although using CacheFile - does not cause the file-contents to be cached per-se, it does mean - that if the file changes while httpd is running these changes will - not be picked up. The file will be consistently served as it was - when httpd was started.

    - -

    If the file is removed while httpd is running, it will continue - to maintain an open file descriptor and serve the file as it was when - httpd was started. This usually also means that although the file - will have been deleted, and not show up on the filesystem, extra free - space will not be recovered until httpd is stopped and the file - descriptor closed.

    -
    + Cache Setup Examples -
    - -
    - In-Memory Caching - - + - mod_file_cache + mod_cache + mod_cache_disk + mod_cache_socache + mod_socache_memcache CacheEnable - CacheDisable - MMapFile + CacheRoot + CacheDirLevels + CacheDirLength + CacheSocache -

    Serving directly from system memory is universally the fastest method - of serving content. Reading files from a disk controller or, even worse, - from a remote network is orders of magnitude slower. Disk controllers - usually involve physical processes, and network access is limited by - your available bandwidth. Memory access on the other hand can take mere - nano-seconds.

    - -

    System memory isn't cheap though, byte for byte it's by far the most - expensive type of storage and it's important to ensure that it is used - efficiently. By caching files in memory you decrease the amount of - memory available on the system. As we'll see, in the case of operating - system caching, this is not so much of an issue, but when using - httpd's own in-memory caching it is important to make sure that you - do not allocate too much memory to a cache. Otherwise the system - will be forced to swap out memory, which will likely degrade - performance.

    - -
    - Operating System Caching - -

    Almost all modern operating systems cache file-data in memory managed - directly by the kernel. This is a powerful feature, and for the most - part operating systems get it right. For example, on Linux, let's look at - the difference in the time it takes to read a file for the first time - and the second time;

    - -
    -colm@coroebus:~$ time cat testfile > /dev/null
    -real    0m0.065s
    -user    0m0.000s
    -sys     0m0.001s
    -colm@coroebus:~$ time cat testfile > /dev/null
    -real    0m0.003s
    -user    0m0.003s
    -sys     0m0.000s
    -
    - -

    Even for this small file, there is a huge difference in the amount - of time it takes to read the file. This is because the kernel has cached - the file contents in memory.

    - -

    By ensuring there is "spare" memory on your system, you can ensure - that more and more file-contents will be stored in this cache. This - can be a very efficient means of in-memory caching, and involves no - extra configuration of httpd at all.

    +
    + Caching to Disk -

    Additionally, because the operating system knows when files are - deleted or modified, it can automatically remove file contents from the - cache when necessary. This is a big advantage over httpd's in-memory - caching which has no way of knowing when a file has changed.

    -
    +

    The mod_cache module relies on specific backend store + implementations in order to manage the cache, and for caching to disk + mod_cache_disk is provided to support this.

    -

    Despite the performance and advantages of automatic operating system - caching there are some circumstances in which in-memory caching may be - better performed by httpd.

    +

    Typically the module will be configured as so;

    -
    - MMapFile Caching - -

    mod_file_cache provides the - MMapFile directive, which - allows you to have httpd map a static file's contents into memory at - start time (using the mmap system call). httpd will use the in-memory - contents for all subsequent accesses to this file.

    + +CacheRoot "/var/cache/apache/" +CacheEnable disk / +CacheDirLevels 2 +CacheDirLength 1 + - - MMapFile /usr/local/apache2/htdocs/index.html - +

    Importantly, as the cached files are locally stored, operating system + in-memory caching will typically be applied to their access also. So + although the files are stored on disk, if they are frequently accessed + it is likely the operating system will ensure that they are actually + served from memory.

    -

    As with the - CacheFile directive, any - changes in these files will not be picked up by httpd after it has - started.

    - -

    The MMapFile - directive does not keep track of how much memory it allocates, so - you must ensure not to over-use the directive. Each httpd child - process will replicate this memory, so it is critically important - to ensure that the files mapped are not so large as to cause the - system to swap memory.

    -
    - -
    - Disk-based Caching - - - - mod_cache_disk - - - CacheEnable - CacheDisable - - - -

    mod_cache_disk provides a disk-based caching mechanism - for mod_cache. This cache is intelligent and content will - be served from the cache only as long as it is considered valid.

    - -

    Typically the module will be configured as so;

    - - -CacheRoot /var/cache/apache/
    -CacheEnable disk /
    -CacheDirLevels 2
    -CacheDirLength 1 -
    - -

    Importantly, as the cached files are locally stored, operating system - in-memory caching will typically be applied to their access also. So - although the files are stored on disk, if they are frequently accessed - it is likely the operating system will ensure that they are actually - served from memory.

    Understanding the Cache-Store @@ -582,7 +477,8 @@ CacheDirLength 1

    To store items in the cache, mod_cache_disk creates a 22 character hash of the URL being requested. This hash incorporates the hostname, protocol, port, path and any CGI arguments to the URL, - to ensure that multiple URLs do not collide.

    + as well as elements defined by the Vary header to ensure that multiple + URLs do not collide with one another.

    Each character may be any one of 64-different characters, which mean that overall there are 64^22 possible hashes. For example, a URL might @@ -634,14 +530,14 @@ CacheDirLength 1

    Maintaining the Disk Cache -

    Although mod_cache_disk will remove cached content - as it is expired, it does not maintain any information on the total - size of the cache or how little free space may be left.

    +

    The mod_cache_disk module makes no attempt to + regulate the amount of disk space used by the cache, although it + will gracefully stand down on any disk error and behave as if the + cache was never present.

    Instead, provided with httpd is the htcacheclean tool which, as the name - suggests, allows you to clean the cache periodically. Determining - how frequently to run htcacheclean tool which allows you + to clean the cache periodically. Determining how frequently to run htcacheclean and what target size to use for the cache is somewhat complex and trial and error may be needed to select optimal values.

    @@ -653,6 +549,10 @@ CacheDirLength 1 or more to process very large (tens of gigabytes) caches and if you are running it from cron it is recommended that you determine how long a typical run takes, to avoid running more than one instance at a time.

    + +

    It is also recommended that an appropriate "nice" level is chosen for + htcacheclean so that the tool does not cause excessive disk io while the + server is running.

    +
    + Caching to memcached + +

    Using the mod_cache_socache module, mod_cache + can cache data from a variety of implementations (aka: "providers"). Using the + mod_socache_memcache module, for example, one can specify that + memcached is to be used as the + the backend storage mechanism.

    + +

    Typically the module will be configured as so:

    + + +CacheEnable socache / +CacheSocache memcache:memcd.example.com:11211 + + +

    Additional memcached servers can be specified by + appending them to the end of the CacheSocache memcache: + line separated by commas:

    + + +CacheEnable socache / +CacheSocache memcache:mem1.example.com:11211,mem2.example.com:11212 + + +

    This format is also used with the other various mod_cache_socache + providers. For example:

    + + +CacheEnable socache / +CacheSocache shmcb:/path/to/datafile(512000) + + + +CacheEnable socache / +CacheSocache dbm:/path/to/datafile + + +
    + +
    + +
    + + General Two-state Key/Value Shared Object Caching + + + + mod_authn_socache + mod_socache_dbm + mod_socache_dc + mod_socache_memcache + mod_socache_shmcb + mod_ssl + + + AuthnCacheSOCache + SSLSessionCache + SSLStaplingCache + + + +

    The Apache HTTP server offers a low level shared object cache for + caching information such as SSL sessions, or authentication credentials, + within the socache interface.

    + +

    Additional modules are provided for each implementation, offering the + following backends:

    + +
    +
    mod_socache_dbm
    +
    DBM based shared object cache.
    +
    mod_socache_dc
    +
    Distcache based shared object cache.
    +
    mod_socache_memcache
    +
    Memcache based shared object cache.
    +
    mod_socache_shmcb
    +
    Shared memory based shared object cache.
    +
    + +
    + Caching Authentication Credentials + + + + mod_authn_socache + + + AuthnCacheSOCache + + + +

    The mod_authn_socache module allows the result of + authentication to be cached, relieving load on authentication backends.

    + +
    + +
    + Caching SSL Sessions + + + + mod_ssl + + + SSLSessionCache + SSLStaplingCache + + + +

    The mod_ssl module uses the socache interface + to provide a session cache and a stapling cache.

    + +
    + +
    + +
    + + Specialized File Caching + + + + mod_file_cache + + + CacheFile + MMapFile + + + +

    On platforms where a filesystem might be slow, or where file + handles are expensive, the option exists to pre-load files into + memory on startup.

    + +

    On systems where opening files is slow, the option exists to + open the file on startup and cache the file handle. These + options can help on systems where access to static files is + slow.

    + +
    + File-Handle Caching + +

    The act of opening a file can itself be a source of delay, particularly + on network filesystems. By maintaining a cache of open file descriptors + for commonly served files, httpd can avoid this delay. Currently httpd + provides one implementation of File-Handle Caching.

    + +
    + CacheFile + +

    The most basic form of caching present in httpd is the file-handle + caching provided by mod_file_cache. Rather than caching + file-contents, this cache maintains a table of open file descriptors. Files + to be cached in this manner are specified in the configuration file using + the CacheFile + directive.

    + +

    The + CacheFile directive + instructs httpd to open the file when it is started and to re-use + this file-handle for all subsequent access to this file.

    + + + CacheFile /usr/local/apache2/htdocs/index.html + + +

    If you intend to cache a large number of files in this manner, you + must ensure that your operating system's limit for the number of open + files is set appropriately.

    + +

    Although using CacheFile + does not cause the file-contents to be cached per-se, it does mean + that if the file changes while httpd is running these changes will + not be picked up. The file will be consistently served as it was + when httpd was started.

    + +

    If the file is removed while httpd is running, it will continue + to maintain an open file descriptor and serve the file as it was when + httpd was started. This usually also means that although the file + will have been deleted, and not show up on the filesystem, extra free + space will not be recovered until httpd is stopped and the file + descriptor closed.

    +
    + +
    + +
    + In-Memory Caching + +

    Serving directly from system memory is universally the fastest method + of serving content. Reading files from a disk controller or, even worse, + from a remote network is orders of magnitude slower. Disk controllers + usually involve physical processes, and network access is limited by + your available bandwidth. Memory access on the other hand can take mere + nano-seconds.

    + +

    System memory isn't cheap though, byte for byte it's by far the most + expensive type of storage and it's important to ensure that it is used + efficiently. By caching files in memory you decrease the amount of + memory available on the system. As we'll see, in the case of operating + system caching, this is not so much of an issue, but when using + httpd's own in-memory caching it is important to make sure that you + do not allocate too much memory to a cache. Otherwise the system + will be forced to swap out memory, which will likely degrade + performance.

    + +
    + Operating System Caching + +

    Almost all modern operating systems cache file-data in memory managed + directly by the kernel. This is a powerful feature, and for the most + part operating systems get it right. For example, on Linux, let's look at + the difference in the time it takes to read a file for the first time + and the second time;

    + +
    +colm@coroebus:~$ time cat testfile > /dev/null
    +real    0m0.065s
    +user    0m0.000s
    +sys     0m0.001s
    +colm@coroebus:~$ time cat testfile > /dev/null
    +real    0m0.003s
    +user    0m0.003s
    +sys     0m0.000s
    +
    + +

    Even for this small file, there is a huge difference in the amount + of time it takes to read the file. This is because the kernel has cached + the file contents in memory.

    + +

    By ensuring there is "spare" memory on your system, you can ensure + that more and more file-contents will be stored in this cache. This + can be a very efficient means of in-memory caching, and involves no + extra configuration of httpd at all.

    + +

    Additionally, because the operating system knows when files are + deleted or modified, it can automatically remove file contents from the + cache when necessary. This is a big advantage over httpd's in-memory + caching which has no way of knowing when a file has changed.

    +
    + +

    Despite the performance and advantages of automatic operating system + caching there are some circumstances in which in-memory caching may be + better performed by httpd.

    + +
    + MMapFile Caching + +

    mod_file_cache provides the + MMapFile directive, which + allows you to have httpd map a static file's contents into memory at + start time (using the mmap system call). httpd will use the in-memory + contents for all subsequent accesses to this file.

    + + + MMapFile /usr/local/apache2/htdocs/index.html + + +

    As with the + CacheFile directive, any + changes in these files will not be picked up by httpd after it has + started.

    + +

    The MMapFile + directive does not keep track of how much memory it allocates, so + you must ensure not to over-use the directive. Each httpd child + process will replicate this memory, so it is critically important + to ensure that the files mapped are not so large as to cause the + system to swap memory.

    +
    +
    + +
    + +
    + Security Considerations + +
    + Authorization and Access Control + +

    Using mod_cache in its default state where + CacheQuickHandler is set to + On is very much like having a caching reverse-proxy bolted + to the front of the server. Requests will be served by the caching module + unless it determines that the origin server should be queried just as an + external cache would, and this drastically changes the security model of + httpd.

    + +

    As traversing a filesystem hierarchy to examine potential + .htaccess files would be a very expensive operation, + partially defeating the point of caching (to speed up requests), + mod_cache makes no decision about whether a cached + entity is authorised for serving. In other words; if + mod_cache has cached some content, it will be served + from the cache as long as that content has not expired.

    + +

    If, for example, your configuration permits access to a resource by IP + address you should ensure that this content is not cached. You can do this + by using the CacheDisable + directive, or mod_expires. Left unchecked, + mod_cache - very much like a reverse proxy - would cache + the content when served and then serve it to any client, on any IP + address.

    + +

    When the CacheQuickHandler + directive is set to Off, the full set of request processing + phases are executed and the security model remains unchanged.

    +
    + +
    + Local exploits + +

    As requests to end-users can be served from the cache, the cache + itself can become a target for those wishing to deface or interfere with + content. It is important to bear in mind that the cache must at all + times be writable by the user which httpd is running as. This is in + stark contrast to the usually recommended situation of maintaining + all content unwritable by the Apache user.

    + +

    If the Apache user is compromised, for example through a flaw in + a CGI process, it is possible that the cache may be targeted. When + using mod_cache_disk, it is relatively easy to + insert or modify a cached entity.

    + +

    This presents a somewhat elevated risk in comparison to the other + types of attack it is possible to make as the Apache user. If you are + using mod_cache_disk you should bear this in mind - + ensure you upgrade httpd when security upgrades are announced and + run CGI processes as a non-Apache user using suEXEC if possible.

    + +
    + +
    + Cache Poisoning + +

    When running httpd as a caching proxy server, there is also the + potential for so-called cache poisoning. Cache Poisoning is a broad + term for attacks in which an attacker causes the proxy server to + retrieve incorrect (and usually undesirable) content from the origin + server.

    + +

    For example if the DNS servers used by your system running httpd + are vulnerable to DNS cache poisoning, an attacker may be able to control + where httpd connects to when requesting content from the origin server. + Another example is so-called HTTP request-smuggling attacks.

    + +

    This document is not the correct place for an in-depth discussion + of HTTP request smuggling (instead, try your favourite search engine) + however it is important to be aware that it is possible to make + a series of requests, and to exploit a vulnerability on an origin + webserver such that the attacker can entirely control the content + retrieved by the proxy.

    +
    + +
    + Denial of Service / Cachebusting + +

    The Vary mechanism allows multiple variants of the same URL to be + cached side by side. Depending on header values provided by the client, + the cache will select the correct variant to return to the client. This + mechanism can become a problem when an attempt is made to vary on a + header that is known to contain a wide range of possible values under + normal use, for example the User-Agent header. Depending + on the popularity of the particular web site thousands or millions of + duplicate cache entries could be created for the same URL, crowding + out other entries in the cache.

    + +

    In other cases, there may be a need to change the URL of a particular + resource on every request, usually by adding a "cachebuster" string to + the URL. If this content is declared cacheable by a server for a + significant freshness lifetime, these entries can crowd out + legitimate entries in a cache. While mod_cache + provides a + CacheIgnoreURLSessionIdentifiers + directive, this directive should be used with care to ensure that + downstream proxy or browser caches aren't subjected to the same denial + of service issue.

    +
    diff --git a/docs/manual/caching.xml.fr b/docs/manual/caching.xml.fr index 9b1d7e3ba19..503b6fa7292 100644 --- a/docs/manual/caching.xml.fr +++ b/docs/manual/caching.xml.fr @@ -1,9 +1,9 @@ - + - + + -Konfigurationsdateien - Apache HTTP Server +Konfigurationsdateien - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Konfigurationsdateien

    +Apache > HTTP-Server > Dokumentation > Version 2.4

    Konfigurationsdateien

    Verfgbare Sprachen:  de  |  en  | @@ -37,7 +42,7 @@

  • Module
  • Der Gltigkeitsbereich von Direktiven
  • .htaccess-Dateien
  • -
    +

    Siehe auch

    top

    Hauptkonfigurationsdateien

    @@ -184,7 +189,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.html.en b/docs/manual/configuring.html.en index c1d73e98977..69d268eaf05 100644 --- a/docs/manual/configuring.html.en +++ b/docs/manual/configuring.html.en @@ -1,22 +1,27 @@ - -Configuration Files - Apache HTTP Server +Configuration Files - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Configuration Files

    +Apache > HTTP Server > Documentation > Version 2.4

    Configuration Files

    Available Languages:  de  |  en  | @@ -34,7 +39,7 @@ Server.

  • Modules
  • Scope of Directives
  • .htaccess Files
  • -
    +

    See also

    top

    Main Configuration Files

    @@ -66,13 +71,16 @@ Server.

    There must be no other characters or white space between the backslash and the end of the line.

    +

    Arguments to directives are separated by whitespace. If an + argument contains spaces, you must enclose that argument in quotes.

    +

    Directives in the configuration files are case-insensitive, but arguments to directives are often case sensitive. Lines that begin with the hash character "#" are considered comments, and are ignored. Comments may not be - included on a line after a configuration directive. Blank lines - and white space occurring before a directive are ignored, so - you may indent directives for clarity.

    + included on the same line as a configuration directive. + White space occurring before a directive is ignored, so + you may indent directives for clarity. Blank lines are also ignored.

    The values of variables defined with the Define of or shell environment variables can be used in configuration file lines using the syntax ${VAR}. @@ -91,6 +99,11 @@ Server.

    configuration file itself, for example with SetEnv, take effect too late to be used for expansions in the configuration file.

    +

    The maximum length of a line in normal configuration files, after + variable substitution and joining any continued lines, is approximately + 16 MiB. In .htaccess files, the + maximum length is 8190 characters.

    +

    You can check your configuration files for syntax errors without starting the server by using apachectl configtest or the -t command line @@ -101,7 +114,8 @@ Server.

    variables resolved and all comments and non-matching <IfDefine> and <IfModule> sections - removed.

    + removed. However, the output does not reflect the merging or overriding + that may happen for repeated directives.

    top

    Modules

    @@ -194,7 +208,28 @@ Server.

     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.html.fr b/docs/manual/configuring.html.fr index 18c458de21e..331f53b4a08 100644 --- a/docs/manual/configuring.html.fr +++ b/docs/manual/configuring.html.fr @@ -1,22 +1,27 @@ - -Fichiers de configuration - Serveur Apache HTTP +Fichiers de configuration - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Fichiers de configuration

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Fichiers de configuration

    Langues Disponibles:  de  |  en  | @@ -34,7 +39,7 @@ le Serveur HTTP Apache.

  • Modules
  • Porte des directives
  • Fichiers .htaccess
  • -
    +

    Voir aussi

    top

    Fichiers de configuration principaux

    @@ -71,14 +76,19 @@ le Serveur HTTP Apache.

    Il ne doit y avoir aucun caractre ni espace entre l'anti-slash et la fin de la ligne.

    +

    Les arguments des directives sont spars les uns des autres par + des espaces. Si un argument contient des espaces, il doit tre + entour de guillemets.

    +

    Les directives dans les fichiers de configuration ne sont pas sensibles la casse, mais leurs arguments le sont souvent. Les lignes qui dbutent par le caractre "#" sont interprtes comme des commentaires, et sont ignores. Les commentaires ne doivent - pas tre inclus dans une ligne aprs une directive - de configuration. Les lignes vides et les espaces prcdant une directive + pas apparatre sur la mme ligne qu'une directive + de configuration. Les espaces prcdant une directive sont ignors; vous pouvez par consquent indenter les directives - afin d'amliorer la lisibilit.

    + afin d'amliorer la lisibilit. Les lignes vides sont + aussi ignores.

    Les valeurs des variables d'environnement ou des variables dfinies via la directive Define peuvent tre utilises dans le @@ -102,6 +112,11 @@ le Serveur HTTP Apache.

    pouvoir tre utilises dans les extensions au sein du fichier de configuration.

    +

    La longueur maximale d'une ligne dans un fichier de configuration + normal, aprs substitution des variables et fusion des lignes + interrompues, est approximativement de 16 Mo. Dans les fichiers .htaccess, la longueur + maximale est de 8190 caractres.

    +

    Vous pouvez vrifier l'absence d'erreurs de syntaxe dans vos fichiers de configuration sans dmarrer le serveur l'aide de la commande apachectl configtest ou de l'option de ligne de commande @@ -110,7 +125,10 @@ le Serveur HTTP Apache.

    Vous pouvez utiliser la dfinition -DDUMP_CONFIG de mod_info pour afficher la configuration avec tous les fichiers inclus et les variables d'environnement values, tous - les commentaires et les sections <IfDefine> et <IfModule> non actives ayant t supprims.

    + les commentaires et les sections <IfDefine> et <IfModule> non actives ayant + t supprims. Cependant, la sortie ne reflte + pas les fusions ou crasements pouvant intervenir en cas de + dfinitions multiples de directives.

    top

    Modules

    @@ -208,7 +226,28 @@ le Serveur HTTP Apache.

     ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.html.ja.utf8 b/docs/manual/configuring.html.ja.utf8 index f322e353e38..d1f17420536 100644 --- a/docs/manual/configuring.html.ja.utf8 +++ b/docs/manual/configuring.html.ja.utf8 @@ -1,33 +1,39 @@ - -設定ファイル - Apache HTTP サーバ +設定ファイル - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    設定ファイル

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この文書では、Apache HTTP サーバを設定するのに使用するファイルについて 記述しています。

    @@ -37,7 +43,7 @@
  • モジュール
  • ディレクティブの適用範囲
  • .htaccess ファイル
  • -
    +

    参照

    top

    メインの設定ファイル

    @@ -166,13 +172,34 @@ を参照してください。

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.html.ko.euc-kr b/docs/manual/configuring.html.ko.euc-kr index 8e024ba9441..b6b10e19928 100644 --- a/docs/manual/configuring.html.ko.euc-kr +++ b/docs/manual/configuring.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  de  |  en  | @@ -35,7 +40,7 @@

  • þ
  • .htaccess
  • -
    +

    top

    ּ

    @@ -150,7 +155,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.html.tr.utf8 b/docs/manual/configuring.html.tr.utf8 index 658980d5270..ea24dd3ebac 100644 --- a/docs/manual/configuring.html.tr.utf8 +++ b/docs/manual/configuring.html.tr.utf8 @@ -1,22 +1,27 @@ - -Yapılandırma Dosyaları - Apache HTTP Sunucusu +Yapılandırma Dosyaları - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Yapılandırma Dosyaları

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Yapılandırma Dosyaları

    Mevcut Diller:  de  |  en  | @@ -25,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belgede Apache HTTP Sunucusunu yapılandırmakta kullanılan dosyalar açıklanmıştır.

    @@ -35,7 +39,7 @@ açıklanmıştır.

  • Modüller
  • Yönergelerin Etki Alanı
  • .htaccess Dosyaları
  • -
    +

    Ayrıca bakınız:

    top

    Ana Yapılandırma Dosyaları

    @@ -68,13 +72,17 @@ açıklanmıştır.

    son karakteri “\” (tersbölü) olmalı, satırsonu karakteri ile bu tersbölü karakteri arasında başka karakter bulunmamalıdır.

    +

    Yönergelerdeki değiştirgeler boşluklarla ayrılır. Eğer bir değiştirge + kendi içinde boşluklar içeriyorsa tırnak içine alınır.

    +

    Yapılandırma dosyalarındaki yönergelerin isimleri harf büyüklüğüne duyarlı olduğu halde argümanları genellikle harf büyüklüğüne duyarlı değildir. Diyez (“#”) karakteri ile başlayan satırlar açıklama olarak - ele alınır ve yok sayılırlar. Yapılandırma yönergesi içeren satırların - ardına açıklama yerleştirilemez. Yönerge isminden önce yer alan boşluklar - ve boş satırlar yok sayılır; bu özellik, okunabilirliği sağlamak için - yönergelerin girintilenebilmesi olanağını verir.

    + ele alınır ve yok sayılırlar. Yapılandırma yönergesi içeren satırlara + açıklama yerleştirilemez. Yönerge isminden önce yer alan boşluklar + yoksayılır; bu özellik, okunabilirliği sağlamak için yönergelerin + girintilenebilmesi olanağını verir. Ayrıca, boş satırlar da + yoksayılır.

    Define ile veya kabuğun ortam @@ -97,12 +105,20 @@ açıklanmıştır.

    dosyasındaki işlemlerde çok daha sonra yer alır.

    Yapılandırma dosyasındaki bir satırın uzunluğu, değişken ikamesi - yapıldıkta, devam satırları eklenip satır başındaki ve sonundaki boşluk - karakterleri atıldıktan sonra en fazla 8192 karakter olabilir.

    + yapıldıkta, devam satırları eklenditen sonra en fazla 16MiB olabilir. .htaccess dosyalarında azami uzunluk + 8190 karakterdir.

    Sunucuyu başlatmadan önce apachectl configtest ile veya -t komut satırı seçeneği ile yapılandırma dosyalarınızı sözdizimi hatalarına karşı sınayabilirsiniz.

    + +

    Eşleşmeyen <IfDefine> + ve <IfModule> bölümleri + kaldırılmış, tüm açıklamalar, çözümlenmiş ortam değişkenleri ve içerilmiş + tüm dosyalar dahil yapılandırmanın bir dökümünü almak için + mod_info'nun -DDUMP_CONFIG seçeneğini + kullanabilirsiniz. Ancak, çıktı yinelenen yönergeler için katıştırılan veya + geçersiz kılınanları yansıtmayacaktır.

    top

    Modüller

    @@ -115,7 +131,7 @@ açıklanmıştır.

    sırasında sunucunun temel bir modül kümesi içermesi sağlanır. Eğer sunucu devingen yüklenen modülleri kullanmak üzere yapılandırılarak derlenirse modüller - ayrı olarak derlenip gerektiği zaman + ayrı olarak derlenip gerektiği zaman LoadModule yönergesi kullanılarak yüklenebilir. Aksi takdirde, ek modülleri yükleyebilmek veya kaldırabilmek için httpd’nin yeniden derlenmesi gerekir. Yapılandırma yönergeleri belli bir modülün varlığına @@ -190,7 +206,28 @@ açıklanmıştır.

     ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/configuring.xml b/docs/manual/configuring.xml index aa5630362ee..c301a6b00a9 100644 --- a/docs/manual/configuring.xml +++ b/docs/manual/configuring.xml @@ -69,13 +69,16 @@ Server.

    There must be no other characters or white space between the backslash and the end of the line.

    +

    Arguments to directives are separated by whitespace. If an + argument contains spaces, you must enclose that argument in quotes.

    +

    Directives in the configuration files are case-insensitive, but arguments to directives are often case sensitive. Lines that begin with the hash character "#" are considered comments, and are ignored. Comments may not be - included on a line after a configuration directive. Blank lines - and white space occurring before a directive are ignored, so - you may indent directives for clarity.

    + included on the same line as a configuration directive. + White space occurring before a directive is ignored, so + you may indent directives for clarity. Blank lines are also ignored.

    The values of variables defined with the Define of or shell environment variables can @@ -96,6 +99,11 @@ Server.

    module="mod_env">SetEnv, take effect too late to be used for expansions in the configuration file.

    +

    The maximum length of a line in normal configuration files, after + variable substitution and joining any continued lines, is approximately + 16 MiB. In .htaccess files, the + maximum length is 8190 characters.

    +

    You can check your configuration files for syntax errors without starting the server by using apachectl configtest or the -t command line @@ -106,7 +114,8 @@ Server.

    variables resolved and all comments and non-matching IfDefine and IfModule sections - removed.

    + removed. However, the output does not reflect the merging or overriding + that may happen for repeated directives.

    diff --git a/docs/manual/configuring.xml.de b/docs/manual/configuring.xml.de index cac3811780d..4fd784db90b 100644 --- a/docs/manual/configuring.xml.de +++ b/docs/manual/configuring.xml.de @@ -1,7 +1,7 @@ - + - + + + + + -Content Negotiation - Apache HTTP Server +Content Negotiation - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Content Negotiation

    +Apache > HTTP Server > Documentation > Version 2.4

    Content Negotiation

    Available Languages:  en  |  fr  | @@ -47,7 +52,7 @@ Negotiation

  • Note on hyperlinks and naming conventions
  • Note on Caching
  • -
    +

    See also

    top

    About Content Negotiation

    @@ -85,7 +90,7 @@ Negotiation

    httpd supports 'server driven' content negotiation, as defined in the HTTP/1.1 specification. It fully supports the Accept, Accept-Language, - Accept-Charset andAccept-Encoding + Accept-Charset and Accept-Encoding request headers. httpd also supports 'transparent' content negotiation, which is an experimental negotiation protocol defined in RFC 2295 and RFC 2296. It does not offer @@ -131,7 +136,8 @@ Negotiation defines a file suffix as type-map; this is best done with

    -

    AddHandler type-map .var

    +
    AddHandler type-map .var
    +

    in the server configuration file.

    @@ -228,7 +234,8 @@ Negotiation named by the DirectoryIndex directive, if the server is trying to index a directory. If the configuration files specify

    -

    DirectoryIndex index

    +
    DirectoryIndex index
    +

    then the server will arbitrate between index.html and index.html3 if both are present. If neither are present, and index.cgi is there, the server @@ -513,10 +520,9 @@ Negotiation try to select a matching variant. If there's no such variant, the normal negotiation process applies.

    -

    Example

    - SetEnvIf Cookie "language=(.+)" prefer-language=$1
    - Header append Vary cookie -

    +

    Example

    SetEnvIf Cookie "language=(.+)" prefer-language=$1
    +Header append Vary cookie
    +
    top
    @@ -678,7 +684,28 @@ factors to 5 decimal places before choosing the best variant.

     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/content-negotiation.html.fr b/docs/manual/content-negotiation.html.fr index 4be3f225325..c6f879c5d14 100644 --- a/docs/manual/content-negotiation.html.fr +++ b/docs/manual/content-negotiation.html.fr @@ -1,22 +1,27 @@ - -Ngociation de contenu - Serveur Apache HTTP +Ngociation de contenu - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Ngociation de contenu

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Ngociation de contenu

    +

    Voir aussi

    top

    propos de la ngociation de contenu

    @@ -139,7 +144,8 @@ conventions de nommage gestionnaire qui associe un suffixe de fichier une type-map; ce qui se fait simplement en ajoutant

    -

    AddHandler type-map .var

    +
    AddHandler type-map .var
    +

    dans le fichier de configuration du serveur.

    @@ -242,7 +248,8 @@ conventions de nommage

    MultiViews peut aussi s'appliquer la recherche du fichier nomm par la directive DirectoryIndex, si le serveur tente d'indexer un rpertoire. Si les fichiers de configuration spcifient

    -

    DirectoryIndex index

    +
    DirectoryIndex index
    +

    le serveur va choisir entre index.html et index.html3 si les deux fichiers sont prsents. Si aucun n'est prsent, mais index.cgi existe, @@ -536,10 +543,9 @@ langage de slectionner une variante correspondante. S'il n'existe pas de telle variante, le processus normal de ngociation sera lanc.

    -

    Exemple

    - SetEnvIf Cookie "language=(.+)" prefer-language=$1
    - Header append Vary cookie -

    +

    Exemple

    SetEnvIf Cookie "language=(.+)" prefer-language=$1
    +Header append Vary cookie
    +
    top
    @@ -709,7 +715,28 @@ conventions de nommage  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/content-negotiation.html.ja.utf8 b/docs/manual/content-negotiation.html.ja.utf8 index 0f8e573a01b..47dbf572894 100644 --- a/docs/manual/content-negotiation.html.ja.utf8 +++ b/docs/manual/content-negotiation.html.ja.utf8 @@ -1,32 +1,38 @@ - -コンテントネゴシエーション - Apache HTTP サーバ +コンテントネゴシエーション - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    コンテントネゴシエーション

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    コンテントネゴシエーション

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache は HTTP/1.1 の規格に記述されているコンテントネゴシエーションを @@ -49,7 +55,7 @@ の拡張

  • リンクと名前の変換に関する注意点
  • キャッシュに関する注意事項
  • -
    +

    参照

    top

    コンテントネゴシエーションについて

    @@ -714,12 +720,33 @@ RVSA/1.0 の実装では、最適な variant が見つかるまで、
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/content-negotiation.html.ko.euc-kr b/docs/manual/content-negotiation.html.ko.euc-kr index ae4810b6a4a..ad10eb2ec69 100644 --- a/docs/manual/content-negotiation.html.ko.euc-kr +++ b/docs/manual/content-negotiation.html.ko.euc-kr @@ -1,22 +1,27 @@ - - (Content Negotiation) - Apache HTTP Server + (Content Negotiation) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    (Content Negotiation)

    +Apache > HTTP Server > Documentation > Version 2.4

    (Content Negotiation)

    +

    top

    @@ -600,7 +605,28 @@ content-encoding  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/content-negotiation.html.tr.utf8 b/docs/manual/content-negotiation.html.tr.utf8 index 3764cdd17a4..6d32423eadd 100644 --- a/docs/manual/content-negotiation.html.tr.utf8 +++ b/docs/manual/content-negotiation.html.tr.utf8 @@ -1,22 +1,27 @@ - -İçerik Uzlaşımı - Apache HTTP Sunucusu +İçerik Uzlaşımı - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    İçerik Uzlaşımı

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    İçerik Uzlaşımı

    Mevcut Diller:  en  |  fr  | @@ -24,7 +29,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Apache HTTPD, içerik uzlaşımını HTTP/1.1 belirtiminde bahsedildiği şekliyle @@ -44,7 +48,7 @@

  • Şeffaf İçerik Uzlaşımının Genişletilmesi
  • Hiperbağlar ve İsimlendirme Uzlaşımları
  • Arabellekler Hakkında
  • -
    +

    Ayrıca bakınız:

    top

    İçerik Uzlaşımı Hakkında

    @@ -124,18 +128,26 @@ eylemcisi tanımlamalısınız. Bu, sunucu yapılandırma dosyasında en iyi şöyle yapılabilir:

    -

    AddHandler type-map .var

    +
    AddHandler type-map .var
    +

    Türeşlem dosyaları kendilerini tanımlayan özkaynak ile aynı isimde - olmalı ve her gösterim çeşidi için bir girdi içermelidir; bu girdiler + olmalı ve isim bir .var uzantısı içermelidir. Aşağıdaki + örneklerde özkaynak ismi foo olduğundan türeşlem dosyasının + ismi foo.var'dır.

    + +

    Bu dosya her gösterim çeşidi için bir girdi içermelidir; bu girdiler ardarda belirtilen HTTP biçem başlık satırlarından oluşur. Farklı gösterimlerin girdileri bir boş satırla diğerlerinden ayrılır. Aynı girdi içinde boş satır kullanılamaz. Bir eşlem dosyasını bir birleşik öğenin tamamı için bir girdi ile başlatmak adet olmuştur (ise de, bu gerekli değildir, hele yoksayılacaksa hiç gerekli değildir). Eşlem - dosyası için aşağıda bir örnek verilmiştir. Dosya misal - isimli bir özkaynak hakkında olduğundan dosyaya misal.var - ismi verilebilir.

    + dosyası için aşağıda bir örnek verilmiştir.

    + +

    Bu dosyadaki URI'ler türeşlem dosyasının yerine görelidir. Dolayısıyla, + bu dosyaların aynı dizinde bulunması beklenirse de bu gerekli değildir. + Aynı sunucuda bulunan tüm dosyalar için türeşlem dosyasındaki gibi mutlak + veya göreli URI'ler belirtebilirsiniz.

    URI: misal
    @@ -207,7 +219,8 @@ listelemeye çalıştığı durumda DirectoryIndex yönergesi ile belirtilen dosya için de bir arama tertipleyebilir. Eğer yapılandırma dosyalarında

    -

    DirectoryIndex index

    +
    DirectoryIndex index
    +

    şeklinde bir atama varsa ve dizinde index.html ve index.html3 dosyaları varsa sunucu bunlar arasından hakem @@ -482,10 +495,9 @@ Böyle bir gösterim çeşidi mevcut değilse normal uzlaşım işlemi uygulanacaktır.

    -

    Örnek

    - SetEnvIf Cookie "language=(.+)" prefer-language=$1
    - Header append Vary cookie -

    +

    Örnek

    SetEnvIf Cookie "language=(.+)" prefer-language=$1
    +Header append Vary cookie
    +
    top
    @@ -641,7 +653,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/content-negotiation.xml b/docs/manual/content-negotiation.xml index 2076152d20e..dafedd4752c 100644 --- a/docs/manual/content-negotiation.xml +++ b/docs/manual/content-negotiation.xml @@ -74,7 +74,7 @@

    httpd supports 'server driven' content negotiation, as defined in the HTTP/1.1 specification. It fully supports the Accept, Accept-Language, - Accept-Charset andAccept-Encoding + Accept-Charset and Accept-Encoding request headers. httpd also supports 'transparent' content negotiation, which is an experimental negotiation protocol defined in RFC 2295 and RFC 2296. It does not offer @@ -120,7 +120,7 @@ defines a file suffix as type-map; this is best done with

    -AddHandler type-map .var +AddHandler type-map .var

    in the server configuration file.

    @@ -223,7 +223,7 @@ module="mod_dir">DirectoryIndex directive, if the server is trying to index a directory. If the configuration files specify

    -DirectoryIndex index +DirectoryIndex index

    then the server will arbitrate between index.html and index.html3 if both are present. If neither are present, and index.cgi is there, the server @@ -512,8 +512,10 @@ the normal negotiation process applies.

    Example - SetEnvIf Cookie "language=(.+)" prefer-language=$1
    - Header append Vary cookie + +SetEnvIf Cookie "language=(.+)" prefer-language=$1 +Header append Vary cookie +
    diff --git a/docs/manual/content-negotiation.xml.fr b/docs/manual/content-negotiation.xml.fr index 38ee3c305a0..98cbccbe7a8 100644 --- a/docs/manual/content-negotiation.xml.fr +++ b/docs/manual/content-negotiation.xml.fr @@ -1,9 +1,9 @@ - + - + + + + -Custom Error Responses - Apache HTTP Server +Custom Error Responses - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Custom Error Responses

    +Apache > HTTP Server > Documentation > Version 2.4

    Custom Error Responses

    +

    See also

    top

    Configuration

    @@ -61,19 +66,17 @@ if AllowOverride is set to FileInfo.

    -

    - ErrorDocument 500 "Sorry, our script crashed. Oh dear"
    - ErrorDocument 500 /cgi-bin/crash-recover
    - ErrorDocument 500 http://error.example.com/server_error.html
    - ErrorDocument 404 /errors/not_found.html
    - ErrorDocument 401 /subscription/how_to_subscribe.html -

    +
    ErrorDocument 500 "Sorry, our script crashed. Oh dear"
    +ErrorDocument 500 /cgi-bin/crash-recover
    +ErrorDocument 500 http://error.example.com/server_error.html
    +ErrorDocument 404 /errors/not_found.html
    +ErrorDocument 401 /subscription/how_to_subscribe.html
    +

    The syntax of the ErrorDocument directive is:

    -

    - ErrorDocument <3-digit-code> <action> -

    +
    ErrorDocument <3-digit-code> <action>
    +

    where the action will be treated as:

    @@ -102,7 +105,7 @@ 'REDIRECT_' onto the original header name. This provides the error document the context of the original request.

    -

    For example, you might recieve, in addition to more usual +

    For example, you might receive, in addition to more usual environment variables, the following.

    @@ -141,7 +144,7 @@

    If you point your ErrorDocument to some variety of dynamic handler such as a server-side include document, CGI script, or some variety of other handler, you may wish to use the - available custom environent variables to customize this + available custom environment variables to customize this response.

    If the ErrorDocument specifies a local redirect to a CGI @@ -151,12 +154,11 @@ caused it to be invoked. For instance, a Perl ErrorDocument script might include the following:

    -

    - ...
    - print "Content-type: text/html\n";
    - printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    - ... -

    +
    ...
    +print  "Content-type: text/html\n";
    +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    +...
    +

    If the script is dedicated to handling a particular error condition, such as 404 Not Found, it can @@ -180,10 +182,9 @@

    In your server configuration file, you'll see a line such as:

    -

    - # Multi-language error messages
    - #Include conf/extra/httpd-multilang-errordoc.conf -

    +
    # Multi-language error messages
    +#Include conf/extra/httpd-multilang-errordoc.conf
    +

    Uncommenting this Include line will enable this feature, and provide language-negotiated error messages, based on @@ -209,7 +210,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.html.es b/docs/manual/custom-error.html.es index 77f6598343b..9a1fc99f5a6 100644 --- a/docs/manual/custom-error.html.es +++ b/docs/manual/custom-error.html.es @@ -1,22 +1,27 @@ - -Respuestas de error personalizadas - Servidor HTTP Apache +Respuestas de error personalizadas - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Respuestas de error personalizadas

    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    Respuestas de error personalizadas

    Idiomas disponibles:  en  |  es  | @@ -45,7 +50,7 @@

    +

    Consulte tambin

    top

    Comportamiento

    @@ -221,7 +226,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.html.fr b/docs/manual/custom-error.html.fr index c10d2e3fa14..02991726b4e 100644 --- a/docs/manual/custom-error.html.fr +++ b/docs/manual/custom-error.html.fr @@ -1,22 +1,27 @@ - -Messages d'erreur personnaliss - Serveur Apache HTTP +Messages d'erreur personnaliss - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Messages d'erreur personnaliss

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Messages d'erreur personnaliss

    +

    Voir aussi

    top

    Configuration

    @@ -64,19 +69,17 @@ .htaccess si AllowOverride est dfinie FileInfo.

    -

    - ErrorDocument 500 "Dsol, notre script s'est crash ; comme c'est - dommage !"
    - ErrorDocument 500 /cgi-bin/crash-recover
    - ErrorDocument 500 http://erreur.example.com/erreur_serveur.html
    - ErrorDocument 404 /erreurs/non_trouve.html
    - ErrorDocument 401 /inscription/comment_s_inscrire.html -

    +
    ErrorDocument 500 "Dsol, notre script s'est
    +crash ; comme c'est dommage !"
    +ErrorDocument 500 /cgi-bin/crash-recover
    +ErrorDocument 500 http://error.example.com/server_error.html
    +ErrorDocument 404 /errors/not_found.html 
    +ErrorDocument 401 /subscription/how_to_subscribe.html
    +

    La syntaxe de la directive ErrorDocument est :

    -

    - ErrorDocument <code_3_chiffres> <action> -

    +
    ErrorDocument <code_3_chiffres> <action>
    +

    o action peut tre traite comme :

    1. Une URL de redirection local (si l'action commence par un "/").
    2. @@ -161,12 +164,11 @@ par une directive ErrorDocument pourrait contenir ce qui suit :

      -

      - ...
      - print "Content-type: text/html\n";
      - printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
      - ... -

      +
      ...
      +print  "Content-type: text/html\n"; 
      +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; 
      +...
      +

      Si un script est ddi la gestion d'une condition d'erreur spcifique, telle que 404 Not Found, il @@ -192,10 +194,9 @@

      Dans le fichier de configuration de votre serveur, vous trouverez un groupe de lignes du style :

      -

      - # Multi-language error messages
      - #Include conf/extra/httpd-multilang-errordoc.conf -

      +
          # Multi-language error messages
      +    #Include conf/extra/httpd-multilang-errordoc.conf
      +

      Dcommentez la ligne Include pour activer cette fonctionnalit, et prsenter des messages d'erreur dont le langage @@ -222,7 +223,28 @@  ja  |  ko  |  tr 

      -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.html.ja.utf8 b/docs/manual/custom-error.html.ja.utf8 index be44de5267b..ac773e9edda 100644 --- a/docs/manual/custom-error.html.ja.utf8 +++ b/docs/manual/custom-error.html.ja.utf8 @@ -1,33 +1,39 @@ - -カスタムエラーレスポンス - Apache HTTP サーバ +カスタムエラーレスポンス - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    カスタムエラーレスポンス

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    カスタムエラーレスポンス

    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    ウェブマスターが何らかのエラーや問題に対する Apache の反応を設定できるようにする追加機能を提供します。

    @@ -43,7 +49,7 @@ +

    参照

    top

    動作

    @@ -190,13 +196,34 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.html.ko.euc-kr b/docs/manual/custom-error.html.ko.euc-kr index fb8e6c620c6..84236d73168 100644 --- a/docs/manual/custom-error.html.ko.euc-kr +++ b/docs/manual/custom-error.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  en  |  es  | @@ -41,7 +46,7 @@

    +

    top

    ൿ

    @@ -198,7 +203,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.html.tr.utf8 b/docs/manual/custom-error.html.tr.utf8 index 5a66a1b86e2..ba6739af051 100644 --- a/docs/manual/custom-error.html.tr.utf8 +++ b/docs/manual/custom-error.html.tr.utf8 @@ -1,22 +1,27 @@ - -Hata Yanıtlarının Kişiselleştirilmesi - Apache HTTP Sunucusu +Hata Yanıtlarının Kişiselleştirilmesi - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Hata Yanıtlarının Kişiselleştirilmesi

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Hata Yanıtlarının Kişiselleştirilmesi

    Mevcut Diller:  en  |  es  | @@ -25,174 +30,175 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Apache, bazı sorunlara ve hatalara karşılık vereceği yanıtların - yapılandırabilmesini mümkün kılan ek bir işlevselliğe sahiptir.

    -

    Site yöneticisi tarafından kişiselleştirilebilen bu tür yanıtlar, - sunucu belli hatalar veya sorunlarla karşılaştığında etkin kılınmak - üzere tanımlanabilir.

    +

    Apache HTTP Sunucusu 4xx veya 5xx HTTP durum kodları ile ilgili + olaylarda soysal hata yanıtları üretse de bu yanıtlar site + kullanıcılarına aşırı sade, bilgi vermez ve hatta korkutucu gelebilir. + Daha dostça yazılmış, İngilizce değil de kendi dilinizde ve belki + sayfalarınızın yerleşimine uygun daha hoş satırlarda özel hata yanıtları + üretmek isteyebilirsiniz.

    + +

    Kişiselleştirilmiş hata yanıtları, bir hata durumuna göre tasarlanmış + herhangi bir HTTP durum kodu (yani 4xx ve 5xx kodlarından biri) için + tanımlanabilir.

    + +

    Ek olarak bir değer kümesi de sağlanmıştır. Böylece hata belgeleri, Sunucu taraflı İçerik Yerleştirme kullanılarak + bu değişkenlerin değerlerine göre özelleştirilebilir. İsterseniz bunun + yerine bir CGI programı veya devingen bir eylemci (PHP, mod_perl, vs.) + kullanarak da bu değişkenlerin değerlerine göre hata sayfalarınızı + üretebilirsiniz.

    -

    Bir betik bir hata nedeniyle bir "500 Server Error" yanıtının - verilmesine sebep olursa bu yanıt yerine başka bir adrese - yönlendirilerek (dahili veya harici) veya doğrudan daha dostça bir - metin sunulabilir.

    - +
    top
    -

    Davranış

    - +

    Yapılandırma

    -

    Eski Davranış

    - +

    Kişiselleştirilmiş hata belgeleri ErrorDocument yönergesi kullanılarak yapılandırılabilir. Bu + yönerge küresel bağlamda olabileceği gibi sanal konak ve dizin + bağlamlarında da kullanılabilir. AllowOverride yönergesine FileInfo + atanarak .htaccess dosyalarında da kullanılabilir.

    -

    NCSA httpd 1.3, çoğunlukla kullanıcıya anlamsız gelen ve sebebiyle - kavramsal bir bağ kurulamayan günlük kayıtları üreten, can sıkıcı - bazı hata/sorun yanıtları döndürürdü.

    - +
    ErrorDocument 500 "Pardon, galiba bizim betik hata verdi."
    +ErrorDocument 500 /cgi-bin/hata-kurtarma
    +ErrorDocument 500 http://error.example.com/server_error.html
    +ErrorDocument 404 /ozuru_kabahatinden_buyuk/yok.html
    +ErrorDocument 401 /Uyeler/NASIL_uye_olunur.html
    -

    Yeni Davranış

    - -

    Sunucudan NCSA kodlu iletiler yerine

    +

    ErrorDocument yönergesinin sözdizimi:

    -
      -
    • başka bir metin göstermesi,
    • +
      ErrorDocument <3-rakamlı-kod> <eylem>
      -
    • istemciyi başka bir yerel adrese yönlendirmesi veya
    • -
    • istemciyi bir harici adrese yönlendirmesi
    • -
    +

    eylem şunlardan biri olabilir:

    -

    istenebilir. Başka bir adrese yönlendirme, hata veya sorunu daha iyi - açıklamakta kullanılabilecek bazı bilgilerin aktarılması şartıyla - oldukça kullanışlı olabilir.

    +
      +
    1. Yönlendirmenin yapılacağı dahili adres (eylem bir "/" ile + başlıyorsa).
    2. +
    3. Yönlendirmenin yapılacağı harici adres (eylem geçerli bir + URL ise).
    4. +
    5. Gösterilecek metin (yukardakilerin hiçbiri yoksa). Birden fazla + sözcük içeriyorsa tırnak (") içine alınmalıdır.
    6. +
    -

    Apache, buna olanak vermek için CGI benzeri yeni ortam değişkenleri - tanımlamıştır:

    +

    Yerel bir adrese yönlendirme yapılırken ek ortam değişkenleri de + atanarak yanıt daha da özelleştirilebilir. Bunlar harici URL'lere + gönderilmez.

    + +
    top
    +
    +

    Kullanılabilen Değişkenler

    + +

    Hata durumunu açıklayacak veya hata günlüğüne daha açıkça + kaydedilebilecek bazı bilgilerin aktarılması koşuluyla, başka bir + adrese yönlendirme kullanışlı olabilir

    + +

    Hata yönlendirmesi yapılırken bunu sağlamak için ek ortam değişkenleri + tanımlanır. Bu değişkenlerin isimleri, özgün istekle sağlanan + başlık isimlerinin önüne 'REDIRECT_' dizgesi getirilerek üretilir. + Böylece özgün istek bağlamından hata belgesi üretilebilir.

    + +

    Örneğin, aşağıdaki gibi, daha yararlı olacak ek ortam değişkenleri + alabilirsiniz.

    - REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, - image/jpeg
    - REDIRECT_HTTP_USER_AGENT=Mozilla/1.1b2 (X11; I; HP-UX A.09.05 - 9000/712)
    - REDIRECT_PATH=.:/bin:/usr/local/bin:/etc
    + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/jpeg, image/png
    + REDIRECT_HTTP_USER_AGENT=Mozilla/5.0 Fedora/3.5.8-1.fc12 Firefox/3.5.8
    + REDIRECT_PATH=.:/bin:/usr/local/bin:/sbin
    REDIRECT_QUERY_STRING=
    REDIRECT_REMOTE_ADDR=121.345.78.123
    - REDIRECT_REMOTE_HOST=ooh.ahhh.dom
    - REDIRECT_SERVER_NAME=batti.balik.yan.gider.edu
    + REDIRECT_REMOTE_HOST=client.example.com
    + REDIRECT_SERVER_NAME=www.example.edu
    REDIRECT_SERVER_PORT=80
    - REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
    - REDIRECT_URL=/cgi-bin/hatalar.pl + REDIRECT_SERVER_SOFTWARE=Apache/2.2.15
    + REDIRECT_URL=/cgi-bin/buggy.pl

    -

    REDIRECT_ önekine dikkat edin.

    - -

    Yeni adrese (hedefin bir CGI betiği veya SSI sayfası olduğu - kabulüyle) en azından REDIRECT_URL ve - REDIRECT_QUERY_STRING değişkenleri aktarılır. Diğer - değişkenler ise sadece hata veya sorunun öncesinde mevcut oldukları - takdirde aktarılacaklardır. Eğer harici yönlendirmeyi - ErrorDocument yönergesi - üzerinden yapıyorsanız bunlara None değeri - atanacaktır. (Yönlendirme adresi http: ile başlıyorsa - adres aynı sunucuya ait olsa bile bu bir harici yönlendirme olarak - ele alınır.)

    - +

    REDIRECT_ ortam değişkenleri, yönlendirme öncesi varolan + ortam değişkenlerinden üretilir. Bunlar önlerine REDIRECT_ + getirilerek yeniden isimlendirilir. Örneğin, + HTTP_USER_AGENT değişkeni + REDIRECT_HTTP_USER_AGENT haline gelir.

    + +

    REDIRECT_URL, REDIRECT_STATUS ve + REDIRECT_QUERY_STRING mutlaka atanır. Diğer başlıklarla + ilgili olanlar ise hata durumu öncesinde mevcut oldukları takdirde + üretilirler.

    + +

    Eğer ErrorDocument hedefi bir + harici yönlendirme ise bunların hiçbiri + üretilmez (sunucunun bulunduğu konağı hedeflese bile http: + ile başlayan herşey harici yönlendirme sayılır).

    top
    -

    Yapılandırma

    - - -

    ErrorDocument yönergesinin - .htaccess dosyalarında kullanılması sadece AllowOverride yönergesine FileInfo - atanmışsa mümkündür.

    - -

    Bazı örnekler:

    +

    Özel Hata Yanıtları

    -

    - ErrorDocument 500 /cgi-bin/hata-kurtarma
    - ErrorDocument 500 "Pardon, galiba bizim betik hata verdi."
    - ErrorDocument 500 http://xxx/
    - ErrorDocument 404 /ozuru_kabahatinden_buyuk/yok.html
    - ErrorDocument 401 /Uyeler/NASIL_uye_olunur.html -

    +

    Hata yanıtınızı üretmek için sunucu taraflı içerik yerleştirme, bir + CGI betiği veya başka bir eylemciyi devingen eylemci olarak + kullanıyorsanız, bu yanıtı özelleştirmek için bu kullanıma özel + üretilmiş ortam değişkenlerini kullanmak isteyebilirsiniz.

    -

    Burada sözdizimi şöyledir:

    +

    ErrorDocument yönergesi bir CGI + betiğine bir yerel yönlendirme belirtiyorsa, hatanın kaynağı hakkında + istemciye bilgi vermek amacıyla betiğin çıktısında bir + "Status:" başlık alanına yer verilmelidir. Örneğin, bir + Perl betiği şunları içerebilirdi:

    -

    - ErrorDocument <3-rakamlı-kod> <eylem> -

    +
    ...
    +print  "Content-type: text/html\n";
    +printf "Status: %s durumu saptandı.\n", $ENV{"REDIRECT_STATUS"};
    +...
    -

    eylem şunlardan biri olabilir:

    -
      -
    • Gösterilecek metin. Metin tırnak (") içine alınmalıdır.
    • +

      Eğer betik, 404 Not Found gibi, belli bir hata + durumunu ele almaya adanmışsa duruma özel kod ve hata metni + kullanılabilir.

      -
    • Yönlendirmenin yapılacağı harici adres.
    • +

      Eğer yanıt, (istemci taraflı yönlendirme yapılırken) bir + Location: başlığı da içeriyorsa betiğin çıktıya uygun bir + Status: başlığı (302 Found) eklemesinin + gerekli oluşuna dikkat ediniz. Aksi takdirde, Location: + başlığı etkisiz olabilir.

      -
    • Yönlendirmenin yapılacağı dahili adres.
    • -
    top
    -

    Özel Hata Yanıtları ve Yönlendirme

    - - -

    Apache’nin yönlendirme ile ilgili davranışı bir CGI betiği veya SSI - sayfası sözkonusu olduğunda bazı ek ortam değişkenleri ile - yapılandırılabilir.

    - -

    Eski Davranış

    - - -

    Yönlendirme yapılan betikte standart CGI değişkenleri kullanılırdı. - Yönlendirmenin kaynağı ile ilgili bir belirtiye rastlanmazdı.

    - - -

    Yeni Davranış

    - - -

    Yönlendirme yapılan betikte kullanılmak üzere özel olarak - tanımlanmış ortam değişkenleri vardır. Her değişkenin ismi - REDIRECT_ ile başlar. REDIRECT_ ortam - değişkenleri, yönlendirme öncesinde tanımlanmış CGI ortam - değişkenlerinin isimlerinin başına REDIRECT_ öneki - getirilerek oluşturulur. Yani, HTTP_USER_AGENT değişkeni - REDIRECT_HTTP_USER_AGENT haline gelir. Bunlara ek - olarak, betiğe olayın izini sürmekte yardımcı olması için - REDIRECT_URL ve REDIRECT_STATUS - değişkenleri tanımlanmıştır. Erişim günlüğüne özgün adresle birlikte - yönlendirme adresi de kaydedilir.

    - -

    Eğer ErrorDocument yönergesi - bir yerel CGI betiğine yönlendirme belirtiyorsa, hatanın kaynağı - hakkında istemciye bilgi vermek amacıyla betiğin çıktısında bir - "Status:" başlık alanına yer verilmesi önerilir. - Örneğin, bir Perl betiği şunları içerebilirdi:

    +

    Çok Dilli Özel Hata Belgeleri

    -

    - ...
    - print "Content-type: text/html; charset=UTF-8\n";
    - printf "Status: %s durumu saptandı.\n", $ENV{"REDIRECT_STATUS"};
    - ... -

    +

    Apache HTTP Sunucusunun kurulumunda, 16 dile çevrilmiş özel hata + iletileri belgeleri içeren bir dizin bulunmaktadır. Ayrıca, + conf/extra yaplandırma dizininde bu özelliği etkin kılmak + için yapılandırmaya dahil edilebilecek bir yapılandırma dosyası + vardır.

    -

    Eğer betik, 404 Not Found gibi, belli bir - hata durumunu ele almaya adanmışsa duruma özel kod ve hata metni - kullanılabilir.

    +

    Sunucu yapılandırma dosyanızda şöyle satırlar görebilirsiniz:

    -

    Eğer yanıt, (istemci taraflı yönlendirme yapılırken) bir - Location: başlığı da içeriyorsa betiğin çıktıya uygun - bir Status: başlığı (302 Found gibi) - eklemesinin gerekli oluşuna dikkat ediniz. Aksi takdirde, - Location: başlığı etkisiz olabilir.

    - -
    +
    # Multi-language error messages
    +#Include conf/extra/httpd-multilang-errordoc.conf
    + + +

    Bu Include satırını açıklama olmaktan çıkarırsanız + bu özelliği etkinleştirmiş olursunuz. Böylece, istemcinin tarayıcısında + belirtilmiş dil tercihine uygun dil uzlaşımlı hata iletileri + sağlanır.

    + +

    Ek olarak, bu belgeler çeşitli REDIRECT_ değişkenleri + içerir. Böylece, son kullanıcıya neler olduğu ve şimdi ne yapması + beklendiği hakkında ek bilgiler sağlanabilir.

    + +

    Bu belgeleri istediğiniz kadar özelleştirebilir, kullanıcıya siteniz + hakkında ve orada bulabilecekleri şeylere dair faydalı bilgiler de + sağlayabilirsiniz.

    + +

    Bu özelliği kullanmak için mod_include ve + mod_negotiation etkin kılınmalıdır.

    + +

    Mevcut Diller:  en  |  es  | @@ -200,7 +206,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/custom-error.xml b/docs/manual/custom-error.xml index 083928b7e2b..0f3c41ba3ee 100644 --- a/docs/manual/custom-error.xml +++ b/docs/manual/custom-error.xml @@ -55,19 +55,19 @@ if AllowOverride is set to FileInfo.

    - - ErrorDocument 500 "Sorry, our script crashed. Oh dear"
    - ErrorDocument 500 /cgi-bin/crash-recover
    - ErrorDocument 500 http://error.example.com/server_error.html
    - ErrorDocument 404 /errors/not_found.html
    - ErrorDocument 401 /subscription/how_to_subscribe.html -
    + +ErrorDocument 500 "Sorry, our script crashed. Oh dear" +ErrorDocument 500 /cgi-bin/crash-recover +ErrorDocument 500 http://error.example.com/server_error.html +ErrorDocument 404 /errors/not_found.html +ErrorDocument 401 /subscription/how_to_subscribe.html +

    The syntax of the ErrorDocument directive is:

    - + ErrorDocument <3-digit-code> <action> - +

    where the action will be treated as:

    @@ -96,7 +96,7 @@ 'REDIRECT_' onto the original header name. This provides the error document the context of the original request.

    -

    For example, you might recieve, in addition to more usual +

    For example, you might receive, in addition to more usual environment variables, the following.

    @@ -135,7 +135,7 @@

    If you point your ErrorDocument to some variety of dynamic handler such as a server-side include document, CGI script, or some variety of other handler, you may wish to use the - available custom environent variables to customize this + available custom environment variables to customize this response.

    If the ErrorDocument specifies a local redirect to a CGI @@ -145,12 +145,12 @@ caused it to be invoked. For instance, a Perl ErrorDocument script might include the following:

    - - ...
    - print "Content-type: text/html\n";
    - printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    - ... -
    + +... +print "Content-type: text/html\n"; +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; +... +

    If the script is dedicated to handling a particular error condition, such as 404 Not Found, it can @@ -174,10 +174,10 @@

    In your server configuration file, you'll see a line such as:

    - - # Multi-language error messages
    - #Include conf/extra/httpd-multilang-errordoc.conf -
    + +# Multi-language error messages +#Include conf/extra/httpd-multilang-errordoc.conf +

    Uncommenting this Include line will enable this feature, and provide language-negotiated error messages, based on diff --git a/docs/manual/custom-error.xml.es b/docs/manual/custom-error.xml.es index 927572133f8..feafdd06ac8 100644 --- a/docs/manual/custom-error.xml.es +++ b/docs/manual/custom-error.xml.es @@ -1,7 +1,7 @@ - + + @@ -24,81 +24,81 @@ - Messages d'erreur personnalisés + Messages d'erreur personnalisés

    -

    Le serveur HTTP Apache fournit des messages d'erreur génériques +

    Le serveur HTTP Apache fournit des messages d'erreur génériques pour les codes de statut 4xx ou 5xx ; ces messages sont cependant - relativement austères, imprécis, et peuvent s'avérer intimidants + relativement austères, imprécis, et peuvent s'avérer intimidants pour les visiteurs du site. Si vous le souhaitez, vous pouvez afficher des messages d'erreur plus conviviaux, dans un langage - autre que l'anglais, ou même sous une forme plus en adéquation avec + autre que l'anglais, ou même sous une forme plus en adéquation avec le style de votre site.

    -

    Il est possible de définir des messages d'erreur personnalisés - pour chaque code de statut HTTP associé à une condition d'erreur - - c'est à dire tout code de statut 4xx ou 5xx.

    +

    Il est possible de définir des messages d'erreur personnalisés + pour chaque code de statut HTTP associé à une condition d'erreur - + c'est à dire tout code de statut 4xx ou 5xx.

    De plus, il est possible de personnaliser le message d'erreur en fonction d'un jeu de valeurs - fourni, en utilisant les Inclusions Côté + fourni, en utilisant les Inclusions Côté Serveur (SSI). Un programme CGI ou un autre gestionnaire dynamique (PHP, mod_perl, etc...) peut aussi utiliser ces variables - pour gérer les conditions d'erreur.

    + pour gérer les conditions d'erreur.

    Configuration -

    Les messages d'erreur personnalisés sont configurés via la +

    Les messages d'erreur personnalisés sont configurés via la directive ErrorDocument, qui - peut être utilisée dans un contexte global, serveur virtuel ou - répertoire. On peut utiliser cette directive dans les fichiers + peut être utilisée dans un contexte global, serveur virtuel ou + répertoire. On peut utiliser cette directive dans les fichiers .htaccess si AllowOverride est - définie à FileInfo.

    + définie à FileInfo.

    - - ErrorDocument 500 "Désolé, notre script s'est crashé ; comme c'est - dommage !"
    - ErrorDocument 500 /cgi-bin/crash-recover
    - ErrorDocument 500 http://erreur.example.com/erreur_serveur.html
    - ErrorDocument 404 /erreurs/non_trouve.html
    - ErrorDocument 401 /inscription/comment_s_inscrire.html -
    + +ErrorDocument 500 "Désolé, notre script s'est +crashé ; comme c'est dommage !" +ErrorDocument 500 /cgi-bin/crash-recover +ErrorDocument 500 http://error.example.com/server_error.html +ErrorDocument 404 /errors/not_found.html +ErrorDocument 401 /subscription/how_to_subscribe.html +

    La syntaxe de la directive ErrorDocument est :

    - + ErrorDocument <code_3_chiffres> <action> - -

    où action peut être traitée comme :

    + +

    où action peut être traitée comme :

    1. Une URL de redirection local (si l'action commence par un "/").
    2. Une URL de redirection externe (si action est une URL valide).
    3. -
    4. Le texte à afficher (si l'action ne répond à aucune des - deux conditions précédentes). Entourez le texte de guillemets (") +
    5. Le texte à afficher (si l'action ne répond à aucune des + deux conditions précédentes). Entourez le texte de guillemets (") s'il contient plusieurs mots.

    Dans le cas d'une redirection vers une URL locale, des variables - d'environnement supplémentaires sont définies de façon à ce que la - réponse puisse être personnalisée par la suite. Elles ne sont pas - envoyées aux URLs externes.

    + d'environnement supplémentaires sont définies de façon à ce que la + réponse puisse être personnalisée par la suite. Elles ne sont pas + envoyées aux URLs externes.

    Variables disponibles -

    La redirection vers une autre URL peut être utile, mais +

    La redirection vers une autre URL peut être utile, mais seulement s'il est possible de transmettre certaines informations - qui pourront être utilisées pour expliquer ou journaliser - la condition d'erreur ou le problème plus clairement.

    + qui pourront être utilisées pour expliquer ou journaliser + la condition d'erreur ou le problème plus clairement.

    -

    Pour y parvenir, lorsque la redirection d'erreur est envoyée, - des variables d'environnement supplémentaires sont définies à - partir des en-têtes de la requête originale en préfixant le nom - d'origine de l'en-tête par 'REDIRECT_', ce qui permet de fournir au - message d'erreur le contexte de la requête originelle.

    +

    Pour y parvenir, lorsque la redirection d'erreur est envoyée, + des variables d'environnement supplémentaires sont définies à + partir des en-têtes de la requête originale en préfixant le nom + d'origine de l'en-tête par 'REDIRECT_', ce qui permet de fournir au + message d'erreur le contexte de la requête originelle.

    Par exemple, en plus des variables d'environnement habituelles, vous pouvez recevoir ce qui suit :

    @@ -118,21 +118,21 @@

    Les variables d'environnement REDIRECT_ sont - créées à partir des variables d'environnement préexistantes à la - redirection qui sont préfixées par la chaîne REDIRECT_ ; + créées à partir des variables d'environnement préexistantes à la + redirection qui sont préfixées par la chaîne REDIRECT_ ; par exemple, HTTP_USER_AGENT devient REDIRECT_HTTP_USER_AGENT.

    REDIRECT_URL, REDIRECT_STATUS, et - REDIRECT_QUERY_STRING sont systématiquement définies, - les autres variables n'étant définies que si l'en-tête + REDIRECT_QUERY_STRING sont systématiquement définies, + les autres variables n'étant définies que si l'en-tête correspondant existait avant la condition d'erreur.

    -

    Aucune d'entre elles ne sera définie si votre +

    Aucune d'entre elles ne sera définie si votre directive ErrorDocument - spécifie une redirection externe (toute URL commençant - par un protocole du style http:, même si elle fait - référence au même hôte que le serveur).

    + spécifie une redirection externe (toute URL commençant + par un protocole du style http:, même si elle fait + référence au même hôte que le serveur).

    @@ -141,71 +141,71 @@

    Si vous faites pointer votre directive ErrorDocument vers certains gestionnaires - dynamiques comme les inclusions côté serveur, les scripts CGI ou + dynamiques comme les inclusions côté serveur, les scripts CGI ou d'autres gestionnaires, vous pouvez utiliser les variables - d'environnement supplémentaires disponibles pour personnaliser + d'environnement supplémentaires disponibles pour personnaliser le message.

    -

    Si la directive ErrorDname-basedocument spécifie une redirection locale - vers un script CGI, ce dernier doit ajouter un en-tête +

    Si la directive ErrorDname-basedocument spécifie une redirection locale + vers un script CGI, ce dernier doit ajouter un en-tête "Status:" dans sa sortie afin de s'assurer du bon acheminement jusqu'au client de la condition d'erreur qui a - provoqué cette redirection. Par exemple, un script Perl spécifié + provoqué cette redirection. Par exemple, un script Perl spécifié par une directive ErrorDocument pourrait contenir ce qui suit :

    - - ...
    - print "Content-type: text/html\n";
    - printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
    - ... -
    + +... +print "Content-type: text/html\n"; +printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"}; +... + -

    Si un script est dédié à la gestion d'une condition d'erreur - spécifique, telle que 404 Not Found, il - peut utiliser le code et le texte de l'erreur spécifiques à la +

    Si un script est dédié à la gestion d'une condition d'erreur + spécifique, telle que 404 Not Found, il + peut utiliser le code et le texte de l'erreur spécifiques à la place.

    -

    Notez que si la réponse contient un en-tête - Location: (afin d'initier une redirection côté - client), le script doit émettre un en-tête approprié +

    Notez que si la réponse contient un en-tête + Location: (afin d'initier une redirection côté + client), le script doit émettre un en-tête approprié (comme 302 Found). Dans le cas contraire, - l'en-tête Location: ne produira aucun effet.

    + l'en-tête Location: ne produira aucun effet.

    -
    Messages d'erreur personnalisés + <section id="multi-lang"><title>Messages d'erreur personnalisés multilingues

    Vous trouverez dans la distribution du serveur HTTP Apache un - répertoire contenant des messages d'erreur personnalisés traduits en - 16 langues différentes. Pour activer cette fonctionnalité, vous + répertoire contenant des messages d'erreur personnalisés traduits en + 16 langues différentes. Pour activer cette fonctionnalité, vous pouvez aussi inclure un fichier de configuration qui se trouve dans - le répertoire de configuration conf/extra.

    + le répertoire de configuration conf/extra.

    Dans le fichier de configuration de votre serveur, vous trouverez un groupe de lignes du style :

    - - # Multi-language error messages
    + + # Multi-language error messages #Include conf/extra/httpd-multilang-errordoc.conf -
    + -

    Décommentez la ligne Include pour activer cette - fonctionnalité, et présenter des messages d'erreur dont le langage - sera négocié en fonction du langage préféré défini au niveau du +

    Décommentez la ligne Include pour activer cette + fonctionnalité, et présenter des messages d'erreur dont le langage + sera négocié en fonction du langage préféré défini au niveau du navigateur du client.

    De plus, ces documents contiennent diverses variables - REDIRECT_, de façon à ce que l'utilisateur final - dispose d'informations supplémentaires à propos de ce qui a pu se + REDIRECT_, de façon à ce que l'utilisateur final + dispose d'informations supplémentaires à propos de ce qui a pu se produire, et de ce qu'il est susceptible de faire maintenant.

    -

    Ces documents peuvent être personnalisés en fournissant autant - d'informations utiles que vous le souhaitez aux utilisateurs à +

    Ces documents peuvent être personnalisés en fournissant autant + d'informations utiles que vous le souhaitez aux utilisateurs à propos de votre site, et de ce qu'ils sont susceptibles d'y trouver.

    -

    Pour pouvoir utiliser cette fonctionnalité, vous devez activer +

    Pour pouvoir utiliser cette fonctionnalité, vous devez activer mod_include et mod_negotiation.

    diff --git a/docs/manual/custom-error.xml.ja b/docs/manual/custom-error.xml.ja index d72e8843cbd..639f497965a 100644 --- a/docs/manual/custom-error.xml.ja +++ b/docs/manual/custom-error.xml.ja @@ -1,7 +1,7 @@ - + + + -Apache 1.3 API notes - Apache HTTP Server +Apache 1.3 API notes - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache 1.3 API notes

    Available Languages:  en 

    @@ -105,7 +110,7 @@
  • How handlers work
  • Resource allocation and resource pools
  • Configuration, commands and the like
  • -
    +

    See also

    top

    Basic concepts

    @@ -355,9 +360,7 @@ struct stat finfo; /* Set by server core;

    int header_only;     /* HEAD request, as opposed to GET */
     char *protocol;      /* Protocol, as given to us, or HTTP/0.9 */
     char *method;        /* GET, HEAD, POST, etc. */
    -int method_number;   /* M_GET, M_POST, etc. */
    -
    -

    +int method_number; /* M_GET, M_POST, etc. */

    /* Info for logging */

    char *the_request;
    @@ -379,7 +382,6 @@ int method_number; /* M_GET, M_POST, etc. */

    void *per_dir_config;   /* Options set in config files, etc. */
     void *request_config;   /* Notes on *this* request */

    -
    };

    @@ -1216,7 +1218,28 @@ void *request_config; /* Notes on *this* request */

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/API.xml b/docs/manual/developer/API.xml index ab9c5dd7072..45cd728b99c 100644 --- a/docs/manual/developer/API.xml +++ b/docs/manual/developer/API.xml @@ -387,7 +387,6 @@ int method_number; /* M_GET, M_POST, etc. */
    void *per_dir_config;   /* Options set in config files, etc. */
     void *request_config;   /* Notes on *this* request */
    -
    };
    diff --git a/docs/manual/developer/debugging.html.en b/docs/manual/developer/debugging.html.en index 2d63b74ca59..657a6a8e511 100644 --- a/docs/manual/developer/debugging.html.en +++ b/docs/manual/developer/debugging.html.en @@ -1,197 +1,60 @@ - -Debugging Memory Allocation in APR - Apache HTTP Server +Debugging Memory Allocation in APR - Apache HTTP Server Version 2.4 - + + + - +
    <-

    Debugging Memory Allocation in APR

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    Debugging Memory Allocation in APR

    Available Languages:  en 

    -

    The allocation mechanisms within APR have a number of debugging modes - that can be used to assist in finding memory problems. This document - describes the modes available and gives instructions on activating - them.

    +

    + This document has been removed. +

    +
    - -
    top
    -
    -

    Available debugging options

    -

    Allocation Debugging - ALLOC_DEBUG

    - - -
    Debugging support: Define this to enable code which - helps detect re-use of free()d memory and other such - nonsense.
    - -

    The theory is simple. The FILL_BYTE (0xa5) - is written over all malloc'd memory as we receive it, and - is written over everything that we free up during a - clear_pool. We check that blocks on the free list always - have the FILL_BYTE in them, and we check during - palloc() that the bytes still have FILL_BYTE - in them. If you ever see garbage URLs or whatnot containing lots - of 0xa5s then you know something used data that's been - freed or uninitialized.

    - - -

    Malloc Support - ALLOC_USE_MALLOC

    - - -
    If defined all allocations will be done with - malloc() and free()d appropriately at the - end.
    - -

    This is intended to be used with something like Electric - Fence or Purify to help detect memory problems. Note that if - you're using efence then you should also add in ALLOC_DEBUG. - But don't add in ALLOC_DEBUG if you're using Purify because - ALLOC_DEBUG would hide all the uninitialized read errors - that Purify can diagnose.

    - - -

    Pool Debugging - POOL_DEBUG

    -
    This is intended to detect cases where the wrong pool is - used when assigning data to an object in another pool.
    - -

    In particular, it causes the table_{set,add,merge}n - routines to check that their arguments are safe for the - apr_table_t they're being placed in. It currently only works - with the unix multiprocess model, but could be extended to others.

    - - -

    Table Debugging - MAKE_TABLE_PROFILE

    - - -
    Provide diagnostic information about make_table() calls - which are possibly too small.
    - -

    This requires a recent gcc which supports - __builtin_return_address(). The error_log output will be a - message such as:

    -

    - table_push: apr_table_t created by 0x804d874 hit limit of 10 -

    - -

    Use l *0x804d874 to find the - source that corresponds to. It indicates that a apr_table_t - allocated by a call at that address has possibly too small an - initial apr_table_t size guess.

    - - -

    Allocation Statistics - ALLOC_STATS

    - - -
    Provide some statistics on the cost of allocations.
    - -

    This requires a bit of an understanding of how alloc.c - works.

    - -
    top
    -
    -

    Allowable Combinations

    - -

    Not all the options outlined above can be activated at the - same time. the following table gives more information.

    - - - - - - - - - - - - - - - - -
    - ALLOC DEBUGALLOC USE MALLOCPOOL DEBUGMAKE TABLE PROFILEALLOC STATS
    ALLOC DEBUG-NoYesYesYes
    ALLOC USE MALLOCNo-NoNoNo
    POOL DEBUGYesNo-YesYes
    MAKE TABLE PROFILEYesNoYes-Yes
    ALLOC STATSYesNoYesYes-
    - -

    Additionally the debugging options are not suitable for - multi-threaded versions of the server. When trying to debug - with these options the server should be started in single - process mode.

    -
    top
    -
    -

    Activating Debugging Options

    - -

    The various options for debugging memory are now enabled in - the apr_general.h header file in APR. The various options are - enabled by uncommenting the define for the option you wish to - use. The section of the code currently looks like this - (contained in srclib/apr/include/apr_pools.h)

    - -

    - /*
    - #define ALLOC_DEBUG
    - #define POOL_DEBUG
    - #define ALLOC_USE_MALLOC
    - #define MAKE_TABLE_PROFILE
    - #define ALLOC_STATS
    - */
    -
    - typedef struct ap_pool_t {
    - - union block_hdr *first;
    - union block_hdr *last;
    - struct cleanup *cleanups;
    - struct process_chain *subprocesses;
    - struct ap_pool_t *sub_pools;
    - struct ap_pool_t *sub_next;
    - struct ap_pool_t *sub_prev;
    - struct ap_pool_t *parent;
    - char *free_first_avail;
    -
    - #ifdef ALLOC_USE_MALLOC
    - - void *allocation_list;
    -
    - #endif
    - #ifdef POOL_DEBUG
    - - struct ap_pool_t *joined;
    -
    - #endif
    - - int (*apr_abort)(int retcode);
    - struct datastruct *prog_data;
    -
    - } ap_pool_t; -

    - -

    To enable allocation debugging simply move the #define - ALLOC_DEBUG above the start of the comments block and rebuild - the server.

    - -

    Note

    -

    In order to use the various options the server must - be rebuilt after editing the header file.

    -
    -

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/debugging.xml b/docs/manual/developer/debugging.xml index 9a579f73015..ed913462daa 100644 --- a/docs/manual/developer/debugging.xml +++ b/docs/manual/developer/debugging.xml @@ -26,169 +26,10 @@ Debugging Memory Allocation in APR -

    The allocation mechanisms within APR have a number of debugging modes - that can be used to assist in finding memory problems. This document - describes the modes available and gives instructions on activating - them.

    +

    + This document has been removed. +

    -
    Available debugging options -
    - Allocation Debugging - ALLOC_DEBUG - - Debugging support: Define this to enable code which - helps detect re-use of free()d memory and other such - nonsense. - -

    The theory is simple. The FILL_BYTE (0xa5) - is written over all malloc'd memory as we receive it, and - is written over everything that we free up during a - clear_pool. We check that blocks on the free list always - have the FILL_BYTE in them, and we check during - palloc() that the bytes still have FILL_BYTE - in them. If you ever see garbage URLs or whatnot containing lots - of 0xa5s then you know something used data that's been - freed or uninitialized.

    -
    - -
    - Malloc Support - ALLOC_USE_MALLOC - - If defined all allocations will be done with - malloc() and free()d appropriately at the - end. - -

    This is intended to be used with something like Electric - Fence or Purify to help detect memory problems. Note that if - you're using efence then you should also add in ALLOC_DEBUG. - But don't add in ALLOC_DEBUG if you're using Purify because - ALLOC_DEBUG would hide all the uninitialized read errors - that Purify can diagnose.

    -
    - -
    Pool Debugging - POOL_DEBUG - This is intended to detect cases where the wrong pool is - used when assigning data to an object in another pool. - -

    In particular, it causes the table_{set,add,merge}n - routines to check that their arguments are safe for the - apr_table_t they're being placed in. It currently only works - with the unix multiprocess model, but could be extended to others.

    -
    - -
    - Table Debugging - MAKE_TABLE_PROFILE - - Provide diagnostic information about make_table() calls - which are possibly too small. - -

    This requires a recent gcc which supports - __builtin_return_address(). The error_log output will be a - message such as:

    - - table_push: apr_table_t created by 0x804d874 hit limit of 10 - - -

    Use l *0x804d874 to find the - source that corresponds to. It indicates that a apr_table_t - allocated by a call at that address has possibly too small an - initial apr_table_t size guess.

    -
    - -
    - Allocation Statistics - ALLOC_STATS - - Provide some statistics on the cost of allocations. - -

    This requires a bit of an understanding of how alloc.c - works.

    -
    -
    - -
    Allowable Combinations - -

    Not all the options outlined above can be activated at the - same time. the following table gives more information.

    - - - - - - - - - - - - - - - - - - -
    ALLOC DEBUGALLOC USE MALLOCPOOL DEBUGMAKE TABLE PROFILEALLOC STATS
    ALLOC DEBUG-NoYesYesYes
    ALLOC USE MALLOCNo-NoNoNo
    POOL DEBUGYesNo-YesYes
    MAKE TABLE PROFILEYesNoYes-Yes
    ALLOC STATSYesNoYesYes-
    - -

    Additionally the debugging options are not suitable for - multi-threaded versions of the server. When trying to debug - with these options the server should be started in single - process mode.

    -
    - -
    Activating Debugging Options - -

    The various options for debugging memory are now enabled in - the apr_general.h header file in APR. The various options are - enabled by uncommenting the define for the option you wish to - use. The section of the code currently looks like this - (contained in srclib/apr/include/apr_pools.h)

    - - - /*
    - #define ALLOC_DEBUG
    - #define POOL_DEBUG
    - #define ALLOC_USE_MALLOC
    - #define MAKE_TABLE_PROFILE
    - #define ALLOC_STATS
    - */
    -
    - typedef struct ap_pool_t {
    - - union block_hdr *first;
    - union block_hdr *last;
    - struct cleanup *cleanups;
    - struct process_chain *subprocesses;
    - struct ap_pool_t *sub_pools;
    - struct ap_pool_t *sub_next;
    - struct ap_pool_t *sub_prev;
    - struct ap_pool_t *parent;
    - char *free_first_avail;
    -
    - #ifdef ALLOC_USE_MALLOC
    - - void *allocation_list;
    -
    - #endif
    - #ifdef POOL_DEBUG
    - - struct ap_pool_t *joined;
    -
    - #endif
    - - int (*apr_abort)(int retcode);
    - struct datastruct *prog_data;
    -
    - } ap_pool_t; -
    - -

    To enable allocation debugging simply move the #define - ALLOC_DEBUG above the start of the comments block and rebuild - the server.

    - - Note -

    In order to use the various options the server must - be rebuilt after editing the header file.

    -
    -
    diff --git a/docs/manual/developer/documenting.html b/docs/manual/developer/documenting.html index 499eee1c8aa..d001174c6d2 100644 --- a/docs/manual/developer/documenting.html +++ b/docs/manual/developer/documenting.html @@ -4,6 +4,6 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 -URI: documenting.html.zh-cn +URI: documenting.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/developer/documenting.html.en b/docs/manual/developer/documenting.html.en index 87516847002..7721444e60f 100644 --- a/docs/manual/developer/documenting.html.en +++ b/docs/manual/developer/documenting.html.en @@ -1,28 +1,33 @@ - -Documenting Apache 2.0 - Apache HTTP Server +Documenting code in Apache 2.4 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Documenting code in Apache 2.4

    Available Languages:  en  |  zh-cn 

    -

    Apache 2.0 uses Doxygen to +

    Apache 2.4 uses Doxygen to document the APIs and global variables in the code. This will explain the basics of how to document using Doxygen.

    @@ -80,7 +85,28 @@

    Available Languages:  en  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/documenting.html.zh-cn b/docs/manual/developer/documenting.html.zh-cn.utf8 similarity index 60% rename from docs/manual/developer/documenting.html.zh-cn rename to docs/manual/developer/documenting.html.zh-cn.utf8 index ddfdc37c809..21c0ab464fa 100644 --- a/docs/manual/developer/documenting.html.zh-cn +++ b/docs/manual/developer/documenting.html.zh-cn.utf8 @@ -1,26 +1,32 @@ - -Apache 2.0 文档 - Apache HTTP 服务器 +Apache 2.0 文档 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache 2.0 文档

    可用语言:  en  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    Apache 2.0 使用 Doxygen 从代码中 生成 API 和全局变量的文档。下面是对使用 Doxygen 生成文档的简介。

    @@ -76,7 +82,28 @@

    可用语言:  en  |  zh-cn 

    -
    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/documenting.xml b/docs/manual/developer/documenting.xml index b398cd3cbae..77631189d3b 100644 --- a/docs/manual/developer/documenting.xml +++ b/docs/manual/developer/documenting.xml @@ -23,10 +23,10 @@ Developer Documentation -Documenting Apache 2.0 +Documenting code in Apache 2.4 -

    Apache 2.0 uses Doxygen to +

    Apache 2.4 uses Doxygen to document the APIs and global variables in the code. This will explain the basics of how to document using Doxygen.

    diff --git a/docs/manual/developer/documenting.xml.meta b/docs/manual/developer/documenting.xml.meta index 3f13be9ff39..a7adceb68c0 100644 --- a/docs/manual/developer/documenting.xml.meta +++ b/docs/manual/developer/documenting.xml.meta @@ -8,6 +8,6 @@ en - zh-cn + zh-cn diff --git a/docs/manual/developer/documenting.xml.zh-cn b/docs/manual/developer/documenting.xml.zh-cn index 040ce7ca6b2..77046120ceb 100644 --- a/docs/manual/developer/documenting.xml.zh-cn +++ b/docs/manual/developer/documenting.xml.zh-cn @@ -1,7 +1,7 @@ - + -How filters work in Apache 2.0 - Apache HTTP Server +How filters work in Apache 2.0 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    How filters work in Apache 2.0

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    How filters work in Apache 2.0

    Available Languages:  en 

    @@ -32,7 +37,7 @@
  • How are filters inserted?
  • Asis
  • Explanations
  • -
    +

    See also

    top

    Filter Types

    @@ -100,12 +105,14 @@

    This is actually rather simple in theory, but the code is complex. First of all, it is important that everybody realize that there are three filter lists for each request, but they are all - concatenated together. So, the first list is - r->output_filters, then r->proto_output_filters, - and finally r->connection->output_filters. These correspond - to the RESOURCE, PROTOCOL, and - CONNECTION filters respectively. The problem previously, was - that we used a singly linked list to create the filter stack, and we + concatenated together:

    +
      +
    • r->output_filters (corresponds to RESOURCE)
    • +
    • r->proto_output_filters (corresponds to PROTOCOL)
    • +
    • r->connection->output_filters (corresponds to CONNECTION)
    • +
    + +

    The problem previously, was that we used a singly linked list to create the filter stack, and we started from the "correct" location. This means that if I had a RESOURCE filter on the stack, and I added a CONNECTION filter, the CONNECTION filter would @@ -130,19 +137,15 @@ same set of filters as the main request. A graphical representation might help:

    -
    -Default_handler --> includes_filter --> byterange --> ...
    -
    +
    Default_handler --> includes_filter --> byterange --> ...

    If the includes filter creates a sub request, then we don't want the data from that sub-request to go through the includes filter, because it might not be SSI data. So, the subrequest adds the following:

    -
    -Default_handler --> includes_filter -/-> byterange --> ...
    +
    Default_handler --> includes_filter -/-> byterange --> ...
                                         /
    -Default_handler --> sub_request_core
    -
    +Default_handler --> sub_request_core

    What happens if the subrequest is SSI data? Well, that's easy, the includes_filter is a resource filter, so it will be added to @@ -204,7 +207,28 @@ Default_handler --> sub_request_core

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/filters.xml b/docs/manual/developer/filters.xml index 5e44ababc53..e4b42253d05 100644 --- a/docs/manual/developer/filters.xml +++ b/docs/manual/developer/filters.xml @@ -99,12 +99,14 @@

    This is actually rather simple in theory, but the code is complex. First of all, it is important that everybody realize that there are three filter lists for each request, but they are all - concatenated together. So, the first list is - r->output_filters, then r->proto_output_filters, - and finally r->connection->output_filters. These correspond - to the RESOURCE, PROTOCOL, and - CONNECTION filters respectively. The problem previously, was - that we used a singly linked list to create the filter stack, and we + concatenated together:

    +
      +
    • r->output_filters (corresponds to RESOURCE)
    • +
    • r->proto_output_filters (corresponds to PROTOCOL)
    • +
    • r->connection->output_filters (corresponds to CONNECTION)
    • +
    + +

    The problem previously, was that we used a singly linked list to create the filter stack, and we started from the "correct" location. This means that if I had a RESOURCE filter on the stack, and I added a CONNECTION filter, the CONNECTION filter would diff --git a/docs/manual/developer/hooks.html.en b/docs/manual/developer/hooks.html.en index 2c2ef68227a..d8a3335037f 100644 --- a/docs/manual/developer/hooks.html.en +++ b/docs/manual/developer/hooks.html.en @@ -1,22 +1,27 @@ - -Apache 2.0 Hook Functions - Apache HTTP Server +Hook Functions in the Apache HTTP Server 2.x - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Hook Functions in the Apache HTTP Server 2.x

    Available Languages:  en 

    @@ -26,16 +31,34 @@ date.

    -

    In general, a hook function is one that Apache will call at - some point during the processing of a request. Modules can - provide functions that are called, and specify when they get - called in comparison to other modules.

    +

    In general, a hook function is one that the Apache HTTP Server + will call at some point during the processing of a request. + Modules can provide functions that are called, and specify when + they get called in comparison to other modules.

    -
    top
    +

    Core Hooks

    +

    The httpd's core modules offer a predefinined list of hooks + used during the standard request processing + phase. Creating a new hook will expose a function that + implements it (see sections below) but it is essential to undestand that you will not + extend the httpd's core hooks. Their presence and order in the request processing is in fact + a consequence of how they are called in server/request.c + (check this section + for an overview). The core hooks are listed in the + doxygen documentation.

    + +

    Reading guide for developing modules and + request processing before proceeding is + highly recomended. +

    +
    top
    +

    Creating a hook function

    In order to create a new hook, four things need to be done:

    @@ -46,9 +69,8 @@ arguments. For example, if the hook returns an int and takes a request_rec * and an int and is called do_something, then declare it like this:

    -

    - AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) -

    +
    AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n))
    +

    This should go in a header which modules will include if they want to use the hook.

    @@ -59,14 +81,11 @@ which is used to record the module functions that use the hook. This is declared as follows:

    -

    - APR_HOOK_STRUCT(
    - - APR_HOOK_LINK(do_something)
    - ...
    -
    - ) -

    +
    APR_HOOK_STRUCT(
    +  APR_HOOK_LINK(do_something)
    +  ...
    +)
    +

    Implement the hook caller

    @@ -79,38 +98,33 @@

    If the return value of a hook is void, then all the hooks are called, and the caller is implemented like this:

    -

    - AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n)) -

    +
    AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n))
    +

    The second and third arguments are the dummy argument declaration and the dummy arguments as they will be used when calling the hook. In other words, this macro expands to something like this:

    -

    - void ap_run_do_something(request_rec *r, int n)
    - {
    - - ...
    - do_something(r, n);
    -
    - } -

    +
    void ap_run_do_something(request_rec *r, int n)
    +{
    +    ...
    +    do_something(r, n);
    +}
    +

    Hooks that return a value

    If the hook returns a value, then it can either be run until the first hook that does something interesting, like so:

    -

    - AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED) -

    +
    AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED)
    +

    The first hook that does not return DECLINED stops the loop and its return value is returned from the hook - caller. Note that DECLINED is the tradition Apache - hook return meaning "I didn't do anything", but it can be + caller. Note that DECLINED is the traditional + hook return value meaning "I didn't do anything", but it can be whatever suits you.

    Alternatively, all hooks can be run until an error occurs. @@ -120,9 +134,8 @@ value other than one of those two stops the loop, and its return is the return value. Declare these like so:

    -

    - AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED) -

    +
    AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED)
    +

    Again, OK and DECLINED are the traditional values. You can use what you want.

    @@ -133,12 +146,11 @@

    At appropriate moments in the code, call the hook caller, like so:

    -

    - int n, ret;
    - request_rec *r;
    -
    - ret=ap_run_do_something(r, n); -

    +
    int n, ret;
    +request_rec *r;
    +
    +ret=ap_run_do_something(r, n);
    +
    top
    @@ -150,43 +162,36 @@

    Include the appropriate header, and define a static function of the correct type:

    -

    - static int my_something_doer(request_rec *r, int n)
    - {
    - - ...
    - return OK;
    -
    - } -

    +
    static int my_something_doer(request_rec *r, int n)
    +{
    +    ...
    +    return OK;
    +}
    +

    Add a hook registering function

    -

    During initialisation, Apache will call each modules hook +

    During initialisation, the server will call each modules hook registering function, which is included in the module structure:

    -

    - static void my_register_hooks()
    - {
    - - ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
    -
    - }
    -
    - mode MODULE_VAR_EXPORT my_module =
    - {
    - - ...
    - my_register_hooks /* register hooks */
    -
    - }; -

    +
    static void my_register_hooks()
    +{
    +    ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
    +}
    +
    +mode MODULE_VAR_EXPORT my_module =
    +{
    +    ...
    +    my_register_hooks       /* register hooks */
    +};
    +

    Controlling hook calling order

    In the example above, we didn't use the three arguments in - the hook registration function that control calling order. + the hook registration function that control calling order of + all the functions registered within the hook. There are two mechanisms for doing this. The first, rather crude, method, allows us to specify roughly where the hook is run relative to other modules. The final argument control this. @@ -197,9 +202,9 @@ order relative to each other, but, of course, all modules using APR_HOOK_FIRST will be run before APR_HOOK_MIDDLE which are before APR_HOOK_LAST. Modules that don't care - when they are run should use APR_HOOK_MIDDLE. (I spaced - these out so people could do stuff like APR_HOOK_FIRST-2 - to get in slightly earlier, but is this wise? - Ben)

    + when they are run should use APR_HOOK_MIDDLE. These + values are spaced out, so that positions like APR_HOOK_FIRST-2 + are possible to hook slightly earlier than other functions.

    Note that there are two more values, APR_HOOK_REALLY_FIRST and APR_HOOK_REALLY_LAST. These @@ -213,27 +218,44 @@ example, suppose we want "mod_xyz.c" and "mod_abc.c" to run before we do, then we'd hook as follows:

    -

    - static void register_hooks()
    - {
    - - static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
    -
    - ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
    -
    - } -

    +
    static void register_hooks()
    +{
    +    static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
    +
    +    ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
    +}
    +

    Note that the sort used to achieve this is stable, so ordering set by APR_HOOK_ORDER is preserved, as far as is possible.

    -

    Ben Laurie, 15th August 1999

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/hooks.xml b/docs/manual/developer/hooks.xml index b1218ce1a81..37ea0608d6b 100644 --- a/docs/manual/developer/hooks.xml +++ b/docs/manual/developer/hooks.xml @@ -23,7 +23,7 @@ Developer Documentation -Apache 2.0 Hook Functions +Hook Functions in the Apache HTTP Server 2.x Warning @@ -31,12 +31,29 @@ date.

    -

    In general, a hook function is one that Apache will call at - some point during the processing of a request. Modules can - provide functions that are called, and specify when they get - called in comparison to other modules.

    +

    In general, a hook function is one that the Apache HTTP Server + will call at some point during the processing of a request. + Modules can provide functions that are called, and specify when + they get called in comparison to other modules.

    +
    Core Hooks +

    The httpd's core modules offer a predefinined list of hooks + used during the standard request processing + phase. Creating a new hook will expose a function that + implements it (see sections below) but it is essential to undestand that you will not + extend the httpd's core hooks. Their presence and order in the request processing is in fact + a consequence of how they are called in server/request.c + (check this section + for an overview). The core hooks are listed in the + doxygen documentation.

    + +

    Reading guide for developing modules and + request processing before proceeding is + highly recomended. +

    +
    +
    Creating a hook function

    In order to create a new hook, four things need to be done:

    @@ -47,9 +64,9 @@ arguments. For example, if the hook returns an int and takes a request_rec * and an int and is called do_something, then declare it like this:

    - - AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) - + +AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) +

    This should go in a header which modules will include if they want to use the hook.

    @@ -60,14 +77,12 @@ which is used to record the module functions that use the hook. This is declared as follows:

    - - APR_HOOK_STRUCT(
    - - APR_HOOK_LINK(do_something)
    - ...
    -
    - ) -
    + +APR_HOOK_STRUCT( + APR_HOOK_LINK(do_something) + ... +) +
    Implement the hook caller @@ -80,38 +95,36 @@

    If the return value of a hook is void, then all the hooks are called, and the caller is implemented like this:

    - - AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n)) - + +AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n)) +

    The second and third arguments are the dummy argument declaration and the dummy arguments as they will be used when calling the hook. In other words, this macro expands to something like this:

    - - void ap_run_do_something(request_rec *r, int n)
    - {
    - - ...
    - do_something(r, n);
    -
    - } -
    + +void ap_run_do_something(request_rec *r, int n) +{ + ... + do_something(r, n); +} +
    Hooks that return a value

    If the hook returns a value, then it can either be run until the first hook that does something interesting, like so:

    - - AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED) - + +AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED) +

    The first hook that does not return DECLINED stops the loop and its return value is returned from the hook - caller. Note that DECLINED is the tradition Apache - hook return meaning "I didn't do anything", but it can be + caller. Note that DECLINED is the traditional + hook return value meaning "I didn't do anything", but it can be whatever suits you.

    Alternatively, all hooks can be run until an error occurs. @@ -121,9 +134,9 @@ value other than one of those two stops the loop, and its return is the return value. Declare these like so:

    - - AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED) - + +AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED) +

    Again, OK and DECLINED are the traditional values. You can use what you want.

    @@ -134,12 +147,12 @@

    At appropriate moments in the code, call the hook caller, like so:

    - - int n, ret;
    - request_rec *r;
    -
    - ret=ap_run_do_something(r, n); -
    + +int n, ret; +request_rec *r; + +ret=ap_run_do_something(r, n); +
    @@ -151,43 +164,38 @@

    Include the appropriate header, and define a static function of the correct type:

    - - static int my_something_doer(request_rec *r, int n)
    - {
    - - ...
    - return OK;
    -
    - } -
    + +static int my_something_doer(request_rec *r, int n) +{ + ... + return OK; +} +
    Add a hook registering function -

    During initialisation, Apache will call each modules hook +

    During initialisation, the server will call each modules hook registering function, which is included in the module structure:

    - - static void my_register_hooks()
    - {
    - - ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE);
    -
    - }
    -
    - mode MODULE_VAR_EXPORT my_module =
    - {
    - - ...
    - my_register_hooks /* register hooks */
    -
    - }; -
    + +static void my_register_hooks() +{ + ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE); +} + +mode MODULE_VAR_EXPORT my_module = +{ + ... + my_register_hooks /* register hooks */ +}; +
    Controlling hook calling order

    In the example above, we didn't use the three arguments in - the hook registration function that control calling order. + the hook registration function that control calling order of + all the functions registered within the hook. There are two mechanisms for doing this. The first, rather crude, method, allows us to specify roughly where the hook is run relative to other modules. The final argument control this. @@ -198,9 +206,9 @@ order relative to each other, but, of course, all modules using APR_HOOK_FIRST will be run before APR_HOOK_MIDDLE which are before APR_HOOK_LAST. Modules that don't care - when they are run should use APR_HOOK_MIDDLE. (I spaced - these out so people could do stuff like APR_HOOK_FIRST-2 - to get in slightly earlier, but is this wise? - Ben)

    + when they are run should use APR_HOOK_MIDDLE. These + values are spaced out, so that positions like APR_HOOK_FIRST-2 + are possible to hook slightly earlier than other functions.

    Note that there are two more values, APR_HOOK_REALLY_FIRST and APR_HOOK_REALLY_LAST. These @@ -214,22 +222,19 @@ example, suppose we want "mod_xyz.c" and "mod_abc.c" to run before we do, then we'd hook as follows:

    - - static void register_hooks()
    - {
    - - static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL };
    -
    - ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE);
    -
    - } -
    + +static void register_hooks() +{ + static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL }; + + ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE); +} +

    Note that the sort used to achieve this is stable, so ordering set by APR_HOOK_ORDER is preserved, as far as is possible.

    -

    Ben Laurie, 15th August 1999

    diff --git a/docs/manual/developer/index.html b/docs/manual/developer/index.html index c260e8bc4fb..aaa13b29cf7 100644 --- a/docs/manual/developer/index.html +++ b/docs/manual/developer/index.html @@ -4,6 +4,6 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 -URI: index.html.zh-cn +URI: index.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/developer/index.html.en b/docs/manual/developer/index.html.en index 7e5ef5bb9e1..6db7276853b 100644 --- a/docs/manual/developer/index.html.en +++ b/docs/manual/developer/index.html.en @@ -1,74 +1,76 @@ - -Developer Documentation for Apache 2.0 - Apache HTTP Server +Developer Documentation for the Apache HTTP Server 2.4 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Developer Documentation for Apache 2.0

    +Apache > HTTP Server > Documentation > Version 2.4

    Developer Documentation for the Apache HTTP Server 2.4

    Available Languages:  en  |  zh-cn 

    -

    Many of the documents on these Developer pages are lifted - from Apache 1.3's documentation. While they are all being - updated to Apache 2, they are in different stages of - progress. Please be patient, and point out any discrepancies or - errors on the developer/ pages directly to the - dev@httpd.apache.org mailing list.

    +

    Warning

    +

    Many of the documents listed here are in need of update. + They are in different stages of progress. + Please be patient and follow this link + to propose a fix or point out any error/discrepancy.

    +
    -
    \ No newline at end of file diff --git a/docs/manual/developer/index.html.zh-cn b/docs/manual/developer/index.html.zh-cn.utf8 similarity index 79% rename from docs/manual/developer/index.html.zh-cn rename to docs/manual/developer/index.html.zh-cn.utf8 index cdf357e940e..6b56830ebda 100644 --- a/docs/manual/developer/index.html.zh-cn +++ b/docs/manual/developer/index.html.zh-cn.utf8 @@ -1,26 +1,32 @@ - -Apache 2.0 开发者文档 - Apache HTTP 服务器 +Apache 2.0 开发者文档 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache 2.0 开发者文档

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache 2.0 开发者文档

    可用语言:  en  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    开发者页面的许多文档都来自于 Apache 1.3。当更新到 Apache 2 时,它们可能位于不同的阶段。请耐心等待,或者直接向 @@ -73,6 +79,10 @@

    可用语言:  en  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/developer/index.xml b/docs/manual/developer/index.xml index 296792dcef8..ccbba6f7928 100644 --- a/docs/manual/developer/index.xml +++ b/docs/manual/developer/index.xml @@ -23,59 +23,50 @@ -Developer Documentation for Apache 2.0 +Developer Documentation for the Apache HTTP Server 2.4 -

    Many of the documents on these Developer pages are lifted - from Apache 1.3's documentation. While they are all being - updated to Apache 2, they are in different stages of - progress. Please be patient, and point out any discrepancies or - errors on the developer/ pages directly to the - dev@httpd.apache.org mailing list.

    + Warning +

    Many of the documents listed here are in need of update. + They are in different stages of progress. + Please be patient and follow this link + to propose a fix or point out any error/discrepancy.

    +
    -
    Topics +
    2.4 development documents +
    + +
    Upgrading to 2.4 +
    External Resources diff --git a/docs/manual/developer/index.xml.meta b/docs/manual/developer/index.xml.meta index 55e97b8b7a3..734b3bec161 100644 --- a/docs/manual/developer/index.xml.meta +++ b/docs/manual/developer/index.xml.meta @@ -8,6 +8,6 @@ en - zh-cn + zh-cn diff --git a/docs/manual/developer/index.xml.zh-cn b/docs/manual/developer/index.xml.zh-cn index a4928a5dc7f..3af05e78997 100644 --- a/docs/manual/developer/index.xml.zh-cn +++ b/docs/manual/developer/index.xml.zh-cn @@ -1,7 +1,7 @@ - + +Developing modules for the Apache HTTP Server 2.4 - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    Developing modules for the Apache HTTP Server 2.4

    +
    +

    Available Languages:  en 

    +
    + +

    This document explains how you can develop modules for the Apache HTTP +Server 2.4

    +
    + +
    top
    +
    +

    Introduction

    +

    What we will be discussing in this document

    +

    +This document will discuss how you can create modules for the Apache +HTTP Server 2.4, by exploring an example module called +mod_example. In the first part of this document, the purpose +of this module will be to calculate and print out various digest values for +existing files on your web server, whenever we access the URL +http://hostname/filename.sum. For instance, if we want to know the +MD5 digest value of the file located at +http://www.example.com/index.html, we would visit +http://www.example.com/index.html.sum. +

    + +

    +In the second part of this document, which deals with configuration +directive and context awareness, we will be looking at a module that simply +writes out its own configuration to the client. +

    + + +

    Prerequisites

    +

    +First and foremost, you are expected to have a basic knowledge of how the C +programming language works. In most cases, we will try to be as pedagogical +as possible and link to documents describing the functions used in the +examples, but there are also many cases where it is necessary to either +just assume that "it works" or do some digging yourself into what the hows +and whys of various function calls. +

    +

    +Lastly, you will need to have a basic understanding of how modules are +loaded and configured in the Apache HTTP Server, as well as how to get the headers for +Apache if you do not have them already, as these are needed for compiling +new modules. +

    + +

    Compiling your module

    +

    +To compile the source code we are building in this document, we will be +using APXS. Assuming your source file +is called mod_example.c, compiling, installing and activating the module is +as simple as: +

    +
    apxs -i -a -c mod_example.c
    + + +
    top
    +
    +

    Defining a module

    +

    +Module name tags
    +Every module starts with the same declaration, or name tag if you will, +that defines a module as a separate entity within Apache:

    + + + +
    module AP_MODULE_DECLARE_DATA   example_module =
    +{ 
    +    STANDARD20_MODULE_STUFF,
    +    create_dir_conf, /* Per-directory configuration handler */
    +    merge_dir_conf,  /* Merge handler for per-directory configurations */
    +    create_svr_conf, /* Per-server configuration handler */
    +    merge_svr_conf,  /* Merge handler for per-server configurations */
    +    directives,      /* Any directives we may have for httpd */
    +    register_hooks   /* Our hook registering function */
    +};
    + + + +

    +This bit of code lets the server know that we have now registered a new module +in the system, and that its name is example_module. The name +of the module is used primarily for two things:
    +

    +
      +
    • Letting the server know how to load the module using the LoadModule
    • +
    • Setting up a namespace for the module to use in configurations
    • +
    +

    +For now, we're only concerned with the first purpose of the module name, +which comes into play when we need to load the module: +

    +
    LoadModule example_module modules/mod_example.so
    + +

    +In essence, this tells the server to open up mod_example.so and look for a module +called example_module. +

    +

    +Within this name tag of ours is also a bunch of references to how we would +like to handle things: Which directives do we respond to in a configuration +file or .htaccess, how do we operate within specific contexts, and what +handlers are we interested in registering with the Apache HTTP service. We'll +return to all these elements later in this document. +

    +
    top
    +
    +

    Getting started: Hooking into the server

    +

    An introduction to hooks

    +

    +When handling requests in Apache HTTP Server 2.4, the first thing you will need to do is +create a hook into the request handling process. A hook is essentially a +message telling the server that you are willing to either serve or at least +take a glance at certain requests given by clients. All handlers, whether +it's mod_rewrite, mod_authn_*, mod_proxy and so on, are hooked into +specific parts of the request process. As you are probably aware, modules +serve different purposes; Some are authentication/authorization handlers, +others are file or script handlers while some third modules rewrite URIs or +proxies content. Furthermore, in the end, it is up to the user of the server +how and when each module will come into place. Thus, the server itself does not +presume to know which module is responsible for handling a specific +request, and will ask each module whether they have an interest in a given +request or not. It is then up to each module to either gently decline +serving a request, accept serving it or flat out deny the request from +being served, as authentication/authorization modules do:
    +Hook handling in httpd
    +To make it a bit easier for handlers such as our mod_example to know +whether the client is requesting content we should handle or not, the server +has directives for hinting to modules whether their assistance is needed or +not. Two of these are AddHandler +and SetHandler. Let's take a look at +an example using AddHandler. In +our example case, we want every request ending with .sum to be served by +mod_example, so we'll add a configuration directive that tells +the server to do just that: +

    +
    AddHandler example-handler .sum
    + +

    +What this tells the server is the following: Whenever we receive a request +for a URI ending in .sum, we are to let all modules know that we are +looking for whoever goes by the name of "example-handler" . +Thus, when a request is being served that ends in .sum, the server will let all +modules know, that this request should be served by "example-handler +". As you will see later, when we start building mod_example, we will +check for this handler tag relayed by AddHandler and reply to +the server based on the value of this tag. +

    + +

    Hooking into httpd

    +

    +To begin with, we only want to create a simple handler, that replies to the +client browser when a specific URL is requested, so we won't bother setting +up configuration handlers and directives just yet. Our initial module +definition will look like this:

    + + + +
    module AP_MODULE_DECLARE_DATA   example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    NULL,
    +    NULL,
    +    NULL,
    +    NULL,
    +    NULL,
    +    register_hooks   /* Our hook registering function */
    +};
    + + + + +

    This lets the server know that we are not interested in anything fancy, we +just want to hook onto the requests and possibly handle some of them.

    + +

    The reference in our example declaration, register_hooks +is the name of a function we will create to manage how we hook onto the +request process. In this example module, the function has just one purpose; +To create a simple hook that gets called after all the rewrites, access +control etc has been handled. Thus, we will let the server know, that we want +to hook into its process as one of the last modules: +

    + + +
    static void register_hooks(apr_pool_t *pool)
    +{
    +    /* Create a hook in the request handler, so we get called when a request arrives */
    +    ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
    +}
    + + + +

    +The example_handler reference is the function that will handle +the request. We will discuss how to create a handler in the next chapter. +

    + +

    Other useful hooks

    +

    +Hooking into the request handling phase is but one of many hooks that you +can create. Some other ways of hooking are: +

    +
      +
    • ap_hook_child_init: Place a hook that executes when a child process is spawned (commonly used for initializing modules after the server has forked)
    • +
    • ap_hook_pre_config: Place a hook that executes before any configuration data has been read (very early hook)
    • +
    • ap_hook_post_config: Place a hook that executes after configuration has been parsed, but before the server has forked
    • +
    • ap_hook_translate_name: Place a hook that executes when a URI needs to be translated into a filename on the server (think mod_rewrite)
    • +
    • ap_hook_quick_handler: Similar to ap_hook_handler, except it is run before any other request hooks (translation, auth, fixups etc)
    • +
    • ap_hook_log_transaction: Place a hook that executes when the server is about to add a log entry of the current request
    • +
    + + +
    top
    +
    +

    Building a handler

    +

    +A handler is essentially a function that receives a callback when a request +to the server is made. It is passed a record of the current request (how it was +made, which headers and requests were passed along, who's giving the +request and so on), and is put in charge of either telling the server that it's +not interested in the request or handle the request with the tools provided. +

    +

    A simple "Hello, world!" +handler

    +

    Let's start off by making a very simple request handler +that does the following: +

    +
      +
    1. Check that this is a request that should be served by "example-handler"
    2. +
    3. Set the content type of our output to text/html
    4. +
    5. Write "Hello, world!" back to the client browser
    6. +
    7. Let the server know that we took care of this request and everything went fine
    8. +
    +

    +In C code, our example handler will now look like this: +

    + + +
    static int example_handler(request_rec *r)
    +{
    +    /* First off, we need to check if this is a call for the "example-handler" handler.
    +     * If it is, we accept it and do our things, if not, we simply return DECLINED,
    +     * and the server will try somewhere else.
    +     */
    +    if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED);
    +    
    +    /* Now that we are handling this request, we'll write out "Hello, world!" to the client.
    +     * To do so, we must first set the appropriate content type, followed by our output.
    +     */
    +    ap_set_content_type(r, "text/html");
    +    ap_rprintf(r, "Hello, world!");
    +    
    +    /* Lastly, we must tell the server that we took care of this request and everything went fine.
    +     * We do so by simply returning the value OK to the server.
    +     */
    +    return OK;
    +}
    + + + +

    +Now, we put all we have learned together and end up with a program that +looks like +mod_example_1.c +. The functions used in this example will be explained later in the section +"Some useful functions you should know". +

    + +

    The request_rec structure

    +

    The most essential part of any request is the request record +. In a call to a handler function, this is represented by the +request_rec* structure passed along with every call that is made. +This struct, typically just referred to as r in modules, +contains all the information you need for your module to fully process any +HTTP request and respond accordingly.

    Some key elements of the +request_rec structure are: +

    +
      +
    • r->handler (char*): Contains the name of the handler the server is currently asking to do the handling of this request
    • +
    • r->method (char*): Contains the HTTP method being used, f.x. GET or POST
    • +
    • r->filename (char*): Contains the translated filename the client is requesting
    • +
    • r->args (char*): Contains the query string of the request, if any
    • +
    • r->headers_in (apr_table_t*): Contains all the headers sent by the client
    • +
    • r->connection (conn_rec*): A record containing information about the current connection
    • +
    • r->user (char*): If the URI requires authentication, this is set to the username provided
    • +
    • r->useragent_ip (char*): The IP address of the client connecting to us
    • +
    • r->pool (apr_pool_t*): The memory pool of this request. We'll discuss this in the +"Memory management" chapter.
    • +
    +

    +A complete list of all the values contained within the request_rec structure can be found in +the httpd.h header +file or at http://ci.apache.org/projects/httpd/trunk/doxygen/structrequest__rec.html. +

    + + +

    +Let's try out some of these variables in another example handler:
    +

    + + +
    static int example_handler(request_rec *r)
    +{
    +    /* Set the appropriate content type */
    +    ap_set_content_type(r, "text/html");
    +
    +    /* Print out the IP address of the client connecting to us: */
    +    ap_rprintf(r, "<h2>Hello, %s!</h2>", r->useragent_ip);
    +    
    +    /* If we were reached through a GET or a POST request, be happy, else sad. */
    +    if ( !strcmp(r->method, "POST") || !strcmp(r->method, "GET") ) {
    +        ap_rputs("You used a GET or a POST method, that makes us happy!<br/>", r);
    +    }
    +    else {
    +        ap_rputs("You did not use POST or GET, that makes us sad :(<br/>", r);
    +    }
    +
    +    /* Lastly, if there was a query string, let's print that too! */
    +    if (r->args) {
    +        ap_rprintf(r, "Your query string was: %s", r->args);
    +    }
    +    return OK;
    +}
    + + + + + +

    Return values

    +

    +Apache relies on return values from handlers to signify whether a request +was handled or not, and if so, whether the request went well or not. If a +module is not interested in handling a specific request, it should always +return the value DECLINED. If it is handling a request, it +should either return the generic value OK, or a specific HTTP +status code, for example: +

    + + +
    static int example_handler(request_rec *r)
    +{
    +    /* Return 404: Not found */
    +    return HTTP_NOT_FOUND;
    +}
    + + + +

    +Returning OK or a HTTP status code does not necessarily mean +that the request will end. The server may still have other handlers that are +interested in this request, for instance the logging modules which, upon a +successful request, will write down a summary of what was requested and how +it went. To do a full stop and prevent any further processing after your +module is done, you can return the value DONE to let the server +know that it should cease all activity on this request and carry on with +the next, without informing other handlers. +
    +General response codes: +

    +
      +
    • DECLINED: We are not handling this request
    • +
    • OK: We handled this request and it went well
    • +
    • DONE: We handled this request and the server should just close this thread without further processing
    • +
    +

    +HTTP specific return codes (excerpt): +

    +
      +
    • HTTP_OK (200): Request was okay
    • +
    • HTTP_MOVED_PERMANENTLY (301): The resource has moved to a new URL
    • +
    • HTTP_UNAUTHORIZED (401): Client is not authorized to visit this page
    • +
    • HTTP_FORBIDDEN (403): Permission denied
    • +
    • HTTP_NOT_FOUND (404): File not found
    • +
    • HTTP_INTERNAL_SERVER_ERROR (500): Internal server error (self explanatory)
    • +
    + + +

    Some useful functions you should know

    + +
      +
    • + ap_rputs(const char *string, request_rec *r):
      + Sends a string of text to the client. This is a shorthand version of + ap_rwrite. + + + +
      ap_rputs("Hello, world!", r);
      + + + + +
    • +
    • + + ap_rprintf:
      + This function works just like printf, except it sends the result to the client. + + + +
      ap_rprintf(r, "Hello, %s!", r->useragent_ip);
      + + + +
    • +
    • + + ap_set_content_type(request_rec *r, const char *type):
      + Sets the content type of the output you are sending. + + + +
      ap_set_content_type(r, "text/plain"); /* force a raw text output */
      + + + +
    • + + +
    + + +

    Memory management

    +

    +Managing your resources in Apache HTTP Server 2.4 is quite easy, thanks to the memory pool +system. In essence, each server, connection and request have their own +memory pool that gets cleaned up when its scope ends, e.g. when a request +is done or when a server process shuts down. All your module needs to do is +latch onto this memory pool, and you won't have to worry about having to +clean up after yourself - pretty neat, huh? +

    + +

    +In our module, we will primarily be allocating memory for each request, so +it's appropriate to use the r->pool +reference when creating new objects. A few of the functions for allocating +memory within a pool are: +

    +
      +
    • void* apr_palloc( +apr_pool_t *p, apr_size_t size): Allocates size number of bytes in the pool for you
    • +
    • void* apr_pcalloc( +apr_pool_t *p, apr_size_t size): Allocates size number of bytes in the pool for you and sets all bytes to 0
    • +
    • char* apr_pstrdup( +apr_pool_t *p, const char *s): Creates a duplicate of the string s. This is useful for copying constant values so you can edit them
    • +
    • char* apr_psprintf( +apr_pool_t *p, const char *fmt, ...): Similar to sprintf, except the server supplies you with an appropriately allocated target variable
    • +
    + +

    Let's put these functions into an example handler:

    + + + +
    static int example_handler(request_rec *r)
    +{
    +    const char *original = "You can't edit this!";
    +    char *copy;
    +    int *integers;
    +    
    +    /* Allocate space for 10 integer values and set them all to zero. */
    +    integers = apr_pcalloc(r->pool, sizeof(int)*10); 
    +    
    +    /* Create a copy of the 'original' variable that we can edit. */
    +    copy = apr_pstrdup(r->pool, original);
    +    return OK;
    +}
    + + + +

    +This is all well and good for our module, which won't need any +pre-initialized variables or structures. However, if we wanted to +initialize something early on, before the requests come rolling in, we +could simply add a call to a function in our register_hooks +function to sort it out: +

    + + +
    static void register_hooks(apr_pool_t *pool)
    +{
    +    /* Call a function that initializes some stuff */
    +    example_init_function(pool);
    +    /* Create a hook in the request handler, so we get called when a request arrives */
    +    ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
    +}
    + + + +

    +In this pre-request initialization function we would not be using the +same pool as we did when allocating resources for request-based functions. +Instead, we would use the pool given to us by the server for allocating memory +on a per-process based level. +

    + + +

    Parsing request data

    +

    +In our example module, we would like to add a feature, that checks which +type of digest, MD5 or SHA1 the client would like to see. This could be +solved by adding a query string to the request. A query string is typically +comprised of several keys and values put together in a string, for instance +valueA=yes&valueB=no&valueC=maybe. It is up to the +module itself to parse these and get the data it requires. In our example, +we'll be looking for a key called digest, and if set to +md5, we'll produce an MD5 digest, otherwise we'll produce a SHA1 +digest. +

    +

    +Since the introduction of Apache HTTP Server 2.4, parsing request data from GET and +POST requests have never been easier. All we require to parse both GET and +POST data is four simple lines: +

    + + + +
    +apr_table_t *GET; 
    +apr_array_header_t*POST; 
    +
    +
    +
    +ap_args_to_table(r, &GET); 
    +
    +ap_parse_form_data(r, NULL, &POST, -1, 8192);
    + + + +

    +In our specific example module, we're looking for the digest +value from the query string, which now resides inside a table called +GET. To extract this value, we need only perform a simple operation: +

    + + + +
    /* Get the "digest" key from the query string, if any. */
    +const char *digestType = apr_table_get(GET, "digest");
    +
    +/* If no key was returned, we will set a default value instead. */
    +if (!digestType) digestType = "sha1";
    + + + +

    +The structures used for the POST and GET data are not exactly the same, so +if we were to fetch a value from POST data instead of the query string, we +would have to resort to a few more lines, as outlined in this example in the last chapter of this document. +

    + + +

    Making an advanced handler

    +

    +Now that we have learned how to parse form data and manage our resources, +we can move on to creating an advanced version of our module, that spits +out the MD5 or SHA1 digest of files: +

    + + + +
    static int example_handler(request_rec *r)
    +{
    +    int rc, exists;
    +    apr_finfo_t finfo;
    +    apr_file_t *file;
    +    char *filename;
    +    char buffer[256];
    +    apr_size_t readBytes;
    +    int n;
    +    apr_table_t *GET;
    +    apr_array_header_t *POST;
    +    const char *digestType;
    +    
    +    
    +    /* Check that the "example-handler" handler is being called. */
    +    if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED);
    +    
    +    /* Figure out which file is being requested by removing the .sum from it */
    +    filename = apr_pstrdup(r->pool, r->filename);
    +    filename[strlen(filename)-4] = 0; /* Cut off the last 4 characters. */
    +    
    +    /* Figure out if the file we request a sum on exists and isn't a directory */
    +    rc = apr_stat(&finfo, filename, APR_FINFO_MIN, r->pool);
    +    if (rc == APR_SUCCESS) {
    +        exists =
    +        (
    +            (finfo.filetype != APR_NOFILE)
    +        &&  !(finfo.filetype & APR_DIR)
    +        );
    +        if (!exists) return HTTP_NOT_FOUND; /* Return a 404 if not found. */
    +    }
    +    /* If apr_stat failed, we're probably not allowed to check this file. */
    +    else return HTTP_FORBIDDEN;
    +    
    +    /* Parse the GET and, optionally, the POST data sent to us */
    +    
    +    ap_args_to_table(r, &GET);
    +    ap_parse_form_data(r, NULL, &POST, -1, 8192);
    +    
    +    /* Set the appropriate content type */
    +    ap_set_content_type(r, "text/html");
    +    
    +    /* Print a title and some general information */
    +    ap_rprintf(r, "<h2>Information on %s:</h2>", filename);
    +    ap_rprintf(r, "<b>Size:</b> %u bytes<br/>", finfo.size);
    +    
    +    /* Get the digest type the client wants to see */
    +    digestType = apr_table_get(GET, "digest");
    +    if (!digestType) digestType = "MD5";
    +    
    +    
    +    rc = apr_file_open(&file, filename, APR_READ, APR_OS_DEFAULT, r->pool);
    +    if (rc == APR_SUCCESS) {
    +        
    +        /* Are we trying to calculate the MD5 or the SHA1 digest? */
    +        if (!strcasecmp(digestType, "md5")) {
    +            /* Calculate the MD5 sum of the file */
    +            union {
    +                char      chr[16];
    +                uint32_t  num[4];
    +            } digest;
    +            apr_md5_ctx_t md5;
    +            apr_md5_init(&md5);
    +            readBytes = 256;
    +            while ( apr_file_read(file, buffer, &readBytes) == APR_SUCCESS ) {
    +                apr_md5_update(&md5, buffer, readBytes);
    +            }
    +            apr_md5_final(digest.chr, &md5);
    +            
    +            /* Print out the MD5 digest */
    +            ap_rputs("<b>MD5: </b><code>", r);
    +            for (n = 0; n < APR_MD5_DIGESTSIZE/4; n++) {
    +                ap_rprintf(r, "%08x", digest.num[n]);
    +            }
    +            ap_rputs("</code>", r);
    +            /* Print a link to the SHA1 version */
    +            ap_rputs("<br/><a href='?digest=sha1'>View the SHA1 hash instead</a>", r);
    +        }
    +        else {
    +            /* Calculate the SHA1 sum of the file */
    +            union {
    +                char      chr[20];
    +                uint32_t  num[5];
    +            } digest;
    +            apr_sha1_ctx_t sha1;
    +            apr_sha1_init(&sha1);
    +            readBytes = 256;
    +            while ( apr_file_read(file, buffer, &readBytes) == APR_SUCCESS ) {
    +                apr_sha1_update(&sha1, buffer, readBytes);
    +            }
    +            apr_sha1_final(digest.chr, &sha1);
    +            
    +            /* Print out the SHA1 digest */
    +            ap_rputs("<b>SHA1: </b><code>", r);
    +            for (n = 0; n < APR_SHA1_DIGESTSIZE/4; n++) {
    +                ap_rprintf(r, "%08x", digest.num[n]);
    +            }
    +            ap_rputs("</code>", r);
    +            
    +            /* Print a link to the MD5 version */
    +            ap_rputs("<br/><a href='?digest=md5'>View the MD5 hash instead</a>", r);
    +        }
    +        apr_file_close(file);
    +        
    +    }    
    +    /* Let the server know that we responded to this request. */
    +    return OK;
    +}
    + + + +

    +This version in its entirety can be found here: +mod_example_2.c. +

    + + +
    top
    +
    +

    Adding configuration options

    +

    +In this next segment of this document, we will turn our eyes away from the +digest module and create a new example module, whose only function is to +write out its own configuration. The purpose of this is to examine how +the server works with configuration, and what happens when you start writing +advanced configurations +for your modules. +

    +

    An introduction to configuration +directives

    +

    +If you are reading this, then you probably already know +what a configuration directive is. Simply put, a directive is a way of +telling an individual module (or a set of modules) how to behave, such as +these directives control how mod_rewrite works: +

    +
    RewriteEngine On
    +RewriteCond "%{REQUEST_URI}" "^/foo/bar"
    +RewriteRule "^/foo/bar/(.*)$" "/foobar?page=$1"
    + +

    +Each of these configuration directives are handled by a separate function, +that parses the parameters given and sets up a configuration accordingly. +

    + +

    Making an example configuration

    +

    To begin with, we'll create a basic configuration in C-space:

    + + + +
    typedef struct {
    +    int         enabled;      /* Enable or disable our module */
    +    const char *path;         /* Some path to...something */
    +    int         typeOfAction; /* 1 means action A, 2 means action B and so on */
    +} example_config;
    + + + +

    +Now, let's put this into perspective by creating a very small module that +just prints out a hard-coded configuration. You'll notice that we use the +register_hooks function for initializing the configuration +values to their defaults: +

    + + +
    typedef struct {
    +    int         enabled;      /* Enable or disable our module */
    +    const char *path;         /* Some path to...something */
    +    int         typeOfAction; /* 1 means action A, 2 means action B and so on */
    +} example_config;
    +
    +static example_config config;
    +
    +static int example_handler(request_rec *r)
    +{
    +    if (!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED);
    +    ap_set_content_type(r, "text/plain");
    +    ap_rprintf(r, "Enabled: %u\n", config.enabled);
    +    ap_rprintf(r, "Path: %s\n", config.path);
    +    ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction);
    +    return OK;
    +}
    +
    +static void register_hooks(apr_pool_t *pool) 
    +{
    +    config.enabled = 1;
    +    config.path = "/foo/bar";
    +    config.typeOfAction = 0x00;
    +    ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
    +}
    +
    +/* Define our module as an entity and assign a function for registering hooks  */
    +
    +module AP_MODULE_DECLARE_DATA   example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    NULL,            /* Per-directory configuration handler */
    +    NULL,            /* Merge handler for per-directory configurations */
    +    NULL,            /* Per-server configuration handler */
    +    NULL,            /* Merge handler for per-server configurations */
    +    NULL,            /* Any directives we may have for httpd */
    +    register_hooks   /* Our hook registering function */
    +};
    + + + +

    +So far so good. To access our new handler, we could add the following to +our configuration: +

    +
    <Location "/example">
    +    SetHandler example-handler
    +</Location>
    + +

    +When we visit, we'll see our current configuration being spit out by our +module. +

    + + +

    Registering directives with the server

    +

    +What if we want to change our configuration, not by hard-coding new values +into the module, but by using either the httpd.conf file or possibly a +.htaccess file? It's time to let the server know that we want this to be +possible. To do so, we must first change our name tag to include a +reference to the configuration directives we want to register with the server: +

    + + +
    module AP_MODULE_DECLARE_DATA   example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    NULL,               /* Per-directory configuration handler */
    +    NULL,               /* Merge handler for per-directory configurations */
    +    NULL,               /* Per-server configuration handler */
    +    NULL,               /* Merge handler for per-server configurations */
    +    example_directives, /* Any directives we may have for httpd */
    +    register_hooks      /* Our hook registering function */
    +};
    + + + +

    +This will tell the server that we are now accepting directives from the +configuration files, and that the structure called example_directives + holds information on what our directives are and how they work. +Since we have three different variables in our module configuration, we +will add a structure with three directives and a NULL at the end: +

    + + +
    static const command_rec        example_directives[] =
    +{
    +    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
    +    AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"),
    +    AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"),
    +    { NULL }
    +};
    + + + +

    +Directives structure
    +As you can see, each directive needs at least 5 parameters set: +

    +
      +
    1. AP_INIT_TAKE1: This is a macro that tells the server that this directive takes one and only one argument. +If we required two arguments, we could use the macro AP_INIT_TAKE2 and so on (refer to httpd_conf.h +for more macros).
    2. +
    3. exampleEnabled: This is the name of our directive. More precisely, it is what the user must put in his/her +configuration in order to invoke a configuration change in our module.
    4. +
    5. example_set_enabled: This is a reference to a C function that parses the directive and sets the configuration +accordingly. We will discuss how to make this in the following paragraph.
    6. +
    7. RSRC_CONF: This tells the server where the directive is permitted. We'll go into details on this value in the +later chapters, but for now, RSRC_CONF means that the server will only accept these directives in a server context.
    8. +
    9. "Enable or disable....": This is simply a brief description of what the directive does.
    10. +
    +

    +(The "missing" parameter in our definition, which is usually set to +NULL, is an optional function that can be run after the +initial function to parse the arguments have been run. This is usually +omitted, as the function for verifying arguments might as well be used to +set them.) +

    + +

    The directive handler function

    +

    +Now that we have told the server to expect some directives for our module, it's +time to make a few functions for handling these. What the server reads in the +configuration file(s) is text, and so naturally, what it passes along to +our directive handler is one or more strings, that we ourselves need to +recognize and act upon. You'll notice, that since we set our +exampleAction directive to accept two arguments, its C function also +has an additional parameter defined:

    + + +
    /* Handler for the "exampleEnabled" directive */
    +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    if(!strcasecmp(arg, "on")) config.enabled = 1;
    +    else config.enabled = 0;
    +    return NULL;
    +}
    +
    +/* Handler for the "examplePath" directive */
    +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    config.path = arg;
    +    return NULL;
    +}
    +
    +/* Handler for the "exampleAction" directive */
    +/* Let's pretend this one takes one argument (file or db), and a second (deny or allow), */
    +/* and we store it in a bit-wise manner. */
    +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2)
    +{
    +    if(!strcasecmp(arg1, "file")) config.typeOfAction = 0x01;
    +    else config.typeOfAction = 0x02;
    +    
    +    if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10;
    +    else config.typeOfAction += 0x20;
    +    return NULL;
    +}
    + + + + + +

    Putting it all together

    +

    +Now that we have our directives set up, and handlers configured for them, +we can assemble our module into one big file: +

    + + +
    /* mod_example_config_simple.c: */
    +#include <stdio.h>
    +#include "apr_hash.h"
    +#include "ap_config.h"
    +#include "ap_provider.h"
    +#include "httpd.h"
    +#include "http_core.h"
    +#include "http_config.h"
    +#include "http_log.h"
    +#include "http_protocol.h"
    +#include "http_request.h"
    +
    +/*
    + ==============================================================================
    + Our configuration prototype and declaration:
    + ==============================================================================
    + */
    +typedef struct {
    +    int         enabled;      /* Enable or disable our module */
    +    const char *path;         /* Some path to...something */
    +    int         typeOfAction; /* 1 means action A, 2 means action B and so on */
    +} example_config;
    +
    +static example_config config;
    +
    +/*
    + ==============================================================================
    + Our directive handlers:
    + ==============================================================================
    + */
    +/* Handler for the "exampleEnabled" directive */
    +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    if(!strcasecmp(arg, "on")) config.enabled = 1;
    +    else config.enabled = 0;
    +    return NULL;
    +}
    +
    +/* Handler for the "examplePath" directive */
    +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    config.path = arg;
    +    return NULL;
    +}
    +
    +/* Handler for the "exampleAction" directive */
    +/* Let's pretend this one takes one argument (file or db), and a second (deny or allow), */
    +/* and we store it in a bit-wise manner. */
    +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2)
    +{
    +    if(!strcasecmp(arg1, "file")) config.typeOfAction = 0x01;
    +    else config.typeOfAction = 0x02;
    +    
    +    if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10;
    +    else config.typeOfAction += 0x20;
    +    return NULL;
    +}
    +
    +/*
    + ==============================================================================
    + The directive structure for our name tag:
    + ==============================================================================
    + */
    +static const command_rec        example_directives[] =
    +{
    +    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
    +    AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"),
    +    AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"),
    +    { NULL }
    +};
    +/*
    + ==============================================================================
    + Our module handler:
    + ==============================================================================
    + */
    +static int example_handler(request_rec *r)
    +{
    +    if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED);
    +    ap_set_content_type(r, "text/plain");
    +    ap_rprintf(r, "Enabled: %u\n", config.enabled);
    +    ap_rprintf(r, "Path: %s\n", config.path);
    +    ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction);
    +    return OK;
    +}
    +
    +/*
    + ==============================================================================
    + The hook registration function (also initializes the default config values):
    + ==============================================================================
    + */
    +static void register_hooks(apr_pool_t *pool) 
    +{
    +    config.enabled = 1;
    +    config.path = "/foo/bar";
    +    config.typeOfAction = 3;
    +    ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
    +}
    +/*
    + ==============================================================================
    + Our module name tag:
    + ==============================================================================
    + */
    +module AP_MODULE_DECLARE_DATA   example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    NULL,               /* Per-directory configuration handler */
    +    NULL,               /* Merge handler for per-directory configurations */
    +    NULL,               /* Per-server configuration handler */
    +    NULL,               /* Merge handler for per-server configurations */
    +    example_directives, /* Any directives we may have for httpd */
    +    register_hooks      /* Our hook registering function */
    +};
    + + + + +

    +In our httpd.conf file, we can now change the hard-coded configuration by +adding a few lines: +

    +
    ExampleEnabled On
    +ExamplePath "/usr/bin/foo"
    +ExampleAction file allow
    + +

    +And thus we apply the configuration, visit /example on our +web site, and we see the configuration has adapted to what we wrote in our +configuration file. +

    + + + +
    top
    +
    +

    Context aware configurations

    +

    Introduction to context aware configurations

    +

    +In Apache HTTP Server 2.4, different URLs, virtual hosts, directories etc can have very +different meanings to the user of the server, and thus different contexts +within which modules must operate. For example, let's assume you have this +configuration set up for mod_rewrite: +

    +
    <Directory "/var/www">
    +    RewriteCond "%{HTTP_HOST}" "^example.com$"
    +    RewriteRule "(.*)" "http://www.example.com/$1"
    +</Directory>
    +<Directory "/var/www/sub">
    +    RewriteRule "^foobar$" "index.php?foobar=true"
    +</Directory>
    + +

    +In this example, you will have set up two different contexts for +mod_rewrite:

    +
      +
    1. Inside /var/www, all requests for http://example.com must go to http://www.example.com
    2. +
    3. Inside /var/www/sub, all requests for foobar must go to index.php?foobar=true
    4. +
    +

    +If mod_rewrite (or the entire server for that matter) wasn't context aware, then +these rewrite rules would just apply to every and any request made, +regardless of where and how they were made, but since the module can pull +the context specific configuration straight from the server, it does not need +to know itself, which of the directives are valid in this context, since +the server takes care of this.

    + +

    +So how does a module get the specific configuration for the server, +directory or location in question? It does so by making one simple call: +

    + + +
    example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module);
    + + + +

    +That's it! Of course, a whole lot goes on behind the scenes, which we will +discuss in this chapter, starting with how the server came to know what our +configuration looks like, and how it came to be set up as it is in the +specific context. +

    + + +

    Our basic configuration setup

    +

    In this chapter, we will be working with a slightly modified version of +our previous context structure. We will set a context +variable that we can use to track which context configuration is being +used by the server in various places: +

    + +
    typedef struct {
    +    char        context[256];
    +    char        path[256];
    +    int         typeOfAction;
    +    int         enabled;
    +} example_config;
    + + + +

    Our handler for requests will also be modified, yet still very simple:

    + + + +
    static int example_handler(request_rec *r)
    +{
    +    if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED);
    +    example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module);
    +    ap_set_content_type(r, "text/plain");
    +    ap_rprintf("Enabled: %u\n", config->enabled);
    +    ap_rprintf("Path: %s\n", config->path);
    +    ap_rprintf("TypeOfAction: %x\n", config->typeOfAction);
    +    ap_rprintf("Context: %s\n", config->context);
    +    return OK;
    +}
    + + + + + +

    Choosing a context

    +

    +Before we can start making our module context aware, we must first define, +which contexts we will accept. As we saw in the previous chapter, defining +a directive required five elements be set:

    + + + +
    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
    + + + + +

    The RSRC_CONF definition told the server that we would only allow +this directive in a global server context, but since we are now trying out +a context aware version of our module, we should set this to something +more lenient, namely the value ACCESS_CONF, which lets us use +the directive inside <Directory> and <Location> blocks. For more +control over the placement of your directives, you can combine the following +restrictions together to form a specific rule: +

    +
      +
    • RSRC_CONF: Allow in .conf files (not .htaccess) outside <Directory> or <Location>
    • +
    • ACCESS_CONF: Allow in .conf files (not .htaccess) inside <Directory> or <Location>
    • +
    • OR_OPTIONS: Allow in .conf files and .htaccess when AllowOverride Options is set
    • +
    • OR_FILEINFO: Allow in .conf files and .htaccess when AllowOverride FileInfo is set
    • +
    • OR_AUTHCFG: Allow in .conf files and .htaccess when AllowOverride AuthConfig is set
    • +
    • OR_INDEXES: Allow in .conf files and .htaccess when AllowOverride Indexes is set
    • +
    • OR_ALL: Allow anywhere in .conf files and .htaccess
    • +
    + + +

    Using the server to allocate configuration slots

    +

    A much smarter way to manage your configurations is by letting the server +help you create them. To do so, we must first start off by changing our +name tag to let the server know, that it should assist us in creating +and managing our configurations. Since we have chosen the per-directory +(or per-location) context for our module configurations, we'll add a +per-directory creator and merger function reference in our tag:

    + + +
    module AP_MODULE_DECLARE_DATA   example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    create_dir_conf, /* Per-directory configuration handler */
    +    merge_dir_conf,  /* Merge handler for per-directory configurations */
    +    NULL,            /* Per-server configuration handler */
    +    NULL,            /* Merge handler for per-server configurations */
    +    directives,      /* Any directives we may have for httpd */
    +    register_hooks   /* Our hook registering function */
    +};
    + + + + + + + +

    Creating new context configurations

    +

    +Now that we have told the server to help us create and manage configurations, +our first step is to make a function for creating new, blank +configurations. We do so by creating the function we just referenced in +our name tag as the Per-directory configuration handler:

    + +
    void *create_dir_conf(apr_pool_t *pool, char *context) {
    +    context = context ? context : "(undefined context)";
    +    example_config *cfg = apr_pcalloc(pool, sizeof(example_config));
    +    if(cfg) {
    +        /* Set some default values */
    +        strcpy(cfg->context, context);
    +        cfg->enabled = 0;
    +        cfg->path = "/foo/bar";
    +        cfg->typeOfAction = 0x11;
    +    }
    +    return cfg;
    +}
    + + + + + + +

    Merging configurations

    +

    +Our next step in creating a context aware configuration is merging +configurations. This part of the process particularly applies to scenarios +where you have a parent configuration and a child, such as the following: +

    +
    <Directory "/var/www">
    +    ExampleEnabled On
    +    ExamplePath "/foo/bar"
    +    ExampleAction file allow
    +</Directory>
    +<Directory "/var/www/subdir">
    +    ExampleAction file deny
    +</Directory>
    + +

    +In this example, it is natural to assume that the directory +/var/www/subdir should inherit the values set for the /var/www + directory, as we did not specify an ExampleEnabled nor +an ExamplePath for this directory. The server does not presume to +know if this is true, but cleverly does the following: +

    +
      +
    1. Creates a new configuration for /var/www
    2. +
    3. Sets the configuration values according to the directives given for /var/www
    4. +
    5. Creates a new configuration for /var/www/subdir
    6. +
    7. Sets the configuration values according to the directives given for /var/www/subdir
    8. +
    9. Proposes a merge of the two configurations into a new configuration for /var/www/subdir
    10. +
    +

    +This proposal is handled by the merge_dir_conf function we +referenced in our name tag. The purpose of this function is to assess the +two configurations and decide how they are to be merged:

    + + + +
    void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD) {
    +    example_config *base = (example_config *) BASE ; /* This is what was set in the parent context */
    +    example_config *add = (example_config *) ADD ;   /* This is what is set in the new context */
    +    example_config *conf = (example_config *) create_dir_conf(pool, "Merged configuration"); /* This will be the merged configuration */
    +    
    +    /* Merge configurations */
    +    conf->enabled = ( add->enabled == 0 ) ? base->enabled : add->enabled ;
    +    conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction;
    +    strcpy(conf->path, strlen(add->path) ? add->path : base->path);
    +    
    +    return conf ;
    +}
    + + + + + + +

    Trying out our new context aware configurations

    +

    +Now, let's try putting it all together to create a new module that is +context aware. First off, we'll create a configuration that lets us test +how the module works: +

    +
    <Location "/a">
    +    SetHandler example-handler
    +    ExampleEnabled on
    +    ExamplePath "/foo/bar"
    +    ExampleAction file allow
    +</Location>
    +
    +<Location "/a/b">
    +    ExampleAction file deny
    +    ExampleEnabled off
    +</Location>
    +
    +<Location "/a/b/c">
    +    ExampleAction db deny
    +    ExamplePath "/foo/bar/baz"
    +    ExampleEnabled on
    +</Location>
    + +

    +Then we'll assemble our module code. Note, that since we are now using our +name tag as reference when fetching configurations in our handler, I have +added some prototypes to keep the compiler happy: +

    + + +
    /*$6
    + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    + * mod_example_config.c
    + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    + */
    +
    +
    +#include <stdio.h>
    +#include "apr_hash.h"
    +#include "ap_config.h"
    +#include "ap_provider.h"
    +#include "httpd.h"
    +#include "http_core.h"
    +#include "http_config.h"
    +#include "http_log.h"
    +#include "http_protocol.h"
    +#include "http_request.h"
    +
    +/*$1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    +    Configuration structure
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + */
    +
    +typedef struct
    +{
    +    char    context[256];
    +    char    path[256];
    +    int     typeOfAction;
    +    int     enabled;
    +} example_config;
    +
    +/*$1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    +    Prototypes
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + */
    +
    +static int    example_handler(request_rec *r);
    +const char    *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg);
    +const char    *example_set_path(cmd_parms *cmd, void *cfg, const char *arg);
    +const char    *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2);
    +void          *create_dir_conf(apr_pool_t *pool, char *context);
    +void          *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD);
    +static void   register_hooks(apr_pool_t *pool);
    +
    +/*$1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    +    Configuration directives
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + */
    +
    +static const command_rec    directives[] =
    +{
    +    AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, ACCESS_CONF, "Enable or disable mod_example"),
    +    AP_INIT_TAKE1("examplePath", example_set_path, NULL, ACCESS_CONF, "The path to whatever"),
    +    AP_INIT_TAKE2("exampleAction", example_set_action, NULL, ACCESS_CONF, "Special action value!"),
    +    { NULL }
    +};
    +
    +/*$1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    +    Our name tag
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + */
    +
    +module AP_MODULE_DECLARE_DATA    example_module =
    +{
    +    STANDARD20_MODULE_STUFF,
    +    create_dir_conf,    /* Per-directory configuration handler */
    +    merge_dir_conf,     /* Merge handler for per-directory configurations */
    +    NULL,               /* Per-server configuration handler */
    +    NULL,               /* Merge handler for per-server configurations */
    +    directives,         /* Any directives we may have for httpd */
    +    register_hooks      /* Our hook registering function */
    +};
    +
    +/*
    + =======================================================================================================================
    +    Hook registration function
    + =======================================================================================================================
    + */
    +static void register_hooks(apr_pool_t *pool)
    +{
    +    ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
    +}
    +
    +/*
    + =======================================================================================================================
    +    Our example web service handler
    + =======================================================================================================================
    + */
    +static int example_handler(request_rec *r)
    +{
    +    if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED);
    +
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *config = (example_config *) ap_get_module_config(r->per_dir_config, &example_module);
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    ap_set_content_type(r, "text/plain");
    +    ap_rprintf(r, "Enabled: %u\n", config->enabled);
    +    ap_rprintf(r, "Path: %s\n", config->path);
    +    ap_rprintf(r, "TypeOfAction: %x\n", config->typeOfAction);
    +    ap_rprintf(r, "Context: %s\n", config->context);
    +    return OK;
    +}
    +
    +/*
    + =======================================================================================================================
    +    Handler for the "exampleEnabled" directive
    + =======================================================================================================================
    + */
    +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *conf = (example_config *) cfg;
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    if(conf)
    +    {
    +        if(!strcasecmp(arg, "on"))
    +            conf->enabled = 1;
    +        else
    +            conf->enabled = 0;
    +    }
    +
    +    return NULL;
    +}
    +
    +/*
    + =======================================================================================================================
    +    Handler for the "examplePath" directive
    + =======================================================================================================================
    + */
    +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *conf = (example_config *) cfg;
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    if(conf)
    +    {
    +        strcpy(conf->path, arg);
    +    }
    +
    +    return NULL;
    +}
    +
    +/*
    + =======================================================================================================================
    +    Handler for the "exampleAction" directive ;
    +    Let's pretend this one takes one argument (file or db), and a second (deny or allow), ;
    +    and we store it in a bit-wise manner.
    + =======================================================================================================================
    + */
    +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *conf = (example_config *) cfg;
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    if(conf)
    +    {
    +        {
    +            if(!strcasecmp(arg1, "file"))
    +                conf->typeOfAction = 0x01;
    +            else
    +                conf->typeOfAction = 0x02;
    +            if(!strcasecmp(arg2, "deny"))
    +                conf->typeOfAction += 0x10;
    +            else
    +                conf->typeOfAction += 0x20;
    +        }
    +    }
    +
    +    return NULL;
    +}
    +
    +/*
    + =======================================================================================================================
    +    Function for creating new configurations for per-directory contexts
    + =======================================================================================================================
    + */
    +void *create_dir_conf(apr_pool_t *pool, char *context)
    +{
    +    context = context ? context : "Newly created configuration";
    +
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *cfg = apr_pcalloc(pool, sizeof(example_config));
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    if(cfg)
    +    {
    +        {
    +            /* Set some default values */
    +            strcpy(cfg->context, context);
    +            cfg->enabled = 0;
    +            memset(cfg->path, 0, 256);
    +            cfg->typeOfAction = 0x00;
    +        }
    +    }
    +
    +    return cfg;
    +}
    +
    +/*
    + =======================================================================================================================
    +    Merging function for configurations
    + =======================================================================================================================
    + */
    +void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    example_config    *base = (example_config *) BASE;
    +    example_config    *add = (example_config *) ADD;
    +    example_config    *conf = (example_config *) create_dir_conf(pool, "Merged configuration");
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    conf->enabled = (add->enabled == 0) ? base->enabled : add->enabled;
    +    conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction;
    +    strcpy(conf->path, strlen(add->path) ? add->path : base->path);
    +    return conf;
    +}
    + + + + + + + +
    top
    +
    +

    Summing up

    +

    +We have now looked at how to create simple modules for Apache HTTP Server 2.4 and +configuring them. What you do next is entirely up to you, but it is my +hope that something valuable has come out of reading this documentation. +If you have questions on how to further develop modules, you are welcome +to join our mailing lists +or check out the rest of our documentation for further tips. +

    +
    top
    +
    +

    Some useful snippets of code

    + +

    Retrieve variables from POST form data

    + + + +
    typedef struct {
    +    const char *key;
    +    const char *value;
    +} keyValuePair;
    +
    +keyValuePair *readPost(request_rec *r) {
    +    apr_array_header_t *pairs = NULL;
    +    apr_off_t len;
    +    apr_size_t size;
    +    int res;
    +    int i = 0;
    +    char *buffer;
    +    keyValuePair *kvp;
    +
    +    res = ap_parse_form_data(r, NULL, &pairs, -1, HUGE_STRING_LEN);
    +    if (res != OK || !pairs) return NULL; /* Return NULL if we failed or if there are is no POST data */
    +    kvp = apr_pcalloc(r->pool, sizeof(keyValuePair) * (pairs->nelts + 1));
    +    while (pairs && !apr_is_empty_array(pairs)) {
    +        ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs);
    +        apr_brigade_length(pair->value, 1, &len);
    +        size = (apr_size_t) len;
    +        buffer = apr_palloc(r->pool, size + 1);
    +        apr_brigade_flatten(pair->value, buffer, &size);
    +        buffer[len] = 0;
    +        kvp[i].key = apr_pstrdup(r->pool, pair->name);
    +        kvp[i].value = buffer;
    +        i++;
    +    }
    +    return kvp;
    +}
    +
    +static int example_handler(request_rec *r)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~*/
    +    keyValuePair *formData;
    +    /*~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    formData = readPost(r);
    +    if (formData) {
    +        int i;
    +        for (i = 0; &formData[i]; i++) {
    +            if (formData[i].key && formData[i].value) {
    +                ap_rprintf(r, "%s = %s\n", formData[i].key, formData[i].value);
    +            } else if (formData[i].key) {
    +                ap_rprintf(r, "%s\n", formData[i].key);
    +            } else if (formData[i].value) {
    +                ap_rprintf(r, "= %s\n", formData[i].value);
    +            } else {
    +                break;
    +            }
    +        }
    +    }
    +    return OK;
    +}
    + + + + + + +

    Printing out every HTTP header received

    + + + +
    static int example_handler(request_rec *r)
    +{
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +    const apr_array_header_t    *fields;
    +    int                         i;
    +    apr_table_entry_t           *e = 0;
    +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +    fields = apr_table_elts(r->headers_in);
    +    e = (apr_table_entry_t *) fields->elts;
    +    for(i = 0; i < fields->nelts; i++) {
    +        ap_rprintf(r, "%s: %s\n", e[i].key, e[i].val);
    +    }
    +    return OK;
    +}
    + + + + + + +

    Reading the request body into memory

    + + + +
    static int util_read(request_rec *r, const char **rbuf, apr_off_t *size)
    +{
    +    /*~~~~~~~~*/
    +    int rc = OK;
    +    /*~~~~~~~~*/
    +
    +    if((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
    +        return(rc);
    +    }
    +
    +    if(ap_should_client_block(r)) {
    +
    +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +        char         argsbuffer[HUGE_STRING_LEN];
    +        apr_off_t    rsize, len_read, rpos = 0;
    +        apr_off_t length = r->remaining;
    +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    +
    +        *rbuf = (const char *) apr_pcalloc(r->pool, (apr_size_t) (length + 1));
    +        *size = length;
    +        while((len_read = ap_get_client_block(r, argsbuffer, sizeof(argsbuffer))) > 0) {
    +            if((rpos + len_read) > length) {
    +                rsize = length - rpos;
    +            }
    +            else {
    +                rsize = len_read;
    +            }
    +
    +            memcpy((char *) *rbuf + rpos, argsbuffer, (size_t) rsize);
    +            rpos += rsize;
    +        }
    +    }
    +    return(rc);
    +}
    +
    +static int example_handler(request_rec *r) 
    +{
    +    /*~~~~~~~~~~~~~~~~*/
    +    apr_off_t   size;
    +    const char  *buffer;
    +    /*~~~~~~~~~~~~~~~~*/
    +
    +    if(util_read(r, &buffer, &size) == OK) {
    +        ap_rprintf(r, "We read a request body that was %" APR_OFF_T_FMT " bytes long", size);
    +    }
    +    return OK;
    +}
    + + + + + + + +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/developer/modguide.xml b/docs/manual/developer/modguide.xml new file mode 100644 index 00000000000..5b4a4dd0891 --- /dev/null +++ b/docs/manual/developer/modguide.xml @@ -0,0 +1,1742 @@ + + + + + + + + + +Developer + + Developing modules for the Apache HTTP Server 2.4 + + +

    This document explains how you can develop modules for the Apache HTTP +Server 2.4

    +
    + +Request Processing in Apache 2.4 +Apache 2.x Hook Functions + +
    Introduction +
    What we will be discussing in this document +

    +This document will discuss how you can create modules for the Apache +HTTP Server 2.4, by exploring an example module called +mod_example. In the first part of this document, the purpose +of this module will be to calculate and print out various digest values for +existing files on your web server, whenever we access the URL +http://hostname/filename.sum. For instance, if we want to know the +MD5 digest value of the file located at +http://www.example.com/index.html, we would visit +http://www.example.com/index.html.sum. +

    + +

    +In the second part of this document, which deals with configuration +directive and context awareness, we will be looking at a module that simply +writes out its own configuration to the client. +

    +
    + +
    Prerequisites +

    +First and foremost, you are expected to have a basic knowledge of how the C +programming language works. In most cases, we will try to be as pedagogical +as possible and link to documents describing the functions used in the +examples, but there are also many cases where it is necessary to either +just assume that "it works" or do some digging yourself into what the hows +and whys of various function calls. +

    +

    +Lastly, you will need to have a basic understanding of how modules are +loaded and configured in the Apache HTTP Server, as well as how to get the headers for +Apache if you do not have them already, as these are needed for compiling +new modules. +

    +
    +
    Compiling your module +

    +To compile the source code we are building in this document, we will be +using APXS. Assuming your source file +is called mod_example.c, compiling, installing and activating the module is +as simple as: +

    +
    +apxs -i -a -c mod_example.c
    +
    + +
    +
    + +
    Defining a module +

    +Module name tags
    +Every module starts with the same declaration, or name tag if you will, +that defines a module as a separate entity within Apache:

    + + + + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + create_dir_conf, /* Per-directory configuration handler */ + merge_dir_conf, /* Merge handler for per-directory configurations */ + create_svr_conf, /* Per-server configuration handler */ + merge_svr_conf, /* Merge handler for per-server configurations */ + directives, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + + + +

    +This bit of code lets the server know that we have now registered a new module +in the system, and that its name is example_module. The name +of the module is used primarily for two things:
    +

    +
      +
    • Letting the server know how to load the module using the LoadModule
    • +
    • Setting up a namespace for the module to use in configurations
    • +
    +

    +For now, we're only concerned with the first purpose of the module name, +which comes into play when we need to load the module: +

    + +LoadModule example_module modules/mod_example.so + +

    +In essence, this tells the server to open up mod_example.so and look for a module +called example_module. +

    +

    +Within this name tag of ours is also a bunch of references to how we would +like to handle things: Which directives do we respond to in a configuration +file or .htaccess, how do we operate within specific contexts, and what +handlers are we interested in registering with the Apache HTTP service. We'll +return to all these elements later in this document. +

    +
    +
    Getting started: Hooking into the server +
    An introduction to hooks +

    +When handling requests in Apache HTTP Server 2.4, the first thing you will need to do is +create a hook into the request handling process. A hook is essentially a +message telling the server that you are willing to either serve or at least +take a glance at certain requests given by clients. All handlers, whether +it's mod_rewrite, mod_authn_*, mod_proxy and so on, are hooked into +specific parts of the request process. As you are probably aware, modules +serve different purposes; Some are authentication/authorization handlers, +others are file or script handlers while some third modules rewrite URIs or +proxies content. Furthermore, in the end, it is up to the user of the server +how and when each module will come into place. Thus, the server itself does not +presume to know which module is responsible for handling a specific +request, and will ask each module whether they have an interest in a given +request or not. It is then up to each module to either gently decline +serving a request, accept serving it or flat out deny the request from +being served, as authentication/authorization modules do:
    +Hook handling in httpd
    +To make it a bit easier for handlers such as our mod_example to know +whether the client is requesting content we should handle or not, the server +has directives for hinting to modules whether their assistance is needed or +not. Two of these are AddHandler +and SetHandler. Let's take a look at +an example using AddHandler. In +our example case, we want every request ending with .sum to be served by +mod_example, so we'll add a configuration directive that tells +the server to do just that: +

    + +AddHandler example-handler .sum + +

    +What this tells the server is the following: Whenever we receive a request +for a URI ending in .sum, we are to let all modules know that we are +looking for whoever goes by the name of "example-handler" . +Thus, when a request is being served that ends in .sum, the server will let all +modules know, that this request should be served by "example-handler +". As you will see later, when we start building mod_example, we will +check for this handler tag relayed by AddHandler and reply to +the server based on the value of this tag. +

    +
    +
    Hooking into httpd +

    +To begin with, we only want to create a simple handler, that replies to the +client browser when a specific URL is requested, so we won't bother setting +up configuration handlers and directives just yet. Our initial module +definition will look like this:

    + + + + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + NULL, + NULL, + NULL, + NULL, + NULL, + register_hooks /* Our hook registering function */ +}; + + + + +

    This lets the server know that we are not interested in anything fancy, we +just want to hook onto the requests and possibly handle some of them.

    + +

    The reference in our example declaration, register_hooks +is the name of a function we will create to manage how we hook onto the +request process. In this example module, the function has just one purpose; +To create a simple hook that gets called after all the rewrites, access +control etc has been handled. Thus, we will let the server know, that we want +to hook into its process as one of the last modules: +

    + + + +static void register_hooks(apr_pool_t *pool) +{ + /* Create a hook in the request handler, so we get called when a request arrives */ + ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); +} + + + +

    +The example_handler reference is the function that will handle +the request. We will discuss how to create a handler in the next chapter. +

    +
    +
    Other useful hooks +

    +Hooking into the request handling phase is but one of many hooks that you +can create. Some other ways of hooking are: +

    +
      +
    • ap_hook_child_init: Place a hook that executes when a child process is spawned (commonly used for initializing modules after the server has forked)
    • +
    • ap_hook_pre_config: Place a hook that executes before any configuration data has been read (very early hook)
    • +
    • ap_hook_post_config: Place a hook that executes after configuration has been parsed, but before the server has forked
    • +
    • ap_hook_translate_name: Place a hook that executes when a URI needs to be translated into a filename on the server (think mod_rewrite)
    • +
    • ap_hook_quick_handler: Similar to ap_hook_handler, except it is run before any other request hooks (translation, auth, fixups etc)
    • +
    • ap_hook_log_transaction: Place a hook that executes when the server is about to add a log entry of the current request
    • +
    + +
    +
    + +
    Building a handler +

    +A handler is essentially a function that receives a callback when a request +to the server is made. It is passed a record of the current request (how it was +made, which headers and requests were passed along, who's giving the +request and so on), and is put in charge of either telling the server that it's +not interested in the request or handle the request with the tools provided. +

    +
    A simple "Hello, world!" +handler +

    Let's start off by making a very simple request handler +that does the following: +

    +
      +
    1. Check that this is a request that should be served by "example-handler"
    2. +
    3. Set the content type of our output to text/html
    4. +
    5. Write "Hello, world!" back to the client browser
    6. +
    7. Let the server know that we took care of this request and everything went fine
    8. +
    +

    +In C code, our example handler will now look like this: +

    + + + +static int example_handler(request_rec *r) +{ + /* First off, we need to check if this is a call for the "example-handler" handler. + * If it is, we accept it and do our things, if not, we simply return DECLINED, + * and the server will try somewhere else. + */ + if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED); + + /* Now that we are handling this request, we'll write out "Hello, world!" to the client. + * To do so, we must first set the appropriate content type, followed by our output. + */ + ap_set_content_type(r, "text/html"); + ap_rprintf(r, "Hello, world!"); + + /* Lastly, we must tell the server that we took care of this request and everything went fine. + * We do so by simply returning the value OK to the server. + */ + return OK; +} + + + +

    +Now, we put all we have learned together and end up with a program that +looks like +mod_example_1.c +. The functions used in this example will be explained later in the section +"Some useful functions you should know". +

    +
    +
    The request_rec structure +

    The most essential part of any request is the request record +. In a call to a handler function, this is represented by the +request_rec* structure passed along with every call that is made. +This struct, typically just referred to as r in modules, +contains all the information you need for your module to fully process any +HTTP request and respond accordingly.

    Some key elements of the +request_rec structure are: +

    +
      +
    • r->handler (char*): Contains the name of the handler the server is currently asking to do the handling of this request
    • +
    • r->method (char*): Contains the HTTP method being used, f.x. GET or POST
    • +
    • r->filename (char*): Contains the translated filename the client is requesting
    • +
    • r->args (char*): Contains the query string of the request, if any
    • +
    • r->headers_in (apr_table_t*): Contains all the headers sent by the client
    • +
    • r->connection (conn_rec*): A record containing information about the current connection
    • +
    • r->user (char*): If the URI requires authentication, this is set to the username provided
    • +
    • r->useragent_ip (char*): The IP address of the client connecting to us
    • +
    • r->pool (apr_pool_t*): The memory pool of this request. We'll discuss this in the +"Memory management" chapter.
    • +
    +

    +A complete list of all the values contained within the request_rec structure can be found in +the httpd.h header +file or at http://ci.apache.org/projects/httpd/trunk/doxygen/structrequest__rec.html. +

    + + +

    +Let's try out some of these variables in another example handler:
    +

    + + + +static int example_handler(request_rec *r) +{ + /* Set the appropriate content type */ + ap_set_content_type(r, "text/html"); + + /* Print out the IP address of the client connecting to us: */ + ap_rprintf(r, "<h2>Hello, %s!</h2>", r->useragent_ip); + + /* If we were reached through a GET or a POST request, be happy, else sad. */ + if ( !strcmp(r->method, "POST") || !strcmp(r->method, "GET") ) { + ap_rputs("You used a GET or a POST method, that makes us happy!<br/>", r); + } + else { + ap_rputs("You did not use POST or GET, that makes us sad :(<br/>", r); + } + + /* Lastly, if there was a query string, let's print that too! */ + if (r->args) { + ap_rprintf(r, "Your query string was: %s", r->args); + } + return OK; +} + + + +
    + +
    Return values +

    +Apache relies on return values from handlers to signify whether a request +was handled or not, and if so, whether the request went well or not. If a +module is not interested in handling a specific request, it should always +return the value DECLINED. If it is handling a request, it +should either return the generic value OK, or a specific HTTP +status code, for example: +

    + + + +static int example_handler(request_rec *r) +{ + /* Return 404: Not found */ + return HTTP_NOT_FOUND; +} + + + +

    +Returning OK or a HTTP status code does not necessarily mean +that the request will end. The server may still have other handlers that are +interested in this request, for instance the logging modules which, upon a +successful request, will write down a summary of what was requested and how +it went. To do a full stop and prevent any further processing after your +module is done, you can return the value DONE to let the server +know that it should cease all activity on this request and carry on with +the next, without informing other handlers. +
    +General response codes: +

    +
      +
    • DECLINED: We are not handling this request
    • +
    • OK: We handled this request and it went well
    • +
    • DONE: We handled this request and the server should just close this thread without further processing
    • +
    +

    +HTTP specific return codes (excerpt): +

    +
      +
    • HTTP_OK (200): Request was okay
    • +
    • HTTP_MOVED_PERMANENTLY (301): The resource has moved to a new URL
    • +
    • HTTP_UNAUTHORIZED (401): Client is not authorized to visit this page
    • +
    • HTTP_FORBIDDEN (403): Permission denied
    • +
    • HTTP_NOT_FOUND (404): File not found
    • +
    • HTTP_INTERNAL_SERVER_ERROR (500): Internal server error (self explanatory)
    • +
    +
    + +
    Some useful functions you should know + +
      +
    • + ap_rputs(const char *string, request_rec *r):
      + Sends a string of text to the client. This is a shorthand version of + ap_rwrite. + + + +ap_rputs("Hello, world!", r); + + + +
    • +
    • + + ap_rprintf:
      + This function works just like printf, except it sends the result to the client. + + + +ap_rprintf(r, "Hello, %s!", r->useragent_ip); + + +
    • +
    • + + ap_set_content_type(request_rec *r, const char *type):
      + Sets the content type of the output you are sending. + + + +ap_set_content_type(r, "text/plain"); /* force a raw text output */ + + +
    • + + +
    +
    + +
    Memory management +

    +Managing your resources in Apache HTTP Server 2.4 is quite easy, thanks to the memory pool +system. In essence, each server, connection and request have their own +memory pool that gets cleaned up when its scope ends, e.g. when a request +is done or when a server process shuts down. All your module needs to do is +latch onto this memory pool, and you won't have to worry about having to +clean up after yourself - pretty neat, huh? +

    + +

    +In our module, we will primarily be allocating memory for each request, so +it's appropriate to use the r->pool +reference when creating new objects. A few of the functions for allocating +memory within a pool are: +

    +
      +
    • void* apr_palloc( +apr_pool_t *p, apr_size_t size): Allocates size number of bytes in the pool for you
    • +
    • void* apr_pcalloc( +apr_pool_t *p, apr_size_t size): Allocates size number of bytes in the pool for you and sets all bytes to 0
    • +
    • char* apr_pstrdup( +apr_pool_t *p, const char *s): Creates a duplicate of the string s. This is useful for copying constant values so you can edit them
    • +
    • char* apr_psprintf( +apr_pool_t *p, const char *fmt, ...): Similar to sprintf, except the server supplies you with an appropriately allocated target variable
    • +
    + +

    Let's put these functions into an example handler:

    + + + + +static int example_handler(request_rec *r) +{ + const char *original = "You can't edit this!"; + char *copy; + int *integers; + + /* Allocate space for 10 integer values and set them all to zero. */ + integers = apr_pcalloc(r->pool, sizeof(int)*10); + + /* Create a copy of the 'original' variable that we can edit. */ + copy = apr_pstrdup(r->pool, original); + return OK; +} + + + +

    +This is all well and good for our module, which won't need any +pre-initialized variables or structures. However, if we wanted to +initialize something early on, before the requests come rolling in, we +could simply add a call to a function in our register_hooks +function to sort it out: +

    + + + +static void register_hooks(apr_pool_t *pool) +{ + /* Call a function that initializes some stuff */ + example_init_function(pool); + /* Create a hook in the request handler, so we get called when a request arrives */ + ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); +} + + + +

    +In this pre-request initialization function we would not be using the +same pool as we did when allocating resources for request-based functions. +Instead, we would use the pool given to us by the server for allocating memory +on a per-process based level. +

    +
    + +
    Parsing request data +

    +In our example module, we would like to add a feature, that checks which +type of digest, MD5 or SHA1 the client would like to see. This could be +solved by adding a query string to the request. A query string is typically +comprised of several keys and values put together in a string, for instance +valueA=yes&valueB=no&valueC=maybe. It is up to the +module itself to parse these and get the data it requires. In our example, +we'll be looking for a key called digest, and if set to +md5, we'll produce an MD5 digest, otherwise we'll produce a SHA1 +digest. +

    +

    +Since the introduction of Apache HTTP Server 2.4, parsing request data from GET and +POST requests have never been easier. All we require to parse both GET and +POST data is four simple lines: +

    + + + + +apr_table_t *GET; +apr_array_header_t*POST; + + + +ap_args_to_table(r, &GET); + +ap_parse_form_data(r, NULL, &POST, -1, 8192); + + + +

    +In our specific example module, we're looking for the digest +value from the query string, which now resides inside a table called +GET. To extract this value, we need only perform a simple operation: +

    + + + + +/* Get the "digest" key from the query string, if any. */ +const char *digestType = apr_table_get(GET, "digest"); + +/* If no key was returned, we will set a default value instead. */ +if (!digestType) digestType = "sha1"; + + + +

    +The structures used for the POST and GET data are not exactly the same, so +if we were to fetch a value from POST data instead of the query string, we +would have to resort to a few more lines, as outlined in this example in the last chapter of this document. +

    +
    + +
    Making an advanced handler +

    +Now that we have learned how to parse form data and manage our resources, +we can move on to creating an advanced version of our module, that spits +out the MD5 or SHA1 digest of files: +

    + + + + +static int example_handler(request_rec *r) +{ + int rc, exists; + apr_finfo_t finfo; + apr_file_t *file; + char *filename; + char buffer[256]; + apr_size_t readBytes; + int n; + apr_table_t *GET; + apr_array_header_t *POST; + const char *digestType; + + + /* Check that the "example-handler" handler is being called. */ + if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED); + + /* Figure out which file is being requested by removing the .sum from it */ + filename = apr_pstrdup(r->pool, r->filename); + filename[strlen(filename)-4] = 0; /* Cut off the last 4 characters. */ + + /* Figure out if the file we request a sum on exists and isn't a directory */ + rc = apr_stat(&finfo, filename, APR_FINFO_MIN, r->pool); + if (rc == APR_SUCCESS) { + exists = + ( + (finfo.filetype != APR_NOFILE) + && !(finfo.filetype & APR_DIR) + ); + if (!exists) return HTTP_NOT_FOUND; /* Return a 404 if not found. */ + } + /* If apr_stat failed, we're probably not allowed to check this file. */ + else return HTTP_FORBIDDEN; + + /* Parse the GET and, optionally, the POST data sent to us */ + + ap_args_to_table(r, &GET); + ap_parse_form_data(r, NULL, &POST, -1, 8192); + + /* Set the appropriate content type */ + ap_set_content_type(r, "text/html"); + + /* Print a title and some general information */ + ap_rprintf(r, "<h2>Information on %s:</h2>", filename); + ap_rprintf(r, "<b>Size:</b> %u bytes<br/>", finfo.size); + + /* Get the digest type the client wants to see */ + digestType = apr_table_get(GET, "digest"); + if (!digestType) digestType = "MD5"; + + + rc = apr_file_open(&file, filename, APR_READ, APR_OS_DEFAULT, r->pool); + if (rc == APR_SUCCESS) { + + /* Are we trying to calculate the MD5 or the SHA1 digest? */ + if (!strcasecmp(digestType, "md5")) { + /* Calculate the MD5 sum of the file */ + union { + char chr[16]; + uint32_t num[4]; + } digest; + apr_md5_ctx_t md5; + apr_md5_init(&md5); + readBytes = 256; + while ( apr_file_read(file, buffer, &readBytes) == APR_SUCCESS ) { + apr_md5_update(&md5, buffer, readBytes); + } + apr_md5_final(digest.chr, &md5); + + /* Print out the MD5 digest */ + ap_rputs("<b>MD5: </b><code>", r); + for (n = 0; n < APR_MD5_DIGESTSIZE/4; n++) { + ap_rprintf(r, "%08x", digest.num[n]); + } + ap_rputs("</code>", r); + /* Print a link to the SHA1 version */ + ap_rputs("<br/><a href='?digest=sha1'>View the SHA1 hash instead</a>", r); + } + else { + /* Calculate the SHA1 sum of the file */ + union { + char chr[20]; + uint32_t num[5]; + } digest; + apr_sha1_ctx_t sha1; + apr_sha1_init(&sha1); + readBytes = 256; + while ( apr_file_read(file, buffer, &readBytes) == APR_SUCCESS ) { + apr_sha1_update(&sha1, buffer, readBytes); + } + apr_sha1_final(digest.chr, &sha1); + + /* Print out the SHA1 digest */ + ap_rputs("<b>SHA1: </b><code>", r); + for (n = 0; n < APR_SHA1_DIGESTSIZE/4; n++) { + ap_rprintf(r, "%08x", digest.num[n]); + } + ap_rputs("</code>", r); + + /* Print a link to the MD5 version */ + ap_rputs("<br/><a href='?digest=md5'>View the MD5 hash instead</a>", r); + } + apr_file_close(file); + + } + /* Let the server know that we responded to this request. */ + return OK; +} + + + +

    +This version in its entirety can be found here: +mod_example_2.c. +

    +
    + +
    + +
    Adding configuration options +

    +In this next segment of this document, we will turn our eyes away from the +digest module and create a new example module, whose only function is to +write out its own configuration. The purpose of this is to examine how +the server works with configuration, and what happens when you start writing +advanced configurations +for your modules. +

    +
    An introduction to configuration +directives +

    +If you are reading this, then you probably already know +what a configuration directive is. Simply put, a directive is a way of +telling an individual module (or a set of modules) how to behave, such as +these directives control how mod_rewrite works: +

    + +RewriteEngine On +RewriteCond "%{REQUEST_URI}" "^/foo/bar" +RewriteRule "^/foo/bar/(.*)$" "/foobar?page=$1" + +

    +Each of these configuration directives are handled by a separate function, +that parses the parameters given and sets up a configuration accordingly. +

    +
    +
    Making an example configuration +

    To begin with, we'll create a basic configuration in C-space:

    + + + + +typedef struct { + int enabled; /* Enable or disable our module */ + const char *path; /* Some path to...something */ + int typeOfAction; /* 1 means action A, 2 means action B and so on */ +} example_config; + + + +

    +Now, let's put this into perspective by creating a very small module that +just prints out a hard-coded configuration. You'll notice that we use the +register_hooks function for initializing the configuration +values to their defaults: +

    + + + +typedef struct { + int enabled; /* Enable or disable our module */ + const char *path; /* Some path to...something */ + int typeOfAction; /* 1 means action A, 2 means action B and so on */ +} example_config; + +static example_config config; + +static int example_handler(request_rec *r) +{ + if (!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED); + ap_set_content_type(r, "text/plain"); + ap_rprintf(r, "Enabled: %u\n", config.enabled); + ap_rprintf(r, "Path: %s\n", config.path); + ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction); + return OK; +} + +static void register_hooks(apr_pool_t *pool) +{ + config.enabled = 1; + config.path = "/foo/bar"; + config.typeOfAction = 0x00; + ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); +} + +/* Define our module as an entity and assign a function for registering hooks */ + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + NULL, /* Per-directory configuration handler */ + NULL, /* Merge handler for per-directory configurations */ + NULL, /* Per-server configuration handler */ + NULL, /* Merge handler for per-server configurations */ + NULL, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + + + +

    +So far so good. To access our new handler, we could add the following to +our configuration: +

    + +<Location "/example"> + SetHandler example-handler +</Location> + +

    +When we visit, we'll see our current configuration being spit out by our +module. +

    +
    + +
    Registering directives with the server +

    +What if we want to change our configuration, not by hard-coding new values +into the module, but by using either the httpd.conf file or possibly a +.htaccess file? It's time to let the server know that we want this to be +possible. To do so, we must first change our name tag to include a +reference to the configuration directives we want to register with the server: +

    + + + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + NULL, /* Per-directory configuration handler */ + NULL, /* Merge handler for per-directory configurations */ + NULL, /* Per-server configuration handler */ + NULL, /* Merge handler for per-server configurations */ + example_directives, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + + + +

    +This will tell the server that we are now accepting directives from the +configuration files, and that the structure called example_directives + holds information on what our directives are and how they work. +Since we have three different variables in our module configuration, we +will add a structure with three directives and a NULL at the end: +

    + + + +static const command_rec example_directives[] = +{ + AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"), + AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"), + AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"), + { NULL } +}; + + + +

    +Directives structure
    +As you can see, each directive needs at least 5 parameters set: +

    +
      +
    1. AP_INIT_TAKE1: This is a macro that tells the server that this directive takes one and only one argument. +If we required two arguments, we could use the macro AP_INIT_TAKE2 and so on (refer to httpd_conf.h +for more macros).
    2. +
    3. exampleEnabled: This is the name of our directive. More precisely, it is what the user must put in his/her +configuration in order to invoke a configuration change in our module.
    4. +
    5. example_set_enabled: This is a reference to a C function that parses the directive and sets the configuration +accordingly. We will discuss how to make this in the following paragraph.
    6. +
    7. RSRC_CONF: This tells the server where the directive is permitted. We'll go into details on this value in the +later chapters, but for now, RSRC_CONF means that the server will only accept these directives in a server context.
    8. +
    9. "Enable or disable....": This is simply a brief description of what the directive does.
    10. +
    +

    +(The "missing" parameter in our definition, which is usually set to +NULL, is an optional function that can be run after the +initial function to parse the arguments have been run. This is usually +omitted, as the function for verifying arguments might as well be used to +set them.) +

    +
    +
    The directive handler function +

    +Now that we have told the server to expect some directives for our module, it's +time to make a few functions for handling these. What the server reads in the +configuration file(s) is text, and so naturally, what it passes along to +our directive handler is one or more strings, that we ourselves need to +recognize and act upon. You'll notice, that since we set our +exampleAction directive to accept two arguments, its C function also +has an additional parameter defined:

    + + + +/* Handler for the "exampleEnabled" directive */ +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg) +{ + if(!strcasecmp(arg, "on")) config.enabled = 1; + else config.enabled = 0; + return NULL; +} + +/* Handler for the "examplePath" directive */ +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg) +{ + config.path = arg; + return NULL; +} + +/* Handler for the "exampleAction" directive */ +/* Let's pretend this one takes one argument (file or db), and a second (deny or allow), */ +/* and we store it in a bit-wise manner. */ +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2) +{ + if(!strcasecmp(arg1, "file")) config.typeOfAction = 0x01; + else config.typeOfAction = 0x02; + + if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10; + else config.typeOfAction += 0x20; + return NULL; +} + + + + +
    +
    Putting it all together +

    +Now that we have our directives set up, and handlers configured for them, +we can assemble our module into one big file: +

    + + + +/* mod_example_config_simple.c: */ +#include <stdio.h> +#include "apr_hash.h" +#include "ap_config.h" +#include "ap_provider.h" +#include "httpd.h" +#include "http_core.h" +#include "http_config.h" +#include "http_log.h" +#include "http_protocol.h" +#include "http_request.h" + +/* + ============================================================================== + Our configuration prototype and declaration: + ============================================================================== + */ +typedef struct { + int enabled; /* Enable or disable our module */ + const char *path; /* Some path to...something */ + int typeOfAction; /* 1 means action A, 2 means action B and so on */ +} example_config; + +static example_config config; + +/* + ============================================================================== + Our directive handlers: + ============================================================================== + */ +/* Handler for the "exampleEnabled" directive */ +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg) +{ + if(!strcasecmp(arg, "on")) config.enabled = 1; + else config.enabled = 0; + return NULL; +} + +/* Handler for the "examplePath" directive */ +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg) +{ + config.path = arg; + return NULL; +} + +/* Handler for the "exampleAction" directive */ +/* Let's pretend this one takes one argument (file or db), and a second (deny or allow), */ +/* and we store it in a bit-wise manner. */ +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2) +{ + if(!strcasecmp(arg1, "file")) config.typeOfAction = 0x01; + else config.typeOfAction = 0x02; + + if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10; + else config.typeOfAction += 0x20; + return NULL; +} + +/* + ============================================================================== + The directive structure for our name tag: + ============================================================================== + */ +static const command_rec example_directives[] = +{ + AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"), + AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"), + AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"), + { NULL } +}; +/* + ============================================================================== + Our module handler: + ============================================================================== + */ +static int example_handler(request_rec *r) +{ + if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED); + ap_set_content_type(r, "text/plain"); + ap_rprintf(r, "Enabled: %u\n", config.enabled); + ap_rprintf(r, "Path: %s\n", config.path); + ap_rprintf(r, "TypeOfAction: %x\n", config.typeOfAction); + return OK; +} + +/* + ============================================================================== + The hook registration function (also initializes the default config values): + ============================================================================== + */ +static void register_hooks(apr_pool_t *pool) +{ + config.enabled = 1; + config.path = "/foo/bar"; + config.typeOfAction = 3; + ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); +} +/* + ============================================================================== + Our module name tag: + ============================================================================== + */ +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + NULL, /* Per-directory configuration handler */ + NULL, /* Merge handler for per-directory configurations */ + NULL, /* Per-server configuration handler */ + NULL, /* Merge handler for per-server configurations */ + example_directives, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + + + + +

    +In our httpd.conf file, we can now change the hard-coded configuration by +adding a few lines: +

    + +ExampleEnabled On +ExamplePath "/usr/bin/foo" +ExampleAction file allow + +

    +And thus we apply the configuration, visit /example on our +web site, and we see the configuration has adapted to what we wrote in our +configuration file. +

    +
    + + +
    + +
    Context aware configurations +
    Introduction to context aware configurations +

    +In Apache HTTP Server 2.4, different URLs, virtual hosts, directories etc can have very +different meanings to the user of the server, and thus different contexts +within which modules must operate. For example, let's assume you have this +configuration set up for mod_rewrite: +

    + +<Directory "/var/www"> + RewriteCond "%{HTTP_HOST}" "^example.com$" + RewriteRule "(.*)" "http://www.example.com/$1" +</Directory> +<Directory "/var/www/sub"> + RewriteRule "^foobar$" "index.php?foobar=true" +</Directory> + +

    +In this example, you will have set up two different contexts for +mod_rewrite:

    +
      +
    1. Inside /var/www, all requests for http://example.com must go to http://www.example.com
    2. +
    3. Inside /var/www/sub, all requests for foobar must go to index.php?foobar=true
    4. +
    +

    +If mod_rewrite (or the entire server for that matter) wasn't context aware, then +these rewrite rules would just apply to every and any request made, +regardless of where and how they were made, but since the module can pull +the context specific configuration straight from the server, it does not need +to know itself, which of the directives are valid in this context, since +the server takes care of this.

    + +

    +So how does a module get the specific configuration for the server, +directory or location in question? It does so by making one simple call: +

    + + + +example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module); + + + +

    +That's it! Of course, a whole lot goes on behind the scenes, which we will +discuss in this chapter, starting with how the server came to know what our +configuration looks like, and how it came to be set up as it is in the +specific context. +

    +
    + +
    Our basic configuration setup +

    In this chapter, we will be working with a slightly modified version of +our previous context structure. We will set a context +variable that we can use to track which context configuration is being +used by the server in various places: +

    + + +typedef struct { + char context[256]; + char path[256]; + int typeOfAction; + int enabled; +} example_config; + + + +

    Our handler for requests will also be modified, yet still very simple:

    + + + + +static int example_handler(request_rec *r) +{ + if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED); + example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module); + ap_set_content_type(r, "text/plain"); + ap_rprintf("Enabled: %u\n", config->enabled); + ap_rprintf("Path: %s\n", config->path); + ap_rprintf("TypeOfAction: %x\n", config->typeOfAction); + ap_rprintf("Context: %s\n", config->context); + return OK; +} + + + +
    + +
    Choosing a context +

    +Before we can start making our module context aware, we must first define, +which contexts we will accept. As we saw in the previous chapter, defining +a directive required five elements be set:

    + + + + +AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"), + + + + +

    The RSRC_CONF definition told the server that we would only allow +this directive in a global server context, but since we are now trying out +a context aware version of our module, we should set this to something +more lenient, namely the value ACCESS_CONF, which lets us use +the directive inside <Directory> and <Location> blocks. For more +control over the placement of your directives, you can combine the following +restrictions together to form a specific rule: +

    +
      +
    • RSRC_CONF: Allow in .conf files (not .htaccess) outside <Directory> or <Location>
    • +
    • ACCESS_CONF: Allow in .conf files (not .htaccess) inside <Directory> or <Location>
    • +
    • OR_OPTIONS: Allow in .conf files and .htaccess when AllowOverride Options is set
    • +
    • OR_FILEINFO: Allow in .conf files and .htaccess when AllowOverride FileInfo is set
    • +
    • OR_AUTHCFG: Allow in .conf files and .htaccess when AllowOverride AuthConfig is set
    • +
    • OR_INDEXES: Allow in .conf files and .htaccess when AllowOverride Indexes is set
    • +
    • OR_ALL: Allow anywhere in .conf files and .htaccess
    • +
    +
    + +
    Using the server to allocate configuration slots +

    A much smarter way to manage your configurations is by letting the server +help you create them. To do so, we must first start off by changing our +name tag to let the server know, that it should assist us in creating +and managing our configurations. Since we have chosen the per-directory +(or per-location) context for our module configurations, we'll add a +per-directory creator and merger function reference in our tag:

    + + + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + create_dir_conf, /* Per-directory configuration handler */ + merge_dir_conf, /* Merge handler for per-directory configurations */ + NULL, /* Per-server configuration handler */ + NULL, /* Merge handler for per-server configurations */ + directives, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + + + + + +
    + +
    Creating new context configurations +

    +Now that we have told the server to help us create and manage configurations, +our first step is to make a function for creating new, blank +configurations. We do so by creating the function we just referenced in +our name tag as the Per-directory configuration handler:

    + + +void *create_dir_conf(apr_pool_t *pool, char *context) { + context = context ? context : "(undefined context)"; + example_config *cfg = apr_pcalloc(pool, sizeof(example_config)); + if(cfg) { + /* Set some default values */ + strcpy(cfg->context, context); + cfg->enabled = 0; + cfg->path = "/foo/bar"; + cfg->typeOfAction = 0x11; + } + return cfg; +} + + + + +
    + +
    Merging configurations +

    +Our next step in creating a context aware configuration is merging +configurations. This part of the process particularly applies to scenarios +where you have a parent configuration and a child, such as the following: +

    + +<Directory "/var/www"> + ExampleEnabled On + ExamplePath "/foo/bar" + ExampleAction file allow +</Directory> +<Directory "/var/www/subdir"> + ExampleAction file deny +</Directory> + +

    +In this example, it is natural to assume that the directory +/var/www/subdir should inherit the values set for the /var/www + directory, as we did not specify an ExampleEnabled nor +an ExamplePath for this directory. The server does not presume to +know if this is true, but cleverly does the following: +

    +
      +
    1. Creates a new configuration for /var/www
    2. +
    3. Sets the configuration values according to the directives given for /var/www
    4. +
    5. Creates a new configuration for /var/www/subdir
    6. +
    7. Sets the configuration values according to the directives given for /var/www/subdir
    8. +
    9. Proposes a merge of the two configurations into a new configuration for /var/www/subdir
    10. +
    +

    +This proposal is handled by the merge_dir_conf function we +referenced in our name tag. The purpose of this function is to assess the +two configurations and decide how they are to be merged:

    + + + + +void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD) { + example_config *base = (example_config *) BASE ; /* This is what was set in the parent context */ + example_config *add = (example_config *) ADD ; /* This is what is set in the new context */ + example_config *conf = (example_config *) create_dir_conf(pool, "Merged configuration"); /* This will be the merged configuration */ + + /* Merge configurations */ + conf->enabled = ( add->enabled == 0 ) ? base->enabled : add->enabled ; + conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction; + strcpy(conf->path, strlen(add->path) ? add->path : base->path); + + return conf ; +} + + + + +
    + +
    Trying out our new context aware configurations +

    +Now, let's try putting it all together to create a new module that is +context aware. First off, we'll create a configuration that lets us test +how the module works: +

    + +<Location "/a"> + SetHandler example-handler + ExampleEnabled on + ExamplePath "/foo/bar" + ExampleAction file allow +</Location> + +<Location "/a/b"> + ExampleAction file deny + ExampleEnabled off +</Location> + +<Location "/a/b/c"> + ExampleAction db deny + ExamplePath "/foo/bar/baz" + ExampleEnabled on +</Location> + +

    +Then we'll assemble our module code. Note, that since we are now using our +name tag as reference when fetching configurations in our handler, I have +added some prototypes to keep the compiler happy: +

    + + + +/*$6 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + * mod_example_config.c + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + */ + + +#include <stdio.h> +#include "apr_hash.h" +#include "ap_config.h" +#include "ap_provider.h" +#include "httpd.h" +#include "http_core.h" +#include "http_config.h" +#include "http_log.h" +#include "http_protocol.h" +#include "http_request.h" + +/*$1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Configuration structure + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +typedef struct +{ + char context[256]; + char path[256]; + int typeOfAction; + int enabled; +} example_config; + +/*$1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Prototypes + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +static int example_handler(request_rec *r); +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg); +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg); +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2); +void *create_dir_conf(apr_pool_t *pool, char *context); +void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD); +static void register_hooks(apr_pool_t *pool); + +/*$1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Configuration directives + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +static const command_rec directives[] = +{ + AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, ACCESS_CONF, "Enable or disable mod_example"), + AP_INIT_TAKE1("examplePath", example_set_path, NULL, ACCESS_CONF, "The path to whatever"), + AP_INIT_TAKE2("exampleAction", example_set_action, NULL, ACCESS_CONF, "Special action value!"), + { NULL } +}; + +/*$1 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Our name tag + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + */ + +module AP_MODULE_DECLARE_DATA example_module = +{ + STANDARD20_MODULE_STUFF, + create_dir_conf, /* Per-directory configuration handler */ + merge_dir_conf, /* Merge handler for per-directory configurations */ + NULL, /* Per-server configuration handler */ + NULL, /* Merge handler for per-server configurations */ + directives, /* Any directives we may have for httpd */ + register_hooks /* Our hook registering function */ +}; + +/* + ======================================================================================================================= + Hook registration function + ======================================================================================================================= + */ +static void register_hooks(apr_pool_t *pool) +{ + ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST); +} + +/* + ======================================================================================================================= + Our example web service handler + ======================================================================================================================= + */ +static int example_handler(request_rec *r) +{ + if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED); + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *config = (example_config *) ap_get_module_config(r->per_dir_config, &example_module); + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + ap_set_content_type(r, "text/plain"); + ap_rprintf(r, "Enabled: %u\n", config->enabled); + ap_rprintf(r, "Path: %s\n", config->path); + ap_rprintf(r, "TypeOfAction: %x\n", config->typeOfAction); + ap_rprintf(r, "Context: %s\n", config->context); + return OK; +} + +/* + ======================================================================================================================= + Handler for the "exampleEnabled" directive + ======================================================================================================================= + */ +const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg) +{ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *conf = (example_config *) cfg; + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + if(conf) + { + if(!strcasecmp(arg, "on")) + conf->enabled = 1; + else + conf->enabled = 0; + } + + return NULL; +} + +/* + ======================================================================================================================= + Handler for the "examplePath" directive + ======================================================================================================================= + */ +const char *example_set_path(cmd_parms *cmd, void *cfg, const char *arg) +{ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *conf = (example_config *) cfg; + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + if(conf) + { + strcpy(conf->path, arg); + } + + return NULL; +} + +/* + ======================================================================================================================= + Handler for the "exampleAction" directive ; + Let's pretend this one takes one argument (file or db), and a second (deny or allow), ; + and we store it in a bit-wise manner. + ======================================================================================================================= + */ +const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, const char *arg2) +{ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *conf = (example_config *) cfg; + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + if(conf) + { + { + if(!strcasecmp(arg1, "file")) + conf->typeOfAction = 0x01; + else + conf->typeOfAction = 0x02; + if(!strcasecmp(arg2, "deny")) + conf->typeOfAction += 0x10; + else + conf->typeOfAction += 0x20; + } + } + + return NULL; +} + +/* + ======================================================================================================================= + Function for creating new configurations for per-directory contexts + ======================================================================================================================= + */ +void *create_dir_conf(apr_pool_t *pool, char *context) +{ + context = context ? context : "Newly created configuration"; + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *cfg = apr_pcalloc(pool, sizeof(example_config)); + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + if(cfg) + { + { + /* Set some default values */ + strcpy(cfg->context, context); + cfg->enabled = 0; + memset(cfg->path, 0, 256); + cfg->typeOfAction = 0x00; + } + } + + return cfg; +} + +/* + ======================================================================================================================= + Merging function for configurations + ======================================================================================================================= + */ +void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD) +{ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + example_config *base = (example_config *) BASE; + example_config *add = (example_config *) ADD; + example_config *conf = (example_config *) create_dir_conf(pool, "Merged configuration"); + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + conf->enabled = (add->enabled == 0) ? base->enabled : add->enabled; + conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction; + strcpy(conf->path, strlen(add->path) ? add->path : base->path); + return conf; +} + + + + +
    + + +
    + +
    Summing up +

    +We have now looked at how to create simple modules for Apache HTTP Server 2.4 and +configuring them. What you do next is entirely up to you, but it is my +hope that something valuable has come out of reading this documentation. +If you have questions on how to further develop modules, you are welcome +to join our mailing lists +or check out the rest of our documentation for further tips. +

    +
    + +
    Some useful snippets of code + +
    Retrieve variables from POST form data + + + + +typedef struct { + const char *key; + const char *value; +} keyValuePair; + +keyValuePair *readPost(request_rec *r) { + apr_array_header_t *pairs = NULL; + apr_off_t len; + apr_size_t size; + int res; + int i = 0; + char *buffer; + keyValuePair *kvp; + + res = ap_parse_form_data(r, NULL, &pairs, -1, HUGE_STRING_LEN); + if (res != OK || !pairs) return NULL; /* Return NULL if we failed or if there are is no POST data */ + kvp = apr_pcalloc(r->pool, sizeof(keyValuePair) * (pairs->nelts + 1)); + while (pairs && !apr_is_empty_array(pairs)) { + ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs); + apr_brigade_length(pair->value, 1, &len); + size = (apr_size_t) len; + buffer = apr_palloc(r->pool, size + 1); + apr_brigade_flatten(pair->value, buffer, &size); + buffer[len] = 0; + kvp[i].key = apr_pstrdup(r->pool, pair->name); + kvp[i].value = buffer; + i++; + } + return kvp; +} + +static int example_handler(request_rec *r) +{ + /*~~~~~~~~~~~~~~~~~~~~~~*/ + keyValuePair *formData; + /*~~~~~~~~~~~~~~~~~~~~~~*/ + + formData = readPost(r); + if (formData) { + int i; + for (i = 0; &formData[i]; i++) { + if (formData[i].key && formData[i].value) { + ap_rprintf(r, "%s = %s\n", formData[i].key, formData[i].value); + } else if (formData[i].key) { + ap_rprintf(r, "%s\n", formData[i].key); + } else if (formData[i].value) { + ap_rprintf(r, "= %s\n", formData[i].value); + } else { + break; + } + } + } + return OK; +} + + + + +
    + +
    Printing out every HTTP header received + + + + +static int example_handler(request_rec *r) +{ + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + const apr_array_header_t *fields; + int i; + apr_table_entry_t *e = 0; + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + fields = apr_table_elts(r->headers_in); + e = (apr_table_entry_t *) fields->elts; + for(i = 0; i < fields->nelts; i++) { + ap_rprintf(r, "%s: %s\n", e[i].key, e[i].val); + } + return OK; +} + + + + +
    + +
    Reading the request body into memory + + + + +static int util_read(request_rec *r, const char **rbuf, apr_off_t *size) +{ + /*~~~~~~~~*/ + int rc = OK; + /*~~~~~~~~*/ + + if((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) { + return(rc); + } + + if(ap_should_client_block(r)) { + + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + char argsbuffer[HUGE_STRING_LEN]; + apr_off_t rsize, len_read, rpos = 0; + apr_off_t length = r->remaining; + /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ + + *rbuf = (const char *) apr_pcalloc(r->pool, (apr_size_t) (length + 1)); + *size = length; + while((len_read = ap_get_client_block(r, argsbuffer, sizeof(argsbuffer))) > 0) { + if((rpos + len_read) > length) { + rsize = length - rpos; + } + else { + rsize = len_read; + } + + memcpy((char *) *rbuf + rpos, argsbuffer, (size_t) rsize); + rpos += rsize; + } + } + return(rc); +} + +static int example_handler(request_rec *r) +{ + /*~~~~~~~~~~~~~~~~*/ + apr_off_t size; + const char *buffer; + /*~~~~~~~~~~~~~~~~*/ + + if(util_read(r, &buffer, &size) == OK) { + ap_rprintf(r, "We read a request body that was %" APR_OFF_T_FMT " bytes long", size); + } + return OK; +} + + + + + +
    + +
    + +
    diff --git a/docs/manual/developer/modguide.xml.meta b/docs/manual/developer/modguide.xml.meta new file mode 100644 index 00000000000..97eb85b3539 --- /dev/null +++ b/docs/manual/developer/modguide.xml.meta @@ -0,0 +1,12 @@ + + + + + modguide + /developer/ + .. + + + en + + diff --git a/docs/manual/developer/modules.html.en b/docs/manual/developer/modules.html.en index a6ce0b6615c..f3967496b15 100644 --- a/docs/manual/developer/modules.html.en +++ b/docs/manual/developer/modules.html.en @@ -1,22 +1,27 @@ - -Converting Modules from Apache 1.3 to Apache 2.0 - Apache HTTP Server +Converting Modules from Apache 1.3 to Apache 2.0 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Converting Modules from Apache 1.3 to Apache 2.0

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    Converting Modules from Apache 1.3 to Apache 2.0

    Available Languages:  en  |  ja 

    @@ -29,7 +34,7 @@
    +

    See also

    top

    The easier changes ...

    @@ -83,8 +88,7 @@ will be called in.

    This is the code that was added to mod_mmap_static:

    -
    -static void register_hooks(void)
    +      
    static void register_hooks(void)
     {
         static const char * const aszPre[]={ "http_core.c",NULL };
         ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
    @@ -118,18 +122,17 @@ static void register_hooks(void)
     
           

    In the mod_mmap_static case I didn't care about the post_config stage, but the mmap_static_xlat - must be called after the core module had done it's name + must be called after the core module had done its name translation, hence the use of the aszPre to define a modifier to the position HOOK_LAST.

    Module Definition

    There are now a lot fewer stages to worry about when - creating your module definition. The old defintion looked + creating your module definition. The old definition looked like

    -
    -module MODULE_VAR_EXPORT module_name_module =
    +      
    module MODULE_VAR_EXPORT module_name_module =
     {
         STANDARD_MODULE_STUFF,
         /* initializer */
    @@ -153,8 +156,7 @@ module MODULE_VAR_EXPORT module_name_module =
     };

    The new structure is a great deal simpler...

    -
    -module MODULE_VAR_EXPORT module_name_module =
    +      
    module MODULE_VAR_EXPORT module_name_module =
     {
         STANDARD20_MODULE_STUFF,
         /* create per-directory config structures */
    @@ -277,7 +279,28 @@ module MODULE_VAR_EXPORT module_name_module =
     

    Available Languages:  en  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/modules.html.ja.utf8 b/docs/manual/developer/modules.html.ja.utf8 index 3c4bace63d5..56ae40ec3d9 100644 --- a/docs/manual/developer/modules.html.ja.utf8 +++ b/docs/manual/developer/modules.html.ja.utf8 @@ -1,29 +1,35 @@ - -モジュールの Apache 1.3 から Apache 2.0 への移植 - Apache HTTP サーバ +モジュールの Apache 1.3 から Apache 2.0 への移植 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    モジュールの Apache 1.3 から Apache 2.0 への移植

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > Developer Documentation

    モジュールの Apache 1.3 から Apache 2.0 への移植

    -

    言語:  en  | +

    翻訳済み言語:  en  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この文書は mod_mmap_static モジュールを Apache 2.0 用に移植した時に 学んだ経験をもとに書いた、最初の手引き書です。まだまだ完全じゃないし、 @@ -32,7 +38,7 @@

    +

    参照

    top

    簡単な変更点

    @@ -91,8 +97,7 @@

    以下は、mod_mmap_static に追加したコードです:

    -
    -static void register_hooks(void)
    +      
    static void register_hooks(void)
     {
         static const char * const aszPre[]={ "http_core.c",NULL };
         ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
    @@ -135,8 +140,7 @@ static void register_hooks(void)
           

    モジュールの定義を作成する際に注意しなければならない ステージの数は激減しています。古い定義は次のようになっていました。

    -
    -module MODULE_VAR_EXPORT module_name_module =
    +      
    module MODULE_VAR_EXPORT module_name_module =
     {
         STANDARD_MODULE_STUFF,
         /* initializer */
    @@ -160,8 +164,7 @@ module MODULE_VAR_EXPORT module_name_module =
     };

    新しい構造体はとってもシンプルです…

    -
    -module MODULE_VAR_EXPORT module_name_module =
    +      
    module MODULE_VAR_EXPORT module_name_module =
     {
         STANDARD20_MODULE_STUFF,
         /* create per-directory config structures */
    @@ -269,9 +272,30 @@ module MODULE_VAR_EXPORT module_name_module =
       
     
    -

    言語:  en  | +

    翻訳済み言語:  en  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/modules.xml b/docs/manual/developer/modules.xml index 90352e75a19..87e48f13661 100644 --- a/docs/manual/developer/modules.xml +++ b/docs/manual/developer/modules.xml @@ -120,14 +120,14 @@ static void register_hooks(void)

    In the mod_mmap_static case I didn't care about the post_config stage, but the mmap_static_xlat - must be called after the core module had done it's name + must be called after the core module had done its name translation, hence the use of the aszPre to define a modifier to the position HOOK_LAST.

    Module Definition

    There are now a lot fewer stages to worry about when - creating your module definition. The old defintion looked + creating your module definition. The old definition looked like

    diff --git a/docs/manual/developer/modules.xml.ja b/docs/manual/developer/modules.xml.ja
    index 8e729cc6075..f4e6bb93444 100644
    --- a/docs/manual/developer/modules.xml.ja
    +++ b/docs/manual/developer/modules.xml.ja
    @@ -1,7 +1,7 @@
     
     
     
    -
    +
     
     
    -API Changes in Apache HTTP Server 2.4 since 2.2 - Apache HTTP Server
    +API Changes in Apache HTTP Server 2.4 since 2.2 - Apache HTTP Server Version 2.4
     
     
    -
    +
    +
    +
     
     
    +
    +

    Apache HTTP Server Version 2.4

    +
    <-

    API Changes in Apache HTTP Server 2.4 since 2.2

    +Apache > HTTP Server > Documentation > Version 2.4

    API Changes in Apache HTTP Server 2.4 since 2.2

    Available Languages:  en 

    This document describes changes to the Apache HTTPD API from version 2.2 to 2.4, that may be of interest to module/application - developers and core hacks. At the time of writing, the 2.4 API - is not finalised, and this document may serve to highlight - points that call for further review.

    + developers and core hacks. As of the first GA release of the + 2.4 branch API compatibility is preserved for the life of the + 2.4 branch. (The + VERSIONING + description for the 2.4 release provides more information about API + compatibility.)

    +

    API changes fall into two categories: APIs that are altogether new, and existing APIs that are expanded or changed. The latter are - further divided into those where all changes are back-compatible + further divided into those where all changes are backwards-compatible (so existing modules can ignore them), and those that might require attention by maintainers. As with the transition from HTTPD 2.0 to 2.2, existing modules and applications will require @@ -42,7 +51,7 @@

    +

    See also

    top

    Changed APIs

    @@ -55,9 +64,10 @@ customised variants.

    -

    ap_listen (changed; back-compatible)

    +

    ap_listen (changed; backwards-compatible)

    -

    Introduces new API to enable apache child processes to serve different purposes.

    +

    Introduces a new API to enable httpd child processes to serve + different purposes.

    ap_mpm (changed)

    @@ -73,13 +83,13 @@ ap_rxplus is now provided. This provides the capability to compile Perl-style expressions like s/regexp/replacement/flags and to execute them against arbitrary strings. Support for regexp - backreference.

    + backreferences is also added.

    ap_slotmem (NEW!)

    -

    Introduces an API for modules to allocate and manage memory slots - (normally) for shared memory.

    +

    Introduces an API for modules to allocate and manage memory slots, + most commonly for shared memory.

    ap_socache (NEW!)

    @@ -89,7 +99,7 @@

    heartbeat (NEW!)

    -

    common structures for heartbeat modules (should this be public API?)

    +

    common structures for heartbeat modules

    ap_parse_htaccess (changed)

    @@ -103,14 +113,15 @@
    • Introduces per-module, per-directory loglevels, including macro wrappers.
    • -
    • New AP_DECLARE_MODULE macro to declare all modules.
    • -
    • New APLOG_USE_MODULE macro necessary for per-module loglevels in +
    • New AP_DECLARE_MODULE macro to declare all modules.
    • +
    • New APLOG_USE_MODULE macro necessary for per-module loglevels in multi-file modules.
    • New API to retain data across module unload/load
    • -
    • New check_config hook
    • -
    • New ap_process_fnmatch_configs() to process wildcards
    • -
    • Change ap_configfile_t, ap_cfg_getline(), ap_cfg_getc() to return error - code, new ap_pcfg_strerror().
    • +
    • New check_config hook
    • +
    • New ap_process_fnmatch_configs() function to process wildcards
    • +
    • Change ap_configfile_t, ap_cfg_getline(), + ap_cfg_getc() to return error codes, and add + ap_pcfg_strerror() for retrieving an error description.
    • Any config directive permitted in ACCESS_CONF context must now correctly handle being called from an .htaccess file via the new AllowOverrideList directive. @@ -122,16 +133,20 @@

      http_core (changed)

        -
      • REMOVED ap_default_type, ap_requires, all 2.2 authnz API
      • +
      • REMOVED ap_default_type, ap_requires, all + 2.2 authnz API
      • Introduces Optional Functions for logio and authnz
      • -
      • New function ap_get_server_name_for_url to support ipv6 literals.
      • -
      • New function ap_register_errorlog_handler to register errorlog +
      • New function ap_get_server_name_for_url to support IPv6 + literals.
      • +
      • New function ap_register_errorlog_handler to register error log format string handlers.
      • -
      • New function ap_state_query to determine if the server is in the +
      • Arguments of error_log hook have changed. Declaration has moved to + http_core.h.
      • +
      • New function ap_state_query to determine if the server is in the initial configuration preflight phase or not. This is both easier to use and more correct than the old method of creating a pool userdata entry in the process pool.
      • -
      • New function ap_get_conn_socket to get the socket descriptor for a +
      • New function ap_get_conn_socket to get the socket descriptor for a connection. This should be used instead of accessing the core connection config directly.
      @@ -141,16 +156,20 @@
      • Introduce per-directory, per-module loglevel
      • -
      • New loglevels APLOG_TRACEn
      • +
      • New loglevels APLOG_TRACEn
      • Introduce errorlog ids for requests and connections
      • Support for mod_request kept_body
      • Support buffering filter data for async requests
      • -
      • New CONN_STATE values
      • -
      • Function changes: ap_escape_html updated; ap_unescape_all, - ap_escape_path_segment_buffer
      • -
      • Modules that load other modules later than the EXEC_ON_READ config - reading stage need to call ap_reserve_module_slots() or - ap_reserve_module_slots_directive() in their pre_config hook.
      • +
      • New CONN_STATE values
      • +
      • Function changes: ap_escape_html updated; + ap_unescape_all, ap_escape_path_segment_buffer
      • +
      • Modules that load other modules later than the EXEC_ON_READ config + reading stage need to call ap_reserve_module_slots() or + ap_reserve_module_slots_directive() in their + pre_config hook.
      • +
      • The useragent IP address per request can now be tracked + independently of the client IP address of the connection, for + support of deployments with load balancers.
      @@ -158,12 +177,13 @@
      • Introduce per-directory, per-module loglevel
      • -
      • New loglevels APLOG_TRACEn
      • -
      • ap_log_*error become macro wrappers (fully back-compatible if - APLOG_MARK macro is used)
      • +
      • New loglevels APLOG_TRACEn
      • +
      • ap_log_*error become macro wrappers (backwards-compatible if + APLOG_MARK macro is used, except that is no longer possible to + use #ifdef inside the argument list)
      • piped logging revamped
      • -
      • module_index added to error_log hook
      • -
      • new function: ap_log_command_line
      • +
      • module_index added to error_log hook
      • +
      • new function: ap_log_command_line
      @@ -171,19 +191,22 @@
      • New auth_internal API and auth_provider API
      • -
      • New EOR bucket type
      • -
      • New function ap_process_async_request
      • -
      • New flags AP_AUTH_INTERNAL_PER_CONF and AP_AUTH_INTERNAL_PER_URI
      • -
      • New access_checker_ex hook to apply additional access control and/or - bypass authentication.
      • -
      • New functions ap_hook_check_access_ex, ap_hook_check_access, - ap_hook_check_authn, ap_hook_check_authz which accept - AP_AUTH_INTERNAL_PER_* flags
      • -
      • DEPRECATED direct use of ap_hook_access_checker, access_checker_ex, - ap_hook_check_user_id, ap_hook_auth_checker
      • +
      • New EOR bucket type
      • +
      • New function ap_process_async_request
      • +
      • New flags AP_AUTH_INTERNAL_PER_CONF and + AP_AUTH_INTERNAL_PER_URI
      • +
      • New access_checker_ex hook to apply additional access control + and/or bypass authentication.
      • +
      • New functions ap_hook_check_access_ex, + ap_hook_check_access, ap_hook_check_authn, + ap_hook_check_authz which accept + AP_AUTH_INTERNAL_PER_* flags
      • +
      • DEPRECATED direct use of ap_hook_access_checker, + access_checker_ex, ap_hook_check_user_id, + ap_hook_auth_checker

      When possible, registering all access control hooks (including - authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF + authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF is recommended. If all modules' access control hooks are registered with this flag, then whenever the server handles an internal sub-request that matches the same set of access control configuration @@ -192,7 +215,8 @@

      If your module requires the old behavior and must perform access control checks on every sub-request with a different URI from the initial request, even if that URI matches the same set of access - control configuration directives, then use AP_AUTH_INTERNAL_PER_URI.

      + control configuration directives, then use + AP_AUTH_INTERNAL_PER_URI.

      mod_auth (NEW!)

      @@ -202,10 +226,10 @@

      mod_cache (changed)

      -

      Introduces a commit_entity() function to the cache provider interface, - allowing atomic writes to cache. Add a cache_status() hook to report - the cache decision. Remove all private structures and functions from the - public mod_cache.h header file.

      +

      Introduces a commit_entity() function to the cache provider + interface, allowing atomic writes to cache. Add a cache_status() + hook to report the cache decision. All private structures and functions were + removed.

      mod_core (NEW!)

      @@ -239,18 +263,21 @@

      mpm_common (changed)

        -
      • REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)
      • +
      • REMOVES: accept, lockfile, lock_mech, + set_scoreboard (locking uses the new ap_mutex API)
      • NEW API to drop privileges (delegates this platform-dependent function to modules)
      • -
      • NEW Hooks: mpm_query, timed_callback, and get_name
      • -
      • CHANGED interfaces: monitor hook, - ap_reclaim_child_processes, ap_relieve_child_processes
      • +
      • NEW Hooks: mpm_query, timed_callback, and + get_name
      • +
      • CHANGED interfaces: monitor hook, + ap_reclaim_child_processes, + ap_relieve_child_processes

      scoreboard (changed)

      -

      ap_get_scoreboard_worker is gratuitously made non-back-compatible +

      ap_get_scoreboard_worker is made non-backwards-compatible as an alternative version is introduced. Additional proxy_balancer support. Child status stuff revamped.

      @@ -262,22 +289,24 @@

      util_ldap (changed)

      -

      I have yet to get a handle on this update.

      +

      no description available

      util_mutex (NEW!)

      -

      A wrapper for APR proc and global mutexes in httpd.

      +

      A wrapper for APR proc and global mutexes in httpd, providing + common configuration for the underlying mechanism and location + of lock files.

      util_script (changed)

      -

      NEW: ap_args_to_table

      +

      NEW: ap_args_to_table

      util_time (changed)

      -

      NEW: ap_recent_ctime_ex

      +

      NEW: ap_recent_ctime_ex

    top
    @@ -331,6 +360,11 @@

    +

    ap_log_*error are now implemented as macros. This means + that it is no longer possible to use #ifdef inside the + argument list of ap_log_*error, as this would cause + undefined behavor according to C99.

    +

    A server_rec pointer must be passed to ap_log_error() when called after startup. This was always appropriate, but there are even more limitations with @@ -404,6 +438,14 @@ would not have had a chance to enable support for this function. +

    ap_requires()
    +
    The core server now provides better infrastructure for handling + Require configuration. + Register an auth provider function for each supported entity using + ap_register_auth_provider(). The function will be + called as necessary during Require + processing. (Consult bundled modules for detailed examples.)
    +
    ap_server_conf->process->pool userdata
    @@ -452,6 +494,31 @@
    unixd_config
    This has been renamed to ap_unixd_config.
    + +
    unixd_setup_child()
    +
    This has been renamed to ap_unixd_setup_child(), but most callers + should call the added ap_run_drop_privileges() hook.
    + +
    conn_rec->remote_ip and + conn_rec->remote_addr
    +
    These fields have been renamed in order to distinguish between + the client IP address of the connection and the useragent IP address + of the request (potentially overridden by a load balancer or proxy). + References to either of these fields must be updated with one of the + following options, as appropriate for the module: +
      +
    • When you require the IP address of the user agent, which + might be connected directly to the server, or might optionally be + separated from the server by a transparent load balancer or + proxy, use request_rec->useragent_ip and + request_rec->useragent_addr.
    • +
    • When you require the IP address of the client that is + connected directly to the server, which might be the useragent or + might be the load balancer or proxy itself, use + conn_rec->client_ip and + conn_rec->client_addr.
    • +
    +
    @@ -472,7 +539,6 @@ set ap_extended_status to 1 in a pre-config hook and the extended status data will be available. - @@ -493,13 +559,43 @@
    Implement cleanups which clear pointer variables
    Use ap_pool_cleanup_set_null().
    + +
    Create run-time files such as shared memory files, pid files, + etc.
    +
    Use ap_runtime_dir_relative() so that the global + configuration for the location of such files, either by the + DEFAULT_REL_RUNTIMEDIR compile setting or the + DefaultRuntimeDir directive, + will be respected. Apache httpd 2.4.2 and above.
    +

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/new_api_2_4.xml b/docs/manual/developer/new_api_2_4.xml index 821da87b290..1b2ad4259d6 100644 --- a/docs/manual/developer/new_api_2_4.xml +++ b/docs/manual/developer/new_api_2_4.xml @@ -27,12 +27,16 @@

    This document describes changes to the Apache HTTPD API from version 2.2 to 2.4, that may be of interest to module/application - developers and core hacks. At the time of writing, the 2.4 API - is not finalised, and this document may serve to highlight - points that call for further review.

    + developers and core hacks. As of the first GA release of the + 2.4 branch API compatibility is preserved for the life of the + 2.4 branch. (The + VERSIONING + description for the 2.4 release provides more information about API + compatibility.)

    +

    API changes fall into two categories: APIs that are altogether new, and existing APIs that are expanded or changed. The latter are - further divided into those where all changes are back-compatible + further divided into those where all changes are backwards-compatible (so existing modules can ignore them), and those that might require attention by maintainers. As with the transition from HTTPD 2.0 to 2.2, existing modules and applications will require @@ -56,8 +60,9 @@

    - ap_listen (changed; back-compatible) -

    Introduces new API to enable apache child processes to serve different purposes.

    + ap_listen (changed; backwards-compatible) +

    Introduces a new API to enable httpd child processes to serve + different purposes.

    @@ -73,13 +78,13 @@ ap_rxplus is now provided. This provides the capability to compile Perl-style expressions like s/regexp/replacement/flags and to execute them against arbitrary strings. Support for regexp - backreference.

    + backreferences is also added.

    ap_slotmem (NEW!) -

    Introduces an API for modules to allocate and manage memory slots - (normally) for shared memory.

    +

    Introduces an API for modules to allocate and manage memory slots, + most commonly for shared memory.

    @@ -89,7 +94,7 @@
    heartbeat (NEW!) -

    common structures for heartbeat modules (should this be public API?)

    +

    common structures for heartbeat modules

    @@ -103,14 +108,15 @@ http_config (changed)
    • Introduces per-module, per-directory loglevels, including macro wrappers.
    • -
    • New AP_DECLARE_MODULE macro to declare all modules.
    • -
    • New APLOG_USE_MODULE macro necessary for per-module loglevels in +
    • New AP_DECLARE_MODULE macro to declare all modules.
    • +
    • New APLOG_USE_MODULE macro necessary for per-module loglevels in multi-file modules.
    • New API to retain data across module unload/load
    • -
    • New check_config hook
    • -
    • New ap_process_fnmatch_configs() to process wildcards
    • -
    • Change ap_configfile_t, ap_cfg_getline(), ap_cfg_getc() to return error - code, new ap_pcfg_strerror().
    • +
    • New check_config hook
    • +
    • New ap_process_fnmatch_configs() function to process wildcards
    • +
    • Change ap_configfile_t, ap_cfg_getline(), + ap_cfg_getc() to return error codes, and add + ap_pcfg_strerror() for retrieving an error description.
    • Any config directive permitted in ACCESS_CONF context must now correctly handle being called from an .htaccess file via the new AllowOverrideList directive. @@ -122,16 +128,20 @@
      http_core (changed)
        -
      • REMOVED ap_default_type, ap_requires, all 2.2 authnz API
      • +
      • REMOVED ap_default_type, ap_requires, all + 2.2 authnz API
      • Introduces Optional Functions for logio and authnz
      • -
      • New function ap_get_server_name_for_url to support ipv6 literals.
      • -
      • New function ap_register_errorlog_handler to register errorlog +
      • New function ap_get_server_name_for_url to support IPv6 + literals.
      • +
      • New function ap_register_errorlog_handler to register error log format string handlers.
      • -
      • New function ap_state_query to determine if the server is in the +
      • Arguments of error_log hook have changed. Declaration has moved to + http_core.h.
      • +
      • New function ap_state_query to determine if the server is in the initial configuration preflight phase or not. This is both easier to use and more correct than the old method of creating a pool userdata entry in the process pool.
      • -
      • New function ap_get_conn_socket to get the socket descriptor for a +
      • New function ap_get_conn_socket to get the socket descriptor for a connection. This should be used instead of accessing the core connection config directly.
      @@ -141,16 +151,20 @@ httpd (changed)
      • Introduce per-directory, per-module loglevel
      • -
      • New loglevels APLOG_TRACEn
      • +
      • New loglevels APLOG_TRACEn
      • Introduce errorlog ids for requests and connections
      • Support for mod_request kept_body
      • Support buffering filter data for async requests
      • -
      • New CONN_STATE values
      • -
      • Function changes: ap_escape_html updated; ap_unescape_all, - ap_escape_path_segment_buffer
      • -
      • Modules that load other modules later than the EXEC_ON_READ config - reading stage need to call ap_reserve_module_slots() or - ap_reserve_module_slots_directive() in their pre_config hook.
      • +
      • New CONN_STATE values
      • +
      • Function changes: ap_escape_html updated; + ap_unescape_all, ap_escape_path_segment_buffer
      • +
      • Modules that load other modules later than the EXEC_ON_READ config + reading stage need to call ap_reserve_module_slots() or + ap_reserve_module_slots_directive() in their + pre_config hook.
      • +
      • The useragent IP address per request can now be tracked + independently of the client IP address of the connection, for + support of deployments with load balancers.
      @@ -158,12 +172,13 @@ http_log (changed)
      • Introduce per-directory, per-module loglevel
      • -
      • New loglevels APLOG_TRACEn
      • -
      • ap_log_*error become macro wrappers (fully back-compatible if - APLOG_MARK macro is used)
      • +
      • New loglevels APLOG_TRACEn
      • +
      • ap_log_*error become macro wrappers (backwards-compatible if + APLOG_MARK macro is used, except that is no longer possible to + use #ifdef inside the argument list)
      • piped logging revamped
      • -
      • module_index added to error_log hook
      • -
      • new function: ap_log_command_line
      • +
      • module_index added to error_log hook
      • +
      • new function: ap_log_command_line
    @@ -171,19 +186,22 @@ http_request (changed)
    • New auth_internal API and auth_provider API
    • -
    • New EOR bucket type
    • -
    • New function ap_process_async_request
    • -
    • New flags AP_AUTH_INTERNAL_PER_CONF and AP_AUTH_INTERNAL_PER_URI
    • -
    • New access_checker_ex hook to apply additional access control and/or - bypass authentication.
    • -
    • New functions ap_hook_check_access_ex, ap_hook_check_access, - ap_hook_check_authn, ap_hook_check_authz which accept - AP_AUTH_INTERNAL_PER_* flags
    • -
    • DEPRECATED direct use of ap_hook_access_checker, access_checker_ex, - ap_hook_check_user_id, ap_hook_auth_checker
    • +
    • New EOR bucket type
    • +
    • New function ap_process_async_request
    • +
    • New flags AP_AUTH_INTERNAL_PER_CONF and + AP_AUTH_INTERNAL_PER_URI
    • +
    • New access_checker_ex hook to apply additional access control + and/or bypass authentication.
    • +
    • New functions ap_hook_check_access_ex, + ap_hook_check_access, ap_hook_check_authn, + ap_hook_check_authz which accept + AP_AUTH_INTERNAL_PER_* flags
    • +
    • DEPRECATED direct use of ap_hook_access_checker, + access_checker_ex, ap_hook_check_user_id, + ap_hook_auth_checker

    When possible, registering all access control hooks (including - authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF + authentication and authorization hooks) using AP_AUTH_INTERNAL_PER_CONF is recommended. If all modules' access control hooks are registered with this flag, then whenever the server handles an internal sub-request that matches the same set of access control configuration @@ -192,7 +210,8 @@

    If your module requires the old behavior and must perform access control checks on every sub-request with a different URI from the initial request, even if that URI matches the same set of access - control configuration directives, then use AP_AUTH_INTERNAL_PER_URI.

    + control configuration directives, then use + AP_AUTH_INTERNAL_PER_URI.

    @@ -202,10 +221,10 @@
    mod_cache (changed) -

    Introduces a commit_entity() function to the cache provider interface, - allowing atomic writes to cache. Add a cache_status() hook to report - the cache decision. Remove all private structures and functions from the - public mod_cache.h header file.

    +

    Introduces a commit_entity() function to the cache provider + interface, allowing atomic writes to cache. Add a cache_status() + hook to report the cache decision. All private structures and functions were + removed.

    @@ -239,18 +258,21 @@
    mpm_common (changed)
      -
    • REMOVES: accept, lockfile, lock_mech, set_scoreboard (locking uses the new ap_mutex API)
    • +
    • REMOVES: accept, lockfile, lock_mech, + set_scoreboard (locking uses the new ap_mutex API)
    • NEW API to drop privileges (delegates this platform-dependent function to modules)
    • -
    • NEW Hooks: mpm_query, timed_callback, and get_name
    • -
    • CHANGED interfaces: monitor hook, - ap_reclaim_child_processes, ap_relieve_child_processes
    • +
    • NEW Hooks: mpm_query, timed_callback, and + get_name
    • +
    • CHANGED interfaces: monitor hook, + ap_reclaim_child_processes, + ap_relieve_child_processes
    scoreboard (changed) -

    ap_get_scoreboard_worker is gratuitously made non-back-compatible +

    ap_get_scoreboard_worker is made non-backwards-compatible as an alternative version is introduced. Additional proxy_balancer support. Child status stuff revamped.

    @@ -262,22 +284,24 @@
    util_ldap (changed) -

    I have yet to get a handle on this update.

    +

    no description available

    util_mutex (NEW!) -

    A wrapper for APR proc and global mutexes in httpd.

    +

    A wrapper for APR proc and global mutexes in httpd, providing + common configuration for the underlying mechanism and location + of lock files.

    util_script (changed) -

    NEW: ap_args_to_table

    +

    NEW: ap_args_to_table

    util_time (changed) -

    NEW: ap_recent_ctime_ex

    +

    NEW: ap_recent_ctime_ex

    @@ -331,6 +355,11 @@
    +

    ap_log_*error are now implemented as macros. This means + that it is no longer possible to use #ifdef inside the + argument list of ap_log_*error, as this would cause + undefined behavor according to C99.

    +

    A server_rec pointer must be passed to ap_log_error() when called after startup. This was always appropriate, but there are even more limitations with @@ -404,6 +433,14 @@ would not have had a chance to enable support for this function. +

    ap_requires()
    +
    The core server now provides better infrastructure for handling + Require configuration. + Register an auth provider function for each supported entity using + ap_register_auth_provider(). The function will be + called as necessary during Require + processing. (Consult bundled modules for detailed examples.)
    +
    ap_server_conf->process->pool userdata
    @@ -452,6 +489,31 @@
    unixd_config
    This has been renamed to ap_unixd_config.
    + +
    unixd_setup_child()
    +
    This has been renamed to ap_unixd_setup_child(), but most callers + should call the added ap_run_drop_privileges() hook.
    + +
    conn_rec->remote_ip and + conn_rec->remote_addr
    +
    These fields have been renamed in order to distinguish between + the client IP address of the connection and the useragent IP address + of the request (potentially overridden by a load balancer or proxy). + References to either of these fields must be updated with one of the + following options, as appropriate for the module: +
      +
    • When you require the IP address of the user agent, which + might be connected directly to the server, or might optionally be + separated from the server by a transparent load balancer or + proxy, use request_rec->useragent_ip and + request_rec->useragent_addr.
    • +
    • When you require the IP address of the client that is + connected directly to the server, which might be the useragent or + might be the load balancer or proxy itself, use + conn_rec->client_ip and + conn_rec->client_addr.
    • +
    +
    @@ -472,7 +534,6 @@ set ap_extended_status to 1 in a pre-config hook and the extended status data will be available. - @@ -493,6 +554,15 @@
    Implement cleanups which clear pointer variables
    Use ap_pool_cleanup_set_null().
    + +
    Create run-time files such as shared memory files, pid files, + etc.
    +
    Use ap_runtime_dir_relative() so that the global + configuration for the location of such files, either by the + DEFAULT_REL_RUNTIMEDIR compile setting or the + DefaultRuntimeDir directive, + will be respected. Apache httpd 2.4.2 and above.
    + diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 1f6ec282e9a..d7eedcbc602 100644 --- a/docs/manual/developer/output-filters.html.en +++ b/docs/manual/developer/output-filters.html.en @@ -1,22 +1,27 @@ - -Guide to writing output filters - Apache HTTP Server +Guide to writing output filters - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Guide to writing output filters

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    Guide to writing output filters

    Available Languages:  en 

    @@ -39,7 +44,7 @@
  • Buffering buckets
  • Non-blocking bucket reads
  • Ten rules for output filters
  • -
    +

    See also

    top

    Filters and bucket brigades

    @@ -126,18 +131,13 @@ brigade should have no side effects (such as changing any state private to the filter).

    -

    How to handle an empty brigade

    - apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    - {
    - - if (APR_BRIGADE_EMPTY(bb)) {
    - - return APR_SUCCESS;
    -
    - }
    - ....
    -
    -

    +

    How to handle an empty brigade

    apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    +{
    +    if (APR_BRIGADE_EMPTY(bb)) {
    +        return APR_SUCCESS;
    +    }
    +    ...
    +
    top
    @@ -154,7 +154,7 @@ behaviour (i.e. will crash the process).

    There are a variety of functions and macros for traversing and - manipulating bucket brigades; see the apr_bucket.h + manipulating bucket brigades; see the apr_buckets.h header for complete coverage. Commonly used macros include:

    @@ -254,20 +254,17 @@

    Taking an example which loops through the entire brigade as follows:

    -

    Bad output filter -- do not imitate!

    - apr_bucket *e = APR_BRIGADE_FIRST(bb);
    -const char *data;
    -apr_size_t len;
    -
    -while (e != APR_BRIGADE_SENTINEL(bb)) {
    - - apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    - e = APR_BUCKET_NEXT(e);
    -
    -}
    -
    -return ap_pass_brigade(bb); -

    +

    Bad output filter -- do not imitate!

    apr_bucket *e = APR_BRIGADE_FIRST(bb);
    +const char *data;
    +apr_size_t length;
    +
    +while (e != APR_BRIGADE_SENTINEL(bb)) {
    +    apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    +    e = APR_BUCKET_NEXT(e);
    +}
    +
    +return ap_pass_brigade(bb);
    +

    The above implementation would consume memory proportional to content size. If passed a FILE bucket, for example, @@ -279,26 +276,23 @@ return ap_pass_brigade(bb); amount of memory to filter any brigade; a temporary brigade is needed and must be allocated only once per response, see the Maintaining state section.

    -

    Better output filter

    -apr_bucket *e;
    -const char *data;
    -apr_size_t len;
    -
    -while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    - - rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    - if (rv) ...;
    - /* Remove bucket e from bb. */
    - APR_BUCKET_REMOVE(e);
    - /* Insert it into temporary brigade. */
    - APR_BRIGADE_INSERT_HEAD(tmpbb, e);
    - /* Pass brigade downstream. */
    - rv = ap_pass_brigade(f->next, tmpbb);
    - if (rv) ...;
    - apr_brigade_cleanup(tmpbb);
    -
    -} -

    +

    Better output filter

    apr_bucket *e;
    +const char *data;
    +apr_size_t length;
    +
    +while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    +    rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    +    if (rv) ...;
    +    /* Remove bucket e from bb. */
    +    APR_BUCKET_REMOVE(e);
    +    /* Insert it into  temporary brigade. */
    +    APR_BRIGADE_INSERT_HEAD(tmpbb, e);
    +    /* Pass brigade downstream. */
    +    rv = ap_pass_brigade(f->next, tmpbb);
    +    if (rv) ...;
    +    apr_brigade_cleanup(tmpbb);
    +}
    +
    top
    @@ -312,34 +306,28 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    temporary brigade in such a structure, to avoid having to allocate a new brigade per invocation as described in the Brigade structure section.

    -

    Example code to maintain filter state

    -struct dummy_state {
    - - apr_bucket_brigade *tmpbb;
    - int filter_state;
    - ....
    -
    -};
    -
    -apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    -{
    - - struct dummy_state *state;
    -
    - state = f->ctx;
    - if (state == NULL) {
    - - /* First invocation for this response: initialise state structure. - */
    - f->ctx = state = apr_palloc(sizeof *state, f->r->pool);
    -
    - state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
    - state->filter_state = ...;
    -
    - }
    +

    Example code to maintain filter state

    struct dummy_state {
    +    apr_bucket_brigade *tmpbb;
    +    int filter_state;
         ...
    -
    -    

    +}; + +apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) +{ + struct dummy_state *state; + + state = f->ctx; + if (state == NULL) { + + /* First invocation for this response: initialise state structure. + */ + f->ctx = state = apr_palloc(f->r->pool, sizeof *state); + + state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); + state->filter_state = ...; + } + ...
    +
    top
    @@ -413,40 +401,34 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    script; reading from such a bucket will block when waiting for the CGI script to produce more output.

    -

    Example code using non-blocking bucket reads

    - -apr_bucket *e;
    -apr_read_type_e mode = APR_NONBLOCK_READ;
    -
    -while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    - - apr_status_t rv;
    -
    - rv = apr_bucket_read(e, &data, &length, mode);
    - if (rv == APR_EAGAIN && mode == APR_NONBLOCK_READ) {
    - - /* Pass down a brigade containing a flush bucket: */
    - APR_BRIGADE_INSERT_TAIL(tmpbb, apr_bucket_flush_create(...));
    - rv = ap_pass_brigade(f->next, tmpbb);
    - apr_brigade_cleanup(tmpbb);
    - if (rv != APR_SUCCESS) return rv;
    -
    - /* Retry, using a blocking read. */
    - mode = APR_BLOCK_READ;
    - continue;
    -
    - } else if (rv != APR_SUCCESS) {
    - - /* handle errors */
    -
    - }
    -
    - /* Next time, try a non-blocking read first. */
    - mode = APR_NONBLOCK_READ;
    - ...
    -
    -} -

    +

    Example code using non-blocking bucket reads

    apr_bucket *e;
    +apr_read_type_e mode = APR_NONBLOCK_READ;
    +
    +while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    +    apr_status_t rv;
    +
    +    rv = apr_bucket_read(e, &data, &length, mode);
    +    if (rv == APR_EAGAIN && mode == APR_NONBLOCK_READ) {
    +
    +        /* Pass down a brigade containing a flush bucket: */
    +        APR_BRIGADE_INSERT_TAIL(tmpbb, apr_bucket_flush_create(...));
    +        rv = ap_pass_brigade(f->next, tmpbb);
    +        apr_brigade_cleanup(tmpbb);
    +        if (rv != APR_SUCCESS) return rv;
    +
    +        /* Retry, using a blocking read. */
    +        mode = APR_BLOCK_READ;
    +        continue;
    +    }
    +    else if (rv != APR_SUCCESS) {
    +        /* handle errors */
    +    }
    +
    +    /* Next time, try a non-blocking read first. */
    +    mode = APR_NONBLOCK_READ;
    +    ...
    +}
    +
    top
    @@ -503,7 +485,28 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/output-filters.xml b/docs/manual/developer/output-filters.xml index 93360dce32e..7aa43beea7e 100644 --- a/docs/manual/developer/output-filters.xml +++ b/docs/manual/developer/output-filters.xml @@ -121,16 +121,14 @@ private to the filter).

    How to handle an empty brigade - apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    - {
    - - if (APR_BRIGADE_EMPTY(bb)) {
    - - return APR_SUCCESS;
    -
    - }
    - ....
    -
    + +apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) +{ + if (APR_BRIGADE_EMPTY(bb)) { + return APR_SUCCESS; + } + ... +
    @@ -149,7 +147,7 @@

    There are a variety of functions and macros for traversing and manipulating bucket brigades; see the apr_bucket.h + href="http://apr.apache.org/docs/apr-util/trunk/group___a_p_r___util___bucket___brigades.html">apr_buckets.h header for complete coverage. Commonly used macros include:

    @@ -251,18 +249,18 @@ follows:

    Bad output filter -- do not imitate! - apr_bucket *e = APR_BRIGADE_FIRST(bb);
    -const char *data;
    -apr_size_t len;
    -
    -while (e != APR_BRIGADE_SENTINEL(bb)) {
    - - apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    - e = APR_BUCKET_NEXT(e);
    -
    -}
    -
    + +apr_bucket *e = APR_BRIGADE_FIRST(bb); +const char *data; +apr_size_t length; + +while (e != APR_BRIGADE_SENTINEL(bb)) { + apr_bucket_read(e, &data, &length, APR_BLOCK_READ); + e = APR_BUCKET_NEXT(e); +} + return ap_pass_brigade(bb); +

    The above implementation would consume memory proportional to @@ -277,24 +275,24 @@ return ap_pass_brigade(bb); href="#state">Maintaining state section.

    Better output filter -apr_bucket *e;
    -const char *data;
    -apr_size_t len;
    -
    -while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    - - rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ);
    - if (rv) ...;
    - /* Remove bucket e from bb. */
    - APR_BUCKET_REMOVE(e);
    - /* Insert it into temporary brigade. */
    - APR_BRIGADE_INSERT_HEAD(tmpbb, e);
    - /* Pass brigade downstream. */
    - rv = ap_pass_brigade(f->next, tmpbb);
    - if (rv) ...;
    - apr_brigade_cleanup(tmpbb);
    -
    + +apr_bucket *e; +const char *data; +apr_size_t length; + +while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { + rv = apr_bucket_read(e, &data, &length, APR_BLOCK_READ); + if (rv) ...; + /* Remove bucket e from bb. */ + APR_BUCKET_REMOVE(e); + /* Insert it into temporary brigade. */ + APR_BRIGADE_INSERT_HEAD(tmpbb, e); + /* Pass brigade downstream. */ + rv = ap_pass_brigade(f->next, tmpbb); + if (rv) ...; + apr_brigade_cleanup(tmpbb); } +
    @@ -310,33 +308,30 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    a new brigade per invocation as described in the Brigade structure section.

    - Example code to maintain filter state -struct dummy_state {
    - - apr_bucket_brigade *tmpbb;
    - int filter_state;
    - ....
    -
    -};
    -
    -apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    -{
    - - struct dummy_state *state;
    -
    - state = f->ctx;
    - if (state == NULL) {
    - - /* First invocation for this response: initialise state structure. - */
    - f->ctx = state = apr_palloc(sizeof *state, f->r->pool);
    -
    - state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
    - state->filter_state = ...;
    -
    - }
    + Example code to maintain filter state + +struct dummy_state { + apr_bucket_brigade *tmpbb; + int filter_state; ... -
    +}; + +apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) +{ + struct dummy_state *state; + + state = f->ctx; + if (state == NULL) { + + /* First invocation for this response: initialise state structure. + */ + f->ctx = state = apr_palloc(f->r->pool, sizeof *state); + + state->tmpbb = apr_brigade_create(f->r->pool, f->c->bucket_alloc); + state->filter_state = ...; + } + ... +
    @@ -414,37 +409,35 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
    Example code using non-blocking bucket reads -apr_bucket *e;
    -apr_read_type_e mode = APR_NONBLOCK_READ;
    -
    -while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
    - - apr_status_t rv;
    -
    - rv = apr_bucket_read(e, &data, &length, mode);
    - if (rv == APR_EAGAIN && mode == APR_NONBLOCK_READ) {
    - - /* Pass down a brigade containing a flush bucket: */
    - APR_BRIGADE_INSERT_TAIL(tmpbb, apr_bucket_flush_create(...));
    - rv = ap_pass_brigade(f->next, tmpbb);
    - apr_brigade_cleanup(tmpbb);
    - if (rv != APR_SUCCESS) return rv;
    -
    - /* Retry, using a blocking read. */
    - mode = APR_BLOCK_READ;
    - continue;
    -
    - } else if (rv != APR_SUCCESS) {
    - - /* handle errors */
    -
    - }
    -
    - /* Next time, try a non-blocking read first. */
    - mode = APR_NONBLOCK_READ;
    - ...
    -
    + +apr_bucket *e; +apr_read_type_e mode = APR_NONBLOCK_READ; + +while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { + apr_status_t rv; + + rv = apr_bucket_read(e, &data, &length, mode); + if (rv == APR_EAGAIN && mode == APR_NONBLOCK_READ) { + + /* Pass down a brigade containing a flush bucket: */ + APR_BRIGADE_INSERT_TAIL(tmpbb, apr_bucket_flush_create(...)); + rv = ap_pass_brigade(f->next, tmpbb); + apr_brigade_cleanup(tmpbb); + if (rv != APR_SUCCESS) return rv; + + /* Retry, using a blocking read. */ + mode = APR_BLOCK_READ; + continue; + } + else if (rv != APR_SUCCESS) { + /* handle errors */ + } + + /* Next time, try a non-blocking read first. */ + mode = APR_NONBLOCK_READ; + ... } +
    diff --git a/docs/manual/developer/request.html.en b/docs/manual/developer/request.html.en index 68b7c08be37..81bad129b4c 100644 --- a/docs/manual/developer/request.html.en +++ b/docs/manual/developer/request.html.en @@ -1,22 +1,27 @@ - -Request Processing in Apache 2.0 - Apache HTTP Server +Request Processing in the Apache HTTP Server 2.x - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Request Processing in Apache 2.0

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    Request Processing in the Apache HTTP Server 2.x

    Available Languages:  en 

    @@ -26,15 +31,15 @@ revision!

    -

    Several changes in Apache 2.0 affect the internal request +

    Several changes in 2.0 and above affect the internal request processing mechanics. Module authors need to be aware of these changes so they may take advantage of the optimizations and security enhancements.

    The first major change is to the subrequest and redirect mechanisms. There were a number of different code paths in - Apache 1.3 to attempt to optimize subrequest or redirect - behavior. As patches were introduced to 2.0, these + the Apache HTTP Server 1.3 to attempt to optimize subrequest + or redirect behavior. As patches were introduced to 2.0, these optimizations (and the server behavior) were quickly broken due to this duplication of code. All duplicate code has been folded back into ap_process_request_internal() to prevent @@ -45,7 +50,7 @@ and correct implementation of the HTTP server RFC. Additional goals include security, scalability and optimization. New methods were sought to optimize the server (beyond the - performance of Apache 1.3) without introducing fragile or + performance of 1.3) without introducing fragile or insecure code.

    +

    See also

    top

    The Request Processing Cycle

    All requests pass through ap_process_request_internal() - in request.c, including subrequests and redirects. If a module + in server/request.c, including subrequests and redirects. If a module doesn't pass generated requests through this code, the author is cautioned that the module may be broken by future changes to request processing.

    To streamline requests, the module author can take advantage - of the hooks offered to drop out of the request cycle early, or - to bypass core Apache hooks which are irrelevant (and costly in - terms of CPU.)

    + of the hooks offered to drop + out of the request cycle early, or to bypass core hooks which are + irrelevant (and costly in terms of CPU.)

    top

    The Request Parsing Phase

    @@ -78,7 +83,7 @@ parsed_uri.path element is unset. The module has no further control of this one-time unescape operation, either failing to unescape or multiply unescaping the URL leads to security - reprecussions.

    + repercussions.

    Strips Parent and This Elements from the @@ -147,19 +152,18 @@

    The Security Phase

    Needs Documentation. Code is:

    -
    -        if ((access_status = ap_run_access_checker(r)) != 0) {
    -            return decl_die(access_status, "check access", r);
    -        }
    +    
    if ((access_status = ap_run_access_checker(r)) != 0) {
    +    return decl_die(access_status, "check access", r);
    +}
    +
    +if ((access_status = ap_run_check_user_id(r)) != 0) {
    +    return decl_die(access_status, "check user", r);
    +}
     
    -        if ((access_status = ap_run_check_user_id(r)) != 0) {
    -            return decl_die(access_status, "check user", r);
    -        }
    +if ((access_status = ap_run_auth_checker(r)) != 0) {
    +    return decl_die(access_status, "check authorization", r);
    +}
    - if ((access_status = ap_run_auth_checker(r)) != 0) { - return decl_die(access_status, "check authorization", r); - } -

    top

    The Preparation Phase

    @@ -216,7 +220,28 @@

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/request.xml b/docs/manual/developer/request.xml index 6e707b9ac5a..8c329b4b261 100644 --- a/docs/manual/developer/request.xml +++ b/docs/manual/developer/request.xml @@ -23,7 +23,7 @@ Developer Documentation -Request Processing in Apache 2.0 +Request Processing in the Apache HTTP Server 2.x Warning @@ -31,15 +31,15 @@ revision!

    -

    Several changes in Apache 2.0 affect the internal request +

    Several changes in 2.0 and above affect the internal request processing mechanics. Module authors need to be aware of these changes so they may take advantage of the optimizations and security enhancements.

    The first major change is to the subrequest and redirect mechanisms. There were a number of different code paths in - Apache 1.3 to attempt to optimize subrequest or redirect - behavior. As patches were introduced to 2.0, these + the Apache HTTP Server 1.3 to attempt to optimize subrequest + or redirect behavior. As patches were introduced to 2.0, these optimizations (and the server behavior) were quickly broken due to this duplication of code. All duplicate code has been folded back into ap_process_request_internal() to prevent @@ -50,21 +50,21 @@ and correct implementation of the HTTP server RFC. Additional goals include security, scalability and optimization. New methods were sought to optimize the server (beyond the - performance of Apache 1.3) without introducing fragile or + performance of 1.3) without introducing fragile or insecure code.

    The Request Processing Cycle

    All requests pass through ap_process_request_internal() - in request.c, including subrequests and redirects. If a module + in server/request.c, including subrequests and redirects. If a module doesn't pass generated requests through this code, the author is cautioned that the module may be broken by future changes to request processing.

    To streamline requests, the module author can take advantage - of the hooks offered to drop out of the request cycle early, or - to bypass core Apache hooks which are irrelevant (and costly in - terms of CPU.)

    + of the hooks offered to drop + out of the request cycle early, or to bypass core hooks which are + irrelevant (and costly in terms of CPU.)

    The Request Parsing Phase @@ -76,7 +76,7 @@ parsed_uri.path element is unset. The module has no further control of this one-time unescape operation, either failing to unescape or multiply unescaping the URL leads to security - reprecussions.

    + repercussions.

    Strips Parent and This Elements from the @@ -148,20 +148,19 @@ <section id="security"><title>The Security Phase

    Needs Documentation. Code is:

    -
    -        if ((access_status = ap_run_access_checker(r)) != 0) {
    -            return decl_die(access_status, "check access", r);
    -        }
    +    
    +if ((access_status = ap_run_access_checker(r)) != 0) {
    +    return decl_die(access_status, "check access", r);
    +}
     
    -        if ((access_status = ap_run_check_user_id(r)) != 0) {
    -            return decl_die(access_status, "check user", r);
    -        }
    +if ((access_status = ap_run_check_user_id(r)) != 0) {
    +    return decl_die(access_status, "check user", r);
    +}
     
    -        if ((access_status = ap_run_auth_checker(r)) != 0) {
    -            return decl_die(access_status, "check authorization", r);
    -        }
    -    
    -
    +if ((access_status = ap_run_auth_checker(r)) != 0) { + return decl_die(access_status, "check authorization", r); +} +
    The Preparation Phase diff --git a/docs/manual/developer/thread_safety.html.en b/docs/manual/developer/thread_safety.html.en index 926f9e2b728..136c6f84469 100644 --- a/docs/manual/developer/thread_safety.html.en +++ b/docs/manual/developer/thread_safety.html.en @@ -1,31 +1,36 @@ - -Apache 2.0 Thread Safety Issues - Apache HTTP Server +Apache HTTP Server 2.x Thread Safety Issues - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache 2.0 Thread Safety Issues

    +Apache > HTTP Server > Documentation > Version 2.4 > Developer Documentation

    Apache HTTP Server 2.x Thread Safety Issues

    Available Languages:  en 

    -

    When using any of the threaded mpms in Apache 2.0 it is important +

    When using any of the threaded mpms in the Apache HTTP Server 2.x it is important that every function called from Apache be thread safe. When linking in 3rd party extensions it can be difficult to determine whether the resulting server will be thread safe. Casual testing generally won't tell you this - either as thread safety problems can lead to subtle race conditons that + either as thread safety problems can lead to subtle race conditions that may only show up in certain conditions under heavy load.

    +

    See also

    top

    Global and static variables

    @@ -95,7 +100,7 @@ time with your delimiter which it then remembers and on each subsequent call it returns the next token. Obviously if multiple threads are calling it you will have a problem. Most systems have a reentrant version - of of the function called strtok_r() where you pass in an + of the function called strtok_r() where you pass in an extra argument which contains an allocated char * which the function will use instead of its own static storage for maintaining the tokenizing state. If you are using APR you can use apr_strtok().

    @@ -275,7 +280,28 @@

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/developer/thread_safety.xml b/docs/manual/developer/thread_safety.xml index c3c0ca6255f..9aa61188ef9 100644 --- a/docs/manual/developer/thread_safety.xml +++ b/docs/manual/developer/thread_safety.xml @@ -23,14 +23,14 @@ Developer Documentation -Apache 2.0 Thread Safety Issues +Apache HTTP Server 2.x Thread Safety Issues -

    When using any of the threaded mpms in Apache 2.0 it is important +

    When using any of the threaded mpms in the Apache HTTP Server 2.x it is important that every function called from Apache be thread safe. When linking in 3rd party extensions it can be difficult to determine whether the resulting server will be thread safe. Casual testing generally won't tell you this - either as thread safety problems can lead to subtle race conditons that + either as thread safety problems can lead to subtle race conditions that may only show up in certain conditions under heavy load.

    @@ -93,7 +93,7 @@ time with your delimiter which it then remembers and on each subsequent call it returns the next token. Obviously if multiple threads are calling it you will have a problem. Most systems have a reentrant version - of of the function called strtok_r() where you pass in an + of the function called strtok_r() where you pass in an extra argument which contains an allocated char * which the function will use instead of its own static storage for maintaining the tokenizing state. If you are using - -Issues Regarding DNS and Apache HTTP Server - Apache HTTP Server +Issues Regarding DNS and Apache HTTP Server - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Issues Regarding DNS and Apache HTTP Server

    +Apache > HTTP Server > Documentation > Version 2.4

    Issues Regarding DNS and Apache HTTP Server

    +

    See also

    top

    A Simple Example

    -

    - # This is a misconfiguration example, do not use on your server
    - <VirtualHost www.example.dom>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    # This is a misconfiguration example, do not use on your server
    +<VirtualHost www.example.dom>
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +

    In order for the server to function properly, it absolutely needs to have two pieces of information about each virtual host: the @@ -65,13 +69,12 @@

    Suppose that www.example.dom has address 192.0.2.1. Then consider this configuration snippet:

    -

    - # This is a misconfiguration example, do not use on your server
    - <VirtualHost 192.0.2.1>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    # This is a misconfiguration example, do not use on your server
    +<VirtualHost 192.0.2.1>
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +

    This time httpd needs to use reverse DNS to find the ServerName for this virtualhost. If that reverse @@ -84,13 +87,12 @@

    Here is a snippet that avoids both of these problems:

    -

    - <VirtualHost 192.0.2.1>
    - ServerName www.example.dom
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    <VirtualHost 192.0.2.1>
    +  ServerName www.example.dom
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +
    top

    Denial of Service

    @@ -98,21 +100,15 @@

    Consider this configuration snippet:

    -

    - <VirtualHost www.example1.dom>
    - - ServerAdmin webgirl@example1.dom
    - DocumentRoot /www/example1
    -
    - </VirtualHost>
    -
    - <VirtualHost www.example2.dom>
    - - ServerAdmin webguy@example2.dom
    - DocumentRoot /www/example2
    -
    - </VirtualHost> -

    +
    <VirtualHost www.example1.dom>
    +  ServerAdmin webgirl@example1.dom
    +  DocumentRoot "/www/example1"
    +</VirtualHost>
    +<VirtualHost www.example2.dom>
    +  ServerAdmin webguy@example2.dom
    +  DocumentRoot "/www/example2"
    +</VirtualHost>
    +

    Suppose that you've assigned 192.0.2.1 to www.example1.dom and 192.0.2.2 to @@ -194,7 +190,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dns-caveats.html.fr b/docs/manual/dns-caveats.html.fr index 75e08bd4211..e104ee789a1 100644 --- a/docs/manual/dns-caveats.html.fr +++ b/docs/manual/dns-caveats.html.fr @@ -1,22 +1,27 @@ - -Problmes lis au DNS avec le serveur HTTP Apache - Serveur Apache HTTP +Problmes lis au DNS avec le serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Problmes lis au DNS avec le serveur HTTP Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Problmes lis au DNS avec le serveur HTTP Apache

    +

    Voir aussi

    top

    Un exemple simple

    -

    - # Cet exemple de configuration est invalide, ne l'utilisez pas comme base - # de configuration - <VirtualHost www.example.dom>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    # Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base
    +# de configuration
    +<VirtualHost www.example.dom>
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +

    Pour fonctionner correctement, le serveur a absolument besoin de deux informations propos de chaque serveur virtuel : le nom du serveur @@ -69,14 +73,13 @@

    Supposons que l'adresse de www.example.dom soit 192.0.2.1, et examinons cet extrait de configuration :

    -

    - # Cet exemple de configuration est invalide, ne l'utilisez pas comme base - # de configuration - <VirtualHost 192.0.2.1>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    # Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base
    +# de configuration
    +<VirtualHost 192.0.2.1>
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +

    Cette fois, httpd doit effectuer une recherche DNS inverse pour trouver le nom ServerName de ce serveur virtuel. Si @@ -91,13 +94,12 @@

    Voici un extrait de configuration qui permet d'viter ces deux types de problmes :

    -

    - <VirtualHost 192.0.2.1>
    - ServerName www.example.dom
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -

    +
    <VirtualHost 192.0.2.1>
    +  ServerName www.example.dom
    +  ServerAdmin webgirl@example.dom
    +  DocumentRoot "/www/example"
    +</VirtualHost>
    +
    top

    Dni de service

    @@ -105,21 +107,15 @@

    Considrons cet extrait de configuration :

    -

    - <VirtualHost www.example1.dom>
    - - ServerAdmin webgirl@example1.dom
    - DocumentRoot /www/example1
    -
    - </VirtualHost>
    -
    - <VirtualHost www.example2.dom>
    - - ServerAdmin webguy@example2.dom
    - DocumentRoot /www/example2
    -
    - </VirtualHost> -

    +
    <VirtualHost www.example1.dom>
    +  ServerAdmin webgirl@example1.dom
    +  DocumentRoot "/www/example1"
    +</VirtualHost>
    +<VirtualHost www.example2.dom>
    +  ServerAdmin webguy@example2.dom
    +  DocumentRoot "/www/example2"
    +</VirtualHost>
    +

    Supposons que vous ayez assign 192.0.2.1 www.example1.dom et 192.0.2.2 www.example2.dom. En @@ -203,7 +199,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dns-caveats.html.ja.utf8 b/docs/manual/dns-caveats.html.ja.utf8 index 53976e58ba4..63a44bc8109 100644 --- a/docs/manual/dns-caveats.html.ja.utf8 +++ b/docs/manual/dns-caveats.html.ja.utf8 @@ -1,32 +1,38 @@ - -DNS と Apache にまつわる注意事項 - Apache HTTP サーバ +DNS と Apache にまつわる注意事項 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    DNS と Apache にまつわる注意事項

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    DNS と Apache にまつわる注意事項

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    本文書の内容は次の一言に尽きます。「Apache が設定ファイルを読み込むときに DNS を使用する必要がないようにして下さい」。Apache が設定ファイルを @@ -40,7 +46,7 @@

  • 「主サーバ」アドレス
  • 以上の問題を解決する方法
  • 付録: 将来的な方向性
  • -
    +

    参照

    top

    簡単な例

    @@ -241,12 +247,33 @@ これらの機能は広く開発が進んでいません。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dns-caveats.html.ko.euc-kr b/docs/manual/dns-caveats.html.ko.euc-kr index 2fd9bc0bb26..e19bf955abe 100644 --- a/docs/manual/dns-caveats.html.ko.euc-kr +++ b/docs/manual/dns-caveats.html.ko.euc-kr @@ -1,22 +1,27 @@ - -DNS ġ õ - Apache HTTP Server +DNS ġ õ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    DNS ġ õ

    :  en  |  fr  | @@ -39,7 +44,7 @@

  • "ּ" ּ
  • ϱ
  • η: δ
  • -
    +

    top

    @@ -221,7 +226,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dns-caveats.html.tr.utf8 b/docs/manual/dns-caveats.html.tr.utf8 index 54ffeebce38..c333fbafa92 100644 --- a/docs/manual/dns-caveats.html.tr.utf8 +++ b/docs/manual/dns-caveats.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache HTTP Sunucusu ve DNS ile ilgili Konular - Apache HTTP Sunucusu +Apache HTTP Sunucusu ve DNS ile ilgili Konular - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache HTTP Sunucusu ve DNS ile ilgili Konular

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache HTTP Sunucusu ve DNS ile ilgili Konular

    Mevcut Diller:  en  |  fr  | @@ -24,7 +29,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu sayfanın konusu şöyle özetlenebilirdi: Yapılandırma dosyalarınızda DNS sorguları yapılmasını gerektirecek ayarlamalardan kaçınınız. Eğer @@ -38,21 +42,18 @@

  • Hizmet Reddi
  • "Ana Sunucu" Adresi
  • Bu Sorunlardan Kaçınmak için İpuçları
  • -
    +

    Ayrıca bakınız:

    top

    Basit Bir Örnek

    -

    - # Bu yetersiz bir yapılandırma örneğidir, sunucunuzda kullanmayın.
    - <VirtualHost falan.fesmekan.dom> - - ServerAdmin filanca@fesmekan.dom
    - DocumentRoot /siteler/fesmekan -
    - </VirtualHost> -

    +
    # Bu yetersiz bir yapılandırma örneğidir, sunucunuzda kullanmayın.
    +<VirtualHost falan.fesmekan.dom>
    +  ServerAdmin filanca@fesmekan.dom
    +  DocumentRoot "/siteler/fesmekan"
    +</VirtualHost>
    +

    httpd’nin beklendiği gibi işlemesi için her sanal konak için iki veriye mutlaka ihtiyacı vardır: ServerName ve sunucunun bağlantı kabul edip hizmet @@ -66,15 +67,12 @@

    falan.fesmekan.dom’un 192.168.2.1 IP adresine sahip olduğunu varsayarsak yapılandırma şöyle olurdu:

    -

    - # Bu yetersiz bir yapılandırma örneğidir, sunucunuzda kullanmayın.
    - <VirtualHost 192.168.2.1>
    - - ServerAdmin filanca@fesmekan.dom
    - DocumentRoot /siteler/fesmekan -
    - </VirtualHost> -

    +
    # Bu yetersiz bir yapılandırma örneğidir, sunucunuzda kullanmayın.
    +<VirtualHost 192.168.2.1>
    +  ServerAdmin filanca@fesmekan.dom
    +  DocumentRoot "/siteler/fesmekan"
    +</VirtualHost>
    +

    Ancak, bu sefer de bu sanal konağın sunucu ismini öğrenmek için httpd’nin bir ters DNS sorgusu yapması gerekecektir. Eğer bu sorgu @@ -87,15 +85,12 @@

    Her iki sorunu da çözen yapılandırma şöyle olurdu:

    -

    - <VirtualHost 192.168.2.1>
    - - ServerName falan.fesmekan.dom
    - ServerAdmin filanca@fesmekan.dom
    - DocumentRoot /siteler/fesmekan -
    - </VirtualHost> -

    +
    <VirtualHost 192.168.2.1>
    +  ServerName falan.fesmekan.dom
    +  ServerAdmin filanca@fesmekan.dom
    +  DocumentRoot "/siteler/fesmekan"
    +</VirtualHost>
    +
    top

    Hizmet Reddi

    @@ -103,21 +98,16 @@

    Şöyle bir yapılandırmanız olsun:

    -

    - <VirtualHost falan.fesmekan.dom>
    - - ServerAdmin filanca@fesmekan.dom
    - DocumentRoot /siteler/fesmekan -
    - </VirtualHost>
    -
    - <VirtualHost misal.mesela.dom>
    - - ServerAdmin falanca@mesela.dom
    - DocumentRoot /siteler/mesela
    -
    - </VirtualHost> -

    +
    <VirtualHost falan.fesmekan.dom>
    +  ServerAdmin filanca@fesmekan.dom
    +  DocumentRoot "/siteler/fesmekan"
    +</VirtualHost>
    +
    +<VirtualHost misal.mesela.dom>
    +  ServerAdmin falanca@mesela.dom
    +  DocumentRoot "/siteler/mesela"
    +</VirtualHost>
    +

    falan.fesmekan.dom’a 192.168.2.1, misal.mesela.dom’a 192.168.2.2 atadığınızı fakat, @@ -190,7 +180,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dns-caveats.xml b/docs/manual/dns-caveats.xml index c715450f10c..624fd86cb4a 100644 --- a/docs/manual/dns-caveats.xml +++ b/docs/manual/dns-caveats.xml @@ -37,13 +37,13 @@
    A Simple Example - - # This is a misconfiguration example, do not use on your server
    - <VirtualHost www.example.dom>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +# This is a misconfiguration example, do not use on your server +<VirtualHost www.example.dom> + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +

    In order for the server to function properly, it absolutely needs to have two pieces of information about each virtual host: the @@ -59,13 +59,13 @@

    Suppose that www.example.dom has address 192.0.2.1. Then consider this configuration snippet:

    - - # This is a misconfiguration example, do not use on your server
    - <VirtualHost 192.0.2.1>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +# This is a misconfiguration example, do not use on your server +<VirtualHost 192.0.2.1> + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +

    This time httpd needs to use reverse DNS to find the ServerName for this virtualhost. If that reverse @@ -78,13 +78,13 @@

    Here is a snippet that avoids both of these problems:

    - - <VirtualHost 192.0.2.1>
    - ServerName www.example.dom
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +<VirtualHost 192.0.2.1> + ServerName www.example.dom + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +
    @@ -92,21 +92,16 @@

    Consider this configuration snippet:

    - - <VirtualHost www.example1.dom>
    - - ServerAdmin webgirl@example1.dom
    - DocumentRoot /www/example1
    -
    - </VirtualHost>
    -
    - <VirtualHost www.example2.dom>
    - - ServerAdmin webguy@example2.dom
    - DocumentRoot /www/example2
    -
    - </VirtualHost> -
    + +<VirtualHost www.example1.dom> + ServerAdmin webgirl@example1.dom + DocumentRoot "/www/example1" +</VirtualHost> +<VirtualHost www.example2.dom> + ServerAdmin webguy@example2.dom + DocumentRoot "/www/example2" +</VirtualHost> +

    Suppose that you've assigned 192.0.2.1 to www.example1.dom and 192.0.2.2 to diff --git a/docs/manual/dns-caveats.xml.fr b/docs/manual/dns-caveats.xml.fr index 202a6f27cc8..721caf6dccb 100644 --- a/docs/manual/dns-caveats.xml.fr +++ b/docs/manual/dns-caveats.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -41,14 +41,14 @@

    Un exemple simple - - # Cet exemple de configuration est invalide, ne l'utilisez pas comme base - # de configuration - <VirtualHost www.example.dom>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base +# de configuration +<VirtualHost www.example.dom> + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +

    Pour fonctionner correctement, le serveur a absolument besoin de deux informations à propos de chaque serveur virtuel : le nom du serveur @@ -66,14 +66,14 @@

    Supposons que l'adresse de www.example.dom soit 192.0.2.1, et examinons cet extrait de configuration :

    - - # Cet exemple de configuration est invalide, ne l'utilisez pas comme base - # de configuration - <VirtualHost 192.0.2.1>
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base +# de configuration +<VirtualHost 192.0.2.1> + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +

    Cette fois, httpd doit effectuer une recherche DNS inverse pour trouver le nom ServerName de ce serveur virtuel. Si @@ -88,13 +88,13 @@

    Voici un extrait de configuration qui permet d'éviter ces deux types de problèmes :

    - - <VirtualHost 192.0.2.1>
    - ServerName www.example.dom
    - ServerAdmin webgirl@example.dom
    - DocumentRoot /www/example
    - </VirtualHost> -
    + +<VirtualHost 192.0.2.1> + ServerName www.example.dom + ServerAdmin webgirl@example.dom + DocumentRoot "/www/example" +</VirtualHost> +
    @@ -102,21 +102,16 @@

    Considérons cet extrait de configuration :

    - - <VirtualHost www.example1.dom>
    - - ServerAdmin webgirl@example1.dom
    - DocumentRoot /www/example1
    -
    - </VirtualHost>
    -
    - <VirtualHost www.example2.dom>
    - - ServerAdmin webguy@example2.dom
    - DocumentRoot /www/example2
    -
    - </VirtualHost> -
    + +<VirtualHost www.example1.dom> + ServerAdmin webgirl@example1.dom + DocumentRoot "/www/example1" +</VirtualHost> +<VirtualHost www.example2.dom> + ServerAdmin webguy@example2.dom + DocumentRoot "/www/example2" +</VirtualHost> +

    Supposons que vous ayez assigné 192.0.2.1 à www.example1.dom et 192.0.2.2 à www.example2.dom. En diff --git a/docs/manual/dns-caveats.xml.ja b/docs/manual/dns-caveats.xml.ja index 79f53ac4c1b..b9053c7e85d 100644 --- a/docs/manual/dns-caveats.xml.ja +++ b/docs/manual/dns-caveats.xml.ja @@ -1,7 +1,7 @@ - + + + -Dynamic Shared Object (DSO) Support - Apache HTTP Server +Dynamic Shared Object (DSO) Support - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Dynamic Shared Object (DSO) Support

    +Apache > HTTP Server > Documentation > Version 2.4

    Dynamic Shared Object (DSO) Support

    Available Languages:  en  |  fr  | @@ -43,7 +48,7 @@

  • Usage Summary
  • Background
  • Advantages and Disadvantages
  • -
    +

    See also

    top

    Implementation

    @@ -300,7 +305,28 @@ $ apxs -cia mod_foo.c  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dso.html.fr b/docs/manual/dso.html.fr index d07fb7c0811..70749b1a39a 100644 --- a/docs/manual/dso.html.fr +++ b/docs/manual/dso.html.fr @@ -1,22 +1,27 @@ - -Support des objets dynamiques partags (DSO) - Serveur Apache HTTP +Support des objets dynamiques partags (DSO) - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Support des objets dynamiques partags (DSO)

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Support des objets dynamiques partags (DSO)

    +

    Voir aussi

    top

    Implmentation

    @@ -105,8 +110,9 @@ $ make install
  • Configure le serveur HTTP Apache avec tous les modules - activs et chargs en tant qu'objets partags. Vous pouvez - ensuite les dsactiver un un en commentant la directive LoadModule correspondante dans le + activs. Seul un jeu de modules de base sera charg au + dmarrage du serveur. Vous pouvez modifier ce jeu de modules + chargs au dmarrage en activant ou dsactivant les directives LoadModule correspondantes dans le fichier httpd.conf.

    @@ -120,6 +126,21 @@ $ make install compils.

  • +
  • +

    Certains modules ne sont utiliss que par les dveloppeurs et + ne seront pas compils. Si vous voulez les utiliser, spcifiez + l'option all. Pour compiler tous les modules disponibles, + y compris les modules de dveloppeurs, spcifiez l'option + reallyall. En outre, la directive LoadModule peut tre active pour tous + les modules compils via l'option du script configure + --enable-load-all-modules.

    + +

    +$ ./configure --enable-mods-shared=reallyall --enable-load-all-modules
    +$ make install +

    +
  • +
  • Construire et installer un module Apache httpd tiers, par exemple mod_foo.c, en tant que module DSO @@ -308,7 +329,28 @@ $ apxs -cia mod_foo.c  ja  |  ko  |  tr 

    -
  • +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dso.html.ja.utf8 b/docs/manual/dso.html.ja.utf8 index ccc9a074e99..c02ad1c7073 100644 --- a/docs/manual/dso.html.ja.utf8 +++ b/docs/manual/dso.html.ja.utf8 @@ -1,32 +1,38 @@ - -動的共有オブジェクト (DSO) サポート - Apache HTTP サーバ +動的共有オブジェクト (DSO) サポート - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    動的共有オブジェクト (DSO) サポート

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    動的共有オブジェクト (DSO) サポート

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache HTTP サーバはモジュール化されたプログラムで、 管理者がモジュールを選択することでサーバに組み込む機能を選ぶことができます。 @@ -45,7 +51,7 @@

  • 使用法の概要
  • 背景
  • 利点と欠点
  • -
    +

    参照

    top

    実装

    @@ -292,12 +298,33 @@ $ apxs -i -a -n foo mod_foo.la
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dso.html.ko.euc-kr b/docs/manual/dso.html.ko.euc-kr index 3b4d17f1d24..dbc1ac58be3 100644 --- a/docs/manual/dso.html.ko.euc-kr +++ b/docs/manual/dso.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ü (DSO) - Apache HTTP Server +ü (DSO) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ü (DSO)

    :  en  |  fr  | @@ -42,7 +47,7 @@

  • -
    +

    top

    @@ -274,7 +279,28 @@ $ apxs -i -a -n foo mod_foo.la  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dso.html.tr.utf8 b/docs/manual/dso.html.tr.utf8 index 1e68d250e11..77917cf761c 100644 --- a/docs/manual/dso.html.tr.utf8 +++ b/docs/manual/dso.html.tr.utf8 @@ -1,22 +1,27 @@ - -Devingen Paylaşımlı Nesne Desteği - Apache HTTP Sunucusu +Devingen Paylaşımlı Nesne Desteği - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Devingen Paylaşımlı Nesne Desteği

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Devingen Paylaşımlı Nesne Desteği

    Mevcut Diller:  en  |  fr  | @@ -24,7 +29,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Apache HTTP Sunucusu modüler bir program olup, yönetici sadece bir grup modül seçerek sunucuya işlevsellik ekleyebilir. Modüller, Devingen @@ -41,7 +45,7 @@

  • Kullanım Özeti
  • Artalan Bilgisi
  • Getiriler ve Götürüler
  • -
    +

    Ayrıca bakınız:

    top

    Gerçeklenim

    @@ -94,11 +98,12 @@

    -
  • Apache HTTP Sunucusunu tüm modüller etkin ve paylaşımlı nesneler - yüklü olarak derleyebilir. Daha sonra httpd.conf içindeki - LoadModule yönergelerinden - istemediklerinizi açıklama satırları haline getirerek bunları iptal - edebilirsiniz.

    +
  • Apache HTTP Sunucusunu tüm modüller etkin olarak + derleyebilirsiniz. Fakat sunucunun başlatılması sırasında sadece temel + modüller yüklenir. Daha sonra httpd.conf içindeki + LoadModule yönergelerini etkin + veya etkisiz hale getirerek yüklenecek modülleri + değiştirebilirsiniz.

    $ ./configure --enable-mods-shared=all
    @@ -106,6 +111,20 @@ $ make install

  • +
  • Bazı modüller sadece geliştiriciler içindir ve bunlar tüm + modüllerin derlenmesini (all) seçseniz bile derlenmeyecektir. + Geliştirici modülleri dehil tüm modülleri derlemek isterseniz + reallyall kullanınız. Ek olarak, derlenmiş modüller için + kullanılan LoadModule + yönergelerinin tamamını --enable-load-all-modules derleme + seçeneği ile etkin kılabilirsiniz.

    + +

    +$ ./configure --enable-mods-shared=reallyall --enable-load-all-modules
    +$ make install +

    +
  • +
  • Kaynak dosyası mod_filanca.c dosyasında dağıtılan bir üçüncü parti Apache httpd modülü mod_filanca.so isminde bir DSO modülü olarak Apache httpd kaynak ağacının dışında @@ -283,7 +302,28 @@ $ apxs -aci filanca mod_filanca.la  ja  |  ko  |  tr 

    -
  • +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/dso.xml.fr b/docs/manual/dso.xml.fr index 95b18391d5b..803f8184542 100644 --- a/docs/manual/dso.xml.fr +++ b/docs/manual/dso.xml.fr @@ -1,9 +1,9 @@ - + - + + -Environment Variables in Apache - Apache HTTP Server +Environment Variables in Apache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Environment Variables in Apache

    +Apache > HTTP Server > Documentation > Version 2.4

    Environment Variables in Apache

    +

    See also

    top

    Setting Environment Variables

    @@ -138,6 +143,16 @@ late during request processing meaning that directives such as SetEnvIf and RewriteCond will not see the variables set with it. + +
  • When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.
  • top
    @@ -145,7 +160,7 @@

    Using Environment Variables

    - +

    CGI Scripts

    @@ -393,7 +408,7 @@

    Starting with version 2.4, Apache is more strict about how HTTP - headers are converted to environment variables in mod_cgi + headers are converted to environment variables in mod_cgi and other modules: Previously any invalid characters in header names were simply translated to underscores. This allowed for some potential cross-site-scripting attacks via header injection @@ -401,18 +416,17 @@ Unusual Web Bugs, slide 19/20).

    If you have to support a client which sends broken headers and - which can't be fixed, a simple workaround involving mod_setenvif - and mod_header allows you to still accept + which can't be fixed, a simple workaround involving mod_setenvif + and mod_headers allows you to still accept these headers:

    -

    -#
    -# The following works around a client sending a broken Accept_Encoding
    -# header.
    -#
    -SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    -RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -

    +
    # 
    +# The following works around a client sending a broken Accept_Encoding
    +# header.
    +#
    +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    +RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding
    + @@ -423,27 +437,26 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf to deal with known client problems. Since the affected clients are no longer seen in the wild, this configuration is likely no-longer necessary.

    -

    -#
    -# The following directives modify normal HTTP response behavior.
    -# The first directive disables keepalive for Netscape 2.x and browsers that
    -# spoof it. There are known problems with these browser implementations.
    -# The second directive is for Microsoft Internet Explorer 4.0b2
    -# which has a broken HTTP/1.1 implementation and does not properly
    -# support keepalive when it is used on 301 or 302 (redirect) responses.
    -#
    -BrowserMatch "Mozilla/2" nokeepalive
    -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    -
    -#
    -# The following directive disables HTTP/1.1 responses to browsers which
    -# are in violation of the HTTP/1.0 spec by not being able to understand a
    -# basic 1.1 response.
    -#
    -BrowserMatch "RealPlayer 4\.0" force-response-1.0
    -BrowserMatch "Java/1\.0" force-response-1.0
    -BrowserMatch "JDK/1\.0" force-response-1.0 -

    +
    #
    +# The following directives modify normal HTTP response behavior.
    +# The first directive disables keepalive for Netscape 2.x and browsers that
    +# spoof it. There are known problems with these browser implementations.
    +# The second directive is for Microsoft Internet Explorer 4.0b2
    +# which has a broken HTTP/1.1 implementation and does not properly
    +# support keepalive when it is used on 301 or 302 (redirect) responses.
    +#
    +BrowserMatch "Mozilla/2" nokeepalive
    +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    +
    +#
    +# The following directive disables HTTP/1.1 responses to browsers which
    +# are in violation of the HTTP/1.0 spec by not being able to understand a
    +# basic 1.1 response.
    +#
    +BrowserMatch "RealPlayer 4\.0" force-response-1.0
    +BrowserMatch "Java/1\.0" force-response-1.0
    +BrowserMatch "JDK/1\.0" force-response-1.0
    +

    Do not log requests for images in the access log

    @@ -454,12 +467,11 @@ BrowserMatch "JDK/1\.0" force-response-1.0 particular directories, or to prevent logging of requests coming from particular hosts.

    -

    - SetEnvIf Request_URI \.gif image-request
    - SetEnvIf Request_URI \.jpg image-request
    - SetEnvIf Request_URI \.png image-request
    - CustomLog logs/access_log common env=!image-request -

    +
    SetEnvIf Request_URI \.gif image-request
    +SetEnvIf Request_URI \.jpg image-request
    +SetEnvIf Request_URI \.png image-request
    +CustomLog logs/access_log common env=!image-request
    +

    Prevent "Image Theft"

    @@ -471,18 +483,13 @@ BrowserMatch "JDK/1\.0" force-response-1.0 in limited circumstances. We assume that all your images are in a directory called /web/images.

    -

    - SetEnvIf Referer "^http://www\.example\.com/" local_referal
    - # Allow browsers that do not send Referer info
    - SetEnvIf Referer "^$" local_referal
    - <Directory /web/images>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=local_referal -
    - </Directory> -

    +
    SetEnvIf Referer "^http://www\.example\.com/" local_referal
    +# Allow browsers that do not send Referer info
    +SetEnvIf Referer "^$" local_referal
    +<Directory "/web/images">
    +    Require env local_referal
    +</Directory>
    +

    For more information about this technique, see the "Keeping Your Images from Adorning Other Sites" @@ -495,7 +502,28 @@ BrowserMatch "JDK/1\.0" force-response-1.0  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/env.html.fr b/docs/manual/env.html.fr index 2182a0f9ae3..82432df7667 100644 --- a/docs/manual/env.html.fr +++ b/docs/manual/env.html.fr @@ -1,22 +1,27 @@ - -Apache et les variables d'environnement - Serveur Apache HTTP +Apache et les variables d'environnement - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Apache et les variables d'environnement

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Apache et les variables d'environnement

    +

    Voir aussi

    top

    Dfinition des variables d'environnement

    @@ -148,6 +153,15 @@ cours du traitement de la requte, ce qui signifie que des directives telles que SetEnvIf et RewriteCond ne verront pas les variables qu'elle aura dfinies. + +
  • Lorsque le serveur cherche un chemin via une sous-requte interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il gnre un + listing du contenu d'un rpertoire via le module + mod_autoindex, la sous-requte n'hrite pas des + variables d'environnement spcifiques la requte. En outre, cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas values + sparment dans la sous-requte.
  • top
    @@ -155,7 +169,7 @@

    Utilisation des variables d'environnement

    - +

    Scripts CGI

    @@ -434,17 +448,15 @@

    Si vous devez supporter un client qui envoie des en-ttes non conformes et si ceux-ci ne peuvent pas tre corrigs, il existe une solution de contournement simple mettant en jeu les modules - mod_setenvif et mod_header, + mod_setenvif et mod_headers, et permettant de prendre en compte ces en-ttes :

    -

    -#
    -# L'exemple suivant montre comment prendre en compte un en-tte
    -# Accept_Encoding non conforme envoy par un client.
    -#
    -SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    -RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -

    +
    # L'exemple suivant montre comment prendre en compte un en-tte
    +# Accept_Encoding non conforme envoy par un client. +# +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 +RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding
    + @@ -456,27 +468,26 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf pour tenir compte de problmes connus avec certains clients. Comme les clients concerns sont maintenant trs peu utiliss, cet ajout n'est pratiquement plus ncessaire.

    -

    -#
    -# The following directives modify normal HTTP response behavior.
    -# The first directive disables keepalive for Netscape 2.x and browsers that
    -# spoof it. There are known problems with these browser implementations.
    -# The second directive is for Microsoft Internet Explorer 4.0b2
    -# which has a broken HTTP/1.1 implementation and does not properly
    -# support keepalive when it is used on 301 or 302 (redirect) responses.
    -#
    -BrowserMatch "Mozilla/2" nokeepalive
    -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    -
    -#
    -# The following directive disables HTTP/1.1 responses to browsers which
    -# are in violation of the HTTP/1.0 spec by not being able to grok a
    -# basic 1.1 response.
    -#
    -BrowserMatch "RealPlayer 4\.0" force-response-1.0
    -BrowserMatch "Java/1\.0" force-response-1.0
    -BrowserMatch "JDK/1\.0" force-response-1.0 -

    +
    #
    +# The following directives modify normal HTTP response behavior.
    +# The first directive disables keepalive for Netscape 2.x and browsers that
    +# spoof it. There are known problems with these browser implementations.
    +# The second directive is for Microsoft Internet Explorer 4.0b2
    +# which has a broken HTTP/1.1 implementation and does not properly
    +# support keepalive when it is used on 301 or 302 (redirect) responses.
    +#
    +BrowserMatch "Mozilla/2" nokeepalive
    +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    +
    +#
    +# The following directive disables HTTP/1.1 responses to browsers which
    +# are in violation of the HTTP/1.0 spec by not being able to grok a
    +# basic 1.1 response.
    +#
    +BrowserMatch "RealPlayer 4\.0" force-response-1.0
    +BrowserMatch "Java/1\.0" force-response-1.0
    +BrowserMatch "JDK/1\.0" force-response-1.0
    +

    Ne pas tracer les requtes pour des images dans le fichier de @@ -487,12 +498,11 @@ BrowserMatch "JDK/1\.0" force-response-1.0 dans le fichier de trace des accs. Il peut tre facilement adapt pour empcher le traage de rpertoires particuliers, ou de requtes en provenance de certains htes.

    -

    - SetEnvIf Request_URI \.gif image-request
    - SetEnvIf Request_URI \.jpg image-request
    - SetEnvIf Request_URI \.png image-request
    - CustomLog logs/access_log common env=!image-request -

    +
    SetEnvIf Request_URI \.gif image-request
    +SetEnvIf Request_URI \.jpg image-request
    +SetEnvIf Request_URI \.png image-request
    +CustomLog logs/access_log common env=!image-request
    +

    Prvention du "Vol d'image"

    @@ -504,18 +514,13 @@ BrowserMatch "JDK/1\.0" force-response-1.0 recommande, mais elle peut fonctionner dans des circonstances bien dfinies. Nous supposons que toutes vos images sont enregistres dans un rpertoire nomm /web/images.

    -

    - SetEnvIf Referer "^http://www\.example\.com/" local_referal
    - # Allow browsers that do not send Referer info
    - SetEnvIf Referer "^$" local_referal
    - <Directory /web/images>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=local_referal -
    - </Directory> -

    +
    SetEnvIf Referer "^http://www\.example\.com/" local_referal
    +# Autorise les navigateurs qui n'envoient aucune information de Referer
    +SetEnvIf Referer "^$" local_referal
    +<Directory "/web/images">
    +    Require env local_referal
    +</Directory>
    +

    Pour plus d'informations sur cette technique, voir le tutoriel sur ServerWatch @@ -528,7 +533,28 @@ BrowserMatch "JDK/1\.0" force-response-1.0  ja  |  ko  |  tr 

    -

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/env.html.ja.utf8 b/docs/manual/env.html.ja.utf8 index 26addcf7e2a..e0427ca35c1 100644 --- a/docs/manual/env.html.ja.utf8 +++ b/docs/manual/env.html.ja.utf8 @@ -1,32 +1,38 @@ - -Apache の環境変数 - Apache HTTP サーバ +Apache の環境変数 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache の環境変数

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache HTTP サーバは環境変数と呼ばれる、名前のついた 変数に情報を記憶する仕組みを提供しています。この情報はログ収集や @@ -48,7 +54,7 @@

  • 環境変数の使用
  • 特別な目的の環境変数
  • -
    +

    参照

    top

    環境変数の設定

    @@ -361,8 +367,7 @@ httpd.conf に次の行を加えるよう推奨されていましたが、 今となっては、問題としていたクライアントは実際には見かけることは なくなってきたので、この設定はもはや必要ないかもしれません。

    -
    -#
    +
    #
     # The following directives modify normal HTTP response behavior.
     # The first directive disables keepalive for Netscape 2.x and browsers that
     # spoof it. There are known problems with these browser implementations.
    @@ -390,8 +395,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0
    これを変更することで、特定のディレクトリのログ収集をやめたり、 特定のホストからのリクエストのログ収集をやめたりすることが簡単にできます。

    -
    -SetEnvIf Request_URI \.gif image-request
    +    
    SetEnvIf Request_URI \.gif image-request
     SetEnvIf Request_URI \.jpg image-request
     SetEnvIf Request_URI \.png image-request
     CustomLog logs/access_log common env=!image-request
    @@ -405,8 +409,7 @@ CustomLog logs/access_log common env=!image-request
    これは推奨されている設定ではありませんが、ある限定された状況では有効です。 ここでは、すべての画像は /web/images というディレクトリにあると仮定します。

    -
    -SetEnvIf Referer "^http://www\.example\.com/" local_referal
    +    
    SetEnvIf Referer "^http://www\.example\.com/" local_referal
     # Allow browsers that do not send Referer info
     SetEnvIf Referer "^$" local_referal
     <Directory /web/images>
    @@ -421,12 +424,33 @@ SetEnvIf Referer "^$" local_referal
         
       
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/env.html.ko.euc-kr b/docs/manual/env.html.ko.euc-kr index dc160571cc1..a9d132df2b2 100644 --- a/docs/manual/env.html.ko.euc-kr +++ b/docs/manual/env.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ ȯ溯 - Apache HTTP Server +ġ ȯ溯 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ ȯ溯

    :  en  |  fr  | @@ -44,7 +49,7 @@

  • ȯ溯 ϱ
  • Ư ȯ溯
  • -
    +

    top

    ȯ溯 ϱ

    @@ -309,8 +314,7 @@

    Ŭ̾Ʈ ̹ ˷ ذϱ httpd.conf ϱ ٶ.

    -
    -#
    +
    #
     #  þ Ϲ HTTP  Ѵ.
     # ù° þ Netscape 2.x ̸  
     # keepalive  ʴ´. ̵    ִ.
    @@ -336,8 +340,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0

    ̹ û α׿ ʴ´. Ư 丮 Ȥ Ư ȣƮ û α ʵ ִ.

    -
    -SetEnvIf Request_URI \.gif image-request
    +    
    SetEnvIf Request_URI \.gif image-request
     SetEnvIf Request_URI \.jpg image-request
     SetEnvIf Request_URI \.png image-request
     CustomLog logs/access_log common env=!image-request
    @@ -351,8 +354,7 @@ CustomLog logs/access_log common env=!image-request
    , ѵ 쿡 Ѵ. 츮 ̹ /web/images 丮 ȿ ִٰ Ѵ.

    -
    -SetEnvIf Referer "^http://www.example.com/" local_referal
    +    
    SetEnvIf Referer "^http://www.example.com/" local_referal
     # Referer   ʴ  Ѵ
     SetEnvIf Referer "^$" local_referal
     <Directory /web/images>
    @@ -371,7 +373,28 @@ SetEnvIf Referer "^$" local_referal
      ja  |
      ko  |
      tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/env.html.tr.utf8 b/docs/manual/env.html.tr.utf8 index 7fb9d99b0b9..50baff507d6 100644 --- a/docs/manual/env.html.tr.utf8 +++ b/docs/manual/env.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache’de Ortam Değişkenleri - Apache HTTP Sunucusu +Apache’de Ortam Değişkenleri - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache’de Ortam Değişkenleri

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache’de Ortam Değişkenleri

    Mevcut Diller:  en  |  fr  | @@ -24,15 +29,21 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Apache HTTP Sunucusunda bilgiyi değişkenlerde saklamak için ortam - değişkenleri adı verilen bir mekanizma bulunur. Saklanan bu bilgi - erişim denetimi, günlük kaydı gibi çeşitli işlemleri denetlemekte - kullanılabilir. Değişkenler ayrıca, CGI betikleri gibi harici - uygulamalarla iletişim mekanizması olarak da kullanılabilir. Bu belgede - bu değişkenler üzerindeki işlemlere ve kullanım şekillerine - değinilmiştir.

    +

    Apache HTTP Sunucusunu etkileyen ortam değişkenleri iki çeşittir.

    + +

    İlki, işletim sisteminin denetimindeki ortam değişkenleridir. Bu + değişkenlere değer atama işlemi sunucu başlatılmadan önce yapılır. + Bunlar yapılandırma dosyalarının içinde kullanılabilir. Ayrıca, + istenirse PassEnv yönergesi kullanılarak bunlar CGI betiklerine ve + SSI sayfalarına da aktarılabilir.

    + +

    İkincisi ise, Apache HTTP Sunucusunun kendi ortam değişkenleridir. + Bu değişkenlerde saklanan bilgi erişim denetimi, günlük kaydı gibi + çeşitli işlemleri denetlemekte kullanılabilir. Değişkenler ayrıca, CGI + betikleri gibi harici uygulamalarla iletişim mekanizması olarak da + kullanılabilir. Bu belgede bu değişkenler üzerindeki işlemlere ve + kullanım şekillerine değinilmiştir.

    Bu değişkenlere ortam değişkenleri dense de işletim sisteminin ortam değişkenleri gibi değillerdir. Bunlar sadece Apache ortamında @@ -47,12 +58,12 @@

  • Ortam Değişkenlerinin Kullanımı
  • Özel Amaçlı Ortam Değişkenleri
  • Örnekler
  • -
    +

    Ayrıca bakınız:

    top

    Ortam Değişkenlerinin Atanması

    - +

    Temel Ortamda Değişiklik

    @@ -90,7 +101,7 @@

    Apache yapılandırmasıyla atanan ve kabuğa aktarılan ortam - değişkenlerinden başka CGI + değişkenlerinden başka CGI Belirtiminin gerektirdiği istekler hakkında temel bilgileri içeren ortam değişkenlerinin CGI betikleri ve SSI sayfalarınca atanabilmesi sağlanmıştır.

    @@ -116,19 +127,37 @@ betiklerine ve SSI sayfalarına aktarılırken bu sınırlamalara uygun olmayan karakterlerin yerlerine alt çizgi imleri konur. +
  • Bir özel durum, CGI betiklerine ve benzerlerine ortam + değişkenleri üzerinden aktarılan HTTP başlıklarıdır (aşağıya + bakın). Bunlar büyük harfe dönüştürülür ve sadece tireler + altçizgilere dönüştürülür. Eğer HTTP başlığı geçersiz karakter + içeriyorsa başlığın tamamı yoksayılır. Böyle bir durumda ne + yapılacağı öğrenmek için aşağıya + bakın.
  • +
  • İsteklerin işleme konması sırasında SetEnv yönergesi geç çalıştırılır, yani SetEnvIf ve RewriteCond gibi yönergeler SetEnv ile atanan değişken değerlerini görmezler.
  • - + +
  • mod_autoindex ile dizin listesi oluşturulması + veya bir DirectoryIndex + için yol aranması gibi bir dahili alt + istek için sunucu yol araması yaparken isteklere özgü + ortam değişkenleri alt istekler tarafından miras alınMAZ. Buna ek + olarak, mod_setenvif modülünün devreye girdiği API + fazlarından dolayı yapılan alt isteklerde + SetEnvIf yönergeleri + ayrı ayrı değerlendirilMEZ.
  • +
    top

    Ortam Değişkenlerinin Kullanımı

    - +

    CGI Betikleri

    @@ -373,6 +402,32 @@

    Örnekler

    +

    Bozuk başlıkların CGI betiklerine aktarılması

    + + +

    2.4 sürümünden itibaren, mod_cgi modülü ve diğer + modüllerde HTTP başlıklarının ortam değişkenlerine dönüştürülmesi + bağlamında Apache daha seçici davranmaktadır. Önce HTTP başlığındaki + geçersiz karakterlerin tamamı altçizgilere dönüştürülür. Bu, başlık + zerki yoluyla yapılan karşı-site-betiklerini-çalıştırma saldırısını + önlemeye yöneliktir. (Bakınız: Unusual Web Bugs, slide 19/20).

    + +

    Bozuk başlıklar gönderdiği halde bunlara dokunulmamasını gerektiren + bir istemciniz varsa, mod_setenvif ve + mod_headers modüllerinin sunduğu yapıyı örnekteki gibi + kullanarak bu sorunun üstesinden gelebilirsiniz:

    + +
    #
    +# Aşağıdaki satırlarla bir istemcinin gönderdiği bozuk
    +# Accept_Encoding başlıklarının istenildiği gibi işlenmesi
    +# sağlanabilir.
    +#
    +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    +RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding
    + + + +

    Protokolü yanlış yorumlayan tarayıcıların davranışlarının değiştirilmesi

    @@ -382,8 +437,7 @@ önerilirdi. Fakat, böyle tarayıcılar artık ortalıkta görünmediğinden bu yapılandırmaya da artık gerek kalmamıştır.

    -
    -#
    +        
    #
     # Aşağıdaki yönergeler normal HTTP yanıt davranışını değiştirirler.
     # İlk yönerge Netscape 2.x ve kendini öyle gösteren tarayıcılar için
     # kalıcı bağlantıyı (keepalive) iptal eder. İkinci yönerge ise HTTP/1.1
    @@ -400,7 +454,8 @@ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
     #
     BrowserMatch "RealPlayer 4\.0" force-response-1.0
     BrowserMatch "Java/1\.0" force-response-1.0
    -BrowserMatch "JDK/1\.0" force-response-1.0
    +BrowserMatch "JDK/1\.0" force-response-1.0 +

    Resim isteklerinin erişim günlüğüne kaydedilmemesi

    @@ -411,12 +466,12 @@ BrowserMatch "JDK/1\.0" force-response-1.0
    gelen isteklerin günlüğe kaydedilmesini engellemek amacıyla da kullanılabilir.

    -

    - SetEnvIf Request_URI \.gif image-request
    - SetEnvIf Request_URI \.jpg image-request
    - SetEnvIf Request_URI \.png image-request
    - CustomLog logs/access_log common env=!image-request -

    +
    SetEnvIf Request_URI \.gif image-request
    +SetEnvIf Request_URI \.jpg image-request
    +SetEnvIf Request_URI \.png image-request
    +CustomLog logs/access_log common env=!image-request
    + +

    “Resim Hırsızlığı” için önlem alınması

    @@ -428,18 +483,13 @@ BrowserMatch "JDK/1\.0" force-response-1.0
    resimlerin /siteler/resimler dizini altında tutulduğu varsayılmıştır.

    -

    - SetEnvIf Referer "^http://filan\.fesmekan\.dom/" local_referal
    - # Referrer bilgisi göndermeyen tarayıcılara izin verelim
    - SetEnvIf Referer "^$" local_referal
    - <Directory /siteler/resimler> - - Order Deny,Allow
    - Deny from all
    - Allow from env=local_referal -
    - </Directory> -

    +
    SetEnvIf Referer "^http://www\.example\.com/" local_referal
    +# Referrer bilgisi göndermeyen tarayıcılara izin verelim
    +SetEnvIf Referer "^$" local_referal
    +<Directory "/siteler/resimler">
    +  Require env local_referal
    +</Directory>
    +

    Bu teknik hakkında daha ayrıntılı bilgi edinmek için ServerWatch üzerindeki "Diğer sitelerin sizin resimlerinizle donatılmasını engellemek" @@ -452,7 +502,28 @@ BrowserMatch "JDK/1\.0" force-response-1.0

     ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 369eaf8993a..d4375cf6888 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -153,6 +153,16 @@ SetEnvIf and RewriteCond will not see the variables set with it. + +
  • When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.
  • @@ -170,9 +180,9 @@ mod_rewrite - Allow + Require CustomLog - Deny + Deny ExtFilterDefine Header LogFormat @@ -443,17 +453,17 @@

    If you have to support a client which sends broken headers and which can't be fixed, a simple workaround involving mod_setenvif - and mod_header allows you to still accept + and mod_headers allows you to still accept these headers:

    - -#
    -# The following works around a client sending a broken Accept_Encoding
    -# header.
    -#
    -SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    + +# +# The following works around a client sending a broken Accept_Encoding +# header. +# +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -
    +
    @@ -464,27 +474,27 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf to deal with known client problems. Since the affected clients are no longer seen in the wild, this configuration is likely no-longer necessary.

    - -#
    -# The following directives modify normal HTTP response behavior.
    -# The first directive disables keepalive for Netscape 2.x and browsers that
    -# spoof it. There are known problems with these browser implementations.
    -# The second directive is for Microsoft Internet Explorer 4.0b2
    -# which has a broken HTTP/1.1 implementation and does not properly
    -# support keepalive when it is used on 301 or 302 (redirect) responses.
    -#
    -BrowserMatch "Mozilla/2" nokeepalive
    -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    -
    -#
    -# The following directive disables HTTP/1.1 responses to browsers which
    -# are in violation of the HTTP/1.0 spec by not being able to understand a
    -# basic 1.1 response.
    -#
    -BrowserMatch "RealPlayer 4\.0" force-response-1.0
    -BrowserMatch "Java/1\.0" force-response-1.0
    + +# +# The following directives modify normal HTTP response behavior. +# The first directive disables keepalive for Netscape 2.x and browsers that +# spoof it. There are known problems with these browser implementations. +# The second directive is for Microsoft Internet Explorer 4.0b2 +# which has a broken HTTP/1.1 implementation and does not properly +# support keepalive when it is used on 301 or 302 (redirect) responses. +# +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 + +# +# The following directive disables HTTP/1.1 responses to browsers which +# are in violation of the HTTP/1.0 spec by not being able to understand a +# basic 1.1 response. +# +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 -
    +
    @@ -495,12 +505,12 @@ BrowserMatch "JDK/1\.0" force-response-1.0 particular directories, or to prevent logging of requests coming from particular hosts.

    - - SetEnvIf Request_URI \.gif image-request
    - SetEnvIf Request_URI \.jpg image-request
    - SetEnvIf Request_URI \.png image-request
    - CustomLog logs/access_log common env=!image-request -
    + +SetEnvIf Request_URI \.gif image-request +SetEnvIf Request_URI \.jpg image-request +SetEnvIf Request_URI \.png image-request +CustomLog logs/access_log common env=!image-request +
    @@ -512,18 +522,14 @@ BrowserMatch "JDK/1\.0" force-response-1.0 in limited circumstances. We assume that all your images are in a directory called /web/images.

    - - SetEnvIf Referer "^http://www\.example\.com/" local_referal
    - # Allow browsers that do not send Referer info
    - SetEnvIf Referer "^$" local_referal
    - <Directory /web/images>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=local_referal -
    - </Directory> -
    + +SetEnvIf Referer "^http://www\.example\.com/" local_referal +# Allow browsers that do not send Referer info +SetEnvIf Referer "^$" local_referal +<Directory "/web/images"> + Require env local_referal +</Directory> +

    For more information about this technique, see the " + - + @@ -167,6 +167,18 @@ module="mod_setenvif">SetEnvIf et RewriteCond ne verront pas les variables qu'elle aura définies. + +

  • Lorsque le serveur cherche un chemin via une sous-requête interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il génère un + listing du contenu d'un répertoire via le module + mod_autoindex, la sous-requête n'hérite pas des + variables d'environnement spécifiques à la requête. En outre, à cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas évaluées + séparément dans la sous-requête.
  • @@ -184,9 +196,9 @@ mod_rewrite - Allow + Require CustomLog - Deny + Deny ExtFilterDefine Header LogFormat @@ -475,17 +487,16 @@

    Si vous devez supporter un client qui envoie des en-têtes non conformes et si ceux-ci ne peuvent pas être corrigés, il existe une solution de contournement simple mettant en jeu les modules - mod_setenvif et mod_header, + mod_setenvif et mod_headers, et permettant de prendre en compte ces en-têtes :

    - -#
    + # L'exemple suivant montre comment prendre en compte un en-tête
    -# Accept_Encoding non conforme envoyé par un client.
    -#
    -SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1
    +# Accept_Encoding non conforme envoyé par un client. +# +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -
    + @@ -497,27 +508,27 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf pour tenir compte de problèmes connus avec certains clients. Comme les clients concernés sont maintenant très peu utilisés, cet ajout n'est pratiquement plus nécessaire.

    - -#
    -# The following directives modify normal HTTP response behavior.
    -# The first directive disables keepalive for Netscape 2.x and browsers that
    -# spoof it. There are known problems with these browser implementations.
    -# The second directive is for Microsoft Internet Explorer 4.0b2
    -# which has a broken HTTP/1.1 implementation and does not properly
    -# support keepalive when it is used on 301 or 302 (redirect) responses.
    -#
    -BrowserMatch "Mozilla/2" nokeepalive
    -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    -
    -#
    -# The following directive disables HTTP/1.1 responses to browsers which
    -# are in violation of the HTTP/1.0 spec by not being able to grok a
    -# basic 1.1 response.
    -#
    -BrowserMatch "RealPlayer 4\.0" force-response-1.0
    -BrowserMatch "Java/1\.0" force-response-1.0
    + +# +# The following directives modify normal HTTP response behavior. +# The first directive disables keepalive for Netscape 2.x and browsers that +# spoof it. There are known problems with these browser implementations. +# The second directive is for Microsoft Internet Explorer 4.0b2 +# which has a broken HTTP/1.1 implementation and does not properly +# support keepalive when it is used on 301 or 302 (redirect) responses. +# +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 + +# +# The following directive disables HTTP/1.1 responses to browsers which +# are in violation of the HTTP/1.0 spec by not being able to grok a +# basic 1.1 response. +# +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 -
    +
    @@ -528,12 +539,12 @@ BrowserMatch "JDK/1\.0" force-response-1.0 dans le fichier de trace des accès. Il peut être facilement adapté pour empêcher le traçage de répertoires particuliers, ou de requêtes en provenance de certains hôtes.

    - - SetEnvIf Request_URI \.gif image-request
    - SetEnvIf Request_URI \.jpg image-request
    - SetEnvIf Request_URI \.png image-request
    - CustomLog logs/access_log common env=!image-request -
    + +SetEnvIf Request_URI \.gif image-request +SetEnvIf Request_URI \.jpg image-request +SetEnvIf Request_URI \.png image-request +CustomLog logs/access_log common env=!image-request +
    @@ -545,18 +556,14 @@ BrowserMatch "JDK/1\.0" force-response-1.0 recommandée, mais elle peut fonctionner dans des circonstances bien définies. Nous supposons que toutes vos images sont enregistrées dans un répertoire nommé /web/images.

    - - SetEnvIf Referer "^http://www\.example\.com/" local_referal
    - # Allow browsers that do not send Referer info
    - SetEnvIf Referer "^$" local_referal
    - <Directory /web/images>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=local_referal -
    - </Directory> -
    + +SetEnvIf Referer "^http://www\.example\.com/" local_referal +# Autorise les navigateurs qui n'envoient aucune information de Referer +SetEnvIf Referer "^$" local_referal +<Directory "/web/images"> + Require env local_referal +</Directory> +

    Pour plus d'informations sur cette technique, voir le tutoriel sur ServerWatch diff --git a/docs/manual/env.xml.ja b/docs/manual/env.xml.ja index 0a5eae1dc3c..1a4744d1b21 100644 --- a/docs/manual/env.xml.ja +++ b/docs/manual/env.xml.ja @@ -1,7 +1,7 @@ - + + + -Expressions in Apache HTTP Server - Apache HTTP Server +Expressions in Apache HTTP Server - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Expressions in Apache HTTP Server

    +Apache > HTTP Server > Documentation > Version 2.4

    Expressions in Apache HTTP Server

    Available Languages:  en  |  fr 

    -

    Historically, there are several syntax variants for expressions used to express - a condition in the different modules of the Apache HTTP Server. - There is some ongoing effort to only use a single variant, called ap_expr, - for all configuration directives. - This document describes the ap_expr expression parser. +

    Historically, there are several syntax variants for expressions + used to express a condition in the different modules of the Apache + HTTP Server. There is some ongoing effort to only use a single + variant, called ap_expr, for all configuration directives. + This document describes the ap_expr expression parser.

    The ap_expr expression is intended to replace most other - expression variants in HTTPD. For example, the deprecated - SSLRequire expressions can be - replaced by Require expr. -

    + expression variants in HTTPD. For example, the deprecated SSLRequire expressions can be replaced + by Require expr.

    -
    top
    -

    Grammar in Backus–Naur Form notation

    +

    Grammar in Backus-Naur Form notation

    -

    Backus–Naur Form (BNF) is a notation - technique for context-free grammars, often used to describe the syntax of languages used in computing. +

    Backus-Naur + Form (BNF) is a notation technique for context-free grammars, + often used to describe the syntax of languages used in computing. + In most cases, expressions are used to express boolean values. + For these, the starting point in the BNF is expr. + However, a few directives like LogMessage accept expressions + that evaluate to a string value. For those, the starting point in + the BNF is string.

    -
    -expr        ::= "true" | "false"
    +
    expr        ::= "true" | "false"
                   | "!" expr
                   | expr "&&" expr
                   | expr "||" expr
    @@ -110,8 +120,7 @@ rebackref   ::= "$" [0-9]
     
     function     ::= funcname "(" word ")"
     
    -listfunction ::= listfuncname "(" word ")"
    -
    +listfunction ::= listfuncname "(" word ")"
    top
    @@ -127,16 +136,22 @@ listfunction ::= listfuncname "(" word ")" %{REMOTE_USER} will not be set in this case.

    The following variables provide the values of the named HTTP request - headers. The values of other headers can be obtained witht the - req function.

    + headers. The values of other headers can be obtained with the + req function. Using these + variables may cause the header name to be added to the Vary + header of the HTTP response, except where otherwise noted for the + directive accepting the expression. The req_novary + function may be used to circumvent this + behavior.

    - - - - - + + + + + +
    Name
    HTTP_ACCEPT
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    HTTP_REFERER
    HTTP_USER_AGENT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    HTTP_REFERER
    HTTP_USER_AGENT

    Other request related variables

    @@ -150,7 +165,7 @@ listfunction ::= listfuncname "(" word ")"
    REQUEST_URI The path part of the request's URI
    DOCUMENT_URISame as REQUEST_URI
    Same as REQUEST_URI
    REQUEST_FILENAME The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the @@ -184,7 +199,7 @@ listfunction ::= listfuncname "(" word ")"
    REMOTE_HOST The host name of the remote host
    REMOTE_USERThe name of the authenticated user (if any)
    The name of the authenticated user, if any (not available during <If >)
    REMOTE_IDENT The user name set by mod_ident
    SERVER_NAMEThe DocumentRoot of the current vhost
    AUTH_TYPEThe configured AuthType - (e.g. "basic")
    The configured AuthType (e.g. + "basic")
    CONTENT_TYPEThe content type of the response
    The content type of the response (not available during <If >)
    HANDLER The name of the handler creating the response
    HTTPS
    HTTP2"on" if the request uses http/2, + "off" otherwise
    HTTPS "on" if the request uses https, "off" otherwise
    IPV6
    IPV6 "on" if the connection uses IPv6, "off" otherwise
    REQUEST_STATUSThe HTTP error status of the request
    REQUEST_LOG_ID
    REQUEST_STATUSThe HTTP error status of the request (not available during <If >)
    REQUEST_LOG_ID The error log id of the request (see ErrorLogFormat)
    CONN_LOG_ID
    CONN_LOG_ID The error log id of the connection (see ErrorLogFormat)
    CONN_REMOTE_ADDRThe peer IP address of the connection (see the + mod_remoteip module)
    CONTEXT_PREFIX
    CONTEXT_DOCUMENT_ROOT

    Misc variables

    @@ -231,12 +256,12 @@ listfunction ::= listfuncname "(" word ")"
    TIME_YEAR The current year (e.g. 2010)
    TIME_MONThe current month (1, ..., 12)
    The current month (01, ..., 12)
    TIME_DAYThe current day of the month
    The current day of the month (01, ...)
    TIME_HOUR The hour part of the current time - (0, ..., 23)
    TIME_MIN The minute part of the current time
    TIME_SECThe day of the week (starting with 0 for Sunday)
    TIMEThe date and time in the format 20101231235959
    The date and time in the format + 20101231235959
    SERVER_SOFTWARE The server version string
    API_VERSION The date of the API version (module magic number)
    -

    Some modules register additional variables, see e.g. mod_ssl.

    +

    Some modules register additional variables, see e.g. + mod_ssl.

    top
    @@ -344,35 +371,39 @@ listfunction ::= listfuncname "(" word ")"
    -f The argument is treated as a filename. True if the file exists and is regular fileyes
    -L
    -sThe argument is treated as a filename. + True if the file exists and is not emptyyes
    -L The argument is treated as a filename. True if the file exists and is symlinkyes
    -h
    -h The argument is treated as a filename. True if the file exists and is symlink (same as -L)yes
    -F
    -F True if string is a valid file, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - it can impact your server's performance!
    -U
    -U True if string is a valid URL, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - it can impact your server's performance!
    -A
    -A Alias for -U
    -n
    -n True if string is not empty
    -z
    -z True if string is empty
    -T
    -T False if string is empty, "0", "off", "false", or "no" (case insensitive). True otherwise.
    -RSame as "%{REMOTE_ADDR} -ipmatch ...", but more efficient +
    -RSame as "%{REMOTE_ADDR} -ipmatch ...", but more + efficient
    @@ -387,44 +418,91 @@ listfunction ::= listfuncname "(" word ")" a string. Functions names are not case sensitive. Modules may register additional functions.

    - +
    NameDescriptionRestricted
    - - + + + + - - - + + + + - - - + + + - + osenv + - - - + + + - + - - + + + + + + + + + + + + + regular file)
    NameDescriptionSpecial notes
    req, httpGet HTTP request header
    respGet HTTP request header; header names may be added to the Vary + header, see below
    req_novarySame as req, but header names will not be added to the + Vary header
    resp Get HTTP response header
    reqenvLookup request environment variable
    osenv
    reqenvLookup request environment variable (as a shortcut, + v can also be used to access variables).ordering
    osenv Lookup operating system environment variable
    noteLookup request note
    env
    noteLookup request noteordering
    env Return first match of note, reqenv, - osenv
    tolowerordering
    tolower Convert string to lower case
    toupperConvert string to uppser case
    escape
    toupperConvert string to upper case
    escape Escape special characters in %hex encoding
    unescape
    unescape Unescape %hex encoded string, leaving encoded slashes alone; return empty string if %00 is found
    fileRead contents from a fileyes
    base64Encode the string using base64 encoding
    unbase64Decode base64 encoded string, return truncated string if 0x00 is + found
    md5Hash the string using MD5, then encode the hash with hexadecimal + encoding
    sha1Hash the string using SHA1, then encode the hash with hexadecimal + encoding
    fileRead contents from a file (including line endings, when present) + restricted
    filemodReturn last modification time of a file (or 0 if file does not exist + or is not regular file)restricted
    filesize Return size of a file (or 0 if file does not exist or is not - regular file)yes
    restricted
    -

    The functions marked as "restricted" are not available in some modules - like mod_include.

    - -

    In addition to string-valued functions, there are also list-valued functions which - take one string as argument and return a wordlist, i.e. a list of strings. The wordlist - can be used with the special -in operator. - Functions names are not case sensitive. - Modules may register additional functions.

    +

    The functions marked as "restricted" in the final column are not + available in some modules like mod_include.

    + +

    The functions marked as "ordering" in the final column require some + consideration for the ordering of different components of the server, + especially when the function is used within the + <If> directive which is + evaluated relatively early.

    +
    +

    Environment variable ordering

    + When environment variables are looked up within an + <If> condition, it's important + to consider how extremely early in request processing that this + resolution occurs. As a guideline, any directive defined outside of virtual host + context (directory, location, htaccess) is not likely to have yet had a + chance to execute. SetEnvIf + in virtual host scope is one directive that runs prior to this resolution +
    +
    + When reqenv is used outside of <If>, the resolution will generally occur later, but the + exact timing depends on the directive the expression has been used within. +
    + +

    When the functions req or http are used, + the header name will automatically be added to the Vary header of the + HTTP response, except where otherwise noted for the directive accepting + the expression. The req_novary function can be used to + prevent names from being added to the Vary header.

    + +

    In addition to string-valued functions, there are also + list-valued functions which take one string as argument and return a + wordlist, i.e. a list of strings. The wordlist can be used with the + special -in operator. Functions names are not case + sensitive. Modules may register additional functions.

    There are no built-in list-valued functions. mod_ssl provides PeerExtList. See the description of @@ -432,6 +510,64 @@ listfunction ::= listfuncname "(" word ")" (but PeerExtList is also usable outside of SSLRequire).

    +
    top
    +
    +

    Example expressions

    + + +

    The following examples show how expressions might be used to + evaluate requests:

    + + +
    # Compare the host name to example.com and redirect to www.example.com if it matches
    +<If "%{HTTP_HOST} == 'example.com'">
    +    Redirect permanent "/" "http://www.example.com/"
    +</If>
    +
    +# Force text/plain if requesting a file with the query string contains 'forcetext'
    +<If "%{QUERY_STRING} =~ /forcetext/">
    +    ForceType text/plain
    +</If>
    +
    +# Only allow access to this content during business hours
    +<Directory "/foo/bar/business">
    +    Require expr %{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17
    +</Directory>
    +
    +# Check a HTTP header for a list of values
    +<If "%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }">
    +    Header set matched true
    +</If>
    +
    +# Check an environment variable for a regular expression, negated.
    +<If "! reqenv('REDIRECT_FOO') =~ /bar/">
    +    Header set matched true
    +</If>
    +
    +# Check result of URI mapping by running in Directory context with -f
    +<Directory "/var/www">
    +    AddEncoding x-gzip gz
    +<If "-f '%{REQUEST_FILENAME}.unzipme' && ! %{HTTP:Accept-Encoding} =~ /gzip/">
    +      SetOutputFilter INFLATE
    +</If>
    +</Directory>
    +
    +# Check against the client IP
    +<If "-R '192.168.1.0/24'">
    +    Header set matched true
    +</If>
    +
    +# Function example in boolean context
    +<If "md5('foo') == 'acbd18db4cc2f85cedef654fccc4a4d8'">
    +  Header set checksum-matched true
    +</If>
    +
    +# Function example in string context
    +Header set foo-checksum "expr=%{md5:foo}"
    +
    +# This delays the evaluation of the condition clause compared to <If>
    +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path\.php$#"
    +
    top

    Other

    @@ -440,10 +576,11 @@ listfunction ::= listfuncname "(" word ")" - + - + @@ -468,11 +605,38 @@ listfunction ::= listfuncname "(" word ")"

    The ap_expr syntax is mostly a superset of the syntax of the deprecated SSLRequire directive. The differences are described in SSLRequire's documentation.

    +
    top
    +
    +

    Version History

    + +

    The req_novary function + is available for versions 2.4.4 and later.

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/expr.html.fr b/docs/manual/expr.html.fr index dfa47273043..a950224d913 100644 --- a/docs/manual/expr.html.fr +++ b/docs/manual/expr.html.fr @@ -1,22 +1,27 @@ - -Les expressions dans le serveur HTTP Apache - Serveur Apache HTTP +Les expressions dans le serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Les expressions dans le serveur HTTP Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4
    top

    Syntaxe en Forme de Backus-Naur

    La Forme de Backus-Naur (souvent abrge en BNF, de l'anglais Backus-Naur Form) est une notation permettant de dcrire - les rgles syntaxiques des langages de programmation. + les rgles syntaxiques des langages de programmation. En + gnral, les expressions reprsentent des valeurs boolennes. Dans + ce cas, le point de dpart de la BNF est expr. + Cependant, certaines directives comme LogMessage utilisent comme + paramtres des expressions qui reprsentent des chanes de + caractres. Dans ce cas, le point de dpart de la BNF est + string.

    -
    -expr        ::= "true" | "false"
    +
    expr        ::= "true" | "false"
                   | "!" expr
                   | expr "&&" expr
                   | expr "||" expr
    @@ -113,8 +125,7 @@ rebackref   ::= "$" [0-9]
     
     function     ::= funcname "(" word ")"
     
    -listfunction ::= listfuncname "(" word ")"
    -
    +listfunction ::= listfuncname "(" word ")"
    top
    @@ -132,15 +143,21 @@ listfunction ::= listfuncname "(" word ")"

    Les variables suivantes contiennent la valeur de l'en-tte de requte HTTP correspondant. La fonction - req permet d'extraire les valeurs des autres en-ttes.

    + req permet d'extraire les valeurs des autres + en-ttes. L'utilisation de ces variables peut provoquer + l'ajout du nom d'en-tte correspondant l'en-tte Vary de la + rponse HTTP, sauf spcification contraire pour la directive + qui accepte l'expression comme paramtre. La function req_novary permet de + modifier ce comportement.

    NameAlternative Description
    -in instring contained in string list
    string contained in wordlist
    /regexp/ m#regexp#Regular expression (the second form allows different delimiters than /)
    Regular expression (the second form allows different + delimiters than /)
    /regexp/i m#regexp#i Case insensitive regular expression
    - - - - - + + + + + +
    Nom
    HTTP_ACCEPT
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    HTTP_REFERER
    HTTP_USER_AGENT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    HTTP_REFERER
    HTTP_USER_AGENT

    Autres variables lies aux requtes

    @@ -154,7 +171,7 @@ listfunction ::= listfuncname "(" word ")"
    REQUEST_URI La partie chemin de l'URI de la requte
    DOCUMENT_URIIdem REQUEST_URI
    Idem REQUEST_URI
    REQUEST_FILENAME Le chemin complet dans le systme de fichiers local du fichier ou du script correspondant la requte, si le serveur @@ -188,7 +205,9 @@ listfunction ::= listfuncname "(" word ")"
    REMOTE_HOST Le nom d'hte de l'hte distant
    REMOTE_USERLe nom de l'utilisateur authentifi (s'il existe)
    Le nom de l'utilisateur authentifi, s'il existe (non + disponible l'intrieur d'un bloc <If + >)
    REMOTE_IDENT Le nom de l'utilisateur dfini par mod_ident
    SERVER_NAMELa valeur de la directive AuthType (par exemple "basic")
    CONTENT_TYPELe type de contenu de la rponse
    Le type de contenu de la rponse (non + disponible l'intrieur d'un bloc <If + >)
    HANDLER Le nom du gestionnaire qui a gnr la rponse
    HTTPS
    HTTP2"on" si la requte utilise http/2, + "off" dans le cas contraire
    HTTPS "on" si la requte utilise https, "off" dans le cas contraire
    IPV6
    IPV6 "on" si la connexion utilise IPv6, "off" dans le cas contraire
    REQUEST_STATUSLe code d'erreur HTTP de la requte
    REQUEST_LOG_ID
    REQUEST_STATUSLe code d'erreur HTTP de la requte (non + disponible l'intrieur d'un bloc <If + >)
    REQUEST_LOG_ID L'identifiant du message d'erreur associ la requte (voir la directive ErrorLogFormat)
    CONN_LOG_ID
    CONN_LOG_ID L'identifiant du message d'erreur associ la connexion (voir la directive ErrorLogFormat)
    CONN_REMOTE_ADDRL'adresse IP du correspondant pour la connexion (voir le module + mod_remoteip)
    CONTEXT_PREFIX
    CONTEXT_DOCUMENT_ROOT

    Variables diverses

    @@ -233,11 +266,11 @@ listfunction ::= listfuncname "(" word ")" TIME_YEAR L'anne courante (par exemple 2010) TIME_MON - Le mois courant (1, ..., 12) + Le mois courant (01, ..., 12) TIME_DAY - Le jour courant dans le mois + Le jour courant dans le mois (01, ...) TIME_HOUR - Les heures de la date courante (0, ..., + Les heures de la date courante (00, ..., 23) TIME_MIN Les minutes de la date courante @@ -339,7 +372,7 @@ listfunction ::= listfuncname "(" word ")" sensible la casse. Les modules peuvent fournir des oprateurs unaires supplmentaires.

    - +
    NomDescriptionRestreint
    - + + + - + - + - + - + - + - + - + - + @@ -402,38 +438,90 @@ listfunction ::= listfuncname "(" word ")"
    NomDescriptionRemarques particulires
    -d L'argument est trait comme un nom de fichier. Vrai si le fichier existe et correspond un @@ -351,37 +384,40 @@ listfunction ::= listfuncname "(" word ")" L'argument est trait comme un nom de fichier. Vrai si le fichier existe et correspond un fichier rgulieroui
    -L
    -sL'argument est trait comme un nom de fichier. Vrai si le + fichier existe et n'est pas videoui
    -L L'argument est trait comme un nom de fichier. Vrai si le fichier existe et correspond un lien symboliqueoui
    -h
    -h L'argument est trait comme un nom de fichier. Vrai si le fichier existe et correspond un lien symbolique (identique -L)oui
    -F
    -F Vrai si la chane correspond a un fichier valide, accessible avec tous les contrles d'accs configurs pour ce chemin. A cette fin, une sous-requte effectue la vrification, et vous devez utiliser ce drapeau avec soin car il peut impacter les performances de votre serveur !
    -U
    -U Vrai si la chane correspond a une URL valide, accessible avec tous les contrles d'accs configurs pour ce chemin. A cette fin, une sous-requte effectue la vrification, et vous devez utiliser ce drapeau avec soin car il peut impacter les performances de votre serveur !
    -A
    -A Alias pour -U
    -n
    -n Vrai si la chane n'est pas vide
    -z
    -z Vrai si la chane est vide
    -T
    -T Faux si la chane est vide, "0", "off", "false", ou "no" (insensibilit la casse). Vrai dans le cas contraire.
    -R
    -R Idem "%{REMOTE_ADDR} -ipmatch ...", en plus efficace
    - - + + + + - - - + + + - - - + + + - + reqenv, osenv + - + - + - + - - + + + + + + + + + + + + + pas ou ne correspond pas un fichier rgulier)
    NomDescriptionRestreint
    req, httpLit l'en-tte de requte HTTP
    respLit l'en-tte de requte HTTP ; les noms + d'en-tte correspondants peuvent tre ajouts + l'en-tte Vary, + voir ci-dessous
    req_novaryIdentique req, mais aucun nom d'en-tte n'est + ajout l'en-tte Vary
    resp Lit l'en-tte de rponse HTTP
    reqenvRecherche une variable d'environnement de requte
    osenv
    reqenvRecherche une variable d'environnement de requte (on + peut aussi utiliser le raccourci v).ordonnancement
    osenv Recherche une variable d'environnement du systme d'exploitation
    noteRecherche une note de requte
    env
    noteRecherche une note de requteordonnancement
    env Renvoie le premier rsultat positif de note, - reqenv, osenv
    tolowerordonnancement
    tolower Convertit une chane en minuscules
    toupper
    toupper Convertit une chane en majuscules
    escape
    escape Echappe les caractres spciaux en codage hexadcimal
    unescape
    unescape "Dschappe" les chanes codes en hexadcimal, en ne gardant encods que les slashes; renvoie la chane vide si la squence %00 est rencontre
    fileLit le contenu d'un fichieroui
    base64Encode la chane en base64
    unbase64Dcode les chanes codes en base64, renvoie une chane + tronque si le caractre 0x00 est rencontr
    md5Gnre un hash de la chane en utilisant MD5, puis code le + hash obtenu en hexadcimal
    sha1Gnre un hash de la chane en utilisant SHA1, puis encode + le hash obtenu en hexadcimal
    fileLit le contenu d'un fichier(fins de lignes incluses, si + elles existent)limit
    filemodRenvoie la date de dernire modification d'un fichier (ou 0 si le + fichier n'existe pas ou n'est pas un fichier rgulier)limit
    filesize Renvoie la taille d'un fichier (ou 0 si le fichier n'existe - pas ou ne correspond pas un fichier rgulier)oui
    limit
    -

    Les fonctions marques comme "restreints" ne sont pas disponibles - avec certains modules comme mod_include.

    +

    Les fonctions marques comme "limit" dans la dernire colonne ne sont + pas disponibles avec certains modules comme + mod_include.

    + +

    Les fonctions marques comme "ordonnancement" dans la dernire colonne + ncessitent une attention particulire pour l'ordonnancement des diffrents + composants du serveur, spcialement lorsque la fonction est utilise au sein + d'une directive <If> qui est + value relativement tt.

    +
    +

    Ordonnancement des variables d'environnement

    + Lorsque des variables d'environnement sont values au sein d'une directive + <If>, il est important de tenir + compte du moment o cette valuation intervient dans le traitement de la + requte. Par exemple, toute directive dfinie en dehors d'un contexte de + serveur virtuel (directory, location, htaccess) aura peu de chance d'tre + dj excute. Ainsi la directive SetEnvIf est une directive qui s'excute + avant cette valuation. +
    +
    + Lorsque reqenv est utilis en dehors de la directive + <If>, l'valuation survient en + gnral plus tard, mais le moment exact dpend de la directive dans laquelle + l'expression a t utilise. +
    + +

    Lorsque les fonctions req ou http sont + utilises, le nom d'en-tte sera automatiquement ajout l'en-tte + Vary de la rponse HTTP, sauf spcification contraire pour la + directive qui accepte l'expression comme paramtre. La + fonction req_novary permet d'empcher l'ajout de noms + d'en-ttes l'en-tte Vary.

    En plus des fonctions dont la valeur est une chane, il existe aussi des fonctions dont la valeur est une liste, qui acceptent une @@ -450,6 +538,70 @@ listfunction ::= listfuncname "(" word ")" dtails (notez que la fonction PeerExtList peut aussi tre utilise en dehors de la directive SSLRequire).

    +
    top
    +
    +

    Exemples d'expressions

    + + +

    Les exemples suivants montent comment utiliser les + expressions pour valuer les requtes :

    + +
    # Comparer le nom d'hte avec example.com et rediriger vers
    +# www.example.com si le nom d'hte correspond
    +<If "%{HTTP_HOST} == 'example.com'">
    +    Redirect permanent "/" "http://www.example.com/"
    +</If>
    +
    +# Forcer le type text/plain si un fichier fait l'objet d'une
    +# requte dont la chane de paramtres contient 'forcetext'
    +<If "%{QUERY_STRING} =~ /forcetext/">
    +    ForceType text/plain
    +</If>
    +
    +# N'autoriser l'accs  ce contenu que pendant les heures de
    +# travail
    +<Directory "/foo/bar/business">
    +     Require expr %{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17
    +</Directory>
    +
    +# Vrifie si un en-tte HTTP correspond  une des valeurs d'une liste
    +<If "%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }">
    +    La dfinition de l'en-tte correspond  une des valeurs recherches
    +</If>
    +
    +# Recherche la valeur d'une expression rationnelle dans une variable
    +# d'environnement, et renvoie la ngation du rsultat.
    +<If "! reqenv('REDIRECT_FOO') =~ /bar/">
    +    La condition est vrifie
    +</If>
    +
    +# Vrifie le rsultat de la recherche d'une correspondance d'URI dans un
    +# contexte de rpertoire avec l'option -f
    +<Directory "/var/www">
    +    AddEncoding x-gzip gz
    +<If "-f '%{REQUEST_FILENAME}.unzipme' && ! %{HTTP:Accept-Encoding} =~ /gzip/">
    +      SetOutputFilter INFLATE
    +</If>
    +</Directory>
    +
    +# Vrifie l'adresse IP du client
    +<If "-R '192.168.1.0/24'">
    +    Header set matched true
    +</If>
    +
    +# Exemple de fonction dans un contexte boolen
    +<If "md5('foo') == 'acbd18db4cc2f85cedef654fccc4a4d8'">
    +  Header set checksum-matched true
    +</If>
    +
    +# Function example in string context
    +Header set foo-checksum "expr=%{md5:foo}"
    +
    +# L'exemple suivant retarde l'valuation de la clause de condition par rapport 
    +# <If>
    +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~
    +m#^/special_path\.php$#"
    +
    top

    Autres

    @@ -458,7 +610,7 @@ listfunction ::= listfuncname "(" word ")" - + - + - + + (00, ..., 23) @@ -261,14 +304,16 @@ listfunction ::= listfuncname "(" word ")" - +
    NomAlternative Description
    -in inchane contenue dans une liste de chanes
    chane contenue dans une liste de mots
    /regexp/ m#regexp# Expression rationnelle (la seconde forme permet de spcifier @@ -489,11 +641,38 @@ listfunction ::= listfuncname "(" word ")" surcouche de la syntaxe de la directive obsolte SSLRequire. Vous pouvez consulter la liste de leur diffrences dans la documentation de la directive SSLRequire.

    +
    top
    +
    +

    Historique de version

    + +

    La fonction req_novary est + disponible partir de la version 2.4.4 du serveur HTTP Apache.

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 7726736f8da..2572beac7e0 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -25,34 +25,60 @@ Expressions in Apache HTTP Server -

    Historically, there are several syntax variants for expressions used to express - a condition in the different modules of the Apache HTTP Server. - There is some ongoing effort to only use a single variant, called ap_expr, - for all configuration directives. - This document describes the ap_expr expression parser. +

    Historically, there are several syntax variants for expressions + used to express a condition in the different modules of the Apache + HTTP Server. There is some ongoing effort to only use a single + variant, called ap_expr, for all configuration directives. + This document describes the ap_expr expression parser.

    The ap_expr expression is intended to replace most other - expression variants in HTTPD. For example, the deprecated - SSLRequire expressions can be - replaced by Require expr. -

    + expression variants in HTTPD. For example, the deprecated SSLRequire expressions can be replaced + by Require expr.

    If ElseIf Else +ErrorDocument +Alias +ScriptAlias +Redirect +AuthBasicFake +AuthFormLoginRequiredLocation +AuthFormLoginSuccessLocation +AuthFormLogoutLocation RewriteCond SetEnvIfExpr +Header +RequestHeader FilterProvider Require expr +Require ldap-user +Require ldap-group +Require ldap-dn +Require ldap-attribute +Require ldap-filter +Require dbd-group +Require dbm-group +Require group +Require host SSLRequire LogMessage mod_include
    - Grammar in Backus–Naur Form notation -

    Backus–Naur Form (BNF) is a notation - technique for context-free grammars, often used to describe the syntax of languages used in computing. + Grammar in Backus-Naur Form notation +

    Backus-Naur + Form (BNF) is a notation technique for context-free grammars, + often used to describe the syntax of languages used in computing. + In most cases, expressions are used to express boolean values. + For these, the starting point in the BNF is expr. + However, a few directives like LogMessage accept expressions + that evaluate to a string value. For those, the starting point in + the BNF is string.

    @@ -132,14 +158,20 @@ listfunction ::= listfuncname "(" word ")"
         %{REMOTE_USER} will not be set in this case.

    The following variables provide the values of the named HTTP request - headers. The values of other headers can be obtained witht the - req function.

    + headers. The values of other headers can be obtained with the + req function. Using these + variables may cause the header name to be added to the Vary + header of the HTTP response, except where otherwise noted for the + directive accepting the expression. The req_novary + function may be used to circumvent this + behavior.

    + @@ -162,7 +194,7 @@ listfunction ::= listfuncname "(" word ")" - + - + @@ -214,13 +246,17 @@ listfunction ::= listfuncname "(" word ")" - + - + + + @@ -228,13 +264,20 @@ listfunction ::= listfuncname "(" word ")" - + + + + + + +
    Name
    HTTP_ACCEPT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    REQUEST_URI The path part of the request's URI
    DOCUMENT_URISame as REQUEST_URI
    Same as REQUEST_URI
    REQUEST_FILENAME The full local filesystem path to the file or script matching the request, if this has already been determined by the server at the @@ -196,7 +228,7 @@ listfunction ::= listfuncname "(" word ")"
    REMOTE_HOST The host name of the remote host
    REMOTE_USERThe name of the authenticated user (if any)
    The name of the authenticated user, if any (not available during <If >)
    REMOTE_IDENT The user name set by mod_ident
    SERVER_NAMEThe DocumentRoot of the current vhost
    AUTH_TYPEThe configured AuthType - (e.g. "basic")
    The configured AuthType (e.g. + "basic")
    CONTENT_TYPEThe content type of the response
    The content type of the response (not available during <If >)
    HANDLER The name of the handler creating the response
    HTTP2"on" if the request uses http/2, + "off" otherwise
    HTTPS "on" if the request uses https, "off" otherwise
    "on" if the connection uses IPv6, "off" otherwise
    REQUEST_STATUSThe HTTP error status of the request
    The HTTP error status of the request (not available during <If >)
    REQUEST_LOG_ID The error log id of the request (see ErrorLogFormat)
    CONN_LOG_ID The error log id of the connection (see ErrorLogFormat)
    CONN_REMOTE_ADDRThe peer IP address of the connection (see the + mod_remoteip module)
    CONTEXT_PREFIX
    CONTEXT_DOCUMENT_ROOT
    @@ -247,12 +290,12 @@ listfunction ::= listfuncname "(" word ")"
    TIME_YEAR The current year (e.g. 2010)
    TIME_MONThe current month (1, ..., 12)
    The current month (01, ..., 12)
    TIME_DAYThe current day of the month
    The current day of the month (01, ...)
    TIME_HOUR The hour part of the current time - (0, ..., 23)
    TIME_MIN The minute part of the current time
    TIME_SECThe day of the week (starting with 0 for Sunday)
    TIMEThe date and time in the format 20101231235959
    The date and time in the format + 20101231235959
    SERVER_SOFTWARE The server version string
    API_VERSION The date of the API version (module magic number)
    -

    Some modules register additional variables, see e.g. mod_ssl.

    +

    Some modules register additional variables, see e.g. + mod_ssl.

    @@ -369,6 +414,9 @@ listfunction ::= listfuncname "(" word ")" -f The argument is treated as a filename. True if the file exists and is regular fileyes + -s + The argument is treated as a filename. + True if the file exists and is not emptyyes -L The argument is treated as a filename. True if the file exists and is symlinkyes @@ -397,7 +445,8 @@ listfunction ::= listfuncname "(" word ")" "false", or "no" (case insensitive). True otherwise. -R - Same as "%{REMOTE_ADDR} -ipmatch ...", but more efficient + Same as "%{REMOTE_ADDR} -ipmatch ...", but more + efficient @@ -413,47 +462,95 @@ listfunction ::= listfuncname "(" word ")" Modules may register additional functions.

    - + - + - + + + - + + - + + osenv - + + + + + + + + + - + + + + regular file)
    NameDescriptionRestricted
    NameDescriptionSpecial notes
    req, httpGet HTTP request header
    Get HTTP request header; header names may be added to the Vary + header, see below
    req_novarySame as req, but header names will not be added to the + Vary header
    resp Get HTTP response header
    reqenvLookup request environment variable
    Lookup request environment variable (as a shortcut, + v can also be used to access variables).ordering
    osenv Lookup operating system environment variable
    noteLookup request note
    Lookup request noteordering
    env Return first match of note, reqenv, - osenv
    ordering
    tolower Convert string to lower case
    toupperConvert string to uppser case
    Convert string to upper case
    escape Escape special characters in %hex encoding
    unescape Unescape %hex encoded string, leaving encoded slashes alone; return empty string if %00 is found
    base64Encode the string using base64 encoding
    unbase64Decode base64 encoded string, return truncated string if 0x00 is + found
    md5Hash the string using MD5, then encode the hash with hexadecimal + encoding
    sha1Hash the string using SHA1, then encode the hash with hexadecimal + encoding
    fileRead contents from a fileyes
    Read contents from a file (including line endings, when present) + restricted
    filemodReturn last modification time of a file (or 0 if file does not exist + or is not regular file)restricted
    filesize Return size of a file (or 0 if file does not exist or is not - regular file)yes
    restricted
    -

    The functions marked as "restricted" are not available in some modules - like mod_include.

    - -

    In addition to string-valued functions, there are also list-valued functions which - take one string as argument and return a wordlist, i.e. a list of strings. The wordlist - can be used with the special -in operator. - Functions names are not case sensitive. - Modules may register additional functions.

    +

    The functions marked as "restricted" in the final column are not + available in some modules like mod_include.

    + +

    The functions marked as "ordering" in the final column require some + consideration for the ordering of different components of the server, + especially when the function is used within the + <If> directive which is + evaluated relatively early.

    + + Environment variable ordering + When environment variables are looked up within an + <If> condition, it's important + to consider how extremely early in request processing that this + resolution occurs. As a guideline, any directive defined outside of virtual host + context (directory, location, htaccess) is not likely to have yet had a + chance to execute. SetEnvIf + in virtual host scope is one directive that runs prior to this resolution +
    +
    + When reqenv is used outside of <If>, the resolution will generally occur later, but the + exact timing depends on the directive the expression has been used within. +
    + +

    When the functions req or http are used, + the header name will automatically be added to the Vary header of the + HTTP response, except where otherwise noted for the directive accepting + the expression. The req_novary function can be used to + prevent names from being added to the Vary header.

    + +

    In addition to string-valued functions, there are also + list-valued functions which take one string as argument and return a + wordlist, i.e. a list of strings. The wordlist can be used with the + special -in operator. Functions names are not case + sensitive. Modules may register additional functions.

    There are no built-in list-valued functions. mod_ssl provides PeerExtList. See the description of @@ -463,6 +560,66 @@ listfunction ::= listfuncname "(" word ")" +

    + + Example expressions +

    The following examples show how expressions might be used to + evaluate requests:

    + + + +# Compare the host name to example.com and redirect to www.example.com if it matches +<If "%{HTTP_HOST} == 'example.com'"> + Redirect permanent "/" "http://www.example.com/" +</If> + +# Force text/plain if requesting a file with the query string contains 'forcetext' +<If "%{QUERY_STRING} =~ /forcetext/"> + ForceType text/plain +</If> + +# Only allow access to this content during business hours +<Directory "/foo/bar/business"> + Require expr %{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17 +</Directory> + +# Check a HTTP header for a list of values +<If "%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }"> + Header set matched true +</If> + +# Check an environment variable for a regular expression, negated. +<If "! reqenv('REDIRECT_FOO') =~ /bar/"> + Header set matched true +</If> + +# Check result of URI mapping by running in Directory context with -f +<Directory "/var/www"> + AddEncoding x-gzip gz +<If "-f '%{REQUEST_FILENAME}.unzipme' && ! %{HTTP:Accept-Encoding} =~ /gzip/"> + SetOutputFilter INFLATE +</If> +</Directory> + +# Check against the client IP +<If "-R '192.168.1.0/24'"> + Header set matched true +</If> + +# Function example in boolean context +<If "md5('foo') == 'acbd18db4cc2f85cedef654fccc4a4d8'"> + Header set checksum-matched true +</If> + +# Function example in string context +Header set foo-checksum "expr=%{md5:foo}" + +# This delays the evaluation of the condition clause compared to <If> +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path\.php$#" + + +
    +
    Other @@ -472,10 +629,11 @@ listfunction ::= listfuncname "(" word ")" NameAlternative Description -in in - string contained in string list + string contained in wordlist /regexp/ m#regexp# - Regular expression (the second form allows different delimiters than /) + Regular expression (the second form allows different + delimiters than /) /regexp/i m#regexp#i Case insensitive regular expression @@ -503,4 +661,10 @@ listfunction ::= listfuncname "(" word ")" module="mod_ssl">SSLRequire's documentation.

    +
    + Version History +

    The req_novary function + is available for versions 2.4.4 and later.

    +
    + diff --git a/docs/manual/expr.xml.fr b/docs/manual/expr.xml.fr index 7d0dbe0514b..3022eac1ead 100644 --- a/docs/manual/expr.xml.fr +++ b/docs/manual/expr.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -29,15 +29,15 @@

    Historiquement, il existe de nombreuses variantes dans la syntaxe des expressions permettant d'exprimer une condition dans les - différents modules du serveur HTTP Apache. À ce titre, des travaux sont - en cours pour n'utiliser qu'une seule variante nommée + différents modules du serveur HTTP Apache. À ce titre, des travaux sont + en cours pour n'utiliser qu'une seule variante nommée ap_expr, pour toutes les directives de configuration. Ce - document décrit l'interpréteur d'expressions ap_expr. + document décrit l'interpréteur d'expressions ap_expr.

    -

    Le type d'expression ap_expr est appelé à remplacer la +

    Le type d'expression ap_expr est appelé à remplacer la plupart des autres types d'expressions dans HTTPD. Par exemple, la - directive obsolète SSLRequire peut être remplacée par la + directive obsolète SSLRequire peut être remplacée par la directive Require expr.

    @@ -47,10 +47,29 @@ If ElseIf Else +ErrorDocument +Alias +ScriptAlias +Redirect +AuthBasicFake +AuthFormLoginRequiredLocation +AuthFormLoginSuccessLocation +AuthFormLogoutLocation RewriteCond SetEnvIfExpr +Header +RequestHeader FilterProvider Require expr +Require ldap-user +Require ldap-group +Require ldap-dn +Require ldap-attribute +Require ldap-filter +Require dbd-group +Require dbm-group +Require group +Require host SSLRequire LogMessage mod_include @@ -58,8 +77,15 @@
    Syntaxe en Forme de Backus-Naur

    La Forme de Backus-Naur - (souvent abrégée en BNF, de l'anglais Backus-Naur Form) est une notation permettant de décrire - les règles syntaxiques des langages de programmation. + (souvent abrégée en BNF, de l'anglais Backus-Naur Form) est une notation permettant de décrire + les règles syntaxiques des langages de programmation. En + général, les expressions représentent des valeurs booléennes. Dans + ce cas, le point de départ de la BNF est expr. + Cependant, certaines directives comme LogMessage utilisent comme + paramètres des expressions qui représentent des chaînes de + caractères. Dans ce cas, le point de départ de la BNF est + string.

    @@ -131,23 +157,30 @@ listfunction ::= listfuncname "(" word ")"
     
    Variables -

    L'interpréteur d'expressions fournit plusieurs variables de la +

    L'interpréteur d'expressions fournit plusieurs variables de la forme %{HTTP_HOST}. Notez que la valeur d'une variable - peut dépendre de la phase du traitement de la requête au cours de - laquelle elle est évaluée. Par exemple, une expression utilisée dans - une directive <If > sera évaluée avant - la phase d'authentification. Par conséquent, la variable - %{REMOTE_USER} ne sera pas encore définie à ce stade.

    - -

    Les variables suivantes contiennent la valeur de l'en-tête de - requête HTTP correspondant. La fonction - req permet d'extraire les valeurs des autres en-têtes.

    + peut dépendre de la phase du traitement de la requête au cours de + laquelle elle est évaluée. Par exemple, une expression utilisée dans + une directive <If > sera évaluée avant + la phase d'authentification. Par conséquent, la variable + %{REMOTE_USER} ne sera pas encore définie à ce stade.

    + +

    Les variables suivantes contiennent la valeur de l'en-tête de + requête HTTP correspondant. La fonction + req permet d'extraire les valeurs des autres + en-têtes. L'utilisation de ces variables peut provoquer + l'ajout du nom d'en-tête correspondant à l'en-tête Vary de la + réponse HTTP, sauf spécification contraire pour la directive + qui accepte l'expression comme paramètre. La function req_novary permet de + modifier ce comportement.

    + @@ -156,68 +189,70 @@ listfunction ::= listfuncname "(" word ")"
    Nom
    HTTP_ACCEPT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    -

    Autres variables liées aux requêtes

    +

    Autres variables liées aux requêtes

    - - + - + - + - + - + - - + - - + - + - - + - + - + - + - - + - + + généré la réponse + + - - + - - + + + + + +
    NomDescription
    REQUEST_METHODLa méthode HTTP de la requête entrante (par exemple + La méthode HTTP de la requête entrante (par exemple GET)
    REQUEST_SCHEMELe protocole associé à l'URI de la requête
    Le protocole associé à l'URI de la requête
    REQUEST_URILa partie chemin de l'URI de la requête
    La partie chemin de l'URI de la requête
    DOCUMENT_URIIdem REQUEST_URI
    Idem REQUEST_URI
    REQUEST_FILENAMELe chemin complet dans le système de fichiers local du - fichier ou du script correspondant à la requête, si le serveur - l'a dèjà déterminé à l'instant où REQUEST_FILENAME - est référencée. Dans le cas contraire, comme dans un - contexte de serveur virtuel, même valeur que REQUEST_URI
    Le chemin complet dans le système de fichiers local du + fichier ou du script correspondant à la requête, si le serveur + l'a dèjà déterminé à l'instant où REQUEST_FILENAME + est référencée. Dans le cas contraire, comme dans un + contexte de serveur virtuel, même valeur que REQUEST_URI
    SCRIPT_FILENAMEIdentique à REQUEST_FILENAME
    Identique à REQUEST_FILENAME
    LAST_MODIFIEDLa date et heure de dernière modification du fichier au - format 20101231235959, si elle est déjà connue du - serveur au moment où LAST_MODIFIED est référencé. + La date et heure de dernière modification du fichier au + format 20101231235959, si elle est déjà connue du + serveur au moment où LAST_MODIFIED est référencé.
    SCRIPT_USERLe nom d'utilisateur du propriétaire du script.
    Le nom d'utilisateur du propriétaire du script.
    SCRIPT_GROUP Le nom du groupe auquel appartient le script.
    PATH_INFOL'information relative au nom de chemin située en fin, voir + L'information relative au nom de chemin située en fin, voir la directive AcceptPathInfo
    QUERY_STRINGLa chaîne de paramètres de la requête courante
    La chaîne de paramètres de la requête courante
    IS_SUBREQ"true" si la requête courante est une - sous-requête, "false" dans le cas contraire
    "true" si la requête courante est une + sous-requête, "false" dans le cas contraire
    THE_REQUESTLa requête complète (par exemple "GET /index.html + La requête complète (par exemple "GET /index.html HTTP/1.1")
    REMOTE_ADDRL'adresse IP de l'hôte distant
    L'adresse IP de l'hôte distant
    REMOTE_HOSTLe nom d'hôte de l'hôte distant
    Le nom d'hôte de l'hôte distant
    REMOTE_USERLe nom de l'utilisateur authentifié (s'il existe)
    Le nom de l'utilisateur authentifié, s'il existe (non + disponible à l'intérieur d'un bloc <If + >)
    REMOTE_IDENTLe nom de l'utilisateur défini par mod_ident
    Le nom de l'utilisateur défini par mod_ident
    SERVER_NAME La valeur de la directive ServerName du serveur virtuel courant
    SERVER_PORTLe port associé au serveur virtuel courant ; voir la + Le port associé au serveur virtuel courant ; voir la directive ServerName
    SERVER_ADMIN La valeur de la directive ServerAdmin du serveur virtuel courant
    SERVER_PROTOCOLLe protocole utilisé par la requête
    Le protocole utilisé par la requête
    DOCUMENT_ROOT La valeur de la directive DocumentRoot du serveur virtuel @@ -227,26 +262,40 @@ listfunction ::= listfuncname "(" word ")" module="mod_authn_core">AuthType (par exemple "basic")
    CONTENT_TYPELe type de contenu de la réponse
    Le type de contenu de la réponse (non + disponible à l'intérieur d'un bloc <If + >)
    HANDLER Le nom du gestionnaire qui a - généré la réponse
    HTTP2"on" si la requête utilise http/2, + "off" dans le cas contraire
    HTTPS"on" si la requête utilise https, + "on" si la requête utilise https, "off" dans le cas contraire
    IPV6 "on" si la connexion utilise IPv6, "off" dans le cas contraire
    REQUEST_STATUSLe code d'erreur HTTP de la requête
    Le code d'erreur HTTP de la requête (non + disponible à l'intérieur d'un bloc <If + >)
    REQUEST_LOG_IDL'identifiant du message d'erreur associé à la requête (voir + L'identifiant du message d'erreur associé à la requête (voir la directive ErrorLogFormat)
    CONN_LOG_IDL'identifiant du message d'erreur associé à la connexion + L'identifiant du message d'erreur associé à la connexion (voir la directive ErrorLogFormat)
    CONN_REMOTE_ADDRL'adresse IP du correspondant pour la connexion (voir le module + mod_remoteip)
    CONTEXT_PREFIX
    CONTEXT_DOCUMENT_ROOT
    @@ -257,45 +306,45 @@ listfunction ::= listfuncname "(" word ")" NomDescription TIME_YEAR - L'année courante (par exemple 2010) + L'année courante (par exemple 2010) TIME_MON - Le mois courant (1, ..., 12) + Le mois courant (01, ..., 12) TIME_DAY - Le jour courant dans le mois + Le jour courant dans le mois (01, ...) TIME_HOUR - Les heures de la date courante (0, ..., + Les heures de la date courante (00, ..., 23) TIME_MIN Les minutes de la date courante TIME_SEC Les secondes de la date courante TIME_WDAY - Le jour de la semaine (à partir de 0 pour + Le jour de la semaine (à partir de 0 pour dimanche) TIME La date et heure au format 20101231235959 SERVER_SOFTWARE - La chaîne contenant la version du serveur + La chaîne contenant la version du serveur API_VERSION La date de la version de l'API (module magic number) -

    Certains modules, comme mod_ssl, définissent des - variables supplémentaires.

    +

    Certains modules, comme mod_ssl, définissent des + variables supplémentaires.

    - Opérateurs binaires + Opérateurs binaires -

    À l'exception de quelques opérateurs de comparaison internes, les - opérateurs binaires sont de la forme +

    À l'exception de quelques opérateurs de comparaison internes, les + opérateurs binaires sont de la forme "-[a-zA-Z][a-zA-Z0-9_]+", autrement dit un signe moins - et au moins deux caractères. Le nom est insensible à la casse. Les - modules peuvent fournir des opérateurs binaires supplémentaires.

    + et au moins deux caractères. Le nom est insensible à la casse. Les + modules peuvent fournir des opérateurs binaires supplémentaires.

    - Opérateurs de comparaison + Opérateurs de comparaison @@ -303,126 +352,129 @@ listfunction ::= listfuncname "(" word ")" - + - + - + - + - + - + - + - + - + - + - + - +
    NomAlternative Description
    == =Egalité de chaînes
    Egalité de chaînes
    != Inégalité de chaînes
    Inégalité de chaînes
    < Chaîne inférieure à
    Chaîne inférieure à
    <= Chaîne inférieure ou égale à
    Chaîne inférieure ou égale à
    > Chaîne supérieure à
    Chaîne supérieure à
    >= Chaîne supérieure ou égale à
    Chaîne supérieure ou égale à
    -eq eqEgalité d'entiers
    Egalité d'entiers
    -ne neInégalité d'entiers
    Inégalité d'entiers
    -lt ltEntier inférieur à
    Entier inférieur à
    -le leEntier inférieur ou égal à
    Entier inférieur ou égal à
    -gt gtEntier supérieur à
    Entier supérieur à
    -ge geEntier supérieur ou égal à
    Entier supérieur ou égal à
    - Autres opérateurs binaires + Autres opérateurs binaires - + - + - + + pris en compte par les caractères génériques
    NomDescription
    -ipmatchL'adresse IP correspond à adresse/masque
    L'adresse IP correspond à adresse/masque
    -strmatchla chaîne de gauche correspond au modèle constitué par la - chaîne de droite (contenant des caractères génériques *, ?, [])
    la chaîne de gauche correspond au modèle constitué par la + chaîne de droite (contenant des caractères génériques *, ?, [])
    -strcmatchidem -strmatch, mais insensible à la casse
    idem -strmatch, mais insensible à la casse
    -fnmatch idem -strmatch, mais les slashes ne sont pas - pris en compte par les caractères génériques
    - Opérateurs unaires + Opérateurs unaires -

    Les opérateurs unaires acceptent un seul argument et sont +

    Les opérateurs unaires acceptent un seul argument et sont de la forme "-[a-zA-Z]", - autrement dit le signe moins et un caractère. Le nom est - sensible à la casse. Les modules peuvent fournir des opérateurs - unaires supplémentaires.

    + autrement dit le signe moins et un caractère. Le nom est + sensible à la casse. Les modules peuvent fournir des opérateurs + unaires supplémentaires.

    - + - + - - + + + - - + - - - + - + - + (insensibilité à la casse). Vrai dans le cas contraire.
    NomDescriptionRestreint
    NomDescriptionRemarques particulières
    -dL'argument est traité comme un nom de fichier. - Vrai si le fichier existe et correspond à un - répertoireoui
    L'argument est traité comme un nom de fichier. + Vrai si le fichier existe et correspond à un + répertoireoui
    -eL'argument est traité comme un nom de fichier. Vrai si le + L'argument est traité comme un nom de fichier. Vrai si le fichier (ou dir ou special) existeoui
    -fL'argument est traité comme un nom de fichier. Vrai si le - fichier existe et correspond à un fichier - régulieroui
    L'argument est traité comme un nom de fichier. Vrai si le + fichier existe et correspond à un fichier + régulieroui
    -sL'argument est traité comme un nom de fichier. Vrai si le + fichier existe et n'est pas videoui
    -LL'argument est traité comme un nom de fichier. Vrai si le - fichier existe et correspond à un lien + L'argument est traité comme un nom de fichier. Vrai si le + fichier existe et correspond à un lien symboliqueoui
    -hL'argument est traité comme un nom de fichier. Vrai si le - fichier existe et correspond à un lien symbolique - (identique à -L)oui
    L'argument est traité comme un nom de fichier. Vrai si le + fichier existe et correspond à un lien symbolique + (identique à -L)oui
    -FVrai si la chaîne correspond a un fichier valide, accessible - avec tous les contrôles d'accès configurés pour ce chemin. A - cette fin, une sous-requête effectue la vérification, et vous + Vrai si la chaîne correspond a un fichier valide, accessible + avec tous les contrôles d'accès configurés pour ce chemin. A + cette fin, une sous-requête effectue la vérification, et vous devez utiliser ce drapeau avec soin car il peut impacter les performances de votre serveur !
    -UVrai si la chaîne correspond a une URL valide, accessible - avec tous les contrôles d'accès configurés pour ce chemin. A - cette fin, une sous-requête effectue la vérification, et vous + Vrai si la chaîne correspond a une URL valide, accessible + avec tous les contrôles d'accès configurés pour ce chemin. A + cette fin, une sous-requête effectue la vérification, et vous devez utiliser ce drapeau avec soin car il peut impacter les performances de votre serveur !
    -A Alias pour -U
    -nVrai si la chaîne n'est pas vide
    Vrai si la chaîne n'est pas vide
    -zVrai si la chaîne est vide
    Vrai si la chaîne est vide
    -TFaux si la chaîne est vide, "0", + Faux si la chaîne est vide, "0", "off", "false", ou "no" - (insensibilité à la casse). Vrai dans le cas contraire.
    -R Idem "%{REMOTE_ADDR} -ipmatch ...", en plus efficace
    -

    Les opérateurs marqués comme "restreints" ne sont pas disponibles +

    Les opérateurs marqués comme "restreints" ne sont pas disponibles avec certains modules comme mod_include.

    @@ -430,67 +482,185 @@ listfunction ::= listfuncname "(" word ")"
    Fonctions -

    Normalement, les fonctions dont la valeur est une chaîne acceptent une chaîne - comme argument et renvoient une chaîne. Les noms de fonctions sont - insensibles à la casse. Les modules peuvent fournir des fonctions - supplémentaires.

    +

    Normalement, les fonctions dont la valeur est une chaîne acceptent une chaîne + comme argument et renvoient une chaîne. Les noms de fonctions sont + insensibles à la casse. Les modules peuvent fournir des fonctions + supplémentaires.

    - + + + - + - + - - + - + - + - + - + - + + + + + + + + + - + + + + pas ou ne correspond pas à un fichier régulier)
    NomDescriptionRestreint
    req, httpLit l'en-tête de requête HTTP
    Lit l'en-tête de requête HTTP ; les noms + d'en-tête correspondants peuvent être ajoutés + à l'en-tête Vary, + voir ci-dessous
    req_novaryIdentique à req, mais aucun nom d'en-tête n'est + ajouté à l'en-tête Vary
    respLit l'en-tête de réponse HTTP
    Lit l'en-tête de réponse HTTP
    reqenvRecherche une variable d'environnement de requête
    Recherche une variable d'environnement de requête (on + peut aussi utiliser le raccourci v).ordonnancement
    osenvRecherche une variable d'environnement du système + Recherche une variable d'environnement du système d'exploitation
    noteRecherche une note de requête
    Recherche une note de requêteordonnancement
    envRenvoie le premier résultat positif de note, - reqenv, osenv
    Renvoie le premier résultat positif de note, + reqenv, osenvordonnancement
    tolowerConvertit une chaîne en minuscules
    Convertit une chaîne en minuscules
    toupperConvertit une chaîne en majuscules
    Convertit une chaîne en majuscules
    escapeEchappe les caractères spéciaux en codage hexadécimal
    Echappe les caractères spéciaux en codage hexadécimal
    unescape"Déséchappe" les chaînes codées - en hexadécimal, en ne gardant encodés que les slashes; renvoie la chaîne vide - si la séquence %00 est rencontrée
    "Déséchappe" les chaînes codées + en hexadécimal, en ne gardant encodés que les slashes; renvoie la chaîne vide + si la séquence %00 est rencontrée
    base64Encode la chaîne en base64
    unbase64Décode les chaînes codées en base64, renvoie une chaîne + tronquée si le caractère 0x00 est rencontré
    md5Génère un hash de la chaîne en utilisant MD5, puis code le + hash obtenu en hexadécimal
    sha1Génère un hash de la chaîne en utilisant SHA1, puis encode + le hash obtenu en hexadécimal
    fileLit le contenu d'un fichieroui
    Lit le contenu d'un fichier(fins de lignes incluses, si + elles existent)limité
    filemodRenvoie la date de dernière modification d'un fichier (ou 0 si le + fichier n'existe pas ou n'est pas un fichier régulier)limité
    filesize Renvoie la taille d'un fichier (ou 0 si le fichier n'existe - pas ou ne correspond pas à un fichier régulier)oui
    limité
    -

    Les fonctions marquées comme "restreints" ne sont pas disponibles - avec certains modules comme mod_include.

    - -

    En plus des fonctions dont la valeur est une chaîne, il existe +

    Les fonctions marquées comme "limité" dans la dernière colonne ne sont + pas disponibles avec certains modules comme + mod_include.

    + +

    Les fonctions marquées comme "ordonnancement" dans la dernière colonne + nécessitent une attention particulière pour l'ordonnancement des différents + composants du serveur, spécialement lorsque la fonction est utilisée au sein + d'une directive <If> qui est + évaluée relativement tôt.

    + + Ordonnancement des variables d'environnement + Lorsque des variables d'environnement sont évaluées au sein d'une directive + <If>, il est important de tenir + compte du moment où cette évaluation intervient dans le traitement de la + requête. Par exemple, toute directive définie en dehors d'un contexte de + serveur virtuel (directory, location, htaccess) aura peu de chance d'être + déjà exécutée. Ainsi la directive SetEnvIf est une directive qui s'exécute + avant cette évaluation. +
    +
    + Lorsque reqenv est utilisé en dehors de la directive + <If>, l'évaluation survient en + général plus tard, mais le moment exact dépend de la directive dans laquelle + l'expression a été utilisée. +
    + +

    Lorsque les fonctions req ou http sont + utilisées, le nom d'en-tête sera automatiquement ajouté à l'en-tête + Vary de la réponse HTTP, sauf spécification contraire pour la + directive qui accepte l'expression comme paramètre. La + fonction req_novary permet d'empêcher l'ajout de noms + d'en-têtes à l'en-tête Vary.

    + +

    En plus des fonctions dont la valeur est une chaîne, il existe aussi des fonctions dont la valeur est une liste, qui acceptent une - chaîne comme argument, et renvoient une liste de mots, autrement dit - une liste de chaînes. La liste de mot peut être utilisée avec - l'opérateur spécial -in. Les noms de fonctions sont - insensibles à la casse. Les modules peuvent fournir des fonctions - supplémentaires.

    + chaîne comme argument, et renvoient une liste de mots, autrement dit + une liste de chaînes. La liste de mot peut être utilisée avec + l'opérateur spécial -in. Les noms de fonctions sont + insensibles à la casse. Les modules peuvent fournir des fonctions + supplémentaires.

    Il n'existe pas de fonctions internes dont la valeur est une liste. Le module mod_ssl fournit la fonction PeerExtList. Voir la description de la directive SSLRequire pour plus de - détails (notez que la fonction PeerExtList peut aussi - être utilisée en dehors de la directive PeerExtList peut aussi + être utilisée en dehors de la directive SSLRequire).

    +
    + + Exemples d'expressions +

    Les exemples suivants montent comment utiliser les + expressions pour évaluer les requêtes :

    + + +# Comparer le nom d'hôte avec example.com et rediriger vers +# www.example.com si le nom d'hôte correspond +<If "%{HTTP_HOST} == 'example.com'"> + Redirect permanent "/" "http://www.example.com/" +</If> + +# Forcer le type text/plain si un fichier fait l'objet d'une +# requête dont la chaîne de paramètres contient 'forcetext' +<If "%{QUERY_STRING} =~ /forcetext/"> + ForceType text/plain +</If> + +# N'autoriser l'accès à ce contenu que pendant les heures de +# travail +<Directory "/foo/bar/business"> + Require expr %{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17 +</Directory> + +# Vérifie si un en-tête HTTP correspond à une des valeurs d'une liste +<If "%{HTTP:X-example-header} in { 'foo', 'bar', 'baz' }"> + La définition de l'en-tête correspond à une des valeurs recherchées +</If> + +# Recherche la valeur d'une expression rationnelle dans une variable +# d'environnement, et renvoie la négation du résultat. +<If "! reqenv('REDIRECT_FOO') =~ /bar/"> + La condition est vérifiée +</If> + +# Vérifie le résultat de la recherche d'une correspondance d'URI dans un +# contexte de répertoire avec l'option -f +<Directory "/var/www"> + AddEncoding x-gzip gz +<If "-f '%{REQUEST_FILENAME}.unzipme' && ! %{HTTP:Accept-Encoding} =~ /gzip/"> + SetOutputFilter INFLATE +</If> +</Directory> + +# Vérifie l'adresse IP du client +<If "-R '192.168.1.0/24'"> + Header set matched true +</If> + +# Exemple de fonction dans un contexte booléen +<If "md5('foo') == 'acbd18db4cc2f85cedef654fccc4a4d8'"> + Header set checksum-matched true +</If> + +# Function example in string context +Header set foo-checksum "expr=%{md5:foo}" + +# L'exemple suivant retarde l'évaluation de la clause de condition par rapport à +# <If> +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ +m#^/special_path\.php$#" + + +
    Autres @@ -501,27 +671,27 @@ listfunction ::= listfuncname "(" word ")" NomAlternative Description -in in - chaîne contenue dans une liste de chaînes + chaîne contenue dans une liste de mots /regexp/ m#regexp# - Expression rationnelle (la seconde forme permet de spécifier - des délimiteurs autres que /) + Expression rationnelle (la seconde forme permet de spécifier + des délimiteurs autres que /) /regexp/i m#regexp#i - Expression rationnelle insensible à la casse + Expression rationnelle insensible à la casse $0 ... $9 - Références arrières dans les expressions rationnelles + Références arrières dans les expressions rationnelles
    - Références arrières dans les expressions rationnelles -

    Les chaînes $0 ... $9 permettent de - référencer les groupes de capture en provenance d'expressions - rationnelles précédemment exécutées et mises en correspondance avec - succès. Elles ne peuvent normalement être utilisées que dans la - même expression que celle mise en correspondance, mais certains - modules permettent de les utiliser de manière spéciale.

    + Références arrières dans les expressions rationnelles +

    Les chaînes $0 ... $9 permettent de + référencer les groupes de capture en provenance d'expressions + rationnelles précédemment exécutées et mises en correspondance avec + succès. Elles ne peuvent normalement être utilisées que dans la + même expression que celle mise en correspondance, mais certains + modules permettent de les utiliser de manière spéciale.

    @@ -529,10 +699,16 @@ listfunction ::= listfuncname "(" word ")"
    Comparaison avec SSLRequire

    La syntaxe ap_expr consiste principalement en une - surcouche de la syntaxe de la directive obsolète SSLRequire. Vous pouvez consulter la - liste de leur différences dans la documentation de la directive + liste de leur différences dans la documentation de la directive SSLRequire.

    +
    + Historique de version +

    La fonction req_novary est + disponible à partir de la version 2.4.4 du serveur HTTP Apache.

    +
    + diff --git a/docs/manual/faq/index.html b/docs/manual/faq/index.html index 77d7eb5e927..d81080b7dfb 100644 --- a/docs/manual/faq/index.html +++ b/docs/manual/faq/index.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: index.html.es +Content-Language: es +Content-type: text/html; charset=ISO-8859-1 + URI: index.html.fr Content-Language: fr Content-type: text/html; charset=ISO-8859-1 @@ -12,6 +16,6 @@ Content-Language: tr Content-type: text/html; charset=UTF-8 -URI: index.html.zh-cn +URI: index.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/faq/index.html.en b/docs/manual/faq/index.html.en index fb721b10f09..95786a055e7 100644 --- a/docs/manual/faq/index.html.en +++ b/docs/manual/faq/index.html.en @@ -1,24 +1,30 @@ - -Frequently Asked Questions - Apache HTTP Server +Frequently Asked Questions - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Frequently Asked Questions

    +Apache > HTTP Server > Documentation > Version 2.4

    Frequently Asked Questions

    Available Languages:  en  | + es  |  fr  |  tr  |  zh-cn 

    @@ -30,10 +36,15 @@

    Available Languages:  en  | + es  |  fr  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/faq/index.html.es b/docs/manual/faq/index.html.es new file mode 100644 index 00000000000..37e19a62738 --- /dev/null +++ b/docs/manual/faq/index.html.es @@ -0,0 +1,50 @@ + + + + + +Preguntas Frecuentes - Servidor Apache HTTP Versin 2.4 + + + + + + + +
    <-
    +

    Preguntas Frecuentes

    +
    +

    Idiomas disponibles:  en  | + es  | + fr  | + tr  | + zh-cn 

    +
    + + +

    Las preguntas frecuentes se han movido a la Wiki de HTTP Server (en Ingls).

    +
    +
    +
    +

    Idiomas disponibles:  en  | + es  | + fr  | + tr  | + zh-cn 

    +
    + \ No newline at end of file diff --git a/docs/manual/faq/index.html.fr b/docs/manual/faq/index.html.fr index 093d5e6eae8..fc5c375e3b4 100644 --- a/docs/manual/faq/index.html.fr +++ b/docs/manual/faq/index.html.fr @@ -1,24 +1,30 @@ - -Foire aux questions - Serveur Apache HTTP +Foire aux questions - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Foire aux questions

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Foire aux questions

    Langues Disponibles:  en  | + es  |  fr  |  tr  |  zh-cn 

    @@ -30,10 +36,15 @@

    Langues Disponibles:  en  | + es  |  fr  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Autoris sous Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/faq/index.html.tr.utf8 b/docs/manual/faq/index.html.tr.utf8 index b56df3f434c..2ea8f9e760c 100644 --- a/docs/manual/faq/index.html.tr.utf8 +++ b/docs/manual/faq/index.html.tr.utf8 @@ -1,112 +1,50 @@ - -Sıkça Sorulan Sorular - Apache HTTP Sunucusu +Sıkça Sorulan Sorular - Apache HTTP Sunucusu Sürüm 2.4 - + + + - +
    <-

    Sıkça Sorulan Sorular

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Sıkça Sorulan Sorular

    Mevcut Diller:  en  | + es  |  fr  |  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    - -

    Bu belge geleneksel bir SSS’ten çok Apache HTTP Sunucusu ile ilgili - sorunlarla karşılaştığınızda ne yapacağınızı gösteren bir rehber - niteliğindedir.

    - -

    Daha geleneksel ama biraz eski tarihli bir SSS belgesi olarak Apache 1.3 - SSS’sine bakabilirsiniz.

    +

    SSS belgesi HTTP Server + Wiki'ye taşındı.

    +
    - -
    top
    -
    -

    “Neden ... yapamıyorum? Niçin ... çalışmıyor?” gibi sorular için

    - - -

    Apache sunucu yazılımınızla ilgili sorunlar yaşıyorsanız şu adımları izleyin:

    - -
    -
    Günlük kayıt dosyalarına bakın!
    -

    Apache sorunları saptamaya ve size yardımcı olmaya çalışır. Çoğu - durumda, günlük dosyalarına bir kaç ileti yazarak sunucu hataları için - size bazı ayrıntıları sağlayacaktır. Bu genellikle sorunun sizin - tarafınızdan teşhis edilmesi (dosya izinleri ve benzeri) ve düzeltilmesi - için yeterli olur. Hata kayıtlarının tutulduğu günlük dosyalarının - öntanımlı yeri /usr/local/apache2/logs/error_log olup - sizin sunucunuzdaki yeri için yapılandırma dosyalarınızdaki ErrorLog yönergesine bakabilirsiniz.

    - -

    Genellikle başvurulan ilk yerlerden biri olarak yolunuz yardımlaşma - listelerinden birine düşerse sizden ilk olarak biraz bilgi sağlamanız - istenecektir. Bu bakımdan hataların yazıldığı günlük kayıt dosyalarını - nerede bulacağınızı bilmelisiniz. Eğer yerlerinden emin değilseniz - kullandığınız dağıtıma göre dosyaların yerlerini gösteren - wiki - sayfası size fikir verebilir.

    - -
    Wiki’yi inceleyin
    -
    Httpd Wiki, çoğu sorunun - çözümüne yardımcı olacak kılavuzlar içerir.
    - -
    Apache hata ayıklama veritabanına bakın
    -
    Apache Grubuna bildirilen çoğu sorun hata ayıklama veritabanına - kaydedilir. Açık ya da kapalı, mevcut hata raporlarını incelemeden ve - sorununuz hakkında kullanıcı destek listelerine (aşağıya bakınız) danışmadan - lütfen yeni bir hata bildirimi yapmayın. Zaten raporlanmış - bir sorunsa bir “ben de” veya “+1” raporu eklemeyin.
    - -
    Bir kullanıcı destek listesine sorun
    -

    Apache, bilgilerini gönüllü olarak paylaşan etkin bir kullanıcı - topluluğuna sahiptir. Bu topluluğa katılarak sorularınıza ve sorunlarınıza - genellikle en iyi ve en hızlı yanıtı alırsınız.

    - -

    Apache kullanıcıları eposta listesi

    - -

    Kullanıcı desteği ile ilgili olarak Freenode IRC - üzerindeki #httpd kanalı da kullanılabilir.

    -
    - -
    Lütfen hata bildirimi için hata ayıklama veritabanını kullanın!
    -

    Eğer yukarıdaki adımlardan size uygun olanları izlemiş ve bir çare bulamamışsanız lütfen bir hata ayıklama bildiriminde - bulunarak httpd geliştiricilerini sorun hakkında bilgilendirin.

    - -

    Eğer sorununuz sunucunun çökmesine ve bir ‘core’ üretilmesine sebep oluyorsa - hatayı bildirirken lütfen (mümkünse) bir geriye - doğru hata izleme raporu ekleyin.

    -
    -
    -
    top
    -
    -

    Destek için kime başvurayım?

    -

    Milyonlarca kullanıcı ve altmıştan az gönüllü geliştirici ile Apache için kişisel - destek sağlayamıyoruz. Ücretsiz destek için yardımlaşma listelerine katılmanızı öneriyoruz - (yukarı bakınız).

    - -

    Profesyonel ve ticari Apache desteği almak için bu tür destekleri sunan şirketlere başvurunuz.

    -

    Mevcut Diller:  en  | + es  |  fr  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    +
    \ No newline at end of file diff --git a/docs/manual/faq/index.html.zh-cn b/docs/manual/faq/index.html.zh-cn.utf8 similarity index 65% rename from docs/manual/faq/index.html.zh-cn rename to docs/manual/faq/index.html.zh-cn.utf8 index eed4ed46e22..ba7aaf40d23 100644 --- a/docs/manual/faq/index.html.zh-cn +++ b/docs/manual/faq/index.html.zh-cn.utf8 @@ -1,24 +1,30 @@ - -常见问题 - Apache HTTP 服务器 +常见问题 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    常见问题

    可用语言:  en  | + es  |  fr  |  tr  |  zh-cn 

    @@ -29,10 +35,15 @@

    可用语言:  en  | + es  |  fr  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/faq/index.xml.es b/docs/manual/faq/index.xml.es new file mode 100644 index 00000000000..51e3cce1088 --- /dev/null +++ b/docs/manual/faq/index.xml.es @@ -0,0 +1,34 @@ + + + + + + + + + + +Preguntas Frecuentes + + + +

    Las preguntas frecuentes se han movido a la Wiki de HTTP Server (en Inglés).

    +
    + +
    diff --git a/docs/manual/faq/index.xml.fr b/docs/manual/faq/index.xml.fr index a3fc2d03efa..bbcf7c2db2a 100644 --- a/docs/manual/faq/index.xml.fr +++ b/docs/manual/faq/index.xml.fr @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/faq/index.xml.meta b/docs/manual/faq/index.xml.meta index 737c3c80f20..7e9d94d260b 100644 --- a/docs/manual/faq/index.xml.meta +++ b/docs/manual/faq/index.xml.meta @@ -8,8 +8,9 @@ en + es fr - tr + tr zh-cn diff --git a/docs/manual/faq/index.xml.tr b/docs/manual/faq/index.xml.tr index 4660b1cef32..33d3636c964 100644 --- a/docs/manual/faq/index.xml.tr +++ b/docs/manual/faq/index.xml.tr @@ -1,7 +1,7 @@ - + -Filters - Apache HTTP Server +Filters - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Filters

    Available Languages:  en  |  es  | @@ -32,7 +37,7 @@

  • Smart Filtering
  • Exposing Filters as an HTTP Service
  • Using Filters
  • -
    +

    See also

    top

    Filtering in Apache 2

    @@ -152,7 +157,28 @@ but deprecated. Use dynamic configuration instead.

     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.html.es b/docs/manual/filter.html.es index 08fcb5c7f8f..4cb38dc7795 100644 --- a/docs/manual/filter.html.es +++ b/docs/manual/filter.html.es @@ -1,22 +1,27 @@ - -Filtros - Servidor HTTP Apache +Filtros - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Filtros

    Idiomas disponibles:  en  |  es  | @@ -77,7 +82,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.html.fr b/docs/manual/filter.html.fr index 738193a5f3c..f20e6ebea3e 100644 --- a/docs/manual/filter.html.fr +++ b/docs/manual/filter.html.fr @@ -1,22 +1,27 @@ - -Filtres - Serveur Apache HTTP +Filtres - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    top

    Le filtrage avec Apache 2

    @@ -43,7 +48,8 @@ et permet aux applications de traiter les donnes en entre et en sortie d'une manire hautement flexible et configurable, quelle que soit la provenance de ces donnes. Il est possible de pr-traiter les donnes -en entre, et post-traiter les donnes en sortie, comme souhait. +en entre, et post-traiter les donnes en sortie, selon +vos souhaits. Ces traitements sont tout fait indpendants des traditionnelles phases de traitement des requtes.

    @@ -110,10 +116,11 @@ le document texte n'est pas d

    Prsentation des filtres en tant que service HTTP

    -

    Les filtres permettent de traiter les contenus en provenance du -serveur. Le module mod_reflector permet aussi -d'utiliser les filtres pour traiter les contenus en provenance du -client.

    +

    Les filtres permettent de traiter les requtes des clients avant +traitement par le serveur, ainsi que les contenus issus du serveur avant de les renvoyer +au client. Le module mod_reflector permet aussi +d'utiliser les filtres pour traiter les requtes des clients avant de +les renvoyer directement ces derniers.

    Le module mod_reflector reoit les requtes POST des clients, et en rpercute le corps dans la requte POST constituant la @@ -168,7 +175,28 @@ configuration dynamique  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.html.ja.utf8 b/docs/manual/filter.html.ja.utf8 index 22039b78a2c..f7311676511 100644 --- a/docs/manual/filter.html.ja.utf8 +++ b/docs/manual/filter.html.ja.utf8 @@ -1,33 +1,39 @@ - -フィルタ - Apache HTTP サーバ +フィルタ - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    フィルタ

    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache でのフィルタの使い方について記述しています。

    @@ -73,13 +79,34 @@ 外部プログラムをフィルタとして指定することができます。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.html.ko.euc-kr b/docs/manual/filter.html.ko.euc-kr index deb452427e3..a4b6f3b30d0 100644 --- a/docs/manual/filter.html.ko.euc-kr +++ b/docs/manual/filter.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  en  |  es  | @@ -76,7 +81,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.html.tr.utf8 b/docs/manual/filter.html.tr.utf8 index c6722b7ecdb..81e8999b2bd 100644 --- a/docs/manual/filter.html.tr.utf8 +++ b/docs/manual/filter.html.tr.utf8 @@ -1,22 +1,27 @@ - -Süzgeçler - Apache HTTP Sunucusu +Süzgeçler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Süzgeçler

    Mevcut Diller:  en  |  es  | @@ -25,18 +30,18 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belge, Apache’de süzgeç kullanımı hakkındadır.

    +

    Ayrıca bakınız:

    top
    top
    +

    Süzgeçleri bir HTTP Hizmeti gibi göstermek

    + +

    Süzgeçler, istemciden kaynaklanan içeriği işlemekte kullanılabileceği + gibi mod_reflector modülü kullanılarak sunucudan + kaynaklanan içeriği işlemekte de kullanılabilir.

    + +

    mod_reflector istemcilerden gelen POST isteklerini + kabul eder ve çıktı süzgeç yığıtı yoluyla istemciye aktararak, POST + isteği içinde alınan içerik istek gövdesini yanıt içinde geri + gönderir.

    + +

    Bu teknik, bir çıktı süzgeciyle istek gövdesinde gerekli dönüşümün + sağlandığı durumda, bir uygulama sunucusu yığıtı içinde çalışan bir http + hizmetinin yerine de kullanılabilir. Örneğin, + mod_deflate modülü genel bir sıkıştırma hizmeti + sağlamakta kullanılabilir veya bir resim dönüştürme süzgeci bir resim + dönüşüm hizmeti haline getirilebilir.

    + +
    top
    +

    Süzgeçlerin Kullanımı

    Süzgeçler iki şekilde kullanılır: Basit ve Devingen. Genelde ikisinden biri kullanılır; karışık kullanılırsa istenmeyen @@ -132,7 +157,7 @@ FilterProvider.

    AddOutputFilterByType yönergesi - hala desteklenmekteyse de sorun çıkarabilmesi sebebiyle kullanımı artık + hala desteklenmekteyse de kullanımı artık önerilmemektedir. Onun yerine devingen yapılandırma kullanınız.

    @@ -143,7 +168,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/filter.xml.es b/docs/manual/filter.xml.es index 15c98cc4612..fe4d5f74217 100644 --- a/docs/manual/filter.xml.es +++ b/docs/manual/filter.xml.es @@ -1,7 +1,7 @@ - + - + + + + +Getting Started - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    Getting Started

    +
    +

    Available Languages:  en  | + fr 

    +
    + +

    If you're completely new to the Apache HTTP Server, or even to running +a website at all, you might not know where to start, or what questions to +ask. This document walks you through the basics.

    +
    + +
    top
    +
    +

    Clients, Servers, and URLs

    + + +

    +Addresses on the Web are expressed with URLs - Uniform Resource Locators +- which specify a protocol (e.g. http), a servername (e.g. +www.apache.org), a URL-path (e.g. +/docs/current/getting-started.html), and possibly a query +string (e.g. ?arg=value) used to pass additional +arguments to the server. +

    + +

    A client (e.g., a web browser) connects to a server (e.g., your Apache HTTP Server), +with the specified protocol, and makes a request for a resource using the +URL-path.

    + +

    The URL-path may represent any number of things on the server. It may +be a file (like getting-started.html) a handler (like server-status) or some kind of program +file (like index.php). We'll discuss this more below in +the Web Site Content section.

    + +

    +The server will send a response consisting of a status +code and, optionally, a response body. +The status code indicates whether the request was successful, and, if not, what +kind of error condition there was. This tells the client what it should +do with the response. You can read about the possible response codes in +HTTP Server +wiki.

    + +

    Details of the transaction, and any error conditions, are written to +log files. This is discussed in greater detail below in the Logs Files and Troubleshooting section.

    + +
    top
    +
    +

    Hostnames and DNS

    + + +

    In order to connect to a server, the client will first have to resolve +the servername to an IP address - the location on the Internet where the +server resides. Thus, in order for your web server to be reachable, it +is necessary that the servername be in DNS.

    + +

    If you don't know how to do this, you'll need to contact your network +administrator, or Internet service provider, to perform this step for +you.

    + +

    More than one hostname may point to the same IP address, and more +than one IP address can be attached to the same physical server. Thus, you +can run more than one web site on the same physical server, using a +feature called virtual hosts.

    + +

    If you are testing a server that is not Internet-accessible, you +can put host names in your hosts file in order to do local resolution. +For example, you might want to put a record in your hosts file to map a +request for www.example.com to your local system, for +testing purposes. This entry would look like:

    + +

    +127.0.0.1 www.example.com +

    + +

    A hosts file will probably be located at /etc/hosts or +C:\Windows\system32\drivers\etc\hosts.

    + +

    You can read more about the hosts file at Wikipedia.org/wiki/Hosts_(file), and +more about DNS at Wikipedia.org/wiki/Domain_Name_System.

    +
    top
    +
    +

    Configuration Files and Directives

    + + +

    The Apache HTTP Server is configured via simple text files. +These files may be located any of a variety of places, depending on how +exactly you installed the server. Common locations for these files may +be found in +the httpd wiki. If you installed httpd from source, the default +location of the configuration files is +/usr/local/apache2/conf. The default configuration file is +usually called httpd.conf. This, too, can vary in +third-party distributions of the server.

    + +

    The configuration is frequently broken into multiple smaller files, +for ease of management. These files are loaded via the Include directive. The names or locations of +these sub-files are not magical, and may vary greatly from one +installation to another. Arrange and subdivide these files as +makes the most sense to you. If the file arrangement +you have by default doesn't make sense to you, feel free to rearrange it.

    + +

    The server is configured by placing configuration directives in these +configuration files. A directive is a keyword followed by one or more +arguments that set its value.

    + +

    The question of "Where should I put that +directive?" is generally answered by considering where you want a +directive to be effective. If it is a global setting, it should appear +in the configuration file, outside of any <Directory>, <Location>, <VirtualHost>, or other section. If it is to +apply only to a particular directory, then it should go inside a +<Directory> section referring to +that directory, and so on. See the Configuration +Sections document for further discussion of these sections.

    + +

    In addition to the main configuration files, certain directives may go in +.htaccess files located in the content directories. +.htaccess files are primarily for people who do not have +access to the main server configuration file(s). You can read more about +.htaccess files in the .htaccess howto.

    + +
    top
    +
    +

    Web Site Content

    + + +

    Web site content can take many different forms, but may be broadly +divided into static and dynamic content.

    + +

    Static content is things like HTML files, image files, CSS files, +and other files that reside in the filesystem. The DocumentRoot directive specifies where in your +filesystem you should place these files. This directive is either set +globally, or per virtual host. Look in your configuration file(s) to +determine how this is set for your server.

    + +

    Typically, a document called index.html will be served +when a directory is requested without a file name being specified. For +example, if DocumentRoot is set to +/var/www/html and a request is made for +http://www.example.com/work/, the file +/var/www/html/work/index.html will be served to the +client.

    + +

    Dynamic content is anything that is generated at request +time, and may change from one request to another. There are numerous +ways that dynamic content may be generated. Various handlers are available to generate content. CGI programs may be written to generate +content for your site.

    + +

    Third-party modules like mod_php may be used to write code that does a +variety of things. Many third-party applications, written using a +variety of languages and tools, are available for download and +installation on your Apache HTTP Server. Support of these third-party +things is beyond the scope of this documentation, and you should find +their documentation or other support forums to answer your questions +about them.

    +
    top
    +
    +

    Log Files and Troubleshooting

    + +

    As an Apache HTTP Server administrator, your most valuable assets are +the log files, and, in particular, the error log. Troubleshooting any +problem without the error log is like driving with your eyes closed.

    + +

    The location of the error log is defined by the ErrorLog directive, which may be set globally, +or per virtual host. Entries in the error log tell you what went wrong, +and when. They often also tell you how to fix it. Each error log message +contains an error code, which you can search for online for even more +detailed descriptions of how to address the problem. You can also +configure your error log to contain a log ID which you can then +correlate to an access log entry, so that you can determine what request +caused the error condition.

    + +

    You can read more about logging in the logs +documentation.

    +
    top
    +
    +

    What's next?

    + + +

    Once you have the prerequisites under your belt, it's time to move +on.

    + +

    This document covers only the bare basics. We hope that this gets you +started, but there are many other things that you might need to +know.

    + + + +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/getting-started.html.fr b/docs/manual/getting-started.html.fr new file mode 100644 index 00000000000..482f5eca3a6 --- /dev/null +++ b/docs/manual/getting-started.html.fr @@ -0,0 +1,276 @@ + + + + + +Pour dmarrer - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Pour dmarrer

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + +

    Si vous ne connaissez rien au serveur HTTP Apache, ou mme au +fonctionnement d'un site web, vous vous demandez probablement par o +commencer et quelles questions poser. Ce document vous permettra de +parcourir les bases du sujet.

    +
    + +
    top
    +
    +

    Clients, serveurs et URLs

    + + +

    +Les adresses des pages web sur la Toile se prsentent sous forme d'URLs +- Uniform Resource Locators - qui comportent un protocole (par + exemple http), un nom de serveur (par exemple + www.apache.org), un chemin (par exemple + /docs/current/getting-started.html), et le cas chant + une chane de requte (query string) (par exemple ?arg=value) + permettant de transmettre des informations supplmentaires au serveur. +

    + +

    Un client (par exemple un navigateur web) se connecte un serveur +(par exemple votre serveur HTTP Apache) avec un protocole spcifique, et +effectue une requte pour une ressource en spcifiant +son chemin.

    + +

    Un chemin peut reprsenter plusieurs types de ressources sur le +serveur. Ce peut tre un fichier (comme +getting-started.html), un gestionnaire (comme server-status), ou toute sorte de +programme (comme index.php). Nous dcrirons tout ceci plus +en dtails ci-dessous dans la section Contenu d'un +site web.

    + +

    +Le serveur envoie alors une rponse comportant un code +d'tat, et ventuellement un corps de rponse. Le code d'tat indique si +la requte a t traite avec succs, ou dans la ngative quel type +d'erreur a t rencontr. Le client est alors sens savoir quoi faire de +la rponse. Vous pouvez vous familiariser avec les diffrents codes +d'tat en consultant le Wiki du +serveur HTTP Apache.

    + +

    Les dtails de la transaction, ainsi que les erreurs rencontres, +sont enregistrs dans des fichiers journaux. Tout ceci est dcrit en +dtails ci-dessous dans la section Dbogage et fichiers +journaux.

    + +
    top
    +
    +

    Noms d'hte et DNS

    + + +

    Pour se connecter un serveur, le client doit tout d'abord rsoudre +le nom du serveur en adresse IP, cette dernire permettant de localiser +le serveur sur Internet. Ainsi, pour que votre serveur web soit +accessible, son nom doit tre enregistr dans le DNS.

    + +

    Si vous ne savez pas comment effectuer cet enregistrement, vous +devrez contacter votre administrateur rseau ou votre fournisseur +d'accs Internet afin qu'il effectue cette opration pour vous.

    + +

    Plusieurs noms d'hte peuvent pointer vers la mme adresse IP, et +plusieurs adresses IP peuvent tre attaches au mme serveur physique. +Vous pouvez ainsi hberger plusieurs serveurs web sur le mme serveur +physique grce au mcanisme des serveurs virtuels.

    + +

    Pour tester un serveur non encore accessible sur Internet, vous +pouvez renseigner son nom d'hte dans votre fichier hosts afin +d'effectuer une rsolution de nom locale. Par exemple, pour tester le +serveur web www.example.com depuis le serveur physique qui +l'hberge, vous pouvez ajouter la ligne suivante au fichier hosts de ce +dernier :

    + +

    +127.0.0.1 www.example.com +

    + +

    En gnral, le fichier hosts se trouve dans le rpertoire +/etc sur les systmes de style Unix, ou +C:\Windows\system32\drivers\etc sous Windows.

    + +

    Vous trouverez plus de dtails propos du fichier hosts Wikipedia.org/wiki/Hosts_(file), +et propos du DNS Wikipedia.org/wiki/Domain_Name_System.

    +
    top
    +
    +

    Fichiers de configuration et directives

    + + +

    La configuration du serveur HTTP Apache s'effectue via de simples +fichiers textes. Ces fichiers peuvent se trouver dans de nombreux +endroits diffrents en fonction du mode d'installation du serveur. Vous +trouverez les positions courantes de ces fichiers dans le wiki httpd. +Si vous installez httpd depuis le code source, le rpertoire par dfaut +des fichiers de configuration est /usr/local/apache2/conf. +Le nom du fichier de configuration par dfaut est en gnral +httpd.conf, mais peut aussi varier en fonction des +distributions tierces du serveur.

    + +

    L'ensemble de la configuration est en gnral divis en plusieurs +fichiers afin d'en faciliter la gestion. Ces fichiers sont inclus dans +le fichier de configuration principal via la directive Include. Les noms ou positions de ces fichiers +ne sont pas figs et peuvent varier considrablement d'une distribution + l'autre. N'hsitez pas les arranger et subdiviser selon +vos gots et besoins, quitte en modifier +l'organisation par dfaut.

    + +

    La configuration du serveur s'effectue via des directives de configuration que l'on +insre dans les fichiers de configuration. Une directive se compose d'un +mot-cl suivi d'un ou plusieurs arguments qui dfinissent sa valeur.

    + +

    La rponse la question "O dois-je placer cette directive +?" dpend en gnral du niveau auquel cette directive doit tre +prise en compte. S'il s'agit du niveau global, elle doit tre place +dans le fichier de configuration principal, et en dehors de toute +section <Directory>, <Location>, <VirtualHost>, ou de toute autre section. Si +par exemple elle ne doit s'appliquer qu' un rpertoire particulier, +elle doit tre place dans la section <Directory> qui fait rfrence ce rpertoire. +Voir la documentation sur les Sections de +configuration pour plus de dtails.

    + +

    En complment des fichiers de configuration principaux, certaines +directives peuvent tre insres dans des fichiers +.htaccess que l'on place directement dans le rpertoire +concern. Les fichiers .htaccess sont essentiellement +destins aux personnes qui n'ont pas accs aux fichiers de configuration +du serveur. Vous trouverez plus de dtails propos des fichiers +.htaccess dans ce .htaccesshowto.

    + +
    top
    +
    +

    Contenu du site web

    + + +

    Si le contenu du site web peut se prsenter sous de nombreuses +formes, il peut en gnral tre scind en deux formes principales : les +contenus statiques et les contenus dynamiques.

    + +

    Les contenus statiques sont par exemple les fichiers HTML, les +images, les fichiers CSS et tout autre fichier rsidant dans le systme +de fichiers. La directive DocumentRoot permet de dfinir la position +dans l'arborescence du site o vous devez placer ces fichiers. Cette +directive peut tre dfinie au niveau global, ou au niveau de chaque +serveur virtuel. Vous pouvez consulter vos fichiers de configuration +pour vrifier la manire dont cette directive est dfinie pour votre +serveur.

    + +

    En gnral, et si aucun nom de fichier n'est spcifi dans la +requte, c'est une page de nom index.html qui sera +renvoye. Par exemple, si la directive DocumentRoot est +dfinie /var/www/html, et si une requte est effectue +pour l'adresse http://www.example.com/work/, c'est le +fichier /var/www/html/work/index.html qui sera envoy au +client par le serveur.

    + +

    Un contenu dynamique est un contenu qui est gnr au moment du +traitement de la requte, et qui peut diffrer d'une requte l'autre. +Ces contenus dynamiques peuvent tre gnrs de nombreuses manires par +l'intermdiaire de gestionnaires de contenu +ou "handlers". Il est aussi possible de crer des programmes CGI pour gnrer le contenu de +votre site.

    + +

    Enfin, on peut utiliser des modules tiers comme mod_php pour crire +du code permettant d'effectuer de nombreuses choses. De nombreuses +applications tierces crites partir de divers langages ou outils sont +disponibles en tlchargement et peuvent tre installes sur votre +serveur HTTP Apache. Le support de ces applications dpasse le sujet de +ce document, et nous vous invitons consulter le site de leur diteur +pour accder leur documentation.

    +
    top
    +
    +

    Fichiers journaux et rsolution des problmes

    + +

    En tant qu'administrateur d'un serveur HTTP Apache, vos sources +d'informations principales sont les fichiers journaux, et en particulier +le journal des erreurs. Toute tentative de rsolution d'un problme sans +consulter le journal des erreurs revient conduire les yeux ferms.

    + +

    La position dans le systme de fichiers du journal des erreurs est +spcifie par la directive ErrorLog +qui peut tre dfinie au niveau global, ou au niveau de chaque serveur +virtuel. Chaque entre du journal des erreurs vous informe sur la nature +des problmes et le moment de leur survenue. En outre, elle vous indique +souvent comment rsoudre le problme. Chaque message d'erreur contient +un code d'erreur que vous pouvez utiliser pour effectuer une recherche +en ligne afin d'obtenir une description plus dtaille de la manire de +rsoudre le problme. Vous pouvez aussi configurer votre journal des +erreurs de manire ce qu'il enregistre un identifiant d'erreur que +vous pourrez ensuite utiliser pour effectuer une corrlation avec le +journal des accs afin de dterminer quelle requte est l'origine de +l'erreur.

    + +

    Vous trouverez plus de dtails ce sujet dans la Documentation sur la journalisation.

    +
    top
    +
    +

    Et maintenant, quelle est la suite des oprations ?

    + + +

    La question des prrequis tant rgle, il est temps de passer aux +choses srieuses.

    + +

    Ce document ne couvre que les notions de base. Nous esprons qu'il +vous permettra de mettre le pied l'trier, mais il y a encore de +nombreuses choses que vous devez savoir.

    + + + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/getting-started.xml b/docs/manual/getting-started.xml new file mode 100644 index 00000000000..d9a99dcd342 --- /dev/null +++ b/docs/manual/getting-started.xml @@ -0,0 +1,230 @@ + + + + + + + + + + Getting Started + + +

    If you're completely new to the Apache HTTP Server, or even to running +a website at all, you might not know where to start, or what questions to +ask. This document walks you through the basics.

    +
    + +
    +Clients, Servers, and URLs + +

    +Addresses on the Web are expressed with URLs - Uniform Resource Locators +- which specify a protocol (e.g. http), a servername (e.g. +www.apache.org), a URL-path (e.g. +/docs/current/getting-started.html), and possibly a query +string (e.g. ?arg=value) used to pass additional +arguments to the server. +

    + +

    A client (e.g., a web browser) connects to a server (e.g., your Apache HTTP Server), +with the specified protocol, and makes a request for a resource using the +URL-path.

    + +

    The URL-path may represent any number of things on the server. It may +be a file (like getting-started.html) a handler (like server-status) or some kind of program +file (like index.php). We'll discuss this more below in +the Web Site Content section.

    + +

    +The server will send a response consisting of a status +code and, optionally, a response body. +The status code indicates whether the request was successful, and, if not, what +kind of error condition there was. This tells the client what it should +do with the response. You can read about the possible response codes in +HTTP Server +wiki.

    + +

    Details of the transaction, and any error conditions, are written to +log files. This is discussed in greater detail below in the Logs Files and Troubleshooting section.

    + +
    + +
    +Hostnames and DNS + +

    In order to connect to a server, the client will first have to resolve +the servername to an IP address - the location on the Internet where the +server resides. Thus, in order for your web server to be reachable, it +is necessary that the servername be in DNS.

    + +

    If you don't know how to do this, you'll need to contact your network +administrator, or Internet service provider, to perform this step for +you.

    + +

    More than one hostname may point to the same IP address, and more +than one IP address can be attached to the same physical server. Thus, you +can run more than one web site on the same physical server, using a +feature called virtual hosts.

    + +

    If you are testing a server that is not Internet-accessible, you +can put host names in your hosts file in order to do local resolution. +For example, you might want to put a record in your hosts file to map a +request for www.example.com to your local system, for +testing purposes. This entry would look like:

    + + +127.0.0.1 www.example.com + + +

    A hosts file will probably be located at /etc/hosts or +C:\Windows\system32\drivers\etc\hosts.

    + +

    You can read more about the hosts file at Wikipedia.org/wiki/Hosts_(file), and +more about DNS at Wikipedia.org/wiki/Domain_Name_System.

    +
    + +
    +Configuration Files and Directives + +

    The Apache HTTP Server is configured via simple text files. +These files may be located any of a variety of places, depending on how +exactly you installed the server. Common locations for these files may +be found in +the httpd wiki. If you installed httpd from source, the default +location of the configuration files is +/usr/local/apache2/conf. The default configuration file is +usually called httpd.conf. This, too, can vary in +third-party distributions of the server.

    + +

    The configuration is frequently broken into multiple smaller files, +for ease of management. These files are loaded via the Include directive. The names or locations of +these sub-files are not magical, and may vary greatly from one +installation to another. Arrange and subdivide these files as +makes the most sense to you. If the file arrangement +you have by default doesn't make sense to you, feel free to rearrange it.

    + +

    The server is configured by placing configuration directives in these +configuration files. A directive is a keyword followed by one or more +arguments that set its value.

    + +

    The question of "Where should I put that +directive?" is generally answered by considering where you want a +directive to be effective. If it is a global setting, it should appear +in the configuration file, outside of any Directory, Location, VirtualHost, or other section. If it is to +apply only to a particular directory, then it should go inside a +Directory section referring to +that directory, and so on. See the Configuration +Sections document for further discussion of these sections.

    + +

    In addition to the main configuration files, certain directives may go in +.htaccess files located in the content directories. +.htaccess files are primarily for people who do not have +access to the main server configuration file(s). You can read more about +.htaccess files in the .htaccess howto.

    + +
    + +
    +Web Site Content + +

    Web site content can take many different forms, but may be broadly +divided into static and dynamic content.

    + +

    Static content is things like HTML files, image files, CSS files, +and other files that reside in the filesystem. The DocumentRoot directive specifies where in your +filesystem you should place these files. This directive is either set +globally, or per virtual host. Look in your configuration file(s) to +determine how this is set for your server.

    + +

    Typically, a document called index.html will be served +when a directory is requested without a file name being specified. For +example, if DocumentRoot is set to +/var/www/html and a request is made for +http://www.example.com/work/, the file +/var/www/html/work/index.html will be served to the +client.

    + +

    Dynamic content is anything that is generated at request +time, and may change from one request to another. There are numerous +ways that dynamic content may be generated. Various handlers are available to generate content. CGI programs may be written to generate +content for your site.

    + +

    Third-party modules like mod_php may be used to write code that does a +variety of things. Many third-party applications, written using a +variety of languages and tools, are available for download and +installation on your Apache HTTP Server. Support of these third-party +things is beyond the scope of this documentation, and you should find +their documentation or other support forums to answer your questions +about them.

    +
    + +
    +Log Files and Troubleshooting +

    As an Apache HTTP Server administrator, your most valuable assets are +the log files, and, in particular, the error log. Troubleshooting any +problem without the error log is like driving with your eyes closed.

    + +

    The location of the error log is defined by the ErrorLog directive, which may be set globally, +or per virtual host. Entries in the error log tell you what went wrong, +and when. They often also tell you how to fix it. Each error log message +contains an error code, which you can search for online for even more +detailed descriptions of how to address the problem. You can also +configure your error log to contain a log ID which you can then +correlate to an access log entry, so that you can determine what request +caused the error condition.

    + +

    You can read more about logging in the logs +documentation.

    +
    + +
    +What's next? + +

    Once you have the prerequisites under your belt, it's time to move +on.

    + +

    This document covers only the bare basics. We hope that this gets you +started, but there are many other things that you might need to +know.

    + + + +
    + +
    diff --git a/docs/manual/getting-started.xml.fr b/docs/manual/getting-started.xml.fr new file mode 100644 index 00000000000..28a9c064678 --- /dev/null +++ b/docs/manual/getting-started.xml.fr @@ -0,0 +1,256 @@ + + + + + + + + + + + + Pour démarrer + + +

    Si vous ne connaissez rien au serveur HTTP Apache, ou même au +fonctionnement d'un site web, vous vous demandez probablement par où +commencer et quelles questions poser. Ce document vous permettra de +parcourir les bases du sujet.

    +
    + +
    +Clients, serveurs et URLs + +

    +Les adresses des pages web sur la Toile se présentent sous forme d'URLs +- Uniform Resource Locators - qui comportent un protocole (par + exemple http), un nom de serveur (par exemple + www.apache.org), un chemin (par exemple + /docs/current/getting-started.html), et le cas échéant + une chaîne de requête (query string) (par exemple ?arg=value) + permettant de transmettre des informations supplémentaires au serveur. +

    + +

    Un client (par exemple un navigateur web) se connecte à un serveur +(par exemple votre serveur HTTP Apache) avec un protocole spécifique, et +effectue une requête pour une ressource en spécifiant +son chemin.

    + +

    Un chemin peut représenter plusieurs types de ressources sur le +serveur. Ce peut être un fichier (comme +getting-started.html), un gestionnaire (comme server-status), ou toute sorte de +programme (comme index.php). Nous décrirons tout ceci plus +en détails ci-dessous dans la section Contenu d'un +site web.

    + +

    +Le serveur envoie alors une réponse comportant un code +d'état, et éventuellement un corps de réponse. Le code d'état indique si +la requête a été traitée avec succès, ou dans la négative quel type +d'erreur a été rencontré. Le client est alors sensé savoir quoi faire de +la réponse. Vous pouvez vous familiariser avec les différents codes +d'état en consultant le Wiki du +serveur HTTP Apache.

    + +

    Les détails de la transaction, ainsi que les erreurs rencontrées, +sont enregistrés dans des fichiers journaux. Tout ceci est décrit en +détails ci-dessous dans la section Débogage et fichiers +journaux.

    + +
    + +
    +Noms d'hôte et DNS + +

    Pour se connecter à un serveur, le client doit tout d'abord résoudre +le nom du serveur en adresse IP, cette dernière permettant de localiser +le serveur sur Internet. Ainsi, pour que votre serveur web soit +accessible, son nom doit être enregistré dans le DNS.

    + +

    Si vous ne savez pas comment effectuer cet enregistrement, vous +devrez contacter votre administrateur réseau ou votre fournisseur +d'accès à Internet afin qu'il effectue cette opération pour vous.

    + +

    Plusieurs noms d'hôte peuvent pointer vers la même adresse IP, et +plusieurs adresses IP peuvent être attachées au même serveur physique. +Vous pouvez ainsi héberger plusieurs serveurs web sur le même serveur +physique grâce au mécanisme des serveurs virtuels.

    + +

    Pour tester un serveur non encore accessible sur Internet, vous +pouvez renseigner son nom d'hôte dans votre fichier hosts afin +d'effectuer une résolution de nom locale. Par exemple, pour tester le +serveur web www.example.com depuis le serveur physique qui +l'héberge, vous pouvez ajouter la ligne suivante au fichier hosts de ce +dernier :

    + + +127.0.0.1 www.example.com + + +

    En général, le fichier hosts se trouve dans le répertoire +/etc sur les systèmes de style Unix, ou +C:\Windows\system32\drivers\etc sous Windows.

    + +

    Vous trouverez plus de détails à propos du fichier hosts à Wikipedia.org/wiki/Hosts_(file), +et à propos du DNS à Wikipedia.org/wiki/Domain_Name_System.

    +
    + +
    +Fichiers de configuration et directives + +

    La configuration du serveur HTTP Apache s'effectue via de simples +fichiers textes. Ces fichiers peuvent se trouver dans de nombreux +endroits différents en fonction du mode d'installation du serveur. Vous +trouverez les positions courantes de ces fichiers dans le wiki httpd. +Si vous installez httpd depuis le code source, le répertoire par défaut +des fichiers de configuration est /usr/local/apache2/conf. +Le nom du fichier de configuration par défaut est en général +httpd.conf, mais peut aussi varier en fonction des +distributions tierces du serveur.

    + +

    L'ensemble de la configuration est en général divisé en plusieurs +fichiers afin d'en faciliter la gestion. Ces fichiers sont inclus dans +le fichier de configuration principal via la directive Include. Les noms ou positions de ces fichiers +ne sont pas figés et peuvent varier considérablement d'une distribution +à l'autre. N'hésitez pas à les arranger et subdiviser selon +vos goûts et besoins, quitte à en modifier +l'organisation par défaut.

    + +

    La configuration du serveur s'effectue via des directives de configuration que l'on +insère dans les fichiers de configuration. Une directive se compose d'un +mot-clé suivi d'un ou plusieurs arguments qui définissent sa valeur.

    + +

    La réponse à la question "Où dois-je placer cette directive +?" dépend en général du niveau auquel cette directive doit être +prise en compte. S'il s'agit du niveau global, elle doit être placée +dans le fichier de configuration principal, et en dehors de toute +section Directory, Location, VirtualHost, ou de toute autre section. Si +par exemple elle ne doit s'appliquer qu'à un répertoire particulier, +elle doit être placée dans la section Directory qui fait référence à ce répertoire. +Voir la documentation sur les Sections de +configuration pour plus de détails.

    + +

    En complément des fichiers de configuration principaux, certaines +directives peuvent être insérées dans des fichiers +.htaccess que l'on place directement dans le répertoire +concerné. Les fichiers .htaccess sont essentiellement +destinés aux personnes qui n'ont pas accès aux fichiers de configuration +du serveur. Vous trouverez plus de détails à propos des fichiers +.htaccess dans ce .htaccesshowto.

    + +
    + +
    +Contenu du site web + +

    Si le contenu du site web peut se présenter sous de nombreuses +formes, il peut en général être scindé en deux formes principales : les +contenus statiques et les contenus dynamiques.

    + +

    Les contenus statiques sont par exemple les fichiers HTML, les +images, les fichiers CSS et tout autre fichier résidant dans le système +de fichiers. La directive DocumentRoot permet de définir la position +dans l'arborescence du site où vous devez placer ces fichiers. Cette +directive peut être définie au niveau global, ou au niveau de chaque +serveur virtuel. Vous pouvez consulter vos fichiers de configuration +pour vérifier la manière dont cette directive est définie pour votre +serveur.

    + +

    En général, et si aucun nom de fichier n'est spécifié dans la +requête, c'est une page de nom index.html qui sera +renvoyée. Par exemple, si la directive DocumentRoot est +définie à /var/www/html, et si une requête est effectuée +pour l'adresse http://www.example.com/work/, c'est le +fichier /var/www/html/work/index.html qui sera envoyé au +client par le serveur.

    + +

    Un contenu dynamique est un contenu qui est généré au moment du +traitement de la requête, et qui peut différer d'une requête à l'autre. +Ces contenus dynamiques peuvent être générés de nombreuses manières par +l'intermédiaire de gestionnaires de contenu +ou "handlers". Il est aussi possible de créer des programmes CGI pour générer le contenu de +votre site.

    + +

    Enfin, on peut utiliser des modules tiers comme mod_php pour écrire +du code permettant d'effectuer de nombreuses choses. De nombreuses +applications tierces écrites à partir de divers langages ou outils sont +disponibles en téléchargement et peuvent être installées sur votre +serveur HTTP Apache. Le support de ces applications dépasse le sujet de +ce document, et nous vous invitons à consulter le site de leur éditeur +pour accéder à leur documentation.

    +
    + +
    +Fichiers journaux et résolution des problèmes +

    En tant qu'administrateur d'un serveur HTTP Apache, vos sources +d'informations principales sont les fichiers journaux, et en particulier +le journal des erreurs. Toute tentative de résolution d'un problème sans +consulter le journal des erreurs revient à conduire les yeux fermés.

    + +

    La position dans le système de fichiers du journal des erreurs est +spécifiée par la directive ErrorLog +qui peut être définie au niveau global, ou au niveau de chaque serveur +virtuel. Chaque entrée du journal des erreurs vous informe sur la nature +des problèmes et le moment de leur survenue. En outre, elle vous indique +souvent comment résoudre le problème. Chaque message d'erreur contient +un code d'erreur que vous pouvez utiliser pour effectuer une recherche +en ligne afin d'obtenir une description plus détaillée de la manière de +résoudre le problème. Vous pouvez aussi configurer votre journal des +erreurs de manière à ce qu'il enregistre un identifiant d'erreur que +vous pourrez ensuite utiliser pour effectuer une corrélation avec le +journal des accès afin de déterminer quelle requête est à l'origine de +l'erreur.

    + +

    Vous trouverez plus de détails à ce sujet dans la Documentation sur la journalisation.

    +
    + +
    +Et maintenant, quelle est la suite des opérations ? + +

    La question des prérequis étant réglée, il est temps de passer aux +choses sérieuses.

    + +

    Ce document ne couvre que les notions de base. Nous espérons qu'il +vous permettra de mettre le pied à l'étrier, mais il y a encore de +nombreuses choses que vous devez savoir.

    + + + +
    + +
    diff --git a/docs/manual/getting-started.xml.meta b/docs/manual/getting-started.xml.meta new file mode 100644 index 00000000000..71e997b6866 --- /dev/null +++ b/docs/manual/getting-started.xml.meta @@ -0,0 +1,13 @@ + + + + + getting-started + / + . + + + en + fr + + diff --git a/docs/manual/glossary.html.de b/docs/manual/glossary.html.de index 0bea9b3645d..b95eb8665d7 100644 --- a/docs/manual/glossary.html.de +++ b/docs/manual/glossary.html.de @@ -1,22 +1,27 @@ - -Glossar - Apache HTTP Server +Glossar - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Glossar

    Verfgbare Sprachen:  de  |  en  | @@ -470,7 +475,7 @@ Identifier. URLs bestehen blicherweise aus einem Schema wie http oder https, einem Hostnamen und einem Pfad. Die URL fr diese Seite ist - http://httpd.apache.org/docs/trunk/glossary.html. + http://httpd.apache.org/docs/2.4/glossary.html.

    Uniform Resource Identifier @@ -551,7 +556,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.en b/docs/manual/glossary.html.en index 6a1e0fe57d8..ece4a90e7fb 100644 --- a/docs/manual/glossary.html.en +++ b/docs/manual/glossary.html.en @@ -1,22 +1,27 @@ - -Glossary - Apache HTTP Server +Glossary - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Glossary

    Available Languages:  de  |  en  | @@ -365,7 +370,7 @@ be written as "/images/.*(jpg|gif)$". In places where regular expressions are used to replace strings, the special variables $1 ... $9 contain backreferences to the grouped parts (in parentheses) of - the matched expression. The special variable $0 contains a backerference + the matched expression. The special variable $0 contains a backreference to the whole matched expression. To write a literal dollar sign in a replacement string, it can be escaped with a backslash. Historically, the variable & could be used as alias for $0 in some places. This is no @@ -416,6 +421,14 @@ Young +

    Subrequest
    +
    Apache provides a subrequest API to modules that allows other + filesystem or URL paths to be partially or fully evaluated by + the server. Example consumers of this API are + DirectoryIndex, + mod_autoindex, and mod_include. +
    +
    Symmetric Cryptography
    The study and application of Ciphers that use a single secret key @@ -443,7 +456,7 @@ informal term for what is formally called a Uniform Resource Identifier. URLs are usually made up of a scheme, like http or https, a hostname, and a path. A URL for this page might - be http://httpd.apache.org/docs/trunk/glossary.html. + be http://httpd.apache.org/docs/2.4/glossary.html.
    Uniform Resource Identifier @@ -475,7 +488,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.es b/docs/manual/glossary.html.es index d63cb933f12..eac0e99421b 100644 --- a/docs/manual/glossary.html.es +++ b/docs/manual/glossary.html.es @@ -1,22 +1,27 @@ - -Glosario - Servidor HTTP Apache +Glosario - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Glosario

    Idiomas disponibles:  de  |  en  | @@ -364,7 +369,7 @@ llama un Identificador de Recursos Uniforme. Las URLs estn compuestas normalmente por un esquema, tal como http o https, un nombre de host, y una ruta. Una URL para esta pgina es -http://httpd.apache.org/docs/trunk/glossary.html. +http://httpd.apache.org/docs/2.4/glossary.html.

    Identificador de Recursos Uniforme (URI)
    Una cadena de caracteres @@ -395,7 +400,28 @@ SSL/TLS.
    Consulte: Encriptado SSL/TLS
     ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.fr b/docs/manual/glossary.html.fr index a104cd0d4e0..b90af8244d7 100644 --- a/docs/manual/glossary.html.fr +++ b/docs/manual/glossary.html.fr @@ -1,22 +1,27 @@ - -Glossaire - Serveur Apache HTTP +Glossaire - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Glossaire

    Langues Disponibles:  de  |  en  | @@ -50,9 +55,8 @@ Voir : chiffrement SSL/TLS -

    APR
    -
    Voir " - Bibliothques pour la portabilit d'Apache" +
    APR
    +
    Voir "Bibliothques pour la portabilit d'Apache"
    Archive Tar (Tarball)
    @@ -80,7 +84,7 @@
    Bibliothques pour la portabilit d'Apache - (Apache Portable Runtime, APR)
    + (Apache Portable Runtime) (APR)
    Un jeu de bibliothques qui fournit la plupart des interfaces de base entre le serveur et le systme d'exploitation. APR est dvelopp paralllement au serveur HTTP Apache comme projet indpendant.
    @@ -163,6 +167,15 @@ Voir : chiffrement SSL/TLS
    +
    Sous-requte
    +
    Apache possde une API des sous-requtes pour les modules qui + permettent l'valuation complte ou partielle par le serveur de + chemins d'autres systmes de fichiers ou d'URL. Par exemple, la + directive DirectoryIndex, + les modules mod_autoindex et + mod_include utilisent cette API. +
    +
    Cryptographie Symtrique (Symmetric Cryptography)
    L'tude et l'application des Algorithmes de chiffrement qui @@ -373,7 +386,7 @@ Localisation de Ressource Uniformis http ou https, un nom d'hte, et un chemin. Une URL pour cette page pourrait tre - http://httpd.apache.org/docs/trunk/glossary.html. + http://httpd.apache.org/docs/2.4/glossary.html.
    @@ -579,7 +592,28 @@ Localisation de Ressource Uniformis  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.ja.utf8 b/docs/manual/glossary.html.ja.utf8 index 5dc00dd54dd..ef45fe77e06 100644 --- a/docs/manual/glossary.html.ja.utf8 +++ b/docs/manual/glossary.html.ja.utf8 @@ -1,25 +1,29 @@ - -用語 - Apache HTTP サーバ +用語 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    用語

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -27,8 +31,10 @@  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この用語集では Apacheに特化した用語と、 ウェブサーバ全般で一般的な用語をいくつか定義しています。 @@ -413,7 +419,7 @@ と呼ばれるもののよく使われる非公式な名前です。URL は普通は、 httphttps といったスキームとホスト名、 パスからなります。このページの URL はおそらく - http://httpd.apache.org/docs/trunk/glossary.html + http://httpd.apache.org/docs/2.4/glossary.html と思われます。 @@ -442,14 +448,35 @@

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.ko.euc-kr b/docs/manual/glossary.html.ko.euc-kr index f0c5ec3fffc..86a4dd1dcd4 100644 --- a/docs/manual/glossary.html.ko.euc-kr +++ b/docs/manual/glossary.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  de  |  en  | @@ -334,7 +339,7 @@ Force, IETF) Identifier ϴ ϻ Ī̴. URL http https Ŵ(scheme), ȣƮ, η ȴ. URL -http://httpd.apache.org/docs/trunk/glossary.html̴. +http://httpd.apache.org/docs/2.4/glossary.html̴.

    Uniform Resource Identifier (URI)
    @@ -364,7 +369,28 @@ ITU-T)  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.html.tr.utf8 b/docs/manual/glossary.html.tr.utf8 index 6fb623356cb..d1d694ef6c1 100644 --- a/docs/manual/glossary.html.tr.utf8 +++ b/docs/manual/glossary.html.tr.utf8 @@ -1,22 +1,27 @@ - -Terim Sözlüğü - Apache HTTP Sunucusu +Terim Sözlüğü - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Terim Sözlüğü

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Terim Sözlüğü

    Mevcut Diller:  de  |  en  | @@ -26,7 +31,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu sözlük, genelinde HTML sayfa sunumuna, özelinde Apache HTTP Sunucusuna özgü ortak terminolojinin bir kısmını içerir. Her kavram ile ilgili daha @@ -53,6 +57,15 @@ Bakınız: SSL/TLS Şifrelemesi +

    Alt istek
    +
    Diğer dosya sistemlerini veya URL yollarını kısmen veya tamamen + değerlendiren modüller için sunucuda bir alt istek API'si mevcuttur. Bu + API'nin olası müşterileri için + DirectoryIndex, + mod_autoindex ve mod_include örnek + verilebilir. +
    +
    Anahtar Parolası
    Özel anahtar dosyalarını yetkisiz kişilerden koruyan sözcük veya cümle. Genellikle sadece şifreler @@ -123,8 +136,16 @@ toplamak için esnek bir yol sağlamasından ötürü oldukça yararlıdır. Örneğin, “resimler” dizini altındaki dosyalardan .gif ve .jpg uzantılı olanları toplamak için “/resimler/.*(jpg|gif)$” düzenli - ifadesi yazılabilir. Apache, PCRE - kütüphanesi ile sağlanan Perl uyumlu düzenli ifadeleri kullanır. + ifadesi yazılabilir. Dizgileri değiştirmek için düzenli ifadelerin + kullanıldığı yerlerde, eşleşen (parantezlerin içinde) gruplanmış + parçalara başvurmak için $1 ... $9 özel değişkenleri kullanılır. $0 özel + değişkeni eşleşen ifadenin tamamına karşılık gelir. Bir dizgi içinde $ + işaretini kendisi olarak kullanmak isterseniz önüne bir \ imi + koymalısınız. Geçmişe uyumluluk adına bazı yerlerde $0 yerine & + değişkeni kullanılabilir. Ancak 2.3.6 sürümünden beri bu artık mümkün + değildir. Apache, PCRE kütüphanesi ile + sağlanan Perl uyumlu düzenli ifadeleri kullanır. PCRE düzenli + ifadelerinin sözdizimi ile ilgili ayrıntılı bilgiyi Wikipedia'da bulabilirsiniz.
    Erişim Denetimi
    @@ -279,8 +300,9 @@
    İngilizcesi: Common Gateway Interface (CGI)
    Bir HTTP sunucusunun bir harici programa hizmet istekleri yapmasını mümkün kılan, sunucu ile bir harici program arasındaki bir arayüz - standardı. Özgün arayüz NCSA tarafından - tanımlanmış olmakla birlikte ayrıca bir CGI RFC’si de vardır.
    + standardı. Özellikleri kapsayan bir + Bilgilendirici RFC + vardır.
    Bakınız: CGI ile Devingen İçerik
    @@ -432,7 +454,7 @@ denilen terimin gayrı resmi karşılığıdır. URL’ler http veya https gibi bir şemayı takip eden bir konak adı ve bir dosya yolundan oluşurlar. Örneğin, bu sayfanın URL’si - http://httpd.apache.org/docs/trunk/glossary.html olurdu. + http://httpd.apache.org/docs/2.4/glossary.html olurdu.
    Vekil
    @@ -480,7 +502,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/glossary.xml b/docs/manual/glossary.xml index 3bc7dae09eb..f8900d5c7e1 100644 --- a/docs/manual/glossary.xml +++ b/docs/manual/glossary.xml @@ -382,7 +382,7 @@ be written as "/images/.*(jpg|gif)$". In places where regular expressions are used to replace strings, the special variables $1 ... $9 contain backreferences to the grouped parts (in parentheses) of - the matched expression. The special variable $0 contains a backerference + the matched expression. The special variable $0 contains a backreference to the whole matched expression. To write a literal dollar sign in a replacement string, it can be escaped with a backslash. Historically, the variable & could be used as alias for $0 in some places. This is no @@ -433,6 +433,14 @@ Young +
    Subrequest
    +
    Apache provides a subrequest API to modules that allows other + filesystem or URL paths to be partially or fully evaluated by + the server. Example consumers of this API are + DirectoryIndex, + mod_autoindex, and mod_include. +
    +
    Symmetric Cryptography
    The study and application of Ciphers that use a single secret key diff --git a/docs/manual/glossary.xml.de b/docs/manual/glossary.xml.de index 35699422f40..45315486f53 100644 --- a/docs/manual/glossary.xml.de +++ b/docs/manual/glossary.xml.de @@ -1,7 +1,7 @@ - + + - + + + + -Apache's Handler Use - Apache HTTP Server +Apache's Handler Use - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache's Handler Use

    +Apache > HTTP Server > Documentation > Version 2.4

    Apache's Handler Use

    Available Languages:  en  |  es  | @@ -32,7 +37,7 @@

    +

    See also

    top

    What is a Handler

    @@ -94,10 +99,9 @@ the html extension to trigger the launch of the footer.pl CGI script.

    -

    - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -

    +
    Action add-footer /cgi-bin/footer.pl
    +AddHandler add-footer .html
    +

    Then the CGI script is responsible for sending the originally requested document (pointed to by the @@ -115,11 +119,10 @@ the send-as-is handler, regardless of their filename extensions.

    -

    - <Directory /web/htdocs/asis>
    - SetHandler send-as-is
    - </Directory> -

    +
    <Directory "/web/htdocs/asis">
    +    SetHandler send-as-is
    +</Directory>
    +
    top
    @@ -132,9 +135,8 @@ you may wish to make use of. Specifically, a new record has been added to the request_rec structure:

    -

    - char *handler -

    +
    char *handler
    +

    If you wish to have your module engage a handler, you need only to set r->handler to the name of the @@ -153,7 +155,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.es b/docs/manual/handler.html.es index f95ccfc0515..88f29f212b4 100644 --- a/docs/manual/handler.html.es +++ b/docs/manual/handler.html.es @@ -1,22 +1,27 @@ - -Uso de los Handlers en Apache - Servidor HTTP Apache +Uso de los Handlers en Apache - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Uso de los Handlers en Apache

    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    Uso de los Handlers en Apache

    Idiomas disponibles:  en  |  es  | @@ -36,7 +41,7 @@

    +

    Consulte tambin

    top

    Qu es un Handler?

    @@ -166,7 +171,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.fr b/docs/manual/handler.html.fr index d128d2f3591..fe7610289b6 100644 --- a/docs/manual/handler.html.fr +++ b/docs/manual/handler.html.fr @@ -1,22 +1,27 @@ - -Utilisation des gestionnaires d'Apache (handlers) - Serveur Apache HTTP +Utilisation des gestionnaires d'Apache (handlers) - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Utilisation des gestionnaires d'Apache (handlers)

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Utilisation des gestionnaires d'Apache (handlers)

    Langues Disponibles:  en  |  es  | @@ -32,7 +37,7 @@

    +

    Voir aussi

    top

    Qu'est-ce qu'un gestionnaire ?

    @@ -96,10 +101,9 @@ des fichiers possdant une extension html dclenchent l'excution du script CGI footer.pl.

    -

    - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -

    +
    Action add-footer /cgi-bin/footer.pl
    +AddHandler add-footer .html
    +

    ce moment-l, le script CGI se charge d'envoyer le document initialement demand (rfrenc par la variable d'environnement @@ -117,11 +121,10 @@ send-as-is, sans tenir compte de l'extension de leur nom de fichier.

    -

    - <Directory /web/htdocs/asis>
    - SetHandler send-as-is
    - </Directory> -

    +
    <Directory "/web/htdocs/asis">
    +    SetHandler send-as-is
    +</Directory>
    +
    top
    @@ -136,9 +139,8 @@ Plus prcisment, un nouvel enregistrement a t ajout la structure request_rec :

    -

    - char *handler -

    +
    char *handler
    +

    Si vous voulez que votre module dclenche l'utilisation d'un gestionnaire, il vous suffit de dfinir r->handler avec @@ -159,7 +161,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.ja.utf8 b/docs/manual/handler.html.ja.utf8 index ff87e591128..e2ece0c7862 100644 --- a/docs/manual/handler.html.ja.utf8 +++ b/docs/manual/handler.html.ja.utf8 @@ -1,25 +1,29 @@ - -Apache のハンドラの使用 - Apache HTTP サーバ +Apache のハンドラの使用 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache のハンドラの使用

    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  | @@ -27,15 +31,17 @@  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    Apache のハンドラの使用に関して記述しています。

    +

    参照

    top

    ハンドラとは

    @@ -101,10 +107,9 @@ であるファイルは footer.pl CGI スクリプトを起動するようになります。

    -

    - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -

    +
    Action add-footer /cgi-bin/footer.pl
    +AddHandler add-footer .html
    +

    CGI スクリプトは希望の修正や追加を行なって、元々要求された文書 (環境変数 PATH_TRANSLATED @@ -121,11 +126,10 @@ /web/htdocs/asis ディレクトリにある全てのファイルは send-as-is ハンドラによって扱われます。

    -

    - <Directory /web/htdocs/asis>
    - SetHandler send-as-is
    - </Directory> -

    +
    <Directory /web/htdocs/asis>
    +    SetHandler send-as-is
    +</Directory>
    +
    top
    @@ -138,9 +142,8 @@ に追加されました。詳しく言うと、request_rec 構造体に新しいレコードが追加されたということです。

    -

    - char *handler -

    +
    char *handler
    +

    もしモジュールがハンドラに関わりたい場合、 やらなければならないことは、リクエストが invoke_handler @@ -152,14 +155,35 @@ ダッシュ(訳注: "-")で分離された名前を付ける習慣になっています。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  es  |  fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.ko.euc-kr b/docs/manual/handler.html.ko.euc-kr index a5727f3e801..139329286f0 100644 --- a/docs/manual/handler.html.ko.euc-kr +++ b/docs/manual/handler.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ ڵ鷯 - Apache HTTP Server +ġ ڵ鷯 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ ڵ鷯

    :  en  |  es  | @@ -34,7 +39,7 @@

    +

    top

    ڵ鷯 ΰ

    @@ -149,7 +154,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.tr.utf8 b/docs/manual/handler.html.tr.utf8 index 1fa583ca92d..54ba8acb5df 100644 --- a/docs/manual/handler.html.tr.utf8 +++ b/docs/manual/handler.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache Eylemcilerinin Kullanımı - Apache HTTP Sunucusu +Apache Eylemcilerinin Kullanımı - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache Eylemcilerinin Kullanımı

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache Eylemcilerinin Kullanımı

    Mevcut Diller:  en  |  es  | @@ -26,14 +31,13 @@  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belgede Apache Eylemcilerinin kullanımı açıklanmıştır.

    +

    Ayrıca bakınız:

    top

    Eylemci Nedir?

    @@ -94,10 +98,9 @@ için yapılan istekler footer.pl CGI betiğininin çalıştırılmasına sebep olacaktır.

    -

    - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -

    +
    Action add-footer /cgi-bin/footer.pl
    +AddHandler add-footer .html
    +

    Bu yapılandırmayla, istenen belgenin özgün haliyle mi (yeri PATH_TRANSLATED ortam değişkenindedir) yoksa istenen @@ -114,11 +117,10 @@ dosyalar dosya ismi uzantılarına bakılmaksızın send-as-is eylemcisi tarafından işleme sokulacaktır.

    -

    - <Directory /siteler/htdocs/asis>
    - SetHandler send-as-is - </Directory> -

    +
    <Directory "/web/htdocs/asis">
    +    SetHandler send-as-is
    +</Directory>
    +
    top
    @@ -130,9 +132,8 @@ Özellikle de, request_rec yapısına yeni bir kayıt eklenmiştir:

    -

    - char *handler -

    +
    char *handler
    +

    Modülünüzün bir eylemciyi devreye sokmasını isterseniz, tek yapacağınız isteğin invoke_handler aşamasının hemen öncesinde @@ -151,7 +152,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.html.zh-cn b/docs/manual/handler.html.zh-cn.utf8 similarity index 75% rename from docs/manual/handler.html.zh-cn rename to docs/manual/handler.html.zh-cn.utf8 index 849f100476a..6fe5fad39bc 100644 --- a/docs/manual/handler.html.zh-cn +++ b/docs/manual/handler.html.zh-cn.utf8 @@ -1,22 +1,27 @@ - -Apache 的处理器 - Apache HTTP 服务器 +Apache 的处理器 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache 的处理器

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache 的处理器

    可用语言:  en  |  es  | @@ -26,13 +31,14 @@  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    本页描述 Apache 处理器的用法。

    +

    参见

    top

    什么是处理器

    @@ -124,7 +130,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/handler.xml b/docs/manual/handler.xml index 08a59ea4ddf..fd37d5603ef 100644 --- a/docs/manual/handler.xml +++ b/docs/manual/handler.xml @@ -105,10 +105,10 @@ the html extension to trigger the launch of the footer.pl CGI script.

    - - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -
    + +Action add-footer /cgi-bin/footer.pl +AddHandler add-footer .html +

    Then the CGI script is responsible for sending the originally requested document (pointed to by the @@ -126,11 +126,11 @@ the send-as-is handler, regardless of their filename extensions.

    - - <Directory /web/htdocs/asis>
    - SetHandler send-as-is
    - </Directory> -
    + +<Directory "/web/htdocs/asis"> + SetHandler send-as-is +</Directory> + @@ -142,9 +142,9 @@ you may wish to make use of. Specifically, a new record has been added to the request_rec structure:

    - + char *handler - +

    If you wish to have your module engage a handler, you need only to set r->handler to the name of the diff --git a/docs/manual/handler.xml.es b/docs/manual/handler.xml.es index 0c0fff3da07..1ca7c9c4fb9 100644 --- a/docs/manual/handler.xml.es +++ b/docs/manual/handler.xml.es @@ -1,7 +1,7 @@ - + - + + + + + -Access Control - Apache HTTP Server +Access Control - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Access Control

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Access control refers to any means of controlling access to any @@ -29,7 +35,7 @@

  • Access control by arbitrary variables
  • Access control with mod_rewrite
  • More information
  • -
    +

    See also

    top

    Related Modules and Directives

    @@ -65,10 +71,9 @@

    The usage of these directives is:

    -

    - Require host address
    - Require ip ip.address -

    +
    Require host address
    +Require ip ip.address
    +

    In the first form, address is a fully qualified domain name (or a partial domain name); you may provide multiple @@ -83,30 +88,36 @@ syntax.

    You can insert not to negate a particular requirement. + Note, that since a not is a negation of a value, it cannot + be used by itself to allow or deny a request, as not true + does not constitute false. Thus, to deny a visit using a negation, + the block must have one element that evaluates as true or false. For example, if you have someone spamming your message board, and you want to keep them out, you could do the following:

    -

    - Require not ip 10.252.46.165 -

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 10.252.46.165
    +</RequireAll>
    + -

    Visitors coming from that address will not be able to see - the content covered by this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.

    +

    Visitors coming from that address (10.252.46.165) + will not be able to see the content covered by this directive. If, + instead, you have a machine name, rather than an IP address, you + can use that.

    + +
    Require not host host.example.com
    +    
    -

    - Require not host host.example.com -

    And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

    -

    - Require not ip 192.168.205
    - Require not host phishers.example.com moreidiots.example
    - Require not gov -

    +
    Require not ip 192.168.205
    +Require not host phishers.example.com moreidiots.example
    +Require not host gov
    +

    Use of the RequireAll, RequireAny, and RequireNone directives may be used to enforce more complex sets of requirements.

    @@ -121,13 +132,17 @@ based on user-agent (the browser type) you might do the following:

    -

    - <If "%{HTTP_USER_AGENT} = 'BadBot'">
    - - Require All Denied
    -
    - </If> -

    +
    <If "%{HTTP_USER_AGENT} == 'BadBot'">
    +    Require all denied
    +</If>
    + + +

    Using the Require + expr syntax, this could also be written as:

    + + +
    Require expr %{HTTP_USER_AGENT} != 'BadBot'
    +

    Warning:

    Access control by User-Agent is an unreliable technique, @@ -150,12 +165,11 @@

    For example, if you wish to block access to a resource between 8pm and 6am, you can do this using mod_rewrite.

    -

    - RewriteEngine On
    - RewriteCond %{TIME_HOUR} >20 [OR]
    - RewriteCond %{TIME_HOUR} <07
    - RewriteRule ^/fridge - [F] -

    +
    RewriteEngine On
    +RewriteCond "%{TIME_HOUR}" ">=20" [OR]
    +RewriteCond "%{TIME_HOUR}" "<07"
    +RewriteRule "^/fridge"     "-" [F]
    +

    This will return a 403 Forbidden response for any request after 8pm or before 7am. This technique can be used for any criteria that you wish @@ -184,8 +198,30 @@ howto.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/access.html.fr b/docs/manual/howto/access.html.fr new file mode 100644 index 00000000000..044681f57f9 --- /dev/null +++ b/docs/manual/howto/access.html.fr @@ -0,0 +1,240 @@ + + + + + +Contrle d'accs - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Contrle d'accs

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + +

    Le contrle d'accs fait rfrence tout concept de contrle + d'accs une ressource quelconque. Il est distinct du processus d'authentification et d'autorisation.

    +
    + +
    top
    +
    +

    Modules et directives concerns

    + +

    Plusieurs modules peuvent intervenir dans le contrle d'accs. + Les plus importants sont mod_authz_core et + mod_authz_host. Ce document illustre aussi comment + utiliser mod_rewrite pour le contrle + d'accs.

    + +
    top
    +
    +

    Contrle d'accs en fonction de l'hte du +client

    +

    + Si vous souhaitez restreindre l'accs certaines parties de votre + site web en fonction de l'addresse de l'hte de vos visiteurs, le + plus simple pour y parvenir consiste utiliser le module + mod_authz_host. +

    + +

    La directive Require permet d'accorder ou + d'interdire l'accs certaines ressources de diffrentes manires. + Ces critres d'accs, en conjonction avec les directives RequireAll, RequireAny, et RequireNone, peuvent tre + combins d'une manire suffisamment complexe pour + satisfaire votre politique de contrle d'accs.

    + +

    + Les directives Allow, Deny, et Order fournies par le module + mod_access_compat sont obsoltes, et sont appeles + disparatre dans les versions futures. Il est donc dconseill de + les utiliser, et de se fier aux tutoriels qui recommandent leur + utilisation. +

    + +

    Les directives Require s'utilisent comme suit :

    + +
    Require host address
    +Require ip ip.address
    + + +

    Dans la premire forme, nom-hte est un nom de domaine + pleinement qualifi (fqdn), ou un nom de domaine partiel ; vous + pouvez spcifier plusieurs noms de domaines, si vous le dsirez.

    + +

    Dans la seconde forme, adresse-ip est une adresse IP + complte, une adresse IP partielle, une paire rseau/masque de + sous-rseau ou une spcification CIDR de la forme rseau/nnn. Il est + possible de spcifier des adresses IPv4 ou IPv6.

    + +

    Voir la + documentation de mod_authz_host pour d'autres exemples de cette + syntaxe.

    + +

    Vous pouvez insrer le mot-cl not pour inverser un + critre particulier. Notez que le mot not tant la + ngation d'une valeur, il ne peut pas tre utilis pour autoriser + ou interdire une requte, car non vrai ne + sera pas interpret par httpd comme faux. Ainsi, pour interdire la + visite d'une page l'aide d'une ngation, le bloc doit contenir un + lment valu vrai ou faux. + Par exemple, si quelqu'un est en train d'inonder + votre forum de messages indsirables, vous pouvez ajouter cette ligne pour lui refuser + l'accs :

    + +
    <RequireAll>
    +    Require all granted
    +    Require not ip 10.252.46.165
    +</RequireAll>
    + + +

    Les visiteurs possdant cette adresse (10.252.46.165) ne pourront pas voir le + contenu concern par cette directive. Si vous voulez interdire + l'accs une machine en fonction de son nom, vous pouvez ajouter + ceci :

    + +
    Require not host host.example.com
    +    
    + + +

    Et si vous voulez interdire l'accs un domaine particulier, + vous pouvez spcifier des adresses IP partielles ou des noms de + domaine, comme ceci :

    + +
    Require not ip 192.168.205
    +Require not host phishers.example.com moreidiots.example
    +Require not host gov
    + + +

    Les directives RequireAll, RequireAny, et RequireNone permettent galement de prciser des + critres d'accs plus complexes.

    + +
    top
    +
    +

    Contrle d'accs en fonction de variables +arbitraires

    + +

    Vous pouvez accorder ou refuser l'accs en fonction de variables + d'environnement arbitraires ou de valeurs d'en-ttes de la requte + en utilisant la directive <If>. Par exemple, pour interdire l'accs en + fonction du user-agent (le type de navigateur), vous pouvez + spcifier ceci :

    + +
    <If "%{HTTP_USER_AGENT} == 'BadBot'">
    +    Require all denied
    +</If>
    + + +

    La syntaxe expr de la directive Require permet de rcrire + l'exemple prcdent de la manire suivante :

    + + +
    Require expr %{HTTP_USER_AGENT} != 'BadBot'
    + + +

    Avertissement :

    +

    Contrler l'accs en fonction de l'en-tte + User-Agent n'est pas une technique fiable, car cet + en-tte peut tre dfini une valeur quelconque, selon le bon + vouloir de l'utilisateur.

    +
    + +

    Voir le document propos des expressions pour une description plus + approfondie des syntaxes d'expressions et des variables disponibles.

    + +
    top
    +
    +

    Utilisation de mod_rewrite pour le contrle +d'accs

    + +

    Le drapeau [F] de la directive RewriteRule permet d'envoyer une + rponse de type 403 Forbidden. Il vous permet donc d'interdire + l'accs une ressource en fonction d'un critre arbitraire.

    + +

    Par exemple, pour bloquer l'accs une ressources entre 20h et + 6h du matin, vous pouvez utiliser mod_rewrite :

    + +
    RewriteEngine On
    +RewriteCond "%{TIME_HOUR}" ">=20" [OR]
    +RewriteCond "%{TIME_HOUR}" "<07"
    +RewriteRule "^/fridge"     "-" [F]
    + + +

    Toute requte arrivant aprs 20h ou avant 7h du matin provoquera + l'envoi d'une rponse de type 403 Forbidden. Vous pouvez utiliser + cette technique pour vrifier toutes sortes de critres. En outre, + si vous le prfrez, vous pouvez rediriger ou rcrire la requte.

    + +

    Notez que la directive <If>, introduite partir de la version 2.4, + permet de remplacer le module mod_rewrite dans de + nombreuses situations o il tait traditionnellement utilis, et + il sera probablement prfrable pour vous de tenter de l'utiliser + avant de vous tourner vers mod_rewrite.

    + +
    top
    +
    +

    Informations complmentaires

    + +

    Le moteur d'expressions vous fournit + une grande puissance d'action en fonction de variables du serveur + arbitraires, et il vous est conseill de consulter le document + correspondant pour plus de dtails.

    + +

    De mme, vous devez lire la documentation du module + mod_authz_core pour des exemples de combinaison de + critres d'accs multiples, et en particulier la manire dont ces + derniers interagissent.

    + +

    Voir aussi le How-To Authentification and + autorisation.

    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/howto/access.xml b/docs/manual/howto/access.xml index fe386be2aaa..a130ec42999 100644 --- a/docs/manual/howto/access.xml +++ b/docs/manual/howto/access.xml @@ -67,10 +67,10 @@

    The usage of these directives is:

    - - Require host address
    - Require ip ip.address -
    + +Require host address +Require ip ip.address +

    In the first form, address is a fully qualified domain name (or a partial domain name); you may provide multiple @@ -85,30 +85,38 @@ syntax.

    You can insert not to negate a particular requirement. + Note, that since a not is a negation of a value, it cannot + be used by itself to allow or deny a request, as not true + does not constitute false. Thus, to deny a visit using a negation, + the block must have one element that evaluates as true or false. For example, if you have someone spamming your message board, and you want to keep them out, you could do the following:

    - - Require not ip 10.252.46.165 - + +<RequireAll> + Require all granted + Require not ip 10.252.46.165 +</RequireAll> + -

    Visitors coming from that address will not be able to see - the content covered by this directive. If, instead, you have a - machine name, rather than an IP address, you can use that.

    +

    Visitors coming from that address (10.252.46.165) + will not be able to see the content covered by this directive. If, + instead, you have a machine name, rather than an IP address, you + can use that.

    - - Require not host host.example.com - + +Require not host host.example.com +

    And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

    - - Require not ip 192.168.205
    - Require not host phishers.example.com moreidiots.example
    - Require not gov -
    + +Require not ip 192.168.205 +Require not host phishers.example.com moreidiots.example +Require not host gov +

    Use of the RequireAll, - - <If "%{HTTP_USER_AGENT} = 'BadBot'">
    - - Require All Denied
    -
    - </If> -
    + +<If "%{HTTP_USER_AGENT} == 'BadBot'"> + Require all denied +</If> + + +

    Using the Require + expr syntax, this could also be written as:

    + + + +Require expr %{HTTP_USER_AGENT} != 'BadBot' + Warning:

    Access control by User-Agent is an unreliable technique, @@ -156,12 +170,12 @@

    For example, if you wish to block access to a resource between 8pm and 6am, you can do this using mod_rewrite.

    - - RewriteEngine On
    - RewriteCond %{TIME_HOUR} >20 [OR]
    - RewriteCond %{TIME_HOUR} <07
    - RewriteRule ^/fridge - [F] -
    + +RewriteEngine On +RewriteCond "%{TIME_HOUR}" ">=20" [OR] +RewriteCond "%{TIME_HOUR}" "<07" +RewriteRule "^/fridge" "-" [F] +

    This will return a 403 Forbidden response for any request after 8pm or before 7am. This technique can be used for any criteria that you wish @@ -191,4 +205,3 @@ - diff --git a/docs/manual/howto/access.xml.fr b/docs/manual/howto/access.xml.fr new file mode 100644 index 00000000000..65ab6a3fe72 --- /dev/null +++ b/docs/manual/howto/access.xml.fr @@ -0,0 +1,227 @@ + + + + + + + + + + +How-To / Tutoriels + +Contrôle d'accès + +

    +

    Le contrôle d'accès fait référence à tout concept de contrôle + d'accès à une ressource quelconque. Il est distinct du processus d'authentification et d'autorisation.

    +
    + + + +
    Contrôle d'accès en fonction de l'hôte du +client +

    + Si vous souhaitez restreindre l'accès à certaines parties de votre + site web en fonction de l'addresse de l'hôte de vos visiteurs, le + plus simple pour y parvenir consiste à utiliser le module + mod_authz_host. +

    + +

    La directive Require permet d'accorder ou + d'interdire l'accès à certaines ressources de différentes manières. + Ces critères d'accès, en conjonction avec les directives RequireAll, RequireAny, et RequireNone, peuvent être + combinés d'une manière suffisamment complexe pour + satisfaire votre politique de contrôle d'accès.

    + +

    + Les directives Allow, Deny, et Order fournies par le module + mod_access_compat sont obsolètes, et sont appelées à + disparaître dans les versions futures. Il est donc déconseillé de + les utiliser, et de se fier aux tutoriels qui recommandent leur + utilisation. +

    + +

    Les directives Require s'utilisent comme suit :

    + + +Require host address +Require ip ip.address + + +

    Dans la première forme, nom-hôte est un nom de domaine + pleinement qualifié (fqdn), ou un nom de domaine partiel ; vous + pouvez spécifier plusieurs noms de domaines, si vous le désirez.

    + +

    Dans la seconde forme, adresse-ip est une adresse IP + complète, une adresse IP partielle, une paire réseau/masque de + sous-réseau ou une spécification CIDR de la forme réseau/nnn. Il est + possible de spécifier des adresses IPv4 ou IPv6.

    + +

    Voir la + documentation de mod_authz_host pour d'autres exemples de cette + syntaxe.

    + +

    Vous pouvez insérer le mot-clé not pour inverser un + critère particulier. Notez que le mot not étant la + négation d'une valeur, il ne peut pas être utilisé pour autoriser + ou interdire une requête, car non vrai ne + sera pas interpreté par httpd comme faux. Ainsi, pour interdire la + visite d'une page à l'aide d'une négation, le bloc doit contenir un + élément évalué à vrai ou faux. + Par exemple, si quelqu'un est en train d'inonder + votre forum de messages indésirables, vous pouvez ajouter cette ligne pour lui refuser + l'accès :

    + + +<RequireAll> + Require all granted + Require not ip 10.252.46.165 +</RequireAll> + + +

    Les visiteurs possédant cette adresse (10.252.46.165) ne pourront pas voir le + contenu concerné par cette directive. Si vous voulez interdire + l'accès à une machine en fonction de son nom, vous pouvez ajouter + ceci :

    + + +Require not host host.example.com + + +

    Et si vous voulez interdire l'accès à un domaine particulier, + vous pouvez spécifier des adresses IP partielles ou des noms de + domaine, comme ceci :

    + + +Require not ip 192.168.205 +Require not host phishers.example.com moreidiots.example +Require not host gov + + +

    Les directives RequireAll, RequireAny, et RequireNone permettent également de préciser des + critères d'accès plus complexes.

    + +
    + +
    Contrôle d'accès en fonction de variables +arbitraires + +

    Vous pouvez accorder ou refuser l'accès en fonction de variables + d'environnement arbitraires ou de valeurs d'en-têtes de la requête + en utilisant la directive If. Par exemple, pour interdire l'accès en + fonction du user-agent (le type de navigateur), vous pouvez + spécifier ceci :

    + + +<If "%{HTTP_USER_AGENT} == 'BadBot'"> + Require all denied +</If> + + +

    La syntaxe expr de la directive Require permet de réécrire + l'exemple précédent de la manière suivante :

    + + + +Require expr %{HTTP_USER_AGENT} != 'BadBot' + + + Avertissement : +

    Contrôler l'accès en fonction de l'en-tête + User-Agent n'est pas une technique fiable, car cet + en-tête peut être défini à une valeur quelconque, selon le bon + vouloir de l'utilisateur.

    +
    + +

    Voir le document à propos des expressions pour une description plus + approfondie des syntaxes d'expressions et des variables disponibles.

    + +
    + +
    Utilisation de mod_rewrite pour le contrôle +d'accès + +

    Le drapeau [F] de la directive RewriteRule permet d'envoyer une + réponse de type 403 Forbidden. Il vous permet donc d'interdire + l'accès à une ressource en fonction d'un critère arbitraire.

    + +

    Par exemple, pour bloquer l'accès à une ressources entre 20h et + 6h du matin, vous pouvez utiliser mod_rewrite :

    + + +RewriteEngine On +RewriteCond "%{TIME_HOUR}" ">=20" [OR] +RewriteCond "%{TIME_HOUR}" "<07" +RewriteRule "^/fridge" "-" [F] + + +

    Toute requête arrivant après 20h ou avant 7h du matin provoquera + l'envoi d'une réponse de type 403 Forbidden. Vous pouvez utiliser + cette technique pour vérifier toutes sortes de critères. En outre, + si vous le préférez, vous pouvez rediriger ou réécrire la requête.

    + +

    Notez que la directive If, introduite à partir de la version 2.4, + permet de remplacer le module mod_rewrite dans de + nombreuses situations où il était traditionnellement utilisé, et + il sera probablement préférable pour vous de tenter de l'utiliser + avant de vous tourner vers mod_rewrite.

    + +
    + +
    Informations complémentaires + +

    Le moteur d'expressions vous fournit + une grande puissance d'action en fonction de variables du serveur + arbitraires, et il vous est conseillé de consulter le document + correspondant pour plus de détails.

    + +

    De même, vous devez lire la documentation du module + mod_authz_core pour des exemples de combinaison de + critères d'accès multiples, et en particulier la manière dont ces + derniers interagissent.

    + +

    Voir aussi le How-To Authentification and + autorisation.

    +
    + + diff --git a/docs/manual/howto/access.xml.meta b/docs/manual/howto/access.xml.meta index 14174dccd5d..605822ecb4a 100644 --- a/docs/manual/howto/access.xml.meta +++ b/docs/manual/howto/access.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/howto/auth.html.en b/docs/manual/howto/auth.html.en index 4bf2d362f6e..2d0ac72ac89 100644 --- a/docs/manual/howto/auth.html.en +++ b/docs/manual/howto/auth.html.en @@ -1,22 +1,27 @@ - -Authentication, Authorization and Access Control - Apache HTTP Server +Authentication and Authorization - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Authentication, Authorization and Access Control

    +Apache > HTTP Server > Documentation > Version 2.4 > How-To / Tutorials

    Authentication and Authorization

    +

    See also

    top

    Related Modules and Directives

    @@ -91,7 +96,7 @@ module from each group.

    In addition to these modules, there are also mod_authn_core and - mod_authz_core. These module implement core + mod_authz_core. These modules implement core directives that are core to all auth modules.

    The module mod_authnz_ldap is both an @@ -139,9 +144,8 @@ module from each group.

    an AllowOverride directive like the following:

    -

    - AllowOverride AuthConfig -

    +
    AllowOverride AuthConfig
    +

    Or, if you are just going to put the directives directly in your main server configuration file, you will of course need to @@ -172,7 +176,7 @@ module from each group.

    This file should be placed somewhere not accessible from the web. This is so that folks cannot download the password file. For example, if your - documents are served out of /usr/local/apache/htdocs you + documents are served out of /usr/local/apache/htdocs, you might want to put the password file(s) in /usr/local/apache/passwd.

    @@ -211,16 +215,15 @@ module from each group.

    following directives, either placed in the file /usr/local/apache/htdocs/secret/.htaccess, or placed in httpd.conf inside a <Directory - /usr/local/apache/htdocs/secret> section.

    + "/usr/local/apache/htdocs/secret"> section.

    + +
    AuthType Basic
    +AuthName "Restricted Files"
    +# (Following line optional)
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +Require user rbowen
    -

    - AuthType Basic
    - AuthName "Restricted Files"
    - # (Following line optional)
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require user rbowen -

    Let's examine each of those directives individually. The AuthType directive selects that method that is used to authenticate the user. The most @@ -230,8 +233,8 @@ module from each group.

    the server unencrypted. This method should therefore not be used for highly sensitive data, unless accompanied by mod_ssl. Apache supports one other authentication method: - AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Most recent - browsers support Digest authentication.

    + AuthType Digest. This method is implemented by mod_auth_digest and was intended to be more secure. This is no + longer the case and the connection should be encrypted with mod_ssl instead.

    The AuthName directive sets the Realm to be used in the authentication. The realm serves @@ -263,7 +266,7 @@ module from each group.

    file to authenticate the user on each request. Apache also has the ability to store user information in fast database files. The mod_authn_dbm module provides the AuthDBMUserFile directive. These - files can be created and manipulated with the dbmmanage program. Many + files can be created and manipulated with the dbmmanage and htdbm programs. Many other types of authentication options are available from third party modules in the Apache Modules Database.

    @@ -307,18 +310,18 @@ person in (It's the -c that makes it create a new password file).

    -

    Now, you need to modify your .htaccess file to - look like the following:

    +

    Now, you need to modify your .htaccess file or + <Directory> block + to look like the following:

    + +
    AuthType Basic
    +AuthName "By Invitation Only"
    +# Optional line:
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +AuthGroupFile "/usr/local/apache/passwd/groups"
    +Require group GroupName
    -

    - AuthType Basic
    - AuthName "By Invitation Only"
    - # Optional line:
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName -

    Now, anyone that is listed in the group GroupName, and has an entry in the password file, will be let in, if @@ -328,19 +331,12 @@ person in specific. Rather than creating a group file, you can just use the following directive:

    -

    - Require valid-user -

    +
    Require valid-user
    +

    Using that rather than the Require user rbowen line will allow anyone in that is listed in the password file, - and who correctly enters their password. You can even emulate - the group behavior here, by just keeping a separate password - file for each group. The advantage of this approach is that - Apache only has to check one file, rather than two. The - disadvantage is that you have to maintain a bunch of password - files, and remember to reference the right one in the - AuthUserFile directive.

    + and who correctly enters their password.

    top

    Possible problems

    @@ -374,19 +370,16 @@ person in you can choose dbm or dbd as your storage format.

    -

    To select a dbd file rather than a text file, for example:

    +

    To select a dbm file rather than a text file, for example:

    + +
    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider dbm
    +    AuthDBMUserFile "/www/passwords/passwd.dbm"
    +    Require valid-user
    +</Directory>
    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider dbm
    - AuthDBMUserFile /www/passwords/passwd.dbm
    - Require valid-user
    -
    - </Directory> -

    Other options are available. Consult the mod_authn_dbm documentation for more details.

    @@ -401,18 +394,15 @@ person in scheme that meets your needs. In the following example, both the file and LDAP based authentication providers are being used.

    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file ldap
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthLDAPURL ldap://ldaphost/o=yourorg
    - Require valid-user
    -
    - </Directory> -

    +
    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file ldap
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    AuthLDAPURL ldap://ldaphost/o=yourorg
    +    Require valid-user
    +</Directory>
    +

    In this example the file provider will attempt to authenticate the user first. If it is unable to authenticate the user, the LDAP @@ -427,20 +417,17 @@ person in authorization methods can also be used. In this example both file group authorization as well as LDAP group authorization is being used.

    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    +

    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
         AuthLDAPURL ldap://ldaphost/o=yourorg
    -    AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName
    - Require ldap-group cn=mygroup,o=yourorg
    - - </Directory> -

    + AuthGroupFile "/usr/local/apache/passwd/groups" + Require group GroupName + Require ldap-group cn=mygroup,o=yourorg +</Directory> +

    To take authorization a little further, authorization container directives such as @@ -448,20 +435,20 @@ person in and <RequireAny> allow logic to be applied so that the order in which authorization - is handled can be completely controled through the configuration. + is handled can be completely controlled through the configuration. See Authorization - Containers for an example of they may be applied.

    + Containers for an example of how they may be applied.

    top

    Beyond just authorization

    -

    The way that authorization can be apply is now much more flexible +

    The way that authorization can be applied is now much more flexible than just a single check against a single data store. Ordering, logic and choosing how authorization will be done is now possible.

    Applying logic and ordering

    -

    Controling how and in what order authorization will be applied +

    Controlling how and in what order authorization will be applied has been a bit of a mystery in the past. In Apache 2.2 a provider-based authentication mechanism was introduced to decouple the actual authentication process from authorization and supporting functionality. @@ -504,13 +491,11 @@ person in other than who they are. Something such as where they are coming from.

    -

    The authorization providers - all, - env, - host and - ip let you allow or deny access based other host based - criteria such as host name or ip address of the machine requesting - a document.

    +

    The authorization providers all, + env, host and ip let you + allow or deny access based on other host based criteria such as + host name or ip address of the machine requesting a + document.

    The usage of these providers is specified through the Require directive. @@ -518,16 +503,14 @@ person in that will be called during the authorization stage of the request processing. For example:

    -

    - Require ip address -

    +
    Require ip address
    +

    where address is an IP address (or a partial IP address) or:

    -

    - Require host domain_name -

    +
    Require host domain_name
    +

    where domain_name is a fully qualified domain name (or a partial domain name); you may provide multiple addresses or @@ -537,72 +520,70 @@ person in board, and you want to keep them out, you could do the following:

    -

    - <RequireAll> - - Require all granted
    - Require not ip 10.252.46.165 -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 10.252.46.165
    +</RequireAll>
    +

    Visitors coming from that address will not be able to see the content covered by this directive. If, instead, you have a machine name, rather than an IP address, you can use that.

    -

    - <RequireAll> - - Require all granted
    - Require not host host.example.com -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not host host.example.com
    +</RequireAll>
    +

    And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

    -

    - <RequireAll> - - Require all granted
    - <RequireNone> - - Require ip 192.168.205
    - Require host phishers.example.com moreidiots.example
    - Require host ke -
    - </RequireNone> -
    - </RequireAll> -

    - -

    The above example uses the <RequireNone> directive - to make sure that none of the - Require directives - contained within it - match their parameters before granting access.

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 192.168.205
    +    Require not host phishers.example.com moreidiots.example
    +    Require not host ke
    +</RequireAll>
    + + +

    Using <RequireAll> + with multiple <Require> directives, each negated with not, + will only allow access, if all of negated conditions are true. In other words, + access will be blocked, if any of the negated conditions fails.

    Access Control backwards compatibility

    One of the side effects of adopting a provider based mechanism for - authentication is that the need for the previous access control directives + authentication is that the previous access control directives Order, Allow, Deny and Satisfy are no longer needed. However to provide backwards compatibility for older configurations, these directives have been moved to the mod_access_compat module.

    + +

    Note

    +

    The directives provided by mod_access_compat have + been deprecated by mod_authz_host. + Mixing old directives like Order, Allow or Deny with new ones like + Require is technically possible + but discouraged. The mod_access_compat module was created to support + configurations containing only old directives to facilitate the 2.4 upgrade. + Please check the upgrading guide for more + information. +

    +
    top
    -

    Authentication Cacheing

    +

    Authentication Caching

    There may be times when authentication puts an unacceptable load on a provider or on your network. This is most likely to affect users of mod_authn_dbd (or third-party/custom providers). - To deal with this, HTTPD 2.3/2.4 introduces a new cacheing provider + To deal with this, HTTPD 2.3/2.4 introduces a new caching provider mod_authn_socache to cache credentials and reduce the load on the origin provider(s).

    This may offer a substantial performance boost to some users.

    @@ -610,10 +591,10 @@ person in

    More information

    You should also read the documentation for - mod_auth_basic and mod_authz_host which - contain some more information about how this all works. - The directive <AuthnProviderAlias> - can also help in simplifying certain authentication configurations.

    + mod_auth_basic and mod_authz_host + which contain some more information about how this all works. The + directive <AuthnProviderAlias> can also help + in simplifying certain authentication configurations.

    The various ciphers supported by Apache for authentication data are explained in Password @@ -629,7 +610,28 @@ person in  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/auth.html.fr b/docs/manual/howto/auth.html.fr index f33dda669af..23c070eaf7b 100644 --- a/docs/manual/howto/auth.html.fr +++ b/docs/manual/howto/auth.html.fr @@ -1,22 +1,27 @@ - -Authentification, autorisation et contrle d'accs - Serveur Apache HTTP +Authentification et autorisation - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Authentification, autorisation et contrle d'accs

    +Apache > Serveur HTTP > Documentation > Version 2.4 > Recettes / Tutoriels

    Authentification et autorisation

    Langues Disponibles:  en  |  fr  | @@ -47,7 +52,7 @@ d'authentification autorisation

  • Mise en cache de l'authentification
  • Pour aller plus loin . . .
  • -
    +

    Voir aussi

    top

    Modules et directives concerns

    @@ -141,9 +146,8 @@ module de chaque groupe.

    d'une directive AllowOverride du style :

    -

    - AllowOverride AuthConfig -

    +
    AllowOverride AuthConfig
    +

    Si vous avez l'intention d'ajouter les directives directement dans le fichier de configuration principal, vous devrez bien entendu @@ -217,16 +221,15 @@ module de chaque groupe.

    utiliser les directives suivantes, soit dans le fichier /usr/local/apache/htdocs/secret/.htaccess, soit dans le fichier httpd.conf l'intrieur d'une section <Directory - /usr/local/apache/htdocs/secret> :

    + "/usr/local/apache/htdocs/secret"> :

    + +
    AuthType Basic
    +AuthName "Restricted Files"
    +# (Following line optional)
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +Require user rbowen
    -

    - AuthType Basic
    - AuthName "Fichiers rservs"
    - # (La ligne suivante est facultative)
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require user rbowen -

    Examinons ces directives une une. La directive AuthType dfinit la mthode utilise pour authentifier l'utilisateur. La mthode la plus @@ -237,8 +240,9 @@ module de chaque groupe.

    tre utilise pour la transmission de donnes hautement sensibles si elle n'est pas associe au module mod_ssl. Apache supporte une autre mthode d'authentification : AuthType - Digest. Cette mthode est implmente par le module mod_auth_digest et est beaucoup plus scurise. La plupart - des navigateurs rcents supportent l'authentification Digest.

    + Digest. Cette mthode est implmente par le module mod_auth_digest et a t conue pour + amliorer la scurit. Ce but n'a cependant pas t atteint et il est prfrable + de chiffrer la connexion avec mod_ssl.

    La directive AuthName dfinit l'Identificateur (Realm) utiliser avec @@ -273,7 +277,8 @@ module de chaque groupe.

    rapidement, et pour pallier cet inconvnient, Apache peut aussi stocker les donnes relatives aux utilisateurs dans des bases de donnes rapides. Le module - mod_authn_dbm fournit la directive AuthDBMUserFile. Le programme dbmmanage permet de crer et manipuler ces fichiers. Vous + mod_authn_dbm fournit la directive AuthDBMUserFile. Les programmes dbmmanage et htdbm permettent de + crer et manipuler ces fichiers. Vous trouverez de nombreuses options d'autres types d'authentification fournies par des modules tiers dans la Base de donnes des modules d'Apache.

    @@ -319,17 +324,16 @@ plusieurs personnes mots de passe)..

    Maintenant, vous devez modifier votre fichier - .htaccess comme suit :

    + .htaccess ou la section <Directory> comme suit :

    + +
    AuthType Basic
    +AuthName "By Invitation Only"
    +# Optional line:
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +AuthGroupFile "/usr/local/apache/passwd/groups"
    +Require group GroupName
    -

    - AuthType Basic
    - AuthName "By Invitation Only"
    - # Ligne facultative :
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthGroupFile /usr/local/apache/passwd/groups
    - Require group Nom-de-groupe -

    Maintenant, quiconque appartient au groupe Nom-de-groupe, et possde une entre dans le fichier @@ -340,20 +344,13 @@ plusieurs personnes l'accs plusieurs personnes. Plutt que de crer un fichier de groupes, il vous suffit d'ajouter la directive suivante :

    -

    - Require valid-user -

    +
    Require valid-user
    +

    Le remplacement de la ligne Require user rbowen par la ligne Require valid-user autorisera l'accs quiconque possdant une entre dans le fichier password, et ayant - tap le bon mot de passe. Vous pouvez mme simuler le comportement - des groupes en associant un fichier de mots de passe diffrent pour - chaque groupe. L'avantage de cette approche rside dans le fait - qu'Apache ne doit consulter qu'un fichier au lieu de deux. Par - contre, vous devez maintenir un nombre plus ou moins important de - fichiers de mots de passe, et vous assurer de faire rfrence au bon - fichier dans la directive AuthUserFile.

    + tap le bon mot de passe.

    top

    Problmes possibles

    @@ -394,17 +391,16 @@ passe

    Par exemple, pour slectionner un fichier dbm la place d'un fichier texte :

    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider dbm
    - AuthDBMUserFile /www/passwords/passwd.dbm
    - Require valid-user
    -
    - </Directory> -

    +
    <Directory "/www/docs/private">
    +
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider dbm
    +    AuthDBMUserFile "/www/passwords/passwd.dbm"
    +    Require valid-user
    +
    +</Directory>
    +

    D'autres options sont disponibles. Consultez la documentation de mod_authn_dbm pour plus de dtails.

    @@ -422,18 +418,17 @@ d'authentification conjointement les fournisseurs d'authentification file et LDAP :

    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file ldap
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthLDAPURL ldap://ldaphost/o=yourorg
    - Require valid-user
    -
    - </Directory> -

    +
    <Directory "/www/docs/private">
    +
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file ldap
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    AuthLDAPURL ldap://ldaphost/o=yourorg
    +    Require valid-user
    +
    +</Directory>
    +

    Dans cet exemple, le fournisseur file va tenter d'authentifier l'utilisateur en premier. S'il n'y parvient pas, le fournisseur LDAP @@ -451,20 +446,19 @@ d'authentification autorisation base de fichier de groupes et une autorisation base de groupes LDAP.

    -

    - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    +

    <Directory "/www/docs/private">
    +
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
         AuthLDAPURL ldap://ldaphost/o=yourorg
    -    AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName
    - Require ldap-group cn=mygroup,o=yourorg
    - - </Directory> -

    + AuthGroupFile "/usr/local/apache/passwd/groups" + Require group GroupName + Require ldap-group cn=mygroup,o=yourorg + +</Directory> +

    Pour un scnario d'autorisation un peu plus avanc, des directives de conteneur d'autorisation comme <RequireAll> et @@ -533,11 +527,9 @@ autorisation bas sur leur identit ; il peut dpendre, par exemple de leur provenance.

    -

    Les fournisseurs d'autorisation - all, - env, - host et - ip vous permettent d'accorder ou refuser l'accs en +

    Les fournisseurs d'autorisation all, + env, host et ip vous + permettent d'accorder ou refuser l'accs en fonction de critres tels que le nom d'hte ou l'adresse IP de la machine qui effectue la requte.

    @@ -547,16 +539,14 @@ autorisation seront appels dans le processus d'autorisation au cours du traitement de la requte. Par exemple :

    -

    - Require ip adresse -

    +
    Require ip address
    +

    o adresse est une adresse IP (ou une adresse IP partielle) ou :

    -

    - Require host nom_domaine -

    +
    Require host domain_name
    +

    o nom_domaine est un nom de domaine entirement qualif (ou un nom de domaine partiel) ; vous pouvez indiquer @@ -565,53 +555,41 @@ autorisation

    Par exemple, si vous voulez rejeter les spams dont une machine vous inonde, vous pouvez utiliser ceci :

    -

    - <RequireAll> - - Require all granted
    - Require not ip 10.252.46.165 -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 10.252.46.165
    +</RequireAll>
    +

    Ainsi, les visiteurs en provenance de cette adresse ne pourront pas voir le contenu concern par cette directive. Si, par contre, vous connaissez le nom de la machine, vous pouvez utiliser ceci :

    -

    - <RequireAll> - - Require all granted
    - Require not host serveur.example.com -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not host host.example.com
    +</RequireAll>
    +

    Et si vous voulez interdire l'accs toutes les machines d'un domaine, vous pouvez spcifier une partie seulement de l'adresse ou du nom de domaine :

    -

    - <RequireAll> - - Require all granted
    - <RequireNone> - - Require ip 192.168.205
    - Require host phishers.example.com autres-idiots.exemple
    - Require host ke -
    - </RequireNone> -
    - </RequireAll> -

    - -

    Dans l'exemple ci-dessus, on utilise la directive du - conteneur <RequireNone> afin de s'assurer - qu'aucune des directives Require qu'il contient ne - fasse correspondre ses paramtres avant d'accorder - l'autorisation.

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 192.168.205
    +    Require not host phishers.example.com moreidiots.example
    +    Require not host ke
    +</RequireAll>
    + + +

    L'utilisation de la directive <RequireAll> + avec de multiples directives <Require>, toutes avec la ngation + not, n'accordera l'accs que si toutes les + conditions ngatives sont vrifies. En d'autres termes, l'accs + sera refus si au moins une des conditions ngatives n'est pas + vrifie.

    @@ -624,6 +602,18 @@ autorisation configurations, ces directives ont t dplaces vers le module mod_access_compat.

    +

    Note

    +

    Les directives fournies par le module + mod_access_compat sont devenues obsoltes depuis + la refonte du module mod_authz_host. Mlanger d'anciennes + directives comme Order, Allow ou Deny avec des nouvelles comme + Require est techniquement + possible mais dconseill. En effet, mod_access_compat a + t conu pour supporter des configurations ne contenant que des anciennes + directives afin de faciliter le passage la version 2.4. Voir le document + upgrading pour plus de dtails. +

    +
    top
    @@ -648,7 +638,7 @@ autorisation qui contient des informations supplmentaires propos du fonctionnement de tout ceci. Certaines configurations d'authentification peuvent aussi tre - simplifies l'aide de la directive <AuthnProviderAlias>.

    + simplifies l'aide de la directive <AuthnProviderAlias>.

    Les diffrents algorithmes de chiffrement supports par Apache pour authentifier les donnes sont expliqus dans PasswordEncryptions.

    @@ -664,7 +654,28 @@ autorisation  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/auth.html.ja.utf8 b/docs/manual/howto/auth.html.ja.utf8 index c198e90248b..fde0969a5d2 100644 --- a/docs/manual/howto/auth.html.ja.utf8 +++ b/docs/manual/howto/auth.html.ja.utf8 @@ -1,32 +1,38 @@ - -認証、承認、アクセス制御 - Apache HTTP サーバ +認証、承認、アクセス制御 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    認証、承認、アクセス制御

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    「認証」とは、誰かが自分は誰であるかを主張した場合に、 それを確認するための全過程を指します。「承認」とは、 @@ -44,7 +50,7 @@

  • 複数のプロバイダを使用する
  • 単純な承認のその先
  • 追加情報
  • -
    +

    参照

    top
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/auth.html.ko.euc-kr b/docs/manual/howto/auth.html.ko.euc-kr index 4262471f0c6..077046fdce1 100644 --- a/docs/manual/howto/auth.html.ko.euc-kr +++ b/docs/manual/howto/auth.html.ko.euc-kr @@ -1,23 +1,28 @@ - (Authentication), Ѻο(Authorization), -(Access Control) - Apache HTTP Server +(Access Control) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    (Authentication), Ѻο(Authorization), +Apache > HTTP Server > Documentation > Version 2.4 > How-To / Tutorials

    (Authentication), Ѻο(Authorization), (Access Control)

    :  en  | @@ -41,7 +46,7 @@

  • ߻ ִ
  • ٸ Ѱ?
  • -
    +

    top

    þ

    @@ -321,7 +326,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/auth.html.tr.utf8 b/docs/manual/howto/auth.html.tr.utf8 index b8800efdfad..1bcd11e2988 100644 --- a/docs/manual/howto/auth.html.tr.utf8 +++ b/docs/manual/howto/auth.html.tr.utf8 @@ -1,22 +1,27 @@ - -Kimlik Doğrulama, Yetkilendirme ve Erişim Denetimi - Apache HTTP Sunucusu +Kimlik Doğrulama ve Yetkilendirme - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Kimlik Doğrulama, Yetkilendirme ve Erişim Denetimi

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Nasıllar ve Öğreticiler

    Kimlik Doğrulama ve Yetkilendirme

    Mevcut Diller:  en  |  fr  | @@ -24,12 +29,14 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Kimlik Doğrulama istediğiniz kişileri teyid etme işlemidir. - Yetkilendirme ise kişilerin nereye gireceklerine ve hangi bilgiye - ulaşacaklarına müsaade edilmesi işlemidir.

    -
    + Yetkilendirme ise kişilerin nereye gireceklerine ve hangi bilgiye + ulaşacaklarına müsaade edilmesi işlemidir.

    + +

    Genel erişim denetimi için Erişim Denetimi + Nasıl belgesine bakınız.

    +
    +

    Ayrıca bakınız:

    top

    İlgili modüller ve Yönergeler

    @@ -65,6 +73,7 @@
  • mod_authn_dbm
  • mod_authn_file
  • mod_authnz_ldap
  • +
  • mod_authn_socache
  • Yetkilendirme (bkz. @@ -132,9 +141,8 @@

    Kimlik doğrulamadan sözettiğimize göre, aşağıda gösterilen şekilde bir AllowOverride yönergesine ihtiyacınız olacaktır:

    -

    - AllowOverride AuthConfig -

    +
    AllowOverride AuthConfig
    +

    Yönergeleri doğrudan ana sunucunun yapılandırma dosyasına koyacaksanız bu dosyaya yazma izniniz olmalıdır.

    @@ -204,16 +212,15 @@ amaçlıyorsanız, şu yönergeleri kullanabilirsiniz. Bu yönergeleri /usr/local/apache/htdocs/secret/.htaccess dosyası içine veya httpd.conf içindeki <Directory - /usr/local/apache/htdocs/secret> bölümüne koyabilirsiniz.

    + "/usr/local/apache/htdocs/secret"> bölümüne koyabilirsiniz.

    + +
    AuthType Basic
    +AuthName "Gizli Dosyalar"
    +# (Aşağıdaki satırın kullanımı isteğe bağlıdır)
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +Require user umut
    -

    - AuthType Basic
    - AuthName "Gizli Dosyalar"
    - # (Aşağıdaki satırın kullanımı isteğe bağlıdır)
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require user umut -

    Bu yönergeleri tek tek inceleyelim. AuthType yönergesi @@ -226,9 +233,9 @@ hassasiyete sahip bilgiler için kullanılmamalıdır. Apache bir başka kimlik doğrulama yöntemini daha destekler: AuthType Digest. Bu yöntem mod_auth_digest tarafından - gerçeklenmiştir ve çok daha güvenlidir. Güncel tarayıcılar, Özet - (Digest) kimlik doğrulama yöntemini - desteklemektedir.

    + gerçeklenmişti ve çok daha güvenli olacağı düşünülmüştü. Bu artık + geçerliliğini yitirdiğinden bağlantının bundan böyle + mod_ssl ile şifrelenmesi gerekmektedir.

    AuthName yönergesi ile kimlik doğrulamada kullanılacak Saha da @@ -263,8 +270,9 @@ dosyasında depolama özelliğine de sahiptir. Bu amaçla, mod_authn_dbm modülünün AuthDBMUserFile - yönergesi kullanılabilir. Bu dosyalar dbmmanage - programı ile oluşturulabilir ve değiştirilebilir. Apache modülleri + yönergesi kullanılabilir. Bu dosyalar dbmmanage ve + htdbm programı ile oluşturulabilir ve değiştirilebilir. + Apache modülleri Veritabanı içindeki üçüncü parti modüllerinde çok sayıda başka kimlik doğrulama türü de vardır.

    @@ -307,18 +315,18 @@ (Yeni bir parola dosyası oluşturmak için -c seçeneği kullanılır).

    -

    Şimdi, .htaccess dosyanızı aşağıda görüldüğü şekilde - değiştirebilirsiniz:

    +

    Şimdi, .htaccess dosyanızı veya + <Directory> bölümünüzü + aşağıda görüldüğü şekilde değiştirebilirsiniz:

    + +
    AuthType Basic
    +AuthName "Davete Binaen"
    +# Satır isteğe bağlıdır:
    +AuthBasicProvider file
    +AuthUserFile "/usr/local/apache/passwd/passwords"
    +AuthGroupFile "/usr/local/apache/passwd/groups"
    +Require group Grupismi
    -

    - AuthType Basic
    - AuthName "Davete Binaen"
    - # Satır isteğe bağlıdır:
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthGroupFile /usr/local/apache/passwd/groups
    - Require group Grupismi -

    Artık, Grupismi gurubunda listelenmiş ve password dosyasında kaydı olan kişiye, parolayı doğru @@ -328,19 +336,13 @@ yol daha mevcuttur. Bir gurup dosyası oluşturmaktansa, şu yönergeyi kullanabilirsiniz:

    -

    - Require valid-user -

    +
    Require valid-user
    +

    Require user umut satırı ile parola dosyasında listelenmiş ve parolayı doğru olarak giren herhangi bir kişiye izin vermektense, her grup için ayrı bir parola dosyası tutarak grup - davranışını taklit edebilirsiniz. Bu yaklaşımın getirisi: - Apache iki dosya yerine sadece bir dosyaya bakar. - Götürüsü ise parola dosyalarından oluşan bir dosya demeti sağlamak - ve AuthUserFile - yönergesinde doğru dosyayı belirtmeyi unutmamak zorunda - kalmanızdır.

    + davranışını taklit edebilirsiniz.

  • top
    @@ -374,17 +376,16 @@ AuthBasicProvider file yerine, dbm veya dbd kullanabilirsiniz.

    -

    Bir metin dosyası yerine bir dbd dosyası kullanım örneği:

    +

    Bir metin dosyası yerine bir dbm dosyası kullanım örneği:

    + +
    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider dbm
    +    AuthDBMUserFile "/www/passwords/passwd.dbm"
    +    Require valid-user
    +</Directory>
    -

    - <Directory /www/docs/private>
    - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider dbm
    - AuthDBMUserFile /www/passwords/passwd.dbm
    - Require valid-user
    - </Directory> -

    Başka seçenekler de mümkündür. Ayrınılar için mod_authn_dbm belgesine başvurun.

    @@ -400,16 +401,15 @@ örnekte dosya ve LDAP tabanlı kimlik doğrulama tedarikçileri bir arada kullanılmıştır.

    -

    - <Directory /www/docs/private>
    - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file ldap
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthLDAPURL ldap://ldaphost/o=yourorg
    - Require valid-user
    - </Directory> -

    +
    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file ldap
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    AuthLDAPURL ldap://ldaphost/o=yourorg
    +    Require valid-user
    +</Directory>
    +

    Bu örnekte dosya tedarikçisi, ilk olarak kullanıcının kimliğini doğrulamaya teşebbüs edecektir. Kullanıcının kimliği @@ -424,18 +424,17 @@ dosya için hem dosyalı hem de LDAP grup kimlik doğrulaması kullanılmıştır.

    -

    - <Directory /www/docs/private>
    - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    +

    <Directory "/www/docs/private">
    +    AuthName "Private"
    +    AuthType Basic
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
         AuthLDAPURL ldap://ldaphost/o=yourorg
    -    AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName
    - Require ldap-group cn=mygroup,o=yourorg
    - </Directory> -

    + AuthGroupFile "/usr/local/apache/passwd/groups" + Require group GroupName + Require ldap-group cn=mygroup,o=yourorg +</Directory> +

    Kimlik doğrulama konusunu biraz daha genişletirsek, <RequireAll> ve <RequireAny> gibi yetkilendirme taşıyıcısı @@ -475,7 +474,7 @@ Yetkilendirme Taşıyıcıları bölümüne bakınız.

    -

    Öntanımlı olarak tüm +

    Öntanımlı olarak tüm Require yönergeleri, <RequireAny> taşıyıcı yönergesinin içine konur. Başka bir deyişle eğer belirtilen kimlik doğrulama yöntemlerinden herhangi biri başarılı @@ -491,26 +490,24 @@ değil birşeylere dayanarak izin vermek istersiniz. Örneğin nereden geldikleri gibi.

    -

    all, env, host ve ip gibi yetkilendirme - tedarikçileri ile, bir belgenin istendiği makinenin IP adresi veya - konak ismi gibi bazı özelliklerine dayalı olarak erişime izin - verip vermeyeceğinizi belirtebilirsiniz.

    +

    all, env, host ve + ip gibi yetkilendirme tedarikçileri ile, bir belgenin + istendiği makinenin IP adresi veya konak ismi gibi bazı özelliklerine + dayalı olarak erişime izin verip vermeyeceğinizi belirtebilirsiniz.

    Bu tedarikçilerin kullanımı Require yönergesinde açıklanmıştır. Bu yönergeler, isteklerin işlenmesi sırasında yetkilendirme aşamasında çağırılacak yetkilendirme tedarikçilerini kayda geçirir. Örneğin:

    -

    - Require ip adres -

    +
    Require ip adres
    +

    Burada, adres bir IP adresidir (veya kısmi bir IP addresidir)

    -

    - Require host alan_adı -

    +
    Require host alan_adı
    +

    Burada, alan_adı bir tam nitelikli alan adıdır (ya da kısmi alan adıdır); gerekirse çok sayıda alan adı veya IP @@ -520,51 +517,39 @@ tutmak istediğinizi varsayalım. Bu kişiyi uzak tutmak için şunları yapabilirsiniz:

    -

    - <RequireAll> - - Require all granted
    - Require not ip 10.252.46.165 -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 10.252.46.165
    +</RequireAll>
    +

    Bu adresden gelen ziyaretçiler bu yönergedeki içeriği göremeyeceklerdir. Bunun yerine, elinizde IP adresi değil de makine adı varsa şunu kullanabilirsiniz:

    -

    - <RequireAll> - - Require all granted
    - Require not host host.example.com -
    - </RequireAll> -

    +
    <RequireAll>
    +    Require all granted
    +    Require not host host.example.com
    +</RequireAll>
    +

    Eğer alan adının tamanıdan gelecek olan bütün erişimleri engellemek isterseniz adresin ya da alan adının bir parçasını belirtin:

    -

    - <RequireAll> - - Require all granted
    - <RequireNone> - - Require ip 192.168.205
    - Require host phishers.example.com moreidiots.example
    - Require host ke -
    - </RequireNone> -
    - </RequireAll> -

    - -

    Yukarıdaki örnekte, <RequireNone> yönergesi içindeki - Require - yönergelerinin değiştirgeleriyle hiçbir bir eşleşme olmaması - durumunda erişime izin verilir.

    +
    <RequireAll>
    +    Require all granted
    +    Require not ip 192.168.205
    +    Require not host phishers.example.com moreidiots.example
    +    Require not host ke
    +</RequireAll>
    + + +

    <RequireAll> yönergesini çok sayıda + <Require> yönergesi ile birlikte kullanarak, + sadece not ile olumsuzlanan tüm koşulları gerçekleyen + bağlantılara erişim verilir. Başka bir deyişle, olumsuzlanan koşulları + gerçeklemeyen bağlantıların erişimi engellenir.

    @@ -580,14 +565,36 @@ yapılandırmalarla uyumluluğu sağlamak için bu yönergeler mod_access_compat modülüne taşınmıştır.

    +

    Note

    +

    mod_access_compat ile sağlanan yönergelerin + kullanımı artık önerilmemekte, mod_authz_host + modülündeki yönergeler önerilmektedir. Order, Allow veya Deny ile + Require gibi daha yeni + olanlarının yenilerle karışık kullanımı teknik olarak mümkünse de + önerilmemektedir. mod_access_compat modülü, 2.4 + yükseltmesini kolaylaştırmak için sadece eski yönergeleri içeren + yapılandırmaları desteklemek üzere oluşturulmuştur. Daha ayrıntılı + bilgi için yükseltme belgesine bakınız. +

    +
    top
    +

    Kimlik Doğrulama Arabelleği

    +

    Zaman zaman kimlik doğrulama ağınızda veya sağlayıcı(ları)nızda kabul + edilemez yükler oluşturur. Bu çoğunlukla mod_authn_dbd + (veya üçüncü parti/özel sağlayıcıların) kullanıcılarını etkiler. Bununla + ilgilenmek için httpd 2.3/2.4, kimlik bilgilerini arabelleklemek ve özgün + sağlayıcıların yüklerini azaltmak için yeni bir arabellekleme sağlayıcısı + olarak mod_authn_socache modülü ile gelmektedir.

    +

    Bu, bazı kullanıcılar için önemli bir başarım artışı sağlayabilir.

    +
    top
    +

    Daha fazla bilgi

    Daha fazla bilgi için mod_auth_basic ve mod_authz_host modüllerinin belgelerine bakınız. - <AuthnProviderAlias> + AuthnProviderAlias yönergesi ile bazı yapılandırmalarınızı basitleştirebilirsiniz.

    Apache tarafından desteklenen şifrelerle ilgili bilgi için Parola Biçemleri @@ -602,7 +609,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/auth.xml b/docs/manual/howto/auth.xml index 22b637d1bb0..24ea1823194 100644 --- a/docs/manual/howto/auth.xml +++ b/docs/manual/howto/auth.xml @@ -23,7 +23,7 @@ How-To / Tutorials -Authentication, Authorization and Access Control +Authentication and Authorization

    Authentication is any process by which you verify that @@ -78,7 +78,7 @@ module from each group.

    In addition to these modules, there are also mod_authn_core and - mod_authz_core. These module implement core + mod_authz_core. These modules implement core directives that are core to all auth modules.

    The module mod_authnz_ldap is both an @@ -127,9 +127,7 @@ module from each group.

    an AllowOverride directive like the following:

    - - AllowOverride AuthConfig - + AllowOverride AuthConfig

    Or, if you are just going to put the directives directly in your main server configuration file, you will of course need to @@ -160,7 +158,7 @@ module from each group.

    This file should be placed somewhere not accessible from the web. This is so that folks cannot download the password file. For example, if your - documents are served out of /usr/local/apache/htdocs you + documents are served out of /usr/local/apache/htdocs, you might want to put the password file(s) in /usr/local/apache/passwd.

    @@ -199,16 +197,16 @@ module from each group.

    following directives, either placed in the file /usr/local/apache/htdocs/secret/.htaccess, or placed in httpd.conf inside a <Directory - /usr/local/apache/htdocs/secret> section.

    + "/usr/local/apache/htdocs/secret"> section.

    - - AuthType Basic
    - AuthName "Restricted Files"
    - # (Following line optional)
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require user rbowen -
    + +AuthType Basic +AuthName "Restricted Files" +# (Following line optional) +AuthBasicProvider file +AuthUserFile "/usr/local/apache/passwd/passwords" +Require user rbowen +

    Let's examine each of those directives individually. The AuthType directive selects @@ -220,8 +218,9 @@ module from each group.

    highly sensitive data, unless accompanied by mod_ssl. Apache supports one other authentication method: AuthType Digest. This method is implemented by mod_auth_digest and is much more secure. Most recent - browsers support Digest authentication.

    + >mod_auth_digest and was intended to be more secure. This is no + longer the case and the connection should be encrypted with mod_ssl instead.

    The AuthName directive sets the Realm to be used in the authentication. The realm serves @@ -256,7 +255,7 @@ module from each group.

    The mod_authn_dbm module provides the AuthDBMUserFile directive. These files can be created and manipulated with the - dbmmanage program. Many + dbmmanage and htdbm programs. Many other types of authentication options are available from third party modules in the Apache Modules @@ -302,18 +301,19 @@ person in (It's the -c that makes it create a new password file).

    -

    Now, you need to modify your .htaccess file to - look like the following:

    +

    Now, you need to modify your .htaccess file or + Directory block + to look like the following:

    - - AuthType Basic
    - AuthName "By Invitation Only"
    - # Optional line:
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName -
    + +AuthType Basic +AuthName "By Invitation Only" +# Optional line: +AuthBasicProvider file +AuthUserFile "/usr/local/apache/passwd/passwords" +AuthGroupFile "/usr/local/apache/passwd/groups" +Require group GroupName +

    Now, anyone that is listed in the group GroupName, and has an entry in the password file, will be let in, if @@ -323,19 +323,11 @@ person in specific. Rather than creating a group file, you can just use the following directive:

    - - Require valid-user - + Require valid-user

    Using that rather than the Require user rbowen line will allow anyone in that is listed in the password file, - and who correctly enters their password. You can even emulate - the group behavior here, by just keeping a separate password - file for each group. The advantage of this approach is that - Apache only has to check one file, rather than two. The - disadvantage is that you have to maintain a bunch of password - files, and remember to reference the right one in the - AuthUserFile directive.

    + and who correctly enters their password.

    Possible problems @@ -370,19 +362,17 @@ person in you can choose dbm or dbd as your storage format.

    -

    To select a dbd file rather than a text file, for example:

    +

    To select a dbm file rather than a text file, for example:

    - - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider dbm
    - AuthDBMUserFile /www/passwords/passwd.dbm
    - Require valid-user
    -
    - </Directory> -
    + +<Directory "/www/docs/private"> + AuthName "Private" + AuthType Basic + AuthBasicProvider dbm + AuthDBMUserFile "/www/passwords/passwd.dbm" + Require valid-user +</Directory> +

    Other options are available. Consult the mod_authn_dbm documentation for more details.

    @@ -397,18 +387,16 @@ person in scheme that meets your needs. In the following example, both the file and LDAP based authentication providers are being used.

    - - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file ldap
    - AuthUserFile /usr/local/apache/passwd/passwords
    - AuthLDAPURL ldap://ldaphost/o=yourorg
    - Require valid-user
    -
    - </Directory> -
    + +<Directory "/www/docs/private"> + AuthName "Private" + AuthType Basic + AuthBasicProvider file ldap + AuthUserFile "/usr/local/apache/passwd/passwords" + AuthLDAPURL ldap://ldaphost/o=yourorg + Require valid-user +</Directory> +

    In this example the file provider will attempt to authenticate the user first. If it is unable to authenticate the user, the LDAP @@ -423,20 +411,18 @@ person in authorization methods can also be used. In this example both file group authorization as well as LDAP group authorization is being used.

    - - <Directory /www/docs/private>
    - - AuthName "Private"
    - AuthType Basic
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    + +<Directory "/www/docs/private"> + AuthName "Private" + AuthType Basic + AuthBasicProvider file + AuthUserFile "/usr/local/apache/passwd/passwords" AuthLDAPURL ldap://ldaphost/o=yourorg - AuthGroupFile /usr/local/apache/passwd/groups
    - Require group GroupName
    - Require ldap-group cn=mygroup,o=yourorg
    -
    - </Directory> -
    + AuthGroupFile "/usr/local/apache/passwd/groups" + Require group GroupName + Require ldap-group cn=mygroup,o=yourorg +</Directory> +

    To take authorization a little further, authorization container directives such as @@ -444,20 +430,20 @@ person in and RequireAny allow logic to be applied so that the order in which authorization - is handled can be completely controled through the configuration. + is handled can be completely controlled through the configuration. See Authorization - Containers for an example of they may be applied.

    + Containers for an example of how they may be applied.

    Beyond just authorization -

    The way that authorization can be apply is now much more flexible +

    The way that authorization can be applied is now much more flexible than just a single check against a single data store. Ordering, logic and choosing how authorization will be done is now possible.

    Applying logic and ordering -

    Controling how and in what order authorization will be applied +

    Controlling how and in what order authorization will be applied has been a bit of a mystery in the past. In Apache 2.2 a provider-based authentication mechanism was introduced to decouple the actual authentication process from authorization and supporting functionality. @@ -500,13 +486,11 @@ person in other than who they are. Something such as where they are coming from.

    -

    The authorization providers - all, - env, - host and - ip let you allow or deny access based other host based - criteria such as host name or ip address of the machine requesting - a document.

    +

    The authorization providers all, + env, host and ip let you + allow or deny access based on other host based criteria such as + host name or ip address of the machine requesting a + document.

    The usage of these providers is specified through the Require directive. @@ -514,16 +498,12 @@ person in that will be called during the authorization stage of the request processing. For example:

    - - Require ip address - + Require ip address

    where address is an IP address (or a partial IP address) or:

    - - Require host domain_name - + Require host domain_name

    where domain_name is a fully qualified domain name (or a partial domain name); you may provide multiple addresses or @@ -533,73 +513,77 @@ person in board, and you want to keep them out, you could do the following:

    - - <RequireAll> - - Require all granted
    - Require not ip 10.252.46.165 -
    - </RequireAll> -
    + +<RequireAll> + Require all granted + Require not ip 10.252.46.165 +</RequireAll> +

    Visitors coming from that address will not be able to see the content covered by this directive. If, instead, you have a machine name, rather than an IP address, you can use that.

    - - <RequireAll> - - Require all granted
    - Require not host host.example.com -
    - </RequireAll> -
    + +<RequireAll> + Require all granted + Require not host host.example.com +</RequireAll> +

    And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:

    - - <RequireAll> - - Require all granted
    - <RequireNone> - - Require ip 192.168.205
    - Require host phishers.example.com moreidiots.example
    - Require host ke -
    - </RequireNone> -
    - </RequireAll> -
    - -

    The above example uses the RequireNone directive - to make sure that none of the - Require directives - contained within it - match their parameters before granting access.

    + +<RequireAll> + Require all granted + Require not ip 192.168.205 + Require not host phishers.example.com moreidiots.example + Require not host ke +</RequireAll> + + +

    Using RequireAll + with multiple Require directives, each negated with not, + will only allow access, if all of negated conditions are true. In other words, + access will be blocked, if any of the negated conditions fails.

    Access Control backwards compatibility

    One of the side effects of adopting a provider based mechanism for - authentication is that the need for the previous access control directives + authentication is that the previous access control directives Order, Allow, Deny and Satisfy are no longer needed. However to provide backwards compatibility for older configurations, these directives have been moved to the mod_access_compat module.

    + + Note +

    The directives provided by mod_access_compat have + been deprecated by mod_authz_host. + Mixing old directives like Order, Allow or Deny with new ones like + Require is technically possible + but discouraged. The mod_access_compat module was created to support + configurations containing only old directives to facilitate the 2.4 upgrade. + Please check the upgrading guide for more + information. +

    +
    -
    Authentication Cacheing +
    Authentication Caching

    There may be times when authentication puts an unacceptable load on a provider or on your network. This is most likely to affect users of mod_authn_dbd (or third-party/custom providers). - To deal with this, HTTPD 2.3/2.4 introduces a new cacheing provider + To deal with this, HTTPD 2.3/2.4 introduces a new caching provider mod_authn_socache to cache credentials and reduce the load on the origin provider(s).

    This may offer a substantial performance boost to some users.

    @@ -607,10 +591,11 @@ person in
    More information

    You should also read the documentation for - mod_auth_basic and mod_authz_host which - contain some more information about how this all works. - The directive <AuthnProviderAlias> - can also help in simplifying certain authentication configurations.

    + mod_auth_basic and mod_authz_host + which contain some more information about how this all works. The + directive AuthnProviderAlias can also help + in simplifying certain authentication configurations.

    The various ciphers supported by Apache for authentication data are explained in Password diff --git a/docs/manual/howto/auth.xml.fr b/docs/manual/howto/auth.xml.fr index 5f3ebe5cabf..10eef4088c7 100644 --- a/docs/manual/howto/auth.xml.fr +++ b/docs/manual/howto/auth.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,21 +25,21 @@ Recettes / Tutoriels -Authentification, autorisation et contrôle d'accès +Authentification et autorisation

    -

    L'authentification est un processus qui vous permet de vérifier - qu'une personne est bien celle qu'elle prétend être. L'autorisation - est un processus qui permet à une personne d'aller là où elle veut - aller, ou d'obtenir les informations qu'elle désire.

    +

    L'authentification est un processus qui vous permet de vérifier + qu'une personne est bien celle qu'elle prétend être. L'autorisation + est un processus qui permet à une personne d'aller là où elle veut + aller, ou d'obtenir les informations qu'elle désire.

    -

    Pour le contrôle d'accès en général, voir le How-To Contrôle d'accès.

    +

    Pour le contrôle d'accès en général, voir le How-To Contrôle d'accès.

    -
    Mapping URLs to the Filesystem @@ -72,9 +73,9 @@ assumed to be a directory path relative to the home directory of the specified user. Given this configuration:

    - - UserDir public_html - + +UserDir public_html +

    the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -84,9 +85,9 @@ constructed using that path, plus the username specified. Given this configuration:

    - - UserDir /var/html - + +UserDir /var/html +

    the URL http://example.com/~rbowen/file.html will be translated to the file path /var/html/rbowen/file.html

    @@ -95,9 +96,9 @@ in which the asterisk is replaced with the username. Given this configuration:

    - - UserDir /var/www/*/docs - + +UserDir /var/www/*/docs +

    the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -105,9 +106,9 @@

    Multiple directories or directory paths can also be set.

    - - UserDir public_html /var/html - + +UserDir public_html /var/html +

    For the URL http://example.com/~rbowen/file.html, Apache will search for ~rbowen. If it isn't found, @@ -122,9 +123,9 @@

    The UserDir directive can be used to redirect user directory requests to external URLs.

    - - UserDir http://example.org/users/*/ - + +UserDir http://example.org/users/*/ +

    The above example will redirect a request for http://example.com/~bob/abc.html to @@ -138,19 +139,19 @@

    Using the syntax shown in the UserDir documentation, you can restrict what users are permitted to use this functionality:

    - - UserDir disabled root jro fish - + +UserDir disabled root jro fish +

    The configuration above will enable the feature for all users except for those listed in the disabled statement. You can, likewise, disable the feature for all but a few users by using a configuration like the following:

    - - UserDir disabled
    - UserDir enabled rbowen krietz -
    + +UserDir disabled +UserDir enabled rbowen krietz +

    See UserDir documentation for additional examples.

    @@ -165,12 +166,12 @@ directive to make a particular subdirectory of a user's home directory cgi-enabled.

    - - <Directory /home/*/public_html/cgi-bin/>
    - Options ExecCGI
    - SetHandler cgi-script
    - </Directory> -
    + +<Directory "/home/*/public_html/cgi-bin/"> + Options ExecCGI + SetHandler cgi-script +</Directory> +

    Then, presuming that UserDir is set to public_html, a cgi program example.cgi @@ -187,7 +188,7 @@

    If you want to allows users to modify the server configuration in their web space, they will need to use .htaccess files to - make these changed. Ensure that you have set AllowOverride to a value sufficient for the directives that you want to permit the users to modify. See the .htaccess tutorial for diff --git a/docs/manual/howto/public_html.xml.fr b/docs/manual/howto/public_html.xml.fr index 59bcd468d42..ee0df0f02ef 100644 --- a/docs/manual/howto/public_html.xml.fr +++ b/docs/manual/howto/public_html.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,34 +25,36 @@ Recettes et tutoriels - Répertoires web utilisateurs + Répertoires web utilisateurs

    -

    Sur les systèmes multi-utilisateurs, on peut permettre à chaque -utilisateur d'avoir un site web dans son répertoire home à l'aide de la +

    Sur les systèmes multi-utilisateurs, on peut permettre à chaque +utilisateur d'avoir un site web dans son répertoire home à l'aide de la directive UserDir. Les visiteurs de l'URL http://example.com/~nom_utilisateur/ -recevront un contenu situé dans le répertoire home de l'utilisateur -"nom_utilisateur", et dans le sous-répertoire spécifié par +recevront un contenu situé dans le répertoire home de l'utilisateur +"nom_utilisateur", et dans le sous-répertoire spécifié par la directive UserDir.

    -

    Notez que par défaut, l'accès à ces répertoires n'est -pas permis. Vous pouvez en permettre l'accès à l'aide +

    Notez que par défaut, l'accès à ces répertoires n'est +pas permis. Vous pouvez en permettre l'accès à l'aide de la directive UserDir en -décommentant la ligne

    - +décommentant la ligne :

    + #Include conf/extra/httpd-userdir.conf -
    -

    dans le fichier de configuration par défaut, et en adaptant le + +

    dans le fichier de configuration par défaut + conf/httpd.conf, et en adaptant le fichier httpd-userdir.conf selon vos besoins, ou en - incluant les directives appropriées dans une section - Directory du fichier de configuration principal.

    + incluant les directives appropriées dans une section + Directory du fichier de + configuration principal.

    Mise en correspondance des URLs -avec le système de fichiers +avec le système de fichiers
    - Définition du chemin des fichiers avec UserDir + Définition du chemin des fichiers avec UserDir

    La directive UserDir - permet de spécifier un répertoire à partir duquel le contenu de - l'utilisateur pourra être chargé. Elle peut revêtir plusieurs + permet de spécifier un répertoire à partir duquel le contenu de + l'utilisateur pourra être chargé. Elle peut revêtir plusieurs formes.

    -

    Si le chemin spécifié ne commence pas par un slash, il sera - interprété comme chemin relatif au répertoire home de l'utilisateur - considéré. Par exemple, avec cette configuration :

    +

    Si le chemin spécifié ne commence pas par un slash, il sera + interprété comme chemin relatif au répertoire home de l'utilisateur + considéré. Par exemple, avec cette configuration :

    - - UserDir public_html - + UserDir public_html

    l'URL http://example.com/~rbowen/fichier.html correspondra au chemin fichier /home/rbowen/public_html/fichier.html

    -

    Si le chemin spécifié commence par un slash, le chemin du fichier +

    Si le chemin spécifié commence par un slash, le chemin du fichier sera construit en utilisant ce chemin, suivi du nom de l'utilisateur - considéré. Par exemple, avec cette configuration :

    + considéré. Par exemple, avec cette configuration :

    - - UserDir /var/html - + UserDir /var/html

    l'URL http://example.com/~rbowen/fichier.html correspondra au chemin fichier /var/html/rbowen/fichier.html

    -

    Si le chemin spécifié contient un astérisque (*), ce dernier sera - remplacé par le nom de l'utilisateur dans le chemin du fichier +

    Si le chemin spécifié contient un astérisque (*), ce dernier sera + remplacé par le nom de l'utilisateur dans le chemin du fichier correspondant. Par exemple, avec cette configuration :

    - - UserDir /var/www/*/docs - + UserDir /var/www/*/docs

    l'URL http://example.com/~rbowen/fichier.html correspondra au chemin fichier /var/www/rbowen/docs/fichier.html

    -

    On peut aussi définir plusieurs répertoires ou chemins de - répertoires.

    +

    On peut aussi définir plusieurs répertoires ou chemins de + répertoires.

    - - UserDir public_html /var/html - + UserDir public_html /var/html

    Avec l'URL http://example.com/~rbowen/fichier.html, Apache va rechercher ~rbowen. S'il ne le trouve pas, @@ -127,41 +121,37 @@ avec le système de fichiers

    Redirection vers des URLs externes

    On peut utiliser la directive UserDir pour rediriger les requêtes - relatives aux répertoires utilisateurs vers des URLs externes.

    + module="mod_userdir">UserDir pour rediriger les requêtes + relatives aux répertoires utilisateurs vers des URLs externes.

    - - UserDir http://exemple.org/users/*/ - + UserDir http://example.org/users/*/ -

    L'exemple ci-dessus va rediriger une requête pour +

    L'exemple ci-dessus va rediriger une requête pour http://example.com/~bob/abc.html vers http://exemple.org/users/bob/abc.html.

    - Définition de la liste des utilisateurs autorisés à utiliser - cette fonctionnalité + Définition de la liste des utilisateurs autorisés à utiliser + cette fonctionnalité -

    En suivant la syntaxe décrite dans la documentation de UserDir, - vous pouvez définir quels utilisateurs sont autorisés à utiliser - cette fonctionnalité :

    +

    En suivant la syntaxe décrite dans la documentation de UserDir, + vous pouvez définir quels utilisateurs sont autorisés à utiliser + cette fonctionnalité :

    - - UserDir disabled root jro fish - + UserDir disabled root jro fish

    La configuration ci-dessus va autoriser l'utilisation de la - fonctionnalité pour tous les utilisateurs, à l'exception de ceux - listés à la suite de l'argument disabled. De même, vous - pouvez interdire l'utilisation de la fonctionnalité à tous les + fonctionnalité pour tous les utilisateurs, à l'exception de ceux + listés à la suite de l'argument disabled. De même, vous + pouvez interdire l'utilisation de la fonctionnalité à tous les utilisateurs sauf certains d'entre eux en utilisant une configuration du style :

    - - UserDir disabled
    - UserDir enabled rbowen krietz -
    + +UserDir disabled +UserDir enabled rbowen krietz +

    Vous trouverez d'autres exemples dans la documentation de UserDir.

    @@ -169,24 +159,24 @@ avec le système de fichiers
    - Définition d'un répertoire CGI pour chaque utilisateur + Définition d'un répertoire CGI pour chaque utilisateur -

    Afin de réserver un répertoire cgi-bin pour chaque utilisateur, +

    Afin de réserver un répertoire cgi-bin pour chaque utilisateur, vous pouvez utiliser une section Directory pour activer CGI dans un - sous-répertoire particulier d'un répertoire home utilisateur.

    + sous-répertoire particulier d'un répertoire home utilisateur.

    - - <Directory /home/*/public_html/cgi-bin/>
    - Options ExecCGI
    - SetHandler cgi-script
    - </Directory> -
    + +<Directory "/home/*/public_html/cgi-bin/"> + Options ExecCGI + SetHandler cgi-script +</Directory> +

    Avec la configuration ci-dessus, et en supposant que - UserDir est défini à public_html, un - programme CGI exemple.cgi pourra être chargé depuis ce - répertoire en passant par l'URL :

    + UserDir est défini à public_html, un + programme CGI exemple.cgi pourra être chargé depuis ce + répertoire en passant par l'URL :

    http://example.com/~rbowen/cgi-bin/exemple.cgi @@ -201,12 +191,12 @@ avec le système de fichiers

    Si vous voulez que vos utilisateurs puissent modifier la configuration du serveur pour ce qui concerne leur espace web, ils devront utiliser des fichiers .htaccess pour effectuer - ces modifications. Assurez-vous d'avoir défini la directive - AllowOverride à une valeur - appropriée pour les directives dont vous voulez permettre la + ces modifications. Assurez-vous d'avoir défini la directive + AllowOverride à une valeur + appropriée pour les directives dont vous voulez permettre la modification aux utilisateurs. Voir le tutoriel .htaccess pour plus de détails sur - la manière dont tout ceci fonctionne.

    + href="htaccess.html">tutoriel .htaccess pour plus de détails sur + la manière dont tout ceci fonctionne.

    diff --git a/docs/manual/howto/public_html.xml.ja b/docs/manual/howto/public_html.xml.ja index fc823a6403c..1c5d7d20053 100644 --- a/docs/manual/howto/public_html.xml.ja +++ b/docs/manual/howto/public_html.xml.ja @@ -1,7 +1,7 @@ - + + + +Reverse Proxy Guide - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    Reverse Proxy Guide

    +
    +

    Available Languages:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + +

    In addition to being a "basic" web server, and providing static and + dynamic content to end-users, Apache httpd (as well as most other web + servers) can also act as a reverse proxy server, also-known-as a + "gateway" server.

    + +

    In such scenarios, httpd itself does not generate or host the data, + but rather the content is obtained by one or several backend servers, + which normally have no direct connection to the external network. As + httpd receives a request from a client, the request itself is proxied + to one of these backend servers, which then handles the request, generates + the content and then sends this content back to httpd, which then + generates the actual HTTP response back to the client.

    + +

    There are numerous reasons for such an implementation, but generally + the typical rationales are due to security, high-availability, load-balancing + and centralized authentication/authorization. It is critical in these + implementations that the layout, design and architecture of the backend + infrastructure (those servers which actually handle the requests) are + insulated and protected from the outside; as far as the client is concerned, + the reverse proxy server is the sole source of all content.

    + +

    A typical implementation is below:

    +

    reverse-proxy-arch

    + +
    + +
    top
    +
    top
    +
    +

    Simple reverse proxying

    + + +

    + The ProxyPass + directive specifies the mapping of incoming requests to the backend + server (or a cluster of servers known as a Balancer + group). The simpliest example proxies all requests ("/") + to a single backend: +

    + +
    ProxyPass "/"  "http://www.example.com/"
    + + +

    + To ensure that and Location: headers generated from + the backend are modified to point to the reverse proxy, instead of + back to itself, the ProxyPassReverse + directive is most often required: +

    + +
    ProxyPass "/"  "http://www.example.com/"
    +ProxyPassReverse "/"  "http://www.example.com/"
    + + +

    Only specific URIs can be proxied, as shown in this example:

    + +
    ProxyPass "/images"  "http://www.example.com/"
    +ProxyPassReverse "/images"  "http://www.example.com/"
    + + +

    In the above, any requests which start with the /images + path with be proxied to the specified backend, otherwise it will be handled + locally. +

    +
    top
    +
    +

    Clusters and Balancers

    + + +

    + As useful as the above is, it still has the deficiencies that should + the (single) backend node go down, or become heavily loaded, that proxying + those requests provides no real advantage. What is needed is the ability + to define a set or group of backend servers which can handle such + requests and for the reverse proxy to load balance and failover among + them. This group is sometimes called a cluster but Apache httpd's + term is a balancer. One defines a balancer by leveraging the + <Proxy> and + BalancerMember directives as + shown: +

    + +
    <Proxy balancer://myset>
    +    BalancerMember http://www2.example.com:8080
    +    BalancerMember http://www3.example.com:8080
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    +
    +ProxyPass "/images/"  "balancer://myset/"
    +ProxyPassReverse "/images/"  "balancer://myset/"
    + + +

    + The balancer:// scheme is what tells httpd that we are creating + a balancer set, with the name myset. It includes 2 backend servers, + which httpd calls BalancerMembers. In this case, any requests for + /images will be proxied to one of the 2 backends. + The ProxySet directive + specifies that the myset Balancer use a load balancing algorithm + that balances based on I/O bytes. +

    + +

    Hint

    +

    + BalancerMembers are also sometimes referred to as workers. +

    +
    + +
    top
    +
    +

    Balancer and BalancerMember configuration

    + + +

    + You can adjust numerous configuration details of the balancers + and the workers via the various parameters defined in + ProxyPass. For example, + assuming we would want http://www3.example.com:8080 to + handle 3x the traffic with a timeout of 1 second, we would adjust the + configuration as follows: +

    + +
    <Proxy balancer://myset>
    +    BalancerMember http://www2.example.com:8080
    +    BalancerMember http://www3.example.com:8080 loadfactor=3 timeout=1
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    +
    +ProxyPass "/images"  "balancer://myset/"
    +ProxyPassReverse "/images"  "balancer://myset/"
    + + +
    top
    +
    +

    Failover

    + + +

    + You can also fine-tune various failover scenarios, detailing which + workers and even which balancers should accessed in such cases. For + example, the below setup implements 2 failover cases: In the first, + http://hstandby.example.com:8080 is only sent traffic + if all other workers in the myset balancer are not available. + If that worker itself is not available, only then will the + http://bkup1.example.com:8080 and http://bkup2.example.com:8080 + workers be brought into rotation: +

    + +
    <Proxy balancer://myset>
    +    BalancerMember http://www2.example.com:8080
    +    BalancerMember http://www3.example.com:8080 loadfactor=3 timeout=1
    +    BalancerMember http://hstandby.example.com:8080 status=+H
    +    BalancerMember http://bkup1.example.com:8080 lbset=1
    +    BalancerMember http://bkup2.example.com:8080 lbset=1
    +    ProxySet lbmethod=byrequests
    +</Proxy>
    +
    +ProxyPass "/images/"  "balancer://myset/"
    +ProxyPassReverse "/images/"  "balancer://myset/"
    + + +

    + The magic of this failover setup is setting http://hstandby.example.com:8080 + with the +H status flag, which puts it in hot standby mode, + and making the 2 bkup# servers part of the #1 load balancer set (the + default set is 0); for failover, hot standbys (if they exist) are used 1st, when all regular + workers are unavailable; load balancer sets are always tried lowest number first. +

    + +
    top
    +
    +

    Balancer Manager

    + + +

    + One of the most unique and useful features of Apache httpd's reverse proxy is + the embedded balancer-manager application. Similar to + mod_status, balancer-manager displays + the current working configuration and status of the enabled + balancers and workers currently in use. However, not only does it + display these parameters, it also allows for dynamic, runtime, on-the-fly + reconfiguration of almost all of them, including adding new BalancerMembers + (workers) to an existing balancer. To enable these capability, the following + needs to be added to your configuration: +

    + +
    <Location "/balancer-manager">
    +    SetHandler balancer-manager
    +    Require host localhost
    +</Location>
    + + +

    Warning

    +

    Do not enable the balancer-manager until you have secured your server. In + particular, ensure that access to the URL is tightly + restricted.

    +
    + +

    + When the reverse proxy server is accessed at that url + (eg: http://rproxy.example.com/balancer-manager/, you will see a + page similar to the below: +

    +

    balancer-manager page

    + +

    + This form allows the devops admin to adjust various parameters, take + workers offline, change load balancing methods and add new works. For + example, clicking on the balancer itself, you will get the following page: +

    +

    balancer-manager page

    + +

    + Whereas clicking on a worker, displays this page: +

    +

    balancer-manager page

    + +

    + To have these changes persist restarts of the reverse proxy, ensure that + BalancerPersist is enabled. +

    + +
    top
    +
    +

    Dynamic Health Checks

    + + +

    + Before httpd proxies a request to a worker, it can "test" if that worker + is available via setting the ping parameter for that worker using + ProxyPass. Oftentimes it is + more useful to check the health of the workers out of band, in a + dynamic fashion. This is achieved in Apache httpd by the + mod_proxy_hcheck module. +

    + +
    top
    +
    +

    BalancerMember status flags

    + + +

    + In the balancer-manager the current state, or status, of a worker + is displayed and can be set/reset. The meanings of these statuses are as follows: +

    + + + + + + + + + + + +
    FlagStringDescription
     OkWorker is available
     InitWorker has been initialized
    DDisWorker is disabled and will not accept any requests; will be + automatically retried.
    SStopWorker is administratively stopped; will not accept requests + and will not be automatically retried
    IIgnWorker is in ignore-errors mode and will always be considered available.
    HStbyWorker is in hot-standby mode and will only be used if no other + viable workers are available.
    EErrWorker is in an error state, usually due to failing pre-request check; + requests will not be proxied to this worker, but it will be retried depending on + the retry setting of the worker.
    NDrnWorker is in drain mode and will only accept existing sticky sessions + destined for itself and ignore all other requests.
    CHcFlWorker has failed dynamic health check and will not be used until it + passes subsequent health checks.
    +
    +
    +

    Available Languages:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/howto/reverse_proxy.xml b/docs/manual/howto/reverse_proxy.xml new file mode 100644 index 00000000000..ab4d36b9631 --- /dev/null +++ b/docs/manual/howto/reverse_proxy.xml @@ -0,0 +1,316 @@ + + + + + + + + +How-To / Tutorials + + Reverse Proxy Guide + + +

    In addition to being a "basic" web server, and providing static and + dynamic content to end-users, Apache httpd (as well as most other web + servers) can also act as a reverse proxy server, also-known-as a + "gateway" server.

    + +

    In such scenarios, httpd itself does not generate or host the data, + but rather the content is obtained by one or several backend servers, + which normally have no direct connection to the external network. As + httpd receives a request from a client, the request itself is proxied + to one of these backend servers, which then handles the request, generates + the content and then sends this content back to httpd, which then + generates the actual HTTP response back to the client.

    + +

    There are numerous reasons for such an implementation, but generally + the typical rationales are due to security, high-availability, load-balancing + and centralized authentication/authorization. It is critical in these + implementations that the layout, design and architecture of the backend + infrastructure (those servers which actually handle the requests) are + insulated and protected from the outside; as far as the client is concerned, + the reverse proxy server is the sole source of all content.

    + +

    A typical implementation is below:

    +

    reverse-proxy-arch

    + +
    + + + + +
    + Simple reverse proxying + +

    + The ProxyPass + directive specifies the mapping of incoming requests to the backend + server (or a cluster of servers known as a Balancer + group). The simpliest example proxies all requests ("/") + to a single backend: +

    + + +ProxyPass "/" "http://www.example.com/" + + +

    + To ensure that and Location: headers generated from + the backend are modified to point to the reverse proxy, instead of + back to itself, the ProxyPassReverse + directive is most often required: +

    + + +ProxyPass "/" "http://www.example.com/" +ProxyPassReverse "/" "http://www.example.com/" + + +

    Only specific URIs can be proxied, as shown in this example:

    + + +ProxyPass "/images" "http://www.example.com/" +ProxyPassReverse "/images" "http://www.example.com/" + + +

    In the above, any requests which start with the /images + path with be proxied to the specified backend, otherwise it will be handled + locally. +

    +
    + +
    + Clusters and Balancers + +

    + As useful as the above is, it still has the deficiencies that should + the (single) backend node go down, or become heavily loaded, that proxying + those requests provides no real advantage. What is needed is the ability + to define a set or group of backend servers which can handle such + requests and for the reverse proxy to load balance and failover among + them. This group is sometimes called a cluster but Apache httpd's + term is a balancer. One defines a balancer by leveraging the + Proxy and + BalancerMember directives as + shown: +

    + + +<Proxy balancer://myset> + BalancerMember http://www2.example.com:8080 + BalancerMember http://www3.example.com:8080 + ProxySet lbmethod=bytraffic +</Proxy> + +ProxyPass "/images/" "balancer://myset/" +ProxyPassReverse "/images/" "balancer://myset/" + + +

    + The balancer:// scheme is what tells httpd that we are creating + a balancer set, with the name myset. It includes 2 backend servers, + which httpd calls BalancerMembers. In this case, any requests for + /images will be proxied to one of the 2 backends. + The ProxySet directive + specifies that the myset Balancer use a load balancing algorithm + that balances based on I/O bytes. +

    + + Hint +

    + BalancerMembers are also sometimes referred to as workers. +

    +
    + +
    + +
    + Balancer and BalancerMember configuration + +

    + You can adjust numerous configuration details of the balancers + and the workers via the various parameters defined in + ProxyPass. For example, + assuming we would want http://www3.example.com:8080 to + handle 3x the traffic with a timeout of 1 second, we would adjust the + configuration as follows: +

    + + +<Proxy balancer://myset> + BalancerMember http://www2.example.com:8080 + BalancerMember http://www3.example.com:8080 loadfactor=3 timeout=1 + ProxySet lbmethod=bytraffic +</Proxy> + +ProxyPass "/images" "balancer://myset/" +ProxyPassReverse "/images" "balancer://myset/" + + +
    + +
    + Failover + +

    + You can also fine-tune various failover scenarios, detailing which + workers and even which balancers should accessed in such cases. For + example, the below setup implements 2 failover cases: In the first, + http://hstandby.example.com:8080 is only sent traffic + if all other workers in the myset balancer are not available. + If that worker itself is not available, only then will the + http://bkup1.example.com:8080 and http://bkup2.example.com:8080 + workers be brought into rotation: +

    + + +<Proxy balancer://myset> + BalancerMember http://www2.example.com:8080 + BalancerMember http://www3.example.com:8080 loadfactor=3 timeout=1 + BalancerMember http://hstandby.example.com:8080 status=+H + BalancerMember http://bkup1.example.com:8080 lbset=1 + BalancerMember http://bkup2.example.com:8080 lbset=1 + ProxySet lbmethod=byrequests +</Proxy> + +ProxyPass "/images/" "balancer://myset/" +ProxyPassReverse "/images/" "balancer://myset/" + + +

    + The magic of this failover setup is setting http://hstandby.example.com:8080 + with the +H status flag, which puts it in hot standby mode, + and making the 2 bkup# servers part of the #1 load balancer set (the + default set is 0); for failover, hot standbys (if they exist) are used 1st, when all regular + workers are unavailable; load balancer sets are always tried lowest number first. +

    + +
    + +
    + Balancer Manager + +

    + One of the most unique and useful features of Apache httpd's reverse proxy is + the embedded balancer-manager application. Similar to + mod_status, balancer-manager displays + the current working configuration and status of the enabled + balancers and workers currently in use. However, not only does it + display these parameters, it also allows for dynamic, runtime, on-the-fly + reconfiguration of almost all of them, including adding new BalancerMembers + (workers) to an existing balancer. To enable these capability, the following + needs to be added to your configuration: +

    + + +<Location "/balancer-manager"> + SetHandler balancer-manager + Require host localhost +</Location> + + + Warning +

    Do not enable the balancer-manager until you have secured your server. In + particular, ensure that access to the URL is tightly + restricted.

    +
    + +

    + When the reverse proxy server is accessed at that url + (eg: http://rproxy.example.com/balancer-manager/, you will see a + page similar to the below: +

    +

    balancer-manager page

    + +

    + This form allows the devops admin to adjust various parameters, take + workers offline, change load balancing methods and add new works. For + example, clicking on the balancer itself, you will get the following page: +

    +

    balancer-manager page

    + +

    + Whereas clicking on a worker, displays this page: +

    +

    balancer-manager page

    + +

    + To have these changes persist restarts of the reverse proxy, ensure that + BalancerPersist is enabled. +

    + +
    + +
    + Dynamic Health Checks + +

    + Before httpd proxies a request to a worker, it can "test" if that worker + is available via setting the ping parameter for that worker using + ProxyPass. Oftentimes it is + more useful to check the health of the workers out of band, in a + dynamic fashion. This is achieved in Apache httpd by the + mod_proxy_hcheck module. +

    + +
    + +
    + BalancerMember status flags + +

    + In the balancer-manager the current state, or status, of a worker + is displayed and can be set/reset. The meanings of these statuses are as follows: +

    + + + + + + + + + + + +
    FlagStringDescription
     OkWorker is available
     InitWorker has been initialized
    DDisWorker is disabled and will not accept any requests; will be + automatically retried.
    SStopWorker is administratively stopped; will not accept requests + and will not be automatically retried
    IIgnWorker is in ignore-errors mode and will always be considered available.
    HStbyWorker is in hot-standby mode and will only be used if no other + viable workers are available.
    EErrWorker is in an error state, usually due to failing pre-request check; + requests will not be proxied to this worker, but it will be retried depending on + the retry setting of the worker.
    NDrnWorker is in drain mode and will only accept existing sticky sessions + destined for itself and ignore all other requests.
    CHcFlWorker has failed dynamic health check and will not be used until it + passes subsequent health checks.
    +
    + +
    diff --git a/docs/manual/howto/reverse_proxy.xml.meta b/docs/manual/howto/reverse_proxy.xml.meta new file mode 100644 index 00000000000..3c15cd22774 --- /dev/null +++ b/docs/manual/howto/reverse_proxy.xml.meta @@ -0,0 +1,12 @@ + + + + + reverse_proxy + /howto/ + .. + + + en + + diff --git a/docs/manual/howto/ssi.html.en b/docs/manual/howto/ssi.html.en index a0703076dbc..9327ed66d9f 100644 --- a/docs/manual/howto/ssi.html.en +++ b/docs/manual/howto/ssi.html.en @@ -1,22 +1,27 @@ - -Apache Tutorial: Introduction to Server Side Includes - Apache HTTP Server +Apache httpd Tutorial: Introduction to Server Side Includes - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache Tutorial: Introduction to Server Side Includes

    +Apache > HTTP Server > Documentation > Version 2.4 > How-To / Tutorials

    Apache httpd Tutorial: Introduction to Server Side Includes

    Available Languages:  en  |  fr  | @@ -36,7 +41,7 @@ existing HTML documents.

  • Executing commands
  • Advanced SSI techniques
  • Conclusion
  • -
    +

    See also

    top

    Introduction

    @@ -61,14 +66,26 @@ existing HTML documents.

    an existing HTML page, without having to serve the entire page via a CGI program, or other dynamic technology.

    +

    For example, you might place a directive into an existing HTML + page, such as:

    + +

    + <!--#echo var="DATE_LOCAL" --> +

    + +

    And, when the page is served, this fragment will be evaluated and replaced with its value:

    + +

    + Tuesday, 15-Jan-2013 19:28:54 EST +

    +

    The decision of when to use SSI, and when to have your page entirely generated by some program, is usually a matter of how much of the page is static, and how much needs to be recalculated every time the page is served. SSI is a great way - to add small pieces of information, such as the current time. - But if a majority of your page is being generated at the time - that it is served, you need to look for some other - solution.

    + to add small pieces of information, such as the current time - shown + above. But if a majority of your page is being generated at the time + that it is served, you need to look for some other solution.

    top

    Configuring your server to permit SSI

    @@ -77,9 +94,8 @@ existing HTML documents.

    To permit SSI on your server, you must have the following directive either in your httpd.conf file, or in a .htaccess file:

    -

    - Options +Includes -

    +
    Options +Includes
    +

    This tells Apache that you want to permit files to be parsed for SSI directives. Note that most configurations contain @@ -93,10 +109,9 @@ existing HTML documents.

    do this. You can tell Apache to parse any file with a particular file extension, such as .shtml, with the following directives:

    -

    - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -

    +
    AddType text/html .shtml
    +AddOutputFilter INCLUDES .shtml
    +

    One disadvantage to this approach is that if you wanted to add SSI directives to an existing page, you would have to @@ -105,9 +120,8 @@ existing HTML documents.

    directives would be executed.

    The other method is to use the XBitHack directive:

    -

    - XBitHack on -

    +
    XBitHack on
    +

    XBitHack tells Apache to parse files for SSI @@ -156,7 +170,7 @@ existing HTML documents.

    SSI directives have the following syntax:

    - <!--#element attribute=value attribute=value ... --> + <!--#function attribute=value attribute=value ... -->

    It is formatted like an HTML comment, so if you don't have @@ -165,7 +179,7 @@ existing HTML documents.

    configured, the directive will be replaced with its results.

    -

    The element can be one of a number of things, and we'll talk +

    The function can be one of a number of things, and we'll talk some more about most of these in the next installment of this series. For now, here are some examples of what you can do with SSI

    @@ -176,14 +190,14 @@ existing HTML documents.

    <!--#echo var="DATE_LOCAL" -->

    -

    The echo element just spits out the value of a +

    The echo function just spits out the value of a variable. There are a number of standard variables, which include the whole set of environment variables that are available to CGI programs. Also, you can define your own - variables with the set element.

    + variables with the set function.

    If you don't like the format in which the date gets printed, - you can use the config element, with a + you can use the config function, with a timefmt attribute, to modify that formatting.

    @@ -198,7 +212,7 @@ existing HTML documents.

    This document last modified <!--#flastmod file="index.html" -->

    -

    This element is also subject to timefmt format +

    This function is also subject to timefmt format configurations.

    @@ -263,7 +277,7 @@ modified? reduce the burden of these updates. You just have to make one footer file, and then include it into each page with the include SSI command. The include - element can determine what file to include with either the + function can determine what file to include with either the file attribute, or the virtual attribute. The file attribute is a file path, relative to the current directory. That means that it @@ -299,7 +313,7 @@ modified?

    If you want to change that message to something else, you can do so with the errmsg attribute to the - config element:

    + config function:

    <!--#config errmsg="[It appears that you don't know how to use SSI]" -->

    @@ -321,7 +335,7 @@ modified?

    I expect that I'll have an article some time in the coming months about using SSI with small CGI programs. For now, here's something else that you can do with the exec - element. You can actually have SSI execute a command using the + function. You can actually have SSI execute a command using the shell (/bin/sh, to be precise - or the DOS shell, if you're on Win32). The following, for example, will give you a directory listing.

    @@ -423,42 +437,30 @@ modified? the ``truth'' of a particular value. (A given string is true if it is nonempty.) For a full list of the comparison operators available to you, see the mod_include - documentation. Here are some examples of how one might use this - construct.

    - -

    In your configuration file, you could put the following - line:

    -

    - BrowserMatchNoCase macintosh Mac
    - BrowserMatchNoCase MSIE InternetExplorer -

    - -

    This will set environment variables ``Mac'' and - ``InternetExplorer'' to true, if the client is running Internet - Explorer on a Macintosh.

    - -

    Then, in your SSI-enabled document, you might do the - following:

    -

    - <!--#if expr="-T reqenv('Mac') && - -T reqenv('InternetExplorer')" -->
    - Apologetic text goes here
    - <!--#else -->
    - Cool JavaScript code goes here
    - <!--#endif --> -

    - -

    Not that I have anything against IE on Macs - I just - struggled for a few hours last week trying to get some - JavaScript working on IE on a Mac, when it was working - everywhere else. The above was the interim workaround.

    + documentation.

    + +

    For example, if you wish to customize the text on your web page + based on the time of day, you could use the following recipe, placed + in the HTML page:

    + +

    + Good + <!--#if expr="%{TIME_HOUR} <12" -->
    + morning!
    + <!--#else -->
    + afternoon!
    + <!--#endif -->
    +

    Any other variable (either ones that you define, or normal environment variables) can be used in conditional statements. - With Apache's ability to set environment variables with the + See Expressions in Apache HTTP Server for + more information on the expression evaluation engine.

    + +

    With Apache's ability to set environment variables with the SetEnvIf directives, and other related directives, - this functionality can let you do some pretty involved dynamic - stuff without ever resorting to CGI.

    + this functionality can let you do a wide variety of dynamic content + on the server side without resorting a full web application.

    top
    @@ -474,7 +476,28 @@ modified?  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/ssi.html.fr b/docs/manual/howto/ssi.html.fr index 857c2f9c3ff..a53b8badc19 100644 --- a/docs/manual/howto/ssi.html.fr +++ b/docs/manual/howto/ssi.html.fr @@ -1,23 +1,28 @@ - -Tutoriel Apache : Introduction aux "Inclusions Ct Serveur" -(Server Side Includes - SSI) - Serveur Apache HTTP +Tutoriel Apache httpd : Introduction aux "Inclusions Ct Serveur" +(Server Side Includes - SSI) - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Tutoriel Apache : Introduction aux "Inclusions Ct Serveur" +Apache > Serveur HTTP > Documentation > Version 2.4 > Recettes et tutoriels

    Tutoriel Apache httpd : Introduction aux "Inclusions Ct Serveur" (Server Side Includes - SSI)

    Langues Disponibles:  en  | @@ -38,7 +43,7 @@ HTML pr

  • Excution de commandes
  • Techniques SSI avances
  • Conclusion
  • -
    +

    Voir aussi

    top

    Introduction

    @@ -65,11 +70,26 @@ HTML pr page entire via un programme CGI, ou toute autre technologie de contenu dynamique.

    +

    Par exemple, vous pouvez insrer la directive suivante dans une + page HTML existante :

    + +

    + <!--#echo var="DATE_LOCAL" --> +

    + +

    Ainsi, lorsque la page sera servie, la directive sera value et + remplace par sa valeur :

    + +

    + Tuesday, 15-Jan-2013 19:28:54 EST +

    +

    Le choix entre l'utilisation des SSI et la gnration entire de la page par un programme quelconque, est en gnral dict par la proportion de contenu statique et de contenu devant tre gnr chaque fois que la page est servie. SSI est idal pour ajouter de - petites quantits d'information, comme l'heure courante. Mais si la + petites quantits d'information, comme l'heure courante dans + l'exemple prcdent. Mais si la plus grande partie de votre page est gnre au moment o elle est servie, vous devez vous tourner vers une autre solution.

    top
    @@ -81,9 +101,8 @@ HTML pr devez ajouter la directive suivante dans votre fichier httpd.conf, ou dans un fichier .htaccess :

    -

    - Options +Includes -

    +
    Options +Includes
    +

    Cette directive indique Apache que vous dsirez permettre la recherche de directives SSI lors de l'interprtation des fichiers. @@ -98,10 +117,9 @@ HTML pr directives SSI. Vous devez indiquer Apache quels fichiers seront concerns. Vous pouvez y parvenir en indiquant une extension, comme .shtml, l'aide des directives suivantes :

    -

    - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -

    +
    AddType text/html .shtml
    +AddOutputFilter INCLUDES .shtml
    +

    Un des dsavantages de cette approche rside dans le fait que si vous voulez ajouter des directives SSI une page prexistante, vous @@ -111,9 +129,8 @@ HTML pr SSI qu'elle contient soient traites.

    Une autre mthode consiste utiliser la directive XBitHack :

    -

    - XBitHack on -

    +
    XBitHack on
    +

    La directive XBitHack indique Apache qu'il doit rechercher des directivves SSI dans les @@ -165,7 +182,7 @@ HTML pr

    Les directives SSI adoptent la syntaxe suivante :

    - <!--#lment attribut=valeur attribut=valeur ... --> + <!--#fonction attribut=valeur attribut=valeur ... -->

    Le format d'une directive SSI tant similaire celui d'un @@ -174,7 +191,7 @@ HTML pr HTML. Si SSI est correctement configur, la directive sera remplace par ses rsultats.

    -

    "lment" peut prendre de nombreuses formes, et nous dcrirons +

    "fonction" peut prendre de nombreuses formes, et nous dcrirons plus prcisment la plupart d'entre eux dans la prochaine version de ce document. Pour le moment, voici quelques exemples de ce que vous pouvez faire avec SSI.

    @@ -185,14 +202,14 @@ HTML pr <!--#echo var="DATE_LOCAL" -->

    -

    L'lment echo permet d'afficher la valeur d'une +

    La fonction echo permet d'afficher la valeur d'une variable. Il existe un grand nombre de variables standards, y compris l'ensemble des variables d'environnement disponibles pour les programmes CGI. De plus, vous pouvez dfinir vos propres - variables l'aide de l'lment set.

    + variables l'aide de la fonction set.

    Si vous n'aimez pas le format sous lequel la date s'affiche, vous - pouvez utiliser l'lment config avec un attribut + pouvez utiliser la fonction config avec un attribut timefmt, pour le modifier.

    @@ -270,7 +287,7 @@ HTML pr simplifier cette corve de mises jour. Il vous suffit de confectionner un fichier de pied de page, et de l'inclure dans chaque page l'aide de l'lment SSI include. Pour - dfinir le fichier inclure, l'lment include peut + dfinir le fichier inclure, la fonction include peut utiliser soit l'attribut file, soit l'attribut virtual. L'attribut file est un chemin de fichier relatif au rpertoire courant. C'est dire qu'il @@ -305,7 +322,7 @@ HTML pr

    Pour modifier ce message, vous pouvez utiliser l'attribut - errmsg avec l'lment config :

    + errmsg avec la fonction config :

    <!--#config errmsg="[Il semblerait que vous ne sachiez pas utiliser les SSI]" --> @@ -328,7 +345,7 @@ HTML pr

    J'ai pour projet, dans les prochains mois, d'crire un article propos de l'utilisation des SSI avec des petits programmes CGI. Pour - l'instant, voici ce que vous pouvez faire avec l'lment + l'instant, voici ce que vous pouvez faire avec la fonction exec. Vous pouvez vraiment faire excuter une commande par SSI en utilisant le shell (/bin/sh, pour tre plus prcis - ou le shell DOS, si vous tes sous Win32). Par exemple, ce @@ -432,44 +449,33 @@ HTML pr vrification de la "vrit" d'une valeur particulire (Une chane donne est vraie si elle n'est pas vide). Pour une liste exhaustive des oprateurs de comparaison disponibles, voir la documentation du - module mod_include. Voici quelques exemples - illustrant l'utilisation de ces expressions.

    - -

    Vous pouvez ajouter les lignes suivantes dans votre fichier de - configuration :

    -

    - BrowserMatchNoCase macintosh Mac
    - BrowserMatchNoCase MSIE InternetExplorer -

    - -

    Ces lignes dfinissent les variables d'environnement "Mac" et - "InternetExplorer" true, si le client utilise InternetExplorer sur - un Macintosh.

    + module mod_include.

    -

    Puis, dans votre document o les SSI sont actives, vous ajoutez - ceci :

    -

    - <!--#if expr="-T reqenv('Mac') && - -T reqenv('InternetExplorer')" -->
    - Un texte d'excuses est insr ici
    - <!--#else -->
    - Ici se trouve du code JavaScipt sympa
    - <!--#endif --> -

    +

    Par exemple, spour insrer l'heure du jour dans votre page web, + vous pouvez ajouter ces lignes dans la page HTML :

    -

    Notez que je n'ai rien contre IE sur Macintosh - J'ai juste - phosphor quelques heures la semaine dernire pour faire fonctionner - du JavaScript sous IE sur Macintosh, alors qu'il fonctionnait sous - tout autre environnement. Ce qui prcde a constitu un - contournement provisoire.

    +

    + Good + <!--#if expr="%{TIME_HOUR} <12" -->
    + morning!
    + <!--#else -->
    + afternoon!
    + <!--#endif -->
    +

    Toute autre variable (que vous avez dfinie, ou une variable d'environnement normale) peut tre utilise dans les expressions - conditionnelles. Associe la possibilit avec Apache de dfinir + conditionnelles. Voir le document Expressions + rationnelles dans le serveur HTTP Apache pour plus de dtails + propos du fonctionnement du moteur d'valuation des expressions + rationnelles.

    + +

    Associe la possibilit avec Apache de dfinir des variables d'environnement l'aide de directives SetEnvIf, ainsi que d'autres directives en rapport, - cette fonctionnalit vous permet d'ajouter des contenus dynamiques - assez volus sans avoir recours aux programmes CGI.

    + cette fonctionnalit vous permet d'ajouter une grande varit + de contenus dynamiques ct serveur sans avoir concevoir une + application web de A Z.

    top
    @@ -485,7 +491,28 @@ HTML pr  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/ssi.html.ja.utf8 b/docs/manual/howto/ssi.html.ja.utf8 index ce56bbc13a3..326f1332c18 100644 --- a/docs/manual/howto/ssi.html.ja.utf8 +++ b/docs/manual/howto/ssi.html.ja.utf8 @@ -1,31 +1,37 @@ - -Apache チュートリアル: Server Side Includes 入門 - Apache HTTP サーバ +Apache チュートリアル: Server Side Includes 入門 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache チュートリアル: Server Side Includes 入門

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > How-To / チュートリアル

    Apache チュートリアル: Server Side Includes 入門

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    サーバサイドインクルードによって、既存の HTML ドキュメントに動的なコンテンツを追加することができます。

    @@ -39,7 +45,7 @@
  • コマンドの実行
  • 高度な SSI テクニック
  • 終わりに
  • -
    +

    参照

    top

    はじめに

    @@ -476,11 +482,32 @@ 少量の動的なコンテンツを加えるにはすぐれた方法です。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/ssi.html.ko.euc-kr b/docs/manual/howto/ssi.html.ko.euc-kr index afde6b16a9e..1f720e942f8 100644 --- a/docs/manual/howto/ssi.html.ko.euc-kr +++ b/docs/manual/howto/ssi.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ 丮: Server Side Includes Ұ - Apache HTTP Server +ġ 丮: Server Side Includes Ұ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ 丮: Server Side Includes Ұ

    +Apache > HTTP Server > Documentation > Version 2.4 > How-To / Tutorials

    ġ 丮: Server Side Includes Ұ

    :  en  |  fr  | @@ -38,7 +43,7 @@

  • ɾ ϱ
  • SSI
  • -
    +

    top

    Ұ

    @@ -424,7 +429,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/howto/ssi.xml b/docs/manual/howto/ssi.xml index c9ef9234625..dc9b40a1818 100644 --- a/docs/manual/howto/ssi.xml +++ b/docs/manual/howto/ssi.xml @@ -23,7 +23,7 @@ How-To / Tutorials -Apache Tutorial: Introduction to Server Side Includes +Apache httpd Tutorial: Introduction to Server Side Includes

    Server-side includes provide a means to add dynamic content to @@ -66,14 +66,26 @@ existing HTML documents.

    an existing HTML page, without having to serve the entire page via a CGI program, or other dynamic technology.

    +

    For example, you might place a directive into an existing HTML + page, such as:

    + + + <!--#echo var="DATE_LOCAL" --> + + +

    And, when the page is served, this fragment will be evaluated and replaced with its value:

    + + + Tuesday, 15-Jan-2013 19:28:54 EST + +

    The decision of when to use SSI, and when to have your page entirely generated by some program, is usually a matter of how much of the page is static, and how much needs to be recalculated every time the page is served. SSI is a great way - to add small pieces of information, such as the current time. - But if a majority of your page is being generated at the time - that it is served, you need to look for some other - solution.

    + to add small pieces of information, such as the current time - shown + above. But if a majority of your page is being generated at the time + that it is served, you need to look for some other solution.

    @@ -82,9 +94,9 @@ existing HTML documents.

    To permit SSI on your server, you must have the following directive either in your httpd.conf file, or in a .htaccess file:

    - - Options +Includes - + +Options +Includes +

    This tells Apache that you want to permit files to be parsed for SSI directives. Note that most configurations contain @@ -98,10 +110,10 @@ existing HTML documents.

    do this. You can tell Apache to parse any file with a particular file extension, such as .shtml, with the following directives:

    - - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -
    + +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml +

    One disadvantage to this approach is that if you wanted to add SSI directives to an existing page, you would have to @@ -111,9 +123,9 @@ existing HTML documents.

    The other method is to use the XBitHack directive:

    - - XBitHack on - + +XBitHack on +

    XBitHack tells Apache to parse files for SSI @@ -163,7 +175,7 @@ existing HTML documents.

    SSI directives have the following syntax:

    - <!--#element attribute=value attribute=value ... --> + <!--#function attribute=value attribute=value ... -->

    It is formatted like an HTML comment, so if you don't have @@ -172,7 +184,7 @@ existing HTML documents.

    configured, the directive will be replaced with its results.

    -

    The element can be one of a number of things, and we'll talk +

    The function can be one of a number of things, and we'll talk some more about most of these in the next installment of this series. For now, here are some examples of what you can do with SSI

    @@ -183,14 +195,14 @@ existing HTML documents.

    <!--#echo var="DATE_LOCAL" --> -

    The echo element just spits out the value of a +

    The echo function just spits out the value of a variable. There are a number of standard variables, which include the whole set of environment variables that are available to CGI programs. Also, you can define your own - variables with the set element.

    + variables with the set function.

    If you don't like the format in which the date gets printed, - you can use the config element, with a + you can use the config function, with a timefmt attribute, to modify that formatting.

    @@ -205,7 +217,7 @@ existing HTML documents.

    This document last modified <!--#flastmod file="index.html" -->
    -

    This element is also subject to timefmt format +

    This function is also subject to timefmt format configurations.

    @@ -270,7 +282,7 @@ modified? reduce the burden of these updates. You just have to make one footer file, and then include it into each page with the include SSI command. The include - element can determine what file to include with either the + function can determine what file to include with either the file attribute, or the virtual attribute. The file attribute is a file path, relative to the current directory. That means that it @@ -306,7 +318,7 @@ modified?

    If you want to change that message to something else, you can do so with the errmsg attribute to the - config element:

    + config function:

    <!--#config errmsg="[It appears that you don't know how to use SSI]" --> @@ -328,7 +340,7 @@ modified?

    I expect that I'll have an article some time in the coming months about using SSI with small CGI programs. For now, here's something else that you can do with the exec - element. You can actually have SSI execute a command using the + function. You can actually have SSI execute a command using the shell (/bin/sh, to be precise - or the DOS shell, if you're on Win32). The following, for example, will give you a directory listing.

    @@ -431,42 +443,30 @@ modified? the ``truth'' of a particular value. (A given string is true if it is nonempty.) For a full list of the comparison operators available to you, see the mod_include - documentation. Here are some examples of how one might use this - construct.

    - -

    In your configuration file, you could put the following - line:

    - - BrowserMatchNoCase macintosh Mac
    - BrowserMatchNoCase MSIE InternetExplorer -
    - -

    This will set environment variables ``Mac'' and - ``InternetExplorer'' to true, if the client is running Internet - Explorer on a Macintosh.

    - -

    Then, in your SSI-enabled document, you might do the - following:

    - - <!--#if expr="-T reqenv('Mac') && - -T reqenv('InternetExplorer')" -->
    - Apologetic text goes here
    - <!--#else -->
    - Cool JavaScript code goes here
    - <!--#endif --> -
    - -

    Not that I have anything against IE on Macs - I just - struggled for a few hours last week trying to get some - JavaScript working on IE on a Mac, when it was working - everywhere else. The above was the interim workaround.

    + documentation.

    + +

    For example, if you wish to customize the text on your web page + based on the time of day, you could use the following recipe, placed + in the HTML page:

    + + + Good + <!--#if expr="%{TIME_HOUR} <12" -->
    + morning!
    + <!--#else -->
    + afternoon!
    + <!--#endif -->
    +

    Any other variable (either ones that you define, or normal environment variables) can be used in conditional statements. - With Apache's ability to set environment variables with the + See Expressions in Apache HTTP Server for + more information on the expression evaluation engine.

    + +

    With Apache's ability to set environment variables with the SetEnvIf directives, and other related directives, - this functionality can let you do some pretty involved dynamic - stuff without ever resorting to CGI.

    + this functionality can let you do a wide variety of dynamic content + on the server side without resorting a full web application.

    diff --git a/docs/manual/howto/ssi.xml.fr b/docs/manual/howto/ssi.xml.fr index fb68a721483..ba978fec03d 100644 --- a/docs/manual/howto/ssi.xml.fr +++ b/docs/manual/howto/ssi.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,12 +25,12 @@ Recettes et tutoriels -Tutoriel Apache : Introduction aux "Inclusions Côté Serveur" +<title>Tutoriel Apache httpd : Introduction aux "Inclusions Côté Serveur" (Server Side Includes - SSI) -

    Les SSI permettent d'ajouter du contenu dynamique à des documents -HTML préexistants.

    +

    Les SSI permettent d'ajouter du contenu dynamique à des documents +HTML préexistants.

    Qu'est-ce que SSI ? -

    SSI (Server Side Includes) est constitué de directives placées dans - des pages HTML, et évaluées par le serveur au moment où les pages - sont servies. Elles vous permettent d'ajouter du contenu généré - dynamiquement à une page HTML préexistante, sans avoir à servir la - page entière via un programme CGI, ou toute autre technologie de +

    SSI (Server Side Includes) est constitué de directives placées dans + des pages HTML, et évaluées par le serveur au moment où les pages + sont servies. Elles vous permettent d'ajouter du contenu généré + dynamiquement à une page HTML préexistante, sans avoir à servir la + page entière via un programme CGI, ou toute autre technologie de contenu dynamique.

    -

    Le choix entre l'utilisation des SSI et la génération entière de - la page par un programme quelconque, est en général dicté par la - proportion de contenu statique et de contenu devant être généré - chaque fois que la page est servie. SSI est idéal pour ajouter de - petites quantités d'information, comme l'heure courante. Mais si la - plus grande partie de votre page est générée au moment où elle est +

    Par exemple, vous pouvez insérer la directive suivante dans une + page HTML existante :

    + + + <!--#echo var="DATE_LOCAL" --> + + +

    Ainsi, lorsque la page sera servie, la directive sera évaluée et + remplacée par sa valeur :

    + + + Tuesday, 15-Jan-2013 19:28:54 EST + + +

    Le choix entre l'utilisation des SSI et la génération entière de + la page par un programme quelconque, est en général dicté par la + proportion de contenu statique et de contenu devant être généré + chaque fois que la page est servie. SSI est idéal pour ajouter de + petites quantités d'information, comme l'heure courante dans + l'exemple précédent. Mais si la + plus grande partie de votre page est générée au moment où elle est servie, vous devez vous tourner vers une autre solution.

    @@ -87,84 +102,84 @@ HTML préexistants.

    devez ajouter la directive suivante dans votre fichier httpd.conf, ou dans un fichier .htaccess :

    - + Options +Includes - + -

    Cette directive indique à Apache que vous désirez permettre la - recherche de directives SSI lors de l'interprétation des fichiers. +

    Cette directive indique à Apache que vous désirez permettre la + recherche de directives SSI lors de l'interprétation des fichiers. Notez cependant que la plupart des configurations contiennent de nombreuses directives Options - qui peuvent s'écraser les unes les autres. Vous devrez probablement - appliquer ces directives Options au répertoire - spécifique pour lequel vous voulez activer les SSI, afin d'être sûr - qu'elles y seront bien activées.

    + qui peuvent s'écraser les unes les autres. Vous devrez probablement + appliquer ces directives Options au répertoire + spécifique pour lequel vous voulez activer les SSI, afin d'être sûr + qu'elles y seront bien activées.

    Tout fichier ne fera cependant pas l'objet de recherche de - directives SSI. Vous devez indiquer à Apache quels fichiers seront - concernés. Vous pouvez y parvenir en indiquant une extension, comme - .shtml, à l'aide des directives suivantes :

    - - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -
    - -

    Un des désavantages de cette approche réside dans le fait que si - vous voulez ajouter des directives SSI à une page préexistante, vous + directives SSI. Vous devez indiquer à Apache quels fichiers seront + concernés. Vous pouvez y parvenir en indiquant une extension, comme + .shtml, à l'aide des directives suivantes :

    + +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml + + +

    Un des désavantages de cette approche réside dans le fait que si + vous voulez ajouter des directives SSI à une page préexistante, vous devrez changer le nom de cette page, et donc tout lien qui la - contient, de façon à ce qu'elle possède l'extension - .shtml, condition nécessaire pour que les directives - SSI qu'elle contient soient traitées.

    + contient, de façon à ce qu'elle possède l'extension + .shtml, condition nécessaire pour que les directives + SSI qu'elle contient soient traitées.

    -

    Une autre méthode consiste à utiliser la directive Une autre méthode consiste à utiliser la directive XBitHack :

    - + XBitHack on - +

    La directive XBitHack - indique à Apache qu'il doit rechercher des directivves SSI dans les - fichiers si leur bit d'exécution est positionné. Il n'est ainsi plus - nécessaire de changer le nom du fichier pour ajouter des directives - SSI à une page préexistante ; vous devez simplement attribuer les - droits d'exécution au fichier à l'aide de chmod.

    + indique à Apache qu'il doit rechercher des directivves SSI dans les + fichiers si leur bit d'exécution est positionné. Il n'est ainsi plus + nécessaire de changer le nom du fichier pour ajouter des directives + SSI à une page préexistante ; vous devez simplement attribuer les + droits d'exécution au fichier à l'aide de chmod.

    chmod +x pagename.html

    Un bref commentaire sur ce qu'il ne faut pas faire. Certaines - personnes peuvent vous conseiller de tout simplement indiquer à + personnes peuvent vous conseiller de tout simplement indiquer à Apache de rechercher des directives SSI dans tous les fichiers - .html, ce qui vous évite d'avoir à gérer les noms de + .html, ce qui vous évite d'avoir à gérer les noms de fichiers avec extension .shtml. Ils n'ont probablement pas entendu parler de la directive XBitHack. En effet, vous devez - garder à l'esprit qu'en faisant ceci, Apache va devoir rechercher - des directives SSI dans chaque fichier qu'il sert, même s'il n'en - contient aucune. Ce n'est donc pas une bonne idée car les - performances peuvent en être sensiblement affectées.

    + garder à l'esprit qu'en faisant ceci, Apache va devoir rechercher + des directives SSI dans chaque fichier qu'il sert, même s'il n'en + contient aucune. Ce n'est donc pas une bonne idée car les + performances peuvent en être sensiblement affectées.

    -

    Bien entendu, sous Windows, il n'y a pas de bit d'exécution à +

    Bien entendu, sous Windows, il n'y a pas de bit d'exécution à positionner, ce qui limite un peu vos choix.

    -

    Dans sa configuration par défaut, Apache n'envoie pas la date de - dernière modification ou les en-têtes HTTP relatifs à la taille des - contenus dans les pages SSI, car ses valeurs sont difficiles à +

    Dans sa configuration par défaut, Apache n'envoie pas la date de + dernière modification ou les en-têtes HTTP relatifs à la taille des + contenus dans les pages SSI, car ses valeurs sont difficiles à calculer pour les contenus dynamiques. Ceci peut induire une - impression de diminution des performances côté client, en empêchant - la mise en cache de votre document. Il existe deux méthodes pour - résoudre ce problème :

    + impression de diminution des performances côté client, en empêchant + la mise en cache de votre document. Il existe deux méthodes pour + résoudre ce problème :

    1. Utilisez la configuration XBitHack Full. Elle - indique à Apache de déterminer la date de dernière modification en - ne regardant que la date du fichier à l'origine de la requête, + indique à Apache de déterminer la date de dernière modification en + ne regardant que la date du fichier à l'origine de la requête, tout en ignorant la date de modification de tout fichier inclus.
    2. Utilisez les directives fournies par le module - mod_expires pour définir de manière explicite la - date d'expiration de vos fichiers, laissant par la-même - aux navigateurs et aux mandataires le soin de déterminer s'il est + mod_expires pour définir de manière explicite la + date d'expiration de vos fichiers, laissant par la-même + aux navigateurs et aux mandataires le soin de déterminer s'il est opportun ou non de les mettre en cache.
    @@ -173,17 +188,17 @@ HTML préexistants.

    Les directives SSI adoptent la syntaxe suivante :

    - <!--#élément attribut=valeur attribut=valeur ... --> + <!--#fonction attribut=valeur attribut=valeur ... --> -

    Le format d'une directive SSI étant similaire à celui d'un - commentaire HTML, si vous n'avez pas activé correctement SSI, le +

    Le format d'une directive SSI étant similaire à celui d'un + commentaire HTML, si vous n'avez pas activé correctement SSI, le navigateur l'ignorera, mais elle sera encore visible dans le source - HTML. Si SSI est correctement configuré, la directive sera remplacée - par ses résultats.

    + HTML. Si SSI est correctement configuré, la directive sera remplacée + par ses résultats.

    -

    "élément" peut prendre de nombreuses formes, et nous décrirons - plus précisément la plupart d'entre eux dans la prochaine version de +

    "fonction" peut prendre de nombreuses formes, et nous décrirons + plus précisément la plupart d'entre eux dans la prochaine version de ce document. Pour le moment, voici quelques exemples de ce que vous pouvez faire avec SSI.

    @@ -193,14 +208,14 @@ HTML préexistants.

    <!--#echo var="DATE_LOCAL" --> -

    L'élément echo permet d'afficher la valeur d'une +

    La fonction echo permet d'afficher la valeur d'une variable. Il existe un grand nombre de variables standards, y compris l'ensemble des variables d'environnement disponibles pour - les programmes CGI. De plus, vous pouvez définir vos propres - variables à l'aide de l'élément set.

    + les programmes CGI. De plus, vous pouvez définir vos propres + variables à l'aide de la fonction set.

    Si vous n'aimez pas le format sous lequel la date s'affiche, vous - pouvez utiliser l'élément config avec un attribut + pouvez utiliser la fonction config avec un attribut timefmt, pour le modifier.

    @@ -212,18 +227,18 @@ HTML préexistants.

    Date de modification du fichier - Dernière modification du document <!--#flastmod file="index.html" --> + Dernière modification du document <!--#flastmod file="index.html" --> -

    Le format peut là aussi être modifié à l'aide de l'attribut +

    Le format peut là aussi être modifié à l'aide de l'attribut timefmt.

    -
    Inclusion des résultats d'un programme CGI +
    Inclusion des résultats d'un programme CGI

    C'est le cas le plus courant d'utilisation des SSI - afficher les - résultats d'un programme CGI, comme l'universellement adoré - "compteur d'accès".

    + résultats d'un programme CGI, comme l'universellement adoré + "compteur d'accès".

    <!--#include virtual="/cgi-bin/counter.pl" --> @@ -235,66 +250,66 @@ HTML préexistants.

    Exemples additionnels -

    Vous trouverez dans ce qui suit quelques exemples spécifiques de +

    Vous trouverez dans ce qui suit quelques exemples spécifiques de ce que vous pouvez faire de vos documents HTML avec SSI.

    -
    Quand ce document a-t-il été modifié ? +
    Quand ce document a-t-il été modifié ? -

    Nous avons mentionné plus haut que vous pouviez utiliser SSI pour - informer l'utilisateur de la date de dernière modification du - document. Cependant, la méthode pour y parvenir n'a pas été vraiment - abordée. Placé dans votre document HTML, le code suivant va insérer - un repère de temps dans votre page. Bien entendu, SSI devra avoir - été correctement activé, comme décrit plus haut.

    +

    Nous avons mentionné plus haut que vous pouviez utiliser SSI pour + informer l'utilisateur de la date de dernière modification du + document. Cependant, la méthode pour y parvenir n'a pas été vraiment + abordée. Placé dans votre document HTML, le code suivant va insérer + un repère de temps dans votre page. Bien entendu, SSI devra avoir + été correctement activé, comme décrit plus haut.

    <!--#config timefmt="%A %B %d, %Y" -->
    - Dernière modification du fichier <!--#flastmod file="ssi.shtml" --> + Dernière modification du fichier <!--#flastmod file="ssi.shtml" -->

    Bien entendu, vous devez remplacer ssi.shtml par le - nom du fichier auquel vous faites référence. Ceci ne conviendra pas - si vous recherchez un morceau de code générique que vous pourrez - insérer dans tout fichier ; dans ce cas, il est préférable + nom du fichier auquel vous faites référence. Ceci ne conviendra pas + si vous recherchez un morceau de code générique que vous pourrez + insérer dans tout fichier ; dans ce cas, il est préférable d'utiliser la variable LAST_MODIFIED :

    <!--#config timefmt="%D" -->
    This file last modified <!--#echo var="LAST_MODIFIED" -->
    -

    Pour plus de détails sur le format timefmt, tapez - strftime dans votre moteur de recherche préferé. La +

    Pour plus de détails sur le format timefmt, tapez + strftime dans votre moteur de recherche préferé. La syntaxe est identique.

    @@ -303,44 +318,44 @@ HTML préexistants.

    Que puis-je configurer d'autre ? -

    En plus du format de date, vous pouvez utiliser l'élément +

    En plus du format de date, vous pouvez utiliser l'élément config pour configurer deux autres choses.

    -

    En général, lorsque quelque chose se passe mal avec votre +

    En général, lorsque quelque chose se passe mal avec votre directive SSI, vous recevez le message :

    [an error occurred while processing this directive]

    Pour modifier ce message, vous pouvez utiliser l'attribut - errmsg avec l'élément config :

    + errmsg avec la fonction config :

    <!--#config errmsg="[Il semblerait que vous ne sachiez pas utiliser les SSI]" -->

    Il est cependant probable que les utilisateurs finaux ne voient - jamais ce message, car vous aurez résolu tous les problèmes issus de + jamais ce message, car vous aurez résolu tous les problèmes issus de vos directives SSI avant que votre site ne soit mis en production. (N'est-ce pas ?)

    Vous pouvez aussi modifier le format sous lequel les tailles de - fichiers sont affichées à l'aide de l'attribut sizefmt. - Vous pouvez spécifier bytes pour un affichage en + fichiers sont affichées à l'aide de l'attribut sizefmt. + Vous pouvez spécifier bytes pour un affichage en octets, ou abbrev pour un affichage plus concis en Ko ou Mo, selon le cas.

    - Exécution de commandes + Exécution de commandes -

    J'ai pour projet, dans les prochains mois, d'écrire un article à +

    J'ai pour projet, dans les prochains mois, d'écrire un article à propos de l'utilisation des SSI avec des petits programmes CGI. Pour - l'instant, voici ce que vous pouvez faire avec l'élément - exec. Vous pouvez vraiment faire exécuter une commande - par SSI en utilisant le shell (/bin/sh, pour être plus - précis - ou le shell DOS, si vous êtes sous Win32). Par exemple, ce - qui suit vous permet d'afficher le contenu d'un répertoire.

    + l'instant, voici ce que vous pouvez faire avec la fonction + exec. Vous pouvez vraiment faire exécuter une commande + par SSI en utilisant le shell (/bin/sh, pour être plus + précis - ou le shell DOS, si vous êtes sous Win32). Par exemple, ce + qui suit vous permet d'afficher le contenu d'un répertoire.

    <pre>
    <!--#exec cmd="ls" -->
    @@ -354,62 +369,62 @@ HTML préexistants.

    </pre>
    -

    Vous noterez probablement l'étrange formatage provoqué par cette +

    Vous noterez probablement l'étrange formatage provoqué par cette directive sous Windows, car la sortie de dir contient - la chaîne de caractères "<dir>", ce qui trompe le + la chaîne de caractères "<dir>", ce qui trompe le navigateur.

    -

    Notez que cette fonctionnalité est très dangereuse, car elle va - permettre d'exécuter tout code associé à l'élément - exec. Si vous êtes dans la situation où les - utilisateurs peuvent éditer le contenu de vos pages web, dans le cas - d'un "livre d'or" par exemple, assurez-vous de désactiver cette - fonctionnalité. Vous pouvez, tout en permettant les SSI, désactiver - la fonctionnalité exec à l'aide de l'argument +

    Notez que cette fonctionnalité est très dangereuse, car elle va + permettre d'exécuter tout code associé à l'élément + exec. Si vous êtes dans la situation où les + utilisateurs peuvent éditer le contenu de vos pages web, dans le cas + d'un "livre d'or" par exemple, assurez-vous de désactiver cette + fonctionnalité. Vous pouvez, tout en permettant les SSI, désactiver + la fonctionnalité exec à l'aide de l'argument IncludesNOEXEC de la directive Options.

    -Techniques SSI avancées +Techniques SSI avancées

    Outre l'affichage de contenu, les SSI d'Apache vous permettent de - définir des variables, et de les utiliser dans des comparaisons et + définir des variables, et de les utiliser dans des comparaisons et des conditions.

    -
    Définition de variables +
    Définition de variables -

    Avec l'élément set, vous pouvez définir des - variables pour un usage ultérieur. Comme nous en aurons besoin plus - loin, nous allons en parler tout de suite. La syntaxe se présente +

    Avec l'élément set, vous pouvez définir des + variables pour un usage ultérieur. Comme nous en aurons besoin plus + loin, nous allons en parler tout de suite. La syntaxe se présente comme suit :

    <!--#set var="name" value="Rich" --> -

    Pour affecter une valeur à vos variables, en plus de la - définition littérale de l'exemple ci-dessus, vous pouvez utiliser +

    Pour affecter une valeur à vos variables, en plus de la + définition littérale de l'exemple ci-dessus, vous pouvez utiliser une autre variable, y compris les variables d'environnement, ou les variables - décrites plus haut (comme LAST_MODIFIED par exemple). - Pour indiquer qu'il s'agit d'une variable et non d'une chaîne, vous + décrites plus haut (comme LAST_MODIFIED par exemple). + Pour indiquer qu'il s'agit d'une variable et non d'une chaîne, vous devez utiliser le symbole dollar ($) devant le nom de la variable.

    <!--#set var="modified" value="$LAST_MODIFIED" --> -

    Pour insérer un caractère $ dans la valeur de votre variable, - vous devez l'échapper à l'aide d'un backslash.

    +

    Pour insérer un caractère $ dans la valeur de votre variable, + vous devez l'échapper à l'aide d'un backslash.

    <!--#set var="cost" value="\$100" --> -

    Enfin, si vous voulez insérer une variable dans une chaîne, et +

    Enfin, si vous voulez insérer une variable dans une chaîne, et s'il y a une chance pour que le nom de la variable se confonde avec - le reste de la chaîne, vous pouvez l'entourer d'accolades pour + le reste de la chaîne, vous pouvez l'entourer d'accolades pour eviter toute confusion (Il est difficile de trouver un bon exemple - pour illustrer ceci, mais j'espère que vous comprendrez).

    + pour illustrer ceci, mais j'espère que vous comprendrez).

    <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" --> @@ -419,13 +434,13 @@ HTML préexistants.

    Expressions conditionnelles

    Maintenent que nous avons des variables, et que nous pouvons - définir et comparer leurs valeurs, nous sommes à même de les - utiliser dans des expressions conditionnelles. Ceci confère à SSI le + définir et comparer leurs valeurs, nous sommes à même de les + utiliser dans des expressions conditionnelles. Ceci confère à SSI le statut de petit langage de programmation. mod_include fournit une structure if, elif, else, endif pour la construction d'expressions conditionnelles, ce qui vous permet de - générer plusieurs pages logiques à partir d'une seule vraie + générer plusieurs pages logiques à partir d'une seule vraie page.

    La structure de l'expression conditionnelle est :

    @@ -436,58 +451,47 @@ HTML préexistants.

    <!--#endif --> -

    Une condition peut revêtir la forme de toute comparaison +

    Une condition peut revêtir la forme de toute comparaison logique - soit une comparaison de valeurs avec une autre, soit une - vérification de la "vérité" d'une valeur particulière (Une chaîne - donnée est vraie si elle n'est pas vide). Pour une liste exhaustive - des opérateurs de comparaison disponibles, voir la documentation du - module mod_include. Voici quelques exemples - illustrant l'utilisation de ces expressions.

    - -

    Vous pouvez ajouter les lignes suivantes dans votre fichier de - configuration :

    - - BrowserMatchNoCase macintosh Mac
    - BrowserMatchNoCase MSIE InternetExplorer -
    - -

    Ces lignes définissent les variables d'environnement "Mac" et - "InternetExplorer" à true, si le client utilise InternetExplorer sur - un Macintosh.

    - -

    Puis, dans votre document où les SSI sont activées, vous ajoutez - ceci :

    - - <!--#if expr="-T reqenv('Mac') && - -T reqenv('InternetExplorer')" -->
    - Un texte d'excuses est inséré ici
    - <!--#else -->
    - Ici se trouve du code JavaScipt sympa
    - <!--#endif --> -
    - -

    Notez que je n'ai rien contre IE sur Macintosh - J'ai juste - phosphoré quelques heures la semaine dernière pour faire fonctionner - du JavaScript sous IE sur Macintosh, alors qu'il fonctionnait sous - tout autre environnement. Ce qui précède a constitué un - contournement provisoire.

    - -

    Toute autre variable (que vous avez définie, ou une variable - d'environnement normale) peut être utilisée dans les expressions - conditionnelles. Associée à la possibilité avec Apache de définir - des variables d'environnement à l'aide de directives + vérification de la "vérité" d'une valeur particulière (Une chaîne + donnée est vraie si elle n'est pas vide). Pour une liste exhaustive + des opérateurs de comparaison disponibles, voir la documentation du + module mod_include.

    + +

    Par exemple, spour insérer l'heure du jour dans votre page web, + vous pouvez ajouter ces lignes dans la page HTML :

    + + + Good + <!--#if expr="%{TIME_HOUR} <12" -->
    + morning!
    + <!--#else -->
    + afternoon!
    + <!--#endif -->
    +
    + +

    Toute autre variable (que vous avez définie, ou une variable + d'environnement normale) peut être utilisée dans les expressions + conditionnelles. Voir le document Expressions + rationnelles dans le serveur HTTP Apache pour plus de détails à + propos du fonctionnement du moteur d'évaluation des expressions + rationnelles.

    + +

    Associée à la possibilité avec Apache de définir + des variables d'environnement à l'aide de directives SetEnvIf, ainsi que d'autres directives en rapport, - cette fonctionnalité vous permet d'ajouter des contenus dynamiques - assez évolués sans avoir recours aux programmes CGI.

    + cette fonctionnalité vous permet d'ajouter une grande variété + de contenus dynamiques côté serveur sans avoir à concevoir une + application web de A à Z.

    Conclusion

    SSI ne remplace certainement pas CGI, ou d'autres technologies - utilisées pour la génération de pages web dynamiques. Mais c'est une - bonne méthode pour ajouter des petits contenus dynamiques à vos - pages, sans devoir fournir un gros effort supplémentaire.

    + utilisées pour la génération de pages web dynamiques. Mais c'est une + bonne méthode pour ajouter des petits contenus dynamiques à vos + pages, sans devoir fournir un gros effort supplémentaire.

    diff --git a/docs/manual/howto/ssi.xml.ja b/docs/manual/howto/ssi.xml.ja index c63aa7826c7..131573fec47 100644 --- a/docs/manual/howto/ssi.xml.ja +++ b/docs/manual/howto/ssi.xml.ja @@ -1,7 +1,7 @@ - + + -Apache HTTP Server Version 2.3 -Dokumentation - Apache HTTP Server +Apache HTTP Server Version 2.4 +Dokumentation - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    -

    Apache HTTP Server Version 2.3 +

    Apache HTTP Server Version 2.4 Dokumentation

    Tilgngelige sprog:  da  | @@ -34,43 +39,43 @@ Dokumentation

     zh-cn 

    Denne oversttelse kan vre forldet. Se den Engelske version for de seneste opdateringer.
    -

    +

    +

    Copyright 2016 The Apache Software Foundation.
    Licenseret under Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.de b/docs/manual/index.html.de index 5a3bf80be42..c42eb20fb16 100644 --- a/docs/manual/index.html.de +++ b/docs/manual/index.html.de @@ -1,26 +1,31 @@ - Dokumentation zum Apache HTTP Server Version -2.3 - Apache HTTP Server +2.4 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Dokumentation zum Apache HTTP Server Version -2.3

    +2.4

    Verfgbare Sprachen:  da  |  de  | @@ -36,7 +41,7 @@

    Diese bersetzung ist mglicherweise nicht mehr aktuell. Bitte prfen Sie die englische Version auf die neuesten nderungen.
    -

    +

    charset values for use in Internet media types (MIME types). For example:

    -

    - AddDefaultCharset utf-8 -

    +
    AddDefaultCharset utf-8
    +

    AddDefaultCharset should only be used when all of the text resources to which it applies are known to be in that @@ -365,12 +380,12 @@ be passed through

    -
    +

    Copyright 2016 The Apache Software Foundation.
    Lizenziert unter der Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.en b/docs/manual/index.html.en index 5cf8250e087..a286f5de2cb 100644 --- a/docs/manual/index.html.en +++ b/docs/manual/index.html.en @@ -1,25 +1,30 @@ - -Apache HTTP Server Version 2.3 -Documentation - Apache HTTP Server +Apache HTTP Server Version 2.4 +Documentation - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    -

    Apache HTTP Server Version 2.3 +

    Apache HTTP Server Version 2.4 Documentation

    Available Languages:  da  | @@ -33,7 +38,7 @@ Documentation

     tr  |  zh-cn 

    -

    +

    the request, so you can use the following configuration to enable such a script:

    -

    - <Files "mypaths.shtml">
    - - Options +Includes
    - SetOutputFilter INCLUDES
    - AcceptPathInfo On
    -
    - </Files> -

    +
    <Files "mypaths.shtml">
    +  Options +Includes
    +  SetOutputFilter INCLUDES
    +  AcceptPathInfo On
    +</Files>
    + @@ -278,29 +298,25 @@ On Windows from Apache httpd 2.3.3 and later.
    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.es b/docs/manual/index.html.es index c8b081d0395..617ed865b9c 100644 --- a/docs/manual/index.html.es +++ b/docs/manual/index.html.es @@ -1,24 +1,29 @@ - -Versin 2.3 de la documentacin del Servidor de HTTP Apache - Servidor HTTP Apache +Versin 2.4 de la documentacin del Servidor de HTTP Apache - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-
    -

    Versin 2.3 de la documentacin del Servidor de HTTP Apache

    +

    Versin 2.4 de la documentacin del Servidor de HTTP Apache

    Idiomas disponibles:  da  |  de  | @@ -31,14 +36,11 @@  tr  |  zh-cn 

    -
    Esta traduccin podra estar - obsoleta. Consulte la versin en ingls de la - documentacin para comprobar si se han producido cambios - recientemente.
    -

    +

    @@ -109,6 +118,10 @@ ejecuci  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licencia bajo los trminos de Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/index.html.fr b/docs/manual/index.html.fr index 47b4408b7e8..b8b87be6680 100644 --- a/docs/manual/index.html.fr +++ b/docs/manual/index.html.fr @@ -1,25 +1,30 @@ - -Documentation du Serveur HTTP Apache Version 2.3 - - Serveur Apache HTTP +Documentation du Serveur HTTP Apache Version 2.4 + - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    -

    Documentation du Serveur HTTP Apache Version 2.3 +

    Documentation du Serveur HTTP Apache Version 2.4

    Langues Disponibles:  da  | @@ -33,7 +38,7 @@  tr  |  zh-cn 

    -

    +

    Using none for an argument will disable any accept filters for that protocol. This is useful for protocols that require a server send data first, such as ftp: or nntp:

    -

    AcceptFilter nntp none

    +
    AcceptFilter nntp none
    +

    The default protocol names are https for port 443 - and http for all other ports. To specify another protocol - is being used with a listening port, add the protocol + and http for all other ports. To specify that another + protocol is being used with a listening port, add the protocol argument to the Listen directive.

    The default values on FreeBSD are:

    -

    - AcceptFilter http httpready
    - AcceptFilter https dataready -

    +
    AcceptFilter http httpready
    +AcceptFilter https dataready
    +

    The httpready accept filter buffers entire HTTP requests at the kernel level. Once an entire request is received, the kernel then sends it to the server. See the accf_http(9) man page for more details. Since HTTPS requests are - encrypted only the + encrypted, only the accf_data(9) filter is used.

    The default values on Linux are:

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http data
    +AcceptFilter https data
    +

    Linux's TCP_DEFER_ACCEPT does not support buffering http requests. Any value besides none will enable TCP_DEFER_ACCEPT on that listener. For more details see the Linux - + tcp(7) man page.

    The default values on Windows are:

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http connect
    +AcceptFilter https connect
    +

    Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx() - API, and does not support http protocol buffering. There are two values - which utilize the Windows AcceptEx() API and will recycle network - sockets between connections. data waits until data has - been transmitted as documented above, and the initial data buffer and - network endpoint addresses are all retrieved from the single AcceptEx() - invocation. connect will use the AcceptEx() API, also - retrieve the network endpoint addresses, but like none - the connect option does not wait for the initial data - transmission.

    + API, and does not support http protocol buffering. connect + will use the AcceptEx() API, also retrieve the network endpoint + addresses, but like none the connect option + does not wait for the initial data transmission.

    On Windows, none uses accept() rather than AcceptEx() and will not recycle sockets between connections. This is useful for @@ -193,10 +201,26 @@ On Windows from Apache httpd 2.3.3 and later. network providers such as vpn drivers, or spam, virus or spyware filters.

    +
    +

    The data AcceptFilter (Windows)

    + +

    For versions 2.4.23 and prior, the Windows data accept + filter waited until data had been transmitted and the initial data + buffer and network endpoint addresses had been retrieved from the + single AcceptEx() invocation. This implementation was subject to a + denial of service attack and has been disabled.

    + +

    Current releases of httpd default to the connect filter + on Windows, and will fall back to connect if + data is specified. Users of prior releases are encouraged + to add an explicit setting of connect for their + AcceptFilter, as shown above.

    +
    +

    See also

    top
    @@ -209,7 +233,6 @@ On Windows from Apache httpd 2.3.3 and later. -
    +

    Copyright 2016 The Apache Software Foundation.
    Autoris sous Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.ja.utf8 b/docs/manual/index.html.ja.utf8 index ce9f769d137..8313dc204a5 100644 --- a/docs/manual/index.html.ja.utf8 +++ b/docs/manual/index.html.ja.utf8 @@ -1,28 +1,33 @@ - -Apache HTTP サーバ バージョン 2.3 -ドキュメント - Apache HTTP サーバ +Apache HTTP サーバ バージョン 2.4 +ドキュメント - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    -

    Apache HTTP サーバ バージョン 2.3 +

    Apache HTTP サーバ バージョン 2.4 ドキュメント

    -

    言語:  da  | +

    翻訳済み言語:  da  |  de  |  en  |  es  | @@ -33,9 +38,11 @@  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    -

    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    +

    How-To / チュートリアル

    @@ -85,19 +93,21 @@
    -

    言語:  da  | +

    翻訳済み言語:  da  |  de  |  en  |  es  | @@ -108,6 +118,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    この文書は Apache License, Version 2.0 のライセンスで提供されています。.

    +

    \ No newline at end of file diff --git a/docs/manual/index.html.ko.euc-kr b/docs/manual/index.html.ko.euc-kr index 8b0800cd7aa..2b86846feed 100644 --- a/docs/manual/index.html.ko.euc-kr +++ b/docs/manual/index.html.ko.euc-kr @@ -1,24 +1,29 @@ - -Apache HTTP Server Version 2.3 - Apache HTTP Server +Apache HTTP Server Version 2.4 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    -

    Apache HTTP Server Version 2.3

    +

    Apache HTTP Server Version 2.4

    :  da  |  de  | @@ -33,7 +38,7 @@

    ֽ ƴմϴ. ֱٿ ϼ.
    -

    +

    top
    +

    ǥ

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.pt-br b/docs/manual/index.html.pt-br index 7b2d89bb0d1..6909d3c3966 100644 --- a/docs/manual/index.html.pt-br +++ b/docs/manual/index.html.pt-br @@ -1,26 +1,31 @@ - Documentao do Servidor HTTP Apache Verso -2.3 - Servidor HTTP Apache +2.4 - Servidor HTTP Apache Verso 2.4 - + + + + +

    Servidor HTTP Apache Verso 2.4

    +
    <-

    Documentao do Servidor HTTP Apache Verso -2.3

    +2.4

    Lnguas Disponveis:  da  |  de  | @@ -35,7 +40,7 @@

    Esta traduo pode estar desatualizada. Confira a verso em Ingls para mudanas recentes.
    -

    +

    -
    +

    Copyright 2016 The Apache Software Foundation.
    Licenciado sob a Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/index.html.tr.utf8 b/docs/manual/index.html.tr.utf8 index 3e852991087..ad8cce3cd91 100644 --- a/docs/manual/index.html.tr.utf8 +++ b/docs/manual/index.html.tr.utf8 @@ -1,25 +1,30 @@ - -Apache HTTP Sunucusu Sürüm 2.3 -Belgeleri - Apache HTTP Sunucusu +Apache HTTP Sunucusu Sürüm 2.4 +Belgeleri - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    -

    Apache HTTP Sunucusu Sürüm 2.3 +

    Apache HTTP Sunucusu Sürüm 2.4 Belgeleri

    Mevcut Diller:  da  | @@ -33,8 +38,7 @@ Belgeleri

     tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    +

  • AllowOverride
  • AllowOverrideList
  • CGIMapExtension
  • +
  • CGIPassAuth
  • +
  • CGIVar
  • ContentDigest
  • +
  • DefaultRuntimeDir
  • DefaultType
  • Define
  • <Directory>
  • @@ -66,10 +74,12 @@ Servers
  • ForceType
  • GprofDir
  • HostnameLookups
  • +
  • HttpProtocolOptions
  • <If>
  • <IfDefine>
  • <IfModule>
  • Include
  • +
  • IncludeOptional
  • KeepAlive
  • KeepAliveTimeout
  • <Limit>
  • @@ -87,10 +97,15 @@ Servers
  • MaxRangeOverlaps
  • MaxRangeReversals
  • MaxRanges
  • +
  • MergeTrailers
  • Mutex
  • NameVirtualHost
  • Options
  • Protocol
  • +
  • Protocols
  • +
  • ProtocolsHonorOrder
  • +
  • QualifyRedirectURL
  • +
  • RegisterHttpMethod
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • @@ -113,7 +128,9 @@ Servers
  • UseCanonicalPhysicalPort
  • <VirtualHost>
  • - +

    Bugfix checklist

    Siehe auch

    +
    top

    AcceptFilter-Direktive

    @@ -374,7 +391,7 @@ werden d erlaubt sind.
    - + @@ -410,11 +427,11 @@ erlaubt sind.
    AuthConfig
    - Erlaubt die Verwendung von Autorisierungs-Anweisungen (AuthDBMGroupFile, + Erlaubt die Verwendung von Autorisierungs-Anweisungen (AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, - AuthName, - AuthType, AuthUserFile, Require usw.).
    + AuthName, + AuthType, AuthUserFile, Requireusw.).
    FileInfo
    @@ -436,14 +453,15 @@ erlaubt sind. Verzeichnisindizes (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, - DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName + DefaultIcon, DirectoryIndex, + FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeNameusw.).
    Limit
    Erlaubt die Verwendung von Direktiven zur Steuerung des - Zugriffs von Hosts (Allow, Deny und Order).
    + Zugriffs von Hosts (Allow, Deny und Order).
    Options[=Option,...]
    @@ -517,6 +535,34 @@ CGI-Skripte
    top
    +
    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    + \ No newline at end of file diff --git a/docs/manual/index.html.zh-cn b/docs/manual/index.html.zh-cn.utf8 similarity index 85% rename from docs/manual/index.html.zh-cn rename to docs/manual/index.html.zh-cn.utf8 index d485ff9650e..cbb2971fe94 100644 --- a/docs/manual/index.html.zh-cn +++ b/docs/manual/index.html.zh-cn.utf8 @@ -1,24 +1,29 @@ - -Apache HTTP 服务器 2.3 文档 - Apache HTTP 服务器 +Apache HTTP 服务器 2.4 文档 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-
    -

    Apache HTTP 服务器 2.3 文档

    +

    Apache HTTP 服务器 2.4 文档

    可用语言:  da  |  de  | @@ -31,7 +36,8 @@  tr  |  zh-cn 

    -

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。
    +

    - @@ -125,6 +131,29 @@

    The following requirements exist for building Apache httpd:

    +
    APR and APR-Util
    +
    Make sure you have APR and APR-Util already installed on + your system. If you don't, or prefer to not use the system-provided + versions, download the latest versions of both APR and APR-Util + from Apache APR, unpack + them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util + (be sure the directory names do not have version numbers; for example, + the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use + ./configure's --with-included-apr + option. On some platforms, you may have to install the + corresponding -dev packages to allow httpd to build + against your installed copy of APR and APR-Util.
    + +
    Perl-Compatible Regular Expressions Library (PCRE)
    +
    This library is required but not longer bundled with httpd. + Download the source code from http://www.pcre.org, + or install a Port or Package. If your build system can't find + the pcre-config script installed by the PCRE build, point to it + using the --with-pcre parameter. On some platforms, + you may have to install the corresponding -dev + package to allow httpd to build against your installed copy + of PCRE.
    +
    Disk Space
    Make sure you have at least 50 MB of temporary free disk space available. After installation the server occupies @@ -155,12 +184,7 @@ [OPTIONAL]
    For some of the support scripts like apxs or dbmmanage (which are written in Perl) the Perl 5 interpreter is required (versions - 5.003 or newer are sufficient). If you have multiple Perl - interpreters (for example, a systemwide install of Perl 4, and - your own install of Perl 5), you are advised to use the - --with-perl option (see below) to make sure the - correct one is used by configure. - If no Perl 5 interpreter is found by the + 5.003 or newer are sufficient). If no Perl 5 interpreter is found by the configure script, you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.
    @@ -310,7 +334,7 @@ $ tar xvf httpd-NN.tar

    $ vi PREFIX/conf/httpd.conf

    Have a look at the Apache manual under - PREFIX/docs/manual/ or consult http://httpd.apache.org/docs/trunk/ for the most recent + PREFIX/docs/manual/ or consult http://httpd.apache.org/docs/2.4/ for the most recent version of this manual and a complete reference of available configuration directives.

    top
    @@ -336,10 +360,10 @@ $ tar xvf httpd-NN.tar

    The first step in upgrading is to read the release announcement and the file CHANGES in the source distribution to find any changes that may affect your site. When changing between - major releases (for example, from 2.0 to 2.2 or from 2.2 to 2.3), + major releases (for example, from 2.0 to 2.2 or from 2.2 to 2.4), there will likely be major differences in the compile-time and run-time configuration that will require manual adjustments. All - modules will also need to be upgraded to accomodate changes in the + modules will also need to be upgraded to accommodate changes in the module API.

    Upgrading from one minor version to the next (for example, from @@ -418,7 +442,28 @@ $ tar xvf httpd-NN.tar  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.es b/docs/manual/install.html.es index 201dfc0e258..2c9fe322287 100644 --- a/docs/manual/install.html.es +++ b/docs/manual/install.html.es @@ -1,22 +1,27 @@ - -Compilacin e Instalacin - Servidor HTTP Apache +Compilacin e Instalacin - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Compilacin e Instalacin

    +Apache > Servidor HTTP > Documentacin > Versin 2.4
    top

    Visin general del proceso para @@ -342,7 +347,7 @@ directorios

    $ vi PREFIX/conf/httpd.conf

    -

    chele un vistazo al Manual de Apache que est en docs/manual/ o consulte en http://httpd.apache.org/docs/trunk/ la versin ms +

    chele un vistazo al Manual de Apache que est en docs/manual/ o consulte en http://httpd.apache.org/docs/2.4/ la versin ms reciente de este manual y la Guia de Referencia de todas las directivas de configuracin disponibles.

    top
    @@ -367,7 +372,7 @@ funciona
    top

    Actualizar una instalacin -prrevia

    +previa

    El primer paso para actualizar una instalacin anterior es leer las especificaciones de la versin y el fichero @@ -434,7 +439,28 @@ prrevia  ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.fr b/docs/manual/install.html.fr index b744d59eebd..fdc8b9340a8 100644 --- a/docs/manual/install.html.fr +++ b/docs/manual/install.html.fr @@ -1,22 +1,27 @@ - -Compilation et installation - Serveur Apache HTTP +Compilation et installation - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Compilation et installation

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Compilation et installation

    Langues Disponibles:  de  |  en  | @@ -32,7 +37,9 @@ HTTP Apache sur les systmes Unix et similaires seulement. Pour la compilation et l'installation sous Windows, voir Utiliser le serveur HTTP Apache avec Microsoft - Windows. Pour les autres plateformes, se rfrer la documentation par + Windows et Compilation + d'Apache sous Microsoft Windows. Pour les autres plateformes, se + rfrer la documentation par plateforme.

    Apache httpd utilise libtool et autoconf @@ -40,7 +47,7 @@ des projets Open Source .

    Si vous effectuez une mise jour depuis une version mineure vers - la suivante (par exemple, 2.2.50 2.2.51), veuillez passer la section + la suivante (par exemple, 2.4.9 2.4.10), veuillez passer la section mise jour.

    @@ -56,7 +63,7 @@
  • Mise jour
  • Paquets tiers
  • Voir aussi

    + des sources
  • Dmarrer Apache httpd
  • Arrt et redmarrage
  • Commentaires
  • top

    Aperu pour les plus presss

    @@ -66,7 +73,7 @@
    - @@ -128,6 +135,34 @@

    Les prrequis pour la construction d'Apache httpd sont les suivants:

    +
    APR et APR-Util
    +
    APR et APR-Util doivent tre dj installs sur votre systme. + Si ce n'est pas le cas, ou si vous prfrez ne pas utiliser les + versions fournies par le systme, tlchargez les dernires + versions d'APR et APR-Util depuis Apache APR, dcompressez-les + respectivement dans /racine_sources_httpd/srclib/apr et + /racine_sources_httpd/srclib/apr-util (les noms des rpertoires ne + doivent pas comporter de numros de versions ; par exemple, la + distribution d'APR doit se trouver dans /racine_sources_httpd/srclib/apr/), et + utilisez l'option --with-included-apr du script + ./configure. Sur certaines plateformes, vous devrez + peut-tre installer les paquets -dev correspondants + pour permettre la compilation de httpd avec les versions + installes d'APR et APR-Util.
    + +
    Bibliothque d'expressions rationnelles compatibles Perl + (PCRE)
    +
    Cette bibliothque est ncessaire mais n'est plus fournie avec la + distribution de httpd. Tlchargez le code source depuis http://www.pcre.org ou installez + un portage du paquet. Si votre suite de compilation ne trouve pas + le script pcre-config install au cours du processus de + construction de PCRE, indiquez son chemin via l'option + --with-pcre du script ./configure. Sur + certaines plateformes, vous devrez + peut-tre installer les paquets -dev correspondants + pour permettre la compilation de httpd avec la version + installe de PCRE.
    +
    Espace disque
    Assurez-vous d'avoir au moins 50 Mo d'espace disque disponible temporaire. Aprs l'installation le serveur occupe @@ -159,11 +194,7 @@
    L'interprteur Perl 5 (les versions 5.003 ou suprieures conviennent) est ncessaire pour l'excution de certains scripts comme apxs ou dbmmanage - (qui sont crits en Perl). Si vous disposez de plusieurs interprteurs - Perl (par exemple, une installation globale Perl 4, et - votre installation personnelle de Perl 5), il vous faut utiliser l'option - --with-perl (voir ci-dessous) afin de vous assurer que le - bon interprteur sera utilis par configure. + (qui sont crits en Perl). Si le script configure ne trouve pas d'interprteur Perl 5, vous ne pourrez pas utiliser les scripts qui en ont besoin. Bien entendu, vous pourrez tout de mme construire et utiliser @@ -324,7 +355,7 @@ $ tar xvf httpd-NN.tar

    Consultez le manuel d'Apache situ dans PREFIX/docs/manual/ ou - http://httpd.apache.org/docs/trunk/ pour la version la plus + http://httpd.apache.org/docs/2.4/ pour la version la plus rcente de ce manuel et la liste complte des directives de configuration disponibles.

    top
    @@ -351,7 +382,7 @@ $ tar xvf httpd-NN.tar sortie de la nouvelle version et le fichier CHANGES dans la distribution des sources afin de dceler toutes les modifications qui pourraient affecter votre site. Lors d'un changement majeur de version - (par exemple de 2.0 2.2 ou de 2.2 2.3), + (par exemple de 2.0 2.2 ou de 2.2 2.4), il y aura certainement des diffrences importantes quant la configuration de la compilation et de l'excution qui ncessiteront des ajustements manuels. Tous les @@ -437,7 +468,28 @@ $ tar xvf httpd-NN.tar  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.ja.utf8 b/docs/manual/install.html.ja.utf8 index 8177e7e2e02..f4c774fb12d 100644 --- a/docs/manual/install.html.ja.utf8 +++ b/docs/manual/install.html.ja.utf8 @@ -1,25 +1,29 @@ - -コンパイルとインストール - Apache HTTP サーバ +コンパイルとインストール - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    コンパイルとインストール

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    コンパイルとインストール

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -27,8 +31,10 @@  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この文書で扱う範囲は、Unix や Unix に類似したシステムでの @@ -56,7 +62,7 @@

  • カスタマイズ
  • テスト
  • アップグレード
  • -

    参照

    +

    参照

    top

    概要 (せっかちな人向け)

    @@ -320,7 +326,7 @@ $ tar xvf httpd-NN.tar

    PREFIX/docs/manual/docs/manual/ にある Apache マニュアルをざっと見てください。 - または、http://httpd.apache.org/docs/trunk/ + または、http://httpd.apache.org/docs/2.4/ にあるマニュアル最新版、設定ディレクティブに当たってみてください。

    top
    @@ -394,14 +400,35 @@ $ tar xvf httpd-NN.tar

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.ko.euc-kr b/docs/manual/install.html.ko.euc-kr index ebf927c42aa..49566ccd29b 100644 --- a/docs/manual/install.html.ko.euc-kr +++ b/docs/manual/install.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ϰ ġ - Apache HTTP Server +ϰ ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    @@ -290,7 +295,7 @@ $ tar xvf httpd-2_1_NN.tar

    $ vi PREFIX/conf/httpd.conf

    þ - ֱ docs/manual/̳ http://httpd.apache.org/docs/trunk/ ִ ġ + ֱ docs/manual/̳ http://httpd.apache.org/docs/2.4/ ִ ġ ϶.

    top
    @@ -356,7 +361,28 @@ $ tar xvf httpd-2_1_NN.tar  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.tr.utf8 b/docs/manual/install.html.tr.utf8 index f36b7d205f9..4c9fd580e73 100644 --- a/docs/manual/install.html.tr.utf8 +++ b/docs/manual/install.html.tr.utf8 @@ -1,22 +1,27 @@ - -Derleme ve Kurulum - Apache HTTP Sunucusu +Derleme ve Kurulum - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Derleme ve Kurulum

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Derleme ve Kurulum

    Mevcut Diller:  de  |  en  | @@ -26,20 +31,21 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belge Apache HTTP Sunucusunun sadece Unix ve Unix benzeri sistemlerde derlenmesini ve kurulmasını kapsar. Windows üzerinde - derleme ve kurulum için Apache HTTPd’nin - Microsoft Windows ile kullanımı bölümüne bakınız. Diğer platformlar - için ise platform belgelerine bakınız.

    + derleme ve kurulum için Apache HTTP + Sunucusunun Microsoft Windows ile kullanımı ve Apache HTTP + Sunucusunun Microsoft Windows için Derlenmesi bölümüne bakınız. + Diğer platformlar için ise platform + belgelerine bakınız.

    -

    Apache HTTPd, derleme ortamını oluşturmak için çoğu Açık Kaynak Kodlu - projenin yaptığı gibi libtool ve autoconf - kullanır.

    +

    Apache HTTP Sunucusunun, derleme ortamını oluşturmak için çoğu Açık + Kaynak Kodlu projenin yaptığı gibi libtool ve + autoconf kullanır.

    -

    Eğer sadece sürüm yükseltiyorsanız (2.2.50’den 2.2.51’e yükseltmek +

    Eğer sadece sürüm yükseltiyorsanız (2.4.9’dan 2.4.10’a yükseltmek gibi) lütfen doğrudan Yükseltme bölümüne atlayınız.

    @@ -54,7 +60,8 @@
  • Kişiselleştirme
  • Deneme
  • Yükseltme
  • -

    Ayrıca bakınız:

    +
  • Üçüncü parti paketler
  • +

    Ayrıca bakınız:

    top
    - @@ -121,14 +130,40 @@

    Gereksinimler

    -

    Apache HTTPd’yi derleyebilmek için şunlar mevcut olmalıdır:

    +

    Apache httpd’yi derleyebilmek için şunlar mevcut olmalıdır:

    +
    APR ve APR-Util
    +
    APR ve APR-Util'in sisteminizde kurulu olduğundan emin olun. Kurulu + değilse veya sisteminizce sağlanmış sürümlerini kullanmak + istemiyorsanız APR ve APR-Util'in ikisini birden Apache APR'den indirin ve onları + Apache httpd dağıtımını açtığınız dizinin altında + /httpd_kaynakkod_kök_dizini/srclib/apr ve + /httpd_kaynakkod_kök_dizini/srclib/apr-util dizinlerine + açın (Dizin isimlerinin sürüm numarası içermemesine dikkat edin, + örneğin, APR dağıtımı + /httpd_kaynakkod_kök_dizini/srclib/apr/ altında olsun.) + ve ./configure betiğinin --with-included-apr + seçeneğini kullanın. Bazı platformlarda, httpd'nin, kurulu APR ve + APR-Util kopyanıza karşın derlenmesini sağlamak için ilgili + -dev paketlerini kurmanız gerekebilir.
    + +
    Perl-Uyumlu Düzenli İfade Kütüphanesi (PCRE)
    +
    Bu kütüphane gereklidir, ancak artık httpd ile birlikte + dağıtılmamaktadır. Kaynak kodunu http://www.pcre.org sitesinden indirin ve bir port veya paket + olarak kurun. Eğer derleme sisteminiz PCRE kurulumunuz tarafından + kurulan pcre-config betiğini bulamazsa + --with-pcre seçeneğini kullanarak yerini belirtin. Bazı + platformlarda, httpd'nin, kurulu PCRE kopyanıza karşın derlenmesini + sağlamak için ilgili -dev paketlerini kurmanız + gerekebilir.
    +
    Disk Alanı
    Geçici olarak en azından 50 MB boş disk alanınız olduğundan emin - olunuz. Kurulumdan sonra Apache yaklaşık 10 MB disk alanı kaplıyor + olunuz. Kurulumdan sonra sunucu yaklaşık 10 MB disk alanı kaplıyor olacaktır. Asıl disk alanı gereksinimi seçtiğiniz yapılandırma - seçenekleri ve üçüncü parti modüllere göre değişiklik + seçeneklerine, üçüncü parti modüllere ve şüphesiz sitenizin veya sunucu + üzerindeki sitelerin boyutlarına göre değişiklik gösterecektir.
    ANSI-C Derleyici ve Derleme Sistemi
    @@ -151,12 +186,8 @@
    Perl ile yazılmış apxs veya dbmmanage gibi bazı betikleri desteklemek için Perl 5 yorumlayıcısı gerekir (5.003 veya daha yeni sürümleri - yeterlidir). Eğer sisteminizde birden fazla Perl yorumlayıcı - kuruluysa (örneğin, sistem geneli için Perl 4, kendi kullanımızı için - Perl 5 kurulu olabilir), doğru sürümün kullanılacağından emin olmak - bunu configure betiğine --with-perl - seçeneğini kullanarak belirtmeniz önerilir. Eğer - configure betiği sisteminizde Perl 5 yorumlayıcısı + yeterlidir). Eğer configure betiği sisteminizde + Perl 5 yorumlayıcısı bulamazsa bu betikleri kullanamazsınız. Ancak, bu durum Apache HTTPd’nin derlenip kurulmasına engel değildir.
    @@ -185,7 +216,7 @@

    Paketi açma

    -

    Apache HTTPd tar paketinden sıkıştırmayı kaldırdıktan sonra tar +

    Apache HTTP Sunucusu tar paketinden sıkıştırmayı kaldırdıktan sonra tar arşivinden dosyaları çıkarmak basit bir işlemdir:

    @@ -222,14 +253,15 @@

    Bu noktada ayrıca, Apache HTTPd’de hangi özelliklerin bulunmasını istediğinizi modülleri etkin kılarak veya iptal - ederek belirtebilirsiniz. Apache, öntanımlı olarak içerilmiş temel modüllerle gelir. Diğer - modüller --enable-modül seçenekleri - kullanılarak etkinleştirilir. Buradaki modül, - önünden mod_ dizgesi kaldırılmış ve içindeki altçizgi - imleri tire imleri ile değiştirilmiş modül ismidir. Ayrıca, - --enable-modül=shared seçeneklerini kullanarak - modülleri çalışma anında gerektiğinde yüklemek veya kaldırmak üzere paylaşımlı nesneler (DSO’lar) olarak derlemeniz de - mümkündür. Temel modülleri de benzer şekilde + ederek belirtebilirsiniz. Apache, öntanımlı olarak içerilmiş pek çok + modülle gelir. Bunlar çalışma anında devereye sokulup çıkarılabilen paylaşımlaı nesneler (DSO'lar) olarak derlenebilir. + Ayrıca, istediğiniz modülleri derleme sırasında + --enable-module=static seçeneğini kullanarak + durağan olarak derleyebilirsiniz. Ek modüller --enable- + modül seçenekleri kullanılarak etkinleştirilir. + Buradaki modül, önünden mod_ dizgesi + kaldırılmış ve içindeki altçizgi imleri tire imleri ile değiştirilmiş + modül ismidir. Temel modülleri de benzer şekilde --disable-modül seçenekleriyle iptal edebilirsiniz. configure betiği mevcut olmayan modüller için sizi uyarmayıp, seçeneği yok saymakla yetineceğinden, bu @@ -246,15 +278,15 @@ izlenim edinmeniz için aşağıda tipik bir örneğe yer verilmiştir. Bu örnekte, Apache’nin /sw/pkg/apache önekiyle başlayan dizinlere kurulması, belli bir derleyici ve derleyici seçenekleriyle - derlenmesi ve mod_rewrite ve - mod_speling modüllerinin de DSO mekanizması üzerinden + derlenmesi ve mod_ldap ve + mod_luamodüllerinin de DSO mekanizması üzerinden daha sonra yüklenmek üzere derlenmesi istenmektedir:

    $ CC="pgcc" CFLAGS="-O2" \
    ./configure --prefix=/sw/pkg/apache \
    - --enable-rewrite=shared \
    - --enable-speling=shared + --enable-ldap=shared \
    + --enable-lua=shared

    configure betiği başlatıldığında sisteminizde @@ -305,7 +337,7 @@

    Bu kılavuz ve kullanılabilecek yapılandırma yönergelerinin kılavuzlarını ÖNEK/docs/manual/ altında - bulabileceğiniz gibi en son sürümünü daima http://httpd.apache.org/docs/trunk/ adresinde + bulabileceğiniz gibi en son sürümünü daima http://httpd.apache.org/docs/2.4/ adresinde bulabilirsiniz.

    top
    @@ -330,7 +362,7 @@

    Sürüm yükseltme işleminin ilk adımı, sitenizi etkileyen değişiklikleri öğrenmek için dağıtım duyurusunu ve kaynak paketindeki CHANGES dosyasını okumaktır. Ana sürümlerden yükseltme - yapıyorsanız (1.3’ten 2.0’a veya 2.0’dan 2.2’ye gibi), derleme anı ve + yapıyorsanız (2.0’ten 2.2’ye veya 2.2’den 2.4’e gibi), derleme anı ve çalışma anı yapılandırmalarındaki ana farklılıklar elle ayarlamalar yapmanızı gerektirecektir. Ayrıca, tüm modüllerin de modül API’sindeki değişikliklere uyum sağlaması için yükseltilmesi gerekecektir.

    @@ -376,6 +408,27 @@

    $ ./config.nice --prefix=/home/dnm/apache --with-port=90

    +
    top
    +
    +

    Üçüncü parti paketler

    + +

    Üçüncü partilerin çoğunun, Apache HTTP Sunucusunun belli bir platforma + kurulumu için paketlenmiş kendi dağıtımları vardır. Çeşitli Linux + dağıtımları, üçüncü parti Windows paketleri, Mac OS X, Solaris ve daha + pek çokları bunlar arasında sayılabilir.r

    + +

    Yazılım lisansımız bu çeşit yeniden dağıtımlara izin verdiği gibi + bunları cesaretlendirir de. Ancak, sunucunun kurulum ve yapılandırmasının + belgelerimizde belittiğimizden farklı olması gibi bir durum ortaya + çıkabilir. Ne yazık ki, bu durum yakın zamanda değişecekmiş gibi + görünmüyor.

    + +

    Bu üçüncü parti + dağıtımlarla ilgili bir açıklamaya HTTP + Sunucu wikisinde yer verilmiş olup bunların şu anki durumunu + yansıtmaktadır. Ancak, yine de, dağıtımınızın belli platformlarla ilgili + paket yönetimi ve kurulum işlemleri hakkında bilgi sahibi olmanız + gerekmektir.

    Mevcut Diller:  de  | @@ -385,7 +438,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.xml b/docs/manual/install.xml index 53d51cb5e83..59a8728ab7e 100644 --- a/docs/manual/install.xml +++ b/docs/manual/install.xml @@ -30,7 +30,9 @@ on Unix and Unix-like systems only. For compiling and installation on Windows, see Using Apache HTTP Server with Microsoft - Windows. For other platforms, see the and Compiling Apache for Microsoft Windows. + For other platforms, see the platform documentation.

    Apache httpd uses libtool and autoconf @@ -38,7 +40,7 @@ projects.

    If you are upgrading from one minor version to the next (for - example, 2.2.50 to 2.2.51), please skip down to the upgrading section.

    @@ -55,7 +57,7 @@
    - @@ -116,6 +118,29 @@

    The following requirements exist for building Apache httpd:

    +
    APR and APR-Util
    +
    Make sure you have APR and APR-Util already installed on + your system. If you don't, or prefer to not use the system-provided + versions, download the latest versions of both APR and APR-Util + from Apache APR, unpack + them into /httpd_source_tree_root/srclib/apr and /httpd_source_tree_root/srclib/apr-util + (be sure the directory names do not have version numbers; for example, + the APR distribution must be under /httpd_source_tree_root/srclib/apr/) and use + ./configure's --with-included-apr + option. On some platforms, you may have to install the + corresponding -dev packages to allow httpd to build + against your installed copy of APR and APR-Util.
    + +
    Perl-Compatible Regular Expressions Library (PCRE)
    +
    This library is required but not longer bundled with httpd. + Download the source code from http://www.pcre.org, + or install a Port or Package. If your build system can't find + the pcre-config script installed by the PCRE build, point to it + using the --with-pcre parameter. On some platforms, + you may have to install the corresponding -dev + package to allow httpd to build against your installed copy + of PCRE.
    +
    Disk Space
    Make sure you have at least 50 MB of temporary free disk space available. After installation the server occupies @@ -149,12 +174,7 @@
    For some of the support scripts like apxs or dbmmanage (which are written in Perl) the Perl 5 interpreter is required (versions - 5.003 or newer are sufficient). If you have multiple Perl - interpreters (for example, a systemwide install of Perl 4, and - your own install of Perl 5), you are advised to use the - --with-perl option (see below) to make sure the - correct one is used by configure. - If no Perl 5 interpreter is found by the + 5.003 or newer are sufficient). If no Perl 5 interpreter is found by the configure script, you will not be able to use the affected support scripts. Of course, you will still be able to build and use Apache httpd.
    @@ -338,10 +358,10 @@ $ tar xvf httpd-NN.tar

    The first step in upgrading is to read the release announcement and the file CHANGES in the source distribution to find any changes that may affect your site. When changing between - major releases (for example, from 2.0 to 2.2 or from 2.2 to 2.3), + major releases (for example, from 2.0 to 2.2 or from 2.2 to 2.4), there will likely be major differences in the compile-time and run-time configuration that will require manual adjustments. All - modules will also need to be upgraded to accomodate changes in the + modules will also need to be upgraded to accommodate changes in the module API.

    Upgrading from one minor version to the next (for example, from diff --git a/docs/manual/install.xml.de b/docs/manual/install.xml.de index e1a9b8cf897..ce9fc89cc97 100644 --- a/docs/manual/install.xml.de +++ b/docs/manual/install.xml.de @@ -1,7 +1,7 @@ - + + - + + + + -Apache starten - Apache HTTP Server +Apache starten - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Wie der Apache startet

    @@ -155,7 +160,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.en b/docs/manual/invoking.html.en index 2fdea49846d..245b42c4dd3 100644 --- a/docs/manual/invoking.html.en +++ b/docs/manual/invoking.html.en @@ -1,22 +1,27 @@ - -Starting Apache - Apache HTTP Server +Starting Apache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Starting Apache

    Available Languages:  de  |  en  | @@ -27,11 +32,9 @@  tr 

    -

    On Windows, Apache is normally run as a service on Windows - NT, 2000 and XP, or as a console application on Windows 9x and - ME. For details, see Running Apache as a Service - and Running Apache as a - Console Application.

    +

    On Windows, Apache is normally run as a service. + For details, see Running Apache as a Service. +

    On Unix, the httpd program is run as a daemon that executes continuously in the @@ -42,7 +45,7 @@

  • Errors During Start-up
  • Starting at Boot-Time
  • Additional Information
  • -

    See also

    +

    See also

    top

    How Apache Starts

    @@ -145,7 +148,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.es b/docs/manual/invoking.html.es index 7145400f787..3d96b0c426b 100644 --- a/docs/manual/invoking.html.es +++ b/docs/manual/invoking.html.es @@ -1,22 +1,27 @@ - -iniciar Apache - Servidor HTTP Apache +iniciar Apache - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-
    top

    Cmo iniciar Apache

    @@ -164,7 +169,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.fr b/docs/manual/invoking.html.fr index e6743087072..e0e3fed3cb5 100644 --- a/docs/manual/invoking.html.fr +++ b/docs/manual/invoking.html.fr @@ -1,22 +1,27 @@ - -Dmarrage d'Apache - Serveur Apache HTTP +Dmarrage d'Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Dmarrage d'Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Dmarrage d'Apache

    Langues Disponibles:  de  |  en  | @@ -27,11 +32,9 @@  tr 

    -

    Apache est habituellement lanc en tant que service - sous Windows NT, 2000 et XP, ou comme application en mode console sous - Windows 9x et ME. Pour plus de dtails, voir Dmarrer Apache en tant que service - et Dmarrer Apache comme - Application en mode console.

    +

    Sous Windows, Apache est habituellement lanc en tant que + service. Pour plus de dtails, voir Dmarrer Apache en tant + que service.

    Sous Unix, le programme httpd est lanc en mode dmon et s'excute de manire permanente en @@ -42,7 +45,7 @@

  • Erreurs en cours de dmarrage
  • Lancement au dmarrage du systme
  • Informations supplmentaires
  • -

    Voir aussi

    +

    Voir aussi

    top

    Comment Apache dmarre

    @@ -52,8 +55,8 @@ de 80 (ou tout autre port infrieur 1024), il est ncessaire de possder les privilges root pour pouvoir dmarrer apache, et lui permettre d'tre associ ce port privilgi. Lorsque le serveur est - dmarr, aprs avoir effectu quelques oprations prliminaires - comme ouvrir ses fichiers de log, il lance plusieurs processus + dmarr, il effectue quelques oprations prliminaires + comme ouvrir ses fichiers de log, puis il lance plusieurs processus enfants qui ont pour rle d'couter et de rpondre aux requtes des clients. Le processus httpd principal continue s'excuter sous l'utilisateur root, tandis que les processus @@ -63,8 +66,7 @@

    Il est recommand d'utiliser le script de contrle apachectl pour invoquer l'excutable - httpd. Avant d'invoquer le binaire - httpd, ce script dfinit certaines variables + httpd. A cet effet, ce script dfinit certaines variables d'environnement ncessaires pour permettre httpd de fonctionner correctement sous certains systmes d'exploitation. @@ -119,13 +121,14 @@

    Lancement au dmarrage du systme

    -

    Si vous souhaitez que votre serveur continue de fonctionner aprs +

    Si vous souhaitez que votre serveur web soit automatiquement + disponible aprs un redmarrage du systme, vous devez ajouter un appel apachectl vos fichiers de dmarrage systme (en gnral rc.local ou un fichier dans un rpertoire rc.N), ce qui dmarrera Apache sous l'utilisateur root. Avant de faire ceci, assurez-vous que votre serveur - est correctement configur en ce qui concerne la scurit et les + soit correctement configur en ce qui concerne la scurit et les restrictions d'accs.

    Le script apachectl est conu pour fonctionner @@ -158,7 +161,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.ja.utf8 b/docs/manual/invoking.html.ja.utf8 index 7bd68b4a094..ee1133d86ab 100644 --- a/docs/manual/invoking.html.ja.utf8 +++ b/docs/manual/invoking.html.ja.utf8 @@ -1,25 +1,29 @@ - -Apache の起動 - Apache HTTP サーバ +Apache の起動 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache の起動

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -27,15 +31,10 @@  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    -

    Windows 上では、Apache は通常は - Windows NT, 2000, XP ではサービスとして、Windows 9x, ME - ではコンソールアプリケーションとして実行されます。 +

    Windows 上では、Apache は通常はサービスとして実行されます。 詳細に関しては、「 - サービスとして実行する」と「 - コンソールアプリケーションとして実行する」をご覧下さい。

    + サービスとして実行する」をご覧下さい。

    Unixでは、httpd プログラムが、バックグラウンドで常にリクエスト処理を行う @@ -46,7 +45,7 @@

  • 起動時のエラー
  • ブート時の起動
  • 追加情報
  • -

    参照

    +

    参照

    top

    Apache の起動方法

    @@ -71,8 +70,8 @@ 適切に設定して、httpd バイナリを起動します。 apachectl はどんなコマンドライン引数も通過させますので、 httpd のどのコマンドラインオプションも - apchectl のオプションとして使用できます。 - また、apchectl スクリプトを直接編集し、 + apachectl のオプションとして使用できます。 + また、apachectl スクリプトを直接編集し、 スクリプト先頭付近の HTTPD 変数を変更することで、 httpd バイナリの正しい位置を指定したり、常に 付加させるコマンドライン引数を指定したりすることができます。

    @@ -115,7 +114,7 @@

    より多くの問題解決の方策の説明は、 - Apache FAQ をご覧下さい。

    + Apache FAQ をご覧下さい。

    top

    ブート時の起動

    @@ -152,14 +151,35 @@ のドキュメントもあります。

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.ko.euc-kr b/docs/manual/invoking.html.ko.euc-kr index cc32bb837f8..08a54c81882 100644 --- a/docs/manual/invoking.html.ko.euc-kr +++ b/docs/manual/invoking.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ - Apache HTTP Server +ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

     ġ ϳ

    @@ -136,7 +141,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.html.tr.utf8 b/docs/manual/invoking.html.tr.utf8 index 6498c1bafe5..ed255ebc92c 100644 --- a/docs/manual/invoking.html.tr.utf8 +++ b/docs/manual/invoking.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache HTTPd’nin başlatılması - Apache HTTP Sunucusu +Apache HTTPd’nin başlatılması - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache HTTPd’nin başlatılması

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache HTTPd’nin başlatılması

    Mevcut Diller:  de  |  en  | @@ -26,13 +31,10 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Apache normal olarak, Windows NT, 2000 ve XP'de bir hizmet olarak, - Windows 9x ve ME’de ise bir konsol uygulaması olarak çalışır. Ayrıntılı - bilgi için Apache HTTPd’nin bir - hizmet olarak çalıştırılması ve Apache HTTPd’nin bir konsol - uygulaması olarak çalıştırılması bölümlerine bakınız.

    +

    Apache normal olarak, Windows'ta bir hizmet olarak çalışır. Ayrıntılı + bilgi için Apache HTTPD’nin bir + hizmet olarak çalıştırılması bölümüne bakınız.

    Unix’te ise artalanda isteklere yanıt vermek için sürekli çalışan bir artalan sürecidir. Bu belgede httpd’nin nasıl @@ -42,7 +44,7 @@

  • Başlatma Sırasındaki Hatalar
  • Sistem Açılışında Başlatma
  • Ek Bilgiler
  • -

    Ayrıca bakınız:

    +

    Ayrıca bakınız:

    top

    Apache Nasıl Başlatılır?

    @@ -104,7 +106,7 @@ sunucusunun zaten çalışmakta oluşu. -

    Bu ve diğer sorun çözme talimatları için Apache SSS’sini inceleyiniz.

    +

    Bu ve diğer sorun çözme talimatları için Apache SSS’sini inceleyiniz.

    top
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/invoking.xml b/docs/manual/invoking.xml index c2f3ff910ef..d989bd08798 100644 --- a/docs/manual/invoking.xml +++ b/docs/manual/invoking.xml @@ -25,12 +25,10 @@ Starting Apache -

    On Windows, Apache is normally run as a service on Windows - NT, 2000 and XP, or as a console application on Windows 9x and - ME. For details, see Running Apache as a Service - and Running Apache as a - Console Application.

    +

    On Windows, Apache is normally run as a service. + For details, see Running Apache as a Service. +

    On Unix, the httpd program is run as a daemon that executes continuously in the diff --git a/docs/manual/invoking.xml.de b/docs/manual/invoking.xml.de index 99e1f95fc7c..be7ae7f3c4a 100644 --- a/docs/manual/invoking.xml.de +++ b/docs/manual/invoking.xml.de @@ -1,7 +1,7 @@ - + + - + + + + -The Apache License, Version 2.0 - Apache HTTP Server +The Apache License, Version 2.0 - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    The Apache License, Version 2.0

    +Apache > HTTP Server > Documentation > Version 2.4

    The Apache License, Version 2.0

    Available Languages:  en 

    @@ -232,7 +237,28 @@ limitations under the License.

    Available Languages:  en 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.html.en b/docs/manual/logs.html.en index 2bbf5288429..db5e69b82f9 100644 --- a/docs/manual/logs.html.en +++ b/docs/manual/logs.html.en @@ -1,22 +1,27 @@ - -Log Files - Apache HTTP Server +Log Files - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Log Files

    Available Languages:  en  |  fr  | @@ -42,7 +47,7 @@

  • Piped Logs
  • Virtual Hosts
  • Other Log Files
  • -
    +

    See also

    top

    Overview

    @@ -161,9 +166,8 @@

    Do this by specifying the name of the module in your LogLevel directive:

    -

    - LogLevel info rewrite:trace5 -

    +
    LogLevel info rewrite:trace5
    +

    This sets the main LogLevel to info, but turns it up to trace5 for @@ -193,9 +197,9 @@ general is beyond the scope of this document, and not really part of the job of the web server itself. For more information about this topic, and for applications which perform log - analysis, check the - Open Directory or - Yahoo.

    + analysis, check the + Open Directory. +

    Various versions of Apache httpd have used other modules and directives to control access logging, including @@ -215,10 +219,9 @@

    A typical configuration for the access log might look as follows.

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +

    This defines the nickname common and associates it with a particular log format string. The format @@ -276,7 +279,7 @@ machine. This information is highly unreliable and should almost never be used except on tightly controlled internal networks. Apache httpd will not even attempt to determine - this information unless IdentityCheck is set + this information unless IdentityCheck is set to On.

    frank (%u)
    @@ -357,11 +360,9 @@

    Another commonly used format string is called the Combined Log Format. It can be used as follows.

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\"" combined
    - CustomLog log/access_log combined -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
    +CustomLog log/access_log combined
    +

    This format is exactly the same as the Common Log Format, with the addition of two more fields. Each of the additional @@ -409,12 +410,11 @@ information. The last two CustomLog lines show how to mimic the effects of the ReferLog and AgentLog directives.

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    - CustomLog logs/referer_log "%{Referer}i -> %U"
    - CustomLog logs/agent_log "%{User-agent}i" -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +CustomLog logs/referer_log "%{Referer}i -> %U"
    +CustomLog logs/agent_log "%{User-agent}i"
    +

    This example also shows that it is not necessary to define a nickname with the LogFormat directive. Instead, @@ -434,47 +434,43 @@ include or exclude requests where the environment variable is set. Some examples:

    -

    - # Mark requests from the loop-back interface
    - SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    - # Mark requests for the robots.txt file
    - SetEnvIf Request_URI "^/robots\.txt$" dontlog
    - # Log what remains
    - CustomLog logs/access_log common env=!dontlog -

    +
    # Mark requests from the loop-back interface
    +SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    +# Mark requests for the robots.txt file
    +SetEnvIf Request_URI "^/robots\.txt$" dontlog
    +# Log what remains
    +CustomLog logs/access_log common env=!dontlog
    +

    As another example, consider logging requests from english-speakers to one log file, and non-english speakers to a different log file.

    -

    - SetEnvIf Accept-Language "en" english
    - CustomLog logs/english_log common env=english
    - CustomLog logs/non_english_log common env=!english -

    +
    SetEnvIf Accept-Language "en" english
    +CustomLog logs/english_log common env=english
    +CustomLog logs/non_english_log common env=!english
    +

    In a caching scenario one would want to know about the efficiency of the cache. A very simple method to find this out would be:

    -

    - SetEnv CACHE_MISS 1
    - LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    - CustomLog logs/access_log common-cache -

    +
    SetEnv CACHE_MISS 1
    +LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    +CustomLog logs/access_log common-cache
    +

    mod_cache will run before - mod_env and when successfull will deliver the + mod_env and, when successful, will deliver the content without it. In that case a cache hit will log -, while a cache miss will log 1.

    In addition to the env= syntax, LogFormat supports logging values conditional upon the HTTP response code:

    -

    - LogFormat "%400,501{User-agent}i" browserlog
    - LogFormat "%!200,304,302{Referer}i" refererlog -

    +
    LogFormat "%400,501{User-agent}i" browserlog
    +LogFormat "%!200,304,302{Referer}i" refererlog
    +

    In the first example, the User-agent will be logged if the HTTP status code is 400 or 501. In other cases, a @@ -553,20 +549,14 @@ for this purpose. For example, to rotate the logs every 24 hours, you can use:

    -

    - CustomLog "|/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -

    +
    CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common
    +

    Notice that quotes are used to enclose the entire command that will be called for the pipe. Although these examples are for the access log, the same technique can be used for the error log.

    -

    A similar but much more flexible log rotation program - called cronolog - is available at an external site.

    -

    As with conditional logging, piped logs are a very powerful tool, but they should not be used where a simpler solution like off-line post-processing is available.

    @@ -575,11 +565,9 @@ a shell. Use "|$" instead of "|" to spawn using a shell (usually with /bin/sh -c):

    -

    - # Invoke "rotatelogs" using a shell
    - CustomLog "|$/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -

    +
    # Invoke "rotatelogs" using a shell
    +CustomLog "|$/usr/local/apache/bin/rotatelogs   /var/log/access_log 86400" common
    +

    This was the default behaviour for Apache 2.2. Depending on the shell specifics this might lead to @@ -588,6 +576,18 @@ For compatibility reasons with Apache 2.2 the notation "||" is also supported and equivalent to using "|".

    + +

    Windows note

    +

    Note that on Windows, you may run into problems when running many piped + logger processes, especially when HTTPD is running as a service. This is + caused by running out of desktop heap space. The desktop heap space given + to each service is specified by the third argument to the + SharedSection parameter in the + HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\SubSystems\Windows + registry value. Change this value with care; the normal + caveats for changing the Windows registry apply, but you might also exhaust + the desktop heap pool if the number is adjusted too high.

    +
    top

    Virtual Hosts

    @@ -622,14 +622,12 @@ later split the log into individual files. For example, consider the following directives.

    -

    - LogFormat "%v %l %u %t \"%r\" %>s %b" - comonvhost
    - CustomLog logs/access_log comonvhost -

    +
    LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
    +CustomLog logs/access_log comonvhost
    +

    The %v is used to log the name of the virtual - host that is serving the request. Then a program like split-logfile can be used to + host that is serving the request. Then a program like split-logfile can be used to post-process the access log in order to split it into one file per virtual host.

    top
    @@ -688,7 +686,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.html.fr b/docs/manual/logs.html.fr index 5bb22c2f703..510dd622cbe 100644 --- a/docs/manual/logs.html.fr +++ b/docs/manual/logs.html.fr @@ -1,22 +1,27 @@ - -Fichiers journaux - Serveur Apache HTTP +Fichiers journaux - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Fichiers journaux

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Fichiers journaux

    Langues Disponibles:  en  |  fr  | @@ -42,7 +47,7 @@

  • Journaux redirigs
  • Htes virtuels
  • Autres fichiers journaux
  • -
    +

    Voir aussi

    top

    Vue d'ensemble

    @@ -174,9 +179,8 @@

    Pour ce faire, vous devez spcifier le nom du module dans votre directive LogLevel :

    -

    - LogLevel info rewrite:trace5 -

    +
    LogLevel info rewrite:trace5
    +

    Dans cet exemple, le niveau de journalisation gnral est dfini info, et trace5 pour mod_rewrite.

    @@ -207,8 +211,7 @@ dehors du sujet de ce document et ne fait pas vraiment partie intgrante du travail du serveur web lui-mme. Pour plus d'informations propos de ce sujet et des applications ddies l'analyse de journaux, vous pouvez vous - rfrer Open Directory ou - Yahoo.

    + rfrer Open Directory.

    Diffrentes versions du dmon Apache httpd utilisaient d'autres modules et directives pour contrler la journalisation des accs, l'instar de @@ -230,10 +233,9 @@

    Voici une configuration typique pour le journal des accs :

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +

    Ici est dfinie l'identit common qui est ensuite associe une chane de format de journalisation particulire. @@ -299,7 +301,7 @@ trs peu fiable et ne devrait jamais tre utilise, sauf dans le cas de rseaux internes troitement contrls. Le dmon httpd ne cherchera d'ailleurs obtenir cette information que si la directive - IdentityCheck est positionne + IdentityCheck est positionne On.

    frank (%u)
    @@ -381,11 +383,9 @@ "Combined Log Format" (Format de journalisation combin). Il s'utilise comme suit :

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\"" combined
    - CustomLog log/access_log combined -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
    +CustomLog log/access_log combined
    +

    Ce format est identique au Common Log Format, avec deux champs supplmentaires. Chacun de ces deux champs utilise la directive @@ -434,12 +434,11 @@ comment simuler les effets des directives ReferLog et AgentLog.

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    - CustomLog logs/referer_log "%{Referer}i -> %U"
    - CustomLog logs/agent_log "%{User-agent}i" -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +CustomLog logs/referer_log "%{Referer}i -> %U"
    +CustomLog logs/agent_log "%{User-agent}i"
    +

    Cet exemple montre aussi qu'il n'est pas obligatoire d'associer une chane de format un alias au moyen de la directive @@ -464,34 +463,31 @@ la variable d'environnement est dfinie. Quelques exemples :

    -

    - # Marque les requtes en provenance de l'interface loop-back
    - SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    - # Marque les requtes pour le fichier robots.txt
    - SetEnvIf Request_URI "^/robots\.txt$" dontlog
    - # Journalise toutes les autres requtes
    - CustomLog logs/access_log common env=!dontlog -

    +
    # Marque les requtes en provenance de l'interface loop-back
    +SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    +# Marque les requtes pour le fichier robots.txt
    +SetEnvIf Request_URI "^/robots\.txt$" dontlog
    +# Journalise toutes les autres requtes
    +CustomLog logs/access_log common env=!dontlog
    +

    Autre exemple, imaginons l'enregistrement des requtes en provenance d'utilisateurs de langue anglaise dans un journal, et celles des autres utilisateurs dans un autre journal.

    -

    - SetEnvIf Accept-Language "en" english
    - CustomLog logs/english_log common env=english
    - CustomLog logs/non_english_log common env=!english -

    +
            SetEnvIf Accept-Language "en" english
    +        CustomLog logs/english_log common env=english
    +        CustomLog logs/non_english_log common env=!english
    +

    Dans le contexte d'une mise en cache, il peut tre intressant de connatre l'efficacit du cache. Pour y parvenir, on pourrait utiliser cette mthode simple :

    -

    - SetEnv CACHE_MISS 1
    - LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    - CustomLog logs/access_log common-cache -

    +
    SetEnv CACHE_MISS 1
    +LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    +CustomLog logs/access_log common-cache
    +

    mod_cache va s'excuter avant mod_env, et si son action est couronne de @@ -504,10 +500,9 @@ valeurs de journalisation conditionnelles bases sur le code de la rponse HTTP :

    -

    - LogFormat "%400,501{User-agent}i" browserlog
    - LogFormat "%!200,304,302{Referer}i" refererlog -

    +
    LogFormat "%400,501{User-agent}i" browserlog
    +LogFormat "%!200,304,302{Referer}i" refererlog
    +

    Dans le premier exemple, le User-agent sera enregistr si le code d'tat HTTP est 400 ou 501. Dans le cas @@ -599,20 +594,14 @@ appel rotatelogs. Par exemple, pour une rotation des journaux toutes les 24 heures, ajoutez ces lignes :

    -

    - CustomLog "|/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -

    +
    CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common
    +

    Notez que l'ensemble de la commande qui sera appele par le tube de communication a t place entre guillemets. Bien que cet exemple concerne le journal des accs, la mme technique peut tre utilise pour le journal des erreurs.

    -

    Il existe un autre programme de rotation des journaux similaire mais - beaucoup plus souple : il s'agit de "cronolog", non fourni par Apache, - mais disponible ici.

    -

    Comme la journalisation conditionnelle, la journalisation redirige est un outil trs puissant, mais si elle existe, il est prfrable d'utiliser une solution plus simple comme le traitement posteriori hors ligne.

    @@ -623,11 +612,10 @@ au lieu de "|" (en gnral avec /bin/sh -c) :

    -

    - # Invocation de "rotatelogs" en utilisant un shell
    - CustomLog "|$/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -

    +
    # Invocation de "rotatelogs" en utilisant un shell
    +CustomLog "|$/usr/local/apache/bin/rotatelogs   /var/log/access_log 86400" common
    + +

    Il s'agissait du comportement par dfaut sous Apache 2.2. Selon les spcificits du shell, ceci peut gnrer un processus shell @@ -636,6 +624,21 @@ redmarrage. La notation "||" est aussi supporte pour des raisons de compatibilit avec Apache 2.2 et est quivalente "|".

    + +

    Note propos de la plateforme Windows

    +

    Notez que sous Windows, la mmoire alloue au bureau (desktop + heap) peut devenir insuffisante si vous utilisez de nombreux + processus vers lesquels sont redirigs des journaux via un pipe, et + ceci particulirement si httpd s'excute en tant que service. La + quantit de mmoire du bureau alloue chaque service est spcifie + dans le troisime argument du paramtre SharedSection + de la cl de registre + HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\SubSystems\Windows. + Modifiez cette valeur avec prudence ; les + prcautions d'usage s'imposent lorsqu'on modifie la base de registre, + mais vous pouvez aussi saturer la mmoire du bureau si vous + spcifiez une valeur trop leve.

    +
    top

    Htes virtuels

    @@ -668,14 +671,12 @@ journal, puis de sparer ultrieurement le journal en plusieurs journaux individuels. Considrons par exemple les directives suivantes :

    -

    - LogFormat "%v %l %u %t \"%r\" %>s %b" - comonvhost
    - CustomLog logs/access_log comonvhost -

    +
    LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
    +CustomLog logs/access_log comonvhost
    +

    Le champ %v sert enregistrer le nom de l'hte virtuel qui - traite la requte. Un programme tel que split-logfile peut ensuite tre utilis + traite la requte. Un programme tel que split-logfile peut ensuite tre utilis pour gnrer " froid" autant de journaux que d'htes virtuels.

    top
    @@ -727,18 +728,6 @@ serveur en production. Vous trouverez plus d'informations dans la documentation du module mod_cgi.

    - -

    Journal de rcriture

    - - -

    Lorsqu'on utilise les fonctionnalits puissantes et complexes du - module mod_rewrite, il est presque - toujours ncessaire d'utiliser la directive - RewriteLog afin de - faciliter le dbogage. Ce fichier journal fournit une analyse dtaille - de la transformation des requtes par le moteur de rcriture. Le niveau - de dtail est contrl par la directive - RewriteLogLevel.

    @@ -747,7 +736,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.html.ja.utf8 b/docs/manual/logs.html.ja.utf8 index ab0b424a030..05438f9eade 100644 --- a/docs/manual/logs.html.ja.utf8 +++ b/docs/manual/logs.html.ja.utf8 @@ -1,32 +1,38 @@ - -ログファイル - Apache HTTP サーバ +ログファイル - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    ログファイル

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    ウェブサーバを効果的に管理するためには、サーバの活動やパフォーマンス、 今発生しているかもしれない問題に関するフィードバックを得ることが必要です。 @@ -42,7 +48,7 @@

  • パイプ経由のログ
  • バーチャルホスト
  • 他のログファイル
  • -
    +

    参照

    top

    @@ -137,9 +143,8 @@ 始まりに過ぎません。次の段階は有用な統計を取るためにこの情報を 解析することです。一般的なログ解析はこの文書の範囲外で、 ウェブサーバ自身の仕事というわけでもありません。この話や、 - ログ解析を行なうアプリケーションの情報を得るには、 - Open Directory - Yahoo を調べてください。

    + ログ解析を行なうアプリケーションの情報を得るには、 + Open Directory を調べてください。

    いろんなバージョンの Apache httpd が mod_log_config, mod_log_agent, TransferLog ディレクティブといった、 @@ -567,12 +572,33 @@

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.html.ko.euc-kr b/docs/manual/logs.html.ko.euc-kr index ba835021041..e784e3c6319 100644 --- a/docs/manual/logs.html.ko.euc-kr +++ b/docs/manual/logs.html.ko.euc-kr @@ -1,22 +1,27 @@ - -α - Apache HTTP Server +α - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    α

    :  en  |  fr  | @@ -39,7 +44,7 @@

  • α׸
  • ȣƮ
  • ٸ α
  • -
    +

    top

    @@ -126,8 +131,7 @@ ̴. ܰ мϿ 踦 ̴. Ϲ α м ؼ ٷ , α м ƴϴ. α м - α׸ мϴ Ʈ ؼ Open Directory - Yahoo + α׸ мϴ Ʈ ؼ Open Directory ϶.

    ġ mod_log_referer, mod_log_agent, @@ -519,7 +523,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.html.tr.utf8 b/docs/manual/logs.html.tr.utf8 index 44345bcfec8..484d626202a 100644 --- a/docs/manual/logs.html.tr.utf8 +++ b/docs/manual/logs.html.tr.utf8 @@ -1,22 +1,27 @@ - -Günlük Dosyaları - Apache HTTP Sunucusu +Günlük Dosyaları - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Günlük Dosyaları

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Günlük Dosyaları

    Mevcut Diller:  en  |  fr  | @@ -24,7 +29,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bir HTTP sunucusunu verimli şekilde yönetebilmek için oluşabilecek sorunlardan başka sunucunun başarımı ve etkinliği hakkında da bazı geri @@ -33,20 +37,41 @@ yeteneğini nasıl yapılandıracağınızdan ve günlük kayıtlarını nasıl yorumlayacağınızdan bahsedilecektir.

    -
    top
    +

    Giriş

    + + +
    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    + \ No newline at end of file diff --git a/docs/manual/index.xml b/docs/manual/index.xml index 9df43e9e74a..7785e95d3e9 100644 --- a/docs/manual/index.xml +++ b/docs/manual/index.xml @@ -38,8 +38,7 @@ Documentation Compiling and Installing Starting Stopping or Restarting - Run-time Configuration Directives - Directive Quick-Reference + Run-time Configuration Directives Modules Multi-Processing Modules (MPMs) Filters @@ -50,6 +49,7 @@ Documentation Users' Guide + Getting Started Binding to Addresses and Ports Configuration Files Configuration Sections @@ -74,12 +74,13 @@ Documentation CGI: Dynamic Content .htaccess files Server Side Includes (SSI) - Per-user Web Directories - (public_html) + Per-user Web Directories (public_html) + Reverse proxy setup guide Platform Specific Notes Microsoft Windows + RPM-based Systems (Redhat / CentOS / Fedora) Novell NetWare EBCDIC Port @@ -88,6 +89,7 @@ Documentation Frequently Asked Questions Sitemap Documentation for Developers + Helping with the documentation Other Notes Wiki diff --git a/docs/manual/index.xml.da b/docs/manual/index.xml.da index 4b2289446b9..16b832c0ae0 100644 --- a/docs/manual/index.xml.da +++ b/docs/manual/index.xml.da @@ -1,7 +1,7 @@ - + + - + + + - + + + + + + + -Kompilieren und Installieren - Apache HTTP Server +Kompilieren und Installieren - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Kompilieren und Installieren

    +Apache > HTTP-Server > Dokumentation > Version 2.4
    top

    berblick fr die Ungeduldigen

    @@ -326,7 +331,7 @@

    Werfen Sie auch einen Blick in das Apache-Handbuch unter docs/manual/. Die aktuellste Version dieses Handbuchs sowie eine komplette Referenz der verfgbaren Konfigurationsanweisungen finden - Sie unter http://httpd.apache.org/docs/trunk/.

    + Sie unter http://httpd.apache.org/docs/2.4/.

    top

    Testen

    @@ -404,7 +409,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/install.html.en b/docs/manual/install.html.en index da415a6b4d1..d598d495394 100644 --- a/docs/manual/install.html.en +++ b/docs/manual/install.html.en @@ -1,22 +1,27 @@ - -Compiling and Installing - Apache HTTP Server +Compiling and Installing - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Compiling and Installing

    +Apache > HTTP Server > Documentation > Version 2.4

    Compiling and Installing

    Available Languages:  de  |  en  | @@ -31,14 +36,15 @@

    This document covers compilation and installation of the Apache HTTP Server on Unix and Unix-like systems only. For compiling and installation on Windows, see Using Apache HTTP Server with Microsoft - Windows. For other platforms, see the platform documentation.

    + Windows and Compiling Apache for Microsoft Windows. + For other platforms, see the platform documentation.

    Apache httpd uses libtool and autoconf to create a build environment that looks like many other Open Source projects.

    If you are upgrading from one minor version to the next (for - example, 2.2.50 to 2.2.51), please skip down to the upgrading section.

    + example, 2.4.9 to 2.4.10), please skip down to the upgrading section.

    +

    See also

    top
    Download$ lynx http://httpd.apache.org/download.cgi + Download the latest release from http://httpd.apache.org/download.cgi
    Tlchargement$ lynx http://httpd.apache.org/download.cgi + Tlchargez la dernire version depuis http://httpd.apache.org/download.cgi
    İndirme$ lynx http://httpd.apache.org/download.cgi + http://httpd.apache.org/download.cgi adresinden en son + dağıtımı indirin. +
    Download$ lynx http://httpd.apache.org/download.cgi + Download the latest release from http://httpd.apache.org/download.cgi
    + +

    Apache HTTP Sunucusu, isteğin ilk alınışından itibaren, URL eşleme + işlemleri, bağlantının son çözümlemesi ve bu işlemler sırasına ortaya çıkan + hatalar da dahil olmak üzere sunucunuzda meydana gelen herşeyi günlüklemek + için çok çeşitli mekanizmalar içerir. Buna ek olarak, günlükleme + yetenekleri sağlayan üçüncü parti modüller de kullanılabilir veya mevcut + günlük dosyalarına girdiler enjekte edilebilir. Ayrıca, CGI programları, + PHP betikleri ve benzerleri sunucu hata günlüğüne kendi iletilerini + gönderebilirler.

    + +

    Bu belgede Apache HTTP Sunucusunun standart parçası olan günlükleme + modülleri hakkında bilgi verilecektir.

    + +
    top
    +

    Güvenlik Uyarısı

    -

    Apache’nin günlük dosyalarını yazdığı dizine yazabilen birinin sunucuyu +

    Apache httpd’nin günlük dosyalarını yazdığı dizine yazabilen birinin sunucuyu başlatan kullanıcı kimliğine (bu genellikle root olur) erişim kazanabileceğine hemen hemen kesin gözüyle bakılabilir. Sonuçlarının neler olacağını kestiremiyorsanız günlüklerin yazıldığı dizinde hiç @@ -61,7 +86,7 @@

    Hata Günlüğü

    - +

    İsmi ve yeri ErrorLog yönergesi ile belirtilen sunucu hata günlüğü, en önemli günlük dosyasıdır. Apache @@ -77,23 +102,22 @@ hataları syslog’a veya borulamak suretiyle bir programa aktarması da mümkündür.

    -

    Hata günlüğünün biçemi anlaşılır olup içeriği kısmen serbestçe - belirlenir. Çoğu hata günlüğü girdisinde bulunan belli başlı bilgiler - vardır. Örnek tipik bir hata iletisi içermektedir:

    +

    Hata günlüğünün biçemi ErrorLogFormat yönergesi ile belirlenir. Bu yönergeyi + kullanarak günlüklenen değerleri özelleştirebilirsiniz. Bir biçem + belirtmezseniz öntanımlı biçem kullanılır. Örnek tipik bir hata iletisi + içermektedir:

    - [Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] - client denied by server configuration: - /export/home/live/ap/htdocs/test + [Fri Sep 09 10:42:29.902022 2011] [core:error] [pid 35708:tid 4328636416] + [client 72.15.99.187] Dosya yok: /usr/local/apache2/htdocs/favicon.ico

    Günlük girdisinin ilk öğesi iletinin yazıldığı tarih ve saatten oluşur. - İkinci öğe raporlanan bilginin önem derecesini belirtir. Hata günlüğüne - gönderilecek hata türlerinin önem seviyesini belirlemek için LogLevel yönergesi kullanılır. Üçüncü öğe - hatanın üretilmesine sebep olan istemcinin IP adresini içerir. Kalanı - iletinin kendisidir (duruma bakılırsa sunucu istemci erişimini reddetmek - üzere yapılandırılmış). Sunucu istenen belgenin (belge yolunu değil) - dosya sistemindeki yolunu raporlamıştır.

    + İkincisi iletiyi üreten modülün ismi (bu durumda: core) ile raporlanan + bilginin önem derecesini belirtir. Bunu varsa sürecin kimliği ve yine + varsa evre kimliği izler. Sonraki öğe hatanın üretilmesine sebep olan + istemcinin IP adresini içerir. Kalanı iletinin kendisidir (duruma + bakılırsa bir dosyaya yapılan istek yerine getirilememiş).

    Hata günlüğünde görünebilecek ileti çeşitliliği oldukça fazladır. Çoğu yukarıdaki örneğin benzeridir. Hata günlüğü ayrıca, CGI betiklerinin @@ -101,13 +125,11 @@ hataya (stderr) yazılan her türlü bilgi doğrudan hata günlüğüne kopyalanır.

    -

    Hata günlüğünü bilgi ekleyerek veya kaldırarak kişiselleştirmek - mümkündür. Bununla birlikte, hata günlüğü girdilerinin ilgili olduğu - isteklerin erişim günlüğünde de girdileri - vardır. Örneğin, yukarıdaki girdi, erişim günlüğünde 403 durum kodlu bir - girdiyle ilgilidir. Erişim günlüğünü de kişiselleştirmek mümkün - olduğundan hata durumlarında bu günlük dosyasını da kullanarak daha - fazla bilgi sağlayabilirsiniz.

    +

    Hata günlüğüne ve erişim günlüğüne %L dizgeciği konularak + erişim günlüğündeki girdi ile hata günlüğündeki girdiyi ilişkilendirecek + bir günlük girdisi kimliği oluşturulabilir. + mod_unique_id yüklüyse günlük girdisi kimliği olarak + onun eşsiz istek kimliği de kullanılır.

    Sunucuyu denerken olası sorunlara karşı hata günlüğünü sürekli izlemelisiniz. Unix sistemlerinde bunu şöyle bir komutla @@ -118,6 +140,33 @@

    top
    +

    Modüllere göre günlükleme

    + + +

    LogLevel yönergesi, günlük + iletisinin üretilmesine sebep olan modüle bağlı bir önem seviyesi + belirleyebilmenizi sağlar. Bu yolla sorun yaşadığınız modülle ilgili + günlük musluklarını sonuna kadar açabiliri ek olarak ilgilendiğiniz diğer + modüllerle ilgili ayrıntıları da edinebilirsiniz. Özellikle + mod_proxy veya mod_rewrite gibi + modüllerde yapılmak isteneni denerken neler olup bittiğini ayrıntılarıyla + bilmek istediğiniz durumlarda kullanışlıdır.

    + +

    Bunu LogLevel yönergesinde modülün ismini + belirterek yapabilirsiniz:

    + +
    LogLevel info rewrite:trace5
    + + +

    Bu satırla ana LogLevel info'ya ayarlanırken + mod_rewrite için musluk trace5 seviyesine + kadar açılmaktadır.

    + +
    Bu yönerge, Apache HTTP Sunucusunun evvelki sürümlerinde mevcut olan + RewriteLog gibi günlükleme modüllerinin yerini almıştır. +
    +
    top
    +

    Erişim Günlüğü

    @@ -135,7 +184,7 @@ bilgiyi incelemektir. Günlük incelemesi bu belgenin kapsamına dahil değildir ve aslında bu işlem sunucunun yaptığı işlerden biri değildir. Bu konu ve günlük incelemesi yapan uygulamalar hakkında daha ayrıntılı - bilgi edinmek için dmoz.org veya Yahoo’ya bakınız.

    + bilgi edinmek için dmoz.org'a bakınız.

    Apache httpd’nin çeşitli sürümlerinde erişim günlüklerini denetlemek için kullanılan diğer modüller ve yönergeler arasında mod_log_referer, @@ -155,10 +204,9 @@

    Erişim günlüğü için sıklıkla kullanılan bir yapılandırma:

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +

    İlk satırda belli bir biçem dizgesi için common diye bir takma ad tanımlanmaktadır. Biçem dizgesi, sunucuya hangi @@ -211,7 +259,7 @@ üzerinde identd tarafından belirlenen istemcinin RFC 1413 kimliğidir. Bu bilgi oldukça güvenilmezdir ve sıkıca denetlenen iç ağlar haricinde hemen hemen asla kullanılmamalıdır. Apache, - IdentityCheck yönergesine + IdentityCheck yönergesine On değeri atanmış olmadıkça bu bilgiyi saptamaya uğraşmaz. @@ -240,11 +288,14 @@ saniye = 2 hane
    dilim  = (`+' | `-') 4 hane

    - Günlük biçem dizgesinde zaman gösterim biçemini +

    Günlük biçem dizgesinde zaman gösterim biçemini %{biçem}t şeklinde belirtmek de mümkündür. Buradaki biçem dizgesi, stardart C kütüphanesindeki strftime(3) işlevi için tanımlanmış - biçem belirteçleriyle oluşturulabilir. + biçem belirteçleriyle veya desteklenen özel belirteçlerle + oluşturulabilir. Ayrıntılı bilgi için mod_log_config + biçem dizgelerine + bakın.

    "GET /apache_pb.gif HTTP/1.0" @@ -286,11 +337,9 @@

    Sıklıkla kullanılan diğer bir biçem dizgesi Birleşik Günlük Biçemi (Combined Log Format) olup şöyle kullanılabilir:

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\"" combined
    - CustomLog log/access_log combined -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
    +CustomLog log/access_log combined
    +

    Bu biçem ilaveten 2 alan içermesi dışında Ortak Günlük Biçemi ile aynıdır. İlave alanların ikisi de %{başlık}i @@ -335,12 +384,11 @@ AgentLog yönergelerinin etkilerinin nasıl taklit edileceğini de göstermektedir.

    -

    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    - CustomLog logs/referer_log "%{Referer}i -> %U"
    - CustomLog logs/agent_log "%{User-agent}i" -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog logs/access_log common
    +CustomLog logs/referer_log "%{Referer}i -> %U"
    +CustomLog logs/agent_log "%{User-agent}i"
    +

    Bu örnek ayrıca, LogFormat yönergesi ile bir takma ad tanımlamanın şart olmadığını da göstermektedir. Günlük biçemi doğrudan CustomLog yönergesinde @@ -358,25 +406,50 @@ edilip edilmeyeceği CustomLog yönergesinin env= deyimi kullanılarak belirtilir. Bazı örnekler:

    -

    - # yerel konaktan kaynaklanan istekleri imleyelim
    - SetEnvIf Remote_Addr "127\.0\.0\.1" kaydetme
    - # robots.txt dosyası isteklerini imleyelim
    - SetEnvIf Request_URI "^/robots\.txt$" kaydetme
    - # Kalanları günlüğe kaydedelim
    - CustomLog logs/access_log common env=!kaydetme -

    +
    # yerel konaktan kaynaklanan istekleri imleyelim
    +SetEnvIf Remote_Addr "127\.0\.0\.1" kaydetme
    +# robots.txt dosyası isteklerini imleyelim
    +SetEnvIf Request_URI "^/robots\.txt$" kaydetme
    +# Kalanları günlüğe kaydedelim
    +CustomLog logs/access_log common env=!kaydetme
    +

    Başka bir örnek olarak, Türkçe belge isteklerini bir dosyaya diğer dillerdeki istekleri başka bir dosyaya kaydedelim.

    -

    - SetEnvIf Accept-Language "tr" turkce
    - CustomLog logs/turkce_log common env=turkce
    - CustomLog logs/diger_diller_log common env=!turkce -

    +
    SetEnvIf Accept-Language "tr" turkce
    +CustomLog logs/turkce_log common env=turkce
    +CustomLog logs/diger_diller_log common env=!turkce
    + + +

    Bir arabellekleme senaryosuna arabelleğin verimli kullanılıp + kullanılmadığını bilmek isteyelim. Bu basitçe şöyle yapılabilir:

    + +
    SetEnv CACHE_MISS 1
    +LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    +CustomLog logs/access_log common-cache
    + + +

    mod_cache önce mod_env modülünü + çalıştıracak ve başarılı olunduğu takdirde içeriği onsuz teslim + edecektir. Bu durumda arabellek kaybı 1 olarak + günlüklenirken arabellek sunumu - olarak + günlüklenecektir.

    + +

    env= sözdizimine ek olarak, LogFormat HTTP yanıt kodudaki koşul + değerlerini günlüklemeyi de destekler:

    + +
    LogFormat "%400,501{User-agent}i" browserlog
    +LogFormat "%!200,304,302{Referer}i" refererlog
    + -

    Şarta bağlı günlük kaydının çok esnek ve güçlü olabileceğini +

    Bu örnekte, HTTP durum kodu 400 veya 501 ise User-agent + başlığı günlüklenecektir. Aksi takdirde, günlüğe bir "-" yazılacaktır. + Benzer şekilde ikinci örnekte, HTTP durum kodu 200, 204 veya 302 + değilse (durum kodlarının öncesindeki "!" imine + dikkat) Referer başlığı günlüklenecektir.

    + +

    Koşula bağlı günlük kaydının çok esnek ve güçlü olabileceğini göstermiş olsak da günlük içeriğini denetlemenin tek yolu bu değildir. Günlük dosyaları sunucu etkinliğini eksiksiz olarak kaydedebildikleri takdirde daha yararlı olurlar. Günlük dosyalarını sonradan işleme tabi @@ -391,7 +464,7 @@

    Yükü ağır sunucularda günlük dosyalarına kaydedilen bilginin miktarı çok büyük boyutlara ulaşabilir. 10.000 istek içeren bir erişim günlüğü yaklaşık 1MB yer kaplar. Etkin günlük dosyasını belirli aralıklarla - değiştirmek veya silmek gerekebilir. Apache çalışırken dosyayı sürekli + değiştirmek veya silmek gerekebilir. Apache httpd çalışırken dosyayı sürekli açık tuttuğu ve yazdığı için bu işlem sunucu çalışırken yapılamaz. Bu bakımdan, günlük dosyası değiştirildikten veya silindikten sonra yeni dosyanın açılması için sunucunun yeniden @@ -428,10 +501,10 @@ derecede arttırır. Günlükler boruya yazılmak istenirse dosya ismini boru karakteriyle ("|") değiştirip ardına günlük girdilerini standart girdisinden kabul edecek programın ismini eklemek yeterlidir. - Apache sunucusu başlatıldığı zaman borulu günlük işlemini de + Apache httpd başlatıldığı zaman borulu günlük işlemini de başlatacaktır. Eğer sunucu çalışırken günlükleri kabul eden süreç - çökerse Apache bu programı yeniden başlatır. (Bu son özelliği sebebiyle - bu tekniğe “güvenilir borulu günlükleme” adını veriyoruz.)

    + çökerse Apache httpd bu programı yeniden başlatır. (Bu son özelliği + sebebiyle bu tekniğe “güvenilir borulu günlükleme” adını veriyoruz.)

    Borulu günlük süreçleri ana Apache httpd süreci tarafından başlatılır ve bu süreçler ana Apache httpd sürecinin kullanıcı kimliğini miras @@ -446,10 +519,8 @@ günlükleri 24 saatte bir döndürmek isterseniz bunu şöyle yapabilirsiniz:

    -

    - CustomLog "|/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -

    +
    CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common
    +

    Borunun diğer ucundaki süreci başlatacak komutun tırnak içine alındığına dikkat ediniz. Bu örnekler erişim günlüğü için verilmişse de @@ -461,6 +532,35 @@

    Borulu günlükler de şarta bağlı günlükleme kadar güçlü olmakla beraber çevrimdışı ardıl işlemler gibi daha basit çözümler için kullanılmamalıdır.

    + +

    Öntanımlı olarak borulu günlük süreci bir kabuk kullanmadan + çalıştırılır. Kabuk kullanarak (genelde /bin/sh -c ile) + yapılmak istenirse "|" yerine "|$" + kullanılır:

    + +
    # Kabuk kullanarak "rotatelogs" çalıştırmak
    +CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common
    + + +

    Bu, Apache 2.2 için öntanımlı davranıştı. Kabuk özelliklerine bağlı + olarak, yeniden başlatma sırasındaki sinyal işleme sorunları ve günlük + borulama uygulamasının yaşam süresi için ek bir kabuk süreci ile + sonuçlanabilir. Apache 2.2 ile uyumluluk açısından "||" + gösterimi de desteklenmekte olup "|" kullanımına + eşdeğerdir.

    + +

    Windows'ta yığın alanı

    +

    Windows'ta çok sayıda borulu günlükleme süreci çalışırken ve özellikle + HTTPD bir hizmet olarak çalışıyorsa sorunlar baş gösterebilir. Bunun + başlıca sebebi masaüstü yığın alanının (heap) dışına taşılmasıdır. Her + hizmete ayrılan masüstü yığın alanı, kayıt defterindeki + HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\SubSystems\Windows + kaydındaki üçüncü değiştirge olan SharedSection + değeridir. Bu değeri değiştirirken çok dikkatli olun; + bu, Windows kayıt defterini değiştirirken verilen normal + uyarılardandır, fakat eğer bu değer çok yüksek olursa masaüstü yığın + alanının tükenebileceği dikkate alınmalıdır.

    +
    top

    Sanal Konaklar

    @@ -493,14 +593,12 @@ ayrıştırılabilir. Örneğin, bu işlem için şu yönergeler kullanılıyor olsun:

    -

    - LogFormat "%v %l %u %t \"%r\" %>s %b" - ortaksankon
    - CustomLog logs/access_log ortaksankon -

    +
    LogFormat "%v %l %u %t \"%r\" %>s %b" ortaksankon
    +CustomLog logs/access_log ortaksankon
    +

    %v belirteci isteği sunan sanal konağın ismini günlüğe - yazmak için kullanılır. Daha sonra split-logfile gibi bir program + yazmak için kullanılır. Daha sonra split-logfile gibi bir program kullanarak, bu dosyadan her sanal konak için ayrı birer dosya elde edilebilir.

    top
    @@ -508,7 +606,7 @@

    Diğer Günlük Dosyaları

    - +

    Gönderilen ve alınan bayt sayısının günlüklenmesi

    @@ -553,17 +651,6 @@ asıl sunucuya uygulanmamalıdır. mod_cgi belgesinde daha fazla bilgi bulunabilir.

    - -

    Yeniden Yazım Günlüğü

    - - -

    Güçlü ve karmaşık mod_rewrite - özellikleri kullanılırken, hata ayıklamaya yardımcı olmak için - RewriteLog yönergesini - kullanmak gerekebilir. Yönerge, günlük dosyasında yeniden yazım - motorunun istekleri nasıl dönüştürdüğüyle ilgili ayrıntılı bir döküm - üretir. Ayrıntı seviyesi RewriteLogLevel yönergesi ile belirlenir.

    -

    Mevcut Diller:  en  | @@ -571,7 +658,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/logs.xml b/docs/manual/logs.xml index be260b311cf..a6a91985f8f 100644 --- a/docs/manual/logs.xml +++ b/docs/manual/logs.xml @@ -167,9 +167,9 @@

    Do this by specifying the name of the module in your LogLevel directive:

    - + LogLevel info rewrite:trace5 - +

    This sets the main LogLevel to info, but turns it up to trace5 for @@ -210,10 +210,9 @@ part of the job of the web server itself. For more information about this topic, and for applications which perform log analysis, check the - Open Directory or - Yahoo.

    + href="http://dmoz.org/Computers/Software/Internet/Site_Management/Log_Analysis/"> + Open Directory. +

    Various versions of Apache httpd have used other modules and directives to control access logging, including @@ -235,10 +234,10 @@

    A typical configuration for the access log might look as follows.

    - - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common -
    + +LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog logs/access_log common +

    This defines the nickname common and associates it with a particular log format string. The format @@ -298,7 +297,7 @@ almost never be used except on tightly controlled internal networks. Apache httpd will not even attempt to determine this information unless IdentityCheck is set + module="mod_ident">IdentityCheck is set to On.

    frank (%u)
    @@ -381,11 +380,10 @@

    Another commonly used format string is called the Combined Log Format. It can be used as follows.

    - - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\"" combined
    - CustomLog log/access_log combined -
    + +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined +CustomLog log/access_log combined +

    This format is exactly the same as the Common Log Format, with the addition of two more fields. Each of the additional @@ -435,12 +433,12 @@ to mimic the effects of the ReferLog and AgentLog directives.

    - - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    - CustomLog logs/referer_log "%{Referer}i -> %U"
    - CustomLog logs/agent_log "%{User-agent}i" -
    + +LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog logs/access_log common +CustomLog logs/referer_log "%{Referer}i -> %U" +CustomLog logs/agent_log "%{User-agent}i" +

    This example also shows that it is not necessary to define a nickname with the - - # Mark requests from the loop-back interface
    - SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
    - # Mark requests for the robots.txt file
    - SetEnvIf Request_URI "^/robots\.txt$" dontlog
    - # Log what remains
    - CustomLog logs/access_log common env=!dontlog -
    + +# Mark requests from the loop-back interface +SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog +# Mark requests for the robots.txt file +SetEnvIf Request_URI "^/robots\.txt$" dontlog +# Log what remains +CustomLog logs/access_log common env=!dontlog +

    As another example, consider logging requests from english-speakers to one log file, and non-english speakers to a different log file.

    - - SetEnvIf Accept-Language "en" english
    - CustomLog logs/english_log common env=english
    - CustomLog logs/non_english_log common env=!english -
    + +SetEnvIf Accept-Language "en" english +CustomLog logs/english_log common env=english +CustomLog logs/non_english_log common env=!english +

    In a caching scenario one would want to know about the efficiency of the cache. A very simple method to find this out would be:

    - - SetEnv CACHE_MISS 1
    - LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache
    - CustomLog logs/access_log common-cache -
    + +SetEnv CACHE_MISS 1 +LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache +CustomLog logs/access_log common-cache +

    mod_cache will run before - mod_env and when successfull will deliver the + mod_env and, when successful, will deliver the content without it. In that case a cache hit will log -, while a cache miss will log 1.

    @@ -502,10 +500,10 @@ module="mod_log_config">LogFormat supports logging values conditional upon the HTTP response code:

    - - LogFormat "%400,501{User-agent}i" browserlog
    - LogFormat "%!200,304,302{Referer}i" refererlog -
    + +LogFormat "%400,501{User-agent}i" browserlog +LogFormat "%!200,304,302{Referer}i" refererlog +

    In the first example, the User-agent will be logged if the HTTP status code is 400 or 501. In other cases, a @@ -586,20 +584,15 @@ for this purpose. For example, to rotate the logs every 24 hours, you can use:

    - - CustomLog "|/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common - + + CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common +

    Notice that quotes are used to enclose the entire command that will be called for the pipe. Although these examples are for the access log, the same technique can be used for the error log.

    -

    A similar but much more flexible log rotation program - called cronolog - is available at an external site.

    -

    As with conditional logging, piped logs are a very powerful tool, but they should not be used where a simpler solution like off-line post-processing is available.

    @@ -608,11 +601,10 @@ a shell. Use "|$" instead of "|" to spawn using a shell (usually with /bin/sh -c):

    - - # Invoke "rotatelogs" using a shell
    - CustomLog "|$/usr/local/apache/bin/rotatelogs - /var/log/access_log 86400" common -
    + +# Invoke "rotatelogs" using a shell +CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common +

    This was the default behaviour for Apache 2.2. Depending on the shell specifics this might lead to @@ -621,6 +613,18 @@ For compatibility reasons with Apache 2.2 the notation "||" is also supported and equivalent to using "|".

    + + Windows note +

    Note that on Windows, you may run into problems when running many piped + logger processes, especially when HTTPD is running as a service. This is + caused by running out of desktop heap space. The desktop heap space given + to each service is specified by the third argument to the + SharedSection parameter in the + HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\SubSystems\Windows + registry value. Change this value with care; the normal + caveats for changing the Windows registry apply, but you might also exhaust + the desktop heap pool if the number is adjusted too high.

    +
    @@ -657,15 +661,14 @@ later split the log into individual files. For example, consider the following directives.

    - - LogFormat "%v %l %u %t \"%r\" %>s %b" - comonvhost
    - CustomLog logs/access_log comonvhost -
    + +LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost +CustomLog logs/access_log comonvhost +

    The %v is used to log the name of the virtual host that is serving the request. Then a program like split-logfile can be used to + href="programs/split-logfile.html">split-logfile can be used to post-process the access log in order to split it into one file per virtual host.

    diff --git a/docs/manual/logs.xml.fr b/docs/manual/logs.xml.fr index 7a4032aa646..23080fc943d 100644 --- a/docs/manual/logs.xml.fr +++ b/docs/manual/logs.xml.fr @@ -1,9 +1,9 @@ - + - + + + + -Apache Miscellaneous Documentation - Apache HTTP Server +Apache Miscellaneous Documentation - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache Miscellaneous Documentation

    +Apache > HTTP Server > Documentation > Version 2.4

    Apache Miscellaneous Documentation

    Available Languages:  en  |  fr  | @@ -78,6 +83,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/misc/index.html.fr b/docs/manual/misc/index.html.fr index 9899bc11571..8301df6991b 100644 --- a/docs/manual/misc/index.html.fr +++ b/docs/manual/misc/index.html.fr @@ -1,22 +1,27 @@ - -Documentations diverses sur Apache - Serveur Apache HTTP +Documentations diverses sur Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Documentations diverses sur Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Documentations diverses sur Apache

    Langues Disponibles:  en  |  fr  | @@ -83,6 +88,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Autoris sous Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/misc/index.html.ko.euc-kr b/docs/manual/misc/index.html.ko.euc-kr index 6a22bc80811..6fabd9ea659 100644 --- a/docs/manual/misc/index.html.ko.euc-kr +++ b/docs/manual/misc/index.html.ko.euc-kr @@ -1,22 +1,27 @@ - -Ÿ ġ - Apache HTTP Server +Ÿ ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Ÿ ġ

    :  en  |  fr  | @@ -79,6 +84,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/misc/index.html.tr.utf8 b/docs/manual/misc/index.html.tr.utf8 index 6434b8e67de..ad869450f5e 100644 --- a/docs/manual/misc/index.html.tr.utf8 +++ b/docs/manual/misc/index.html.tr.utf8 @@ -1,22 +1,27 @@ - -Çeşitli Belgeler - Apache HTTP Sunucusu +Çeşitli Belgeler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Çeşitli Belgeler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Çeşitli Belgeler

    Mevcut Diller:  en  |  fr  | @@ -80,6 +85,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    +
    \ No newline at end of file diff --git a/docs/manual/misc/index.html.zh-cn b/docs/manual/misc/index.html.zh-cn.utf8 similarity index 76% rename from docs/manual/misc/index.html.zh-cn rename to docs/manual/misc/index.html.zh-cn.utf8 index 4da3ac6976a..8731bf3942a 100644 --- a/docs/manual/misc/index.html.zh-cn +++ b/docs/manual/misc/index.html.zh-cn.utf8 @@ -1,22 +1,27 @@ - -Apache 杂项文档 - Apache HTTP 服务器 +Apache 杂项文档 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache 杂项文档

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache 杂项文档

    可用语言:  en  |  fr  | @@ -69,6 +74,10 @@  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/misc/index.xml.fr b/docs/manual/misc/index.xml.fr index 4e54b0b90b6..4fc8ae5292b 100644 --- a/docs/manual/misc/index.xml.fr +++ b/docs/manual/misc/index.xml.fr @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/misc/password_encryptions.html b/docs/manual/misc/password_encryptions.html index 58363fa8a00..edeb4183ec7 100644 --- a/docs/manual/misc/password_encryptions.html +++ b/docs/manual/misc/password_encryptions.html @@ -3,3 +3,7 @@ URI: password_encryptions.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: password_encryptions.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/misc/password_encryptions.html.en b/docs/manual/misc/password_encryptions.html.en index 98484392661..f13ade977d1 100644 --- a/docs/manual/misc/password_encryptions.html.en +++ b/docs/manual/misc/password_encryptions.html.en @@ -1,24 +1,30 @@ - -Password Formats - Apache HTTP Server +Password Formats - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Password Formats

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Notes about the password encryption formats generated and understood by @@ -26,25 +32,20 @@

    +

    See also

    top

    Basic Authentication

    -

    There are four formats that Apache recognizes for basic-authentication +

    There are five formats that Apache recognizes for basic-authentication passwords. Note that not all formats work on every platform:

    -
    PLAIN TEXT (i.e. unencrypted)
    -
    Windows & Netware only.
    - -
    CRYPT
    -
    Unix only. Uses the traditional Unix crypt(3) function - with a randomly-generated 32-bit salt (only 12 bits used) and the first 8 - characters of the password.
    - -
    SHA1
    -
    "{SHA}" + Base64-encoded SHA-1 digest of the password.
    +
    bcrypt
    +
    "$2y$" + the result of the crypt_blowfish algorithm. + See the APR source file + crypt_blowfish.c + for the details of the algorithm.
    MD5
    "$apr1$" + the result of an Apache-specific algorithm using an @@ -52,10 +53,26 @@ random 32-bit salt and the password. See the APR source file apr_md5.c for the details of the algorithm.
    + +
    SHA1
    +
    "{SHA}" + Base64-encoded SHA-1 digest of the password. Insecure.
    + +
    CRYPT
    +
    Unix only. Uses the traditional Unix crypt(3) function + with a randomly-generated 32-bit salt (only 12 bits used) and the first 8 + characters of the password. Insecure.
    + +
    PLAIN TEXT (i.e. unencrypted)
    +
    Windows & Netware only. Insecure.

    Generating values with htpasswd

    +

    bcrypt

    + $ htpasswd -nbB myName myPassword
    + myName:$2y$05$c4WoMPo3SXsafkva.HHa6uXQZWr7oboPiC2bT/r7q1BB8I2s0BRqC +

    +

    MD5

    $ htpasswd -nbm myName myPassword
    myName:$apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ @@ -149,6 +166,12 @@ Use the APR function: apr_sha1_base64

    +

    Python

    + import base64
    + import hashlib
    + "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +

    +

    PostgreSQL (with the contrib/pgcrypto functions installed)

    @@ -207,8 +230,30 @@

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/password_encryptions.html.fr b/docs/manual/misc/password_encryptions.html.fr new file mode 100644 index 00000000000..432a734b726 --- /dev/null +++ b/docs/manual/misc/password_encryptions.html.fr @@ -0,0 +1,273 @@ + + + + + +Formats de mots de passe - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Formats de mots de passe

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + +

    Notes propos des formats de chiffrement des mots de passe + gnrs et compris par Apache.

    +
    + +
    top
    +
    +

    Authentification de base

    + +

    Voici les cinq formats de mots de passe qu'Apache reconnat + pour l'authentification de base. Notez que tous les formats ne sont + pas supports par toutes les plates-formes :

    + +
    + +
    bcrypt
    +
    "$2y$" + the result of the crypt_blowfish algorithm. Driv + de l'algorythme de chiffrement crypt_blowfish. Voir le fichier + source APR crypt_blowfish.c + pour plus de dtails propos de cet algorithme.
    + +
    MD5
    +
    "$apr1$" + le rsultat d'un algorithme spcifique Apache + utilisant un condens MD5 ritr (1000 fois) de combinaisons + varies du mot de passe et d'une source d'entropie sur 32 bits. + Voir le fichier source APR apr_md5.c + pour les dtails de l'algorithme.
    + + +
    SHA1
    +
    "{SHA}" + un condens SHA-1 du mot de passe cod en + Base64. Non sr.
    + +
    CRYPT
    +
    Unix seulement. Utilise la fonction Unix traditionnelle + crypt(3) avec une source d'entropie sur 32 bits + (seuls 12 bits sont utiliss), et seulement les 8 premiers + caractres du mot de passe. Non sr.
    + +
    PLAIN TEXT (autrement dit non chiffr)
    +
    Windows & Netware seulement. Non sr.
    +
    +

    Gnrer des mots de passe avec htpasswd

    + +

    bcrypt

    + $ htpasswd -nbB monNom monMot-de-passe
    + monNom:$2y$05$c4WoMPo3SXsafkva.HHa6uXQZWr7oboPiC2bT/r7q1BB8I2s0BRqC +

    + +

    MD5

    + $ htpasswd -nbm monNom monMot-de-passe
    + monNom:$apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ +

    + +

    SHA1

    + $ htpasswd -nbs monNom monMot-de-passe
    + monNom:{SHA}VBPuJHI7uixaa6LQGWx4s+5GKNE= +

    + +

    CRYPT

    + $ htpasswd -nbd monNom monMot-de-passe
    + monNom:rqXexS6ZhobKA +

    + + + +

    Gnrer des mots de passe CRYPT and MD5 avec le programme + OpenSSL en ligne de commande

    + + +

    OpenSSL connat l'algorithme MD5 spcifique Apache.

    + +

    MD5

    + $ openssl passwd -apr1 monMot-de-passe
    + $apr1$qHDFfhPC$nITSVHgYbDAK1Y0acGRnY0 +

    + +

    CRYPT

    + openssl passwd -crypt monMot-de-passe
    + qQ5vTYO3c8dsU +

    + + +

    Valider des mots de passe CRYPT and MD5 avec le programme + OpenSSL en ligne de commande

    + +

    La source d'entropie pour un mot de passe CRYPT est constitue + des deux premiers caractres (convertis en valeur binaire). Pour + valider monMot-de-passe par rapport + rqXexS6ZhobKA

    + +

    CRYPT

    + $ openssl passwd -crypt -salt rq monMot-de-passe
    + Warning: truncating password to 8 characters
    + rqXexS6ZhobKA +

    + +

    Notez que spcifier monMot-d au lieu de + monMot-de-passe produira le mme rsultat car seuls + les 8 premiers caractres des mots de passe CRYPT sont pris en + compte.

    + +

    La source d'entropie pour un mot de passe MD5 se situe entre + $apr1$ et le caractre $ suivant (sous + la forme d'une valeur binaire code en Base64 - au maximum 8 + caractres). Pour valider monMot-de-passe par rapport + $apr1$r31.....$HqJZimcKQFAMYayBlzkrA/

    + +

    MD5

    + $ openssl passwd -apr1 -salt r31..... monMot-de-passe
    + $apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ +

    + + +

    Champs mot de passe de base de donnes pour + mod_dbd

    +

    La variante SHA1 constitue probablement le format le mieux + appropri pour l'authentification DBD. Comme les fonctions SHA1 et + Base64 sont en gnral disponibles, d'autres logiciels peuvent + renseigner une base de donnes avec des mots de passe chiffrs + utilisables par l'authentification basique d'Apache.

    + +

    Pour crer des mots de passe au format SHA1 pour + l'authentification de base d'Apache dans divers langages :

    + +

    PHP

    + '{SHA}' . base64_encode(sha1($password, TRUE)) +

    + +

    Java

    + "{SHA}" + new sun.misc.BASE64Encoder().encode(java.security.MessageDigest.getInstance("SHA1").digest(password.getBytes())) +

    + +

    ColdFusion

    + "{SHA}" & ToBase64(BinaryDecode(Hash(password, "SHA1"), "Hex")) +

    + +

    Ruby

    + require 'digest/sha1'
    + require 'base64'
    + '{SHA}' + Base64.encode64(Digest::SHA1.digest(password)) +

    + +

    C ou C++

    + Utilisez la fonction APR : apr_sha1_base64 +

    + +

    Python

    + import base64
    + import hashlib
    + "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +

    + +

    PostgreSQL (avec les fonctions contrib/pgcrypto + installes)

    + + '{SHA}'||encode(digest(password,'sha1'),'base64') +

    + + +
    top
    +
    +

    Authentification base de condenss

    +

    Apache ne reconnat qu'un format pour les mots de passe + d'authentification base de condenss - le condens MD5 de la + chane utilisateur:domaine-de-protection:mot-de-passe + sous la forme d'une chane de 32 caractres au format hexadcimal. + domaine-de-protection est l'identifiant du domaine de + protection de l'autorisation pass en argument la directive + AuthName dans + httpd.conf.

    + +

    Champs de mot de passe de base de donnes pour + mod_dbd

    + +

    Comme la fonction MD5 est en gnral disponible, d'autres + logiciels peuvent renseigner une base de donnes avec des mots de + passe chiffrs utilisables par l'authentification base de + condenss d'Apache.

    + +

    Pour crer des mots de passe pour l'authentification base de + condenss d'Apache dans divers langages :

    + +

    PHP

    + md5($user . ':' . $realm . ':' .$password) +

    + +

    Java

    + byte b[] = java.security.MessageDigest.getInstance("MD5").digest( (user + ":" + realm + ":" + password ).getBytes());
    + java.math.BigInteger bi = new java.math.BigInteger(1, b);
    + String s = bi.toString(16);
    + while (s.length() < 32)
    + + s = "0" + s; + + // La chane s contient le mot de passe chiffr +

    + +

    ColdFusion

    + LCase(Hash( (user & ":" & realm & ":" & password) , "MD5")) +

    + +

    Ruby

    + require 'digest/md5'
    + Digest::MD5.hexdigest(user + ':' + realm + ':' + password) +

    + +

    PostgreSQL (avec les fonctions contrib/pgcrypto + installes)

    + + encode(digest( user || ':' || realm || ':' || password , 'md5'), 'hex') +

    + + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/misc/password_encryptions.xml b/docs/manual/misc/password_encryptions.xml index fa6fc4e4eab..e9acfe60a53 100644 --- a/docs/manual/misc/password_encryptions.xml +++ b/docs/manual/misc/password_encryptions.xml @@ -32,20 +32,15 @@
    Basic Authentication -

    There are four formats that Apache recognizes for basic-authentication +

    There are five formats that Apache recognizes for basic-authentication passwords. Note that not all formats work on every platform:

    -
    PLAIN TEXT (i.e. unencrypted)
    -
    Windows & Netware only.
    - -
    CRYPT
    -
    Unix only. Uses the traditional Unix crypt(3) function - with a randomly-generated 32-bit salt (only 12 bits used) and the first 8 - characters of the password.
    - -
    SHA1
    -
    "{SHA}" + Base64-encoded SHA-1 digest of the password.
    +
    bcrypt
    +
    "$2y$" + the result of the crypt_blowfish algorithm. + See the APR source file + crypt_blowfish.c + for the details of the algorithm.
    MD5
    "$apr1$" + the result of an Apache-specific algorithm using an @@ -53,10 +48,26 @@ random 32-bit salt and the password. See the APR source file apr_md5.c for the details of the algorithm.
    + +
    SHA1
    +
    "{SHA}" + Base64-encoded SHA-1 digest of the password. Insecure.
    + +
    CRYPT
    +
    Unix only. Uses the traditional Unix crypt(3) function + with a randomly-generated 32-bit salt (only 12 bits used) and the first 8 + characters of the password. Insecure.
    + +
    PLAIN TEXT (i.e. unencrypted)
    +
    Windows & Netware only. Insecure.
    Generating values with htpasswd + bcrypt + $ htpasswd -nbB myName myPassword
    + myName:$2y$05$c4WoMPo3SXsafkva.HHa6uXQZWr7oboPiC2bT/r7q1BB8I2s0BRqC +
    + MD5 $ htpasswd -nbm myName myPassword
    myName:$apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ @@ -150,6 +161,12 @@ Use the APR function: apr_sha1_base64
    + Python + import base64
    + import hashlib
    + "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +
    + PostgreSQL (with the contrib/pgcrypto functions installed) diff --git a/docs/manual/misc/password_encryptions.xml.fr b/docs/manual/misc/password_encryptions.xml.fr new file mode 100644 index 00000000000..b20fb48c29c --- /dev/null +++ b/docs/manual/misc/password_encryptions.xml.fr @@ -0,0 +1,246 @@ + + + + + + + + + + + Documentations diverses + + Formats de mots de passe + + +

    Notes à propos des formats de chiffrement des mots de passe + générés et compris par Apache.

    +
    + +
    Authentification de base + +

    Voici les cinq formats de mots de passe qu'Apache reconnaît + pour l'authentification de base. Notez que tous les formats ne sont + pas supportés par toutes les plates-formes :

    + +
    + +
    bcrypt
    +
    "$2y$" + the result of the crypt_blowfish algorithm. Dérivé + de l'algorythme de chiffrement crypt_blowfish. Voir le fichier + source APR crypt_blowfish.c + pour plus de détails à propos de cet algorithme.
    + +
    MD5
    +
    "$apr1$" + le résultat d'un algorithme spécifique à Apache + utilisant un condensé MD5 réitéré (1000 fois) de combinaisons + variées du mot de passe et d'une source d'entropie sur 32 bits. + Voir le fichier source APR apr_md5.c + pour les détails de l'algorithme.
    + + +
    SHA1
    +
    "{SHA}" + un condensé SHA-1 du mot de passe codé en + Base64. Non sûr.
    + +
    CRYPT
    +
    Unix seulement. Utilise la fonction Unix traditionnelle + crypt(3) avec une source d'entropie sur 32 bits + (seuls 12 bits sont utilisés), et seulement les 8 premiers + caractères du mot de passe. Non sûr.
    + +
    PLAIN TEXT (autrement dit non chiffré)
    +
    Windows & Netware seulement. Non sûr.
    +
    +
    Générer des mots de passe avec htpasswd + + bcrypt + $ htpasswd -nbB monNom monMot-de-passe
    + monNom:$2y$05$c4WoMPo3SXsafkva.HHa6uXQZWr7oboPiC2bT/r7q1BB8I2s0BRqC +
    + + MD5 + $ htpasswd -nbm monNom monMot-de-passe
    + monNom:$apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ +
    + + SHA1 + $ htpasswd -nbs monNom monMot-de-passe
    + monNom:{SHA}VBPuJHI7uixaa6LQGWx4s+5GKNE= +
    + + CRYPT + $ htpasswd -nbd monNom monMot-de-passe
    + monNom:rqXexS6ZhobKA +
    + +
    + +
    + Générer des mots de passe CRYPT and MD5 avec le programme + OpenSSL en ligne de commande + +

    OpenSSL connaît l'algorithme MD5 spécifique à Apache.

    + + MD5 + $ openssl passwd -apr1 monMot-de-passe
    + $apr1$qHDFfhPC$nITSVHgYbDAK1Y0acGRnY0 +
    + + CRYPT + openssl passwd -crypt monMot-de-passe
    + qQ5vTYO3c8dsU +
    +
    + +
    + Valider des mots de passe CRYPT and MD5 avec le programme + OpenSSL en ligne de commande +

    La source d'entropie pour un mot de passe CRYPT est constituée + des deux premiers caractères (convertis en valeur binaire). Pour + valider monMot-de-passe par rapport à + rqXexS6ZhobKA

    + + CRYPT + $ openssl passwd -crypt -salt rq monMot-de-passe
    + Warning: truncating password to 8 characters
    + rqXexS6ZhobKA +
    + +

    Notez que spécifier monMot-d au lieu de + monMot-de-passe produira le même résultat car seuls + les 8 premiers caractères des mots de passe CRYPT sont pris en + compte.

    + +

    La source d'entropie pour un mot de passe MD5 se situe entre + $apr1$ et le caractère $ suivant (sous + la forme d'une valeur binaire codée en Base64 - au maximum 8 + caractères). Pour valider monMot-de-passe par rapport + à $apr1$r31.....$HqJZimcKQFAMYayBlzkrA/

    + + MD5 + $ openssl passwd -apr1 -salt r31..... monMot-de-passe
    + $apr1$r31.....$HqJZimcKQFAMYayBlzkrA/ +
    +
    + +
    Champs mot de passe de base de données pour + mod_dbd +

    La variante SHA1 constitue probablement le format le mieux + approprié pour l'authentification DBD. Comme les fonctions SHA1 et + Base64 sont en général disponibles, d'autres logiciels peuvent + renseigner une base de données avec des mots de passe chiffrés + utilisables par l'authentification basique d'Apache.

    + +

    Pour créer des mots de passe au format SHA1 pour + l'authentification de base d'Apache dans divers langages :

    + + PHP + '{SHA}' . base64_encode(sha1($password, TRUE)) + + + Java + "{SHA}" + new sun.misc.BASE64Encoder().encode(java.security.MessageDigest.getInstance("SHA1").digest(password.getBytes())) + + + ColdFusion + "{SHA}" & ToBase64(BinaryDecode(Hash(password, "SHA1"), "Hex")) + + + Ruby + require 'digest/sha1'
    + require 'base64'
    + '{SHA}' + Base64.encode64(Digest::SHA1.digest(password)) +
    + + C ou C++ + Utilisez la fonction APR : apr_sha1_base64 + + + Python + import base64
    + import hashlib
    + "{SHA}" + format(base64.b64encode(hashlib.sha1(password).digest())) +
    + + + PostgreSQL (avec les fonctions contrib/pgcrypto + installées) + '{SHA}'||encode(digest(password,'sha1'),'base64') + +
    + +
    + +
    Authentification à base de condensés +

    Apache ne reconnaît qu'un format pour les mots de passe + d'authentification à base de condensés - le condensé MD5 de la + chaîne utilisateur:domaine-de-protection:mot-de-passe + sous la forme d'une chaîne de 32 caractères au format hexadécimal. + domaine-de-protection est l'identifiant du domaine de + protection de l'autorisation passé en argument à la directive + AuthName dans + httpd.conf.

    + +
    Champs de mot de passe de base de données pour + mod_dbd + +

    Comme la fonction MD5 est en général disponible, d'autres + logiciels peuvent renseigner une base de données avec des mots de + passe chiffrés utilisables par l'authentification à base de + condensés d'Apache.

    + +

    Pour créer des mots de passe pour l'authentification à base de + condensés d'Apache dans divers langages :

    + + PHP + md5($user . ':' . $realm . ':' .$password) + + + Java + byte b[] = java.security.MessageDigest.getInstance("MD5").digest( (user + ":" + realm + ":" + password ).getBytes());
    + java.math.BigInteger bi = new java.math.BigInteger(1, b);
    + String s = bi.toString(16);
    + while (s.length() < 32)
    + + s = "0" + s; + + // La chaîne s contient le mot de passe chiffré +
    + + ColdFusion + LCase(Hash( (user & ":" & realm & ":" & password) , "MD5")) + + + Ruby + require 'digest/md5'
    + Digest::MD5.hexdigest(user + ':' + realm + ':' + password) +
    + + + PostgreSQL (avec les fonctions contrib/pgcrypto + installées) + encode(digest( user || ':' || realm || ':' || password , 'md5'), 'hex') + + +
    +
    + +
    diff --git a/docs/manual/misc/password_encryptions.xml.meta b/docs/manual/misc/password_encryptions.xml.meta index e6e9d14933a..5226d4016d3 100644 --- a/docs/manual/misc/password_encryptions.xml.meta +++ b/docs/manual/misc/password_encryptions.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/misc/perf-tuning.html.en b/docs/manual/misc/perf-tuning.html.en index 7d85a085864..e461db01cd4 100644 --- a/docs/manual/misc/perf-tuning.html.en +++ b/docs/manual/misc/perf-tuning.html.en @@ -1,22 +1,27 @@ - -Apache Performance Tuning - Apache HTTP Server +Apache Performance Tuning - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache Performance Tuning

    +

    See also

    top

    Hardware and Operating System Issues

    @@ -60,7 +65,7 @@ that users consider "fast enough". This causes users to hit stop and reload, further increasing the load. You can, and should, control the MaxRequestWorkers setting so that your server - does not spawn so many children it starts swapping. This procedure + does not spawn so many children that it starts swapping. The procedure for doing this is simple: determine the size of your average Apache process, by looking at your process list via a tool such as top, and divide this into your total available memory, @@ -77,7 +82,7 @@
    • -

      Run the latest stable release and patchlevel of the +

      Run the latest stable release and patch level of the operating system that you choose. Many OS suppliers have introduced significant performance improvements to their TCP stacks and thread libraries in recent years.

      @@ -129,19 +134,16 @@ using these directives, if possible.

      Note that it's possible to scope the directives, such as - within a <Location /server-status> section. + within a <Location "/server-status"> section. In this case the DNS lookups are only performed on requests matching the criteria. Here's an example which disables lookups except for .html and .cgi files:

      -

      - HostnameLookups off
      - <Files ~ "\.(html|cgi)$">
      - - HostnameLookups on
      -
      - </Files> -

      +
      HostnameLookups off
      +<Files ~ "\.(html|cgi)$">
      +  HostnameLookups on
      +</Files>
      +

      But even still, if you just need DNS names in some CGIs you could consider doing the gethostbyname call in the @@ -155,41 +157,33 @@

      Wherever in your URL-space you do not have an Options FollowSymLinks, or you do have an Options - SymLinksIfOwnerMatch Apache will have to issue extra - system calls to check up on symlinks. One extra call per - filename component. For example, if you had:

      + SymLinksIfOwnerMatch
      , Apache will need to issue extra + system calls to check up on symlinks. (One extra call per + filename component.) For example, if you had:

      -

      - DocumentRoot /www/htdocs
      - <Directory />
      - - Options SymLinksIfOwnerMatch
      -
      - </Directory> -

      +
      DocumentRoot "/www/htdocs"
      +<Directory "/">
      +  Options SymLinksIfOwnerMatch
      +</Directory>
      -

      and a request is made for the URI /index.html. - Then Apache will perform lstat(2) on + +

      and a request is made for the URI /index.html, + then Apache will perform lstat(2) on /www, /www/htdocs, and /www/htdocs/index.html. The results of these lstats are never cached, so they will occur on every single request. If you really desire the symlinks - security checking you can do something like this:

      + security checking, you can do something like this:

      + +
      DocumentRoot "/www/htdocs"
      +<Directory "/">
      +  Options FollowSymLinks
      +</Directory>
      +
      +<Directory "/www/htdocs">
      +  Options -FollowSymLinks +SymLinksIfOwnerMatch
      +</Directory>
      -

      - DocumentRoot /www/htdocs
      - <Directory />
      - - Options FollowSymLinks
      -
      - </Directory>
      -
      - <Directory /www/htdocs>
      - - Options -FollowSymLinks +SymLinksIfOwnerMatch
      -
      - </Directory> -

      This at least avoids the extra checks for the DocumentRoot path. @@ -202,23 +196,20 @@ -

      AllowOverride

      +

      AllowOverride

      Wherever in your URL-space you allow overrides (typically - .htaccess files) Apache will attempt to open + .htaccess files), Apache will attempt to open .htaccess for each filename component. For example,

      -

      - DocumentRoot /www/htdocs
      - <Directory />
      - - AllowOverride all
      -
      - </Directory> -

      +
      DocumentRoot "/www/htdocs"
      +<Directory "/">
      +  AllowOverride all
      +</Directory>
      +

      and a request is made for the URI /index.html. Then Apache will attempt to open /.htaccess, @@ -234,21 +225,19 @@ -

      If at all possible, avoid content-negotiation if you're +

      If at all possible, avoid content negotiation if you're really interested in every last ounce of performance. In practice the benefits of negotiation outweigh the performance penalties. There's one case where you can speed up the server. Instead of using a wildcard such as:

      -

      - DirectoryIndex index -

      +
      DirectoryIndex index
      +

      Use a complete list of options:

      -

      - DirectoryIndex index.cgi index.pl index.shtml index.html -

      +
      DirectoryIndex index.cgi index.pl index.shtml index.html
      +

      where you list the most common choice first.

      @@ -258,7 +247,7 @@ determined by reading this single file, rather than having to scan the directory for files.

      -

      If your site needs content negotiation consider using +

      If your site needs content negotiation, consider using type-map files, rather than the Options MultiViews directive to accomplish the negotiation. See the Content Negotiation @@ -309,7 +298,7 @@

      In situations where Apache 2.x can ignore the contents of the file to be delivered -- for example, when serving static file content -- - it normally uses the kernel sendfile support the file if the OS + it normally uses the kernel sendfile support for the file if the OS supports the sendfile(2) operation.

      On most platforms, using sendfile improves performance by eliminating @@ -348,14 +337,14 @@ MinSpareServers setting. So a server being accessed by 100 simultaneous clients, using the default StartServers of 5 would take on - the order 95 seconds to spawn enough children to handle - the load. This works fine in practice on real-life servers, - because they aren't restarted frequently. But does really + the order of 95 seconds to spawn enough children to handle + the load. This works fine in practice on real-life servers + because they aren't restarted frequently. But it does really poorly on benchmarks which might only run for ten minutes.

      The one-per-second rule was implemented in an effort to avoid swamping the machine with the startup of new children. If - the machine is busy spawning children it can't service + the machine is busy spawning children, it can't service requests. But it has such a drastic effect on the perceived performance of Apache that it had to be replaced. As of Apache 1.3, the code will relax the one-per-second rule. It will spawn @@ -369,7 +358,7 @@ unnecessary to twiddle the MinSpareServers, MaxSpareServers and StartServers knobs. When more than 4 children are spawned per second, a message will be emitted to the ErrorLog. If you - see a lot of these errors then consider tuning these settings. + see a lot of these errors, then consider tuning these settings. Use the mod_status output as a guide.

      Related to process creation is process death induced by the @@ -418,6 +407,12 @@ one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.

    • + +
    • The event MPM is threaded like the + Worker MPM, but is designed to allow more requests to be + served simultaneously by passing off some processing work + to supporting threads, freeing up the main threads to work + on new requests.
    • The prefork MPM uses multiple child processes with one thread each. Each process handles @@ -443,8 +438,8 @@ performance, you should attempt to eliminate modules that you are not actually using. If you have built the modules as DSOs, eliminating modules is a simple matter of commenting out the associated LoadModule directive for that module. - This allows you to experiment with removing modules, and seeing - if your site still functions in their absense.

      + This allows you to experiment with removing modules and seeing + if your site still functions in their absence.

      If, on the other hand, you have modules statically linked into your Apache binary, you will need to recompile Apache in @@ -533,7 +528,7 @@ -

      accept Serialization - multiple sockets

      +

      accept Serialization - Multiple Sockets

      @@ -547,7 +542,7 @@

      This discusses a shortcoming in the Unix socket API. Suppose your web server uses multiple Listen statements to listen on either multiple ports or multiple addresses. In order to test each socket - to see if a connection is ready Apache uses + to see if a connection is ready, Apache uses select(2). select(2) indicates that a socket has zero or at least one connection waiting on it. Apache's model includes multiple children, and @@ -556,51 +551,40 @@ do not match the code, they're contrived for pedagogical purposes):

      -

      - for (;;) {
      - - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - process the new_connection;
      -
      - } -

      +
              for (;;) {
      +          for (;;) {
      +            fd_set accept_fds;
      +
      +            FD_ZERO (&accept_fds);
      +            for (i = first_socket; i <= last_socket; ++i) {
      +              FD_SET (i, &accept_fds);
      +            }
      +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      +            if (rc < 1) continue;
      +            new_connection = -1;
      +            for (i = first_socket; i <= last_socket; ++i) {
      +              if (FD_ISSET (i, &accept_fds)) {
      +                new_connection = accept (i, NULL, NULL);
      +                if (new_connection != -1) break;
      +              }
      +            }
      +            if (new_connection != -1) break;
      +          }
      +          process_the(new_connection);
      +        }
      +

      But this naive implementation has a serious starvation problem. Recall that multiple children execute this loop at the same time, and so multiple children will block at select when they are in between requests. All those blocked children will awaken and return from - select when a single request appears on any socket - (the number of children which awaken varies depending on the - operating system and timing issues). They will all then fall + select when a single request appears on any socket. + (The number of children which awaken varies depending on the + operating system and timing issues.) They will all then fall down into the loop and try to accept the connection. But only one will succeed (assuming there's still - only one connection ready), the rest will be blocked + only one connection ready). The rest will be blocked in accept. This effectively locks those children into serving requests from that one socket and no other sockets, and they'll be stuck there until enough new requests @@ -619,48 +603,37 @@ servicing requests that occurred on other sockets until they get back up to the select again. Overall this solution does not seem very fruitful unless you have as many - idle CPUs (in a multiprocessor box) as you have idle children, - not a very likely situation.

      + idle CPUs (in a multiprocessor box) as you have idle children + (not a very likely situation).

      Another solution, the one used by Apache, is to serialize entry into the inner loop. The loop looks like this (differences highlighted):

      -

      - for (;;) {
      - - accept_mutex_on ();
      - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - accept_mutex_off ();
      - process the new_connection;
      -
      - } -

      +
              for (;;) {
      +          accept_mutex_on ();
      +          for (;;) {
      +            fd_set accept_fds;
      +            
      +            FD_ZERO (&accept_fds);
      +            for (i = first_socket; i <= last_socket; ++i) {
      +              FD_SET (i, &accept_fds);
      +            }
      +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      +            if (rc < 1) continue;
      +            new_connection = -1;
      +            for (i = first_socket; i <= last_socket; ++i) {
      +              if (FD_ISSET (i, &accept_fds)) {
      +                new_connection = accept (i, NULL, NULL);
      +                if (new_connection != -1) break;
      +              }
      +            }
      +            if (new_connection != -1) break;
      +          }
      +          accept_mutex_off ();
      +          process the new_connection;
      +        }
      +

      The functions accept_mutex_on and accept_mutex_off @@ -683,7 +656,7 @@

      Another solution that has been considered but never implemented is to partially serialize the loop -- that is, let in a certain number of processes. This would only be of - interest on multiprocessor boxes where it's possible multiple + interest on multiprocessor boxes where it's possible that multiple children could run simultaneously, and the serialization actually doesn't take advantage of the full bandwidth. This is a possible area of future investigation, but priority remains @@ -696,24 +669,24 @@ -

      accept Serialization - single socket

      +

      accept Serialization - Single Socket

      The above is fine and dandy for multiple socket servers, but what about single socket servers? In theory they shouldn't - experience any of these same problems because all children can - just block in accept(2) until a connection + experience any of these same problems because all the children + can just block in accept(2) until a connection arrives, and no starvation results. In practice this hides - almost the same "spinning" behaviour discussed above in the + almost the same "spinning" behavior discussed above in the non-blocking solution. The way that most TCP stacks are implemented, the kernel actually wakes up all processes blocked in accept when a single connection arrives. One of - those processes gets the connection and returns to user-space, - the rest spin in the kernel and go back to sleep when they + those processes gets the connection and returns to user-space. + The rest spin in the kernel and go back to sleep when they discover there's no connection for them. This spinning is hidden from the user-land code, but it's there nonetheless. - This can result in the same load-spiking wasteful behaviour + This can result in the same load-spiking wasteful behavior that a non-blocking solution to the multiple sockets case can.

      @@ -727,8 +700,8 @@ single-socket showed an extra 100ms latency on each request. This latency is probably a wash on long haul lines, and only an issue on LANs. If you want to override the single socket - serialization you can define - SINGLE_LISTEN_UNSERIALIZED_ACCEPT and then + serialization, you can define + SINGLE_LISTEN_UNSERIALIZED_ACCEPT, and then single-socket servers will not serialize at all.

      @@ -740,27 +713,27 @@

      As discussed in draft-ietf-http-connection-00.txt section 8, in order for an HTTP server to reliably implement the - protocol it needs to shutdown each direction of the - communication independently (recall that a TCP connection is - bi-directional, each half is independent of the other).

      - -

      When this feature was added to Apache it caused a flurry of - problems on various versions of Unix because of a - shortsightedness. The TCP specification does not state that the - FIN_WAIT_2 state has a timeout, but it doesn't prohibit it. + protocol, it needs to shut down each direction of the + communication independently. (Recall that a TCP connection is + bi-directional. Each half is independent of the other.)

      + +

      When this feature was added to Apache, it caused a flurry of + problems on various versions of Unix because of shortsightedness. + The TCP specification does not state that the FIN_WAIT_2 + state has a timeout, but it doesn't prohibit it. On systems without the timeout, Apache 1.2 induces many sockets stuck forever in the FIN_WAIT_2 state. In many cases this can be avoided by simply upgrading to the latest TCP/IP patches supplied by the vendor. In cases where the vendor has never released patches (i.e., SunOS4 -- although folks with - a source license can patch it themselves) we have decided to + a source license can patch it themselves), we have decided to disable this feature.

      -

      There are two ways of accomplishing this. One is the socket +

      There are two ways to accomplish this. One is the socket option SO_LINGER. But as fate would have it, this has never been implemented properly in most TCP/IP stacks. Even on those stacks with a proper implementation (i.e., - Linux 2.0.31) this method proves to be more expensive (cputime) + Linux 2.0.31), this method proves to be more expensive (cputime) than the next solution.

      For the most part, Apache implements this in a function @@ -768,48 +741,39 @@ http_main.c). The function looks roughly like this:

      -

      - void lingering_close (int s)
      - {
      - - char junk_buffer[2048];
      -
      - /* shutdown the sending side */
      - shutdown (s, 1);
      -
      - signal (SIGALRM, lingering_death);
      - alarm (30);
      -
      - for (;;) {
      - - select (s for reading, 2 second timeout);
      - if (error) break;
      - if (s is ready for reading) {
      - - if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
      - - break;
      -
      - }
      - /* just toss away whatever is here */
      -
      - }
      -
      - }
      -
      - close (s);
      -
      - } -

      +
              void lingering_close (int s)
      +        {
      +          char junk_buffer[2048];
      +          
      +          /* shutdown the sending side */
      +          shutdown (s, 1);
      +
      +          signal (SIGALRM, lingering_death);
      +          alarm (30);
      +
      +          for (;;) {
      +            select (s for reading, 2 second timeout);
      +            if (error) break;
      +            if (s is ready for reading) {
      +              if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
      +                break;
      +              }
      +              /* just toss away whatever is here */
      +            }
      +          }
      +          
      +          close (s);
      +        }
      +

      This naturally adds some expense at the end of a connection, but it is required for a reliable implementation. As HTTP/1.1 becomes more prevalent, and all connections are persistent, this expense will be amortized over more requests. If you want - to play with fire and disable this feature you can define + to play with fire and disable this feature, you can define NO_LINGCLOSE, but this is not recommended at all. In particular, as HTTP/1.1 pipelined persistent connections - come into use lingering_close is an absolute + come into use, lingering_close is an absolute necessity (and pipelined connections are faster, so you want to support them).

      @@ -827,7 +791,7 @@ for, it typically is implemented using shared memory. The rest default to using an on-disk file. The on-disk file is not only slow, but it is unreliable (and less featured). Peruse the - src/main/conf.h file for your architecture and + src/main/conf.h file for your architecture, and look for either USE_MMAP_SCOREBOARD or USE_SHMGET_SCOREBOARD. Defining one of those two (as well as their companions HAVE_MMAP and @@ -835,11 +799,11 @@ shared memory code. If your system has another type of shared memory, edit the file src/main/http_main.c and add the hooks necessary to use it in Apache. (Send us back a patch - too please.)

      + too, please.)

      Historical note: The Linux port of Apache didn't start to use shared memory until version 1.2 of Apache. This oversight - resulted in really poor and unreliable behaviour of earlier + resulted in really poor and unreliable behavior of earlier versions of Apache on Linux.
      @@ -850,7 +814,7 @@

      If you have no intention of using dynamically loaded modules (you probably don't if you're reading this and tuning your - server for every last ounce of performance) then you should add + server for every last ounce of performance), then you should add -DDYNAMIC_MODULE_LIMIT=0 when building your server. This will save RAM that's allocated only for supporting dynamically loaded modules.

      @@ -871,7 +835,7 @@

    The -l option tells truss to log the ID of the - LWP (lightweight process--Solaris's form of kernel-level thread) + LWP (lightweight process--Solaris' form of kernel-level thread) that invokes each system call.

    Other systems may have different system call tracing utilities @@ -931,7 +895,7 @@

    Next, the worker thread puts the connection to the client (file descriptor 9) in non-blocking mode. The setsockopt(2) and getsockopt(2) calls are a side-effect of how - Solaris's libc handles fcntl(2) on sockets.

    + Solaris' libc handles fcntl(2) on sockets.

    /65:    read(9, " G E T   / 1 0 k . h t m".., 8000)     = 97
    @@ -995,7 +959,28 @@  fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/perf-tuning.html.fr b/docs/manual/misc/perf-tuning.html.fr index 829632de7b2..75a21b29e5c 100644 --- a/docs/manual/misc/perf-tuning.html.fr +++ b/docs/manual/misc/perf-tuning.html.fr @@ -1,22 +1,27 @@ - -Optimisation des performances d'Apache - Serveur Apache HTTP +Optimisation des performances d'Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Optimisation des performances d'Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4 > Documentations diverses
    top

    Problmes matriels et relatifs au systme d'exploitation

    @@ -143,19 +148,16 @@

    Notez qu'il est possible de modifier la porte des directives, en les plaant par exemple l'intrieur d'une section - <Location /server-status>. Les recherches DNS ne + <Location "/server-status">. Les recherches DNS ne seront alors effectues que pour les requtes qui satisfont aux critres. Voici un exemple qui dsactive les recherches DNS sauf pour les fichiers .html et .cgi :

    -

    - HostnameLookups off
    - <Files ~ "\.(html|cgi)$">
    - - HostnameLookups on
    -
    - </Files> -

    +
    HostnameLookups off
    +<Files ~ "\.(html|cgi)$">
    +  HostnameLookups on
    +</Files>
    +

    Mais mme dans ce cas, si vous n'avez besoin de noms DNS que dans certains CGIs, vous pouvez effectuer l'appel gethostbyname @@ -174,14 +176,11 @@ symboliques. Un appel supplmentaire par lment du chemin du fichier. Par exemple, si vous avez :

    -

    - DocumentRoot /www/htdocs
    - <Directory />
    - - Options SymLinksIfOwnerMatch
    -
    - </Directory> -

    +
    DocumentRoot "/www/htdocs"
    +<Directory "/">
    +  Options SymLinksIfOwnerMatch
    +</Directory>
    +

    et si une requte demande l'URI /index.html, Apache effectuera un appel lstat(2) pour @@ -192,20 +191,15 @@ vrifier la scurit des liens symboliques, vous pouvez utiliser une configuration du style :

    -

    - DocumentRoot /www/htdocs
    - <Directory />
    - - Options FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /www/htdocs>
    - - Options -FollowSymLinks +SymLinksIfOwnerMatch
    -
    - </Directory> -

    +
    DocumentRoot "/www/htdocs"
    +<Directory "/">
    +  Options FollowSymLinks
    +</Directory>
    +
    +<Directory "/www/htdocs">
    +  Options -FollowSymLinks +SymLinksIfOwnerMatch
    +</Directory>
    +

    Ceci vite au moins les vrifications supplmentaires pour le chemin dfini par DocumentRoot. Notez que @@ -220,7 +214,7 @@ -

    AllowOverride

    +

    AllowOverride

    @@ -230,14 +224,11 @@ pour chaque lment du chemin du fichier demand. Par exemple, si vous avez :

    -

    - DocumentRoot /www/htdocs
    - <Directory />
    - - AllowOverride all
    -
    - </Directory> -

    +
    DocumentRoot "/www/htdocs"
    +<Directory "/">
    +  AllowOverride all
    +</Directory>
    +

    et qu'une requte demande l'URI /index.html, Apache tentera d'ouvrir /.htaccess, /www/.htaccess, @@ -259,15 +250,13 @@ Il y a cependant un cas dans lequel vous pouvez acclrer le serveur. Au lieu d'utiliser une directive gnrique comme :

    -

    - DirectoryIndex index -

    +
    DirectoryIndex index
    +

    utilisez une liste explicite d'options :

    -

    - DirectoryIndex index.cgi index.pl index.shtml index.html -

    +
    DirectoryIndex index.cgi index.pl index.shtml index.html
    +

    o vous placez le choix courant en premire position.

    @@ -461,6 +450,12 @@ serveurs prsentant un traffic important car il possde une empreinte mmoire plus petite que le MPM prefork. +
  • Comme le MPM Worker, le MPM event utilise + les threads, mais il a t conu pour traiter davantage de + requtes simultanment en confiant une partie du travail des + threads de support, ce qui permet aux threads principaux de + traiter de nouvelles requtes.
  • +
  • Le MPM prefork utilise plusieurs processus enfants possdant chacun un seul thread. Chaque processus gre une seule connexion la fois. Sur de nombreux systmes, prefork est comparable @@ -612,39 +607,28 @@ (ces exemples ne sont pas extraits du code d'Apache, ils ne sont proposs qu' des fins pdagogiques) :

    -

    - for (;;) {
    - - for (;;) {
    - - fd_set accept_fds;
    -
    - FD_ZERO (&accept_fds);
    - for (i = first_socket; i <= last_socket; ++i) {
    - - FD_SET (i, &accept_fds);
    -
    - }
    - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    - if (rc < 1) continue;
    - new_connection = -1;
    - for (i = first_socket; i <= last_socket; ++i) {
    - - if (FD_ISSET (i, &accept_fds)) {
    - - new_connection = accept (i, NULL, NULL);
    - if (new_connection != -1) break;
    -
    - }
    -
    - }
    - if (new_connection != -1) break;
    -
    - }
    - process the new_connection;
    -
    - } -

    +
            for (;;) {
    +          for (;;) {
    +            fd_set accept_fds;
    +
    +            FD_ZERO (&accept_fds);
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              FD_SET (i, &accept_fds);
    +            }
    +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +            if (rc < 1) continue;
    +            new_connection = -1;
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              if (FD_ISSET (i, &accept_fds)) {
    +                new_connection = accept (i, NULL, NULL);
    +                if (new_connection != -1) break;
    +              }
    +            }
    +            if (new_connection != -1) break;
    +          }
    +          process_the(new_connection);
    +        }
    +

    Mais cette implmentation rudimentaire prsente une srieuse lacune. Rappelez-vous que les processus enfants excutent cette boucle au mme @@ -683,41 +667,30 @@ entres dans la boucle interne. La boucle ressemble ceci (les diffrences sont mises en surbrillance) :

    -

    - for (;;) {
    - - accept_mutex_on ();
    - for (;;) {
    - - fd_set accept_fds;
    -
    - FD_ZERO (&accept_fds);
    - for (i = first_socket; i <= last_socket; ++i) {
    - - FD_SET (i, &accept_fds);
    -
    - }
    - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    - if (rc < 1) continue;
    - new_connection = -1;
    - for (i = first_socket; i <= last_socket; ++i) {
    - - if (FD_ISSET (i, &accept_fds)) {
    - - new_connection = accept (i, NULL, NULL);
    - if (new_connection != -1) break;
    -
    - }
    -
    - }
    - if (new_connection != -1) break;
    -
    - }
    - accept_mutex_off ();
    - process the new_connection;
    -
    - } -

    +
            for (;;) {
    +          accept_mutex_on ();
    +          for (;;) {
    +            fd_set accept_fds;
    +            
    +            FD_ZERO (&accept_fds);
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              FD_SET (i, &accept_fds);
    +            }
    +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +            if (rc < 1) continue;
    +            new_connection = -1;
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              if (FD_ISSET (i, &accept_fds)) {
    +                new_connection = accept (i, NULL, NULL);
    +                if (new_connection != -1) break;
    +              }
    +            }
    +            if (new_connection != -1) break;
    +          }
    +          accept_mutex_off ();
    +          process the new_connection;
    +        }
    +

    Les fonctions accept_mutex_on et accept_mutex_off @@ -829,39 +802,30 @@ http_main.c). La fonction ressemble approximativement ceci :

    -

    - void lingering_close (int s)
    - {
    - - char junk_buffer[2048];
    -
    - /* shutdown the sending side */
    - shutdown (s, 1);
    -
    - signal (SIGALRM, lingering_death);
    - alarm (30);
    -
    - for (;;) {
    - - select (s for reading, 2 second timeout);
    - if (error) break;
    - if (s is ready for reading) {
    - - if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
    - - break;
    -
    - }
    - /* just toss away whatever is here */
    -
    - }
    -
    - }
    -
    - close (s);
    -
    - } -

    +
            void lingering_close (int s)
    +        {
    +          char junk_buffer[2048];
    +          
    +          /* shutdown the sending side */
    +          shutdown (s, 1);
    +
    +          signal (SIGALRM, lingering_death);
    +          alarm (30);
    +
    +          for (;;) {
    +            select (s for reading, 2 second timeout);
    +            if (error) break;
    +            if (s is ready for reading) {
    +              if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
    +                break;
    +              }
    +              /* just toss away whatever is here */
    +            }
    +          }
    +          
    +          close (s);
    +        }
    +

    Ceci ajoute naturellement un peu de charge la fin d'une connexion, mais s'avre ncessaire pour une implmentation fiable. Comme HTTP/1.1 @@ -1067,7 +1031,28 @@  fr  |  ko  |  tr 

    -
  • +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/perf-tuning.html.ko.euc-kr b/docs/manual/misc/perf-tuning.html.ko.euc-kr index ca4371e09e9..c8af5fcb8fc 100644 --- a/docs/manual/misc/perf-tuning.html.ko.euc-kr +++ b/docs/manual/misc/perf-tuning.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ - Apache HTTP Server +ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ

    :  en  |  fr  | @@ -44,7 +49,7 @@

  • ؼ
  • Ͻ ؼ
  • η: ýȣ ڼ мϱ
  • -
    +

    top

    ϵ ü ؼ

    @@ -189,7 +194,7 @@ -

    AllowOverride

    +

    AllowOverride

    @@ -974,7 +979,28 @@  fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/perf-tuning.html.tr.utf8 b/docs/manual/misc/perf-tuning.html.tr.utf8 index 13bea9ccbb3..6db1f38ee4a 100644 --- a/docs/manual/misc/perf-tuning.html.tr.utf8 +++ b/docs/manual/misc/perf-tuning.html.tr.utf8 @@ -1,29 +1,33 @@ - -Apache’de Başarımın Arttırılması - Apache HTTP Sunucusu +Apache’de Başarımın Arttırılması - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache’de Başarımın Arttırılması

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Çeşitli Belgeler

    Apache’de Başarımın Arttırılması

    Mevcut Diller:  en  |  fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Apache 2.x, esneklik, taşınabilirlik ve başarım arasında bir denge @@ -49,7 +53,7 @@

  • Çalışma Anı Yapılandırması ile İlgili Konular
  • Derleme Sırasında Yapılandırma ile İlgili Konular
  • Ek: Bir çağrı izlemesinin ayrıntılı çözümlemesi
  • -
    +

    Ayrıca bakınız:

    top

    Donanım ve İşletim Sistemi ile İlgili Konular

    @@ -60,7 +64,7 @@ (RAM). Bir HTTP sunucusu asla takaslama yapmamalıdır. Çünkü takaslama, kullanıcının "yeterince hız" umduğu noktada sunumun gecikmesine sebep olur. Böyle bir durumda kullanıcılar yüklemeyi durdurup tekrar - başlatma eğilimindedirler; sonuçta yük daha da artar. MaxClients yönergesinin değerini + başlatma eğilimindedirler; sonuçta yük daha da artar. MaxRequestWorkers yönergesinin değerini değiştirerek takaslamaya sebep olabilecek kadar çok çocuk süreç oluşturulmasını engelleyebilirsiniz ve böyle bir durumda bunu mutlaka yapmalısınız. Bunun için yapacağınız işlem basittir: top @@ -133,21 +137,18 @@ kullanınız.

    HostnameLookups - yönergelerinin <Location /server-status> gibi + yönergelerinin <Location "/server-status"> gibi bölüm yönergelerinin içinde de yer alabileceğini unutmayın. Bu gibi durumlarda DNS sorguları sadece istek kuralla eşleştiği takdirde yapılacaktır. Aşağıdaki örnekte .html ve .cgi dosyalarına yapılan istekler hariç DNS sorguları iptal edilmektedir:

    -

    - HostnameLookups off
    - <Files ~ "\.(html|cgi)$">
    - - HostnameLookups on
    -
    - </Files> -

    +
    HostnameLookups off
    +<Files ~ "\.(html|cgi)$">
    +  HostnameLookups on
    +</Files>
    +

    Yine de bazı CGI’lerin DNS isimlerine ihtiyacı olursa bu CGI’lerin bu ihtiyaçlarına yönelik olarak gethostbyname çağrıları @@ -166,14 +167,11 @@ bağın üzerinde bazı sınamalar yapmak için ek bir sistem çağrısından başka istenen her dosya için de ayrı bir çağrı yapacaktır.

    -

    Örnek:

    - DocumentRoot /siteler/htdocs
    - <Directory />
    - - Options SymLinksIfOwnerMatch
    -
    - </Directory> -

    +
    DocumentRoot "/siteler/htdocs"
    +<Directory />
    +  Options SymLinksIfOwnerMatch
    +</Directory>
    +

    Bu durumda /index.html için bir istek yapıldığında Apache, /siteler, /siteler/htdocs ve
    @@ -183,20 +181,15 @@ yinelenecektir. Amacınız gerçekten sembolik bağları güvenlik açısından sınamaksa bunu şöyle yapabilirsiniz:

    -

    - DocumentRoot /siteler/htdocs
    - <Directory />
    - - Options FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /sitem/htdocs>
    - - Options -FollowSymLinks +SymLinksIfOwnerMatch
    -
    - </Directory> -

    +
    DocumentRoot "/siteler/htdocs"
    +<Directory "/">
    +  Options FollowSymLinks
    +</Directory>
    +
    +<Directory "/siteler/htdocs">
    +  Options -FollowSymLinks +SymLinksIfOwnerMatch
    +</Directory>
    +

    Böylece DocumentRoot altındaki dosyalar için fazladan bir çağrı yapılmasını engellemiş olursunuz. @@ -210,7 +203,7 @@ -

    AllowOverride

    +

    AllowOverride

    @@ -219,14 +212,11 @@ her dosya bileşeni için bu .htaccess dosyalarını açmaya çalışacaktır.

    -

    Örnek:

    - DocumentRoot /siteler/htdocs
    - <Directory />
    - - AllowOverride all
    -
    - </Directory> -

    +
    DocumentRoot "/siteler/htdocs"
    +<Directory "/">
    +  AllowOverride all
    +</Directory>
    +

    Bu durumda /index.html sayfasına yapılan bir istek için Apache, /.htaccess, /siteler/.htaccess ve @@ -246,16 +236,14 @@ isterken büyük başarım kayıplarına uğrayabilirsiniz. Böyle bir durumda sunucunun başarımını arttırmanın tek bir yolu vardır.

    -

    - DirectoryIndex index -

    +
    DirectoryIndex index
    +

    Yukarıdaki gibi bir dosya ismi kalıbı kullanmak yerine, aşağıdaki gibi seçenekleri tam bir liste halinde belirtin:

    -

    - DirectoryIndex index.cgi index.pl index.shtml index.html -

    +
    DirectoryIndex index.cgi index.pl index.shtml index.html
    +

    Buradaki sıralama öncelik sırasını belirler; yani, öncelikli olmasını istediğiniz seçeneği listenin başına @@ -392,7 +380,7 @@ demektir. Bunun için mod_status çıktısını bir kılavuz olarak kullanabilirsiniz.

    -

    Süreç oluşturmayla ilgili olarak süreç ölümü MaxRequestsPerChild değeri ile +

    Süreç oluşturmayla ilgili olarak süreç ölümü MaxConnectionsPerChild değeri ile sağlanır. Bu değer öntanımlı olarak 0 olup, çocuk süreç başına istek sayısının sınırsız olduğu anlamına gelir. Eğer yapılandırmanızda bu değeri 30 gibi çok düşük bir @@ -437,6 +425,12 @@ vermesi nedeniyle yüksek trafiğe sahip sunucularda prefork modülüne göre daha iyi bir seçimdir. +

  • event modülü worker modülü gibi + çok evreli bir modüldür, fakat aunı anda dahafazla isteğe yanıt + verecek şekilde tasarlanmıştır. Bunu, evreleri destekleyen bazı + işlemleri yapmamak suretiyle yeni isteklerle çalışacak ana evreleri + serbestleştirerek sağlar.
  • +
  • prefork modülü her biri tek bir evreye sahip çok sayıda çocuk süreç kullanımını destekler. Her süreç aynı anda tek bir bağlantıya hizmet sunar. Çoğu sistemde daha hızlı olması @@ -576,52 +570,41 @@ bağlantılar denenebilir. Gerçekte çalışan kod bu olmasa da meramımızı anlatmak için kodun şöyle bir şey olduğunu varsayabiliriz:

    -

    - for (;;) {
    - - for (;;) {
    - - fd_set accept_fds;
    -
    - FD_ZERO (&accept_fds);
    - for (i = first_socket; i <= last_socket; ++i) {
    - - FD_SET (i, &accept_fds);
    -
    - }
    - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    - if (rc < 1) continue;
    - new_connection = -1;
    - for (i = first_socket; i <= last_socket; ++i) {
    - - if (FD_ISSET (i, &accept_fds)) {
    - - new_connection = accept (i, NULL, NULL);
    - if (new_connection != -1) break;
    -
    - }
    -
    - }
    - if (new_connection != -1) break;
    -
    - }
    - process the new_connection;
    -
    - } -

    +
            for (;;) {
    +          for (;;) {
    +            fd_set accept_fds;
    +
    +            FD_ZERO (&accept_fds);
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              FD_SET (i, &accept_fds);
    +            }
    +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +            if (rc < 1) continue;
    +            new_connection = -1;
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              if (FD_ISSET (i, &accept_fds)) {
    +                new_connection = accept (i, NULL, NULL);
    +                if (new_connection != -1) break;
    +              }
    +            }
    +            if (new_connection != -1) break;
    +          }
    +          process_the(new_connection);
    +        }
    +

    Bu özet gerçeklenim bir takım açlık sorunlarına sebep olur. Bu döngünün çalışması sırasında aynı anda çok sayıda çocuk süreç yeniden çağrılır ve istekler arasında kalan çoğu çocuk da select ile engellenir. Engellenen tüm bu çocuklar soketlerden herhangi biri üzerinde tek bir istek göründüğünde select tarafından - uyandırılıp işleme sokulmak üzere döndürülürler (uyandırılan çocuk + uyandırılıp işleme sokulmak üzere döndürülürler. (Uyandırılan çocuk sayısı işletim sistemine ve zamanlama ayarlarına göre değişiklik - gösterir). Bunların hepsi döngüye katılıp bağlantı kabul etmeye + gösterir,) Bunların hepsi döngüye katılıp bağlantı kabul etmeye (accept) çalışırlar. Fakat içlerinden yalnız biri (sadece bir bağlantı isteğinin mevcut olduğu varsayımıyla) bunu başarabilir. Kalanının bağlantı kabul etmesi (accept) - engellenir. Bu durum, bu çocukları istekleri başka başka soketlerden + engellenir. Bu durum, bu çocukları istekleri başka başka soketlerden değil mecburen tek bir soketten kabul etmeye kilitler ve bu soket üzerinde yeni bir istek belirip uyandırılana kadar bu durumda kalırlar. Bu açlık sorunu ilk olarak PR#467 sayılı raporla @@ -645,41 +628,30 @@ bir iç döngüde sıraya sokmaktır. Döngü aşağıda örneklenmiştir (farklar vurgulanmıştır):

    -

    - for (;;) {
    - - accept_mutex_on ();
    - for (;;) {
    - - fd_set accept_fds;
    -
    - FD_ZERO (&accept_fds);
    - for (i = first_socket; i <= last_socket; ++i) {
    - - FD_SET (i, &accept_fds);
    -
    - }
    - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    - if (rc < 1) continue;
    - new_connection = -1;
    - for (i = first_socket; i <= last_socket; ++i) {
    - - if (FD_ISSET (i, &accept_fds)) {
    - - new_connection = accept (i, NULL, NULL);
    - if (new_connection != -1) break;
    -
    - }
    -
    - }
    - if (new_connection != -1) break;
    -
    - }
    - accept_mutex_off ();
    - process the new_connection;
    -
    - } -

    +
            for (;;) {
    +          accept_mutex_on ();
    +          for (;;) {
    +            fd_set accept_fds;
    +
    +            FD_ZERO (&accept_fds);
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              FD_SET (i, &accept_fds);
    +            }
    +            rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
    +            if (rc < 1) continue;
    +            new_connection = -1;
    +            for (i = first_socket; i <= last_socket; ++i) {
    +              if (FD_ISSET (i, &accept_fds)) {
    +                new_connection = accept (i, NULL, NULL);
    +                if (new_connection != -1) break;
    +              }
    +            }
    +            if (new_connection != -1) break;
    +          }
    +          accept_mutex_off ();
    +          process the new_connection;
    +        }
    +

    accept_mutex_on ve accept_mutex_off işlevleri bir karşılıklı red semoforu oluştururlar. Mutekse aynı anda sadece bir çocuk sahip @@ -690,69 +662,10 @@ değildir. Böyle mimarilerde çok sayıda Listen yönergesi kullanmak güvenilir olmayacaktır.

    -

    AcceptMutex yönergesi, - seçilen muteks gerçeklenimini çalışma anında değiştirmek için - kullanılabilir.

    - -
    -
    AcceptMutex flock
    - -
    -

    Bu yöntem, bir kilit dosyasını kilitlemek için - flock(2) sistem çağrısını kullanır (Kilit dosyasının - yeri LockFile - yönergesiyle belirtilir).

    -
    - -
    AcceptMutex fcntl
    - -
    -

    Bu yöntem, bir kilit dosyasını kilitlemek için - fcntl(2) sistem çağrısını kullanır (Kilit dosyasının - yeri LockFile - yönergesiyle belirtilir).

    -
    - -
    AcceptMutex sysvsem
    - -
    -

    (1.3 ve sonrası) Bu yöntem muteksi gerçeklemek için SysV tarzı - semaforları kullanır. Maalesef, SysV tarzı semaforların bazı yan - etkileri vardır. Bunlardan biri Apache'nin semaforu temizlemeden - ölme ihtimalidir (ipcs(8) kılavuz sayfasına bakınız). - Diğer biri, CGI'lerin sunucu ile aynı kullanıcı kimliğini - kullanmaları nedeniyle semafor arayüzünün hizmet reddi - saldırılarına açık olmasıdır (suexec veya - cgiwrapper gibi bir şeyler kullanmadıkça bütün - CGI'ler için söz konusudur).

    -
    - -
    AcceptMutex pthread
    - -
    -

    (1.3 ve sonrası) Bu yöntem POSIX mutekslerini kullanır ve POSIX - evreleri belirtiminin tamamen gerçeklendiği mimarilerde çalışması - gerekirse de sadece Solaris (2.5 ve sonrası) üzerinde ve sadece - belli yapılandırmalarla çalışmakta gibi görünmektedir. Bunu - denemişseniz sunucunuzun çöktüğünü ve yanıt vermediğini - görmüşsünüzdür. Sadece duruk içerikli sunucular iyi - çalışmaktadır.

    -
    - -
    AcceptMutex posixsem
    - -
    -

    (2.0 ve sonrası) Bu yöntem POSIX semaforlarını kullanır. Eğer - işlem sırasında bir evre muteks kaynaklı parçalama arızalarıyla - karşı karşıya kalırsa HTTP sunucusunun çökmesiyle semaforun sahibi - kurtarılamaz.

    -
    - -
    - -

    Eğer sisteminiz yukarıda bahsedilenler dışında başka bir dizgileme - yöntemi kullanıyorsa bununla ilgili kodun APR'ye eklenmesi girilen - zahmete değecektir.

    +

    Mutex yönergesi, + mpm-accept muteks gerçeklenimini çalışma anında değiştirmek + için kullanılabilir. Farklı muteks gerçeklenimleri ile ilgili hususlar + bu yönergede belgelenmiştir.

    Başka bir çözüm daha vardır ancak döngü kısmen dizgilenmeyeceğinden (yani belli sayıda sürece izin verilemeyeceğinden) asla @@ -814,9 +727,7 @@ bahsedildiği gibi, bir HTTP sunucusunun protokolü güvenilir şekilde gerçeklemesi için her iki yöndeki iletişimi birbirinden bağımsız olarak (iki yönlü bir TCP bağlantısının her - yarısını diğerinden bağımsız olarak) kapatması gerekir. Bu olgu başka - sunucular tarafından çoğunlukla dikkate alınmaz fakat Apache'nin 1.2 - sürümünden beri gerektiği gibi gerçeklenmektedir.

    + yarısını diğerinden bağımsız olarak) kapatması gerekir.

    Bu özellik Apache'ye eklendiğinde Unix'in çeşitli sürümlerinde uzgörüsüzlükten dolayı bir takım geçici telaş sorunlarına sebep oldu. @@ -840,42 +751,30 @@ lingering_close adında bir işlevle gerçekler. Bu işlev kabaca şöyle görünür:

    -

    - void lingering_close (int s)
    - {
    - - char junk_buffer[2048];
    -
    - /* gönderen tarafı kapat */
    - shutdown (s, 1);
    -
    - signal (SIGALRM, lingering_death);
    - alarm (30);
    -
    - for (;;) {
    - - /* s'i okumak için, 2 saniyelik zaman aşımı ile seç */
    - select (s for reading, 2 second timeout);
    - /* Hata oluşmuşsa döngüden çık */
    - if (error) break;
    - /* s okumak için hazırsa */
    - if (s is ready for reading) {
    - - if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
    - - break;
    -
    - }
    - /* geri kalan herşey burada */
    -
    - }
    -
    - }
    -
    - close (s);
    -
    - } -

    +
            void lingering_close (int s)
    +        {
    +          char junk_buffer[2048];
    +
    +          /* shutdown the sending side */
    +          shutdown (s, 1);
    +
    +          signal (SIGALRM, lingering_death);
    +          alarm (30);
    +
    +          for (;;) {
    +            select (s for reading, 2 second timeout);
    +            if (error) break;
    +            if (s is ready for reading) {
    +              if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
    +                break;
    +              }
    +              /* just toss away whatever is here */
    +            }
    +          }
    +
    +          close (s);
    +        }
    +

    Bağlantı sonunda bu doğal olarak biraz daha masrafa yol açar, fakat güvenilir bir gerçeklenim için bu gereklidir. HTTP/1.1'in daha yaygın @@ -1095,7 +994,28 @@  fr  |  ko  |  tr 

    -
  • +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml index c9630446cfd..f827902698b 100644 --- a/docs/manual/misc/perf-tuning.xml +++ b/docs/manual/misc/perf-tuning.xml @@ -57,7 +57,7 @@ stop and reload, further increasing the load. You can, and should, control the MaxRequestWorkers setting so that your server - does not spawn so many children it starts swapping. This procedure + does not spawn so many children that it starts swapping. The procedure for doing this is simple: determine the size of your average Apache process, by looking at your process list via a tool such as top, and divide this into your total available memory, @@ -74,7 +74,7 @@
    • -

      Run the latest stable release and patchlevel of the +

      Run the latest stable release and patch level of the operating system that you choose. Many OS suppliers have introduced significant performance improvements to their TCP stacks and thread libraries in recent years.

      @@ -147,19 +147,17 @@ using these directives, if possible.

      Note that it's possible to scope the directives, such as - within a <Location /server-status> section. + within a <Location "/server-status"> section. In this case the DNS lookups are only performed on requests matching the criteria. Here's an example which disables lookups except for .html and .cgi files:

      - - HostnameLookups off
      - <Files ~ "\.(html|cgi)$">
      - - HostnameLookups on
      -
      - </Files> -
      + +HostnameLookups off +<Files ~ "\.(html|cgi)$"> + HostnameLookups on +</Files> +

      But even still, if you just need DNS names in some CGIs you could consider doing the gethostbyname call in the @@ -173,41 +171,35 @@

      Wherever in your URL-space you do not have an Options FollowSymLinks, or you do have an Options - SymLinksIfOwnerMatch Apache will have to issue extra - system calls to check up on symlinks. One extra call per - filename component. For example, if you had:

      - - - DocumentRoot /www/htdocs
      - <Directory />
      - - Options SymLinksIfOwnerMatch
      -
      - </Directory> -
      - -

      and a request is made for the URI /index.html. - Then Apache will perform lstat(2) on + SymLinksIfOwnerMatch, Apache will need to issue extra + system calls to check up on symlinks. (One extra call per + filename component.) For example, if you had:

      + + +DocumentRoot "/www/htdocs" +<Directory "/"> + Options SymLinksIfOwnerMatch +</Directory> + + +

      and a request is made for the URI /index.html, + then Apache will perform lstat(2) on /www, /www/htdocs, and /www/htdocs/index.html. The results of these lstats are never cached, so they will occur on every single request. If you really desire the symlinks - security checking you can do something like this:

      + security checking, you can do something like this:

      - - DocumentRoot /www/htdocs
      - <Directory />
      - - Options FollowSymLinks
      -
      - </Directory>
      -
      - <Directory /www/htdocs>
      - - Options -FollowSymLinks +SymLinksIfOwnerMatch
      -
      - </Directory> -
      + +DocumentRoot "/www/htdocs" +<Directory "/"> + Options FollowSymLinks +</Directory> + +<Directory "/www/htdocs"> + Options -FollowSymLinks +SymLinksIfOwnerMatch +</Directory> +

      This at least avoids the extra checks for the DocumentRoot path. @@ -220,23 +212,21 @@ -

      +
      AllowOverride

      Wherever in your URL-space you allow overrides (typically - .htaccess files) Apache will attempt to open + .htaccess files), Apache will attempt to open .htaccess for each filename component. For example,

      - - DocumentRoot /www/htdocs
      - <Directory />
      - - AllowOverride all
      -
      - </Directory> -
      + +DocumentRoot "/www/htdocs" +<Directory "/"> + AllowOverride all +</Directory> +

      and a request is made for the URI /index.html. Then Apache will attempt to open /.htaccess, @@ -252,21 +242,17 @@ Negotiation -

      If at all possible, avoid content-negotiation if you're +

      If at all possible, avoid content negotiation if you're really interested in every last ounce of performance. In practice the benefits of negotiation outweigh the performance penalties. There's one case where you can speed up the server. Instead of using a wildcard such as:

      - - DirectoryIndex index - + DirectoryIndex index

      Use a complete list of options:

      - - DirectoryIndex index.cgi index.pl index.shtml index.html - + DirectoryIndex index.cgi index.pl index.shtml index.html

      where you list the most common choice first.

      @@ -276,7 +262,7 @@ determined by reading this single file, rather than having to scan the directory for files.

      -

      If your site needs content negotiation consider using +

      If your site needs content negotiation, consider using type-map files, rather than the Options MultiViews directive to accomplish the negotiation. See the Content Negotiation @@ -327,7 +313,7 @@

      In situations where Apache 2.x can ignore the contents of the file to be delivered -- for example, when serving static file content -- - it normally uses the kernel sendfile support the file if the OS + it normally uses the kernel sendfile support for the file if the OS supports the sendfile(2) operation.

      On most platforms, using sendfile improves performance by eliminating @@ -370,14 +356,14 @@ setting. So a server being accessed by 100 simultaneous clients, using the default StartServers of 5 would take on - the order 95 seconds to spawn enough children to handle - the load. This works fine in practice on real-life servers, - because they aren't restarted frequently. But does really + the order of 95 seconds to spawn enough children to handle + the load. This works fine in practice on real-life servers + because they aren't restarted frequently. But it does really poorly on benchmarks which might only run for ten minutes.

      The one-per-second rule was implemented in an effort to avoid swamping the machine with the startup of new children. If - the machine is busy spawning children it can't service + the machine is busy spawning children, it can't service requests. But it has such a drastic effect on the perceived performance of Apache that it had to be replaced. As of Apache 1.3, the code will relax the one-per-second rule. It will spawn @@ -394,7 +380,7 @@ >StartServers knobs. When more than 4 children are spawned per second, a message will be emitted to the ErrorLog. If you - see a lot of these errors then consider tuning these settings. + see a lot of these errors, then consider tuning these settings. Use the mod_status output as a guide.

      Related to process creation is process death induced by the @@ -445,6 +431,12 @@ one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM.

    • + +
    • The event MPM is threaded like the + Worker MPM, but is designed to allow more requests to be + served simultaneously by passing off some processing work + to supporting threads, freeing up the main threads to work + on new requests.
    • The prefork MPM uses multiple child processes with one thread each. Each process handles @@ -472,8 +464,8 @@ href="../dso.html">DSOs, eliminating modules is a simple matter of commenting out the associated LoadModule directive for that module. - This allows you to experiment with removing modules, and seeing - if your site still functions in their absense.

      + This allows you to experiment with removing modules and seeing + if your site still functions in their absence.

      If, on the other hand, you have modules statically linked into your Apache binary, you will need to recompile Apache in @@ -564,7 +556,7 @@

      - accept Serialization - multiple sockets + accept Serialization - Multiple Sockets Warning:

      This section has not been fully updated @@ -577,7 +569,7 @@ your web server uses multiple Listen statements to listen on either multiple ports or multiple addresses. In order to test each socket - to see if a connection is ready Apache uses + to see if a connection is ready, Apache uses select(2). select(2) indicates that a socket has zero or at least one connection waiting on it. Apache's model includes multiple children, and @@ -586,51 +578,41 @@ do not match the code, they're contrived for pedagogical purposes):

      - - for (;;) {
      - - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - process the new_connection;
      -
      + + for (;;) { + for (;;) { + fd_set accept_fds; + + FD_ZERO (&accept_fds); + for (i = first_socket; i <= last_socket; ++i) { + FD_SET (i, &accept_fds); + } + rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL); + if (rc < 1) continue; + new_connection = -1; + for (i = first_socket; i <= last_socket; ++i) { + if (FD_ISSET (i, &accept_fds)) { + new_connection = accept (i, NULL, NULL); + if (new_connection != -1) break; + } + } + if (new_connection != -1) break; + } + process_the(new_connection); } -
      +

      But this naive implementation has a serious starvation problem. Recall that multiple children execute this loop at the same time, and so multiple children will block at select when they are in between requests. All those blocked children will awaken and return from - select when a single request appears on any socket - (the number of children which awaken varies depending on the - operating system and timing issues). They will all then fall + select when a single request appears on any socket. + (The number of children which awaken varies depending on the + operating system and timing issues.) They will all then fall down into the loop and try to accept the connection. But only one will succeed (assuming there's still - only one connection ready), the rest will be blocked + only one connection ready). The rest will be blocked in accept. This effectively locks those children into serving requests from that one socket and no other sockets, and they'll be stuck there until enough new requests @@ -650,48 +632,38 @@ servicing requests that occurred on other sockets until they get back up to the select again. Overall this solution does not seem very fruitful unless you have as many - idle CPUs (in a multiprocessor box) as you have idle children, - not a very likely situation.

      + idle CPUs (in a multiprocessor box) as you have idle children + (not a very likely situation).

      Another solution, the one used by Apache, is to serialize entry into the inner loop. The loop looks like this (differences highlighted):

      - - for (;;) {
      - - accept_mutex_on ();
      - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - accept_mutex_off ();
      - process the new_connection;
      -
      + + for (;;) { + accept_mutex_on (); + for (;;) { + fd_set accept_fds; + + FD_ZERO (&accept_fds); + for (i = first_socket; i <= last_socket; ++i) { + FD_SET (i, &accept_fds); + } + rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL); + if (rc < 1) continue; + new_connection = -1; + for (i = first_socket; i <= last_socket; ++i) { + if (FD_ISSET (i, &accept_fds)) { + new_connection = accept (i, NULL, NULL); + if (new_connection != -1) break; + } + } + if (new_connection != -1) break; + } + accept_mutex_off (); + process the new_connection; } -
      +

      The functions accept_mutex_on and accept_mutex_off @@ -714,7 +686,7 @@

      Another solution that has been considered but never implemented is to partially serialize the loop -- that is, let in a certain number of processes. This would only be of - interest on multiprocessor boxes where it's possible multiple + interest on multiprocessor boxes where it's possible that multiple children could run simultaneously, and the serialization actually doesn't take advantage of the full bandwidth. This is a possible area of future investigation, but priority remains @@ -729,22 +701,22 @@

      - accept Serialization - single socket + accept Serialization - Single Socket

      The above is fine and dandy for multiple socket servers, but what about single socket servers? In theory they shouldn't - experience any of these same problems because all children can - just block in accept(2) until a connection + experience any of these same problems because all the children + can just block in accept(2) until a connection arrives, and no starvation results. In practice this hides - almost the same "spinning" behaviour discussed above in the + almost the same "spinning" behavior discussed above in the non-blocking solution. The way that most TCP stacks are implemented, the kernel actually wakes up all processes blocked in accept when a single connection arrives. One of - those processes gets the connection and returns to user-space, - the rest spin in the kernel and go back to sleep when they + those processes gets the connection and returns to user-space. + The rest spin in the kernel and go back to sleep when they discover there's no connection for them. This spinning is hidden from the user-land code, but it's there nonetheless. - This can result in the same load-spiking wasteful behaviour + This can result in the same load-spiking wasteful behavior that a non-blocking solution to the multiple sockets case can.

      @@ -758,8 +730,8 @@ single-socket showed an extra 100ms latency on each request. This latency is probably a wash on long haul lines, and only an issue on LANs. If you want to override the single socket - serialization you can define - SINGLE_LISTEN_UNSERIALIZED_ACCEPT and then + serialization, you can define + SINGLE_LISTEN_UNSERIALIZED_ACCEPT, and then single-socket servers will not serialize at all.

      @@ -772,27 +744,27 @@ href="http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-connection-00.txt"> draft-ietf-http-connection-00.txt section 8, in order for an HTTP server to reliably implement the - protocol it needs to shutdown each direction of the - communication independently (recall that a TCP connection is - bi-directional, each half is independent of the other).

      - -

      When this feature was added to Apache it caused a flurry of - problems on various versions of Unix because of a - shortsightedness. The TCP specification does not state that the - FIN_WAIT_2 state has a timeout, but it doesn't prohibit it. + protocol, it needs to shut down each direction of the + communication independently. (Recall that a TCP connection is + bi-directional. Each half is independent of the other.)

      + +

      When this feature was added to Apache, it caused a flurry of + problems on various versions of Unix because of shortsightedness. + The TCP specification does not state that the FIN_WAIT_2 + state has a timeout, but it doesn't prohibit it. On systems without the timeout, Apache 1.2 induces many sockets stuck forever in the FIN_WAIT_2 state. In many cases this can be avoided by simply upgrading to the latest TCP/IP patches supplied by the vendor. In cases where the vendor has never released patches (i.e., SunOS4 -- although folks with - a source license can patch it themselves) we have decided to + a source license can patch it themselves), we have decided to disable this feature.

      -

      There are two ways of accomplishing this. One is the socket +

      There are two ways to accomplish this. One is the socket option SO_LINGER. But as fate would have it, this has never been implemented properly in most TCP/IP stacks. Even on those stacks with a proper implementation (i.e., - Linux 2.0.31) this method proves to be more expensive (cputime) + Linux 2.0.31), this method proves to be more expensive (cputime) than the next solution.

      For the most part, Apache implements this in a function @@ -800,48 +772,40 @@ http_main.c). The function looks roughly like this:

      - - void lingering_close (int s)
      - {
      - - char junk_buffer[2048];
      -
      - /* shutdown the sending side */
      - shutdown (s, 1);
      -
      - signal (SIGALRM, lingering_death);
      - alarm (30);
      -
      - for (;;) {
      - - select (s for reading, 2 second timeout);
      - if (error) break;
      - if (s is ready for reading) {
      - - if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
      - - break;
      -
      - }
      - /* just toss away whatever is here */
      -
      - }
      -
      - }
      -
      - close (s);
      -
      + + void lingering_close (int s) + { + char junk_buffer[2048]; + + /* shutdown the sending side */ + shutdown (s, 1); + + signal (SIGALRM, lingering_death); + alarm (30); + + for (;;) { + select (s for reading, 2 second timeout); + if (error) break; + if (s is ready for reading) { + if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) { + break; + } + /* just toss away whatever is here */ + } + } + + close (s); } -
      +

      This naturally adds some expense at the end of a connection, but it is required for a reliable implementation. As HTTP/1.1 becomes more prevalent, and all connections are persistent, this expense will be amortized over more requests. If you want - to play with fire and disable this feature you can define + to play with fire and disable this feature, you can define NO_LINGCLOSE, but this is not recommended at all. In particular, as HTTP/1.1 pipelined persistent connections - come into use lingering_close is an absolute + come into use, lingering_close is an absolute necessity (and pipelined connections are faster, so you want to support @@ -860,7 +824,7 @@ for, it typically is implemented using shared memory. The rest default to using an on-disk file. The on-disk file is not only slow, but it is unreliable (and less featured). Peruse the - src/main/conf.h file for your architecture and + src/main/conf.h file for your architecture, and look for either USE_MMAP_SCOREBOARD or USE_SHMGET_SCOREBOARD. Defining one of those two (as well as their companions HAVE_MMAP and @@ -868,11 +832,11 @@ shared memory code. If your system has another type of shared memory, edit the file src/main/http_main.c and add the hooks necessary to use it in Apache. (Send us back a patch - too please.)

      + too, please.)

      Historical note: The Linux port of Apache didn't start to use shared memory until version 1.2 of Apache. This oversight - resulted in really poor and unreliable behaviour of earlier + resulted in really poor and unreliable behavior of earlier versions of Apache on Linux.
      @@ -883,7 +847,7 @@

      If you have no intention of using dynamically loaded modules (you probably don't if you're reading this and tuning your - server for every last ounce of performance) then you should add + server for every last ounce of performance), then you should add -DDYNAMIC_MODULE_LIMIT=0 when building your server. This will save RAM that's allocated only for supporting dynamically loaded modules.

      @@ -904,7 +868,7 @@

      The -l option tells truss to log the ID of the - LWP (lightweight process--Solaris's form of kernel-level thread) + LWP (lightweight process--Solaris' form of kernel-level thread) that invokes each system call.

      Other systems may have different system call tracing utilities @@ -974,7 +938,7 @@

      Next, the worker thread puts the connection to the client (file descriptor 9) in non-blocking mode. The setsockopt(2) and getsockopt(2) calls are a side-effect of how - Solaris's libc handles fcntl(2) on sockets.

      + Solaris' libc handles fcntl(2) on sockets.

      /65:    read(9, " G E T   / 1 0 k . h t m".., 8000)     = 97
      diff --git a/docs/manual/misc/perf-tuning.xml.fr b/docs/manual/misc/perf-tuning.xml.fr index 512ef7bdcb4..254d0eb2bb8 100644 --- a/docs/manual/misc/perf-tuning.xml.fr +++ b/docs/manual/misc/perf-tuning.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -159,19 +159,17 @@

      Notez qu'il est possible de modifier la portée des directives, en les plaçant par exemple à l'intérieur d'une section - <Location /server-status>. Les recherches DNS ne + <Location "/server-status">. Les recherches DNS ne seront alors effectuées que pour les requêtes qui satisfont aux critères. Voici un exemple qui désactive les recherches DNS sauf pour les fichiers .html et .cgi :

      - - HostnameLookups off
      - <Files ~ "\.(html|cgi)$">
      - - HostnameLookups on
      -
      - </Files> -
      + +HostnameLookups off +<Files ~ "\.(html|cgi)$"> + HostnameLookups on +</Files> +

      Mais même dans ce cas, si vous n'avez besoin de noms DNS que dans certains CGIs, vous pouvez effectuer l'appel à gethostbyname @@ -190,14 +188,12 @@ symboliques. Un appel supplémentaire par élément du chemin du fichier. Par exemple, si vous avez :

      - - DocumentRoot /www/htdocs
      - <Directory />
      - - Options SymLinksIfOwnerMatch
      -
      - </Directory> -
      + +DocumentRoot "/www/htdocs" +<Directory "/"> + Options SymLinksIfOwnerMatch +</Directory> +

      et si une requête demande l'URI /index.html, Apache effectuera un appel à lstat(2) pour @@ -208,20 +204,16 @@ vérifier la sécurité des liens symboliques, vous pouvez utiliser une configuration du style :

      - - DocumentRoot /www/htdocs
      - <Directory />
      - - Options FollowSymLinks
      -
      - </Directory>
      -
      - <Directory /www/htdocs>
      - - Options -FollowSymLinks +SymLinksIfOwnerMatch
      -
      - </Directory> -
      + +DocumentRoot "/www/htdocs" +<Directory "/"> + Options FollowSymLinks +</Directory> + +<Directory "/www/htdocs"> + Options -FollowSymLinks +SymLinksIfOwnerMatch +</Directory> +

      Ceci évite au moins les vérifications supplémentaires pour le chemin défini par DocumentRoot. Notez que @@ -236,7 +228,7 @@ -

      +
      AllowOverride @@ -246,14 +238,12 @@ pour chaque élément du chemin du fichier demandé. Par exemple, si vous avez :

      - - DocumentRoot /www/htdocs
      - <Directory />
      - - AllowOverride all
      -
      - </Directory> -
      + +DocumentRoot "/www/htdocs" +<Directory "/"> + AllowOverride all +</Directory> +

      et qu'une requête demande l'URI /index.html, Apache tentera d'ouvrir /.htaccess, /www/.htaccess, @@ -275,15 +265,11 @@ Il y a cependant un cas dans lequel vous pouvez accélérer le serveur. Au lieu d'utiliser une directive générique comme :

      - - DirectoryIndex index - + DirectoryIndex index

      utilisez une liste explicite d'options :

      - - DirectoryIndex index.cgi index.pl index.shtml index.html - + DirectoryIndex index.cgi index.pl index.shtml index.html

      où vous placez le choix courant en première position.

      @@ -477,6 +463,12 @@ serveurs présentant un traffic important car il possède une empreinte mémoire plus petite que le MPM prefork.
    • +
    • Comme le MPM Worker, le MPM event utilise + les threads, mais il a été conçu pour traiter davantage de + requêtes simultanément en confiant une partie du travail à des + threads de support, ce qui permet aux threads principaux de + traiter de nouvelles requêtes.
    • +
    • Le MPM prefork utilise plusieurs processus enfants possédant chacun un seul thread. Chaque processus gère une seule connexion à la fois. Sur de nombreux systèmes, prefork est comparable @@ -628,39 +620,29 @@ (ces exemples ne sont pas extraits du code d'Apache, ils ne sont proposés qu'à des fins pédagogiques) :

      - - for (;;) {
      - - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - process the new_connection;
      -
      + + for (;;) { + for (;;) { + fd_set accept_fds; + + FD_ZERO (&accept_fds); + for (i = first_socket; i <= last_socket; ++i) { + FD_SET (i, &accept_fds); + } + rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL); + if (rc < 1) continue; + new_connection = -1; + for (i = first_socket; i <= last_socket; ++i) { + if (FD_ISSET (i, &accept_fds)) { + new_connection = accept (i, NULL, NULL); + if (new_connection != -1) break; + } + } + if (new_connection != -1) break; + } + process_the(new_connection); } -
      +

      Mais cette implémentation rudimentaire présente une sérieuse lacune. Rappelez-vous que les processus enfants exécutent cette boucle au même @@ -699,41 +681,31 @@ entrées dans la boucle interne. La boucle ressemble à ceci (les différences sont mises en surbrillance) :

      - - for (;;) {
      - - accept_mutex_on ();
      - for (;;) {
      - - fd_set accept_fds;
      -
      - FD_ZERO (&accept_fds);
      - for (i = first_socket; i <= last_socket; ++i) {
      - - FD_SET (i, &accept_fds);
      -
      - }
      - rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL);
      - if (rc < 1) continue;
      - new_connection = -1;
      - for (i = first_socket; i <= last_socket; ++i) {
      - - if (FD_ISSET (i, &accept_fds)) {
      - - new_connection = accept (i, NULL, NULL);
      - if (new_connection != -1) break;
      -
      - }
      -
      - }
      - if (new_connection != -1) break;
      -
      - }
      - accept_mutex_off ();
      - process the new_connection;
      -
      + + for (;;) { + accept_mutex_on (); + for (;;) { + fd_set accept_fds; + + FD_ZERO (&accept_fds); + for (i = first_socket; i <= last_socket; ++i) { + FD_SET (i, &accept_fds); + } + rc = select (last_socket+1, &accept_fds, NULL, NULL, NULL); + if (rc < 1) continue; + new_connection = -1; + for (i = first_socket; i <= last_socket; ++i) { + if (FD_ISSET (i, &accept_fds)) { + new_connection = accept (i, NULL, NULL); + if (new_connection != -1) break; + } + } + if (new_connection != -1) break; + } + accept_mutex_off (); + process the new_connection; } -
      +

      Les fonctions accept_mutex_on et accept_mutex_off @@ -846,39 +818,31 @@ http_main.c). La fonction ressemble approximativement à ceci :

      - - void lingering_close (int s)
      - {
      - - char junk_buffer[2048];
      -
      - /* shutdown the sending side */
      - shutdown (s, 1);
      -
      - signal (SIGALRM, lingering_death);
      - alarm (30);
      -
      - for (;;) {
      - - select (s for reading, 2 second timeout);
      - if (error) break;
      - if (s is ready for reading) {
      - - if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) {
      - - break;
      -
      - }
      - /* just toss away whatever is here */
      -
      - }
      -
      - }
      -
      - close (s);
      -
      + + void lingering_close (int s) + { + char junk_buffer[2048]; + + /* shutdown the sending side */ + shutdown (s, 1); + + signal (SIGALRM, lingering_death); + alarm (30); + + for (;;) { + select (s for reading, 2 second timeout); + if (error) break; + if (s is ready for reading) { + if (read (s, junk_buffer, sizeof (junk_buffer)) <= 0) { + break; + } + /* just toss away whatever is here */ + } + } + + close (s); } -
      +

      Ceci ajoute naturellement un peu de charge à la fin d'une connexion, mais s'avère nécessaire pour une implémentation fiable. Comme HTTP/1.1 diff --git a/docs/manual/misc/perf-tuning.xml.ko b/docs/manual/misc/perf-tuning.xml.ko index f55ff73b1de..cff87304492 100644 --- a/docs/manual/misc/perf-tuning.xml.ko +++ b/docs/manual/misc/perf-tuning.xml.ko @@ -1,7 +1,7 @@ - + + -Relevant Standards - Apache HTTP Server +Relevant Standards - Apache HTTP Server Version 2.4 - + + +

      + +

      Apache HTTP Server Version 2.4

      +
    <-

    Relevant Standards

    Available Languages:  en  | + fr  |  ko 

    @@ -53,7 +59,7 @@
  • HTML Recommendations
  • Authentication
  • Language/Country Codes
  • -
    +

    See also

    top

    HTTP Recommendations

    @@ -199,8 +205,30 @@

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/relevant_standards.html.fr b/docs/manual/misc/relevant_standards.html.fr new file mode 100644 index 00000000000..ce23535e67f --- /dev/null +++ b/docs/manual/misc/relevant_standards.html.fr @@ -0,0 +1,253 @@ + + + + + +Standards applicables - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Standards applicables

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + +

    Cette page documente tous les standards applicables que suit le + serveur HTTP Apache, accompagns d'une brve description.

    + +

    Pour complter les informations fournies ci-dessous, vous pouvez + consulter les ressources suivantes :

    + + + +

    Avertissement

    +

    Ce document n'est pas encore finalis.

    +
    + +
    + +
    top
    +
    +

    Recommandations HTTP

    + +

    Indpendamment des modules compils et utiliss, Apache en + tant que serveur web de base respecte les recommandations IETF + suivantes :

    + +
    +
    RFC 1945 + (Informations)
    + +
    Le Protocole de Transfert Hypertexte (Hypertext Transfer + Protocol - HTTP) est un protocole de niveau application avec la + clart et la vitesse ncessaires pour les systmes d'informations + distribus, collaboratifs et hypermdia. Cette RFC documente le + protocole HTTP/1.0.
    + +
    RFC 2616 + (Srie de standards)
    + +
    Le Protocole de Transfert Hypertexte (Hypertext Transfer + Protocol - HTTP) est un protocole de niveau application pour les + systmes d'informations distribus, collaboratifs et hypermdia. + Cette RFC documente le protocole HTTP/1.1.
    + +
    RFC 2396 + (Srie de standards)
    + +
    Un Identificateur de Ressource Uniforme (Uniform Resource + Identifier - URI) est une chane de caractres compacte permettant + d'identifier une ressource physique ou abstraite.
    + +
    RFC 4346 + (Srie de standards)
    + +
    Le protocole TLS permet l'utilisation de communications + scurises sur l'Internet. Il fournit le chiffrement, et a t + conu pour se prmunir contre l'interception, la modification et + la falsification de messages.
    +
    + +
    top
    +
    +

    Recommandations HTML

    + +

    En ce qui concerne le langage HTML, Apache respecte les + recommandations IETF et W3C suivantes :

    + +
    +
    RFC 2854 + (Informations)
    + +
    Ce document rsume l'historique du dveloppement de HTML, et + dfinit le type MIME "text/html" en pointant les recommandations + W3C correspondantes.
    + +
    Spcification HTML + 4.01 + (Corrections + d'erreurs) +
    + +
    Cette spcification dfinit le Langage Balises HyperTexte + (HyperText Markup Language - HTML), le langage de publication du + World Wide Web. Elle dfinit HTML 4.01, qui est une sous-version + de HTML 4.
    + +
    Rfrence HTML + 3.2
    + +
    Le langage Balises HyperTexte (HyperText Markup Language - + HTML) est un langage balises simple permettant de crer des + documents hypertextes portables. Les documents HTML sont aussi des + documents SGML.
    + +
    XHTML 1.1 - + XHTML sous forme de modules + (Corrections + d'erreurs) +
    + +
    Cette recommandation dfinit un nouveau type de document XHTML + bas sur le cadre de dveloppement des modules et les modules + dfinis dans la modularisation de XHTML.
    + +
    XHTML 1.0, le Langage + Balises Hypertexte Extensible (Extensible HyperText Markup + Language) - Seconde dition + (Corrections + d'erreurs) +
    + +
    Cette spcification dfinit la seconde dition de XHTML 1.0, + une reformulation de HTML 4 en tant qu'application XML 1.0, ainsi + que trois DTDs correspondant celles dfinies par HTML 4.
    +
    + +
    top
    +
    +

    Authentification

    + +

    En ce qui concerne les diffrentes mthodes d'authentification, + Apache respecte les recommandations IETF suivantes :

    + +
    +
    RFC 2617 + (Le track des standards)
    + +
    "HTTP/1.0", y compris la spcification d'un protocole basique + d'authentification et de contrle d'accs.
    + +
    + +
    top
    +
    +

    Codes de langues et de + pays

    + +

    Les liens suivants fournissent des informations propos des + codes de langues et de pays aux normes ISO ou autres :

    + +
    +
    ISO 639-2
    + +
    ISO 639 fournit deux jeux de codes de langues permettant de + reprsenter les noms des langues ; le premier est + un jeu de codes sur deux lettres (639-1), le second (celui + prsent dans le lien ci-dessus), est un jeu de codes sur trois + lettres (639-2).
    + +
    + ISO 3166-1
    + +
    Ce document prsente les noms de pays (les noms raccourcis + officiels en anglais) dans l'ordre alphabtique, tels qu'ils sont + prsents dans la norme ISO 3166-1 et les lments de codes + correspondants de la norme ISO 3166-1-alpha-2.
    + +
    BCP 47 + (Les meilleurs pratiques courantes), + RFC 3066
    + +
    Ce document dcrit une balise de langue permettant de + spcifier la langue utilis dans un objet contenant des + informations, la manire d'enregistrer des valeurs utiliser dans + cette balise de langage, et une mthode pour comparer les balises + de langue de ce style.
    + +
    RFC 3282 + (Srie de standards)
    + +
    Ce document dfinit un en-tte "Content-language:" permettant + de spcifier le langage d'un lment possdant des en-ttes du + style RFC 822, comme les portions de corps MIME ou les documents + Web, et un en-tte "Accept-Language:" permettant de spcifier des + prfrences en matire de langue.
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/misc/relevant_standards.html.ko.euc-kr b/docs/manual/misc/relevant_standards.html.ko.euc-kr index 4294d944a0d..39d01bcaeed 100644 --- a/docs/manual/misc/relevant_standards.html.ko.euc-kr +++ b/docs/manual/misc/relevant_standards.html.ko.euc-kr @@ -1,24 +1,30 @@ - - ǥ - Apache HTTP Server + ǥ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ǥ

    ֽ ƴմϴ. @@ -55,7 +61,7 @@
  • HTML ǰ
  • / ڵ
  • -
    +

    top

    HTTP ǰ

    @@ -186,8 +192,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/relevant_standards.xml.fr b/docs/manual/misc/relevant_standards.xml.fr new file mode 100644 index 00000000000..2100ace767e --- /dev/null +++ b/docs/manual/misc/relevant_standards.xml.fr @@ -0,0 +1,220 @@ + + + + + + + + + + + Documentations diverses + + Standards applicables + + +

    Cette page documente tous les standards applicables que suit le + serveur HTTP Apache, accompagnés d'une brève description.

    + +

    Pour compléter les informations fournies ci-dessous, vous pouvez + consulter les ressources suivantes :

    + + + + Avertissement +

    Ce document n'est pas encore finalisé.

    +
    + +
    + +
    Recommandations HTTP + +

    Indépendamment des modules compilés et utilisés, Apache en + tant que serveur web de base respecte les recommandations IETF + suivantes :

    + +
    +
    RFC 1945 + (Informations)
    + +
    Le Protocole de Transfert Hypertexte (Hypertext Transfer + Protocol - HTTP) est un protocole de niveau application avec la + clarté et la vitesse nécessaires pour les systèmes d'informations + distribués, collaboratifs et hypermédia. Cette RFC documente le + protocole HTTP/1.0.
    + +
    RFC 2616 + (Série de standards)
    + +
    Le Protocole de Transfert Hypertexte (Hypertext Transfer + Protocol - HTTP) est un protocole de niveau application pour les + systèmes d'informations distribués, collaboratifs et hypermédia. + Cette RFC documente le protocole HTTP/1.1.
    + +
    RFC 2396 + (Série de standards)
    + +
    Un Identificateur de Ressource Uniforme (Uniform Resource + Identifier - URI) est une chaîne de caractères compacte permettant + d'identifier une ressource physique ou abstraite.
    + +
    RFC 4346 + (Série de standards)
    + +
    Le protocole TLS permet l'utilisation de communications + sécurisées sur l'Internet. Il fournit le chiffrement, et a été + conçu pour se prémunir contre l'interception, la modification et + la falsification de messages.
    +
    + +
    + +
    Recommandations HTML + +

    En ce qui concerne le langage HTML, Apache respecte les + recommandations IETF et W3C suivantes :

    + +
    +
    RFC 2854 + (Informations)
    + +
    Ce document résume l'historique du développement de HTML, et + définit le type MIME "text/html" en pointant les recommandations + W3C correspondantes.
    + +
    Spécification HTML + 4.01 + (Corrections + d'erreurs) +
    + +
    Cette spécification définit le Langage à Balises HyperTexte + (HyperText Markup Language - HTML), le langage de publication du + World Wide Web. Elle définit HTML 4.01, qui est une sous-version + de HTML 4.
    + +
    Référence HTML + 3.2
    + +
    Le langage à Balises HyperTexte (HyperText Markup Language - + HTML) est un langage à balises simple permettant de créer des + documents hypertextes portables. Les documents HTML sont aussi des + documents SGML.
    + +
    XHTML 1.1 - + XHTML sous forme de modules + (Corrections + d'erreurs) +
    + +
    Cette recommandation définit un nouveau type de document XHTML + basé sur le cadre de développement des modules et les modules + définis dans la modularisation de XHTML.
    + +
    XHTML 1.0, le Langage à + Balises Hypertexte Extensible (Extensible HyperText Markup + Language) - Seconde édition + (Corrections + d'erreurs) +
    + +
    Cette spécification définit la seconde édition de XHTML 1.0, + une reformulation de HTML 4 en tant qu'application XML 1.0, ainsi + que trois DTDs correspondant à celles définies par HTML 4.
    +
    + +
    + +
    Authentification + +

    En ce qui concerne les différentes méthodes d'authentification, + Apache respecte les recommandations IETF suivantes :

    + +
    +
    RFC 2617 + (Le track des standards)
    + +
    "HTTP/1.0", y compris la spécification d'un protocole basique + d'authentification et de contrôle d'accès.
    + +
    + +
    + +
    Codes de langues et de + pays + +

    Les liens suivants fournissent des informations à propos des + codes de langues et de pays aux normes ISO ou autres :

    + +
    +
    ISO 639-2
    + +
    ISO 639 fournit deux jeux de codes de langues permettant de + représenter les noms des langues ; le premier est + un jeu de codes sur deux lettres (639-1), le second (celui + présenté dans le lien ci-dessus), est un jeu de codes sur trois + lettres (639-2).
    + +
    + ISO 3166-1
    + +
    Ce document présente les noms de pays (les noms raccourcis + officiels en anglais) dans l'ordre alphabétique, tels qu'ils sont + présentés dans la norme ISO 3166-1 et les éléments de codes + correspondants de la norme ISO 3166-1-alpha-2.
    + +
    BCP 47 + (Les meilleurs pratiques courantes), + RFC 3066
    + +
    Ce document décrit une balise de langue permettant de + spécifier la langue utilisé dans un objet contenant des + informations, la manière d'enregistrer des valeurs à utiliser dans + cette balise de langage, et une méthode pour comparer les balises + de langue de ce style.
    + +
    RFC 3282 + (Série de standards)
    + +
    Ce document définit un en-tête "Content-language:" permettant + de spécifier le langage d'un élément possédant des en-têtes du + style RFC 822, comme les portions de corps MIME ou les documents + Web, et un en-tête "Accept-Language:" permettant de spécifier des + préférences en matière de langue.
    +
    + +
    + +
    diff --git a/docs/manual/misc/relevant_standards.xml.meta b/docs/manual/misc/relevant_standards.xml.meta index e61c192c32d..e7eff6343b0 100644 --- a/docs/manual/misc/relevant_standards.xml.meta +++ b/docs/manual/misc/relevant_standards.xml.meta @@ -8,6 +8,7 @@ en + fr ko diff --git a/docs/manual/misc/security_tips.html.en b/docs/manual/misc/security_tips.html.en index c8322f326d1..5e3a6ce4c6c 100644 --- a/docs/manual/misc/security_tips.html.en +++ b/docs/manual/misc/security_tips.html.en @@ -1,22 +1,27 @@ - -Security Tips - Apache HTTP Server +Security Tips - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Keep up to Date

    @@ -126,13 +132,14 @@
  • The use of a threaded mpm may allow you to handle more simultaneous connections, thereby - mitigating DoS attacks. Further, the experimental + mitigating DoS attacks. Further, the event mpm uses asynchronous processing to avoid devoting a thread to each - connection. At the current point of time this - is work in progress and not fully implemented. Especially the + connection. Due to the nature of the OpenSSL library the event mpm is currently incompatible with - mod_ssl and other input filters.
  • + mod_ssl and other input filters. In these + cases it falls back to the behaviour of the + worker mpm.
  • There are a number of third-party modules available through http://modules.apache.org/ @@ -148,7 +155,7 @@

    In typical operation, Apache is started by the root user, and it - switches to the user defined by the User directive to serve hits. As is the + switches to the user defined by the User directive to serve hits. As is the case with any command that root executes, you must take care that it is protected from modification by non-root users. Not only must the files themselves be writeable only by root, but so must the directories, and @@ -294,7 +301,7 @@

    Embedded scripting options which run as part of the server itself, such as mod_php, mod_perl, mod_tcl, and mod_python, run under the identity of the server itself - (see the User directive), and + (see the User directive), and therefore scripts executed by these engines potentially can access anything the server user can. Some scripting engines may provide restrictions, but it is better to be safe and assume not.

    @@ -329,15 +336,16 @@

    In the server configuration file, put

    -

    - <Directory />
    - AllowOverride None
    - </Directory> -

    +
    <Directory "/">
    +    AllowOverride None
    +</Directory>
    +

    This prevents the use of .htaccess files in all directories apart from those specifically enabled.

    +

    Note that this setting is the default since Apache 2.3.9.

    +
  • top

    Protect Server Files by Default

    @@ -360,31 +368,26 @@ work around this, add the following block to your server's configuration:

    -

    - <Directory />
    - Order Deny,Allow
    - Deny from all
    - </Directory> -

    +
    <Directory "/">
    +    Require all denied
    +</Directory>
    +

    This will forbid default access to filesystem locations. Add appropriate Directory blocks to allow access only in those areas you wish. For example,

    -

    - <Directory /usr/users/*/public_html>
    - Order Deny,Allow
    - Allow from all
    - </Directory>
    - <Directory /usr/local/httpd>
    - Order Deny,Allow
    - Allow from all
    - </Directory> -

    +
    <Directory "/usr/users/*/public_html">
    +    Require all granted
    +</Directory>
    +<Directory "/usr/local/httpd">
    +    Require all granted
    +</Directory>
    +

    Pay particular attention to the interactions of Location and Directory directives; for instance, even - if <Directory /> denies access, a - <Location /> directive might overturn it.

    + if <Directory "/"> denies access, a + <Location "/"> directive might overturn it.

    Also be wary of playing games with the UserDir directive; setting it to something like ./ would have the same effect, for root, as @@ -392,9 +395,8 @@ recommend that you include the following line in your server configuration files:

    -

    - UserDir disabled root -

    +
    UserDir disabled root
    +
    top
    @@ -437,20 +439,54 @@ you probably commented out the following in your server configuration file:

    -

    - <Files ".ht*">
    - Order allow,deny
    - Deny from all
    - </Files> -

    +
    <Files ".ht*">
    +    Require all denied
    +</Files>
    + + +
    top
    +
    +

    Merging of configuration sections

    + + + +

    The merging of configuration sections is complicated and sometimes + directive specific. Always test your changes when creating dependencies + on how directives are merged.

    +

    For modules that don't implement any merging logic, such as + mod_access_compat, the behavior in later sections + depends on whether the later section has any directives + from the module. The configuration is inherited until a change is made, + at which point the configuration is replaced and not merged.

    Available Languages:  en  |  fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/security_tips.html.fr b/docs/manual/misc/security_tips.html.fr index 53959bd1312..0a3ea63ce4f 100644 --- a/docs/manual/misc/security_tips.html.fr +++ b/docs/manual/misc/security_tips.html.fr @@ -1,22 +1,27 @@ - -Conseils sur la scurit - Serveur Apache HTTP +Conseils sur la scurit - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    top

    Maintenez votre serveur jour

    @@ -135,13 +141,13 @@
  • L'utilisation d'un module mpm thread vous permet de traiter d'avantage de connexions simultanes, ce qui - minimise l'effet des attaques DoS. Dans le futur, le module mpm exprimental + minimise l'effet des attaques DoS. Dans le futur, le module mpm event utilisera un traitement asynchrone afin de ne pas - ddier un thread chaque connexion. Il est en cours d'tude - l'heure actuelle et n'est pas encore entirement implment. En - particulier, le mpm event est actuellement incompatible + ddier un thread chaque connexion. De par la + nature de la bibliothque OpenSSL, le module mpm event est actuellement incompatible avec le module mod_ssl ainsi que d'autres filtres - en entre.
  • + en entre. Dans ces cas, son comportement se ramne celui + du module mpm worker.
  • Il existe de nombreux modules tiers disponibles http://modules.apache.org/ qui peuvent retreindre les comportements de certains clients et ainsi @@ -156,7 +162,7 @@

    Typiquement, Apache est dmarr par l'utilisateur root, puis il devient - la proprit de l'utilisateur dfini par la directive User afin de rpondre aux demandes. Comme + la proprit de l'utilisateur dfini par la directive User afin de rpondre aux demandes. Comme pour toutes les commandes excutes par root, vous devez vous assurer qu'elle n'est pas modifiable par les utilisateurs autres que root. Les fichiers eux-mmes, mais aussi les rpertoires ainsi que leurs parents ne @@ -320,7 +326,7 @@ serveur lui-mme, comme mod_php, mod_perl, mod_tcl, et mod_python, s'excutent sous le mme utilisateur que le serveur (voir la directive - User), et par consquent, + User), et par consquent, les scripts que ces moteurs excutent peuvent accder aux mmes ressources que le serveur. Certains moteurs de scripting peuvent proposer des restrictions, mais pour plus de sret, il vaut mieux partir du principe @@ -339,16 +345,17 @@

    Ajoutez dans le fichier de configuration du serveur

    -

    - <Directory />
    - AllowOverride None
    - </Directory> -

    +
    <Directory "/">
    +    AllowOverride None
    +</Directory>
    +

    Ceci interdit l'utilisation des fichiers .htaccess dans tous les rpertoires, sauf ceux pour lesquels c'est explicitement autoris.

    +

    Notez que c'est la configuration par dfaut depuis Apache 2.3.9.

    +
  • top

    Protection par dfaut des fichiers du serveur

    @@ -372,34 +379,29 @@ fichiers. Pour l'viter, ajoutez le bloc suivant la configuration de votre serveur :

    -

    - <Directory />
    - Order Deny,Allow
    - Deny from all
    - </Directory> -

    +
    <Directory "/">
    +    Require all denied
    +</Directory>
    +

    ceci va interdire l'accs par dfaut tous les fichiers du systme de fichiers. Vous devrez ensuite ajouter les blocs Directory appropris correspondant aux rpertoires auxquels vous voulez autorisez l'accs. Par exemple,

    -

    - <Directory /usr/users/*/public_html>
    - Order Deny,Allow
    - Allow from all
    - </Directory>
    - <Directory /usr/local/httpd>
    - Order Deny,Allow
    - Allow from all
    - </Directory> -

    +
    <Directory "/usr/users/*/public_html">
    +    Require all granted
    +</Directory>
    +<Directory "/usr/local/httpd">
    +    Require all granted
    +</Directory>
    +

    Portez une attention particulire aux interactions entre les directives Location et Directory ; par exemple, si une - directive <Directory /> interdit un accs, une - directive <Location /> pourra passer outre.

    + directive <Directory ""/> interdit un accs, une + directive <Location "/"> pourra passer outre.

    De mme, soyez mfiant en jouant avec la directive UserDir ; la positionner @@ -408,9 +410,8 @@ fortement d'inclure la ligne suivante dans le fichier de configuration de votre serveur :

    -

    - UserDir disabled root -

    +
    UserDir disabled root
    +
    top
    @@ -456,20 +457,57 @@ qui signifie que vous avez probablement mis en commentaire ce qui suit dans le fichier de configuration de votre serveur :

    -

    - <Files ".ht*">
    - Order allow,deny
    - Deny from all
    - </Files> -

    +
    <Files ".ht*">
    +    Require all denied
    +</Files>
    + + +
    top
    +
    +

    Fusion des sections de configuration

    + + +

    La fusion des sections de configuration est complexe et dpend + souvent des directives utilises. Vous devez systmatiquement tester + vos modifications pour vrifier la manire dont les directives sont + fusionnes.

    + +

    Concernant les modules qui n'implmentent aucune logique de + fusion, comme mod_access_compat, le + comportement des sections suivantes est tributaire de la prsence + dans ces dernires de directives appartenant ces modules. La + configuration est hrite jusqu' ce qu'une modification soit + effectue ; ce moment, la configuration est remplace et + non fusionne.

    Langues Disponibles:  en  |  fr  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/security_tips.html.ko.euc-kr b/docs/manual/misc/security_tips.html.ko.euc-kr index 08c20e9dec3..6c20641fc40 100644 --- a/docs/manual/misc/security_tips.html.ko.euc-kr +++ b/docs/manual/misc/security_tips.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  en  |  fr  | @@ -39,7 +44,7 @@

  • ý ȣϱ
  • ⺻ ִ ȣϱ
  • α 캸
  • -
    +

    top

    ֽ ϱ

    @@ -341,7 +346,28 @@  fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/security_tips.html.tr.utf8 b/docs/manual/misc/security_tips.html.tr.utf8 index d92f8c6f097..6cd9ab0fe4b 100644 --- a/docs/manual/misc/security_tips.html.tr.utf8 +++ b/docs/manual/misc/security_tips.html.tr.utf8 @@ -1,29 +1,33 @@ - -Güvenlik İpuçları - Apache HTTP Sunucusu +Güvenlik İpuçları - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Güvenlik İpuçları

    Mevcut Diller:  en  |  fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bir HTTP Sunucusunu ayarlarken dikkat edilmesi gerekenler ve bazı ipuçları. Öneriler kısmen Apache’ye özel kısmen de genel olacaktır.

    @@ -40,7 +44,8 @@
  • Sistem Ayarlarının Korunması
  • Sunucu dosyalarının öntanımlı olarak korunması
  • Günlüklerin İzlenmesi
  • -
    +
  • Yapılandırma bölümlerinin birleştirilmesi
  • +

    Ayrıca bakınız:

    top

    Güncel Tutma

    @@ -83,6 +88,10 @@ tedbirler alınmasını sağlayacak bazı yapılandırmaları vardır:

      +
    • RequestReadTimeout + yönergesi bir istemcinin isteği göndermek için harcadığı zamanı + sınırlamayı sağlar.
    • +
    • HRS’ye maruz kalması olası sitelerde TimeOut yönergesinin değeri düşürülmelidir. Birkaç saniye gibi mümkün olduğunca düşük bir ayar uygun olabilir. Ancak TimeOut başka işlemlerde de @@ -111,16 +120,17 @@ olacaktır.
    • Sunucu tarafından özkaynakları tüketmeden aynı anda işlenebilecek - bağlantıların sayısını sınırlamak için MaxClients yönergesini kullanın. Ayrıca, başarım arttırma belgesine de + bağlantıların sayısını sınırlamak için MaxRequestWorkers yönergesini kullanın. Ayrıca, başarım arttırma belgesine de bakabilirsiniz.
    • HRS’lerin etkilerini azaltmak için aynı andaki bağlantı sayısını arttırabilecek evreli MPM’lerden birini - kullanmak iyi olabilir. Dahası, deneysel event MPM’i + kullanmak iyi olabilir. Dahası, event MPM’i her bağlantıya yeni bir evre atanmaması için eşzamansız işlem yapar. - Ancak bu çalışma henüz tamamlanmamıştır. Özellikle de, + OpenSSL kütüphanesinin doğası nedeniyle event MPM’i mod_ssl ve diğer girdi - süzgeçleri ile henüz uyumlu değildir.
    • + süzgeçleri ile henüz uyumlu değildir. Bu durumlarda, + worker MPM'inin davranışına geri döner.
    • http://modules.apache.org/ adresinde, belli istemci davranışlarını sınırlayacak ve HRS ile @@ -133,7 +143,7 @@

      Normalde, Apache root kullanıcı tarafından başlatılır ve hizmetleri - sunarken User yönergesi + sunarken User yönergesi tarafından tanımlanan kullanıcının aidiyetinde çalışır. Root tarafından çalıştırılan komutlarda olduğu gibi, root olmayan kullanıcıların yapacakları değişikliklerden korunmak konusunda da dikkatli @@ -282,7 +292,7 @@

      Sunucunun bir parçası gibi çalışan, mod_php, mod_perl, mod_tcl ve mod_python gibi gömülü betik çalıştırma seçenekleri sunucuyu çalıştıran - kullanıcının aidiyetinde çalışırlar (User yönergesine bakınız). Bu bakımdan bu betik + kullanıcının aidiyetinde çalışırlar (User yönergesine bakınız). Bu bakımdan bu betik yorumlayıcılar tarafından çalıştırılan betikler, sunucu kullanıcısının eriştiği herşeye erişebilirler. Bazı betik yorumlayıcıların getirdiği bazı sınırlamalar varsa da bunlara pek güvenmemek, gerekli sınamaları @@ -322,24 +332,25 @@

      Sunucu yapılandırma dosyanıza şunu yerleştirin:

      -

      - <Directory /> - - AllowOverride None - - </Directory> -

      +
      <Directory "/">
      +    AllowOverride None
      +</Directory>
      +

      Böylece, belli dizinlerde özellikle etkinleştirilmedikçe bütün dizinlerde .htaccess dosyalarının kullanımını engellemiş olursunuz.

      +

      Bu ayar Apache 2.3.9 itibariyle öntanımlıdır.

    top

    Sunucu dosyalarının öntanımlı olarak korunması

    -

    Apache’nin ister istemez yanlış anlaşılan yönlerinden biri öntanımlı erişim özelliğidir. Yani siz aksine bir şeyler yapmadıkça, sunucu normal URL eşleme kurallarını kullanarak bir dosyayı bulabildiği sürece onu istemciye sunacaktır.

    +

    Apache’nin ister istemez yanlış anlaşılan yönlerinden biri öntanımlı + erişim özelliğidir. Yani siz aksine bir şeyler yapmadıkça, sunucu normal + URL eşleme kurallarını kullanarak bir dosyayı bulabildiği sürece onu + istemciye sunacaktır.

    Örneğin, aşağıdaki durumu ele alalım:

    @@ -349,48 +360,50 @@

    Ve, tarayıcınıza http://localhost/~root/ yazın.

    -

    Böylece, istemcilerin tüm dosya sisteminizi gezmelerine izin vermiş olursunuz. Bu işlemin sonuçlarının önünü almak için sunucu yapılandırma dosyanıza şunları yazın:

    +

    Böylece, istemcilerin tüm dosya sisteminizi gezmelerine izin vermiş + olursunuz. Bu işlemin sonuçlarının önünü almak için sunucu yapılandırma + dosyanıza şunları yazın:

    -

    - <Directory /> - - Order Deny,Allow
    - Deny from all -
    - </Directory> -

    +
    <Directory "/">
    +    Require all denied
    +</Directory>
    -

    Bu suretle, dosya sisteminize öntanımlı erişimi yasaklamış olursunuz. Erişime izin vermek istediğiniz dizinler için uygun Directory bölümleri eklemeniz yeterli olacaktır. Örnek:

    -

    - <Directory /usr/users/*/public_html> - - Order Deny,Allow
    - Allow from all -
    - </Directory>
    - <Directory /usr/local/httpd> - - Order Deny,Allow
    - Allow from all -
    - </Directory> -

    +

    Bu suretle, dosya sisteminize öntanımlı erişimi yasaklamış olursunuz. + Erişime izin vermek istediğiniz dizinler için uygun Directory bölümleri eklemeniz yeterli + olacaktır. Örnek:

    -

    Location ve Directory yönergelerinin etkileşimine de özellikle önem vermelisiniz; örneğin <Directory /> erişimi yasaklarken bir <Location /> yönergesi bunu ortadan kaldırabilir.

    +
    <Directory "/usr/users/*/public_html">
    +    Require all granted
    +</Directory>
    +<Directory "/usr/local/httpd">
    +    Require all granted
    +</Directory>
    -

    UserDir yönergesi de size buna benzer bir oyun oynayabilir; yönergeye ./ atamasını yaparsanız, root kullanıcısı söz konusu olduğunda yukarıda ilk örnekteki durumla karşılaşırız. Apache 1.3 veya üstünü kullanıyorsanız, sunucu yapılandırma dosyanızda aşağıdaki satırın mutlaka bulunmasını öneririz:

    -

    - UserDir disabled root -

    +

    Location ve Directory yönergelerinin etkileşimine de + özellikle önem vermelisiniz; örneğin <Directory "/"> + erişimi yasaklarken bir <Location "/"> yönergesi bunu + ortadan kaldırabilir.

    + +

    UserDir yönergesi de size + buna benzer bir oyun oynayabilir; yönergeye ./ atamasını + yaparsanız, root kullanıcısı söz konusu olduğunda yukarıda ilk örnekteki + durumla karşılaşırız. Sunucu yapılandırma dosyanızda aşağıdaki satırın + mutlaka bulunmasını öneririz:

    + +
    UserDir disabled root
    +
    top

    Günlüklerin İzlenmesi

    -

    Sunucunuzda olup biteni günü gününe bilmek istiyorsanız günlük dosyalarına bakmalısınız. Günlük dosyaları sadece olup biteni raporlamakla kalmaz, sunucunuza ne tür saldırılar yapıldığını ve güvenlik seviyenizin yeterli olup olmadığını anlamanızı da sağlarlar.

    +

    Sunucunuzda olup biteni günü gününe bilmek istiyorsanız günlük dosyalarına bakmalısınız. Günlük dosyaları + sadece olup biteni raporlamakla kalmaz, sunucunuza ne tür saldırılar + yapıldığını ve güvenlik seviyenizin yeterli olup olmadığını anlamanızı da + sağlarlar.

    Bazı örnekler:

    @@ -399,38 +412,75 @@ grep "client denied" error_log | tail -n 10

    -

    İlk örnek, Apache Tomcat - Source.JSP Bozuk İstek Bilgilerini İfşa Açığını istismar etmeyi deneyen saldırıların sayısını verirken ikinci örnek, reddedilen son on istemciyi listeler; örnek:

    +

    İlk örnek, Apache Tomcat Source.JSP Bozuk İstek Bilgilerini İfşa Açığını + istismar etmeyi deneyen saldırıların sayısını verirken ikinci örnek, + reddedilen son on istemciyi listeler; örnek:

    - [Thu Jul 11 17:18:39 2002] [error] [client falan.filan.dom] client denied + [Thu Jul 11 17:18:39 2002] [error] [client foo.example.com] client denied by server configuration: /usr/local/apache/htdocs/.htpasswd

    -

    Gördüğünüz gibi günlük dosyaları sadece ne olup bittiğini raporlar, bu bakımdan eğer istemci .htpasswd dosyasına erişebiliyorsa erişim günlüğünüzde şuna benzer bir kayıt görürsünüz:

    +

    Gördüğünüz gibi günlük dosyaları sadece ne olup bittiğini raporlar, bu + bakımdan eğer istemci .htpasswd dosyasına erişebiliyorsa erişim günlüğünüzde şuna benzer bir + kayıt görürsünüz:

    - falan.filan.dom - - [12/Jul/2002:01:59:13 +0200] "GET /.htpasswd HTTP/1.1" + foo.example.com - - [12/Jul/2002:01:59:13 +0200] "GET /.htpasswd HTTP/1.1"

    -

    Bu, sunucu yapılandırma dosyanızda aşağıdaki yapılandırmayı iptal ettiğiniz anlamına gelir:

    +

    Bu, sunucu yapılandırma dosyanızda aşağıdaki yapılandırmayı iptal + ettiğiniz anlamına gelir:

    -

    - <Files "^.ht*"> - - Order allow,deny
    - Deny from all -
    - </Files> -

    +
    <Files ".ht*">
    +    Require all denied
    +</Files>
    + + +
    top
    +
    +

    Yapılandırma bölümlerinin birleştirilmesi

    + + + +

    Yapılandırma bölümlerinin birleştirilmesi karmaşık bir işlem olup bazı + durumlarda yönergelere bağlıdır. Yönergeleri bir araya getirirken + aralarındaki bağımlılıkları daima sınayın.

    +

    mod_access_compat gibi henüz yönerge katıştırma + mantığını gerçeklememiş modüller için sonraki bölümlerdeki davranış, bu + modüllerin yönergelerini içerip içermemesine bağlıdır. Yapılandırmada + yönergelerin yerleri değiştirildiğinde fakat bir katıştırma + yapılmadığında, yapılandırma bir değişiklik yapılana kadar miras + alınır.

    Mevcut Diller:  en  |  fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/misc/security_tips.xml b/docs/manual/misc/security_tips.xml index 3e91494443f..af003eb889b 100644 --- a/docs/manual/misc/security_tips.xml +++ b/docs/manual/misc/security_tips.xml @@ -117,13 +117,14 @@
  • The use of a threaded mpm may allow you to handle more simultaneous connections, thereby - mitigating DoS attacks. Further, the experimental + mitigating DoS attacks. Further, the event mpm uses asynchronous processing to avoid devoting a thread to each - connection. At the current point of time this - is work in progress and not fully implemented. Especially the + connection. Due to the nature of the OpenSSL library the event mpm is currently incompatible with - mod_ssl and other input filters.
  • + mod_ssl and other input filters. In these + cases it falls back to the behaviour of the + worker mpm.
  • There are a number of third-party modules available through In typical operation, Apache is started by the root user, and it switches to the user defined by the User directive to serve hits. As is the + module="mod_unixd">User directive to serve hits. As is the case with any command that root executes, you must take care that it is protected from modification by non-root users. Not only must the files themselves be writeable only by root, but so must the directories, and @@ -290,7 +291,7 @@

    Embedded scripting options which run as part of the server itself, such as mod_php, mod_perl, mod_tcl, and mod_python, run under the identity of the server itself - (see the User directive), and + (see the User directive), and therefore scripts executed by these engines potentially can access anything the server user can. Some scripting engines may provide restrictions, but it is better to be safe and assume not.

    @@ -326,15 +327,17 @@

    In the server configuration file, put

    - - <Directory />
    - AllowOverride None
    - </Directory> -
    + +<Directory "/"> + AllowOverride None +</Directory> +

    This prevents the use of .htaccess files in all directories apart from those specifically enabled.

    +

    Note that this setting is the default since Apache 2.3.9.

    +
    @@ -357,33 +360,30 @@ work around this, add the following block to your server's configuration:

    - - <Directory />
    - Order Deny,Allow
    - Deny from all
    - </Directory> -
    + +<Directory "/"> + Require all denied +</Directory> +

    This will forbid default access to filesystem locations. Add appropriate Directory blocks to allow access only in those areas you wish. For example,

    - - <Directory /usr/users/*/public_html>
    - Order Deny,Allow
    - Allow from all
    - </Directory>
    - <Directory /usr/local/httpd>
    - Order Deny,Allow
    - Allow from all
    - </Directory> -
    + +<Directory "/usr/users/*/public_html"> + Require all granted +</Directory> +<Directory "/usr/local/httpd"> + Require all granted +</Directory> +

    Pay particular attention to the interactions of Location and Directory directives; for instance, even - if <Directory /> denies access, a - <Location /> directive might overturn it.

    + if <Directory "/"> denies access, a + <Location "/"> directive might overturn it.

    Also be wary of playing games with the UserDir directive; setting it to @@ -392,9 +392,7 @@ recommend that you include the following line in your server configuration files:

    - - UserDir disabled root - + UserDir disabled root
    @@ -437,13 +435,27 @@ you probably commented out the following in your server configuration file:

    - - <Files ".ht*">
    - Order allow,deny
    - Deny from all
    - </Files> -
    + +<Files ".ht*"> + Require all denied +</Files> + + + + +
    + + Merging of configuration sections + +

    The merging of configuration sections is complicated and sometimes + directive specific. Always test your changes when creating dependencies + on how directives are merged.

    +

    For modules that don't implement any merging logic, such as + mod_access_compat, the behavior in later sections + depends on whether the later section has any directives + from the module. The configuration is inherited until a change is made, + at which point the configuration is replaced and not merged.

    diff --git a/docs/manual/misc/security_tips.xml.fr b/docs/manual/misc/security_tips.xml.fr index 6888701d700..f9e872581ac 100644 --- a/docs/manual/misc/security_tips.xml.fr +++ b/docs/manual/misc/security_tips.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -129,13 +129,13 @@
  • L'utilisation d'un module mpm threadé vous permet de traiter d'avantage de connexions simultanées, ce qui - minimise l'effet des attaques DoS. Dans le futur, le module mpm expérimental + minimise l'effet des attaques DoS. Dans le futur, le module mpm event utilisera un traitement asynchrone afin de ne pas - dédier un thread à chaque connexion. Il est en cours d'étude à - l'heure actuelle et n'est pas encore entièrement implémenté. En - particulier, le mpm event est actuellement incompatible + dédier un thread à chaque connexion. De par la + nature de la bibliothèque OpenSSL, le module mpm event est actuellement incompatible avec le module mod_ssl ainsi que d'autres filtres - en entrée.
  • + en entrée. Dans ces cas, son comportement se ramène à celui + du module mpm worker.
  • Il existe de nombreux modules tiers disponibles à http://modules.apache.org/ qui @@ -153,7 +153,7 @@

    Typiquement, Apache est démarré par l'utilisateur root, puis il devient la propriété de l'utilisateur défini par la directive User afin de répondre aux demandes. Comme + module="mod_unixd">User afin de répondre aux demandes. Comme pour toutes les commandes exécutées par root, vous devez vous assurer qu'elle n'est pas modifiable par les utilisateurs autres que root. Les fichiers eux-mêmes, mais aussi les répertoires ainsi que leurs parents ne @@ -317,7 +317,7 @@ serveur lui-même, comme mod_php, mod_perl, mod_tcl, et mod_python, s'exécutent sous le même utilisateur que le serveur (voir la directive - User), et par conséquent, + User), et par conséquent, les scripts que ces moteurs exécutent peuvent accéder aux mêmes ressources que le serveur. Certains moteurs de scripting peuvent proposer des restrictions, mais pour plus de sûreté, il vaut mieux partir du principe @@ -336,16 +336,18 @@

    Ajoutez dans le fichier de configuration du serveur

    - - <Directory />
    - AllowOverride None
    - </Directory> -
    + +<Directory "/"> + AllowOverride None +</Directory> +

    Ceci interdit l'utilisation des fichiers .htaccess dans tous les répertoires, sauf ceux pour lesquels c'est explicitement autorisé.

    +

    Notez que c'est la configuration par défaut depuis Apache 2.3.9.

    +
    @@ -369,34 +371,31 @@ fichiers. Pour l'éviter, ajoutez le bloc suivant à la configuration de votre serveur :

    - - <Directory />
    - Order Deny,Allow
    - Deny from all
    - </Directory> -
    + +<Directory "/"> + Require all denied +</Directory> +

    ceci va interdire l'accès par défaut à tous les fichiers du système de fichiers. Vous devrez ensuite ajouter les blocs Directory appropriés correspondant aux répertoires auxquels vous voulez autorisez l'accès. Par exemple,

    - - <Directory /usr/users/*/public_html>
    - Order Deny,Allow
    - Allow from all
    - </Directory>
    - <Directory /usr/local/httpd>
    - Order Deny,Allow
    - Allow from all
    - </Directory> -
    + +<Directory "/usr/users/*/public_html"> + Require all granted +</Directory> +<Directory "/usr/local/httpd"> + Require all granted +</Directory> +

    Portez une attention particulière aux interactions entre les directives Location et Directory ; par exemple, si une - directive <Directory /> interdit un accès, une - directive <Location /> pourra passer outre.

    + directive <Directory ""/> interdit un accès, une + directive <Location "/"> pourra passer outre.

    De même, soyez méfiant en jouant avec la directive UserDir ; la positionner à @@ -405,9 +404,7 @@ fortement d'inclure la ligne suivante dans le fichier de configuration de votre serveur :

    - - UserDir disabled root - + UserDir disabled root
    @@ -453,13 +450,29 @@ qui signifie que vous avez probablement mis en commentaire ce qui suit dans le fichier de configuration de votre serveur :

    - - <Files ".ht*">
    - Order allow,deny
    - Deny from all
    - </Files> -
    + +<Files ".ht*"> + Require all denied +</Files> + +
    + + Fusion des sections de configuration + +

    La fusion des sections de configuration est complexe et dépend + souvent des directives utilisées. Vous devez systématiquement tester + vos modifications pour vérifier la manière dont les directives sont + fusionnées.

    + +

    Concernant les modules qui n'implémentent aucune logique de + fusion, comme mod_access_compat, le + comportement des sections suivantes est tributaire de la présence + dans ces dernières de directives appartenant à ces modules. La + configuration est héritée jusqu'à ce qu'une modification soit + effectuée ; à ce moment, la configuration est remplacée et + non fusionnée.

    +
    diff --git a/docs/manual/misc/security_tips.xml.ko b/docs/manual/misc/security_tips.xml.ko index 85c5fa9017c..0faf8f5bb94 100644 --- a/docs/manual/misc/security_tips.xml.ko +++ b/docs/manual/misc/security_tips.xml.ko @@ -1,7 +1,7 @@ - + + -core - Apache HTTP Server +core - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Apache-Kernfunktionen

    @@ -45,7 +50,10 @@ Servers
  • Syntax:AllowOverride All|None|Direktiven-Typ [Direktiven-Typ] ...
    Voreinstellung:AllowOverride All
    Voreinstellung:AllowOverride None (2.3.9 und spter), AllowOverride All (2.3.8 und frher)
    Kontext:Verzeichnis
    Status:Core
    Modul:core
    + + + + + + + + +
    Beschreibung:Enables passing HTTP authorization headers to scripts as CGI +variables
    Syntax:CGIPassAuth On|Off
    Voreinstellung:CGIPassAuth Off
    Kontext:Verzeichnis, .htaccess
    AllowOverride:AuthConfig
    Status:Core
    Modul:core
    Kompatibilitt:Available in Apache HTTP Server 2.4.13 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top
    +

    CGIVar-Direktive

    + + + + + + + + +
    Beschreibung:Controls how some CGI variables are set
    Syntax:CGIVar variable rule
    Kontext:Verzeichnis, .htaccess
    AllowOverride:FileInfo
    Status:Core
    Modul:core
    Kompatibilitt:Available in Apache HTTP Server 2.4.21 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top

    ContentDigest-Direktive

    Modulen. SSI-Dokumente, CGI-Skript-Ausgaben und Byte-Range-Antworten besitzen diesen Header beispielsweise nicht.

    + +
    top
    +
    Beschreibung:Aktiviert die Generierung von Content-MD5 @@ -559,6 +605,25 @@ HTTP-Response-Headern
    + + + + + + + +
    Beschreibung:Base directory for the server run-time files
    Syntax:DefaultRuntimeDir directory-path
    Voreinstellung:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    Kontext:Serverkonfiguration
    Status:Core
    Modul:core
    Kompatibilitt:Available in Apache 2.4.2 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    Siehe auch

    +
    top

    DefaultType-Direktive

    @@ -1202,7 +1267,6 @@ Fehlermeldungen
    Kontext:Serverkonfiguration, Virtual Host
    Status:Core
    Modul:core
    Kompatibilitt:Available in Apache httpd 2.3.9 and later

    Die Dokumentation zu dieser Direktive wurde noch nicht bersetzt. Bitte schauen Sie in die englische Version.

    Siehe auch

    @@ -1473,6 +1537,20 @@ angegebenen MIME-Content-Type
    + + + + + + + +
    Beschreibung:Modify restrictions on HTTP Request Messages
    Syntax:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
    Voreinstellung:HttpProtocolOptions Strict LenientMethods Allow0.9
    Kontext:Serverkonfiguration, Virtual Host
    Status:Core
    Modul:core
    Kompatibilitt:2.2.32 or 2.4.24 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top

    <If>-Direktive

    top
    +
    Beschreibung:Contains directives that apply only if a condition is @@ -1670,6 +1748,24 @@ Server-Konfigurationsdatei ein
    + + + + + + +
    Beschreibung:Includes other configuration files from within +the server configuration files
    Syntax:IncludeOptional file-path|directory-path|wildcard
    Kontext:Serverkonfiguration, Virtual Host, Verzeichnis
    Status:Core
    Modul:core
    Kompatibilitt:Available in 2.3.6 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    Siehe auch

    + +
    +
    top

    KeepAlive-Direktive

    @@ -1776,7 +1872,7 @@ bestimmte HTTP-Methoden
    Wenn es um Zugriffsbeschrnkungen geht, sollte - ein <LimitExcept>-Container sollte immmer einem <Limit>-Container vorgezogen + ein <LimitExcept>-Container sollte immer einem <Limit>-Container vorgezogen werden, da <LimitExcept> einen Schutz gegen beliebige Methoden bietet.
    @@ -2390,6 +2486,19 @@ resource noch nicht bersetzt. Bitte schauen Sie in die englische Version.

    top
    +
    Beschreibung:Aktiviert persistente HTTP-Verbindungen
    + + + + + + + +
    Beschreibung:Determines whether trailers are merged into headers
    Syntax:MergeTrailers [on|off]
    Voreinstellung:MergeTrailers off
    Kontext:Serverkonfiguration, Virtual Host
    Status:Core
    Modul:core
    Kompatibilitt:2.4.11 and later

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top

    Mutex-Direktive

    +On Windows, from Apache 2.3.3 and later.
    Beschreibung:Configures mutex mechanism and lock file directory for all @@ -2642,16 +2751,77 @@ bestimmten Verzeichnis verf
    Status:Core
    Modul:core
    Kompatibilitt:Available in Apache 2.1.5 and later. -On Windows from Apache 2.3.3 and later.

    Die Dokumentation zu dieser Direktive wurde noch nicht bersetzt. Bitte schauen Sie in die englische Version.

    Siehe auch

    top
    +

    Protocols-Direktive

    + + + + + + + + +
    Beschreibung:Protocols available for a server/virtual host
    Syntax:Protocols protocol ...
    Voreinstellung:Protocols http/1.1
    Kontext:Serverkonfiguration, Virtual Host
    Status:Core
    Modul:core
    Kompatibilitt:Only available from Apache 2.4.17 and later.

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    Siehe auch

    + +
    +
    top
    +

    ProtocolsHonorOrder-Direktive

    + + + + + + + + +
    Beschreibung:Determines if order of Protocols determines precedence during negotiation
    Syntax:ProtocolsHonorOrder On|Off
    Voreinstellung:ProtocolsHonorOrder On
    Kontext:Serverkonfiguration, Virtual Host
    Status:Core
    Modul:core
    Kompatibilitt:Only available from Apache 2.4.17 and later.

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    Siehe auch

    + +
    +
    top
    +

    QualifyRedirectURL-Direktive

    + + + + + + + + + +
    Beschreibung:Controls whether the REDIRECT_URL environment variable is + fully qualified
    Syntax:QualifyRedirectURL ON|OFF
    Voreinstellung:QualifyRedirectURL OFF
    Kontext:Serverkonfiguration, Virtual Host, Verzeichnis
    AllowOverride:FileInfo
    Status:Core
    Modul:core
    Kompatibilitt:Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL ON' was configured.

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top
    +

    RegisterHttpMethod-Direktive

    + + + + + + +
    Beschreibung:Register non-standard HTTP methods
    Syntax:RegisterHttpMethod method [method [...]]
    Kontext:Serverkonfiguration
    Status:Core
    Modul:core

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top

    RLimitCPU-Direktive

     fr  |  ja  |  tr 

    - +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 68ae4272598..513efa99482 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -1,23 +1,28 @@ - -core - Apache HTTP Server +core - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules -
    Beschreibung:Begrenzt den CPU-Verbrauch von Prozessen, die von @@ -3554,7 +3724,28 @@ IP-Adressen angewendet werden
    Context:server config
    Status:Core
    Module:core
    Compatibility:Available in Apache httpd 2.1.5 and later. -On Windows from Apache httpd 2.3.3 and later.

    This directive enables operating system specific optimizations for a - listening socket by the Protocoltype. + listening socket by the Protocol type. The basic premise is for the kernel to not send a socket to the server process until either data is received or an entire HTTP Request is buffered. Only @@ -135,57 +150,50 @@ On Windows from Apache httpd 2.3.3 and later.

    Override:FileInfo
    Status:Core
    Module:core
    Compatibility:Available in Apache httpd 2.0.30 and later

    This directive controls whether requests that contain trailing @@ -256,15 +279,12 @@ On Windows from Apache httpd 2.3.3 and later.

    Status:Core
    Module:core
    -

    While processing a request the server looks for +

    While processing a request, the server looks for the first existing configuration file from this list of names in every directory of the path to the document, if distributed configuration files are enabled for that directory. For example:

    -

    - AccessFileName .acl -

    +
    AccessFileName .acl
    + -

    before returning the document +

    Before returning the document /usr/local/web/index.html, the server will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl - for directives, unless they have been disabled with

    + for directives unless they have been disabled with:

    + +
    <Directory "/">
    +    AllowOverride None
    +</Directory>
    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory> -

    See also

      @@ -335,9 +351,8 @@ content-type is text/plain or text/html
    Context:server config, virtual host
    Status:Core
    Module:core
    Compatibility:Available in Apache httpd 2.0.46 and later. +
    Compatibility: NoDecode option available in 2.3.12 and later.

    The AllowEncodedSlashes directive allows URLs which contain encoded path separators (%2F for / - and additionally %5C for \ on according systems) + and additionally %5C for \ on accordant systems) to be used in the path info.

    With the default value, Off, such URLs are refused @@ -409,7 +424,7 @@ NoDecode option available in 2.3.12 and later.

    Module:core

    When the server finds an .htaccess file (as - specified by AccessFileName) + specified by AccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.

    @@ -421,7 +436,7 @@ NoDecode option available in 2.3.12 and later.

    When this directive is set to None and AllowOverrideList is set to - None .htaccess files are + None, .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

    @@ -437,7 +452,7 @@ NoDecode option available in 2.3.12 and later.
    - Allow use of the authorization directives (AuthDBMGroupFile, + Allow use of the authorization directives (AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, @@ -455,7 +470,8 @@ NoDecode option available in 2.3.12 and later. SetOutputFilter, and mod_mime Add* and Remove* directives), document meta data (Header, RequestHeader, SetEnvIf, SetEnvIfNoCase, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, CookieTracking, CookieName), - mod_rewrite directives RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule) and + mod_rewrite directives (RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule), + mod_alias directives (Redirect, RedirectTemp, RedirectPermanent, RedirectMatch), and Action from mod_actions.
    @@ -467,13 +483,37 @@ NoDecode option available in 2.3.12 and later. (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, - DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, + DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, etc.).
    Limit
    - Allow use of the directives controlling host access (Allow, Deny and Order).
    + Allow use of the directives controlling host access (Allow, Deny and Order). + +
    Nonfatal=[Override|Unknown|All]
    + +
    + Allow use of AllowOverride option to treat syntax errors in + .htaccess as nonfatal. Instead of causing an Internal Server + Error, disallowed or unrecognised directives will be ignored + and a warning logged: +
      +
    • Nonfatal=Override treats directives + forbidden by AllowOverride as nonfatal.
    • +
    • Nonfatal=Unknown treats unknown directives + as nonfatal. This covers typos and directives implemented + by a module that's not present.
    • +
    • Nonfatal=All treats both the above as nonfatal.
    • +
    +

    Note that a syntax error in a valid directive will still cause + an internal server error.

    +

    Security

    + Nonfatal errors may have security implications for .htaccess users. + For example, if AllowOverride disallows AuthConfig, users' + configuration designed to restrict access to a site will be disabled. +
    +
    Options[=Option,...]
    @@ -481,8 +521,8 @@ NoDecode option available in 2.3.12 and later. Allow use of the directives controlling specific directory features (Options and XBitHack). - An equal sign may be given followed by a comma (but no spaces) - separated lists of options that may be set using the Options command. + An equal sign may be given followed by a comma-separated list, without + spaces, of options that may be set using the Options command.

    Implicit disabling of Options

    Even though the list of options that may be used in .htaccess files @@ -491,22 +531,25 @@ NoDecode option available in 2.3.12 and later. syntax. In other words, this mechanism cannot force a specific option to remain set while allowing any others to be set.

    + +

    + AllowOverride Options=Indexes,MultiViews +

    Example:

    -

    - AllowOverride AuthConfig Indexes -

    +
    AllowOverride AuthConfig Indexes
    -

    In the example above all directives that are neither in the group + +

    In the example above, all directives that are neither in the group AuthConfig nor Indexes cause an internal server error.

    For security and performance reasons, do not set AllowOverride to anything other than None - in your <Directory /> block. Instead, find (or + in your <Directory "/"> block. Instead, find (or create) the <Directory> block that refers to the directory where you're actually planning to place a .htaccess file.

    @@ -533,7 +576,7 @@ NoDecode option available in 2.3.12 and later. Module:core

    When the server finds an .htaccess file (as - specified by AccessFileName) + specified by AccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.

    @@ -551,26 +594,24 @@ NoDecode option available in 2.3.12 and later.

    Example:

    -

    - AllowOverride None
    - AllowOverrideList Redirect RedirectMatch -

    +
    AllowOverride None
    +AllowOverrideList Redirect RedirectMatch
    -

    In the example above only the Redirect and + +

    In the example above, only the Redirect and RedirectMatch directives are allowed. All others will cause an internal server error.

    Example:

    -

    - AllowOverride AuthConfig
    - AllowOverrideList CookieTracking CookieName -

    +
    AllowOverride AuthConfig
    +AllowOverrideList CookieTracking CookieName
    -

    In the example above AllowOverride + +

    In the example above, AllowOverride grants permission to the AuthConfig directive grouping and AllowOverrideList grants - permission to only two directves from the FileInfo directive + permission to only two directives from the FileInfo directive grouping. All others will cause an internal server error.

    See also

    @@ -599,6 +640,69 @@ scripts cause all CGI script files with a .foo extension to be passed to the FOO interpreter.

    +
    +
    top
    +

    CGIPassAuth Directive

    + + + + + + + + + +
    Description:Enables passing HTTP authorization headers to scripts as CGI +variables
    Syntax:CGIPassAuth On|Off
    Default:CGIPassAuth Off
    Context:directory, .htaccess
    Override:AuthConfig
    Status:Core
    Module:core
    Compatibility:Available in Apache HTTP Server 2.4.13 and later
    +

    CGIPassAuth allows scripts access to HTTP + authorization headers such as Authorization, which is + required for scripts that implement HTTP Basic authentication. + Normally these HTTP headers are hidden from scripts. This is to disallow + scripts from seeing user ids and passwords used to access the server when + HTTP Basic authentication is enabled in the web server. This directive + should be used when scripts are allowed to implement HTTP Basic + authentication.

    + +

    This directive can be used instead of the compile-time setting + SECURITY_HOLE_PASS_AUTHORIZATION which has been available + in previous versions of Apache HTTP Server.

    + +

    The setting is respected by any modules which use + ap_add_common_vars(), such as mod_cgi, + mod_cgid, mod_proxy_fcgi, + mod_proxy_scgi, and so on. Notably, it affects + modules which don't handle the request in the usual sense but + still use this API; examples of this are mod_include + and mod_ext_filter. Third-party modules that don't + use ap_add_common_vars() may choose to respect the setting + as well.

    + +
    +
    top
    +

    CGIVar Directive

    + + + + + + + + +
    Description:Controls how some CGI variables are set
    Syntax:CGIVar variable rule
    Context:directory, .htaccess
    Override:FileInfo
    Status:Core
    Module:core
    Compatibility:Available in Apache HTTP Server 2.4.21 and later
    +

    This directive controls how some CGI variables are set.

    + +

    REQUEST_URI rules:

    +
    +
    original-uri (default)
    +
    The value is taken from the original request line, and will not + reflect internal redirects or subrequests which change the requested + resource.
    +
    current-uri
    +
    The value reflects the resource currently being processed, + which may be different than the original request from the client + due to internal redirects or subrequests.
    +
    +
    top

    ContentDigest Directive

    @@ -639,6 +743,42 @@ headers SSI documents, output from CGI scripts, and byte range responses do not have this header.

    +
    +
    top
    +

    DefaultRuntimeDir Directive

    + + + + + + + + +
    Description:Base directory for the server run-time files
    Syntax:DefaultRuntimeDir directory-path
    Default:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    Context:server config
    Status:Core
    Module:core
    Compatibility:Available in Apache 2.4.2 and later
    +

    The DefaultRuntimeDir directive sets the + directory in which the server will create various run-time files + (shared memory, locks, etc.). If set as a relative path, the full path + will be relative to ServerRoot.

    + +

    Example

    +
    DefaultRuntimeDir scratch/
    + + +

    The default location of DefaultRuntimeDir may be + modified by changing the DEFAULT_REL_RUNTIMEDIR #define + at build time.

    + +

    Note: ServerRoot should be specified before this + directive is used. Otherwise, the default value of ServerRoot + would be used to set the base directory.

    + + +

    See also

    +
    top

    DefaultType Directive

    @@ -660,9 +800,8 @@ which no other media type configuration could be found. of configuration files, it may be specified with the value none, meaning no default media type. For example:

    -

    - DefaultType None -

    +
    DefaultType None
    +

    DefaultType None is only available in httpd-2.2.7 and later.

    @@ -697,19 +836,27 @@ which no other media type configuration could be found. the ${VAR} syntax. The variable is always globally defined and not limited to the scope of the surrounding config section.

    -

    - <IfDefine TEST>
    -   Define servername test.example.com
    - </IfDefine>
    - <IfDefine !TEST>
    -   Define servername www.example.com
    -   Define SSL
    - </IfDefine>
    -

    +
    <IfDefine TEST>
    +  Define servername test.example.com
    +</IfDefine>
    +<IfDefine !TEST>
    +  Define servername www.example.com
    +  Define SSL
    +</IfDefine>
    +
    +DocumentRoot "/var/www/${servername}/htdocs"
    +

    Variable names may not contain colon ":" characters, to avoid clashes with RewriteMap's syntax.

    +

    While this directive is supported in virtual host and directory context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing configuration section (matching or not). + Support for the other configuration sections was erroneously permitted by the initial + implementation of this directive and is only preserved (with unintuitive + results) to maintain backward compatibility.

    +
    top

    <Directory> Directive

    @@ -733,17 +880,18 @@ named file-system directory, sub-directories, and their contents. any single character, and * matches any sequences of characters. You may also use [] character ranges. None of the wildcards match a `/' character, so <Directory - /*/public_html> will not match + "/*/public_html">
    will not match /home/user/public_html, but <Directory - /home/*/public_html> will match. Example:

    + "/home/*/public_html">
    will match. Example:

    -

    - <Directory /usr/local/httpd/htdocs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory> -

    +
    <Directory "/usr/local/httpd/htdocs">
    +  Options Indexes FollowSymLinks
    +</Directory>
    + + +

    Directory paths may be quoted, if you like, however, it + must be quoted if the path contains spaces. This is because a + space would otherwise indicate the end of an argument.

    Be careful with the directory-path arguments: @@ -758,9 +906,10 @@ named file-system directory, sub-directories, and their contents. expressions can also be used, with the addition of the ~ character. For example:

    -

    - <Directory ~ "^/www/.*/[0-9]{3}"> -

    +
    <Directory ~ "^/www/[0-9]{3}">
    +
    +</Directory>
    +

    would match directories in /www/ that consisted of three numbers.

    @@ -771,19 +920,14 @@ named file-system directory, sub-directories, and their contents. first, interspersed with the directives from the .htaccess files. For example, with

    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory>
    -
    - <Directory /home>
    - - AllowOverride FileInfo
    -
    - </Directory> -

    +
    <Directory "/">
    +  AllowOverride None
    +</Directory>
    +
    +<Directory "/home">
    +  AllowOverride FileInfo
    +</Directory>
    +

    for access to the document /home/web/dir/doc.html the steps are:

    @@ -805,13 +949,10 @@ named file-system directory, sub-directories, and their contents. expressions are tested in the order they appeared in the configuration file. For example, with

    -

    - <Directory ~ abc$>
    - - # ... directives here ...
    -
    - </Directory> -

    +
    <Directory ~ "abc$">
    +  # ... directives here ...
    +</Directory>
    +

    the regular expression section won't be considered until after all normal <Directory>s and @@ -821,18 +962,15 @@ named file-system directory, sub-directories, and their contents. be applied.

    Note that the default access for - <Directory /> is to permit all access. + <Directory "/"> is to permit all access. This means that Apache httpd will serve any file mapped from an URL. It is recommended that you change this with a block such as

    -

    - <Directory />
    - - Require all denied
    -
    - </Directory> -

    +
    <Directory "/">
    +  Require all denied
    +</Directory>
    +

    and then override this for directories you want accessible. See the Security Tips page for more @@ -868,12 +1006,13 @@ the contents of file-system directories matching a regular expression. However, it takes as an argument a regular expression. For example:

    -

    - <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> -

    +
    <DirectoryMatch "^/www/(.+/)?[0-9]{3}/">
    +    # ...
    +</DirectoryMatch>
    -

    would match directories in /www/ that consisted of three - numbers.

    + +

    matches directories in /www/ (or any subdirectory thereof) + that consist of three numbers.

    Compatability

    Prior to 2.3.9, this directive implicitly applied to sub-directories @@ -889,6 +1028,18 @@ the contents of file-system directories matching a regular expression. end of line ($) must be written with care.
    +

    From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of paths to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

    + +
    <DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)">
    +    Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</DirectoryMatch>
    + +

    See also

    • <Directory> for @@ -905,7 +1056,7 @@ sections are combined when a request is received
    • Description:Directory that forms the main document tree visible from the web Syntax:DocumentRoot directory-path -Default:DocumentRoot /usr/local/apache/htdocs +Default:DocumentRoot "/usr/local/apache/htdocs" Context:server config, virtual host Status:Core Module:core @@ -915,9 +1066,8 @@ from the web path from the requested URL to the document root to make the path to the document. Example:

      -

      - DocumentRoot /usr/web -

      +
      DocumentRoot "/usr/web"
      +

      then an access to http://my.example.com/index.html refers to @@ -953,14 +1103,13 @@ satisfied by a request at runtime in the same scope has not been applied. For example: In

      -

      - <If "-z req('Host')">
      - ...
      - </If>
      - <Else>
      - ...
      - </Else>
      -

      +
      <If "-z req('Host')">
      +  # ...
      +</If>
      +<Else>
      +  # ...
      +</Else>
      +

      The <If> would match HTTP/1.0 requests without a Host: header and the @@ -1000,17 +1149,16 @@ satisfied <ElseIf> section in the same scope has not been applied. For example: In

      -

      - <If "-R '10.1.0.0/16'">
      - ...
      - </If>
      - <ElseIf "-R '10.0.0.0/8'">
      - ...
      - </ElseIf>
      - <Else>
      - ...
      - </Else>
      -

      +
      <If "-R '10.1.0.0/16'">
      +  #...
      +</If>
      +<ElseIf "-R '10.0.0.0/8'">
      +  #...
      +</ElseIf>
      +<Else>
      +  #...
      +</Else>
      +

      The <ElseIf> would match if the remote address of a request belongs to the subnet 10.0.0.0/8 but @@ -1065,20 +1213,16 @@ for a complete reference and more examples.

      For server configurations that are vulnerable to these problems, you should disable memory-mapping of delivered files by specifying:

      -

      - EnableMMAP Off -

      +
      EnableMMAP Off
      +

      For NFS mounted files, this feature may be disabled explicitly for the offending files by specifying:

      -

      - <Directory "/path-to-nfs-files"> - - EnableMMAP Off - - </Directory> -

      +
      <Directory "/path-to-nfs-files">
      +  EnableMMAP Off
      +</Directory>
      +
    top
    @@ -1091,7 +1235,7 @@ for a complete reference and more examples. Override:FileInfo Status:Core Module:core -Compatibility:Available in version 2.0.44 and later. Default changed to Off in +Compatibility:Default changed to Off in version 2.3.9.

    This directive controls whether httpd may use the @@ -1123,20 +1267,16 @@ version 2.3.9.

    For server configurations that are not vulnerable to these problems, you may enable this feature by specifying:

    -

    - EnableSendfile On -

    +
    EnableSendfile On
    +

    For network mounted files, this feature may be disabled explicitly for the offending files by specifying:

    -

    - <Directory "/path-to-nfs-files"> - - EnableSendfile Off - - </Directory> -

    +
    <Directory "/path-to-nfs-files">
    +  EnableSendfile Off
    +</Directory>
    +

    Please note that the per-directory and .htaccess configuration of EnableSendfile is not supported by mod_cache_disk. @@ -1160,24 +1300,24 @@ version 2.3.9. configuration parsing. The typical use is for reporting required modules which are missing from the configuration.

    -

    Example

    - # ensure that mod_include is loaded
    - <IfModule !include_module>
    - Error mod_include is required by mod_foo. Load it with LoadModule.
    - </IfModule>
    -
    - # ensure that exactly one of SSL,NOSSL is defined
    - <IfDefine SSL>
    - <IfDefine NOSSL>
    - Error Both SSL and NOSSL are defined. Define only one of them.
    - </IfDefine>
    - </IfDefine>
    - <IfDefine !SSL>
    - <IfDefine !NOSSL>
    - Error Either SSL or NOSSL must be defined.
    - </IfDefine>
    - </IfDefine>
    -

    +
    # Example
    +# ensure that mod_include is loaded
    +<IfModule !include_module>
    +  Error "mod_include is required by mod_foo.  Load it with LoadModule."
    +</IfModule>
    +
    +# ensure that exactly one of SSL,NOSSL is defined
    +<IfDefine SSL>
    +<IfDefine NOSSL>
    +  Error "Both SSL and NOSSL are defined.  Define only one of them."
    +</IfDefine>
    +</IfDefine>
    +<IfDefine !SSL>
    +<IfDefine !NOSSL>
    +  Error "Either SSL or NOSSL must be defined."
    +</IfDefine>
    +</IfDefine>
    +
    @@ -1200,7 +1340,7 @@ in case of an error
  • output a customized message
  • -
  • redirect to a local URL-path to handle the +
  • internally redirect to a local URL-path to handle the problem/error
  • redirect to an external URL to handle the @@ -1213,18 +1353,23 @@ in case of an error or a message. Apache httpd will sometimes offer additional information regarding the problem/error.

    +

    From 2.4.13, expression syntax can be + used inside the directive to produce dynamic strings and URLs.

    +

    URLs can begin with a slash (/) for local web-paths (relative to the DocumentRoot), or be a full URL which the client can resolve. Alternatively, a message - can be provided to be displayed by the browser. Examples:

    + can be provided to be displayed by the browser. Note that deciding + whether the parameter is an URL, a path or a message is performed + before any expression is parsed. Examples:

    + +
    ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi
    +ErrorDocument 404 /errors/bad_urls.php
    +ErrorDocument 401 /subscription_info.html
    +ErrorDocument 403 "Sorry, can't allow you access today"
    +ErrorDocument 403 Forbidden!
    +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}
    -

    - ErrorDocument 500 http://foo.example.com/cgi-bin/tester
    - ErrorDocument 404 /cgi-bin/bad_urls.pl
    - ErrorDocument 401 /subscription_info.html
    - ErrorDocument 403 "Sorry can't allow you access today"
    - ErrorDocument 403 Forbidden! -

    Additionally, the special value default can be used to specify Apache httpd's simple hardcoded message. While not required @@ -1232,14 +1377,12 @@ in case of an error Apache httpd's simple hardcoded message for configurations that would otherwise inherit an existing ErrorDocument.

    -

    - ErrorDocument 404 /cgi-bin/bad_urls.pl

    - <Directory /web/docs>
    - - ErrorDocument 404 default
    -
    - </Directory> -

    +
    ErrorDocument 404 /cgi-bin/bad_urls.pl
    +
    +<Directory "/web/docs">
    +  ErrorDocument 404 default
    +</Directory>
    +

    Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as @@ -1254,7 +1397,7 @@ in case of an error URL in an ErrorDocument 401, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, if you use an - ErrorDocument 401 directive then it must refer to a local + ErrorDocument 401 directive, then it must refer to a local document.

    Microsoft Internet Explorer (MSIE) will by default ignore @@ -1265,7 +1408,7 @@ in case of an error error rather than masking it. More information is available in Microsoft Knowledge Base article Q294807.

    -

    Although most error messages can be overriden, there are certain +

    Although most error messages can be overridden, there are certain circumstances where the internal messages are used regardless of the setting of ErrorDocument. In particular, if a malformed request is detected, normal request processing @@ -1299,17 +1442,15 @@ in case of an error the file-path is not absolute then it is assumed to be relative to the ServerRoot.

    -

    Example

    - ErrorLog /var/log/httpd/error_log -

    +
    ErrorLog "/var/log/httpd/error_log"
    +

    If the file-path begins with a pipe character "|" then it is assumed to be a command to spawn to handle the error log.

    -

    Example

    - ErrorLog "|/usr/local/bin/httpd_errors" -

    +
    ErrorLog "|/usr/local/bin/httpd_errors"
    +

    See the notes on piped logs for more information.

    @@ -1323,9 +1464,11 @@ in case of an error in individual virtual hosts, the final facility specified affects the entire server.

    -

    Example

    - ErrorLog syslog:user -

    +
    ErrorLog syslog:user
    + + +

    Additional modules can provide their own ErrorLog providers. The syntax + is similar to the syslog example above.

    SECURITY: See the security tips document for details on why your security could be compromised @@ -1352,15 +1495,14 @@ in case of an error Context:server config, virtual host Status:Core Module:core -Compatibility:Available in Apache httpd 2.3.9 and later

    ErrorLogFormat allows to specify what supplementary information is logged in the error log in addition to the actual log message.

    -

    Simple example

    - ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" -

    +
    #Simple example
    +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
    +

    Specifying connection or request as first parameter allows to specify additional formats, causing additional @@ -1374,15 +1516,15 @@ in case of an error example, the Referer header is only present if the log message is associated to a request and the log message happens at a time when the Referer header has already been read from the client. If no output is - produced, the default behavior is to delete everything from the preceeding + produced, the default behavior is to delete everything from the preceding space character to the next space character. This means the log line is implicitly divided into fields on non-whitespace to whitespace transitions. If a format string item does not produce output, the whole field is - ommitted. For example, if the remote address %a in the log + omitted. For example, if the remote address %a in the log format [%t] [%l] [%a] %M  is not available, the surrounding brackets are not logged either. Space characters can be escaped with a backslash to prevent them from delimiting a field. The combination '% ' - (percent space) is a zero-witdh field delimiter that does not produce any + (percent space) is a zero-width field delimiter that does not produce any output.

    The above behavior can be changed by adding modifiers to the format @@ -1390,7 +1532,7 @@ in case of an error respective item does not produce any output. In once-per-connection/request formats, it is also possible to use the + (plus) modifier. If an item with the plus modifier does not produce any output, the whole line is - ommitted.

    + omitted.

    A number as modifier can be used to assign a log severity level to a format item. The item will only be logged if the severity of the log @@ -1423,57 +1565,60 @@ in case of an error %% The percent sign %a - Remote IP-address and port -%A + Client IP address and port of the request +%{c}a + Underlying peer IP address and port of the connection (see the + mod_remoteip module) +%A Local IP-address and port -%{name}e +%{name}e Request environment variable name -%E +%E APR/OS error status code and string -%F +%F Source file name and line number of the log call -%{name}i +%{name}i Request header name -%k +%k Number of keep-alive requests on this connection -%l +%l Loglevel of the message -%L +%L Log ID of the request -%{c}L +%{c}L Log ID of the connection -%{C}L +%{C}L Log ID of the connection if used in connection scope, empty otherwise -%m +%m Name of the module logging the message -%M +%M The actual log message -%{name}n +%{name}n Request note name -%P +%P Process ID of current process -%T +%T Thread ID of current thread -%{g}T +%{g}T System unique thread ID of current thread (the same ID as displayed by e.g. top; currently Linux only) -%t +%t The current time -%{u}t +%{u}t The current time including micro-seconds -%{cu}t +%{cu}t The current time in compact ISO 8601 format, including micro-seconds -%v +%v The canonical ServerName of the current server. -%V +%V The server name of the server serving the request according to the UseCanonicalName setting. - (backslash space) + (backslash space) Non-field delimiting space - (percent space) + (percent space) Field delimiter (no output) @@ -1481,14 +1626,13 @@ in case of an error or request. This can be used to correlate which log lines belong to the same connection or request, which request happens on which connection. A %L format string is also available in - mod_log_config, to allow to correlate access log entries + mod_log_config to allow to correlate access log entries with error log lines. If mod_unique_id is loaded, its unique id will be used as log ID for requests.

    -

    Example (default format)

    - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    #Example (default format for threaded MPMs)
    +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%,\referer\%{Referer}i"
    +

    This would result in error messages such as:

    @@ -1496,21 +1640,20 @@ in case of an error [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico

    -

    Notice that, as discussed above, some fields are ommitted +

    Notice that, as discussed above, some fields are omitted entirely because they are not defined.

    -

    Example (similar to the 2.2.x format)

    - ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    #Example (similar to the 2.2.x format)
    +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%,\referer\%{Referer}i"
    + + +
    #Advanced example with request/connection log IDs
    +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    -

    Advanced example with request/connection log IDs

    - ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    - ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    - ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    -

    See also

    @@ -1532,12 +1675,12 @@ request Module:core

    This option tracks additional data per worker about the - currently executing request, and a utilization summary; you - can see these variables during runtime by configuring + currently executing request and creates a utilization summary. + You can see these variables during runtime by configuring mod_status. Note that other modules may rely on this scoreboard.

    -

    This setting applies to the entire server, and cannot be +

    This setting applies to the entire server and cannot be enabled or disabled on a virtualhost-by-virtualhost basis. The collection of extended status information can slow down the server. Also note that this setting cannot be changed @@ -1549,7 +1692,7 @@ request third party modules may do the same. Such modules rely on collecting detailed information about the state of all workers. The default is changed by mod_status beginning - with version 2.3.6; the previous default was always Off.

    + with version 2.3.6. The previous default was always Off.

    @@ -1587,7 +1730,8 @@ earlier.
    The number of bytes in the file will be included
    All
    All available fields will be used. This is equivalent to: -

    FileETag INode MTime Size

    +
    FileETag INode MTime Size
    +
    None
    If a document is file-based, no ETag field will be included in the response
    @@ -1614,7 +1758,7 @@ earlier. changed via FileETag.

    Server Side Includes

    - An ETag is not generated for responses parsed by mod_include, + An ETag is not generated for responses parsed by mod_include since the response entity can change without a change of the INode, MTime, or Size of the static file with embedded SSI directives.
    @@ -1649,14 +1793,23 @@ filenames

    The filename argument should include a filename, or a wild-card string, where ? matches any single character, - and * matches any sequences of characters. - Regular expressions + and * matches any sequences of characters.

    +
    <Files "cat.html">
    +    # Insert stuff that applies to cat.html here
    +</Files>
    +
    +<Files "?at.*">
    +    # This would apply to cat.html, bat.html, hat.php and so on.
    +</Files>
    + +

    Regular expressions can also be used, with the addition of the ~ character. For example:

    -

    - <Files ~ "\.(gif|jpe?g|png)$"> -

    +
    <Files ~ "\.(gif|jpe?g|png)$">
    +    #...
    +</Files>
    +

    would match most common Internet graphics formats. <FilesMatch> is preferred, however.

    @@ -1690,12 +1843,29 @@ filenames does. However, it accepts a regular expression. For example:

    -

    - <FilesMatch "\.(gif|jpe?g|png)$"> -

    +
    <FilesMatch ".+\.(gif|jpe?g|png)$">
    +    # ...
    +</FilesMatch>
    +

    would match most common Internet graphics formats.

    +
    The .+ at the start of the regex ensures that + files named .png, or .gif, for example, + are not matched.
    + +

    From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of files to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

    + +
    <FilesMatch "^(?<sitename>[^/]+)">
    +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</FilesMatch>
    + +

    See also

    • How <Directory>, <Location> @@ -1713,7 +1883,6 @@ media type in the HTTP Content-Type header field Override:FileInfo Status:Core Module:core -Compatibility:Moved to the core in Apache httpd 2.0

      When placed into an .htaccess file or a <Directory>, or @@ -1725,9 +1894,8 @@ media type in the HTTP Content-Type header field GIF files, but did not want to label them all with .gif, you might want to use:

      -

      - ForceType image/gif -

      +
      ForceType image/gif
      +

      Note that this directive overrides other indirect media type associations defined in mime.types or via the @@ -1737,27 +1905,36 @@ media type in the HTTP Content-Type header field ForceType settings by using the value of None:

      -

      - # force all files to be image/gif:
      - <Location /images>
      - - ForceType image/gif
      -
      - </Location>
      -
      - # but normal mime-type associations here:
      - <Location /images/mixed>
      - - ForceType None
      -
      - </Location> -

      +
      # force all files to be image/gif:
      +<Location "/images">
      +  ForceType image/gif
      +</Location>
      +
      +# but normal mime-type associations here:
      +<Location "/images/mixed">
      +  ForceType None
      +</Location>
      +

      This directive primarily overrides the content types generated for static files served out of the filesystem. For resources other than static files, where the generator of the response typically specifies a Content-Type, this directive has no effect.

      +

      Note

      +

      When explicit directives such as + SetHandler or + AddHandler do not apply + to the current request, the internal handler name normally set by those + directives is set to match the content type specified by this directive. + This is a historical behavior that some third-party modules + (such as mod_php) may use "magic" content types used only to signal the + module to take responsibility for the matching request. Configurations + that rely on such "magic" types should be avoided by the use of + SetHandler or + AddHandler.

      +
      +
      top
      @@ -1769,7 +1946,7 @@ media type in the HTTP Content-Type header field Status:Core Module:core -

      When the server has been compiled with gprof profiling suppport, +

      When the server has been compiled with gprof profiling support, GprofDir causes gmon.out files to be written to the specified directory when the process exits. If the argument ends with a percent symbol ('%'), subdirectories are created @@ -1823,6 +2000,74 @@ media type in the HTTP Content-Type header field directives, a hostname lookup will be performed regardless of the setting of HostnameLookups.

      + +
      top
      +

      HttpProtocolOptions Directive

      + + + + + + + + +
      Description:Modify restrictions on HTTP Request Messages
      Syntax:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
      Default:HttpProtocolOptions Strict LenientMethods Allow0.9
      Context:server config, virtual host
      Status:Core
      Module:core
      Compatibility:2.2.32 or 2.4.24 and later
      +

      This directive changes the rules applied to the HTTP Request Line + (RFC 7230 3.1.1) and the HTTP Request Header Fields + (RFC 7230 3.2), which are now applied by default or using + the Strict option. Due to legacy modules, applications or + custom user-agents which must be deperecated the Unsafe + option has been added to revert to the legacy behaviors. These rules + are applied prior to request processing, so must be configured at the + global or default (first) matching virtual host section, by IP/port + interface (and not by name) to be honored.

      + +

      Prior to the introduction of this directive, the Apache HTTP Server + request message parsers were tolerant of a number of forms of input + which did not conform to the protocol. + RFC 7230 9.4 Request Splitting and + 9.5 Response Smuggling call out only two of the potential + risks of accepting non-conformant request messages, while + RFC 7230 3.5 "Message Parsing Robustness" identify the + risks of accepting obscure whitespace and request message formatting. + As of the introduction of this directive, all grammer rules of the + specification are enforced in the default Strict operating + mode, and the strict whitespace suggested by section 3.5 is enforced + and cannot be relaxed.

      + +

      Users are strongly cautioned against toggling the Unsafe + mode of operation, particularly on outward-facing, publicly accessible + server deployments. If an interface is required for faulty monitoring + or other custom service consumers running on an intranet, users should + toggle the Unsafe option only on a specific virtual host configured + to service their internal private network.

      + +

      Reviewing the messages logged to the ErrorLog, + configured with LogLevel debug level, + can help identify such faulty requests along with their origin. + Users should pay particular attention to the 400 responses in the access + log for invalid requests which were unexpectedly rejected.

      + +

      RFC 7231 4.1 "Request Methods" "Overview" requires that + origin servers shall respond with an error when an unsupported method + is encountered in the request line. This already happens when the + LenientMethods option is used, but administrators may wish + to toggle the RegisteredMethods option and register any + non-standard methods using the RegisterHttpMethod + directive, particularly if the Unsafe option has been toggled. + The RegisteredMethods option should not + be toggled for forward proxy hosts, as the methods supported by the + origin servers are unknown to the proxy server.

      + +

      RFC 2616 19.6 "Compatibility With Previous Versions" had + encouraged HTTP servers to support legacy HTTP/0.9 requests. RFC 7230 + superceeds this with "The expectation to support HTTP/0.9 requests has + been removed" and offers additional comments in + RFC 7230 Appendix A. The Require1.0 option allows + the user to remove support of the default Allow0.9 option's + behavior.

      +
      top

      <If> Directive

      @@ -1840,20 +2085,18 @@ satisfied by a request at runtime directives if and only if the expression evaluates to true. For example:

      -

      - <If "-z req('Host')"> -

      +
      <If "-z req('Host')">
      +

      would match HTTP/1.0 requests without a Host: header. Expressions may contain various shell-like operators for string - comparison (=, !=, <, ...), + comparison (==, !=, <, ...), integer comparison (-eq, -ne, ...), and others (-n, -z, -f, ...). It is also possible to use regular expressions,

      -

      - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> -

      +
      <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">
      +

      shell-like pattern matches and many other operations. These operations can be done on request headers (req), environment variables @@ -1861,6 +2104,15 @@ satisfied by a request at runtime documentation is available in Expressions in Apache HTTP Server.

      +

      Only directives that support the directory context can be used within this configuration section.

      + +
      + Certain variables, such as CONTENT_TYPE and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. +
      +

      See also

        @@ -1917,32 +2169,21 @@ if a test is true at startup nest-able, which can be used to implement simple multiple-parameter tests. Example:

        -

        - httpd -DReverseProxy -DUseCache -DMemCache ...
        -
        - # httpd.conf
        - <IfDefine ReverseProxy>
        - - LoadModule proxy_module modules/mod_proxy.so
        - LoadModule proxy_http_module modules/mod_proxy_http.so
        - <IfDefine UseCache>
        - - LoadModule cache_module modules/mod_cache.so
        - <IfDefine MemCache>
        - - LoadModule mem_cache_module modules/mod_mem_cache.so
        -
        - </IfDefine>
        - <IfDefine !MemCache>
        - - LoadModule cache_disk_module modules/mod_cache_disk.so
        -
        - </IfDefine> -
        - </IfDefine> -
        - </IfDefine> -

        +

        httpd -DReverseProxy -DUseCache -DMemCache ...

        +
        <IfDefine ReverseProxy>
        +  LoadModule proxy_module   modules/mod_proxy.so
        +  LoadModule proxy_http_module   modules/mod_proxy_http.so
        +  <IfDefine UseCache>
        +    LoadModule cache_module   modules/mod_cache.so
        +    <IfDefine MemCache>
        +      LoadModule mem_cache_module   modules/mod_mem_cache.so
        +    </IfDefine>
        +    <IfDefine !MemCache>
        +      LoadModule cache_disk_module   modules/mod_cache_disk.so
        +    </IfDefine>
        +  </IfDefine>
        +</IfDefine>
        +
      top
      @@ -2003,11 +2244,11 @@ later. - + -
      Description:Includes other configuration files from within the server configuration files
      Syntax:Include [optional|strict] file-path|directory-path|wildcard
      Syntax:Include file-path|directory-path|wildcard
      Context:server config, virtual host, directory
      Status:Core
      Module:core
      Compatibility:Wildcard matching available in 2.0.41 and later, directory +
      Compatibility:Directory wildcard matching available in 2.3.6 and later

      This directive allows inclusion of other configuration files @@ -2024,72 +2265,67 @@ wildcard matching available in 2.3.6 and later wildcard syntax shown below, to include files that match a particular pattern, such as *.conf, for example.

      -

      When a wildcard is specified for a file component of - the path, and no file matches the wildcard, the - Include - directive will be silently ignored. When a wildcard is - specified for a directory component of the path, and - no directory matches the wildcard, the - Include directive will - fail with an error saying the directory cannot be found. -

      - -

      For further control over the behavior of the server when no files or - directories match, prefix the path with the modifiers optional - or strict. If optional is specified, any wildcard - file or directory that does not match will be silently ignored. If - strict is specified, any wildcard file or directory that does - not match at least one file will cause server startup to fail.

      - -

      When a directory or file component of the path is - specified exactly, and that directory or file does not exist, - Include directive will fail with an - error saying the file or directory cannot be found.

      +

      The Include directive will + fail with an error if a wildcard expression does not + match any file. The IncludeOptional + directive can be used if non-matching wildcards should be ignored.

      The file path specified may be an absolute path, or may be relative to the ServerRoot directory.

      Examples:

      -

      - Include /usr/local/apache2/conf/ssl.conf
      - Include /usr/local/apache2/conf/vhosts/*.conf -

      +
      Include /usr/local/apache2/conf/ssl.conf
      +Include /usr/local/apache2/conf/vhosts/*.conf
      +

      Or, providing paths relative to your ServerRoot directory:

      -

      - Include conf/ssl.conf
      - Include conf/vhosts/*.conf -

      +
      Include conf/ssl.conf
      +Include conf/vhosts/*.conf
      +

      Wildcards may be included in the directory or file portion of the - path. In the following example, the server will fail to load if no - directories match conf/vhosts/*, but will load successfully if no - files match *.conf.

      + path. This example will fail if there is no subdirectory in conf/vhosts + that contains at least one *.conf file:

      -

      - Include conf/vhosts/*/vhost.conf
      - Include conf/vhosts/*/*.conf -

      +
      Include conf/vhosts/*/*.conf
      -

      In this example, the server will fail to load if either - conf/vhosts/* matches no directories, or if *.conf matches no files:

      -

      - Include strict conf/vhosts/*/*.conf -

      +

      Alternatively, the following command will just be ignored in case of + missing files or directories:

      -

      In this example, the server load successfully if either conf/vhosts/* - matches no directories, or if *.conf matches no files:

      +
      IncludeOptional conf/vhosts/*/*.conf
      -

      - Include optional conf/vhosts/*/*.conf -

      See also

      + +
      top
      +

      IncludeOptional Directive

      + + + + + + + +
      Description:Includes other configuration files from within +the server configuration files
      Syntax:IncludeOptional file-path|directory-path|wildcard
      Context:server config, virtual host, directory
      Status:Core
      Module:core
      Compatibility:Available in 2.3.6 and later
      +

      This directive allows inclusion of other configuration files + from within the server configuration files. It works identically to the + Include directive, with the + exception that if wildcards do not match any file or directory, the + IncludeOptional directive will be + silently ignored instead of causing an error.

      + +

      See also

      +
      @@ -2123,7 +2359,7 @@ wildcard matching available in 2.3.6 and later encoding will be used in order to send content of unknown length over persistent connections.

      -

      When a client uses a Keep-Alive connection it will be counted +

      When a client uses a Keep-Alive connection, it will be counted as a single "request" for the MaxConnectionsPerChild directive, regardless of how many requests are sent using the connection.

      @@ -2142,8 +2378,6 @@ requests on a persistent connection Context:server config, virtual host Status:Core Module:core -Compatibility:Specifying a value in milliseconds is available in -Apache httpd 2.3.2 and later

      The number of seconds Apache httpd will wait for a subsequent request before closing the connection. By adding a postfix of ms the @@ -2156,8 +2390,9 @@ Apache httpd 2.3.2 and later higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.

      -

      In a name-based virtual host context, the value of the first - defined virtual host best matching the local IP and port will be used.

      +

      If KeepAliveTimeout is not + set for a name-based virtual host, the value of the first defined + virtual host best matching the local IP and port will be used.

      top
      @@ -2186,13 +2421,10 @@ methods only to the methods POST, PUT, and DELETE, leaving all other methods unprotected:

      -

      - <Limit POST PUT DELETE>
      - - Require valid-user
      -
      - </Limit> -

      +
      <Limit POST PUT DELETE>
      +  Require valid-user
      +</Limit>
      +

      The method names listed can be one or more of: GET, POST, PUT, DELETE, @@ -2200,7 +2432,7 @@ methods PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK. The method name is - case-sensitive. If GET is used it will also + case-sensitive. If GET is used, it will also restrict HEAD requests. The TRACE method cannot be limited (see TraceEnable).

      @@ -2228,18 +2460,13 @@ methods Require group editors directive will be ignored in all cases:

      -

      - <LimitExcept GET> - - Require valid-user - - </LimitExcept>
      - <Limit POST> - - Require group editors - - </Limit> -

      +
      <LimitExcept GET>
      +  Require valid-user
      +</LimitExcept>
      +<Limit POST>
      +  Require group editors
      +</Limit>
      +
      top
      @@ -2264,13 +2491,10 @@ except the named ones

      For example:

      -

      - <LimitExcept POST GET>
      - - Require valid-user
      -
      - </LimitExcept> -

      +
      <LimitExcept POST GET>
      +  Require valid-user
      +</LimitExcept>
      + @@ -2284,7 +2508,6 @@ subrequests Context:server config, virtual host Status:Core Module:core -Compatibility:Available in Apache httpd 2.0.47 and later

      An internal redirect happens, for example, when using the Action directive, which internally redirects the original request to a CGI script. A subrequest is Apache httpd's @@ -2299,13 +2522,12 @@ subrequests

      The directive stores two different limits, which are evaluated on per-request basis. The first number is the maximum number of - internal redirects, that may follow each other. The second number - determines, how deep subrequests may be nested. If you specify only one + internal redirects that may follow each other. The second number + determines how deeply subrequests may be nested. If you specify only one number, it will be assigned to both limits.

      -

      Example

      - LimitInternalRecursion 5 -

      +
      LimitInternalRecursion 5
      +
      top
      @@ -2344,12 +2566,11 @@ from the client attacks.

      If, for example, you are permitting file upload to a particular - location, and wish to limit the size of the uploaded file to 100K, + location and wish to limit the size of the uploaded file to 100K, you might use the following directive:

      -

      - LimitRequestBody 102400 -

      +
      LimitRequestBody 102400
      +

      For a full description of how this directive is interpreted by proxy requests, see the mod_proxy documentation.

      @@ -2393,14 +2614,13 @@ will be accepted from the client

      For example:

      -

      - LimitRequestFields 50 -

      +
      LimitRequestFields 50
      +

      Warning

      When name-based virtual hosting is used, the value for this directive is taken from the default (first-listed) virtual host for the - local IP and port combination

      . + local IP and port combination.

      @@ -2420,7 +2640,7 @@ client that will be allowed in an HTTP request header.

      The LimitRequestFieldSize directive - allows the server administrator to reduce or increase the limit + allows the server administrator to set the limit on the allowed size of an HTTP request header field. A server needs this value to be large enough to hold any one header field from a normal client request. The size of a normal request header @@ -2435,9 +2655,8 @@ client

      For example:

      -

      - LimitRequestFieldSize 4094 -

      +
      LimitRequestFieldSize 4094
      +
      Under normal conditions, the value should not be changed from the default.
      @@ -2464,7 +2683,7 @@ from the client allowed on the HTTP request-line.

      The LimitRequestLine directive allows - the server administrator to reduce or increase the limit on the allowed size + the server administrator to set the limit on the allowed size of a client's HTTP request-line. Since the request-line consists of the HTTP method, URI, and protocol version, the LimitRequestLine directive places a @@ -2479,9 +2698,8 @@ from the client

      For example:

      -

      - LimitRequestLine 4094 -

      +
      LimitRequestLine 4094
      +
      Under normal conditions, the value should not be changed from the default.
      @@ -2510,9 +2728,8 @@ from the client

      Example:

      -

      - LimitXMLRequestBody 0 -

      +
      LimitXMLRequestBody 0
      +
      @@ -2560,26 +2777,26 @@ URLs /private1, /private1/ and /private1/file.txt will have the enclosed directives applied, but /private1other would not.

      -

      - <Location /private1> - ... -

      +
      <Location "/private1">
      +    #  ...
      +</Location>
      +

      In the example below, where a trailing slash is used, requests to /private2/ and /private2/file.txt will have the enclosed directives applied, but /private2 and /private2other would not.

      -

      - <Location /private2/> - ... -

      +
      <Location "/private2/">
      +    # ...
      +</Location>
      +

      When to use <Location>

      Use <Location> to apply directives to content that lives outside the filesystem. For content that lives in the filesystem, use <Directory> and <Files>. An exception is - <Location />, which is an easy way to + <Location "/">, which is an easy way to apply a configuration to the entire server.

      @@ -2598,9 +2815,10 @@ URLs can also be used, with the addition of the ~ character. For example:

      -

      - <Location ~ "/(extra|special)/data"> -

      +
      <Location ~ "/(extra|special)/data">
      +    #...
      +</Location>
      +

      would match URLs that contained the substring /extra/data or /special/data. The directive <LocationMatch> behaves @@ -2611,17 +2829,14 @@ URLs

      The <Location> functionality is especially useful when combined with the SetHandler - directive. For example, to enable status requests, but allow them + directive. For example, to enable status requests but allow them only from browsers at example.com, you might use:

      -

      - <Location /status>
      - - SetHandler server-status
      - Require host example.com
      -
      - </Location> -

      +
      <Location "/status">
      +  SetHandler server-status
      +  Require host example.com
      +</Location>
      +

      Note about / (slash)

      The slash character has special meaning depending on where in a @@ -2633,12 +2848,12 @@ URLs directive and the regex version of <Location> require you to explicitly specify multiple slashes if that is your intention.

      -

      For example, <LocationMatch ^/abc> would match +

      For example, <LocationMatch "^/abc"> would match the request URL /abc but not the request URL //abc. The (non-regex) <Location> directive behaves similarly when used for proxy requests. But when (non-regex) <Location> is used for non-proxy requests it will implicitly match multiple slashes with a single slash. For example, - if you specify <Location /abc/def> and the + if you specify <Location "/abc/def"> and the request is to /abc//def then it will match.

      @@ -2667,13 +2882,35 @@ matching URLs it takes a regular expression as an argument instead of a simple string. For example:

      -

      - <LocationMatch "/(extra|special)/data"> -

      +
      <LocationMatch "/(extra|special)/data">
      +    # ...
      +</LocationMatch>
      +

      would match URLs that contained the substring /extra/data or /special/data.

      +

      If the intent is that a URL starts with + /extra/data, rather than merely + contains /extra/data, prefix the + regular expression with a ^ to require this.

      + +
      <LocationMatch "^/(extra|special)/data">
      + +
      + +

      From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of URLs to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

      + +
      <LocationMatch "^/combined/(?<sitename>[^/]+)">
      +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
      +</LocationMatch>
      + +

      See also

      • How <Directory>, <Location> @@ -2845,12 +3082,11 @@ matching URLs

        For example:

        -

        - LogLevel notice -

        +
        LogLevel notice
        +
        top

        MaxKeepAliveRequests Directive

        @@ -2907,9 +3147,8 @@ connection

        For example:

        -

        - MaxKeepAliveRequests 500 -

        +
        MaxKeepAliveRequests 500
        +
        top
        @@ -2926,7 +3165,7 @@ connection

        The MaxRangeOverlaps directive limits the number of overlapping HTTP ranges the server is willing to - return to the client. If more overlapping ranges then permitted are requested, + return to the client. If more overlapping ranges than permitted are requested, the complete resource is returned instead.

        @@ -2960,7 +3199,7 @@ connection

        The MaxRangeReversals directive limits the number of HTTP Range reversals the server is willing to - return to the client. If more ranges reversals then permitted are requested, + return to the client. If more ranges reversals than permitted are requested, the complete resource is returned instead.

        @@ -2994,7 +3233,7 @@ resource

        The MaxRanges directive limits the number of HTTP ranges the server is willing to - return to the client. If more ranges then permitted are requested, + return to the client. If more ranges than permitted are requested, the complete resource is returned instead.

        @@ -3013,6 +3252,25 @@ resource server is willing to satisfy.
        + +
        top
        +

        MergeTrailers Directive

        + + + + + + + + +
        Description:Determines whether trailers are merged into headers
        Syntax:MergeTrailers [on|off]
        Default:MergeTrailers off
        Context:server config, virtual host
        Status:Core
        Module:core
        Compatibility:2.4.11 and later
        +

        This directive controls whether HTTP trailers are copied into the + internal representation of HTTP headers. This merging occurs when the + request body has been completely consumed, long after most header + processing would have a chance to examine or modify request headers.

        +

        This option is provided for compatibility with releases prior to 2.4.11, + where trailers were always merged.

        +
        top

        Mutex Directive

        @@ -3029,8 +3287,8 @@ or specified mutexes

        The Mutex directive sets the mechanism, and optionally the lock file location, that httpd and modules use to serialize access to resources. Specify default as - the first argument to change the settings for all mutexes; specify - a mutex name (see table below) as the first argument to override + the second argument to change the settings for all mutexes; specify + a mutex name (see table below) as the second argument to override defaults only for that mutex.

        The Mutex directive is typically used in @@ -3105,10 +3363,10 @@ or specified mutexes holding a mutex that uses this implementation, the server will deadlock and stop responding to requests. When this occurs, the server will require a manual restart to recover.

        -

        Solaris is a notable exception as it provides a mechanism which +

        Solaris and Linux are notable exceptions as they provide a mechanism which usually allows the mutex to be recovered after a child process terminates abnormally while holding a mutex.

        -

        If your system implements the +

        If your system is POSIX compliant or if it implements the pthread_mutexattr_setrobust_np() function, you may be able to use the pthread option safely.

        @@ -3151,7 +3409,7 @@ or specified mutexes on a NFS- or AFS-filesystem. The basename of the file will be the mutex type, an optional instance string provided by the module, and unless the OmitPID keyword is specified, the process id of the httpd - parent process will be appended to to make the file name unique, avoiding + parent process will be appended to make the file name unique, avoiding conflicts when multiple httpd instances share a lock file directory. For example, if the mutex name is mpm-accept and the lock file directory is /var/httpd/locks, the lock file name for the @@ -3229,10 +3487,9 @@ or specified mutexes /var/httpd/locks. The mutex mechanism for all other mutexes will be changed from the compiled-in default to sysvsem.

        -

        - Mutex default sysvsem
        - Mutex mpm-accept fcntl:/var/httpd/locks -

        +
        Mutex sysvsem default
        +Mutex fcntl:/var/httpd/locks mpm-accept
        +
        top
        @@ -3300,9 +3557,11 @@ directory

        Even though the server follows the symlink it does not change the pathname used to match against <Directory> sections.

        -

        Note also, that this option gets ignored if set - inside a <Location> - section.

        + +

        The FollowSymLinks and + SymLinksIfOwnerMatch Options work only in <Directory> sections or + .htaccess files.

        +

        Omitting this option should not be considered a security restriction, since symlink testing is subject to race conditions that make it circumventable.

        @@ -3327,7 +3586,7 @@ directory
        Indexes
        - If a URL which maps to a directory is requested, and there + If a URL which maps to a directory is requested and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing @@ -3350,17 +3609,20 @@ directory target file or directory is owned by the same user id as the link. -

        Note

        This option gets ignored if - set inside a <Location> section.

        +

        Note

        +

        The FollowSymLinks and + SymLinksIfOwnerMatch Options work only in <Directory> sections or + .htaccess files.

        +

        This option should not be considered a security restriction, since symlink testing is subject to race conditions that make it - circumventable.

        -
        + circumventable.

        +

        Normally, if multiple Options could apply to a directory, then the most specific one is used and - others are ignored; the options are not merged. (See how sections are merged.) + others are ignored; the options are not merged. (See how sections are merged.) However if all the options on the Options directive are preceded by a + or - symbol, the options are @@ -3371,44 +3633,34 @@ directory

        Note

        Mixing Options with a + or - - with those without is not valid syntax, and will be + - with those without is not valid syntax and will be rejected during server startup by the syntax check with an abort.

        For example, without any + and - symbols:

        -

        - <Directory /web/docs>
        - - Options Indexes FollowSymLinks
        -
        - </Directory>
        -
        - <Directory /web/docs/spec>
        - - Options Includes
        -
        - </Directory> -

        +
        <Directory "/web/docs">
        +  Options Indexes FollowSymLinks
        +</Directory>
        +
        +<Directory "/web/docs/spec">
        +  Options Includes
        +</Directory>
        +

        then only Includes will be set for the /web/docs/spec directory. However if the second Options directive uses the + and - symbols:

        -

        - <Directory /web/docs>
        - - Options Indexes FollowSymLinks
        -
        - </Directory>
        -
        - <Directory /web/docs/spec>
        - - Options +Includes -Indexes
        -
        - </Directory> -

        +
        <Directory "/web/docs">
        +  Options Indexes FollowSymLinks
        +</Directory>
        +
        +<Directory "/web/docs/spec">
        +  Options +Includes -Indexes
        +</Directory>
        +

        then the options FollowSymLinks and Includes are set for the /web/docs/spec @@ -3433,28 +3685,144 @@ directory Status:Core Module:core Compatibility:Available in Apache 2.1.5 and later. -On Windows from Apache 2.3.3 and later. +On Windows, from Apache 2.3.3 and later.

        This directive specifies the protocol used for a specific listening socket. - The protocol is used to determine which module should handle a request, and + The protocol is used to determine which module should handle a request and to apply protocol specific optimizations with the AcceptFilter directive.

        -

        You only need to set the protocol if you are running on non-standard ports, otherwise http is assumed for port 80 and https for port 443.

        +

        You only need to set the protocol if you are running on non-standard ports; + otherwise, http is assumed for port 80 and https + for port 443.

        -

        For example, if you are running https on a non-standard port, specify the protocol explicitly:

        +

        For example, if you are running https on a non-standard port, + specify the protocol explicitly:

        + +
        Protocol https
        -

        - Protocol https -

        You can also specify the protocol using the Listen directive.

        See also

        + +
        top
        +

        Protocols Directive

        + + + + + + + + +
        Description:Protocols available for a server/virtual host
        Syntax:Protocols protocol ...
        Default:Protocols http/1.1
        Context:server config, virtual host
        Status:Core
        Module:core
        Compatibility:Only available from Apache 2.4.17 and later.
        +

        This directive specifies the list of protocols supported for a + server/virtual host. The list determines the allowed protocols + a client may negotiate for this server/host.

        + +

        You need to set protocols if you want to extend the available + protocols for a server/host. By default, only the http/1.1 protocol + (which includes the compatibility with 1.0 and 0.9 clients) is + allowed.

        + +

        For example, if you want to support HTTP/2 for a server with TLS, + specify:

        + +
        Protocols h2 http/1.1
        + + +

        Valid protocols are http/1.1 for http and https connections, + h2 on https connections and h2c for http + connections. Modules may enable more protocols.

        + +

        It is safe to specify protocols that are unavailable/disabled. Such + protocol names will simply be ignored.

        + +

        Protocols specified in base servers are inherited for virtual hosts + only if the virtual host has no own Protocols directive. Or, the other + way around, Protocols directives in virtual hosts replace any + such directive in the base server. +

        + + +

        See also

        + +
        +
        top
        +

        ProtocolsHonorOrder Directive

        + + + + + + + + +
        Description:Determines if order of Protocols determines precedence during negotiation
        Syntax:ProtocolsHonorOrder On|Off
        Default:ProtocolsHonorOrder On
        Context:server config, virtual host
        Status:Core
        Module:core
        Compatibility:Only available from Apache 2.4.17 and later.
        +

        This directive specifies if the server should honor the order in which + the Protocols directive lists protocols.

        + +

        If configured Off, the client supplied list order of protocols has + precedence over the order in the server configuration.

        + +

        With ProtocolsHonorOrder set to on + (default), the client ordering does not matter and only the ordering + in the server settings influences the outcome of the protocol + negotiation.

        + + +

        See also

        + +
        +
        top
        +

        QualifyRedirectURL Directive

        + + + + + + + + + +
        Description:Controls whether the REDIRECT_URL environment variable is + fully qualified
        Syntax:QualifyRedirectURL ON|OFF
        Default:QualifyRedirectURL OFF
        Context:server config, virtual host, directory
        Override:FileInfo
        Status:Core
        Module:core
        Compatibility:Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL ON' was configured.
        +

        This directive controls whether the server will ensure that the + REDIRECT_URL environment variable is fully qualified. By default, + the variable contains the verbatim URL requested by the client, + such as "/index.html". With QualifyRedirectURL ON, the same request would result in a + value such as "http://www.example.com/index.html".

        +

        Even without this directive set, when a request is issued against a + fully qualified URL, REDIRECT_URL will remain fully qualified. +

        + +
        +
        top
        +

        RegisterHttpMethod Directive

        + + + + + + +
        Description:Register non-standard HTTP methods
        Syntax:RegisterHttpMethod method [method [...]]
        Context:server config
        Status:Core
        Module:core
        +

        HTTP Methods that are not conforming to the relvant RFCs are normally +rejected by request processing in Apache HTTPD. To avoid this, modules +can register non-standard HTTP methods they support. +The RegisterHttpMethod allows to register such +methods manually. This can be useful for if such methods are forwared +for external processing, e.g. to a CGI script.

        +
        top

        RLimitCPU Directive

        @@ -3474,13 +3842,13 @@ by Apache httpd children or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

        -

        This applies to processes forked off from Apache httpd children +

        This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

        CPU resource limits are expressed in seconds per @@ -3510,13 +3878,13 @@ by Apache httpd children or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

        -

        This applies to processes forked off from Apache httpd children +

        This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

        Memory resource limits are expressed in bytes per @@ -3541,18 +3909,18 @@ processes launched by Apache httpd children Module:core

        Takes 1 or 2 parameters. The first parameter sets the soft - resource limit for all processes and the second parameter sets + resource limit for all processes, and the second parameter sets the maximum resource limit. Either parameter can be a number, or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

        -

        This applies to processes forked off from Apache httpd children +

        This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

        Process limits control the number of processes per user.

        @@ -3583,9 +3951,7 @@ scripts Override:FileInfo Status:Core Module:core -Compatibility:Win32 only; -option Registry-Strict is available in Apache HTTP Server 2.0 and -later +Compatibility:Win32 only.

        This directive is used to control how Apache httpd finds the interpreter used to run CGI scripts. The default setting is @@ -3593,15 +3959,13 @@ later by the shebang line (first line, starting with #!) in the script. On Win32 systems this line usually looks like:

        -

        - #!C:/Perl/bin/perl.exe -

        +
        #!C:/Perl/bin/perl.exe
        +

        or, if perl is in the PATH, simply:

        -

        - #!perl -

        +
        #!perl
        +

        Setting ScriptInterpreterSource Registry will cause the Windows Registry tree HKEY_CLASSES_ROOT to be @@ -3695,9 +4059,8 @@ messages sent to the client

        It may be worth setting up a dedicated address for this, e.g.

        -

        - ServerAdmin www-admin@foo.example.com -

        +
        ServerAdmin www-admin@foo.example.com
        +

        as users do not always mention that they are talking about the server!

        @@ -3716,15 +4079,23 @@ to name-virtual hosts alternate names for a host, for use with name-based virtual hosts. The ServerAlias may include wildcards, if appropriate.

        -

        - <VirtualHost *:80>
        - ServerName server.example.com
        - ServerAlias server server2.example.com server2
        - ServerAlias *.example.com
        - UseCanonicalName Off
        - # ...
        - </VirtualHost> -

        +
        <VirtualHost *:80>
        +  ServerName server.example.com
        +  ServerAlias server server2.example.com server2
        +  ServerAlias *.example.com
        +  UseCanonicalName Off
        +  # ...
        +</VirtualHost>
        + + +

        Name-based virtual hosts for the best-matching set of <virtualhost>s are processed + in the order they appear in the configuration. The first matching ServerName or ServerAlias is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias).

        + +

        The complete list of names in the <VirtualHost> + directive are treated just like a (non wildcard) + ServerAlias.

        +

        See also

          @@ -3737,38 +4108,44 @@ to name-virtual hosts - +
          Description:Hostname and port that the server uses to identify itself
          Syntax:ServerName [scheme://]fully-qualified-domain-name[:port]
          Syntax:ServerName [scheme://]domain-name|ip-address[:port]
          Context:server config, virtual host
          Status:Core
          Module:core

          The ServerName directive sets the - request scheme, hostname and - port that the server uses to identify itself. This is used when - creating redirection URLs.

          + request scheme, hostname and port that the server uses to identify itself. +

          -

          Additionally, ServerName is used (possibly - in conjunction with ServerAlias) to uniquely +

          ServerName is used (possibly + in conjunction with ServerAlias) to uniquely identify a virtual host, when using name-based virtual hosts.

          +

          Additionally, this is used when + creating self-referential redirection URLs when + UseCanonicalName is set to a non-default + value.

          +

          For example, if the name of the machine hosting the web server is simple.example.com, but the machine also has the DNS alias www.example.com and you wish the web server to be so identified, the following directive should be used:

          -

          - ServerName www.example.com -

          +
          ServerName www.example.com
          +

          The ServerName directive may appear anywhere within the definition of a server. However, each appearance overrides the previous appearance (within that server).

          -

          If no ServerName is specified, then the - server attempts to deduce the hostname by performing a reverse - lookup on the IP address. If no port is specified in the +

          If no ServerName is specified, the + server attempts to deduce the client visible hostname by first asking + the operating system for the system hostname, and if that fails, + performing a reverse lookup on an IP address present on the system.

          + +

          If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and predictability, you should specify an explicit hostname and port @@ -3854,9 +4231,8 @@ is accessed by an incompatible browser paths in other configuration directives (such as Include or LoadModule, for example) are taken as relative to this directory.

          -

          Example

          - ServerRoot /home/httpd -

          +
          ServerRoot "/home/httpd"
          +

          The default location of ServerRoot may be modified by using the --prefix argument to @@ -3929,7 +4305,7 @@ header

          ServerTokens Full (or not specified)
          -
          Server sends (e.g.): Server: Apache/2.4.1 +
          Server sends (e.g.): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
          ServerTokens Prod[uctOnly]
          @@ -3950,11 +4326,11 @@ header
          ServerTokens Min[imal]
          Server sends (e.g.): Server: - Apache/2.4.1
          + Apache/2.4.2
          ServerTokens OS
          -
          Server sends (e.g.): Server: Apache/2.4.1 +
          Server sends (e.g.): Server: Apache/2.4.2 (Unix)
          @@ -3969,7 +4345,7 @@ header minimal is not recommended because it makes it more difficult to debug interoperational problems. Also note that disabling the Server: header does nothing at all to make your - server more secure; the idea of "security through obscurity" + server more secure. The idea of "security through obscurity" is a myth and leads to a false sense of safety.
        @@ -3983,12 +4359,12 @@ header - + - +
        Description:Forces all matching files to be processed by a handler
        Syntax:SetHandler handler-name|None
        Syntax:SetHandler handler-name|none|expression
        Context:server config, virtual host, directory, .htaccess
        Override:FileInfo
        Status:Core
        Module:core
        Compatibility:Moved into the core in Apache httpd 2.0
        Compatibility:expression argument 2.4.19 and later

        When placed into an .htaccess file or a <Directory> or @@ -4000,22 +4376,34 @@ handler of extension, you might put the following into an .htaccess file in that directory:

        -

        - SetHandler imap-file -

        +
        SetHandler imap-file
        +

        Another example: if you wanted to have the server display a status report whenever a URL of http://servername/status was called, you might put the following into httpd.conf:

        -

        - <Location /status>
        - - SetHandler server-status
        -
        - </Location> -

        +
        <Location "/status">
        +  SetHandler server-status
        +</Location>
        + + +

        You could also use this directive to configure a particular + handler for files with a particular file extension. For example:

        + +
        <FilesMatch "\.php$">
        +    SetHandler application/x-httpd-php
        +</FilesMatch>
        + + +

        String-valued expressions can be used to reference per-request + variables, including backreferences to named regular expressions:

        + +
        <LocationMatch ^/app/(?<sub>[^/]+)/>
        +     SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080"
        +</LocationMatch>
        +

        You can override an earlier defined SetHandler directive by using the value None.

        @@ -4079,13 +4467,10 @@ server in the /www/data/ directory for server-side includes.

        -

        - <Directory /www/data/>
        - - SetOutputFilter INCLUDES
        -
        - </Directory> -

        +
        <Directory "/www/data/">
        +  SetOutputFilter INCLUDES
        +</Directory>
        +

        If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -4110,10 +4495,14 @@ certain events before failing a request

        The TimeOut directive defines the length of time Apache httpd will wait for I/O in various circumstances:

        -
          -
        1. When reading data from the client, the length of time to +
            +
          • When reading data from the client, the length of time to wait for a TCP packet to arrive if the read buffer is - empty.

          • + empty.

            +

            For initial data on a new connection, this directive doesn't + take effect until after any configured + AcceptFilter has passed the new connection to the server.

            +
          • When writing data to the client, the length of time to wait for an acknowledgement of a packet if the send buffer is @@ -4128,7 +4517,7 @@ certain events before failing a request
          • In mod_proxy, the default timeout value if ProxyTimeout is not configured.
          • -
        +
      @@ -4141,7 +4530,6 @@ certain events before failing a request Context:server config, virtual host Status:Core Module:core -Compatibility:Available in Apache HTTP Server 1.3.34, 2.0.55 and later

      This directive overrides the behavior of TRACE for both the core server and mod_proxy. The default @@ -4154,10 +4542,19 @@ certain events before failing a request

      Finally, for testing and diagnostic purposes only, request bodies may be allowed using the non-compliant TraceEnable extended directive. The core (as an origin server) will - restrict the request body to 64k (plus 8k for chunk headers if + restrict the request body to 64Kb (plus 8Kb for chunk headers if Transfer-Encoding: chunked is used). The core will reflect the full headers and all chunk headers with the response - body. As a proxy server, the request body is not restricted to 64k.

      + body. As a proxy server, the request body is not restricted to 64Kb.

      + +

      Note

      + +

      Despite claims to the contrary, enabling the TRACE + method does not expose any security vulnerability in Apache httpd. + The TRACE method is defined by the HTTP/1.1 + specification and implementations are expected to support it.

      + +
      top
      @@ -4173,6 +4570,9 @@ certain events before failing a request of passing a -D argument to httpd.

      This directive can be used to toggle the use of <IfDefine> sections without needing to alter -D arguments in any startup scripts.

      +

      While this directive is supported in virtual host context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing virtual host.

      top
      @@ -4198,7 +4598,7 @@ port self-referential URLs using the hostname and port supplied by the client if any are supplied (otherwise it will use the canonical name, as defined above). These values are the same - that are used to implement name-based virtual hosts, + that are used to implement name-based virtual hosts and are available with the same clients. The CGI variables SERVER_NAME and SERVER_PORT will be constructed from the client supplied values as well.

      @@ -4206,29 +4606,29 @@ port

      An example where this may be useful is on an intranet server where you have users connecting to the machine using short names such as www. You'll notice that if the users - type a shortname, and a URL which is a directory, such as + type a shortname and a URL which is a directory, such as http://www/splat, without the trailing - slash then Apache httpd will redirect them to + slash, then Apache httpd will redirect them to http://www.example.com/splat/. If you have authentication enabled, this will cause the user to have to authenticate twice (once for www and once again - for www.example.com -- see the - FAQ on this subject for more information). But if + for www.example.com -- see + the FAQ on this subject for more information). But if UseCanonicalName is set Off, then Apache httpd will redirect to http://www/splat/.

      There is a third option, UseCanonicalName DNS, which is intended for use with mass IP-based virtual hosting to support ancient clients that do not provide a - Host: header. With this option Apache httpd does a + Host: header. With this option, Apache httpd does a reverse DNS lookup on the server IP address that the client connected to in order to work out self-referential URLs.

      Warning

      -

      If CGIs make assumptions about the values of SERVER_NAME +

      If CGIs make assumptions about the values of SERVER_NAME, they may be broken by this option. The client is essentially free to give whatever value they want as a hostname. But if the CGI is - only using SERVER_NAME to construct self-referential URLs + only using SERVER_NAME to construct self-referential URLs, then it should be just fine.

      @@ -4251,11 +4651,11 @@ port

      In many situations Apache httpd must construct a self-referential URL -- that is, a URL that refers back to the same server. With - UseCanonicalPhysicalPort On Apache httpd will, when + UseCanonicalPhysicalPort On, Apache httpd will, when constructing the canonical port for the server to honor the UseCanonicalName directive, provide the actual physical port number being used by this request - as a potential port. With UseCanonicalPhysicalPort Off + as a potential port. With UseCanonicalPhysicalPort Off, Apache httpd will not ever use the actual physical port number, instead relying on all configured information to construct a valid port number.

      @@ -4329,37 +4729,31 @@ hostname or IP address
    -

    Example

    - <VirtualHost 10.1.2.3:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -

    +
    <VirtualHost 10.1.2.3:80>
    +  ServerAdmin webmaster@host.example.com
    +  DocumentRoot "/www/docs/host.example.com"
    +  ServerName host.example.com
    +  ErrorLog "logs/host.example.com-error_log"
    +  TransferLog "logs/host.example.com-access_log"
    +</VirtualHost>
    +

    IPv6 addresses must be specified in square brackets because the optional port number could not be determined otherwise. An IPv6 example is shown below:

    -

    - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -

    +
    <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    +  ServerAdmin webmaster@host.example.com
    +  DocumentRoot "/www/docs/host.example.com"
    +  ServerName host.example.com
    +  ErrorLog "logs/host.example.com-error_log"
    +  TransferLog "logs/host.example.com-access_log"
    +</VirtualHost>
    +

    Each Virtual Host must correspond to a different IP address, - different port number or a different host name for the server, + different port number, or a different host name for the server, in the former case the server machine must be configured to accept IP packets for multiple addresses. (If the machine does not have multiple network interfaces, then this can be @@ -4389,7 +4783,7 @@ hostname or IP address requested hostname. If no matching name-based virtual host is found, then the first listed virtual host that matched the IP address will be used. As a consequence, the first listed virtual host for a given IP address - and port combination is default virtual host for that IP and port + and port combination is the default virtual host for that IP and port combination.

    Security

    @@ -4419,7 +4813,28 @@ hostname or IP address  fr  |  ja  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/core.html.es b/docs/manual/mod/core.html.es index 380a3c241a1..323f9e0286e 100644 --- a/docs/manual/mod/core.html.es +++ b/docs/manual/mod/core.html.es @@ -1,23 +1,28 @@ - -core - Servidor HTTP Apache +core - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-
    +Apache > Servidor HTTP > Documentacin > Versin 2.4 > Mdulos

    Funcionalidad Bsica de Apache

    @@ -28,6 +33,10 @@  ja  |  tr 

    +
    Esta traduccin podra estar + obsoleta. Consulte la versin en ingls de la + documentacin para comprobar si se han producido cambios + recientemente.
    Descripcin:Funcionalides bsicas del Servidor HTTP Apache que siempre estn presentes.
    Estado:Core
    @@ -41,7 +50,10 @@
  • AllowOverride
  • AllowOverrideList
  • CGIMapExtension
  • +
  • CGIPassAuth
  • +
  • CGIVar
  • ContentDigest
  • +
  • DefaultRuntimeDir
  • DefaultType
  • Define
  • <Directory>
  • @@ -62,10 +74,12 @@
  • ForceType
  • GprofDir
  • HostnameLookups
  • +
  • HttpProtocolOptions
  • <If>
  • <IfDefine>
  • <IfModule>
  • Include
  • +
  • IncludeOptional
  • KeepAlive
  • KeepAliveTimeout
  • <Limit>
  • @@ -83,10 +97,15 @@
  • MaxRangeOverlaps
  • MaxRangeReversals
  • MaxRanges
  • +
  • MergeTrailers
  • Mutex
  • NameVirtualHost
  • Options
  • Protocol
  • +
  • Protocols
  • +
  • ProtocolsHonorOrder
  • +
  • QualifyRedirectURL
  • +
  • RegisterHttpMethod
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • @@ -109,7 +128,9 @@
  • UseCanonicalPhysicalPort
  • <VirtualHost>
  • - +

    Lista de Bugs

    Consulte tambin

    +
    top

    AcceptFilter Directiva

    @@ -182,7 +203,7 @@ En Windows desde Apache httpd 2.3.3 y posteriores. transmitidos como se comentaba anteriormente, y el buffer inicial de datos y las direcciones de red son recuperadas a partir de una nica llamada AcceptEx(). connect utiliza la API AcceptEx() API, y recupera tambin - las direccciones de red, pero a diferencia de none + las direcciones de red, pero a diferencia de none la opcin connect no espera a la transmisin inicial de los datos.

    Sobre Windows, none prefiere accept() antes que AcceptEx() @@ -202,7 +223,7 @@ En Windows desde Apache httpd 2.3.3 y posteriores. Descripcin:Los recursos aceptan informacin sobre su ruta Sintaxis:AcceptPathInfo On|Off|Default Valor por defecto:AcceptPathInfo Default -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:FileInfo Estado:Core Mdulo:core @@ -311,7 +332,7 @@ En Windows desde Apache httpd 2.3.3 y posteriores. content-type is text/plain or text/html Sintaxis:AddDefaultCharset On|Off|charset Valor por defecto:AddDefaultCharset Off -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:FileInfo Estado:Core Mdulo:core @@ -390,7 +411,7 @@ be passed through Sintaxis:AllowOverride All|None|directive-type [directive-type] ... Valor por defecto:AllowOverride None (2.3.9 and later), AllowOverride All (2.3.8 and earlier) -Contexto:directory +Contexto:directorio Estado:Core Mdulo:core @@ -504,12 +525,13 @@ be passed through Sintaxis:AllowOverrideList None|directive [directive-type] ... Valor por defecto:AllowOverrideList None -Contexto:directory +Contexto:directorio Estado:Core Mdulo:core -

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    Consulte tambin

    +

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    top
    +

    CGIPassAuth Directiva

    + + + + + + + + + +
    Descripcin:Enables passing HTTP authorization headers to scripts as CGI +variables
    Sintaxis:CGIPassAuth On|Off
    Valor por defecto:CGIPassAuth Off
    Contexto:directorio, .htaccess
    Prevalece sobre:AuthConfig
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache HTTP Server 2.4.13 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top
    +

    CGIVar Directiva

    + + + + + + + + +
    Descripcin:Controls how some CGI variables are set
    Sintaxis:CGIVar variable rule
    Contexto:directorio, .htaccess
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache HTTP Server 2.4.21 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top

    ContentDigest Directiva

    - + @@ -575,6 +627,26 @@ headers SSI documents, output from CGI scripts, and byte range responses do not have this header.

    + +
    top
    +
    Descripcin:Enables the generation of Content-MD5 HTTP Response headers
    Sintaxis:ContentDigest On|Off
    Valor por defecto:ContentDigest Off
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:Options
    Estado:Core
    Mdulo:core
    + + + + + + + +
    Descripcin:Base directory for the server run-time files
    Sintaxis:DefaultRuntimeDir directory-path
    Valor por defecto:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    Contexto:server config
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache 2.4.2 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    +
    top

    DefaultType Directiva

    @@ -586,7 +658,7 @@ which no other media type configuration could be found. Sintaxis:DefaultType media-type|none Valor por defecto:DefaultType none -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:FileInfo Estado:Core Mdulo:core @@ -857,13 +929,14 @@ previous <If> or <ElseIf> section is not satisfied by a request at runtime Sintaxis:<Else> ... </Else> -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:All Estado:Core Mdulo:core -

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    Consulte tambin

    +

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    • <If>
    • <ElseIf>
    • @@ -884,13 +957,14 @@ by a request at runtime while the condition of a previous <ElseIf> section is not satisfied Sintaxis:<ElseIf expression> ... </ElseIf> -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:All Estado:Core Mdulo:core -

      The documentation for this directive has - not been translated yet. Please have a look at the English - version.

      Consulte tambin

      +

      La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

      Consulte tambin

      • Expressions in Apache HTTP Server, for a complete reference and more examples.
      • @@ -910,7 +984,7 @@ for a complete reference and more examples. Descripcin:Use memory-mapping to read files during delivery Sintaxis:EnableMMAP On|Off Valor por defecto:EnableMMAP On -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:FileInfo Estado:Core Mdulo:core @@ -960,7 +1034,7 @@ for a complete reference and more examples. Descripcin:Use the kernel sendfile support to deliver files to the client Sintaxis:EnableSendfile On|Off Valor por defecto:EnableSendfile Off -Contexto:server config, virtual host, directory, .htaccess +Contexto:server config, virtual host, directorio, .htaccess Prevalece sobre:FileInfo Estado:Core Mdulo:core @@ -1023,7 +1097,7 @@ version 2.3.9. - + @@ -1060,7 +1134,7 @@ version 2.3.9. - + @@ -1401,7 +1475,7 @@ request HTTP response header for static files - + @@ -1465,7 +1539,7 @@ HTTP response header for static files - + @@ -1517,7 +1591,7 @@ filenames - + @@ -1547,7 +1621,7 @@ filenames - + @@ -1607,7 +1681,7 @@ media type in the HTTP Content-Type header field
        Descripcin:Abort configuration parsing with a custom error message
        Sintaxis:Error message
        Contexto:server config, virtual host, directory, .htaccess
        Contexto:server config, virtual host, directorio, .htaccess
        Estado:Core
        Mdulo:core
        Compatibilidad:2.3.9 and later
        Descripcin:What the server will return to the client in case of an error
        Sintaxis:ErrorDocument error-code document
        Contexto:server config, virtual host, directory, .htaccess
        Contexto:server config, virtual host, directorio, .htaccess
        Prevalece sobre:FileInfo
        Estado:Core
        Mdulo:core
        Sintaxis:FileETag component ...
        Valor por defecto:FileETag INode MTime Size
        Contexto:server config, virtual host, directory, .htaccess
        Contexto:server config, virtual host, directorio, .htaccess
        Prevalece sobre:FileInfo
        Estado:Core
        Mdulo:core
        Descripcin:Contains directives that apply to matched filenames
        Sintaxis:<Files filename> ... </Files>
        Contexto:server config, virtual host, directory, .htaccess
        Contexto:server config, virtual host, directorio, .htaccess
        Prevalece sobre:All
        Estado:Core
        Mdulo:core
        Descripcin:Contains directives that apply to regular-expression matched filenames
        Sintaxis:<FilesMatch regex> ... </FilesMatch>
        Contexto:server config, virtual host, directory, .htaccess
        Contexto:server config, virtual host, directorio, .htaccess
        Prevalece sobre:All
        Estado:Core
        Mdulo:core
        Descripcin:Forces all matching files to be served with the specified media type in the HTTP Content-Type header field
        Sintaxis:ForceType media-type|None
        Contexto:directory, .htaccess
        Contexto:directorio, .htaccess
        Prevalece sobre:FileInfo
        Estado:Core
        Mdulo:core
        Estado:Core
        Mdulo:core
        -

        When the server has been compiled with gprof profiling suppport, +

        When the server has been compiled with gprof profiling support, GprofDir causes gmon.out files to be written to the specified directory when the process exits. If the argument ends with a percent symbol ('%'), subdirectories are created @@ -1623,7 +1697,7 @@ media type in the HTTP Content-Type header field Descripcin:Enables DNS lookups on client IP addresses Sintaxis:HostnameLookups On|Off|Double Valor por defecto:HostnameLookups Off -Contexto:server config, virtual host, directory +Contexto:server config, virtual host, directorio Estado:Core Mdulo:core @@ -1659,12 +1733,27 @@ media type in the HTTP Content-Type header field

    top
    +

    HttpProtocolOptions Directiva

    + + + + + + + + +
    Descripcin:Modify restrictions on HTTP Request Messages
    Sintaxis:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
    Valor por defecto:HttpProtocolOptions Strict LenientMethods Allow0.9
    Contexto:server config, virtual host
    Estado:Core
    Mdulo:core
    Compatibilidad:2.2.32 or 2.4.24 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top

    <If> Directiva

    - + @@ -1710,7 +1799,7 @@ for a complete reference and more examples. if a test is true at startup - + @@ -1779,7 +1868,7 @@ if a test is true at startup presence or absence of a specific module - + @@ -1831,7 +1920,7 @@ later. - +
    top
    +
    Descripcin:Contains directives that apply only if a condition is satisfied by a request at runtime
    Sintaxis:<If expression> ... </If>
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Sintaxis:<IfDefine [!]parameter-name> ... </IfDefine>
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Sintaxis:<IfModule [!]module-file|module-identifier> ... </IfModule>
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Descripcin:Includes other configuration files from within the server configuration files
    Sintaxis:Include [optional|strict] file-path|directory-path|wildcard
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Wildcard matching available in 2.0.41 and later, directory @@ -1921,6 +2010,25 @@ wildcard matching available in 2.3.6 and later
    + + + + + + +
    Descripcin:Includes other configuration files from within +the server configuration files
    Sintaxis:IncludeOptional file-path|directory-path|wildcard
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in 2.3.6 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    + +
    +
    top

    KeepAlive Directiva

    @@ -1995,7 +2103,7 @@ Apache httpd 2.3.2 and later methods - + @@ -2077,7 +2185,7 @@ methods except the named ones - + @@ -2143,7 +2251,7 @@ subrequests from the client - + @@ -2329,7 +2437,7 @@ from the client - + @@ -2518,7 +2626,7 @@ matching URLs [module:level] ... - + resource - + -
    Descripcin:Enables HTTP persistent connections
    Sintaxis:<Limit method [method] ... > ... </Limit>
    Contexto:directory, .htaccess
    Contexto:directorio, .htaccess
    Prevalece sobre:AuthConfig, Limit
    Estado:Core
    Mdulo:core
    Sintaxis:<LimitExcept method [method] ... > ... </LimitExcept>
    Contexto:directory, .htaccess
    Contexto:directorio, .htaccess
    Prevalece sobre:AuthConfig, Limit
    Estado:Core
    Mdulo:core
    Sintaxis:LimitRequestBody bytes
    Valor por defecto:LimitRequestBody 0
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Descripcin:Limits the size of an XML-based request body
    Sintaxis:LimitXMLRequestBody bytes
    Valor por defecto:LimitXMLRequestBody 1000000
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Valor por defecto:LogLevel warn
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Per-module and per-directory configuration is available in @@ -2748,13 +2856,14 @@ connection
    Sintaxis:MaxRangeOverlaps default | unlimited | none | number-of-ranges
    Valor por defecto:MaxRangeOverlaps 20
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    top

    MaxRangeReversals Directiva

    @@ -2762,13 +2871,14 @@ connection resource - + -
    Sintaxis:MaxRangeReversals default | unlimited | none | number-of-ranges
    Valor por defecto:MaxRangeReversals 20
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    top

    MaxRanges Directiva

    @@ -2776,13 +2886,28 @@ connection resource - + -
    Sintaxis:MaxRanges default | unlimited | none | number-of-ranges
    Valor por defecto:MaxRanges 200
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    Compatibilidad:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top
    +

    MergeTrailers Directiva

    + + + + + + + + +
    Descripcin:Determines whether trailers are merged into headers
    Sintaxis:MergeTrailers [on|off]
    Valor por defecto:MergeTrailers off
    Contexto:server config, virtual host
    Estado:Core
    Mdulo:core
    Compatibilidad:2.4.11 and later

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    top

    Mutex Directiva

    @@ -3104,7 +3229,7 @@ directory - + @@ -3293,13 +3418,78 @@ On Windows from Apache 2.3.3 and later.
    top
    +
    Sintaxis:Options [+|-]option [[+|-]option] ...
    Valor por defecto:Options All
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:Options
    Estado:Core
    Mdulo:core
    + + + + + + + +
    Descripcin:Protocols available for a server/virtual host
    Sintaxis:Protocols protocol ...
    Valor por defecto:Protocols http/1.1
    Contexto:server config, virtual host
    Estado:Core
    Mdulo:core
    Compatibilidad:Only available from Apache 2.4.17 and later.

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    + +
    +
    top
    +

    ProtocolsHonorOrder Directiva

    + + + + + + + + +
    Descripcin:Determines if order of Protocols determines precedence during negotiation
    Sintaxis:ProtocolsHonorOrder On|Off
    Valor por defecto:ProtocolsHonorOrder On
    Contexto:server config, virtual host
    Estado:Core
    Mdulo:core
    Compatibilidad:Only available from Apache 2.4.17 and later.

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    Consulte tambin

    + +
    +
    top
    +

    QualifyRedirectURL Directiva

    + + + + + + + + + +
    Descripcin:Controls whether the REDIRECT_URL environment variable is + fully qualified
    Sintaxis:QualifyRedirectURL ON|OFF
    Valor por defecto:QualifyRedirectURL OFF
    Contexto:server config, virtual host, directorio
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Compatibilidad:Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL ON' was configured.

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top
    +

    RegisterHttpMethod Directiva

    + + + + + + +
    Descripcin:Register non-standard HTTP methods
    Sintaxis:RegisterHttpMethod method [method [...]]
    Contexto:server config
    Estado:Core
    Mdulo:core

    La Documentacin para esta directiva + no ha sido traducida an. Por favor use la versin en ingls + mientras tanto. +

    +
    top

    RLimitCPU Directiva

    - + @@ -3335,7 +3525,7 @@ by Apache httpd children by Apache httpd children - + @@ -3371,7 +3561,7 @@ by Apache httpd children processes launched by Apache httpd children - + @@ -3415,7 +3605,7 @@ processes launched by Apache httpd children scripts - + @@ -3711,7 +3901,7 @@ is accessed by an incompatible browser - + @@ -3815,7 +4005,7 @@ header - + @@ -3865,7 +4055,7 @@ handler - + @@ -3892,7 +4082,7 @@ input - + @@ -4011,7 +4201,7 @@ certain events before failing a request port - +
    Descripcin:Limits the CPU consumption of processes launched by Apache httpd children
    Sintaxis:RLimitCPU seconds|max [seconds|max]
    Valor por defecto:Unset; uses operating system defaults
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Sintaxis:RLimitMEM bytes|max [bytes|max]
    Valor por defecto:Unset; uses operating system defaults
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Sintaxis:RLimitNPROC number|max [number|max]
    Valor por defecto:Unset; uses operating system defaults
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Sintaxis:ScriptInterpreterSource Registry|Registry-Strict|Script
    Valor por defecto:ScriptInterpreterSource Script
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Descripcin:Configures the footer on server-generated documents
    Sintaxis:ServerSignature On|Off|EMail
    Valor por defecto:ServerSignature Off
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:All
    Estado:Core
    Mdulo:core
    Descripcin:Forces all matching files to be processed by a handler
    Sintaxis:SetHandler handler-name|None
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Descripcin:Sets the filters that will process client requests and POST input
    Sintaxis:SetInputFilter filter[;filter...]
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Descripcin:Sets the filters that will process responses from the server
    Sintaxis:SetOutputFilter filter[;filter...]
    Contexto:server config, virtual host, directory, .htaccess
    Contexto:server config, virtual host, directorio, .htaccess
    Prevalece sobre:FileInfo
    Estado:Core
    Mdulo:core
    Sintaxis:UseCanonicalName On|Off|DNS
    Valor por defecto:UseCanonicalName Off
    Contexto:server config, virtual host, directory
    Contexto:server config, virtual host, directorio
    Estado:Core
    Mdulo:core
    @@ -4075,7 +4265,7 @@ port port Sintaxis:UseCanonicalPhysicalPort On|Off Valor por defecto:UseCanonicalPhysicalPort Off -Contexto:server config, virtual host, directory +Contexto:server config, virtual host, directorio Estado:Core Mdulo:core @@ -4247,7 +4437,28 @@ hostname or IP address  fr  |  ja  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/core.html.fr b/docs/manual/mod/core.html.fr index 8345341c78c..31b255ff4cf 100644 --- a/docs/manual/mod/core.html.fr +++ b/docs/manual/mod/core.html.fr @@ -1,23 +1,28 @@ - -core - Serveur Apache HTTP +core - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Fonctionalits de Base Apache

    @@ -28,6 +33,8 @@  ja  |  tr 

    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    Description:Fonctionnalits de base du serveur HTTP Apache toujours disponibles
    Statut:Core
    @@ -42,7 +49,10 @@ disponibles
  • AllowOverride
  • AllowOverrideList
  • CGIMapExtension
  • +
  • CGIPassAuth
  • +
  • CGIVar
  • ContentDigest
  • +
  • DefaultRuntimeDir
  • DefaultType
  • Define
  • <Directory>
  • @@ -63,10 +73,12 @@ disponibles
  • ForceType
  • GprofDir
  • HostnameLookups
  • +
  • HttpProtocolOptions
  • <If>
  • <IfDefine>
  • <IfModule>
  • Include
  • +
  • IncludeOptional
  • KeepAlive
  • KeepAliveTimeout
  • <Limit>
  • @@ -84,10 +96,15 @@ disponibles
  • MaxRangeOverlaps
  • MaxRangeReversals
  • MaxRanges
  • +
  • MergeTrailers
  • Mutex
  • NameVirtualHost
  • Options
  • Protocol
  • +
  • Protocols
  • +
  • ProtocolsHonorOrder
  • +
  • QualifyRedirectURL
  • +
  • RegisterHttpMethod
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • @@ -110,10 +127,12 @@ disponibles
  • UseCanonicalPhysicalPort
  • <VirtualHost>
  • -
    +

    Traitement des bugs

    Voir aussi

    +
    top
    -

    AcceptFilter Directive

    +

    Directive AcceptFilter

    @@ -122,8 +141,6 @@ d'acceptation -
    Description:Permet d'optimiser la configuration d'une socket pour l'coute d'un protocole
    Contexte:configuration du serveur
    Statut:Core
    Module:core
    Compatibilit:Disponible depuis la version 2.3.3 sous Windows et 2.1.5 -sur les autres plates-formes.

    Cette directive permet d'effectuer une optimisation de la socket d'coute d'un type de protocole en fonction du systme @@ -138,7 +155,8 @@ sur les autres plates-formes. filtre d'acceptation pour ce protocole. Ceci s'avre utile pour les protocoles qui ncessitent l'envoi de donnes par le serveur en premier, comme ftp: ou nntp:

    -

    AcceptFilter nntp none

    +
    AcceptFilter nntp none
    +

    Les noms de protocoles par dfaut sont https pour le port 443 et http pour tous les autres ports. Pour @@ -146,10 +164,9 @@ sur les autres plates-formes. ajoutez l'argument protocol la directive Listen.

    Sous FreeBSD, les valeurs par dfaut sont :

    -

    - AcceptFilter http httpready
    - AcceptFilter https dataready -

    +
    AcceptFilter http httpready
    +AcceptFilter https dataready
    +

    Le filtre d'acceptation httpready met en tampon des requtes HTTP entires au niveau du noyau. Quand une requte @@ -158,31 +175,24 @@ sur les autres plates-formes. HTTPS sont chiffres, celles-ci n'autorisent que le filtre accf_data(9).

    Sous Linux, les valeurs par dfaut sont :

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http data
    +AcceptFilter https data
    +

    Le filtre TCP_DEFER_ACCEPT de Linux ne supporte pas la mise en tampon des requtes http. Toute valeur autre que none active le filtre TCP_DEFER_ACCEPT pour ce protocole. Pour plus de dtails, voir la page de - manuel Linux de tcp(7).

    + manuel Linux de tcp(7).

    Sous Windows, les valeurs par dfaut sont :

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http connect
    +AcceptFilter https connect
    +

    Le module MPM pour Windows mpm_winnt utilise la directive AcceptFilter comme commutateur de l'API AcceptEx(), et ne supporte - pas la mise en tampon du protocole http. Deux valeurs utilisent - l'API Windows AcceptEx() et vont recycler les sockets rseau entre - les connexions. data attend jusqu' ce que les donnes - aient t transmises comme dcrit plus haut, et le tampon de donnes - initiales ainsi que les adresses rseau finales sont tous extraits - grce une seule invocation d'AcceptEx(). connect + pas la mise en tampon du protocole http. connect utilise l'API AcceptEx(), extrait aussi les adresses rseau finales, mais l'instar de none, la valeur connect n'attend pas la transmission des donnes initiales.

    @@ -194,14 +204,31 @@ sur les autres plates-formes. pilotes vpn, ou les filtres anti-spam, anti-virus ou anti-spyware.

    +
    +

    L'AcceptFilter data (Windows)

    + +

    Jusqu' la version 2.4.23, le filtre d'acceptation data + attendait que des donnes aient t transmises et que le tampon de donnes + initial et l'adresse rseau finale aient t dtermins par l'invocation + AcceptEx(). Cette implmentation tant vulnrable une attaque de type + denial of service, elle a t dsactive.

    + +

    La version actuelle de httpd prend par dfaut le filtre + connect sous Windows, et reprendra la valeur + data si data est spcifi. Il est fortement + conseill aux utilisateurs des versions plus anciennes de dfinir + explicitement le filtre connect pour leurs AcceptFilter + comme indiqu plus haut.

    +
    +

    Voir aussi

    top
    -

    AcceptPathInfo Directive

    +

    Directive AcceptPathInfo

    @@ -211,8 +238,6 @@ nom de chemin en fin de requ -
    Description:Les ressources acceptent des informations sous forme d'un nom de chemin en fin de requte.
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Disponible dans Apache httpd version 2.0.30 et -suprieures

    Cette directive permet de dfinir si les requtes contenant des @@ -259,21 +284,18 @@ sup sur PATH_INFO. Le gestionnaire de base va en gnral rejeter la requte, et vous pouvez utiliser la configuration suivante pour utiliser un tel script :

    +
    <Files "mypaths.shtml">
    +  Options +Includes
    +  SetOutputFilter INCLUDES
    +  AcceptPathInfo On
    +</Files>
    -

    - <Files "mes-chemins.shtml">
    - - Options +Includes
    - SetOutputFilter INCLUDES
    - AcceptPathInfo On
    -
    - </Files> -

    +
    top
    -

    AccessFileName Directive

    +

    Directive AccessFileName

    Description:Nom du fichier de configuration distribu
    Syntaxe:AccessFileName nom-du-fichier @@ -289,9 +311,8 @@ sup partir du moment o les fichiers de configuration distribus sont activs pour ce rpertoire. Par exemple :

    -

    - AccessFileName .acl -

    +
    AccessFileName .acl
    +

    avant de renvoyer le document /usr/local/web/index.html, le serveur va rechercher les @@ -300,13 +321,10 @@ sup pour y lire d'ventuelles directives, moins quelles n'aient t dsactives avec

    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory> -

    +
    <Directory "/">
    +    AllowOverride None
    +</Directory>
    +

    Voir aussi

      @@ -316,7 +334,7 @@ sup
    top
    -

    AddDefaultCharset Directive

    +

    Directive AddDefaultCharset

    -
    Description:Paramtre jeu de caractres par dfaut ajouter quand le type de contenu d'une rponse est text/plain ou @@ -345,9 +363,8 @@ type de contenu d'une r types de mdia Internet (types MIME). Par exemple :

    -

    - AddDefaultCharset utf-8 -

    +
    AddDefaultCharset utf-8
    +

    La directive AddDefaultCharset ne doit tre utilise que lorsque toutes les ressources textes auxquelles @@ -369,7 +386,7 @@ type de contenu d'une r

    top
    -

    AllowEncodedSlashes Directive

    +

    Directive AllowEncodedSlashes

    @@ -378,8 +395,7 @@ autoris -
    Description:Dtermine si les sparateurs de chemin encods sont autoriss transiter dans les URLs tels quels
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible dans Apache httpd version 2.0.46 et -suprieures. L'option NoDecode est disponible depuis la version +
    Compatibilit:L'option NoDecode est disponible depuis la version 2.3.12.

    La directive AllowEncodedSlashes permet @@ -416,7 +432,7 @@ sup

    top
    -

    AllowOverride Directive

    +

    Directive AllowOverride

    @@ -458,7 +474,7 @@ All pour les versions ant
    - Permet l'utilisation des directives d'autorisation (AuthDBMGroupFile, + Permet l'utilisation des directives d'autorisation (AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, @@ -472,7 +488,8 @@ All pour les versions ant SetHandler, SetInputFilter, SetOutputFilter, et directives du module mod_mime Add* et Remove*), des metadonnes des documents (Header, RequestHeader, SetEnvIf, SetEnvIfNoCase, BrowserMatch, CookieExpires, CookieDomain, CookieStyle, CookieTracking, CookieName), des directives du - module mod_rewrite RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule) et de la directive + module mod_rewrite directives (RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule), des directives du + module mod_alias directives (Redirect, RedirectTemp, RedirectPermanent, RedirectMatch), et de la directive Action du module mod_actions.
    @@ -484,14 +501,43 @@ All pour les versions ant des rpertoires (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, - DefaultIcon, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions, ReadmeName, + DefaultIcon, DirectoryIndex, FancyIndexing, + HeaderName, IndexIgnore, IndexOptions, ReadmeName, etc...).
    Limit
    Permet l'utilisation des directives contrlant l'accs au serveur - (Allow, Deny et Order).
    + (Allow, Deny et Order). + +
    Nonfatal=[Override|Unknown|All]
    + +
    + Permet d'utiliser l'option AllowOverride pour rendre les erreurs + de syntaxe non fatales dans les fichiers .htaccess : au lieu de + causer une Internal Server Error, les directives non autorises ou + non reconnues seront ignores et un avertissement enregistr dans + le journal : +
      +
    • Nonfatal=Override rend les directives + interdite par AllowOverride non fatales.
    • +
    • Nonfatal=Unknown rend les directives + inconnues non fatales. Sont concernes les erreurs de frappe + et les directives implmentes par un module non charg.
    • +
    • Nonfatal=All rend toutes les directives + prcdentes non fatales.
    • +
    +

    Notez qu'une erreur de syntaxe dans une directive valide + causera toujours une internal server error.

    +

    Scurit

    + Les erreurs non fatales peuvent tre l'origine de problmes + de scurit pour les utilisateurs de fichiers .htaccess. Par + exemple, si AllowOverride interdit AuthConfig, toute + configuration utilisateur destine restreindre l'accs un + site ne sera pas prise en compte. +
    +
    Options[=Option,...]
    @@ -512,15 +558,18 @@ All pour les versions ant active tout en permettant toute autre option d'tre active.

    + +

    + AllowOverride Options=Indexes,MultiViews +

    Exemple :

    -

    - AllowOverride AuthConfig Indexes -

    +
    AllowOverride AuthConfig Indexes
    +

    Dans l'exemple ci-dessus, toutes les directives qui ne font partie ni du groupe AuthConfig, ni du groupe @@ -529,7 +578,7 @@ All pour les versions ant

    Pour des raisons de scurit et de performance, ne dfinissez pas AllowOverride autre chose que - None dans votre bloc <Directory />. + None dans votre bloc <Directory "/">. Recherchez plutt (ou crez) le bloc <Directory> qui se rfre au rpertoire o vous allez prcisment placer un fichier .htaccess.

    @@ -544,7 +593,7 @@ All pour les versions ant
    top
    -
    Description:Types de directives autorises dans les fichiers .htaccess
    Description:Directives autorises dans les fichiers .htaccess
    Syntaxe:AllowOverrideList None|directive @@ -572,10 +621,9 @@ All pour les versions ant

    Example:

    -

    - AllowOverride None
    - AllowOverrideList Redirect RedirectMatch -

    +
    AllowOverride None
    +AllowOverrideList Redirect RedirectMatch
    +

    Dans l'exemple ci-dessus, seules les directives Redirect et RedirectMatch sont autorises. @@ -583,10 +631,9 @@ All pour les versions ant

    Example:

    -

    - AllowOverride AuthConfig
    - AllowOverrideList CookieTracking CookieName -

    +
    AllowOverride AuthConfig
    +AllowOverrideList CookieTracking CookieName
    +

    Dans l'exemple ci-dessus, la directive AllowOverride autorise les directives du groupement AuthConfig, et @@ -603,7 +650,7 @@ All pour les versions ant

    top
    -

    CGIMapExtension Directive

    +

    Directive CGIMapExtension

    @@ -622,7 +669,75 @@ scripts CGI
    top
    -
    Description:Technique permettant de localiser l'interprteur des scripts CGI
    + + + + + + + + +
    Description:Active la transmission d'en-ttes d'autorisation HTTP aux scripts en +tant que variables CGI
    Syntaxe:CGIPassAuth On|Off
    Dfaut:CGIPassAuth Off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.4.13 du serveur HTTP +Apache
    +

    La directive CGIPassAuth permet aux + scripts d'accder aux en-ttes d'autorisation HTTP tels que + Authorization, en-tte ncessaire aux scripts qui + implmente une authentification HTTP de base. Normalement, ces + en-ttes HTTP sont invisibles pour les scripts car ils leurs + permettraient de voir les identifiants et mots de passe + utiliss pour accder au serveur lorsque l'authentification HTTP de + base est active au niveau du serveur web. Cette directive doit tre + dfinie "On" lorsque des scripts sont autoriss implmenter une + authentification HTTP de base.

    + +

    Cette directive constitue une alternative l'option de + compilation SECURITY_HOLE_PASS_AUTHORIZATION qui tait + dj disponible dans les versions prcdentes du serveur HTTP + Apache.

    + +

    Cette option est prise en compte par tout module qui utilise + ap_add_common_vars(), comme mod_cgi, + mod_cgid, mod_proxy_fcgi, + mod_proxy_scgi, etc... En particulier, elle affecte + les modules qui ne traitent pas proprement parler les requtes, + mais utilisent quand-mme cette API, comme + mod_include ou mod_ext_filter. Les + modules tiers qui n'utilisent pas ap_add_common_vars() + peuvent aussi choisir de prendre en compte cette option.

    + +
    +
    top
    +

    Directive CGIVar

    + + + + + + + + +
    Description:Contrle la manire dont certaines variables CGI sont dfinies
    Syntaxe:CGIVar variable rule
    Contexte:rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.4.21 du serveur HTTP Apache
    +

    Cette directive permet de contrler la manire dont certaines variables CGI + sont dfinies.

    + +

    rgles REQUEST_URI :

    +
    +
    original-uri (valeur par dfaut)
    +
    La valeur est extraite de la requte originale, et ne tient pas compte + des redirections internes ou des sous-requtes qui pourraient modifier la + ressource demande.
    +
    current-uri
    +
    La valeur reflte la ressource en cours de traitement ; elle peut tre + diffrente de la ressource demande dans la requte initiale du client suite + d'ventuelles redirections internes ou sous-requtes.
    +
    + +
    +
    top
    +

    Directive ContentDigest

    @@ -664,7 +779,47 @@ dans la r
    top
    -
    Description:Active la gnration d'un en-tte Content-MD5 dans la rponse HTTP
    + + + + + + + +
    Description:Rpertoire de base des fichiers crs au cours de l'excution du serveur
    Syntaxe:DefaultRuntimeDir chemin-rpertoire
    Dfaut:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    Contexte:configuration du serveur
    Statut:Core
    Module:core
    Compatibilit:Disponible depuis la version 2.4.2 du serveur HTTP Apache
    +

    La directive DefaultRuntimeDir permet de + dfinir le rpertoire dans lequel le serveur va crer les diffrents + fichiers relatifs son excution (mmoire partage, verrous, + etc...). Si le chemin spcifi est relatif, le chemin absolu sera + gnr relativement la valeur de la directive + ServerRoot

    + +

    Example

    +
    DefaultRuntimeDir scratch/
    + + +

    La valeur par dfaut de la directive + DefaultRuntimeDir peut tre modifie en + changeant la valeur de la macro DEFAULT_REL_RUNTIMEDIR + dfinie la compilation.

    + +

    Note: si la valeur de ServerRoot n'a pas + t spcifie avant d'utiliser cette directive, c'est la valeur par + dfaut de ServerRoot qui sera utilise pour + dfinir la base du rpertoire.

    + + +

    Voir aussi

    +
      +
    • Voir les conseils propos de +ssurit pour plus d'informations en vue de dfinir correctement les +permissions sur la racine du serveur ServerRoot
    • +
    +
    +
    top
    +

    Directive DefaultType

    -
    Description:Les seuls effets de cette directive sont des missions d'avertissements si sa valeur est diffrente de none. Dans @@ -687,9 +842,9 @@ DESACTIV tre spcifie avec la valeur none, c'est dire sans type de mdium par dfaut. Par exemple :

    -

    - DefaultType None -

    +
    DefaultType None
    + +

    DefaultType None n'est disponible que dans les versions d'Apache 2.2.7 et suprieures.

    @@ -704,7 +859,7 @@ DESACTIV
    top
    -

    Define Directive

    +

    Directive Define

    @@ -724,22 +879,30 @@ DESACTIV La porte de la variable est toujours globale, et n'est jamais limite la section de configuration courante.

    -

    - <IfDefine TEST>
    -   Define servername test.example.com
    - </IfDefine>
    - <IfDefine !TEST>
    -   Define servername www.example.com
    -   Define SSL
    - </IfDefine>
    -

    +
    <IfDefine TEST>
    +  Define servername test.example.com
    +</IfDefine>
    +<IfDefine !TEST>
    +  Define servername www.example.com
    +  Define SSL
    +</IfDefine>
    +
    +DocumentRoot "/var/www/${servername}/htdocs"
    +

    Le caractre ":" est interdit dans les noms de variables afin d'viter les conflits avec la syntaxe de la directive RewriteMap.

    +

    Si cette directive est dfinie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultrieure, au del de tout bloc VirtualHost. Le support des autres sections + de configuration a t permis par erreur par l'implmentation initiale de + cette directive, et n'est conserv (avec des effets imprvisibles) que dans un + but de compatibilit ascendante.

    +
    top
    -
    Description:Permet de dfinir une variable
    Syntaxe:Define nom-paramtre [valeur-paramtre]
    extensions, vous pouvez ajouter la ligne suivante dans un fichier .htaccess de ce rpertoire :

    -

    - SetHandler imap-file -

    +
    SetHandler imap-file
    +

    Autre exemple : si vous voulez que le serveur affiche un compte-rendu d'tat chaque fois qu'une URL du type http://nom serveur/status est appele, vous pouvez ajouter ceci dans httpd.conf :

    -

    - <Location /status>
    - - SetHandler server-status
    -
    - </Location> -

    +
    <Location "/status">
    +  SetHandler server-status
    +</Location>
    + + +

    Vous pouvez aussi utiliser cette directive pour associer un + gestionnaire des fichiers possdant une extension de nom de + fichier particulire. Par exemple :

    + +
    <FilesMatch "\.php$">
    +    SetHandler application/x-httpd-php
    +</FilesMatch>
    + + +

    Pour rfrencer des variables spcifiques une requte, y compris les + rfrences arrires vers des expressions rationnelles nommes, vous pouvez + utiliser des expressions ayant pour valeur une chane :

    + +
    <LocationMatch ^/app/(?<sub>[^/]+)/>
    +     SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080"
    +</LocationMatch>
    +

    Vous pouvez craser la dfinition antrieure d'une directive SetHandler en utilisant la valeur @@ -4312,7 +4687,7 @@ gestionnaire particulier

    top
    -
    Description:Regroupe un ensemble de directives qui ne s'appliquent qu'au rpertoire concern du systme de fichiers, ses @@ -764,17 +927,18 @@ sous-r caractres. Les intervalles de caractres [] sont aussi autoriss. Aucun caractre gnrique ne peut remplacer le caractre `/', si bien que l'expression <Directory - /*/public_html> ne conviendra pas pour le chemin + "/*/public_html"> ne conviendra pas pour le chemin * /home/user/public_html, alors que <Directory - /home/*/public_html> conviendra. Exemple :

    + "/home/*/public_html"> conviendra. Exemple :

    -

    - <Directory /usr/local/httpd/htdocs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory> -

    +
    <Directory "/usr/local/httpd/htdocs">
    +  Options Indexes FollowSymLinks
    +</Directory>
    + + +

    Les chemins de rpertoires contenant des espaces doivent tre + entours de guillemets afin d'empcher l'interprtation de ces + espaces comme fins d'arguments.

    Soyez prudent avec l'argument chemin rpertoire : il @@ -790,9 +954,10 @@ sous-r peuvent aussi tre utilises en ajoutant le caractre ~. Par exemple :

    -

    - <Directory ~ "^/www/.*/[0-9]{3}"> -

    +
    <Directory ~ "^/www/[0-9]{3}">
    +
    +</Directory>
    +

    pourra correspondre tout rpertoire situ dans /www/ et dont le nom se compose de trois chiffres.

    @@ -804,19 +969,14 @@ sous-r directives des fichiers .htaccess. Par exemple, avec

    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory>
    -
    - <Directory /home>
    - - AllowOverride FileInfo
    -
    - </Directory> -

    +
    <Directory "/">
    +  AllowOverride None
    +</Directory>
    +
    +<Directory "/home">
    +  AllowOverride FileInfo
    +</Directory>
    +

    l'accs au document /home/web/dir/doc.html emprunte le chemin suivant :

    @@ -841,13 +1001,10 @@ sous-r tests selon l'ordre dans lequel ils apparaissent dans le fichier de configuration. Par exemple, avec

    -

    - <Directory ~ abc$>
    - - # ... directives here ...
    -
    - </Directory> -

    +
    <Directory ~ "abc$">
    +  # ... directives ici ...
    +</Directory>
    +

    la section avec expression rationnelle ne sera prise en compte qu'aprs les sections <Directory> sans expression rationnelle @@ -857,18 +1014,15 @@ sous-r correspondante s'appliquera.

    Notez que la politique d'accs par dfaut - dans les sections <Directory /> consiste + dans les sections <Directory "/"> consiste autoriser tout accs sans restriction. Ceci signifie qu'Apache httpd va servir tout fichier correspondant une URL. Il est recommand de modifier cette situation l'aide d'un bloc du style

    -

    - <Directory />
    - - Require all denied
    -
    - </Directory> -

    +
    <Directory "/">
    +  Require all denied
    +</Directory>
    +

    puis d'affiner la configuration pour les rpertoires que vous voulez rendre accessibles. Voir la page Conseils propos de scurit @@ -887,7 +1041,7 @@ combinent entre elles

    top
    -

    <DirectoryMatch> Directive

    +

    Directive <DirectoryMatch>

    @@ -903,11 +1057,12 @@ du syst prcis (et aux fichiers qu'il contient), comme pour la section <Directory>. Cependant, le rpertoire est prcis sous la forme d'une expression rationnelle. Par exemple :

    -

    - <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> -

    +
    <DirectoryMatch "^/www/(.+/)?[0-9]{3}/">
    +    # ...
    +</DirectoryMatch>
    + -

    conviendrait pour les sous-rpertoires de /www/ dont +

    convient pour les sous-rpertoires de /www/ dont le nom se compose de trois chiffres.

    Compatibilit

    @@ -924,6 +1079,22 @@ du syst de ligne ($) doivent donc faire l'objet d'une attention particulire.
    + +

    A partir de la version 2.4.8, les groupes nomms et les + rfrences arrires sont extraits et enregistrs dans + l'environnement avec leur nom en majuscules et prfix + par "MATCH_". Ceci permet + de rfrencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + viter toute confusion, les rfrences arrires numrotes (non + nommes) sont ignores. Vous devez utiliser la place des groupes + nomms.

    + +
    <DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)">
    +    Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</DirectoryMatch>
    + +

    Voir aussi

      @@ -937,12 +1108,12 @@ combinent entre elles
    top
    -
    Description:Regroupe des directives qui s'appliquent au contenu de rpertoires du systme de fichiers correspondant une expression rationnelle
    - + @@ -953,9 +1124,8 @@ depuis Internet de l'URL sera ajout par le serveur la racine des documents afin de construire le chemin du document recherch. Exemple :

    -

    - DocumentRoot /usr/web -

    +
    DocumentRoot "/usr/web"
    +

    un accs http://my.example.com/index.html se rfre alors /usr/web/index.html. Si chemin @@ -973,7 +1143,7 @@ correspondance des URLs avec le syst

    top
    -
    Description:Racine principale de l'arborescence des documents visible depuis Internet
    Syntaxe:DocumentRoot chemin rpertoire
    Dfaut:DocumentRoot /usr/local/apache/htdocs
    Dfaut:DocumentRoot "/usr/local/apache/htdocs"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    pas leur ajouter l'extension .gif, vous pouvez utiliser :

    -

    - ForceType image/gif -

    +
    ForceType image/gif
    +

    Notez que cette directive l'emporte sur d'autres associations de type de mdium indirectes dfinies dans mime.types ou via la @@ -1841,22 +2035,17 @@ HTTP Content-Type pour les fichiers correspondants ForceType en affectant la valeur None l'argument type mdium :

    -

    - # force le type MIME de tous les fichiers image/gif:
    - <Location /images>
    - - ForceType image/gif
    -
    - </Location>
    -
    - # mais utilise les mthodes classiques d'attribution du type MIME - # dans le sous-rpertoire suivant :
    - <Location /images/mixed>
    - - ForceType None
    -
    - </Location> -

    +
    # force le type MIME de tous les fichiers  image/gif:
    +<Location "/images">
    +  ForceType image/gif
    +</Location>
    +
    +# mais utilise les mthodes classiques d'attribution du type MIME
    +# dans le sous-rpertoire suivant :
    +<Location "/images/mixed">
    +  ForceType None
    +</Location>
    +

    A la base, cette directive crase le type de contenu gnr pour les fichiers statiques servis partir du sytme de fichiers. Pour @@ -1864,10 +2053,26 @@ HTTP Content-Type pour les fichiers correspondants gnrateur de rponse spcifie en gnral un type de contenu, cette directive est ignore.

    +

    Note

    +

    Lorsque des directives explicites comme SetHandler ou + module="mod_mime">AddHandler ne s'appliquent + pas la requte courante, le nom du gestionnaire interne + normalement dfini par ces directives correspondra alors au type de + contenu spcifi par cette directive. Il s'agit d'un + comportement historique que certains modules + tiers, comme mod_php, peuvent interprter comme un type de contenu + artificiel ne servant qu' indiquer le module qui doit prendre en + compte la requte considre. Dans la mesure du + possible, il est conseill d'viter les + configurations qui comportent de tels types artificiels en utilisant + les directives SetHandler ou + AddHandler.

    +
    +
    top
    -
    Description:Contient des directives qui ne s'appliquent que si la condition correspondant la section <If> ou <ElseIf> prcdente n'est pas satisfaite par la @@ -991,14 +1161,13 @@ requ suprieure et dans la mme porte n'ont pas t satisfaites. Par exemple, dans :

    -

    - <If "-z req('Host')">
    - ...
    - </If>
    - <Else>
    - ...
    - </Else>
    -

    +
    <If "-z req('Host')">
    +  # ...
    +</If>
    +<Else>
    +  # ...
    +</Else>
    +

    La condition de la section <If> serait satisfaite pour les requtes HTTP/1.0 sans en-tte Host:, alors que celle de la section @@ -1018,7 +1187,7 @@ requ

    top
    -

    <ElseIf> Directive

    +

    Directive <ElseIf>

    - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
    Description:Contient des directives qui ne s'appliquent que si la condition correspondante est satisfaite par une requte l'excution, @@ -1036,17 +1205,16 @@ alors que la condition correspondant ou <ElseIf> de la mme porte ne l'est pas. Par exemple, dans :

    -

    - <If "-R '10.1.0.0/16'">
    - ...
    - </If>
    - <ElseIf "-R '10.0.0.0/8'">
    - ...
    - </ElseIf>
    - <Else>
    - ...
    - </Else>
    -

    +
    <If "-R '10.1.0.0/16'">
    +  #...
    +</If>
    +<ElseIf "-R '10.0.0.0/8'">
    +  #...
    +</ElseIf>
    +<Else>
    +  #...
    +</Else>
    +

    La condition correspondant la section <ElseIf> est satisfaite si l'adresse distante de la requte appartient au sous-rseau 10.0.0.0/8, mais @@ -1067,7 +1235,7 @@ Apache, pour une r

    top
    -

    EnableMMAP Directive

    +

    Directive EnableMMAP

    @@ -1105,25 +1273,21 @@ lire les fichiers pendant qu'ils sont servis problme, il est prfrable de dsactiver la projection en mmoire des fichiers servis en spcifiant :

    -

    - EnableMMAP Off -

    +
    EnableMMAP Off
    +

    Pour les montages NFS, cette fonctionnalit peut tre explicitement dsactive pour les fichiers concerns en spcifiant :

    -

    - <Directory "/chemin vers montage NFS"> - - EnableMMAP Off - - </Directory> -

    +
    <Directory "/path-to-nfs-files">
    +  EnableMMAP Off
    +</Directory>
    +
    top
    -
    Description:Utilise la projection en mmoire (Memory-Mapping) pour lire les fichiers pendant qu'ils sont servis
    @@ -1133,8 +1297,7 @@ fichiers aux clients - +
    Description:Utilise le support sendfile du noyau pour servir les fichiers aux clients
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Disponible dans les versions 2.0.44 et -suprieures. Par dfaut Off depuis la version 2.3.9.
    Compatibilit:Par dfaut Off depuis la version 2.3.9.

    Cette directive dfinit si le programme httpd peut utiliser le support sendfile du noyau pour transmettre le @@ -1172,21 +1335,17 @@ sup problme, vous pouvez activer cette fonctionnalit en spcifiant :

    -

    - EnableSendfile On -

    +
    EnableSendfile On
    +

    Pour les montages rseau, cette fonctionnalit peut tre explicitement dsactive pour les fichiers concerns en spcifiant :

    -

    - <Directory "/chemin vers montage rseau"> - - EnableSendfile Off - - </Directory> -

    +
    <Directory "/path-to-nfs-files">
    +  EnableSendfile Off
    +</Directory>
    +

    Veuillez noter que la configuration de la directive EnableSendfile dans un contexte de rpertoire ou de fichier .htaccess n'est pas supporte par @@ -1197,7 +1356,7 @@ sup

    top
    -

    Error Directive

    +

    Directive Error

    @@ -1212,31 +1371,29 @@ d'erreur personnalis directive peut tre utilise pour gnrer un message d'erreur personnalis, et interrompre la lecture de la configuration.

    -

    Exemple

    - # vrification du chargement de mod_include
    - <IfModule !include_module>
    - Error mod_foo ncessite mod_include. Chargez-le via LoadModule.
    - </IfModule>
    -
    - # vrification de la dfinition de SSL ou (exclusif) NOSSL
    - <IfDefine SSL>
    - <IfDefine NOSSL>
    - Error SSL et NOSSL sont dfinies. Vous devez dfinir soit l'une, - soit l'autre.
    - </IfDefine>
    - </IfDefine>
    - <IfDefine !SSL>
    - <IfDefine !NOSSL>
    - Error Vous devez dfinir une et une seule des deux variables SSL - ou NOSSL.
    - </IfDefine>
    - </IfDefine>
    -

    +
    # Exemple
    +# vrification du chargement de mod_include
    +<IfModule !include_module>
    +  Error "mod_include is required by mod_foo.  Load it with LoadModule."
    +</IfModule>
    +
    +# vrification de la dfinition de SSL ou (exclusif) NOSSL
    +<IfDefine SSL>
    +<IfDefine NOSSL>
    +  Error "Both SSL and NOSSL are defined.  Define only one of them."
    +</IfDefine>
    +</IfDefine>
    +<IfDefine !SSL>
    +<IfDefine !NOSSL>
    +  Error "Either SSL or NOSSL must be defined."
    +</IfDefine>
    +</IfDefine>
    +
    top
    -
    Description:Interrompt la lecture de la configuration avec un message d'erreur personnalis
    @@ -1254,7 +1411,7 @@ d'erreur
  • afficher un message personnalis
  • -
  • rediriger vers un chemin d'URL local pour traiter +
  • rediriger en interne vers un chemin d'URL local pour traiter le problme ou l'erreur
  • rediriger vers une URL externe pour traiter @@ -1268,20 +1425,24 @@ d'erreur httpd fournit parfois des informations supplmentaires propos du problme ou de l'erreur.

    +

    A partir de la version 2.4.13, il est possible d'utiliser la syntaxe des expressions dans cette directive + afin de gnrer des chanes et URLs dynamiques.

    +

    Les URLs peuvent commencer par un slash (/) pour les chemins web locaux (relatifs au rpertoire dfini par la directive DocumentRoot), ou se prsenter sous la forme d'une URL complte que le client pourra rsoudre. Alternativement, un message afficher par le navigateur pourra tre - fourni. Exemples :

    + fourni. Notez que la dcision de considrer le paramtre comme URL, + chemin ou message intervient avant toute interprtation + d'expression. Exemples :

    + +
    ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi
    +ErrorDocument 404 /errors/bad_urls.php
    +ErrorDocument 401 /subscription_info.html
    +ErrorDocument 403 "Sorry can't allow you access today"
    +ErrorDocument 403 Forbidden!
    +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}}
    -

    - ErrorDocument 500 http://foo.example.com/cgi-bin/tester
    - ErrorDocument 404 /cgi-bin/bad_urls.pl
    - ErrorDocument 401 /subscription_info.html
    - ErrorDocument 403 "Dsol, vous n'avez pas l'autorisation d'accs - aujourd'hui"
    - ErrorDocument 403 Interdit! -

    De plus, on peut spcifier la valeur spciale default pour indiquer l'utilisation d'un simple message d'Apache httpd cod en @@ -1291,14 +1452,12 @@ d'erreur les configurations qui sans cela, hriteraient d'une directive ErrorDocument existante.

    -

    - ErrorDocument 404 /cgi-bin/bad_urls.pl

    - <Directory /web/docs>
    - - ErrorDocument 404 default
    -
    - </Directory> -

    +
    ErrorDocument 404 /cgi-bin/bad_urls.pl
    +
    +<Directory "/web/docs">
    +  ErrorDocument 404 default
    +</Directory>
    +

    Notez que lorsque vous spcifiez une directive ErrorDocument pointant vers une URL distante @@ -1352,7 +1511,7 @@ personnalisation des r

    top
    -
  • Description:Document que le serveur renvoie au client en cas d'erreur
    @@ -1367,17 +1526,15 @@ personnalisation des r absolu, il est considr comme relatif au chemin dfini par la directive ServerRoot.

    -

    Exemple

    - ErrorLog /var/log/httpd/error_log -

    +
    ErrorLog "/var/log/httpd/error_log"
    +

    Si le chemin fichier commence par une barre verticale "(|)", il est considr comme une commande lancer pour traiter la journalisation de l'erreur.

    -

    Exemple

    - ErrorLog "|/usr/local/bin/erreurs_httpd" -

    +
    ErrorLog "|/usr/local/bin/httpd_errors"
    +

    Voir les notes propos des journaux redirigs pour plus d'informations.

    @@ -1392,9 +1549,12 @@ personnalisation des r global, et si il est modifi dans un serveur virtuel, le dispositif final spcifi affecte l'ensemble du serveur

    -

    Exemple

    - ErrorLog syslog:user -

    +
    ErrorLog syslog:user
    + + +

    Des modules supplmentaires peuvent fournir leurs propres + fournisseurs ErrorLog. La syntaxe est similaire celle de + l'exemple syslog ci-dessus.

    SECURITE : Voir le document conseils propos de scurit pour des dtails sur les raisons pour lesquelles votre @@ -1417,22 +1577,21 @@ personnalisation des r

    top
    -
    Description:Dfinition du chemin du journal des erreurs
    Syntaxe: ErrorLog chemin fichier|syslog[:facility]
    -
    Description:Spcification du format des entres du journal des erreurs
    Syntaxe: ErrorLogFormat [connection|request] format
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible depuis la version 2.3.9 d'Apache

    La directive ErrorLogFormat permet de spcifier quelles informations supplmentaires vont tre enregistres dans le journal des erreurs en plus du message habituel.

    -

    Exemple simple

    - ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" -

    +
    # Exemple simple
    +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
    +

    La spcification de connection ou request comme premier paramtre permet de dfinir des @@ -1506,58 +1665,62 @@ personnalisation des r

    %% Le signe pourcentage
    %aAdresse IP et port distants
    %AAdresse IP et port clients
    %{c}aPort et adresse IP sous-jacents du correspondant pour la + connexion (voir le module + mod_remoteip)
    %A Adresse IP et port locaux
    %{name}e
    %{name}e Variable d'environnement de requte name
    %E
    %E Etat d'erreur APR/OS et chane
    %F
    %F Nom du fichier source et numro de ligne de l'appel du journal
    %{name}i
    %{name}i En-tte de requte name
    %k
    %k Nombre de requtes persistantes pour cette connexion
    %l
    %l Svrit du message
    %L
    %L Identifiant journal de la requte
    %{c}L
    %{c}L Identifiant journal de la connexion
    %{C}L
    %{C}L Identifiant journal de la connexion si utilis dans la porte de la connexion, vide sinon
    %m
    %m Nom du module qui effectue la journalisation du message
    %M
    %M Le message effectif
    %{name}n
    %{name}n Note de requte name
    %P
    %P Identifiant du processus courant
    %T
    %T Identifiant du thread courant
    %{g}T
    %{g}T Identifiant unique de thread systme du thread courant (l'identifiant affich par la commande top par exemple ; seulement sous Linux pour l'instant)
    %t
    %t L'heure courante
    %{u}t
    %{u}t L'heure courante avec les microsecondes
    %{cu}t
    %{cu}t L'heure courante au format compact ISO 8601, avec les microsecondes
    %v
    %v Le nom de serveur canonique ServerName du serveur courant.
    %V
    %V Le nom de serveur du serveur qui sert la requte en accord avec la dfinition de la directive UseCanonicalName.
    (anti-slash espace)
    (anti-slash espace) Espace non dlimiteur
    (pourcentage espace)
    (pourcentage espace) Dlimiteur de champ (aucune sortie)
    @@ -1572,10 +1735,9 @@ personnalisation des r c'est son identifiant unique qui sera utilis comme identifiant de journal pour les requtes.

    -

    Exemple (format par dfaut)

    - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    # Exemple (format par dfaut pour les MPMs threads)
    +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%,\referer\%{Referer}i"
    +

    Cet exemple renverrait un message d'erreur du style :

    @@ -1586,19 +1748,17 @@ personnalisation des r

    Notez que, comme indiqu plus haut, certains champs sont totalement supprims s'ils n'ont pas t dfinis.

    -

    Exemple (similaire au format 2.2.x)

    - ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    # Exemple (similaire au format 2.2.x)
    +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M%,\referer\%{Referer}i"
    + + +
    # Exemple avanc avec identifiants journal de requte/connexion
    +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    -

    Exemple avanc avec identifiants journal de - requte/connexion

    - ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    - ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    - ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    -

    Voir aussi

    @@ -1609,7 +1769,7 @@ personnalisation des r
    top
    -

    ExtendedStatus Directive

    +

    Directive ExtendedStatus

    @@ -1622,7 +1782,7 @@ requ

    Cette option permet d'extraire des donnes supplmentaires concernant la requte en cours de traitement pour un processus - donn, ainsi qu'un rsum d'utilisation ; vous pouvez accder + donn, et cre un rsum d'utilisation ; vous pouvez accder ces variables pendant l'excution en configurant mod_status. Notez que d'autres modules sont susceptibles de s'appuyer sur ce tableau de bord.

    @@ -1646,16 +1806,18 @@ requ
    top
    -
    Description:Extrait des informations d'tat tendues pour chaque requte
    - + +
    Description:Caractristiques de fichier utilises lors de la gnration de l'en-tte de rponse HTTP ETag pour les fichiers statiques
    Syntaxe:FileETag composant ...
    Dfaut:FileETag INode MTime Size
    Dfaut:FileETag MTime Size
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:La valeur par dfaut tait "INode MTime Size" +dans les versions 2.3.14 et antrieures.

    La directive FileETag dfinit les @@ -1681,8 +1843,9 @@ de l'en-t

    La taille du fichier en octets sera incluse
    All
    Tous les champs disponibles seront utiliss. Cette dfinition - est quivalente :

    FileETag INode MTime - Size

    + est quivalente : +
    FileETag INode MTime Size
    +
    None
    Si le document se compose d'un fichier, aucun champ ETag ne sera inclus dans la rponse
    @@ -1706,7 +1869,7 @@ de l'en-t localisations o WebDAV est activ et qui utilisent mod_dav_fs comme fournisseur de stockage. mod_dav_fs utilise - INode MTime Size comme format fixe pour les + MTime Size comme format fixe pour les comparaisons de champs ETag dans les requtes conditionnelles. Ces requtes conditionnelles choueront si le format ETag est modifi via la directive @@ -1723,7 +1886,7 @@ de l'en-t
    top
    -

    <Files> Directive

    +

    Directive <Files>

    @@ -1751,12 +1914,24 @@ pr

    L'argument filename peut contenir un nom de fichier ou une chane de caractres avec caractres gnriques, o ? remplace un caractre, et * toute chane - de caractres. On peut aussi utiliser les Expressions rationnelles en ajoutant la + de caractres.

    +
    <Files "cat.html">
    +    # Insrer ici des directives qui s'appliquent au fichier cat.html
    +</Files>
    +
    +<Files "?at.*">
    +    # Les directives insres ici s'appliqueront aux fichiers
    +    # cat.html, bat.html, hat.php, et ainsi de suite.
    +</Files>
    + + +

    On peut aussi utiliser les Expressions rationnelles en ajoutant la caractre ~. Par exemple :

    -

    - <Files ~ "\.(gif|jpe?g|png)$"> -

    +
    <Files ~ "\.(gif|jpe?g|png)$">
    +    #...
    +</Files>
    +

    correspondrait la plupart des formats graphiques de l'Internet. Il est cependant prfrable d'utiliser la directive <FilesMatch>.

    @@ -1776,7 +1951,7 @@ entre elles
    top
    -
    Description:Contient des directives qui s'appliquent aux fichiers prciss
    @@ -1793,13 +1968,35 @@ sp expressions rationnelles. Par exemple :

    -

    - <FilesMatch "\.(gif|jpe?g|png)$"> -

    +
    <FilesMatch ".+\.(gif|jpe?g|png)$">
    +    # ...
    +</FilesMatch>
    +

    correspondrait la plupart des formats graphiques de l'Internet.

    +
    Les caractres .+ au dbut de l'expression + rationnelle permettent de s'assurer que les fichiers de nom + .png, ou .gif, par exemple, ne seront pas + pris en compte.
    + +

    A partir de la version 2.4.8, les groupes nomms et les + rfrences arrires sont extraits et enregistrs dans + l'environnement avec leur nom en majuscules et prfix + par "MATCH_". Ceci permet + de rfrencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + viter toute confusion, les rfrences arrires numrotes (non + nommes) sont ignores. Vous devez utiliser la place des groupes + nomms.

    + +
    <FilesMatch "^(?<sitename>[^/]+)">
    +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</FilesMatch>
    + + +

    Voir aussi

    top
    -
    Description:Contient des directives qui s'appliquent des fichiers spcifis sous la forme d'expressions rationnelles
    @@ -1818,8 +2015,6 @@ HTTP Content-Type pour les fichiers correspondants -
    Description:Force le type de mdium spcifi dans le champ d'en-tte HTTP Content-Type pour les fichiers correspondants
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Intgr dans le coeur d'Apache httpd depuis la version -2.0

    Lorsqu'elle est place dans un fichier .htaccess ou une section <Directory>, <Location>, ou <Files>, cette directive force @@ -1829,9 +2024,8 @@ HTTP Content-Type pour les fichiers correspondants

    @@ -1888,7 +2093,7 @@ gmon.out.
    top
    -
    Description:Rpertoire dans lequel crire les donnes de profiling gmon.out.
    @@ -1940,7 +2145,21 @@ clients
    top
    -
    Description:Active la recherche DNS sur les adresses IP des clients
    + + + + + + + +
    Description:Modify restrictions on HTTP Request Messages
    Syntaxe:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
    Dfaut:HttpProtocolOptions Strict LenientMethods Allow0.9
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:2.2.32 or 2.4.24 and later

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top
    +

    Directive <If>

    exemple, nous vous recommandons d'utiliser plutt la syntaxe avec caractres gnriques comme ci-dessous.

    -

    Lorsque la partie nom de fichier ou rpertoires - du chemin - comporte des caractres gnriques, et si aucun fichier ou - rpertoire ne correspond, la directive Include sera ignore - silencieusement. - Lorsqu'une partie rpertoires du chemin comporte - des caractres gnriques, et si aucun - rpertoire ne correspond, la directive Include chouera et renverra une - erreur - indiquant que le fichier ou le rpertoire n'a pas t trouv. -

    - -

    Pour contrler plus finement le comportement du serveur - lorsqu'aucun fichier ou rpertoire ne correspond, prfixez le chemin - avec les modificateurs optional ou strict. Si - optional est spcifi, tout fichier ou rpertoire avec - caractres gnriques qui ne correspond aucun fichier ou - rpertoire sera ignor silencieusement. Si strict est - spcifi, tout fichier ou rpertoire avec - caractres gnriques qui ne correspond pas au moins un fichier - fera chouer le dmarrage du serveur.

    - -

    Lorsqu'une partie fichier ou rpertoire du chemin est - spcipe sans caractres gnriques, et si ce fichier ou - rpertoire n'existe pas, la directive Include chouera avec un message - d'erreur indiquant que le fichier ou rpertoire n'a pas pu tre - trouv.

    +

    La directive Include + chouera avec un code d'erreur si une expression + contenant des caractres gnriques ne correspond aucun fichier. + Pour ignorer les expressions contenant des caractres gnriques ne + correspondant aucun fichier, utilisez la directive IncludeOptional.

    Le chemin fichier spcifi peut tre soit un chemin absolu, soit un chemin relatif au rpertoire dfini par la directive ServerRoot.

    Exemples :

    -

    - Include /usr/local/apache2/conf/ssl.conf
    - Include /usr/local/apache2/conf/vhosts/*.conf -

    +
    Include /usr/local/apache2/conf/ssl.conf
    +Include /usr/local/apache2/conf/vhosts/*.conf
    +

    ou encore, avec des chemins relatifs au rpertoire dfini par la directive ServerRoot :

    -

    - Include conf/ssl.conf
    - Include conf/vhosts/*.conf -

    +
    Include conf/ssl.conf
    +Include conf/vhosts/*.conf
    +

    On peut aussi insrer des caractres gnriques dans la partie - rpertoires du chemin. Dans l'exemple suivant, le dmarrage du - serveur chouera si aucun rpertoire ne correspond conf/vhosts/*, - mais russira si aucun fichier ne correspond *.conf :

    + rpertoires du chemin. Dans l'exemple suivant, la directive + chouera si aucun sous-rpertoire de conf/vhosts ne contient au + moins un fichier *.conf :

    -

    - Include conf/vhosts/*/vhost.conf
    - Include conf/vhosts/*/*.conf -

    +
    Include conf/vhosts/*/*.conf
    -

    Dans cet exemple, le dmarrage du serveur chouera si - conf/vhosts/* ne correspond aucun rpertoire, ou si *.conf ne - correspond aucun fichier :

    -

    - Include strict conf/vhosts/*/*.conf -

    +

    Par contre, dans l'exemple suivant, la directive sera simplement + ignore si aucun sous-rpertoire de conf/vhosts ne contient au + moins un fichier *.conf :

    + +
    IncludeOptional conf/vhosts/*/*.conf
    + -

    Dans cet exemple, le dmarrage du serveur russira si - conf/vhosts/* ne correspond aucun rpertoire, ou si *.conf ne - correspond aucun fichier.

    -

    - Include optional conf/vhosts/*/*.conf -

    +

    Voir aussi

    + + +
    top
    +
    Description:Contient des directives qui ne s'appliquent que si une condition est satisfaite au cours du traitement d'une @@ -1956,21 +2175,19 @@ requ si et seulement si l'expression renvoie la valeur "vrai". Par exemple :

    -

    - <If "-z req('Host')"> -

    +
    <If "-z req('Host')">
    +

    serait satisfaite pour les requtes HTTP/1.0 sans en-tte Host:. Les expressions peuvent contenir diffrents oprateurs de type shell pour la comparaison de chanes - (=, !=, <, ...), la + (==, !=, <, ...), la comparaison d'entiers (-eq, -ne, ...), ou usages divers (-n, -z, -f, ...). Les expressions rationnelles sont aussi supportes,

    -

    - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> -

    +
    <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">
    +

    ainsi que les comparaison de modles de type shell et de nombreuses autres oprations. Ces oprations peuvent tre effectues @@ -1978,6 +2195,16 @@ requ d'environnement (env), et un grand nombre d'autres proprits. La documentation complte est disponible dans Les expressions dans le serveur HTTP Apache.

    +

    Cette section de configuration ne peut contenir que des + directives qui supportent le contexte de rpertoire.

    + +
    + Certain variables, such as CONTENT_TYPE and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. +
    +

    Voir aussi

      @@ -1993,7 +2220,7 @@ directives <If>, &l
    top
    -

    <IfDefine> Directive

    +

    Directive <IfDefine>

    @@ -2035,36 +2262,25 @@ test retourne "vrai" au d peuvent tre imbriques, ce qui permet d'implmenter un test multi-paramtres simple. Exemple :

    -

    - httpd -DReverseProxy -DUseCache -DMemCache ...
    -
    - # httpd.conf
    - <IfDefine ReverseProxy>
    - - LoadModule proxy_module modules/mod_proxy.so
    - LoadModule proxy_http_module modules/mod_proxy_http.so
    - <IfDefine UseCache>
    - - LoadModule cache_module modules/mod_cache.so
    - <IfDefine MemCache>
    - - LoadModule mem_cache_module modules/mod_mem_cache.so
    -
    - </IfDefine>
    - <IfDefine !MemCache>
    - - LoadModule cache_disk_module modules/mod_cache_disk.so
    -
    - </IfDefine> -
    - </IfDefine> -
    - </IfDefine> -

    +

    httpd -DReverseProxy -DUseCache -DMemCache ...

    +
    <IfDefine ReverseProxy>
    +  LoadModule proxy_module   modules/mod_proxy.so
    +  LoadModule proxy_http_module   modules/mod_proxy_http.so
    +  <IfDefine UseCache>
    +    LoadModule cache_module   modules/mod_cache.so
    +    <IfDefine MemCache>
    +      LoadModule mem_cache_module   modules/mod_mem_cache.so
    +    </IfDefine>
    +    <IfDefine !MemCache>
    +      LoadModule cache_disk_module   modules/mod_cache_disk.so
    +    </IfDefine>
    +  </IfDefine>
    +</IfDefine>
    +
    top
    -
    Description:Contient des directives qui ne s'appliqueront que si un test retourne "vrai" au dmarrage du serveur
    @@ -2120,17 +2336,15 @@ versions 2.1 et sup
    top
    -
    Description:Contient des directives qui ne s'appliquent qu'en fonction de la prsence ou de l'absence d'un module spcifique
    - + -
    Description:Inclut d'autres fichiers de configuration dans un des fichiers de configuration du serveur
    Syntaxe:Include [optional|strict] chemin fichier|chemin -rpertoire|wildcard
    Syntaxe:Include chemin-fichier|chemin-rpertoire|wildcard
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Core
    Module:core
    Compatibilit:Utilisation des caractres gnriques dans la partie nom -de fichier depuis la version 2.0.41, et dans la partie chemin depuis la +
    Compatibilit:Utilisation des caractres gnriques dans la partie chemin depuis la version 2.3.6

    Cette directive permet l'inclusion d'autres fichiers de @@ -2151,86 +2365,78 @@ version 2.3.6

    + + + + + + +
    Description:Inclusion de fichiers dans le fichier de configuration
    Syntaxe:IncludeOptional +chemin-fichier|chemin-rpertoire|wildcard
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.3.6 du serveur HTTP +Apache
    +

    Cette directive permet d'inclure des fichiers dans les fichiers + de configuration du serveur. Elle fonctionne de manire identique + la directive Include, + l'exception du fait que si l'expression avec caractres gnriques + wilcard ne correspond aucun fichier ou rpertoire, elle sera + ignore silencieusement au lieu de causer une erreur.

    Voir aussi

    top
    -

    KeepAlive Directive

    +

    Directive KeepAlive

    @@ -2271,7 +2477,7 @@ version 2.3.6
    top
    -
    Description:Active les connexions HTTP persistantes
    Syntaxe:KeepAlive On|Off
    @@ -2280,8 +2486,6 @@ avant de fermer une connexion persistante -
    Description:Dure pendant laquelle le serveur va attendre une requte avant de fermer une connexion persistante
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:La spcification d'une valeur en millisecondes est -possible depuis les versions 2.3.2 et suprieures d'Apache httpd

    Le nombre de secondes pendant lesquelles Apache httpd va attendre une requte avant de fermer la connexion. Le dlai peut tre dfini en @@ -2295,13 +2499,14 @@ possible depuis les versions 2.3.2 et sup est lv, plus nombreux seront les processus serveur en attente de requtes de la part de clients inactifs.

    -

    Dans un contexte de serveur virtuel base de nom, c'est +

    Si la directive KeepAliveTimeout n'est + pas dfinie pour un serveur virtuel base de nom, c'est la valeur de la paire adresse IP/port du serveur virtuel qui correspond le mieux qui sera utilise.

    top
    -

    <Limit> Directive

    +

    Directive <Limit>

    @@ -2327,13 +2532,10 @@ certaines m DELETE, en laissant les autres mthodes sans protection :

    -

    - <Limit POST PUT DELETE>
    - - Require valid-user
    -
    - </Limit> -

    +
    <Limit POST PUT DELETE>
    +  Require valid-user
    +</Limit>
    +

    La liste des noms de mthodes peut contenir une ou plusieurs valeurs parmi les suivantes : GET, POST, @@ -2368,22 +2570,17 @@ certaines m POST, et la directive Require group editors sera ignore dans tous les cas :

    -

    - <LimitExcept GET> - - Require valid-user - - </LimitExcept>
    - <Limit POST> - - Require group editors - - </Limit> -

    +
    <LimitExcept GET>
    +  Require valid-user
    +</LimitExcept>
    +<Limit POST>
    +  Require group editors
    +</Limit>
    +
    top
    -
    Description:Limite les contrles d'accs que la section contient certaines mthodes HTTP
    @@ -2407,18 +2604,15 @@ sauf celles qui sont sp

    Par exemple :

    -

    - <LimitExcept POST GET>
    - - Require valid-user
    -
    - </LimitExcept> -

    +
    <LimitExcept POST GET>
    +  Require valid-user
    +</LimitExcept>
    +
    top
    -
    Description:Applique les contrles d'accs toutes les mthodes HTTP, sauf celles qui sont spcifies
    @@ -2427,7 +2621,6 @@ sous-requ -
    Description:Dtermine le nombre maximal de redirections internes et de sous-requtes imbriques
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.0.47 d'Apache httpd

    Une redirection interne survient, par exemple, quand on utilise la directive Action qui @@ -2449,13 +2642,12 @@ sous-requ maximum des sous-requtes. Si vous ne spcifiez qu'un seul nombre, il sera affect aux deux limites.

    -

    Exemple

    - LimitInternalRecursion 5 -

    +
    LimitInternalRecursion 5
    +
    top
    -

    LimitRequestBody Directive

    +

    Directive LimitRequestBody

    @@ -2496,9 +2688,8 @@ envoy fichiers chargs 100Ko, vous pouvez utiliser la directive suivante :

    -

    - LimitRequestBody 102400 -

    +
    LimitRequestBody 102400
    +

    Pour une description dtaille de la manire dont cette directive est interprte par les requtes mandates, voir la @@ -2508,7 +2699,7 @@ envoy

    top
    -
    Description:limite la taille maximale du corps de la requte HTTP envoye par le client
    @@ -2545,9 +2736,8 @@ requ

    Par exemple :

    -

    - LimitRequestFields 50 -

    +
    LimitRequestFields 50
    +

    Avertissement

    Dans le cas des serveurs virtuels base de noms, la valeur de @@ -2558,7 +2748,7 @@ requ

    top
    -
    Description:Limite le nombre de champs d'en-tte autoriss dans une requte HTTP
    @@ -2572,7 +2762,7 @@ requ d'octets autoriss dans un en-tte de requte HTTP.

    La directive LimitRequestFieldSize permet - l'administrateur du serveur de rduire ou augmenter la taille + l'administrateur du serveur de dfinir la taille maximale autorise d'un en-tte de requte HTTP. Pour un serveur, cette valeur doit tre suffisamment grande pour contenir tout en-tte d'une requte client normale. La taille d'un champ d'en-tte @@ -2589,9 +2779,8 @@ requ

    Par exemple ::

    -

    - LimitRequestFieldSize 4094 -

    +
    LimitRequestFieldSize 4094
    +
    Dans des conditions normales, la valeur par dfaut de cette directive ne doit pas tre modifie.
    @@ -2605,7 +2794,7 @@ requ
    top
    -
    Description:Ddinit la taille maximale autorise d'un en-tte de requte HTTP
    @@ -2619,7 +2808,7 @@ HTTP pour une ligne de requte HTTP en octets.

    La directive LimitRequestLine permet - l'administrateur du serveur de rduire ou augmenter la taille + l'administrateur du serveur de dfinir la taille maximale autorise d'une ligne de requte HTTP client. Comme une requte comporte une mthode HTTP, un URI, et une version de protocole, la directive LimitRequestLine @@ -2636,12 +2825,11 @@ HTTP

    Par exemple :

    -

    - LimitRequestLine 4094 -

    +
    LimitRequestLine 4094
    -
    Dans des conditions normales, la valeur par dfaut de cette - directive ne doit pas tre modifie.
    + +
    Dans des conditions normales, cette directive doit conserver + sa valeur par dfaut.

    Avertissement

    Dans le cas des serveurs virtuels base de noms, la valeur de @@ -2653,7 +2841,7 @@ HTTP

    top
    -
    Description:Dfinit la taille maximale d'une ligne de requte HTTP
    @@ -2670,14 +2858,13 @@ XML

    Exemple :

    -

    - LimitXMLRequestBody 0 -

    +
    LimitXMLRequestBody 0
    +
    top
    -
    Description:Dfinit la taille maximale du corps d'une requte au format XML
    @@ -2726,19 +2913,19 @@ sp directives contenues dans la section s'appliqueront /private1, /private1/ et /private1/file.txt, mais pas /private1other.

    -

    - <Location /private1> - ... -

    +
    <Location "/private1">
    +    #  ...
    +</Location>
    +

    De mme, dans l'exemple ci-dessous, o l'on utilise un slash de fin, les directives contenues dans la section s'appliqueront /private2/ et /private2/file.txt, mais pas /private2other.

    -

    - <Location /private2/> - ... -

    +
    <Location "/private2/">
    +    # ...
    +</Location>
    +

    Quand utiliser la section <Location>

    @@ -2746,7 +2933,7 @@ sp des contenus situs en dehors du systme de fichiers. Pour les contenus situs l'intrieur du systme de fichiers, utilisez plutt les sections <Directory> et <Files>. <Location - /> constitue une exception et permet d'appliquer aisment + "/"> constitue une exception et permet d'appliquer aisment une configuration l'ensemble du serveur.

    @@ -2768,9 +2955,10 @@ sp rationnelles, moyennant l'addition d'un caractre ~. Par exemple :

    -

    - <Location ~ "/(extra|special)/data"> -

    +
    <Location ~ "/(extra|special)/data">
    +    #...
    +</Location>
    +

    concernerait les URLs contenant les sous-chane /extra/data ou /special/data. La directive @@ -2787,14 +2975,11 @@ sp appartenant au domaine example.com, vous pouvez utiliser :

    -

    - <Location /status>
    - - SetHandler server-status
    - Require host example.com
    -
    - </Location> -

    +
    <Location "/status">
    +  SetHandler server-status
    +  Require host example.com
    +</Location>
    +

    Note propos du slash (/)

    La signification du caractre slash dpend de l'endroit o il @@ -2808,7 +2993,7 @@ sp explicitement les slashes multiples si telle est votre intention.

    -

    Par exemple, <LocationMatch ^/abc> va +

    Par exemple, <LocationMatch "^/abc"> va correspondre l'URL /abc mais pas l'URL //abc. La directive <Location> sans expression rationnelle se comporte de la mme manire lorsqu'elle est utilise pour des requtes @@ -2816,7 +3001,7 @@ sp est utilise pour des requtes non mandates, elle fera correspondre implicitement les slashes multiples des slashes uniques. Par exemple, si vous spcifiez <Location - /abc/def>, une requte de la forme + "/abc/def">, une requte de la forme /abc//def correspondra.

    @@ -2829,7 +3014,7 @@ entre elles
    top
    -
    Description:N'applique les directives contenues qu'aux URLs spcifies
    @@ -2845,13 +3030,38 @@ correspondant spcifier les URLs concernes est une expression rationnelle au lieu d'une simple chane de caractres. Par exemple :

    -

    - <LocationMatch "/(extra|special)/data"> -

    +
    <LocationMatch "/(extra|special)/data">
    +    # ...
    +</LocationMatch>
    +

    correspondrait toute URL contenant les sous-chanes /extra/data ou /special/data.

    +

    Si vous recherchez une URL commenant par + plutt que seulement contenant /extra/data, prfixez + l'expression rationnelle avec un ^.

    + +
    <LocationMatch "^/(extra|special)/data">
    + +
    + +

    A partir de la version 2.4.8, les groupes nomms et les + rfrences arrires sont extraits et enregistrs dans + l'environnement avec leur nom en majuscules et prfix + par "MATCH_". Ceci permet + de rfrencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + viter toute confusion, les rfrences arrires numrotes (non + nommes) sont ignores. Vous devez utiliser la place des groupes + nomms.

    + +
    <LocationMatch "^/combined/(?<sitename>[^/]+)">
    +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</LocationMatch>
    + + +

    Voir aussi

    top
    -
    Description:N'applique les directives contenues qu'aux URLs correspondant une expression rationnelle

    Par exemple :

    -

    - LogLevel notice -

    +
    LogLevel notice
    +

    Note

    Si la journalisation s'effectue directement dans un fichier, @@ -3047,21 +3256,19 @@ Apache identificateur, avec ou sans le suffixe _module. Les trois spcifications suivantes sont donc quivalentes :

    -

    - LogLevel info ssl:warn
    - LogLevel info mod_ssl.c:warn
    - LogLevel info ssl_module:warn
    -

    +
    LogLevel info ssl:warn
    +LogLevel info mod_ssl.c:warn
    +LogLevel info ssl_module:warn
    +

    Il est aussi possible d'attribuer un niveau de journalisation par rpertoire :

    -

    - LogLevel info
    - <Directory /usr/local/apache/htdocs/app>
    -   LogLevel debug
    - </Files> -

    +
    LogLevel info
    +<Directory "/usr/local/apache/htdocs/app">
    +  LogLevel debug
    +</Directory>
    +
    La configuration du niveau de journalisation par rpertoire @@ -3071,9 +3278,15 @@ Apache pas affects.
    +

    Voir aussi

    +
    top
    -
    Description:Contrle la verbosit du journal des erreurs
    Syntaxe:LogLevel [module:]niveau @@ -3028,9 +3238,8 @@ Apache
    @@ -3092,13 +3305,12 @@ persistante

    Par exemple :

    -

    - MaxKeepAliveRequests 500 -

    +
    MaxKeepAliveRequests 500
    +
    top
    -
    Description:Nombre de requtes permises pour une connexion persistante
    top
    -
    Description:Nombre de chevauchements de segments de donnes autoris (par exemple 100-200,150-300) avant le renvoi de la @@ -3136,7 +3348,7 @@ persistante
    top
    -
    Description:Nombre d'inversions d'ordre autoris dans la spcification des segments de donnes (par exemple 100-200,50-70) avant le renvoi de la @@ -3175,7 +3387,7 @@ persistante
    @@ -3210,7 +3422,31 @@ Apache
    top
    -
    Description:Nombre de segments de donnes autoris avant le renvoi de l'intgralit de la ressource
    + + + + + + + +
    Description:Dtermine si les donnes supplmentaires (trailers) sont +fusionnes avec les en-ttes
    Syntaxe:MergeTrailers [on|off]
    Dfaut:MergeTrailers off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.4.11 du serveur HTTP +Apache
    +

    Cette directive permet de contrler la fusion des donnes HTTP + supplmentaires (trailers) avec la reprsentation interne des + en-ttes. Cette fusion intervient lorsque le corps de la requte a + t entirement reu, bien longtemps aprs que la majeure partie du + traitement des en-ttes ait une chance de pouvoir examiner ou + modifier les en-ttes de la requte.

    +

    Cette option a t introduite dans un souci de compatibilit avec + les versions antrieures 2.4.11, o les donnes supplmentaires + taient systmatiquement fusionnes avec les en-ttes de la requte.

    + +
    +
    top
    +

    Directive Mutex

    @@ -3224,9 +3460,9 @@ verrou pour tous les mutex ou seulement les mutex sp

    La directive Mutex permet de dfinir le mcanisme de mutex, et ventuellement le rpertoire du fichier verrou que les modules et httpd utilisent pour srialiser l'accs aux - ressources. Spcifiez default comme premier argument + ressources. Spcifiez default comme second argument pour modifier la configuration de tous les mutex ; spcifiez un nom - de mutex (voir la table ci-dessous) comme premier argument pour + de mutex (voir la table ci-dessous) comme second argument pour ne modifier que la configuration de ce mutex.

    La directive Mutex est typiquement @@ -3310,10 +3546,10 @@ verrou pour tous les mutex ou seulement les mutex sp cette implmentation, le serveur va se bloquer et cesser de rpondre aux requtes. Dans ce cas, un redmarrage manuel est ncessaire pour rcuprer le mutex.

    -

    Solaris constitue une exception notable, en ceci qu'il fournit +

    Solaris et Linux constituent des exceptions notables, en ceci qu'ils fournissent un mcanisme qui permet en gnral de rcuprer le mutex aprs l'arrt anormal d'un processus enfant qui dtenait le mutex.

    -

    Si votre systme implmente la fonction +

    Si votre systme est compatible POSIX ou implmente la fonction pthread_mutexattr_setrobust_np(), vous devriez pouvoir utiliser l'option pthread sans problme.

    @@ -3352,8 +3588,10 @@ verrou pour tous les mutex ou seulement les mutex sp

    Avec les mcanismes base de fichier fcntl et flock, le chemin, s'il est fourni, est un rpertoire dans - lequel le fichier verrou sera cr. Le rpertoire par dfaut est le - rpertoire httpd dfini par la directive ServerRoot. Utilisez toujours un systme + lequel le fichier verrou sera cr. Le rpertoire par + dfaut est le rpertoire d'excution de httpd relatif la + directive ServerRoot. + Utilisez toujours un systme de fichiers local sur disque pour /chemin/vers/mutex et jamais un rpertoire se trouvant dans un systme de fichiers NFS ou AFS. Le nom de base du fichier se composera du type de mutex, d'une @@ -3443,14 +3681,13 @@ verrou pour tous les mutex ou seulement les mutex sp mutex par dfaut pour tous les autres mutex deviendra sysvsem.

    -

    - Mutex default sysvsem
    - Mutex mpm-accept fcntl:/var/httpd/locks -

    +
    Mutex sysvsem default
    +Mutex fcntl:/var/httpd/locks mpm-accept
    +
    top
    -
    Description:Dfinit les mcanismes de mutex et le repertoire du fichier verrou pour tous les mutex ou seulement les mutex spcifis
    @@ -3477,7 +3714,7 @@ virtuels
    top
    -
    Description:OBSOLETE : Dfinit une adresse IP pour les serveurs virtuels base de nom
    @@ -3519,8 +3756,12 @@ particulier

    Bien que le serveur suive les liens symboliques, il ne modifie pas le nom de chemin concern dfini par la section <Directory>.

    -

    Notez aussi que cette option est ignore si - elle est dfinie dans une section <Location>.

    + +

    Les options FollowSymLinks et + SymLinksIfOwnerMatch ne fonctionnent que dans les + sections <Directory> ou les fichiers + .htaccess.

    +

    Le fait d'omettre cette option ne doit pas tre considr comme une mesure de scurit efficace, car il existe toujours une situation de comptition (race condition) entre l'instant o l'on @@ -3571,20 +3812,24 @@ particulier vers un fichier ou un rpertoire dont le propritaire est le mme que celui du lien. -

    Note

    Cette option est ignore si elle est - dfinie dans une section <Location>.

    +

    Note

    +

    Les options FollowSymLinks et + SymLinksIfOwnerMatch ne fonctionnent que dans les + sections <Directory> ou les fichiers + .htaccess.

    +

    Le fait d'omettre cette option ne doit pas tre considr comme une mesure de scurit efficace, car il existe toujours une situation de comptition (race condition) entre l'instant o l'on vrifie qu'un chemin n'est pas un lien symbolique, et l'instant o - l'on utilise effectivement ce chemin.

    - + l'on utilise effectivement ce chemin.

    +

    Normalement, si plusieurs directives Options peuvent s'appliquer un rpertoire, c'est la plus spcifique qui est utilise et les autres sont - ignores ; les options ne sont pas fusionnes (voir comment les sections sont + ignores ; les options ne sont pas fusionnes (voir comment les sections sont fusionnes). Elles le sont cependant si toutes les options de la directive Options sont prcdes d'un symbole + ou -. Toute @@ -3604,38 +3849,28 @@ particulier

    Par exemple, sans aucun symbole + et - :

    -

    - <Directory /web/docs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /web/docs/spec>
    - - Options Includes
    -
    - </Directory> -

    +
    <Directory "/web/docs">
    +  Options Indexes FollowSymLinks
    +</Directory>
    +
    +<Directory "/web/docs/spec">
    +  Options Includes
    +</Directory>
    +

    ici, seule l'option Includes sera prise en compte pour le rpertoire /web/docs/spec. Par contre, si la seconde directive Options utilise les symboles + et - :

    -

    - <Directory /web/docs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /web/docs/spec>
    - - Options +Includes -Indexes
    -
    - </Directory> -

    +
    <Directory "/web/docs">
    +  Options Indexes FollowSymLinks
    +</Directory>
    +
    +<Directory "/web/docs/spec">
    +  Options +Includes -Indexes
    +</Directory>
    +

    alors, les options FollowSymLinks et Includes seront prises en compte pour le rpertoire @@ -3652,7 +3887,7 @@ particulier

    top
    -
    Description:Dfinit les fonctionnalits disponibles pour un rpertoire particulier
    @@ -3677,21 +3912,143 @@ seulement depuis la version 2.3.3 sous Windows.https sur un port non standard, spcifiez le protocole de manire explicite :

    -

    - Protocol https -

    +
    Protocol https
    +

    Vous pouvez aussi spcifier le protocole via la directive Listen.

    Voir aussi

    top
    -
    Description:Protocole pour une socket d'coute
    Syntaxe:Protocol protocole
    + + + + + + + +
    Description:Protocoles disponibles pour un serveur virtuel ou non
    Syntaxe:Protocols protocole ...
    Dfaut:Protocols http/1.1
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.4.17 du serveur + HTTP Apache.
    +

    Cette directive permet de spcifier la liste des protocoles + supports par un serveur virtuel ou non. Cette liste numre les + protocoles qu'un client sera autoris ngocier avec ce + serveur.

    + +

    Par dfaut, + seul le protocole http/1.1 est disponible (compatible avec les + clients http/1.0 et http/0.9). Par consquent, vous devez + fournir cette liste si vous voulez tendre les protocoles + disponibles pour le serveur.

    + +

    Par exemple, si vous voulez autoriser le protocole + HTTP/2 pour un serveur avec TLS, utilisez + cette directive comme suit :

    + +
    Protocols h2 http/1.1
    + + +

    Les protocoles valides sont http/1.1 pour les + connexions http et https, h2 pour les connections + https et h2c pour les connexions http. D'autres + modules peuvent fournir d'autres protocoles.

    + +

    Spcifier des protocoles non disponibles ou dsactivs n'aura + aucun effet, et ceux-ci seront simplement ignors.

    + +

    Si un serveur virtuel ne possde pas de directive Protocols + propre, il hrite des protocoles spcifis pour le serveur + principal. Autrement dit, les directives Protocols dfinies au + niveau d'un serveur virtuel remplacent celles dfinies au niveau + du serveur principal. +

    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive ProtocolsHonorOrder

    + + + + + + + + +
    Description:Dtermine qui du client ou du serveur dtermine l'ordre + des protocoles au cours de la ngociation de la connexion
    Syntaxe:ProtocolsHonorOrder On|Off
    Dfaut:ProtocolsHonorOrder On
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible partir de la version 2.4.17 du serveur + HTTP Apache.
    +

    Cette directive permet de dfinir si le serveur doit tenir + compte de l'ordre des protocoles dfinis par la directive + Protocols.

    + +

    Si cette directive est dfinie Off, l'ordre de la liste des + protocoles fournie par le client l'emporte sur l'ordre dfini + dans la configuration du serveur.

    + +

    Si la directive ProtocolsHonorOrder + est dfinie on (valeur par dfaut), + il n'est pas tenu compte de l'ordre de la liste des protocoles + fournie par le client, et seul l'ordre de la liste des protocles + dfinie au niveau du serveur influera la + ngociation du protocole.

    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive QualifyRedirectURL

    + + + + + + + + + +
    Description:Vrifie si la variable d'environnement REDIRECT_URL est +pleinement qualifie
    Syntaxe:QualifyRedirectURL ON|OFF
    Dfaut:QualifyRedirectURL OFF
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Directive supporte partir de la version 2.4.18 du +serveur HTTP Apache. Jusqu' la version 2.4.17, le serveur se comportait +comme si la directive QualifyRedirectURL tait dfinie ON.
    +

    Cette directive permet de s'assurer que le serveur vrifiera que + la variable d'environnement REDIRECT_URL est bien pleinement + qualifie. Par dfaut, cette variable contient l'URL textuellement + demande par le client, par exemple "/index.html". Avec QualifyRedirectURL ON, la mme requte + affectera la variable REDIRECT_URL une valeur du style + "http://www.example.com/index.html".

    +

    Mme si cette directive n'est pas dfinie, lorsqu'une requte est + soumise avec une URL pleinement qualifie, la variable REDIRECT_URL + contiendra quand-mme une URL pleinement qualifie. +

    + +
    +
    top
    +

    Directive RegisterHttpMethod

    + + + + + + +
    Description:Register non-standard HTTP methods
    Syntaxe:RegisterHttpMethod method [method [...]]
    Contexte:configuration du serveur
    Statut:Core
    Module:core

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top
    +

    Directive RLimitCPU

    @@ -3730,7 +4087,7 @@ d'exploitation
    top
    -
    Description:Limite le temps CPU allou aux processus initis par les processus enfants d'Apache httpd
    @@ -3769,7 +4126,7 @@ d'exploitation
    top
    -
    Description:Limite la mmoire alloue aux processus initis par les processus enfants d'Apache httpd
    @@ -3816,7 +4173,7 @@ les processus initi
    top
    -
    Description:Limite le nombre de processus qui peuvent tre initis par les processus initis par les processus enfants d'Apache httpd
    @@ -3826,9 +4183,7 @@ CGI - +
    Description:Permet de localiser l'interprteur des scripts CGI
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Win32 seulement ; -l'option Registry-Strict est disponible dans les versions -2.0 et suprieures du serveur HTTP Apache
    Compatibilit:Win32 seulement.

    Cette directive permet de contrler la mthode qu'utilise Apache httpd pour trouver l'interprteur destin excuter les scripts CGI. La @@ -3838,16 +4193,14 @@ l'option Registry-Strict est disponible dans les versions #!). Sur les systmes Win32, cette ligne ressemble souvent ceci :

    -

    - #!C:/Perl/bin/perl.exe -

    +
    #!C:/Perl/bin/perl.exe
    +

    ou simplement, dans le cas o perl est dans le PATH :

    -

    - #!perl -

    +
    #!perl
    +

    Avec ScriptInterpreterSource Registry, Windows va effectuer une recherche dans l'arborescence @@ -3885,7 +4238,7 @@ l'option Registry-Strict est disponible dans les versions

    top
    -

    SeeRequestTail Directive

    +

    Directive SeeRequestTail

    top
    -
    Description:Dtermine si mod_status affiche les 63 premiers caractres d'une requte ou les 63 derniers, en supposant que la requte @@ -3925,7 +4278,7 @@ d'Apache httpd.
    @@ -3949,15 +4302,14 @@ messages d'erreur envoy

    Il peut s'avrer utile de dfinir une adresse ddie l'administration du serveur, par exemple :

    -

    - ServerAdmin www-admin@foo.example.com -

    +
    ServerAdmin www-admin@foo.example.com
    +

    car les utilisateurs ne mentionnent pas systmatiquement le serveur dont ils parlent !

    top
    -
    Description:L'adresse lectronique que le serveur inclut dans les messages d'erreur envoys au client
    @@ -3972,15 +4324,24 @@ serveurs virtuels nom. La directive ServerAlias peut contenir des caractres gnriques, si ncessaire.

    -

    - <VirtualHost *:80>
    - ServerName serveur.example.com
    - ServerAlias serveur serveur2.example.com serveur2
    - ServerAlias *.example.com
    - UseCanonicalName Off
    - # ...
    - </VirtualHost> -

    +
    <VirtualHost *:80>
    +  ServerName server.example.com
    +  ServerAlias server server2.example.com server2
    +  ServerAlias *.example.com
    +  UseCanonicalName Off
    +  # ...
    +</VirtualHost>
    + +

    La recherche du serveur virtuel base de nom correspondant au + plus prs la requte s'effectue selon l'ordre d'apparition des + directives <virtualhost> dans le fichier de + configuration. Le premier serveur virtuel dont le ServerName ou le ServerAlias correspond est choisi, sans + priorit particulire si le nom contient des caractres gnriques + (que ce soit pour ServerName ou ServerAlias).

    + +

    Tous les noms spcifis au sein d'une section <VirtualHost> sont traits comme un + ServerAlias (sans caractres gnriques).

    +

    Voir aussi

      @@ -3990,26 +4351,27 @@ du serveur HTTP Apache
    top
    -
    Description:Autres noms d'un serveur utilisables pour atteindre des serveurs virtuels base de nom
    - +
    Description:Nom d'hte et port que le serveur utilise pour s'authentifier lui-mme
    Syntaxe:ServerName [protocole://]nom de domaine -entirement qualifi[:port]
    Syntaxe:ServerName +[protocole://]nom-de-domaine|adresse-ip[:port]
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core

    La directive ServerName permet de dfinir les protocole, nom d'hte et port d'une requte que le serveur - utilise pour s'authentifier lui-mme. Ceci est utile lors de la - cration de redirections d'URLs.

    - -

    La directive ServerName permet aussi - (ventuellement en conjonction avec la directive - ServerAlias) d'identifier de manire unique - un serveur virtuel, lorsqu'elle est utilise dans un contexte de serveurs virtuels base de - noms.

    + utilise pour s'authentifier lui-mme.

    + +

    La directive ServerName permet (ventuellement en + conjonction avec la directive ServerAlias) d'identifier de manire unique un + serveur virtuel, lorsqu'elle est utilise dans un contexte de serveurs virtuels base de noms.

    + +

    Cette directive est aussi utilise lors de la cration d'URLs de + redirection relatives quand la directive UseCanonicalName est dfinie une valeur autre + que la valeur par dfaut.

    Par exemple, si le nom de la machine hbergeant le serveur web est @@ -4018,17 +4380,20 @@ enti web s'identifie avec cet alias, vous devez utilisez la dfinition suivante :

    -

    - ServerName www.example.com -

    +
    ServerName www.example.com
    +

    La directive ServerName peut apparatre toutes les tapes de la dfinition du serveur. Toute occurrence annule cependant la prcdente (pour ce serveur).

    Si la directive ServerName n'est pas - dfinie, le serveur tente de dterminer le nom d'hte en effectuant - une recherche DNS inverse sur son adresse IP. Si la directive + dfinie, le serveur tente de dterminer le nom + d'hte visible du point de vue du client en demandant tout d'abord au + systme d'exploitation le nom d'hte systme, et en cas d'chec, en effectuant + une recherche DNS inverse sur une adresse IP prsente sur le systme.

    + +

    Si la directive ServerName ne prcise pas de port, le serveur utilisera celui de la requte entrante. Il est recommand de spcifier un nom d'hte et un port spcifiques l'aide de la @@ -4083,7 +4448,7 @@ du serveur HTTP Apache

    top
    -

    ServerPath Directive

    +

    Directive ServerPath

    @@ -4102,7 +4467,7 @@ du serveur HTTP Apache
    top
    -
    Description:Nom de chemin d'URL hrit pour un serveur virtuel base de nom accd par un navigateur incompatible
    @@ -4119,9 +4484,8 @@ serveur directives (comme Include ou LoadModule) seront dfinis par rapport ce rpertoire.

    -

    Example

    - ServerRoot /home/httpd -

    +
    ServerRoot "/home/httpd"
    +

    La valeur par dfaut de ServerRoot peut tre modifie via l'argument --prefix de la commande configure, et de @@ -4140,7 +4504,7 @@ correctement les permissions sur le r

    top
    -
    Description:Racine du rpertoire d'installation du serveur
    @@ -4180,7 +4544,7 @@ serveur
    top
    -
    Description:Dfinit un pied de page pour les documents gnrs par le serveur
    @@ -4199,13 +4563,10 @@ HTTP
    ServerTokens Full (ou non spcifi)
    -
    Le serveur envoie par exemple : Server: Apache/2.4.1 +
    Le serveur envoie par exemple : Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
    - - - -
    ServerTokens Prod[uctOnly]
    +
    ServerTokens Prod[uctOnly]
    Le serveur renvoie (par exemple): Server: Apache
    @@ -4223,12 +4584,12 @@ HTTP
    ServerTokens Min[imal]
    Le serveur renvoie (par exemple): Server: - Apache/2.4.1
    + Apache/2.4.2
    ServerTokens OS
    Le serveur renvoie (par exemple): Server: - Apache/2.4.1 (Unix)
    + Apache/2.4.2 (Unix) @@ -4258,17 +4619,17 @@ HTTP
    top
    -
    Description:Configure l'en-tte Server de la rponse HTTP
    - + - +
    Description:Force le traitement des fichiers spcifis par un gestionnaire particulier
    Syntaxe:SetHandler nom gestionnaire|None
    Syntaxe:SetHandler handler-name|none|expression
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Core
    Module:core
    Compatibilit:Intgr dans le noyau d'Apache httpd depuis la version -2.0
    Compatibilit:L'argument expression est disponible partir de la version +2.4.19 su serveur HTTP Apache

    Lorsqu'elle se situe l'intrieur d'un fichier .htaccess, ou d'une section <Directory> ou <Location>, cette directive force le @@ -4279,22 +4640,36 @@ gestionnaire particulier

    @@ -4338,7 +4713,7 @@ client et les donn
    top
    -
    Description:Dfinit les filtres par lesquels vont passer les requtes client et les donnes POST
    @@ -4358,13 +4733,10 @@ du serveur fichiers du rpertoire /www/data/ comme des inclusions ct serveur (SSI) :

    -

    - <Directory /www/data/>
    - - SetOutputFilter INCLUDES
    -
    - </Directory> -

    +
    <Directory "/www/data/">
    +  SetOutputFilter INCLUDES
    +</Directory>
    +

    Si la directive comporte plusieurs filtres, ils doivent tre spars par des points-virgules, et spcifis selon l'ordre dans @@ -4376,7 +4748,7 @@ du serveur

    top
    -
    Description:Dfinit les filtres par lesquels vont passer les rponses du serveur
    @@ -4390,10 +4762,15 @@ du serveur temps maximum pendant lequel Apache httpd va attendre des entres/sorties selon les circonstances :

    -
      -
    1. Lors de la lecture de donnes en provenance du client, le +
        +
      • Lors de la lecture de donnes en provenance du client, le temps maximum jusqu' l'arrive d'un paquet TCP si le tampon est - vide.

      • + vide.

        +

        Pour les donnes initiales d'une nouvelle connexion, et tant qu'une + directive AcceptFilter n'aura pas + transmis cette nouvelle connexion au serveur, cette directive n'aura aucun + effet.

        +
      • Lors de l'criture de donnes destines au client, le temps maximum jusqu' l'arrive de l'accus-rception d'un paquet si le @@ -4408,12 +4785,12 @@ du serveur
      • Avec mod_proxy, la valeur du dlai par dfaut si ProxyTimeout n'est pas dfini.
      • -
    +
    top
    -
    Description:Temps pendant lequel le serveur va attendre certains vnements avant de considrer qu'une requte a chou
    @@ -4422,8 +4799,6 @@ du serveur -
    Description:Dtermine le comportement des requtes TRACE
    Contexte:configuration du serveur, serveur virtuel
    Statut:Core
    Module:core
    Compatibilit:Disponible dans les versions 1.3.34, 2.0.55 et -suprieures du serveur HTTP Apache

    Cette directive l'emporte sur le comportement de TRACE pour le noyau du serveur et @@ -4438,16 +4813,23 @@ sup peut autoriser l'ajout d'un corps de requte l'aide de la dfinition non standard TraceEnable extended. Le noyau du serveur (dans le cas d'un serveur d'origine) va limiter la taille - du corps de requte 64k (plus 8k pour les en-ttes de + du corps de requte 64Kb (plus 8Kb pour les en-ttes de fractionnement si Transfer-Encoding: chunked est utilis). Le noyau du serveur va reproduire l'ensemble des en-ttes, y compris les en-ttes de fractionnement avec le corps de la rponse. Dans le cas d'un serveur mandataire, la taille du corps de - requte n'est pas limite 64k.

    + requte n'est pas limite 64Kb.

    + +

    Note

    +

    Bien que certains prtendent le contraire, activer la mthode + TRACE ne constitue pas un problme de scurit dans Apache + httpd. La mthode TRACE est dfinie par la spcification + HTTP/1.1 et les diffrentes implmentations sont censes la supporter.

    +
    top
    -

    UnDefine Directive

    +

    Directive UnDefine

    @@ -4462,10 +4844,13 @@ sup section <IfDefine> sans avoir modifier les arguments -D dans les scripts de dmarrage.

    +

    Si cette directive est dfinie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultrieure, au del de tout bloc VirtualHost.

    top
    -
    Description:Invalide la dfinition d'une variable
    Syntaxe:UnDefine nom-variable
    @@ -4504,9 +4889,9 @@ et son porthttp://www.example.com/splat/. Si vous avez activ l'authentification, ceci va obliger l'utilisateur s'authentifier deux fois (une premire fois pour www et une seconde - fois pour www.example.com -- voir la - foire aux questions sur ce sujet pour plus d'informations). Par - contre, si UseCanonicalName est dfinie + fois pour www.example.com -- voir la + foire aux questions sur ce sujet pour plus d'informations). + Par contre, si UseCanonicalName est dfinie Off, Apache httpd redirigera l'utilisateur vers http://www/splat/.

    @@ -4535,7 +4920,7 @@ et son port
    top
    -
    Description:Dfinit la manire dont le serveur dtermine son propre nom et son port
    @@ -4593,7 +4978,7 @@ d
    top
    -
    Description:Dfinit la manire dont le serveur dtermine son propre port
    @@ -4630,17 +5015,14 @@ d'h -

    Exemple

    - <VirtualHost 10.1.2.3:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -

    +
    <VirtualHost 10.1.2.3:80>
    +  ServerAdmin webmaster@host.example.com
    +  DocumentRoot "/www/docs/host.example.com"
    +  ServerName host.example.com
    +  ErrorLog "logs/host.example.com-error_log"
    +  TransferLog "logs/host.example.com-access_log"
    +</VirtualHost>
    +

    Les adresses IPv6 doivent tre entoures de crochets car dans le @@ -4648,17 +5030,14 @@ d'h dtermin. Voici un exemple de serveur virtuel avec adresse IPv6 :

    -

    - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -

    +
    <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    +  ServerAdmin webmaster@host.example.com
    +  DocumentRoot "/www/docs/host.example.com"
    +  ServerName host.example.com
    +  ErrorLog "logs/host.example.com-error_log"
    +  TransferLog "logs/host.example.com-access_log"
    +</VirtualHost>
    +

    Chaque serveur virtuel doit correspondre une adresse IP, un port ou un nom d'hte spcifique ; dans le premier cas, le serveur @@ -4727,7 +5106,28 @@ entre elles  fr  |  ja  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/core.html.ja.utf8 b/docs/manual/mod/core.html.ja.utf8 index acec0843c13..4485edc99b5 100644 --- a/docs/manual/mod/core.html.ja.utf8 +++ b/docs/manual/mod/core.html.ja.utf8 @@ -1,36 +1,42 @@ - -core - Apache HTTP サーバ +core - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache コア機能

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Contient des directives qui ne s'appliquent qu' un nom d'hte spcifique ou une adresse IP
    説明:常に使用可能な Apache HTTP サーバのコア機能
    ステータス:Core
    @@ -44,7 +50,10 @@
  • AllowOverride
  • AllowOverrideList
  • CGIMapExtension
  • +
  • CGIPassAuth
  • +
  • CGIVar
  • ContentDigest
  • +
  • DefaultRuntimeDir
  • DefaultType
  • Define
  • <Directory>
  • @@ -65,10 +74,12 @@
  • ForceType
  • GprofDir
  • HostnameLookups
  • +
  • HttpProtocolOptions
  • <If>
  • <IfDefine>
  • <IfModule>
  • Include
  • +
  • IncludeOptional
  • KeepAlive
  • KeepAliveTimeout
  • <Limit>
  • @@ -86,10 +97,15 @@
  • MaxRangeOverlaps
  • MaxRangeReversals
  • MaxRanges
  • +
  • MergeTrailers
  • Mutex
  • NameVirtualHost
  • Options
  • Protocol
  • +
  • Protocols
  • +
  • ProtocolsHonorOrder
  • +
  • QualifyRedirectURL
  • +
  • RegisterHttpMethod
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • @@ -112,7 +128,9 @@
  • UseCanonicalPhysicalPort
  • <VirtualHost>
  • -
    +

    Bugfix checklist

    参照

    +
    top

    AcceptFilter ディレクティブ

    @@ -211,7 +229,9 @@ 受け付けるか拒否するかの選択を上書きできるようにすることです。 例えば、これは例えば INCLUDES のような フィルタを使って PATH_INFO に - 基づいてコンテンツを生成しているときに必要になります。

    + 基づいてコンテンツを生成しているときに必要になります。 + コアハンドラでは通常拒否されるので、そういったスクリプトを動作させるには + 次のような設定を使います。

    <Files "mypaths.shtml">
    @@ -459,9 +479,9 @@

    コンテキスト:ディレクトリ
    ステータス:Core
    モジュール:core

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    参照

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    top
    +

    CGIPassAuth ディレクティブ

    + + + + + + + + + +
    説明:Enables passing HTTP authorization headers to scripts as CGI +variables
    構文:CGIPassAuth On|Off
    デフォルト:CGIPassAuth Off
    コンテキスト:ディレクトリ, .htaccess
    上書き:AuthConfig
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.4.13 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    CGIVar ディレクティブ

    + + + + + + + + +
    説明:Controls how some CGI variables are set
    構文:CGIVar variable rule
    コンテキスト:ディレクトリ, .htaccess
    上書き:FileInfo
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.4.21 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    ContentDigest ディレクティブ

    @@ -527,6 +575,25 @@ 応答の場合にはこのヘッダは付与されません。

    + +
    top
    +
    説明:Content-MD5 HTTP 応答ヘッダの生成を有効にする
    + + + + + + + +
    説明:Base directory for the server run-time files
    構文:DefaultRuntimeDir directory-path
    デフォルト:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    コンテキスト:サーバ設定ファイル
    ステータス:Core
    モジュール:core
    互換性:Available in Apache 2.4.2 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    +
    top

    DefaultType ディレクティブ

    @@ -812,9 +879,9 @@ satisfied by a request at runtime
    上書き:All
    ステータス:Core
    モジュール:core

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    参照

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    • <If>
    • <ElseIf>
    • @@ -839,9 +906,9 @@ satisfied 上書き:All ステータス:Core モジュール:core -

      The documentation for this directive has - not been translated yet. Please have a look at the English - version.

      参照

      +

      このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

      参照

      • Expressions in Apache HTTP Server, for a complete reference and more examples.
      • @@ -875,7 +942,7 @@ for a complete reference and more examples. Apache は OS がサポートしていればファイルをメモリにマップします。

        - このメモリマップは性能の向上を持たらすことがあります。 + このメモリマップは性能の向上をもたらすことがあります。 しかし、環境によっては運用上の問題を防ぐためにメモリマッピングを 使用しないようにした方が良い場合もあります:

        @@ -977,9 +1044,9 @@ for a complete reference and more examples. ステータス:Core モジュール:core 互換性:2.3.9 and later -

        The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    ErrorDocument ディレクティブ

    @@ -1143,10 +1210,9 @@ for a complete reference and more examples. - -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core
    互換性:Available in Apache httpd 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    参照

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    FileETag ディレクティブ

    @@ -1371,9 +1437,9 @@ request -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    HostnameLookups ディレクティブ

    @@ -1419,6 +1485,20 @@ request
    top
    +
    + + + + + + + +
    説明:Modify restrictions on HTTP Request Messages
    構文:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
    デフォルト:HttpProtocolOptions Strict LenientMethods Allow0.9
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core
    互換性:2.2.32 or 2.4.24 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    <If> ディレクティブ

    top
    +
    説明:実行時、リクエストが条件を満たした場合にのみ適用される @@ -1630,6 +1710,24 @@ request
    + + + + + + +
    説明:Includes other configuration files from within +the server configuration files
    構文:IncludeOptional file-path|directory-path|wildcard
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ
    ステータス:Core
    モジュール:core
    互換性:Available in 2.3.6 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    + +
    +
    top

    KeepAlive ディレクティブ

    @@ -2023,7 +2121,7 @@ request

    <Location> セクションは 完全にファイルシステムと関連せずに動作します。このことから導かれる - 結果にはいつくか注意する点があります。最も重要なものは、 + 結果にはいくつか注意する点があります。最も重要なものは、 ファイルシステムの位置へのアクセス制御に <Location> ディレクティブを使うべきではない ということです。複数の URL がファイルシステムの同じ位置にマップされる 可能がありますので、そのようなアクセス制御は回避されてしまう可能性が @@ -2085,12 +2183,12 @@ request ファイルシステムにおいて利用する場合には複数のスラッシュでも一つの スラッシュとして扱われることが多いですが、 (すなわち/home///foo は - /home/foo と同じいったように) + /home/foo と同じといったように) URL においては必ずしもそうなるわけではありません。 <LocationMatch> ディレクティブや正規表現を利用した <Location> ディレクティブで、 - 複数のスラッシュにマッチさせたいときには、、明示的に記述する + 複数のスラッシュにマッチさせたいときには、明示的に記述する 必要があります。

    例えば、<LocationMatch ^/abc> は、 @@ -2276,7 +2374,7 @@ request KeepAlive が有効な場合に、 一回の接続で受け付け可能なリクエストの数を制限します。 0 に設定していれば、受け付けるリクエストは無制限になります。 - この設定は、サーバ性能を向上させるために、大きな数値を指定すること勧めます。 + この設定は、サーバ性能を向上させるために、大きな数値を指定することを勧めます。

    例:

    @@ -2297,9 +2395,9 @@ request -
    説明:HTTP の持続的な接続を有効にする
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    MaxRangeReversals ディレクティブ

    @@ -2311,9 +2409,9 @@ request -
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    MaxRanges ディレクティブ

    @@ -2325,9 +2423,22 @@ resource -
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.3.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    MergeTrailers ディレクティブ

    + + + + + + + + +
    説明:Determines whether trailers are merged into headers
    構文:MergeTrailers [on|off]
    デフォルト:MergeTrailers off
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core
    互換性:2.4.11 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    Mutex ディレクティブ

    @@ -2339,9 +2450,9 @@ or specified mutexes -
    ステータス:Core
    モジュール:core
    互換性:Available in Apache HTTP Server 2.3.4 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    NameVirtualHost ディレクティブ

    @@ -2582,16 +2693,77 @@ or specified mutexes -
    ステータス:Core
    モジュール:core
    互換性:Available in Apache 2.1.5 and later. -On Windows from Apache 2.3.3 and later.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    参照

    +On Windows, from Apache 2.3.3 and later. +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    top
    +

    Protocols ディレクティブ

    + + + + + + + + +
    説明:Protocols available for a server/virtual host
    構文:Protocols protocol ...
    デフォルト:Protocols http/1.1
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core
    互換性:Only available from Apache 2.4.17 and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    + +
    +
    top
    +

    ProtocolsHonorOrder ディレクティブ

    + + + + + + + + +
    説明:Determines if order of Protocols determines precedence during negotiation
    構文:ProtocolsHonorOrder On|Off
    デフォルト:ProtocolsHonorOrder On
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Core
    モジュール:core
    互換性:Only available from Apache 2.4.17 and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    参照

    + +
    +
    top
    +

    QualifyRedirectURL ディレクティブ

    + + + + + + + + + +
    説明:Controls whether the REDIRECT_URL environment variable is + fully qualified
    構文:QualifyRedirectURL ON|OFF
    デフォルト:QualifyRedirectURL OFF
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ
    上書き:FileInfo
    ステータス:Core
    モジュール:core
    互換性:Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL ON' was configured.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    RegisterHttpMethod ディレクティブ

    + + + + + + +
    説明:Register non-standard HTTP methods
    構文:RegisterHttpMethod method [method [...]]
    コンテキスト:サーバ設定ファイル
    ステータス:Core
    モジュール:core

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    RLimitCPU ディレクティブ

    -
    説明:Apache の子プロセスから起動されたプロセスの CPU 消費量を @@ -2776,9 +2948,9 @@ of a request or the last 63, assuming the request itself is greater than
    ステータス:Core
    モジュール:core
    互換性:Available in Apache httpd 2.2.7 and later.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    ServerAdmin ディレクティブ

    @@ -2877,7 +3049,7 @@ of a request or the last 63, assuming the request itself is greater than ServerName はこのバーチャルホストにマッチするために 何がリクエストの Host: ヘッダに現れる必要があるのかを指定します。

    -

    SSL を処理するデバイス、例えばリーバスプロクシやロードバランサや +

    SSL を処理するデバイス、例えばリバースプロクシやロードバランサや SSL 処理軽減アプライアンスの裏側でサーバが稼動する場合もあるでしょう。 そういった場合では、クライアントが接続するときに使う https:// スキームとポート番号を ServerName @@ -2975,8 +3147,8 @@ of a request or the last 63, assuming the request itself is greater than 稼動中のバーチャルホストの ServerName の書かれた行を追加し、 EMail にした場合はさらに参照されたドキュメントに対する ServerAdmin を指す "mailto:" が追加されます。

    -

    バージョン 2.0.44 以降ではこのディレクティブは ServerSignature - ディレクティブにより表示される情報も制御します。

    +

    バージョン 2.0.44 以降では、表示されるサーバーのバージョン番号の詳細はServerTokens + ディレクティブにより制御されます。

    参照

      @@ -3205,7 +3377,7 @@ of a request or the last 63, assuming the request itself is greater than の挙動をオーバーライドします。デフォルトの TraceEnable on は、リクエストボディを受け入れないような、RFC2616 に準拠した TRACE リクエストを受け付けます。 - TraceEnale off と設定すると、コアサーバと + TraceEnable off と設定すると、コアサーバと mod_proxy405 (メソッド不許可) エラーをクライアントに返します。

      @@ -3228,9 +3400,9 @@ of a request or the last 63, assuming the request itself is greater than
    -
    コンテキスト:サーバ設定ファイル
    ステータス:Core
    モジュール:core

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    UseCanonicalName ディレクティブ

    @@ -3406,7 +3578,7 @@ of a request or the last 63, assuming the request itself is greater than もしくはホスト名に対応する必要があり、 1 番目の場合には複数のアドレスで IP パケットを受信できるように サーバマシンを設定しなければなりません。 - (もし、マシンが複数のネットワークインターフェースと持たない場合は、 + (もし、マシンが複数のネットワークインターフェースを持たない場合は、 (OSがサポートしていれば) ifconfig alias コマンドにより 達成できます)。

    @@ -3461,13 +3633,34 @@ of a request or the last 63, assuming the request itself is greater than
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/core.html.tr.utf8 b/docs/manual/mod/core.html.tr.utf8 index d544201161d..3581eb91cb8 100644 --- a/docs/manual/mod/core.html.tr.utf8 +++ b/docs/manual/mod/core.html.tr.utf8 @@ -1,23 +1,28 @@ - -core - Apache HTTP Sunucusu +core - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Temel Özellikleri

    @@ -28,7 +33,6 @@  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    Açıklama:Apache HTTP Sunucusunda daima mevcut olan çekirdek özellikler
    Durum:Çekirdek
    @@ -43,7 +47,10 @@
  • AllowOverride
  • AllowOverrideList
  • CGIMapExtension
  • +
  • CGIPassAuth
  • +
  • CGIVar
  • ContentDigest
  • +
  • DefaultRuntimeDir
  • DefaultType
  • Define
  • <Directory>
  • @@ -64,10 +71,12 @@
  • ForceType
  • GprofDir
  • HostnameLookups
  • +
  • HttpProtocolOptions
  • <If>
  • <IfDefine>
  • <IfModule>
  • Include
  • +
  • IncludeOptional
  • KeepAlive
  • KeepAliveTimeout
  • <Limit>
  • @@ -85,10 +94,15 @@
  • MaxRangeOverlaps
  • MaxRangeReversals
  • MaxRanges
  • +
  • MergeTrailers
  • Mutex
  • NameVirtualHost
  • Options
  • Protocol
  • +
  • Protocols
  • +
  • ProtocolsHonorOrder
  • +
  • QualifyRedirectURL
  • +
  • RegisterHttpMethod
  • RLimitCPU
  • RLimitMEM
  • RLimitNPROC
  • @@ -111,7 +125,9 @@
  • UseCanonicalPhysicalPort
  • <VirtualHost>
  • -
    +

    Bugfix checklist

    Ayrıca bakınız:

    +
    top

    AcceptFilter Yönergesi

    @@ -122,10 +138,9 @@ Bağlam:sunucu geneli Durum:Çekirdek Modül:core -Uyumluluk:Windows'ta Apache 2.3.3 ve sonrasında diğerlerinde Apache -2.1.5 ve sonrasında mevcuttur. -

    Bu yönerge protokol türüne göre bir dinleme soketinin işletim +

    Bu yönerge Protocol yönergesinde belirtilen + protokol türüne göre bir dinleme soketinin işletim sistemine özgü en iyilemelerini etkin kılar. İşletim sistemi çekirdeği için temel önerme veri alınıncaya kadar veya HTTP isteğinin tamamı tamponlanana kadar sunucu sürecine bir soket tahsis etmemektir. @@ -138,13 +153,18 @@ gibi sunucunun baştan bir veri göndermesinin gerekli olduğu protokoller için kullanışlıdır. Örnek:

    -

    AcceptFilter nntp none

    +
    AcceptFilter nntp none
    + + +

    Öntanımlı protokol isimleri port 443 için https ve tüm + diğer portlar için http'dir. Dinlenmesi için başka bir port + ile ilgili bir protokol belirtmek isterseniz Listen yönergesine protokol + argümanını ekleyin.

    FreeBSD için öntanımlı değerler:

    -

    - AcceptFilter http httpready
    - AcceptFilter https dataready -

    +
    AcceptFilter http httpready
    +AcceptFilter https dataready
    +

    httpready kabul süzgeci HTTP isteklerinin tamamını işletim sistemi çekirdeği seviyesinde tamponlar. Çekirdek isteğin @@ -152,42 +172,53 @@ şifrelenmiş olduğundan sadece accf_data(9) süzgeci kullanılır.

    Linux’taki öntanımlı değerler:

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http data
    +AcceptFilter https data
    +

    Linux’un TCP_DEFER_ACCEPT soket seçeneği HTTP isteklerinin tamponlanmasını desteklemez. none dahil her değer dinleyici üzerinde TCP_DEFER_ACCEPT seçeneğini etkin kılar. Daha ayrıntılı bilgi edinmek için Linux - tcp(7) kılavuz sayfasına bakınız.

    + tcp(7) kılavuz sayfasına bakınız.

    Windows’taki öntanımlı değerler::

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    AcceptFilter http connect
    +AcceptFilter https connect
    +

    Windows'un mpm_winnt modülü AcceptEx() arayüzünü açıp kapamak için AcceptFilter'i yorumlar ve - http protokol tamponlamasını desteklemez. Windows - AcceptEx() arayüzünü tetikleyen iki değer vardır ve ağ - soketlerini bağlantılar arasında yer değiştirirler. data, - veri aktarılana kadar yukarıda anlatıldığı gibi bekler ve ilk veri - tamponu ve uç ağ adresleri tek bir AcceptEx() çağrısından - alınır. connect, AcceptEx() arayüzünü - kullanacak, ayrıca uç ağ adresleri de alınacak, fakat - none gibi connect seçeneği de ilk veri - aktarımını beklemeyecektir.

    + http protokol tamponlamasını desteklemez. connect, AcceptEx() arayüzünü kullanacak, ayrıca uç ağ adresleri de alınacak, fakat none gibi connect seçeneği de ilk veri aktarımını beklemeyecektir.

    Windows'ta none AcceptEx()'ten ziyade accept() kullanır ve ağ soketlerini bağlantılar arasında yer değiştirmez. Sürücü desteği bozuk ağ bağdaştırıcılarından başka vpn sürücüleri gibi bazı sanal ağ sağlayıcılar veya spam, virus veya casus yazılım süzgeçleri için kullanışlıdır.

    + +
    +

    data AcceptFilter (Windows)

    + +

    2.4.23 ve öncesi sürümlerde, Windows data accept + süzgeci veri aktarılana kadar bekletildikten sonra ilk veri + tamponlanır ve uç ağ adresi için tek bir AcceptEx() çağrısı yapılır. + Bu gerçeklenim hizmet reddi saldırısına konu olduğundan iptal + edilmiştir.

    + +

    httpd'nin şu anki dağıtımları için Windows'da connect + süzgeci öntanımlıdır ve data belirtilmiş olsa dahi + connect belirtilmiş gibi davranılır. Önceki sürümleri + kullananların AcceptFilter satırını yukarıdaki gibi + connect süzgecine ayarlamaları gerekmektedir.

    +
    + +

    Ayrıca bakınız:

    +
    top

    AcceptPathInfo Yönergesi

    @@ -200,7 +231,6 @@ Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:Apache 2.0.30 ve sonrasında mevcuttur.

    Bu yönerge, istekte dosya isminden sonra (dizinde belirtilen dosya bulunmayabilir) belirtilen yol verisinin kabul edilip edilmeyeceğini @@ -244,15 +274,12 @@ normal olarak isteği reddederdi, böyle bir durumda bir betiği etkin kılmak için aşağıdaki gibi bir yapılandırma kullanabilirsiniz:

    -

    - <Files "mypaths.shtml">
    - - Options +Includes
    - SetOutputFilter INCLUDES
    - AcceptPathInfo On
    -
    - </Files> -

    +
    <Files "mypaths.shtml">
    +  Options +Includes
    +  SetOutputFilter INCLUDES
    +  AcceptPathInfo On
    +</Files>
    +
    @@ -270,20 +297,16 @@ işlerken önce bu dizinlerde bu yönergede belirtilmiş yapılandırma dosyasını arar. Örnek:

    -

    - AccessFileName .acl -

    +
    AccessFileName .acl
    +

    Sunucu, /usr/local/web/index.html belgesini döndürmeden önce,

    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory> -

    +
    <Directory "/">
    +    AllowOverride None
    +</Directory>
    +

    şeklinde bir yapılandırma ile iptal edilmiş olmadıkça yönergeler için /.acl, /usr/.acl, @@ -323,9 +346,8 @@ Genel Ağ ortam türlerinde (MIME türlerinde) kullanmak üzere IANA’da kayıtlı karakter kümesi değerlerinden biri olmalıdır. Örnek:

    -

    - AddDefaultCharset utf-8 -

    +
    AddDefaultCharset utf-8
    +

    AddDefaultCharset yönergesi sadece, metin kaynaklarının hepsinin aynı karakter kümesine sahip olduğu bilindiği @@ -350,28 +372,38 @@ - + - +
    Açıklama:Kodlanmış dosya yolu ayracı içeren URL’lere izin verilip verilmeyeceğini belirler.
    Sözdizimi:AllowEncodedSlashes On|Off
    Sözdizimi:AllowEncodedSlashes On|Off|NoDecode
    Öntanımlı:AllowEncodedSlashes Off
    Bağlam:sunucu geneli, sanal konak
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Apache 2.0.46 ve sonrasında mevcuttur.
    Uyumluluk:NoDecode seçeneği Apache httpd 2.3.12 ve sonrasında + mevcuttur.

    AllowEncodedSlashes yönergesi kodlanmış dosya yolu ayracı içeren URL’lere izin verir (/ yerine %2F ve ek olarak \ için ilgili sistemlerde - %5C kullanılmış URL’ler). Normalde böyle URL’ler bir 404 + %5C kullanılmış URL’ler).

    + +

    Off öntanımlı değeriyle, böyle URL’ler bir 404 (Nesne bulunamadı) hatasıyla reddedilirler.

    +

    On değeriyle, böyle URL’ler kabul edilir ve kodlanmış + dosya yolu ayraçları kodlanmış diğer karakterler gibi çözümlenir.

    + +

    NoDecode değeriyle, böyle URL’ler kabul edilir fakat + kodlanmış dosya yolu ayraçları çözümlenmeden kodlanmış halde + bırakılır.

    +

    AllowEncodedSlashes On, çoğunlukla PATH_INFO ile bir arada kullanıldığı zaman kullanışlıdır.

    Ek Bilgi

    -

    Kodlanmış bölü çizgilerine izin vermek bu kodlamanın karakter olarak - çözümleneceği anlamına gelmez. URL içindeki %2F veya - %5C’ler (sadece ilgili sistemlerde), tıpkı normal - URL’lere yapıldığı gibi, oldukları gibi bırakılırlar.

    +

    Kodlanmış bölü çizgileri yol bilgisi için gerekliyse bir güvenlik + ölçütü olarak NoDecode kullanımı şiddetle önerilir. + Kodlanmış bölü çizgilerinin çözümlenmesine izin vermek güvensiz olması + olası yollara izin vermek olurdu.

    Ayrıca bakınız:

    @@ -386,7 +418,7 @@ yönerge türleri belirtilir. Sözdizimi:AllowOverride All|None|yönerge-türü [yönerge-türü] ... -Öntanımlı:AllowOverride All +Öntanımlı:AllowOverride None (2.3.9 ve sonrası), AllowOverride All (2.3.8 ve öncesi) Bağlam:dizin Durum:Çekirdek Modül:core @@ -401,8 +433,10 @@ sadece düzenli ifade içermeyen <Directory> bölümlerinde geçerlidir. -

    Yönergeye değer olarak None belirtilirse .htaccess dosyaları tamamen yok sayılır. Bu - durumda, sunucu dosya sisteminde rastladığı .htaccess +

    Bu yönergeye ve AllowOverrideList + yönergesine değer olarak None belirtilirse + .htaccess dosyaları tamamen yok sayılır. + Bu durumda, sunucu dosya sisteminde rastladığı .htaccess dosyalarını okumaya dahi çalışmayacaktır.

    Bu yönergeye All değeri atanırsa, .htaccess bağlamında kullanılabilecek her @@ -414,7 +448,7 @@

    AuthConfig
    -
    AuthDBMGroupFile, +
    AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, @@ -452,6 +486,11 @@ RewriteBase, RewriteCond, RewriteRule + yönergelerinin, mod_alias modülündeki + Redirect, + RedirectTemp, + RedirectPermanent, + RedirectMatch) yönergelerinin ve mod_actions modülündeki Action yönergesinin kullanımına izin verilir. @@ -466,7 +505,7 @@ AddIconByType, DefaultIcon, DirectoryIndex, - FancyIndexing, + FancyIndexing, HeaderName, IndexIgnore, IndexOptions, @@ -477,31 +516,73 @@
    Limit
    Konak erişimini denetleyen - Allow, - Deny ve - Order + Allow, + Deny ve + Order yönergelerinin kullanımına izin verilir.
    +
    Nonfatal=[Override|Unknown|All]
    + +
    .htaccess dosyalarındaki sözdizimi + hatalarının ölümcül olarak ele alınmaması için + AllowOverride yönergesinin kullanımına izin verir; bunun + yerine bir dahili sunucu hatasına sebep olur, izin verilmeyen veya + tanınmayan yönergeler yoksayılır ve günlüğe bir uyarı çıktılanır: +
      +
    • Nonfatal=Override ile + AllowOverride tarafından yasaklanmış yönergeler + ölümcül olarak ele alınmaz.
    • +
    • Nonfatal=Unknown ile bilinmeyen yönergeler + ölümcül olarak ele alınmaz. Yazım hatalarını ve mevcut olmayan bir + modül tarafından gerçeklenmiş yönergeleri kapsar.
    • +
    • Nonfatal=All ile yukarıdakilerin ikisi de + ölümcül olarak ele alınmaz.
    • +
    +

    Geçerli bir yönergedeki yazım hatalarının hala dahili bir sunucu + hatasına sebep olacağına dikkat ediniz.

    +

    Güvenlik

    + Ölümcül olmayan hatalar .htaccess + kullanıcıları için güvenlikle ilgili sorunlara yol açabilir. Örneğin + AllowOverride AuthConfig'e izin vermezse kullanıcıların + siteye erişimini kısıtlayan yapılandırma iptal edilmiş olur. +
    +
    +
    Options[=seçenek,...]
    Dizinlere özgü özellikleri denetleyen Options ve XBitHack yönergelerinin kullanımına izin verilir. Options komutunda belirtilecek seçenekler - bir eşit işaretinden sonra aralarına sadece virgül konarak - (boşluksuz) belirtilebilir.
    + bir eşit işaretinden sonra aralarına sadece virgül konarak, + fakat virgülden sonra boşluk bırakmadan belirtilebilir. + +

    Options'ın örtük iptali

    +

    .htaccess dosyalarında kullanılabilen + seçenek listesi bu yönergeyle sınırlanabilirse de herhangi bir + Options yönergesine izin + verildiği sürece miras alınmış diğer seçenekler göreli olmayan + sözdizimi kullanılarak iptal edilebilir. Başka bir deyişle, bu + mekanizma diğerlerinin değerlerini korumasına izin verirken belli bir + seçeneği değerini korumaya zorlayamaz. +

    + +

    + AllowOverride Options=Indexes,MultiViews +

    +

    Örnek:

    -

    - AllowOverride AuthConfig Indexes -

    +
    AllowOverride AuthConfig Indexes
    +

    Bu örnekte AuthConfig ve Indexes grubundaki yönergeler bir dahili sunucu hatasına yol açmayacaktır.

    -

    Güvenlik ve başarımı arttırmak için <Directory /> +

    Güvenlik ve başarımı arttırmak için + <Directory "/"> bloğu içinde AllowOverride yönergesine None dışında bir değer atamayın. Böyle yapmak yerine bir .htaccess dosyası yerleştirmeyi düşündüğünüz dizine ait bir @@ -510,6 +591,7 @@

    Ayrıca bakınız:

    @@ -517,21 +599,58 @@
    top

    AllowOverrideList Yönergesi

    - - + + -
    Açıklama:Individual directives that are allowed in -.htaccess files
    Sözdizimi:AllowOverrideList None|directive -[directive-type] ...
    Açıklama:.htaccess dosyalarında izin verilecek yönergeler tek tek belirtilir
    Sözdizimi:AllowOverrideList None|yönerge +[yönerge-türü] ...
    Öntanımlı:AllowOverrideList None
    Bağlam:dizin
    Durum:Çekirdek
    Modül:core

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    Ayrıca bakınız:

    + +

    Sunucu bir .htaccess dosyası (AccessFileName tarafından belirtildiği gibi) + bulduğunda önceki yapılandırma yönergelerini geçersiz kılabilen bu + dosyada hangi yönergelerin bildirildiğini bilmek ister.

    + +

    Sadece <Directory> bölümlerinde kullanılabilir

    + AllowOverrideList sadece <Directory> bölümlerinde düzenli + ifadeler olmaksızın belirtilmişse kullanılabilir; <Location>, <DirectoryMatch> veya <Files> bölümlerinde değil. +
    + +

    Bu yönergeye ve AllowOverride + yönergesine None atanmışsa + .htaccess dosyaları tamamen yoksayılır. Bu + durumda sunucu dosya sistemindeki .htaccess dosyalarını + okumaya bile çalışmayacaktır.

    + +

    Örnek:

    + +
    AllowOverride None
    +AllowOverrideList Redirect RedirectMatch
    + + +

    Yukarıdaki örnekte sadece Redirect ve + RedirectMatch yönergelerine izin verilmektedir. Tüm + diğerleri dahili bir sunucu hatasına sebep olacaktır.

    + +

    Örnek:

    + +
    AllowOverride AuthConfig
    +AllowOverrideList CookieTracking CookieName
    + + +

    Yukarıdaki örnekte AllowOverride + yönergesi AuthConfig yönerge grubuna izin + verirken AllowOverrideList yönergesi + FileInfo yönerge grubundan yalnız iki yönergeye izin + vermektedir. Tüm diğerleri dahili bir sunucu hatasına sebep + olacaktır.

    + +

    Ayrıca bakınız:

    top
    @@ -546,11 +665,71 @@ Modül:core Uyumluluk:Sadece NetWare’de geçerlidir. -

    Bu yönerge Apache’inin CGI bekitlerini çalıştırmak için kullanacağı - yorumlayıcıyı nasıl bulacağını denetlemek için kullanılır. Örneğin, - CGIMapExtension sys:\foo.nlm .foo satırı .foo - uzantılı CGI betik dosyalarının FOO yorumlayıcıya aktarılmasını - sağlar.

    +

    Bu yönerge Apache httpd’nin CGI bekitlerini çalıştırmak için + kullanacağı yorumlayıcıyı nasıl bulacağını denetlemek için kullanılır. + Örneğin, CGIMapExtension sys:\foo.nlm .foo satırı + .foo uzantılı CGI betik dosyalarının FOO yorumlayıcıya + aktarılmasını sağlar.

    + +
    +
    top
    +

    CGIPassAuth Yönergesi

    + + + + + + + + + +
    Açıklama:HTTP yetkilendirme başlıklarının betiklere CGI değişkenleri +olarak aktarılmasını etkin kılar
    Sözdizimi:CGIPassAuth On|Off
    Öntanımlı:CGIPassAuth Off
    Bağlam:dizin, .htaccess
    Geçersizleştirme:AuthConfig
    Durum:Çekirdek
    Modül:core
    Uyumluluk: Apache HTTP Sunucusunun 2.4.13 ve sonraki sürümlerinde kullanılabilmektedir
    +

    CGIPassAuth yönergesi, HTTP Temel kimlik + doğrulamasını gerçekleştiren betikler için gereken + Authorization gibi HTTP yetkilendirme başlıklarına + betiklerin erişebilmesini sağlar. Normalde bu HTTP başlıkları + betiklerden gizli olup sunucuda HTTP Temel kimlik kanıtlaması etkin + kılındığında sunucuya erişmekte kullanılan kullanıcı kimliklerinin ve + parolalarının betikler tarafından görülmemesini mümkün kılar. Bu yönerge, + HTTP Temel kimlik kanıtlamasını betiklerin gerçekleştirmesini sağlamak + için kullanılmalıdır.

    + +

    Apache HTTP Sunucusunun önceki sürümlerinde derleme sırasında + kullanılabilen SECURITY_HOLE_PASS_AUTHORIZATION sabitinin + yerine bu yönerge kullanılabilir.

    + +

    Bu ayarlama mod_cgi, mod_cgid, + mod_proxy_fcgi, mod_proxy_scgi ve + benzerleri gibi ap_add_common_vars() kullanan modüller + tarafından kabul görür. Özellikle, isteği alışılmış tarzda işleme + sokmayıp bu arayüzü kullanan modülleri etkiler. Ayrıca, + ap_add_common_vars() kullanmayan üçüncü parti modüller de + bu ayarlamayı kullanmayı tercih edebilir.

    + +
    +
    top
    +

    CGIVar Yönergesi

    + + + + + + + + +
    Açıklama:Bazı CGI değişkenlerinin nasıl atanacağını belirler
    Sözdizimi:CGIVar değişken kural
    Bağlam:dizin, .htaccess
    Geçersizleştirme:FileInfo
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Apache HTTP Server 2.4.21 ve sonrasında kullanılabilir
    +

    Bu yönerge bazı CGI değişkenlerinin nasıl atanacağını belirler.

    + +

    REQUEST_URI kuralları:

    +
    +
    original-uri (default)
    +
    Değer özgün istek satırından alınır ve dahili yöneldirmeler veya + istenen özkaynakları değiştiren alt istekler dikkate alınmaz.
    +
    current-uri
    +
    Değer özgün istek satırından farklı olabilecek dahili yönlendirmeleri + veya istenen özkaynakları değiştiren alt istekleri de yansıtır.
    +
    top
    @@ -592,6 +771,44 @@ çıktılanırlar ve bayt seviyesinden çıktılar bu başlığa sahip olmazlar.

    +
    +
    top
    +

    DefaultRuntimeDir Yönergesi

    + + + + + + + + +
    Açıklama:Sunucunun çalışma anı dosyaları için temel dizin
    Sözdizimi:DefaultRuntimeDir dizin-yolu
    Öntanımlı:DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/)
    Bağlam:sunucu geneli
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Apache 2.4.2 ve sonrasında kullanılabilmektedir. +
    +

    DefaultRuntimeDir yönergesi sunucunun çalışma + anında oluşturacağı dosyaların (paylaşımlı bellek, kilitler, vb.) + saklanacağı dizini belirtmekte kullanılır. Göreli bir yol belirtilirse + tam yol ServerRoot yönergesinde belirtilene + göreli olacaktır.

    + +

    Örnek

    +
    DefaultRuntimeDir scratch/
    + + +

    DefaultRuntimeDir için öntanımlı yer derleme + sırasında DEFAULT_REL_RUNTIMEDIR #define satırı ile + değiştirilebilir.

    + +

    Bilgi: ServerRoot bu yönergeden önce belirtilmiş + olmalıdır, aksi takdirde temel dizin için öntanımlı + ServerRoot kullanılır.

    + + +

    Ayrıca bakınız:

    +
      +
    • ServerRoot üzerindeki izinlerin düzgün olarak +nasıl ayarlanacağını öğrenmek için: +güvenlik ipuçları
    • +
    top

    DefaultType Yönergesi

    @@ -606,17 +823,16 @@ türünü belirlerdi. Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:none değeri Apache 2.2.7 ve sonrasında mevcuttur. -Diğer tüm seçenekler Apache'nin 2.3.x ve sonraki sürümleri için iptal -edilmiştir. +Uyumluluk:none değeri Apache httpd 2.2.7 ve sonrasında +mevcuttur. Diğer tüm seçenekler Apache httpd'nin 2.3.x ve sonraki sürümleri +için iptal edilmiştir.

    Bu yönerge iptal edilmiştir. Yapılandırma dosyalarının geriye uyumluluğunu sağlamak için, öntanımlı bir ortam türünün olmadığını belirten none değeriyle belirtilebilir. Örnek:

    -

    - DefaultType none -

    +
    DefaultType None
    +

    DefaultType None sadece httpd-2.2.7 ve sonrasında mevcuttur.

    @@ -630,25 +846,51 @@ edilmiştir.
    top

    Define Yönergesi

    - - - + + +
    Açıklama:Bir değişkenin mevcudiyetini betimler.
    Sözdizimi:Define değişken-ismi
    Bağlam:sunucu geneli
    Açıklama:Bir değişken tanımlar
    Sözdizimi:Define değişken-ismi [değişken-değeri]
    Bağlam:sunucu geneli, sanal konak, dizin
    Durum:Çekirdek
    Modül:core
    -

    httpd’yi -D - seçeneğiyle çalıştırmaya eşdeğerdir.

    - -

    Bu yönerge, başlatma betiğinde -D seçeneğinin - argümanlarını değiştirme gereği duymaksızın <IfDefine> bölümlerini kullanıma sokmak için - kullanılabilir.

    +

    Tek değiştirgeli biçemi httpd’yi -D + seçeneğiyle çalıştırmaya eşdeğerdir. Bu yönerge, başlatma betiğinde + -D seçeneğinin argümanlarını değiştirme gereği duymaksızın + <IfDefine> bölümlerini + kullanıma sokmak için kullanılabilir.

    + +

    Buna ek olarak, ikinci değiştirge belirtilirse yapılandırma değişkenine + bu değer atanır. Değişken yapılandırmada ${VAR} sözdizimi + ile kullanılabilir. Değişken daima küresel olarak tanımlı olup + yapılandırma bölümünü sarmalayan etki alanı ile sınırlanmaz.

    + +
    <IfDefine TEST>
    +  Define servername test.example.com
    +</IfDefine>
    +<IfDefine !TEST>
    +  Define servername www.example.com
    +  Define SSL
    +</IfDefine>
    +DocumentRoot "/var/www/${servername}/htdocs"
    + + +

    RewriteMap sözdizimi ile + karışmalardan kaçınmak için değişken isimleri ikinokta ":" karakterleri + içeremez.

    + +

    Bu yönerge sanal konakta ve dizin içeriğinde desteklenirken yapılan + değişiklikler (eşleşsin eşleşmesin) yönergeyi sarmalayan yapılandırma + bölümünün ötesinde, sonraki yapılandırma yönergelerine de görünür olur. Diğer + yapılandırma bölümleri için sağlanan bu desteğe bu yönergenin ilk + gerçekleniminde hatalı olarak izin verilmişti. Geriye uyumluluk amacıyla + (önceden sezilmeyen sonuçlarıyla) bu durum muhafaza edilmiştir.

    top

    <Directory> Yönergesi

    + altdizinlerinde ve bunların içeriğinde uygulanacak bir yönerge grubunu + sarmalar. @@ -657,7 +899,8 @@ edilmiştir.
    Açıklama:Sadece ismi belirtilen dosya sistemi dizininde ve bunun - altdizinlerinde uygulanacak bir yönerge grubunu sarmalar.
    Sözdizimi:<Directory dizin-yolu> ... </Directory>
    Bağlam:sunucu geneli, sanal konak

    <Directory> ve </Directory> sadece ismi belirtilen dosya sistemi - dizininde ve bunun altdizinlerinde uygulanacak bir yönerge grubunu + dizininde, bunun altdizinlerinde ve bu dizinlerin içindeki dosyalara + uygulanacak bir yönerge grubunu sarmalamakta kullanılır. Bir dizin bağlamında kullanılabilecek her yönergeye izin verilir. dizin-yolu bir dizinin tam yolu olabileceği gibi Unix kabuk tarzı bir dosya ismi eşleştirme kalıbı da @@ -665,22 +908,23 @@ edilmiştir. * herhangi bir karakter dizisiyle eşleşir. Ayrıca [] karakter aralıkları da kullanılabilir. ‘/’ karakteri ile hiçbir kalıp karakteri eşleşmez, bu bakımdan <Directory - /*/public_html> ile /home/user/public_html - değil, ama <Directory /home/*/public_html> + "/*/public_html"> ile /home/user/public_html + değil, ama <Directory "/home/*/public_html"> eşleşecektir. Örnek:

    -

    - <Directory /usr/local/httpd/htdocs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory> -

    +
    <Directory "/usr/local/httpd/htdocs">
    +  Options Indexes FollowSymLinks
    +</Directory>
    + + +

    Dizin yollarında isterseniz önceleme kullanabilirsiniz, ancak eğer yol + bazı boşluklar içeriyorsa mutlaka kullanmanız gerekir. Bir boşluk aksi + belirtilmedikçe bir ifadenin sonunu belirlediğinden bu gereklidir.

    dizin-yolu argümanlarını belirtirken dikkatli - olmalısınız: Apache’nin dosyalara erişmekte kullandığı dosya sistemi - yolu ile bire bir eşleşmelidir. Belli bir + olmalısınız: Apache httpd’nin dosyalara erişmekte kullandığı dosya + sistemi yolu ile bire bir eşleşmelidir. Belli bir <Directory> dizinine uygulanan yönergeler, aynı dizine farklı bir yoldan, örneğin başka bir sembolik bağ üzerinden erişilen dosyalara uygulanmayacaktır.

    @@ -689,9 +933,10 @@ edilmiştir.

    ~ karakterine ek olarak düzenli ifadeler de kullanılabilir. Örnek:

    -

    - <Directory ~ "^/www/.*/[0-9]{3}"> -

    +
    <Directory ~ "^/www/[0-9]{3}">
    +
    +</Directory>
    +

    yönergesi /www/ içindeki üç rakamdan oluşan dizinlerle eşleşecektir.

    @@ -701,19 +946,14 @@ edilmiştir. eşleşmedeki yönergelerden başlayarak .htaccess dosyalarındaki yönergelere kadar genişletilir. Örneğin,

    -

    - <Directory />
    - - AllowOverride None
    -
    - </Directory>
    -
    - <Directory /home/>
    - - AllowOverride FileInfo
    -
    - </Directory> -

    +
    <Directory "/">
    +  AllowOverride None
    +</Directory>
    +
    +<Directory "/home">
    +  AllowOverride FileInfo
    +</Directory>
    +

    bölümleri ile /home/web/dir/doc.html belgesine erişirken şu aşamalardan geçilir:

    @@ -735,13 +975,10 @@ edilmiştir. değerlendirilmez. Düzenli ifadelerin tamamı yapılandırma dosyasında görüldükleri sıraya göre sınanırlar. Örneğin,

    -

    - <Directory ~ abc$>
    - - # ... yönergeler burada ...
    -
    - </Directory> -

    +
    <Directory ~ "abc$">
    +  # ... yönergeler burada ...
    +</Directory>
    +

    düzenli ifadeli bölümü, tüm normal <Directory> bölümleri ve .htaccess dosyaları uygulanıncaya kadar @@ -750,18 +987,14 @@ edilmiştir. ve buna ilişkin <Directory> uygulanacaktır.

    -

    <Directory /> için öntanımlı Apache - erişiminin Allow from All oluşuna dikkat ediniz. Bunu şöyle - bir blokla değiştirmeniz,

    +

    <Directory "/"> için öntanımlı erişimin tüm + erişime izin vermek oluşuna dikkat ediniz. Bunu şöyle bir blokla + değiştirmeniz,

    + +
    <Directory "/">
    +  Require all denied
    +</Directory>
    -

    - <Directory />
    - - Order Deny,Allow
    - Deny from All
    -
    - </Directory> -

    ve erişilebilir olmasını istediğiniz dizinleri ayrıca belirtmeniz önerilir. Daha ayrıntılı bilgi edinmek için Güvenlik İpuçları belgesine @@ -774,15 +1007,15 @@ edilmiştir.

    Ayrıca bakınız:

    top

    <DirectoryMatch> Yönergesi

    - + @@ -791,25 +1024,52 @@ edilmiştir.
    Açıklama:Bir düzenli ifade ile eşleşen dosya sistemi dizininde ve bunun - altdizinlerinde uygulanacak bir yönerge grubunu sarmalar.
    Açıklama:Bir düzenli ifade ile eşleşen dosya sistemi dizinlerinin içeriklerine uygulanacak bir yönerge grubunu sarmalar.
    Sözdizimi:<DirectoryMatch düzifd> ... </DirectoryMatch>
    Bağlam:sunucu geneli, sanal konak

    <DirectoryMatch> and </DirectoryMatch> yönergeleri <Directory> gibi sadece ismi - belirtilen dosya sistemi dizininde ve bunun altdizinlerinde uygulanacak + belirtilen dosya sistemi dizininde ve içindeki dosyalarda uygulanacak bir yönerge grubunu sarmalamakta kullanılır. Tek farkla argüman olarak bir düzenli ifade alır. Örnek:

    -

    - <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> -

    +
    <DirectoryMatch "^/www/(.+/)?[0-9]{3}/">
    +    # ...
    +</DirectoryMatch>
    + + +

    yönergesi /www/ içindeki (veya alt dizinlerindeki) üç + rakamdan oluşan dizinlerle eşleşecektir.

    + +

    Uyumluluk

    + 2.3.9 öncesinde, bu yönerge örtük olarak (<Directory> gibi) alt dizinlere de uygulanırdı + ve satır sonu simgesi ($) ile eşleşemezdi. 2.3.9 ve sonrasında, sadece + ifade ile eşleşen dizinler sarmalanan yönerge grubundan etkilenmektedir. +
    + +

    Sondaki bölü çizgileri

    + Bu yönerge bir bölü çizgisi ile sonlanan veya sonlanmayan dizinler için + yapılan isteklere uygulanır, dolayısıyla satır sonuna ($) çıpalanmış + ifadeler dikkatli yazılmalıdır. +
    + +

    2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + mod_rewrite gibi modüllerden veya düzenli ifadelerden başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.

    + +
    <DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)">
    +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</DirectoryMatch>
    -

    yönergesi /www/ içindeki üç rakamdan oluşan dizinlerle - eşleşecektir.

    Ayrıca bakınız:

    top
    @@ -817,7 +1077,7 @@ edilmiştir. - + @@ -827,11 +1087,10 @@ edilmiştir. benzeri bir yönerge ile eşleşmedikçe, sunucu istenen URL’deki yolu, belge yolu haline getirmek için belge kök dizinine ekler. Örnek:

    -

    - DocumentRoot /usr/web -

    +
    DocumentRoot "/usr/web"
    + -

    yapılandırması ile http://www.my.host.com/index.html +

    yapılandırması ile http://my.example.com/index.html isteği /usr/web/index.html ile eşleştirilir. dizin-yolu ile göreli dosya yolu belirtildiği takdirde belge kök dizininin ServerRoot ile @@ -849,54 +1108,89 @@ edilmiştir.

    top
    Açıklama:İstemciye görünür olan ana belge ağacının kök dizinini belirler.
    Sözdizimi:DocumentRoot dizin-yolu
    Öntanımlı:DocumentRoot /usr/local/apache/htdocs
    Öntanımlı:DocumentRoot "/usr/local/apache/htdocs"
    Bağlam:sunucu geneli, sanal konak
    Durum:Çekirdek
    Modül:core
    - + -
    Açıklama:Contains directives that apply only if the condition of a -previous <If> or -<ElseIf> section is not -satisfied by a request at runtime
    Açıklama:Önceki bir <If> veya <ElseIf> bölümünün koşulu, çalışma anında bir istek tarafından yerine getirilmediği takdirde uygulanacak yönergeleri içerir
    Sözdizimi:<Else> ... </Else>
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:All
    Durum:Çekirdek
    Modül:core

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    Ayrıca bakınız:

    + +

    <Else> sadece ve sadece aynı etki + alanındaki en son <If> veya + <ElseIf> bölümü uygulanmamışsa + kapsadığı yönergeleri uygular. Örneğin:

    + +
    <If "-z req('Host')">
    +  # ...
    +</If>
    +<Else>
    +  # ...
    +</Else>
    + + +

    Burada, <If> yönergesi + Host: başlıksız HTTP/1.0 istekleriyle eşleşirken <Else> Host: başlıklılarla + eşleşir.

    + + +

    Ayrıca bakınız:

    top

    <ElseIf> Yönergesi

    - - + + -
    Açıklama:Contains directives that apply only if a condition is satisfied -by a request at runtime while the condition of a previous -<If> or -<ElseIf> section is not -satisfied
    Sözdizimi:<ElseIf expression> ... </ElseIf>
    Açıklama:İçerdiği koşulun bir istek tarafınan sağlandığı ancak daha önceki bir <If> veya +<ElseIf> bölümlerininkilerin sağlanmadığı durumda kapsadığı yönergelerin uygulanmasını sağlar
    Sözdizimi:<ElseIf ifade> ... </ElseIf>
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:All
    Durum:Çekirdek
    Modül:core

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    Ayrıca bakınız:

    + +

    <ElseIf> kapsadığı yönergeleri + sadece ve sadece belirtilen koşulun doğrulandığı ancak aynı etki + alanında hemen önceki <If> veya + <ElseIf> yönergesinin uygulanmadığı + takdirde uygular. Örnek:

    + +
    <If "-R '10.1.0.0/16'">
    +  #...
    +</If>
    +<ElseIf "-R '10.0.0.0/8'">
    +  #...
    +</ElseIf>
    +<Else>
    +  #...
    +</Else>
    + + +

    <ElseIf> bir isteğin uzak adresi + 10.0.0.0/8 ağına aitse ama 10.1.0.0/16 ağına ait değilse içerdiği + yönergelerin uygulanmasını sağlar.

    + + +

    Ayrıca bakınız:

    top
    @@ -918,7 +1212,7 @@ for a complete reference and more examples. belirler. Öntanımlı olarak, bir isteğin yerine getirilmesi, mod_include kullanarak sunucu tarafından çözümlenen bir dosyanın teslimatı sırasında olduğu gibi, bir dosya içindeki veriye - erişilmesini gerektirdiğinde Apache, işletim sistemi tarafından + erişilmesini gerektirdiğinde Apache httpd, işletim sistemi tarafından desteklendiği takdirde dosyayı belleğe eşler.

    Böyle bellek eşleme kimi zaman başarım artışını beraberinde getirirse @@ -928,29 +1222,25 @@ for a complete reference and more examples.

    • Bazı çok işlemcili sistemlerde bellek eşleme httpd’nin başarımını düşürebilmektedir.
    • -
    • httpd bellek eşlemli çalışırken bir dosyanın silinmesi veya - boyutunun küçültülmesi httpd'nin parçalama arızası vererek - çökmesine yol açabilir.
    • +
    • httpd bellek eşlemli çalışırken bir dosyanın + silinmesi veya boyutunun küçültülmesi httpd'nin + parçalama arızası vererek çökmesine yol açabilir.

    Bu tür sorunlardan dolayı zarar görülebilecek sunucu yapılandırmalarında dosya teslimatında bellek eşlemlerinin kullanımını şu şekilde iptal etmeniz gerekir:

    -

    - EnableMMAP Off -

    +
    EnableMMAP Off
    +

    Bu özellik, sadece NFS dosya sistemi üzerinde sunulan dosyaları kapsamak üzere şu şekilde kolayca kapatılabilir:

    -

    - <Directory "/nfs-dosya-yolu"> - - EnableMMAP Off - - </Directory> -

    +
    <Directory "/nfs-dosyaları-yolu">
    +  EnableMMAP Off
    +</Directory>
    +
    top
    @@ -959,20 +1249,21 @@ for a complete reference and more examples. Açıklama:Dosyaların istemciye tesliminde çekirdeğin dosya gönderme desteğinin kullanımını etkin kılar. Sözdizimi:EnableSendfile On|Off -Öntanımlı:EnableSendfile On +Öntanımlı:EnableSendfile Off Bağlam:sunucu geneli, sanal konak, dizin, .htaccess Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:2.0.44 ve sonrasında mevcuttur. +Uyumluluk:Öntanımlı değer 2.3.9 sürümünde Off olarak değişti.

    Bu yönerge, dosya içeriğinin istemciye teslimi için httpd’nin çekirdeğin dosya gönderme desteğini kullanıp kullanmayacağını belirler. Öntanımlı olarak, bir isteğin yerine getirilmesi, bir durağan dosyanın teslimatı sırasında olduğu gibi, bir dosya içindeki veriye erişilmesini gerektirmediği takdirde - Apache, işletim sistemi tarafından destekleniyorsa dosyayı istemciye - teslim etmek için çekirdeğin dosya gönderme özelliğini kullanır.

    + Apache httpd, işletim sistemi tarafından destekleniyorsa dosyayı + istemciye teslim etmek için çekirdeğin dosya gönderme özelliğini + kullanır.

    Çekirdeğin dosya gönderme mekanizması, okuma, gönderme ve tampon ayırma işlemlerini ayrı ayrı yapmaktan kaçınır. Fakat bazı @@ -987,32 +1278,29 @@ for a complete reference and more examples. yapılamayacaktır.

  • Linux’ta IPv6 kullanırken dosya gönderme desteği bazı ağ kartlarındaki TCP toplama sağlaması aktarım hatasını tetikler.
  • -
  • Itanium üzerinde çalışan Linux’ta dosya gönderme desteği 2GB’tan - büyük dosyalarla çalışamamaktadır.
  • +
  • Itanium üzerinde çalışan Linux’ta dosya gönderme desteği + (sendfile) 2GB’tan büyük dosyalarla çalışamamaktadır.
  • DocumentRoot ağ dosya sistemi - (NFS veya SMB gibi) üzerinde olduğu durumda çekirdek ağ dosyalarını - kendi arabelleği üzerinden sunamayabilir.
  • + (NFS, SMB, CIFS, FUSE gibi) üzerinde olduğu durumda çekirdek ağ + dosyalarını kendi arabelleği üzerinden sunamayabilir.

    Bu sorunlardan muzdarip sunucu yapılandırmaları için bu özelliği şöyle - iptal edebilirsiniz:

    + etkin kılabilirsiniz:

    -

    - EnableSendfile Off -

    +
    EnableSendfile On
    -

    Bu özellik, sadece bir NFS veya SMB dosya sistemi üzerinde sunulan + +

    Bu özellik, sadece bir ağ dosya sistemi üzerinde sunulan dosyaları kapsamak üzere şu şekilde kolayca kapatılabilir:

    -

    - <Directory "/path-to-nfs-files"> - - EnableSendfile Off - - </Directory> -

    -

    EnableSendfile yönergesinin .htaccess ve diziniçi - yapılandırmalarınını mod_cache_disk tarafından +

    <Directory "/nfs-dosyaları-yolu">
    +  EnableSendfile Off
    +</Directory>
    + + +

    EnableSendfile yönergesinin .htaccess ve + diziniçi yapılandırmalarının mod_cache_disk tarafından desteklenmediğini lütfen aklınızdan çıkarmayın. EnableSendfile yönergesinin sadece küresel tanımları hesaba katılır.

    @@ -1021,14 +1309,39 @@ for a complete reference and more examples.
    top

    Error Yönergesi

    - - + + - -
    Açıklama:Abort configuration parsing with a custom error message
    Sözdizimi:Error message
    Açıklama:Özel bir hata iletisiyle yapılandırma çözümlemesini durdurur
    Sözdizimi:Error ileti
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Durum:Çekirdek
    Modül:core
    Uyumluluk:2.3.9 and later

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    +Uyumluluk:2.3.9 ve sonrası + +

    Yapılandırmada bir hatanın saptanması istenirse, bu yönerge + yapılandırma çözümlemesinin durdurulması ve özel bir hata iletisi + üretilmesi için kullanılabilir. Genelde kullanıldığı durum, gerekli + modüllerin yapılandırmada bulunmadığının raporlanmasıdır.

    + +
    # Örnek
    +# mod_include yüklü değilse bilelim
    +<IfModule !include_module>
    +  Error "Hata: mod_include mod_foo için gerekiyor. LoadModule ile yükleyin."
    +</IfModule>
    +
    +# SSL veya NOSSL tanımlı mı bilelim
    +<IfDefine SSL>
    +<IfDefine NOSSL>
    +  Error "Ne SSL ne de NOSSL tanımlı. Sadece biri tanımlı olsa yeter."
    +</IfDefine>
    +</IfDefine>
    +<IfDefine !SSL>
    +<IfDefine !NOSSL>
    +  Error "Ya SSL ya da NOSSL tanımlı olmalı."
    +</IfDefine>
    +</IfDefine>
    + + + +
    top

    ErrorDocument Yönergesi

    @@ -1039,19 +1352,17 @@ for a complete reference and more examples. -
    Geçersizleştirme:FileInfo
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Metin iletilerini tırnak içine alma sözdizimi Apache 2.0’da - farklıdır.
    -

    Bir sorun çıktığında veya hata oluştuğunda Apache şu dört işlemden - birini yapacak şekilde yapılandırılabilir:

    +

    Bir sorun çıktığında veya hata oluştuğunda Apache httpd şu dört + işlemden birini yapacak şekilde yapılandırılabilir:

    1. Yerleşik bir hata iletisi çıktılanır.
    2. Özel bir ileti çıktılanır.
    3. -
    4. Sorunu/hatayı işleyecek yerel bir URL-yoluna yönlendirme - yapılır.
    5. +
    6. Sorunu/hatayı işleyecek yerel bir URL-yoluna dahili bir + yönlendirme yapılır.
    7. Sorunu/hatayı işleyecek harici bir URL-yoluna yönlendirme yapılır.
    8. @@ -1059,41 +1370,42 @@ for a complete reference and more examples.

      İlk seçenek öntanımlıdır. Diğer üç seçenek ErrorDocument yönergesinin argümanları (hata - kodundan sonra bir URL veya hata iletisi) ile belirtilir. Apache bazı - durumlarda sorun/hata ile ilgili ek bilgi verecektir.

      + kodundan sonra bir URL veya hata iletisi) ile belirtilir. Apache httpd + bazı durumlarda sorun/hata ile ilgili ek bilgi verecektir.

      + +

      2.4.13 itibariyle, özdevinimli dizgeler ve URLler üretmek için yönerge + içinde ifade sözdizimi kullanılabilir.

      URL’ler yerel yollarda (DocumentRoot’a göre) bir bölü çizgisi (/) ile başlatılabileceği gibi istemci tarafından çözümlenecek tam bir URL şeklinde de belirtilebilir. Bunlar yerine, tarayıcıda gösterilmek üzere bir ileti de belirtilebilir. Örnekler:

      -

      - ErrorDocument 500 http://hata.meselae.dom/cgi-bin/dnmci
      - ErrorDocument 404 /cgi-bin/bad_urls.pl
      - ErrorDocument 401 /subscription_info.html
      - ErrorDocument 403 "Kusura bakmayın, bugün hizmet veremiyoruz." -

      +
      ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi
      +ErrorDocument 404 /errors/bad_urls.php
      +ErrorDocument 401 /subscription_info.html
      +ErrorDocument 403 "Kusura bakmayın, bugün hizmet veremiyoruz."
      +ErrorDocument 403 /errors/forbidden.pl?referrer=%{escape:%{HTTP_REFERER}}
      -

      Bunlardan başka, Apache’nin kendi hata iletilerinin kullanılacağı özel - default değeri ile belirtilebilir. Normal şartlar altında - gerekmese de, bir şey belirtilmediği takdirde mevcut bir + +

      Bunlardan başka, Apache httpd’nin kendi hata iletilerinin kullanılacağı + özel default değeri ile belirtilebilir. Normal şartlar + altında gerekmese de, bir şey belirtilmediği takdirde mevcut bir ErrorDocument yönergesini miras alan - yapılandırmalarda Apache’nin kendi hata iletilerinin kullanımı + yapılandırmalarda Apache httpd’nin kendi hata iletilerinin kullanımı default değeri açıkça belirtilerek örnekteki gibi zorlanabilir:

      -

      - ErrorDocument 404 /cgi-bin/bad_urls.pl

      - <Directory /web/docs>
      - - ErrorDocument 404 default
      -
      - </Directory> -

      +
      ErrorDocument 404 /cgi-bin/bad_urls.pl
      +
      +<Directory "/web/docs">
      +  ErrorDocument 404 default
      +</Directory>
      +

      ErrorDocument yönergesinde bir uzak URL (önünde http bulunan bir yol) belirtildiğinde, belge aynı sunucuda - olsa bile, Apache’nin istemciye belgeyi bulacağı yer için bir + olsa bile, Apache HTTP Sunucusunun istemciye belgeyi bulacağı yer için bir yönlendirme göndereceğine dikkat ediniz. Bunun bazı istenmeyen etkileri vardır; en önemlilerinden biri istemcinin hata kodu yerine bir yönlendirme durum kodu alacak olmasıdır. Bu, bir URL’nin geçerliliğini @@ -1121,8 +1433,12 @@ for a complete reference and more examples. istekler yaparak güvenlik sorunlarına yol açılmak istenmesi durumlarında gereklidir.

      -

      2.0 öncesi sürümlerde iletiler bir çift çift-tırnak içine alınmayıp, - tek bir çift-tırnak ile başlatılması yeterli olurdu.

      +

      mod_proxy kullanıyorsanız, + ProxyErrorOverride yönergesini + etkin kılmak isteyebilirsiniz, böylece asıl sunucular adına özel hata + iletileri üretebilirsiniz. ProxyErrorOverride etkin + kılınmak istenmezse, Apache httpd vekalet edilen içerik için özel hata + belgeleri üretmeyecektir.

      Ayrıca bakınız:

        @@ -1145,17 +1461,18 @@ for a complete reference and more examples. dizininin ServerRoot ile belirtilen sunucu kök dizinine göre belirtildiği varsayılır.

        -

        Örnek

        - ErrorLog /var/log/httpd/error_log -

        +
        ErrorLog "/var/log/httpd/error_log"
        -

        dosya-yolu bir boru imi (|) ile başlatıldığı takdirde hata - iletilerinin hata günlüğünü işleme sokacak komuta borulanacağı - varsayılır.

        -

        Örnek

        - ErrorLog "|/usr/local/bin/httpd_errors" -

        +

        dosya-yolu bir boru imi "|" ile başlatıldığı + takdirde hata iletilerinin hata günlüğünü işleme sokacak komuta + borulanacağı varsayılır.

        + +
        ErrorLog "|/usr/local/bin/httpd_errors"
        + + +

        Daha fazla bilgi için borulu + günlüklere bakınız.

        Dosya adı yerine syslog kullanılırsa, sistem desteklediği takdirde günlük kaydı syslogd(8) üzerinden yürütülür. Öntanımlı olarak @@ -1163,11 +1480,16 @@ for a complete reference and more examples. syslog:oluşum sözdizimini kullanarak değiştirebilirsiniz. Buradaki oluşum syslog.conf(5) kılavuz sayfasında belirtilen oluşum isimlerinden biri - olabilir.

        + olabilir. Oluşum aslında küreseldir ve sanal konaklardan bazılarında + değiştirilmişse, belirtilen en son oluşum tüm sunucuyu + etkileyecektir.

        + +
        ErrorLog syslog:user
        -

        Örnek

        - ErrorLog syslog:user -

        + +

        Buna ek olarak, modüller kendi günlük kaydı oluşturucusunu sağlayabilir. + Sözdizimi yukarıdaki örnekte kullanılan syslog sözdiziminin + benzeridir.

        GÜVENLİK: Günlük dosyalarının saklandığı dizin, sunucuyu başlatan kullanıcı dışındakiler tarafından yazılabilir olduğu takdirde @@ -1184,59 +1506,239 @@ for a complete reference and more examples.

        Ayrıca bakınız:

    top

    ErrorLogFormat Yönergesi

    - - + + - -
    Açıklama:Format specification for error log entries
    Sözdizimi: ErrorLogFormat [connection|request] format
    Açıklama:Hata günlüğü girdileri için biçem belirtimi
    Sözdizimi: ErrorLogFormat [connection|request] biçem
    Bağlam:sunucu geneli, sanal konak
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Available in Apache httpd 2.3.9 and later

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    Ayrıca bakınız:

    + +

    ErrorLogFormat yönergesi, hata günlüğünde asıl + hata iletisine ek olarak günlüklenecek ek bilgiyi belirtmek için + kullanılabilir.

    + +
    #Basit örnek
    +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
    + + +

    İlk değiştirge olarak connection veya request + belirtilmesi ek biçemlerin belirtilebilmesini sağlar. Böylece, belli bir + bağlantı ya da istek için ilk ileti günlüklendiğinde ek bilgininde + günlüklenmesi sağlanır. Bu ek bilgi sadece bağlantı/istek başına bir + kere günlüklenir. herhangi bir günlük iletisine sebep olmadan işlenmişse + ek bilgi de günlüklenmez.

    + +

    Bu, bazı biçem dizgesi öğeleri çıktı üretmediğinde olur. Örneğin, + Referer başlığı sadece günlük iletisi bir istekle + ilişkilendirilmişse mevcuttur ve hata iletisi Referer + başlığı istemcide okunduğu anda oluşur. Eğer bir çıktı üretilmezse, + öntanımlı davranış önceki boşluk karakterinden sonraki boşluk + karakterine kadar herşeyi silmektir. Yani, günlük satırı örtük olarak + boşluklarla ayrılmış alanlara bölünür. Bir biçem dizgesi öğesi çıktı + üretmezse alanın tamamı çıktılanmaz. Örneğin, [%t] [%l] [%a] + %M  günlük biçeminde uzak adres %a + kullanılamazsa sarmalayıcı köşeli ayraçlar da günlüklenmeyecektir. + Boşluk karakterleri ters bölülerle öncelenerek bir alanı sınırlaması + önlenebilir. '% ' (yüzde boşluk) çifti sıfır genişlikte bir alan + ayracı olup herhangi bir çıktı üretmez.

    + +

    Yukarıdaki davranış, biçem dizgesi öğesine değiştirciler eklenerek + değiştirilebilir. - (tire) değiştircisi ilgili öğe bir + çıktı üretmediğinde tire iminin günlüklenmesine sebep olur. + Bağlantı/istek başına bir kere biçemlerinde + (artı) + değiştircisini de kullanmak mümkündür.Artı değiştiricili bir öğe + herhangi bir çıktı üretmezse satırın tamamı günlüklenmez.

    + +

    Bir biçem öğesine günlük önem derecesi atamak için değiştirici + olarak bir sayı kullanılabilir. Bu öğenin günlüklenebilmesi için günlük + iletisinin önem derecesinin belirtilen günlük önem derecesinden + daha yüksek olmaması gerekir. Sayı 1'den (alarm) 4'e (uyarı) ve 7'den + (hata ayıklama) 15'e (trace8) kadar olabilir.

    + +

    Örneğin, Referer istek başlığını günlükleyen + %{Referer}i dizgeciğine değiştirciler eklendiğinde neler + olduğunu burada görebilirsiniz:

    + + + + + + + + + + + + + + +
    Değiştirlen DizgecikAnlamı
    %-{Referer}iReferer atanmamışsa bir - günüklenir.
    %+{Referer}iReferer atanmamışsa satırın tamamı çıktılanmaz.
    %4{Referer}iSadece hata iletisinin önemi 4'ten yüksek olduğu durumda + Referer günlüklenir.
    + +

    Bazı biçem dizfesi öğeleri ayraç içine alınmış ek değiştirgeler kabul + eder.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Biçem Dizgesi Açıklama
    %%Yüzde imi
    %aİstekteki istemci IP adresi ve portu
    %{c}aBağlantının emsal IP adresi and portu + (mod_remoteip modülüne bakın)
    %AYerel IP adresi ve portu
    %{isim}eİstek ortam değişkeni isim
    %EAPR/OS hata durum kodu ve iletisi
    %FGünlük çağrısının kaynak dosya ismi ve satır numarası
    %{isim}iİstek başlığı isim
    %kBağlantıdaki keep-alive isteklerinin sayısı
    %lİletinin günlük seviyesi
    %Lİsteğin günlük kimliği
    %{c}LBağlantının günlük kimliği
    %{C}LBağlantı etki alanında kullanılmışsa bağlantının günlük kimliği, + aksi takdirde boş
    %mİletiyi günlükleyen modülün ismi
    %MAsıl günlük iletisi
    %{isim}nistek notu isim
    %PGeçerli sürecin süreç kimliği (PID'i)
    %TGeçerli evrenin evre kimliği
    %{g}TGeçerli evrenin eşsiz sistem evre kimliği (örn, top + tarafınan gösterilenle aynı kimlik: şimdilik sadece Linux'a + özgü)
    %tgeçerli zaman
    %{u}tMikro saniyeler dahil geçerli zaman
    %{cu}tISO 8601 biçemiyle uyumlu mikro saniyeleri de içeren geçerli + zaman
    %vGeçerli sunucunun kurallı ServerName
    %VUseCanonicalName ayarına + uygun olarak isteği sunan sunucunun sunucu ismi
    (tersbölü boşluk)Alan ayracı olmayan boşluk
    (yüzde boşluk)Alan ayracı (çıktısız)
    + +

    The log ID format %L günlük kimliği biçemi bağlantı veya + istek için eşsiz bir kimlik üretir. Bu, bağlantı üzerinden gelen istek + durumunda günlük satırlarının ait olduğu bağlantı veya isteği + bağdaştırmak için kullanılabilir. %L biçem dizgesi ayrıca + mod_log_config modülünde erişim günlüğü iletilerini + hata günlüğü iletileriyle ilişklendirmek için de kullanılabilmektedir. + mod_unique_id modülü yüklüyse onun eşsiz kimliği + istekler için günlük kimliği olarak kullanılacaktır.

    + +
    #Örnek (Evreli MPM'ler için öntanımlı biçim)
    +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
    + + +

    Bunun hata iletilerindeki sonuçları şöyle olabilir:

    + +

    + [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico +

    + +

    Dikkat edin, yukarıda açıklandığı gibi, bazı alanlar + tanımlanmadıklarından tamamen yoksayılır.

    + +
    #Örnek (2.2.x biçimine benzer)
    +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
    + + +
    #İstek/bağlantı günlük kimlikli gelişkin bir örnek
    +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    + + + +

    Ayrıca bakınız:

    top

    ExtendedStatus Yönergesi

    - + -
    Açıklama:Keep track of extended status information for each -request
    Açıklama:Her istekte ek durum bilgisinin izini sürer
    Sözdizimi:ExtendedStatus On|Off
    Öntanımlı:ExtendedStatus Off[*]
    Bağlam:sunucu geneli
    Durum:Çekirdek
    Modül:core

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    + +

    Bu yönerge, o an işlenmekte olan istek hakkında evre başına ek veriyi + ve kullanım özetini izler; mod_status modülünü + yapılandırarak bu değişkenleri çalışma anında görebilirsiniz. Diğer + modüllerin bu sonuçlara bel bağlayabileceğini unutmayın.

    + +

    Bu ayarlar sunucunun tamamına uygulanır ve bir sanal konakta etkin + başka bir sanal konakta etkisiz kılınamaz. Ek durum bilgisinin + toplanması sunucuyu yavaşlatabilir. Ayrıca, bu ayarın nazikçe yeniden + başlatma sırasında değiştirilemeyeceğine dikkat ediniz.

    + +
    +

    Diğer üçüncü parti modüller aynısını yaparken + mod_status modülünün yüklenmesi ExtendedStatus + On için öntanımlı davranışı değiştirecektir. Böyle modüller, + tüm evrelerin durumu hakkında ayrıntılı bilgi toplanmasına bel bağlar. + Öntanımlı değer sürüm 2.3.6 itibariyle mod_status + tarafından değiştirilmiştir. Önceki sürümlerde öntanımlı değer daima + Off idi.

    +
    + + +
    top

    FileETag Yönergesi

    - + - + +
    Açıklama:ETag HTTP yanıt başlığını oluşturmakta kullanılacak - dosya özniteliklerini belirler.
    Açıklama:Duruk dosyalar için ETag HTTP yanıt başlığını oluşturmakta kullanılacak dosya özniteliklerini belirler.
    Sözdizimi:FileETag bileşen ...
    Öntanımlı:FileETag INode MTime Size
    Öntanımlı:FileETag MTime Size
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:FileInfo
    Durum:Çekirdek
    Modül:core
    Uyumluluk:2.3.14 ve öncesinde öntanımlı değer + "INode MTime Size" idi.
    -

    FileETag yönergesi, belge bir dosyaya dayandığı - takdirde ETag (Entity Tag - öğe etiketi kısaltması) yanıt - başlığı alanını oluşturmakta kullanılacak dosya özniteliklerini - yapılandırır. (ETag değeri, ağ band genişliğinden kazanmak - için arabellek yönetiminde kullanılır.) Apache 1.3.22 ve öncesinde - ETag değeri daima dosyanın düğümü, boyutu ve son - değişiklik zamanından (mtime) oluşurdu. FileETag - yönergesi ne kullanılması gerektiğini belirleyebilmenizi sağlar. Değer - olarak belirtilebilecek anahtar sözcükler şunlardır:

    +

    FileETag yönergesi, belge bir duruk dosyaya + dayandığı takdirde ETag (Entity Tag - öğe etiketi + kısaltması) yanıt başlığı alanını oluşturmakta kullanılacak dosya + özniteliklerini yapılandırır. (ETag değeri, ağ band + genişliğinden kazanmak için arabellek yönetiminde kullanılır.) + FileETagyönergesi ne kullanılması gerektiğini + belirleyebilmenizi sağlar. Değer olarak belirtilebilecek anahtar + sözcükler şunlardır:

    INode
    @@ -1247,7 +1749,8 @@ request
    Dosyanın bayt cinsinden uzunluğu dahil edilir.
    All
    Olası tüm alanlar kullanılır. Bu şuna eşdeğerdir: -

    FileETag INode MTime Size

    +
    FileETag INode MTime Size
    +
    None
    Bir belge dosyasıyla sunulsa bile yanıta hiçbir ETag alanı dahil edilmez.
    @@ -1270,11 +1773,17 @@ request olarak mod_dav_fs kullanılıyorsa öntanımlı ayarları değiştirmeyiniz. mod_dav_fs, koşullu isteklerde ETag karşılaştırmaları yapabilmek için - INode MTime Size yapılandırmasını kullanır. Eğer + MTime Size yapılandırmasını kullanır. Eğer ETag ayarı FileETag yönergesi kullanılarak değiştirilirse koşullu istekler gerektiği gibi yerine getirilemez.
    +

    Sunucu Taraflı İçerik

    + Gömülü SSI yönergeleri ile bir duruk dosyanın FileETag, + MTime ve Size değerleri değişmeksizin yanıt + öğesi değişebileceğinden mod_include tarafından + çözümlenen yanıtlar için bir ETag üretilmez. +
    top
    @@ -1305,11 +1814,23 @@ request

    dosya-adı argümanının bir dosya ismi veya bir dosya ismi kalıbı içermesi gerekir. Bir dosya ismi kalıbındaki her ? imi bir karakterle eşleştirilirken * imi karakter dizileri - ile eşleştirilir. ~ imine ek olarak düzenli ifadeler de kullanılabilir. Örneğin

    + ile eşleştirilir.

    + +
    <Files "zat.html">
    +    # zat.html dosyasına uygulanacakları buraya koy
    +</Files>
    +
    +<Files "?at.*">
    +    # Buradakiler hat.html, kat.html, tat.html ve benzerlerine uygulanır.
    +</Files>
    + + +

    ~ imine ek olarak düzenli ifadeler de kullanılabilir. Örneğin

    + +
    <Files ~ "\.(gif|jpe?g|png)$">
    +    #...
    +</Files>
    -

    - <Files ~ "\.(gif|jpe?g|png)$"> -

    satırı en bilinen resim dosyası biçimleriyle eşleşecektir. Bunun yerine <FilesMatch> @@ -1346,12 +1867,30 @@ request yönergelerin etki alanını <Files> yönergesinin yaptığı gibi dosya isimlerine göre sınırlandırır. Ancak, argüman olarak bir düzenli ifade kabul eder. Örneğin

    -

    - <FilesMatch "\.(gif|jpe?g|png)$"> -

    +
    <FilesMatch "\.(gif|jpe?g|png)$">
    +    # ...
    +</FilesMatch>
    +

    satırı en bilinen resim dosyası biçimleriyle eşleşecektir.

    +
    Düzenli ifadenin başlangıcındaki bir .+ + .pngveya .gif dosyalarının, örnek olarak, + eşleşmemesini garanti eder.
    + +

    2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + mod_rewrite gibi modüllerden veya düzenli ifadelerden başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.

    + +
    <FilesMatch "^(?<sitename>[^/]+)">
    +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</FilesMatch>
    + +

    Ayrıca bakınız:

    • Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir @@ -1370,7 +1909,7 @@ request Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:Apache 2.0’da core modülüne taşındı. +Uyumluluk:Apache httpd 2.0’da core modülüne taşındı.

      Bu yönerge, bir .htaccess dosyası veya bir <Directory>, @@ -1382,9 +1921,8 @@ request .gif uzantısı belirtmek istemiyorsanız şu yapılandırmayı kullanabilirsiniz:

      -

      - ForceType image/gif -

      +
      ForceType image/gif
      +

      Bu yönerge, AddType yönergesi üzerinden ve mime.types dosyasında örtük olarak @@ -1393,33 +1931,58 @@ request

      Ayrıca, daha genel ForceType ayarlarını da None değeriyle geçersiz kılabilirsiniz:

      -

      - # tüm dosyaların image/gif olarak sunulması için:
      - <Location /images>
      - - ForceType image/gif
      -
      - </Location>
      -
      - # normal MIME-türüne geri dönmek için:
      - <Location /images/mixed>
      - - ForceType None
      -
      - </Location> -

      +
      # tüm dosyaların image/gif olarak sunulması için:
      +<Location "/images">
      +  ForceType image/gif
      +</Location>
       
      -
      -
      top
      -

      GprofDir Yönergesi

      +# normal MIME-türüne geri dönmek için: +<Location "/images/mixed"> + ForceType None +</Location>
      + + +

      Bu yönerge, öncelikle dosya sisteminden sunulan duruk dosyalar için + üretilen içerik türlerini geçersiz kılar. Duruk dosyaların haricindeki + özkaynaklar için yanıt üretecinin genelde bir Content-Type + belirttiği durumda bu yönerge etkisizdir.

      + +

      Ek Bilgi

      +

      SetHandler veya + AddHandler gibi örtük yönergeler + geçerli isteğe uygulanmadığı takdirde, normalde bu yönergeler tarafından + belirlenen dahili eylemcinin ismi ForceType + yönergesi tarafından belirtilen içerik türü ile eşleşecek şekilde + belirlenir. Bu, bazı üçüncü parti modüller (mod_php gibi) tarafından + kullanılan tarihi bir uygulama olup, bu modüller istekle eşleşecek + modüllerin sorumluluğu almasını sağlamak için "sihirli" içerik türleri + kullanabilir. Bu tür "sihirli" içerik türlerini kullanan + yapılandırmalarda SetHandler veya + AddHandler kullanımından + kaçınılmalıdır.

      +
      + + + +
      top
      +

      GprofDir Yönergesi

      - + -
      Açıklama:Directory to write gmon.out profiling data to.
      Açıklama:gmon.out ayrıntılı inceleme verisinin yazılacağı dizin
      Sözdizimi:GprofDir /tmp/gprof/|/tmp/gprof/%
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      + +

      Sunucu gprof ayrıntılı inceleme desteği ile derlenmişse, + GprofDir yönergesi gmon.out + dosyalarının süreç çıktığında belirtilen dizine yazılmasını sağlar. Eğer + değiştirge bir yüzde simgesi ('%') ile bitiyorsa her süreç kimliği için + alt dizinler oluşturulur.

      + +

      Bu yönerge şimdilik sadece prefork MPM'i ile + çalışmaktadır.

      + +
      top

      HostnameLookups Yönergesi

      @@ -1460,6 +2023,79 @@ requestlogresolve uygulaması kullanılarak oturum açan IP adresleri için isim sorguları çevrim dışıyken yapılabilir.

      +

      Son olarak, konak ismine dayalı + Require yönergelerine sahipseniz konak ismi araması + HostnameLookups ayarına bakılmaksızın + gerçekleştirilecektir.

      + + +
      top
      +
      + + + + + + + +
      Açıklama:HTTP İstek İletilerindeki sınırlamalarda değişiklik yapar
      Sözdizimi:HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0]
      Öntanımlı:HttpProtocolOptions Strict LenientMethods Allow0.9
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:2.2.32 veya 2.4.24 ve sonrası
      +

      Bu yönerge HTTP istek satırına + (RFC 7230 §3.1.1) ve the HTTP istek başlığı alanlarına + (RFC 7230 §3.2) uygulanmış kuralları öntanımlı olarak veya + Strict seçeneği kullanılarak değiştirir. Eski modüller, + uygulamalar veya kullanımı önerilmeyen özel istemciler için eski davranışlara + dönmeyi sağlamak üzere Unsafe seçeneği eklenmiştir. Bu kurallar + istek işlenmeden önce uygulanır. Dolayısıyla yönerge, ana bölümde veya + öntanımlı (ilk) eşleşen sanal konak bölümünde yapılandırılmalıdır.

      + +

      Bu yönerge devreye girmeden önce, Apache HTTP Sunucusunun istek iletisi + ayrıştırıcıları protokolle uyumlu olmayan bir dizi girdi şekline + toleranslıydı. RFC 7230 §9.4 İstek bölme ve + §9.5 Yanıt kaçırma çağrıları uyumsuz istek iletilerinin kabulündeki + olası risklerden yalnızca iki tanesidir. + RFC 7230 + §3.5 "İleti Ayrıştırma Sağlamlığı" belirsiz boşlukların kabul ve + istek iletisi biçimleme risklerini tanımlar. Bu yönergenin devreye girmesini + takiben belirtimin tüm imla kurallarına öntanımlı Strict işlem + kipi ve 3.5 bölümünde tavsiye edilen hoşgörüsüz boşluk uygulanır ve esnekliğe + müsamaha edilmez.

      + +

      Kullanıcılar, özellikle dışa bakan, herkes tarafından erişilebilen sunucu + konuşlandırmalarında Unsafe işlem kipine geçiş yapmaya karşı + kesinlikle uyarılır. Eğer bir arayüz hataları izlemek veya bir intranette + çalışan özel hizmet tüketicileri için gerekliyse, kullanıcılar, sadece, + dahili özel ağlarına hizmet etmek üzere yapılandırılmış özel bir sanal konak + üzerinde Unsafe işlem kipine geçiş yapmalıdır.

      + +

      LogLevel debug seviyesiyle + yapılandırılmış ErrorLog ile kaydedilmiş günlüklerin + gözden geçirilmesi, böyle hatalı isteklerin kaynaklandıkları yerle birlikte + belirlenmesine yardımcı olabilir. Kullanıcılar, beklenmedik bir şekilde + reddedilmiş geçersiz istekleri bulmak için erişim günlüklerindeki 400 + yanıtlarına özellikle dikkat etmelidir.

      + +

      RFC 7231 + §4.1 "İstek Yöntemleri" "Genel Bakış" bölümlerinde bir istek + satırında desteklenmeyen bir yöntem saptadığında özgün sunucuların bir + hatayla yanıt vermesini gerekli görmüştür. LenientMethods + seçeneği kullanıldığında olan zaten budur. RegisteredMethods + seçeneğine geçiş yapmak isteyen yöneticiler + RegisterHttpMethod yönergesini kullanarak standart + olmayan yöntemleri belirlemelidir. Özellikle Unsafe seçeneğine + geçiş yapılacaksa bu yol izlenmelidir. Özgün sunucunun kullandığı yöntemleri + vekil sunucu bilemeyeceği için ileri vekil konaklarda + RegisteredMethods seçeneğine geçiş yapılmamalıdır.

      + +

      RFC 2616 + §19.6 "Önceki Sürümlerle Uyumluluk" bölümünde HTTP sunucularının + eski HTTP/0.9 isteklerini desteklemesi tavsiye edilmektedir. RFC 7230 + "HTTP/0.9 isteklerini destekleme beklentisi kaldırılmıştır." cümlesiyle bunu + geçersiz kılmış ve RFC 7230 Ek A bölümünde bununla ilgili yorumlar yer almıştır. + Require1.0 seçeneği kullanıcıya öntanımlı Allow0.9 + seçeneğinin davranışına verilen desteği kaldırma imkanını vermektedir.

      +
      top

      <If> Yönergesi

      @@ -1476,25 +2112,49 @@ takdirde uygulanacak yönergeleri barındırır. anında değerlendirir ve ifadenin sonucu doğru olduğu takdirde içerdiği yönergeleri uygular. Örnek:

      -

      - <If "$req{Host} = ''"> -

      +
      <If "-z req('Host')">
      +

      Bir Host: başlığı içermeyen HTTP/1.0 istekleriyle - eşleşir.

      + eşleşir. İfadeler, dizge karşılaştırması (==, + !=, <, ...), tamsayı karşılaştırması + (-eq, -ne, ...) ve diğerleri (-n, + -z, -f, ...) için kabuktakilere benzer çeşitli + işleçler içerebilir. Ayrıca, düzenli ifadeleri,

      + +
      <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">
      + + +

      kabuk tarzı kalıp eşleştirme ve birçok başka işlemi kullanmak da + mümkündür. Bu işlemler istek başlıklarında (req), ortam + değişkenlerinde (env) ve çok sayıda başka niteliklerin + üstünde yapılabilir. Apache HTTP Sunucusundaki + İfadeler belgesinde daha ayrıntılı bilgi bulabilirsiniz.

      -

      İstek başlıklarındaki ($req), yanıt başlıklarındaki ($resp) yada - ortamdaki ($env) herhangi bir değişkenin değerini ifadenizde - karşılaştırabilirsiniz.

      +

      Bu yapılandırma bölümünün içinde sadece + dizin bağlamını destekleyen + yönergeler kullanılabilir.

      + +
      + <If> sonrasında atanan CONTENT_TYPE gibi belli + değişkenler ve diğer yanıt başlıkları zaten yorumlanmış olacaklarından bu + yönerge için kullanılabilir olmayacaktır. +

      Ayrıca bakınız:

        -
      • Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir arada - ele alındığının açıklaması için +
      • Apache HTTP Sunucusundaki + İfadeler belgesinde daha ayrıntılı bilgi ve örnek + bulabilirsiniz.
      • +
      • <ElseIf>
      • +
      • <Else>
      • +
      • Bir istek alındığında farklı yapılandırma bölümlerinin nasıl bir + arada ele alındığının açıklaması için <Directory>, <Location> ve <Files> bölümleri nasıl - çalışır? belgesine bakınız. <If> - bölümleri<Files> bölümleri ile aynı - önceliğe sahiptir ve aynı amaçla kullanılır.
      • + çalışır? belgesine bakınız. + <If>, + <ElseIf> ve + <Else> son olarak uygulanır.
      top
      @@ -1540,32 +2200,21 @@ sokulacak yönergeleri sarmalar. olabilir, dolayısıyla çok parametreli basit sınamalar gerçeklenebilir. Örnek:

      -

      - httpd -DReverseProxy -DUseCache -DMemCache ...
      -
      - # httpd.conf
      - <IfDefine ReverseProxy>
      - - LoadModule proxy_module modules/mod_proxy.so
      - LoadModule proxy_http_module modules/mod_proxy_http.so
      - <IfDefine UseCache>
      - - LoadModule cache_module modules/mod_cache.so
      - <IfDefine MemCache>
      - - LoadModule mem_cache_module modules/mod_mem_cache.so
      -
      - </IfDefine>
      - <IfDefine !MemCache>
      - - LoadModule cache_disk_module modules/mod_cache_disk.so
      -
      - </IfDefine> -
      - </IfDefine> -
      - </IfDefine> -

      +

      httpd -DReverseProxy -DUseCache -DMemCache ...

      +
      <IfDefine ReverseProxy>
      +  LoadModule proxy_module   modules/mod_proxy.so
      +  LoadModule proxy_http_module   modules/mod_proxy_http.so
      +  <IfDefine UseCache>
      +    LoadModule cache_module   modules/mod_cache.so
      +    <IfDefine MemCache>
      +      LoadModule mem_cache_module   modules/mod_mem_cache.so
      +    </IfDefine>
      +    <IfDefine !MemCache>
      +      LoadModule cache_disk_module   modules/mod_cache_disk.so
      +    </IfDefine>
      +  </IfDefine>
      +</IfDefine>
      +
      top
      @@ -1596,8 +2245,8 @@ yönergeleri sarmalar.
    • !modül
    -

    Birinci durumda bölüm içinde kalan yönergeler sadece - modül ile belirtilen modül Apache içine dahil edilmişse veya +

    Birinci durumda bölüm içinde kalan yönergeler sadece modül + ile belirtilen modül Apache httpd içine dahil edilmişse veya LoadModule yönergesi ile devingen olarak yüklenmişse işleme sokulur. İkinci durumda ise tersi yapılır, yani sadece modül içerilmiş değil ise yönergeler @@ -1624,48 +2273,88 @@ yönergeleri sarmalar. - + - +
    Açıklama:Sunucu yapılandırma dosyalarının başka dosyaları içermesini sağlar.
    Sözdizimi:Include dosya-yolu|dizin-yolu
    Sözdizimi:Include dosya-yolu|dizin-yolu|joker
    Bağlam:sunucu geneli, sanal konak, dizin
    Durum:Çekirdek
    Modül:core
    Uyumluluk:Dosya kalıbıyla eşleşme 2.0.41 ve sonrasında mevcuttur. -
    Uyumluluk:Dizin kalıbıyla eşleşme ise 2.3.6 ve sonrasında mevcuttur.

    Bu yönerge sunucu yapılandırma dosyalarının başka dosyaları içermesini mümkün kılar.

    -

    Çok sayıda dosyayı bir kerede alfabetik sırada içermek için kabuk tarzı - (fnmatch()) dosya ismi kalıp karakterleri kullanılabilir. - Ayrıca, eğer Include yönergesi bir dosya değil de - bir dizin gösteriyorsa Apache bu dizindeki ve alt dizinlerindeki bütün - dosyaları okuyacaktır. Bunula birlikte, dizinin bir bütün olarak okutulması - önerilmez, çünkü dizinde httpd programının çökmesine - sebep olabilecek geçici dosyalar unutulabilir. Bunun yerine, belli bir - şablona uyan dosyaları seçebilmek için, örneğin *.conf gibi dosya - kalıplarının kullanılmasını öneriyoruz.

    +

    Çok sayıda dosyayı bir kerede alfabetik sırada içermek için yolun dosya + ismi ve dizin parçalarında kabuk tarzı (fnmatch()) dosya + ismi kalıp karakterleri kullanılabilir. Ayrıca, eğer + Include yönergesi bir dosya değil de bir dizin + gösteriyorsa Apache httpd bu dizindeki ve alt dizinlerindeki bütün + dosyaları okuyacaktır. Bunula birlikte, dizinin bir bütün olarak + okutulması önerilmez, çünkü dizinde httpd programının + çökmesine sebep olabilecek geçici dosyalar unutulabilir. Bunun yerine, + belli bir şablona uyan dosyaları seçebilmek için, örneğin *.conf gibi + dosya kalıplarının kullanılmasını öneriyoruz.

    + +

    Include yönergesi, bir dosya + kalıbı ifadesi hiçbir dosyayla eşleşmezse bir hatayla + başarısız olacaktır. Eşleşmeyen dosya kalıbı ifadelerinin + yoksayılması gerekiyorsa IncludeOptional yönergesi kullanılabilir.

    Dosya yolu mutlak bir dosya yolu olarak belirtilebileceği gibi - ServerRoot dizinine göreli olarak da - belirtilebilir.

    + ServerRoot dizinine göreli olarak + da belirtilebilir.

    Örnekler:

    -

    - Include /usr/local/apache2/conf/ssl.conf
    - Include /usr/local/apache2/conf/vhosts/*.conf -

    +
    Include /usr/local/apache2/conf/ssl.conf
    +Include /usr/local/apache2/conf/vhosts/*.conf
    +

    Veya dizinler ServerRoot dizinine göre belirtilebilir:

    -

    - Include conf/ssl.conf
    - Include conf/vhosts/*.conf -

    +
    Include conf/ssl.conf
    +Include conf/vhosts/*.conf
    + + +

    Dosya kalıbı karakterleri yolun dizin ve dosya parçalarına + yerleştirilebilir. conf/vhosts altında en azından bir + *.conf içeren hiçbir alt dizin yoksa bu örnek başarısız + olacaktır:

    + +
    Include conf/vhosts/*/*.conf
    + + +

    Bunun yerine, dizin ve dosyaların eksikliği durumunda aşağıdaki komut + sadece yoksayılır:

    + +
    IncludeOptional conf/vhosts/*/*.conf
    + +

    Ayrıca bakınız:

    + + +
    top
    +

    IncludeOptional Yönergesi

    + + + + + + + +
    Açıklama:Diğer yapılandırma dosyalarının sunucu yapılandırma dosyasına dahil edilmesini sağlar
    Sözdizimi:IncludeOptional dosya-yolu|dizin-yolu|joker
    Bağlam:sunucu geneli, sanal konak, dizin
    Durum:Çekirdek
    Modül:core
    Uyumluluk:2.3.6 ve sonrasına kullanılabilmektedir.
    +

    Bu yönerge, diğer yapılandırma dosyalarının sunucu yapılandırma + dosyasında içerilmesini sağlar. Çalışması Include yönergesi ile bir istisna dışında + aynıdır. Dosya kalıp karakterlerinin hiçbir dosya veya dizinle + eşleşmemesi durumunda IncludeOptional yönergesi bir hataya sebep olmak yerine + bunu sadece yoksayacaktır.

    +

    Ayrıca bakınız:

    @@ -1699,8 +2388,8 @@ yönergeleri sarmalar.

    Bir istemci kalıcı bağlantı kullandığı takdirde, bağlantı üzerinden kaç istek gönderilirse gönderilsin, - MaxRequestsPerChild yönergesi - bakımından tek bir istek olarak değerlendirilir.

    + MaxConnectionsPerChild + yönergesi bakımından tek bir istek olarak değerlendirilir.

    Ayrıca bakınız:

      @@ -1717,7 +2406,6 @@ yönergeleri sarmalar. Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache 2.3.2'den itibaren milisaniyelik değerler belirtilebilmektedir.

      Sunucunun kalıcı bir bağlantıyı kapatmadan önce bir sonraki isteği kaç saniye bekleyeceğini belirler. Ayrıca, ms soneki kullanılarak süreyi @@ -1730,9 +2418,9 @@ yönergeleri sarmalar. zaman aşımı, boştaki istemcilerin bulunduğu bağlantıları bekleyen daha fazla sunucu sürecini meşgul edecektir.

      -

      İsme dayalı sanal konak bağlamında, NameVirtualHost bölümleri içinde tanımlanmış - ilk sanal konağın (öntanımlı konak) değeri kullanılır. Diğer değerler - görmezden gelinir.

      +

      İsme dayalı sanal konak için KeepAliveTimeout + atanmamışsa, yerel IP adresi ve portu ile en iyi eşleşen ilk sanal + konağın değeri kullanılır.

      top
      @@ -1760,13 +2448,10 @@ sarmalar. POST, PUT ve DELETE yöntemleri için uygulanmakta, diğer tüm yöntemler korumasız bırakılmaktadır:

      -

      - <Limit POST PUT DELETE>
      - - Require valid-user
      -
      - </Limit> -

      +
      <Limit POST PUT DELETE>
      +  Require valid-user
      +</Limit>
      +

      Birden fazla bölümde kullanılabilecek yöntem isimleri: GET, POST, PUT, DELETE, @@ -1798,18 +2483,13 @@ sarmalar. POST istekleri için yetkilendirilecek ve tüm durumlarda Require group editors yönergesi yoksayılacaktır:

      -

      - <LimitExcept GET> - - Require valid-user - - </LimitExcept>
      - <Limit POST> - - Require group editors - - </Limit> -

      +
      <LimitExcept GET>
      +  Require valid-user
      +</LimitExcept>
      +<Limit POST>
      +  Require group editors
      +</Limit>
      + @@ -1834,13 +2514,10 @@ kullanılacak erişim sınırlayıcıları sarmalar.

      Örnek:

      -

      - <LimitExcept POST GET>
      - - Require valid-user
      -
      - </LimitExcept> -

      +
      <LimitExcept POST GET>
      +  Require valid-user
      +</LimitExcept>
      + @@ -1854,15 +2531,14 @@ belirler. Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache 2.0.47 ve sonrasında mevcuttur.

      Örneğin, özgün istekleri dahili olarak bir CGI betiğine yönlendiren Action yönergesi kullanıldığında bir dahili yönlendirme oluşur. İstek içi istekler ise - bazı URI’ler için istek yapıldığında ne olacağını bulmak için Apache’nin - kullandığı bir mekanizmadır. Örneğin, mod_dir, - DirectoryIndex yönergesinde - listelenen dosyalara bakmak için istek içi istekler kullanır.

      + bazı URI’ler için istek yapıldığında ne olacağını bulmak için Apache + httpd’nin kullandığı bir mekanizmadır. Örneğin, + mod_dir, DirectoryIndex yönergesinde listelenen dosyalara bakmak + için istek içi istekler kullanır.

      LimitInternalRecursion yönergesi sunucunun dahili yönlendirmeler ve istek içi isteklerin oluşturduğu döngülerden dolayı @@ -1876,9 +2552,8 @@ belirler. sayı belirtilirse iki sınırlama için de aynı değer kullanılır.

      -

      Örnek

      - LimitInternalRecursion 5 -

      +
      LimitInternalRecursion 5
      +
      top
      @@ -1894,7 +2569,9 @@ uzunluğunu sınırlar. Modül:core

      Bu yönerge, bir istek gövdesinde izin verilen bayt sayısını 0 (sınırsız - anlamında) ile 2147483647 (2GB) arasında sınırlamak için kullanılır.

      + anlamında) ile 2147483647 (2GB) arasında sınırlamak için kullanılır. + Vekil isteklerinin snırlı uygulanabilirliği için aşağıdaki nota + bakınız.

      LimitRequestBody yönergesi kullanıcıya yönergenin kullanıldığı bağlam (sunucu, belli bir dizin, belli bir dosya, belli bir @@ -1916,10 +2593,13 @@ uzunluğunu sınırlar. yüklenebilecek dosya boyutunu 100 kB ile sınırlamak isterseniz yönergeyi şöyle kullanabilirsiniz:

      -

      - LimitRequestBody 102400 -

      +
      LimitRequestBody 102400
      + +

      Bu yönergenin vekil istekleri tarafından nasıl yorumlandığı + mod_proxy belgesinde ayrıntılı olarak + açıklanmıştır.

      +
      top
      @@ -1929,7 +2609,7 @@ uzunluğunu sınırlar. sınırlar. Sözdizimi:LimitRequestFields sayı Öntanımlı:LimitRequestFields 100 -Bağlam:sunucu geneli +Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core @@ -1957,11 +2637,15 @@ sınırlar.

      Örnek:

      -

      - LimitRequestFields 50 -

      +
      LimitRequestFields 50
      +

      Uyarı

      +

      İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.

      . +
      +
      top

      LimitRequestFieldSize Yönergesi

      @@ -1970,7 +2654,7 @@ sınırlar. Sözdizimi:LimitRequestFieldSize bayt-sayısı Öntanımlı:LimitRequestFieldSize 8190 -Bağlam:sunucu geneli +Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core @@ -1978,8 +2662,8 @@ sınırlar. belirler.

      LimitRequestFieldSize yönergesi, sunucu - yöneticilerine HTTP istek başlık alanının azami uzunluğunu arttırıp - azaltma imkanı verir. Sunucu bu değerin, normal bir istemci isteğinin + yöneticilerine HTTP istek başlık alanının azami uzunluğunu ayarlama + imkanı verir. Sunucu bu değerin, normal bir istemci isteğinin içerebileceği herhangi bir başlık alanını tutabilecek kadar büyük olmasını gerektirir. Normal bir istek başlık alanı uzunluğu kullanıcının tarayıcısını ayrıntılı içerik müzakeresini desteklemek için nasıl @@ -1992,12 +2676,18 @@ sınırlar.

      Örnek:

      -

      - LimitRequestFieldSize 4094 -

      +
      LimitRequestFieldSize 4094
      -
      Normal şartlar altında öntanımlı değer değiştirilmemelidir.
      +
      Normal şartlar altında öntanımlı değer değiştirilmemelidir. Ayrıca, + kaynak kodu değiştirip yeniden derlemeden bu değeri 8190'dan büyük + yapamazsınız.
      + +

      Uyarı

      +

      İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.

      +
      top
      @@ -2007,7 +2697,7 @@ sınırlar. Sözdizimi:LimitRequestLine bayt-sayısı Öntanımlı:LimitRequestLine 8190 -Bağlam:sunucu geneli +Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core @@ -2015,7 +2705,7 @@ sınırlar. belirler.

      LimitRequestLine yönergesi, sunucu yöneticilerine - bir istemcinin HTTP istek satırının azami uzunluğunu arttırıp azaltma + bir istemcinin HTTP istek satırının azami uzunluğunu ayarlama imkanı verir. İstek satırının içeriği HTTP yöntemi, URI ve protokol sürümünden oluştuğundan LimitRequestLine yönergesi, sunucudan bir istek için kullanılan istek adresinin uzunluğunu @@ -2029,12 +2719,17 @@ sınırlar.

      Örnek:

      -

      - LimitRequestLine 4094 -

      +
      LimitRequestLine 4094
      +
      Normal şartlar altında öntanımlı değer değiştirilmemelidir.
      +

      Uyarı

      +

      İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, + yerel IP adresi ve port çifti için öntanımlı olan (listedeki ilk) sanal + konaktan alınır.

      +
      +
      top

      LimitXMLRequestBody Yönergesi

      @@ -2053,9 +2748,8 @@ sınırlar.

      Örnek:

      -

      - LimitXMLRequestBody 0 -

      +
      LimitXMLRequestBody 0
      +
      @@ -2087,6 +2781,42 @@ sınırlar. URL’lerle erişmek mümkün olduğundan bu tür erişim denetimleri hile ile atlatılabilir olacaktır.

      +

      URL'nin yol bileşeni aşağıdaki koşullardan herhangi birini + sağlıyorsa sarmalanan yönergeler isteğe uygulanır: +

      +
        +
      • Belirtilen yer URL'nin yol bileşeni ile tam olarak eşleşiyordur. +
      • +
      • Belirtilen yer bir bölü çizgisi öncesinde bitiyorsa URL'nin yol + bileşeninin öneklerinden biriyle eşleşiyordur (bağlamsal bir kök dizin + olarak). +
      • +
      • Belirtilen yer bir bölü çizgisi ile bitiyorsa URL'nin yol + bileşeninin öneklerinden biriyle eşleşiyordur (bağlamsal bir kök dizin + olarak). +
      • +
      +

      Aşağıdaki örnekte yer belirtimi bir bölü çizgisi ile bitirilmemiştir. + /private1, /private1/ ve + /private1/file.txt istekleri için sarmalanan yönergeler + uygulanacaktır, fakat /private1other isteğine + uygulanmayacaktır.

      + +
      <Location "/private1">
      +    #  ...
      +</Location>
      + + +

      Aşağıdaki örnekte yer belirtimi bir bölü çizgisi ile bitirilmiştir. + /private2/ ve /private2/file.txt istekleri + için sarmalanan yönergeler uygulanacaktır, fakat /private2 + ve /private2other isteklerine uygulanmayacaktır.

      + +
      <Location "/private2/">
      +    # ...
      +</Location>
      + +

      <Location> ne zaman kullanılmalı

      @@ -2094,7 +2824,7 @@ sınırlar. dışındaki içeriğe çeşitli yönergeler uygulamak için kullanın. Dosya sisteminde bulunan içerik için <Directory> ve <Files> bölümlerini kullanın. Bunun istisnası, sunucunun tamamına bir yapılandırma uygulamak için kolay bir yol olan - <Location /> kullanımıdır.

      + <Location "/"> kullanımıdır.

      Kaynağa yapılan (vekil olmayan) tüm istekler için eşleşecek URL, @@ -2113,9 +2843,10 @@ sınırlar. düzenli ifadeler de kullanılabilir. Örneğin,

      -

      - <Location ~ "/(ek|hususi)/veri"> -

      +
      <Location ~ "/(ek|hususi)/veri">
      +    #...
      +</Location>
      +

      yönergesi /ek/veri ve /hususi/veri alt dizgeleriyle eşleşecektir. <LocationMatch> yönergesi <Location> yönergesinin düzenli ifade sürümüne @@ -2125,19 +2856,14 @@ sınırlar.

      <Location> işlevselliği özellikle SetHandler yönergesi ile birlikte kullanışlı olur. Örneğin, durum isteklerini etkin kılmak ama sadece - mesela.dom’dan gelen isteklere izin vermek için şöyle bir + example.com’dan gelen isteklere izin vermek için şöyle bir uygulama yapabilirsiniz:

      -

      - <Location /status>
      - - SetHandler server-status
      - Order Deny,Allow
      - Deny from all
      - Allow from .mesela.dom
      -
      - </Location> -

      +
      <Location "/status">
      +  SetHandler server-status
      +  Require host example.com
      +</Location>
      +

      / (bölü çizgisi) hakkında

      Bölü çizgisinin URL içinde bulunduğu yere bağlı olarak özel anlamları @@ -2148,21 +2874,21 @@ sınırlar. çizgisini yanyana belirtmeniz gerekiyorsa <LocationMatch> yönergesinde ve <Location> yönergesinin düzenli ifadeli kullanımında bunu açıkça belirtmeniz gerekir.

      -

      Örneğin, <LocationMatch ^/abc> yönergesi +

      Örneğin, <LocationMatch "^/abc"> yönergesi /abc ile eşleşecek ama //abc ile eşleşmeyecektir. <Location> yönergesinin düzenli ifade içermeyen kullanımındaki davranış vekil isteklerinde kullanılana benzer ve doğrudan kaynağa yapılan (vekil olmayan) isteklerde çok sayıda bölü çizgisi dolaylı olarak tek bir bölü çizgisiyle eşleşecektir. Örneğin, <Location - /abc/def> belirtirseniz ve istek /abc//def + "/abc/def"> belirtirseniz ve istek /abc//def şeklinde olursa bu ikisi eşleşir.

      Ayrıca bakınız:

      @@ -2182,17 +2908,39 @@ uygulanır. yönergelerin etki alanını <Location> yönergesinin yaptığı gibi belirtilen URL’lerle sınırlar. Ancak argüman olarak basit bir dizge değil bir düzenli ifade alır. Örneğin,

      -

      - <LocationMatch "/(ek|hususi)/veri"> -

      +
      <LocationMatch "/(ek|hususi)/veri">
      +    # ...
      +</LocationMatch>
      +

      yönergesi /ek/veri ve /hususi/veri alt dizgeleriyle eşleşecektir.

      +

      Eğer hedef, /ek/veri içeren değil de + /ek/veri ile başlayan bir URL ise düzenli ifadenin önüne + ^ getirmek gerekir.

      + +
      <LocationMatch "^/(ek|hususi)/veri">
      + +
      + +

      2.4.8 itibariyle, isimli gruplar ve geriye başvurular elde edilmekte + olup ilgili isim büyük harfe çevrildikren sonra "MATCH_" ile + öncelendikten sonra ortama yazılmaktadır. Böylece yol elemanlarına + mod_rewrite gibi modüllerden veya düzenli ifadelerden başvurmak mümkün + kılınmıştır. Karışıklığı önlemek için, numaralı (isimsiz) geriye + başvurular yoksayılmaktadır. Bunların yerine isimli geriye başvurular + kullanılmalıdır.

      + +
      <LocationMatch "^/combined/(?<sitename>[^/]+)">
      +    require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
      +</LocationMatch>
      + +

      Ayrıca bakınız:

      @@ -2201,11 +2949,16 @@ uygulanır.

      LogLevel Yönergesi

      - + - + +
      Açıklama:Hata günlüklerinin ayrıntı seviyesini belirler.
      Sözdizimi:LogLevel seviye
      Sözdizimi:LogLevel [modül:]seviye + [modül:seviye] ... +
      Öntanımlı:LogLevel warn
      Bağlam:sunucu geneli, sanal konak
      Bağlam:sunucu geneli, sanal konak, dizin
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Modül ve dizin bağlamındaki yapılandırmalar Apache HTTP + Sunucusunun 2.3.6 ve sonraki sürümlerinde + kullanılabilmektedir.

      LogLevel yönergesi hata günlüklerine kaydedilen hata iletilerinde hangi ayrıntılara yer verileceğini belirler (ErrorLog yönergesine bakınız). En yüksek önem @@ -2279,6 +3032,52 @@ uygulanır. "Opening config file ..."
      (... yapılandırma dosyası açılıyor) + + trace1 + İz sürme iletileri + "proxy: FTP: control connection complete"
      (vekil: FTP: + denetim bağlantısı sağlandı) + + + trace2 + İz sürme iletileri + "proxy: CONNECT: sending the CONNECT request to the remote + proxy"
      (vekil: CONNECT: uzak vekile CONNECT isteği + gönderiliyor) + + + trace3 + İz sürme iletileri + "openssl: Handshake: start" + + + trace4 + İz sürme iletileri + "read from buffered SSL brigade, mode 0, 17 bytes"
      (tamponlu + SSL gruplamasından okuma, kip 0, 17 baytİz sürme iletileri + + + trace5 + İz sürme iletileri + "map lookup FAILED: map=rewritemap key=keyname"
      (eşleşme + araması BAŞARISIZ: map=rewritemap key=keyname) + + + trace6 + İz sürme iletileri + "cache lookup FAILED, forcing new map lookup"
      (arabellek + araması BAŞARISIZ, yeni bir eşleşme araması başlatılıyor) + + + trace7 + İz sürme iletileri, büyük miktarda veri dökümü + "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |" + + + trace8 + İz sürme iletileri, büyük miktarda veri dökümü + "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |" +

      Belli bir seviye belirtildiğinde daha yüksek seviyeden iletiler de @@ -2290,9 +3089,9 @@ uygulanır.

      Örnek:

      -

      - LogLevel notice -

      +
      LogLevel notice
      + +

      Ek Bilgi

      Günlük iletileri normal bir dosyaya yazılırken notice @@ -2301,6 +3100,37 @@ uygulanır. uygulanmaz.

      +

      Bir modül ismi olmaksızın bir seviye belirtmek seviyeyi bu seviyedeki + tüm modüller için sıfırlayacaktır. Bir seviyyi bir modül ismiyle + birlikte belirtmek seviyeyi sadece bu modül için sıfırlayacaktır. Modül + ismi olarak, modülün kaynak dosyası ismini, modül kimliği veya + _module sonekli modül ismi belirtmek mümkündür. + Yani, aşağıdaki üç belirtim eşdeğerdedir:

      + +
      LogLevel info ssl:warn
      +LogLevel info mod_ssl.c:warn
      +LogLevel info ssl_module:warn
      + + +

      Ayrıca seviyeyi dizin bağlamında değiştirmek de mümkündür:

      + +
      LogLevel info
      +<Directory "/usr/local/apache/htdocs/app">
      +  LogLevel debug
      +</Directory>
      + + +
      Dizin bağlamında günük seviyesi yapılandırması sadece istek + çözümlendikten ve istek dizinle ilişkilendirildikten sonra günlüklenen + iletileri etkiler. Bağlantı veya sunucu ile ilişkilendirilmemiş günlük + iletileri etkilenmez.
      + +

      Ayrıca bakınız:

      +
      top

      MaxKeepAliveRequests Yönergesi

      @@ -2319,146 +3149,375 @@ uygulanır.

      Örnek:

      -

      - MaxKeepAliveRequests 500 -

      +
      MaxKeepAliveRequests 500
      +
      top

      MaxRangeOverlaps Yönergesi

      - - + + - -
      Açıklama:Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete - resource
      Sözdizimi:MaxRangeOverlaps default | unlimited | none | number-of-ranges
      Açıklama:Özkaynağın tamamını döndürmeden önce izin verilen üst üste binen + aralık sayısı (100-200,150-300 gibi)
      Sözdizimi:MaxRangeOverlaps default | unlimited | none | + aralık-sayısı
      Öntanımlı:MaxRangeOverlaps 20
      Bağlam:sunucu geneli, sanal konak, dizin
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache HTTP Server 2.3.15 and later

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      +Uyumluluk:Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir. + +

      MaxRangeOverlaps yönergesi, sunucunun istemciye + göndermeye gönüllü olacağı üst üste binen HTTP Range'lerinin sayısını + sınırlar. İzin verilenden daha fazlası istenmişse özkaynağın tamamı + döndürülür.

      + +
      +
      default
      +
      Üst üste binen HTTP Range'lerinin sayısını derleme sırasında + belirlenen öntanımlı 20 değeriyle sınırlar.
      + +
      none
      +
      Üst üste binen Range başlıkları yoksayılır.
      + +
      unlimited
      +
      Sunucunun sağlamaya gönüllü olacağı üst üste binen HTTP + Range'lerinin sayısı sınırlanmaz.
      + +
      aralık sayısı
      +
      Sunucunun sağlamaya gönüllü olacağı üst üste binen HTTP + Range'lerinin azami sayısını ifade eden pozitif bir tamsayı.
      +
      + +
      top

      MaxRangeReversals Yönergesi

      - - + + - -
      Açıklama:Number of range reversals (eg: 100-200,50-70) allowed before returning the complete - resource
      Sözdizimi:MaxRangeReversals default | unlimited | none | number-of-ranges
      Açıklama:Özkaynağın tamamını döndürmeden önce izin verilen ters sıralı + aralık sayısı (100-200,50-70 gibi)
      Sözdizimi:MaxRangeReversals default | unlimited | none | + aralık-sayısı
      Öntanımlı:MaxRangeReversals 20
      Bağlam:sunucu geneli, sanal konak, dizin
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache HTTP Server 2.3.15 and later

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      +Uyumluluk:Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir. + +

      The MaxRangeReversals yönergesi, sunucunun + istemciye göndermeye gönüllü olacağı ter sıralı HTTP Range'lerinin + sayısını sınırlar. İzin verilenden daha fazlası istenmişse + özkaynağın tamamı döndürülür.

      + +
      +
      default
      +
      Ters sıralı HTTP Range'lerinin sayısını derleme sırasında + belirlenen öntanımlı 20 değeriyle sınırlar.
      + +
      none
      +
      Ters sıralı Range başlıkları yoksayılır.
      + +
      unlimited
      +
      Sunucunun sağlamaya gönüllü olacağı ters sıralı HTTP + Range'lerinin sayısı sınırlanmaz.
      + +
      aralık-sayısı
      +
      Sunucunun sağlamaya gönüllü olacağı ters sıralı HTTP + Range'lerinin azami sayısını ifade eden pozitif bir tamsayı.
      +
      + +
      top

      MaxRanges Yönergesi

      - - + + - -
      Açıklama:Number of ranges allowed before returning the complete -resource
      Sözdizimi:MaxRanges default | unlimited | none | number-of-ranges
      Açıklama:Özkaynağın tamamını döndürmeden önce izin verilen aralık sayısı
      Sözdizimi:MaxRanges default | unlimited | none | + aralık-sayısı
      Öntanımlı:MaxRanges 200
      Bağlam:sunucu geneli, sanal konak, dizin
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache HTTP Server 2.3.15 and later

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      +Uyumluluk:Apache HTTP Sunucusunun 2.3.15 ve sonraki sürümlerinde + kullanılabilmektedir. + +

      MaxRanges yönergesi, sunucunun istemciye + göndermeye gönüllü olacağı HTTP Range'lerinin sayısını sınırlar. İzin + verilenden daha fazlası istenmişse özkaynağın tamamı döndürülür.

      + +
      +
      default
      +
      HTTP Range'lerinin sayısını derleme sırasında belirlenen öntanımlı + 200 değeriyle sınırlar.
      + +
      none
      +
      Range başlıkları yoksayılır.
      + +
      unlimited
      +
      Sunucunun sağlamaya gönüllü olacağı HTTP Range'lerinin sayısı + sınırlanmaz.
      + +
      aralık-sayısı
      +
      Sunucunun sağlamaya gönüllü olacağı HTTP Range'lerinin azami + sayısını ifade eden pozitif bir tamsayı.
      +
      + +
      top
      -

      Mutex Yönergesi

      +

      MergeTrailers Yönergesi

      - - - - + + + + - -
      Açıklama:Configures mutex mechanism and lock file directory for all -or specified mutexes
      Sözdizimi:Mutex mechanism [default|mutex-name] ... [OmitPID]
      Öntanımlı:Mutex default
      Bağlam:sunucu geneli
      Açıklama:Trailer alanlarının başlığa dahil edilip edilmeyeceğini belirler
      Sözdizimi:MergeTrailers [on|off]
      Öntanımlı:MergeTrailers off
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache HTTP Server 2.3.4 and later

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      +Uyumluluk:2.4.11 ve sonrası + +

      Bu yönerge HTTP Trailer alanlarının dahili HTTP başlıklarına kopyalanıp + kopyalanmayacağını belirler. Kopyalama işlemi istek gövdesi tamamen + alındığında gerçekleşir, çoğu başlık işleminin çok sonra istek + başlıklarını inceleme veya değiştirme şansı olur.

      +

      Bu seçenek, Trailer alanlarını daima kopyalayan 2.4.11 öncesi + dağıtımlarla uyumluluk için vardır.

      + +
      top
      -

      NameVirtualHost Yönergesi

      +

      Mutex Yönergesi

      - - + + + +
      Açıklama:İsme dayalı sanal konaklar için IP adresi belirtir
      Sözdizimi:NameVirtualHost adres[:port]
      Açıklama:Muteks mekanizmasını ve kilit dosyası dizinini tüm muteksler veya belirtilenler için yapılandırır
      Sözdizimi:Mutex mekanizma [default|muteks-ismi] ... [OmitPID]
      Öntanımlı:Mutex default
      Bağlam:sunucu geneli
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Apache HTTP Sunucusunun 2.3.4 ve sonraki sürümlerinde + kullanılabilmektedir.
      -

      Sunucunun, istemci tarafından talep edilen konak ismine - dayanarak seçtiği her sanal konak kümesi için ayrı bir - NameVirtualHost yönergesi vardır. - NameVirtualHost yönergesi isme dayalı sanal konakları yapılandırmak isterseniz gerekli olur. -

      +

      Mutex yönergesi httpd ve diğer modüllerin + özkaynaklara erişimi dizgeleştirmekte kullandıkları mekanizmanın yanında + isteğe bağlı olarak kilit dosyasının yerini belirler. İlk değiştirge + olarak default belirtilirse tüm mutekslerin ayarları + değişir; ikinci değiştirge olarak bir muteks ismi belirtilirse (aşağıdaki + tabloya bakın) yalnızca bu muteksin öntanımlıları değişir.

      -

      Bu yönerge ve bununle ilişkili VirtualHost - yönergesi, suncu hem HTTP hem de HTTPS bağlantılarını desteklediği - takdirde mutlaka bir port numarası da içermelidir.

      - -

      adres olarak bir konak ismi de belirtebilirsiniz ama daima - bir IP adresi veya bir * kullanmanızı öneririz. Bir yıldız imi - belirtilmiş NameVirtualHost yönergeleri sadece - adres yerine bir * belirtilmiş VirtualHost - yönergeleri ile eşleşir.

      - -

      İstekleri bir güvenlik duvarının veya başka bir vekil sunucunun - aldığı ve bunları farklı bir IP adresine sahip bir sunucuya - yönlendirdiği durumlarda, bu yönergeye değer olarak istekleri sunan - makinenin fiziksel ağ arabiriminin IP adresi belirtilmelidir.

      - -

      Aşağıdaki örnekte, 192.0.2.1 IP adresli arabirimin 80. portundan - alınan isteklerle sadece ilk iki sanal konak arasında seçim - yapılacaktır. Diğer arabirimlerin 80.portundan gelen istekler için ise - sadece üçüncü ve dördüncü sanal konak arasında seçim yapılacaktır. - İsteklerin hangi arabirimden geldiğinin önemli olmadığı durumlarda - (genelde böyledir) NameVirtualHost ve - VirtualHost yönergelerine sadece "*:80" - belirtmek yeterlidir.

      - -

      - NameVirtualHost 192.0.2.1:80
      - NameVirtualHost *:80

      - - <VirtualHost 192.0.2.1:80>
      -   ServerName namebased-a.example.com
      - </VirtualHost>
      -
      - <VirtualHost 192.0.2.1:80>
      -   Servername namebased-b.example.com
      - </VirtualHost>
      -
      - <VirtualHost *:80>
      -   ServerName namebased-c.example.com
      - </VirtualHost>
      -
      - <VirtualHost *:80>
      -   ServerName namebased-d.example.com
      - </VirtualHost>
      -
      +

      Mutex yönergesi genelde aşağıdaki istisnai + durumlarda kullanılır:

      -

      +
        +
      • İşlevsel veya başarımsal bir soruna sahip APR + tarafından öntanımlı mekanizma seçildiği takdirde muteks + mekanizmasını değiştirmek için
      • -

        IPv6 adresleri belirtilirken örnekteki gibi köşeli ayraçlar arasına - alınmalıdır:

        +
      • Öntanımlı dizin, kilitlemeyi desteklemediği takdirde dosya tabanlı + muteksler tarafından kullanılan dizini değiştirmek için
      • +
      -

      - NameVirtualHost [2001:db8::a00:20ff:fea7:ccea]:8080 -

      +

      Destekleyen modüller

      +

      Bu yönerge sadece ap_mutex_register() API'si kullanılarak + çekirdek sunucuda imlenmiş muteksleri yapılandırır. httpd ile birlikte + dağıtılan tüm modüller Mutex yönergesini + destekler, fakat üçüncü parti modüllerin hepsi desteklemeyebilir. Bu + yönergenin desteklenip desteklenmediğini öğrenmek için üçüncü parti + modülün belgelerini inceleyin; destekliyorsa muteks ad(lar)ı + belirtilmiştir.

      +
      -

      <VirtualHost> - yönergesinin değeri

      -

      <VirtualHost> yönergesinin - değerinin NameVirtualHost yönergesininkiyle tam - olarak eşleşmesi gerektiğine dikkat ediniz.

      +

      Kullanılabilen muteks mekanizmaları:

      +
        +
      • default | yes +

        APR tarafından saptanan öntanımlı kilitleme + gerçeklenimini seçer. Öntanımlı kilitleme gerçeklenimi + httpd -V seçeneği ile çalıştırılarak + öğrenilebilir.

      • + +
      • none | no +

        Muteksi etkin şekilde iptal eder. Buna bir mutekste izin + verilebilmesi için modülün bunun geçerli bir seçim olduğunu + belirtmesi gerekir. Daha fazla bilgi için modül belgelerini + inceleyin.

      • + +
      • posixsem +

        POSIX semaforuna dayalı bir muteks çeşididir.

        +

        Uyarı

        +

        Süreçteki bir evre muteks parçalama arızalarını tutuyorsa, + httpd'nin çökmesi sonucu, semafor sahipliği geri kazanılmaz.

        +
        +
      • + +
      • sysvsem +

        SystemV IPC semaforuna dayalı bir muteks çeşididir.

        +

        Uyarı

        +

        Semafor geri kazanılmadan süreçler çökerse SysV semaforlarının + "sızıntı" yapması mümkündür.

        +
        +

        Güvenlik

        +

        Semafor API'si, HTTP sunucusu ile aynı kullanıcı kimliği altında + çalışan bir CGI (örn, suexec veya + cgiwrapper gibi bir araç kullanmıyorsanız bütün + CGI'ler) tarafından hizmet reddi saldırısı yapılmasına izin + verir.

        +
        +
      • + +
      • sem +

        POSIX ve SystemV IPC semaforları arasından kullanılabilir "en iyi" + semafor gerçeklenimini seçer.

      • + +
      • pthread +

        Süreç çaprazlamalı POSIX evre mutekslerine dayalı bir muteks + çeşididir.

        +

        Uyarı

        +

        Çoğu sistemde, bir çocuk süreç bu gerçeklenim tarafından kullanılan + bir muteksi tutarken olağandışı bir şekilde sonlanırsa httpd donar + ve isteklere yanıt vermeyi durdurur. Bu olduğunda sunucuyu bu + durumdan kurtarmak için elle yeniden başlatmak gerekir.

        +

        Bu duruma karşı bir mekanizma sağlayan Solaris ve Linux dikkate + değer bir istisnadır. Bu mekanizma, bir muteksi tutan bir çocuk + süreç olağandışı bir şekilde sonlandıktan sonra muteksin + kurtarılmasını sağlar.

        +

        Sisteminiz POSIX uyumluysa veya + pthread_mutexattr_setrobust_np() işlevini + sağlıyorsa pthread seçeneğini rahatça + kullanabilirsiniz.

        +
        +
      • + +
      • fcntl:/path/to/mutex +

        Muteks olarak fcntl() işlevini ve fiziksel bir (lock-) + dosyasını kullanan bir muteks çeşididir.

        +

        Uyarı

        +

        Bu mekanizmaya dayalı çok sayıda muteks, çok evreli ve çok süreçli + ortamlarda kullanıldığında, örneğin Solaris'te olduğu gibi + fcntl() evrelerden bihaberse, geçerli muteks + işlemlerinde donma hataları (EDEADLK) raporlanabilir.

        +
        +
      • + +
      • flock:/path/to/mutex +

        flock() işlevinin dosya kilitlemeyi sağlaması dışında + fcntl:/path/to/mutex yöntemine benzer.

      • + +
      • file:/path/to/mutex +

        fcntl ve flock arasından kullanılabilir + "en iyi" dosya kilitleme gerçeklenimini seçer.

      • +
      -

      - NameVirtualHost 192.0.2.2:80
      - <VirtualHost 192.0.2.2:80>
      - # ...
      - </VirtualHost>
      -

      +

      Çoğu mekanizma, yalnız kendilerini destekleyen platformlarda + APR tarafından da destekleniyorsa kullanılabilir. + Tüm platformlarda kullanılamayan mekanizmalar posixsem, + sysvsem, sem, pthread, fcntl, + flock ve file mekanizmalarıdır.

      + +

      fcntl ve flock dosya tabanlı mekanizmaları ile bir + yol sağlandığı takdirde bu, kilit dosyasının oluşturulacağı dizindir. + Öntanımlı dizin, httpd'nin çalışma anı dizini ServerRoot'a görelidir. + /path/to/mutex için daima bir yerel diskteki dosya sistemi + kullanılır, asla NFS- veya AFS gibi bir ağ dosya sistemi kullanılmaz. + Dosya ismi daima muteks ismi ile başlar, buna modül tarafından sağlanan + isteğe bağlı bir aşama dizgesi eklenebilir, OmitPID değeri + belirtilmemişse httpd ebeveyn sürecinin süreç kimliği buna eklenerek + dosya ismi eşsiz kılınır. Böylece, çok sayıda httpd süreci aynı kilit + dosyası dizinini paylaştığı durumda çakışmalar önlenmiş olur. Örneğin, + muteks ismi mpm-accept ise ve kilit dosyası dizini + /var/httpd/locks ise ve ebeveyn süreç kimliği 12345 ise bu + httpd sürecine ait kilit dosyası ismi + /var/httpd/locks/mpm-accept.12345 olurdu.

      + +

      Güvenlik

      +

      Muteks dosyalarını herkesin yazabildiği /var/tmp gibi + dizinlere koymaktan kaçınmak en iyisidir. Örneğin, birinin aynı + dizinde oluşturmaya çalıştığı bir dosya ile aynı isimde bir kilit + dosyasını sunucunun da oluşturmaya çalıştığı durumda sunucu engellenerek + bir hizmet reddi saldırısı gerçekleştirilmiş gibi olur.

      +

      httpd ve birlikte dağıtılan modüller tarafından kullanılan mutekslerin + isimleri:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Muteks ismiModül(ler)Korunan özkaynak
      mpm-acceptprefork ve worker MPM'leri + Gürleyen sürü sorunundan kaçınmak için gelen bağlantılar; daha + fazla bilgi için başarımın + arttırılması belgesine bakın.
      authdigest-clientmod_auth_digestPaylaşımlı bellekteki istemci listesi
      authdigest-opaquemod_auth_digestPaylaşımlı bellekteki sayaç
      ldap-cachemod_ldapLDAP sonuç arabelleği
      rewrite-mapmod_rewriteÇoklu isteklerdeki birbirine karışmış G/Ç'tan kaçınmak için + harici eşleştirme progamlarıyla iletişim
      ssl-cachemod_sslSSL oturum arabelleği
      ssl-staplingmod_sslOCSP zımbalama yanıtı arabelleği
      watchdog-callbackmod_watchdogBir istemci modülünün geri çağırım işlevi
      + +

      OmitPID seçeneği, httpd ebeveyn süreç kimliğinin kilit + dosyası ismine eklenmesini engeller.

      + +

      Aşağıdaki örnekte, mpm-accept muteksinin mekanizmasının + derleme sırasındaki öntanımlısı, kilit dosyasının oluşturulacağı dizinin + /var/httpd/locks olarak belirtildiği fcntl + mekanizmasıyla değiştirilmektedir.Tüm diğer mutekslerin derleme anı + öntanımlı mekanizması ise sysvsem ile + değiştirilmektedir.

      + +
      Mutex sysvsem default
      +Mutex fcntl:/var/httpd/locks mpm-accept
      + + +
      +
      top
      +

      NameVirtualHost Yönergesi

      + + + + + + +
      Açıklama:ÖNERİLMİYOR: İsme dayalı sanal konaklar için IP adresi belirtir
      Sözdizimi:NameVirtualHost adres[:port]
      Bağlam:sunucu geneli
      Durum:Çekirdek
      Modül:core
      +

      2.3.11 öncesinde, NameVirtualHost yönergesi, + isme dayalı sanal konaklar için belli bir IP adresi ve port çiftini + sunucuya tanıtmak için gerekliydi. 2.3.11 ve sonrasında, bir IP adresi + ve port çifti her zaman çok sayıda sanal konakta kullanılabilmekte, + isme dayalı sanal barındırma bu adres için özdevinimli olarak etkin + kılınmaktadır.

      + +

      Bu yönerge şu an etkisizdir.

      +

      Ayrıca bakınız:

      • Apache Sanal Konak Belgeleri
      • @@ -2471,14 +3530,16 @@ or specified mutexes Sözdizimi:Options [+|-]seçenek [[+|-]seçenek] ... -Öntanımlı:Options All +Öntanımlı:Options FollowSymlinks Bağlam:sunucu geneli, sanal konak, dizin, .htaccess Geçersizleştirme:Options Durum:Çekirdek Modül:core +Uyumluluk:2.3.11 sürümünde öntanımlı değer All değiştirilip FollowSymlinks yapıldı. -

        Options yönergesi belli bir dizinde hangi sunucu - özelliklerinin etkin olacağını (veya olmayacağını) belirler.

        +

        Options yönergesi belli bir dizinde hangi + sunucu özelliklerinin etkin olacağını (veya olmayacağını) + belirler.

        seçenek olarak hiçbir ek özellik etkin olmayacaksa None, aksi takdirde aşağıdakilerden biri veya bir kaçı @@ -2486,19 +3547,20 @@ or specified mutexes

        All
        -
        MultiViews hariç tüm seçenekler. Bu öntanımlıdır.
        +
        MultiViews hariç tüm seçenekler.
        ExecCGI
        mod_cgi kullanan CGI betiklerinin çalışmasına izin verilir.
        FollowSymLinks
        -
        Sunucu bu dizindeki sembolik bağları izler. +
        Sunucu bu dizindeki sembolik bağları izler. Bu öntanımlıdır.
        -

        Sembolik bağlar izlense bile <Directory> bölümleriyle eşleşen dosya yolları - değiştirilmez.

        -

        Ayrıca, bu seçenek bir <Location> bölümü içinde belirtildiği takdirde yok - sayılır.

        +

        Sembolik bağlar izlense bile <Directory> bölümleriyle eşleşen dosya + yolları değiştirilmez.

        +

        FollowSymLinks ve + SymLinksIfOwnerMatch Options sadece <Directory> bölümlerinde veya + .htaccess dosyaları içinde çalışır.

        Sembolik bağ sınamaları, atlatılabilir yarış koşullarına konu olduğundan bu seçeneğin yokluğu bir güvenlik sınırlaması olarak değerlendirilmemelidir.

        @@ -2520,68 +3582,65 @@ or specified mutexes
        MultiViews
        mod_negotiation kullanılarak içerik uzlaştırmalı çok - görünümlü içeriğe izin verilir.
        + görünümlü içeriğe izin verilir. +

        Bilgi

        mod_negotiation + karşılaştırmak değerlendirmek için gerçek özkaynaklara ihtiyaç + duyduğundan <Directory> yönergesinde belirtilendan farklı bir yer + ayarlanırsa bu seçenek yoksayılır.

        +
        SymLinksIfOwnerMatch
        Sunucu sembolik bağları sadece sembolik bağın hedefi ile bulunduğu dizinin sahibinin aynı kullanıcı olması halinde izleyecektir. -

        Ek Bilgi

        Bu seçenek bir <Location> bölümü içinde belirtildiğinde yok - sayılır.

        +

        FollowSymLinks ve + SymLinksIfOwnerMatch Options sadece <Directory> bölümlerinde veya + .htaccess dosyaları içinde çalışır.

        +

        Sembolik bağ sınamaları, atlatılabilir yarış koşullarına konu olduğundan bu seçenek bir güvenlik sınırlaması olarak - değerlendirilmemelidir.

        + değerlendirilmemelidir.

        Normalde, bir dizine çok sayıda Options uygulanabilirse de, dizine en uygun olanı uygulanıp diğerleri yok - sayılır; seçenekler katıştırılmaz (bkz, Bölümler Nasıl Katıştırılır?). Bununla birlikte, önüne bir + sayılır; seçenekler katıştırılmaz (bkz, Bölümler Nasıl Katıştırılır?). Bununla birlikte, önüne bir + veya - simgesi konmuş seçenekler varsa, o seçenekler katıştırılır. Önüne + konmuş seçenekler mevcutlara eklenirken - konmuş seçenekler silinir.

        -

        Uyarı

        +

        Bilgi

        + veya - imli seçenekler içeren Options ile imsiz seçenekler içerenlerin karışık - olarak kullanılması beklenmedik sonuçlara yol açması sebebiyle aslında - geçersiz bir sözdizimidir.

        + olarak kullanılması aslında geçersiz bir sözdizimi olup sunucunun + başlatılması sırasında sözdizimi denetiminin çıkmasıyla reddedilir.

        Örneğin, + ve - imleri olmaksızın,

        -

        - <Directory /web/docs>
        - - Options Indexes FollowSymLinks
        -
        - </Directory>
        -
        - <Directory /web/docs/spec>
        - - Options Includes
        -
        - </Directory> -

        +
        <Directory "/web/docs">
        +  Options Indexes FollowSymLinks
        +</Directory>
        +
        +<Directory "/web/docs/spec">
        +  Options Includes
        +</Directory>
        +

        yapılandırmasıyla /web/docs/spec dizininde sadece Includes seçeneği etkin olacaktır. Bununla birlikte, ikinci Options yönergesinde + ve - imleri kullanılırsa,

        -

        - <Directory /web/docs>
        - - Options Indexes FollowSymLinks
        -
        - </Directory>
        -
        - <Directory /web/docs/spec>
        - - Options +Includes -Indexes
        -
        - </Directory> -

        +
        <Directory "/web/docs">
        +  Options Indexes FollowSymLinks
        +</Directory>
        +
        +<Directory "/web/docs/spec">
        +  Options +Includes -Indexes
        +</Directory>
        +

        yapılandırmasıyla /web/docs/spec dizininde FollowSymLinks ve Includes seçenekleri etkin @@ -2593,32 +3652,173 @@ or specified mutexes tamamen iptaline sebep olur.

        -

        Herhangi bir başka değer belirtilmedikçe All +

        Herhangi bir başka değer belirtilmedikçe FollowSymlinks öntanımlıdır.

      top

      Protocol Yönergesi

      - - + + - -
      Açıklama:Protocol for a listening socket
      Sözdizimi:Protocol protocol
      Açıklama:Dinlenen bir soket için protokol
      Sözdizimi:Protocol protokol
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache 2.1.5 and later. -On Windows from Apache 2.3.3 and later.

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      Ayrıca bakınız:

      +Uyumluluk:Apache httpd 2.1.5 ve sonrasında kullanılabilmektedir. + Windows'ta ise Apache httpd 2.3.3 ve sonrasında + kullanılabilmektedir. + + +

      Bu yönerge dinlenen belli bir soket için kullanılacak protokolü + belirler. Belirtilen protokol bir isteği hangi modülün ele alacağını ve + AcceptFilter yönergesiyle yapılan özel + eniyilemelere uygulanacak protokolü belirler.

      + +

      Bir protokol belirtme ihtiyacını sadece standartdışı portlarda + çalışıyorsanız duyarsınız. Aksi takdirde, http protokolünün + port 80'i, https'in ise 443'ü kullandığı varsayılır.

      + +

      Örneğin, https'i standartdışı bir portta çalıştırmak + isterseniz protokolü şöyle belirtebilirsiniz:

      + +
      Protocol https
      + + +

      Protokolü Listen + yönergesini kullanarak da belirtebilirsiniz.

      + +

      Ayrıca bakınız:

      +
      +
      top
      +

      Protocols Yönergesi

      + + + + + + + + +
      Açıklama:Sunucu/sanal konak için kullanılabilecek protokoller
      Sözdizimi:Protocols protokol ...
      Öntanımlı:Protocols http/1.1
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Sadece Apache 2.4.17 ve sonrasında kullanılabilir.
      +

      Bu yönerge bir sunucu/sanal konak için kullanılabilecek + protokolleri belirtmekte kullanılır. Bu liste, bir istemcinin bir + sanal konak veya sunucu ile uzlaşabilmesini sağlayan prokolleri + belirler.

      + +

      Bir sanal konak veya sunucuda kullanılabilecek protolleri + çeşitlendirmek isterseniz bu protokolleri belirtmeniz gerekir. + 1.0 ve 0.9 istemcilerle uyumlu olan http/1.1 protokolü + öntanımlıdır.

      + +

      Örneğin, bir sunucunun TLS'li HTTP/2 protokolünü desteklemesini + şöyle sağlayabilirsiniz:

      + +
      Protocols h2 http/1.1
      + + +

      Geçerli protokoller, http ve https bağlantıları için + http/1.1 htps bağlantıları için h2 ve + http bağlantıları için h2c protokolleridir. Modüller + başka protokollerin de etkinleştirilmesini gerektirebilir.

      + +

      Kullanımından vazgeçilmiş protokollerin silinmesi gerekmez. Böyle + protokol isimleri basitçe yoksayılır.

      + +

      Ana sunucu için belirtilen protokoller, kendi protokol yönergesi + olmayan sanal konaklar için de geçerlidir. Diğer yandan sanal + konaklarda protokol belirtilmesi ana sunucuda belirtien + protollerin bu sanal konaklarda geçersiz olmasına sebep olur. +

      + + +

      Ayrıca bakınız:

      + +
      +
      top
      +

      ProtocolsHonorOrder Yönergesi

      + + + + + + + + +
      Açıklama:Uzlaşma sırasında protokollerin öncelik sırasını belirler
      Sözdizimi:ProtocolsHonorOrder On|Off
      Öntanımlı:ProtocolsHonorOrder On
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Sadece Apache 2.4.17 ve sonrasında kullanılabilir.
      +

      Sunucuda Protocols yönergesinde listelemiş + protokollerin mi yoksa istemcinin protokol listesinin mi öncelikli + olacağı bu yönerge ile belirtilir.

      + +

      Off belirtilirse, istemcinin protokol listesi sunucu + yapılandırmasındaki sıralamanın önüne geçer.

      + +

      ProtocolsHonorOrder yönergesine on + belirtilirse (öntanımlıdır), istemicinin protokol sıralaması dikkate + alınmaz ve protokol uzlaşımının sonucunu sunucu ayarlarındaki + sıralama belirler.

      + + +

      Ayrıca bakınız:

      + +
      +
      top
      +

      QualifyRedirectURL Yönergesi

      + + + + + + + + + +
      Açıklama:REDIRECT_URL ortam değişkeninin tamamen nitelenmiş olup +olmayacağını denetler
      Sözdizimi:QualifyRedirectURL ON|OFF
      Öntanımlı:QualifyRedirectURL OFF
      Bağlam:sunucu geneli, sanal konak, dizin
      Geçersizleştirme:FileInfo
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Yönerge 2.4.18 ve sonrasında desteklenmektedir. 2.4.17 +sürümünde 'QualifyRedirectURL ON' yapılandırması mevcutmuş gibi +davranılır.
      +

      Bu yönerge sunucuya REDIRECT_URL ortam değişkenin tamamen nitelenmiş + olacağını temin eder. Değişken öntanımlı olarak istemci tarafından talep + edilen URL'yi harfi harfine içerir, "/index.html" gibi. + QualifyRedirectURL ON belirtilseydi + aynı istek "http://www.example.com/index.html" gibi bir değerle + sonuçlanırdı.

      + +

      Böyle belirtilmemiş olsa bile, istek tam nitelenmiş bir URL + içerseydi REDIRECT_URL de tam nitelenmiş URL'yi içerirdi. +

      + +
      +
      top
      +

      RegisterHttpMethod Yönergesi

      + + + + + + +
      Açıklama:Standart olamayan HTTP yöntemlerini belirler
      Sözdizimi:RegisterHttpMethod yöntem [yöntem [...]]
      Bağlam:sunucu geneli
      Durum:Çekirdek
      Modül:core
      +

      İlgili RFClerle uyumlu olmayan HTTP Yöntemleri Apache HTTPD'de isteğin + işlenmesi sırasında normal olarak reddedilir. Bundan kaçınmak için, uyumsuz + HTTP yöntemlerini modüller destekli hale getirebilir. + RegisterHttpMethod yönergesi böyle yöntemleri elle + desteklenir yapmaya yarar. Bu tür yöntemler CGI gibi harici işlemlere + aktarılıyorsa bu işlem yararlıdır.

      +
      top

      RLimitCPU Yönergesi

      - + @@ -2635,11 +3835,11 @@ tüketimine sınırlama getirir.root olarak veya sistem açılışı sırasında çalıştırılması gerekir.

      -

      Bu sınırlar Apache’nin kendi alt süreçlerine değil, isteklere yanıt - verirken Apache alt süreçlerinin çatalladıkları süreçlere uygulanır. - Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir fakat borulu - günlük kaydı gibi ana Apache süreci tarafından çatallanmış süreçler - olmazlar.

      +

      Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.

      İşlemci özkaynak sınırları saniye cinsinden ifade edilir.

      @@ -2652,8 +3852,8 @@ tüketimine sınırlama getirir.
      top
      Açıklama:Apache alt süreçleri tarafından çalıştırılan süreçlerin işlemci -tüketimine sınırlama getirir.
      Açıklama:Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + işlemci tüketimine sınırlama getirir.
      Sözdizimi:RLimitCPU saniye|max [saniye|max]
      Öntanımlı:Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır
      - +root olarak veya sistem açılışı sırasında çalıştırılması gerekir.

      -

      Bu sınırlar Apache’nin kendi alt süreçlerine değil, isteklere yanıt - verirken Apache alt süreçlerinin çatalladıkları süreçlere uygulanır. - Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir fakat borulu - günlük kaydı gibi ana Apache süreci tarafından çatallanmış süreçler - olmazlar.

      +

      Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.

      Bellek özkaynak sınırları süreç başına bayt sayısı olarak ifade edilir.

      @@ -2689,8 +3889,8 @@ tüketimine sınırlama getirir.
      top
      Açıklama:Apache alt süreçleri tarafından çalıştırılan süreçlerin bellek -tüketimine sınırlama getirir.
      Açıklama:Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + bellek tüketimine sınırlama getirir.
      Sözdizimi:RLimitMEM bayt-sayısı|max [bayt-sayısı|max]
      Öntanımlı:Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır @@ -2671,11 +3871,11 @@ tüketimine sınırlama getirir.
      - + @@ -2707,11 +3907,11 @@ sınırlama getirir.root olarak veya sistem açılışı sırasında çalıştırılması gerekir.

      -

      Bu sınırlar Apache’nin kendi alt süreçlerine değil, isteklere yanıt - verirken Apache alt süreçlerinin çatalladıkları süreçlere uygulanır. - Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir fakat borulu - günlük kaydı gibi ana Apache süreci tarafından çatallanmış süreçler - olmazlar.

      +

      Bu sınırlar Apache httpd’nin kendi alt süreçlerine değil, isteklere + yanıt verirken Apache httpd alt süreçlerinin çatalladıkları süreçlere + uygulanır. Bunlar CGI betikleri ve SSI çalıştırma komutları olabilir + fakat borulu günlük kaydı gibi ana Apache httpd süreci tarafından + çatallanmış süreçler olmazlar.

      Süreç sayısı sınırı kullanıcı başına süreç sayısına sınırlama getirir.

      @@ -2739,25 +3939,23 @@ sınırlama getirir. - +
      Açıklama:Apache alt süreçleri tarafından çalıştırılabilecek süreç sayısına -sınırlama getirir.
      Açıklama:Apache httpd alt süreçleri tarafından çalıştırılabilecek süreç + sayısına sınırlama getirir.
      Sözdizimi:RLimitNPROC sayı|max [sayı|max]
      Öntanımlı:Bir değer belirtilmemiştir; işletim sistemi öntanımlıları kullanılır
      Geçersizleştirme:FileInfo
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Sadece Win32 için; Registry-Strict seçeneği Apache -2.0 ve sonrası için geçerlidir.
      Uyumluluk:Sadece Win32 için.
      -

      Bu yönerge Apache’nin CGI betiklerini çalıştıracak yorumlayıcıyı nasıl - tespit edeceğini belirler. Script öntanımlı olup Apache’nin - yorumlayıcı olarak betiğin diyezli ünlem satırında (#! ile - başlayan ilk satır) belirtilen yorumlayıcıyı kullanacağını belirtir. - Win32 sistemlerinde bu satır genellikle şöyledir:

      +

      Bu yönerge Apache httpd’nin CGI betiklerini çalıştıracak yorumlayıcıyı + nasıl tespit edeceğini belirler. Script öntanımlı olup + Apache httpd’nin yorumlayıcı olarak betiğin diyezli ünlem satırında + (#! ile başlayan ilk satır) belirtilen yorumlayıcıyı + kullanacağını belirtir. Win32 sistemlerinde bu satır genellikle + şöyledir:

      + +
      #!C:/Perl/bin/perl.exe
      -

      - #!C:/Perl/bin/perl.exe -

      perl yorumlayıcının yeri PATH değişkeninde kayıtlı ise şöyle de olabilir:

      -

      - #!perl -

      +
      #!perl
      +

      ScriptInterpreterSource Registry değeri ise betik dosyası uzantısının (.pl gibi) Windows Sicili içindeki @@ -2770,7 +3968,7 @@ sınırlama getirir.

      Güvenlik

      ScriptAlias’lı dizinlerde - Apache bulduğu her dosyayı çalıştırmayı deneyeceğinden + Apache httpd bulduğu her dosyayı çalıştırmayı deneyeceğinden ScriptInterpreterSource Registry yapılandırmasını kullanırken dikkatli olun. Registry seçeneği genellikle çalıştırılmayacak dosyalar için istenmeyen program çağrılarına sebep @@ -2782,8 +3980,8 @@ sınırlama getirir. içinde çökertmek için iyi bir yoldur.

      -

      Registry-Strict seçeneği Apache 2.0’da yeni olup - Registry seçeneğinin yaptığını +

      Registry-Strict seçeneği Apache HTTP Sunucusunun 2.0 + sürümünde yeni olup Registry seçeneğinin yaptığını Shell\ExecCGI\Command yolu için yapar. ExecCGI sistem tarafından bilinen bir anahtar olmadığından Windows Siciline elle kaydedilmesi gerekir ve dolayısıyla sisteminiz üzerinde istenmeyen @@ -2793,17 +3991,40 @@ sınırlama getirir.

      top

      SeeRequestTail Yönergesi

      - + - -
      Açıklama:Determine if mod_status displays the first 63 characters -of a request or the last 63, assuming the request itself is greater than -63 chars.
      Açıklama:İsteğin 63 karakterden büyük olduğu varsayımıyla, mod_status'un + ilk 63 karakteri mi yoksa son 63 karakteri mi göstereceğini + belirler.
      Sözdizimi:SeeRequestTail On|Off
      Öntanımlı:SeeRequestTail Off
      Bağlam:sunucu geneli
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Available in Apache httpd 2.2.7 and later.

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      +Uyumluluk:Apache httpd 2.2.7 ve sonrasında kullanılabilmektedir. + + +

      mod_status modülü ExtendedStatus On + ile işleme alınan asıl isteği gösterir. Tarihsel amaçlarla, isteğin + sadece 63 karakteri gösterme amacıyla saklanır. Bu yönerge ilk 63 + karakterin mi (önceki davranış ve öntanımlı durum) yoksa son 63 + karakterin mi saklanacağını belirler. Bu, şüphesiz, isteğin uzunluğu 64 + karakter veya daha fazlaysa uygulanabilirdir.

      + +

      Apache httpd'ye gelen istek GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1 + ise mod_status şunu gösterir:

      + + + + + + + + + + +
      Off (öntanımlı)GET /disk1/storage/apache/htdocs/images/imagestore1/food/apples
      Onorage/apache/htdocs/images/imagestore1/food/apples.jpg HTTP/1.1
      + + +
      top

      ServerAdmin Yönergesi

      @@ -2829,9 +4050,8 @@ of a request or the last 63, assuming the request itself is greater than burada belirtilecek adresin sırf bu işe adanmış bir adres olması daha iyidir. Örnek:

      -

      - ServerAdmin www-admin@falan.filan.dom -

      +
      ServerAdmin www-admin@foo.example.com
      +
      top
      @@ -2850,48 +4070,74 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. belirtebilmeyi sağlar. ServerAlias dosya adı kalıp karakterleri içerebilir.

      -

      - <VirtualHost *:80>
      - ServerName sunucu.mesela.dom
      - ServerAlias sunucu sunucu2.mesela.dom sunucu2
      - ServerAlias *.mesela.dom
      - # ...
      - </VirtualHost> -

      +
      <VirtualHost *:80>
      +  ServerName server.example.com
      +  ServerAlias server server2.example.com server2
      +  ServerAlias *.example.com
      +  UseCanonicalName Off
      +  # ...
      +</VirtualHost>
      + + +

      İsme dayalı sanal konaklardan en iyi eşleşme kümesinde olanlar + yapılandırmada göründükleri sıraya göre işleme sokulur. Joker + kullanımları arasında fark gözetilmeksizin ServerName veya ServerAlias yönergesi eşleşen ilk sanal konak + kullanılır.

      + +

      <VirtualHost> + bölümü içindeki isimlerin sırası (jokersiz) + ServerAlias yönergesindeki gibi ele + alınır.

      +

      Ayrıca bakınız:

      top
      - -
      Açıklama:Sunucunun özdeşleşeceği konak ismi ve port.
      Sözdizimi:ServerName [şema://]tam-nitelenmiş-alan-adı[:port] +
      Sözdizimi:ServerName [şema://]alan-adı|ip-adresi[:port]
      Bağlam:sunucu geneli, sanal konak
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Bu yönerge 2.0 sürümünden itibaren 1.3 sürümündeki -Port yönergesinin işlevselliğini de -üstlenmiştir.

      ServerName yönergesi, sunucunun kendini betimlemekte kullanacağı şema, konak adı ve port değerlerini belirler. - Bu, yönlendirme URL’leri oluşturulurken kullanılır. Örneğin, HTTP - sunucusunun barındırıldığı makinenin ismi falan.filan.dom - olduğu halde makinenin bir de www.filan.dom diye bir de DNS - rumuzu varsa ve HTTP sunucunuzun bu rumuzla kendini özdeşleştirmesini - isterseniz bunu şöyle belirtebilirsiniz:

      +

      -

      - ServerName www.filan.dom:80 -

      +

      isme dayalı sanal + konaklar kullanılırken bir sanal konağı eşsiz bir şekilde betimlemek + için ServerName kullanılır (muhtemelen + ServerAlias ile birlikte).

      + +

      Ek olarak, UseCanonicalName + yönergesine öntanımlı olmayan bir değer atanarak özüne yönlendiren + URL'ler oluştururken de bu yönerge kullanılır.

      + +

      Örneğin, HTTP + sunucusunun barındırıldığı makinenin ismi mail.example.com + olduğu halde makinenin bir de www.example.com diye bir de + DNS rumuzu varsa ve HTTP sunucunuzun bu rumuzla kendini + özdeşleştirmesini isterseniz bunu şöyle belirtebilirsiniz:

      + +
      ServerName www.example.com
      + + +

      ServerName yönergesi sunucu tanımının içinde + herhangi bir yerde görünebilirse de her göründüğü yerde bir öncekini + iptal eder.

      + +

      Bir ServerName ataması yapılmamışsa sunucu + istemciye görünen sunucu ismini anlamak için önce işletim sistemine + sistemin konak adını sorar. Bu başarılı olmazsa sistem üzerinde IP + adresine bir ters DNS sorgusu yapar.

      -

      Bir ServerName ataması yapılmamışsa sunucu IP - adresine atanmış sunucu ismi için bir ters DNS sorgusu yapacaktır. - ServerName yönergesinde bir port belirtilmediği +

      ServerName yönergesinde bir port belirtilmediği takdirde sunucu, isteğin geldiği portu kullanacaktır. Öngörülebilirlik ve güvenilirlik açısından en iyisi ServerName yönergesini kullanarak açıkça bir konak ismi ve port belirtmektir.

      @@ -2915,15 +4161,28 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. UseCanonicalPhysicalPort yönergelerinin açıklamalarına bakınız.

      +
      +

      ServerName yönergesine isim atamadaki bir + başarısızlık, sunucu başlatılırken isim bir IP adresine + çözümlenebileceğinden bir uyarı çıktılanmasına sebep olur. + httpd böyle bir durumda sistemin hostname + komutunu kullanarak saptadığı konak ismini kullanacaktır. Bu konak ismi + hemen hemen daima sizin istediğiniz isim olmayacaktır.

      +

      + httpd: Could not reliably determine the server's fully qualified domain name, using belgeler.yerel for ServerName +

      +

      Çevirisi: Sunucunun tamamen nitelenmiş alan adı gerektiği gibi + saptanamadı, ServerName için belgeler.yerel kullanılıyor

      +

      Ayrıca bakınız:

      @@ -2942,7 +4201,8 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar.

      Ayrıca bakınız:

      top
      @@ -2960,9 +4220,13 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. logs/ gibi alt dizinler içerir. Include, LoadModule gibi diğer yapılandırma yönergelerindeki göreli yollar bu dizine göre ele alınır.

      -

      Örnek

      - ServerRoot /home/httpd -

      +
      ServerRoot "/home/httpd"
      + + +

      ServerRoot için öntanımlı yer configure betiğinin + --prefix seçeneği ile değiştirilebilir ve sunucunun çoğu + üçüncü parti dağıtıcısı öntanımlı yeri yukardakilerden farklı bir yere + ayarlar.

      Ayrıca bakınız:

      @@ -3023,7 +4287,7 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar.
      ServerTokens Full (veya belirtilmezse)
      -
      Sunucu şunu gönderir (örnek): Server: Apache/2.0.41 +
      Sunucu şunu gönderir (örnek): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
      ServerTokens Prod[uctOnly]
      @@ -3036,14 +4300,14 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar.
      ServerTokens Minor
      Sunucu şunu gönderir (örnek): Server: - Apache/2.0
      + Apache/2.4
      ServerTokens Min[imal]
      Sunucu şunu gönderir (örnek): Server: - Apache/2.0.41
      + Apache/2.4.2
      ServerTokens OS
      -
      Sunucu şunu gönderir (örnek): Server: Apache/2.0.41 +
      Sunucu şunu gönderir (örnek): Server: Apache/2.4.2 (Unix)
      @@ -3072,12 +4336,12 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. - + - +
      Açıklama:Eşleşen tüm dosyaların belli bir eylemci tarafından işlenmesine sebep olur.
      Sözdizimi:SetHandler eylemci-ismi|None
      Sözdizimi:SetHandler eylemci-ismi|none|ifade
      Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
      Geçersizleştirme:FileInfo
      Durum:Çekirdek
      Modül:core
      Uyumluluk:Apache 2.0’da core modülüne taşındı.
      Uyumluluk:ifade seçeneği 2.4.19 sürümünde eklendi

      Bir .htaccess dosyasına veya bir <Directory> ya da <Location> bölümüne yerleştirildiğinde, eşleşen tüm dosyaların, ismi eylemci-ismi ile belirtilen eylemci tarafından çözümlenmesine sebep olur. @@ -3086,29 +4350,44 @@ sebep olur. içindeki bir .htaccess dosyasına şöyle bir satır koyabilirsiniz:

      -

      - SetHandler imap-file -

      +
      SetHandler imap-file
      +

      Başka bir örnek: http://localhost/status gibi bir istek yapıldığında sunucunun bir durum bilgisi göstermesi için httpd.conf dosyasına şöyle bir satır koyabilirsiniz:

      -

      - <Location /status>
      - - SetHandler server-status
      -
      - </Location> -

      +
      <Location "/status">
      +  SetHandler server-status
      +</Location>
      + + +

      Bu yönergeyi ayrıca, belli bir dosya uzantısına sahip dosyalara uygun + bir eylemci atamak için de kullanabilirsiniz. örnek:

      + +
      <FilesMatch "\.php$">
      +    SetHandler application/x-httpd-php
      +</FilesMatch>
      + + +

      Dizge değerli ifadeler istek öncesi değişkenleri içerecek şekilde + düzenlenebilir. Buna ismli düzenli ifadelere yapılan geriye başvurular + dahildir:

      + +
      <LocationMatch ^/app/(?<sub>[^/]+)/>
      +     SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080"
      +</LocationMatch>
      -

      Evvelce tanımlanmış bir SetHandler yönergesini + +

      Evvelce tanımlanmış bir SetHandler yönergesini None değeriyle geçersiz hale getirebilirsiniz.

      -

      Bilginize:SetHandler yönergesi, +

      Bilgi

      +

      SetHandler yönergesi, öntanımlı eylemcileri geçersiz kıldığından, index dosyaları ve dizinleri - belirtmek için URL’nin sonuna / getirmek şeklindeki normal davranış - baskılanır.

      + belirtmek için URL’nin sonuna bölü çizgisi (/) getirmek şeklindeki + normal davranış baskılanır.

      +

      Ayrıca bakınız:

        @@ -3158,13 +4437,10 @@ belirler.

        Örneğin, aşağıdaki yapılandırma ile /www/data/ dizinindeki bütün dosyalar sunucu taraflı içerik kapsamında ele alınacaktır.

        -

        - <Directory /www/data/>
        - - SetOutputFilter INCLUDES
        -
        - </Directory> -

        +
        <Directory "/www/data/">
        +  SetOutputFilter INCLUDES
        +</Directory>
        +

        Birden fazla süzgeç belirtilmek istenirse birbirlerinden noktalı virgüllerle ayrılmalı ve çıktıyı işleyecekleri sıraya uygun olarak @@ -3186,12 +4462,16 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. Durum:Çekirdek Modül:core -

        TimeOut yönergesi Apache’nin aşağıdaki durumlarda - G/Ç için bekleyeceği süreyi belirler:

        +

        TimeOut yönergesi Apache httpd’nin aşağıdaki + durumlarda G/Ç için bekleyeceği süreyi belirler:

        -
          -
        1. Veriyi istemciden okurken, okuma tamponu boş olduğu takdirde bir TCP - paketinin gelmesini bekleyeceği süre.
        2. +
            +
          • Veriyi istemciden okurken, okuma tamponu boş olduğu takdirde bir + TCP paketinin gelmesini bekleyeceği süre.

            +

            Yeni bir bağlantıda ilk veri için, sunucuya yeni bağlantıyı aktaran + bir AcceptFilter yönergesi ile + ilgili yapılandırma ele alınıncaya kadar bu yönerge etkilenmez.

            +
          • Veriyi istemciye yazarken, gönderme tamponu dolu olduğu takdirde bir paket alındısı için beklenecek süre.
          • @@ -3204,7 +4484,7 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.
          • mod_proxy modülünde, ProxyTimeout yönergesi yapılandırılmamışsa öntanımlı zaman aşımı değeri.
          • -
        +
      @@ -3215,10 +4495,9 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. Sözdizimi:TraceEnable [on|off|extended] Öntanımlı:TraceEnable on -Bağlam:sunucu geneli +Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache 1.3.34, 2.0.55 ve sonrasında mevcuttur.

      Bu yönerge çekirdek ve vekil (mod_proxy) sunucuların her ikisi için öntanımlı TRACE davranışını değiştirir. @@ -3231,22 +4510,39 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.

      TraceEnable extended ile sadece sınama ve tanı koyma amaçlarına yönelik olarak istek gövdelerine izin verilir. Asıl sunucu - istek gövdesini 64k ile sınırlar (Transfer-Encoding: chunked - kullanılmışsa bölüm başlıkları için 8k daha). Asıl sunucu yanıt + istek gövdesini 64kB ile sınırlar (Transfer-Encoding: chunked + kullanılmışsa bölüm başlıkları için 8kB daha). Asıl sunucu yanıt gövdesinde tüm başlıkları ve bölüm başlıklarının tamamını yansıtacaktır. - Vekil sunucuda ise istek gövdesi için 64k’lık sınır yoktur.

      + Vekil sunucuda ise istek gövdesi için 64kB’lık sınır yoktur.

      + +

      Bilgi

      +

      Aksine iddialara rağmen, TRACE yöntemini etkinleştirmek + Apache httpd'de bir güvenlik açığı değildir. TRACE yöntemi + HTTP/1.1 belirtiminde tanımlanmış olup desteklenmesi umulmuştur.

      +
      +
      top

      UnDefine Yönergesi

      - - + + -
      Açıklama:Undefine the existence of a variable
      Sözdizimi:UnDefine parameter-name
      Açıklama:Bir değişkeni tanımsız yapar
      Sözdizimi:UnDefine değişken-ismi
      Bağlam:sunucu geneli
      Durum:Çekirdek
      Modül:core

      Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

      + +

      Define yönergesinde veya + httpd'nin -D seçeneğiyle belirtileni + geri alır.

      +

      Bu yönerge başlatma betiklerinde -D seçeneğinin argümanını + değiştirmek gerekmeksizin <IfDefine> bölümlerinin kullanımını değiştirmek için + kullanılabilir.

      +

      Bu yönerge sanal konak bağlamında desteklenirken, kapsanan sanal + konaklar haricinde, değişiklikleri kendisinden sonraki tüm yapılandırma + yönergelerinde görünür kılar.

      + +
      top

      UseCanonicalName Yönergesi

      @@ -3258,15 +4554,16 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.
      Durum:Çekirdek
      Modül:core
      -

      Apache‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar aynı - sunucuya yapıldığı bir URL türü) oluşturması gerekir. - UseCanonicalName On ile Apache, sunucu için meşru ismi ve - portu oluşturmak için ServerName +

      Apache httpd‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar + aynı sunucuya yapıldığı bir URL türü) oluşturması gerekir. + UseCanonicalName On ile Apache httpd, sunucu için meşru + ismi ve portu oluşturmak için + ServerName yönergesinde belirtilen ismi ve portu kullanır. Bu isim CGI'lerde SERVER_NAME ve SERVER_PORT değerlerinde ve tüm özüne yönelik URL’lerde kullanılır.

      -

      UseCanonicalName Off ile Apache, özüne yönelik URL’leri +

      UseCanonicalName Off ile Apache httpd, özüne yönelik URL’leri varsa istemci tarafından sağlanan konak ismini ve portu kullanarak oluşturur; bunlar istemci tarafından sağlanmamışsa yukarıda tanımlanan işleme başvurulur. Bu değerler, isme @@ -3276,21 +4573,21 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. isim ve portla oluşturulur.

      Bir örnek olarak, iç ağdaki istemcilerin sunucuya www gibi - bir kısa isim kullanarak bağlandığı durumu ele alırsak daha yararlı olur. - Kullanıcılar bir kısa isim ve bir dizin isminden oluşan ve bir / ile - sonlandırılmamış http://www/splat şeklinde bir istek - yaparlarsa, Apache onları http://www.mesela.dom/splat/ - adresine yönlendirecektir. Eğer kimlik doğrulama da etkinse bu - kullanıcının iki defa kimlik doğrulamasına sokulmasına sebep olacaktır - (bir kere www için bir kere de www.mesela.dom - için; daha ayrıntılı bilgi için SSS’y - e bakınız). Fakat UseCanonicalName Off olsaydı - Apache isteği http://www/splat/ adresine yönlendirecekti.

      + bir kısa isim kullanarak bağlandığı durumu ele alırsak daha yararlı + olur. Kullanıcılar bir kısa isim ve bir dizin isminden oluşan ve bir + / ile sonlandırılmamış http://www/splat şeklinde bir + istek yaparlarsa, Apache httpd onları + http://www.example.com/splat/ adresine yönlendirecektir. + Eğer kimlik doğrulama da etkinse bu kullanıcının iki defa kimlik + doğrulamasına sokulmasına sebep olacaktır (bir kere www + için bir kere de www.example.com için; daha fazla bilgi için SSS’ye bakınız). Fakat UseCanonicalName Off + olsaydı Apache httpd isteği http://www/splat/ adresine + yönlendirecekti.

      UseCanonicalName DNS diye üçüncü bir seçenek daha vardır ve istek yaparken Host: başlığını kullanmayan eski istemcileri desteklemek amacıyla IP’ye dayalı sanal konaklarla kullanmak için - tasarlanmıştır. Bu seçenek etkin olduğunda Apache, istemciyi özüne + tasarlanmıştır. Bu seçenek etkin olduğunda Apache httpd, istemciyi özüne yönelik URL’lerle doğru yere bağlamak için sunucu IP adresi üzerinde bir ters DNS sorgusu yapar.

      @@ -3321,30 +4618,40 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. Durum:Çekirdek Modül:core -

      Apache‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar aynı - sunucuya yapıldığı bir URL türü) oluşturması gerekir. Apache UseCanonicalName yönergesine bağlı olarak - sunucu için meşru portu oluştururken UseCanonicalPhysicalPort - On ile olası port olarak istek tarafından kullanılmakta olan - fiziksel portu kullanacaktır. UseCanonicalPhysicalPort Off - olduğunda ise geçerli bir port numarası oluşturmak için asıl fiziksel - port yerine yapılandırma bilgisi kullanılır.

      +

      Apache httpd‘nin çoğu durumda özüne yönelik URL‘ler (isteğin tekrar + aynı sunucuya yapıldığı bir URL türü) oluşturması gerekir. Apache httpd + UseCanonicalName yönergesine bağlı + olarak sunucu için meşru portu oluştururken + UseCanonicalPhysicalPort On ile olası port olarak istek + tarafından kullanılmakta olan fiziksel portu kullanacaktır. + UseCanonicalPhysicalPort Off olduğunda ise geçerli bir port + numarası oluşturmak için asıl fiziksel port yerine yapılandırma bilgisi + kullanılır.

      Ek Bilgi

      Fiziksel port kullanımı etkin olduğunda işlemler şu sırayla - yürütülür:

      - UseCanonicalName On

      -
        -
      • Servername yönergesinde belirtilen port
      • + yürütülür:

        +
        +
        UseCanonicalName On
        +
        +
          +
        1. Servername ile sağlanan port +
        2. Fiziksel port
        3. Öntanımlı port
        4. -
      - UseCanonicalName Off | DNS -
        + + +
        UseCanonicalName Off | DNS
        +
        +
        1. Host: başlığından çözümlenen port
        2. Fiziksel port
        3. -
        4. Servername yönergesinde belirtilen port
        5. +
        6. Servername yönergesinde + belirtilen port
        7. Öntanımlı port
        8. -
      + + +

      UseCanonicalPhysicalPort Off olduğunda işlem sırasında fiziksel port adımları atlanır.

      @@ -3374,47 +4681,44 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. uygulanacak yönergeleri sarmalamakta kullanılırlar. Bir sanal konak kapsamında belirtilebilecek her yönerge kullanılabilir. Sunucu belli bir sanal konak üzerindeki bir belge için bir istek aldığında <VirtualHost> bölümünde bulunan yapılandırma - yönergelerini kullanır. adres şunlardan biri olabilir:

      + yönergelerini kullanır. adres şunlardan biri olabilir, + istemlik olarak ikinokta imi ve bir port numarası (veya *) + eklenebilir:

      • Sanal konağın IP adresi.
      • -
      • Sanal konağın IP adresi için tam nitelenmiş alan adı (önerilmez).
      • +
      • Sanal konağın IP adresi için tam nitelenmiş alan adı (önerilmez). +
      • -
      • NameVirtualHost * ile birlikte tüm IP adresleri ile - eşleşmek üzere * karakteri.
      • +
      • Tüm IP adresleri ile eşleşmek üzere * karakteri.
      • -
      • Sadece IP sanal konaklarında kullanmak için eşleşmeyen IP adreslerini - yakalamak amacıyla _default_ dizgesi.
      • +
      • * için bir takma ad olarak _default_ + dizgesi.
      -

      Örnek

      - <VirtualHost 10.1.2.3>
      - - ServerAdmin webmaster@konak.mesela.dom
      - DocumentRoot /www/docs/konak.mesela.dom
      - ServerName konak.mesela.dom
      - ErrorLog logs/konak.mesela.dom-error_log
      - TransferLog logs/konak.mesela.dom-access_log
      -
      - </VirtualHost> -

      +
      <VirtualHost 10.1.2.3:80>
      +  ServerAdmin webmaster@host.example.com
      +  DocumentRoot "/www/docs/host.example.com"
      +  ServerName host.example.com
      +  ErrorLog "logs/host.example.com-error_log"
      +  TransferLog "logs/host.example.com-access_log"
      +</VirtualHost>
      +

      İsteğe bağlı port numarasını belirtmeyi mümkün kılmak için IPv6 - adresleri köşeli ayraç içine alınır. IPv6 adresi kullanılan bir örnek:

      + adresleri köşeli ayraç içine alınır. IPv6 adresi kullanılan bir + örnek:

      + +
      <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
      +  ServerAdmin webmaster@host.example.com
      +  DocumentRoot "/www/docs/host.example.com"
      +  ServerName host.example.com
      +  ErrorLog "logs/host.example.com-error_log"
      +  TransferLog "logs/host.example.com-access_log"
      +</VirtualHost>
      -

      - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]>
      - - ServerAdmin webmaster@konak.mesela.dom
      - DocumentRoot /www/docs/konak.mesela.dom
      - ServerName konak.mesela.dom
      - ErrorLog logs/konak.mesela.dom-error_log
      - TransferLog logs/konak.mesela.dom-access_log
      -
      - </VirtualHost> -

      Her sanal konağın ya farklı bir IP adresi ve port ile ya da farklı bir konak ismiyle eşleşmesi gerekir. Birinci durumda sunucu makinesinin çok @@ -3424,30 +4728,27 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. sağlanabilir.)

      Ek Bilgi

      -

      <VirtualHost> kullanımı Apache’nin - dinleyeceği adresler üzerinde belirleyici değildir. Apache’nin doğru - adresi dinlediğinden emin olmak için Listen kullanmanız gerekebilir.

      +

      <VirtualHost> kullanımı Apache + httpd’nin dinleyeceği adresler üzerinde belirleyici değildir. Apache + httpd’nin doğru adresi dinlediğinden emin olmak için Listen kullanmanız gerekebilir.

      -

      IP’ye dayalı sanal konakları kullanıyorsanız, diğer sanal konaklarda - açıkça belirtilmemiş bir IP adresiyle eşleşecek sanal konağı - _default_ özel ismiyle belirtebilirsiniz. "Ana" sunucu - yapılandırmasında _default_ diye bir sanal konağın - bulunmaması halinde, hiçbir IP adresi eşleşmesi bulunamadığı takdirde - <VirtualHost> bölümleri dışında - kalan tüm yapılandırmalar bu amaca yönelik olarak kullanılır.

      - -

      Eşleşilecek portu değiştirmek için bir :port - belirtebilirsiniz. Port bu şekilde değiştirilmediği takdirde ana - sunucunun son Listen - yönergesinde belirtilen port kullanılır. Bir adresteki tüm portlarla - eşleşileceğini belirtmek için :* kullanabilirsiniz. (Bu, - _default_ kullanıldığı takdirde önerilir.)

      -

      Her <VirtualHost> bloku içinde bir ServerName yönergesi mutlaka - olmalıdır. Yokluğu halinde "ana" sunucu yapılandırmasındaki ServerName miras alınacaktır (yani, sanal konak - belirtmek için boşuna uğraşmış olursunuz).

      + olmalıdır. Yokluğu halinde "ana" sunucu yapılandırmasındaki ServerName miras alınacaktır.

      + +

      Bir istek alındığında, sunucu isteği, sadece yerel IP adresi ve port + çiftine dayalı en iyi eşleşen ilk <VirtualHost> bölümüne eşler. Joker kullanmayanlar daha + yüksek önceliğe sahiptir. IP ve port çiftine dayalı bir eşleşme + bulunamazsa istek için ana sunucu yapılandırması kullanılır.

      + +

      En iyi eşleşen IP adresi ve port çiftini birden fazla sanal konak + kullanıyorsa sunucu bu sanal konaklar (liste) arasından istenen konak + ismiyle en iyi eşleşeni seçer. Eşleşen hiçbir isme dayalı sanal konak + yoksa listedeki IP adresi ile eşleşen ilk sanal konak kullanılır. Bunun + sonucu olarak, belirtilen IP adresi ve port çifti için listedeki ilk + sanal konak, bu IP adresi ve port çifti için öntanımlı sanal + konaktır.

      Güvenlik

      Günlük dosyalarının sunucuyu çalıştıran kullanıcıdan başka herkes @@ -3458,12 +4759,14 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.

      Ayrıca bakınız:

      @@ -3476,7 +4779,28 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.  fr  |  ja  |  tr 

      -
      +
      top

      Yorum

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml index a9e9866feb2..471cb0ad893 100644 --- a/docs/manual/mod/core.xml +++ b/docs/manual/mod/core.xml @@ -32,12 +32,10 @@ available Configures optimizations for a Protocol's Listener Sockets AcceptFilter protocol accept_filter server config -Available in Apache httpd 2.1.5 and later. -On Windows from Apache httpd 2.3.3 and later.

      This directive enables operating system specific optimizations for a - listening socket by the Protocoltype. + listening socket by the Protocol type. The basic premise is for the kernel to not send a socket to the server process until either data is received or an entire HTTP Request is buffered. Only @@ -48,57 +46,54 @@ On Windows from Apache httpd 2.3.3 and later.

      Using none for an argument will disable any accept filters for that protocol. This is useful for protocols that require a server send data first, such as ftp: or nntp:

      - AcceptFilter nntp none + +AcceptFilter nntp none +

      The default protocol names are https for port 443 - and http for all other ports. To specify another protocol - is being used with a listening port, add the protocol + and http for all other ports. To specify that another + protocol is being used with a listening port, add the protocol argument to the Listen directive.

      The default values on FreeBSD are:

      - - AcceptFilter http httpready
      - AcceptFilter https dataready -
      + +AcceptFilter http httpready +AcceptFilter https dataready +

      The httpready accept filter buffers entire HTTP requests at the kernel level. Once an entire request is received, the kernel then sends it to the server. See the accf_http(9) man page for more details. Since HTTPS requests are - encrypted only the + encrypted, only the accf_data(9) filter is used.

      The default values on Linux are:

      - - AcceptFilter http data
      - AcceptFilter https data -
      + +AcceptFilter http data +AcceptFilter https data +

      Linux's TCP_DEFER_ACCEPT does not support buffering http requests. Any value besides none will enable TCP_DEFER_ACCEPT on that listener. For more details see the Linux - + tcp(7) man page.

      The default values on Windows are:

      - - AcceptFilter http data
      - AcceptFilter https data -
      + +AcceptFilter http connect +AcceptFilter https connect +

      Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx() - API, and does not support http protocol buffering. There are two values - which utilize the Windows AcceptEx() API and will recycle network - sockets between connections. data waits until data has - been transmitted as documented above, and the initial data buffer and - network endpoint addresses are all retrieved from the single AcceptEx() - invocation. connect will use the AcceptEx() API, also - retrieve the network endpoint addresses, but like none - the connect option does not wait for the initial data - transmission.

      + API, and does not support http protocol buffering. connect + will use the AcceptEx() API, also retrieve the network endpoint + addresses, but like none the connect option + does not wait for the initial data transmission.

      On Windows, none uses accept() rather than AcceptEx() and will not recycle sockets between connections. This is useful for @@ -106,8 +101,24 @@ On Windows from Apache httpd 2.3.3 and later. network providers such as vpn drivers, or spam, virus or spyware filters.

      + + The <code>data</code> AcceptFilter (Windows) + +

      For versions 2.4.23 and prior, the Windows data accept + filter waited until data had been transmitted and the initial data + buffer and network endpoint addresses had been retrieved from the + single AcceptEx() invocation. This implementation was subject to a + denial of service attack and has been disabled.

      + +

      Current releases of httpd default to the connect filter + on Windows, and will fall back to connect if + data is specified. Users of prior releases are encouraged + to add an explicit setting of connect for their + AcceptFilter, as shown above.

      +
      +
      -Protocol +Protocol @@ -119,7 +130,6 @@ On Windows from Apache httpd 2.3.3 and later. virtual hostdirectory .htaccess FileInfo -Available in Apache httpd 2.0.30 and later @@ -170,15 +180,13 @@ On Windows from Apache httpd 2.3.3 and later. the request, so you can use the following configuration to enable such a script:

      - - <Files "mypaths.shtml">
      - - Options +Includes
      - SetOutputFilter INCLUDES
      - AcceptPathInfo On
      -
      - </Files> -
      + +<Files "mypaths.shtml"> + Options +Includes + SetOutputFilter INCLUDES + AcceptPathInfo On +</Files> +
      @@ -192,29 +200,27 @@ On Windows from Apache httpd 2.3.3 and later. -

      While processing a request the server looks for +

      While processing a request, the server looks for the first existing configuration file from this list of names in every directory of the path to the document, if distributed configuration files are enabled for that directory. For example:

      - - AccessFileName .acl - + +AccessFileName .acl + -

      before returning the document +

      Before returning the document /usr/local/web/index.html, the server will read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl - for directives, unless they have been disabled with

      + for directives unless they have been disabled with:

      - - <Directory />
      - - AllowOverride None
      -
      - </Directory> -
      + +<Directory "/"> + AllowOverride None +</Directory> +
      AllowOverride Configuration Files @@ -247,9 +253,9 @@ content-type is text/plain or text/html charset values for use in Internet media types (MIME types). For example:

      - - AddDefaultCharset utf-8 - + +AddDefaultCharset utf-8 +

      AddDefaultCharset should only be used when all of the text resources to which it applies are known to be in that @@ -273,13 +279,13 @@ be passed through AllowEncodedSlashes Off server configvirtual host -Available in Apache httpd 2.0.46 and later. + NoDecode option available in 2.3.12 and later.

      The AllowEncodedSlashes directive allows URLs which contain encoded path separators (%2F for / - and additionally %5C for \ on according systems) + and additionally %5C for \ on accordant systems) to be used in the path info.

      With the default value, Off, such URLs are refused @@ -314,7 +320,7 @@ NoDecode option available in 2.3.12 and later.

      When the server finds an .htaccess file (as - specified by AccessFileName) + specified by AccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.

      @@ -329,7 +335,7 @@ NoDecode option available in 2.3.12 and later.

      When this directive is set to None and AllowOverrideList is set to - None .htaccess files are + None, .htaccess files are completely ignored. In this case, the server will not even attempt to read .htaccess files in the filesystem.

      @@ -347,7 +353,7 @@ NoDecode option available in 2.3.12 and later.
      Allow use of the authorization directives (AuthDBMGroupFile, + module="mod_authz_dbm">AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, @@ -377,12 +383,17 @@ NoDecode option available in 2.3.12 and later. module="mod_usertrack">CookieStyle, CookieTracking, CookieName), - mod_rewrite directives mod_rewrite directives (RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule) and + module="mod_rewrite">RewriteRule), + mod_alias directives (Redirect, RedirectTemp, RedirectPermanent, RedirectMatch), and Action from mod_actions.
      @@ -397,8 +408,8 @@ NoDecode option available in 2.3.12 and later. module="mod_autoindex">AddIconByEncoding, AddIconByType, DefaultIcon, DirectoryIndex, FancyIndexing, DirectoryIndex, FancyIndexing, HeaderName, IndexIgnore, IndexOptions,
      Allow use of the directives controlling host access (Allow, Deny and Order).
      + module="mod_access_compat">Allow
      , Deny and Order). + +
      Nonfatal=[Override|Unknown|All]
      + +
      + Allow use of AllowOverride option to treat syntax errors in + .htaccess as nonfatal. Instead of causing an Internal Server + Error, disallowed or unrecognised directives will be ignored + and a warning logged: +
        +
      • Nonfatal=Override treats directives + forbidden by AllowOverride as nonfatal.
      • +
      • Nonfatal=Unknown treats unknown directives + as nonfatal. This covers typos and directives implemented + by a module that's not present.
      • +
      • Nonfatal=All treats both the above as nonfatal.
      • +
      +

      Note that a syntax error in a valid directive will still cause + an internal server error.

      + Security + Nonfatal errors may have security implications for .htaccess users. + For example, if AllowOverride disallows AuthConfig, users' + configuration designed to restrict access to a site will be disabled. + +
      Options[=Option,...]
      @@ -419,8 +454,8 @@ NoDecode option available in 2.3.12 and later. Allow use of the directives controlling specific directory features (Options and XBitHack). - An equal sign may be given followed by a comma (but no spaces) - separated lists of options that may be set using the Options command. Implicit disabling of Options @@ -431,22 +466,26 @@ NoDecode option available in 2.3.12 and later. syntax. In other words, this mechanism cannot force a specific option to remain set while allowing any others to be set.

      + + + AllowOverride Options=Indexes,MultiViews +

      Example:

      - - AllowOverride AuthConfig Indexes - + +AllowOverride AuthConfig Indexes + -

      In the example above all directives that are neither in the group +

      In the example above, all directives that are neither in the group AuthConfig nor Indexes cause an internal server error.

      For security and performance reasons, do not set AllowOverride to anything other than None - in your <Directory /> block. Instead, find (or + in your <Directory "/"> block. Instead, find (or create) the <Directory> block that refers to the directory where you're actually planning to place a .htaccess file.

      @@ -469,7 +508,7 @@ NoDecode option available in 2.3.12 and later.

      When the server finds an .htaccess file (as - specified by AccessFileName) + specified by AccessFileName), it needs to know which directives declared in that file can override earlier configuration directives.

      @@ -490,26 +529,26 @@ NoDecode option available in 2.3.12 and later.

      Example:

      - - AllowOverride None
      - AllowOverrideList Redirect RedirectMatch -
      + +AllowOverride None +AllowOverrideList Redirect RedirectMatch + -

      In the example above only the Redirect and +

      In the example above, only the Redirect and RedirectMatch directives are allowed. All others will cause an internal server error.

      Example:

      - - AllowOverride AuthConfig
      - AllowOverrideList CookieTracking CookieName -
      + +AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieName + -

      In the example above AllowOverride +

      In the example above, AllowOverride grants permission to the AuthConfig directive grouping and AllowOverrideList grants - permission to only two directves from the FileInfo directive + permission to only two directives from the FileInfo directive grouping. All others will cause an internal server error.

      @@ -538,6 +577,69 @@ scripts + +CGIPassAuth +Enables passing HTTP authorization headers to scripts as CGI +variables +CGIPassAuth On|Off +CGIPassAuth Off +directory.htaccess + +AuthConfig +Available in Apache HTTP Server 2.4.13 and later + + +

      CGIPassAuth allows scripts access to HTTP + authorization headers such as Authorization, which is + required for scripts that implement HTTP Basic authentication. + Normally these HTTP headers are hidden from scripts. This is to disallow + scripts from seeing user ids and passwords used to access the server when + HTTP Basic authentication is enabled in the web server. This directive + should be used when scripts are allowed to implement HTTP Basic + authentication.

      + +

      This directive can be used instead of the compile-time setting + SECURITY_HOLE_PASS_AUTHORIZATION which has been available + in previous versions of Apache HTTP Server.

      + +

      The setting is respected by any modules which use + ap_add_common_vars(), such as mod_cgi, + mod_cgid, mod_proxy_fcgi, + mod_proxy_scgi, and so on. Notably, it affects + modules which don't handle the request in the usual sense but + still use this API; examples of this are mod_include + and mod_ext_filter. Third-party modules that don't + use ap_add_common_vars() may choose to respect the setting + as well.

      +
      +
      + + +CGIVar +Controls how some CGI variables are set +CGIVar variable rule +directory.htaccess + +FileInfo +Available in Apache HTTP Server 2.4.21 and later + + +

      This directive controls how some CGI variables are set.

      + +

      REQUEST_URI rules:

      +
      +
      original-uri (default)
      +
      The value is taken from the original request line, and will not + reflect internal redirects or subrequests which change the requested + resource.
      +
      current-uri
      +
      The value reflects the resource currently being processed, + which may be different than the original request from the client + due to internal redirects or subrequests.
      +
      +
      +
      + ContentDigest Enables the generation of Content-MD5 HTTP Response @@ -580,6 +682,39 @@ headers + +DefaultRuntimeDir +Base directory for the server run-time files +DefaultRuntimeDir directory-path +DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/) +server config +Available in Apache 2.4.2 and later + + +

      The DefaultRuntimeDir directive sets the + directory in which the server will create various run-time files + (shared memory, locks, etc.). If set as a relative path, the full path + will be relative to ServerRoot.

      + +

      Example

      + +DefaultRuntimeDir scratch/ + + +

      The default location of DefaultRuntimeDir may be + modified by changing the DEFAULT_REL_RUNTIMEDIR #define + at build time.

      + +

      Note: ServerRoot should be specified before this + directive is used. Otherwise, the default value of ServerRoot + would be used to set the base directory.

      + +
      +the + security tips for information on how to properly set + permissions on the ServerRoot +
      + DefaultType This directive has no effect other than to emit warnings @@ -600,9 +735,9 @@ which no other media type configuration could be found. of configuration files, it may be specified with the value none, meaning no default media type. For example:

      - - DefaultType None - + +DefaultType None +

      DefaultType None is only available in httpd-2.2.7 and later.

      @@ -637,18 +772,27 @@ which no other media type configuration could be found. the ${VAR} syntax. The variable is always globally defined and not limited to the scope of the surrounding config section.

      - - <IfDefine TEST>
      -   Define servername test.example.com
      - </IfDefine>
      - <IfDefine !TEST>
      -   Define servername www.example.com
      -   Define SSL
      - </IfDefine>
      -
      + +<IfDefine TEST> + Define servername test.example.com +</IfDefine> +<IfDefine !TEST> + Define servername www.example.com + Define SSL +</IfDefine> + +DocumentRoot "/var/www/${servername}/htdocs" +

      Variable names may not contain colon ":" characters, to avoid clashes with RewriteMap's syntax.

      + +

      While this directive is supported in virtual host and directory context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing configuration section (matching or not). + Support for the other configuration sections was erroneously permitted by the initial + implementation of this directive and is only preserved (with unintuitive + results) to maintain backward compatibility.

      @@ -673,17 +817,19 @@ named file-system directory, sub-directories, and their contents. any single character, and * matches any sequences of characters. You may also use [] character ranges. None of the wildcards match a `/' character, so <Directory - /*/public_html> will not match + "/*/public_html">
      will not match /home/user/public_html, but <Directory - /home/*/public_html> will match. Example:

      + "/home/*/public_html"> will match. Example:

      - - <Directory /usr/local/httpd/htdocs>
      - - Options Indexes FollowSymLinks
      -
      - </Directory> -
      + +<Directory "/usr/local/httpd/htdocs"> + Options Indexes FollowSymLinks +</Directory> + + +

      Directory paths may be quoted, if you like, however, it + must be quoted if the path contains spaces. This is because a + space would otherwise indicate the end of an argument.

      Be careful with the directory-path arguments: @@ -698,9 +844,11 @@ named file-system directory, sub-directories, and their contents. expressions can also be used, with the addition of the ~ character. For example:

      - - <Directory ~ "^/www/.*/[0-9]{3}"> - + +<Directory ~ "^/www/[0-9]{3}"> + +</Directory> +

      would match directories in /www/ that consisted of three numbers.

      @@ -713,19 +861,15 @@ named file-system directory, sub-directories, and their contents. href="#accessfilename">.htaccess files. For example, with

      - - <Directory />
      - - AllowOverride None
      -
      - </Directory>
      -
      - <Directory /home>
      - - AllowOverride FileInfo
      -
      - </Directory> -
      + +<Directory "/"> + AllowOverride None +</Directory> + +<Directory "/home"> + AllowOverride FileInfo +</Directory> +

      for access to the document /home/web/dir/doc.html the steps are:

      @@ -747,13 +891,11 @@ named file-system directory, sub-directories, and their contents. expressions are tested in the order they appeared in the configuration file. For example, with

      - - <Directory ~ abc$>
      - - # ... directives here ...
      -
      - </Directory> -
      + +<Directory ~ "abc$"> + # ... directives here ... +</Directory> +

      the regular expression section won't be considered until after all normal Directorys and @@ -763,18 +905,16 @@ named file-system directory, sub-directories, and their contents. be applied.

      Note that the default access for - <Directory /> is to permit all access. + <Directory "/"> is to permit all access. This means that Apache httpd will serve any file mapped from an URL. It is recommended that you change this with a block such as

      - - <Directory />
      - - Require all denied
      -
      - </Directory> -
      + +<Directory "/"> + Require all denied +</Directory> +

      and then override this for directories you want accessible. See the regular expression. For example:

      - - <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> - + +<DirectoryMatch "^/www/(.+/)?[0-9]{3}/"> + # ... +</DirectoryMatch> + -

      would match directories in /www/ that consisted of three - numbers.

      +

      matches directories in /www/ (or any subdirectory thereof) + that consist of three numbers.

      Compatability Prior to 2.3.9, this directive implicitly applied to sub-directories @@ -830,6 +972,19 @@ the contents of file-system directories matching a regular expression. + +

      From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of paths to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

      + + +<DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</DirectoryMatch> + Directory for a description of how regular expressions are mixed in with normal @@ -845,7 +1000,7 @@ sections are combined when a request is received Directory that forms the main document tree visible from the web DocumentRoot directory-path -DocumentRoot /usr/local/apache/htdocs +DocumentRoot "/usr/local/apache/htdocs" server configvirtual host @@ -856,9 +1011,9 @@ from the web path from the requested URL to the document root to make the path to the document. Example:

      - - DocumentRoot /usr/web - + +DocumentRoot "/usr/web" +

      then an access to http://my.example.com/index.html refers to @@ -893,14 +1048,14 @@ satisfied by a request at runtime in the same scope has not been applied. For example: In

      - - <If "-z req('Host')">
      - ...
      - </If>
      - <Else>
      - ...
      - </Else>
      -
      + +<If "-z req('Host')"> + # ... +</If> +<Else> + # ... +</Else> +

      The If would match HTTP/1.0 requests without a Host: header and the @@ -938,17 +1093,17 @@ satisfied ElseIf section in the same scope has not been applied. For example: In

      - - <If "-R '10.1.0.0/16'">
      - ...
      - </If>
      - <ElseIf "-R '10.0.0.0/8'">
      - ...
      - </ElseIf>
      - <Else>
      - ...
      - </Else>
      -
      + +<If "-R '10.1.0.0/16'"> + #... +</If> +<ElseIf "-R '10.0.0.0/8'"> + #... +</ElseIf> +<Else> + #... +</Else> +

      The ElseIf would match if the remote address of a request belongs to the subnet 10.0.0.0/8 but @@ -1003,20 +1158,18 @@ for a complete reference and more examples.

      For server configurations that are vulnerable to these problems, you should disable memory-mapping of delivered files by specifying:

      - - EnableMMAP Off - + +EnableMMAP Off +

      For NFS mounted files, this feature may be disabled explicitly for the offending files by specifying:

      - - <Directory "/path-to-nfs-files"> - - EnableMMAP Off - - </Directory> - + +<Directory "/path-to-nfs-files"> + EnableMMAP Off +</Directory> + @@ -1029,7 +1182,7 @@ for a complete reference and more examples. directory.htaccess FileInfo -Available in version 2.0.44 and later. Default changed to Off in +Default changed to Off in version 2.3.9. @@ -1063,20 +1216,18 @@ version 2.3.9.

      For server configurations that are not vulnerable to these problems, you may enable this feature by specifying:

      - - EnableSendfile On - + +EnableSendfile On +

      For network mounted files, this feature may be disabled explicitly for the offending files by specifying:

      - - <Directory "/path-to-nfs-files"> - - EnableSendfile Off - - </Directory> - + +<Directory "/path-to-nfs-files"> + EnableSendfile Off +</Directory> +

      Please note that the per-directory and .htaccess configuration of EnableSendfile is not supported by mod_cache_disk. @@ -1086,6 +1237,82 @@ version 2.3.9. + +HttpProtocolOptions +Modify restrictions on HTTP Request Messages +HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] +HttpProtocolOptions Strict LenientMethods Allow0.9 +server config +virtual host +2.2.32 or 2.4.24 and later + + +

      This directive changes the rules applied to the HTTP Request Line + (RFC 7230 §3.1.1) and the HTTP Request Header Fields + (RFC 7230 §3.2), which are now applied by default or using + the Strict option. Due to legacy modules, applications or + custom user-agents which must be deperecated the Unsafe + option has been added to revert to the legacy behaviors. These rules + are applied prior to request processing, so must be configured at the + global or default (first) matching virtual host section, by IP/port + interface (and not by name) to be honored.

      + +

      Prior to the introduction of this directive, the Apache HTTP Server + request message parsers were tolerant of a number of forms of input + which did not conform to the protocol. + RFC 7230 §9.4 Request Splitting and + §9.5 Response Smuggling call out only two of the potential + risks of accepting non-conformant request messages, while + RFC 7230 §3.5 "Message Parsing Robustness" identify the + risks of accepting obscure whitespace and request message formatting. + As of the introduction of this directive, all grammer rules of the + specification are enforced in the default Strict operating + mode, and the strict whitespace suggested by section 3.5 is enforced + and cannot be relaxed.

      + +

      Users are strongly cautioned against toggling the Unsafe + mode of operation, particularly on outward-facing, publicly accessible + server deployments. If an interface is required for faulty monitoring + or other custom service consumers running on an intranet, users should + toggle the Unsafe option only on a specific virtual host configured + to service their internal private network.

      + +

      Reviewing the messages logged to the ErrorLog, + configured with LogLevel debug level, + can help identify such faulty requests along with their origin. + Users should pay particular attention to the 400 responses in the access + log for invalid requests which were unexpectedly rejected.

      + +

      RFC 7231 §4.1 "Request Methods" "Overview" requires that + origin servers shall respond with an error when an unsupported method + is encountered in the request line. This already happens when the + LenientMethods option is used, but administrators may wish + to toggle the RegisteredMethods option and register any + non-standard methods using the RegisterHttpMethod + directive, particularly if the Unsafe option has been toggled. + The RegisteredMethods option should not + be toggled for forward proxy hosts, as the methods supported by the + origin servers are unknown to the proxy server.

      + +

      RFC 2616 §19.6 "Compatibility With Previous Versions" had + encouraged HTTP servers to support legacy HTTP/0.9 requests. RFC 7230 + superceeds this with "The expectation to support HTTP/0.9 requests has + been removed" and offers additional comments in + RFC 7230 Appendix A. The Require1.0 option allows + the user to remove support of the default Allow0.9 option's + behavior.

      + + + Error Abort configuration parsing with a custom error message @@ -1101,24 +1328,25 @@ version 2.3.9. configuration parsing. The typical use is for reporting required modules which are missing from the configuration.

      - Example - # ensure that mod_include is loaded
      - <IfModule !include_module>
      - Error mod_include is required by mod_foo. Load it with LoadModule.
      - </IfModule>
      -
      - # ensure that exactly one of SSL,NOSSL is defined
      - <IfDefine SSL>
      - <IfDefine NOSSL>
      - Error Both SSL and NOSSL are defined. Define only one of them.
      - </IfDefine>
      - </IfDefine>
      - <IfDefine !SSL>
      - <IfDefine !NOSSL>
      - Error Either SSL or NOSSL must be defined.
      - </IfDefine>
      - </IfDefine>
      -
      + +# Example +# ensure that mod_include is loaded +<IfModule !include_module> + Error "mod_include is required by mod_foo. Load it with LoadModule." +</IfModule> + +# ensure that exactly one of SSL,NOSSL is defined +<IfDefine SSL> +<IfDefine NOSSL> + Error "Both SSL and NOSSL are defined. Define only one of them." +</IfDefine> +</IfDefine> +<IfDefine !SSL> +<IfDefine !NOSSL> + Error "Either SSL or NOSSL must be defined." +</IfDefine> +</IfDefine> +
      @@ -1142,7 +1370,7 @@ in case of an error
    • output a customized message
    • -
    • redirect to a local URL-path to handle the +
    • internally redirect to a local URL-path to handle the problem/error
    • redirect to an external URL to handle the @@ -1155,18 +1383,24 @@ in case of an error or a message. Apache httpd will sometimes offer additional information regarding the problem/error.

      +

      From 2.4.13, expression syntax can be + used inside the directive to produce dynamic strings and URLs.

      +

      URLs can begin with a slash (/) for local web-paths (relative to the DocumentRoot), or be a full URL which the client can resolve. Alternatively, a message - can be provided to be displayed by the browser. Examples:

      - - - ErrorDocument 500 http://foo.example.com/cgi-bin/tester
      - ErrorDocument 404 /cgi-bin/bad_urls.pl
      - ErrorDocument 401 /subscription_info.html
      - ErrorDocument 403 "Sorry can't allow you access today"
      - ErrorDocument 403 Forbidden! -
      + can be provided to be displayed by the browser. Note that deciding + whether the parameter is an URL, a path or a message is performed + before any expression is parsed. Examples:

      + + +ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi +ErrorDocument 404 /errors/bad_urls.php +ErrorDocument 401 /subscription_info.html +ErrorDocument 403 "Sorry, can't allow you access today" +ErrorDocument 403 Forbidden! +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}} +

      Additionally, the special value default can be used to specify Apache httpd's simple hardcoded message. While not required @@ -1174,14 +1408,13 @@ in case of an error Apache httpd's simple hardcoded message for configurations that would otherwise inherit an existing ErrorDocument.

      - - ErrorDocument 404 /cgi-bin/bad_urls.pl

      - <Directory /web/docs>
      - - ErrorDocument 404 default
      -
      - </Directory> -
      + +ErrorDocument 404 /cgi-bin/bad_urls.pl + +<Directory "/web/docs"> + ErrorDocument 404 default +</Directory> +

      Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a method such as @@ -1196,7 +1429,7 @@ in case of an error URL in an ErrorDocument 401, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, if you use an - ErrorDocument 401 directive then it must refer to a local + ErrorDocument 401 directive, then it must refer to a local document.

      Microsoft Internet Explorer (MSIE) will by default ignore @@ -1209,7 +1442,7 @@ in case of an error href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807" >Q294807.

      -

      Although most error messages can be overriden, there are certain +

      Although most error messages can be overridden, there are certain circumstances where the internal messages are used regardless of the setting of ErrorDocument. In particular, if a malformed request is detected, normal request processing @@ -1241,17 +1474,17 @@ in case of an error the file-path is not absolute then it is assumed to be relative to the ServerRoot.

      - Example - ErrorLog /var/log/httpd/error_log - + +ErrorLog "/var/log/httpd/error_log" +

      If the file-path begins with a pipe character "|" then it is assumed to be a command to spawn to handle the error log.

      - Example - ErrorLog "|/usr/local/bin/httpd_errors" - + +ErrorLog "|/usr/local/bin/httpd_errors" +

      See the notes on piped logs for more information.

      @@ -1265,9 +1498,12 @@ in case of an error in individual virtual hosts, the final facility specified affects the entire server.

      - Example - ErrorLog syslog:user - + +ErrorLog syslog:user + + +

      Additional modules can provide their own ErrorLog providers. The syntax + is similar to the syslog example above.

      SECURITY: See the security tips @@ -1291,16 +1527,16 @@ in case of an error ErrorLogFormat [connection|request] format server configvirtual host -Available in Apache httpd 2.3.9 and later

      ErrorLogFormat allows to specify what supplementary information is logged in the error log in addition to the actual log message.

      - Simple example - ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" - + +#Simple example +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" +

      Specifying connection or request as first parameter allows to specify additional formats, causing additional @@ -1314,15 +1550,15 @@ in case of an error example, the Referer header is only present if the log message is associated to a request and the log message happens at a time when the Referer header has already been read from the client. If no output is - produced, the default behavior is to delete everything from the preceeding + produced, the default behavior is to delete everything from the preceding space character to the next space character. This means the log line is implicitly divided into fields on non-whitespace to whitespace transitions. If a format string item does not produce output, the whole field is - ommitted. For example, if the remote address %a in the log + omitted. For example, if the remote address %a in the log format [%t] [%l] [%a] %M  is not available, the surrounding brackets are not logged either. Space characters can be escaped with a backslash to prevent them from delimiting a field. The combination '% ' - (percent space) is a zero-witdh field delimiter that does not produce any + (percent space) is a zero-width field delimiter that does not produce any output.

      The above behavior can be changed by adding modifiers to the format @@ -1330,7 +1566,7 @@ in case of an error respective item does not produce any output. In once-per-connection/request formats, it is also possible to use the + (plus) modifier. If an item with the plus modifier does not produce any output, the whole line is - ommitted.

      + omitted.

      A number as modifier can be used to assign a log severity level to a format item. The item will only be logged if the severity of the log @@ -1375,7 +1611,11 @@ in case of an error The percent sign %a - Remote IP-address and port + Client IP address and port of the request + + %{c}a + Underlying peer IP address and port of the connection (see the + mod_remoteip module) %A Local IP-address and port @@ -1456,14 +1696,14 @@ in case of an error or request. This can be used to correlate which log lines belong to the same connection or request, which request happens on which connection. A %L format string is also available in - mod_log_config, to allow to correlate access log entries + mod_log_config to allow to correlate access log entries with error log lines. If mod_unique_id is loaded, its unique id will be used as log ID for requests.

      - Example (default format) - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" - + +#Example (default format for threaded MPMs) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" +

      This would result in error messages such as:

      @@ -1471,21 +1711,22 @@ in case of an error [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico -

      Notice that, as discussed above, some fields are ommitted +

      Notice that, as discussed above, some fields are omitted entirely because they are not defined.

      - Example (similar to the 2.2.x format) - ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" - + +#Example (similar to the 2.2.x format) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" + - Advanced example with request/connection log IDs - ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
      - ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
      - ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
      - ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
      - ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
      -
      + +#Advanced example with request/connection log IDs +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A" + ErrorLog @@ -1503,12 +1744,12 @@ request

      This option tracks additional data per worker about the - currently executing request, and a utilization summary; you - can see these variables during runtime by configuring + currently executing request and creates a utilization summary. + You can see these variables during runtime by configuring mod_status. Note that other modules may rely on this scoreboard.

      -

      This setting applies to the entire server, and cannot be +

      This setting applies to the entire server and cannot be enabled or disabled on a virtualhost-by-virtualhost basis. The collection of extended status information can slow down the server. Also note that this setting cannot be changed @@ -1520,7 +1761,7 @@ request third party modules may do the same. Such modules rely on collecting detailed information about the state of all workers. The default is changed by mod_status beginning - with version 2.3.6; the previous default was always Off.

      + with version 2.3.6. The previous default was always Off.

      @@ -1560,7 +1801,9 @@ earlier.
      The number of bytes in the file will be included
      All
      All available fields will be used. This is equivalent to: - FileETag INode MTime Size
      + +FileETag INode MTime Size +
      None
      If a document is file-based, no ETag field will be included in the response
      @@ -1587,7 +1830,7 @@ earlier. changed via FileETag. Server Side Includes - An ETag is not generated for responses parsed by mod_include, + An ETag is not generated for responses parsed by mod_include since the response entity can change without a change of the INode, MTime, or Size of the static file with embedded SSI directives. @@ -1626,14 +1869,25 @@ filenames

      The filename argument should include a filename, or a wild-card string, where ? matches any single character, - and * matches any sequences of characters. - Regular expressions + and * matches any sequences of characters.

      + +<Files "cat.html"> + # Insert stuff that applies to cat.html here +</Files> + +<Files "?at.*"> + # This would apply to cat.html, bat.html, hat.php and so on. +</Files> + +

      Regular expressions can also be used, with the addition of the ~ character. For example:

      - - <Files ~ "\.(gif|jpe?g|png)$"> - + +<Files ~ "\.(gif|jpe?g|png)$"> + #... +</Files> +

      would match most common Internet graphics formats. FilesMatch is preferred, @@ -1669,11 +1923,30 @@ filenames does. However, it accepts a regular expression. For example:

      - - <FilesMatch "\.(gif|jpe?g|png)$"> - + +<FilesMatch ".+\.(gif|jpe?g|png)$"> + # ... +</FilesMatch> +

      would match most common Internet graphics formats.

      + + The .+ at the start of the regex ensures that + files named .png, or .gif, for example, + are not matched. + +

      From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of files to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

      + + +<FilesMatch "^(?<sitename>[^/]+)"> + require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</FilesMatch> + How <Directory>, <Location> @@ -1689,7 +1962,6 @@ media type in the HTTP Content-Type header field directory.htaccess FileInfo -Moved to the core in Apache httpd 2.0

      When placed into an .htaccess file or a @@ -1702,9 +1974,9 @@ media type in the HTTP Content-Type header field GIF files, but did not want to label them all with .gif, you might want to use:

      - - ForceType image/gif - + +ForceType image/gif +

      Note that this directive overrides other indirect media type associations defined in mime.types or via the @@ -1714,27 +1986,37 @@ media type in the HTTP Content-Type header field ForceType settings by using the value of None:

      - - # force all files to be image/gif:
      - <Location /images>
      - - ForceType image/gif
      -
      - </Location>
      -
      - # but normal mime-type associations here:
      - <Location /images/mixed>
      - - ForceType None
      -
      - </Location> -
      + +# force all files to be image/gif: +<Location "/images"> + ForceType image/gif +</Location> + +# but normal mime-type associations here: +<Location "/images/mixed"> + ForceType None +</Location> +

      This directive primarily overrides the content types generated for static files served out of the filesystem. For resources other than static files, where the generator of the response typically specifies a Content-Type, this directive has no effect.

      + Note +

      When explicit directives such as + SetHandler or + AddHandler do not apply + to the current request, the internal handler name normally set by those + directives is set to match the content type specified by this directive. + This is a historical behavior that some third-party modules + (such as mod_php) may use "magic" content types used only to signal the + module to take responsibility for the matching request. Configurations + that rely on such "magic" types should be avoided by the use of + SetHandler or + AddHandler.

      +
      +
      @@ -1745,7 +2027,7 @@ media type in the HTTP Content-Type header field -

      When the server has been compiled with gprof profiling suppport, +

      When the server has been compiled with gprof profiling support, GprofDir causes gmon.out files to be written to the specified directory when the process exits. If the argument ends with a percent symbol ('%'), subdirectories are created @@ -1818,20 +2100,20 @@ satisfied by a request at runtime directives if and only if the expression evaluates to true. For example:

      - - <If "-z req('Host')"> - + +<If "-z req('Host')"> +

      would match HTTP/1.0 requests without a Host: header. Expressions may contain various shell-like operators for string - comparison (=, !=, <, ...), + comparison (==, !=, <, ...), integer comparison (-eq, -ne, ...), and others (-n, -z, -f, ...). It is also possible to use regular expressions,

      - - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> - + +<If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> +

      shell-like pattern matches and many other operations. These operations can be done on request headers (req), environment variables @@ -1839,6 +2121,16 @@ satisfied by a request at runtime documentation is available in Expressions in Apache HTTP Server.

      +

      Only directives that support the directory context can be used within this configuration section.

      + + + Certain variables, such as CONTENT_TYPE and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. + + Expressions in Apache HTTP Server, @@ -1896,32 +2188,22 @@ if a test is true at startup nest-able, which can be used to implement simple multiple-parameter tests. Example:

      - - httpd -DReverseProxy -DUseCache -DMemCache ...
      -
      - # httpd.conf
      - <IfDefine ReverseProxy>
      - - LoadModule proxy_module modules/mod_proxy.so
      - LoadModule proxy_http_module modules/mod_proxy_http.so
      - <IfDefine UseCache>
      - - LoadModule cache_module modules/mod_cache.so
      - <IfDefine MemCache>
      - - LoadModule mem_cache_module modules/mod_mem_cache.so
      -
      - </IfDefine>
      - <IfDefine !MemCache>
      - - LoadModule cache_disk_module modules/mod_cache_disk.so
      -
      - </IfDefine> -
      - </IfDefine> -
      - </IfDefine> -
      + httpd -DReverseProxy -DUseCache -DMemCache ... + +<IfDefine ReverseProxy> + LoadModule proxy_module modules/mod_proxy.so + LoadModule proxy_http_module modules/mod_proxy_http.so + <IfDefine UseCache> + LoadModule cache_module modules/mod_cache.so + <IfDefine MemCache> + LoadModule mem_cache_module modules/mod_mem_cache.so + </IfDefine> + <IfDefine !MemCache> + LoadModule cache_disk_module modules/mod_cache_disk.so + </IfDefine> + </IfDefine> +</IfDefine> + @@ -1986,11 +2268,11 @@ later. Include Includes other configuration files from within the server configuration files -Include [optional|strict] file-path|directory-path|wildcard +Include file-path|directory-path|wildcard server configvirtual host directory -Wildcard matching available in 2.0.41 and later, directory +Directory wildcard matching available in 2.3.6 and later @@ -2008,72 +2290,70 @@ wildcard matching available in 2.3.6 and later wildcard syntax shown below, to include files that match a particular pattern, such as *.conf, for example.

      -

      When a wildcard is specified for a file component of - the path, and no file matches the wildcard, the - Include - directive will be silently ignored. When a wildcard is - specified for a directory component of the path, and - no directory matches the wildcard, the - Include directive will - fail with an error saying the directory cannot be found. -

      - -

      For further control over the behavior of the server when no files or - directories match, prefix the path with the modifiers optional - or strict. If optional is specified, any wildcard - file or directory that does not match will be silently ignored. If - strict is specified, any wildcard file or directory that does - not match at least one file will cause server startup to fail.

      - -

      When a directory or file component of the path is - specified exactly, and that directory or file does not exist, - Include directive will fail with an - error saying the file or directory cannot be found.

      +

      The Include directive will + fail with an error if a wildcard expression does not + match any file. The IncludeOptional + directive can be used if non-matching wildcards should be ignored.

      The file path specified may be an absolute path, or may be relative to the ServerRoot directory.

      Examples:

      - - Include /usr/local/apache2/conf/ssl.conf
      - Include /usr/local/apache2/conf/vhosts/*.conf -
      + +Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.conf +

      Or, providing paths relative to your ServerRoot directory:

      - - Include conf/ssl.conf
      - Include conf/vhosts/*.conf -
      + +Include conf/ssl.conf +Include conf/vhosts/*.conf +

      Wildcards may be included in the directory or file portion of the - path. In the following example, the server will fail to load if no - directories match conf/vhosts/*, but will load successfully if no - files match *.conf.

      + path. This example will fail if there is no subdirectory in conf/vhosts + that contains at least one *.conf file:

      - - Include conf/vhosts/*/vhost.conf
      - Include conf/vhosts/*/*.conf -
      + +Include conf/vhosts/*/*.conf + -

      In this example, the server will fail to load if either - conf/vhosts/* matches no directories, or if *.conf matches no files:

      +

      Alternatively, the following command will just be ignored in case of + missing files or directories:

      - - Include strict conf/vhosts/*/*.conf - + +IncludeOptional conf/vhosts/*/*.conf + -

      In this example, the server load successfully if either conf/vhosts/* - matches no directories, or if *.conf matches no files:

      + - - Include optional conf/vhosts/*/*.conf - +IncludeOptional +apachectl + + +IncludeOptional +Includes other configuration files from within +the server configuration files +IncludeOptional file-path|directory-path|wildcard +server configvirtual host +directory + +Available in 2.3.6 and later + + +

      This directive allows inclusion of other configuration files + from within the server configuration files. It works identically to the + Include directive, with the + exception that if wildcards do not match any file or directory, the + IncludeOptional directive will be + silently ignored instead of causing an error.

      +Include apachectl
      @@ -2106,7 +2386,7 @@ wildcard matching available in 2.3.6 and later encoding will be used in order to send content of unknown length over persistent connections.

      -

      When a client uses a Keep-Alive connection it will be counted +

      When a client uses a Keep-Alive connection, it will be counted as a single "request" for the MaxConnectionsPerChild directive, regardless of how many requests are sent using the connection.

      @@ -2123,8 +2403,6 @@ requests on a persistent connection KeepAliveTimeout 5 server configvirtual host -Specifying a value in milliseconds is available in -Apache httpd 2.3.2 and later

      The number of seconds Apache httpd will wait for a subsequent @@ -2138,8 +2416,9 @@ Apache httpd 2.3.2 and later higher the timeout, the more server processes will be kept occupied waiting on connections with idle clients.

      -

      In a name-based virtual host context, the value of the first - defined virtual host best matching the local IP and port will be used.

      +

      If KeepAliveTimeout is not + set for a name-based virtual host, the value of the first defined + virtual host best matching the local IP and port will be used.

      @@ -2169,13 +2448,11 @@ methods only to the methods POST, PUT, and DELETE, leaving all other methods unprotected:

      - - <Limit POST PUT DELETE>
      - - Require valid-user
      -
      - </Limit> -
      + +<Limit POST PUT DELETE> + Require valid-user +</Limit> +

      The method names listed can be one or more of: GET, POST, PUT, DELETE, @@ -2183,7 +2460,7 @@ methods PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, and UNLOCK. The method name is - case-sensitive. If GET is used it will also + case-sensitive. If GET is used, it will also restrict HEAD requests. The TRACE method cannot be limited (see TraceEnable).

      @@ -2215,18 +2492,14 @@ methods Require group editors directive will be ignored in all cases:

      - - <LimitExcept GET> - - Require valid-user - - </LimitExcept>
      - <Limit POST> - - Require group editors - - </Limit> -
      + +<LimitExcept GET> + Require valid-user +</LimitExcept> +<Limit POST> + Require group editors +</Limit> + @@ -2253,13 +2526,11 @@ except the named ones

      For example:

      - - <LimitExcept POST GET>
      - - Require valid-user
      -
      - </LimitExcept> -
      + +<LimitExcept POST GET> + Require valid-user +</LimitExcept> + @@ -2272,7 +2543,6 @@ subrequests LimitInternalRecursion 10 server configvirtual host -Available in Apache httpd 2.0.47 and later

      An internal redirect happens, for example, when using the

      The directive stores two different limits, which are evaluated on per-request basis. The first number is the maximum number of - internal redirects, that may follow each other. The second number - determines, how deep subrequests may be nested. If you specify only one + internal redirects that may follow each other. The second number + determines how deeply subrequests may be nested. If you specify only one number, it will be assigned to both limits.

      - Example - LimitInternalRecursion 5 - + +LimitInternalRecursion 5 +
      @@ -2335,12 +2605,12 @@ from the client attacks.

      If, for example, you are permitting file upload to a particular - location, and wish to limit the size of the uploaded file to 100K, + location and wish to limit the size of the uploaded file to 100K, you might use the following directive:

      - - LimitRequestBody 102400 - + +LimitRequestBody 102400 +

      For a full description of how this directive is interpreted by proxy requests, see the mod_proxy documentation.

      @@ -2383,14 +2653,14 @@ will be accepted from the client

      For example:

      - - LimitRequestFields 50 - + +LimitRequestFields 50 + Warning

      When name-based virtual hosting is used, the value for this directive is taken from the default (first-listed) virtual host for the - local IP and port combination

      . + local IP and port combination.

      @@ -2409,7 +2679,7 @@ client that will be allowed in an HTTP request header.

      The LimitRequestFieldSize directive - allows the server administrator to reduce or increase the limit + allows the server administrator to set the limit on the allowed size of an HTTP request header field. A server needs this value to be large enough to hold any one header field from a normal client request. The size of a normal request header @@ -2424,9 +2694,9 @@ client

      For example:

      - - LimitRequestFieldSize 4094 - + +LimitRequestFieldSize 4094 + Under normal conditions, the value should not be changed from the default. @@ -2452,7 +2722,7 @@ from the client allowed on the HTTP request-line.

      The LimitRequestLine directive allows - the server administrator to reduce or increase the limit on the allowed size + the server administrator to set the limit on the allowed size of a client's HTTP request-line. Since the request-line consists of the HTTP method, URI, and protocol version, the LimitRequestLine directive places a @@ -2467,9 +2737,9 @@ from the client

      For example:

      - - LimitRequestLine 4094 - + +LimitRequestLine 4094 + Under normal conditions, the value should not be changed from the default. @@ -2498,9 +2768,9 @@ from the client

      Example:

      - - LimitXMLRequestBody 0 - + +LimitXMLRequestBody 0 + @@ -2551,19 +2821,21 @@ URLs /private1, /private1/ and /private1/file.txt will have the enclosed directives applied, but /private1other would not.

      - - <Location /private1> - ... - + +<Location "/private1"> + # ... +</Location> +

      In the example below, where a trailing slash is used, requests to /private2/ and /private2/file.txt will have the enclosed directives applied, but /private2 and /private2other would not.

      - - <Location /private2/> - ... - + +<Location "/private2/"> + # ... +</Location> + When to use <directive type="section">Location</directive> @@ -2573,7 +2845,7 @@ URLs content that lives in the filesystem, use Directory and Files. An exception is - <Location />, which is an easy way to + <Location "/">, which is an easy way to apply a configuration to the entire server.

      @@ -2592,9 +2864,11 @@ URLs can also be used, with the addition of the ~ character. For example:

      - - <Location ~ "/(extra|special)/data"> - + +<Location ~ "/(extra|special)/data"> + #... +</Location> +

      would match URLs that contained the substring /extra/data or /special/data. The directive

      The Location functionality is especially useful when combined with the SetHandler - directive. For example, to enable status requests, but allow them + directive. For example, to enable status requests but allow them only from browsers at example.com, you might use:

      - - <Location /status>
      - - SetHandler server-status
      - Require host example.com
      -
      - </Location> -
      + +<Location "/status"> + SetHandler server-status + Require host example.com +</Location> + Note about / (slash)

      The slash character has special meaning depending on where in a @@ -2630,14 +2902,14 @@ URLs >Location require you to explicitly specify multiple slashes if that is your intention.

      -

      For example, <LocationMatch ^/abc> would match +

      For example, <LocationMatch "^/abc"> would match the request URL /abc but not the request URL //abc. The (non-regex) Location directive behaves similarly when used for proxy requests. But when (non-regex) Location is used for non-proxy requests it will implicitly match multiple slashes with a single slash. For example, - if you specify <Location /abc/def> and the + if you specify <Location "/abc/def"> and the request is to /abc//def then it will match.

      @@ -2663,12 +2935,37 @@ matching URLs it takes a regular expression as an argument instead of a simple string. For example:

      - - <LocationMatch "/(extra|special)/data"> - + +<LocationMatch "/(extra|special)/data"> + # ... +</LocationMatch> +

      would match URLs that contained the substring /extra/data or /special/data.

      + +

      If the intent is that a URL starts with + /extra/data, rather than merely + contains /extra/data, prefix the + regular expression with a ^ to require this.

      + + +<LocationMatch "^/(extra|special)/data"> + +
      + +

      From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of URLs to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

      + + +<LocationMatch "^/combined/(?<sitename>[^/]+)"> + require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</LocationMatch> + How <Directory>, <Location> @@ -2842,12 +3139,12 @@ matching URLs

      For example:

      - - LogLevel notice - + +LogLevel notice + Note -

      When logging to a regular file messages of the level +

      When logging to a regular file, messages of the level notice cannot be suppressed and thus are always logged. However, this doesn't apply when logging is done using syslog.

      @@ -2861,28 +3158,31 @@ matching URLs as module specification. This means the following three specifications are equivalent:

      - - LogLevel info ssl:warn
      - LogLevel info mod_ssl.c:warn
      - LogLevel info ssl_module:warn
      -
      + +LogLevel info ssl:warn +LogLevel info mod_ssl.c:warn +LogLevel info ssl_module:warn +

      It is also possible to change the level per directory:

      - - LogLevel info
      - <Directory /usr/local/apache/htdocs/app>
      -   LogLevel debug
      - </Files> -
      + +LogLevel info +<Directory "/usr/local/apache/htdocs/app"> + LogLevel debug +</Directory> + Per directory loglevel configuration only affects messages that are - logged after the request has been parsed and that are associated with - the request. Log messages which are associated with the connection or - the server are not affected. + logged after the request has been parsed and that are associated with + the request. Log messages which are associated with the connection or + the server are not affected. +ErrorLog +ErrorLogFormat +
      Apache HTTP Server Log Files
      @@ -2904,9 +3204,9 @@ connection

      For example:

      - - MaxKeepAliveRequests 500 - + +MaxKeepAliveRequests 500 +
      @@ -2924,7 +3224,7 @@ resource

      The MaxRanges directive limits the number of HTTP ranges the server is willing to - return to the client. If more ranges then permitted are requested, + return to the client. If more ranges than permitted are requested, the complete resource is returned instead.

      @@ -2959,7 +3259,7 @@ resource

      The MaxRangeOverlaps directive limits the number of overlapping HTTP ranges the server is willing to - return to the client. If more overlapping ranges then permitted are requested, + return to the client. If more overlapping ranges than permitted are requested, the complete resource is returned instead.

      @@ -2994,7 +3294,7 @@ resource

      The MaxRangeReversals directive limits the number of HTTP Range reversals the server is willing to - return to the client. If more ranges reversals then permitted are requested, + return to the client. If more ranges reversals than permitted are requested, the complete resource is returned instead.

      @@ -3028,8 +3328,8 @@ or specified mutexes

      The Mutex directive sets the mechanism, and optionally the lock file location, that httpd and modules use to serialize access to resources. Specify default as - the first argument to change the settings for all mutexes; specify - a mutex name (see table below) as the first argument to override + the second argument to change the settings for all mutexes; specify + a mutex name (see table below) as the second argument to override defaults only for that mutex.

      The Mutex directive is typically used in @@ -3104,10 +3404,10 @@ or specified mutexes holding a mutex that uses this implementation, the server will deadlock and stop responding to requests. When this occurs, the server will require a manual restart to recover.

      -

      Solaris is a notable exception as it provides a mechanism which +

      Solaris and Linux are notable exceptions as they provide a mechanism which usually allows the mutex to be recovered after a child process terminates abnormally while holding a mutex.

      -

      If your system implements the +

      If your system is POSIX compliant or if it implements the pthread_mutexattr_setrobust_np() function, you may be able to use the pthread option safely.

      @@ -3150,7 +3450,7 @@ or specified mutexes on a NFS- or AFS-filesystem. The basename of the file will be the mutex type, an optional instance string provided by the module, and unless the OmitPID keyword is specified, the process id of the httpd - parent process will be appended to to make the file name unique, avoiding + parent process will be appended to make the file name unique, avoiding conflicts when multiple httpd instances share a lock file directory. For example, if the mutex name is mpm-accept and the lock file directory is /var/httpd/locks, the lock file name for the @@ -3229,10 +3529,10 @@ or specified mutexes /var/httpd/locks. The mutex mechanism for all other mutexes will be changed from the compiled-in default to sysvsem.

      - - Mutex default sysvsem
      - Mutex mpm-accept fcntl:/var/httpd/locks -
      + +Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-accept + @@ -3300,9 +3600,13 @@ directory

      Even though the server follows the symlink it does not change the pathname used to match against Directory sections.

      -

      Note also, that this option gets ignored if set - inside a Location - section.

      + +

      The FollowSymLinks and + SymLinksIfOwnerMatch Options work only in Directory sections or + .htaccess files.

      +

      Omitting this option should not be considered a security restriction, since symlink testing is subject to race conditions that make it circumventable.

      @@ -3327,7 +3631,7 @@ directory
      Indexes
      - If a URL which maps to a directory is requested, and there + If a URL which maps to a directory is requested and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing @@ -3351,19 +3655,23 @@ directory target file or directory is owned by the same user id as the link. - Note

      This option gets ignored if - set inside a Location section.

      + Note +

      The FollowSymLinks and + SymLinksIfOwnerMatch Options work only in Directory sections or + .htaccess files.

      +

      This option should not be considered a security restriction, since symlink testing is subject to race conditions that make it - circumventable.

      -
      + circumventable.

      +

      Normally, if multiple Options could apply to a directory, then the most specific one is used and others are ignored; the options are not merged. (See how sections are merged.) + href="../sections.html#merging">how sections are merged.) However if all the options on the Options directive are preceded by a + or - symbol, the options are @@ -3374,44 +3682,36 @@ directory Note

      Mixing Options with a + or - - with those without is not valid syntax, and will be + - with those without is not valid syntax and will be rejected during server startup by the syntax check with an abort.

      For example, without any + and - symbols:

      - - <Directory /web/docs>
      - - Options Indexes FollowSymLinks
      -
      - </Directory>
      -
      - <Directory /web/docs/spec>
      - - Options Includes
      -
      - </Directory> -
      + +<Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options Includes +</Directory> +

      then only Includes will be set for the /web/docs/spec directory. However if the second Options directive uses the + and - symbols:

      - - <Directory /web/docs>
      - - Options Indexes FollowSymLinks
      -
      - </Directory>
      -
      - <Directory /web/docs/spec>
      - - Options +Includes -Indexes
      -
      - </Directory> -
      + +<Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options +Includes -Indexes +</Directory> +

      then the options FollowSymLinks and Includes are set for the /web/docs/spec @@ -3434,29 +3734,100 @@ directory Protocol protocol server configvirtual host Available in Apache 2.1.5 and later. -On Windows from Apache 2.3.3 and later. +On Windows, from Apache 2.3.3 and later.

      This directive specifies the protocol used for a specific listening socket. - The protocol is used to determine which module should handle a request, and + The protocol is used to determine which module should handle a request and to apply protocol specific optimizations with the AcceptFilter directive.

      -

      You only need to set the protocol if you are running on non-standard ports, otherwise http is assumed for port 80 and https for port 443.

      +

      You only need to set the protocol if you are running on non-standard ports; + otherwise, http is assumed for port 80 and https + for port 443.

      -

      For example, if you are running https on a non-standard port, specify the protocol explicitly:

      +

      For example, if you are running https on a non-standard port, + specify the protocol explicitly:

      - - Protocol https - + +Protocol https +

      You can also specify the protocol using the Listen directive.

      -AcceptFilter +AcceptFilter Listen + + Protocols + Protocols available for a server/virtual host + Protocols protocol ... + Protocols http/1.1 + server configvirtual host + Only available from Apache 2.4.17 and later. + + +

      This directive specifies the list of protocols supported for a + server/virtual host. The list determines the allowed protocols + a client may negotiate for this server/host.

      + +

      You need to set protocols if you want to extend the available + protocols for a server/host. By default, only the http/1.1 protocol + (which includes the compatibility with 1.0 and 0.9 clients) is + allowed.

      + +

      For example, if you want to support HTTP/2 for a server with TLS, + specify:

      + + +Protocols h2 http/1.1 + + +

      Valid protocols are http/1.1 for http and https connections, + h2 on https connections and h2c for http + connections. Modules may enable more protocols.

      + +

      It is safe to specify protocols that are unavailable/disabled. Such + protocol names will simply be ignored.

      + +

      Protocols specified in base servers are inherited for virtual hosts + only if the virtual host has no own Protocols directive. Or, the other + way around, Protocols directives in virtual hosts replace any + such directive in the base server. +

      + +
      + ProtocolsHonorOrder +
      + + + + ProtocolsHonorOrder + Determines if order of Protocols determines precedence during negotiation + ProtocolsHonorOrder On|Off + ProtocolsHonorOrder On + server configvirtual host + Only available from Apache 2.4.17 and later. + + +

      This directive specifies if the server should honor the order in which + the Protocols directive lists protocols.

      + +

      If configured Off, the client supplied list order of protocols has + precedence over the order in the server configuration.

      + +

      With ProtocolsHonorOrder set to on + (default), the client ordering does not matter and only the ordering + in the server settings influences the outcome of the protocol + negotiation.

      + +
      + Protocols +
      + + RLimitCPU Limits the CPU consumption of processes launched @@ -3474,13 +3845,13 @@ by Apache httpd children or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

      -

      This applies to processes forked off from Apache httpd children +

      This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

      CPU resource limits are expressed in seconds per @@ -3507,13 +3878,13 @@ by Apache httpd children or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

      -

      This applies to processes forked off from Apache httpd children +

      This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

      Memory resource limits are expressed in bytes per @@ -3535,18 +3906,18 @@ processes launched by Apache httpd children

      Takes 1 or 2 parameters. The first parameter sets the soft - resource limit for all processes and the second parameter sets + resource limit for all processes, and the second parameter sets the maximum resource limit. Either parameter can be a number, or max to indicate to the server that the limit should be set to the maximum allowed by the operating system configuration. Raising the maximum resource limit requires that - the server is running as root, or in the initial startup + the server is running as root or in the initial startup phase.

      -

      This applies to processes forked off from Apache httpd children +

      This applies to processes forked from Apache httpd children servicing requests, not the Apache httpd children themselves. This includes CGI scripts and SSI exec commands, but not any - processes forked off from the Apache httpd parent such as piped + processes forked from the Apache httpd parent, such as piped logs.

      Process limits control the number of processes per user.

      @@ -3573,9 +3944,7 @@ scripts server configvirtual host directory.htaccess FileInfo -Win32 only; -option Registry-Strict is available in Apache HTTP Server 2.0 and -later +Win32 only.

      This directive is used to control how Apache httpd finds the @@ -3584,15 +3953,15 @@ later by the shebang line (first line, starting with #!) in the script. On Win32 systems this line usually looks like:

      - - #!C:/Perl/bin/perl.exe - + +#!C:/Perl/bin/perl.exe +

      or, if perl is in the PATH, simply:

      - - #!perl - + +#!perl +

      Setting ScriptInterpreterSource Registry will cause the Windows Registry tree HKEY_CLASSES_ROOT to be @@ -3688,9 +4057,9 @@ messages sent to the client

      It may be worth setting up a dedicated address for this, e.g.

      - - ServerAdmin www-admin@foo.example.com - + +ServerAdmin www-admin@foo.example.com +

      as users do not always mention that they are talking about the server!

      @@ -3709,15 +4078,28 @@ to name-virtual hosts href="../vhosts/name-based.html">name-based virtual hosts. The ServerAlias may include wildcards, if appropriate.

      - - <VirtualHost *:80>
      - ServerName server.example.com
      - ServerAlias server server2.example.com server2
      - ServerAlias *.example.com
      - UseCanonicalName Off
      - # ...
      - </VirtualHost> -
      + +<VirtualHost *:80> + ServerName server.example.com + ServerAlias server server2.example.com server2 + ServerAlias *.example.com + UseCanonicalName Off + # ... +</VirtualHost> + + +

      Name-based virtual hosts for the best-matching set of virtualhosts are processed + in the order they appear in the configuration. The first matching ServerName or ServerAlias is used, with no different precedence for wildcards + (nor for ServerName vs. ServerAlias).

      + +

      The complete list of names in the VirtualHost + directive are treated just like a (non wildcard) + ServerAlias.

      + UseCanonicalName Apache HTTP Server Virtual Host documentation @@ -3727,39 +4109,46 @@ to name-virtual hosts ServerName Hostname and port that the server uses to identify itself -ServerName [scheme://]fully-qualified-domain-name[:port] +ServerName [scheme://]domain-name|ip-address[:port] server configvirtual host

      The ServerName directive sets the - request scheme, hostname and - port that the server uses to identify itself. This is used when - creating redirection URLs.

      + request scheme, hostname and port that the server uses to identify itself. +

      -

      Additionally, ServerName is used (possibly - in conjunction with ServerAlias) to uniquely +

      ServerName is used (possibly + in conjunction with ServerAlias) to uniquely identify a virtual host, when using name-based virtual hosts.

      +

      Additionally, this is used when + creating self-referential redirection URLs when + UseCanonicalName is set to a non-default + value.

      +

      For example, if the name of the machine hosting the web server is simple.example.com, but the machine also has the DNS alias www.example.com and you wish the web server to be so identified, the following directive should be used:

      - - ServerName www.example.com - + +ServerName www.example.com +

      The ServerName directive may appear anywhere within the definition of a server. However, each appearance overrides the previous appearance (within that server).

      -

      If no ServerName is specified, then the - server attempts to deduce the hostname by performing a reverse - lookup on the IP address. If no port is specified in the +

      If no ServerName is specified, the + server attempts to deduce the client visible hostname by first asking + the operating system for the system hostname, and if that fails, + performing a reverse lookup on an IP address present on the system.

      + +

      If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and predictability, you should specify an explicit hostname and port @@ -3842,9 +4231,9 @@ is accessed by an incompatible browser module="mod_so">LoadModule, for example) are taken as relative to this directory.

      - Example - ServerRoot /home/httpd - + +ServerRoot "/home/httpd" +

      The default location of ServerRoot may be modified by using the --prefix argument to @@ -3914,7 +4303,7 @@ header

      ServerTokens Full (or not specified)
      -
      Server sends (e.g.): Server: Apache/2.4.1 +
      Server sends (e.g.): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
      ServerTokens Prod[uctOnly]
      @@ -3935,11 +4324,11 @@ header
      ServerTokens Min[imal]
      Server sends (e.g.): Server: - Apache/2.4.1
      + Apache/2.4.2
      ServerTokens OS
      -
      Server sends (e.g.): Server: Apache/2.4.1 +
      Server sends (e.g.): Server: Apache/2.4.2 (Unix)
      @@ -3955,7 +4344,7 @@ header minimal is not recommended because it makes it more difficult to debug interoperational problems. Also note that disabling the Server: header does nothing at all to make your - server more secure; the idea of "security through obscurity" + server more secure. The idea of "security through obscurity" is a myth and leads to a false sense of safety.
      @@ -3966,12 +4355,12 @@ header SetHandler Forces all matching files to be processed by a handler -SetHandler handler-name|None +SetHandler handler-name|none|expression server configvirtual host directory.htaccess FileInfo -Moved into the core in Apache httpd 2.0 +expression argument 2.4.19 and later

      When placed into an .htaccess file or a @@ -3984,22 +4373,38 @@ handler of extension, you might put the following into an .htaccess file in that directory:

      - - SetHandler imap-file - + +SetHandler imap-file +

      Another example: if you wanted to have the server display a status report whenever a URL of http://servername/status was called, you might put the following into httpd.conf:

      - - <Location /status>
      - - SetHandler server-status
      -
      - </Location> -
      + +<Location "/status"> + SetHandler server-status +</Location> + + +

      You could also use this directive to configure a particular + handler for files with a particular file extension. For example:

      + + +<FilesMatch "\.php$"> + SetHandler application/x-httpd-php +</FilesMatch> + + +

      String-valued expressions can be used to reference per-request + variables, including backreferences to named regular expressions:

      + + +<LocationMatch ^/app/(?<sub>[^/]+)/> + SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080" +</LocationMatch> +

      You can override an earlier defined SetHandler directive by using the value None.

      @@ -4061,13 +4466,11 @@ server in the /www/data/ directory for server-side includes.

      - - <Directory /www/data/>
      - - SetOutputFilter INCLUDES
      -
      - </Directory> -
      + +<Directory "/www/data/"> + SetOutputFilter INCLUDES +</Directory> +

      If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -4088,10 +4491,14 @@ certain events before failing a request

      The TimeOut directive defines the length of time Apache httpd will wait for I/O in various circumstances:

      -
        -
      1. When reading data from the client, the length of time to +
          +
        • When reading data from the client, the length of time to wait for a TCP packet to arrive if the read buffer is - empty.

        • + empty.

          +

          For initial data on a new connection, this directive doesn't + take effect until after any configured + AcceptFilter has passed the new connection to the server.

          +
        • When writing data to the client, the length of time to wait for an acknowledgement of a packet if the send buffer is @@ -4106,7 +4513,7 @@ certain events before failing a request
        • In mod_proxy, the default timeout value if ProxyTimeout is not configured.
        • -
      +
    @@ -4117,7 +4524,6 @@ certain events before failing a request TraceEnable [on|off|extended] TraceEnable on server configvirtual host -Available in Apache HTTP Server 1.3.34, 2.0.55 and later

    This directive overrides the behavior of TRACE for both @@ -4131,10 +4537,19 @@ certain events before failing a request

    Finally, for testing and diagnostic purposes only, request bodies may be allowed using the non-compliant TraceEnable extended directive. The core (as an origin server) will - restrict the request body to 64k (plus 8k for chunk headers if + restrict the request body to 64Kb (plus 8Kb for chunk headers if Transfer-Encoding: chunked is used). The core will reflect the full headers and all chunk headers with the response - body. As a proxy server, the request body is not restricted to 64k.

    + body. As a proxy server, the request body is not restricted to 64Kb.

    + + Note + +

    Despite claims to the contrary, enabling the TRACE + method does not expose any security vulnerability in Apache httpd. + The TRACE method is defined by the HTTP/1.1 + specification and implementations are expected to support it.

    + +
    @@ -4150,6 +4565,9 @@ certain events before failing a request

    This directive can be used to toggle the use of IfDefine sections without needing to alter -D arguments in any startup scripts.

    +

    While this directive is supported in virtual host context, + the changes it makes are visible to any later configuration + directives, beyond any enclosing virtual host.

    @@ -4176,7 +4594,7 @@ port the client if any are supplied (otherwise it will use the canonical name, as defined above). These values are the same that are used to implement name-based virtual hosts, + href="../vhosts/name-based.html">name-based virtual hosts and are available with the same clients. The CGI variables SERVER_NAME and SERVER_PORT will be constructed from the client supplied values as well.

    @@ -4184,30 +4602,30 @@ port

    An example where this may be useful is on an intranet server where you have users connecting to the machine using short names such as www. You'll notice that if the users - type a shortname, and a URL which is a directory, such as + type a shortname and a URL which is a directory, such as http://www/splat, without the trailing - slash then Apache httpd will redirect them to + slash, then Apache httpd will redirect them to http://www.example.com/splat/. If you have authentication enabled, this will cause the user to have to authenticate twice (once for www and once again for www.example.com -- see the - FAQ on this subject for more information). But if + href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F"> + the FAQ on this subject for more information). But if UseCanonicalName is set Off, then Apache httpd will redirect to http://www/splat/.

    There is a third option, UseCanonicalName DNS, which is intended for use with mass IP-based virtual hosting to support ancient clients that do not provide a - Host: header. With this option Apache httpd does a + Host: header. With this option, Apache httpd does a reverse DNS lookup on the server IP address that the client connected to in order to work out self-referential URLs.

    Warning -

    If CGIs make assumptions about the values of SERVER_NAME +

    If CGIs make assumptions about the values of SERVER_NAME, they may be broken by this option. The client is essentially free to give whatever value they want as a hostname. But if the CGI is - only using SERVER_NAME to construct self-referential URLs + only using SERVER_NAME to construct self-referential URLs, then it should be just fine.

    @@ -4227,11 +4645,11 @@ port

    In many situations Apache httpd must construct a self-referential URL -- that is, a URL that refers back to the same server. With - UseCanonicalPhysicalPort On Apache httpd will, when + UseCanonicalPhysicalPort On, Apache httpd will, when constructing the canonical port for the server to honor the UseCanonicalName directive, provide the actual physical port number being used by this request - as a potential port. With UseCanonicalPhysicalPort Off + as a potential port. With UseCanonicalPhysicalPort Off, Apache httpd will not ever use the actual physical port number, instead relying on all configured information to construct a valid port number.

    @@ -4301,37 +4719,33 @@ hostname or IP address - Example - <VirtualHost 10.1.2.3:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -
    + +<VirtualHost 10.1.2.3:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost> +

    IPv6 addresses must be specified in square brackets because the optional port number could not be determined otherwise. An IPv6 example is shown below:

    - - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -
    + +<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost> +

    Each Virtual Host must correspond to a different IP address, - different port number or a different host name for the server, + different port number, or a different host name for the server, in the former case the server machine must be configured to accept IP packets for multiple addresses. (If the machine does not have multiple network interfaces, then this can be @@ -4362,7 +4776,7 @@ hostname or IP address requested hostname. If no matching name-based virtual host is found, then the first listed virtual host that matched the IP address will be used. As a consequence, the first listed virtual host for a given IP address - and port combination is default virtual host for that IP and port + and port combination is the default virtual host for that IP and port combination.

    Security @@ -4382,4 +4796,65 @@ hostname or IP address different sections are combined when a request is received + +MergeTrailers +Determines whether trailers are merged into headers +MergeTrailers [on|off] +MergeTrailers off +server configvirtual host +2.4.11 and later + + +

    This directive controls whether HTTP trailers are copied into the + internal representation of HTTP headers. This merging occurs when the + request body has been completely consumed, long after most header + processing would have a chance to examine or modify request headers.

    +

    This option is provided for compatibility with releases prior to 2.4.11, + where trailers were always merged.

    +
    +
    + + +QualifyRedirectURL +Controls whether the REDIRECT_URL environment variable is + fully qualified +QualifyRedirectURL ON|OFF +QualifyRedirectURL OFF +server configvirtual host +directory + +FileInfo +Directive supported in 2.4.18 and later. 2.4.17 acted +as if 'QualifyRedirectURL ON' was configured. + + +

    This directive controls whether the server will ensure that the + REDIRECT_URL environment variable is fully qualified. By default, + the variable contains the verbatim URL requested by the client, + such as "/index.html". With QualifyRedirectURL ON, the same request would result in a + value such as "http://www.example.com/index.html".

    +

    Even without this directive set, when a request is issued against a + fully qualified URL, REDIRECT_URL will remain fully qualified. +

    +
    +
    + + + +RegisterHttpMethod +Register non-standard HTTP methods +RegisterHttpMethod method [method [...]] +server config + + +

    HTTP Methods that are not conforming to the relvant RFCs are normally +rejected by request processing in Apache HTTPD. To avoid this, modules +can register non-standard HTTP methods they support. +The RegisterHttpMethod allows to register such +methods manually. This can be useful for if such methods are forwared +for external processing, e.g. to a CGI script.

    +
    +
    + diff --git a/docs/manual/mod/core.xml.de b/docs/manual/mod/core.xml.de index 279e61a3df6..b73e2e6e996 100644 --- a/docs/manual/mod/core.xml.de +++ b/docs/manual/mod/core.xml.de @@ -1,7 +1,7 @@ - + - + + + + + @@ -25,184 +25,191 @@ core -Fonctionnalités de base du serveur HTTP Apache toujours +Fonctionnalités de base du serveur HTTP Apache toujours disponibles Core AcceptFilter Permet d'optimiser la configuration d'une socket pour -l'écoute d'un protocole +l'écoute d'un protocole AcceptFilter protocole filtre d'acceptation server config -Disponible depuis la version 2.3.3 sous Windows et 2.1.5 -sur les autres plates-formes.

    Cette directive permet d'effectuer une optimisation de la socket - d'écoute d'un type de protocole en fonction du système + d'écoute d'un type de protocole en fonction du système d'exploitation. Le but premier est de faire en sorte que le noyau - n'envoie pas de socket au processus du serveur jusqu'à ce que - des données soient reçues, ou qu'une requête HTTP complète soit mise + n'envoie pas de socket au processus du serveur jusqu'à ce que + des données soient reçues, ou qu'une requête HTTP complète soit mise en tampon. Seuls les Filtres d'acceptation de FreeBSD, le filtre plus primitif TCP_DEFER_ACCEPT sous Linux, et la version - optimisée d'AcceptEx() de Windows sont actuellement supportés.

    + optimisée d'AcceptEx() de Windows sont actuellement supportés.

    -

    L'utilisation de l'argument none va désactiver tout - filtre d'acceptation pour ce protocole. Ceci s'avère utile pour les - protocoles qui nécessitent l'envoi de données par le serveur en +

    L'utilisation de l'argument none va désactiver tout + filtre d'acceptation pour ce protocole. Ceci s'avère utile pour les + protocoles qui nécessitent l'envoi de données par le serveur en premier, comme ftp: ou nntp:

    - AcceptFilter nntp none + + AcceptFilter nntp none + -

    Les noms de protocoles par défaut sont https pour le +

    Les noms de protocoles par défaut sont https pour le port 443 et http pour tous les autres ports. Pour - spécifier un autre protocole à utiliser avec un port en écoute, - ajoutez l'argument protocol à la directive protocol à la directive Listen.

    -

    Sous FreeBSD, les valeurs par défaut sont :

    - - AcceptFilter http httpready
    - AcceptFilter https dataready -
    +

    Sous FreeBSD, les valeurs par défaut sont :

    + +AcceptFilter http httpready +AcceptFilter https dataready +

    Le filtre d'acceptation httpready met en tampon des - requêtes HTTP entières au niveau du noyau. Quand une requête - entière a été reçue, le noyau l'envoie au serveur. Voir la page de + requêtes HTTP entières au niveau du noyau. Quand une requête + entière a été reçue, le noyau l'envoie au serveur. Voir la page de manuel de accf_http(9) pour plus de détails. Comme les requêtes - HTTPS sont chiffrées, celles-ci n'autorisent que le filtre accf_http(9) pour plus de détails. Comme les requêtes + HTTPS sont chiffrées, celles-ci n'autorisent que le filtre accf_data(9).

    -

    Sous Linux, les valeurs par défaut sont :

    - - AcceptFilter http data
    - AcceptFilter https data -
    +

    Sous Linux, les valeurs par défaut sont :

    + +AcceptFilter http data +AcceptFilter https data +

    Le filtre TCP_DEFER_ACCEPT de Linux ne supporte pas - la mise en tampon des requêtes http. Toute valeur autre que + la mise en tampon des requêtes http. Toute valeur autre que none active le filtre TCP_DEFER_ACCEPT - pour ce protocole. Pour plus de détails, voir la page de + pour ce protocole. Pour plus de détails, voir la page de manuel Linux de tcp(7).

    + href="http://man7.org/linux/man-pages/man7/tcp.7.html">tcp(7).

    -

    Sous Windows, les valeurs par défaut sont :

    - - AcceptFilter http data
    - AcceptFilter https data -
    +

    Sous Windows, les valeurs par défaut sont :

    + +AcceptFilter http connect +AcceptFilter https connect +

    Le module MPM pour Windows mpm_winnt utilise la directive AcceptFilter comme commutateur de l'API AcceptEx(), et ne supporte - pas la mise en tampon du protocole http. Deux valeurs utilisent - l'API Windows AcceptEx() et vont recycler les sockets réseau entre - les connexions. data attend jusqu'à ce que les données - aient été transmises comme décrit plus haut, et le tampon de données - initiales ainsi que les adresses réseau finales sont tous extraits - grâce à une seule invocation d'AcceptEx(). connect - utilise l'API AcceptEx(), extrait aussi les adresses réseau finales, - mais à l'instar de none, la valeur connect - n'attend pas la transmission des données initiales.

    + pas la mise en tampon du protocole http. connect + utilise l'API AcceptEx(), extrait aussi les adresses réseau finales, + mais à l'instar de none, la valeur connect + n'attend pas la transmission des données initiales.

    Sous Windows, none utilise accept() au lieu d'AcceptEx(), et ne recycle pas les sockets entre les connexions. - Ceci s'avère utile pour les interfaces réseau dont le pilote est - défectueux, ainsi que pour certains fournisseurs de réseau comme les + Ceci s'avère utile pour les interfaces réseau dont le pilote est + défectueux, ainsi que pour certains fournisseurs de réseau comme les pilotes vpn, ou les filtres anti-spam, anti-virus ou anti-spyware.

    + + L'AcceptFilter <code>data</code> (Windows) + +

    Jusqu'à la version 2.4.23, le filtre d'acceptation data + attendait que des données aient été transmises et que le tampon de données + initial et l'adresse réseau finale aient été déterminés par l'invocation + AcceptEx(). Cette implémentation étant vulnérable à une attaque de type + denial of service, elle a été désactivée.

    + +

    La version actuelle de httpd prend par défaut le filtre + connect sous Windows, et reprendra la valeur + data si data est spécifié. Il est fortement + conseillé aux utilisateurs des versions plus anciennes de définir + explicitement le filtre connect pour leurs AcceptFilter + comme indiqué plus haut.

    +
    +
    -Protocol +Protocol AcceptPathInfo Les ressources acceptent des informations sous forme d'un -nom de chemin en fin de requête. +nom de chemin en fin de requête. AcceptPathInfo On|Off|Default AcceptPathInfo Default server config virtual hostdirectory .htaccess FileInfo -Disponible dans Apache httpd version 2.0.30 et -supérieures -

    Cette directive permet de définir si les requêtes contenant des +

    Cette directive permet de définir si les requêtes contenant des informations sous forme d'un nom de chemin suivant le nom d'un - fichier réel (ou un fichier qui n'existe pas dans un répertoire qui - existe) doivent être acceptées ou rejetées. Les scripts peuvent - accéder à cette information via la variable d'environnement + fichier réel (ou un fichier qui n'existe pas dans un répertoire qui + existe) doivent être acceptées ou rejetées. Les scripts peuvent + accéder à cette information via la variable d'environnement PATH_INFO.

    Supposons par exemple que /test/ pointe vers un - répertoire qui ne contient que le fichier here.html. - Les requêtes pour /test/here.html/more et + répertoire qui ne contient que le fichier here.html. + Les requêtes pour /test/here.html/more et /test/nothere.html/more vont affecter la valeur - /more à la variable d'environnement + /more à la variable d'environnement PATH_INFO.

    L'argument de la directive AcceptPathInfo - possède trois valeurs possibles :

    + possède trois valeurs possibles :

    -
    Off
    Une requête ne sera acceptée que si - elle correspond à un chemin qui existe. Par conséquent, une requête - contenant une information de chemin après le nom de fichier réel +
    Off
    Une requête ne sera acceptée que si + elle correspond à un chemin qui existe. Par conséquent, une requête + contenant une information de chemin après le nom de fichier réel comme /test/here.html/more dans l'exemple ci-dessus renverra une erreur "404 NOT FOUND".
    -
    On
    Une requête sera acceptée si la partie - principale du chemin correspond à un fichier existant. Dans - l'exemple ci-dessus /test/here.html/more, la requête - sera acceptée si /test/here.html correspond à un nom de +
    On
    Une requête sera acceptée si la partie + principale du chemin correspond à un fichier existant. Dans + l'exemple ci-dessus /test/here.html/more, la requête + sera acceptée si /test/here.html correspond à un nom de fichier valide.
    -
    Default
    Le traitement des requêtes est - déterminé par le gestionnaire responsable de la requête. - Le gestionnaire de base pour les fichiers normaux rejette par défaut - les requêtes avec PATH_INFO. Les gestionnaires qui +
    Default
    Le traitement des requêtes est + déterminé par le gestionnaire responsable de la requête. + Le gestionnaire de base pour les fichiers normaux rejette par défaut + les requêtes avec PATH_INFO. Les gestionnaires qui servent des scripts, commecgi-script et isapi-handler, acceptent en général par - défaut les requêtes avec PATH_INFO.
    + href="mod_isapi.html">isapi-handler, acceptent en général par + défaut les requêtes avec PATH_INFO.

    Le but premier de la directive AcceptPathInfo est de vous permettre de remplacer le choix du gestionnaire d'accepter ou - de rejeter PATH_INFO. Ce remplacement est nécessaire + de rejeter PATH_INFO. Ce remplacement est nécessaire par exemple, lorsque vous utilisez un filtre, comme INCLUDES, pour générer un contenu basé - sur PATH_INFO. Le gestionnaire de base va en général - rejeter la requête, et vous pouvez utiliser la configuration + href="mod_include.html">INCLUDES, pour générer un contenu basé + sur PATH_INFO. Le gestionnaire de base va en général + rejeter la requête, et vous pouvez utiliser la configuration suivante pour utiliser un tel script :

    - - - <Files "mes-chemins.shtml">
    - - Options +Includes
    - SetOutputFilter INCLUDES
    - AcceptPathInfo On
    -
    - </Files> -
    + +<Files "mypaths.shtml"> + Options +Includes + SetOutputFilter INCLUDES + AcceptPathInfo On +</Files> + +
    AccessFileName -Nom du fichier de configuration distribué +Nom du fichier de configuration distribué AccessFileName nom-du-fichier [nom-du-fichier] ... AccessFileName .htaccess @@ -211,31 +218,27 @@ host -

    Au cours du traitement d'une requête, le serveur recherche le - premier fichier de configuration existant à partir de la liste - de noms dans chaque répertoire composant le chemin du document, à - partir du moment où les fichiers de configuration distribués sont activés pour ce répertoire. Par exemple +

    Au cours du traitement d'une requête, le serveur recherche le + premier fichier de configuration existant à partir de la liste + de noms dans chaque répertoire composant le chemin du document, à + partir du moment où les fichiers de configuration distribués sont activés pour ce répertoire. Par exemple :

    - - AccessFileName .acl - + AccessFileName .acl

    avant de renvoyer le document /usr/local/web/index.html, le serveur va rechercher les fichiers /.acl, /usr/.acl, /usr/local/.acl et /usr/local/web/.acl - pour y lire d'éventuelles directives, à moins quelles n'aient été - désactivées avec

    - - - <Directory />
    - - AllowOverride None
    -
    - </Directory> -
    + pour y lire d'éventuelles directives, à moins quelles n'aient été + désactivées avec

    + + +<Directory "/"> + AllowOverride None +</Directory> +
    AllowOverride Fichiers de configuration @@ -244,10 +247,10 @@ host AddDefaultCharset -Paramètre jeu de caractères par défaut à ajouter quand le -type de contenu d'une réponse est text/plain ou +Paramètre jeu de caractères par défaut à ajouter quand le +type de contenu d'une réponse est text/plain ou text/html -AddDefaultCharset On|Off|jeu de caractères +AddDefaultCharset On|Off|jeu de caractères AddDefaultCharset Off server config virtual hostdirectory @@ -255,85 +258,82 @@ type de contenu d'une réponse est text/plain ou FileInfo -

    Cette directive spécifie une valeur par défaut pour le paramètre - jeu de caractères du type de média (le nom d'un codage de - caractères) à ajouter à une réponse, si et seulement si le type de - contenu de la réponse est soit text/plain, soit +

    Cette directive spécifie une valeur par défaut pour le paramètre + jeu de caractères du type de média (le nom d'un codage de + caractères) à ajouter à une réponse, si et seulement si le type de + contenu de la réponse est soit text/plain, soit text/html. Ceci va remplacer - tout jeu de caractères spécifié dans le corps de la réponse via un - élément META, bien que cet effet dépende en fait + tout jeu de caractères spécifié dans le corps de la réponse via un + élément META, bien que cet effet dépende en fait souvent de la configuration du client de l'utilisateur. La - définition de AddDefaultCharset Off désactive cette - fonctionnalité. AddDefaultCharset On ajoute un jeu de - caractères par défaut de iso-8859-1. Toute autre valeur - peut être définie via le paramètre jeu de caractères, qui - doit appartenir à la liste des AddDefaultCharset Off désactive cette + fonctionnalité. AddDefaultCharset On ajoute un jeu de + caractères par défaut de iso-8859-1. Toute autre valeur + peut être définie via le paramètre jeu de caractères, qui + doit appartenir à la liste des valeurs de - jeux de caractères enregistrés par l'IANA à utiliser dans les - types de média Internet (types MIME). + jeux de caractères enregistrés par l'IANA à utiliser dans les + types de média Internet (types MIME). Par exemple :

    - - AddDefaultCharset utf-8 - + AddDefaultCharset utf-8

    La directive AddDefaultCharset ne doit - être utilisée que lorsque toutes les ressources textes auxquelles - elle s'applique possèdent le jeu de caractère spécifié, et qu'il est - trop contraignant de définir leur jeu de caractères - individuellement. Un exemple de ce type est l'ajout du paramètre jeu - de caractères aux ressources comportant un contenu généré, comme les - scripts CGI hérités qui peuvent être vulnérables à des attaques de - type cross-site scripting à cause des données utilisateurs incluses + être utilisée que lorsque toutes les ressources textes auxquelles + elle s'applique possèdent le jeu de caractère spécifié, et qu'il est + trop contraignant de définir leur jeu de caractères + individuellement. Un exemple de ce type est l'ajout du paramètre jeu + de caractères aux ressources comportant un contenu généré, comme les + scripts CGI hérités qui peuvent être vulnérables à des attaques de + type cross-site scripting à cause des données utilisateurs incluses dans leur sortie. Notez cependant qu'une meilleur solution consiste - à corriger (ou supprimer) ces scripts, car la définition d'un jeu de - caractères par défaut ne protège pas les utilisateurs qui ont activé - la fonctionnalité "Détection automatique de l'encodage des - caractères" dans leur navigateur.

    + à corriger (ou supprimer) ces scripts, car la définition d'un jeu de + caractères par défaut ne protège pas les utilisateurs qui ont activé + la fonctionnalité "Détection automatique de l'encodage des + caractères" dans leur navigateur.

    AddCharset AllowEncodedSlashes -Détermine si les séparateurs de chemin encodés sont -autorisés à transiter dans les URLs tels quels +Détermine si les séparateurs de chemin encodés sont +autorisés à transiter dans les URLs tels quels AllowEncodedSlashes On|Off|NoDecode AllowEncodedSlashes Off server configvirtual host -Disponible dans Apache httpd version 2.0.46 et -supérieures. L'option NoDecode est disponible depuis la version +L'option NoDecode est disponible depuis la version 2.3.12.

    La directive AllowEncodedSlashes permet - l'utilisation des URLs contenant des séparateurs de chemin - encodés dans la partie chemin - (%2F pour / et même %5C pour - \ sur les systèmes concernés).

    + l'utilisation des URLs contenant des séparateurs de chemin + encodés dans la partie chemin + (%2F pour / et même %5C pour + \ sur les systèmes concernés).

    -

    Avec la valeur par défaut, Off, de telles URLs sont - refusées et provoquent le renvoi d'une erreur 404 (Not found).

    +

    Avec la valeur par défaut, Off, de telles URLs sont + refusées et provoquent le renvoi d'une erreur 404 (Not found).

    -

    Avec la valeur On, ces URLs sont acceptées, et les - slashes encodés sont décodés comme tout autre caractère codé.

    +

    Avec la valeur On, ces URLs sont acceptées, et les + slashes encodés sont décodés comme tout autre caractère codé.

    -

    Avec la valeur NoDecode, ces URLs sont acceptées, - mais les slashes codés ne sont pas décodés et laissés dans leur état - codé.

    +

    Avec la valeur NoDecode, ces URLs sont acceptées, + mais les slashes codés ne sont pas décodés et laissés dans leur état + codé.

    -

    Définir AllowEncodedSlashes à +

    Définir AllowEncodedSlashes à On est surtout utile en association avec PATH_INFO.

    Note -

    Si le codage des slashes dans la partie chemin est nécessaire, +

    Si le codage des slashes dans la partie chemin est nécessaire, l'utilisation de l'option NoDecode est fortement - recommandée par mesure de sécurité. Permettre le décodage des - slashes pourrait éventuellement induire l'autorisation de chemins - non sûrs.

    + recommandée par mesure de sécurité. Permettre le décodage des + slashes pourrait éventuellement induire l'autorisation de chemins + non sûrs.

    AcceptPathInfo @@ -341,26 +341,26 @@ supérieures. L'option NoDecode est disponible depuis la version AllowOverride -Types de directives autorisées dans les fichiers +Types de directives autorisées dans les fichiers .htaccess AllowOverride All|None|type directive [type directive] ... -AllowOverride None à partir de la version 2.3.9, AllowOverride -All pour les versions antérieures +AllowOverride None à partir de la version 2.3.9, AllowOverride +All pour les versions antérieures directory

    Lorsque le serveur trouve un fichier .htaccess (dont - le nom est défini par la directive AccessFileName), il doit savoir lesquelles - des directives placées dans ce fichier sont autorisées à modifier la - configuration préexistante.

    + des directives placées dans ce fichier sont autorisées à modifier la + configuration préexistante.

    Valable seulement dans les sections <Directory> - La directive AllowOverride ne peut être - utilisée que dans les sections Directory définies sans expressions + La directive AllowOverride ne peut être + utilisée que dans les sections Directory définies sans expressions rationnelles, et non dans les sections Location, DirectoryMatch ou @@ -368,15 +368,15 @@ All pour les versions antérieures

    Lorsque cette directive et la directive AllowOverrideList sont définies à None, les + module="core">AllowOverrideList sont définies à None, les fichiers .htaccess sont totalement - ignorés. Dans ce cas, le serveur n'essaiera même pas de lire les - fichiers .htaccess du système de fichiers.

    + ignorés. Dans ce cas, le serveur n'essaiera même pas de lire les + fichiers .htaccess du système de fichiers.

    -

    Lorsque cette directive est définie à All, toute +

    Lorsque cette directive est définie à All, toute directive valable dans le Contexte .htaccess sera - autorisée dans les fichiers .htaccess.

    + autorisée dans les fichiers .htaccess.

    L'argument type directive peut contenir les groupements de directives suivants :

    @@ -387,7 +387,7 @@ All pour les versions antérieures
    Permet l'utilisation des directives d'autorisation (AuthDBMGroupFile, + module="mod_authz_dbm">AuthDBMGroupFile, AuthDBMUserFile, AuthGroupFile, AuthName, @@ -398,7 +398,7 @@ All pour les versions antérieures
    FileInfo
    - Permet l'utilisation des directives qui contrôlent les types de + Permet l'utilisation des directives qui contrôlent les types de documents (directives ErrorDocument, ForceType, SetHandler, SetInputFilter, SetOutputFilter, et directives du - module mod_mime Add* et Remove*), des metadonnées + module mod_mime Add* et Remove*), des metadonnées des documents (Header, RequestHeader, module="mod_usertrack">CookieStyle, CookieTracking, CookieName), des directives du - module mod_rewrite mod_rewrite directives (RewriteEngine, RewriteOptions, RewriteBase, RewriteCond, RewriteRule) et de la directive + module="mod_rewrite">RewriteRule), des directives du + module mod_alias directives (Redirect, RedirectTemp, RedirectPermanent, RedirectMatch), et de la directive Action du module mod_actions.
    @@ -431,15 +436,16 @@ All pour les versions antérieures
    Indexes
    - Permet l'utilisation des directives qui contrôlent l'indexation - des répertoires (AddDescription, AddIcon, AddIconByEncoding, AddIconByType, DefaultIcon, DirectoryIndex, FancyIndexing, DirectoryIndex, FancyIndexing, + HeaderName, IndexIgnore, IndexOptions,
    Limit
    - Permet l'utilisation des directives contrôlant l'accès au serveur + Permet l'utilisation des directives contrôlant l'accès au serveur (Allow, Deny et Order).
    + module="mod_access_compat">Allow, Deny et Order). + +
    Nonfatal=[Override|Unknown|All]
    + +
    + Permet d'utiliser l'option AllowOverride pour rendre les erreurs + de syntaxe non fatales dans les fichiers .htaccess : au lieu de + causer une Internal Server Error, les directives non autorisées ou + non reconnues seront ignorées et un avertissement enregistré dans + le journal : +
      +
    • Nonfatal=Override rend les directives + interdite par AllowOverride non fatales.
    • +
    • Nonfatal=Unknown rend les directives + inconnues non fatales. Sont concernées les erreurs de frappe + et les directives implémentées par un module non chargé.
    • +
    • Nonfatal=All rend toutes les directives + précédentes non fatales.
    • +
    +

    Notez qu'une erreur de syntaxe dans une directive valide + causera toujours une internal server error.

    + Sécurité + Les erreurs non fatales peuvent être à l'origine de problèmes + de sécurité pour les utilisateurs de fichiers .htaccess. Par + exemple, si AllowOverride interdit AuthConfig, toute + configuration utilisateur destinée à restreindre l'accès à un + site ne sera pas prise en compte. + +
    Options[=Option,...]
    - Permet l'utilisation des directives contrôlant les fonctionnalités - spécifiques d'un répertoire (Options et XBitHack). "Options" doit être - suivi d'un signe "égal", puis d'une liste d'options séparées par des - virgules (pas d'espaces) ; ces options doivent être définies à + module="mod_include">XBitHack). "Options" doit être + suivi d'un signe "égal", puis d'une liste d'options séparées par des + virgules (pas d'espaces) ; ces options doivent être définies à l'aide de la commande Options. - Désactivation implicite des options + Désactivation implicite des options

    Bien que la liste des options disponibles dans les fichiers - .htaccess puisse être limitée par cette directive, tant qu'un + .htaccess puisse être limitée par cette directive, tant qu'un directive Options est - autorisée, toute autre option héritée peut être désactivée en + autorisée, toute autre option héritée peut être désactivée en utilisant la syntaxe non-relative. En d'autres termes, ce - mécanisme ne peut pas forcer une option spécifique à rester - activée tout en permettant à toute autre option d'être - activée. + mécanisme ne peut pas forcer une option spécifique à rester + activée tout en permettant à toute autre option d'être + activée.

    + + + AllowOverride Options=Indexes,MultiViews +

    Exemple :

    - - AllowOverride AuthConfig Indexes - + AllowOverride AuthConfig Indexes

    Dans l'exemple ci-dessus, toutes les directives qui ne font partie ni du groupe AuthConfig, ni du groupe Indexes, provoquent une erreur "internal server error".

    -

    Pour des raisons de sécurité et de performance, ne - définissez pas AllowOverride à autre chose que - None dans votre bloc <Directory />. - Recherchez plutôt (ou créez) le bloc <Directory> - qui se réfère au répertoire où vous allez précisément placer un +

    Pour des raisons de sécurité et de performance, ne + définissez pas AllowOverride à autre chose que + None dans votre bloc <Directory "/">. + Recherchez plutôt (ou créez) le bloc <Directory> + qui se réfère au répertoire où vous allez précisément placer un fichier .htaccess.

    @@ -508,7 +544,7 @@ All pour les versions antérieures AllowOverrideList -Directives autorisées dans les fichiers .htaccess +Directives autorisées dans les fichiers .htaccess AllowOverrideList None|directive [directive-type] ... AllowOverrideList None @@ -516,42 +552,42 @@ All pour les versions antérieures

    Lorsque le serveur trouve un fichier .htaccess - (comme spécifié par la directive AccessFileName), il doit savoir lesquelles - des directives déclarées dans ce fichier peuvent remplacer des + des directives déclarées dans ce fichier peuvent remplacer des directives des fichiers de configuration du serveur.

    Seulement disponible dans les sections <Directory> La directive AllowOverrideList n'est disponible que dans les sections Directory spécifiées sans expressions + module="core">Directory spécifiées sans expressions rationnelles.

    Lorsque cette directive et la directive AllowOverride sont définies à + module="core">AllowOverride sont définies à None, les fichiers .htaccess sont totalement ignorés. Dans - ce cas, le serveur ne cherchera même pas à lire des fichiers - .htaccess dans le système de fichiers.

    + href="#accessfilename">.htaccess sont totalement ignorés. Dans + ce cas, le serveur ne cherchera même pas à lire des fichiers + .htaccess dans le système de fichiers.

    Example:

    - - AllowOverride None
    - AllowOverrideList Redirect RedirectMatch -
    + +AllowOverride None +AllowOverrideList Redirect RedirectMatch +

    Dans l'exemple ci-dessus, seules les directives - Redirect et RedirectMatch sont autorisées. + Redirect et RedirectMatch sont autorisées. Toutes les autres provoqueront une erreur interne du serveur.

    Example:

    - - AllowOverride AuthConfig
    - AllowOverrideList CookieTracking CookieName -
    + +AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieName +

    Dans l'exemple ci-dessus, la directive AllowOverride autorise les directives du @@ -569,7 +605,7 @@ All pour les versions antérieures CGIMapExtension -Technique permettant de localiser l'interpréteur des +Technique permettant de localiser l'interpréteur des scripts CGI CGIMapExtension chemin CGI .extension directory.htaccess @@ -578,18 +614,86 @@ scripts CGI NetWare uniquement -

    Cette directive permet de contrôler la manière dont Apache httpd trouve - l'interpréteur servant à exécuter les scripts CGI. Par exemple, avec - la définition CGIMapExtension sys:\foo.nlm .foo, tous - les fichiers scripts CGI possédant une extension .foo - seront passés à l'interpréteur FOO.

    +

    Cette directive permet de contrôler la manière dont Apache httpd trouve + l'interpréteur servant à exécuter les scripts CGI. Par exemple, avec + la définition CGIMapExtension sys:\foo.nlm .foo, tous + les fichiers scripts CGI possédant une extension .foo + seront passés à l'interpréteur FOO.

    +
    +
    + + +CGIPassAuth +Active la transmission d'en-têtes d'autorisation HTTP aux scripts en +tant que variables CGI +CGIPassAuth On|Off +CGIPassAuth Off +directory.htaccess + +AuthConfig +Disponible à partir de la version 2.4.13 du serveur HTTP +Apache + + +

    La directive CGIPassAuth permet aux + scripts d'accéder aux en-têtes d'autorisation HTTP tels que + Authorization, en-tête nécessaire aux scripts qui + implémente une authentification HTTP de base. Normalement, ces + en-têtes HTTP sont invisibles pour les scripts car ils leurs + permettraient de voir les identifiants et mots de passe + utilisés pour accéder au serveur lorsque l'authentification HTTP de + base est activée au niveau du serveur web. Cette directive doit être + définie à "On" lorsque des scripts sont autorisés à implémenter une + authentification HTTP de base.

    + +

    Cette directive constitue une alternative à l'option de + compilation SECURITY_HOLE_PASS_AUTHORIZATION qui était + déjà disponible dans les versions précédentes du serveur HTTP + Apache.

    + +

    Cette option est prise en compte par tout module qui utilise + ap_add_common_vars(), comme mod_cgi, + mod_cgid, mod_proxy_fcgi, + mod_proxy_scgi, etc... En particulier, elle affecte + les modules qui ne traitent pas à proprement parler les requêtes, + mais utilisent quand-même cette API, comme + mod_include ou mod_ext_filter. Les + modules tiers qui n'utilisent pas ap_add_common_vars() + peuvent aussi choisir de prendre en compte cette option.

    +
    +
    + + +CGIVar +Contrôle la manière dont certaines variables CGI sont définies +CGIVar variable rule +directory.htaccess + +FileInfo +Disponible à partir de la version 2.4.21 du serveur HTTP Apache + + +

    Cette directive permet de contrôler la manière dont certaines variables CGI + sont définies.

    + +

    règles REQUEST_URI :

    +
    +
    original-uri (valeur par défaut)
    +
    La valeur est extraite de la requête originale, et ne tient pas compte + des redirections internes ou des sous-requêtes qui pourraient modifier la + ressource demandée.
    +
    current-uri
    +
    La valeur reflète la ressource en cours de traitement ; elle peut être + différente de la ressource demandée dans la requête initiale du client suite à + d'éventuelles redirections internes ou sous-requêtes.
    +
    ContentDigest -Active la génération d'un en-tête Content-MD5 -dans la réponse HTTP +Active la génération d'un en-tête Content-MD5 +dans la réponse HTTP ContentDigest On|Off ContentDigest Off server configvirtual @@ -597,49 +701,87 @@ host directory.htaccess Options -Expérimental +Expérimental -

    Cette directive active la génération d'un en-tête - Content-MD5 selon les définitions des RFC 1864 et +

    Cette directive active la génération d'un en-tête + Content-MD5 selon les définitions des RFC 1864 et 2616.

    -

    MD5 est un algorithme permettant de générer un condensé (parfois - appelé "empreinte") à partir de données d'une taille aléatoire ; le - degré de précision est tel que la moindre altération des données - d'origine entraîne une altération de l'empreinte.

    +

    MD5 est un algorithme permettant de générer un condensé (parfois + appelé "empreinte") à partir de données d'une taille aléatoire ; le + degré de précision est tel que la moindre altération des données + d'origine entraîne une altération de l'empreinte.

    -

    L'en-tête Content-MD5 permet de vérifier - l'intégrité de la réponse HTTP dans son ensemble. Un serveur mandataire - ou un client peut utiliser cet en-tête pour rechercher une - éventuelle modification accidentelle de la réponse au cours de sa - transmission. Exemple d'en-tête :

    +

    L'en-tête Content-MD5 permet de vérifier + l'intégrité de la réponse HTTP dans son ensemble. Un serveur mandataire + ou un client peut utiliser cet en-tête pour rechercher une + éventuelle modification accidentelle de la réponse au cours de sa + transmission. Exemple d'en-tête :

    Content-MD5: AuLb7Dp1rqtRtxz2m9kRpA== -

    Notez que des problèmes de performances peuvent affecter votre - serveur, car l'empreinte est générée pour chaque requête (il n'y a +

    Notez que des problèmes de performances peuvent affecter votre + serveur, car l'empreinte est générée pour chaque requête (il n'y a pas de mise en cache).

    -

    L'en-tête Content-MD5 n'est envoyé qu'avec les - documents servis par le module core, à l'exclusion +

    L'en-tête Content-MD5 n'est envoyé qu'avec les + documents servis par le module core, à l'exclusion de tout autre module. Ainsi, les documents SSI, les sorties de - scripts CGI, et les réponses à des requêtes partielles (byte range) - ne comportent pas cet en-tête.

    + scripts CGI, et les réponses à des requêtes partielles (byte range) + ne comportent pas cet en-tête.

    +
    +
    + + +DefaultRuntimeDir +Répertoire de base des fichiers créés au cours de l'exécution du serveur +DefaultRuntimeDir chemin-répertoire +DefaultRuntimeDir DEFAULT_REL_RUNTIMEDIR (logs/) +server config +Disponible depuis la version 2.4.2 du serveur HTTP Apache + + +

    La directive DefaultRuntimeDir permet de + définir le répertoire dans lequel le serveur va créer les différents + fichiers relatifs à son exécution (mémoire partagée, verrous, + etc...). Si le chemin spécifié est relatif, le chemin absolu sera + généré relativement à la valeur de la directive + ServerRoot

    + +

    Example

    + +DefaultRuntimeDir scratch/ + + +

    La valeur par défaut de la directive + DefaultRuntimeDir peut être modifiée en + changeant la valeur de la macro DEFAULT_REL_RUNTIMEDIR + définie à la compilation.

    + +

    Note: si la valeur de ServerRoot n'a pas + été spécifiée avant d'utiliser cette directive, c'est la valeur par + défaut de ServerRoot qui sera utilisée pour + définir la base du répertoire.

    +
    +Voir les conseils à propos de +sésurité pour plus d'informations en vue de définir correctement les +permissions sur la racine du serveur ServerRoot
    DefaultType -Les seuls effets de cette directive sont des émissions -d'avertissements si sa valeur est différente de none. Dans -les versions précédentes, DefaultType permettait de spécifier un type de -média à assigner par défaut au contenu d'une réponse pour lequel aucun -autre type de média n'avait été trouvé. +Les seuls effets de cette directive sont des émissions +d'avertissements si sa valeur est différente de none. Dans +les versions précédentes, DefaultType permettait de spécifier un type de +média à assigner par défaut au contenu d'une réponse pour lequel aucun +autre type de média n'avait été trouvé. -DefaultType type média|none +DefaultType type média|none DefaultType none server configvirtual host @@ -647,75 +789,83 @@ host FileInfo L'argument none est disponible dans les -versions d'Apache httpd 2.2.7 et supérieures. Tous les autres choix sont -DESACTIVÉS à partir des version 2.3.x. +versions d'Apache httpd 2.2.7 et supérieures. Tous les autres choix sont +DESACTIVÉS à partir des version 2.3.x.
    -

    Cette directive a été désactivée. Pour la compatibilité +

    Cette directive a été désactivée. Pour la compatibilité ascendante avec les anciens fichiers de configuration, elle peut - être spécifiée avec la valeur none, c'est à dire sans - type de médium par défaut. Par exemple :

    + être spécifiée avec la valeur none, c'est à dire sans + type de médium par défaut. Par exemple :

    + + DefaultType None - - DefaultType None -

    DefaultType None n'est disponible que dans les - versions d'Apache 2.2.7 et supérieures.

    + versions d'Apache 2.2.7 et supérieures.

    Utilisez le fichier de configuration mime.types et la directive AddType pour configurer - l'assignement d'un type de médium via les extensions de fichiers, ou + l'assignement d'un type de médium via les extensions de fichiers, ou la directive ForceType pour - attribuer un type de médium à des ressources spécifiques. Dans le - cas contraire, le serveur enverra sa réponse sans champ d'en-tête - Content-Type, et le destinataire devra déterminer lui-même le type - de médium.

    + attribuer un type de médium à des ressources spécifiques. Dans le + cas contraire, le serveur enverra sa réponse sans champ d'en-tête + Content-Type, et le destinataire devra déterminer lui-même le type + de médium.

    Define -Permet de définir une variable -Define nom-paramètre [valeur-paramètre] +Permet de définir une variable +Define nom-paramètre [valeur-paramètre] server configvirtual host directory -

    Avec un seul paramètre, l'effet de la directive - Define est identique à celui de l'argument +

    Avec un seul paramètre, l'effet de la directive + Define est identique à celui de l'argument -D du programme httpd. Il permet de modifier le comportement des sections IfDefine sans avoir à ajouter d'argument - -D au sein des scripts de démarrage.

    + type="section">IfDefine sans avoir à ajouter d'argument + -D au sein des scripts de démarrage.

    -

    De plus, le second paramètre permet d'affecter une valeur à la - variable définie par le premier. Cette variable peut être référencée +

    De plus, le second paramètre permet d'affecter une valeur à la + variable définie par le premier. Cette variable peut être référencée dans le fichier de configuration via la syntaxe ${VAR}. - La portée de la variable est toujours globale, et n'est jamais - limitée à la section de configuration courante.

    - - - <IfDefine TEST>
    -   Define servername test.example.com
    - </IfDefine>
    - <IfDefine !TEST>
    -   Define servername www.example.com
    -   Define SSL
    - </IfDefine>
    -
    - -

    Le caractère ":" est interdit dans les noms de variables afin - d'éviter les conflits avec la syntaxe de la directive + + +<IfDefine TEST> + Define servername test.example.com +</IfDefine> +<IfDefine !TEST> + Define servername www.example.com + Define SSL +</IfDefine> + +DocumentRoot "/var/www/${servername}/htdocs" + + +

    Le caractère ":" est interdit dans les noms de variables afin + d'éviter les conflits avec la syntaxe de la directive RewriteMap.

    + +

    Si cette directive est définie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultérieure, au delà de tout bloc VirtualHost. Le support des autres sections + de configuration a été permis par erreur par l'implémentation initiale de + cette directive, et n'est conservé (avec des effets imprévisibles) que dans un + but de compatibilité ascendante.

    Directory Regroupe un ensemble de directives qui ne s'appliquent -qu'au répertoire concerné du système de fichiers, à ses -sous-répertoires, et à leur contenu. -<Directory chemin répertoire> +qu'au répertoire concerné du système de fichiers, à ses +sous-répertoires, et à leur contenu. +<Directory chemin répertoire> ... </Directory> server configvirtual host @@ -724,149 +874,145 @@ host

    Les balises Directory et </Directory> permettent de regrouper un ensemble - de directives qui ne s'appliquent qu'au répertoire précisé, - à ses sous-répertoires, et aux fichiers situés dans ces - sous-répertoires. Toute directive - autorisée dans un contexte de répertoire peut être utilisée. - chemin répertoire est soit le chemin absolu d'un - répertoire, soit une chaîne de caractères avec caractères génériques - utilisant la comparaison Unix de style shell. Dans une chaîne de - caractères avec caractères génériques, ? correspond à - un caractère quelconque, et * à toute chaîne de - caractères. Les intervalles de caractères [] sont aussi - autorisés. Aucun caractère générique ne peut remplacer le caractère + de directives qui ne s'appliquent qu'au répertoire précisé, + à ses sous-répertoires, et aux fichiers situés dans ces + sous-répertoires. Toute directive + autorisée dans un contexte de répertoire peut être utilisée. + chemin répertoire est soit le chemin absolu d'un + répertoire, soit une chaîne de caractères avec caractères génériques + utilisant la comparaison Unix de style shell. Dans une chaîne de + caractères avec caractères génériques, ? correspond à + un caractère quelconque, et * à toute chaîne de + caractères. Les intervalles de caractères [] sont aussi + autorisés. Aucun caractère générique ne peut remplacer le caractère `/', si bien que l'expression <Directory - /*/public_html> ne conviendra pas pour le chemin + "/*/public_html"> ne conviendra pas pour le chemin * /home/user/public_html, alors que <Directory - /home/*/public_html> conviendra. Exemple :

    + "/home/*/public_html"> conviendra. Exemple :

    - - <Directory /usr/local/httpd/htdocs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory> -
    + +<Directory "/usr/local/httpd/htdocs"> + Options Indexes FollowSymLinks +</Directory> + + +

    Les chemins de répertoires contenant des espaces doivent être + entourés de guillemets afin d'empêcher l'interprétation de ces + espaces comme fins d'arguments.

    -

    Soyez prudent avec l'argument chemin répertoire : il - doit correspondre exactement au chemin du système de fichier - qu'Apache httpd utilise pour accéder aux fichiers. Les directives +

    Soyez prudent avec l'argument chemin répertoire : il + doit correspondre exactement au chemin du système de fichier + qu'Apache httpd utilise pour accéder aux fichiers. Les directives comprises dans une section <Directory> ne - s'appliqueront pas aux fichiers du même répertoire auxquels on - aura accédé via un chemin différent, per exemple via un lien + s'appliqueront pas aux fichiers du même répertoire auxquels on + aura accédé via un chemin différent, per exemple via un lien symbolique.

    Les Expressions rationnelles - peuvent aussi être utilisées en ajoutant le caractère + peuvent aussi être utilisées en ajoutant le caractère ~. Par exemple :

    - - <Directory ~ "^/www/.*/[0-9]{3}"> - + +<Directory ~ "^/www/[0-9]{3}"> -

    pourra correspondre à tout répertoire situé dans /www/ et dont le +</Directory> + + +

    pourra correspondre à tout répertoire situé dans /www/ et dont le nom se compose de trois chiffres.

    Si plusieurs sections Directory (sans expression rationnelle) - correspondent au répertoire (ou à un de ses parents) qui contient le + correspondent au répertoire (ou à un de ses parents) qui contient le document, les directives de la section Directory dont le chemin est le plus - court sont appliquées en premier, en s'intercalant avec les + court sont appliquées en premier, en s'intercalant avec les directives des fichiers .htaccess. Par exemple, avec

    - - <Directory />
    - - AllowOverride None
    -
    - </Directory>
    -
    - <Directory /home>
    - - AllowOverride FileInfo
    -
    - </Directory> -
    + +<Directory "/"> + AllowOverride None +</Directory> + +<Directory "/home"> + AllowOverride FileInfo +</Directory> + -

    l'accès au document /home/web/dir/doc.html emprunte +

    l'accès au document /home/web/dir/doc.html emprunte le chemin suivant :

    • Aplication de la directive AllowOverride None - (qui désactive les fichiers .htaccess).
    • + (qui désactive les fichiers .htaccess).
    • Application de la directive AllowOverride - FileInfo (pour le répertoire /home).
    • + FileInfo (pour le répertoire /home).
    • Application de toute directive FileInfo qui se - trouverait dans d'éventuels fichiers /home/.htaccess, + trouverait dans d'éventuels fichiers /home/.htaccess, /home/web/.htaccess ou /home/web/dir/.htaccess, dans cet ordre.
    -

    Les directives associées aux répertoires sous forme d'expressions +

    Les directives associées aux répertoires sous forme d'expressions rationnelles ne sont prises en compte qu'une fois toutes les - directives des sections sans expressions rationnelles appliquées. - Alors, tous les répertoires avec expressions rationnelles sont - testés selon l'ordre dans lequel ils apparaissent dans le fichier de + directives des sections sans expressions rationnelles appliquées. + Alors, tous les répertoires avec expressions rationnelles sont + testés selon l'ordre dans lequel ils apparaissent dans le fichier de configuration. Par exemple, avec

    - - <Directory ~ abc$>
    - - # ... directives here ...
    -
    - </Directory> -
    + +<Directory ~ "abc$"> + # ... directives ici ... +</Directory> +

    la section avec expression rationnelle ne sera prise en compte - qu'après les sections Directory sans expression rationnelle et les fichiers .htaccess. Alors, l'expression rationnelle conviendra pour /home/abc/public_html/abc et la section Directory correspondante s'appliquera.

    -

    Notez que la politique d'accès par défaut - dans les sections <Directory /> consiste à - autoriser tout accès sans restriction. Ceci signifie qu'Apache httpd va servir tout fichier - correspondant à une URL. Il est recommandé de modifier cette - situation à l'aide d'un bloc du style

    +

    Notez que la politique d'accès par défaut + dans les sections <Directory "/"> consiste à + autoriser tout accès sans restriction. Ceci signifie qu'Apache httpd va servir tout fichier + correspondant à une URL. Il est recommandé de modifier cette + situation à l'aide d'un bloc du style

    - - <Directory />
    - - Require all denied
    -
    - </Directory> -
    + +<Directory "/"> + Require all denied +</Directory> + -

    puis d'affiner la configuration pour les répertoires que vous +

    puis d'affiner la configuration pour les répertoires que vous voulez rendre accessibles. Voir la page Conseils à propos de sécurité - pour plus de détails.

    + href="../misc/security_tips.html">Conseils à propos de sécurité + pour plus de détails.

    Les sections Directory se situent dans le fichier httpd.conf. Les directives Directory ne peuvent pas être imbriquées - et ne sont pas autorisées dans les sections Directory ne peuvent pas être imbriquées + et ne sont pas autorisées dans les sections Limit ou LimitExcept.

    Comment fonctionnent les sections <Directory>, <Location> et <Files> pour des -explications à propos de la manière dont ces différentes sections se -combinent entre elles à la réception d'une requête +explications à propos de la manière dont ces différentes sections se +combinent entre elles à la réception d'une requête
    DirectoryMatch -Regroupe des directives qui s'appliquent au contenu de répertoires -du système de fichiers correspondant à une expression rationnelle +Regroupe des directives qui s'appliquent au contenu de répertoires +du système de fichiers correspondant à une expression rationnelle <DirectoryMatch regex> ... </DirectoryMatch> server config @@ -876,88 +1022,105 @@ du système de fichiers correspondant à une expression rationnelle<

    Les balises DirectoryMatch et </DirectoryMatch> permettent de regrouper un - ensemble de directives qui ne s'appliqueront qu'au répertoire - précisé (et aux fichiers qu'il contient), comme pour la section Directory. Cependant, le - répertoire est précisé sous la forme d'une expression rationnelle. Par exemple :

    - - <DirectoryMatch "^/www/(.+/)?[0-9]{3}"> - + +<DirectoryMatch "^/www/(.+/)?[0-9]{3}/"> + # ... +</DirectoryMatch> + -

    conviendrait pour les sous-répertoires de /www/ dont +

    convient pour les sous-répertoires de /www/ dont le nom se compose de trois chiffres.

    - Compatibilité + Compatibilité Avant la version 2.3.9, cette directive s'appliquait aussi aux - sous-répertoires (comme la directive Directory), et ne tenait pas compte du symbole de fin de ligne ($). Depuis la version 2.3.9, seuls les - répertoires qui correspondent à l'expression sont affectés par les + répertoires qui correspondent à l'expression sont affectés par les directives contenues dans la section. slash de fin - Cette directive s'applique aux requêtes pour des répertoires avec + Cette directive s'applique aux requêtes pour des répertoires avec ou sans slash de fin ; les expressions contenant un symbole de fin de ligne ($) doivent donc faire l'objet d'une attention - particulière. + particulière. + +

    A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.

    + + +<DirectoryMatch "^/var/www/combined/(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</DirectoryMatch> + +
    Directory -pour une description de la manière dont les expressions rationnelles -sont traitées en présence d'autres sections Directory sans expressions rationnelles Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication à propos de la manière dont ces différentes sections se -combinent entre elles à la réception d'une requête +explication à propos de la manière dont ces différentes sections se +combinent entre elles à la réception d'une requête
    DocumentRoot Racine principale de l'arborescence des documents visible depuis Internet -DocumentRoot chemin répertoire -DocumentRoot /usr/local/apache/htdocs +DocumentRoot chemin répertoire +DocumentRoot "/usr/local/apache/htdocs" server configvirtual host -

    Cette directive permet de définir le répertoire à partir duquel +

    Cette directive permet de définir le répertoire à partir duquel httpd va servir les fichiers. S'il ne correspond - pas à un Alias, le chemin - de l'URL sera ajouté par le serveur à la racine des documents afin - de construire le chemin du document recherché. Exemple :

    + pas à un Alias, le chemin + de l'URL sera ajouté par le serveur à la racine des documents afin + de construire le chemin du document recherché. Exemple :

    - - DocumentRoot /usr/web - + DocumentRoot "/usr/web" -

    un accès à http://my.example.com/index.html se - réfère alors à /usr/web/index.html. Si chemin - répertoire n'est pas un chemin absolu, il est considéré comme - relatif au chemin défini par la directive un accès à http://my.example.com/index.html se + réfère alors à /usr/web/index.html. Si chemin + répertoire n'est pas un chemin absolu, il est considéré comme + relatif au chemin défini par la directive ServerRoot.

    -

    Le répertoire défini par la directive +

    Le répertoire défini par la directive DocumentRoot ne doit pas comporter de slash final.

    Mise en -correspondance des URLs avec le système de fichiers +correspondance des URLs avec le système de fichiers
    Else Contient des directives qui ne s'appliquent que si la -condition correspondant à la section If ou ElseIf précédente n'est pas satisfaite par la -requête à l'exécution +module="core">ElseIf précédente n'est pas satisfaite par la +requête à l'exécution <Else> ... </Else> server configvirtual host directory.htaccess @@ -967,33 +1130,33 @@ requête à l'exécution

    La section Else applique les directives qu'elle contient si et seulement si les conditions - correspondant à la section If - ou ElseIf immédiatement - supérieure et dans la même portée n'ont pas été satisfaites. Par + correspondant à la section If + ou ElseIf immédiatement + supérieure et dans la même portée n'ont pas été satisfaites. Par exemple, dans :

    - - <If "-z req('Host')">
    - ...
    - </If>
    - <Else>
    - ...
    - </Else>
    -
    + +<If "-z req('Host')"> + # ... +</If> +<Else> + # ... +</Else> +

    La condition de la section If serait satisfaite pour les requêtes - HTTP/1.0 sans en-tête Host:, alors que celle de la section + type="section">If serait satisfaite pour les requêtes + HTTP/1.0 sans en-tête Host:, alors que celle de la section Else le serait pour les - requêtes comportant un en-tête Host:.

    + requêtes comportant un en-tête Host:.

    If ElseIf Fonctionnement des sections <Directory>, <Location>, - <Files> pour une explication de la manière dont ces - différentes section se combinent entre elles lorsqu'une requête est - reçue. Les directives If, + <Files> pour une explication de la manière dont ces + différentes section se combinent entre elles lorsqu'une requête est + reçue. Les directives If, ElseIf, et Else s'appliquent en dernier.
    @@ -1001,10 +1164,10 @@ requête à l'exécution ElseIf Contient des directives qui ne s'appliquent que si la -condition correspondante est satisfaite par une requête à l'exécution, -alors que la condition correspondant à la section If ou ElseIf précédente ne l'était pas. +type="section">ElseIf précédente ne l'était pas. <ElseIf expression> ... </ElseIf> server configvirtual host directory.htaccess @@ -1015,43 +1178,43 @@ type="section">ElseIf précédente ne l'était pas

    La section ElseIf applique les directives qu'elle contient si et seulement si d'une part la condition correspondante est satisfaite, et d'autre part la condition - correspondant à la section If - ou ElseIf de la même portée ne + correspondant à la section If + ou ElseIf de la même portée ne l'est pas. Par exemple, dans :

    - - <If "-R '10.1.0.0/16'">
    - ...
    - </If>
    - <ElseIf "-R '10.0.0.0/8'">
    - ...
    - </ElseIf>
    - <Else>
    - ...
    - </Else>
    -
    - -

    La condition correspondant à la section +<If "-R '10.1.0.0/16'"> + #... +</If> +<ElseIf "-R '10.0.0.0/8'"> + #... +</ElseIf> +<Else> + #... +</Else> + + +

    La condition correspondant à la section ElseIf est satisfaite si l'adresse - distante de la requête appartient au sous-réseau 10.0.0.0/8, mais - pas si elle appartient au sous-réseau 10.1.0.0/16.

    + distante de la requête appartient au sous-réseau 10.0.0.0/8, mais + pas si elle appartient au sous-réseau 10.1.0.0/16.

    Les expressions dans le serveur HTTP -Apache, pour une référence complète et d'autres exemples. +Apache, pour une référence complète et d'autres exemples. If Else Fonctionnement des sections <Directory>, <Location>, - <Files> pour une explication de la manière dont ces - différentes section se combinent entre elles lorsqu'une requête est - reçue. Les directives If, + <Files> pour une explication de la manière dont ces + différentes section se combinent entre elles lorsqu'une requête est + reçue. Les directives If, ElseIf, et Else s'appliquent en dernier.
    EnableMMAP -Utilise la projection en mémoire (Memory-Mapping) pour +Utilise la projection en mémoire (Memory-Mapping) pour lire les fichiers pendant qu'ils sont servis EnableMMAP On|Off EnableMMAP On @@ -1062,48 +1225,44 @@ host FileInfo -

    Cette directive définit si httpd peut utiliser - la projection en mémoire (Memory-Mapping) quand il doit lire le contenu - d'un fichier pendant qu'il est servi. Par défaut, lorsque le - traitement d'une requête requiert l'accès aux données contenues dans - un fichier -- par exemple, pour servir un fichier interprété par le - serveur à l'aide de mod_include -- Apache httpd projette - le fichier en mémoire si le système d'exploitation le permet.

    - -

    Cette projection en mémoire induit parfois une amélioration des - performances. Sur certains systèmes cependant, il est préférable de - désactiver la projection en mémoire afin d'éviter certains problèmes - opérationnels :

    +

    Cette directive définit si httpd peut utiliser + la projection en mémoire (Memory-Mapping) quand il doit lire le contenu + d'un fichier pendant qu'il est servi. Par défaut, lorsque le + traitement d'une requête requiert l'accès aux données contenues dans + un fichier -- par exemple, pour servir un fichier interprété par le + serveur à l'aide de mod_include -- Apache httpd projette + le fichier en mémoire si le système d'exploitation le permet.

    + +

    Cette projection en mémoire induit parfois une amélioration des + performances. Sur certains systèmes cependant, il est préférable de + désactiver la projection en mémoire afin d'éviter certains problèmes + opérationnels :

      -
    • Sur certains systèmes multi-processeurs, la projection en - mémoire peut dégrader les performances du programme +
    • Sur certains systèmes multi-processeurs, la projection en + mémoire peut dégrader les performances du programme httpd.
    • -
    • S'il fait l'objet d'une projection en mémoire par +
    • S'il fait l'objet d'une projection en mémoire par httpd, la suppression ou la troncature d'un fichier peut provoquer un crash de httpd avec une erreur de segmentation.
    -

    Pour les configurations de serveur sujettes à ce genre de - problème, il est préférable de désactiver la projection en mémoire - des fichiers servis en spécifiant :

    +

    Pour les configurations de serveur sujettes à ce genre de + problème, il est préférable de désactiver la projection en mémoire + des fichiers servis en spécifiant :

    - - EnableMMAP Off - + EnableMMAP Off -

    Pour les montages NFS, cette fonctionnalité peut être - explicitement désactivée pour les fichiers concernés en spécifiant +

    Pour les montages NFS, cette fonctionnalité peut être + explicitement désactivée pour les fichiers concernés en spécifiant :

    - - <Directory "/chemin vers montage NFS"> - - EnableMMAP Off - - </Directory> - + +<Directory "/path-to-nfs-files"> + EnableMMAP Off +</Directory> +
    @@ -1118,67 +1277,62 @@ host directory.htaccess FileInfo -Disponible dans les versions 2.0.44 et -supérieures. Par défaut à Off depuis la version 2.3.9. +Par défaut à Off depuis la version 2.3.9. -

    Cette directive définit si le programme httpd +

    Cette directive définit si le programme httpd peut utiliser le support sendfile du noyau pour transmettre le - contenu des fichiers aux clients. Par défaut, lorsque le traitement - d'une requête ne requiert pas l'accès aux données contenues dans un + contenu des fichiers aux clients. Par défaut, lorsque le traitement + d'une requête ne requiert pas l'accès aux données contenues dans un fichier -- par exemple, pour la transmission d'un fichier statique -- Apache httpd utilise sendfile pour transmettre le contenu du fichier - sans même lire ce dernier, si le système d'exploitation le + sans même lire ce dernier, si le système d'exploitation le permet.

    -

    Ce mécanisme sendfile évite la séparation des opérations de - lecture et d'envoi, ainsi que les réservations de tampons. sur - certains systèmes cependant, ou sous certains systèmes de fichiers, - il est préférable de désactiver cette fonctionnalité afin d'éviter - certains problèmes opérationnels :

    +

    Ce mécanisme sendfile évite la séparation des opérations de + lecture et d'envoi, ainsi que les réservations de tampons. sur + certains systèmes cependant, ou sous certains systèmes de fichiers, + il est préférable de désactiver cette fonctionnalité afin d'éviter + certains problèmes opérationnels :

      -
    • Certains systèmes peuvent présenter un support sendfile - défectueux que le système de compilation n'a pas détecté, en - particulier si les exécutables ont été compilés sur une autre - machine, puis copiés sur la première avec un support sendfile - défectueux.
    • +
    • Certains systèmes peuvent présenter un support sendfile + défectueux que le système de compilation n'a pas détecté, en + particulier si les exécutables ont été compilés sur une autre + machine, puis copiés sur la première avec un support sendfile + défectueux.
    • Sous Linux, l'utilisation de sendfile induit des bogues lors de - la récupération des paquets de vérification TCP (TCP-checksum) avec - certaines cartes réseau lorsqu'on utilise IPv6.
    • -
    • Sous Linux sur Itanium, sendfile peut s'avérer incapable de + la récupération des paquets de vérification TCP (TCP-checksum) avec + certaines cartes réseau lorsqu'on utilise IPv6.
    • +
    • Sous Linux sur Itanium, sendfile peut s'avérer incapable de traiter les fichiers de plus de 2 Go.
    • -
    • Avec un montage réseau de Avec un montage réseau de DocumentRoot (par exemple NFS, SMB, CIFS, FUSE), le - noyau peut s'avérer incapable de servir un fichier de ce montage - réseau en passant par son propre cache.
    • + noyau peut s'avérer incapable de servir un fichier de ce montage + réseau en passant par son propre cache.
    -

    Pour les configurations de serveur non sujettes à ce genre de - problème, vous pouvez activer cette fonctionnalité en - spécifiant :

    +

    Pour les configurations de serveur non sujettes à ce genre de + problème, vous pouvez activer cette fonctionnalité en + spécifiant :

    - - EnableSendfile On - + EnableSendfile On -

    Pour les montages réseau, cette fonctionnalité peut être - explicitement désactivée pour les fichiers concernés en spécifiant +

    Pour les montages réseau, cette fonctionnalité peut être + explicitement désactivée pour les fichiers concernés en spécifiant :

    - - <Directory "/chemin vers montage réseau"> - - EnableSendfile Off - - </Directory> - + +<Directory "/path-to-nfs-files"> + EnableSendfile Off +</Directory> +

    Veuillez noter que la configuration de la directive - EnableSendfile dans un contexte de répertoire - ou de fichier .htaccess n'est pas supportée par + EnableSendfile dans un contexte de répertoire + ou de fichier .htaccess n'est pas supportée par mod_cache_disk. Le module ne prend en compte la - définition de EnableSendfile que dans un + définition de EnableSendfile que dans un contexte global.

    @@ -1187,39 +1341,38 @@ supérieures. Par défaut à Off depuis la version 2.3.9. Error Interrompt la lecture de la configuration avec un message -d'erreur personnalisé +d'erreur personnalisé Error message server configvirtual host directory.htaccess -à partir de la version 2.3.9 +à partir de la version 2.3.9 -

    Si une erreur peut être détectée dans la configuration, souvent +

    Si une erreur peut être détectée dans la configuration, souvent un module manquant, cette - directive peut être utilisée pour générer un message d'erreur - personnalisé, et interrompre la lecture de la configuration.

    - - Exemple - # vérification du chargement de mod_include
    - <IfModule !include_module>
    - Error mod_foo nécessite mod_include. Chargez-le via LoadModule.
    - </IfModule>
    -
    - # vérification de la définition de SSL ou (exclusif) NOSSL
    - <IfDefine SSL>
    - <IfDefine NOSSL>
    - Error SSL et NOSSL sont définies. Vous devez définir soit l'une, - soit l'autre.
    - </IfDefine>
    - </IfDefine>
    - <IfDefine !SSL>
    - <IfDefine !NOSSL>
    - Error Vous devez définir une et une seule des deux variables SSL - ou NOSSL.
    - </IfDefine>
    - </IfDefine>
    -
    + directive peut être utilisée pour générer un message d'erreur + personnalisé, et interrompre la lecture de la configuration.

    + + +# Exemple +# vérification du chargement de mod_include +<IfModule !include_module> + Error "mod_include is required by mod_foo. Load it with LoadModule." +</IfModule> + +# vérification de la définition de SSL ou (exclusif) NOSSL +<IfDefine SSL> +<IfDefine NOSSL> + Error "Both SSL and NOSSL are defined. Define only one of them." +</IfDefine> +</IfDefine> +<IfDefine !SSL> +<IfDefine !NOSSL> + Error "Either SSL or NOSSL must be defined." +</IfDefine> +</IfDefine> +
    @@ -1236,117 +1389,122 @@ host FileInfo -

    Apache httpd peut traiter les problèmes et les erreurs de quatre - manières,

    +

    Apache httpd peut traiter les problèmes et les erreurs de quatre + manières,

    1. afficher un simple message d'erreur au contenu fixe
    2. -
    3. afficher un message personnalisé
    4. +
    5. afficher un message personnalisé
    6. -
    7. rediriger vers un chemin d'URL local pour traiter - le problème ou l'erreur
    8. +
    9. rediriger en interne vers un chemin d'URL local pour traiter + le problème ou l'erreur
    10. rediriger vers une URL externe pour traiter - le problème ou l'erreur
    11. + le problème ou l'erreur
    -

    La première option constitue le comportement par défaut; pour - choisir une des trois autres options, il faut configurer Apache à +

    La première option constitue le comportement par défaut; pour + choisir une des trois autres options, il faut configurer Apache à l'aide de la directive ErrorDocument, suivie - du code de la réponse HTTP et d'une URL ou d'un message. Apache - httpd fournit parfois des informations supplémentaires à propos du - problème ou de l'erreur.

    - -

    Les URLs peuvent commencer par un slash (/) pour les chemins web - locaux (relatifs au répertoire défini par la directive DocumentRoot), ou se présenter sous la - forme d'une URL complète que le client pourra résoudre. - Alternativement, un message à afficher par le navigateur pourra être - fourni. Exemples :

    + du code de la réponse HTTP et d'une URL ou d'un message. Apache + httpd fournit parfois des informations supplémentaires à propos du + problème ou de l'erreur.

    - - ErrorDocument 500 http://foo.example.com/cgi-bin/tester
    - ErrorDocument 404 /cgi-bin/bad_urls.pl
    - ErrorDocument 401 /subscription_info.html
    - ErrorDocument 403 "Désolé, vous n'avez pas l'autorisation d'accès - aujourd'hui"
    - ErrorDocument 403 Interdit! -
    +

    A partir de la version 2.4.13, il est possible d'utiliser la syntaxe des expressions dans cette directive + afin de générer des chaînes et URLs dynamiques.

    -

    De plus, on peut spécifier la valeur spéciale default - pour indiquer l'utilisation d'un simple message d'Apache httpd codé en - dur. Bien que non nécessaire dans des circonstances normales, la - spécification de la valeur default va permettre de - rétablir l'utilisation du simple message d'Apache httpd codé en dur pour - les configurations qui sans cela, hériteraient d'une directive +

    Les URLs peuvent commencer par un slash (/) pour les chemins web + locaux (relatifs au répertoire défini par la directive DocumentRoot), ou se présenter sous la + forme d'une URL complète que le client pourra résoudre. + Alternativement, un message à afficher par le navigateur pourra être + fourni. Notez que la décision de considérer le paramètre comme URL, + chemin ou message intervient avant toute interprètation + d'expression. Exemples :

    + + +ErrorDocument 500 http://example.com/cgi-bin/server-error.cgi +ErrorDocument 404 /errors/bad_urls.php +ErrorDocument 401 /subscription_info.html +ErrorDocument 403 "Sorry can't allow you access today" +ErrorDocument 403 Forbidden! +ErrorDocument 403 /errors/forbidden.py?referrer=%{escape:%{HTTP_REFERER}} + + +

    De plus, on peut spécifier la valeur spéciale default + pour indiquer l'utilisation d'un simple message d'Apache httpd codé en + dur. Bien que non nécessaire dans des circonstances normales, la + spécification de la valeur default va permettre de + rétablir l'utilisation du simple message d'Apache httpd codé en dur pour + les configurations qui sans cela, hériteraient d'une directive ErrorDocument existante.

    - - ErrorDocument 404 /cgi-bin/bad_urls.pl

    - <Directory /web/docs>
    - - ErrorDocument 404 default
    -
    - </Directory> -
    + +ErrorDocument 404 /cgi-bin/bad_urls.pl + +<Directory "/web/docs"> + ErrorDocument 404 default +</Directory> + -

    Notez que lorsque vous spécifiez une directive +

    Notez que lorsque vous spécifiez une directive ErrorDocument pointant vers une URL distante - (c'est à dire tout ce qui commence par le préfixe http), le serveur + (c'est à dire tout ce qui commence par le préfixe http), le serveur HTTP Apache va - envoyer une redirection au client afin de lui indiquer où trouver le - document, même dans le cas où ce document se trouve sur le serveur - local. Ceci a de nombreuses conséquences dont la plus importante - réside dans le fait que le client ne recevra pas le code d'erreur + envoyer une redirection au client afin de lui indiquer où trouver le + document, même dans le cas où ce document se trouve sur le serveur + local. Ceci a de nombreuses conséquences dont la plus importante + réside dans le fait que le client ne recevra pas le code d'erreur original, mais au contraire un code de statut de redirection. Ceci peut en retour semer la confusion chez les robots web et divers - clients qui tentent de déterminer la validité d'une URL en examinant + clients qui tentent de déterminer la validité d'une URL en examinant le code de statut. De plus, si vous utilisez une URL distante avec ErrorDocument 401, le client ne saura pas qu'il doit - demander un mot de passe à l'utilisateur car il ne recevra pas le + demander un mot de passe à l'utilisateur car il ne recevra pas le code de statut 401. C'est pourquoi, si vous utilisez une - directive ErrorDocument 401, elle devra faire référence - à un document par le biais d'un chemin local.

    + directive ErrorDocument 401, elle devra faire référence + à un document par le biais d'un chemin local.

    -

    Microsoft Internet Explorer (MSIE) ignore par défaut les messages - d'erreur générés par le serveur lorsqu'ils sont trop courts et +

    Microsoft Internet Explorer (MSIE) ignore par défaut les messages + d'erreur générés par le serveur lorsqu'ils sont trop courts et remplacent ses propres messages d'erreur "amicaux". Le seuil de - taille varie en fonction du type d'erreur, mais en général, si la - taille de votre message d'erreur est supérieure à 512 octets, il y a - peu de chances pour que MSIE l'occulte, et il sera affiché par ce + taille varie en fonction du type d'erreur, mais en général, si la + taille de votre message d'erreur est supérieure à 512 octets, il y a + peu de chances pour que MSIE l'occulte, et il sera affiché par ce dernier. Vous trouverez d'avantage d'informations dans l'article de la base de connaissances Microsoft Q294807.

    Bien que la plupart des messages d'erreur internes originaux - puissent être remplacés, ceux-ci sont cependant conservés dans - certaines circonstances sans tenir compte de la définition de la + puissent être remplacés, ceux-ci sont cependant conservés dans + certaines circonstances sans tenir compte de la définition de la directive ErrorDocument. En - particulier, en cas de détection d'une requête mal formée, le - processus de traitement normal des requêtes est immédiatement - interrompu, et un message d'erreur interne est renvoyé, ceci afin de - se prémunir contre les problèmes de sécurité liés aux requêtes mal - formées.

    + particulier, en cas de détection d'une requête mal formée, le + processus de traitement normal des requêtes est immédiatement + interrompu, et un message d'erreur interne est renvoyé, ceci afin de + se prémunir contre les problèmes de sécurité liés aux requêtes mal + formées.

    -

    Si vous utilisez mod_proxy, il est en général préférable +

    Si vous utilisez mod_proxy, il est en général préférable d'activer ProxyErrorOverride afin d'être en - mesure de produire des messages d'erreur personnalisés pour le + module="mod_proxy">ProxyErrorOverride afin d'être en + mesure de produire des messages d'erreur personnalisés pour le compte de votre serveur d'origine. Si vous n'activez pas - ProxyErrorOverride, Apache httpd ne générera pas de messages d'erreur - personnalisés pour le contenu mandaté.

    + ProxyErrorOverride, Apache httpd ne générera pas de messages d'erreur + personnalisés pour le contenu mandaté.

    documentation sur la -personnalisation des réponses +personnalisation des réponses ErrorLog -Définition du chemin du journal des erreurs +Définition du chemin du journal des erreurs ErrorLog chemin fichier|syslog[:facility] ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2) server configvirtual @@ -1354,52 +1512,50 @@ host -

    La directive ErrorLog permet de définir le +

    La directive ErrorLog permet de définir le nom du fichier dans lequel le serveur va journaliser toutes les erreurs qu'il rencontre. Si le chemin fichier n'est pas - absolu, il est considéré comme relatif au chemin défini par la + absolu, il est considéré comme relatif au chemin défini par la directive ServerRoot.

    - Exemple - ErrorLog /var/log/httpd/error_log - + ErrorLog "/var/log/httpd/error_log"

    Si le chemin fichier commence par une barre verticale - "(|)", il est considéré comme une commande à lancer pour traiter la + "(|)", il est considéré comme une commande à lancer pour traiter la journalisation de l'erreur.

    - Exemple - ErrorLog "|/usr/local/bin/erreurs_httpd" - + ErrorLog "|/usr/local/bin/httpd_errors" -

    Voir les notes à propos des journaux - redirigés pour plus d'informations.

    +

    Voir les notes à propos des journaux + redirigés pour plus d'informations.

    -

    L'utilisation de syslog à la place d'un nom de - fichier active la journalisation via syslogd(8) si le système le - supporte. Le dispositif syslog par défaut est local7, - mais vous pouvez le modifier à l'aide de la syntaxe - syslog:facility, où facility peut - être remplacé par un des noms habituellement documentés dans la page +

    L'utilisation de syslog à la place d'un nom de + fichier active la journalisation via syslogd(8) si le système le + supporte. Le dispositif syslog par défaut est local7, + mais vous pouvez le modifier à l'aide de la syntaxe + syslog:facility, où facility peut + être remplacé par un des noms habituellement documentés dans la page de man syslog(1). Le dispositif syslog local7 est - global, et si il est modifié dans un serveur virtuel, le dispositif - final spécifié affecte l'ensemble du serveur

    + global, et si il est modifié dans un serveur virtuel, le dispositif + final spécifié affecte l'ensemble du serveur

    - Exemple - ErrorLog syslog:user - + ErrorLog syslog:user + +

    Des modules supplémentaires peuvent fournir leurs propres + fournisseurs ErrorLog. La syntaxe est similaire à celle de + l'exemple syslog ci-dessus.

    SECURITE : Voir le document conseils à propos de - sécurité pour des détails sur les raisons pour lesquelles votre - sécurité peut être compromise si le répertoire contenant les - fichiers journaux présente des droits en écriture pour tout autre - utilisateur que celui sous lequel le serveur est démarré.

    + href="../misc/security_tips.html#serverroot">conseils à propos de + sécurité pour des détails sur les raisons pour lesquelles votre + sécurité peut être compromise si le répertoire contenant les + fichiers journaux présente des droits en écriture pour tout autre + utilisateur que celui sous lequel le serveur est démarré.

    Note -

    Lors de la spécification d'un chemin de fichier sur les - plates-formes non-Unix, on doit veiller à n'utiliser que des - slashes (/), même si la plate-forme autorise l'utilisation des - anti-slashes (\). Et d'une manière générale, il est recommandé de +

    Lors de la spécification d'un chemin de fichier sur les + plates-formes non-Unix, on doit veiller à n'utiliser que des + slashes (/), même si la plate-forme autorise l'utilisation des + anti-slashes (\). Et d'une manière générale, il est recommandé de n'utiliser que des slashes (/) dans les fichiers de configuration.

    @@ -1410,138 +1566,143 @@ host ErrorLogFormat -Spécification du format des entrées du journal des erreurs +Spécification du format des entrées du journal des erreurs ErrorLogFormat [connection|request] format server configvirtual host -Disponible depuis la version 2.3.9 d'Apache

    La directive ErrorLogFormat permet de - spécifier quelles informations supplémentaires vont être enregistrées + spécifier quelles informations supplémentaires vont être enregistrées dans le journal des erreurs en plus du message habituel.

    - Exemple simple - ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" - + +# Exemple simple +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" + -

    La spécification de connection ou - request comme premier paramètre permet de définir des - formats supplémentaires, ce qui a pour effet de journaliser des +

    La spécification de connection ou + request comme premier paramètre permet de définir des + formats supplémentaires, ce qui a pour effet de journaliser des informations additionnelles lorsque le premier message est - enregistré respectivement pour une connexion ou une requête - spécifique. Ces informations additionnelles ne sont enregistrées - qu'une seule fois par connexion/requête. Si le traitement d'une - connexion ou d'une requête ne génère aucun message dans le journal, - alors aucune information additionnelle n'est enregistrée.

    - -

    Il peut arriver que certains items de la chaîne de format ne - produisent aucune sortie. Par exemple, l'en-tête Referer n'est - présent que si le message du journal est associé à une requête et s'il - est généré à un moment où l'en-tête Referer a déjà été lu par le - client. Si aucune sortie n'est générée, le comportement par défaut - consiste à supprimer tout ce qui se trouve entre l'espace précédent + enregistré respectivement pour une connexion ou une requête + spécifique. Ces informations additionnelles ne sont enregistrées + qu'une seule fois par connexion/requête. Si le traitement d'une + connexion ou d'une requête ne génère aucun message dans le journal, + alors aucune information additionnelle n'est enregistrée.

    + +

    Il peut arriver que certains items de la chaîne de format ne + produisent aucune sortie. Par exemple, l'en-tête Referer n'est + présent que si le message du journal est associé à une requête et s'il + est généré à un moment où l'en-tête Referer a déjà été lu par le + client. Si aucune sortie n'est générée, le comportement par défaut + consiste à supprimer tout ce qui se trouve entre l'espace précédent et le suivant. Ceci implique que la ligne de journalisation est - divisée en champs ne contenant pas d'espace séparés par des espaces. - Si un item de la chaîne de format ne génère aucune sortie, + divisée en champs ne contenant pas d'espace séparés par des espaces. + Si un item de la chaîne de format ne génère aucune sortie, l'ensemble du champ est omis. Par exemple, si l'adresse distante %a du format [%t] [%l] [%a] %M  n'est - pas disponible, les crochets qui l'entourent ne seront eux-mêmes pas - enregistrés. Il est possible d'échapper les espaces par un anti-slash - afin qu'ils ne soient pas considérés comme séparateurs de champs. - La combinaison '% ' (pourcentage espace) est un délimiteur de - champ de taille nulle qui ne génère aucune sortie.

    - -

    Ce comportement peut être changé en ajoutant des modificateurs à - l'item de la chaîne de format. Le modificateur - + pas disponible, les crochets qui l'entourent ne seront eux-mêmes pas + enregistrés. Il est possible d'échapper les espaces par un anti-slash + afin qu'ils ne soient pas considérés comme séparateurs de champs. + La combinaison '% ' (pourcentage espace) est un délimiteur de + champ de taille nulle qui ne génère aucune sortie.

    + +

    Ce comportement peut être changé en ajoutant des modificateurs à + l'item de la chaîne de format. Le modificateur - (moins) provoque l'enregistrement d'un signe moins si l'item - considéré ne génère aucune sortie. Pour les formats à enregistrement - unique par connexion/requête, il est aussi possible d'utiliser le - modificateur + (plus). Si un item ne générant aucune - sortie possède le modificateur plus, la ligne dans son ensemble est + considéré ne génère aucune sortie. Pour les formats à enregistrement + unique par connexion/requête, il est aussi possible d'utiliser le + modificateur + (plus). Si un item ne générant aucune + sortie possède le modificateur plus, la ligne dans son ensemble est omise.

    Un modificateur de type entier permet d'assigner un niveau de - sévérité à un item de format. L'item considéré ne - sera journalisé que si la sévérité du message n'est pas - plus haute que le niveau de sévérité spécifié. Les - valeurs possibles vont de 1 (alert) à 15 (trace8), en passant par 4 + sévérité à un item de format. L'item considéré ne + sera journalisé que si la sévérité du message n'est pas + plus haute que le niveau de sévérité spécifié. Les + valeurs possibles vont de 1 (alert) à 15 (trace8), en passant par 4 (warn) ou 7 (debug).

    Par exemple, voici ce qui arriverait si vous ajoutiez des - modificateurs à l'item %{Referer}i qui enregistre le - contenu de l'en-tête Referer.

    + modificateurs à l'item %{Referer}i qui enregistre le + contenu de l'en-tête Referer.

    - + - + - + - +
    Item modifiéSignification
    Item modifiéSignification
    %-{Referer}iEnregistre le caractère - si l'en-tête - Referer n'est pas défini.Enregistre le caractère - si l'en-tête + Referer n'est pas défini.
    %+{Referer}iN'enregistre rien si l'en-tête - Referer n'est pas défini.N'enregistre rien si l'en-tête + Referer n'est pas défini.
    %4{Referer}iN'enregistre le contenu de l'en-tête Referer que si - la sévérité du message de journalisation est supérieure à 4.N'enregistre le contenu de l'en-tête Referer que si + la sévérité du message de journalisation est supérieure à 4.
    -

    Certains items de format acceptent des paramètres supplémentaires +

    Certains items de format acceptent des paramètres supplémentaires entre accolades.

    - + - + + + + - + - + - - + - + - + - + - + @@ -1550,7 +1711,7 @@ host - + @@ -1559,8 +1720,8 @@ host - @@ -1578,32 +1739,32 @@ host module="core">ServerName du serveur courant. - - + - +
    Chaîne de format Description
    Chaîne de format Description
    %% Le signe pourcentage
    %aAdresse IP et port distants
    Adresse IP et port clients
    %{c}aPort et adresse IP sous-jacents du correspondant pour la + connexion (voir le module + mod_remoteip)
    %A Adresse IP et port locaux
    %{name}eVariable d'environnement de requête name
    Variable d'environnement de requête name
    %EEtat d'erreur APR/OS et chaîne
    Etat d'erreur APR/OS et chaîne
    %FNom du fichier source et numéro de ligne de l'appel du + Nom du fichier source et numéro de ligne de l'appel du journal
    %{name}iEn-tête de requête name
    En-tête de requête name
    %kNombre de requêtes persistantes pour cette connexion
    Nombre de requêtes persistantes pour cette connexion
    %lSévérité du message
    Sévérité du message
    %LIdentifiant journal de la requête
    Identifiant journal de la requête
    %{c}L Identifiant journal de la connexion
    %{C}LIdentifiant journal de la connexion si utilisé dans la - portée de la connexion, vide sinon
    Identifiant journal de la connexion si utilisé dans la + portée de la connexion, vide sinon
    %m Nom du module qui effectue la journalisation du message
    Le message effectif
    %{name}nNote de requête name
    Note de requête name
    %P Identifiant du processus courant
    Identifiant du thread courant
    %{g}TIdentifiant unique de thread système du thread courant - (l'identifiant affiché par la commande top par + Identifiant unique de thread système du thread courant + (l'identifiant affiché par la commande top par exemple ; seulement sous Linux pour l'instant)
    %t
    %VLe nom de serveur du serveur qui sert la requête en accord - avec la définition de la directive Le nom de serveur du serveur qui sert la requête en accord + avec la définition de la directive UseCanonicalName.
    (anti-slash espace)Espace non délimiteur
    Espace non délimiteur
    (pourcentage espace)Délimiteur de champ (aucune sortie)
    Délimiteur de champ (aucune sortie)
    -

    L'item de format identifiant journal %L génère un - identifiant unique pour une connexion ou une requête. Il peut servir - à déterminer quelles lignes correspondent à la même connexion ou - requête ou quelle requête est associée à tel connexion. Un item de +

    L'item de format identifiant journal %L génère un + identifiant unique pour une connexion ou une requête. Il peut servir + à déterminer quelles lignes correspondent à la même connexion ou + requête ou quelle requête est associée à tel connexion. Un item de format %L est aussi disponible dans le module mod_log_config, mais il permet dans ce contexte de - corréler les entrées du journal des accès avec celles du journal des - erreurs. Si le module mod_unique_id est chargé, - c'est son identifiant unique qui sera utilisé comme identifiant de - journal pour les requêtes.

    - - Exemple (format par défaut) - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" - + corréler les entrées du journal des accès avec celles du journal des + erreurs. Si le module mod_unique_id est chargé, + c'est son identifiant unique qui sera utilisé comme identifiant de + journal pour les requêtes.

    + + +# Exemple (format par défaut pour les MPMs threadés) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" +

    Cet exemple renverrait un message d'erreur du style :

    @@ -1611,22 +1772,22 @@ host [Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico -

    Notez que, comme indiqué plus haut, certains champs sont - totalement supprimés s'ils n'ont pas été définis.

    +

    Notez que, comme indiqué plus haut, certains champs sont + totalement supprimés s'ils n'ont pas été définis.

    - Exemple (similaire au format 2.2.x) - ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" - + +# Exemple (similaire au format 2.2.x) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" + - Exemple avancé avec identifiants journal de - requête/connexion - ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
    - ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
    - ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
    - ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
    -
    + +# Exemple avancé avec identifiants journal de requête/connexion +ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" +ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" +ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" +ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" +ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A" +
    ErrorLog @@ -1636,35 +1797,35 @@ host ExtendedStatus -Extrait des informations d'état étendues pour chaque -requête +Extrait des informations d'état étendues pour chaque +requête ExtendedStatus On|Off ExtendedStatus Off server config -

    Cette option permet d'extraire des données supplémentaires - concernant la requête en cours de traitement pour un processus - donné, ainsi qu'un résumé d'utilisation ; vous pouvez accéder à - ces variables pendant l'exécution en configurant +

    Cette option permet d'extraire des données supplémentaires + concernant la requête en cours de traitement pour un processus + donné, et crée un résumé d'utilisation ; vous pouvez accéder à + ces variables pendant l'exécution en configurant mod_status. Notez que d'autres modules sont susceptibles de s'appuyer sur ce tableau de bord.

    Cette directive s'applique au serveur dans son ensemble, et ne - peut pas être activée/désactivée pour un serveur virtuel - particulier. Notez que l'extraction des informations d'état étendues - peut ralentir le serveur. Notez aussi que cette définition ne peut - pas être modifiée au cours d'un redémarrage graceful.

    + peut pas être activée/désactivée pour un serveur virtuel + particulier. Notez que l'extraction des informations d'état étendues + peut ralentir le serveur. Notez aussi que cette définition ne peut + pas être modifiée au cours d'un redémarrage graceful.

    -

    Notez que le chargement de mod_status définit - automatiquement ExtendedStatus à On, et que d'autres modules tiers - sont susceptibles d'en faire de même. De tels modules ont besoin - d'informations détaillées à propos de l'état de tous les processus. - Depuis la version 2.3.6, mod_status a définit la - valeur par défaut à On, alors qu'elle était à Off dans les versions - antérieures.

    +

    Notez que le chargement de mod_status définit + automatiquement ExtendedStatus à On, et que d'autres modules tiers + sont susceptibles d'en faire de même. De tels modules ont besoin + d'informations détaillées à propos de l'état de tous les processus. + Depuis la version 2.3.6, mod_status a définit la + valeur par défaut à On, alors qu'elle était à Off dans les versions + antérieures.

    @@ -1673,75 +1834,77 @@ requête FileETag -Caractéristiques de fichier utilisées lors de la génération -de l'en-tête de réponse HTTP ETag pour les fichiers statiques +Caractéristiques de fichier utilisées lors de la génération +de l'en-tête de réponse HTTP ETag pour les fichiers statiques FileETag composant ... -FileETag INode MTime Size +FileETag MTime Size server configvirtual host directory.htaccess FileInfo +La valeur par défaut était "INode MTime Size" +dans les versions 2.3.14 et antérieures.

    - La directive FileETag définit les - caractéristiques de fichier utilisées lors de la génération de - l'en-tête de réponse HTTP ETag (entity tag) quand le + La directive FileETag définit les + caractéristiques de fichier utilisées lors de la génération de + l'en-tête de réponse HTTP ETag (entity tag) quand le document est contenu dans un fichier statique(la valeur de ETag - est utilisée dans le cadre de la gestion du cache pour préserver la - bande passante réseau). La directive + est utilisée dans le cadre de la gestion du cache pour préserver la + bande passante réseau). La directive FileETag vous permet maintenant de choisir - quelles caractéristiques du fichier vont être utilisées, le cas - échéant. Les mots-clés reconnus sont : + quelles caractéristiques du fichier vont être utilisées, le cas + échéant. Les mots-clés reconnus sont :

    INode
    -
    Le numéro d'i-node du fichier sera inclus dans le processus de - génération
    +
    Le numéro d'i-node du fichier sera inclus dans le processus de + génération
    MTime
    -
    La date et l'heure auxquelles le fichier a été modifié la - dernière fois seront incluses
    +
    La date et l'heure auxquelles le fichier a été modifié la + dernière fois seront incluses
    Size
    La taille du fichier en octets sera incluse
    All
    -
    Tous les champs disponibles seront utilisés. Cette définition - est équivalente à : FileETag INode MTime - Size
    +
    Tous les champs disponibles seront utilisés. Cette définition + est équivalente à : + FileETag INode MTime Size
    None
    Si le document se compose d'un fichier, aucun champ - ETag ne sera inclus dans la réponse
    + ETag ne sera inclus dans la réponse
    -

    Les mots-clés INode, MTime, et - Size peuvent être préfixés par + ou - -, ce qui permet de modifier les valeurs par défaut - héritées d'un niveau de configuration plus général. Tout mot-clé - apparaissant sans aucun préfixe annule entièrement et immédiatement - les configurations héritées.

    +

    Les mots-clés INode, MTime, et + Size peuvent être préfixés par + ou + -, ce qui permet de modifier les valeurs par défaut + héritées d'un niveau de configuration plus général. Tout mot-clé + apparaissant sans aucun préfixe annule entièrement et immédiatement + les configurations héritées.

    -

    Si la configuration d'un répertoire contient +

    Si la configuration d'un répertoire contient FileETag INode MTime Size, et si un de - ses sous-répertoires contient FileETag -INode, la - configuration de ce sous-répertoire (qui sera propagée vers tout - sous-répertoire qui ne la supplante pas), sera équivalente à + ses sous-répertoires contient FileETag -INode, la + configuration de ce sous-répertoire (qui sera propagée vers tout + sous-répertoire qui ne la supplante pas), sera équivalente à FileETag MTime Size.

    Avertissement - Ne modifiez pas les valeurs par défaut pour les répertoires ou - localisations où WebDAV est activé et qui utilisent + Ne modifiez pas les valeurs par défaut pour les répertoires ou + localisations où WebDAV est activé et qui utilisent mod_dav_fs comme fournisseur de stockage. mod_dav_fs utilise - INode MTime Size comme format fixe pour les - comparaisons de champs ETag dans les requêtes - conditionnelles. Ces requêtes conditionnelles échoueront si le - format ETag est modifié via la directive + MTime Size comme format fixe pour les + comparaisons de champs ETag dans les requêtes + conditionnelles. Ces requêtes conditionnelles échoueront si le + format ETag est modifié via la directive FileETag. - Inclusions côté serveur - Aucun champ ETag n'est généré pour les réponses interprétées par - mod_include, car l'entité de la réponse peut + Inclusions côté serveur + Aucun champ ETag n'est généré pour les réponses interprétées par + mod_include, car l'entité de la réponse peut changer sans modification de l'INode, du MTime, ou de la taille du fichier statique contenant les directives SSI. @@ -1753,7 +1916,7 @@ host Files Contient des directives qui s'appliquent aux fichiers -précisés +précisés <Files nom fichier> ... </Files> server configvirtual host @@ -1763,59 +1926,73 @@ host

    La directive Files limite - la portée des directives qu'elle contient aux fichiers précisés. + la portée des directives qu'elle contient aux fichiers précisés. Elle est comparable aux directives Directory et Location. Elle doit se terminer par une balise </Files>. Les directives contenues dans - cette section s'appliqueront à tout objet dont le nom de base (la - dernière partie du nom de fichier) correspond au fichier spécifié. + cette section s'appliqueront à tout objet dont le nom de base (la + dernière partie du nom de fichier) correspond au fichier spécifié. Les sections Files sont - traitées selon l'ordre dans lequel elles apparaissent dans le - fichier de configuration, après les sections Directory et la lecture des fichiers .htaccess, mais avant les sections Location. Notez que les - sections Files peuvent être - imbriquées dans les sections Files peuvent être + imbriquées dans les sections Directory afin de restreindre la portion - du système de fichiers à laquelle ces dernières vont + du système de fichiers à laquelle ces dernières vont s'appliquer.

    L'argument filename peut contenir un nom de fichier - ou une chaîne de caractères avec caractères génériques, où - ? remplace un caractère, et * toute chaîne - de caractères. On peut aussi utiliser les ? remplace un caractère, et * toute chaîne + de caractères.

    + +<Files "cat.html"> + # Insérer ici des directives qui s'appliquent au fichier cat.html +</Files> + +<Files "?at.*"> + # Les directives insérées ici s'appliqueront aux fichiers + # cat.html, bat.html, hat.php, et ainsi de suite. +</Files> + + +

    On peut aussi utiliser les Expressions rationnelles en ajoutant la - caractère ~. Par exemple :

    + caractère ~. Par exemple :

    - - <Files ~ "\.(gif|jpe?g|png)$"> - + +<Files ~ "\.(gif|jpe?g|png)$"> + #... +</Files> + -

    correspondrait à la plupart des formats graphiques de l'Internet. - Il est cependant préférable d'utiliser la directive correspondrait à la plupart des formats graphiques de l'Internet. + Il est cependant préférable d'utiliser la directive FilesMatch.

    -

    Notez qu'à la différence des sections Notez qu'à la différence des sections Directory et Location, les sections Files peuvent être utilisées dans les + type="section">Files peuvent être utilisées dans les fichiers .htaccess. Ceci permet aux utilisateurs de - contrôler l'accès à leurs propres ressources, fichier par + contrôler l'accès à leurs propres ressources, fichier par fichier.

    Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête
    FilesMatch -Contient des directives qui s'appliquent à des fichiers -spécifiés sous la forme d'expressions rationnelles +Contient des directives qui s'appliquent à des fichiers +spécifiés sous la forme d'expressions rationnelles <FilesMatch expression rationnelle> ... </FilesMatch> server configvirtual @@ -1826,101 +2003,134 @@ host

    La section FilesMatch - limite la portée des directives qu'elle contient aux fichiers - spécifiés, tout comme le ferait une section Files. Mais elle accepte aussi les expressions rationnelles. Par exemple :

    - - <FilesMatch "\.(gif|jpe?g|png)$"> - + +<FilesMatch ".+\.(gif|jpe?g|png)$"> + # ... +</FilesMatch> + -

    correspondrait à la plupart des formats graphiques de +

    correspondrait à la plupart des formats graphiques de l'Internet.

    + + Les caractères .+ au début de l'expression + rationnelle permettent de s'assurer que les fichiers de nom + .png, ou .gif, par exemple, ne seront pas + pris en compte. + +

    A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.

    + + +<FilesMatch "^(?<sitename>[^/]+)"> + require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</FilesMatch> + +
    Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête
    ForceType -Force le type de médium spécifié dans le champ d'en-tête +Force le type de médium spécifié dans le champ d'en-tête HTTP Content-Type pour les fichiers correspondants -ForceType type médium|None +ForceType type médium|None directory.htaccess FileInfo -Intégré dans le coeur d'Apache httpd depuis la version -2.0 -

    Lorsqu'elle est placée dans un fichier .htaccess ou +

    Lorsqu'elle est placée dans un fichier .htaccess ou une section Directory, Location, ou Files, cette directive force - l'identification du type MIME des fichiers spécifiés à la valeur de - l'argument type médium. Par exemple, si vous possédez un - répertoire ne contenant que des fichiers GIF, et si vous ne voulez + l'identification du type MIME des fichiers spécifiés à la valeur de + l'argument type médium. Par exemple, si vous possédez un + répertoire ne contenant que des fichiers GIF, et si vous ne voulez pas leur ajouter l'extension .gif, vous pouvez utiliser :

    - - ForceType image/gif - + ForceType image/gif

    Notez que cette directive l'emporte sur d'autres associations de - type de médium indirectes définies dans mime.types ou via la + type de médium indirectes définies dans mime.types ou via la directive AddType.

    -

    Vous pouvez aussi annuler toute définition plus générale de +

    Vous pouvez aussi annuler toute définition plus générale de ForceType en affectant la valeur - None à l'argument type médium :

    - - - # force le type MIME de tous les fichiers à image/gif:
    - <Location /images>
    - - ForceType image/gif
    -
    - </Location>
    -
    - # mais utilise les méthodes classiques d'attribution du type MIME - # dans le sous-répertoire suivant :
    - <Location /images/mixed>
    - - ForceType None
    -
    - </Location> -
    + None à l'argument type médium :

    + + +# force le type MIME de tous les fichiers à image/gif: +<Location "/images"> + ForceType image/gif +</Location> + +# mais utilise les méthodes classiques d'attribution du type MIME +# dans le sous-répertoire suivant : +<Location "/images/mixed"> + ForceType None +</Location> + -

    A la base, cette directive écrase le type de contenu généré pour - les fichiers statiques servis à partir du sytème de fichiers. Pour +

    A la base, cette directive écrase le type de contenu généré pour + les fichiers statiques servis à partir du sytème de fichiers. Pour les ressources autres que les fichiers statiques pour lesquels le - générateur de réponse spécifie en général un type de contenu, cette - directive est ignorée.

    + générateur de réponse spécifie en général un type de contenu, cette + directive est ignorée.

    + + Note +

    Lorsque des directives explicites comme SetHandler ou + module="mod_mime">AddHandler ne s'appliquent + pas à la requête courante, le nom du gestionnaire interne + normalement défini par ces directives correspondra alors au type de + contenu spécifié par cette directive. Il s'agit d'un + comportement historique que certains modules + tiers, comme mod_php, peuvent interpréter comme un type de contenu + artificiel ne servant qu'à indiquer le module qui doit prendre en + compte la requête considérée. Dans la mesure du + possible, il est conseillé d'éviter les + configurations qui comportent de tels types artificiels en utilisant + les directives SetHandler ou + AddHandler.

    +
    GprofDir -Répertoire dans lequel écrire les données de profiling +Répertoire dans lequel écrire les données de profiling gmon.out. GprofDir /tmp/gprof/|/tmp/gprof/% server configvirtual host -

    Lorsque le serveur a été compilé avec le support du profiling +

    Lorsque le serveur a été compilé avec le support du profiling gprof, la directive GprofDir permet de - spécifier dans quel répertoire les fichiers gmon.out - doivent être écrits lorsque le processus s'arrête. Si l'argument se - termine par un caractère pourcentage ('%'), des sous-répertoires - sont créés pour chaque identifiant de processus.

    + spécifier dans quel répertoire les fichiers gmon.out + doivent être écrits lorsque le processus s'arrête. Si l'argument se + termine par un caractère pourcentage ('%'), des sous-répertoires + sont créés pour chaque identifiant de processus.

    Cette directive ne fonctionne actuellement qu'avec le MPM prefork.

    @@ -1939,45 +2149,45 @@ host

    Cette directive active la recherche DNS afin de pouvoir - journaliser les nom d'hôtes (et les passer aux programmes CGI et aux + journaliser les nom d'hôtes (et les passer aux programmes CGI et aux inclusions SSI via la variable REMOTE_HOST). La valeur - Double déclenche une double recherche DNS inverse. En - d'autres termes, une fois la recherche inverse effectuée, on lance - une recherche directe sur le résultat de cette dernière. Au moins + Double déclenche une double recherche DNS inverse. En + d'autres termes, une fois la recherche inverse effectuée, on lance + une recherche directe sur le résultat de cette dernière. Au moins une des adresses IP fournies par la recherche directe doit - correspondre à l'adresse originale (ce que l'on nomme + correspondre à l'adresse originale (ce que l'on nomme PARANOID dans la terminologie "tcpwrappers").

    Quelle que soit la configuration, lorsqu'on utilise - mod_authz_host pour contrôler l'accès en fonction - du nom d'hôte, une double recherche DNS inverse est effectuée, - sécurité oblige. Notez cependant que le résultat de cette double - recherche n'est en général pas accessible, à moins que vous n'ayez - spécifié HostnameLookups Double. Par exemple, si vous - n'avez spécifié que HostnameLookups On, et si une - requête concerne un objet protégé par des restrictions en fonction - du nom d'hôte, quel que soit le résultat de la double recherche - inverse, les programmes CGI ne recevront que le résultat de la + mod_authz_host pour contrôler l'accès en fonction + du nom d'hôte, une double recherche DNS inverse est effectuée, + sécurité oblige. Notez cependant que le résultat de cette double + recherche n'est en général pas accessible, à moins que vous n'ayez + spécifié HostnameLookups Double. Par exemple, si vous + n'avez spécifié que HostnameLookups On, et si une + requête concerne un objet protégé par des restrictions en fonction + du nom d'hôte, quel que soit le résultat de la double recherche + inverse, les programmes CGI ne recevront que le résultat de la recherche inverse simple dans la variable REMOTE_HOST.

    -

    La valeur par défaut est Off afin de préserver le - traffic réseau des sites pour lesquels la recherche inverse n'est - pas vraiment nécessaire. Cette valeur par défaut est aussi bénéfique - pour les utilisateurs finaux car il n'ont ainsi pas à subir de temps - d'attente supplémentaires dus aux recherches DNS. Les sites - fortement chargés devraient laisser cette directive à +

    La valeur par défaut est Off afin de préserver le + traffic réseau des sites pour lesquels la recherche inverse n'est + pas vraiment nécessaire. Cette valeur par défaut est aussi bénéfique + pour les utilisateurs finaux car il n'ont ainsi pas à subir de temps + d'attente supplémentaires dus aux recherches DNS. Les sites + fortement chargés devraient laisser cette directive à Off, car les recherches DNS peuvent prendre des temps - très longs. Vous pouvez éventuellement utiliser hors ligne - l'utilitaire logresolve, compilé par défaut dans - le sous-répertoire bin de votre répertoire - d'installation, afin de déterminer les noms d'hôtes associés aux - adresses IP journalisées.

    + très longs. Vous pouvez éventuellement utiliser hors ligne + l'utilitaire logresolve, compilé par défaut dans + le sous-répertoire bin de votre répertoire + d'installation, afin de déterminer les noms d'hôtes associés aux + adresses IP journalisées.

    Enfin, si vous avez des directives Require à base de - nom, une recherche de nom d'hôte sera effectuée quelle que soit - la définition de la directive HostnameLookups.

    + href="mod_authz_host.html#reqhost">directives Require à base de + nom, une recherche de nom d'hôte sera effectuée quelle que soit + la définition de la directive HostnameLookups.

    @@ -1985,7 +2195,7 @@ host If Contient des directives qui ne s'appliquent que si une condition est satisfaite au cours du traitement d'une -requête +requête <If expression> ... </If> server configvirtual host @@ -1994,44 +2204,51 @@ host All -

    La directive If évalue une - expression à la volée, et applique les directives qu'elle contient +

    La directive If évalue une + expression à la volée, et applique les directives qu'elle contient si et seulement si l'expression renvoie la valeur "vrai". Par exemple :

    - - <If "-z req('Host')"> - + <If "-z req('Host')"> -

    serait satisfaite pour les requêtes HTTP/1.0 sans en-tête - Host:. Les expressions peuvent contenir différents - opérateurs de type shell pour la comparaison de chaînes - (=, !=, <, ...), la +

    serait satisfaite pour les requêtes HTTP/1.0 sans en-tête + Host:. Les expressions peuvent contenir différents + opérateurs de type shell pour la comparaison de chaînes + (==, !=, <, ...), la comparaison d'entiers (-eq, -ne, ...), ou - à usages divers (-n, -z, -f, - ...). Les expressions rationnelles sont aussi supportées,

    + à usages divers (-n, -z, -f, + ...). Les expressions rationnelles sont aussi supportées,

    - - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> - + <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> -

    ainsi que les comparaison de modèles de type shell et de - nombreuses autres opérations. Ces opérations peuvent être effectuées - sur les en-têtes de requêtes (req), les variables +

    ainsi que les comparaison de modèles de type shell et de + nombreuses autres opérations. Ces opérations peuvent être effectuées + sur les en-têtes de requêtes (req), les variables d'environnement (env), et un grand nombre d'autres - propriétés. La documentation complète est disponible dans Les expressions dans le serveur HTTP Apache.

    +

    Cette section de configuration ne peut contenir que des + directives qui supportent le contexte de répertoire.

    + + + Certain variables, such as CONTENT_TYPE and other + response headers, are set after <If> conditions have already + been evaluated, and so will not be available to use in this + directive. + +
    Les expressions dans le serveur HTTP -Apache, pour une référence complète et d'autres exemples. +Apache, pour une référence complète et d'autres exemples. ElseIf Else Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête. Les +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête. Les directives If, ElseIf, et Else s'appliquent en dernier. @@ -2040,8 +2257,8 @@ type="section">Else s'appliquent en dernier. IfDefine Contient des directives qui ne s'appliqueront que si un -test retourne "vrai" au démarrage du serveur -<IfDefine [!]paramètre> ... +test retourne "vrai" au démarrage du serveur +<IfDefine [!]paramètre> ... </IfDefine> server configvirtual host @@ -2052,69 +2269,59 @@ host

    La section <IfDefine test>...</IfDefine> permet de - conférer un caractère conditionnel à un ensemble de directives. Les - directives situées à l'intérieur d'une section IfDefine ne s'appliquent que si test est vrai. Si test est faux, tout ce qui - se trouve entre les balises de début et de fin est ignoré.

    + se trouve entre les balises de début et de fin est ignoré.

    -

    test peut se présenter sous deux formes :

    +

    test peut se présenter sous deux formes :

      -
    • nom paramètre
    • +
    • nom paramètre
    • -
    • !nom paramètre
    • +
    • !nom paramètre
    -

    Dans le premier cas, les directives situées entre les balises de - début et de fin ne s'appliqueront que si le paramètre nommé nom - paramètre est défini. Le second format inverse le test, et +

    Dans le premier cas, les directives situées entre les balises de + début et de fin ne s'appliqueront que si le paramètre nommé nom + paramètre est défini. Le second format inverse le test, et dans ce cas, les directives ne s'appliqueront que si nom - paramètre n'est pas défini.

    + paramètre n'est pas défini.

    -

    L'argument nom paramètre est une définition qui peut - être effectuée par la ligne de commande - httpd via le paramètre - -Dparamètre au démarrage du serveur, ou via la +

    L'argument nom paramètre est une définition qui peut + être effectuée par la ligne de commande + httpd via le paramètre + -Dparamètre au démarrage du serveur, ou via la directive Define.

    Les sections IfDefine - peuvent être imbriquées, ce qui permet d'implémenter un test - multi-paramètres simple. Exemple :

    - - - httpd -DReverseProxy -DUseCache -DMemCache ...
    -
    - # httpd.conf
    - <IfDefine ReverseProxy>
    - - LoadModule proxy_module modules/mod_proxy.so
    - LoadModule proxy_http_module modules/mod_proxy_http.so
    - <IfDefine UseCache>
    - - LoadModule cache_module modules/mod_cache.so
    - <IfDefine MemCache>
    - - LoadModule mem_cache_module modules/mod_mem_cache.so
    -
    - </IfDefine>
    - <IfDefine !MemCache>
    - - LoadModule cache_disk_module modules/mod_cache_disk.so
    -
    - </IfDefine> -
    - </IfDefine> -
    - </IfDefine> -
    + peuvent être imbriquées, ce qui permet d'implémenter un test + multi-paramètres simple. Exemple :

    + + httpd -DReverseProxy -DUseCache -DMemCache ... + +<IfDefine ReverseProxy> + LoadModule proxy_module modules/mod_proxy.so + LoadModule proxy_http_module modules/mod_proxy_http.so + <IfDefine UseCache> + LoadModule cache_module modules/mod_cache.so + <IfDefine MemCache> + LoadModule mem_cache_module modules/mod_mem_cache.so + </IfDefine> + <IfDefine !MemCache> + LoadModule cache_disk_module modules/mod_cache_disk.so + </IfDefine> + </IfDefine> +</IfDefine> +
    IfModule Contient des directives qui ne s'appliquent qu'en fonction -de la présence ou de l'absence d'un module spécifique +de la présence ou de l'absence d'un module spécifique <IfModule [!]fichier module|identificateur module> ... </IfModule> server configvirtual @@ -2123,18 +2330,18 @@ host All Les identificateurs de modules sont disponibles dans les -versions 2.1 et supérieures. +versions 2.1 et supérieures.

    La section <IfModule - test>...</IfModule> permet de conférer à - des directives un caractère conditionnel basé sur la présence d'un - module spécifique. Les directives situées dans une section + test>...</IfModule> permet de conférer à + des directives un caractère conditionnel basé sur la présence d'un + module spécifique. Les directives situées dans une section IfModule ne s'appliquent que si test est vrai. Si test est faux, tout ce - qui se trouve entre les balises de début et de fin est ignoré.

    + qui se trouve entre les balises de début et de fin est ignoré.

    -

    test peut se présenter sous deux formes :

    +

    test peut se présenter sous deux formes :

    • module
    • @@ -2142,30 +2349,30 @@ versions 2.1 et supérieures.
    • !module
    -

    Dans le premier cas, les directives situées entre les balises de - début et de fin ne s'appliquent que si le module module - est présent -- soit compilé avec le binaire Apache httpd, soit chargé +

    Dans le premier cas, les directives situées entre les balises de + début et de fin ne s'appliquent que si le module module + est présent -- soit compilé avec le binaire Apache httpd, soit chargé dynamiquement via la directive LoadModule. Le second format inverse le test, et dans ce cas, les directives ne s'appliquent que si module - n'est pas présent.

    + n'est pas présent.

    L'argument module peut contenir soit l'identificateur du module, soit le nom du fichier source du module. Par exemple, rewrite_module est un identificateur et mod_rewrite.c le nom du fichier source correspondant. Si un module comporte plusieurs fichiers sources, - utilisez le nom du fichier qui contient la chaîne de caractères + utilisez le nom du fichier qui contient la chaîne de caractères STANDARD20_MODULE_STUFF.

    Les sections IfModule - peuvent être imbriquées, ce qui permet d'implémenter des tests + peuvent être imbriquées, ce qui permet d'implémenter des tests multi-modules simples.

    - Cette section ne doit être utilisée que si votre fichier de - configuration ne fonctionne qu'en fonction de la présence ou de - l'absence d'un module spécifique. D'une manière générale, il n'est - pas nécessaire de placer les directives à l'intérieur de sections + Cette section ne doit être utilisée que si votre fichier de + configuration ne fonctionne qu'en fonction de la présence ou de + l'absence d'un module spécifique. D'une manière générale, il n'est + pas nécessaire de placer les directives à l'intérieur de sections IfModule.
    @@ -2174,113 +2381,100 @@ versions 2.1 et supérieures. Include Inclut d'autres fichiers de configuration dans un des fichiers de configuration du serveur -Include [optional|strict] chemin fichier|chemin -répertoire|wildcard +Include chemin-fichier|chemin-répertoire|wildcard server configvirtual host directory -Utilisation des caractères génériques dans la partie nom -de fichier depuis la version 2.0.41, et dans la partie chemin depuis la +Utilisation des caractères génériques dans la partie chemin depuis la version 2.3.6

    Cette directive permet l'inclusion d'autres fichiers de configuration dans un des fichiers de configuration du serveur.

    -

    On peut utiliser des caractères génériques de style Shell +

    On peut utiliser des caractères génériques de style Shell (fnmatch()) aussi bien dans la partie nom de fichier du - chemin que dans la partie répertoires pour inclure plusieurs + chemin que dans la partie répertoires pour inclure plusieurs fichiers en une - seule fois, selon leur ordre alphabétique. De plus, si la directive - Include pointe vers un répertoire, Apache - httpd inclura tous les fichiers de ce répertoire et de tous ces - sous-répertoires. L'inclusion de répertoires entiers est cependant - déconseillée, car il est fréquent d'oublier des fichiers - temporaires dans un répertoire, ce qui causerait une erreur + seule fois, selon leur ordre alphabétique. De plus, si la directive + Include pointe vers un répertoire, Apache + httpd inclura tous les fichiers de ce répertoire et de tous ces + sous-répertoires. L'inclusion de répertoires entiers est cependant + déconseillée, car il est fréquent d'oublier des fichiers + temporaires dans un répertoire, ce qui causerait une erreur httpd en cas d'inclusion. Pour inclure des - fichiers qui correspondent à un certain modèle, comme *.conf par - exemple, nous vous recommandons d'utiliser plutôt la syntaxe avec - caractères génériques comme ci-dessous.

    - -

    Lorsque la partie nom de fichier ou répertoires - du chemin - comporte des caractères génériques, et si aucun fichier ou - répertoire ne correspond, la directive Include sera ignorée - silencieusement. - Lorsqu'une partie répertoires du chemin comporte - des caractères génériques, et si aucun - répertoire ne correspond, la directive Include échouera et renverra une - erreur - indiquant que le fichier ou le répertoire n'a pas été trouvé. -

    - -

    Pour contrôler plus finement le comportement du serveur - lorsqu'aucun fichier ou répertoire ne correspond, préfixez le chemin - avec les modificateurs optional ou strict. Si - optional est spécifié, tout fichier ou répertoire avec - caractères génériques qui ne correspond à aucun fichier ou - répertoire sera ignoré silencieusement. Si strict est - spécifié, tout fichier ou répertoire avec - caractères génériques qui ne correspond pas à au moins un fichier - fera échouer le démarrage du serveur.

    - -

    Lorsqu'une partie fichier ou répertoire du chemin est - spécipée sans caractères génériques, et si ce fichier ou - répertoire n'existe pas, la directive Include échouera avec un message - d'erreur indiquant que le fichier ou répertoire n'a pas pu être - trouvé.

    - -

    Le chemin fichier spécifié peut être soit un chemin absolu, soit - un chemin relatif au répertoire défini par la directive + +

    La directive Include + échouera avec un code d'erreur si une expression + contenant des caractères génériques ne correspond à aucun fichier. + Pour ignorer les expressions contenant des caractères génériques ne + correspondant à aucun fichier, utilisez la directive IncludeOptional.

    + +

    Le chemin fichier spécifié peut être soit un chemin absolu, soit + un chemin relatif au répertoire défini par la directive ServerRoot.

    Exemples :

    - - Include /usr/local/apache2/conf/ssl.conf
    - Include /usr/local/apache2/conf/vhosts/*.conf -
    + +Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.conf + -

    ou encore, avec des chemins relatifs au répertoire défini par la +

    ou encore, avec des chemins relatifs au répertoire défini par la directive ServerRoot :

    - - Include conf/ssl.conf
    - Include conf/vhosts/*.conf -
    + +Include conf/ssl.conf +Include conf/vhosts/*.conf + -

    On peut aussi insérer des caractères génériques dans la partie - répertoires du chemin. Dans l'exemple suivant, le démarrage du - serveur échouera si aucun répertoire ne correspond à conf/vhosts/*, - mais réussira si aucun fichier ne correspond à *.conf :

    +

    On peut aussi insérer des caractères génériques dans la partie + répertoires du chemin. Dans l'exemple suivant, la directive + échouera si aucun sous-répertoire de conf/vhosts ne contient au + moins un fichier *.conf :

    - - Include conf/vhosts/*/vhost.conf
    - Include conf/vhosts/*/*.conf -
    + Include conf/vhosts/*/*.conf -

    Dans cet exemple, le démarrage du serveur échouera si - conf/vhosts/* ne correspond à aucun répertoire, ou si *.conf ne - correspond à aucun fichier :

    +

    Par contre, dans l'exemple suivant, la directive sera simplement + ignorée si aucun sous-répertoire de conf/vhosts ne contient au + moins un fichier *.conf :

    - - Include strict conf/vhosts/*/*.conf - + IncludeOptional conf/vhosts/*/*.conf -

    Dans cet exemple, le démarrage du serveur réussira si - conf/vhosts/* ne correspond à aucun répertoire, ou si *.conf ne - correspond à aucun fichier.

    +
    - - Include optional conf/vhosts/*/*.conf - +IncludeOptional +apachectl +
    + + +IncludeOptional +Inclusion de fichiers dans le fichier de configuration +IncludeOptional +chemin-fichier|chemin-répertoire|wildcard +server configvirtual host +directory + +Disponible à partir de la version 2.3.6 du serveur HTTP +Apache + + +

    Cette directive permet d'inclure des fichiers dans les fichiers + de configuration du serveur. Elle fonctionne de manière identique à + la directive Include, à + l'exception du fait que si l'expression avec caractères génériques + wilcard ne correspond à aucun fichier ou répertoire, elle sera + ignorée silencieusement au lieu de causer une erreur.

    +Include apachectl
    @@ -2294,32 +2488,32 @@ host -

    L'extension Keep-Alive de HTTP/1.0 et l'implémentation des +

    L'extension Keep-Alive de HTTP/1.0 et l'implémentation des connexions persistantes dans HTTP/1.1 ont rendu possibles des - sessions HTTP de longue durée, ce qui permet de transmettre - plusieurs requêtes via la même connexion TCP. Dans certains cas, le - gain en rapidité pour des documents comportant de nombreuses images + sessions HTTP de longue durée, ce qui permet de transmettre + plusieurs requêtes via la même connexion TCP. Dans certains cas, le + gain en rapidité pour des documents comportant de nombreuses images peut atteindre 50%. Pour activer les connexions persistantes, - définissez KeepAlive On.

    + définissez KeepAlive On.

    Pour les clients HTTP/1.0, les connexions persistantes ne seront - mises en oeuvre que si elles ont été spécialement demandées par un + mises en oeuvre que si elles ont été spécialement demandées par un client. De plus, une connexion persistante avec un client HTTP/1.0 - ne peut être utilisée que si la taille du contenu est connue + ne peut être utilisée que si la taille du contenu est connue d'avance. Ceci implique que les contenus dynamiques comme les - sorties CGI, les pages SSI, et les listings de répertoires générés - par le serveur n'utiliseront en général pas les connexions + sorties CGI, les pages SSI, et les listings de répertoires générés + par le serveur n'utiliseront en général pas les connexions persistantes avec les clients HTTP/1.0. Avec les clients HTTP/1.1, - les connexions persistantes sont utilisées par défaut, sauf + les connexions persistantes sont utilisées par défaut, sauf instructions contraires. Si le client le demande, le transfert par - tronçons de taille fixe (chunked encoding) sera utilisé afin de + tronçons de taille fixe (chunked encoding) sera utilisé afin de transmettre un contenu de longueur inconnue via une connexion persistante.

    Lorsqu'un client utilise une connexion persistante, elle comptera - pour une seule requête pour la directive MaxConnectionsPerChild, quel - que soit le nombre de requêtes transmises via cette connexion.

    + que soit le nombre de requêtes transmises via cette connexion.

    MaxKeepAliveRequests @@ -2327,132 +2521,125 @@ host KeepAliveTimeout -Durée pendant laquelle le serveur va attendre une requête +Durée pendant laquelle le serveur va attendre une requête avant de fermer une connexion persistante KeepAliveTimeout nombre[ms] KeepAliveTimeout 5 server configvirtual host -La spécification d'une valeur en millisecondes est -possible depuis les versions 2.3.2 et supérieures d'Apache httpd

    Le nombre de secondes pendant lesquelles Apache httpd va attendre une - requête avant de fermer la connexion. Le délai peut être défini en - millisecondes en suffixant sa valeur par ms. La valeur du délai - spécifiée par la directive Timeout s'applique dès qu'une requête a - été reçue.

    - -

    Donner une valeur trop élévée à - KeepAliveTimeout peut induire des problèmes - de performances sur les serveurs fortement chargés. Plus le délai - est élévé, plus nombreux seront les processus serveur en attente de - requêtes de la part de clients inactifs.

    - -

    Dans un contexte de serveur virtuel à base de nom, c'est + requête avant de fermer la connexion. Le délai peut être défini en + millisecondes en suffixant sa valeur par ms. La valeur du délai + spécifiée par la directive Timeout s'applique dès qu'une requête a + été reçue.

    + +

    Donner une valeur trop élévée à + KeepAliveTimeout peut induire des problèmes + de performances sur les serveurs fortement chargés. Plus le délai + est élévé, plus nombreux seront les processus serveur en attente de + requêtes de la part de clients inactifs.

    + +

    Si la directive KeepAliveTimeout n'est + pas définie pour un serveur virtuel à base de nom, c'est la valeur de la paire adresse IP/port du serveur virtuel qui - correspond le mieux qui sera utilisée.

    + correspond le mieux qui sera utilisée.

    Limit -Limite les contrôles d'accès que la section contient à -certaines méthodes HTTP -<Limit méthode [méthode] ... > ... +Limite les contrôles d'accès que la section contient à +certaines méthodes HTTP +<Limit méthode [méthode] ... > ... </Limit> directory.htaccess AuthConfig, Limit -

    Les contrôles d'accès s'appliquent normalement à - toutes les méthodes d'accès, et c'est en général le - comportement souhaité. Dans le cas général, les directives - de contrôle d'accès n'ont pas à être placées dans une section +

    Les contrôles d'accès s'appliquent normalement à + toutes les méthodes d'accès, et c'est en général le + comportement souhaité. Dans le cas général, les directives + de contrôle d'accès n'ont pas à être placées dans une section Limit.

    La directive Limit a pour - but de limiter les effets des contrôles d'accès aux méthodes HTTP - spécifiées. Pour toutes les autres méthodes, les restrictions - d'accès contenues dans la section Limit n'auront aucun - effet. L'exemple suivant n'applique les contrôles d'accès - qu'aux méthodes POST, PUT, et - DELETE, en laissant les autres méthodes sans protection + effet. L'exemple suivant n'applique les contrôles d'accès + qu'aux méthodes POST, PUT, et + DELETE, en laissant les autres méthodes sans protection :

    - - <Limit POST PUT DELETE>
    - - Require valid-user
    -
    - </Limit> -
    + +<Limit POST PUT DELETE> + Require valid-user +</Limit> + -

    La liste des noms de méthodes peut contenir une ou plusieurs +

    La liste des noms de méthodes peut contenir une ou plusieurs valeurs parmi les suivantes : GET, POST, PUT, DELETE, CONNECT, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, et UNLOCK. - Le nom de méthode est sensible à la casse. Si la - valeur GET est présente, les requêtes HEAD - seront aussi concernées. La méthode TRACE ne peut pas - être limitée (voir la directive Le nom de méthode est sensible à la casse. Si la + valeur GET est présente, les requêtes HEAD + seront aussi concernées. La méthode TRACE ne peut pas + être limitée (voir la directive TraceEnable).

    Une section LimitExcept doit toujours être préférée à + type="section">LimitExcept doit toujours être préférée à une section Limit pour la - restriction d'accès, car une section LimitExcept fournit une protection contre - les méthodes arbitraires. + les méthodes arbitraires.

    Les directives Limit et LimitExcept - peuvent être imbriquées. Dans ce cas, pour chaque niveau des + peuvent être imbriquées. Dans ce cas, pour chaque niveau des directives Limit ou LimitExcept, ces dernières - doivent restreindre l'accès pour les méthodes auxquelles les - contrôles d'accès s'appliquent.

    + type="section" module="core">LimitExcept, ces dernières + doivent restreindre l'accès pour les méthodes auxquelles les + contrôles d'accès s'appliquent.

    Lorsqu'on utilise les directives Limit ou LimitExcept avec la directive Require, la première directive + module="mod_authz_core">Require, la première directive Require dont la - condition est satisfaite autorise la requête, sans tenir compte de - la présence d'autres directives Require.

    Par exemple, avec la configuration suivante, tous les - utilisateurs seront autorisés à effectuer des requêtes + utilisateurs seront autorisés à effectuer des requêtes POST, et la directive Require group - editors sera ignorée dans tous les cas :

    - - - <LimitExcept GET> - - Require valid-user - - </LimitExcept>
    - <Limit POST> - - Require group editors - - </Limit> -
    + editors sera ignorée dans tous les cas :

    + + +<LimitExcept GET> + Require valid-user +</LimitExcept> +<Limit POST> + Require group editors +</Limit> +
    LimitExcept -Applique les contrôles d'accès à toutes les méthodes HTTP, -sauf celles qui sont spécifiées -<LimitExcept méthode [méthode] ... > ... +Applique les contrôles d'accès à toutes les méthodes HTTP, +sauf celles qui sont spécifiées +<LimitExcept méthode [méthode] ... > ... </LimitExcept> directory.htaccess @@ -2461,72 +2648,67 @@ sauf celles qui sont spécifiées

    LimitExcept et </LimitExcept> permettent de regrouper des - directives de contrôle d'accès qui s'appliqueront à toutes les - méthodes d'accès HTTP qui ne font pas partie de la + directives de contrôle d'accès qui s'appliqueront à toutes les + méthodes d'accès HTTP qui ne font pas partie de la liste des arguments ; en d'autres termes, elles ont un comportement - opposé à celui de la section Limit, et on peut les utiliser pour - contrôler aussi bien les méthodes standards que les méthodes non + contrôler aussi bien les méthodes standards que les méthodes non standards ou non reconnues. Voir la documentation de la section Limit pour plus - de détails.

    + de détails.

    Par exemple :

    - - <LimitExcept POST GET>
    - - Require valid-user
    -
    - </LimitExcept> -
    + +<LimitExcept POST GET> + Require valid-user +</LimitExcept> +
    LimitInternalRecursion -Détermine le nombre maximal de redirections internes et de -sous-requêtes imbriquées +Détermine le nombre maximal de redirections internes et de +sous-requêtes imbriquées LimitInternalRecursion nombre [nombre] LimitInternalRecursion 10 server configvirtual host -Disponible à partir de la version 2.0.47 d'Apache httpd

    Une redirection interne survient, par exemple, quand on utilise la directive Action qui - redirige en interne la requête d'origine vers un script CGI. Une - sous-requête est le mécanisme qu'utilise Apache httpd pour déterminer ce - qui se passerait pour un URI s'il faisait l'objet d'une requête. Par - exemple, mod_dir utilise les sous-requêtes pour - rechercher les fichiers listés dans la directive mod_dir utilise les sous-requêtes pour + rechercher les fichiers listés dans la directive DirectoryIndex.

    La directive LimitInternalRecursion permet - d'éviter un crash du serveur dû à un bouclage infini de redirections - internes ou de sous-requêtes. De tels bouclages sont dus en général - à des erreurs de configuration.

    + d'éviter un crash du serveur dû à un bouclage infini de redirections + internes ou de sous-requêtes. De tels bouclages sont dus en général + à des erreurs de configuration.

    La directive accepte, comme arguments, deux limites qui sont - évaluées à chaque requête. Le premier nombre est le - nombre maximum de redirections internes qui peuvent se succéder. Le - second nombre détermine la profondeur d'imbrication - maximum des sous-requêtes. Si vous ne spécifiez qu'un seul - nombre, il sera affecté aux deux limites.

    - - Exemple - LimitInternalRecursion 5 - + évaluées à chaque requête. Le premier nombre est le + nombre maximum de redirections internes qui peuvent se succéder. Le + second nombre détermine la profondeur d'imbrication + maximum des sous-requêtes. Si vous ne spécifiez qu'un seul + nombre, il sera affecté aux deux limites.

    + + LimitInternalRecursion 5
    LimitRequestBody -limite la taille maximale du corps de la requête HTTP -envoyée par le client +limite la taille maximale du corps de la requête HTTP +envoyée par le client LimitRequestBody octets LimitRequestBody 0 server configvirtual @@ -2536,42 +2718,40 @@ host All -

    Cette directive spécifie la taille maximale autorisée pour le - corps d'une requête ; la valeur de l'argument octets va - de 0 (pour une taille illimitée), à 2147483647 (2Go). Voir la note - ci-dessous pour la limite d'applicabilité aux requêtes mandatées.

    +

    Cette directive spécifie la taille maximale autorisée pour le + corps d'une requête ; la valeur de l'argument octets va + de 0 (pour une taille illimitée), à 2147483647 (2Go). Voir la note + ci-dessous pour la limite d'applicabilité aux requêtes mandatées.

    La directive LimitRequestBody permet de - définir une limite pour la taille maximale autorisée du corps d'une - requête HTTP en tenant compte du contexte dans lequel la directive - a été placée (c'est à dire au niveau du serveur, d'un répertoire, - d'un fichier ou d'une localisation). Si la requête du client dépasse - cette limite, le serveur répondra par un message d'erreur et ne - traitera pas la requête. La taille du corps d'une requête normale va - varier de manière importante en fonction de la nature de la - ressource et des méthodes autorisées pour cette dernière. Les + définir une limite pour la taille maximale autorisée du corps d'une + requête HTTP en tenant compte du contexte dans lequel la directive + a été placée (c'est à dire au niveau du serveur, d'un répertoire, + d'un fichier ou d'une localisation). Si la requête du client dépasse + cette limite, le serveur répondra par un message d'erreur et ne + traitera pas la requête. La taille du corps d'une requête normale va + varier de manière importante en fonction de la nature de la + ressource et des méthodes autorisées pour cette dernière. Les scripts CGI utilisent souvent le corps du message pour extraire les - informations d'un formulaire. Les implémentations de la méthode - PUT nécessitent une valeur au moins aussi élevée que la - taille maximale des représentations que le serveur désire accepter + informations d'un formulaire. Les implémentations de la méthode + PUT nécessitent une valeur au moins aussi élevée que la + taille maximale des représentations que le serveur désire accepter pour cette ressource.

    L'administrateur du serveur peut utiliser cette directive pour - contrôler plus efficacement les comportements anormaux des requêtes - des clients, ce qui lui permettra de prévenir certaines formes - d'attaques par déni de service.

    + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.

    Si par exemple, vous autorisez le chargement de fichiers vers une - localisation particulière, et souhaitez limiter la taille des - fichiers chargés à 100Ko, vous pouvez utiliser la directive suivante + localisation particulière, et souhaitez limiter la taille des + fichiers chargés à 100Ko, vous pouvez utiliser la directive suivante :

    - - LimitRequestBody 102400 - + LimitRequestBody 102400 -

    Pour une description détaillée de la manière dont cette - directive est interprétée par les requêtes mandatées, voir la +

    Pour une description détaillée de la manière dont cette + directive est interprétée par les requêtes mandatées, voir la documentation du module mod_proxy.

    @@ -2580,47 +2760,45 @@ host LimitRequestFields -Limite le nombre de champs d'en-tête autorisés dans une -requête HTTP +Limite le nombre de champs d'en-tête autorisés dans une +requête HTTP LimitRequestFields nombre LimitRequestFields 100 server configvirtual host -

    nombre est un entier de 0 (nombre de champs illimité) - à 32767. La valeur par défaut est définie à la compilation par la +

    nombre est un entier de 0 (nombre de champs illimité) + à 32767. La valeur par défaut est définie à la compilation par la constante DEFAULT_LIMIT_REQUEST_FIELDS (100 selon la distribution).

    -

    La directive LimitRequestFields permet à +

    La directive LimitRequestFields permet à l'administrateur du serveur de modifier le nombre maximum de champs - d'en-tête autorisés dans une requête HTTP. Pour un serveur, cette - valeur doit être supérieure au nombre de champs qu'une requête - client normale peut contenir. Le nombre de champs d'en-tête d'une - requête qu'un client utilise dépasse rarement 20, mais ce nombre - peut varier selon les implémentations des clients, et souvent en + d'en-tête autorisés dans une requête HTTP. Pour un serveur, cette + valeur doit être supérieure au nombre de champs qu'une requête + client normale peut contenir. Le nombre de champs d'en-tête d'une + requête qu'un client utilise dépasse rarement 20, mais ce nombre + peut varier selon les implémentations des clients, et souvent en fonction des extensions que les utilisateurs configurent dans leurs - navigateurs pour supporter la négociation de contenu détaillée. Les + navigateurs pour supporter la négociation de contenu détaillée. Les extensions HTTP optionnelles utilisent souvent les - champs d'en-tête des requêtes.

    + champs d'en-tête des requêtes.

    L'administrateur du serveur peut utiliser cette directive pour - contrôler plus efficacement les comportements anormaux des requêtes - des clients, ce qui lui permettra de prévenir certaines formes - d'attaques par déni de service. La valeur spécifiée doit être - augmentée si les clients standards reçoivent une erreur du serveur - indiquant que la requête comportait un nombre d'en-têtes trop + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service. La valeur spécifiée doit être + augmentée si les clients standards reçoivent une erreur du serveur + indiquant que la requête comportait un nombre d'en-têtes trop important.

    Par exemple :

    - - LimitRequestFields 50 - + LimitRequestFields 50 Avertissement -

    Dans le cas des serveurs virtuels à base de noms, la valeur de - cette directive est extraite du serveur virtuel par défaut (le +

    Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le premier de la liste) pour la paire adresse IP/port.

    @@ -2629,44 +2807,42 @@ requête HTTP LimitRequestFieldSize -Dédinit la taille maximale autorisée d'un en-tête de -requête HTTP +Dédinit la taille maximale autorisée d'un en-tête de +requête HTTP LimitRequestFieldSize octets LimitRequestFieldSize 8190 server configvirtual host -

    Cette directive permet de définir le nombre maximum - d'octets autorisés dans un en-tête de requête HTTP.

    +

    Cette directive permet de définir le nombre maximum + d'octets autorisés dans un en-tête de requête HTTP.

    La directive LimitRequestFieldSize permet - à l'administrateur du serveur de réduire ou augmenter la taille - maximale autorisée d'un en-tête de requête HTTP. Pour un serveur, - cette valeur doit être suffisamment grande pour contenir tout - en-tête d'une requête client normale. La taille d'un champ d'en-tête - de requête normal va varier selon les implémentations des clients, + à l'administrateur du serveur de définir la taille + maximale autorisée d'un en-tête de requête HTTP. Pour un serveur, + cette valeur doit être suffisamment grande pour contenir tout + en-tête d'une requête client normale. La taille d'un champ d'en-tête + de requête normal va varier selon les implémentations des clients, et en fonction des extensions que les utilisateurs - configurent dans leurs navigateurs pour supporter la négociation de - contenu détaillée. Les en-têtes d'authentification SPNEGO peuvent + configurent dans leurs navigateurs pour supporter la négociation de + contenu détaillée. Les en-têtes d'authentification SPNEGO peuvent atteindre une taille de 12392 octets.

    >L'administrateur du serveur peut utiliser cette directive pour - contrôler plus efficacement les comportements anormaux des requêtes - des clients, ce qui lui permettra de prévenir certaines formes - d'attaques par déni de service.

    + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.

    Par exemple ::

    - - LimitRequestFieldSize 4094 - + LimitRequestFieldSize 4094 - Dans des conditions normales, la valeur par défaut de cette - directive ne doit pas être modifiée. + Dans des conditions normales, la valeur par défaut de cette + directive ne doit pas être modifiée. Avertissement -

    Dans le cas des serveurs virtuels à base de noms, la valeur de - cette directive est extraite du serveur virtuel par défaut (le +

    Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le premier de la liste) pour lequel la paire adresse IP/port correspond le mieux.

    @@ -2675,44 +2851,42 @@ requête HTTP LimitRequestLine -Définit la taille maximale d'une ligne de requête +Définit la taille maximale d'une ligne de requête HTTP LimitRequestLine octets LimitRequestLine 8190 server configvirtual host -

    Cette directive permet de définir la taille maximale autorisée - pour une ligne de requête HTTP en octets.

    +

    Cette directive permet de définir la taille maximale autorisée + pour une ligne de requête HTTP en octets.

    -

    La directive LimitRequestLine permet à - l'administrateur du serveur de réduire ou augmenter la taille - maximale autorisée d'une ligne de requête HTTP client. Comme une - requête comporte une méthode HTTP, un URI, et une version de +

    La directive LimitRequestLine permet à + l'administrateur du serveur de définir la taille + maximale autorisée d'une ligne de requête HTTP client. Comme une + requête comporte une méthode HTTP, un URI, et une version de protocole, la directive LimitRequestLine - impose une restriction sur la longueur maximale autorisée pour un - URI dans une requête au niveau du serveur. Pour un serveur, cette - valeur doit être suffisamment grande pour référencer les noms de - toutes ses ressources, y compris toutes informations pouvant être - ajoutées dans la partie requête d'une méthode GET.

    + impose une restriction sur la longueur maximale autorisée pour un + URI dans une requête au niveau du serveur. Pour un serveur, cette + valeur doit être suffisamment grande pour référencer les noms de + toutes ses ressources, y compris toutes informations pouvant être + ajoutées dans la partie requête d'une méthode GET.

    L'administrateur du serveur peut utiliser cette directive pour - contrôler plus efficacement les comportements anormaux des requêtes - des clients, ce qui lui permettra de prévenir certaines formes - d'attaques par déni de service.

    + contrôler plus efficacement les comportements anormaux des requêtes + des clients, ce qui lui permettra de prévenir certaines formes + d'attaques par déni de service.

    Par exemple :

    - - LimitRequestLine 4094 - + LimitRequestLine 4094 - Dans des conditions normales, la valeur par défaut de cette - directive ne doit pas être modifiée. + Dans des conditions normales, cette directive doit conserver + sa valeur par défaut. Avertissement -

    Dans le cas des serveurs virtuels à base de noms, la valeur de - cette directive est extraite du serveur virtuel par défaut (le +

    Dans le cas des serveurs virtuels à base de noms, la valeur de + cette directive est extraite du serveur virtuel par défaut (le premier de la liste) pour lequel la paire adresse IP/port correspond le mieux.

    @@ -2722,7 +2896,7 @@ HTTP
    LimitXMLRequestBody -Définit la taille maximale du corps d'une requête au format +Définit la taille maximale du corps d'une requête au format XML LimitXMLRequestBody octets LimitXMLRequestBody 1000000 @@ -2732,15 +2906,13 @@ host All -

    Taille maximale (en octets) du corps d'une requête au format XML. +

    Taille maximale (en octets) du corps d'une requête au format XML. Une valeur de 0 signifie qu'aucune limite n'est - imposée.

    + imposée.

    Exemple :

    - - LimitXMLRequestBody 0 - + LimitXMLRequestBody 0
    @@ -2748,7 +2920,7 @@ host Location N'applique les directives contenues qu'aux URLs -spécifiées +spécifiées <Location chemin URL|URL> ... </Location> server configvirtual @@ -2757,162 +2929,164 @@ host

    La directive Location - limite la portée des directives contenues aux URLs définies par - l'argument URL. Elle est similaire à la directive Directory, et marque le - début d'une section qui se termine par une directive + début d'une section qui se termine par une directive </Location>. Les sections Location sont traitées selon l'ordre dans + type="section">Location sont traitées selon l'ordre dans lequel elles apparaissent dans le fichier de configuration, mais - après les sections Directory et la lecture des - fichiers .htaccess, et après les sections .htaccess, et après les sections Files.

    Les sections Location - agissent complètement en dehors du système de fichiers. Ceci a de - nombreuses conséquences. Parmi les plus importantes, on ne doit pas + agissent complètement en dehors du système de fichiers. Ceci a de + nombreuses conséquences. Parmi les plus importantes, on ne doit pas utiliser les sections Location - pour contrôler l'accès aux répertoires du système de fichiers. Comme - plusieurs URLs peuvent correspondre au même répertoire du système de - fichiers, un tel contrôle d'accès pourrait être contourné.

    + pour contrôler l'accès aux répertoires du système de fichiers. Comme + plusieurs URLs peuvent correspondre au même répertoire du système de + fichiers, un tel contrôle d'accès pourrait être contourné.

    -

    Les directives que contient cette section seront appliquées aux - requêtes si la partie chemin de l'URL satisfait à l'un au moins de - ces critères : +

    Les directives que contient cette section seront appliquées aux + requêtes si la partie chemin de l'URL satisfait à l'un au moins de + ces critères :

      -
    • Le chemin spécifié correspond exactement à la partie chemin de +
    • Le chemin spécifié correspond exactement à la partie chemin de l'URL.
    • -
    • Le chemin spécifié, qui se termine par un slash, est un - préfixe de la partie chemin de l'URL (traité comme une racine du +
    • Le chemin spécifié, qui se termine par un slash, est un + préfixe de la partie chemin de l'URL (traité comme une racine du contexte).
    • -
    • Le chemin spécifié, si on lui ajoute un slash de fin, est un - préfixe de la partie chemin de l'URL (aussi traité comme une racine du +
    • Le chemin spécifié, si on lui ajoute un slash de fin, est un + préfixe de la partie chemin de l'URL (aussi traité comme une racine du contexte).

    - Dans l'exemple ci-dessous, où aucun slash de fin n'est utilisé, les - directives contenues dans la section s'appliqueront à /private1, - /private1/ et /private1/file.txt, mais pas à /private1other. + Dans l'exemple ci-dessous, où aucun slash de fin n'est utilisé, les + directives contenues dans la section s'appliqueront à /private1, + /private1/ et /private1/file.txt, mais pas à /private1other.

    - - <Location /private1> - ... - + +<Location "/private1"> + # ... +</Location> +

    - De même, dans l'exemple ci-dessous, où l'on utilise un slash de fin, les - directives contenues dans la section s'appliqueront à /private2/ et - à /private2/file.txt, mais pas à /private2other. + De même, dans l'exemple ci-dessous, où l'on utilise un slash de fin, les + directives contenues dans la section s'appliqueront à /private2/ et + à /private2/file.txt, mais pas à /private2other.

    - - <Location /private2/> - ... - + +<Location "/private2/"> + # ... +</Location> + Quand utiliser la section <directive type="section">Location</directive>

    Vous pouvez utiliser une section Location pour appliquer des directives à - des contenus situés en dehors du système de fichiers. Pour les - contenus situés à l'intérieur du système de fichiers, utilisez - plutôt les sections Location pour appliquer des directives à + des contenus situés en dehors du système de fichiers. Pour les + contenus situés à l'intérieur du système de fichiers, utilisez + plutôt les sections Directory et Files. <Location - /> constitue une exception et permet d'appliquer aisément - une configuration à l'ensemble du serveur.

    + "/"> constitue une exception et permet d'appliquer aisément + une configuration à l'ensemble du serveur.

    -

    Pour toutes les requêtes originales (non mandatées), l'argument +

    Pour toutes les requêtes originales (non mandatées), l'argument URL est un chemin d'URL de la forme - /chemin/. Aucun protocole, nom d'hôte, port, ou chaîne - de requête ne doivent apparaître. Pour les requêtes mandatées, l'URL - spécifiée doit être de la forme + /chemin/. Aucun protocole, nom d'hôte, port, ou chaîne + de requête ne doivent apparaître. Pour les requêtes mandatées, l'URL + spécifiée doit être de la forme protocole://nom_serveur/chemin, et vous devez inclure - le préfixe.

    + le préfixe.

    -

    L'URL peut contenir des caractères génériques. Dans une chaîne - avec caractères génériques, ? correspond à un caractère - quelconque, et * à toute chaîne de caractères. Les - caractères génériques ne peuvent pas remplacer un / dans le chemin +

    L'URL peut contenir des caractères génériques. Dans une chaîne + avec caractères génériques, ? correspond à un caractère + quelconque, et * à toute chaîne de caractères. Les + caractères génériques ne peuvent pas remplacer un / dans le chemin URL.

    On peut aussi utiliser les Expressions - rationnelles, moyennant l'addition d'un caractère + rationnelles, moyennant l'addition d'un caractère ~. Par exemple :

    - - <Location ~ "/(extra|special)/data"> - + +<Location ~ "/(extra|special)/data"> + #... +</Location> + -

    concernerait les URLs contenant les sous-chaîne +

    concernerait les URLs contenant les sous-chaîne /extra/data ou /special/data. La directive LocationMatch - présente un comportement identique à la version avec expressions + présente un comportement identique à la version avec expressions rationnelles de la directive Location, et son utilisation est - préférable à l'utilisation de cette dernière pour la simple raison + préférable à l'utilisation de cette dernière pour la simple raison qu'il est difficile de distinguer ~ de - dans la plupart des fontes.

    La directive Location s'utilise principalement avec la directive SetHandler. Par exemple, pour activer les - requêtes d'état, mais ne les autoriser que depuis des navigateurs + requêtes d'état, mais ne les autoriser que depuis des navigateurs appartenant au domaine example.com, vous pouvez utiliser :

    - - <Location /status>
    - - SetHandler server-status
    - Require host example.com
    -
    - </Location> -
    - - Note à propos du slash (/) -

    La signification du caractère slash dépend de l'endroit où il - se trouve dans l'URL. Les utilisateurs peuvent être habitués à - son comportement dans le système de fichiers où plusieurs slashes - successifs sont souvent réduits à un slash unique (en d'autres - termes, /home///foo est identique à + +<Location "/status"> + SetHandler server-status + Require host example.com +</Location> + + + Note à propos du slash (/) +

    La signification du caractère slash dépend de l'endroit où il + se trouve dans l'URL. Les utilisateurs peuvent être habitués à + son comportement dans le système de fichiers où plusieurs slashes + successifs sont souvent réduits à un slash unique (en d'autres + termes, /home///foo est identique à /home/foo). Dans l'espace de nommage des URLs, ce n'est cependant pas toujours le cas. Pour la directive LocationMatch et la version avec expressions rationnelles de la directive Location, vous devez spécifier + type="section">Location, vous devez spécifier explicitement les slashes multiples si telle est votre intention.

    -

    Par exemple, <LocationMatch ^/abc> va - correspondre à l'URL /abc mais pas à l'URL +

    Par exemple, <LocationMatch "^/abc"> va + correspondre à l'URL /abc mais pas à l'URL //abc. La directive Location sans expression rationnelle se comporte de - la même manière lorsqu'elle est utilisée pour des requêtes - mandatées. Par contre, lorsque la directive Location sans expression rationnelle - est utilisée pour des requêtes non mandatées, elle fera - correspondre implicitement les slashes multiples à des slashes - uniques. Par exemple, si vous spécifiez <Location - /abc/def>, une requête de la forme + est utilisée pour des requêtes non mandatées, elle fera + correspondre implicitement les slashes multiples à des slashes + uniques. Par exemple, si vous spécifiez <Location + "/abc/def">, une requête de la forme /abc//def correspondra.

    Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête. +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête.
    LocationMatch N'applique les directives contenues qu'aux URLs -correspondant à une expression rationnelle +correspondant à une expression rationnelle <LocationMatch regex> ... </LocationMatch> server configvirtual @@ -2921,29 +3095,57 @@ host

    La directive LocationMatch - limite la portée des directives contenues à l'URL spécifiée, de - manière identique à la directive Location. Mais son argument permettant de - spécifier les URLs concernées est une expression rationnelle au lieu d'une simple - chaîne de caractères. Par exemple :

    + chaîne de caractères. Par exemple :

    - - <LocationMatch "/(extra|special)/data"> - + +<LocationMatch "/(extra|special)/data"> + # ... +</LocationMatch> + -

    correspondrait à toute URL contenant les sous-chaînes +

    correspondrait à toute URL contenant les sous-chaînes /extra/data ou /special/data.

    + +

    Si vous recherchez une URL commençant par + plutôt que seulement contenant /extra/data, préfixez + l'expression rationnelle avec un ^.

    + + + <LocationMatch "^/(extra|special)/data"> + +
    + +

    A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé + par "MATCH_". Ceci permet + de référencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.

    + + +<LocationMatch "^/combined/(?<sitename>[^/]+)"> + require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</LocationMatch> + +
    Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête. +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête.
    LogLevel -Contrôle la verbosité du journal des erreurs +Contrôle la verbosité du journal des erreurs LogLevel [module:]niveau [module:niveau] ... @@ -2952,14 +3154,14 @@ entre elles à la réception d'une requête. hostdirectory
    La configuration du niveau de journalisation par module -et par répertoire est disponible depuis la version 2.3.6 du serveur HTTP +et par répertoire est disponible depuis la version 2.3.6 du serveur HTTP Apache

    La directive LogLevel permet d'ajuster la - verbosité des messages enregistrés dans les journaux d'erreur (voir + verbosité des messages enregistrés dans les journaux d'erreur (voir la directive ErrorLog - directive). Les niveaux disponibles sont présentés - ci-après, par ordre de criticité décroissante :

    + directive). Les niveaux disponibles sont présentés + ci-après, par ordre de criticité décroissante :

    @@ -2975,7 +3177,7 @@ Apache - + @@ -2983,7 +3185,7 @@ Apache - + @@ -3016,7 +3218,7 @@ Apache - + @@ -3034,7 +3236,7 @@ Apache - + @@ -3083,80 +3285,81 @@ Apache - + - +
    emerg Urgences - le système est inutilisable.Urgences - le système est inutilisable. "Child cannot open lock file. Exiting"
    alert Des mesures doivent être prises immédiatement.Des mesures doivent être prises immédiatement. "getpwuid: couldn't determine user name from uid"
    notice Evènement important mais normal.Evènement important mais normal. "httpd: caught SIGBUS, attempting to dump core in ..."
    debug Messages de débogage.Messages de débogage. "Opening config file ..."
    trace7 Messages de traces, enregistrement d'une grande quantité de - donnéesMessages de traces, enregistrement d'une grande quantité de + données "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"
    trace8 Messages de traces, enregistrement d'une grande quantité de - donnéesMessages de traces, enregistrement d'une grande quantité de + données "| 0000: 02 23 44 30 13 40 ac 34 df 3d bf 9a 19 49 39 15 |"
    -

    Lorsqu'un niveau particulier est spécifié, les messages de tous - les autres niveaux de criticité supérieure seront aussi enregistrés. - Par exemple, si LogLevel info est spécifié, +

    Lorsqu'un niveau particulier est spécifié, les messages de tous + les autres niveaux de criticité supérieure seront aussi enregistrés. + Par exemple, si LogLevel info est spécifié, les messages de niveaux notice et warn - seront aussi émis.

    + seront aussi émis.

    -

    Il est recommandé d'utiliser un niveau crit ou - inférieur.

    +

    Il est recommandé d'utiliser un niveau crit ou + inférieur.

    Par exemple :

    - - LogLevel notice - + LogLevel notice Note

    Si la journalisation s'effectue directement dans un fichier, - les messages de niveau notice ne peuvent pas être - supprimés et sont donc toujours journalisés. Cependant, ceci ne + les messages de niveau notice ne peuvent pas être + supprimés et sont donc toujours journalisés. Cependant, ceci ne s'applique pas lorsque la journalisation s'effectue vers syslog.

    -

    Spécifier un niveau sans nom de module va attribuer ce niveau à - tous les modules. Spécifier un niveau avec nom de module va - attribuer ce niveau à ce module seulement. Il est possible de - spécifier un module par le nom de son fichier source ou par son +

    Spécifier un niveau sans nom de module va attribuer ce niveau à + tous les modules. Spécifier un niveau avec nom de module va + attribuer ce niveau à ce module seulement. Il est possible de + spécifier un module par le nom de son fichier source ou par son identificateur, avec ou sans le suffixe _module. Les - trois spécifications suivantes sont donc équivalentes :

    + trois spécifications suivantes sont donc équivalentes :

    - - LogLevel info ssl:warn
    - LogLevel info mod_ssl.c:warn
    - LogLevel info ssl_module:warn
    -
    + +LogLevel info ssl:warn +LogLevel info mod_ssl.c:warn +LogLevel info ssl_module:warn +

    Il est aussi possible d'attribuer un niveau de journalisation par - répertoire :

    + répertoire :

    - - LogLevel info
    - <Directory /usr/local/apache/htdocs/app>
    -   LogLevel debug
    - </Files> -
    + +LogLevel info +<Directory "/usr/local/apache/htdocs/app"> + LogLevel debug +</Directory> + - La configuration du niveau de journalisation par répertoire - n'affecte que les messages journalisés après l'interprétation de - la requête et qui sont associés à cette dernière. Les messages - de journalisation associés à la connexion ou au serveur ne sont - pas affectés. + La configuration du niveau de journalisation par répertoire + n'affecte que les messages journalisés après l'interprétation de + la requête et qui sont associés à cette dernière. Les messages + de journalisation associés à la connexion ou au serveur ne sont + pas affectés.
    +ErrorLog +ErrorLogFormat +Journaux du serveur HTTP Apache
    MaxKeepAliveRequests -Nombre de requêtes permises pour une connexion +Nombre de requêtes permises pour une connexion persistante MaxKeepAliveRequests nombre MaxKeepAliveRequests 100 @@ -3166,24 +3369,22 @@ host

    La directive MaxKeepAliveRequests permet - de limiter le nombre de requêtes autorisées par connexion lorsque - KeepAlive est à "on". Si sa - valeur est 0, le nombre de requêtes autorisées est - illimité. Il est recommandé de définir une valeur assez haute pour + de limiter le nombre de requêtes autorisées par connexion lorsque + KeepAlive est à "on". Si sa + valeur est 0, le nombre de requêtes autorisées est + illimité. Il est recommandé de définir une valeur assez haute pour des performances du serveur maximales.

    Par exemple :

    - - MaxKeepAliveRequests 500 - + MaxKeepAliveRequests 500
    MaxRanges -Nombre de segments de données autorisé avant le renvoi de -l'intégralité de la ressource +Nombre de segments de données autorisé avant le renvoi de +l'intégralité de la ressource MaxRanges default | unlimited | none | nombre de segments MaxRanges 200 server configvirtual host @@ -3194,33 +3395,33 @@ Apache

    La directive MaxRanges permet de limiter - le nombre de segments de données que le serveur va renvoyer au - client. Si un nombre de segments plus important est demandé, la - ressource sera renvoyée dans son intégralité.

    + le nombre de segments de données que le serveur va renvoyer au + client. Si un nombre de segments plus important est demandé, la + ressource sera renvoyée dans son intégralité.

    default
    -
    Limite le nombre de segments de données à 200 (valeur par - défaut définie à la compilation).
    +
    Limite le nombre de segments de données à 200 (valeur par + défaut définie à la compilation).
    none
    -
    Les en-têtes Range sont ignorés.
    +
    Les en-têtes Range sont ignorés.
    unlimited
    -
    Le nombre de segments de données est illimité.
    +
    Le nombre de segments de données est illimité.
    nombre de segments
    -
    Un nombre positif représentera la nombre de segments de - données maximal que le serveur renverra au client.
    +
    Un nombre positif représentera la nombre de segments de + données maximal que le serveur renverra au client.
    MaxRangeOverlaps - Nombre de chevauchements de segments de données autorisé + Nombre de chevauchements de segments de données autorisé (par exemple 100-200,150-300) avant le renvoi de la - ressource complète + ressource complète MaxRangeOverlaps default | unlimited | none | nombre de chevauchements MaxRangeOverlaps 20 @@ -3232,34 +3433,34 @@ Apache

    La directive MaxRangeOverlaps permet - de limiter le nombre de chevauchements de segments de données HTTP - autorisé par le serveur. Si le nombre de - chevauchements de segments demandé est supérieur au nombre maximal - autorisé, la ressource sera renvoyée dans son intégralité.

    + de limiter le nombre de chevauchements de segments de données HTTP + autorisé par le serveur. Si le nombre de + chevauchements de segments demandé est supérieur au nombre maximal + autorisé, la ressource sera renvoyée dans son intégralité.

    default
    -
    Limite le nombre de chevauchements de segments à la valeur - par défaut 20 définie à la compilation.
    +
    Limite le nombre de chevauchements de segments à la valeur + par défaut 20 définie à la compilation.
    none
    -
    Aucun chevauchement de segment n'est autorisé.
    +
    Aucun chevauchement de segment n'est autorisé.
    unlimited
    -
    Le nombre de chevauchements de segments est illimité.
    +
    Le nombre de chevauchements de segments est illimité.
    number-of-ranges
    -
    Un nombre positif représente le nombre maximal de - chevauchements de segments autorisé par le serveur.
    +
    Un nombre positif représente le nombre maximal de + chevauchements de segments autorisé par le serveur.
    MaxRangeReversals - Nombre d'inversions d'ordre autorisé dans la spécification des - segments de données (par exemple 100-200,50-70) avant le renvoi de la - ressource complète + Nombre d'inversions d'ordre autorisé dans la spécification des + segments de données (par exemple 100-200,50-70) avant le renvoi de la + ressource complète MaxRangeReversals default | unlimited | none | nombre d'inversions MaxRangeReversals 20 @@ -3271,135 +3472,135 @@ Apache

    La directive MaxRangeReversals permet - de limiter le nombre d'inversions d'ordre dans la spécification - des segments de données HTTP - autorisé par le serveur. Si le nombre - d'inversions demandé est supérieur au nombre maximal - autorisé, la ressource sera renvoyée dans son intégralité.

    + de limiter le nombre d'inversions d'ordre dans la spécification + des segments de données HTTP + autorisé par le serveur. Si le nombre + d'inversions demandé est supérieur au nombre maximal + autorisé, la ressource sera renvoyée dans son intégralité.

    default
    -
    Limite le nombre d'inversions à la valeur - par défaut 20 définie à la compilation.
    +
    Limite le nombre d'inversions à la valeur + par défaut 20 définie à la compilation.
    none
    -
    Aucune inversion n'est autorisée.
    +
    Aucune inversion n'est autorisée.
    unlimited
    -
    Le nombre d'inversions est illimité.
    +
    Le nombre d'inversions est illimité.
    number-of-ranges
    -
    Un nombre positif représente le nombre maximal - d'inversions autorisé par le serveur.
    +
    Un nombre positif représente le nombre maximal + d'inversions autorisé par le serveur.
    Mutex -Définit les mécanismes de mutex et le repertoire du fichier -verrou pour tous les mutex ou seulement les mutex spécifiés -Mutex mécanisme [default|nom-mutex] ... [OmitPID] +Définit les mécanismes de mutex et le repertoire du fichier +verrou pour tous les mutex ou seulement les mutex spécifiés +Mutex mécanisme [default|nom-mutex] ... [OmitPID] Mutex default server config Disponible depuis la version 2.3.4 du serveur HTTP Apache -

    La directive Mutex permet de définir le - mécanisme de mutex, et éventuellement le répertoire du fichier - verrou que les modules et httpd utilisent pour sérialiser l'accès aux - ressources. Spécifiez default comme premier argument - pour modifier la configuration de tous les mutex ; spécifiez un nom - de mutex (voir la table ci-dessous) comme premier argument pour +

    La directive Mutex permet de définir le + mécanisme de mutex, et éventuellement le répertoire du fichier + verrou que les modules et httpd utilisent pour sérialiser l'accès aux + ressources. Spécifiez default comme second argument + pour modifier la configuration de tous les mutex ; spécifiez un nom + de mutex (voir la table ci-dessous) comme second argument pour ne modifier que la configuration de ce mutex.

    La directive Mutex est typiquement - utilisée dans les situations exceptionnelles suivantes :

    + utilisée dans les situations exceptionnelles suivantes :

      -
    • choix d'un autre mécanisme de mutex lorsque le mécanisme par - défaut sélectionné par APR présente un - problème de fonctionnement ou de performances.
    • +
    • choix d'un autre mécanisme de mutex lorsque le mécanisme par + défaut sélectionné par APR présente un + problème de fonctionnement ou de performances.
    • -
    • choix d'un autre répertoire utilisé par les mutex à base de - fichier lorsque le répertoire par défaut ne supporte pas le +
    • choix d'un autre répertoire utilisé par les mutex à base de + fichier lorsque le répertoire par défaut ne supporte pas le verrouillage
    - Modules supportés -

    Cette directive ne configure que les mutex qui ont été - enregistrés avec le serveur de base via l'API + Modules supportés +

    Cette directive ne configure que les mutex qui ont été + enregistrés avec le serveur de base via l'API ap_mutex_register(). Tous les modules fournis avec httpd supportent la directive Mutex, mais il - n'en sera pas forcément de même pour les modules tiers. - Reportez-vous à la documentation du module tiers considéré afin de - déterminer le(s) nom(s) de mutex qui pourront être définis si la - directive est supportée.

    + n'en sera pas forcément de même pour les modules tiers. + Reportez-vous à la documentation du module tiers considéré afin de + déterminer le(s) nom(s) de mutex qui pourront être définis si la + directive est supportée.

    -

    Les mécanismes de mutex disponibles sont les suivants :

    +

    Les mécanismes de mutex disponibles sont les suivants :

    • default | yes -

      C'est l'implémentation du verrouillage par défaut, telle - qu'elle est définie par APR. On peut - afficher l'implémentation du verrouillage par défaut via la +

      C'est l'implémentation du verrouillage par défaut, telle + qu'elle est définie par APR. On peut + afficher l'implémentation du verrouillage par défaut via la commande httpd avec l'option -V.

    • none | no -

      Le mutex est désactivé, et cette valeur n'est permise pour un +

      Le mutex est désactivé, et cette valeur n'est permise pour un mutex que si le module indique qu'il s'agit d'un choix valide. Consultez la documentation du module pour plus d'informations.

    • posixsem -

      Une variante de mutex basée sur un sémaphore Posix.

      +

      Une variante de mutex basée sur un sémaphore Posix.

      Avertissement -

      La propriété du sémaphore n'est pas restituée si un thread du - processus gérant le mutex provoque une erreur de segmentation, +

      La propriété du sémaphore n'est pas restituée si un thread du + processus gérant le mutex provoque une erreur de segmentation, ce qui provoquera un blocage du serveur web.

    • sysvsem -

      Une variante de mutex basée sur un sémaphore IPC SystemV.

      +

      Une variante de mutex basée sur un sémaphore IPC SystemV.

      Avertissement -

      Il peut arriver que les sémaphores SysV soient conservés si le - processus se crashe avant que le sémaphore ne soit supprimé.

      +

      Il peut arriver que les sémaphores SysV soient conservés si le + processus se crashe avant que le sémaphore ne soit supprimé.

      - Sécurité -

      L'API des sémaphores permet les attaques par déni de service - par tout programme CGI s'exécutant sous le même uid que le - serveur web (autrement dit tous les programmes CGI, à moins que + Sécurité +

      L'API des sémaphores permet les attaques par déni de service + par tout programme CGI s'exécutant sous le même uid que le + serveur web (autrement dit tous les programmes CGI, à moins que vous n'utilisiez un programme du style suexec ou cgiwrapper).

    • sem -

      Sélection de la "meilleure" implémentation des sémaphores - disponible ; le choix s'effectue entre les sémaphores posix et +

      Sélection de la "meilleure" implémentation des sémaphores + disponible ; le choix s'effectue entre les sémaphores posix et IPC SystemV, dans cet ordre.

    • pthread -

      Une variante de mutex à base de mutex de thread Posix +

      Une variante de mutex à base de mutex de thread Posix inter-processus.

      Avertissement -

      Sur la plupart des systèmes, si un processus enfant se - termine anormalement alors qu'il détenait un mutex qui utilise - cette implémentation, le serveur va se bloquer et cesser de - répondre aux requêtes. Dans ce cas, un redémarrage manuel est - nécessaire pour récupérer le mutex.

      -

      Solaris constitue une exception notable, en ceci qu'il fournit - un mécanisme qui permet en général de récupérer le mutex après - l'arrêt anormal d'un processus enfant qui détenait le mutex.

      -

      Si votre système implémente la fonction +

      Sur la plupart des systèmes, si un processus enfant se + termine anormalement alors qu'il détenait un mutex qui utilise + cette implémentation, le serveur va se bloquer et cesser de + répondre aux requêtes. Dans ce cas, un redémarrage manuel est + nécessaire pour récupérer le mutex.

      +

      Solaris et Linux constituent des exceptions notables, en ceci qu'ils fournissent + un mécanisme qui permet en général de récupérer le mutex après + l'arrêt anormal d'un processus enfant qui détenait le mutex.

      +

      Si votre système est compatible POSIX ou implémente la fonction pthread_mutexattr_setrobust_np(), vous devriez - pouvoir utiliser l'option pthread sans problème.

      + pouvoir utiliser l'option pthread sans problème.

    • @@ -3408,99 +3609,100 @@ verrou pour tous les mutex ou seulement les mutex spécifiésfcntl()
      .

      Avertissement -

      Lorsqu'on utilise plusieurs mutex basés sur ce mécanisme dans +

      Lorsqu'on utilise plusieurs mutex basés sur ce mécanisme dans un environnement multi-processus, multi-thread, des erreurs de - blocage (EDEADLK) peuvent être rapportées pour des opérations de - mutex valides si la fonction fcntl() ne gère pas + blocage (EDEADLK) peuvent être rapportées pour des opérations de + mutex valides si la fonction fcntl() ne gère pas les threads, comme sous Solaris.

    • flock:/chemin/vers/mutex -

      Méthode similaire à fcntl:/chemin/vers/mutex, - mais c'est la fonction flock() qui est utilisée - pour gérer le verrouillage par fichier.

    • +

      Méthode similaire à fcntl:/chemin/vers/mutex, + mais c'est la fonction flock() qui est utilisée + pour gérer le verrouillage par fichier.

    • file:/chemin/vers/mutex -

      Sélection de la "meilleure" implémentation de verrouillage +

      Sélection de la "meilleure" implémentation de verrouillage par fichier disponible ; le choix s'effectue entre fcntl et flock, dans cet ordre.

    -

    La plupart des mécanismes ne sont disponibles que sur les - plate-formes où ces dernières et APR les - supportent. Les mécanismes qui ne sont pas disponibles sur toutes +

    La plupart des mécanismes ne sont disponibles que sur les + plate-formes où ces dernières et APR les + supportent. Les mécanismes qui ne sont pas disponibles sur toutes les plate-formes sont posixsem, sysvsem, sem, pthread, fcntl, flock, et file.

    -

    Avec les mécanismes à base de fichier fcntl et - flock, le chemin, s'il est fourni, est un répertoire dans - lequel le fichier verrou sera créé. Le répertoire par défaut est le - répertoire httpd défini par la directive ServerRoot. Utilisez toujours un système +

    Avec les mécanismes à base de fichier fcntl et + flock, le chemin, s'il est fourni, est un répertoire dans + lequel le fichier verrou sera créé. Le répertoire par + défaut est le répertoire d'exécution de httpd relatif à la + directive ServerRoot. + Utilisez toujours un système de fichiers local sur disque pour /chemin/vers/mutex et - jamais un répertoire se trouvant dans un système de fichiers NFS ou + jamais un répertoire se trouvant dans un système de fichiers NFS ou AFS. Le nom de base du fichier se composera du type de mutex, d'une - chaîne optionnelle correspondant à l'instance et fournie par le - module ; et, sauf si le mot-clé OmitPID a été spécifié, - l'identificateur du processus parent httpd sera ajouté afin de - rendre le nom du fichier unique, évitant ainsi tout conflit lorsque - plusieurs instances d'httpd partagent le même répertoire de + chaîne optionnelle correspondant à l'instance et fournie par le + module ; et, sauf si le mot-clé OmitPID a été spécifié, + l'identificateur du processus parent httpd sera ajouté afin de + rendre le nom du fichier unique, évitant ainsi tout conflit lorsque + plusieurs instances d'httpd partagent le même répertoire de verrouillage. Par exemple, si le nom de mutex est - mpm-accept, et si le répertoire de verrouillage est + mpm-accept, et si le répertoire de verrouillage est /var/httpd/locks, le nom du fichier verrou pour l'instance httpd dont le processus parent a pour identifiant 12345 sera /var/httpd/locks/mpm-accept.12345.

    - Sécurité -

    Il est conseillé d'éviter de placer les fichiers mutex - dans un répertoire où tout le monde peut écrire comme + Sécurité +

    Il est conseillé d'éviter de placer les fichiers mutex + dans un répertoire où tout le monde peut écrire comme /var/tmp, car quelqu'un pourrait initier une attaque - par déni de service et empêcher le serveur de démarrer en créant un - fichier verrou possédant un nom identique à celui que le serveur va - tenter de créer.

    + par déni de service et empêcher le serveur de démarrer en créant un + fichier verrou possédant un nom identique à celui que le serveur va + tenter de créer.

    -

    La table suivante décrit les noms de mutex utilisés par httpd et - ses modules associés.

    +

    La table suivante décrit les noms de mutex utilisés par httpd et + ses modules associés.

    - + - - + - + - + + d'associations de valeurs, afin d'éviter les interférences + d'entrées/sorties entre plusieurs requêtes @@ -3510,7 +3712,7 @@ verrou pour tous les mutex ou seulement les mutex spécifiés - + @@ -3519,40 +3721,40 @@ verrou pour tous les mutex ou seulement les mutex spécifiés
    Nom mutex Module(s)Ressource protégéeRessource protégée
    mpm-accept modules MPM prefork et workerconnexions entrantes, afin d'éviter le problème de - l'afflux de requêtes ; pour plus d'informations, voir la + connexions entrantes, afin d'éviter le problème de + l'afflux de requêtes ; pour plus d'informations, voir la documentation Amélioration des + href="../misc/perf-tuning.html">Amélioration des performances
    authdigest-client mod_auth_digestliste de clients en mémoire partagéeliste de clients en mémoire partagée
    authdigest-opaque mod_auth_digestcompteur en mémoire partagéecompteur en mémoire partagée
    ldap-cache mod_ldapcache de résultat de recherche LDAPcache de résultat de recherche LDAP
    rewrite-map mod_rewrite communication avec des programmes externes - d'associations de valeurs, afin d'éviter les interférences - d'entrées/sorties entre plusieurs requêtes
    ssl-cache ssl-stapling mod_sslcache de l'étiquetage OCSP ("OCSP stapling")cache de l'étiquetage OCSP ("OCSP stapling")
    watchdog-callback
    -

    Le mot-clé OmitPID permet d'empêcher l'addition de +

    Le mot-clé OmitPID permet d'empêcher l'addition de l'identifiant du processus httpd parent au nom du fichier verrou.

    -

    Dans l'exemple suivant, le mécanisme de mutex pour le mutex - mpm-accept est modifié pour passer du mécanisme par défaut au - mécanisme fcntl, avec le fichier verrou associé créé - dans le répertoire /var/httpd/locks. Le mécanisme de - mutex par défaut pour tous les autres mutex deviendra +

    Dans l'exemple suivant, le mécanisme de mutex pour le mutex + mpm-accept est modifié pour passer du mécanisme par défaut au + mécanisme fcntl, avec le fichier verrou associé créé + dans le répertoire /var/httpd/locks. Le mécanisme de + mutex par défaut pour tous les autres mutex deviendra sysvsem.

    - - Mutex default sysvsem
    - Mutex mpm-accept fcntl:/var/httpd/locks -
    + +Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-accept +
    NameVirtualHost -OBSOLETE : Définit une adresse IP pour les serveurs virtuels à base de +OBSOLETE : Définit une adresse IP pour les serveurs virtuels à base de nom NameVirtualHost adresse[:port] server config -

    Avant la version 2.3.11, il était nécessaire de définir une +

    Avant la version 2.3.11, il était nécessaire de définir une directive NameVirtualHost pour indiquer au - serveur qu'une paire adresse IP/port particulière pouvait être - utilisée comme serveur virtuel à base de nom. Depuis la version - 2.3.11, chaque fois qu'une paire adresse IP/port est utilisée dans - plusieurs serveurs virtuels, l'hébergement virtuel à base de nom est - automatiquement activé pour cette adresse.

    + serveur qu'une paire adresse IP/port particulière pouvait être + utilisée comme serveur virtuel à base de nom. Depuis la version + 2.3.11, chaque fois qu'une paire adresse IP/port est utilisée dans + plusieurs serveurs virtuels, l'hébergement virtuel à base de nom est + automatiquement activé pour cette adresse.

    Cette directive n'a actuellement plus aucun effet.

    @@ -3564,7 +3766,7 @@ virtuels Options -Définit les fonctionnalités disponibles pour un répertoire +Définit les fonctionnalités disponibles pour un répertoire particulier Options [+|-]option [[+|-]option] ... @@ -3574,220 +3776,296 @@ host directory.htaccess Options -Avec la version 2.3.11, la valeur par défaut passe de All -à FollowSymlinks +Avec la version 2.3.11, la valeur par défaut passe de All +à FollowSymlinks -

    La directive Options permet de définir - les fonctionnalités de serveur disponibles pour un répertoire +

    La directive Options permet de définir + les fonctionnalités de serveur disponibles pour un répertoire particulier.

    -

    option peut être défini à None, auquel - cas aucune fonctionnalité spécifique n'est activée, ou comprendre +

    option peut être défini à None, auquel + cas aucune fonctionnalité spécifique n'est activée, ou comprendre une ou plusieurs des options suivantes :

    All
    -
    Toutes les options excepté MultiViews.
    +
    Toutes les options excepté MultiViews.
    ExecCGI
    -
    L'exécution de scripts CGI à l'aide du module +
    L'exécution de scripts CGI à l'aide du module mod_cgi est permise.
    FollowSymLinks
    - Le serveur va suivre les liens symboliques dans le répertoire - concerné. Il s'agit de la valeur par défaut. + Le serveur va suivre les liens symboliques dans le répertoire + concerné. Il s'agit de la valeur par défaut.

    Bien que le serveur suive les liens symboliques, il ne modifie - pas le nom de chemin concerné défini par la section + pas le nom de chemin concerné défini par la section Directory.

    -

    Notez aussi que cette option est ignorée si - elle est définie dans une section Location.

    -

    Le fait d'omettre cette option ne doit pas être considéré comme - une mesure de sécurité efficace, car il existe toujours une - situation de compétition (race condition) entre l'instant où l'on - vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où + +

    Les options FollowSymLinks et + SymLinksIfOwnerMatch ne fonctionnent que dans les + sections Directory ou les fichiers + .htaccess.

    + +

    Le fait d'omettre cette option ne doit pas être considéré comme + une mesure de sécurité efficace, car il existe toujours une + situation de compétition (race condition) entre l'instant où l'on + vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où l'on utilise effectivement ce chemin.

    Includes
    - Les inclusions côté serveur (SSI) à l'aide du module - mod_include sont autorisées.
    + Les inclusions côté serveur (SSI) à l'aide du module + mod_include sont autorisées.
    IncludesNOEXEC
    - Les inclusions côté serveur (SSI) sont permises, mais #exec - cmd et #exec cgi sont désactivés. + Les inclusions côté serveur (SSI) sont permises, mais #exec + cmd et #exec cgi sont désactivés. L'utilisation de #include virtual pour les scripts - CGI est cependant toujours possible depuis des répertoires - définis par ScriptAlias.
    Indexes
    - Si une URL requise correspond au répertoire concerné, et si aucun + Si une URL requise correspond au répertoire concerné, et si aucun DirectoryIndex (par - exemple index.html) n'est défini pour ce - répertoire, le module mod_autoindex va renvoyer - un listing formaté du répertoire.
    + exemple index.html) n'est défini pour ce + répertoire, le module mod_autoindex va renvoyer + un listing formaté du répertoire.
    MultiViews
    - Les vues multiples ("multiviews") à contenu négocié à l'aide du - module mod_negotiation sont autorisées. - Note

    Cette option est ignorée si elle est - définie en tout autre endroit qu'une section contenu négocié à l'aide du + module mod_negotiation sont autorisées. + Note

    Cette option est ignorée si elle est + définie en tout autre endroit qu'une section Directory, car - mod_negotiation a besoin de ressources réelles - pour effectuer ses comparaisons et ses évaluations.

    + mod_negotiation a besoin de ressources réelles + pour effectuer ses comparaisons et ses évaluations.

    SymLinksIfOwnerMatch
    Le serveur ne suivra que les liens symboliques qui renvoient - vers un fichier ou un répertoire dont le propriétaire est le même + vers un fichier ou un répertoire dont le propriétaire est le même que celui du lien. - Note

    Cette option est ignorée si elle est - définie dans une section Location.

    -

    Le fait d'omettre cette option ne doit pas être considéré comme - une mesure de sécurité efficace, car il existe toujours une - situation de compétition (race condition) entre l'instant où l'on - vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où - l'on utilise effectivement ce chemin.

    -
    + Note +

    Les options FollowSymLinks et + SymLinksIfOwnerMatch ne fonctionnent que dans les + sections Directory ou les fichiers + .htaccess.

    + +

    Le fait d'omettre cette option ne doit pas être considéré comme + une mesure de sécurité efficace, car il existe toujours une + situation de compétition (race condition) entre l'instant où l'on + vérifie qu'un chemin n'est pas un lien symbolique, et l'instant où + l'on utilise effectivement ce chemin.

    +

    Normalement, si plusieurs directives - Options peuvent s'appliquer à un répertoire, - c'est la plus spécifique qui est utilisée et les autres sont - ignorées ; les options ne sont pas fusionnées (voir comment les sections sont - fusionnées). Elles le sont cependant si toutes les + Options peuvent s'appliquer à un répertoire, + c'est la plus spécifique qui est utilisée et les autres sont + ignorées ; les options ne sont pas fusionnées (voir comment les sections sont + fusionnées). Elles le sont cependant si toutes les options de la directive Options sont - précédées d'un symbole + ou -. Toute - option précédée d'un + est ajoutée à la liste des - options courantes de manière forcée et toute option précédée d'un - - est supprimée de la liste des options courantes de la - même manière.

    + précédées d'un symbole + ou -. Toute + option précédée d'un + est ajoutée à la liste des + options courantes de manière forcée et toute option précédée d'un + - est supprimée de la liste des options courantes de la + même manière.

    Note -

    Mélanger des Options avec + +

    Mélanger des Options avec + ou - avec des Options sans + ou - constitue une erreur de syntaxe, et - la vérification de la syntaxe au cours du démarrage du serveur fera - échouer ce dernier.

    + la vérification de la syntaxe au cours du démarrage du serveur fera + échouer ce dernier.

    Par exemple, sans aucun symbole + et - :

    - - <Directory /web/docs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /web/docs/spec>
    - - Options Includes
    -
    - </Directory> -
    + +<Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options Includes +</Directory> +

    ici, seule l'option Includes sera prise en compte - pour le répertoire /web/docs/spec. Par contre, si la + pour le répertoire /web/docs/spec. Par contre, si la seconde directive Options utilise les symboles + et - :

    - - <Directory /web/docs>
    - - Options Indexes FollowSymLinks
    -
    - </Directory>
    -
    - <Directory /web/docs/spec>
    - - Options +Includes -Indexes
    -
    - </Directory> -
    + +<Directory "/web/docs"> + Options Indexes FollowSymLinks +</Directory> + +<Directory "/web/docs/spec"> + Options +Includes -Indexes +</Directory> +

    alors, les options FollowSymLinks et - Includes seront prises en compte pour le répertoire + Includes seront prises en compte pour le répertoire /web/docs/spec.

    Note

    L'utilisation de -IncludesNOEXEC ou - -Includes désactive complètement les inclusions côté - serveur sans tenir compte des définitions précédentes.

    + -Includes désactive complètement les inclusions côté + serveur sans tenir compte des définitions précédentes.

    -

    En l'absence de toute définition d'options, la valeur par défaut +

    En l'absence de toute définition d'options, la valeur par défaut est FollowSymlinks.

    Protocol -Protocole pour une socket d'écoute +Protocole pour une socket d'écoute Protocol protocole server configvirtual host Disponible depuis la version 2.1.5 d'Apache, mais seulement depuis la version 2.3.3 sous Windows. -

    Cette directive permet de spécifier le protocole utilisé pour une - socket d'écoute particulière. Le protocole sert à déterminer quel - module doit traiter une requête, et d'appliquer les optimisations - spécifiques au protocole via la directive +

    Cette directive permet de spécifier le protocole utilisé pour une + socket d'écoute particulière. Le protocole sert à déterminer quel + module doit traiter une requête, et d'appliquer les optimisations + spécifiques au protocole via la directive AcceptFilter.

    -

    Vous ne devez définir le protocole que si vous travaillez avec - des ports non standards ; dans le cas général, le protocole - http est associé au port 80 et le protocole +

    Vous ne devez définir le protocole que si vous travaillez avec + des ports non standards ; dans le cas général, le protocole + http est associé au port 80 et le protocole https au port 443.

    Par exemple, si vous travaillez avec le protocole - https sur un port non standard, spécifiez le protocole - de manière explicite :

    + https sur un port non standard, spécifiez le protocole + de manière explicite :

    - - Protocol https - + Protocol https -

    Vous pouvez aussi spécifier le protocole via la directive +

    Vous pouvez aussi spécifier le protocole via la directive Listen.

    -AcceptFilter +AcceptFilter Listen
    + + Protocols + Protocoles disponibles pour un serveur virtuel ou non + Protocols protocole ... + Protocols http/1.1 + server configvirtual host + Disponible à partir de la version 2.4.17 du serveur + HTTP Apache. + + +

    Cette directive permet de spécifier la liste des protocoles + supportés par un serveur virtuel ou non. Cette liste énumère les + protocoles qu'un client sera autorisé à négocier avec ce + serveur.

    + +

    Par défaut, + seul le protocole http/1.1 est disponible (compatible avec les + clients http/1.0 et http/0.9). Par conséquent, vous devez + fournir cette liste si vous voulez étendre les protocoles + disponibles pour le serveur.

    + +

    Par exemple, si vous voulez autoriser le protocole + HTTP/2 pour un serveur avec TLS, utilisez + cette directive comme suit :

    + + + Protocols h2 http/1.1 + + +

    Les protocoles valides sont http/1.1 pour les + connexions http et https, h2 pour les connections + https et h2c pour les connexions http. D'autres + modules peuvent fournir d'autres protocoles.

    + +

    Spécifier des protocoles non disponibles ou désactivés n'aura + aucun effet, et ceux-ci seront simplement ignorés.

    + +

    Si un serveur virtuel ne possède pas de directive Protocols + propre, il hérite des protocoles spécifiés pour le serveur + principal. Autrement dit, les directives Protocols définies au + niveau d'un serveur virtuel remplacent celles définies au niveau + du serveur principal. +

    + +
    + ProtocolsHonorOrder +
    + + + + ProtocolsHonorOrder + Détermine qui du client ou du serveur détermine l'ordre + des protocoles au cours de la négociation de la connexion + ProtocolsHonorOrder On|Off + ProtocolsHonorOrder On + server configvirtual host + Disponible à partir de la version 2.4.17 du serveur + HTTP Apache. + + +

    Cette directive permet de définir si le serveur doit tenir + compte de l'ordre des protocoles définis par la directive + Protocols.

    + +

    Si cette directive est définie à Off, l'ordre de la liste des + protocoles fournie par le client l'emporte sur l'ordre défini + dans la configuration du serveur.

    + +

    Si la directive ProtocolsHonorOrder + est définie à on (valeur par défaut), + il n'est pas tenu compte de l'ordre de la liste des protocoles + fournie par le client, et seul l'ordre de la liste des protocles + définie au niveau du serveur influera la + négociation du protocole.

    + +
    + Protocols +
    RLimitCPU -Limite le temps CPU alloué aux processus initiés par les +Limite le temps CPU alloué aux processus initiés par les processus enfants d'Apache httpd RLimitCPU secondes|max [secondes|max] -Non défini ; utilise les valeurs par défaut du système +Non défini ; utilise les valeurs par défaut du système d'exploitation server configvirtual host @@ -3795,24 +4073,24 @@ host All -

    Prend 1 ou 2 paramètres. Le premier definit la limite de +

    Prend 1 ou 2 paramètres. Le premier definit la limite de consommation de ressources pour tous les processus, et le second la - consommation de ressources maximale. Les deux paramètres peuvent + consommation de ressources maximale. Les deux paramètres peuvent contenir soit un nombre, soit max pour indiquer au - serveur que la limite de consommation correspond à la valeur - maximale autorisée par la configuration du système d'exploitation. + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. Pour augmenter la consommation maximale de ressources, le serveur - doit s'exécuter en tant que root, ou se trouver dans sa - phase de démarrage.

    - -

    Cette directive s'applique aux processus initiés par les - processus enfants d'Apache httpd qui traitent les requêtes, et non aux - processus enfants eux-mêmes. Sont concernés les scripts CGI et les - commandes exec des SSI, mais en aucun cas les processus initiés par - le processus parent d'Apache httpd comme les journalisations redirigées + doit s'exécuter en tant que root, ou se trouver dans sa + phase de démarrage.

    + +

    Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées vers un programme.

    -

    Les limites de ressources CPU sont exprimées en secondes par +

    Les limites de ressources CPU sont exprimées en secondes par processus.

    RLimitMEM @@ -3821,10 +4099,10 @@ host RLimitMEM -Limite la mémoire allouée aux processus initiés par les +Limite la mémoire allouée aux processus initiés par les processus enfants d'Apache httpd RLimitMEM octets|max [octets|max] -Non défini ; utilise les valeurs par défaut du système +Non défini ; utilise les valeurs par défaut du système d'exploitation server configvirtual host @@ -3832,24 +4110,24 @@ host All -

    Prend 1 ou 2 paramètres. Le premier definit la limite de +

    Prend 1 ou 2 paramètres. Le premier definit la limite de consommation de ressources pour tous les processus, et le second la - consommation de ressources maximale. Les deux paramètres peuvent + consommation de ressources maximale. Les deux paramètres peuvent contenir soit un nombre, soit max pour indiquer au - serveur que la limite de consommation correspond à la valeur - maximale autorisée par la configuration du système d'exploitation. + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. Pour augmenter la consommation maximale de ressources, le serveur - doit s'exécuter en tant que root, ou se trouver dans sa - phase de démarrage.

    - -

    Cette directive s'applique aux processus initiés par les - processus enfants d'Apache httpd qui traitent les requêtes, et non aux - processus enfants eux-mêmes. Sont concernés les scripts CGI et les - commandes exec des SSI, mais en aucun cas les processus initiés par - le processus parent d'Apache httpd comme les journalisations redirigées + doit s'exécuter en tant que root, ou se trouver dans sa + phase de démarrage.

    + +

    Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées vers un programme.

    -

    Les limites de ressources mémoire sont exprimées en octets par +

    Les limites de ressources mémoire sont exprimées en octets par processus.

    RLimitCPU @@ -3858,8 +4136,8 @@ host RLimitNPROC -Limite le nombre de processus qui peuvent être initiés par -les processus initiés par les processus enfants d'Apache httpd +Limite le nombre de processus qui peuvent être initiés par +les processus initiés par les processus enfants d'Apache httpd RLimitNPROC nombre|max [nombre|max] Unset; uses operating system defaults server configvirtual @@ -3868,31 +4146,31 @@ host All -

    Prend 1 ou 2 paramètres. Le premier definit la limite de +

    Prend 1 ou 2 paramètres. Le premier definit la limite de consommation de ressources pour tous les processus, et le second la - consommation de ressources maximale. Les deux paramètres peuvent + consommation de ressources maximale. Les deux paramètres peuvent contenir soit un nombre, soit max pour indiquer au - serveur que la limite de consommation correspond à la valeur - maximale autorisée par la configuration du système d'exploitation. + serveur que la limite de consommation correspond à la valeur + maximale autorisée par la configuration du système d'exploitation. Pour augmenter la consommation maximale de ressources, le serveur - doit s'exécuter en tant que root, ou se trouver dans sa - phase de démarrage.

    - -

    Cette directive s'applique aux processus initiés par les - processus enfants d'Apache httpd qui traitent les requêtes, et non aux - processus enfants eux-mêmes. Sont concernés les scripts CGI et les - commandes exec des SSI, mais en aucun cas les processus initiés par - le processus parent d'Apache httpd comme les journalisations redirigées + doit s'exécuter en tant que root, ou se trouver dans sa + phase de démarrage.

    + +

    Cette directive s'applique aux processus initiés par les + processus enfants d'Apache httpd qui traitent les requêtes, et non aux + processus enfants eux-mêmes. Sont concernés les scripts CGI et les + commandes exec des SSI, mais en aucun cas les processus initiés par + le processus parent d'Apache httpd comme les journalisations redirigées vers un programme.

    -

    Les limites des processus contrôlent le nombre de processus par +

    Les limites des processus contrôlent le nombre de processus par utilisateur.

    Note -

    Si les processus CGI s'exécutent sous le même +

    Si les processus CGI s'exécutent sous le même utilisateur que celui du serveur web, cette directive va limiter le nombre de processus que le serveur - pourra lui-même créer. La présence de messages + pourra lui-même créer. La présence de messages cannot fork dans le journal des erreurs indiquera que la limite est atteinte.

    @@ -3903,7 +4181,7 @@ host ScriptInterpreterSource -Permet de localiser l'interpréteur des scripts +Permet de localiser l'interpréteur des scripts CGI ScriptInterpreterSource Registry|Registry-Strict|Script ScriptInterpreterSource Script @@ -3911,72 +4189,66 @@ CGI host directory.htaccess
    FileInfo -Win32 seulement ; -l'option Registry-Strict est disponible dans les versions -2.0 et supérieures du serveur HTTP Apache +Win32 seulement. -

    Cette directive permet de contrôler la méthode qu'utilise Apache - httpd pour trouver l'interpréteur destiné à exécuter les scripts CGI. La - définition par défaut est Script : ceci indique à - Apache httpd qu'il doit utiliser l'interpréteur précisé dans la ligne - shebang du script (la première ligne, commençant par - #!). Sur les systèmes Win32, cette ligne ressemble - souvent à ceci :

    +

    Cette directive permet de contrôler la méthode qu'utilise Apache + httpd pour trouver l'interpréteur destiné à exécuter les scripts CGI. La + définition par défaut est Script : ceci indique à + Apache httpd qu'il doit utiliser l'interpréteur précisé dans la ligne + shebang du script (la première ligne, commençant par + #!). Sur les systèmes Win32, cette ligne ressemble + souvent à ceci :

    - - #!C:/Perl/bin/perl.exe - + #!C:/Perl/bin/perl.exe -

    ou simplement, dans le cas où perl est dans le +

    ou simplement, dans le cas où perl est dans le PATH :

    - - #!perl - + #!perl

    Avec ScriptInterpreterSource Registry, Windows va effectuer une recherche dans l'arborescence HKEY_CLASSES_ROOT de la base de registre avec comme - mot-clé l'extension du fichier contenant le script (par exemple - .pl). C'est la commande définie par la sous-clé de + mot-clé l'extension du fichier contenant le script (par exemple + .pl). C'est la commande définie par la sous-clé de registre Shell\ExecCGI\Command ou, si elle n'existe - pas, la sous-clé Shell\Open\Command qui est utilisée - pour ouvrir le fichier du script. Si ces clés de registre ne sont - pas trouvées, Apache httpd utilise la méthode de l'option + pas, la sous-clé Shell\Open\Command qui est utilisée + pour ouvrir le fichier du script. Si ces clés de registre ne sont + pas trouvées, Apache httpd utilise la méthode de l'option Script.

    - Sécurité + Sécurité

    Soyez prudent si vous utilisez ScriptInterpreterSource - Registry avec des répertoires faisant l'objet d'un avec des répertoires faisant l'objet d'un ScriptAlias, car Apache httpd va essayer - d'exécuter tous les fichiers contenus dans + d'exécuter tous les fichiers contenus dans celui-ci. L'option Registry peut causer des appels de - programmes non voulus sur des fichiers non destinés à être exécutés. - Par exemple, la commande par défaut open sur les fichiers - .htm sur la plupart des systèmes Windows va lancer - Microsoft Internet Explorer ; ainsi, toute requête HTTP pour un - fichier .htm situé dans le répertoire des scripts - va lancer le navigateur en arrière-plan sur le serveur, ce qui a - toutes les chances de crasher votre système dans les minutes qui + programmes non voulus sur des fichiers non destinés à être exécutés. + Par exemple, la commande par défaut open sur les fichiers + .htm sur la plupart des systèmes Windows va lancer + Microsoft Internet Explorer ; ainsi, toute requête HTTP pour un + fichier .htm situé dans le répertoire des scripts + va lancer le navigateur en arrière-plan sur le serveur, ce qui a + toutes les chances de crasher votre système dans les minutes qui suivent.

    L'option Registry-Strict, apparue avec la version 2.0 du serveur HTTP Apache, - agit de manière identique à Registry, mais n'utilise - que la sous-clé Shell\ExecCGI\Command. La présence de - la clé ExecCGI n'étant pas systématique, Elle doit être - définie manuellement dans le registre Windows et évite ainsi tout - appel de programme accidentel sur votre système.

    + agit de manière identique à Registry, mais n'utilise + que la sous-clé Shell\ExecCGI\Command. La présence de + la clé ExecCGI n'étant pas systématique, Elle doit être + définie manuellement dans le registre Windows et évite ainsi tout + appel de programme accidentel sur votre système.

    SeeRequestTail -Détermine si mod_status affiche les 63 premiers caractères -d'une requête ou les 63 derniers, en supposant que la requête -elle-même possède plus de 63 caractères. +Détermine si mod_status affiche les 63 premiers caractères +d'une requête ou les 63 derniers, en supposant que la requête +elle-même possède plus de 63 caractères. SeeRequestTail On|Off SeeRequestTail Off server config @@ -3985,22 +4257,22 @@ d'Apache httpd.

    Avec ExtendedStatus On, mod_status affiche la - véritable requête en cours de traitement. Pour des raisons - historiques, seuls 63 caractères de la requête sont réellement - stockés à des fins d'affichage. Cette directive permet de déterminer - si ce sont les 63 premiers caractères qui seront stockés (c'est le - comportement par défaut), + véritable requête en cours de traitement. Pour des raisons + historiques, seuls 63 caractères de la requête sont réellement + stockés à des fins d'affichage. Cette directive permet de déterminer + si ce sont les 63 premiers caractères qui seront stockés (c'est le + comportement par défaut), ou si ce sont les 63 derniers. Ceci ne s'applique bien entendu que - si la taille de la requête est de 64 caractères ou plus.

    + si la taille de la requête est de 64 caractères ou plus.

    -

    Si Apache httpd traite la requête Si Apache httpd traite la requête GET /disque1/stockage/apache/htdocs/images/rep-images1/nourriture/pommes.jpg HTTP/1.1 - , l'affichage de la requête par mod_status se présentera comme suit : + , l'affichage de la requête par mod_status se présentera comme suit :

    - + @@ -4015,33 +4287,31 @@ d'Apache httpd. ServerAdmin -L'adresse électronique que le serveur inclut dans les -messages d'erreur envoyés au client -ServerAdmin adresse électronique|URL +L'adresse électronique que le serveur inclut dans les +messages d'erreur envoyés au client +ServerAdmin adresse électronique|URL server configvirtual host -

    La directive ServerAdmin permet de définir +

    La directive ServerAdmin permet de définir l'adresse de contact que le serveur va inclure dans tout message d'erreur qu'il envoie au client. Si le programme httpd ne reconnait pas l'argument fourni comme une URL, il suppose que - c'est une adresse électronique, et lui ajoute le préfixe + c'est une adresse électronique, et lui ajoute le préfixe mailto: dans les cibles des hyperliens. Il est - cependant recommandé d'utiliser exclusivement une adresse - électronique, car de nombreux scripts CGI considèrent ceci comme + cependant recommandé d'utiliser exclusivement une adresse + électronique, car de nombreux scripts CGI considèrent ceci comme implicite. Si vous utilisez une URL, elle doit pointer vers un autre - serveur que vous contrôlez. Dans le cas contraire, les utilisateurs - seraient dans l'impossibilité de vous contacter en cas de problème.

    + serveur que vous contrôlez. Dans le cas contraire, les utilisateurs + seraient dans l'impossibilité de vous contacter en cas de problème.

    -

    Il peut s'avérer utile de définir une adresse dédiée à +

    Il peut s'avérer utile de définir une adresse dédiée à l'administration du serveur, par exemple :

    - - ServerAdmin www-admin@foo.example.com - -

    car les utilisateurs ne mentionnent pas systématiquement le + ServerAdmin www-admin@foo.example.com +

    car les utilisateurs ne mentionnent pas systématiquement le serveur dont ils parlent !

    @@ -4049,27 +4319,41 @@ host ServerAlias Autres noms d'un serveur utilisables pour atteindre des -serveurs virtuels à base de nom +serveurs virtuels à base de nom ServerAlias nom serveur [nom serveur] ... virtual host -

    La directive ServerAlias permet de définir +

    La directive ServerAlias permet de définir les noms alternatifs d'un serveur utilisables pour atteindre des serveurs virtuels à base de + href="../vhosts/name-based.html">serveurs virtuels à base de nom. La directive ServerAlias peut - contenir des caractères génériques, si nécessaire.

    + contenir des caractères génériques, si nécessaire.

    + + +<VirtualHost *:80> + ServerName server.example.com + ServerAlias server server2.example.com server2 + ServerAlias *.example.com + UseCanonicalName Off + # ... +</VirtualHost> + +

    La recherche du serveur virtuel à base de nom correspondant au + plus près à la requête s'effectue selon l'ordre d'apparition des + directives virtualhost dans le fichier de + configuration. Le premier serveur virtuel dont le ServerName ou le ServerAlias correspond est choisi, sans + priorité particulière si le nom contient des caractères génériques + (que ce soit pour ServerName ou ServerAlias).

    + +

    Tous les noms spécifiés au sein d'une section VirtualHost sont traités comme un + ServerAlias (sans caractères génériques).

    - - <VirtualHost *:80>
    - ServerName serveur.example.com
    - ServerAlias serveur serveur2.example.com serveur2
    - ServerAlias *.example.com
    - UseCanonicalName Off
    - # ...
    - </VirtualHost> -
    UseCanonicalName Documentation sur les serveurs virtuels @@ -4078,85 +4362,90 @@ du serveur HTTP Apache ServerName -Nom d'hôte et port que le serveur utilise pour -s'authentifier lui-même -ServerName [protocole://]nom de domaine -entièrement qualifié[:port] +Nom d'hôte et port que le serveur utilise pour +s'authentifier lui-même +ServerName +[protocole://]nom-de-domaine|adresse-ip[:port] server configvirtual host -

    La directive ServerName permet de définir - les protocole, nom d'hôte et port d'une requête que le serveur - utilise pour s'authentifier lui-même. Ceci est utile lors de la - création de redirections d'URLs.

    - -

    La directive ServerName permet aussi - (éventuellement en conjonction avec la directive - ServerAlias) d'identifier de manière unique - un serveur virtuel, lorsqu'elle est utilisée dans un contexte de serveurs virtuels à base de - noms.

    +

    La directive ServerName permet de définir + les protocole, nom d'hôte et port d'une requête que le serveur + utilise pour s'authentifier lui-même.

    + +

    La directive ServerName permet (éventuellement en + conjonction avec la directive ServerAlias) d'identifier de manière unique un + serveur virtuel, lorsqu'elle est utilisée dans un contexte de serveurs virtuels à base de noms.

    + +

    Cette directive est aussi utilisée lors de la création d'URLs de + redirection relatives quand la directive UseCanonicalName est définie à une valeur autre + que la valeur par défaut.

    Par exemple, si le nom de la - machine hébergeant le serveur web est - simple.example.com, la machine possède l'alias + machine hébergeant le serveur web est + simple.example.com, la machine possède l'alias DNS www.example.com, et si vous voulez que le serveur - web s'identifie avec cet alias, vous devez utilisez la définition + web s'identifie avec cet alias, vous devez utilisez la définition suivante :

    - - ServerName www.example.com - + ServerName www.example.com -

    La directive ServerName peut apparaître à - toutes les étapes de la définition du serveur. Toute occurrence - annule cependant la précédente (pour ce serveur).

    +

    La directive ServerName peut apparaître à + toutes les étapes de la définition du serveur. Toute occurrence + annule cependant la précédente (pour ce serveur).

    Si la directive ServerName n'est pas - définie, le serveur tente de déterminer le nom d'hôte en effectuant - une recherche DNS inverse sur son adresse IP. Si la directive - ServerName ne précise pas de port, le serveur - utilisera celui de la requête entrante. Il est recommandé de - spécifier un nom d'hôte et un port spécifiques à l'aide de la - directive ServerName pour une fiabilité - optimale et à titre préventif.

    - -

    Si vous définissez des serveurs virtuels à base de - nom, une directive ServerName située à - l'intérieur d'une section VirtualHost spécifiera quel nom d'hôte - doit apparaître dans l'en-tête de requête Host: pour + définie, le serveur tente de déterminer le nom + d'hôte visible du point de vue du client en demandant tout d'abord au + système d'exploitation le nom d'hôte système, et en cas d'échec, en effectuant + une recherche DNS inverse sur une adresse IP présente sur le système.

    + +

    Si la directive + ServerName ne précise pas de port, le serveur + utilisera celui de la requête entrante. Il est recommandé de + spécifier un nom d'hôte et un port spécifiques à l'aide de la + directive ServerName pour une fiabilité + optimale et à titre préventif.

    + +

    Si vous définissez des serveurs virtuels à base de + nom, une directive ServerName située à + l'intérieur d'une section VirtualHost spécifiera quel nom d'hôte + doit apparaître dans l'en-tête de requête Host: pour pouvoir atteindre ce serveur virtuel.

    -

    Parfois, le serveur s'exécute en amont d'un dispositif qui - implémente SSL, comme un mandataire inverse, un répartiteur de - charge ou un boîtier dédié SSL. Dans ce cas, spécifiez le protocole +

    Parfois, le serveur s'exécute en amont d'un dispositif qui + implémente SSL, comme un mandataire inverse, un répartiteur de + charge ou un boîtier dédié SSL. Dans ce cas, spécifiez le protocole https:// et le port auquel les clients se connectent dans la directive ServerName, afin de - s'assurer que le serveur génère correctement ses URLs + s'assurer que le serveur génère correctement ses URLs d'auto-identification.

    Voir la description des directives UseCanonicalName et UseCanonicalPhysicalPort pour les - définitions qui permettent de déterminer si les URLs + définitions qui permettent de déterminer si les URLs auto-identifiantes (par exemple via le module - mod_dir) vont faire référence au port spécifié, ou - au port indiqué dans la requête du client. + mod_dir) vont faire référence au port spécifié, ou + au port indiqué dans la requête du client.

    Si la valeur de la directive ServerName ne - peut pas être résolue en adresse IP, le démarrage du serveur + peut pas être résolue en adresse IP, le démarrage du serveur provoquera un avertissement. httpd va alors utiliser le - résultat de la commande système hostname pour - déterminer le nom du serveur, ce qui ne correspondra pratiquement - jamais au nom de serveur que vous souhaitez réellement.

    + résultat de la commande système hostname pour + déterminer le nom du serveur, ce qui ne correspondra pratiquement + jamais au nom de serveur que vous souhaitez réellement.

    httpd: Could not reliably determine the server's fully qualified domain name, using rocinante.local for ServerName @@ -4164,7 +4453,7 @@ host
    -Problèmes concernant le DNS et +Problèmes concernant le DNS et le serveur HTTP Apache Documentation sur les serveurs virtuels du serveur HTTP Apache @@ -4175,15 +4464,15 @@ du serveur HTTP Apache ServerPath -Nom de chemin d'URL hérité pour un serveur virtuel à base -de nom accédé par un navigateur incompatible +Nom de chemin d'URL hérité pour un serveur virtuel à base +de nom accédé par un navigateur incompatible ServerPath chemin d'URL virtual host -

    La directive ServerPath permet de définir - le nom de chemin d'URL hérité d'un hôte, à utiliser avec les serveurs virtuels à base de nom.

    +

    La directive ServerPath permet de définir + le nom de chemin d'URL hérité d'un hôte, à utiliser avec les serveurs virtuels à base de nom.

    Documentation sur les serveurs virtuels du serveur HTTP Apache @@ -4191,44 +4480,42 @@ du serveur HTTP Apache ServerRoot -Racine du répertoire d'installation du +Racine du répertoire d'installation du serveur -ServerRoot chemin de répertoire +ServerRoot chemin de répertoire ServerRoot /usr/local/apache server config -

    La directive ServerRoot permet de définir - le répertoire dans lequel le serveur est installé. En particulier, - il contiendra les sous-répertoires conf/ et - logs/. Les chemins relatifs indiqués dans les autres +

    La directive ServerRoot permet de définir + le répertoire dans lequel le serveur est installé. En particulier, + il contiendra les sous-répertoires conf/ et + logs/. Les chemins relatifs indiqués dans les autres directives (comme Include ou LoadModule) seront définis par - rapport à ce répertoire.

    + module="mod_so">LoadModule) seront définis par + rapport à ce répertoire.

    - Example - ServerRoot /home/httpd - + ServerRoot "/home/httpd" -

    La valeur par défaut de ServerRoot peut - être modifiée via l'argument --prefix de la commande La valeur par défaut de ServerRoot peut + être modifiée via l'argument --prefix de la commande configure, et de nombreuses distributions tierces du serveur proposent une valeur - différente de celles listées ci-dessus.

    + différente de celles listées ci-dessus.

    the -d options de httpd -les conseils à -propos de sécurité pour des informations sur la manière de définir -correctement les permissions sur le répertoire indiqué par la directive +les conseils à +propos de sécurité pour des informations sur la manière de définir +correctement les permissions sur le répertoire indiqué par la directive ServerRoot
    ServerSignature -Définit un pied de page pour les documents générés par le +Définit un pied de page pour les documents générés par le serveur ServerSignature On|Off|EMail ServerSignature Off @@ -4240,26 +4527,26 @@ host

    La directive ServerSignature permet de - définir une ligne de pied de page fixe pour les documents générés - par le serveur (messages d'erreur, listings de répertoires ftp de + définir une ligne de pied de page fixe pour les documents générés + par le serveur (messages d'erreur, listings de répertoires ftp de mod_proxy, sorties de mod_info, - etc...). Dans le cas d'une chaîne de mandataires, l'utilisateur n'a - souvent aucun moyen de déterminer lequel des mandataires chaînés a - généré un message d'erreur, et c'est une des raisons pour lesquelles - on peut être amené à ajouter un tel pied de page.

    + etc...). Dans le cas d'une chaîne de mandataires, l'utilisateur n'a + souvent aucun moyen de déterminer lequel des mandataires chaînés a + généré un message d'erreur, et c'est une des raisons pour lesquelles + on peut être amené à ajouter un tel pied de page.

    -

    La valeur par défaut Off supprime la ligne de pied +

    La valeur par défaut Off supprime la ligne de pied de page (et est ainsi compatible avec le comportement des - versions 1.2 et antérieures d'Apache). la valeur On - ajoute simplement une ligne contenant le numéro de version du + versions 1.2 et antérieures d'Apache). la valeur On + ajoute simplement une ligne contenant le numéro de version du serveur ainsi que le nom du serveur virtuel issu de la directive ServerName, alors que la valeur - EMail ajoute en plus une référence "mailto:" à - l'administrateur du document référencé issu la directive + EMail ajoute en plus une référence "mailto:" à + l'administrateur du document référencé issu la directive ServerAdmin.

    -

    Après la version 2.0.44, les détails à propos du numéro de - version du serveur sont contrôlés à l'aide de la directive +

    Après la version 2.0.44, les détails à propos du numéro de + version du serveur sont contrôlés à l'aide de la directive ServerTokens.

    ServerTokens @@ -4267,29 +4554,26 @@ host ServerTokens -Configure l'en-tête Server de la réponse +Configure l'en-tête Server de la réponse HTTP ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full ServerTokens Full server config -

    Cette directive permet de contrôler le contenu de l'en-tête - Server inclus dans la réponse envoyée au client : cet - en-tête peut contenir le type de système d'exploitation du serveur, - ainsi que des informations à propos des modules compilés avec le +

    Cette directive permet de contrôler le contenu de l'en-tête + Server inclus dans la réponse envoyée au client : cet + en-tête peut contenir le type de système d'exploitation du serveur, + ainsi que des informations à propos des modules compilés avec le serveur.

    -
    ServerTokens Full (ou non spécifié)
    +
    ServerTokens Full (ou non spécifié)
    -
    Le serveur envoie par exemple : Server: Apache/2.4.1 +
    Le serveur envoie par exemple : Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
    - - - -
    ServerTokens Prod[uctOnly]
    +
    ServerTokens Prod[uctOnly]
    Le serveur renvoie (par exemple): Server: Apache
    @@ -4307,33 +4591,33 @@ HTTP
    ServerTokens Min[imal]
    Le serveur renvoie (par exemple): Server: - Apache/2.4.1
    + Apache/2.4.2
    ServerTokens OS
    Le serveur renvoie (par exemple): Server: - Apache/2.4.1 (Unix)
    + Apache/2.4.2 (Unix)
    -

    Cette définition s'applique à l'ensemble du serveur et ne peut - être activée ou désactivée pour tel ou tel serveur virtuel.

    +

    Cette définition s'applique à l'ensemble du serveur et ne peut + être activée ou désactivée pour tel ou tel serveur virtuel.

    -

    Dans les versions postérieures à 2.0.44, cette directive contrôle +

    Dans les versions postérieures à 2.0.44, cette directive contrôle aussi les informations fournies par la directive ServerSignature.

    - Définir ServerTokens à une - valeur inférieure à minimal n'est pas - recommandé car le débogage des problèmes - interopérationnels n'en sera alors que plus difficile. Notez - aussi que la désactivation de l'en-tête Server: - n'améliore en rien la sécurité de votre - serveur ; le concept de "sécurité par - l'obscurité" est un mythe et conduit à - une mauvaise perception de ce qu'est la sécurité. + Définir ServerTokens à une + valeur inférieure à minimal n'est pas + recommandé car le débogage des problèmes + interopérationnels n'en sera alors que plus difficile. Notez + aussi que la désactivation de l'en-tête Server: + n'améliore en rien la sécurité de votre + serveur ; le concept de "sécurité par + l'obscurité" est un mythe et conduit à + une mauvaise perception de ce qu'est la sécurité.
    @@ -4342,56 +4626,72 @@ HTTP
    SetHandler -Force le traitement des fichiers spécifiés par un +Force le traitement des fichiers spécifiés par un gestionnaire particulier -SetHandler nom gestionnaire|None +SetHandler handler-name|none|expression server configvirtual host directory.htaccess FileInfo -Intégré dans le noyau d'Apache httpd depuis la version -2.0 +L'argument expression est disponible à partir de la version +2.4.19 su serveur HTTP Apache -

    Lorsqu'elle se situe à l'intérieur d'un fichier +

    Lorsqu'elle se situe à l'intérieur d'un fichier .htaccess, ou d'une section Directory ou Location, cette directive force le - traitement de tous les fichiers spécifiés par le gestionnaire défini par l'argument + traitement de tous les fichiers spécifiés par le gestionnaire défini par l'argument nom gestionnaire. Par exemple, dans le cas d'un - répertoire dont vous voulez interpréter le contenu comme des - fichiers de règles d'images cliquables, sans tenir compte des + répertoire dont vous voulez interpréter le contenu comme des + fichiers de règles d'images cliquables, sans tenir compte des extensions, vous pouvez ajouter la ligne suivante dans un fichier - .htaccess de ce répertoire :

    + .htaccess de ce répertoire :

    - - SetHandler imap-file - + SetHandler imap-file

    Autre exemple : si vous voulez que le serveur affiche un - compte-rendu d'état chaque fois qu'une URL du type http://nom - serveur/status est appelée, vous pouvez ajouter ceci dans + compte-rendu d'état chaque fois qu'une URL du type http://nom + serveur/status est appelée, vous pouvez ajouter ceci dans httpd.conf :

    - - <Location /status>
    - - SetHandler server-status
    -
    - </Location> -
    - -

    Vous pouvez écraser la définition antérieure d'une directive + +<Location "/status"> + SetHandler server-status +</Location> + + +

    Vous pouvez aussi utiliser cette directive pour associer un + gestionnaire à des fichiers possèdant une extension de nom de + fichier particulière. Par exemple :

    + + +<FilesMatch "\.php$"> + SetHandler application/x-httpd-php +</FilesMatch> + + +

    Pour référencer des variables spécifiques à une requête, y compris les + références arrières vers des expressions rationnelles nommées, vous pouvez + utiliser des expressions ayant pour valeur une chaîne :

    + + +<LocationMatch ^/app/(?<sub>[^/]+)/> + SetHandler "proxy:unix:/var/run/app_%{env:MATCH_sub}.sock|fcgi://localhost:8080" +</LocationMatch> + + +

    Vous pouvez écraser la définition antérieure d'une directive SetHandler en utilisant la valeur None.

    Note

    Comme SetHandler l'emporte sur la - définition des gestionnaires par défaut, le comportement habituel - consistant à traiter les URLs se terminant par un slash (/) comme - des répertoires ou des fichiers index est désactivé.

    + définition des gestionnaires par défaut, le comportement habituel + consistant à traiter les URLs se terminant par un slash (/) comme + des répertoires ou des fichiers index est désactivé.

    AddHandler @@ -4400,8 +4700,8 @@ host SetInputFilter -Définit les filtres par lesquels vont passer les requêtes -client et les données POST +Définit les filtres par lesquels vont passer les requêtes +client et les données POST SetInputFilter filtre[;filtre...] server configvirtual host @@ -4411,14 +4711,14 @@ host

    La directive SetInputFilter permet de - définir le ou les filtres par lesquels vont passer les requêtes - client et les données POST au moment où le serveur les reçoit. Cette - définition vient en ajout à tout autre filtre défini en + définir le ou les filtres par lesquels vont passer les requêtes + client et les données POST au moment où le serveur les reçoit. Cette + définition vient en ajout à tout autre filtre défini en quelqu'endroit que ce soit, y compris via la directive AddInputFilter.

    -

    Si la directive comporte plusieurs filtres, ils doivent être - séparés par des points-virgules, et spécifiés selon l'ordre dans +

    Si la directive comporte plusieurs filtres, ils doivent être + séparés par des points-virgules, et spécifiés selon l'ordre dans lequel vous souhaitez les voir agir sur les contenus.

    documentation des Filtres SetOutputFilter -Définit les filtres par lesquels vont passer les réponses +Définit les filtres par lesquels vont passer les réponses du serveur SetOutputFilter filtre[;filtre...] server configvirtual @@ -4438,26 +4738,24 @@ host

    La directive SetOutputFilter permet de - définir les filtres par lesquels vont passer les réponses du serveur - avant d'être envoyées au client. Cette définition vient en ajout à - tout autre filtre défini en quelqu'endroit que ce soit, y compris + définir les filtres par lesquels vont passer les réponses du serveur + avant d'être envoyées au client. Cette définition vient en ajout à + tout autre filtre défini en quelqu'endroit que ce soit, y compris via la directive AddOutputFilter.

    Par exemple, la configuration suivante va traiter tous les - fichiers du répertoire /www/data/ comme des inclusions - côté serveur (SSI) :

    + fichiers du répertoire /www/data/ comme des inclusions + côté serveur (SSI) :

    - - <Directory /www/data/>
    - - SetOutputFilter INCLUDES
    -
    - </Directory> -
    + +<Directory "/www/data/"> + SetOutputFilter INCLUDES +</Directory> + -

    Si la directive comporte plusieurs filtres, ils doivent être - séparés par des points-virgules, et spécifiés selon l'ordre dans +

    Si la directive comporte plusieurs filtres, ils doivent être + séparés par des points-virgules, et spécifiés selon l'ordre dans lequel vous souhaitez les voir agir sur les contenus.

    Filters documentation @@ -4466,24 +4764,29 @@ host TimeOut Temps pendant lequel le serveur va attendre certains -évènements avant de considérer qu'une requête a échoué +évènements avant de considérer qu'une requête a échoué
    TimeOut secondes TimeOut 60 server configvirtual host -

    La directive TimeOut permet de définir le - temps maximum pendant lequel Apache httpd va attendre des entrées/sorties +

    La directive TimeOut permet de définir le + temps maximum pendant lequel Apache httpd va attendre des entrées/sorties selon les circonstances :

    -
      -
    1. Lors de la lecture de données en provenance du client, le - temps maximum jusqu'à l'arrivée d'un paquet TCP si le tampon est - vide.
    2. +
        +
      • Lors de la lecture de données en provenance du client, le + temps maximum jusqu'à l'arrivée d'un paquet TCP si le tampon est + vide.

        +

        Pour les données initiales d'une nouvelle connexion, et tant qu'une + directive AcceptFilter n'aura pas + transmis cette nouvelle connexion au serveur, cette directive n'aura aucun + effet.

        +
      • -
      • Lors de l'écriture de données destinées au client, le temps - maximum jusqu'à l'arrivée de l'accusé-réception d'un paquet si le +
      • Lors de l'écriture de données destinées au client, le temps + maximum jusqu'à l'arrivée de l'accusé-réception d'un paquet si le tampon d'envoi est plein.
      • Avec mod_cgi, le temps d'attente maximum des @@ -4492,50 +4795,55 @@ host
      • Avec mod_ext_filter, le temps d'attente maximum des sorties d'un processus de filtrage.
      • -
      • Avec mod_proxy, la valeur du délai par défaut +
      • Avec mod_proxy, la valeur du délai par défaut si ProxyTimeout n'est - pas défini.
      • -
    + pas défini. +
    TraceEnable -Détermine le comportement des requêtes +Détermine le comportement des requêtes TRACE TraceEnable [on|off|extended] TraceEnable on server configvirtual host -Disponible dans les versions 1.3.34, 2.0.55 et -supérieures du serveur HTTP Apache

    Cette directive l'emporte sur le comportement de TRACE pour le noyau du serveur et - mod_proxy. La définition par défaut - TraceEnable on permet des requêtes TRACE - selon la RFC 2616, qui interdit d'ajouter tout corps à la requête. - La définition TraceEnable off indique au noyau du - serveur et à mod_proxy de retourner un code - d'erreur 405 (Méthode non autorisée) au client.

    - -

    En fait, et à des fins de test et de diagnostic seulement, on - peut autoriser l'ajout d'un corps de requête à l'aide de la - définition non standard TraceEnable extended. Le noyau + mod_proxy. La définition par défaut + TraceEnable on permet des requêtes TRACE + selon la RFC 2616, qui interdit d'ajouter tout corps à la requête. + La définition TraceEnable off indique au noyau du + serveur et à mod_proxy de retourner un code + d'erreur 405 (Méthode non autorisée) au client.

    + +

    En fait, et à des fins de test et de diagnostic seulement, on + peut autoriser l'ajout d'un corps de requête à l'aide de la + définition non standard TraceEnable extended. Le noyau du serveur (dans le cas d'un serveur d'origine) va limiter la taille - du corps de requête à 64k (plus 8k pour les en-têtes de + du corps de requête à 64Kb (plus 8Kb pour les en-têtes de fractionnement si Transfer-Encoding: chunked est - utilisé). Le noyau du serveur va reproduire l'ensemble des en-têtes, - y compris les en-têtes de fractionnement avec le corps de la - réponse. Dans le cas d'un serveur mandataire, la taille du corps de - requête n'est pas limitée à 64k.

    + utilisé). Le noyau du serveur va reproduire l'ensemble des en-têtes, + y compris les en-têtes de fractionnement avec le corps de la + réponse. Dans le cas d'un serveur mandataire, la taille du corps de + requête n'est pas limitée à 64Kb.

    + + Note +

    Bien que certains prétendent le contraire, activer la méthode + TRACE ne constitue pas un problème de sécurité dans Apache + httpd. La méthode TRACE est définie par la spécification + HTTP/1.1 et les différentes implémentations sont censées la supporter.

    +
    UnDefine -Invalide la définition d'une variable +Invalide la définition d'une variable UnDefine nom-variable server config @@ -4546,14 +4854,17 @@ supérieures du serveur HTTP Apache correspondante.

    On peut utiliser cette directive pour inverser l'effet d'une section IfDefine - sans avoir à modifier les arguments -D dans les scripts - de démarrage.

    + sans avoir à modifier les arguments -D dans les scripts + de démarrage.

    +

    Si cette directive est définie au sein d'un bloc VirtualHost, les + changements qu'elle induit sont visibles de toute directive + ultérieure, au delà de tout bloc VirtualHost.

    UseCanonicalName -Définit la manière dont le serveur détermine son propre nom +Définit la manière dont le serveur détermine son propre nom et son port UseCanonicalName On|Off|DNS UseCanonicalName Off @@ -4563,57 +4874,57 @@ host

    Dans de nombreuses situations, Apache httpd doit construire une URL - auto-identifiante -- c'est à dire une URL qui fait - référence au serveur lui-même. Avec UseCanonicalName - On, Apache httpd va utiliser le nom d'hôte et le port spécifiés par + auto-identifiante -- c'est à dire une URL qui fait + référence au serveur lui-même. Avec UseCanonicalName + On, Apache httpd va utiliser le nom d'hôte et le port spécifiés par la directive ServerName pour - construire le nom canonique du serveur. Ce nom est utilisé dans - toutes les URLs auto-identifiantes, et affecté aux variables + construire le nom canonique du serveur. Ce nom est utilisé dans + toutes les URLs auto-identifiantes, et affecté aux variables SERVER_NAME et SERVER_PORT dans les programmes CGI.

    Avec UseCanonicalName Off, Apache httpd va construire ses - URLs auto-identifiantes à l'aide du nom d'hôte et du port fournis - par le client, si ce dernier en a fourni un (dans la négative, - Apache utilisera le nom canonique, de la même manière que - ci-dessus). Ces valeurs sont les mêmes que celles qui sont utilisées - pour implémenter les serveurs virtuels à base de - nom, et sont disponibles avec les mêmes clients. De même, les + URLs auto-identifiantes à l'aide du nom d'hôte et du port fournis + par le client, si ce dernier en a fourni un (dans la négative, + Apache utilisera le nom canonique, de la même manière que + ci-dessus). Ces valeurs sont les mêmes que celles qui sont utilisées + pour implémenter les serveurs virtuels à base de + nom, et sont disponibles avec les mêmes clients. De même, les variables CGI SERVER_NAME et SERVER_PORT - seront affectées des valeurs fournies par le client.

    + seront affectées des valeurs fournies par le client.

    -

    Cette directive peut s'avérer utile, par exemple, sur un serveur +

    Cette directive peut s'avérer utile, par exemple, sur un serveur intranet auquel les utilisateurs se connectent en utilisant des noms courts tels que www. Si les utilisateurs tapent un nom - court suivi d'une URL qui fait référence à un répertoire, comme + court suivi d'une URL qui fait référence à un répertoire, comme http://www/splat, sans le slash terminal, vous remarquerez qu'Apache httpd va les rediriger vers - http://www.example.com/splat/. Si vous avez activé - l'authentification, ceci va obliger l'utilisateur à s'authentifier - deux fois (une première fois pour www et une seconde + http://www.example.com/splat/. Si vous avez activé + l'authentification, ceci va obliger l'utilisateur à s'authentifier + deux fois (une première fois pour www et une seconde fois pour www.example.com -- voir la - foire aux questions sur ce sujet pour plus d'informations). Par - contre, si UseCanonicalName est définie à + href="http://wiki.apache.org/httpd/FAQ#Why_does_Apache_ask_for_my_password_twice_before_serving_a_file.3F">la + foire aux questions sur ce sujet pour plus d'informations). + Par contre, si UseCanonicalName est définie à Off, Apache httpd redirigera l'utilisateur vers http://www/splat/.

    -

    Pour l'hébergement virtuel en masse à base d'adresse IP, on - utilise une troisième option, UseCanonicalName +

    Pour l'hébergement virtuel en masse à base d'adresse IP, on + utilise une troisième option, UseCanonicalName DNS, pour supporter les clients anciens qui ne - fournissent pas d'en-tête Host:. Apache httpd effectue alors + fournissent pas d'en-tête Host:. Apache httpd effectue alors une recherche DNS inverse sur l'adresse IP du serveur auquel le - client s'est connecté afin de construire ses URLs + client s'est connecté afin de construire ses URLs auto-identifiantes.

    Avertissement -

    Les programmes CGI risquent d'être perturbés par cette option +

    Les programmes CGI risquent d'être perturbés par cette option s'ils tiennent compte de la variable SERVER_NAME. Le client est pratiquement libre de fournir la valeur qu'il veut comme - nom d'hôte. Mais si le programme CGI n'utilise + nom d'hôte. Mais si le programme CGI n'utilise SERVER_NAME que pour construire des URLs - auto-identifiantes, il ne devrait pas y avoir de problème.

    + auto-identifiantes, il ne devrait pas y avoir de problème.

    UseCanonicalPhysicalPort @@ -4623,8 +4934,8 @@ host UseCanonicalPhysicalPort -Définit la manière dont le serveur -détermine son propre port +Définit la manière dont le serveur +détermine son propre port UseCanonicalPhysicalPort On|Off UseCanonicalPhysicalPort Off server configvirtual @@ -4633,15 +4944,15 @@ host

    Dans de nombreuses situations, Apache httpd doit construire une URL - auto-identifiante -- c'est à dire une URL qui fait - référence au serveur lui-même. Avec UseCanonicalPhysicalPort - On, Apache httpd va fournir le numéro de port physique réel utilisé - par la requête en tant que port potentiel, pour construire le port + auto-identifiante -- c'est à dire une URL qui fait + référence au serveur lui-même. Avec UseCanonicalPhysicalPort + On, Apache httpd va fournir le numéro de port physique réel utilisé + par la requête en tant que port potentiel, pour construire le port canonique afin que le serveur puisse alimenter la directive UseCanonicalName. Avec UseCanonicalPhysicalPort Off, Apache httpd n'utilisera pas le - numéro de port physique réel, mais au contraire se référera aux - informations de configuration pour construire un numéro de port + numéro de port physique réel, mais au contraire se référera aux + informations de configuration pour construire un numéro de port valide.

    Note @@ -4651,18 +4962,18 @@ host
    UseCanonicalName On
      -
    1. Port indiqué dans Servername
    2. +
    3. Port indiqué dans Servername
    4. Port physique
    5. -
    6. Port par défaut
    7. +
    8. Port par défaut
    UseCanonicalName Off | DNS
      -
    1. Port spécifié dans l'en-tête Host:
    2. +
    3. Port spécifié dans l'en-tête Host:
    4. Port physique
    5. -
    6. Port spécifié par Servername
    7. -
    8. Port par défaut
    9. +
    10. Port spécifié par Servername
    11. +
    12. Port par défaut
    @@ -4679,8 +4990,8 @@ host VirtualHost -Contient des directives qui ne s'appliquent qu'à un nom -d'hôte spécifique ou à une adresse IP +Contient des directives qui ne s'appliquent qu'à un nom +d'hôte spécifique ou à une adresse IP <VirtualHost adresse IP[:port] [adresse IP[:port]] ...> ... @@ -4690,119 +5001,167 @@ d'hôte spécifique ou à une adresse IP

    Les balises VirtualHost et </VirtualHost> permettent de rassembler un groupe - de directives qui ne s'appliquent qu'à un serveur virtuel - particulier. Toute directive autorisée dans un contexte de serveur - virtuel peut être utilisée. Lorsque le serveur reçoit un requête - pour un document hébergé par un serveur virtuel particulier, il - applique les directives de configuration rassemblées dans la section + de directives qui ne s'appliquent qu'à un serveur virtuel + particulier. Toute directive autorisée dans un contexte de serveur + virtuel peut être utilisée. Lorsque le serveur reçoit un requête + pour un document hébergé par un serveur virtuel particulier, il + applique les directives de configuration rassemblées dans la section VirtualHost. adresse - IP peut être une des entités suivantes, éventuellement suivies - d'un caractère ':' et d'un numéro de port (ou *) :

    + IP peut être une des entités suivantes, éventuellement suivies + d'un caractère ':' et d'un numéro de port (ou *) :

    • L'adresse IP du serveur virtuel ;
    • -
    • Un nom de domaine entièrement qualifié correspondant à - l'adresse IP du serveur virtuel (non recommandé) ;
    • +
    • Un nom de domaine entièrement qualifié correspondant à + l'adresse IP du serveur virtuel (non recommandé) ;
    • -
    • Le caractère *, qui agit comme un - caractère générique, et correspond à toute adresse IP.
    • +
    • Le caractère *, qui agit comme un + caractère générique, et correspond à toute adresse IP.
    • -
    • La chaîne _default_, dont la signification est - identique à celle du caractère *
    • +
    • La chaîne _default_, dont la signification est + identique à celle du caractère *
    - Exemple - <VirtualHost 10.1.2.3:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -
    + +<VirtualHost 10.1.2.3:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost> + -

    Les adresses IPv6 doivent être entourées de crochets car dans le - cas contraire, un éventuel port optionnel ne pourrait pas être - déterminé. Voici un exemple de serveur virtuel avec adresse IPv6 +

    Les adresses IPv6 doivent être entourées de crochets car dans le + cas contraire, un éventuel port optionnel ne pourrait pas être + déterminé. Voici un exemple de serveur virtuel avec adresse IPv6 :

    - - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
    - - ServerAdmin webmaster@host.example.com
    - DocumentRoot /www/docs/host.example.com
    - ServerName host.example.com
    - ErrorLog logs/host.example.com-error_log
    - TransferLog logs/host.example.com-access_log
    -
    - </VirtualHost> -
    - -

    Chaque serveur virtuel doit correspondre à une adresse IP, un - port ou un nom d'hôte spécifique ; dans le premier cas, le serveur - doit être configuré pour recevoir les paquets IP de plusieurs - adresses (si le serveur n'a qu'une interface réseau, on peut - utiliser à cet effet la commande ifconfig alias -- si - votre système d'exploitation le permet).

    + +<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> + ServerAdmin webmaster@host.example.com + DocumentRoot "/www/docs/host.example.com" + ServerName host.example.com + ErrorLog "logs/host.example.com-error_log" + TransferLog "logs/host.example.com-access_log" +</VirtualHost> + + +

    Chaque serveur virtuel doit correspondre à une adresse IP, un + port ou un nom d'hôte spécifique ; dans le premier cas, le serveur + doit être configuré pour recevoir les paquets IP de plusieurs + adresses (si le serveur n'a qu'une interface réseau, on peut + utiliser à cet effet la commande ifconfig alias -- si + votre système d'exploitation le permet).

    Note

    L'utilisation de la directive VirtualHost n'affecte en rien les - adresses IP sur lesquelles Apache httpd est en écoute. Vous devez vous + adresses IP sur lesquelles Apache httpd est en écoute. Vous devez vous assurer que les adresses des serveurs virtuels sont bien incluses - dans la liste des adresses précisées par la directive Listen.

    Tout bloc VirtualHost doit comporter une directive ServerName. Dans le cas - contraire, le serveur virtuel héritera de la valeur de la directive + contraire, le serveur virtuel héritera de la valeur de la directive ServerName issue de la configuration du serveur principal.

    -

    A l'arrivée d'une requête, le serveur tente de la +

    A l'arrivée d'une requête, le serveur tente de la faire prendre en compte par la section VirtualHost qui correspond le mieux en ne - se basant que sur la paire adresse IP/port. Les chaînes sans - caractères génériques l'emportent sur celles qui en contiennent. Si + se basant que sur la paire adresse IP/port. Les chaînes sans + caractères génériques l'emportent sur celles qui en contiennent. Si aucune correspondance du point de vue de l'adresse IP/port n'est - trouvée, c'est la configuration du serveur "principal" qui sera - utilisée.

    + trouvée, c'est la configuration du serveur "principal" qui sera + utilisée.

    Si plusieurs serveurs virtuels correspondent du point de vue de - l'adresse IP/port, le serveur sélectionne celui qui correspond le - mieux du point de vue du nom d'hôte de la requête. Si aucune - correspondance du point de vue du nom d'hôte n'est trouvée, c'est le + l'adresse IP/port, le serveur sélectionne celui qui correspond le + mieux du point de vue du nom d'hôte de la requête. Si aucune + correspondance du point de vue du nom d'hôte n'est trouvée, c'est le premier serveur virtuel dont l'adresse IP/port correspond qui sera - utilisé. Par voie de conséquence, le premier serveur virtuel + utilisé. Par voie de conséquence, le premier serveur virtuel comportant une certaine paire adresse IP/port est le serveur virtuel - par défaut pour cette paire adresse IP/port.

    + par défaut pour cette paire adresse IP/port.

    - Sécurité + Sécurité

    Voir le document sur les conseils à propos de sécurité - pour une description détaillée des raisons pour lesquelles la - sécurité de votre serveur pourrait être compromise, si le répertoire + href="../misc/security_tips.html">conseils à propos de sécurité + pour une description détaillée des raisons pour lesquelles la + sécurité de votre serveur pourrait être compromise, si le répertoire contenant les fichiers journaux est inscriptible par tout autre - utilisateur que celui qui démarre le serveur.

    + utilisateur que celui qui démarre le serveur.

    Documentation des serveurs virtuels du serveur HTTP Apache -Problèmes concernant le DNS et +Problèmes concernant le DNS et le serveur HTTP Apache -Définition des adresses et ports +Définition des adresses et ports qu'utilise le serveur HTTP Apache Comment fonctionnent les sections <Directory>, <Location> et <Files> pour une -explication de la manière dont ces différentes sections se combinent -entre elles à la réception d'une requête +explication de la manière dont ces différentes sections se combinent +entre elles à la réception d'une requête +
    + + +MergeTrailers +Détermine si les données supplémentaires (trailers) sont +fusionnées avec les en-têtes +MergeTrailers [on|off] +MergeTrailers off +server configvirtual host +Disponible à partir de la version 2.4.11 du serveur HTTP +Apache + + +

    Cette directive permet de contrôler la fusion des données HTTP + supplémentaires (trailers) avec la représentation interne des + en-têtes. Cette fusion intervient lorsque le corps de la requête a + été entièrement reçu, bien longtemps après que la majeure partie du + traitement des en-têtes ait une chance de pouvoir examiner ou + modifier les en-têtes de la requête.

    +

    Cette option a été introduite dans un souci de compatibilité avec + les versions antérieures à 2.4.11, où les données supplémentaires + étaient systématiquement fusionnées avec les en-têtes de la requête.

    +
    +
    + + +QualifyRedirectURL +Vérifie si la variable d'environnement REDIRECT_URL est +pleinement qualifiée +QualifyRedirectURL ON|OFF +QualifyRedirectURL OFF +server configvirtual host +directory + +FileInfo +Directive supportée à partir de la version 2.4.18 du +serveur HTTP Apache. Jusqu'à la version 2.4.17, le serveur se comportait +comme si la directive QualifyRedirectURL était définie à ON. + + +

    Cette directive permet de s'assurer que le serveur vérifiera que + la variable d'environnement REDIRECT_URL est bien pleinement + qualifiée. Par défaut, cette variable contient l'URL textuellement + demandée par le client, par exemple "/index.html". Avec QualifyRedirectURL ON, la même requête + affectera à la variable REDIRECT_URL une valeur du style + "http://www.example.com/index.html".

    +

    Même si cette directive n'est pas définie, lorsqu'une requête est + soumise avec une URL pleinement qualifiée, la variable REDIRECT_URL + contiendra quand-même une URL pleinement qualifiée. +

    +
    diff --git a/docs/manual/mod/core.xml.ja b/docs/manual/mod/core.xml.ja index 3687df14086..cb18f69809b 100644 --- a/docs/manual/mod/core.xml.ja +++ b/docs/manual/mod/core.xml.ja @@ -1,7 +1,7 @@ - + + -Terms Used to Describe Directives - Apache HTTP Server +Terms Used to Describe Directives - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Terms Used to Describe Directives

    +Apache > HTTP Server > Documentation > Version 2.4

    Terms Used to Describe Directives

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -36,7 +42,7 @@
  • Status
  • Module
  • Compatibility
  • -

    See also

    +

    See also

    top

    Description

    @@ -170,7 +176,7 @@
    directory
    A directive marked as being valid in this context may be - used inside <Directory>, <Location>, <Files>, and <Proxy> containers + used inside <Directory>, <Location>, <Files>, <If>, and <Proxy> containers in the server configuration files, subject to the restrictions outlined in Configuration Sections.
    @@ -284,10 +290,32 @@

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directive-dict.html.fr b/docs/manual/mod/directive-dict.html.fr new file mode 100644 index 00000000000..24e02ae3b85 --- /dev/null +++ b/docs/manual/mod/directive-dict.html.fr @@ -0,0 +1,317 @@ + + + + + +Termes utiliss pour la description des directives - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Termes utiliss pour la description des directives

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + +

    Ce document dcrit les termes utiliss pour dcrire chaque directive de configuration d'Apache.

    +
    + +
    top
    +
    +

    Description

    + +

    Une brve description des fonctions de cette directive.

    +
    top
    +
    +

    Syntaxe

    + +

    Ce terme introduit le format sous lequel la directive doit + apparatre dans le fichier de configuration. Cette syntaxe est trs + spcifique la directive et est dcrite en dtail dans la + dfinition de cette dernire. En gnral, le nom de la directive est + suivi d'un ou plusieurs arguments spars par des espaces. Si un + argument contient un espace, il doit tre entour de guillemets. Les + arguments optionnels sont entours de crochets. Lorsqu'un argument + accepte une valeur parmi une liste de valeurs possibles, cette liste + est spcifie en sparant les valeurs par une barre verticale "|". + Les textes littraux sont prsents dans la fonte par dfaut, alors + que les types d'argument pour lesquels une substitution est + ncessaire sont en gras. La syntaxe des directives + acceptant un nombre variable d'arguments se termine par "...", ce + qui indique que le dernier argument peut tre rpt.

    + +

    Les directives utilisent un grand nombre de types d'arguments + diffrents. Les plus courants sont dfinis ci-dessous.

    + +
    +
    URL
    + +
    Un Localisateur de Ressource Uniforme (Uniform Resource + Locator) complet comportant un protocole, un nom d'hte et un nom + de chemin optionnel comme dans + http://www.example.com/chemin/vers/fichier.html
    + +
    chemin-URL
    + +
    La partie de l'url qui suit le protocole et le nom + d'hte comme dans /chemin/vers/fichier.html. Le + chemin-URL reprsente la ressource vue du web, et est + diffrente de la reprsentation de cette mme ressource vue du + systme de fichiers.
    + +
    chemin-fichier
    + +
    Le chemin d'un fichier dans le systme de fichiers local + commenant par le rpertoire racine comme dans + /usr/local/apache/htdocs/chemin/vers/fichier.html. + Sauf mention contraire, un chemin-fichier qui ne commence + pas par un slash sera considr comme relatif au rpertoire dfini + par la directive ServerRoot.
    + +
    chemin-rpertoire
    + +
    Le chemin d'un rpertoire dans le systme de fichiers local + commenant par le rpertoire racine comme dans + /usr/local/apache/htdocs/chemin/vers/.
    + +
    nom-fichier
    + +
    Le nom d'un fichier sans son chemin comme dans + fichier.html.
    + +
    regex
    + +
    Une expression rationnelle + compatible Perl. La dfinition de la directive spcifiera quoi + regex sera compare.
    + +
    extension
    + +
    En gnral, c'est la partie du nom de fichier qui + suit le dernier point. Cependant, Apache reconnat plusieurs + extensions de noms de fichiers ; ainsi, si un nom de + fichier + contient plusieurs points, chacune des parties du nom de fichier + spares par des points et situes aprs le premier point est une + extension. Par exemple, le nom de fichier + fichier.html.en comporte deux extensions : + .html et .en. Pour les directives + Apache, vous pouvez spcifier les extensions avec ou sans + le point initial. Enfin, les extensions ne sont pas + sensibles la casse.
    + +
    MIME-type
    + +
    Une mthode de description du format d'un fichier consistant + en un type de format majeur et un type de format mineur spars + par un slash comme dans text/html.
    + +
    env-variable
    + +
    Le nom d'une variable + d'environnement dfinie au cours du processus de configuration + d'Apache. Notez qu'elle peut tre diffrente d'une variable + d'environnement du systme d'exploitation. Voir la documentation sur les variables d'environnement + pour plus de dtails.
    +
    +
    top
    +
    +

    Dfaut

    + +

    Si la directive possde une valeur par dfaut (en d'autres + termes, si le serveur Web Apache se comporte comme si vous l'aviez + dfinie une valeur particulire, alors que vous l'avez omise dans + votre configuration), elle est spcifie ici. Si la directive ne + possde pas de valeur par dfaut, cette section doit spcifier + "Aucune". Notez que la valeur par dfaut dont il est + question n'est pas ncessairement la mme que la valeur attribue + la directive dans le fichier httpd.conf par dfaut distribu avec le + serveur.

    +
    top
    +
    +

    Contexte

    + +

    Indique les parties des fichiers de configuration du serveur + o cette directive est valide. Il s'agit d'une liste d'une ou + plusieurs des valeurs suivantes spares par des virgules :

    + +
    +
    configuration du serveur
    + +
    Signifie que la directive peut tre utilise dans les fichiers + de configuration du serveur (par exemple httpd.conf), + mais pas l'intrieur d'un conteneur <VirtualHost> ou <Directory>. De mme, elle + n'est pas valide dans les fichiers .htaccess.
    + +
    serveur virtuel
    + +
    Signifie que la directive peut apparatre l'intrieur d'un + conteneur <VirtualHost> dans les fichiers de + configuration du serveur.
    + +
    rpertoire
    + +
    Une directive spcifie comme valide dans ce contexte peut + tre utilise l'intrieur de conteneurs <Directory>, <Location>, <Files>, <If>, et <Proxy> dans les + fichiers de configuration du serveur, en tenant compte des + restrictions prcises dans la documentation sur les Sections de configuration.
    + +
    .htaccess
    + +
    Si une directive est valide dans ce contexte, cela signifie + qu'elle peut apparatre l'intrieur de fichiers de configuration + de niveau rpertoire .htaccess. Elle sera ou + ne sera pas traite, selon la dfinition de l'option overrides pour le contexte courant.
    +
    + +

    La directive n'est autorise que dans le contexte + dsign ; si vous essayez de l'utiliser ailleurs, vous gnrerez une + erreur de configuration qui va soit empcher le serveur de traiter + les requtes correctement dans ce contexte, soit tout simplement + empcher le serveur de fonctionner -- en d'autres termes, le serveur + refusera de dmarrer.

    + +

    Les lieux de dfinition valides pour une directive rsultent en + fait d'un + OU logique de tous les contextes spcifis. En d'autres termes, une + directive spcifie comme valide dans "configuration du + serveur, .htaccess" peut tre utilise dans le fichier + httpd.conf et dans les fichiers .htaccess, + mais pas dans un conteneur <Directory> ou <VirtualHost>.

    +
    top
    +
    +

    Surcharge/crasement

    + +

    Ce terme indique quelle autorisation de surcharge ("override") doit tre + active pour que la directive puisse tre traite lorsqu'elle + apparat dans un fichier .htaccess. Si le context de la directive ne lui permet pas + d'apparatre dans un fichier .htaccess, aucun contexte + ne sera spcifi.

    + +

    Les autorisations de surcharge sont actives via la directive + AllowOverride, et possdent une + porte particulire, comme un rpertoire et tous ses + sous-rpertoires, sauf si une autre directive AllowOverride apparat un niveau + infrieur. La documentation pour cette directive spcifie aussi les + noms d'autorisations de surcharge disponibles.

    +
    top
    +
    +

    Statut

    + +

    Cet attribut indique le degr de rapprochement de la directive du + coeur d'Apache ; en d'autres termes, vous pouvez tre amen + recompiler le serveur avec un jeu de modules supplmentaires pour + pouvoir utiliser la directive, et ainsi accder ses + fonctionnalits. Les valeurs possible pour cet attribut sont :

    + +
    +
    Core
    + +
    Lorsqu'une directive a pour statut "Core", cela signifie + qu'elle fait partie du coeur du serveur web Apache, et est de ce + fait toujours disponible.
    + +
    MPM
    + +
    Une directive dont le statut est "MPM" est fournie par un module Multi-Processus. Ce type de + directive sera disponible si et seulement si vous utilisez un des + MPMs spcifis dans la ligne Module de la + dfinition de la directive.
    + +
    Base
    + +
    Une directive dont le statut est "Base" est fournie par un des + modules Apache standards qui sont compils dans le serveur par + dfaut, et sont de ce fait toujours disponibles, sauf si vous avez + fait en sorte de les supprimer de votre configuration.
    + +
    Extension
    + +
    Une directive dont le statut est "Extension" est fournie par + un des modules inclus dans le kit du serveur Apache, mais qui ne + sont pas compils dans le serveur par dfaut. Pour activer la + directive et accder ses fonctionnalits, vous devez modifier + les fichiers de configuration de la compilation du serveur, et + recompiler Apache.
    + +
    Exprimental
    + +
    Le statut "Exprimental" indique que la directive fait partie + du kit Apache, mais que vous l'utilisez vos risques et prils. + La directive est documente titre d'exhaustivit, et n'est pas + obligatoirement supporte. Le module qui fournit la directive peut + tre compil par dfaut dans le serveur ou non ; consultez le haut + de la page qui dcrit la directive et son module pour vrifier sa + disponibilit.
    +
    +
    top
    +
    +

    Module

    + +

    Il s'agit d'une simple liste des noms des modules sources qui + fournissent la directive.

    +
    top
    +
    +

    Compatibilit

    + +

    Si la directive ne faisait pas partie de la distribution + originale d'Apache version 2, la version dans laquelle elle a t + introduite est indique ici. Cette section indique aussi si la + directive n'est disponible que sur certaines plates-formes.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/directive-dict.html.ja.utf8 b/docs/manual/mod/directive-dict.html.ja.utf8 index f8e8126ffa5..242c6e7a81e 100644 --- a/docs/manual/mod/directive-dict.html.ja.utf8 +++ b/docs/manual/mod/directive-dict.html.ja.utf8 @@ -1,25 +1,30 @@ - -ディレクティブの解説に使われる用語 - Apache HTTP サーバ +ディレクティブの解説に使われる用語 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    ディレクティブの解説に使われる用語

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    ディレクティブの解説に使われる用語

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -36,7 +41,7 @@
  • ステータス
  • モジュール
  • 互換性
  • -

    参照

    +

    参照

    top

    説明

    @@ -179,6 +184,7 @@ <Directory>, <Location>, <Files>, + <If>, <Proxy> コンテナの中で、 設定セクション で説明されている制限の下で使用できることを示します。 @@ -294,11 +300,33 @@ ここに書かれています。

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directive-dict.html.ko.euc-kr b/docs/manual/mod/directive-dict.html.ko.euc-kr index c92dcc34775..555f1c99d34 100644 --- a/docs/manual/mod/directive-dict.html.ko.euc-kr +++ b/docs/manual/mod/directive-dict.html.ko.euc-kr @@ -1,24 +1,30 @@ - -þ ϴµ - Apache HTTP Server +þ ϴµ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    þ ϴµ

    +

    top

    (Description)

    @@ -245,10 +251,32 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directive-dict.html.tr.utf8 b/docs/manual/mod/directive-dict.html.tr.utf8 index c9d044feabe..26505923d09 100644 --- a/docs/manual/mod/directive-dict.html.tr.utf8 +++ b/docs/manual/mod/directive-dict.html.tr.utf8 @@ -1,30 +1,37 @@ - -Yönergeleri Tanımlamakta Kullanılan Terimler - Apache HTTP Sunucusu +Yönergeleri Tanımlamakta Kullanılan Terimler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Yönergeleri Tanımlamakta Kullanılan Terimler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Yönergeleri Tanımlamakta Kullanılan Terimler

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -

    Bu belgede Apache yapılandırma yönergelerini tanımlamakta kullanılan terimler açıklanmıştır.

    +

    Bu belgede Apache yapılandırma + yönergelerini tanımlamakta kullanılan terimler açıklanmıştır.

    +

    Ayrıca bakınız:

    top

    Açıklama

    @@ -44,113 +51,211 @@

    Sözdizimi

    -

    Yönergenin bir yapılandırma dosyasında hangi söz dizimiyle görünebileceği belirtilir. Bu sözdizimi yönergeye özeldir ve ayrıntıları yönerge tanımında açıklanır. Genelde yönerge ismini aralarında boşluklar bırakılmış bir dizi argüman izler. Eğer argümanlardan biri kendi içinde boşluk içeriyorsa çift tırnak içine alınır. İsteğe bağlı argümanlar sözdiziminde köşeli ayraçların arasında gösterilmiştir. Birden fazla olası değeri olan argümanlarda değerler aralarına | karakteri konarak ayrılmıştır. Değerin yerine ismi belirtilen argümanlarda bu isimler eğik yazılırken, kendisi değer olan dizgeler öntanımlı yazıtipi ile gösterilmiştir. Değişik sayıda argüman alan yönergelerde bu durum son argümanı takibeden “...” ile belirtilmiştir.

    - -

    Yönergelerde kullanılan argüman türleri çok çeşitlidir. Çok kullanılanlardan bazıları aşağıda tanımlanmıştır.

    +

    Yönergenin bir yapılandırma dosyasında hangi söz dizimiyle + görünebileceği belirtilir. Bu sözdizimi yönergeye özeldir ve ayrıntıları + yönerge tanımında açıklanır. Genelde yönerge ismini aralarında boşluklar + bırakılmış bir dizi argüman izler. Eğer argümanlardan biri kendi içinde + boşluk içeriyorsa çift tırnak içine alınır. İsteğe bağlı argümanlar + sözdiziminde köşeli ayraçların arasında gösterilmiştir. Birden fazla + olası değeri olan argümanlarda değerler aralarına | karakteri konarak + ayrılmıştır. Değerin yerine ismi belirtilen argümanlarda bu isimler + eğik yazılırken, kendisi değer olan dizgeler öntanımlı yazıtipi + ile gösterilmiştir. Değişik sayıda argüman alan yönergelerde bu durum son + argümanı takibeden “...” ile belirtilmiştir.

    + +

    Yönergelerde kullanılan argüman türleri çok çeşitlidir. Çok + kullanılanlardan bazıları aşağıda tanımlanmıştır.

    URL
    -
    http://www.mesela.dom/yol/yordam/dosya.html örneğindeki gibi protokol şeması ve konak ismini isteğe bağlı bir dosya yolunun izlediği, açılımı “Uniform Resource Locator” olan ve Türkçe’ye “Tektip Özkaynak Konumlayıcı” şeklinde çevrilebilecek adresleri betimler.
    +
    http://host.example.com/yol/yordam/dosya.html + örneğindeki gibi protokol şeması ve konak ismini isteğe bağlı bir dosya + yolunun izlediği, açılımı “Uniform Resource Locator” olan ve Türkçe’ye + “Tektip Özkaynak Konumlayıcı” şeklinde çevrilebilecek adresleri + betimler.
    URL-yolu
    -
    /yol/yordam/dosya.html örneğindeki gibi bir url’nin parçası olarak protokol şeması ve konak ismini izleyen bir yol dizgesini betimler. url-yolu, bir dosya sisteminin kök dizinine göre değil, DocumentRoot ile belirtilen dizine göre bir dosya yolu betimler.
    +
    /yol/yordam/dosya.html örneğindeki gibi bir + url’nin parçası olarak protokol şeması ve konak ismini izleyen + bir yol dizgesini betimler. url-yolu, bir dosya sisteminin kök + dizinine göre değil, DocumentRoot + ile belirtilen dizine göre bir dosya yolu betimler.
    dosya-yolu
    -
    /usr/local/apache/htdocs/yol/yordam/dosya.html örneğindeki gibi yerel dosya sisteminin kök dizini ile başlayan bir dosya yolunu betimler. Aksi belirtilmedikçe, bir / ile başlamayan bir dosya-yolu ServerRoot ile belirtilen dizine göre ele alınır.
    +
    /usr/local/apache/htdocs/yol/yordam/dosya.html + örneğindeki gibi yerel dosya sisteminin kök dizini ile başlayan bir + dosya yolunu betimler. Aksi belirtilmedikçe, bir / ile başlamayan bir + dosya-yolu ServerRoot ile + belirtilen dizine göre ele alınır.
    dizin-yolu
    -
    /usr/local/apache/htdocs/yol/yordam/ örneğindeki gibi kök dizin ile başlayan, yerel dosya sistemindeki bir dizin yolunu betimler.
    +
    /usr/local/apache/htdocs/yol/yordam/ örneğindeki gibi + kök dizin ile başlayan, yerel dosya sistemindeki bir dizin yolunu + betimler.
    dosya-ismi
    -
    dosya.html örneğindeki gibi dizin yolu içermeyen bir dosya ismini betimler.
    +
    dosya.html örneğindeki gibi dizin yolu içermeyen bir + dosya ismini betimler.
    düzifd
    -
    Bir Perl uyumlu düzenli ifade betimler. Yönerge tanımında düzifd ile eşleşenler argüman olarak ele alınır.
    +
    Bir Perl uyumlu düzenli ifade + betimler. Yönerge tanımında düzifd ile eşleşenler argüman + olarak ele alınır.
    uzantı
    -
    Bu genelde, dosya-ismi’nin bir parçası olarak son noktadan sonraki kısmı betimler. Bununla birlikte, Apache çok sayıda nokta içeren dosya isimlerinde ilk noktadan sonrasını uzantı kabul eden çoklu dosya ismi uzantılarını da tanır. Örneğin, dosya-ismi olarak dosya.html.tr değeri iki uzantı içerir: .html ve - .tr. Apache yönergelerinde uzantı’ları başında noktası olmaksızın da belirtebilirsiniz. Ayrıca, uzantı’lar harf büyüklüğüne de duyarlı değildir.
    +
    Bu genelde, dosya-ismi’nin bir parçası olarak son noktadan + sonraki kısmı betimler. Bununla birlikte, Apache çok sayıda nokta + içeren dosya isimlerinde ilk noktadan sonrasını uzantı kabul + eden çoklu dosya ismi uzantılarını da tanır. Örneğin, dosya- + ismi olarak dosya.html.tr değeri iki uzantı içerir: + .html ve .tr. Apache yönergelerinde + uzantı’ları başında noktası olmaksızın da belirtebilirsiniz. + Ayrıca, uzantı’lar harf büyüklüğüne de duyarlı değildir.
    MIME-türü
    -
    Dosya biçiminin, text/html örneğindeki gibi aralarına bir / konulmuş asıl ve alt biçimler şeklinde açıklandığı yönteme göre belirtileceğini betimler.
    +
    Dosya biçiminin, text/html örneğindeki gibi aralarına + bir / konulmuş asıl ve alt biçimler şeklinde açıklandığı yönteme göre + belirtileceğini betimler.
    ortam-değişkeni
    -
    Apache yapılandırma sürecinde tanımlanmış bir ortam değişkeninin ismini betimler. Daha ayrıntılı bilgi için ortam değişkenleri belgesine bakınız.
    +
    Apache yapılandırma sürecinde tanımlanmış bir ortam değişkeninin ismini betimler. Daha + ayrıntılı bilgi için ortam değişkenleri + belgesine bakınız.
    top

    Öntanımlı

    -

    Eğer yönerge öntanımlı bir değere sahipse o burada belirtilir (öntanımlı değer, yönergede kullanıcı tarafından belirtilmediği halde Apache tarafından belirtildiği varsayılarak işlem yapılan değerdir). Eğer öntanımlı bir değer yoksa bu bölümde bu durum “Yok” şeklinde belirtilir. Burada belirtilen öntanımlı değerin sunucu ile dağıtılan öntanımlı httpd.conf içindeki yönergede kullanılan değerle aynı olmasının gerekmediğine dikkat ediniz.

    +

    Eğer yönerge öntanımlı bir değere sahipse o burada belirtilir (öntanımlı + değer, yönergede kullanıcı tarafından belirtilmediği halde Apache + tarafından belirtildiği varsayılarak işlem yapılan değerdir). Eğer + öntanımlı bir değer yoksa bu bölümde bu durum “Yok” şeklinde + belirtilir. Burada belirtilen öntanımlı değerin sunucu ile dağıtılan + öntanımlı httpd.conf içindeki yönergede kullanılan değerle aynı olmasının + gerekmediğine dikkat ediniz.

    top

    Bağlam

    -

    Yönergenin sunucunun yapılandırma dosyalarının nerelerinde meşru kabul edildiği aşağıdaki değerlerin virgül ayraçlı bir listesi halinde burada belirtilir.

    +

    Yönergenin sunucunun yapılandırma dosyalarının nerelerinde meşru kabul + edildiği aşağıdaki değerlerin virgül ayraçlı bir listesi halinde burada + belirtilir.

    sunucu geneli
    -
    Yönergenin sunucunun (httpd.conf gibi) yapılandırma dosyalarında <VirtualHost> ve <Directory> bölümleri dışında her yerde kullanılabileceğini belirtir. Ayrıca, .htaccess dosyalarında bulunmasına da izin verilmez.
    +
    Yönergenin sunucunun (httpd.conf gibi) yapılandırma + dosyalarında <VirtualHost> ve <Directory> bölümleri dışında + her yerde kullanılabileceğini belirtir. Ayrıca, .htaccess + dosyalarında bulunmasına da izin verilmez.
    sanal konak
    -
    Yönergenin sunucunun yapılandırma dosyalarının sadece <VirtualHost> bölümlerinde kullanıldığında geçerli kabul edileceğini belirtir.
    +
    Yönergenin sunucunun yapılandırma dosyalarının sadece <VirtualHost> bölümlerinde + kullanıldığında geçerli kabul edileceğini belirtir.
    dizin
    -
    Yönergenin sunucunun yapılandırma dosyalarında sadece <Directory>, <Location>, <Files> ve <Proxy> bölümlerinde kullanıldığında geçerli kabul edileceğini belirtir. Bu bağlama konu sınırlamaların çerçevesi Yapılandırma Bölümleri içinde çizilmiştir.
    +
    Yönergenin sunucunun yapılandırma dosyalarında sadece <Directory>, <Location>, <Files>, <If> ve <Proxy> bölümlerinde + kullanıldığında geçerli kabul edileceğini belirtir. Bu bağlama konu + sınırlamaların çerçevesi Yapılandırma + Bölümleri içinde çizilmiştir.
    .htaccess
    -
    Bu bağlamda geçerli olacağı kabul edilen bir yönerge sadece dizin içi .htaccess dosyalarında görüldüğü zaman işleme sokulur. Üzerinde bir geçersizleştirme etkin kılınmışsa yönerge her şeye rağmen işleme sokulmayabilir.
    +
    Bu bağlamda geçerli olacağı kabul edilen bir yönerge sadece dizin içi + .htaccess dosyalarında görüldüğü zaman işleme sokulur. + Üzerinde bir geçersizleştirme etkin kılınmışsa + yönerge her şeye rağmen işleme sokulmayabilir.
    -

    Yönergeye sadece tasarlandığı bağlam içinde izin verilir; başka bir yerde kullanmayı denerseniz ya sunucunun bu bağlamı doğru şekilde işlemesine engel olan ya da sunucunun tamamen işlevsiz kalmasına sebep olan -- sunucu hiç başlatılamayabilir -- bir yapılandırma hatası alırsınız.

    - -

    Yönergenin geçerli olacağı konumlar, aslında, listelenen bağlamların tamamına mantıksal VEYA uygulanarak bulunur. Başka bir deyişle, bir yönergenin geçerli olacağı yerler "sunucu geneli, .htaccess" şeklinde belirtilmişse yönerge httpd.conf dosyasında ve .htaccess dosyalarında, <Directory> veya <VirtualHost> bölümleri haricinde her yerde kullanılabilir.

    +

    Yönergeye sadece tasarlandığı bağlam içinde izin verilir; başka + bir yerde kullanmayı denerseniz ya sunucunun bu bağlamı doğru şekilde + işlemesine engel olan ya da sunucunun tamamen işlevsiz kalmasına sebep + olan -- sunucu hiç başlatılamayabilir -- bir yapılandırma hatası + alırsınız.

    + +

    Yönergenin geçerli olacağı konumlar, aslında, listelenen bağlamların + tamamına mantıksal VEYA uygulanarak bulunur. Başka bir deyişle, bir + yönergenin geçerli olacağı yerler "sunucu geneli, .htaccess" + şeklinde belirtilmişse yönerge httpd.conf dosyasında ve + .htaccess dosyalarında, <Directory> veya <VirtualHost> bölümleri haricinde her yerde + kullanılabilir.

    top

    Geçersizleştirme

    -

    Bir .htaccess dosyasında göründüğü takdirde yönerge işlenirken hangi yapılandırma geçersizleşirmesinin etkin olacağı burada belirtilir. Eğer yönerge bağlamının .htaccess dosyalarında görünmesine izin verilmiyorsa hiçbir bağlam listelenmez.

    - -

    Geçersizleştirmeler AllowOverride yönergesi tarafından etkinleştirilir ve belli bir bağlama ve alt seviyelerde başka AllowOverride yönergeleri ile değiştirilmedikçe tüm çocuklarına uygulanır. Yönergenin belgesinde ayrıca kullanılabilecek tüm olası geçersizleştirme isimleri belirtilir.

    +

    Bir .htaccess dosyasında göründüğü takdirde yönerge + işlenirken hangi yapılandırma geçersizleşirmesinin etkin olacağı burada + belirtilir. Eğer yönerge bağlamının + .htaccess dosyalarında görünmesine izin verilmiyorsa hiçbir + bağlam listelenmez.

    + +

    Geçersizleştirmeler AllowOverride + yönergesi tarafından etkinleştirilir ve belli bir bağlama ve alt + seviyelerde başka AllowOverride + yönergeleri ile değiştirilmedikçe tüm çocuklarına uygulanır. Yönergenin + belgesinde ayrıca kullanılabilecek tüm olası geçersizleştirme isimleri + belirtilir.

    top

    Durum

    -

    Yönergenin Apache HTTP sunucusuna ne kadar sıkı bağlı olduğunu belirtir. Başka bir deyişle, yönergeye ve işlevselliğine erişim kazanmak için sunucuyu belli bir modül kümesiyle yeniden derlemek gerekip gerekmediği ile ilgili durumu belirtir. Bu özniteliğin olası değerleri şunlardır:

    +

    Yönergenin Apache HTTP sunucusuna ne kadar sıkı bağlı olduğunu belirtir. + Başka bir deyişle, yönergeye ve işlevselliğine erişim kazanmak için + sunucuyu belli bir modül kümesiyle yeniden derlemek gerekip gerekmediği + ile ilgili durumu belirtir. Bu özniteliğin olası değerleri şunlardır:

    Çekirdek
    -
    Eğer bir yönerge “Çekirdek” durumuna sahip olarak listelenmişse bu, yönergenin Apache HTTP sunucusunun en iç kısımlarının bir parçası olduğu ve daima kullanılabilir olacağı anlamına gelir.
    +
    Eğer bir yönerge “Çekirdek” durumuna sahip olarak listelenmişse bu, + yönergenin Apache HTTP sunucusunun en iç kısımlarının bir parçası + olduğu ve daima kullanılabilir olacağı anlamına gelir.
    MPM
    -
    “MPM” durumuna sahip bir yönerge Çok Süreklilik Modülü tarafından sağlanır. Bu yönerge türü sadece ve sadece yönerge tanımının Modül satırında listelenmiş MPM’lerden birini kullanıyorsanız mevcut olacaktır.
    +
    “MPM” durumuna sahip bir yönerge Çok Süreklilik + Modülü tarafından sağlanır. Bu yönerge türü sadece ve sadece + yönerge tanımının Modül satırında listelenmiş + MPM’lerden birini kullanıyorsanız mevcut olacaktır.
    Temel
    -
    “Temel” durumuna sahip bir yönerge, sunucuda öntanımlı derlenmiş standart Apache modüllerinden biri tarafından destekleniyor demektir. Bu nedenle sunucuyu derlemek için yapılandırırken yönergeyi içeren modülü yapılandırmadan özellikle kaldırmazsanız yönerge normal olarak kullanılabilir olacaktır.
    +
    “Temel” durumuna sahip bir yönerge, sunucuda öntanımlı derlenmiş + standart Apache modüllerinden biri tarafından destekleniyor demektir. + Bu nedenle sunucuyu derlemek için yapılandırırken yönergeyi içeren + modülü yapılandırmadan özellikle kaldırmazsanız yönerge normal olarak + kullanılabilir olacaktır.
    Eklenti
    -
    “Eklenti” durumuna sahip bir yönerge, Apache sunucu kitinde bulunan ancak normalde sunucuyla birlikte derlenmeyen modüllerden biri tarafından sağlanır. Yönergeyi ve işlevselliğini etkin kılmak için sunucunun derleme öncesi paket yapılandırması sırasında modülün derleneceğini açıkça belirttikten sonra gerekirse sunucuyu yeniden derlemeniz gerekir.
    +
    “Eklenti” durumuna sahip bir yönerge, Apache sunucu kitinde bulunan + ancak normalde sunucuyla birlikte derlenmeyen modüllerden biri + tarafından sağlanır. Yönergeyi ve işlevselliğini etkin kılmak için + sunucunun derleme öncesi paket yapılandırması sırasında modülün + derleneceğini açıkça belirttikten sonra gerekirse sunucuyu yeniden + derlemeniz gerekir.
    Deneysel
    -
    “Deneysel” durumuna sahip bir yönerge, Apache sunucu kitinde bulunan modüllerden biri tarafından sağlanır ve modülün denenmesi tamamen sizin insiyatifinize bırakılır. Böyle bir yönerge her şeyiyle belgelenmiştir fakat gerektiği gibi desteklenmemiştir. Yönergeyi içeren modül öntanımlı olarak sunucuyla birlikte derlenebileceği gibi derlenmeyebilir de; bunun için yönergenin açıklandığı sayfanın başına ve kullanılabilirliği hakkında bilgi edinmek için yönergeyi içeren modüle bakın.
    +
    “Deneysel” durumuna sahip bir yönerge, Apache sunucu kitinde bulunan + modüllerden biri tarafından sağlanır ve modülün denenmesi tamamen sizin + insiyatifinize bırakılır. Böyle bir yönerge her şeyiyle belgelenmiştir + fakat gerektiği gibi desteklenmemiştir. Yönergeyi içeren modül + öntanımlı olarak sunucuyla birlikte derlenebileceği gibi + derlenmeyebilir de; bunun için yönergenin açıklandığı sayfanın başına + ve kullanılabilirliği hakkında bilgi edinmek için yönergeyi içeren + modüle bakın.
    top
    @@ -161,14 +266,38 @@

    Uyumluluk

    -

    Eğer yönerge Apache’nin 2. sürüm dağıtımının özgün parçası değilse söz konusu sürüm burada belirtilir. Ayrıca, yönergenin kullanımı belli platformlarla sınırlıysa bunun ayrıntıları da burada belirtilir.

    +

    Eğer yönerge Apache’nin 2. sürüm dağıtımının özgün parçası değilse söz + konusu sürüm burada belirtilir. Ayrıca, yönergenin kullanımı belli + platformlarla sınırlıysa bunun ayrıntıları da burada belirtilir.

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directive-dict.xml b/docs/manual/mod/directive-dict.xml index 976b44465d8..f1862fb831d 100644 --- a/docs/manual/mod/directive-dict.xml +++ b/docs/manual/mod/directive-dict.xml @@ -167,7 +167,8 @@ used inside Directory, Location, Files, and Files, If, and Proxy containers in the server configuration files, subject to the restrictions outlined in Configuration diff --git a/docs/manual/mod/directive-dict.xml.fr b/docs/manual/mod/directive-dict.xml.fr new file mode 100644 index 00000000000..06034bf5f24 --- /dev/null +++ b/docs/manual/mod/directive-dict.xml.fr @@ -0,0 +1,295 @@ + + + + + + + + + + + + Termes utilisés pour la description des directives + + +

    Ce document décrit les termes utilisés pour décrire chaque directive de configuration d'Apache.

    +
    +Fichiers de configuration + +
    Description + +

    Une brève description des fonctions de cette directive.

    +
    + +
    Syntaxe + +

    Ce terme introduit le format sous lequel la directive doit + apparaître dans le fichier de configuration. Cette syntaxe est très + spécifique à la directive et est décrite en détail dans la + définition de cette dernière. En général, le nom de la directive est + suivi d'un ou plusieurs arguments séparés par des espaces. Si un + argument contient un espace, il doit être entouré de guillemets. Les + arguments optionnels sont entourés de crochets. Lorsqu'un argument + accepte une valeur parmi une liste de valeurs possibles, cette liste + est spécifiée en séparant les valeurs par une barre verticale "|". + Les textes littéraux sont présentés dans la fonte par défaut, alors + que les types d'argument pour lesquels une substitution est + nécessaire sont en gras. La syntaxe des directives + acceptant un nombre variable d'arguments se termine par "...", ce + qui indique que le dernier argument peut être répété.

    + +

    Les directives utilisent un grand nombre de types d'arguments + différents. Les plus courants sont définis ci-dessous.

    + +
    +
    URL
    + +
    Un Localisateur de Ressource Uniforme (Uniform Resource + Locator) complet comportant un protocole, un nom d'hôte et un nom + de chemin optionnel comme dans + http://www.example.com/chemin/vers/fichier.html
    + +
    chemin-URL
    + +
    La partie de l'url qui suit le protocole et le nom + d'hôte comme dans /chemin/vers/fichier.html. Le + chemin-URL représente la ressource vue du web, et est + différente de la représentation de cette même ressource vue du + système de fichiers.
    + +
    chemin-fichier
    + +
    Le chemin d'un fichier dans le système de fichiers local + commençant par le répertoire racine comme dans + /usr/local/apache/htdocs/chemin/vers/fichier.html. + Sauf mention contraire, un chemin-fichier qui ne commence + pas par un slash sera considéré comme relatif au répertoire défini + par la directive ServerRoot.
    + +
    chemin-répertoire
    + +
    Le chemin d'un répertoire dans le système de fichiers local + commençant par le répertoire racine comme dans + /usr/local/apache/htdocs/chemin/vers/.
    + +
    nom-fichier
    + +
    Le nom d'un fichier sans son chemin comme dans + fichier.html.
    + +
    regex
    + +
    Une expression rationnelle + compatible Perl. La définition de la directive spécifiera à quoi + regex sera comparée.
    + +
    extension
    + +
    En général, c'est la partie du nom de fichier qui + suit le dernier point. Cependant, Apache reconnaît plusieurs + extensions de noms de fichiers ; ainsi, si un nom de + fichier + contient plusieurs points, chacune des parties du nom de fichier + séparées par des points et situées après le premier point est une + extension. Par exemple, le nom de fichier + fichier.html.en comporte deux extensions : + .html et .en. Pour les directives + Apache, vous pouvez spécifier les extensions avec ou sans + le point initial. Enfin, les extensions ne sont pas + sensibles à la casse.
    + +
    MIME-type
    + +
    Une méthode de description du format d'un fichier consistant + en un type de format majeur et un type de format mineur séparés + par un slash comme dans text/html.
    + +
    env-variable
    + +
    Le nom d'une variable + d'environnement définie au cours du processus de configuration + d'Apache. Notez qu'elle peut être différente d'une variable + d'environnement du système d'exploitation. Voir la documentation sur les variables d'environnement + pour plus de détails.
    +
    +
    + +
    Défaut + +

    Si la directive possède une valeur par défaut (en d'autres + termes, si le serveur Web Apache se comporte comme si vous l'aviez + définie à une valeur particulière, alors que vous l'avez omise dans + votre configuration), elle est spécifiée ici. Si la directive ne + possède pas de valeur par défaut, cette section doit spécifier + "Aucune". Notez que la valeur par défaut dont il est + question n'est pas nécessairement la même que la valeur attribuée à + la directive dans le fichier httpd.conf par défaut distribué avec le + serveur.

    +
    + +
    Contexte + +

    Indique les parties des fichiers de configuration du serveur + où cette directive est valide. Il s'agit d'une liste d'une ou + plusieurs des valeurs suivantes séparées par des virgules :

    + +
    +
    configuration du serveur
    + +
    Signifie que la directive peut être utilisée dans les fichiers + de configuration du serveur (par exemple httpd.conf), + mais pas à l'intérieur d'un conteneur VirtualHost ou Directory. De même, elle + n'est pas valide dans les fichiers .htaccess.
    + +
    serveur virtuel
    + +
    Signifie que la directive peut apparaître à l'intérieur d'un + conteneur VirtualHost dans les fichiers de + configuration du serveur.
    + +
    répertoire
    + +
    Une directive spécifiée comme valide dans ce contexte peut + être utilisée à l'intérieur de conteneurs Directory, Location, Files, If, et Proxy dans les + fichiers de configuration du serveur, en tenant compte des + restrictions précisées dans la documentation sur les Sections de configuration.
    + +
    .htaccess
    + +
    Si une directive est valide dans ce contexte, cela signifie + qu'elle peut apparaître à l'intérieur de fichiers de configuration + de niveau répertoire .htaccess. Elle sera ou + ne sera pas traitée, selon la définition de l'option overrides pour le contexte courant.
    +
    + +

    La directive n'est autorisée que dans le contexte + désigné ; si vous essayez de l'utiliser ailleurs, vous générerez une + erreur de configuration qui va soit empêcher le serveur de traiter + les requêtes correctement dans ce contexte, soit tout simplement + empêcher le serveur de fonctionner -- en d'autres termes, le serveur + refusera de démarrer.

    + +

    Les lieux de définition valides pour une directive résultent en + fait d'un + OU logique de tous les contextes spécifiés. En d'autres termes, une + directive spécifiée comme valide dans "configuration du + serveur, .htaccess" peut être utilisée dans le fichier + httpd.conf et dans les fichiers .htaccess, + mais pas dans un conteneur Directory ou VirtualHost.

    +
    + +
    Surcharge/Écrasement + +

    Ce terme indique quelle autorisation de surcharge ("override") doit être + active pour que la directive puisse être traitée lorsqu'elle + apparaît dans un fichier .htaccess. Si le context de la directive ne lui permet pas + d'apparaître dans un fichier .htaccess, aucun contexte + ne sera spécifié.

    + +

    Les autorisations de surcharge sont activées via la directive + AllowOverride, et possèdent une + portée particulière, comme un répertoire et tous ses + sous-répertoires, sauf si une autre directive AllowOverride apparaît à un niveau + inférieur. La documentation pour cette directive spécifie aussi les + noms d'autorisations de surcharge disponibles.

    +
    + +
    Statut + +

    Cet attribut indique le degré de rapprochement de la directive du + coeur d'Apache ; en d'autres termes, vous pouvez être amené à + recompiler le serveur avec un jeu de modules supplémentaires pour + pouvoir utiliser la directive, et ainsi accéder à ses + fonctionnalités. Les valeurs possible pour cet attribut sont :

    + +
    +
    Core
    + +
    Lorsqu'une directive a pour statut "Core", cela signifie + qu'elle fait partie du coeur du serveur web Apache, et est de ce + fait toujours disponible.
    + +
    MPM
    + +
    Une directive dont le statut est "MPM" est fournie par un module Multi-Processus. Ce type de + directive sera disponible si et seulement si vous utilisez un des + MPMs spécifiés dans la ligne Module de la + définition de la directive.
    + +
    Base
    + +
    Une directive dont le statut est "Base" est fournie par un des + modules Apache standards qui sont compilés dans le serveur par + défaut, et sont de ce fait toujours disponibles, sauf si vous avez + fait en sorte de les supprimer de votre configuration.
    + +
    Extension
    + +
    Une directive dont le statut est "Extension" est fournie par + un des modules inclus dans le kit du serveur Apache, mais qui ne + sont pas compilés dans le serveur par défaut. Pour activer la + directive et accéder à ses fonctionnalités, vous devez modifier + les fichiers de configuration de la compilation du serveur, et + recompiler Apache.
    + +
    Expérimental
    + +
    Le statut "Expérimental" indique que la directive fait partie + du kit Apache, mais que vous l'utilisez à vos risques et périls. + La directive est documentée à titre d'exhaustivité, et n'est pas + obligatoirement supportée. Le module qui fournit la directive peut + être compilé par défaut dans le serveur ou non ; consultez le haut + de la page qui décrit la directive et son module pour vérifier sa + disponibilité.
    +
    +
    + +
    Module + +

    Il s'agit d'une simple liste des noms des modules sources qui + fournissent la directive.

    +
    + +
    Compatibilité + +

    Si la directive ne faisait pas partie de la distribution + originale d'Apache version 2, la version dans laquelle elle a été + introduite est indiquée ici. Cette section indique aussi si la + directive n'est disponible que sur certaines plates-formes.

    +
    + + + diff --git a/docs/manual/mod/directive-dict.xml.ja b/docs/manual/mod/directive-dict.xml.ja index 6fb6568d3f9..7a2dc1e08c0 100644 --- a/docs/manual/mod/directive-dict.xml.ja +++ b/docs/manual/mod/directive-dict.xml.ja @@ -1,7 +1,7 @@ - + + + + -Verzeichnis der Direktiven - Apache HTTP Server +Verzeichnis der Direktiven - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Verzeichnis der Direktiven

    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Verzeichnis der Direktiven

    Verfgbare Sprachen:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -39,7 +45,7 @@ zu jeder Direktive eine Zusammenfassung der Details enthlt.

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.en b/docs/manual/mod/directives.html.en index 81e96f001e2..04ebe7a47ca 100644 --- a/docs/manual/mod/directives.html.en +++ b/docs/manual/mod/directives.html.en @@ -1,26 +1,32 @@ - -Directive Index - Apache HTTP Server +Directive Index - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Directive Index

    Available Languages:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -40,7 +46,7 @@ summary form.

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.es b/docs/manual/mod/directives.html.es index df3e2270459..f3b43afbfe2 100644 --- a/docs/manual/mod/directives.html.es +++ b/docs/manual/mod/directives.html.es @@ -1,26 +1,32 @@ - -ndice de Directivas - Servidor HTTP Apache +ndice de Directivas - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    ndice de Directivas

    +Apache > Servidor HTTP > Documentacin > Versin 2.4 > Mdulos

    ndice de Directivas

    Idiomas disponibles:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -42,7 +48,7 @@ directiva de forma resumida.

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.fr b/docs/manual/mod/directives.html.fr new file mode 100644 index 00000000000..187cec69152 --- /dev/null +++ b/docs/manual/mod/directives.html.fr @@ -0,0 +1,723 @@ + + + + + +Index des directives - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Index des directives

    +
    +

    Langues Disponibles:  de  | + en  | + es  | + fr  | + ja  | + ko  | + tr  | + zh-cn 

    +
    + +

    + Toutes les directives Apache disponibles dans la distribution standard + d'Apache sont rfrences ici. Elles sont dcrites en utilisant un + format normalis, et un dictionnaire des termes utiliss dans leurs + descriptions est disponible. +

    + +

    + Un Document de rfrence rapide des directives + est galement disponible. Il donne des dtails propos de chaque directive + sous une forme abrge. +

    + +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    +
    +
    +

    Langues Disponibles:  de  | + en  | + es  | + fr  | + ja  | + ko  | + tr  | + zh-cn 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/directives.html.ja.utf8 b/docs/manual/mod/directives.html.ja.utf8 index eb6dcabc9fb..dcfb29362cd 100644 --- a/docs/manual/mod/directives.html.ja.utf8 +++ b/docs/manual/mod/directives.html.ja.utf8 @@ -1,27 +1,32 @@ - -ディレクティブ一覧 - Apache HTTP サーバ +ディレクティブ一覧 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    ディレクティブ一覧

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -38,7 +43,7 @@ あります。

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.ko.euc-kr b/docs/manual/mod/directives.html.ko.euc-kr index 04ee639cd5a..2110d42f0c0 100644 --- a/docs/manual/mod/directives.html.ko.euc-kr +++ b/docs/manual/mod/directives.html.ko.euc-kr @@ -1,26 +1,32 @@ - -þ - Apache HTTP Server +þ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    þ

    :  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -37,7 +43,7 @@ þ Ͽ þ ִ.

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.tr.utf8 b/docs/manual/mod/directives.html.tr.utf8 index 11c97d4e66c..93f00bce908 100644 --- a/docs/manual/mod/directives.html.tr.utf8 +++ b/docs/manual/mod/directives.html.tr.utf8 @@ -1,26 +1,32 @@ - -Yönerge Dizini - Apache HTTP Sunucusu +Yönerge Dizini - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Yönerge Dizini

    Mevcut Diller:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -36,7 +42,7 @@ Hızlı Yönerge Kılavuzu da mevcuttur.

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.html.zh-cn b/docs/manual/mod/directives.html.zh-cn.utf8 similarity index 82% rename from docs/manual/mod/directives.html.zh-cn rename to docs/manual/mod/directives.html.zh-cn.utf8 index 48320a39d0f..59faaa824c6 100644 --- a/docs/manual/mod/directives.html.zh-cn +++ b/docs/manual/mod/directives.html.zh-cn.utf8 @@ -1,26 +1,32 @@ - -指令索引 - Apache HTTP 服务器 +指令索引 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    指令索引

    可用语言:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -35,7 +41,7 @@ 指令快速参考用来以摘要的形式提供有关每个指令的详细信息。

    -

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X 

    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/directives.xml.fr b/docs/manual/mod/directives.xml.fr new file mode 100644 index 00000000000..2f153ab8ea8 --- /dev/null +++ b/docs/manual/mod/directives.xml.fr @@ -0,0 +1,43 @@ + + + + + + + + + + + Index des directives + +

    + Toutes les directives Apache disponibles dans la distribution standard + d'Apache sont référencées ici. Elles sont décrites en utilisant un + format normalisé, et un dictionnaire des termes utilisés dans leurs + descriptions est disponible. +

    + +

    + Un Document de référence rapide des directives + est également disponible. Il donne des détails à propos de chaque directive + sous une forme abrégée. +

    +
    +
    diff --git a/docs/manual/mod/directives.xml.meta b/docs/manual/mod/directives.xml.meta index bd7a7b7679e..7f569d95304 100644 --- a/docs/manual/mod/directives.xml.meta +++ b/docs/manual/mod/directives.xml.meta @@ -10,6 +10,7 @@ de en es + fr ja ko tr diff --git a/docs/manual/mod/event.html.en b/docs/manual/mod/event.html.en index 2e02c563835..0883cb1eece 100644 --- a/docs/manual/mod/event.html.en +++ b/docs/manual/mod/event.html.en @@ -1,23 +1,28 @@ - -event - Apache HTTP Server +event - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM event

    @@ -33,24 +38,25 @@ of consuming threads only for connections with active processing

    The event Multi-Processing Module (MPM) is designed to allow more requests to be served simultaneously by - passing off some processing work to supporting threads, freeing up - the main threads to work on new requests. It is based on the - worker MPM, which implements a hybrid - multi-process multi-threaded server. Run-time configuration - directives are identical to those provided by - worker.

    + passing off some processing work to the listeners threads, freeing up + the worker threads to serve new requests.

    To use the event MPM, add --with-mpm=event to the configure script's arguments when building the httpd.

    -

    Directives

    + +
  • Comments
  • top
    +

    Relationship with the Worker MPM

    +

    event is based on the worker MPM, which implements a hybrid +multi-process multi-threaded server. A single control process (the parent) is responsible for launching +child processes. Each child process creates a fixed number of server +threads as specified in the ThreadsPerChild directive, as well +as a listener thread which listens for connections and passes them to a worker thread for processing when they arrive.

    + +

    Run-time configuration directives are identical to those provided by worker, with the only addition +of the AsyncRequestWorkerFactor.

    + +
    top
    +

    How it Works

    This MPM tries to fix the 'keep alive problem' in HTTP. After a client - completes the first request, the client can keep the connection - open, and send further requests using the same socket. This can - save signifigant overhead in creating TCP connections. However, - Apache HTTP Server traditionally keeps an entire child process/thread waiting - for data from the client, which brings its own disadvantages. To - solve this problem, this MPM uses a dedicated thread to handle both - the Listening sockets, all sockets that are in a Keep Alive state, - and sockets where the handler and protocol filters have done their work - and the only remaining thing to do is send the data to the client. The - status page of mod_status shows how many connections are - in the mentioned states.

    - -

    The improved connection handling does not yet work for certain - connection filters, in particular SSL. For SSL connections, this MPM will - fall back to the behaviour of the worker MPM and - reserve one worker thread per connection.

    - -

    The MPM assumes that the underlying apr_pollset - implementation is reasonably threadsafe. This enables the MPM to - avoid excessive high level locking, or having to wake up the listener - thread in order to send it a keep-alive socket. This is currently - only compatible with KQueue and EPoll.

    + completes the first request, it can keep the connection + open, sending further requests using the same socket and saving + significant overhead in creating TCP connections. However, + Apache HTTP Server traditionally keeps an entire child + process/thread waiting for data from the client, which brings its own disadvantages. + To solve this problem, this MPM uses a dedicated listener thread for each process + to handle both the Listening sockets, all sockets that are in a Keep Alive state, + sockets where the handler and protocol filters have done their work + and the ones where the only remaining thing to do is send the data to the client. +

    + +

    This new architecture, leveraging non-blocking sockets and modern kernel + features exposed by APR (like Linux's epoll), + no longer requires the mpm-accept Mutex + configured to avoid the thundering herd problem.

    + +

    The total amount of connections that a single process/threads block can handle is regulated + by the AsyncRequestWorkerFactor directive.

    + +

    Async connections

    +

    Async connections would need a fixed dedicated worker thread with the previous MPMs but not with event. + The status page of mod_status shows new columns under the Async connections section:

    +
    +
    Writing
    +
    While sending the response to the client, it might happen that the TCP write buffer fills up because the connection is too slow. Usually in this case a write() to the socket returns EWOULDBLOCK or EAGAIN, to become writable again after an idle time. The worker holding the socket might be able to offload the waiting task to the listener thread, that in turn will re-assign it to the first idle worker thread available once an event will be raised for the socket (for example, "the socket is now writable"). Please check the Limitations section for more information. +
    + +
    Keep-alive
    +
    Keep Alive handling is the most basic improvement from the worker MPM. + Once a worker thread finishes to flush the response to the client, it can offload the + socket handling to the listener thread, that in turns will wait for any event from the + OS, like "the socket is readable". If any new request comes from the client, then the + listener will forward it to the first worker thread available. Conversely, if the + KeepAliveTimeout occurs then the socket will be + closed by the listener. In this way the worker threads are not responsible for idle + sockets and they can be re-used to serve other requests.
    + +
    Closing
    +
    Sometimes the MPM needs to perform a lingering close, namely sending back an early error to the client while it is still transmitting data to httpd. Sending the response and then closing the connection immediately is not the correct thing to do since the client (still trying to send the rest of the request) would get a connection reset and could not read the httpd's response. So in such cases, httpd tries to read the rest of the request to allow the client to consume the response. The lingering close is time bounded but it can take relatively long time, so a worker thread can offload this work to the listener.
    +
    + +

    These improvements are valid for both HTTP/HTTPS connections.

    + + + +

    Graceful process termination and Scoreboard usage

    +

    This mpm showed some scalability bottlenecks in the past leading to the following + error: "scoreboard is full, not at MaxRequestWorkers". + MaxRequestWorkers + limits the number of simultaneous requests that will be served at any given time + and also the number of allowed processes + (MaxRequestWorkers + / ThreadsPerChild), meanwhile + the Scoreboard is a representation of all the running processes and + the status of their worker threads. If the scoreboard is full (so all the + threads have a state that is not idle) but the number of active requests + served is not MaxRequestWorkers, + it means that some of them are blocking new requests that could be served + but that are queued instead (up to the limit imposed by + ListenBacklog). Most of the times + the threads are stuck in the Graceful state, namely they are waiting to + finish their work with a TCP connection to safely terminate and free up a + scoreboard slot (for example handling long running requests, slow clients + or connections with keep-alive enabled). Two scenarios are very common:

    +
      +
    • During a graceful restart. + The parent process signals all its children to complete + their work and terminate, while it reloads the config and forks new + processes. If the old children keep running for a while before stopping, + the scoreboard will be partially occupied until their slots are freed. +
    • +
    • When the server load goes down in a way that causes httpd to + stop some processes (for example due to + MaxSpareThreads). + This is particularly problematic because when the load increases again, + httpd will try to start new processes. + If the pattern repeats, the number of processes can rise quite a bit, + ending up in a mixture of old processes trying to stop and new ones + trying to do some work. +
    • +
    +

    From 2.4.24 onward, mpm-event is smarter and it is able to handle + graceful terminations in a much better way. Some of the improvements are:

    +
      +
    • Allow the use of all the scoreboard slots up to + ServerLimit. + MaxRequestWorkers and + ThreadsPerChild are used + to limit the amount of active processes, meanwhile + ServerLimit + takes also into account the ones doing a graceful + close to allow extra slots when needed. The idea is to use + ServerLimit to instruct httpd + about how many overall processes are tolerated before impacting + the system resources. +
    • +
    • Force gracefully finishing processes to close their + connections in keep-alive state.
    • +
    • During graceful shutdown, if there are more running worker threads + than open connections for a given process, terminate these threads to + free resources faster (which may be needed for new processes).
    • +
    • If the scoreboard is full, prevent more processes to finish + gracefully due to reduced load until old processes have terminated + (otherwise the situation would get worse once the load increases again).
    • +
    +

    The behavior described in the last point is completely observable via + mod_status in the connection summary table through two new + columns: "Slot" and "Stopping". The former indicates the PID and + the latter if the process is stopping or not; the extra state "Yes (old gen)" + indicates a process still running after a graceful restart.

    + + +

    Limitations

    +

    The improved connection handling may not work for certain connection + filters that have declared themselves as incompatible with event. In these + cases, this MPM will fall back to the behavior of the + worker MPM and reserve one worker thread per connection. + All modules shipped with the server are compatible with the event MPM.

    + +

    A similar restriction is currently present for requests involving an + output filter that needs to read and/or modify the whole response body. + If the connection to the client blocks while the filter is processing the + data, and the amount of data produced by the filter is too big to be + buffered in memory, the thread used for the request is not freed while + httpd waits until the pending data is sent to the client.
    + To illustrate this point we can think about the following two situations: + serving a static asset (like a CSS file) versus serving content retrieved from + FCGI/CGI or a proxied server. The former is predictable, namely the event MPM + has full visibility on the end of the content and it can use events: the worker + thread serving the response content can flush the first bytes until EWOULDBLOCK + or EAGAIN is returned, delegating the rest to the listener. This one in turn + waits for an event on the socket, and delegates the work to flush the rest of the content + to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxied content) + the MPM can't predict the end of the response and a worker thread has to finish its work + before returning the control to the listener. The only alternative is to buffer the + response in memory, but it wouldn't be the safest option for the sake of the + server's stability and memory footprint. +

    + + + +

    Background material

    +

    The event model was made possible by the introduction of new APIs into the supported operating systems:

    +
      +
    • epoll (Linux)
    • +
    • kqueue (BSD)
    • +
    • event ports (Solaris)
    • +
    +

    Before these new APIs where made available, the traditional select and poll APIs had to be used. + Those APIs get slow if used to handle many connections or if the set of connections rate of change is high. + The new APIs allow to monitor much more connections and they perform way better when the set of connections to monitor changes frequently. So these APIs made it possible to write the event MPM, that scales much better with the typical HTTP pattern of many idle connections.

    + +

    The MPM assumes that the underlying apr_pollset + implementation is reasonably threadsafe. This enables the MPM to + avoid excessive high level locking, or having to wake up the listener + thread in order to send it a keep-alive socket. This is currently + only compatible with KQueue and EPoll.

    + +
    top
    @@ -147,21 +298,25 @@ of consuming threads only for connections with active processing
    Off (défaut)Off (défaut) GET /disque1/stockage/apache/htdocs/images/rep-images1/nourritu

    The event MPM handles some connections in an asynchronous way, where request worker threads are only allocated for short periods of time as - needed, and other (mostly SSL) connections with one request worker thread - reserved per connection. This can lead to situations where all workers are - tied up and no worker thread is available to handle new work on established - async connetions.

    - -

    To mitigate this problem, the event MPM does two things: Firstly, it - limits the number of connections accepted per process, depending on the - number of idle request workers. Secondly, if all workers are busy, it will - close connections in keep-alive state even if the keep-alive timeout has - not expired. This allows the respective clients to reconnect to a - different process which may still have worker threads available.

    + needed, and other connections with one request worker thread reserved per + connection. This can lead to situations where all workers are tied up and + no worker thread is available to handle new work on established async + connections.

    + +

    To mitigate this problem, the event MPM does two things:

    +
      +
    • it limits the number of connections accepted per process, depending on the + number of idle request workers;
    • +
    • if all workers are busy, it will + close connections in keep-alive state even if the keep-alive timeout has + not expired. This allows the respective clients to reconnect to a + different process which may still have worker threads available.
    • +

    This directive can be used to fine-tune the per-process connection - limit. A process will only accept new connections if the current number of - connections is lower than:

    + limit. A process will only accept new connections if the current number of + connections (not counting connections in the "closing" state) is lower + than:

    ThreadsPerChild + @@ -169,13 +324,64 @@ of consuming threads only for connections with active processing number of idle workers)

    -

    This means the absolute maximum numbers of concurrent connections is:

    +

    An estimation of the maximum concurrent connections across all the processes given + an average value of idle worker threads can be calculated with: +

    + + +

    + (ThreadsPerChild + + (AsyncRequestWorkerFactor * + number of idle workers)) * + ServerLimit +

    + +

    Example

    +
    ThreadsPerChild = 10
    +ServerLimit = 4
    +AsyncRequestWorkerFactor = 2
    +MaxRequestWorkers = 40
    +
    +idle_workers = 4 (average for all the processes to keep it simple)
    +
    +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit
    +                = (10 + (2 * 4)) * 4 = 72
    + +
    + +

    When all the worker threads are idle, then absolute maximum numbers of concurrent + connections can be calculared in a simpler way:

    (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers

    + +

    Example

    +
    ThreadsPerChild = 10
    +ServerLimit = 4
    +MaxRequestWorkers = 40
    +AsyncRequestWorkerFactor = 2
    + + +

    If all the processes have all threads idle then:

    + +
    idle_workers = 10
    + + +

    We can calculate the absolute maximum numbers of concurrent connections in two ways:

    + +
    max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit
    +                = (10 + (2 * 10)) * 4 = 120
    +
    +max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers
    +                = (2 + 1) * 40 = 120
    + +
    + +

    Tuning AsyncRequestWorkerFactor requires knowledge about the traffic handled by httpd in each specific use case, so changing the default value requires extensive testing and data gathering from mod_status.

    +

    MaxRequestWorkers was called MaxClients prior to version 2.3.13. The above value shows that the old name did not accurately describe its meaning for the event MPM.

    @@ -189,7 +395,28 @@ of consuming threads only for connections with active processing

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/event.html.fr b/docs/manual/mod/event.html.fr index 3e61bbdeac2..192c0413d8e 100644 --- a/docs/manual/mod/event.html.fr +++ b/docs/manual/mod/event.html.fr @@ -1,23 +1,28 @@ - -event - Serveur Apache HTTP +event - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Apache MPM event

    @@ -33,13 +38,9 @@ mobiliser des threads que pour les connexions en cours de traitement

    Le module multi-processus (MPM) event est conu pour permettre le traitement d'un nombre accru de requtes - simultanes en dlguant certaines tches des threads de support, - librant par l-mme le thread principal et lui permettant de - traiter les nouvelles requtes. Il s'inspire du MPM - worker qui implmente un serveur hybride - multi-processus/multi-threads. Les directives de configuration - l'excution sont identiques celles du MPM - worker.

    + simultanes en dlguant certaines tches + aux threads d'coute, librant par l-mme les + threads de travail et leur permettant de traiter les nouvelles requtes.

    Pour utiliser le MPM event, ajoutez --with-mpm=event aux arguments du script @@ -47,12 +48,17 @@ mobiliser des threads que pour les connexions en cours de traitement httpd.

    -
    top
    +

    Relations avec le MPM Worker

    +

    Le MPM event s'inspire du MPM worker qui +implmente un serveur hybride multi-processus et multi-threads. Un processus de +contrle unique (le parent) est charg de lancer des processus enfants. Chaque +processus enfant cre un nombre de threads serveurs dfini via la directive +ThreadsPerChild, ainsi qu'un thread +d'coute qui surveille les requtes entrantes et les distribue aux threads de +travail pour traitement au fur et mesure de leur arrive.

    + +

    Les directives de configuration l'excution sont identiques celles que +propose le MPM worker, avec l'unique addition de la directive +AsyncRequestWorkerFactor.

    + +
    top
    +

    Comment tout cela fonctionne

    -

    Ce MPM essaie de rsoudre le 'problme keep alive' de HTTP. - Lorsqu'un client a soumis une premire requte, il peut garder la - connexion ouverte, et envoyer les requtes suivantes en utilisant le - mme socket. Ceci permet de rduire de manire significative la - surcharge due la cration de connexions TCP. - Cependant, le serveur HTTP Apache - mobilise en principe cet effet un processus/thread enfant en - attente des donnes du client, ce qui amne son propre lot - d'inconvnients. Pour rsoudre ce problme, event - utilise un thread ddi qui gre les sockets en - coute, tous les sockets en tat Keep Alive, et les - sockets o les filtres gestionnaires et de protocole ont - fait leur travail et pour lesquels la seule chose restant faire - consiste envoyer les donnes au client. La page d'tat de - mod_status montre les connexions qui se trouvent - dans les situations mentionnes.

    - -

    Le gestionnaire de connexion amlior ne fonctionne pas encore - pour certains filtres de connexion, et en particulier SSL. Pour les - connexions SSL, ce MPM radopte le comportement du MPM - worker et rserve un thread par connexion.

    - -

    Le MPM prsuppose que l'implmentation apr_pollset - sous-jacente est raisonnablement sre du point de vue des threads. - Ceci permet au MPM d'viter un verrouillage de haut niveau excessif, - ou de devoir activer le thread en coute afin de lui envoyer un - socket keep alive. Tout ceci n'est actuellement compatible qu'avec - KQueue et EPoll.

    + +

    Ce module MPM tente de rsoudre le "problme keep + alive" de HTTP. Lorsqu'un client a effectu une premire requte, il peut + garder la connexion ouverte et envoyer les requtes suivante en utilisant le + mme socket, ce qui diminue considrablement la charge qui aurait t + induite par la cration de nouvelles connexions TCP. Cependant, le + fonctionnement du serveur HTTP Apache impose de rserver un couple processus + enfant/thread pour attendre les donnes en provenance du client, ce qui + prsente certains inconvnients. + Pour rsoudre ce problme, le MPM Event utilise un thread d'coute ddi + pour chaque processus pour grer les sockets d'coute, tous les sockets qui + sont dans un tat de connexion persistante, les sockets o les + filtres de gestionnaire et de protocole ont fait leur travail, et ceux pour + lesquels la seule chose restant faire est l'envoi des donnes au client. +

    + +

    Cette nouvelle architecture, en exploitant les sockets non blocants et + les fonctionnalits des noyaux modernes mis en valeur par + APR (comme epoll de Linux), n'a plus besoin du + Mutex mpm-accept pour + viter le problme de "thundering herd".

    + +

    La directive AsyncRequestWorkerFactor permet de + dfinir le nombre total de connexions qu'un bloc processus/thread peut + grer.

    + +

    Connexions asynchrones

    +

    Avec les MPM prcdents, les connexions asynchrones ncessitaient + un thread de travail ddi, mais ce n'est plus le cas avec le MPM Event. + La page d'tat de mod_status montre de nouvelles + colonnes dans la section "Async connections" :

    +
    +
    Writing
    +
    Lors de l'envoi de la rponse au client, il peut arriver que le + tampon d'criture TCP soit plein si la connexion est trop lente. Si + cela se produit, une instruction write() vers le socket + renvoie en gnral EWOULDBLOCK ou EAGAIN + pour que l'on puisse y crire nouveau aprs un certain temps + d'inactivit. Le thread de travail qui utilise le socket doit alors + tre en mesure de rcuprer la tche en attente et la restituer au + thread d'coute qui, son tour, la rattribuera au premier thread + de travail disponible, lorsqu'un vnement sera gnr pour le socket + (par exemple, "il est maintenant possible d'crire dans le socket"). + Veuillez vous reporter la section propos des limitations pour + plus de dtails. +
    + +
    Keep-alive
    +
    La gestion des connexions persistantes constitue la principale + amlioration par rapport au MPM Worker. Lorsqu'un thread de travail + a termin l'envoi d'une rponse un client, il peut restituer la + gestion du socket au thread d'coute, qui son tour va attendre un + vnement en provenance du systme d'exploitation comme "le socket + est lisible". Si une nouvelle requte arrive en provenance du + client, le thread d'coute l'attribuera au premier thread de travail + disponible. Inversement, si le dlai KeepAliveTimeout est atteint, le socket + sera ferm par le thread d'coute. Les threads de travail n'ont + donc plus s'occuper des sockets inactifs et ils peuvent tre + rutiliss pour traiter d'autres requtes.
    + +
    Closing
    +
    Parfois, le MPM doit effectuer une fermeture progressive, c'est + dire envoyer au client une erreur survenue prcdemment alors que + ce dernier est en train de transmettre des donnes httpd. Envoyer la rponse et + fermer immdiatement la connexion n'est pas une bonne solution car + le client (qui est encore en train d'envoyer le reste de la requte) + verrait sa connexion rinitialise et ne pourrait pas lire la + rponse de httpd. Si cela se produit, httpd essaie donc de lire le + reste de la requte afin de permettre au client de lire la rponse + entirement. La fermeture progressive est limite dans le temps, + mais elle peut tout de mme tre assez longue, si bien qu'il est + intressant qu'un thread de travail puisse se dcharger de cette + tche sur le thread d'coute.
    +
    + +

    Ces amliorations sont disponible pour les connexions HTTP ou HTTPS.

    + + + +

    Arrt de processus en douceur et + utilisation du scoreboard

    +

    Ce MPM prsentait dans le pass des limitations de monte en + puissance qui + provoquaient l'erreur suivante : "scoreboard is full, not at + MaxRequestWorkers". La directive MaxRequestWorkers permet de limiter le + nombre de requtes pouvant tre servies simultanment un moment donn + ainsi que le nombre de processus autoriss (MaxRequestWorkers / ThreadsPerChild), alors que le + scoreboard reprsente l'ensemble des processus en cours d'excution et + l'tat de leurs threads de travail. Si le scoreboard est plein + (autrement dit si aucun des threads n'est dans un tat inactif) et si le + nombre de requtes actives servies est infrieur MaxRequestWorkers, cela signifie que + certains d'entre eux bloquent les nouvelles requtes qui pourraient tre + servies et sont en l'occurrence mises en attente (dans la limite de la + valeur impose par la directive ListenBacklog). La plupart du temps, ces + threads sont bloqus dans un tat d'arrt en douceur car ils attendent + de terminer leur travail sur une connexion TCP pour s'arrter et ainsi librer + une entre dans le scoreboard (par exemple dans le cas du traitement des + requtes de longue dure, des clients lents ou des connexions en + keep-alive). Voici deux scnarios courants :

    +
      +
    • Pendant un graceful + restart. Le processus parent demande tous ses processus + enfants de terminer leur travail et de s'arrter pendant qu'il + recharge la configuration et lance de nouveaux processus. Si les + processus existants continuent de s'excuter pendant un certain + temps avant de s'arrter, le scoreboard sera partiellement occup + jusqu' ce que les entres correspondantes soient libres. +
    • +
    • Lorsque la charge du serveur diminue suffisamment pour que httpd + commence stopper certains processus (par exemple pour respecter la + valeur de la directive MaxSpareThreads). Cette situation + est problmatique car lorsque la charge augmente nouveau, httpd va + essayer de lancer de nouveaux processus. Si cette situation se + rpte, le nombre de processus peut augmenter sensiblement, + aboutissant un mlange d'anciens processus tentant de s'arrter et + de nouveaux processus tentant d'effectuer un travail quelconque. +
    • +
    +

    A partir de la version 2.4.24, mpm-event est plus intelligent et peut + traiter les arrts graceful de manire plus efficace. Voici certaines de + ces amliorations :

    +
      +
    • Utilisation de toutes les entres du scoreboard dans la limite + de la valeur dfinie par ServerLimit. Les directives + MaxRequestWorkers et + ThreadsPerChild + permettent de limiter le nombre de processus actifs, alors que la + directive ServerLimit + prend aussi en compte les proccessus en arrt graceful pour + permettre l'utilisation d'entres supplmentaires du scoreboard en + cas de besoin. L'ide consiste utiliser ServerLimit pour indiquer httpd + conbien de processus supplmentaires seront tolrs avant + d'atteindre les limites imposes par les ressources du systme. +
    • +
    • Les processus en arrt graceful doivent fermer leurs connexions + en keep-alive.
    • +
    • Lors d'un arrt graceful, s'il y a plus de threads de travail en + cours d'excution que de connexions ouvertes pour un processus + donn, ces threads sont arrts afin de librer les ressources plus + vite (ce qui peut s'avrer ncessaire pour lancer de nouveaux + processus).
    • +
    • Si le scoreboard est plein, empche d'arrter d'autres processus + en mode graceful afin de rduire la charge jusqu' ce que tous les + anciens processus soient arrts (sinon la situation empirerait lors + d'une remonte en charge).
    • +
    +

    Le comportement dcrit dans le dernier point est bien visible via + mod_status dans la table des connexions avec les deux + nouvelles colonnes "Slot" et "Stopping". La premire indique le PID et + la seconde si le processus est en cours d'arrt ou non ; l'tat + supplmentaire "Yes (old gen)" indique un processus encore en excution + aprs un redmarrage graceful.

    + + +

    Limitations

    +

    La gestion amliore des connexions peut ne pas fonctionner pour + certains filtres de connexion qui se sont dclars eux-mmes + incompatibles avec le MPM Event. Dans ce cas, le MPM Event radoptera le + comportement du MPM worker et rservera un thread de + travail par connexion. Notez que tous les modules inclus dans la + distribution du serveur httpd sont compatibles avec le MPM Event.

    + +

    Une restriction similaire apparat lorsqu'une requte utilise un + filtre en sortie qui doit pouvoir lire et/ou modifier la totalit du + corps de la rponse. Si la connexion avec le client se bloque pendant + que le filtre traite les donnes, et si la quantit de donnes produites + par le filtre est trop importante pour tre stocke en mmoire, le + thread utilis pour la requte n'est pas libr pendant que httpd attend + que les donnes soient transmises au client.
    + Pour illustrer ce cas de figure, nous pouvons envisager les deux + situations suivantes : servir une ressource statique (comme un fichier + CSS) ou servir un contenu issu d'un programme FCGI/CGI ou d'un serveur + mandat. La premire situation est prvisible ; en effet, le MPM Event a + une parfaite visibilit sur la fin du contenu, et il peut utiliser les + vnements : le thread de travail qui sert la rponse peut envoyer les + premiers octets jusqu' ce que EWOULDBLOCK ou + EAGAIN soit renvoy, et dlguer le reste de la rponse au thread + d'coute. Ce dernier en retour attend un vnement sur le socket, et + dlgue le reste de la rponse au premier + thread de travail disponible. Dans la deuxime situation par contre + (FCGI/CGI/contenu mandat), le MPM n'a pas de visibilit sur la fin de + la rponse, et le thread de travail doit terminer sa tche avant de + rendre le contrle au thread d'coute. La seule solution consisterait + alors stocker la rponse en mmoire, mais ce ne serait pas l'option la + plus sure en matire de stabilit du serveur et d'empreinte mmoire. +

    + + +

    Matriel d'arrire-plan

    +

    Le modle event a t rendu possible par l'introduction de nouvelles + APIs dans les systmes d'exploitation supports :

    +
      +
    • epoll (Linux)
    • +
    • kqueue (BSD)
    • +
    • event ports (Solaris)
    • +
    +

    Avant que ces APIs soient mises disposition, les APIs + traditionnelles select et poll devaient tre + utilises. Ces APIs deviennent lentes si on les utilise pour grer de + nombreuses connexions ou si le jeu de connexions possde un taux de + renouvellement lev. Les nouvelles APIs permettent de grer beaucoup + plus de connexions et leur performances sont meilleures lorsque le jeu + de connexions grer change frquemment. Ces APIs ont donc rendu + possible l'criture le MPM Event qui est mieux adapt la situation + HTTP typique o de nombreuses connexions sont inactives.

    + +

    Le MPM Event suppose que l'implmentation de apr_pollset + sous-jacente est raisonnablement sure avec l'utilisation des threads + (threadsafe). Ceci vite au MPM de devoir effectuer trop verrouillages + de haut niveau, ou d'avoir rveiller le thread d'coute pour lui + envoyer un socket keep-alive. Ceci n'est possible qu'avec KQueue et + EPoll.

    + + +
    top

    Prrequis

    @@ -146,7 +350,7 @@ mobiliser des threads que pour les connexions en cours de traitement
    top
    -

    AsyncRequestWorkerFactor Directive

    +

    Directive AsyncRequestWorkerFactor

    @@ -158,24 +362,29 @@ mobiliser des threads que pour les connexions en cours de traitement
    Description:Limite le nombre de connexions simultanes par thread
    Syntaxe:AsyncRequestWorkerFactor facteur

    Le MPM event gre certaines connexions de manire asynchrone ; dans ce cas, les threads traitant la requte sont allous selon les - besoins et pour de courtes priodes. Dans les autres cas (la plupart - du temps pour les connexions SSL), un thread est rserv par + besoins et pour de courtes priodes. Dans les autres cas, un + thread est rserv par connexion. Ceci peut conduire des situations o tous les threads sont saturs et o aucun thread n'est capable d'effectuer de nouvelles tches pour les connexions asynchrones tablies.

    Pour minimiser les effets de ce problme, le MPM event utilise - deux mthodes : tout d'abord, il limite le nombre de connexions - simultanes par thread en fonction du nombre de processus - inactifs. Ensuite, si tous les processus sont occups, il ferme des - connexions permanentes, mme si la limite de dure de la connexion - n'a pas t atteinte. Ceci autorise les clients concerns se - reconnecter un autre processus possdant encore des threads - disponibles.

    + deux mthodes :

    +
      +
    • il limite le nombre de connexions + simultanes par thread en fonction du nombre de processus + inactifs;
    • +
    • si tous les processus sont occups, il ferme des connexions + permanentes, mme si la limite de dure de la connexion n'a + pas t atteinte. Ceci autorise les clients + concerns se reconnecter un autre processus + possdant encore des threads disponibles.
    • +

    Cette directive permet de personnaliser finement la limite du - nombre de connexions par thread. Un processus n'acceptera de - nouvelles connexions que si le nombre actuel de connexions est + nombre de connexions par thread. Un processus n'acceptera de + nouvelles connexions que si le nombre actuel de connexions (sans + compter les connexions l'tat "closing") est infrieur :

    @@ -184,14 +393,70 @@ mobiliser des threads que pour les connexions en cours de traitement nombre de threads inactifs)

    -

    En d'autres termes, le nombre maximum de connexions simultanes - sera :

    +

    Il est possible d'effectuer une estimation du nombre maximum de + connexions simultanes pour tous les processus et pour un nombre donn moyen + de threads de travail inactifs comme suit : +

    + + +

    + (ThreadsPerChild + + (AsyncRequestWorkerFactor * + number of idle workers)) * + ServerLimit +

    + +

    Exemple

    +
    ThreadsPerChild = 10
    +ServerLimit = 4
    +AsyncRequestWorkerFactor = 2
    +MaxRequestWorkers = 40
    +
    +idle_workers = 4 (moyenne pour tous les processus pour faire simple)
    +
    +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit 
    +                = (10 + (2 * 4)) * 4 = 72
    + +
    + +

    Lorsque tous les threads de travail sont inactifs, le nombre maximum + absolu de connexions simultanes peut tre calcul de manire plus simple :

    (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers

    +

    Exemple

    +
    ThreadsPerChild = 10 
    +ServerLimit = 4
    +MaxRequestWorkers = 40
    +AsyncRequestWorkerFactor = 2
    + + +

    Si tous les threads de tous les processus sont inactifs, alors :

    + +
    idle_workers = 10
    + + +

    Nous pouvons calculer le nombre maximum absolu de connexions simultanes + de deux manires :

    + +
    max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit 
    +                = (10 + (2 * 10)) * 4 = 120
    +    
    +max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers 
    +                = (2 + 1) * 40 = 120
    + +
    + +

    Le rglage de la directive + AsyncRequestWorkerFactor ncessite de connatre le + trafic gr par httpd pour chaque style d'utilisation spcifique ; si vous + modifiez la valeur par dfaut, vous devrez par consquent effectuer des + tests approfondis en vous appuyant troitement sur les donnes fournies par + mod_status.

    +

    La directive MaxRequestWorkers se nommait MaxClients avant la version 2.3.13. La valeur ci-dessus montre que cet ancien nom ne correspondait pas sa @@ -206,7 +471,28 @@ mobiliser des threads que pour les connexions en cours de traitement

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/event.xml b/docs/manual/mod/event.xml index fc6154bd28b..9e9b7cd28c2 100644 --- a/docs/manual/mod/event.xml +++ b/docs/manual/mod/event.xml @@ -31,12 +31,8 @@ of consuming threads only for connections with active processing

    The event Multi-Processing Module (MPM) is designed to allow more requests to be served simultaneously by - passing off some processing work to supporting threads, freeing up - the main threads to work on new requests. It is based on the - worker MPM, which implements a hybrid - multi-process multi-threaded server. Run-time configuration - directives are identical to those provided by - worker.

    + passing off some processing work to the listeners threads, freeing up + the worker threads to serve new requests.

    To use the event MPM, add --with-mpm=event to the configure @@ -46,32 +42,182 @@ of consuming threads only for connections with active processing The worker MPM +

    Relationship with the Worker MPM +

    event is based on the worker MPM, which implements a hybrid +multi-process multi-threaded server. A single control process (the parent) is responsible for launching +child processes. Each child process creates a fixed number of server +threads as specified in the ThreadsPerChild directive, as well +as a listener thread which listens for connections and passes them to a worker thread for processing when they arrive.

    + +

    Run-time configuration directives are identical to those provided by worker, with the only addition +of the AsyncRequestWorkerFactor.

    + +
    +
    How it Works

    This MPM tries to fix the 'keep alive problem' in HTTP. After a client - completes the first request, the client can keep the connection - open, and send further requests using the same socket. This can - save signifigant overhead in creating TCP connections. However, - Apache HTTP Server traditionally keeps an entire child process/thread waiting - for data from the client, which brings its own disadvantages. To - solve this problem, this MPM uses a dedicated thread to handle both - the Listening sockets, all sockets that are in a Keep Alive state, - and sockets where the handler and protocol filters have done their work - and the only remaining thing to do is send the data to the client. The - status page of mod_status shows how many connections are - in the mentioned states.

    - -

    The improved connection handling does not yet work for certain - connection filters, in particular SSL. For SSL connections, this MPM will - fall back to the behaviour of the worker MPM and - reserve one worker thread per connection.

    - -

    The MPM assumes that the underlying apr_pollset - implementation is reasonably threadsafe. This enables the MPM to - avoid excessive high level locking, or having to wake up the listener - thread in order to send it a keep-alive socket. This is currently - only compatible with KQueue and EPoll.

    + completes the first request, it can keep the connection + open, sending further requests using the same socket and saving + significant overhead in creating TCP connections. However, + Apache HTTP Server traditionally keeps an entire child + process/thread waiting for data from the client, which brings its own disadvantages. + To solve this problem, this MPM uses a dedicated listener thread for each process + to handle both the Listening sockets, all sockets that are in a Keep Alive state, + sockets where the handler and protocol filters have done their work + and the ones where the only remaining thing to do is send the data to the client. +

    + +

    This new architecture, leveraging non-blocking sockets and modern kernel + features exposed by APR (like Linux's epoll), + no longer requires the mpm-accept Mutex + configured to avoid the thundering herd problem.

    + +

    The total amount of connections that a single process/threads block can handle is regulated + by the AsyncRequestWorkerFactor directive.

    + +
    Async connections +

    Async connections would need a fixed dedicated worker thread with the previous MPMs but not with event. + The status page of mod_status shows new columns under the Async connections section:

    +
    +
    Writing
    +
    While sending the response to the client, it might happen that the TCP write buffer fills up because the connection is too slow. Usually in this case a write() to the socket returns EWOULDBLOCK or EAGAIN, to become writable again after an idle time. The worker holding the socket might be able to offload the waiting task to the listener thread, that in turn will re-assign it to the first idle worker thread available once an event will be raised for the socket (for example, "the socket is now writable"). Please check the Limitations section for more information. +
    + +
    Keep-alive
    +
    Keep Alive handling is the most basic improvement from the worker MPM. + Once a worker thread finishes to flush the response to the client, it can offload the + socket handling to the listener thread, that in turns will wait for any event from the + OS, like "the socket is readable". If any new request comes from the client, then the + listener will forward it to the first worker thread available. Conversely, if the + KeepAliveTimeout occurs then the socket will be + closed by the listener. In this way the worker threads are not responsible for idle + sockets and they can be re-used to serve other requests.
    + +
    Closing
    +
    Sometimes the MPM needs to perform a lingering close, namely sending back an early error to the client while it is still transmitting data to httpd. Sending the response and then closing the connection immediately is not the correct thing to do since the client (still trying to send the rest of the request) would get a connection reset and could not read the httpd's response. So in such cases, httpd tries to read the rest of the request to allow the client to consume the response. The lingering close is time bounded but it can take relatively long time, so a worker thread can offload this work to the listener.
    +
    + +

    These improvements are valid for both HTTP/HTTPS connections.

    + +
    + +
    Graceful process termination and Scoreboard usage +

    This mpm showed some scalability bottlenecks in the past leading to the following + error: "scoreboard is full, not at MaxRequestWorkers". + MaxRequestWorkers + limits the number of simultaneous requests that will be served at any given time + and also the number of allowed processes + (MaxRequestWorkers + / ThreadsPerChild), meanwhile + the Scoreboard is a representation of all the running processes and + the status of their worker threads. If the scoreboard is full (so all the + threads have a state that is not idle) but the number of active requests + served is not MaxRequestWorkers, + it means that some of them are blocking new requests that could be served + but that are queued instead (up to the limit imposed by + ListenBacklog). Most of the times + the threads are stuck in the Graceful state, namely they are waiting to + finish their work with a TCP connection to safely terminate and free up a + scoreboard slot (for example handling long running requests, slow clients + or connections with keep-alive enabled). Two scenarios are very common:

    +
      +
    • During a graceful restart. + The parent process signals all its children to complete + their work and terminate, while it reloads the config and forks new + processes. If the old children keep running for a while before stopping, + the scoreboard will be partially occupied until their slots are freed. +
    • +
    • When the server load goes down in a way that causes httpd to + stop some processes (for example due to + MaxSpareThreads). + This is particularly problematic because when the load increases again, + httpd will try to start new processes. + If the pattern repeats, the number of processes can rise quite a bit, + ending up in a mixture of old processes trying to stop and new ones + trying to do some work. +
    • +
    +

    From 2.4.24 onward, mpm-event is smarter and it is able to handle + graceful terminations in a much better way. Some of the improvements are:

    +
      +
    • Allow the use of all the scoreboard slots up to + ServerLimit. + MaxRequestWorkers and + ThreadsPerChild are used + to limit the amount of active processes, meanwhile + ServerLimit + takes also into account the ones doing a graceful + close to allow extra slots when needed. The idea is to use + ServerLimit to instruct httpd + about how many overall processes are tolerated before impacting + the system resources. +
    • +
    • Force gracefully finishing processes to close their + connections in keep-alive state.
    • +
    • During graceful shutdown, if there are more running worker threads + than open connections for a given process, terminate these threads to + free resources faster (which may be needed for new processes).
    • +
    • If the scoreboard is full, prevent more processes to finish + gracefully due to reduced load until old processes have terminated + (otherwise the situation would get worse once the load increases again).
    • +
    +

    The behavior described in the last point is completely observable via + mod_status in the connection summary table through two new + columns: "Slot" and "Stopping". The former indicates the PID and + the latter if the process is stopping or not; the extra state "Yes (old gen)" + indicates a process still running after a graceful restart.

    +
    + +
    Limitations +

    The improved connection handling may not work for certain connection + filters that have declared themselves as incompatible with event. In these + cases, this MPM will fall back to the behavior of the + worker MPM and reserve one worker thread per connection. + All modules shipped with the server are compatible with the event MPM.

    + +

    A similar restriction is currently present for requests involving an + output filter that needs to read and/or modify the whole response body. + If the connection to the client blocks while the filter is processing the + data, and the amount of data produced by the filter is too big to be + buffered in memory, the thread used for the request is not freed while + httpd waits until the pending data is sent to the client.
    + To illustrate this point we can think about the following two situations: + serving a static asset (like a CSS file) versus serving content retrieved from + FCGI/CGI or a proxied server. The former is predictable, namely the event MPM + has full visibility on the end of the content and it can use events: the worker + thread serving the response content can flush the first bytes until EWOULDBLOCK + or EAGAIN is returned, delegating the rest to the listener. This one in turn + waits for an event on the socket, and delegates the work to flush the rest of the content + to the first idle worker thread. Meanwhile in the latter example (FCGI/CGI/proxied content) + the MPM can't predict the end of the response and a worker thread has to finish its work + before returning the control to the listener. The only alternative is to buffer the + response in memory, but it wouldn't be the safest option for the sake of the + server's stability and memory footprint. +

    + +
    + +
    Background material +

    The event model was made possible by the introduction of new APIs into the supported operating systems:

    +
      +
    • epoll (Linux)
    • +
    • kqueue (BSD)
    • +
    • event ports (Solaris)
    • +
    +

    Before these new APIs where made available, the traditional select and poll APIs had to be used. + Those APIs get slow if used to handle many connections or if the set of connections rate of change is high. + The new APIs allow to monitor much more connections and they perform way better when the set of connections to monitor changes frequently. So these APIs made it possible to write the event MPM, that scales much better with the typical HTTP pattern of many idle connections.

    + +

    The MPM assumes that the underlying apr_pollset + implementation is reasonably threadsafe. This enables the MPM to + avoid excessive high level locking, or having to wake up the listener + thread in order to send it a keep-alive socket. This is currently + only compatible with KQueue and EPoll.

    + +
    +
    Requirements

    This MPM depends on APR's atomic compare-and-swap operations for thread synchronization. If you are @@ -106,7 +252,7 @@ of consuming threads only for connections with active processing EnableExceptionHook -Group +Group Listen @@ -138,7 +284,7 @@ of consuming threads only for connections with active processing ThreadStackSize -User +User @@ -152,21 +298,25 @@ of consuming threads only for connections with active processing

    The event MPM handles some connections in an asynchronous way, where request worker threads are only allocated for short periods of time as - needed, and other (mostly SSL) connections with one request worker thread - reserved per connection. This can lead to situations where all workers are - tied up and no worker thread is available to handle new work on established - async connetions.

    - -

    To mitigate this problem, the event MPM does two things: Firstly, it - limits the number of connections accepted per process, depending on the - number of idle request workers. Secondly, if all workers are busy, it will - close connections in keep-alive state even if the keep-alive timeout has - not expired. This allows the respective clients to reconnect to a - different process which may still have worker threads available.

    + needed, and other connections with one request worker thread reserved per + connection. This can lead to situations where all workers are tied up and + no worker thread is available to handle new work on established async + connections.

    + +

    To mitigate this problem, the event MPM does two things:

    +
      +
    • it limits the number of connections accepted per process, depending on the + number of idle request workers;
    • +
    • if all workers are busy, it will + close connections in keep-alive state even if the keep-alive timeout has + not expired. This allows the respective clients to reconnect to a + different process which may still have worker threads available.
    • +

    This directive can be used to fine-tune the per-process connection - limit. A process will only accept new connections if the current number of - connections is lower than:

    + limit. A process will only accept new connections if the current number of + connections (not counting connections in the "closing" state) is lower + than:

    ThreadsPerChild + @@ -174,13 +324,72 @@ of consuming threads only for connections with active processing number of idle workers)

    -

    This means the absolute maximum numbers of concurrent connections is:

    +

    An estimation of the maximum concurrent connections across all the processes given + an average value of idle worker threads can be calculated with: +

    + + +

    + (ThreadsPerChild + + (AsyncRequestWorkerFactor * + number of idle workers)) * + ServerLimit +

    + + Example + + +ThreadsPerChild = 10 +ServerLimit = 4 +AsyncRequestWorkerFactor = 2 +MaxRequestWorkers = 40 + +idle_workers = 4 (average for all the processes to keep it simple) + +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit + = (10 + (2 * 4)) * 4 = 72 + + + + +

    When all the worker threads are idle, then absolute maximum numbers of concurrent + connections can be calculared in a simpler way:

    (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers

    + + Example + + +ThreadsPerChild = 10 +ServerLimit = 4 +MaxRequestWorkers = 40 +AsyncRequestWorkerFactor = 2 + + + +

    If all the processes have all threads idle then:

    + + idle_workers = 10 + +

    We can calculate the absolute maximum numbers of concurrent connections in two ways:

    + + + +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit + = (10 + (2 * 10)) * 4 = 120 + +max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers + = (2 + 1) * 40 = 120 + + +
    + +

    Tuning AsyncRequestWorkerFactor requires knowledge about the traffic handled by httpd in each specific use case, so changing the default value requires extensive testing and data gathering from mod_status.

    +

    MaxRequestWorkers was called MaxClients prior to version 2.3.13. The above value shows that the old name did not accurately describe its meaning for the event MPM.

    diff --git a/docs/manual/mod/event.xml.fr b/docs/manual/mod/event.xml.fr index c0fec614050..95e591ab63d 100644 --- a/docs/manual/mod/event.xml.fr +++ b/docs/manual/mod/event.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -24,22 +24,18 @@ event -Une variante du MPM worker conçue pour ne +Une variante du MPM worker conçue pour ne mobiliser des threads que pour les connexions en cours de traitement MPM event.c mpm_event_module -

    Le module multi-processus (MPM) event est conçu - pour permettre le traitement d'un nombre accru de requêtes - simultanées en déléguant certaines tâches à des threads de support, - libérant par là-même le thread principal et lui permettant de - traiter les nouvelles requêtes. Il s'inspire du MPM - worker qui implémente un serveur hybride - multi-processus/multi-threads. Les directives de configuration à - l'exécution sont identiques à celles du MPM - worker.

    +

    Le module multi-processus (MPM) event est conçu + pour permettre le traitement d'un nombre accru de requêtes + simultanées en déléguant certaines tâches + aux threads d'écoute, libérant par là-même les + threads de travail et leur permettant de traiter les nouvelles requêtes.

    Pour utiliser le MPM event, ajoutez --with-mpm=event aux arguments du script @@ -50,66 +46,278 @@ mobiliser des threads que pour les connexions en cours de traitementLe MPM worker +

    Relations avec le MPM Worker +

    Le MPM event s'inspire du MPM worker qui +implémente un serveur hybride multi-processus et multi-threads. Un processus de +contrôle unique (le parent) est chargé de lancer des processus enfants. Chaque +processus enfant crée un nombre de threads serveurs défini via la directive +ThreadsPerChild, ainsi qu'un thread +d'écoute qui surveille les requêtes entrantes et les distribue aux threads de +travail pour traitement au fur et à mesure de leur arrivée.

    + +

    Les directives de configuration à l'exécution sont identiques à celles que +propose le MPM worker, avec l'unique addition de la directive +AsyncRequestWorkerFactor.

    + +
    +
    Comment tout cela fonctionne -

    Ce MPM essaie de résoudre le 'problème keep alive' de HTTP. - Lorsqu'un client a soumis une première requête, il peut garder la - connexion ouverte, et envoyer les requêtes suivantes en utilisant le - même socket. Ceci permet de réduire de manière significative la - surcharge due à la création de connexions TCP. - Cependant, le serveur HTTP Apache - mobilise en principe à cet effet un processus/thread enfant en - attente des données du client, ce qui amène son propre lot - d'inconvénients. Pour résoudre ce problème, event - utilise un thread dédié qui gère les sockets en - écoute, tous les sockets en état Keep Alive, et les - sockets où les filtres gestionnaires et de protocole ont - fait leur travail et pour lesquels la seule chose restant à faire - consiste à envoyer les données au client. La page d'état de - mod_status montre les connexions qui se trouvent - dans les situations mentionnées.

    - -

    Le gestionnaire de connexion amélioré ne fonctionne pas encore - pour certains filtres de connexion, et en particulier SSL. Pour les - connexions SSL, ce MPM réadopte le comportement du MPM - worker et réserve un thread par connexion.

    - -

    Le MPM présuppose que l'implémentation apr_pollset - sous-jacente est raisonnablement sûre du point de vue des threads. - Ceci permet au MPM d'éviter un verrouillage de haut niveau excessif, - ou de devoir activer le thread en écoute afin de lui envoyer un - socket keep alive. Tout ceci n'est actuellement compatible qu'avec - KQueue et EPoll.

    + +

    Ce module MPM tente de résoudre le "problème keep + alive" de HTTP. Lorsqu'un client a effectué une première requête, il peut + garder la connexion ouverte et envoyer les requêtes suivante en utilisant le + même socket, ce qui diminue considérablement la charge qui aurait été + induite par la création de nouvelles connexions TCP. Cependant, le + fonctionnement du serveur HTTP Apache impose de réserver un couple processus + enfant/thread pour attendre les données en provenance du client, ce qui + présente certains inconvénients. + Pour résoudre ce problème, le MPM Event utilise un thread d'écoute dédié + pour chaque processus pour gérer les sockets d'écoute, tous les sockets qui + sont dans un état de connexion persistante, les sockets où les + filtres de gestionnaire et de protocole ont fait leur travail, et ceux pour + lesquels la seule chose restant à faire est l'envoi des données au client. +

    + +

    Cette nouvelle architecture, en exploitant les sockets non blocants et + les fonctionnalités des noyaux modernes mis en valeur par + APR (comme epoll de Linux), n'a plus besoin du + Mutex mpm-accept pour + éviter le problème de "thundering herd".

    + +

    La directive AsyncRequestWorkerFactor permet de + définir le nombre total de connexions qu'un bloc processus/thread peut + gérer.

    + +
    Connexions asynchrones +

    Avec les MPM précédents, les connexions asynchrones nécessitaient + un thread de travail dédié, mais ce n'est plus le cas avec le MPM Event. + La page d'état de mod_status montre de nouvelles + colonnes dans la section "Async connections" :

    +
    +
    Writing
    +
    Lors de l'envoi de la réponse au client, il peut arriver que le + tampon d'écriture TCP soit plein si la connexion est trop lente. Si + cela se produit, une instruction write() vers le socket + renvoie en général EWOULDBLOCK ou EAGAIN + pour que l'on puisse y écrire à nouveau après un certain temps + d'inactivité. Le thread de travail qui utilise le socket doit alors + être en mesure de récupérer la tâche en attente et la restituer au + thread d'écoute qui, à son tour, la réattribuera au premier thread + de travail disponible, lorsqu'un évènement sera généré pour le socket + (par exemple, "il est maintenant possible d'écrire dans le socket"). + Veuillez vous reporter à la section à propos des limitations pour + plus de détails. +
    + +
    Keep-alive
    +
    La gestion des connexions persistantes constitue la principale + amélioration par rapport au MPM Worker. Lorsqu'un thread de travail + a terminé l'envoi d'une réponse à un client, il peut restituer la + gestion du socket au thread d'écoute, qui à son tour va attendre un + évènement en provenance du système d'exploitation comme "le socket + est lisible". Si une nouvelle requête arrive en provenance du + client, le thread d'écoute l'attribuera au premier thread de travail + disponible. Inversement, si le délai KeepAliveTimeout est atteint, le socket + sera fermé par le thread d'écoute. Les threads de travail n'ont + donc plus à s'occuper des sockets inactifs et ils peuvent être + réutilisés pour traiter d'autres requêtes.
    + +
    Closing
    +
    Parfois, le MPM doit effectuer une fermeture progressive, c'est + à dire envoyer au client une erreur survenue précédemment alors que + ce dernier est en train de transmettre des données à httpd. Envoyer la réponse et + fermer immédiatement la connexion n'est pas une bonne solution car + le client (qui est encore en train d'envoyer le reste de la requête) + verrait sa connexion réinitialisée et ne pourrait pas lire la + réponse de httpd. Si cela se produit, httpd essaie donc de lire le + reste de la requête afin de permettre au client de lire la réponse + entièrement. La fermeture progressive est limitée dans le temps, + mais elle peut tout de même être assez longue, si bien qu'il est + intéressant qu'un thread de travail puisse se décharger de cette + tâche sur le thread d'écoute.
    +
    +

    Ces améliorations sont disponible pour les connexions HTTP ou HTTPS.

    + +
    + +
    Arrêt de processus en douceur et + utilisation du scoreboard +

    Ce MPM présentait dans le passé des limitations de montée en + puissance qui + provoquaient l'erreur suivante : "scoreboard is full, not at + MaxRequestWorkers". La directive MaxRequestWorkers permet de limiter le + nombre de requêtes pouvant être servies simultanément à un moment donné + ainsi que le nombre de processus autorisés (MaxRequestWorkers / ThreadsPerChild), alors que le + scoreboard représente l'ensemble des processus en cours d'exécution et + l'état de leurs threads de travail. Si le scoreboard est plein + (autrement dit si aucun des threads n'est dans un état inactif) et si le + nombre de requêtes actives servies est inférieur à MaxRequestWorkers, cela signifie que + certains d'entre eux bloquent les nouvelles requêtes qui pourraient être + servies et sont en l'occurrence mises en attente (dans la limite de la + valeur imposée par la directive ListenBacklog). La plupart du temps, ces + threads sont bloqués dans un état d'arrêt en douceur car ils attendent + de terminer leur travail sur une connexion TCP pour s'arrêter et ainsi libérer + une entrée dans le scoreboard (par exemple dans le cas du traitement des + requêtes de longue durée, des clients lents ou des connexions en + keep-alive). Voici deux scénarios courants :

    +
      +
    • Pendant un graceful + restart. Le processus parent demande à tous ses processus + enfants de terminer leur travail et de s'arrêter pendant qu'il + recharge la configuration et lance de nouveaux processus. Si les + processus existants continuent de s'exécuter pendant un certain + temps avant de s'arrêter, le scoreboard sera partiellement occupé + jusqu'à ce que les entrées correspondantes soient libérées. +
    • +
    • Lorsque la charge du serveur diminue suffisamment pour que httpd + commence à stopper certains processus (par exemple pour respecter la + valeur de la directive MaxSpareThreads). Cette situation + est problèmatique car lorsque la charge augmente à nouveau, httpd va + essayer de lancer de nouveaux processus. Si cette situation se + répète, le nombre de processus peut augmenter sensiblement, + aboutissant à un mélange d'anciens processus tentant de s'arrêter et + de nouveaux processus tentant d'effectuer un travail quelconque. +
    • +
    +

    A partir de la version 2.4.24, mpm-event est plus intelligent et peut + traiter les arrêts graceful de manière plus efficace. Voici certaines de + ces améliorations :

    +
      +
    • Utilisation de toutes les entrées du scoreboard dans la limite + de la valeur définie par ServerLimit. Les directives + MaxRequestWorkers et + ThreadsPerChild + permettent de limiter le nombre de processus actifs, alors que la + directive ServerLimit + prend aussi en compte les proccessus en arrêt graceful pour + permettre l'utilisation d'entrées supplémentaires du scoreboard en + cas de besoin. L'idée consiste à utiliser ServerLimit pour indiquer à httpd + conbien de processus supplémentaires seront tolérés avant + d'atteindre les limites imposées par les ressources du système. +
    • +
    • Les processus en arrêt graceful doivent fermer leurs connexions + en keep-alive.
    • +
    • Lors d'un arrêt graceful, s'il y a plus de threads de travail en + cours d'exécution que de connexions ouvertes pour un processus + donné, ces threads sont arrêtés afin de libérer les ressources plus + vite (ce qui peut s'avérer nécessaire pour lancer de nouveaux + processus).
    • +
    • Si le scoreboard est plein, empêche d'arrêter d'autres processus + en mode graceful afin de réduire la charge jusqu'à ce que tous les + anciens processus soient arrêtés (sinon la situation empirerait lors + d'une remontée en charge).
    • +
    +

    Le comportement décrit dans le dernier point est bien visible via + mod_status dans la table des connexions avec les deux + nouvelles colonnes "Slot" et "Stopping". La première indique le PID et + la seconde si le processus est en cours d'arrêt ou non ; l'état + supplémentaire "Yes (old gen)" indique un processus encore en exécution + après un redémarrage graceful.

    +
    + +
    Limitations +

    La gestion améliorée des connexions peut ne pas fonctionner pour + certains filtres de connexion qui se sont déclarés eux-mêmes + incompatibles avec le MPM Event. Dans ce cas, le MPM Event réadoptera le + comportement du MPM worker et réservera un thread de + travail par connexion. Notez que tous les modules inclus dans la + distribution du serveur httpd sont compatibles avec le MPM Event.

    + +

    Une restriction similaire apparaît lorsqu'une requête utilise un + filtre en sortie qui doit pouvoir lire et/ou modifier la totalité du + corps de la réponse. Si la connexion avec le client se bloque pendant + que le filtre traite les données, et si la quantité de données produites + par le filtre est trop importante pour être stockée en mémoire, le + thread utilisé pour la requête n'est pas libéré pendant que httpd attend + que les données soient transmises au client.
    + Pour illustrer ce cas de figure, nous pouvons envisager les deux + situations suivantes : servir une ressource statique (comme un fichier + CSS) ou servir un contenu issu d'un programme FCGI/CGI ou d'un serveur + mandaté. La première situation est prévisible ; en effet, le MPM Event a + une parfaite visibilité sur la fin du contenu, et il peut utiliser les + évènements : le thread de travail qui sert la réponse peut envoyer les + premiers octets jusqu'à ce que EWOULDBLOCK ou + EAGAIN soit renvoyé, et déléguer le reste de la réponse au thread + d'écoute. Ce dernier en retour attend un évènement sur le socket, et + délègue le reste de la réponse au premier + thread de travail disponible. Dans la deuxième situation par contre + (FCGI/CGI/contenu mandaté), le MPM n'a pas de visibilité sur la fin de + la réponse, et le thread de travail doit terminer sa tâche avant de + rendre le contrôle au thread d'écoute. La seule solution consisterait + alors à stocker la réponse en mémoire, mais ce ne serait pas l'option la + plus sure en matière de stabilité du serveur et d'empreinte mémoire. +

    + +
    + +
    Matériel d'arrière-plan +

    Le modèle event a été rendu possible par l'introduction de nouvelles + APIs dans les systèmes d'exploitation supportés :

    +
      +
    • epoll (Linux)
    • +
    • kqueue (BSD)
    • +
    • event ports (Solaris)
    • +
    +

    Avant que ces APIs soient mises à disposition, les APIs + traditionnelles select et poll devaient être + utilisées. Ces APIs deviennent lentes si on les utilise pour gérer de + nombreuses connexions ou si le jeu de connexions possède un taux de + renouvellement élevé. Les nouvelles APIs permettent de gérer beaucoup + plus de connexions et leur performances sont meilleures lorsque le jeu + de connexions à gérer change fréquemment. Ces APIs ont donc rendu + possible l'écriture le MPM Event qui est mieux adapté à la situation + HTTP typique où de nombreuses connexions sont inactives.

    + +

    Le MPM Event suppose que l'implémentation de apr_pollset + sous-jacente est raisonnablement sure avec l'utilisation des threads + (threadsafe). Ceci évite au MPM de devoir effectuer trop verrouillages + de haut niveau, ou d'avoir à réveiller le thread d'écoute pour lui + envoyer un socket keep-alive. Ceci n'est possible qu'avec KQueue et + EPoll.

    + +
    +
    -
    Prérequis -

    Ce MPM dépend des opérations atomiques compare-and-swap + +

    Prérequis +

    Ce MPM dépend des opérations atomiques compare-and-swap d'APR pour la synchronisation des threads. Si vous compilez pour une plate-forme x86 et n'avez pas besoin du support 386, ou si vous compilez pour une plate-forme SPARC et n'avez pas besoin du support pre-UltraSPARC, ajoutez --enable-nonportable-atomics=yes aux arguments du - script configure. Ceci permettra à APR - d'implémenter les opérations atomiques en utilisant des instructions + script configure. Ceci permettra à APR + d'implémenter les opérations atomiques en utilisant des instructions performantes indisponibles avec les processeurs plus anciens.

    -

    Ce MPM ne fonctionne pas de manière optimale sur les - plates-formes plus anciennes qui ne gèrent pas correctement les - threads, mais ce problème est sans objet du fait du prérequis +

    Ce MPM ne fonctionne pas de manière optimale sur les + plates-formes plus anciennes qui ne gèrent pas correctement les + threads, mais ce problème est sans objet du fait du prérequis concernant EPoll ou KQueue.

    • Pour utiliser ce MPM sous FreeBSD, la version 5.3 ou - supérieure de ce système est recommandée. Il est cependant - possible d'exécuter ce MPM sous FreeBSD 5.2.1 si vous utilisez + supérieure de ce système est recommandée. Il est cependant + possible d'exécuter ce MPM sous FreeBSD 5.2.1 si vous utilisez libkse (voir man libmap.conf).
    • Pour NetBSD, il est recommander d'utiliser la version 2.0 ou - supérieure.
    • + supérieure. -
    • Pour Linux, un noyau 2.6 est recommandé. Il faut aussi - s'assurer que votre version de glibc a été compilée +
    • Pour Linux, un noyau 2.6 est recommandé. Il faut aussi + s'assurer que votre version de glibc a été compilée avec le support pour EPoll.
    @@ -119,7 +327,7 @@ mobiliser des threads que pour les connexions en cours de traitement EnableExceptionHook -Group +Group Listen @@ -151,39 +359,44 @@ mobiliser des threads que pour les connexions en cours de traitement ThreadStackSize -User +User AsyncRequestWorkerFactor -Limite le nombre de connexions simultanées par thread +Limite le nombre de connexions simultanées par thread AsyncRequestWorkerFactor facteur 2 server config Disponible depuis la version 2.3.13 -

    Le MPM event gère certaines connexions de manière asynchrone ; - dans ce cas, les threads traitant la requête sont alloués selon les - besoins et pour de courtes périodes. Dans les autres cas (la plupart - du temps pour les connexions SSL), un thread est réservé par - connexion. Ceci peut conduire à des situations où tous les threads - sont saturés et où aucun thread n'est capable d'effectuer de - nouvelles tâches pour les connexions asynchrones établies.

    - -

    Pour minimiser les effets de ce problème, le MPM event utilise - deux méthodes : tout d'abord, il limite le nombre de connexions - simultanées par thread en fonction du nombre de processus - inactifs. Ensuite, si tous les processus sont occupés, il ferme des - connexions permanentes, même si la limite de durée de la connexion - n'a pas été atteinte. Ceci autorise les clients concernés à se - reconnecter à un autre processus possèdant encore des threads - disponibles.

    +

    Le MPM event gère certaines connexions de manière asynchrone ; + dans ce cas, les threads traitant la requête sont alloués selon les + besoins et pour de courtes périodes. Dans les autres cas, un + thread est réservé par + connexion. Ceci peut conduire à des situations où tous les threads + sont saturés et où aucun thread n'est capable d'effectuer de + nouvelles tâches pour les connexions asynchrones établies.

    + +

    Pour minimiser les effets de ce problème, le MPM event utilise + deux méthodes :

    +
      +
    • il limite le nombre de connexions + simultanées par thread en fonction du nombre de processus + inactifs;
    • +
    • si tous les processus sont occupés, il ferme des connexions + permanentes, même si la limite de durée de la connexion n'a + pas été atteinte. Ceci autorise les clients + concernés à se reconnecter à un autre processus + possèdant encore des threads disponibles.
    • +

    Cette directive permet de personnaliser finement la limite du - nombre de connexions par thread. Un processus n'acceptera de - nouvelles connexions que si le nombre actuel de connexions est - inférieur à :

    + nombre de connexions par thread. Un processus n'acceptera de + nouvelles connexions que si le nombre actuel de connexions (sans + compter les connexions à l'état "closing") est + inférieur à :

    ThreadsPerChild + @@ -191,18 +404,82 @@ mobiliser des threads que pour les connexions en cours de traitementnombre de threads inactifs)

    -

    En d'autres termes, le nombre maximum de connexions simultanées - sera :

    +

    Il est possible d'effectuer une estimation du nombre maximum de + connexions simultanées pour tous les processus et pour un nombre donné moyen + de threads de travail inactifs comme suit : +

    + + +

    + (ThreadsPerChild + + (AsyncRequestWorkerFactor * + number of idle workers)) * + ServerLimit +

    + + Exemple + + +ThreadsPerChild = 10 +ServerLimit = 4 +AsyncRequestWorkerFactor = 2 +MaxRequestWorkers = 40 + +idle_workers = 4 (moyenne pour tous les processus pour faire simple) + +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit + = (10 + (2 * 4)) * 4 = 72 + + + + +

    Lorsque tous les threads de travail sont inactifs, le nombre maximum + absolu de connexions simultanées peut être calculé de manière plus simple :

    (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers

    + Exemple + + +ThreadsPerChild = 10 +ServerLimit = 4 +MaxRequestWorkers = 40 +AsyncRequestWorkerFactor = 2 + + + +

    Si tous les threads de tous les processus sont inactifs, alors :

    + + idle_workers = 10 + +

    Nous pouvons calculer le nombre maximum absolu de connexions simultanées + de deux manières :

    + + + +max_connections = (ThreadsPerChild + (AsyncRequestWorkerFactor * idle_workers)) * ServerLimit + = (10 + (2 * 10)) * 4 = 120 + +max_connections = (AsyncRequestWorkerFactor + 1) * MaxRequestWorkers + = (2 + 1) * 40 = 120 + + +
    + +

    Le réglage de la directive + AsyncRequestWorkerFactor nécessite de connaître le + trafic géré par httpd pour chaque style d'utilisation spécifique ; si vous + modifiez la valeur par défaut, vous devrez par conséquent effectuer des + tests approfondis en vous appuyant étroitement sur les données fournies par + mod_status.

    +

    La directive MaxRequestWorkers se nommait MaxClients avant la version 2.3.13. La valeur - ci-dessus montre que cet ancien nom ne correspondait pas à sa + ci-dessus montre que cet ancien nom ne correspondait pas à sa signification exacte pour le MPM event.

    La directive AsyncRequestWorkerFactor diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html index 7a18fb35271..5512d439135 100644 --- a/docs/manual/mod/index.html +++ b/docs/manual/mod/index.html @@ -28,6 +28,6 @@ Content-Language: tr Content-type: text/html; charset=UTF-8 -URI: index.html.zh-cn +URI: index.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/index.html.de b/docs/manual/mod/index.html.de index fdddacc8a52..2e4e48ea68a 100644 --- a/docs/manual/mod/index.html.de +++ b/docs/manual/mod/index.html.de @@ -1,22 +1,27 @@ - -Modul-Index - Apache HTTP Server +Modul-Index - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Modul-Index

    Verfgbare Sprachen:  de  |  en  | @@ -67,7 +72,7 @@ of consuming threads only for connections with active processing

    top

    Andere Module

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    mod_actions
    Dieses Modul ermglicht die Ausfhrung von CGI-Skripten @@ -77,7 +82,7 @@ address)
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    mod_asis
    Sends files that contain their own HTTP headers
    -
    mod_auth_basic
    Basic authentication
    +
    mod_auth_basic
    Basic HTTP authentication
    mod_auth_digest
    User authentication using MD5 Digest Authentication
    mod_auth_form
    Form authentication
    @@ -89,6 +94,8 @@ HTTP headers
    mod_authn_file
    User authentication using text files
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -105,6 +112,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    RFC 2616 compliant HTTP caching filter.
    mod_cache_disk
    Disk based storage module for the HTTP caching filter.
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    Execution of CGI scripts
    mod_cgid
    Execution of CGI scripts using an @@ -113,8 +122,8 @@ address)
    mod_data
    Convert response body into an RFC2397 data URL
    mod_dav
    Distributed Authoring and Versioning (WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_fs
    Filesystem provider for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Compress content before it is delivered to the client
    @@ -126,7 +135,7 @@ client modules
    mod_env
    Modifies the environment which is passed to CGI scripts and SSI pages
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
    @@ -136,8 +145,9 @@ delivery to the client
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    Customization of HTTP request and response headers
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -147,7 +157,7 @@ configuration
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    Logging of the requests made to the server
    @@ -156,7 +166,8 @@ by other LDAP modules
    mod_logio
    Logging of input and output bytes per request
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -180,16 +191,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -207,6 +224,10 @@ on characteristics of the request
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Loading of executable code and modules into the server at start-up or restart time
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    Attempts to correct mistaken URLs by ignoring capitalization, or attempting to correct various minor misspellings.
    @@ -227,6 +248,8 @@ identifier for each request
    mod_version
    Version dependent configuration
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -240,6 +263,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Lizenziert unter der Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.en b/docs/manual/mod/index.html.en index 7494c6b82ac..4d1afa24ccb 100644 --- a/docs/manual/mod/index.html.en +++ b/docs/manual/mod/index.html.en @@ -1,22 +1,27 @@ - -Module Index - Apache HTTP Server +Module Index - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Module Index

    Available Languages:  de  |  en  | @@ -58,24 +63,22 @@ of consuming threads only for connections with active processing server optimized for Novell NetWare

    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    prefork
    Implements a non-threaded, pre-forking web server
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows -NT.
    +
    mpm_winnt
    Multi-Processing Module optimized for Windows NT.
    worker
    Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
    top

    Other Modules

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    -
    mod_actions
    This module provides for executing CGI scripts based on -media type or request method.
    +
    mod_actions
    Execute CGI scripts based on media type or request method.
    mod_alias
    Provides for mapping different parts of the host filesystem in the document tree and for URL redirection
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    mod_asis
    Sends files that contain their own HTTP headers
    -
    mod_auth_basic
    Basic authentication
    +
    mod_auth_basic
    Basic HTTP authentication
    mod_auth_digest
    User authentication using MD5 Digest Authentication
    mod_auth_form
    Form authentication
    @@ -87,6 +90,8 @@ HTTP headers
    mod_authn_file
    User authentication using text files
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -103,6 +108,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    RFC 2616 compliant HTTP caching filter.
    mod_cache_disk
    Disk based storage module for the HTTP caching filter.
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    Execution of CGI scripts
    mod_cgid
    Execution of CGI scripts using an @@ -111,8 +118,8 @@ address)
    mod_data
    Convert response body into an RFC2397 data URL
    mod_dav
    Distributed Authoring and Versioning (WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_fs
    Filesystem provider for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Compress content before it is delivered to the client
    @@ -124,7 +131,7 @@ client modules
    mod_env
    Modifies the environment which is passed to CGI scripts and SSI pages
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
    @@ -134,8 +141,9 @@ delivery to the client
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    Customization of HTTP request and response headers
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -145,7 +153,7 @@ configuration
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    Logging of the requests made to the server
    @@ -154,7 +162,8 @@ by other LDAP modules
    mod_logio
    Logging of input and output bytes per request
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -178,16 +187,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -205,6 +220,10 @@ on characteristics of the request
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Loading of executable code and modules into the server at start-up or restart time
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    Attempts to correct mistaken URLs by ignoring capitalization, or attempting to correct various minor misspellings.
    @@ -225,6 +244,8 @@ identifier for each request
    mod_version
    Version dependent configuration
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -238,6 +259,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.es b/docs/manual/mod/index.html.es index 9b133970c2a..dcc00871c2e 100644 --- a/docs/manual/mod/index.html.es +++ b/docs/manual/mod/index.html.es @@ -1,22 +1,27 @@ - -ndice de Mdulos - Servidor HTTP Apache +ndice de Mdulos - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    ndice de Mdulos

    Idiomas disponibles:  de  |  en  | @@ -41,7 +46,7 @@

    Consulte tambin

    + de Multi-Procesamiento
  • Otros Mdulos
  • Consulte tambin

    top

    Funcionalidad Bsica y Mdulos - de MultiProcesamiento

    + de Multi-Procesamiento
    core
    Funcionalides bsicas del Servidor HTTP Apache que siempre estn presentes.
    mpm_common
    A collection of directives that are implemented by @@ -63,24 +68,22 @@ of consuming threads only for connections with active processing
    server optimized for Novell NetWare
    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    prefork
    Implements a non-threaded, pre-forking web server
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows -NT.
    +
    mpm_winnt
    Multi-Processing Module optimized for Windows NT.
    worker
    Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
    top

    Otros Mdulos

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    -
    mod_actions
    This module provides for executing CGI scripts based on -media type or request method.
    +
    mod_actions
    Execute CGI scripts based on media type or request method.
    mod_alias
    Provides for mapping different parts of the host filesystem in the document tree and for URL redirection
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    mod_asis
    Sends files that contain their own HTTP headers
    -
    mod_auth_basic
    Basic authentication
    +
    mod_auth_basic
    Basic HTTP authentication
    mod_auth_digest
    User authentication using MD5 Digest Authentication
    mod_auth_form
    Form authentication
    @@ -92,6 +95,8 @@ HTTP headers
    mod_authn_file
    User authentication using text files
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -108,6 +113,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    RFC 2616 compliant HTTP caching filter.
    mod_cache_disk
    Disk based storage module for the HTTP caching filter.
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    Execution of CGI scripts
    mod_cgid
    Execution of CGI scripts using an @@ -116,8 +123,8 @@ address)
    mod_data
    Convert response body into an RFC2397 data URL
    mod_dav
    Distributed Authoring and Versioning (WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_fs
    Filesystem provider for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Compress content before it is delivered to the client
    @@ -129,7 +136,7 @@ client modules
    mod_env
    Modifies the environment which is passed to CGI scripts and SSI pages
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
    @@ -139,8 +146,9 @@ delivery to the client
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    Customization of HTTP request and response headers
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -150,7 +158,7 @@ configuration
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    Logging of the requests made to the server
    @@ -159,7 +167,8 @@ by other LDAP modules
    mod_logio
    Logging of input and output bytes per request
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -183,16 +192,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -210,6 +225,10 @@ on characteristics of the request
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Loading of executable code and modules into the server at start-up or restart time
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    Attempts to correct mistaken URLs by ignoring capitalization, or attempting to correct various minor misspellings.
    @@ -230,6 +249,8 @@ identifier for each request
    mod_version
    Version dependent configuration
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -243,6 +264,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licencia bajo los trminos de Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.fr b/docs/manual/mod/index.html.fr index 8894777c6fa..aa7b4ef8daa 100644 --- a/docs/manual/mod/index.html.fr +++ b/docs/manual/mod/index.html.fr @@ -1,22 +1,27 @@ - -Index des modules - Serveur Apache HTTP +Index des modules - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Index des modules

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Index des modules

    Langues Disponibles:  de  |  en  | @@ -47,51 +52,62 @@

    core
    Fonctionnalits de base du serveur HTTP Apache toujours disponibles
    -
    mpm_common
    A collection of directives that are implemented by -more than one multi-processing module (MPM)
    +
    mpm_common
    Une srie de directives implmentes par plusieurs +modules multi-processus (MPM)
    event
    Une variante du MPM worker conue pour ne mobiliser des threads que pour les connexions en cours de traitement
    -
    mpm_netware
    Multi-Processing Module implementing an exclusively threaded web - server optimized for Novell NetWare
    -
    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    -
    prefork
    Implements a non-threaded, pre-forking web server
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows +
    mpm_netware
    Module multi-processus implmentant un serveur web bas +exclusivement sur les threads et optimis pour Novell +NetWare
    +
    mpmt_os2
    MPM hybride multi-processus, multi-thread pour +OS/2
    +
    prefork
    Implmente un serveur web avec dmarrage anticip de +processus, sans thread
    +
    mpm_winnt
    Module multi-processus optimis pour Windows NT.
    -
    worker
    Multi-Processing Module implementing a hybrid - multi-threaded multi-process web server
    +
    worker
    Module multi-processus implmentant un serveur web hybride +multi-processus multi-thread
    top

    Autres Modules

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Autorisations de groupe base de nom d'hte (nom ou adresse IP)
    -
    mod_actions
    Ce module permet l'excution des scripts CGI en fonction du +
    mod_actions
    Excution des scripts CGI en fonction du type de mdia ou de la mthode de requte.
    mod_alias
    Permet d'atteindre diffrentes parties du systme de fichiers depuis l'arborescence des documents du site web, ainsi que la redirection d'URL
    -
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    +
    mod_allowmethods
    Ce module permet de restreindre aisment les mthodes HTTP +pouvant tre utilises sur le serveur
    mod_asis
    Envoie des fichiers contenant leurs propres en-ttes HTTP
    -
    mod_auth_basic
    Authentification de base
    +
    mod_auth_basic
    Authentification HTTP de base
    mod_auth_digest
    Authentification utilisateur utilisant les condenss MD5
    -
    mod_auth_form
    Form authentication
    -
    mod_authn_anon
    Allows "anonymous" user access to authenticated - areas
    +
    mod_auth_form
    Authentification l'aide d'un formulaire
    +
    mod_authn_anon
    Permet un accs "anonyme" des zones +protges
    mod_authn_core
    Le noyau de l'authentification
    -
    mod_authn_dbd
    User authentication using an SQL database
    -
    mod_authn_dbm
    User authentication using DBM files
    +
    mod_authn_dbd
    Authentification utilisateur l'aide d'une base de donnes +SQL
    +
    mod_authn_dbm
    Authentification utilisateur utilisant des fichiers +DBM
    mod_authn_file
    Authentification utilisateur l'aide de fichiers texte
    -
    mod_authn_socache
    Manages a cache of authentication credentials to relieve -the load on backends
    +
    mod_authn_socache
    Gre un cache des donnes d'authentification pour diminuer +la charge des serveurs d'arrire-plan
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Permet d'utiliser un annuaire LDAP pour l'authentification HTTP de base.
    -
    mod_authz_core
    Core Authorization
    -
    mod_authz_dbd
    Group Authorization and Login using SQL
    -
    mod_authz_dbm
    Group authorization using DBM files
    -
    mod_authz_groupfile
    Group authorization using plaintext files
    +
    mod_authz_core
    Autorisation basique
    +
    mod_authz_dbd
    Autorisation en groupe et reconnaissance d'identit avec base +SQL
    +
    mod_authz_dbm
    Autorisation base sur les groupes l'aide de fichiers +DBM
    +
    mod_authz_groupfile
    Autorisation base sur les groupes l'aide de fichiers +textes
    mod_authz_host
    Autorisations de groupe bases sur l'hte (nom ou adresse IP)
    mod_authz_owner
    Autorisation base sur l'appartenance des @@ -104,135 +120,182 @@ shell Win32 dir
    mod_cache
    Filtre de mise en cache HTTP conforme la RFC 2616
    mod_cache_disk
    Module de stockage sur disque pour le filtre de mise en cache HTTP.
    -
    mod_cern_meta
    CERN httpd metafile semantics
    -
    mod_cgi
    Execution of CGI scripts
    -
    mod_cgid
    Execution of CGI scripts using an - external CGI daemon
    -
    mod_charset_lite
    Specify character set translation or recoding
    -
    mod_data
    Convert response body into an RFC2397 data URL
    -
    mod_dav
    Distributed Authoring and Versioning -(WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    -
    mod_dbd
    Manages SQL database connections
    +
    mod_cache_socache
    Module de stockage base de cache d'objets partags +(socache) pour le filtre de mise en cache HTTP.
    +
    mod_cern_meta
    La smantique des mtafichiers du serveur httpd du +CERN
    +
    mod_cgi
    Excution des scripts CGI
    +
    mod_cgid
    Excution des scripts CGI par l'intermdiaire d'un dmon +CGI externe
    +
    mod_charset_lite
    Spcifie dans quel jeu de caractre doivent s'effectuer les +traductions ou les rencodages
    +
    mod_data
    Convertit un corps de rponse en URL de type donnes RFC2397
    +
    mod_dav
    Fonctionnalit de cration et gestion de versions de +documents via le web (WebDAV)
    +
    mod_dav_fs
    Implmente le fournisseur filesystem pour +mod_dav
    +
    mod_dav_lock
    Module de verrouillage gnrique pour +mod_dav
    +
    mod_dbd
    Gestion des connexions une base de donnes SQL
    mod_deflate
    Comprime le contenu avant de le servir au client
    -
    mod_dialup
    Send static content at a bandwidth rate limit, defined by the various old modem standards
    +
    mod_dialup
    Envoie le contenu statique avec une bande passante limite +dfinie par les diffrents standards des anciens modems.
    mod_dir
    Permet la redirection des adresses se terminant par un rpertoire sans slash de fin et la mise disposition des fichiers index de rpertoire
    -
    mod_dumpio
    Dumps all I/O to error log as desired.
    +
    mod_dumpio
    Enregistre toutes les entres/sorties dans le journal des +erreurs de la manire souhaite.
    mod_echo
    Un simple serveur d'cho pour illustrer les modules de protocole
    mod_env
    Modifie l'environnement transmis aux scripts CGI et aux pages SSI
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustration de l'API des modules Apache
    mod_expires
    Gnration des en-ttes HTTP Expires et Cache-Control en fonction de critres spcifis par l'utilisateur
    -
    mod_ext_filter
    Pass the response body through an external program before -delivery to the client
    -
    mod_file_cache
    Caches a static list of files in memory
    -
    mod_filter
    Context-sensitive smart filter configuration module
    +
    mod_ext_filter
    Fait traiter le corps de la rponse par un programme +externe avant de l'envoyer au client
    +
    mod_file_cache
    Mise en cache mmoire d'une liste statique de +fichiers
    +
    mod_filter
    Module de configuration de filtre intelligent sensible au +contexte
    mod_headers
    Personnalisation des en-ttes de requtes et de rponses HTTP
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Envoie des messages d'tat au mandataire frontal
    +
    mod_heartmonitor
    Moniteur centralis pour les serveurs d'origine mod_heartbeat
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    Recherche d'identit conformment la RFC 1413
    -
    mod_imagemap
    Server-side imagemap processing
    -
    mod_include
    Server-parsed html documents (Server Side Includes)
    +
    mod_imagemap
    Traitement des cartes des zones interactives d'une image +(imagemaps) au niveau du serveur
    +
    mod_include
    Documents html interprts par le serveur (Server Side +Includes ou SSI)
    mod_info
    Affiche une prsentation complte de la configuration du serveur
    -
    mod_isapi
    ISAPI Extensions within Apache for Windows
    -
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_isapi
    Extensions ISAPI dans Apache pour Windows
    +
    mod_lbmethod_bybusyness
    Algorithme de planification avec rpartition de charge de +l'attribution des requtes en attente pour le module +mod_proxy_balancer
    +
    mod_lbmethod_byrequests
    Algorithme de planification avec rpartition de charge du +traitement des requtes pour le module +mod_proxy_balancer
    +
    mod_lbmethod_bytraffic
    Algorithme de planification avec rpartition de charge en +fonction d'un niveau de trafic pour le module +mod_proxy_balancer
    +
    mod_lbmethod_heartbeat
    Algorithme d'ordonnancement de rpartition de charge pour +mod_proxy_balancer bas sur le comptage de trafic Heartbeat
    mod_ldap
    Conservation des connexions LDAP et services de mise en cache du rsultat destination des autres modules LDAP
    -
    mod_log_config
    Logging of the requests made to the server
    -
    mod_log_debug
    Additional configurable debug logging
    -
    mod_log_forensic
    Forensic Logging of the requests made to the server
    -
    mod_logio
    Logging of input and output bytes per request
    -
    mod_lua
    Provides Lua hooks into various portions of the httpd -request processing
    -
    mod_mime
    Associates the requested filename's extensions - with the file's behavior (handlers and filters) - and content (mime-type, language, character set and - encoding)
    -
    mod_mime_magic
    Determines the MIME type of a file - by looking at a few bytes of its contents
    +
    mod_log_config
    Journalisation des requtes envoyes au +serveur
    +
    mod_log_debug
    Journalisation supplmentaire des fins de dbogage
    +
    mod_log_forensic
    Journalisation lgale des requtes envoyes au +serveur
    +
    mod_logio
    Journalisation des octets en entre et en sortie pour +chaque requte
    +
    mod_lua
    Fournit des points d'entre Lua dans diffrentes parties du +traitement des requtes httpd
    +
    mod_macro
    Ce module permet d'utiliser des macros dans les fichiers +de configuration Apache.
    +
    mod_mime
    Associe les extensions des fichiers demands avec l'action +dclenche par ces fichiers et avec leur contenu (type MIME, langue, +jeu de caractre et codage)
    +
    mod_mime_magic
    Dtermine le type MIME d'un fichier partir de quelques +octets de son contenu
    mod_negotiation
    Effectue la ngociation de contenu
    -
    mod_nw_ssl
    Enable SSL encryption for NetWare
    -
    mod_privileges
    Support for Solaris privileges and for running virtual hosts -under different user IDs.
    +
    mod_nw_ssl
    Active le chiffrement SSL pour Netware
    +
    mod_privileges
    Support des privilges de Solaris et de l'excution des +serveurs virtuels sous diffrents identifiants +utilisateurs.
    mod_proxy
    Serveur mandataire/passerelle multi-protocole
    -
    mod_proxy_ajp
    AJP support module for +
    mod_proxy_ajp
    Module de support AJP pour mod_proxy
    -
    mod_proxy_balancer
    mod_proxy extension for load balancing
    -
    mod_proxy_connect
    mod_proxy extension for -CONNECT request handling
    -
    mod_proxy_express
    Dynamic mass reverse proxy extension for +
    mod_proxy_balancer
    Extension de mod_proxy pour le support de +la rpartition de charge
    +
    mod_proxy_connect
    Extension de mod_proxy pour le traitement +des requtes CONNECT
    +
    mod_proxy_express
    Extension mod_proxy pour le mandatement +dynamique inverse de masse
    +
    mod_proxy_fcgi
    Module fournissant le support de FastCGI mod_proxy
    -
    mod_proxy_fcgi
    FastCGI support module for +
    mod_proxy_fdpass
    Module fournissant le support des processus externes fdpass + mod_proxy
    +
    mod_proxy_ftp
    Module fournissant le support FTP mod_proxy
    -
    mod_proxy_fdpass
    fdpass external process support module for +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for mod_proxy
    -
    mod_proxy_ftp
    FTP support module for -mod_proxy
    -
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable -from Clients' networks in a proxy context.
    +
    mod_proxy_html
    Rcrit les liens HTML afin de s'assurer qu'ils soient bien +adressables depuis les rseaux des clients dans un contexte de +mandataire.
    mod_proxy_http
    Module fournissant le support HTTP mod_proxy
    -
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    -
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    -
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Remplace l'adresse IP et le nom d'hte apparents du client +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    +
    mod_proxy_scgi
    Module fournissant le support de la passerelle SCGI +mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    +
    mod_ratelimit
    Limitation de la bande passante pour les clients
    +
    mod_reflector
    Rflchit un corps de requte comme rponse via la pile de +filtres en sortie.
    +
    mod_remoteip
    Remplace l'adresse IP du client pour la requte par l'adresse IP prsente par un mandataire ou un rpartiteur de charge via les en-ttes de la requte.
    -
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests +
    mod_reqtimeout
    Dfinit le dlai maximum et le taux minimum de transfert des +donnes pour la rception des requtes
    -
    mod_request
    Filters to handle and make available HTTP request bodies
    +
    mod_request
    Filtres permettant de traiter et de mettre disposition +les corps de requtes HTTP
    mod_rewrite
    Ce module fournit un moteur de rcriture base de rgles permettant de rcrire les URLs des requtes la vole
    mod_sed
    Filtre les contenus en entre (requtes) et en sortie (rponses) en utilisant la syntaxe de sed
    -
    mod_session
    Session support
    -
    mod_session_cookie
    Cookie based session support
    -
    mod_session_crypto
    Session encryption support
    -
    mod_session_dbd
    DBD/SQL based session support
    +
    mod_session
    Support des sessions
    +
    mod_session_cookie
    Support des sessions bas sur les cookies
    +
    mod_session_crypto
    Support du chiffrement des sessions
    +
    mod_session_dbd
    Support des session bas sur DBD/SQL
    mod_setenvif
    Permet de dfinir des variables d'environnement en fonction -de caractristiques de la requte
    -
    mod_slotmem_plain
    Slot-based shared memory provider.
    -
    mod_slotmem_shm
    Slot-based shared memory provider.
    +de certainescaractristiques de la requte +
    mod_slotmem_plain
    Fournisseur de mmoire partage base de +slots.
    +
    mod_slotmem_shm
    Fournisseur de mmoire partage base sur les +slots.
    mod_so
    Chargement de modules ou de code excutable au cours du dmarrage ou du redmarrage du serveur
    -
    mod_speling
    Attempts to correct mistaken URLs by ignoring -capitalization, or attempting to correct various minor -misspellings.
    -
    mod_ssl
    Strong cryptography using the Secure Sockets -Layer (SSL) and Transport Layer Security (TLS) protocols
    +
    mod_socache_dbm
    Fournisseur de cache d'objets partags bas sur DBM.
    +
    mod_socache_dc
    Fournisseur de cache d'objets partags bas sur dc.
    +
    mod_socache_memcache
    Fournisseur de cache d'objets partags bas sur Memcache.
    +
    mod_socache_shmcb
    Fournisseur de cache d'objets partags bas sur shmcb.
    +
    mod_speling
    Tente de corriger les erreurs de casse dans les URLs ou les +fautes de frappe mineures.
    +
    mod_ssl
    Chiffrement de haut niveau bas sur les protocoles Secure +Sockets Layer (SSL) et Transport Layer Security (TLS)
    mod_status
    Fournit des informations sur les performances et l'activit du serveur
    -
    mod_substitute
    Perform search and replace operations on response bodies
    -
    mod_suexec
    Allows CGI scripts to run as a specified user -and Group
    +
    mod_substitute
    Effectue des oprations de recherche/remplacement sur les +corps de rponses
    +
    mod_suexec
    Permet l'excution des scripts CGI sous l'utilisateur et +le groupe spcifis
    mod_unique_id
    Fournit une variable d'environnement contenant un identifiant unique pour chaque requte
    -
    mod_unixd
    Basic (required) security for Unix-family platforms.
    -
    mod_userdir
    User-specific directories
    +
    mod_unixd
    Scurit de base (ncessaire) pour les plates-formes de la +famille Unix.
    +
    mod_userdir
    Rpertoires propres un utilisateur
    mod_usertrack
    -Clickstream logging of user activity on a site +Journalisation Clickstream des liens parcourus par un +utilisateur sur un site
    mod_version
    Version dependent configuration
    -
    mod_vhost_alias
    Provides for dynamically configured mass virtual -hosting
    -
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based -filter modules
    +
    mod_vhost_alias
    Permet de configurer dynamiquement l'hbergement virtuel de +masse
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    +
    mod_xml2enc
    Support avanc de l'internationalisation et des jeux de +caractres pour les modules de filtrage bass sur libxml2

    Langues Disponibles:  de  | @@ -244,6 +307,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Autoris sous Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.ja.utf8 b/docs/manual/mod/index.html.ja.utf8 index 9ab0d1a084e..637c3d09ed1 100644 --- a/docs/manual/mod/index.html.ja.utf8 +++ b/docs/manual/mod/index.html.ja.utf8 @@ -1,25 +1,29 @@ - -モジュール一覧 - Apache HTTP サーバ +モジュール一覧 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    モジュール一覧

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -28,13 +32,11 @@  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。

    - 以下は Apache の配布の一部として配られているすべてのモジュールの - 一覧です。すべての Apache - ディレクティブ のアルファベット順のリストも見てください。 + 以下は Apache HTTP サーバの配布物に同梱されているモジュールの + 一覧です。Apache HTTP サーバ + ディレクティブ のアルファベット順のリストもご覧ください。

      @@ -65,7 +67,7 @@ of consuming threads only for connections with active processing
    top

    他のモジュール

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    ホスト (名前もしくは IP アドレス) に基づいたグループ承認
    mod_actions
    メディアタイプやリクエストメソッドに応じて CGI スクリプトを実行する機能を提供
    @@ -86,6 +88,8 @@ CGI スクリプトを実行する機能を提供
    mod_authn_file
    テキストファイルを用いたユーザ認証
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -102,6 +106,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    URI をキーにしたコンテンツのキャッシュ
    mod_cache_disk
    URI をキーにしたコンテンツキャッシュストレージ管理
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    CGI スクリプトの実行
    mod_cgid
    外部 CGI デーモンを使った CGI スクリプトの実行
    @@ -121,15 +127,16 @@ address)
    mod_env
    CGI スクリプト及び SSI ページに渡される環境変数を変更する機能を提供する
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    ユーザの指定した基準に基づいた ExpiresCache-Control HTTP ヘッダの生成
    mod_ext_filter
    レスポンスのボディをクライアントに送る前に外部プログラムで処理する
    mod_file_cache
    Caches a static list of files in memory
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    HTTP リクエストのヘッダと応答のヘッダのカスタマイズ
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    サーバがパースする html ドキュメント (Server Side Includes)
    @@ -138,7 +145,7 @@ address)
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    サーバへのリクエストのロギング
    @@ -147,7 +154,8 @@ by other LDAP modules
    mod_logio
    リクエスト毎に入力バイト数と出力バイト数とをロギング
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    リクエストされたファイルの拡張子とファイルの振る舞い +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    リクエストされたファイルの拡張子とファイルの振る舞い (ハンドラとフィルタ)、内容 (MIME タイプ、言語、文字セット、エンコーディング) とを関連付ける
    mod_mime_magic
    Determines the MIME type of a file @@ -171,16 +179,22 @@ under different user IDs.
    mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -197,6 +211,10 @@ URLs on the fly
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    起動時や再起動時に実行コードとモジュールをサーバにロードする
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    ユーザが入力したであろう間違った URL を、 大文字小文字の区別を無視することと一つ以下の綴り間違いを許容することで 修正を試みる
    @@ -216,11 +234,13 @@ Layer (SSL) and Transport Layer Security (TLS) protocols
    mod_version
    バージョン依存の設定
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -229,6 +249,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    この文書は Apache License, Version 2.0 のライセンスで提供されています。.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.ko.euc-kr b/docs/manual/mod/index.html.ko.euc-kr index b061cb04123..3f0fbccb7e9 100644 --- a/docs/manual/mod/index.html.ko.euc-kr +++ b/docs/manual/mod/index.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  de  |  en  | @@ -56,14 +61,13 @@ of consuming threads only for connections with active processing server optimized for Novell NetWare

    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    prefork
    Implements a non-threaded, pre-forking web server
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows -NT.
    +
    mpm_winnt
    Multi-Processing Module optimized for Windows NT.
    worker
    Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
    top

    ٸ

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    mod_actions
    ̵ û޼忡 CGI @@ -83,6 +87,8 @@ address)
    mod_authn_file
    ̿
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -98,6 +104,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    URI Ű Ͽ ijѴ.
    mod_cache_disk
    Content cache storage manager keyed to URIs
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN Ÿ
    mod_cgi
    CGI ũƮ
    mod_cgid
    ܺ CGI Ͽ CGI ũƮ
    @@ -106,7 +114,7 @@ address)
    mod_dav
    Distributed Authoring and Versioning (WebDAV)
    mod_dav_fs
    mod_dav Ͻý
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Ŭ̾Ʈ Ѵ
    mod_dialup
    Send static content at a bandwidth rate limit, defined by the various old modem standards
    @@ -116,7 +124,7 @@ index
    mod_echo
    ϱ echo
    mod_env
    CGI ũƮ SSI ȯ溯 Ѵ
    -
    mod_example
    ġ API Ѵ
    +
    mod_example_hooks
    ġ API Ѵ
    mod_expires
    ڰ ؿ Expires Cache-Control HTTP Ѵ
    mod_ext_filter
    ܺ α׷ ó Ŭ̾Ʈ @@ -124,8 +132,9 @@ index
    mod_file_cache
    ޸𸮿 ϵ ij
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    HTTP û
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident ˻
    mod_imagemap
    ̹(imagemap) ó
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -134,7 +143,7 @@ index
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    û α׿ Ѵ
    @@ -143,7 +152,8 @@ by other LDAP modules
    mod_logio
    û Ʈ
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -167,16 +177,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -193,6 +209,10 @@ URLs on the fly
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Ҷ Ȥ Ҷ డ ڵ оδ
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    ڰ ҹڸ ߸ ϰų Ʋ ѹ Ͽ ߸ URL ġ õѴ
    mod_ssl
    Strong cryptography using the Secure Sockets @@ -210,6 +230,8 @@ Layer (SSL) and Transport Layer Security (TLS) protocols
    mod_version
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -223,6 +245,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.html.tr.utf8 b/docs/manual/mod/index.html.tr.utf8 index 5b29374078d..6098582bcb8 100644 --- a/docs/manual/mod/index.html.tr.utf8 +++ b/docs/manual/mod/index.html.tr.utf8 @@ -1,22 +1,27 @@ - -Modül Dizini - Apache HTTP Sunucusu +Modül Dizini - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Modül Dizini

    Mevcut Diller:  de  |  en  | @@ -27,12 +32,11 @@  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Apache dağıtımının parçası olarak gelen modüllerin tamamı aşağıda - listelenmiştir. Ayrıca, tüm Apache yönergelerinin alfabetik olarak - listelendiği bir Yönerge Dizini de - mevcuttur.

    +

    Apache HTTP Sunucusu dağıtımının parçası olarak gelen modüllerin tamamı + aşağıda listelenmiştir. Ayrıca, tüm Apache HTTP Sunucusu yönergelerinin + alfabetik olarak listelendiği bir Yönerge + Dizini de mevcuttur.

    Ayrıca bakınız:

    @@ -55,24 +59,22 @@ of consuming threads only for connections with active processing server optimized for Novell NetWare
    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    prefork
    Evresiz ön çatallamalı HTTP sunucusu oluşturur
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows -NT.
    +
    mpm_winnt
    Multi-Processing Module optimized for Windows NT.
    worker
    Çok evreli ve çok süreçli melez bir HTTP sunucusu oluşturan çok süreçlilik modülü.
    top

    Diğer Modüller

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    -
    mod_actions
    This module provides for executing CGI scripts based on -media type or request method.
    +
    mod_actions
    Execute CGI scripts based on media type or request method.
    mod_alias
    Belge ağacının parçalarının dosya sisteminin parçalarıyla eşlenmesini sağlar ve URL yönlendirmesi yapar.
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    mod_asis
    Sends files that contain their own HTTP headers
    -
    mod_auth_basic
    Basic authentication
    +
    mod_auth_basic
    Basic HTTP authentication
    mod_auth_digest
    User authentication using MD5 Digest Authentication
    mod_auth_form
    Form authentication
    @@ -84,6 +86,8 @@ HTTP headers
    mod_authn_file
    User authentication using text files
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -99,6 +103,8 @@ yaptığı gibi dizin içeriğini listeler.
    mod_buffer
    Support for request buffering
    mod_cache
    RFC 2616 compliant HTTP caching filter.
    mod_cache_disk
    Disk based storage module for the HTTP caching filter.
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    Execution of CGI scripts
    mod_cgid
    Execution of CGI scripts using an @@ -107,8 +113,8 @@ yaptığı gibi dizin içeriğini listeler.
    mod_data
    Convert response body into an RFC2397 data URL
    mod_dav
    Distributed Authoring and Versioning (WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_fs
    Filesystem provider for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Compress content before it is delivered to the client
    @@ -119,7 +125,7 @@ client modules
    mod_env
    CGI betiklerine ve SSI sayfalarına aktarılan değişkenlere müdahale etmek için kullanılır.
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
    @@ -129,8 +135,9 @@ delivery to the client
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    Customization of HTTP request and response headers
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -140,7 +147,7 @@ configuration
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    Sunucuya yapılan isteklerin günlük kayıtlarının tutulması @@ -151,7 +158,8 @@ by other LDAP modules
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -175,16 +183,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -201,6 +215,10 @@ URLs on the fly
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Modüllerin ve çalıştırılabilir kodun sunucunun başlatılması veya yeniden başlatılması sırasında yüklenmesini sağlar.
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    Attempts to correct mistaken URLs by ignoring capitalization, or attempting to correct various minor misspellings.
    @@ -219,6 +237,8 @@ identifier for each request
    mod_version
    Version dependent configuration
    mod_vhost_alias
    Kitlesel sanal konakların devingen olarak yapılandırılmasını sağlar
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -232,6 +252,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    + \ No newline at end of file diff --git a/docs/manual/mod/index.html.zh-cn b/docs/manual/mod/index.html.zh-cn.utf8 similarity index 82% rename from docs/manual/mod/index.html.zh-cn rename to docs/manual/mod/index.html.zh-cn.utf8 index 65448706e5d..1bb3fdfa379 100644 --- a/docs/manual/mod/index.html.zh-cn +++ b/docs/manual/mod/index.html.zh-cn.utf8 @@ -1,22 +1,27 @@ - -模块索引 - Apache HTTP 服务器 +模块索引 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    模块索引

    可用语言:  de  |  en  | @@ -53,24 +58,22 @@ of consuming threads only for connections with active processing server optimized for Novell NetWare

    mpmt_os2
    Hybrid multi-process, multi-threaded MPM for OS/2
    prefork
    Implements a non-threaded, pre-forking web server
    -
    mpm_winnt
    This Multi-Processing Module is optimized for Windows -NT.
    +
    mpm_winnt
    Multi-Processing Module optimized for Windows NT.
    worker
    Multi-Processing Module implementing a hybrid multi-threaded multi-process web server
    top

    其它模块

    -

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  X 

    +

     A  |  B  |  C  |  D  |  E  |  F  |  H  |  I  |  L  |  M  |  N  |  P  |  R  |  S  |  U  |  V  |  W  |  X 

    mod_access_compat
    Group authorizations based on host (name or IP address)
    -
    mod_actions
    This module provides for executing CGI scripts based on -media type or request method.
    +
    mod_actions
    Execute CGI scripts based on media type or request method.
    mod_alias
    Provides for mapping different parts of the host filesystem in the document tree and for URL redirection
    mod_allowmethods
    Easily restrict what HTTP methods can be used on the server
    mod_asis
    Sends files that contain their own HTTP headers
    -
    mod_auth_basic
    Basic authentication
    +
    mod_auth_basic
    Basic HTTP authentication
    mod_auth_digest
    User authentication using MD5 Digest Authentication
    mod_auth_form
    Form authentication
    @@ -82,6 +85,8 @@ HTTP headers
    mod_authn_file
    User authentication using text files
    mod_authn_socache
    Manages a cache of authentication credentials to relieve the load on backends
    +
    mod_authnz_fcgi
    Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    mod_authnz_ldap
    Allows an LDAP directory to be used to store the database for HTTP Basic authentication.
    mod_authz_core
    Core Authorization
    @@ -98,6 +103,8 @@ address)
    mod_buffer
    Support for request buffering
    mod_cache
    RFC 2616 compliant HTTP caching filter.
    mod_cache_disk
    Disk based storage module for the HTTP caching filter.
    +
    mod_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    CERN httpd metafile semantics
    mod_cgi
    Execution of CGI scripts
    mod_cgid
    Execution of CGI scripts using an @@ -106,8 +113,8 @@ address)
    mod_data
    Convert response body into an RFC2397 data URL
    mod_dav
    Distributed Authoring and Versioning (WebDAV) functionality
    -
    mod_dav_fs
    filesystem provider for mod_dav
    -
    mod_dav_lock
    generic locking module for mod_dav
    +
    mod_dav_fs
    Filesystem provider for mod_dav
    +
    mod_dav_lock
    Generic locking module for mod_dav
    mod_dbd
    Manages SQL database connections
    mod_deflate
    Compress content before it is delivered to the client
    @@ -119,7 +126,7 @@ client modules
    mod_env
    Modifies the environment which is passed to CGI scripts and SSI pages
    -
    mod_example
    Illustrates the Apache module API
    +
    mod_example_hooks
    Illustrates the Apache module API
    mod_expires
    Generation of Expires and Cache-Control HTTP headers according to user-specified criteria
    @@ -129,8 +136,9 @@ delivery to the client
    mod_filter
    Context-sensitive smart filter configuration module
    mod_headers
    Customization of HTTP request and response headers
    -
    mod_heartbeat
    -
    mod_heartmonitor
    +
    mod_heartbeat
    Sends messages with server status to frontend proxy
    +
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_http2
    Support for the HTTP/2 transport layer
    mod_ident
    RFC 1413 ident lookups
    mod_imagemap
    Server-side imagemap processing
    mod_include
    Server-parsed html documents (Server Side Includes)
    @@ -140,7 +148,7 @@ configuration
    mod_lbmethod_bybusyness
    Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_byrequests
    Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_lbmethod_bytraffic
    Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    -
    mod_lbmethod_heartbeat
    This document is still under development.
    +
    mod_lbmethod_heartbeat
    Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    mod_ldap
    LDAP connection pooling and result caching services for use by other LDAP modules
    mod_log_config
    Logging of the requests made to the server
    @@ -149,7 +157,8 @@ by other LDAP modules
    mod_logio
    Logging of input and output bytes per request
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    Associates the requested filename's extensions +
    mod_macro
    Provides macros within apache httpd runtime configuration files
    +
    mod_mime
    Associates the requested filename's extensions with the file's behavior (handlers and filters) and content (mime-type, language, character set and encoding)
    @@ -173,16 +182,22 @@ under different user IDs. mod_proxy
    mod_proxy_ftp
    FTP support module for mod_proxy
    +
    mod_proxy_hcheck
    Dynamic health check of Balancer members (workers) for +mod_proxy
    mod_proxy_html
    Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP support module for mod_proxy
    +
    mod_proxy_http2
    HTTP/2 support module for +mod_proxy
    mod_proxy_scgi
    SCGI gateway module for mod_proxy
    +
    mod_proxy_wstunnel
    Websockets support module for +mod_proxy
    mod_ratelimit
    Bandwidth Rate Limiting for Clients
    mod_reflector
    Reflect a request body as a response via the output filter stack.
    -
    mod_remoteip
    Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    mod_remoteip
    Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    mod_reqtimeout
    Set timeout and minimum data rate for receiving requests
    @@ -200,6 +215,10 @@ on characteristics of the request
    mod_slotmem_shm
    Slot-based shared memory provider.
    mod_so
    Loading of executable code and modules into the server at start-up or restart time
    +
    mod_socache_dbm
    DBM based shared object cache provider.
    +
    mod_socache_dc
    Distcache based shared object cache provider.
    +
    mod_socache_memcache
    Memcache based shared object cache provider.
    +
    mod_socache_shmcb
    shmcb based shared object cache provider.
    mod_speling
    Attempts to correct mistaken URLs by ignoring capitalization, or attempting to correct various minor misspellings.
    @@ -220,6 +239,8 @@ identifier for each request
    mod_version
    Version dependent configuration
    mod_vhost_alias
    Provides for dynamically configured mass virtual hosting
    +
    mod_watchdog
    provides infrastructure for other modules to periodically run + tasks
    mod_xml2enc
    Enhanced charset/internationalisation support for libxml2-based filter modules
    @@ -233,6 +254,10 @@ filter modules  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/mod/index.xml.ja b/docs/manual/mod/index.xml.ja index b57de4eb3f8..b20d2a15308 100644 --- a/docs/manual/mod/index.xml.ja +++ b/docs/manual/mod/index.xml.ja @@ -1,7 +1,7 @@ - + + -mod_access_compat - Apache HTTP Server +mod_access_compat - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_access_compat

    @@ -57,9 +62,15 @@ have been deprecated by the new authz refactoring. Please see

    Note

    The directives provided by mod_access_compat have - been deprecated by the new authz refactoring. Please see - mod_authz_host.

    -
    + been deprecated by mod_authz_host. + Mixing old directives like Order, Allow or Deny with new ones like + Require is technically possible + but discouraged. This module was created to support + configurations containing only old directives to facilitate the 2.4 upgrade. + Please check the upgrading guide for more + information. +

    +

    In general, access restriction directives apply to all access methods (GET, PUT, @@ -67,6 +78,13 @@ have been deprecated by the new authz refactoring. Please see cases. However, it is possible to restrict some methods, while leaving other methods unrestricted, by enclosing the directives in a <Limit> section.

    + +

    Merging of configuration sections

    +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    +

    Directives

      @@ -75,12 +93,12 @@ have been deprecated by the new authz refactoring. Please see
    • Order
    • Satisfy
    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Allow Directive

    @@ -113,10 +131,9 @@ server
    A (partial) domain-name
    -

    Example:

    - Allow from example.org
    - Allow from .net example.edu -

    +
    Allow from example.org
    +Allow from .net example.edu
    +

    Hosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above example will match foo.example.org but it will not @@ -132,37 +149,33 @@ server

    A full IP address
    -

    Example:

    - Allow from 10.1.2.3
    - Allow from 192.168.1.104 192.168.1.205 -

    +
    Allow from 10.1.2.3
    +Allow from 192.168.1.104 192.168.1.205
    +

    An IP address of a host allowed access

    A partial IP address
    -

    Example:

    - Allow from 10.1
    - Allow from 10 172.20 192.168.2 -

    +
    Allow from 10.1
    +Allow from 10 172.20 192.168.2
    +

    The first 1 to 3 bytes of an IP address, for subnet restriction.

    A network/netmask pair
    -

    Example:

    - Allow from 10.1.0.0/255.255.0.0 -

    +
    Allow from 10.1.0.0/255.255.0.0
    +

    A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.

    A network/nnn CIDR specification
    -

    Example:

    - Allow from 10.1.0.0/16 -

    +
    Allow from 10.1.0.0/16
    +

    Similar to the previous case, except the netmask consists of nnn high-order 1 bits.

    @@ -173,10 +186,9 @@ server

    IPv6 addresses and IPv6 subnets can be specified as shown below:

    -

    - Allow from 2001:db8::a00:20ff:fea7:ccea
    - Allow from 2001:db8::a00:20ff:fea7:ccea/10 -

    +
    Allow from 2001:db8::a00:20ff:fea7:ccea
    +Allow from 2001:db8::a00:20ff:fea7:ccea/10
    +

    The third format of the arguments to the Allow directive allows access to the server @@ -194,21 +206,25 @@ server User-Agent (browser type), Referer, or other HTTP request header fields.

    -

    Example:

    - SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    - <Directory /docroot>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=let_me_in
    -
    - </Directory> -

    +
    SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory "/docroot">
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from env=let_me_in
    +</Directory>
    +

    In this case, browsers with a user-agent string beginning with KnockKnock/2.0 will be allowed access, and all others will be denied.

    +

    Merging of configuration sections

    +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + +
    top

    Deny Directive

    @@ -318,11 +334,10 @@ evaluated.

    In the following example, all hosts in the example.org domain are allowed access; all other hosts are denied access.

    -

    - Order Deny,Allow
    - Deny from all
    - Allow from example.org -

    +
    Order Deny,Allow
    +Deny from all
    +Allow from example.org
    +

    In the next example, all hosts in the example.org domain are allowed access, except for the hosts which are in the @@ -331,11 +346,10 @@ evaluated. state is to Deny access to the server.

    -

    - Order Allow,Deny
    - Allow from example.org
    - Deny from foo.example.org -

    +
    Order Allow,Deny
    +Allow from example.org
    +Deny from foo.example.org
    +

    On the other hand, if the Order in the last example is changed to Deny,Allow, all hosts will @@ -353,13 +367,10 @@ evaluated. directives because of its effect on the default access state. For example,

    -

    - <Directory /www>
    - - Order Allow,Deny
    -
    - </Directory> -

    +
    <Directory "/www">
    +    Order Allow,Deny
    +</Directory>
    +

    will Deny all access to the /www directory because the default access state is set to @@ -377,6 +388,13 @@ evaluated. of configuration sections, see the documentation on How Directory, Location and Files sections work.

    +

    Merging of configuration sections

    +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + +
    top

    Satisfy Directive

    @@ -409,27 +427,25 @@ later people outside of your network provide a password, you could use a configuration similar to the following:

    -

    - Require valid-user
    - Allow from 192.168.1
    - Satisfy Any -

    +
    Require valid-user
    +Allow from 192.168.1
    +Satisfy Any
    +

    Another frequent use of the Satisfy directive is to relax access restrictions for a subdirectory:

    -

    - <Directory /var/www/private>
    - Require valid-user
    - </Directory>
    -
    - <Directory /var/www/private/public>
    - Allow from all
    - Satisfy Any
    - </Directory> -

    +
    <Directory "/var/www/private">
    +    Require valid-user
    +</Directory>
    +
    +<Directory "/var/www/private/public">
    +    Allow from all
    +    Satisfy Any
    +</Directory>
    +

    In the above example, authentication will be required for the /var/www/private directory, but will not be required @@ -438,6 +454,13 @@ later

    Since version 2.0.51 Satisfy directives can be restricted to particular methods by <Limit> and <LimitExcept> sections.

    +

    Merging of configuration sections

    +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + +

    See also

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_access_compat.html.fr b/docs/manual/mod/mod_access_compat.html.fr index e5cc5f71175..733c90eab15 100644 --- a/docs/manual/mod/mod_access_compat.html.fr +++ b/docs/manual/mod/mod_access_compat.html.fr @@ -1,23 +1,28 @@ - -mod_access_compat - Serveur Apache HTTP +mod_access_compat - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_access_compat

    @@ -63,7 +68,14 @@ ce module sont devenues obsol

    Note

    Les directives fournies par le module mod_access_compat sont devenues obsoltes depuis - la refonte d'authz. Voir mod_authz_host.

    + la refonte du module mod_authz_host. Mlanger d'anciennes + directives comme Order, Allow ou Deny avec des nouvelles comme + Require est techniquement + possible mais dconseill. En effet, mod_access_compat a + t conu pour supporter des configurations ne contenant que des anciennes + directives afin de faciliter le passage la version 2.4. Voir le document + upgrading pour plus de dtails. +

    En gnral, les directives de restriction d'accs s'appliquent @@ -73,6 +85,12 @@ ce module sont devenues obsol certaines mthodes, alors que les autres mthodes ne se verront impose aucune restriction, en regroupant les directives l'intrieur d'une section <Limit>.

    + +

    Fusion des sections de configuration

    +

    Lorsqu'une directive fournie par ce module est utilise dans + une nouvelle section de configuration, cette dernire n'hrite + d'aucune directive dfinie dans une section prcdente.

    +

    Directives

      @@ -81,15 +99,15 @@ ce module sont devenues obsol
    • Order
    • Satisfy
    -

    Voir aussi

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top
    -

    Allow Directive

    +

    Directive Allow

    @@ -120,10 +138,9 @@ d'environnement
    Un nom de domaine (partiel)
    -

    Exemple :

    - Allow from example.org
    - Allow from .net example.edu -

    +
    Allow from example.org
    +Allow from .net example.edu
    +

    Les htes dont les noms correspondent ou se terminent par la chane spcifie ont l'autorisation d'accs. Seules les composantes entires du nom d'hte doivent correspondre ; ainsi, @@ -142,28 +159,25 @@ d'environnement

    Une adresse IP complte
    -

    Exemple :

    - Allow from 10.1.2.3
    - Allow from 192.168.1.104 192.168.1.205 -

    +
    Allow from 10.1.2.3
    +Allow from 192.168.1.104 192.168.1.205
    +

    L'adresse IP d'un hte auquel on a accord l'accs

    Une adresse IP partielle
    -

    Exemple :

    - Allow from 10.1
    - Allow from 10 172.20 192.168.2 -

    +
    Allow from 10.1
    +Allow from 10 172.20 192.168.2
    +

    De un trois des premiers octets d'une adresse IP, afin de restreindre l'accs un sous-rseau.

    Une paire rseau/masque de sous-rseau
    -

    Exemple :

    - Allow from 10.1.0.0/255.255.0.0 -

    +
    Allow from 10.1.0.0/255.255.0.0
    +

    Un rseau a.b.c.d, et un masque de sous-rseau w.x.y.z, pour une dfinition plus prcise de la restriction d'accs impose un sous-rseau.

    @@ -171,9 +185,8 @@ d'environnement
    Une spcification CIDR rseau/nnn
    -

    Exemple :

    - Allow from 10.1.0.0/16 -

    +
    Allow from 10.1.0.0/16
    +

    Identique au cas prcdent, mis part que le masque est constitu des nnn bits de poids fort.

    @@ -184,10 +197,9 @@ d'environnement

    On peut spcifier des adresses et sous-rseaux IPv6 de la manire suivante :

    -

    - Allow from 2001:db8::a00:20ff:fea7:ccea
    - Allow from 2001:db8::a00:20ff:fea7:ccea/10 -

    +
    Allow from 2001:db8::a00:20ff:fea7:ccea
    +Allow from 2001:db8::a00:20ff:fea7:ccea/10
    +

    Le troisime format d'argument de la directive Allow permet de contrler l'accs au serveur @@ -206,24 +218,27 @@ d'environnement (type de navigateur) des clients, le Referer, ou d'autres champs d'en-tte de la requte HTTP.

    -

    Exemple :

    - SetEnvIf User-Agent ^KnockKnock/2\.0 laissez_moi_entrer
    - <Directory /docroot>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=laissez_moi_entrer
    -
    - </Directory> -

    +
    SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory "/docroot">
    +    Order Deny,Allow
    +    Deny from all
    +    Allow from env=let_me_in
    +</Directory>
    +

    Dans cet exemple, les navigateurs dont la chane user-agent commence par KnockKnock/2.0 se verront accorder l'accs, alors que tous les autres seront rejets.

    +

    Fusion des sections de configuration

    +

    Lorsqu'une directive fournie par ce module est utilise dans + une nouvelle section de configuration, cette dernire n'hrite + d'aucune directive dfinie dans une section prcdente.

    +
    +
    top
    -
    Description:Spcifie quels htes peuvent accder une certaine zone du serveur
    @@ -243,7 +258,7 @@ d'environnement
    top
    -
    Description:Dfinit quels htes ne sont pas autoriss accder au serveur
  • Action
  • Script
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Action Directive

    @@ -75,22 +79,18 @@ introduced in Apache 2.1 environment variables. The handler used for the particular request is passed using the REDIRECT_HANDLER variable.

    -

    Example: MIME type

    - # Requests for files of a particular MIME content type:
    - Action image/gif /cgi-bin/images.cgi
    -
    -

    +

    Example: MIME type

    # Requests for files of a particular MIME content type:
    +Action image/gif /cgi-bin/images.cgi
    +

    In this example, requests for files with a MIME content type of image/gif will be handled by the specified cgi script /cgi-bin/images.cgi.

    -

    Example: File extension

    - # Files of a particular file extension
    - AddHandler my-file-type .xyz
    - Action my-file-type /cgi-bin/program.cgi
    -

    - +

    Example: File extension

    # Files of a particular file extension
    +AddHandler my-file-type .xyz
    +Action my-file-type "/cgi-bin/program.cgi"
    +

    In this example, requests for files with a file extension of .xyz are handled by the specified cgi script /cgi-bin/program.cgi.

    @@ -100,14 +100,11 @@ introduced in Apache 2.1 if you want to use the Action directive in virtual locations.

    -

    Example

    - <Location /news>
    - - SetHandler news-handler
    - Action news-handler /cgi-bin/news.cgi virtual
    -
    - </Location> -

    +
    <Location "/news">
    +    SetHandler news-handler
    +    Action news-handler "/cgi-bin/news.cgi" virtual
    +</Location>
    +

    See also

      @@ -147,13 +144,12 @@ method. (e.g., foo.html?hi). Otherwise, the request will proceed normally.

      -

      Examples

      - # All GET requests go here
      - Script GET /cgi-bin/search
      -
      - # A CGI PUT handler
      - Script PUT /~bob/put.cgi
      -

      +
      # All GET requests go here
      +Script GET "/cgi-bin/search"
      +
      +# A CGI PUT handler
      +Script PUT "/~bob/put.cgi"
      +
    @@ -163,7 +159,28 @@ method. fr  |  ja  |  ko 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_actions.html.fr b/docs/manual/mod/mod_actions.html.fr index 8df84af977a..be475bf7069 100644 --- a/docs/manual/mod/mod_actions.html.fr +++ b/docs/manual/mod/mod_actions.html.fr @@ -1,23 +1,28 @@ - -mod_actions - Serveur Apache HTTP +mod_actions - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_actions

    @@ -27,7 +32,7 @@  ja  |  ko 

    -
    Description:Dfinit le statut d'accs par dfaut et l'ordre dans lequel les directives Allow et @@ -337,11 +352,10 @@ les directives Allow et l'autorisation d'accs ; tous les autres voient leur accs refus.

    -

    - Order Deny,Allow
    - Deny from all
    - Allow from example.org -

    +
    Order Deny,Allow
    +Deny from all
    +Allow from example.org
    +

    Dans l'exemple suivant, tous les htes du domaine example.org ont l'autorisation d'accs, sauf ceux du sous-domaine foo.example.org qui @@ -350,11 +364,10 @@ les directives Allow et sur Deny, et consiste donc en un refus d'accs.

    -

    - Order Allow,Deny
    - Allow from example.org
    - Deny from foo.example.org -

    +
    Order Allow,Deny
    +Allow from example.org
    +Deny from foo.example.org
    +

    Par contre, si la valeur de la directive Order, dans l'exemple prcdent, est @@ -373,13 +386,10 @@ les directives Allow et l'abscence de directives Allow et Deny associes, cause de son influence sur le statut par dfaut. Par exemple,

    -

    - <Directory /www>
    - - Order Allow,Deny
    -
    - </Directory> -

    +
    <Directory "/www">
    +    Order Allow,Deny
    +</Directory>
    +

    va interdire tout accs au rpertoire /www cause du statut d'accs par dfaut qui est dfini Deny.

    @@ -397,9 +407,15 @@ les directives Allow et le document Comment fonctionnent les sections Directory, Location et Files.

    +

    Fusion des sections de configuration

    +

    Lorsqu'une directive fournie par ce module est utilise dans + une nouvelle section de configuration, cette dernire n'hrite + d'aucune directive dfinie dans une section prcdente.

    +
    +
    top
    -

    Satisfy Directive

    +

    Directive Satisfy

    @@ -432,11 +448,10 @@ et l'authentification utilisateur que l'accs cette zone ncessite un mot de passe pour les autres utilisateurs, vous pouvez utiliser une configuration du style :

    -

    - Require valid-user
    - Allow from 192.168.1
    - Satisfy Any -

    +
    Require valid-user
    +Allow from 192.168.1
    +Satisfy Any
    +

    Une autre utilisation frquente de la directive @@ -445,16 +460,15 @@ et l'authentification utilisateur rpertoire parent :

    -

    - <Directory /var/www/private>
    - Require valid-user
    - </Directory>
    -
    - <Directory /var/www/private/public>
    - Allow from all
    - Satisfy Any
    - </Directory> -

    +
    <Directory "/var/www/private">
    +    Require valid-user
    +</Directory>
    +
    +<Directory "/var/www/private/public">
    +    Allow from all
    +    Satisfy Any
    +</Directory>
    +

    Dans l'exemple ci-dessus, l'accs au rpertoire /var/www/private ncessitera une authentification, @@ -466,6 +480,12 @@ et l'authentification utilisateur Satisfy peuvent tre restreintes certaines mthodes particulires l'aide des sections <Limit> et <LimitExcept>.

    +

    Fusion des sections de configuration

    +

    Lorsqu'une directive fournie par ce module est utilise dans + une nouvelle section de configuration, cette dernire n'hrite + d'aucune directive dfinie dans une section prcdente.

    +
    +

    Voir aussi

    • Allow
    • @@ -477,7 +497,28 @@ et l'authentification utilisateur

      Langues Disponibles:  en  |  fr  |  ja 

      - +
      top

      Commentaires

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_access_compat.html.ja.utf8 b/docs/manual/mod/mod_access_compat.html.ja.utf8 index 439c3a85e1d..0f40944704c 100644 --- a/docs/manual/mod/mod_access_compat.html.ja.utf8 +++ b/docs/manual/mod/mod_access_compat.html.ja.utf8 @@ -1,33 +1,39 @@ - -mod_access_compat - Apache HTTP サーバ +mod_access_compat - Apache HTTP サーバ バージョン 2.4 - + + + + +

      Apache HTTP サーバ バージョン 2.4

      +
      <-
      +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

      Apache モジュール mod_access_compat

      -

      言語:  en  | +

      翻訳済み言語:  en  |  fr  |  ja 

      -
      この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
      +
      この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Interaction entre le contrle d'accs en fonction de l'hte et l'authentification utilisateur
    @@ -82,12 +88,12 @@
  • Order
  • Satisfy
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    Allow ディレクティブ

    @@ -264,14 +270,14 @@ Deny 行はもう一つのグループとみなされます。 またデフォルト状態は単独で一つのグループとみなされます。

    -

    Order 設定は以下の以下のどれかです。

    +

    Order 設定は以下のどれかです。

    Allow,Deny
    まず Allow ディレクティブが適用されます。どれにもマッチしなかった場合、この時点で - リクエストは拒否されます。次に、全ての + リクエストは拒否されます。次に、全ての Deny ディレクティブが適用されます。どれか一つでもマッチした場合は、 リクエストは拒否されます。 最後に、 Allow にも Deny にもマッチしなかったリクエストは @@ -440,10 +446,31 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_access_compat.xml b/docs/manual/mod/mod_access_compat.xml index a4b747a01fd..1feda128714 100644 --- a/docs/manual/mod/mod_access_compat.xml +++ b/docs/manual/mod/mod_access_compat.xml @@ -59,9 +59,19 @@ have been deprecated by the new authz refactoring. Please see Note

    The directives provided by mod_access_compat have - been deprecated by the new authz refactoring. Please see - mod_authz_host.

    -
    + been deprecated by mod_authz_host. + Mixing old directives like Order, Allow or Deny with new ones like + Require is technically possible + but discouraged. This module was created to support + configurations containing only old directives to facilitate the 2.4 upgrade. + Please check the upgrading guide for more + information. +

    +

    In general, access restriction directives apply to all access methods (GET, PUT, @@ -69,6 +79,13 @@ have been deprecated by the new authz refactoring. Please see cases. However, it is possible to restrict some methods, while leaving other methods unrestricted, by enclosing the directives in a Limit section.

    + + Merging of configuration sections +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + Require @@ -106,10 +123,10 @@ server
    A (partial) domain-name
    - Example: - Allow from example.org
    - Allow from .net example.edu -
    + +Allow from example.org +Allow from .net example.edu +

    Hosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above example will match foo.example.org but it will not @@ -126,37 +143,37 @@ server

    A full IP address
    - Example: - Allow from 10.1.2.3
    - Allow from 192.168.1.104 192.168.1.205 -
    + +Allow from 10.1.2.3 +Allow from 192.168.1.104 192.168.1.205 +

    An IP address of a host allowed access

    A partial IP address
    - Example: - Allow from 10.1
    - Allow from 10 172.20 192.168.2 -
    + +Allow from 10.1 +Allow from 10 172.20 192.168.2 +

    The first 1 to 3 bytes of an IP address, for subnet restriction.

    A network/netmask pair
    - Example: + Allow from 10.1.0.0/255.255.0.0 - +

    A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.

    A network/nnn CIDR specification
    - Example: + Allow from 10.1.0.0/16 - +

    Similar to the previous case, except the netmask consists of nnn high-order 1 bits.

    @@ -167,10 +184,10 @@ server

    IPv6 addresses and IPv6 subnets can be specified as shown below:

    - - Allow from 2001:db8::a00:20ff:fea7:ccea
    - Allow from 2001:db8::a00:20ff:fea7:ccea/10 -
    + +Allow from 2001:db8::a00:20ff:fea7:ccea +Allow from 2001:db8::a00:20ff:fea7:ccea/10 +

    The third format of the arguments to the Allow directive allows access to the server @@ -189,20 +206,25 @@ server User-Agent (browser type), Referer, or other HTTP request header fields.

    - Example: - SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    - <Directory /docroot>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=let_me_in
    -
    - </Directory> -
    + +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +<Directory "/docroot"> + Order Deny,Allow + Deny from all + Allow from env=let_me_in +</Directory> +

    In this case, browsers with a user-agent string beginning with KnockKnock/2.0 will be allowed access, and all others will be denied.

    + + Merging of configuration sections +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + @@ -327,11 +349,11 @@ evaluated.

    In the following example, all hosts in the example.org domain are allowed access; all other hosts are denied access.

    - - Order Deny,Allow
    - Deny from all
    - Allow from example.org -
    + +Order Deny,Allow +Deny from all +Allow from example.org +

    In the next example, all hosts in the example.org domain are allowed access, except for the hosts which are in the @@ -340,11 +362,11 @@ evaluated. state is to Deny access to the server.

    - - Order Allow,Deny
    - Allow from example.org
    - Deny from foo.example.org -
    + +Order Allow,Deny +Allow from example.org +Deny from foo.example.org +

    On the other hand, if the Order in the last example is changed to Deny,Allow, all hosts will @@ -363,13 +385,11 @@ evaluated. directives because of its effect on the default access state. For example,

    - - <Directory /www>
    - - Order Allow,Deny
    -
    - </Directory> -
    + +<Directory "/www"> + Order Allow,Deny +</Directory> +

    will Deny all access to the /www directory because the default access state is set to @@ -390,6 +410,13 @@ evaluated. of configuration sections, see the documentation on How Directory, Location and Files sections work.

    + + Merging of configuration sections +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + @@ -427,27 +454,27 @@ later people outside of your network provide a password, you could use a configuration similar to the following:

    - - Require valid-user
    - Allow from 192.168.1
    - Satisfy Any -
    + +Require valid-user +Allow from 192.168.1 +Satisfy Any +

    Another frequent use of the Satisfy directive is to relax access restrictions for a subdirectory:

    - - <Directory /var/www/private>
    - Require valid-user
    - </Directory>
    -
    - <Directory /var/www/private/public>
    - Allow from all
    - Satisfy Any
    - </Directory> -
    + +<Directory "/var/www/private"> + Require valid-user +</Directory> + +<Directory "/var/www/private/public"> + Allow from all + Satisfy Any +</Directory> +

    In the above example, authentication will be required for the /var/www/private directory, but will not be required @@ -457,6 +484,13 @@ later be restricted to particular methods by Limit and LimitExcept sections.

    + + Merging of configuration sections +

    When any directive provided by this module is used in a new + configuration section, no directives provided by this module are + inherited from previous configuration sections.

    +
    + Allow Require diff --git a/docs/manual/mod/mod_access_compat.xml.fr b/docs/manual/mod/mod_access_compat.xml.fr index fea494c3f24..7382a2cfc60 100644 --- a/docs/manual/mod/mod_access_compat.xml.fr +++ b/docs/manual/mod/mod_access_compat.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,15 +25,15 @@ mod_access_compat -Autorisations de groupe à base de nom d'hôte (nom ou +Autorisations de groupe à base de nom d'hôte (nom ou adresse IP) Extension mod_access_compat.c access_compat_module Disponible dans la version 2.3 du serveur HTTP Apache -à des fins de compatibilité -avec les précédentes versions d'Apache httpd 2.x. Les directives fournies par -ce module sont devenues obsolètes depuis la refonte d'authz. Voir +à des fins de compatibilité +avec les précédentes versions d'Apache httpd 2.x. Les directives fournies par +ce module sont devenues obsolètes depuis la refonte d'authz. Voir mod_authz_host @@ -44,41 +44,57 @@ ce module sont devenues obsolètes depuis la refonte d'authz. Voir Location, ainsi que dans les fichiers .htaccess et permettent - de contrôler l'accès à certaines parties du serveur. On peut - contrôler cet accès en fonction du nom d'hôte du client, de son - adresse IP ou d'autres caractéristiques de la requête, telles - qu'elles sont enregistrées dans les variables + de contrôler l'accès à certaines parties du serveur. On peut + contrôler cet accès en fonction du nom d'hôte du client, de son + adresse IP ou d'autres caractéristiques de la requête, telles + qu'elles sont enregistrées dans les variables d'environnement. Les directives Allow et Deny permettent de spécifier - quels clients sont ou ne sont pas autorisés à accéder au serveur, + module="mod_access_compat">Deny permettent de spécifier + quels clients sont ou ne sont pas autorisés à accéder au serveur, alors que la directive Order définit le statut - d'accès par défaut, et détermine la manière dont les directives + module="mod_access_compat">Order définit le statut + d'accès par défaut, et détermine la manière dont les directives Allow et Deny interagissent entre elles.

    -

    Les restrictions d'accès à base de nom d'hôte et - l'authentification à base de mot de passe peuvent être implémentées - simultanément. Dans ce cas, on utilise la directive Satisfy pour déterminer la - manière dont ces deux modes de restrictions interagissent.

    +

    Les restrictions d'accès à base de nom d'hôte et + l'authentification à base de mot de passe peuvent être implémentées + simultanément. Dans ce cas, on utilise la directive Satisfy pour déterminer la + manière dont ces deux modes de restrictions interagissent.

    Note

    Les directives fournies par le module - mod_access_compat sont devenues obsolètes depuis - la refonte d'authz. Voir mod_authz_host.

    + mod_access_compat sont devenues obsolètes depuis + la refonte du module mod_authz_host. Mélanger d'anciennes + directives comme Order, Allow ou Deny avec des nouvelles comme + Require est techniquement + possible mais déconseillé. En effet, mod_access_compat a + été conçu pour supporter des configurations ne contenant que des anciennes + directives afin de faciliter le passage à la version 2.4. Voir le document + upgrading pour plus de détails. +

    -

    En général, les directives de restriction d'accès s'appliquent à - toutes les méthodes d'accès (GET, PUT, +

    En général, les directives de restriction d'accès s'appliquent à + toutes les méthodes d'accès (GET, PUT, POST, etc...). C'est d'ailleurs ce que l'on souhaite dans la plupart des cas. Il est cependant possible de restreindre - certaines méthodes, alors que les autres méthodes ne se verront - imposée aucune restriction, en regroupant les directives à - l'intérieur d'une section Limit.

    + + Fusion des sections de configuration +

    Lorsqu'une directive fournie par ce module est utilisée dans + une nouvelle section de configuration, cette dernière n'hérite + d'aucune directive définie dans une section précédente.

    +
    Require @@ -87,155 +103,159 @@ ce module sont devenues obsolètes depuis la refonte d'authz. Voir Allow -Spécifie quels hôtes peuvent accéder à une certaine zone du +Spécifie quels hôtes peuvent accéder à une certaine zone du serveur - Allow from all|hôte|env=[!]variable + Allow from all|hôte|env=[!]variable d'environnement -[hôte|env=[!]variable d'environnement] ... +[hôte|env=[!]variable d'environnement] ... directory.htaccess Limit -

    La directive Allow permet de définir quels - hôtes ont le droit d'accéder à une certaine partie du serveur. On - peut contrôler l'accès par nom d'hôte, adresse IP, intervalle - d'adresses IP, ou toute autre caractéristique de la requête client - enregistrée dans les variables d'environnement.

    +

    La directive Allow permet de définir quels + hôtes ont le droit d'accéder à une certaine partie du serveur. On + peut contrôler l'accès par nom d'hôte, adresse IP, intervalle + d'adresses IP, ou toute autre caractéristique de la requête client + enregistrée dans les variables d'environnement.

    Le premier argument de cette directive est toujours from. Les arguments suivants peuvent prendre trois - formes différentes. Si Allow from all est spécifié, - tout hôte se voit accordé l'accès, en tenant compte des directives + formes différentes. Si Allow from all est spécifié, + tout hôte se voit accordé l'accès, en tenant compte des directives Deny et Order comme décrit plus loin. - Pour ne permettre l'accès au serveur qu'à un hôte ou un groupe - d'hôtes particuliers, on peut spécifier un nom d'hôte sous + module="mod_access_compat">Order comme décrit plus loin. + Pour ne permettre l'accès au serveur qu'à un hôte ou un groupe + d'hôtes particuliers, on peut spécifier un nom d'hôte sous une des formes suivantes :

    Un nom de domaine (partiel)
    - Exemple : - Allow from example.org
    - Allow from .net example.edu -
    -

    Les hôtes dont les noms correspondent ou se terminent par la - chaîne spécifiée ont l'autorisation d'accès. Seules les - composantes entières du nom d'hôte doivent correspondre ; ainsi, + +Allow from example.org +Allow from .net example.edu + +

    Les hôtes dont les noms correspondent ou se terminent par la + chaîne spécifiée ont l'autorisation d'accès. Seules les + composantes entières du nom d'hôte doivent correspondre ; ainsi, dans l'exemple ci-dessus, foo.example.org correspondra, mais fooexample.org ne conviendra pas. Avec cette configuration, Apache httpd va effectuer une double recherche DNS sur l'adresse IP du client, sans tenir compte de la - définition de la directive HostnameLookups. Tout d'abord, une - recherche DNS inverse sur l'adresse IP est effectuée pour - déterminer le nom d'hôte associé, puis une recherche directe sur - le nom d'hôte est effectuée afin de s'assurer qu'il correspond - bien à l'adresse IP originale. L'accès ne sera accordé que si le - nom d'hôte correspond et si les recherches DNS inverse et directe + recherche DNS inverse sur l'adresse IP est effectuée pour + déterminer le nom d'hôte associé, puis une recherche directe sur + le nom d'hôte est effectuée afin de s'assurer qu'il correspond + bien à l'adresse IP originale. L'accès ne sera accordé que si le + nom d'hôte correspond et si les recherches DNS inverse et directe concordent.

    -
    Une adresse IP complète
    +
    Une adresse IP complète
    - Exemple : - Allow from 10.1.2.3
    - Allow from 192.168.1.104 192.168.1.205 -
    -

    L'adresse IP d'un hôte auquel on a accordé l'accès

    + +Allow from 10.1.2.3 +Allow from 192.168.1.104 192.168.1.205 + +

    L'adresse IP d'un hôte auquel on a accordé l'accès

    Une adresse IP partielle
    - Exemple : - Allow from 10.1
    - Allow from 10 172.20 192.168.2 -
    -

    De un à trois des premiers octets d'une adresse IP, afin de - restreindre l'accès à un sous-réseau.

    + +Allow from 10.1 +Allow from 10 172.20 192.168.2 + +

    De un à trois des premiers octets d'une adresse IP, afin de + restreindre l'accès à un sous-réseau.

    -
    Une paire réseau/masque de sous-réseau
    +
    Une paire réseau/masque de sous-réseau
    - Exemple : + Allow from 10.1.0.0/255.255.0.0 - -

    Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z, pour - une définition plus précise de la restriction d'accès imposée à un - sous-réseau.

    + +

    Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z, pour + une définition plus précise de la restriction d'accès imposée à un + sous-réseau.

    -
    Une spécification CIDR réseau/nnn
    +
    Une spécification CIDR réseau/nnn
    - Exemple : + Allow from 10.1.0.0/16 - -

    Identique au cas précédent, mis à part que le masque est - constitué des nnn bits de poids fort.

    + +

    Identique au cas précédent, mis à part que le masque est + constitué des nnn bits de poids fort.

    -

    Notez que les trois derniers exemples désignent le même ensemble - d'hôtes.

    +

    Notez que les trois derniers exemples désignent le même ensemble + d'hôtes.

    -

    On peut spécifier des adresses et sous-réseaux IPv6 de la manière +

    On peut spécifier des adresses et sous-réseaux IPv6 de la manière suivante :

    - - Allow from 2001:db8::a00:20ff:fea7:ccea
    - Allow from 2001:db8::a00:20ff:fea7:ccea/10 -
    + +Allow from 2001:db8::a00:20ff:fea7:ccea +Allow from 2001:db8::a00:20ff:fea7:ccea/10 + -

    Le troisième format d'argument de la directive - Allow permet de contrôler l'accès au serveur +

    Le troisième format d'argument de la directive + Allow permet de contrôler l'accès au serveur en fonction de l'existence d'une variable d'environnement. Lorsque Allow - from env=variable d'environnement est spécifié, la - requête est autorisée si la variable d'environnement variable + from env=variable d'environnement est spécifié, la + requête est autorisée si la variable d'environnement variable d'environnement existe. En revanche, lorsque Allow from - env=!env-variable est spécifié, la - requête est autorisée si la variable d'environnement variable - d'environnement n'existe pas. Le serveur permet de définir + env=!env-variable est spécifié, la + requête est autorisée si la variable d'environnement variable + d'environnement n'existe pas. Le serveur permet de définir avec souplesse des variables d'environnement en se basant sur les - caractéristiques de la requête client et en utilisant les directives + caractéristiques de la requête client et en utilisant les directives fournies par le module mod_setenvif. Ainsi, on peut utiliser la directive Allow pour permettre - l'accès en fonction de paramètres comme le User-Agent + l'accès en fonction de paramètres comme le User-Agent (type de navigateur) des clients, le Referer, ou - d'autres champs d'en-tête de la requête HTTP.

    - - Exemple : - SetEnvIf User-Agent ^KnockKnock/2\.0 laissez_moi_entrer
    - <Directory /docroot>
    - - Order Deny,Allow
    - Deny from all
    - Allow from env=laissez_moi_entrer
    -
    - </Directory> -
    - -

    Dans cet exemple, les navigateurs dont la chaîne user-agent + d'autres champs d'en-tête de la requête HTTP.

    + + +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +<Directory "/docroot"> + Order Deny,Allow + Deny from all + Allow from env=let_me_in +</Directory> + + +

    Dans cet exemple, les navigateurs dont la chaîne user-agent commence par KnockKnock/2.0 se verront accorder - l'accès, alors que tous les autres seront rejetés.

    + l'accès, alors que tous les autres seront rejetés.

    + + Fusion des sections de configuration +

    Lorsqu'une directive fournie par ce module est utilisée dans + une nouvelle section de configuration, cette dernière n'hérite + d'aucune directive définie dans une section précédente.

    +
    Deny -Définit quels hôtes ne sont pas autorisés à accéder au +Définit quels hôtes ne sont pas autorisés à accéder au serveur - Deny from all|hôte|env=[!]variable + Deny from all|hôte|env=[!]variable d'environnement -[hôte|env=[!]variable d'environnement] ... +[hôte|env=[!]variable d'environnement] ... directory.htaccess Limit -

    Cette directive permet de restreindre l'accès au serveur en - fonction du nom d'hôte, de l'adresse IP ou de variables +

    Cette directive permet de restreindre l'accès au serveur en + fonction du nom d'hôte, de l'adresse IP ou de variables d'environnement. Les arguments de la directive Deny sont identiques aux arguments de la directive Order -Définit le statut d'accès par défaut et l'ordre dans lequel +Définit le statut d'accès par défaut et l'ordre dans lequel les directives Allow et -Deny sont évaluées. +Deny sont évaluées. Order ordre Order Deny,Allow directory.htaccess @@ -256,242 +276,252 @@ les directives Allow et -

    La directive Order, associée aux +

    La directive Order, associée aux directives Allow et Deny, - implémente un système de contrôle d'accès en trois passes. Au cours - de la première passe, ce sont soit toutes les directives Allow, soit toutes les directives Deny qui sont traitées, selon - la définition de la directive Deny qui sont traitées, selon + la définition de la directive Order. Le reste des directives (Deny ou Allow) est - traité au cours de la seconde passe. La troisième passe s'applique à - toutes les requêtes qui ne sont concernées par aucune des deux - premières passes.

    + traité au cours de la seconde passe. La troisième passe s'applique à + toutes les requêtes qui ne sont concernées par aucune des deux + premières passes.

    Notez que toutes les directives Allow et Deny sont traitées, à la - différence d'un pare-feu classique où seule la première règle qui - correspond est utilisée. La dernière directive qui correspond - s'applique ( à la différence là encore d'un pare-feu classique). De + module="mod_access_compat">Deny sont traitées, à la + différence d'un pare-feu classique où seule la première règle qui + correspond est utilisée. La dernière directive qui correspond + s'applique ( à la différence là encore d'un pare-feu classique). De plus, l'ordre dans lequel les lignes apparaissent dans le fichier de configuration n'a pas d'incidence -- toutes les lignes Allow sont considérées comme + module="mod_access_compat">Allow sont considérées comme un groupe, toutes les lignes Deny comme un autre, et le - statut par défaut a son existence propre.

    + statut par défaut a son existence propre.

    -

    Ordre peut être :

    +

    Ordre peut être :

    Allow,Deny
    Dans un premier temps, toutes les directives Allow sont évaluées ; au - moins une d'entre elles doit correspondre, sinon la requête est - rejetée. Ensuite, toutes les directives Deny sont évaluées. Si au - moins l'une d'entre elles correspond, la requête est rejetée. - Enfin, toute requête qui ne correspond à aucune directive + module="mod_access_compat">Allow sont évaluées ; au + moins une d'entre elles doit correspondre, sinon la requête est + rejetée. Ensuite, toutes les directives Deny sont évaluées. Si au + moins l'une d'entre elles correspond, la requête est rejetée. + Enfin, toute requête qui ne correspond à aucune directive Allow ou - Deny est rejetée - par défaut.
    + Deny est rejetée + par défaut.
    Deny,Allow
    Dans un premier temps, toutes les directives Deny sont évaluées ; Si au - moins une d'entre elles correspond, la requête est rejetée, - à moins qu'elle corresponde aussi à une directive + module="mod_access_compat">Deny sont évaluées ; Si au + moins une d'entre elles correspond, la requête est rejetée, + à moins qu'elle corresponde aussi à une directive Allow. Toute - requête qui ne correspond à aucune directive Allow ou Deny est autorisée.
    + module="mod_access_compat">Deny est autorisée.
    Mutual-failure
    -
    Cet argument a le même effet que Allow,Deny et - est devenu de ce fait obsolète.
    +
    Cet argument a le même effet que Allow,Deny et + est devenu de ce fait obsolète.
    -

    Les mots-clés ne peuvent être séparés que par des virgules ; +

    Les mots-clés ne peuvent être séparés que par des virgules ; aucun espace ne doit s'intercaler entre eux.

    説明:ホスト (名前もしくは IP アドレス) に基づいたグループ承認
    ステータス:Extension
    モジュール識別子:access_compat_module
    - - + + - - - + + + - - - + + + - - + + - - - + + +
    MatchRésultat Allow,DenyRésultat Deny,AllowRésultat Allow,DenyRésultat Deny,Allow
    Correspond à Allow seulementRequête autoriséeRequête autoriséeCorrespond à Allow seulementRequête autoriséeRequête autorisée
    Correspond à Deny seulementRequête rejetéeRequête rejetéeCorrespond à Deny seulementRequête rejetéeRequête rejetée
    Aucune correspondancePar défaut la seconde directive : rejetPar défaut la seconde directive : autorisationPar défaut la seconde directive : rejetPar défaut la seconde directive : autorisation
    Correspond à Allow & DenyLa dernière correspondance l'emporte : rejetLa dernière correspondance l'emporte : autorisationCorrespond à Allow & DenyLa dernière correspondance l'emporte : rejetLa dernière correspondance l'emporte : autorisation
    -

    Dans cet exemple, tous les hôtes du domaine example.org ont - l'autorisation d'accès ; tous les autres voient leur accès - refusé.

    +

    Dans cet exemple, tous les hôtes du domaine example.org ont + l'autorisation d'accès ; tous les autres voient leur accès + refusé.

    - - Order Deny,Allow
    - Deny from all
    - Allow from example.org -
    + +Order Deny,Allow +Deny from all +Allow from example.org + -

    Dans l'exemple suivant, tous les hôtes du domaine example.org ont - l'autorisation d'accès, sauf ceux du sous-domaine foo.example.org qui - voient leur accès refusé. Tous les hôtes qui ne sont pas dans le - domaine example.org sont rejetés car le statut par défaut est positionné +

    Dans l'exemple suivant, tous les hôtes du domaine example.org ont + l'autorisation d'accès, sauf ceux du sous-domaine foo.example.org qui + voient leur accès refusé. Tous les hôtes qui ne sont pas dans le + domaine example.org sont rejetés car le statut par défaut est positionné sur Deny, et consiste donc en un - refus d'accès.

    + refus d'accès.

    - - Order Allow,Deny
    - Allow from example.org
    - Deny from foo.example.org -
    + +Order Allow,Deny +Allow from example.org +Deny from foo.example.org +

    Par contre, si la valeur de la directive - Order, dans l'exemple précédent, est - Deny,Allow, tout le monde a l'autorisation d'accès. - Ceci est dû au fait que Allow from example.org sera - évalué en dernier, sans tenir compte de l'ordre réel dans lequel les + Order, dans l'exemple précédent, est + Deny,Allow, tout le monde a l'autorisation d'accès. + Ceci est dû au fait que Allow from example.org sera + évalué en dernier, sans tenir compte de l'ordre réel dans lequel les directives apparaissent dans le fichier de configuration, et va - l'emporter sur Deny from foo.example.org. Tout hôte qui + l'emporter sur Deny from foo.example.org. Tout hôte qui n'est pas dans le domaine example.org aura aussi - l'autorisation d'accès car le statut par défaut est positionné sur + l'autorisation d'accès car le statut par défaut est positionné sur Allow et constitue donc une - autorisation d'accès.

    + autorisation d'accès.

    -

    La présence d'une directive Order peut - affecter le contrôle d'accès à une partie du serveur même en +

    La présence d'une directive Order peut + affecter le contrôle d'accès à une partie du serveur même en l'abscence de directives Allow et Deny associées, à cause de - son influence sur le statut par défaut. Par exemple,

    - - - <Directory /www>
    - - Order Allow,Deny
    -
    - </Directory> -
    - -

    va interdire tout accès au répertoire /www à cause - du statut d'accès par défaut qui est défini à Deny associées, à cause de + son influence sur le statut par défaut. Par exemple,

    + + +<Directory "/www"> + Order Allow,Deny +</Directory> + + +

    va interdire tout accès au répertoire /www à cause + du statut d'accès par défaut qui est défini à Deny.

    -

    La directive Order ne contrôle l'ordre - dans lequel sont traitées les directives d'accès qu'au cours de +

    La directive Order ne contrôle l'ordre + dans lequel sont traitées les directives d'accès qu'au cours de chaque phase du traitement de la configuration du serveur. Ceci implique, par exemple, qu'une directive Allow ou Deny située dans une section + module="mod_access_compat">Deny située dans une section Location sera - toujours évaluée après une directive Allow ou Deny située dans une section + module="mod_access_compat">Deny située dans une section Directory ou un fichier .htaccess, sans tenir compte de la - définition de la directive Order. Pour plus - de détails à propos de la fusion des sections de configuration, voir + définition de la directive Order. Pour plus + de détails à propos de la fusion des sections de configuration, voir le document Comment fonctionnent les sections Directory, Location et Files.

    + + Fusion des sections de configuration +

    Lorsqu'une directive fournie par ce module est utilisée dans + une nouvelle section de configuration, cette dernière n'hérite + d'aucune directive définie dans une section précédente.

    +
    Satisfy -Interaction entre le contrôle d'accès en fonction de l'hôte +Interaction entre le contrôle d'accès en fonction de l'hôte et l'authentification utilisateur Satisfy Any|All Satisfy All directory.htaccess AuthConfig -Affecté par Affecté par Limit et LimitExcept à partir de la version +type="section">LimitExcept à partir de la version 2.0.51 -

    Politique d'accès dans le cas où on utilise à la fois Politique d'accès dans le cas où on utilise à la fois Allow et Require. L'argument est soit All, soit Any. L'utilisation de cette - directive n'a de sens que si l'accès à une zone particulière du + directive n'a de sens que si l'accès à une zone particulière du serveur est restreinte par utilisateur/mot de passe et en fonction - de l'adresse IP de l'hôte client. Dans ce cas, par - défaut (All), le client doit satisfaire à la + de l'adresse IP de l'hôte client. Dans ce cas, par + défaut (All), le client doit satisfaire à la restriction d'adresse, et fournir un couple utilisateur/mot de passe valide. Avec l'argument Any, - le client se verra accorder l'accès s'il satisfait à la restriction + le client se verra accorder l'accès s'il satisfait à la restriction d'adresse ou fournit un couple utilisateur/mot de passe valide. On - peut utiliser cette dernière définition pour restreindre l'accès à - une zone par mot de passe, mais accorder l'accès aux clients - possédant certaines adresses IP sans qu'ils aient à fournir de mot + peut utiliser cette dernière définition pour restreindre l'accès à + une zone par mot de passe, mais accorder l'accès aux clients + possédant certaines adresses IP sans qu'ils aient à fournir de mot de passe.

    Par exemple, si vous souhaitez que les utilisateurs de votre - réseau accèdent à une zone de votre site web sans restriction, mais - que l'accès à cette zone nécessite un mot de passe pour les autres + réseau accèdent à une zone de votre site web sans restriction, mais + que l'accès à cette zone nécessite un mot de passe pour les autres utilisateurs, vous pouvez utiliser une configuration du style :

    - - Require valid-user
    - Allow from 192.168.1
    - Satisfy Any -
    + +Require valid-user +Allow from 192.168.1 +Satisfy Any +

    - Une autre utilisation fréquente de la directive - Satisfy est l'allègement des restrictions - d'accès à un sous-répertoire par rapport aux restrictions d'accès au - répertoire parent : + Une autre utilisation fréquente de la directive + Satisfy est l'allègement des restrictions + d'accès à un sous-répertoire par rapport aux restrictions d'accès au + répertoire parent :

    - - <Directory /var/www/private>
    - Require valid-user
    - </Directory>
    -
    - <Directory /var/www/private/public>
    - Allow from all
    - Satisfy Any
    - </Directory> -
    + +<Directory "/var/www/private"> + Require valid-user +</Directory> -

    Dans l'exemple ci-dessus, l'accès au répertoire - /var/www/private nécessitera une authentification, - alors que l'accès au répertoire /var/www/private/public - sera accordé sans restriction.

    +<Directory "/var/www/private/public"> + Allow from all + Satisfy Any +</Directory> +
    + +

    Dans l'exemple ci-dessus, l'accès au répertoire + /var/www/private nécessitera une authentification, + alors que l'accès au répertoire /var/www/private/public + sera accordé sans restriction.

    Depuis la version 2.0.51, les directives - Satisfy peuvent être restreintes à certaines - méthodes particulières à l'aide des sections Satisfy peuvent être restreintes à certaines + méthodes particulières à l'aide des sections Limit et LimitExcept.

    + + Fusion des sections de configuration +

    Lorsqu'une directive fournie par ce module est utilisée dans + une nouvelle section de configuration, cette dernière n'hérite + d'aucune directive définie dans une section précédente.

    +
    Allow Require diff --git a/docs/manual/mod/mod_access_compat.xml.ja b/docs/manual/mod/mod_access_compat.xml.ja index aecab6b2e2c..6a165ed9c5b 100644 --- a/docs/manual/mod/mod_access_compat.xml.ja +++ b/docs/manual/mod/mod_access_compat.xml.ja @@ -1,7 +1,7 @@ - + -mod_actions - Apache HTTP Server +mod_actions - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Apache-Modul mod_actions

    +
  • Kommentare
  • top

    Action-Direktive

    @@ -165,7 +170,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_actions.html.en b/docs/manual/mod/mod_actions.html.en index 48fffa96d24..2bd977d2184 100644 --- a/docs/manual/mod/mod_actions.html.en +++ b/docs/manual/mod/mod_actions.html.en @@ -1,23 +1,28 @@ - -mod_actions - Apache HTTP Server +mod_actions - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_actions

    @@ -27,8 +32,7 @@  ja  |  ko 

    - +
    Description:This module provides for executing CGI scripts based on -media type or request method.
    Description:Execute CGI scripts based on media type or request method.
    Status:Base
    ModuleIdentifier:actions_module
    SourceFile:mod_actions.c
    @@ -45,12 +49,12 @@ media type or request method.
    example, to activate the /icons directory, one might use:

    -

    - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -

    +
    AliasMatch "^/icons(/|$)(.*)" "/usr/local/apache/icons$1$2"
    +

    The full range of regular expression power is available. For example, it is possible to construct an alias with case-insensitive - matching of the url-path:

    + matching of the URL-path:

    + +
    AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1"
    -

    - AliasMatch (?i)^/image(.*) /ftp/pub/image$1 -

    One subtle difference between Alias @@ -222,22 +258,19 @@ expressions

    For example, suppose you want to replace this with AliasMatch:

    -

    - Alias /image/ /ftp/pub/image/ -

    +
    Alias "/image/" "/ftp/pub/image/"
    +

    This is NOT equivalent - don't do this! This will send all requests that have /image/ anywhere in them to /ftp/pub/image/:

    -

    - AliasMatch /image/ /ftp/pub/image/ -

    +
    AliasMatch "/image/" "/ftp/pub/image/"
    +

    This is what you need to get the same effect:

    -

    - AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 -

    +
    AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1"
    +

    Of course, there's no point in using AliasMatch @@ -246,10 +279,14 @@ expressions you do more complicated things. For example, you could serve different kinds of files from different directories:

    -

    - AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg
    - AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif -

    +
    AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg"
    +AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif"
    + + +

    Multiple leading slashes in the requested URL are discarded + by the server before directives from this module compares + against the requested URL-path. +

    @@ -258,14 +295,14 @@ expressions
    Description:Ce module permet l'excution des scripts CGI en fonction du + @@ -46,16 +51,16 @@ type de m
  • Action
  • Script
  • -

    Voir aussi

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top
    -
    Description:Excution des scripts CGI en fonction du type de mdia ou de la mthode de requte.
    Statut:Base
    IdentificateurdeModule:actions_module
    @@ -81,23 +86,18 @@ gestionnaire ont requte particulire est transmis l'aide de la variable REDIRECT_HANDLER.

    -

    Exemple : type MIME

    - # Requtes concernant des fichiers possdant un type de contenu - # MIME particulier :
    - Action image/gif /cgi-bin/images.cgi
    -
    -

    +

    Exemple : type MIME

    # Requests for files of a particular MIME content type:
    +Action image/gif /cgi-bin/images.cgi
    +

    Dans cet exemple, les requtes pour des fichiers possdant le type de contenu MIME image/gif seront traites par le script CGI /cgi-bin/images.cgi.

    -

    Example: extension de nom de fichier

    - # Fichiers dont le nom possde une extension particulire
    - AddHandler mon-type-de-fichier .xyz
    - Action mon-type-de-fichier /cgi-bin/program.cgi
    -

    - +

    Example: File extension

    # Files of a particular file extension
    +AddHandler my-file-type .xyz
    +Action my-file-type "/cgi-bin/program.cgi"
    +

    Dans cet exemple, les requtes pour des fichiers possdant l'extension .xyz seront traites par le script CGI /cgi-bin/programme.cgi.

    @@ -108,14 +108,11 @@ gestionnaire ont directive Action pour des localisations virtuelles.

    -

    Exemple

    - <Location /news>
    - - SetHandler news-handler
    - Action news-handler /cgi-bin/news.cgi virtual
    -
    - </Location> -

    +
    <Location "/news">
    +    SetHandler news-handler
    +    Action news-handler "/cgi-bin/news.cgi" virtual
    +</Location>
    +

    Voir aussi

      @@ -123,7 +120,7 @@ gestionnaire ont
    top
    -
    Description:Active un script CGI pour un gestionnaire ou un type de contenu particulier
    @@ -157,13 +154,12 @@ particuli foo.html?hi). Dans le cas contraire, la requte sera traite normalement.

    -

    Exemples

    - # Toutes les requtes GET aboutissent ici
    - Script GET /cgi-bin/search
    -
    - # Un gestionnaire CGI pour la mthode PUT
    - Script PUT /~bob/put.cgi
    -

    +
    # All GET requests go here
    +Script GET "/cgi-bin/search"
    +
    +# A CGI PUT handler
    +Script PUT "/~bob/put.cgi"
    + @@ -173,7 +169,28 @@ particuli  fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_actions.html.ja.utf8 b/docs/manual/mod/mod_actions.html.ja.utf8 index 2d6e03ed364..176705c587f 100644 --- a/docs/manual/mod/mod_actions.html.ja.utf8 +++ b/docs/manual/mod/mod_actions.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_actions - Apache HTTP サーバ +mod_actions - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_actions

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Active un script CGI dans le cas d'une mthode de requte particulire.
    @@ -49,12 +55,12 @@ CGI スクリプトを実行する機能を提供
  • Action
  • Script
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    Action ディレクティブ

    @@ -167,12 +173,33 @@ Apache 2.1 で導入されました
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_actions.html.ko.euc-kr b/docs/manual/mod/mod_actions.html.ko.euc-kr index ed1036fd514..7462b0c18b7 100644 --- a/docs/manual/mod/mod_actions.html.ko.euc-kr +++ b/docs/manual/mod/mod_actions.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_actions - Apache HTTP Server +mod_actions - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_actions

    +
  • Comments
  • top

    Action þ

    @@ -162,7 +167,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_actions.xml b/docs/manual/mod/mod_actions.xml index 110ded65543..2ce49533ea9 100644 --- a/docs/manual/mod/mod_actions.xml +++ b/docs/manual/mod/mod_actions.xml @@ -24,8 +24,7 @@ mod_actions -This module provides for executing CGI scripts based on -media type or request method. +Execute CGI scripts based on media type or request method.Basemod_actions.c @@ -74,21 +73,24 @@ introduced in Apache 2.1 is passed using the REDIRECT_HANDLER variable.

    Example: MIME type - # Requests for files of a particular MIME content type:
    - Action image/gif /cgi-bin/images.cgi
    -
    + +# Requests for files of a particular MIME content type: +Action image/gif /cgi-bin/images.cgi +

    In this example, requests for files with a MIME content type of image/gif will be handled by the specified cgi script /cgi-bin/images.cgi.

    - Example: File extension - # Files of a particular file extension
    - AddHandler my-file-type .xyz
    - Action my-file-type /cgi-bin/program.cgi
    + + Example: File extension + +# Files of a particular file extension +AddHandler my-file-type .xyz +Action my-file-type "/cgi-bin/program.cgi" + -

    In this example, requests for files with a file extension of .xyz are handled by the specified cgi script /cgi-bin/program.cgi.

    @@ -98,14 +100,12 @@ introduced in Apache 2.1 if you want to use the Action directive in virtual locations.

    - Example - <Location /news>
    - - SetHandler news-handler
    - Action news-handler /cgi-bin/news.cgi virtual
    -
    - </Location> -
    + +<Location "/news"> + SetHandler news-handler + Action news-handler "/cgi-bin/news.cgi" virtual +</Location> + AddHandler @@ -145,13 +145,13 @@ method. (e.g., foo.html?hi). Otherwise, the request will proceed normally.

    - Examples - # All GET requests go here
    - Script GET /cgi-bin/search
    -
    - # A CGI PUT handler
    - Script PUT /~bob/put.cgi
    -
    + +# All GET requests go here +Script GET "/cgi-bin/search" + +# A CGI PUT handler +Script PUT "/~bob/put.cgi" + diff --git a/docs/manual/mod/mod_actions.xml.de b/docs/manual/mod/mod_actions.xml.de index d4042cf5c6d..fc3de9efaea 100644 --- a/docs/manual/mod/mod_actions.xml.de +++ b/docs/manual/mod/mod_actions.xml.de @@ -1,7 +1,7 @@ - + + @@ -26,7 +26,7 @@ mod_actions -Ce module permet l'exécution des scripts CGI en fonction du +Exécution des scripts CGI en fonction du type de média ou de la méthode de requête. Base @@ -79,22 +79,24 @@ gestionnaire ont été introduits dans Apache 2.1 REDIRECT_HANDLER.

    Exemple : type MIME - # Requêtes concernant des fichiers possédant un type de contenu - # MIME particulier :
    - Action image/gif /cgi-bin/images.cgi
    -
    + +# Requests for files of a particular MIME content type: +Action image/gif /cgi-bin/images.cgi +

    Dans cet exemple, les requêtes pour des fichiers possédant le type de contenu MIME image/gif seront traitées par le script CGI /cgi-bin/images.cgi.

    - Example: extension de nom de fichier - # Fichiers dont le nom possède une extension particulière
    - AddHandler mon-type-de-fichier .xyz
    - Action mon-type-de-fichier /cgi-bin/program.cgi
    + + Example: File extension + +# Files of a particular file extension +AddHandler my-file-type .xyz +Action my-file-type "/cgi-bin/program.cgi" + -

    Dans cet exemple, les requêtes pour des fichiers possédant l'extension .xyz seront traitées par le script CGI /cgi-bin/programme.cgi.

    @@ -105,14 +107,12 @@ gestionnaire ont été introduits dans Apache 2.1 directive Action pour des localisations virtuelles.

    - Exemple - <Location /news>
    - - SetHandler news-handler
    - Action news-handler /cgi-bin/news.cgi virtual
    -
    - </Location> -
    + +<Location "/news"> + SetHandler news-handler + Action news-handler "/cgi-bin/news.cgi" virtual +</Location> + AddHandler @@ -154,13 +154,13 @@ particulière.
    foo.html?hi). Dans le cas contraire, la requête sera traitée normalement.

    - Exemples - # Toutes les requêtes GET aboutissent ici
    - Script GET /cgi-bin/search
    -
    - # Un gestionnaire CGI pour la méthode PUT
    - Script PUT /~bob/put.cgi
    -
    + +# All GET requests go here +Script GET "/cgi-bin/search" + +# A CGI PUT handler +Script PUT "/~bob/put.cgi" + diff --git a/docs/manual/mod/mod_actions.xml.ja b/docs/manual/mod/mod_actions.xml.ja index 8d2be3e31bd..9199fb96780 100644 --- a/docs/manual/mod/mod_actions.xml.ja +++ b/docs/manual/mod/mod_actions.xml.ja @@ -1,7 +1,7 @@ - + + -mod_alias - Apache HTTP Server +mod_alias - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_alias

    @@ -48,13 +53,25 @@ a different URL. They are often used when a resource has moved to a new location.

    +

    When the Alias, + ScriptAlias and + Redirect directives are used + within a <Location> + or <LocationMatch> + section, expression syntax can be used + to manipulate the destination path or URL. +

    +

    mod_alias is designed to handle simple URL manipulation tasks. For more complicated tasks such as manipulating the query string, use the tools provided by mod_rewrite.

    -

    Directives

    + +
  • Comments
  • top

    Order of Processing

    -

    Aliases and Redirects occuring in different contexts are processed +

    Aliases and Redirects occurring in different contexts are processed like other directives according to standard merging rules. But when multiple Aliases or Redirects occur in the same context (for example, in the same <VirtualHost> @@ -94,24 +108,33 @@ all the directives to have an effect. For example, the following configuration will work as expected:

    -

    - Alias /foo/bar /baz
    - Alias /foo /gaq -

    +
    Alias "/foo/bar" "/baz"
    +Alias "/foo" "/gaq"
    +

    But if the above two directives were reversed in order, the /foo Alias would always match before the /foo/bar Alias, so the latter directive would be ignored.

    +

    When the Alias, + ScriptAlias and + Redirect directives are used + within a <Location> + or <LocationMatch> + section, these directives will take precedence over any globally + defined Alias, + ScriptAlias and + Redirect directives.

    +
    top
    説明:メディアタイプやリクエストメソッドに応じて CGI スクリプトを実行する機能を提供
    ステータス:Base
    - - +
    Description:Maps URLs to filesystem locations
    Syntax:Alias URL-path +
    Syntax:Alias [URL-path] file-path|directory-path
    Context:server config, virtual host
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_alias
    @@ -119,14 +142,13 @@

    The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a - (%-decoded) path beginning with url-path will be mapped + (%-decoded) path beginning with URL-path will be mapped to local files beginning with directory-path. The - url-path is case-sensitive, even on case-insensitive + URL-path is case-sensitive, even on case-insensitive file systems.

    -

    Example:

    - Alias /image /ftp/pub/image -

    +
    Alias "/image" "/ftp/pub/image"
    +

    A request for http://example.com/image/foo.gif would cause the server to return the file /ftp/pub/image/foo.gif. Only @@ -135,14 +157,15 @@ matching using regular expressions, see the AliasMatch directive.

    Note that if you include a trailing / on the - url-path then the server will require a trailing / in + URL-path then the server will require a trailing / in order to expand the alias. That is, if you use

    -
    Alias /icons/ /usr/local/apache/icons/
    +
    Alias "/icons/" "/usr/local/apache/icons/"
    + -

    then the url /icons will not be aliased, as it lacks +

    then the URL /icons will not be aliased, as it lacks that trailing /. Likewise, if you omit the slash on the - url-path then you must also omit it from the + URL-path then you must also omit it from the file-path.

    Note that you may need to specify additional <Directory> sections which @@ -157,14 +180,29 @@ directory outside of your DocumentRoot, you may need to explicitly permit access to the target directory.

    -

    Example:

    - Alias /image /ftp/pub/image
    - <Directory /ftp/pub/image>
    - - Require all granted
    -
    - </Directory> -

    +
    Alias "/image" "/ftp/pub/image"
    +<Directory "/ftp/pub/image">
    +    Require all granted
    +</Directory>
    + + +

    Any number slashes in the URL-path parameter + matches any number of slashes in the requested URL-path.

    + +

    If the Alias directive is used within a + <Location> + or <LocationMatch> + section the URL-path is omitted, and the file-path is interpreted + using expression syntax.
    + This syntax is available in Apache 2.4.19 and later.

    + +
    <Location "/image">
    +    Alias "/ftp/pub/image"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    + @@ -188,18 +226,16 @@ expressions
    -
    Description:Sends an external redirect asking the client to fetch a different URL
    Syntax:Redirect [status] URL-path +
    Syntax:Redirect [status] [URL-path] URL
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    Module:mod_alias
    -

    The Redirect directive maps an old URL into a new one by asking +

    The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.

    The old URL-path is a case-sensitive (%-decoded) path @@ -276,37 +313,40 @@ a different URL In this latter case the scheme and hostname of the current server will be added.

    -

    Then any request beginning with URL-Path will return a +

    Then any request beginning with URL-path will return a redirect request to the client at the location of the target URL. Additional path information beyond the matched - URL-Path will be appended to the target URL.

    + URL-path will be appended to the target URL.

    + +
    # Redirect to a URL on a different host
    +Redirect "/service" "http://foo2.example.com/service"
    +
    +# Redirect to a URL on the same host
    +Redirect "/one" "/two"
    -

    Example:

    - # Redirect to a URL on a different host
    - Redirect /service http://foo2.example.com/service
    -
    - # Redirect to a URL on the same host
    - Redirect /one /two -

    If the client requests http://example.com/service/foo.txt, it will be told to access http://foo2.example.com/service/foo.txt - instead. This includes requests with GET parameters, such as + instead. This includes requests with GET parameters, such as http://example.com/service/foo.pl?q=23&a=42, it will be redirected to http://foo2.example.com/service/foo.pl?q=23&a=42. - Note that POSTs will be discarded.
    - Only complete path segments are matched, so the above + Note that POSTs will be discarded.
    + Only complete path segments are matched, so the above example would not match a request for - http://example.com/servicefoo.txt. For more complex matching - using regular expressions, see the RedirectMatch directive.

    + http://example.com/servicefoo.txt. For more complex matching + using the expression syntax, omit the URL-path + argument as described below. Alternatively, for matching using regular + expressions, see the RedirectMatch directive.

    Note

    -

    Redirect directives take precedence over Alias and ScriptAlias +

    Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in the configuration - file.

    + file. Redirect directives inside a Location take + precedence over Redirect and Alias directives with an URL-path.

    +

    If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client @@ -344,10 +384,27 @@ a different URL HTTP status code, known to the Apache HTTP Server (see the function send_error_response in http_protocol.c).

    -

    Example:

    - Redirect permanent /one http://example.com/two
    - Redirect 303 /three http://example.com/other -

    +
    Redirect permanent "/one" "http://example.com/two"
    +Redirect 303 "/three" "http://example.com/other"
    + + +

    If the Redirect directive is used within a + <Location> + or <LocationMatch> + section with the URL-path omitted, then the URL parameter + will be interpreted using expression syntax.
    + This syntax is available in Apache 2.4.19 and later.

    + +
    <Location "/one">
    +    Redirect permanent "http://example.com/two"
    +</Location>
    +<Location "/three">
    +    Redirect 303 "http://example.com/other"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    +
    @@ -372,9 +429,8 @@ of the current URL example, to redirect all GIF files to like-named JPEG files on another server, one might use:

    -

    - RedirectMatch (.*)\.gif$ http://other.example.com$1.jpg -

    +
    RedirectMatch "(.*)\.gif$" "http://other.example.com$1.jpg"
    +

    The considerations related to the difference between Alias and @@ -386,7 +442,6 @@ of the current URL details.

    -
    top

    RedirectPermanent Directive

    @@ -425,9 +480,9 @@ a different URL - - +
    Description:Maps a URL to a filesystem location and designates the target as a CGI script
    Syntax:ScriptAlias URL-path +
    Syntax:ScriptAlias [URL-path] file-path|directory-path
    Context:server config, virtual host
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_alias
    @@ -439,29 +494,24 @@ target as a CGI script to scripts beginning with the second argument, which is a full pathname in the local filesystem.

    -

    Example:

    - ScriptAlias /cgi-bin/ /web/cgi-bin/ -

    +
    ScriptAlias "/cgi-bin/" "/web/cgi-bin/"
    +

    A request for http://example.com/cgi-bin/foo would cause the server to run the script /web/cgi-bin/foo. This configuration is essentially equivalent to:

    -

    - Alias /cgi-bin/ /web/cgi-bin/
    - <Location /cgi-bin >
    - - SetHandler cgi-script
    - Options +ExecCGI
    -
    - </Location> -

    - -

    ScriptAlias can also be used in conjunction with - a script or handler you have. For example:

    - -

    - ScriptAlias /cgi-bin/ /web/cgi-handler.pl -

    +
    Alias "/cgi-bin/" "/web/cgi-bin/"
    +<Location "/cgi-bin">
    +    SetHandler cgi-script
    +    Options +ExecCGI
    +</Location>
    + + +

    ScriptAlias can also be used in conjunction with + a script or handler you have. For example:

    + +
    ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl"
    +

    In this scenario all files requested in /cgi-bin/ will be handled by the file you have configured, this allows you to use your own custom @@ -477,20 +527,32 @@ target as a CGI script choose to place your CGI scripts in a directory already accessible from the web, do not use ScriptAlias. Instead, use <Directory>, SetHandler, and Options as in: -

    - <Directory /usr/local/apache2/htdocs/cgi-bin >
    - - SetHandler cgi-script
    - Options ExecCGI
    -
    - </Directory> -

    +
    <Directory "/usr/local/apache2/htdocs/cgi-bin">
    +    SetHandler cgi-script
    +    Options ExecCGI
    +</Directory>
    + This is necessary since multiple URL-paths can map to the same filesystem location, potentially bypassing the ScriptAlias and revealing the source code of the CGI scripts if they are not restricted by a Directory section.
    +

    If the ScriptAlias directive is used within + a <Location> + or <LocationMatch> + section with the URL-path omitted, then the URL parameter will be + interpreted using expression syntax.
    + This syntax is available in Apache 2.4.19 and later.

    + +
    <Location "/cgi-bin">
    +    ScriptAlias "/web/cgi-bin/"
    +</Location>
    +<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)">
    +    ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
    +</LocationMatch>
    + +

    See also

      @@ -517,18 +579,16 @@ and designates the target as a CGI script example, to activate the standard /cgi-bin, one might use:

      -

      - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -

      +
      ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
      +

      As for AliasMatch, the full range of regular expression power is available. For example, it is possible to construct an alias with case-insensitive - matching of the url-path:

      + matching of the URL-path:

      + +
      ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
      -

      - ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -

      The considerations related to the difference between Alias and @@ -548,7 +608,28 @@ and designates the target as a CGI script  ja  |  ko  |  tr 

      - +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_alias.html.fr b/docs/manual/mod/mod_alias.html.fr index eed74598b03..0e5ef5d0d8d 100644 --- a/docs/manual/mod/mod_alias.html.fr +++ b/docs/manual/mod/mod_alias.html.fr @@ -1,23 +1,28 @@ - -mod_alias - Serveur Apache HTTP +mod_alias - Serveur Apache HTTP Version 2.4 - + + + + +

      Serveur Apache HTTP Version 2.4

      +
      <-
      +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

      Module Apache mod_alias

      @@ -51,13 +56,22 @@ redirection d'URL avec une URL diffrente. Elles sont souvent utilises lorsqu'une ressource a t dplace.

      +

      Lorsque les directives Alias, ScriptAlias ou Redirect sont dfinies au sein d'une + section <Location> + ou <LocationMatch>, vous pouvez utiliser la syntaxe des expressions pour manipuler l'URL + ou le chemin de destination. +

      +

      mod_alias est conu pour traiter des tches simples de manipulation d'URL. Pour des tches plus complexes comme la manipulation des chanes d'arguments des requtes, utilisez plutt les outils fournis par le module mod_rewrite

      -
    top

    Chronologie du traitement

    @@ -100,10 +111,9 @@ syst au moins prcis afin que toutes les directives puissent ventuellement s'appliquer, comme dans l'exemple suivant :

    -

    - Alias /foo/bar /baz
    - Alias /foo /gaq -

    +
    Alias "/foo/bar" "/baz"
    +Alias "/foo" "/gaq"
    +

    Si l'ordre des directives tait invers, la directive Alias ayant pour argument /foo serait toujours applique avant la directive @@ -111,13 +121,19 @@ syst /foo/bar, et cette dernire serait toujours ignore.

    +

    La dfinition de directives Alias, ScriptAlias ou Redirect au sein de sections + <Location> ou + <LocationMatch> + l'emporte sur d'autres dfinitions ventuelles de ces mmes + directives au niveau de la configuration gnrale du serveur.

    +
    top
    -

    Alias Directive

    +

    Directive Alias

    - @@ -133,9 +149,8 @@ de fichiers est sensible la casse, mme sur les systmes de fichiers insensibles la casse.

    -

    Exemple :

    - Alias /image /ftp/pub/image -

    +
    Alias "/image" "/ftp/pub/image"
    +

    Une requte pour http://example.com/image/foo.gif fera renvoyer par le serveur le fichier @@ -150,9 +165,10 @@ de fichiers URL, vous devrez aussi ajouter un slash de fin au chemin de la requte. Autrement dit, si vous dfinissez

    -
    Alias /icons/ /usr/local/apache/icons/
    +
    Alias "/icons/" "/usr/local/apache/icons/"
    + -

    l'alias prcdent ne s'appliquera pas l'url +

    l'alias prcdent ne s'appliquera pas l'URL /icons cause de l'absence du slash final. Ainsi, si le slash final est absent du chemin de l'URL, il doit aussi l'tre du chemin du fichier.

    @@ -171,19 +187,33 @@ de fichiersDocumentRoot, vous devrez probablement permettre explicitement l'accs ce rpertoire.

    -

    Exemple :

    - Alias /image /ftp/pub/image
    - <Directory /ftp/pub/image>
    - - Require all granted
    -
    - </Directory> -

    +
    Alias "/image" "/ftp/pub/image"
    +<Directory "/ftp/pub/image">
    +    Require all granted
    +</Directory>
    + + +

    Le nombre de slashes dans le paramtre chemin URL doit + correspondre au nombre de slashes dans le chemin URL de la requte.

    + +

    Si la directive Alias est dfinie au sein + d'une section <Location> ou <LocationMatch>, chemin URL est + omis et chemin fichier est interprt en utilisant la syntaxe des expressions.
    + Cette syntaxe est disponible partir de la version 2.4.19 du + serveur HTTP Apache.

    + +
    <Location "/image">
    +    Alias "/ftp/pub/image"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    +
    top
    -
    Description:Met en correspondance des URLs avec des chemins du systme de fichiers
    Syntaxe:Alias chemin URL +
    Syntaxe:Alias [chemin URL] chemin fichier|chemin rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    @@ -202,18 +232,16 @@ en faisant intervenir les expressions rationnelles Par exemple, pour activer le rpertoire /icons, on peut utiliser :

    -

    - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -

    +
    AliasMatch "^/icons(.*)" "/usr/local/apache/icons$1$2"
    +

    Toute la puissance des expressions rationnelles peut tre mise contribution. Par exemple, il est possible de construire un alias avec un modle de chemin URL insensible la casse :

    -

    - AliasMatch (?i)^/image(.*) /ftp/pub/image$1 -

    +
    AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1"
    +

    Il existe une diffrence subtile entre Alias et AliasMatch : Alias copie automatiquement toute portion supplmentaire de l'URI situe aprs la partie du modle qui @@ -232,54 +260,55 @@ en faisant intervenir les expressions rationnelles

    Par exemple, supposons que nous voulions reformuler cet alias avec AliasMatch :

    -

    - Alias /image/ /ftp/pub/image/ -

    +
    Alias "/image/" "/ftp/pub/image/"
    +

    Le simple remplacement d'Alias par AliasMatch ne produira pas le mme rsultat. Ainsi, ce qui suit va rediriger toutes les requtes qui contiennent /image/ vers /ftp/pub/image/ :

    -

    - AliasMatch /image/ /ftp/pub/image/ -

    +
    AliasMatch "/image/" "/ftp/pub/image/"
    +

    Voici la directive AliasMatch qui produira le mme rsultat que la directive Alias ci-dessus :

    -

    - AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 -

    +
    AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1"
    +

    Bien entendu, il n'y a aucune raison d'utiliser AliasMatch dans le cas o Alias suffit. AliasMatch vous permet d'effectuer des choses beaucoup plus sophistiques. Par exemple, vous pouvez servir diffrentes sortes de fichiers partir de rpertoires diffrents :

    -

    - AliasMatch ^/image/(.*)\.jpg$ /fichiers/jpg.images/$1.jpg
    - AliasMatch ^/image/(.*)\.gif$ /fichiers/gif.images/$1.gif -

    +
          AliasMatch "^/image/(.*)\.jpg$" "/fichiers/jpg.images/$1.jpg"
    +      AliasMatch "^/image/(.*)\.gif$" "/fichiers/gif.images/$1.gif"
    + + +

    Les ventuels slashes de tte multiples seront supprims par le + serveur avant que les directives de ce module n'effectuent des + comparaisons avec le chemin URL de la requte. +

    top
    -
    Description:Met en correspondance des URLs avec le systme de fichiers en faisant intervenir les expressions rationnelles
    -
    Description:Envoie une redirection externe demandant au client d'effectuer une autre requte avec une URL diffrente
    Syntaxe:Redirect [tat] chemin URL +
    Syntaxe:Redirect [tat] [URL-path] URL
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_alias
    -

    La directive Redirect permet de faire correspondre une ancienne - URL une nouvelle en demandant au client d'aller chercher la ressource - une autre localisation.

    +

    La directive Redirect permet de faire correspondre + une ancienne URL une nouvelle en demandant au client d'aller chercher la + ressource une autre localisation.

    -

    L'ancien chemin URL est un chemin sensible la casse +

    L'ancien URL-path est un chemin sensible la casse (dcod l'aide de caractres %) commenant par un slash. Les chemins relatifs ne sont pas autoriss.

    @@ -289,18 +318,17 @@ d'effectuer une autre requ slash, auquel cas le protocole et le nom d'hte du serveur local seront ajouts.

    -

    Ensuite, toute requte commenant par chemin URL va +

    Ensuite, toute requte commenant par URL-path va renvoyer une redirection au client vers l'URL cible. Tout - lment de chemin supplmentaire situ en aval du chemin - URL sera ajout l'URL cible.

    + lment de chemin supplmentaire situ en aval du URL-path sera + ajout l'URL cible.

    + +
    # Redirige vers une URL sur un serveur diffrent
    +Redirect "/service" "http://foo2.example.com/service"
    +
    +# Redirige vers une URL sur le mme serveur
    +Redirect "/one" "/two"
    -

    Exemple :

    - # Redirige vers une URL sur un serveur diffrent
    - Redirect /service http://foo2.example.com/service
    -
    - # Redirige vers une URL sur le mme serveur
    - Redirect /one /two -

    Si le client effectue une requte pour l'URL http://example.com/service/foo.txt, il lui sera demand @@ -315,14 +343,19 @@ d'effectuer une autre requ lments de chemin complets sont tests, si bien que l'exemple prcdent ne s'appliquera pas l'URL http://example.com/servicefoo.txt. Pour des mises en - correspondance plus complexes faisant intervenir les expressions + correspondance plus complexes utilisant la syntaxe des expressions, ne spcifiez pas + d'argument URL-path comme dcrit ci-dessous. En outre, + pour une mise en correspondance en utilisant les expressions rationnelles, veuillez vous reporter la directive RedirectMatch.

    Note

    -

    Les directives de redirection ont priorit sur les directives - Alias et ScriptAlias, quel que soit leur ordre d'apparition dans le - fichier de configuration.

    +

    Les directives Redirect ont priorit sur les + directives Alias et ScriptAlias, quel que soit leur ordre + d'apparition dans le fichier de configuration. Les directives + Redirect dfinies au sein d'une section Location + l'emportent sur les directives Redirect et Alias comportant un argument + URL-path.

    Si aucun argument tat n'est spcifi, la redirection sera temporaire (code HTTP 302). Le client est alors @@ -363,15 +396,31 @@ d'effectuer une autre requ fonction send_error_response dans http_protocol.c).

    -

    Exemple :

    - Redirect permanent /un http://example.com/deux
    - Redirect 303 /trois http://example.com/autre -

    +
    Redirect permanent "/one" "http://example.com/two"
    +Redirect 303 "/three" "http://example.com/other"
    + + +

    Si une directive Redirect est dfinie au + sein d'une section <Location> ou <LocationMatch> et si l'argument URL-path est omis, l'argument URL sera interprt en + utilisant la syntaxe des expressions.
    + Cette syntaxe est disponible partir de la version 2.4.19 du + serveur HTTP Apache.

    + +
    <Location "/one">
    +    Redirect permanent "http://example.com/two"
    +</Location>
    +<Location "/three">
    +    Redirect 303 "http://example.com/other"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    +
    top
    -

    RedirectMatch Directive

    +

    Directive RedirectMatch

    les fichiers GIF vers les fichiers JPEG de mme nom sur un autre serveur, on peut utiliser :

    -

    - RedirectMatch (.*)\.gif$ http://autre.example.com$1.jpg -

    +
    RedirectMatch "(.*)\.gif$" "http://autre.example.com$1.jpg"
    +

    Les remarques propos de la diffrence entre Alias et AliasMatch s'appliquent aussi la diffrence entre les directives Redirect et RedirectMatch. Voir la directive @@ -405,7 +453,7 @@ courante

    top
    -
    Description:Envoie une redirection externe faisant appel aux expressions rationnelles pour la mise en correspondance de l'URL @@ -393,9 +442,8 @@ courante
    sonra), dosya sistemindeki bir tam yol olarak belirtilmiş dizin-yolu ile başlayan betiklerle eşlenir.

    -

    Örnek:

    - ScriptAlias /cgi-bin/ /siteler/cgi-bin/ -

    +
    ScriptAlias "/cgi-bin/" "/siteler/cgi-bin/"
    + -

    http://sunucum/cgi-bin/foo şeklindeki bir istek sunucunun - /siteler/cgi-bin/foo betiğini çalıştırmasına sebep olur. Bu - yapılandırma aslında şuna eşdeğerdir:

    +

    http://example.com/cgi-bin/foo şeklindeki bir istek + sunucunun /siteler/cgi-bin/foo betiğini çalıştırmasına sebep + olur. Bu yapılandırma aslında şuna eşdeğerdir:

    + +
    Alias "/cgi-bin/" "/siteler/cgi-bin/"
    +<Location "/cgi-bin">
    +    SetHandler cgi-script
    +    Options +ExecCGI
    +</Location>
    -

    - Alias /cgi-bin/ /siteler/cgi-bin/
    - <Location /cgi-bin >
    - - SetHandler cgi-script
    - Options +ExecCGI
    -
    - </Location> -

    ScriptAlias yönergesini bir betik veya eylemci ile birlikte de kullanabilirsiniz. Örnek:

    -

    - ScriptAlias /cgi-bin/ /siteler/cgi-handler.pl -

    +
    ScriptAlias "/cgi-bin/" "/siteler/cgi-handler.pl"
    +

    Bu senaryoda /cgi-bin/’den istenen tüm dosyalar sizin belirttiğiniz dosya tarafından işleme sokulacaktır. Bu yöntemle kendi @@ -401,14 +516,11 @@ URL’ye yönlendirir. <Directory>, SetHandler ve Options yönergelerini örnekteki gibi kullanın: -

    - <Directory /usr/local/apache2/htdocs/cgi-bin >
    - - SetHandler cgi-script
    - Options ExecCGI
    -
    - </Directory> -

    +
    <Directory "/usr/local/apache2/htdocs/cgi-bin" >
    +    SetHandler cgi-script
    +    Options ExecCGI
    +</Directory>
    + Aynı dosya sistemi konumu ile çok sayıda URL-yolu eşleşebileceğinden, bir Directory @@ -416,7 +528,22 @@ URL’ye yönlendirir. çıkabilir; bu bakımdan ScriptAlias yönergesini yok sayan URL yollarının belirtilebilme olasılığı gözardı edilmemelidir. - + +

    Eğer ScriptAlias yönergesi URL-yolu belirtilmemiş + bir <Location> + veya <LocationMatch> + bölümü içinde yer alıyorsa, URL seçeneği ifade + sözdizimi kullanılarak yorumlanır.
    + Bu sözdizimi Apache 2.4.19 ve sonrasında kullanılabilir.

    + +
    <Location "/cgi-bin">
    +    ScriptAlias "/siteler/cgi-bin/"
    +</Location>
    +<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)">
    +    ScriptAlias "/siteler/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
    +</LocationMatch>
    + +

    Ayrıca bakınız:

      @@ -442,10 +569,24 @@ eşler ve hedefi bir CGI betiği olarak çalıştırır. dosya yolunu elde eder. Örneğin, standart /cgi-bin dizinini etkin kılmak için şu yazılabilir:

      -

      - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -

      - +
      ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
      + + +

      AliasMatch yönergesindeki gibi, düzenli + ifadelerin tamamı tüm güçleriyle kullanılabilmektedir. + Örneğin, URL-yolu için harf büyüklüğüne duyarsız + eşleşmeli bir takma ad oluşturmak mümkünür:

      + +
      ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
      + + +

      Alias ve + AliasMatch arasındaki farklarla + ilgili hususlar ScriptAlias ve + ScriptAliasMatch arasındakilere + de uygulanır. Ayrıntılar için AliasMatch yönergesine bakınız.

      + +
      @@ -454,7 +595,28 @@ eşler ve hedefi bir CGI betiği olarak çalıştırır.  ja  |  ko  |  tr 

      -
      +
      top

      Yorum

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_alias.xml b/docs/manual/mod/mod_alias.xml index fa45b751a63..fc1040f15a5 100644 --- a/docs/manual/mod/mod_alias.xml +++ b/docs/manual/mod/mod_alias.xml @@ -47,6 +47,15 @@ a different URL. They are often used when a resource has moved to a new location.

      +

      When the Alias, + ScriptAlias and + Redirect directives are used + within a Location + or LocationMatch + section, expression syntax can be used + to manipulate the destination path or URL. +

      +

      mod_alias is designed to handle simple URL manipulation tasks. For more complicated tasks such as manipulating the query string, use the tools provided by @@ -59,7 +68,7 @@ href="../urlmapping.html">Mapping URLs to the filesystem

      Order of Processing -

      Aliases and Redirects occuring in different contexts are processed +

      Aliases and Redirects occurring in different contexts are processed like other directives according to standard merging rules. But when multiple Aliases or Redirects occur in the same context (for example, in the @@ -79,10 +88,10 @@ href="../urlmapping.html">Mapping URLs to the filesystem all the directives to have an effect. For example, the following configuration will work as expected:

      - - Alias /foo/bar /baz
      - Alias /foo /gaq -
      + +Alias "/foo/bar" "/baz" +Alias "/foo" "/gaq" +

      But if the above two directives were reversed in order, the /foo Alias @@ -90,14 +99,25 @@ href="../urlmapping.html">Mapping URLs to the filesystem module="mod_alias">Alias, so the latter directive would be ignored.

      +

      When the Alias, + ScriptAlias and + Redirect directives are used + within a Location + or LocationMatch + section, these directives will take precedence over any globally + defined Alias, + ScriptAlias and + Redirect directives.

      +
      Alias Maps URLs to filesystem locations -Alias URL-path +Alias [URL-path] file-path|directory-path server configvirtual host +directory @@ -105,14 +125,14 @@ href="../urlmapping.html">Mapping URLs to the filesystem

      The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a - (%-decoded) path beginning with url-path will be mapped + (%-decoded) path beginning with URL-path will be mapped to local files beginning with directory-path. The - url-path is case-sensitive, even on case-insensitive + URL-path is case-sensitive, even on case-insensitive file systems.

      - Example: - Alias /image /ftp/pub/image - + +Alias "/image" "/ftp/pub/image" +

      A request for http://example.com/image/foo.gif would cause the server to return the file /ftp/pub/image/foo.gif. Only @@ -122,14 +142,16 @@ href="../urlmapping.html">Mapping URLs to the filesystem >AliasMatch directive.

      Note that if you include a trailing / on the - url-path then the server will require a trailing / in + URL-path then the server will require a trailing / in order to expand the alias. That is, if you use

      -
      Alias /icons/ /usr/local/apache/icons/
      + +Alias "/icons/" "/usr/local/apache/icons/" + -

      then the url /icons will not be aliased, as it lacks +

      then the URL /icons will not be aliased, as it lacks that trailing /. Likewise, if you omit the slash on the - url-path then you must also omit it from the + URL-path then you must also omit it from the file-path.

      Note that you may need to specify additional Mapping URLs to the filesystem module="core">DocumentRoot, you may need to explicitly permit access to the target directory.

      - Example: - Alias /image /ftp/pub/image
      - <Directory /ftp/pub/image>
      - - Require all granted
      -
      - </Directory> -
      + +Alias "/image" "/ftp/pub/image" +<Directory "/ftp/pub/image"> + Require all granted +</Directory> + + +

      Any number slashes in the URL-path parameter + matches any number of slashes in the requested URL-path.

      + +

      If the Alias directive is used within a + Location + or LocationMatch + section the URL-path is omitted, and the file-path is interpreted + using expression syntax.
      + This syntax is available in Apache 2.4.19 and later.

      + + +<Location "/image"> + Alias "/ftp/pub/image" +</Location> +<LocationMatch "/error/(?<NUMBER>[0-9]+)"> + Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html" +</LocationMatch> +
      @@ -178,18 +217,18 @@ expressions example, to activate the /icons directory, one might use:

      - - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 - + +AliasMatch "^/icons(/|$)(.*)" "/usr/local/apache/icons$1$2" +

      The full range of regular expression power is available. For example, it is possible to construct an alias with case-insensitive - matching of the url-path:

      + matching of the URL-path:

      - - AliasMatch (?i)^/image(.*) /ftp/pub/image$1 - + +AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1" +

      One subtle difference between Alias @@ -212,22 +251,22 @@ expressions

      For example, suppose you want to replace this with AliasMatch:

      - - Alias /image/ /ftp/pub/image/ - + +Alias "/image/" "/ftp/pub/image/" +

      This is NOT equivalent - don't do this! This will send all requests that have /image/ anywhere in them to /ftp/pub/image/:

      - - AliasMatch /image/ /ftp/pub/image/ - + +AliasMatch "/image/" "/ftp/pub/image/" +

      This is what you need to get the same effect:

      - - AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 - + +AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1" +

      Of course, there's no point in using AliasMatch @@ -236,10 +275,15 @@ expressions you do more complicated things. For example, you could serve different kinds of files from different directories:

      - - AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg
      - AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif -
      + +AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg" +AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif" + + +

      Multiple leading slashes in the requested URL are discarded + by the server before directives from this module compares + against the requested URL-path. +

      @@ -248,14 +292,14 @@ expressions Redirect Sends an external redirect asking the client to fetch a different URL -Redirect [status] URL-path +Redirect [status] [URL-path] URL server configvirtual host directory.htaccess FileInfo -

      The Redirect directive maps an old URL into a new one by asking +

      The Redirect directive maps an old URL into a new one by asking the client to refetch the resource at the new location.

      The old URL-path is a case-sensitive (%-decoded) path @@ -266,38 +310,45 @@ a different URL In this latter case the scheme and hostname of the current server will be added.

      -

      Then any request beginning with URL-Path will return a +

      Then any request beginning with URL-path will return a redirect request to the client at the location of the target URL. Additional path information beyond the matched - URL-Path will be appended to the target URL.

      + URL-path will be appended to the target URL.

      - Example: - # Redirect to a URL on a different host
      - Redirect /service http://foo2.example.com/service
      -
      - # Redirect to a URL on the same host
      - Redirect /one /two -
      + +# Redirect to a URL on a different host +Redirect "/service" "http://foo2.example.com/service" + +# Redirect to a URL on the same host +Redirect "/one" "/two" +

      If the client requests http://example.com/service/foo.txt, it will be told to access http://foo2.example.com/service/foo.txt - instead. This includes requests with GET parameters, such as + instead. This includes requests with GET parameters, such as http://example.com/service/foo.pl?q=23&a=42, it will be redirected to http://foo2.example.com/service/foo.pl?q=23&a=42. - Note that POSTs will be discarded.
      - Only complete path segments are matched, so the above + Note that POSTs will be discarded.
      + Only complete path segments are matched, so the above example would not match a request for - http://example.com/servicefoo.txt. For more complex matching - using regular expressions, see the http://example.com/servicefoo.txt. For more complex matching + using the expression syntax, omit the URL-path + argument as described below. Alternatively, for matching using regular + expressions, see the RedirectMatch directive.

      Note -

      Redirect directives take precedence over Alias and ScriptAlias +

      Redirect directives take precedence over Alias and ScriptAlias directives, irrespective of their ordering in the configuration - file.

      + file. Redirect directives inside a Location take + precedence over Redirect and Alias directives with an URL-path.

      +

      If no status argument is given, the redirect will be "temporary" (HTTP status 302). This indicates to the client @@ -335,10 +386,29 @@ a different URL HTTP status code, known to the Apache HTTP Server (see the function send_error_response in http_protocol.c).

      - Example: - Redirect permanent /one http://example.com/two
      - Redirect 303 /three http://example.com/other -
      + +Redirect permanent "/one" "http://example.com/two" +Redirect 303 "/three" "http://example.com/other" + + +

      If the Redirect directive is used within a + Location + or LocationMatch + section with the URL-path omitted, then the URL parameter + will be interpreted using expression syntax.
      + This syntax is available in Apache 2.4.19 and later.

      + + +<Location "/one"> + Redirect permanent "http://example.com/two" +</Location> +<Location "/three"> + Redirect 303 "http://example.com/other" +</Location> +<LocationMatch "/error/(?<NUMBER>[0-9]+)"> + Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html" +</LocationMatch> +
      @@ -364,9 +434,9 @@ of the current URL example, to redirect all GIF files to like-named JPEG files on another server, one might use:

      - - RedirectMatch (.*)\.gif$ http://other.example.com$1.jpg - + +RedirectMatch "(.*)\.gif$" "http://other.example.com$1.jpg" +

      The considerations related to the difference between Alias and @@ -377,7 +447,6 @@ of the current URL See AliasMatch for details.

      - @@ -417,9 +486,10 @@ a different URL ScriptAlias Maps a URL to a filesystem location and designates the target as a CGI script -ScriptAlias URL-path +ScriptAlias [URL-path] file-path|directory-path server configvirtual host +directory @@ -432,29 +502,27 @@ target as a CGI script to scripts beginning with the second argument, which is a full pathname in the local filesystem.

      - Example: - ScriptAlias /cgi-bin/ /web/cgi-bin/ - + +ScriptAlias "/cgi-bin/" "/web/cgi-bin/" +

      A request for http://example.com/cgi-bin/foo would cause the server to run the script /web/cgi-bin/foo. This configuration is essentially equivalent to:

      - - Alias /cgi-bin/ /web/cgi-bin/
      - <Location /cgi-bin >
      - - SetHandler cgi-script
      - Options +ExecCGI
      -
      - </Location> -
      - -

      ScriptAlias can also be used in conjunction with - a script or handler you have. For example:

      - - - ScriptAlias /cgi-bin/ /web/cgi-handler.pl - + +Alias "/cgi-bin/" "/web/cgi-bin/" +<Location "/cgi-bin"> + SetHandler cgi-script + Options +ExecCGI +</Location> + + +

      ScriptAlias can also be used in conjunction with + a script or handler you have. For example:

      + + +ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl" +

      In this scenario all files requested in /cgi-bin/ will be handled by the file you have configured, this allows you to use your own custom @@ -473,20 +541,34 @@ target as a CGI script module="core" type="section">Directory, SetHandler, and Options as in: - - <Directory /usr/local/apache2/htdocs/cgi-bin >
      - - SetHandler cgi-script
      - Options ExecCGI
      -
      - </Directory> -
      + +<Directory "/usr/local/apache2/htdocs/cgi-bin"> + SetHandler cgi-script + Options ExecCGI +</Directory> + This is necessary since multiple URL-paths can map to the same filesystem location, potentially bypassing the ScriptAlias and revealing the source code of the CGI scripts if they are not restricted by a Directory section. +

      If the ScriptAlias directive is used within + a Location + or LocationMatch + section with the URL-path omitted, then the URL parameter will be + interpreted using expression syntax.
      + This syntax is available in Apache 2.4.19 and later.

      + + +<Location "/cgi-bin"> + ScriptAlias "/web/cgi-bin/" +</Location> +<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)"> + ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi" +</LocationMatch> + +
      CGI Tutorial @@ -511,18 +593,18 @@ and designates the target as a CGI script example, to activate the standard /cgi-bin, one might use:

      - - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 - + +ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1" +

      As for AliasMatch, the full range of regular expression power is available. For example, it is possible to construct an alias with case-insensitive - matching of the url-path:

      + matching of the URL-path:

      - - ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 - + +ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1" +

      The considerations related to the difference between Alias and @@ -537,4 +619,3 @@ and designates the target as a CGI script - diff --git a/docs/manual/mod/mod_alias.xml.fr b/docs/manual/mod/mod_alias.xml.fr index 9d41ea3e2a3..3d7899a8572 100644 --- a/docs/manual/mod/mod_alias.xml.fr +++ b/docs/manual/mod/mod_alias.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,7 +25,7 @@ mod_alias -Permet d'atteindre différentes parties du système de +Permet d'atteindre différentes parties du système de fichiers depuis l'arborescence des documents du site web, ainsi que la redirection d'URL Base @@ -34,231 +34,277 @@ redirection d'URL

      Les directives fournies par ce module permettent de manipuler et - de contrôler les URLs à l'arrivée des requêtes sur le serveur. Les + de contrôler les URLs à l'arrivée des requêtes sur le serveur. Les directives Alias et ScriptAlias permettent de - faire correspondre des URLs avec des chemins du système de fichiers. - Ceci permet de servir des contenus qui ne sont pas situés dans + faire correspondre des URLs avec des chemins du système de fichiers. + Ceci permet de servir des contenus qui ne sont pas situés dans l'arborescence de DocumentRoot comme s'ils y étaient - réellement. La directive DocumentRoot comme s'ils y étaient + réellement. La directive ScriptAlias a pour effet - supplémentaire de marquer le répertoire cible comme conteneur de + supplémentaire de marquer le répertoire cible comme conteneur de scripts CGI.

      Les directives Redirect - indiquent aux clients qu'ils doivent effectuer une nouvelle requête - avec une URL différente. Elles sont souvent utilisées lorsqu'une - ressource a été déplacée.

      - -

      mod_alias est conçu pour traiter des tâches - simples de manipulation d'URL. Pour des tâches plus complexes comme - la manipulation des chaînes d'arguments des requêtes, utilisez - plutôt les outils fournis par le module mod_rewrite

      + indiquent aux clients qu'ils doivent effectuer une nouvelle requête + avec une URL différente. Elles sont souvent utilisées lorsqu'une + ressource a été déplacée.

      + +

      Lorsque les directives Alias, ScriptAlias ou Redirect sont définies au sein d'une + section Location + ou LocationMatch, vous pouvez utiliser la syntaxe des expressions pour manipuler l'URL + ou le chemin de destination. +

      + +

      mod_alias est conçu pour traiter des tâches + simples de manipulation d'URL. Pour des tâches plus complexes comme + la manipulation des chaînes d'arguments des requêtes, utilisez + plutôt les outils fournis par le module mod_rewrite

      mod_rewrite Mise en correspondance des URLs avec le -système de fichiers +système de fichiers
      Chronologie du traitement -

      Les alias et redirections apparaissant dans différents contextes - sont traités comme les autres directives en respectant les règles de fusion standards. Par - contre, ils sont traités selon une chronologie particulière - lorsqu'ils apparaissent dans le même contexte (par exemple, dans la - même section Les alias et redirections apparaissant dans différents contextes + sont traités comme les autres directives en respectant les règles de fusion standards. Par + contre, ils sont traités selon une chronologie particulière + lorsqu'ils apparaissent dans le même contexte (par exemple, dans la + même section VirtualHost).

      -

      Premièrement, toutes les redirections sont traitées avant les - alias, et ainsi, une requête qui correspond à une directive +

      Premièrement, toutes les redirections sont traitées avant les + alias, et ainsi, une requête qui correspond à une directive Redirect ou RedirectMatch ne se verra jamais - appliquer d'alias. Deuxièmement, les alias et redirections sont - traités selon l'ordre dans lequel ils apparaissent dans le fichier - de configuration, seule la première correspondance étant prise en + appliquer d'alias. Deuxièmement, les alias et redirections sont + traités selon l'ordre dans lequel ils apparaissent dans le fichier + de configuration, seule la première correspondance étant prise en compte.

      Ainsi, lorsqu'une ou plusieurs de ces directives s'appliquent au - même sous-répertoire, vous devez classer les chemins du plus précis - au moins précis afin que toutes les directives puissent - éventuellement s'appliquer, comme dans l'exemple suivant :

      + même sous-répertoire, vous devez classer les chemins du plus précis + au moins précis afin que toutes les directives puissent + éventuellement s'appliquer, comme dans l'exemple suivant :

      - - Alias /foo/bar /baz
      - Alias /foo /gaq -
      + +Alias "/foo/bar" "/baz" +Alias "/foo" "/gaq" + -

      Si l'ordre des directives était inversé, la directive Si l'ordre des directives était inversé, la directive Alias ayant pour argument - /foo serait toujours appliquée avant la directive + /foo serait toujours appliquée avant la directive Alias ayant pour argument - /foo/bar, et cette dernière serait toujours - ignorée.

      + /foo/bar, et cette dernière serait toujours + ignorée.

      + +

      La définition de directives Alias, ScriptAlias ou Redirect au sein de sections + Location ou + LocationMatch + l'emporte sur d'autres définitions éventuelles de ces mêmes + directives au niveau de la configuration générale du serveur.

      Alias -Met en correspondance des URLs avec des chemins du système +Met en correspondance des URLs avec des chemins du système de fichiers -Alias chemin URL -chemin fichier|chemin répertoire +Alias [chemin URL] +chemin fichier|chemin répertoire server configvirtual host

      La directive Alias permet de stocker des - documents (destinés à être servis) dans des zones du système de - fichiers situées en dehors de l'arborescence du site web DocumentRoot. Les URLs dont le chemin - (décodé avec caractères %) commence par chemin URL seront + (décodé avec caractères %) commence par chemin URL seront mises en correspondance avec des fichiers locaux dont le chemin - commence par chemin répertoire. Le chemin URL - est sensible à la casse, même sur les systèmes de fichiers - insensibles à la casse.

      + commence par chemin répertoire. Le chemin URL + est sensible à la casse, même sur les systèmes de fichiers + insensibles à la casse.

      - Exemple : - Alias /image /ftp/pub/image - + + Alias "/image" "/ftp/pub/image" + -

      Une requête pour http://example.com/image/foo.gif fera +

      Une requête pour http://example.com/image/foo.gif fera renvoyer par le serveur le fichier - /ftp/pub/image/foo.gif. Seuls les éléments de chemin - complets sont testés ; ainsi l'alias précédent ne conviendra pas - pour une requête du style http://example.com/imagefoo.gif. + /ftp/pub/image/foo.gif. Seuls les éléments de chemin + complets sont testés ; ainsi l'alias précédent ne conviendra pas + pour une requête du style http://example.com/imagefoo.gif. Pour des mises en correspondance plus complexes faisant intervenir - les expressions rationnelles, veuillez vous reporter à la directive + les expressions rationnelles, veuillez vous reporter à la directive AliasMatch.

      Notez que si vous ajoutez un slash de fin au chemin URL, vous devrez aussi ajouter un slash de fin au chemin de la - requête. Autrement dit, si vous définissez

      + requête. Autrement dit, si vous définissez

      -
      Alias /icons/ /usr/local/apache/icons/
      + + Alias "/icons/" "/usr/local/apache/icons/" + -

      l'alias précédent ne s'appliquera pas à l'url - /icons à cause de l'absence du slash final. Ainsi, si +

      l'alias précédent ne s'appliquera pas à l'URL + /icons à cause de l'absence du slash final. Ainsi, si le slash final est absent du chemin de l'URL, il doit - aussi l'être du chemin du fichier.

      + aussi l'être du chemin du fichier.

      -

      Notez qu'il pourra s'avérer nécessaire de définir des sections +

      Notez qu'il pourra s'avérer nécessaire de définir des sections Directory - supplémentaires qui couvriront la destination des alias. + supplémentaires qui couvriront la destination des alias. Le traitement des alias intervenant avant le traitement des sections Directory, - seules les cibles des alias sont affectées (Notez cependant + seules les cibles des alias sont affectées (Notez cependant que les sections Location sont traitées avant les alias, et + module="core">Location sont traitées avant les alias, et s'appliqueront donc).

      -

      En particulier, si vous créez un alias ayant pour cible un - répertoire situé en dehors de l'arborescence de votre site web +

      En particulier, si vous créez un alias ayant pour cible un + répertoire situé en dehors de l'arborescence de votre site web DocumentRoot, vous devrez - probablement permettre explicitement l'accès à ce répertoire.

      - - Exemple : - Alias /image /ftp/pub/image
      - <Directory /ftp/pub/image>
      - - Require all granted
      -
      - </Directory> -
      + probablement permettre explicitement l'accès à ce répertoire.

      + + +Alias "/image" "/ftp/pub/image" +<Directory "/ftp/pub/image"> + Require all granted +</Directory> + + +

      Le nombre de slashes dans le paramètre chemin URL doit + correspondre au nombre de slashes dans le chemin URL de la requête.

      + +

      Si la directive Alias est définie au sein + d'une section Location ou LocationMatch, chemin URL est + omis et chemin fichier est interprété en utilisant la syntaxe des expressions.
      + Cette syntaxe est disponible à partir de la version 2.4.19 du + serveur HTTP Apache.

      + + +<Location "/image"> + Alias "/ftp/pub/image" +</Location> +<LocationMatch "/error/(?<NUMBER>[0-9]+)"> + Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html" +</LocationMatch> +
      AliasMatch -Met en correspondance des URLs avec le système de fichiers +Met en correspondance des URLs avec le système de fichiers en faisant intervenir les expressions rationnelles AliasMatch regex -chemin fichier|chemin répertoire +chemin fichier|chemin répertoire
      server configvirtual host -

      Cette directive est identique à la directive Cette directive est identique à la directive Alias, mais fait appel aux expressions rationnelles, à la place d'une - simple mise en correspondance de préfixe. L'expression rationnelle + ref="regex">expressions rationnelles, à la place d'une + simple mise en correspondance de préfixe. L'expression rationnelle fournie est mise en correspondance avec le chemin URL, et si elle correspond, le serveur va substituer toute partie de chemin - correspondant à l'expression entre parenthèses dans la chaîne + correspondant à l'expression entre parenthèses dans la chaîne fournie et l'utiliser comme nom de fichier. - Par exemple, pour activer le répertoire /icons, on peut + Par exemple, pour activer le répertoire /icons, on peut utiliser :

      - - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 - + + AliasMatch "^/icons(.*)" "/usr/local/apache/icons$1$2" +

      Toute la puissance des expressions - rationnelles peut être mise à contribution. Par exemple, - il est possible de construire un alias avec un modèle de chemin URL - insensible à la casse :

      + rationnelles peut être mise à contribution. Par exemple, + il est possible de construire un alias avec un modèle de chemin URL + insensible à la casse :

      - - AliasMatch (?i)^/image(.*) /ftp/pub/image$1 - + + AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1" + -

      Il existe une différence subtile entre Il existe une différence subtile entre Alias et AliasMatch : Alias copie automatiquement toute - portion supplémentaire de l'URI située après la partie du modèle qui - correspond, à la fin du chemin du fichier de la partie droite, alors + portion supplémentaire de l'URI située après la partie du modèle qui + correspond, à la fin du chemin du fichier de la partie droite, alors que AliasMatch ne le fait - pas. Cela signifie qu'il sera préférable dans la plupart des cas de - comparer l'expression rationnelle du modèle à la totalité de l'URI - de la requête, et d'utiliser les substitutions dans la partie + pas. Cela signifie qu'il sera préférable dans la plupart des cas de + comparer l'expression rationnelle du modèle à la totalité de l'URI + de la requête, et d'utiliser les substitutions dans la partie droite.

      En d'autres termes, le remplacement d'Alias par AliasMatch ne produira pas le même - résultat. Au minimum, vous devez ajouter ^ au début de - l'expression rationnelle, (.*)$ à sa fin et - $1 à la fin de la chaîne de remplacement.

      + module="mod_alias">AliasMatch ne produira pas le même + résultat. Au minimum, vous devez ajouter ^ au début de + l'expression rationnelle, (.*)$ à sa fin et + $1 à la fin de la chaîne de remplacement.

      Par exemple, supposons que nous voulions reformuler cet alias avec AliasMatch :

      - - Alias /image/ /ftp/pub/image/ - + + Alias "/image/" "/ftp/pub/image/" +

      Le simple remplacement d'Alias par AliasMatch ne produira pas le - même résultat. Ainsi, ce qui suit va rediriger toutes les requêtes + même résultat. Ainsi, ce qui suit va rediriger toutes les requêtes qui contiennent /image/ vers /ftp/pub/image/ :

      - - AliasMatch /image/ /ftp/pub/image/ - + + AliasMatch "/image/" "/ftp/pub/image/" + -

      Voici la directive AliasMatch qui produira le même résultat que +

      Voici la directive AliasMatch qui produira le même résultat que la directive Alias ci-dessus :

      - - AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 - + + AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1" +

      Bien entendu, il n'y a aucune raison d'utiliser AliasMatch dans le cas où AliasMatch dans le cas où Alias suffit. AliasMatch vous permet d'effectuer - des choses beaucoup plus sophistiquées. Par exemple, vous pouvez - servir différentes sortes de fichiers à partir de répertoires - différents :

      + des choses beaucoup plus sophistiquées. Par exemple, vous pouvez + servir différentes sortes de fichiers à partir de répertoires + différents :

      - - AliasMatch ^/image/(.*)\.jpg$ /fichiers/jpg.images/$1.jpg
      - AliasMatch ^/image/(.*)\.gif$ /fichiers/gif.images/$1.gif -
      + + AliasMatch "^/image/(.*)\.jpg$" "/fichiers/jpg.images/$1.jpg" + AliasMatch "^/image/(.*)\.gif$" "/fichiers/gif.images/$1.gif" + + +

      Les éventuels slashes de tête multiples seront supprimés par le + serveur avant que les directives de ce module n'effectuent des + comparaisons avec le chemin URL de la requête. +

      @@ -266,107 +312,135 @@ en faisant intervenir les expressions rationnelles Redirect Envoie une redirection externe demandant au client -d'effectuer une autre requête avec une URL différente -Redirect [état] chemin URL +d'effectuer une autre requête avec une URL différente +Redirect [état] [URL-path] URL server configvirtual host directory.htaccess FileInfo -

      La directive Redirect permet de faire correspondre une ancienne - URL à une nouvelle en demandant au client d'aller chercher la ressource à - une autre localisation.

      +

      La directive Redirect permet de faire correspondre + une ancienne URL à une nouvelle en demandant au client d'aller chercher la + ressource à une autre localisation.

      -

      L'ancien chemin URL est un chemin sensible à la casse - (décodé à l'aide de caractères %) commençant par un slash. Les - chemins relatifs ne sont pas autorisés.

      +

      L'ancien URL-path est un chemin sensible à la casse + (décodé à l'aide de caractères %) commençant par un slash. Les + chemins relatifs ne sont pas autorisés.

      La nouvelle URL - peut être une URL absolue commençant par un protocole et un nom - d'hôte, mais on peut aussi utiliser un chemin URL commençant par un - slash, auquel cas le protocole et le nom d'hôte du serveur local - seront ajoutés.

      + peut être une URL absolue commençant par un protocole et un nom + d'hôte, mais on peut aussi utiliser un chemin URL commençant par un + slash, auquel cas le protocole et le nom d'hôte du serveur local + seront ajoutés.

      -

      Ensuite, toute requête commençant par chemin URL va +

      Ensuite, toute requête commençant par URL-path va renvoyer une redirection au client vers l'URL cible. Tout - élément de chemin supplémentaire situé en aval du chemin - URL sera ajouté à l'URL cible.

      - - Exemple : - # Redirige vers une URL sur un serveur différent
      - Redirect /service http://foo2.example.com/service
      -
      - # Redirige vers une URL sur le même serveur
      - Redirect /one /two -
      - -

      Si le client effectue une requête pour l'URL - http://example.com/service/foo.txt, il lui sera demandé + élément de chemin supplémentaire situé en aval du URL-path sera + ajouté à l'URL cible.

      + + +# Redirige vers une URL sur un serveur différent +Redirect "/service" "http://foo2.example.com/service" + +# Redirige vers une URL sur le même serveur +Redirect "/one" "/two" + + +

      Si le client effectue une requête pour l'URL + http://example.com/service/foo.txt, il lui sera demandé d'en effectuer une autre pour l'URL http://foo2.example.com/service/foo.txt. Ceci concerne - les requêtes avec paramètres GET, comme + les requêtes avec paramètres GET, comme http://example.com/service/foo.pl?q=23&a=42, qui - seront redirigées vers + seront redirigées vers http://foo2.example.com/service/foo.pl?q=23&a=42. - Notez que les POSTs seront ignorés.
      + Notez que les POSTs seront ignorés.
      Seuls les - éléments de chemin complets sont testés, si bien que l'exemple - précédent ne s'appliquera pas à l'URL + éléments de chemin complets sont testés, si bien que l'exemple + précédent ne s'appliquera pas à l'URL http://example.com/servicefoo.txt. Pour des mises en - correspondance plus complexes faisant intervenir les expressions - rationnelles, veuillez vous reporter à la directive syntaxe des expressions, ne spécifiez pas + d'argument URL-path comme décrit ci-dessous. En outre, + pour une mise en correspondance en utilisant les expressions + rationnelles, veuillez vous reporter à la directive RedirectMatch.

      Note -

      Les directives de redirection ont priorité sur les directives - Alias et ScriptAlias, quel que soit leur ordre d'apparition dans le - fichier de configuration.

      - -

      Si aucun argument état n'est spécifié, la +

      Les directives Redirect ont priorité sur les + directives Alias et ScriptAlias, quel que soit leur ordre + d'apparition dans le fichier de configuration. Les directives + Redirect définies au sein d'une section Location + l'emportent sur les directives Redirect et Alias comportant un argument + URL-path.

      + +

      Si aucun argument état n'est spécifié, la redirection sera temporaire (code HTTP 302). Le client est alors - informé que la ressource a été temporairement déplacée. On peut - utiliser l'argument état pour renvoyer d'autres codes HTTP :

      + informé que la ressource a été temporairement déplacée. On peut + utiliser l'argument état pour renvoyer d'autres codes HTTP :

      permanent
      Renvoie un code de redirection permanente (301), indiquant - que la ressource a été définitivement déplacée.
      + que la ressource a été définitivement déplacée.
      temp
      Renvoie un code de redirection temporaire (302). C'est le - comportement par défaut.
      + comportement par défaut.
      seeother
      Renvoie un code "See Other" (303) indiquant que la ressource - a été remplacée par une autre.
      + a été remplacée par une autre.
      gone
      Renvoie un code "Gone" (410) indiquant que la ressource a - été définitivement supprimée. Lorsque - ce code est utilisé, on ne + été définitivement supprimée. Lorsque + ce code est utilisé, on ne doit pas utiliser l'argument URL.
      -

      On peut renvoyer d'autres codes en spécifiant le code - numérique comme valeur de l'argument of état. +

      On peut renvoyer d'autres codes en spécifiant le code + numérique comme valeur de l'argument of état. Si le code est compris entre 300 et 399, l'argument - URL doit être présent. Si le code + URL doit être présent. Si le code n'est pas compris entre 300 et 399, l'argument - URL ne doit pas apparaître. Le code doit être un code + URL ne doit pas apparaître. Le code doit être un code HTTP valide, connu du serveur HTTP Apache (voir la fonction send_error_response dans http_protocol.c).

      - Exemple : - Redirect permanent /un http://example.com/deux
      - Redirect 303 /trois http://example.com/autre -
      + +Redirect permanent "/one" "http://example.com/two" +Redirect 303 "/three" "http://example.com/other" + + +

      Si une directive Redirect est définie au + sein d'une section Location ou LocationMatch et si l'argument URL-path est omis, l'argument URL sera interprété en + utilisant la syntaxe des expressions.
      + Cette syntaxe est disponible à partir de la version 2.4.19 du + serveur HTTP Apache.

      + + +<Location "/one"> + Redirect permanent "http://example.com/two" +</Location> +<Location "/three"> + Redirect 303 "http://example.com/other" +</Location> +<LocationMatch "/error/(?<NUMBER>[0-9]+)"> + Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html" +</LocationMatch> +
      @@ -376,36 +450,36 @@ d'effectuer une autre requête avec une URL différente Envoie une redirection externe faisant appel aux expressions rationnelles pour la mise en correspondance de l'URL courante -RedirectMatch [état] regex +RedirectMatch [état] regex URL server configvirtual host directory.htaccess FileInfo -

      Cette directive est identique à la directive Cette directive est identique à la directive Redirect, mais fait appel aux - expressions rationnelles, à la - place d'une simple mise en correspondance de préfixe. L'expression + expressions rationnelles, à la + place d'une simple mise en correspondance de préfixe. L'expression rationnelle fournie est mise en correspondance avec le chemin URL, et si elle correspond, le serveur va substituer toute partie de - chemin correspondante entre parenthèses dans la chaîne spécifiée et + chemin correspondante entre parenthèses dans la chaîne spécifiée et l'utiliser comme nom de fichier. Par exemple, pour rediriger tous - les fichiers GIF vers les fichiers JPEG de même nom sur un autre + les fichiers GIF vers les fichiers JPEG de même nom sur un autre serveur, on peut utiliser :

      - - RedirectMatch (.*)\.gif$ http://autre.example.com$1.jpg - + + RedirectMatch "(.*)\.gif$" "http://autre.example.com$1.jpg" + -

      Les remarques à propos de la différence entre Les remarques à propos de la différence entre Alias et AliasMatch s'appliquent aussi à la - différence entre les directives AliasMatch s'appliquent aussi à la + différence entre les directives Redirect et RedirectMatch. Voir la directive AliasMatch pour plus de - détails.

      + détails.

      @@ -413,8 +487,8 @@ courante RedirectTemp Envoie une redirection externe temporaire demandant au -client d'effectuer une nouvelle requête avec une URL -différente +client d'effectuer une nouvelle requête avec une URL +différente RedirectTemp chemin URL URL server configvirtual host directory.htaccess @@ -422,7 +496,7 @@ différente

      Cette directive informe le client que la redirection n'est - que temporaire (code 302). Son comportement est exactement le même + que temporaire (code 302). Son comportement est exactement le même que celui de Redirect temp.

      @@ -430,8 +504,8 @@ différente RedirectPermanent Envoie une redirection externe permanente demandant au -client d'effectuer une nouvelle requête avec une URL -différente +client d'effectuer une nouvelle requête avec une URL +différente RedirectPermanent chemin URL URL server configvirtual host directory.htaccess @@ -439,136 +513,151 @@ différente

      Cette directive informe le client que la redirection est - permanente (code 301). Son comportement est exactement le même + permanente (code 301). Son comportement est exactement le même que celui de Redirect permanent.

      ScriptAlias -Fait correspondre une URL à une zone du système de fichiers -et désigne la cible comme script CGI -ScriptAlias chemin URL -chemin fichier|chemin répertoire +Fait correspondre une URL à une zone du système de fichiers +et désigne la cible comme script CGI +ScriptAlias [chemin URL] +chemin fichier|chemin répertoire server configvirtual host +directory -

      La directive ScriptAlias présente le même +

      La directive ScriptAlias présente le même comportement que la directive Alias, mais désigne en plus le - répertoire cible comme conteneur de scripts CGI qui seront traitées + module="mod_alias">Alias, mais désigne en plus le + répertoire cible comme conteneur de scripts CGI qui seront traitées par le gestionnaire cgi-script du module mod_cgi. - Les URLs dont le chemin URL sensible à la casse (décodé avec - caractères %) commence par chemin URL seront mises en + Les URLs dont le chemin URL sensible à la casse (décodé avec + caractères %) commence par chemin URL seront mises en correspondance avec les scripts dont le chemin commence par le - second argument, qui est un chemin complet dans le système de + second argument, qui est un chemin complet dans le système de fichiers local.

      - Exemple : - ScriptAlias /cgi-bin/ /web/cgi-bin/ - + + ScriptAlias "/cgi-bin/" "/web/cgi-bin/" + -

      Une requête pour http://example.com/cgi-bin/foo - ferait exécuter par le serveur le script +

      Une requête pour http://example.com/cgi-bin/foo + ferait exécuter par le serveur le script /web/cgi-bin/foo. Cette configuration est sensiblement - équivalente à :

      - - Alias /cgi-bin/ /web/cgi-bin/
      - <Location /cgi-bin >
      - - SetHandler cgi-script
      - Options +ExecCGI
      -
      - </Location> -
      + équivalente à :

      + +Alias "/cgi-bin/" "/web/cgi-bin/" +<Location "/cgi-bin"> + SetHandler cgi-script + Options +ExecCGI +</Location> +

      Vous pouvez aussi utiliser ScriptAlias avec un script ou gestionnaire de votre cru. Par exemple :

      - - ScriptAlias /cgi-bin/ /web/cgi-handler.pl - + + ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl" + -

      Dans ce scénario, tous les fichiers faisant l'objet d'une requête - dans /cgi-bin/ seront traités par le fichier que vous - avez spécifié, ce qui vous permet d'utiliser votre propre +

      Dans ce scénario, tous les fichiers faisant l'objet d'une requête + dans /cgi-bin/ seront traités par le fichier que vous + avez spécifié, ce qui vous permet d'utiliser votre propre gestionnaire. Vous pouvez l'utiliser comme enveloppe (wrapper) pour les scripts CGI afin d'ajouter du contenu, ou autre action "maison".

      - Il est préférable d'éviter de placer les + Il est préférable d'éviter de placer les scripts CGI dans l'arborescence de DocumentRoot afin d'éviter de révéler + module="core">DocumentRoot afin d'éviter de révéler accidentellement leur code source lors d'une modification de - configuration. On y parvient aisément avec + configuration. On y parvient aisément avec ScriptAlias en mettant en correspondance une - URL et en désignant la cible comme scripts CGI par la même occasion. - Si vous choisissez de placer vos scripts CGI dans un répertoire + URL et en désignant la cible comme scripts CGI par la même occasion. + Si vous choisissez de placer vos scripts CGI dans un répertoire accessible depuis le web, n'utilisez pas - ScriptAlias. Utilisez plutôt ScriptAlias. Utilisez plutôt Directory, SetHandler, et Options comme dans l'exemple suivant : - - <Directory /usr/local/apache2/htdocs/cgi-bin >
      - - SetHandler cgi-script
      - Options ExecCGI
      -
      - </Directory> -
      - Ceci est nécessaire car plusieurs chemins URL peuvent - correspondre à la même zone du système de fichiers, court-circuitant - ainsi la directive ScriptAlias et révélant le - code source des scripts CGI s'ils ne sont pas protégés par une + +<Directory "/usr/local/apache2/htdocs/cgi-bin"> + SetHandler cgi-script + Options ExecCGI +</Directory> + + Ceci est nécessaire car plusieurs chemins URL peuvent + correspondre à la même zone du système de fichiers, court-circuitant + ainsi la directive ScriptAlias et révélant le + code source des scripts CGI s'ils ne sont pas protégés par une section Directory.
      +

      Si la directive ScriptAlias est définie au + sein d'une section Location ou LocationMatch et si l'argument chemin + URL est omis, l'argument URL sera interprété en + utilisant la syntaxe des expressions.
      + Cette syntaxe est disponible à partir de la version 2.4.19 du + serveur HTTP Apache.

      + + +<Location "/cgi-bin"> + ScriptAlias "/web/cgi-bin/" +</Location> +<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)"> + ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi" +</LocationMatch> + +
      Tutoriel CGI
      ScriptAliasMatch -Fait correspondre une URL à une zone du système de fichiers -en faisant appel aux expressions rationnelles et en désignant la cible +Fait correspondre une URL à une zone du système de fichiers +en faisant appel aux expressions rationnelles et en désignant la cible comme un script CGI ScriptAliasMatch regex -chemin fichier|chemin répertoire +chemin fichier|chemin répertoire
      server configvirtual host -

      Cette directive est équivalente à la directive Cette directive est équivalente à la directive ScriptAlias, mais fait appel aux - expressions rationnelles, à la - place d'une simple mise en correspondance de préfixe. L'expression + expressions rationnelles, à la + place d'une simple mise en correspondance de préfixe. L'expression rationnelle fournie est mise en correspondance avec le chemin URL, et si elle correspond, le serveur va substituer toute partie de - chemin entre parenthèses dans la chaîne spécifiée et l'utiliser - comme nom de fichier. Par exemple, pour activer le répertoire + chemin entre parenthèses dans la chaîne spécifiée et l'utiliser + comme nom de fichier. Par exemple, pour activer le répertoire standard /cgi-bin, on peut utiliser :

      - - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 - + + ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1" +

      Comme dans le cas d'AliasMatch, toute la puissance des expressions rationnelles peut être mise à + ref="rexex">expressions rationnelles peut être mise à contribution. Par exemple, il est possible de construire un alias - avec une comparaison du modèle du chemin URL insensible à la casse :

      + avec une comparaison du modèle du chemin URL insensible à la casse :

      - - ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 - + + ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1" + -

      Les remarques à propos de la différence entre Les remarques à propos de la différence entre Alias et AliasMatch s'appliquent aussi à la - différence entre les directives AliasMatch s'appliquent aussi à la + différence entre les directives ScriptAlias et ScriptAliasMatch. Voir la directive AliasMatch pour plus de - détails.

      + détails.

      diff --git a/docs/manual/mod/mod_alias.xml.ja b/docs/manual/mod/mod_alias.xml.ja index f46b94e45d9..09aa10e1e8d 100644 --- a/docs/manual/mod/mod_alias.xml.ja +++ b/docs/manual/mod/mod_alias.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_allowmethods - Apache HTTP Server +mod_allowmethods - Apache HTTP Server Version 2.4 - + + + + +

      Apache HTTP Server Version 2.4

      +
      <-
      +Apache > HTTP Server > Documentation > Version 2.4 > Modules

      Apache Module mod_allowmethods

      -

      Available Languages:  en 

      +

      Available Languages:  en  | + fr 

    Description:Envoie une redirection externe permanente demandant au client d'effectuer une nouvelle requte avec une URL @@ -422,7 +470,7 @@ diff
    top
    -

    RedirectTemp Directive

    +

    Directive RedirectTemp

    harf büyüklüğüne duyarsız sistemlerde bile harf büyüklüğüne duyarlıdır.

    -

    Örnek:

    - Alias /image /ftp/pub/image -

    +
    Alias "/image" "/ftp/pub/image"
    -

    http://sunucum/image/foo.gif şeklinde bir istek, sunucunun - /ftp/pub/image/foo.gif dosyasıyla yanıt vermesine sebep - olurdu. Sadece tam yol parçaları eşleştirilir; bu bakımdan yukarıdaki - Alias yapılandırması - http://sunucum/imagefoo.gif ile eşleşmez. Düzenli + +

    http://example.com/image/foo.gif şeklinde bir istek, + sunucunun /ftp/pub/image/foo.gif dosyasıyla yanıt vermesine + sebep olurdu. Sadece tam yol parçaları eşleştirilir; bu bakımdan + yukarıdaki Alias yapılandırması + http://example.com/imagefoo.gif ile eşleşmez. Düzenli ifadelerin kullanıldığı daha karmaşık eşleşmeler için AliasMatch yönergesine bakınız.

    URL-yolu’nu bir / ile @@ -140,10 +161,12 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar. sunucunun da sona bir / ekleyeceğine dikkat ediniz. Yani, eğer

    -
    Alias /icons/ /usr/local/apache/icons/
    +
    Alias "/icons/" "/usr/local/apache/icons/"
    + -

    diye bir tanım yaparsanız /icons URL’si için bir - Alias kullanılmayacaktır.

    +

    diye bir tanım yaparsanız sona bir / ekleme ihtiyacından dolayı + /icons URL’si için bir Alias + kullanılmayacaktır.

    Alias hedefleri için ek <Directory> bölümleri belirtmeniz gerekebileceğine dikkat ediniz. <Directory> bölümlerinden önce yer alan @@ -157,15 +180,30 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar. bir dizine bir Alias oluşturuyorsanız hedef dizine doğrudan erişim izni vermeniz gerekebilir.

    -

    Örnek:

    - Alias /image /ftp/pub/image
    - <Directory /ftp/pub/image>
    - - Order allow,deny
    - Allow from all
    -
    - </Directory> -

    +
    Alias "/image" "/ftp/pub/image"
    +<Directory "/ftp/pub/image">
    +    Require all granted
    +</Directory>
    + + +

    URL-yolu değiştirgesindeki bölü çizgilerinin sayısı istek + URL-yolundakiler kadardır.

    + +

    Eğer Alias yönergesi + <Location> + veya <LocationMatch> + bölümleri içinde kullanılırsa URL-yolu yoksayılır ve dosya-yolu + ifade sözdizimi kullanılarak yorumlanır.
    + Bu sözdizimi Apache 2.4.19 ve sonrasında kulanılabilir.

    + +
    <Location "/image">
    +    Alias "/ftp/pub/image"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Alias "/usr/local/apache/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    + +
    top
    @@ -173,8 +211,8 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar.
    Description:Envoie une redirection externe temporaire demandant au client d'effectuer une nouvelle requte avec une URL @@ -439,13 +487,13 @@ diff
    top
    -

    ScriptAlias Directive

    +

    Directive ScriptAlias

    - - +
    Description:Fait correspondre une URL une zone du systme de fichiers et dsigne la cible comme script CGI
    Syntaxe:ScriptAlias chemin URL +
    Syntaxe:ScriptAlias [chemin URL] chemin fichier|chemin rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_alias
    @@ -459,30 +507,25 @@ et d second argument, qui est un chemin complet dans le systme de fichiers local.

    -

    Exemple :

    - ScriptAlias /cgi-bin/ /web/cgi-bin/ -

    +
    ScriptAlias "/cgi-bin/" "/web/cgi-bin/"
    +

    Une requte pour http://example.com/cgi-bin/foo ferait excuter par le serveur le script /web/cgi-bin/foo. Cette configuration est sensiblement quivalente :

    -

    - Alias /cgi-bin/ /web/cgi-bin/
    - <Location /cgi-bin >
    - - SetHandler cgi-script
    - Options +ExecCGI
    -
    - </Location> -

    +
    Alias "/cgi-bin/" "/web/cgi-bin/"
    +<Location "/cgi-bin">
    +    SetHandler cgi-script
    +    Options +ExecCGI
    +</Location>
    +

    Vous pouvez aussi utiliser ScriptAlias avec un script ou gestionnaire de votre cru. Par exemple :

    -

    - ScriptAlias /cgi-bin/ /web/cgi-handler.pl -

    +
    ScriptAlias "/cgi-bin/" "/web/cgi-handler.pl"
    +

    Dans ce scnario, tous les fichiers faisant l'objet d'une requte dans /cgi-bin/ seront traits par le fichier que vous @@ -499,20 +542,32 @@ et d Si vous choisissez de placer vos scripts CGI dans un rpertoire accessible depuis le web, n'utilisez pas ScriptAlias. Utilisez plutt <Directory>, SetHandler, et Options comme dans l'exemple suivant : -

    - <Directory /usr/local/apache2/htdocs/cgi-bin >
    - - SetHandler cgi-script
    - Options ExecCGI
    -
    - </Directory> -

    +
    <Directory "/usr/local/apache2/htdocs/cgi-bin">
    +    SetHandler cgi-script
    +    Options ExecCGI
    +</Directory>
    + Ceci est ncessaire car plusieurs chemins URL peuvent correspondre la mme zone du systme de fichiers, court-circuitant ainsi la directive ScriptAlias et rvlant le code source des scripts CGI s'ils ne sont pas protgs par une section Directory.
    +

    Si la directive ScriptAlias est dfinie au + sein d'une section <Location> ou <LocationMatch> et si l'argument chemin + URL est omis, l'argument URL sera interprt en + utilisant la syntaxe des expressions.
    + Cette syntaxe est disponible partir de la version 2.4.19 du + serveur HTTP Apache.

    + +
    <Location "/cgi-bin">
    +    ScriptAlias "/web/cgi-bin/"
    +</Location>
    +<LocationMatch "/cgi-bin/errors/(?<NUMBER>[0-9]+)">
    +    ScriptAlias "/web/cgi-bin/errors/%{env:MATCH_NUMBER}.cgi"
    +</LocationMatch>
    + +

    Voir aussi

      @@ -520,7 +575,7 @@ et d
    top
    -

    ScriptAliasMatch Directive

    +

    Directive ScriptAliasMatch

    comme nom de fichier. Par exemple, pour activer le rpertoire standard /cgi-bin, on peut utiliser :

    -

    - ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -

    +
    ScriptAliasMatch "^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
    +

    Comme dans le cas d'AliasMatch, toute la puissance des expressions rationnelles peut tre mise contribution. Par exemple, il est possible de construire un alias avec une comparaison du modle du chemin URL insensible la casse :

    -

    - ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -

    +
    ScriptAliasMatch "(?i)^/cgi-bin(.*)" "/usr/local/apache/cgi-bin$1"
    +

    Les remarques propos de la diffrence entre Alias et AliasMatch s'appliquent aussi la diffrence entre les directives ScriptAlias et ScriptAliasMatch. Voir la directive @@ -566,7 +619,28 @@ comme un script CGI  ja  |  ko  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_alias.html.ja.utf8 b/docs/manual/mod/mod_alias.html.ja.utf8 index 9afb88c5e4b..27063d254f3 100644 --- a/docs/manual/mod/mod_alias.html.ja.utf8 +++ b/docs/manual/mod/mod_alias.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_alias - Apache HTTP サーバ +mod_alias - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_alias

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Fait correspondre une URL une zone du systme de fichiers en faisant appel aux expressions rationnelles et en dsignant la cible @@ -540,17 +595,15 @@ comme un script CGI
    @@ -60,7 +66,10 @@ で提供されるツールを使用してください。

    -

    ディレクティブ

    + +
  • コメント
  • top

    処理の順番

    @@ -381,12 +387,33 @@ CGI スクリプトに指定
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_alias.html.ko.euc-kr b/docs/manual/mod/mod_alias.html.ko.euc-kr index 50256efdd49..511927e3971 100644 --- a/docs/manual/mod/mod_alias.html.ko.euc-kr +++ b/docs/manual/mod/mod_alias.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_alias - Apache HTTP Server +mod_alias - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_alias

    @@ -51,7 +56,10 @@ mod_rewrite ϴ ̿϶.

    -
    top

    ó

    @@ -354,7 +359,28 @@ Alias /foo /gaq  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_alias.html.tr.utf8 b/docs/manual/mod/mod_alias.html.tr.utf8 index af6397574f7..acaefe8c307 100644 --- a/docs/manual/mod/mod_alias.html.tr.utf8 +++ b/docs/manual/mod/mod_alias.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_alias - Apache HTTP Sunucusu +mod_alias - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_alias

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:ホストファイルシステム上のいろいろな違う場所を ドキュメントツリーにマップする機能と、 URL のリダイレクトを行なう機能を提供する
    @@ -46,13 +50,25 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar. yönlendirmekte kullanılır. Çoğunlukla özkaynak başka bir yere taşındığında kullanılır.

    +

    Alias, + ScriptAlias ve + Redirect yönergeleri + <Location> + veya <LocationMatch> + bölümleri içinde kullanıldığında hedef yolu veya URL'yi betimlemek için + ifade sözdizimi kullanılabilir. +

    +

    mod_alias modülü basit URL değiştirme görevlerini yerine getirmek için tasarlanmıştır. Sorgu dizgelerini işleme sokmak gibi daha karmaşık görevler için mod_rewrite modülü ile sağlanan araçlar kullanılır.

    -

    Yönergeler

    +

    Konular

    +

    Yönergeler

    -

    Konular

    -

    Ayrıca bakınız:

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Yorum
  • top

    İşlem Sırası

    @@ -96,23 +109,32 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar. olabilmesi için en uzun yolu sıralamada en öne almalısınız. Örneğin aşağıdaki yapılandırma beklendiği gibi çalışacaktır:

    -

    - Alias /foo/bar /baz
    - Alias /foo /gaz -

    +
    Alias "/foo/bar" "/baz"
    +Alias "/foo" "/gaq"
    +

    Ama yukarıdaki iki satır ters sırada yerleştirilmiş olsaydı, /foo rumuzu daima /foo/bar rumuzundan önce eşleşecek, dolayısıyla ikinci yönerge yok sayılacaktı.

    -
    +

    Alias, + ScriptAlias ve + Redirect yönergeleri + <Location> + veya <LocationMatch> + bölümleri içinde kullanıldığında bu yönergeler küresel olarak tanımlı + Alias, + ScriptAlias ve + Redirect yönergelerinden öncelikli olur. +

    +
    top
    Açıklama:Belge ağacının parçalarının dosya sisteminin parçalarıyla eşlenmesini sağlar ve URL yönlendirmesi yapar.
    Durum:Temel
    - - + +
    Açıklama:URL’leri dosya sistemi konumlarıyla eşler.
    Sözdizimi:Alias URL-yolu -dosya-yolu|dizin-yolu
    Bağlam:sunucu geneli, sanal konak
    Sözdizimi:Alias [URL-yolu] dosya-yolu | +dizin-yolu
    Bağlam:sunucu geneli, sanal konak, dizin
    Durum:Temel
    Modül:mod_alias
    @@ -124,15 +146,14 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar.
    - + @@ -187,16 +225,62 @@ eşler. elde eder. Örneğin, /icons dizinini etkinleştirmek için şu yazılabilir:

    -

    - AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -

    +
    AliasMatch "^/icons(.*)" "/usr/local/apache/icons$1"
    + + +

    Düzenli ifadelerin tamamı + kullanılabilmektedir. Örneğin, URL-yolu ile harf + büyüklüğüne duyarsız eşleşmeler sağlayacak takma adlar + kullanılabilir:

    + +
    AliasMatch "(?i)^/image(.*)" "/ftp/pub/image$1"
    + + +

    Alias + ve AliasMatch yönergeleri + arasındaki başlıca fark Alias + yönergesinin, URI'nin ek parçasını, eşleşen parçayı geçip sağ tarafta + dosya yolunun ucuna kendiliğinden kopyalamasıdır. AliasMatch bunu böyle yapmaz. Yani hemen + her durumda, düzenli ifadenin istenen URI'nin tamamıyla baştan sona + eşleşmesi ve yer değiştirmeyi sağ tarafta yapması istenir.

    + +

    Başka bir deyişle, basitçe + Alias yerine + AliasMatch yazmakla aynı etkiyi + alamazsınız. En azından düzenli ifadenin başına bir ^ ve + sonuna bir (.*)$, ikinci değiştirgenin sonuna da bir + $1 eklemeniz gerekir.

    + +

    Örneğin aşağıdakini AliasMatch ile değiştirmek isteyelim:

    + +
    Alias "/image/" "/ftp/pub/image/"
    + + +

    Bu eşdeğer DEĞİLdir - bunu yapmayın! Bu herhangi bir yerinde /image/ + dizgesi bulunan tüm istekleri /ftp/pub/image/ altına gönderecektir:

    + +
    AliasMatch "/image/" "/ftp/pub/image/"
    + + +

    Aynı etkiyi elde etmek için bu gerekiyor:

    + +
    AliasMatch "^/image/(.*)$" "/ftp/pub/image/$1"
    + -

    Ayrıca, URL-yolu ile harf büyüklüğüne duyarsız - eşleşmeler sağlayacak düzenli ifadeler de kullanılabilir:

    +

    Şüphesiz, Alias yönergesini + çalıştığı yerde AliasMatch + kullanmanın hiç gereği yoktur. AliasMatch daha karmaşık şeyler yapmamızı sağlar. Örneğin + farklı dosya çeşitlerini farklı dizinlerden sunmak isteyelim:

    + +
    AliasMatch "^/image/(.*)\.jpg$" "/files/jpg.images/$1.jpg"
    +AliasMatch "^/image/(.*)\.gif$" "/files/gif.images/$1.gif"
    + + +

    İstek URL'sinin başındaki bölü çizgileri, bu modüldeki yönergeler istek + URL-yolu ile eşleştirilmeye çalışılmadan önce sunucu tarafından + yokedilir. +

    -

    - AliasMatch (?i)^/image(.*) /ftp/pub/image$1 -

    top
    @@ -204,7 +288,7 @@ eşler.
    Açıklama:URL’leri dosya sistemi konumlarıyla düzenli ifadeleri kullanarak eşler.
    Sözdizimi:AliasMatch düzenli-ifade -dosya-yolu|dizin-yolu
    Sözdizimi:AliasMatch "düzenli-ifade" +"dosya-yolu|dizin-yolu"
    Bağlam:sunucu geneli, sanal konak
    Durum:Temel
    Modül:mod_alias
    - @@ -219,35 +303,46 @@ yönlendirir.URL-yolu olarak göreli yollara izin verilmez.

    URL ise ya bir şema ve konak ismi ile başlayan - bir mutlak URL ya da bir bölü çizgisi ile başlayan bir URL yolu olabilir. İkinci durumda URL yolunun başına geçerli sunucu ismi ve şemayı sunucu ekler.

    + bir mutlak URL ya da bir bölü çizgisi ile başlayan bir URL yolu olabilir. + İkinci durumda URL yolunun başına geçerli sunucu ismi ve şemayı sunucu + ekler.

    URL-yolu ile başlayan istekler istemciye hedef URL konumuna bir yönlendirme isteği olarak dönecektir. URL-yolu’nun devamı niteliğindeki ek yol hedef URL’ye eklenir.

    -

    Örnek:

    - # Farklı bir konaktaki bir URL'ye yönlendirme
    - Redirect /hizmet http://iki.mesela.dom/hizmet
    -
    - # Aynı konak üzerinde yönlendirme
    - Redirect /bir /iki -

    +
    # Farklı bir konaktaki bir URL'ye yönlendirme
    +Redirect "/hizmet" "http://iki.example.com/hizmet"
    +
    +# Aynı konak üzerinde yönlendirme
    +Redirect "/bir" "/iki"
    -

    İstemcinin yaptığı http://mesela.dom/hizmet/fesmekan.txt + +

    İstemcinin yaptığı http://example.com/hizmet/fesmekan.txt isteğine karşılık istemciye isteği - http://iki.mesela.dom/hizmet/fesmekan.txt olarak yapması - söylenecektir. Sadece tam yol parçaları eşleştirilir, bu nedenle - http://mesela.dom/hizmetfesmekan.txt isteği yukarıdaki - yönlendirme ile eşleşmeyecektir. Düzenli ifadelerin kullanıldığı daha - karmaşık eşleşmeler için RedirectMatch yönergesine bakınız.

    + http://iki.example.com/hizmet/fesmekan.txt olarak yapması + söylenecektir. Bu GET isteklerinde de geçerlidir. Örneğin, + http://example.com/hizmet/foo.pl?q=23&a=42 isteği + http://iki.example.com/hizmet/foo.pl?q=23&a=42 adresine + yönlendirilir. POST'ların iptal edileceğini unutmayın.
    + Sadece tam yol parçaları eşleştirilir, bu nedenle + http://example.com/hizmetfesmekan.txt isteği yukarıdaki + yönlendirme ile eşleşmeyecektir. İfade + sözdizimi kullanılan daha karmaşık eşleşmeler için URL-yolu seçeneği + aşağıda açıklandığı gibi yoksayılır. Düzenli ifadelerin kullanıldığı daha + karmaşık eşleşmeler için RedirectMatch + yönergesine de bakınız.

    Bilginize

    Yapılandırma dosyasında yer alış sırasına bakmaksızın Redirect yönergeleri Alias ve ScriptAlias - yönergelerinden önce ele alınır.

    + yönergelerinden önce ele alınır. <Location> bölümü içinde kullanılmış bir + Redirect yönergesi URL-yolu belirtilmiş + Redirect ve Alias + yönergelerine göre önceliklidir.

    Herhangi bir durum belirtilmemişse "geçici" yönlendirme (HTTP durum kodu: 302) yapılır. Bu, istemciye özkaynağın @@ -274,17 +369,36 @@ yönlendirir. belirtilmez. -

    Diğer durum kodları için durum olarak sayısal - durum kodu belirtilir. Eğer durum 300 ile 399 arasındaysa bir - URL belirtmek gereklidir, yoksa belirtilmez. - Belirtilecek durum kodunu Apache’nin bilmesi gerektiğine dikkat ediniz - (http_protocol.c dosyasında bulunan +

    Diğer durum kodları için durum değiştirgesiyle + sayısal durum kodu belirtilir. Eğer durum 300 ile 399 arasındaysa bir + URL belirtmek gereklidir. Aksi takdirde, + URL bileşeni ihmal edilmelidir. Belirtilecek durum kodunun + geçerli bir HTTP Status kodu olmalı ve Apache HTTP Sunucusu kodu + bilmelidir (http_protocol.c dosyasında bulunan send_error_response işlevine bakınız).

    -

    Örnek:

    - Redirect permanent /bir http://mesela.dom/iki
    - Redirect 303 /yedi http://mesela.dom/baskabisey -

    +
    Redirect permanent "/bir" "http://example.com/iki"
    +Redirect 30" "/yedi" http://example.com/baskabisey"
    + + +

    Eğer Redirect yönergesi URL-yolu belirtilmemiş + bir <Location> + veya <LocationMatch> + bölümü içinde yer alıyorsa, URL seçeneği ifade + sözdizimi kullanılarak yorumlanır.
    + Bu sözdizimi Apache 2.4.19 ve sonrasında kullanılabilir.

    + +
    <Location "/bir">
    +    Redirect permanent "http://example.com/iki"
    +</Location>
    +<Location "/yedi">
    +    Redirect 303 "http://example.com/baskabisey"
    +</Location>
    +<LocationMatch "/error/(?<NUMBER>[0-9]+)">
    +    Redirect permanent "http://example.com/errors/%{env:MATCH_NUMBER}.html"
    +</LocationMatch>
    + +
    top
    @@ -308,10 +422,16 @@ yönlendirme gönderir. sunucudaki aynı isimli JPEG dosyalarına yönlendirmek için şu yazılabilir:

    -

    - RedirectMatch (.*)\.gif$ http://baska.sunucu.dom$1.jpg -

    - +
    RedirectMatch "(.*)\.gif$" "http://baska.example.com$1.jpg"
    + + +

    Alias ve + AliasMatch arasındaki farklarla + ilgili hususlar Redirect ve + RedirectMatch arasındakilere de + uygulanır. Ayrıntılar için AliasMatch yönergesine bakınız.

    + +
    top

    RedirectPermanent Yönergesi

    @@ -347,9 +467,9 @@ URL’ye yönlendirir.
    Açıklama:İstemciyi, bir yönlendirme isteği döndürerek farklı bir URL’ye yönlendirir.
    Sözdizimi:Redirect [durum] URL-yolu +
    Sözdizimi:Redirect [durum] [URL-yolu] URL
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:FileInfo
    - - +
    Açıklama:Bir URL’yi dosya sistemindeki bir yere eşler ve hedefi bir CGI betiği olarak çalıştırır.
    Sözdizimi:ScriptAlias URL-yolu +
    Sözdizimi:ScriptAlias [URL-yolu] dosya-yolu|dizin-yolu
    Bağlam:sunucu geneli, sanal konak
    Bağlam:sunucu geneli, sanal konak, dizin
    Durum:Temel
    Modül:mod_alias
    @@ -361,30 +481,25 @@ URL’ye yönlendirir.
    @@ -29,23 +35,22 @@
    Description:Easily restrict what HTTP methods can be used on the server
    Status:Experimental
    SourceFile:mod_allowmethods.c

    Summary

    -

    This module makes it easy to restrict what HTTP methods can -used on an server. The most common configuration would be:

    +

    This module makes it easy to restrict what HTTP methods can be +used on a server. The most common configuration would be:

    + +
    <Location "/">
    +   AllowMethods GET POST OPTIONS
    +</Location>
    -

    Example

    -<Location />
    - - AllowMethods GET POST OPTIONS
    -
    -</Location> -

    Directives

    -
    +

    Bugfix checklist

    See also

    +
    top

    AllowMethods Directive

    @@ -59,21 +64,18 @@ used on an server. The most common configuration would be:

    Module:mod_allowmethods -

    The HTTP-methods are case sensitive, and are generally as per -RFC given in upper case. The GET and HEAD methods are treated as -equivalent. The reset keyword can be used +

    The HTTP-methods are case sensitive and are generally, as per +RFC, given in upper case. The GET and HEAD methods are treated as +equivalent. The reset keyword can be used to turn off mod_allowmethods in a deeper nested context:

    -

    Example

    -<Location /svn>
    - - AllowMethods reset
    -
    -</Location> -

    +
    <Location "/svn">
    +   AllowMethods reset
    +</Location>
    +

    Caution

    -

    The TRACE method can not be denied by this module, +

    The TRACE method cannot be denied by this module; use TraceEnable instead.

    @@ -84,8 +86,30 @@ kludgy implementation of -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_allowmethods.html.fr b/docs/manual/mod/mod_allowmethods.html.fr new file mode 100644 index 00000000000..e1f8d1a98ea --- /dev/null +++ b/docs/manual/mod/mod_allowmethods.html.fr @@ -0,0 +1,118 @@ + + + + + +mod_allowmethods - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_allowmethods

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Ce module permet de restreindre aisment les mthodes HTTP +pouvant tre utilises sur le serveur
    Statut:Exprimental
    IdentificateurdeModule:allowmethods_module
    FichierSource:mod_allowmethods.c
    +

    Sommaire

    + +

    Ce module permet de restreindre aisment les mthodes HTTP +pouvant tre utilises sur le serveur. La configuration la plus courante +est du style :

    + +
    <Location "/">
    +   AllowMethods GET POST OPTIONS
    +</Location>
    + + +
    + + +
    top
    +

    Directive AllowMethods

    + + + + + + + +
    Description:Restreint l'accs aux mthodes HTTP spcifies
    Syntaxe:AllowMethods reset|HTTP-method +[HTTP-method]...
    Dfaut:AllowMethods reset
    Contexte:rpertoire
    Statut:Exprimental
    Module:mod_allowmethods
    + +

    Les noms des mthodes HTTP sont sensibles la casse, et sont en +gnral dfinis en majuscules, comme dans les RFCs. Les mthodes GET et +HEAD sont considres comme quivalentes. Le mot-cl +reset permet de dsactiver +mod_allowmethods dans les niveaux infrieurs +d'imbrication :

    + +
    <Location "/svn">
    +   AllowMethods reset
    +</Location>
    + + +

    Avertissement

    +

    La mthode TRACE ne peut pas tre rejete par ce module ; pour ce + faire, vous devez utiliser la directive TraceEnable.

    +
    + +

    Le module mod_allowmethods a t crit pour +remplacer l'implmentation "bricole" des directives Limit et LimitExcept.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_allowmethods.xml b/docs/manual/mod/mod_allowmethods.xml index e9fcca004d1..22b5db4fb4e 100644 --- a/docs/manual/mod/mod_allowmethods.xml +++ b/docs/manual/mod/mod_allowmethods.xml @@ -39,16 +39,14 @@ in order for it to rebuild correctly. -

    This module makes it easy to restrict what HTTP methods can -used on an server. The most common configuration would be:

    - -Example -<Location />
    - - AllowMethods GET POST OPTIONS
    -
    +

    This module makes it easy to restrict what HTTP methods can be +used on a server. The most common configuration would be:

    + + +<Location "/"> + AllowMethods GET POST OPTIONS </Location> -
    +
    @@ -63,21 +61,19 @@ used on an server. The most common configuration would be:

    -

    The HTTP-methods are case sensitive, and are generally as per -RFC given in upper case. The GET and HEAD methods are treated as -equivalent. The reset keyword can be used +

    The HTTP-methods are case sensitive and are generally, as per +RFC, given in upper case. The GET and HEAD methods are treated as +equivalent. The reset keyword can be used to turn off mod_allowmethods in a deeper nested context:

    -Example -<Location /svn>
    - - AllowMethods reset
    -
    + +<Location "/svn"> + AllowMethods reset </Location> -
    + Caution -

    The TRACE method can not be denied by this module, +

    The TRACE method cannot be denied by this module; use TraceEnable instead.

    diff --git a/docs/manual/mod/mod_allowmethods.xml.fr b/docs/manual/mod/mod_allowmethods.xml.fr new file mode 100644 index 00000000000..9f0ec1a97ca --- /dev/null +++ b/docs/manual/mod/mod_allowmethods.xml.fr @@ -0,0 +1,95 @@ + + + + + + + + + + + + +mod_allowmethods +Ce module permet de restreindre aisément les méthodes HTTP +pouvant être utilisées sur le serveur +Experimental +mod_allowmethods.c +allowmethods_module + + + +

    Ce module permet de restreindre aisément les méthodes HTTP +pouvant être utilisées sur le serveur. La configuration la plus courante +est du style :

    + + +<Location "/"> + AllowMethods GET POST OPTIONS +</Location> + + +
    + + +AllowMethods +Restreint l'accès aux méthodes HTTP spécifiées +AllowMethods reset|HTTP-method +[HTTP-method]... +AllowMethods reset +directory +Experimental + + + +

    Les noms des méthodes HTTP sont sensibles à la casse, et sont en +général définis en majuscules, comme dans les RFCs. Les méthodes GET et +HEAD sont considérées comme équivalentes. Le mot-clé +reset permet de désactiver +mod_allowmethods dans les niveaux inférieurs +d'imbrication :

    + + +<Location "/svn"> + AllowMethods reset +</Location> + + +Avertissement +

    La méthode TRACE ne peut pas être rejetée par ce module ; pour ce + faire, vous devez utiliser la directive TraceEnable.

    +
    + +

    Le module mod_allowmethods a été écrit pour +remplacer l'implémentation "bricolée" des directives Limit et LimitExcept.

    +
    +
    + +
    + diff --git a/docs/manual/mod/mod_allowmethods.xml.meta b/docs/manual/mod/mod_allowmethods.xml.meta index 52ebedb1374..e7cf8b579b6 100644 --- a/docs/manual/mod/mod_allowmethods.xml.meta +++ b/docs/manual/mod/mod_allowmethods.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_asis.html.en b/docs/manual/mod/mod_asis.html.en index 5be707fc4d7..e793504a1a4 100644 --- a/docs/manual/mod/mod_asis.html.en +++ b/docs/manual/mod/mod_asis.html.en @@ -1,23 +1,28 @@ - -mod_asis - Apache HTTP Server +mod_asis - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_asis

    @@ -44,18 +49,18 @@ HTTP headers

    For historical reasons, this module will also process any file with the mime type httpd/send-as-is.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Usage

    @@ -63,7 +68,8 @@ HTTP headers

    In the server configuration file, associate files with the send-as-is handler e.g.

    -

    AddHandler send-as-is asis

    +
    AddHandler send-as-is asis
    +

    The contents of any file with a .asis extension will then be sent by Apache httpd to the client with almost no @@ -110,7 +116,28 @@ HTTP headers  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_asis.html.fr b/docs/manual/mod/mod_asis.html.fr index 98cf64d2203..2179e12552c 100644 --- a/docs/manual/mod/mod_asis.html.fr +++ b/docs/manual/mod/mod_asis.html.fr @@ -1,23 +1,28 @@ - -mod_asis - Serveur Apache HTTP +mod_asis - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_asis

    @@ -44,18 +49,18 @@ HTTP

    Pour des raisons historiques, ce module traitera aussi tout fichier dont le type MIME est httpd/send-as-is.

    -

    Directives

    -

    Ce module ne fournit aucune directive.

    -

    Sujets

    +

    Sujets

    Voir aussi

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top

    Mode d'emploi

    @@ -63,7 +68,8 @@ d'Apache httpd

    Dans le fichier de configuration, associez les fichiers asis au gestionnaire send-as-is comme ceci :

    -

    AddHandler send-as-is asis

    +
    AddHandler send-as-is asis
    +

    Le contenu de tout fichier possdant l'extension .asis sera envoy par Apache httpd au client pratiquement tel @@ -110,7 +116,28 @@ d'Apache httpd  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_asis.html.ja.utf8 b/docs/manual/mod/mod_asis.html.ja.utf8 index 373f3247c28..5c985f5166f 100644 --- a/docs/manual/mod/mod_asis.html.ja.utf8 +++ b/docs/manual/mod/mod_asis.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_asis - Apache HTTP サーバ +mod_asis - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_asis

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -46,17 +52,17 @@

    歴史的な理由により、このモジュールは mime タイプ httpd/send-as-is のファイルも処理します。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    +

    トピック

    参照

    +

    ディレクティブ

    +

    このモジュールにディレクティブはありません。

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    使用法

    @@ -107,11 +113,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_asis.html.ko.euc-kr b/docs/manual/mod/mod_asis.html.ko.euc-kr index 317c88c0709..d35d29a452b 100644 --- a/docs/manual/mod/mod_asis.html.ko.euc-kr +++ b/docs/manual/mod/mod_asis.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_asis - Apache HTTP Server +mod_asis - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_asis

    @@ -45,17 +50,17 @@

    ſ mime type httpd/send-as-is ϵ óߴ.

    -

    þ

    -

    ⿡ þ ϴ.

    -

    + +
  • Comments
  • top

    @@ -106,7 +111,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_asis.xml b/docs/manual/mod/mod_asis.xml index 4da3831def3..d42f8da6621 100644 --- a/docs/manual/mod/mod_asis.xml +++ b/docs/manual/mod/mod_asis.xml @@ -51,7 +51,7 @@ HTTP headers

    In the server configuration file, associate files with the send-as-is handler e.g.

    - AddHandler send-as-is asis + AddHandler send-as-is asis

    The contents of any file with a .asis extension will then be sent by Apache httpd to the client with almost no diff --git a/docs/manual/mod/mod_asis.xml.fr b/docs/manual/mod/mod_asis.xml.fr index 3b0071be032..f8d78810185 100644 --- a/docs/manual/mod/mod_asis.xml.fr +++ b/docs/manual/mod/mod_asis.xml.fr @@ -1,7 +1,7 @@ - + @@ -54,7 +54,7 @@ d'Apache httpd

    Dans le fichier de configuration, associez les fichiers asis au gestionnaire send-as-is comme ceci :

    - AddHandler send-as-is asis + AddHandler send-as-is asis

    Le contenu de tout fichier possédant l'extension .asis sera envoyé par Apache httpd au client pratiquement tel diff --git a/docs/manual/mod/mod_asis.xml.ja b/docs/manual/mod/mod_asis.xml.ja index bee53d36513..58edbf995a0 100644 --- a/docs/manual/mod/mod_asis.xml.ja +++ b/docs/manual/mod/mod_asis.xml.ja @@ -1,7 +1,7 @@ - + + -mod_auth_basic - Apache HTTP Server +mod_auth_basic - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_auth_basic

    @@ -26,7 +31,7 @@  ja  |  ko 

    -
    説明:自分用の HTTP ヘッダの書かれているファイルを送信する
    ステータス:Base
    モジュール識別子:asis_module
    +
    Description:Basic authentication
    @@ -44,16 +49,17 @@ +
  • Comments
  • top

    AuthBasicAuthoritative Directive

    @@ -80,6 +86,66 @@ lower level modules directive. When using such modules, the order of processing is determined in the modules' source code and is not configurable.

    +
    +
    top
    +
    Description:Basic HTTP authentication
    Status:Base
    ModuleIdentifier:auth_basic_module
    SourceFile:mod_auth_basic.c
    + + + + + + + + +
    Description:Fake basic authentication using the given expressions for +username and password
    Syntax:AuthBasicFake off|username [password]
    Default:none
    Context:directory, .htaccess
    Override:AuthConfig
    Status:Base
    Module:mod_auth_basic
    Compatibility:Apache HTTP Server 2.4.5 and later
    +

    The username and password specified are combined into an + Authorization header, which is passed to the server or service + behind the webserver. Both the username and password fields are + interpreted using the expression parser, + which allows both the username and password to be set based on + request parameters.

    + +

    If the password is not specified, the default value "password" + will be used. To disable fake basic authentication for an URL + space, specify "AuthBasicFake off".

    + +

    In this example, we pass a fixed username and password to a + backend server.

    + +

    Fixed Example

    <Location "/demo">
    +    AuthBasicFake demo demopass
    +</Location>
    +
    + +

    In this example, we pass the email address extracted from a client + certificate, extending the functionality of the FakeBasicAuth option + within the SSLOptions + directive. Like the FakeBasicAuth option, the password is set to the + fixed string "password".

    + +

    Certificate Example

    <Location "/secure">
    +    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}"
    +</Location>
    +
    + +

    Extending the above example, we generate a password by hashing the + email address with a fixed passphrase, and passing the hash to the + backend server. This can be used to gate into legacy systems that do + not support client certificates.

    + +

    Password Example

    <Location "/secure">
    +    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}"
    +</Location>
    +
    + +

    Exclusion Example

    <Location "/public">
    +    AuthBasicFake off
    +</Location>
    +
    + +
    top

    AuthBasicProvider Directive

    @@ -98,20 +164,15 @@ lower level modules The default file provider is implemented by the mod_authn_file module. Make sure that the chosen provider module is present in the server.

    - -

    Example

    - <Location /secure>
    - - AuthType basic
    - AuthName "private area"
    - AuthBasicProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    -
    - </Location> -

    - +

    Example

    <Location "/secure">
    +    AuthType basic
    +    AuthName "private area"
    +    AuthBasicProvider  dbm
    +    AuthDBMType        SDBM
    +    AuthDBMUserFile    "/www/etc/dbmpasswd"
    +    Require            valid-user
    +</Location>
    +

    Providers are queried in order until a provider finds a match for the requested username, at which point this sole provider will attempt to check the password. A failure to verify the password does @@ -121,6 +182,78 @@ lower level modules mod_authn_file, mod_authn_dbd, mod_authnz_ldap and mod_authn_socache.

    +
    +
    top
    +

    AuthBasicUseDigestAlgorithm Directive

    + + + + + + + + + +
    Description:Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    Syntax:AuthBasicUseDigestAlgorithm MD5|Off
    Default:AuthBasicUseDigestAlgorithm Off
    Context:directory, .htaccess
    Override:AuthConfig
    Status:Base
    Module:mod_auth_basic
    Compatibility:Apache HTTP Server 2.4.7 and later
    +

    Normally, when using Basic Authentication, the providers listed in + AuthBasicProvider + attempt to verify a user by checking their data stores for + a matching username and associated password. The stored passwords + are usually encrypted, but not necessarily so; each provider may + choose its own storage scheme for passwords.

    + +

    When using AuthDigestProvider and Digest + Authentication, providers perform a similar check to find a matching + username in their data stores. However, unlike in the Basic + Authentication case, the value associated with each stored username + must be an encrypted string composed from the username, realm name, + and password. (See + + RFC 2617, Section 3.2.2.2 for more details on the format used + for this encrypted string.)

    + +

    As a consequence of the difference in the stored values between + Basic and Digest Authentication, converting from Digest + Authentication to Basic Authentication generally requires that all + users be assigned new passwords, as their existing passwords cannot + be recovered from the password storage scheme imposed on those + providers which support Digest Authentication.

    + +

    Setting the AuthBasicUseDigestAlgorithm directive + to MD5 will cause the user's Basic Authentication password + to be checked using the same encrypted format as for Digest + Authentication. First a string composed from the username, realm name, + and password is hashed with MD5; then the username and this encrypted + string are passed to the providers listed in + AuthBasicProvider + as if + AuthType + was set to Digest and Digest Authentication was in force. +

    + +

    Through the use of AuthBasicUseDigestAlgorithm + a site may switch from Digest to Basic Authentication without + requiring users to be assigned new passwords.

    + +
    + The inverse process of switching from Basic to Digest + Authentication without assigning new passwords is generally + not possible. Only if the Basic Authentication passwords + have been stored in plain text or with a reversable encryption + scheme will it be possible to recover them and generate a + new data store following the Digest Authentication password + storage scheme. +
    + +
    + Only providers which support Digest Authentication will be able + to authenticate users when AuthBasicUseDigestAlgorithm + is set to MD5. Use of other providers will result + in an error response and the client will be denied access. +
    +
    @@ -128,7 +261,28 @@ lower level modules  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_basic.html.fr b/docs/manual/mod/mod_auth_basic.html.fr index c27206b8ef1..99a3c0fb62f 100644 --- a/docs/manual/mod/mod_auth_basic.html.fr +++ b/docs/manual/mod/mod_auth_basic.html.fr @@ -1,23 +1,28 @@ - -mod_auth_basic - Serveur Apache HTTP +mod_auth_basic - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_auth_basic

    @@ -26,7 +31,7 @@  ja  |  ko 

    - +
    Description:Authentification de base
    @@ -45,20 +50,21 @@ +
  • Commentaires
  • top
    -
    Description:Authentification HTTP de base
    Statut:Base
    IdentificateurdeModule:auth_basic_module
    FichierSource:mod_auth_basic.c
    top
    -
    Description:Dfinit si les processus d'autorisation et d'authentification peuvent tre confis des modules de plus bas @@ -88,7 +94,72 @@ niveau
    + + + + + + + + +
    Description:Authentification de base simule l'aide des nom +d'utilisateur et mot de passe fournis
    Syntaxe:AuthBasicFake off|nom-utilisateur [mot-de-passe]
    Dfaut:none
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_auth_basic
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    Les nom d'utilisateur et mot de passe spcifis sont rassembls + dans un en-tte d'autorisation qui est transmis au serveur ou au + service sous-jacent au serveur. Ces nom d'utilisateur et mot de + passe sont interprts par l'interprteur + d'expression, ce qui permet de les dfinir en fonction de + paramtres de la requte.

    + +

    Si aucun mot de passe n'est spcifi, la valeur par dfaut + "password" sera utilise. Pour dsactiver l'authentification de base + simule pour un espace d'URL, dfinissez AuthBasicFake "off".

    + +

    Dans l'exemple suivant, un nom d'utilisateur et un mot de passe + prdfinis sont transmis un serveur d'arrire-plan :

    + +

    Exemple de transmission d'un nom d'utilisateur et + d'un mot de passe prdfinis

    <Location "/demo">
    +    AuthBasicFake demo demopass
    +</Location>
    +
    + +

    Dans l'exemple suivant, l'adresse email extraite d'un certificat + client est transmise au serveur, tendant par l-mme la + fonctionnalit de l'option FakeBasicAuth de la directive SSLOptions. Comme avec l'option + FakeBasicAuth, le mot de passe se voit attribu le contenu fixe de + la chane "password".

    + +

    Exemple d'utilisation avec un certificat

    <Location "/secure">
    +    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}"
    +</Location>
    +
    + +

    Pour complter l'exemple prcdent, il est possible de gnrer la + valeur du mot de passe en procdant un hashage de l'adresse email + partir d'un mot d'une passphrase initial fixe, puis de transmettre le + rsultat obtenu au serveur d'arrire-plan. Ceci peut s'avrer utile + pour donner accs des serveurs anciens qui ne supportent pas les + certificats clients.

    + +

    Exemple de gnration de mot de passe par hashage de + l'adresse email

    <Location "/secure">
    +    AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}"
    +</Location>
    +
    + +

    Dsactivation de l'authentification simule

    <Location "/public">
    +    AuthBasicFake off
    +</Location>
    +
    + + +
    +
    top
    +

    Directive AuthBasicProvider

    @@ -108,19 +179,15 @@ cette zone du site web implmentant le fournisseur choisi soit bien prsent dans le serveur.

    -

    Exemple

    - <Location /secure>
    - - AuthType basic
    - AuthName "private area"
    - AuthBasicProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    -
    - </Location> -

    - +

    Exemple

    <Location "/secure">
    +    AuthType basic
    +    AuthName "private area"
    +    AuthBasicProvider  dbm
    +    AuthDBMType        SDBM
    +    AuthDBMUserFile    "/www/etc/dbmpasswd"
    +    Require            valid-user
    +</Location>
    +

    Les fournisseurs sont sollicits dans l'ordre jusqu' ce que l'un d'entre eux trouve une correspondance pour le nom d'utilisateur de la requte ; alors, ce dernier fournisseur sera le seul vrifier @@ -132,6 +199,88 @@ cette zone du site web mod_authn_file, mod_authn_dbd, mod_authnz_ldap et mod_authn_socache.

    + +
    top
    +
    Description:Dfinit le(les) fournisseur(s) d'authentification pour cette zone du site web
    + + + + + + + + +
    Description:Vrifie les mots de passe auprs des fournisseurs +d'authentification la manire de l'authentification de type Digest. +
    Syntaxe:AuthBasicUseDigestAlgorithm MD5|Off
    Dfaut:AuthBasicUseDigestAlgorithm Off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_auth_basic
    Compatibilit:Disponible partir de la version 2.4.7 du serveur HTTP +Apache
    +

    Normalement, lorsqu'on utilise l'authentification basique, les + fournisseurs spcifis via la directive AuthBasicProvider tentent de + contrler l'identit d'un utilisateur en recherchant dans leurs + bases de donnes l'existence d'un couple utilisateur/mot de passe + correspondant. Les mots de passe enregistrs sont en gnral + chiffrs, mais ce n'est pas systmatique ; chaque fournisseur peut + choisir son propre mode de stockage des mots de passe.

    + +

    Lorsqu'on utilise l'authentification de type Digest, les + fournisseurs spcifis par la directive AuthDigestProvider effectuent + une recherche similaire dans leurs bases de + donnes pour trouver un couple utilisateur/mot de passe + correspondant. Cependant, la diffrence de l'authentification + basique, les donnes associes chaque utilisateur et comportant le + nom d'utilisateur, le domaine de protection (realm) et le mot de + passe doivent tre contenues dans une chane chiffre (Voir le + document RFC 2617, + Section 3.2.2.2 pour plus de dtails propos du type de + chiffrement utilis pour cette chane).

    + +

    A cause de la diffrence entre les mthodes de stockage des + donnes des authentifications de type basique et digest, le passage + d'une mthode d'authentification de type digest une mthode + d'authentification de type basique requiert l'attribution de + nouveaux + mots de passe chaque utilisateur, car leur mots de passe existant + ne peut pas tre extrait partir du schma de stockage utilis + par les fournisseurs d'authentification de type digest.

    + +

    Si la directive AuthBasicUseDigestAlgorithm est + dfinie la valeur MD5, le mot de passe d'un + utilisateur dans le cas de l'authentification basique sera vrifi + en utilisant le mme format de chiffrement que dans le cas de + l'authentification de type digest. Tout d'abord, une chane + comportant le nom d'utilisateur, le domaine de protection (realm) et + le mot de passe est gnre sous forme de condens (hash) en + utilisant l'algorithme MD5 ; puis le nom d'utilisateur et cette + chane chiffre sont transmis aux fournisseurs spcifis via la + directive AuthBasicProvider comme si la + directive AuthType + tait dfinie Digest et si l'authentification de type + Digest tait utilise. +

    + +

    Grce cette directive, un site peut basculer d'une + authentification de type digest basique sans devoir changer les + mots de passe des utilisateurs.

    + +
    + Le processus inverse consistant passer d'une authentification de + type basique digest sans changer les mots de passe n'est en + gnral pas possible. Les mots de passe enregistrs dans le cas + d'une authentification de type basique ne pourront tre extraits + et chiffrs nouveau selon le schma de l'authentification de + type digest, que s'ils ont t stocks en clair ou selon un schma de + chiffrement rversible. +
    + +
    + Seuls les fournisseurs qui supportent l'authentification de type + digest pourront authentifier les utilisateurs lorsque la directive + AuthBasicUseDigestAlgorithm + est dfinie MD5. L'utilisation d'un autre + fournisseur provoquera un message d'erreur et le client se verra + refuser l'accs.
    +
    @@ -139,7 +288,28 @@ cette zone du site web  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_basic.html.ja.utf8 b/docs/manual/mod/mod_auth_basic.html.ja.utf8 index d566821182a..6c20d15e667 100644 --- a/docs/manual/mod/mod_auth_basic.html.ja.utf8 +++ b/docs/manual/mod/mod_auth_basic.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_auth_basic - Apache HTTP サーバ +mod_auth_basic - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_auth_basic

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -47,9 +53,11 @@ +
  • コメント
  • top
    top
    +
    説明:基本認証
    ステータス:Base
    モジュール識別子:auth_basic_module
    + + + + + + + + +
    説明:Fake basic authentication using the given expressions for +username and password
    構文:AuthBasicFake off|username [password]
    デフォルト:none
    コンテキスト:ディレクトリ, .htaccess
    上書き:AuthConfig
    ステータス:Base
    モジュール:mod_auth_basic
    互換性:Apache HTTP Server 2.4.5 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    AuthBasicProvider ディレクティブ

    @@ -126,13 +149,50 @@ mod_authnz_ldap で実装されています。

    +
    top
    +
    説明:この位置に対する認証プロバイダを設定します。
    + + + + + + + + +
    説明:Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    構文:AuthBasicUseDigestAlgorithm MD5|Off
    デフォルト:AuthBasicUseDigestAlgorithm Off
    コンテキスト:ディレクトリ, .htaccess
    上書き:AuthConfig
    ステータス:Base
    モジュール:mod_auth_basic
    互換性:Apache HTTP Server 2.4.7 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_basic.html.ko.euc-kr b/docs/manual/mod/mod_auth_basic.html.ko.euc-kr index 96196e93ec0..b2c07a77037 100644 --- a/docs/manual/mod/mod_auth_basic.html.ko.euc-kr +++ b/docs/manual/mod/mod_auth_basic.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_auth_basic - Apache HTTP Server +mod_auth_basic - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_auth_basic

    top

    AuthBasicAuthoritative þ

    @@ -84,6 +91,21 @@
    top
    +

    AuthBasicFake þ

    + + + + + + + + + +
    :Fake basic authentication using the given expressions for +username and password
    :AuthBasicFake off|username [password]
    ⺻:none
    :directory, .htaccess
    Override ɼ:AuthConfig
    :Base
    :mod_auth_basic
    :Apache HTTP Server 2.4.5 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    AuthBasicProvider þ

    @@ -120,13 +142,50 @@ ư.

    +
    top
    +
    : ġ ڸ Ѵ
    + + + + + + + + +
    :Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    :AuthBasicUseDigestAlgorithm MD5|Off
    ⺻:AuthBasicUseDigestAlgorithm Off
    :directory, .htaccess
    Override ɼ:AuthConfig
    :Base
    :mod_auth_basic
    :Apache HTTP Server 2.4.7 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_basic.xml b/docs/manual/mod/mod_auth_basic.xml index d02bbc6d5a0..ed64ccd6248 100644 --- a/docs/manual/mod/mod_auth_basic.xml +++ b/docs/manual/mod/mod_auth_basic.xml @@ -23,7 +23,7 @@ mod_auth_basic -Basic authentication +Basic HTTP authentication Base mod_auth_basic.c auth_basic_module @@ -41,7 +41,6 @@ AuthName AuthType Require -Match Authentication howto @@ -60,20 +59,18 @@ The default file provider is implemented by the mod_authn_file module. Make sure that the chosen provider module is present in the server.

    - Example - <Location /secure>
    - - AuthType basic
    - AuthName "private area"
    - AuthBasicProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    -
    - </Location> + +<Location "/secure"> + AuthType basic + AuthName "private area" + AuthBasicProvider dbm + AuthDBMType SDBM + AuthDBMUserFile "/www/etc/dbmpasswd" + Require valid-user +</Location> +
    -

    Providers are queried in order until a provider finds a match for the requested username, at which point this sole provider will attempt to check the password. A failure to verify the password does @@ -113,4 +110,151 @@ lower level modules + +AuthBasicFake +Fake basic authentication using the given expressions for +username and password +AuthBasicFake off|username [password] +none +directory.htaccess + +AuthConfig +Apache HTTP Server 2.4.5 and later + +

    The username and password specified are combined into an + Authorization header, which is passed to the server or service + behind the webserver. Both the username and password fields are + interpreted using the expression parser, + which allows both the username and password to be set based on + request parameters.

    + +

    If the password is not specified, the default value "password" + will be used. To disable fake basic authentication for an URL + space, specify "AuthBasicFake off".

    + +

    In this example, we pass a fixed username and password to a + backend server.

    + + Fixed Example + +<Location "/demo"> + AuthBasicFake demo demopass +</Location> + + + +

    In this example, we pass the email address extracted from a client + certificate, extending the functionality of the FakeBasicAuth option + within the SSLOptions + directive. Like the FakeBasicAuth option, the password is set to the + fixed string "password".

    + + Certificate Example + +<Location "/secure"> + AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" +</Location> + + + +

    Extending the above example, we generate a password by hashing the + email address with a fixed passphrase, and passing the hash to the + backend server. This can be used to gate into legacy systems that do + not support client certificates.

    + + Password Example + +<Location "/secure"> + AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}" +</Location> + + + + Exclusion Example + +<Location "/public"> + AuthBasicFake off +</Location> + + + +
    +
    + + +AuthBasicUseDigestAlgorithm +Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. + +AuthBasicUseDigestAlgorithm MD5|Off +AuthBasicUseDigestAlgorithm Off +directory.htaccess + +AuthConfig +Apache HTTP Server 2.4.7 and later + + +

    Normally, when using Basic Authentication, the providers listed in + AuthBasicProvider + attempt to verify a user by checking their data stores for + a matching username and associated password. The stored passwords + are usually encrypted, but not necessarily so; each provider may + choose its own storage scheme for passwords.

    + +

    When using AuthDigestProvider and Digest + Authentication, providers perform a similar check to find a matching + username in their data stores. However, unlike in the Basic + Authentication case, the value associated with each stored username + must be an encrypted string composed from the username, realm name, + and password. (See + + RFC 2617, Section 3.2.2.2 for more details on the format used + for this encrypted string.)

    + +

    As a consequence of the difference in the stored values between + Basic and Digest Authentication, converting from Digest + Authentication to Basic Authentication generally requires that all + users be assigned new passwords, as their existing passwords cannot + be recovered from the password storage scheme imposed on those + providers which support Digest Authentication.

    + +

    Setting the AuthBasicUseDigestAlgorithm directive + to MD5 will cause the user's Basic Authentication password + to be checked using the same encrypted format as for Digest + Authentication. First a string composed from the username, realm name, + and password is hashed with MD5; then the username and this encrypted + string are passed to the providers listed in + AuthBasicProvider + as if + AuthType + was set to Digest and Digest Authentication was in force. +

    + +

    Through the use of AuthBasicUseDigestAlgorithm + a site may switch from Digest to Basic Authentication without + requiring users to be assigned new passwords.

    + + + The inverse process of switching from Basic to Digest + Authentication without assigning new passwords is generally + not possible. Only if the Basic Authentication passwords + have been stored in plain text or with a reversable encryption + scheme will it be possible to recover them and generate a + new data store following the Digest Authentication password + storage scheme. + + + + Only providers which support Digest Authentication will be able + to authenticate users when AuthBasicUseDigestAlgorithm + is set to MD5. Use of other providers will result + in an error response and the client will be denied access. + +
    +
    + diff --git a/docs/manual/mod/mod_auth_basic.xml.fr b/docs/manual/mod/mod_auth_basic.xml.fr index ae4d87d4692..50dc5705f6b 100644 --- a/docs/manual/mod/mod_auth_basic.xml.fr +++ b/docs/manual/mod/mod_auth_basic.xml.fr @@ -1,7 +1,7 @@ - + @@ -25,7 +25,7 @@ mod_auth_basic -Authentification de base +Authentification HTTP de base Base mod_auth_basic.c auth_basic_module @@ -44,7 +44,6 @@ AuthName AuthType Require -Match Mode d'emploi de l'authentification @@ -69,18 +68,17 @@ cette zone du site web
    serveur.

    Exemple - <Location /secure>
    - - AuthType basic
    - AuthName "private area"
    - AuthBasicProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    -
    - </Location> + +<Location "/secure"> + AuthType basic + AuthName "private area" + AuthBasicProvider dbm + AuthDBMType SDBM + AuthDBMUserFile "/www/etc/dbmpasswd" + Require valid-user +</Location> +
    -

    Les fournisseurs sont sollicités dans l'ordre jusqu'à ce que l'un d'entre eux trouve une correspondance pour le nom d'utilisateur de la requête ; alors, ce dernier fournisseur sera le seul à vérifier @@ -126,4 +124,170 @@ niveau + +AuthBasicFake +Authentification de base simulée à l'aide des nom +d'utilisateur et mot de passe fournis +AuthBasicFake off|nom-utilisateur [mot-de-passe] +none +directory.htaccess + +AuthConfig + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + +

    Les nom d'utilisateur et mot de passe spécifiés sont rassemblés + dans un en-tête d'autorisation qui est transmis au serveur ou au + service sous-jacent au serveur. Ces nom d'utilisateur et mot de + passe sont interprétés par l'interpréteur + d'expression, ce qui permet de les définir en fonction de + paramètres de la requête.

    + +

    Si aucun mot de passe n'est spécifié, la valeur par défaut + "password" sera utilisée. Pour désactiver l'authentification de base + simulée pour un espace d'URL, définissez AuthBasicFake à "off".

    + +

    Dans l'exemple suivant, un nom d'utilisateur et un mot de passe + prédéfinis sont transmis à un serveur d'arrière-plan :

    + + Exemple de transmission d'un nom d'utilisateur et + d'un mot de passe prédéfinis + +<Location "/demo"> + AuthBasicFake demo demopass +</Location> + + + +

    Dans l'exemple suivant, l'adresse email extraite d'un certificat + client est transmise au serveur, étendant par là-même la + fonctionnalité de l'option FakeBasicAuth de la directive SSLOptions. Comme avec l'option + FakeBasicAuth, le mot de passe se voit attribué le contenu fixe de + la chaîne "password".

    + + Exemple d'utilisation avec un certificat + +<Location "/secure"> + AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" +</Location> + + + +

    Pour compléter l'exemple précédent, il est possible de générer la + valeur du mot de passe en procédant à un hashage de l'adresse email + à partir d'un mot d'une passphrase initial fixée, puis de transmettre le + résultat obtenu au serveur d'arrière-plan. Ceci peut s'avérer utile + pour donner accès à des serveurs anciens qui ne supportent pas les + certificats clients.

    + + Exemple de génération de mot de passe par hashage de + l'adresse email + +<Location "/secure"> + AuthBasicFake "%{SSL_CLIENT_S_DN_Email}" "%{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}}" +</Location> + + + + Désactivation de l'authentification simulée + +<Location "/public"> + AuthBasicFake off +</Location> + + + + +
    + + +AuthBasicUseDigestAlgorithm +Vérifie les mots de passe auprès des fournisseurs +d'authentification à la manière de l'authentification de type Digest. + +AuthBasicUseDigestAlgorithm MD5|Off +AuthBasicUseDigestAlgorithm Off +directory.htaccess + +AuthConfig +Disponible à partir de la version 2.4.7 du serveur HTTP +Apache + + +

    Normalement, lorsqu'on utilise l'authentification basique, les + fournisseurs spécifiés via la directive AuthBasicProvider tentent de + contrôler l'identité d'un utilisateur en recherchant dans leurs + bases de données l'existence d'un couple utilisateur/mot de passe + correspondant. Les mots de passe enregistrés sont en général + chiffrés, mais ce n'est pas systématique ; chaque fournisseur peut + choisir son propre mode de stockage des mots de passe.

    + +

    Lorsqu'on utilise l'authentification de type Digest, les + fournisseurs spécifiés par la directive AuthDigestProvider effectuent + une recherche similaire dans leurs bases de + données pour trouver un couple utilisateur/mot de passe + correspondant. Cependant, à la différence de l'authentification + basique, les données associées à chaque utilisateur et comportant le + nom d'utilisateur, le domaine de protection (realm) et le mot de + passe doivent être contenues dans une chaîne chiffrée (Voir le + document RFC 2617, + Section 3.2.2.2 pour plus de détails à propos du type de + chiffrement utilisé pour cette chaîne).

    + +

    A cause de la différence entre les méthodes de stockage des + données des authentifications de type basique et digest, le passage + d'une méthode d'authentification de type digest à une méthode + d'authentification de type basique requiert l'attribution de + nouveaux + mots de passe à chaque utilisateur, car leur mots de passe existant + ne peut pas être extrait à partir du schéma de stockage utilisé + par les fournisseurs d'authentification de type digest.

    + +

    Si la directive AuthBasicUseDigestAlgorithm est + définie à la valeur MD5, le mot de passe d'un + utilisateur dans le cas de l'authentification basique sera vérifié + en utilisant le même format de chiffrement que dans le cas de + l'authentification de type digest. Tout d'abord, une chaîne + comportant le nom d'utilisateur, le domaine de protection (realm) et + le mot de passe est générée sous forme de condensé (hash) en + utilisant l'algorithme MD5 ; puis le nom d'utilisateur et cette + chaîne chiffrée sont transmis aux fournisseurs spécifiés via la + directive AuthBasicProvider comme si la + directive AuthType + était définie à Digest et si l'authentification de type + Digest était utilisée. +

    + +

    Grâce à cette directive, un site peut basculer d'une + authentification de type digest à basique sans devoir changer les + mots de passe des utilisateurs.

    + + + Le processus inverse consistant à passer d'une authentification de + type basique à digest sans changer les mots de passe n'est en + général pas possible. Les mots de passe enregistrés dans le cas + d'une authentification de type basique ne pourront être extraits + et chiffrés à nouveau selon le schéma de l'authentification de + type digest, que s'ils ont été stockés en clair ou selon un schéma de + chiffrement réversible. + + + + Seuls les fournisseurs qui supportent l'authentification de type + digest pourront authentifier les utilisateurs lorsque la directive + AuthBasicUseDigestAlgorithm + est définie à MD5. L'utilisation d'un autre + fournisseur provoquera un message d'erreur et le client se verra + refuser l'accès. +
    +
    + diff --git a/docs/manual/mod/mod_auth_basic.xml.ja b/docs/manual/mod/mod_auth_basic.xml.ja index d0365353dcc..a5bbfa273ea 100644 --- a/docs/manual/mod/mod_auth_basic.xml.ja +++ b/docs/manual/mod/mod_auth_basic.xml.ja @@ -1,7 +1,7 @@ - + + -mod_auth_digest - Apache HTTP Server +mod_auth_digest - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_auth_digest

    @@ -34,107 +39,74 @@

    This module implements HTTP Digest Authentication (RFC2617), and - provides a more secure alternative to mod_auth_basic.

    + provides an alternative to mod_auth_basic where the + password is not transmitted as cleartext. However, this does + not lead to a significant security advantage over + basic authentication. On the other hand, the password storage on the + server is much less secure with digest authentication than with + basic authentication. Therefore, using basic auth and encrypting the + whole connection using mod_ssl is a much better + alternative.

    -
    top

    Using Digest Authentication

    -

    To use MD5 Digest authentication, simply - change the normal AuthType Basic and - AuthBasicProvider - to AuthType Digest and - AuthDigestProvider, - when setting up authentication, then add a - AuthDigestDomain directive containing at least the root - URI(s) for this protection space.

    +

    To use MD5 Digest authentication, configure the location to be + protected as shown in the below example:

    -

    Appropriate user (text) files can be created using the - htdigest tool.

    +

    Example:

    <Location "/private/">
    +    AuthType Digest
    +    AuthName "private area"
    +    AuthDigestDomain "/private/" "http://mirror.my.dom/private2/"
    +    
    +    AuthDigestProvider file
    +    AuthUserFile "/web/auth/.digest_pw"
    +    Require valid-user
    +</Location>
    +
    + +

    AuthDigestDomain + should list the locations that will be protected by this + configuration.

    + +

    The pasword file referenced in the AuthUserFile directive may be + created and managed using the htdigest tool.

    -

    Example:

    - <Location /private/>
    - - AuthType Digest
    - AuthName "private area"
    - AuthDigestDomain /private/ http://mirror.my.dom/private2/
    -
    - AuthDigestProvider file
    - AuthUserFile /web/auth/.digest_pw
    - Require valid-user
    -
    - </Location> -

    Note

    -

    Digest authentication is more secure than Basic authentication, - but only works with supporting browsers. As of September 2004, major - browsers that support digest authentication include Amaya, Konqueror, MS Internet Explorer - for Mac OS X and Windows (although the Windows version fails when - used with a query string -- see "Working with MS - Internet Explorer" below for a workaround), Mozilla, - Netscape 7, Opera, and Safari. lynx does not - support digest authentication. Since digest authentication is not as - widely implemented as basic authentication, you should use it only - in environments where all users will have supporting browsers.

    +

    Digest authentication was intended to be more secure than basic + authentication, but no longer fulfills that design goal. A + man-in-the-middle attacker can trivially force the browser to downgrade + to basic authentication. And even a passive eavesdropper can brute-force + the password using today's graphics hardware, because the hashing + algorithm used by digest authentication is too fast. Another problem is + that the storage of the passwords on the server is insecure. The contents + of a stolen htdigest file can be used directly for digest authentication. + Therefore using mod_ssl to encrypt the whole connection is + strongly recommended.

    mod_auth_digest only works properly on platforms where APR supports shared memory.

    -
    top
    -
    -

    Working with MS Internet Explorer

    -

    The Digest authentication implementation in previous Internet - Explorer for Windows versions (5 and 6) had issues, namely that - GET requests with a query string were not RFC compliant. - There are a few ways to work around this issue.

    - -

    - The first way is to use POST requests instead of - GET requests to pass data to your program. This method - is the simplest approach if your application can work with this - limitation. -

    - -

    Since version 2.0.51 Apache also provides a workaround in the - AuthDigestEnableQueryStringHack environment variable. - If AuthDigestEnableQueryStringHack is set for the - request, Apache will take steps to work around the MSIE bug and - remove the query string from the digest comparison. Using this - method would look similar to the following.

    - -

    Using Digest Authentication with MSIE:

    - BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On -

    - -

    This workaround is not necessary for MSIE 7, though enabling it does - not cause any compatibility issues or significant overhead.

    - -

    See the BrowserMatch - directive for more details on conditionally setting environment - variables.

    top

    AuthDigestAlgorithm Directive

    @@ -181,45 +153,13 @@ authentication contain at least the (set of) root URI(s) for this space. Omitting to do so will cause the client to send the Authorization header for every request sent to this - server. Apart from increasing the size of the request, it may - also have a detrimental effect on performance if AuthDigestNcCheck is on.

    + server.

    The URIs specified can also point to different servers, in which case clients (which understand this) will then share username/password info across multiple servers without prompting the user each time.

    -
    -
    top
    -

    AuthDigestNcCheck Directive

    - - - - - - - -
    Description:Enables or disables checking of the nonce-count sent by the -server
    Syntax:AuthDigestNcCheck On|Off
    Default:AuthDigestNcCheck Off
    Context:server config
    Status:Extension
    Module:mod_auth_digest
    -
    - Not implemented yet. -
    - - -
    -
    top
    -

    AuthDigestNonceFormat Directive

    - - - - - - - -
    Description:Determines how the nonce is generated
    Syntax:AuthDigestNonceFormat format
    Context:directory, .htaccess
    Override:AuthConfig
    Status:Extension
    Module:mod_auth_digest
    -
    Not implemented yet.
    - -
    top

    AuthDigestNonceLifetime Directive

    @@ -309,7 +249,7 @@ of clients the amount of shared memory, that will be allocated at the server startup for keeping track of clients. Note that the shared memory segment cannot be set less than the space that is necessary for - tracking at least one client. This value is dependant on your + tracking at least one client. This value is dependent on your system. If you want to find out the exact value, you may simply set AuthDigestShmemSize to the value of 0 and read the error message after trying to start the @@ -320,11 +260,10 @@ of clients express your value as KBytes or MBytes. For example, the following directives are all equivalent:

    -

    - AuthDigestShmemSize 1048576
    - AuthDigestShmemSize 1024K
    - AuthDigestShmemSize 1M -

    +
    AuthDigestShmemSize 1048576
    +AuthDigestShmemSize 1024K
    +AuthDigestShmemSize 1M
    +
    @@ -332,7 +271,28 @@ of clients

    Available Languages:  en  |  fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_digest.html.fr b/docs/manual/mod/mod_auth_digest.html.fr index 9c4c19bbbbb..5291947a7b9 100644 --- a/docs/manual/mod/mod_auth_digest.html.fr +++ b/docs/manual/mod/mod_auth_digest.html.fr @@ -1,23 +1,28 @@ - -mod_auth_digest - Serveur Apache HTTP +mod_auth_digest - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_auth_digest

    @@ -34,34 +39,38 @@ MD5

    Ce module implmente l'authentification HTTP base sur les condenss MD5 (RFC2617), et - fournit une alternative mod_auth_basic plus - scurise.

    + fournit une alternative mod_auth_basic en + ne transmettant plus le mot de passe en clair. Cependant, cela ne + suffit pas pour amliorer la scurit de manire significative par + rapport l'authentification basique. En outre, le stockage du mot + de passe sur le serveur est encore moins sr dans le cas + d'une authentification base de condens que dans le cas d'une + authentification basique. C'est pourquoi l'utilisation de + l'authentification basique associe un chiffrement de la connexion + via mod_ssl constitue une bien meilleure + alternative.

    -
    top

    Utilisation de l'authentification base de @@ -76,78 +85,36 @@ condens

    On peut crer les fichiers utilisateur appropris (au format texte) l'aide de l'outil htdigest.

    -

    Exemple :

    - <Location /private/>
    - - AuthType Digest
    - AuthName "private area"
    - AuthDigestDomain /private/ http://mirror.my.dom/private2/
    -
    - AuthDigestProvider file
    - AuthUserFile /web/auth/.digest_pw
    - Require valid-user
    -
    - </Location> -

    +

    Exemple :

    <Location "/private/">
    +    AuthType Digest
    +    AuthName "private area"
    +    AuthDigestDomain "/private/" "http://mirror.my.dom/private2/"
    +    
    +    AuthDigestProvider file
    +    AuthUserFile "/web/auth/.digest_pw"
    +    Require valid-user
    +</Location>
    +

    Note

    -

    L'authentification base de condenss MD5 est plus scurise que - l'authentification Basic, mais ne fonctionne qu'avec les navigateurs - qui la supportent. En septembre 2004, les principaux navigateurs - supportant l'authentification base de condenss MD5 incluaient Amaya, Konqueror, MS Internet Explorer - pour Mac OS X et Windows (bien que la version Windows choue lorsque - la requte comporte une chane d'arguments -- voir plus loin "Travailler avec MS Internet Explorer" pour - contourner ce problme), Mozilla, - Netscape 7, Opera, et Safari. lynx ne supporte - pas l'authentification base de condenss MD5. - Comme l'authentification base de condenss MD5 est moins rpandue - que l'authentification Basic, vous ne devez l'utiliser que dans des - environnements o tous les utilisateurs disposeront d'un navigateur - la supportant.

    +

    L'authentification base de condens a t conue pour amliorer + la scurit par rapport l'authentification basique, mais il + s'avre que ce but n'a pas t atteint. Un attaquant de type + "man-in-the-middle" peut facilement forcer le navigateur revenir + une authentification basique. Mme une oreille indiscrte passive + peut retrouver le mot de passe par force brute avec les moyens + modernes, car l'algorithme de hashage utilis par l'authentification + base de condens est trop rapide. Autre problme, le stockage des + mots de passe sur le serveur n'est pas sr. Le contenu d'un fichier + htdigest vol peut tre utilis directement pour l'authentification + base de condens. Il est donc fortement recommand d'utiliser + mod_ssl pour chiffrer la connexion.

    mod_auth_digest ne fonctionne correctement que sur les plates-formes o APR supporte la mmoire partage.

    -

    top
    -
    -

    Travailler avec MS Internet Explorer

    -

    L'implmentation de l'authentification base de condens dans - les versions prcdentes d'Internet Explorer pour Windows (5 et 6) - posait problme, car les requtes de type GET - comportant une chane d'arguments (query string) ne respectaient pas les RFC. Il y - a plusieurs manires de contourner ce problme.

    - -

    - La premire mthode consiste utiliser des requtes de type - POST plutt que GET pour transmettre les - donnes votre programme. Cette mthode constitue l'approche la - plus simple dans le cas o votre application peut fonctionner avec - cette limitation. -

    - -

    Depuis la version 2.0.51, Apache propose aussi de contourner le - problme l'aide de la variable d'environnement - AuthDigestEnableQueryStringHack. Si - AuthDigestEnableQueryStringHack est dfinie pour la - requte, Apache va prendre des mesures pour contourner la bogue MSIE - et en particulier va exclure la chane d'arguments de la comparaison - des condenss. L'utilisation de cette mthode peut se traduire par - ceci :

    - -

    Utilisation de l'authentification base de condens - avec MSIE :

    - BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On -

    - -

    Cette correction n'est pas ncessaire avec MSIE 7, bien que son - activation ne pose pas de problme de compatibilit ou de surcharge - significative.

    - -

    Voir la directive BrowserMatch pour plus de dtails - propos de la dfinition conditionnelle des variables - d'environnement.

    top
    -

    AuthDigestAlgorithm Directive

    +

    Directive AuthDigestAlgorithm

    @@ -169,7 +136,7 @@ condens
    top
    -
    Description:Slectionne l'algorithme utilis pour calculer les condenss du dfit et de sa rponse
    @@ -192,10 +159,7 @@ concernant l'authentification

    Cette directive doit toujours tre prsente et contenir au moins le(s) URI(s) racine(s) pour cet espace. Dans le cas contraire, le client va envoyer un en-tte d'autorisation avec chaque - requte destination de ce serveur. Outre une augmentation de - la taille de la requte, les performances vont s'en trouver - affectes si la directive AuthDigestNcCheck est dfinie - On.

    + requte destination de ce serveur.

    Les URIs spcifis peuvent aussi rfrencer diffrents serveurs, auquel cas les clients (qui sont mme de le comprendre) vont @@ -204,39 +168,7 @@ concernant l'authentification

    top
    -
    Description:Les URIs qui se trouvent dans le mme espace de protection concernant l'authentification base de condenss
    - - - - - - -
    Description:Active ou dsactive la vrification du nombre d'envois du -nombre valeur unique (nonce) par le serveur
    Syntaxe:AuthDigestNcCheck On|Off
    Dfaut:AuthDigestNcCheck Off
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_auth_digest
    -
    - Non encore implment. -
    - - -
    -
    top
    -

    AuthDigestNonceFormat Directive

    - - - - - - - -
    Description:Dtermine la manire dont le nombre valeur unique du -serveur (nonce) est gnr
    Syntaxe:AuthDigestNonceFormat format
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_auth_digest
    -
    Non encore implment.
    - - -
    -
    top
    -

    AuthDigestNonceLifetime Directive

    +

    Directive AuthDigestNonceLifetime

    @@ -261,7 +193,7 @@ serveur (nonce)
    top
    -
    Description:Dure de validit du nombre valeur unique du serveur (nonce)
    @@ -288,7 +220,7 @@ zone du site web concern
    top
    -
    Description:Dfinit le(s) fournisseurs(s) d'authentification pour la zone du site web concerne
    @@ -319,7 +251,7 @@ l'authentification
    top
    -
    Description:Dtermine le niveau de protection fourni par l'authentification base de condens
    @@ -346,11 +278,10 @@ les informations MgaOctets. Par exemple, les directives qui suivent sont toutes quivalentes :

    -

    - AuthDigestShmemSize 1048576
    - AuthDigestShmemSize 1024K
    - AuthDigestShmemSize 1M -

    +
    AuthDigestShmemSize 1048576
    +AuthDigestShmemSize 1024K
    +AuthDigestShmemSize 1M
    + @@ -358,7 +289,28 @@ les informations

    Langues Disponibles:  en  |  fr  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_digest.html.ko.euc-kr b/docs/manual/mod/mod_auth_digest.html.ko.euc-kr index 5a1289d7ab1..dae54b835ad 100644 --- a/docs/manual/mod/mod_auth_digest.html.ko.euc-kr +++ b/docs/manual/mod/mod_auth_digest.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_auth_digest - Apache HTTP Server +mod_auth_digest - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >
    Description:La quantit de mmoire partage allouer afin de conserver les informations propos des clients
    - - - - - - -
    : nonce-count ˻
    :AuthDigestNcCheck On|Off
    ⺻:AuthDigestNcCheck Off
    :ּ
    :Experimental
    :mod_auth_digest
    -
    - ʾҴ. -
    - - -
    -
    top
    -

    AuthDigestNonceFormat þ

    - - - - - - - -
    :nonce Ѵ
    :AuthDigestNonceFormat format
    :directory, .htaccess
    Override ɼ:AuthConfig
    :Experimental
    :mod_auth_digest
    -
    ʾҴ.
    - -
    top

    AuthDigestNonceLifetime þ

    @@ -317,7 +290,28 @@ URI

    :  en  |  fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_digest.xml b/docs/manual/mod/mod_auth_digest.xml index 8e06f6b9d7b..1a929572c04 100644 --- a/docs/manual/mod/mod_auth_digest.xml +++ b/docs/manual/mod/mod_auth_digest.xml @@ -32,99 +32,65 @@

    This module implements HTTP Digest Authentication (RFC2617), and - provides a more secure alternative to mod_auth_basic.

    + provides an alternative to mod_auth_basic where the + password is not transmitted as cleartext. However, this does + not lead to a significant security advantage over + basic authentication. On the other hand, the password storage on the + server is much less secure with digest authentication than with + basic authentication. Therefore, using basic auth and encrypting the + whole connection using mod_ssl is a much better + alternative.

    AuthName AuthType Require -Match Authentication howto
    Using Digest Authentication -

    To use MD5 Digest authentication, simply - change the normal AuthType Basic and - AuthBasicProvider - to AuthType Digest and - AuthDigestProvider, - when setting up authentication, then add a - AuthDigestDomain directive containing at least the root - URI(s) for this protection space.

    - -

    Appropriate user (text) files can be created using the - htdigest tool.

    +

    To use MD5 Digest authentication, configure the location to be + protected as shown in the below example:

    Example: - <Location /private/>
    - - AuthType Digest
    - AuthName "private area"
    - AuthDigestDomain /private/ http://mirror.my.dom/private2/
    -
    - AuthDigestProvider file
    - AuthUserFile /web/auth/.digest_pw
    - Require valid-user
    -
    - </Location> + +<Location "/private/"> + AuthType Digest + AuthName "private area" + AuthDigestDomain "/private/" "http://mirror.my.dom/private2/" + + AuthDigestProvider file + AuthUserFile "/web/auth/.digest_pw" + Require valid-user +</Location> +
    +

    AuthDigestDomain + should list the locations that will be protected by this + configuration.

    + +

    The pasword file referenced in the AuthUserFile directive may be + created and managed using the htdigest tool.

    + + Note -

    Digest authentication is more secure than Basic authentication, - but only works with supporting browsers. As of September 2004, major - browsers that support digest authentication include Amaya, Konqueror, MS Internet Explorer - for Mac OS X and Windows (although the Windows version fails when - used with a query string -- see "Working with MS - Internet Explorer" below for a workaround), Mozilla, - Netscape 7, Opera, and Safari. lynx does not - support digest authentication. Since digest authentication is not as - widely implemented as basic authentication, you should use it only - in environments where all users will have supporting browsers.

    +

    Digest authentication was intended to be more secure than basic + authentication, but no longer fulfills that design goal. A + man-in-the-middle attacker can trivially force the browser to downgrade + to basic authentication. And even a passive eavesdropper can brute-force + the password using today's graphics hardware, because the hashing + algorithm used by digest authentication is too fast. Another problem is + that the storage of the passwords on the server is insecure. The contents + of a stolen htdigest file can be used directly for digest authentication. + Therefore using mod_ssl to encrypt the whole connection is + strongly recommended.

    mod_auth_digest only works properly on platforms where APR supports shared memory.

    -
    Working with MS Internet Explorer -

    The Digest authentication implementation in previous Internet - Explorer for Windows versions (5 and 6) had issues, namely that - GET requests with a query string were not RFC compliant. - There are a few ways to work around this issue.

    - -

    - The first way is to use POST requests instead of - GET requests to pass data to your program. This method - is the simplest approach if your application can work with this - limitation. -

    - -

    Since version 2.0.51 Apache also provides a workaround in the - AuthDigestEnableQueryStringHack environment variable. - If AuthDigestEnableQueryStringHack is set for the - request, Apache will take steps to work around the MSIE bug and - remove the query string from the digest comparison. Using this - method would look similar to the following.

    - - Using Digest Authentication with MSIE: - BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On - - -

    This workaround is not necessary for MSIE 7, though enabling it does - not cause any compatibility issues or significant overhead.

    - -

    See the BrowserMatch - directive for more details on conditionally setting environment - variables.

    -
    - AuthDigestProvider @@ -211,47 +177,6 @@ authentication - -AuthDigestNonceFormat -Determines how the nonce is generated -AuthDigestNonceFormat format -directory.htaccess - -AuthConfig - - - Not implemented yet. - - - - - -AuthDigestNcCheck -Enables or disables checking of the nonce-count sent by the -server -AuthDigestNcCheck On|Off -AuthDigestNcCheck Off -server config - - - - Not implemented yet. - - - - AuthDigestAlgorithm @@ -301,9 +226,7 @@ authentication contain at least the (set of) root URI(s) for this space. Omitting to do so will cause the client to send the Authorization header for every request sent to this - server. Apart from increasing the size of the request, it may - also have a detrimental effect on performance if AuthDigestNcCheck is on.

    + server.

    The URIs specified can also point to different servers, in which case clients (which understand this) will then share @@ -325,7 +248,7 @@ of clients the amount of shared memory, that will be allocated at the server startup for keeping track of clients. Note that the shared memory segment cannot be set less than the space that is necessary for - tracking at least one client. This value is dependant on your + tracking at least one client. This value is dependent on your system. If you want to find out the exact value, you may simply set AuthDigestShmemSize to the value of 0 and read the error message after trying to start the @@ -336,11 +259,11 @@ of clients express your value as KBytes or MBytes. For example, the following directives are all equivalent:

    - - AuthDigestShmemSize 1048576
    - AuthDigestShmemSize 1024K
    - AuthDigestShmemSize 1M -
    + +AuthDigestShmemSize 1048576 +AuthDigestShmemSize 1024K +AuthDigestShmemSize 1M +
    diff --git a/docs/manual/mod/mod_auth_digest.xml.fr b/docs/manual/mod/mod_auth_digest.xml.fr index c1d340f54b0..2199e994cd0 100644 --- a/docs/manual/mod/mod_auth_digest.xml.fr +++ b/docs/manual/mod/mod_auth_digest.xml.fr @@ -1,7 +1,7 @@ - + @@ -35,14 +35,21 @@ MD5

    Ce module implémente l'authentification HTTP basée sur les condensés MD5 (RFC2617), et - fournit une alternative à mod_auth_basic plus - sécurisée.

    + fournit une alternative à mod_auth_basic en + ne transmettant plus le mot de passe en clair. Cependant, cela ne + suffit pas pour améliorer la sécurité de manière significative par + rapport à l'authentification basique. En outre, le stockage du mot + de passe sur le serveur est encore moins sûr dans le cas + d'une authentification à base de condensé que dans le cas d'une + authentification basique. C'est pourquoi l'utilisation de + l'authentification basique associée à un chiffrement de la connexion + via mod_ssl constitue une bien meilleure + alternative.

    AuthName AuthType Require -Match Mode d'emploi de l'authentification @@ -62,86 +69,37 @@ condensés texte) à l'aide de l'outil htdigest.

    Exemple : - <Location /private/>
    - - AuthType Digest
    - AuthName "private area"
    - AuthDigestDomain /private/ http://mirror.my.dom/private2/
    -
    - AuthDigestProvider file
    - AuthUserFile /web/auth/.digest_pw
    - Require valid-user
    -
    - </Location> + +<Location "/private/"> + AuthType Digest + AuthName "private area" + AuthDigestDomain "/private/" "http://mirror.my.dom/private2/" + + AuthDigestProvider file + AuthUserFile "/web/auth/.digest_pw" + Require valid-user +</Location> +
    Note -

    L'authentification à base de condensés MD5 est plus sécurisée que - l'authentification Basic, mais ne fonctionne qu'avec les navigateurs - qui la supportent. En septembre 2004, les principaux navigateurs - supportant l'authentification à base de condensés MD5 incluaient Amaya, Konqueror, MS Internet Explorer - pour Mac OS X et Windows (bien que la version Windows échoue lorsque - la requête comporte une chaîne d'arguments -- voir plus loin "Travailler avec MS Internet Explorer" pour - contourner ce problème), Mozilla, - Netscape 7, Opera, et Safari. lynx ne supporte - pas l'authentification à base de condensés MD5. - Comme l'authentification à base de condensés MD5 est moins répandue - que l'authentification Basic, vous ne devez l'utiliser que dans des - environnements où tous les utilisateurs disposeront d'un navigateur - la supportant.

    +

    L'authentification à base de condensé a été conçue pour améliorer + la sécurité par rapport à l'authentification basique, mais il + s'avère que ce but n'a pas été atteint. Un attaquant de type + "man-in-the-middle" peut facilement forcer le navigateur à revenir à + une authentification basique. Même une oreille indiscrète passive + peut retrouver le mot de passe par force brute avec les moyens + modernes, car l'algorithme de hashage utilisé par l'authentification + à base de condensé est trop rapide. Autre problème, le stockage des + mots de passe sur le serveur n'est pas sûr. Le contenu d'un fichier + htdigest volé peut être utilisé directement pour l'authentification + à base de condensé. Il est donc fortement recommandé d'utiliser + mod_ssl pour chiffrer la connexion.

    mod_auth_digest ne fonctionne correctement que sur les plates-formes où APR supporte la mémoire partagée.

    -
    Travailler avec MS Internet Explorer -

    L'implémentation de l'authentification à base de condensé dans - les versions précédentes d'Internet Explorer pour Windows (5 et 6) - posait problème, car les requêtes de type GET - comportant une chaîne d'arguments (query string) ne respectaient pas les RFC. Il y - a plusieurs manières de contourner ce problème.

    - -

    - La première méthode consiste à utiliser des requêtes de type - POST plutôt que GET pour transmettre les - données à votre programme. Cette méthode constitue l'approche la - plus simple dans le cas où votre application peut fonctionner avec - cette limitation. -

    - -

    Depuis la version 2.0.51, Apache propose aussi de contourner le - problème à l'aide de la variable d'environnement - AuthDigestEnableQueryStringHack. Si - AuthDigestEnableQueryStringHack est définie pour la - requête, Apache va prendre des mesures pour contourner la bogue MSIE - et en particulier va exclure la chaîne d'arguments de la comparaison - des condensés. L'utilisation de cette méthode peut se traduire par - ceci :

    - - Utilisation de l'authentification à base de condensé - avec MSIE : - BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On - - -

    Cette correction n'est pas nécessaire avec MSIE 7, bien que son - activation ne pose pas de problème de compatibilité ou de surcharge - significative.

    - -

    Voir la directive BrowserMatch pour plus de détails - à propos de la définition conditionnelle des variables - d'environnement.

    -
    - - AuthDigestProvider Définit le(s) fournisseurs(s) d'authentification pour la @@ -241,53 +199,6 @@ serveur (nonce) - -AuthDigestNonceFormat -Détermine la manière dont le nombre à valeur unique du -serveur (nonce) est généré -AuthDigestNonceFormat format -directory.htaccess - -AuthConfig - - - Non encore implémenté. - - - - - -AuthDigestNcCheck -Active ou désactive la vérification du nombre d'envois du -nombre à valeur unique (nonce) par le serveur -AuthDigestNcCheck On|Off -AuthDigestNcCheck Off -server config - - - - Non encore implémenté. - - - - - AuthDigestAlgorithm Sélectionne l'algorithme utilisé pour calculer les @@ -337,11 +248,7 @@ concernant l'authentification à base de condensés

    Cette directive doit toujours être présente et contenir au moins le(s) URI(s) racine(s) pour cet espace. Dans le cas contraire, le client va envoyer un en-tête d'autorisation avec chaque - requête à destination de ce serveur. Outre une augmentation de - la taille de la requête, les performances vont s'en trouver - affectées si la directive AuthDigestNcCheck est définie à - On.

    + requête à destination de ce serveur.

    Les URIs spécifiés peuvent aussi référencer différents serveurs, auquel cas les clients (qui sont à même de le comprendre) vont @@ -376,11 +283,11 @@ les informations à propos des clients MégaOctets. Par exemple, les directives qui suivent sont toutes équivalentes :

    - - AuthDigestShmemSize 1048576
    - AuthDigestShmemSize 1024K
    - AuthDigestShmemSize 1M -
    + +AuthDigestShmemSize 1048576 +AuthDigestShmemSize 1024K +AuthDigestShmemSize 1M +
    diff --git a/docs/manual/mod/mod_auth_digest.xml.ko b/docs/manual/mod/mod_auth_digest.xml.ko index 452398bd065..2006e44d600 100644 --- a/docs/manual/mod/mod_auth_digest.xml.ko +++ b/docs/manual/mod/mod_auth_digest.xml.ko @@ -1,7 +1,7 @@ - + -mod_auth_form - Apache HTTP Server +mod_auth_form - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_auth_form

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -57,7 +63,15 @@

    -
    top

    Basic Configuration

    @@ -104,16 +109,19 @@ a file using mod_authn_file. If authentication is unsuccessful, the user will be redirected to the form login page.

    -

    Basic example

    - AuthFormProvider file
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -

    +

    Basic example

    <Location "/admin">
    +    AuthFormProvider file
    +    AuthUserFile "conf/passwd"
    +    AuthType form
    +    AuthName "/admin"
    +    AuthFormLoginRequiredLocation "http://example.com/login.html"
    +
    +    Session On
    +    SessionCookieName session path=/
    +
    +    Require valid-user
    +</Location>
    +

    The directive AuthType will enable the mod_auth_form authentication when set to the value form. @@ -121,13 +129,17 @@ AuthUserFile specify that usernames and passwords should be checked against the chosen file.

    -

    The directives Session, - SessionCookieName and - SessionCryptoPassphrase create an - encrypted session stored within an HTTP cookie on the browser. For more information +

    The directives Session and + SessionCookieName + session stored within an HTTP cookie on the browser. For more information on the different options for configuring a session, read the documentation for mod_session.

    +

    You can optionally add a + SessionCryptoPassphrase to + create an encrypted session cookie. This required the additional + module mod_session_crypto be loaded.

    +

    In the simple example above, a URL has been protected by mod_auth_form, but the user has yet to be given an opportunity to enter their username and password. Options for doing so include providing a @@ -146,34 +158,29 @@ directive. Typically this login page will contain an HTML form, asking the user to provide their usename and password.

    -

    Example login form

    - <form method="POST" action="/dologin.html">
    - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - </form>
    -

    +

    Example login form

    <form method="POST" action="/dologin.html">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +</form>
    +

    The part that does the actual login is handled by the form-login-handler. The action of the form should point at this handler, which is configured within Apache httpd as follows:

    -

    Form login handler example

    - <Location /dologin.html> - - SetHandler form-login-handler
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - AuthFormLoginSuccessLocation http://example.com/success.html
    - AuthFormProvider file
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -
    - </Location> -

    +

    Form login handler example

    <Location "/dologin.html">
    +    SetHandler form-login-handler
    +    AuthFormLoginRequiredLocation "http://example.com/login.html"
    +    AuthFormLoginSuccessLocation "http://example.com/admin/index.html"
    +    AuthFormProvider file
    +    AuthUserFile "conf/passwd"
    +    AuthType form
    +    AuthName /admin
    +    Session On
    +    SessionCookieName session path=/
    +</Location>
    +

    The URLs specified by the AuthFormLoginRequiredLocation directive will typically @@ -185,16 +192,13 @@ form, as in the example below. As a result, the same form-login-handler can be reused for different areas of a website.

    -

    Example login form with location

    - <form method="POST" action="/dologin.html">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - <input type="hidden" name="httpd_location" value="http://example.com/success.html" />
    -
    - </form>
    -

    +

    Example login form with location

    <form method="POST" action="/dologin.html">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +  <input type="hidden" name="httpd_location" value="http://example.com/success.html" />
    +</form>
    +
    top
    @@ -225,32 +229,27 @@ returned by the HTTP_UNAUTHORIZED status code with a custom error document containing the login form, as follows:

    -

    Basic inline example

    - AuthFormProvider file
    - ErrorDocument 401 /login.shtml
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -

    +

    Basic inline example

    AuthFormProvider file
    +ErrorDocument 401 "/login.shtml"
    +AuthUserFile "conf/passwd"
    +AuthType form
    +AuthName realm
    +AuthFormLoginRequiredLocation "http://example.com/login.html"
    +Session On
    +SessionCookieName session path=/
    +

    The error document page should contain a login form with an empty action property, as per the example below. This has the effect of submitting the form to the original protected URL, without the page having to know what that URL is.

    -

    Example inline login form

    - <form method="POST" action="">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    -
    - </form>
    -

    +

    Example inline login form

    <form method="POST" action="">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +</form>
    +

    When the end user has filled in their login details, the form will make an HTTP POST request to the original password protected URL. @@ -278,35 +277,31 @@

    To enable body preservation, add three additional fields to the login form as per the example below.

    -

    Example with body preservation

    - <form method="POST" action="">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - <input type="hidden" name="httpd_method" value="POST" />
    - <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" />
    - <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />

    -
    - </form> -

    +

    Example with body preservation

    <form method="POST" action="">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +  
    <input type="hidden" name="httpd_method" value="POST" /> + <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> + <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
    +</form>
    +

    How the method, mimetype and body of the original request are embedded within the login form will depend on the platform and technology being used within the website.

    One option is to use the mod_include module along with the - KeptBodySize directive, along with a suitable + KeptBodySize directive, along with a suitable CGI script to embed the variables in the form.

    Another option is to render the login form using a CGI script or other dynamic technology.

    -

    CGI example

    - AuthFormProvider file
    - ErrorDocument 401 /cgi-bin/login.cgi
    - ...
    -

    +

    CGI example

            AuthFormProvider file
    +        ErrorDocument 401 "/cgi-bin/login.cgi"
    +        ...
    +
    top
    @@ -323,14 +318,12 @@ logout. This URL might explain to the user that they have been logged out, and give the user the option to log in again.

    -

    Basic logout example

    - SetHandler form-logout-handler
    - AuthName realm
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -

    +

    Basic logout example

    SetHandler form-logout-handler
    +AuthName realm
    +AuthFormLogoutLocation "http://example.com/loggedout.html"
    +Session On
    +SessionCookieName session path=/
    +

    Note that logging a user out does not delete the session; it merely removes the username and password from the session. If this results in an empty session, @@ -340,14 +333,12 @@ value, like 1 (setting the directive to zero would mean no session age limit).

    -

    Basic session expiry example

    - SetHandler form-logout-handler
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session On
    - SessionMaxAge 1
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -

    +

    Basic session expiry example

    SetHandler form-logout-handler
    +AuthFormLogoutLocation "http://example.com/loggedout.html"
    +Session On
    +SessionMaxAge 1
    +SessionCookieName session path=/
    +
    top
    @@ -420,7 +411,7 @@ lower level modules

    The AuthFormDisableNoStore flag disables the sending of a Cache-Control no-store header with the error 401 page returned when the user is not yet logged in. The purpose of the header - is to make it difficult for an ecmascript application to attempt to resubmit the + is to make it difficult for an ecmascript application to attempt to resubmit the login form, and reveal the username and password to the backend application. Disable at your own risk.

    @@ -470,12 +461,14 @@ lower level modules
    - +
    Description:Form authentication
    Status:Base
    Context:directory
    Status:Base
    Module:mod_auth_form
    Compatibility:Available in Apache HTTP Server 2.3.0 and later
    Compatibility:Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLoginRequiredLocation directive - specifies the URL to redirect to should the user not be authorised to view a page. By default, - if a user is not authorised to view a page, the HTTP response code HTTP_UNAUTHORIZED - will be returned with the page specified by the + specifies the URL to redirect to should the user not be authorised to view a page. The value + is parsed using the ap_expr parser before being sent to the client. + By default, if a user is not authorised to view a page, the HTTP response code + HTTP_UNAUTHORIZED will be returned with the page specified by the ErrorDocument directive. This directive overrides this default.

    @@ -492,12 +485,14 @@ lower level modules Context:directory Status:Base Module:mod_auth_form -Compatibility:Available in Apache HTTP Server 2.3.0 and later +Compatibility:Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLoginSuccessLocation directive - specifies the URL to redirect to should the user have logged in successfully. This directive - can be overridden if a form field has been defined containing another URL using the - AuthFormLocation directive.

    + specifies the URL to redirect to should the user have logged in successfully. The value is + parsed using the ap_expr parser before being sent to the client. + This directive can be overridden if a form field has been defined containing another URL + using the AuthFormLocation directive.

    Use this directive if you have a dedicated login URL, and you have not embedded the destination page in the login form.

    @@ -513,24 +508,24 @@ lower level modules Context:directory Status:Base Module:mod_auth_form -Compatibility:Available in Apache HTTP Server 2.3.0 and later +Compatibility:Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLogoutLocation directive - specifies the URL of a page on the server to redirect to should the user attempt to log out.

    + specifies the URL of a page on the server to redirect to should the user attempt to log + out. The value is parsed using the ap_expr parser before + being sent to the client.

    When a URI is accessed that is served by the handler form-logout-handler, the page specified by this directive will be shown to the end user. For example:

    -

    Example

    - <Location /logout>
    - - SetHandler form-logout-handler
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session on
    - ... -
    - </Location> -

    +

    Example

    <Location "/logout">
    +    SetHandler form-logout-handler
    +    AuthFormLogoutLocation "http://example.com/loggedout.html"
    +    Session on
    +    #...
    +</Location>
    +

    An attempt to access the URI /logout/ will result in the user being logged out, and the page /loggedout.html will be displayed. Make sure that the page @@ -575,7 +570,7 @@ lower level modules

    The AuthFormMethod directive specifies the name of an HTML field which, if present, will contain the - mimetype of the request to to submit should login be successful.

    + mimetype of the request to submit should login be successful.

    By populating the form with fields described by AuthFormMethod, @@ -619,19 +614,16 @@ lower level modules by the mod_authn_file module. Make sure that the chosen provider module is present in the server.

    -

    Example

    - <Location /secure>
    - - AuthType form
    - AuthName "private area"
    - AuthFormProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    - ...
    -
    - </Location> -

    +

    Example

    <Location "/secure">
    +    AuthType form
    +    AuthName "private area"
    +    AuthFormProvider  dbm
    +    AuthDBMType        SDBM
    +    AuthDBMUserFile    "/www/etc/dbmpasswd"
    +    Require            valid-user
    +    #...
    +</Location>
    +

    Providers are implemented by mod_authn_dbm, mod_authn_file, mod_authn_dbd, @@ -674,7 +666,7 @@ lower level modules

    AuthFormSize Directive

    - + @@ -691,7 +683,7 @@ lower level modulesAuthFormMethod, AuthFormMimetype and AuthFormBody, you probably want to set this - field to a similar size as the KeptBodySize + field to a similar size as the KeptBodySize directive.

    @@ -714,8 +706,30 @@ lower level modules
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_form.html.fr b/docs/manual/mod/mod_auth_form.html.fr new file mode 100644 index 00000000000..31090751115 --- /dev/null +++ b/docs/manual/mod/mod_auth_form.html.fr @@ -0,0 +1,821 @@ + + + + + +mod_auth_form - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_auth_form

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:The largest size of the form in bytes that will be parsed for the login details
    Syntax:AuthFormBody size
    Syntax:AuthFormSize size
    Default:8192
    Context:directory
    Status:Base
    + + + +
    Description:Authentification l'aide d'un formulaire
    Statut:Base
    IdentificateurdeModule:auth_form_module
    FichierSource:mod_auth_form.c
    Compatibilit:Disponible partir d'Apache 2.3
    +

    Sommaire

    + +

    Avertissement

    +

    L'authentification base de formulaire dpend des modules + mod_session qui utilisent les cookies HTTP, et en + tant que tels s'exposent des attaques de type Cross Site + Scripting, ou risquent de divulguer des informations caractre + priv aux clients. Assurez-vous que ces risques ont bien t pris + en compte avant d'activer les sessions sur votre serveur.

    +
    + +

    Ce module permet de restreindre l'accs en recherchant les + utilisateurs dans les fournisseurs spcifis l'aide d'un + formulaire de connexion HTML. Les formulaires HTML requirent + davantage de configuration que les mthodes d'authentification + alternatives, mais ils peuvent s'avrer beaucoup plus conviviaux + pour les utilisateurs. +

    + +

    L'authentification HTTP de base est fournie par le module + mod_auth_basic, et l'authentification HTTP base + de condens par le module mod_auth_digest. Le + module mod_auth_form doit tre utilis avec au + moins un module d'authentification du style + mod_authn_file et un module d'autorisation comme + mod_authz_user.

    + +

    Lorsque l'utilisateur a t authentifi avec succs, ses + informations de connexion sont stocks dans une session fournie par + le module mod_session. +

    + +
    + +
    top
    +
    +

    Configuration de base

    + +

    Pour protger une URL particulire avec le module + mod_auth_form, vous devez dterminer l'endroit o + vous allez stocker votre session, ainsi que la mthode + d'authentification. Dans cet exemple simple, les informations de + connexion sont stockes dans une session l'aide du module + mod_session_cookie, et l'authentification utilise + un fichier en s'appuyant sur le module + mod_authn_file. Si l'authentification choue, + l'utilisateur dera redirig vers la page du formulaire de + connexion.

    + +

    Exemple simple

    <Location "/admin">
    +    AuthFormProvider file
    +    AuthUserFile "conf/passwd"
    +    AuthType form
    +    AuthName "/admin"
    +    AuthFormLoginRequiredLocation "http://example.com/login.html"
    +
    +    Session On
    +    SessionCookieName session path=/
    +
    +    Require valid-user
    +</Location>
    +
    + +

    L'authentification mod_auth_form est active + en affectant la valeur form la directive AuthType. Les directives + AuthFormProvider et + AuthUserFile + spcifient que les noms d'utilisateurs et mots de passe seront + vrifis en utilisant le fichier choisi.

    + +

    Les directives Session et SessionCookieName crent une + session chiffre stocke dans un cookie HTTP au niveau + du navigateur. Pour plus d'informations propos des diffrentes + options de configuration des sessions, reportez-vous la + documentation du module mod_session.

    + +

    Vous pouvez ventuellement ajouter une directive SessionCryptoPassphrase pour crer + un cookie de session chiffr. Pour utiliser cette directive, le module + mod_session_crypto doit avoir t pralablement charg.

    + +

    Dans l'exemple simple ci-dessus, une URL a t protge par + mod_auth_form, mais on doit maintenant fournir + l'utilisateur un moyen d'entrer un nom et un mot de passe. cet + effet, on peut soit crire une page de connexion indpendante + ddie, soit inclure le formulaire de connexion dans la page + courante.

    +
    top
    +
    +

    Page de connexion ddie

    + +

    Le formulaire de connexion peut tre contenu dans une page + indpendante, ou tre inclus dans la page courante.

    + +

    Lorsque la connexion s'effectue partir d'une page + indpendante et si la tentative d'authentification choue, + l'utilisateur doit tre redirig vers un formulaire de connexion, + cr cet effet sur le site web, en utilisant la directive + AuthFormLoginRequiredLocation. + En gnral, la page de connexion contiendra un formulaire HTML + demandant l'utilisateur de fournir un nom et un mot de passe.

    + +

    Exemple de formulaire de connexion

    <form method="POST" action="/dologin.html">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +</form>
    +
    + +

    La partie o s'effectue la connexion proprement dite est + traite par le gestionnaire form-login-handler. + L'action de ce formulaire doit pointer vers ce gestionnaire, ce + que l'on configure dans Apache httpd comme suit :

    + +

    Exemple de configuration du gestionnaire de + formulaire de connexion

    <Location "/dologin.html">
    +    SetHandler form-login-handler
    +    AuthFormLoginRequiredLocation "http://example.com/login.html"
    +    AuthFormLoginSuccessLocation "http://example.com/admin/index.html"
    +    AuthFormProvider file
    +    AuthUserFile "conf/passwd"
    +    AuthType form
    +    AuthName /admin
    +    Session On
    +    SessionCookieName session path=/
    +    SessionCryptoPassphrase secret
    +</Location>
    +
    + +

    L'URL spcifie par la directive + AuthFormLoginRequiredLocation + rfrencera en gnral une page expliquant l'utilisateur que sa + tentative de connexion a chou, et qu'il doit la renouveler. La + directive AuthFormLoginSuccessLocation + spcifie l'URL vers laquelle l'utilisateur doit tre redirig s'il + s'est authentifi avec succs.

    + +

    Alternativement, l'URL vers laquelle doit tre redirig + l'utilisateur s'il s'est authentifi avec succs peut tre + intgre dans le formulaire de connexion, comme dans l'exemple + ci-dessous. Il en dcoule que le mme gestionnaire + form-login-handler pourra tre utilis pour diffrentes + zones du site web.

    + +

    Exemple de formulaire d'authentification multizone

    <form method="POST" action="/dologin.html">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +  <input type="hidden" name="httpd_location" value="http://example.com/success.html" />
    +</form>
    +
    + +
    top
    +
    +

    Connexion la vole

    + +

    Avertissement

    +

    Il existe un risque, dans certaines circonstances, que le + formulaire de connexion configur pour une connexion la vole + soit soumis plusieurs fois, rvlant de ce fait les paramtres + de connexion l'application sous-jacente. L'administrateur doit + s'assurer que cette dernire est correctement scurise afin + d'viter les ventuels abus. En cas de doute, utilisez une page + de connexion indpendante ddie.

    +
    + +

    Comme alternative la page de connexion ddie pour un site + web, il est possible de configurer mod_auth_form + pour authentifier les utilisateurs la vole, sans les rediriger + vers une autre page, ce qui permet de conserver l'tat de la page + courante au cours de la tentative de connexion. Ceci peut s'avrer + utile dans le cas d'une session limite dans le temps, si le dlai + de la session a expir pendant la requte de l'utilisateur. Ce + dernier peut alors se rauthentifier la mme place, et + poursuivre son activit partir du point o il en tait rest.

    + +

    Si un utilisateur non authentifi tente d'accder une page + protge par mod_auth_form, et si ce dernier + n'est pas configur avec une directive AuthFormLoginRequiredLocation, + un code de statut HTTP_UNAUTHORIZED est renvoy vers le + navigateur, indiquant l'utilisateur qu'il n'est pas autoris + accder cette page.

    + +

    Pour configurer l'authentification la vole, l'administrateur + remplace le message d'erreur renvoy par le code de statut + HTTP_UNAUTHORIZED par un message d'erreur personnalis + contenant le formulaire de connexion comme suit :

    + +

    Exemple simple d'authentification la vole

    AuthFormProvider file
    +ErrorDocument 401 "/login.shtml"
    +AuthUserFile "conf/passwd"
    +AuthType form
    +AuthName realm
    +AuthFormLoginRequiredLocation "http://example.com/login.html"
    +Session On
    +SessionCookieName session path=/
    +
    + +

    La page du message d'erreur doit contenir un formulaire de + connexion dont la proprit action est vide, comme dans l'exemple + ci-dessous. Ceci a pour effet de soumettre le formulaire l'URL + protge originale, cette dernire n'ayant pas besoin d'tre + connue de la page en cours.

    + +

    Exemple de formulaire de connexion la vole

    <form method="POST" action="">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +</form>
    +
    + +

    Lorsque l'utilisateur final a entr ses informations de + connexion, le formulaire effectue une requte HTTP POST pour l'URL + originale protge par mot de passe. + mod_auth_form va alors intercepter cette requte + POST, et dans le cas o des champs HTML Utilisateur et Mot de + passe corrects sont prsents, l'utilisateur sera connect, et + l'URL originale protge par mot de passe lui sera retourne en + tant que requte GET.

    + +
    top
    +
    +

    Connexion la vole avec + conservation du contenu

    + +

    Il existe une limite la technique de connexion la vole + dcrite ci-dessus ; si un formulaire HTML POST entrane une + demande d'authentification ou de rauthentification, le contenu du + formulaire original envoy par le navigateur sera perdu. Cela peut + s'avrer plus ou moins gnant pour l'utilisateur final selon la + fonction du site web.

    + +

    Comme solution ce problme, mod_auth_form + permet d'intgrer la mthode et le contenu de la requte originale + dans le formulaire de connexion. Si l'authentification russit, + Apache httpd pourra refaire une tentative avec la mthode et le contenu + originaux, tout en conservant l'tat de la requte originale.

    + +

    Pour mettre en oeuvre la conservation du contenu, vous devez + ajouter trois champs supplmentaires au formulaire de connexion + comme dans l'exemple suivant :

    + +

    Exemple de formulaire avec conservation du + contenu

    <form method="POST" action="">
    +  Username: <input type="text" name="httpd_username" value="" />
    +  Password: <input type="password" name="httpd_password" value="" />
    +  <input type="submit" name="login" value="Login" />
    +  
    <input type="hidden" name="httpd_method" value="POST" /> + <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> + <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
    +</form>
    +
    + +

    La manire dont la mthode, le type MIME et le contenu de la + requte originale seront intgrs dans le formulaire de connexion + vont dpendre de la plate-forme et de la technologie utilises au + sein du site web. +

    + +

    Une option consiste utiliser le module + mod_include en association avec la directive + KeptBodySize, ainsi + qu'un script CGI adapt pour intgrer les variables dans le + formulaire.

    + +

    Une autre option consiste prsenter le formulaire de + connexion en utilisant un script CGI ou une autre technologie + dynamique.

    + +

    Exemple avec script CGI

            AuthFormProvider file
    +        ErrorDocument 401 "/cgi-bin/login.cgi"
    +        ...
    +
    + +
    top
    +
    +

    Dconnexion

    + +

    Pour permettre un utilisateur de se dconnecter d'une session + particulire, vous devez configurer une page pour qu'elle soit + traite par le gestionnaire form-logout-handler. Tout + accs cette URL va entraner la suppression de l'Utilisateur et + du Mot de passe de la session courante, ce qui aura pour effet de + dconnecter l'utilisateur.

    + +

    Vous pouvez spcifier une URL vers laquelle le navigateur sera + redirig en cas de dconnection russie, en dfinissant la + directive AuthFormLogoutLocation. Cette + URL devra expliquer l'utilisateur qu'il a t dconnect, et lui + donner la possibilit de se connecter nouveau.

    + +

    Exemple simple de configuration de la + dconnexion

    SetHandler form-logout-handler
    +AuthName realm
    +AuthFormLogoutLocation "http://example.com/loggedout.html"
    +Session On
    +SessionCookieName session path=/
    +
    + +

    Notez que la dconnexion d'un utilisateur ne supprime pas la + session ; elle supprime seulement l'utilisateur et le mot de passe + de la session. Si la session qui en rsulte est vide, elle sera + probablement supprime, mais ce n'est pas garanti. Si vous voulez + tre sr que la session sera supprime, affectez une valeur faible + la directive SessionMaxAge, par exemple 1 + (affecter cette directive la valeur zro signifie une session + sans limite d'ge). +

    + +

    Exemple simple avec dure de validit de session + limite

    SetHandler form-logout-handler
    +AuthFormLogoutLocation "http://example.com/loggedout.html"
    +Session On
    +SessionMaxAge 1
    +SessionCookieName session path=/
    +
    + +
    top
    +
    +

    Noms d'utilisateurs et mots de + passe

    +

    Notez que la soumission d'un formulaire implique l'encodage URL + (URLEncoding) des donnes du formulaire, ici le nom d'utilisateur et + le mot de passe. Vous devez donc choisir des noms d'utilisateurs et + mots de passe qui ne contiennent pas de caractres susceptibles + d'tre encods URL lors de la soumission du formulaire, sous peine + d'obtenir des rsultats inattendus.

    +
    +
    top
    +

    Directive AuthFormAuthoritative

    + + + + + + + + +
    Description:Dtermine si l'autorisation et l'authentification sont confis +des modules de plus bas niveau
    Syntaxe:AuthFormAuthoritative On|Off
    Dfaut:AuthFormAuthoritative On
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_auth_form
    +

    Normalement, chacun des modules d'autorisation spcifis par la + directive AuthFormProvider va tenter de + vrifier l'identit de l'utilisateur, et si ce dernier n'est trouv + dans aucun fournisseur, l'accs sera refus. En dfinissant + explicitement la directive + AuthFormAuthoritative Off on + confie les processus d'authentification et d'autorisation des + modules ne s'appuyant pas sur des fournisseurs, si aucun + identifiant utilisateur ou aucune rgle ne + correspond l'identifiant utilisateur fourni. Ceci ne peut s'avrer + ncessaire que si l'on combine mod_auth_form avec + des modules tiers qui ne se configurent pas avec la directive + AuthFormProvider. + Lorsqu'on utilise de tels modules, la chronologie du processus est + dtermine dans leur code source, et n'est pas configurable.

    + +
    +
    top
    +

    Directive AuthFormBody

    + + + + + + + + +
    Description:Le nom du champ de formulaire contenant le corps de la +requte effectuer en cas de connexion russie
    Syntaxe:AuthFormBody nom du champ
    Dfaut:httpd_body
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormBody + spcifie le nom du champ HTML qui, s'il existe, contiendra le corps + de la requte effectuer en cas de connexion russie.

    + +

    En ajoutant au formulaire les champs dcrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requte qui a t ventuellement interrompue + par l'cran de connexion, ou par l'expiration d'un dlai de + session.

    + +
    +
    top
    +

    Directive AuthFormDisableNoStore

    + + + + + + + + +
    Description:Dsactive l'en-tte CacheControl no-store sur la page de +connexion
    Syntaxe:AuthFormDisableNoStore On|Off
    Dfaut:AuthFormDisableNoStore Off
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    Le drapeau AuthFormDisableNoStore supprime + l'envoi d'un en-tte Cache-Control no-store lorsqu'une + page avec code d'erreur 401 est renvoye, si l'utilisateur n'est pas + encore connect. Avec cette en-tte, il est plus difficile pour une + application ecmascript de resoumettre un formulaire de connexion, et + ainsi rvler le nom d'utilisateur et le mot de passe + l'application sous-jacente. Vous devez tre conscient des risques + encourus si vous le dsactivez.

    + + +
    +
    top
    +

    Directive AuthFormFakeBasicAuth

    + + + + + + + + +
    Description:Simule une en-tte d'authentification de base
    Syntaxe:AuthFormFakeBasicAuth On|Off
    Dfaut:AuthFormFakeBasicAuth Off
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    Le drapeau AuthFormFakeBasicAuth + dtermine si une en-tte d'Authentification de base + sera ajoute aux en-ttes de la requte. On peut utiliser cette + mthode pour prsenter le nom d'utilisateur et le mot de passe + l'application sous-jacente, sans que cette dernire ait besoin de + connatre la manire dont le processus de connexion a t men + bien.

    + + +
    +
    top
    +

    Directive AuthFormLocation

    + + + + + + + + +
    Description:Le nom du champ de formulaire qui contiendra l'URL vers +laquelle l'utilisateur sera redirig en cas de connexion +russie
    Syntaxe:AuthFormLocation nom du champ
    Dfaut:httpd_location
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormLocation + spcifie le nom du champ HTML qui, s'il existe, contiendra l'URL + vers laquelle rediriger le navigateur en cas de connexion + russie.

    + +
    +
    top
    +

    Directive AuthFormLoginRequiredLocation

    + + + + + + + + +
    Description:L'URL de la page vers laquelle on doit tre redirig si une +authentification est requise
    Syntaxe:AuthFormLoginRequiredLocation url
    Dfaut:none
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprtation des expressions rationnelles est supporte +depuis la version 2.4.4.
    +

    La directive AuthFormLoginRequiredLocation + spcifie l'URL vers laquelle l'utilisateur devra tre + redirig s'il n'est pas autoris accder une page. Sa valeur est + interprte via l'interprteur ap_expr + avant d'tre envoye au client. Par dfaut, + si un utilisateur n'est pas autoris accder une page, le code + de rponse HTTP HTTP_UNAUTHORIZED est renvoy avec la + page spcifie par la directive ErrorDocument. La directive AuthFormLoginRequiredLocation + permet de remplacer cette valeur par dfaut.

    + +

    Vous pouvez utiliser cette directive si vous voulez prsenter une + page de connexion personnalise vos utilisateurs.

    + + +
    +
    top
    +

    Directive AuthFormLoginSuccessLocation

    + + + + + + + + +
    Description:L'URL de la page vers laquelle on doit tre redirig en cas +de connexion russie
    Syntaxe:AuthFormLoginSuccessLocation url
    Dfaut:none
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprtation des expressions rationnelles est supporte +depuis la version 2.4.4.
    +

    La directive AuthFormLoginSuccessLocation + spcifie l'URL vers laquelle l'utilisateur doit tre + redirig en cas de connexion russie. Sa valeur est + interprte via l'interprteur ap_expr + avant d'tre envoye au client. L'effet de cette directive + peut tre annul si l'on a dfini un champ de formulaire contenant + une autre URL l'aide de la directive AuthFormLocation.

    + +

    Vous pouvez utiliser cette directive si vous possdez une URL de + connexion personnalise, et si vous n'avez pas intgr la page de + destination dans le formulaire de connexion.

    + + +
    +
    top
    +

    Directive AuthFormLogoutLocation

    + + + + + + + + +
    Description:L'URL vers laquelle un utilisateur devra tre redirig +aprs s'tre dconnect
    Syntaxe:AuthFormLogoutLocation uri
    Dfaut:none
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprtation des expressions rationnelles est supporte +depuis la version 2.4.4.
    +

    La directive AuthFormLogoutLocation + spcifie l'URL de la page du serveur vers laquelle l'utilisateur + devra tre redirig s'il se dconnecte. Sa valeur est + interprte via l'interprteur ap_expr + avant d'tre envoye au client.

    + +

    Lorsqu'un accs est tent sur un URI trait par le gestionnaire + form-logout-handler, la page spcifie par cette + directive sera prsente l'utilisateur final. Par exemple :

    + +

    Exemple

    <Location "/logout">
    +    SetHandler form-logout-handler
    +    AuthFormLogoutLocation "http://example.com/loggedout.html"
    +    Session on
    +    #...
    +</Location>
    +
    + +

    Si un utilisateur tente d'accder l'URI /logout/, il + sera dconnect, et la page /loggedout.html lui sera + prsente. Assurez-vous que la page loggedout.html n'est + pas protge par mot de passe, car dans le cas contraire, elle ne + serait pas affiche.

    + + +
    +
    top
    +

    Directive AuthFormMethod

    + + + + + + + + +
    Description:Le nom du champ de formulaire contenant la mthode de la +requte effectuer en cas de connexion russie
    Syntaxe:AuthFormMethod nom du champ
    Dfaut:httpd_method
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormMethod + spcifie le nom du champ HTML qui, s'il existe, contiendra le type + MIME de la requte effectuer en cas de connexion russie.

    + +

    En ajoutant au formulaire les champs dcrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requte qui a t ventuellement interrompue + par l'cran de connexion, ou par l'expiration d'un dlai de + session.

    + +
    +
    top
    +

    Directive AuthFormMimetype

    + + + + + + + + +
    Description:Le nom du champ de formulaire contenant le type MIME du +corps de la requte effectuer en cas de connexion +russie
    Syntaxe:AuthFormMimetype nom du champ
    Dfaut:httpd_mimetype
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormMimetype + spcifie le nom du champ HTML qui, s'il existe, contiendra le type + MIME de la requte effectuer en cas de connexion russie.

    + +

    En ajoutant au formulaire les champs dcrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requte qui a t ventuellement interrompue + par l'cran de connexion, ou par l'expiration d'un dlai de + session.

    + +
    +
    top
    +

    Directive AuthFormPassword

    + + + + + + + + +
    Description:Le nom du champ de formulaire qui contient le mot de passe +de connexion
    Syntaxe:AuthFormPassword nom du champ
    Dfaut:httpd_password
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormPassword permet de + spcifier le nom du champ HTML qui, s'il existe, contiendra le mot + de passe qui sera utilis pour la connexion.

    + +
    +
    top
    +

    Directive AuthFormProvider

    + + + + + + + + +
    Description:Dfinit le(s) fournisseur(s) d'authentification pour la +zone concerne
    Syntaxe:AuthFormProvider nom fournisseur +[nom fournisseur] ...
    Dfaut:AuthFormProvider file
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_auth_form
    +

    La directive AuthFormProvider permet de + dfinir quel fournisseur sera utilis pour authentifier les + utilisateurs pour la zone concerne. Le fournisseur par dfaut + file est implment par le module + mod_authn_file. Assurez-vous que le fournisseur + choisi soit bien prsent dans le serveur.

    + +

    Exemple

    <Location "/secure">
    +    AuthType form
    +    AuthName "private area"
    +    AuthFormProvider  dbm
    +    AuthDBMType        SDBM
    +    AuthDBMUserFile    "/www/etc/dbmpasswd"
    +    Require            valid-user
    +    #...
    +</Location>
    +
    + +

    Les diffrents fournisseurs sont implments par les modules + mod_authn_dbm, mod_authn_file, + mod_authn_dbd et + mod_authnz_ldap.

    + +
    +
    top
    +

    Directive AuthFormSitePassphrase

    + + + + + + + + +
    Description:Court-circuite l'authentification pour les sites fort +trafic
    Syntaxe:AuthFormSitePassphrase secret
    Dfaut:none
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormSitePassphrase + spcifie un mot de passe qui, s'il est prsent dans la session + utilisateur, indique Apache httpd de court-circuiter l'authentification + pour l'URL considre. On peut l'utiliser dans le cas de sites web + fort trafic afin de rduire la charge induite sur l'infrastructure + d'authentification.

    + +

    On peut insrer le mot de passe dans une session utilisateur en + ajoutant cette directive la configuration concernant le + gestionnaire form-login-handler. Le gestionnaire + form-login-handler, quant lui, effectuera toujours les + vrifications d'authentification, qu'un mot de passe soit spcifi + ou non.

    + +

    Avertissement

    +

    Si la session est prsente l'utilisateur l'aide du module + mod_session_cookie, et si la session n'est pas + protge par le module mod_session_crypto, le mot + de passe peut faire l'objet d'une attaque de type dictionnaire. + Quelle que soit la configuration de la session, assurez-vous que + cette directive n'est pas utilise dans un espace d'URLs contenant + des donnes prives, ou partir desquelles des transactions + sensibles pourraient tre menes. En tout tat de cause, vous + devez tre conscient des risques encourus avant de l'utiliser.

    +
    + + +
    +
    top
    +

    Directive AuthFormSize

    + + + + + + + + +
    Description:La taille maximale en octets du formulaire dont seront +extraites les informations de connexion
    Syntaxe:AuthFormSize taille
    Dfaut:8192
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive AuthFormSize spcifie + la taille maximale du corps de la requte qui sera utilise pour + trouver le formulaire de connexion.

    + +

    Si une requte de connexion entrante possde une taille + suprieure cette valeur, elle sera rejete avec le code de rponse + HTTP HTTP_REQUEST_TOO_LARGE.

    + +

    Si vous avez ajout au formulaire des champs dcrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, il est recommand + de dfinir cette directive une valeur similaire celle de la + directive KeptBodySize.

    + + +
    +
    top
    +

    Directive AuthFormUsername

    + + + + + + + + +
    Description:Le nom du champ de formulaire qui contient le nom de +connexion
    Syntaxe:AuthFormUsername nom du champ
    Dfaut:httpd_username
    Contexte:rpertoire
    Statut:Base
    Module:mod_auth_form
    Compatibilit:Disponible depuis la version 2.3.3 du serveur HTTP Apache
    +

    La directive AuthFormUsername permet de + spcifier le nom du champ HTML qui, s'il existe, contiendra le nom + d'utilisateur qui sera utilis pour la connexion.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_auth_form.xml b/docs/manual/mod/mod_auth_form.xml index fedb6566315..e30952cf67e 100644 --- a/docs/manual/mod/mod_auth_form.xml +++ b/docs/manual/mod/mod_auth_form.xml @@ -61,7 +61,6 @@ AuthName AuthType Require -Match Authentication howto
    Basic Configuration @@ -75,14 +74,20 @@ the user will be redirected to the form login page.

    Basic example - AuthFormProvider file
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    + +<Location "/admin"> + AuthFormProvider file + AuthUserFile "conf/passwd" + AuthType form + AuthName "/admin" + AuthFormLoginRequiredLocation "http://example.com/login.html" + + Session On + SessionCookieName session path=/ + + Require valid-user +</Location> +

    The directive AuthType will enable @@ -91,13 +96,17 @@ AuthUserFile specify that usernames and passwords should be checked against the chosen file.

    -

    The directives Session, - SessionCookieName and - SessionCryptoPassphrase create an - encrypted session stored within an HTTP cookie on the browser. For more information +

    The directives Session and + SessionCookieName + session stored within an HTTP cookie on the browser. For more information on the different options for configuring a session, read the documentation for mod_session.

    +

    You can optionally add a + SessionCryptoPassphrase to + create an encrypted session cookie. This required the additional + module mod_session_crypto be loaded.

    +

    In the simple example above, a URL has been protected by mod_auth_form, but the user has yet to be given an opportunity to enter their username and password. Options for doing so include providing a @@ -117,11 +126,13 @@ provide their usename and password.

    Example login form - <form method="POST" action="/dologin.html">
    - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - </form>
    + +<form method="POST" action="/dologin.html"> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +</form> +

    The part that does the actual login is handled by the form-login-handler. @@ -129,20 +140,19 @@ Apache httpd as follows:

    Form login handler example - <Location /dologin.html> - - SetHandler form-login-handler
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - AuthFormLoginSuccessLocation http://example.com/success.html
    - AuthFormProvider file
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    -
    - </Location> + +<Location "/dologin.html"> + SetHandler form-login-handler + AuthFormLoginRequiredLocation "http://example.com/login.html" + AuthFormLoginSuccessLocation "http://example.com/admin/index.html" + AuthFormProvider file + AuthUserFile "conf/passwd" + AuthType form + AuthName /admin + Session On + SessionCookieName session path=/ +</Location> +

    The URLs specified by the @@ -156,14 +166,14 @@ reused for different areas of a website.

    Example login form with location - <form method="POST" action="/dologin.html">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - <input type="hidden" name="httpd_location" value="http://example.com/success.html" />
    -
    - </form>
    + +<form method="POST" action="/dologin.html"> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> + <input type="hidden" name="httpd_location" value="http://example.com/success.html" /> +</form> +
    @@ -196,15 +206,16 @@ containing the login form, as follows:

    Basic inline example - AuthFormProvider file
    - ErrorDocument 401 /login.shtml
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - AuthFormLoginRequiredLocation http://example.com/login.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    + +AuthFormProvider file +ErrorDocument 401 "/login.shtml" +AuthUserFile "conf/passwd" +AuthType form +AuthName realm +AuthFormLoginRequiredLocation "http://example.com/login.html" +Session On +SessionCookieName session path=/ +

    The error document page should contain a login form with an empty action property, @@ -213,13 +224,13 @@ URL is.

    Example inline login form - <form method="POST" action="">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    -
    - </form>
    + +<form method="POST" action=""> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +</form> +

    When the end user has filled in their login details, the form will make @@ -249,16 +260,16 @@ per the example below.

    Example with body preservation - <form method="POST" action="">
    - - Username: <input type="text" name="httpd_username" value="" />
    - Password: <input type="password" name="httpd_password" value="" />
    - <input type="submit" name="login" value="Login" />
    - <input type="hidden" name="httpd_method" value="POST" />
    - <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" />
    - <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />

    -
    - </form> + +<form method="POST" action=""> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +
    <input type="hidden" name="httpd_method" value="POST" /> + <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> + <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
    +</form> +

    How the method, mimetype and body of the original request are embedded within the @@ -266,16 +277,18 @@

    One option is to use the mod_include module along with the - KeptBodySize directive, along with a suitable + KeptBodySize directive, along with a suitable CGI script to embed the variables in the form.

    Another option is to render the login form using a CGI script or other dynamic technology.

    CGI example - AuthFormProvider file
    - ErrorDocument 401 /cgi-bin/login.cgi
    - ...
    + + AuthFormProvider file + ErrorDocument 401 "/cgi-bin/login.cgi" + ... +
    @@ -294,12 +307,13 @@ give the user the option to log in again.

    Basic logout example - SetHandler form-logout-handler
    - AuthName realm
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    + +SetHandler form-logout-handler +AuthName realm +AuthFormLogoutLocation "http://example.com/loggedout.html" +Session On +SessionCookieName session path=/ +

    Note that logging a user out does not delete the session; it merely removes @@ -311,12 +325,13 @@

    Basic session expiry example - SetHandler form-logout-handler
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session On
    - SessionMaxAge 1
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret
    + +SetHandler form-logout-handler +AuthFormLogoutLocation "http://example.com/loggedout.html" +Session On +SessionMaxAge 1 +SessionCookieName session path=/ +
    @@ -346,17 +361,17 @@ that the chosen provider module is present in the server.

    Example - <Location /secure>
    - - AuthType form
    - AuthName "private area"
    - AuthFormProvider dbm
    - AuthDBMType SDBM
    - AuthDBMUserFile /www/etc/dbmpasswd
    - Require valid-user
    - ...
    -
    - </Location> + +<Location "/secure"> + AuthType form + AuthName "private area" + AuthFormProvider dbm + AuthDBMType SDBM + AuthDBMUserFile "/www/etc/dbmpasswd" + Require valid-user + #... +</Location> +

    Providers are implemented by mod_authn_dbm, @@ -476,7 +491,7 @@ lower level modules

    The AuthFormMethod directive specifies the name of an HTML field which, if present, will contain the - mimetype of the request to to submit should login be successful.

    + mimetype of the request to submit should login be successful.

    By populating the form with fields described by AuthFormMethod, @@ -513,7 +528,7 @@ lower level modules AuthFormSize The largest size of the form in bytes that will be parsed for the login details -AuthFormBody size +AuthFormSize size 8192 directory @@ -530,7 +545,7 @@ lower level modules AuthFormMethod, AuthFormMimetype and AuthFormBody, you probably want to set this - field to a similar size as the KeptBodySize + field to a similar size as the KeptBodySize directive.

    @@ -543,13 +558,15 @@ lower level modules none directory -Available in Apache HTTP Server 2.3.0 and later +Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLoginRequiredLocation directive - specifies the URL to redirect to should the user not be authorised to view a page. By default, - if a user is not authorised to view a page, the HTTP response code HTTP_UNAUTHORIZED - will be returned with the page specified by the + specifies the URL to redirect to should the user not be authorised to view a page. The value + is parsed using the ap_expr parser before being sent to the client. + By default, if a user is not authorised to view a page, the HTTP response code + HTTP_UNAUTHORIZED will be returned with the page specified by the ErrorDocument directive. This directive overrides this default.

    @@ -565,13 +582,15 @@ lower level modules none directory -Available in Apache HTTP Server 2.3.0 and later +Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLoginSuccessLocation directive - specifies the URL to redirect to should the user have logged in successfully. This directive - can be overridden if a form field has been defined containing another URL using the - AuthFormLocation directive.

    + specifies the URL to redirect to should the user have logged in successfully. The value is + parsed using the ap_expr parser before being sent to the client. + This directive can be overridden if a form field has been defined containing another URL + using the AuthFormLocation directive.

    Use this directive if you have a dedicated login URL, and you have not embedded the destination page in the login form.

    @@ -605,24 +624,27 @@ lower level modules none directory -Available in Apache HTTP Server 2.3.0 and later +Available in Apache HTTP Server 2.3.0 and later. The use of the expression +parser has been added in 2.4.4.

    The AuthFormLogoutLocation directive - specifies the URL of a page on the server to redirect to should the user attempt to log out.

    + specifies the URL of a page on the server to redirect to should the user attempt to log + out. The value is parsed using the ap_expr parser before + being sent to the client.

    When a URI is accessed that is served by the handler form-logout-handler, the page specified by this directive will be shown to the end user. For example:

    Example - <Location /logout>
    - - SetHandler form-logout-handler
    - AuthFormLogoutLocation http://example.com/loggedout.html
    - Session on
    - ... -
    - </Location> + +<Location "/logout"> + SetHandler form-logout-handler + AuthFormLogoutLocation "http://example.com/loggedout.html" + Session on + #... +</Location> +

    An attempt to access the URI /logout/ will result in the user being logged @@ -646,7 +668,7 @@ lower level modules

    The AuthFormDisableNoStore flag disables the sending of a Cache-Control no-store header with the error 401 page returned when the user is not yet logged in. The purpose of the header - is to make it difficult for an ecmascript application to attempt to resubmit the + is to make it difficult for an ecmascript application to attempt to resubmit the login form, and reveal the username and password to the backend application. Disable at your own risk.

    diff --git a/docs/manual/mod/mod_auth_form.xml.fr b/docs/manual/mod/mod_auth_form.xml.fr new file mode 100644 index 00000000000..7a380e20684 --- /dev/null +++ b/docs/manual/mod/mod_auth_form.xml.fr @@ -0,0 +1,832 @@ + + + + + + + + + + + +mod_auth_form +Authentification à l'aide d'un formulaire +Base +mod_auth_form.c +auth_form_module +Disponible à partir d'Apache 2.3 + + + Avertissement +

    L'authentification à base de formulaire dépend des modules + mod_session qui utilisent les cookies HTTP, et en + tant que tels s'exposent à des attaques de type Cross Site + Scripting, ou risquent de divulguer des informations à caractère + privé aux clients. Assurez-vous que ces risques ont bien été pris + en compte avant d'activer les sessions sur votre serveur.

    +
    + +

    Ce module permet de restreindre l'accès en recherchant les + utilisateurs dans les fournisseurs spécifiés à l'aide d'un + formulaire de connexion HTML. Les formulaires HTML requièrent + davantage de configuration que les méthodes d'authentification + alternatives, mais ils peuvent s'avérer beaucoup plus conviviaux + pour les utilisateurs. +

    + +

    L'authentification HTTP de base est fournie par le module + mod_auth_basic, et l'authentification HTTP à base + de condensé par le module mod_auth_digest. Le + module mod_auth_form doit être utilisé avec au + moins un module d'authentification du style + mod_authn_file et un module d'autorisation comme + mod_authz_user.

    + +

    Lorsque l'utilisateur a été authentifié avec succès, ses + informations de connexion sont stockés dans une session fournie par + le module mod_session. +

    + +
    +mod_session +AuthName +AuthType +Require +Mise en oeuvre de +l'authentification + +
    Configuration de base + +

    Pour protéger une URL particulière avec le module + mod_auth_form, vous devez déterminer l'endroit où + vous allez stocker votre session, ainsi que la méthode + d'authentification. Dans cet exemple simple, les informations de + connexion sont stockées dans une session à l'aide du module + mod_session_cookie, et l'authentification utilise + un fichier en s'appuyant sur le module + mod_authn_file. Si l'authentification échoue, + l'utilisateur dera redirigé vers la page du formulaire de + connexion.

    + + Exemple simple + +<Location "/admin"> + AuthFormProvider file + AuthUserFile "conf/passwd" + AuthType form + AuthName "/admin" + AuthFormLoginRequiredLocation "http://example.com/login.html" + + Session On + SessionCookieName session path=/ + + Require valid-user +</Location> + + + +

    L'authentification mod_auth_form est activée + en affectant la valeur form à la directive AuthType. Les directives + AuthFormProvider et + AuthUserFile + spécifient que les noms d'utilisateurs et mots de passe seront + vérifiés en utilisant le fichier choisi.

    + +

    Les directives Session et SessionCookieName créent une + session chiffrée stockée dans un cookie HTTP au niveau + du navigateur. Pour plus d'informations à propos des différentes + options de configuration des sessions, reportez-vous à la + documentation du module mod_session.

    + +

    Vous pouvez éventuellement ajouter une directive SessionCryptoPassphrase pour créer + un cookie de session chiffré. Pour utiliser cette directive, le module + mod_session_crypto doit avoir été préalablement chargé.

    + +

    Dans l'exemple simple ci-dessus, une URL a été protégée par + mod_auth_form, mais on doit maintenant fournir + à l'utilisateur un moyen d'entrer un nom et un mot de passe. À cet + effet, on peut soit écrire une page de connexion indépendante + dédiée, soit inclure le formulaire de connexion dans la page + courante.

    +
    + +
    Page de connexion dédiée + +

    Le formulaire de connexion peut être contenu dans une page + indépendante, ou être inclus dans la page courante.

    + +

    Lorsque la connexion s'effectue à partir d'une page + indépendante et si la tentative d'authentification échoue, + l'utilisateur doit être redirigé vers un formulaire de connexion, + créé à cet effet sur le site web, en utilisant la directive + AuthFormLoginRequiredLocation. + En général, la page de connexion contiendra un formulaire HTML + demandant à l'utilisateur de fournir un nom et un mot de passe.

    + + Exemple de formulaire de connexion + +<form method="POST" action="/dologin.html"> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +</form> + + + +

    La partie où s'effectue la connexion proprement dite est + traitée par le gestionnaire form-login-handler. + L'action de ce formulaire doit pointer vers ce gestionnaire, ce + que l'on configure dans Apache httpd comme suit :

    + + Exemple de configuration du gestionnaire de + formulaire de connexion + +<Location "/dologin.html"> + SetHandler form-login-handler + AuthFormLoginRequiredLocation "http://example.com/login.html" + AuthFormLoginSuccessLocation "http://example.com/admin/index.html" + AuthFormProvider file + AuthUserFile "conf/passwd" + AuthType form + AuthName /admin + Session On + SessionCookieName session path=/ + SessionCryptoPassphrase secret +</Location> + + + +

    L'URL spécifiée par la directive + AuthFormLoginRequiredLocation + référencera en général une page expliquant à l'utilisateur que sa + tentative de connexion a échoué, et qu'il doit la renouveler. La + directive AuthFormLoginSuccessLocation + spécifie l'URL vers laquelle l'utilisateur doit être redirigé s'il + s'est authentifié avec succès.

    + +

    Alternativement, l'URL vers laquelle doit être redirigé + l'utilisateur s'il s'est authentifié avec succès peut être + intégrée dans le formulaire de connexion, comme dans l'exemple + ci-dessous. Il en découle que le même gestionnaire + form-login-handler pourra être utilisé pour différentes + zones du site web.

    + + Exemple de formulaire d'authentification multizone + +<form method="POST" action="/dologin.html"> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> + <input type="hidden" name="httpd_location" value="http://example.com/success.html" /> +</form> + + + +
    + +
    Connexion à la volée + + Avertissement +

    Il existe un risque, dans certaines circonstances, que le + formulaire de connexion configuré pour une connexion à la volée + soit soumis plusieurs fois, révélant de ce fait les paramètres + de connexion à l'application sous-jacente. L'administrateur doit + s'assurer que cette dernière est correctement sécurisée afin + d'éviter les éventuels abus. En cas de doute, utilisez une page + de connexion indépendante dédiée.

    +
    + +

    Comme alternative à la page de connexion dédiée pour un site + web, il est possible de configurer mod_auth_form + pour authentifier les utilisateurs à la volée, sans les rediriger + vers une autre page, ce qui permet de conserver l'état de la page + courante au cours de la tentative de connexion. Ceci peut s'avérer + utile dans le cas d'une session limitée dans le temps, si le délai + de la session a expiré pendant la requête de l'utilisateur. Ce + dernier peut alors se réauthentifier à la même place, et + poursuivre son activité à partir du point où il en était resté.

    + +

    Si un utilisateur non authentifié tente d'accéder à une page + protégée par mod_auth_form, et si ce dernier + n'est pas configuré avec une directive AuthFormLoginRequiredLocation, + un code de statut HTTP_UNAUTHORIZED est renvoyé vers le + navigateur, indiquant à l'utilisateur qu'il n'est pas autorisé à + accéder à cette page.

    + +

    Pour configurer l'authentification à la volée, l'administrateur + remplace le message d'erreur renvoyé par le code de statut + HTTP_UNAUTHORIZED par un message d'erreur personnalisé + contenant le formulaire de connexion comme suit :

    + + Exemple simple d'authentification à la volée + +AuthFormProvider file +ErrorDocument 401 "/login.shtml" +AuthUserFile "conf/passwd" +AuthType form +AuthName realm +AuthFormLoginRequiredLocation "http://example.com/login.html" +Session On +SessionCookieName session path=/ + + + +

    La page du message d'erreur doit contenir un formulaire de + connexion dont la propriété action est vide, comme dans l'exemple + ci-dessous. Ceci a pour effet de soumettre le formulaire à l'URL + protégée originale, cette dernière n'ayant pas besoin d'être + connue de la page en cours.

    + + Exemple de formulaire de connexion à la volée + +<form method="POST" action=""> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +</form> + + + +

    Lorsque l'utilisateur final a entré ses informations de + connexion, le formulaire effectue une requête HTTP POST pour l'URL + originale protégée par mot de passe. + mod_auth_form va alors intercepter cette requête + POST, et dans le cas où des champs HTML Utilisateur et Mot de + passe corrects sont présents, l'utilisateur sera connecté, et + l'URL originale protégée par mot de passe lui sera retournée en + tant que requête GET.

    + +
    + +
    Connexion à la volée avec + conservation du contenu + +

    Il existe une limite à la technique de connexion à la volée + décrite ci-dessus ; si un formulaire HTML POST entraîne une + demande d'authentification ou de réauthentification, le contenu du + formulaire original envoyé par le navigateur sera perdu. Cela peut + s'avérer plus ou moins gênant pour l'utilisateur final selon la + fonction du site web.

    + +

    Comme solution à ce problème, mod_auth_form + permet d'intégrer la méthode et le contenu de la requête originale + dans le formulaire de connexion. Si l'authentification réussit, + Apache httpd pourra refaire une tentative avec la méthode et le contenu + originaux, tout en conservant l'état de la requête originale.

    + +

    Pour mettre en oeuvre la conservation du contenu, vous devez + ajouter trois champs supplémentaires au formulaire de connexion + comme dans l'exemple suivant :

    + + Exemple de formulaire avec conservation du + contenu + +<form method="POST" action=""> + Username: <input type="text" name="httpd_username" value="" /> + Password: <input type="password" name="httpd_password" value="" /> + <input type="submit" name="login" value="Login" /> +
    <input type="hidden" name="httpd_method" value="POST" /> + <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> + <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
    +</form> +
    +
    + +

    La manière dont la méthode, le type MIME et le contenu de la + requête originale seront intégrés dans le formulaire de connexion + vont dépendre de la plate-forme et de la technologie utilisées au + sein du site web. +

    + +

    Une option consiste à utiliser le module + mod_include en association avec la directive + KeptBodySize, ainsi + qu'un script CGI adapté pour intégrer les variables dans le + formulaire.

    + +

    Une autre option consiste à présenter le formulaire de + connexion en utilisant un script CGI ou une autre technologie + dynamique.

    + + Exemple avec script CGI + + AuthFormProvider file + ErrorDocument 401 "/cgi-bin/login.cgi" + ... + + + +
    + +
    Déconnexion + +

    Pour permettre à un utilisateur de se déconnecter d'une session + particulière, vous devez configurer une page pour qu'elle soit + traitée par le gestionnaire form-logout-handler. Tout + accès à cette URL va entraîner la suppression de l'Utilisateur et + du Mot de passe de la session courante, ce qui aura pour effet de + déconnecter l'utilisateur.

    + +

    Vous pouvez spécifier une URL vers laquelle le navigateur sera + redirigé en cas de déconnection réussie, en définissant la + directive AuthFormLogoutLocation. Cette + URL devra expliquer à l'utilisateur qu'il a été déconnecté, et lui + donner la possibilité de se connecter à nouveau.

    + + Exemple simple de configuration de la + déconnexion + +SetHandler form-logout-handler +AuthName realm +AuthFormLogoutLocation "http://example.com/loggedout.html" +Session On +SessionCookieName session path=/ + + + +

    Notez que la déconnexion d'un utilisateur ne supprime pas la + session ; elle supprime seulement l'utilisateur et le mot de passe + de la session. Si la session qui en résulte est vide, elle sera + probablement supprimée, mais ce n'est pas garanti. Si vous voulez + être sûr que la session sera supprimée, affectez une valeur faible + à la directive SessionMaxAge, par exemple 1 + (affecter à cette directive la valeur zéro signifie une session + sans limite d'âge). +

    + + Exemple simple avec durée de validité de session + limitée + +SetHandler form-logout-handler +AuthFormLogoutLocation "http://example.com/loggedout.html" +Session On +SessionMaxAge 1 +SessionCookieName session path=/ + + + +
    + +
    Noms d'utilisateurs et mots de + passe +

    Notez que la soumission d'un formulaire implique l'encodage URL + (URLEncoding) des données du formulaire, ici le nom d'utilisateur et + le mot de passe. Vous devez donc choisir des noms d'utilisateurs et + mots de passe qui ne contiennent pas de caractères susceptibles + d'être encodés URL lors de la soumission du formulaire, sous peine + d'obtenir des résultats inattendus.

    +
    + + +AuthFormProvider +Définit le(s) fournisseur(s) d'authentification pour la +zone concernée +AuthFormProvider nom fournisseur +[nom fournisseur] ... +AuthFormProvider file +directory.htaccess + +AuthConfig + + +

    La directive AuthFormProvider permet de + définir quel fournisseur sera utilisé pour authentifier les + utilisateurs pour la zone concernée. Le fournisseur par défaut + file est implémenté par le module + mod_authn_file. Assurez-vous que le fournisseur + choisi soit bien présent dans le serveur.

    + + Exemple + +<Location "/secure"> + AuthType form + AuthName "private area" + AuthFormProvider dbm + AuthDBMType SDBM + AuthDBMUserFile "/www/etc/dbmpasswd" + Require valid-user + #... +</Location> + + + +

    Les différents fournisseurs sont implémentés par les modules + mod_authn_dbm, mod_authn_file, + mod_authn_dbd et + mod_authnz_ldap.

    +
    +
    + + +AuthFormAuthoritative +Détermine si l'autorisation et l'authentification sont confiés à +des modules de plus bas niveau +AuthFormAuthoritative On|Off +AuthFormAuthoritative On +directory.htaccess + +AuthConfig + + +

    Normalement, chacun des modules d'autorisation spécifiés par la + directive AuthFormProvider va tenter de + vérifier l'identité de l'utilisateur, et si ce dernier n'est trouvé + dans aucun fournisseur, l'accès sera refusé. En définissant + explicitement la directive + AuthFormAuthoritative à Off on + confie les processus d'authentification et d'autorisation à des + modules ne s'appuyant pas sur des fournisseurs, si aucun + identifiant utilisateur ou aucune règle ne + correspond à l'identifiant utilisateur fourni. Ceci ne peut s'avérer + nécessaire que si l'on combine mod_auth_form avec + des modules tiers qui ne se configurent pas avec la directive + AuthFormProvider. + Lorsqu'on utilise de tels modules, la chronologie du processus est + déterminée dans leur code source, et n'est pas configurable.

    +
    +
    + + +AuthFormUsername +Le nom du champ de formulaire qui contient le nom de +connexion +AuthFormUsername nom du champ +httpd_username +directory + +Disponible depuis la version 2.3.3 du serveur HTTP Apache + + +

    La directive AuthFormUsername permet de + spécifier le nom du champ HTML qui, s'il existe, contiendra le nom + d'utilisateur qui sera utilisé pour la connexion.

    +
    +
    + + +AuthFormPassword +Le nom du champ de formulaire qui contient le mot de passe +de connexion +AuthFormPassword nom du champ +httpd_password +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormPassword permet de + spécifier le nom du champ HTML qui, s'il existe, contiendra le mot + de passe qui sera utilisé pour la connexion.

    +
    +
    + + +AuthFormLocation +Le nom du champ de formulaire qui contiendra l'URL vers +laquelle l'utilisateur sera redirigé en cas de connexion +réussie +AuthFormLocation nom du champ +httpd_location +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormLocation + spécifie le nom du champ HTML qui, s'il existe, contiendra l'URL + vers laquelle rediriger le navigateur en cas de connexion + réussie.

    +
    +
    + + +AuthFormMethod +Le nom du champ de formulaire contenant la méthode de la +requête à effectuer en cas de connexion réussie +AuthFormMethod nom du champ +httpd_method +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormMethod + spécifie le nom du champ HTML qui, s'il existe, contiendra le type + MIME de la requête à effectuer en cas de connexion réussie.

    + +

    En ajoutant au formulaire les champs décrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requête qui a été éventuellement interrompue + par l'écran de connexion, ou par l'expiration d'un délai de + session.

    +
    +
    + + +AuthFormMimetype +Le nom du champ de formulaire contenant le type MIME du +corps de la requête à effectuer en cas de connexion +réussie +AuthFormMimetype nom du champ +httpd_mimetype +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormMimetype + spécifie le nom du champ HTML qui, s'il existe, contiendra le type + MIME de la requête à effectuer en cas de connexion réussie.

    + +

    En ajoutant au formulaire les champs décrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requête qui a été éventuellement interrompue + par l'écran de connexion, ou par l'expiration d'un délai de + session.

    +
    +
    + + +AuthFormBody +Le nom du champ de formulaire contenant le corps de la +requête à effectuer en cas de connexion réussie +AuthFormBody nom du champ +httpd_body +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormBody + spécifie le nom du champ HTML qui, s'il existe, contiendra le corps + de la requête à effectuer en cas de connexion réussie.

    + +

    En ajoutant au formulaire les champs décrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, un site web sera en + mesure de relancer une requête qui a été éventuellement interrompue + par l'écran de connexion, ou par l'expiration d'un délai de + session.

    +
    +
    + + +AuthFormSize +La taille maximale en octets du formulaire dont seront +extraites les informations de connexion +AuthFormSize taille +8192 +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormSize spécifie + la taille maximale du corps de la requête qui sera utilisée pour + trouver le formulaire de connexion.

    + +

    Si une requête de connexion entrante possède une taille + supérieure à cette valeur, elle sera rejetée avec le code de réponse + HTTP HTTP_REQUEST_TOO_LARGE.

    + +

    Si vous avez ajouté au formulaire des champs décrits dans AuthFormMethod, AuthFormMimetype et AuthFormBody, il est recommandé + de définir cette directive à une valeur similaire à celle de la + directive KeptBodySize.

    + +
    +
    + + +AuthFormLoginRequiredLocation +L'URL de la page vers laquelle on doit être redirigé si une +authentification est requise +AuthFormLoginRequiredLocation url +none +directory + +Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprétation des expressions rationnelles est supportée +depuis la version 2.4.4. + + +

    La directive AuthFormLoginRequiredLocation + spécifie l'URL vers laquelle l'utilisateur devra être + redirigé s'il n'est pas autorisé à accéder à une page. Sa valeur est + interprétée via l'interpréteur ap_expr + avant d'être envoyée au client. Par défaut, + si un utilisateur n'est pas autorisé à accéder à une page, le code + de réponse HTTP HTTP_UNAUTHORIZED est renvoyé avec la + page spécifiée par la directive ErrorDocument. La directive AuthFormLoginRequiredLocation + permet de remplacer cette valeur par défaut.

    + +

    Vous pouvez utiliser cette directive si vous voulez présenter une + page de connexion personnalisée à vos utilisateurs.

    + +
    +
    + + +AuthFormLoginSuccessLocation +L'URL de la page vers laquelle on doit être redirigé en cas +de connexion réussie +AuthFormLoginSuccessLocation url +none +directory + +Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprétation des expressions rationnelles est supportée +depuis la version 2.4.4. + + +

    La directive AuthFormLoginSuccessLocation + spécifie l'URL vers laquelle l'utilisateur doit être + redirigé en cas de connexion réussie. Sa valeur est + interprétée via l'interpréteur ap_expr + avant d'être envoyée au client. L'effet de cette directive + peut être annulé si l'on a défini un champ de formulaire contenant + une autre URL à l'aide de la directive AuthFormLocation.

    + +

    Vous pouvez utiliser cette directive si vous possédez une URL de + connexion personnalisée, et si vous n'avez pas intégré la page de + destination dans le formulaire de connexion.

    + +
    +
    + + +AuthFormFakeBasicAuth +Simule une en-tête d'authentification de base +AuthFormFakeBasicAuth On|Off +AuthFormFakeBasicAuth Off +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    Le drapeau AuthFormFakeBasicAuth + détermine si une en-tête d'Authentification de base + sera ajoutée aux en-têtes de la requête. On peut utiliser cette + méthode pour présenter le nom d'utilisateur et le mot de passe à + l'application sous-jacente, sans que cette dernière ait besoin de + connaître la manière dont le processus de connexion a été mené à + bien.

    + +
    +
    + + +AuthFormLogoutLocation +L'URL vers laquelle un utilisateur devra être redirigé +après s'être déconnecté +AuthFormLogoutLocation uri +none +directory + +Disponible depuis la version 2.3.0 du serveur HTTP +Apache. L'interprétation des expressions rationnelles est supportée +depuis la version 2.4.4. + + +

    La directive AuthFormLogoutLocation + spécifie l'URL de la page du serveur vers laquelle l'utilisateur + devra être redirigé s'il se déconnecte. Sa valeur est + interprétée via l'interpréteur ap_expr + avant d'être envoyée au client.

    + +

    Lorsqu'un accès est tenté sur un URI traité par le gestionnaire + form-logout-handler, la page spécifiée par cette + directive sera présentée à l'utilisateur final. Par exemple :

    + + Exemple + +<Location "/logout"> + SetHandler form-logout-handler + AuthFormLogoutLocation "http://example.com/loggedout.html" + Session on + #... +</Location> + + + +

    Si un utilisateur tente d'accéder à l'URI /logout/, il + sera déconnecté, et la page /loggedout.html lui sera + présentée. Assurez-vous que la page loggedout.html n'est + pas protégée par mot de passe, car dans le cas contraire, elle ne + serait pas affichée.

    + +
    +
    + + +AuthFormDisableNoStore +Désactive l'en-tête CacheControl no-store sur la page de +connexion +AuthFormDisableNoStore On|Off +AuthFormDisableNoStore Off +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    Le drapeau AuthFormDisableNoStore supprime + l'envoi d'un en-tête Cache-Control no-store lorsqu'une + page avec code d'erreur 401 est renvoyée, si l'utilisateur n'est pas + encore connecté. Avec cette en-tête, il est plus difficile pour une + application ecmascript de resoumettre un formulaire de connexion, et + ainsi révéler le nom d'utilisateur et le mot de passe à + l'application sous-jacente. Vous devez être conscient des risques + encourus si vous le désactivez.

    + +
    +
    + + +AuthFormSitePassphrase +Court-circuite l'authentification pour les sites à fort +trafic +AuthFormSitePassphrase secret +none +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive AuthFormSitePassphrase + spécifie un mot de passe qui, s'il est présent dans la session + utilisateur, indique à Apache httpd de court-circuiter l'authentification + pour l'URL considérée. On peut l'utiliser dans le cas de sites web à + fort trafic afin de réduire la charge induite sur l'infrastructure + d'authentification.

    + +

    On peut insérer le mot de passe dans une session utilisateur en + ajoutant cette directive à la configuration concernant le + gestionnaire form-login-handler. Le gestionnaire + form-login-handler, quant à lui, effectuera toujours les + vérifications d'authentification, qu'un mot de passe soit spécifié + ou non.

    + + Avertissement +

    Si la session est présentée à l'utilisateur à l'aide du module + mod_session_cookie, et si la session n'est pas + protégée par le module mod_session_crypto, le mot + de passe peut faire l'objet d'une attaque de type dictionnaire. + Quelle que soit la configuration de la session, assurez-vous que + cette directive n'est pas utilisée dans un espace d'URLs contenant + des données privées, ou à partir desquelles des transactions + sensibles pourraient être menées. En tout état de cause, vous + devez être conscient des risques encourus avant de l'utiliser.

    +
    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_auth_form.xml.meta b/docs/manual/mod/mod_auth_form.xml.meta index b2c59b4a910..66a7abbcd2a 100644 --- a/docs/manual/mod/mod_auth_form.xml.meta +++ b/docs/manual/mod/mod_auth_form.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_authn_anon.html b/docs/manual/mod/mod_authn_anon.html index 4da4dffe602..c98bacbf4b9 100644 --- a/docs/manual/mod/mod_authn_anon.html +++ b/docs/manual/mod/mod_authn_anon.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_authn_anon.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_authn_anon.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_authn_anon.html.en b/docs/manual/mod/mod_authn_anon.html.en index fde11d7ea30..a45645969f8 100644 --- a/docs/manual/mod/mod_authn_anon.html.en +++ b/docs/manual/mod/mod_authn_anon.html.en @@ -1,27 +1,33 @@ - -mod_authn_anon - Apache HTTP Server +mod_authn_anon - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_anon

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -51,7 +57,10 @@ via the AuthBasicProvider directive with the anon value.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Example

    @@ -90,26 +98,21 @@ (Anonymous_LogEmail) -

    Example

    - <Directory /var/www/html/private> - - AuthName "Use 'anonymous' & Email address for guest entry"
    - AuthType Basic
    - AuthBasicProvider file anon
    - AuthUserFile /path/to/your/.htpasswd
    -
    - Anonymous_NoUserID off
    - Anonymous_MustGiveEmail on
    - Anonymous_VerifyEmail on
    - Anonymous_LogEmail on
    - Anonymous anonymous guest www test welcome
    -
    - Require all granted
    -
    - Require valid-user
    -
    - </Directory> -

    +

    Example

    <Directory "/var/www/html/private">
    +    AuthName "Use 'anonymous' & Email address for guest entry"
    +    AuthType Basic
    +    AuthBasicProvider file anon
    +    AuthUserFile "/path/to/your/.htpasswd"
    +    
    +    Anonymous_NoUserID off
    +    Anonymous_MustGiveEmail on
    +    Anonymous_VerifyEmail on
    +    Anonymous_LogEmail on
    +    Anonymous anonymous guest www test welcome
    +    
    +    Require valid-user
    +</Directory>
    +
    top

    Anonymous Directive

    @@ -133,9 +136,8 @@ password verification 'anonymous' is always one of the allowed userIDs.

    -

    Example:

    - Anonymous anonymous "Not Registered" "I don't know" -

    +

    Example:

    Anonymous anonymous "Not Registered" "I don't know"
    +

    This would allow the user to enter without password verification by using the userIDs "anonymous", @@ -215,9 +217,31 @@ formatted email address

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_anon.html.fr b/docs/manual/mod/mod_authn_anon.html.fr new file mode 100644 index 00000000000..b1c6ab5cbf9 --- /dev/null +++ b/docs/manual/mod/mod_authn_anon.html.fr @@ -0,0 +1,262 @@ + + + + + +mod_authn_anon - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authn_anon

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    + + + + +
    Description:Permet un accs "anonyme" des zones +protges
    Statut:Extension
    IdentificateurdeModule:authn_anon_module
    FichierSource:mod_authn_anon.c
    Compatibilit:Disponible depuis la version 2.1 d'Apache
    +

    Sommaire

    + +

    Ce module permet aux frontaux d'authentification comme + mod_auth_basic d'authentifier les utilisateurs + la manire des sites FTP anonymes, c'est dire + en fournissant l'identifiant utilisateur spcial 'anonymous' et + l'adresse email comme mot de passe. Ces adresses email peuvent tre + journalises.

    + +

    En combinaison avec d'autres mthodes de contrle d'accs (base + de donnes), ce module permet d'effectuer un vritable suivi des + utilisateurs et une personnalisation de leurs accs en fonction de + leur profil, tout en conservant l'accessibilit du site aux + utilisateurs 'non enregistrs'. Un avantage du suivi des + utilisateurs bas sur l'authentification rside dans le fait qu'il + est, l'oppos des cookies magiques et des drles d'URLs avec + prfixes ou suffixes, entirement indpendant du navigateur et qu'il + permet de partager des URLs entre plusieurs utilisateurs.

    + +

    Si l'on utilise le module mod_auth_basic, le + module mod_authn_anon est invoqu en affectant la + valeur anon la directive AuthBasicProvider.

    +
    + +
    top
    +
    +

    Exemple

    +

    L'exemple ci-dessous prsente un exemple de combinaison avec + l'authentification base de fichier htpasswd "normale", et permet + la connexion d'utilisateurs en tant qu'invits avec les proprits + suivantes :

    + +
      +
    • Il incite l'utilisateur fournir un identifiant. + (Anonymous_NoUserID)
    • + +
    • Il incite l'utilisateur fournir un mot de passe. + (Anonymous_MustGiveEmail)
    • + +
    • Le mot de passe fourni doit tre une adresse email valide, + c'est dire contenant au moins un '@' et un '.'. + (Anonymous_VerifyEmail)
    • + +
    • Les valeurs possibles pour l'identifiant utilisateur sont + anonymous, guest, www, test ou welcome, et la + vrification n'est pas sensible la casse. + (Anonymous)
    • + +
    • Les adresses email entres dans le champ passwd sont + enregistres dans le fichier journal des erreurs. + (Anonymous_LogEmail)
    • +
    + +

    Exemple

    <Directory "/var/www/html/private">
    +    AuthName "Use 'anonymous' & Email address for guest entry"
    +    AuthType Basic
    +    AuthBasicProvider file anon
    +    AuthUserFile "/path/to/your/.htpasswd"
    +
    +    Anonymous_NoUserID off
    +    Anonymous_MustGiveEmail on
    +    Anonymous_VerifyEmail on
    +    Anonymous_LogEmail on
    +    Anonymous anonymous guest www test welcome
    +
    +    Require valid-user
    +</Directory>
    +
    +
    +
    top
    +

    Directive Anonymous

    + + + + + + + +
    Description:Dfinit la liste des identifiants utilisateur autoriss +accder sans vrification du mot de passe
    Syntaxe:Anonymous utilisateur [utilisateur] +...
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_anon
    +

    Une liste d'un ou plusieurs identifiants utilisateur spciaux + autoriss accder sans vrification du mot de passe. Les + identifiants doivent tre spars par un espace. Pour spcifier un + identifiant contenant un espace, on peut utiliser les guillemets ' + ou ", ou le caractre d'chappement \.

    + +

    Veuillez noter que la vrification n'est pas sensible + la casse.
    + Il est fortement conseill d'intgrer l'utilisateur spcial + 'anonymous' dans la liste des identifiants.

    + +

    Exemple:

    Anonymous anonymous "Not Registered" "I don't know"
    +
    + +

    Dans cet exemple, l'utilisateur peut accder au site sans + vrification du mot de passe en utilisant l'identifiant "anonymous", + "Not Registered", "I Don't Know" ou encore "AnonyMous".

    + +

    Depuis Apache 2.1, il est possible de remplacer la liste des + identifiants autoriss par le caractre "*", ce qui + permet d'utiliser n'importe quel identifiant pour pouvoir + accder au site.

    + +
    +
    top
    +

    Directive Anonymous_LogEmail

    + + + + + + + + +
    Description:Dtermine si le mot de passe fourni sera enregistr dans le +journal des erreurs
    Syntaxe:Anonymous_LogEmail On|Off
    Dfaut:Anonymous_LogEmail On
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_anon
    +

    Lorsque cette directive est dfinie On, valeur + par dfaut, le 'mot de passe' fourni (cens contenir une adresse + email valide) est enregistr dans le journal des erreurs.

    + +
    +
    top
    +

    Directive Anonymous_MustGiveEmail

    + + + + + + + + +
    Description:Dtermine si l'abscence de mot de passe est +autorise
    Syntaxe:Anonymous_MustGiveEmail On|Off
    Dfaut:Anonymous_MustGiveEmail On
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_anon
    +

    Dtermine si l'utilisateur doit spcifier une adresse email comme + mot de passe. Lorsque cette directive est dfinie On, + l'abscence de mot de passe est interdite.

    + +
    +
    top
    +

    Directive Anonymous_NoUserID

    + + + + + + + + +
    Description:Dtermine si le champ identifiant peut tre +vide
    Syntaxe:Anonymous_NoUserID On|Off
    Dfaut:Anonymous_NoUserID Off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_anon
    +

    Lorsque cette directive est dfinie On, les + utilisateurs peuvent laisser le champ identifiant vide (et peut-tre + aussi le champ mot de passe selon la dfinition de la directive + Anonymous_MustGiveEmail). Ceci + peut s'avrer trs utile pour les utilisateurs de MS-Explorer qui + n'ont pour seule possibilit que d'appuyer sur Entre ou de cliquer + directement sur le bouton OK, ce qui semble tre une raction + naturelle.

    + +
    +
    top
    +

    Directive Anonymous_VerifyEmail

    + + + + + + + + +
    Description:Dtermine s'il faut vrifier que le format de l'adresse +email fournie comme mot de passe est correct
    Syntaxe:Anonymous_VerifyEmail On|Off
    Dfaut:Anonymous_VerifyEmail Off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_anon
    +

    Lorsque cette directive est dfinie On, Apache + vrifie que le 'mot de passe' entr contient au moins un '@' et un + '.' afin d'inciter les utilisateurs fournir des adresses email + valides (voir ci-dessus la directive Anonymous_LogEmail).

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_anon.html.ja.utf8 b/docs/manual/mod/mod_authn_anon.html.ja.utf8 index 90a3c5cf2d4..f6259930380 100644 --- a/docs/manual/mod/mod_authn_anon.html.ja.utf8 +++ b/docs/manual/mod/mod_authn_anon.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_authn_anon - Apache HTTP サーバ +mod_authn_anon - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authn_anon

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -55,7 +62,10 @@ AuthBasicProvideranon という値を設定することで起動されます。

    -

    ディレクティブ

    +

    トピック

    +

    ディレクティブ

    -

    トピック

    -
    +

    Bugfix checklist

    参照

    +
    top

    @@ -94,27 +103,21 @@ (Anonymous_LogEmail) -

    - <Directory /foo> - - AuthName "Use 'anonymous' & Email address for guest entry"
    - AuthType Basic
    - AuthBasicProvider file anon
    - AuthUserFile /path/to/your/.htpasswd
    -
    - Anonymous_NoUserID off
    - Anonymous_MustGiveEmail on
    - Anonymous_VerifyEmail on
    - Anonymous_LogEmail on
    - Anonymous anonymous guest www test welcome
    -
    - Order Deny,Allow
    - Allow from all
    -
    - Require valid-user
    -
    - </Directory> -

    +

    <Directory /var/www/html/private>
    +    AuthName "Use 'anonymous' & Email address for guest entry"
    +    AuthType Basic
    +    AuthBasicProvider file anon
    +    AuthUserFile /path/to/your/.htpasswd
    +    
    +    Anonymous_NoUserID off
    +    Anonymous_MustGiveEmail on
    +    Anonymous_VerifyEmail on
    +    Anonymous_LogEmail on
    +    Anonymous anonymous guest www test welcome
    +    
    +    Require valid-user
    +</Directory>
    +
    top

    Anonymous ディレクティブ

    @@ -137,9 +140,8 @@ 魔法のユーザ名 'anonymous' が許可されている userID に 含むようにすることは強く推奨されています。

    -

    例:

    - Anonymous anonymous "Not Registered" "I don't know" -

    +

    例:

    Anonymous anonymous "Not Registered" "I don't know"
    +

    これは、userID "anonymous", "AnonyMous", "Not Registered", "I Don't Know" のどれかを使っても @@ -218,10 +220,32 @@

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_anon.html.ko.euc-kr b/docs/manual/mod/mod_authn_anon.html.ko.euc-kr index 40f66c956c5..68fede48c13 100644 --- a/docs/manual/mod/mod_authn_anon.html.ko.euc-kr +++ b/docs/manual/mod/mod_authn_anon.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_authn_anon - Apache HTTP Server +mod_authn_anon - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authn_anon

    @@ -49,7 +55,10 @@

    mod_auth_basic Ҷ AuthBasicProvider anon ϸ Ѵ.

    -
    top

    @@ -205,9 +213,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_anon.xml b/docs/manual/mod/mod_authn_anon.xml index 57696d7b2c0..0078c6ee5c9 100644 --- a/docs/manual/mod/mod_authn_anon.xml +++ b/docs/manual/mod/mod_authn_anon.xml @@ -81,24 +81,22 @@ Example - <Directory /var/www/html/private> - - AuthName "Use 'anonymous' & Email address for guest entry"
    - AuthType Basic
    - AuthBasicProvider file anon
    - AuthUserFile /path/to/your/.htpasswd
    -
    - Anonymous_NoUserID off
    - Anonymous_MustGiveEmail on
    - Anonymous_VerifyEmail on
    - Anonymous_LogEmail on
    - Anonymous anonymous guest www test welcome
    -
    - Require all granted
    -
    - Require valid-user
    -
    - </Directory> + +<Directory "/var/www/html/private"> + AuthName "Use 'anonymous' & Email address for guest entry" + AuthType Basic + AuthBasicProvider file anon + AuthUserFile "/path/to/your/.htpasswd" + + Anonymous_NoUserID off + Anonymous_MustGiveEmail on + Anonymous_VerifyEmail on + Anonymous_LogEmail on + Anonymous anonymous guest www test welcome + + Require valid-user +</Directory> +
    @@ -124,7 +122,9 @@ password verification userIDs.

    Example: + Anonymous anonymous "Not Registered" "I don't know" +

    This would allow the user to enter without password diff --git a/docs/manual/mod/mod_authn_anon.xml.fr b/docs/manual/mod/mod_authn_anon.xml.fr new file mode 100644 index 00000000000..655236cb65c --- /dev/null +++ b/docs/manual/mod/mod_authn_anon.xml.fr @@ -0,0 +1,226 @@ + + + + + + + + + + + +mod_authn_anon +Permet un accès "anonyme" à des zones +protégées +Extension +mod_authn_anon.c +authn_anon_module +Disponible depuis la version 2.1 d'Apache + +

    +

    Ce module permet aux frontaux d'authentification comme + mod_auth_basic d'authentifier les utilisateurs + à la manière des sites FTP anonymes, c'est à dire + en fournissant l'identifiant utilisateur spécial 'anonymous' et + l'adresse email comme mot de passe. Ces adresses email peuvent être + journalisées.

    + +

    En combinaison avec d'autres méthodes de contrôle d'accès (base + de données), ce module permet d'effectuer un véritable suivi des + utilisateurs et une personnalisation de leurs accès en fonction de + leur profil, tout en conservant l'accessibilité du site aux + utilisateurs 'non enregistrés'. Un avantage du suivi des + utilisateurs basé sur l'authentification réside dans le fait qu'il + est, à l'opposé des cookies magiques et des drôles d'URLs avec + préfixes ou suffixes, entièrement indépendant du navigateur et qu'il + permet de partager des URLs entre plusieurs utilisateurs.

    + +

    Si l'on utilise le module mod_auth_basic, le + module mod_authn_anon est invoqué en affectant la + valeur anon à la directive AuthBasicProvider.

    +
    + +
    Exemple +

    L'exemple ci-dessous présente un exemple de combinaison avec + l'authentification à base de fichier htpasswd "normale", et permet + la connexion d'utilisateurs en tant qu'invités avec les propriétés + suivantes :

    + +
      +
    • Il incite l'utilisateur à fournir un identifiant. + (Anonymous_NoUserID)
    • + +
    • Il incite l'utilisateur à fournir un mot de passe. + (Anonymous_MustGiveEmail)
    • + +
    • Le mot de passe fourni doit être une adresse email valide, + c'est à dire contenant au moins un '@' et un '.'. + (Anonymous_VerifyEmail)
    • + +
    • Les valeurs possibles pour l'identifiant utilisateur sont + anonymous, guest, www, test ou welcome, et la + vérification n'est pas sensible à la casse. + (Anonymous)
    • + +
    • Les adresses email entrées dans le champ passwd sont + enregistrées dans le fichier journal des erreurs. + (Anonymous_LogEmail)
    • +
    + + Exemple + +<Directory "/var/www/html/private"> + AuthName "Use 'anonymous' & Email address for guest entry" + AuthType Basic + AuthBasicProvider file anon + AuthUserFile "/path/to/your/.htpasswd" + + Anonymous_NoUserID off + Anonymous_MustGiveEmail on + Anonymous_VerifyEmail on + Anonymous_LogEmail on + Anonymous anonymous guest www test welcome + + Require valid-user +</Directory> + + +
    + + +Anonymous +Définit la liste des identifiants utilisateur autorisés à +accéder sans vérification du mot de passe +Anonymous utilisateur [utilisateur] +... +directory.htaccess + +AuthConfig + + +

    Une liste d'un ou plusieurs identifiants utilisateur spéciaux + autorisés à accéder sans vérification du mot de passe. Les + identifiants doivent être séparés par un espace. Pour spécifier un + identifiant contenant un espace, on peut utiliser les guillemets ' + ou ", ou le caractère d'échappement \.

    + +

    Veuillez noter que la vérification n'est pas sensible à + la casse.
    + Il est fortement conseillé d'intégrer l'utilisateur spécial + 'anonymous' dans la liste des identifiants.

    + + Exemple: + + Anonymous anonymous "Not Registered" "I don't know" + + + +

    Dans cet exemple, l'utilisateur peut accéder au site sans + vérification du mot de passe en utilisant l'identifiant "anonymous", + "Not Registered", "I Don't Know" ou encore "AnonyMous".

    + +

    Depuis Apache 2.1, il est possible de remplacer la liste des + identifiants autorisés par le caractère "*", ce qui + permet d'utiliser n'importe quel identifiant pour pouvoir + accéder au site.

    +
    +
    + + +Anonymous_LogEmail +Détermine si le mot de passe fourni sera enregistré dans le +journal des erreurs +Anonymous_LogEmail On|Off +Anonymous_LogEmail On +directory.htaccess + +AuthConfig + + +

    Lorsque cette directive est définie à On, valeur + par défaut, le 'mot de passe' fourni (censé contenir une adresse + email valide) est enregistré dans le journal des erreurs.

    +
    +
    + + +Anonymous_MustGiveEmail +Détermine si l'abscence de mot de passe est +autorisée +Anonymous_MustGiveEmail On|Off +Anonymous_MustGiveEmail On +directory.htaccess + +AuthConfig + + +

    Détermine si l'utilisateur doit spécifier une adresse email comme + mot de passe. Lorsque cette directive est définie à On, + l'abscence de mot de passe est interdite.

    +
    +
    + + +Anonymous_NoUserID +Détermine si le champ identifiant peut être +vide +Anonymous_NoUserID On|Off +Anonymous_NoUserID Off +directory.htaccess + +AuthConfig + + +

    Lorsque cette directive est définie à On, les + utilisateurs peuvent laisser le champ identifiant vide (et peut-être + aussi le champ mot de passe selon la définition de la directive + Anonymous_MustGiveEmail). Ceci + peut s'avérer très utile pour les utilisateurs de MS-Explorer qui + n'ont pour seule possibilité que d'appuyer sur Entrée ou de cliquer + directement sur le bouton OK, ce qui semble être une réaction + naturelle.

    +
    +
    + + +Anonymous_VerifyEmail +Détermine s'il faut vérifier que le format de l'adresse +email fournie comme mot de passe est correct +Anonymous_VerifyEmail On|Off +Anonymous_VerifyEmail Off +directory.htaccess + +AuthConfig + + +

    Lorsque cette directive est définie à On, Apache + vérifie que le 'mot de passe' entré contient au moins un '@' et un + '.' afin d'inciter les utilisateurs à fournir des adresses email + valides (voir ci-dessus la directive Anonymous_LogEmail).

    +
    +
    + + diff --git a/docs/manual/mod/mod_authn_anon.xml.ja b/docs/manual/mod/mod_authn_anon.xml.ja index 39d62af22a3..1b2ae97d9f4 100644 --- a/docs/manual/mod/mod_authn_anon.xml.ja +++ b/docs/manual/mod/mod_authn_anon.xml.ja @@ -1,7 +1,7 @@ - + + -mod_authn_core - Apache HTTP Server +mod_authn_core - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_core

    @@ -36,16 +41,18 @@ mod_authn_core provides directives that are common to all authentication providers.

    -
    top

    Creating Authentication Provider Aliases

    @@ -65,68 +72,53 @@

    This example checks for passwords in two different text files.

    -

    Checking multiple text password files

    +

    Checking multiple text password files

    # Check here first
    +<AuthnProviderAlias file file1>
    +    AuthUserFile "/www/conf/passwords1"
    +</AuthnProviderAlias>
    +
    +# Then check here
    +<AuthnProviderAlias file file2>   
    +    AuthUserFile "/www/conf/passwords2"
    +</AuthnProviderAlias>
     
    -        # Check here first
    - <AuthnProviderAlias file file1>
    - - AuthUserFile /www/conf/passwords1
    -
    - </AuthnProviderAlias>
    -
    - # Then check here
    - <AuthnProviderAlias file file2>
    - - AuthUserFile /www/conf/passwords2
    -
    - </AuthnProviderAlias>
    -
    - <Directory /var/web/pages/secure>
    - - AuthBasicProvider file1 file2
    -
    - AuthType Basic
    - AuthName "Protected Area"
    - Require valid-user
    -
    - </Directory>
    -

    +<Directory "/var/web/pages/secure"> + AuthBasicProvider file1 file2 + + AuthType Basic + AuthName "Protected Area" + Require valid-user +</Directory> +

    The example below creates two different ldap authentication provider aliases based on the ldap provider. This allows a single authenticated location to be serviced by multiple ldap hosts:

    -

    Checking multiple LDAP servers

    - <AuthnProviderAlias ldap ldap-alias1>
    - - AuthLDAPBindDN cn=youruser,o=ctx
    - AuthLDAPBindPassword yourpassword
    - AuthLDAPURL ldap://ldap.host/o=ctx
    -
    - </AuthnProviderAlias>

    - <AuthnProviderAlias ldap ldap-other-alias>
    - - AuthLDAPBindDN cn=yourotheruser,o=dev
    - AuthLDAPBindPassword yourotherpassword
    - AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    -
    - </AuthnProviderAlias>

    +

    Checking multiple LDAP servers

    <AuthnProviderAlias ldap ldap-alias1>
    +    AuthLDAPBindDN cn=youruser,o=ctx
    +    AuthLDAPBindPassword yourpassword
    +    AuthLDAPURL ldap://ldap.host/o=ctx
    +</AuthnProviderAlias>
    +<AuthnProviderAlias ldap ldap-other-alias>
    +    AuthLDAPBindDN cn=yourotheruser,o=dev
    +    AuthLDAPBindPassword yourotherpassword
    +    AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    +</AuthnProviderAlias>
     
    -          Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Order deny,allow
    - Allow from all

    - - AuthBasicProvider ldap-other-alias ldap-alias1

    - - AuthType Basic
    - AuthName LDAP_Protected_Place
    - Require valid-user
    -
    - </Directory>
    -

    +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + AuthBasicProvider ldap-other-alias ldap-alias1 + + AuthType Basic + AuthName "LDAP Protected Place" + Require valid-user + # Note that Require ldap-* would not work here, since the + # AuthnProviderAlias does not provide the config to authorization providers + # that are implemented in the same module as the authentication provider. +</Directory> +
    @@ -153,9 +145,8 @@ authentication

    For example:

    -

    - AuthName "Top Secret" -

    +
    AuthName "Top Secret"
    +

    The string provided for the AuthName is what will appear in the password dialog provided by most browsers.

    @@ -182,10 +173,12 @@ the specified alias

    <AuthnProviderAlias> and </AuthnProviderAlias> are used to enclose a group of authentication directives that can be referenced by the alias name - using one of the directives - AuthBasicProvider or + using one of the directives + AuthBasicProvider or AuthDigestProvider.

    +
    This directive has no affect on authorization, even for modules that + provide both authentication and authorization.
    top
    @@ -219,24 +212,19 @@ the specified alias in the following example, clients may access the /www/docs/public directory without authenticating:

    -

    - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require valid-user -
    - </Directory>
    -
    - <Directory /www/docs/public> - - AuthType None
    - Require all granted -
    - </Directory> -

    +
    <Directory "/www/docs">
    +    AuthType Basic
    +    AuthName Documents
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    Require valid-user
    +</Directory>
    +
    +<Directory "/www/docs/public">
    +    AuthType None
    +    Require all granted
    +</Directory>
    +
    When disabling authentication, note that clients which have already authenticated against another portion of the server's document @@ -254,7 +242,28 @@ the specified alias

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_core.html.fr b/docs/manual/mod/mod_authn_core.html.fr index 083588a7014..bb628e3c81f 100644 --- a/docs/manual/mod/mod_authn_core.html.fr +++ b/docs/manual/mod/mod_authn_core.html.fr @@ -1,23 +1,28 @@ - -mod_authn_core - Serveur Apache HTTP +mod_authn_core - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authn_core

    @@ -37,17 +42,19 @@ mod_authn_core sont communes tous les fournisseurs d'authentification.

    -
    top

    Cration d'alias de fournisseurs @@ -68,32 +75,24 @@ d'authentification

    textes diffrents.

    Vrification dans plusieurs fichiers de mots de - passe au format texte

    + passe au format texte

    # Premire vrification
    +<AuthnProviderAlias file file1>
    +    AuthUserFile "/www/conf/passwords1"
    +</AuthnProviderAlias>
    +
    +# Vrification suivante
    +<AuthnProviderAlias file file2>   
    +    AuthUserFile "/www/conf/passwords2"
    +</AuthnProviderAlias>
     
    -        # On vrifie tout d'abord ici
    - <AuthnProviderAlias file file1>
    - - AuthUserFile /www/conf/passwords1
    -
    - </AuthnProviderAlias>
    -
    - # On vrifie ensuite l
    - <AuthnProviderAlias file file2>
    - - AuthUserFile /www/conf/passwords2
    -
    - </AuthnProviderAlias>
    -
    - <Directory /var/web/pages/secure>
    - - AuthBasicProvider file1 file2
    -
    - AuthType Basic
    - AuthName "Zone protge"
    - Require valid-user
    -
    - </Directory>
    -

    +<Directory "/var/web/pages/secure"> + AuthBasicProvider file1 file2 + + AuthType Basic + AuthName "Protected Area" + Require valid-user +</Directory> +
    @@ -104,41 +103,36 @@ d'authentification ldap :

    Vrification auprs de plusieurs serveurs - LDAP

    - <AuthnProviderAlias ldap alias-ldap>
    - - AuthLDAPBindDN cn=utilisateur,o=ctx
    - AuthLDAPBindPassword mot-de-passe
    - AuthLDAPURL ldap://serveur.ldap/o=ctx
    -
    - </AuthnProviderAlias>

    - <AuthnProviderAlias ldap autre-alias-ldap>
    - - AuthLDAPBindDN cn=autre-utilisateur,o=dev
    - AuthLDAPBindPassword autre-mot-de-passe
    - AuthLDAPURL ldap://autre.serveur.ldap/o=dev?cn
    -
    - </AuthnProviderAlias>

    + LDAP

    <AuthnProviderAlias ldap ldap-alias1>
    +    AuthLDAPBindDN cn=youruser,o=ctx
    +    AuthLDAPBindPassword yourpassword
    +    AuthLDAPURL ldap://ldap.host/o=ctx
    +    </AuthnProviderAlias>
    +    <AuthnProviderAlias ldap ldap-other-alias>
    +    AuthLDAPBindDN cn=yourotheruser,o=dev
    +    AuthLDAPBindPassword yourotherpassword
    +    AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    +</AuthnProviderAlias>
     
    -          Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Order deny,allow
    - Allow from all

    - - AuthBasicProvider autre-alias-ldap alias-ldap

    - - AuthType Basic
    Exemple - AuthName Zone_protge_par_LDAP
    - Require valid-user
    -
    - </Directory>
    -

    +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + + AuthBasicProvider ldap-other-alias ldap-alias1 + + AuthType Basic + AuthName LDAP_Protected Place + Require valid-user + # Notez que Require ldap-* ne fonctionnerait pas ici, car + # AuthnProviderAlias ne fournit pas de configuration pour les + # fournisseurs d'autorisation implments dans le mme module que le + # fournisseur d'authentification. +</Directory> +
    top
    -
    説明:認証が必要な領域への "anonymous" ユーザのアクセスを許可する
    ステータス:Extension
    @@ -159,9 +153,8 @@ l'authentification HTTP

    Par exemple :

    -

    - AuthName "Top Secret" -

    +
    AuthName "Top Secret"
    +

    La chane fournie comme argument AuthName apparatra dans la bote de dialogue d'authentification pour la @@ -175,7 +168,7 @@ l'authentification HTTP

    top
    -
    Description:L'identifiant de l'autorisation utiliser avec l'authentification HTTP
    Description:Regroupe un ensemble de directives qui constituent une extension d'un fournisseur d'authentification de base et lui attribue @@ -191,10 +184,14 @@ l'alias sp ensemble de directives d'authentification qui seront rfrences par l'alias spcifi l'aide des directives AuthBasicProvider ou AuthDigestProvider.

    +
    Cette directive n'a aucun influence sur le processus + d'autorisation, mme pour les modules qui fournissent la fois + l'authentification et l'autorisation.
    +
    top
    -

    AuthType Directive

    +

    Directive AuthType

    @@ -227,24 +224,19 @@ l'alias sp l'exemple suivant, les clients peuvent accder au rpertoire /www/docs/public sans devoir s'authentifier :

    -

    - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require valid-user -
    - </Directory>
    -
    - <Directory /www/docs/public> - - AuthType None
    - Require all granted -
    - </Directory> -

    +
    <Directory "/www/docs">
    +    AuthType Basic
    +    AuthName Documents
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    Require valid-user
    +</Directory>
    +
    +<Directory "/www/docs/public">
    +    AuthType None
    +    Require all granted
    +</Directory>
    +
    Veuillez noter que, lorsque l'authentification n'est pas active, les clients qui se sont dj authentifis pour une autre @@ -263,7 +255,28 @@ l'alias sp

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_core.xml b/docs/manual/mod/mod_authn_core.xml index 0edbfc915bd..5197ba4fe1d 100644 --- a/docs/manual/mod/mod_authn_core.xml +++ b/docs/manual/mod/mod_authn_core.xml @@ -54,30 +54,25 @@ files.

    Checking multiple text password files - - # Check here first
    - <AuthnProviderAlias file file1>
    - - AuthUserFile /www/conf/passwords1
    -
    - </AuthnProviderAlias>
    -
    - # Then check here
    - <AuthnProviderAlias file file2>
    - - AuthUserFile /www/conf/passwords2
    -
    - </AuthnProviderAlias>
    -
    - <Directory /var/web/pages/secure>
    - - AuthBasicProvider file1 file2
    -
    - AuthType Basic
    - AuthName "Protected Area"
    - Require valid-user
    -
    - </Directory>
    + +# Check here first +<AuthnProviderAlias file file1> + AuthUserFile "/www/conf/passwords1" +</AuthnProviderAlias> + +# Then check here +<AuthnProviderAlias file file2> + AuthUserFile "/www/conf/passwords2" +</AuthnProviderAlias> + +<Directory "/var/web/pages/secure"> + AuthBasicProvider file1 file2 + + AuthType Basic + AuthName "Protected Area" + Require valid-user +</Directory> +

    The example below creates two different ldap authentication @@ -86,34 +81,30 @@ hosts:

    Checking multiple LDAP servers - <AuthnProviderAlias ldap ldap-alias1>
    - - AuthLDAPBindDN cn=youruser,o=ctx
    - AuthLDAPBindPassword yourpassword
    - AuthLDAPURL ldap://ldap.host/o=ctx
    -
    - </AuthnProviderAlias>

    - <AuthnProviderAlias ldap ldap-other-alias>
    - - AuthLDAPBindDN cn=yourotheruser,o=dev
    - AuthLDAPBindPassword yourotherpassword
    - AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    -
    - </AuthnProviderAlias>

    - - Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Order deny,allow
    - Allow from all

    - - AuthBasicProvider ldap-other-alias ldap-alias1

    - - AuthType Basic
    - AuthName LDAP_Protected_Place
    - Require valid-user
    -
    - </Directory>
    + +<AuthnProviderAlias ldap ldap-alias1> + AuthLDAPBindDN cn=youruser,o=ctx + AuthLDAPBindPassword yourpassword + AuthLDAPURL ldap://ldap.host/o=ctx +</AuthnProviderAlias> +<AuthnProviderAlias ldap ldap-other-alias> + AuthLDAPBindDN cn=yourotheruser,o=dev + AuthLDAPBindPassword yourotherpassword + AuthLDAPURL ldap://other.ldap.host/o=dev?cn +</AuthnProviderAlias> + +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + AuthBasicProvider ldap-other-alias ldap-alias1 + + AuthType Basic + AuthName "LDAP Protected Place" + Require valid-user + # Note that Require ldap-* would not work here, since the + # AuthnProviderAlias does not provide the config to authorization providers + # that are implemented in the same module as the authentication provider. +</Directory> +
    @@ -144,9 +135,9 @@ authentication

    For example:

    - + AuthName "Top Secret" - +

    The string provided for the AuthName is what will appear in the password dialog provided by most browsers.

    @@ -189,24 +180,20 @@ authentication in the following example, clients may access the /www/docs/public directory without authenticating:

    - - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require valid-user -
    - </Directory>
    -
    - <Directory /www/docs/public> - - AuthType None
    - Require all granted -
    - </Directory> -
    + +<Directory "/www/docs"> + AuthType Basic + AuthName Documents + AuthBasicProvider file + AuthUserFile "/usr/local/apache/passwd/passwords" + Require valid-user +</Directory> + +<Directory "/www/docs/public"> + AuthType None + Require all granted +</Directory> + When disabling authentication, note that clients which have already authenticated against another portion of the server's document @@ -237,6 +224,8 @@ the specified alias AuthBasicProvider or AuthDigestProvider.

    + This directive has no affect on authorization, even for modules that + provide both authentication and authorization. diff --git a/docs/manual/mod/mod_authn_core.xml.fr b/docs/manual/mod/mod_authn_core.xml.fr index 2580a3fc757..e0c45c9ae4a 100644 --- a/docs/manual/mod/mod_authn_core.xml.fr +++ b/docs/manual/mod/mod_authn_core.xml.fr @@ -1,7 +1,7 @@ - + @@ -61,29 +61,25 @@ d'authentification Vérification dans plusieurs fichiers de mots de passe au format texte - # On vérifie tout d'abord ici
    - <AuthnProviderAlias file file1>
    - - AuthUserFile /www/conf/passwords1
    -
    - </AuthnProviderAlias>
    -
    - # On vérifie ensuite là
    - <AuthnProviderAlias file file2>
    - - AuthUserFile /www/conf/passwords2
    -
    - </AuthnProviderAlias>
    -
    - <Directory /var/web/pages/secure>
    - - AuthBasicProvider file1 file2
    -
    - AuthType Basic
    - AuthName "Zone protégée"
    - Require valid-user
    -
    - </Directory>
    + +# Première vérification +<AuthnProviderAlias file file1> + AuthUserFile "/www/conf/passwords1" +</AuthnProviderAlias> + +# Vérification suivante +<AuthnProviderAlias file file2> + AuthUserFile "/www/conf/passwords2" +</AuthnProviderAlias> + +<Directory "/var/web/pages/secure"> + AuthBasicProvider file1 file2 + + AuthType Basic + AuthName "Protected Area" + Require valid-user +</Directory> +
    @@ -96,34 +92,32 @@ d'authentification Vérification auprès de plusieurs serveurs LDAP - <AuthnProviderAlias ldap alias-ldap>
    - - AuthLDAPBindDN cn=utilisateur,o=ctx
    - AuthLDAPBindPassword mot-de-passe
    - AuthLDAPURL ldap://serveur.ldap/o=ctx
    -
    - </AuthnProviderAlias>

    - <AuthnProviderAlias ldap autre-alias-ldap>
    - - AuthLDAPBindDN cn=autre-utilisateur,o=dev
    - AuthLDAPBindPassword autre-mot-de-passe
    - AuthLDAPURL ldap://autre.serveur.ldap/o=dev?cn
    -
    - </AuthnProviderAlias>

    - - Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Order deny,allow
    - Allow from all

    - - AuthBasicProvider autre-alias-ldap alias-ldap

    - - AuthType Basic
    Exemple - AuthName Zone_protégée_par_LDAP
    - Require valid-user
    -
    - </Directory>
    + +<AuthnProviderAlias ldap ldap-alias1> + AuthLDAPBindDN cn=youruser,o=ctx + AuthLDAPBindPassword yourpassword + AuthLDAPURL ldap://ldap.host/o=ctx + </AuthnProviderAlias> + <AuthnProviderAlias ldap ldap-other-alias> + AuthLDAPBindDN cn=yourotheruser,o=dev + AuthLDAPBindPassword yourotherpassword + AuthLDAPURL ldap://other.ldap.host/o=dev?cn +</AuthnProviderAlias> + +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + + AuthBasicProvider ldap-other-alias ldap-alias1 + + AuthType Basic + AuthName LDAP_Protected Place + Require valid-user + # Notez que Require ldap-* ne fonctionnerait pas ici, car + # AuthnProviderAlias ne fournit pas de configuration pour les + # fournisseurs d'autorisation implémentés dans le même module que le + # fournisseur d'authentification. +</Directory> +
    @@ -155,9 +149,9 @@ l'authentification HTTP

    Par exemple :

    - + AuthName "Top Secret" - +

    La chaîne fournie comme argument à AuthName apparaîtra dans la boîte de dialogue d'authentification pour la @@ -205,24 +199,20 @@ l'authentification HTTP l'exemple suivant, les clients peuvent accéder au répertoire /www/docs/public sans devoir s'authentifier :

    - - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require valid-user -
    - </Directory>
    -
    - <Directory /www/docs/public> - - AuthType None
    - Require all granted -
    - </Directory> -
    + +<Directory "/www/docs"> + AuthType Basic + AuthName Documents + AuthBasicProvider file + AuthUserFile "/usr/local/apache/passwd/passwords" + Require valid-user +</Directory> + +<Directory "/www/docs/public"> + AuthType None + Require all granted +</Directory> + Veuillez noter que, lorsque l'authentification n'est pas activée, les clients qui se sont déjà authentifiés pour une autre @@ -254,6 +244,10 @@ l'alias spécifié module="mod_auth_basic">AuthBasicProvider ou AuthDigestProvider.

    + Cette directive n'a aucun influence sur le processus + d'autorisation, même pour les modules qui fournissent à la fois + l'authentification et l'autorisation. + diff --git a/docs/manual/mod/mod_authn_dbd.html b/docs/manual/mod/mod_authn_dbd.html index 0a3217f523e..33b20dc84ca 100644 --- a/docs/manual/mod/mod_authn_dbd.html +++ b/docs/manual/mod/mod_authn_dbd.html @@ -3,3 +3,7 @@ URI: mod_authn_dbd.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_authn_dbd.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_authn_dbd.html.en b/docs/manual/mod/mod_authn_dbd.html.en index 147268b66fb..1353db86c77 100644 --- a/docs/manual/mod/mod_authn_dbd.html.en +++ b/docs/manual/mod/mod_authn_dbd.html.en @@ -1,27 +1,33 @@ - -mod_authn_dbd - Apache HTTP Server +mod_authn_dbd - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_dbd

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Description:Type d'authentification utilisateur
    Syntaxe:AuthType None|Basic|Digest|Form
    @@ -45,17 +51,17 @@ AuthDigestProvider with the dbd value.

    -
    top

    Performance and Cacheing

    -

    Some users of DBD authentication in HTTPD 2.2 have reported that it +

    Some users of DBD authentication in HTTPD 2.2/2.4 have reported that it imposes a problematic load on the database. This is most likely where an HTML page contains hundreds of objects (e.g. images, scripts, etc) each of which requires authentication. Users affected (or concerned) @@ -85,8 +91,7 @@ to cache credentials and take most of the load off the database.

    This simple example shows use of this module in the context of the Authentication and DBD frameworks.

    -
    -# mod_dbd configuration
    +
    # mod_dbd configuration
     # UPDATED to include authentication cacheing
     DBDriver pgsql
     DBDParams "dbname=apacheauth user=apache password=xxxxxx"
    @@ -96,7 +101,7 @@ DBDKeep 8
     DBDMax  20
     DBDExptime 300
     
    -<Directory /usr/www/myhost/private>
    +<Directory "/usr/www/myhost/private">
       # mod_authn_core and mod_auth_basic configuration
       # for mod_authn_dbd
       AuthType Basic
    @@ -113,10 +118,9 @@ DBDExptime 300
       Require valid-user
     
       # mod_authn_dbd SQL query to authenticate a user
    -  AuthDBDUserPWQuery \
    -    "SELECT password FROM authn WHERE user = %s"
    -</Directory>
    -
    + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" +</Directory> +
    top

    Exposing Login Information

    @@ -149,10 +153,8 @@ configuration required in some web applications. will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a %s format specifier.

    -

    Example

    -AuthDBDUserPWQuery \
    -  "SELECT password FROM authn WHERE user = %s"
    -
    +
    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    +

    The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user @@ -179,14 +181,13 @@ AuthDBDUserPWQuery \

    Description:User authentication using an SQL database
    Status:Extension
    Module:mod_authn_dbd

    The AuthDBDUserRealmQuery specifies an - SQL query to look up a password for a specified user and realm. + SQL query to look up a password for a specified user and realm in a + digest authentication process. The user's ID and the realm, in that order, will be passed as string parameters when the SQL query is executed. They may be referenced within the query statement using %s format specifiers.

    -

    Example

    -AuthDBDUserRealmQuery \
    -  "SELECT password FROM authn WHERE user = %s AND realm = %s"
    -
    +
    AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s"
    +

    The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user @@ -204,8 +205,30 @@ AuthDBDUserRealmQuery \

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbd.html.fr b/docs/manual/mod/mod_authn_dbd.html.fr new file mode 100644 index 00000000000..8b52ddca22e --- /dev/null +++ b/docs/manual/mod/mod_authn_dbd.html.fr @@ -0,0 +1,251 @@ + + + + + +mod_authn_dbd - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authn_dbd

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Authentification utilisateur l'aide d'une base de donnes +SQL
    Statut:Extension
    IdentificateurdeModule:authn_dbd_module
    FichierSource:mod_authn_dbd.c
    Compatibilit:Disponible depuis la version 2.1 d'Apache
    +

    Sommaire

    + +

    Ce module permet aux frontaux d'authentification comme + mod_auth_digest et mod_auth_basic + d'authentifier les utilisateurs en les recherchant dans une base de + donnes SQL. mod_authn_file, par exemple, fournit + une fonctionnalit similaire.

    +

    Ce module s'appuie sur mod_dbd pour spcifier le + pilote de la base de donnes sous-jacente et les paramtres de + connexion, mais aussi pour grer les connexions la base de + donnes.

    + +

    Si l'on utilise mod_auth_basic ou + mod_auth_digest, on peut invoquer ce module en + affectant la valeur dbd la directive AuthBasicProvider ou AuthDigestProvider.

    +
    + +
    top
    +
    +

    Performances et mise en cache

    + +

    Certains utilisateurs de l'authentification DBD sous HTTPD 2.2/2.4 ont +signal une charge problmatique au niveau de la base de donnes. Cela +se produit en gnral lorsqu'une page HTML contient des centaines d'objets +(comme des images, des scripts, etc...), chacun d'entre eux ncessitant +une authentification. Les utilisateurs qui rencontrent ce genre de +problme peuvent utiliser le module mod_authn_socache +qui permet de mettre les donnes d'authentification en cache, et +soulager ainsi la base de donnes de la plus grande partie de la charge.

    +
    top
    +
    +

    Exemple de configuration

    + +

    Voici un exemple simple d'utilisation de ce module dans un contexte +d'authentification et de bases de donnes.

    +
    # configuration de mod_dbd
    +# MISE  JOUR pour inclure la mise en cache de l'authentification
    +DBDriver pgsql
    +DBDParams "dbname=apacheauth user=apache password=xxxxxx"
    +
    +DBDMin  4
    +DBDKeep 8
    +DBDMax  20
    +DBDExptime 300
    +
    +<Directory "/usr/www/mon-serveur/private">
    +  # configuration de mod_authn_core et mod_auth_basic
    +  # pour mod_authn_dbd
    +  AuthType Basic
    +  AuthName "Mon serveur"
    +
    +  # Pour mettre en cache les donnes d'authentification, placez socache
    +  # avant dbd
    +  AuthBasicProvider socache dbd
    +
    +  # Aussi ncessaire  la mise en cache : dire au cache de mettre en
    +  # cache les recherches dbd !
    +  AuthnCacheProvideFor dbd
    +  AuthnCacheContext mon-serveur
    +
    +  # configuration de mod_authz_core
    +  Require valid-user
    +
    +  # la requte SQL de mod_authn_dbd pour authentifier un utilisateur
    +  AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    +</Directory>
    + +
    top
    +
    +

    Mise disposition des informations de connexion

    + +

    +Si httpd a t compil avec la version 1.3.0 ou suprieure de +l'APR, pour chaque requte envoye au serveur de +base de donnes, toutes les valeurs de colonnes du premier +enregistrement renvoy par la requte sont affectes des variables +d'environnement avec le prfixe "AUTHENTICATE_". +

    +

    Par exemple, si une requte renvoie un nom d'utilisateur, un nom +complet et un numro de tlphone, un programme CGI pourra accder ces +informations sans avoir besoin d'effectuer une deuxime requte vers la +base de donnes.

    +

    Ceci va entraner une simplification considrable du code et de la +configuration ncessaire de certaines applications web. +

    +
    +
    top
    +

    Directive AuthDBDUserPWQuery

    + + + + + + +
    Description:Requte SQL servant vrifier le mot de passe d'un +utilisateur
    Syntaxe:AuthDBDUserPWQuery requte
    Contexte:rpertoire
    Statut:Extension
    Module:mod_authn_dbd
    +

    La directive AuthDBDUserPWQuery permet de + spcifier une requte servant vrifier le mot de passe d'un + utilisateur donn. L'identifiant utilisateur sera transmis comme + paramtre sous forme d'une seule chane de caractres lorsque la + requte sera excute. Cet identifiant est rfrenc dans la requte + en utilisant le spcificateur de format %s.

    +
    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    + +

    La premire colonne du premier enregistrement renvoy par la + requte se prsentera sous la forme d'une chane de caractres + contenant le mot de passe chiffr. Les enregistrements suivants sont + ignors. Si aucun enregistrement n'est renvoy, l'utilisateur ne + sera pas authentifi par mod_authn_dbd.

    +

    Si httpd a t compil avec la version 1.3.0 ou suprieure de + l'APR, toute valeur de colonne supplmentaire + du premier enregistrement renvoy par la requte sera stocke dans + une variable d'environnement dont le nom aura la forme + AUTHENTICATE_valeur-colonne. +

    +

    Le format du mot de passe chiffr dpend du frontal + d'authentification utilis (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour + plus de dtails.

    + +
    +
    top
    +

    Directive AuthDBDUserRealmQuery

    + + + + + + +
    Description:Requte SQL servant vrifier une empreinte de mot de +passe pour un utilisateur et un identifiant d'authentification. +
    Syntaxe:AuthDBDUserRealmQuery requte
    Contexte:rpertoire
    Statut:Extension
    Module:mod_authn_dbd
    +

    La directive AuthDBDUserRealmQuery permet + de spcifier une requte SQL servant vrifier une empreinte de mot + de passe pour un utilisateur et un identifiant d'authentification + donns au cours d'un processus d'authentification digest. Les + identifiants de l'utilisateur et de l'authentification + sont passs dans cet ordre comme paramtres l'excution de la + requte. Ils sont rfrencs dans la chane de la requte en + utilisant des spcificateurs de format %s.

    +
    AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s"
    + +

    La premire colonne du premier enregistrement renvoy par la + requte se prsentera sous la forme d'une chane de caractres + contenant le mot de passe chiffr. Les enregistrements suivants + seront ignors. Si aucun enregistrement n'est renvoy, l'utilisateur + ne sera pas authentifi par mod_authn_dbd.

    +

    Si httpd a t compil avec une version 1.3.0 ou suprieure de + l'APR, toute valeur de colonne supplmentaire + du premier enregistrement renvoy par la requte sera stocke dans + une variable d'environnement avec un nom de la forme + AUTHENTICATE_COLONNE. +

    +

    Le format du mot de passe chiffr dpend du frontal + d'authentification utilis (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour + plus de dtails.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbd.xml b/docs/manual/mod/mod_authn_dbd.xml index 03e3af18ce9..e82c6dc151e 100644 --- a/docs/manual/mod/mod_authn_dbd.xml +++ b/docs/manual/mod/mod_authn_dbd.xml @@ -60,7 +60,7 @@
    Performance and Cacheing -

    Some users of DBD authentication in HTTPD 2.2 have reported that it +

    Some users of DBD authentication in HTTPD 2.2/2.4 have reported that it imposes a problematic load on the database. This is most likely where an HTML page contains hundreds of objects (e.g. images, scripts, etc) each of which requires authentication. Users affected (or concerned) @@ -72,7 +72,7 @@ to cache credentials and take most of the load off the database.

    Configuration Example

    This simple example shows use of this module in the context of the Authentication and DBD frameworks.

    -
    +
     # mod_dbd configuration
     # UPDATED to include authentication cacheing
     DBDriver pgsql
    @@ -83,7 +83,7 @@ DBDKeep 8
     DBDMax  20
     DBDExptime 300
     
    -<Directory /usr/www/myhost/private>
    +<Directory "/usr/www/myhost/private">
       # mod_authn_core and mod_auth_basic configuration
       # for mod_authn_dbd
       AuthType Basic
    @@ -100,10 +100,9 @@ DBDExptime 300
       Require valid-user
     
       # mod_authn_dbd SQL query to authenticate a user
    -  AuthDBDUserPWQuery \
    -    "SELECT password FROM authn WHERE user = %s"
    +  AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
     </Directory>
    -
    +
    @@ -136,10 +135,9 @@ configuration required in some web applications. will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a %s format specifier.

    - Example
    -AuthDBDUserPWQuery \
    -  "SELECT password FROM authn WHERE user = %s"
    -
    + +AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" +

    The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user @@ -167,14 +165,14 @@ AuthDBDUserPWQuery \

    The AuthDBDUserRealmQuery specifies an - SQL query to look up a password for a specified user and realm. + SQL query to look up a password for a specified user and realm in a + digest authentication process. The user's ID and the realm, in that order, will be passed as string parameters when the SQL query is executed. They may be referenced within the query statement using %s format specifiers.

    - Example
    -AuthDBDUserRealmQuery \
    -  "SELECT password FROM authn WHERE user = %s AND realm = %s"
    -
    + +AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s" +

    The first column value of the first row returned by the query statement should be a string containing the encrypted password. Subsequent rows will be ignored. If no rows are returned, the user diff --git a/docs/manual/mod/mod_authn_dbd.xml.fr b/docs/manual/mod/mod_authn_dbd.xml.fr new file mode 100644 index 00000000000..21a03cd85a0 --- /dev/null +++ b/docs/manual/mod/mod_authn_dbd.xml.fr @@ -0,0 +1,214 @@ + + + + + + + + + + + +mod_authn_dbd +Authentification utilisateur à l'aide d'une base de données +SQL +Extension +mod_authn_dbd.c +authn_dbd_module +Disponible depuis la version 2.1 d'Apache + +

    +

    Ce module permet aux frontaux d'authentification comme + mod_auth_digest et mod_auth_basic + d'authentifier les utilisateurs en les recherchant dans une base de + données SQL. mod_authn_file, par exemple, fournit + une fonctionnalité similaire.

    +

    Ce module s'appuie sur mod_dbd pour spécifier le + pilote de la base de données sous-jacente et les paramètres de + connexion, mais aussi pour gérer les connexions à la base de + données.

    + +

    Si l'on utilise mod_auth_basic ou + mod_auth_digest, on peut invoquer ce module en + affectant la valeur dbd à la directive AuthBasicProvider ou AuthDigestProvider.

    +
    + +AuthName +AuthType + + AuthBasicProvider + + + AuthDigestProvider + +DBDriver +DBDParams +Formats de mots de +passe + +
    +Performances et mise en cache +

    Certains utilisateurs de l'authentification DBD sous HTTPD 2.2/2.4 ont +signalé une charge problématique au niveau de la base de données. Cela +se produit en général lorsqu'une page HTML contient des centaines d'objets +(comme des images, des scripts, etc...), chacun d'entre eux nécessitant +une authentification. Les utilisateurs qui rencontrent ce genre de +problème peuvent utiliser le module mod_authn_socache +qui permet de mettre les données d'authentification en cache, et +soulager ainsi la base de données de la plus grande partie de la charge.

    +
    + +
    +Exemple de configuration +

    Voici un exemple simple d'utilisation de ce module dans un contexte +d'authentification et de bases de données.

    + +# configuration de mod_dbd +# MISE À JOUR pour inclure la mise en cache de l'authentification +DBDriver pgsql +DBDParams "dbname=apacheauth user=apache password=xxxxxx" + +DBDMin 4 +DBDKeep 8 +DBDMax 20 +DBDExptime 300 + +<Directory "/usr/www/mon-serveur/private"> + # configuration de mod_authn_core et mod_auth_basic + # pour mod_authn_dbd + AuthType Basic + AuthName "Mon serveur" + + # Pour mettre en cache les données d'authentification, placez socache + # avant dbd + AuthBasicProvider socache dbd + + # Aussi nécessaire à la mise en cache : dire au cache de mettre en + # cache les recherches dbd ! + AuthnCacheProvideFor dbd + AuthnCacheContext mon-serveur + + # configuration de mod_authz_core + Require valid-user + + # la requête SQL de mod_authn_dbd pour authentifier un utilisateur + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" +</Directory> + +
    + +
    +Mise à disposition des informations de connexion +

    +Si httpd a été compilé avec la version 1.3.0 ou supérieure de +l'APR, pour chaque requête envoyée au serveur de +base de données, toutes les valeurs de colonnes du premier +enregistrement renvoyé par la requête sont affectées à des variables +d'environnement avec le préfixe "AUTHENTICATE_". +

    +

    Par exemple, si une requête renvoie un nom d'utilisateur, un nom +complet et un numéro de téléphone, un programme CGI pourra accéder à ces +informations sans avoir besoin d'effectuer une deuxième requête vers la +base de données.

    +

    Ceci va entraîner une simplification considérable du code et de la +configuration nécessaire de certaines applications web. +

    +
    + + +AuthDBDUserPWQuery +Requête SQL servant à vérifier le mot de passe d'un +utilisateur +AuthDBDUserPWQuery requête +directory + + + +

    La directive AuthDBDUserPWQuery permet de + spécifier une requête servant à vérifier le mot de passe d'un + utilisateur donné. L'identifiant utilisateur sera transmis comme + paramètre sous forme d'une seule chaîne de caractères lorsque la + requête sera exécutée. Cet identifiant est référencé dans la requête + en utilisant le spécificateur de format %s.

    + +AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" + +

    La première colonne du premier enregistrement renvoyé par la + requête se présentera sous la forme d'une chaîne de caractères + contenant le mot de passe chiffré. Les enregistrements suivants sont + ignorés. Si aucun enregistrement n'est renvoyé, l'utilisateur ne + sera pas authentifié par mod_authn_dbd.

    +

    Si httpd a été compilé avec la version 1.3.0 ou supérieure de + l'APR, toute valeur de colonne supplémentaire + du premier enregistrement renvoyé par la requête sera stockée dans + une variable d'environnement dont le nom aura la forme + AUTHENTICATE_valeur-colonne. +

    +

    Le format du mot de passe chiffré dépend du frontal + d'authentification utilisé (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour + plus de détails.

    +
    +
    + + +AuthDBDUserRealmQuery +Requête SQL servant à vérifier une empreinte de mot de +passe pour un utilisateur et un identifiant d'authentification. + +AuthDBDUserRealmQuery requête +directory + + + +

    La directive AuthDBDUserRealmQuery permet + de spécifier une requête SQL servant à vérifier une empreinte de mot + de passe pour un utilisateur et un identifiant d'authentification + donnés au cours d'un processus d'authentification digest. Les + identifiants de l'utilisateur et de l'authentification + sont passés dans cet ordre comme paramètres à l'exécution de la + requête. Ils sont référencés dans la chaîne de la requête en + utilisant des spécificateurs de format %s.

    + +AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s" + +

    La première colonne du premier enregistrement renvoyé par la + requête se présentera sous la forme d'une chaîne de caractères + contenant le mot de passe chiffré. Les enregistrements suivants + seront ignorés. Si aucun enregistrement n'est renvoyé, l'utilisateur + ne sera pas authentifié par mod_authn_dbd.

    +

    Si httpd a été compilé avec une version 1.3.0 ou supérieure de + l'APR, toute valeur de colonne supplémentaire + du premier enregistrement renvoyé par la requête sera stockée dans + une variable d'environnement avec un nom de la forme + AUTHENTICATE_COLONNE. +

    +

    Le format du mot de passe chiffré dépend du frontal + d'authentification utilisé (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour + plus de détails.

    +
    +
    + + diff --git a/docs/manual/mod/mod_authn_dbd.xml.meta b/docs/manual/mod/mod_authn_dbd.xml.meta index 0822f9d5621..f386804ad02 100644 --- a/docs/manual/mod/mod_authn_dbd.xml.meta +++ b/docs/manual/mod/mod_authn_dbd.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_authn_dbm.html b/docs/manual/mod/mod_authn_dbm.html index e4cb7d7a411..fda22b52262 100644 --- a/docs/manual/mod/mod_authn_dbm.html +++ b/docs/manual/mod/mod_authn_dbm.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_authn_dbm.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_authn_dbm.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_authn_dbm.html.en b/docs/manual/mod/mod_authn_dbm.html.en index f291b478aaa..18b4c380259 100644 --- a/docs/manual/mod/mod_authn_dbm.html.en +++ b/docs/manual/mod/mod_authn_dbm.html.en @@ -1,27 +1,33 @@ - -mod_authn_dbm - Apache HTTP Server +mod_authn_dbm - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_dbm

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -49,7 +55,7 @@
  • AuthDBMType
  • AuthDBMUserFile
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    AuthDBMType Directive

    @@ -75,9 +83,14 @@ store passwords
    Module:mod_authn_dbm

    Sets the type of database file that is used to store the passwords. - The default database type is determined at compile time. The + The default database type is determined at compile time. The availability of other types of database files also depends on - compile-time settings.

    + compile-time settings.

    + +

    For example, in order to enable the support for Berkeley DB + (correspondent to the db type) the + --with-berkeley-db option needs to be added to httpd's + configure to generate the necessary DSO.

    It is crucial that whatever program you use to create your password files is configured to use the same type of database.

    @@ -112,12 +125,12 @@ passwords for authentication

    The encrypted password format depends on which authentication - frontend (e.g. mod_authn_basic or - mod_authn_digest) is being used. See Password Formats for + frontend (e.g. mod_auth_basic or + mod_auth_digest) is being used. See Password Formats for more information.

    Important compatibility note: The implementation of - dbmopen in the apache modules reads the string length of + dbmopen in the Apache modules reads the string length of the hashed values from the DBM data structures, rather than relying upon the string being NULL-appended. Some applications, such as the Netscape web server, rely upon the string being @@ -128,15 +141,39 @@ passwords for authentication

    A perl script called dbmmanage is included with Apache. This program can be used to create and update DBM - format password files for use with this module.

    + format password files for use with this module. Another + tool for maintaining the DBM files is the included program + htdbm.

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbm.html.fr b/docs/manual/mod/mod_authn_dbm.html.fr new file mode 100644 index 00000000000..33fa970a163 --- /dev/null +++ b/docs/manual/mod/mod_authn_dbm.html.fr @@ -0,0 +1,188 @@ + + + + + +mod_authn_dbm - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authn_dbm

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    + + + + +
    Description:Authentification utilisateur utilisant des fichiers +DBM
    Statut:Extension
    IdentificateurdeModule:authn_dbm_module
    FichierSource:mod_authn_dbm.c
    Compatibilit:Disponible depuis les versions 2.1 et suprieures +d'Apache
    +

    Sommaire

    + +

    Ce module permet aux frontaux comme + mod_auth_digest et mod_auth_basic + d'authentifier les utilisateurs en les recherchant dans des fichiers + de mots de passe dbm. mod_authn_file + fournit une fonctionnalit similaire.

    + +

    Lorsqu'on utilise mod_auth_basic ou + mod_auth_digest, ce module est invoqu en affectant + la valeur dbm la directive AuthBasicProvider ou AuthDigestProvider.

    +
    + + +
    top
    +

    Directive AuthDBMType

    + + + + + + + + +
    Description:Dfinit le type de fichier de base de donnes utilis pour +stocker les mots de passe
    Syntaxe:AuthDBMType default|SDBM|GDBM|NDBM|DB
    Dfaut:AuthDBMType default
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_dbm
    +

    Cette directive permet de dfinir le type de fichier de base de + donnes utilis pour stocker les mots de passe. Le type de base de + donnes par dfaut est dfini la compilation. La liste des autres + types de bases de donnes disponibles dpend aussi de la configuration de la + compilation.

    + +

    Par exemple, pour activer le support de Berkeley DB (correspondant au + type db), il faut ajouter l'option + --with-berkeley-db la ligne de commande configure de httpd + pour gnrer le DSO appropri.

    + +

    Il est impratif que le programme que vous utilisez pour crer + vos fichiers de mots de passe soit configur pour utiliser le mme + type de base de donnes.

    + +
    +
    top
    +

    Directive AuthDBMUserFile

    + + + + + + + +
    Description:Dfinit le nom d'un fichier de base de donnes pour +l'authentification contenant la liste +des utilisateurs et de leurs mots de passe
    Syntaxe:AuthDBMUserFile chemin-fichier
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authn_dbm
    +

    La directive AuthDBMUserFile permet de + dfinir le nom d'un fichier de base de donnes pour + l'authentification contenant la liste des utilisateurs et de leurs + mots de passe. chemin-fichier doit tre un chemin absolu + vers le fichier de base de donnes.

    + +

    La cl du fichier de base de donnes est le nom de l'utilisateur. + La valeur associe est le mot de passe chiffr, ventuellement suivi + par un ':' et des donnes arbitraires. Ce ':' ainsi que les donnes + arbitraires qui suivent seront ignores par le serveur.

    + +

    Scurit :

    +

    Faites en sorte que le fichier spcifi par la directive + AuthDBMUserFile soit stock en dehors de + l'arborescence des documents du serveur web ; en particulier, ne + l'enregistrez pas dans le rpertoire qu'il protge, faute + de quoi, les clients auraient la possibilit de + tlcharger le fichier des mots de passe.

    +
    + +

    Le format de mot de passe chiffr dpend du frontal + d'authentification utilis (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de + passe pour plus de dtails.

    + +

    Note importante concernant la compatibilit : l'implmentation de + dbmopen dans les modules d'Apache lit la longueur de la + chane correspondant aux donnes chiffres dans la structure des + donnes DBM, plutt que de calculer cette longueur en se basant sur + le caractre nul final. Certaines applications par contre, comme le + serveur web Netscape, calculent cette longueur en se basant sur + le caractre nul final ; par consquent, si vous rencontrez des + difficults en changeant des fichiers DBM entre plusieurs + applications, le problme peut ventuellement s'expliquer par cette + diffrence d'implmentation.

    + +

    Un script perl nomm dbmmanage est fourni avec + Apache. On peut utiliser ce programme pour crer et mettre jour + les fichiers de mots de passe au format DBM que ce module + utilise. Il existe galement un autre outil pour grer les fichiers DBM, + inclus dans le programme htdbm.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbm.html.ja.utf8 b/docs/manual/mod/mod_authn_dbm.html.ja.utf8 index c992e0ca1f9..5a921501654 100644 --- a/docs/manual/mod/mod_authn_dbm.html.ja.utf8 +++ b/docs/manual/mod/mod_authn_dbm.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_authn_dbm - Apache HTTP サーバ +mod_authn_dbm - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authn_dbm

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -52,7 +59,7 @@
  • AuthDBMType
  • AuthDBMUserFile
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    AuthDBMType ディレクティブ

    @@ -129,10 +136,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbm.html.ko.euc-kr b/docs/manual/mod/mod_authn_dbm.html.ko.euc-kr index 63a14e502b8..09a9d4a09c1 100644 --- a/docs/manual/mod/mod_authn_dbm.html.ko.euc-kr +++ b/docs/manual/mod/mod_authn_dbm.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_authn_dbm - Apache HTTP Server +mod_authn_dbm - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authn_dbm

    @@ -49,7 +55,7 @@
  • AuthDBMType
  • AuthDBMUserFile
  • -

    +

    Bugfix checklist

    +
  • Comments
  • top

    AuthDBMType þ

    @@ -123,9 +129,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_dbm.xml b/docs/manual/mod/mod_authn_dbm.xml index 37989c3be0c..c2af23217b2 100644 --- a/docs/manual/mod/mod_authn_dbm.xml +++ b/docs/manual/mod/mod_authn_dbm.xml @@ -51,6 +51,8 @@ AuthDigestProvider +htpasswd +htdbmPassword Formats @@ -81,13 +83,13 @@ passwords for authentication

    The encrypted password format depends on which authentication - frontend (e.g. mod_authn_basic or - mod_authn_digest) is being used. See mod_auth_basic or + mod_auth_digest) is being used. See Password Formats for more information.

    Important compatibility note: The implementation of - dbmopen in the apache modules reads the string length of + dbmopen in the Apache modules reads the string length of the hashed values from the DBM data structures, rather than relying upon the string being NULL-appended. Some applications, such as the Netscape web server, rely upon the string being @@ -98,7 +100,9 @@ passwords for authentication

    A perl script called dbmmanage is included with Apache. This program can be used to create and update DBM - format password files for use with this module.

    + format password files for use with this module. Another + tool for maintaining the DBM files is the included program + htdbm.

    @@ -114,9 +118,14 @@ store passwords

    Sets the type of database file that is used to store the passwords. - The default database type is determined at compile time. The + The default database type is determined at compile time. The availability of other types of database files also depends on - compile-time settings.

    + compile-time settings.

    + +

    For example, in order to enable the support for Berkeley DB + (correspondent to the db type) the + --with-berkeley-db option needs to be added to httpd's + configure to generate the necessary DSO.

    It is crucial that whatever program you use to create your password files is configured to use the same type of database.

    diff --git a/docs/manual/mod/mod_authn_dbm.xml.fr b/docs/manual/mod/mod_authn_dbm.xml.fr new file mode 100644 index 00000000000..5075a41f662 --- /dev/null +++ b/docs/manual/mod/mod_authn_dbm.xml.fr @@ -0,0 +1,149 @@ + + + + + + + + + + + +mod_authn_dbm +Authentification utilisateur utilisant des fichiers +DBM +Extension +mod_authn_dbm.c +authn_dbm_module +Disponible depuis les versions 2.1 et supérieures +d'Apache + + +

    Ce module permet aux frontaux comme + mod_auth_digest et mod_auth_basic + d'authentifier les utilisateurs en les recherchant dans des fichiers + de mots de passe dbm. mod_authn_file + fournit une fonctionnalité similaire.

    + +

    Lorsqu'on utilise mod_auth_basic ou + mod_auth_digest, ce module est invoqué en affectant + la valeur dbm à la directive AuthBasicProvider ou AuthDigestProvider.

    +
    + +AuthName +AuthType + + AuthBasicProvider + + + AuthDigestProvider + +htpasswd +htdbm +Formats de mots de +passe + + +AuthDBMUserFile +Définit le nom d'un fichier de base de données pour +l'authentification contenant la liste +des utilisateurs et de leurs mots de passe +AuthDBMUserFile chemin-fichier +directory.htaccess + +AuthConfig + + +

    La directive AuthDBMUserFile permet de + définir le nom d'un fichier de base de données pour + l'authentification contenant la liste des utilisateurs et de leurs + mots de passe. chemin-fichier doit être un chemin absolu + vers le fichier de base de données.

    + +

    La clé du fichier de base de données est le nom de l'utilisateur. + La valeur associée est le mot de passe chiffré, éventuellement suivi + par un ':' et des données arbitraires. Ce ':' ainsi que les données + arbitraires qui suivent seront ignorées par le serveur.

    + + Sécurité : +

    Faites en sorte que le fichier spécifié par la directive + AuthDBMUserFile soit stocké en dehors de + l'arborescence des documents du serveur web ; en particulier, ne + l'enregistrez pas dans le répertoire qu'il protège, faute + de quoi, les clients auraient la possibilité de + télécharger le fichier des mots de passe.

    +
    + +

    Le format de mot de passe chiffré dépend du frontal + d'authentification utilisé (par exemple + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de + passe pour plus de détails.

    + +

    Note importante concernant la compatibilité : l'implémentation de + dbmopen dans les modules d'Apache lit la longueur de la + chaîne correspondant aux données chiffrées dans la structure des + données DBM, plutôt que de calculer cette longueur en se basant sur + le caractère nul final. Certaines applications par contre, comme le + serveur web Netscape, calculent cette longueur en se basant sur + le caractère nul final ; par conséquent, si vous rencontrez des + difficultés en échangeant des fichiers DBM entre plusieurs + applications, le problème peut éventuellement s'expliquer par cette + différence d'implémentation.

    + +

    Un script perl nommé dbmmanage est fourni avec + Apache. On peut utiliser ce programme pour créer et mettre à jour + les fichiers de mots de passe au format DBM que ce module + utilise. Il existe également un autre outil pour gérer les fichiers DBM, + inclus dans le programme htdbm.

    +
    +
    + + +AuthDBMType +Définit le type de fichier de base de données utilisé pour +stocker les mots de passe +AuthDBMType default|SDBM|GDBM|NDBM|DB +AuthDBMType default +directory.htaccess + +AuthConfig + + +

    Cette directive permet de définir le type de fichier de base de + données utilisé pour stocker les mots de passe. Le type de base de + données par défaut est défini à la compilation. La liste des autres + types de bases de données disponibles dépend aussi de la configuration de la + compilation.

    + +

    Par exemple, pour activer le support de Berkeley DB (correspondant au + type db), il faut ajouter l'option + --with-berkeley-db à la ligne de commande configure de httpd + pour générer le DSO approprié.

    + +

    Il est impératif que le programme que vous utilisez pour créer + vos fichiers de mots de passe soit configuré pour utiliser le même + type de base de données.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_authn_dbm.xml.ja b/docs/manual/mod/mod_authn_dbm.xml.ja index c3d81dc6644..985e831fff2 100644 --- a/docs/manual/mod/mod_authn_dbm.xml.ja +++ b/docs/manual/mod/mod_authn_dbm.xml.ja @@ -1,7 +1,7 @@ - + + -mod_authn_file - Apache HTTP Server +mod_authn_file - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_file

    @@ -48,7 +53,7 @@ -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    AuthUserFile Directive

    @@ -84,11 +89,11 @@ passwords for authentication use the first occurrence to verify the password.

    The encrypted password format depends on which authentication - frontend (e.g. mod_authn_basic or - mod_authn_digest) is being used. See Password Formats for + frontend (e.g. mod_auth_basic or + mod_auth_digest) is being used. See Password Formats for more information.

    -

    For mod_authn_basic, use the utility htpasswd +

    For mod_auth_basic, use the utility htpasswd which is installed as part of the binary distribution, or which can be found in src/support. See the man page for more details. @@ -113,7 +118,7 @@ passwords for authentication inefficient; AuthDBMUserFile should be used instead.

    -

    For mod_authn_digest, use htdigest +

    For mod_auth_digest, use htdigest instead. Note that you cannot mix user data for Digest Authentication and Basic Authentication within the same file.

    @@ -132,7 +137,28 @@ passwords for authentication  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_file.html.fr b/docs/manual/mod/mod_authn_file.html.fr index 88ed5eae5b5..05cb4159e94 100644 --- a/docs/manual/mod/mod_authn_file.html.fr +++ b/docs/manual/mod/mod_authn_file.html.fr @@ -1,23 +1,28 @@ - -mod_authn_file - Serveur Apache HTTP +mod_authn_file - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authn_file

    @@ -49,7 +54,7 @@ d'Apache
    説明:DBM ファイルを用いたユーザ認証
    ステータス:Extension
    モジュール識別子:authn_dbm_module
    -

    Voir aussi

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top
    -

    AuthUserFile Directive

    +

    Directive AuthUserFile

    Chaque ligne du fichier des utilisateurs se compose du nom de l'utilisateur, du caractre ':' et du mot de passe chiffr. Si le mme identifiant utilisateur est rfrenc plusieurs fois, - mod_authn_file utilisera la premire occurence pour + mod_authn_file utilisera la premire occurrence pour vrifier le mot de passe.

    Le format du mot de passe chiffr dpend du frontal d'authentification utilis (par exemple - mod_authn_basic ou - mod_authn_digest). Voir la documentation sur les + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour plus de dtails.

    -

    Pour mod_authn_basic, utilisez le programme +

    Pour mod_auth_basic, utilisez le programme htpasswd fourni avec la distribution binaire, mais que vous trouverez aussi dans le rpertoire src/support de l'arborescence des sources. Voir sa page de manuel pour plus de @@ -120,7 +125,7 @@ passe trs longue ; dans ce cas, il vaut mieux utiliser les fichiers DBM avec la directive AuthDBMUserFile.

    -

    Pour mod_authn_digest, vous devez utiliser +

    Pour mod_auth_digest, vous devez utiliser le programme htdigest. Notez que vous ne pouvez pas mlanger des donnes utilisateur pour l'Authentification HTTP base de condens et des donnes pour @@ -141,7 +146,28 @@ passe  fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_file.html.ja.utf8 b/docs/manual/mod/mod_authn_file.html.ja.utf8 index c659e580dd4..efcae5a6f60 100644 --- a/docs/manual/mod/mod_authn_file.html.ja.utf8 +++ b/docs/manual/mod/mod_authn_file.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_authn_file - Apache HTTP サーバ +mod_authn_file - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authn_file

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Dfinit le nom d'un fichier texte pour l'authentification contenant la liste des utilisateurs et de leurs mots de @@ -85,17 +90,17 @@ passe
    @@ -52,7 +58,7 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    AuthUserFile ディレクティブ

    @@ -137,11 +143,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_file.html.ko.euc-kr b/docs/manual/mod/mod_authn_file.html.ko.euc-kr index 1c1baa60548..4b976d1b44b 100644 --- a/docs/manual/mod/mod_authn_file.html.ko.euc-kr +++ b/docs/manual/mod/mod_authn_file.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_authn_file - Apache HTTP Server +mod_authn_file - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authn_file

    @@ -49,7 +54,7 @@ -

    +

    Bugfix checklist

    +
  • Comments
  • top

    AuthUserFile þ

    @@ -125,7 +130,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_file.xml b/docs/manual/mod/mod_authn_file.xml index dd530946ff0..84bc2e6fd7c 100644 --- a/docs/manual/mod/mod_authn_file.xml +++ b/docs/manual/mod/mod_authn_file.xml @@ -73,12 +73,12 @@ passwords for authentication use the first occurrence to verify the password.

    The encrypted password format depends on which authentication - frontend (e.g. mod_authn_basic or - mod_authn_digest) is being used. See mod_auth_basic or + mod_auth_digest) is being used. See Password Formats for more information.

    -

    For mod_authn_basic, use the utility htpasswd +

    For mod_auth_basic, use the utility htpasswd which is installed as part of the binary distribution, or which can be found in src/support. See the man page for more details. @@ -104,7 +104,7 @@ passwords for authentication module="mod_authn_dbm">AuthDBMUserFile should be used instead.

    -

    For mod_authn_digest, use htdigest +

    For mod_auth_digest, use htdigest instead. Note that you cannot mix user data for Digest Authentication and Basic Authentication within the same file.

    diff --git a/docs/manual/mod/mod_authn_file.xml.fr b/docs/manual/mod/mod_authn_file.xml.fr index c02eab0567a..4e60f29fe7d 100644 --- a/docs/manual/mod/mod_authn_file.xml.fr +++ b/docs/manual/mod/mod_authn_file.xml.fr @@ -1,7 +1,7 @@ - + @@ -79,17 +79,17 @@ passe

    Chaque ligne du fichier des utilisateurs se compose du nom de l'utilisateur, du caractère ':' et du mot de passe chiffré. Si le même identifiant utilisateur est référencé plusieurs fois, - mod_authn_file utilisera la première occurence pour + mod_authn_file utilisera la première occurrence pour vérifier le mot de passe.

    Le format du mot de passe chiffré dépend du frontal d'authentification utilisé (par exemple - mod_authn_basic ou - mod_authn_digest). Voir la documentation sur les + mod_auth_basic ou + mod_auth_digest). Voir la documentation sur les Formats de mots de passe pour plus de détails.

    -

    Pour mod_authn_basic, utilisez le programme +

    Pour mod_auth_basic, utilisez le programme htpasswd fourni avec la distribution binaire, mais que vous trouverez aussi dans le répertoire src/support de l'arborescence des sources. Voir sa avec la directive AuthDBMUserFile.

    -

    Pour mod_authn_digest, vous devez utiliser +

    Pour mod_auth_digest, vous devez utiliser le programme htdigest. Notez que vous ne pouvez pas mélanger des données utilisateur pour l'Authentification HTTP à base de condensé et des données pour diff --git a/docs/manual/mod/mod_authn_file.xml.ja b/docs/manual/mod/mod_authn_file.xml.ja index bcf8af726a0..6ea3d29703a 100644 --- a/docs/manual/mod/mod_authn_file.xml.ja +++ b/docs/manual/mod/mod_authn_file.xml.ja @@ -1,7 +1,7 @@ - + + -mod_authn_socache - Apache HTTP Server +mod_authn_socache - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authn_socache

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    説明:テキストファイルを用いたユーザ認証
    ステータス:Base
    モジュール識別子:authn_file_module
    @@ -34,7 +40,12 @@ the load on backends

    Maintains a cache of authentication credentials, so that a new backend lookup is not required for every authenticated request.

    -
    top

    Authentication Cacheing

    @@ -81,18 +89,19 @@ the load on backends

    A simple usage example to accelerate mod_authn_dbd using dbm as a cache engine:

    -
    -    <Directory /usr/www/myhost/private>
    -        AuthType Basic
    -        AuthName "Cached Authentication Example"
    -        AuthBasicProvider socache dbd
    -        AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    -        AuthnCacheProvideFor dbd
    -        AuthnCacheContext dbd-authn-example
    -        AuthnCacheSOCache dbm
    -        Require valid-user
    -    </Directory>
    -    
    +
    #AuthnCacheSOCache is optional.  If specified, it is server-wide
    +AuthnCacheSOCache dbm
    +<Directory "/usr/www/myhost/private">
    +    AuthType Basic
    +    AuthName "Cached Authentication Example"
    +    AuthBasicProvider socache dbd
    +    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    +    AuthnCacheProvideFor dbd
    +    Require valid-user
    +    #Optional
    +    AuthnCacheContext dbd-authn-example
    +</Directory>
    +
    top

    Cacheing with custom modules

    @@ -168,26 +177,28 @@ the load on backends

    For example, to cache credentials found by mod_authn_dbd or by a custom provider myprovider, but leave those looked up by lightweight providers like file or dbm lookup alone:

    -

    - AuthnCacheProvideFor dbd myprovider -

    +
    AuthnCacheProvideFor dbd myprovider
    +
    top
    Description:Manages a cache of authentication credentials to relieve the load on backends
    - + +
    Description:Select socache backend provider to use
    Syntax:AuthnCacheSOCache provider-name
    Syntax:AuthnCacheSOCache provider-name[:provider-args]
    Context:server config
    Override:None
    Status:Base
    Module:mod_authn_socache
    Compatibility:Optional provider arguments are available in +Apache HTTP Server 2.4.7 and later

    This is a server-wide setting to select a provider for the - shared object cache. - Values are "dbm", "dc", "mc", or "shmcb", each subject to the - appropriate module being loaded. If not set, your platform's - default will be used.

    + shared object cache, followed by + optional arguments for that provider. + Some possible values for provider-name are "dbm", "dc", + "memcache", or "shmcb", each subject to the appropriate module + being loaded. If not set, your platform's default will be used.

    top
    @@ -217,8 +228,30 @@ the load on backends
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_socache.html.fr b/docs/manual/mod/mod_authn_socache.html.fr new file mode 100644 index 00000000000..9e4e25344a5 --- /dev/null +++ b/docs/manual/mod/mod_authn_socache.html.fr @@ -0,0 +1,286 @@ + + + + + +mod_authn_socache - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authn_socache

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Gre un cache des donnes d'authentification pour diminuer +la charge des serveurs d'arrire-plan
    Statut:Base
    IdentificateurdeModule:authn_socache_module
    FichierSource:mod_authn_socache.c
    Compatibilit:Versions 2.3 et ultrieures
    +

    Sommaire

    + +

    Maintient un cache des donnes d'authentification pour limiter + les sollicitations du serveur d'arrire-plan.

    +
    + +
    top
    +
    +

    Mise en cache des donnes d'authentification

    +

    Certains utilisateurs qui mettent oeuvre une authentification + lourde s'appuyant par exemple sur des requtes SQL + (mod_authn_dbd) ont signal une charge induite + inacceptable sur leur fournisseur d'authentification. Cela se + produit typiquement dans le cas o une page HTML contient des + centaines d'objets (images, scripts, pages de styles, media, + etc...), et o une requte pour cette page gnre des centaines de + sous-requtes effet immdiat pour des contenus supplmentaires + authentifis.

    +

    Pour rsoudre ce problme, mod_authn_socache fournit une solution + qui permet de maintenir un cache des donnes d'authentification.

    +
    top
    +
    +

    Utilisation

    +

    Le cache d'authentification doit tre utilis lorsque les + requtes d'authentification induisent une charge significative sur le + serveur, le serveur d'arrire-plan ou le rseau. Cette mise en cache + n'apportera probablement aucune amlioration dans le cas d'une + authentification base de fichier (mod_authn_file) + ou de base de donnes dbm (mod_authn_dbm) car ces + mthodes sont de par leur conception rapides et lgres (la mise en + cache peut cependant s'avrer utile dans le cas o le fichier est + situ sur un montage rseau). Les fournisseurs d'authentification + bass sur SQL ou LDAP ont plus de chances de tirer parti de cette + mise en cache, en particulier lorsqu'un problme de performances est + dtect. mod_authnz_ldap grant son propre cache, + seul mod_authn_dbd est concern par notre sujet.

    +

    Les principales rgles appliquer pour la mise en cache sont :

    +
    1. Inclure le fournisseur pour lequel vous voulez effectuer une + mise en cache dans une directive + AuthnCacheProvideFor.
    2. +
    3. Mettre socache avant le fournisseur pour lequel + vous voulez effectuer une mise en cache dans votre directive + AuthBasicProvider + ou AuthDigestProvider.
    4. +
    +

    Voici un exemple simple permettant d'acclrer + mod_authn_dbd et utilisant dbm comme moteur de la + mise en cache :

    +
        #AuthnCacheSOCache est optionnel. S'il est dfini, il l'est pour
    +    #l'ensemble du serveur
    +AuthnCacheSOCache dbm
    +<Directory "/usr/www/myhost/private">
    +    AuthType Basic
    +    AuthName "Cached Authentication Example"
    +    AuthBasicProvider socache dbd
    +    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    +    AuthnCacheProvideFor dbd
    +    Require valid-user
    +    #Optionnel
    +    AuthnCacheContext dbd-authn-example
    +</Directory>
    + +
    top
    +
    +

    La mise en cache avec les modules tiers

    +

    Les dveloppeurs de modules doivent savoir que la mise en cache + avec mod_authn_socache doit tre active dans leurs modules. La + fonction de l'API ap_authn_cache_store permet de + mettre en cache les donnes d'authentification qu'un fournisseur + vient de rechercher ou de gnrer. Vous trouverez des exemples + d'utilisation r957072, o trois fournisseurs authn sont activs pour la mise + en cache.

    +
    +
    top
    +

    Directive AuthnCacheContext

    + + + + + + + +
    Description:Spcifie une chane de contexte utiliser dans la cl du +cache
    Syntaxe:AuthnCacheContext directory|server|chane-personnalise
    Dfaut:directory
    Contexte:rpertoire
    Statut:Base
    Module:mod_authn_socache
    +

    Cette directive permet de spcifier une chane utiliser avec le + nom d'utilisateur fourni (et le domaine d'authentification - realm - + dans le cas d'une authentification base de condenss) lors de la + construction d'une cl de cache. Ceci permet de lever l'ambigut + entre plusieurs noms d'utilisateurs identiques servant diffrentes + zones d'authentification sur le serveur.

    +

    Il y a deux valeurs spciales pour le paramtre : directory, + qui utilise le contexte de rpertoire de la requte comme chane, et + server, qui utilise le nom du serveur virtuel.

    +

    La valeur par dfaut est directory, qui est aussi la + dfinition la plus courante. Ceci est cependant loin d'tre optimal, + car par exemple, $app-base, $app-base/images, + $app-base/scripts et $app-base/media + possderont chacun leur propre cl de cache. Il est prfrable + d'utiliser le fournisseur de mot de passe : par exemple un fichier + htpasswd ou une table de base de donnes.

    +

    Les contextes peuvent tre partags entre diffrentes zones du + serveur, o les donnes d'authentification sont partages. Ceci est + cependant susceptible de crer des trous de scurit de type + cross-site ou cross-application, et cette directive n'est donc pas + disponible dans les contextes .htaccess.

    + +
    +
    top
    +

    Directive AuthnCacheEnable

    + + + + + + + +
    Description:Active la mise en cache de l'authentification en tout +endroit
    Syntaxe:AuthnCacheEnable
    Contexte:configuration du serveur
    AllowOverride:None
    Statut:Base
    Module:mod_authn_socache
    +

    Normalement, cette directive n'est pas ncessaire : l'activation + est implicite si la mise en cache de l'authentification a t + active en tout autre endroit du fichier httpd.conf. Par + contre, si cette mise en cache n'a pas t active, par dfaut, elle + ne sera pas initialise, et ne sera donc pas disponible dans un + contexte de fichier .htaccess. Cette directive permet + d'tre sr que la mise en cache a bien t active et pourra + donc tre utilise dans les fichiers .htaccess.

    + +
    +
    top
    +

    Directive AuthnCacheProvideFor

    + + + + + + + + +
    Description:Spcifie le fournisseur pour lequel on veut effectuer une +mise en cache
    Syntaxe:AuthnCacheProvideFor fournisseur-authn [...]
    Dfaut:None
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authn_socache
    +

    Cette directive permet de spcifier un ou plusieurs fournisseurs + pour le(s)quel(s) on veut effectuer une mise en cache. Les donnes + d'authentification trouves par un fournisseur non spcifi dans une + directive AuthnCacheProvideFor ne seront pas mises en cache.

    + +

    Par exemple, pour mettre en cache les donnes d'authentification + trouves par mod_authn_dbd ou par un fournisseur + personnalis mon-fournisseur, et ne pas mettre en cache + celles trouves par les fournisseurs lgers comme file ou dbm :

    +
    AuthnCacheProvideFor dbd mon-fournisseur
    + + +
    +
    top
    +

    Directive AuthnCacheSOCache

    + + + + + + + + +
    Description:Slectionne le fournisseur socache d'arrire-plan +utiliser
    Syntaxe:AuthnCacheSOCache nom-fournisseur[:arguments-fournisseur]
    Contexte:configuration du serveur
    AllowOverride:None
    Statut:Base
    Module:mod_authn_socache
    Compatibilit:Les arguments optionnels du fournisseur sont disponibles + partir de la version 2.4.7 du serveur HTTP Apache
    +

    Cette dfinition s'applique l'ensemble du serveur et permet de + slectionner un fournisseur pour le cache + d'objets partags, ainsi que des arguments ventuels pour ce + fournisseur. Les fournisseurs disponibles sont, entre autres, "dbm", + "dc", "memcache", ou "shmcb", chacun d'entre eux ncessitant le chargement + du module appropri. Si elle est + absente, c'est la valeur par dfaut pour votre plate-forme qui sera + utilise.

    + +
    +
    top
    +

    Directive AuthnCacheTimeout

    + + + + + + + + +
    Description:Dfinit une dure de vie pour les entres du cache
    Syntaxe:AuthnCacheTimeout dure-de-vie (secondes)
    Dfaut:300 (5 minutes)
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authn_socache
    +

    La mise en cache des donnes d'authentification peut constituer + un trou de scurit, bien qu'un mise en cache de courte dure ne + posera probablement pas de problme. En gnral, il est conseill de + conserver les entres du cache de faon ce que la charge du serveur + d'arrire-plan reste normale, mais pas plus longtemps ; + une dure de vie plus longue peut tre paramtre si les + changements d'utilisateurs et de mots de passe sont peu frquents. + La dure de vie par dfaut de 300 secondes (5 minutes) est la fois + raisonnable et suffisamment importante pour rduire la charge d'un + serveur d'arrire-plan comme dbd (requtes SQL).

    +

    Cette dure de vie ne doit pas tre confondue avec la dure de + vie de session qui est un tout autre sujet. Cependant, vous devez + utiliser votre logiciel de gestion de session pour vrifier si les + donnes d'authentification mises en cache peuvent allonger + accidentellement une session, et en tenir compte lorsque vous + dfinissez la dure de vie.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authn_socache.xml b/docs/manual/mod/mod_authn_socache.xml index c9617a7366e..e3718413886 100644 --- a/docs/manual/mod/mod_authn_socache.xml +++ b/docs/manual/mod/mod_authn_socache.xml @@ -69,18 +69,20 @@ the load on backends

    A simple usage example to accelerate mod_authn_dbd using dbm as a cache engine:

    -
    -    <Directory /usr/www/myhost/private>
    -        AuthType Basic
    -        AuthName "Cached Authentication Example"
    -        AuthBasicProvider socache dbd
    -        AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    -        AuthnCacheProvideFor dbd
    -        AuthnCacheContext dbd-authn-example
    -        AuthnCacheSOCache dbm
    -        Require valid-user
    -    </Directory>
    -    
    + +#AuthnCacheSOCache is optional. If specified, it is server-wide +AuthnCacheSOCache dbm +<Directory "/usr/www/myhost/private"> + AuthType Basic + AuthName "Cached Authentication Example" + AuthBasicProvider socache dbd + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" + AuthnCacheProvideFor dbd + Require valid-user + #Optional + AuthnCacheContext dbd-authn-example +</Directory> +
    Cacheing with custom modules @@ -113,16 +115,19 @@ the load on backends AuthnCacheSOCache Select socache backend provider to use -AuthnCacheSOCache provider-name +AuthnCacheSOCache provider-name[:provider-args] server config None +Optional provider arguments are available in +Apache HTTP Server 2.4.7 and later

    This is a server-wide setting to select a provider for the - shared object cache. - Values are "dbm", "dc", "mc", or "shmcb", each subject to the - appropriate module being loaded. If not set, your platform's - default will be used.

    + shared object cache, followed by + optional arguments for that provider. + Some possible values for provider-name are "dbm", "dc", + "memcache", or "shmcb", each subject to the appropriate module + being loaded. If not set, your platform's default will be used.

    @@ -142,9 +147,9 @@ the load on backends

    For example, to cache credentials found by mod_authn_dbd or by a custom provider myprovider, but leave those looked up by lightweight providers like file or dbm lookup alone:

    - - AuthnCacheProvideFor dbd myprovider - + +AuthnCacheProvideFor dbd myprovider + diff --git a/docs/manual/mod/mod_authn_socache.xml.fr b/docs/manual/mod/mod_authn_socache.xml.fr new file mode 100644 index 00000000000..b0d20326cef --- /dev/null +++ b/docs/manual/mod/mod_authn_socache.xml.fr @@ -0,0 +1,239 @@ + + + + + + + + + + + +mod_authn_socache +Gère un cache des données d'authentification pour diminuer +la charge des serveurs d'arrière-plan +Base +mod_authn_socache.c +authn_socache_module +Versions 2.3 et ultérieures + + +

    Maintient un cache des données d'authentification pour limiter + les sollicitations du serveur d'arrière-plan.

    +
    + +
    Mise en cache des données d'authentification +

    Certains utilisateurs qui mettent oeuvre une authentification + lourde s'appuyant par exemple sur des requêtes SQL + (mod_authn_dbd) ont signalé une charge induite + inacceptable sur leur fournisseur d'authentification. Cela se + produit typiquement dans le cas où une page HTML contient des + centaines d'objets (images, scripts, pages de styles, media, + etc...), et où une requête pour cette page génère des centaines de + sous-requêtes à effet immédiat pour des contenus supplémentaires + authentifiés.

    +

    Pour résoudre ce problème, mod_authn_socache fournit une solution + qui permet de maintenir un cache des données d'authentification.

    +
    + +
    Utilisation +

    Le cache d'authentification doit être utilisé lorsque les + requêtes d'authentification induisent une charge significative sur le + serveur, le serveur d'arrière-plan ou le réseau. Cette mise en cache + n'apportera probablement aucune amélioration dans le cas d'une + authentification à base de fichier (mod_authn_file) + ou de base de données dbm (mod_authn_dbm) car ces + méthodes sont de par leur conception rapides et légères (la mise en + cache peut cependant s'avérer utile dans le cas où le fichier est + situé sur un montage réseau). Les fournisseurs d'authentification + basés sur SQL ou LDAP ont plus de chances de tirer parti de cette + mise en cache, en particulier lorsqu'un problème de performances est + détecté. mod_authnz_ldap gérant son propre cache, + seul mod_authn_dbd est concerné par notre sujet.

    +

    Les principales règles à appliquer pour la mise en cache sont :

    +
    1. Inclure le fournisseur pour lequel vous voulez effectuer une + mise en cache dans une directive + AuthnCacheProvideFor.
    2. +
    3. Mettre socache avant le fournisseur pour lequel + vous voulez effectuer une mise en cache dans votre directive + AuthBasicProvider + ou AuthDigestProvider.
    4. +
    +

    Voici un exemple simple permettant d'accélérer + mod_authn_dbd et utilisant dbm comme moteur de la + mise en cache :

    + + #AuthnCacheSOCache est optionnel. S'il est défini, il l'est pour + #l'ensemble du serveur +AuthnCacheSOCache dbm +<Directory "/usr/www/myhost/private"> + AuthType Basic + AuthName "Cached Authentication Example" + AuthBasicProvider socache dbd + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" + AuthnCacheProvideFor dbd + Require valid-user + #Optionnel + AuthnCacheContext dbd-authn-example +</Directory> + +
    + +
    La mise en cache avec les modules tiers +

    Les développeurs de modules doivent savoir que la mise en cache + avec mod_authn_socache doit être activée dans leurs modules. La + fonction de l'API ap_authn_cache_store permet de + mettre en cache les données d'authentification qu'un fournisseur + vient de rechercher ou de générer. Vous trouverez des exemples + d'utilisation à r957072, où trois fournisseurs authn sont activés pour la mise + en cache.

    +
    + + +AuthnCacheEnable +Active la mise en cache de l'authentification en tout +endroit +AuthnCacheEnable +server config +None + + +

    Normalement, cette directive n'est pas nécessaire : l'activation + est implicite si la mise en cache de l'authentification a été + activée en tout autre endroit du fichier httpd.conf. Par + contre, si cette mise en cache n'a pas été activée, par défaut, elle + ne sera pas initialisée, et ne sera donc pas disponible dans un + contexte de fichier .htaccess. Cette directive permet + d'être sûr que la mise en cache a bien été activée et pourra + donc être utilisée dans les fichiers .htaccess.

    +
    +
    + + +AuthnCacheSOCache +Sélectionne le fournisseur socache d'arrière-plan à +utiliser +AuthnCacheSOCache nom-fournisseur[:arguments-fournisseur] +server config +None +Les arguments optionnels du fournisseur sont disponibles +à partir de la version 2.4.7 du serveur HTTP Apache + + +

    Cette définition s'applique à l'ensemble du serveur et permet de + sélectionner un fournisseur pour le cache + d'objets partagés, ainsi que des arguments éventuels pour ce + fournisseur. Les fournisseurs disponibles sont, entre autres, "dbm", + "dc", "memcache", ou "shmcb", chacun d'entre eux nécessitant le chargement + du module approprié. Si elle est + absente, c'est la valeur par défaut pour votre plate-forme qui sera + utilisée.

    +
    +
    + + +AuthnCacheProvideFor +Spécifie le fournisseur pour lequel on veut effectuer une +mise en cache +AuthnCacheProvideFor fournisseur-authn [...] +None +directory.htaccess +AuthConfig + + +

    Cette directive permet de spécifier un ou plusieurs fournisseurs + pour le(s)quel(s) on veut effectuer une mise en cache. Les données + d'authentification trouvées par un fournisseur non spécifié dans une + directive AuthnCacheProvideFor ne seront pas mises en cache.

    + +

    Par exemple, pour mettre en cache les données d'authentification + trouvées par mod_authn_dbd ou par un fournisseur + personnalisé mon-fournisseur, et ne pas mettre en cache + celles trouvées par les fournisseurs légers comme file ou dbm :

    + +AuthnCacheProvideFor dbd mon-fournisseur + +
    +
    + + +AuthnCacheTimeout +Définit une durée de vie pour les entrées du cache +AuthnCacheTimeout durée-de-vie (secondes) +300 (5 minutes) +directory.htaccess +AuthConfig + + +

    La mise en cache des données d'authentification peut constituer + un trou de sécurité, bien qu'un mise en cache de courte durée ne + posera probablement pas de problème. En général, il est conseillé de + conserver les entrées du cache de façon à ce que la charge du serveur + d'arrière-plan reste normale, mais pas plus longtemps ; + une durée de vie plus longue peut être paramétrée si les + changements d'utilisateurs et de mots de passe sont peu fréquents. + La durée de vie par défaut de 300 secondes (5 minutes) est à la fois + raisonnable et suffisamment importante pour réduire la charge d'un + serveur d'arrière-plan comme dbd (requêtes SQL).

    +

    Cette durée de vie ne doit pas être confondue avec la durée de + vie de session qui est un tout autre sujet. Cependant, vous devez + utiliser votre logiciel de gestion de session pour vérifier si les + données d'authentification mises en cache peuvent allonger + accidentellement une session, et en tenir compte lorsque vous + définissez la durée de vie.

    +
    +
    + + +AuthnCacheContext +Spécifie une chaîne de contexte à utiliser dans la clé du +cache +AuthnCacheContext directory|server|chaîne-personnalisée +directory +directory + + +

    Cette directive permet de spécifier une chaîne à utiliser avec le + nom d'utilisateur fourni (et le domaine d'authentification - realm - + dans le cas d'une authentification à base de condensés) lors de la + construction d'une clé de cache. Ceci permet de lever l'ambiguïté + entre plusieurs noms d'utilisateurs identiques servant différentes + zones d'authentification sur le serveur.

    +

    Il y a deux valeurs spéciales pour le paramètre : directory, + qui utilise le contexte de répertoire de la requête comme chaîne, et + server, qui utilise le nom du serveur virtuel.

    +

    La valeur par défaut est directory, qui est aussi la + définition la plus courante. Ceci est cependant loin d'être optimal, + car par exemple, $app-base, $app-base/images, + $app-base/scripts et $app-base/media + possèderont chacun leur propre clé de cache. Il est préférable + d'utiliser le fournisseur de mot de passe : par exemple un fichier + htpasswd ou une table de base de données.

    +

    Les contextes peuvent être partagés entre différentes zones du + serveur, où les données d'authentification sont partagées. Ceci est + cependant susceptible de créer des trous de sécurité de type + cross-site ou cross-application, et cette directive n'est donc pas + disponible dans les contextes .htaccess.

    +
    +
    + +
    + diff --git a/docs/manual/mod/mod_authn_socache.xml.meta b/docs/manual/mod/mod_authn_socache.xml.meta index 86c9d0ccafd..cdd1381068f 100644 --- a/docs/manual/mod/mod_authn_socache.xml.meta +++ b/docs/manual/mod/mod_authn_socache.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_authnz_fcgi.html b/docs/manual/mod/mod_authnz_fcgi.html new file mode 100644 index 00000000000..b45dc4a8ae8 --- /dev/null +++ b/docs/manual/mod/mod_authnz_fcgi.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_authnz_fcgi.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_authnz_fcgi.html.en b/docs/manual/mod/mod_authnz_fcgi.html.en new file mode 100644 index 00000000000..131d1630b6e --- /dev/null +++ b/docs/manual/mod/mod_authnz_fcgi.html.en @@ -0,0 +1,564 @@ + + + + + +mod_authnz_fcgi - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_authnz_fcgi

    +
    +

    Available Languages:  en 

    +
    + + + + +
    Description:Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization
    Status:Extension
    ModuleIdentifier:authnz_fcgi_module
    SourceFile:mod_authnz_fcgi.c
    Compatibility:Available in version 2.4.10 and later
    +

    Summary

    + +

    This module allows FastCGI authorizer applications to + authenticate users and authorize access to resources. It supports + generic FastCGI authorizers which participate in a single phase + for authentication and authorization as well as Apache httpd-specific + authenticators and authorizors which participate in one or both + phases.

    + +

    FastCGI authorizers can authenticate using user id and password, + such as for Basic authentication, or can authenticate using arbitrary + mechanisms.

    +
    + +
    top
    +
    +

    Invocation modes

    + +

    The invocation modes for FastCGI authorizers supported by this + module are distinguished by two characteristics, type and + auth mechanism.

    + +

    Type is simply authn for authentication, + authz for authorization, or authnz for + combined authentication and authorization.

    + +

    Auth mechanism refers to the Apache httpd configuration + mechanisms and processing phases, and can be + AuthBasicProvider, Require, or + check_user_id. The first two of these + correspond to the directives used to enable participation in the + appropriate processing phase.

    + +

    Descriptions of each mode:

    + +
    +
    Type authn, mechanism + AuthBasicProvider
    + +
    In this mode, + FCGI_ROLE is set to AUTHORIZER and + FCGI_APACHE_ROLE is set to AUTHENTICATOR. + The application must be defined as provider type authn + using + AuthnzFcgiDefineProvider and enabled with + AuthBasicProvider. + When invoked, the application is + expected to authenticate the client using the provided user id and + password. Example application: + +
    #!/usr/bin/perl
    +use FCGI;
    +my $request = FCGI::Request();
    +while ($request->Accept() >= 0) {
    +    die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR";
    +    die if $ENV{'FCGI_ROLE'}        ne "AUTHORIZER";
    +    die if !$ENV{'REMOTE_PASSWD'};
    +    die if !$ENV{'REMOTE_USER'};
    +
    +    print STDERR "This text is written to the web server error log.\n";
    +
    +    if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &&
    +        $ENV{'REMOTE_PASSWD'} eq "bar" ) {
    +        print "Status: 200\n";
    +        print "Variable-AUTHN_1: authn_01\n";
    +        print "Variable-AUTHN_2: authn_02\n";
    +        print "\n";
    +    }
    +    else {
    +        print "Status: 401\n\n";
    +    }
    +}
    + + + Example configuration: +
    AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/
    +<Location "/protected/">
    +  AuthType Basic
    +  AuthName "Restricted"
    +  AuthBasicProvider FooAuthn
    +  Require ...
    +</Location>
    + +
    + +
    Type authz, mechanism + Require
    +
    In this mode, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is set to + AUTHORIZER. The application must be defined as + provider type authz using + AuthnzFcgiDefineProvider. When invoked, the application + is expected to authorize the client using the provided user id and other + request data. Example application: +
    #!/usr/bin/perl
    +use FCGI;
    +my $request = FCGI::Request();
    +while ($request->Accept() >= 0) {
    +    die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHORIZER";
    +    die if $ENV{'FCGI_ROLE'}        ne "AUTHORIZER";
    +    die if $ENV{'REMOTE_PASSWD'};
    +
    +    print STDERR "This text is written to the web server error log.\n";
    +
    +    if ($ENV{'REMOTE_USER'} eq "foo1") {
    +        print "Status: 200\n";
    +        print "Variable-AUTHZ_1: authz_01\n";
    +        print "Variable-AUTHZ_2: authz_02\n";
    +        print "\n";
    +    }
    +    else {
    +        print "Status: 403\n\n";
    +    }
    +}
    + + + Example configuration: +
    AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/
    +<Location "/protected/">
    +  AuthType ...
    +  AuthName ...
    +  AuthBasicProvider ...
    +  Require FooAuthz
    +</Location>
    + +
    + +
    Type authnz, mechanism + AuthBasicProvider + Require
    + +
    In this mode, which supports the web server-agnostic FastCGI + AUTHORIZER protocol, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is not set. + The application must be defined as provider type authnz + using + AuthnzFcgiDefineProvider. The application is expected to + handle both authentication and authorization in the same invocation + using the user id, password, and other request data. The invocation + occurs during the Apache httpd API authentication phase. If the + application returns 200 and the same provider is invoked during the + authorization phase (via Require), mod_authnz_fcgi + will return success for the authorization phase without invoking the + application. Example application: +
    #!/usr/bin/perl
    +use FCGI;
    +my $request = FCGI::Request();
    +while ($request->Accept() >= 0) {
    +    die if $ENV{'FCGI_APACHE_ROLE'};
    +    die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER";
    +    die if !$ENV{'REMOTE_PASSWD'};
    +    die if !$ENV{'REMOTE_USER'};
    +
    +    print STDERR "This text is written to the web server error log.\n";
    +
    +    if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &&
    +        $ENV{'REMOTE_PASSWD'} eq "bar" &&
    +        $ENV{'REQUEST_URI'} =~ m%/bar/.*%) {
    +        print "Status: 200\n";
    +        print "Variable-AUTHNZ_1: authnz_01\n";
    +        print "Variable-AUTHNZ_2: authnz_02\n";
    +        print "\n";
    +    }
    +    else {
    +        print "Status: 401\n\n";
    +    }
    +}
    + + + Example configuration: +
    AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/
    +<Location "/protected/">
    +  AuthType Basic
    +  AuthName "Restricted"
    +  AuthBasicProvider FooAuthnz
    +  Require FooAuthnz
    +</Location>
    + +
    + +
    Type authn, mechanism + check_user_id
    + +
    In this mode, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is set to + AUTHENTICATOR. The application must be defined as + provider type authn using + AuthnzFcgiDefineProvider. AuthnzFcgiCheckAuthnProvider + specifies when it is called. Example application: +
    #!/usr/bin/perl
    +use FCGI;
    +my $request = FCGI::Request();
    +while ($request->Accept() >= 0) {
    +    die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR";
    +    die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER";
    +
    +    # This authorizer assumes that the RequireBasicAuth option of 
    +    # AuthnzFcgiCheckAuthnProvider is On:
    +    die if !$ENV{'REMOTE_PASSWD'};
    +    die if !$ENV{'REMOTE_USER'};
    +
    +    print STDERR "This text is written to the web server error log.\n";
    +
    +    if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") &&
    +        $ENV{'REMOTE_PASSWD'} eq "bar" ) {
    +        print "Status: 200\n";
    +        print "Variable-AUTHNZ_1: authnz_01\n";
    +        print "Variable-AUTHNZ_2: authnz_02\n";
    +        print "\n";
    +    }
    +    else {
    +        print "Status: 401\n\n";
    +        # If a response body is written here, it will be returned to
    +        # the client.
    +    }
    +}
    + + + Example configuration: +
    AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/
    +<Location "/protected/">
    +  AuthType ...
    +  AuthName ...
    +  AuthnzFcgiCheckAuthnProvider FooAuthn \
    +                               Authoritative On \
    +                               RequireBasicAuth Off \
    +                               UserExpr "%{reqenv:REMOTE_USER}"
    +  Require ...
    +</Location>
    + +
    + +
    + +
    top
    +
    +

    Additional examples

    + +
      +
    1. If your application supports the separate authentication and + authorization roles (AUTHENTICATOR and AUTHORIZER), define + separate providers as follows, even if they map to the same + application: + +
      AuthnzFcgiDefineProvider authn  FooAuthn  fcgi://localhost:10102/
      +AuthnzFcgiDefineProvider authz  FooAuthz  fcgi://localhost:10102/
      + + + Specify the authn provider on + AuthBasicProvider + and the authz provider on + Require: + +
      AuthType Basic
      +AuthName "Restricted"
      +AuthBasicProvider FooAuthn
      +Require FooAuthz
      + +
    2. + +
    3. If your application supports the generic AUTHORIZER role + (authentication and authorizer in one invocation), define a + single provider as follows: + +
      AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/
      + + + Specify the authnz provider on both AuthBasicProvider + and Require: + +
      AuthType Basic
      +AuthName "Restricted"
      +AuthBasicProvider FooAuthnz
      +Require FooAuthnz
      + +
    4. +
    +
    top
    +
    +

    Limitations

    + +

    The following are potential features which are not currently + implemented:

    + +
    +
    Apache httpd access checker
    +
    The Apache httpd API access check phase is a separate + phase from authentication and authorization. Some other FastCGI + implementations implement this phase, which is denoted by the + setting of FCGI_APACHE_ROLE to ACCESS_CHECKER.
    + +
    Local (Unix) sockets or pipes
    +
    Only TCP sockets are currently supported.
    + +
    Support for mod_authn_socache
    +
    mod_authn_socache interaction should be implemented for + applications which participate in Apache httpd-style + authentication.
    + +
    Support for digest authentication using AuthDigestProvider
    +
    This is expected to be a permanent limitation as there is + no authorizer flow for retrieving a hash.
    + +
    Application process management
    +
    This is expected to be permanently out of scope for + this module. Application processes must be controlled by + other means. For example, fcgistarter can be used to + start them.
    + +
    AP_AUTH_INTERNAL_PER_URI
    +
    All providers are currently registered as + AP_AUTH_INTERNAL_PER_CONF, which means that checks are not + performed again for internal subrequests with the same + access control configuration as the initial request.
    + +
    Protocol data charset conversion
    +
    If mod_authnz_fcgi runs in an EBCDIC compilation + environment, all FastCGI protocol data is written in EBCDIC + and expected to be received in EBCDIC.
    + +
    Multiple requests per connection
    +
    Currently the connection to the FastCGI authorizer is + closed after every phase of processing. For example, if the + authorizer handles separate authn and authz + phases then two connections will be used.
    + +
    URI Mapping
    +
    URIs from clients can't be mapped, such as with the + ProxyPass used with FastCGI responders.
    + +
    + +
    top
    +
    +

    Logging

    + +
      +
    1. Processing errors are logged at log level error + and higher.
    2. +
    3. Messages written by the application are logged at log + level warn.
    4. +
    5. General messages for debugging are logged at log level + debug.
    6. +
    7. Environment variables passed to the application are + logged at log level trace2. The value of the + REMOTE_PASSWD variable will be obscured, + but any other sensitive data will be visible in the + log.
    8. +
    9. All I/O between the module and the FastCGI application, + including all environment variables, will be logged in printable + and hex format at log level trace5. All + sensitive data will be visible in the log.
    10. +
    + +

    LogLevel can be used + to configure a log level specific to mod_authnz_fcgi. For + example:

    + +
    LogLevel info authnz_fcgi:trace8
    + + +
    +
    top
    +

    AuthnzFcgiCheckAuthnProvider Directive

    + + + + + + + +
    Description:Enables a FastCGI application to handle the check_authn +authentication hook.
    Syntax:AuthnzFcgiCheckAuthnProvider provider-name|None +option ...
    Default:none
    Context:directory
    Status:Extension
    Module:mod_authnz_fcgi
    +

    This directive is used to enable a FastCGI authorizer to + handle a specific processing phase of authentication or + authorization.

    + +

    Some capabilities of FastCGI authorizers require enablement + using this directive instead of + AuthBasicProvider:

    + +
      +
    • Non-Basic authentication; generally, determining the user + id of the client and returning it from the authorizer; see the + UserExpr option below
    • +
    • Selecting a custom response code; for a non-200 response + from the authorizer, the code from the authorizer will be the + status of the response
    • +
    • Setting the body of a non-200 response; if the authorizer + provides a response body with a non-200 response, that body + will be returned to the client; up to 8192 bytes of text are + supported
    • +
    + +
    +
    provider-name
    +
    This is the name of a provider defined with + AuthnzFcgiDefineProvider.
    + +
    None
    +
    Specify None to disable a provider enabled + with this directive in an outer scope, such as in a parent + directory.
    + +
    option
    +
    The following options are supported: + +
    +
    Authoritative On|Off (default On)
    +
    This controls whether or not other modules are allowed + to run when this module has a FastCGI authorizer configured + and it fails the request.
    + +
    DefaultUser userid
    +
    When the authorizer returns success and UserExpr + is configured and evaluates to an empty string (e.g., authorizer + didn't return a variable), this value will be used as the user + id. This is typically used when the authorizer has a concept of + guest, or unauthenticated, users and guest users are mapped to + some specific user id for logging and other purposes.
    + +
    RequireBasicAuth On|Off (default Off)
    +
    This controls whether or not Basic auth is required + before passing the request to the authorizer. If required, + the authorizer won't be invoked without a user id and + password; 401 will be returned for a request without that.
    + +
    UserExpr expr (no default)
    +
    When Basic authentication isn't provided by the client + and the authorizer determines the user, this expression, + evaluated after calling the authorizer, determines the + user. The expression follows + ap_expr syntax and must resolve to a string. A typical + use is to reference a Variable-XXX + setting returned by the authorizer using an option like + UserExpr "%{reqenv:XXX}". If + this option is specified and the user id can't be retrieved + using the expression after a successful authentication, the + request will be rejected with a 500 error.
    + +
    +
    +
    + +
    +
    top
    +

    AuthnzFcgiDefineProvider Directive

    + + + + + + + +
    Description:Defines a FastCGI application as a provider for +authentication and/or authorization
    Syntax:AuthnzFcgiDefineProvider type provider-name +backend-address
    Default:none
    Context:server config
    Status:Extension
    Module:mod_authnz_fcgi
    +

    This directive is used to define a FastCGI application as + a provider for a particular phase of authentication or + authorization.

    + +
    +
    type
    +
    This must be set to authn for authentication, + authz for authorization, or authnz for + a generic FastCGI authorizer which performs both checks.
    + +
    provider-name
    +
    This is used to assign a name to the provider which is + used in other directives such as + AuthBasicProvider + and + Require.
    + +
    backend-address
    +
    This specifies the address of the application, in the form + fcgi://hostname:port/. The application process(es) + must be managed independently, such as with + fcgistarter.
    +
    + +
    +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authnz_fcgi.xml b/docs/manual/mod/mod_authnz_fcgi.xml new file mode 100644 index 00000000000..5c225abdad0 --- /dev/null +++ b/docs/manual/mod/mod_authnz_fcgi.xml @@ -0,0 +1,529 @@ + + + + + + + + + +mod_authnz_fcgi +Allows a FastCGI authorizer application to handle Apache +httpd authentication and authorization +Extension +mod_authnz_fcgi.c +authnz_fcgi_module +Available in version 2.4.10 and later + + +

    This module allows FastCGI authorizer applications to + authenticate users and authorize access to resources. It supports + generic FastCGI authorizers which participate in a single phase + for authentication and authorization as well as Apache httpd-specific + authenticators and authorizors which participate in one or both + phases.

    + +

    FastCGI authorizers can authenticate using user id and password, + such as for Basic authentication, or can authenticate using arbitrary + mechanisms.

    +
    + +Authentication, Authorization, +and Access Control +mod_auth_basic +fcgistarter +mod_proxy_fcgi + +
    Invocation modes + +

    The invocation modes for FastCGI authorizers supported by this + module are distinguished by two characteristics, type and + auth mechanism.

    + +

    Type is simply authn for authentication, + authz for authorization, or authnz for + combined authentication and authorization.

    + +

    Auth mechanism refers to the Apache httpd configuration + mechanisms and processing phases, and can be + AuthBasicProvider, Require, or + check_user_id. The first two of these + correspond to the directives used to enable participation in the + appropriate processing phase.

    + +

    Descriptions of each mode:

    + +
    +
    Type authn, mechanism + AuthBasicProvider
    + +
    In this mode, + FCGI_ROLE is set to AUTHORIZER and + FCGI_APACHE_ROLE is set to AUTHENTICATOR. + The application must be defined as provider type authn + using + AuthnzFcgiDefineProvider and enabled with + AuthBasicProvider. + When invoked, the application is + expected to authenticate the client using the provided user id and + password. Example application: + + +#!/usr/bin/perl +use FCGI; +my $request = FCGI::Request(); +while ($request->Accept() >= 0) { + die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR"; + die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER"; + die if !$ENV{'REMOTE_PASSWD'}; + die if !$ENV{'REMOTE_USER'}; + + print STDERR "This text is written to the web server error log.\n"; + + if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") && + $ENV{'REMOTE_PASSWD'} eq "bar" ) { + print "Status: 200\n"; + print "Variable-AUTHN_1: authn_01\n"; + print "Variable-AUTHN_2: authn_02\n"; + print "\n"; + } + else { + print "Status: 401\n\n"; + } +} + + + Example configuration: + +AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ +<Location "/protected/"> + AuthType Basic + AuthName "Restricted" + AuthBasicProvider FooAuthn + Require ... +</Location> + +
    + +
    Type authz, mechanism + Require
    +
    In this mode, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is set to + AUTHORIZER. The application must be defined as + provider type authz using + AuthnzFcgiDefineProvider. When invoked, the application + is expected to authorize the client using the provided user id and other + request data. Example application: + +#!/usr/bin/perl +use FCGI; +my $request = FCGI::Request(); +while ($request->Accept() >= 0) { + die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHORIZER"; + die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER"; + die if $ENV{'REMOTE_PASSWD'}; + + print STDERR "This text is written to the web server error log.\n"; + + if ($ENV{'REMOTE_USER'} eq "foo1") { + print "Status: 200\n"; + print "Variable-AUTHZ_1: authz_01\n"; + print "Variable-AUTHZ_2: authz_02\n"; + print "\n"; + } + else { + print "Status: 403\n\n"; + } +} + + + Example configuration: + +AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/ +<Location "/protected/"> + AuthType ... + AuthName ... + AuthBasicProvider ... + Require FooAuthz +</Location> + +
    + +
    Type authnz, mechanism + AuthBasicProvider + Require
    + +
    In this mode, which supports the web server-agnostic FastCGI + AUTHORIZER protocol, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is not set. + The application must be defined as provider type authnz + using + AuthnzFcgiDefineProvider. The application is expected to + handle both authentication and authorization in the same invocation + using the user id, password, and other request data. The invocation + occurs during the Apache httpd API authentication phase. If the + application returns 200 and the same provider is invoked during the + authorization phase (via Require), mod_authnz_fcgi + will return success for the authorization phase without invoking the + application. Example application: + +#!/usr/bin/perl +use FCGI; +my $request = FCGI::Request(); +while ($request->Accept() >= 0) { + die if $ENV{'FCGI_APACHE_ROLE'}; + die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER"; + die if !$ENV{'REMOTE_PASSWD'}; + die if !$ENV{'REMOTE_USER'}; + + print STDERR "This text is written to the web server error log.\n"; + + if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") && + $ENV{'REMOTE_PASSWD'} eq "bar" && + $ENV{'REQUEST_URI'} =~ m%/bar/.*%) { + print "Status: 200\n"; + print "Variable-AUTHNZ_1: authnz_01\n"; + print "Variable-AUTHNZ_2: authnz_02\n"; + print "\n"; + } + else { + print "Status: 401\n\n"; + } +} + + + Example configuration: + +AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ +<Location "/protected/"> + AuthType Basic + AuthName "Restricted" + AuthBasicProvider FooAuthnz + Require FooAuthnz +</Location> + +
    + +
    Type authn, mechanism + check_user_id
    + +
    In this mode, FCGI_ROLE is set to + AUTHORIZER and FCGI_APACHE_ROLE is set to + AUTHENTICATOR. The application must be defined as + provider type authn using + AuthnzFcgiDefineProvider. AuthnzFcgiCheckAuthnProvider + specifies when it is called. Example application: + +#!/usr/bin/perl +use FCGI; +my $request = FCGI::Request(); +while ($request->Accept() >= 0) { + die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR"; + die if $ENV{'FCGI_ROLE'} ne "AUTHORIZER"; + + # This authorizer assumes that the RequireBasicAuth option of + # AuthnzFcgiCheckAuthnProvider is On: + die if !$ENV{'REMOTE_PASSWD'}; + die if !$ENV{'REMOTE_USER'}; + + print STDERR "This text is written to the web server error log.\n"; + + if ( ($ENV{'REMOTE_USER' } eq "foo" || $ENV{'REMOTE_USER'} eq "foo1") && + $ENV{'REMOTE_PASSWD'} eq "bar" ) { + print "Status: 200\n"; + print "Variable-AUTHNZ_1: authnz_01\n"; + print "Variable-AUTHNZ_2: authnz_02\n"; + print "\n"; + } + else { + print "Status: 401\n\n"; + # If a response body is written here, it will be returned to + # the client. + } +} + + + Example configuration: + +AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/ +<Location "/protected/"> + AuthType ... + AuthName ... + AuthnzFcgiCheckAuthnProvider FooAuthn \ + Authoritative On \ + RequireBasicAuth Off \ + UserExpr "%{reqenv:REMOTE_USER}" + Require ... +</Location> + +
    + +
    + +
    + +
    Additional examples + +
      +
    1. If your application supports the separate authentication and + authorization roles (AUTHENTICATOR and AUTHORIZER), define + separate providers as follows, even if they map to the same + application: + + +AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ +AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10102/ + + + Specify the authn provider on + AuthBasicProvider + and the authz provider on + Require: + + +AuthType Basic +AuthName "Restricted" +AuthBasicProvider FooAuthn +Require FooAuthz + +
    2. + +
    3. If your application supports the generic AUTHORIZER role + (authentication and authorizer in one invocation), define a + single provider as follows: + + +AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ + + + Specify the authnz provider on both AuthBasicProvider + and Require: + + +AuthType Basic +AuthName "Restricted" +AuthBasicProvider FooAuthnz +Require FooAuthnz + +
    4. +
    +
    + +
    Limitations + +

    The following are potential features which are not currently + implemented:

    + +
    +
    Apache httpd access checker
    +
    The Apache httpd API access check phase is a separate + phase from authentication and authorization. Some other FastCGI + implementations implement this phase, which is denoted by the + setting of FCGI_APACHE_ROLE to ACCESS_CHECKER.
    + +
    Local (Unix) sockets or pipes
    +
    Only TCP sockets are currently supported.
    + +
    Support for mod_authn_socache
    +
    mod_authn_socache interaction should be implemented for + applications which participate in Apache httpd-style + authentication.
    + +
    Support for digest authentication using AuthDigestProvider
    +
    This is expected to be a permanent limitation as there is + no authorizer flow for retrieving a hash.
    + +
    Application process management
    +
    This is expected to be permanently out of scope for + this module. Application processes must be controlled by + other means. For example, fcgistarter can be used to + start them.
    + +
    AP_AUTH_INTERNAL_PER_URI
    +
    All providers are currently registered as + AP_AUTH_INTERNAL_PER_CONF, which means that checks are not + performed again for internal subrequests with the same + access control configuration as the initial request.
    + +
    Protocol data charset conversion
    +
    If mod_authnz_fcgi runs in an EBCDIC compilation + environment, all FastCGI protocol data is written in EBCDIC + and expected to be received in EBCDIC.
    + +
    Multiple requests per connection
    +
    Currently the connection to the FastCGI authorizer is + closed after every phase of processing. For example, if the + authorizer handles separate authn and authz + phases then two connections will be used.
    + +
    URI Mapping
    +
    URIs from clients can't be mapped, such as with the + ProxyPass used with FastCGI responders.
    + +
    + +
    + +
    Logging + +
      +
    1. Processing errors are logged at log level error + and higher.
    2. +
    3. Messages written by the application are logged at log + level warn.
    4. +
    5. General messages for debugging are logged at log level + debug.
    6. +
    7. Environment variables passed to the application are + logged at log level trace2. The value of the + REMOTE_PASSWD variable will be obscured, + but any other sensitive data will be visible in the + log.
    8. +
    9. All I/O between the module and the FastCGI application, + including all environment variables, will be logged in printable + and hex format at log level trace5. All + sensitive data will be visible in the log.
    10. +
    + +

    LogLevel can be used + to configure a log level specific to mod_authnz_fcgi. For + example:

    + + +LogLevel info authnz_fcgi:trace8 + + +
    + + +AuthnzFcgiDefineProvider +Defines a FastCGI application as a provider for +authentication and/or authorization +AuthnzFcgiDefineProvider type provider-name +backend-address +none +server config + +

    This directive is used to define a FastCGI application as + a provider for a particular phase of authentication or + authorization.

    + +
    +
    type
    +
    This must be set to authn for authentication, + authz for authorization, or authnz for + a generic FastCGI authorizer which performs both checks.
    + +
    provider-name
    +
    This is used to assign a name to the provider which is + used in other directives such as + AuthBasicProvider + and + Require.
    + +
    backend-address
    +
    This specifies the address of the application, in the form + fcgi://hostname:port/. The application process(es) + must be managed independently, such as with + fcgistarter.
    +
    +
    +
    + + +AuthnzFcgiCheckAuthnProvider +Enables a FastCGI application to handle the check_authn +authentication hook. +AuthnzFcgiCheckAuthnProvider provider-name|None +option ... +none +directory + +

    This directive is used to enable a FastCGI authorizer to + handle a specific processing phase of authentication or + authorization.

    + +

    Some capabilities of FastCGI authorizers require enablement + using this directive instead of + AuthBasicProvider:

    + +
      +
    • Non-Basic authentication; generally, determining the user + id of the client and returning it from the authorizer; see the + UserExpr option below
    • +
    • Selecting a custom response code; for a non-200 response + from the authorizer, the code from the authorizer will be the + status of the response
    • +
    • Setting the body of a non-200 response; if the authorizer + provides a response body with a non-200 response, that body + will be returned to the client; up to 8192 bytes of text are + supported
    • +
    + +
    +
    provider-name
    +
    This is the name of a provider defined with + AuthnzFcgiDefineProvider.
    + +
    None
    +
    Specify None to disable a provider enabled + with this directive in an outer scope, such as in a parent + directory.
    + +
    option
    +
    The following options are supported: + +
    +
    Authoritative On|Off (default On)
    +
    This controls whether or not other modules are allowed + to run when this module has a FastCGI authorizer configured + and it fails the request.
    + +
    DefaultUser userid
    +
    When the authorizer returns success and UserExpr + is configured and evaluates to an empty string (e.g., authorizer + didn't return a variable), this value will be used as the user + id. This is typically used when the authorizer has a concept of + guest, or unauthenticated, users and guest users are mapped to + some specific user id for logging and other purposes.
    + +
    RequireBasicAuth On|Off (default Off)
    +
    This controls whether or not Basic auth is required + before passing the request to the authorizer. If required, + the authorizer won't be invoked without a user id and + password; 401 will be returned for a request without that.
    + +
    UserExpr expr (no default)
    +
    When Basic authentication isn't provided by the client + and the authorizer determines the user, this expression, + evaluated after calling the authorizer, determines the + user. The expression follows + ap_expr syntax and must resolve to a string. A typical + use is to reference a Variable-XXX + setting returned by the authorizer using an option like + UserExpr "%{reqenv:XXX}". If + this option is specified and the user id can't be retrieved + using the expression after a successful authentication, the + request will be rejected with a 500 error.
    + +
    +
    +
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_authnz_fcgi.xml.meta b/docs/manual/mod/mod_authnz_fcgi.xml.meta new file mode 100644 index 00000000000..9ce87949f26 --- /dev/null +++ b/docs/manual/mod/mod_authnz_fcgi.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_authnz_fcgi + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_authnz_ldap.html.en b/docs/manual/mod/mod_authnz_ldap.html.en index 5f5cf1fa1b9..2d3f1aac610 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.en +++ b/docs/manual/mod/mod_authnz_ldap.html.en @@ -1,23 +1,28 @@ - -mod_authnz_ldap - Apache HTTP Server +mod_authnz_ldap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authnz_ldap

    @@ -32,7 +37,7 @@ for HTTP Basic authentication. Compatibility:Available in version 2.1 and later

    Summary

    -

    This module provides authentication front-ends such as +

    This module allows authentication front-ends such as mod_auth_basic to authenticate users through an ldap directory.

    @@ -57,7 +62,20 @@ for HTTP Basic authentication. via the AuthBasicProvider directive with the ldap value.

    -
    top
    top
    +

    General caveats

    +

    This module caches authentication and authorization results based +on the configuration of mod_ldap. Changes +made to the backing LDAP server will not be immediately reflected on the +HTTP Server, including but not limited to user lockouts/revocations, +password changes, or changes to group memberships. Consult the directives +in mod_ldap for details of the cache tunables. +

    +
    top
    +

    Operation

    There are two phases in granting access to a user. The first @@ -347,6 +363,9 @@ for HTTP Basic authentication. ldap-filter. Other authorization types may also be used but may require that additional authorization modules be loaded.

    +

    Since v2.4.8, expressions are supported + within the LDAP require directives.

    +

    Require ldap-user

    The Require ldap-user directive specifies what @@ -363,11 +382,10 @@ for HTTP Basic authentication. ldap://ldap/o=Example?cn (i.e., cn is used for searches), the following Require directives could be used to restrict access:

    -

    -Require ldap-user "Barbara Jenson"
    -Require ldap-user "Fred User"
    -Require ldap-user "Joe Manager"
    -

    +
    Require ldap-user "Barbara Jenson"
    +Require ldap-user "Fred User"
    +Require ldap-user "Joe Manager"
    +

    Because of the way that mod_authnz_ldap handles this directive, Barbara Jenson could sign on as Barbara @@ -379,7 +397,8 @@ Require ldap-user "Joe Manager"

    If the uid attribute was used instead of the cn attribute in the URL above, the above three lines could be condensed to

    -

    Require ldap-user bjenson fuser jmanager

    +
    Require ldap-user bjenson fuser jmanager
    +

    Require ldap-group

    @@ -389,58 +408,54 @@ Require ldap-user "Joe Manager"
    group. Note: Do not surround the group name with quotes. For example, assume that the following entry existed in the LDAP directory:

    -

    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -

    +
    dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example

    The following directive would grant access to both Fred and Barbara:

    -

    Require ldap-group cn=Administrators, o=Example

    +
    Require ldap-group cn=Administrators, o=Example
    +

    Members can also be found within sub-groups of a specified LDAP group if AuthLDAPMaxSubGroupDepth is set to a value greater than 0. For example, assume the following entries exist in the LDAP directory:

    -

    -dn: cn=Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Managers, o=Example
    -uniqueMember: cn=Administrators, o=Example
    -uniqueMember: cn=Users, o=Example
    -
    -dn: cn=Managers, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Bob Ellis, o=Example
    -uniqueMember: cn=Tom Jackson, o=Example
    -
    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    -dn: cn=Users, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Allan Jefferson, o=Example
    -uniqueMember: cn=Paul Tilley, o=Example
    -uniqueMember: cn=Temporary Employees, o=Example
    -
    -dn: cn=Temporary Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Jim Swenson, o=Example
    -uniqueMember: cn=Elliot Rhodes, o=Example
    -

    +
    dn: cn=Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Managers, o=Example
    +uniqueMember: cn=Administrators, o=Example
    +uniqueMember: cn=Users, o=Example
    +
    +dn: cn=Managers, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Bob Ellis, o=Example
    +uniqueMember: cn=Tom Jackson, o=Example
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +
    +dn: cn=Users, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Allan Jefferson, o=Example
    +uniqueMember: cn=Paul Tilley, o=Example
    +uniqueMember: cn=Temporary Employees, o=Example
    +
    +dn: cn=Temporary Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Jim Swenson, o=Example
    +uniqueMember: cn=Elliot Rhodes, o=Example

    The following directives would allow access for Bob Ellis, Tom Jackson, - Barbara Jensen, Fred User, Allan Jefferson, and Paul Tilley but would not + Barbara Jenson, Fred User, Allan Jefferson, and Paul Tilley but would not allow access for Jim Swenson, or Elliot Rhodes (since they are at a sub-group depth of 2):

    -

    -Require ldap-group cn=Employees, o-Example
    -AuthLDAPSubGroupDepth 1
    -

    +
    Require ldap-group cn=Employees, o=Example
    +AuthLDAPMaxSubGroupDepth 1
    +

    Behavior of this directive is modified by the AuthLDAPGroupAttribute, AuthLDAPGroupAttributeIsDN, AuthLDAPMaxSubGroupDepth, AuthLDAPSubGroupAttribute, and AuthLDAPSubGroupClass directives.

    @@ -458,7 +473,8 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to a specific DN:

    -

    Require ldap-dn cn=Barbara Jenson, o=Example

    +
    Require ldap-dn cn=Barbara Jenson, o=Example
    +

    Behavior of this directive is modified by the AuthLDAPCompareDNOnServer directive.

    @@ -474,7 +490,8 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone with the attribute employeeType = active

    -

    Require ldap-attribute employeeType=active

    +
    Require ldap-attribute "employeeType=active"
    +

    Multiple attribute/value pairs can be specified on the same line separated by spaces or they can be specified in multiple @@ -487,7 +504,8 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone with the city attribute equal to "San Jose" or status equal to "Active"

    -

    Require ldap-attribute city="San Jose" status=active

    +
    Require ldap-attribute city="San Jose" "status=active"
    + @@ -501,7 +519,8 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone having a cell phone and is in the marketing department

    -

    Require ldap-filter &(cell=*)(department=marketing)

    +
    Require ldap-filter "&(cell=*)(department=marketing)"
    +

    The difference between the Require ldap-filter directive and the Require ldap-attribute directive is that ldap-filter @@ -521,19 +540,18 @@ AuthLDAPSubGroupDepth 1

  • Grant access to anyone who exists in the LDAP directory, using their UID for searches. -

    -AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    +Require valid-user
    +
  • The next example is the same as above; but with the fields that have useful defaults omitted. Also, note the use of a redundant LDAP server. -

    AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    +Require valid-user
    +
  • @@ -545,19 +563,26 @@ Require valid-user this approach is not recommended: it's a better idea to choose an attribute that is guaranteed unique in your directory, such as uid. -

    -AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    +Require valid-user
    +
  • Grant access to anybody in the Administrators group. The users must authenticate using their UID. -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    -Require ldap-group cn=Administrators, o=Example -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    +Require ldap-group cn=Administrators, o=Example
    + +
  • + +
  • + Grant access to anybody in the group whose name matches the + hostname of the virtual host. In this example an + expression is used to build the filter. +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    +Require ldap-group cn=%{SERVER_NAME}, o=Example
    +
  • @@ -566,10 +591,9 @@ Require ldap-group cn=Administrators, o=Example of qpagePagerID. The example will grant access only to people (authenticated via their UID) who have alphanumeric pagers: -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    -Require valid-user -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    +Require valid-user
    +
  • @@ -582,10 +606,9 @@ Require valid-user a pager, plus grant access to Joe Manager, who doesn't have a pager, but does need to access the same resource:

    -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    -Require valid-user -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    +Require valid-user
    +

    This last may look confusing at first, so it helps to evaluate what the search filter will look like based on who @@ -674,11 +697,10 @@ Require valid-user subtree search for the attribute userPrincipalName, with an empty search root, like so:

    -

    -AuthLDAPBindDN apache@example.com
    -AuthLDAPBindPassword password
    -AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -

    +
    AuthLDAPBindDN apache@example.com
    +AuthLDAPBindPassword password
    +AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub
    +

    Users will need to enter their User Principal Name as a login, in the form somebody@nz.example.com.

    @@ -701,11 +723,10 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub authentication to it is a matter of adding the following directives to every .htaccess file that gets created in the web

    -
    -AuthLDAPURL            "the url"
    -AuthGroupFile mygroupfile
    -Require group mygroupfile
    -
    +
    AuthLDAPURL       "the url"
    +AuthGroupFile     "mygroupfile"
    +Require group     "mygroupfile"
    +

    How It Works

    @@ -752,7 +773,7 @@ Require group mygroupfile
  • The directives must be put in the .htaccess files. Attempting to put them inside <Location> or <Directory> directives won't work. This is because mod_authnz_ldap has to be able to grab - the AuthGroupFile + the AuthGroupFile directive that is found in FrontPage .htaccess files so that it knows where to look for the valid user list. If the mod_authnz_ldap directives aren't in the same @@ -791,7 +812,7 @@ authorization

    AuthLDAPBindAuthoritative Directive

    - + @@ -801,7 +822,7 @@ authorization

    By default, subsequent authentication providers are only queried if a user cannot be mapped to a DN, but not if the user can be mapped to a DN and their password cannot be verified with an LDAP bind. - If AuthLDAPBindAuthoritative + If AuthLDAPBindAuthoritative is set to off, other configured authentication modules will have a chance to validate the user if the LDAP bind (with the current user's credentials) fails for any reason.

    @@ -840,12 +861,27 @@ authorization +
    Description:Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    Syntax:AuthLDAPBindAuthoritativeoff|on
    Syntax:AuthLDAPBindAuthoritative off|on
    Default:AuthLDAPBindAuthoritative on
    Context:directory, .htaccess
    Override:AuthConfig
    Override:AuthConfig
    Status:Extension
    Module:mod_authnz_ldap
    Compatibility:exec: was added in 2.4.5.

    A bind password to use in conjunction with the bind DN. Note that the bind password is probably sensitive data, and should be - properly protected. You should only use the AuthLDAPBindDN and AuthLDAPBindPassword if you + properly protected. You should only use the AuthLDAPBindDN and AuthLDAPBindPassword if you absolutely need them to search the directory.

    +

    If the value begins with exec: the resulting command will be + executed and the first line returned to standard output by the + program will be used as the password.

    +
    #Password used as-is
    +AuthLDAPBindPassword secret
    +
    +#Run /path/to/program to get my password
    +AuthLDAPBindPassword exec:/path/to/program
    +
    +#Run /path/to/otherProgram and provide arguments
    +AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
    + + +
    top

    AuthLDAPCharsetConfig Directive

    @@ -894,7 +930,7 @@ authorization authorization checks use comparisons.

    This directive only has effect on the comparisons performed during - nested group processing when + nested group processing when AuthLDAPSearchAsUser is also enabled.

    This directive should only be used when your LDAP server doesn't @@ -995,7 +1031,7 @@ group membership - + @@ -1010,7 +1046,7 @@ own username, instead of anonymously or with hard-coded credentials for the serv search.

    If the verbatim username can't directly bind, but needs some - cosmetic transformation, see + cosmetic transformation, see AuthLDAPInitialBindPattern.

    This directive should only be used when your LDAP server doesn't @@ -1025,8 +1061,8 @@ own username, instead of anonymously or with hard-coded credentials for the serv

    See also

    @@ -1036,7 +1072,7 @@ own username, instead of anonymously or with hard-coded credentials for the serv
    Description:Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    Syntax:AuthLDAPInitialBindAsUser off|on
    Syntax:AuthLDAPInitialBindAsUser off|on
    Default:AuthLDAPInitialBindAsUser off
    Context:directory, .htaccess
    Override:AuthConfig
    - + @@ -1046,7 +1082,7 @@ to perform a DN lookup
    Description:Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    Syntax:AuthLDAPInitialBindPatternregex substitution
    Syntax:AuthLDAPInitialBindPattern regex substitution
    Default:AuthLDAPInitialBindPattern (.*) $1 (remote username used verbatim)
    Context:directory, .htaccess
    Override:AuthConfig

    If AuthLDAPInitialBindAsUser is set to ON, the basic authentication username will be transformed according to the - regular expression and substituion arguments.

    + regular expression and substitution arguments.

    The regular expression argument is compared against the current basic authentication username. The substitution argument may contain backreferences, but has no other variable interpolation.

    @@ -1056,8 +1092,10 @@ to perform a DN lookup AuthLDAPBindDN.

    -

    AuthLDAPInitialBindPattern (.+) $1@example.com

    -

    AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com

    +
    AuthLDAPInitialBindPattern (.+) $1@example.com
    + +
    AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com
    +

    Not available with authorization-only

    This directive can only be used if this module authenticates the user, and @@ -1086,6 +1124,7 @@ evaluated before the user search is discontinued. Override:AuthConfig Status:Extension Module:mod_authnz_ldap +Compatibility:Available in version 2.3.0 and later

    When this directive is set to a non-zero value X combined with use of the Require ldap-group someGroupDN @@ -1096,6 +1135,15 @@ evaluated before the user search is discontinued.

    See the Require ldap-group section for a more detailed example.

    +

    Nested groups performance

    +

    When AuthLDAPSubGroupAttribute overlaps with + AuthLDAPGroupAttribute (as it does by default and + as required by common LDAP schemas), uncached searching for subgroups in + large groups can be very slow. If you use large, non-nested groups, set + AuthLDAPMaxSubGroupDepth to zero.

    +
    + +
    top

    AuthLDAPRemoteUserAttribute Directive

    @@ -1114,7 +1162,7 @@ query to set the REMOTE_USER environment variable value of the attribute specified. Make sure that this attribute is included in the list of attributes in the AuthLDAPUrl definition, otherwise this directive will have no effect. This directive, if - present, takes precedence over AuthLDAPRemoteUserIsDN. This + present, takes precedence over AuthLDAPRemoteUserIsDN. This directive is useful should you want people to log into a website using an email address, but a backend application expects the username as a userid.

    @@ -1160,7 +1208,7 @@ environment variable checks use searches.

    This directive only has effect on the comparisons performed during - nested group processing when + nested group processing when AuthLDAPCompareAsUser is also enabled.

    This directive should only be used when your LDAP server doesn't @@ -1186,11 +1234,12 @@ are groups. Override:AuthConfig Status:Extension Module:mod_authnz_ldap +Compatibility:Available in version 2.3.0 and later

    An LDAP group object may contain members that are users and members that are groups (called nested or sub groups). The - AuthLDAPSubGroupAttribute directive identifies the - labels of group members and the AuthLDAPGroupAttribute + AuthLDAPSubGroupAttribute directive identifies the + labels of group members and the AuthLDAPGroupAttribute directive identifies the labels of the user members. Multiple attributes can be used by specifying this directive multiple times. If not specified, then mod_authnz_ldap uses the @@ -1208,12 +1257,14 @@ objects that are groups during sub-group processing. Override:AuthConfig Status:Extension Module:mod_authnz_ldap +Compatibility:Available in version 2.3.0 and later

    An LDAP group object may contain members that are users and members that are groups (called nested or sub groups). The - AuthLDAPSubGroupAttribute directive identifies the + AuthLDAPSubGroupAttribute + directive identifies the labels of members that may be sub-groups of the current group - (as opposed to user members). The AuthLDAPSubGroupClass + (as opposed to user members). The AuthLDAPSubGroupClass directive specifies the LDAP objectClass values used in verifying that these potential sub-groups are in fact group objects. Verified sub-groups can then be searched for more user or sub-group members. Multiple @@ -1236,7 +1287,8 @@ objects that are groups during sub-group processing. to use. The syntax of the URL is

    ldap://host:port/basedn?attribute?scope?filter

    If you want to specify more than one LDAP URL that Apache should try in turn, the syntax is:

    -

    AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..."

    +
    AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..."
    +

    Caveat: If you specify multiple servers, you need to enclose the entire URL string in quotes; otherwise you will get an error: "AuthLDAPURL takes one argument, URL to define LDAP connection.." You can of course use search parameters on each of these.

    @@ -1308,7 +1360,9 @@ You can of course use search parameters on each of these.

    will search for all objects in the tree. Filters are limited to approximately 8000 characters (the definition of MAX_STRING_LEN in the Apache source code). This - should be more than sufficient for any application. + should be more than sufficient for any application. In 2.4.10 and later, + the keyword none disables the use of a filter; this is + required by some primitive LDAP servers.

    When doing searches, the attribute, filter and username passed @@ -1338,14 +1392,35 @@ You can of course use search parameters on each of these.

    upgraded to a secure connection on the same port. -

    See above for examples of AuthLDAPURL URLs.

    +

    See above for examples of AuthLDAPUrl URLs.

    Available Languages:  en  |  fr 

    -
    +
  • top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authnz_ldap.html.fr b/docs/manual/mod/mod_authnz_ldap.html.fr index ddd2c638c4e..13be1d5bd76 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.fr +++ b/docs/manual/mod/mod_authnz_ldap.html.fr @@ -1,23 +1,28 @@ - -mod_authnz_ldap - Serveur Apache HTTP +mod_authnz_ldap - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authnz_ldap

    @@ -60,7 +65,22 @@ d'Apache invoqu en affectant la valeur ldap la directive AuthBasicProvider.

    -
    top
    top
    +

    Mises en garde caractre gnral

    +

    Ce module effectue une mise en cache des rsultats du processus +d'authentification et d'autorisation en fonction de la configuration du +module mod_ldap. Les modifications effectues au niveau +du serveur LDAP d'arrire-plan comme les +verrouillages ou rvocations d'utilisateurs, les changements de mot de +passe, ou les changements d'appartenance un groupe (et cette liste +n'est pas exhaustive), ne seront pas immdiatement propages jusqu'au +serveur HTTP. Consultez les directives du module +mod_ldap pour plus de dtails propos de la +configuration de la mise en cache. +

    +
    top
    +

    Mode opratoire

    L'utilisateur se voit accorder l'accs selon un processus en deux @@ -379,6 +399,9 @@ Directory disponibles, sous rserve du chargement de modules d'autorisation supplmentaires.

    +

    Depuis la version 2.4.8, les directives require LDAP supportent + les expressions.

    +

    Require ldap-user

    La directive Require ldap-user permet de spcifier @@ -398,11 +421,10 @@ Directory cn sera utilis pour les recherches), on pourra utiliser les directives Require suivantes pour restreindre l'accs :

    -

    -Require ldap-user "Barbara Jenson"
    -Require ldap-user "Fred User"
    -Require ldap-user "Joe Manager"
    -

    +
    Require ldap-user "Barbara Jenson"
    +Require ldap-user "Fred User"
    +Require ldap-user "Joe Manager"
    +

    De par la manire dont mod_authnz_ldap traite cette directive, Barbara Jenson peut s'authentifier comme @@ -415,7 +437,8 @@ Require ldap-user "Joe Manager"

    Si l'attribut uid avait t spcifi la place de l'attribut cn dans l'URL prcdente, les trois lignes ci-dessus auraient p tre condenses en une seule ligne :

    -

    Require ldap-user bjenson fuser jmanager

    +
    Require ldap-user bjenson fuser jmanager
    +

    Require ldap-group

    @@ -425,59 +448,55 @@ Require ldap-user "Joe Manager"
    DN du groupe LDAP. Note : n'entourez pas le nom du groupe avec des guillemets. Par exemple, supposons que l'entre suivante existe dans l'annuaire LDAP :

    -

    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -

    +
    dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example

    La directive suivante autoriserait alors l'accs Fred et Barbara :

    -

    Require ldap-group cn=Administrators, o=Example

    +
    Require ldap-group cn=Administrators, o=Example
    +

    Les membres peuvent aussi se trouver dans les sous-groupes du groupe LDAP spcifi si la directive AuthLDAPMaxSubGroupDepth a t dfinie une valeur suprieure 0. Par exemple, supposons que les entres suivantes existent dans l'annuaire LDAP :

    -

    -dn: cn=Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Managers, o=Example
    -uniqueMember: cn=Administrators, o=Example
    -uniqueMember: cn=Users, o=Example
    -
    -dn: cn=Managers, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Bob Ellis, o=Example
    -uniqueMember: cn=Tom Jackson, o=Example
    -
    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    -dn: cn=Users, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Allan Jefferson, o=Example
    -uniqueMember: cn=Paul Tilley, o=Example
    -uniqueMember: cn=Temporary Employees, o=Example
    -
    -dn: cn=Temporary Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Jim Swenson, o=Example
    -uniqueMember: cn=Elliot Rhodes, o=Example
    -

    +
    dn: cn=Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Managers, o=Example
    +uniqueMember: cn=Administrators, o=Example
    +uniqueMember: cn=Users, o=Example
    +
    +dn: cn=Managers, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Bob Ellis, o=Example
    +uniqueMember: cn=Tom Jackson, o=Example
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +
    +dn: cn=Users, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Allan Jefferson, o=Example
    +uniqueMember: cn=Paul Tilley, o=Example
    +uniqueMember: cn=Temporary Employees, o=Example
    +
    +dn: cn=Temporary Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Jim Swenson, o=Example
    +uniqueMember: cn=Elliot Rhodes, o=Example

    Les directives suivantes autoriseraient alors l'accs Bob - Ellis, Tom Jackson, Barbara Jensen, Fred User, Allan Jefferson, et + Ellis, Tom Jackson, Barbara Jenson, Fred User, Allan Jefferson, et Paul Tilley, mais l'interdiraient Jim Swenson, ou Elliot Rhodes (car ils sont situs dans un sous-groupe de niveau de profondeur 2) :

    -

    -Require ldap-group cn=Employees, o-Example
    -AuthLDAPSubGroupDepth 1
    -

    +
    Require ldap-group cn=Employees, o=Example
    +AuthLDAPMaxSubGroupDepth 1
    +

    Le comportement de cette directive est modifi par les directives AuthLDAPGroupAttribute, @@ -499,7 +518,8 @@ AuthLDAPSubGroupDepth 1

    La directive suivante accorderait l'accs un DN spcifique :

    -

    Require ldap-dn cn=Barbara Jenson, o=Example

    +
    Require ldap-dn cn=Barbara Jenson, o=Example
    +

    Le comportement ce cette directive est modifi par la directive AuthLDAPCompareDNOnServer.

    @@ -516,7 +536,8 @@ AuthLDAPSubGroupDepth 1

    La directive suivante accorderait l'autorisation d'accs tout utilisateur dont l'attribut employeeType a pour valeur "actif" :

    -

    Require ldap-attribute employeeType=actif

    +
    Require ldap-attribute employeeType=active
    +

    Plusieurs paires attribut/valeur peuvent tre spcifies par une mme directive en les sparant par des espaces, ou en dfinissant @@ -532,7 +553,8 @@ AuthLDAPSubGroupDepth 1
    utilisateur dont l'attribut city aurait pour valeur "San Jose", ou donc l'attribut status aurait pour valeur "actif" :

    -

    Require ldap-attribute city="San Jose" status=actif

    +
    Require ldap-attribute city="San Jose" status=active
    + @@ -548,7 +570,8 @@ AuthLDAPSubGroupDepth 1
    utilisateur possdant un tlphone cellulaire et faisant partie du dpartement "marketing" :

    -

    Require ldap-filter &(cell=*)(department=marketing)

    +
    Require ldap-filter &(cell=*)(department=marketing)
    +

    Alors que la directive Require ldap-attribute se contente d'une simple comparaison d'attributs, la directive @@ -571,19 +594,18 @@ AuthLDAPSubGroupDepth 1
    Accorde l'autorisation d'accs tout utilisateur prsent dans l'annuaire LDAP, en utilisant son UID pour effectuer la recherche : -

    -AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    +Require valid-user
    +
  • L'exemple suivant est similaire au prcdent, mais les champs dont les valeurs par dfaut conviennent sont omis. Notez aussi la prsence d'un annuaire LDAP redondant : -

    AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    +Require valid-user
    +
  • @@ -596,20 +618,28 @@ Require valid-user approche n'est pas recommande : il est prfrable de choisir un attribut de votre annuaire dont l'unicit soit garantie, comme uid. -

    -AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    -Require valid-user -

    +
    AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    +Require valid-user
    +
  • Accorde l'autorisation d'accs tout utilisateur appartenant au groupe Administrateurs. Les utilisateurs doivent s'authentifier en utilisant leur UID : -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    -Require ldap-group cn=Administrators, o=Example -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    +Require ldap-group cn=Administrators, o=Example
    + +
  • + +
  • + Accorde l'accs tout utilisateur appartenant au groupe dont le + nom correspond au nom d'hte du serveur virtuel. Dans cet exemple, + on utilise une expression pour + construire le filtre. +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    +Require ldap-group cn=%{SERVER_NAME}, o=Example
    +
  • @@ -618,10 +648,9 @@ Require ldap-group cn=Administrators, o=Example attribut LDAP qpagePagerID. Seuls ces utilisateurs (authentifis via leur UID) se verront accorder l'autorisation d'accs : -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    -Require valid-user -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    +Require valid-user
    +
  • @@ -634,10 +663,9 @@ Require valid-user tout utilisateur disposant d'un bippeur ainsi qu' Joe Manager qui ne possde pas de bippeur, mais doit tout de mme pouvoir accder la ressource :

    -

    -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    -Require valid-user -

    +
    AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    +Require valid-user
    +

    Ce dernier exemple peut sembler confus au premier abord ; en fait, il permet de mieux comprendre quoi doit ressembler le @@ -740,11 +768,10 @@ Directory l'attribut userPrincipalName, avec une base de recherche vide, comme suit :

    -

    -AuthLDAPBindDN apache@example.com
    -AuthLDAPBindPassword password
    -AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -

    +
    AuthLDAPBindDN apache@example.com
    +AuthLDAPBindPassword password
    +AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub
    +

    Les utilisateurs devront s'authentifier en entrant leur UPN, de la formeuntel@nz.example.com.

    @@ -768,11 +795,10 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub l'authentification LDAP consiste ajouter les directives suivantes chaque fichier .htaccess qui sera cr dans le site web :

    -
    -AuthLDAPURL            "l'url"
    -AuthGroupFile mon-fichier-de-groupes
    -Require group mon-fichier-de-groupes
    -
    +
    AuthLDAPURL       "the url"
    +AuthGroupFile     "mygroupfile"
    +Require group     "mygroupfile"
    +

    Comment a marche

    @@ -824,7 +850,7 @@ Require group mon-fichier-de-groupes placez dans une section <Location> ou <Directory>. Ceci est d au fait que pour savoir o se trouve la liste des utilisateurs valides, mod_authnz_ldap doit tre en mesure d'atteindre - la directive AuthGroupFile qui se trouve + la directive AuthGroupFile qui se trouve dans les fichiers .htaccess de FrontPage. Si les directives de mod_authnz_ldap ne sont pas situes dans le mme fichier .htaccess que les directives FrontPage, @@ -837,7 +863,7 @@ Require group mon-fichier-de-groupes
  • top
    -

    AuthLDAPAuthorizePrefix Directive

    +

    Directive AuthLDAPAuthorizePrefix

    @@ -864,13 +890,13 @@ durant la phase d'autorisation
    top
    -
    Description:Spcifie le prfixe ajout aux variables d'environnement durant la phase d'autorisation
    - + @@ -881,7 +907,7 @@ DN. si un utilisateur ne possde pas de DN, mais ne le sont pas si l'utilisateur possde un DN et si son mot de passe ne peut pas tre vrifi lors d'une connexion au serveur LDAP. Si la directive - AuthLDAPBindAuthoritative est + AuthLDAPBindAuthoritative est dfinie off, d'autres modules d'authentification configurs auront une chance de valider le mot de passe de l'utilisateur si la tentative de connexion au serveur LDAP choue @@ -900,7 +926,7 @@ DN.
    top
    -
    Description:Dtermine si l'on doit utiliser d'autres fournisseurs d'authentification lorsque le serveur ne peut pas valider les donnes d'authentification de l'utilisateur, alors que ce dernier possde un DN.
    Syntaxe:AuthLDAPBindAuthoritativeoff|on
    Syntaxe:AuthLDAPBindAuthoritative off|on
    Dfaut:AuthLDAPBindAuthoritative on
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    @@ -917,7 +943,7 @@ LDAP
    top
    -
    Description:Un DN optionnel pour se connecter au serveur LDAP
    @@ -926,18 +952,35 @@ connexion +
    Description:Mot de passe utiliser en conjonction avec le DN de connexion
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authnz_ldap
    Compatibilit:exec: est disponible depuis la version 2.4.5 du +serveur HTTP Apache.

    Cette directive permet de spcifier un mot de passe utiliser en conjonction avec le DN de connexion. Notez que ce mot de passe constitue en gnral une donne sensible, et doit donc tre protg de manire approprie. Vous ne devez utiliser les directives - AuthLDAPBindDN et AuthLDAPBindPassword que si + AuthLDAPBindDN et + AuthLDAPBindPassword que si vous en avez vraiment besoin pour effectuer une recherche dans l'annuaire.

    +

    Si la valeur spcifie dbute par "exec:", la commande qui suit sera + excute, et la premire ligne renvoye par la commande sur la + sortie standard sera utilise comme mot de passe.

    +
    # Mot de passe spcifi directement
    +AuthLDAPBindPassword secret
    +
    +# Excution de /path/to/program pour obtenir le mot de passe
    +AuthLDAPBindPassword exec:/path/to/program
    +
    +# Excution de /path/to/otherProgram avec un argument pour obtenir le mot de passe
    +AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"
    + + +
    top
    -

    AuthLDAPCharsetConfig Directive

    +

    Directive AuthLDAPCharsetConfig

    @@ -968,7 +1011,7 @@ langage/jeu de caract
    top
    -
    Description:Chemin du fichier de configuration de la correspondance langage/jeu de caractres
    @@ -1008,7 +1051,7 @@ pour effectuer les comparaisons pour l'attribution des autorisations
    top
    -
    Description:Utilisation des donnes d'authentification de l'utilisateur pour effectuer les comparaisons pour l'attribution des autorisations
    @@ -1032,7 +1075,7 @@ pour effectuer les comparaisons pour l'attribution des autorisations
    top
    -
    Description:Utilise le serveur LDAP pour comparer les DNs
    Syntaxe:AuthLDAPCompareDNOnServer on|off
    @@ -1050,7 +1093,7 @@ alias
    top
    -
    Description: quel moment le module va drfrencer les alias
    @@ -1070,7 +1113,7 @@ utilisateur
    top
    -
    Description:L'attribut LDAP utilis pour vrifier l'appartenance d'un utilisateur un groupe.
    @@ -1094,14 +1137,14 @@ appartenance
    top
    -
    Description:Utilise le DN de l'utilisateur pour vrifier son appartenance un groupe
    - + @@ -1139,12 +1182,12 @@ cod
    top
    -
    Description:Dtermine si le serveur effectue la recherche initiale du DN en utilisant le nom propre de l'utilisateur pour l'authentification de base et non de manire anonyme, ou en utilisant des donnes d'authentification codes en dur pour le serveur
    Syntaxe:AuthLDAPInitialBindAsUser off|on
    Syntaxe:AuthLDAPInitialBindAsUser off|on
    Dfaut:AuthLDAPInitialBindAsUser off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    - + @@ -1168,8 +1211,10 @@ distant utilis utiliser de nom d'utilisateur ddi via la directive AuthLDAPBindDN.

    -

    AuthLDAPInitialBindPattern (.+) $1@example.com

    -

    AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com

    +
    AuthLDAPInitialBindPattern (.+) $1@example.com
    + +
    AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com
    +

    Non disponible dans la cas d'une autorisation seule

    On ne peut utiliser cette directive que si ce module @@ -1190,7 +1235,7 @@ distant utilis
    top
    -
    Description:Spcifie la modification a apporter au nom d'utilisateur pour l'authentification de base lors de l'authentification auprs du serveur LDAP pour effectuer une recherche de DN
    Syntaxe:AuthLDAPInitialBindPatternregex substitution
    Syntaxe:AuthLDAPInitialBindPattern regex substitution
    Dfaut:AuthLDAPInitialBindPattern (.*) $1 (nom de l'utilisateur distant utilis tel quel)
    Contexte:rpertoire, .htaccess
    +
    Description:Spcifie la profondeur d'imbrication des sous-groupes maximale prise en compte avant l'abandon de la recherche de @@ -1201,6 +1246,8 @@ l'utilisateur.
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authnz_ldap
    Compatibilit:Disponible partir de la version 2.3.0 du serveur HTTP +Apache

    Lorsque cette directive est dfinie une valeur X non nulle, en combinaison avec l'utilisation de la directive @@ -1212,9 +1259,20 @@ l'utilisateur.

    Se rfrer la section Require ldap-group pour un exemple plus dtaill.

    +

    Performances dans le cas des groupes imbriqus

    +

    Lorsque les directives + AuthLDAPSubGroupAttribute et + AuthLDAPGroupAttribute se recouvrent (comme + c'est le cas par dfaut et requis par les schmas LDAP courants), la + recherche de sous-groupes au sein de grands groupes peut tre trs + longue. Si vos groupes sont trs grands et non imbriqus, dfinissez + la directive AuthLDAPMaxSubGroupDepth 0.

    +
    + +
    top
    -

    AuthLDAPRemoteUserAttribute Directive

    +

    Directive AuthLDAPRemoteUserAttribute

    spcifi. Assurez-vous que cet attribut soit bien inclus dans la liste d'attributs spcifis dans la dfinition de AuthLDAPUrl ; dans le cas contraire, cette directive n'aurait aucun effet. Si elle est - prsente, cette directive l'emporte sur AuthLDAPRemoteUserIsDN. Elle + prsente, cette directive l'emporte sur AuthLDAPRemoteUserIsDN. Elle peut s'avrer utile par exemple, si vous souhaitez que les utilisateurs se connectent un site web en utilisant leur adresse email, alors qu'une application sous-jacente ncessite un nom @@ -1239,7 +1297,7 @@ d'environnement REMOTE_USER
    top
    -
    Description:Spcifie l'attribut dont la valeur renvoye au cours de la requte de l'utilisateur sera utilise pour dfinir la variable @@ -1231,7 +1289,7 @@ d'environnement REMOTE_USER
    @@ -1258,7 +1316,7 @@ d'environnement REMOTE_USER
    top
    -
    Description:Utilise le DN de l'utilisateur pour dfinir la variable d'environnement REMOTE_USER
    @@ -1298,7 +1356,7 @@ pour la recherche des autorisations
    top
    -
    Description:Utilise les donnes d'authentification de l'utilisateur pour la recherche des autorisations
    +
    Description:Spcifie les noms d'attribut, un par directive, utiliss pour diffrencier les membres du groupe courant qui sont eux-mmes des @@ -1309,21 +1367,23 @@ groupes.
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authnz_ldap
    Compatibilit:Disponible partir de la version 2.3.0 du serveur HTTP +Apache

    Un objet groupe LDAP peut contenir des membres qui sont des utilisateurs et des membres qui sont eux-mmes des groupes (appels sous-groupes ou groupes imbriqus). La directive - AuthLDAPSubGroupAttribute spcifie l'attribut utilis + AuthLDAPSubGroupAttribute spcifie l'attribut utilis pour identifier les groupes, alors que la directive - AuthLDAPGroupAttribute spcifie l'attribut utilis - pour identifier les utilisateurs. On peut spcifier plusieurs - attributs en rptant la directive plusieurs fois. Si elle n'est pas - dfinie, mod_authnz_ldap utilise les attributs - member et uniqueMember.

    + AuthLDAPGroupAttribute + spcifie l'attribut utilis pour identifier les utilisateurs. On peut + spcifier plusieurs attributs en rptant la directive plusieurs fois. Si + elle n'est pas dfinie, mod_authnz_ldap utilise les + attributs member et uniqueMember.

    top
    -

    AuthLDAPSubGroupClass Directive

    +

    Directive AuthLDAPSubGroupClass

    +
    Description:Spcifie quelles valeurs d'objectClass LDAP identifient les objets de l'annuaire qui sont des groupes au cours du traitement des @@ -1334,14 +1394,17 @@ sous-groupes.
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authnz_ldap
    Compatibilit:Disponible partir de la version 2.3.0 du serveur HTTP +Apache

    Un objet groupe LDAP peut contenir des membres qui sont des utilisateurs et des membres qui sont eux-mmes des groupes (appels sous-groupes ou groupes imbriqus). La directive - AuthLDAPSubGroupAttribute permet d'identifier les + AuthLDAPSubGroupAttribute + permet d'identifier les membres qui sont des sous-groupes du groupe courant ( l'oppos des membres utilisateurs). La directive - AuthLDAPSubGroupClass permet de spcifier les valeurs + AuthLDAPSubGroupClass permet de spcifier les valeurs d'objectClass LDAP utilises pour vrifier que certains membres sont en fait des objets groupe. Les sous-groupes ainsi identifis peuvent alors faire l'objet d'une recherche d'autres membres utilisateurs ou @@ -1352,7 +1415,7 @@ sous-groupes.

    top
    -

    AuthLDAPUrl Directive

    +

    Directive AuthLDAPUrl

    @@ -1368,8 +1431,8 @@ recherche LDAP

    ldap://hte:port/DN-de-base?attribut?porte?filtre

    Si vous souhaitez mettre la disposition d'Apache plusieurs URLs LDAP, la syntaxe sera :

    -

    AuthLDAPUrl "ldap://ldap1.example.com -ldap2.example.com/dc=..."

    +
    AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..."
    +

    Mise en garde : Si vous spcifiez plusieurs serveurs, vous devez en entourer la liste avec des guillemets ; dans le cas contraire, vous gnrerez une erreur : "AuthLDAPURL takes one @@ -1453,7 +1516,10 @@ sp taille des filtres est limite environ 8000 caractres (valeur de la macro MAX_STRING_LEN dans le code source d'Apache), ce qui s'avre plus que suffisant pour la plupart des - applications. + applications. Depuis la version 2.4.10, il est possible + d'utiliser le paramtre none pour spcifier qu'aucun filtre + n'est activ ; ce paramtre est obligatoire avec certains + serveurs LDAP primitifs.

    Pour une recherche, les attribut, filtre et nom d'utilisateur @@ -1488,14 +1554,35 @@ sp

    Voir plus haut pour des exemples d'URLs dfinies par la directive - AuthLDAPURL.

    + AuthLDAPUrl.

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authnz_ldap.xml b/docs/manual/mod/mod_authnz_ldap.xml index a07ad318305..a17c14b09d6 100644 --- a/docs/manual/mod/mod_authnz_ldap.xml +++ b/docs/manual/mod/mod_authnz_ldap.xml @@ -31,7 +31,7 @@ for HTTP Basic authentication. Available in version 2.1 and later -

    This module provides authentication front-ends such as +

    This module allows authentication front-ends such as mod_auth_basic to authenticate users through an ldap directory.

    @@ -68,8 +68,8 @@ for HTTP Basic authentication.
    Contents
    +
    General caveats +

    This module caches authentication and authorization results based +on the configuration of mod_ldap. Changes +made to the backing LDAP server will not be immediately reflected on the +HTTP Server, including but not limited to user lockouts/revocations, +password changes, or changes to group memberships. Consult the directives +in mod_ldap for details of the cache tunables. +

    +
    +
    Operation

    There are two phases in granting access to a user. The first @@ -323,6 +333,9 @@ for HTTP Basic authentication. ldap-filter. Other authorization types may also be used but may require that additional authorization modules be loaded.

    +

    Since v2.4.8, expressions are supported + within the LDAP require directives.

    +
    Require ldap-user

    The Require ldap-user directive specifies what @@ -340,11 +353,11 @@ for HTTP Basic authentication. ldap://ldap/o=Example?cn (i.e., cn is used for searches), the following Require directives could be used to restrict access:

    - -Require ldap-user "Barbara Jenson"
    -Require ldap-user "Fred User"
    -Require ldap-user "Joe Manager"
    -
    + +Require ldap-user "Barbara Jenson" +Require ldap-user "Fred User" +Require ldap-user "Joe Manager" +

    Because of the way that mod_authnz_ldap handles this directive, Barbara Jenson could sign on as Barbara @@ -356,7 +369,9 @@ Require ldap-user "Joe Manager"

    If the uid attribute was used instead of the cn attribute in the URL above, the above three lines could be condensed to

    -Require ldap-user bjenson fuser jmanager + +Require ldap-user bjenson fuser jmanager +
    Require ldap-group @@ -366,58 +381,60 @@ Require ldap-user "Joe Manager"
    group. Note: Do not surround the group name with quotes. For example, assume that the following entry existed in the LDAP directory:

    - -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +

    The following directive would grant access to both Fred and Barbara:

    -Require ldap-group cn=Administrators, o=Example + +Require ldap-group cn=Administrators, o=Example +

    Members can also be found within sub-groups of a specified LDAP group if AuthLDAPMaxSubGroupDepth is set to a value greater than 0. For example, assume the following entries exist in the LDAP directory:

    - -dn: cn=Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Managers, o=Example
    -uniqueMember: cn=Administrators, o=Example
    -uniqueMember: cn=Users, o=Example
    -
    -dn: cn=Managers, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Bob Ellis, o=Example
    -uniqueMember: cn=Tom Jackson, o=Example
    -
    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    -dn: cn=Users, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Allan Jefferson, o=Example
    -uniqueMember: cn=Paul Tilley, o=Example
    -uniqueMember: cn=Temporary Employees, o=Example
    -
    -dn: cn=Temporary Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Jim Swenson, o=Example
    -uniqueMember: cn=Elliot Rhodes, o=Example
    -
    +
    +dn: cn=Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Managers, o=Example
    +uniqueMember: cn=Administrators, o=Example
    +uniqueMember: cn=Users, o=Example
    +
    +dn: cn=Managers, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Bob Ellis, o=Example
    +uniqueMember: cn=Tom Jackson, o=Example
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +
    +dn: cn=Users, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Allan Jefferson, o=Example
    +uniqueMember: cn=Paul Tilley, o=Example
    +uniqueMember: cn=Temporary Employees, o=Example
    +
    +dn: cn=Temporary Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Jim Swenson, o=Example
    +uniqueMember: cn=Elliot Rhodes, o=Example
    +

    The following directives would allow access for Bob Ellis, Tom Jackson, - Barbara Jensen, Fred User, Allan Jefferson, and Paul Tilley but would not + Barbara Jenson, Fred User, Allan Jefferson, and Paul Tilley but would not allow access for Jim Swenson, or Elliot Rhodes (since they are at a sub-group depth of 2):

    - -Require ldap-group cn=Employees, o-Example
    -AuthLDAPSubGroupDepth 1
    -
    + +Require ldap-group cn=Employees, o=Example +AuthLDAPMaxSubGroupDepth 1 +

    Behavior of this directive is modified by the AuthLDAPGroupAttribute,

    The following directive would grant access to a specific DN:

    -Require ldap-dn cn=Barbara Jenson, o=Example + +Require ldap-dn cn=Barbara Jenson, o=Example +

    Behavior of this directive is modified by the AuthLDAPCompareDNOnServer @@ -457,7 +476,9 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone with the attribute employeeType = active

    - Require ldap-attribute employeeType=active + +Require ldap-attribute "employeeType=active" +

    Multiple attribute/value pairs can be specified on the same line separated by spaces or they can be specified in multiple @@ -470,7 +491,9 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone with the city attribute equal to "San Jose" or status equal to "Active"

    - Require ldap-attribute city="San Jose" status=active + +Require ldap-attribute city="San Jose" "status=active" +
    @@ -484,7 +507,9 @@ AuthLDAPSubGroupDepth 1

    The following directive would grant access to anyone having a cell phone and is in the marketing department

    - Require ldap-filter &(cell=*)(department=marketing) + +Require ldap-filter "&(cell=*)(department=marketing)" +

    The difference between the Require ldap-filter directive and the Require ldap-attribute directive is that ldap-filter @@ -504,19 +529,20 @@ AuthLDAPSubGroupDepth 1

  • Grant access to anyone who exists in the LDAP directory, using their UID for searches. - -AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    + +AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" Require valid-user -
    +
  • The next example is the same as above; but with the fields that have useful defaults omitted. Also, note the use of a redundant LDAP server. -AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    + +AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" Require valid-user -
    +
  • @@ -528,19 +554,29 @@ Require valid-user this approach is not recommended: it's a better idea to choose an attribute that is guaranteed unique in your directory, such as uid. - -AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    + +AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" Require valid-user -
    +
  • Grant access to anybody in the Administrators group. The users must authenticate using their UID. - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid Require ldap-group cn=Administrators, o=Example -
    + +
  • + +
  • + Grant access to anybody in the group whose name matches the + hostname of the virtual host. In this example an + expression is used to build the filter. + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=%{SERVER_NAME}, o=Example +
  • @@ -549,10 +585,10 @@ Require ldap-group cn=Administrators, o=Example of qpagePagerID. The example will grant access only to people (authenticated via their UID) who have alphanumeric pagers: - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) Require valid-user -
    +
  • @@ -565,10 +601,10 @@ Require valid-user a pager, plus grant access to Joe Manager, who doesn't have a pager, but does need to access the same resource:

    - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) Require valid-user -
    +

    This last may look confusing at first, so it helps to evaluate what the search filter will look like based on who @@ -663,11 +699,11 @@ Require valid-user subtree search for the attribute userPrincipalName, with an empty search root, like so:

    - -AuthLDAPBindDN apache@example.com
    -AuthLDAPBindPassword password
    + +AuthLDAPBindDN apache@example.com +AuthLDAPBindPassword password AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -
    +

    Users will need to enter their User Principal Name as a login, in the form somebody@nz.example.com.

    @@ -690,11 +726,11 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub authentication to it is a matter of adding the following directives to every .htaccess file that gets created in the web

    -
    -AuthLDAPURL            "the url"
    -AuthGroupFile mygroupfile
    -Require group mygroupfile
    -
    + +AuthLDAPURL "the url" +AuthGroupFile "mygroupfile" +Require group "mygroupfile" +
    How It Works @@ -743,7 +779,7 @@ Require group mygroupfile type="section">Location or Directory directives won't work. This is because mod_authnz_ldap has to be able to grab - the AuthGroupFile + the AuthGroupFile directive that is found in FrontPage .htaccess files so that it knows where to look for the valid user list. If the mod_authnz_ldap directives aren't in the same @@ -782,7 +818,7 @@ authorization AuthLDAPBindAuthoritative Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials. -AuthLDAPBindAuthoritativeoff|on +AuthLDAPBindAuthoritative off|on AuthLDAPBindAuthoritative on directory.htaccess @@ -791,7 +827,7 @@ authorization

    By default, subsequent authentication providers are only queried if a user cannot be mapped to a DN, but not if the user can be mapped to a DN and their password cannot be verified with an LDAP bind. - If AuthLDAPBindAuthoritative + If AuthLDAPBindAuthoritative is set to off, other configured authentication modules will have a chance to validate the user if the LDAP bind (with the current user's credentials) fails for any reason.

    @@ -808,7 +844,7 @@ authorization AuthLDAPInitialBindAsUser Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server -AuthLDAPInitialBindAsUser off|on +AuthLDAPInitialBindAsUser off|on AuthLDAPInitialBindAsUser off directory.htaccess @@ -835,8 +871,8 @@ own username, instead of anonymously or with hard-coded credentials for the serv has no effect when this module is used exclusively for authorization. -AuthLDAPInitialBindPattern -AuthLDAPBindDN +AuthLDAPInitialBindPattern +AuthLDAPBindDN AuthLDAPCompareAsUser AuthLDAPSearchAsUser
    @@ -845,7 +881,7 @@ own username, instead of anonymously or with hard-coded credentials for the serv AuthLDAPInitialBindPattern Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup -AuthLDAPInitialBindPatternregex substitution +AuthLDAPInitialBindPattern regex substitution AuthLDAPInitialBindPattern (.*) $1 (remote username used verbatim) directory.htaccess @@ -854,7 +890,7 @@ to perform a DN lookup

    If AuthLDAPInitialBindAsUser is set to ON, the basic authentication username will be transformed according to the - regular expression and substituion arguments.

    + regular expression and substitution arguments.

    The regular expression argument is compared against the current basic authentication username. The substitution argument may contain backreferences, but has no other variable interpolation.

    @@ -864,8 +900,12 @@ to perform a DN lookup AuthLDAPBindDN.

    - AuthLDAPInitialBindPattern (.+) $1@example.com - AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + +AuthLDAPInitialBindPattern (.+) $1@example.com + + +AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + Not available with authorization-only This directive can only be used if this module authenticates the user, and @@ -903,14 +943,30 @@ to perform a DN lookup directory.htaccess AuthConfig +exec: was added in 2.4.5.

    A bind password to use in conjunction with the bind DN. Note that the bind password is probably sensitive data, and should be properly protected. You should only use the AuthLDAPBindDN and AuthLDAPBindPassword if you + >AuthLDAPBindPassword if you absolutely need them to search the directory.

    + +

    If the value begins with exec: the resulting command will be + executed and the first line returned to standard output by the + program will be used as the password.

    + +#Password used as-is +AuthLDAPBindPassword secret + +#Run /path/to/program to get my password +AuthLDAPBindPassword exec:/path/to/program + +#Run /path/to/otherProgram and provide arguments +AuthLDAPBindPassword "exec:/path/to/otherProgram argument1" + +
    @@ -1064,6 +1120,7 @@ evaluated before the user search is discontinued. directory.htaccess AuthConfig +Available in version 2.3.0 and later

    When this directive is set to a non-zero value X @@ -1074,6 +1131,15 @@ evaluated before the user search is discontinued. level X specified by this directive.

    See the Require ldap-group section for a more detailed example.

    + + Nested groups performance +

    When AuthLDAPSubGroupAttribute overlaps with + AuthLDAPGroupAttribute (as it does by default and + as required by common LDAP schemas), uncached searching for subgroups in + large groups can be very slow. If you use large, non-nested groups, set + AuthLDAPMaxSubGroupDepth to zero.

    +
    +
    @@ -1093,7 +1159,8 @@ query to set the REMOTE_USER environment variable value of the attribute specified. Make sure that this attribute is included in the list of attributes in the AuthLDAPUrl definition, otherwise this directive will have no effect. This directive, if - present, takes precedence over AuthLDAPRemoteUserIsDN. This + present, takes precedence over AuthLDAPRemoteUserIsDN. This directive is useful should you want people to log into a website using an email address, but a backend application expects the username as a userid.

    @@ -1161,12 +1228,14 @@ are groups. directory.htaccess AuthConfig +Available in version 2.3.0 and later

    An LDAP group object may contain members that are users and members that are groups (called nested or sub groups). The - AuthLDAPSubGroupAttribute directive identifies the - labels of group members and the AuthLDAPGroupAttribute + AuthLDAPSubGroupAttribute directive identifies the + labels of group members and the AuthLDAPGroupAttribute directive identifies the labels of the user members. Multiple attributes can be used by specifying this directive multiple times. If not specified, then mod_authnz_ldap uses the @@ -1183,13 +1252,15 @@ objects that are groups during sub-group processing. directory.htaccess AuthConfig +Available in version 2.3.0 and later

    An LDAP group object may contain members that are users and members that are groups (called nested or sub groups). The - AuthLDAPSubGroupAttribute directive identifies the + AuthLDAPSubGroupAttribute + directive identifies the labels of members that may be sub-groups of the current group - (as opposed to user members). The AuthLDAPSubGroupClass + (as opposed to user members). The AuthLDAPSubGroupClass directive specifies the LDAP objectClass values used in verifying that these potential sub-groups are in fact group objects. Verified sub-groups can then be searched for more user or sub-group members. Multiple @@ -1212,7 +1283,9 @@ objects that are groups during sub-group processing. to use. The syntax of the URL is

    ldap://host:port/basedn?attribute?scope?filter

    If you want to specify more than one LDAP URL that Apache should try in turn, the syntax is:

    -AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..." + +AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..." +

    Caveat: If you specify multiple servers, you need to enclose the entire URL string in quotes; otherwise you will get an error: "AuthLDAPURL takes one argument, URL to define LDAP connection.." You can of course use search parameters on each of these.

    @@ -1284,7 +1357,9 @@ You can of course use search parameters on each of these.

    will search for all objects in the tree. Filters are limited to approximately 8000 characters (the definition of MAX_STRING_LEN in the Apache source code). This - should be more than sufficient for any application. + should be more than sufficient for any application. In 2.4.10 and later, + the keyword none disables the use of a filter; this is + required by some primitive LDAP servers.

    When doing searches, the attribute, filter and username passed @@ -1315,7 +1390,7 @@ You can of course use search parameters on each of these.

    See above for examples of AuthLDAPURL URLs.

    + module="mod_authnz_ldap">AuthLDAPUrl URLs.

    diff --git a/docs/manual/mod/mod_authnz_ldap.xml.fr b/docs/manual/mod/mod_authnz_ldap.xml.fr index c3c2744c924..c42bf8be2c6 100644 --- a/docs/manual/mod/mod_authnz_ldap.xml.fr +++ b/docs/manual/mod/mod_authnz_ldap.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -72,8 +72,8 @@ d'Apache
    Sommaire
    +
    Mises en garde à caractère général +

    Ce module effectue une mise en cache des résultats du processus +d'authentification et d'autorisation en fonction de la configuration du +module mod_ldap. Les modifications effectuées au niveau +du serveur LDAP d'arrière-plan comme les +verrouillages ou révocations d'utilisateurs, les changements de mot de +passe, ou les changements d'appartenance à un groupe (et cette liste +n'est pas exhaustive), ne seront pas immédiatement propagées jusqu'au +serveur HTTP. Consultez les directives du module +mod_ldap pour plus de détails à propos de la +configuration de la mise en cache. +

    +
    +
    Mode opératoire

    L'utilisateur se voit accorder l'accès selon un processus en deux @@ -361,6 +375,9 @@ d'Apache disponibles, sous réserve du chargement de modules d'autorisation supplémentaires.

    +

    Depuis la version 2.4.8, les directives require LDAP supportent + les expressions.

    +
    Require ldap-user

    La directive Require ldap-user permet de spécifier @@ -381,11 +398,11 @@ d'Apache cn sera utilisé pour les recherches), on pourra utiliser les directives Require suivantes pour restreindre l'accès :

    - -Require ldap-user "Barbara Jenson"
    -Require ldap-user "Fred User"
    -Require ldap-user "Joe Manager"
    -
    + +Require ldap-user "Barbara Jenson" +Require ldap-user "Fred User" +Require ldap-user "Joe Manager" +

    De par la manière dont mod_authnz_ldap traite cette directive, Barbara Jenson peut s'authentifier comme @@ -398,7 +415,9 @@ Require ldap-user "Joe Manager"

    Si l'attribut uid avait été spécifié à la place de l'attribut cn dans l'URL précédente, les trois lignes ci-dessus auraient pû être condensées en une seule ligne :

    -Require ldap-user bjenson fuser jmanager + +Require ldap-user bjenson fuser jmanager +
    Require ldap-group @@ -408,60 +427,62 @@ Require ldap-user "Joe Manager"
    DN du groupe LDAP. Note : n'entourez pas le nom du groupe avec des guillemets. Par exemple, supposons que l'entrée suivante existe dans l'annuaire LDAP :

    - -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +

    La directive suivante autoriserait alors l'accès à Fred et Barbara :

    -Require ldap-group cn=Administrators, o=Example + +Require ldap-group cn=Administrators, o=Example +

    Les membres peuvent aussi se trouver dans les sous-groupes du groupe LDAP spécifié si la directive AuthLDAPMaxSubGroupDepth a été définie à une valeur supérieure à 0. Par exemple, supposons que les entrées suivantes existent dans l'annuaire LDAP :

    - -dn: cn=Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Managers, o=Example
    -uniqueMember: cn=Administrators, o=Example
    -uniqueMember: cn=Users, o=Example
    -
    -dn: cn=Managers, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Bob Ellis, o=Example
    -uniqueMember: cn=Tom Jackson, o=Example
    -
    -dn: cn=Administrators, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Barbara Jenson, o=Example
    -uniqueMember: cn=Fred User, o=Example
    -
    -dn: cn=Users, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Allan Jefferson, o=Example
    -uniqueMember: cn=Paul Tilley, o=Example
    -uniqueMember: cn=Temporary Employees, o=Example
    -
    -dn: cn=Temporary Employees, o=Example
    -objectClass: groupOfUniqueNames
    -uniqueMember: cn=Jim Swenson, o=Example
    -uniqueMember: cn=Elliot Rhodes, o=Example
    -
    +
    +dn: cn=Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Managers, o=Example
    +uniqueMember: cn=Administrators, o=Example
    +uniqueMember: cn=Users, o=Example
    +
    +dn: cn=Managers, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Bob Ellis, o=Example
    +uniqueMember: cn=Tom Jackson, o=Example
    +
    +dn: cn=Administrators, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Barbara Jenson, o=Example
    +uniqueMember: cn=Fred User, o=Example
    +
    +dn: cn=Users, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Allan Jefferson, o=Example
    +uniqueMember: cn=Paul Tilley, o=Example
    +uniqueMember: cn=Temporary Employees, o=Example
    +
    +dn: cn=Temporary Employees, o=Example
    +objectClass: groupOfUniqueNames
    +uniqueMember: cn=Jim Swenson, o=Example
    +uniqueMember: cn=Elliot Rhodes, o=Example
    +

    Les directives suivantes autoriseraient alors l'accès à Bob - Ellis, Tom Jackson, Barbara Jensen, Fred User, Allan Jefferson, et + Ellis, Tom Jackson, Barbara Jenson, Fred User, Allan Jefferson, et Paul Tilley, mais l'interdiraient à Jim Swenson, ou Elliot Rhodes (car ils sont situés dans un sous-groupe de niveau de profondeur 2) :

    - -Require ldap-group cn=Employees, o-Example
    -AuthLDAPSubGroupDepth 1
    -
    + +Require ldap-group cn=Employees, o=Example +AuthLDAPMaxSubGroupDepth 1 +

    Le comportement de cette directive est modifié par les directives

    La directive suivante accorderait l'accès à un DN spécifique :

    -Require ldap-dn cn=Barbara Jenson, o=Example + +Require ldap-dn cn=Barbara Jenson, o=Example +

    Le comportement ce cette directive est modifié par la directive

    La directive suivante accorderait l'autorisation d'accès à tout utilisateur dont l'attribut employeeType a pour valeur "actif" :

    - Require ldap-attribute employeeType=actif + + Require ldap-attribute employeeType=active +

    Plusieurs paires attribut/valeur peuvent être spécifiées par une même directive en les séparant par des espaces, ou en définissant @@ -522,7 +547,9 @@ AuthLDAPSubGroupDepth 1
    utilisateur dont l'attribut city aurait pour valeur "San Jose", ou donc l'attribut status aurait pour valeur "actif" :

    - Require ldap-attribute city="San Jose" status=actif + + Require ldap-attribute city="San Jose" status=active +
    @@ -538,7 +565,9 @@ AuthLDAPSubGroupDepth 1
    utilisateur possédant un téléphone cellulaire et faisant partie du département "marketing" :

    - Require ldap-filter &(cell=*)(department=marketing) + + Require ldap-filter &(cell=*)(department=marketing) +

    Alors que la directive Require ldap-attribute se contente d'une simple comparaison d'attributs, la directive @@ -561,19 +590,20 @@ AuthLDAPSubGroupDepth 1
    Accorde l'autorisation d'accès à tout utilisateur présent dans l'annuaire LDAP, en utilisant son UID pour effectuer la recherche : - -AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)"
    + +AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" Require valid-user -
    +

  • L'exemple suivant est similaire au précédent, mais les champs dont les valeurs par défaut conviennent sont omis. Notez aussi la présence d'un annuaire LDAP redondant : -AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example"
    + +AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" Require valid-user -
    +
  • @@ -586,20 +616,31 @@ Require valid-user approche n'est pas recommandée : il est préférable de choisir un attribut de votre annuaire dont l'unicité soit garantie, comme uid. - -AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn"
    + +AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" Require valid-user -
    +
  • Accorde l'autorisation d'accès à tout utilisateur appartenant au groupe Administrateurs. Les utilisateurs doivent s'authentifier en utilisant leur UID : - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid Require ldap-group cn=Administrators, o=Example -
    + +
  • + +
  • + Accorde l'accès à tout utilisateur appartenant au groupe dont le + nom correspond au nom d'hôte du serveur virtuel. Dans cet exemple, + on utilise une expression pour + construire le filtre. + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=%{SERVER_NAME}, o=Example +
  • @@ -608,10 +649,10 @@ Require ldap-group cn=Administrators, o=Example attribut LDAP qpagePagerID. Seuls ces utilisateurs (authentifiés via leur UID) se verront accorder l'autorisation d'accès : - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*)
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) Require valid-user -
    +
  • @@ -624,10 +665,10 @@ Require valid-user tout utilisateur disposant d'un bippeur ainsi qu'à Joe Manager qui ne possède pas de bippeur, mais doit tout de même pouvoir accéder à la ressource :

    - -AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager))
    + +AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) Require valid-user -
    +

    Ce dernier exemple peut sembler confus au premier abord ; en fait, il permet de mieux comprendre à quoi doit ressembler le @@ -739,11 +780,11 @@ Directory l'attribut userPrincipalName, avec une base de recherche vide, comme suit :

    - -AuthLDAPBindDN apache@example.com
    -AuthLDAPBindPassword password
    + +AuthLDAPBindDN apache@example.com +AuthLDAPBindPassword password AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -
    +

    Les utilisateurs devront s'authentifier en entrant leur UPN, de la formeuntel@nz.example.com.

    @@ -767,11 +808,11 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub l'authentification LDAP consiste à ajouter les directives suivantes à chaque fichier .htaccess qui sera créé dans le site web :

    -
    -AuthLDAPURL            "l'url"
    -AuthGroupFile mon-fichier-de-groupes
    -Require group mon-fichier-de-groupes
    -
    + +AuthLDAPURL "the url" +AuthGroupFile "mygroupfile" +Require group "mygroupfile" +
    Comment ça marche @@ -826,7 +867,7 @@ Require group mon-fichier-de-groupes où se trouve la liste des utilisateurs valides, mod_authnz_ldap doit être en mesure d'atteindre la directive AuthGroupFile qui se trouve + module="mod_authz_groupfile">AuthGroupFile qui se trouve dans les fichiers .htaccess de FrontPage. Si les directives de mod_authnz_ldap ne sont pas situées dans le même fichier .htaccess que les directives FrontPage, @@ -871,7 +912,7 @@ durant la phase d'autorisation d'authentification lorsque le serveur ne peut pas valider les données d'authentification de l'utilisateur, alors que ce dernier possède un DN. -AuthLDAPBindAuthoritativeoff|on +AuthLDAPBindAuthoritative off|on AuthLDAPBindAuthoritative on directory.htaccess @@ -881,8 +922,7 @@ DN. si un utilisateur ne possède pas de DN, mais ne le sont pas si l'utilisateur possède un DN et si son mot de passe ne peut pas être vérifié lors d'une connexion au serveur LDAP. Si la directive - AuthLDAPBindAuthoritative est + AuthLDAPBindAuthoritative est définie à off, d'autres modules d'authentification configurés auront une chance de valider le mot de passe de l'utilisateur si la tentative de connexion au serveur LDAP échoue @@ -906,7 +946,7 @@ DN en utilisant le nom propre de l'utilisateur pour l'authentification de base et non de manière anonyme, ou en utilisant des données d'authentification codées en dur pour le serveur -AuthLDAPInitialBindAsUser off|on +AuthLDAPInitialBindAsUser off|on AuthLDAPInitialBindAsUser off directory.htaccess @@ -947,7 +987,7 @@ codées en dur pour le serveur Spécifie la modification a apporter au nom d'utilisateur pour l'authentification de base lors de l'authentification auprès du serveur LDAP pour effectuer une recherche de DN -AuthLDAPInitialBindPatternregex substitution +AuthLDAPInitialBindPattern regex substitution AuthLDAPInitialBindPattern (.*) $1 (nom de l'utilisateur distant utilisé tel quel) directory.htaccess @@ -972,8 +1012,12 @@ distant utilisé tel quel) module="mod_authnz_ldap">AuthLDAPBindDN.

    - AuthLDAPInitialBindPattern (.+) $1@example.com - AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + + AuthLDAPInitialBindPattern (.+) $1@example.com + + + AuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=com + Non disponible dans la cas d'une autorisation seule On ne peut utiliser cette directive que si ce module @@ -1016,6 +1060,8 @@ connexion directory.htaccess AuthConfig +exec: est disponible depuis la version 2.4.5 du +serveur HTTP Apache.

    Cette directive permet de spécifier un mot de passe à utiliser en @@ -1023,10 +1069,25 @@ connexion constitue en général une donnée sensible, et doit donc être protégé de manière appropriée. Vous ne devez utiliser les directives AuthLDAPBindDN et AuthLDAPBindPassword que si + module="mod_authnz_ldap">AuthLDAPBindDN et + AuthLDAPBindPassword que si vous en avez vraiment besoin pour effectuer une recherche dans l'annuaire.

    + +

    Si la valeur spécifiée débute par "exec:", la commande qui suit sera + exécutée, et la première ligne renvoyée par la commande sur la + sortie standard sera utilisée comme mot de passe.

    + +# Mot de passe spécifié directement +AuthLDAPBindPassword secret + +# Exécution de /path/to/program pour obtenir le mot de passe +AuthLDAPBindPassword exec:/path/to/program + +# Exécution de /path/to/otherProgram avec un argument pour obtenir le mot de passe +AuthLDAPBindPassword "exec:/path/to/otherProgram argument1" + +
    @@ -1197,6 +1258,8 @@ l'utilisateur. directory.htaccess AuthConfig +Disponible à partir de la version 2.3.0 du serveur HTTP +Apache

    Lorsque cette directive est définie à une valeur X @@ -1208,6 +1271,17 @@ l'utilisateur. d'imbrication maximale X spécifiée par la directive.

    Se référer à la section Require ldap-group pour un exemple plus détaillé.

    + + Performances dans le cas des groupes imbriqués +

    Lorsque les directives + AuthLDAPSubGroupAttribute et + AuthLDAPGroupAttribute se recouvrent (comme + c'est le cas par défaut et requis par les schémas LDAP courants), la + recherche de sous-groupes au sein de grands groupes peut être très + longue. Si vos groupes sont très grands et non imbriqués, définissez + la directive AuthLDAPMaxSubGroupDepth à 0.

    +
    +
    @@ -1228,7 +1302,8 @@ d'environnement REMOTE_USER spécifié. Assurez-vous que cet attribut soit bien inclus dans la liste d'attributs spécifiés dans la définition de AuthLDAPUrl ; dans le cas contraire, cette directive n'aurait aucun effet. Si elle est - présente, cette directive l'emporte sur AuthLDAPRemoteUserIsDN. Elle + présente, cette directive l'emporte sur AuthLDAPRemoteUserIsDN. Elle peut s'avérer utile par exemple, si vous souhaitez que les utilisateurs se connectent à un site web en utilisant leur adresse email, alors qu'une application sous-jacente nécessite un nom @@ -1304,18 +1379,20 @@ groupes. directory.htaccess AuthConfig +Disponible à partir de la version 2.3.0 du serveur HTTP +Apache

    Un objet groupe LDAP peut contenir des membres qui sont des utilisateurs et des membres qui sont eux-mêmes des groupes (appelés sous-groupes ou groupes imbriqués). La directive - AuthLDAPSubGroupAttribute spécifie l'attribut utilisé + AuthLDAPSubGroupAttribute spécifie l'attribut utilisé pour identifier les groupes, alors que la directive - AuthLDAPGroupAttribute spécifie l'attribut utilisé - pour identifier les utilisateurs. On peut spécifier plusieurs - attributs en répétant la directive plusieurs fois. Si elle n'est pas - définie, mod_authnz_ldap utilise les attributs - member et uniqueMember.

    + AuthLDAPGroupAttribute + spécifie l'attribut utilisé pour identifier les utilisateurs. On peut + spécifier plusieurs attributs en répétant la directive plusieurs fois. Si + elle n'est pas définie, mod_authnz_ldap utilise les + attributs member et uniqueMember.

    @@ -1329,15 +1406,18 @@ sous-groupes. directory.htaccess AuthConfig +Disponible à partir de la version 2.3.0 du serveur HTTP +Apache

    Un objet groupe LDAP peut contenir des membres qui sont des utilisateurs et des membres qui sont eux-mêmes des groupes (appelés sous-groupes ou groupes imbriqués). La directive - AuthLDAPSubGroupAttribute permet d'identifier les + AuthLDAPSubGroupAttribute + permet d'identifier les membres qui sont des sous-groupes du groupe courant (à l'opposé des membres utilisateurs). La directive - AuthLDAPSubGroupClass permet de spécifier les valeurs + AuthLDAPSubGroupClass permet de spécifier les valeurs d'objectClass LDAP utilisées pour vérifier que certains membres sont en fait des objets groupe. Les sous-groupes ainsi identifiés peuvent alors faire l'objet d'une recherche d'autres membres utilisateurs ou @@ -1364,8 +1444,9 @@ recherche LDAP ldap://hôte:port/DN-de-base?attribut?portée?filtre

    Si vous souhaitez mettre à la disposition d'Apache plusieurs URLs LDAP, la syntaxe sera :

    -AuthLDAPUrl "ldap://ldap1.example.com -ldap2.example.com/dc=..." + +AuthLDAPUrl "ldap://ldap1.example.com ldap2.example.com/dc=..." +

    Mise en garde : Si vous spécifiez plusieurs serveurs, vous devez en entourer la liste avec des guillemets ; dans le cas contraire, vous générerez une erreur : "AuthLDAPURL takes one @@ -1449,7 +1530,10 @@ spécifiés.

    taille des filtres est limitée à environ 8000 caractères (valeur de la macro MAX_STRING_LEN dans le code source d'Apache), ce qui s'avère plus que suffisant pour la plupart des - applications. + applications. Depuis la version 2.4.10, il est possible + d'utiliser le paramètre none pour spécifier qu'aucun filtre + n'est activé ; ce paramètre est obligatoire avec certains + serveurs LDAP primitifs.

    Pour une recherche, les attribut, filtre et nom d'utilisateur @@ -1484,7 +1568,7 @@ spécifiés.

    Voir plus haut pour des exemples d'URLs définies par la directive - AuthLDAPURL.

    + AuthLDAPUrl.

    diff --git a/docs/manual/mod/mod_authz_core.html b/docs/manual/mod/mod_authz_core.html index 67d67862913..8d3da5b111a 100644 --- a/docs/manual/mod/mod_authz_core.html +++ b/docs/manual/mod/mod_authz_core.html @@ -3,3 +3,7 @@ URI: mod_authz_core.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_authz_core.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_authz_core.html.en b/docs/manual/mod/mod_authz_core.html.en index c14e6baa41b..26507387a00 100644 --- a/docs/manual/mod/mod_authz_core.html.en +++ b/docs/manual/mod/mod_authz_core.html.en @@ -1,27 +1,33 @@ - -mod_authz_core - Apache HTTP Server +mod_authz_core - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_core

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

  • Description:L'URL permettant de spcifier les paramtres de la recherche LDAP
    @@ -40,7 +46,12 @@ also allows for advanced logic to be applied to the authorization processing.

    -
    top

    Creating Authorization Provider Aliases

    @@ -65,7 +73,7 @@ through the Require directive in the same way as a base authorization provider. Besides the ability to create and alias an extended provider, it also allows the same extended - authorization provider to be reference by multiple locations. + authorization provider to be referenced by multiple locations.

    Example

    @@ -75,38 +83,32 @@ multiple ldap hosts:

    -

    Example

    - <AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx>
    - - AuthLDAPBindDN cn=youruser,o=ctx
    - AuthLDAPBindPassword yourpassword
    - AuthLDAPURL ldap://ldap.host/o=ctx
    -
    - </AuthzProviderAlias>

    - <AuthzProviderAlias ldap-group ldap-group-alias2 - cn=my-other-group,o=dev>
    - - AuthLDAPBindDN cn=yourotheruser,o=dev
    - AuthLDAPBindPassword yourotherpassword
    - AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    -
    - </AuthzProviderAlias>

    - - Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Require all granted

    - - AuthBasicProvider file

    - - AuthType Basic
    - AuthName LDAP_Protected_Place

    - - #implied OR operation
    - Require ldap-group-alias1
    - Require ldap-group-alias2
    -
    </Directory>
    -

    +
    <AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx>
    +    AuthLDAPBindDN cn=youruser,o=ctx
    +    AuthLDAPBindPassword yourpassword
    +    AuthLDAPURL ldap://ldap.host/o=ctx
    +</AuthzProviderAlias>
    +
    +<AuthzProviderAlias ldap-group ldap-group-alias2 cn=my-other-group,o=dev>
    +    AuthLDAPBindDN cn=yourotheruser,o=dev
    +    AuthLDAPBindPassword yourotherpassword
    +    AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    +</AuthzProviderAlias>
    +
    +Alias "/secure" "/webpages/secure"
    +<Directory "/webpages/secure">
    +    Require all granted
    +    
    +    AuthBasicProvider file
    +    
    +    AuthType Basic
    +    AuthName LDAP_Protected_Place
    +    
    +    #implied OR operation
    +    Require ldap-group-alias1
    +    Require ldap-group-alias2
    +</Directory>
    +
    top
    @@ -132,39 +134,26 @@ not belong to either the temps group or the LDAP group Temporary Employees.

    -

    - <Directory /www/mydocs> - +

    <Directory "/www/mydocs">
    +    <RequireAll>
    +        <RequireAny>
    +            Require user superadmin
                 <RequireAll>
    -            
    +                Require group admins
    +                Require ldap-group cn=Administrators,o=Airius
                     <RequireAny>
    -                
    -                    Require user superadmin
    - <RequireAll> - - Require group admins
    - Require ldap-group cn=Administrators,o=Airius
    - <RequireAny> - - Require group sales
    - Require ldap-attribute dept="sales" -
    - </RequireAny> -
    - </RequireAll> -
    - </RequireAny>
    - <RequireNone> - - Require group temps
    - Require ldap-group cn=Temporary Employees,o=Airius -
    - </RequireNone> -
    + Require group sales + Require ldap-attribute dept="sales" + </RequireAny> </RequireAll> - - </Directory> -

    + </RequireAny> + <RequireNone> + Require group temps + Require ldap-group cn=Temporary Employees,o=Airius + </RequireNone> + </RequireAll> +</Directory> +
    top

    The Require Directives

    @@ -187,42 +176,47 @@ User-Agent (browser type), Referer, or other HTTP request header fields.

    -

    Example:

    - SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    - <Directory /docroot>
    - - Require env let_me_in
    -
    - </Directory> -

    +
    SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory "/docroot">
    +    Require env let_me_in
    +</Directory>
    +

    In this case, browsers with a user-agent string beginning with KnockKnock/2.0 will be allowed access, and all others will be denied.

    +

    When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.

    +

    Require all

    -

    The all provider mimics the functionality the +

    The all provider mimics the functionality that was previously provided by the 'Allow from all' and 'Deny from all' directives. This provider can take one of two arguments which are 'granted' or 'denied'. The following examples will grant or deny access to all requests.

    -

    - Require all granted
    -

    +
    Require all granted
    + + +
    Require all denied
    -

    - Require all denied
    -

    Require method

    -

    The method provider allows to use the HTTP method in +

    The method provider allows using the HTTP method in authorization decisions. The GET and HEAD methods are treated as equivalent. The TRACE method is not available to this provider, use TraceEnable instead.

    @@ -230,35 +224,46 @@

    The following example will only allow GET, HEAD, POST, and OPTIONS requests:

    -

    - Require method GET POST OPTIONS
    -

    +
    Require method GET POST OPTIONS
    +

    The following example will allow GET, HEAD, POST, and OPTIONS requests without authentication, and require a valid user for all other methods:

    -

    - <RequireAny>
    -  Require method GET POST OPTIONS
    -  Require valid-user
    - </RequireAny>
    -

    +
    <RequireAny>
    +    Require method GET POST OPTIONS
    +    Require valid-user
    +</RequireAny>
    +

    Require expr

    -

    The expr provider allows to base authorization +

    The expr provider allows basing authorization decisions on arbitrary expressions.

    -

    - Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17
    -

    +
    Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"
    + + +
    <RequireAll>
    +    Require expr "!(%{QUERY_STRING} =~ /secret/)"
    +    Require expr "%{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" 
    +</RequireAll>
    + + +
    Require expr "!(%{QUERY_STRING} =~ /secret/) && %{REQUEST_URI} in { '/example.cgi', '/other.cgi' }"
    +

    The syntax is described in the ap_expr documentation.

    +

    Normally, the expression is evaluated before authentication. However, if + the expression returns false and references the variable + %{REMOTE_USER}, authentication will be performed and + the expression will be re-evaluated.

    + @@ -277,12 +282,12 @@ sections.
    Description:Core Authorization
    Status:Base
    Module:mod_authz_core

    When authorization is enabled, it is normally inherited by each - subsequent configuration section, - unless a different set of authorization directives are specified. + subsequent configuration section, + unless a different set of authorization directives is specified. This is the default action, which corresponds to an explicit setting of AuthMerging Off.

    -

    However, there may be circumstances in which is it desirable +

    However, there may be circumstances in which it is desirable for a configuration section's authorization to be combined with that of its predecessor while configuration sections are being merged. Two options are available for this case, And @@ -311,30 +316,23 @@ sections. preceding sections. Thus only users belong to the group gamma may access /www/docs/ab/gamma.

    -

    - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require group alpha -
    - </Directory>
    -
    - <Directory /www/docs/ab> - - AuthMerging Or
    - Require group beta -
    - </Directory>
    -
    - <Directory /www/docs/ab/gamma> - - Require group gamma - - </Directory> -

    +
    <Directory "/www/docs">
    +    AuthType Basic
    +    AuthName Documents
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    Require group alpha
    +</Directory>
    +
    +<Directory "/www/docs/ab">
    +    AuthMerging Or
    +    Require group beta
    +</Directory>
    +
    +<Directory "/www/docs/ab/gamma">
    +    Require group gamma
    +</Directory>
    +
    top
    @@ -421,7 +419,8 @@ an authorization provider.
    Access is allowed if expression evaluates to true.
    -

    Some of the allowed syntaxes provided by mod_authz_user +

    Some of the allowed syntaxes provided by mod_authz_user, + mod_authz_host, and mod_authz_groupfile are:

    @@ -435,12 +434,15 @@ an authorization provider.
    Require valid-user
    All valid users can access the resource.
    + +
    Require ip 10 172.20 192.168.2
    +
    Clients in the specified IP address ranges can access the + resource.

    Other authorization modules that implement require options include mod_authnz_ldap, mod_authz_dbm, mod_authz_dbd, - mod_authz_host, mod_authz_owner and mod_ssl.

    In most cases, for a complete authentication and authorization @@ -453,14 +455,13 @@ an authorization provider. and AuthGroupFile (to define users and groups) in order to work correctly. Example:

    -

    - AuthType Basic
    - AuthName "Restricted Resource"
    - AuthBasicProvider file
    - AuthUserFile /web/users
    - AuthGroupFile /web/groups
    - Require group admin -

    +
    AuthType Basic
    +AuthName "Restricted Resource"
    +AuthBasicProvider file
    +AuthUserFile "/web/users"
    +AuthGroupFile "/web/groups"
    +Require group admin
    +

    Access controls which are applied in this way are effective for all methods. This is what is normally @@ -482,22 +483,17 @@ an authorization provider. and beta groups are authorized, except for those who are also in the reject group.

    -

    - <Directory /www/docs> - - <RequireAll> - - Require group alpha beta
    - Require not group reject -
    - </RequireAll> -
    - </Directory> -

    +
    <Directory "/www/docs">
    +    <RequireAll>
    +        Require group alpha beta
    +        Require not group reject
    +    </RequireAll>
    +</Directory>
    +

    When multiple Require directives are used in a single - configuration section + configuration section and are not contained in another authorization directive like <RequireAll>, they are implicitly contained within a @@ -506,10 +502,21 @@ an authorization provider. entire request, and subsequent Require directives are ignored.

    +

    Security Warning

    +

    Exercise caution when setting authorization directives in + Location sections + that overlap with content served out of the filesystem. + By default, these configuration sections overwrite authorization configuration + in Directory, + and Files sections.

    +

    The AuthMerging directive + can be used to control how authorization configuration sections are + merged.

    +
    +

    See also

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_core.html.fr b/docs/manual/mod/mod_authz_core.html.fr new file mode 100644 index 00000000000..a7a9dacf2b0 --- /dev/null +++ b/docs/manual/mod/mod_authz_core.html.fr @@ -0,0 +1,674 @@ + + + + + +mod_authz_core - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authz_core

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Autorisation basique
    Statut:Base
    IdentificateurdeModule:authz_core_module
    FichierSource:mod_authz_core.c
    Compatibilit:Disponible depuis la version 2.3 +d'Apache HTTPD
    +

    Sommaire

    + +

    Ce module fournit des fonctionnalits d'autorisation basiques + permettant d'accorder ou refuser l'accs certaines zones du site + web aux utilisateurs authentifis. mod_authz_core + donne la possibilit d'enregistrer divers fournisseurs + d'autorisation. Il est en gnral utilis avec un module fournisseur + d'authentification comme mod_authn_file, et un + module d'autorisation comme mod_authz_user. Il + permet aussi l'application d'une logique labore au droulement du + processus d'autorisation.

    +
    + +
    top
    +
    +

    Cration des alias du fournisseur +d'autorisation

    + +

    Il est possible de crer des fournisseurs d'autorisation tendus + dans le fichier de configuration et de leur assigner un nom d'alias. + On peut ensuite utiliser ces fournisseurs aliass dans une + directive Require de + la mme manire qu'on le ferait pour des fournisseurs d'autorisation + de base. En plus de la possibilit de crer et d'aliaser un + fournisseur tendu, le mme fournisseur d'autorisation tendu peut + tre rfrenc par plusieurs localisations. +

    + +

    Exemple

    +

    Dans l'exemple suivant, on cre deux alias de fournisseur + d'autorisation ldap diffrents bass sur le fournisseur + d'autorisation ldap-group. Il est ainsi possible pour un seul + rpertoire de vrifier l'appartenance un groupe dans plusieurs + serveurs ldap : +

    + +
    <AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx>
    +    AuthLDAPBindDN cn=youruser,o=ctx
    +    AuthLDAPBindPassword yourpassword
    +    AuthLDAPURL ldap://ldap.host/o=ctx
    +</AuthzProviderAlias>
    +
    +<AuthzProviderAlias ldap-group ldap-group-alias2 cn=my-other-group,o=dev>
    +    AuthLDAPBindDN cn=yourotheruser,o=dev
    +    AuthLDAPBindPassword yourotherpassword
    +    AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    +</AuthzProviderAlias>
    +
    +Alias "/secure" "/webpages/secure"
    +<Directory "/webpages/secure">
    +    Require all granted
    +    
    +    AuthBasicProvider file
    +    
    +    AuthType Basic
    +    AuthName LDAP_Protected_Place
    +    
    +    #implied OR operation
    +    Require ldap-group-alias1
    +    Require ldap-group-alias2
    +</Directory>
    + + + +
    top
    +
    +

    Conteneurs d'autorisation

    + +

    Les directives de conteneur d'autorisation <RequireAll>, + <RequireAny> et <RequireNone> + peuvent tre combines entre elles et avec la directive Require pour confectionner une + logique d'autorisation complexe.

    + +

    L'exemple ci-dessous illustre la logique d'autorisation suivante. + Pour pouvoir accder la ressource, l'utilisateur doit tre + l'utilisateur superadmin, ou appartenir aux deux + groupes LDAP admins et Administrateurs et + soit appartenir au groupe ventes ou avoir + ventes comme valeur de l'attribut LDAP + dept. De plus, pour pouvoir accder la ressource, + l'utilisateur ne doit appartenir ni au groupe temps, ni + au groupe LDAP Employs temporaires.

    + +
    <Directory "/www/mydocs">
    +    <RequireAll>
    +        <RequireAny>
    +            Require user superadmin
    +            <RequireAll>
    +            Require group admins
    +            Require ldap-group cn=Administrators,o=Airius
    +                <RequireAny>
    +                Require group sales
    +                Require ldap-attribute dept="sales"
    +                </RequireAny>
    +            </RequireAll>
    +        </RequireAny>
    +        <RequireNone>
    +            Require group temps
    +            Require ldap-group cn=Temporary Employees,o=Airius
    +        </RequireNone>
    +    </RequireAll>
    +</Directory>
    + +
    top
    +
    +

    Les directives Require

    + +

    Le module mod_authz_core met disposition des + fournisseurs d'autorisation gnriques utilisables avec la directive + Require.

    + +

    Require env

    + +

    Le fournisseur env permet de contrler l'accs au + serveur en fonction de l'existence d'une variable d'environnement. Lorsque Require + env env-variable est spcifi, la requte se voit + autoriser l'accs si la variable d'environnement + env-variable existe. Le serveur permet de dfinir + facilement des variables d'environnement en fonction des + caractristiques de la requte du client via les directives fournies + par le module mod_setenvif. Cette directive Require + env permet donc de contrler l'accs en fonction des + valeurs des en-ttes de la requte HTTP tels que + User-Agent (type de navigateur), Referer, + entre autres.

    + +
    SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    +<Directory "/docroot">
    +    Require env let_me_in
    +</Directory>
    + + +

    Avec cet exemple, les navigateurs dont la chane user-agent + commence par KnockKnock/2.0 se verront autoriser + l'accs, alors que tous les autres seront rejets.

    + +

    Lorsque le serveur cherche un chemin via une sous-requte interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il gnre un + listing du contenu d'un rpertoire via le module + mod_autoindex, la sous-requte n'hrite pas des + variables d'environnement spcifiques la requte. En outre, cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas values + sparment dans la sous-requte.

    + + + +

    Require all

    + +

    Le fournisseur all reproduit la fonctionnalit + prcdemment fournie par les directives 'Allow from all' et 'Deny + from all'. Il accepte un argument dont les deux valeurs possibles + sont : 'granted' ou 'denied'. Les exemples suivants autorisent ou + interdisent l'accs toutes les requtes.

    + +
    Require all granted
    + + +
    Require all denied
    + + + + +

    Require method

    + +

    Le fournisseur method permet d'utiliser la mthode + HTTP dans le processus d'autorisation. Les mthodes GET et HEAD sont + ici considres comme quivalentes. La mthode TRACE n'est pas + supporte par ce fournisseur ; utilisez la place la directive + TraceEnable.

    + +

    Dans l'exemple suivant, seules les mthodes GET, HEAD, POST, et + OPTIONS sont autorises :

    + +
    Require method GET POST OPTIONS
    + + +

    Dans l'exemple suivant, les mthodes GET, HEAD, POST, et OPTIONS + sont autorises sans authentification, alors que toutes les autres + mthodes ncessitent un utilisateur valide :

    + +
    <RequireAny>
    +    Require method GET POST OPTIONS
    +    Require valid-user
    +</RequireAny>
    + + + +

    Require expr

    + +

    Le fournisseur expr permet d'accorder l'autorisation + d'accs de base en fonction d'expressions arbitraires.

    + +
    Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"
    + + +
    <RequireAll>
    +    Require expr "!(%{QUERY_STRING} =~ /secret/)"
    +    Require expr "%{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" 
    +</RequireAll>
    + + +
    Require expr "!(%{QUERY_STRING} =~ /secret/) && %{REQUEST_URI} in { '/example.cgi', '/other.cgi' }"
    + + +

    La syntaxe de l'expression est dcrite dans la documentation de ap_expr.

    + +

    Normalement, l'expression est value avant l'authentification. + Cependant, si l'expression renvoie false et se rfre la variable + %{REMOTE_USER}, le processus d'authentification sera + engag et l'expression rvalue.

    + + + +
    +
    top
    +

    Directive AuthMerging

    + + + + + + + + +
    Description:Dfinit la manire dont chaque logique d'autorisation des +sections de configuration se combine avec celles des sections de +configuration prcdentes.
    Syntaxe:AuthMerging Off | And | Or
    Dfaut:AuthMerging Off
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_core
    +

    Lorsque l'autorisation est active, elle est normalement hrite + par chaque section de + configuration suivante, moins qu'un jeu de directives + d'autorisations diffrent ne soit spcifi. Il s'agit du + comportement par dfaut, qui correspond la dfinition explicite + AuthMerging Off.

    + +

    Dans certaines situations cependant, il peut tre souhaitable de + combiner la logique d'autorisation d'une section de configuration + avec celle de la section prcdente lorsque les sections de + configuration se combinent entre elles. Dans ce cas, deux options + sont disponibles, And et Or.

    + +

    Lorsqu'une section de configuration contient AuthMerging + And ou AuthMerging Or, sa logique d'autorisation + se combine avec celle de la section de configuration qui la prcde + (selon l'ordre gnral des sections de configuration), et qui + contient aussi une logique d'autorisation, comme si les deux + sections taient concatnes respectivement dans une directive + <RequireAll> ou <RequireAny>.

    + +
    La dfinition de la directive + AuthMerging ne concerne que la section de + configuration dans laquelle elle apparat. Dans l'exemple suivant, + seuls les utilisateurs appartenant au groupe alpha sont + autoriss accder /www/docs. Les utilisateurs + appartenant au groupe alpha ou au groupe + beta sont autoriss accder + /www/docs/ab. Cependant, la dfinition implicite + Off de la directive AuthMerging + s'applique la section de configuration <Directory> concernant le rpertoire + /www/docs/ab/gamma, ce qui implique que les directives + d'autorisation de cette section l'emportent sur celles des sections + prcdentes. Par voie de consquence, seuls les utilisateurs + appartenant au groupe gamma sont autoriss accder + /www/docs/ab/gamma.
    + +
    <Directory "/www/docs">
    +    AuthType Basic
    +    AuthName Documents
    +    AuthBasicProvider file
    +    AuthUserFile "/usr/local/apache/passwd/passwords"
    +    Require group alpha
    +</Directory>
    +
    +<Directory "/www/docs/ab">
    +    AuthMerging Or
    +    Require group beta
    +</Directory>
    +
    +<Directory "/www/docs/ab/gamma">
    +    Require group gamma
    +</Directory>
    + + +
    +
    top
    +

    Directive <AuthzProviderAlias>

    + + + + + + +
    Description:Regroupe des directives reprsentant une extension d'un +fournisseur d'autorisation de base qui pourra tre rfrence l'aide +de l'alias spcifi
    Syntaxe:<AuthzProviderAlias fournisseur-de-base Alias +Paramtres-Require> +... </AuthzProviderAlias> +
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_authz_core
    +

    Les balises <AuthzProviderAlias> et + </AuthzProviderAlias> permettent de regrouper des + directives d'autorisation auxquelles on pourra faire rfrence + l'aide de l'alias spcifi dans une directive Require.

    + + +
    +
    top
    +

    Directive AuthzSendForbiddenOnFailure

    + + + + + + + + +
    Description:Envoie '403 FORBIDDEN' au lieu de '401 UNAUTHORIZED' si +l'authentification russit et si l'autorisation a t refuse. +
    Syntaxe:AuthzSendForbiddenOnFailure On|Off
    Dfaut:AuthzSendForbiddenOnFailure Off
    Contexte:rpertoire, .htaccess
    Statut:Base
    Module:mod_authz_core
    Compatibilit:Disponible depuis la version 2.3.11 d'Apache HTTPD
    +

    Par dfaut, si l'authentification russit, alors que + l'autorisation est refuse, Apache HTTPD renvoie un code de rponse + HTTP '401 UNAUTHORIZED'. En gnral, les navigateurs proposent alors + une nouvelle fois l'utilisateur la bote de dialogue de saisie du + mot de passe, ce qui n'est pas toujours souhaitable. La directive + AuthzSendForbiddenOnFailure permet de changer + le code de rponse en '403 FORBIDDEN'.

    + +

    Avertissement de scurit

    +

    La modification de la rponse en cas de refus d'autorisation + diminue la scurit du mot de passe, car elle indique un ventuel + attaquant que le mot de passe qu'il a saisi tait correct.

    +
    + +
    +
    top
    +

    Directive Require

    + + + + + + + +
    Description:Vrifie si un utilisateur authentifi a une +autorisation d'accs accorde par un fournisseur +d'autorisation.
    Syntaxe:Require [not] nom-entit [nom-entit] +...
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_core
    +

    Cette directive permet de vrifier si un utilisateur authentifi + a l'autorisation d'accs accorde pour un certain fournisseur + d'autorisation et en tenant compte de certaines restrictions. + mod_authz_core met disposition les fournisseurs + d'autorisation gnriques suivants :

    + +
    +
    Require all granted
    +
    L'accs est autoris sans restriction.
    + +
    Require all denied
    +
    L'accs est systmatiquement refus.
    + +
    Require env env-var [env-var] + ...
    +
    L'accs n'est autoris que si l'une au moins des variables + d'environnement spcifies est dfinie.
    + +
    Require method http-method [http-method] + ...
    +
    L'accs n'est autoris que pour les mthodes HTTP spcifies.
    + +
    Require expr expression
    +
    L'accs est autoris si expression est valu + vrai.
    +
    + +

    Voici quelques exemples de syntaxes autorises par + mod_authz_user, mod_authz_host et + mod_authz_groupfile :

    + +
    +
    Require user identifiant utilisateur + [identifiant utilisateur] + ...
    +
    Seuls les utilisateurs spcifis auront accs la + ressource.
    + +
    Require group nom groupe [nom + groupe] + ...
    +
    Seuls les utilisateurs appartenant aux groupes spcifis + auront accs la ressource.
    + +
    Require valid-user
    +
    Tous les utilisateurs valides auront accs la + ressource.
    + +
    Require ip 10 172.20 192.168.2
    +
    Les clients dont les adresses IP font partie des tranches + spcifies auront accs la ressource.
    +
    + +

    D'autres modules d'autorisation comme + mod_authnz_ldap, mod_authz_dbm, + mod_authz_dbd, + mod_authz_owner et mod_ssl + implmentent des options de la directive Require.

    + +

    Pour qu'une configuration d'authentification et d'autorisation + fonctionne correctement, la directive Require + doit tre accompagne dans la plupart des cas de directives AuthName, AuthType et AuthBasicProvider ou AuthDigestProvider, ainsi que + de directives telles que AuthUserFile et AuthGroupFile (pour la + dfinition des utilisateurs et des groupes). Exemple :

    + +
    AuthType Basic
    +AuthName "Restricted Resource"
    +AuthBasicProvider file
    +AuthUserFile "/web/users"
    +AuthGroupFile "/web/groups"
    +Require group admin
    + + +

    Les contrles d'accs appliqus de cette manire sont effectifs + pour toutes les mthodes. C'est d'ailleurs + ce que l'on souhaite en gnral. Si vous voulez n'appliquer + les contrles d'accs qu' certaines mthodes, tout en laissant les + autres mthodes sans protection, placez la directive + Require dans une section <Limit>.

    + +

    Le rsultat de la directive Require peut + tre invers en utilisant l'option not. Comme dans le + cas de l'autre directive d'autorisation inverse <RequireNone>, si la directive + Require est inverse, elle ne peut qu'chouer + ou produire un rsultat neutre ; elle ne peut donc alors pas + autoriser une requte de manire indpendante.

    + +

    Dans l'exemple suivant, tous les utilisateurs appartenant aux + groupes alpha et beta ont l'autorisation + d'accs, l'exception de ceux appartenant au groupe + reject.

    + +
    <Directory "/www/docs">
    +    <RequireAll>
    +        Require group alpha beta
    +        Require not group reject
    +    </RequireAll>
    +</Directory>
    + + +

    Lorsque plusieurs directives Require sont + places dans une mme section de + configuration, et ne se trouvent pas dans une autre directive + d'autorisation comme <RequireAll>, elles sont implicitement + contenues dans une directive <RequireAny>. Ainsi, la premire directive + Require qui autorise l'accs un utilisateur + autorise l'accs pour l'ensemble de la requte, et les directives + Require suivantes sont ignores.

    + +

    Avertissement propos de la scurit

    +

    Prettez une attention particulire aux directives d'autorisation + dfinies + au sein des sections Location + qui se chevauchent avec des contenus servis depuis le systme de + fichiers. Par dfaut, les configurations dfinies dans ces sections l'emportent sur les + configurations d'autorisations dfinies au sein des sections + Directory et Files sections.

    +

    La directive AuthMerging permet de contrler + la manire selon laquelle les configurations d'autorisations sont + fusionnes au sein des sections prcites.

    +
    + +

    Voir aussi

    + +
    +
    top
    +

    Directive <RequireAll>

    + + + + + + + +
    Description:Regroupe plusieurs directives d'autorisation dont aucune ne +doit chouer et dont au moins une doit retourner un rsultat positif +pour que la directive globale retourne elle-mme un rsultat +positif.
    Syntaxe:<RequireAll> ... </RequireAll>
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_core
    +

    Les balises <RequireAll> et + </RequireAll> permettent de regrouper des + directives d'autorisation dont aucune ne doit chouer, et dont au + moins une doit retourner un rsultat positif pour que la directive + <RequireAll> retourne elle-mme + un rsultat positif.

    + +

    Si aucune des directives contenues dans la directive <RequireAll> n'choue, et si au moins une + retourne un rsultat positif, alors la directive <RequireAll> retourne elle-mme un rsultat + positif. Si aucune ne retourne un rsultat positif, et si aucune + n'choue, la directive globale retourne un rsultat neutre. Dans + tous les autres cas, elle choue.

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive <RequireAny>

    + + + + + + + +
    Description:Regroupe des directives d'autorisation dont au moins une +doit retourner un rsultat positif pour que la directive globale +retourne elle-mme un rsultat positif.
    Syntaxe:<RequireAny> ... </RequireAny>
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_core
    +

    Les balises <RequireAny> et + </RequireAny> permettent de regrouper des + directives d'autorisation dont au moins une doit retourner un + rsultat positif pour que la directive <RequireAny> retourne elle-mme un rsultat + positif.

    + +

    Si une ou plusieurs directives contenues dans la directive + <RequireAny> retournent un + rsultat positif, alors la directive <RequireAny> retourne elle-mme un rsultat + positif. Si aucune ne retourne un rsultat positif et aucune + n'choue, la directive globale retourne un rsultat neutre. Dans + tous les autres cas, elle choue.

    + +
    Comme les directives d'autorisation inverses sont incapables + de retourner un rsultat positif, elles ne peuvent pas impacter de + manire significative le rsultat d'une directive <RequireAny> (elles pourraient tout au plus + faire chouer la directive dans le cas o elles choueraient + elles-mmes, et o + toutes les autres directives retourneraient un rsultat neutre). + C'est pourquoi il n'est pas permis d'utiliser les directives + d'autorisation inverses dans une directive <RequireAny>.
    + +

    Voir aussi

    + +
    +
    top
    +

    Directive <RequireNone>

    + + + + + + + +
    Description:Regroupe des directives d'autorisation dont aucune ne doit +retourner un rsultat positif pour que la directive globale n'choue +pas.
    Syntaxe:<RequireNone> ... </RequireNone>
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_core
    +

    Les balises <RequireNone> et + </RequireNone> permettent de regrouper des + directives d'autorisation dont aucune ne doit retourner un rsultat + positif pour que la directive <RequireNone> n'choue pas.

    + +

    Si une ou plusieurs directives contenues dans la directive + <RequireNone> retournent un + rsultat positif, la directive <RequireNone> chouera. Dans tous les + autres cas, cette dernire retournera un rsultat neutre. Ainsi, + comme pour la directive d'autorisation inverse Require + not, elle ne peut jamais autoriser une requte de manire + indpendante car elle ne pourra jamais retourner un rsultat + positif. Par contre, on peut l'utiliser pour restreindre l'ensemble + des utilisateurs autoriss accder une ressource.

    + +
    Comme les directives d'autorisation inverses sont incapables + de retourner un rsultat positif, elles ne peuvent pas impacter de + manire significative le rsultat d'une directive <RequireNone>. + C'est pourquoi il n'est pas permis d'utiliser les directives + d'autorisation inverses dans une directive <RequireNone>.
    + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_core.xml b/docs/manual/mod/mod_authz_core.xml index d7d434ce30a..1ce4cfcc820 100644 --- a/docs/manual/mod/mod_authz_core.xml +++ b/docs/manual/mod/mod_authz_core.xml @@ -48,7 +48,7 @@ through the Require directive in the same way as a base authorization provider. Besides the ability to create and alias an extended provider, it also allows the same extended - authorization provider to be reference by multiple locations. + authorization provider to be referenced by multiple locations.

    Example @@ -58,38 +58,33 @@ multiple ldap hosts:

    - Example - <AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx>
    - - AuthLDAPBindDN cn=youruser,o=ctx
    - AuthLDAPBindPassword yourpassword
    - AuthLDAPURL ldap://ldap.host/o=ctx
    -
    - </AuthzProviderAlias>

    - <AuthzProviderAlias ldap-group ldap-group-alias2 - cn=my-other-group,o=dev>
    - - AuthLDAPBindDN cn=yourotheruser,o=dev
    - AuthLDAPBindPassword yourotherpassword
    - AuthLDAPURL ldap://other.ldap.host/o=dev?cn
    -
    - </AuthzProviderAlias>

    - - Alias /secure /webpages/secure
    - <Directory /webpages/secure>
    - - Require all granted

    - - AuthBasicProvider file

    - - AuthType Basic
    - AuthName LDAP_Protected_Place

    - - #implied OR operation
    - Require ldap-group-alias1
    - Require ldap-group-alias2
    -
    </Directory>
    -
    + +<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> + AuthLDAPBindDN cn=youruser,o=ctx + AuthLDAPBindPassword yourpassword + AuthLDAPURL ldap://ldap.host/o=ctx +</AuthzProviderAlias> + +<AuthzProviderAlias ldap-group ldap-group-alias2 cn=my-other-group,o=dev> + AuthLDAPBindDN cn=yourotheruser,o=dev + AuthLDAPBindPassword yourotherpassword + AuthLDAPURL ldap://other.ldap.host/o=dev?cn +</AuthzProviderAlias> + +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + Require all granted + + AuthBasicProvider file + + AuthType Basic + AuthName LDAP_Protected_Place + + #implied OR operation + Require ldap-group-alias1 + Require ldap-group-alias2 +</Directory> +
    @@ -115,39 +110,27 @@ not belong to either the temps group or the LDAP group Temporary Employees.

    - - <Directory /www/mydocs> - + +<Directory "/www/mydocs"> + <RequireAll> + <RequireAny> + Require user superadmin <RequireAll> - + Require group admins + Require ldap-group cn=Administrators,o=Airius <RequireAny> - - Require user superadmin
    - <RequireAll> - - Require group admins
    - Require ldap-group cn=Administrators,o=Airius
    - <RequireAny> - - Require group sales
    - Require ldap-attribute dept="sales" -
    - </RequireAny> -
    - </RequireAll> -
    - </RequireAny>
    - <RequireNone> - - Require group temps
    - Require ldap-group cn=Temporary Employees,o=Airius -
    - </RequireNone> -
    + Require group sales + Require ldap-attribute dept="sales" + </RequireAny> </RequireAll> -
    - </Directory> -
    + </RequireAny> + <RequireNone> + Require group temps + Require ldap-group cn=Temporary Employees,o=Airius + </RequireNone> + </RequireAll> +</Directory> +
    The Require Directives @@ -171,42 +154,50 @@ User-Agent (browser type), Referer, or other HTTP request header fields.

    - Example: - SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
    - <Directory /docroot>
    - - Require env let_me_in
    -
    - </Directory> -
    + +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +<Directory "/docroot"> + Require env let_me_in +</Directory> +

    In this case, browsers with a user-agent string beginning with KnockKnock/2.0 will be allowed access, and all others will be denied.

    +

    When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.

    +
    Require all -

    The all provider mimics the functionality the +

    The all provider mimics the functionality that was previously provided by the 'Allow from all' and 'Deny from all' directives. This provider can take one of two arguments which are 'granted' or 'denied'. The following examples will grant or deny access to all requests.

    - - Require all granted
    -
    + + Require all granted + - - Require all denied
    -
    + + Require all denied +
    Require method -

    The method provider allows to use the HTTP method in +

    The method provider allows using the HTTP method in authorization decisions. The GET and HEAD methods are treated as equivalent. The TRACE method is not available to this provider, use TraceEnable instead.

    @@ -214,35 +205,51 @@

    The following example will only allow GET, HEAD, POST, and OPTIONS requests:

    - - Require method GET POST OPTIONS
    -
    + + Require method GET POST OPTIONS +

    The following example will allow GET, HEAD, POST, and OPTIONS requests without authentication, and require a valid user for all other methods:

    - - <RequireAny>
    -  Require method GET POST OPTIONS
    -  Require valid-user
    - </RequireAny>
    -
    + +<RequireAny> +  Require method GET POST OPTIONS +  Require valid-user +</RequireAny> +
    Require expr -

    The expr provider allows to base authorization +

    The expr provider allows basing authorization decisions on arbitrary expressions.

    - - Require expr %{TIME_HOUR} >= 9 && %{TIME_HOUR} <= 17
    -
    + + Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17" + + + +<RequireAll> + Require expr "!(%{QUERY_STRING} =~ /secret/)" + Require expr "%{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" +</RequireAll> + + + + Require expr "!(%{QUERY_STRING} =~ /secret/) && %{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" +

    The syntax is described in the ap_expr documentation.

    +

    Normally, the expression is evaluated before authentication. However, if + the expression returns false and references the variable + %{REMOTE_USER}, authentication will be performed and + the expression will be re-evaluated.

    +
    @@ -284,7 +291,8 @@ an authorization provider.
    Access is allowed if expression evaluates to true.
    -

    Some of the allowed syntaxes provided by mod_authz_user +

    Some of the allowed syntaxes provided by mod_authz_user, + mod_authz_host, and mod_authz_groupfile are:

    @@ -298,12 +306,15 @@ an authorization provider.
    Require valid-user
    All valid users can access the resource.
    + +
    Require ip 10 172.20 192.168.2
    +
    Clients in the specified IP address ranges can access the + resource.

    Other authorization modules that implement require options include mod_authnz_ldap, mod_authz_dbm, mod_authz_dbd, - mod_authz_host, mod_authz_owner and mod_ssl.

    In most cases, for a complete authentication and authorization @@ -317,14 +328,14 @@ an authorization provider. and AuthGroupFile (to define users and groups) in order to work correctly. Example:

    - - AuthType Basic
    - AuthName "Restricted Resource"
    - AuthBasicProvider file
    - AuthUserFile /web/users
    - AuthGroupFile /web/groups
    - Require group admin -
    + +AuthType Basic +AuthName "Restricted Resource" +AuthBasicProvider file +AuthUserFile "/web/users" +AuthGroupFile "/web/groups" +Require group admin +

    Access controls which are applied in this way are effective for all methods. This is what is normally @@ -346,22 +357,18 @@ an authorization provider. and beta groups are authorized, except for those who are also in the reject group.

    - - <Directory /www/docs> - - <RequireAll> - - Require group alpha beta
    - Require not group reject -
    - </RequireAll> -
    - </Directory> -
    + +<Directory "/www/docs"> + <RequireAll> + Require group alpha beta + Require not group reject + </RequireAll> +</Directory> +

    When multiple Require directives are used in a single - configuration section + configuration section and are not contained in another authorization directive like RequireAll, they are implicitly contained within a @@ -369,10 +376,22 @@ an authorization provider. directive. Thus the first one to authorize a user authorizes the entire request, and subsequent Require directives are ignored.

    + + Security Warning +

    Exercise caution when setting authorization directives in + Location sections + that overlap with content served out of the filesystem. + By default, these configuration sections overwrite authorization configuration + in Directory, + and Files sections.

    +

    The AuthMerging directive + can be used to control how authorization configuration sections are + merged.

    +
    -Authentication, Authorization, - and Access Control +Access control howto Authorization Containers mod_authn_core mod_authz_host @@ -502,12 +521,12 @@ sections.

    When authorization is enabled, it is normally inherited by each - subsequent configuration section, - unless a different set of authorization directives are specified. + subsequent configuration section, + unless a different set of authorization directives is specified. This is the default action, which corresponds to an explicit setting of AuthMerging Off.

    -

    However, there may be circumstances in which is it desirable +

    However, there may be circumstances in which it is desirable for a configuration section's authorization to be combined with that of its predecessor while configuration sections are being merged. Two options are available for this case, And @@ -536,30 +555,24 @@ sections. preceding sections. Thus only users belong to the group gamma may access /www/docs/ab/gamma. - - <Directory /www/docs> - - AuthType Basic
    - AuthName Documents
    - AuthBasicProvider file
    - AuthUserFile /usr/local/apache/passwd/passwords
    - Require group alpha -
    - </Directory>
    -
    - <Directory /www/docs/ab> - - AuthMerging Or
    - Require group beta -
    - </Directory>
    -
    - <Directory /www/docs/ab/gamma> - - Require group gamma - - </Directory> -
    + +<Directory "/www/docs"> + AuthType Basic + AuthName Documents + AuthBasicProvider file + AuthUserFile "/usr/local/apache/passwd/passwords" + Require group alpha +</Directory> + +<Directory "/www/docs/ab"> + AuthMerging Or + Require group beta +</Directory> + +<Directory "/www/docs/ab/gamma"> + Require group gamma +</Directory> + diff --git a/docs/manual/mod/mod_authz_core.xml.fr b/docs/manual/mod/mod_authz_core.xml.fr new file mode 100644 index 00000000000..2d06795196b --- /dev/null +++ b/docs/manual/mod/mod_authz_core.xml.fr @@ -0,0 +1,670 @@ + + + + + + + + + + + +mod_authz_core +Autorisation basique +Base +mod_authz_core.c +authz_core_module +Disponible depuis la version 2.3 +d'Apache HTTPD + +

    +

    Ce module fournit des fonctionnalités d'autorisation basiques + permettant d'accorder ou refuser l'accès à certaines zones du site + web aux utilisateurs authentifiés. mod_authz_core + donne la possibilité d'enregistrer divers fournisseurs + d'autorisation. Il est en général utilisé avec un module fournisseur + d'authentification comme mod_authn_file, et un + module d'autorisation comme mod_authz_user. Il + permet aussi l'application d'une logique élaborée au déroulement du + processus d'autorisation.

    +
    + +
    Création des alias du fournisseur +d'autorisation + +

    Il est possible de créer des fournisseurs d'autorisation étendus + dans le fichier de configuration et de leur assigner un nom d'alias. + On peut ensuite utiliser ces fournisseurs aliasés dans une + directive Require de + la même manière qu'on le ferait pour des fournisseurs d'autorisation + de base. En plus de la possibilité de créer et d'aliaser un + fournisseur étendu, le même fournisseur d'autorisation étendu peut + être référencé par plusieurs localisations. +

    + +
    Exemple +

    Dans l'exemple suivant, on crée deux alias de fournisseur + d'autorisation ldap différents basés sur le fournisseur + d'autorisation ldap-group. Il est ainsi possible pour un seul + répertoire de vérifier l'appartenance à un groupe dans plusieurs + serveurs ldap : +

    + + +<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> + AuthLDAPBindDN cn=youruser,o=ctx + AuthLDAPBindPassword yourpassword + AuthLDAPURL ldap://ldap.host/o=ctx +</AuthzProviderAlias> + +<AuthzProviderAlias ldap-group ldap-group-alias2 cn=my-other-group,o=dev> + AuthLDAPBindDN cn=yourotheruser,o=dev + AuthLDAPBindPassword yourotherpassword + AuthLDAPURL ldap://other.ldap.host/o=dev?cn +</AuthzProviderAlias> + +Alias "/secure" "/webpages/secure" +<Directory "/webpages/secure"> + Require all granted + + AuthBasicProvider file + + AuthType Basic + AuthName LDAP_Protected_Place + + #implied OR operation + Require ldap-group-alias1 + Require ldap-group-alias2 +</Directory> + +
    + +
    + +
    Conteneurs d'autorisation + +

    Les directives de conteneur d'autorisation RequireAll, + RequireAny et RequireNone + peuvent être combinées entre elles et avec la directive Require pour confectionner une + logique d'autorisation complexe.

    + +

    L'exemple ci-dessous illustre la logique d'autorisation suivante. + Pour pouvoir accéder à la ressource, l'utilisateur doit être + l'utilisateur superadmin, ou appartenir aux deux + groupes LDAP admins et Administrateurs et + soit appartenir au groupe ventes ou avoir + ventes comme valeur de l'attribut LDAP + dept. De plus, pour pouvoir accéder à la ressource, + l'utilisateur ne doit appartenir ni au groupe temps, ni + au groupe LDAP Employés temporaires.

    + + +<Directory "/www/mydocs"> + <RequireAll> + <RequireAny> + Require user superadmin + <RequireAll> + Require group admins + Require ldap-group cn=Administrators,o=Airius + <RequireAny> + Require group sales + Require ldap-attribute dept="sales" + </RequireAny> + </RequireAll> + </RequireAny> + <RequireNone> + Require group temps + Require ldap-group cn=Temporary Employees,o=Airius + </RequireNone> + </RequireAll> +</Directory> + +
    + +
    Les directives Require + +

    Le module mod_authz_core met à disposition des + fournisseurs d'autorisation génériques utilisables avec la directive + Require.

    + +
    Require env + +

    Le fournisseur env permet de contrôler l'accès au + serveur en fonction de l'existence d'une variable d'environnement. Lorsque Require + env env-variable est spécifié, la requête se voit + autoriser l'accès si la variable d'environnement + env-variable existe. Le serveur permet de définir + facilement des variables d'environnement en fonction des + caractéristiques de la requête du client via les directives fournies + par le module mod_setenvif. Cette directive Require + env permet donc de contrôler l'accès en fonction des + valeurs des en-têtes de la requête HTTP tels que + User-Agent (type de navigateur), Referer, + entre autres.

    + + +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +<Directory "/docroot"> + Require env let_me_in +</Directory> + + +

    Avec cet exemple, les navigateurs dont la chaîne user-agent + commence par KnockKnock/2.0 se verront autoriser + l'accès, alors que tous les autres seront rejetés.

    + +

    Lorsque le serveur cherche un chemin via une sous-requête interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il génère un + listing du contenu d'un répertoire via le module + mod_autoindex, la sous-requête n'hérite pas des + variables d'environnement spécifiques à la requête. En outre, à cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas évaluées + séparément dans la sous-requête.

    + +
    + +
    Require all + +

    Le fournisseur all reproduit la fonctionnalité + précédemment fournie par les directives 'Allow from all' et 'Deny + from all'. Il accepte un argument dont les deux valeurs possibles + sont : 'granted' ou 'denied'. Les exemples suivants autorisent ou + interdisent l'accès à toutes les requêtes.

    + + + Require all granted + + + + Require all denied + + +
    + +
    Require method + +

    Le fournisseur method permet d'utiliser la méthode + HTTP dans le processus d'autorisation. Les méthodes GET et HEAD sont + ici considérées comme équivalentes. La méthode TRACE n'est pas + supportée par ce fournisseur ; utilisez à la place la directive + TraceEnable.

    + +

    Dans l'exemple suivant, seules les méthodes GET, HEAD, POST, et + OPTIONS sont autorisées :

    + + + Require method GET POST OPTIONS + + +

    Dans l'exemple suivant, les méthodes GET, HEAD, POST, et OPTIONS + sont autorisées sans authentification, alors que toutes les autres + méthodes nécessitent un utilisateur valide :

    + + +<RequireAny> +  Require method GET POST OPTIONS +  Require valid-user +</RequireAny> + + +
    +
    Require expr + +

    Le fournisseur expr permet d'accorder l'autorisation + d'accès de base en fonction d'expressions arbitraires.

    + + + Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17" + + + +<RequireAll> + Require expr "!(%{QUERY_STRING} =~ /secret/)" + Require expr "%{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" +</RequireAll> + + + + Require expr "!(%{QUERY_STRING} =~ /secret/) && %{REQUEST_URI} in { '/example.cgi', '/other.cgi' }" + + +

    La syntaxe de l'expression est décrite dans la documentation de ap_expr.

    + +

    Normalement, l'expression est évaluée avant l'authentification. + Cependant, si l'expression renvoie false et se réfère à la variable + %{REMOTE_USER}, le processus d'authentification sera + engagé et l'expression réévaluée.

    + +
    + +
    + + +Require +Vérifie si un utilisateur authentifié a une +autorisation d'accès accordée par un fournisseur +d'autorisation. +Require [not] nom-entité [nom-entité] +... +directory.htaccess + +AuthConfig + + +

    Cette directive permet de vérifier si un utilisateur authentifié + a l'autorisation d'accès accordée pour un certain fournisseur + d'autorisation et en tenant compte de certaines restrictions. + mod_authz_core met à disposition les fournisseurs + d'autorisation génériques suivants :

    + +
    +
    Require all granted
    +
    L'accès est autorisé sans restriction.
    + +
    Require all denied
    +
    L'accès est systématiquement refusé.
    + +
    Require env env-var [env-var] + ...
    +
    L'accès n'est autorisé que si l'une au moins des variables + d'environnement spécifiées est définie.
    + +
    Require method http-method [http-method] + ...
    +
    L'accès n'est autorisé que pour les méthodes HTTP spécifiées.
    + +
    Require expr expression
    +
    L'accès est autorisé si expression est évalué à + vrai.
    +
    + +

    Voici quelques exemples de syntaxes autorisées par + mod_authz_user, mod_authz_host et + mod_authz_groupfile :

    + +
    +
    Require user identifiant utilisateur + [identifiant utilisateur] + ...
    +
    Seuls les utilisateurs spécifiés auront accès à la + ressource.
    + +
    Require group nom groupe [nom + groupe] + ...
    +
    Seuls les utilisateurs appartenant aux groupes spécifiés + auront accès à la ressource.
    + +
    Require valid-user
    +
    Tous les utilisateurs valides auront accès à la + ressource.
    + +
    Require ip 10 172.20 192.168.2
    +
    Les clients dont les adresses IP font partie des tranches + spécifiées auront accès à la ressource.
    +
    + +

    D'autres modules d'autorisation comme + mod_authnz_ldap, mod_authz_dbm, + mod_authz_dbd, + mod_authz_owner et mod_ssl + implémentent des options de la directive Require.

    + +

    Pour qu'une configuration d'authentification et d'autorisation + fonctionne correctement, la directive Require + doit être accompagnée dans la plupart des cas de directives AuthName, AuthType et AuthBasicProvider ou AuthDigestProvider, ainsi que + de directives telles que AuthUserFile et AuthGroupFile (pour la + définition des utilisateurs et des groupes). Exemple :

    + + +AuthType Basic +AuthName "Restricted Resource" +AuthBasicProvider file +AuthUserFile "/web/users" +AuthGroupFile "/web/groups" +Require group admin + + +

    Les contrôles d'accès appliqués de cette manière sont effectifs + pour toutes les méthodes. C'est d'ailleurs + ce que l'on souhaite en général. Si vous voulez n'appliquer + les contrôles d'accès qu'à certaines méthodes, tout en laissant les + autres méthodes sans protection, placez la directive + Require dans une section Limit.

    + +

    Le résultat de la directive Require peut + être inversé en utilisant l'option not. Comme dans le + cas de l'autre directive d'autorisation inversée RequireNone, si la directive + Require est inversée, elle ne peut qu'échouer + ou produire un résultat neutre ; elle ne peut donc alors pas + autoriser une requête de manière indépendante.

    + +

    Dans l'exemple suivant, tous les utilisateurs appartenant aux + groupes alpha et beta ont l'autorisation + d'accès, à l'exception de ceux appartenant au groupe + reject.

    + + +<Directory "/www/docs"> + <RequireAll> + Require group alpha beta + Require not group reject + </RequireAll> +</Directory> + + +

    Lorsque plusieurs directives Require sont + placées dans une même section de + configuration, et ne se trouvent pas dans une autre directive + d'autorisation comme RequireAll, elles sont implicitement + contenues dans une directive RequireAny. Ainsi, la première directive + Require qui autorise l'accès à un utilisateur + autorise l'accès pour l'ensemble de la requête, et les directives + Require suivantes sont ignorées.

    + + Avertissement à propos de la sécurité +

    Prettez une attention particulière aux directives d'autorisation + définies + au sein des sections Location + qui se chevauchent avec des contenus servis depuis le système de + fichiers. Par défaut, les configurations définies dans ces sections l'emportent sur les + configurations d'autorisations définies au sein des sections + Directory et Files sections.

    +

    La directive AuthMerging permet de contrôler + la manière selon laquelle les configurations d'autorisations sont + fusionnées au sein des sections précitées.

    +
    +
    + + +Tutoriel du contrôle d'accès +Conteneurs d'autorisation +mod_authn_core +mod_authz_host +
    + + +RequireAll +Regroupe plusieurs directives d'autorisation dont aucune ne +doit échouer et dont au moins une doit retourner un résultat positif +pour que la directive globale retourne elle-même un résultat +positif. +<RequireAll> ... </RequireAll> +directory.htaccess + +AuthConfig + + +

    Les balises RequireAll et + </RequireAll> permettent de regrouper des + directives d'autorisation dont aucune ne doit échouer, et dont au + moins une doit retourner un résultat positif pour que la directive + RequireAll retourne elle-même + un résultat positif.

    + +

    Si aucune des directives contenues dans la directive RequireAll n'échoue, et si au moins une + retourne un résultat positif, alors la directive RequireAll retourne elle-même un résultat + positif. Si aucune ne retourne un résultat positif, et si aucune + n'échoue, la directive globale retourne un résultat neutre. Dans + tous les autres cas, elle échoue.

    +
    + +Conteneurs d'autorisation +Authentification, autorisation et +contrôle d'accès + +
    + + +RequireAny +Regroupe des directives d'autorisation dont au moins une +doit retourner un résultat positif pour que la directive globale +retourne elle-même un résultat positif. +<RequireAny> ... </RequireAny> +directory.htaccess + +AuthConfig + + +

    Les balises RequireAny et + </RequireAny> permettent de regrouper des + directives d'autorisation dont au moins une doit retourner un + résultat positif pour que la directive RequireAny retourne elle-même un résultat + positif.

    + +

    Si une ou plusieurs directives contenues dans la directive + RequireAny retournent un + résultat positif, alors la directive RequireAny retourne elle-même un résultat + positif. Si aucune ne retourne un résultat positif et aucune + n'échoue, la directive globale retourne un résultat neutre. Dans + tous les autres cas, elle échoue.

    + + Comme les directives d'autorisation inversées sont incapables + de retourner un résultat positif, elles ne peuvent pas impacter de + manière significative le résultat d'une directive RequireAny (elles pourraient tout au plus + faire échouer la directive dans le cas où elles échoueraient + elles-mêmes, et où + toutes les autres directives retourneraient un résultat neutre). + C'est pourquoi il n'est pas permis d'utiliser les directives + d'autorisation inversées dans une directive RequireAny. +
    + +Conteneurs d'autorisation +Authentification, autorisation et +contrôle d'accès + +
    + + +RequireNone +Regroupe des directives d'autorisation dont aucune ne doit +retourner un résultat positif pour que la directive globale n'échoue +pas. +<RequireNone> ... </RequireNone> +directory.htaccess + +AuthConfig + + +

    Les balises RequireNone et + </RequireNone> permettent de regrouper des + directives d'autorisation dont aucune ne doit retourner un résultat + positif pour que la directive RequireNone n'échoue pas.

    + +

    Si une ou plusieurs directives contenues dans la directive + RequireNone retournent un + résultat positif, la directive RequireNone échouera. Dans tous les + autres cas, cette dernière retournera un résultat neutre. Ainsi, + comme pour la directive d'autorisation inversée Require + not, elle ne peut jamais autoriser une requête de manière + indépendante car elle ne pourra jamais retourner un résultat + positif. Par contre, on peut l'utiliser pour restreindre l'ensemble + des utilisateurs autorisés à accéder à une ressource.

    + + Comme les directives d'autorisation inversées sont incapables + de retourner un résultat positif, elles ne peuvent pas impacter de + manière significative le résultat d'une directive RequireNone. + C'est pourquoi il n'est pas permis d'utiliser les directives + d'autorisation inversées dans une directive RequireNone. +
    + +Conteneurs d'autorisation +Authentification, autorisation et +contrôle d'accès + +
    + + +AuthMerging +Définit la manière dont chaque logique d'autorisation des +sections de configuration se combine avec celles des sections de +configuration précédentes. +AuthMerging Off | And | Or +AuthMerging Off +directory.htaccess + +AuthConfig + + +

    Lorsque l'autorisation est activée, elle est normalement héritée + par chaque section de + configuration suivante, à moins qu'un jeu de directives + d'autorisations différent ne soit spécifié. Il s'agit du + comportement par défaut, qui correspond à la définition explicite + AuthMerging Off.

    + +

    Dans certaines situations cependant, il peut être souhaitable de + combiner la logique d'autorisation d'une section de configuration + avec celle de la section précédente lorsque les sections de + configuration se combinent entre elles. Dans ce cas, deux options + sont disponibles, And et Or.

    + +

    Lorsqu'une section de configuration contient AuthMerging + And ou AuthMerging Or, sa logique d'autorisation + se combine avec celle de la section de configuration qui la précède + (selon l'ordre général des sections de configuration), et qui + contient aussi une logique d'autorisation, comme si les deux + sections étaient concaténées respectivement dans une directive + RequireAll ou RequireAny.

    + + La définition de la directive + AuthMerging ne concerne que la section de + configuration dans laquelle elle apparaît. Dans l'exemple suivant, + seuls les utilisateurs appartenant au groupe alpha sont + autorisés à accéder à /www/docs. Les utilisateurs + appartenant au groupe alpha ou au groupe + beta sont autorisés à accéder à + /www/docs/ab. Cependant, la définition implicite à + Off de la directive AuthMerging + s'applique à la section de configuration Directory concernant le répertoire + /www/docs/ab/gamma, ce qui implique que les directives + d'autorisation de cette section l'emportent sur celles des sections + précédentes. Par voie de conséquence, seuls les utilisateurs + appartenant au groupe gamma sont autorisés à accéder à + /www/docs/ab/gamma. + + +<Directory "/www/docs"> + AuthType Basic + AuthName Documents + AuthBasicProvider file + AuthUserFile "/usr/local/apache/passwd/passwords" + Require group alpha +</Directory> + +<Directory "/www/docs/ab"> + AuthMerging Or + Require group beta +</Directory> + +<Directory "/www/docs/ab/gamma"> + Require group gamma +</Directory> + +
    + +
    + + +AuthzProviderAlias +Regroupe des directives représentant une extension d'un +fournisseur d'autorisation de base qui pourra être référencée à l'aide +de l'alias spécifié +<AuthzProviderAlias fournisseur-de-base Alias +Paramètres-Require> +... </AuthzProviderAlias> + +server config + + + +

    Les balises AuthzProviderAlias et + </AuthzProviderAlias> permettent de regrouper des + directives d'autorisation auxquelles on pourra faire référence à + l'aide de l'alias spécifié dans une directive Require.

    + +
    +
    + + +AuthzSendForbiddenOnFailure +Envoie '403 FORBIDDEN' au lieu de '401 UNAUTHORIZED' si +l'authentification réussit et si l'autorisation a été refusée. + +AuthzSendForbiddenOnFailure On|Off +AuthzSendForbiddenOnFailure Off +directory.htaccess + +Disponible depuis la version 2.3.11 d'Apache HTTPD + + +

    Par défaut, si l'authentification réussit, alors que + l'autorisation est refusée, Apache HTTPD renvoie un code de réponse + HTTP '401 UNAUTHORIZED'. En général, les navigateurs proposent alors + une nouvelle fois à l'utilisateur la boîte de dialogue de saisie du + mot de passe, ce qui n'est pas toujours souhaitable. La directive + AuthzSendForbiddenOnFailure permet de changer + le code de réponse en '403 FORBIDDEN'.

    + + Avertissement de sécurité +

    La modification de la réponse en cas de refus d'autorisation + diminue la sécurité du mot de passe, car elle indique à un éventuel + attaquant que le mot de passe qu'il a saisi était correct.

    +
    +
    +
    + + diff --git a/docs/manual/mod/mod_authz_core.xml.meta b/docs/manual/mod/mod_authz_core.xml.meta index 6f3ad4cf8f6..5023ce74e38 100644 --- a/docs/manual/mod/mod_authz_core.xml.meta +++ b/docs/manual/mod/mod_authz_core.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_authz_dbd.html b/docs/manual/mod/mod_authz_dbd.html index dc683bf7fd0..ce414fc781e 100644 --- a/docs/manual/mod/mod_authz_dbd.html +++ b/docs/manual/mod/mod_authz_dbd.html @@ -3,3 +3,7 @@ URI: mod_authz_dbd.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_authz_dbd.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_authz_dbd.html.en b/docs/manual/mod/mod_authz_dbd.html.en index 3164de0ded0..a4add6333eb 100644 --- a/docs/manual/mod/mod_authz_dbd.html.en +++ b/docs/manual/mod/mod_authz_dbd.html.en @@ -1,27 +1,33 @@ - -mod_authz_dbd - Apache HTTP Server +mod_authz_dbd - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_dbd

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -44,18 +50,19 @@ the backend database driver and connection parameters, and manage the database connections.

    -
    top
    +

    The Require Directives

    + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_dbd extends the + authorization types with dbd-group, dbd-login and + dbd-logout.

    + +

    Since v2.4.8, expressions are supported + within the DBD require directives.

    + +

    Require dbd-group

    + +

    This directive specifies group membership that is required for the + user to gain access.

    + +
          Require dbd-group team
    +      AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"
    + + + + +

    Require dbd-login

    + +

    This directive specifies a query to be run indicating the user + has logged in.

    + +
          Require dbd-login
    +      AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
    + + + + +

    Require dbd-logout

    + +

    This directive specifies a query to be run indicating the user + has logged out.

    + +
          Require dbd-logout
    +      AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
    + + + + +
    top
    +

    Database Login

    @@ -81,22 +134,21 @@ supplying the necessary credentials).

    For usage details, see the configuration example below.

    top
    -

    Client Login

    +

    Client Login integration

    Some administrators may wish to implement client-side session management that works in concert with the server-side login/logout capabilities offered by this module, for example, by setting or unsetting -an HTTP cookie or other such token when a user logs in or out. -To support such integration, mod_authz_dbd exports an +an HTTP cookie or other such token when a user logs in or out.

    +

    To support such integration, mod_authz_dbd exports an optional hook that will be run whenever a user's status is updated in the database. Other session management modules can then use the hook to implement functions that start and end client-side sessions.

    top
    -

    Configuration Example

    +

    Configuration example

    -
    -# mod_dbd configuration
    +
    # mod_dbd configuration
     DBDriver pgsql
     DBDParams "dbname=apacheauth user=apache pass=xxxxxx"
     
    @@ -105,7 +157,7 @@ DBDKeep 8
     DBDMax  20
     DBDExptime 300
     
    -<Directory /usr/www/my.site/team-private/>
    +<Directory "/usr/www/my.site/team-private/">
       # mod_authn_core and mod_auth_basic configuration
       # for mod_authn_dbd
       AuthType Basic
    @@ -125,31 +177,28 @@ DBDExptime 300
       # when a user fails to be authenticated or authorized,
       # invite them to login; this page should provide a link
       # to /team-private/login.html
    -  ErrorDocument 401 /login-info.html
    +  ErrorDocument 401 "/login-info.html"
     
    -  <Files login.html>
    +  <Files "login.html">
         # don't require user to already be logged in!
    -    AuthDBDUserPWQuery \
    -      "SELECT password FROM authn WHERE user = %s"
    +    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
     
         # dbd-login action executes a statement to log user in
         Require dbd-login
    -    AuthzDBDQuery \
    -      "UPDATE authn SET login = 'true' WHERE user = %s"
    +    AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
     
         # return user to referring page (if any) after
         # successful login
         AuthzDBDLoginToReferer On
       </Files>
     
    -  <Files logout.html>
    +  <Files "logout.html">
         # dbd-logout action executes a statement to log user out
         Require dbd-logout
    -    AuthzDBDQuery \
    -      "UPDATE authn SET login = 'false' WHERE user = %s"
    +    AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
       </Files>
    -</Directory>
    -
    +</Directory> +
    top

    AuthzDBDLoginToReferer Directive

    @@ -192,22 +241,18 @@ header is present The first column value of each row returned by the query statement should be a string containing a group name. Zero, one, or more rows may be returned. -

    Example

    -Require dbd-group
    -AuthzDBDQuery \
    -  "SELECT group FROM groups WHERE user = %s"
    -
    +
    Require dbd-group
    +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"
    +
  • When used with a Require dbd-login or Require dbd-logout directive, it will never deny access, but will instead execute a SQL statement designed to log the user in or out. The user must already be authenticated with mod_authn_dbd. -

    Example

    -Require dbd-login
    -AuthzDBDQuery \
    -  "UPDATE authn SET login = 'true' WHERE user = %s"
    -
    +
    Require dbd-login
    +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
    +
  • In all cases, the user's ID will be passed as a single string @@ -229,10 +274,8 @@ AuthzDBDQuery \ specific to the user. The user's ID will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a %s format specifier.

    -

    Example

    -AuthzDBDRedirectQuery \
    -  "SELECT userpage FROM userpages WHERE user = %s"
    -
    +
    AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"
    +

    The first column value of the first row returned by the query statement should be a string containing a URL to which to redirect the client. Subsequent rows will be ignored. If no rows are returned, @@ -243,8 +286,30 @@ AuthzDBDRedirectQuery \

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_dbd.html.fr b/docs/manual/mod/mod_authz_dbd.html.fr new file mode 100644 index 00000000000..f71ec9d09b2 --- /dev/null +++ b/docs/manual/mod/mod_authz_dbd.html.fr @@ -0,0 +1,334 @@ + + + + + +mod_authz_dbd - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authz_dbd

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Group Authorization and Login using SQL
    Status:Extension
    + + + +
    Description:Autorisation en groupe et reconnaissance d'identit avec base +SQL
    Statut:Extension
    IdentificateurdeModule:authz_dbd_module
    FichierSource:mod_authz_dbd.c
    Compatibilit:Disponible dans les versions 2.4 et suprieures +d'Apache
    +

    Sommaire

    + +

    Ce module fournit des fonctionnalits d'autorisation permettant + d'accorder ou de refuser aux utilisateurs authentifis l'accs + certaines zones du site web en fonction de leur appartenance tel + ou tel groupe. Les modules mod_authz_groupfile et + mod_authz_dbm fournissent une fonctionnalit + similaire, mais ici le module interroge une base de donnes SQL pour + dterminer si un utilisateur appartient ou non tel ou tel groupe.

    +

    Ce module propose galement des fonctionnalits de connexion + utilisateur s'appuyant sur une base de donnes, ce qui peut se rvler + particulirement utile lorsque le module est utilis conjointement avec + mod_authn_dbd.

    +

    Ce module s'appuie sur mod_dbd pour spcifier le + pilote de la base de donnes sous-jacente et les paramtres de + connexion, et grer les connexions la base de donnes.

    +
    + +
    top
    +
    +

    Les directives Require

    + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autoris accder une ressource. mod_authz_dbd ajoute + les types d'autorisation dbd-group, + dbd-login et dbd-logout.

    + +

    A partir de la version 2.4.8, les directives require DBD + supportent les expressions.

    + +

    Require dbd-group

    + +

    Cette directive permet de spcifier quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accs.

    + +
          Require dbd-group team
    +      AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"
    + + + + +

    Require dbd-login

    + +

    Cette directive permet de spcifier une requte excuter pour + indiquer que l'utilisateur s'est authentifi.

    + +
          Require dbd-login
    +      AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
    + + + + +

    Require dbd-logout

    + +

    Cette directive permet de spcifier une requte excuter pour + indiquer que l'utilisateur s'est dconnect.

    + +
          Require dbd-logout
    +      AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
    + + + + +
    top
    +
    +

    Reconnaissance d'identit s'appuyant sur une base de donnes

    + +

    +Outre sa fonction d'autorisation standard consistant vrifier +l'appartenance des groupes, ce module permet aussi de grer des +sessions utilisateur ct serveur grce sa fonctionnalit de connexion utilisateur +en s'appuyant sur une base de donnes. En particulier, il peut mettre +jour le statut de session de l'utilisateur dans la base de donnes +chaque fois que celui-ci visite certaines URLs (sous rserve bien +entendu que l'utilisateur fournissent les informations de connexion +ncessaires).

    +

    Pour cela, il faut definir deux directives Require spciales : Require +dbd-login et Require dbd-logout. Pour les dtails de +leur utilisation, voir l'exemple de configuration ci-dessous.

    +
    top
    +
    +

    Reconnaissance d'identit ct client

    + +

    Certains administrateurs peuvent vouloir implmenter une gestion de +session ct client fonctionnant de concert avec les fonctionnalits de +connexion/dconnexion des utilisateurs ct serveur offertes par ce module, en +dfinissant ou en annulant par exemple un cookie HTTP ou un jeton +similaire lorsqu'un utilisateur se connecte ou se dconnecte.

    + +

    Pour supporter une telle intgration, mod_authz_dbd exporte +un programme dclenchement optionnel (hook) qui sera lanc chaque fois +que le statut d'un utilisateur sera mis jour dans la base de donnes. +D'autres modules de gestion de session pourront alors utiliser ce +programme pour implmenter des fonctions permettant d'ouvrir et de +fermer des sessions ct client.

    +
    top
    +
    +

    Exemple de configuration

    + +
    # configuration de mod_dbd
    +DBDriver pgsql
    +DBDParams "dbname=apacheauth user=apache pass=xxxxxx"
    +
    +DBDMin  4
    +DBDKeep 8
    +DBDMax  20
    +DBDExptime 300
    +
    +<Directory "/usr/www/mon.site/team-private/">
    +  # configuration de mod_authn_core et mod_auth_basic
    +  # pour mod_authn_dbd
    +  AuthType Basic
    +  AuthName Team
    +  AuthBasicProvider dbd
    +
    +  # requte SQL de mod_authn_dbd pour authentifier un utilisateur qui se
    +  # connecte
    +  AuthDBDUserPWQuery \
    +    "SELECT password FROM authn WHERE user = %s AND login = 'true'"
    +
    +  # configuration de mod_authz_core pour mod_authz_dbd
    +  Require dbd-group team
    +
    +  # configuration de mod_authz_dbd
    +  AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"
    +
    +  # lorsqu'un utilisateur choue dans sa tentative d'authentification ou
    +  # d'autorisation, on l'invite  se connecter ; cette page doit
    +  # contenir un lien vers /team-private/login.html
    +  ErrorDocument 401 "/login-info.html"
    +
    +  <Files "login.html">
    +    # il n'est pas ncessaire que l'utilisateur soit dj connect !
    +    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
    +
    +    # le processus de connexion dbd excute une requte pour enregistrer
    +    # la connexion de l'utilisateur
    +    Require dbd-login
    +    AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
    +
    +    # redirige l'utilisateur vers la page d'origine (si elle existe)
    +    # aprs une connexion russie
    +    AuthzDBDLoginToReferer On
    +  </Files>
    +
    +  <Files "logout.html">
    +    # le processus de dconnexion dbd excute une requte pour
    +    # enregistrer la dconnexion de l'utilisateur
    +    Require dbd-logout
    +    AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
    +  </Files>
    +</Directory>
    + +
    +
    top
    +

    Directive AuthzDBDLoginToReferer

    + + + + + + + +
    Description:Dfinit si le client doit tre redirig vers la page +d'origine en cas de connexion ou de dconnexion russie si un en-tte +de requte Referer est prsent
    Syntaxe:AuthzDBDLoginToReferer On|Off
    Dfaut:AuthzDBDLoginToReferer Off
    Contexte:rpertoire
    Statut:Extension
    Module:mod_authz_dbd
    +

    Utilise en conjonction avec Require dbd-login ou + Require dbd-logout, cette directive permet de rediriger + le client vers la page d'origine (l'URL contenue dans l'en-tte + de requte HTTP Referer, s'il est prsent). En + l'absence d'en-tte Referer, la dfinition + AuthzDBDLoginToReferer On sera ignore.

    + +
    +
    top
    +

    Directive AuthzDBDQuery

    + + + + + + +
    Description:Dfinit la requte SQL pour l'opration requise
    Syntaxe:AuthzDBDQuery requte
    Contexte:rpertoire
    Statut:Extension
    Module:mod_authz_dbd
    +

    La directive AuthzDBDQuery permet de + spcifier une requte SQL excuter. Le but de cette requte dpend + de la directive Require en cours de + traitement.

    +
      +
    • Avec la directive Require dbd-group, elle spcifie + une requte permettant de rechercher les groupes d'appartenance de + l'utilisateur courant. Ceci correspond la fonctionnalit standard + d'autres modules d'autorisation comme + mod_authz_groupfile et + mod_authz_dbm. + La premire colonne de chaque enregistrement renvoy par la requte + doit contenir une chane de caractres correspondant un nom de + groupe. La requte peut renvoyer zro, un ou plusieurs + enregistrements. +
      Require dbd-group
      +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"
      + +
    • +
    • Avec la directive Require dbd-login ou + Require dbd-logout, elle ne refusera jamais l'accs, + mais au contraire excutera une requte SQL permettant d'enregistrer + la connexion ou la dconnexion de l'utilisateur. Ce dernier doit + tre dj authentifi avec mod_authn_dbd. +
      Require dbd-login
      +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
      + +
    • +
    +

    Dans tous les cas, l'identifiant utilisateur sera transmis comme + paramtre sous la forme d'une simple chane lorsque la requte SQL + sera excute. Il y sera fait rfrence dans la requte en utilisant + le spcificateur de format %s.

    + +
    +
    top
    +

    Directive AuthzDBDRedirectQuery

    + + + + + + +
    Description:Dfinit une requte pour rechercher une page vers laquelle +rediriger l'utilisateur aprs une connexion russie
    Syntaxe:AuthzDBDRedirectQuery requte
    Contexte:rpertoire
    Statut:Extension
    Module:mod_authz_dbd
    +

    Spcifie une requte SQL optionnelle utiliser aprs une + connexion (ou une dconnexion) russie pour rediriger l'utilisateur + vers une URL, qui peut tre spcifique l'utilisateur. + L'identifiant utilisateur sera transmis comme paramtre sous la + forme d'une simple chane lorsque la requte SQL sera excute. Il y + sera fait rfrence dans la requte en utilisant le spcificateur de + format %s.

    +
    AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"
    + +

    La premire colonne du premier enregistrement renvoy par la + requte doit contenir une chane de caractres correspondant une + URL vers laquelle rediriger le client. Les enregistrements suivants + sont ignors. Si aucun enregistrement n'est renvoy, le client ne + sera pas redirig.

    +

    Notez que AuthzDBDLoginToReferer l'emporte + sur cette directive si les deux sont dfinies.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_dbd.xml b/docs/manual/mod/mod_authz_dbd.xml index df51339ff3b..84717c396ad 100644 --- a/docs/manual/mod/mod_authz_dbd.xml +++ b/docs/manual/mod/mod_authz_dbd.xml @@ -52,6 +52,55 @@ DBDriver DBDParams +
    The Require Directives + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_dbd extends the + authorization types with dbd-group, dbd-login and + dbd-logout.

    + +

    Since v2.4.8, expressions are supported + within the DBD require directives.

    + +
    Require dbd-group + +

    This directive specifies group membership that is required for the + user to gain access.

    + + + Require dbd-group team + AuthzDBDQuery "SELECT group FROM authz WHERE user = %s" + + +
    + +
    Require dbd-login + +

    This directive specifies a query to be run indicating the user + has logged in.

    + + + Require dbd-login + AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" + + +
    + +
    Require dbd-logout + +

    This directive specifies a query to be run indicating the user + has logged out.

    + + + Require dbd-logout + AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" + + +
    + +
    +
    Database Login

    @@ -68,20 +117,20 @@ For usage details, see the configuration example below.

    -Client Login +Client Login integration

    Some administrators may wish to implement client-side session management that works in concert with the server-side login/logout capabilities offered by this module, for example, by setting or unsetting -an HTTP cookie or other such token when a user logs in or out. -To support such integration, mod_authz_dbd exports an +an HTTP cookie or other such token when a user logs in or out.

    +

    To support such integration, mod_authz_dbd exports an optional hook that will be run whenever a user's status is updated in the database. Other session management modules can then use the hook to implement functions that start and end client-side sessions.

    -Configuration Example -
    +Configuration example
    +
     # mod_dbd configuration
     DBDriver pgsql
     DBDParams "dbname=apacheauth user=apache pass=xxxxxx"
    @@ -91,7 +140,7 @@ DBDKeep 8
     DBDMax  20
     DBDExptime 300
     
    -<Directory /usr/www/my.site/team-private/>
    +<Directory "/usr/www/my.site/team-private/">
       # mod_authn_core and mod_auth_basic configuration
       # for mod_authn_dbd
       AuthType Basic
    @@ -111,31 +160,28 @@ DBDExptime 300
       # when a user fails to be authenticated or authorized,
       # invite them to login; this page should provide a link
       # to /team-private/login.html
    -  ErrorDocument 401 /login-info.html
    +  ErrorDocument 401 "/login-info.html"
     
    -  <Files login.html>
    +  <Files "login.html">
         # don't require user to already be logged in!
    -    AuthDBDUserPWQuery \
    -      "SELECT password FROM authn WHERE user = %s"
    +    AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"
     
         # dbd-login action executes a statement to log user in
         Require dbd-login
    -    AuthzDBDQuery \
    -      "UPDATE authn SET login = 'true' WHERE user = %s"
    +    AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"
     
         # return user to referring page (if any) after
         # successful login
         AuthzDBDLoginToReferer On
       </Files>
     
    -  <Files logout.html>
    +  <Files "logout.html">
         # dbd-logout action executes a statement to log user out
         Require dbd-logout
    -    AuthzDBDQuery \
    -      "UPDATE authn SET login = 'false' WHERE user = %s"
    +    AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"
       </Files>
     </Directory>
    -
    +
    @@ -157,22 +203,20 @@ DBDExptime 300 The first column value of each row returned by the query statement should be a string containing a group name. Zero, one, or more rows may be returned. - Example
    +    
     Require dbd-group
    -AuthzDBDQuery \
    -  "SELECT group FROM groups WHERE user = %s"
    -
    +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" +
  • When used with a Require dbd-login or Require dbd-logout directive, it will never deny access, but will instead execute a SQL statement designed to log the user in or out. The user must already be authenticated with mod_authn_dbd. - Example
    +    
     Require dbd-login
    -AuthzDBDQuery \
    -  "UPDATE authn SET login = 'true' WHERE user = %s"
    -
    +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" +
  • In all cases, the user's ID will be passed as a single string @@ -193,10 +237,9 @@ AuthzDBDQuery \ specific to the user. The user's ID will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a %s format specifier.

    - Example
    -AuthzDBDRedirectQuery \
    -  "SELECT userpage FROM userpages WHERE user = %s"
    -
    + +AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s" +

    The first column value of the first row returned by the query statement should be a string containing a URL to which to redirect the client. Subsequent rows will be ignored. If no rows are returned, diff --git a/docs/manual/mod/mod_authz_dbd.xml.fr b/docs/manual/mod/mod_authz_dbd.xml.fr new file mode 100644 index 00000000000..84481a4a55d --- /dev/null +++ b/docs/manual/mod/mod_authz_dbd.xml.fr @@ -0,0 +1,295 @@ + + + + + + + + + + + +mod_authz_dbd +Autorisation en groupe et reconnaissance d'identité avec base +SQL +Extension +mod_authz_dbd.c +authz_dbd_module +Disponible dans les versions 2.4 et supérieures +d'Apache + +

    +

    Ce module fournit des fonctionnalités d'autorisation permettant + d'accorder ou de refuser aux utilisateurs authentifiés l'accès à + certaines zones du site web en fonction de leur appartenance à tel + ou tel groupe. Les modules mod_authz_groupfile et + mod_authz_dbm fournissent une fonctionnalité + similaire, mais ici le module interroge une base de données SQL pour + déterminer si un utilisateur appartient ou non à tel ou tel groupe.

    +

    Ce module propose également des fonctionnalités de connexion + utilisateur s'appuyant sur une base de données, ce qui peut se révéler + particulièrement utile lorsque le module est utilisé conjointement avec + mod_authn_dbd.

    +

    Ce module s'appuie sur mod_dbd pour spécifier le + pilote de la base de données sous-jacente et les paramètres de + connexion, et gérer les connexions à la base de données.

    +
    + +Require + + AuthDBDUserPWQuery + +DBDriver +DBDParams + +
    Les directives Require + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autorisé à accéder à une ressource. mod_authz_dbd ajoute + les types d'autorisation dbd-group, + dbd-login et dbd-logout.

    + +

    A partir de la version 2.4.8, les directives require DBD + supportent les expressions.

    + +
    Require dbd-group + +

    Cette directive permet de spécifier à quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accès.

    + + + Require dbd-group team + AuthzDBDQuery "SELECT group FROM authz WHERE user = %s" + + +
    + +
    Require dbd-login + +

    Cette directive permet de spécifier une requête à exécuter pour + indiquer que l'utilisateur s'est authentifié.

    + + + Require dbd-login + AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" + + +
    + +
    Require dbd-logout + +

    Cette directive permet de spécifier une requête à exécuter pour + indiquer que l'utilisateur s'est déconnecté.

    + + + Require dbd-logout + AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" + + +
    + +
    + +
    +Reconnaissance d'identité s'appuyant sur une base de données +

    +Outre sa fonction d'autorisation standard consistant à vérifier +l'appartenance à des groupes, ce module permet aussi de gérer des +sessions utilisateur côté serveur grâce à sa fonctionnalité de connexion utilisateur +en s'appuyant sur une base de données. En particulier, il peut mettre à +jour le statut de session de l'utilisateur dans la base de données +chaque fois que celui-ci visite certaines URLs (sous réserve bien +entendu que l'utilisateur fournissent les informations de connexion +nécessaires).

    +

    Pour cela, il faut definir deux directives Require spéciales : Require +dbd-login et Require dbd-logout. Pour les détails de +leur utilisation, voir l'exemple de configuration ci-dessous.

    +
    + +
    +Reconnaissance d'identité côté client +

    Certains administrateurs peuvent vouloir implémenter une gestion de +session côté client fonctionnant de concert avec les fonctionnalités de +connexion/déconnexion des utilisateurs côté serveur offertes par ce module, en +définissant ou en annulant par exemple un cookie HTTP ou un jeton +similaire lorsqu'un utilisateur se connecte ou se déconnecte.

    + +

    Pour supporter une telle intégration, mod_authz_dbd exporte +un programme à déclenchement optionnel (hook) qui sera lancé chaque fois +que le statut d'un utilisateur sera mis à jour dans la base de données. +D'autres modules de gestion de session pourront alors utiliser ce +programme pour implémenter des fonctions permettant d'ouvrir et de +fermer des sessions côté client.

    +
    + +
    +Exemple de configuration + +# configuration de mod_dbd +DBDriver pgsql +DBDParams "dbname=apacheauth user=apache pass=xxxxxx" + +DBDMin 4 +DBDKeep 8 +DBDMax 20 +DBDExptime 300 + +<Directory "/usr/www/mon.site/team-private/"> + # configuration de mod_authn_core et mod_auth_basic + # pour mod_authn_dbd + AuthType Basic + AuthName Team + AuthBasicProvider dbd + + # requête SQL de mod_authn_dbd pour authentifier un utilisateur qui se + # connecte + AuthDBDUserPWQuery \ + "SELECT password FROM authn WHERE user = %s AND login = 'true'" + + # configuration de mod_authz_core pour mod_authz_dbd + Require dbd-group team + + # configuration de mod_authz_dbd + AuthzDBDQuery "SELECT group FROM authz WHERE user = %s" + + # lorsqu'un utilisateur échoue dans sa tentative d'authentification ou + # d'autorisation, on l'invite à se connecter ; cette page doit + # contenir un lien vers /team-private/login.html + ErrorDocument 401 "/login-info.html" + + <Files "login.html"> + # il n'est pas nécessaire que l'utilisateur soit déjà connecté ! + AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" + + # le processus de connexion dbd exécute une requête pour enregistrer + # la connexion de l'utilisateur + Require dbd-login + AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" + + # redirige l'utilisateur vers la page d'origine (si elle existe) + # après une connexion réussie + AuthzDBDLoginToReferer On + </Files> + + <Files "logout.html"> + # le processus de déconnexion dbd exécute une requête pour + # enregistrer la déconnexion de l'utilisateur + Require dbd-logout + AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" + </Files> +</Directory> + +
    + + +AuthzDBDQuery +Définit la requête SQL pour l'opération requise +AuthzDBDQuery requête +directory + + +

    La directive AuthzDBDQuery permet de + spécifier une requête SQL à exécuter. Le but de cette requête dépend + de la directive Require en cours de + traitement.

    +
      +
    • Avec la directive Require dbd-group, elle spécifie + une requête permettant de rechercher les groupes d'appartenance de + l'utilisateur courant. Ceci correspond à la fonctionnalité standard + d'autres modules d'autorisation comme + mod_authz_groupfile et + mod_authz_dbm. + La première colonne de chaque enregistrement renvoyé par la requête + doit contenir une chaîne de caractères correspondant à un nom de + groupe. La requête peut renvoyer zéro, un ou plusieurs + enregistrements. + +Require dbd-group +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" + +
    • +
    • Avec la directive Require dbd-login ou + Require dbd-logout, elle ne refusera jamais l'accès, + mais au contraire exécutera une requête SQL permettant d'enregistrer + la connexion ou la déconnexion de l'utilisateur. Ce dernier doit + être déjà authentifié avec mod_authn_dbd. + +Require dbd-login +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" + +
    • +
    +

    Dans tous les cas, l'identifiant utilisateur sera transmis comme + paramètre sous la forme d'une simple chaîne lorsque la requête SQL + sera exécutée. Il y sera fait référence dans la requête en utilisant + le spécificateur de format %s.

    +
    +
    + + +AuthzDBDRedirectQuery +Définit une requête pour rechercher une page vers laquelle +rediriger l'utilisateur après une connexion réussie +AuthzDBDRedirectQuery requête +directory + + +

    Spécifie une requête SQL optionnelle à utiliser après une + connexion (ou une déconnexion) réussie pour rediriger l'utilisateur + vers une URL, qui peut être spécifique à l'utilisateur. + L'identifiant utilisateur sera transmis comme paramètre sous la + forme d'une simple chaîne lorsque la requête SQL sera exécutée. Il y + sera fait référence dans la requête en utilisant le spécificateur de + format %s.

    + +AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s" + +

    La première colonne du premier enregistrement renvoyé par la + requête doit contenir une chaîne de caractères correspondant à une + URL vers laquelle rediriger le client. Les enregistrements suivants + sont ignorés. Si aucun enregistrement n'est renvoyé, le client ne + sera pas redirigé.

    +

    Notez que AuthzDBDLoginToReferer l'emporte + sur cette directive si les deux sont définies.

    +
    +
    + + +AuthzDBDLoginToReferer +Définit si le client doit être redirigé vers la page +d'origine en cas de connexion ou de déconnexion réussie si un en-tête +de requête Referer est présent +AuthzDBDLoginToReferer On|Off +AuthzDBDLoginToReferer Off +directory + + +

    Utilisée en conjonction avec Require dbd-login ou + Require dbd-logout, cette directive permet de rediriger + le client vers la page d'origine (l'URL contenue dans l'en-tête + de requête HTTP Referer, s'il est présent). En + l'absence d'en-tête Referer, la définition + AuthzDBDLoginToReferer On sera ignorée.

    +
    +
    + + diff --git a/docs/manual/mod/mod_authz_dbd.xml.meta b/docs/manual/mod/mod_authz_dbd.xml.meta index a9213b18eaf..691db29ca90 100644 --- a/docs/manual/mod/mod_authz_dbd.xml.meta +++ b/docs/manual/mod/mod_authz_dbd.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_authz_dbm.html b/docs/manual/mod/mod_authz_dbm.html index 1f8698ac942..ce23dc1d0e3 100644 --- a/docs/manual/mod/mod_authz_dbm.html +++ b/docs/manual/mod/mod_authz_dbm.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_authz_dbm.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_authz_dbm.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/mod/mod_authz_dbm.html.en b/docs/manual/mod/mod_authz_dbm.html.en index f1e1fa35604..a88f6b9224c 100644 --- a/docs/manual/mod/mod_authz_dbm.html.en +++ b/docs/manual/mod/mod_authz_dbm.html.en @@ -1,27 +1,33 @@ - -mod_authz_dbm - Apache HTTP Server +mod_authz_dbm - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_dbm

    Available Languages:  en  | + fr  |  ko 

    @@ -36,16 +42,68 @@ of the web site by group membership. Similar functionality is provided by mod_authz_groupfile.

    -

    Directives

    + +
  • Comments
  • +
    top
    +
    +

    The Require Directives

    + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_dbm extends the + authorization types with dbm-group.

    + +

    Since v2.4.8, expressions are supported + within the DBM require directives.

    + +

    Require dbm-group

    + +

    This directive specifies group membership that is required for the + user to gain access.

    + +
    Require dbm-group admin
    + + + + +

    Require dbm-file-group

    +

    When this directive is specified, the user must be a member of the group + assigned to the file being accessed.

    + +
    Require dbm-file-group
    + + + + +
    top
    +
    +

    Example usage

    + +

    Note that using mod_authz_dbm requires you to require dbm-group +instead of group: +

    +
    <Directory "/foo/bar">
    +  AuthType Basic
    +  AuthName "Secure Area"
    +  AuthBasicProvider dbm
    +  AuthDBMUserFile "site/data/users"
    +  AuthDBMGroupFile "site/data/users"
    +  Require dbm-group admin
    +</Directory>
    + +
    top
    Description:Group authorization using DBM files
    @@ -84,10 +142,9 @@ of user groups for authorization accomplished by first setting the group and password files to point to the same DBM:

    -

    - AuthDBMGroupFile /www/userbase
    - AuthDBMUserFile /www/userbase -

    +
    AuthDBMGroupFile "/www/userbase"
    +AuthDBMUserFile "/www/userbase"
    +

    The key for the single DBM is the username. The value consists of

    @@ -129,8 +186,30 @@ store list of user groups

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_dbm.html.fr b/docs/manual/mod/mod_authz_dbm.html.fr new file mode 100644 index 00000000000..2bf2a5cc024 --- /dev/null +++ b/docs/manual/mod/mod_authz_dbm.html.fr @@ -0,0 +1,225 @@ + + + + + +mod_authz_dbm - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authz_dbm

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    + + + +
    Description:Autorisation base sur les groupes l'aide de fichiers +DBM
    Statut:Extension
    IdentificateurdeModule:authz_dbm_module
    FichierSource:mod_authz_dbm.c
    Compatibilit:Disponible depuis les versions 2.1 et suprieures +d'Apache
    +

    Sommaire

    + +

    Ce module permet d'autoriser ou d'interdire l'accs certaines + zones du site web aux utilisateurs authentifis en fonction de leur + appartenance un groupe spcifi. Le module + mod_authz_groupfile fournit une fonctionnalit + similaire.

    +
    + +
    top
    +
    +

    The Require Directives

    + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autoris accder une ressource. mod_authz_dbm ajoute + les types d'autorisation dbm-group et dbm-file-group.

    + +

    A partir de la version 2.4.8, les directives require DBM + supportent les expressions.

    + +

    Require dbm-group

    + +

    Cette directive permet de spcifier quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accs.

    + +
    Require dbm-group admin
    + + + + +

    Require dbm-file-group

    + +

    Lorsque cette directive est dfinie, l'utilisateur doit + appartenir au groupe du fichier pour pouvoir y accder.

    + +
    Require dbm-file-group
    + + + + +
    top
    +
    +

    Exemple d'utilisation

    + +

    Notez que si vous utilisez mod_authz_dbm, le mot-cl pour les +groupes d'authentification qui tait auparavant group est +maintenant dbm-group : +

    +
    <Directory "/foo/bar">
    +  AuthType Basic 
    +  AuthName "Secure Area"
    +  AuthBasicProvider dbm 
    +  AuthDBMUserFile "site/data/users"
    +  AuthDBMGroupFile "site/data/users" 
    +  Require dbm-group admin 
    +</Directory>
    + +
    +
    top
    +

    Directive AuthDBMGroupFile

    + + + + + + + +
    Description:Dfinit le nom du fichier de base de donnes contenant la +liste des groupes d'utilisateurs permettant de dfinir les +autorisations des utilisateurs
    Syntaxe:AuthDBMGroupFile chemin-fichier
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authz_dbm
    +

    La directive AuthDBMGroupFile sert + dfinir le nom d'un fichier DBM contenant la liste des groupes + d'utilisateurs. Les utilisateurs peuvent ds lors se voir autoriser ou + refuser leurs accs selon l'appartenance tel ou tel groupe. + chemin-fichier est le chemin absolu du + fichier de groupes.

    + +

    La cl du fichier de groupes est le nom d'utilisateur. La valeur + de chaque cl est la liste des groupes, spars par des virgules, + auxquels l'utilisateur appartient. Cette liste ne doit comporter + ni espace, ni caractre ':'.

    + +

    Scurit

    +

    Le fichier spcifi par la directive +AuthDBMGroupFile doit tre situ en dehors de +l'arborescence des documents du serveur web. Ne le placez +surtout pas dans le rpertoire qu'il protge, faute +de quoi, les clients pourraient le tlcharger, en l'abscence de +protection supplmentaire.

    +
    + +

    Utilisation combine de fichiers DBM de groupes et de mots de + passe : dans certains cas, il est plus simple de grer une seule + base de donnes contenant les groupes et mots de passe de chaque + utilisateur. L'criture de programmes de support en est ainsi + simplifie car ils n'ont plus qu'un seul fichier DBM grer et + verrouiller. Pour ce faire, on attribue le mme nom de fichier + DBM aux fichiers de groupes et de mots de passe :

    + +
    AuthDBMGroupFile "/www/userbase"
    +AuthDBMUserFile "/www/userbase"
    + + +

    La cl du fichier DBM unique est le nom d'utilisateur. La + valeur associe la cl contient :

    + +

    + Mot de passe chiffr : Liste de groupes [ : (ignor) ] +

    + +

    La partie mot de passe contient comme d'habitude le mot de + passe chiffr. Viennent ensuite le caractre ':' et la liste des + groupes spars par des virgules. Il est possible d'ajouter + d'autres donnes en fin de ligne aprs un autre caractre ':', + mais elles seront ignores par le module d'autorisation. Il s'agit + du format utilis par www.telescope.org pour sa base de donnes + combine groupes et mots de passe.

    + +
    +
    top
    +

    Directive AuthzDBMType

    + + + + + + + + +
    Description:Dfinit le type de fichier de base de donnes contenant +la liste des groupes d'utilisateurs
    Syntaxe:AuthzDBMType default|SDBM|GDBM|NDBM|DB
    Dfaut:AuthzDBMType default
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_authz_dbm
    +

    Dfinit le type de fichier de base de donnes contenant la + liste des groupes d'utilisateurs. Le type de base de donnes par + dfaut est dtermin la compilation. Les autres types de bases + de donnes disponibles dpendent aussi de la + configuration de la + compilation.

    + +

    Quel que soit le programme que vous utilisez pour crer votre + fichier de groupes, il est impratif que celui-ci soit configur + pour utiliser le mme type de base de donnes.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_dbm.html.ko.euc-kr b/docs/manual/mod/mod_authz_dbm.html.ko.euc-kr index 3d49a34979a..5c80ee5e97c 100644 --- a/docs/manual/mod/mod_authz_dbm.html.ko.euc-kr +++ b/docs/manual/mod/mod_authz_dbm.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_authz_dbm - Apache HTTP Server +mod_authz_dbm - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authz_dbm

    ֽ ƴմϴ. @@ -42,11 +48,11 @@
  • AuthDBMGroupFile
  • AuthzDBMType
  • -

    +

    Bugfix checklist

    +
  • Comments
  • top

    AuthDBMGroupFile þ

    @@ -121,8 +127,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_dbm.xml b/docs/manual/mod/mod_authz_dbm.xml index 5c589bfeb37..c0e1d13d4bf 100644 --- a/docs/manual/mod/mod_authz_dbm.xml +++ b/docs/manual/mod/mod_authz_dbm.xml @@ -38,6 +38,57 @@ Require +
    The Require Directives + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_dbm extends the + authorization types with dbm-group.

    + +

    Since v2.4.8, expressions are supported + within the DBM require directives.

    + +
    Require dbm-group + +

    This directive specifies group membership that is required for the + user to gain access.

    + + + Require dbm-group admin + + +
    + +
    Require dbm-file-group + +

    When this directive is specified, the user must be a member of the group + assigned to the file being accessed.

    + + + Require dbm-file-group + + +
    + +
    + +
    +Example usage +

    Note that using mod_authz_dbm requires you to require dbm-group +instead of group: +

    + +<Directory "/foo/bar"> + AuthType Basic + AuthName "Secure Area" + AuthBasicProvider dbm + AuthDBMUserFile "site/data/users" + AuthDBMGroupFile "site/data/users" + Require dbm-group admin +</Directory> + +
    + AuthDBMGroupFile Sets the name of the database file containing the list @@ -75,10 +126,10 @@ of user groups for authorization accomplished by first setting the group and password files to point to the same DBM:

    - - AuthDBMGroupFile /www/userbase
    - AuthDBMUserFile /www/userbase -
    + +AuthDBMGroupFile "/www/userbase" +AuthDBMUserFile "/www/userbase" +

    The key for the single DBM is the username. The value consists of

    diff --git a/docs/manual/mod/mod_authz_dbm.xml.fr b/docs/manual/mod/mod_authz_dbm.xml.fr new file mode 100644 index 00000000000..f038e5d4f0c --- /dev/null +++ b/docs/manual/mod/mod_authz_dbm.xml.fr @@ -0,0 +1,185 @@ + + + + + + + + + + + +mod_authz_dbm +Autorisation basée sur les groupes à l'aide de fichiers +DBM +Extension +mod_authz_dbm.c +authz_dbm_module +Disponible depuis les versions 2.1 et supérieures +d'Apache + + +

    Ce module permet d'autoriser ou d'interdire l'accès à certaines + zones du site web aux utilisateurs authentifiés en fonction de leur + appartenance à un groupe spécifié. Le module + mod_authz_groupfile fournit une fonctionnalité + similaire.

    +
    + +Require + +
    The Require Directives + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autorisé à accéder à une ressource. mod_authz_dbm ajoute + les types d'autorisation dbm-group et dbm-file-group.

    + +

    A partir de la version 2.4.8, les directives require DBM + supportent les expressions.

    + +
    Require dbm-group + +

    Cette directive permet de spécifier à quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accès.

    + + + Require dbm-group admin + + +
    + +
    Require dbm-file-group + +

    Lorsque cette directive est définie, l'utilisateur doit + appartenir au groupe du fichier pour pouvoir y accéder.

    + + + Require dbm-file-group + + +
    + +
    + +
    +Exemple d'utilisation +

    Notez que si vous utilisez mod_authz_dbm, le mot-clé pour les +groupes d'authentification qui était auparavant group est +maintenant dbm-group : +

    + +<Directory "/foo/bar"> + AuthType Basic + AuthName "Secure Area" + AuthBasicProvider dbm + AuthDBMUserFile "site/data/users" + AuthDBMGroupFile "site/data/users" + Require dbm-group admin +</Directory> + +
    + + +AuthDBMGroupFile +Définit le nom du fichier de base de données contenant la +liste des groupes d'utilisateurs permettant de définir les +autorisations des utilisateurs +AuthDBMGroupFile chemin-fichier +directory.htaccess + +AuthConfig + + +

    La directive AuthDBMGroupFile sert à + définir le nom d'un fichier DBM contenant la liste des groupes + d'utilisateurs. Les utilisateurs peuvent dès lors se voir autoriser ou + refuser leurs accès selon l'appartenance à tel ou tel groupe. + chemin-fichier est le chemin absolu du + fichier de groupes.

    + +

    La clé du fichier de groupes est le nom d'utilisateur. La valeur + de chaque clé est la liste des groupes, séparés par des virgules, + auxquels l'utilisateur appartient. Cette liste ne doit comporter + ni espace, ni caractère ':'.

    + + Sécurité +

    Le fichier spécifié par la directive +AuthDBMGroupFile doit être situé en dehors de +l'arborescence des documents du serveur web. Ne le placez +surtout pas dans le répertoire qu'il protège, faute +de quoi, les clients pourraient le télécharger, en l'abscence de +protection supplémentaire.

    +
    + +

    Utilisation combinée de fichiers DBM de groupes et de mots de + passe : dans certains cas, il est plus simple de gérer une seule + base de données contenant les groupes et mots de passe de chaque + utilisateur. L'écriture de programmes de support en est ainsi + simplifiée car ils n'ont plus qu'un seul fichier DBM à gérer et + à verrouiller. Pour ce faire, on attribue le même nom de fichier + DBM aux fichiers de groupes et de mots de passe :

    + + +AuthDBMGroupFile "/www/userbase" +AuthDBMUserFile "/www/userbase" + + +

    La clé du fichier DBM unique est le nom d'utilisateur. La + valeur associée à la clé contient :

    + + + Mot de passe chiffré : Liste de groupes [ : (ignoré) ] + + +

    La partie mot de passe contient comme d'habitude le mot de + passe chiffré. Viennent ensuite le caractère ':' et la liste des + groupes séparés par des virgules. Il est possible d'ajouter + d'autres données en fin de ligne après un autre caractère ':', + mais elles seront ignorées par le module d'autorisation. Il s'agit + du format utilisé par www.telescope.org pour sa base de données + combinée groupes et mots de passe.

    +
    +
    + + +AuthzDBMType +Définit le type de fichier de base de données contenant +la liste des groupes d'utilisateurs +AuthzDBMType default|SDBM|GDBM|NDBM|DB +AuthzDBMType default +directory.htaccess + +AuthConfig + + +

    Définit le type de fichier de base de données contenant la + liste des groupes d'utilisateurs. Le type de base de données par + défaut est déterminé à la compilation. Les autres types de bases + de données disponibles dépendent aussi de la + configuration de la + compilation.

    + +

    Quel que soit le programme que vous utilisez pour créer votre + fichier de groupes, il est impératif que celui-ci soit configuré + pour utiliser le même type de base de données.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_authz_dbm.xml.ko b/docs/manual/mod/mod_authz_dbm.xml.ko index 01f5c29e2f9..d77cc4fe987 100644 --- a/docs/manual/mod/mod_authz_dbm.xml.ko +++ b/docs/manual/mod/mod_authz_dbm.xml.ko @@ -1,7 +1,7 @@ - + -mod_authz_groupfile - Apache HTTP Server +mod_authz_groupfile - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_groupfile

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -37,15 +43,54 @@ of the web site by group membership. Similar functionality is provided by mod_authz_dbm.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • +
    top
    +
    +

    The Require Directives

    + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_groupfile extends the + authorization types with group and group-file. +

    + +

    Since v2.4.8, expressions are supported + within the groupfile require directives.

    + +

    Require group

    + +

    This directive specifies group membership that is required for the + user to gain access.

    + +
    Require group admin
    + + + +

    Require file-group

    + +

    When this directive is specified, the filesystem permissions on + the file being accessed are consulted. The user must be a member of + a group with the same name as the group that owns the file. + See mod_authz_owner for more + details.

    + +
    Require file-group
    + + + + +
    top

    AuthGroupFile Directive

    @@ -83,9 +128,31 @@ of user groups for authorization

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_groupfile.html.fr b/docs/manual/mod/mod_authz_groupfile.html.fr new file mode 100644 index 00000000000..43ffb87f4c4 --- /dev/null +++ b/docs/manual/mod/mod_authz_groupfile.html.fr @@ -0,0 +1,165 @@ + + + + + +mod_authz_groupfile - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_authz_groupfile

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    +
    + + + +
    Description:Autorisation base sur les groupes l'aide de fichiers +textes
    Statut:Base
    IdentificateurdeModule:authz_groupfile_module
    FichierSource:mod_authz_groupfile.c
    Compatibilit:Disponible depuis les versions 2.1 et suprieures +d'Apache
    +

    Sommaire

    + +

    Ce module permet d'autoriser ou d'interdire l'accs +certaines zones du site web aux utilisateurs authentifis en +fonction de leur appartenance un groupe spcifi. Le module +mod_authz_dbm fournit une fonctionnalit similaire.

    +
    + +
    top
    +
    +

    Les directives Require

    + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autoris accder une ressource. mod_authz_groupfile ajoute + les types d'autorisation group et file-group. +

    + +

    A partir de la version 2.4.8, les directives require groupfile + supportent les expressions.

    + +

    Require group

    + +

    Cette directive permet de spcifier quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accs.

    + +
    Require group admin
    + + + + +

    Require file-group

    + +

    Lorsque cette directive est dfinie, Les permissions systme du fichier + auquel on veut accder sont vrifies. L'utilisateur doit tre un membre d'un + groupe de mme nom que le groupe qui possde le fichier. Voir + mod_authz_owner pour plus de dtails.

    + +
    Require file-group
    + + + + +
    +
    top
    +

    Directive AuthGroupFile

    + + + + + + + +
    Description:Dfinit le nom d'un fichier texte contenant la liste des +groupes d'utilisateurs permettant de dfinir les autorisations des +utilisateurs
    Syntaxe:AuthGroupFile chemin-fichier
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Base
    Module:mod_authz_groupfile
    +

    La directive AuthGroupFile permet de dfinir +le nom d'un fichier texte contenant la liste des groupes d'utilisateurs. +L'appartenance d'un utilisateur tel ou tel groupe pourra ds lors tre utilise +pour dfinir les permissions d'accs de l'utilisateur. +chemin-fichier est le chemin du fichier de groupes. S'il n'est +pas absolu, ce chemin est considr comme relatif au rpertoire dfini par +la directive ServerRoot.

    + +

    Chaque ligne du fichier de groupes contient un nom de groupe +suivi du caractre ':' et des noms des utilisateurs membres du groupe +spars par des espaces.

    + +

    Exemple :

    + mon-groupe : bob joe anne +

    + +

    Notez que la recherche dans de grands fichiers textes est +trs inefficace ; la directive AuthDBMGroupFile fournit de bien meilleures + performances.

    + +

    Scurit

    +

    Le fichier AuthGroupFile ne doit pas +tre stock dans l'arborescence des documents du site web ; ne le placez +surtout pas dans le rpertoire qu'il protge, faute de quoi les +clients pourraient le tlcharger.

    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_groupfile.html.ja.utf8 b/docs/manual/mod/mod_authz_groupfile.html.ja.utf8 index 7d1c6654281..27886aa170b 100644 --- a/docs/manual/mod/mod_authz_groupfile.html.ja.utf8 +++ b/docs/manual/mod/mod_authz_groupfile.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_authz_groupfile - Apache HTTP サーバ +mod_authz_groupfile - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authz_groupfile

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -44,10 +51,10 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_groupfile.html.ko.euc-kr b/docs/manual/mod/mod_authz_groupfile.html.ko.euc-kr index 837c2005fd1..ccbaf9154e9 100644 --- a/docs/manual/mod/mod_authz_groupfile.html.ko.euc-kr +++ b/docs/manual/mod/mod_authz_groupfile.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_authz_groupfile - Apache HTTP Server +mod_authz_groupfile - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authz_groupfile

    @@ -42,11 +48,11 @@ -

    +

    Bugfix checklist

    +
  • Comments
  • top

    AuthGroupFile þ

    @@ -85,9 +91,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_groupfile.xml b/docs/manual/mod/mod_authz_groupfile.xml index 5ebe885aad0..b556396b31e 100644 --- a/docs/manual/mod/mod_authz_groupfile.xml +++ b/docs/manual/mod/mod_authz_groupfile.xml @@ -38,6 +38,44 @@ Require +
    The Require Directives + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_groupfile extends the + authorization types with group and group-file. +

    + +

    Since v2.4.8, expressions are supported + within the groupfile require directives.

    + +
    Require group + +

    This directive specifies group membership that is required for the + user to gain access.

    + + + Require group admin + + +
    + +
    Require file-group + +

    When this directive is specified, the filesystem permissions on + the file being accessed are consulted. The user must be a member of + a group with the same name as the group that owns the file. + See mod_authz_owner for more + details.

    + + + Require file-group + + +
    + +
    + AuthGroupFile Sets the name of a text file containing the list diff --git a/docs/manual/mod/mod_authz_groupfile.xml.fr b/docs/manual/mod/mod_authz_groupfile.xml.fr new file mode 100644 index 00000000000..8d38487f728 --- /dev/null +++ b/docs/manual/mod/mod_authz_groupfile.xml.fr @@ -0,0 +1,124 @@ + + + + + + + + + + + +mod_authz_groupfile +Autorisation basée sur les groupes à l'aide de fichiers +textes +Base +mod_authz_groupfile.c +authz_groupfile_module +Disponible depuis les versions 2.1 et supérieures +d'Apache + + +

    Ce module permet d'autoriser ou d'interdire l'accès à +certaines zones du site web aux utilisateurs authentifiés en +fonction de leur appartenance à un groupe spécifié. Le module +mod_authz_dbm fournit une fonctionnalité similaire.

    +
    + +Require + +
    Les directives Require + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autorisé à accéder à une ressource. mod_authz_groupfile ajoute + les types d'autorisation group et file-group. +

    + +

    A partir de la version 2.4.8, les directives require groupfile + supportent les expressions.

    + +
    Require group + +

    Cette directive permet de spécifier à quel groupe un utilisateur + doit appartenir pour obtenir l'autorisation d'accès.

    + + + Require group admin + + +
    + +
    Require file-group + +

    Lorsque cette directive est définie, Les permissions système du fichier + auquel on veut accéder sont vérifiées. L'utilisateur doit être un membre d'un + groupe de même nom que le groupe qui possède le fichier. Voir + mod_authz_owner pour plus de détails.

    + + + Require file-group + + +
    + +
    + + +AuthGroupFile +Définit le nom d'un fichier texte contenant la liste des +groupes d'utilisateurs permettant de définir les autorisations des +utilisateurs +AuthGroupFile chemin-fichier +directory.htaccess + +AuthConfig + + +

    La directive AuthGroupFile permet de définir +le nom d'un fichier texte contenant la liste des groupes d'utilisateurs. +L'appartenance d'un utilisateur à tel ou tel groupe pourra dès lors être utilisée +pour définir les permissions d'accès de l'utilisateur. +chemin-fichier est le chemin du fichier de groupes. S'il n'est +pas absolu, ce chemin est considéré comme relatif au répertoire défini par +la directive ServerRoot.

    + +

    Chaque ligne du fichier de groupes contient un nom de groupe +suivi du caractère ':' et des noms des utilisateurs membres du groupe +séparés par des espaces.

    + + Exemple : + mon-groupe : bob joe anne + + +

    Notez que la recherche dans de grands fichiers textes est +très inefficace ; la directive AuthDBMGroupFile fournit de bien meilleures + performances.

    + + Sécurité +

    Le fichier AuthGroupFile ne doit pas +être stocké dans l'arborescence des documents du site web ; ne le placez +surtout pas dans le répertoire qu'il protège, faute de quoi les +clients pourraient le télécharger.

    +
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_authz_groupfile.xml.ja b/docs/manual/mod/mod_authz_groupfile.xml.ja index 4890c45a5e2..47d79aad1fe 100644 --- a/docs/manual/mod/mod_authz_groupfile.xml.ja +++ b/docs/manual/mod/mod_authz_groupfile.xml.ja @@ -1,7 +1,7 @@ - + + -mod_authz_host - Apache HTTP Server +mod_authz_host - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_host

    @@ -29,7 +34,7 @@ address)
    -
    説明:プレーンテキストファイルを用いたグループ承認
    ステータス:Base
    モジュール識別子:authz_groupfile_module
    Status:Base
    ModuleIdentifier:authz_host_module
    SourceFile:mod_authz_host.c
    Compatibility:Available in Apache 2.3 and later
    +Compatibility:The forward-dns provider was addded in 2.4.19

    Summary

    The authorization providers implemented by mod_authz_host are @@ -49,18 +54,18 @@ address) leaving other methods unrestricted, by enclosing the directives in a <Limit> section.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    The Require Directives

    @@ -68,7 +73,8 @@ address)

    Apache's Require directive is used during the authorization phase to ensure that a user is allowed or denied access to a resource. mod_authz_host extends the - authorization types with ip and host. + authorization types with ip, host, + forward-dns and local. Other authorization types may also be used but may require that additional authorization modules be loaded.

    @@ -76,6 +82,9 @@ address) access an area of the server. Access can be controlled by hostname, IP Address, or IP Address range.

    +

    Since v2.4.8, expressions are supported + within the host require directives.

    +

    Require ip

    The ip provider allows access to the server @@ -85,35 +94,31 @@ address)

    A full IP address:

    -

    - Require ip 10.1.2.3
    - Require ip 192.168.1.104 192.168.1.205 -

    +
    Require ip 10.1.2.3
    +Require ip 192.168.1.104 192.168.1.205
    +

    An IP address of a host allowed access

    A partial IP address:

    -

    - Require ip 10.1
    - Require ip 10 172.20 192.168.2 -

    +
    Require ip 10.1
    +Require ip 10 172.20 192.168.2
    +

    The first 1 to 3 bytes of an IP address, for subnet restriction.

    A network/netmask pair:

    -

    - Require ip 10.1.0.0/255.255.0.0 -

    +
    Require ip 10.1.0.0/255.255.0.0
    +

    A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.

    A network/nnn CIDR specification:

    -

    - Require ip 10.1.0.0/16 -

    +
    Require ip 10.1.0.0/16
    +

    Similar to the previous case, except the netmask consists of nnn high-order 1 bits.

    @@ -123,11 +128,14 @@ address)

    IPv6 addresses and IPv6 subnets can be specified as shown below:

    -

    - Require ip 2001:db8::a00:20ff:fea7:ccea
    - Require ip 2001:db8::a00:20ff:fea7:ccea/10 -

    +
    Require ip 2001:db8::a00:20ff:fea7:ccea
    +Require ip 2001:db8:1:1::a
    +Require ip 2001:db8:2:1::/64
    +Require ip 2001:db8:3::/48
    + +

    Note: As the IP addresses are parsed on startup, expressions are + not evaluated at request time.

    @@ -140,10 +148,9 @@ address)

    A (partial) domain-name

    -

    - Require host example.org
    - Require host .net example.edu -

    +
    Require host example.org
    +Require host .net example.edu
    +

    Hosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above @@ -159,7 +166,31 @@ address) +

    Require forward-dns

    + +

    The forward-dns provider allows access to the server + to be controlled based on simple host names. When + Require forward-dns host-name is specified, + all IP addresses corresponding to host-name + are allowed access.

    + +

    In contrast to the host provider, this provider does not + rely on reverse DNS lookups: it simply queries the DNS for the host name + and allows a client if its IP matches. As a consequence, it will only + work with host names, not domain names. However, as the reverse DNS is + not used, it will work with clients which use a dynamic DNS service.

    + +
    Require forward-dns bla.example.org
    + + +

    A client the IP of which is resolved from the name + bla.example.org will be granted access.

    + +

    The forward-dns provider was added in 2.4.19.

    + +

    Require local

    +

    The local provider allows access to the server if any of the following conditions is true:

    @@ -173,9 +204,20 @@ address)

    This allows a convenient way to match connections that originate from the local host:

    -

    - Require local -

    +
    Require local
    + + + + +

    Security Note

    + +

    If you are proxying content to your server, you need to be aware + that the client address will be the address of your proxy server, + not the address of the client, and so using the Require + directive in this context may not do what you mean. See + mod_remoteip for one possible solution to this + problem.

    +
    @@ -183,7 +225,28 @@ address)

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_host.html.fr b/docs/manual/mod/mod_authz_host.html.fr index 6c54de61830..36f294c173b 100644 --- a/docs/manual/mod/mod_authz_host.html.fr +++ b/docs/manual/mod/mod_authz_host.html.fr @@ -1,23 +1,28 @@ - -mod_authz_host - Serveur Apache HTTP +mod_authz_host - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authz_host

    @@ -29,8 +34,8 @@ IP) Statut:Base IdentificateurdeModule:authz_host_module FichierSource:mod_authz_host.c -Compatibilit:Disponible depuis les versions 2.3 et suprieures -d'Apache +Compatibilit:Le fournisseur forward-dns est disponible partir +de la version 2.4.19 du serveur HTTP Apache

    Sommaire

    Les fournisseurs d'autorisation implments par le module @@ -49,17 +54,17 @@ d'Apache mthodes sans protection, en plaant les directives dans une section <Limit>.

    -

    Directives

    -

    Ce module ne fournit aucune directive.

    -

    Sujets

    +

    Sujets

    Voir aussi

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top

    Les directives Require

    @@ -67,16 +72,19 @@ contr

    La directive Apache Require est utilise au cours de la phase d'autorisation pour vrifier si un utilisateur se voit accorder ou refuser l'accs une ressource. mod_authz_host fournit - les types d'autorisation ip, host. D'autres - types d'autorisation - sont aussi disponibles, mais ncessitent le chargement des modules - d'autorisation appropris.

    + les types d'autorisation ip, host, + forward-dns et local. D'autres + types d'autorisation sont aussi disponibles, mais ncessitent le chargement + des modules d'autorisation appropris.

    Ces fournisseurs d'autorisation permettent de dterminer quels htes peuvent accder une zone du serveur. On peut contrler l'accs en fonction du nom d'hte, de l'adresse IP, ou d'un intervalle d'adresses IP.

    +

    A partir de la version 2.4.8, les directives require host + supportent les expressions.

    +

    Require ip

    Le fournisseur ip permet de contrler l'accs au @@ -87,35 +95,31 @@ contr

    Une adresse IP complte :

    -

    - Require ip 10.1.2.3
    - Require ip 192.168.1.104 192.168.1.205 -

    +
    Require ip 10.1.2.3
    +Require ip 192.168.1.104 192.168.1.205
    +

    L'adresse IP d'un hte pour qui l'accs est accord

    Une adresse IP partielle :

    -

    - Require ip 10.1
    - Require ip 10 172.20 192.168.2 -

    +
    Require ip 10.1
    +Require ip 10 172.20 192.168.2
    +

    Les 1 3 premiers octets d'une adresse IP, pour une restriction un sous-rseau.

    Une paire rseau/masque de sous-rseau :

    -

    - Require ip 10.1.0.0/255.255.0.0 -

    +
    Require ip 10.1.0.0/255.255.0.0
    +

    Un rseau a.b.c.d, et un masque de sous-rseau w.x.y.z. pour une restriction de sous-rseau plus fine.

    Une spcification CIDR rseau/nnn :

    -

    - Require ip 10.1.0.0/16 -

    +
    Require ip 10.1.0.0/16
    +

    Identique au cas prcdent, except que le masque de sous-rseau reprsente les nnn premiers bits de poids fort.

    @@ -125,11 +129,14 @@ contr

    On peut spcifier des adresses et des sous-rseaux IPv6 comme suit :

    -

    - Require ip 2001:db8::a00:20ff:fea7:ccea
    - Require ip 2001:db8::a00:20ff:fea7:ccea/10 -

    +
    Require ip 2001:db8::a00:20ff:fea7:ccea
    +Require ip 2001:db8:1:1::a
    +Require ip 2001:db8:2:1::/64
    +Require ip 2001:db8:3::/48
    + +

    Note: comme les adresses IP sont lues au dmarrage, les + expressions ne sont pas values au moment de la requte.

    @@ -142,10 +149,9 @@ contr

    Un nom de domaine (ventuellement partiel)

    -

    - Require host example.org
    - Require host .net example.edu -

    +
    Require host example.org
    +Require host .net example.edu
    +

    Les htes dont les noms correspondent ou se terminent par la chane spcifie se voient accorder l'accs. Seuls les lment de @@ -163,7 +169,31 @@ contr +

    Require forward-dns

    + +

    Le fournisseur forward-dns permet d'accder au serveur + scuris en fonction de simples noms d'hte. Lorsque Require + forward-dns host-name est spcifi, toute adresse IP + correspondant host-name se voit autoriser l'accs.

    + +

    A la diffrence du fournisseur host, ce fournisseur + n'effectue pas de recherche DNS inverse : il effectue simplement une requte + DNS directe pour le nom d'hte spcifi et donne accs au client si son + adresse IP correspond. Il ne fonctionnera donc qu'avec des noms d'hte, et + non avec des noms de domaine. Par contre, comme le DNS inverse n'est pas + sollicit, il fonctionnera avec des clients qui utilisent un service de DNS + dynamique.

    + +
    Require forward-dns bla.example.org
    + + +

    Un client dont l'adresse IP correspond au nom d'hte + bla.example.org se verra autoriser l'accs.

    + + +

    Require local

    +

    Le fournisseur local autorise l'accs au serveur si l'une au moins de ces conditions est satisfaite :

    @@ -176,9 +206,20 @@ contr

    L'exemple suivant montre une mthode simple pour slectionner les connexions en provenance de l'hte local :

    -

    - Require local -

    +
    Require local
    + + + + +

    Note concernant la scurit

    + +

    Si le contenu de votre serveur est mandat, vous devez garder + l'esprit que l'adresse client correspondra l'adresse de votre + serveur mandataire et non l'adresse du client, et l'utilisation de + la directive Require dans ce contexte ne provoquera pas + forcment l'effet dsir. Voir mod_remoteip pour + une solution possible ce problme.

    +
    @@ -186,7 +227,28 @@ contr

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_host.xml b/docs/manual/mod/mod_authz_host.xml index 09993d17ea6..31a0735140a 100644 --- a/docs/manual/mod/mod_authz_host.xml +++ b/docs/manual/mod/mod_authz_host.xml @@ -28,7 +28,7 @@ address) Base mod_authz_host.c authz_host_module -Available in Apache 2.3 and later +The forward-dns provider was addded in 2.4.19

    The authorization providers implemented by mod_authz_host are @@ -58,7 +58,8 @@ address)

    Apache's Require directive is used during the authorization phase to ensure that a user is allowed or denied access to a resource. mod_authz_host extends the - authorization types with ip and host. + authorization types with ip, host, + forward-dns and local. Other authorization types may also be used but may require that additional authorization modules be loaded.

    @@ -66,6 +67,9 @@ address) access an area of the server. Access can be controlled by hostname, IP Address, or IP Address range.

    +

    Since v2.4.8, expressions are supported + within the host require directives.

    +
    Require ip

    The ip provider allows access to the server @@ -75,35 +79,35 @@ address)

    A full IP address:

    - - Require ip 10.1.2.3
    - Require ip 192.168.1.104 192.168.1.205 -
    + +Require ip 10.1.2.3 +Require ip 192.168.1.104 192.168.1.205 +

    An IP address of a host allowed access

    A partial IP address:

    - - Require ip 10.1
    - Require ip 10 172.20 192.168.2 -
    + +Require ip 10.1 +Require ip 10 172.20 192.168.2 +

    The first 1 to 3 bytes of an IP address, for subnet restriction.

    A network/netmask pair:

    - + Require ip 10.1.0.0/255.255.0.0 - +

    A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.

    A network/nnn CIDR specification:

    - + Require ip 10.1.0.0/16 - +

    Similar to the previous case, except the netmask consists of nnn high-order 1 bits.

    @@ -113,11 +117,15 @@ address)

    IPv6 addresses and IPv6 subnets can be specified as shown below:

    - - Require ip 2001:db8::a00:20ff:fea7:ccea
    - Require ip 2001:db8::a00:20ff:fea7:ccea/10 -
    + +Require ip 2001:db8::a00:20ff:fea7:ccea +Require ip 2001:db8:1:1::a +Require ip 2001:db8:2:1::/64 +Require ip 2001:db8:3::/48 + +

    Note: As the IP addresses are parsed on startup, expressions are + not evaluated at request time.

    @@ -130,10 +138,10 @@ address)

    A (partial) domain-name

    - - Require host example.org
    - Require host .net example.edu -
    + +Require host example.org +Require host .net example.edu +

    Hosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above @@ -150,7 +158,32 @@ address) +

    Require forward-dns + +

    The forward-dns provider allows access to the server + to be controlled based on simple host names. When + Require forward-dns host-name is specified, + all IP addresses corresponding to host-name + are allowed access.

    + +

    In contrast to the host provider, this provider does not + rely on reverse DNS lookups: it simply queries the DNS for the host name + and allows a client if its IP matches. As a consequence, it will only + work with host names, not domain names. However, as the reverse DNS is + not used, it will work with clients which use a dynamic DNS service.

    + + +Require forward-dns bla.example.org + + +

    A client the IP of which is resolved from the name + bla.example.org will be granted access.

    + +

    The forward-dns provider was added in 2.4.19.

    +
    +
    Require local +

    The local provider allows access to the server if any of the following conditions is true:

    @@ -164,9 +197,21 @@ address)

    This allows a convenient way to match connections that originate from the local host:

    - + Require local - + + +
    + +
    Security Note + +

    If you are proxying content to your server, you need to be aware + that the client address will be the address of your proxy server, + not the address of the client, and so using the Require + directive in this context may not do what you mean. See + mod_remoteip for one possible solution to this + problem.

    +
    diff --git a/docs/manual/mod/mod_authz_host.xml.fr b/docs/manual/mod/mod_authz_host.xml.fr index e95753ba6fd..193b13311ca 100644 --- a/docs/manual/mod/mod_authz_host.xml.fr +++ b/docs/manual/mod/mod_authz_host.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,157 +25,201 @@ mod_authz_host -Autorisations de groupe basées sur l'hôte (nom ou adresse +Autorisations de groupe basées sur l'hôte (nom ou adresse IP) Base mod_authz_host.c authz_host_module -Disponible depuis les versions 2.3 et supérieures -d'Apache +Le fournisseur forward-dns est disponible à partir +de la version 2.4.19 du serveur HTTP Apache -

    Les fournisseurs d'autorisation implémentés par le module - mod_authz_host sont enregistrés à l'aide de +

    Les fournisseurs d'autorisation implémentés par le module + mod_authz_host sont enregistrés à l'aide de la directive Require. On peut - utiliser cette directive à l'intérieur de sections Directory, Files, ou Location ou de fichiers .htaccess pour - contrôler l'accès à certaines zones du serveur. Le contrôle d'accès - peut être effectué en fonction du nom d'hôte ou de l'adresse IP.

    + contrôler l'accès à certaines zones du serveur. Le contrôle d'accès + peut être effectué en fonction du nom d'hôte ou de l'adresse IP.

    -

    En général, les directives de restriction d'accès s'appliquent à - toutes les méthodes d'accès (GET, PUT, +

    En général, les directives de restriction d'accès s'appliquent à + toutes les méthodes d'accès (GET, PUT, POST, etc...). C'est d'ailleurs ce que l'on souhaite dans la plupart des cas. Il est cependant possible de ne restreindre - l'accès que pour certaines méthodes, tout en laissant les autres - méthodes sans protection, en plaçant les directives dans une section + l'accès que pour certaines méthodes, tout en laissant les autres + méthodes sans protection, en plaçant les directives dans une section Limit.

    Authentification, autorisation et -contrôle d'accès +contrôle d'accès Require
    Les directives Require

    La directive Apache Require est utilisée au cours de - la phase d'autorisation pour vérifier si un utilisateur se voit - accorder ou refuser l'accès à une ressource. mod_authz_host fournit - les types d'autorisation ip, host. D'autres - types d'autorisation - sont aussi disponibles, mais nécessitent le chargement des modules - d'autorisation appropriés.

    - -

    Ces fournisseurs d'autorisation permettent de déterminer quels - hôtes peuvent accéder à une zone du serveur. On peut contrôler - l'accès en fonction du nom d'hôte, de l'adresse IP, ou d'un intervalle + module="mod_authz_core">Require est utilisée au cours de + la phase d'autorisation pour vérifier si un utilisateur se voit + accorder ou refuser l'accès à une ressource. mod_authz_host fournit + les types d'autorisation ip, host, + forward-dns et local. D'autres + types d'autorisation sont aussi disponibles, mais nécessitent le chargement + des modules d'autorisation appropriés.

    + +

    Ces fournisseurs d'autorisation permettent de déterminer quels + hôtes peuvent accéder à une zone du serveur. On peut contrôler + l'accès en fonction du nom d'hôte, de l'adresse IP, ou d'un intervalle d'adresses IP.

    +

    A partir de la version 2.4.8, les directives require host + supportent les expressions.

    +
    Require ip -

    Le fournisseur ip permet de contrôler l'accès au +

    Le fournisseur ip permet de contrôler l'accès au serveur en fonction de l'adresse IP du client distant. Lorsque - Require ip adresse-ip est spécifié, la - requête est autorisée si l'adresse IP du client distant correspond - à

    + Require ip adresse-ip est spécifié, la + requête est autorisée si l'adresse IP du client distant correspond + à

    -

    Une adresse IP complète :

    +

    Une adresse IP complète :

    - - Require ip 10.1.2.3
    - Require ip 192.168.1.104 192.168.1.205 -
    + +Require ip 10.1.2.3 +Require ip 192.168.1.104 192.168.1.205 + -

    L'adresse IP d'un hôte pour qui l'accès est accordé

    +

    L'adresse IP d'un hôte pour qui l'accès est accordé

    Une adresse IP partielle :

    - - Require ip 10.1
    - Require ip 10 172.20 192.168.2 -
    -

    Les 1 à 3 premiers octets d'une adresse IP, pour une restriction - à un sous-réseau.

    + +Require ip 10.1 +Require ip 10 172.20 192.168.2 + +

    Les 1 à 3 premiers octets d'une adresse IP, pour une restriction + à un sous-réseau.

    -

    Une paire réseau/masque de sous-réseau :

    +

    Une paire réseau/masque de sous-réseau :

    - + Require ip 10.1.0.0/255.255.0.0 - -

    Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z. pour une - restriction de sous-réseau plus fine.

    + +

    Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z. pour une + restriction de sous-réseau plus fine.

    -

    Une spécification CIDR réseau/nnn :

    +

    Une spécification CIDR réseau/nnn :

    - + Require ip 10.1.0.0/16 - -

    Identique au cas précédent, excepté que le masque de sous-réseau - représente les nnn premiers bits de poids fort.

    + +

    Identique au cas précédent, excepté que le masque de sous-réseau + représente les nnn premiers bits de poids fort.

    Notez que les trois derniers exemples correspondent exectement au - même ensemble d'hôtes.

    + même ensemble d'hôtes.

    -

    On peut spécifier des adresses et des sous-réseaux IPv6 comme +

    On peut spécifier des adresses et des sous-réseaux IPv6 comme suit :

    - - Require ip 2001:db8::a00:20ff:fea7:ccea
    - Require ip 2001:db8::a00:20ff:fea7:ccea/10 -
    + +Require ip 2001:db8::a00:20ff:fea7:ccea +Require ip 2001:db8:1:1::a +Require ip 2001:db8:2:1::/64 +Require ip 2001:db8:3::/48 + +

    Note: comme les adresses IP sont lues au démarrage, les + expressions ne sont pas évaluées au moment de la requête.

    Require host -

    Le fournisseur host permet de contrôler l'accès au - serveur en fonction du nom d'hôte du client distant. Lorsque - Require host nom-hôte est spécifié, la - requête est autorisée si le nom d'hôte correspond à

    +

    Le fournisseur host permet de contrôler l'accès au + serveur en fonction du nom d'hôte du client distant. Lorsque + Require host nom-hôte est spécifié, la + requête est autorisée si le nom d'hôte correspond à

    -

    Un nom de domaine (éventuellement partiel)

    +

    Un nom de domaine (éventuellement partiel)

    - - Require host example.org
    - Require host .net example.edu -
    + +Require host example.org +Require host .net example.edu + -

    Les hôtes dont les noms correspondent ou se terminent par la - chaîne spécifiée se voient accorder l'accès. Seuls les élément de +

    Les hôtes dont les noms correspondent ou se terminent par la + chaîne spécifiée se voient accorder l'accès. Seuls les élément de nom de domaine complets sont mis en correspondance ; ainsi, - l'exemple ci-dessus correspondra à foo.example.org, mais - ne correspondra pas à fooexample.org. Avec cette + l'exemple ci-dessus correspondra à foo.example.org, mais + ne correspondra pas à fooexample.org. Avec cette configuration, Apache va effectuer une double recherche DNS sur - l'adresse IP du client, sans tenir compte de la définition de la + l'adresse IP du client, sans tenir compte de la définition de la directive HostnameLookups. Il va effectuer une recherche DNS inverse sur l'adresse IP pour trouver - le nom d'hôte associé, puis une recherche DNS directe sur le nom - d'hôte pour vérifier qu'il correspond bien à l'adresse IP originale. - L'accès ne sera accordé que si le nom d'hôte correspond et si les - recherches DNS inverse et directe sont cohérentes.

    + le nom d'hôte associé, puis une recherche DNS directe sur le nom + d'hôte pour vérifier qu'il correspond bien à l'adresse IP originale. + L'accès ne sera accordé que si le nom d'hôte correspond et si les + recherches DNS inverse et directe sont cohérentes.

    + +
    + +
    Require forward-dns + +

    Le fournisseur forward-dns permet d'accéder au serveur + sécurisé en fonction de simples noms d'hôte. Lorsque Require + forward-dns host-name est spécifié, toute adresse IP + correspondant à host-name se voit autoriser l'accès.

    + +

    A la différence du fournisseur host, ce fournisseur + n'effectue pas de recherche DNS inverse : il effectue simplement une requête + DNS directe pour le nom d'hôte spécifié et donne accès au client si son + adresse IP correspond. Il ne fonctionnera donc qu'avec des noms d'hôte, et + non avec des noms de domaine. Par contre, comme le DNS inverse n'est pas + sollicité, il fonctionnera avec des clients qui utilisent un service de DNS + dynamique.

    + + +Require forward-dns bla.example.org + + +

    Un client dont l'adresse IP correspond au nom d'hôte + bla.example.org se verra autoriser l'accès.

    Require local -

    Le fournisseur local autorise l'accès au serveur si + +

    Le fournisseur local autorise l'accès au serveur si l'une au moins de ces conditions est satisfaite :

      -
    • l'adresse IP du client correspond à 127.0.0.0/8
    • +
    • l'adresse IP du client correspond à 127.0.0.0/8
    • l'adresse IP du client est ::1
    • les adresses IP du client et du serveur sont identiques
    -

    L'exemple suivant montre une méthode simple pour sélectionner les - connexions en provenance de l'hôte local :

    +

    L'exemple suivant montre une méthode simple pour sélectionner les + connexions en provenance de l'hôte local :

    - + Require local - + + +
    + +
    Note concernant la sécurité + +

    Si le contenu de votre serveur est mandaté, vous devez garder à + l'esprit que l'adresse client correspondra à l'adresse de votre + serveur mandataire et non à l'adresse du client, et l'utilisation de + la directive Require dans ce contexte ne provoquera pas + forcément l'effet désiré. Voir mod_remoteip pour + une solution possible à ce problème.

    +
    diff --git a/docs/manual/mod/mod_authz_owner.html.en b/docs/manual/mod/mod_authz_owner.html.en index 5d5a5e188c7..a90582c5dbd 100644 --- a/docs/manual/mod/mod_authz_owner.html.en +++ b/docs/manual/mod/mod_authz_owner.html.en @@ -1,23 +1,28 @@ - -mod_authz_owner - Apache HTTP Server +mod_authz_owner - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_owner

    @@ -39,7 +44,7 @@ must be already properly verified by an authentication module, such as mod_auth_basic or mod_auth_digest. mod_authz_owner - recognizes two arguments for the Require directive, file-owner and + recognizes two arguments for the Require directive, file-owner and file-group, as follows:

    @@ -69,16 +74,16 @@ "MultiViews" resources.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Configuration Examples

    @@ -94,17 +99,14 @@ files in /home/smith/public_html/private unless they were owned by jones instead of smith.

    -

    - <Directory /home/*/public_html/private>
    - - AuthType Basic
    - AuthName MyPrivateFiles
    - AuthBasicProvider dbm
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - Require file-owner
    -
    - </Directory> -

    +
    <Directory "/home/*/public_html/private">
    +    AuthType Basic
    +    AuthName MyPrivateFiles
    +    AuthBasicProvider dbm
    +    AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all"
    +    Require file-owner
    +</Directory>
    +

    Require file-group

    @@ -119,22 +121,19 @@ authorized to access the project-foo directories of each other.

    -

    - <Directory /home/*/public_html/project-foo>
    - - AuthType Basic
    - AuthName "Project Foo Files"
    - AuthBasicProvider dbm
    -
    - # combined user/group database
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all
    -
    - Satisfy All
    - Require file-group
    -
    - </Directory> -

    +
    <Directory "/home/*/public_html/project-foo">
    +    AuthType Basic
    +    AuthName "Project Foo Files"
    +    AuthBasicProvider dbm
    +    
    +    # combined user/group database
    +    AuthDBMUserFile  "/usr/local/apache2/etc/.htdbm-all"
    +    AuthDBMGroupFile "/usr/local/apache2/etc/.htdbm-all"
    +    
    +    Satisfy All
    +    Require file-group
    +</Directory>
    +
    @@ -143,7 +142,28 @@  fr  |  ja  |  ko 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_owner.html.fr b/docs/manual/mod/mod_authz_owner.html.fr index 183cae6bc56..1b325a2c0f5 100644 --- a/docs/manual/mod/mod_authz_owner.html.fr +++ b/docs/manual/mod/mod_authz_owner.html.fr @@ -1,23 +1,28 @@ - -mod_authz_owner - Serveur Apache HTTP +mod_authz_owner - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authz_owner

    @@ -78,15 +83,15 @@ d'Apache multiples" (MultiViews) d'un contenu ngoci.

    -

    Directives

    -

    Ce module ne fournit aucune directive.

    -

    Sujets

    +

    Sujets

    Voir aussi

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top

    Exemples de configuration

    @@ -106,17 +111,14 @@ d'Apache propritaire ne soit jones au lieu de smith.

    -

    - <Directory /home/*/public_html/private>
    - - AuthType Basic
    - AuthName mes-fichiers-prive
    - AuthBasicProvider dbm
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - Require file-owner
    -
    - </Directory> -

    +
    <Directory "/home/*/public_html/private">
    +    AuthType Basic
    +    AuthName MyPrivateFiles
    +    AuthBasicProvider dbm
    +    AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all"
    +    Require file-owner
    +</Directory>
    +

    Require file-group

    @@ -132,22 +134,19 @@ d'Apache foo, ils seront autoriss accder aux rpertoires project-foo de chacun d'entre eux.

    -

    - <Directory /home/*/public_html/project-foo>
    - - AuthType Basic
    - AuthName "Project Foo Files"
    - AuthBasicProvider dbm
    -
    - # combined user/group database
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all
    -
    - Satisfy All
    - Require file-group
    -
    - </Directory> -

    +
    <Directory "/home/*/public_html/project-foo">
    +    AuthType Basic
    +    AuthName "Project Foo Files"
    +    AuthBasicProvider dbm
    +    
    +    # combined user/group database
    +    AuthDBMUserFile  "/usr/local/apache2/etc/.htdbm-all"
    +    AuthDBMGroupFile "/usr/local/apache2/etc/.htdbm-all"
    +    
    +    Satisfy All
    +    Require file-group
    +</Directory>
    +
    @@ -156,7 +155,28 @@ d'Apache  fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_owner.html.ja.utf8 b/docs/manual/mod/mod_authz_owner.html.ja.utf8 index 73b2b6ee8e5..143497d9d01 100644 --- a/docs/manual/mod/mod_authz_owner.html.ja.utf8 +++ b/docs/manual/mod/mod_authz_owner.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_authz_owner - Apache HTTP サーバ +mod_authz_owner - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authz_owner

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -76,15 +82,15 @@ 決して承認しません。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    +

    トピック

    参照

    +

    ディレクティブ

    +

    このモジュールにディレクティブはありません。

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    設定例

    @@ -145,11 +151,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_owner.html.ko.euc-kr b/docs/manual/mod/mod_authz_owner.html.ko.euc-kr index dc7f88cf0e4..e9a679c04c7 100644 --- a/docs/manual/mod/mod_authz_owner.html.ko.euc-kr +++ b/docs/manual/mod/mod_authz_owner.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_authz_owner - Apache HTTP Server +mod_authz_owner - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authz_owner

    @@ -70,16 +75,16 @@ "MultiViews" ڿ Ѻο ʴ´.

    -

    þ

    -

    ⿡ þ ϴ.

    -

    +

    +

    þ

    +

    ⿡ þ ϴ.

    +

    Bugfix checklist

    +
  • Comments
  • top

    @@ -145,7 +150,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_owner.xml b/docs/manual/mod/mod_authz_owner.xml index 2e91eb071f2..0c6190c9e8a 100644 --- a/docs/manual/mod/mod_authz_owner.xml +++ b/docs/manual/mod/mod_authz_owner.xml @@ -36,7 +36,7 @@ must be already properly verified by an authentication module, such as mod_auth_basic or mod_auth_digest. mod_authz_owner - recognizes two arguments for the Require directive, file-owner and file-group, as follows:

    @@ -85,17 +85,15 @@ files in /home/smith/public_html/private unless they were owned by jones instead of smith.

    - - <Directory /home/*/public_html/private>
    - - AuthType Basic
    - AuthName MyPrivateFiles
    - AuthBasicProvider dbm
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - Require file-owner
    -
    - </Directory> -
    + +<Directory "/home/*/public_html/private"> + AuthType Basic + AuthName MyPrivateFiles + AuthBasicProvider dbm + AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all" + Require file-owner +</Directory> +
    Require file-group @@ -111,22 +109,20 @@ authorized to access the project-foo directories of each other.

    - - <Directory /home/*/public_html/project-foo>
    - - AuthType Basic
    - AuthName "Project Foo Files"
    - AuthBasicProvider dbm
    -
    - # combined user/group database
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all
    -
    - Satisfy All
    - Require file-group
    -
    - </Directory> -
    + +<Directory "/home/*/public_html/project-foo"> + AuthType Basic + AuthName "Project Foo Files" + AuthBasicProvider dbm + + # combined user/group database + AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all" + AuthDBMGroupFile "/usr/local/apache2/etc/.htdbm-all" + + Satisfy All + Require file-group +</Directory> +
    diff --git a/docs/manual/mod/mod_authz_owner.xml.fr b/docs/manual/mod/mod_authz_owner.xml.fr index 914e5171e96..7778b5419ad 100644 --- a/docs/manual/mod/mod_authz_owner.xml.fr +++ b/docs/manual/mod/mod_authz_owner.xml.fr @@ -1,7 +1,7 @@ - + @@ -97,17 +97,15 @@ d'Apache propriétaire ne soit jones au lieu de smith.

    - - <Directory /home/*/public_html/private>
    - - AuthType Basic
    - AuthName mes-fichiers-prive
    - AuthBasicProvider dbm
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - Require file-owner
    -
    - </Directory> -
    + +<Directory "/home/*/public_html/private"> + AuthType Basic + AuthName MyPrivateFiles + AuthBasicProvider dbm + AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all" + Require file-owner +</Directory> +
    Require file-group @@ -124,22 +122,20 @@ d'Apache foo, ils seront autorisés à accéder aux répertoires project-foo de chacun d'entre eux.

    - - <Directory /home/*/public_html/project-foo>
    - - AuthType Basic
    - AuthName "Project Foo Files"
    - AuthBasicProvider dbm
    -
    - # combined user/group database
    - AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all
    - AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all
    -
    - Satisfy All
    - Require file-group
    -
    - </Directory> -
    + +<Directory "/home/*/public_html/project-foo"> + AuthType Basic + AuthName "Project Foo Files" + AuthBasicProvider dbm + + # combined user/group database + AuthDBMUserFile "/usr/local/apache2/etc/.htdbm-all" + AuthDBMGroupFile "/usr/local/apache2/etc/.htdbm-all" + + Satisfy All + Require file-group +</Directory> +
    diff --git a/docs/manual/mod/mod_authz_owner.xml.ja b/docs/manual/mod/mod_authz_owner.xml.ja index d3e077c1c63..119fd71bf83 100644 --- a/docs/manual/mod/mod_authz_owner.xml.ja +++ b/docs/manual/mod/mod_authz_owner.xml.ja @@ -1,7 +1,7 @@ - + + -mod_authz_user - Apache HTTP Server +mod_authz_user - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_authz_user

    @@ -40,21 +45,78 @@ directive. Alternatively Require valid-user can be used to grant access to all successfully authenticated users.

    -

    Directives

    +

    Topics

    +

    Directives

    This module provides no directives.

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • +
    top
    +
    +

    The Require Directives

    + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_user extends the + authorization types with user and valid-user. +

    + +

    Since v2.4.8, expressions are supported + within the user require directives.

    + +

    Require user

    + +

    This directive specifies a list of users that are allowed to gain + access.

    + +
    Require user john paul george ringo
    + + + +

    Require valid-user

    + +

    When this directive is specified, any successfully authenticated + user will be allowed to gain access.

    + +
    Require valid-user
    + + + + +

    Available Languages:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_user.html.fr b/docs/manual/mod/mod_authz_user.html.fr index c793936082c..dc0d34bdd2f 100644 --- a/docs/manual/mod/mod_authz_user.html.fr +++ b/docs/manual/mod/mod_authz_user.html.fr @@ -1,23 +1,28 @@ - -mod_authz_user - Serveur Apache HTTP +mod_authz_user - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_authz_user

    @@ -42,20 +47,78 @@ d'Apache
    説明:ファイルの所有者に基づいた承認
    ステータス:Extension
    モジュール識別子:authz_owner_module
    Require valid-user pour accorder l'accs tous les utilisateurs qui ont t authentifis avec succs.

    -

    Directives

    +

    Sujets

    +

    Directives

    Ce module ne fournit aucune directive.

    -

    Voir aussi

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • +
    top
    +
    +

    The Require Directives

    + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autoris accder une + ressource. mod_authz_user ajoute + les types d'autorisation user et valid-user. +

    + +

    A partir de la version 2.4.8, les directives require DBM + supportent les expressions.

    + +

    Require user

    + +

    Cette directive permet de spcifier une liste d'utilisateurs + autoriss accder la ressource.

    + +
    Require user john paul george ringo
    + + + +

    Require valid-user

    + +

    Lorsque cette directive est dfinie, tout utilisateur qui s'est + authentifi avec succs aura l'autorisation d'accs la ressource.

    + +
    Require valid-user
    + + + + +

    Langues Disponibles:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_user.html.ja.utf8 b/docs/manual/mod/mod_authz_user.html.ja.utf8 index 453c4dd0986..bfe8fcd1601 100644 --- a/docs/manual/mod/mod_authz_user.html.ja.utf8 +++ b/docs/manual/mod/mod_authz_user.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_authz_user - Apache HTTP サーバ +mod_authz_user - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_authz_user

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -46,18 +52,39 @@

    ディレクティブ

    このモジュールにディレクティブはありません。

    -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_user.html.ko.euc-kr b/docs/manual/mod/mod_authz_user.html.ko.euc-kr index b2ed9746548..1190481eb48 100644 --- a/docs/manual/mod/mod_authz_user.html.ko.euc-kr +++ b/docs/manual/mod/mod_authz_user.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_authz_user - Apache HTTP Server +mod_authz_user - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_authz_user

    @@ -44,11 +49,11 @@

    þ

    ⿡ þ ϴ.

    -

    +

    Bugfix checklist

    +
  • Comments
  • @@ -56,7 +61,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_authz_user.xml b/docs/manual/mod/mod_authz_user.xml index fea8c72d9b1..3c7dd9eb82f 100644 --- a/docs/manual/mod/mod_authz_user.xml +++ b/docs/manual/mod/mod_authz_user.xml @@ -39,4 +39,39 @@ Require +
    The Require Directives + +

    Apache's Require + directives are used during the authorization phase to ensure that + a user is allowed to access a resource. mod_authz_user extends the + authorization types with user and valid-user. +

    + +

    Since v2.4.8, expressions are supported + within the user require directives.

    + +
    Require user + +

    This directive specifies a list of users that are allowed to gain + access.

    + + + Require user john paul george ringo + + +
    + +
    Require valid-user + +

    When this directive is specified, any successfully authenticated + user will be allowed to gain access.

    + + + Require valid-user + + +
    + +
    + diff --git a/docs/manual/mod/mod_authz_user.xml.fr b/docs/manual/mod/mod_authz_user.xml.fr index 05b3a6ef31c..d886af12c41 100644 --- a/docs/manual/mod/mod_authz_user.xml.fr +++ b/docs/manual/mod/mod_authz_user.xml.fr @@ -1,7 +1,7 @@ - + @@ -43,4 +43,41 @@ d'ApacheRequire +
    The Require Directives + +

    Les directives Require d'Apache permettent, + au cours de la phase d'autorisation, de s'assurer qu'un utilisateur + est bien autorisé à accéder à une + ressource. mod_authz_user ajoute + les types d'autorisation user et valid-user. +

    + +

    A partir de la version 2.4.8, les directives require DBM + supportent les expressions.

    + +
    Require user + +

    Cette directive permet de spécifier une liste d'utilisateurs + autorisés à accéder à la ressource.

    + + + Require user john paul george ringo + + +
    + +
    Require valid-user + +

    Lorsque cette directive est définie, tout utilisateur qui s'est + authentifié avec succès aura l'autorisation d'accès à la ressource.

    + + + Require valid-user + + +
    + +
    + diff --git a/docs/manual/mod/mod_authz_user.xml.ja b/docs/manual/mod/mod_authz_user.xml.ja index 60e57a2b4c5..467ec87a2bd 100644 --- a/docs/manual/mod/mod_authz_user.xml.ja +++ b/docs/manual/mod/mod_authz_user.xml.ja @@ -1,7 +1,7 @@ - + + -mod_autoindex - Apache HTTP Server +mod_autoindex - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_autoindex

    @@ -39,9 +44,9 @@ sources:

      -
    • A file written by the user, typically called +
    • A file located in that directory, typically called index.html. The DirectoryIndex directive sets the - name of this file. This is controlled by + name of the file or files to be used. This is controlled by mod_dir.
    • Otherwise, a listing generated by the server. The other @@ -68,7 +73,8 @@ same header repeatedly toggles between ascending and descending order. These column header links are suppressed with the IndexOptions directive's - SuppressColumnSorting option.

      + SuppressColumnSorting + option.

      Note that when the display is sorted by "Size", it's the actual size of the files that's used, not the @@ -76,7 +82,10 @@ before a 1011-byte file (if in ascending order) even though they both are shown as "1K".

    -
    top

    Autoindex Request Query Arguments

    -

    Apache HTTP Server 2.0.23 reorganized the Query Arguments for Column - Sorting, and introduced an entire group of new query options. - To effectively eliminate all client control over the output, - the IndexOptions - IgnoreClient option was introduced.

    +

    Various query string arguments are available to give the client + some control over the ordering of the directory listing, as well as + what files are listed. If you do not wish to give the client this + control, the IndexOptions + IgnoreClient option disables that functionality.

    The column sorting headers themselves are self-referencing hyperlinks that add the sort query options shown below. Any @@ -221,10 +229,9 @@ icon selected by filename is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

    -

    Examples

    - AddAlt "PDF file" *.pdf
    - AddAlt Compressed *.gz *.zip *.Z -

    +
    AddAlt "PDF file" *.pdf
    +AddAlt Compressed *.gz *.zip *.Z
    +
    top
    @@ -247,9 +254,8 @@ selected by MIME-encoding This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

    -

    Example

    - AddAltByEncoding gzip x-gzip -

    +
    AddAltByEncoding gzip x-gzip
    +
    top
    @@ -272,9 +278,8 @@ icon selected by MIME content-type This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

    -

    Example

    - AddAltByType 'plain text' text/plain -

    +
    AddAltByType 'plain text' text/plain
    +
    top
    @@ -293,9 +298,9 @@ icon selected by MIME content-type expression or full filename for files to describe. String is enclosed in double quotes (").

    -

    Example

    - AddDescription "The planet Mars" /web/pics/mars.gif -

    +
    AddDescription "The planet Mars" mars.gif
    +AddDescription "My friend Marshall" friends/mars.gif
    +

    The typical, default description field is 23 bytes wide. 6 more bytes are added by the IndexOptions SuppressIcon option, 7 bytes are @@ -324,6 +329,14 @@ icon selected by MIME content-type results may affect the rest of the directory listing.

    +

    Arguments with path information

    +

    Absolute paths are not currently supported and do not match + anything at runtime. Arguments with relative path information, + which would normally only be used in htaccess context, are implicitly + prefixed with '*/' to avoid matching partial directory names.

    +
    + +
    top

    AddIcon Directive

    @@ -351,11 +364,11 @@ icon selected by MIME content-type is unnecessary if you're using IndexOptions HTMLTable.

    -

    Examples

    - AddIcon (IMG,/icons/image.png) .gif .jpg .png
    - AddIcon /icons/dir.png ^^DIRECTORY^^
    - AddIcon /icons/backup.png *~ -

    +
    #Examples
    +AddIcon (IMG,/icons/image.png) .gif .jpg .png
    +AddIcon /icons/dir.png ^^DIRECTORY^^
    +AddIcon /icons/backup.png *~
    +

    AddIconByType should be used in preference to AddIcon, @@ -384,9 +397,8 @@ content-encoding

    MIME-encoding is a valid content-encoding, such as x-compress.

    -

    Example

    - AddIconByEncoding /icons/compress.png x-compress -

    +
    AddIconByEncoding /icons/compress.png x-compress
    +
    top
    @@ -412,9 +424,8 @@ content-type

    MIME-type is a wildcard expression matching required the mime types.

    -

    Example

    - AddIconByType (IMG,/icons/image.png) image/* -

    +
    AddIconByType (IMG,/icons/image.png) image/*
    +
    top
    @@ -433,9 +444,8 @@ configuredUrl-path is a (%-escaped) relative URL to the icon, or a fully qualified remote URL.

    -

    Example

    - DefaultIcon /icon/unknown.png -

    +
    DefaultIcon /icon/unknown.png
    +
    top
    @@ -453,9 +463,8 @@ of the index listing of the file that will be inserted at the top of the index listing. Filename is the name of the file to include.

    -

    Example

    - HeaderName HEADER.html -

    +
    HeaderName HEADER.html
    +

    Both HeaderName and ReadmeName now treat @@ -463,9 +472,8 @@ of the index listing access the directory being indexed. If Filename begins with a slash, it will be taken to be relative to the DocumentRoot.

    -

    Example

    - HeaderName /include/HEADER.html -

    +
    HeaderName /include/HEADER.html
    +

    Filename must resolve to a document with a major content type of text/* (e.g., @@ -474,9 +482,8 @@ of the index listing actual file type (as opposed to its output) is marked as text/html such as with a directive like:

    -

    - AddType text/html .cgi -

    +
    AddType text/html .cgi
    +

    Content negotiation will be performed if Options @@ -494,6 +501,10 @@ of the index listing +SuppressHTMLPreamble, so that these tags are not repeated.

    +

    See also

    +
    top

    IndexHeadInsert Directive

    @@ -508,10 +519,8 @@ of the index listing

    The IndexHeadInsert directive specifies a string to insert in the <head> section of the HTML generated for the index page.

    -

    Example

    - - IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" -

    +
    IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
    +
    top
    @@ -530,13 +539,18 @@ a directory list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add - to the list, rather than the replacing the list of ignored + to the list, rather than replacing the list of ignored files. By default, the list contains . (the current directory).

    -

    - IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t -

    +
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    + + +

    Regular Expressions

    +

    This directive does not currently work in configuration sections + that have regular expression arguments, such as <DirectoryMatch> +

    +
    top
    @@ -555,15 +569,14 @@ a directory any files ignored by IndexIgnore otherwise inherited from other configuration sections.

    -

    - <Directory /var/www> - IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t - </Directory> - <Directory /var/www/backups> - IndexIgnoreReset ON - IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t - </Directory> -

    +
    <Directory "/var/www">
    +    IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    +<Directory "/var/www/backups">
    +    IndexIgnoreReset ON
    +    IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    +

    Review the default configuration for a list of patterns that you might want to explicitly ignore after using this @@ -611,37 +624,34 @@ indexing (It depends on whether the underlying file system uses Unicode filenames or not.) -

    Example:

    - IndexOptions Charset=UTF-8 -

    +
    IndexOptions Charset=UTF-8
    + -
    DescriptionWidth=[n | *] (Apache HTTP Server 2.0.23 and - later)
    +
    DescriptionWidth=[n | *]
    The DescriptionWidth keyword allows you to specify the width of the description column in characters.
    -
    -DescriptionWidth (or unset) allows - mod_autoindex to calculate the best width.
    +
    -DescriptionWidth (or unset) allows + mod_autoindex to calculate the best width.
    DescriptionWidth=n fixes the column width to n bytes wide.
    DescriptionWidth=* grows the column to the width necessary to accommodate the longest description - string.
    + string. -
    See the section on AddDescription for dangers + See the section on AddDescription for dangers inherent in truncating descriptions.
    FancyIndexing
    This turns on fancy indexing of directories.
    -
    FoldersFirst (Apache HTTP Server - 2.0.23 and later)
    +
    FoldersFirst
    If this option is enabled, subdirectory listings will always appear first, followed by normal files in the @@ -652,11 +662,12 @@ indexing FoldersFirst is enabled, subdirectory Zed will be listed before subdirectory Beta, which will be listed before normal files - Gamma and Alpha. This option - only has an effect if FancyIndexing is also enabled.
    + Gamma and Alpha. + This option only has an effect if FancyIndexing + is also enabled. + -
    HTMLTable (Apache - HTTP Server 2.0.23 and later)
    +
    HTMLTable
    This option with FancyIndexing constructs a simple table for the fancy directory listing. @@ -677,7 +688,12 @@ indexing icon. This allows browser to precalculate the page layout without having to wait until all the images have been loaded. If no value is given for the option, it defaults to the standard height of the icons supplied - with the Apache httpd software.
    + with the Apache httpd software. + + This option + only has an effect if FancyIndexing is also enabled. + +
    IconWidth[=pixels]
    @@ -739,10 +755,9 @@ indexing FancyIndexed directory listing into links for sorting. The default behavior is for them to be links; selecting the column heading will sort the directory listing by the values - in that column. Prior to Apache HTTP Server 2.0.23, this also - disabled parsing the Query Arguments for the sort - string. That behavior is now controlled by IndexOptions - IgnoreClient in Apache HTTP Server 2.0.23. + in that column. However, query string arguments which are appended + to the URL will still be honored. That behavior is controlled by IndexOptions + IgnoreClient.
    SuppressDescription
    @@ -751,7 +766,11 @@ indexing so the use of this option will regain 23 characters of screen space to use for something else. See AddDescription for information about setting the file description. See also the DescriptionWidth - index option to limit the size of the description column. + index option to limit the size of the description column. + + This option + only has an effect if FancyIndexing is also enabled. +
    SuppressHTMLPreamble
    @@ -769,8 +788,7 @@ indexing ommitted from the output, under the assumption that you'll likely put those closing tags in that file. -
    SuppressIcon (Apache HTTP Server - 2.0.23 and later)
    +
    SuppressIcon
    This will suppress the icon in fancy indexing listings. Combining both SuppressIcon and @@ -782,24 +800,36 @@ indexing
    SuppressLastModified
    This will suppress the display of the last modification date, - in fancy indexing listings.
    + in fancy indexing listings. + + This option + only has an effect if FancyIndexing is also enabled. +
    SuppressRules - (Apache HTTP Server 2.0.23 and later)
    +
    This will suppress the horizontal rule lines (hr elements) in directory listings. Combining both SuppressIcon and SuppressRules yields proper HTML 3.2 output, which by the final specification prohibits img and hr elements from the pre block (used to - format FancyIndexed listings.)
    + format FancyIndexed listings.) + + This option + only has an effect if FancyIndexing is also enabled. + +
    SuppressSize
    -
    This will suppress the file size in fancy indexing listings.
    +
    This will suppress the file size in fancy indexing listings. + + This option + only has an effect if FancyIndexing is also enabled. +
    -
    TrackModified (Apache HTTP Server - 2.0.23 and later)
    +
    TrackModified
    This returns the Last-Modified and ETag values for the listed directory in the HTTP header. It is only valid @@ -822,9 +852,8 @@ indexing specify the MIME content-type of the generated page. The default is text/html. -

    Example:

    - IndexOptions Type=text/plain -

    +
    IndexOptions Type=text/plain
    +
    VersionSort @@ -859,10 +888,14 @@ indexing (Apache HTTP Server 2.0.49 and later)
    The XHTML keyword forces mod_autoindex - to emit XHTML 1.0 code instead of HTML 3.2.
    + to emit XHTML 1.0 code instead of HTML 3.2. + This option + only has an effect if FancyIndexing is also enabled. + +
    Incremental IndexOptions
    @@ -873,20 +906,16 @@ indexing
  • Multiple IndexOptions directives for a single directory are now merged together. The result of: -

    - <Directory /foo> - - IndexOptions HTMLTable
    - IndexOptions SuppressColumnsorting -
    - </Directory> -

    +
    <Directory "/foo">
    +    IndexOptions HTMLTable
    +    IndexOptions SuppressColumnsorting
    +</Directory>
    +

    will be the equivalent of

    -

    - IndexOptions HTMLTable SuppressColumnsorting -

    +
    IndexOptions HTMLTable SuppressColumnsorting
    +
  • The addition of the incremental syntax (i.e., prefixing @@ -900,10 +929,9 @@ indexing clears all inherited options and any incremental settings encountered so far. Consider the following example:

    -

    - IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
    - IndexOptions +SuppressSize -

    +
    IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
    +IndexOptions +SuppressSize
    +

    The net effect is equivalent to IndexOptions FancyIndexing +SuppressSize, because the unprefixed FancyIndexing @@ -964,10 +992,8 @@ Name|Date|Size|Description

    The IndexStyleSheet directive sets the name of the file that will be used as the CSS for the index listing.

    -

    Example

    - - IndexStyleSheet "/css/style.css" -

    +
    IndexStyleSheet "/css/style.css"
    +

    Using this directive in conjunction with IndexOptions HTMLTable adds a number of CSS classes to the resulting HTML. @@ -1003,17 +1029,17 @@ of the index listing of the file that will be appended to the end of the index listing. Filename is the name of the file to include, and is taken to be relative to the location being indexed. If - Filename begins with a slash, it will be taken to be + Filename begins with a slash, as in example 2, it will be taken to be relative to the DocumentRoot.

    -

    Example

    - ReadmeName FOOTER.html -

    +
    # Example 1
    +ReadmeName FOOTER.html
    + + +
    # Example 2
    +ReadmeName /include/FOOTER.html
    -

    Example 2

    - ReadmeName /include/FOOTER.html -

    See also HeaderName, where this behavior is described in greater detail.

    @@ -1026,7 +1052,28 @@ of the index listing  ja  |  ko  |  tr 

    -
  • +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_autoindex.html.fr b/docs/manual/mod/mod_autoindex.html.fr index 53031e7ef33..eb9e99b4403 100644 --- a/docs/manual/mod/mod_autoindex.html.fr +++ b/docs/manual/mod/mod_autoindex.html.fr @@ -1,23 +1,28 @@ - -mod_autoindex - Serveur Apache HTTP +mod_autoindex - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_autoindex

    @@ -38,8 +43,8 @@ shell Win32 dir

    L'index d'un rpertoire peut tre gnr de deux manires :

      -
    • Un fichier crit par l'utilisateur, en gnral appel - index.html, mais dont le nom peut tre dfini par la +
    • Un fichier situ dans ce rpertoire, en gnral appel + index.html, mais dont le nom de ce ou ces fichiers peut tre dfini par la directive DirectoryIndex. C'est le module mod_dir qui traite alors cet index.
    • @@ -65,7 +70,8 @@ shell Win32 dir actionne de manire rptitive le mme en-tte, l'ordre de tri est commut entre les ordres croissant et dcroissant. On peut supprimer ces liens d'en-ttes de colonnes l'aide de l'option - SuppressColumnSorting de la directive IndexOptions.

      + SuppressColumnSorting + de la directive IndexOptions.

      Notez que lorsque l'affichage est tri en fonction de la taille, c'est la taille relle qui est prise en compte, et non la @@ -73,7 +79,10 @@ shell Win32 dir affich avant un fichier de 1011 octets (en ordre croissant), mme si la taille affiche des deux fichiers est "1K".

    -
    top

    Arguments de la requte d'autoindexation

    -

    Le serveur HTTP Apache version 2.0.23 a rorganis - les arguments de requte pour le tri - des colonnes, et intoduit un groupe complet de nouvelles options de - requte. Pour interdire effectivement au client tout contrle sur - l'affichage, l'option IndexOptions - IgnoreClient a t ajoute.

    +

    La chane de paramtres de la requte peut contenir de nombreux + arguments permettant dans une certaine mesure au client de contrler + l'ordre de l'index du rpertoire, ainsi que la liste des fichiers + afficher. Si vous souhaitez dsactiver cette fonctionnalit, + utilisez l'option IndexOptions + IgnoreClient.

    Les en-ttes de tri des colonnes eux-mmes sont des hyper-liens auto-rfrant qui ajoutent les options de tri la requte numres @@ -206,7 +214,7 @@ shell Win32 dir

    top
    -
    説明:ユーザ承認
    ステータス:Base
    モジュール識別子:authz_user_module
    @@ -228,14 +236,13 @@ fichier en fonction de son nom peut pas afficher d'images, si le chargement d'images est dsactiv ou si l'icne ne peut pas tre trouv.

    -

    Exemples

    - AddAlt "Fichier PDF" *.pdf
    - AddAlt Compress *.gz *.zip *.Z -

    +
    AddAlt "PDF file" *.pdf
    +AddAlt Compressed *.gz *.zip *.Z
    +
    top
    -
    Description:Texte optionnel afficher la place d'un icne pour un fichier en fonction de son nom
    @@ -256,13 +263,12 @@ fichier en fonction de son codage MIME peut pas afficher d'images, si le chargement d'images est dsactiv ou si l'icne ne peut pas tre trouv.

    -

    Exemple

    - AddAltByEncoding gzip x-gzip -

    +
    AddAltByEncoding gzip x-gzip
    +
    top
    -
    Description:Texte optionnel afficher la place d'un icne pour un fichier en fonction de son codage MIME
    @@ -283,13 +289,12 @@ fichier en fonction de son type MIME peut pas afficher d'images, si le chargement d'images est dsactiv ou si l'icne ne peut pas tre trouv.

    -

    Exemple

    - AddAltByType 'Fichier texte' text/plain -

    +
    AddAltByType 'Fichier texte' text/plain
    +
    top
    -
    Description:Texte optionnel afficher la place d'un icne pour un fichier en fonction de son type MIME
    @@ -306,9 +311,9 @@ fichier en fonction de son type MIME texte doit tre entour de guillemets (").

    -

    Exemple

    - AddDescription "La plante Mars" /web/pics/mars.gif -

    +
    AddDescription "The planet Mars" mars.gif
    +AddDescription "My friend Marshall" friends/mars.gif
    +

    La taille par dfaut, habituelle du champ de description est de 23 octets. L'option IndexOptions SuppressIcon ajoute 6 octets, l'option @@ -341,9 +346,18 @@ fichier en fonction de son type MIME rpertoire.

    +

    Arguments avec chemins

    +

    Les chemins absolus ne sont actuellement pas supports et ne + peuvent correspondre aucun chemin rel l'excution. Les + arguments contenant des chemins relatifs, qui ne devraient tre + normalement utiliss que dans les fichiers htaccess, sont + implicitement prfixs par '*/' afin d'viter toute association + avec des noms de rpertoires partiels.

    +
    +
    top
    -
    Description:Afficher la description d'un fichier
    Syntaxe:AddDescription texte [fichier] ...
    @@ -373,18 +387,18 @@ nom et n'est donc pas ncessaire si vous utilisez IndexOptions HTMLTable.

    -

    Exemples

    - AddIcon (IMG,/icons/image.png) .gif .jpg .png
    - AddIcon /icons/dir.png ^^DIRECTORY^^
    - AddIcon /icons/backup.png *~ -

    +
    #Examples
    +AddIcon (IMG,/icons/image.png) .gif .jpg .png
    +AddIcon /icons/dir.png ^^DIRECTORY^^
    +AddIcon /icons/backup.png *~
    +

    Lorsque c'est possible, il est prfrable d'utiliser AddIconByType plutt que AddIcon.

    top
    -
    Description:Icne afficher pour un fichier en fonction de son nom
    @@ -407,13 +421,12 @@ codage MIME

    codage MIME doit tre un codage valide, comme x-compress.

    -

    Exemple

    - AddIconByEncoding /icons/compress.png x-compress -

    +
    AddIconByEncoding /icons/compress.png x-compress
    +
    top
    -
    Description:Icne afficher ct d'un fichier en fonction de son codage MIME
    @@ -437,13 +450,12 @@ type MIME

    type MIME est une expression avec caractres gnriques reprsentant le type MIME.

    -

    Exemple

    - AddIconByType (IMG,/icons/image.png) image/* -

    +
    AddIconByType (IMG,/icons/image.png) image/*
    +
    top
    -
    Description:Icne afficher ct d'un fichier en fonction de son type MIME
    @@ -459,13 +471,12 @@ n'est pr chemin URL est une URL relative (chappe par des caractres '%') vers l'icne ou une URL pleinement qualifie.

    -

    Exemple

    - DefaultIcon /icon/unknown.png -

    +
    DefaultIcon /icon/unknown.png
    +
    top
    -
    Description:Icne afficher par dfaut lorsqu'aucun icne spcifique n'est prcis
    @@ -479,9 +490,8 @@ contenant l'index le nom du fichier qui sera insr au dbut de la page contenant l'index. nom fichier est le nom du fichier inclure.

    -

    Exemple

    - HeaderName HEADER.html -

    +
    HeaderName HEADER.html
    +

    Les deux directives HeaderName et ReadmeName traitent maintenant @@ -491,9 +501,8 @@ contenant l'index considr comme relatif au rpertoire dfini par la directive DocumentRoot.

    -

    Exemple

    - HeaderName /include/HEADER.html -

    +
    HeaderName /include/HEADER.html
    +

    nom fichier doit correspondre un document dont le type MIME est du style text/* (par exemple @@ -503,9 +512,8 @@ contenant l'index sortie) est marqu comme text/html par exemple l'aide d'une directive comme :

    -

    - AddType text/html .cgi -

    +
    AddType text/html .cgi
    +

    Une ngociation de contenu sera effectue si Options MultiViews a t @@ -525,9 +533,13 @@ contenant l'index +SuppressHTMLPreamble, de manire ce que ces balises ne soient pas rptes.

    +

    Voir aussi

    +
    top
    -
    Description:Nom du fichier qui sera insr au dbut de la page contenant l'index
    @@ -541,14 +553,12 @@ d'index. spcifier une chane de caractres insrer dans la section <head> du code HTML gnr pour la page d'index.

    -

    Exemple

    - - IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" -

    +
    IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
    +
    top
    -
    Description:Insre du texte dans la section HEAD de la page d'index.
    @@ -568,13 +578,18 @@ de l'index d'un r ignorer. Par dfaut, la liste contient . (le rpertoire courant).

    -

    - IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t -

    +
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    + + +

    Expressions rationnelles

    +

    Cette directive est actuellement incompatible avec les sections + de configuration qui comportent des arguments avec expressions + rationnelles comme <DirectoryMatch>

    +
    top
    -
    Description:Ajouts la liste des fichiers cacher lors de l'affichage de l'index d'un rpertoire
    @@ -590,15 +605,14 @@ contenu d'un r IndexIgnore et hrite par ailleurs d'autres sections de configuration.

    -

    - <Directory /var/www> - IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t - </Directory> - <Directory /var/www/backups> - IndexIgnoreReset ON - IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t - </Directory> -

    +
    <Directory "/var/www">
    +    IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    +<Directory "/var/www/backups">
    +    IndexIgnoreReset ON
    +    IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    +

    Revoyez la configuration par dfaut pour une liste de modles que vous voulez ignorer explicitement aprs usage @@ -606,7 +620,7 @@ contenu d'un r

    top
    -
    Description:Vide la liste des fichiers cacher lors de l'affichage du contenu d'un rpertoire
    @@ -649,28 +663,26 @@ r systme de fichiers sous-jacent utilise les noms de fichiers en Unicode ou non). -

    Exemple :

    - IndexOptions Charset=UTF-8 -

    +
    IndexOptions Charset=UTF-8
    + -
    DescriptionWidth=[n | *] (Versions 2.0.23 et - suprieures du serveur HTTP Apache)
    +
    DescriptionWidth=[n | *]
    Le mot-cl DescriptionWidth vous permet de spcifier la taille en caractres de la colonne description.
    -
    Avec -DescriptionWidth (ou si l'option n'est pas +
    Avec -DescriptionWidth (ou si l'option n'est pas dfinie), mod_autoindex calcule la meilleure - taille. + taille.
    DescriptionWidth=n fixe la taille de la colonne n octets.
    DescriptionWidth=* ajuste la taille de la colonne - la plus longue chane de description.
    + la plus longue chane de description. -
    Voir la section concernant AddDescription pour les dangers + Voir la section concernant AddDescription pour les dangers inhrants la troncature des descriptions.
    FancyIndexing
    @@ -679,8 +691,7 @@ r c'est dire avec en-ttes de colonnes sous forme d'hyper-liens auto-rfrants. -
    FoldersFirst (Versions 2.0.23 et - suprieures du serveur HTTP Apache)
    +
    FoldersFirst
    Lorsque cette option est active, la liste des sous-rpertoires apparatra toujours en premier, suivie @@ -693,11 +704,10 @@ r sous-rpertoire Beta, qui sera lui-mme affich avant les fichiers normaux Gamma et Alpha. Cette option n'a d'effet que si FancyIndexing - est aussi activ.
    + est aussi activ.
    + -
    HTMLTable - (Versions 2.0.23 et suprieures - du serveur HTTP Apache)
    +
    HTMLTable
    Cette option pour l'affichage FancyIndexing permet de construire une table simple @@ -721,7 +731,11 @@ r permettre au navigateur de prvoir les caractristiques de la page sans devoir attendre que toutes les images aient t charges. En l'absence de cette option, c'est la hauteur standard dfinie par - le logiciel Apache httpd qui est choisie comme valeur par dfaut.
    + le logiciel Apache httpd qui est choisie comme valeur par dfaut. + + Cette option n'a d'effet que si FancyIndexing + est aussi activ. +
    IconWidth[=pixels]
    @@ -789,11 +803,9 @@ r affichage "amlior". Par dfaut, ces en-ttes constituent des liens hyper-texte, et la slection de l'un d'entre eux va trier l'index du rpertoire en fonction des valeurs de la colonne - correspondante. Avant la version 2.0.23 du serveur HTTP - Apache, cette option dsactivait aussi l'interprtation des - informations de tri transmises via les arguments de la - requte. Depuis la version 2.0.23 du serveur HTTP Apache, ce comportement est - contrl par IndexOptions + correspondante. Cependant, les arguments de la chane de + paramtres de la requte ajouts l'URL seront toujours ignors. + Ce comportement est contrl par l'option IndexOptions IgnoreClient.
    SuppressDescription
    @@ -806,7 +818,11 @@ r Voir la directive AddDescription pour plus d'informations propos de la dfinition des descriptions de fichiers. Voir aussi l'option d'index DescriptionWidth - pour limiter la taille de la colonne description. + pour limiter la taille de la colonne description. + + Cette option n'a d'effet que si FancyIndexing + est aussi activ. +
    SuppressHTMLPreamble
    @@ -827,9 +843,7 @@ r supposant que vous ayez plac ces balises de fermeture dans ce fichier. -
    SuppressIcon - (Versions 2.0.23 et suprieures du serveur - HTTP Apache)
    +
    SuppressIcon
    L'activation de cette option supprime l'affichage des icnes dans le cas d'un affichage "amlior". La combinaison de @@ -842,10 +856,14 @@ r
    SuppressLastModified
    L'activation de cette option supprime l'affichage de la date - de dernire modification dans le cas d'un affichage "amlior".
    + de dernire modification dans le cas d'un affichage "amlior". + + Cette option n'a d'effet que si FancyIndexing + est aussi activ. +
    SuppressRules - (Versions 2.0.23 et suprieures du serveur HTTP Apache)
    +
    L'activation de cette option supprime l'affichage des lignes horizontales (lments hr) dans les index de @@ -854,16 +872,22 @@ r gnrer une sortie au format HTML 3.2 qui, selon les dernires spcifications, interdit les lments img et hr dans les blocs pre (utiliss pour - formater les affichages "amliors").
    + formater les affichages "amliors"). + + Cette option n'a d'effet que si FancyIndexing + est aussi activ. +
    SuppressSize
    L'activation de cette option supprime l'affichage de la taille - du fichier dans le cas d'un affichage "amlior".
    + du fichier dans le cas d'un affichage "amlior". -
    TrackModified - (Versions 2.0.23 et suprieures du serveur - HTTP Apache)
    + Cette option n'a d'effet que si FancyIndexing + est aussi activ. + + +
    TrackModified
    Cette option renvoie les valeurs Last-Modified et ETag pour le rpertoire index dans l'en-tte HTTP. @@ -891,9 +915,8 @@ r MIME de la page gnre. La valeur par dfaut est text/html. -

    Exemple :

    - IndexOptions Type=text/plain -

    +
    IndexOptions Type=text/plain
    +
    @@ -931,7 +954,12 @@ r
    Le mot-cl XHTML enjoint mod_autoindex de gnrer du code XHTML 1.0 au - lieu de HTML 3.2.
    + lieu de HTML 3.2. + + Cette option n'a d'effet que si FancyIndexing + est aussi activ. + + @@ -945,20 +973,16 @@ r apparaissant dans la mme section directory sont maintenant fusionnes. Le rsultat de : -

    - <Directory /foo> - - IndexOptions HTMLTable
    - IndexOptions SuppressColumnsorting -
    - </Directory> -

    +
    <Directory "/foo">
    +    IndexOptions HTMLTable
    +    IndexOptions SuppressColumnsorting
    +</Directory>
    +

    est quivalent

    -

    - IndexOptions HTMLTable SuppressColumnsorting -

    +
    IndexOptions HTMLTable SuppressColumnsorting
    +
  • L'ajout de la syntaxe incrmentale (en prfixant les mots-cls @@ -974,10 +998,9 @@ r dfinition incrmentale. Considrons l'exemple suivant :

    -

    - IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
    - IndexOptions +SuppressSize -

    +
    IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
    +IndexOptions +SuppressSize
    +

    L'effet global est quivalent l'effet qu'aurait provoqu IndexOptions FancyIndexing +SuppressSize, car l'option @@ -994,7 +1017,7 @@ r

    top
    -
  • Description:Diverses options de configuration pour l'indexation d'un rpertoire
    @@ -1031,7 +1054,7 @@ Name|Date|Size|Description
    top
    -
    Description:Dfinit l'ordre d'affichage par dfaut d'un index de rpertoire
    @@ -1045,10 +1068,8 @@ r dfinir le nom du fichier qui servira de feuille de style CSS pour l'index.

    -

    Exemple

    - - IndexStyleSheet "/css/style.css" -

    +
    IndexStyleSheet "/css/style.css"
    +

    L'utilisation de cette directive en conjonction avec IndexOptions HTMLTable ajoute plusieurs classes CSS au document HTML @@ -1076,7 +1097,7 @@ r

    top
    -
    Description:Ajoute une feuille de style CSS l'index du rpertoire
    @@ -1090,17 +1111,18 @@ l'index le nom du fichier dont le contenu sera ajout la fin de l'index. nom-fichier est le nom du fichier inclure, et est considr comme relatif au rpertoire faisant l'objet de l'index. Si - nom-fichier commence par un slash '/', il sera considr + nom-fichier commence par un slash '/', comme dans + l'exemple 2, il sera considr comme relatif au rpertoire dfini par la directive DocumentRoot.

    -

    Exemple

    - ReadmeName FOOTER.html -

    +
    # Example 1
    +ReadmeName FOOTER.html
    + + +
    # Example 2
    +ReadmeName /include/FOOTER.html
    -

    Exemple 2

    - ReadmeName /include/FOOTER.html -

    Voir aussi la directive HeaderName, o cette fonctionnalit est dcrite plus en dtails.

    @@ -1113,7 +1135,28 @@ l'index  ja  |  ko  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_autoindex.html.ja.utf8 b/docs/manual/mod/mod_autoindex.html.ja.utf8 index a61fd9ecbf5..71ccd4713b7 100644 --- a/docs/manual/mod/mod_autoindex.html.ja.utf8 +++ b/docs/manual/mod/mod_autoindex.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_autoindex - Apache HTTP サーバ +mod_autoindex - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_autoindex

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Nom du fichier dont le contenu sera insr la fin de l'index
    @@ -85,7 +91,10 @@ 1010 バイトのファイルは必ず 1011 バイトのファイルよりも前 (昇順の場合) に表示されます。

    -

    ディレクティブ

    + +

    Bugfix checklist

    参照

    +
    top

    Autoindex リクエストクエリー引数

    @@ -593,9 +601,9 @@ a directory
    -
    説明:Unix の ls コマンドや Win32 の dir シェルコマンドに似た ディレクトリインデックスを生成する
    ステータス:Base
    モジュール:mod_autoindex
    互換性:2.3.10 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    IndexOptions ディレクティブ

    @@ -1041,12 +1049,33 @@ Name|Date|Size|Description
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_autoindex.html.ko.euc-kr b/docs/manual/mod/mod_autoindex.html.ko.euc-kr index c6b7fa90dda..49c26e86c2d 100644 --- a/docs/manual/mod/mod_autoindex.html.ko.euc-kr +++ b/docs/manual/mod/mod_autoindex.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_autoindex - Apache HTTP Server +mod_autoindex - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_autoindex

    @@ -70,7 +75,10 @@ Ʈ Ѵ "1K" ̴ ׻ 1010 Ʈ տ ´.

    -
    top

    Autoindex û ƱԸƮ

    @@ -859,7 +866,28 @@ Name|Date|Size|Description  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_autoindex.html.tr.utf8 b/docs/manual/mod/mod_autoindex.html.tr.utf8 index 0b1d5891ed3..c5c191618b6 100644 --- a/docs/manual/mod/mod_autoindex.html.tr.utf8 +++ b/docs/manual/mod/mod_autoindex.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_autoindex - Apache HTTP Sunucusu +mod_autoindex - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_autoindex

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -38,9 +42,10 @@ yaptığı gibi dizin içeriğini listeler.

    Bir dizin içerik dosyası iki kaynaktan gelebilir:

      -
    • Kullanıcı tarafından yazılmış ve genellikle index.html - adında bir dosya olarak. Dosyanın ismi DirectoryIndex yönergesi ile belirlenir ve - mod_dir tarafından denetlenir.
    • +
    • Bu dizinde bulunan ve genellikle index.html + adında bir dosya olarak. Kullanılan dosyanın veya dosyaların ismi + DirectoryIndex yönergesi ile + belirlenir ve mod_dir tarafından denetlenir.
    • Kullanıcı tarafından böyle bir dosya sağlanmadığı takdirde dizin içerik listesini sunucu üretir. Diğer yönergeler bu listenin biçemini @@ -69,7 +74,10 @@ yaptığı gibi dizin içeriğini listeler. olanı küçükten büyüğe sıralamada 1011 baytlıktan önce gösterilecektir.

      -

      Yönergeler

      +

      Konular

      +

      Yönergeler

      -

      Konular

      -
      +

      Bugfix checklist

      Ayrıca bakınız:

      +
      top

      Sütun Sıralamada Sorgu Seçenekleri

      -

      Apache 2.0.23’te Sütun Sıralama için Sorgu Seçenekleri yeniden - düzenlenip tamamen yeni bir sorgu seçenekleri grubu oluşturulmuştur. +

      İstemciye, dizin içeriğini listelerken neleri hangi sırada + listeleyeceğini belirleyebilmesi için içerik üzerinde biraz denetim + sağlayabileceği çeşitli sorgu dizgesi bileşenleri sağlanmıştır. Çıktı üzerinde kullanıcı denetimini tamamen ortadan kaldırmak için IndexOptions yönergesinin IgnoreClient @@ -158,8 +166,7 @@ yaptığı gibi dizin içeriğini listeler. mod_autoindex tarafından son argüman olarak ele alınacak ve çözümleme işlemi o noktada duracaktır.

      -
      -<form action="" method="get">
      +    
      <form action="" method="get">
         <input type="text" name="P" value="*" /> ile eşleşen
         <select name="C">
           <option value="N" selected="selected">isme</option>
      @@ -205,10 +212,9 @@ yaptığı gibi dizin içeriğini listeler.
             bulunamadığı veya istemci resim gösteremediği takdirde ya da kullanıcı
             resim yüklememeyi tercih etmişse gösterilir.

      -

      Örnekler

      - AddAlt "PDF dosya" *.pdf
      - AddAlt Sıkıştırılmış *.gz *.zip *.Z -

      +
      AddAlt "PDF file" *.pdf
      +AddAlt Compressed *.gz *.zip *.Z
      +
      top
      @@ -233,9 +239,8 @@ gösterilecek metni belirler. gösteremediği takdirde ya da kullanıcı resim yüklememeyi tercih etmişse gösterilir.

      -

      Örnek

      - AddAltByEncoding gzip x-gzip -

      +
      AddAltByEncoding gzip x-gzip
      +
      top
      @@ -259,9 +264,8 @@ metni belirler. simge bulunamadığı veya istemci resim gösteremediği takdirde ya da kullanıcı resim yüklememeyi tercih etmişse gösterilir.

      -

      Örnek

      - AddAltByType 'salt metin' text/plain -

      +
      AddAltByType 'salt metin' text/plain
      +
      top
      @@ -282,9 +286,9 @@ metni belirler. metin boşluk karakterleri içeriyorsa çift tırnak (") içine alınmalıdır.

      -

      Örnek

      - AddDescription "Mars Gezegeni" /resimler/mars.gif -

      +
      AddDescription "Mars Gezegeni" mars.gif 
      +AddDescription "Dostum Marshall" dostlar/mars.gif
      +

      Normalde öntanımlı açıklama alanının genişliği 23 bayttır. IndexOptions SuppressIcon seçeneği buna 6 bayt daha ekler; IndexOptions SuppressSize @@ -292,6 +296,15 @@ metni belirler. ekler. Böylece en fazla 55 karakterlik öntanımlı sütun genişliğine ulaşılabilir.

      +

      dosya kısmî dosya ismi içerebileceğinden çok kısa dosya ismi + belirtilmesi yüzünden istemeden de olsa başka dosyalarla + eşleşebileceğini unutmayın. Örneğin, le.html doğrudan + le.html ile eşleşebileceği gibi example.html + ile de eşleşecektir. Şüpheli durumların ortaya çıkabileceği durumlarda + mümkün olduğunca dosya isminin tamamını kullanın ve saptanan ilk + eşleşmenin kullanılacağını aklınızdan çıkarmayın ayrıca, + AddDescription listesini de uygun şekilde sıralayın.

      +

      Açıklama sütununun öntanımlı genişliği geçersiz kılınabilir hatta sınırsız açıklama uzunluğu atanabilir. Bu konu için IndexOptions yönergesinin DescriptionWidth seçeneğinin açıklamasına bakınız.

      @@ -304,6 +317,14 @@ metni belirler. kalın gösterim listenin kalanına yayılabilir).

      +

      Yol bilgisi içeren değiştirgeler

      +

      Mutlak yollar henüz desteklenmemetedir ve çalışma anında hiçbir şeyle + eşleşmeyeceklerdir. Normalde sadece htaccess bağlamında kullanılan, + göreli yol bilgisi içeren değiştirgeler, kısmi dizin isimleriyle + eşleşmemeleri için örtük olarak '*/' öneki alırlar.

      +
      + +
      top

      AddIcon Yönergesi

      @@ -320,7 +341,8 @@ metni belirler.

      Yönerge, FancyIndexing seçeneğiyle üretilen dizin listesinde adı isim ile biten bir dosya için gösterilecek simgeyi belirler. simge ya simgenin göreli URL’si (% - öncelemeli) ya da (alt-metin,url) + öncelemeli), tam nitelenmiş bir uzak URL ya da + (alt-metin,url) biçeminde olmalıdır; buradaki alt-metin simge gösterilemediği durumda tarayıcı tarafından simgenin yerinde gösterilecek metindir.

      @@ -331,11 +353,15 @@ metni belirler. uzantısı, dosya isminin bir kısmı, bir dosya ismi kalıbı veya tam yoluyla bir dosya ismi belirtilebilir.

      -

      Örnekler

      - AddIcon (IMG,/icons/image.xbm) .gif .jpg .xbm
      - AddIcon /icons/dir.xbm ^^DIRECTORY^^
      - AddIcon /icons/backup.xbm *~ -

      +

      ^^BLANKICON^^ sadece biçemleme için kullanılır, + dolayısıyla IndexOptions HTMLTable kullanıyorsanız + gereksizdir.

      + +
      #Examples
      +AddIcon (IMG,/icons/image.png) .gif .jpg .png
      +AddIcon /icons/dir.png ^^DIRECTORY^^
      +AddIcon /icons/backup.png *~
      +

      Mümkünse AddIcon yerine AddIconByType yönergesi tercih edilmelidir.

      @@ -355,7 +381,7 @@ göre belirler.
    Açıklama:Unix ls veya Win32 dir kabuk komutunun yaptığı gibi dizin içeriğini listeler.
    Durum:Temel

    Yönerge, FancyIndexing seçeneğiyle üretilen dizin listesinde bir dosya için gösterilecek simgeyi belirler. simge ya - simgenin göreli URL’si (% öncelemeli) ya da + simgenin göreli URL’si (% öncelemeli), tam nitelenmiş uzak bir URL ya da (alt-metin,url) biçeminde olmalıdır; buradaki alt-metin simge gösterilemediği durumda tarayıcı tarafından simgenin yerinde gösterilecek metindir.

    @@ -363,9 +389,8 @@ göre belirler.

    MIME-kodlaması olarak x-compress gibi geçerli bir içerik kodlaması belirtilmelidir.

    -

    Örnek

    - AddIconByEncoding /icons/compress.xbm x-compress -

    +
    AddIconByEncoding /icons/compress.png x-compress
    +
    top
    @@ -383,7 +408,7 @@ belirler.

    Yönerge, FancyIndexing seçeneğiyle üretilen dizin listesinde MIME türü MIME-türü olarak belirtilen bir dosya için gösterilecek simgeyi belirler. simge ya simgenin - göreli URL’si (% öncelemeli) ya da + göreli URL’si (% öncelemeli), tam nitelenmiş uzak bir URL ya da (alt-metin,url) biçeminde olmalıdır; buradaki alt-metin simge gösterilemediği durumda tarayıcı tarafından simgenin yerinde gösterilecek metindir.

    @@ -391,9 +416,8 @@ belirler.

    MIME-türü MIME türleri ile eşleşen bir dosya kalıbı ifadesi olabilir.

    -

    Örnek

    - AddIconByType (IMG,/icons/image.xbm) image/* -

    +
    AddIconByType (IMG,/icons/image.png) image/*
    +
    top
    @@ -410,11 +434,11 @@ belirler.

    The DefaultIcon yönergesi FancyIndexing seçeneğiyle üretilen dizin listesinde özel bir simge atanmamış dosyalar için gösterilecek simgeyi belirler. URL-yolu simgeye - bir göreli URL (% öncelemeli) belirtir.

    + bir göreli URL (% öncelemeli) veya tam nitelenmiş uzak bir URL + belirtir.

    + +
    DefaultIcon /icon/unknown.png
    -

    Örnek

    - DefaultIcon /icon/unknown.xbm -

    top
    @@ -432,9 +456,8 @@ belirler. yerleştirilecek dosyanın ismini belirler. Dosyanın ismi dosya-ismi ile belirtilir.

    -

    Örnek

    - HeaderName HEADER.html -

    +
    HeaderName HEADER.html
    +

    HeaderName and ReadmeName yönergelerinde @@ -444,9 +467,8 @@ belirler. başlıyorsa DocumentRoot yönergesinde belirtilen dizine göre belirtildiği varsayılır.

    -

    Örnek

    - HeaderName /include/HEADER.html -

    +
    HeaderName /include/HEADER.html
    +

    dosya-ismi, içerik türü text/* (text/html, text/plain gibi) olan bir belge @@ -455,9 +477,8 @@ belirler. dosya-ismi bir CGI betiğinin ismi bile olabilir:

    -

    - AddType text/html .cgi -

    +
    AddType text/html .cgi
    +

    Options ile MultiViews etkin kılınmışsa dosyaya içerik dili uzlaşımı da @@ -474,6 +495,10 @@ belirler. istiyorsanız IndexOptions +SuppressHTMLPreamble ataması yapmanız gerekecektir.

    +

    Ayrıca bakınız:

    +
    top

    IndexHeadInsert Yönergesi

    @@ -488,10 +513,8 @@ belirler.

    IndexHeadInsert yönergesi, dizin listesi için üretilen HTML’nin <head> bölümüne yerleştirilecek bir dizge tanımlar.

    -

    Example

    - - IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" -

    +
    IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">"
    +
    top
    @@ -500,6 +523,7 @@ belirler. Açıklama:Dizin içerik listesinden gizlenecek dosyaların listesi belirtilir. Sözdizimi:IndexIgnore dosya [dosya] ... +Öntanımlı:IndexIgnore "." Bağlam:sunucu geneli, sanal konak, dizin, .htaccess Geçersizleştirme:Indexes Durum:Temel @@ -513,24 +537,45 @@ belirler. IndexIgnore ataması yapabilirsiniz. Liste öntanımlı olarak içinde bulunulan dizini (./) içerir.

    -

    - IndexIgnore README .htaccess *.bak *~ -

    +
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    + + +

    Düzenli İfadeler

    +

    Bu yönerge, <DirectoryMatch> gibidüzenli ifadeler içeren yapılandırma + bölümlerinde henüz çalışmamaktadır.

    +
    top

    IndexIgnoreReset Yönergesi

    - + - -
    Açıklama:Empties the list of files to hide when listing -a directory
    Açıklama:Bir dizini listelerken gizlenecek dosyalar listesini boşaltır +
    Sözdizimi:IndexIgnoreReset ON|OFF
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:Indexes
    Durum:Temel
    Modül:mod_autoindex
    Uyumluluk:2.3.10 and later

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    +Uyumluluk:Apache HTTP Sunucusunun 2.3.10 ve sonraki sürümlerinde kullanılabilmektedir. + +

    Bu yönerge, diğer yapılandırma bölümlerince bir şekilde miras alınmayan + ve IndexIgnore tarafından yoksayılan dosyaları + kaldırır.

    + +
    <Directory "/var/www">
    +    IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    +<Directory "/var/www/backups">
    +    IndexIgnoreReset ON
    +    IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t
    +</Directory>
    + + +

    Bu yönergeyi kullandıktan sonra, açıkça yoksaymak + istediğiniz kalıpların bir listesi için öntanımlı yapılandırmayı gözden + geçirin.

    + +
    top

    IndexOptions Yönergesi

    @@ -538,6 +583,7 @@ a directory + @@ -548,32 +594,33 @@ a directory belirtilebilir:

    -
    Charset=karakter-kümesi (Apache 2.0.61 - ve sonrası)
    +
    AddAltClass
    +
    IndexOptions HTMLTable etkin ve bir + IndexStyleSheet tanımlı olduğunda dizin listesi + tablosunun her satırına fazladan bir CSS sınıfı bildirimi ekler. + Tablonun her satırına uygulanmaması için standart even ve + odd sınıfları yerine even-ALT ve + odd-ALT bildirimleri kullanılabilir. Burada + ALT ya bir dosya biçimiyle ilişkili standat bir alt + dizgesidir ya da AddAlt* yönergeleriyle tanımlanan bir + alt dizgesidir. +
    + +
    Charset=karakter-kümesi (Apache HTTP + Sunucusunun 2.0.61 ve sonraki sürümleri)
    Charset seçeneği üretilen sayfa için bir karakter kümesi belirtebilmenizi sağlar. Dizinin bulunduğu dosya sisteminin - karakter kodlamasına bağlı olarak öntanımlı değeri ya - ISO-8859-1 ya da UTF-8’dir. - -

    Örnek

    - IndexOptions Charset=UTF-8 -

    -
    - -
    Type=MIME-türü (Apache 2.0.61 ve - sonrası)
    + karakter kodlamasına bağlı olarak öntanımlı değeri Windows ve Mac OS + X'te UTF-8, diğerlerinde ISO-8859-1’dir (İlgili + dosya sisteminin Unicode dosya isimleri kullanıp kullanmamasına + bağlıdır). -
    Type seçeneği üretilen sayfa için bir MIME türü - belirtebilmenizi sağlar. Öntanımlı değer text/html’dir. +
    IndexOptions Charset=UTF-8
    -

    Örnek

    - IndexOptions Type=text/plain -

    -
    DescriptionWidth=[n | *] - (Apache 2.0.23 ve sonrası)
    +
    DescriptionWidth=[n | *]

    DescriptionWidth seçeneği üretilen sayfada açıklama sütununun genişliğini sizin belirleyebilmenizi sağlar. Bu seçenek @@ -595,8 +642,7 @@ a directory

    Dizin içerik listesi süslü olur.
    -
    FoldersFirst - (Apache 2.0.23 ve sonrası)
    +
    FoldersFirst
    Bu seçenek etkin kılındığında dizin içerik listesinde alt dizinler dosyalardan önce listelenir. Listelemede genel olarak iki bileşen @@ -609,14 +655,14 @@ a directory seçenek sadece FancyIndexing seçeneği etkinse etkili olacaktır.
    -
    HTMLTable - (Deneysel, Apache 2.0.23 ve sonrası)
    +
    HTMLTable
    -
    Bu deneysel seçenek FancyIndexing seçeneği ile birlikte süslü listeleme - için basit bir tablo oluşturur. Fakat bu eski tarayıcıları yanıltır. - Bununla birlikte, Linux, WinNT gibi sağdan sola veya soldan sağa yazım - yönünün UTF-8 karakter koduna göre değiştiği platformlarda dosya - isimleri ve açıklamalar için bu özellikle gerekli olabilir.
    +
    FancyIndexing + seçeneği ile birlikte süslü listeleme için basit bir tablo oluşturur. + UTF-8'in etkin olduğu platformlarda gereklidir. Bununla birlikte, + Linux, WinNT gibi sağdan sola veya soldan sağa yazım yönünün değiştiği + platformlarda dosya isimleri ve açıklamalar için bu özellikle gerekli + olabilir.
    IconsAreLinks
    @@ -630,8 +676,10 @@ a directory height ve width özniteliklerini içermesine sebep olur. Böylece tarayıcının tüm simgelerin yüklenmesini beklemeden sayfa yerleşimi için bir ön hesaplama yapabilmesi mümkün olur. Seçenek - bir değer belirtilmeksizin kullanıldığında Apache tarafından atanmış - standart simge yüksekliği öntanımlıdır. + bir değer belirtilmeksizin kullanıldığında Apache http tarafından + atanmış standart simge yüksekliği öntanımlıdır. Bu + seçenek sadece FancyIndexing seçeneği etkinse etkili + olacaktır.
    IconWidth[=benek-sayısı]
    @@ -640,8 +688,8 @@ a directory height ve width özniteliklerini içermesine sebep olur. Böylece tarayıcının tüm simgelerin yüklenmesini beklemeden sayfa yerleşimi için bir ön hesaplama yapabilmesi mümkün olur. Seçenek - bir değer belirtilmeksizin kullanıldığında Apache tarafından atanmış - standart simge genişliği öntanımlıdır. + bir değer belirtilmeksizin kullanıldığında Apache httpd tarafından + atanmış standart simge genişliği öntanımlıdır.
    IgnoreCase
    @@ -663,7 +711,7 @@ a directory

    Hiç belirtilmediğinde veya -NameWidth biçeminde belirtildiğinde mod_autoindex uygun genişliği kendisi - hesaplayacaktır.

    + hesaplayacaktır, fakat en fazla 20 karakter olabilir.

    NameWidth=n ile sütun genişliği n bayt genişlikte sabitlenir.

    @@ -674,8 +722,8 @@ a directory
    ScanHTMLTitles
    Bu seçenek süslü listeleme için HTML belgelerden sayfa başlığının - okunmasını sağlar. Dosya için AddDescription ile bir açıklama tanımlanmımışsa httpd - belgenin title etiketinin içeriğini okuyacaktır. Bu + okunmasını sağlar. Dosya için AddDescription ile bir açıklama tanımlanmımışsa Apache + httpd belgenin title etiketinin içeriğini okuyacaktır. Bu seçenek işlemciyi ve diski fazla meşgul eder.
    ShowForbidden
    @@ -690,10 +738,7 @@ a directory başlıklarını sıralama için hiper bağ haline getirmeyecektir. Sütun başlıkları için öntanımlı davranış hiper bağ olmak olup bunlar seçilerek dizin listesinin o sütundaki değerlere göre sıralanması - sağlanır. Apache 2.0.23 öncesinde, bu seçenek ayrıca, sıralama - dizgesi için sorgu sözcüklerinin çözümlenmesini de iptal - ederdi. Bu davranış Apache 2.0.23’ten beri IndexOptions - IgnoreClient ile sağlanmaktadır. + sağlanır. Bu davranış IndexOptions IgnoreClient ile sağlanmaktadır.
    SuppressDescription
    @@ -704,7 +749,9 @@ a directory için AddDescription yönergesinin açıklamasına bakınız. Ayrıca, açıklama sütununun genişliğini ayarlayan DescriptionWidth dizin listeleme seçeneğine de - bakınız. + bakınız. Bu seçenek sadece + FancyIndexing + seçeneği etkinse etkili olacaktır.
    SuppressHTMLPreamble
    @@ -714,10 +761,14 @@ a directory vs.) yerleştirir. Bu seçenek bu davranışı iptal ederek modülün dosya içeriğinin başlangıcına bir şey eklememesini sağlar. Bu durumda başlık dosyasının uygun HTML etiketlerini içermesi gerekir. Böyle bir başlık - dosyası yoksa normal olarak HTML başlangıç etiketleri üretilir. + dosyası yoksa normal olarak HTML başlangıç etiketleri üretilir. Eğer + bir ReadmeName yönergesi + de belirtilirse ve bu dosya mevcutsa, kapayan + </body></html> etiketleri de çıktı bulunmaz. Buna + dayanarak bu etiketleri de sizin koymanız gerekebilir.
    SuppressIcon - (Apache 2.0.23 ve sonrası)
    +
    Süslü dizin listesinde dosya simgelerinin gösterilmesini engeller. Son belirtim, süslü dizin listelemede kullanılan pre @@ -729,24 +780,32 @@ a directory
    SuppressLastModified
    Süslü dizin listelemede son değişiklik tarihinin gösterilmesi - engellenir.
    + engellenir. Bu seçenek sadece + FancyIndexing + seçeneği etkinse etkili olacaktır.
    SuppressRules - (Apache 2.0.23 ve sonrası)
    +
    Dizin listelemede hr etiketinin kullanımını engeller. Son belirtim, süslü dizin listelemede kullanılan pre etiketinin içeriğinde img ve hr etiketlerinin bulunmasına izin vermediğinden SuppressIcon ve SuppressRules seçenekleri birlikte kullanılarak HTML - 3.2 belirtimine uyum sağlanır.
    + 3.2 belirtimine uyum sağlanır. Bu seçenek sadece + FancyIndexing + seçeneği etkinse etkili olacaktır.
    SuppressSize
    -
    Süslü dizin listelemede dosya boyutunun gösterilmesi engellenir.
    +
    Süslü dizin listelemede dosya boyutunun gösterilmesi engellenir. + Bu seçenek sadece + FancyIndexing + seçeneği etkinse etkili olacaktır. +
    TrackModified - (Apache 2.0.23 ve sonrası)
    +
    Bu seçenek listelenen dizin için HTTP başlığında Last-Modified ve ETag alanlarının dönmesini @@ -763,8 +822,16 @@ a directory sistemlerinde sağlamaz. Bu gibi durumlarda bu seçeneğin kapalı kalması daha iyidir.
    +
    Type=MIME-türü
    + +
    Type anahtar sözcüğü üretilen sayfanın MIME içerik + türünün belirtilebilmesini sağlar. text/html öntanımlıdır. + +
    IndexOptions Type=text/plain
    + +
    VersionSort - (Apache 2.0a3 ve sonrası)
    +
    VersionSort seçeneği isimlerinde sürüm numarası bulunan dosyaların sayısal sıralamaya uygun olarak sıralanmalarını sağlar. @@ -791,39 +858,37 @@ a directory

    -
    XHTML - (Apache 2.0.49 ve sonrası)
    +
    XHTML
    XHTML seçeneği mod_autoindex’in kodu - HTML 3.2’ye değil XHTML 1.0’a uygun üretmesini sağlar.
    + HTML 3.2’ye değil XHTML 1.0’a uygun üretmesini sağlar. + Bu seçenek sadece + FancyIndexing + seçeneği etkinse etkili olacaktır.
    + veya - Önekli Seçenekler
    -

    Apache 1.3.3’te IndexOptions yönergelerinin ele - alınışıyla ilgili önemil değişiklikler yapılmıştır. Bunlar:

    +

    Çok sayıda IndexOptions yönergesinin + işlenebileceğine dikkat edin.

    • Tek bir dizin için çok sayıda IndexOptions yönergesi belirtilmişse bunlar ayrı ayrı değil birlikte ele alınır. Yani, -

      - <Directory /foo> - - IndexOptions HTMLTable
      - IndexOptions SuppressColumnsorting -
      - </Directory> -

      +
      <Directory "/foo">
      +    IndexOptions HTMLTable
      +    IndexOptions SuppressColumnsorting
      +</Directory>
      +

      yapılandırmasındaki IndexOptions yönergeleri

      -

      - IndexOptions HTMLTable SuppressColumnsorting -

      +
      IndexOptions HTMLTable SuppressColumnsorting
      +

      yönergesine eşdeğerdir.

    • @@ -836,17 +901,18 @@ a directory bunlar mevcut (üst dizinden miras alınanlar ve/veya önceki atamalar) IndexOptions yönergelerine uygulanır. Ancak, önek kullanılmamış bir seçeneğe raslandığında, o noktada önceki ve - miras alınmış bu tür seçenekler iptal edilir. Şu örneği ele alalım:

      + miras alınmış bu tür seçenekler iptal edilir. Şu örneği ele + alalım:

      + +
      IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
      +IndexOptions +SuppressSize
      -

      - IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
      - IndexOptions +SuppressSize -

      -

      Bunun net etkisi IndexOptions FancyIndexing +SuppressSize - atamasına eşdeğerdir, çünkü öneksiz FancyIndexing seçeneği - kendinden önceki önekli seçenekleri iptal etmiş fakat hemen ardından - eklenmelerine izin vermiştir.

      +

      Bunun net etkisi + IndexOptions FancyIndexing +SuppressSize + atamasına eşdeğerdir, çünkü öneksiz FancyIndexing + seçeneği kendinden önceki önekli seçenekleri iptal etmiş fakat hemen + ardından eklenmelerine izin vermiştir.

      Belli bir dizine önceki seçenekleri temizleyerek koşulsuz olarak tamamen yeni seçenekler atamak istiyorsanız @@ -879,16 +945,19 @@ Name|Date|Size|Description

      IndexOrderDefault yönergesi iki değer alır. İlki sıralama yönünü belirtmek üzere Ascending (küçükten büyüğe) veya Descending (büyükten küçüğe) olmak zorundadır. İkinci - değer ise birincil sıralama anahtarını belirtmek üzere Name, - Date, Size ve Description - sözcüklerinden biri olmalıdır (anlamları sırayla: İsim, Tarih, Boyut, - Açıklama). İkincil sıralama anahtarı daima artan sıralamayla - dosya ismidir.

      - -

      Dizin listesinin belli bir sırada gösterilmesini zorunlu kılmak için - yönergeyi SuppressColumnSorting sıralama seçeneği ile birlikte - belirtebilirsiniz; böylece, istemcinin farklı sıralamalara sahip içerik - isteğini engellemiş olursunuz.

      + değer ise birincil sıralama anahtarını belirtmek üzere + Name, Date, Size ve + Description sözcüklerinden biri olmalıdır (anlamları + sırayla: İsim, Tarih, Boyut, Açıklama). İkincil sıralama anahtarı + daima artan sıralamayla dosya ismidir.

      + +

      Sütunun tepesindeki sıralama bağını kaldırmak için + SuppressColumnSorting seçeneğinin yanında, sıralama + tercihlerinizi geçersiz kılmak için sorgu dizgesine elle sıralama + seçenekleri eklenmesini engellemek için + IgnoreClient + seçeneğini de kullanarak istemcinin listeyi yeniden sıralamasını + engelleyebilirsiniz.

      top
      @@ -904,9 +973,33 @@ Name|Date|Size|Description

      IndexStyleSheet yönergesi dizin listelemesi için kullanılacak biçembent dosyasının ismini belirtmek için kullanılır.

      -

      Örnek

      - IndexStyleSheet "/css/style.css" -

      +
      IndexStyleSheet "/css/style.css"
      + + +

      Bu yönergenin IndexOptions HTMLTable ile birlikte + kullanılması sonuçlanan HTML dosyasına bir miktar CSS sınıfı ekler. + Tablonun tamamı indexlist için bir CSS kimliği verir ve + aşağıdaki sınıflar listenin çeşitli parçalarıyla ilişkilendirilir:

      + +
    Sözdizimi:IndexOptions [+|-]seçenek [[+|-]seçenek] ...
    Öntanımlı:Öntanımlı olarak hiçbir seçenek etkin değildir.
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:Indexes
    Durum:Temel
    + + + + + + + + + + + + + + + + +
    SınıfTanım
    tr.indexheadListe satırının başlığı
    th.indexcolicon and td.indexcoliconSimge sütunu
    th.indexcolname and td.indexcolnameDosya ismi sütunu
    th.indexcollastmod and td.indexcollastmodSon değişiklik sütunu
    th.indexcolsize and td.indexcolsizeDosya boyutu sütunu
    th.indexcoldesc and td.indexcoldescAçıklama sütunu
    tr.breakrowTablonun altınaki yatay çizgi
    tr.odd and tr.evenTek ve çift satırlar
    +
    top
    @@ -923,16 +1016,17 @@ belirler.

    ReadmeName yönergesi dizin listesinin sonuna eklenecek dosyanın ismini belirler. dosya-ismi ile listeye dahil edilecek dosyanın ismi listelenen dizine göreli olarak - belirtilir. Eğer dosya ismi bir bölü çizgisi ile başlıyorsa DocumentRoot’a göreli belirtildiği - varsayılır.

    + belirtilir. Eğer dosya ismi 2. örnekteki gibi bir bölü çizgisi ile + başlıyorsa DocumentRoot’a göreli + belirtildiği varsayılır.

    + +
    # 1. Örnek
    +ReadmeName FOOTER.html
    + -

    1. Örnek

    - ReadmeName FOOTER.html -

    +
    # 2. Örnek
    +ReadmeName /include/FOOTER.html
    -

    2. Örnek

    - ReadmeName /include/FOOTER.html -

    Ayrıca bu davranışın daha ayrıntılı ele alındığı HeaderName yönergesine de bakınız.

    @@ -945,7 +1039,28 @@ belirler.  ja  |  ko  |  tr 

    - +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_autoindex.xml b/docs/manual/mod/mod_autoindex.xml index ab5f9acd64a..15592ed2ab5 100644 --- a/docs/manual/mod/mod_autoindex.xml +++ b/docs/manual/mod/mod_autoindex.xml @@ -35,10 +35,10 @@ sources:

      -
    • A file written by the user, typically called +
    • A file located in that directory, typically called index.html. The DirectoryIndex directive sets the - name of this file. This is controlled by + name of the file or files to be used. This is controlled by mod_dir.
    • Otherwise, a listing generated by the server. The other @@ -69,7 +69,8 @@ same header repeatedly toggles between ascending and descending order. These column header links are suppressed with the IndexOptions directive's - SuppressColumnSorting option.

      + SuppressColumnSorting + option.

      Note that when the display is sorted by "Size", it's the actual size of the files that's used, not the @@ -81,11 +82,11 @@

      Autoindex Request Query Arguments -

      Apache HTTP Server 2.0.23 reorganized the Query Arguments for Column - Sorting, and introduced an entire group of new query options. - To effectively eliminate all client control over the output, - the IndexOptions - IgnoreClient option was introduced.

      +

      Various query string arguments are available to give the client + some control over the ordering of the directory listing, as well as + what files are listed. If you do not wish to give the client this + control, the IndexOptions + IgnoreClient option disables that functionality.

      The column sorting headers themselves are self-referencing hyperlinks that add the sort query options shown below. Any @@ -201,10 +202,10 @@ icon selected by filename is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

      - Examples - AddAlt "PDF file" *.pdf
      - AddAlt Compressed *.gz *.zip *.Z -
      + +AddAlt "PDF file" *.pdf +AddAlt Compressed *.gz *.zip *.Z + @@ -229,9 +230,9 @@ selected by MIME-encoding This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

      - Example + AddAltByEncoding gzip x-gzip - + @@ -256,9 +257,9 @@ icon selected by MIME content-type This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon.

      - Example + AddAltByType 'plain text' text/plain - + @@ -279,9 +280,10 @@ icon selected by MIME content-type expression or full filename for files to describe. String is enclosed in double quotes (").

      - Example - AddDescription "The planet Mars" /web/pics/mars.gif - + +AddDescription "The planet Mars" mars.gif +AddDescription "My friend Marshall" friends/mars.gif +

      The typical, default description field is 23 bytes wide. 6 more bytes are added by the element (such as cutting off the end of a bolded phrase), the results may affect the rest of the directory listing.

      + + Arguments with path information +

      Absolute paths are not currently supported and do not match + anything at runtime. Arguments with relative path information, + which would normally only be used in htaccess context, are implicitly + prefixed with '*/' to avoid matching partial directory names.

      +
      + @@ -344,11 +354,12 @@ icon selected by MIME content-type is unnecessary if you're using IndexOptions HTMLTable.

      - Examples - AddIcon (IMG,/icons/image.png) .gif .jpg .png
      - AddIcon /icons/dir.png ^^DIRECTORY^^
      - AddIcon /icons/backup.png *~ -
      + +#Examples +AddIcon (IMG,/icons/image.png) .gif .jpg .png +AddIcon /icons/dir.png ^^DIRECTORY^^ +AddIcon /icons/backup.png *~ +

      AddIconByType should be used in preference to AddIcon, @@ -379,9 +390,9 @@ content-encoding

      MIME-encoding is a valid content-encoding, such as x-compress.

      - Example + AddIconByEncoding /icons/compress.png x-compress - + @@ -409,9 +420,9 @@ content-type

      MIME-type is a wildcard expression matching required the mime types.

      - Example + AddIconByType (IMG,/icons/image.png) image/* - + @@ -432,9 +443,9 @@ configured Url-path is a (%-escaped) relative URL to the icon, or a fully qualified remote URL.

      - Example + DefaultIcon /icon/unknown.png - + @@ -453,9 +464,9 @@ of the index listing of the file that will be inserted at the top of the index listing. Filename is the name of the file to include.

      - Example + HeaderName HEADER.html - +

      Both HeaderName and with a slash, it will be taken to be relative to the DocumentRoot.

      - Example + HeaderName /include/HEADER.html - +

      Filename must resolve to a document with a major content type of text/* (e.g., @@ -476,9 +487,9 @@ of the index listing actual file type (as opposed to its output) is marked as text/html such as with a directive like:

      - + AddType text/html .cgi - +

      Content negotiation will be performed if Options @@ -497,6 +508,8 @@ of the index listing +SuppressHTMLPreamble, so that these tags are not repeated.

      + +ReadmeName @@ -515,14 +528,22 @@ a directory list of files to hide when listing a directory. File is a shell-style wildcard expression or full filename. Multiple IndexIgnore directives add - to the list, rather than the replacing the list of ignored + to the list, rather than replacing the list of ignored files. By default, the list contains . (the current directory).

      - + IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t - + + + Regular Expressions +

      This directive does not currently work in configuration sections + that have regular expression arguments, such as DirectoryMatch +

      +
      +
      @@ -541,15 +562,15 @@ a directory any files ignored by IndexIgnore otherwise inherited from other configuration sections.

      - - <Directory /var/www> - IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t - </Directory> - <Directory /var/www/backups> - IndexIgnoreReset ON - IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t - </Directory> - + +<Directory "/var/www"> + IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t +</Directory> +<Directory "/var/www/backups"> + IndexIgnoreReset ON + IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t +</Directory> +

      Review the default configuration for a list of patterns that you might want to explicitly ignore after using this @@ -601,31 +622,30 @@ indexing (It depends on whether the underlying file system uses Unicode filenames or not.) - Example: + IndexOptions Charset=UTF-8 - +

      DescriptionWidth=[n | *] (Apache HTTP Server 2.0.23 and - later)
      + >DescriptionWidth=[n | *]
      The DescriptionWidth keyword allows you to specify the width of the description column in characters.
      -
      -DescriptionWidth (or unset) allows - mod_autoindex to calculate the best width.
      +
      -DescriptionWidth (or unset) allows + mod_autoindex to calculate the best width.
      DescriptionWidth=n fixes the column width to n bytes wide.
      DescriptionWidth=* grows the column to the width necessary to accommodate the longest description - string.
      + string. -
      See the section on See the section on AddDescription for dangers inherent in truncating descriptions.
      @@ -635,8 +655,7 @@ indexing
      This turns on fancy indexing of directories.
      FoldersFirst (Apache HTTP Server - 2.0.23 and later)
      + id="indexoptions.foldersfirst">FoldersFirst
      If this option is enabled, subdirectory listings will always appear first, followed by normal files in the @@ -647,13 +666,14 @@ indexing FoldersFirst is enabled, subdirectory Zed will be listed before subdirectory Beta, which will be listed before normal files - Gamma and Alpha. This option - only has an effect if FancyIndexing is also enabled.
      + Gamma and Alpha. + This option only has an effect if FancyIndexing + is also enabled. +
      HTMLTable (Apache - HTTP Server 2.0.23 and later)
      + id="indexoptions.htmltable">HTMLTable
      This option with FancyIndexing constructs a simple table for the fancy directory listing. @@ -677,7 +697,13 @@ indexing icon. This allows browser to precalculate the page layout without having to wait until all the images have been loaded. If no value is given for the option, it defaults to the standard height of the icons supplied - with the Apache httpd software.
      + with the Apache httpd software. + + This option + only has an effect if FancyIndexing is also enabled. + +
      IconWidth[= FancyIndexed directory listing into links for sorting. The default behavior is for them to be links; selecting the column heading will sort the directory listing by the values - in that column. Prior to Apache HTTP Server 2.0.23, this also - disabled parsing the Query Arguments for the sort - string. That behavior is now controlled by IndexOptions - IgnoreClient in Apache HTTP Server 2.0.23. + IgnoreClient.
      >AddDescription for information about setting the file description. See also the DescriptionWidth - index option to limit the size of the description column. + index option to limit the size of the description column. + + This option + only has an effect if FancyIndexing is also enabled. +
      put those closing tags in that file.
      SuppressIcon (Apache HTTP Server - 2.0.23 and later)
      + id="indexoptions.suppressicon">SuppressIcon
      This will suppress the icon in fancy indexing listings. Combining both SuppressIcon and @@ -804,27 +833,42 @@ indexing >SuppressLastModified
      This will suppress the display of the last modification date, - in fancy indexing listings.
      + in fancy indexing listings. + + This option + only has an effect if FancyIndexing is also enabled. +
      SuppressRules - (Apache HTTP Server 2.0.23 and later)
      +
      This will suppress the horizontal rule lines (hr elements) in directory listings. Combining both SuppressIcon and SuppressRules yields proper HTML 3.2 output, which by the final specification prohibits img and hr elements from the pre block (used to - format FancyIndexed listings.)
      + format FancyIndexed listings.) + + This option + only has an effect if FancyIndexing is also enabled. + +
      SuppressSize
      -
      This will suppress the file size in fancy indexing listings.
      +
      This will suppress the file size in fancy indexing listings. + + This option + only has an effect if FancyIndexing is also enabled. +
      TrackModified (Apache HTTP Server - 2.0.23 and later)
      + id="indexoptions.trackmodified">TrackModified
      This returns the Last-Modified and ETag values for the listed directory in the HTTP header. It is only valid @@ -849,9 +893,9 @@ indexing specify the MIME content-type of the generated page. The default is text/html. - Example: + IndexOptions Type=text/plain - +
      (Apache HTTP Server 2.0.49 and later)
      The XHTML keyword forces mod_autoindex - to emit XHTML 1.0 code instead of HTML 3.2.
      + to emit XHTML 1.0 code instead of HTML 3.2. + This option + only has an effect if
      FancyIndexing is also enabled. + + + @@ -24,83 +24,85 @@ mod_autoindex -Génère automatiquement des index de répertoires d'une -manière similaire à la commande Unix ls, ou à la commande +Génère automatiquement des index de répertoires d'une +manière similaire à la commande Unix ls, ou à la commande shell Win32 dir Base mod_autoindex.c autoindex_module
      -

      L'index d'un répertoire peut être généré de deux manières :

      +

      L'index d'un répertoire peut être généré de deux manières :

        -
      • Un fichier écrit par l'utilisateur, en général appelé - index.html, mais dont le nom peut être défini par la +
      • Un fichier situé dans ce répertoire, en général appelé + index.html, mais dont le nom de ce ou ces fichiers peut être défini par la directive DirectoryIndex. C'est le module mod_dir qui traite alors cet index.
      • -
      • Un listing généré par le serveur, dont le format est contrôlé +
      • Un listing généré par le serveur, dont le format est contrôlé par un certain nombre de directives. Les directives AddIcon, AddIconByEncoding et AddIconByType permettent de - définir une liste d'icônes à afficher en fonction des différents - types de fichiers ; pour chaque fichier listé, le premier icône - qui correspond au type du fichier est affiché. C'est le module + définir une liste d'icônes à afficher en fonction des différents + types de fichiers ; pour chaque fichier listé, le premier icône + qui correspond au type du fichier est affiché. C'est le module mod_autoindex qui traite alors cet index.
      -

      Les deux fonctions sont séparées, si bien que vous pouvez - entièrement supprimer (ou remplacer) la génération automatique +

      Les deux fonctions sont séparées, si bien que vous pouvez + entièrement supprimer (ou remplacer) la génération automatique d'index, si vous le souhaitez.

      -

      On active la génération automatique d'index en spécifiant +

      On active la génération automatique d'index en spécifiant Options +Indexes. Voir la directive Options pour plus de détails.

      + module="core">Options pour plus de détails.

      Si la directive IndexOptions est spécifiée avec + module="mod_autoindex">IndexOptions est spécifiée avec l'option FancyIndexing, les en-têtes de colonnes sont des liens - qui permettent de contrôler l'ordre de tri de l'affichage. Si vous - actionnez le lien d'un en-tête, le listing sera généré à nouveau, - trié en fonction des valeurs de la colonne concernée. Si l'on - actionne de manière répétitive le même en-tête, l'ordre de tri est - commuté entre les ordres croissant et décroissant. On peut supprimer - ces liens d'en-têtes de colonnes à l'aide de l'option - SuppressColumnSorting de la directive FancyIndexing, les en-têtes de colonnes sont des liens + qui permettent de contrôler l'ordre de tri de l'affichage. Si vous + actionnez le lien d'un en-tête, le listing sera généré à nouveau, + trié en fonction des valeurs de la colonne concernée. Si l'on + actionne de manière répétitive le même en-tête, l'ordre de tri est + commuté entre les ordres croissant et décroissant. On peut supprimer + ces liens d'en-têtes de colonnes à l'aide de l'option + SuppressColumnSorting + de la directive IndexOptions.

      -

      Notez que lorsque l'affichage est trié en fonction de la taille, - c'est la taille réelle qui est prise en compte, et non la - valeur affichée - ainsi, un fichier de 1010 octets sera toujours - affiché avant un fichier de 1011 octets (en ordre croissant), même - si la taille affichée des deux fichiers est "1K".

      +

      Notez que lorsque l'affichage est trié en fonction de la taille, + c'est la taille réelle qui est prise en compte, et non la + valeur affichée - ainsi, un fichier de 1010 octets sera toujours + affiché avant un fichier de 1011 octets (en ordre croissant), même + si la taille affichée des deux fichiers est "1K".

      - Arguments de la requête d'autoindexation + Arguments de la requête d'autoindexation -

      Le serveur HTTP Apache version 2.0.23 a réorganisé - les arguments de requête pour le tri - des colonnes, et intoduit un groupe complet de nouvelles options de - requête. Pour interdire effectivement au client tout contrôle sur - l'affichage, l'option La chaîne de paramètres de la requête peut contenir de nombreux + arguments permettant dans une certaine mesure au client de contrôler + l'ordre de l'index du répertoire, ainsi que la liste des fichiers à + afficher. Si vous souhaitez désactiver cette fonctionnalité, + utilisez l'option IndexOptions - IgnoreClient a été ajoutée.

      + IgnoreClient.

      -

      Les en-têtes de tri des colonnes eux-mêmes sont des hyper-liens - auto-référant qui ajoutent les options de tri à la requête énumérées - ci-dessous qui peuvent être ajoutées à toute requête concernant la - ressource répertoire.

      +

      Les en-têtes de tri des colonnes eux-mêmes sont des hyper-liens + auto-référant qui ajoutent les options de tri à la requête énumérées + ci-dessous qui peuvent être ajoutées à toute requête concernant la + ressource répertoire.

      • C=N trie l'affichage en fonction du nom de fichier
      • C=M trie l'affichage en fonction de la date de - dernière modification, puis du nom de fichier
      • + dernière modification, puis du nom de fichier
      • C=S trie l'affichage en fonction de la taille, puis du nom de fichier
      • @@ -111,42 +113,42 @@ shell Win32 dir
      • O=A trie l'affichage selon l'ordre croissant
      • O=D trie l'affichage selon - l'ordre décroissant
      • + l'ordre décroissant
      • F=0 affiche le listing sous la forme d'une simple liste (sans FancyIndex)
      • -
      • F=1 affiche le listing avec en-têtes de colonnes +
      • F=1 affiche le listing avec en-têtes de colonnes sous forme de liens hyper-textes (FancyIndexed)
      • F=2 affiche le listing sous - forme de table HTML avec en-têtes de colonnes contenant des liens + forme de table HTML avec en-têtes de colonnes contenant des liens hyper-textes (FancyIndexed)
      • -
      • V=0 désactive le tri en fonction de la +
      • V=0 désactive le tri en fonction de la version
      • V=1 active le tri en fonction de la version
      • -
      • P=modèle n'affiche que les fichiers - correspondant au modèle spécifié
      • +
      • P=modèle n'affiche que les fichiers + correspondant au modèle spécifié
      -

      Notez que l'argument 'P' (pour Pattern) n'est testé - qu'après que les directives habituelles IndexIgnore ont été traitées, - et que tous les noms de fichiers sont encore assujettis aux mêmes - critères que pour tout autre listing auto-indexé. L'interpréteur - d'arguments de requête de mod_autoindex s'arrête - immédiatement s'il rencontre une option non reconnue. Les arguments - de requête doivent être bien formés, selon la table ci-dessus.

      - -

      Les options de requêtes sont illustrées par l'exemple ci-dessous, - qui peut être copié et collé dans un fichier header.html. Notez que +

      Notez que l'argument 'P' (pour Pattern) n'est testé + qu'après que les directives habituelles IndexIgnore ont été traitées, + et que tous les noms de fichiers sont encore assujettis aux mêmes + critères que pour tout autre listing auto-indexé. L'interpréteur + d'arguments de requête de mod_autoindex s'arrête + immédiatement s'il rencontre une option non reconnue. Les arguments + de requête doivent être bien formés, selon la table ci-dessus.

      + +

      Les options de requêtes sont illustrées par l'exemple ci-dessous, + qui peut être copié et collé dans un fichier header.html. Notez que l'argument inconnu "X", pour le bouton submit, est introduit en - dernier afin de s'assurer que tous les arguments ont été - interprétés avant que mod_autoindex ne rencontre l'entrée X=Go.

      + dernier afin de s'assurer que tous les arguments ont été + interprétés avant que mod_autoindex ne rencontre l'entrée X=Go.

      <form action="" method="get">
      @@ -155,12 +157,12 @@ shell Win32 dir <option value="0"> liste simple</option>
      <option value="1" selected="selected"> liste avec - en-têtes</option>
      - <option value="2"> liste avec en-tête sous forme de + en-têtes</option>
      + <option value="2"> liste avec en-tête sous forme de table</option>
      </select>
      - triée par <select name="C">
      + triée par <select name="C">
      <option value="N" selected="selected"> nom</option>
      <option value="M"> date de modification</option>
      @@ -171,7 +173,7 @@ shell Win32 dir <select name="O">
      <option value="A" selected="selected"> croissant</option>
      - <option value="D"> décroissant</option>
      + <option value="D"> décroissant</option>
      </select>
      <select name="V">
      @@ -181,7 +183,7 @@ shell Win32 dir <option value="1"> en fonction de la version</option>
      </select>
      - correspondant à <input type="text" name="P" value="*" />
      + correspondant à <input type="text" name="P" value="*" />
      <input type="submit" name="X" value="Go" />
      </form> @@ -191,7 +193,7 @@ shell Win32 dir AddAlt -Texte optionnel à afficher à la place d'un icône pour un +Texte optionnel à afficher à la place d'un icône pour un fichier en fonction de son nom AddAlt texte fichier [fichier] ... server configvirtual host @@ -201,28 +203,28 @@ fichier en fonction de son nom

      La directive AddAlt permet d'afficher un - texte optionnel pour un fichier, à la place d'un icône, dans le cas + texte optionnel pour un fichier, à la place d'un icône, dans le cas d'un affichage FancyIndexing. fichier est une extension de fichier, un nom de fichier - partiel, une expression avec caractères génériques ou un nom de - fichier complet permettant de caractériser le(s) fichier(s) - concerné(s). Si texte contient des espaces, vous devez + partiel, une expression avec caractères génériques ou un nom de + fichier complet permettant de caractériser le(s) fichier(s) + concerné(s). Si texte contient des espaces, vous devez l'entourer de guillemets ou d'apostrophes (" ou - '). Ce texte optionnel sera affiché si le client ne - peut pas afficher d'images, si le chargement d'images est désactivé - ou si l'icône ne peut pas être trouvé.

      - - Exemples - AddAlt "Fichier PDF" *.pdf
      - AddAlt Compressé *.gz *.zip *.Z -
      + '). Ce texte optionnel sera affiché si le client ne + peut pas afficher d'images, si le chargement d'images est désactivé + ou si l'icône ne peut pas être trouvé.

      + + +AddAlt "PDF file" *.pdf +AddAlt Compressed *.gz *.zip *.Z +
      AddAltByEncoding -Texte optionnel à afficher à la place d'un icône pour un +Texte optionnel à afficher à la place d'un icône pour un fichier en fonction de son codage MIME AddAltByEncoding texte codage MIME [codage MIME] ... @@ -233,25 +235,25 @@ fichier en fonction de son codage MIME

      La directive AddAltByEncoding permet - d'afficher un texte optionnel à la place d'un icône pour un fichier + d'afficher un texte optionnel à la place d'un icône pour un fichier dans le cas d'un affichage FancyIndexing. - codage MIME doit être un type valide, comme + codage MIME doit être un type valide, comme x-compress. Si texte contient des espaces, vous devez l'entourer de guillemets ou d'apostrophes (" - ou '). Ce texte optionnel sera affiché si le client ne - peut pas afficher d'images, si le chargement d'images est désactivé - ou si l'icône ne peut pas être trouvé.

      + ou '). Ce texte optionnel sera affiché si le client ne + peut pas afficher d'images, si le chargement d'images est désactivé + ou si l'icône ne peut pas être trouvé.

      - Exemple + AddAltByEncoding gzip x-gzip - +
      AddAltByType -Texte optionnel à afficher à la place d'un icône pour un +Texte optionnel à afficher à la place d'un icône pour un fichier en fonction de son type MIME AddAltByType texte type MIME [type MIME] ... @@ -262,19 +264,19 @@ fichier en fonction de son type MIME

      La directive AddAltByType permet - d'afficher un texte optionnel à la place d'un icône pour un fichier + d'afficher un texte optionnel à la place d'un icône pour un fichier dans le cas d'un affichage FancyIndexing. - type MIME doit être un type MIME valide, comme + type MIME doit être un type MIME valide, comme text/html. Si texte contient des espaces, vous devez l'entourer de guillemets ou d'apostrophes (" - ou '). Ce texte optionnel sera affiché si le client ne - peut pas afficher d'images, si le chargement d'images est désactivé - ou si l'icône ne peut pas être trouvé.

      + ou '). Ce texte optionnel sera affiché si le client ne + peut pas afficher d'images, si le chargement d'images est désactivé + ou si l'icône ne peut pas être trouvé.

      - Exemple + AddAltByType 'Fichier texte' text/plain - +
      @@ -292,57 +294,67 @@ fichier en fonction de son type MIME fichier, dans le cas d'un affichage FancyIndexing. fichier est une extension de fichier, un nom de fichier - partiel, une expression avec caractères génériques ou un nom de - fichier complet permettant de caractériser le fichier. - texte doit être entouré de guillemets + partiel, une expression avec caractères génériques ou un nom de + fichier complet permettant de caractériser le fichier. + texte doit être entouré de guillemets (").

      - Exemple - AddDescription "La planète Mars" /web/pics/mars.gif - + +AddDescription "The planet Mars" mars.gif +AddDescription "My friend Marshall" friends/mars.gif + -

      La taille par défaut, habituelle du champ de description est de +

      La taille par défaut, habituelle du champ de description est de 23 octets. L'option IndexOptions SuppressIcon ajoute 6 octets, l'option IndexOptions SuppressSize en ajoute 7 et l'option IndexOptions SuppressLastModified en ajoute 19. Ainsi, la plus grande - taille par défaut qui peut être assignée à la colonne description + taille par défaut qui peut être assignée à la colonne description est de 55 octets.

      -

      Comme l'argument fichier peut être un nom de fichier - partiel, vous devez garder à l'esprit qu'un nom de fichier partiel - trop court pourra correspondre à des fichiers non voulus. Par +

      Comme l'argument fichier peut être un nom de fichier + partiel, vous devez garder à l'esprit qu'un nom de fichier partiel + trop court pourra correspondre à des fichiers non voulus. Par exemple, le.html correspondra au fichier le.html, mais aussi au fichier - example.html. En cas d'ambiguïté, utilisez un nom de + example.html. En cas d'ambiguïté, utilisez un nom de fichier aussi complet que possible, et ordonnez votre liste de - directives AddDescription en conséquence.

      + directives AddDescription en conséquence.

      -

      Voir le mot-clé Voir le mot-clé DescriptionWidth de la directive module="mod_autoindex">IndexOptions pour plus de - détails sur la manière d'augmenter la taille de cette colonne, ou - pour permettre des descriptions de taille illimitée.

      + détails sur la manière d'augmenter la taille de cette colonne, ou + pour permettre des descriptions de taille illimitée.

      Avertissement -

      Le texte descriptif défini par la directive +

      Le texte descriptif défini par la directive AddDescription peut contenir des marquages - HTML, comme des balises ou des entités caractères. Si la limite de - taille de la colonne description venait à tronquer une balise (par - exemple couper la fin d'une phrase en caractères gras), le - résultat pourrait en affecter toute la suite du listing du - répertoire.

      + HTML, comme des balises ou des entités caractères. Si la limite de + taille de la colonne description venait à tronquer une balise (par + exemple couper la fin d'une phrase en caractères gras), le + résultat pourrait en affecter toute la suite du listing du + répertoire.

      +
      + + Arguments avec chemins +

      Les chemins absolus ne sont actuellement pas supportés et ne + peuvent correspondre à aucun chemin réel à l'exécution. Les + arguments contenant des chemins relatifs, qui ne devraient être + normalement utilisés que dans les fichiers htaccess, sont + implicitement préfixés par '*/' afin d'éviter toute association + avec des noms de répertoires partiels.

      AddIcon -Icône à afficher pour un fichier en fonction de son +Icône à afficher pour un fichier en fonction de son nom -AddIcon icône nom [nom] +AddIcon icône nom [nom] ... server configvirtual host directory.htaccess @@ -350,43 +362,44 @@ nom Indexes -

      Cette directive permet de déterminer l'icône à afficher à côté +

      Cette directive permet de déterminer l'icône à afficher à côté d'un fichier dont le nom se termine par nom, dans le cas d'un affichage FancyIndexing. icône est une URL relative - (échappée par des caractères '%') vers - l'icône, une URL distante pleinement qualifiée, ou de la forme - (alttext,url), où - alttext est le symbole texte correspondant à l'icône à + >FancyIndexing. icône est une URL relative + (échappée par des caractères '%') vers + l'icône, une URL distante pleinement qualifiée, ou de la forme + (alttext,url), où + alttext est le symbole texte correspondant à l'icône à afficher dans les navigateurs en mode texte.

      -

      nom correspond à ^^DIRECTORY^^ pour les - répertoires, ^^BLANKICON^^ pour les lignes vides - (pour personnaliser la présentation du listing), une extension de - fichier, une expression avec caractères génériques, un nom de +

      nom correspond à ^^DIRECTORY^^ pour les + répertoires, ^^BLANKICON^^ pour les lignes vides + (pour personnaliser la présentation du listing), une extension de + fichier, une expression avec caractères génériques, un nom de fichier partiel ou un nom de fichier complet.

      -

      ^^BLANKICON^^ n'est utilisé que pour le formatage, - et n'est donc pas nécessaire si vous utilisez IndexOptions +

      ^^BLANKICON^^ n'est utilisé que pour le formatage, + et n'est donc pas nécessaire si vous utilisez IndexOptions HTMLTable.

      - Exemples - AddIcon (IMG,/icons/image.png) .gif .jpg .png
      - AddIcon /icons/dir.png ^^DIRECTORY^^
      - AddIcon /icons/backup.png *~ -
      + +#Examples +AddIcon (IMG,/icons/image.png) .gif .jpg .png +AddIcon /icons/dir.png ^^DIRECTORY^^ +AddIcon /icons/backup.png *~ + -

      Lorsque c'est possible, il est préférable d'utiliser AddIconByType plutôt que +

      Lorsque c'est possible, il est préférable d'utiliser AddIconByType plutôt que AddIcon.

      AddIconByEncoding -Icône à afficher à côté d'un fichier en fonction de son +Icône à afficher à côté d'un fichier en fonction de son codage MIME -AddIconByEncoding icône codage MIME +AddIconByEncoding icône codage MIME [codage MIME] ... server configvirtual host directory.htaccess @@ -394,30 +407,30 @@ codage MIME Indexes -

      Cette directive permet de déterminer l'icône à afficher à côté +

      Cette directive permet de déterminer l'icône à afficher à côté d'un fichier dans le cas d'un affichage FancyIndexing. - icône est une URL relative - (échappée par des caractères '%') vers - l'icône, une URL pleinement qualifiée, ou de la forme - (alttext,url), où - alttext est le symbole texte correspondant à l'icône à + icône est une URL relative + (échappée par des caractères '%') vers + l'icône, une URL pleinement qualifiée, ou de la forme + (alttext,url), où + alttext est le symbole texte correspondant à l'icône à afficher dans les navigateurs en mode texte.

      -

      codage MIME doit être un codage valide, comme +

      codage MIME doit être un codage valide, comme x-compress.

      - Exemple + AddIconByEncoding /icons/compress.png x-compress - +
      AddIconByType -Icône à afficher à côté d'un fichier en fonction de son +Icône à afficher à côté d'un fichier en fonction de son type MIME -AddIconByType icône type MIME +AddIconByType icône type MIME [type MIME] ... server configvirtual host directory.htaccess @@ -425,30 +438,30 @@ type MIME Indexes -

      Cette directive permet de déterminer l'icône à afficher à côté +

      Cette directive permet de déterminer l'icône à afficher à côté d'un fichier de type MIME type MIME dans le cas d'un affichage FancyIndexing. - icône est une URL relative - (échappée par des caractères '%') vers - l'icône, une URL pleinement qualifiée, ou de la forme - (alttext,url), où - alttext est le symbole texte correspondant à l'icône à + icône est une URL relative + (échappée par des caractères '%') vers + l'icône, une URL pleinement qualifiée, ou de la forme + (alttext,url), où + alttext est le symbole texte correspondant à l'icône à afficher dans les navigateurs en mode texte.

      -

      type MIME est une expression avec caractères - génériques représentant le type MIME.

      +

      type MIME est une expression avec caractères + génériques représentant le type MIME.

      - Exemple + AddIconByType (IMG,/icons/image.png) image/* - +
      DefaultIcon -Icône à afficher par défaut lorsqu'aucun icône spécifique -n'est précisé +Icône à afficher par défaut lorsqu'aucun icône spécifique +n'est précisé DefaultIcon chemin URL server configvirtual host directory.htaccess @@ -456,22 +469,22 @@ n'est précisé Indexes -

      La directive DefaultIcon permet de définir - l'icône à afficher à côté d'un fichier lorsqu'aucun icône spécifique - n'a été précisé, dans le cas d'un affichage La directive DefaultIcon permet de définir + l'icône à afficher à côté d'un fichier lorsqu'aucun icône spécifique + n'a été précisé, dans le cas d'un affichage FancyIndexing. - chemin URL est une URL relative (échappée par des - caractères '%') vers l'icône ou une URL pleinement qualifiée.

      + chemin URL est une URL relative (échappée par des + caractères '%') vers l'icône ou une URL pleinement qualifiée.

      - Exemple + DefaultIcon /icon/unknown.png - +
      HeaderName -Nom du fichier qui sera inséré au début de la page +Nom du fichier qui sera inséré au début de la page contenant l'index HeaderName nom fichier server configvirtual host @@ -480,65 +493,67 @@ contenant l'index Indexes -

      La directive HeaderName permet de définir - le nom du fichier qui sera inséré au début de la page contenant - l'index. nom fichier est le nom du fichier à inclure.

      +

      La directive HeaderName permet de définir + le nom du fichier qui sera inséré au début de la page contenant + l'index. nom fichier est le nom du fichier à inclure.

      - Exemple + HeaderName HEADER.html - +

      Les deux directives HeaderName et ReadmeName traitent maintenant nom fichier comme un chemin URI relatif au chemin - utilisé pour accéder au répertoire faisant l'objet de l'index. Si + utilisé pour accéder au répertoire faisant l'objet de l'index. Si nom fichier commence par un slash '/', il sera - considéré comme relatif au répertoire défini par la directive + considéré comme relatif au répertoire défini par la directive DocumentRoot.

      - Exemple + HeaderName /include/HEADER.html - + -

      nom fichier doit correspondre à un document dont le +

      nom fichier doit correspondre à un document dont le type MIME est du style text/* (par exemple text/html, text/plain, etc...). Cela - signifie que nom fichier peut faire référence à un - script CGI si le véritable type MIME du script (et non celui de sa - sortie) est marqué comme text/html par exemple à + signifie que nom fichier peut faire référence à un + script CGI si le véritable type MIME du script (et non celui de sa + sortie) est marqué comme text/html par exemple à l'aide d'une directive comme :

      - + AddType text/html .cgi - + -

      Une négociation de - contenu sera effectuée si Options MultiViews a été - précisé. Si nom fichier correspond à un document - statique text/html (et non à un script CGI), et une +

      Une négociation de + contenu sera effectuée si Options MultiViews a été + précisé. Si nom fichier correspond à un document + statique text/html (et non à un script CGI), et une des deux options - Includes ou IncludesNOEXEC est activée, - le fichier sera traité en tant qu'inclusion côté serveur (Server + Includes ou IncludesNOEXEC est activée, + le fichier sera traité en tant qu'inclusion côté serveur (Server Side Include) (voir la documentation de mod_include).

      -

      Si le fichier spécifié par la directive - HeaderName contient les en-têtes d'un +

      Si le fichier spécifié par la directive + HeaderName contient les en-têtes d'un document HTML ((<html>, <head>, etc...), vous serez - probablement amené à définir IndexOptions - +SuppressHTMLPreamble, de manière à ce que ces balises ne - soient pas répétées.

      + +SuppressHTMLPreamble
      , de manière à ce que ces balises ne + soient pas répétées.

      + +ReadmeName IndexIgnore -Ajouts à la liste des fichiers à cacher lors de l'affichage -de l'index d'un répertoire +Ajouts à la liste des fichiers à cacher lors de l'affichage +de l'index d'un répertoire IndexIgnore fichier [fichier] ... IndexIgnore "." server configvirtual host @@ -548,49 +563,57 @@ de l'index d'un répertoire

      La directive IndexIgnore permet - d'effectuer des ajouts à la liste des fichiers à cacher lors de - l'affichage de l'index d'un répertoire. fichier est une - expression avec caractères génériques de style shell ou un nom de + d'effectuer des ajouts à la liste des fichiers à cacher lors de + l'affichage de l'index d'un répertoire. fichier est une + expression avec caractères génériques de style shell ou un nom de fichier complet. Plusieurs directives IndexIgnore effectuent des - ajouts à la liste, et ne remplacent pas la liste des fichiers à - ignorer. Par défaut, la liste contient . (le répertoire + ajouts à la liste, et ne remplacent pas la liste des fichiers à + ignorer. Par défaut, la liste contient . (le répertoire courant).

      - + IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t - + + + Expressions rationnelles +

      Cette directive est actuellement incompatible avec les sections + de configuration qui comportent des arguments avec expressions + rationnelles comme DirectoryMatch

      +
      +
      IndexIgnoreReset -Vide la liste des fichiers à cacher lors de l'affichage du -contenu d'un répertoire +Vide la liste des fichiers à cacher lors de l'affichage du +contenu d'un répertoire IndexIgnoreReset ON|OFF server configvirtual host directory.htaccess Indexes -Versions 2.3.10 et supérieures +Versions 2.3.10 et supérieures

      La directive IndexIgnoreReset supprime - toute liste de fichiers définie par la directive - IndexIgnore et héritée par ailleurs d'autres + toute liste de fichiers définie par la directive + IndexIgnore et héritée par ailleurs d'autres sections de configuration.

      - - <Directory /var/www> - IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t - </Directory> - <Directory /var/www/backups> - IndexIgnoreReset ON - IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t - </Directory> - - -

      Revoyez la configuration par défaut pour une - liste de modèles que vous voulez ignorer explicitement après usage + +<Directory "/var/www"> + IndexIgnore *.bak .??* *~ *# HEADER* README* RCS CVS *,v *,t +</Directory> +<Directory "/var/www/backups"> + IndexIgnoreReset ON + IndexIgnore .??* *# HEADER* README* RCS CVS *,v *,t +</Directory> + + +

      Revoyez la configuration par défaut pour une + liste de modèles que vous voulez ignorer explicitement après usage de cette directive.

      @@ -598,10 +621,10 @@ contenu d'un répertoire IndexOptions Diverses options de configuration pour l'indexation d'un -répertoire +répertoire IndexOptions [+|-]option [[+|-]option] ... -Par défaut, aucune option n'est activée. +Par défaut, aucune option n'est activée. server configvirtual host directory.htaccess @@ -609,151 +632,153 @@ répertoire

      La directive IndexOptions permet de - spécifier les options de configuration de l'indexation du - répertoire. option peut prendre l'une des valeurs + spécifier les options de configuration de l'indexation du + répertoire. option peut prendre l'une des valeurs suivantes :

      AddAltClass
      -
      Ajoute une déclaration de classe CSS supplémentaire à chaque - enregistrement de la table du listing du répertoire dans le cas où - IndexOptions HTMLTable est activé et où un - IndexStyleSheet a été défini. Plutôt que d'appliquer - à chaque enregistrement de la table les classes standards +
      Ajoute une déclaration de classe CSS supplémentaire à chaque + enregistrement de la table du listing du répertoire dans le cas où + IndexOptions HTMLTable est activé et où un + IndexStyleSheet a été défini. Plutôt que d'appliquer + à chaque enregistrement de la table les classes standards even et odd, c'est ici une classe even-ALT ou odd-ALT - qui sera appliquée, où ALT sera soit le texte alternatif - standard associé au style du fichier (par exemple snd, + qui sera appliquée, où ALT sera soit le texte alternatif + standard associé au style du fichier (par exemple snd, txt, img, etc...), soit le texte alternatif - défini par une des différentes directives AddAlt*. + défini par une des différentes directives AddAlt*.
      Charset=jeu de caractères (Versions 2.0.61 et - supérieures du serveur HTTP Apache)
      + >Charset=jeu de caractères (Versions 2.0.61 et + supérieures du serveur HTTP Apache) -
      Le mot-clé Charset vous permet de spécifier le - jeu de caractères de la page générée. La valeur par défaut est +
      Le mot-clé Charset vous permet de spécifier le + jeu de caractères de la page générée. La valeur par défaut est UTF-8 sous Windows et MAC OS X, et ISO-8859-1 dans les autres cas (en fait selon que le - système de fichiers sous-jacent utilise les noms de fichiers en + système de fichiers sous-jacent utilise les noms de fichiers en Unicode ou non). - Exemple : + IndexOptions Charset=UTF-8 - +
      DescriptionWidth=[n | *] (Versions 2.0.23 et - supérieures du serveur HTTP Apache)
      + >DescriptionWidth=[n | *] -
      Le mot-clé DescriptionWidth vous permet de - spécifier la taille en caractères de la colonne description.
      +
      Le mot-clé DescriptionWidth vous permet de + spécifier la taille en caractères de la colonne description.
      -
      Avec -DescriptionWidth (ou si l'option n'est pas - définie), mod_autoindex calcule la meilleure - taille.
      +
      Avec -DescriptionWidth (ou si l'option n'est pas + définie), mod_autoindex calcule la meilleure + taille.
      DescriptionWidth=n fixe la taille de - la colonne à n octets.
      + la colonne à n octets.
      DescriptionWidth=* ajuste la taille de la colonne - à la plus longue chaîne de description.
      + à la plus longue chaîne de description. -
      Voir la section concernant Voir la section concernant AddDescription pour les dangers - inhérants à la troncature des descriptions.
      + inhérants à la troncature des descriptions.
      FancyIndexing
      -
      Cette option active l'indexation "améliorée" des répertoires, - c'est à dire avec en-têtes de colonnes sous forme d'hyper-liens - auto-référants.
      +
      Cette option active l'indexation "améliorée" des répertoires, + c'est à dire avec en-têtes de colonnes sous forme d'hyper-liens + auto-référants.
      FoldersFirst (Versions 2.0.23 et - supérieures du serveur HTTP Apache)
      + id="indexoptions.foldersfirst">FoldersFirst -
      Lorsque cette option est activée, la liste des - sous-répertoires apparaîtra toujours en premier, suivie - de la liste des fichiers normaux du répertoire. Le listing +
      Lorsque cette option est activée, la liste des + sous-répertoires apparaîtra toujours en premier, suivie + de la liste des fichiers normaux du répertoire. Le listing comporte principalement deux parties, les fichiers et les - sous-répertoires, chacun d'eux étant trié séparément et les - sous-répertoires affichés en premier. Par exemple, si l'ordre de - tri est décroissant par nom, et si FoldersFirst est - activé, le sous-répertoire Zed sera affiché avant le - sous-répertoire Beta, qui sera lui-même affiché avant + sous-répertoires, chacun d'eux étant trié séparément et les + sous-répertoires affichés en premier. Par exemple, si l'ordre de + tri est décroissant par nom, et si FoldersFirst est + activé, le sous-répertoire Zed sera affiché avant le + sous-répertoire Beta, qui sera lui-même affiché avant les fichiers normaux Gamma et Alpha. Cette option n'a d'effet que si FancyIndexing - est aussi activé.
      + est aussi activé. +
      HTMLTable - (Versions 2.0.23 et supérieures - du serveur HTTP Apache)
      + id="indexoptions.htmltable">HTMLTable
      Cette option pour l'affichage FancyIndexing permet de construire une table simple - pour l'affichage de l'index du répertoire. Cette option s'avèrera - particulièrement nécessaire pour les plates-formes où utf-8 est - activé et dans le cas où les noms de fichiers ou les chaînes - de description alternent entre les ordres de lecture gauche à - droite et droite à gauche.
      + pour l'affichage de l'index du répertoire. Cette option s'avèrera + particulièrement nécessaire pour les plates-formes où utf-8 est + activé et dans le cas où les noms de fichiers ou les chaînes + de description alternent entre les ordres de lecture gauche à + droite et droite à gauche.
      IconsAreLinks
      -
      Configure la partie réservée aux icônes de l'ancrage pour le - nom de fichier, dans le cas d'un affichage "amélioré".
      +
      Configure la partie réservée aux icônes de l'ancrage pour le + nom de fichier, dans le cas d'un affichage "amélioré".
      IconHeight[=pixels]
      -
      Si cette option est présente, en combinaison avec +
      Si cette option est présente, en combinaison avec IconWidth, le serveur va inclure les attributs height et width dans la balise - img qui référence le fichier de l'icône. Ceci va - permettre au navigateur de prévoir les caractéristiques de la page - sans devoir attendre que toutes les images aient été chargées. En - l'absence de cette option, c'est la hauteur standard définie par - le logiciel Apache httpd qui est choisie comme valeur par défaut.
      + img qui référence le fichier de l'icône. Ceci va + permettre au navigateur de prévoir les caractéristiques de la page + sans devoir attendre que toutes les images aient été chargées. En + l'absence de cette option, c'est la hauteur standard définie par + le logiciel Apache httpd qui est choisie comme valeur par défaut. + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      IconWidth[=pixels]
      -
      Si cette option est présente, en combinaison avec +
      Si cette option est présente, en combinaison avec IconHeight, le serveur va inclure les attributs height et width dans la balise - img qui référence le fichier de l'icône. Ceci va - permettre au navigateur de prévoir les caractéristiques de la page - sans devoir attendre que toutes les images aient été chargées. En - l'absence de cette option, c'est la largeur standard définie par - le logiciel Apache httpd qui est choisie comme valeur par défaut.
      + img qui référence le fichier de l'icône. Ceci va + permettre au navigateur de prévoir les caractéristiques de la page + sans devoir attendre que toutes les images aient été chargées. En + l'absence de cette option, c'est la largeur standard définie par + le logiciel Apache httpd qui est choisie comme valeur par défaut.
      IgnoreCase
      -
      Si cette option est activée, les noms sont triés sans tenir +
      Si cette option est activée, les noms sont triés sans tenir compte de la casse. Par exemple, si le tri s'effectue sur les noms - dans l'ordre croissant, et si IgnoreCase est activé, - le fichier Zeta apparaîtra après le fichier alfa (Note : le - fichier GAMMA apparaîtra toujours avant le fichier gamma). + dans l'ordre croissant, et si IgnoreCase est activé, + le fichier Zeta apparaîtra après le fichier alfa (Note : le + fichier GAMMA apparaîtra toujours avant le fichier gamma).
      IgnoreClient
      -
      Si cette option est activée, mod_autoindex va - ignorer toutes les variables de requête fournies par le client, y +
      Si cette option est activée, mod_autoindex va + ignorer toutes les variables de requête fournies par le client, y compris les informations de tri (ce qui implique l'activation de l'option SuppressColumnSorting).
      @@ -762,53 +787,51 @@ répertoire id="indexoptions.namewidth">NameWidth=[n | *] -
      Le mot-clé NameWidth vous permet de spécifier la +
      Le mot-clé NameWidth vous permet de spécifier la largeur en octets de la colonne correspondant au nom du fichier.
      Avec -NameWidth (ou si l'option n'est pas - définie), mod_autoindex va calculer la meilleure largeur - possible, mais jusqu'à une largeur maximale de 20 octets.
      + possible, mais jusqu'à une largeur maximale de 20 octets.
      NameWidth=n fixe la largeur de la - colonne à n octets.
      + colonne à n octets. -
      NameWidth=* définit la largeur de colonne à la - valeur nécessaire.
      +
      NameWidth=* définit la largeur de colonne à la + valeur nécessaire.
      ScanHTMLTitles
      L'activation de cette option permet d'extraire le titre des - documents HTML dans le cas d'un affichage "amélioré". Si le fichier - ne possède aucune description définie par la directive AddDescription, httpd va lire le document pour tenter d'en extraire le titre. Ce - processus est coûteux en ressources disque et CPU.
      + processus est coûteux en ressources disque et CPU.
      ShowForbidden
      -
      Si cette option est activée, Apache httpd affichera les fichiers - normalement cachés suite au retour des valeurs +
      Si cette option est activée, Apache httpd affichera les fichiers + normalement cachés suite au retour des valeurs HTTP_UNAUTHORIZED ou HTTP_FORBIDDEN par - la sous-requête.
      + la sous-requête.
      SuppressColumnSorting
      -
      Si cette option est activée, Apache httpd supprimera les liens - hyper-texte dans les en-têtes de colonnes dans le cas d'un - affichage "amélioré". Par défaut, ces en-têtes constituent des liens - hyper-texte, et la sélection de l'un d'entre eux va trier l'index - du répertoire en fonction des valeurs de la colonne - correspondante. Avant la version 2.0.23 du serveur HTTP - Apache, cette option désactivait aussi l'interprétation des - informations de tri transmises via les arguments de la - requête. Depuis la version 2.0.23 du serveur HTTP Apache, ce comportement est - contrôlé par Si cette option est activée, Apache httpd supprimera les liens + hyper-texte dans les en-têtes de colonnes dans le cas d'un + affichage "amélioré". Par défaut, ces en-têtes constituent des liens + hyper-texte, et la sélection de l'un d'entre eux va trier l'index + du répertoire en fonction des valeurs de la colonne + correspondante. Cependant, les arguments de la chaîne de + paramètres de la requête ajoutés à l'URL seront toujours ignorés. + Ce comportement est contrôlé par l'option IndexOptions IgnoreClient.
      @@ -817,127 +840,143 @@ répertoire >SuppressDescription
      L'activation de cette option va supprimer la description des - fichiers dans le cas d'un affichage "amélioré". Par défaut aucune - description de fichier n'est définie, et par conséquent - l'utilisation de cette option va permettre de récupérer un espace - à l'écran de 23 caractères pouvant être utilisé pour autre chose. + fichiers dans le cas d'un affichage "amélioré". Par défaut aucune + description de fichier n'est définie, et par conséquent + l'utilisation de cette option va permettre de récupérer un espace + à l'écran de 23 caractères pouvant être utilisé pour autre chose. Voir la directive AddDescription pour plus d'informations à propos de - la définition des descriptions de fichiers. Voir aussi l'option + >AddDescription pour plus d'informations à propos de + la définition des descriptions de fichiers. Voir aussi l'option d'index DescriptionWidth - pour limiter la taille de la colonne description.
      + pour limiter la taille de la colonne description. + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      SuppressHTMLPreamble
      -
      Si le répertoire contient effectivement le fichier spécifié +
      Si le répertoire contient effectivement le fichier spécifié par la directive HeaderName, le module inclut - en général le contenu du fichier après avoir inséré un préambule + en général le contenu du fichier après avoir inséré un préambule HTML standard (<html>, <head>, etc...). L'activation de l'option SuppressHTMLPreamble supprime l'insertion de - ce préambule, et le module va alors commencer l'affichage - directement par le contenu du fichier d'en-tête. Dans ce cas par - contre, le fichier d'en-tête doit contenir des instructions HTML - appropriées. S'il n'y a pas de fichier d'en-tête, le préambule est - généré comme dans le cas général. Si vous spécifiez aussi une + ce préambule, et le module va alors commencer l'affichage + directement par le contenu du fichier d'en-tête. Dans ce cas par + contre, le fichier d'en-tête doit contenir des instructions HTML + appropriées. S'il n'y a pas de fichier d'en-tête, le préambule est + généré comme dans le cas général. Si vous spécifiez aussi une directive ReadmeName, et si ce fichier existe, les balises de fermeture closing </body></html> seront aussi omises dans la sortie, en - supposant que vous ayez placé ces balises de fermeture dans ce + supposant que vous ayez placé ces balises de fermeture dans ce fichier.
      SuppressIcon - (Versions 2.0.23 et supérieures du serveur - HTTP Apache)
      + id="indexoptions.suppressicon">SuppressIcon -
      L'activation de cette option supprime l'affichage des icônes - dans le cas d'un affichage "amélioré". La combinaison de +
      L'activation de cette option supprime l'affichage des icônes + dans le cas d'un affichage "amélioré". La combinaison de SuppressIcon et SuppressRules permet de - générer une sortie au format HTML 3.2 qui, selon les dernières - spécifications, interdit les éléments img et - hr dans les blocs pre (utilisés pour - formater les affichages "améliorés").
      + générer une sortie au format HTML 3.2 qui, selon les dernières + spécifications, interdit les éléments img et + hr dans les blocs pre (utilisés pour + formater les affichages "améliorés").
      SuppressLastModified
      L'activation de cette option supprime l'affichage de la date - de dernière modification dans le cas d'un affichage "amélioré".
      + de dernière modification dans le cas d'un affichage "amélioré". + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      SuppressRules - (Versions 2.0.23 et supérieures du serveur HTTP Apache)
      +
      L'activation de cette option supprime l'affichage des lignes - horizontales (éléments hr) dans les index de - répertoires. La combinaison de + horizontales (éléments hr) dans les index de + répertoires. La combinaison de SuppressIcon et SuppressRules permet de - générer une sortie au format HTML 3.2 qui, selon les dernières - spécifications, interdit les éléments img et - hr dans les blocs pre (utilisés pour - formater les affichages "améliorés").
      + générer une sortie au format HTML 3.2 qui, selon les dernières + spécifications, interdit les éléments img et + hr dans les blocs pre (utilisés pour + formater les affichages "améliorés"). + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      SuppressSize
      L'activation de cette option supprime l'affichage de la taille - du fichier dans le cas d'un affichage "amélioré".
      + du fichier dans le cas d'un affichage "amélioré". + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      TrackModified - (Versions 2.0.23 et supérieures du serveur - HTTP Apache)
      + id="indexoptions.trackmodified">TrackModified
      Cette option renvoie les valeurs Last-Modified et - ETag pour le répertoire indexé dans l'en-tête HTTP. - Elle n'est valide que si le système d'exploitation et le système - de fichiers renvoient des résultats appropriés pour la fonction - stat(). C'est le cas de certains systèmes Unix, ainsi que JFS sous + ETag pour le répertoire indexé dans l'en-tête HTTP. + Elle n'est valide que si le système d'exploitation et le système + de fichiers renvoient des résultats appropriés pour la fonction + stat(). C'est le cas de certains systèmes Unix, ainsi que JFS sous OS/2 ou les volumes NTFS sous Win32. Ce n'est par contre pas le cas - des volumes FAT Win32 et OS/2. Lorsque cette option est activée, le - client ou le mandataire peuvent détecter les changements dans la - liste des fichiers lorsqu'ils effectuent une requête - HEAD. Notez que certains systèmes d'exploitation - détectent correctement les nouveaux fichiers et les fichiers - supprimés, mais ne détectent pas les modifications de tailles ou - de dates des fichiers du répertoire. Les modifications de - taille ou de date d'un fichier existant ne mettent pas à jour - l'en-tête Last-Modified sur toutes les plate-formes + des volumes FAT Win32 et OS/2. Lorsque cette option est activée, le + client ou le mandataire peuvent détecter les changements dans la + liste des fichiers lorsqu'ils effectuent une requête + HEAD. Notez que certains systèmes d'exploitation + détectent correctement les nouveaux fichiers et les fichiers + supprimés, mais ne détectent pas les modifications de tailles ou + de dates des fichiers du répertoire. Les modifications de + taille ou de date d'un fichier existant ne mettent pas à jour + l'en-tête Last-Modified sur toutes les plate-formes Unix. Si c'est le cas, laissez cette option - désactivée.
      + désactivée.
      Type=type MIME (Versions 2.0.61 et - supérieures du serveur HTTP Apache)
      + supérieures du serveur HTTP Apache) -
      Le mot-clé Type vous permet de spécifier le type - MIME de la page générée. La valeur par défaut est +
      Le mot-clé Type vous permet de spécifier le type + MIME de la page générée. La valeur par défaut est text/html. - Exemple : + IndexOptions Type=text/plain - +
      VersionSort - (Versions 2.0a3 et supérieures du serveur HTTP Apache)
      + (Versions 2.0a3 et supérieures du serveur HTTP Apache) -
      Le mot-clé VersionSort permet de trier les - fichiers contenant des numéros de version d'une manière - spécifique. Les chaînes sont triées comme d'habitude, excepté les - sous-chaînes de chiffres du nom de fichier et de sa description - qui sont comparées en fonction de leur valeur numérique. +
      Le mot-clé VersionSort permet de trier les + fichiers contenant des numéros de version d'une manière + spécifique. Les chaînes sont triées comme d'habitude, excepté les + sous-chaînes de chiffres du nom de fichier et de sa description + qui sont comparées en fonction de leur valeur numérique. Exemple : foo-1.7
      @@ -948,7 +987,7 @@ répertoire foo-1.12
      -

      Si le nombre commence par le chiffre 0, il est considéré comme +

      Si le nombre commence par le chiffre 0, il est considéré comme la partie fractionnaire d'un nombre :

      @@ -961,71 +1000,75 @@ répertoire
      XHTML - (Versions 2.0.49 et supérieures du serveur HTTP Apache)
      + (Versions 2.0.49 et supérieures du serveur HTTP Apache) + +
      Le mot-clé XHTML enjoint + mod_autoindex de générer du code XHTML 1.0 au + lieu de HTML 3.2. + + Cette option n'a d'effet que si FancyIndexing + est aussi activé. +
      -
      Le mot-clé XHTML enjoint - mod_autoindex de générer du code XHTML 1.0 au - lieu de HTML 3.2.
      -
      Options d'index incrémentales
      +
      Options d'index incrémentales
      -

      Vous devez porter une attention particulière à la manière dont - les IndexOptions multiples sont traitées.

      +

      Vous devez porter une attention particulière à la manière dont + les IndexOptions multiples sont traitées.

      • Plusieurs directives IndexOptions - apparaissant dans la même section directory sont maintenant - fusionnées. Le résultat de : + apparaissant dans la même section directory sont maintenant + fusionnées. Le résultat de : - - <Directory /foo> - - IndexOptions HTMLTable
        - IndexOptions SuppressColumnsorting -
        - </Directory> -
        + +<Directory "/foo"> + IndexOptions HTMLTable + IndexOptions SuppressColumnsorting +</Directory> + -

        est équivalent à

        +

        est équivalent à

        - + IndexOptions HTMLTable SuppressColumnsorting - +
      • -
      • L'ajout de la syntaxe incrémentale (en préfixant les mots-clés +
      • L'ajout de la syntaxe incrémentale (en préfixant les mots-clés avec + ou -).
      -

      Chaque fois qu'un mot-clé préfixé par '+' ou '-' est trouvé, il - est appliqué aux définitions des - IndexOptions courantes (qui ont été - éventuellement héritées d'un directory de niveau supérieur). Par - contre, si un mot-clé non préfixé est trouvé, il supprime toutes - les definitions héritées, ainsi que toute - définition incrémentale. Considérons l'exemple +

      Chaque fois qu'un mot-clé préfixé par '+' ou '-' est trouvé, il + est appliqué aux définitions des + IndexOptions courantes (qui ont été + éventuellement héritées d'un directory de niveau supérieur). Par + contre, si un mot-clé non préfixé est trouvé, il supprime toutes + les definitions héritées, ainsi que toute + définition incrémentale. Considérons l'exemple suivant :

      - - IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
      - IndexOptions +SuppressSize -
      + +IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing +IndexOptions +SuppressSize + -

      L'effet global est équivalent à l'effet qu'aurait provoqué +

      L'effet global est équivalent à l'effet qu'aurait provoqué IndexOptions FancyIndexing +SuppressSize, car l'option - non préfixée FancyIndexing annule les mots-clés - incrémentaux situés avant elle, mais leur permet ensuite de - s'incrémenter à nouveau.

      - -

      Pour définir inconditionnellement les - IndexOptions pour un répertoire particulier, - tout en supprimant les définitions héritées, spécifiez les - mots-clés sans préfixe + ou -

      + non préfixée FancyIndexing annule les mots-clés + incrémentaux situés avant elle, mais leur permet ensuite de + s'incrémenter à nouveau.

      + +

      Pour définir inconditionnellement les + IndexOptions pour un répertoire particulier, + tout en supprimant les définitions héritées, spécifiez les + mots-clés sans préfixe + ou -

      @@ -1033,8 +1076,8 @@ répertoire IndexOrderDefault -Définit l'ordre d'affichage par défaut d'un index de -répertoire +Définit l'ordre d'affichage par défaut d'un index de +répertoire IndexOrderDefault Ascending|Descending Name|Date|Size|Description IndexOrderDefault Ascending Name @@ -1047,7 +1090,7 @@ Name|Date|Size|Description

      La directive IndexOrderDefault s'utilise en combinaison avec l'option d'index FancyIndexing. Par - défaut, les index de répertoires "améliorés" sont affichés selon l'ordre + défaut, les index de répertoires "améliorés" sont affichés selon l'ordre croissant des noms de fichiers ; la directive IndexOrderDefault vous permet de modifier ce comportement.

      @@ -1057,25 +1100,25 @@ Name|Date|Size|Description Descending, et indique l'ordre de tri. Le second doit prendre une des valeurs Name, Date, Size, ou Description, et permet - d'identifier la clé primaire. La clé secondaire est + d'identifier la clé primaire. La clé secondaire est toujours le nom du fichier selon un ordre croissant.

      -

      Si vous le désirez, vous pouvez empêcher le client de modifier +

      Si vous le désirez, vous pouvez empêcher le client de modifier l'ordre de tri de la liste en ajoutant l'option d'index SuppressColumnSorting - qui supprime le lien de définition du tri de l'en-tête de la + qui supprime le lien de définition du tri de l'en-tête de la colonne, ainsi que l'option IgnoreClient qui - empêche ce même client de passer outre vos préférences de tri en - ajoutant manuellement des options de tri à la chaîne de paramètres - de la requête.

      + empêche ce même client de passer outre vos préférences de tri en + ajoutant manuellement des options de tri à la chaîne de paramètres + de la requête.

      IndexStyleSheet -Ajoute une feuille de style CSS à l'index du -répertoire +Ajoute une feuille de style CSS à l'index du +répertoire IndexStyleSheet chemin-url server configvirtual host directory.htaccess @@ -1084,29 +1127,28 @@ répertoire

      La directive IndexStyleSheet permet de - définir le nom du fichier qui servira de feuille de style CSS pour + définir le nom du fichier qui servira de feuille de style CSS pour l'index.

      - - Exemple + IndexStyleSheet "/css/style.css" - +

      L'utilisation de cette directive en conjonction avec IndexOptions HTMLTable ajoute plusieurs classes CSS au document HTML - résultant. Un identifiant CSS indexlist est attribué à - l'ensemble de la table et les classes suivantes sont associées aux - différentes parties du listing :

      + résultant. Un identifiant CSS indexlist est attribué à + l'ensemble de la table et les classes suivantes sont associées aux + différentes parties du listing :

      - - + + + l'icône + de la date de dernière modification
      ClasseDéfinition
      tr.indexheadLigne d'en-tête du listing
      ClasseDéfinition
      tr.indexheadLigne d'en-tête du listing
      th.indexcolicon and td.indexcolicon Colonne de - l'icône
      th.indexcolname and td.indexcolname Colonne du nom du fichier
      th.indexcollastmod and td.indexcollastmod Colonne - de la date de dernière modification
      th.indexcolsize and td.indexcolsize Colonne de la taille du fichier
      th.indexcoldesc and td.indexcoldesc Colonne de la @@ -1121,7 +1163,7 @@ répertoire IndexHeadInsert -Insère du texte dans la section HEAD de la page +Insère du texte dans la section HEAD de la page d'index. IndexHeadInsert "marque ..." server configvirtual host @@ -1131,19 +1173,18 @@ d'index.

      La directive IndexHeadInsert permet de - spécifier une chaîne de caractères à insérer dans la section - <head> du code HTML généré pour la page + spécifier une chaîne de caractères à insérer dans la section + <head> du code HTML généré pour la page d'index.

      - - Exemple + IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" - +
      ReadmeName -Nom du fichier dont le contenu sera inséré à la fin de +Nom du fichier dont le contenu sera inséré à la fin de l'index ReadmeName nom-fichier server configvirtual host @@ -1152,26 +1193,29 @@ l'index Indexes -

      La directive ReadmeName permet de définir - le nom du fichier dont le contenu sera ajouté à la fin de l'index. - nom-fichier est le nom du fichier à inclure, et est - considéré comme relatif au répertoire faisant l'objet de l'index. Si - nom-fichier commence par un slash '/', il sera considéré - comme relatif au répertoire défini par la directive La directive ReadmeName permet de définir + le nom du fichier dont le contenu sera ajouté à la fin de l'index. + nom-fichier est le nom du fichier à inclure, et est + considéré comme relatif au répertoire faisant l'objet de l'index. Si + nom-fichier commence par un slash '/', comme dans + l'exemple 2, il sera considéré + comme relatif au répertoire défini par la directive DocumentRoot.

      - Exemple - ReadmeName FOOTER.html - + +# Example 1 +ReadmeName FOOTER.html + - Exemple 2 - ReadmeName /include/FOOTER.html - + +# Example 2 +ReadmeName /include/FOOTER.html +

      Voir aussi la directive HeaderName, où cette fonctionnalité est décrite plus en - détails.

      + >HeaderName, où cette fonctionnalité est décrite plus en + détails.

      diff --git a/docs/manual/mod/mod_autoindex.xml.ja b/docs/manual/mod/mod_autoindex.xml.ja index dd33f15c9b8..449360493e4 100644 --- a/docs/manual/mod/mod_autoindex.xml.ja +++ b/docs/manual/mod/mod_autoindex.xml.ja @@ -1,7 +1,7 @@ - + + +
      + veya - Önekli Seçenekler
      -

      Apache 1.3.3’te IndexOptions yönergelerinin ele - alınışıyla ilgili önemil değişiklikler yapılmıştır. Bunlar:

      +

      Çok sayıda IndexOptions yönergesinin + işlenebileceğine dikkat edin.

      • Tek bir dizin için çok sayıda IndexOptions yönergesi belirtilmişse bunlar ayrı ayrı değil birlikte ele alınır. Yani, - - <Directory /foo> - - IndexOptions HTMLTable
        - IndexOptions SuppressColumnsorting -
        - </Directory> -
        + +<Directory "/foo"> + IndexOptions HTMLTable + IndexOptions SuppressColumnsorting +</Directory> +

        yapılandırmasındaki IndexOptions yönergeleri

        - - IndexOptions HTMLTable SuppressColumnsorting - + +IndexOptions HTMLTable SuppressColumnsorting +

        yönergesine eşdeğerdir.

      • @@ -865,17 +956,19 @@ belirler. bunlar mevcut (üst dizinden miras alınanlar ve/veya önceki atamalar) IndexOptions yönergelerine uygulanır. Ancak, önek kullanılmamış bir seçeneğe raslandığında, o noktada önceki ve - miras alınmış bu tür seçenekler iptal edilir. Şu örneği ele alalım:

        + miras alınmış bu tür seçenekler iptal edilir. Şu örneği ele + alalım:

        - - IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
        - IndexOptions +SuppressSize -
        + +IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing +IndexOptions +SuppressSize + -

        Bunun net etkisi IndexOptions FancyIndexing +SuppressSize - atamasına eşdeğerdir, çünkü öneksiz FancyIndexing seçeneği - kendinden önceki önekli seçenekleri iptal etmiş fakat hemen ardından - eklenmelerine izin vermiştir.

        +

        Bunun net etkisi + IndexOptions FancyIndexing +SuppressSize + atamasına eşdeğerdir, çünkü öneksiz FancyIndexing + seçeneği kendinden önceki önekli seçenekleri iptal etmiş fakat hemen + ardından eklenmelerine izin vermiştir.

        Belli bir dizine önceki seçenekleri temizleyerek koşulsuz olarak tamamen yeni seçenekler atamak istiyorsanız @@ -910,17 +1003,20 @@ Name|Date|Size|Description

        IndexOrderDefault yönergesi iki değer alır. İlki sıralama yönünü belirtmek üzere Ascending (küçükten büyüğe) veya Descending (büyükten küçüğe) olmak zorundadır. İkinci - değer ise birincil sıralama anahtarını belirtmek üzere Name, - Date, Size ve Description - sözcüklerinden biri olmalıdır (anlamları sırayla: İsim, Tarih, Boyut, - Açıklama). İkincil sıralama anahtarı daima artan sıralamayla - dosya ismidir.

        - -

        Dizin listesinin belli bir sırada gösterilmesini zorunlu kılmak için - yönergeyi SuppressColumnSorting sıralama seçeneği ile birlikte - belirtebilirsiniz; böylece, istemcinin farklı sıralamalara sahip içerik - isteğini engellemiş olursunuz.

        + değer ise birincil sıralama anahtarını belirtmek üzere + Name, Date, Size ve + Description sözcüklerinden biri olmalıdır (anlamları + sırayla: İsim, Tarih, Boyut, Açıklama). İkincil sıralama anahtarı + daima artan sıralamayla dosya ismidir.

        + +

        Sütunun tepesindeki sıralama bağını kaldırmak için + SuppressColumnSorting seçeneğinin yanında, sıralama + tercihlerinizi geçersiz kılmak için sorgu dizgesine elle sıralama + seçenekleri eklenmesini engellemek için + IgnoreClient + seçeneğini de kullanarak istemcinin listeyi yeniden sıralamasını + engelleyebilirsiniz.

        @@ -937,9 +1033,35 @@ Name|Date|Size|Description

        IndexStyleSheet yönergesi dizin listelemesi için kullanılacak biçembent dosyasının ismini belirtmek için kullanılır.

        - Örnek - IndexStyleSheet "/css/style.css" - + +IndexStyleSheet "/css/style.css" + + +

        Bu yönergenin IndexOptions HTMLTable ile birlikte + kullanılması sonuçlanan HTML dosyasına bir miktar CSS sınıfı ekler. + Tablonun tamamı indexlist için bir CSS kimliği verir ve + aşağıdaki sınıflar listenin çeşitli parçalarıyla ilişkilendirilir:

        + + + + + + + + + + + + + + + + + + + +
        SınıfTanım
        tr.indexheadListe satırının başlığı
        th.indexcolicon and td.indexcoliconSimge sütunu
        th.indexcolname and td.indexcolnameDosya ismi sütunu
        th.indexcollastmod and td.indexcollastmodSon değişiklik sütunu
        th.indexcolsize and td.indexcolsizeDosya boyutu sütunu
        th.indexcoldesc and td.indexcoldescAçıklama sütunu
        tr.breakrowTablonun altınaki yatay çizgi
        tr.odd and tr.evenTek ve çift satırlar
        + @@ -956,10 +1078,9 @@ Name|Date|Size|Description

        IndexHeadInsert yönergesi, dizin listesi için üretilen HTML’nin <head> bölümüne yerleştirilecek bir dizge tanımlar.

        - - Example - IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" - + +IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" + @@ -977,17 +1098,19 @@ belirler.

        ReadmeName yönergesi dizin listesinin sonuna eklenecek dosyanın ismini belirler. dosya-ismi ile listeye dahil edilecek dosyanın ismi listelenen dizine göreli olarak - belirtilir. Eğer dosya ismi bir bölü çizgisi ile başlıyorsa DocumentRoot’a göreli belirtildiği - varsayılır.

        + belirtilir. Eğer dosya ismi 2. örnekteki gibi bir bölü çizgisi ile + başlıyorsa DocumentRoot’a göreli + belirtildiği varsayılır.

        - 1. Örnek - ReadmeName FOOTER.html - + +# 1. Örnek +ReadmeName FOOTER.html + - 2. Örnek - ReadmeName /include/FOOTER.html - + +# 2. Örnek +ReadmeName /include/FOOTER.html +

        Ayrıca bu davranışın daha ayrıntılı ele alındığı HeaderName yönergesine de @@ -995,5 +1118,4 @@ belirler. - diff --git a/docs/manual/mod/mod_buffer.html.en b/docs/manual/mod/mod_buffer.html.en index 0506215d16f..8ec1f9f2bb0 100644 --- a/docs/manual/mod/mod_buffer.html.en +++ b/docs/manual/mod/mod_buffer.html.en @@ -1,23 +1,28 @@ - -mod_buffer - Apache HTTP Server +mod_buffer - Apache HTTP Server Version 2.4 - + + +

        + +

        Apache HTTP Server Version 2.4

        +
        <-
        +Apache > HTTP Server > Documentation > Version 2.4 > Modules

        Apache Module mod_buffer

        @@ -55,9 +60,8 @@ AddOutputFilter or AddOutputFilterByType directives.

        -

        Using buffer with mod_include

        - AddOutputFilterByType INCLUDES;BUFFER text/html
        -

        +

        Using buffer with mod_include

        AddOutputFilterByType INCLUDES;BUFFER text/html
        +
        The buffer filters read the request/response into RAM and then repack the request/response into the fewest memory @@ -72,10 +76,10 @@ -

        See also

        +

        Bugfix checklist

        See also

        +
      • Comments
      top

      BufferSize Directive

      @@ -97,7 +101,28 @@

      Available Languages:  en  |  fr 

      -
      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_buffer.html.fr b/docs/manual/mod/mod_buffer.html.fr index 5c6c0edea09..892533d3308 100644 --- a/docs/manual/mod/mod_buffer.html.fr +++ b/docs/manual/mod/mod_buffer.html.fr @@ -1,23 +1,28 @@ - -mod_buffer - Serveur Apache HTTP +mod_buffer - Serveur Apache HTTP Version 2.4 - + + + + +

      Serveur Apache HTTP Version 2.4

      +
      <-
      +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

      Module Apache mod_buffer

      @@ -57,9 +62,8 @@ d'Apache
      directives SetInputFilter, SetOutputFilter, AddOutputFilter ou AddOutputFilterByType.

      -

      Utilisation d'un tampon avec mod_include

      - AddOutputFilterByType INCLUDES;BUFFER text/html
      -

      +

      Utilisation d'un tampon avec mod_include

      AddOutputFilterByType INCLUDES;BUFFER text/html
      +
      Les filtres de mise en tampon lisent la requte/rponse en RAM, puis la reconditionnent sous la forme d'un @@ -75,13 +79,13 @@ d'Apache -

      Voir aussi

      +

      Traitement des bugs

      Voir aussi

      +
    • Commentaires
    top
    -

    BufferSize Directive

    +

    Directive BufferSize

    @@ -100,7 +104,28 @@ d'Apache
    Description:Taille maximale en octets du filtre par tampon
    Syntaxe:BufferSize entier

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_buffer.xml b/docs/manual/mod/mod_buffer.xml index 7bef039f7aa..1b6d89e4fed 100644 --- a/docs/manual/mod/mod_buffer.xml +++ b/docs/manual/mod/mod_buffer.xml @@ -55,7 +55,9 @@ AddOutputFilterByType directives.

    Using buffer with mod_include - AddOutputFilterByType INCLUDES;BUFFER text/html
    + + AddOutputFilterByType INCLUDES;BUFFER text/html +
    The buffer filters read the request/response into diff --git a/docs/manual/mod/mod_buffer.xml.fr b/docs/manual/mod/mod_buffer.xml.fr index 7a42c68f5dd..f03efe5128b 100644 --- a/docs/manual/mod/mod_buffer.xml.fr +++ b/docs/manual/mod/mod_buffer.xml.fr @@ -1,7 +1,7 @@ - + @@ -61,7 +61,9 @@ d'Apache module="mod_filter">AddOutputFilterByType.

    Utilisation d'un tampon avec mod_include - AddOutputFilterByType INCLUDES;BUFFER text/html
    + + AddOutputFilterByType INCLUDES;BUFFER text/html +
    Les filtres de mise en tampon lisent la diff --git a/docs/manual/mod/mod_cache.html.en b/docs/manual/mod/mod_cache.html.en index e57354d0bd8..da3c337bcbf 100644 --- a/docs/manual/mod/mod_cache.html.en +++ b/docs/manual/mod/mod_cache.html.en @@ -1,23 +1,28 @@ - -mod_cache - Apache HTTP Server +mod_cache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_cache

    @@ -34,7 +39,7 @@
    This module should be used with care, as when the CacheQuickHandler directive is - in its default value of on, the Allow and Deny directives will be circumvented. + in its default value of on, the Allow and Deny directives will be circumvented. You should not enable quick handler caching for any content to which you wish to limit access by client host name, address or environment variable.
    @@ -101,7 +106,7 @@ HTTP header with a 111 response code.

    mod_cache requires the services of one or more - storage management modules. One storage management module is included in + storage management modules. The following storage management modules are included in the base Apache distribution:

    mod_cache_disk
    @@ -112,12 +117,25 @@ supported by this module. The htcacheclean tool is provided to list cached URLs, remove cached URLs, or to maintain the size of the disk cache within size and inode limits. +
    mod_cache_socache
    +
    Implements a shared object cache based storage manager. Headers and + bodies are stored together beneath a single key based on the URL of the + response being cached. Multiple content negotiated responses can + be stored concurrently, however the caching of partial content is not + supported by this module.

    Further details, discussion, and examples, are provided in the Caching Guide.

    -
    top
    top

    Sample Configuration

    -

    Sample httpd.conf

    - #
    - # Sample Cache Configuration
    - #
    - LoadModule cache_module modules/mod_cache.so
    -
    - <IfModule mod_cache.c>
    - - LoadModule cache_disk_module modules/mod_cache_disk.so
    - <IfModule mod_cache_disk.c>
    - - CacheRoot c:/cacheroot
    - CacheEnable disk /
    - CacheDirLevels 5
    - CacheDirLength 3
    -
    - </IfModule>
    -
    - # When acting as a proxy, don't cache the list of security updates
    - CacheDisable http://security.update.server/update-list/
    -
    - </IfModule> -

    +

    Sample httpd.conf

    #
    +# Sample Cache Configuration
    +#
    +LoadModule cache_module modules/mod_cache.so
    +<IfModule mod_cache.c>
    +    LoadModule cache_disk_module modules/mod_cache_disk.so
    +    <IfModule mod_cache_disk.c>
    +        CacheRoot "c:/cacheroot"
    +        CacheEnable disk  "/"
    +        CacheDirLevels 5
    +        CacheDirLength 3
    +    </IfModule>
    +
    +    # When acting as a proxy, don't cache the list of security updates
    +    CacheDisable "http://security.update.server/update-list/"
    +</IfModule>
    +
    top

    Avoiding the Thundering Herd

    @@ -193,7 +198,7 @@ becomes stale, and the time the stale entity is fully refreshed. On a busy server, a significant number of requests might arrive during this time, and cause a thundering herd of requests to strike the backend - suddenly and unpredicably.

    + suddenly and unpredictably.

    To keep the thundering herd at bay, the CacheLock directive can be used to define a directory in which locks are created for URLs in flight. The lock is used as a hint @@ -234,18 +239,15 @@

    Example configuration

    -

    Enabling the cache lock

    - #
    - # Enable the cache lock
    - #
    - <IfModule mod_cache.c>
    - - CacheLock on
    - CacheLockPath /tmp/mod_cache-lock
    - CacheLockMaxAge 5
    -
    - </IfModule> -

    +

    Enabling the cache lock

    #
    +# Enable the cache lock
    +#
    +<IfModule mod_cache.c>
    +    CacheLock on
    +    CacheLockPath "/tmp/mod_cache-lock"
    +    CacheLockMaxAge 5
    +</IfModule>
    +
    top
    @@ -265,7 +267,7 @@ circumstances, an administrator is often forced to place independent reverse proxy servers either behind or in front of the caching server to achieve this.

    -

    To solve this problem the CacheQuickHandler +

    To solve this problem the CacheQuickHandler directive can be set to off, and the server will process all phases normally handled by a non-cached request, including the authentication and authorisation phases.

    @@ -278,33 +280,30 @@ place the CACHE filter before the DEFLATE filter as in the example below:

    -

    - # Cache content before optional compression
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;DEFLATE text/plain

    -

    +
    # Cache content before optional compression
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;DEFLATE text/plain
    +

    Another option is to have content cached before personalisation is applied by mod_include (or another content processing filter). In this example templates containing tags understood by mod_include are cached before being parsed:

    -

    - # Cache content before mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -

    +
    # Cache content before mod_include and mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
    +

    You may place the CACHE filter anywhere you wish within the filter chain. In this example, content is cached after being parsed by mod_include, but before being processed by mod_deflate:

    -

    - # Cache content between mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html

    -

    +
    # Cache content between mod_include and mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
    +

    Warning:

    If the location of the CACHE filter in the filter chain is changed for any reason, @@ -322,9 +321,8 @@ LogFormat directive as follows:

    -

    - LogFormat "%{cache-status}e ..." -

    +
    LogFormat "%{cache-status}e ..."
    +

    Based on the caching decision made, the reason is also written to the subprocess environment under one the following four keys, as appropriate:

    @@ -341,12 +339,11 @@

    This makes it possible to support conditional logging of cached requests as per the following example:

    -

    - CustomLog cached-requests.log common env=cache-hit
    - CustomLog uncached-requests.log common env=cache-miss
    - CustomLog revalidated-requests.log common env=cache-revalidate
    - CustomLog invalidated-requests.log common env=cache-invalidate
    -

    +
    CustomLog "cached-requests.log" common env=cache-hit
    +CustomLog "uncached-requests.log" common env=cache-miss
    +CustomLog "revalidated-requests.log" common env=cache-revalidate
    +CustomLog "invalidated-requests.log" common env=cache-invalidate
    +

    For module authors, a hook called cache_status is available, allowing modules to respond to the caching outcomes above in customised @@ -367,9 +364,8 @@ with the document. The value specified with the CacheMaxExpire directive does not override this setting.

    -

    - CacheDefaultExpire 86400 -

    +
    CacheDefaultExpire 86400
    +
    top
    @@ -393,15 +389,14 @@ used by the service and client.

    If the normal handler is used, this directive may appear within a - <Directory> or - <Location> directive. If the quick handler + <Directory> or + <Location> directive. If the quick handler is used, this directive must appear within a server or virtual host context, otherwise the setting will be ignored.

    -

    - # Enable the X-Cache-Detail header
    - CacheDetailHeader on
    -

    +
    # Enable the X-Cache-Detail header
    +CacheDetailHeader on
    +

    X-Cache-Detail: "conditional cache hit: entity refreshed" from localhost
    @@ -422,21 +417,17 @@ mod_cache to not cache urls at or below url-string.

    -

    Example

    - CacheDisable /local_files -

    +

    Example

    CacheDisable "/local_files"
    +

    If used in a <Location> directive, the path needs to be specified below the Location, or if the word "on" is used, caching for the whole location will be disabled.

    -

    Example

    - <Location /foo>
    - - CacheDisable on
    -
    - </Location>
    -

    +

    Example

    <Location "/foo">
    +    CacheDisable on
    +</Location>
    +

    The no-cache environment variable can be set to disable caching on a finer grained set of resources in versions @@ -454,9 +445,11 @@ Description:Enable caching of specified URLs using a specified storage manager Syntax:CacheEnable cache_type [url-string] -Context:server config, virtual host, directory, .htaccess +Context:server config, virtual host, directory Status:Extension Module:mod_cache +Compatibility:A url-string of '/' applied to forward proxy content in 2.2 and + earlier.

    The CacheEnable directive instructs mod_cache to cache urls at or below @@ -468,7 +461,10 @@ manager the content is cacheable. cache_type disk instructs mod_cache to use the disk based storage manager - implemented by mod_cache_disk.

    + implemented by mod_cache_disk. cache_type + socache instructs mod_cache to use the + shared object cache based storage manager implemented by + mod_cache_socache.

    In the event that the URL space overlaps between different CacheEnable directives (as in the example below), each possible storage manager will be run until the first one that @@ -479,41 +475,40 @@ manager <LocationMatch> sections are processed before globally defined CacheEnable directives.

    -

    When acting as a forward proxy server, url-string can - also be used to specify remote sites and proxy protocols which - caching should be enabled for.

    - -

    - # Cache content
    - <Location /foo>
    - - CacheEnable disk
    -
    - </Location>

    - # Cache regex
    - <LocationMatch foo$>
    - - CacheEnable disk
    -
    - </LocationMatch>

    - # Cache proxied url's
    - CacheEnable disk /

    - # Cache FTP-proxied url's
    - CacheEnable disk ftp://

    - # Cache content from www.example.org
    - CacheEnable disk http://www.example.org/
    -

    +

    When acting as a forward proxy server, url-string must + minimally begin with a protocol for which caching should be enabled.

    + +
    # Cache content (normal handler only)
    +CacheQuickHandler off
    +<Location "/foo">
    +    CacheEnable disk
    +</Location>
    +
    +# Cache regex (normal handler only)
    +CacheQuickHandler off
    +<LocationMatch "foo$">
    +    CacheEnable disk
    +</LocationMatch>
    +
    +# Cache all but forward proxy url's (normal or quick handler)
    +CacheEnable  disk  /
    +
    +# Cache FTP-proxied url's (normal or quick handler)
    +CacheEnable  disk  ftp://
    +
    +# Cache forward proxy content from www.example.org (normal or quick handler)
    +CacheEnable  disk  http://www.example.org/
    +

    A hostname starting with a "*" matches all hostnames with that suffix. A hostname starting with "." matches all hostnames containing the domain components that follow.

    -

    - # Match www.example.org, and fooexample.org
    - CacheEnable disk http://*example.org/
    - # Match www.example.org, but not fooexample.org
    - CacheEnable disk http://.example.org/
    -

    +
    # Match www.example.org, and fooexample.org
    +CacheEnable  disk  "http://*example.org/"
    +# Match www.example.org, but not fooexample.org
    +CacheEnable  disk  "http://.example.org/"
    +

    The no-cache environment variable can be set to disable caching on a finer grained set of resources in versions @@ -539,8 +534,8 @@ manager

    When the CacheHeader directive is switched on, an X-Cache header will be added to the response with the cache status of this response. If the normal handler is used, this - directive may appear within a <Directory> - or <Location> directive. If the quick + directive may appear within a <Directory> + or <Location> directive. If the quick handler is used, this directive must appear within a server or virtual host context, otherwise the setting will be ignored.

    @@ -553,14 +548,12 @@ manager server and was not served from cache. -

    - # Enable the X-Cache header
    - CacheHeader on
    -

    +
    # Enable the X-Cache header
    +CacheHeader on
    + + +
    X-Cache: HIT from localhost
    -

    - X-Cache: HIT from localhost
    -

    @@ -582,9 +575,8 @@ manager if the request contains no-cache header values. Resources requiring authorization will never be cached.

    -

    - CacheIgnoreCacheControl On -

    +
    CacheIgnoreCacheControl On
    +

    Warning:

    This directive will allow serving from the cache even if the client has @@ -635,13 +627,11 @@ manager behaviour), CacheIgnoreHeaders can be set to None.

    -

    Example 1

    - CacheIgnoreHeaders Set-Cookie -

    +

    Example 1

    CacheIgnoreHeaders Set-Cookie
    +
    -

    Example 2

    - CacheIgnoreHeaders None -

    +

    Example 2

    CacheIgnoreHeaders None
    +

    Warning:

    If headers like Expires which are needed for proper cache @@ -673,9 +663,8 @@ header. CacheDefaultExpire directive will be used to generate an expiration date.

    -

    - CacheIgnoreNoLastMod On -

    +
    CacheIgnoreNoLastMod On
    +
    top
    @@ -697,9 +686,8 @@ header. view the request is treated as if having no query string when this directive is enabled.

    -

    - CacheIgnoreQueryString On -

    +
    CacheIgnoreQueryString On
    +
    @@ -730,13 +718,11 @@ header.

    CacheIgnoreURLSessionIdentifiers None clears the list of ignored identifiers. Otherwise, each identifier is added to the list.

    -

    Example 1

    - CacheIgnoreURLSessionIdentifiers jsessionid -

    +

    Example 1

    CacheIgnoreURLSessionIdentifiers jsessionid
    +
    -

    Example 2

    - CacheIgnoreURLSessionIdentifiers None -

    +

    Example 2

    CacheIgnoreURLSessionIdentifiers None
    +
    @@ -759,10 +745,9 @@ header. should be cached beneath the same cache key, a new base URL can be specified with this directive.

    -

    - # Override the base URL of the cache key.
    - CacheKeyBaseURL http://www.example.com/
    -

    +
    # Override the base URL of the cache key.
    +CacheKeyBaseURL "http://www.example.com/"
    +
    Take care when setting this directive. If two separate virtual hosts are accidentally given the same base URL, entries from one virtual host @@ -800,9 +785,8 @@ LastModified date. CacheMaxExpire, then the latter takes precedence.

    -

    - CacheLastModifiedFactor 0.5 -

    +
    CacheLastModifiedFactor 0.5
    +
    top
    @@ -822,10 +806,9 @@ LastModified date.

    In a minimal configuration the following directive is all that is needed to enable the thundering herd lock in the default system temp directory.

    -

    - # Enable cache lock
    - CacheLock on

    -

    +
    # Enable cache lock
    +CacheLock on
    +
    @@ -882,9 +865,8 @@ LastModified date. server. Thus, documents will be out of date at most this number of seconds. This maximum value is enforced even if an expiry date was supplied with the document.

    -

    - CacheMaxExpire 604800 -

    +
    CacheMaxExpire 604800
    +
    top
    @@ -902,9 +884,8 @@ LastModified date. server. This is only used if no valid expire time was supplied with the document.

    -

    - CacheMinExpire 3600 -

    +
    CacheMinExpire 3600
    +
    top
    @@ -916,6 +897,7 @@ LastModified date. Context:server config, virtual host Status:Extension Module:mod_cache +Compatibility:Apache HTTP Server 2.3.3 and later

    The CacheQuickHandler directive controls the phase in which the cache is handled.

    @@ -931,21 +913,19 @@ LastModified date. slower than the default, it allows the cache to be used in cases where full processing is required, such as when content is subject to authorisation.

    -

    - # Run cache as a normal handler
    - CacheQuickHandler off

    -

    +
    # Run cache as a normal handler
    +CacheQuickHandler off
    +

    It is also possible, when the quick handler is disabled, for the administrator to choose the precise location within the filter chain where caching is to be performed, by adding the CACHE filter to the chain.

    -

    - # Cache content before mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -

    +
    # Cache content before mod_include and mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
    +

    If the CACHE filter is specified more than once, the last instance will apply.

    @@ -970,10 +950,9 @@ LastModified date. and the raw 5xx responses returned to the client on request, the 5xx response so returned to the client will not invalidate the content in the cache.

    -

    - # Serve stale data on error.
    - CacheStaleOnError on
    -

    +
    # Serve stale data on error.
    +CacheStaleOnError on
    + @@ -996,9 +975,8 @@ LastModified date. the origin server, and the response may be fulfilled from cache if the backend resource has not changed.

    -

    - CacheStoreExpired On -

    +
    CacheStoreExpired On
    +
    top
    @@ -1013,15 +991,14 @@ LastModified date.

    Ordinarily, requests or responses with Cache-Control: no-store header values will not be stored in the cache. The - CacheStoreNoCache directive allows this - behavior to be overridden. CacheStoreNoCache On + CacheStoreNoStore directive allows this + behavior to be overridden. CacheStoreNoStore On tells the server to attempt to cache the resource even if it contains no-store header values. Resources requiring authorization will never be cached.

    -

    - CacheStoreNoStore On -

    +
    CacheStoreNoStore On
    +

    Warning:

    As described in RFC 2616, the no-store directive is intended to @@ -1054,9 +1031,8 @@ LastModified date. private header values. Resources requiring authorization will never be cached.

    -

    - CacheStorePrivate On -

    +
    CacheStorePrivate On
    +

    Warning:

    This directive will allow caching even if the upstream server has @@ -1076,7 +1052,28 @@ LastModified date.  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache.html.fr b/docs/manual/mod/mod_cache.html.fr index f114142f707..e77aa9e81e2 100644 --- a/docs/manual/mod/mod_cache.html.fr +++ b/docs/manual/mod/mod_cache.html.fr @@ -1,23 +1,28 @@ - -mod_cache - Serveur Apache HTTP +mod_cache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_cache

    @@ -34,7 +39,7 @@
    Ce module doit tre utilis avec prcautions car lorsque la directive CacheQuickHandler est dfinie sa - valeur par dfaut on, les directives Allow and Deny sont court-circuites. Vous + valeur par dfaut on, les directives Allow and Deny sont court-circuites. Vous ne devez donc pas activer la gestion rapide de la mise en cache pour un contenu auquel vous souhaitez limiter l'accs en fonction du nom d'hte du client, de l'adresse IP ou d'une variable @@ -106,7 +111,7 @@

    mod_cache requiert les services d'un ou plusieurs modules de gestion de stockage. La distribution Apache de base - inclut un module de gestion de stockage :

    + inclut les modules de gestion de stockage suivants :

    mod_cache_disk
    @@ -119,13 +124,26 @@ htcacheclean permet de lister et de supprimer les URLs mises en cache, et de maintenir le cache en de de certaines limites de taille et de nombre d'inodes. +
    mod_cache_socache
    +
    Implmente un gestionnaire de stockage bas sur un cache d'objets + partags. Les en-ttes et corps sont stocks ensemble sous une seule + cl base sur l'URL de la rponse mise en cache. Des rponses + contenus multiples ngocis peuvent tre stockes simultanment, mais + ce module ne supporte pas la mise en cache de contenus partiels.

    Pour de plus amples dtails, une description, et des exemples, reportez-vous au Guide de la mise en cache.

    -
    top
    top

    Exemple de configuration

    -

    Extrait de httpd.conf

    - #
    - # Exemple de configuration du cache
    - #
    - LoadModule cache_module modules/mod_cache.so
    -
    - <IfModule mod_cache.c>
    - - LoadModule disk_cache_module modules/mod_cache_disk.so
    - <IfModule mod_cache_disk.c>
    - - CacheRoot c:/cacheroot
    - CacheEnable disk /
    - CacheDirLevels 5
    - CacheDirLength 3
    -
    - </IfModule>
    -
    - # Lorsqu'on sert de mandataire, on ne met pas en cache la liste - # des mises jour de scurit
    - CacheDisable http://security.update.server/update-list/
    -
    - </IfModule> -

    +

    Extrait de httpd.conf

    #
    +# Exemple de configuration du cache
    +#
    +LoadModule cache_module modules/mod_cache.so
    +<IfModule mod_cache.c>
    +    LoadModule cache_disk_module modules/mod_cache_disk.so
    +    <IfModule mod_cache_disk.c>
    +        CacheRoot "c:/cacheroot"
    +        CacheEnable disk  "/"
    +        CacheDirLevels 5
    +        CacheDirLength 3
    +    </IfModule>
    +    
    +    # Lorsqu'on sert de mandataire, on ne met pas en cache la liste
    +# des mises  jour de scurit
    +    CacheDisable "http://security.update.server/update-list/"
    +</IfModule>
    +
    top

    Eviter une tempte de requte

    @@ -256,18 +261,15 @@ cache

    Exemple de configuration

    -

    Activation du verrouillage du cache

    - #
    - # Active le verrouillage du cache
    - #
    - <IfModule mod_cache.c>
    - - CacheLock on
    - CacheLockPath /tmp/mod_cache-lock
    - CacheLockMaxAge 5
    -
    - </IfModule> -

    +

    Activation du verrouillage du cache

    #
    +# Active le verrouillage du cache
    +#
    +<IfModule mod_cache.c>
    +    CacheLock on
    +    CacheLockPath "/tmp/mod_cache-lock"
    +    CacheLockMaxAge 5
    +</IfModule>
    +
    top
    @@ -305,11 +307,10 @@ cache avant le filtre DEFLATE comme dans l'exemple suivant :

    -

    - # Mise en cache du contenu avant la compression optionnelle
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;DEFLATE text/plain

    -

    +
    # Mise en cache du contenu avant la compression optionnelle
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;DEFLATE text/plain
    +

    Une autre possibilit consiste mettre en cache le contenu avant l'ajout de contenu personnalis via mod_include (ou @@ -318,24 +319,22 @@ cache mod_include sont mis en cache avant d'tre interprts :

    -

    - # Mise en cache du contenu avant l'intervention de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -

    +
    # Mise en cache du contenu avant l'intervention de mod_include et
    +   # mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
    +

    Vous pouvez insrer le filtre CACHE en tout point de la chane de filtrage. Dans l'exemple suivant, le contenu est mis en cache aprs avoir t interprt par mod_include, mais avant d'tre trait par mod_deflate :

    -

    - # Mise en cache du contenu entre les interventions de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html

    -

    +
    # Mise en cache du contenu entre les interventions de mod_include et
    +   # mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
    +

    Avertissement :

    Si pour une raison ou pour une autre, le point d'insertion du filtre @@ -353,9 +352,8 @@ cache interne la requte sous la cl cache-status. Cette information peut tre journalise via la directive LogFormat comme suit :

    -

    - LogFormat "%{cache-status}e ..." -

    +
    LogFormat "%{cache-status}e ..."
    +

    En fonction de la dcision prise, l'information est aussi crite dans l'environnement du sous-processus sous une des quatre cls @@ -375,12 +373,11 @@ cache du traitement des requtes par rapport au cache comme dans l'exemple suivant :

    -

    - CustomLog requetes-depuis-cache.log common env=cache-hit
    - CustomLog requetes-hors-cache.log common env=cache-miss
    - CustomLog requetes-avec-mise-a-jour-du-cache.log common env=cache-revalidate
    - CustomLog requetes-avec-invalidation.log common env=cache-invalidate
    -

    +
    CustomLog "cached-requests.log" common env=cache-hit
    +CustomLog "uncached-requests.log" common env=cache-miss
    +CustomLog "revalidated-requests.log" common env=cache-revalidate
    +CustomLog "invalidated-requests.log" common env=cache-invalidate
    +

    Pour les concepteurs de modules, une accroche (hook) nomme cache_status est disponible et permet aux modules de @@ -389,7 +386,7 @@ cache

    top
    -

    CacheDefaultExpire Directive

    +

    Directive CacheDefaultExpire

    @@ -407,13 +404,12 @@ lorsqu'aucune date d'expiration n'a CacheMaxExpire si cette dernire est utilise.

    -

    - CacheDefaultExpire 86400 -

    +
    CacheDefaultExpire 86400
    +
    top
    -
    Description:La dure par dfaut de mise en cache d'un document lorsqu'aucune date d'expiration n'a t spcifie.
    @@ -436,14 +432,13 @@ lorsqu'aucune date d'expiration n'a utiliss par le service et le client.

    Si le gestionnaire normal est utilis, cette directive peut se - situer dans une section <Directory> ou <Location>. Si c'est le gestionnaire + situer dans une section <Directory> ou <Location>. Si c'est le gestionnaire rapide qui est utilis, elle doit se situer dans un contexte de serveur principal ou de serveur virtuel, sinon elle sera ignore.

    -

    - # Active l'en-tte X-Cache-Detail
    - CacheDetailHeader on
    -

    +
    # Active l'en-tte X-Cache-Detail
    +CacheDetailHeader on
    +

    X-Cache-Detail: "conditional cache hit: entity refreshed" from localhost
    @@ -452,7 +447,7 @@ lorsqu'aucune date d'expiration n'a

    top
    -
    Description:Ajoute un en-tte X-Cache-Detail la rponse.
    Syntaxe:CacheDetailHeader on|off
    @@ -466,22 +461,18 @@ sp spcifie par chane URL, ainsi que les URLs de niveaux infrieurs.

    -

    Exemple

    - CacheDisable /fichiers_locaux -

    +

    Exemple

    CacheDisable "/fichiers_locaux"
    +

    Si la directive se trouve l'intrieur d'une section <Location>, le chemin doit tre spcifi en dessous de la Location, et si le mot "on" est utilis, la mise en cache sera dsactive pour l'ensemble de l'arborescence concerne par la section Location.

    -

    Exemple

    - <Location /foo>
    - - CacheDisable on
    -
    - </Location>
    -

    +

    Exemple

    <Location "/foo">
    +    CacheDisable on
    +</Location>
    +

    Avec les versions 2.2.12 et ultrieures, on peut dfinir la variable d'environnement no-cache pour une dfinition @@ -494,15 +485,17 @@ Apache

    top
    -
    Description:Dsactive la mise en cache des URLs spcifies
    - + +
    Description:Active la mise en cache des URLs spcifies en utilisant le gestionnaire de stockage prcis
    Syntaxe:CacheEnable type de cache [chane URL]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_cache
    Compatibilit:Une chane URL telle que '/' s'appliquait tout contenu +en mandat direct dans les versions 2.2 et antrieures.

    La directive CacheEnable enjoint mod_cache de mettre en cache l'URL prcise par @@ -514,7 +507,11 @@ URL] contenu considr peut tre mis en cache. Si type de cache a pour valeur disk, mod_cache utilisera le gestionnaire de stockage sur disque implment par - mod_cache_disk.

    + mod_cache_disk. Pour que mod_cache + utilise le gestionnaire de stockage bas sur le cache d'objets + partags implment par mod_cache_socache, + spcifiez socache comme valeur du paramtre type + de cache.

    Si les diffrentes directives CacheEnable spcifient des URLs qui se recoupent (comme dans l'exemple ci-dessous), tous les gestionnaires de stockage possibles seront @@ -529,30 +526,31 @@ URL] global.

    En fonctionnement du type serveur mandataire direct, chane - URL peut aussi tre utilis pour spcifier des sites distants - et des protocoles de mandat pour lesquels la mise en cache devra - tre active.

    - -

    - # Mise en cache de contenu
    - <Location /foo>
    - - CacheEnable disk
    -
    - </Location>

    - # Mise en cache via une expression rationnelle
    - <LocationMatch foo$>
    - - CacheEnable disk
    -
    - </LocationMatch>

    - # Mise en cache des URLs mandates
    - CacheEnable disk /

    - # Mise en cache des URLs FTP mandates
    - CacheEnable disk ftp://

    - # Mise en cache des contenus situs dans www.example.org
    - CacheEnable disk http://www.example.org/
    -

    + URL doit au moins dbuter par un protocole pour lequel la mise + en cache doit tre active.

    + +
    # Mise en cache de contenu (gestionnaire normal seulement)
    +CacheQuickHandler off
    +<Location "/foo">
    +    CacheEnable disk
    +</Location>
    +
    +# Mise en cache via une expression rationnelle (gestionnaire normal seulement)
    +CacheQuickHandler off
    +<LocationMatch "foo$">
    +    CacheEnable disk
    +</LocationMatch>
    +
    +# Mise en cache de tous les contenus,  l'exception des URLs
    +# mandates en direct (gestionnaire normal ou rapide)
    +CacheEnable  disk  /
    +
    +# Mise en cache des URLs FTP mandates (gestionnaire normal ou rapide)
    +CacheEnable  disk  ftp://
    +
    +# Mise en cache des contenus mandats en direct depuis www.example.org (gestionnaire normal ou rapide)
    +CacheEnable  disk  http://www.example.org/
    +

    Un nom d'hte commenant par un caractre "*" correspondra tout nom d'hte se terminant par le suffixe @@ -560,12 +558,11 @@ URL] "." correspondra tout nom d'hte contenant le composant de nom de domaine qui suit ce caractre.

    -

    - # Correspond www.example.org et fooexample.org
    - CacheEnable disk http://*example.org/
    - # Correspond www.example.org, mais pas fooexample.org
    - CacheEnable disk http://.example.org/
    -

    +
    # Correspond  www.example.org et fooexample.org
    +CacheEnable  disk  "http://*example.org/"
    +# Correspond  www.example.org, mais pas  fooexample.org
    +CacheEnable  disk  "http://.example.org/"
    +

    Depuis la version 2.2.12, on peut dfinir la variable d'environnement no-cache pour une dfinition plus fine @@ -579,7 +576,7 @@ Apache

    top
    -

    CacheHeader Directive

    +

    Directive CacheHeader

    @@ -592,8 +589,10 @@ Apache

    Lorsque la directive CacheHeader est dfinie on, un en-tte X-Cache est ajout la rponse et contient l'tat du cache pour cette dernire. Si le gestionnaire normal est - utilis, cette directive peut se situer dans une section <Directory> ou <Location>. Si c'est le - gestionnaire rapide qui est utilis, elle doit se situer dans un + utilis, cette directive peut se situer dans une section + <Directory> ou + <Location>. Si c'est + le gestionnaire rapide qui est utilis, elle doit se situer dans un contexte de serveur principal ou de serveur virtuel, sinon elle sera ignore.

    @@ -606,19 +605,18 @@ Apache depuis le cache, mais directement depuis le serveur demand. -

    - # Active l'en-tte X-Cache
    - CacheHeader on
    -

    +
    # Active l'en-tte X-Cache
    +CacheHeader on
    -

    - X-Cache: HIT from localhost
    -

    + +
    X-Cache: HIT from localhost
    + +
    top
    -
    Description:Ajoute un en-tte X-Cache la rponse.
    Syntaxe:CacheHeader on|off
    @@ -638,9 +636,8 @@ le contenu au client depuis le cache Les ressources qui requirent une autorisation ne seront jamais mises en cache.

    -

    - CacheIgnoreCacheControl On -

    +
    CacheIgnoreCacheControl On
    +

    Avertissement :

    Cette directive permet de servir des ressources depuis le cache, @@ -655,7 +652,7 @@ le contenu au client depuis le cache
    top
    -
    Description:Ignore les en-ttes de requte enjoignant de ne pas servir le contenu au client depuis le cache
    @@ -695,13 +692,11 @@ le contenu au client depuis le cacheCacheIgnoreHeaders peut tre dfinie None.

    -

    Exemple 1

    - CacheIgnoreHeaders Set-Cookie -

    +

    Exemple 1

    CacheIgnoreHeaders Set-Cookie
    +
    -

    Exemple 2

    - CacheIgnoreHeaders None -

    +

    Exemple 2

    CacheIgnoreHeaders None
    +

    Avertissement :

    Si des en-ttes ncessaires la bonne gestion du cache, comme @@ -712,7 +707,7 @@ le contenu au client depuis le cache
    top
    -
    Description:Ne pas stocker le(s) en-tte(s) spcifi(s) dans le cache.
    @@ -736,13 +731,12 @@ Modified. d'expiration.

    -

    - CacheIgnoreNoLastMod On -

    +
    CacheIgnoreNoLastMod On
    +
    top
    -
    Description:Ignore le fait qu'une rponse ne possde pas d'en-tte Last Modified.
    @@ -764,14 +758,13 @@ cache traite comme si elle ne possdait pas de chane de paramtres lorsque cette directive est active.

    -

    - CacheIgnoreQueryString On -

    +
    CacheIgnoreQueryString On
    +
    top
    -
    Description:Ignore la chane de paramtres lors de la mise en cache
    traitement complet de la requte est ncessaire, comme par exemple lorsque le contenu est soumis autorisation.

    -

    - # Excute le cache comme un gestionnaire normal
    - CacheQuickHandler off

    -

    +
    # Excute le cache comme un gestionnaire normal
    +CacheQuickHandler off
    +

    Lorsque le gestionnaire rapide est dsactiv, l'administrateur a aussi la possibilit de choisir avec prcision le point de la chane de filtrage o la mise en cache sera effectue, en utilisant le filtre CACHE.

    -

    - # Mise en cache du contenu avant l'intervention de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -

    +
    # Mise en cache du contenu avant l'intervention de mod_include et
    +     # mod_deflate
    +CacheQuickHandler off
    +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
    +

    Si le filtre CACHE est spcifi plusieurs fois, c'est la dernire instance qui sera prise en compte.

    @@ -1042,7 +1029,7 @@ document
    top
    -
    Description:Ignore les identifiants de session dfinis encods dans l'URL lors de la mise en cache @@ -802,18 +795,16 @@ l'URL lors de la mise en cache des identifiants ignors. Autrement, chaque identifiant spcifi est ajout la liste.

    -

    Exemple 1

    - CacheIgnoreURLSessionIdentifiers jsessionid -

    +

    Exemple 1

    CacheIgnoreURLSessionIdentifiers jsessionid
    +
    -

    Exemple 2

    - CacheIgnoreURLSessionIdentifiers None -

    +

    Exemple 2

    CacheIgnoreURLSessionIdentifiers None
    +
    top
    -

    CacheKeyBaseURL Directive

    +

    Directive CacheKeyBaseURL

    @@ -832,10 +823,9 @@ inverse machines, si toutes les entres du cache doivent possder la mme cl, cette directive permet de spcifier une nouvelle URL de base.

    -

    - # Remplace l'URL de base de la cl de cache.
    - CacheKeyBaseURL http://www.example.com/
    -

    +
    # Remplace l'URL de base de la cl de cache.
    +CacheKeyBaseURL "http://www.example.com/"
    +
    Prenez garde en dfinissant cette directive. Si deux serveurs virtuels distincts possdent accidentellement la mme @@ -845,7 +835,7 @@ inverse
    top
    -
    Description:Remplace l'URL de base des cls du cache mandates en inverse
    @@ -876,13 +866,12 @@ fonction de la date de derni directive CacheMaxExpire, c'est ce dernier qui l'emporte.

    -

    - CacheLastModifiedFactor 0.5 -

    +
    CacheLastModifiedFactor 0.5
    +
    top
    -
    Description:Le facteur utilis pour gnrer une date d'expiration en fonction de la date de dernire modification.
    @@ -899,15 +888,14 @@ fonction de la date de derni temptes de requtes dans le rpertoire temp par dfaut du systme est la suivante :

    -

    - # Active le verrouillage du cache
    - CacheLock on

    -

    +
    # Active le verrouillage du cache
    +CacheLock on
    +
    top
    -
    Description:Active la protection contre les temptes de requtes.
    Syntaxe:CacheLock on|off
    @@ -927,7 +915,7 @@ fonction de la date de derni
    top
    -
    Description:Dfinit la dure de vie maximale d'un verrou de cache.
    Syntaxe:CacheLockMaxAge entier
    @@ -946,7 +934,7 @@ fonction de la date de derni
    top
    -
    Description:Dfinit le rpertoire des verrous.
    Syntaxe:CacheLockPath rpertoire
    @@ -964,13 +952,13 @@ document sera pas jour. L'utilisation de cette valeur maximale est force, mme si le document possde une date d'expiration.

    -

    - CacheMaxExpire 604800 -

    +
    CacheMaxExpire 604800
    + +
    top
    -
    Description:La dure maximale en secondes de mise en cache d'un document
    @@ -987,13 +975,12 @@ document que dans le cas o le document ne possde aucune date d'expiration valide.

    -

    - CacheMinExpire 3600 -

    +
    CacheMinExpire 3600
    +
    top
    -
    Description:La dure minimale en secondes de mise en cache d'un document
    @@ -1001,6 +988,8 @@ document +
    Description:Excute le cache partir d'un gestionnaire rapide.
    Syntaxe:CacheQuickHandler on|off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_cache
    Compatibilit:Disponible partir de la version 2.3.3 du serveur HTTP + Apache

    La directive CacheQuickHandler permet de contrler la phase au cours de laquelle la mise en cache est effectue.

    @@ -1019,22 +1008,20 @@ document
    @@ -1061,15 +1048,14 @@ document rponse 5xx renvoye au client n'invalidera pas le contenu dans le cache.

    -

    - # Sert des donnes non mises jour en cas d'erreur.
    - CacheStaleOnError on
    -

    +
    # Sert des donnes non mises  jour en cas d'erreur.
    +CacheStaleOnError on
    +
    top
    -
    Description:Sert du contenu non jour la place de rponses 5xx.
    Syntaxe:CacheStaleOnError on|off
    @@ -1088,13 +1074,13 @@ consid de la part du serveur d'origine, et la rponse sera renvoye partir du cache si la ressource d'arrire-plan n'a pas t modifie.

    -

    - CacheStoreExpired On -

    +
    CacheStoreExpired On
    + +
    top
    -
    Description:Tente de mettre en cache les rponses que le serveur considre comme arrives expiration
    @@ -1106,17 +1092,18 @@ l'ent
    Description:Tente de mettre en cache les requtes ou rponses dont l'entte Cache-Control: a pour valeur no-store.

    Normalement, les requtes ou rponses dont l'en-tte Cache-Control: a pour valeur no-store ne sont pas stockes dans le - cache. La directive CacheStoreNoCache permet + cache. La directive CacheStoreNoStore permet de modifier ce comportement. Si - CacheStoreNoCache est dfinie On, le + CacheStoreNoStore est dfinie On, le serveur tente de mettre la ressource en cache mme si elle contient des en-ttes ayant pour valeur no-store. Les ressources ncessitant une autorisation ne sont jamais mises en cache.

    -

    - CacheStoreNoStore On -

    + +
    CacheStoreNoStore On
    + +

    Avertissement :

    Selon la RFC 2616, la valeur d'en-tte no-store est cense @@ -1135,7 +1122,7 @@ l'ent
    top
    -

    CacheStorePrivate Directive

    +

    Directive CacheStorePrivate

    @@ -1155,9 +1142,10 @@ marqu ncessitant une autorisation ne sont jamais mises en cache.

    -

    - CacheStorePrivate On -

    + +
    CacheStorePrivate On
    + +

    Avertissement :

    Cette directive autorise la mise en cache mme si le serveur @@ -1178,7 +1166,28 @@ marqu  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache.html.ja.utf8 b/docs/manual/mod/mod_cache.html.ja.utf8 index ccf6894a598..2f0a8f0c4d9 100644 --- a/docs/manual/mod/mod_cache.html.ja.utf8 +++ b/docs/manual/mod/mod_cache.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_cache - Apache HTTP サーバ +mod_cache - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_cache

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Tente de mettre en cache des rponses que le serveur a marques comme prives
    @@ -67,7 +73,11 @@

    より詳細な解説や例についてはキャッシュ機能 を参照してください。

    -
    top
    -
    説明:URI をキーにしたコンテンツのキャッシュ
    ステータス:Extension
    モジュール識別子:cache_module
    ステータス:Extension
    モジュール:mod_cache
    互換性:Available in Apache 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheDisable ディレクティブ

    @@ -254,9 +260,9 @@ -
    ステータス:Extension
    モジュール:mod_cache
    互換性:Available in Apache 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheIgnoreCacheControl ディレクティブ

    @@ -406,9 +412,9 @@ -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_cache

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheKeyBaseURL ディレクティブ

    @@ -419,9 +425,9 @@ -
    ステータス:Extension
    モジュール:mod_cache
    互換性:Available in Apache 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheLastModifiedFactor ディレクティブ

    @@ -468,9 +474,9 @@ -
    ステータス:Extension
    モジュール:mod_cache
    互換性:Available in Apache 2.2.15 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheLockMaxAge ディレクティブ

    @@ -480,9 +486,9 @@ -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_cache

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheLockPath ディレクティブ

    @@ -492,9 +498,9 @@ -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_cache

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheMaxExpire ディレクティブ

    @@ -545,9 +551,10 @@ -
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_cache

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +互換性:Apache HTTP Server 2.3.3 and later +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheStaleOnError ディレクティブ

    @@ -558,9 +565,9 @@ -
    ステータス:Extension
    モジュール:mod_cache
    互換性:Available in Apache 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheStoreExpired ディレクティブ

    @@ -570,9 +577,9 @@ -
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    ステータス:Extension
    モジュール:mod_cache

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    CacheStoreNoStore ディレクティブ

    @@ -643,11 +650,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache.html.ko.euc-kr b/docs/manual/mod/mod_cache.html.ko.euc-kr index d320e3f7d15..ea41d7133a8 100644 --- a/docs/manual/mod/mod_cache.html.ko.euc-kr +++ b/docs/manual/mod/mod_cache.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_cache - Apache HTTP Server +mod_cache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_cache

    @@ -61,7 +66,11 @@

    URI Ű ij ϰ ´. ٺȣ ijʴ´.

    -
    top

    õ þ

    @@ -498,7 +505,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache.xml b/docs/manual/mod/mod_cache.xml index afc2c2e6d2f..a5e9080ba28 100644 --- a/docs/manual/mod/mod_cache.xml +++ b/docs/manual/mod/mod_cache.xml @@ -32,8 +32,8 @@ This module should be used with care, as when the CacheQuickHandler directive is in its default value of on, the Allow and Deny directives will be circumvented. + module="mod_access_compat">Allow and Deny directives will be circumvented. You should not enable quick handler caching for any content to which you wish to limit access by client host name, address or environment variable. @@ -101,7 +101,7 @@ HTTP header with a 111 response code.

    mod_cache requires the services of one or more - storage management modules. One storage management module is included in + storage management modules. The following storage management modules are included in the base Apache distribution:

    mod_cache_disk
    @@ -112,6 +112,12 @@ supported by this module. The htcacheclean tool is provided to list cached URLs, remove cached URLs, or to maintain the size of the disk cache within size and inode limits. +
    mod_cache_socache
    +
    Implements a shared object cache based storage manager. Headers and + bodies are stored together beneath a single key based on the URL of the + response being cached. Multiple content negotiated responses can + be stored concurrently, however the caching of partial content is not + supported by this module.

    Further details, discussion, and examples, are provided in the @@ -123,6 +129,7 @@ mod_cache_disk + mod_cache_socache CacheRoot @@ -130,33 +137,36 @@ CacheDirLength CacheMinFileSize CacheMaxFileSize + CacheSocache + CacheSocacheMaxTime + CacheSocacheMinTime + CacheSocacheMaxSize + CacheSocacheReadSize + CacheSocacheReadTime

    Sample Configuration Sample httpd.conf - #
    - # Sample Cache Configuration
    - #
    - LoadModule cache_module modules/mod_cache.so
    -
    - <IfModule mod_cache.c>
    - - LoadModule cache_disk_module modules/mod_cache_disk.so
    - <IfModule mod_cache_disk.c>
    - - CacheRoot c:/cacheroot
    - CacheEnable disk /
    - CacheDirLevels 5
    - CacheDirLength 3
    -
    - </IfModule>
    -
    - # When acting as a proxy, don't cache the list of security updates
    - CacheDisable http://security.update.server/update-list/
    -
    - </IfModule> + +# +# Sample Cache Configuration +# +LoadModule cache_module modules/mod_cache.so +<IfModule mod_cache.c> + LoadModule cache_disk_module modules/mod_cache_disk.so + <IfModule mod_cache_disk.c> + CacheRoot "c:/cacheroot" + CacheEnable disk "/" + CacheDirLevels 5 + CacheDirLength 3 + </IfModule> + + # When acting as a proxy, don't cache the list of security updates + CacheDisable "http://security.update.server/update-list/" +</IfModule> +
    @@ -168,7 +178,7 @@ becomes stale, and the time the stale entity is fully refreshed. On a busy server, a significant number of requests might arrive during this time, and cause a thundering herd of requests to strike the backend - suddenly and unpredicably.

    + suddenly and unpredictably.

    To keep the thundering herd at bay, the CacheLock directive can be used to define a directory in which locks are created for URLs in flight. The lock is used as a hint @@ -210,16 +220,16 @@

    Example configuration Enabling the cache lock - #
    - # Enable the cache lock
    - #
    - <IfModule mod_cache.c>
    - - CacheLock on
    - CacheLockPath /tmp/mod_cache-lock
    - CacheLockMaxAge 5
    -
    - </IfModule> + +# +# Enable the cache lock +# +<IfModule mod_cache.c> + CacheLock on + CacheLockPath "/tmp/mod_cache-lock" + CacheLockMaxAge 5 +</IfModule> +
    @@ -253,33 +263,33 @@ place the CACHE filter before the DEFLATE filter as in the example below:

    - - # Cache content before optional compression
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;DEFLATE text/plain

    -
    + +# Cache content before optional compression +CacheQuickHandler off +AddOutputFilterByType CACHE;DEFLATE text/plain +

    Another option is to have content cached before personalisation is applied by mod_include (or another content processing filter). In this example templates containing tags understood by mod_include are cached before being parsed:

    - - # Cache content before mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -
    + +# Cache content before mod_include and mod_deflate +CacheQuickHandler off +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html +

    You may place the CACHE filter anywhere you wish within the filter chain. In this example, content is cached after being parsed by mod_include, but before being processed by mod_deflate:

    - - # Cache content between mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html

    -
    + +# Cache content between mod_include and mod_deflate +CacheQuickHandler off +AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html + Warning:If the location of the CACHE filter in the filter chain is changed for any reason, @@ -297,9 +307,9 @@ LogFormat directive as follows:

    - + LogFormat "%{cache-status}e ..." - +

    Based on the caching decision made, the reason is also written to the subprocess environment under one the following four keys, as appropriate:

    @@ -316,12 +326,12 @@

    This makes it possible to support conditional logging of cached requests as per the following example:

    - - CustomLog cached-requests.log common env=cache-hit
    - CustomLog uncached-requests.log common env=cache-miss
    - CustomLog revalidated-requests.log common env=cache-revalidate
    - CustomLog invalidated-requests.log common env=cache-invalidate
    -
    + +CustomLog "cached-requests.log" common env=cache-hit +CustomLog "uncached-requests.log" common env=cache-miss +CustomLog "revalidated-requests.log" common env=cache-revalidate +CustomLog "invalidated-requests.log" common env=cache-invalidate +

    For module authors, a hook called cache_status is available, allowing modules to respond to the caching outcomes above in customised @@ -334,8 +344,10 @@ manager CacheEnable cache_type [url-string] server configvirtual host -directory.htaccess - +directory +A url-string of '/' applied to forward proxy content in 2.2 and + earlier. +

    The CacheEnable directive instructs @@ -348,7 +360,10 @@ manager the content is cacheable. cache_type disk instructs mod_cache to use the disk based storage manager - implemented by mod_cache_disk.

    + implemented by mod_cache_disk. cache_type + socache instructs mod_cache to use the + shared object cache based storage manager implemented by + mod_cache_socache.

    In the event that the URL space overlaps between different CacheEnable directives (as in the example below), each possible storage manager will be run until the first one that @@ -359,41 +374,42 @@ manager LocationMatch sections are processed before globally defined CacheEnable directives.

    -

    When acting as a forward proxy server, url-string can - also be used to specify remote sites and proxy protocols which - caching should be enabled for.

    - - - # Cache content
    - <Location /foo>
    - - CacheEnable disk
    -
    - </Location>

    - # Cache regex
    - <LocationMatch foo$>
    - - CacheEnable disk
    -
    - </LocationMatch>

    - # Cache proxied url's
    - CacheEnable disk /

    - # Cache FTP-proxied url's
    - CacheEnable disk ftp://

    - # Cache content from www.example.org
    - CacheEnable disk http://www.example.org/
    -
    +

    When acting as a forward proxy server, url-string must + minimally begin with a protocol for which caching should be enabled.

    + + +# Cache content (normal handler only) +CacheQuickHandler off +<Location "/foo"> + CacheEnable disk +</Location> + +# Cache regex (normal handler only) +CacheQuickHandler off +<LocationMatch "foo$"> + CacheEnable disk +</LocationMatch> + +# Cache all but forward proxy url's (normal or quick handler) +CacheEnable disk / + +# Cache FTP-proxied url's (normal or quick handler) +CacheEnable disk ftp:// + +# Cache forward proxy content from www.example.org (normal or quick handler) +CacheEnable disk http://www.example.org/ +

    A hostname starting with a "*" matches all hostnames with that suffix. A hostname starting with "." matches all hostnames containing the domain components that follow.

    - - # Match www.example.org, and fooexample.org
    - CacheEnable disk http://*example.org/
    - # Match www.example.org, but not fooexample.org
    - CacheEnable disk http://.example.org/
    -
    + +# Match www.example.org, and fooexample.org +CacheEnable disk "http://*example.org/" +# Match www.example.org, but not fooexample.org +CacheEnable disk "http://.example.org/" +

    The no-cache environment variable can be set to disable caching on a finer grained set of resources in versions @@ -417,7 +433,9 @@ manager url-string.

    Example - CacheDisable /local_files + + CacheDisable "/local_files" +

    If used in a Location directive, @@ -425,11 +443,11 @@ manager is used, caching for the whole location will be disabled.

    Example - <Location /foo>
    - - CacheDisable on
    -
    - </Location>
    + +<Location "/foo"> + CacheDisable on +</Location> +

    The no-cache environment variable can be set to @@ -456,9 +474,9 @@ manager server. Thus, documents will be out of date at most this number of seconds. This maximum value is enforced even if an expiry date was supplied with the document.

    - + CacheMaxExpire 604800 - + @@ -479,9 +497,9 @@ manager server. This is only used if no valid expire time was supplied with the document.

    - + CacheMinExpire 3600 - + @@ -502,9 +520,9 @@ manager with the document. The value specified with the CacheMaxExpire directive does not override this setting.

    - + CacheDefaultExpire 86400 - + @@ -532,9 +550,9 @@ header. CacheDefaultExpire directive will be used to generate an expiration date.

    - + CacheIgnoreNoLastMod On - + @@ -555,9 +573,9 @@ header. if the request contains no-cache header values. Resources requiring authorization will never be cached.

    - + CacheIgnoreCacheControl On - + Warning: This directive will allow serving from the cache even if the client has @@ -587,9 +605,9 @@ header. view the request is treated as if having no query string when this directive is enabled.

    - + CacheIgnoreQueryString On - + @@ -626,9 +644,9 @@ LastModified date. CacheMaxExpire, then the latter takes precedence.

    - + CacheLastModifiedFactor 0.5 - + @@ -669,11 +687,15 @@ LastModified date. None.

    Example 1 + CacheIgnoreHeaders Set-Cookie + Example 2 + CacheIgnoreHeaders None + Warning: @@ -712,11 +734,15 @@ LastModified date. identifiers. Otherwise, each identifier is added to the list.

    Example 1 + CacheIgnoreURLSessionIdentifiers jsessionid + Example 2 + CacheIgnoreURLSessionIdentifiers None + @@ -743,9 +769,9 @@ LastModified date. the origin server, and the response may be fulfilled from cache if the backend resource has not changed.

    - + CacheStoreExpired On - + @@ -769,9 +795,9 @@ LastModified date. private header values. Resources requiring authorization will never be cached.

    - + CacheStorePrivate On - + Warning: This directive will allow caching even if the upstream server has @@ -797,15 +823,15 @@ LastModified date.

    Ordinarily, requests or responses with Cache-Control: no-store header values will not be stored in the cache. The - CacheStoreNoCache directive allows this - behavior to be overridden. CacheStoreNoCache On + CacheStoreNoStore directive allows this + behavior to be overridden. CacheStoreNoStore On tells the server to attempt to cache the resource even if it contains no-store header values. Resources requiring authorization will never be cached.

    - + CacheStoreNoStore On - + Warning: As described in RFC 2616, the no-store directive is intended to @@ -834,10 +860,10 @@ LastModified date.

    In a minimal configuration the following directive is all that is needed to enable the thundering herd lock in the default system temp directory.

    - - # Enable cache lock
    - CacheLock on

    -
    + +# Enable cache lock +CacheLock on +
    @@ -887,6 +913,7 @@ LastModified date. CacheQuickHandler on server configvirtual host + Apache HTTP Server 2.3.3 and later

    The CacheQuickHandler directive @@ -903,21 +930,21 @@ LastModified date. slower than the default, it allows the cache to be used in cases where full processing is required, such as when content is subject to authorisation.

    - - # Run cache as a normal handler
    - CacheQuickHandler off

    -
    + +# Run cache as a normal handler +CacheQuickHandler off +

    It is also possible, when the quick handler is disabled, for the administrator to choose the precise location within the filter chain where caching is to be performed, by adding the CACHE filter to the chain.

    - - # Cache content before mod_include and mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -
    + +# Cache content before mod_include and mod_deflate +CacheQuickHandler off +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html +

    If the CACHE filter is specified more than once, the last instance will apply.

    @@ -941,8 +968,8 @@ LastModified date.

    When the CacheHeader directive is switched on, an X-Cache header will be added to the response with the cache status of this response. If the normal handler is used, this - directive may appear within a <Directory> - or <Location> directive. If the quick + directive may appear within a Directory + or Location directive. If the quick handler is used, this directive must appear within a server or virtual host context, otherwise the setting will be ignored.

    @@ -955,14 +982,14 @@ LastModified date. server and was not served from cache. - - # Enable the X-Cache header
    - CacheHeader on
    -
    + +# Enable the X-Cache header +CacheHeader on + - - X-Cache: HIT from localhost
    -
    + + X-Cache: HIT from localhost +
    @@ -990,15 +1017,15 @@ LastModified date. used by the service and client.

    If the normal handler is used, this directive may appear within a - <Directory> or - <Location> directive. If the quick handler + Directory or + Location directive. If the quick handler is used, this directive must appear within a server or virtual host context, otherwise the setting will be ignored.

    - - # Enable the X-Cache-Detail header
    - CacheDetailHeader on
    -
    + +# Enable the X-Cache-Detail header +CacheDetailHeader on + X-Cache-Detail: "conditional cache hit: entity refreshed" from localhost
    @@ -1026,10 +1053,10 @@ LastModified date. should be cached beneath the same cache key, a new base URL can be specified with this directive.

    - - # Override the base URL of the cache key.
    - CacheKeyBaseURL http://www.example.com/
    -
    + +# Override the base URL of the cache key. +CacheKeyBaseURL "http://www.example.com/" + Take care when setting this directive. If two separate virtual hosts are accidentally given the same base URL, entries from one virtual host @@ -1058,10 +1085,10 @@ LastModified date. and the raw 5xx responses returned to the client on request, the 5xx response so returned to the client will not invalidate the content in the cache.

    - - # Serve stale data on error.
    - CacheStaleOnError on
    -
    + +# Serve stale data on error. +CacheStaleOnError on + diff --git a/docs/manual/mod/mod_cache.xml.fr b/docs/manual/mod/mod_cache.xml.fr index 6a169290cff..a36747cac0a 100644 --- a/docs/manual/mod/mod_cache.xml.fr +++ b/docs/manual/mod/mod_cache.xml.fr @@ -1,7 +1,7 @@ - + @@ -35,8 +35,8 @@ car lorsque la directive CacheQuickHandler est définie à sa valeur par défaut on, les directives Allow and Deny sont court-circuitées. Vous + module="mod_access_compat">Allow and Deny sont court-circuitées. Vous ne devez donc pas activer la gestion rapide de la mise en cache pour un contenu auquel vous souhaitez limiter l'accès en fonction du nom d'hôte du client, de l'adresse IP ou d'une variable @@ -115,7 +115,7 @@

    mod_cache requiert les services d'un ou plusieurs modules de gestion de stockage. La distribution Apache de base - inclut un module de gestion de stockage :

    + inclut les modules de gestion de stockage suivants :

    mod_cache_disk
    @@ -128,6 +128,12 @@ htcacheclean permet de lister et de supprimer les URLs mises en cache, et de maintenir le cache en deçà de certaines limites de taille et de nombre d'inodes. +
    mod_cache_socache
    +
    Implémente un gestionnaire de stockage basé sur un cache d'objets + partagés. Les en-têtes et corps sont stockés ensemble sous une seule + clé basée sur l'URL de la réponse mise en cache. Des réponses à + contenus multiples négociés peuvent être stockées simultanément, mais + ce module ne supporte pas la mise en cache de contenus partiels.

    Pour de plus amples détails, une description, et des exemples, @@ -140,7 +146,7 @@ cache

    Exemple de configuration Extrait de httpd.conf - #
    - # Exemple de configuration du cache
    - #
    - LoadModule cache_module modules/mod_cache.so
    -
    - <IfModule mod_cache.c>
    - - LoadModule disk_cache_module modules/mod_cache_disk.so
    - <IfModule mod_cache_disk.c>
    - - CacheRoot c:/cacheroot
    - CacheEnable disk /
    - CacheDirLevels 5
    - CacheDirLength 3
    -
    - </IfModule>
    -
    - # Lorsqu'on sert de mandataire, on ne met pas en cache la liste - # des mises à jour de sécurité
    - CacheDisable http://security.update.server/update-list/
    -
    - </IfModule> + +# +# Exemple de configuration du cache +# +LoadModule cache_module modules/mod_cache.so +<IfModule mod_cache.c> + LoadModule cache_disk_module modules/mod_cache_disk.so + <IfModule mod_cache_disk.c> + CacheRoot "c:/cacheroot" + CacheEnable disk "/" + CacheDirLevels 5 + CacheDirLength 3 + </IfModule> + + # Lorsqu'on sert de mandataire, on ne met pas en cache la liste +# des mises à jour de sécurité + CacheDisable "http://security.update.server/update-list/" +</IfModule> +
    @@ -241,16 +250,16 @@ cache
    Exemple de configuration Activation du verrouillage du cache - #
    - # Active le verrouillage du cache
    - #
    - <IfModule mod_cache.c>
    - - CacheLock on
    - CacheLockPath /tmp/mod_cache-lock
    - CacheLockMaxAge 5
    -
    - </IfModule> + +# +# Active le verrouillage du cache +# +<IfModule mod_cache.c> + CacheLock on + CacheLockPath "/tmp/mod_cache-lock" + CacheLockMaxAge 5 +</IfModule> +
    @@ -290,11 +299,11 @@ cache avant le filtre DEFLATE comme dans l'exemple suivant :

    - - # Mise en cache du contenu avant la compression optionnelle
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;DEFLATE text/plain

    -
    + +# Mise en cache du contenu avant la compression optionnelle +CacheQuickHandler off +AddOutputFilterByType CACHE;DEFLATE text/plain +

    Une autre possibilité consiste à mettre en cache le contenu avant l'ajout de contenu personnalisé via mod_include (ou @@ -303,24 +312,24 @@ cache mod_include sont mis en cache avant d'être interprétés :

    - - # Mise en cache du contenu avant l'intervention de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -
    + +# Mise en cache du contenu avant l'intervention de mod_include et + # mod_deflate +CacheQuickHandler off +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html +

    Vous pouvez insérer le filtre CACHE en tout point de la chaîne de filtrage. Dans l'exemple suivant, le contenu est mis en cache après avoir été interprété par mod_include, mais avant d'être traité par mod_deflate :

    - - # Mise en cache du contenu entre les interventions de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html

    -
    + +# Mise en cache du contenu entre les interventions de mod_include et + # mod_deflate +CacheQuickHandler off +AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html + Avertissement :Si pour une raison ou pour une autre, le point d'insertion du filtre @@ -339,9 +348,9 @@ cache Cette information peut être journalisée via la directive LogFormat comme suit :

    - + LogFormat "%{cache-status}e ..." - +

    En fonction de la décision prise, l'information est aussi écrite dans l'environnement du sous-processus sous une des quatre clés @@ -361,12 +370,12 @@ cache du traitement des requêtes par rapport au cache comme dans l'exemple suivant :

    - - CustomLog requetes-depuis-cache.log common env=cache-hit
    - CustomLog requetes-hors-cache.log common env=cache-miss
    - CustomLog requetes-avec-mise-a-jour-du-cache.log common env=cache-revalidate
    - CustomLog requetes-avec-invalidation.log common env=cache-invalidate
    -
    + +CustomLog "cached-requests.log" common env=cache-hit +CustomLog "uncached-requests.log" common env=cache-miss +CustomLog "revalidated-requests.log" common env=cache-revalidate +CustomLog "invalidated-requests.log" common env=cache-invalidate +

    Pour les concepteurs de modules, une accroche (hook) nommée cache_status est disponible et permet aux modules de @@ -382,8 +391,10 @@ gestionnaire de stockage précisé CacheEnable type de cache [chaîne URL] server configvirtual host -directory.htaccess +directory +Une chaîne URL telle que '/' s'appliquait à tout contenu +en mandat direct dans les versions 2.2 et antérieures.

    La directive CacheEnable enjoint @@ -397,7 +408,11 @@ URL] contenu considéré peut être mis en cache. Si type de cache a pour valeur disk, mod_cache utilisera le gestionnaire de stockage sur disque implémenté par - mod_cache_disk.

    + mod_cache_disk. Pour que mod_cache + utilise le gestionnaire de stockage basé sur le cache d'objets + partagés implémenté par mod_cache_socache, + spécifiez socache comme valeur du paramètre type + de cache.

    Si les différentes directives CacheEnable spécifient des URLs qui se recoupent (comme dans l'exemple ci-dessous), tous les gestionnaires de stockage possibles seront @@ -414,30 +429,32 @@ URL] global.

    En fonctionnement du type serveur mandataire direct, chaîne - URL peut aussi être utilisé pour spécifier des sites distants - et des protocoles de mandat pour lesquels la mise en cache devra - être activée.

    - - - # Mise en cache de contenu
    - <Location /foo>
    - - CacheEnable disk
    -
    - </Location>

    - # Mise en cache via une expression rationnelle
    - <LocationMatch foo$>
    - - CacheEnable disk
    -
    - </LocationMatch>

    - # Mise en cache des URLs mandatées
    - CacheEnable disk /

    - # Mise en cache des URLs FTP mandatées
    - CacheEnable disk ftp://

    - # Mise en cache des contenus situés dans www.example.org
    - CacheEnable disk http://www.example.org/
    -
    + URL doit au moins débuter par un protocole pour lequel la mise + en cache doit être activée.

    + + +# Mise en cache de contenu (gestionnaire normal seulement) +CacheQuickHandler off +<Location "/foo"> + CacheEnable disk +</Location> + +# Mise en cache via une expression rationnelle (gestionnaire normal seulement) +CacheQuickHandler off +<LocationMatch "foo$"> + CacheEnable disk +</LocationMatch> + +# Mise en cache de tous les contenus, à l'exception des URLs +# mandatées en direct (gestionnaire normal ou rapide) +CacheEnable disk / + +# Mise en cache des URLs FTP mandatées (gestionnaire normal ou rapide) +CacheEnable disk ftp:// + +# Mise en cache des contenus mandatés en direct depuis www.example.org (gestionnaire normal ou rapide) +CacheEnable disk http://www.example.org/ +

    Un nom d'hôte commençant par un caractère "*" correspondra à tout nom d'hôte se terminant par le suffixe @@ -445,12 +462,12 @@ URL] "." correspondra à tout nom d'hôte contenant le composant de nom de domaine qui suit ce caractère.

    - - # Correspond à www.example.org et fooexample.org
    - CacheEnable disk http://*example.org/
    - # Correspond à www.example.org, mais pas à fooexample.org
    - CacheEnable disk http://.example.org/
    -
    + +# Correspond à www.example.org et fooexample.org +CacheEnable disk "http://*example.org/" +# Correspond à www.example.org, mais pas à fooexample.org +CacheEnable disk "http://.example.org/" +

    Depuis la version 2.2.12, on peut définir la variable d'environnement no-cache pour une définition plus fine @@ -477,7 +494,9 @@ spécifiées inférieurs.

    Exemple - CacheDisable /fichiers_locaux + + CacheDisable "/fichiers_locaux" +

    Si la directive se trouve à l'intérieur d'une section par la section Location.

    Exemple - <Location /foo>
    - - CacheDisable on
    -
    - </Location>
    + +<Location "/foo"> + CacheDisable on +</Location> +

    Avec les versions 2.2.12 et ultérieures, on peut définir la @@ -520,9 +539,10 @@ document sera pas à jour. L'utilisation de cette valeur maximale est forcée, même si le document possède une date d'expiration.

    - + CacheMaxExpire 604800 - + + @@ -544,9 +564,9 @@ document que dans le cas où le document ne possède aucune date d'expiration valide.

    - + CacheMinExpire 3600 - + @@ -569,9 +589,9 @@ lorsqu'aucune date d'expiration n'a été spécifiée.CacheMaxExpire si cette dernière est utilisée.

    - + CacheDefaultExpire 86400 - + @@ -600,9 +620,9 @@ Modified. d'expiration.

    - + CacheIgnoreNoLastMod On - + @@ -626,9 +646,9 @@ le contenu au client depuis le cache Les ressources qui requièrent une autorisation ne seront jamais mises en cache.

    - + CacheIgnoreCacheControl On - + Avertissement : Cette directive permet de servir des ressources depuis le cache, @@ -662,9 +682,9 @@ cache traitée comme si elle ne possèdait pas de chaîne de paramètres lorsque cette directive est activée.

    - + CacheIgnoreQueryString On - + @@ -701,9 +721,9 @@ fonction de la date de dernière modification. directive CacheMaxExpire, c'est ce dernier qui l'emporte.

    - + CacheLastModifiedFactor 0.5 - + @@ -748,11 +768,15 @@ fonction de la date de dernière modification. None.

    Exemple 1 + CacheIgnoreHeaders Set-Cookie + Exemple 2 + CacheIgnoreHeaders None + Avertissement : @@ -796,11 +820,15 @@ l'URL lors de la mise en cache ajouté à la liste.

    Exemple 1 + CacheIgnoreURLSessionIdentifiers jsessionid + Exemple 2 + CacheIgnoreURLSessionIdentifiers None + @@ -826,9 +854,10 @@ considère comme arrivées à expiration de la part du serveur d'origine, et la réponse sera renvoyée à partir du cache si la ressource d'arrière-plan n'a pas été modifiée.

    - + CacheStoreExpired On - + + @@ -853,9 +882,11 @@ marquées comme privées nécessitant une autorisation ne sont jamais mises en cache.

    - + + CacheStorePrivate On - + + Avertissement : Cette directive autorise la mise en cache même si le serveur @@ -881,17 +912,19 @@ l'entête Cache-Control: a pour valeur no-store.

    Normalement, les requêtes ou réponses dont l'en-tête Cache-Control: a pour valeur no-store ne sont pas stockées dans le - cache. La directive CacheStoreNoCache permet + cache. La directive CacheStoreNoStore permet de modifier ce comportement. Si - CacheStoreNoCache est définie à On, le + CacheStoreNoStore est définie à On, le serveur tente de mettre la ressource en cache même si elle contient des en-têtes ayant pour valeur no-store. Les ressources nécessitant une autorisation ne sont jamais mises en cache.

    - + + CacheStoreNoStore On - + + Avertissement : Selon la RFC 2616, la valeur d'en-tête no-store est censée @@ -924,10 +957,10 @@ l'entête Cache-Control: a pour valeur no-store. tempêtes de requêtes dans le répertoire temp par défaut du système est la suivante :

    - - # Active le verrouillage du cache
    - CacheLock on

    -
    + +# Active le verrouillage du cache +CacheLock on +
    @@ -978,6 +1011,8 @@ l'entête Cache-Control: a pour valeur no-store. CacheQuickHandler on server configvirtual host + Disponible à partir de la version 2.3.3 du serveur HTTP + Apache

    La directive traitement complet de la requête est nécessaire, comme par exemple lorsque le contenu est soumis à autorisation.

    - - # Exécute le cache comme un gestionnaire normal
    - CacheQuickHandler off

    -
    + +# Exécute le cache comme un gestionnaire normal +CacheQuickHandler off +

    Lorsque le gestionnaire rapide est désactivé, l'administrateur a aussi la possibilité de choisir avec précision le point de la chaîne de filtrage où la mise en cache sera effectuée, en utilisant le filtre CACHE.

    - - # Mise en cache du contenu avant l'intervention de mod_include et - # mod_deflate
    - CacheQuickHandler off
    - AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html

    -
    + +# Mise en cache du contenu avant l'intervention de mod_include et + # mod_deflate +CacheQuickHandler off +AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html +

    Si le filtre CACHE est spécifié plusieurs fois, c'est la dernière instance qui sera prise en compte.

    @@ -1038,10 +1073,10 @@ l'entête Cache-Control: a pour valeur no-store. module="mod_cache">CacheHeader est définie à on, un en-tête X-Cache est ajouté à la réponse et contient l'état du cache pour cette dernière. Si le gestionnaire normal est - utilisé, cette directive peut se situer dans une section <Directory> ou <Location>. Si c'est le - gestionnaire rapide qui est utilisé, elle doit se situer dans un + utilisé, cette directive peut se situer dans une section + Directory ou + Location. Si c'est + le gestionnaire rapide qui est utilisé, elle doit se situer dans un contexte de serveur principal ou de serveur virtuel, sinon elle sera ignorée.

    @@ -1054,14 +1089,15 @@ l'entête Cache-Control: a pour valeur no-store. depuis le cache, mais directement depuis le serveur demandé. - - # Active l'en-tête X-Cache
    - CacheHeader on
    -
    + +# Active l'en-tête X-Cache +CacheHeader on + - - X-Cache: HIT from localhost
    -
    + + X-Cache: HIT from localhost + +
    @@ -1093,16 +1129,16 @@ l'entête Cache-Control: a pour valeur no-store. utilisés par le service et le client.

    Si le gestionnaire normal est utilisé, cette directive peut se - situer dans une section <Directory> ou <Location>. Si c'est le gestionnaire + situer dans une section Directory ou Location. Si c'est le gestionnaire rapide qui est utilisé, elle doit se situer dans un contexte de serveur principal ou de serveur virtuel, sinon elle sera ignorée.

    - - # Active l'en-tête X-Cache-Detail
    - CacheDetailHeader on
    -
    + +# Active l'en-tête X-Cache-Detail +CacheDetailHeader on + X-Cache-Detail: "conditional cache hit: entity refreshed" from localhost
    @@ -1132,10 +1168,10 @@ inverse machines, si toutes les entrées du cache doivent posséder la même clé, cette directive permet de spécifier une nouvelle URL de base.

    - - # Remplace l'URL de base de la clé de cache.
    - CacheKeyBaseURL http://www.example.com/
    -
    + +# Remplace l'URL de base de la clé de cache. +CacheKeyBaseURL "http://www.example.com/" + Prenez garde en définissant cette directive. Si deux serveurs virtuels distincts possèdent accidentellement la même @@ -1168,10 +1204,10 @@ inverse réponse 5xx renvoyée au client n'invalidera pas le contenu dans le cache.

    - - # Sert des données non mises à jour en cas d'erreur.
    - CacheStaleOnError on
    -
    + +# Sert des données non mises à jour en cas d'erreur. +CacheStaleOnError on + diff --git a/docs/manual/mod/mod_cache.xml.ja b/docs/manual/mod/mod_cache.xml.ja index e6452ec5d8b..6aaa03e9389 100644 --- a/docs/manual/mod/mod_cache.xml.ja +++ b/docs/manual/mod/mod_cache.xml.ja @@ -1,7 +1,7 @@ - + + -mod_cache_disk - Apache HTTP Server +mod_cache_disk - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_cache_disk

    @@ -79,7 +84,12 @@
  • CacheReadTime
  • CacheRoot
  • -
    +

    Bugfix checklist

    See also

    +
    top

    CacheDirLength Directive

    @@ -149,9 +159,8 @@ cache maximum size, in bytes, for a document to be considered for storage in the cache.

    -

    - CacheMaxFileSize 64000 -

    +
    CacheMaxFileSize 64000
    +
    top
    @@ -169,9 +178,8 @@ cache minimum size, in bytes, for a document to be considered for storage in the cache.

    -

    - CacheMinFileSize 64 -

    +
    CacheMinFileSize 64
    +
    top
    @@ -196,9 +204,8 @@ cache

    This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache.

    -

    - CacheReadSize 102400 -

    +
    CacheReadSize 102400
    +
    top
    @@ -227,9 +234,8 @@ cache ensure that the server does not buffer excessively should data arrive faster than expected.

    -

    - CacheReadTime 1000 -

    +
    CacheReadTime 1000
    +
    top
    @@ -249,9 +255,8 @@ stored a configuration file processing error. The CacheDirLevels and CacheDirLength directives define the structure of the directories under the specified root directory.

    -

    - CacheRoot c:/cacheroot -

    +
    CacheRoot c:/cacheroot
    + @@ -260,7 +265,28 @@ stored fr  |  ja  |  ko 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_disk.html.fr b/docs/manual/mod/mod_cache_disk.html.fr index 1a70fc8a125..f0911c38aed 100644 --- a/docs/manual/mod/mod_cache_disk.html.fr +++ b/docs/manual/mod/mod_cache_disk.html.fr @@ -1,23 +1,28 @@ - -mod_cache_disk - Serveur Apache HTTP +mod_cache_disk - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_cache_disk

    @@ -61,6 +66,7 @@ cache HTTP. mod_cache_disk pour que ce dernier puisse fonctionner.

    +

    Note :

    Lorsque la plate-forme la supporte, et si elle est active via la directive EnableSendfile, mod_cache_disk utilise la fonctionnalit sendfile @@ -70,6 +76,7 @@ cache HTTP. un contexte de rpertoire ou de fichier .htaccess, car le module ne dispose pas des dfinitions correspondantes lorsque la requte est servie depuis le cache.

    +

    Directives

    -
    +

    Traitement des bugs

    Voir aussi

    +
    top
    -
    @@ -115,7 +127,7 @@ sous-r
    top
    -
    Description:Le nombre de caractres des noms des sous-rpertoires
    @@ -144,7 +156,7 @@ cache.
    top
    -
    Description:Le nombre de niveaux de sous-rpertoires que comportera le cache.
    @@ -158,13 +170,12 @@ cache. dfinir la taille maximale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache.

    -

    - CacheMaxFileSize 64000 -

    +
    CacheMaxFileSize 64000
    +
    top
    -
    Description:>La taille maximale (en octets) d'un document pour pouvoir tre stock dans le cache
    @@ -178,13 +189,12 @@ cache. dfinir la taille minimale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache.

    -

    - CacheMinFileSize 64 -

    +
    CacheMinFileSize 64
    +
    top
    -
    Description:La taille minimale (en octets) d'un document pour pouvoir tre stock dans le cache
    @@ -208,13 +218,12 @@ mettre en cache avant de les envoyer au client enregistres dans le cache, et non lorsque les donnes sont servies partir du cache.

    -

    - CacheReadSize 102400 -

    +
    CacheReadSize 102400
    +
    top
    -
    Description:La quantit minimale (en octets) de donnes lire et mettre en cache avant de les envoyer au client
    @@ -240,13 +249,12 @@ avant d'envoyer les donn que le serveur n'effectue pas une mise en tampon excessive au cas o les donnes arriveraient plus vite que prvu.

    -

    - CacheReadTime 1000 -

    +
    CacheReadTime 1000
    +
    top
    -
    Description:Le temps minimum (en millisecondes) qui doit s'couler avant d'envoyer les donnes au client
    @@ -265,9 +273,8 @@ seront stock dfinir la structure des sous-rpertoires du rpertoire racine spcifi.

    -

    - CacheRoot c:/cacheroot -

    +
    CacheRoot c:/cacheroot
    + @@ -276,7 +283,28 @@ seront stock  fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_disk.html.ja.utf8 b/docs/manual/mod/mod_cache_disk.html.ja.utf8 index e2a6cabc6e8..bc050c68455 100644 --- a/docs/manual/mod/mod_cache_disk.html.ja.utf8 +++ b/docs/manual/mod/mod_cache_disk.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_cache_disk - Apache HTTP サーバ +mod_cache_disk - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_cache_disk

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:La racine du rpertoire dans lequel les fichiers du cache seront stocks
    @@ -60,7 +66,9 @@
  • CacheReadTime
  • CacheRoot
  • - +

    Bugfix checklist

    参照

    +
    top

    CacheDirLength ディレクティブ

    @@ -195,11 +203,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_disk.html.ko.euc-kr b/docs/manual/mod/mod_cache_disk.html.ko.euc-kr index 07d391c194d..51c32b4e270 100644 --- a/docs/manual/mod/mod_cache_disk.html.ko.euc-kr +++ b/docs/manual/mod/mod_cache_disk.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_cache_disk - Apache HTTP Server +mod_cache_disk - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_cache_disk

    @@ -60,7 +65,9 @@
  • CacheReadTime
  • CacheRoot
  • -
    +

    Bugfix checklist

    +
    top

    CacheDirLength þ

    @@ -194,7 +201,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_disk.xml b/docs/manual/mod/mod_cache_disk.xml index b159c6ad1d0..69a65e724da 100644 --- a/docs/manual/mod/mod_cache_disk.xml +++ b/docs/manual/mod/mod_cache_disk.xml @@ -66,6 +66,9 @@ cache.

    +mod_cache +mod_cache_socache +Caching Guide CacheRoot @@ -86,9 +89,9 @@ stored module="mod_cache_disk">CacheDirLength directives define the structure of the directories under the specified root directory.

    - + CacheRoot c:/cacheroot - +
    @@ -164,9 +167,9 @@ cache minimum size, in bytes, for a document to be considered for storage in the cache.

    - + CacheMinFileSize 64 - + @@ -187,9 +190,9 @@ cache maximum size, in bytes, for a document to be considered for storage in the cache.

    - + CacheMaxFileSize 64000 - + @@ -217,9 +220,9 @@ cache

    This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache.

    - + CacheReadSize 102400 - + @@ -251,9 +254,9 @@ cache ensure that the server does not buffer excessively should data arrive faster than expected.

    - + CacheReadTime 1000 - + diff --git a/docs/manual/mod/mod_cache_disk.xml.fr b/docs/manual/mod/mod_cache_disk.xml.fr index e0f9fc60b74..c638aea6fed 100644 --- a/docs/manual/mod/mod_cache_disk.xml.fr +++ b/docs/manual/mod/mod_cache_disk.xml.fr @@ -1,7 +1,7 @@ - + @@ -60,6 +60,7 @@ cache HTTP.mod_cache_disk pour que ce dernier puisse fonctionner.

    + Note :

    Lorsque la plate-forme la supporte, et si elle est activée via la directive EnableSendfile, mod_cache_disk utilise la fonctionnalité sendfile @@ -69,7 +70,11 @@ cache HTTP. un contexte de répertoire ou de fichier .htaccess, car le module ne dispose pas des définitions correspondantes lorsque la requête est servie depuis le cache.

    +
    +mod_cache +mod_cache_socache +Guide de la mise en cache CacheRoot @@ -92,9 +97,9 @@ seront stockés définir la structure des sous-répertoires du répertoire racine spécifié.

    - + CacheRoot c:/cacheroot - +
    @@ -174,9 +179,9 @@ sous-répertoires définir la taille minimale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache.

    - + CacheMinFileSize 64 - + @@ -195,9 +200,9 @@ sous-répertoires définir la taille maximale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache.

    - + CacheMaxFileSize 64000 - + @@ -227,9 +232,9 @@ mettre en cache avant de les envoyer au client enregistrées dans le cache, et non lorsque les données sont servies à partir du cache.

    - + CacheReadSize 102400 - +
    @@ -263,9 +268,9 @@ avant d'envoyer les données au client que le serveur n'effectue pas une mise en tampon excessive au cas où les données arriveraient plus vite que prévu.

    - + CacheReadTime 1000 - + diff --git a/docs/manual/mod/mod_cache_disk.xml.ja b/docs/manual/mod/mod_cache_disk.xml.ja index 28601d3bb5d..323d932a880 100644 --- a/docs/manual/mod/mod_cache_disk.xml.ja +++ b/docs/manual/mod/mod_cache_disk.xml.ja @@ -1,7 +1,7 @@ - + + +mod_cache_socache - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_cache_socache

    +
    +

    Available Languages:  en  | + fr 

    +
    +
    説明:URI をキーにしたコンテンツキャッシュストレージ管理
    ステータス:Extension
    モジュール識別子:cache_disk_module
    + + +
    Description:Shared object cache (socache) based storage module for the +HTTP caching filter.
    Status:Extension
    ModuleIdentifier:cache_socache_module
    SourceFile:mod_cache_socache.c
    +

    Summary

    + +

    mod_cache_socache implements a shared object cache + (socache) based storage manager for mod_cache.

    + +

    The headers and bodies of cached responses are combined, and stored + underneath a single key in the shared object cache. A + number of implementations of shared object + caches are available to choose from.

    + +

    Multiple content negotiated responses can be stored concurrently, + however the caching of partial content is not yet supported by this + module.

    + +
    # Turn on caching
    +CacheSocache shmcb
    +CacheSocacheMaxSize 102400
    +<Location /foo>
    +    CacheEnable socache
    +</Location>
    +
    +# Fall back to the disk cache
    +CacheSocache shmcb
    +CacheSocacheMaxSize 102400
    +<Location /foo>
    +    CacheEnable socache
    +    CacheEnable disk
    +</Location>
    + + +

    Note:

    +

    mod_cache_socache requires the services of + mod_cache, which must be loaded before + mod_cache_socache.

    +
    +
    + + +
    top
    +

    CacheSocache Directive

    + + + + + + + +
    Description:The shared object cache implementation to use
    Syntax:CacheSocache type[:args]
    Context:server config, virtual host
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocache directive defines the name of + the shared object cache implementation to use, followed by optional + arguments for that implementation. A number of + implementations of shared object caches are available to choose + from.

    + +
    CacheSocache shmcb
    + + +
    +
    top
    +

    CacheSocacheMaxSize Directive

    + + + + + + + + +
    Description:The maximum size (in bytes) of an entry to be placed in the +cache
    Syntax:CacheSocacheMaxSize bytes
    Default:CacheSocacheMaxSize 102400
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocacheMaxSize directive sets the + maximum size, in bytes, for the combined headers and body of a document + to be considered for storage in the cache. The larger the headers that + are stored alongside the body, the smaller the body may be.

    + +

    The mod_cache_socache module will only attempt to + cache responses that have an explicit content length, or that are small + enough to be written in one pass. This is done to allow the + mod_cache_disk module to have an opportunity to cache + responses larger than those cacheable within + mod_cache_socache.

    + +
    CacheSocacheMaxSize 102400
    + + +
    +
    top
    +

    CacheSocacheMaxTime Directive

    + + + + + + + + +
    Description:The maximum time (in seconds) for a document to be placed in the +cache
    Syntax:CacheSocacheMaxTime seconds
    Default:CacheSocacheMaxTime 86400
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocacheMaxTime directive sets the + maximum freshness lifetime, in seconds, for a document to be stored in + the cache. This value overrides the freshness lifetime defined for the + document by the HTTP protocol.

    + +
    CacheSocacheMaxTime 86400
    + + +
    +
    top
    +

    CacheSocacheMinTime Directive

    + + + + + + + + +
    Description:The minimum time (in seconds) for a document to be placed in the +cache
    Syntax:CacheSocacheMinTime seconds
    Default:CacheSocacheMinTime 600
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocacheMinTime directive sets the + amount of seconds beyond the freshness lifetime of the response that the + response should be cached for in the shared object cache. If a response is + only stored for its freshness lifetime, there will be no opportunity to + revalidate the response to make it fresh again.

    + +
    CacheSocacheMinTime 600
    + + +
    +
    top
    +

    CacheSocacheReadSize Directive

    + + + + + + + + +
    Description:The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    Syntax:CacheSocacheReadSize bytes
    Default:CacheSocacheReadSize 0
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocacheReadSize directive sets the + minimum amount of data, in bytes, to be read from the backend before the + data is sent to the client. The default of zero causes all data read of + any size to be passed downstream to the client immediately as it arrives. + Setting this to a higher value causes the disk cache to buffer at least + this amount before sending the result to the client. This can improve + performance when caching content from a slow reverse proxy.

    + +

    This directive only takes effect when the data is being saved to the + cache, as opposed to data being served from the cache.

    + +
    CacheReadSize 102400
    + + +
    +
    top
    +

    CacheSocacheReadTime Directive

    + + + + + + + + +
    Description:The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    Syntax:CacheSocacheReadTime milliseconds
    Default:CacheSocacheReadTime 0
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_cache_socache
    Compatibility:Available in Apache 2.4.5 and later
    +

    The CacheSocacheReadTime directive sets the minimum amount + of elapsed time that should pass before making an attempt to send data + downstream to the client. During the time period, data will be buffered + before sending the result to the client. This can improve performance when + caching content from a reverse proxy.

    + +

    The default of zero disables this option.

    + +

    This directive only takes effect when the data is being saved to the + cache, as opposed to data being served from the cache. It is recommended + that this option be used alongside the + CacheSocacheReadSize directive + to ensure that the server does not buffer excessively should data arrive faster + than expected.

    + +
    CacheSocacheReadTime 1000
    + + +
    + +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_socache.html.fr b/docs/manual/mod/mod_cache_socache.html.fr new file mode 100644 index 00000000000..d9439e1c1ae --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.html.fr @@ -0,0 +1,279 @@ + + + + + +mod_cache_socache - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_cache_socache

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Module de stockage base de cache d'objets partags +(socache) pour le filtre de mise en cache HTTP.
    Statut:Extension
    IdentificateurdeModule:cache_socache_module
    FichierSource:mod_cache_socache.c
    +

    Sommaire

    + +

    Le module mod_cache_socache implmente un + gestionnaire de stockage base de cache d'objets partags (socache) + pour le module mod_cache.

    + +

    Les en-ttes et corps des rponses mises en cache sont rassembls + et stocks sous une mme cl dans le cache d'objets partags. Il est + possible de choisir entre plusieurs implmentations de caches d'objets + partags.

    + +

    Des rponses avec diffrents contenus ngocis peuvent tre + stockes simultanment ; cependant, la mise en cache de contenus + partiels n'est pas encore supporte par ce module.

    + +
    # Activation de la mise en cache
    +CacheSocache shmcb
    +CacheSocacheMaxSize 102400
    +<Location /foo>
    +    CacheEnable socache
    +</Location>
    +
    +# Possibilit de se rabattre sur le cache disque
    +CacheSocache shmcb
    +CacheSocacheMaxSize 102400
    +<Location /foo>
    +    CacheEnable socache
    +    CacheEnable disk
    +</Location>
    + + +

    Note :

    +

    Le module mod_cache_socache requiert les + services du module mod_cache qui doit donc avoir + t pralablement charg.

    +
    +
    + + +
    top
    +

    Directive CacheSocache

    + + + + + + + +
    Description:Implmentation du cache d'objets partags utiliser
    Syntaxe:CacheSocache type[:args]
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocache + dfinit l'implmentation du cache d'objets partags utiliser, + suivie d'arguments optionnels. Il est + possible de choisir entre plusieurs implmentations de caches d'objets + partags.

    + +
    CacheSocache shmcb
    + + +
    +
    top
    +

    Directive CacheSocacheMaxSize

    + + + + + + + + +
    Description:La taille maximale d'une entre pouvant tre place dans le +cache
    Syntaxe:CacheSocacheMaxSize octets
    Dfaut:CacheSocacheMaxSize 102400
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocacheMaxSize + dfinit la taille maximale, en octets, de la somme des en-ttes et + du corps d'un document pouvant tre stock dans le cache. Bien + entendu, plus la taille des en-ttes sera grande, plus la taille + maximale du corps du document s'en trouvera rduite.

    + +

    Le module mod_cache_socache ne tentera de mettre + en cache que des rponses qui possdent une taille de contenu + explicite, ou dont la taille est suffisamment petite pour qu'elles + soient crites en une seule passe. Ceci permet au module + mod_cache_disk de mettre en cache des rponses dont + la taille est trop importante pour pouvoir tre mises en cache par + mod_cache_socache.

    + +
    CacheSocacheMaxSize 102400
    + + +
    +
    top
    +

    Directive CacheSocacheMaxTime

    + + + + + + + + +
    Description:La dure maximale de stockage d'un document dans le cache +avant premption
    Syntaxe:CacheSocacheMaxTime secondes
    Dfaut:CacheSocacheMaxTime 86400
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocacheMaxTime + dfinit la dure de stockage maximale en secondes d'un document dans + le cache avant premption. Cette dfinition l'emporte sur la dure + de fracheur dfinie pour le document par le protocole HTTP.

    + +
    CacheSocacheMaxTime 86400
    + + +
    +
    top
    +

    Directive CacheSocacheMinTime

    + + + + + + + + +
    Description:La dure minimale de stockage d'un document dans le cache
    Syntaxe:CacheSocacheMinTime seconds
    Dfaut:CacheSocacheMinTime 600
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocacheMinTime + dfinit le nombre de secondes au del de la dure de fracheur de la + rponse pendant lesquelles cette dernire devra tre stocke dans le + cache d'objets partags. En effet, si une rponse n'est stocke que + pour une dure gale sa dure de fracheur, elle n'a pas besoin + d'tre rafrachie.

    + +
    CacheSocacheMinTime 600
    + + +
    +
    top
    +

    Directive CacheSocacheReadSize

    + + + + + + + + +
    Description:La quantit minimale de donnes du document lire et +mettre en cache avant envoi au client
    Syntaxe:CacheSocacheReadSize octets
    Dfaut:CacheSocacheReadSize 0
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocacheReadSize + dfinit la quantit minimale de donnes, en octets, lire depuis + l'arrire-plan avant envoi au client. Avec la valeur par dfaut 0, + les donnes sont transmises au client ds leur arrive et quelle que + soit leur taille. Si la valeur dfinie est non nulle, le cache + disque va mettre en tampon au moins la quantit de donnes + correspondante avant envoi au client. Ceci peut amliorer les + performances en cas de mise en cache de contenu en provenance d'un + mandataire inverse lent.

    + +

    Cette directive n'a d'effet qu'au moment o les donnes sont + stockes dans le cache, et non lorsqu'elles sont servies depuis le + cache.

    + +
    CacheReadSize 102400
    + + +
    +
    top
    +

    Directive CacheSocacheReadTime

    + + + + + + + + +
    Description:La dure minimale de lecture avant l'envoi des donnes
    Syntaxe:CacheSocacheReadTime millisecondes
    Dfaut:CacheSocacheReadTime 0
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_cache_socache
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    La directive CacheSocacheReadTime + dfinit le temps minimal qui doit s'couler avant de tenter + l'envoi des donnes au client. Cette dure sera mise profit pour + lire et mettre en tampon les donnes avant leur envoi au client. + Ceci peut amliorer les performances en cas de mise en cache de + contenu en provenance d'un mandataire inverse.

    + +

    La valeur par dfaut 0 dsactive cette directive.

    + +

    Cette directive n'a d'effet qu'au moment o les donnes sont + stockes dans le cache, et non lorsqu'elles sont servies depuis le + cache. Il est recommand d'utiliser cette directive en concomitance + avec la directive CacheSocacheReadSize afin de + s'assurer que le serveur ne mette pas les donnes en tampon de + manire excessive dans le cas o les donnes arriveraient plus vite + que prvu.

    + +
    CacheSocacheReadTime 1000
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_cache_socache.xml b/docs/manual/mod/mod_cache_socache.xml new file mode 100644 index 00000000000..3b7c89c6b3a --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.xml @@ -0,0 +1,242 @@ + + + + + + + + + +mod_cache_socache +Shared object cache (socache) based storage module for the +HTTP caching filter. +Extension +mod_cache_socache.c +cache_socache_module + + +

    mod_cache_socache implements a shared object cache + (socache) based storage manager for mod_cache.

    + +

    The headers and bodies of cached responses are combined, and stored + underneath a single key in the shared object cache. A + number of implementations of shared object + caches are available to choose from.

    + +

    Multiple content negotiated responses can be stored concurrently, + however the caching of partial content is not yet supported by this + module.

    + + +# Turn on caching +CacheSocache shmcb +CacheSocacheMaxSize 102400 +<Location /foo> + CacheEnable socache +</Location> + +# Fall back to the disk cache +CacheSocache shmcb +CacheSocacheMaxSize 102400 +<Location /foo> + CacheEnable socache + CacheEnable disk +</Location> + + + Note: +

    mod_cache_socache requires the services of + mod_cache, which must be loaded before + mod_cache_socache.

    +
    +
    +mod_cache +mod_cache_disk +Caching Guide + + +CacheSocache +The shared object cache implementation to use +CacheSocache type[:args] +server configvirtual host + +Available in Apache 2.4.5 and later + + +

    The CacheSocache directive defines the name of + the shared object cache implementation to use, followed by optional + arguments for that implementation. A number of + implementations of shared object caches are available to choose + from.

    + + + CacheSocache shmcb + +
    +
    + + +CacheSocacheMaxTime +The maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheMaxTime seconds +CacheSocacheMaxTime 86400 +server config + virtual host + directory + .htaccess + +Available in Apache 2.4.5 and later + + +

    The CacheSocacheMaxTime directive sets the + maximum freshness lifetime, in seconds, for a document to be stored in + the cache. This value overrides the freshness lifetime defined for the + document by the HTTP protocol.

    + + + CacheSocacheMaxTime 86400 + +
    +
    + + +CacheSocacheMinTime +The minimum time (in seconds) for a document to be placed in the +cache +CacheSocacheMinTime seconds +CacheSocacheMinTime 600 +server config + virtual host + directory + .htaccess + +Available in Apache 2.4.5 and later + + +

    The CacheSocacheMinTime directive sets the + amount of seconds beyond the freshness lifetime of the response that the + response should be cached for in the shared object cache. If a response is + only stored for its freshness lifetime, there will be no opportunity to + revalidate the response to make it fresh again.

    + + + CacheSocacheMinTime 600 + +
    +
    + + +CacheSocacheMaxSize +The maximum size (in bytes) of an entry to be placed in the +cache +CacheSocacheMaxSize bytes +CacheSocacheMaxSize 102400 +server config + virtual host + directory + .htaccess + +Available in Apache 2.4.5 and later + + +

    The CacheSocacheMaxSize directive sets the + maximum size, in bytes, for the combined headers and body of a document + to be considered for storage in the cache. The larger the headers that + are stored alongside the body, the smaller the body may be.

    + +

    The mod_cache_socache module will only attempt to + cache responses that have an explicit content length, or that are small + enough to be written in one pass. This is done to allow the + mod_cache_disk module to have an opportunity to cache + responses larger than those cacheable within + mod_cache_socache.

    + + + CacheSocacheMaxSize 102400 + +
    +
    + + +CacheSocacheReadSize +The minimum size (in bytes) of the document to read and be cached + before sending the data downstream +CacheSocacheReadSize bytes +CacheSocacheReadSize 0 +server config + virtual host + directory + .htaccess + +Available in Apache 2.4.5 and later + + +

    The CacheSocacheReadSize directive sets the + minimum amount of data, in bytes, to be read from the backend before the + data is sent to the client. The default of zero causes all data read of + any size to be passed downstream to the client immediately as it arrives. + Setting this to a higher value causes the disk cache to buffer at least + this amount before sending the result to the client. This can improve + performance when caching content from a slow reverse proxy.

    + +

    This directive only takes effect when the data is being saved to the + cache, as opposed to data being served from the cache.

    + + + CacheReadSize 102400 + +
    +
    + + +CacheSocacheReadTime +The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream +CacheSocacheReadTime milliseconds +CacheSocacheReadTime 0 +server config + virtual host + directory + .htaccess + +Available in Apache 2.4.5 and later + + +

    The CacheSocacheReadTime directive sets the minimum amount + of elapsed time that should pass before making an attempt to send data + downstream to the client. During the time period, data will be buffered + before sending the result to the client. This can improve performance when + caching content from a reverse proxy.

    + +

    The default of zero disables this option.

    + +

    This directive only takes effect when the data is being saved to the + cache, as opposed to data being served from the cache. It is recommended + that this option be used alongside the + CacheSocacheReadSize directive + to ensure that the server does not buffer excessively should data arrive faster + than expected.

    + + + CacheSocacheReadTime 1000 + +
    +
    + +
    diff --git a/docs/manual/mod/mod_cache_socache.xml.fr b/docs/manual/mod/mod_cache_socache.xml.fr new file mode 100644 index 00000000000..c1a4ba8fa98 --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.xml.fr @@ -0,0 +1,260 @@ + + + + + + + + + + + +mod_cache_socache +Module de stockage à base de cache d'objets partagés +(socache) pour le filtre de mise en cache HTTP. +Extension +mod_cache_socache.c +cache_socache_module + + +

    Le module mod_cache_socache implémente un + gestionnaire de stockage à base de cache d'objets partagés (socache) + pour le module mod_cache.

    + +

    Les en-têtes et corps des réponses mises en cache sont rassemblés + et stockés sous une même clé dans le cache d'objets partagés. Il est + possible de choisir entre plusieurs implémentations de caches d'objets + partagés.

    + +

    Des réponses avec différents contenus négociés peuvent être + stockées simultanément ; cependant, la mise en cache de contenus + partiels n'est pas encore supportée par ce module.

    + + +# Activation de la mise en cache +CacheSocache shmcb +CacheSocacheMaxSize 102400 +<Location /foo> + CacheEnable socache +</Location> + +# Possibilité de se rabattre sur le cache disque +CacheSocache shmcb +CacheSocacheMaxSize 102400 +<Location /foo> + CacheEnable socache + CacheEnable disk +</Location> + + + Note : +

    Le module mod_cache_socache requiert les + services du module mod_cache qui doit donc avoir + été préalablement chargé.

    +
    +
    +mod_cache +mod_cache_disk +Guide de la mise en cache + + +CacheSocache +Implémentation du cache d'objets partagés à utiliser +CacheSocache type[:args] +server configvirtual host + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocache + définit l'implémentation du cache d'objets partagés à utiliser, + suivie d'arguments optionnels. Il est + possible de choisir entre plusieurs implémentations de caches d'objets + partagés.

    + + + CacheSocache shmcb + +
    +
    + + +CacheSocacheMaxTime +La durée maximale de stockage d'un document dans le cache +avant péremption +CacheSocacheMaxTime secondes +CacheSocacheMaxTime 86400 +server config + virtual host + directory + .htaccess + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocacheMaxTime + définit la durée de stockage maximale en secondes d'un document dans + le cache avant péremption. Cette définition l'emporte sur la durée + de fraîcheur définie pour le document par le protocole HTTP.

    + + + CacheSocacheMaxTime 86400 + +
    +
    + + +CacheSocacheMinTime +La durée minimale de stockage d'un document dans le cache +CacheSocacheMinTime seconds +CacheSocacheMinTime 600 +server config + virtual host + directory + .htaccess + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocacheMinTime + définit le nombre de secondes au delà de la durée de fraîcheur de la + réponse pendant lesquelles cette dernière devra être stockée dans le + cache d'objets partagés. En effet, si une réponse n'est stockée que + pour une durée égale à sa durée de fraîcheur, elle n'a pas besoin + d'être rafraîchie.

    + + + CacheSocacheMinTime 600 + +
    +
    + + +CacheSocacheMaxSize +La taille maximale d'une entrée pouvant être placée dans le +cache +CacheSocacheMaxSize octets +CacheSocacheMaxSize 102400 +server config + virtual host + directory + .htaccess + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocacheMaxSize + définit la taille maximale, en octets, de la somme des en-têtes et + du corps d'un document pouvant être stocké dans le cache. Bien + entendu, plus la taille des en-têtes sera grande, plus la taille + maximale du corps du document s'en trouvera réduite.

    + +

    Le module mod_cache_socache ne tentera de mettre + en cache que des réponses qui possèdent une taille de contenu + explicite, ou dont la taille est suffisamment petite pour qu'elles + soient écrites en une seule passe. Ceci permet au module + mod_cache_disk de mettre en cache des réponses dont + la taille est trop importante pour pouvoir être mises en cache par + mod_cache_socache.

    + + + CacheSocacheMaxSize 102400 + +
    +
    + + +CacheSocacheReadSize +La quantité minimale de données du document à lire et +mettre en cache avant envoi au client +CacheSocacheReadSize octets +CacheSocacheReadSize 0 +server config + virtual host + directory + .htaccess + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocacheReadSize + définit la quantité minimale de données, en octets, à lire depuis + l'arrière-plan avant envoi au client. Avec la valeur par défaut 0, + les données sont transmises au client dès leur arrivée et quelle que + soit leur taille. Si la valeur définie est non nulle, le cache + disque va mettre en tampon au moins la quantité de données + correspondante avant envoi au client. Ceci peut améliorer les + performances en cas de mise en cache de contenu en provenance d'un + mandataire inverse lent.

    + +

    Cette directive n'a d'effet qu'au moment où les données sont + stockées dans le cache, et non lorsqu'elles sont servies depuis le + cache.

    + + + CacheReadSize 102400 + +
    +
    + + +CacheSocacheReadTime +La durée minimale de lecture avant l'envoi des données +CacheSocacheReadTime millisecondes +CacheSocacheReadTime 0 +server config + virtual host + directory + .htaccess + +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    La directive CacheSocacheReadTime + définit le temps minimal qui doit s'écouler avant de tenter + l'envoi des données au client. Cette durée sera mise à profit pour + lire et mettre en tampon les données avant leur envoi au client. + Ceci peut améliorer les performances en cas de mise en cache de + contenu en provenance d'un mandataire inverse.

    + +

    La valeur par défaut 0 désactive cette directive.

    + +

    Cette directive n'a d'effet qu'au moment où les données sont + stockées dans le cache, et non lorsqu'elles sont servies depuis le + cache. Il est recommandé d'utiliser cette directive en concomitance + avec la directive CacheSocacheReadSize afin de + s'assurer que le serveur ne mette pas les données en tampon de + manière excessive dans le cas où les données arriveraient plus vite + que prévu.

    + + + CacheSocacheReadTime 1000 + +
    +
    + +
    diff --git a/docs/manual/mod/mod_cache_socache.xml.meta b/docs/manual/mod/mod_cache_socache.xml.meta new file mode 100644 index 00000000000..dcf2d899545 --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_cache_socache + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_cern_meta.html b/docs/manual/mod/mod_cern_meta.html index 658786398e2..ce935a92f13 100644 --- a/docs/manual/mod/mod_cern_meta.html +++ b/docs/manual/mod/mod_cern_meta.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_cern_meta.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_cern_meta.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/mod/mod_cern_meta.html.en b/docs/manual/mod/mod_cern_meta.html.en index bffc3683b75..9dab06cf308 100644 --- a/docs/manual/mod/mod_cern_meta.html.en +++ b/docs/manual/mod/mod_cern_meta.html.en @@ -1,27 +1,33 @@ - -mod_cern_meta - Apache HTTP Server +mod_cern_meta - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_cern_meta

    Available Languages:  en  | + fr  |  ko 

    @@ -47,11 +53,11 @@
  • MetaFiles
  • MetaSuffix
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    MetaDir Directive

    @@ -71,12 +77,14 @@ files accessed. Set to "." to look in the same directory as the file:

    -

    MetaDir .

    +
    MetaDir .
    +

    Or, to set it to a subdirectory of the directory containing the files:

    -

    MetaDir .meta

    +
    MetaDir .meta
    +
    top
    @@ -96,7 +104,7 @@ files
    top
    Description:CERN httpd metafile semantics
    - @@ -113,16 +121,37 @@ meta information will use its contents to generate additional MIME header information.

    -

    Example:

    - MetaSuffix .meta -

    +

    Example:

    MetaSuffix .meta
    +

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cern_meta.html.fr b/docs/manual/mod/mod_cern_meta.html.fr new file mode 100644 index 00000000000..fede33e5e66 --- /dev/null +++ b/docs/manual/mod/mod_cern_meta.html.fr @@ -0,0 +1,162 @@ + + + + + +mod_cern_meta - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_cern_meta

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:File name suffix for the file containg CERN-style +
    Description:File name suffix for the file containing CERN-style meta information
    Syntax:MetaSuffix suffix
    Default:MetaSuffix .meta
    + + +
    Description:La smantique des mtafichiers du serveur httpd du +CERN
    Statut:Extension
    IdentificateurdeModule:cern_meta_module
    FichierSource:mod_cern_meta.c
    +

    Sommaire

    + +

    Il s'agit d'une mulation de la smantique des mtafichiers du + serveur httpd du CERN. Les mtafichiers consistent en en-ttes HTTP + qui peuvent s'ajouter au jeu d'en-ttes habituels pour chaque + fichier accd. Ils ressemblent beaucoup aux fichiers .asis + d'Apache, et permettent d'influencer de manire rudimentaire + l'en-tte Expires:, ainsi que d'autres curiosits. Il existe de + nombreuses mthodes pour grer les mtainformations, mais le choix + s'est port sur celle-ci car il existe dj un grand nombre + d'utilisateurs du CERN qui peuvent exploiter ce module.

    + +

    Pour plus d'information, voir le document sur la smantique des mtafichiers du CERN.

    +
    + + +
    top
    +

    Directive MetaDir

    + + + + + + + + +
    Description:Le nom du rpertoire o trouver les fichiers de +mtainformations dans le style du CERN
    Syntaxe:MetaDir rpertoire
    Dfaut:MetaDir .web
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Extension
    Module:mod_cern_meta
    +

    Spcifie le nom du rpertoire dans lequel Apache pourra trouver + les fichiers de mtainformations. Ce rpertoire est en gnral un + sous-rpertoire 'cach' du rpertoire qui contient le fichier + accder. Dfinissez cette directive "." pour + rechercher les mtafichiers dans le mme rpertoire que le fichier + accder :

    + +
    MetaDir .
    + + +

    Ou, pour rechercher dans un sous-rpertoire du rpertoire + contenant le fichier accder :

    + +
    MetaDir .meta
    + + +
    +
    top
    +

    Directive MetaFiles

    + + + + + + + + +
    Description:Active le traitement des mtafichiers du CERN
    Syntaxe:MetaFiles on|off
    Dfaut:MetaFiles off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Extension
    Module:mod_cern_meta
    +

    Active ou dsactive le traitement des mtafichiers pour certains + rpertoires.

    + +
    +
    top
    +

    Directive MetaSuffix

    + + + + + + + + +
    Description:Suffixe du fichier contenant les mtainformations dans le +style du CERN
    Syntaxe:MetaSuffix suffixe
    Dfaut:MetaSuffix .meta
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Extension
    Module:mod_cern_meta
    +

    Spcifie le suffixe du fichier contenant les mtainformations. + Par exemple, si on conserve les valeurs par dfaut des deux + directives prcdentes, une requte pour + DOCUMENT_ROOT/un-rep/index.html provoquera la recherche + du mtafichier + DOCUMENT_ROOT/un-rep/.web/index.html.meta, et utilisera + son contenu pour gnrer les informations quant aux en-ttes MIME + additionnels.

    + +

    Exemple :

    MetaSuffix .meta
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_cern_meta.html.ko.euc-kr b/docs/manual/mod/mod_cern_meta.html.ko.euc-kr index 0c0a79c70c9..f7e8c6bfab2 100644 --- a/docs/manual/mod/mod_cern_meta.html.ko.euc-kr +++ b/docs/manual/mod/mod_cern_meta.html.ko.euc-kr @@ -1,29 +1,37 @@ - -mod_cern_meta - Apache HTTP Server +mod_cern_meta - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_cern_meta

    +
    ֽ ƴմϴ. + ֱٿ ϼ.
    @@ -45,11 +53,11 @@
  • MetaFiles
  • MetaSuffix
  • -

    +

    Bugfix checklist

    +
  • Comments
  • top

    MetaDir þ

    @@ -113,8 +121,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cern_meta.xml b/docs/manual/mod/mod_cern_meta.xml index d5c5b9edaab..ce40d7b4eb7 100644 --- a/docs/manual/mod/mod_cern_meta.xml +++ b/docs/manual/mod/mod_cern_meta.xml @@ -81,18 +81,18 @@ files accessed. Set to "." to look in the same directory as the file:

    - MetaDir . + MetaDir .

    Or, to set it to a subdirectory of the directory containing the files:

    - MetaDir .meta + MetaDir .meta MetaSuffix -File name suffix for the file containg CERN-style +File name suffix for the file containing CERN-style meta information MetaSuffix suffix MetaSuffix .meta @@ -112,7 +112,9 @@ meta information information.

    Example: + MetaSuffix .meta +
    diff --git a/docs/manual/mod/mod_cern_meta.xml.fr b/docs/manual/mod/mod_cern_meta.xml.fr new file mode 100644 index 00000000000..7e9770499ce --- /dev/null +++ b/docs/manual/mod/mod_cern_meta.xml.fr @@ -0,0 +1,129 @@ + + + + + + + + + + + +mod_cern_meta +La sémantique des métafichiers du serveur httpd du +CERN +Extension +mod_cern_meta.c +cern_meta_module + + +

    Il s'agit d'une émulation de la sémantique des métafichiers du + serveur httpd du CERN. Les métafichiers consistent en en-têtes HTTP + qui peuvent s'ajouter au jeu d'en-têtes habituels pour chaque + fichier accédé. Ils ressemblent beaucoup aux fichiers .asis + d'Apache, et permettent d'influencer de manière rudimentaire + l'en-tête Expires:, ainsi que d'autres curiosités. Il existe de + nombreuses méthodes pour gérer les métainformations, mais le choix + s'est porté sur celle-ci car il existe déjà un grand nombre + d'utilisateurs du CERN qui peuvent exploiter ce module.

    + +

    Pour plus d'information, voir le document sur la sémantique des métafichiers du CERN.

    +
    + +mod_headers +mod_asis + + +MetaFiles +Active le traitement des métafichiers du CERN +MetaFiles on|off +MetaFiles off +server config +virtual host +directory +.htaccess +Indexes + + +

    Active ou désactive le traitement des métafichiers pour certains + répertoires.

    +
    +
    + + +MetaDir +Le nom du répertoire où trouver les fichiers de +métainformations dans le style du CERN +MetaDir répertoire +MetaDir .web +server config +virtual host +directory +.htaccess +Indexes + + +

    Spécifie le nom du répertoire dans lequel Apache pourra trouver + les fichiers de métainformations. Ce répertoire est en général un + sous-répertoire 'caché' du répertoire qui contient le fichier à + accéder. Définissez cette directive à "." pour + rechercher les métafichiers dans le même répertoire que le fichier à + accéder :

    + + MetaDir . + +

    Ou, pour rechercher dans un sous-répertoire du répertoire + contenant le fichier à accéder :

    + + MetaDir .meta +
    +
    + + +MetaSuffix +Suffixe du fichier contenant les métainformations dans le +style du CERN +MetaSuffix suffixe +MetaSuffix .meta +server config +virtual host +directory +.htaccess +Indexes + + +

    Spécifie le suffixe du fichier contenant les métainformations. + Par exemple, si on conserve les valeurs par défaut des deux + directives précédentes, une requête pour + DOCUMENT_ROOT/un-rep/index.html provoquera la recherche + du métafichier + DOCUMENT_ROOT/un-rep/.web/index.html.meta, et utilisera + son contenu pour générer les informations quant aux en-têtes MIME + additionnels.

    + + Exemple : + + MetaSuffix .meta + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_cern_meta.xml.ko b/docs/manual/mod/mod_cern_meta.xml.ko index 77f12655459..f01f7bb8596 100644 --- a/docs/manual/mod/mod_cern_meta.xml.ko +++ b/docs/manual/mod/mod_cern_meta.xml.ko @@ -1,7 +1,7 @@ - + -mod_cgi - Apache HTTP Server +mod_cgi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_cgi

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -53,17 +59,17 @@ for any file with the mime-type application/x-httpd-cgi. The use of the magic mime-type is deprecated.

    -
    top

    CGI Environment variables

    @@ -98,7 +104,7 @@
    REMOTE_IDENT
    -
    This will only be set if IdentityCheck is set to +
    This will only be set if IdentityCheck is set to on and the accessing host supports the ident protocol. Note that the contents of this variable cannot be relied upon because it can easily be faked, and if there is a @@ -109,7 +115,32 @@
    This will only be set if the CGI script is subject to authentication.
    + +

    This module also leverages the core functions + ap_add_common_vars and + ap_add_cgi_vars + to add environment variables like:

    +
    +
    DOCUMENT_ROOT
    + +
    Set with the content of the related DocumentRoot directive.
    + +
    SERVER_NAME
    + +
    The fully qualified domain name related to the request.
    + +
    SERVER_ADDR
    + +
    The IP address of the Virtual Host serving the request.
    + +
    SERVER_ADMIN
    + +
    Set with the content of the related ServerAdmin directive.
    +
    +

    For an exhaustive list it is suggested to write a basic CGI script + that dumps all the environment variables passed by Apache in a convenient format. +

    top

    CGI Debugging

    @@ -174,9 +205,8 @@ taken relative to the ServerRoot.

    -

    Example

    - ScriptLog logs/cgi_log -

    +

    Example

    ScriptLog logs/cgi_log
    +

    This log will be opened as the user the child processes run as, i.e. the user specified in the main User directive. This means that @@ -234,9 +264,31 @@ in the scriptlog

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgi.html.fr b/docs/manual/mod/mod_cgi.html.fr new file mode 100644 index 00000000000..f4d2bb753a6 --- /dev/null +++ b/docs/manual/mod/mod_cgi.html.fr @@ -0,0 +1,313 @@ + + + + + +mod_cgi - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_cgi

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    +
    :CERN Ÿ
    :Extension
    :cern_meta_module
    + + +
    Description:Excution des scripts CGI
    Statut:Base
    IdentificateurdeModule:cgi_module
    FichierSource:mod_cgi.c
    +

    Sommaire

    + +

    Tout fichier pris en compte par le gestionnaire + cgi-script sera trait en tant que script CGI et + excut par le serveur, sa sortie tant renvoye au client. Les + fichiers sont associs ce gestionnaire soit parce qu'ils possdent + un nom contenant une extension dfinie par la directive AddHandler, soit parce qu'ils se + situent dans un rpertoire dfini par une directive ScriptAlias.

    + +

    Comme introduction l'utilisation des scripts CGI avec Apache, + voir notre tutoriel Les contenus + dynamiques avec CGI.

    + +

    Il est recommand d'utiliser le module mod_cgid + la place de mod_cgi lorsqu'on utilise un module MPM + multi-thread sous Unix. Vus de l'utilisateur, les deux modules + sont pratiquement identiques.

    + +

    des fins de compatibilit ascendante, le gestionnaire + cgi-script sera aussi activ pour tout fichier possdant le type + MIME application/x-httpd-cgi. L'utilisation du type + MIME magic est obsolte.

    +
    + +
    top
    +
    +

    Les variables d'environnement CGI

    +

    Le serveur va dfinir les variables d'environnement CGI comme + dcrit dans la Spcification CGI, de la + manire suivante :

    + +
    +
    PATH_INFO
    + +
    Cette variable ne sera pas disponible si la directive + AcceptPathInfo est + explicitement dfinie off. Par dfaut, si la + directive AcceptPathInfo n'est pas dfinie, + mod_cgi acceptera des informations de chemin (en + ajoutant /infos/chemin aprs le nom du script dans l'URI), alors + que le serveur de base retournera une erreur 404 NOT FOUND pour + les requtes contenant des informations de chemin supplmentaires. + Ne pas dfinir la directive AcceptPathInfo + a le mme effet sur les requtes avec mod_cgi que + de la dfinir On.
    + +
    REMOTE_HOST
    + +
    Cette variable ne sera dfinie que si la directive HostnameLookups est dfinie + on (elle est off par dfaut), et si + une recherche DNS inverse sur l'adresse IP de l'hte client + aboutit effectivement un nom d'hte.
    + +
    REMOTE_IDENT
    + +
    Cette variable ne sera dfinie que si la directive IdentityCheck + est dfinie on, et si l'hte client supporte le + protocole ident. Notez que l'on ne peut accorder une confiance + aveugle au contenu de cette variable car il peut tre aisment + falsifi, et si un mandataire s'intercale entre le client et le + serveur, il est totalement inutilisable.
    + +
    REMOTE_USER
    + +
    Cette variable ne sera dfinie que si le script CGI fait + l'objet d'une authentification.
    + +
    +

    Ce module utilise aussi les fonctions de base ap_add_common_vars + et ap_add_cgi_vars + pour ajouter des variables d'environnement comme :

    +
    +
    DOCUMENT_ROOT
    + +
    Prend la valeur dfinie par la directive DocumentRoot.
    + +
    SERVER_NAME
    + +
    Le nom de domaine pleinement qualifi pour la requte considre
    + +
    SERVER_ADDR
    + +
    L'adresse IP du serveur virtuel qui traite la requte
    + +
    SERVER_ADMIN
    + +
    Prend la valeur dfinie par la directive ServerAdmin.
    +
    +

    Pour une liste exhaustive de ces variables, vous pouvez crire un script + CGI basique qui extrait toutes les variables d'environnement passes par + Apache selon un format adapt. +

    +
    top
    +
    +

    Dbogage des scripts CGI

    +

    Le dbogage des scripts CGI tait difficile par le pass, + principalement parce qu'il n'tait pas possible d'tudier la sortie + (sortie standard et erreurs) des scripts dont l'excution chouait. + Les directives qui suivent permettent une journalisation plus dtaille des + erreurs.

    + +

    Format du fichier journal CGI

    +

    Lorsqu'il est configur, le journal des erreurs CGI enregistre + la sortie de tout programme CGI dont l'excution ne s'effectue pas + correctement. Un script CGI dont l'excution choue provoque la + journalisation d'une grande quantit d'informations. Les deux + premires lignes possdent toujours le format suivant :

    + +

    + %% [date] requte
    + %% tat HTTP nom du script CGI +

    + +

    Si le script CGI n'a pas pu dmarrer, le fichier journal + contiendra les deux lignes supplmentaires suivantes :

    + +

    + %%erreur
    + message d'erreur +

    + +

    Par contre, si l'erreur provient du renvoi par le script + d'informations incorrectes dans les en-ttes (d souvent une + bogue du script), les informations suivantes sont journalises + :

    + +

    + %requte
    + Tous les en-ttes de requte HTTP reus
    + Les entits POST ou PUT (s'il en existe)
    + %rponse
    + Tous les en-ttes gnrs par le script CGI
    + %stdout
    + la sortie standard CGI
    + %stderr
    + la sortie d'erreurs standard CGI
    +

    + +

    (Les parties %stdout et %stderr seront absentes si le script + n'a rien envoy sur la sortie standard ou la sortie + d'erreurs).

    + +
    +
    top
    +

    Directive ScriptLog

    + + + + + + +
    Description:Chemin du fichier journal des erreurs du script +CGI
    Syntaxe:ScriptLog chemin fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_cgi, mod_cgid
    +

    La directive ScriptLog permet de dfinir + le chemin du fichier journal des erreurs du script CGI. Si cette + directive n'est pas dfinie, aucune journalisation des erreurs n'est + effectue. Si elle est dfinie, toute erreur CGI sera enregistre + dans le fichier dont le nom est fourni en argument. S'il s'agit d'un + chemin de fichier relatif, il est considr par rapport au + rpertoire dfini par la directive ServerRoot. +

    + +

    Exemple

    ScriptLog logs/cgi_log
    +
    + +

    Ce journal sera ouvert par l'utilisateur sous lequel les + processus enfants s'excutent, c'est dire l'utilisateur spcifi + par la directive du serveur User. Ceci implique que le + rpertoire dans lequel se trouve le journal doit tre accessible en + criture pour cet utilisateur, ou bien que le fichier est cr + manuellement et accessible en criture pour cet utilisateur. Si vous + placez le journal du script dans votre rpertoire principal des + journaux, ne modifiez JAMAIS les permissions de ce + dernier afin de le le rendre accessible en criture par + l'utilisateur sous lequel les processus enfants s'excutent.

    + +

    Notez que l'on ne doit activer la journalisation des scripts + qu' des fins de dbogage lors de l'criture de scripts CGI, et non + de manire permanente sur un serveur en production. Elle n'est pas + optimise en terme de performances et d'efficacit, et peut + prsenter des problmes de scurit si on l'utilise dans un cadre + autre que celui pour lequel elle a t conue.

    + +
    +
    top
    +

    Directive ScriptLogBuffer

    + + + + + + + +
    Description:Taille maximale des requtes PUT ou POST qui seront +enregistres dans le journal du script
    Syntaxe:ScriptLogBuffer octets
    Dfaut:ScriptLogBuffer 1024
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_cgi, mod_cgid
    +

    Cette directive permet de limiter la taille du corps de toute + entit PUT ou POST qui sera enregistre dans le journal, afin + de prvenir une croissance trop importante et trop rapide du fichier + journal due la rception de corps de requte de grandes tailles. + Cette directive permet de modifier cette taille maximale, dont la + valeur par dfaut est de 1024 octets.

    + +
    +
    top
    +

    Directive ScriptLogLength

    + + + + + + + +
    Description:Taille maximale du fichier journal des scripts +CGI
    Syntaxe:ScriptLogLength octets
    Dfaut:ScriptLogLength 10385760
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_cgi, mod_cgid
    +

    La directive ScriptLogLength permet de + dfinir la taille maximale du fichier journal des scripts CGI. Comme + le fichier journal accumule une grande quantit d'informations par + erreur CGI (tous les en-ttes de la requte, toutes les sorties du + script), il peut vite atteindre une grande taille. En limitant la + taille du fichier, cette directive permet d'viter les problmes que + causerait sa croissance sans limites. Lorsque le fichier a atteint + cette taille maximale, plus aucune information n'y est + enregistre.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_cgi.html.ja.utf8 b/docs/manual/mod/mod_cgi.html.ja.utf8 index 3476cc4e488..8c5b811c176 100644 --- a/docs/manual/mod/mod_cgi.html.ja.utf8 +++ b/docs/manual/mod/mod_cgi.html.ja.utf8 @@ -1,41 +1,46 @@ - -mod_cgi - Apache HTTP サーバ +mod_cgi - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_cgi

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    説明:CGI スクリプトの実行
    ステータス:Base
    モジュール識別子:cgi_module
    ソースファイル:mod_cgi.c

    概要

    - -

    ハンドラ cgi-script が指定されているファイルは CGI スクリプトとして扱われ、 サーバにより実行され、その出力がクライアントに返されます。 @@ -56,29 +61,29 @@ であるファイルでも cgi-script ハンドラが有効になります。この特殊な MIME タイプを 使う方法は非推奨です。

    -
    top

    CGI 環境変数

    -

    サーバは CGI +

    サーバは CGI 規格 で決められている CGI 環境変数を設定します。以下のものは、条件付きで設定されます。

    @@ -106,7 +111,7 @@
    REMOTE_IDENT
    -
    IdentityCheck +
    IdentityCheckon に設定されていて、アクセスしているホストが ident プロトコルをサポートしているときにのみ設定されます。 これは簡単に偽ることができ、クライアントとサーバの間に @@ -125,8 +130,7 @@

    CGI スクリプトのデバッグは、正しく動作していないスクリプトの出力 (標準出力とエラー) を調べることができないために、難しい状態が続いていました。 - これらの Apache 1.2 以降にある - ディレクティブはより詳細なエラーのログ収集を提供します。

    + これらのディレクティブはより詳細なエラーのログ収集を提供します。

    CGI ログファイルの書式

    設定されているときには、CGI エラーログは適切に動作しないすべての @@ -185,12 +189,11 @@ ServerRootからの相対パスとして 扱われます。

    -

    - ScriptLog logs/cgi_log -

    +

    ScriptLog logs/cgi_log
    +

    このログは子プロセスが実行されているユーザとしてオープンされます。 - すなわちUser ディレクティブで指定された + すなわちUser ディレクティブで指定された ユーザです。これは、スクリプトログが書かれるディレクトリがそのユーザで 書き込み可能か、スクリプトファイルが手動で作成され、そのユーザで 書き込み可能になっている必要があるということです。スクリプトログを @@ -245,10 +248,32 @@

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgi.html.ko.euc-kr b/docs/manual/mod/mod_cgi.html.ko.euc-kr index ddc1062578e..126928eaf6f 100644 --- a/docs/manual/mod/mod_cgi.html.ko.euc-kr +++ b/docs/manual/mod/mod_cgi.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_cgi - Apache HTTP Server +mod_cgi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_cgi

    @@ -53,17 +59,17 @@ mod_cgid ؾ Ѵ. 忡 ⺻ ϴ.

    -
    top

    CGI ȯ溯

    @@ -226,9 +232,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgi.xml b/docs/manual/mod/mod_cgi.xml index ac1f2f59485..aa7dd939437 100644 --- a/docs/manual/mod/mod_cgi.xml +++ b/docs/manual/mod/mod_cgi.xml @@ -88,7 +88,7 @@
    REMOTE_IDENT
    -
    This will only be set if This will only be set if IdentityCheck is set to on and the accessing host supports the ident protocol. Note that the contents of this variable cannot be @@ -100,7 +100,32 @@
    This will only be set if the CGI script is subject to authentication.
    + +

    This module also leverages the core functions + ap_add_common_vars and + ap_add_cgi_vars + to add environment variables like:

    +
    +
    DOCUMENT_ROOT
    + +
    Set with the content of the related DocumentRoot directive.
    + +
    SERVER_NAME
    + +
    The fully qualified domain name related to the request.
    + +
    SERVER_ADDR
    + +
    The IP address of the Virtual Host serving the request.
    + +
    SERVER_ADMIN
    + +
    Set with the content of the related ServerAdmin directive.
    +
    +

    For an exhaustive list it is suggested to write a basic CGI script + that dumps all the environment variables passed by Apache in a convenient format. +

    CGI Debugging @@ -168,7 +193,9 @@

    Example + ScriptLog logs/cgi_log +

    This log will be opened as the user the child processes run diff --git a/docs/manual/mod/mod_cgi.xml.fr b/docs/manual/mod/mod_cgi.xml.fr new file mode 100644 index 00000000000..460710d46bc --- /dev/null +++ b/docs/manual/mod/mod_cgi.xml.fr @@ -0,0 +1,285 @@ + + + + + + + + + + + +mod_cgi +Exécution des scripts CGI +Base +mod_cgi.c +cgi_module + +

    +

    Tout fichier pris en compte par le gestionnaire + cgi-script sera traité en tant que script CGI et + exécuté par le serveur, sa sortie étant renvoyée au client. Les + fichiers sont associés à ce gestionnaire soit parce qu'ils possèdent + un nom contenant une extension définie par la directive AddHandler, soit parce qu'ils se + situent dans un répertoire défini par une directive ScriptAlias.

    + +

    Comme introduction à l'utilisation des scripts CGI avec Apache, + voir notre tutoriel Les contenus + dynamiques avec CGI.

    + +

    Il est recommandé d'utiliser le module mod_cgid + à la place de mod_cgi lorsqu'on utilise un module MPM + multi-threadé sous Unix. Vus de l'utilisateur, les deux modules + sont pratiquement identiques.

    + +

    À des fins de compatibilité ascendante, le gestionnaire + cgi-script sera aussi activé pour tout fichier possédant le type + MIME application/x-httpd-cgi. L'utilisation du type + MIME magic est obsolète.

    +
    + +AcceptPathInfo +Options ExecCGI +ScriptAlias +AddHandler +Exécuter des programmes CGI sous des +utilisateurs différents +La spécification +CGI + +
    Les variables d'environnement CGI +

    Le serveur va définir les variables d'environnement CGI comme + décrit dans la Spécification CGI, de la + manière suivante :

    + +
    +
    PATH_INFO
    + +
    Cette variable ne sera pas disponible si la directive + AcceptPathInfo est + explicitement définie à off. Par défaut, si la + directive AcceptPathInfo n'est pas définie, + mod_cgi acceptera des informations de chemin (en + ajoutant /infos/chemin après le nom du script dans l'URI), alors + que le serveur de base retournera une erreur 404 NOT FOUND pour + les requêtes contenant des informations de chemin supplémentaires. + Ne pas définir la directive AcceptPathInfo + a le même effet sur les requêtes avec mod_cgi que + de la définir à On.
    + +
    REMOTE_HOST
    + +
    Cette variable ne sera définie que si la directive HostnameLookups est définie à + on (elle est à off par défaut), et si + une recherche DNS inverse sur l'adresse IP de l'hôte client + aboutit effectivement à un nom d'hôte.
    + +
    REMOTE_IDENT
    + +
    Cette variable ne sera définie que si la directive IdentityCheck + est définie à on, et si l'hôte client supporte le + protocole ident. Notez que l'on ne peut accorder une confiance + aveugle au contenu de cette variable car il peut être aisément + falsifié, et si un mandataire s'intercale entre le client et le + serveur, il est totalement inutilisable.
    + +
    REMOTE_USER
    + +
    Cette variable ne sera définie que si le script CGI fait + l'objet d'une authentification.
    + +
    +

    Ce module utilise aussi les fonctions de base ap_add_common_vars + et ap_add_cgi_vars + pour ajouter des variables d'environnement comme :

    +
    +
    DOCUMENT_ROOT
    + +
    Prend la valeur définie par la directive DocumentRoot.
    + +
    SERVER_NAME
    + +
    Le nom de domaine pleinement qualifié pour la requête considérée
    + +
    SERVER_ADDR
    + +
    L'adresse IP du serveur virtuel qui traite la requête
    + +
    SERVER_ADMIN
    + +
    Prend la valeur définie par la directive ServerAdmin.
    +
    +

    Pour une liste exhaustive de ces variables, vous pouvez écrire un script + CGI basique qui extrait toutes les variables d'environnement passées par + Apache selon un format adapté. +

    +
    + +
    Débogage des scripts CGI +

    Le débogage des scripts CGI était difficile par le passé, + principalement parce qu'il n'était pas possible d'étudier la sortie + (sortie standard et erreurs) des scripts dont l'exécution échouait. + Les directives qui suivent permettent une journalisation plus détaillée des + erreurs.

    + +
    Format du fichier journal CGI +

    Lorsqu'il est configuré, le journal des erreurs CGI enregistre + la sortie de tout programme CGI dont l'exécution ne s'effectue pas + correctement. Un script CGI dont l'exécution échoue provoque la + journalisation d'une grande quantité d'informations. Les deux + premières lignes possèdent toujours le format suivant :

    + + + %% [date] requête
    + %% état HTTP nom du script CGI +
    + +

    Si le script CGI n'a pas pu démarrer, le fichier journal + contiendra les deux lignes supplémentaires suivantes :

    + + + %%erreur
    + message d'erreur +
    + +

    Par contre, si l'erreur provient du renvoi par le script + d'informations incorrectes dans les en-têtes (dû souvent à une + bogue du script), les informations suivantes sont journalisées + :

    + + + %requête
    + Tous les en-têtes de requête HTTP reçus
    + Les entités POST ou PUT (s'il en existe)
    + %réponse
    + Tous les en-têtes générés par le script CGI
    + %stdout
    + la sortie standard CGI
    + %stderr
    + la sortie d'erreurs standard CGI
    +
    + +

    (Les parties %stdout et %stderr seront absentes si le script + n'a rien envoyé sur la sortie standard ou la sortie + d'erreurs).

    +
    +
    + + +ScriptLog +Chemin du fichier journal des erreurs du script +CGI +ScriptLog chemin fichier +server config +virtual host +mod_cgimod_cgid + + + +

    La directive ScriptLog permet de définir + le chemin du fichier journal des erreurs du script CGI. Si cette + directive n'est pas définie, aucune journalisation des erreurs n'est + effectuée. Si elle est définie, toute erreur CGI sera enregistrée + dans le fichier dont le nom est fourni en argument. S'il s'agit d'un + chemin de fichier relatif, il est considéré par rapport au + répertoire défini par la directive ServerRoot. +

    + + Exemple + + ScriptLog logs/cgi_log + + + +

    Ce journal sera ouvert par l'utilisateur sous lequel les + processus enfants s'exécutent, c'est à dire l'utilisateur spécifié + par la directive du serveur User. Ceci implique que le + répertoire dans lequel se trouve le journal doit être accessible en + écriture pour cet utilisateur, ou bien que le fichier est créé + manuellement et accessible en écriture pour cet utilisateur. Si vous + placez le journal du script dans votre répertoire principal des + journaux, ne modifiez JAMAIS les permissions de ce + dernier afin de le le rendre accessible en écriture par + l'utilisateur sous lequel les processus enfants s'exécutent.

    + +

    Notez que l'on ne doit activer la journalisation des scripts + qu'à des fins de débogage lors de l'écriture de scripts CGI, et non + de manière permanente sur un serveur en production. Elle n'est pas + optimisée en terme de performances et d'efficacité, et peut + présenter des problèmes de sécurité si on l'utilise dans un cadre + autre que celui pour lequel elle a été conçue.

    +
    +
    + + +ScriptLogLength +Taille maximale du fichier journal des scripts +CGI +ScriptLogLength octets +ScriptLogLength 10385760 +server config +virtual host +mod_cgimod_cgid + + + +

    La directive ScriptLogLength permet de + définir la taille maximale du fichier journal des scripts CGI. Comme + le fichier journal accumule une grande quantité d'informations par + erreur CGI (tous les en-têtes de la requête, toutes les sorties du + script), il peut vite atteindre une grande taille. En limitant la + taille du fichier, cette directive permet d'éviter les problèmes que + causerait sa croissance sans limites. Lorsque le fichier a atteint + cette taille maximale, plus aucune information n'y est + enregistrée.

    +
    +
    + + +ScriptLogBuffer +Taille maximale des requêtes PUT ou POST qui seront +enregistrées dans le journal du script +ScriptLogBuffer octets +ScriptLogBuffer 1024 +server config +virtual host +mod_cgimod_cgid + + + +

    Cette directive permet de limiter la taille du corps de toute + entité PUT ou POST qui sera enregistrée dans le journal, afin + de prévenir une croissance trop importante et trop rapide du fichier + journal due à la réception de corps de requête de grandes tailles. + Cette directive permet de modifier cette taille maximale, dont la + valeur par défaut est de 1024 octets.

    +
    +
    + + diff --git a/docs/manual/mod/mod_cgi.xml.ja b/docs/manual/mod/mod_cgi.xml.ja index 269ba4698c4..7be1ae63e87 100644 --- a/docs/manual/mod/mod_cgi.xml.ja +++ b/docs/manual/mod/mod_cgi.xml.ja @@ -1,7 +1,7 @@ - + -

    ハンドラ cgi-script が指定されているファイルは CGI スクリプトとして扱われ、 サーバにより実行され、その出力がクライアントに返されます。 @@ -55,14 +51,14 @@ AcceptPathInfo -Options +Options ExecCGI ScriptAlias AddHandler CGI プログラムを別のユーザ ID で実行する -CGI 規格書 +CGI 規格書

    CGI 環境変数 -

    サーバは CGI +

    サーバは CGI 規格 で決められている CGI 環境変数を設定します。以下のものは、条件付きで設定されます。

    @@ -91,7 +87,7 @@
    REMOTE_IDENT
    -
    IdentityCheck +
    IdentityCheckon に設定されていて、アクセスしているホストが ident プロトコルをサポートしているときにのみ設定されます。 これは簡単に偽ることができ、クライアントとサーバの間に @@ -110,8 +106,7 @@

    CGI スクリプトのデバッグは、正しく動作していないスクリプトの出力 (標準出力とエラー) を調べることができないために、難しい状態が続いていました。 - これらの Apache 1.2 以降にある - ディレクティブはより詳細なエラーのログ収集を提供します。

    + これらのディレクティブはより詳細なエラーのログ収集を提供します。

    CGI ログファイルの書式

    設定されているときには、CGI エラーログは適切に動作しないすべての @@ -174,11 +169,13 @@ 扱われます。

    + ScriptLog logs/cgi_log +

    このログは子プロセスが実行されているユーザとしてオープンされます。 - すなわちすなわち、User ディレクティブで指定された ユーザです。これは、スクリプトログが書かれるディレクトリがそのユーザで 書き込み可能か、スクリプトファイルが手動で作成され、そのユーザで diff --git a/docs/manual/mod/mod_cgi.xml.ko b/docs/manual/mod/mod_cgi.xml.ko index af6be2549ef..e795d520883 100644 --- a/docs/manual/mod/mod_cgi.xml.ko +++ b/docs/manual/mod/mod_cgi.xml.ko @@ -1,7 +1,7 @@ - + -mod_cgid - Apache HTTP Server +mod_cgid - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_cgid

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -58,25 +64,49 @@
    +
  • Comments
  • +
    top
    +

    CGIDScriptTimeout Directive

    + + + + + + + + +
    Description:The length of time to wait for more output from the +CGI program
    Syntax:CGIDScriptTimeout time[s|ms]
    Default:value of Timeout directive when +unset
    Context:server config, virtual host, directory, .htaccess
    Status:Base
    Module:mod_cgid
    Compatibility:CGIDScriptTimeout defaults to zero in releases 2.4 and earlier +
    +

    This directive limits the length of time to wait for more output from + the CGI program. If the time is exceeded, the request and CGI are + terminated.

    + +

    Example

    CGIDScriptTimeout 20
    +
    + + +
    top

    ScriptSock Directive

    - + @@ -89,18 +119,43 @@ the cgi daemon scripts, it is important that no other user has permission to write in the directory where the socket is located.

    -

    Example

    - ScriptSock /var/run/cgid.sock -

    +

    If file-path is not an absolute path, the location specified + will be relative to the value of + DefaultRuntimeDir.

    + +

    Example

    ScriptSock /var/run/cgid.sock
    +

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgid.html.fr b/docs/manual/mod/mod_cgid.html.fr new file mode 100644 index 00000000000..1397746d59d --- /dev/null +++ b/docs/manual/mod/mod_cgid.html.fr @@ -0,0 +1,165 @@ + + + + + +mod_cgid - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_cgid

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    +
    Description:The filename prefix of the socket to use for communication with the cgi daemon
    Syntax:ScriptSock file-path
    Default:ScriptSock logs/cgisock
    Default:ScriptSock cgisock
    Context:server config
    Status:Base
    Module:mod_cgid
    + + + +
    Description:Excution des scripts CGI par l'intermdiaire d'un dmon +CGI externe
    Statut:Base
    IdentificateurdeModule:cgid_module
    FichierSource:mod_cgid.c
    Compatibilit:Uniquement compatible avec les MPMs Unix +threads
    +

    Sommaire

    + +

    Exceptes les optimisations et la directive additionnelle + ScriptSock dcrite + ci-dessous, mod_cgid a un comportement similaire + celui de mod_cgi. Voir le rsum de + mod_cgi pour plus de dtails propos d'Apache et + CGI.

    + +

    Sur certains systmes d'exploitation de type unix, le lancement + (forking) d'un processus depuis un serveur multi-thread est une + opration trs lourde car le nouveau processus va rpliquer tous les + threads du processus parent. Pour viter cette dpense de ressouces + pour chaque invocation d'un programme CGI, mod_cgid + cre un dmon externe qui est responsable du branchement de + processus enfants destins au lancement de scripts CGI. Le serveur + principal communique avec ce dmon par l'intermdiaire d'une socket + de domaine unix.

    + +

    Si un MPM multi-thread a t slectionn lors du processus de + compilation, c'est ce module qui est utilis par dfaut la place + de mod_cgi. Du point de vue de l'utilisateur, ce + module est identique mod_cgi quant sa + configuration et son utilisation. La seule diffrence est la + directive additionnelle ScriptSock qui permet de + dfinir le nom du socket utiliser pour la communication avec le + dmon CGI.

    +
    + + +
    top
    +

    Directive CGIDScriptTimeout

    + + + + + + + + +
    Description:Dure maximale d'attente de la prochaine sortie du +programme CGI
    Syntaxe:CGIDScriptTimeout time[s|ms]
    Dfaut:Valeur de la directive Timeout
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Base
    Module:mod_cgid
    Compatibilit:La valeur de CGIDScriptTimeout est 0 dans les versions +2.4 et antrieures +
    +

    Cette directive permet de limiter la dure d'attente avant les prochaines donnes + reues en sortie du programme CGI. Si ce temps est dpass, la requte et le + programme CGI se terminent.

    + +

    Exemple

    CGIDScriptTimeout 20
    +
    + + +
    +
    top
    +

    Directive ScriptSock

    + + + + + + + +
    Description:Le prfixe du nom de fichier du socket utiliser pour +communiquer avec le dmon CGI
    Syntaxe:ScriptSock chemin fichier
    Dfaut:ScriptSock cgisock
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_cgid
    +

    Cette directive permet de dfinir le prfixe du nom de fichier de la + socket utiliser pour communiquer avec le dmon CGI, prfixe auquel + sera ajout une extension correspondant l'identifiant processus du + serveur. La socket sera ouverte avec les permissions de l'utilisateur + qui a dmarr Apache (en gnral root). Afin de prserver la + scurit des communications avec les scripts CGI, il est impratif + de n'accorder aucun autre utilisateur la permission d'crire dans + le rpertoire o se trouve la socket.

    + +

    Si chemin fichier n'est pas un chemin absolu, il est + relatif au chemin dfini par la directive DefaultRuntimeDir.

    + +

    Exemple

    ScriptSock /var/run/cgid.sock
    +
    + + +
    + +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_cgid.html.ja.utf8 b/docs/manual/mod/mod_cgid.html.ja.utf8 index a632e96d47e..fdab6c6c695 100644 --- a/docs/manual/mod/mod_cgid.html.ja.utf8 +++ b/docs/manual/mod/mod_cgid.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_cgid - Apache HTTP サーバ +mod_cgid - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_cgid

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -57,17 +64,34 @@ +
  • コメント
  • +
    top
    +
    説明:外部 CGI デーモンを使った CGI スクリプトの実行
    ステータス:Base
    モジュール識別子:cgid_module
    + + + + + + + +
    説明:The length of time to wait for more output from the +CGI program
    構文:CGIDScriptTimeout time[s|ms]
    デフォルト:value of Timeout directive when +unset
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    ステータス:Base
    モジュール:mod_cgid
    互換性:CGIDScriptTimeout defaults to zero in releases 2.4 and earlier +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    ScriptSock ディレクティブ

    @@ -93,10 +117,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgid.html.ko.euc-kr b/docs/manual/mod/mod_cgid.html.ko.euc-kr index 78aa6dcdb18..c8c023f6908 100644 --- a/docs/manual/mod/mod_cgid.html.ko.euc-kr +++ b/docs/manual/mod/mod_cgid.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_cgid - Apache HTTP Server +mod_cgid - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > +
    top
    +
    + + + + + + + +
    :The length of time to wait for more output from the +CGI program
    :CGIDScriptTimeout time[s|ms]
    ⺻:value of Timeout directive when +unset
    :ּ, ȣƮ, directory, .htaccess
    :Base
    :mod_cgid
    :CGIDScriptTimeout defaults to zero in releases 2.4 and earlier +

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    top

    ScriptSock þ

    @@ -91,9 +114,31 @@ +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_cgid.xml b/docs/manual/mod/mod_cgid.xml index 01e660dd2ff..a901ebb5d01 100644 --- a/docs/manual/mod/mod_cgid.xml +++ b/docs/manual/mod/mod_cgid.xml @@ -77,7 +77,7 @@ The filename prefix of the socket to use for communication with the cgi daemonScriptSock file-path -ScriptSock logs/cgisock +ScriptSock cgisockserver config @@ -89,8 +89,41 @@ the cgi daemon scripts, it is important that no other user has permission to write in the directory where the socket is located.

    +

    If file-path is not an absolute path, the location specified + will be relative to the value of + DefaultRuntimeDir.

    + Example + ScriptSock /var/run/cgid.sock + + + +
    + + + +CGIDScriptTimeout +The length of time to wait for more output from the +CGI program +CGIDScriptTimeout time[s|ms] +value of Timeout directive when +unset +server config +virtual hostdirectory +.htaccess +CGIDScriptTimeout defaults to zero in releases 2.4 and earlier + + + +

    This directive limits the length of time to wait for more output from + the CGI program. If the time is exceeded, the request and CGI are + terminated.

    + + Example + + CGIDScriptTimeout 20 +
    diff --git a/docs/manual/mod/mod_cgid.xml.fr b/docs/manual/mod/mod_cgid.xml.fr new file mode 100644 index 00000000000..f8675bf9fc7 --- /dev/null +++ b/docs/manual/mod/mod_cgid.xml.fr @@ -0,0 +1,139 @@ + + + + + + + + + + + +mod_cgid +Exécution des scripts CGI par l'intermédiaire d'un démon +CGI externe +Base +mod_cgid.c +cgid_module +Uniquement compatible avec les MPMs Unix +threadés + + +

    Exceptées les optimisations et la directive additionnelle + ScriptSock décrite + ci-dessous, mod_cgid a un comportement similaire à + celui de mod_cgi. Voir le résumé de + mod_cgi pour plus de détails à propos d'Apache et + CGI.

    + +

    Sur certains systèmes d'exploitation de type unix, le lancement + (forking) d'un processus depuis un serveur multi-threadé est une + opération très lourde car le nouveau processus va répliquer tous les + threads du processus parent. Pour éviter cette dépense de ressouces + pour chaque invocation d'un programme CGI, mod_cgid + crée un démon externe qui est responsable du branchement de + processus enfants destinés au lancement de scripts CGI. Le serveur + principal communique avec ce démon par l'intermédiaire d'une socket + de domaine unix.

    + +

    Si un MPM multi-threadé a été sélectionné lors du processus de + compilation, c'est ce module qui est utilisé par défaut à la place + de mod_cgi. Du point de vue de l'utilisateur, ce + module est identique à mod_cgi quant à sa + configuration et son utilisation. La seule différence est la + directive additionnelle ScriptSock qui permet de + définir le nom du socket à utiliser pour la communication avec le + démon CGI.

    +
    + +mod_cgi +Exécution de programmes CGI sous des +utilisateurs différents + + +ScriptLog + + + +ScriptLogLength + + + +ScriptLogBuffer + + + +ScriptSock +Le préfixe du nom de fichier du socket à utiliser pour +communiquer avec le démon CGI +ScriptSock chemin fichier +ScriptSock cgisock +server config + + +

    Cette directive permet de définir le préfixe du nom de fichier de la + socket à utiliser pour communiquer avec le démon CGI, préfixe auquel + sera ajouté une extension correspondant à l'identifiant processus du + serveur. La socket sera ouverte avec les permissions de l'utilisateur + qui a démarré Apache (en général root). Afin de préserver la + sécurité des communications avec les scripts CGI, il est impératif + de n'accorder à aucun autre utilisateur la permission d'écrire dans + le répertoire où se trouve la socket.

    + +

    Si chemin fichier n'est pas un chemin absolu, il est + relatif au chemin défini par la directive DefaultRuntimeDir.

    + + Exemple + + ScriptSock /var/run/cgid.sock + + + +
    +
    + + +CGIDScriptTimeout +Durée maximale d'attente de la prochaine sortie du +programme CGI +CGIDScriptTimeout time[s|ms] +Valeur de la directive Timeout +server config +virtual hostdirectory +.htaccess +La valeur de CGIDScriptTimeout est 0 dans les versions +2.4 et antérieures + + + +

    Cette directive permet de limiter la durée d'attente avant les prochaines données + reçues en sortie du programme CGI. Si ce temps est dépassé, la requête et le + programme CGI se terminent.

    + + Exemple + + CGIDScriptTimeout 20 + + + +
    +
    + +
    + diff --git a/docs/manual/mod/mod_cgid.xml.ja b/docs/manual/mod/mod_cgid.xml.ja index c279a69bd4e..18f4a85839e 100644 --- a/docs/manual/mod/mod_cgid.xml.ja +++ b/docs/manual/mod/mod_cgid.xml.ja @@ -1,7 +1,7 @@ - + + -mod_charset_lite - Apache HTTP Server +mod_charset_lite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_charset_lite

    Available Languages:  en  | + fr  |  ko 

    @@ -45,16 +51,18 @@ mechanisms implemented by Russian Apache and its associated mod_charset.

    -

    Directives

    + +

    Bugfix checklist

    See also

    +
    top

    Common Problems

    @@ -111,14 +119,11 @@ APR. Generally, this means that it must be supported by iconv.

    -

    Example

    - <Directory /export/home/trawick/apacheinst/htdocs/convert>
    - - CharsetSourceEnc UTF-16BE
    - CharsetDefault ISO-8859-1
    -
    - </Directory> -

    +

    Example

    <Directory "/export/home/trawick/apacheinst/htdocs/convert">
    +    CharsetSourceEnc  UTF-16BE
    +    CharsetDefault    ISO-8859-1
    +</Directory>
    +
    Specifying the same charset for both CharsetSourceEnc @@ -182,14 +187,11 @@ APR. Generally, this means that it must be supported by iconv.

    -

    Example

    - <Directory /export/home/trawick/apacheinst/htdocs/convert>
    - - CharsetSourceEnc UTF-16BE
    - CharsetDefault ISO-8859-1
    -
    - </Directory> -

    +

    Example

    <Directory "/export/home/trawick/apacheinst/htdocs/convert">
    +    CharsetSourceEnc  UTF-16BE
    +    CharsetDefault    ISO-8859-1
    +</Directory>
    +

    The character set names in this example work with the iconv translation support in Solaris 8.

    @@ -205,8 +207,30 @@

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_charset_lite.html.fr b/docs/manual/mod/mod_charset_lite.html.fr new file mode 100644 index 00000000000..d12c219cc4e --- /dev/null +++ b/docs/manual/mod/mod_charset_lite.html.fr @@ -0,0 +1,252 @@ + + + + + +mod_charset_lite - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_charset_lite

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:Specify character set translation or recoding
    + + +
    Description:Spcifie dans quel jeu de caractre doivent s'effectuer les +traductions ou les rencodages
    Statut:Extension
    IdentificateurdeModule:charset_lite_module
    FichierSource:mod_charset_lite.c
    +

    Sommaire

    + +

    Le module mod_charset_lite permet au serveur de + modifier le jeu de caractres des rponses avant de les envoyer aux + clients. Dans un environnement EBCDIC, Apache traduit toujours les + contenus au protocole HTTP (par exemples les en-ttes de rponses) + de la page de code de la locale du processus Apache vers ISO-8859-1, + mais pas le corps des rponses. Dans tous les environnements, on + peut utiliser mod_charset_lite pour spcifier que + les corps des rponses doivent tre traduits. Par exemple, si les + fichiers sont stocks sous forme EBCDIC, + mod_charset_lite pourra les traduire en ISO-8859-1 + avant de les envoyer au client.

    + +

    Ce module fournit quelques procds de configuration implments + par Apache version russe, ainsi que son module + mod_charset associ.

    +
    + +
    top
    +
    +

    Problmes courants

    + +

    Noms de jeux de caractres non valides

    + +

    Les noms des jeux de caractres passs en paramtres aux + directives CharsetSourceEnc et + CharsetDefault + doivent tre reconnus par le mcanisme de traduction utilis par + APR sur le systme o + mod_charset_lite est utilis. Ces noms de jeux de + caractres ne sont pas standardiss, et sont en gnral diffrents + des valeurs qui leur correspondent dans les en-ttes HTTP. + Actuellement, APR ne peut utiliser que iconv(3) ; vous pouvez donc + tester facilement vos noms de jeux de caractres en utilisant le + programme iconv(1), de la manire suivante :

    + +

    + iconv -f valeur-charsetsourceenc -t valeur-charsetdefault +

    + + +

    Incompatibilit entre le jeu de caractres du + contenu et les rgles de traduction

    + +

    Si les rgles de traduction ne peuvent s'appliquer au contenu, + la traduction peut chouer avec des consquences diverses, comme + :

    + +
      +
    • Le mcanisme de traduction peut renvoyer un mauvais code de + retour, et la connexion sera interrompue.
    • + +
    • Le mcanisme de traduction peut insrer silencieusement des + caractres spciaux (par exemple des points d'interrogation) dans + le tampon de sortie lorsqu'il n'est pas en mesure de traduire le + tampon d'entre.
    • +
    + +
    +
    top
    +

    Directive CharsetDefault

    + + + + + + + +
    Description:Jeu de caractre vers lequel la traduction doit +s'effectuer
    Syntaxe:CharsetDefault jeu de caractres
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_charset_lite
    +

    La directive CharsetDefault permet de + spcifier le jeu de caractres vers lequel le contenu situ dans le + conteneur associ devra tre traduit.

    + +

    La valeur de l'argument jeu de caractres doit tre + un nom de jeu de caractres valide du point de vue du support des + jeux de caractres dans APR. En gnral, cela + implique qu'elle doit tre reconnue par iconv.

    + +

    Exemple

    <Directory "/export/home/trawick/apacheinst/htdocs/convert">
    +    CharsetSourceEnc  UTF-16BE
    +    CharsetDefault    ISO-8859-1
    +</Directory>
    +
    + +
    + Spcifier le mme jeu de caractres pour les deux directives + CharsetSourceEnc + et CharsetDefault + dsactive la traduction. Le jeu de caractres ne doit pas forcment + correspondre au jeu de caractres de la rponse, mais il doit tre + valide du point de vue du systme. +
    + +
    +
    top
    +

    Directive CharsetOptions

    + + + + + + + + +
    Description:Prcise les dtails de la traduction du jeu de +caractres
    Syntaxe:CharsetOptions option [option] ...
    Dfaut:CharsetOptions ImplicitAdd
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_charset_lite
    +

    La directive CharsetOptions permet de + prciser certains dtails du comportement du module + mod_charset_lite. Option accepte les + valeurs suivantes :

    + +
    +
    ImplicitAdd | NoImplicitAdd
    + +
    Le mot-cl ImplicitAdd indique que + mod_charset_lite doit insrer son filtre de + manire implicite lorsque la configuration indique que le jeu de + caractre du contenu doit tre traduit. Si la chane de filtrage + est configure de manire explicite via la directive AddOutputFilter, l'option + NoImplicitAdd doit tre utilise afin que + mod_charset_lite n'ajoute pas son propre + filtre.
    + +
    TranslateAllMimeTypes | NoTranslateAllMimeTypes
    +
    Normalement, mod_charset_lite n'effectuera + une traduction qu'en prsence d'un petit nombre de types MIME + parmi tous les types possibles. Lorsque l'option + TranslateAllMimeTypes est utilise pour une section + de configuration donne, la traduction est effectue sans se + proccuper du type MIME.
    + +
    + +
    +
    top
    +

    Directive CharsetSourceEnc

    + + + + + + + +
    Description:Jeu de caractres source des fichiers
    Syntaxe:CharsetSourceEnc jeu de caractres
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_charset_lite
    +

    La directive CharsetSourceEnc permet de + spcifier un jeu de caractres source pour les fichiers situs dans + le conteneur associ.

    + +

    La valeur de l'argument jeu de caractres doit tre + un nom de jeu de caractres valide du point de vue du support des + jeux de caractres dans APR. En gnral, cela + implique qu'elle doit tre reconnue par iconv.

    + +

    Exemple

    <Directory "/export/home/trawick/apacheinst/htdocs/convert">
    +    CharsetSourceEnc  UTF-16BE
    +    CharsetDefault    ISO-8859-1
    +</Directory>
    +
    + +

    Les noms de jeux de caractres de cet exemple sont reconnus par + le mcanisme de traduction d'iconv sous Solaris 8.

    + +
    + Spcifier le mme jeu de caractres pour les deux directives + CharsetSourceEnc + et CharsetDefault + dsactive la traduction. Le jeu de caractres ne doit pas forcment + correspondre au jeu de caractres de la rponse, mais il doit tre + valide du point de vue du systme. +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_charset_lite.html.ko.euc-kr b/docs/manual/mod/mod_charset_lite.html.ko.euc-kr index a0ae18bbf08..d182d104d12 100644 --- a/docs/manual/mod/mod_charset_lite.html.ko.euc-kr +++ b/docs/manual/mod/mod_charset_lite.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_charset_lite - Apache HTTP Server +mod_charset_lite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_charset_lite

    ֽ ƴմϴ. @@ -51,16 +57,18 @@

    þ ġ mod_charset ϴ Ϻθ Ѵ.

    -
    top

    Ϲ

    @@ -191,8 +199,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_charset_lite.xml b/docs/manual/mod/mod_charset_lite.xml index 0fdcf1bc0c1..bcecf75e0f3 100644 --- a/docs/manual/mod/mod_charset_lite.xml +++ b/docs/manual/mod/mod_charset_lite.xml @@ -102,12 +102,12 @@ supported by iconv.

    Example - <Directory /export/home/trawick/apacheinst/htdocs/convert>
    - - CharsetSourceEnc UTF-16BE
    - CharsetDefault ISO-8859-1
    -
    - </Directory> + +<Directory "/export/home/trawick/apacheinst/htdocs/convert"> + CharsetSourceEnc UTF-16BE + CharsetDefault ISO-8859-1 +</Directory> +

    The character set names in this example work with the iconv @@ -143,12 +143,12 @@ supported by iconv.

    Example - <Directory /export/home/trawick/apacheinst/htdocs/convert>
    - - CharsetSourceEnc UTF-16BE
    - CharsetDefault ISO-8859-1
    -
    - </Directory> + +<Directory "/export/home/trawick/apacheinst/htdocs/convert"> + CharsetSourceEnc UTF-16BE + CharsetDefault ISO-8859-1 +</Directory> +
    diff --git a/docs/manual/mod/mod_charset_lite.xml.fr b/docs/manual/mod/mod_charset_lite.xml.fr new file mode 100644 index 00000000000..e5325e11261 --- /dev/null +++ b/docs/manual/mod/mod_charset_lite.xml.fr @@ -0,0 +1,220 @@ + + + + + + + + + + + +mod_charset_lite +Spécifie dans quel jeu de caractère doivent s'effectuer les +traductions ou les réencodages +Extension +mod_charset_lite.c +charset_lite_module + + +

    Le module mod_charset_lite permet au serveur de + modifier le jeu de caractères des réponses avant de les envoyer aux + clients. Dans un environnement EBCDIC, Apache traduit toujours les + contenus au protocole HTTP (par exemples les en-têtes de réponses) + de la page de code de la locale du processus Apache vers ISO-8859-1, + mais pas le corps des réponses. Dans tous les environnements, on + peut utiliser mod_charset_lite pour spécifier que + les corps des réponses doivent être traduits. Par exemple, si les + fichiers sont stockés sous forme EBCDIC, + mod_charset_lite pourra les traduire en ISO-8859-1 + avant de les envoyer au client.

    + +

    Ce module fournit quelques procédés de configuration implémentés + par Apache version russe, ainsi que son module + mod_charset associé.

    +
    + +
    Problèmes courants + +
    Noms de jeux de caractères non valides + +

    Les noms des jeux de caractères passés en paramètres aux + directives CharsetSourceEnc et + CharsetDefault + doivent être reconnus par le mécanisme de traduction utilisé par + APR sur le système où + mod_charset_lite est utilisé. Ces noms de jeux de + caractères ne sont pas standardisés, et sont en général différents + des valeurs qui leur correspondent dans les en-têtes HTTP. + Actuellement, APR ne peut utiliser que iconv(3) ; vous pouvez donc + tester facilement vos noms de jeux de caractères en utilisant le + programme iconv(1), de la manière suivante :

    + + + iconv -f valeur-charsetsourceenc -t valeur-charsetdefault + +
    + +
    Incompatibilité entre le jeu de caractères du + contenu et les règles de traduction + +

    Si les règles de traduction ne peuvent s'appliquer au contenu, + la traduction peut échouer avec des conséquences diverses, comme + :

    + +
      +
    • Le mécanisme de traduction peut renvoyer un mauvais code de + retour, et la connexion sera interrompue.
    • + +
    • Le mécanisme de traduction peut insérer silencieusement des + caractères spéciaux (par exemple des points d'interrogation) dans + le tampon de sortie lorsqu'il n'est pas en mesure de traduire le + tampon d'entrée.
    • +
    +
    +
    + + +CharsetSourceEnc +Jeu de caractères source des fichiers +CharsetSourceEnc jeu de caractères +server config +virtual hostdirectory +.htaccess + +FileInfo + + +

    La directive CharsetSourceEnc permet de + spécifier un jeu de caractères source pour les fichiers situés dans + le conteneur associé.

    + +

    La valeur de l'argument jeu de caractères doit être + un nom de jeu de caractères valide du point de vue du support des + jeux de caractères dans APR. En général, cela + implique qu'elle doit être reconnue par iconv.

    + + Exemple + +<Directory "/export/home/trawick/apacheinst/htdocs/convert"> + CharsetSourceEnc UTF-16BE + CharsetDefault ISO-8859-1 +</Directory> + + + +

    Les noms de jeux de caractères de cet exemple sont reconnus par + le mécanisme de traduction d'iconv sous Solaris 8.

    + + + Spécifier le même jeu de caractères pour les deux directives + CharsetSourceEnc + et CharsetDefault + désactive la traduction. Le jeu de caractères ne doit pas forcément + correspondre au jeu de caractères de la réponse, mais il doit être + valide du point de vue du système. + +
    +
    + + +CharsetDefault +Jeu de caractère vers lequel la traduction doit +s'effectuer +CharsetDefault jeu de caractères +server config +virtual hostdirectory +.htaccess + +FileInfo + + +

    La directive CharsetDefault permet de + spécifier le jeu de caractères vers lequel le contenu situé dans le + conteneur associé devra être traduit.

    + +

    La valeur de l'argument jeu de caractères doit être + un nom de jeu de caractères valide du point de vue du support des + jeux de caractères dans APR. En général, cela + implique qu'elle doit être reconnue par iconv.

    + + Exemple + +<Directory "/export/home/trawick/apacheinst/htdocs/convert"> + CharsetSourceEnc UTF-16BE + CharsetDefault ISO-8859-1 +</Directory> + + + + + Spécifier le même jeu de caractères pour les deux directives + CharsetSourceEnc + et CharsetDefault + désactive la traduction. Le jeu de caractères ne doit pas forcément + correspondre au jeu de caractères de la réponse, mais il doit être + valide du point de vue du système. + +
    +
    + + +CharsetOptions +Précise les détails de la traduction du jeu de +caractères +CharsetOptions option [option] ... +CharsetOptions ImplicitAdd +server config +virtual hostdirectory +.htaccess + +FileInfo + + +

    La directive CharsetOptions permet de + préciser certains détails du comportement du module + mod_charset_lite. Option accepte les + valeurs suivantes :

    + +
    +
    ImplicitAdd | NoImplicitAdd
    + +
    Le mot-clé ImplicitAdd indique que + mod_charset_lite doit insérer son filtre de + manière implicite lorsque la configuration indique que le jeu de + caractère du contenu doit être traduit. Si la chaîne de filtrage + est configurée de manière explicite via la directive AddOutputFilter, l'option + NoImplicitAdd doit être utilisée afin que + mod_charset_lite n'ajoute pas son propre + filtre.
    + +
    TranslateAllMimeTypes | NoTranslateAllMimeTypes
    +
    Normalement, mod_charset_lite n'effectuera + une traduction qu'en présence d'un petit nombre de types MIME + parmi tous les types possibles. Lorsque l'option + TranslateAllMimeTypes est utilisée pour une section + de configuration donnée, la traduction est effectuée sans se + préoccuper du type MIME.
    + +
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_charset_lite.xml.ko b/docs/manual/mod/mod_charset_lite.xml.ko index 804d1ab10cf..1067f14c764 100644 --- a/docs/manual/mod/mod_charset_lite.xml.ko +++ b/docs/manual/mod/mod_charset_lite.xml.ko @@ -1,7 +1,7 @@ - + -mod_data - Apache HTTP Server +mod_data - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_data

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -55,27 +61,46 @@ or any of the directives supported by the mod_filter module.

    -

    Configuring the filter

    - <Location /data/images>
    - - SetOutputFilter DATA - - </Location>
    -

    +

    Configuring the filter

    <Location "/data/images">
    +    SetOutputFilter DATA
    +</Location>
    +

    Directives

    This module provides no directives.

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_data.html.fr b/docs/manual/mod/mod_data.html.fr new file mode 100644 index 00000000000..56ba7566531 --- /dev/null +++ b/docs/manual/mod/mod_data.html.fr @@ -0,0 +1,105 @@ + + + + + +mod_data - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_data

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Convert response body into an RFC2397 data URL
    Status:Extension
    + + + +
    Description:Convertit un corps de rponse en URL de type donnes RFC2397
    Statut:Extension
    IdentificateurdeModule:data_module
    FichierSource:mod_data.c
    Compatibilit:Disponible depuis la version 2.3 du serveur HTTP Apache
    +

    Sommaire

    + +

    Ce module permet de convertir une rponse en URL de type donnes + RFC2397. +

    + +

    Les URLs de type donnes peuvent tre incluses en ligne dans les + pages web via le module mod_include par exemple, + afin d'viter aux clients d'avoir effectuer des connexions + spares pour ventuellement extraire un grand nombre de petites + images. Les URLs de type donnes peuvent aussi tre incluses dans + des pages gnres par langages de scripting tels que PHP.

    + +

    Un exemple d'URL de type donnes

    + data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw
    + AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz
    + ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp
    + a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl
    + ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis
    + F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH
    + hhx4dbgYKAAA7
    +

    + +

    Le filtre n'accepte aucun paramtre, et peut tre ajout la + pile des filtres via la directive SetOutputFilter, ou toute autre directive + supporte par le module mod_filter.

    + +

    Configuration du filtre

    <Location "/data/images">
    +    SetOutputFilter DATA
    +</Location>
    +
    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_data.xml b/docs/manual/mod/mod_data.xml index 6de297478ec..b4852fba157 100644 --- a/docs/manual/mod/mod_data.xml +++ b/docs/manual/mod/mod_data.xml @@ -56,11 +56,11 @@ module.

    Configuring the filter - <Location /data/images>
    - - SetOutputFilter DATA - - </Location>
    + +<Location "/data/images"> + SetOutputFilter DATA +</Location> +
    diff --git a/docs/manual/mod/mod_data.xml.fr b/docs/manual/mod/mod_data.xml.fr new file mode 100644 index 00000000000..227d42b3359 --- /dev/null +++ b/docs/manual/mod/mod_data.xml.fr @@ -0,0 +1,73 @@ + + + + + + + + + + + +mod_data +Convertit un corps de réponse en URL de type données RFC2397 +Extension +mod_data.c +data_module +Disponible depuis la version 2.3 du serveur HTTP Apache + + +

    Ce module permet de convertir une réponse en URL de type données + RFC2397. +

    + +

    Les URLs de type données peuvent être incluses en ligne dans les + pages web via le module mod_include par exemple, + afin d'éviter aux clients d'avoir à effectuer des connexions + séparées pour éventuellement extraire un grand nombre de petites + images. Les URLs de type données peuvent aussi être incluses dans + des pages générées par langages de scripting tels que PHP.

    + + Un exemple d'URL de type données + data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAw
    + AAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFz
    + ByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSp
    + a/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJl
    + ZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uis
    + F81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PH
    + hhx4dbgYKAAA7
    +
    + +

    Le filtre n'accepte aucun paramètre, et peut être ajouté à la + pile des filtres via la directive SetOutputFilter, ou toute autre directive + supportée par le module mod_filter.

    + + Configuration du filtre + +<Location "/data/images"> + SetOutputFilter DATA +</Location> + + + +
    +Les filtres + +
    diff --git a/docs/manual/mod/mod_data.xml.meta b/docs/manual/mod/mod_data.xml.meta index fe4bf3f5ee1..38248f4066d 100644 --- a/docs/manual/mod/mod_data.xml.meta +++ b/docs/manual/mod/mod_data.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_dav.html b/docs/manual/mod/mod_dav.html index 5cdb02d8baf..02a71d348fe 100644 --- a/docs/manual/mod/mod_dav.html +++ b/docs/manual/mod/mod_dav.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_dav.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_dav.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_dav.html.en b/docs/manual/mod/mod_dav.html.en index 99c604939aa..d347640552f 100644 --- a/docs/manual/mod/mod_dav.html.en +++ b/docs/manual/mod/mod_dav.html.en @@ -1,27 +1,33 @@ - -mod_dav - Apache HTTP Server +mod_dav - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dav

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -38,30 +44,31 @@ copying, and deleting resources and collections on a remote web server.

    -
    top

    Enabling WebDAV

    To enable mod_dav, add the following to a container in your httpd.conf file:

    -

    Dav On

    +
    Dav On
    +

    This enables the DAV file system provider, which is implemented by the mod_dav_fs module. Therefore, that module @@ -73,9 +80,8 @@ file using the DavLockDB directive:

    -

    - DavLockDB /usr/local/apache2/var/DavLock -

    +
    DavLockDB /usr/local/apache2/var/DavLock
    +

    The directory containing the lock database file must be writable by the User @@ -89,29 +95,22 @@ directive. The "normal" LimitRequestBody directive has no effect on DAV requests.

    -

    Full Example

    - DavLockDB /usr/local/apache2/var/DavLock
    -
    - <Directory /usr/local/apache2/htdocs/foo>
    - - Require all granted
    - Dav On
    -
    - AuthType Basic
    - AuthName DAV
    - AuthUserFile user.passwd
    -
    - <LimitExcept GET POST OPTIONS>
    - - Require user admin
    -
    - </LimitExcept>
    -
    - </Directory>
    -

    - -

    mod_dav is a descendent of Greg Stein's mod_dav for Apache 1.3. More - information about the module is available from that site.

    +

    Full Example

    DavLockDB "/usr/local/apache2/var/DavLock"
    +
    +<Directory "/usr/local/apache2/htdocs/foo">
    +    Require all granted
    +    Dav On
    +
    +    AuthType Basic
    +    AuthName DAV
    +    AuthUserFile "user.passwd"
    +
    +    <LimitExcept GET POST OPTIONS>
    +        Require user admin
    +    </LimitExcept>
    +</Directory>
    +
    +
    top

    Security Issues

    @@ -162,16 +161,13 @@ will run the script, and one of which will allow it to be downloaded and manipulated with DAV.

    -

    -Alias /phparea /home/gstein/php_files
    -Alias /php-source /home/gstein/php_files
    -<Location /php-source> - - DAV On
    - ForceType text/plain
    -
    -</Location> -

    +
    Alias "/phparea" "/home/gstein/php_files"
    +Alias "/php-source" "/home/gstein/php_files"
    +<Location "/php-source">
    +    Dav On
    +    ForceType text/plain
    +</Location>
    +

    With this setup, http://example.com/phparea can be used to access the output of the PHP scripts, and @@ -191,13 +187,10 @@ Alias /php-source /home/gstein/php_files

    Use the Dav directive to enable the WebDAV HTTP methods for the given container:

    -

    - <Location /foo>
    - - Dav On
    -
    - </Location> -

    +
    <Location "/foo">
    +    Dav On
    +</Location>
    +

    The value On is actually an alias for the default provider filesystem which is served by the mod_dav_fs module. Note, that once you have DAV enabled @@ -249,21 +242,40 @@ a DAV resource (like 600 seconds) to reduce the chance of the client losing the lock due to network latency.

    -

    Example

    - <Location /MSWord>
    - - DavMinTimeout 600
    -
    - </Location> -

    +

    Example

    <Location "/MSWord">
    +    DavMinTimeout 600
    +</Location>
    +

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav.html.fr b/docs/manual/mod/mod_dav.html.fr new file mode 100644 index 00000000000..a3d471da1d4 --- /dev/null +++ b/docs/manual/mod/mod_dav.html.fr @@ -0,0 +1,302 @@ + + + + + +mod_dav - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dav

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    + + + +
    Description:Fonctionnalit de cration et gestion de versions de +documents via le web (WebDAV)
    Statut:Extension
    IdentificateurdeModule:dav_module
    FichierSource:mod_dav.c
    +

    Sommaire

    + +

    Ce module ajoute Apache une fonctionnalit WebDAV de classes 1 et 2 + ('Web-based Distributed Authoring and Versioning' ou Cration et + gestion de versions de documents via le web). Il s'agit d'une + extension du protocole HTTP qui permet de crer, dplacer, copier et + supprimer des ressources ou collections de ressources sur un serveur + web distant.

    +
    + +
    top
    +
    +

    Activation de WebDAV

    +

    Pour activer le module mod_dav, ajoutez la ligne + suivante un conteneur de votre fichier httpd.conf + :

    + +
    Dav On
    + + +

    Ceci active le fournisseur de systme de fichier DAV implment par + le module mod_dav_fs. Ce dernier doit donc tre + compil dans le serveur ou charg au dmarrage l'aide de la + directive LoadModule.

    + +

    En outre, vous devez indiquer o se trouve la base de donnes des + verrous DAV via une directive DavLockDB dans la section globale de + votre fichier httpd.conf :

    + +
    DavLockDB /usr/local/apache2/var/DavLock
    + + +

    Le rpertoire contenant le fichier de la base de donnes des + verrous doit avoir des droits en criture pour l'utilisateur et le + groupe sous lesquels Apache s'excute et dfinis respectivement par + les directives User et + Group.

    + +

    Si vous souhaitez limiter l'accs aux rpertoires o DAV est + activ, vous pouvez ajouter une clause <Limit> dans la section <Location> considre. Pour + dfinir la quantit maximale de donnes en octets qu'un client + DAV peut envoyer par requte, vous devez utiliser la directive + LimitXMLRequestBody, car La + directive LimitRequestBody + "habituelle" n'a aucune incidence sur les requtes DAV.

    + +

    Exemple complet

    DavLockDB "/usr/local/apache2/var/DavLock"
    +
    +<Directory "/usr/local/apache2/htdocs/foo">
    +    Require all granted
    +    Dav On
    +
    +    AuthType Basic
    +    AuthName DAV
    +    AuthUserFile "user.passwd"
    +
    +    <LimitExcept GET POST OPTIONS>
    +        Require user admin
    +    </LimitExcept>
    +</Directory>
    +
    + +
    top
    +
    +

    Problmes concernant la scurit

    + +

    Etant donn que les mthodes d'accs DAV permettent des clients + distants de manipuler des fichiers sur le serveur, vous devez vous + assurer que votre serveur est bien scuris avant d'activer + mod_dav.

    + +

    Tout rpertoire du serveur o DAV est activ doit tre protg + par une procdure d'authentification. L'utilisation de + l'authentification HTTP de base n'est pas recommande. Vous devez + utiliser au moins l'authentification HTTP base de condenss + qu'implmente le module mod_auth_digest. + Pratiquement tous les clients WebDAV supportent cette mthode + d'authentification. Vous pouvez aussi utiliser l'authentification de + base sur une connexion o SSL est activ.

    + +

    Pour que mod_dav puisse manipuler des fichiers, + il doit avoir des permissions en criture sur les rpertoires et les + fichiers qui sont sous son contrle ; en d'autre termes, c'est + l'utilisateur et le groupe sous lesquels Apache s'excute et dfinis + par les directives User et + Group qui doivent avoir + les droits en criture sur ces fichiers et rpertoires. Les fichiers + nouvellement crs appartiendront aussi ces utilisateur et groupe. + Par consquent, il est important de contrler l'accs ce compte. + Les rpertoires DAV sont considrs comme privs du point de vue + d'Apache, et la modification des fichiers qu'ils contiennent + autrement que par l'intermdiaire d'Apache (par exemple par FTP ou + par des outils du niveau du systme de fichiers) ne doit pas tre + permise.

    + +

    mod_dav peut faire l'objet de plusieurs sortes + d'attaques par dni de service. La directive LimitXMLRequestBody permet de limiter la + quantit de mmoire consomme pour interprter des requtes DAV de + grande taille. En outre, la directive DavDepthInfinity permet d'empcher les + requtes PROPFIND concernant un rpertoire de trs + grande taille de consommer de grandes quantits de mmoire. Un autre + type d'attaque par dni de service peut aussi tre men par un + client qui remplit simplement tout l'espace disque disponible avec + des fichiers de trs grande taille. Etant donn qu'il n'existe aucun + moyen direct d'viter ce genre d'attaque dans Apache, vous ne devez + accorder des accs DAV qu' des utilisateurs de confiance.

    +
    top
    +
    +

    Configurations complexes

    + +

    Les requtes ayant pour but de manipuler des fichiers dynamiques + (scripts PHP, scripts CGI, etc...) en utilisant + mod_dav sont courantes. Ce traitement n'est pas + vident car une requte + GET va toujours tenter d'excuter le script, plutt que + de tlcharger son contenu. Pour viter cet inconvnient, une + mthode possible consiste faire correspondre deux URLs + diffrentes au mme contenu, l'une d'entre elles servant lancer le + script, alors que l'autre peut tre utilise pour le tlcharger et + le manipuler avec DAV.

    + +
    Alias "/phparea" "/home/gstein/php_files"
    +Alias "/php-source" "/home/gstein/php_files"
    +<Location "/php-source">
    +Dav On
    +ForceType text/plain
    +</Location>
    + + +

    Avec cette configuration, on peut utiliser + http://example.com/phparea pour afficher le rsultat de + l'excution des scripts PHP, et + http://example.com/php-source pour les manipuler avec + DAV.

    +
    +
    top
    +

    Directive Dav

    + + + + + + + +
    Description:Active les mthodes HTTP WebDAV
    Syntaxe:Dav On|Off|nom fournisseur
    Dfaut:Dav Off
    Contexte:rpertoire
    Statut:Extension
    Module:mod_dav
    +

    La directive Dav permet d'activer les + mthodes HTTP WebDAV pour le conteneur condidr :

    + +
    <Location "/foo">
    +    Dav On
    +</Location>
    + + +

    La valeur On est en fait un alias vers le + fournisseur par dfaut filesystem implment par le + module mod_dav_fs. Notez que lorsque DAV est activ + pour un conteneur, on ne peut pas le dsactiver pour ses + sous-conteneurs. Pour un exemple de configuration complet, + reportez-vous la section prcdente.

    + +
    + N'activez pas WebDAV tant que votre serveur n'est pas scuris. Si + vous passez outre cette recommandation, tout le monde pourra + enregistrer des fichiers sur votre systme. +
    + +
    +
    top
    +

    Directive DavDepthInfinity

    + + + + + + + +
    Description:Autorise les requtes PROPFIND avec en-tte Depth: +Infinity
    Syntaxe:DavDepthInfinity on|off
    Dfaut:DavDepthInfinity off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_dav
    +

    La directive DavDepthInfinity permet + d'autoriser le traitement des requtes PROPFIND + contenant l'en-tte Depth: Infinity. Par dfaut, ce type de requte + n'est pas autoris, car il peut favoriser les attaques de type Dni + de service.

    + +
    +
    top
    +

    Directive DavMinTimeout

    + + + + + + + +
    Description:Dure minimale pendant laquelle le serveur maintient un +verrou sur une ressource DAV
    Syntaxe:DavMinTimeout secondes
    Dfaut:DavMinTimeout 0
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_dav
    +

    Lorsqu'un client demande le verrouillage d'une ressource DAV, il + peut aussi spcifier une dure au bout de laquelle le verrou sera + automatiquement supprim par le serveur. Cette valeur ne constitue + qu'une demande, et le serveur peut l'ignorer ou informer le client + qu'il va utiliser une valeur arbitraire.

    + +

    La directive DavMinTimeout permet de + spcifier, en secondes, la dure minimale de verrouillage renvoyer + au client. Les Rpertoires Web de Microsoft prsentent une dure par + dfaut de 120 secondes ; la directive + DavMinTimeout permet de dfinir une valeur + suprieure (par exemple 600 secondes), afin de rduire les risques + de perte du verrou par le client suite une surcharge du + rseau.

    + +

    Exemple

    <Location "/MSWord">
    +    DavMinTimeout 600
    +</Location>
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dav.html.ja.utf8 b/docs/manual/mod/mod_dav.html.ja.utf8 index d7de363d9e9..e50137cdb16 100644 --- a/docs/manual/mod/mod_dav.html.ja.utf8 +++ b/docs/manual/mod/mod_dav.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_dav - Apache HTTP サーバ +mod_dav - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_dav

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -43,30 +50,31 @@ リソースやコレクションを 作成、移動、複製、削除できるようになります。

    -
    top

    Enabling WebDAV

    mod_dav を有効にするには、httpd.conf ファイル中のコンテナに次を加えます:

    -

    Dav On

    +
    Dav On
    +

    これは DAV ファイルシステムプロバイダを有効にします。DAV ファイルシステムプロバイダは mod_dav_fs @@ -80,12 +88,11 @@ httd.conf ファイルのグローバルセクションに指定されている 必要があります。

    -

    - DavLockDB /usr/local/apache2/var/DavLock -

    +
    DavLockDB /usr/local/apache2/var/DavLock
    +

    ロックデータベースファイルのあるディレクトリは Apache が実行されている - UserGroup に書き込み権限がある必要があります。

    + UserGroup に書き込み権限がある必要があります。

    <Limit> 節を <Location> @@ -97,30 +104,22 @@ LimitRequestBody ディレクティブは DAV リクエストに対しては効力を持ちません。

    -

    完全な例

    - DavLockDB /usr/local/apache2/var/DavLock
    -
    - <Directory /usr/local/apache2/htdocs/foo>
    - - Order Allow,Deny
    - Allow from all
    - Dav On
    -
    - AuthType Basic
    - AuthName DAV
    - AuthUserFile user.passwd
    -
    - <LimitExcept GET POST OPTIONS>
    - - Require user admin
    -
    - </LimitExcept>
    -
    - </Directory>
    -

    +

    完全な例

    DavLockDB /usr/local/apache2/var/DavLock
    +
    +<Directory /usr/local/apache2/htdocs/foo>
    +    Require all granted
    +    Dav On
    +
    +    AuthType Basic
    +    AuthName DAV
    +    AuthUserFile user.passwd
    +
    +    <LimitExcept GET POST OPTIONS>
    +        Require user admin
    +    </LimitExcept>
    +</Directory>
    +
    -

    mod_dav は Greg Stein さんの Apache 1.3 用の mod_dav に - 由来するものです。そのサイトからより多くの情報を手に入れることができます。

    top

    セキュリティの問題

    @@ -137,9 +136,9 @@ 有効なコネクションを通した基本認証を使うこともできます。

    mod_dav がファイルを操作できるようにするためには、 - 管理下のディレクトリとファイルとに Apache が実行されている UserGroup で書き込み可能である必要があります。 - 新しく作成されるファイルもこの User - と Group に所有される + 管理下のディレクトリとファイルとに Apache が実行されている UserGroup で書き込み可能である必要があります。 + 新しく作成されるファイルもこの User + と Group に所有される ことになります。この理由から、そのアカウントへのアクセスを制御することは 重要です。DAV リポジトリは Apache 専用のものだとみなされています。 Apache 以外の方法でファイルを修正すること (例えば FTP やファイルシステム @@ -166,16 +165,13 @@ 一つはスクリプトを実行させ、もう一つはダウンロードさせたり、DAV から 操作されたりするように設定するというものがあります。

    -

    -Alias /phparea /home/gstein/php_files
    -Alias /php-source /home/gstein/php_files
    +

    Alias /phparea /home/gstein/php_files
    +Alias /php-source /home/gstein/php_files
     <Location /php-source>
    -
    -    DAV On
    - ForceType text/plain
    -
    -</Location> -

    + Dav On + ForceType text/plain +</Location> +

    この設定により、http://example.com/phparea を PHP スクリプトの 出力をアクセスするために使うことができ、 @@ -195,13 +191,10 @@ Alias /php-source /home/gstein/php_files

    与えられたコンテナで WebDAV HTTP メソッドが使えるようにするには 次のようにします。

    -

    - <Location /foo>
    - - Dav On
    -
    - </Location> -

    +
    <Location /foo>
    +    Dav On
    +</Location>
    +

    On という指定は実際には mod_dav_fs で提供されているデフォルトのプロバイダ、filesystem @@ -259,21 +252,40 @@ Alias /php-source /home/gstein/php_files
    DavMinTimeout を使って これをもっと大きな値 (例えば 600 秒) に上書きできます。

    -

    - <Location /MSWord>
    - - DavMinTimeout 600
    -
    - </Location> -

    +

    <Location /MSWord>
    +    DavMinTimeout 600
    +</Location>
    +
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav.html.ko.euc-kr b/docs/manual/mod/mod_dav.html.ko.euc-kr index 9c70db7ed70..3f8fda47e16 100644 --- a/docs/manual/mod/mod_dav.html.ko.euc-kr +++ b/docs/manual/mod/mod_dav.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_dav - Apache HTTP Server +mod_dav - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_dav

    @@ -41,23 +47,23 @@ ̴) , ű, ϰ, ֵ HTTP Ȯ ̴.

    -
    top

    WebDAV ϱ

    @@ -257,9 +263,31 @@ Alias /php-source /home/gstein/php_files
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav.xml b/docs/manual/mod/mod_dav.xml index ee56ec6b183..c4eb0bb4dae 100644 --- a/docs/manual/mod/mod_dav.xml +++ b/docs/manual/mod/mod_dav.xml @@ -45,7 +45,7 @@

    To enable mod_dav, add the following to a container in your httpd.conf file:

    - Dav On + Dav On

    This enables the DAV file system provider, which is implemented by the mod_dav_fs module. Therefore, that module @@ -57,9 +57,9 @@ file using the DavLockDB directive:

    - + DavLockDB /usr/local/apache2/var/DavLock - +

    The directory containing the lock database file must be writable by the User @@ -77,29 +77,24 @@ requests.

    Full Example - DavLockDB /usr/local/apache2/var/DavLock
    -
    - <Directory /usr/local/apache2/htdocs/foo>
    - - Require all granted
    - Dav On
    -
    - AuthType Basic
    - AuthName DAV
    - AuthUserFile user.passwd
    -
    - <LimitExcept GET POST OPTIONS>
    - - Require user admin
    -
    - </LimitExcept>
    -
    - </Directory>
    + +DavLockDB "/usr/local/apache2/var/DavLock" + +<Directory "/usr/local/apache2/htdocs/foo"> + Require all granted + Dav On + + AuthType Basic + AuthName DAV + AuthUserFile "user.passwd" + + <LimitExcept GET POST OPTIONS> + Require user admin + </LimitExcept> +</Directory> +
    -

    mod_dav is a descendent of Greg Stein's mod_dav for Apache 1.3. More - information about the module is available from that site.

    Security Issues @@ -153,16 +148,14 @@ will run the script, and one of which will allow it to be downloaded and manipulated with DAV.

    - -Alias /phparea /home/gstein/php_files
    -Alias /php-source /home/gstein/php_files
    -<Location /php-source> - - DAV On
    - ForceType text/plain
    -
    + +Alias "/phparea" "/home/gstein/php_files" +Alias "/php-source" "/home/gstein/php_files" +<Location "/php-source"> + Dav On + ForceType text/plain </Location> -
    +

    With this setup, http://example.com/phparea can be used to access the output of the PHP scripts, and @@ -181,13 +174,11 @@ Alias /php-source /home/gstein/php_files

    Use the Dav directive to enable the WebDAV HTTP methods for the given container:

    - - <Location /foo>
    - - Dav On
    -
    - </Location> -
    + +<Location "/foo"> + Dav On +</Location> +

    The value On is actually an alias for the default provider filesystem which is served by the the lock due to network latency.

    Example - <Location /MSWord>
    - - DavMinTimeout 600
    -
    - </Location> + +<Location "/MSWord"> + DavMinTimeout 600 +</Location> +
    diff --git a/docs/manual/mod/mod_dav.xml.fr b/docs/manual/mod/mod_dav.xml.fr new file mode 100644 index 00000000000..e02df3c9d1b --- /dev/null +++ b/docs/manual/mod/mod_dav.xml.fr @@ -0,0 +1,268 @@ + + + + + + + + + + + +mod_dav +Fonctionnalité de création et gestion de versions de +documents via le web (WebDAV) +Extension +mod_dav.c +dav_module + + +

    Ce module ajoute à Apache une fonctionnalité WebDAV de classes 1 et 2 + ('Web-based Distributed Authoring and Versioning' ou Création et + gestion de versions de documents via le web). Il s'agit d'une + extension du protocole HTTP qui permet de créer, déplacer, copier et + supprimer des ressources ou collections de ressources sur un serveur + web distant.

    +
    +DavLockDB +LimitXMLRequestBody +Ressources WebDAV + +
    Activation de WebDAV +

    Pour activer le module mod_dav, ajoutez la ligne + suivante à un conteneur de votre fichier httpd.conf + :

    + + Dav On + +

    Ceci active le fournisseur de système de fichier DAV implémenté par + le module mod_dav_fs. Ce dernier doit donc être + compilé dans le serveur ou chargé au démarrage à l'aide de la + directive LoadModule.

    + +

    En outre, vous devez indiquer où se trouve la base de données des + verrous DAV via une directive DavLockDB dans la section globale de + votre fichier httpd.conf :

    + + + DavLockDB /usr/local/apache2/var/DavLock + + +

    Le répertoire contenant le fichier de la base de données des + verrous doit avoir des droits en écriture pour l'utilisateur et le + groupe sous lesquels Apache s'exécute et définis respectivement par + les directives User et + Group.

    + +

    Si vous souhaitez limiter l'accès aux répertoires où DAV est + activé, vous pouvez ajouter une clause Limit dans la section Location considérée. Pour + définir la quantité maximale de données en octets qu'un client + DAV peut envoyer par requête, vous devez utiliser la directive + LimitXMLRequestBody, car La + directive LimitRequestBody + "habituelle" n'a aucune incidence sur les requêtes DAV.

    + + Exemple complet + +DavLockDB "/usr/local/apache2/var/DavLock" + +<Directory "/usr/local/apache2/htdocs/foo"> + Require all granted + Dav On + + AuthType Basic + AuthName DAV + AuthUserFile "user.passwd" + + <LimitExcept GET POST OPTIONS> + Require user admin + </LimitExcept> +</Directory> + + + +
    + +
    Problèmes concernant la sécurité + +

    Etant donné que les méthodes d'accès DAV permettent à des clients + distants de manipuler des fichiers sur le serveur, vous devez vous + assurer que votre serveur est bien sécurisé avant d'activer + mod_dav.

    + +

    Tout répertoire du serveur où DAV est activé doit être protégé + par une procédure d'authentification. L'utilisation de + l'authentification HTTP de base n'est pas recommandée. Vous devez + utiliser au moins l'authentification HTTP à base de condensés + qu'implémente le module mod_auth_digest. + Pratiquement tous les clients WebDAV supportent cette méthode + d'authentification. Vous pouvez aussi utiliser l'authentification de + base sur une connexion où SSL est activé.

    + +

    Pour que mod_dav puisse manipuler des fichiers, + il doit avoir des permissions en écriture sur les répertoires et les + fichiers qui sont sous son contrôle ; en d'autre termes, c'est + l'utilisateur et le groupe sous lesquels Apache s'exécute et définis + par les directives User et + Group qui doivent avoir + les droits en écriture sur ces fichiers et répertoires. Les fichiers + nouvellement créés appartiendront aussi à ces utilisateur et groupe. + Par conséquent, il est important de contrôler l'accès à ce compte. + Les répertoires DAV sont considérés comme privés du point de vue + d'Apache, et la modification des fichiers qu'ils contiennent + autrement que par l'intermédiaire d'Apache (par exemple par FTP ou + par des outils du niveau du système de fichiers) ne doit pas être + permise.

    + +

    mod_dav peut faire l'objet de plusieurs sortes + d'attaques par déni de service. La directive LimitXMLRequestBody permet de limiter la + quantité de mémoire consommée pour interpréter des requêtes DAV de + grande taille. En outre, la directive DavDepthInfinity permet d'empêcher les + requêtes PROPFIND concernant un répertoire de très + grande taille de consommer de grandes quantités de mémoire. Un autre + type d'attaque par déni de service peut aussi être mené par un + client qui remplit simplement tout l'espace disque disponible avec + des fichiers de très grande taille. Etant donné qu'il n'existe aucun + moyen direct d'éviter ce genre d'attaque dans Apache, vous ne devez + accorder des accès DAV qu'à des utilisateurs de confiance.

    +
    + +
    Configurations complexes + +

    Les requêtes ayant pour but de manipuler des fichiers dynamiques + (scripts PHP, scripts CGI, etc...) en utilisant + mod_dav sont courantes. Ce traitement n'est pas + évident car une requête + GET va toujours tenter d'exécuter le script, plutôt que + de télécharger son contenu. Pour éviter cet inconvénient, une + méthode possible consiste à faire correspondre deux URLs + différentes au même contenu, l'une d'entre elles servant à lancer le + script, alors que l'autre peut être utilisée pour le télécharger et + le manipuler avec DAV.

    + + +Alias "/phparea" "/home/gstein/php_files" +Alias "/php-source" "/home/gstein/php_files" +<Location "/php-source"> +Dav On +ForceType text/plain +</Location> + + +

    Avec cette configuration, on peut utiliser + http://example.com/phparea pour afficher le résultat de + l'exécution des scripts PHP, et + http://example.com/php-source pour les manipuler avec + DAV.

    +
    + + +Dav +Active les méthodes HTTP WebDAV +Dav On|Off|nom fournisseur +Dav Off +directory + + +

    La directive Dav permet d'activer les + méthodes HTTP WebDAV pour le conteneur condidéré :

    + + +<Location "/foo"> + Dav On +</Location> + + +

    La valeur On est en fait un alias vers le + fournisseur par défaut filesystem implémenté par le + module mod_dav_fs. Notez que lorsque DAV est activé + pour un conteneur, on ne peut pas le désactiver pour ses + sous-conteneurs. Pour un exemple de configuration complet, + reportez-vous à la section précédente.

    + + + N'activez pas WebDAV tant que votre serveur n'est pas sécurisé. Si + vous passez outre cette recommandation, tout le monde pourra + enregistrer des fichiers sur votre système. + +
    +
    + + +DavMinTimeout +Durée minimale pendant laquelle le serveur maintient un +verrou sur une ressource DAV +DavMinTimeout secondes +DavMinTimeout 0 +server configvirtual host +directory + + +

    Lorsqu'un client demande le verrouillage d'une ressource DAV, il + peut aussi spécifier une durée au bout de laquelle le verrou sera + automatiquement supprimé par le serveur. Cette valeur ne constitue + qu'une demande, et le serveur peut l'ignorer ou informer le client + qu'il va utiliser une valeur arbitraire.

    + +

    La directive DavMinTimeout permet de + spécifier, en secondes, la durée minimale de verrouillage à renvoyer + au client. Les Répertoires Web de Microsoft présentent une durée par + défaut de 120 secondes ; la directive + DavMinTimeout permet de définir une valeur + supérieure (par exemple 600 secondes), afin de réduire les risques + de perte du verrou par le client suite à une surcharge du + réseau.

    + + Exemple + +<Location "/MSWord"> + DavMinTimeout 600 +</Location> + + +
    +
    + + +DavDepthInfinity +Autorise les requêtes PROPFIND avec en-tête Depth: +Infinity +DavDepthInfinity on|off +DavDepthInfinity off +server configvirtual host +directory + + +

    La directive DavDepthInfinity permet + d'autoriser le traitement des requêtes PROPFIND + contenant l'en-tête Depth: Infinity. Par défaut, ce type de requête + n'est pas autorisé, car il peut favoriser les attaques de type Déni + de service.

    +
    +
    + +
    + + diff --git a/docs/manual/mod/mod_dav.xml.ja b/docs/manual/mod/mod_dav.xml.ja index 9d0b746c378..f24ae0f1ece 100644 --- a/docs/manual/mod/mod_dav.xml.ja +++ b/docs/manual/mod/mod_dav.xml.ja @@ -1,7 +1,7 @@ - + + -mod_dav_fs - Apache HTTP Server +mod_dav_fs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dav_fs

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    説明:分散オーサリングとバージョン管理 (WebDAV) 機能
    ステータス:Extension
    +
    Description:filesystem provider for mod_dav
    Description:Filesystem provider for mod_dav
    Status:Extension
    ModuleIdentifier:dav_fs_module
    SourceFile:mod_dav_fs.c
    @@ -37,9 +43,8 @@ will be invoked by using the Dav directive:

    -

    Example

    - Dav filesystem -

    +

    Example

    Dav filesystem
    +

    Since filesystem is the default provider for mod_dav, you may simply use the value @@ -49,10 +54,10 @@

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    DavLockDB Directive

    @@ -71,9 +76,8 @@ -

    Example

    - DavLockDB var/DavLock -

    +

    Example

    DavLockDB "var/DavLock"
    +

    The directory containing the lock database file must be writable by the User @@ -89,9 +93,31 @@

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_fs.html.fr b/docs/manual/mod/mod_dav_fs.html.fr new file mode 100644 index 00000000000..e98a9ef8cbc --- /dev/null +++ b/docs/manual/mod/mod_dav_fs.html.fr @@ -0,0 +1,129 @@ + + + + + +mod_dav_fs - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dav_fs

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    + + + +
    Description:Implmente le fournisseur filesystem pour +mod_dav
    Statut:Extension
    IdentificateurdeModule:dav_fs_module
    FichierSource:mod_dav_fs.c
    +

    Sommaire

    + +

    L'activation de ce module ncessite l'utilisation de + mod_dav. C'est un module de support pour mod_dav et ce titre, il permet l'accs des ressources + situes dans le systme de fichiers du serveur. Le nom formel de ce + fournisseur est filesystem. Les fournisseurs supports + de mod_dav sont invoqus via la directive + Dav :

    + +

    Exemple

    Dav filesystem
    +
    + +

    Comme filesystem est le fournisseur par dfaut de + mod_dav, vous pouvez vous contenter d'utiliser la + valeur On comme argument de Dav.

    +
    + + +
    top
    +

    Directive DavLockDB

    + + + + + + +
    Description:Chemin de la base de donnes des verrous DAV
    Syntaxe:DavLockDB chemin fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dav_fs
    +

    La directive DavLockDB permet de spcifier + le chemin complet de la base de donnes des verrous, sans extension. + Si le chemin n'est pas absolu, il sera considr comme relatif au + rpertoire dfini par la directive ServerRoot. L'implmentation de + mod_dav_fs utilise une base de donnes SDBM pour + surveiller les verrous utilisateurs.

    + + + +

    Exemple

    DavLockDB "var/DavLock"
    +
    + +

    Les utilisateur et groupe sous lesquels Apache s'excute et qui + sont respectivement dfinis par les directives User et Group doivent pouvoir crire dans le + rpertoire qui contient le fichier de la base de donnes des + verrous. Pour des raisons de scurit, il est recommand de crer un + rpertoire ddi la base de donnes des verrous, plutt que de + modifier les permissions d'un rpertoire existant. Dans l'exemple + ci-dessus, Apache va crer des fichiers dans le rpertoire + var/, lui-mme sous-rpertoire du rpertoire dfini par + la directive ServerRoot, avec le nom de base + DavLock suivi d'une extension choisie par le + serveur.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_fs.html.ja.utf8 b/docs/manual/mod/mod_dav_fs.html.ja.utf8 index 8cf9cf80fdd..3f323a8aded 100644 --- a/docs/manual/mod/mod_dav_fs.html.ja.utf8 +++ b/docs/manual/mod/mod_dav_fs.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_dav_fs - Apache HTTP サーバ +mod_dav_fs - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_dav_fs

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -54,10 +61,10 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    DavLockDB ディレクティブ

    @@ -83,10 +90,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_fs.html.ko.euc-kr b/docs/manual/mod/mod_dav_fs.html.ko.euc-kr index 9b618ed5036..f32b9eb0e52 100644 --- a/docs/manual/mod/mod_dav_fs.html.ko.euc-kr +++ b/docs/manual/mod/mod_dav_fs.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_dav_fs - Apache HTTP Server +mod_dav_fs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_dav_fs

    @@ -50,10 +56,10 @@ -

    +

    Bugfix checklist

    +
  • Comments
  • top

    DavLockDB þ

    @@ -90,9 +96,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_fs.xml b/docs/manual/mod/mod_dav_fs.xml index 84d10184d20..224bdd05c53 100644 --- a/docs/manual/mod/mod_dav_fs.xml +++ b/docs/manual/mod/mod_dav_fs.xml @@ -23,7 +23,7 @@ mod_dav_fs -filesystem provider for mod_dav +Filesystem provider for mod_dav Extension mod_dav_fs.c dav_fs_module @@ -38,7 +38,9 @@ directive:

    Example + Dav filesystem +

    Since filesystem is the default provider for @@ -67,7 +69,9 @@ the server to display all locks in a lock database.

    --> Example - DavLockDB var/DavLock + + DavLockDB "var/DavLock" +

    The directory containing the lock database file must be diff --git a/docs/manual/mod/mod_dav_fs.xml.fr b/docs/manual/mod/mod_dav_fs.xml.fr new file mode 100644 index 00000000000..2a3ff9dc377 --- /dev/null +++ b/docs/manual/mod/mod_dav_fs.xml.fr @@ -0,0 +1,101 @@ + + + + + + + + + + + +mod_dav_fs +Implémente le fournisseur filesystem pour +mod_dav +Extension +mod_dav_fs.c +dav_fs_module + +

    +

    L'activation de ce module nécessite l'utilisation de + mod_dav. C'est un module de support pour mod_dav et à ce titre, il permet l'accès à des ressources + situées dans le système de fichiers du serveur. Le nom formel de ce + fournisseur est filesystem. Les fournisseurs supports + de mod_dav sont invoqués via la directive + Dav :

    + + Exemple + + Dav filesystem + + + +

    Comme filesystem est le fournisseur par défaut de + mod_dav, vous pouvez vous contenter d'utiliser la + valeur On comme argument de Dav.

    +
    +mod_dav + + +DavLockDB +Chemin de la base de données des verrous DAV +DavLockDB chemin fichier +server configvirtual +host + + + +

    La directive DavLockDB permet de spécifier + le chemin complet de la base de données des verrous, sans extension. + Si le chemin n'est pas absolu, il sera considéré comme relatif au + répertoire défini par la directive ServerRoot. L'implémentation de + mod_dav_fs utilise une base de données SDBM pour + surveiller les verrous utilisateurs.

    + + + + Exemple + + DavLockDB "var/DavLock" + + + +

    Les utilisateur et groupe sous lesquels Apache s'exécute et qui + sont respectivement définis par les directives User et Group doivent pouvoir écrire dans le + répertoire qui contient le fichier de la base de données des + verrous. Pour des raisons de sécurité, il est recommandé de créer un + répertoire dédié à la base de données des verrous, plutôt que de + modifier les permissions d'un répertoire existant. Dans l'exemple + ci-dessus, Apache va créer des fichiers dans le répertoire + var/, lui-même sous-répertoire du répertoire défini par + la directive ServerRoot, avec le nom de base + DavLock suivi d'une extension choisie par le + serveur.

    + +
    +
    + +
    + diff --git a/docs/manual/mod/mod_dav_fs.xml.ja b/docs/manual/mod/mod_dav_fs.xml.ja index 7e3f1f343d5..e0b4ebf6ea0 100644 --- a/docs/manual/mod/mod_dav_fs.xml.ja +++ b/docs/manual/mod/mod_dav_fs.xml.ja @@ -1,7 +1,7 @@ - + + -mod_dav_lock - Apache HTTP Server +mod_dav_lock - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dav_lock

    Available Languages:  en  | + fr  |  ja 

    -
    説明:mod_dav のためのファイルシステムプロバイダ
    ステータス:Extension
    モジュール識別子:dav_fs_module
    +
    Description:generic locking module for mod_dav
    @@ -36,7 +42,7 @@ the service of mod_dav. But without a backend provider which makes use of it, it's useless and should not be loaded into the server. A sample backend module which actually utilizes - mod_dav_lock is mod_dav_svn, the subversion provider module.

    + mod_dav_lock is mod_dav_svn, the subversion provider module.

    Note that mod_dav_fs does not need this generic locking module, because it uses its own more specialized @@ -56,10 +62,10 @@

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    DavGenericLockDB Directive

    @@ -76,9 +82,8 @@ mod_dav_lock uses a SDBM database to track user locks.

    -

    Example

    - DavGenericLockDB var/DavLock -

    +

    Example

    DavGenericLockDB var/DavLock
    +

    The directory containing the lock database file must be writable by the User @@ -94,8 +99,30 @@

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_lock.html.fr b/docs/manual/mod/mod_dav_lock.html.fr new file mode 100644 index 00000000000..97acff6c380 --- /dev/null +++ b/docs/manual/mod/mod_dav_lock.html.fr @@ -0,0 +1,137 @@ + + + + + +mod_dav_lock - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dav_lock

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    +
    Description:Generic locking module for mod_dav
    Status:Extension
    ModuleIdentifier:dav_lock_module
    SourceFile:mod_dav_lock.c
    + + + +
    Description:Module de verrouillage gnrique pour +mod_dav
    Statut:Extension
    IdentificateurdeModule:dav_lock_module
    FichierSource:mod_dav_lock.c
    Compatibilit:Disponible depuis la version 2.1 d'Apache
    +

    Sommaire

    + +

    ce module implmente une API de verrouillage gnrique que tout + fournisseur support de mod_dav peut utiliser. Son + activation ncessite l'utilisation de mod_dav. Mais + sans fournisseur support pour l'utiliser, il n'est d'aucun service + et ne doit pas tre charg dans le serveur. mod_dav_svn, le module qui + implmente le fournisseur subversion, est un exemple + de module de support qui utilise effectivement + mod_dav_lock.

    + +

    Notez que mod_dav_fs n'a pas besoin de + ce module de verrouillage gnrique, car il utilise sa propre + version plus spcifique.

    + +

    Pour que mod_dav_lock puisse fonctionner, il + vous suffit de spcifier le chemin de la base de donnes des verrous + l'aide de la directive DavGenericLockDB dcrite + ci-dessous.

    + +

    Note du dveloppeur

    +

    Pour dterminer le pointeur de la fonction du fournisseur de + verrouillage, vous devez utiliser l'API + ap_lookup_provider avec les arguments + dav-lock, generic et 0.

    +
    +
    + + +
    top
    +

    Directive DavGenericLockDB

    + + + + + + +
    Description:Chemin de la base de donnes des verrous DAV
    Syntaxe:DavGenericLockDB chemin fichier
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_dav_lock
    +

    La directive DavLockDB permet de spcifier + le chemin complet de la base de donnes des verrous, sans extension. + Si le chemin n'est pas absolu, il sera considr comme relatif au + rpertoire dfini par la directive ServerRoot. L'implmentation de + mod_dav_lock utilise une base de donnes SDBM pour + surveiller les verrous utilisateurs.

    + +

    Exemple

    DavGenericLockDB var/DavLock
    +
    + +

    Les utilisateur et groupe sous lesquels Apache s'excute et qui + sont respectivement dfinis par les directives User et Group doivent pouvoir crire dans le + rpertoire qui contient le fichier de la base de donnes des + verrous. Pour des raisons de scurit, il est recommand de crer un + rpertoire ddi la base de donnes des verrous, plutt que de + modifier les permissions d'un rpertoire existant. Dans l'exemple + ci-dessus, Apache va crer des fichiers dans le rpertoire + var/, lui-mme sous-rpertoire du rpertoire dfini par + la directive ServerRoot, avec le nom de base + DavLock suivi d'une extension choisie par le + serveur.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_lock.html.ja.utf8 b/docs/manual/mod/mod_dav_lock.html.ja.utf8 index 952a48b3287..942a484bf8f 100644 --- a/docs/manual/mod/mod_dav_lock.html.ja.utf8 +++ b/docs/manual/mod/mod_dav_lock.html.ja.utf8 @@ -1,32 +1,35 @@ - -mod_dav_lock - Apache HTTP サーバ +mod_dav_lock - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_dav_lock

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    @@ -41,7 +44,7 @@ そのような場合はサーバに読み込むべきではありません。 mod_dav_lock を実際に利用するバックエンドモジュールの例としては subversion - プロバイダモジュールの mod_dav_svn があります。

    + プロバイダモジュールの mod_dav_svn があります。

    mod_dav_fs は特化された専用のバージョンを 使うため、この汎用モジュールは必要ないことに注意して @@ -62,10 +65,10 @@

    -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    DavGenericLockDB ディレクティブ

    @@ -82,13 +85,12 @@ 扱われます。mod_dav_lock の実装ではユーザの ロックを追跡するのに SDBM データベースを使います。

    -

    - DavGenericLockDB var/DavLock -

    +

    DavGenericLockDB var/DavLock
    +

    ロックデータベースファイルのあるディレクトリは - Apache が実行されている User - と Group によって + Apache が実行されている User + と Group によって 書き込み可能でなければなりません。セキュリティ上の理由から、 既存のディレクトリのパーミッションを変更するのではなく、 専用のディレクトリを作るのが良いでしょう。上の例では、 @@ -100,9 +102,31 @@

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dav_lock.xml b/docs/manual/mod/mod_dav_lock.xml index 5caaaf76ae8..d833e88ee86 100644 --- a/docs/manual/mod/mod_dav_lock.xml +++ b/docs/manual/mod/mod_dav_lock.xml @@ -23,7 +23,7 @@ mod_dav_lock -generic locking module for mod_dav +Generic locking module for mod_dav Extension mod_dav_lock.c dav_lock_module @@ -35,7 +35,7 @@ the service of mod_dav. But without a backend provider which makes use of it, it's useless and should not be loaded into the server. A sample backend module which actually utilizes - mod_dav_lock is mod_dav_lock is mod_dav_svn, the subversion provider module.

    Note that mod_dav_fs does not need this @@ -72,7 +72,9 @@ locks.

    Example + DavGenericLockDB var/DavLock +

    The directory containing the lock database file must be diff --git a/docs/manual/mod/mod_dav_lock.xml.fr b/docs/manual/mod/mod_dav_lock.xml.fr new file mode 100644 index 00000000000..c379dc1162e --- /dev/null +++ b/docs/manual/mod/mod_dav_lock.xml.fr @@ -0,0 +1,109 @@ + + + + + + + + + + + + +mod_dav_lock +Module de verrouillage générique pour +mod_dav +Extension +mod_dav_lock.c +dav_lock_module +Disponible depuis la version 2.1 d'Apache + +

    +

    ce module implémente une API de verrouillage générique que tout + fournisseur support de mod_dav peut utiliser. Son + activation nécessite l'utilisation de mod_dav. Mais + sans fournisseur support pour l'utiliser, il n'est d'aucun service + et ne doit pas être chargé dans le serveur. mod_dav_svn, le module qui + implémente le fournisseur subversion, est un exemple + de module de support qui utilise effectivement + mod_dav_lock.

    + +

    Notez que mod_dav_fs n'a pas besoin de + ce module de verrouillage générique, car il utilise sa propre + version plus spécifique.

    + +

    Pour que mod_dav_lock puisse fonctionner, il + vous suffit de spécifier le chemin de la base de données des verrous + à l'aide de la directive DavGenericLockDB décrite + ci-dessous.

    + + Note du développeur +

    Pour déterminer le pointeur de la fonction du fournisseur de + verrouillage, vous devez utiliser l'API + ap_lookup_provider avec les arguments + dav-lock, generic et 0.

    +
    +
    +mod_dav + + +DavGenericLockDB +Chemin de la base de données des verrous DAV +DavGenericLockDB chemin fichier +server configvirtual +host +directory + + + +

    La directive DavLockDB permet de spécifier + le chemin complet de la base de données des verrous, sans extension. + Si le chemin n'est pas absolu, il sera considéré comme relatif au + répertoire défini par la directive ServerRoot. L'implémentation de + mod_dav_lock utilise une base de données SDBM pour + surveiller les verrous utilisateurs.

    + + Exemple + + DavGenericLockDB var/DavLock + + + +

    Les utilisateur et groupe sous lesquels Apache s'exécute et qui + sont respectivement définis par les directives User et Group doivent pouvoir écrire dans le + répertoire qui contient le fichier de la base de données des + verrous. Pour des raisons de sécurité, il est recommandé de créer un + répertoire dédié à la base de données des verrous, plutôt que de + modifier les permissions d'un répertoire existant. Dans l'exemple + ci-dessus, Apache va créer des fichiers dans le répertoire + var/, lui-même sous-répertoire du répertoire défini par + la directive ServerRoot, avec le nom de base + DavLock suivi d'une extension choisie par le + serveur.

    + +
    +
    + +
    + diff --git a/docs/manual/mod/mod_dav_lock.xml.ja b/docs/manual/mod/mod_dav_lock.xml.ja index 8523ba08019..b4640d03923 100644 --- a/docs/manual/mod/mod_dav_lock.xml.ja +++ b/docs/manual/mod/mod_dav_lock.xml.ja @@ -1,7 +1,7 @@ - + -mod_dbd - Apache HTTP Server +mod_dbd - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dbd

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    説明:mod_dav 用の汎用ロックモジュール
    ステータス:Extension
    モジュール識別子:dav_lock_module
    @@ -40,9 +46,17 @@ by its original developer.

    -
    top

    Connection Pooling

    @@ -75,11 +83,33 @@ supersedes the modules presented in that article.

    top
    +

    Connecting

    + +

    To connect to your database, you'll need to specify + a driver, and connection parameters. These vary from + one database engine to another. For example, to connect + to mysql, do the following:

    + +
    DBDriver mysql
    +DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa
    + + +

    You can then use this connection in a variety of other + modules, including mod_rewrite, + mod_authn_dbd, and mod_lua. + Further usage examples appear in each of those modules' + documentation.

    + +

    See DBDParams for connection string + information for each of the supported database drivers.

    + +
    top
    +

    Apache DBD API

    mod_dbd exports five functions for other modules to use. The API is as follows:

    -
    typedef struct {
    +
    typedef struct {
         apr_dbd_t *handle;
         apr_dbd_driver_t *driver;
         apr_hash_t *prepared;
    @@ -104,7 +134,7 @@ AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
     /* acquire a connection that will have the lifetime of a connection
      * and MUST NOT be explicitly closed.  Return NULL on error.
      */
    -AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(request_rec*);
    +AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
     
     /* Prepare a statement for use by a client module */
     AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);
    @@ -114,8 +144,8 @@ APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
     APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
     APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
     APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
    -APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
    -
    +APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*)); +
    top

    SQL Prepared Statements

    @@ -130,6 +160,14 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c

    It is up to dbd user modules to use the prepared statements and document what statements can be specified in httpd.conf, or to provide their own directives and use ap_dbd_prepare.

    + +

    Caveat

    + When using prepared statements with a MySQL database, it is preferred to set + reconnect to 0 in the connection string as to avoid errors that + arise from the MySQL client reconnecting without properly resetting the + prepared statements. If set to 1, any broken connections will be attempted + fixed, but as mod_dbd is not informed, the prepared statements will be invalidated. +
    top

    SECURITY WARNING

    @@ -181,6 +219,21 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c of connections specified in DBDKeep has been exceeded (threaded platforms only).

    +
    +
    top
    +
    Description:Manages SQL database connections
    Status:Extension
    + + + + + +
    Description:Execute an SQL statement after connecting to a database
    Syntax:DBDInitSQL "SQL statement"
    Context:server config, virtual host
    Status:Extension
    Module:mod_dbd
    +

    Modules, that wish it, can have one or more SQL statements + executed when a connection to a database is created. Example + usage could be initializing certain values or adding a log + entry when a new connection is made to the database.

    +
    top

    DBDKeep Directive

    @@ -312,8 +365,30 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dbd.html.fr b/docs/manual/mod/mod_dbd.html.fr new file mode 100644 index 00000000000..0b6ba77c9e7 --- /dev/null +++ b/docs/manual/mod/mod_dbd.html.fr @@ -0,0 +1,421 @@ + + + + + +mod_dbd - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dbd

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Gestion des connexions une base de donnes SQL
    Statut:Extension
    IdentificateurdeModule:dbd_module
    FichierSource:mod_dbd.c
    Compatibilit:Versions 2.1 and suprieures
    +

    Sommaire

    + +

    Le module mod_dbd gre les connexions + une base de donnes SQL via APR. Il permet + aux modules qui requirent des fonctions lies aux bases de donnes + SQL de se connecter une base de donnes la demande, et s'efforce + de confrer aux bases de donnes une efficacit et une + volutivit optimales pour les MPMs threads ou non threads. Pour + plus de dtails, voir le site web APR, + ainsi que cette vue d'ensemble de l'environnement de + dveloppement d'Apache DBD par son dveloppeur initial. +

    +
    + +
    top
    +
    +

    Regroupement des connexions

    +

    Ce module gre de manire optimise en fonction de la plate-forme + les connexions aux bases de donnes. Sur les plates-formes non + threades, il maintient une connexion persistente la manire d'un + LAMP classique (Linux, Apache, Mysql, Perl/PHP/Python). Sur les + plates-formes threades, il maintient un groupe de + connexions la fois plus volutif et plus efficace, comme + dcrit dans cet + article d'ApacheTutor. Notez que mod_dbd + remplace les modules prsents dans cet article.

    +
    top
    +
    +

    Connexion

    + +

    Pour vous connecter votre base de donnes, vous devez spcifier un + pilote et des paramtres de connexion qui diffrent selon le moteur de base + de donnes. Par exemple, pour vous connecter mysql, spcifiez ce qui suit + :

    + +
    DBDriver mysql
    +DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa
    + + +

    Vous pourrez alors utiliser cette connexion dans de nombreux autres + modules comme mod_rewrite, mod_authn_dbd + et mod_lua. Vous trouverez des exemples d'utilisation dans + la documentation de ces modules.

    + +

    Voir la syntaxe de la directive DBDParams pour les + informations fournir dans la chane de connexion en fonction des + diffrents pilotes de base de donnes supports.

    + +
    top
    +
    +

    API DBD d'Apache

    +

    mod_dbd exporte cinq fonctions que d'autres + modules pourront utiliser. L'API se prsente comme suit :

    + +
    typedef struct {
    +    apr_dbd_t *handle;
    +    apr_dbd_driver_t *driver;
    +    apr_hash_t *prepared;
    +} ap_dbd_t;
    +
    +/* Fonctions exportes pour accder  la base de donnes */
    +
    +/* ouvre une connexion qui DOIT avoir t explicitement ferme.
    + * Renvoie NULL en cas d'erreur
    + */
    +AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*);
    +
    +/* ferme une connexion ouverte avec ap_dbd_open */
    +AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*);
    +
    +/* acquiert une connexion qui aura la dure de vie de la requte et qui
    + * NE DOIT PAS avoir t explicitement ferme. Renvoie NULL en cas
    + * d'erreur. C'est la fonction recommande pour la plupart des
    + * applications.
    + */
    +AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
    +
    +/* acquiert une connexion qui aura la dure de vie d'une connexion et
    + * qui NE DOIT PAS avoir t explicitement ferme. Renvoie NULL en cas
    + * d'erreur.
    + */
    +AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
    +
    +/* Prpare une requte qu'un module client pourra utiliser */
    +AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);
    +
    +/* Exporte aussi ces fonctions  titre optionnel mour les modules qui
    + * pfreraient les utiliser */
    +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
    +APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
    +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
    +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
    +APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
    + +
    top
    +
    +

    Requtes SQL prpares

    +

    mod_dbd supporte les requtes SQL prpares + destination des modules qui pourraient les utiliser. Chaque requte + prpare doit possder un nom (tiquette), et est stocke dans un + condens (hash) : les condenss sont du type + apr_dbd_prepared_t et s'utilisent dans toute requte + SQL ou commande select prpare par apr_dbd.

    + +

    Il est du ressort des modules utilisateurs de dbd d'utiliser les + requtes prpares et de prciser quelles requtes doivent tre + spcifies dans httpd.conf, ou de fournir leurs propres directives + et d'utiliser ap_dbd_prepare.

    + +

    Avertissement

    + Lorsqu'on utilise des requtes prpares avec des bases de + donnes MySQL, il est prfrable de dfinir + reconnect 0 dans la chane de connexion, afin + d'viter des erreurs provoques par un client MySQL qui se + reconnecterait sans rinitialiser correctement les requtes + prpares. Si reconnect est dfini 1, toute + connexion dfectueuse sera sense tre rpare, mais comme + mod_dbd n'en est pas inform, les requtes prpares seront + invalides. +
    +
    top
    +
    +

    AVERTISSEMENT DE SECURITE

    + +

    Toute application web impliquant une base de donnes doit se + protger elle-mme contre les attaques de type injection SQL. Dans + la plupart des cas Apache DBD est sr, car les applications + utilisent des requtes prpares, et les entres non sures ne seront + utilises qu' titre de donnes. Bien entendu, si vous l'utilisez + via un module tiers, vous devez tre au fait des prcautions + prendre.

    +

    Cependant, le pilote FreeTDS est non + sr de par sa nature-mme. Comme la bibliothque + sous-jacente ne supporte pas les requtes prpares, le pilote en + effectue une mulation, et les entres non sres sont fusionnes + avec la requte SQL.

    +

    Il peut tre scuris en dcontaminant toutes les + entres : un processus inspir de la recherche de contaminations + (taint mode) de + Perl. Chaque entre est compare une expression rationnelle, et + seules les entres qui correspondent sont utilises, en accord avec + le langage Perl :

    +
      $untrusted =~ /([a-z]+)/;
    +  $trusted = $1;
    +

    Pour utiliser ceci, les expressions rationnelles de + dcontamination doivent tre incluses dans les requtes prpares. + L'expression rationnelle doit se situer immdiatement aprs le + caractre % dans la requte prpare, et doit tre entoure + d'accolades {}. Par exemple, si votre application attend une entre + alphanumrique, vous pouvez utiliser :

    +

    + "SELECT foo FROM bar WHERE input = %s" +

    +

    avec d'autres pilotes, et ne risquer au pire qu'une requte + choue. Mais avec FreeTDS, vous devez utiliser :

    +

    + "SELECT foo FROM bar WHERE input = %{([A-Za-z0-9]+)}s" +

    +

    tout ce qui ne correspond pas l'expression rationnelle est + alors rejet, et la requte est maintenant sre.

    +

    Alternativement, vous pouvez utiliser le pilote ODBC tiers, qui + offre la scurit des requtes prpares authentiques.

    +
    +
    top
    +

    Directive DBDExptime

    + + + + + + + +
    Description:Dure de vie des connexions inactives
    Syntaxe:DBDExptime dure en secondes
    Dfaut:DBDExptime 300
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de dfinir la dure de vie des connexions + inactives lorsque le nombre de connexions spcifi par la directive + DBDKeep a t dpass (plates-formes threades uniquement).

    + +
    +
    top
    +

    Directive DBDInitSQL

    + + + + + + +
    Description:Excute une instruction SQL aprs connexion une base de +donnes
    Syntaxe:DBDInitSQL "instruction SQL"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Les modules qui le souhaitent peuvent excuter une ou plusieurs + instructions SQL aprs connexion une base de donnes. Par exemple + initialiser certaines valeurs, ou ajouter une entre dans le journal + lors d'une nouvelle connexion la base de donnes.

    + +
    +
    top
    +

    Directive DBDKeep

    + + + + + + + +
    Description:Nombre maximum de connexions maintenues
    Syntaxe:DBDKeep nombre
    Dfaut:DBDKeep 2
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de dfinir le nombre maximum de connexions + maintenir par processus, en dehors de celles servant grer les + pics de demandes (plates-formes threades uniquement).

    + +
    +
    top
    +

    Directive DBDMax

    + + + + + + + +
    Description:Nombre maximum de connexions
    Syntaxe:DBDMax nombre
    Dfaut:DBDMax 10
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de dfinir le nombre maximum effectif de + connexions par processus (plates-formes threades uniquement).

    + +
    +
    top
    +

    Directive DBDMin

    + + + + + + + +
    Description:Nombre minimum de connexions
    Syntaxe:DBDMin nombre
    Dfaut:DBDMin 1
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de dfinir le nombre minimum de connexions + par processus (plates-formes threades uniquement).

    + +
    +
    top
    +

    Directive DBDParams

    + + + + + + +
    Description:Paramtres de la connexion la base de +donnes
    Syntaxe:DBDParams +param1=valeur1[,param2=valeur2]
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de spcifier des paramtres selon les + besoins du pilote concern. En gnral, les paramtres passer + concernent tout ce qui n'a pas de valeur par dfaut comme le nom + d'utilisateur, le mot de passe, le nom de la base de donnes, le nom + d'hte et le numro de port de la connexion.

    +

    Les paramtres de la chane de connexion en fonction des + diffrents pilotes comprennent :

    +
    +
    FreeTDS (pour MSSQL et SyBase)
    +
    username, password, appname, dbname, host, charset, lang, server
    +
    MySQL
    +
    host, port, user, pass, dbname, sock, flags, fldsz, group, reconnect
    +
    Oracle
    +
    user, pass, dbname, server
    +
    PostgreSQL
    +
    La chane de connexion est passe directement PQconnectdb
    +
    SQLite2
    +
    La chane de connexion est scinde avec comme sparateur le + caractre ':', et partie1:partie2 est utilis dans + sqlite_open(partie1, atoi(partie2), NULL)
    +
    SQLite3
    +
    La chane de connexion est passe directement sqlite3_open
    +
    ODBC
    +
    datasource, user, password, connect, ctimeout, stimeout, access, txmode, bufsize
    +
    + +
    +
    top
    +

    Directive DBDPersist

    + + + + + + +
    Description:Utiliser ou non des connexions persistentes
    Syntaxe:DBDPersist On|Off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Si cette directive est dfinie Off, les connexions persistentes + et les connexions groupes sont dsactives. la demande d'un + client, une nouvelle connexion la base de donnes est ouverte, et + ferme immdiatement l'issue du traitement. Cette configuration ne + doit tre utilise qu' des fins de dbogage, ou sur des serveurs + charge faible.

    + +

    Par dfaut, les groupes de connexions persistentes sont activs + (ou une seule connexion persistente du style LAMP pour les serveurs + non threads), et c'est la configuration qui devrait tre utilise + dans la plupart des cas sur un serveur en production.

    + +

    Avant la version 2.2.2, cette directive n'acceptait que les + valeurs 0 et 1 au lieu de Off + et On, respectivement.

    + +
    +
    top
    +

    Directive DBDPrepareSQL

    + + + + + + +
    Description:Dfinit une requte SQL prpare
    Syntaxe:DBDPrepareSQL "requte SQL" tiquette
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Pour les modules tels que les modules d'authentification, qui + utilisent de manire rpte la mme requte SQL, on peut optimiser + les performances en prparant la requte une fois pour toutes au + dmarrage, plutt qu' chaque utilisation. Cette directive permet de + prparer une requte SQL et de lui assigner une tiquette.

    + +
    +
    top
    +

    Directive DBDriver

    + + + + + + +
    Description:Spcifie un pilote SQL
    Syntaxe:DBDriver nom
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_dbd
    +

    Cette directive permet de spcifier un pilote apr_dbd par son + nom. Le pilote doit tre install sur votre systme (sur la plupart + des systmes, il s'agit d'un objet partag ou d'une dll). Par + exemple, DBDriver mysql va slectionner le pilote MySQL + dans la bibliothque apr_dbd_mysql.so.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dbd.xml b/docs/manual/mod/mod_dbd.xml index 3021e298833..84b5a538738 100644 --- a/docs/manual/mod/mod_dbd.xml +++ b/docs/manual/mod/mod_dbd.xml @@ -55,12 +55,35 @@ supersedes the modules presented in that article.

    +
    Connecting + +

    To connect to your database, you'll need to specify + a driver, and connection parameters. These vary from + one database engine to another. For example, to connect + to mysql, do the following:

    + + +DBDriver mysql +DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa + + +

    You can then use this connection in a variety of other + modules, including mod_rewrite, + mod_authn_dbd, and mod_lua. + Further usage examples appear in each of those modules' + documentation.

    + +

    See DBDParams for connection string + information for each of the supported database drivers.

    + +
    +
    Apache DBD API

    mod_dbd exports five functions for other modules to use. The API is as follows:

    - -
    typedef struct {
    +
    +typedef struct {
         apr_dbd_t *handle;
         apr_dbd_driver_t *driver;
         apr_hash_t *prepared;
    @@ -85,7 +108,7 @@ AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*);
     /* acquire a connection that will have the lifetime of a connection
      * and MUST NOT be explicitly closed.  Return NULL on error.
      */
    -AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(request_rec*);
    +AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
     
     /* Prepare a statement for use by a client module */
     AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*);
    @@ -96,8 +119,7 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
     APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
     APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
     APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
    -
    -
    +
    SQL Prepared Statements @@ -112,6 +134,14 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c

    It is up to dbd user modules to use the prepared statements and document what statements can be specified in httpd.conf, or to provide their own directives and use ap_dbd_prepare.

    + + Caveat + When using prepared statements with a MySQL database, it is preferred to set + reconnect to 0 in the connection string as to avoid errors that + arise from the MySQL client reconnecting without properly resetting the + prepared statements. If set to 1, any broken connections will be attempted + fixed, but as mod_dbd is not informed, the prepared statements will be invalidated. +
    @@ -294,4 +324,19 @@ APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const c + +DBDInitSQL +Execute an SQL statement after connecting to a database +DBDInitSQL "SQL statement" +server configvirtual host + + + +

    Modules, that wish it, can have one or more SQL statements + executed when a connection to a database is created. Example + usage could be initializing certain values or adding a log + entry when a new connection is made to the database.

    +
    +
    + diff --git a/docs/manual/mod/mod_dbd.xml.fr b/docs/manual/mod/mod_dbd.xml.fr new file mode 100644 index 00000000000..21d3a25268b --- /dev/null +++ b/docs/manual/mod/mod_dbd.xml.fr @@ -0,0 +1,374 @@ + + + + + + + + + + + +mod_dbd +Gestion des connexions à une base de données SQL +Extension +mod_dbd.c +dbd_module +Versions 2.1 and supérieures + + +

    Le module mod_dbd gère les connexions + à une base de données SQL via APR. Il permet + aux modules qui requièrent des fonctions liées aux bases de données + SQL de se connecter à une base de données à la demande, et s'efforce + de conférer aux bases de données une efficacité et une + évolutivité optimales pour les MPMs threadés ou non threadés. Pour + plus de détails, voir le site web APR, + ainsi que cette vue d'ensemble de l'environnement de + développement d'Apache DBD par son développeur initial. +

    +
    + +Formats des mots de +passe + +
    Regroupement des connexions +

    Ce module gère de manière optimisée en fonction de la plate-forme + les connexions aux bases de données. Sur les plates-formes non + threadées, il maintient une connexion persistente à la manière d'un + LAMP classique (Linux, Apache, Mysql, Perl/PHP/Python). Sur les + plates-formes threadées, il maintient un groupe de + connexions à la fois plus évolutif et plus efficace, comme + décrit dans cet + article d'ApacheTutor. Notez que mod_dbd + remplace les modules présentés dans cet article.

    +
    + +
    Connexion + +

    Pour vous connecter à votre base de données, vous devez spécifier un + pilote et des paramètres de connexion qui diffèrent selon le moteur de base + de données. Par exemple, pour vous connecter à mysql, spécifiez ce qui suit + :

    + + +DBDriver mysql +DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa + + +

    Vous pourrez alors utiliser cette connexion dans de nombreux autres + modules comme mod_rewrite, mod_authn_dbd + et mod_lua. Vous trouverez des exemples d'utilisation dans + la documentation de ces modules.

    + +

    Voir la syntaxe de la directive DBDParams pour les + informations à fournir dans la chaîne de connexion en fonction des + différents pilotes de base de données supportés.

    + +
    + +
    API DBD d'Apache +

    mod_dbd exporte cinq fonctions que d'autres + modules pourront utiliser. L'API se présente comme suit :

    + + +typedef struct { + apr_dbd_t *handle; + apr_dbd_driver_t *driver; + apr_hash_t *prepared; +} ap_dbd_t; + +/* Fonctions exportées pour accéder à la base de données */ + +/* ouvre une connexion qui DOIT avoir été explicitement fermée. + * Renvoie NULL en cas d'erreur + */ +AP_DECLARE(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*); + +/* ferme une connexion ouverte avec ap_dbd_open */ +AP_DECLARE(void) ap_dbd_close(server_rec*, ap_dbd_t*); + +/* acquiert une connexion qui aura la durée de vie de la requête et qui + * NE DOIT PAS avoir été explicitement fermée. Renvoie NULL en cas + * d'erreur. C'est la fonction recommandée pour la plupart des + * applications. + */ +AP_DECLARE(ap_dbd_t*) ap_dbd_acquire(request_rec*); + +/* acquiert une connexion qui aura la durée de vie d'une connexion et + * qui NE DOIT PAS avoir été explicitement fermée. Renvoie NULL en cas + * d'erreur. + */ +AP_DECLARE(ap_dbd_t*) ap_dbd_cacquire(conn_rec*); + +/* Prépare une requête qu'un module client pourra utiliser */ +AP_DECLARE(void) ap_dbd_prepare(server_rec*, const char*, const char*); + +/* Exporte aussi ces fonctions à titre optionnel mour les modules qui + * péfèreraient les utiliser */ +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*)); +APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*)); +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*)); +APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*)); +APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*)); + +
    + +
    Requêtes SQL préparées +

    mod_dbd supporte les requêtes SQL préparées à + destination des modules qui pourraient les utiliser. Chaque requête + préparée doit posséder un nom (étiquette), et est stockée dans un + condensé (hash) : les condensés sont du type + apr_dbd_prepared_t et s'utilisent dans toute requête + SQL ou commande select préparée par apr_dbd.

    + +

    Il est du ressort des modules utilisateurs de dbd d'utiliser les + requêtes préparées et de préciser quelles requêtes doivent être + spécifiées dans httpd.conf, ou de fournir leurs propres directives + et d'utiliser ap_dbd_prepare.

    + + Avertissement + Lorsqu'on utilise des requêtes préparées avec des bases de + données MySQL, il est préférable de définir + reconnect à 0 dans la chaîne de connexion, afin + d'éviter des erreurs provoquées par un client MySQL qui se + reconnecterait sans réinitialiser correctement les requêtes + préparées. Si reconnect est défini à 1, toute + connexion défectueuse sera sensée être réparée, mais comme + mod_dbd n'en est pas informé, les requêtes préparées seront + invalidées. + +
    + +
    +AVERTISSEMENT DE SECURITE +

    Toute application web impliquant une base de données doit se + protéger elle-même contre les attaques de type injection SQL. Dans + la plupart des cas Apache DBD est sûr, car les applications + utilisent des requêtes préparées, et les entrées non sures ne seront + utilisées qu'à titre de données. Bien entendu, si vous l'utilisez + via un module tiers, vous devez être au fait des précautions à + prendre.

    +

    Cependant, le pilote FreeTDS est non + sûr de par sa nature-même. Comme la bibliothèque + sous-jacente ne supporte pas les requêtes préparées, le pilote en + effectue une émulation, et les entrées non sûres sont fusionnées + avec la requête SQL.

    +

    Il peut être sécurisé en décontaminant toutes les + entrées : un processus inspiré de la recherche de contaminations + (taint mode) de + Perl. Chaque entrée est comparée à une expression rationnelle, et + seules les entrées qui correspondent sont utilisées, en accord avec + le langage Perl :

    + +
      $untrusted =~ /([a-z]+)/;
    +  $trusted = $1;
    +
    +

    Pour utiliser ceci, les expressions rationnelles de + décontamination doivent être incluses dans les requêtes préparées. + L'expression rationnelle doit se situer immédiatement après le + caractère % dans la requête préparée, et doit être entourée + d'accolades {}. Par exemple, si votre application attend une entrée + alphanumérique, vous pouvez utiliser :

    + + "SELECT foo FROM bar WHERE input = %s" + +

    avec d'autres pilotes, et ne risquer au pire qu'une requête + échouée. Mais avec FreeTDS, vous devez utiliser :

    + + "SELECT foo FROM bar WHERE input = %{([A-Za-z0-9]+)}s" + +

    tout ce qui ne correspond pas à l'expression rationnelle est + alors rejeté, et la requête est maintenant sûre.

    +

    Alternativement, vous pouvez utiliser le pilote ODBC tiers, qui + offre la sécurité des requêtes préparées authentiques.

    +
    + +DBDriver +Spécifie un pilote SQL +DBDriver nom +server configvirtual host + + + +

    Cette directive permet de spécifier un pilote apr_dbd par son + nom. Le pilote doit être installé sur votre système (sur la plupart + des systèmes, il s'agit d'un objet partagé ou d'une dll). Par + exemple, DBDriver mysql va sélectionner le pilote MySQL + dans la bibliothèque apr_dbd_mysql.so.

    +
    +
    + + +DBDParams +Paramètres de la connexion à la base de +données +DBDParams +param1=valeur1[,param2=valeur2] +server configvirtual host + + + +

    Cette directive permet de spécifier des paramètres selon les + besoins du pilote concerné. En général, les paramètres à passer + concernent tout ce qui n'a pas de valeur par défaut comme le nom + d'utilisateur, le mot de passe, le nom de la base de données, le nom + d'hôte et le numéro de port de la connexion.

    +

    Les paramètres de la chaîne de connexion en fonction des + différents pilotes comprennent :

    +
    +
    FreeTDS (pour MSSQL et SyBase)
    +
    username, password, appname, dbname, host, charset, lang, server
    +
    MySQL
    +
    host, port, user, pass, dbname, sock, flags, fldsz, group, reconnect
    +
    Oracle
    +
    user, pass, dbname, server
    +
    PostgreSQL
    +
    La chaîne de connexion est passée directement à PQconnectdb
    +
    SQLite2
    +
    La chaîne de connexion est scindée avec comme séparateur le + caractère ':', et partie1:partie2 est utilisé dans + sqlite_open(partie1, atoi(partie2), NULL)
    +
    SQLite3
    +
    La chaîne de connexion est passée directement à sqlite3_open
    +
    ODBC
    +
    datasource, user, password, connect, ctimeout, stimeout, access, txmode, bufsize
    +
    +
    +
    + + +DBDPersist +Utiliser ou non des connexions persistentes +DBDPersist On|Off +server configvirtual host + + + +

    Si cette directive est définie à Off, les connexions persistentes + et les connexions groupées sont désactivées. À la demande d'un + client, une nouvelle connexion à la base de données est ouverte, et + fermée immédiatement à l'issue du traitement. Cette configuration ne + doit être utilisée qu'à des fins de débogage, ou sur des serveurs à + charge faible.

    + +

    Par défaut, les groupes de connexions persistentes sont activés + (ou une seule connexion persistente du style LAMP pour les serveurs + non threadés), et c'est la configuration qui devrait être utilisée + dans la plupart des cas sur un serveur en production.

    + +

    Avant la version 2.2.2, cette directive n'acceptait que les + valeurs 0 et 1 au lieu de Off + et On, respectivement.

    +
    +
    + + +DBDPrepareSQL +Définit une requête SQL préparée +DBDPrepareSQL "requête SQL" étiquette +server configvirtual host + + + +

    Pour les modules tels que les modules d'authentification, qui + utilisent de manière répétée la même requête SQL, on peut optimiser + les performances en préparant la requête une fois pour toutes au + démarrage, plutôt qu'à chaque utilisation. Cette directive permet de + préparer une requête SQL et de lui assigner une étiquette.

    +
    +
    + + +DBDMin +Nombre minimum de connexions +DBDMin nombre +DBDMin 1 +server configvirtual host + + + +

    Cette directive permet de définir le nombre minimum de connexions + par processus (plates-formes threadées uniquement).

    +
    +
    + + +DBDKeep +Nombre maximum de connexions maintenues +DBDKeep nombre +DBDKeep 2 +server configvirtual host + + + +

    Cette directive permet de définir le nombre maximum de connexions + à maintenir par processus, en dehors de celles servant à gérer les + pics de demandes (plates-formes threadées uniquement).

    +
    +
    + + +DBDMax +Nombre maximum de connexions +DBDMax nombre +DBDMax 10 +server configvirtual host + + + +

    Cette directive permet de définir le nombre maximum effectif de + connexions par processus (plates-formes threadées uniquement).

    +
    +
    + + +DBDExptime +Durée de vie des connexions inactives +DBDExptime durée en secondes +DBDExptime 300 +server configvirtual host + + + +

    Cette directive permet de définir la durée de vie des connexions + inactives lorsque le nombre de connexions spécifié par la directive + DBDKeep a été dépassé (plates-formes threadées uniquement).

    +
    +
    + + +DBDInitSQL +Exécute une instruction SQL après connexion à une base de +données +DBDInitSQL "instruction SQL" +server configvirtual host + + + +

    Les modules qui le souhaitent peuvent exécuter une ou plusieurs + instructions SQL après connexion à une base de données. Par exemple + initialiser certaines valeurs, ou ajouter une entrée dans le journal + lors d'une nouvelle connexion à la base de données.

    +
    +
    + + +
    diff --git a/docs/manual/mod/mod_dbd.xml.meta b/docs/manual/mod/mod_dbd.xml.meta index 0a15de94b2c..bf4a2e0a235 100644 --- a/docs/manual/mod/mod_dbd.xml.meta +++ b/docs/manual/mod/mod_dbd.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_deflate.html.en b/docs/manual/mod/mod_deflate.html.en index 52e2efbfebb..169953db9ad 100644 --- a/docs/manual/mod/mod_deflate.html.en +++ b/docs/manual/mod/mod_deflate.html.en @@ -1,23 +1,28 @@ - -mod_deflate - Apache HTTP Server +mod_deflate - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_deflate

    @@ -38,65 +43,58 @@ client your server to be compressed before being sent to the client over the network.

    -
    top
    +

    Supported Encodings

    +

    The gzip encoding is the only one supported to ensure complete compatibility + with old browser implementations. The deflate encoding is not supported, + please check the zlib's documentation + for a complete explanation. +

    +
    top
    +

    Sample Configurations

    -

    This is a simple sample configuration for the impatient.

    - -

    Compress only a few types

    - AddOutputFilterByType DEFLATE text/html text/plain text/xml -

    - -

    The following configuration, while resulting in more compressed content, - is also much more complicated. Do not use this unless you fully understand - all the configuration details.

    - -

    Compress everything except images

    - <Location />
    - - # Insert filter
    - SetOutputFilter DEFLATE
    -
    - # Netscape 4.x has some problems...
    - BrowserMatch ^Mozilla/4 gzip-only-text/html
    -
    - # Netscape 4.06-4.08 have some more problems
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    -
    - # MSIE masquerades as Netscape, but it is fine
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    - # Don't compress images
    - SetEnvIfNoCase Request_URI \
    - - \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    -
    -
    - # Make sure proxies don't deliver the wrong content
    - Header append Vary User-Agent env=!dont-vary
    -
    - </Location> -

    +

    Compression and TLS

    +

    Some web applications are vulnerable to an information disclosure + attack when a TLS connection carries deflate compressed data. For more + information, review the details of the "BREACH" family of attacks.

    +
    +

    This is a simple configuration that compresses common text-based content types.

    + +

    Compress only a few types

    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
    +
    top

    Enabling Compression

    +

    Compression and TLS

    +

    Some web applications are vulnerable to an information disclosure + attack when a TLS connection carries deflate compressed data. For more + information, review the details of the "BREACH" family of attacks.

    +

    Output Compression

    Compression is implemented by the DEFLATE @@ -104,65 +102,27 @@ client will enable compression for documents in the container where it is placed:

    -

    - SetOutputFilter DEFLATE -

    +
    SetOutputFilter DEFLATE
    +SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
    -

    Some popular browsers cannot handle compression of all content - so you may want to set the gzip-only-text/html note to - 1 to only allow html files to be compressed (see - below). If you set this to anything but 1 it - will be ignored.

    If you want to restrict the compression to particular MIME types in general, you may use the AddOutputFilterByType directive. Here is an example of enabling compression only for the html files of the Apache documentation:

    -

    - <Directory "/your-server-root/manual">
    - - AddOutputFilterByType DEFLATE text/html
    -
    - </Directory> -

    - -

    For browsers that have problems even with compression of all file - types, use the BrowserMatch directive to set the no-gzip - note for that particular browser so that no compression will be - performed. You may combine no-gzip with gzip-only-text/html to get the best results. In that case - the former overrides the latter. Take a look at the following - excerpt from the configuration example - defined in the section above:

    - -

    - BrowserMatch ^Mozilla/4 gzip-only-text/html
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -

    - -

    At first we probe for a User-Agent string that - indicates a Netscape Navigator version of 4.x. These versions - cannot handle compression of types other than - text/html. The versions 4.06, 4.07 and 4.08 also - have problems with decompressing html files. Thus, we completely - turn off the deflate filter for them.

    - -

    The third BrowserMatch - directive fixes the guessed identity of the user agent, because - the Microsoft Internet Explorer identifies itself also as "Mozilla/4" - but is actually able to handle requested compression. Therefore we - match against the additional string "MSIE" (\b means - "word boundary") in the User-Agent Header and turn off - the restrictions defined before.

    +
    <Directory "/your-server-root/manual">
    +    AddOutputFilterByType DEFLATE text/html
    +</Directory>
    +

    Note

    The DEFLATE filter is always inserted after RESOURCE filters like PHP or SSI. It never touches internal subrequests.

    Note

    - There is a environment variable force-gzip, - set via SetEnv, which + There is an environment variable force-gzip, + set via SetEnv, which will ignore the accept-encoding setting of your browser and will send compressed output.
    @@ -172,16 +132,13 @@ client

    The mod_deflate module also provides a filter for inflating/uncompressing a gzip compressed response body. In order to activate this feature you have to insert the INFLATE filter into - the outputfilter chain using SetOutputFilter or AddOutputFilter, for example:

    + the output filter chain using SetOutputFilter or AddOutputFilter, for example:

    + +
    <Location "/dav-area">
    +    ProxyPass "http://example.com/"
    +    SetOutputFilter INFLATE
    +</Location>
    -

    - <Location /dav-area>
    - - ProxyPass http://example.com/
    - SetOutputFilter INFLATE
    -
    - </Location> -

    This Example will uncompress gzip'ed output from example.com, so other filters can do further processing with it. @@ -194,13 +151,10 @@ client this feature you have to insert the DEFLATE filter into the input filter chain using SetInputFilter or AddInputFilter, for example:

    -

    - <Location /dav-area>
    - - SetInputFilter DEFLATE
    -
    - </Location> -

    +
    <Location "/dav-area">
    +    SetInputFilter DEFLATE
    +</Location>
    +

    Now if a request contains a Content-Encoding: gzip header, the body will be automatically decompressed. @@ -234,18 +188,57 @@ client in a typical configuration where the addition of the DEFLATE filter depends on the User-Agent, you should add:

    -

    - Header append Vary User-Agent -

    +
    Header append Vary User-Agent
    +

    If your decision about compression depends on other information than request headers (e.g. HTTP version), you have to set the Vary header to the value *. This prevents compliant proxies from caching entirely.

    -

    Example

    - Header set Vary * -

    +

    Example

    Header set Vary *
    +
    +
    top
    +
    +

    Serving pre-compressed +content

    + +

    Since mod_deflate re-compresses content each + time a request is made, some performance benefit can be derived by + pre-compressing the content and telling mod_deflate to serve them + without re-compressing them. This may be accomplished using a + configuration like the following:

    + +
    <IfModule mod_headers.c>
    +    # Serve gzip compressed CSS files if they exist 
    +    # and the client accepts gzip.
    +    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    +    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    +    RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
    +
    +    # Serve gzip compressed JS files if they exist 
    +    # and the client accepts gzip.
    +    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    +    RewriteCond "%{REQUEST_FILENAME}\.gz" -s
    +    RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
    +
    +
    +    # Serve correct content types, and prevent mod_deflate double gzip.
    +    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
    +    RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
    +
    +
    +    <FilesMatch "(\.js\.gz|\.css\.gz)$">
    +      # Serve correct encoding type.
    +      Header append Content-Encoding gzip
    +
    +      # Force proxies to cache gzipped & 
    +      # non-gzipped css/js files separately.
    +      Header append Vary Accept-Encoding
    +    </FilesMatch>
    +</IfModule>
    + +
    top

    DeflateBufferSize Directive

    @@ -259,7 +252,14 @@ client

    The DeflateBufferSize directive specifies the size in bytes of the fragments that zlib should compress at one - time.

    + time. If the compressed response size is bigger than the one specified + by this directive then httpd will switch to chunked encoding + (HTTP header Transfer-Encoding set to Chunked), with the + side effect of not setting any Content-Length HTTP header. This is particularly + important when httpd works behind reverse caching proxies or when httpd is configured with + mod_cache and mod_cache_disk because + HTTP responses without any Content-Length header might not be cached. +

    top
    @@ -271,7 +271,6 @@ client Context:server config, virtual host Status:Extension Module:mod_deflate -Compatibility:This directive is available since Apache 2.0.45

    The DeflateCompressionLevel directive specifies what level of compression should be used, the higher the value, @@ -288,7 +287,6 @@ client Context:server config, virtual host Status:Extension Module:mod_deflate -Compatibility:type is available since Apache 2.0.45

    The DeflateFilterNote directive specifies that a note about compression ratios should be attached @@ -296,16 +294,15 @@ client the directive. You can use that note for statistical purposes by adding the value to your access log.

    -

    Example

    - DeflateFilterNote ratio
    -
    - LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    - CustomLog logs/deflate_log deflate -

    +

    Example

          DeflateFilterNote ratio
    +    
    +      LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    +      CustomLog "logs/deflate_log" deflate
    +

    If you want to extract more accurate values from your logs, you can use the type argument to specify the type of data - left as note for logging. type can be one of:

    + left as a note for logging. type can be one of:

    Input
    @@ -322,19 +319,72 @@ client

    Thus you may log it this way:

    -

    Accurate Logging

    - DeflateFilterNote Input instream
    - DeflateFilterNote Output outstream
    - DeflateFilterNote Ratio ratio
    -
    - LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    - CustomLog logs/deflate_log deflate -

    +

    Accurate Logging

    DeflateFilterNote Input instream
    +DeflateFilterNote Output outstream
    +DeflateFilterNote Ratio ratio
    +
    +LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    +CustomLog "logs/deflate_log" deflate
    +

    See also

    +
    +
    top
    +

    DeflateInflateLimitRequestBody Directive

    + + + + + + + + +
    Description:Maximum size of inflated request bodies
    Syntax:DeflateInflateLimitRequestBodyvalue
    Default:None, but LimitRequestBody applies after deflation
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_deflate
    Compatibility:2.4.10 and later
    +

    The DeflateInflateLimitRequestBody directive + specifies the maximum size of an inflated request body. If it is unset, + LimitRequestBody is applied to the + inflated body.

    + +
    +
    top
    +

    DeflateInflateRatioBurst Directive

    + + + + + + + + +
    Description:Maximum number of times the inflation ratio for request bodies + can be crossed
    Syntax:DeflateInflateRatioBurst value
    Default:3
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_deflate
    Compatibility:2.4.10 and later
    +

    The DeflateInflateRatioBurst directive + specifies the maximum number of times the + DeflateInflateRatioLimit can be crossed before + terminating the request.

    + +
    +
    top
    +

    DeflateInflateRatioLimit Directive

    + + + + + + + + +
    Description:Maximum inflation ratio for request bodies
    Syntax:DeflateInflateRatioLimit value
    Default:200
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_deflate
    Compatibility:2.4.10 and later
    +

    The DeflateInflateRatioLimit directive + specifies the maximum ratio of deflated to inflated size of an + inflated request body. This ratio is checked as the body is + streamed in, and if crossed more than + DeflateInflateRatioBurst times, the request + will be terminated.

    +
    top

    DeflateMemLevel Directive

    @@ -372,7 +422,28 @@ client  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_deflate.html.fr b/docs/manual/mod/mod_deflate.html.fr index 200c930e514..3984ce2746c 100644 --- a/docs/manual/mod/mod_deflate.html.fr +++ b/docs/manual/mod/mod_deflate.html.fr @@ -1,23 +1,28 @@ - -mod_deflate - Serveur Apache HTTP +mod_deflate - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_deflate

    @@ -37,131 +42,80 @@ client sortie DEFLATE qui permet de comprimer la sortie de votre serveur avant de l'envoyer au client sur le rseau.

    -
    top
    +

    Codages supports

    +

    Le seul codage support est gzip afin d'assurer une complte + compatibilit avec les anciens navigateurs. Le codage deflate + n'est donc pas support ; voir ce sujet la documentation de zlib + pour une explication dtaille. +

    +
    top
    +

    Exemples de configurations

    -

    Voici un exemple simple de configuration pour les - impatients.

    - -

    Ne comprime que certains types de documents

    - AddOutputFilterByType DEFLATE text/html text/plain text/xml -

    - -

    La configuration suivante, tout en produisant un contenu encore - plus comprim, est aussi beaucoup plus complique. N'utilisez pas - cet exemple si vous ne comprenez pas tous les dtails de la - configuration.

    - -

    Comprime tout, sauf les images

    - <Location />
    - - # Insre le filtre
    - SetOutputFilter DEFLATE
    -
    - # Netscape 4.x a quelques problmes ...
    - BrowserMatch ^Mozilla/4 gzip-only-text/html
    -
    - # Netscape 4.06-4.08 ont d'autres problmes
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    -
    - # MSIE se fait passer pour Netscape, mais a marche
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    - # Ne pas comprimer les images
    - SetEnvIfNoCase Request_URI \
    - - \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    -
    -
    - # On s'assure que les mandataires ne servent pas le mauvais - # contenu
    - Header append Vary User-Agent env=!dont-vary
    -
    - </Location> -

    +

    Compression et TLS

    +

    Certaines applications web sont vulnrables aux attaques + visant le vol d'information lorsqu'une connexion TLS transmet + des donnes compresses par deflate. Pour plus de dtails, + tudiez les attaques de la famille "BREACH".

    +
    +

    Voici une configuration simple qui comprime les contenus base + de texte courants.

    + +

    Ne comprime que certains types de documents

    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
    +
    top

    Activation de la compression

    +

    Compression et TLS

    +

    Certaines applications web sont vulnrables aux attaques pour + vol d'information lorsque la connexion TLS transmet des donnes + compresses par deflate. Pour plus d'informations, voir en + dtails la famille d'attaques de type "BREACH".

    +
    +

    Compression de la sortie

    La compression est implmente par le filtre DEFLATE. La directive suivante active la compression des documents dans le conteneur o elle est place :

    -

    - SetOutputFilter DEFLATE -

    +
    SetOutputFilter DEFLATE
    +SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip
    -

    Certains navigateurs populaires ne grent pas la compression de - tous les contenus, et pour rsoudre ce problme, vous pouvez - dfinir la note gzip-only-text/html 1 - pour ne permettre que la compression des fichiers html (voir - ci-dessous). Si vous dfinissez cette note toute autre - valeur que 1, elle sera ignore.

    Si vous voulez limiter la compression certains types MIME particuliers, vous pouvez utiliser la directive AddOutputFilterByType. Voici un exemple o la compression n'est active que pour les fichiers html de la documentation d'Apache :

    -

    - <Directory "/racine-de-votre-serveur/manual">
    - - AddOutputFilterByType DEFLATE text/html
    -
    - </Directory> -

    - -

    Pour les navigateurs qui ont des problmes avec la compression - de tous les types de fichiers, vous pouvez utiliser la directive - BrowserMatch pour - dfinir la note no-gzip, pour le navigateur - considr, de faon ce qu'aucune compression ne soit effectue. - Vous pouvez combiner no-gzip avec - gzip-only-text/html afin d'obtenir le meilleur - rsultat possible. Dans ce cas, la premire note l'emporte sur la - deuxime. Considrons l'extrait suivant de l'exemple de configuration de la section - prcdente :

    - -

    - BrowserMatch ^Mozilla/4 gzip-only-text/html
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -

    - -

    Tout d'abord, on recherche un en-tte User-Agent - qui signale un navigateur Netscape version 4.x. Ces versions ne - grent pas la compression des types de fichiers autres que - text/html. En outre, les versions 4.06, 4.07 et 4.08 - ont des problmes avec la dcompression des fichiers html. Par - consquent, nous dsactivons compltement le filtre deflate pour - ces derniers.

    - -

    La troisime directive BrowserMatch corrige l'identit - sous laquelle se prsente le navigateur ; en effet, Microsoft - Internet Explorer s'identifie aussi lui-mme comme "Mozilla/4", - mais par contre, il sait grer les contenus compresss. On - recherche donc la chane additionnelle "MSIE" (\b - signifie "par mots entiers") dans l'en-tte - User-Agent, et si elle est trouve, on annule les - restrictions dfinies auparavant.

    +
    <Directory "/your-server-root/manual">
    +    AddOutputFilterByType DEFLATE text/html
    +</Directory>
    +

    Note

    Le filtre DEFLATE est toujours insr aprs les @@ -170,7 +124,7 @@ client

    Note

    La variable d'environnement force-gzip, dfinie - l'aide de la directive SetEnv, permet d'ignorer la + l'aide de la directive SetEnv, permet d'ignorer la configuration de votre navigateur quant aux codages accepts, et d'envoyer sans condition une sortie comprime.
    @@ -185,14 +139,11 @@ client AddOutputFilter, comme dans l'exemple suivant :

    -

    - <Location /dav-area>
    - - ProxyPass http://example.com/
    - SetOutputFilter INFLATE
    -
    - </Location> -

    +
    <Location "/dav-area">
    +    ProxyPass "http://example.com/"
    +    SetOutputFilter INFLATE
    +</Location>
    +

    Dans cet exemple, les sorties comprimes par gzip en provenance de example.com seront dcomprimes afin de pouvoir @@ -209,13 +160,10 @@ client AddInputFilter, comme dans l'exemple suivant :

    -

    - <Location /dav-area>
    - - SetInputFilter DEFLATE
    -
    - </Location> -

    +
    <Location "/dav-area">
    +    SetInputFilter DEFLATE
    +</Location>
    +

    Dsormais, si une requte contient un en-tte Content-Encoding: gzip, son corps sera @@ -254,9 +202,8 @@ client DEFLATE dpend du contenu de l'en-tte User-Agent, vous devez spcifier :

    -

    - Header append Vary User-Agent -

    +
    Header append Vary User-Agent
    +

    Si votre dcision de comprimer le contenu dpend d'autres informations que celles contenues dans les en-ttes de la requte @@ -264,12 +211,52 @@ client Vary la valeur *, ce qui permet d'empcher les mandataires compatibles de tout mettre en cache.

    -

    Exemple

    - Header set Vary * -

    +

    Exemple

    Header set Vary *
    +
    +
    top
    +
    +

    Servir du contenu prcompress

    + +

    Comme mod_deflate recompresse le contenu demand + chaque requte, il est possible de gagner en performances en + prcompressant ce contenu, et en forant mod_deflate servir ce + contenu prcompress sans avoir le recompresser chaque requte. + Pour ce faire, utilisez une configuration du style :

    + +
    <IfModule mod_headers.c>
    +    # Servir des fichiers CSS compresss avec gzip, s'ils existent, et
    +    # si le client accepte gzip.
    +    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    +    RewriteCond "%{REQUEST_FILENAME}\.gz" "-s"
    +    RewriteRule "^(.*)\.css"              "$1\.css\.gz" [QSA]
    +
    +    # Servir des fichiers JS compresss avec gzip, s'ils existent, et
    +    # si le client accepte gzip.
    +    RewriteCond "%{HTTP:Accept-encoding}" "gzip"
    +    RewriteCond "%{REQUEST_FILENAME}\.gz" "-s"
    +    RewriteRule "^(.*)\.js"               "$1\.js\.gz" [QSA]
    +
    +
    +    # Servir des types de contenus corrects, et empcher mod_deflate
    +    # d'effectuer un double gzip.
    +    RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
    +    RewriteRule "\.js\.gz$"  "-" [T=text/javascript,E=no-gzip:1]
    +
    +
    +    <FilesMatch "(\.js\.gz|\.css\.gz)$">
    +      # Servir le type de codage correct.
    +      Header append Content-Encoding gzip
    +
    +      # Force les mandataires  mettre en cache sparment les fichiers
    +      # css/js gzipps & non gzipps.
    +      Header append Vary Accept-Encoding
    +    </FilesMatch>
    +</IfModule>
    + +
    top
    -

    DeflateBufferSize Directive

    +

    Directive DeflateBufferSize

    @@ -281,11 +268,20 @@ fois
    Description:Taille du fragment que zlib devra comprimer en une seule fois

    La directive DeflateBufferSize permet de spcifier la taille en octets du fragment que zlib devra comprimer - en une seule fois.

    + en une seule fois. Si la taille de la rponse compresse est suprieure + celle spcifie par cette directive, httpd passera un mode d'encodage + fragment (l'en-tte HTTP Transfer-Encoding prend la valeur + Chunked), ceci ayant comme effet de bord de ne dfinir aucun + en-tte HTTP Content-Length. Il est important de connatre ce + comportement, particulirement lorsque httpd travaille derrire des + mandataires inverses avec mise en cache, ou lorsque httpd est configur pour + utiliser mod_cache et mod_cache_disk car + les rponses HTTP sans en-tte Content-Length peuvent ne pas + tre mises en cache.

    top
    -

    DeflateCompressionLevel Directive

    +

    Directive DeflateCompressionLevel

    @@ -294,8 +290,6 @@ sortie -
    Description:Le niveau de compression que nous appliquons la sortie
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_deflate
    Compatibilit:Cette directive est disponible depuis la version 2.0.45 -d'Apache

    La directive DeflateCompressionLevel permet de spcifier le niveau de compression utiliser ; plus @@ -307,7 +301,7 @@ d'Apache

    top
    -

    DeflateFilterNote Directive

    +

    Directive DeflateFilterNote

    @@ -315,8 +309,6 @@ d'Apache -
    Description:Enregistre le taux de compression sous la forme d'une note des fins de journalisation
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_deflate
    Compatibilit:type est disponible depuis la version 2.0.45 -d'Apache

    La directive DeflateFilterNote permet de spcifier qu'une note propos du taux de compression doit tre @@ -324,12 +316,11 @@ d'Apache d'un argument de la directive. Vous pouvez utiliser cette note des fins statistiques en enregistrant sa valeur dans votre journal des accs.

    -

    Exemple

    - DeflateFilterNote ratio
    -
    - LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    - CustomLog logs/deflate_log deflate -

    +

    Exemple

          DeflateFilterNote ratio
    +    
    +      LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    +      CustomLog "logs/deflate_log" deflate
    +

    Pour extraire des informations plus prcises de vos journaux, vous pouvez utiliser l'argument type pour spcifier le @@ -354,14 +345,13 @@ d'Apache

    Vous pouvez donc configurer votre journalisation de la manire suivante :

    -

    Journalisation dtaille

    - DeflateFilterNote Input instream
    - DeflateFilterNote Output outstream
    - DeflateFilterNote Ratio ratio
    -
    - LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    - CustomLog logs/deflate_log deflate -

    +

    Journalisation dtaille

    DeflateFilterNote Input instream
    +DeflateFilterNote Output outstream
    +DeflateFilterNote Ratio ratio
    +
    +LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    +CustomLog "logs/deflate_log" deflate
    +

    Voir aussi

      @@ -369,7 +359,67 @@ d'Apache
    top
    -

    DeflateMemLevel Directive

    +

    Directive DeflateInflateLimitRequestBody

    + + + + + + + + +
    Description:Taille maximale des corps de requte dcompresss
    Syntaxe:DeflateInflateLimitRequestBodyvalue
    Dfaut:Aucune limite, mais LimitRequestBody s'applique aprs la +compression
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_deflate
    Compatibilit:Disponible partir de la version 2.4.10 du serveur HTTP +Apache
    +

    La directive + DeflateInflateLimitRequestBody permet de + spcifier la taille maximale d'un corps de requte dcompress. Si + elle n'est pas dfinie, c'est la valeur de la directive LimitRequestBody qui s'applique au corps + de requte dcompress.

    + +
    +
    top
    +

    Directive DeflateInflateRatioBurst

    + + + + + + + + +
    Description:Nombre maximal de fois que le ratio de dcompression d'un +corps de requte peut tre dpass
    Syntaxe:DeflateInflateRatioBurst value
    Dfaut:3
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_deflate
    Compatibilit:Disponible partir de la version 2.4.10 du serveur HTTP +Apache
    +

    La directive DeflateInflateRatioBurst + permet de spcifier le nombre maximal de fois que la valeur de la + directive DeflateInflateRatioLimit peut tre + dpass avant l'arrt du traitement de la requte.

    + +
    +
    top
    +

    Directive DeflateInflateRatioLimit

    + + + + + + + + +
    Description:Ratio de dcompression maximum pour les corps de requtes
    Syntaxe:DeflateInflateRatioLimit value
    Dfaut:200
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_deflate
    Compatibilit:Disponible partir de la version 2.4.10 du serveur HTTP +Apache
    +

    La directive DeflateInflateRatioLimit + permet de dfinir le ratio maximum entre la taille d'un corps de + requte compress et sa taille dcompresse. Ce ratio est vrifi au + fur et mesure de + l'arrive du corps de requte, et s'il est dpass plus de + DeflateInflateRatioBurst fois, le traitement + de la requte est interrompu.

    + +
    +
    top
    +

    Directive DeflateMemLevel

    @@ -385,7 +435,7 @@ compression
    top
    -
    Description:La quantit de mmoire utilisable par zlib pour la compression
    @@ -406,7 +456,28 @@ compression fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_deflate.html.ja.utf8 b/docs/manual/mod/mod_deflate.html.ja.utf8 index 9b30fa22ceb..a4e63ddcc6d 100644 --- a/docs/manual/mod/mod_deflate.html.ja.utf8 +++ b/docs/manual/mod/mod_deflate.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_deflate - Apache HTTP サーバ +mod_deflate - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_deflate

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Taille de la fentre de compression zlib
    Syntaxe:DeflateWindowSize valeur
    @@ -39,23 +45,26 @@ 出力フィルタを提供します。これはサーバからの出力を、ネットワークを 通してクライアントに送る前に圧縮することを可能にします。

    -
    top

    サンプル設定

    @@ -338,6 +347,46 @@
    top
    +
    説明:クライアントへ送られる前にコンテンツを圧縮する
    ステータス:Extension
    モジュール識別子:deflate_module
    + + + + + + + +
    説明:Maximum size of inflated request bodies
    構文:DeflateInflateLimitRequestBodyvalue
    デフォルト:None, but LimitRequestBody applies after deflation
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    ステータス:Extension
    モジュール:mod_deflate
    互換性:2.4.10 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    DeflateInflateRatioBurst ディレクティブ

    + + + + + + + + +
    説明:Maximum number of times the inflation ratio for request bodies + can be crossed
    構文:DeflateInflateRatioBurst value
    デフォルト:3
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    ステータス:Extension
    モジュール:mod_deflate
    互換性:2.4.10 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    DeflateInflateRatioLimit ディレクティブ

    + + + + + + + + +
    説明:Maximum inflation ratio for request bodies
    構文:DeflateInflateRatioLimit value
    デフォルト:200
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    ステータス:Extension
    モジュール:mod_deflate
    互換性:2.4.10 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    DeflateMemLevel ディレクティブ

    @@ -373,11 +422,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_deflate.html.ko.euc-kr b/docs/manual/mod/mod_deflate.html.ko.euc-kr index 0af2e6a92e6..54af79f4989 100644 --- a/docs/manual/mod/mod_deflate.html.ko.euc-kr +++ b/docs/manual/mod/mod_deflate.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_deflate - Apache HTTP Server +mod_deflate - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >
    説明:zlib が圧縮に使うメモリのレベルを指定
    + + + + + + + +
    :Maximum size of inflated request bodies
    :DeflateInflateLimitRequestBodyvalue
    ⺻:None, but LimitRequestBody applies after deflation
    :ּ, ȣƮ, directory, .htaccess
    :Extension
    :mod_deflate
    :2.4.10 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top
    +

    DeflateInflateRatioBurst þ

    + + + + + + + + +
    :Maximum number of times the inflation ratio for request bodies + can be crossed
    :DeflateInflateRatioBurst value
    ⺻:3
    :ּ, ȣƮ, directory, .htaccess
    :Extension
    :mod_deflate
    :2.4.10 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top
    +

    DeflateInflateRatioLimit þ

    + + + + + + + + +
    :Maximum inflation ratio for request bodies
    :DeflateInflateRatioLimit value
    ⺻:200
    :ּ, ȣƮ, directory, .htaccess
    :Extension
    :mod_deflate
    :2.4.10 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    DeflateMemLevel þ

    @@ -364,7 +412,28 @@  fr  |  ja  |  ko 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_deflate.xml b/docs/manual/mod/mod_deflate.xml index 0eb3637c598..31647d49ec2 100644 --- a/docs/manual/mod/mod_deflate.xml +++ b/docs/manual/mod/mod_deflate.xml @@ -37,46 +37,36 @@ clientFilters +
    Supported Encodings +

    The gzip encoding is the only one supported to ensure complete compatibility + with old browser implementations. The deflate encoding is not supported, + please check the zlib's documentation + for a complete explanation. +

    +
    +
    Enabling Compression + Compression and TLS +

    Some web applications are vulnerable to an information disclosure + attack when a TLS connection carries deflate compressed data. For more + information, review the details of the "BREACH" family of attacks.

    +
    Output Compression

    Compression is implemented by the DEFLATE @@ -84,15 +74,10 @@ client will enable compression for documents in the container where it is placed:

    - - SetOutputFilter DEFLATE - - -

    Some popular browsers cannot handle compression of all content - so you may want to set the gzip-only-text/html note to - 1 to only allow html files to be compressed (see - below). If you set this to anything but 1 it - will be ignored.

    + +SetOutputFilter DEFLATE +SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip +

    If you want to restrict the compression to particular MIME types in general, you may use the enabling compression only for the html files of the Apache documentation:

    - - <Directory "/your-server-root/manual">
    - - AddOutputFilterByType DEFLATE text/html
    -
    - </Directory> -
    - -

    For browsers that have problems even with compression of all file - types, use the BrowserMatch directive to set the no-gzip - note for that particular browser so that no compression will be - performed. You may combine no-gzip with gzip-only-text/html to get the best results. In that case - the former overrides the latter. Take a look at the following - excerpt from the configuration example - defined in the section above:

    - - - BrowserMatch ^Mozilla/4 gzip-only-text/html
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -
    - -

    At first we probe for a User-Agent string that - indicates a Netscape Navigator version of 4.x. These versions - cannot handle compression of types other than - text/html. The versions 4.06, 4.07 and 4.08 also - have problems with decompressing html files. Thus, we completely - turn off the deflate filter for them.

    - -

    The third BrowserMatch - directive fixes the guessed identity of the user agent, because - the Microsoft Internet Explorer identifies itself also as "Mozilla/4" - but is actually able to handle requested compression. Therefore we - match against the additional string "MSIE" (\b means - "word boundary") in the User-Agent Header and turn off - the restrictions defined before.

    + +<Directory "/your-server-root/manual"> + AddOutputFilterByType DEFLATE text/html +</Directory> + Note The DEFLATE filter is always inserted after RESOURCE filters like PHP or SSI. It never touches internal subrequests. Note - There is a environment variable force-gzip, - set via SetEnv, which + There is an environment variable force-gzip, + set via SetEnv, which will ignore the accept-encoding setting of your browser and will send compressed output. @@ -155,18 +107,16 @@ client

    The mod_deflate module also provides a filter for inflating/uncompressing a gzip compressed response body. In order to activate this feature you have to insert the INFLATE filter into - the outputfilter chain using SetOutputFilter or AddOutputFilter, for example:

    - - <Location /dav-area>
    - - ProxyPass http://example.com/
    - SetOutputFilter INFLATE
    -
    - </Location> -
    + +<Location "/dav-area"> + ProxyPass "http://example.com/" + SetOutputFilter INFLATE +</Location> +

    This Example will uncompress gzip'ed output from example.com, so other filters can do further processing with it. @@ -181,13 +131,11 @@ client >SetInputFilter or AddInputFilter, for example:

    - - <Location /dav-area>
    - - SetInputFilter DEFLATE
    -
    - </Location> -
    + +<Location "/dav-area"> + SetInputFilter DEFLATE +</Location> +

    Now if a request contains a Content-Encoding: gzip header, the body will be automatically decompressed. @@ -222,9 +170,9 @@ client in a typical configuration where the addition of the DEFLATE filter depends on the User-Agent, you should add:

    - + Header append Vary User-Agent - +

    If your decision about compression depends on other information than request headers (e.g. HTTP version), you have to set the @@ -232,17 +180,60 @@ client compliant proxies from caching entirely.

    Example + Header set Vary * +
    +
    Serving pre-compressed +content + +

    Since mod_deflate re-compresses content each + time a request is made, some performance benefit can be derived by + pre-compressing the content and telling mod_deflate to serve them + without re-compressing them. This may be accomplished using a + configuration like the following:

    + + +<IfModule mod_headers.c> + # Serve gzip compressed CSS files if they exist + # and the client accepts gzip. + RewriteCond "%{HTTP:Accept-encoding}" "gzip" + RewriteCond "%{REQUEST_FILENAME}\.gz" -s + RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA] + + # Serve gzip compressed JS files if they exist + # and the client accepts gzip. + RewriteCond "%{HTTP:Accept-encoding}" "gzip" + RewriteCond "%{REQUEST_FILENAME}\.gz" -s + RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA] + + + # Serve correct content types, and prevent mod_deflate double gzip. + RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1] + RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1] + + + <FilesMatch "(\.js\.gz|\.css\.gz)$"> + # Serve correct encoding type. + Header append Content-Encoding gzip + + # Force proxies to cache gzipped & + # non-gzipped css/js files separately. + Header append Vary Accept-Encoding + </FilesMatch> +</IfModule> + + +
    + DeflateFilterNote Places the compression ratio in a note for logging DeflateFilterNote [type] notename server configvirtual host -type is available since Apache 2.0.45

    The DeflateFilterNote directive @@ -253,15 +244,17 @@ client >access log.

    Example - DeflateFilterNote ratio
    -
    - LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    - CustomLog logs/deflate_log deflate + + DeflateFilterNote ratio + + LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate + CustomLog "logs/deflate_log" deflate +

    If you want to extract more accurate values from your logs, you can use the type argument to specify the type of data - left as note for logging. type can be one of:

    + left as a note for logging. type can be one of:

    Input
    @@ -279,12 +272,14 @@ client

    Thus you may log it this way:

    Accurate Logging - DeflateFilterNote Input instream
    - DeflateFilterNote Output outstream
    - DeflateFilterNote Ratio ratio
    -
    - LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    - CustomLog logs/deflate_log deflate + +DeflateFilterNote Input instream +DeflateFilterNote Output outstream +DeflateFilterNote Ratio ratio + +LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate +CustomLog "logs/deflate_log" deflate +
    mod_log_config @@ -301,7 +296,14 @@ client

    The DeflateBufferSize directive specifies the size in bytes of the fragments that zlib should compress at one - time.

    + time. If the compressed response size is bigger than the one specified + by this directive then httpd will switch to chunked encoding + (HTTP header Transfer-Encoding set to Chunked), with the + side effect of not setting any Content-Length HTTP header. This is particularly + important when httpd works behind reverse caching proxies or when httpd is configured with + mod_cache and mod_cache_disk because + HTTP responses without any Content-Length header might not be cached. +

    @@ -343,7 +345,6 @@ client Zlib's default server configvirtual host -This directive is available since Apache 2.0.45

    The DeflateCompressionLevel directive specifies @@ -354,6 +355,59 @@ client + +DeflateInflateLimitRequestBody +Maximum size of inflated request bodies +DeflateInflateLimitRequestBodyvalue +None, but LimitRequestBody applies after deflation +server configvirtual host +directory.htaccess +2.4.10 and later + + +

    The DeflateInflateLimitRequestBody directive + specifies the maximum size of an inflated request body. If it is unset, + LimitRequestBody is applied to the + inflated body.

    +
    + + + +DeflateInflateRatioLimit +Maximum inflation ratio for request bodies +DeflateInflateRatioLimit value +200 +server configvirtual host +directory.htaccess +2.4.10 and later + + +

    The DeflateInflateRatioLimit directive + specifies the maximum ratio of deflated to inflated size of an + inflated request body. This ratio is checked as the body is + streamed in, and if crossed more than + DeflateInflateRatioBurst times, the request + will be terminated.

    +
    +
    + + +DeflateInflateRatioBurst +Maximum number of times the inflation ratio for request bodies + can be crossed +DeflateInflateRatioBurst value +3 +server configvirtual host +directory.htaccess +2.4.10 and later + + +

    The DeflateInflateRatioBurst directive + specifies the maximum number of times the + DeflateInflateRatioLimit can be crossed before + terminating the request.

    +
    +
    diff --git a/docs/manual/mod/mod_deflate.xml.fr b/docs/manual/mod/mod_deflate.xml.fr index f221bcec225..f06cc72621f 100644 --- a/docs/manual/mod/mod_deflate.xml.fr +++ b/docs/manual/mod/mod_deflate.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -32,264 +32,252 @@ client deflate_module -

    Le module mod_deflate implémente le filtre de +

    Le module mod_deflate implémente le filtre de sortie DEFLATE qui permet de comprimer la sortie de - votre serveur avant de l'envoyer au client sur le réseau.

    + votre serveur avant de l'envoyer au client sur le réseau.

    Les filtres +
    Codages supportés +

    Le seul codage supporté est gzip afin d'assurer une complète + compatibilité avec les anciens navigateurs. Le codage deflate + n'est donc pas supporté ; voir à ce sujet la documentation de zlib + pour une explication détaillée. +

    +
    +
    Activation de la compression + Compression et TLS +

    Certaines applications web sont vulnérables aux attaques pour + vol d'information lorsque la connexion TLS transmet des données + compressées par deflate. Pour plus d'informations, voir en + détails la famille d'attaques de type "BREACH".

    +
    +
    Compression de la sortie -

    La compression est implémentée par le La compression est implémentée par le filtre DEFLATE. La directive suivante active la compression des documents dans le - conteneur où elle est placée :

    + conteneur où elle est placée :

    - - SetOutputFilter DEFLATE - + +SetOutputFilter DEFLATE +SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip + -

    Certains navigateurs populaires ne gèrent pas la compression de - tous les contenus, et pour résoudre ce problème, vous pouvez - définir la note gzip-only-text/html à 1 - pour ne permettre que la compression des fichiers html (voir - ci-dessous). Si vous définissez cette note à toute autre - valeur que 1, elle sera ignorée.

    - -

    Si vous voulez limiter la compression à certains types MIME +

    Si vous voulez limiter la compression à certains types MIME particuliers, vous pouvez utiliser la directive AddOutputFilterByType. Voici un exemple - où la compression n'est activée que pour les fichiers html de la + où la compression n'est activée que pour les fichiers html de la documentation d'Apache :

    - - <Directory "/racine-de-votre-serveur/manual">
    - - AddOutputFilterByType DEFLATE text/html
    -
    - </Directory> -
    - -

    Pour les navigateurs qui ont des problèmes avec la compression - de tous les types de fichiers, vous pouvez utiliser la directive - BrowserMatch pour - définir la note no-gzip, pour le navigateur - considéré, de façon à ce qu'aucune compression ne soit effectuée. - Vous pouvez combiner no-gzip avec - gzip-only-text/html afin d'obtenir le meilleur - résultat possible. Dans ce cas, la première note l'emporte sur la - deuxième. Considérons l'extrait suivant de l'exemple de configuration de la section - précédente :

    - - - BrowserMatch ^Mozilla/4 gzip-only-text/html
    - BrowserMatch ^Mozilla/4\.0[678] no-gzip
    - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html -
    - -

    Tout d'abord, on recherche un en-tête User-Agent - qui signale un navigateur Netscape version 4.x. Ces versions ne - gèrent pas la compression des types de fichiers autres que - text/html. En outre, les versions 4.06, 4.07 et 4.08 - ont des problèmes avec la décompression des fichiers html. Par - conséquent, nous désactivons complètement le filtre deflate pour - ces derniers.

    - -

    La troisième directive BrowserMatch corrige l'identité - sous laquelle se présente le navigateur ; en effet, Microsoft - Internet Explorer s'identifie aussi lui-même comme "Mozilla/4", - mais par contre, il sait gérer les contenus compressés. On - recherche donc la chaîne additionnelle "MSIE" (\b - signifie "par mots entiers") dans l'en-tête - User-Agent, et si elle est trouvée, on annule les - restrictions définies auparavant.

    + +<Directory "/your-server-root/manual"> + AddOutputFilterByType DEFLATE text/html +</Directory> + Note - Le filtre DEFLATE est toujours inséré après les + Le filtre DEFLATE est toujours inséré après les filtres RESOURCE comme PHP ou SSI. Il n'affecte jamais les - sous-requêtes internes. + sous-requêtes internes. Note - La variable d'environnement force-gzip, définie à + La variable d'environnement force-gzip, définie à l'aide de la directive SetEnv, permet d'ignorer la - configuration de votre navigateur quant aux codages acceptés, et - d'envoyer sans condition une sortie comprimée. + module="mod_env">SetEnv, permet d'ignorer la + configuration de votre navigateur quant aux codages acceptés, et + d'envoyer sans condition une sortie comprimée.
    -
    Décompression de la sortie +
    Décompression de la sortie

    Le module mod_deflate fournit aussi un filtre - permettant de décomprimer un corps de réponse comprimé par gzip. - Pour activer cette fonctionnalité, vous devez insérer le filtre - INFLATE dans la chaîne de filtrage en sortie via la + permettant de décomprimer un corps de réponse comprimé par gzip. + Pour activer cette fonctionnalité, vous devez insérer le filtre + INFLATE dans la chaîne de filtrage en sortie via la directive SetOutputFilter ou AddOutputFilter, comme dans l'exemple suivant :

    - - <Location /dav-area>
    - - ProxyPass http://example.com/
    - SetOutputFilter INFLATE
    -
    - </Location> -
    - -

    Dans cet exemple, les sorties comprimées par gzip en - provenance de example.com seront décomprimées afin de pouvoir - être éventuellement traitées par d'autres filtres. + +<Location "/dav-area"> + ProxyPass "http://example.com/" + SetOutputFilter INFLATE +</Location> + + +

    Dans cet exemple, les sorties comprimées par gzip en + provenance de example.com seront décomprimées afin de pouvoir + être éventuellement traitées par d'autres filtres.

    -
    Décompression de l'entrée -

    Le module mod_deflate fournit également un filtre - permettant de décomprimer un corps de requête comprimé par gzip. - Pour activer cette fonctionnalité, vous devez insérer le filtre - DEFLATE dans la chaîne de filtrage en entrée via la +

    Décompression de l'entrée +

    Le module mod_deflate fournit également un filtre + permettant de décomprimer un corps de requête comprimé par gzip. + Pour activer cette fonctionnalité, vous devez insérer le filtre + DEFLATE dans la chaîne de filtrage en entrée via la directive SetInputFilter ou AddInputFilter, comme dans l'exemple suivant :

    - - <Location /dav-area>
    - - SetInputFilter DEFLATE
    -
    - </Location> -
    + +<Location "/dav-area"> + SetInputFilter DEFLATE +</Location> + -

    Désormais, si une requête contient un en-tête +

    Désormais, si une requête contient un en-tête Content-Encoding: gzip, son corps sera - automatiquement décomprimé. Peu de navigateurs sont actuellement - en mesure de comprimer les corps de requêtes. Cependant, - certaines applications spécialisées supportent les requêtes - comprimées, comme par exemple certains clients WebDAV.

    - Note à propos de l'en-tête + <note type="warning"><title>Note à propos de l'en-tête <code>Content-Length</code> -

    Si vous évaluez vous-même la taille du corps de requête, - ne faites pas confiance à l'en-tête - Content-Length! L'en-tête - Content-Length indique la longueur des données en provenance du - client, et non la quantité d'octets que représente le - flux de données décompressé.

    +

    Si vous évaluez vous-même la taille du corps de requête, + ne faites pas confiance à l'en-tête + Content-Length! L'en-tête + Content-Length indique la longueur des données en provenance du + client, et non la quantité d'octets que représente le + flux de données décompressé.

    Prise en compte des serveurs mandataires -

    Le module mod_deflate envoie un en-tête de - réponse HTTP Vary: Accept-Encoding pour avertir les - mandataires qu'une réponse enregistrée dans le cache ne doit être - envoyée qu'aux clients qui ont envoyé l'en-tête de requête - Accept-Encoding approprié. Ceci permet d'éviter l'envoi - d'un contenu comprimé à un client qui ne sera pas en mesure - de l'interpréter.

    - -

    Si vous avez défini des exclusions spécifiques dépendant, par - exemple, de l'en-tête User-Agent, vous devez - ajouter manuellement des données à l'en-tête Vary afin - d'informer les mandataires des restrictions supplémentaires. Par - exemple, dans la configuration classique où l'addition du filtre - DEFLATE dépend du contenu de l'en-tête - User-Agent, vous devez spécifier :

    - - +

    Le module mod_deflate envoie un en-tête de + réponse HTTP Vary: Accept-Encoding pour avertir les + mandataires qu'une réponse enregistrée dans le cache ne doit être + envoyée qu'aux clients qui ont envoyé l'en-tête de requête + Accept-Encoding approprié. Ceci permet d'éviter l'envoi + d'un contenu comprimé à un client qui ne sera pas en mesure + de l'interpréter.

    + +

    Si vous avez défini des exclusions spécifiques dépendant, par + exemple, de l'en-tête User-Agent, vous devez + ajouter manuellement des données à l'en-tête Vary afin + d'informer les mandataires des restrictions supplémentaires. Par + exemple, dans la configuration classique où l'addition du filtre + DEFLATE dépend du contenu de l'en-tête + User-Agent, vous devez spécifier :

    + + Header append Vary User-Agent -
    + -

    Si votre décision de comprimer le contenu dépend d'autres - informations que celles contenues dans les en-têtes de la requête - (par exemple la version HTTP), vous devez attribuer à l'en-tête - Vary la valeur *, ce qui permet d'empêcher +

    Si votre décision de comprimer le contenu dépend d'autres + informations que celles contenues dans les en-têtes de la requête + (par exemple la version HTTP), vous devez attribuer à l'en-tête + Vary la valeur *, ce qui permet d'empêcher les mandataires compatibles de tout mettre en cache.

    Exemple + Header set Vary * +
    +
    Servir du contenu précompressé + +

    Comme mod_deflate recompresse le contenu demandé à + chaque requête, il est possible de gagner en performances en + précompressant ce contenu, et en forçant mod_deflate à servir ce + contenu précompressé sans avoir à le recompresser à chaque requête. + Pour ce faire, utilisez une configuration du style :

    + + +<IfModule mod_headers.c> + # Servir des fichiers CSS compressés avec gzip, s'ils existent, et + # si le client accepte gzip. + RewriteCond "%{HTTP:Accept-encoding}" "gzip" + RewriteCond "%{REQUEST_FILENAME}\.gz" "-s" + RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA] + + # Servir des fichiers JS compressés avec gzip, s'ils existent, et + # si le client accepte gzip. + RewriteCond "%{HTTP:Accept-encoding}" "gzip" + RewriteCond "%{REQUEST_FILENAME}\.gz" "-s" + RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA] + + + # Servir des types de contenus corrects, et empêcher mod_deflate + # d'effectuer un double gzip. + RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1] + RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1] + + + <FilesMatch "(\.js\.gz|\.css\.gz)$"> + # Servir le type de codage correct. + Header append Content-Encoding gzip + + # Force les mandataires à mettre en cache séparément les fichiers + # css/js gzippés & non gzippés. + Header append Vary Accept-Encoding + </FilesMatch> +</IfModule> + + +
    + DeflateFilterNote Enregistre le taux de compression sous la forme d'une note -à des fins de journalisation +à des fins de journalisation DeflateFilterNote [type] nom de la note server configvirtual host -type est disponible depuis la version 2.0.45 -d'Apache

    La directive DeflateFilterNote permet de - spécifier qu'une note à propos du taux de compression doit être - attachée à la requête. Le nom de la note est passé sous la forme - d'un argument de la directive. Vous pouvez utiliser cette note à des + spécifier qu'une note à propos du taux de compression doit être + attachée à la requête. Le nom de la note est passé sous la forme + d'un argument de la directive. Vous pouvez utiliser cette note à des fins statistiques en enregistrant sa valeur dans votre journal des accès.

    + href="../logs.html#accesslog">journal des accès.

    Exemple - DeflateFilterNote ratio
    -
    - LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
    - CustomLog logs/deflate_log deflate + + DeflateFilterNote ratio + + LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate + CustomLog "logs/deflate_log" deflate +
    -

    Pour extraire des informations plus précises de vos journaux, - vous pouvez utiliser l'argument type pour spécifier le - type de données de la note enregistrée dans le journal. +

    Pour extraire des informations plus précises de vos journaux, + vous pouvez utiliser l'argument type pour spécifier le + type de données de la note enregistrée dans le journal. type peut prendre une des valeurs suivantes :

    Input
    -
    Enregistre dans la note la taille en octets du flux en entrée +
    Enregistre dans la note la taille en octets du flux en entrée du filtre.
    Output
    @@ -297,21 +285,23 @@ d'Apache du filtre.
    Ratio
    -
    Enregistre le taux de compression (sortie/entrée * - 100) dans la note. Il s'agit de la valeur par défaut si +
    Enregistre le taux de compression (sortie/entrée * + 100) dans la note. Il s'agit de la valeur par défaut si l'argument type est omis.
    -

    Vous pouvez donc configurer votre journalisation de la manière +

    Vous pouvez donc configurer votre journalisation de la manière suivante :

    - Journalisation détaillée - DeflateFilterNote Input instream
    - DeflateFilterNote Output outstream
    - DeflateFilterNote Ratio ratio
    -
    - LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
    - CustomLog logs/deflate_log deflate + Journalisation détaillée + +DeflateFilterNote Input instream +DeflateFilterNote Output outstream +DeflateFilterNote Ratio ratio + +LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate +CustomLog "logs/deflate_log" deflate +
    mod_log_config @@ -328,14 +318,23 @@ fois

    La directive DeflateBufferSize permet de - spécifier la taille en octets du fragment que zlib devra comprimer - en une seule fois.

    + spécifier la taille en octets du fragment que zlib devra comprimer + en une seule fois. Si la taille de la réponse compressée est supérieure à + celle spécifiée par cette directive, httpd passera à un mode d'encodage + fragmenté (l'en-tête HTTP Transfer-Encoding prend la valeur + Chunked), ceci ayant comme effet de bord de ne définir aucun + en-tête HTTP Content-Length. Il est important de connaître ce + comportement, particulièrement lorsque httpd travaille derrière des + mandataires inverses avec mise en cache, ou lorsque httpd est configuré pour + utiliser mod_cache et mod_cache_disk car + les réponses HTTP sans en-tête Content-Length peuvent ne pas + être mises en cache.

    DeflateWindowSize -Taille de la fenêtre de compression zlib +Taille de la fenêtre de compression zlib DeflateWindowSize valeur DeflateWindowSize 15 server configvirtual host @@ -343,8 +342,8 @@ fois

    La directive DeflateWindowSize permet de - spécifier la fenêtre de compression zlib (une valeur comprise entre - 1 et 15). En général, plus grande sera la taille de la fenêtre, plus + spécifier la fenêtre de compression zlib (une valeur comprise entre + 1 et 15). En général, plus grande sera la taille de la fenêtre, plus grand sera le taux de compression auquel on pourra s'attendre.

    @@ -352,7 +351,7 @@ fois DeflateMemLevel -La quantité de mémoire utilisable par zlib pour la +La quantité de mémoire utilisable par zlib pour la compression DeflateMemLevel valeur DeflateMemLevel 9 @@ -361,33 +360,91 @@ compression

    La directive DeflateMemLevel permet de - spécifier la quantité de mémoire utilisable par zlib pour la + spécifier la quantité de mémoire utilisable par zlib pour la compression (une valeur comprise entre 1 et 9).

    DeflateCompressionLevel -Le niveau de compression que nous appliquons à la +Le niveau de compression que nous appliquons à la sortie DeflateCompressionLevel valeur -La valeur par défaut de zlib +La valeur par défaut de zlib server configvirtual host -Cette directive est disponible depuis la version 2.0.45 -d'Apache

    La directive DeflateCompressionLevel - permet de spécifier le niveau de compression à utiliser ; plus + permet de spécifier le niveau de compression à utiliser ; plus grande est la valeur, meilleure sera la compression, mais plus grand - sera aussi le temps CPU nécessaire pour effectuer le + sera aussi le temps CPU nécessaire pour effectuer le traitement.

    -

    La valeur doit être comprise entre 1 (compression minimale) et 9 +

    La valeur doit être comprise entre 1 (compression minimale) et 9 (compression maximale).

    + +DeflateInflateLimitRequestBody +Taille maximale des corps de requête décompressés +DeflateInflateLimitRequestBodyvalue +Aucune limite, mais LimitRequestBody s'applique après la +compression +server configvirtual host +directory.htaccess +Disponible à partir de la version 2.4.10 du serveur HTTP +Apache + + +

    La directive + DeflateInflateLimitRequestBody permet de + spécifier la taille maximale d'un corps de requête décompressé. Si + elle n'est pas définie, c'est la valeur de la directive LimitRequestBody qui s'applique au corps + de requête décompressé.

    +
    +
    + + +DeflateInflateRatioLimit +Ratio de décompression maximum pour les corps de requêtes +DeflateInflateRatioLimit value +200 +server configvirtual host +directory.htaccess +Disponible à partir de la version 2.4.10 du serveur HTTP +Apache + + +

    La directive DeflateInflateRatioLimit + permet de définir le ratio maximum entre la taille d'un corps de + requête compressé et sa taille décompressée. Ce ratio est vérifié au + fur et à mesure de + l'arrivée du corps de requête, et s'il est dépassé plus de + DeflateInflateRatioBurst fois, le traitement + de la requête est interrompu.

    +
    +
    + + +DeflateInflateRatioBurst +Nombre maximal de fois que le ratio de décompression d'un +corps de requête peut être dépassé +DeflateInflateRatioBurst value +3 +server configvirtual host +directory.htaccess +Disponible à partir de la version 2.4.10 du serveur HTTP +Apache + + +

    La directive DeflateInflateRatioBurst + permet de spécifier le nombre maximal de fois que la valeur de la + directive DeflateInflateRatioLimit peut être + dépassé avant l'arrêt du traitement de la requête.

    +
    +
    diff --git a/docs/manual/mod/mod_deflate.xml.ja b/docs/manual/mod/mod_deflate.xml.ja index bca23f2d828..2c49161b65a 100644 --- a/docs/manual/mod/mod_deflate.xml.ja +++ b/docs/manual/mod/mod_deflate.xml.ja @@ -1,7 +1,7 @@ - + + -mod_dialup - Apache HTTP Server +mod_dialup - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dialup

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    :zlib Ҷ ϴ ޸𸮷
    @@ -33,11 +39,10 @@ by the various old modem standards. So, you can browse your site with a 56k V.92 modem, by adding something like this:

    -

    -<Location /mysite>
    -ModemStandard V.92
    -</Location> -

    +
    <Location "/mysite">
    +    ModemStandard "V.92"
    +</Location>
    +

    Previously to do bandwidth rate limiting modules would have to block an entire thread, for each client, and insert sleeps to slow the bandwidth down. @@ -49,31 +54,54 @@ once the timer hits. From there the handler can continue to send data to the cl

    - +

    Bugfix checklist

    See also

    +
    top
    Description:Send static content at a bandwidth rate limit, defined by the various old modem standards
    Status:Experimental
    - - + +
    Description:Modem standard to simulate
    Syntax:ModemStandard V.21|V.26bis|V.32|V.92
    Context:
    Syntax:ModemStandard V.21|V.26bis|V.32|V.34|V.92
    Context:directory
    Status:Experimental
    Module:mod_dialup

    Specify what modem standard you wish to simulate.

    -

    -<Location /mysite>
    -ModemStandard V.26bis
    -</Location> -

    +
    <Location "/mysite">
    +    ModemStandard "V.26bis"
    +</Location>
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dialup.html.fr b/docs/manual/mod/mod_dialup.html.fr new file mode 100644 index 00000000000..8a25a5220a7 --- /dev/null +++ b/docs/manual/mod/mod_dialup.html.fr @@ -0,0 +1,113 @@ + + + + + +mod_dialup - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dialup

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Envoie le contenu statique avec une bande passante limite +dfinie par les diffrents standards des anciens modems.
    Statut:Exprimental
    IdentificateurdeModule:dialup_module
    FichierSource:mod_dialup.c
    +

    Sommaire

    + +

    Il s'agit d'un module qui envoie le contenu statique avec une bande +passante limite dfinie par les diffrents standards des anciens +modems. Ainsi, il est possible de naviguer sur votre site avec un modem +56k V.92 en positionnant une configuration de ce type :

    + +
    <Location "/mysite">
    +    ModemStandard "V.92"
    +</Location>
    + + +

    Auparavant, pour faire des modules de limitation de bande passante, +il fallait monopoliser un thread, pour chaque client, et insrer des +temporisations pour diminuer la bande passante. Grce cette nouvelle +fonctionnalit, un gestionnaire peut recevoir les rponses ses +callbacks aprs N millisecondes, et il sera invoqu par le module MPM +Event dans un thread diffrent la fin du dlai indiqu. partir de ce +moment, le gestionnaire peut continuer envoyer des donnes au +client.

    +
    + + +
    top
    +

    Directive ModemStandard

    + + + + + + +
    Description:Standard de modem simuler
    Syntaxe:ModemStandard V.21|V.26bis|V.32|V.34|V.92
    Contexte:rpertoire
    Statut:Exprimental
    Module:mod_dialup
    +

    Cette directive permet de spcifier le standard de modem que vous +souhaitez simuler.

    + +
    <Location "/mysite">
    +    ModemStandard "V.26bis"
    +</Location>
    + + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dialup.xml b/docs/manual/mod/mod_dialup.xml index 5b5b5743c5e..d17dd989730 100644 --- a/docs/manual/mod/mod_dialup.xml +++ b/docs/manual/mod/mod_dialup.xml @@ -36,11 +36,11 @@ the document to validate. --> by the various old modem standards. So, you can browse your site with a 56k V.92 modem, by adding something like this:

    - -<Location /mysite>
    -ModemStandard V.92
    + +<Location "/mysite"> + ModemStandard "V.92" </Location> -
    +

    Previously to do bandwidth rate limiting modules would have to block an entire thread, for each client, and insert sleeps to slow the bandwidth down. @@ -52,16 +52,17 @@ once the timer hits. From there the handler can continue to send data to the cl ModemStandard Modem standard to simulate -ModemStandard V.21|V.26bis|V.32|V.92 +ModemStandard V.21|V.26bis|V.32|V.34|V.92 +directory

    Specify what modem standard you wish to simulate.

    - -<Location /mysite>
    -ModemStandard V.26bis
    + +<Location "/mysite"> + ModemStandard "V.26bis" </Location> -
    + diff --git a/docs/manual/mod/mod_dialup.xml.fr b/docs/manual/mod/mod_dialup.xml.fr new file mode 100644 index 00000000000..1ce15a1deab --- /dev/null +++ b/docs/manual/mod/mod_dialup.xml.fr @@ -0,0 +1,80 @@ + + + + + + + + + + + + +mod_dialup +Envoie le contenu statique avec une bande passante limitée +définie par les différents standards des anciens modems. +Experimental +mod_dialup.c +dialup_module + + +

    Il s'agit d'un module qui envoie le contenu statique avec une bande +passante limitée définie par les différents standards des anciens +modems. Ainsi, il est possible de naviguer sur votre site avec un modem +56k V.92 en positionnant une configuration de ce type :

    + + +<Location "/mysite"> + ModemStandard "V.92" +</Location> + + +

    Auparavant, pour faire des modules de limitation de bande passante, +il fallait monopoliser un thread, pour chaque client, et insérer des +temporisations pour diminuer la bande passante. Grâce à cette nouvelle +fonctionnalité, un gestionnaire peut recevoir les réponses à ses +callbacks après N millisecondes, et il sera invoqué par le module MPM +Event dans un thread différent à la fin du délai indiqué. À partir de ce +moment, le gestionnaire peut continuer à envoyer des données au +client.

    +
    + + +ModemStandard +Standard de modem à simuler +ModemStandard V.21|V.26bis|V.32|V.34|V.92 +directory + + +

    Cette directive permet de spécifier le standard de modem que vous +souhaitez simuler.

    + + +<Location "/mysite"> + ModemStandard "V.26bis" +</Location> + + +
    + +
    + +
    + diff --git a/docs/manual/mod/mod_dialup.xml.meta b/docs/manual/mod/mod_dialup.xml.meta index 2e97593ac8b..94c273fb3d4 100644 --- a/docs/manual/mod/mod_dialup.xml.meta +++ b/docs/manual/mod/mod_dialup.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_dir.html.en b/docs/manual/mod/mod_dir.html.en index 22cf952b54f..877fd658791 100644 --- a/docs/manual/mod/mod_dir.html.en +++ b/docs/manual/mod/mod_dir.html.en @@ -1,23 +1,28 @@ - -mod_dir - Apache HTTP Server +mod_dir - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dir

    @@ -58,13 +63,44 @@
    +

    Bugfix checklist

    See also

    +
    + +
    top
    +

    DirectoryCheckHandler Directive

    + + + + + + + + + +
    Description:Toggle how this module responds when another handler is configured
    Syntax:DirectoryCheckHandler On|Off
    Default:DirectoryCheckHandler Off
    Context:server config, virtual host, directory, .htaccess
    Override:Indexes
    Status:Base
    Module:mod_dir
    Compatibility:Available in 2.4.8 and later. Releases prior to 2.4 implicitly +act as if "DirectoryCheckHandler ON" was specified.
    +

    The DirectoryCheckHandler directive determines + whether mod_dir should check for directory indexes or + add trailing slashes when some other handler has been configured for + the current URL. Handlers can be set by directives such as + SetHandler or by other modules, + such as mod_rewrite during per-directory substitutions. +

    + +

    In releases prior to 2.4, this module did not take any action if any + other handler was configured for a URL. This allows directory indexes to + be served even when a SetHandler directive is + specified for an entire directory, but it can also result in some conflicts + with modules such as mod_rewrite.

    +
    top

    DirectoryIndex Directive

    @@ -89,9 +125,8 @@ a directory set, the server will generate its own listing of the directory.

    -

    Example

    - DirectoryIndex index.html -

    +

    Example

    DirectoryIndex index.html
    +

    then a request for http://example.com/docs/ would return http://example.com/docs/index.html if it @@ -100,19 +135,42 @@ a directory

    Note that the documents do not need to be relative to the directory;

    -

    - DirectoryIndex index.html index.txt /cgi-bin/index.pl -

    +
    DirectoryIndex index.html index.txt  /cgi-bin/index.pl
    +

    would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt existed in a directory.

    A single argument of "disabled" prevents mod_dir from - searching for an index. An argument of "disabled" will be interpeted + searching for an index. An argument of "disabled" will be interpreted literally if it has any arguments before or after it, even if they are "disabled" as well.

    +

    Note: Multiple DirectoryIndex + directives within the same context will add + to the list of resources to look for rather than replace: +

    +
    # Example A: Set index.html as an index page, then add index.php to that list as well.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex index.php
    +</Directory>
    +
    +# Example B: This is identical to example A, except it's done with a single directive.
    +<Directory "/foo">
    +    DirectoryIndex index.html index.php
    +</Directory>
    +
    +# Example C: To replace the list, you must explicitly reset it first:
    +# In this example, only index.php will remain as an index resource.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex disabled
    +    DirectoryIndex index.php
    +</Directory>
    + +
    top
    @@ -134,9 +192,19 @@ a directory and returned transparently to the client. DirectoryIndexRedirect causes an external redirect to instead be issued.

    -

    Example

    - DirectoryIndexRedirect on -

    +

    The argument can be:

    +
      +
    • on: issues a 302 redirection to the index resource.
    • +
    • off: does not issue a redirection. This is the legacy behaviour of mod_dir.
    • +
    • permanent: issues a 301 (permanent) redirection to the index resource.
    • +
    • temp: this has the same effect as on
    • +
    • seeother: issues a 303 redirection (also known as "See Other") to the index resource.
    • +
    • 3xx-code: issues a redirection marked by the chosen 3xx code.
    • +
    + + +

    Example

    DirectoryIndexRedirect on
    +

    A request for http://example.com/docs/ would return a temporary redirect to http://example.com/docs/index.html @@ -154,7 +222,6 @@ a directory

    -
    Override:Indexes
    Status:Base
    Module:mod_dir
    Compatibility:Available in version 2.0.51 and later

    The DirectorySlash directive determines whether mod_dir should fixup URLs pointing to a directory or @@ -178,15 +245,12 @@ a directory be aware that there are possible security implications to doing this.

    -

    - # see security warning below!
    - <Location /some/path>
    - - DirectorySlash Off
    - SetHandler some-handler
    -
    - </Location> -

    +
    # see security warning below!
    +<Location "/some/path">
    +    DirectorySlash Off
    +    SetHandler some-handler
    +</Location>
    +

    Security Warning

    Turning off the trailing slash redirect may result in an information @@ -197,25 +261,28 @@ a directory index.html file. But a request without trailing slash would list the directory contents.

    +

    Also note that some browsers may erroneously change POST requests into GET + (thus discarding POST data) when a redirect is issued.

    top

    FallbackResource Directive

    - - + + +
    Description:Define a default URL for requests that don't map to a file
    Syntax:FallbackResource local-url
    Default:None - httpd will return 404 (Not Found)
    Syntax:FallbackResource disabled | local-url
    Default:disabled - httpd will return 404 (Not Found)
    Context:server config, virtual host, directory, .htaccess
    Override:Indexes
    Status:Base
    Module:mod_dir
    Compatibility:The disabled argument is available in version 2.4.4 and +later

    Use this to set a handler for any URL that doesn't map to anything in your filesystem, and would otherwise return HTTP 404 (Not Found). For example

    -

    - FallbackResource /not-404.php -

    +
    FallbackResource /not-404.php
    +

    will cause requests for non-existent files to be handled by not-404.php, while requests for files that exist are unaffected.

    @@ -227,22 +294,21 @@ a directory mod_rewrite, and the use of the -f and -d tests for file and directory existence. This now requires only one line of configuration.

    -

    - FallbackResource /index.php -

    +
    FallbackResource /index.php
    +

    Existing files, such as images, css files, and so on, will be served normally.

    +

    Use the disabled argument to disable that feature + if inheritance from a parent directory is not desired.

    In a sub-URI, such as http://example.com/blog/ this sub-URI has to be supplied as local-url:

    -

    - - <Directory /web/example.com/htdocs/blog>
    - - FallbackResource /blog/index.php
    -
    - </Directory> -
    -

    +
    <Directory "/web/example.com/htdocs/blog">
    +    FallbackResource /blog/index.php
    +</Directory>
    +<Directory "/web/example.com/htdocs/blog/images">
    +    FallbackResource disabled
    +</Directory>
    +
    @@ -252,7 +318,28 @@ a directory  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dir.html.fr b/docs/manual/mod/mod_dir.html.fr index 1982b7da751..f227757a43b 100644 --- a/docs/manual/mod/mod_dir.html.fr +++ b/docs/manual/mod/mod_dir.html.fr @@ -1,23 +1,28 @@ - -mod_dir - Serveur Apache HTTP +mod_dir - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules
    + +
    top
    +

    Directive DirectoryCheckHandler

    + + + + + + + + + +
    Description:Dfinit la rponse de ce module lorsqu'un autre +gestionnaire est utilis
    Syntaxe:DirectoryCheckHandler On|Off
    Dfaut:DirectoryCheckHandler Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Base
    Module:mod_dir
    Compatibilit:Disponible depuis la version 2.4.8 du serveur HTTP +Apache. Les versions antrieures 2.4 se comportaient implicitement +comme si "DirectoryCheckHandler ON" avait t spcifi.
    +

    La directive DirectoryCheckHandler permet + de faire en sorte que mod_dir recherche un index + de rpertoire ou ajoute des slashes de fin lorsqu'un autre + gestionnaire t dfini pour l'URL considre. Les gestionnaires + peuvent tre dfinis via des directives telles que + SetHandler ou par d'autres + modules tels que mod_rewrite au cours des + substitutions de niveau rpertoire.

    + +

    Dans les versions antrieures 2.4, ce module ne modifiait pas son + comportement si un autre gestionnaire avait t dfini pour l'URL + considre. Ceci permettait de servir des index de rpertoires mme si une + directive SetHandler avait t dfinie pour un + rpertoire entier, mais pouvait aussi tre l'origine de conflits avec + d'autres modules comme mod_rewrite.

    +
    top
    -

    DirectoryIndex Directive

    +

    Directive DirectoryIndex

    @@ -92,9 +132,8 @@ client envoie une requ Indexes est dfinie, le serveur gnrera son propre listing du rpertoire.

    -

    Exemple

    - DirectoryIndex index.html -

    +

    Exemple

    DirectoryIndex index.html
    +

    Avec cette configuration, une requte pour l'URL http://example.com/docs/ renverrait au client la @@ -105,9 +144,8 @@ client envoie une requ

    Notez qu'il n'est pas ncessaire que les documents soient relatifs au rpertoire ;

    -

    - DirectoryIndex index.html index.txt /cgi-bin/index.pl -

    +
    DirectoryIndex index.html index.txt  /cgi-bin/index.pl
    +

    provoquerait l'excution du script CGI /cgi-bin/index.pl si aucun des fichiers @@ -120,10 +158,33 @@ client envoie une requ arguments sont prsents avant ou aprs lui, mme s'ils sont eux-mmes des arguments "disabled".

    +

    Note: Positionner plusieurs directives DirectoryIndex + au coeur du mme context complte la liste des ressources et ne l'crase pas : +

    +
    # Exemple A: Positionner index.html en page d'index, puis ajouter index.php.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex index.php
    +</Directory>
    +
    +# Exemple B: La mme chose que l'exemple A, mais ralis au moyen d'une seule directive.
    +<Directory "/foo">
    +    DirectoryIndex index.html index.php
    +</Directory>
    +
    +# Exemple C: Pour remplacer la liste des ressources, il faut d'abord la vider :
    +# Ici, seul index.php restera rfrenc comme ressource d'index.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex disabled
    +    DirectoryIndex index.php
    +</Directory>
    + +
    top
    -
    Description:Liste des fichiers ressources rechercher lorsque le client envoie une requte pour un rpertoire
    Gardez cependant l'esprit que ceci peut avoir des rpercutions en matire de scurit.

    -

    - # voir l'avertissement de scurit ci-dessous !
    - <Location /un/chemin>
    - - DirectorySlash Off
    - SetHandler un-gestionnaire
    -
    - </Location> -

    +
    # voir l'avertissement de scurit ci-dessous !
    +<Location "/some/path">
    +    DirectorySlash Off
    +    SetHandler some-handler
    +</Location>
    +

    Avertissement de scurit

    La dsactivation de la redirection "slash de fin" peut entraner @@ -219,28 +286,32 @@ d'Apache de fin afficherait un listing du contenu du rpertoire.

    +

    Notez aussi que certains navigateurs peuvent modifier par erreur + des requtes POST en requtes GET lors d'une redirection, les + donnes POST tant alors perdues.

    top
    -
    Description:Dfinit une redirection externe pour les index de rpertoires. @@ -142,11 +203,22 @@ r DirectoryIndex qui est slectionne et renvoye de manire transparente au client. La directive DirectoryIndexRedirect permet de rediriger le - client vers une ressource externe.

    + client via une redirection de type 3xx.

    + +

    Les arguments accepts sont :

    +
      +
    • on : envoie une redirection 302 vers l'index choisi.
    • +
    • off : n'envoie aucune redirection. Il s'agit du comportement historique de mod_dir.
    • +
    • permanent : envoie une redirection 301 (permanent) vers l'index choisi.
    • +
    • temp : ceci est quivalent on
    • +
    • seeother : envoie une redirection 303 (galement appele "See Other") vers l'index choisi.
    • +
    • 3xx-code : envoie une redirection accompagne du code 3xx choisi.
    • +
    -

    Exemple

    - DirectoryIndexRedirect on -

    + + +

    Exemple

    DirectoryIndexRedirect on
    +

    Une requte pour http://example.com/docs/ se solderait par une redirection temporaire vers @@ -156,7 +228,7 @@ r

    top
    -

    DirectorySlash Directive

    +

    Directive DirectorySlash

    @@ -166,8 +238,6 @@ fin" -
    Description:Activation/Dsactivation de la redirection "slash de fin"
    AllowOverride:Indexes
    Statut:Base
    Module:mod_dir
    Compatibilit:Disponible depuis le version 2.0.51 -d'Apache

    La directive DirectorySlash permet de dterminer si mod_dir doit corriger ou non les URLs @@ -197,15 +267,12 @@ d'Apache

    - - + + +
    Description:Dfinit une URL par dfaut pour les requtes qui ne ciblent aucun fichier
    Syntaxe:FallbackResource url-locale
    Dfaut:Aucune - httpd renvoie un code d'erreur 404 (Not Found)
    Syntaxe:FallbackResource disabled | url-locale
    Dfaut:disabled - httpd renvoie un code d'erreur 404 (Not Found)
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Base
    Module:mod_dir
    Compatibilit:L'argument disabled est disponible partir +de la version 2.4.4 du serveur HTTP Apache.

    Cette directive permet de dfinir un traitement pour toute URL qui ne correspond aucune ressource de votre systme de fichiers, et qui provoquerait sans cela l'envoi d'un code d'erreur HTTP 404 (Not Found). Par exemple

    -

    - FallbackResource /not-404.php -

    +
    FallbackResource /not-404.php
    +

    fait en sorte que les requtes ne correspondant aucun fichier soient traites par non-404.php, sans affecter les requtes pour des fichiers existants.

    @@ -254,23 +325,23 @@ aucun fichier conditionnels -f et -d pour vrifier l'existence des fichiers et rpertoires. Maintenant, une seule ligne de configuration est ncessaire.

    -

    - FallbackResource /index.php -

    +
    FallbackResource /index.php
    +

    Les fichiers existants comme des images, des fichiers css, etc... seront traits normalement.

    +

    L'argument disabled permet de dsactiver cette + fonctionnalit dans le cas o l'hritage d'un rpertoire parent + n'est pas souhait.

    Pour un URI intermdiaire tel que http://example.com/blog/, cet URI intermdiaire doit tre spcifi en tant que url-locale :

    -

    - - <Directory /web/example.com/htdocs/blog>
    - - FallbackResource /blog/index.php
    -
    - </Directory> -
    -

    +
    <Directory "/web/example.com/htdocs/blog">
    +    FallbackResource /blog/index.php
    +</Directory>
    +<Directory "/web/example.com/htdocs/blog/images">
    +    FallbackResource disabled
    +</Directory>
    +
    @@ -280,7 +351,28 @@ aucun fichier  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dir.html.ja.utf8 b/docs/manual/mod/mod_dir.html.ja.utf8 index fe89479d988..576d65c394a 100644 --- a/docs/manual/mod/mod_dir.html.ja.utf8 +++ b/docs/manual/mod/mod_dir.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_dir - Apache HTTP サーバ +mod_dir - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_dir

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -65,13 +71,31 @@ +

    Bugfix checklist

    参照

    + +
    top
    +
    説明:「最後のスラッシュ」のリダイレクトと、ディレクトリの インデックスファイルを扱う機能を提供する
    ステータス:Base
    + + + + + + + + +
    説明:Toggle how this module responds when another handler is configured
    構文:DirectoryCheckHandler On|Off
    デフォルト:DirectoryCheckHandler Off
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    上書き:Indexes
    ステータス:Base
    モジュール:mod_dir
    互換性:Available in 2.4.8 and later. Releases prior to 2.4 implicitly +act as if "DirectoryCheckHandler ON" was specified.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    DirectoryIndex ディレクティブ

    @@ -132,9 +156,9 @@ -
    ステータス:Base
    モジュール:mod_dir
    互換性:Available in version 2.3.14 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    DirectorySlash ディレクティブ

    @@ -205,12 +229,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dir.html.ko.euc-kr b/docs/manual/mod/mod_dir.html.ko.euc-kr index 73f61480b36..e2ba19020e2 100644 --- a/docs/manual/mod/mod_dir.html.ko.euc-kr +++ b/docs/manual/mod/mod_dir.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_dir - Apache HTTP Server +mod_dir - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >
    + + + + + + + + +
    :Toggle how this module responds when another handler is configured
    :DirectoryCheckHandler On|Off
    ⺻:DirectoryCheckHandler Off
    :ּ, ȣƮ, directory, .htaccess
    Override ɼ:Indexes
    :Base
    :mod_dir
    :Available in 2.4.8 and later. Releases prior to 2.4 implicitly +act as if "DirectoryCheckHandler ON" was specified.

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    top

    DirectoryIndex þ

    @@ -196,7 +219,28 @@ index  ja  |  ko  |  tr 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dir.html.tr.utf8 b/docs/manual/mod/mod_dir.html.tr.utf8 index d9346f14fbf..eada369e0d3 100644 --- a/docs/manual/mod/mod_dir.html.tr.utf8 +++ b/docs/manual/mod/mod_dir.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_dir - Apache HTTP Sunucusu +mod_dir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_dir

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -48,22 +52,56 @@ kendiliğinden dizin içerik listesi üretimini tamamen iptal edebilirsiniz.

    -

    Sunucu http://sunucum/filanca/birdizin şeklinde bir istek - aldığında birdizin bir dizinin ismiyse ‘bölü çizgisiyle - biten’ bir yönlendirme söz konusudur. Dizinler URL sonuna bir bölü - çizgisi eklenmesini gerektirir, bu bakımdan mod_dir - modülü isteği http://sunucum/filanca/birdizin/ şeklinde +

    Sunucu http://example.com/filanca/birdizin şeklinde bir + istek aldığında birdizin bir dizinin ismiyse ‘bölü + çizgisiyle biten’ bir yönlendirme söz konusudur. Dizinler URL sonuna bir + bölü çizgisi eklenmesini gerektirir, bu bakımdan mod_dir + modülü isteği http://example.com/filanca/birdizin/ şeklinde yönlendirir.

    +

    Bugfix checklist

    Ayrıca bakınız:

    + + +
    top
    +
    Açıklama:Bölü çizgisiyle biten yönlendirmeleri yapar ve dizin içeriği dosyalarını sunar.
    Durum:Temel
    Modül Betimleyici:dir_module
    + + + + + + + + +
    Açıklama:Başka bir eylemci yapılandırılmışsa bu modülün nasıl yanıt + vereceğini belirler
    Sözdizimi:DirectoryCheckHandler On|Off
    Öntanımlı:DirectoryCheckHandler Off
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:Indexes
    Durum:Temel
    Modül:mod_dir
    Uyumluluk:2.4.8 ve sonrasında kullanılabilmektedir. 2.4 öncesi sürümler + örtük olarak "DirectoryCheckHandler ON" belirtilmiş gibi + davranır.
    +

    DirectoryCheckHandler yönergesi, geçerli URL için + başka bir eylemcinin yapılandırılmış olması durumunda, + mod_dir modülünün index dosyaları için dizine mi + bakacağını yoksa URL'nin sonuna bölü çizgisi mi ekleyeceğini belirler. + Eylemciler SetHandler gibi + yönergelerle atanabileceği gibi dizin işlemleri sırasında + mod_rewrite gibi modüller tarafından da atanabilir. +

    + +

    2.4 öncesi sürümlerde, bir URL için başka bir eylemcinin yapılandılmış + olması durumunda bu modül herhangi bir eylemde bulunmaz ve sonuç olarak, + tüm dizin için bir SetHandler belirtildiği durumda + index dosyalarının sunulmasının yanında mod_rewrite + gibi modüller de ayrıca bazı çelişkili sonuçlar oluşturabilir.

    +
    top

    DirectoryIndex Yönergesi

    @@ -86,9 +124,8 @@ dönecektir. Eğer özkaynakların hiçbiri yoksa ve Indexes seçeneği atanmışsa sunucu dizin içeriğinden bir liste üretecektir.

    -

    Örnek:

    - DirectoryIndex index.html -

    +
    DirectoryIndex index.html
    +

    Bu yapılandırmadan sonra yapılan bir http://sunucum/belgeler/ isteğine karşılık, sunucu, @@ -97,9 +134,8 @@

    Belgelerin dizine göreli olmasının gerekmediğine dikkat ediniz.

    -

    - DirectoryIndex index.html index.txt /cgi-bin/index.pl -

    +
    DirectoryIndex index.html index.txt  /cgi-bin/index.pl
    +

    Bu örnekte ise dizin içinde ne index.html ne de index.txt mevcut olduğunda /cgi-bin/index.pl @@ -107,28 +143,79 @@

    disabled değeri tek başına mod_dir’in bir dizin listesi aramasını engeller. disabled değiştirgesi - öncesinde ve sonrasında başka bir değiştirge hatta bir disabled - daha olsa bile tek başına disabled verilmiş gibi - yorumlanır.

    + öncesinde ve sonrasında başka bir değiştirge hatta bir + disabled daha olsa bile sadece bir disabled + verilmiş gibi yorumlanır.

    +

    Bilginize: Aynı + bağlamdaki çok sayıda DirectoryIndex + yönergesi bir öncekini değiştirmek yerine onun bulunduğu listeye + eklenir:

    +
    # 1. örnek: İçerik dosyası olarak index.html atayıp sonraki satırda buna
    +# index.php'yi ekleyebilirsiniz.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex index.php
    +</Directory>
    +
    +# 2. Örnek: Atamaların tet bir satırda yapıldığı bu örnek 1. örneğe denktir.
    +<Directory "/foo">
    +    DirectoryIndex index.html index.php
    +</Directory>
    +
    +# 3. Örnek: Listeyi tamamen değiştirmek için, listeyi önce sıfırlamalısınız:
    +# Bu örnekte içerik dosyası olarak listede sadece index.php kalır.
    +<Directory "/foo">
    +    DirectoryIndex index.html
    +    DirectoryIndex disabled
    +    DirectoryIndex index.php
    +</Directory>
    +
    top
    - - -
    Açıklama:Configures an external redirect for directory indexes. +
    Açıklama:Dizin içerik listeleri için harici bir yönlendirme yapılandırır.
    Sözdizimi:DirectoryIndexRedirect on | off | permanent | temp | seeother | -3xx-code +3xx-kodu
    Öntanımlı:DirectoryIndexRedirect off
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:Indexes
    Durum:Temel
    Modül:mod_dir
    Uyumluluk:Available in version 2.3.14 and later

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    +Uyumluluk:Apache HTTP Sunucusunun 2.3.14 ve sonraki sürümlerinde + kullanılabilmektedir. + +

    Öntanımlı olarak, DirectoryIndex listeyi + istemciye şeffaf olarak seçip gönderir. + DirectoryIndexRedirect ise harici bir + yönlendirmeye sebep olur.

    + +

    Bunlardan biri kullanılabilir:

    +
      +
    • on: Dizin listesi kaynağına bir 302 yönlendirmesi + yapılır.
    • +
    • off: Bir yönlendirme yapılmaz. mod_dir için eski davranış + böyleydi.
    • +
    • permanent: Dizin listesi kaynağına bir 301 (kalıcı) + yönlendirmesi yapılır.
    • +
    • temp: Bu on ile aynı etkiye sahiptir.
    • +
    • seeother: Dizin listesi kaynağına bir 303 yönlendirmesi + ("diğerine bak" olarak da bilinir)yapılır.
    • +
    • 3xx-code: 3xx kodu ile seçilen yönlendirme yapılır.
    • +
    + +

    Örnek

    DirectoryIndexRedirect on
    +
    + +

    http://example.com/docs/ için yapılan bir istek, http://example.com/docs/index.html (mevcutsa) adresine geçici bir + yönlendirme döndürür.

    + + +
    top

    DirectorySlash Yönergesi

    @@ -139,7 +226,6 @@ -
    Geçersizleştirme:Indexes
    Durum:Temel
    Modül:mod_dir
    Uyumluluk:Apache 2.0.51 ve sonrasında mevcuttur.

    DirectorySlash yönergesi, bir dizin isteğinde bulunan URL’lerin sonuna mod_dir modülü tarafından bir @@ -161,17 +247,16 @@

    Siz yine de bu etkiyi istemezseniz ve yukarıdaki sebepler de size uygun - değilse yönlendirmeyi şöyle kapatabilirsiniz:

    - -

    - # Aşağıdaki güvenlik uyarısına bakınız!
    - <Location /bir/yol>
    - - DirectorySlash Off
    - SetHandler bir-eylemci
    -
    - </Location> -

    + değilse yönlendirmeyi aşağıdaki gibi kapatabilirsiniz. Ancak bunu + yaparken dikkatli olun, bununla ilgili bazı güvenlik sorunları olasılığı + vardır.

    + +
    # Aşağıdaki güvenlik uyarısına bakınız!
    +<Location "/bir/yol">
    + DirectorySlash Off
    + SetHandler bir-eylemci
    +</Location>
    +

    Güvenlik Uyarı

    Bölü çizgisi ile biten yönlendirmelerin kapatılması bir bilginin @@ -183,6 +268,9 @@ Fakat bölü çizgisi ile bitmeyen bir istek dizin içeriğinin listelenmesi ile sonuçlanırdı.

    +

    Bir yönlendirme sözkonusu olduğunda bazı tarayıcıların yanlışlıkla POST + isteklerini GET istekleri haline getirme (böylece POST verisi iptal olur) + olasılığı olduğuna da dikkat edin.

    top
    @@ -190,20 +278,20 @@ - - + + +
    Açıklama:Bir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar
    Sözdizimi:FallbackResource yerel-url
    Öntanımlı:None - httpd 404 döndürecektir (Yok)
    Sözdizimi:FallbackResource disabled | yerel-url
    Öntanımlı:disabled - httpd 404 döndürecektir (Yok)
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:Indexes
    Durum:Temel
    Modül:mod_dir
    Uyumluluk:disabled değiştirgesi 2.4.4 sürümü ve sonrasında kullanılabilmektedir.

    Dosya sisteminde bulunmayan bir dosya için istek yapıldığında HTTP'nin 404 (Yok) hatasını döndürmemesi için sunulacak dosyanın yolunu tanımlar. Örnek:

    -

    - FallbackResource not-404.php -

    +
    FallbackResource /not-404.php
    +

    Bu satırla, (mevcut dosyaları etkilemeden) mevcut olmayan dosyaların yerine not-404.php dosyası sunulacaktır.

    @@ -217,12 +305,23 @@ -d kullanımı gerekirdi. Bunun için şimdi tek satırlık bir yapılandırma yeterli olmaktadır.

    -

    - FallbackResource index.php -

    +
    FallbackResource /index.php
    +

    Resim, CSS dosyaları gibi mevcut dosyalar normal olarak sunulur.

    +

    Üst dizinden hiçbir şeyin miras alınmaması isteniyorsa bu özelliği + kapatmak için disabled değiştirgesini kullanın.

    + +

    http://example.com/blog/ gibi bir alt URI yerel-url + olarak sağlanır:

    + +
    <Directory "/web/example.com/htdocs/blog">
    +  FallbackResource /blog/index.php
    +</Directory>
    + + +
    @@ -231,7 +330,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dir.xml b/docs/manual/mod/mod_dir.xml index c9d7c3a1dd8..2ec037afa3b 100644 --- a/docs/manual/mod/mod_dir.xml +++ b/docs/manual/mod/mod_dir.xml @@ -77,7 +77,9 @@ a directory directory.

    Example + DirectoryIndex index.html +

    then a request for http://example.com/docs/ would @@ -87,19 +89,44 @@ a directory

    Note that the documents do not need to be relative to the directory;

    - + DirectoryIndex index.html index.txt /cgi-bin/index.pl - +

    would cause the CGI script /cgi-bin/index.pl to be executed if neither index.html or index.txt existed in a directory.

    A single argument of "disabled" prevents mod_dir from - searching for an index. An argument of "disabled" will be interpeted + searching for an index. An argument of "disabled" will be interpreted literally if it has any arguments before or after it, even if they are "disabled" as well.

    +

    Note: Multiple DirectoryIndex + directives within the same context will add + to the list of resources to look for rather than replace: +

    + +# Example A: Set index.html as an index page, then add index.php to that list as well. +<Directory "/foo"> + DirectoryIndex index.html + DirectoryIndex index.php +</Directory> + +# Example B: This is identical to example A, except it's done with a single directive. +<Directory "/foo"> + DirectoryIndex index.html index.php +</Directory> + +# Example C: To replace the list, you must explicitly reset it first: +# In this example, only index.php will remain as an index resource. +<Directory "/foo"> + DirectoryIndex index.html + DirectoryIndex disabled + DirectoryIndex index.php +</Directory> + + @@ -122,8 +149,21 @@ a directory >DirectoryIndexRedirect causes an external redirect to instead be issued.

    +

    The argument can be:

    +
      +
    • on: issues a 302 redirection to the index resource.
    • +
    • off: does not issue a redirection. This is the legacy behaviour of mod_dir.
    • +
    • permanent: issues a 301 (permanent) redirection to the index resource.
    • +
    • temp: this has the same effect as on
    • +
    • seeother: issues a 303 redirection (also known as "See Other") to the index resource.
    • +
    • 3xx-code: issues a redirection marked by the chosen 3xx code.
    • +
    + + Example + DirectoryIndexRedirect on +

    A request for http://example.com/docs/ would @@ -143,7 +183,6 @@ a directory server configvirtual host directory.htaccess Indexes -Available in version 2.0.51 and later

    The DirectorySlash directive determines whether @@ -168,15 +207,13 @@ a directory be aware that there are possible security implications to doing this.

    - - # see security warning below!
    - <Location /some/path>
    - - DirectorySlash Off
    - SetHandler some-handler
    -
    - </Location> -
    + +# see security warning below! +<Location "/some/path"> + DirectorySlash Off + SetHandler some-handler +</Location> + Security Warning

    Turning off the trailing slash redirect may result in an information @@ -188,23 +225,27 @@ a directory index.html file. But a request without trailing slash would list the directory contents.

    +

    Also note that some browsers may erroneously change POST requests into GET + (thus discarding POST data) when a redirect is issued.

    FallbackResource Define a default URL for requests that don't map to a file -FallbackResource local-url -None - httpd will return 404 (Not Found) +FallbackResource disabled | local-url +disabled - httpd will return 404 (Not Found) server configvirtual host directory.htaccess Indexes +The disabled argument is available in version 2.4.4 and +later

    Use this to set a handler for any URL that doesn't map to anything in your filesystem, and would otherwise return HTTP 404 (Not Found). For example

    - - FallbackResource /not-404.php - + + FallbackResource /not-404.php +

    will cause requests for non-existent files to be handled by not-404.php, while requests for files that exist are unaffected.

    @@ -216,22 +257,49 @@ a directory mod_rewrite, and the use of the -f and -d tests for file and directory existence. This now requires only one line of configuration.

    - - FallbackResource /index.php - + + FallbackResource /index.php +

    Existing files, such as images, css files, and so on, will be served normally.

    +

    Use the disabled argument to disable that feature + if inheritance from a parent directory is not desired.

    In a sub-URI, such as http://example.com/blog/ this sub-URI has to be supplied as local-url:

    - - - <Directory /web/example.com/htdocs/blog>
    - - FallbackResource /blog/index.php
    -
    - </Directory> -
    -
    + +<Directory "/web/example.com/htdocs/blog"> + FallbackResource /blog/index.php +</Directory> +<Directory "/web/example.com/htdocs/blog/images"> + FallbackResource disabled +</Directory> + +
    +
    + +DirectoryCheckHandler +Toggle how this module responds when another handler is configured +DirectoryCheckHandler On|Off +DirectoryCheckHandler Off +server configvirtual host +directory.htaccess +Indexes +Available in 2.4.8 and later. Releases prior to 2.4 implicitly +act as if "DirectoryCheckHandler ON" was specified. + +

    The DirectoryCheckHandler directive determines + whether mod_dir should check for directory indexes or + add trailing slashes when some other handler has been configured for + the current URL. Handlers can be set by directives such as + SetHandler or by other modules, + such as mod_rewrite during per-directory substitutions. +

    + +

    In releases prior to 2.4, this module did not take any action if any + other handler was configured for a URL. This allows directory indexes to + be served even when a SetHandler directive is + specified for an entire directory, but it can also result in some conflicts + with modules such as mod_rewrite.

    diff --git a/docs/manual/mod/mod_dir.xml.fr b/docs/manual/mod/mod_dir.xml.fr index ab834f64b8b..7cd133f0676 100644 --- a/docs/manual/mod/mod_dir.xml.fr +++ b/docs/manual/mod/mod_dir.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,40 +25,40 @@ mod_dir Permet la redirection des adresses se terminant par un -répertoire sans slash de fin et la mise à disposition des fichiers index -de répertoire +répertoire sans slash de fin et la mise à disposition des fichiers index +de répertoire Base mod_dir.c dir_module -

    L'index d'un répertoire peut provenir de deux sources :

    +

    L'index d'un répertoire peut provenir de deux sources :

      -
    • Un fichier écrit par l'utilisateur, dont le nom, en général - appelé index.html, peut être défini à l'aide de la +
    • Un fichier écrit par l'utilisateur, dont le nom, en général + appelé index.html, peut être défini à l'aide de la directive DirectoryIndex fournie par le module mod_dir.
    • -
    • Un listing généré par le serveur, par l'intermédiaire du +
    • Un listing généré par le serveur, par l'intermédiaire du module mod_autoindex.

    Les deux fonctions sont bien distinctes, si bien que vous pouvez - supprimer (ou remplacer) la génération automatique d'index, si vous + supprimer (ou remplacer) la génération automatique d'index, si vous le souhaitez.

    -

    Une redirection "slash de fin" est effectuée lorsque le serveur - reçoit une requête pour une URL du style - http://nom-serveur/foo/nom-repnom-rep - est le nom d'un répertoire. Comme les répertoires nécessitent un slash de +

    Une redirection "slash de fin" est effectuée lorsque le serveur + reçoit une requête pour une URL du style + http://nom-serveur/foo/nom-repnom-rep + est le nom d'un répertoire. Comme les répertoires nécessitent un slash de fin, mod_dir effectue une redirection vers http://nom-serveur/foo/nom-rep/.

    DirectoryIndex -Liste des fichiers ressources à rechercher lorsque le -client envoie une requête pour un répertoire +Liste des fichiers ressources à rechercher lorsque le +client envoie une requête pour un répertoire DirectoryIndex disabled | url locale [url locale] ... DirectoryIndex index.html @@ -68,53 +68,79 @@ client envoie une requête pour un répertoire

    La directive DirectoryIndex permet de - définir une liste de fichiers ressources à rechercher lorsqu'un - client envoie une requête pour l'index d'un répertoire, en ajoutant - un '/' à la fin du nom de ce dernier. url locale est - l'URL (codée avec caractères '%') d'un document du serveur, relative - au répertoire faisant l'objet de la requête ; il s'agit en général - du nom d'un fichier situé dans le répertoire. Si plusieurs URLs sont - fournies, le serveur renverra la première d'entre elles qui - correspond à une ressource existante. Si aucune ressource ne - correspond à la liste des URLs spécifiées, et si l'option - Indexes est définie, le serveur générera son propre - listing du répertoire.

    + définir une liste de fichiers ressources à rechercher lorsqu'un + client envoie une requête pour l'index d'un répertoire, en ajoutant + un '/' à la fin du nom de ce dernier. url locale est + l'URL (codée avec caractères '%') d'un document du serveur, relative + au répertoire faisant l'objet de la requête ; il s'agit en général + du nom d'un fichier situé dans le répertoire. Si plusieurs URLs sont + fournies, le serveur renverra la première d'entre elles qui + correspond à une ressource existante. Si aucune ressource ne + correspond à la liste des URLs spécifiées, et si l'option + Indexes est définie, le serveur générera son propre + listing du répertoire.

    Exemple + DirectoryIndex index.html + -

    Avec cette configuration, une requête pour l'URL +

    Avec cette configuration, une requête pour l'URL http://example.com/docs/ renverrait au client la ressource http://example.com/docs/index.html si elle - existe, ou provoquerait la génération du listing du répertoire si la + existe, ou provoquerait la génération du listing du répertoire si la ressource n'existe pas.

    -

    Notez qu'il n'est pas nécessaire que les documents soient - relatifs au répertoire ;

    +

    Notez qu'il n'est pas nécessaire que les documents soient + relatifs au répertoire ;

    - + DirectoryIndex index.html index.txt /cgi-bin/index.pl - + -

    provoquerait l'exécution du script CGI +

    provoquerait l'exécution du script CGI /cgi-bin/index.pl si aucun des fichiers index.html ou index.txt n'existe dans le - répertoire considéré.

    + répertoire considéré.

    -

    La spécification du seul argument "disabled" empêche +

    La spécification du seul argument "disabled" empêche mod_dir de rechercher un index. Un argument - "disabled" sera interprété de manière littérale si d'autres - arguments sont présents avant ou après lui, même s'ils sont - eux-mêmes des arguments "disabled".

    + "disabled" sera interprété de manière littérale si d'autres + arguments sont présents avant ou après lui, même s'ils sont + eux-mêmes des arguments "disabled".

    + +

    Note: Positionner plusieurs directives DirectoryIndex + au coeur du même context complète la liste des ressources et ne l'écrase pas : +

    + +# Exemple A: Positionner index.html en page d'index, puis ajouter index.php. +<Directory "/foo"> + DirectoryIndex index.html + DirectoryIndex index.php +</Directory> + +# Exemple B: La même chose que l'exemple A, mais réalisé au moyen d'une seule directive. +<Directory "/foo"> + DirectoryIndex index.html index.php +</Directory> + +# Exemple C: Pour remplacer la liste des ressources, il faut d'abord la vider : +# Ici, seul index.php restera référencé comme ressource d'index. +<Directory "/foo"> + DirectoryIndex index.html + DirectoryIndex disabled + DirectoryIndex index.php +</Directory> +
    DirectoryIndexRedirect -Définit une redirection externe pour les index de -répertoires. +Définit une redirection externe pour les index de +répertoires. DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code @@ -126,17 +152,31 @@ répertoires. Disponible depuis la version 2.3.14 -

    Par défaut, c'est la page définie par la directive - DirectoryIndex qui est sélectionnée et - renvoyée de manière transparente au client. La directive +

    Par défaut, c'est la page définie par la directive + DirectoryIndex qui est sélectionnée et + renvoyée de manière transparente au client. La directive DirectoryIndexRedirect permet de rediriger le - client vers une ressource externe.

    + client via une redirection de type 3xx.

    + +

    Les arguments acceptés sont :

    +
      +
    • on : envoie une redirection 302 vers l'index choisi.
    • +
    • off : n'envoie aucune redirection. Il s'agit du comportement historique de mod_dir.
    • +
    • permanent : envoie une redirection 301 (permanent) vers l'index choisi.
    • +
    • temp : ceci est équivalent à on
    • +
    • seeother : envoie une redirection 303 (également appelée "See Other") vers l'index choisi.
    • +
    • 3xx-code : envoie une redirection accompagnée du code 3xx choisi.
    • +
    + + Exemple + DirectoryIndexRedirect on + -

    Une requête pour http://example.com/docs/ se +

    Une requête pour http://example.com/docs/ se solderait par une redirection temporaire vers http://example.com/docs/index.html si cette ressource existe.

    @@ -146,7 +186,7 @@ répertoires. DirectorySlash -Activation/Désactivation de la redirection "slash de +Activation/Désactivation de la redirection "slash de fin" DirectorySlash On|Off DirectorySlash On @@ -154,114 +194,147 @@ fin" host directory.htaccess Indexes -Disponible depuis le version 2.0.51 -d'Apache

    La directive DirectorySlash permet de - déterminer si mod_dir doit corriger ou non les URLs - pointant vers un répertoire.

    + déterminer si mod_dir doit corriger ou non les URLs + pointant vers un répertoire.

    -

    En général, si un utilisateur envoie une requête pour une - ressource sans slash de fin, cette ressource représentant un - répertoire, mod_dir le redirige vers la même +

    En général, si un utilisateur envoie une requête pour une + ressource sans slash de fin, cette ressource représentant un + répertoire, mod_dir le redirige vers la même ressource, mais en ajoutant un slash de fin, et ceci pour plusieurs bonnes raisons :

      -
    • La requête de l'utilisateur contiendra finalement l'URL +
    • La requête de l'utilisateur contiendra finalement l'URL canonique de la ressource
    • mod_autoindex fonctionnera correctement. Comme il n'indique pas le chemin dans le lien, le chemin de l'URL serait incorrect.
    • La directive DirectoryIndex n'est évaluée - que pour les répertoires se terminant par un slash.
    • -
    • Les références à des URLs relatives dans les pages html + module="mod_dir">DirectoryIndex n'est évaluée + que pour les répertoires se terminant par un slash.
    • +
    • Les références à des URLs relatives dans les pages html fonctionneront alors correctement.

    Si vous ne souhaitez pas voir ces effets, et si - les raisons évoquées ci-dessus ne s'appliquent pas à vous, vous - pouvez désactiver la redirection comme indiqué ci-dessous. - Gardez cependant à l'esprit que ceci peut avoir des répercutions en - matière de sécurité.

    - - - # voir l'avertissement de sécurité ci-dessous !
    - <Location /un/chemin>
    - - DirectorySlash Off
    - SetHandler un-gestionnaire
    -
    - </Location> -
    + les raisons évoquées ci-dessus ne s'appliquent pas à vous, vous + pouvez désactiver la redirection comme indiqué ci-dessous. + Gardez cependant à l'esprit que ceci peut avoir des répercutions en + matière de sécurité.

    + + +# voir l'avertissement de sécurité ci-dessous ! +<Location "/some/path"> + DirectorySlash Off + SetHandler some-handler +</Location> + - Avertissement de sécurité -

    La désactivation de la redirection "slash de fin" peut entraîner - la divulgation d'informations. Considérons la situation où + Avertissement de sécurité +

    La désactivation de la redirection "slash de fin" peut entraîner + la divulgation d'informations. Considérons la situation où mod_autoindex est actif (Options - +Indexes), où la directive ), où la directive DirectoryIndex a pour valeur une ressource valide (par - exemple index.html), et où aucun gestionnaire - particulier n'a été défini pour cette URL. Dans ce cas, une requête + exemple index.html), et où aucun gestionnaire + particulier n'a été défini pour cette URL. Dans ce cas, une requête avec slash de fin afficherait le contenu du fichier - index.html ; par contre, une requête sans slash + index.html ; par contre, une requête sans slash de fin afficherait un listing du contenu du - répertoire.

    + répertoire.

    +

    Notez aussi que certains navigateurs peuvent modifier par erreur + des requêtes POST en requêtes GET lors d'une redirection, les + données POST étant alors perdues.

    FallbackResource -Définit une URL par défaut pour les requêtes qui ne ciblent +Définit une URL par défaut pour les requêtes qui ne ciblent aucun fichier -FallbackResource url-locale -Aucune - httpd renvoie un code d'erreur 404 (Not Found) +FallbackResource disabled | url-locale +disabled - httpd renvoie un code d'erreur 404 (Not Found) server configvirtual host directory.htaccess Indexes +L'argument disabled est disponible à partir +de la version 2.4.4 du serveur HTTP Apache. -

    Cette directive permet de définir un traitement pour toute URL - qui ne correspond à aucune ressource de votre système de fichiers, +

    Cette directive permet de définir un traitement pour toute URL + qui ne correspond à aucune ressource de votre système de fichiers, et qui provoquerait sans cela l'envoi d'un code d'erreur HTTP 404 (Not Found). Par exemple

    - - FallbackResource /not-404.php - -

    fait en sorte que les requêtes ne correspondant à aucun fichier - soient traitées par non-404.php, sans affecter les - requêtes pour des fichiers existants.

    + + FallbackResource /not-404.php + +

    fait en sorte que les requêtes ne correspondant à aucun fichier + soient traitées par non-404.php, sans affecter les + requêtes pour des fichiers existants.

    Il est souvent souhaitable qu'un seul fichier ou ressource traite - toutes les requêtes à destination d'un répertoire - particulier, sauf pour les requêtes qui correspondent à un fichier - ou script existant. On y fait souvent référence sous le terme - 'contrôleur frontal'.

    -

    Dans les versions plus anciennes de httpd, cet effet nécessitait - en général mod_rewrite, et l'utilisation des tests - conditionnels -f et -d pour vérifier - l'existence des fichiers et répertoires. Maintenant, une seule ligne - de configuration est nécessaire.

    - - FallbackResource /index.php - + toutes les requêtes à destination d'un répertoire + particulier, sauf pour les requêtes qui correspondent à un fichier + ou script existant. On y fait souvent référence sous le terme + 'contrôleur frontal'.

    +

    Dans les versions plus anciennes de httpd, cet effet nécessitait + en général mod_rewrite, et l'utilisation des tests + conditionnels -f et -d pour vérifier + l'existence des fichiers et répertoires. Maintenant, une seule ligne + de configuration est nécessaire.

    + + FallbackResource /index.php +

    Les fichiers existants comme des images, des fichiers css, etc... - seront traités normalement.

    -

    Pour un URI intermédiaire tel que - http://example.com/blog/, cet URI intermédiaire doit être - spécifié en tant que url-locale :

    - - - <Directory /web/example.com/htdocs/blog>
    - - FallbackResource /blog/index.php
    -
    - </Directory> -
    -
    + seront traités normalement.

    +

    L'argument disabled permet de désactiver cette + fonctionnalité dans le cas où l'héritage d'un répertoire parent + n'est pas souhaité.

    +

    Pour un URI intermédiaire tel que + http://example.com/blog/, cet URI intermédiaire doit être + spécifié en tant que url-locale :

    + +<Directory "/web/example.com/htdocs/blog"> + FallbackResource /blog/index.php +</Directory> +<Directory "/web/example.com/htdocs/blog/images"> + FallbackResource disabled +</Directory> +
    + +DirectoryCheckHandler +Définit la réponse de ce module lorsqu'un autre +gestionnaire est utilisé +DirectoryCheckHandler On|Off +DirectoryCheckHandler Off +server configvirtual host +directory.htaccess +Indexes +Disponible depuis la version 2.4.8 du serveur HTTP +Apache. Les versions antérieures à 2.4 se comportaient implicitement +comme si "DirectoryCheckHandler ON" avait été spécifié. + +

    La directive DirectoryCheckHandler permet + de faire en sorte que mod_dir recherche un index + de répertoire ou ajoute des slashes de fin lorsqu'un autre + gestionnaire à été défini pour l'URL considérée. Les gestionnaires + peuvent être définis à via des directives telles que + SetHandler ou par d'autres + modules tels que mod_rewrite au cours des + substitutions de niveau répertoire.

    + +

    Dans les versions antérieures à 2.4, ce module ne modifiait pas son + comportement si un autre gestionnaire avait été défini pour l'URL + considérée. Ceci permettait de servir des index de répertoires même si une + directive SetHandler avait été définie pour un + répertoire entier, mais pouvait aussi être à l'origine de conflits avec + d'autres modules comme mod_rewrite.

    +
    +
    diff --git a/docs/manual/mod/mod_dir.xml.ja b/docs/manual/mod/mod_dir.xml.ja index 51609aa89d6..c3b1a81038f 100644 --- a/docs/manual/mod/mod_dir.xml.ja +++ b/docs/manual/mod/mod_dir.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_dumpio - Apache HTTP Server +mod_dumpio - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_dumpio

    Available Languages:  en  | + fr  |  ja 

    @@ -40,15 +46,17 @@ be expected, this can produce extreme volumes of data, and should only be used when debugging problems.

    -

    Directives

    + +

    Bugfix checklist

    See also

    +
    top

    Enabling dumpio Support

    @@ -56,13 +64,12 @@

    To enable the module, it should be compiled and loaded in to your running Apache configuration. Logging can then - be enabled or disabled seperately for input and output via + be enabled or disabled separately for input and output via the below directives. Additionally, mod_dumpio needs to be configured to LogLevel trace7:

    -

    - LogLevel dumpio:trace7 -

    +
    LogLevel dumpio:trace7
    +
    top

    DumpIOInput Directive

    @@ -78,9 +85,8 @@ later.
    Description:Dumps all I/O to error log as desired.

    Enable dumping of all input.

    -

    Example

    - DumpIOInput On -

    +

    Example

    DumpIOInput On
    +
    top
    @@ -97,16 +103,37 @@ later.

    Enable dumping of all output.

    -

    Example

    - DumpIOOutput On -

    +

    Example

    DumpIOOutput On
    +

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dumpio.html.fr b/docs/manual/mod/mod_dumpio.html.fr new file mode 100644 index 00000000000..82716030a65 --- /dev/null +++ b/docs/manual/mod/mod_dumpio.html.fr @@ -0,0 +1,142 @@ + + + + + +mod_dumpio - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_dumpio

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    + + + +
    Description:Enregistre toutes les entres/sorties dans le journal des +erreurs de la manire souhaite.
    Statut:Extension
    IdentificateurdeModule:dumpio_module
    FichierSource:mod_dumpio.c
    +

    Sommaire

    + +

    mod_dumpio permet d'enregistrer toutes les entres + reues par Apache et/ou toutes les sorties envoyes par ce dernier + dans le fichier error.log. +

    + +

    L'enregistrement des donnes s'effectue juste aprs le dcodage + SSL (pour les entres), et juste avant le codage SSL (pour les + sorties). Comme on peut s'y attendre, tout ceci peut reprsenter un + volume important de donnes, et ne doit tre utilis qu' des fins + de dbogage.

    +
    + +
    top
    +
    +

    Activation du support dumpio

    + + +

    Pour activer le module, ce dernier doit tre compil et charg + par l'intermdiaire de la configuration de votre instance d'Apache. + La journalisation peut ensuite tre active ou dsactive sparment + pour les entres et sorties l'aide des directives ci-dessous. En + outre, mod_dumpio doit tre configur LogLevel trace7 :

    +
    LogLevel dumpio:trace7
    + +
    +
    top
    +

    Directive DumpIOInput

    + + + + + + + + +
    Description:Enregistre toutes les entres dans le journal des +erreurs
    Syntaxe:DumpIOInput On|Off
    Dfaut:DumpIOInput Off
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_dumpio
    Compatibilit:DumpIOInput est disponible depuis la version 2.1.3 +d'Apache.
    +

    Active la journalisation de toutes les entres.

    + +

    Exemple

    DumpIOInput On
    +
    + +
    +
    top
    +

    Directive DumpIOOutput

    + + + + + + + + +
    Description:Enregistre toutes les sorties dans le journal des +erreurs
    Syntaxe:DumpIOOutput On|Off
    Dfaut:DumpIOOutput Off
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_dumpio
    Compatibilit:DumpIOOutput est disponible depuis la version 2.1.3 +d'Apache.
    +

    Active la journalisation de toutes les sorties.

    + +

    Exemple

    DumpIOOutput On
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_dumpio.html.ja.utf8 b/docs/manual/mod/mod_dumpio.html.ja.utf8 index 1af09aca321..8b7090b3e74 100644 --- a/docs/manual/mod/mod_dumpio.html.ja.utf8 +++ b/docs/manual/mod/mod_dumpio.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_dumpio - Apache HTTP サーバ +mod_dumpio - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_dumpio

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -43,15 +50,17 @@ このモジュールはとてつもないデータ量を出力しますので、 問題をデバッグしているときにのみ使用するようにしてください。

    -

    ディレクティブ

    + +

    Bugfix checklist

    参照

    +
    top
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_dumpio.xml b/docs/manual/mod/mod_dumpio.xml index 362fe7a23f5..53add340a02 100644 --- a/docs/manual/mod/mod_dumpio.xml +++ b/docs/manual/mod/mod_dumpio.xml @@ -45,14 +45,14 @@

    To enable the module, it should be compiled and loaded in to your running Apache configuration. Logging can then - be enabled or disabled seperately for input and output via + be enabled or disabled separately for input and output via the below directives. Additionally, mod_dumpio needs to be configured to LogLevel trace7:

    - + LogLevel dumpio:trace7 - + @@ -69,7 +69,9 @@ later.

    Enable dumping of all input.

    Example + DumpIOInput On + @@ -89,7 +91,9 @@ later.

    Enable dumping of all output.

    Example + DumpIOOutput On + diff --git a/docs/manual/mod/mod_dumpio.xml.fr b/docs/manual/mod/mod_dumpio.xml.fr new file mode 100644 index 00000000000..ad28badb01c --- /dev/null +++ b/docs/manual/mod/mod_dumpio.xml.fr @@ -0,0 +1,107 @@ + + + + + + + + + + + +mod_dumpio +Enregistre toutes les entrées/sorties dans le journal des +erreurs de la manière souhaitée. +Extension +mod_dumpio.c +dumpio_module + + +

    mod_dumpio permet d'enregistrer toutes les entrées + reçues par Apache et/ou toutes les sorties envoyées par ce dernier + dans le fichier error.log. +

    + +

    L'enregistrement des données s'effectue juste après le décodage + SSL (pour les entrées), et juste avant le codage SSL (pour les + sorties). Comme on peut s'y attendre, tout ceci peut représenter un + volume important de données, et ne doit être utilisé qu'à des fins + de débogage.

    +
    + +
    + Activation du support dumpio + +

    Pour activer le module, ce dernier doit être compilé et chargé + par l'intermédiaire de la configuration de votre instance d'Apache. + La journalisation peut ensuite être activée ou désactivée séparément + pour les entrées et sorties à l'aide des directives ci-dessous. En + outre, mod_dumpio doit être configuré à LogLevel trace7 :

    + + LogLevel dumpio:trace7 + +
    + + + +DumpIOInput +Enregistre toutes les entrées dans le journal des +erreurs +DumpIOInput On|Off +DumpIOInput Off +server config +DumpIOInput est disponible depuis la version 2.1.3 +d'Apache. + + +

    Active la journalisation de toutes les entrées.

    + + Exemple + + DumpIOInput On + + +
    + +
    + + + +DumpIOOutput +Enregistre toutes les sorties dans le journal des +erreurs +DumpIOOutput On|Off +DumpIOOutput Off +server config +DumpIOOutput est disponible depuis la version 2.1.3 +d'Apache. + + +

    Active la journalisation de toutes les sorties.

    + + Exemple + + DumpIOOutput On + + +
    + +
    + +
    diff --git a/docs/manual/mod/mod_dumpio.xml.ja b/docs/manual/mod/mod_dumpio.xml.ja index 45155568dd6..5e3546c6982 100644 --- a/docs/manual/mod/mod_dumpio.xml.ja +++ b/docs/manual/mod/mod_dumpio.xml.ja @@ -1,7 +1,7 @@ - + -mod_echo - Apache HTTP Server +mod_echo - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_echo

    @@ -30,8 +35,7 @@ modules
    - -
    説明:望むようにすべての I/O をエラーログにダンプする
    ステータス:Extension
    モジュール識別子:dumpio_module
    Status:Experimental
    ModuleIdentifier:echo_module
    SourceFile:mod_echo.c
    Compatibility:Available in Apache 2.0 and later
    +SourceFile:mod_echo.c

    Summary

    This module provides an example protocol module to illustrate the @@ -42,7 +46,9 @@ modules

    -
    +

    Bugfix checklist

    See also

    +
    top

    ProtocolEcho Directive

    @@ -53,15 +59,12 @@ modules Context:server config, virtual host Status:Experimental Module:mod_echo -Compatibility:ProtocolEcho is only available in 2.0 and -later.

    The ProtocolEcho directive enables or disables the echo server.

    -

    Example

    - ProtocolEcho On -

    +

    Example

    ProtocolEcho On
    +
    @@ -70,7 +73,28 @@ later.  fr  |  ja  |  ko 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_echo.html.fr b/docs/manual/mod/mod_echo.html.fr index edd151f071e..0f1a6d9e7d2 100644 --- a/docs/manual/mod/mod_echo.html.fr +++ b/docs/manual/mod/mod_echo.html.fr @@ -1,23 +1,28 @@ - -mod_echo - Serveur Apache HTTP +mod_echo - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_echo

    @@ -30,8 +35,7 @@ protocole Statut:Exprimental IdentificateurdeModule:echo_module -FichierSource:mod_echo.c -Compatibilit:Disponible depuis la version 2.0 d'Apache +FichierSource:mod_echo.c

    Sommaire

    Ce module est un module de protocole exemple permettant d'en @@ -42,10 +46,12 @@ protocole

    -
    +

    Traitement des bugs

    Voir aussi

    +
    top
    -

    ProtocolEcho Directive

    +

    Directive ProtocolEcho

    @@ -53,15 +59,12 @@ protocole -
    Description:Active ou dsactive le serveur d'cho
    Syntaxe:ProtocolEcho On|Off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Exprimental
    Module:mod_echo
    Compatibilit:ProtocolEcho est disponible depuis la version 2.0 -d'Apache.

    La directive ProtocolEcho permet d'activer ou de dsactiver le serveur d'cho.

    -

    Exemple

    - ProtocolEcho On -

    +

    Exemple

    ProtocolEcho On
    +
    @@ -70,7 +73,28 @@ d'Apache.  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_echo.html.ja.utf8 b/docs/manual/mod/mod_echo.html.ja.utf8 index e6d07a88db2..6d4f3dc6fcf 100644 --- a/docs/manual/mod/mod_echo.html.ja.utf8 +++ b/docs/manual/mod/mod_echo.html.ja.utf8 @@ -1,40 +1,41 @@ - -mod_echo - Apache HTTP サーバ +mod_echo - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_echo

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    - -
    説明:プロトコルモジュールの概要を示すための単純なエコーサーバ
    ステータス:Experimental
    モジュール識別子:echo_module
    ソースファイル:mod_echo.c
    互換性:Apache 2.0 以降
    +ソースファイル:mod_echo.c

    概要

    本モジュールはコンセプトを伝えるためのプロトコルモジュールの @@ -45,7 +46,9 @@

    -
    +

    Bugfix checklist

    参照

    +
    top

    ProtocolEcho ディレクティブ

    @@ -56,23 +59,42 @@ コンテキスト:サーバ設定ファイル, バーチャルホスト ステータス:Experimental モジュール:mod_echo -互換性:Apache 2.0 以降

    ProtocolEcho ディレクティブで エコーサーバの有効無効を設定します。

    -

    - ProtocolEcho On -

    +

    ProtocolEcho On
    +
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_echo.html.ko.euc-kr b/docs/manual/mod/mod_echo.html.ko.euc-kr index 2644ad1e92a..49b27d6bcda 100644 --- a/docs/manual/mod/mod_echo.html.ko.euc-kr +++ b/docs/manual/mod/mod_echo.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_echo - Apache HTTP Server +mod_echo - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_echo

    @@ -43,7 +48,9 @@ -
    +

    Bugfix checklist

    +
    top

    ProtocolEcho þ

    @@ -69,7 +76,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_echo.xml b/docs/manual/mod/mod_echo.xml index 46c6975772e..ab9ee1a9efb 100644 --- a/docs/manual/mod/mod_echo.xml +++ b/docs/manual/mod/mod_echo.xml @@ -28,7 +28,6 @@ modules Experimental mod_echo.c echo_module -Available in Apache 2.0 and later

    This module provides an example protocol module to illustrate the @@ -44,15 +43,15 @@ modules ProtocolEcho Off server config virtual host -ProtocolEcho is only available in 2.0 and -later.

    The ProtocolEcho directive enables or disables the echo server.

    Example + ProtocolEcho On + diff --git a/docs/manual/mod/mod_echo.xml.fr b/docs/manual/mod/mod_echo.xml.fr index 3564f39e7d7..e6d4a654cca 100644 --- a/docs/manual/mod/mod_echo.xml.fr +++ b/docs/manual/mod/mod_echo.xml.fr @@ -1,7 +1,7 @@ - + @@ -30,7 +30,6 @@ protocole Experimental mod_echo.c echo_module -Disponible depuis la version 2.0 d'Apache

    Ce module est un module de protocole exemple permettant d'en @@ -46,15 +45,15 @@ protocole ProtocolEcho Off server config virtual host -ProtocolEcho est disponible depuis la version 2.0 -d'Apache.

    La directive ProtocolEcho permet d'activer ou de désactiver le serveur d'écho.

    Exemple + ProtocolEcho On + diff --git a/docs/manual/mod/mod_echo.xml.ja b/docs/manual/mod/mod_echo.xml.ja index 10ef9eaf67a..29b236f264f 100644 --- a/docs/manual/mod/mod_echo.xml.ja +++ b/docs/manual/mod/mod_echo.xml.ja @@ -1,7 +1,7 @@ - + + -mod_env - Apache HTTP Server +mod_env - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_env

    @@ -47,11 +52,11 @@ SSI pages
  • SetEnv
  • UnsetEnv
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    PassEnv Directive

    @@ -66,20 +71,19 @@ SSI pages

    Specifies one or more native system environment variables to make available as internal environment variables, which are available to Apache HTTP Server modules - as well as propogated to CGI scripts and SSI pages. Values come from the + as well as propagated to CGI scripts and SSI pages. Values come from the native OS environment of the shell which invoked the httpd process.

    -

    Example

    - PassEnv LD_LIBRARY_PATH -

    +

    Example

    PassEnv LD_LIBRARY_PATH
    +
    top

    SetEnv Directive

    - + @@ -88,9 +92,11 @@ SSI pages

    Sets an internal environment variable, which is then available to Apache HTTP Server modules, and passed on to CGI scripts and SSI pages.

    -

    Example

    - SetEnv SPECIAL_PATH /foo/bin -

    +

    Example

    SetEnv SPECIAL_PATH /foo/bin
    +
    + +

    If you omit the value argument, the variable is set to + an empty string.

    The internal environment variables set by this directive are set after most early request processing directives are run, such as access @@ -98,7 +104,7 @@ SSI pages setting is meant as input into this early phase of processing such as the RewriteRule directive, you should instead set the environment variable with - SetEnvIf.

    + SetEnvIf.

    @@ -121,9 +127,8 @@ SSI pages

    Removes one or more internal environment variables from those passed on to CGI scripts and SSI pages.

    -

    Example

    - UnsetEnv LD_LIBRARY_PATH -

    +

    Example

    UnsetEnv LD_LIBRARY_PATH
    +
    @@ -133,7 +138,28 @@ SSI pages ja  |  ko  |  tr 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_env.html.fr b/docs/manual/mod/mod_env.html.fr index 34dc947f169..528c1854c68 100644 --- a/docs/manual/mod/mod_env.html.fr +++ b/docs/manual/mod/mod_env.html.fr @@ -1,23 +1,28 @@ - -mod_env - Serveur Apache HTTP +mod_env - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_env

    @@ -49,14 +54,14 @@ pages SSI
  • SetEnv
  • UnsetEnv
  • -

    Voir aussi

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top
    -
    Description:Sets environment variables
    Syntax:SetEnv env-variable value
    Syntax:SetEnv env-variable [value]
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Base
    @@ -74,16 +79,15 @@ shell valeurs sont issues de l'environnement natif de l'OS associ au shell qui a invoqu le processus httpd.

    -

    Exemple

    - PassEnv LD_LIBRARY_PATH -

    +

    Exemple

    PassEnv LD_LIBRARY_PATH
    +
    top
    -
    Description:Transmet des variables d'environnement depuis le shell
    - + @@ -93,9 +97,12 @@ shell ensuite disponible pour les modules du serveur HTTP Apache et transmise aux scripts CGI et aux pages SSI.

    -

    Exemple

    - SetEnv SPECIAL_PATH /foo/bin -

    +

    Exemple

    SetEnv SPECIAL_PATH /foo/bin
    +
    + +

    Si l'argument valeur est absent, la variable est + dfinie la valeur d'une chane vide.

    +

    Les variables d'environnement internes dfinies par cette directive le sont aprs l'excution de la plupart des directives du traitement initial des requtes, comme les contrles @@ -103,7 +110,7 @@ shell fichiers. Si la variable d'environnement est sense intervenir au cours de cette phase initiale du traitement, par exemple pour la directive RewriteRule, - vous devez plutt utiliser la directive SetEnvIf pour dfinir cette + vous devez plutt utiliser la directive SetEnvIf pour dfinir cette variable.

    @@ -114,7 +121,7 @@ shell
    top
    -
    Description:Dfinit des variables d'environnement
    Syntaxe:SetEnv var-env valeur
    Syntaxe:SetEnv var-env [valeur]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base

    Supprime une ou plusieurs variables d'environnement internes parmi celles qui sont transmises aux scripts CGI et aux pages SSI.

    -

    Exemple

    - UnsetEnv LD_LIBRARY_PATH -

    +

    Exemple

    UnsetEnv LD_LIBRARY_PATH
    +
    @@ -139,7 +145,28 @@ shell ja  |  ko  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_env.html.ja.utf8 b/docs/manual/mod/mod_env.html.ja.utf8 index 02f0940d206..3758ffd3637 100644 --- a/docs/manual/mod/mod_env.html.ja.utf8 +++ b/docs/manual/mod/mod_env.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_env - Apache HTTP サーバ +mod_env - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_env

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Supprime des variables de l'environnement
    Syntaxe:UnsetEnv var-env [var-env] @@ -127,9 +134,8 @@ shell
    @@ -49,10 +55,10 @@
  • SetEnv
  • UnsetEnv
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    PassEnv ディレクティブ

    @@ -113,12 +119,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_env.html.ko.euc-kr b/docs/manual/mod/mod_env.html.ko.euc-kr index 7ef6dc64722..897b2b00bb5 100644 --- a/docs/manual/mod/mod_env.html.ko.euc-kr +++ b/docs/manual/mod/mod_env.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_env - Apache HTTP Server +mod_env - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_env

    @@ -46,10 +51,10 @@
  • SetEnv
  • UnsetEnv
  • -

    +

    Bugfix checklist

    +
  • Comments
  • top

    PassEnv þ

    @@ -112,7 +117,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_env.html.tr.utf8 b/docs/manual/mod/mod_env.html.tr.utf8 index 83bc12235b2..a0f0461fb1c 100644 --- a/docs/manual/mod/mod_env.html.tr.utf8 +++ b/docs/manual/mod/mod_env.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_env - Apache HTTP Sunucusu +mod_env - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_env

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:CGI スクリプト及び SSI ページに渡される環境変数を変更する機能を提供する
    ステータス:Base
    @@ -35,9 +39,12 @@ etmek için kullanılır.
    Açıklama:CGI betiklerine ve SSI sayfalarına aktarılan değişkenlere müdahale etmek için kullanılır.
    Durum:Temel
    Kaynak Dosyası:mod_env.c

    Özet

    -

    Bu modül CGI betiklerine ve SSI sayfalarına aktarılan ortama müdahale - etmeyi mümkün kılar. Ortam değişkenleri httpd süreci - başlatılırken kabuktan aktarılabilir. Bundan başka, yapılandırma +

    Bu modül Apache HTTP Sunucusunun çeşitli modülleri tarafınan kullanılan + dahili ortam değişkenlerime müdahale etmeyi mümkün kılar. bu değişkenler + ayrıca, CGI betiklerine yerel ortam değişkenleri olarak sunulur ve SSI + sayfalarında da kullanılabilir. Ortam değişkenleri + httpd süreci başlatılırken kabuktan aktarılabilir. + Bundan başka, yapılandırma sürecinde tanımlı veya tanımsız yapılabilirler.

    Yönergeler

    @@ -46,10 +53,11 @@ etmek için kullanılır.
  • SetEnv
  • UnsetEnv
  • -

    Ayrıca bakınız:

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • SetEnvIf
  • +
  • Yorum
  • top

    PassEnv Yönergesi

    @@ -62,8 +70,11 @@ etmek için kullanılır. Durum:Temel Modül:mod_env -

    httpd süreci başlatılırken CGI betiklerine ve SSI - sayfalarına kabuktan aktarılabilecek ortam değişkenleri belirtilir.

    +

    Dahili ortam değişkenleri olarak kullanılmak üzere sistem ortam + değişkenlerini içeri aktarmak için kullanılır. Bunlar daha sonra Apache + HTTP Sunucusunun modüllerinden kullanılabilir, CGI betiklerine ve SSI + sayfalarında aktarılabilir. Değerler httpd süreci + başlatılırken kabuğun işletim sistemi ortamından gelir.

    Örnek

    PassEnv LD_LIBRARY_PATH @@ -74,28 +85,34 @@ etmek için kullanılır.

    SetEnv Yönergesi

    - +
    Açıklama:Ortam değişkenlerini tanımlar.
    Sözdizimi:SetEnv ortam-değişkeni değer
    Sözdizimi:SetEnv ortam-değişkeni [değer]
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:FileInfo
    Durum:Temel
    Modül:mod_env
    -

    CGI betiklerine ve SSI sayfalarına aktarılmak üzere bir ortam değişkeni - tanımlanmasını sağlar.

    +

    CGI betiklerine ve SSI sayfalarına aktarılmak ve Apache HTTP Sunucusu + modüllerinde kullanılmak üzere bir dahili ortam değişkeni tanımlanmasını + sağlar.

    -

    Örnek

    - SetEnv SPECIAL_PATH /foo/bin -

    +
    SetEnv SPECIAL_PATH /foo/bin
    + + +

    Bir değer belirtilmezse değişkene boş dizgi atanır.

    Bu yönerge tarafından atanan dahili ortam değişkenleri, en başta işleme sokulan, ereşem denetimi, URI-dosya ismi eşleştirmesi gibi istek işleme yönergelerinden sonra işleme sokulur. Eğer atadığınız ortam değişkeni, - bir RewriteRule yönergesindeki + bir RewriteRule yönergesindeki gibi erken işlem aşamalarına girdi sağlıyorsa, bu durumda ortam değişkenini - SetEnvIf ile atamalısınız.

    + SetEnvIf ile atamalısınız.

    +

    Ayrıca bakınız:

    +
    top

    UnsetEnv Yönergesi

    @@ -109,11 +126,10 @@ etmek için kullanılır. Modül:mod_env

    CGI betiklerine ve SSI sayfalarına bir daha aktarılmamak üzere bir - ortam değişkenini ortamdan siler.

    + dahili ortam değişkenini siler.

    + +
    UnsetEnv LD_LIBRARY_PATH
    -

    Örnek

    - UnsetEnv LD_LIBRARY_PATH -

    @@ -123,7 +139,28 @@ etmek için kullanılır.  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_env.xml b/docs/manual/mod/mod_env.xml index 7a48c9061fb..73062037bb7 100644 --- a/docs/manual/mod/mod_env.xml +++ b/docs/manual/mod/mod_env.xml @@ -51,12 +51,14 @@ SSI pages

    Specifies one or more native system environment variables to make available as internal environment variables, which are available to Apache HTTP Server modules - as well as propogated to CGI scripts and SSI pages. Values come from the + as well as propagated to CGI scripts and SSI pages. Values come from the native OS environment of the shell which invoked the httpd process.

    Example + PassEnv LD_LIBRARY_PATH +
    @@ -64,7 +66,7 @@ SSI pages SetEnv Sets environment variables -SetEnv env-variable value +SetEnv env-variable [value] server configvirtual host directory.htaccess FileInfo @@ -74,8 +76,13 @@ SSI pages HTTP Server modules, and passed on to CGI scripts and SSI pages.

    Example + SetEnv SPECIAL_PATH /foo/bin + + +

    If you omit the value argument, the variable is set to + an empty string.

    The internal environment variables set by this directive are set after most early request processing directives are run, such as access @@ -83,7 +90,7 @@ SSI pages setting is meant as input into this early phase of processing such as the RewriteRule directive, you should instead set the environment variable with - SetEnvIf.

    + SetEnvIf.

    @@ -104,7 +111,9 @@ SSI pages on to CGI scripts and SSI pages.

    Example + UnsetEnv LD_LIBRARY_PATH +
    diff --git a/docs/manual/mod/mod_env.xml.fr b/docs/manual/mod/mod_env.xml.fr index 9e91e4b644b..8a50c09c7f6 100644 --- a/docs/manual/mod/mod_env.xml.fr +++ b/docs/manual/mod/mod_env.xml.fr @@ -1,7 +1,7 @@ - + @@ -62,7 +62,9 @@ shell shell qui a invoqué le processus httpd.

    Exemple + PassEnv LD_LIBRARY_PATH + @@ -70,7 +72,7 @@ shell SetEnv Définit des variables d'environnement -SetEnv var-env valeur +SetEnv var-env [valeur] server configvirtual host directory.htaccess FileInfo @@ -81,8 +83,14 @@ shell transmise aux scripts CGI et aux pages SSI.

    Exemple + SetEnv SPECIAL_PATH /foo/bin + + +

    Si l'argument valeur est absent, la variable est + définie à la valeur d'une chaîne vide.

    +

    Les variables d'environnement internes définies par cette directive le sont après l'exécution de la plupart des directives du traitement initial des requêtes, comme les contrôles @@ -91,7 +99,7 @@ shell cours de cette phase initiale du traitement, par exemple pour la directive RewriteRule, vous devez plutôt utiliser la directive SetEnvIf pour définir cette + module="mod_setenvif">SetEnvIf pour définir cette variable.

    @@ -113,7 +121,9 @@ shell qui sont transmises aux scripts CGI et aux pages SSI.

    Exemple + UnsetEnv LD_LIBRARY_PATH +
    diff --git a/docs/manual/mod/mod_env.xml.ja b/docs/manual/mod/mod_env.xml.ja index b90d09e129c..9396e05c1e5 100644 --- a/docs/manual/mod/mod_env.xml.ja +++ b/docs/manual/mod/mod_env.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_example - Apache HTTP Server +mod_example_hooks - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules
    -

    Apache Module mod_example

    +

    Apache Module mod_example_hooks

    -

    Available Languages:  en  | - ko 

    +

    Available Languages:  en  | + fr  | + ko 

    - -
    Description:Illustrates the Apache module API
    Status:Experimental
    ModuleIdentifier:example_module
    SourceFile:mod_example.c
    +ModuleIdentifier:example_hooks_module +SourceFile:mod_example_hooks.c

    Summary

    -

    Some files in the modules/experimental directory +

    The files in the modules/examples directory under the Apache distribution directory tree are provided as an example to those that wish to write modules that use the Apache API.

    -

    The main file is mod_example.c, which +

    The main file is mod_example_hooks.c, which illustrates all the different callback mechanisms and call syntaxes. By no means does an add-on module need to include routines for all of the callbacks - quite the contrary!

    The example module is an actual working module. If you link - it into your server, enable the "example-handler" handler for a + it into your server, enable the "example-hooks-handler" handler for a location, and then browse to that location, you will see a display of some of the tracing the example module did as the various callbacks were made.

    -
    top
    -

    Compiling the example module

    +

    Compiling the example_hooks module

    -

    To include the example module in your server, follow the +

    To include the example_hooks module in your server, follow the steps below:

    1. - Run configure with --enable-example + Run configure with --enable-example-hooks option.
    2. Make the server (run "make").
    3. @@ -73,7 +81,7 @@

      To add another module of your own:

        -
      1. cp modules/experimental/mod_example.c +
      2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
      3. Modify the file.
      4. @@ -81,9 +89,9 @@
      5. Create modules/new_module/config.m4.
        1. Add APACHE_MODPATH_INIT(new_module).
        2. -
        3. Copy APACHE_MODULE line with "example" from - modules/experimental/config.m4.
        4. -
        5. Replace the first argument "example" with myexample.
        6. +
        7. Copy APACHE_MODULE line with "example_hooks" from + modules/examples/config.m4.
        8. +
        9. Replace the first argument "example_hooks" with myexample.
        10. Replace the second argument with brief description of your module. It will be used in configure --help.
        11. If your module needs additional C compiler flags, linker flags or @@ -106,21 +114,19 @@
    top
    -

    Using the mod_example Module

    +

    Using the mod_example_hooks Module

    -

    To activate the example module, include a block similar to +

    To activate the example_hooks module, include a block similar to the following in your httpd.conf file:

    -

    - <Location /example-info>
    - SetHandler example-handler
    - </Location> -

    +
    <Location "/example-hooks-info">
    +   SetHandler example-hooks-handler
    +</Location>
    +

    As an alternative, you can put the following into a .htaccess file and then request the file "test.example" from that location:

    -

    - AddHandler example-handler .example -

    +
    AddHandler example-hooks-handler ".example"
    +

    After reloading/restarting your server, you should be able to browse to this location and see the brief display mentioned @@ -134,12 +140,12 @@ API Syntax:Example Context:server config, virtual host, directory, .htaccess Status:Experimental -Module:mod_example +Module:mod_example_hooks

    The Example directive just sets a demonstration flag which the example module's content handler displays. It takes no arguments. If you browse to an URL to which the - example content-handler applies, you will get a display of the + example-hooks content-handler applies, you will get a display of the routines within the module and how and in what order they were called to service the document request. The effect of this directive one can observe under the point "Example @@ -148,9 +154,31 @@ API

    -

    Available Languages:  en  | - ko 

    -
    +

    Available Languages:  en  | + fr  | + ko 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_example_hooks.html.fr b/docs/manual/mod/mod_example_hooks.html.fr new file mode 100644 index 00000000000..9774ddacec7 --- /dev/null +++ b/docs/manual/mod/mod_example_hooks.html.fr @@ -0,0 +1,196 @@ + + + + + +mod_example_hooks - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_example_hooks

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + + + +
    Description:Illustration de l'API des modules Apache
    Statut:Exprimental
    IdentificateurdeModule:example_hooks_module
    FichierSource:mod_example_hooks.c
    +

    Sommaire

    + +

    Certains fichiers situs dans le rpertoire + modules/examples de l'arborescence de la + distribution d'Apache sont fournis titre d'exemples pour ceux qui + souhaitent crire des modules qui utilisent l'API d'Apache.

    + +

    Le fichier principal est mod_example_hooks.c, qui + constitue une illustration exhaustive des diffrents mcanismes et + syntaxes d'appels. En aucun cas un module additionnel n'aura + inclure des routines pour tous les appels - il n'en ncessitera au + contraire qu'un petit nombre !

    + +

    Le module example_hooks fonctionne rellement. Si vous le chargez dans + votre serveur, activez le gestionnaire "example-hooks-handler" dans une + section location, et essayez d'accder la zone du site web + correspondante, vous verrez s'afficher certaines sorties que le + module example_hooks produit au cours des diffrents appels.

    +
    + +
    top
    +
    +

    Compilation du module example_hooks

    + +

    Pour inclure le module example_hooks dans votre serveur, effectuez les + tapes suivantes :

    + +
      +
    1. Excutez configure avec l'option + --enable-example-hooks.
    2. + +
    3. Compilez le serveur (excutez la commande + "make").
    4. +
    + +

    Pour ajouter votre propre module :

    + +
      +
    1. cp modules/examples/mod_example_hooks.c + modules/nouveau_module/mod_monexemple.c
    2. + +
    3. Modifiez le fichier.
    4. + +
    5. Crez modules/nouveau_module/config.m4. +
        +
      1. Ajoutez APACHE_MODPATH_INIT(nouveau_module).
      2. +
      3. Copiez la ligne APACHE_MODULE contenant "example_hooks" depuis + modules/examples/config.m4.
      4. +
      5. Remplacez le premier argument "example-hooks" par + monexemple.
      6. +
      7. Remplacez le second argument par une brve description de + votre module. Cette description sera utilise par la commande + configure --help.
      8. +
      9. Si la compilation de votre module ncessite des drapeaux + de compilation C, des drapeaux d'dition de liens, ou de + bibliothques supplmentaires, ajoutez les respectivement + CFLAGS, LDFLAGS et LIBS. Reportez-vous aux fichiers + config.m4 des rpertoires des autres modules pour + plus d'exemples.
      10. +
      11. Ajoutez APACHE_MODPATH_FINISH.
      12. +
      +
    6. + +
    7. Crez le fichier + module/nouveau_module/Makefile.in. + Si la compilation de votre module ne ncessite pas d'instructions + particulires, ce fichier ne doit contenir que la ligne + include $(top_srcdir)/build/special.mk.
    8. + +
    9. Excutez ./buildconf la racine du rpertoire.
    10. + +
    11. Compilez le serveur aprs avoir excut la commande configure + avec l'option --enable-monexemple.
    12. + +
    +
    top
    +
    +

    Utilisation du module +mod_example_hooks

    + +

    Pour activer le module example_hooks, ajoutez votre fichier + httpd.conf un bloc du style :

    +
    <Location "/example-hooks-info">
    +   SetHandler example-hooks-handler
    +</Location>
    + + +

    Vous pouvez aussi ajouter ce qui suit dans un fichier .htaccess, puis + accder au fichier "test.example" partir du rpertoire + correspondant :

    + +
    AddHandler example-hooks-handler ".example"
    + + +

    Aprs avoir recharg la configuration ou redmarr votre serveur, + vous devriez pouvoir accder ce fichier et voir s'afficher ce qui + a t dcrit plus haut.

    +
    +
    top
    +

    Directive Example

    + + + + + + +
    Description:Directive de dmonstration pour illustrer l'API des modules +Apache
    Syntaxe:Example
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Exprimental
    Module:mod_example_hooks
    +

    La directive Example n'a pour fonction que + de dfinir un drapeau de dmonstration que le gestionnaire de + contenu du module example_hooks va afficher. Elle ne possde aucun + argument. Si vous naviguez vers une URL laquelle le gestionnaire + de contenu example_hooks s'applique, vous verrez s'afficher les routines + du module, ainsi que l'ordre dans lequel elles ont t appeles pour + servir le document demand. On peut observer l'effet de cette + directive dans la phrase "Example + directive declared here: YES/NO".

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_example.html.ko.euc-kr b/docs/manual/mod/mod_example_hooks.html.ko.euc-kr similarity index 55% rename from docs/manual/mod/mod_example.html.ko.euc-kr rename to docs/manual/mod/mod_example_hooks.html.ko.euc-kr index c66cd6c56b1..49096fb7fc3 100644 --- a/docs/manual/mod/mod_example.html.ko.euc-kr +++ b/docs/manual/mod/mod_example_hooks.html.ko.euc-kr @@ -1,59 +1,67 @@ - -mod_example - Apache HTTP Server +mod_example_hooks - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >
    -

    ġ mod_example

    +

    ġ mod_example_hooks

    -

    :  en  | - ko 

    +

    :  en  | + fr  | + ko 

    ֽ ƴմϴ. ֱٿ ϼ.
    - -
    :ġ API Ѵ
    :Experimental
    :example_module
    ҽ:mod_example.c
    +:example_hooks_module +ҽ:mod_example_hooks.c

    -

    ġ modules/experimental 丮 +

    ġ modules/examples 丮 ִ ϵ ġ API Ͽ ۼϷ .

    -

    mod_example.c ݹ(callback) +

    mod_example_hooks.c ݹ(callback) ȣ ϴ ̴. ⿡ ݹ ʿ䰡 . ݴ!

    example ϴ ̴. - ϰ Ư ġ "example-handler" ڵ鷯 ҴϿ + ϰ Ư ġ "example-hooks-handler" ڵ鷯 ҴϿ װ ¡ϸ example ݹ Ȯ ִ.

    -
    top

    example ϱ

    @@ -62,7 +70,7 @@
    1. - --enable-example ɼǰ Բ + --enable-example-hooks ɼǰ Բ configure Ѵ.
    2. Ѵ ("make" Ѵ).
    3. @@ -71,7 +79,7 @@

      ڽ ߰Ϸ:

        -
      1. cp modules/experimental/mod_example.c +
      2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
      3. Ѵ.
      4. @@ -80,9 +88,9 @@
        1. APACHE_MODPATH_INIT(new_module) ߰Ѵ.
        2. -
        3. modules/experimental/config.m4 Ͽ - "example" ִ APACHE_MODULE ؿ´.
        4. -
        5. ù° ƱԸƮ "example" myexample +
        6. modules/examples/config.m4 Ͽ + "example_hooks" ִ APACHE_MODULE ؿ´.
        7. +
        8. ù° ƱԸƮ "example_hooks" myexample Ѵ.
        9. ι° ƱԸƮ ڸ ڽ ⿡ ´. configure --help @@ -107,13 +115,13 @@
    top
    -

    mod_example ϱ

    +

    mod_example_hooks ϱ

    example Ϸ httpd.conf Ͽ ߰϶:

    - <Location /example-info>
    - SetHandler example-handler
    + <Location /example-hooks-info>
    + SetHandler example-hooks-handler
    </Location>

    @@ -121,7 +129,7 @@ Ͽ ߰ϰ, ġ "test.example" û϶:

    - AddHandler example-handler .example + AddHandler example-hooks-handler .example

    ġ ¡ϸ տ @@ -134,7 +142,7 @@ :Example :ּ, ȣƮ, directory, .htaccess :Experimental -:mod_example +:mod_example_hooks

    Example þ example ڵ鷯 θ Ѵ. þ @@ -147,9 +155,31 @@

    -

    :  en  | - ko 

    -
    +

    :  en  | + fr  | + ko 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_example.xml b/docs/manual/mod/mod_example_hooks.xml similarity index 77% rename from docs/manual/mod/mod_example.xml rename to docs/manual/mod/mod_example_hooks.xml index 94e3cd23be7..941ca2011cd 100644 --- a/docs/manual/mod/mod_example.xml +++ b/docs/manual/mod/mod_example_hooks.xml @@ -20,40 +20,40 @@ limitations under the License. --> - + -mod_example +mod_example_hooks Illustrates the Apache module API Experimental -mod_example.c -example_module +mod_example_hooks.c +example_hooks_module -

    Some files in the modules/experimental directory +

    The files in the modules/examples directory under the Apache distribution directory tree are provided as an example to those that wish to write modules that use the Apache API.

    -

    The main file is mod_example.c, which +

    The main file is mod_example_hooks.c, which illustrates all the different callback mechanisms and call syntaxes. By no means does an add-on module need to include routines for all of the callbacks - quite the contrary!

    The example module is an actual working module. If you link - it into your server, enable the "example-handler" handler for a + it into your server, enable the "example-hooks-handler" handler for a location, and then browse to that location, you will see a display of some of the tracing the example module did as the various callbacks were made.

    -
    Compiling the example module +
    Compiling the example_hooks module -

    To include the example module in your server, follow the +

    To include the example_hooks module in your server, follow the steps below:

    1. - Run configure with --enable-example + Run configure with --enable-example-hooks option.
    2. Make the server (run "make").
    3. @@ -62,7 +62,7 @@

      To add another module of your own:

        -
      1. cp modules/experimental/mod_example.c +
      2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
      3. Modify the file.
      4. @@ -70,9 +70,9 @@
      5. Create modules/new_module/config.m4.
        1. Add APACHE_MODPATH_INIT(new_module).
        2. -
        3. Copy APACHE_MODULE line with "example" from - modules/experimental/config.m4.
        4. -
        5. Replace the first argument "example" with myexample.
        6. +
        7. Copy APACHE_MODULE line with "example_hooks" from + modules/examples/config.m4.
        8. +
        9. Replace the first argument "example_hooks" with myexample.
        10. Replace the second argument with brief description of your module. It will be used in configure --help.
        11. If your module needs additional C compiler flags, linker flags or @@ -95,22 +95,22 @@
    -
    Using the <code>mod_example</code> Module +
    Using the <code>mod_example_hooks</code> Module -

    To activate the example module, include a block similar to +

    To activate the example_hooks module, include a block similar to the following in your httpd.conf file:

    - - <Location /example-info>
    - SetHandler example-handler
    - </Location> -
    + +<Location "/example-hooks-info"> + SetHandler example-hooks-handler +</Location> +

    As an alternative, you can put the following into a .htaccess file and then request the file "test.example" from that location:

    - - AddHandler example-handler .example - + + AddHandler example-hooks-handler ".example" +

    After reloading/restarting your server, you should be able to browse to this location and see the brief display mentioned @@ -130,7 +130,7 @@ API

    The Example directive just sets a demonstration flag which the example module's content handler displays. It takes no arguments. If you browse to an URL to which the - example content-handler applies, you will get a display of the + example-hooks content-handler applies, you will get a display of the routines within the module and how and in what order they were called to service the document request. The effect of this directive one can observe under the point "Example diff --git a/docs/manual/mod/mod_example_hooks.xml.fr b/docs/manual/mod/mod_example_hooks.xml.fr new file mode 100644 index 00000000000..aa176bb32e4 --- /dev/null +++ b/docs/manual/mod/mod_example_hooks.xml.fr @@ -0,0 +1,154 @@ + + + + + + + + + + + +mod_example_hooks +Illustration de l'API des modules Apache +Experimental +mod_example_hooks.c +example_hooks_module + +

    +

    Certains fichiers situés dans le répertoire + modules/examples de l'arborescence de la + distribution d'Apache sont fournis à titre d'exemples pour ceux qui + souhaitent écrire des modules qui utilisent l'API d'Apache.

    + +

    Le fichier principal est mod_example_hooks.c, qui + constitue une illustration exhaustive des différents mécanismes et + syntaxes d'appels. En aucun cas un module additionnel n'aura à + inclure des routines pour tous les appels - il n'en nécessitera au + contraire qu'un petit nombre !

    + +

    Le module example_hooks fonctionne réellement. Si vous le chargez dans + votre serveur, activez le gestionnaire "example-hooks-handler" dans une + section location, et essayez d'accéder à la zone du site web + correspondante, vous verrez s'afficher certaines sorties que le + module example_hooks produit au cours des différents appels.

    +
    + +
    Compilation du module example_hooks + +

    Pour inclure le module example_hooks dans votre serveur, effectuez les + étapes suivantes :

    + +
      +
    1. Exécutez configure avec l'option + --enable-example-hooks.
    2. + +
    3. Compilez le serveur (exécutez la commande + "make").
    4. +
    + +

    Pour ajouter votre propre module :

    + +
      +
    1. cp modules/examples/mod_example_hooks.c + modules/nouveau_module/mod_monexemple.c
    2. + +
    3. Modifiez le fichier.
    4. + +
    5. Créez modules/nouveau_module/config.m4. +
        +
      1. Ajoutez APACHE_MODPATH_INIT(nouveau_module).
      2. +
      3. Copiez la ligne APACHE_MODULE contenant "example_hooks" depuis + modules/examples/config.m4.
      4. +
      5. Remplacez le premier argument "example-hooks" par + monexemple.
      6. +
      7. Remplacez le second argument par une brève description de + votre module. Cette description sera utilisée par la commande + configure --help.
      8. +
      9. Si la compilation de votre module nécessite des drapeaux + de compilation C, des drapeaux d'édition de liens, ou de + bibliothèques supplémentaires, ajoutez les respectivement à + CFLAGS, LDFLAGS et LIBS. Reportez-vous aux fichiers + config.m4 des répertoires des autres modules pour + plus d'exemples.
      10. +
      11. Ajoutez APACHE_MODPATH_FINISH.
      12. +
      +
    6. + +
    7. Créez le fichier + module/nouveau_module/Makefile.in. + Si la compilation de votre module ne nécessite pas d'instructions + particulières, ce fichier ne doit contenir que la ligne + include $(top_srcdir)/build/special.mk.
    8. + +
    9. Exécutez ./buildconf à la racine du répertoire.
    10. + +
    11. Compilez le serveur après avoir exécuté la commande configure + avec l'option --enable-monexemple.
    12. + +
    +
    + +
    Utilisation du module +<code>mod_example_hooks</code> + +

    Pour activer le module example_hooks, ajoutez à votre fichier + httpd.conf un bloc du style :

    + +<Location "/example-hooks-info"> + SetHandler example-hooks-handler +</Location> + + +

    Vous pouvez aussi ajouter ce qui suit dans un fichier .htaccess, puis + accéder au fichier "test.example" à partir du répertoire + correspondant :

    + + + AddHandler example-hooks-handler ".example" + + +

    Après avoir rechargé la configuration ou redémarré votre serveur, + vous devriez pouvoir accéder à ce fichier et voir s'afficher ce qui + a été décrit plus haut.

    +
    + + +Example +Directive de démonstration pour illustrer l'API des modules +Apache +Example +server config +virtual hostdirectory +.htaccess + + +

    La directive Example n'a pour fonction que + de définir un drapeau de démonstration que le gestionnaire de + contenu du module example_hooks va afficher. Elle ne possède aucun + argument. Si vous naviguez vers une URL à laquelle le gestionnaire + de contenu example_hooks s'applique, vous verrez s'afficher les routines + du module, ainsi que l'ordre dans lequel elles ont été appelées pour + servir le document demandé. On peut observer l'effet de cette + directive dans la phrase "Example + directive declared here: YES/NO".

    +
    +
    + + diff --git a/docs/manual/mod/mod_example.xml.ko b/docs/manual/mod/mod_example_hooks.xml.ko similarity index 81% rename from docs/manual/mod/mod_example.xml.ko rename to docs/manual/mod/mod_example_hooks.xml.ko index 03b898abb7f..b3476c6601b 100644 --- a/docs/manual/mod/mod_example.xml.ko +++ b/docs/manual/mod/mod_example_hooks.xml.ko @@ -1,7 +1,7 @@ - + - + -mod_example +mod_example_hooks ġ API Ѵ Experimental -mod_example.c -example_module +mod_example_hooks.c +example_hooks_module -

    ġ modules/experimental 丮 +

    ġ modules/examples 丮 ִ ϵ ġ API Ͽ ۼϷ .

    -

    mod_example.c ݹ(callback) +

    mod_example_hooks.c ݹ(callback) ȣ ϴ ̴. ⿡ ݹ ʿ䰡 . ݴ!

    example ϴ ̴. - ϰ Ư ġ "example-handler" ڵ鷯 ҴϿ + ϰ Ư ġ "example-hooks-handler" ڵ鷯 ҴϿ װ ¡ϸ example ݹ Ȯ ִ.

    @@ -49,7 +49,7 @@
    1. - --enable-example ɼǰ Բ + --enable-example-hooks ɼǰ Բ configure Ѵ.
    2. Ѵ ("make" Ѵ).
    3. @@ -58,7 +58,7 @@

      ڽ ߰Ϸ:

        -
      1. cp modules/experimental/mod_example.c +
      2. cp modules/examples/mod_example_hooks.c modules/new_module/mod_myexample.c
      3. Ѵ.
      4. @@ -67,9 +67,9 @@
        1. APACHE_MODPATH_INIT(new_module) ߰Ѵ.
        2. -
        3. modules/experimental/config.m4 Ͽ - "example" ִ APACHE_MODULE ؿ´.
        4. -
        5. ù° ƱԸƮ "example" myexample +
        6. modules/examples/config.m4 Ͽ + "example_hooks" ִ APACHE_MODULE ؿ´.
        7. +
        8. ù° ƱԸƮ "example_hooks" myexample Ѵ.
        9. ι° ƱԸƮ ڸ ڽ ⿡ ´. configure --help @@ -94,13 +94,13 @@
    -
    <code>mod_example</code> ϱ +
    <code>mod_example_hooks</code> ϱ

    example Ϸ httpd.conf Ͽ ߰϶:

    - <Location /example-info>
    - SetHandler example-handler
    + <Location /example-hooks-info>
    + SetHandler example-hooks-handler
    </Location>
    @@ -109,7 +109,7 @@ Ͽ ߰ϰ, ġ "test.example" û϶:

    - AddHandler example-handler .example + AddHandler example-hooks-handler .example

    ġ ¡ϸ տ diff --git a/docs/manual/mod/mod_example.xml.meta b/docs/manual/mod/mod_example_hooks.xml.meta similarity index 67% rename from docs/manual/mod/mod_example.xml.meta rename to docs/manual/mod/mod_example_hooks.xml.meta index e0bc66bf59c..cd07cfa4ad7 100644 --- a/docs/manual/mod/mod_example.xml.meta +++ b/docs/manual/mod/mod_example_hooks.xml.meta @@ -1,13 +1,14 @@ - - mod_example + + mod_example_hooks /mod/ .. en + fr ko diff --git a/docs/manual/mod/mod_expires.html.en b/docs/manual/mod/mod_expires.html.en index 5cb6cdebad4..220e36b0960 100644 --- a/docs/manual/mod/mod_expires.html.en +++ b/docs/manual/mod/mod_expires.html.en @@ -1,23 +1,28 @@ - -mod_expires - Apache HTTP Server +mod_expires - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_expires

    @@ -57,16 +62,18 @@ criteria proxied from an origin server, this module does not change or add an Expires or Cache-Control header.

    -
    top

    Alternate Interval Syntax

    @@ -74,14 +81,11 @@ criteria ExpiresByType directives can also be defined in a more readable syntax of the form:

    -

    - ExpiresDefault "<base> [plus] {<num> - <type>}*"
    - ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*" -

    +
    ExpiresDefault "base  [plus num type] [num type] ..."
    +ExpiresByType type/encoding "base  [plus num type] [num type] ..."
    -

    where <base> is one of:

    + +

    where base is one of:

    • access
    • @@ -92,9 +96,9 @@ criteria
    • modification
    -

    The plus keyword is optional. <num> +

    The plus keyword is optional. num should be an integer value [acceptable to atoi()], - and <type> is one of:

    + and type is one of:

    • years
    • @@ -110,21 +114,17 @@ criteria make documents expire 1 month after being accessed, by default:

      -

      - ExpiresDefault "access plus 1 month"
      - ExpiresDefault "access plus 4 weeks"
      - ExpiresDefault "access plus 30 days" -

      +
      ExpiresDefault "access plus 1 month"
      +ExpiresDefault "access plus 4 weeks"
      +ExpiresDefault "access plus 30 days"
      +

      The expiry time can be fine-tuned by adding several - '<num> <type>' clauses:

      + 'num type' clauses:

      + +
      ExpiresByType text/html "access plus 1 month 15 days 2 hours"
      +ExpiresByType image/gif "modification plus 5 hours 3 minutes"
      -

      - ExpiresByType text/html "access plus 1 month 15 - days 2 hours"
      - ExpiresByType image/gif "modification plus 5 hours 3 - minutes" -

      Note that if you use a modification date based setting, the Expires header will not be added to content @@ -203,15 +203,14 @@ by MIME type the same images (i.e., the images will be accessed repeatedly within a relatively short timespan).

      -

      Example:

      - # enable expirations
      - ExpiresActive On
      - # expire GIF images after a month in the client's cache
      - ExpiresByType image/gif A2592000
      - # HTML documents are good for a week from the
      - # time they were changed
      - ExpiresByType text/html M604800 -

      +

      Example:

      # enable expirations
      +ExpiresActive On
      +# expire GIF images after a month in the client's cache
      +ExpiresByType image/gif A2592000
      +# HTML documents are good for a week from the
      +# time they were changed
      +ExpiresByType text/html M604800
      +

      Note that this directive only has effect if ExpiresActive On has been specified. It overrides, @@ -248,7 +247,28 @@ by MIME type  fr  |  ja  |  ko 

      -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_expires.html.fr b/docs/manual/mod/mod_expires.html.fr index 7d6adf3fe90..2055eebbb84 100644 --- a/docs/manual/mod/mod_expires.html.fr +++ b/docs/manual/mod/mod_expires.html.fr @@ -1,23 +1,28 @@ - -mod_expires - Serveur Apache HTTP +mod_expires - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_expires

    @@ -59,17 +64,19 @@ l'utilisateur module n'ajoute aucun en-tte Expires ou Cache-Control.

    -
    top

    Autre syntaxe de dfinition de @@ -77,14 +84,11 @@ l'intervalle

    Pour une syntaxe plus lisible, on peut aussi utiliser les directives ExpiresDefault et ExpiresByType comme suit :

    -

    - ExpiresDefault "<base> [plus] {<num> - <type>}*"
    - ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*" -

    +
    ExpiresDefault "base  [plus num type] [num type] ..."
    +ExpiresByType type/encoding "base  [plus num type] [num type] ..."
    + -

    o <base> peut tre :

    +

    o base peut tre :

    • access
    • @@ -95,9 +99,9 @@ l'intervalle
    • modification
    -

    Le mot-cl plus est optionnel. <num> doit +

    Le mot-cl plus est optionnel. num doit correspondre une valeur entire [compatible avec - atoi()], et <type> peut tre choisi parmi :

    + atoi()], et type peut tre choisi parmi :

    • years
    • @@ -111,22 +115,18 @@ l'intervalle

      Par exemple, pour faire expirer par dfaut les documents 1 mois aprs leur accs, on peut utiliser une des directives suivantes :

      -

      - ExpiresDefault "access plus 1 month"
      - ExpiresDefault "access plus 4 weeks"
      - ExpiresDefault "access plus 30 days" -

      +
      ExpiresDefault "access plus 1 month"
      +ExpiresDefault "access plus 4 weeks"
      +ExpiresDefault "access plus 30 days"
      +

      La date d'expiration peut tre dfinie plus prcisment en - ajoutant plusieurs clauses'<num> <type>' :

      + ajoutant plusieurs clauses 'num type' :

      + +
      ExpiresByType text/html "access plus 1 month 15 days 2 hours"
      +ExpiresByType image/gif "modification plus 5 hours 3 minutes"
      -

      - ExpiresByType text/html "access plus 1 month 15 - days 2 hours"
      - ExpiresByType image/gif "modification plus 5 hours 3 - minutes" -

      Notez que si vous utilisez une configuration base sur la date de modification, l'en-tte Expires ne sera pas ajout un contenu qui @@ -135,7 +135,7 @@ l'intervalle modification.

    top
    -

    ExpiresActive Directive

    +

    Directive ExpiresActive

    @@ -168,7 +168,7 @@ l'intervalle
    top
    -
    Description:Active la gnration d'en-ttes Expires
    @@ -208,16 +208,15 @@ en fonction du type MIME images sont alors accdes de manire rptitive dans un intervalle de temps assez court).

    -

    Exemple :

    - # active la gnration des en-ttes Expires
    - ExpiresActive On
    - # les images GIF expirent au bout d'un mois dans le cache du - # client
    - ExpiresByType image/gif A2592000
    - # les documents HTML restent valables une semaine aprs leur date - # de dernire modification
    - ExpiresByType text/html M604800 -

    +

    Exemple :

    # active la gnration des en-ttes Expires
    +ExpiresActive On
    +# les images GIF expirent au bout d'un mois dans le cache du
    +# client
    +ExpiresByType image/gif A2592000
    +# les documents HTML restent valables une semaine aprs leur date
    +# de dernire modification
    +ExpiresByType text/html M604800
    +

    Notez que cette directive ne produit d'effet que si ExpiresActive On a t spcifi. Elle l'emporte, mais @@ -230,7 +229,7 @@ en fonction du type MIME

    top
    -
    Description:Dfinition de la valeur de l'en-tte Expires en fonction du type MIME
    @@ -254,7 +253,28 @@ d'expiration fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_expires.html.ja.utf8 b/docs/manual/mod/mod_expires.html.ja.utf8 index cb732be4a54..4f80482a372 100644 --- a/docs/manual/mod/mod_expires.html.ja.utf8 +++ b/docs/manual/mod/mod_expires.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_expires - Apache HTTP サーバ +mod_expires - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_expires

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Mode de calcul par dfaut de la date d'expiration
    @@ -53,16 +59,18 @@ 2616 section 14.9 参照) の Cache-Control のディレクティブを 操作するには Header ディレクティブを 使うことができます。

    -

    ディレクティブ

    +

    トピック

    +

    ディレクティブ

    -

    トピック

    -
    +

    Bugfix checklist

    参照

    +
    top

    代替期間指定構文

    @@ -228,11 +236,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_expires.html.ko.euc-kr b/docs/manual/mod/mod_expires.html.ko.euc-kr index 01887d1b479..fe1ee532320 100644 --- a/docs/manual/mod/mod_expires.html.ko.euc-kr +++ b/docs/manual/mod/mod_expires.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_expires - Apache HTTP Server +mod_expires - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_expires

    @@ -52,16 +57,18 @@ 2616, 14.9 ) ִ.

    -
    top

    ٸ

    @@ -223,7 +230,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_expires.xml b/docs/manual/mod/mod_expires.xml index 514f76781d1..40d488ab527 100644 --- a/docs/manual/mod/mod_expires.xml +++ b/docs/manual/mod/mod_expires.xml @@ -62,14 +62,12 @@ criteria ExpiresByType directives can also be defined in a more readable syntax of the form:

    - - ExpiresDefault "<base> [plus] {<num> - <type>}*"
    - ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*" -
    + +ExpiresDefault "base [plus num type] [num type] ..." +ExpiresByType type/encoding "base [plus num type] [num type] ..." + -

    where <base> is one of:

    +

    where base is one of:

    • access
    • @@ -80,9 +78,9 @@ criteria
    • modification
    -

    The plus keyword is optional. <num> +

    The plus keyword is optional. num should be an integer value [acceptable to atoi()], - and <type> is one of:

    + and type is one of:

    • years
    • @@ -98,21 +96,19 @@ criteria make documents expire 1 month after being accessed, by default:

      - - ExpiresDefault "access plus 1 month"
      - ExpiresDefault "access plus 4 weeks"
      - ExpiresDefault "access plus 30 days" -
      + +ExpiresDefault "access plus 1 month" +ExpiresDefault "access plus 4 weeks" +ExpiresDefault "access plus 30 days" +

      The expiry time can be fine-tuned by adding several - '<num> <type>' clauses:

      + 'num type' clauses:

      - - ExpiresByType text/html "access plus 1 month 15 - days 2 hours"
      - ExpiresByType image/gif "modification plus 5 hours 3 - minutes" -
      + +ExpiresByType text/html "access plus 1 month 15 days 2 hours" +ExpiresByType image/gif "modification plus 5 hours 3 minutes" +

      Note that if you use a modification date based setting, the Expires header will not be added to content @@ -193,13 +189,15 @@ by MIME type repeatedly within a relatively short timespan).

      Example: - # enable expirations
      - ExpiresActive On
      - # expire GIF images after a month in the client's cache
      - ExpiresByType image/gif A2592000
      - # HTML documents are good for a week from the
      - # time they were changed
      - ExpiresByType text/html M604800 + +# enable expirations +ExpiresActive On +# expire GIF images after a month in the client's cache +ExpiresByType image/gif A2592000 +# HTML documents are good for a week from the +# time they were changed +ExpiresByType text/html M604800 +

      Note that this directive only has effect if diff --git a/docs/manual/mod/mod_expires.xml.fr b/docs/manual/mod/mod_expires.xml.fr index ebd2dcc4b1d..6204d5944ff 100644 --- a/docs/manual/mod/mod_expires.xml.fr +++ b/docs/manual/mod/mod_expires.xml.fr @@ -1,7 +1,7 @@ - + @@ -68,14 +68,12 @@ l'intervalle module="mod_expires">ExpiresDefault et ExpiresByType comme suit :

      - - ExpiresDefault "<base> [plus] {<num> - <type>}*"
      - ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*" -
      + +ExpiresDefault "base [plus num type] [num type] ..." +ExpiresByType type/encoding "base [plus num type] [num type] ..." + -

      où <base> peut être :

      +

      base peut être :

      • access
      • @@ -86,9 +84,9 @@ l'intervalle
      • modification
      -

      Le mot-clé plus est optionnel. <num> doit +

      Le mot-clé plus est optionnel. num doit correspondre à une valeur entière [compatible avec - atoi()], et <type> peut être choisi parmi :

      + atoi()], et type peut être choisi parmi :

      • years
      • @@ -102,22 +100,20 @@ l'intervalle

        Par exemple, pour faire expirer par défaut les documents 1 mois après leur accès, on peut utiliser une des directives suivantes :

        - - ExpiresDefault "access plus 1 month"
        - ExpiresDefault "access plus 4 weeks"
        - ExpiresDefault "access plus 30 days" -
        + +ExpiresDefault "access plus 1 month" +ExpiresDefault "access plus 4 weeks" +ExpiresDefault "access plus 30 days" +

        La date d'expiration peut être définie plus précisément en - ajoutant plusieurs clauses'<num> <type>' :

        + ajoutant plusieurs clauses 'num type' :

        - - ExpiresByType text/html "access plus 1 month 15 - days 2 hours"
        - ExpiresByType image/gif "modification plus 5 hours 3 - minutes" -
        + +ExpiresByType text/html "access plus 1 month 15 days 2 hours" +ExpiresByType image/gif "modification plus 5 hours 3 minutes" +

        Notez que si vous utilisez une configuration basée sur la date de modification, l'en-tête Expires ne sera pas ajouté à un contenu qui @@ -203,14 +199,16 @@ en fonction du type MIME de temps assez court).

        Exemple : - # active la génération des en-têtes Expires
        - ExpiresActive On
        - # les images GIF expirent au bout d'un mois dans le cache du - # client
        - ExpiresByType image/gif A2592000
        - # les documents HTML restent valables une semaine après leur date - # de dernière modification
        - ExpiresByType text/html M604800 + +# active la génération des en-têtes Expires +ExpiresActive On +# les images GIF expirent au bout d'un mois dans le cache du +# client +ExpiresByType image/gif A2592000 +# les documents HTML restent valables une semaine après leur date +# de dernière modification +ExpiresByType text/html M604800 +

        Notez que cette directive ne produit d'effet que si diff --git a/docs/manual/mod/mod_expires.xml.ja b/docs/manual/mod/mod_expires.xml.ja index f07ca79a8d6..0dc8b100491 100644 --- a/docs/manual/mod/mod_expires.xml.ja +++ b/docs/manual/mod/mod_expires.xml.ja @@ -1,7 +1,7 @@ - + + -mod_ext_filter - Apache HTTP Server +mod_ext_filter - Apache HTTP Server Version 2.4 - + + +

        + +

        Apache HTTP Server Version 2.4

        +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_ext_filter

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -57,47 +63,41 @@ delivery to the client a prototype environment for filters.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Examples

    Generating HTML from some other type of response

    -

    - # mod_ext_filter directive to define a filter
    - # to HTML-ize text/c files using the external
    - # program /usr/bin/enscript, with the type of
    - # the result set to text/html
    - ExtFilterDefine c-to-html mode=output \
    - - intype=text/c outtype=text/html \
    - cmd="/usr/bin/enscript --color -W html -Ec -o - -"
    -
    -
    - <Directory "/export/home/trawick/apacheinst/htdocs/c">
    - - # core directive to cause the new filter to
    - # be run on output
    - SetOutputFilter c-to-html
    -
    - # mod_mime directive to set the type of .c
    - # files to text/c
    - AddType text/c .c
    -
    -
    - </Directory> -

    +
    # mod_ext_filter directive to define a filter
    +# to HTML-ize text/c files using the external
    +# program /usr/bin/enscript, with the type of
    +# the result set to text/html
    +ExtFilterDefine c-to-html mode=output \
    +    intype=text/c outtype=text/html \
    +    cmd="/usr/bin/enscript --color -W html -Ec -o - -"
    +
    +<Directory "/export/home/trawick/apacheinst/htdocs/c">
    +    # core directive to cause the new filter to
    +    # be run on output
    +    SetOutputFilter c-to-html
    +    
    +    # mod_mime directive to set the type of .c
    +    # files to text/c
    +    AddType text/c .c
    +</Directory>
    +

    Implementing a content encoding filter

    @@ -105,117 +105,98 @@ delivery to the client Please refer to mod_deflate for a practical implementation.

    -

    - # mod_ext_filter directive to define the external filter
    - ExtFilterDefine gzip mode=output cmd=/bin/gzip
    -
    - <Location /gzipped>
    - - # core directive to cause the gzip filter to be
    - # run on output
    - SetOutputFilter gzip
    -
    - # mod_header directive to add
    - # "Content-Encoding: gzip" header field
    - Header set Content-Encoding gzip
    -
    - </Location> -

    +
    # mod_ext_filter directive to define the external filter
    +ExtFilterDefine gzip mode=output cmd=/bin/gzip
    +
    +<Location "/gzipped">
    +    
    +    # core directive to cause the gzip filter to be
    +    # run on output
    +    SetOutputFilter gzip
    +    
    +    # mod_headers directive to add
    +    # "Content-Encoding: gzip" header field
    +    Header set Content-Encoding gzip
    +</Location>
    +

    Slowing down the server

    -

    - # mod_ext_filter directive to define a filter
    - # which runs everything through cat; cat doesn't
    - # modify anything; it just introduces extra pathlength
    - # and consumes more resources
    - ExtFilterDefine slowdown mode=output cmd=/bin/cat \
    - - preservescontentlength
    -
    -
    - <Location />
    - - # core directive to cause the slowdown filter to
    - # be run several times on output
    - #
    - SetOutputFilter slowdown;slowdown;slowdown
    -
    - </Location> -

    +
    # mod_ext_filter directive to define a filter
    +# which runs everything through cat; cat doesn't
    +# modify anything; it just introduces extra pathlength
    +# and consumes more resources
    +ExtFilterDefine slowdown mode=output cmd=/bin/cat \
    +    preservescontentlength
    +
    +<Location "/">
    +    # core directive to cause the slowdown filter to
    +    # be run several times on output
    +    #
    +    SetOutputFilter slowdown;slowdown;slowdown
    +</Location>
    +

    Using sed to replace text in the response

    -

    - # mod_ext_filter directive to define a filter which
    - # replaces text in the response
    - #
    - ExtFilterDefine fixtext mode=output intype=text/html \
    - - cmd="/bin/sed s/verdana/arial/g"
    -
    -
    - <Location />
    - - # core directive to cause the fixtext filter to
    - # be run on output
    - SetOutputFilter fixtext
    -
    - </Location> -

    +
    # mod_ext_filter directive to define a filter which
    +# replaces text in the response
    +#
    +ExtFilterDefine fixtext mode=output intype=text/html \
    +    cmd="/bin/sed s/verdana/arial/g"
    +
    +<Location "/">
    +    # core directive to cause the fixtext filter to
    +    # be run on output
    +    SetOutputFilter fixtext
    +</Location>
    + + +
    +

    You can do the same thing using mod_substitute +without invoking an external process.

    +

    Tracing another filter

    -

    - # Trace the data read and written by mod_deflate
    - # for a particular client (IP 192.168.1.31)
    - # experiencing compression problems.
    - # This filter will trace what goes into mod_deflate.
    - ExtFilterDefine tracebefore \
    - - cmd="/bin/tracefilter.pl /tmp/tracebefore" \
    - EnableEnv=trace_this_client
    -
    -
    - # This filter will trace what goes after mod_deflate.
    - # Note that without the ftype parameter, the default
    - # filter type of AP_FTYPE_RESOURCE would cause the
    - # filter to be placed *before* mod_deflate in the filter
    - # chain. Giving it a numeric value slightly higher than
    - # AP_FTYPE_CONTENT_SET will ensure that it is placed
    - # after mod_deflate.
    - ExtFilterDefine traceafter \
    - - cmd="/bin/tracefilter.pl /tmp/traceafter" \
    - EnableEnv=trace_this_client ftype=21
    -
    -
    - <Directory /usr/local/docs>
    - - SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
    - SetOutputFilter tracebefore;deflate;traceafter
    -
    - </Directory> -

    - -

    Here is the filter which traces the data:

    - #!/usr/local/bin/perl -w
    - use strict;
    -
    - open(SAVE, ">$ARGV[0]")
    - - or die "can't open $ARGV[0]: $?";
    -
    -
    - while (<STDIN>) {
    - - print SAVE $_;
    - print $_;
    -
    - }
    -
    - close(SAVE); -

    +
    # Trace the data read and written by mod_deflate
    +# for a particular client (IP 192.168.1.31)
    +# experiencing compression problems.
    +# This filter will trace what goes into mod_deflate.
    +ExtFilterDefine tracebefore \
    +    cmd="/bin/tracefilter.pl /tmp/tracebefore" \
    +    EnableEnv=trace_this_client
    +
    +# This filter will trace what goes after mod_deflate.
    +# Note that without the ftype parameter, the default
    +# filter type of AP_FTYPE_RESOURCE would cause the
    +# filter to be placed *before* mod_deflate in the filter
    +# chain.  Giving it a numeric value slightly higher than
    +# AP_FTYPE_CONTENT_SET will ensure that it is placed
    +# after mod_deflate.
    +ExtFilterDefine traceafter \
    +    cmd="/bin/tracefilter.pl /tmp/traceafter" \
    +    EnableEnv=trace_this_client ftype=21
    +
    +<Directory "/usr/local/docs">
    +    SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
    +    SetOutputFilter tracebefore;deflate;traceafter
    +</Directory>
    + + +

    Here is the filter which traces the data:

    #!/usr/local/bin/perl -w
    +use strict;
    +
    +open(SAVE, ">$ARGV[0]")
    +    or die "can't open $ARGV[0]: $?";
    +
    +while (<STDIN>) {
    +    print SAVE $_;
    +    print $_;
    +}
    +
    +close(SAVE);
    +
    top
    @@ -341,9 +322,8 @@ delivery to the client filter is removed and the request continues without it. -

    Example

    - ExtFilterOptions LogStderr -

    +
    ExtFilterOptions LogStderr
    +

    Messages written to the filter's standard error will be stored in the Apache error log.

    @@ -352,9 +332,31 @@ delivery to the client

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ext_filter.html.fr b/docs/manual/mod/mod_ext_filter.html.fr new file mode 100644 index 00000000000..62b6b1a3c5e --- /dev/null +++ b/docs/manual/mod/mod_ext_filter.html.fr @@ -0,0 +1,383 @@ + + + + + +mod_ext_filter - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_ext_filter

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    +
    説明:ユーザの指定した基準に基づいた ExpiresCache-Control HTTP ヘッダの生成
    ステータス:Extension
    + + +
    Description:Fait traiter le corps de la rponse par un programme +externe avant de l'envoyer au client
    Statut:Extension
    IdentificateurdeModule:ext_filter_module
    FichierSource:mod_ext_filter.c
    +

    Sommaire

    + +

    mod_ext_filter reprsente un modle de + programmation simple et bien connu pour les filtres. Avec ce module, tout programme + qui lit l'entre standard stdin et crit sur la sortie standard + stdout (autrement dit une commande filtre de style Unix) peut + servir de filtre pour Apache. Ce mcanisme de filtrage est beaucoup + plus lent qu'un filtre spcialement crit pour + l'API d'Apache et faisant partie intgrante du processus du serveur + Apache, mais il prsente les avantages suivants :

    + +
      +
    • le modle de programmation est beaucoup plus simple
    • + +
    • tout langage de script ou de programmation peut tre utilis, + pourvu qu'il permette au programme de lire l'entre standard et + d'crire sur la sortie standard.
    • + +
    • on peut utiliser des programmes existants comme filtres Apache + sans modification.
    • +
    + +

    Mme dans le cas o le niveau de performance est insuffisant pour + une utilisation en production, on peut utiliser + mod_ext_filter comme prototype d'environnement pour + les filtres.

    + +
    + +
    top
    +
    +

    Exemples

    + +

    Gnrer du HTML partir d'un autre type de + contenu

    + +
    # la directive de mod_ext_filter dfinissant un filtre
    +# permettant de mettre des fichiers text/c au format HTML en
    +# utilisant le programme externe /usr/bin/enscript, le type du
    +# fichier rsultant tant dfini  text/html
    +ExtFilterDefine c-to-html mode=output \
    +    intype=text/c outtype=text/html \
    +    cmd="/usr/bin/enscript --color -W html -Ec -o - -"
    +
    +<Directory "/export/home/trawick/apacheinst/htdocs/c">
    +    # directive de base permettant de traiter la sortie avec le
    +    # nouveau filtre
    +    SetOutputFilter c-to-html
    +
    +    # directive de mod_mime dfinissant le type des fichiers dont
    +    # le nom possde l'extension .c  text/c
    +    AddType text/c .c
    +</Directory>
    + + + +

    Implmentation d'un filtre de codage de + contenu

    +

    Note : cet exemple avec gzip n'est fourni qu' titre + d'illustration. Veuillez vous reporter la documentation de + mod_deflate pour un exemple d'implmentation plus + pratique.

    + +
    # la directive de mod_ext_filter qui dfinit le filtre externe
    +ExtFilterDefine gzip mode=output cmd=/bin/gzip
    +
    +<Location "/gzipped">
    +
    +    # directive de base permettant de traiter la sortie avec le
    +  # filtre gzip
    +    SetOutputFilter gzip
    +
    +    # la directive de mod_headers permettant d'ajouter le champ
    +  # d'en-tte "Content-Encoding: gzip"
    +    Header set Content-Encoding gzip
    +</Location>
    + + + + +

    Ralentissement du serveur

    +
    # directive de mod_ext_filter dfinissant un filtre qui fait
    +# passer tous les flux en sortie par la commande cat ; cat ne
    +# modifie rien ; elle ne fait que compliquer le cheminement des
    +# flux et consommer des ressources supplmentaires
    +       ExtFilterDefine slowdown mode=output cmd=/bin/cat \
    +ExtFilterDefine slowdown mode=output cmd=/bin/cat \
    +    preservescontentlength
    +
    +<Location "/">
    +    # directive de base permettant de traiter plusieurs fois la
    +    # sortie avec le filtre slowdown
    +    #
    +    SetOutputFilter slowdown;slowdown;slowdown
    +</Location>
    + + + +

    Utilisation de sed pour remplacer du texte dans la + rponse

    + +
    # directive de mod_ext_filter dfinissant un filtre qui
    +# remplace du texte dans la rponse
    +#
    +ExtFilterDefine fixtext mode=output intype=text/html \
    +    cmd="/bin/sed s/verdana/arial/g"
    +
    +<Location "/">
    +    # directive de base permettant de traiter la sortie avec le
    +    # filtre fixtext
    +    SetOutputFilter fixtext
    +</Location>
    + + +
    +

    Vous pouvez aussi utiliser mod_substitute pour +effectuer le mme traitement sans avoir invoquer un programme +externe.

    +
    + + + +

    Tracer un autre filtre

    +
    # Trace les donnes lues et crites par mod_deflate pour un
    +# client particulier (IP 192.168.1.31) qui a des problmes de
    +# compression.
    +# Ce premier filtre va tracer ce qui entre dans mod_deflate.
    +ExtFilterDefine tracebefore \
    +    cmd="/bin/tracefilter.pl /tmp/tracebefore" \
    +    EnableEnv=trace_this_client
    +
    +# Ce second filtre va tracer ce qui sort de mod_deflate.
    +# Notez que sans le paramtre ftype, le type de filtre par
    +# dfaut AP_FTYPE_RESOURCE placerait le filtre *avant*
    +# mod_deflate dans la chane de filtrage. Le fait d'affecter
    +#  ce paramtre une valeur numrique sensiblement suprieure 
    +# AP_FTYPE_CONTENT_SET permet de s'assurer que le filtre sera
    +# plac aprs mod_deflate.
    +ExtFilterDefine traceafter \
    +    cmd="/bin/tracefilter.pl /tmp/traceafter" \
    +    EnableEnv=trace_this_client ftype=21
    +
    +<Directory "/usr/local/docs">
    +    SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
    +    SetOutputFilter tracebefore;deflate;traceafter
    +</Directory>
    + + +

    Voici le filtre qui trace les donnes :

    #!/usr/local/bin/perl -w
    +use strict;
    +
    +open(SAVE, ">$ARGV[0]")
    +    or die "can't open $ARGV[0]: $?";
    +
    +while (<STDIN>) {
    +    print SAVE $_;
    +    print $_;
    +}
    +
    +close(SAVE);
    +
    + +
    +
    top
    +

    Directive ExtFilterDefine

    + + + + + + +
    Description:Dfinit un filtre externe
    Syntaxe:ExtFilterDefine nom_filtre paramtres
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ext_filter
    +

    La directive ExtFilterDefine + dfinit les caractristiques d'un filtre externe, et en particulier + le programme excuter ainsi que ses arguments.

    + +

    nom_filtre spcifie le nom du filtre en cours de + dfinition. On peut ensuite utiliser ce nom pour rfrencer le + filtre dans les directives SetOutputFilter. Il doit tre unique parmi les noms de + tous les filtres enregistrs. Pour le moment, aucune erreur + n'est signale par l'API register-filter, si bien qu'un problme de + noms dupliqus ne sera pas port la connaissance de + l'utilisateur.

    + +

    Viennent ensuite un ou plusieurs paramtres dans un ordre + indfini, qui permettent de spcifier la commande externe excuter + et certaines autres caractristiques. Le seul paramtre obligatoire + est cmd=. Voici la liste de ces paramtres :

    + +
    +
    cmd=ligne de commande
    + +
    Le mot-cl cmd= spcifie la commande + externe excuter. Si la ligne de commande comporte des + arguments, elle doit tre entoure de guillemets (par exemple + cmd="/bin/mypgm arg1 + arg2"). Les guillemets habituels du shell ne + sont pas ncessaires car le programme est lanc directement, sans + passer par le shell. Les arguments du programme doivent tre + spars par des espaces. Si un argument contient des espaces, ces + derniers doivent tre chapps par un antislash '\'. Si un + argument contient des antislashes '\', ces derniers doivent tre + eux-mmes chapps par un antislash '\'. Outre les variables + d'environnement CGI standards, les variables DOCUMENT_URI, + DOCUMENT_PATH_INFO, et QUERY_STRING_UNESCAPED seront galement + dfinies pour le programme.
    + +
    mode=mode
    + +
    Utilisez mode=output (valeur par dfaut) pour les + filtres qui traitent les rponses. Utilisez + mode=input pour les filtres qui traitent les + requtes. mode=input est disponible depuis la version + 2.1 d'Apache.
    + +
    intype=type MIME
    + +
    Ce paramtre spcifie le type de mdium Internet + (c'est dire le type MIME) des documents qui doivent tre + filtrs. Par dfaut, tous les documents sont filtrs. Aucun des + documents possdant un type MIME autre que celui spcifi par + intype= ne sera filtr.
    + +
    outtype=type MIME
    + +
    Ce paramtre spcifie le type de mdium Internet + (c'est dire le type MIME) des documents filtrs. Il intervient + lorsque les oprations de filtrage comprennent une modification du + type MIME. Par dfaut, le type MIME n'est pas modifi.
    + +
    PreservesContentLength
    + +
    Le mot-cl PreservesContentLength indique que le + filtre doit conserver la taille du contenu. Ce n'est pas le + comportement par dfaut, car la plupart des filtres modifient cette + taille. Ce mot-cl doit tre spcifi si le filtre ne doit pas + modifier la taille du contenu.
    + +
    ftype=type de filtre
    + +
    Ce paramtre spcifie une valeur numrique + reprsentant le type de filtre sous lequel le filtre doit tre + enregistr. La valeur par dfaut, AP_FTYPE_RESOURCE, convient dans + la plupart des situations. Ce paramtre devient ncessaire ds lors + que le filtre doit oprer un autre point de la chane de filtrage + que les filtres de ressources. + Voir les dfinitions de AP_FTYPE_... + dans util_filter.h pour trouver une valeur approprie.
    + +
    disableenv=env
    + +
    Ce paramtre spcifie le nom d'une variable + d'environnement qui, si elle est dfinie, va dsactiver le + filtre.
    + +
    enableenv=env
    + +
    Ce paramtre spcifie le nom d'une variable + d'environnement qui doit tre dfinie pour que le filtre ne soit + pas dsactiv.
    +
    + +
    +
    top
    +

    Directive ExtFilterOptions

    + + + + + + + +
    Description:Configure les options de +mod_ext_filter
    Syntaxe:ExtFilterOptions option [option] ...
    Dfaut:ExtFilterOptions NoLogStderr
    Contexte:rpertoire
    Statut:Extension
    Module:mod_ext_filter
    +

    La directive ExtFilterOptions + spcifie des options de traitement particulires pour + mod_ext_filter. Les arguments option + peuvent contenir :

    + +
    +
    LogStderr | NoLogStderr
    + +
    Le mot-cl LogStderr indique que les messages + envoys par le programme de filtrage externe sur la sortie + d'erreurs standard doivent tre enregistrs dans le journal des + erreurs d'Apache. NoLogStderr inverse ce + comportement.
    + +
    Onfail=[abort|remove]
    +
    Indique la marche suivre si le programme de filtrage externe + ne peut pas dmarrer. Avec abort (la valeur par + dfaut), le traitement de la requte sera abandonn. Avec remove, le + filtre est supprim, et le traitement de la requte se poursuit + sans lui.
    +
    + +
    ExtFilterOptions LogStderr
    + + +

    Les messages envoys vers la sortie d'erreurs standard du filtre + seront enregistrs dans le journal des erreurs d'Apache.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_ext_filter.html.ja.utf8 b/docs/manual/mod/mod_ext_filter.html.ja.utf8 index b89578a0111..701e7ad169e 100644 --- a/docs/manual/mod/mod_ext_filter.html.ja.utf8 +++ b/docs/manual/mod/mod_ext_filter.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_ext_filter - Apache HTTP サーバ +mod_ext_filter - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_ext_filter

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -56,18 +63,18 @@ 環境としては mod_ext_filter は使えます。

    -

    ディレクティブ

    +

    トピック

    +

    ディレクティブ

    -

    トピック

    -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    @@ -361,10 +368,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ext_filter.html.ko.euc-kr b/docs/manual/mod/mod_ext_filter.html.ko.euc-kr index 157ecd50b6e..b33cf0c6bc1 100644 --- a/docs/manual/mod/mod_ext_filter.html.ko.euc-kr +++ b/docs/manual/mod/mod_ext_filter.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_ext_filter - Apache HTTP Server +mod_ext_filter - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_ext_filter

    @@ -56,18 +62,18 @@ ִ.

    -
    top

    @@ -346,9 +352,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ext_filter.xml b/docs/manual/mod/mod_ext_filter.xml index 8a1ea123778..325caf1b540 100644 --- a/docs/manual/mod/mod_ext_filter.xml +++ b/docs/manual/mod/mod_ext_filter.xml @@ -60,30 +60,25 @@ delivery to the client
    Examples
    Generating HTML from some other type of response - - # mod_ext_filter directive to define a filter
    - # to HTML-ize text/c files using the external
    - # program /usr/bin/enscript, with the type of
    - # the result set to text/html
    - ExtFilterDefine c-to-html mode=output \
    - - intype=text/c outtype=text/html \
    - cmd="/usr/bin/enscript --color -W html -Ec -o - -"
    -
    -
    - <Directory "/export/home/trawick/apacheinst/htdocs/c">
    - - # core directive to cause the new filter to
    - # be run on output
    - SetOutputFilter c-to-html
    -
    - # mod_mime directive to set the type of .c
    - # files to text/c
    - AddType text/c .c
    -
    -
    - </Directory> -
    + +# mod_ext_filter directive to define a filter +# to HTML-ize text/c files using the external +# program /usr/bin/enscript, with the type of +# the result set to text/html +ExtFilterDefine c-to-html mode=output \ + intype=text/c outtype=text/html \ + cmd="/usr/bin/enscript --color -W html -Ec -o - -" + +<Directory "/export/home/trawick/apacheinst/htdocs/c"> + # core directive to cause the new filter to + # be run on output + SetOutputFilter c-to-html + + # mod_mime directive to set the type of .c + # files to text/c + AddType text/c .c +</Directory> +
    Implementing a content encoding filter @@ -91,116 +86,104 @@ delivery to the client Please refer to mod_deflate for a practical implementation.

    - - # mod_ext_filter directive to define the external filter
    - ExtFilterDefine gzip mode=output cmd=/bin/gzip
    -
    - <Location /gzipped>
    - - # core directive to cause the gzip filter to be
    - # run on output
    - SetOutputFilter gzip
    -
    - # mod_header directive to add
    - # "Content-Encoding: gzip" header field
    - Header set Content-Encoding gzip
    -
    - </Location> -
    + +# mod_ext_filter directive to define the external filter +ExtFilterDefine gzip mode=output cmd=/bin/gzip + +<Location "/gzipped"> + + # core directive to cause the gzip filter to be + # run on output + SetOutputFilter gzip + + # mod_headers directive to add + # "Content-Encoding: gzip" header field + Header set Content-Encoding gzip +</Location> +
    Slowing down the server - - # mod_ext_filter directive to define a filter
    - # which runs everything through cat; cat doesn't
    - # modify anything; it just introduces extra pathlength
    - # and consumes more resources
    - ExtFilterDefine slowdown mode=output cmd=/bin/cat \
    - - preservescontentlength
    -
    -
    - <Location />
    - - # core directive to cause the slowdown filter to
    - # be run several times on output
    - #
    - SetOutputFilter slowdown;slowdown;slowdown
    -
    - </Location> -
    + +# mod_ext_filter directive to define a filter +# which runs everything through cat; cat doesn't +# modify anything; it just introduces extra pathlength +# and consumes more resources +ExtFilterDefine slowdown mode=output cmd=/bin/cat \ + preservescontentlength + +<Location "/"> + # core directive to cause the slowdown filter to + # be run several times on output + # + SetOutputFilter slowdown;slowdown;slowdown +</Location> +
    Using sed to replace text in the response - - # mod_ext_filter directive to define a filter which
    - # replaces text in the response
    - #
    - ExtFilterDefine fixtext mode=output intype=text/html \
    - - cmd="/bin/sed s/verdana/arial/g"
    -
    -
    - <Location />
    - - # core directive to cause the fixtext filter to
    - # be run on output
    - SetOutputFilter fixtext
    -
    - </Location> -
    + +# mod_ext_filter directive to define a filter which +# replaces text in the response +# +ExtFilterDefine fixtext mode=output intype=text/html \ + cmd="/bin/sed s/verdana/arial/g" + +<Location "/"> + # core directive to cause the fixtext filter to + # be run on output + SetOutputFilter fixtext +</Location> + + + +

    You can do the same thing using mod_substitute +without invoking an external process.

    +
    Tracing another filter - - # Trace the data read and written by mod_deflate
    - # for a particular client (IP 192.168.1.31)
    - # experiencing compression problems.
    - # This filter will trace what goes into mod_deflate.
    - ExtFilterDefine tracebefore \
    - - cmd="/bin/tracefilter.pl /tmp/tracebefore" \
    - EnableEnv=trace_this_client
    -
    -
    - # This filter will trace what goes after mod_deflate.
    - # Note that without the ftype parameter, the default
    - # filter type of AP_FTYPE_RESOURCE would cause the
    - # filter to be placed *before* mod_deflate in the filter
    - # chain. Giving it a numeric value slightly higher than
    - # AP_FTYPE_CONTENT_SET will ensure that it is placed
    - # after mod_deflate.
    - ExtFilterDefine traceafter \
    - - cmd="/bin/tracefilter.pl /tmp/traceafter" \
    - EnableEnv=trace_this_client ftype=21
    -
    -
    - <Directory /usr/local/docs>
    - - SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
    - SetOutputFilter tracebefore;deflate;traceafter
    -
    - </Directory> -
    + +# Trace the data read and written by mod_deflate +# for a particular client (IP 192.168.1.31) +# experiencing compression problems. +# This filter will trace what goes into mod_deflate. +ExtFilterDefine tracebefore \ + cmd="/bin/tracefilter.pl /tmp/tracebefore" \ + EnableEnv=trace_this_client + +# This filter will trace what goes after mod_deflate. +# Note that without the ftype parameter, the default +# filter type of AP_FTYPE_RESOURCE would cause the +# filter to be placed *before* mod_deflate in the filter +# chain. Giving it a numeric value slightly higher than +# AP_FTYPE_CONTENT_SET will ensure that it is placed +# after mod_deflate. +ExtFilterDefine traceafter \ + cmd="/bin/tracefilter.pl /tmp/traceafter" \ + EnableEnv=trace_this_client ftype=21 + +<Directory "/usr/local/docs"> + SetEnvIf Remote_Addr 192.168.1.31 trace_this_client + SetOutputFilter tracebefore;deflate;traceafter +</Directory> + Here is the filter which traces the data: - #!/usr/local/bin/perl -w
    - use strict;
    -
    - open(SAVE, ">$ARGV[0]")
    - - or die "can't open $ARGV[0]: $?";
    -
    -
    - while (<STDIN>) {
    - - print SAVE $_;
    - print $_;
    -
    - }
    -
    - close(SAVE); + +#!/usr/local/bin/perl -w +use strict; + +open(SAVE, ">$ARGV[0]") + or die "can't open $ARGV[0]: $?"; + +while (<STDIN>) { + print SAVE $_; + print $_; +} + +close(SAVE); +
    @@ -326,9 +309,9 @@ delivery to the client filter is removed and the request continues without it. - Example + ExtFilterOptions LogStderr - +

    Messages written to the filter's standard error will be stored in the Apache error log.

    diff --git a/docs/manual/mod/mod_ext_filter.xml.fr b/docs/manual/mod/mod_ext_filter.xml.fr new file mode 100644 index 00000000000..d9f58eeed26 --- /dev/null +++ b/docs/manual/mod/mod_ext_filter.xml.fr @@ -0,0 +1,345 @@ + + + + + + + + + + + +mod_ext_filter +Fait traiter le corps de la réponse par un programme +externe avant de l'envoyer au client +Extension +mod_ext_filter.c +ext_filter_module + + +

    mod_ext_filter représente un modèle de + programmation simple et bien connu pour les filtres. Avec ce module, tout programme + qui lit l'entrée standard stdin et écrit sur la sortie standard + stdout (autrement dit une commande filtre de style Unix) peut + servir de filtre pour Apache. Ce mécanisme de filtrage est beaucoup + plus lent qu'un filtre spécialement écrit pour + l'API d'Apache et faisant partie intégrante du processus du serveur + Apache, mais il présente les avantages suivants :

    + +
      +
    • le modèle de programmation est beaucoup plus simple
    • + +
    • tout langage de script ou de programmation peut être utilisé, + pourvu qu'il permette au programme de lire l'entrée standard et + d'écrire sur la sortie standard.
    • + +
    • on peut utiliser des programmes existants comme filtres Apache + sans modification.
    • +
    + +

    Même dans le cas où le niveau de performance est insuffisant pour + une utilisation en production, on peut utiliser + mod_ext_filter comme prototype d'environnement pour + les filtres.

    + +
    +Filtres + +
    Exemples + +
    Générer du HTML à partir d'un autre type de + contenu + + +# la directive de mod_ext_filter définissant un filtre +# permettant de mettre des fichiers text/c au format HTML en +# utilisant le programme externe /usr/bin/enscript, le type du +# fichier résultant étant défini à text/html +ExtFilterDefine c-to-html mode=output \ + intype=text/c outtype=text/html \ + cmd="/usr/bin/enscript --color -W html -Ec -o - -" + +<Directory "/export/home/trawick/apacheinst/htdocs/c"> + # directive de base permettant de traiter la sortie avec le + # nouveau filtre + SetOutputFilter c-to-html + + # directive de mod_mime définissant le type des fichiers dont + # le nom possède l'extension .c à text/c + AddType text/c .c +</Directory> + +
    + +
    Implémentation d'un filtre de codage de + contenu +

    Note : cet exemple avec gzip n'est fourni qu'à titre + d'illustration. Veuillez vous reporter à la documentation de + mod_deflate pour un exemple d'implémentation plus + pratique.

    + + +# la directive de mod_ext_filter qui définit le filtre externe +ExtFilterDefine gzip mode=output cmd=/bin/gzip + +<Location "/gzipped"> + + # directive de base permettant de traiter la sortie avec le + # filtre gzip + SetOutputFilter gzip + + # la directive de mod_headers permettant d'ajouter le champ + # d'en-tête "Content-Encoding: gzip" + Header set Content-Encoding gzip +</Location> + + +
    + +
    Ralentissement du serveur + +# directive de mod_ext_filter définissant un filtre qui fait +# passer tous les flux en sortie par la commande cat ; cat ne +# modifie rien ; elle ne fait que compliquer le cheminement des +# flux et consommer des ressources supplémentaires + ExtFilterDefine slowdown mode=output cmd=/bin/cat \ +ExtFilterDefine slowdown mode=output cmd=/bin/cat \ + preservescontentlength + +<Location "/"> + # directive de base permettant de traiter plusieurs fois la + # sortie avec le filtre slowdown + # + SetOutputFilter slowdown;slowdown;slowdown +</Location> + +
    + +
    Utilisation de sed pour remplacer du texte dans la + réponse + + +# directive de mod_ext_filter définissant un filtre qui +# remplace du texte dans la réponse +# +ExtFilterDefine fixtext mode=output intype=text/html \ + cmd="/bin/sed s/verdana/arial/g" + +<Location "/"> + # directive de base permettant de traiter la sortie avec le + # filtre fixtext + SetOutputFilter fixtext +</Location> + + + +

    Vous pouvez aussi utiliser mod_substitute pour +effectuer le même traitement sans avoir à invoquer un programme +externe.

    +
    + +
    + +
    Tracer un autre filtre + +# Trace les données lues et écrites par mod_deflate pour un +# client particulier (IP 192.168.1.31) qui a des problèmes de +# compression. +# Ce premier filtre va tracer ce qui entre dans mod_deflate. +ExtFilterDefine tracebefore \ + cmd="/bin/tracefilter.pl /tmp/tracebefore" \ + EnableEnv=trace_this_client + +# Ce second filtre va tracer ce qui sort de mod_deflate. +# Notez que sans le paramètre ftype, le type de filtre par +# défaut AP_FTYPE_RESOURCE placerait le filtre *avant* +# mod_deflate dans la chaîne de filtrage. Le fait d'affecter +# à ce paramètre une valeur numérique sensiblement supérieure à +# AP_FTYPE_CONTENT_SET permet de s'assurer que le filtre sera +# placé après mod_deflate. +ExtFilterDefine traceafter \ + cmd="/bin/tracefilter.pl /tmp/traceafter" \ + EnableEnv=trace_this_client ftype=21 + +<Directory "/usr/local/docs"> + SetEnvIf Remote_Addr 192.168.1.31 trace_this_client + SetOutputFilter tracebefore;deflate;traceafter +</Directory> + + + Voici le filtre qui trace les données : + +#!/usr/local/bin/perl -w +use strict; + +open(SAVE, ">$ARGV[0]") + or die "can't open $ARGV[0]: $?"; + +while (<STDIN>) { + print SAVE $_; + print $_; +} + +close(SAVE); + + +
    +
    + + +ExtFilterDefine +Définit un filtre externe +ExtFilterDefine nom_filtre paramètres +server config + + +

    La directive ExtFilterDefine + définit les caractéristiques d'un filtre externe, et en particulier + le programme à exécuter ainsi que ses arguments.

    + +

    nom_filtre spécifie le nom du filtre en cours de + définition. On peut ensuite utiliser ce nom pour référencer le + filtre dans les directives SetOutputFilter. Il doit être unique parmi les noms de + tous les filtres enregistrés. Pour le moment, aucune erreur + n'est signalée par l'API register-filter, si bien qu'un problème de + noms dupliqués ne sera pas porté à la connaissance de + l'utilisateur.

    + +

    Viennent ensuite un ou plusieurs paramètres dans un ordre + indéfini, qui permettent de spécifier la commande externe à exécuter + et certaines autres caractéristiques. Le seul paramètre obligatoire + est cmd=. Voici la liste de ces paramètres :

    + +
    +
    cmd=ligne de commande
    + +
    Le mot-clé cmd= spécifie la commande + externe à exécuter. Si la ligne de commande comporte des + arguments, elle doit être entourée de guillemets (par exemple + cmd="/bin/mypgm arg1 + arg2"). Les guillemets habituels du shell ne + sont pas nécessaires car le programme est lancé directement, sans + passer par le shell. Les arguments du programme doivent être + séparés par des espaces. Si un argument contient des espaces, ces + derniers doivent être échappés par un antislash '\'. Si un + argument contient des antislashes '\', ces derniers doivent être + eux-mêmes échappés par un antislash '\'. Outre les variables + d'environnement CGI standards, les variables DOCUMENT_URI, + DOCUMENT_PATH_INFO, et QUERY_STRING_UNESCAPED seront également + définies pour le programme.
    + +
    mode=mode
    + +
    Utilisez mode=output (valeur par défaut) pour les + filtres qui traitent les réponses. Utilisez + mode=input pour les filtres qui traitent les + requêtes. mode=input est disponible depuis la version + 2.1 d'Apache.
    + +
    intype=type MIME
    + +
    Ce paramètre spécifie le type de médium Internet + (c'est à dire le type MIME) des documents qui doivent être + filtrés. Par défaut, tous les documents sont filtrés. Aucun des + documents possédant un type MIME autre que celui spécifié par + intype= ne sera filtré.
    + +
    outtype=type MIME
    + +
    Ce paramètre spécifie le type de médium Internet + (c'est à dire le type MIME) des documents filtrés. Il intervient + lorsque les opérations de filtrage comprennent une modification du + type MIME. Par défaut, le type MIME n'est pas modifié.
    + +
    PreservesContentLength
    + +
    Le mot-clé PreservesContentLength indique que le + filtre doit conserver la taille du contenu. Ce n'est pas le + comportement par défaut, car la plupart des filtres modifient cette + taille. Ce mot-clé doit être spécifié si le filtre ne doit pas + modifier la taille du contenu.
    + +
    ftype=type de filtre
    + +
    Ce paramètre spécifie une valeur numérique + représentant le type de filtre sous lequel le filtre doit être + enregistré. La valeur par défaut, AP_FTYPE_RESOURCE, convient dans + la plupart des situations. Ce paramètre devient nécessaire dès lors + que le filtre doit opérer à un autre point de la chaîne de filtrage + que les filtres de ressources. + Voir les définitions de AP_FTYPE_... + dans util_filter.h pour trouver une valeur appropriée.
    + +
    disableenv=env
    + +
    Ce paramètre spécifie le nom d'une variable + d'environnement qui, si elle est définie, va désactiver le + filtre.
    + +
    enableenv=env
    + +
    Ce paramètre spécifie le nom d'une variable + d'environnement qui doit être définie pour que le filtre ne soit + pas désactivé.
    +
    +
    +
    + + +ExtFilterOptions +Configure les options de +mod_ext_filter +ExtFilterOptions option [option] ... +ExtFilterOptions NoLogStderr +directory + + +

    La directive ExtFilterOptions + spécifie des options de traitement particulières pour + mod_ext_filter. Les arguments option + peuvent contenir :

    + +
    +
    LogStderr | NoLogStderr
    + +
    Le mot-clé LogStderr indique que les messages + envoyés par le programme de filtrage externe sur la sortie + d'erreurs standard doivent être enregistrés dans le journal des + erreurs d'Apache. NoLogStderr inverse ce + comportement.
    + +
    Onfail=[abort|remove]
    +
    Indique la marche à suivre si le programme de filtrage externe + ne peut pas démarrer. Avec abort (la valeur par + défaut), le traitement de la requête sera abandonné. Avec remove, le + filtre est supprimé, et le traitement de la requête se poursuit + sans lui.
    +
    + + + ExtFilterOptions LogStderr + + +

    Les messages envoyés vers la sortie d'erreurs standard du filtre + seront enregistrés dans le journal des erreurs d'Apache.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_ext_filter.xml.ja b/docs/manual/mod/mod_ext_filter.xml.ja index 8fa4445abcc..76fe7b2f7ed 100644 --- a/docs/manual/mod/mod_ext_filter.xml.ja +++ b/docs/manual/mod/mod_ext_filter.xml.ja @@ -1,7 +1,7 @@ - + + -mod_file_cache - Apache HTTP Server +mod_file_cache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_file_cache

    Available Languages:  en  | + fr  |  ko 

    説明:レスポンスのボディをクライアントに送る前に外部プログラムで処理する
    ステータス:Extension
    モジュール識別子:ext_filter_module
    @@ -56,15 +62,17 @@

    This module is an extension of and borrows heavily from the mod_mmap_static module in Apache 1.3.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Using mod_file_cache

    @@ -165,9 +173,8 @@ with filenames rewritten by mod_alias or mod_rewrite.

    -

    Example

    - CacheFile /usr/local/apache/htdocs/index.html -

    +

    Example

    CacheFile /usr/local/apache/htdocs/index.html
    +
    top
    @@ -195,16 +202,37 @@ with filenames rewritten by mod_alias or mod_rewrite.

    -

    Example

    - MMapFile /usr/local/apache/htdocs/index.html -

    +

    Example

    MMapFile /usr/local/apache/htdocs/index.html
    +

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_file_cache.html.fr b/docs/manual/mod/mod_file_cache.html.fr new file mode 100644 index 00000000000..3dd8221edfb --- /dev/null +++ b/docs/manual/mod/mod_file_cache.html.fr @@ -0,0 +1,271 @@ + + + + + +mod_file_cache - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_file_cache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:Caches a static list of files in memory
    + + +
    Description:Mise en cache mmoire d'une liste statique de +fichiers
    Statut:Exprimental
    IdentificateurdeModule:file_cache_module
    FichierSource:mod_file_cache.c
    +

    Sommaire

    + + +
    + Ce module doit tre utilis avec prcautions. Il est recommand de + lire attentivement ce document, car l'utilisation de + mod_file_cache peut facilement conduire la + cration d'un site inoprant. +
    + +

    La mise en cache de fichiers souvent demands mais rarement + modifis est une technique permettant de rduire la charge du + serveur. mod_file_cache met en oeuvre deux + techniques de mise en cache de fichiers statiques + frquemment demands. Des directives de configuration vous + permettent d'indiquer mod_file_cache soit + d'ouvrir et de charger une image en mmoire d'un fichier avec + mmap(), soit de prouvrir un fichier et de maintenir en + service le gestionnaire du fichier. Les deux techniques + permettent de rduire la charge du serveur lors du traitement des + requtes concernant ces fichiers, en accomplissant une partie du + travail ncessaire la mise disposition de ces fichiers (en + particulier les oprations d'entres/sorties sur les fichiers) au + dmarrage du serveur, plutt qu'au cours de chaque requte.

    + +

    Note : ces techniques sont inutilisables pour acclrer des + programmes CGI ou d'autres fichiers servis par des gestionnaires de + contenu spciaux. Elles ne peuvent tre utilises que pour des + fichiers standards, normalement servis par le gestionnaire de contenu + de base d'Apache.

    + +

    Ce module est une extension du module + d'Apache 1.3 mod_mmap_staticet s'en inspire + fortement .

    +
    + +
    top
    +
    +

    Utilisation de mod_file_cache

    + +

    mod_file_cache gre la mise en cache d'une liste + de fichiers dfinie de manire statique via une des directives + MMapFile ou + CacheFile au niveau + de la configuration du serveur principal.

    + +

    Les deux directives ne sont pas supportes par toutes les + plates-formes. Par exemple, Apache pour Windows ne supporte pas + actuellement la directive MMapFile, alors que d'autres + plates-formes, comme AIX, supportent les deux. Vous recevrez un + message d'erreur dans le journal des erreurs du serveur si vous + essayez d'utiliser une directive non supporte. Si vous utilisez une + directive non supporte, le serveur dmarrera, mais les fichiers ne + seront pas mis en cache. Sur les plates-formes qui supportent les + deux directives, vous devez faire des essais afin de dterminer + quelle directive vous convient le mieux.

    + +

    Directive MMapFile

    + +

    La directive MMapFile du module + mod_file_cache permet de transfrer en mmoire + une liste statique de fichiers l'aide de l'appel systme + mmap(). Cet appel systme est disponible sur la + plupart des plates-formes de style Unix, mais pas sur toutes. Il + existe parfois des limites spcifiques au systme quant la + taille et au nombre de fichiers qui peuvent tre + mmap()s, et l'exprimentation est probablement la + mthode la plus simple pour dterminer ces limites.

    + +

    Ce mmap()age n'est effectu qu'une seul fois au + dmarrage ou redmarrage du serveur. Ainsi, chaque fois qu'un des + fichiers chargs en mmoire est modifi au niveau du systme de + fichiers, vous devez redmarrer le serveur (voir la + documentation sur l'Arrt et redmarrage). Pour bien + insister sur ce point, si des fichiers sont modifis sur + disque, et si vous ne redmarrez pas le serveur, vous allez + finir par servir des contenus compltement obsoltes. Vous devez + mettre jour les fichiers en renommant l'ancienne version et en + enregistrant la nouvelle sur disque. Pour y parvenir, on peut + utiliser des outils comme rdist et mv. + La raison pour laquelle ce module ne prend pas en compte les + modifications de fichiers rside dans le fait que cette + vrification ncessiterait un appel stat() chaque + accs, et en fin de compte, l'augmentation de la consommation de + ressources finirait par aller contre le but initial de + rduire les entres/sorties.

    + + +

    Directive CacheFile

    + +

    La directive CacheFile du module + mod_file_cache permet d'associer un + gestionnaire ou descripteur de fichier chaque + fichier numr dans la directive de configuration et place ces + gestionnaires de fichiers ouverts dans le cache. Lorsqu'un des + fichier est demand, le serveur slectionne son gestionnaire dans + le cache et le transmet l'API sendfile() (ou + TransmitFile() sous Windows).

    + + + +

    Cette mise en cache des gestionnaire n'est effectue qu'une + seule fois au dmarrage ou redmarrage du systme. Ainsi, chaque + fois qu'un des fichiers chargs en mmoire est modifi au niveau + du systme de fichiers, vous devez redmarrer le serveur + (voir la documentation sur l'Arrt et redmarrage). + Pour bien + insister sur ce point, si des fichiers sont modifis sur + disque, et si vous ne redmarrez pas le serveur, vous allez + finir par servir des contenus compltement obsoltes. Vous devez + mettre jour les fichiers en renommant l'ancienne version et en + enregistrant la nouvelle sur disque. Pour y parvenir, on peut + utiliser des outils comme rdist et + mv.

    + + +

    Note

    +

    Ne cherchez pas trouver de directive qui met tous les + fichiers d'un rpertoire en cache, de manire rcursive. Pour y + parvenir, vous pouvez vous reporter la directive Include directive, et considrer cette + commande :

    + +

    + find /www/htdocs -type f -print \
    + | sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf +

    +
    +
    +
    top
    +

    Directive CacheFile

    + + + + + + +
    Description:Met en cache une liste de gestionnaires de fichiers au +dmarrage
    Syntaxe:CacheFile chemin fichier [chemin fichier] ...
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_file_cache
    +

    La directive CacheFile permet d'associer + des gestionnaires un ou plusieurs fichiers (spars par des + espaces), et de placer ceux-ci dans le cache au dmarrage du + serveur. Les gestionnaires des fichiers mis en cache sont + automatiquement ferms l'arrt du serveur. Lorsqu'un ou plusieurs + fichiers ont t modifis sur disque, le serveur doit tre redmarr + afin que les modifications soient prises en compte par le cache.

    + +

    Soyez prudent avec les arguments chemin fichier : ils + doivent correspondre exactement au chemin du systme de fichier que + crent les gestionnaires de traduction URL-vers-nom-fichier + d'Apache. On ne peut pas comparer des inodes ou autres identifiants + pour mettre en correspondance des chemins l'aide de liens + symboliques (etc...), car l encore, ceci ncessiterait un + appel stat() supplmentaire, ce qui n'est pas acceptable. + Il n'est pas garanti que ce module fonctionne avec des noms de + fichiers rcrits par mod_alias ou + mod_rewrite.

    + +

    Exemple

    CacheFile /usr/local/apache/htdocs/index.html
    +
    + +
    +
    top
    +

    Directive MMapFile

    + + + + + + +
    Description:Charge au dmarrage une liste de fichiers en mmoire
    Syntaxe:MMapFile chemin fichier [chemin fichier] ...
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_file_cache
    +

    La directive MMapFile permet de charger un + ou plusieurs fichiers (spars par des espaces) en mmoire au + dmarrage du serveur. Ceux-ci sont automatiquement dchargs de la + mmoire l'arrt du serveur. Lorsqu'un ou plusieurs fichiers ont + t modifis sur disque, on doit au minimum envoyer un signal + HUP ou USR1 au serveur afin de les + remmap()er.

    + +

    Soyez prudent avec les arguments chemin fichier : ils + doivent correspondre exactement au chemin du systme de fichier que + crent les gestionnaires de traduction URL-vers-nom-fichier + d'Apache. On ne peut pas comparer des inodes ou autres identifiants + pour mettre en correspondance des chemins l'aide de liens + symboliques (etc...), car l encore, ceci ncessiterait un + appel stat() supplmentaire, ce qui n'est pas + acceptable. + Il n'est pas garanti que ce module fonctionne avec des noms de + fichiers rcrits par mod_alias ou + mod_rewrite.

    + +

    Exemple

    MMapFile /usr/local/apache/htdocs/index.html
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_file_cache.html.ko.euc-kr b/docs/manual/mod/mod_file_cache.html.ko.euc-kr index 879c403e257..8bd7cf96a03 100644 --- a/docs/manual/mod/mod_file_cache.html.ko.euc-kr +++ b/docs/manual/mod/mod_file_cache.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_file_cache - Apache HTTP Server +mod_file_cache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_file_cache

    ֽ ƴմϴ. @@ -57,15 +63,17 @@

    ġ 1.3 ִ mod_mmap_static Ȯ .

    -
    top

    mod_file_cache ϱ

    @@ -195,8 +203,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_file_cache.xml b/docs/manual/mod/mod_file_cache.xml index d5d10c899b4..aacc9916553 100644 --- a/docs/manual/mod/mod_file_cache.xml +++ b/docs/manual/mod/mod_file_cache.xml @@ -159,7 +159,9 @@ mod_rewrite.

    Example + MMapFile /usr/local/apache/htdocs/index.html + @@ -188,7 +190,9 @@ mod_rewrite.

    Example + CacheFile /usr/local/apache/htdocs/index.html + diff --git a/docs/manual/mod/mod_file_cache.xml.fr b/docs/manual/mod/mod_file_cache.xml.fr new file mode 100644 index 00000000000..25410350a0c --- /dev/null +++ b/docs/manual/mod/mod_file_cache.xml.fr @@ -0,0 +1,238 @@ + + + + + + + + + + + +mod_file_cache +Mise en cache mémoire d'une liste statique de +fichiers +Experimental +mod_file_cache.c +file_cache_module + + + + + Ce module doit être utilisé avec précautions. Il est recommandé de + lire attentivement ce document, car l'utilisation de + mod_file_cache peut facilement conduire à la + création d'un site inopérant. + + +

    La mise en cache de fichiers souvent demandés mais rarement + modifiés est une technique permettant de réduire la charge du + serveur. mod_file_cache met en oeuvre deux + techniques de mise en cache de fichiers statiques + fréquemment demandés. Des directives de configuration vous + permettent d'indiquer à mod_file_cache soit + d'ouvrir et de charger une image en mémoire d'un fichier avec + mmap(), soit de préouvrir un fichier et de maintenir en + service le gestionnaire du fichier. Les deux techniques + permettent de réduire la charge du serveur lors du traitement des + requêtes concernant ces fichiers, en accomplissant une partie du + travail nécessaire à la mise à disposition de ces fichiers (en + particulier les opérations d'entrées/sorties sur les fichiers) au + démarrage du serveur, plutôt qu'au cours de chaque requête.

    + +

    Note : ces techniques sont inutilisables pour accélérer des + programmes CGI ou d'autres fichiers servis par des gestionnaires de + contenu spéciaux. Elles ne peuvent être utilisées que pour des + fichiers standards, normalement servis par le gestionnaire de contenu + de base d'Apache.

    + +

    Ce module est une extension du module + d'Apache 1.3 mod_mmap_staticet s'en inspire + fortement .

    +
    + +
    Utilisation de mod_file_cache + +

    mod_file_cache gère la mise en cache d'une liste + de fichiers définie de manière statique via une des directives + MMapFile ou + CacheFile au niveau + de la configuration du serveur principal.

    + +

    Les deux directives ne sont pas supportées par toutes les + plates-formes. Par exemple, Apache pour Windows ne supporte pas + actuellement la directive MMapFile, alors que d'autres + plates-formes, comme AIX, supportent les deux. Vous recevrez un + message d'erreur dans le journal des erreurs du serveur si vous + essayez d'utiliser une directive non supportée. Si vous utilisez une + directive non supportée, le serveur démarrera, mais les fichiers ne + seront pas mis en cache. Sur les plates-formes qui supportent les + deux directives, vous devez faire des essais afin de déterminer + quelle directive vous convient le mieux.

    + +
    Directive MMapFile + +

    La directive MMapFile du module + mod_file_cache permet de transférer en mémoire + une liste statique de fichiers à l'aide de l'appel système + mmap(). Cet appel système est disponible sur la + plupart des plates-formes de style Unix, mais pas sur toutes. Il + existe parfois des limites spécifiques au système quant à la + taille et au nombre de fichiers qui peuvent être + mmap()és, et l'expérimentation est probablement la + méthode la plus simple pour déterminer ces limites.

    + +

    Ce mmap()age n'est effectué qu'une seul fois au + démarrage ou redémarrage du serveur. Ainsi, chaque fois qu'un des + fichiers chargés en mémoire est modifié au niveau du système de + fichiers, vous devez redémarrer le serveur (voir la + documentation sur l'Arrêt et redémarrage). Pour bien + insister sur ce point, si des fichiers sont modifiés sur + disque, et si vous ne redémarrez pas le serveur, vous allez + finir par servir des contenus complètement obsolètes. Vous devez + mettre à jour les fichiers en renommant l'ancienne version et en + enregistrant la nouvelle sur disque. Pour y parvenir, on peut + utiliser des outils comme rdist et mv. + La raison pour laquelle ce module ne prend pas en compte les + modifications de fichiers réside dans le fait que cette + vérification nécessiterait un appel à stat() à chaque + accès, et en fin de compte, l'augmentation de la consommation de + ressources finirait par aller contre le but initial de + réduire les entrées/sorties.

    +
    + +
    Directive CacheFile + +

    La directive CacheFile du module + mod_file_cache permet d'associer un + gestionnaire ou descripteur de fichier à chaque + fichier énuméré dans la directive de configuration et place ces + gestionnaires de fichiers ouverts dans le cache. Lorsqu'un des + fichier est demandé, le serveur sélectionne son gestionnaire dans + le cache et le transmet à l'API sendfile() (ou + TransmitFile() sous Windows).

    + + + +

    Cette mise en cache des gestionnaire n'est effectuée qu'une + seule fois au démarrage ou redémarrage du système. Ainsi, chaque + fois qu'un des fichiers chargés en mémoire est modifié au niveau + du système de fichiers, vous devez redémarrer le serveur + (voir la documentation sur l'Arrêt et redémarrage). + Pour bien + insister sur ce point, si des fichiers sont modifiés sur + disque, et si vous ne redémarrez pas le serveur, vous allez + finir par servir des contenus complètement obsolètes. Vous devez + mettre à jour les fichiers en renommant l'ancienne version et en + enregistrant la nouvelle sur disque. Pour y parvenir, on peut + utiliser des outils comme rdist et + mv.

    +
    + + Note +

    Ne cherchez pas à trouver de directive qui met tous les + fichiers d'un répertoire en cache, de manière récursive. Pour y + parvenir, vous pouvez vous reporter à la directive Include directive, et considérer cette + commande :

    + + + find /www/htdocs -type f -print \
    + | sed -e 's/.*/mmapfile &/' > /www/conf/mmap.conf +
    +
    +
    + + +MMapFile +Charge au démarrage une liste de fichiers en mémoire +MMapFile chemin fichier [chemin fichier] ... +server config + + +

    La directive MMapFile permet de charger un + ou plusieurs fichiers (séparés par des espaces) en mémoire au + démarrage du serveur. Ceux-ci sont automatiquement déchargés de la + mémoire à l'arrêt du serveur. Lorsqu'un ou plusieurs fichiers ont + été modifiés sur disque, on doit au minimum envoyer un signal + HUP ou USR1 au serveur afin de les + remmap()er.

    + +

    Soyez prudent avec les arguments chemin fichier : ils + doivent correspondre exactement au chemin du système de fichier que + créent les gestionnaires de traduction URL-vers-nom-fichier + d'Apache. On ne peut pas comparer des inodes ou autres identifiants + pour mettre en correspondance des chemins à l'aide de liens + symboliques (etc...), car là encore, ceci nécessiterait un + appel à stat() supplémentaire, ce qui n'est pas + acceptable. + Il n'est pas garanti que ce module fonctionne avec des noms de + fichiers réécrits par mod_alias ou + mod_rewrite.

    + + Exemple + + MMapFile /usr/local/apache/htdocs/index.html + + +
    +
    + + +CacheFile +Met en cache une liste de gestionnaires de fichiers au +démarrage +CacheFile chemin fichier [chemin fichier] ... +server config + + +

    La directive CacheFile permet d'associer + des gestionnaires à un ou plusieurs fichiers (séparés par des + espaces), et de placer ceux-ci dans le cache au démarrage du + serveur. Les gestionnaires des fichiers mis en cache sont + automatiquement fermés à l'arrêt du serveur. Lorsqu'un ou plusieurs + fichiers ont été modifiés sur disque, le serveur doit être redémarré + afin que les modifications soient prises en compte par le cache.

    + +

    Soyez prudent avec les arguments chemin fichier : ils + doivent correspondre exactement au chemin du système de fichier que + créent les gestionnaires de traduction URL-vers-nom-fichier + d'Apache. On ne peut pas comparer des inodes ou autres identifiants + pour mettre en correspondance des chemins à l'aide de liens + symboliques (etc...), car là encore, ceci nécessiterait un + appel à stat() supplémentaire, ce qui n'est pas acceptable. + Il n'est pas garanti que ce module fonctionne avec des noms de + fichiers réécrits par mod_alias ou + mod_rewrite.

    + + Exemple + + CacheFile /usr/local/apache/htdocs/index.html + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_file_cache.xml.ko b/docs/manual/mod/mod_file_cache.xml.ko index fac337d018b..48ccbaa7677 100644 --- a/docs/manual/mod/mod_file_cache.xml.ko +++ b/docs/manual/mod/mod_file_cache.xml.ko @@ -1,7 +1,7 @@ - + -mod_filter - Apache HTTP Server +mod_filter - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_filter

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -42,16 +48,7 @@ to mod_filter; no change to existing filter modules is required (although it may be possible to simplify them).

    -
    top

    Smart Filtering

    @@ -171,52 +179,46 @@
    Server side Includes (SSI)
    A simple case of replacing AddOutputFilterByType -

    - FilterDeclare SSI
    - FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
    - FilterChain SSI -

    +
    FilterDeclare SSI
    +FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
    +FilterChain SSI
    +
    Server side Includes (SSI)
    The same as the above but dispatching on handler (classic SSI behaviour; .shtml files get processed). -

    - FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
    - FilterChain SSI -

    +
    FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
    +FilterChain SSI
    +
    Emulating mod_gzip with mod_deflate
    Insert INFLATE filter only if "gzip" is NOT in the Accept-Encoding header. This filter runs with ftype CONTENT_SET. -

    - FilterDeclare gzip CONTENT_SET
    - FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
    - FilterChain gzip -

    +
    FilterDeclare gzip CONTENT_SET
    +FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
    +FilterChain gzip
    +
    Image Downsampling
    Suppose we want to downsample all web images, and have filters for GIF, JPEG and PNG. -

    - FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
    - FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
    - FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
    -
    - FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
    - FilterProtocol downsample "change=yes"
    -
    - FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
    - FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
    - FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
    - <Location /image-filter>
    - - FilterChain unpack downsample repack
    -
    - </Location> -

    +
    FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
    +FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
    +FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
    +
    +FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
    +FilterProtocol downsample "change=yes"
    +
    +FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
    +FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
    +FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
    +<Location "/image-filter">
    +    FilterChain unpack downsample repack
    +</Location>
    +
    top
    @@ -271,7 +273,7 @@ -
    Description:Context-sensitive smart filter configuration module
    Status:Base
    Override:FileInfo
    Status:Base
    Module:mod_filter
    Compatibility:Version 2.0.33 and later; had severe limitations before +
    Compatibility:Had severe limitations before being moved to mod_filter in version 2.3.7

    This directive activates a particular output filter for a request depending on the @@ -283,9 +285,8 @@ being moved to mod_filter< text/html or text/plain before it is sent to the client.

    -

    - AddOutputFilterByType DEFLATE text/html text/plain -

    +
    AddOutputFilterByType DEFLATE text/html text/plain
    +

    If you want the content to be processed by more than one filter, their names have to be separated by semicolons. It's also possible to use one @@ -297,14 +298,11 @@ being moved to mod_filter< INCLUDES filter and then by the DEFLATE filter.

    -

    - <Location /cgi-bin/>
    - - Options Includes
    - AddOutputFilterByType INCLUDES;DEFLATE text/html
    -
    - </Location> -

    +
    <Location "/cgi-bin/">
    +    Options Includes
    +    AddOutputFilterByType INCLUDES;DEFLATE text/html
    +</Location>
    +

    See also

    @@ -396,12 +394,19 @@ being moved to
    mod_filter< With two arguments it applies to a filter-name whenever the filter runs any provider.

    +

    Flags specified with this directive are merged with the flags + that underlying providers may have registerd with + mod_filter. For example, a filter may internally specify + the equivalent of change=yes, but a particular + configuration of the module can override with change=no. +

    +

    proto-flags is one or more of

    -
    change=yes
    -
    The filter changes the content, including possibly the content - length
    +
    change=yes|no
    +
    Specifies whether the filter changes the content, including possibly + the content length. The "no" argument is supported in 2.4.7 and later.
    change=1:1
    The filter changes the content, but will not change the content @@ -491,8 +496,30 @@ for a complete reference and examples.
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_filter.html.fr b/docs/manual/mod/mod_filter.html.fr new file mode 100644 index 00000000000..897cf773e97 --- /dev/null +++ b/docs/manual/mod/mod_filter.html.fr @@ -0,0 +1,569 @@ + + + + + +mod_filter - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_filter

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Module de configuration de filtre intelligent sensible au +contexte
    Statut:Base
    IdentificateurdeModule:filter_module
    FichierSource:mod_filter.c
    Compatibilit:Versions 2.1 et suprieures
    +

    Sommaire

    + +

    Ce module permet une configuration intelligente et dpendant du + contexte des filtres de contenu en sortie. Par exemple, Apache peut + tre configur pour faire traiter diffrents types de contenus par + diffrents filtres, mme lorsque le type de contenu n'est pas connu + l'avance (par exemple dans un serveur mandataire).

    + +

    Le fonctionnement de mod_filter consiste + introduire des branchements dans la chane de filtrage. Plutt que + d'insrer directement des filtres dans la chane, on insre un + slecteur de filtre qui va effectuer un branchement conditionnel + vers un fournisseur de filtre. mod_filter peut + utiliser tout filtre de contenu comme fournisseur ; aucune + modification des modules de filtrage existants n'est ncessaire + (bien qu'il soit tout de mme possible de les simplifier).

    +
    + +
    top
    +
    +

    Filtrage intelligent

    +

    Dans le modle de filtrage traditionnel, les filtres sont insrs + sans condition l'aide de la directive AddOutputFilter et des directives + apparentes. Chaque filtre doit ensuite dterminer s'il doit + s'excuter ou non, et les administrateurs du serveur disposent de + peu de souplesse pour faire en sorte que la chane soit traite de + manire dynamique.

    + +

    mod_filter, l'oppos, fournit aux + administrateurs du serveur un grand degr de souplesse pour + configurer la chane de filtrage. Concrtement, la dcision + d'insrer un filtre peut tre prise en fonction d'une expression boolenne complexe. Ceci + gnralise le fonctionnement relativement souple de la directive + AddOutputFilterByType.

    +
    top
    +
    +

    Dclarations de filtres, fournisseurs et +chanes

    +

    + [Cette image illustre le modle de filtrage traditionnel]
    + Figure 1: Le modle de filtrage traditionnel

    + +

    Dans le modle traditionnel, les filtres en sortie constituent + une simple chane s'tendant depuis le gnrateur de contenu (ou + gestionnaire) jusqu'au client. Ce fonctionnement peut convenir s'il + permet d'atteindre le but recherch, mais pose + problme lorsque cette chane doit tre configure dynamiquement en + fonction de la sortie du gestionnaire.

    + +

    + [Cette image illustre le modle de fonctionnement de     mod_filter]
    + Figure 2: Le modle de fonctionnement de + mod_filter

    + +

    Le fonctionnement de mod_filter consiste + introduire des branchements dans la chane de filtrage. Plutt que + d'insrer directement des filtres dans la chane, on insre un + slecteur de filtre qui va effectuer un branchement conditionnel + vers un fournisseur de filtre. mod_filter peut + utiliser tout filtre de contenu comme fournisseur ; aucune + modification des modules de filtrage existants n'est ncessaire + (bien qu'il soit tout de mme possible de les simplifier). Il peut y + avoir plusieurs fournisseurs pour un seul filtre, mais un seul + fournisseur sera choisi pour chaque requte.

    + +

    Une chane de filtrage peut comporter autant d'instances du + slecteur de filtre que l'on souhaite, chacune d'entre elles pouvant + disposer de plusieurs fournisseurs. Un slecteur de filtre possdant + un seul fournisseur dont le choix est inconditionnel constitue un + cas particulier : cette situation est quivalente l'insertion + directe du filtre dans la chane.

    +
    top
    +
    +

    Configuration de la chane de +filtrage

    +

    Trois tapes sont ncessaires pour configurer une chane de + filtrage avec mod_filter. Voir ci-dessous la + description dtaille des directives.

    + +
    +
    Dclaration des filtres
    +
    La directive FilterDeclare permet de dclarer un + filtre en lui assignant un nom et un type. Elle n'est obligatoire + que si le filtre n'est pas du type par dfaut + AP_FTYPE_RESOURCE.
    + +
    Enregistrement des fournisseurs
    +
    La directive FilterProvider permet d'associer un + fournisseur un filtre. Le filtre a t ventuellement dclar + l'aide de la directive FilterDeclare ; si ce n'est pas le cas, FilterProvider + va le dclarer implicitement avec le type par dfaut + AP_FTYPE_RESOURCE. Le fournisseur doit avoir t enregistr + l'aide de ap_register_output_filter par un module + quelconque. Le dernier argument de la directive FilterProvider est une expression : + le fournisseur s'excutera pour une requte si et seulement si + l'expression est value vraie. L'expression peut valuer une + requte HTTP ou les en-ttes de la rponse, des variables + d'environnement, ou le gestionnaire utilis par cette requte. la + diffrence des version prcdentes, mod_filter supporte dsormais + les expressions complexes associant des critres multiples au moyen + d'une logique AND / OR (&& / ||) et de parenthses. Pour les + dtails sur la syntaxe de l'expression, voir la documentation sur ap_expr.
    + +
    Configuration de la chane de filtrage
    +
    Les directives ci-dessus permettent d'laborer les lments + d'une chane de filtrage intelligente, mais pas de les configurer en + vue de leur excution. La directive FilterChain labore une chane de filtrage + partir de filtres intelligents dclars, permettant avec souplesse + d'insrer des filtres au dbut ou la fin de la chane, de + supprimer un filtre ou mme la chane complte.
    +
    +
    top
    +
    +

    Filtrage et statut de la rponse

    +

    Normalement, mod_filter n'applique les filtres qu'aux rponses + possdant un statut HTTP 200 (OK). Pour pouvoir filtrer des + documents possdant un autre statut, vous devez dfinir la variable + d'environnement filter-errordocs, les rponses tant + alors filtres sans se proccuper de leur statut. Pour dfinir ce + comportement de manire plus fine, vous pouvez utiliser des + conditions dans la directive + FilterProvider.

    +
    top
    +
    +

    Mise jour depuis une configuration du +serveur HTTP Apache 2.2

    +

    La directive FilterProvider a t modifie par + rapport httpd 2.2 : les arguments match et + dispatch ont t remplacs par l'argument unique + expression plus polyvalent. En gnral, il est possible + de convertir une paire match/dispatch vers les deux cts d'une + expression, de la manire suivante :

    +

    "dispatch = 'match'"

    +

    Les en-ttes de requte et de rponse et les variables + d'environnement sont maintenant interprts selon les syntaxes + respectives %{req:foo}, %{resp:foo} et + %{env:foo}. Les variables %{HANDLER} et + %{CONTENT_TYPE} sont galement supportes.

    +

    Notez que l'valuation de l'expression ne supporte plus les + comparaisons de sous-chanes. Ces dernires peuvent + tre remplaces par des comparaisons d'expressions rationnelles.

    +
    top
    +
    +

    Exemples

    +
    +
    Inclusions ct serveur (SSI)
    +
    Un exemple simple de remplacement de la directive AddOutputFilterByType +
    FilterDeclare SSI
    +FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
    +FilterChain SSI
    + +
    + +
    Inclusions ct serveur (SSI)
    +
    Mme exemple que ci-dessus, mais envoi vers un gestionnaire + (comportement classique des SSI ; les fichiers .shtml sont + traits). +
    FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
    +FilterChain SSI
    + +
    + +
    mulation de mod_gzip avec mod_deflate
    +
    Insertion du filtre INFLATE seulement si l'en-tte + Accept-Encoding a une valeur autre que "gzip". Ce filtre s'excute + avec le type ftype CONTENT_SET. +
    FilterDeclare gzip CONTENT_SET
    +FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
    +FilterChain gzip
    + +
    + +
    Diminution de la rsolution d'une image
    +
    Supposons que nous voulions rduire la rsolution de toutes les + images web, et que nous disposions de filtres pour les images GIF, + JPEG et PNG. +
    FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
    +FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
    +FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
    +
    +FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
    +FilterProtocol downsample "change=yes"
    +
    +FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
    +FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
    +FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
    +<Location "/image-filter">
    +    FilterChain unpack downsample repack
    +</Location>
    + +
    +
    +
    top
    +
    +

    Gestion de protocole

    +

    Historiquement, tout filtre doit s'assurer que toute modification + qu'il effectue est correctement reprsente dans les en-ttes de la + rponse HTTP, et qu'il ne s'excutera pas si cette excution + rsultait en une modification interdite. Ceci impose aux auteurs de + filtres la corve de rimplmenter certaines fonctionnalits + communes dans chaque filtre :

    + +
      +
    • De nombreux filtres modifient les contenus, et de ce fait + invalident les balises de ces contenus, leur somme de + contrle, leur condens (hash) existant, ainsi que leur + taille.
    • + +
    • Les filtres qui ncessitent une rponse entire et non tronque en + entre, doivent s'assurer qu'il n'ont pas reu une rponse une + requte partielle.
    • + +
    • Les filtres qui modifient la sortie d'un autre filtre doivent + s'assurer qu'ils ne violent pas la directive d'un en-tte + Cache-Control: no-transform ventuel.
    • + +
    • Les filtres peuvent agir sur des rponses de faon ce qu'elles + ne puissent plus tre mises en cache.
    • +
    + +

    mod_filter a pour but de grer de manire + gnrale ces dtails de l'implmentation des filtres, rduisant par + l-mme la complexit des modules de filtrage de contenu. Le + travail permettant d'atteindre ce but est cependant toujours en + cours ; la directive FilterProtocol + implmente certaines de ces fonctionnalits des fins de + compatibilit ascendante avec les modules d'Apache 2.0. Pour les + versions 2.1 et suprieures de httpd, les API + ap_register_output_filter_protocol et + ap_filter_protocol permettent aux modules de filtrage + de dfinir leurs propres comportements.

    + +

    Cependant, mod_filter ne doit pas interfrer + avec un filtre qui gre dj tous les aspects du protocole. Par + dfaut (c'est dire en l'absence de toute directive FilterProtocol), + mod_filter ne modifiera donc pas les en-ttes.

    + +

    Au moment o ces lignes sont crites, cette fonctionnalit a t + trs peu teste, car les modules d'usage courant ont t conus pour + fonctionner avec httpd 2.0. Les modules qui l'utilisent devront donc + l'exprimenter avec prcautions.

    +
    +
    top
    +

    Directive AddOutputFilterByType

    + + + + + + + + +
    Description:assigne un filtre en sortie pour un type de mdia +particulier
    Syntaxe:AddOutputFilterByType filtre[;filtre...] +type_de_mdia [type_de_mdia] ...
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_filter
    Compatibilit:Prsentait de svres limitations avant d'tre dplac dans +mod_filter dans la version 2.3.7
    +

    Cette directive active un filtre en sortie particulier pour une + requte en fonction du type de mdia de la rponse.

    + +

    L'exemple suivant active le filtre DEFLATE qui est + fourni par le module mod_deflate. Il va compresser + toute sortie dont le type MIME est text/html ou + text/plain avant de l'envoyer au client.

    + +
    AddOutputFilterByType DEFLATE text/html text/plain
    + + +

    Si vous voulez assigner plusieurs filtres au contenu, leurs noms + doivent tre spars par des points-virgules. On peut aussi utiliser + une directive AddOutputFilterByType pour + chacun des filtres assigner.

    + +

    La configuration ci-dessous impose le traitement de toute sortie + de script dont le type MIME est text/html en premier + lieu par le filtre INCLUDES, puis par le filtre + DEFLATE.

    + +
    <Location "/cgi-bin/">
    +    Options Includes
    +    AddOutputFilterByType INCLUDES;DEFLATE text/html
    +</Location>
    + + + +

    Voir aussi

    + +
    +
    top
    +

    Directive FilterChain

    + + + + + + + +
    Description:Configure la chane de filtrage
    Syntaxe:FilterChain [+=-@!]nom_filtre ...
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_filter
    +

    Cette directive permet de configurer une chane de filtrage + compose de filtres dclars. FilterChain + accepte un nombre illimit d'arguments, chacun d'entre eux tant + prcd d'un caractre de contrle unique qui dtermine l'action + entreprendre :

    + +
    +
    +nom filtre
    +
    Ajoutenom filtre la fin de la chane de filtrage
    + +
    @nom filtre
    +
    Ajoute nom filtre au dbut de la chane de filtrage
    + +
    -nom filtre
    +
    Supprime nom filtre de la chane de filtrage
    + +
    =nom filtre
    +
    Supprime tous les filtres de la chane de filtrage existante et + les remplace par nom filtre
    + +
    !
    +
    Supprime tous les filtres de la chane de filtrage existante
    + +
    nom filtre
    +
    quivalent +nom filtre
    +
    + +
    +
    top
    +

    Directive FilterDeclare

    + + + + + + + +
    Description:Dclare un filtre intelligent
    Syntaxe:FilterDeclare nom_filtre [type]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_filter
    +

    Cette directive permet de dclarer un filtre en sortie associ + un en-tte ou une variable d'environnement qui dterminera les + conditions de son excution. Le premier argument est le nom du + filtre destin tre utilis dans les directives FilterProvider, FilterChain et FilterProtocol.

    + +

    Le dernier argument (optionnel) est le type du filtre, et peut + prendre les valeurs de ap_filter_type, savoir + RESOURCE (valeur par dfaut), CONTENT_SET, + PROTOCOL, TRANSCODE, + CONNECTION ou NETWORK.

    + +
    +
    top
    +

    Directive FilterProtocol

    + + + + + + + +
    Description:Vrifie le respect du protocole HTTP
    Syntaxe:FilterProtocol nom_filtre [nom_fournisseur] + drapeaux_protocole
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_filter
    +

    Cette directive permet mod_filter de s'assurer + qu'un filtre ne s'excutera pas s'il ne doit pas le faire, et que + les en-ttes de la rponse HTTP sont dfinis correctement en tenant + compte des effets du filtre.

    + +

    Cette directive se prsente sous deux formes. Avec trois + arguments, elle s'applique de manire spcifique un nom + filtre et un nom fournisseur pour ce filtre. Avec + deux arguments, elle s'applique un nom filtre pour + tout fournisseur qu'il actionne.

    + +

    Les drapeaux spcifis sont fusionns avec les drapeaux que les + fournisseurs sous-jacents ont ventuellement enregistrs avec + mod_filter. Par exemple, un filtre peut avoir + spcifi en interne un drapeau quivalent change=yes, + mais une configuration particulire du module peut le surcharger + en spcifiant change=no. +

    + +

    drapeaux_protocole peut contenir un ou plusieurs + drapeaux parmi les suivants :

    + +
    +
    change=yes|no
    +
    Indique si le filtre doit modifier le contenu, y compris ventuellement sa + taille
    + +
    change=1:1
    +
    Le filtre modifie le contenu, mais pas sa taille
    + +
    byteranges=no
    +
    Le filtre ne peut pas traiter de rponses des sous-requtes et + ncessite des rponses compltes en entre
    + +
    proxy=no
    +
    Le filtre ne doit pas s'excuter dans un contexte de mandataire
    + +
    proxy=transform
    +
    Le filtre transforme la rponse de manire incompatible avec + l'en-tte HTTP Cache-Control: no-transform
    + +
    cache=no
    +
    Le filtre fait en sorte que la sortie ne puisse pas tre mise en + cache (par exemple en introduisant des modifications de contenu + alatoires)
    +
    + +
    +
    top
    +

    Directive FilterProvider

    + + + + + + + +
    Description:Enregistre un filtre de contenu
    Syntaxe:FilterProvider nom_filtre nom_fournisseur + expression
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_filter
    +

    Cette directive permet d'associer un fournisseur au + filtre intelligent. Le fournisseur sera invoqu si et seulement si + l'expression est value vraie lorsque le slecteur de + filtre est appel pour la premire fois.

    + +

    + nom fournisseur doit avoir t enregistr au cours du + chargement d'un module l'aide de + ap_register_output_filter. +

    + +

    expression est une expression ap_expr.

    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive FilterTrace

    + + + + + + +
    Description:Obtention d'informations de dbogage/diagnostique en +provenance de mod_filter
    Syntaxe:FilterTrace nom_filtre niveau
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_filter
    +

    Cette directive permet d'obtenir des informations de dbogage en + provenance de mod_filter. Elle est conue pour + aider tester et dboguer les fournisseurs (ou modules de filtrage) + ; elle peut aussi apporter une aide l'utilisation de + mod_filter lui-mme.

    + +

    La sortie de dbogage dpend de la dfinition d'argument + level :

    +
    +
    0 (valeur par dfaut)
    +
    Aucune information de dbogage n'est gnre.
    + +
    1
    +
    mod_filter va enregistrer les ensembles de + conteneurs de donnes (buckets and brigades) qui traversent le + filtre dans le journal des erreurs, avant que le fournisseur ne les + traite. Ces informations sont similaires celles gnres par mod_diagnostics. +
    + +
    2 (pas encore implment)
    +
    Ce niveau permettra d'enregistrer l'ensemble des donnes qui + traversent le filtre dans un fichier temporaire avant de les envoyer + au fournisseur. Pour un dbogage mono-utilisateur + seulement ; l'enregistrement des donnes concernant + plusieurs requtes simultannes ne sera pas support.
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_filter.xml b/docs/manual/mod/mod_filter.xml index 50d08c1e81b..4da8b72c28e 100644 --- a/docs/manual/mod/mod_filter.xml +++ b/docs/manual/mod/mod_filter.xml @@ -154,52 +154,50 @@
    Server side Includes (SSI)
    A simple case of replacing AddOutputFilterByType - - FilterDeclare SSI
    - FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
    - FilterChain SSI -
    + +FilterDeclare SSI +FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|" +FilterChain SSI +
    Server side Includes (SSI)
    The same as the above but dispatching on handler (classic SSI behaviour; .shtml files get processed). - - FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
    - FilterChain SSI -
    + +FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'" +FilterChain SSI +
    Emulating mod_gzip with mod_deflate
    Insert INFLATE filter only if "gzip" is NOT in the Accept-Encoding header. This filter runs with ftype CONTENT_SET. - - FilterDeclare gzip CONTENT_SET
    - FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
    - FilterChain gzip -
    + +FilterDeclare gzip CONTENT_SET +FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/" +FilterChain gzip +
    Image Downsampling
    Suppose we want to downsample all web images, and have filters for GIF, JPEG and PNG. - - FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
    - FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
    - FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
    -
    - FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
    - FilterProtocol downsample "change=yes"
    -
    - FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
    - FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
    - FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
    - <Location /image-filter>
    - - FilterChain unpack downsample repack
    -
    - </Location> -
    + +FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'" +FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'" +FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'" + +FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|" +FilterProtocol downsample "change=yes" + +FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'" +FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'" +FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'" +<Location "/image-filter"> + FilterChain unpack downsample repack +</Location> +
    @@ -255,7 +253,7 @@ virtual hostdirectory .htaccess FileInfo -Version 2.0.33 and later; had severe limitations before +Had severe limitations before being moved to mod_filter in version 2.3.7 @@ -269,9 +267,9 @@ being moved to mod_filter in version 2.3.7 text/html or text/plain before it is sent to the client.

    - + AddOutputFilterByType DEFLATE text/html text/plain - +

    If you want the content to be processed by more than one filter, their names have to be separated by semicolons. It's also possible to use one @@ -283,14 +281,12 @@ being moved to mod_filter in version 2.3.7 INCLUDES filter and then by the DEFLATE filter.

    - - <Location /cgi-bin/>
    - - Options Includes
    - AddOutputFilterByType INCLUDES;DEFLATE text/html
    -
    - </Location> -
    + +<Location "/cgi-bin/"> + Options Includes + AddOutputFilterByType INCLUDES;DEFLATE text/html +</Location> + @@ -409,12 +405,19 @@ for a complete reference and examples. With two arguments it applies to a filter-name whenever the filter runs any provider.

    +

    Flags specified with this directive are merged with the flags + that underlying providers may have registerd with + mod_filter. For example, a filter may internally specify + the equivalent of change=yes, but a particular + configuration of the module can override with change=no. +

    +

    proto-flags is one or more of

    -
    change=yes
    -
    The filter changes the content, including possibly the content - length
    +
    change=yes|no
    +
    Specifies whether the filter changes the content, including possibly + the content length. The "no" argument is supported in 2.4.7 and later.
    change=1:1
    The filter changes the content, but will not change the content diff --git a/docs/manual/mod/mod_filter.xml.fr b/docs/manual/mod/mod_filter.xml.fr new file mode 100644 index 00000000000..a0fec6c1e1a --- /dev/null +++ b/docs/manual/mod/mod_filter.xml.fr @@ -0,0 +1,536 @@ + + + + + + + + + + + +mod_filter +Module de configuration de filtre intelligent sensible au +contexte +Base +mod_filter.c +filter_module +Versions 2.1 et supérieures + + +

    Ce module permet une configuration intelligente et dépendant du + contexte des filtres de contenu en sortie. Par exemple, Apache peut + être configuré pour faire traiter différents types de contenus par + différents filtres, même lorsque le type de contenu n'est pas connu + à l'avance (par exemple dans un serveur mandataire).

    + +

    Le fonctionnement de mod_filter consiste à + introduire des branchements dans la chaîne de filtrage. Plutôt que + d'insérer directement des filtres dans la chaîne, on insère un + sélecteur de filtre qui va effectuer un branchement conditionnel + vers un fournisseur de filtre. mod_filter peut + utiliser tout filtre de contenu comme fournisseur ; aucune + modification des modules de filtrage existants n'est nécessaire + (bien qu'il soit tout de même possible de les simplifier).

    +
    + +
    Filtrage intelligent +

    Dans le modèle de filtrage traditionnel, les filtres sont insérés + sans condition à l'aide de la directive AddOutputFilter et des directives + apparentées. Chaque filtre doit ensuite déterminer s'il doit + s'exécuter ou non, et les administrateurs du serveur disposent de + peu de souplesse pour faire en sorte que la chaîne soit traitée de + manière dynamique.

    + +

    mod_filter, à l'opposé, fournit aux + administrateurs du serveur un grand degré de souplesse pour + configurer la chaîne de filtrage. Concrètement, la décision + d'insérer un filtre peut être prise en fonction d'une expression booléenne complexe. Ceci + généralise le fonctionnement relativement souple de la directive + AddOutputFilterByType.

    +
    + +
    Déclarations de filtres, fournisseurs et +chaînes +

    + [Cette image illustre le modèle de filtrage traditionnel]
    + Figure 1: Le modèle de filtrage traditionnel

    + +

    Dans le modèle traditionnel, les filtres en sortie constituent + une simple chaîne s'étendant depuis le générateur de contenu (ou + gestionnaire) jusqu'au client. Ce fonctionnement peut convenir s'il + permet d'atteindre le but recherché, mais pose + problème lorsque cette chaîne doit être configurée dynamiquement en + fonction de la sortie du gestionnaire.

    + +

    + [Cette image illustre le modèle de fonctionnement de
+    mod_filter]
    + Figure 2: Le modèle de fonctionnement de + mod_filter

    + +

    Le fonctionnement de mod_filter consiste à + introduire des branchements dans la chaîne de filtrage. Plutôt que + d'insérer directement des filtres dans la chaîne, on insère un + sélecteur de filtre qui va effectuer un branchement conditionnel + vers un fournisseur de filtre. mod_filter peut + utiliser tout filtre de contenu comme fournisseur ; aucune + modification des modules de filtrage existants n'est nécessaire + (bien qu'il soit tout de même possible de les simplifier). Il peut y + avoir plusieurs fournisseurs pour un seul filtre, mais un seul + fournisseur sera choisi pour chaque requête.

    + +

    Une chaîne de filtrage peut comporter autant d'instances du + sélecteur de filtre que l'on souhaite, chacune d'entre elles pouvant + disposer de plusieurs fournisseurs. Un sélecteur de filtre possédant + un seul fournisseur dont le choix est inconditionnel constitue un + cas particulier : cette situation est équivalente à l'insertion + directe du filtre dans la chaîne.

    +
    + +
    Configuration de la chaîne de +filtrage +

    Trois étapes sont nécessaires pour configurer une chaîne de + filtrage avec mod_filter. Voir ci-dessous la + description détaillée des directives.

    + +
    +
    Déclaration des filtres
    +
    La directive FilterDeclare permet de déclarer un + filtre en lui assignant un nom et un type. Elle n'est obligatoire + que si le filtre n'est pas du type par défaut + AP_FTYPE_RESOURCE.
    + +
    Enregistrement des fournisseurs
    +
    La directive FilterProvider permet d'associer un + fournisseur à un filtre. Le filtre a été éventuellement déclaré à + l'aide de la directive FilterDeclare ; si ce n'est pas le cas, FilterProvider + va le déclarer implicitement avec le type par défaut + AP_FTYPE_RESOURCE. Le fournisseur doit avoir été enregistré à + l'aide de ap_register_output_filter par un module + quelconque. Le dernier argument de la directive FilterProvider est une expression : + le fournisseur s'exécutera pour une requête si et seulement si + l'expression est évaluée vraie. L'expression peut évaluer une + requête HTTP ou les en-têtes de la réponse, des variables + d'environnement, ou le gestionnaire utilisé par cette requête. À la + différence des version précédentes, mod_filter supporte désormais + les expressions complexes associant des critères multiples au moyen + d'une logique AND / OR (&& / ||) et de parenthèses. Pour les + détails sur la syntaxe de l'expression, voir la documentation sur ap_expr.
    + +
    Configuration de la chaîne de filtrage
    +
    Les directives ci-dessus permettent d'élaborer les éléments + d'une chaîne de filtrage intelligente, mais pas de les configurer en + vue de leur exécution. La directive FilterChain élabore une chaîne de filtrage à + partir de filtres intelligents déclarés, permettant avec souplesse + d'insérer des filtres au début ou à la fin de la chaîne, de + supprimer un filtre ou même la chaîne complète.
    +
    +
    +
    Filtrage et statut de la réponse +

    Normalement, mod_filter n'applique les filtres qu'aux réponses + possédant un statut HTTP 200 (OK). Pour pouvoir filtrer des + documents possédant un autre statut, vous devez définir la variable + d'environnement filter-errordocs, les réponses étant + alors filtrées sans se préoccuper de leur statut. Pour définir ce + comportement de manière plus fine, vous pouvez utiliser des + conditions dans la directive + FilterProvider.

    +
    +
    Mise à jour depuis une configuration du +serveur HTTP Apache 2.2 +

    La directive FilterProvider a été modifiée par + rapport à httpd 2.2 : les arguments match et + dispatch ont été remplacés par l'argument unique + expression plus polyvalent. En général, il est possible + de convertir une paire match/dispatch vers les deux côtés d'une + expression, de la manière suivante :

    + "dispatch = 'match'" +

    Les en-têtes de requête et de réponse et les variables + d'environnement sont maintenant interprétés selon les syntaxes + respectives %{req:foo}, %{resp:foo} et + %{env:foo}. Les variables %{HANDLER} et + %{CONTENT_TYPE} sont également supportées.

    +

    Notez que l'évaluation de l'expression ne supporte plus les + comparaisons de sous-chaînes. Ces dernières peuvent + être remplacées par des comparaisons d'expressions rationnelles.

    +
    + +
    Exemples +
    +
    Inclusions côté serveur (SSI)
    +
    Un exemple simple de remplacement de la directive AddOutputFilterByType + +FilterDeclare SSI +FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|" +FilterChain SSI + +
    + +
    Inclusions côté serveur (SSI)
    +
    Même exemple que ci-dessus, mais envoi vers un gestionnaire + (comportement classique des SSI ; les fichiers .shtml sont + traités). + +FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'" +FilterChain SSI + +
    + +
    Émulation de mod_gzip avec mod_deflate
    +
    Insertion du filtre INFLATE seulement si l'en-tête + Accept-Encoding a une valeur autre que "gzip". Ce filtre s'exécute + avec le type ftype CONTENT_SET. + +FilterDeclare gzip CONTENT_SET +FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/" +FilterChain gzip + +
    + +
    Diminution de la résolution d'une image
    +
    Supposons que nous voulions réduire la résolution de toutes les + images web, et que nous disposions de filtres pour les images GIF, + JPEG et PNG. + +FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'" +FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'" +FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'" + +FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|" +FilterProtocol downsample "change=yes" + +FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'" +FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'" +FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'" +<Location "/image-filter"> + FilterChain unpack downsample repack +</Location> + +
    +
    +
    + +
    Gestion de protocole +

    Historiquement, tout filtre doit s'assurer que toute modification + qu'il effectue est correctement représentée dans les en-têtes de la + réponse HTTP, et qu'il ne s'exécutera pas si cette exécution + résultait en une modification interdite. Ceci impose aux auteurs de + filtres la corvée de réimplémenter certaines fonctionnalités + communes dans chaque filtre :

    + +
      +
    • De nombreux filtres modifient les contenus, et de ce fait + invalident les balises de ces contenus, leur somme de + contrôle, leur condensé (hash) existant, ainsi que leur + taille.
    • + +
    • Les filtres qui nécessitent une réponse entière et non tronquée en + entrée, doivent s'assurer qu'il n'ont pas reçu une réponse à une + requête partielle.
    • + +
    • Les filtres qui modifient la sortie d'un autre filtre doivent + s'assurer qu'ils ne violent pas la directive d'un en-tête + Cache-Control: no-transform éventuel.
    • + +
    • Les filtres peuvent agir sur des réponses de façon à ce qu'elles + ne puissent plus être mises en cache.
    • +
    + +

    mod_filter a pour but de gérer de manière + générale ces détails de l'implémentation des filtres, réduisant par + là-même la complexité des modules de filtrage de contenu. Le + travail permettant d'atteindre ce but est cependant toujours en + cours ; la directive FilterProtocol + implémente certaines de ces fonctionnalités à des fins de + compatibilité ascendante avec les modules d'Apache 2.0. Pour les + versions 2.1 et supérieures de httpd, les API + ap_register_output_filter_protocol et + ap_filter_protocol permettent aux modules de filtrage + de définir leurs propres comportements.

    + +

    Cependant, mod_filter ne doit pas interférer + avec un filtre qui gère déjà tous les aspects du protocole. Par + défaut (c'est à dire en l'absence de toute directive FilterProtocol), + mod_filter ne modifiera donc pas les en-têtes.

    + +

    Au moment où ces lignes sont écrites, cette fonctionnalité a été + très peu testée, car les modules d'usage courant ont été conçus pour + fonctionner avec httpd 2.0. Les modules qui l'utilisent devront donc + l'expérimenter avec précautions.

    +
    + + +AddOutputFilterByType +assigne un filtre en sortie pour un type de média +particulier +AddOutputFilterByType filtre[;filtre...] +type_de_média [type_de_média] ... +server config +virtual hostdirectory +.htaccess +FileInfo +Présentait de sévères limitations avant d'être déplacé dans +mod_filter dans la version 2.3.7 + + +

    Cette directive active un filtre en sortie particulier pour une + requête en fonction du type de média de la réponse.

    + +

    L'exemple suivant active le filtre DEFLATE qui est + fourni par le module mod_deflate. Il va compresser + toute sortie dont le type MIME est text/html ou + text/plain avant de l'envoyer au client.

    + + + AddOutputFilterByType DEFLATE text/html text/plain + + +

    Si vous voulez assigner plusieurs filtres au contenu, leurs noms + doivent être séparés par des points-virgules. On peut aussi utiliser + une directive AddOutputFilterByType pour + chacun des filtres à assigner.

    + +

    La configuration ci-dessous impose le traitement de toute sortie + de script dont le type MIME est text/html en premier + lieu par le filtre INCLUDES, puis par le filtre + DEFLATE.

    + + +<Location "/cgi-bin/"> + Options Includes + AddOutputFilterByType INCLUDES;DEFLATE text/html +</Location> + + +
    + +AddOutputFilter +SetOutputFilter +Les filtres +
    + + +FilterDeclare +Déclare un filtre intelligent +FilterDeclare nom_filtre [type] +server configvirtual host +directory.htaccess +Options + + +

    Cette directive permet de déclarer un filtre en sortie associé à + un en-tête ou une variable d'environnement qui déterminera les + conditions de son exécution. Le premier argument est le nom du + filtre destiné à être utilisé dans les directives FilterProvider, FilterChain et FilterProtocol.

    + +

    Le dernier argument (optionnel) est le type du filtre, et peut + prendre les valeurs de ap_filter_type, à savoir + RESOURCE (valeur par défaut), CONTENT_SET, + PROTOCOL, TRANSCODE, + CONNECTION ou NETWORK.

    +
    +
    + + +FilterProvider +Enregistre un filtre de contenu +FilterProvider nom_filtre nom_fournisseur + expression +server configvirtual host +directory.htaccess +Options + + +

    Cette directive permet d'associer un fournisseur au + filtre intelligent. Le fournisseur sera invoqué si et seulement si + l'expression est évaluée vraie lorsque le sélecteur de + filtre est appelé pour la première fois.

    + +

    + nom fournisseur doit avoir été enregistré au cours du + chargement d'un module à l'aide de + ap_register_output_filter. +

    + +

    expression est une expression ap_expr.

    + +
    +Les expressions dans le serveur HTTP +Apache, pour une référence complète et d'autres exemples. +mod_include +
    + + +FilterChain +Configure la chaîne de filtrage +FilterChain [+=-@!]nom_filtre ... +server configvirtual host +directory.htaccess +Options + + +

    Cette directive permet de configurer une chaîne de filtrage + composée de filtres déclarés. FilterChain + accepte un nombre illimité d'arguments, chacun d'entre eux étant + précédé d'un caractère de contrôle unique qui détermine l'action à + entreprendre :

    + +
    +
    +nom filtre
    +
    Ajoutenom filtre à la fin de la chaîne de filtrage
    + +
    @nom filtre
    +
    Ajoute nom filtre au début de la chaîne de filtrage
    + +
    -nom filtre
    +
    Supprime nom filtre de la chaîne de filtrage
    + +
    =nom filtre
    +
    Supprime tous les filtres de la chaîne de filtrage existante et + les remplace par nom filtre
    + +
    !
    +
    Supprime tous les filtres de la chaîne de filtrage existante
    + +
    nom filtre
    +
    Équivalent à +nom filtre
    +
    +
    +
    + + +FilterProtocol +Vérifie le respect du protocole HTTP +FilterProtocol nom_filtre [nom_fournisseur] + drapeaux_protocole +server configvirtual host +directory.htaccess +Options + + +

    Cette directive permet à mod_filter de s'assurer + qu'un filtre ne s'exécutera pas s'il ne doit pas le faire, et que + les en-têtes de la réponse HTTP sont définis correctement en tenant + compte des effets du filtre.

    + +

    Cette directive se présente sous deux formes. Avec trois + arguments, elle s'applique de manière spécifique à un nom + filtre et un nom fournisseur pour ce filtre. Avec + deux arguments, elle s'applique à un nom filtre pour + tout fournisseur qu'il actionne.

    + +

    Les drapeaux spécifiés sont fusionnés avec les drapeaux que les + fournisseurs sous-jacents ont éventuellement enregistrés avec + mod_filter. Par exemple, un filtre peut avoir + spécifié en interne un drapeau équivalent à change=yes, + mais une configuration particulière du module peut le surcharger + en spécifiant change=no. +

    + +

    drapeaux_protocole peut contenir un ou plusieurs + drapeaux parmi les suivants :

    + +
    +
    change=yes|no
    +
    Indique si le filtre doit modifier le contenu, y compris éventuellement sa + taille
    + +
    change=1:1
    +
    Le filtre modifie le contenu, mais pas sa taille
    + +
    byteranges=no
    +
    Le filtre ne peut pas traiter de réponses à des sous-requêtes et + nécessite des réponses complètes en entrée
    + +
    proxy=no
    +
    Le filtre ne doit pas s'exécuter dans un contexte de mandataire
    + +
    proxy=transform
    +
    Le filtre transforme la réponse de manière incompatible avec + l'en-tête HTTP Cache-Control: no-transform
    + +
    cache=no
    +
    Le filtre fait en sorte que la sortie ne puisse pas être mise en + cache (par exemple en introduisant des modifications de contenu + aléatoires)
    +
    +
    +
    + + +FilterTrace +Obtention d'informations de débogage/diagnostique en +provenance de mod_filter +FilterTrace nom_filtre niveau +server configvirtual host +directory + + +

    Cette directive permet d'obtenir des informations de débogage en + provenance de mod_filter. Elle est conçue pour + aider à tester et déboguer les fournisseurs (ou modules de filtrage) + ; elle peut aussi apporter une aide à l'utilisation de + mod_filter lui-même.

    + +

    La sortie de débogage dépend de la définition d'argument + level :

    +
    +
    0 (valeur par défaut)
    +
    Aucune information de débogage n'est générée.
    + +
    1
    +
    mod_filter va enregistrer les ensembles de + conteneurs de données (buckets and brigades) qui traversent le + filtre dans le journal des erreurs, avant que le fournisseur ne les + traite. Ces informations sont similaires à celles générées par mod_diagnostics. +
    + +
    2 (pas encore implémenté)
    +
    Ce niveau permettra d'enregistrer l'ensemble des données qui + traversent le filtre dans un fichier temporaire avant de les envoyer + au fournisseur. Pour un débogage mono-utilisateur + seulement ; l'enregistrement des données concernant + plusieurs requêtes simultannées ne sera pas supporté.
    +
    +
    +
    + +
    + diff --git a/docs/manual/mod/mod_filter.xml.meta b/docs/manual/mod/mod_filter.xml.meta index 661090548bf..57da411bff4 100644 --- a/docs/manual/mod/mod_filter.xml.meta +++ b/docs/manual/mod/mod_filter.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_headers.html.en b/docs/manual/mod/mod_headers.html.en index 8f1ffc485e4..d25f1a90ae1 100644 --- a/docs/manual/mod/mod_headers.html.en +++ b/docs/manual/mod/mod_headers.html.en @@ -1,23 +1,28 @@ - -mod_headers - Apache HTTP Server +mod_headers - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_headers

    @@ -37,17 +42,19 @@ headers request and response headers. Headers can be merged, replaced or removed.

    -

    Directives

    - -

    Topics

    + +

    Directives

    + +

    Bugfix checklist

    See also

    +
    top

    Order of Processing

    @@ -60,10 +67,9 @@ headers order in the configuration file and by placement in configuration sections. These two directives have a different effect if reversed:

    -

    - RequestHeader append MirrorID "mirror 12"
    - RequestHeader unset MirrorID -

    +
    RequestHeader append MirrorID "mirror 12"
    +RequestHeader unset MirrorID
    +

    This way round, the MirrorID header is not set. If reversed, the MirrorID header is set to "mirror 12".

    @@ -87,7 +93,8 @@ headers configuration is traversed, early headers can only be set in a main server or virtual host context. Early directives cannot depend on a request path, so they will fail in contexts such as - <Directory> or <Location>.

    + <Directory> or + <Location>.

    top

    Examples

    @@ -97,9 +104,8 @@ headers Copy all request headers that begin with "TS" to the response headers: -

    - Header echo ^TS -

    +
    Header echo ^TS
    +
  • @@ -109,9 +115,8 @@ headers the client to intuit load on the server or in isolating bottlenecks between the client and the server. -

    - Header set MyHeader "%D %t" -

    +
    Header set MyHeader "%D %t"
    +

    results in this header being added to the response:

    @@ -123,10 +128,8 @@ headers
  • Say hello to Joe -

    - Header set MyHeader "Hello Joe. It took %D microseconds \
    - for Apache to serve this request." -

    +
    Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this request."
    +

    results in this header being added to the response:

    @@ -143,10 +146,9 @@ headers stimulus. Note that this example requires the services of the mod_setenvif module. -

    - SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
    - Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader -

    +
    SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
    +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader
    +

    If the header MyRequestHeader: myvalue is present on the HTTP request, the response will contain the following header:

    @@ -162,24 +164,22 @@ headers description) by replacing https: with http: in the Destination header: -

    - RequestHeader edit Destination ^https: http: early -

    +
    RequestHeader edit Destination ^https: http: early
    +
  • - Set the same header value under multiple non-exclusive conditions, + Set the same header value under multiple nonexclusive conditions, but do not duplicate the value in the final header. If all of the following conditions applied to a request (i.e., if the CGI, NO_CACHE and NO_STORE environment variables all existed for the request): -

    - Header merge Cache-Control no-cache env=CGI
    - Header merge Cache-Control no-cache env=NO_CACHE
    - Header merge Cache-Control no-store env=NO_STORE -

    +
    Header merge Cache-Control no-cache env=CGI
    +Header merge Cache-Control no-cache env=NO_CACHE
    +Header merge Cache-Control no-store env=NO_STORE
    +

    then the response would contain the following header:

    @@ -196,23 +196,31 @@ headers
  • Set a test cookie if and only if the client didn't send us a cookie -

    - Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" -

    +
    Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"
    +
  • +
  • + Append a Caching header for responses with a HTTP status code of 200 +
    Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200"
    + +
  • +
    top

    Header Directive

    - + - +
    Description:Configure HTTP response headers
    Syntax:Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]
    Syntax:Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Extension
    Module:mod_headers
    Compatibility:Default condition was temporarily changed to "always" in 2.3.9 and 2.3.10
    Compatibility:SetIfEmpty available in 2.4.7 and later, expr=value +available in 2.4.10 and later

    This directive can replace, merge or remove HTTP response headers. The header is modified just after the content handler @@ -220,22 +228,22 @@ headers modified.

    The optional condition argument determines which internal - table of responses headers this directive will operate against. Other - components of the server may have stored their response headers in either - the table that corresponds to onsuccess or the table that - corresponds to always. "Always" in this context refers to - whether headers you add will be sent during both a successful and unsucessful - response, but if your action is a function of an existing header, you - will have to read on for further complications.

    - -

    The default value of onsuccess may need to be changed to - always under the circumstances similar to those listed below. + table of responses headers this directive will operate against. Despite the + name, the default value of onsuccess does not limit + an action to responses with a 2xx status code. Headers set under + this condition are still used when, for example, a request is successfully + proxied or generated by CGI, even when they have generated a failing status code.

    + +

    When your action is a function of an existing header, you may need to specify + a condition of always, depending on which internal table the + original header was set in. The table that corresponds to always is + used for locally generated error responses as well as successful responses. Note also that repeating this directive with both conditions makes sense in some scenarios because always is not a superset of onsuccess with respect to existing headers:

      -
    • You're adding a header to a non-success (non-2xx) response, such +
    • You're adding a header to a locally generated non-success (non-2xx) response, such as a redirect, in which case only the table corresponding to always is used in the ultimate response.
    • You're modifying or removing a header generated by a CGI script, @@ -246,6 +254,10 @@ headers onsuccess condition.
    +

    Separately from the condition parameter described above, you + can limit an action based on HTTP status codes for e.g. proxied or CGI + requests. See the example that uses %{REQUEST_STATUS} in the section above.

    +

    The action it performs is determined by the first argument (second argument if a condition is specified). This can be one of the following values:

    @@ -271,10 +283,15 @@ headers value must be omitted.
    edit
    -
    If this request header exists, its value is transformed according +
    edit*
    +
    If this response header exists, its value is transformed according to a regular expression search-and-replace. The value argument is a regular expression, and the replacement - is a replacement string, which may contain backreferences.
    + is a replacement string, which may contain backreferences or format specifiers. + The edit form will match and replace exactly once + in a header value, whereas the edit* form will replace + every instance of the search pattern if it appears more + than once.
    merge
    The response header is appended to any existing header of @@ -290,10 +307,31 @@ headers
    The response header is set, replacing any previous header with this name. The value may be a format string.
    +
    setifempty
    +
    The request header is set, but only if there is no previous header + with this name. +
    + The Content-Type header is a special use case since there might be + the chance that its value have been determined but the header is not part + of the response when setifempty is evaluated. + It is safer to use set for this use case like in the + following example: +
    Header set Content-Type "text/plain" "expr=-z %{CONTENT_TYPE}"
    + +
    +
    unset
    The response header of this name is removed, if it exists. If there are multiple headers of the same name, all will be removed. value must be omitted.
    + +
    note
    +
    The value of the named response header is copied into an + internal note whose name is given by value. This is useful + if a header sent by a CGI or proxied resource is configured to be unset + but should also be logged.
    + Available in 2.4.7 and later.
    +

    This argument is followed by a header name, which @@ -308,9 +346,12 @@ headers add a value is specified as the next argument. If value contains spaces, it should be surrounded by double quotes. - value may be a character string, a string containing format - specifiers or a combination of both. The following format specifiers - are supported in value:

    + value may be a character string, a string containing + mod_headers specific format specifiers (and character + literals), or an ap_expr expression prefixed + with expr=

    + +

    The following format specifiers are supported in value:

    @@ -324,10 +365,28 @@ headers headers are sent on the wire. This is a measure of the duration of the request. The value is preceded by D=. The value is measured in microseconds. - + + + + + + + - +
    FormatDescription
    %%
    %{VARNAME}e
    %lThe current load averages of the actual server itself. It is + designed to expose the values obtained by getloadavg() + and this represents the current load average, the 5 minute average, and + the 15 minute average. The value is preceded by l= with each + average separated by /.
    + Available in 2.4.4 and later. +
    %iThe current idle percentage of httpd (0 to 100) based on available + processes and threads. The value is preceded by i=.
    + Available in 2.4.4 and later. +
    %bThe current busy percentage of httpd (0 to 100) based on available + processes and threads. The value is preceded by b=.
    + Available in 2.4.4 and later. +
    %{VARNAME}e The contents of the environment variable VARNAME.
    %{VARNAME}s
    %{VARNAME}s The contents of the SSL environment variable VARNAME, if mod_ssl is enabled.
    @@ -341,9 +400,28 @@ headers more efficient than %s.

    +

    Note on expression values

    +

    When the value parameter uses the ap_expr + parser, some expression syntax will differ from examples that evaluate + boolean expressions such as <If>:

    +
      +
    • The starting point of the grammar is 'string' rather than 'expr'.
    • +
    • Function calls use the %{funcname:arg} syntax rather than + funcname(arg).
    • +
    • Multi-argument functions are not currently accessible from this + starting point
    • +
    • Quote the entire parameter, such as +
      Header set foo-checksum "expr=%{md5:foo}"
      + +
    • + +
    +
    +

    For edit there is both a value argument which is a regular expression, - and an additional replacement string.

    + and an additional replacement string. As of version 2.4.7 + the replacement string may also contain format specifiers.

    The Header directive may be followed by an additional argument, which may be any of:

    @@ -357,26 +435,36 @@ headers
    expr=expression
    The directive is applied if and only if expression evaluates to true. Details of expression syntax and evaluation are - documented in the ap_expr documentation.
    + documented in the ap_expr documentation. +
    # This delays the evaluation of the condition clause compared to <If>
    +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path.php$#"
    + +

    Except in early mode, the Header directives are processed just - before the response is sent to the network. These means that it is - possible to set and/or override most headers, except for those headers - added by the HTTP header filter, such as Content-Type.

    + before the response is sent to the network. This means that it is + possible to set and/or override most headers, except for some headers + added by the HTTP header filter. Prior to 2.2.12, it was not possible + to change the Content-Type header with this directive.

    +
    top

    RequestHeader Directive

    - + +
    Description:Configure HTTP request headers
    Syntax:RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]
    Syntax:RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +
    Context:server config, virtual host, directory, .htaccess
    Override:FileInfo
    Status:Extension
    Module:mod_headers
    Compatibility:SetIfEmpty available in 2.4.7 and later, expr=value +available in 2.4.10 and later

    This directive can replace, merge, change or remove HTTP request headers. The header is modified just before the content handler @@ -405,14 +493,14 @@ headers

    If this request header exists, its value is transformed according to a regular expression search-and-replace. The value argument is a regular expression, and the replacement - is a replacement string, which may contain backreferences. + is a replacement string, which may contain backreferences or format specifiers. The edit form will match and replace exactly once in a header value, whereas the edit* form will replace every instance of the search pattern if it appears more than once.
    merge
    -
    The response header is appended to any existing header of +
    The request header is appended to any existing header of the same name, unless the value to be appended already appears in the existing header's comma-delimited list of values. When a new value is merged onto an existing header it is separated from the existing header @@ -425,6 +513,11 @@ headers
    The request header is set, replacing any previous header with this name
    +
    setifempty
    +
    The request header is set, but only if there is no previous header + with this name.
    + Available in 2.4.7 and later.
    +
    unset
    The request header of this name is removed, if it exists. If there are multiple headers of the same name, all will be removed. @@ -473,7 +566,28 @@ headers  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_headers.html.fr b/docs/manual/mod/mod_headers.html.fr index 2a36b2a2c0c..5c381fea7ce 100644 --- a/docs/manual/mod/mod_headers.html.fr +++ b/docs/manual/mod/mod_headers.html.fr @@ -1,23 +1,28 @@ - -mod_headers - Serveur Apache HTTP +mod_headers - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_headers

    @@ -37,18 +42,20 @@ HTTP modifier les en-ttes de requtes et de rponses HTTP. Les en-ttes peuvent tre fusionns, remplacs ou supprims.

    -
    top

    Chronologie du traitement

    @@ -63,10 +70,9 @@ tardif ces deux directives ont un effet diffrent si leur ordre est invers :

    -

    - RequestHeader append MirrorID "mirror 12"
    - RequestHeader unset MirrorID -

    +
    RequestHeader append MirrorID "mirror 12"
    +RequestHeader unset MirrorID
    +

    Dans cet ordre, l'en-tte MirrorID n'est pas dfini. Si l'ordre des directives tait invers, l'en-tte @@ -96,8 +102,7 @@ tardif prcoces ne peuvent tre dfinis que dans un contexte de serveur principal ou de serveur virtuel. Les directives prcoces ne peuvent pas dpendre d'un chemin de requte, si bien qu'elles choueront - dans des contextes tels que <Directory> ou - <Location>.

    + dans des contextes tels que <Directory> ou <Location>.

    top

    Exemples

    @@ -107,9 +112,8 @@ tardif Copie tous les en-ttes de requte qui commencent par "TS" vers les en-ttes de la rponse : -

    - Header echo ^TS -

    +
    Header echo ^TS
    +
  • @@ -121,9 +125,8 @@ tardif isoler les goulets d'tranglement entre le client et le serveur. -

    - Header set mon-en-tte "%D %t" -

    +
    Header set mon-en-tte "%D %t"
    +

    le rsultat est l'ajout la rponse d'un en-tte du type :

    @@ -142,10 +145,9 @@ tardif

    le rsultat est l'ajout la rponse d'un en-tte du type :

    -

    - mon-en-tte: Bonjour Joe. Il a fallu D=3775428 microsecondes Apache - pour servir cette requte. -

    +
    	Header set MyHeader "Bonjour Joe. Il a fallu D=3775428 microsecondes  Apache
    +          pour servir cette requte."
    +
  • @@ -156,10 +158,9 @@ tardif exemple ncessite les services du module mod_setenvif. -

    - SetEnvIf mon-en-tte-requte mavaleur HAVE_MyRequestHeader
    - Header set mon-en-tte "%D %t montexte" env=HAVE_MyRequestHeader -

    +
    SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
    +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader
    +

    Si l'en-tte mon-en-tte-requte: mavaleur est prsent dans la requte HTTP, la rponse contiendra un en-tte @@ -175,9 +176,8 @@ tardif du problme) en remplaant https: par http: dans l'en-tte Destination : -

    - RequestHeader edit Destination ^https: http: early -

    +
    RequestHeader edit Destination ^https: http: early
    +
  • @@ -189,11 +189,10 @@ tardif NO_CACHE et NO_STORE existent pour la requte) : -

    - Header merge Cache-Control no-cache env=CGI
    - Header merge Cache-Control no-cache env=NO_CACHE
    - Header merge Cache-Control no-store env=NO_STORE -

    +
    Header merge Cache-Control no-cache env=CGI
    +Header merge Cache-Control no-cache env=NO_CACHE
    +Header merge Cache-Control no-store env=NO_STORE
    +

    alors, la rponse contiendra l'en-tte suivant :

    @@ -212,24 +211,34 @@ tardif
  • Dfinit un cookie de test si et seulement si le client n'envoie pas de cookie -

    - Header set Set-Cookie testcookie !$req{Cookie} -

    +
    Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"
    + +
  • +
  • + Ajoute un en-tte de mise en cache pour les rponses avec un + code d'tat HTTP de 200 +
    Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200"
    +
  • +
    top
    -

    Header Directive

    +

    Directive Header

    - + - +
    Description:Configure les en-ttes d'une rponse HTTP
    Syntaxe:Header [condition] add|append|echo|edit|merge|set|unset -en-tte [valeur] [early|env=[!]variable]
    Syntaxe:Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +en-tte [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] +
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_headers
    Compatibilit:La condition par dfaut est temporairement passe - "always" dans les version 2.3.9 et 2.3.10
    Compatibilit:SetIfEmpty est disponible depuis la version 2.4.7 du +serveur HTTP Apache ; le paramtre expr=valeur a t introduit avec la +version 2.4.10

    Cette directive permet de remplacer, fusionner, ou supprimer des en-ttes de rponse HTTP. L'en-tte est modifi juste @@ -239,24 +248,27 @@ tardif

    L'argument optionnel condition permet de dterminer sur quelle table interne d'en-ttes de rponses cette directive va - oprer. D'autres composants du serveur peuvent avoir stock leurs - en-ttes de rponses dans la table correspondant - onsuccess ou dans celle correspondant - always. Dans ce contexte, "Always" fait rfrence au - choix d'envoyer les en-ttes que vous ajoutez aux rponses, qu'elle - soient avec succs ou choues ; par contre, si votre action est une - fonction d'un en-tte existant, vous devrez lire la documentation de - manire plus approfondie car dans ce cas, les choses se compliquent.

    - -

    Vous pouvez avoir changer la valeur par dfaut - onsuccess en always dans des circonstances - similaires celles exposes plus loin. Notez aussi que la rptition + oprer. En dpit du nom, la valeur par dfaut de + onsuccess ne limite pas une action + aux rponses avec un code d'tat de 2xx. Les en-ttes dfinis sous + cette condition sont encore utiliss quand par exemple une requte + est mandate ou gnre par un programme CGI avec succs, + et ceci mme dans le cas o ils ont gnr un code d'chec.

    + +

    Lorsque votre action est une fonction agissant sur un en-tte + existant, vous pourrez tre amen spcifier une condition + always, en fonction de la table interne dans laquelle + l'en-tte original a t dfini. La table qui correspond + always est utilise pour les rponses d'erreur gnres + localement ainsi que pour les rponses qui ont abouti. + Notez aussi que la rptition de cette directive avec les deux conditions peut tre pertinente dans certains scnarios, car always n'englobe pas onsuccess en ce qui concerne les en-ttes existants :

      -
    • Vous ajoutez un en-tte une rponse choue (non-2xx), +
    • Vous ajoutez un en-tte une rponse + gnre localement et choue (non-2xx), une redirection par exemple, et dans ce cas, seule la table correspondant always est utilise dans la rponse dfinitive.
    • @@ -269,6 +281,12 @@ tardif condition par dfaut onsuccess.
    +

    Outre le paramtre condition dcrit ci-dessus, vous + pouvez limiter une action en fonction de codes d'tat HTTP, par + exemple pour les requtes mandates ou gnres par un programme + CGI. Voir l'exemple qui utilise %{REQUEST_STATUS} dans la section + ci-dessus.

    +

    L'action que cette directive provoque est dtermine par le premier argument (ou par le second argument si une condition est spcifie). Il peut prendre @@ -296,12 +314,17 @@ tardif valeur ne doit pas tre prsent.

    edit
    +
    edit*
    Si l'en-tte existe, sa valeur est modifie en fonction d'une expression rationnelle de type recherche/remplacement. L'argument valeur est une expression rationnelle, et l'argument remplacement une chane de caractres de - remplacement qui peut contenir des rfrences arrires.
    + remplacement qui peut contenir des rfrences + arrires ou des spcificateurs de format. La forme edit n'effectuera une + recherche/remplacement qu'une seule fois dans la valeur de + l'en-tte, alors que la forme edit* en effectuera autant + que le nombre d'apparition de la chane remplacer.
    merge
    La valeur d'en-tte est ajoute tout en-tte de mme nom, sauf @@ -320,11 +343,32 @@ tardif le mme nom. L'argument valeur peut tre une chane de formatage.
    +
    setifempty
    +
    L'en-tte est dfini, mais seulement s'il n'existe + aucun en-tte avec le mme nom. +
    + L'en-tte Content-Type est un cas particulier car il est possible que sa + valeur ait t dtermine mais que l'en-tte ne soit pas prsent dans la + rponse lorsque setifempty est valu. Dans ce cas, il est + prfrable d'utiliser set comme dans l'exemple suivant : +
    Header set Content-Type "text/plain" "expr=-z %{CONTENT_TYPE}"
    + +
    +
    unset
    L'en-tte est supprim s'il existe. Si plusieurs en-ttes possdent le mme nom, ils seront tous supprims. L'argument value ne doit pas apparatre.
    - + +
    note
    +
    La valeur de l'en-tte considr est copie dans une + note interne dont le nom est spcifi via l'argument + valeur. Ceci permet de journaliser la valeur d'un en-tte + envoy par un programme CGI ou une ressource mandate, mme s'il + est prvu de l'effacer.
    + Disponible partir de la version 2.4.7 du serveur HTTP Apache.
    + +

    Cet argument est suivi d'un nom d'en-tte qui peut se terminer par un caractre ':', mais ce n'est pas obligatoire. La @@ -338,8 +382,11 @@ tardif argument suivant. Si valeur contient des espaces, elle doit tre entoure de guillemets. valeur peut tre une chane de caractres, une chane contenant des spcificateurs de - format, ou une combinaison des deux. valeur supporte les - spcificateurs de format suivants :

    + format propres mod_headers (et des caractres + littraux), ou une expression ap_expr + prfixe par expr=.

    + +

    valeur supporte les spcificateurs de format suivants :

    @@ -354,10 +401,30 @@ tardif des en-ttes sur le rseau. Il s'agit de la dure de traitement de la requte. La valeur est prcde de D=. La valeur est exprime en microsecondes. - + + + + + + + - + @@ -373,10 +440,32 @@ tardif efficace que %s.

    +

    Note propos des valeurs des expressions

    +

    Lorsque le paramtre valeur utilise l'interprteur ap_expr, certaines syntaxes d'expressions + seront diffrentes des exemples qui valuent des expressions + boolennes telles que <If> :

    +
      +
    • Le point de dpart de la syntaxe est 'string' au lieu de + 'expr'.
    • +
    • Les appels de fonction utilisent la syntaxe %{funcname:arg} au + lieu de funcname(arg).
    • +
    • Les fonctions multi-arguments ne sont pas encore disponibles + depuis le point de dpart 'string'.
    • +
    • Il faut mettre entre guillemets l'ensemble du paramtre, comme + dans l'exemple suivant : +
      Header set foo-checksum "expr=%{md5:foo}"
      + +
    • + +
    +
    +

    editncessite les deux arguments valeur, qui est une expression rationnelle, et une chane additionnelle - remplacement.

    + remplacement. Depuis la version 2.4.7, la chane de + remplacement peut aussi + contenir des spcificateurs de format.

    La directive Header peut tre suivie d'un argument additionnel qui peut prendre les valeurs suivantes :

    @@ -384,36 +473,47 @@ tardif
    early
    Spcifie traitement pralable.
    -
    env=[!]variable
    +
    env=[!]variable
    La directive est applique si et seulement si la variable d'environnement variable existe. Un ! devant variable inverse le test, et la directive ne s'appliquera alors que si variable n'est pas dfinie.
    -
    expr
    -
    Une chane qui correspond toute valeur ci-dessus est - interprte comme une expression. Les dtails propos de la syntaxe - des expressions et leur valuation sont pour l'instant mieux - documents dans la page de mod_filter.
    +
    expr=expression
    +
    La directive s'applique si et seulement si expression + est value true. Vous trouverez plus de dtails propos de la + syntaxe et de l'valuation des expressions dans la documentation ap_expr. +
             # Cet exemple retarde l'valuation de la clause de condition par
    +	 # rapport  <If>
    +         Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path.php$#"
    + +

    Except le cas du mode prcoce, les directives Header sont traites juste avant l'envoi de la rponse sur le rseau. Cela signifie qu'il est possible de dfinir et/ou modifier la plupart des en-ttes, - l'exception de ceux qui sont ajouts par le filtre HTTP - d'en-tte, comme Content-Type.

    + l'exception de certains en-ttes qui sont ajouts par le filtre + d'en-tte HTTP. Avant la version 2.2.12, il n'tait pas + possible de modifier l'en-tte Content-Type avec cette directive.

    top
    -
    FormatDescription
    %%
    %{NOM_VARIABLE}e
    %lLa charge moyenne courante du serveur proprement dit. Ce + sont les valeurs obtenues par getloadavg() qui + reprsentent la charge moyenne courante, sur 5 minutes et sur 15 + minutes. Chaque valeur est prcde de l= et + spare de la suivante par un /.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %iLe pourcentage courant de httpd au repos (de 0 100) + en se basant sur le nombre de processus et threads disponibles. + La valeur est prcde de i=.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %bLe pourcentage courant de httpd utilis (de 0 100) + en se basant sur le nombre de processus et threads disponibles. + La valeur est prcde de b=.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %{NOM_VARIABLE}e Le contenu de la variable d'environnement NOM_VARIABLE.
    %{NOM_VARIABLE}s
    %{NOM_VARIABLE}s Le contenu de la variable d'environnement SSL NOM_VARIABLE, si mod_ssl est activ.
    - + +
    Description:Configure les en-ttes d'une requte HTTP
    Syntaxe:RequestHeader add|append|edit|edit*|merge|set|unset en-tte -[valeur] [remplacement] [early|env=[!]variable]
    Syntaxe:RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +en-tte [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] +
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_headers
    Compatibilit:SetIfEmpty est disponible depuis la version 2.4.7 du +serveur HTTP Apache ; le paramtre expr=valeur a t introduit avec la +version 2.4.10

    Cette directive permet de remplacer, fusionner, modifier ou supprimer des en-ttes de requte HTTP. L'en-tte est modifi juste @@ -438,13 +538,15 @@ tardif mthode HTTP standard permettant d'affecter plusieurs valeurs un en-tte. +

    edit
    edit*
    Si l'en-tte existe, sa valeur est modifie en fonction d'une expression rationnelle de type recherche/remplacement. L'argument valeur est une expression rationnelle, et l'argument remplacement une chane de caractres de - remplacement qui peut contenir des rfrences arrires. Avec + remplacement qui peut contenir des rfrences + arrires ou des spcificateurs de format. Avec edit, la chane de l'en-tte correspondant au modle ne sera recherche et remplace qu'une seule fois, alors qu'avec edit*, elle le sera pour chacune de ses instances si @@ -466,6 +568,11 @@ tardif
    L'en-tte est dfini, remplaant tout en-tte prexistant avec le mme nom.
    +
    setifempty
    +
    L'en-tte est dfini, mais seulement s'il n'existe + aucun en-tte avec le mme nom.
    + Disponible depuis la version 2.4.7 du serveur HTTP Apache.
    +
    unset
    L'en-tte est supprim s'il existe. Si plusieurs en-ttes possdent le mme nom, ils seront tous supprims. L'argument @@ -495,16 +602,15 @@ tardif
    early
    Spcifie traitement pralable.
    -
    env=[!]variable
    +
    env=[!]variable
    La directive est applique si et seulement si la variable d'environnement variable existe. Un ! devant variable inverse le test, et la directive ne s'appliquera alors que si variable n'est pas dfinie.
    -
    expr
    -
    Une chane qui correspond toute valeur ci-dessus est - interprte comme une expression. Les dtails propos de la syntaxe - des expressions et leur valuation sont pour l'instant mieux - documents dans la page de mod_filter.
    +
    expr=expression
    +
    La directive s'applique si et seulement si expression + est value true. Vous trouverez plus de dtails propos de la + syntaxe et de l'valuation des expressions dans la documentation ap_expr.

    Except le cas du mode prcoce, la directive @@ -521,7 +627,28 @@ tardif  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_headers.html.ja.utf8 b/docs/manual/mod/mod_headers.html.ja.utf8 index 16e0a17bfaa..6a4e31296a4 100644 --- a/docs/manual/mod/mod_headers.html.ja.utf8 +++ b/docs/manual/mod/mod_headers.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_headers - Apache HTTP サーバ +mod_headers - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_headers

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -41,22 +47,24 @@ 変更するためのディレクティブを提供します。ヘッダを追加したり、 置き換えたり、削除したりすることができます。

    -

    ディレクティブ

    - -

    トピック

    + +

    ディレクティブ

    + +

    Bugfix checklist

    参照

    +
    top

    処理の順番

    -

    mod_header のディレクティブはサーバ設定のほぼどこにでも +

    mod_headers のディレクティブはサーバ設定のほぼどこにでも 書くことができ、影響する範囲を設定用セクションで囲むことで限定する ことができます。

    @@ -342,11 +350,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_headers.html.ko.euc-kr b/docs/manual/mod/mod_headers.html.ko.euc-kr index d25fde11f30..7bc8f364e1d 100644 --- a/docs/manual/mod/mod_headers.html.ko.euc-kr +++ b/docs/manual/mod/mod_headers.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_headers - Apache HTTP Server +mod_headers - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_headers

    @@ -39,17 +44,19 @@

    HTTP û ϰ ϴ þ Ѵ. ġų ü, ִ.

    -
    top

    ó

    @@ -335,7 +342,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_headers.xml b/docs/manual/mod/mod_headers.xml index 9c80f749213..a0c2eca929a 100644 --- a/docs/manual/mod/mod_headers.xml +++ b/docs/manual/mod/mod_headers.xml @@ -47,10 +47,10 @@ headers href="../sections.html#mergin">configuration sections. These two directives have a different effect if reversed:

    - - RequestHeader append MirrorID "mirror 12"
    - RequestHeader unset MirrorID -
    + +RequestHeader append MirrorID "mirror 12" +RequestHeader unset MirrorID +

    This way round, the MirrorID header is not set. If reversed, the MirrorID header is set to "mirror 12".

    @@ -74,7 +74,8 @@ headers configuration is traversed, early headers can only be set in a main server or virtual host context. Early directives cannot depend on a request path, so they will fail in contexts such as - <Directory> or <Location>.

    + Directory or + Location.

    Examples @@ -84,9 +85,9 @@ headers Copy all request headers that begin with "TS" to the response headers: - + Header echo ^TS - +
  • @@ -96,9 +97,9 @@ headers the client to intuit load on the server or in isolating bottlenecks between the client and the server. - + Header set MyHeader "%D %t" - +

    results in this header being added to the response:

    @@ -110,10 +111,9 @@ headers
  • Say hello to Joe - - Header set MyHeader "Hello Joe. It took %D microseconds \
    - for Apache to serve this request." -
    + +Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this request." +

    results in this header being added to the response:

    @@ -130,10 +130,10 @@ headers stimulus. Note that this example requires the services of the mod_setenvif module. - - SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
    - Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader -
    + +SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader +

    If the header MyRequestHeader: myvalue is present on the HTTP request, the response will contain the following header:

    @@ -149,24 +149,24 @@ headers description) by replacing https: with http: in the Destination header: - + RequestHeader edit Destination ^https: http: early - +
  • - Set the same header value under multiple non-exclusive conditions, + Set the same header value under multiple nonexclusive conditions, but do not duplicate the value in the final header. If all of the following conditions applied to a request (i.e., if the CGI, NO_CACHE and NO_STORE environment variables all existed for the request): - - Header merge Cache-Control no-cache env=CGI
    - Header merge Cache-Control no-cache env=NO_CACHE
    - Header merge Cache-Control no-store env=NO_STORE -
    + +Header merge Cache-Control no-cache env=CGI +Header merge Cache-Control no-cache env=NO_CACHE +Header merge Cache-Control no-store env=NO_STORE +

    then the response would contain the following header:

    @@ -183,21 +183,32 @@ headers
  • Set a test cookie if and only if the client didn't send us a cookie - + Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" - +
  • +
  • + Append a Caching header for responses with a HTTP status code of 200 + + Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200" + +
  • +
    RequestHeader Configure HTTP request headers -RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable] +RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] + server configvirtual host directory.htaccess FileInfo +SetIfEmpty available in 2.4.7 and later, expr=value +available in 2.4.10 and later

    This directive can replace, merge, change or remove HTTP request @@ -228,14 +239,14 @@ headers to a regular expression search-and-replace. The value argument is a regular expression, and the replacement - is a replacement string, which may contain backreferences. + is a replacement string, which may contain backreferences or format specifiers. The edit form will match and replace exactly once in a header value, whereas the edit* form will replace every instance of the search pattern if it appears more than once.

    merge
    -
    The response header is appended to any existing header of +
    The request header is appended to any existing header of the same name, unless the value to be appended already appears in the existing header's comma-delimited list of values. When a new value is merged onto an existing header it is separated from the existing header @@ -248,6 +259,11 @@ headers
    The request header is set, replacing any previous header with this name
    +
    setifempty
    +
    The request header is set, but only if there is no previous header + with this name.
    + Available in 2.4.7 and later.
    +
    unset
    The request header of this name is removed, if it exists. If there are multiple headers of the same name, all will be removed. @@ -295,12 +311,15 @@ headers Header Configure HTTP response headers -Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable] +Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] + server configvirtual host directory.htaccess FileInfo -Default condition was temporarily changed to "always" in 2.3.9 and 2.3.10 +SetIfEmpty available in 2.4.7 and later, expr=value +available in 2.4.10 and later

    This directive can replace, merge or remove HTTP response @@ -309,22 +328,22 @@ headers modified.

    The optional condition argument determines which internal - table of responses headers this directive will operate against. Other - components of the server may have stored their response headers in either - the table that corresponds to onsuccess or the table that - corresponds to always. "Always" in this context refers to - whether headers you add will be sent during both a successful and unsucessful - response, but if your action is a function of an existing header, you - will have to read on for further complications.

    - -

    The default value of onsuccess may need to be changed to - always under the circumstances similar to those listed below. + table of responses headers this directive will operate against. Despite the + name, the default value of onsuccess does not limit + an action to responses with a 2xx status code. Headers set under + this condition are still used when, for example, a request is successfully + proxied or generated by CGI, even when they have generated a failing status code.

    + +

    When your action is a function of an existing header, you may need to specify + a condition of always, depending on which internal table the + original header was set in. The table that corresponds to always is + used for locally generated error responses as well as successful responses. Note also that repeating this directive with both conditions makes sense in some scenarios because always is not a superset of onsuccess with respect to existing headers:

      -
    • You're adding a header to a non-success (non-2xx) response, such +
    • You're adding a header to a locally generated non-success (non-2xx) response, such as a redirect, in which case only the table corresponding to always is used in the ultimate response.
    • You're modifying or removing a header generated by a CGI script, @@ -335,6 +354,10 @@ headers onsuccess condition.
    +

    Separately from the condition parameter described above, you + can limit an action based on HTTP status codes for e.g. proxied or CGI + requests. See the example that uses %{REQUEST_STATUS} in the section above.

    +

    The action it performs is determined by the first argument (second argument if a condition is specified). This can be one of the following values:

    @@ -360,11 +383,16 @@ headers value must be omitted.
    edit
    -
    If this request header exists, its value is transformed according +
    edit*
    +
    If this response header exists, its value is transformed according to a regular expression search-and-replace. The value argument is a regular expression, and the replacement - is a replacement string, which may contain backreferences.
    + is a replacement string, which may contain backreferences or format specifiers. + The edit form will match and replace exactly once + in a header value, whereas the edit* form will replace + every instance of the search pattern if it appears more + than once.
    merge
    The response header is appended to any existing header of @@ -380,10 +408,32 @@ headers
    The response header is set, replacing any previous header with this name. The value may be a format string.
    +
    setifempty
    +
    The request header is set, but only if there is no previous header + with this name. + + The Content-Type header is a special use case since there might be + the chance that its value have been determined but the header is not part + of the response when setifempty is evaluated. + It is safer to use set for this use case like in the + following example: + + Header set Content-Type "text/plain" "expr=-z %{CONTENT_TYPE}" + +
    +
    unset
    The response header of this name is removed, if it exists. If there are multiple headers of the same name, all will be removed. value must be omitted.
    + +
    note
    +
    The value of the named response header is copied into an + internal note whose name is given by value. This is useful + if a header sent by a CGI or proxied resource is configured to be unset + but should also be logged.
    + Available in 2.4.7 and later.
    +

    This argument is followed by a header name, which @@ -398,9 +448,12 @@ headers add a value is specified as the next argument. If value contains spaces, it should be surrounded by double quotes. - value may be a character string, a string containing format - specifiers or a combination of both. The following format specifiers - are supported in value:

    + value may be a character string, a string containing + mod_headers specific format specifiers (and character + literals), or an ap_expr expression prefixed + with expr=

    + +

    The following format specifiers are supported in value:

    説明:HTTP リクエストのヘッダと応答のヘッダのカスタマイズ
    ステータス:Extension
    モジュール識別子:headers_module
    @@ -419,6 +472,27 @@ headers of the request. The value is preceded by D=. The value is measured in microseconds. + + + + + + + + + @@ -438,9 +512,29 @@ headers more efficient than %s.

    + Note on expression values +

    When the value parameter uses the ap_expr + parser, some expression syntax will differ from examples that evaluate + boolean expressions such as <If>:

    +
      +
    • The starting point of the grammar is 'string' rather than 'expr'.
    • +
    • Function calls use the %{funcname:arg} syntax rather than + funcname(arg).
    • +
    • Multi-argument functions are not currently accessible from this + starting point
    • +
    • Quote the entire parameter, such as + + Header set foo-checksum "expr=%{md5:foo}" + +
    • + +
    +
    +

    For edit there is both a value argument which is a regular expression, - and an additional replacement string.

    + and an additional replacement string. As of version 2.4.7 + the replacement string may also contain format specifiers.

    The Header directive may be followed by an additional argument, which may be any of:

    @@ -455,14 +549,21 @@ headers
    expr=expression
    The directive is applied if and only if expression evaluates to true. Details of expression syntax and evaluation are - documented in the ap_expr documentation.
    + documented in the ap_expr documentation. + +# This delays the evaluation of the condition clause compared to <If> +Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path.php$#" + +

    Except in early mode, the Header directives are processed just - before the response is sent to the network. These means that it is - possible to set and/or override most headers, except for those headers - added by the HTTP header filter, such as Content-Type.

    + before the response is sent to the network. This means that it is + possible to set and/or override most headers, except for some headers + added by the HTTP header filter. Prior to 2.2.12, it was not possible + to change the Content-Type header with this directive.

    + diff --git a/docs/manual/mod/mod_headers.xml.fr b/docs/manual/mod/mod_headers.xml.fr index 6f660b1c412..45f4959e661 100644 --- a/docs/manual/mod/mod_headers.xml.fr +++ b/docs/manual/mod/mod_headers.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,173 +25,174 @@ mod_headers -Personnalisation des en-têtes de requêtes et de réponses +Personnalisation des en-têtes de requêtes et de réponses HTTP Extension mod_headers.c headers_module -

    Ce module fournit des directives permettant de contrôler et - modifier les en-têtes de requêtes et de réponses HTTP. Les en-têtes - peuvent être fusionnés, remplacés ou supprimés.

    +

    Ce module fournit des directives permettant de contrôler et + modifier les en-têtes de requêtes et de réponses HTTP. Les en-têtes + peuvent être fusionnés, remplacés ou supprimés.

    Chronologie du traitement

    Les directives fournies par mod_headers peuvent - s'insérer presque partout dans la configuration du serveur, et on - peut limiter leur portée en les plaçant dans des sections de configuration.

    -

    La chronologie du traitement est importante et est affectée par +

    La chronologie du traitement est importante et est affectée par l'ordre d'apparition des directives dans le fichier de configuration et par leur placement dans les sections de configuration. Ainsi, - ces deux directives ont un effet différent si leur ordre est inversé + ces deux directives ont un effet différent si leur ordre est inversé :

    - - RequestHeader append MirrorID "mirror 12"
    - RequestHeader unset MirrorID -
    + +RequestHeader append MirrorID "mirror 12" +RequestHeader unset MirrorID + -

    Dans cet ordre, l'en-tête MirrorID n'est pas défini. - Si l'ordre des directives était inversé, l'en-tête - MirrorID serait défini à "mirror 12".

    +

    Dans cet ordre, l'en-tête MirrorID n'est pas défini. + Si l'ordre des directives était inversé, l'en-tête + MirrorID serait défini à "mirror 12".

    -
    Traitement précoce et traitement +<section id="early"><title>Traitement précoce et traitement tardif -

    mod_headers peut agir soir précocement, soit - tardivement au niveau de la requête. Le mode normal est le mode - tardif, lorsque les en-têtes de requête sont définis, immédiatement - avant l'exécution du générateur de contenu, et pour les en-têtes de - réponse, juste au moment où la réponse est envoyée sur le réseau. +

    mod_headers peut agir soir précocement, soit + tardivement au niveau de la requête. Le mode normal est le mode + tardif, lorsque les en-têtes de requête sont définis, immédiatement + avant l'exécution du générateur de contenu, et pour les en-têtes de + réponse, juste au moment où la réponse est envoyée sur le réseau. Utilisez toujours le mode tardif sur un serveur en production.

    -

    Le mode précoce a été conçu à des fins d'aide aux tests et au - débogage pour les développeurs. Les directives définies en utilisant - le mot-clé early sont censées agir au tout début du - traitement de la requête. Cela signifie que l'on peut les utiliser - pour simuler différentes requêtes et définir des situations de test, - tout en gardant à l'esprit que les en-têtes peuvent être modifiés à - tout moment par d'autres modules avant que le réponse ne soit - générée.

    - -

    Comme les directives précoces sont traitées avant que le - chemin de la requête ne soit parcouru, les en-têtes - précoces ne peuvent être définis que dans un contexte de serveur - principal ou de serveur virtuel. Les directives précoces ne peuvent - pas dépendre d'un chemin de requête, si bien qu'elles échoueront - dans des contextes tels que <Directory> ou - <Location>.

    +

    Le mode précoce a été conçu à des fins d'aide aux tests et au + débogage pour les développeurs. Les directives définies en utilisant + le mot-clé early sont censées agir au tout début du + traitement de la requête. Cela signifie que l'on peut les utiliser + pour simuler différentes requêtes et définir des situations de test, + tout en gardant à l'esprit que les en-têtes peuvent être modifiés à + tout moment par d'autres modules avant que le réponse ne soit + générée.

    + +

    Comme les directives précoces sont traitées avant que le + chemin de la requête ne soit parcouru, les en-têtes + précoces ne peuvent être définis que dans un contexte de serveur + principal ou de serveur virtuel. Les directives précoces ne peuvent + pas dépendre d'un chemin de requête, si bien qu'elles échoueront + dans des contextes tels que Directory ou Location.

    Exemples
    1. - Copie tous les en-têtes de requête qui commencent par "TS" vers - les en-têtes de la réponse : + Copie tous les en-têtes de requête qui commencent par "TS" vers + les en-têtes de la réponse : - + Header echo ^TS - +
    2. - Ajoute à la réponse un en-tête, mon-en-tête, qui - contient un horodatage permettant de déterminer le moment où la - requête a été reçue, et le temps qui s'est écoulé jusqu'à ce que - la requête ait commencé à être servie. Cet en-tête peut être - utilisé par le client pour estimer la charge du serveur ou - isoler les goulets d'étranglement entre le client et le + Ajoute à la réponse un en-tête, mon-en-tête, qui + contient un horodatage permettant de déterminer le moment où la + requête a été reçue, et le temps qui s'est écoulé jusqu'à ce que + la requête ait commencé à être servie. Cet en-tête peut être + utilisé par le client pour estimer la charge du serveur ou + isoler les goulets d'étranglement entre le client et le serveur. - - Header set mon-en-tête "%D %t" - + + Header set mon-en-tête "%D %t" + -

      le résultat est l'ajout à la réponse d'un en-tête du type :

      +

      le résultat est l'ajout à la réponse d'un en-tête du type :

      - mon-en-tête: D=3775428 t=991424704447256 + mon-en-tête: D=3775428 t=991424704447256
    3. - Dit Bonjour à Joe + Dit Bonjour à Joe - Header set mon-en-tête "Bonjour Joe. Il a fallu %D microsecondes \
      - à Apache pour servir cette requête." + Header set mon-en-tête "Bonjour Joe. Il a fallu %D microsecondes \
      + à Apache pour servir cette requête."
      -

      le résultat est l'ajout à la réponse d'un en-tête du type :

      +

      le résultat est l'ajout à la réponse d'un en-tête du type :

      - - mon-en-tête: Bonjour Joe. Il a fallu D=3775428 microsecondes à Apache - pour servir cette requête. - + + Header set MyHeader "Bonjour Joe. Il a fallu D=3775428 microsecondes à Apache + pour servir cette requête." +
    4. - Ajoute l'en-tête mon-en-tête à la réponse si et - seulement si l'en-tête mon-en-tête-requête est - présent dans la requête. Ceci peut s'avérer utile pour générer - des en-têtes de réponse "à la tête du client". Notez que cet - exemple nécessite les services du module + Ajoute l'en-tête mon-en-tête à la réponse si et + seulement si l'en-tête mon-en-tête-requête est + présent dans la requête. Ceci peut s'avérer utile pour générer + des en-têtes de réponse "à la tête du client". Notez que cet + exemple nécessite les services du module mod_setenvif. - - SetEnvIf mon-en-tête-requête mavaleur HAVE_MyRequestHeader
      - Header set mon-en-tête "%D %t montexte" env=HAVE_MyRequestHeader -
      + +SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader + -

      Si l'en-tête mon-en-tête-requête: mavaleur est - présent dans la requête HTTP, la réponse contiendra un en-tête +

      Si l'en-tête mon-en-tête-requête: mavaleur est + présent dans la requête HTTP, la réponse contiendra un en-tête du type :

      - mon-en-tête: D=3775428 t=991424704447256 montexte + mon-en-tête: D=3775428 t=991424704447256 montexte
    5. - Permet à DAV de fonctionner avec Apache sur SSL (voir la description - du problème) en remplaçant https: par - http: dans l'en-tête Destination : + du problème) en remplaçant https: par + http: dans l'en-tête Destination : - + RequestHeader edit Destination ^https: http: early - +
    6. - Définit la valeur d'un même en-tête sous de multiples conditions - non exclusives, mais ne duplique pas une valeur déjà définie - dans l'en-tête qui en résulte. Si toutes les conditions - suivantes sont satisfaites pour une requête (en d'autres termes, + Définit la valeur d'un même en-tête sous de multiples conditions + non exclusives, mais ne duplique pas une valeur déjà définie + dans l'en-tête qui en résulte. Si toutes les conditions + suivantes sont satisfaites pour une requête (en d'autres termes, si les trois variables d'environnement CGI, NO_CACHE et NO_STORE existent pour la - requête) : + requête) : - - Header merge Cache-Control no-cache env=CGI
      - Header merge Cache-Control no-cache env=NO_CACHE
      - Header merge Cache-Control no-store env=NO_STORE -
      + +Header merge Cache-Control no-cache env=CGI +Header merge Cache-Control no-cache env=NO_CACHE +Header merge Cache-Control no-store env=NO_STORE + -

      alors, la réponse contiendra l'en-tête suivant :

      +

      alors, la réponse contiendra l'en-tête suivant :

      Cache-Control: no-cache, no-store -

      Si append avait été utilisé à la place de - merge, la réponse aurait contenu l'en-tête suivant +

      Si append avait été utilisé à la place de + merge, la réponse aurait contenu l'en-tête suivant :

      @@ -199,267 +200,354 @@ tardif
    7. - Définit un cookie de test si et seulement si le client n'envoie + Définit un cookie de test si et seulement si le client n'envoie pas de cookie - - Header set Set-Cookie testcookie !$req{Cookie} - + + Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" +
    8. +
    9. + Ajoute un en-tête de mise en cache pour les réponses avec un + code d'état HTTP de 200 + + Header append Cache-Control s-maxage=600 "expr=%{REQUEST_STATUS} == 200" + +
    10. +
    RequestHeader -Configure les en-têtes d'une requête HTTP -RequestHeader add|append|edit|edit*|merge|set|unset en-tête -[valeur] [remplacement] [early|env=[!]variable] +Configure les en-têtes d'une requête HTTP +RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +en-tête [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] + server configvirtual host directory.htaccess FileInfo +SetIfEmpty est disponible depuis la version 2.4.7 du +serveur HTTP Apache ; le paramètre expr=valeur a été introduit avec la +version 2.4.10

    Cette directive permet de remplacer, fusionner, modifier ou - supprimer des en-têtes de requête HTTP. L'en-tête est modifié juste - avant que le gestionnaire de contenu ne s'exécute, ce qui permet la - modification des en-têtes entrants. L'action effectuée est - déterminée par le premier argument. Ce dernier accepte les valeurs + supprimer des en-têtes de requête HTTP. L'en-tête est modifié juste + avant que le gestionnaire de contenu ne s'exécute, ce qui permet la + modification des en-têtes entrants. L'action effectuée est + déterminée par le premier argument. Ce dernier accepte les valeurs suivantes :

    add
    -
    L'en-tête est ajouté au jeu d'en-têtes préexistant, même s'il - existe déjà. Ceci peut conduire à la présence de deux (ou plusieurs) - en-têtes possèdant le même nom et donc induire des conséquences - imprévues ; en général, il est préférable d'utiliser +
    L'en-tête est ajouté au jeu d'en-têtes préexistant, même s'il + existe déjà. Ceci peut conduire à la présence de deux (ou plusieurs) + en-têtes possèdant le même nom et donc induire des conséquences + imprévues ; en général, il est préférable d'utiliser set, append ou merge.
    append
    -
    La valeur d'en-tête est ajoutée à tout en-tête existant de même - nom. Lorsqu'une nouvelle valeur est ainsi ajoutée, elle est séparée - de celles qui sont déjà présentes par une virgule. Il s'agit de la - méthode HTTP standard permettant d'affecter plusieurs valeurs à un - en-tête.
    +
    La valeur d'en-tête est ajoutée à tout en-tête existant de même + nom. Lorsqu'une nouvelle valeur est ainsi ajoutée, elle est séparée + de celles qui sont déjà présentes par une virgule. Il s'agit de la + méthode HTTP standard permettant d'affecter plusieurs valeurs à un + en-tête.
    +
    edit
    edit*
    -
    Si l'en-tête existe, sa valeur est modifiée en fonction d'une +
    Si l'en-tête existe, sa valeur est modifiée en fonction d'une expression rationnelle de type recherche/remplacement. L'argument valeur est une expression rationnelle, et - l'argument remplacement une chaîne de caractères de - remplacement qui peut contenir des références arrières. Avec - edit, la chaîne de l'en-tête correspondant au modèle ne - sera recherchée et remplacée qu'une seule fois, alors qu'avec + l'argument remplacement une chaîne de caractères de + remplacement qui peut contenir des références + arrières ou des spécificateurs de format. Avec + edit, la chaîne de l'en-tête correspondant au modèle ne + sera recherchée et remplacée qu'une seule fois, alors qu'avec edit*, elle le sera pour chacune de ses instances si - elle apparaît plusieurs fois.
    + elle apparaît plusieurs fois.
    merge
    -
    La valeur d'en-tête est ajoutée à tout en-tête de même nom, sauf - si elle apparaît déjà dans la liste des valeurs préexistantes de - l'en-tête séparées par des virgules. Lorsqu'une nouvelle valeur est - ainsi ajoutée, elle est séparée de celles qui sont déjà présentes - par une virgule. Il s'agit de la méthode HTTP standard permettant - d'affecter plusieurs valeurs à un en-tête. Les valeurs sont - comparées en tenant compte de la casse, et après le traitement de - tous les spécificateurs de format. Une valeur entourée de guillemets - est considérée comme différente de la même valeur mais sans +
    La valeur d'en-tête est ajoutée à tout en-tête de même nom, sauf + si elle apparaît déjà dans la liste des valeurs préexistantes de + l'en-tête séparées par des virgules. Lorsqu'une nouvelle valeur est + ainsi ajoutée, elle est séparée de celles qui sont déjà présentes + par une virgule. Il s'agit de la méthode HTTP standard permettant + d'affecter plusieurs valeurs à un en-tête. Les valeurs sont + comparées en tenant compte de la casse, et après le traitement de + tous les spécificateurs de format. Une valeur entourée de guillemets + est considérée comme différente de la même valeur mais sans guillemets.
    set
    -
    L'en-tête est défini, remplaçant tout en-tête préexistant avec - le même nom.
    +
    L'en-tête est défini, remplaçant tout en-tête préexistant avec + le même nom.
    + +
    setifempty
    +
    L'en-tête est défini, mais seulement s'il n'existe + aucun en-tête avec le même nom.
    + Disponible depuis la version 2.4.7 du serveur HTTP Apache.
    unset
    -
    L'en-tête est supprimé s'il existe. Si plusieurs en-têtes - possèdent le même nom, ils seront tous supprimés. L'argument - value ne doit pas apparaître.
    +
    L'en-tête est supprimé s'il existe. Si plusieurs en-têtes + possèdent le même nom, ils seront tous supprimés. L'argument + value ne doit pas apparaître.
    -

    Cet argument est suivi d'un nom d'en-tête qui peut se terminer - par un caractère ':', mais ce n'est pas obligatoire. La casse est - ignorée. Avec set, append, +

    Cet argument est suivi d'un nom d'en-tête qui peut se terminer + par un caractère ':', mais ce n'est pas obligatoire. La casse est + ignorée. Avec set, append, merge et add, une valeur est - fournie en troisième argument. Si une valeur contient des - espaces, elle doit être entourée de guillemets. Avec - unset, aucune valeur ne doit apparaître. - valeur peut être une chaîne de caractères, une chaîne - contenant des spécificateurs de format, ou une combinaison des deux. - Les spécificateurs de format supportés sont les mêmes que ceux de la - directive Header, à - laquelle vous pouvez vous reporter pour plus de détails. Avec + fournie en troisième argument. Si une valeur contient des + espaces, elle doit être entourée de guillemets. Avec + unset, aucune valeur ne doit apparaître. + valeur peut être une chaîne de caractères, une chaîne + contenant des spécificateurs de format, ou une combinaison des deux. + Les spécificateurs de format supportés sont les mêmes que ceux de la + directive Header, à + laquelle vous pouvez vous reporter pour plus de détails. Avec edit, les deux arguments valeur et remplacement sont obligatoires, et correspondent - respectivement à une expression - rationnelle et à une chaîne de remplacement.

    + respectivement à une expression + rationnelle et à une chaîne de remplacement.

    -

    La directive RequestHeader peut être - suivie d'un argument supplémentaire, qui pourra prendre les valeurs +

    La directive RequestHeader peut être + suivie d'un argument supplémentaire, qui pourra prendre les valeurs suivantes :

    early
    -
    Spécifie traitement préalable.
    -
    env=[!]variable
    -
    La directive est appliquée si et seulement si la Spécifie traitement préalable.
    +
    env=[!]variable
    +
    La directive est appliquée si et seulement si la variable d'environnement variable existe. Un ! devant variable inverse le test, et la directive ne - s'appliquera alors que si variable n'est pas définie.
    -
    expr
    -
    Une chaîne qui correspond à toute valeur ci-dessus est - interprétée comme une expression. Les détails à propos de la syntaxe - des expressions et leur évaluation sont pour l'instant mieux - documentés dans la page de mod_filter.
    + s'appliquera alors que si variable n'est pas définie. +
    expr=expression
    +
    La directive s'applique si et seulement si expression + est évaluée à true. Vous trouverez plus de détails à propos de la + syntaxe et de l'évaluation des expressions dans la documentation ap_expr.
    -

    Excepté le cas du mode précoce, la directive - RequestHeader est traitée juste avant la - prise en compte de la requête par son gestionnaire, au cours de la - phase de vérification. Ceci permet la modification des en-têtes - générés par le navigateur, ou par les filtres en entrée +

    Excepté le cas du mode précoce, la directive + RequestHeader est traitée juste avant la + prise en compte de la requête par son gestionnaire, au cours de la + phase de vérification. Ceci permet la modification des en-têtes + générés par le navigateur, ou par les filtres en entrée d'Apache.

    Header -Configure les en-têtes d'une réponse HTTP -Header [condition] add|append|echo|edit|merge|set|unset -en-tête [valeur] [early|env=[!]variable] +Configure les en-têtes d'une réponse HTTP +Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +en-tête [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] + server configvirtual host directory.htaccess FileInfo -La condition par défaut est temporairement passée -à "always" dans les version 2.3.9 et 2.3.10 +SetIfEmpty est disponible depuis la version 2.4.7 du +serveur HTTP Apache ; le paramètre expr=valeur a été introduit avec la +version 2.4.10

    Cette directive permet de remplacer, fusionner, ou - supprimer des en-têtes de réponse HTTP. L'en-tête est modifié juste - après que le gestionnaire de contenu et les filtres en sortie ne - s'exécutent, ce qui permet la modification des en-têtes + supprimer des en-têtes de réponse HTTP. L'en-tête est modifié juste + après que le gestionnaire de contenu et les filtres en sortie ne + s'exécutent, ce qui permet la modification des en-têtes sortants.

    -

    L'argument optionnel condition permet de déterminer - sur quelle table interne d'en-têtes de réponses cette directive va - opérer. D'autres composants du serveur peuvent avoir stocké leurs - en-têtes de réponses dans la table correspondant à - onsuccess ou dans celle correspondant à - always. Dans ce contexte, "Always" fait référence au - choix d'envoyer les en-têtes que vous ajoutez aux réponses, qu'elle - soient avec succès ou échouées ; par contre, si votre action est une - fonction d'un en-tête existant, vous devrez lire la documentation de - manière plus approfondie car dans ce cas, les choses se compliquent.

    - -

    Vous pouvez avoir à changer la valeur par défaut - onsuccess en always dans des circonstances - similaires à celles exposées plus loin. Notez aussi que la répétition - de cette directive avec les deux conditions peut être pertinente - dans certains scénarios, car always n'englobe pas - onsuccess en ce qui concerne les en-têtes existants :

    +

    L'argument optionnel condition permet de déterminer + sur quelle table interne d'en-têtes de réponses cette directive va + opérer. En dépit du nom, la valeur par défaut de + onsuccess ne limite pas une action + aux réponses avec un code d'état de 2xx. Les en-têtes définis sous + cette condition sont encore utilisés quand par exemple une requête + est mandatée ou générée par un programme CGI avec succès, + et ceci même dans le cas où ils ont généré un code d'échec.

    + +

    Lorsque votre action est une fonction agissant sur un en-tête + existant, vous pourrez être amené à spécifier une condition + always, en fonction de la table interne dans laquelle + l'en-tête original a été défini. La table qui correspond à + always est utilisée pour les réponses d'erreur générées + localement ainsi que pour les réponses qui ont abouti. + Notez aussi que la répétition + de cette directive avec les deux conditions peut être pertinente + dans certains scénarios, car always n'englobe pas + onsuccess en ce qui concerne les en-têtes existants :

      -
    • Vous ajoutez un en-tête à une réponse échouée (non-2xx), +
    • Vous ajoutez un en-tête à une réponse + générée localement et échouée (non-2xx), une redirection par exemple, et dans ce cas, seule la table - correspondant à always est utilisée dans la réponse - définitive.
    • -
    • Vous modifiez ou supprimez un en-tête généré par un script + correspondant à always est utilisée dans la réponse + définitive.
    • +
    • Vous modifiez ou supprimez un en-tête généré par un script CGI, et dans ce cas, les scripts CGI sont dans la table - correspondant à always et non dans la table par - défaut.
    • -
    • Vous modifiez ou supprimez un en-tête généré par tel ou tel - composant du serveur, mais cet en-tête n'est pas trouvé par la - condition par défaut onsuccess.
    • + correspondant à always et non dans la table par + défaut. +
    • Vous modifiez ou supprimez un en-tête généré par tel ou tel + composant du serveur, mais cet en-tête n'est pas trouvé par la + condition par défaut onsuccess.
    -

    L'action que cette directive provoque est déterminée par le +

    Outre le paramètre condition décrit ci-dessus, vous + pouvez limiter une action en fonction de codes d'état HTTP, par + exemple pour les requêtes mandatées ou générées par un programme + CGI. Voir l'exemple qui utilise %{REQUEST_STATUS} dans la section + ci-dessus.

    + +

    L'action que cette directive provoque est déterminée par le premier argument (ou par le second argument si une - condition est spécifiée). Il peut prendre + condition est spécifiée). Il peut prendre une des valeurs suivantes :

    add
    -
    L'en-tête est ajouté au jeu d'en-têtes préexistant, même s'il - existe déjà. Ceci peut conduire à la présence de deux (ou plusieurs) - en-têtes possèdant le même nom et donc induire des conséquences - imprévues ; en général, il est préférable d'utiliser +
    L'en-tête est ajouté au jeu d'en-têtes préexistant, même s'il + existe déjà. Ceci peut conduire à la présence de deux (ou plusieurs) + en-têtes possèdant le même nom et donc induire des conséquences + imprévues ; en général, il est préférable d'utiliser set, append ou merge.
    append
    -
    La valeur d'en-tête est ajoutée à tout en-tête existant de même - nom. Lorsqu'une nouvelle valeur est ainsi ajoutée, elle est séparée - de celles qui sont déjà présentes par une virgule. Il s'agit de la - méthode HTTP standard permettant d'affecter plusieurs valeurs à un - en-tête.
    +
    La valeur d'en-tête est ajoutée à tout en-tête existant de même + nom. Lorsqu'une nouvelle valeur est ainsi ajoutée, elle est séparée + de celles qui sont déjà présentes par une virgule. Il s'agit de la + méthode HTTP standard permettant d'affecter plusieurs valeurs à un + en-tête.
    echo
    -
    Les en-têtes de la requête possédant le nom spécifié sont - recopiés vers les en-têtes de la réponse. en-tête peut - être une expression rationnelle, et - valeur ne doit pas être présent.
    +
    Les en-têtes de la requête possédant le nom spécifié sont + recopiés vers les en-têtes de la réponse. en-tête peut + être une expression rationnelle, et + valeur ne doit pas être présent.
    edit
    -
    Si l'en-tête existe, sa valeur est modifiée en fonction d'une +
    edit*
    +
    Si l'en-tête existe, sa valeur est modifiée en fonction d'une expression rationnelle de type recherche/remplacement. L'argument valeur est une expression rationnelle, et - l'argument remplacement une chaîne de caractères de - remplacement qui peut contenir des références arrières.
    + l'argument remplacement une chaîne de caractères de + remplacement qui peut contenir des références + arrières ou des spécificateurs de format. La forme edit n'effectuera une + recherche/remplacement qu'une seule fois dans la valeur de + l'en-tête, alors que la forme edit* en effectuera autant + que le nombre d'apparition de la chaîne à remplacer.
    merge
    -
    La valeur d'en-tête est ajoutée à tout en-tête de même nom, sauf - si elle apparaît déjà dans la liste des valeurs préexistantes de - l'en-tête séparées par des virgules. Lorsqu'une nouvelle valeur est - ainsi ajoutée, elle est séparée de celles qui sont déjà présentes - par une virgule. Il s'agit de la méthode HTTP standard permettant - d'affecter plusieurs valeurs à un en-tête. Les valeurs sont - comparées en tenant compte de la casse, et après le traitement de - tous les spécificateurs de format. Une valeur entourée de guillemets - est considérée comme différente de la même valeur mais sans +
    La valeur d'en-tête est ajoutée à tout en-tête de même nom, sauf + si elle apparaît déjà dans la liste des valeurs préexistantes de + l'en-tête séparées par des virgules. Lorsqu'une nouvelle valeur est + ainsi ajoutée, elle est séparée de celles qui sont déjà présentes + par une virgule. Il s'agit de la méthode HTTP standard permettant + d'affecter plusieurs valeurs à un en-tête. Les valeurs sont + comparées en tenant compte de la casse, et après le traitement de + tous les spécificateurs de format. Une valeur entourée de guillemets + est considérée comme différente de la même valeur mais sans guillemets.
    set
    -
    L'en-tête est défini, remplaçant tout en-tête préexistant avec - le même nom. L'argument valeur peut être une chaîne de +
    L'en-tête est défini, remplaçant tout en-tête préexistant avec + le même nom. L'argument valeur peut être une chaîne de formatage.
    -
    unset
    -
    L'en-tête est supprimé s'il existe. Si plusieurs en-têtes - possèdent le même nom, ils seront tous supprimés. L'argument - value ne doit pas apparaître.
    -
    +
    setifempty
    +
    L'en-tête est défini, mais seulement s'il n'existe + aucun en-tête avec le même nom. + + L'en-tête Content-Type est un cas particulier car il est possible que sa + valeur ait été déterminée mais que l'en-tête ne soit pas présent dans la + réponse lorsque setifempty est évalué. Dans ce cas, il est + préférable d'utiliser set comme dans l'exemple suivant : + + Header set Content-Type "text/plain" "expr=-z %{CONTENT_TYPE}" + +
    -

    Cet argument est suivi d'un nom d'en-tête qui peut se - terminer par un caractère ':', mais ce n'est pas obligatoire. La - casse est ignorée avec set, append, +

    unset
    +
    L'en-tête est supprimé s'il existe. Si plusieurs en-têtes + possèdent le même nom, ils seront tous supprimés. L'argument + value ne doit pas apparaître.
    + +
    note
    +
    La valeur de l'en-tête considéré est copiée dans une + note interne dont le nom est spécifié via l'argument + valeur. Ceci permet de journaliser la valeur d'un en-tête + envoyé par un programme CGI ou une ressource mandatée, même s'il + est prévu de l'effacer.
    + Disponible à partir de la version 2.4.7 du serveur HTTP Apache.
    + + + +

    Cet argument est suivi d'un nom d'en-tête qui peut se + terminer par un caractère ':', mais ce n'est pas obligatoire. La + casse est ignorée avec set, append, merge, add, unset et - edit. Le nom d'en-tête est sensible à la - casse pour echo et peut être une edit. Le nom d'en-tête est sensible à la + casse pour echo et peut être une expression rationnelle.

    Avec set, append, merge et - add, une valeur est spécifiée comme + add, une valeur est spécifiée comme argument suivant. Si valeur contient des espaces, elle - doit être entourée de guillemets. valeur peut être une - chaîne de caractères, une chaîne contenant des spécificateurs de - format, ou une combinaison des deux. valeur supporte les - spécificateurs de format suivants :

    + doit être entourée de guillemets. valeur peut être une + chaîne de caractères, une chaîne contenant des spécificateurs de + format propres à mod_headers (et des caractères + littéraux), ou une expression ap_expr + préfixée par expr=.

    + +

    valeur supporte les spécificateurs de format suivants :

    %lThe current load averages of the actual server itself. It is + designed to expose the values obtained by getloadavg() + and this represents the current load average, the 5 minute average, and + the 15 minute average. The value is preceded by l= with each + average separated by /.
    + Available in 2.4.4 and later. +
    %iThe current idle percentage of httpd (0 to 100) based on available + processes and threads. The value is preceded by i=.
    + Available in 2.4.4 and later. +
    %bThe current busy percentage of httpd (0 to 100) based on available + processes and threads. The value is preceded by b=.
    + Available in 2.4.4 and later. +
    %{VARNAME}e The contents of the environment variable VARNAME.
    - + - - + + + + + + + + + + + mod_ssl est activé.
    FormatDescription
    %%Le caractère pourcentage
    Le caractère pourcentage
    %tLe moment de réception de la requête en temps - universel coordonné depuis le temps epoch (Jan. 1, 1970) et - exprimé en microsecondes. La valeur est précédée de + Le moment de réception de la requête en temps + universel coordonné depuis le temps epoch (Jan. 1, 1970) et + exprimé en microsecondes. La valeur est précédée de t=.
    %DLe temps écoulé entre la réception de la requête et l'envoi - des en-têtes sur le réseau. Il s'agit de la durée de traitement - de la requête. La valeur est précédée de D=. La - valeur est exprimée en microsecondes.
    Le temps écoulé entre la réception de la requête et l'envoi + des en-têtes sur le réseau. Il s'agit de la durée de traitement + de la requête. La valeur est précédée de D=. La + valeur est exprimée en microsecondes.
    %lLa charge moyenne courante du serveur proprement dit. Ce + sont les valeurs obtenues par getloadavg() qui + représentent la charge moyenne courante, sur 5 minutes et sur 15 + minutes. Chaque valeur est précédée de l= et + séparée de la suivante par un /.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %iLe pourcentage courant de httpd au repos (de 0 à 100) + en se basant sur le nombre de processus et threads disponibles. + La valeur est précédée de i=.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %bLe pourcentage courant de httpd utilisé (de 0 à 100) + en se basant sur le nombre de processus et threads disponibles. + La valeur est précédée de b=.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    %{NOM_VARIABLE}e Le contenu de la variable @@ -468,50 +556,81 @@ tardif
    %{NOM_VARIABLE}s Le contenu de la variable d'environnement SSL NOM_VARIABLE, si - mod_ssl est activé.
    Note -

    Le spécificateur de format %s est disponible - depuis la version 2.1 d'Apache ; il peut être utilisé à la place - de %e pour éviter de devoir spécifier +

    Le spécificateur de format %s est disponible + depuis la version 2.1 d'Apache ; il peut être utilisé à la place + de %e pour éviter de devoir spécifier SSLOptions +StdEnvVars. Cependant, si - SSLOptions +StdEnvVars doit tout de même être - spécifié pour une raison quelconque, %e sera plus + SSLOptions +StdEnvVars doit tout de même être + spécifié pour une raison quelconque, %e sera plus efficace que %s.

    -

    editnécessite les deux arguments + Note à propos des valeurs des expressions +

    Lorsque le paramètre valeur utilise l'interpréteur ap_expr, certaines syntaxes d'expressions + seront différentes des exemples qui évaluent des expressions + booléennes telles que <If> :

    +
      +
    • Le point de départ de la syntaxe est 'string' au lieu de + 'expr'.
    • +
    • Les appels de fonction utilisent la syntaxe %{funcname:arg} au + lieu de funcname(arg).
    • +
    • Les fonctions multi-arguments ne sont pas encore disponibles + depuis le point de départ 'string'.
    • +
    • Il faut mettre entre guillemets l'ensemble du paramètre, comme + dans l'exemple suivant : + + Header set foo-checksum "expr=%{md5:foo}" + +
    • + +
    + + +

    editnécessite les deux arguments valeur, qui est une expression - rationnelle, et une chaîne additionnelle - remplacement.

    + rationnelle, et une chaîne additionnelle + remplacement. Depuis la version 2.4.7, la chaîne de + remplacement peut aussi + contenir des spécificateurs de format.

    -

    La directive Header peut être suivie d'un +

    La directive Header peut être suivie d'un argument additionnel qui peut prendre les valeurs suivantes :

    early
    -
    Spécifie traitement préalable.
    -
    env=[!]variable
    -
    La directive est appliquée si et seulement si la Spécifie traitement préalable.
    +
    env=[!]variable
    +
    La directive est appliquée si et seulement si la variable d'environnement variable existe. Un ! devant variable inverse le test, et la directive ne - s'appliquera alors que si variable n'est pas définie.
    -
    expr
    -
    Une chaîne qui correspond à toute valeur ci-dessus est - interprétée comme une expression. Les détails à propos de la syntaxe - des expressions et leur évaluation sont pour l'instant mieux - documentés dans la page de mod_filter.
    + s'appliquera alors que si variable n'est pas définie. +
    expr=expression
    +
    La directive s'applique si et seulement si expression + est évaluée à true. Vous trouverez plus de détails à propos de la + syntaxe et de l'évaluation des expressions dans la documentation ap_expr. + + # Cet exemple retarde l'évaluation de la clause de condition par + # rapport à <If> + Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path.php$#" + +
    -

    Excepté le cas du mode précoce, les - directives Header sont traitées juste avant - l'envoi de la réponse sur le réseau. Cela signifie qu'il est - possible de définir et/ou modifier la plupart des en-têtes, à - l'exception de ceux qui sont ajoutés par le filtre HTTP - d'en-tête, comme Content-Type.

    +

    Excepté le cas du mode précoce, les + directives Header sont traitées juste avant + l'envoi de la réponse sur le réseau. Cela signifie qu'il est + possible de définir et/ou modifier la plupart des en-têtes, à + l'exception de certains en-têtes qui sont ajoutés par le filtre + d'en-tête HTTP. Avant la version 2.2.12, il n'était pas + possible de modifier l'en-tête Content-Type avec cette directive.

    diff --git a/docs/manual/mod/mod_headers.xml.ja b/docs/manual/mod/mod_headers.xml.ja index 6316f443616..54c49cab885 100644 --- a/docs/manual/mod/mod_headers.xml.ja +++ b/docs/manual/mod/mod_headers.xml.ja @@ -1,7 +1,7 @@ - + + -mod_heartbeat - Apache HTTP Server +mod_heartbeat - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_heartbeat

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    - - +
    Description:
    Status:Extension
    + - -
    Description:Sends messages with server status to frontend proxy
    Status:Experimental
    ModuleIdentifier:heartbeat_module
    SourceFile:mod_heartbeat.c
    Compatibility:Available in 2.3 and later
    +SourceFile:mod_heartbeat +Compatibility:Available in Apache 2.3 and later

    Summary

    -
    This document is still under development.
    +

    mod_heartbeat sends multicast messages to a mod_heartmonitor listener +that advertises the servers current connection count. Usually, mod_heartmonitor +will be running on a proxy server with mod_lbmethod_heartbeat loaded, which allows +ProxyPass to use the "heartbeat" lbmethod inside +of ProxyPass.

    +

    + mod_heartbeat itself is loaded on the origin server(s) that serve requests + through the proxy server(s). +

    + +
    + To use mod_heartbeat, + mod_status and mod_watchdog + must be either a static modules or, if a dynamic module, must + be loaded before mod_heartbeat. +
    +
    -

    Directives

    + +

    Bugfix checklist

    See also

    +
    +
    top
    +
    +

    Consuming mod_heartbeat Output

    + +

    + Every 1 second, this module generates a single multicast UDP + packet, containing the number of busy and idle workers. The + packet is a simple ASCII format, similar to GET query parameters + in HTTP. +

    + +

    An Example Packet

    +v=1&ready=75&busy=0 +

    + +

    + Consumers should handle new variables besides busy and ready, + separated by '&', being added in the future. +

    +
    top

    HeartbeatAddress Directive

    - - + + + - +
    Description:Address to send heartbeat requests
    Syntax:
    Description:Multicast address for heartbeat packets
    Syntax:HeartbeatAddress addr:port
    Default:disabled
    Context:server config
    Status:Extension
    Status:Experimental
    Module:mod_heartbeat
    -
    This document is still under development.
    +

    The HeartbeatAddress directive specifies the +multicast address to which mod_heartbeat will send +status information. This address will usually correspond to a configured + HeartbeatListen on a +frontend proxy system.

    +
    HeartbeatAddress 239.0.0.1:27999
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_heartbeat.html.fr b/docs/manual/mod/mod_heartbeat.html.fr new file mode 100644 index 00000000000..6e16f6343f3 --- /dev/null +++ b/docs/manual/mod/mod_heartbeat.html.fr @@ -0,0 +1,142 @@ + + + + + +mod_heartbeat - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_heartbeat

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Envoie des messages d'tat au mandataire frontal
    Statut:Exprimental
    IdentificateurdeModule:heartbeat_module
    FichierSource:mod_heartbeat
    Compatibilit:Disponible partir de la version 2.3 +du serveur HTTP Apache
    +

    Sommaire

    + +

    mod_heartbeat envoie un moniteur + mod_heartmonitor des messages multicast l'informant + du nombre de connexions courantes. En gnral, + mod_heartmonitor est charg sur un serveur + mandataire o mod_lbmethod_heartbeat est charg, ce + qui permet d'utiliser la lbmethod "heartbeat" au sein des + directives ProxyPass.

    + +

    + Le module mod_heartbeat est charg sur le + serveur d'origine qui sert les requtes via le + serveur mandataire. +

    + +
    + Pour utiliser mod_heartbeat, + mod_status et mod_watchdog + doivent tre soit des modules statiques, soit des modules + dynamiques, et dans ce dernier cas, ils doivent tre chargs + avant mod_heartbeat. +
    + +
    + +
    top
    +
    +

    Utilisation de la sortie de mod_heartbeat

    + +

    + Chaque seconde, ce module gnre un paquet multicast UDP contenant + le nombre de threads/processus occups et en attente. Le paquet + possde un format ASCII simple similaire aux paramtres de requte + GET en HTTP. +

    + +

    Exemple de paquet

    +v=1&ready=75&busy=0 +

    + +

    + Les utilisateurs disposeront dans le futur de nouvelles variables en + plus de busy et ready, et toujours spares par des '&'. +

    + +
    +
    top
    +

    Directive HeartbeatAddress

    + + + + + + + +
    Description:Adresse multicast laquelle envoyer les requtes +heartbeat
    Syntaxe:HeartbeatAddress addr:port
    Dfaut:disabled
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_heartbeat
    +

    La directive HeartbeatAddress permet de + spcifier l'adresse multicast laquelle mod_heartbeat va + envoyer ses informations. En gnral, cette adresse correspond la + valeur dfinie par la directive HeartbeatListen sur le serveur + mandataire frontal.

    +
    HeartbeatAddress 239.0.0.1:27999
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_heartbeat.xml b/docs/manual/mod/mod_heartbeat.xml index d1485fc90bd..b0b1e1242ae 100644 --- a/docs/manual/mod/mod_heartbeat.xml +++ b/docs/manual/mod/mod_heartbeat.xml @@ -23,24 +23,68 @@ mod_heartbeat - -Extension -mod_heartbeat.c +Sends messages with server status to frontend proxy +Experimental +mod_heartbeat heartbeat_module -Available in 2.3 and later +Available in Apache 2.3 and later - This document is still under development. +

    mod_heartbeat sends multicast messages to a mod_heartmonitor listener +that advertises the servers current connection count. Usually, mod_heartmonitor +will be running on a proxy server with mod_lbmethod_heartbeat loaded, which allows +ProxyPass to use the "heartbeat" lbmethod inside +of ProxyPass.

    +

    + mod_heartbeat itself is loaded on the origin server(s) that serve requests + through the proxy server(s). +

    + + + To use mod_heartbeat, + mod_status and mod_watchdog + must be either a static modules or, if a dynamic module, must + be loaded before mod_heartbeat. + +
    +
    + Consuming mod_heartbeat Output +

    + Every 1 second, this module generates a single multicast UDP + packet, containing the number of busy and idle workers. The + packet is a simple ASCII format, similar to GET query parameters + in HTTP. +

    + +An Example Packet +v=1&ready=75&busy=0 + + +

    + Consumers should handle new variables besides busy and ready, + separated by '&', being added in the future. +

    + +
    + HeartbeatAddress -Address to send heartbeat requests - +Multicast address for heartbeat packets +HeartbeatAddress addr:port +disabled server config - This document is still under development. +

    The HeartbeatAddress directive specifies the +multicast address to which mod_heartbeat will send +status information. This address will usually correspond to a configured + HeartbeatListen on a +frontend proxy system.

    + +HeartbeatAddress 239.0.0.1:27999 +
    diff --git a/docs/manual/mod/mod_heartbeat.xml.fr b/docs/manual/mod/mod_heartbeat.xml.fr new file mode 100644 index 00000000000..bdfdc51c4d8 --- /dev/null +++ b/docs/manual/mod/mod_heartbeat.xml.fr @@ -0,0 +1,101 @@ + + + + + + + + + + + +mod_heartbeat +Envoie des messages d'état au mandataire frontal +Experimental +mod_heartbeat +heartbeat_module +Disponible à partir de la version 2.3 +du serveur HTTP Apache + + +

    mod_heartbeat envoie à un moniteur + mod_heartmonitor des messages multicast l'informant + du nombre de connexions courantes. En général, + mod_heartmonitor est chargé sur un serveur + mandataire où mod_lbmethod_heartbeat est chargé, ce + qui permet d'utiliser la lbmethod "heartbeat" au sein des + directives ProxyPass.

    + +

    + Le module mod_heartbeat est chargé sur le + serveur d'origine qui sert les requêtes via le + serveur mandataire. +

    + + + Pour utiliser mod_heartbeat, + mod_status et mod_watchdog + doivent être soit des modules statiques, soit des modules + dynamiques, et dans ce dernier cas, ils doivent être chargés + avant mod_heartbeat. + + +
    + +
    + Utilisation de la sortie de mod_heartbeat +

    + Chaque seconde, ce module génère un paquet multicast UDP contenant + le nombre de threads/processus occupés et en attente. Le paquet + possède un format ASCII simple similaire aux paramètres de requête + GET en HTTP. +

    + +Exemple de paquet +v=1&ready=75&busy=0 + + +

    + Les utilisateurs disposeront dans le futur de nouvelles variables en + plus de busy et ready, et toujours séparées par des '&'. +

    + +
    + + +HeartbeatAddress +Adresse multicast à laquelle envoyer les requêtes +heartbeat +HeartbeatAddress addr:port +disabled +server config + + +

    La directive HeartbeatAddress permet de + spécifier l'adresse multicast à laquelle mod_heartbeat va + envoyer ses informations. En général, cette adresse correspond à la + valeur définie par la directive HeartbeatListen sur le serveur + mandataire frontal.

    + + HeartbeatAddress 239.0.0.1:27999 + +
    +
    + +
    diff --git a/docs/manual/mod/mod_heartbeat.xml.meta b/docs/manual/mod/mod_heartbeat.xml.meta index 91ccf07609e..8c08c5eb217 100644 --- a/docs/manual/mod/mod_heartbeat.xml.meta +++ b/docs/manual/mod/mod_heartbeat.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_heartmonitor.html b/docs/manual/mod/mod_heartmonitor.html index 5ac954ac8a3..d72d841649a 100644 --- a/docs/manual/mod/mod_heartmonitor.html +++ b/docs/manual/mod/mod_heartmonitor.html @@ -3,3 +3,7 @@ URI: mod_heartmonitor.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_heartmonitor.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_heartmonitor.html.en b/docs/manual/mod/mod_heartmonitor.html.en index ec1e4968a00..5d157552ff5 100644 --- a/docs/manual/mod/mod_heartmonitor.html.en +++ b/docs/manual/mod/mod_heartmonitor.html.en @@ -1,54 +1,108 @@ - -mod_heartmonitor - Apache HTTP Server +mod_heartmonitor - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_heartmonitor

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    - - +
    Description:
    Status:Extension
    + -
    Description:Centralized monitor for mod_heartbeat origin servers
    Status:Experimental
    ModuleIdentifier:heartmonitor_module
    SourceFile:mod_heartmonitor.c
    Compatibility:Available in 2.3 and later
    +Compatibility:Available in Apache 2.3 and later

    Summary

    -
    This document is still under development.
    +

    +mod_heartmonitor listens for server status messages generated +by mod_heartbeat enabled origin servers and makes their status +available to mod_lbmethod_heartbeat. This allows +ProxyPass to use the "heartbeat" +lbmethod inside of ProxyPass. +

    + +

    This module uses the services of mod_slotmem_shm when +available instead of flat-file storage. No configuration is required to +use mod_slotmem_shm.

    + +
    + To use mod_heartmonitor, + mod_status and mod_watchdog + must be either a static modules or, if a dynamic module, it must + be loaded before mod_heartmonitor. +
    +
    +

    Bugfix checklist

    See also

    +
    top

    HeartbeatListen Directive

    - - + + + + + + +
    Description:Address to listen for heartbeat requests
    Syntax:
    Description:multicast address to listen for incoming heartbeat requests
    Syntax:HeartbeatListenaddr:port
    Default:disabled
    Context:server config
    Status:Experimental
    Module:mod_heartmonitor
    +

    The HeartbeatListen directive specifies the + multicast address on which the server will listen for status information from + mod_heartbeat-enabled servers. This + address will usually correspond to a configured HeartbeatAddress on an origin server. +

    + +
    HeartbeatListen 239.0.0.1:27999
    + + +

    This module is inactive until this directive is used.

    + +
    +
    top
    +

    HeartbeatMaxServers Directive

    + + + + - +
    Description:Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    Syntax:HeartbeatMaxServers number-of-servers
    Default:HeartbeatMaxServers 10
    Context:server config
    Status:Extension
    Status:Experimental
    Module:mod_heartmonitor
    -
    This document is still under development.
    +

    The HeartbeatMaxServers directive specifies the + maximum number of servers that will be sending requests to this monitor + server. It is used to control the size of the shared memory allocated + to store the heartbeat info when mod_slotmem_shm is in use.

    top
    @@ -58,16 +112,40 @@ Syntax:HeartbeatStorage file-path Default:HeartbeatStorage logs/hb.dat Context:server config -Status:Extension +Status:Experimental Module:mod_heartmonitor -
    This document is still under development.
    +

    The HeartbeatStorage directive specifies the + path to store heartbeat data. This flat-file is used only when + mod_slotmem_shm is not loaded.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_heartmonitor.html.fr b/docs/manual/mod/mod_heartmonitor.html.fr new file mode 100644 index 00000000000..6e6b51b24b9 --- /dev/null +++ b/docs/manual/mod/mod_heartmonitor.html.fr @@ -0,0 +1,158 @@ + + + + + +mod_heartmonitor - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_heartmonitor

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Moniteur centralis pour les serveurs d'origine mod_heartbeat
    Statut:Exprimental
    IdentificateurdeModule:heartmonitor_module
    FichierSource:mod_heartmonitor.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    +mod_heartmonitor interprte les messages d'tat gnrs +par les serveurs d'origine pour lesquels mod_heartbeat est activ et +fournit ces informations mod_lbmethod_heartbeat, ce +qui permet d'utiliser la lbmethod "heartbeat" au sein des +directives ProxyPass. +

    + +

    Ce module utilise les services de mod_slotmem_shm, +lorsqu'il est disponible, au lieu d'un simple fichier texte. Aucune +configuration supplmentaire n'est requise pour utiliser +mod_slotmem_shm.

    + +
    + Pour utiliser mod_heartmonitor, + mod_status et mod_watchdog + doivent tre soit des modules statiques, soit des modules + dynamiques, et dans ce dernier cas, ils doivent tre chargs + avant mod_heartmonitor. +
    +
    + + +
    top
    +

    Directive HeartbeatListen

    + + + + + + + +
    Description:Adresse multicast d'coute des requtes entrantes heartbeat
    Syntaxe:HeartbeatListenaddr:port
    Dfaut:disabled
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_heartmonitor
    +

    La directive HeartbeatListen permet de + spcifier l'adresse multicast sur laquelle le serveur va surveiller les + informations d'tat en provenance de serveurs o + mod_heartbeat est activ. Cette adresse correspond + en gnral la valeur de la directive HeartbeatAddress sur le serveur + d'origine. +

    + +
    HeartbeatListen 239.0.0.1:27999
    + + +

    Tant que cette directive n'est pas utilise, le module est + dsactiv.

    + +
    +
    top
    +

    Directive HeartbeatMaxServers

    + + + + + + + +
    Description:Spcifie le nombre maximal de serveurs qui pourront envoyer +des requtes heartbeat ce serveur.
    Syntaxe:HeartbeatMaxServers nombre-de-serveurs
    Dfaut:HeartbeatMaxServers 10
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_heartmonitor
    +

    La directive HeartbeatMaxServers + spcifie le nombre maximal de serveurs qui pourront envoyer des + requtes heartbeat ce serveur de monitoring. Elle permet ainsi de + contrler la quantit de mmoire partage alloue pour le stockage + des donnes heartbeat lorsqu'on utilise + mod_slotmem_shm.

    + +
    +
    top
    +

    Directive HeartbeatStorage

    + + + + + + + +
    Description:Chemin vers le stockage des donnes heartbeat
    Syntaxe:HeartbeatStorage chemin fichier
    Dfaut:HeartbeatStorage logs/hb.dat
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_heartmonitor
    +

    La directive HeartbeatStorage permet de + spcifier le chemin de stockage des donnes heartbeat. Ce fichier + texte n'est utilis que si mod_slotmem_shm n'est + pas charg.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_heartmonitor.xml b/docs/manual/mod/mod_heartmonitor.xml index 6ba3380a645..2d9fee1330f 100644 --- a/docs/manual/mod/mod_heartmonitor.xml +++ b/docs/manual/mod/mod_heartmonitor.xml @@ -23,24 +23,54 @@ mod_heartmonitor - -Extension +Centralized monitor for mod_heartbeat origin servers +Experimental mod_heartmonitor.c heartmonitor_module -Available in 2.3 and later +Available in Apache 2.3 and later - This document is still under development. +

    +mod_heartmonitor listens for server status messages generated +by mod_heartbeat enabled origin servers and makes their status +available to mod_lbmethod_heartbeat. This allows +ProxyPass to use the "heartbeat" +lbmethod inside of ProxyPass. +

    + +

    This module uses the services of mod_slotmem_shm when +available instead of flat-file storage. No configuration is required to +use mod_slotmem_shm.

    + + + To use mod_heartmonitor, + mod_status and mod_watchdog + must be either a static modules or, if a dynamic module, it must + be loaded before mod_heartmonitor. + +
    HeartbeatListen -Address to listen for heartbeat requests - +multicast address to listen for incoming heartbeat requests +HeartbeatListenaddr:port +disabled server config - This document is still under development. +

    The HeartbeatListen directive specifies the + multicast address on which the server will listen for status information from + mod_heartbeat-enabled servers. This + address will usually correspond to a configured HeartbeatAddress on an origin server. +

    + + + HeartbeatListen 239.0.0.1:27999 + + +

    This module is inactive until this directive is used.

    @@ -52,8 +82,25 @@ server config - This document is still under development. +

    The HeartbeatStorage directive specifies the + path to store heartbeat data. This flat-file is used only when + mod_slotmem_shm is not loaded.

    + +HeartbeatMaxServers +Specifies the maximum number of servers that will be sending +heartbeat requests to this server +HeartbeatMaxServers number-of-servers +HeartbeatMaxServers 10 +server config + + +

    The HeartbeatMaxServers directive specifies the + maximum number of servers that will be sending requests to this monitor + server. It is used to control the size of the shared memory allocated + to store the heartbeat info when mod_slotmem_shm is in use.

    +
    +
    diff --git a/docs/manual/mod/mod_heartmonitor.xml.fr b/docs/manual/mod/mod_heartmonitor.xml.fr new file mode 100644 index 00000000000..5cd3adb14ef --- /dev/null +++ b/docs/manual/mod/mod_heartmonitor.xml.fr @@ -0,0 +1,116 @@ + + + + + + + + + + + +mod_heartmonitor +Moniteur centralisé pour les serveurs d'origine mod_heartbeat +Experimental +mod_heartmonitor.c +heartmonitor_module +Disponible depuis la version 2.3 d'Apache + + +

    +mod_heartmonitor interprète les messages d'état générés +par les serveurs d'origine pour lesquels mod_heartbeat est activé et +fournit ces informations à mod_lbmethod_heartbeat, ce +qui permet d'utiliser la lbmethod "heartbeat" au sein des +directives ProxyPass. +

    + +

    Ce module utilise les services de mod_slotmem_shm, +lorsqu'il est disponible, au lieu d'un simple fichier texte. Aucune +configuration supplémentaire n'est requise pour utiliser +mod_slotmem_shm.

    + + + Pour utiliser mod_heartmonitor, + mod_status et mod_watchdog + doivent être soit des modules statiques, soit des modules + dynamiques, et dans ce dernier cas, ils doivent être chargés + avant mod_heartmonitor. + +
    + + +HeartbeatListen +Adresse multicast d'écoute des requêtes entrantes heartbeat +HeartbeatListenaddr:port +disabled +server config + + +

    La directive HeartbeatListen permet de + spécifier l'adresse multicast sur laquelle le serveur va surveiller les + informations d'état en provenance de serveurs où + mod_heartbeat est activé. Cette adresse correspond + en général à la valeur de la directive HeartbeatAddress sur le serveur + d'origine. +

    + + + HeartbeatListen 239.0.0.1:27999 + + +

    Tant que cette directive n'est pas utilisée, le module est + désactivé.

    +
    +
    + + +HeartbeatStorage +Chemin vers le stockage des données heartbeat +HeartbeatStorage chemin fichier +HeartbeatStorage logs/hb.dat +server config + + +

    La directive HeartbeatStorage permet de + spécifier le chemin de stockage des données heartbeat. Ce fichier + texte n'est utilisé que si mod_slotmem_shm n'est + pas chargé.

    +
    +
    + + +HeartbeatMaxServers +Spécifie le nombre maximal de serveurs qui pourront envoyer +des requêtes heartbeat à ce serveur. +HeartbeatMaxServers nombre-de-serveurs +HeartbeatMaxServers 10 +server config + + +

    La directive HeartbeatMaxServers + spécifie le nombre maximal de serveurs qui pourront envoyer des + requêtes heartbeat à ce serveur de monitoring. Elle permet ainsi de + contrôler la quantité de mémoire partagée allouée pour le stockage + des données heartbeat lorsqu'on utilise + mod_slotmem_shm.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_heartmonitor.xml.meta b/docs/manual/mod/mod_heartmonitor.xml.meta index 376443f8bad..269a7db4894 100644 --- a/docs/manual/mod/mod_heartmonitor.xml.meta +++ b/docs/manual/mod/mod_heartmonitor.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_http2.html b/docs/manual/mod/mod_http2.html new file mode 100644 index 00000000000..508c6697436 --- /dev/null +++ b/docs/manual/mod/mod_http2.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_http2.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_http2.html.en b/docs/manual/mod/mod_http2.html.en new file mode 100644 index 00000000000..c425e9fde18 --- /dev/null +++ b/docs/manual/mod/mod_http2.html.en @@ -0,0 +1,966 @@ + + + + + +mod_http2 - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_http2

    +
    +

    Available Languages:  en 

    +
    + + + + +
    Description:Support for the HTTP/2 transport layer
    Status:Extension
    ModuleIdentifier:http2_module
    SourceFile:mod_http2.c
    Compatibility:Available in version 2.4.17 and later
    +

    Summary

    + +

    This module provides HTTP/2 (RFC 7540) + support for the Apache HTTP Server.

    + +

    This module relies on libnghttp2 + to provide the core http/2 engine.

    + +

    Warning

    +

    This module is experimental. Its behaviors, directives, and + defaults are subject to more change from release to + release relative to other standard modules. Users are encouraged to + consult the "CHANGES" file for potential updates.

    +
    + +

    You must enable HTTP/2 via Protocols + in order to use the functionality described in this document. The + HTTP/2 protocol does not require the use of encryption so two schemes are available: + h2 (HTTP/2 over TLS) and h2c (HTTP/2 over TCP).

    + +

    Two useful configuration schemes are:

    + +

    HTTP/2 in a VirtualHost context (TLS only)

    +
    Protocols h2 http/1.1
    + +

    Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure + <VirtualHost>. + HTTP/2 preamble checking (Direct mode, see H2Direct) is disabled by default for h2.

    +
    + +

    HTTP/2 in a Server context (TLS and cleartext)

    +
    Protocols h2 h2c http/1.1
    + +

    Allows HTTP/2 negotiation (h2) via TLS ALPN for secure + <VirtualHost>. Allows + HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1 + connection or via HTTP/2 preamble checking (Direct mode, see + H2Direct).

    +
    + +

    Refer to the official HTTP/2 FAQ + for any doubt about the protocol.

    + +
    + +
    top
    +
    +

    How it works

    + +

    HTTP/2 Dimensioning

    +

    + Enabling HTTP/2 on your Apache Server has impact on the resource + consumption and if you have a busy site, you may need to consider + carefully the implications. +

    +

    + The first noticeable thing after enabling HTTP/2 is that your server + processes will start additional threads. The reason for this is that + HTTP/2 gives all requests that it receives to its own Worker + threads for processing, collects the results and streams them out + to the client. +

    +

    + In the current implementation, these workers use a separate thread + pool from the MPM workers that you might be familiar with. This is + just how things are right now and not intended to be like this forever. + (It might be forever for the 2.4.x release line, though.) So, HTTP/2 + workers, or shorter H2Workers, will not show up in mod_status. They + are also not counted against directives such as ThreadsPerChild. However + they take ThreadsPerChild + as default if you have not configured something + else via H2MinWorkers and + H2MaxWorkers. +

    +

    + Another thing to watch out for is is memory consumption. Since HTTP/2 + keeps more state on the server to manage all the open request, priorities + for and dependencies between them, it will always need more memory + than HTTP/1.1 processing. There are three directives which steer the + memory footprint of a HTTP/2 connection: + H2MaxSessionStreams, + H2WindowSize and + H2StreamMaxMemSize. +

    +

    + H2MaxSessionStreams limits the + number of parallel requests that a client can make on a HTTP/2 connection. + It depends on your site how many you should allow. The default is 100 which + is plenty and unless you run into memory problems, I would keep it this + way. Most requests that browsers send are GETs without a body, so they + use up only a little bit of memory until the actual processing starts. +

    +

    + H2WindowSize controls how much + the client is allowed to send as body of a request, before it waits + for the server to encourage more. Or, the other way around, it is the + amount of request body data the server needs to be able to buffer. This + is per request. +

    +

    + And last, but not least, H2StreamMaxMemSize + controls how much response data shall be buffered. The request sits in + a H2Worker thread and is producing data, the HTTP/2 connection tries + to send this to the client. If the client does not read fast enough, + the connection will buffer this amount of data and then suspend the + H2Worker. +

    +

    + If you serve a lot of static files, H2SessionExtraFiles + is of interest. This tells the server how many file handles per + HTTP/2 connection it is allowed to waste for better performance. Because + when a request produces a static file as the response, the file handle + gets passed around and is buffered and not the file contents. That allows + to serve many large files without wasting memory or copying data + unnecessarily. However file handles are a limited resource for a process, + and if too many are used this way, requests may fail under load as + the amount of open handles has been exceeded. +

    + + +

    Multiple Hosts and Misdirected Requests

    +

    + Many sites use the same TLS certificate for multiple virtual hosts. The + certificate either has a wildcard name, such as '*.example.org' or carries + several alternate names. Browsers using HTTP/2 will recognize that and reuse + an already opened connection for such hosts. +

    +

    + While this is great for performance, it comes at a price: such vhosts + need more care in their configuration. The problem is that you will have + multiple requests for multiple hosts on the same TLS connection. And that + makes renegotiation impossible, in face the HTTP/2 standard forbids it. +

    +

    + So, if you have several virtual hosts using the same certificate and + want to use HTTP/2 for them, you need to make sure that all vhosts have + exactly the same SSL configuration. You need the same protocol, + ciphers and settings for client verification. +

    +

    + If you mix things, Apache httpd will detect it and return a special + response code, 421 Misdirected Request, to the client. +

    + + +

    Environment Variables

    +

    + This module can be configured to provide HTTP/2 related information + as additional environment variables to the SSI and CGI namespace, as well + as in custom log configurations (see %{VAR_NAME}e). +

    + + + + + + + + + + + + + + + +
    Variable Name:Value Type:Description:
    HTTP2flagHTTP/2 is being used.
    H2PUSHflagHTTP/2 Server Push is enabled for this connection and also supported by the client.
    H2_PUSHflagalternate name for H2PUSH
    H2_PUSHEDstringempty or PUSHED for a request being pushed by the server.
    H2_PUSHED_ONnumberHTTP/2 stream number that triggered the push of this request.
    H2_STREAM_IDnumberHTTP/2 stream number of this request.
    H2_STREAM_TAGstringHTTP/2 process unique stream identifier, consisting of connection id and stream id separated by -.
    + + +
    +
    top
    +

    H2CopyFiles Directive

    + + + + + + + + +
    Description:Determine file handling in responses
    Syntax:H2CopyFiles on|off
    Default:H2CopyFiles off
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.24 and later.
    +

    + This directive influences how file content is handled in + responses. When off, which is the default, file handles + are passed from the requestion processing down to the main + connection, using the usual Apache setaside handling for + managing the lifetime of the file. +

    +

    + When set to on, file content is copied while the + request is still being processed and the buffered data is passed + on to the main connection. This is better if a third party + module is injecting files with different lifetimes into the response. +

    +

    + An example for such a module is mod_wsgi that may place + Python file handles into the response. Those files get close down when + Python thinks processing has finished. That may be well before + mod_http2 is done with them. +

    + +
    +
    top
    +

    H2Direct Directive

    + + + + + + + +
    Description:H2 Direct Protocol Switch
    Syntax:H2Direct on|off
    Default:H2Direct on for h2c, off for h2 protocol
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive toggles the usage of the HTTP/2 Direct Mode. This + should be used inside a + <VirtualHost> + section to enable direct HTTP/2 communication for that virtual host. +

    +

    + Direct communication means that if the first bytes received by the + server on a connection match the HTTP/2 preamble, the HTTP/2 + protocol is switched to immediately without further negotiation. + This mode is defined in RFC 7540 for the cleartext (h2c) case. Its + use on TLS connections not mandated by the standard. +

    +

    + When a server/vhost does not have h2 or h2c enabled via + Protocols, + the connection is never inspected for a HTTP/2 preamble. + H2Direct + does not matter then. This is important for connections that + use protocols where an initial read might hang indefinitely, such + as NNTP. +

    +

    + For clients that have out-of-band knowledge about a server + supporting h2c, direct HTTP/2 saves the client from having to + perform an HTTP/1.1 upgrade, resulting in better performance + and avoiding the Upgrade restrictions on request bodies. +

    +

    + This makes direct h2c attractive for server to server communication + as well, when the connection can be trusted or is secured by other means. +

    +

    Example

    H2Direct on
    +
    + +
    +
    top
    +

    H2EarlyHints Directive

    + + + + + + + + +
    Description:Determine sending of 103 status codes
    Syntax:H2EarlyHints on|off
    Default:H2EarlyHints off
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.24 and later.
    +

    + This setting controls if HTTP status 103 interim responses are + forwarded to the client or not. By default, this is currently + not the case since a range of clients still have trouble with + unexpected interim responses. +

    +

    + When set to on, PUSH resources announced with + H2PushResource will trigger an interim 103 response + before the final response. The 103 response will carry Link + headers that advise the preload of such resources. +

    + +
    +
    top
    +

    H2MaxSessionStreams Directive

    + + + + + + + +
    Description:Maximum number of active streams per HTTP/2 session.
    Syntax:H2MaxSessionStreams n
    Default:H2MaxSessionStreams 100
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the maximum number of active streams per HTTP/2 session (e.g. connection) + that the server allows. A stream is active if it is not idle or + closed according to RFC 7540. +

    +

    Example

    H2MaxSessionStreams 20
    +
    + +
    +
    top
    +

    H2MaxWorkerIdleSeconds Directive

    + + + + + + + +
    Description:Maximum number of seconds h2 workers remain idle until shut down.
    Syntax:H2MaxWorkerIdleSeconds n
    Default:H2MaxWorkerIdleSeconds 600
    Context:server config
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the maximum number of seconds a h2 worker may + idle until it shuts itself down. This only happens while the number of + h2 workers exceeds H2MinWorkers. +

    +

    Example

    H2MaxWorkerIdleSeconds 20
    +
    + +
    +
    top
    +

    H2MaxWorkers Directive

    + + + + + + +
    Description:Maximum number of worker threads to use per child process.
    Syntax:H2MaxWorkers n
    Context:server config
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the maximum number of worker threads to spawn + per child process for HTTP/2 processing. If this directive is not used, + mod_http2 will chose a value suitable for the mpm + module loaded. +

    +

    Example

    H2MaxWorkers 20
    +
    + +
    +
    top
    +

    H2MinWorkers Directive

    + + + + + + +
    Description:Minimal number of worker threads to use per child process.
    Syntax:H2MinWorkers n
    Context:server config
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the minimum number of worker threads to spawn + per child process for HTTP/2 processing. If this directive is not used, + mod_http2 will chose a value suitable for the mpm + module loaded. +

    +

    Example

    H2MinWorkers 10
    +
    + +
    +
    top
    +

    H2ModernTLSOnly Directive

    + + + + + + + + +
    Description:Require HTTP/2 connections to be "modern TLS" only
    Syntax:H2ModernTLSOnly on|off
    Default:H2ModernTLSOnly on
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later.
    +

    + This directive toggles the security checks on HTTP/2 connections + in TLS mode (https:). This can be used server wide or for specific + <VirtualHost>s. +

    +

    + The security checks require that the TSL protocol is at least + TLSv1.2 and that none of the ciphers listed in RFC 7540, Appendix A + is used. These checks will be extended once new security requirements + come into place. +

    +

    + The name stems from the + Security/Server Side TLS + definitions at mozilla where "modern compatibility" is defined. Mozilla Firefox and + other browsers require modern compatibility for HTTP/2 connections. As everything + in OpSec, this is a moving target and can be expected to evolve in the future. +

    +

    + One purpose of having these checks in mod_http2 is to enforce this + security level for all connections, not only those from browsers. The other + purpose is to prevent the negotiation of HTTP/2 as a protocol should + the requirements not be met. +

    +

    + Ultimately, the security of the TLS connection is determined by the + server configuration directives for mod_ssl. +

    +

    Example

    H2ModernTLSOnly off
    +
    + +
    +
    top
    +

    H2Push Directive

    + + + + + + + + +
    Description:H2 Server Push Switch
    Syntax:H2Push on|off
    Default:H2Push on
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later.
    +

    + This directive toggles the usage of the HTTP/2 server push + protocol feature. This should be used inside a + <VirtualHost> + section to enable direct HTTP/2 communication for that virtual host. +

    +

    + The HTTP/2 protocol allows the server to push other resources to + a client when it asked for a particular one. This is helpful + if those resources are connected in some way and the client can + be expected to ask for it anyway. The pushing then saves the + time it takes the client to ask for the resources itself. On the + other hand, pushing resources the client never needs or already + has is a waste of bandwidth. +

    +

    + Server pushes are detected by inspecting the Link headers of + responses (see https://tools.ietf.org/html/rfc5988 for the + specification). When a link thus specified has the rel=preload + attribute, it is treated as a resource to be pushed. +

    +

    + Link headers in responses are either set by the application or + can be configured via mod_headers as: +

    +

    mod_headers example

    <Location /index.html>
    +    Header add Link "</css/site.css>;rel=preload"
    +    Header add Link "</images/logo.jpg>;rel=preload"
    +</Location>
    +
    +

    + As the example shows, there can be several link headers added + to a response, resulting in several pushes being triggered. There + are no checks in the module to avoid pushing the same resource + twice or more to one client. Use with care. +

    +

    + HTTP/2 server pushes are enabled by default. This directive + allows it to be switch off on all resources of this server/virtual + host. +

    +

    Example

    H2Push off
    +
    +

    + Last but not least, pushes happen only when the client signals + its willingness to accept those. Most browsers do, some, like Safari 9, + do not. Also, pushes also only happen for resources from the same + authority as the original response is for. +

    + +
    +
    top
    +

    H2PushDiarySize Directive

    + + + + + + + + +
    Description:H2 Server Push Diary Size
    Syntax:H2PushDiarySize n
    Default:H2PushDiarySize 256
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.19 and later.
    +

    + This directive toggles the maximum number of HTTP/2 server pushes + that are remembered per HTTP/2 connection. This can be used inside the + <VirtualHost> + section to influence the number for all connections to that virtual host. +

    +

    + The push diary records a digest (currently using a 64 bit number) of pushed + resources (their URL) to avoid duplicate pushes on the same connection. + These value are not persisted, so clients opening a new connection + will experience known pushes again. There is ongoing work to enable + a client to disclose a digest of the resources it already has, so + the diary maybe initialized by the client on each connection setup. +

    +

    + If the maximum size is reached, newer entries replace the oldest + ones. A diary entry uses 8 bytes, letting a + default diary with 256 entries consume around 2 KB of memory. +

    +

    + A size of 0 will effectively disable the push diary. +

    + +
    +
    top
    +

    H2PushPriority Directive

    + + + + + + + + +
    Description:H2 Server Push Priority
    Syntax:H2PushPriority mime-type [after|before|interleaved] [weight]
    Default:H2PushPriority * After 16
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later. For having an + effect, a nghttp2 library version 1.5.0 or newer is necessary.
    +

    + This directive defines the priority handling of pushed responses + based on the content-type of the response. This is usually defined + per server config, but may also appear in a virtual host. +

    +

    + HTTP/2 server pushes are always related to a client request. Each + such request/response pairs, or streams have a dependency + and a weight, together defining the priority of a stream. +

    +

    + When a stream depends on another, say X depends on Y, + then Y gets all bandwidth before X gets any. Note that this + does not mean that Y will block X. If Y has no data to send, + all bandwidth allocated to Y can be used by X. +

    +

    + When a stream has more than one dependant, say X1 and X2 both + depend on Y, the weight determines the bandwidth + allocation. If X1 and X2 have the same weight, they both get + half of the available bandwidth. If the weight of X1 is twice + as large as that for X2, X1 gets twice the bandwidth of X2. +

    +

    + Ultimately, every stream depends on the root stream which + gets all the bandwidth available, but never sends anything. So all + its bandwidth is distributed by weight among its children. Which + either have data to send or distribute the bandwidth to their + own children. And so on. If none of the children have data + to send, that bandwidth get distributed somewhere else according + to the same rules. +

    +

    + The purpose of this priority system is to always make use of + available bandwidth while allowing precedence and weight + to be given to specific streams. Since, normally, all streams + are initiated by the client, it is also the one that sets + these priorities. +

    +

    + Only when such a stream results in a PUSH, gets the server to + decide what the initial priority of such a pushed + stream is. In the examples below, X is the client stream. It + depends on Y and the server decides to PUSH streams P1 and P2 + onto X. +

    +

    + The default priority rule is: +

    +

    Default Priority Rule

    H2PushPriority * After 16
    +
    +

    + which reads as 'Send a pushed stream of any content-type + depending on the client stream with weight 16'. And so P1 + and P2 will be send after X and, as they have equal weight, + share bandwidth equally among themselves. +

    +

    Interleaved Priority Rule

    H2PushPriority text/css Interleaved 256
    +
    +

    + which reads as 'Send any CSS resource on the same dependency and + weight as the client stream'. If P1 has content-type 'text/css', + it will depend on Y (as does X) and its effective weight will be + calculated as P1ew = Xw * (P1w / 256). With P1w being + 256, this will make the effective weight the same as the weight + of X. If both X and P1 have data to send, bandwidth will be allocated + to both equally. +

    +

    + With Pw specified as 512, a pushed, interleaved stream would + get double the weight of X. With 128 only half as much. Note that + effective weights are always capped at 256. +

    +

    Before Priority Rule

    H2PushPriority application/json Before
    +
    +

    + This says that any pushed stream of content type 'application/json' + should be send out before X. This makes P1 dependent + on Y and X dependent on P1. So, X will be stalled as long as + P1 has data to send. The effective weight is inherited from the + client stream. Specifying a weight is not allowed. +

    +

    + Be aware that the effect of priority specifications is limited + by the available server resources. If a server does not have + workers available for pushed streams, the data for the stream + may only ever arrive when other streams have been finished. +

    +

    + Last, but not least, there are some specifics of the syntax + to be used in this directive: +

    +
      +
    1. '*' is the only special content-type that matches all others. + 'image/*' will not work.
    2. +
    3. The default dependency is 'After'.
    4. +
    5. There are also default weights: for 'After' it is 16, 'interleaved' is 256. +
    6. +
    +

    Shorter Priority Rules

    H2PushPriority application/json 32         # an After rule
    +H2PushPriority image/jpeg before           # weight inherited
    +H2PushPriority text/css   interleaved      # weight 256 default
    +
    + +
    +
    top
    +

    H2PushResource Directive

    + + + + + + + +
    Description:Declares resources for early pushing to the client
    Syntax:H2PushResource [add] path [critical]
    Context:server config, virtual host, directory, .htaccess
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.24 and later.
    +

    + When added to a directory/location HTTP/2 PUSHes will be attempted + for all paths added via this directive. This directive can be used + several times for the same location. +

    +

    + This directive pushes resources much earlier than adding + Link headers via mod_headers. + mod_http2 announces these resources in a + 103 Early Hints interim response to the client. + That means that clients not supporting PUSH will still get + early preload hints. +

    +

    + In contrast to setting Link response headers + via mod_headers, this directive will only + take effect on HTTP/2 connections. +

    +

    + By adding critical to such a resource, the server + will give processing it more preference and send its data, once + available, before the data from the main request. +

    + +
    +
    top
    +

    H2SerializeHeaders Directive

    + + + + + + + +
    Description:Serialize Request/Response Processing Switch
    Syntax:H2SerializeHeaders on|off
    Default:H2SerializeHeaders off
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive toggles if HTTP/2 requests shall be serialized in + HTTP/1.1 format for processing by httpd core or if + received binary data shall be passed into the request_recs + directly. +

    +

    + Serialization will lower performance, but gives more backward + compatibility in case custom filters/hooks need it. +

    +

    Example

    H2SerializeHeaders on
    +
    + +
    +
    top
    +

    H2SessionExtraFiles Directive

    + + + + + + +
    Description:Number of Extra File Handles
    Syntax:H2SessionExtraFiles n
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive sets maximum number of extra file handles + a HTTP/2 session is allowed to use. A file handle is counted as + extra when it is transferred from a h2 worker thread to + the main HTTP/2 connection handling. This commonly happens when + serving static files. +

    + Depending on the processing model configured on the server, the + number of connections times number of active streams may exceed + the number of file handles for the process. On the other hand, + converting every file into memory bytes early results in too + many buffer writes. This option helps to mitigate that. +

    + The number of file handles used by a server process is then in + the order of: +

    +
    (h2_connections * extra_files) + (h2_max_worker)
    +

    Example

    H2SessionExtraFiles 10
    +
    +

    + If nothing is configured, the module tries to make a conservative + guess how many files are safe to use. This depends largely on the + MPM chosen. +

    + +
    +
    top
    +

    H2StreamMaxMemSize Directive

    + + + + + + + +
    Description:Maximum amount of output data buffered per stream.
    Syntax:H2StreamMaxMemSize bytes
    Default:H2StreamMaxMemSize 65536
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the maximum number of outgoing data bytes buffered in memory + for an active streams. This memory is not allocated per stream as such. Allocations + are counted against this limit when they are about to be done. Stream processing + freezes when the limit has been reached and will only continue when buffered data + has been sent out to the client. +

    +

    Example

    H2StreamMaxMemSize 128000
    +
    + +
    +
    top
    +

    H2TLSCoolDownSecs Directive

    + + + + + + + + +
    Description:
    Syntax:H2TLSCoolDownSecs seconds
    Default:H2TLSCoolDownSecs 1
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later.
    +

    + This directive sets the number of seconds of idle time on a TLS + connection before the TLS write size falls back to small (~1300 bytes) + length. + This can be used server wide or for specific + <VirtualHost>s. +

    +

    + See H2TLSWarmUpSize for a + description of TLS warmup. H2TLSCoolDownSecs reflects the fact + that connections may deteriorate over time (and TCP flow adjusts) + for idle connections as well. It is beneficial to overall performance + to fall back to the pre-warmup phase after a number of seconds that + no data has been sent. +

    +

    + In deployments where connections can be considered reliable, this + timer can be disabled by setting it to 0. +

    +

    + The following example sets the seconds to zero, effectively disabling + any cool down. Warmed up TLS connections stay on maximum record + size. +

    +

    Example

    H2TLSCoolDownSecs 0
    +
    + +
    +
    top
    +

    H2TLSWarmUpSize Directive

    + + + + + + + + +
    Description:
    Syntax:H2TLSWarmUpSize amount
    Default:H2TLSWarmUpSize 1048576
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    Compatibility:Available in version 2.4.18 and later.
    +

    + This directive sets the number of bytes to be sent in small + TLS records (~1300 bytes) until doing maximum sized writes (16k) + on https: HTTP/2 connections. + This can be used server wide or for specific + <VirtualHost>s. +

    +

    + Measurements by google performance + labs show that best performance on TLS connections is reached, + if initial record sizes stay below the MTU level, to allow a + complete record to fit into an IP packet. +

    +

    + While TCP adjust its flow-control and window sizes, longer TLS + records can get stuck in queues or get lost and need retransmission. + This is of course true for all packets. TLS however needs the + whole record in order to decrypt it. Any missing bytes at the end + will stall usage of the received ones. +

    +

    + After a sufficient number of bytes have been send successfully, + the TCP state of the connection is stable and maximum TLS record + sizes (16 KB) can be used for optimal performance. +

    +

    + In deployments where servers are reached locally or over reliable + connections only, the value might be decreased with 0 disabling + any warmup phase altogether. +

    +

    + The following example sets the size to zero, effectively disabling + any warmup phase. +

    +

    Example

    H2TLSWarmUpSize 0
    +
    + +
    +
    top
    +

    H2Upgrade Directive

    + + + + + + + +
    Description:H2 Upgrade Protocol Switch
    Syntax:H2Upgrade on|off
    Default:H2Upgrade on for h2c, off for h2 protocol
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive toggles the usage of the HTTP/1.1 Upgrade method + for switching to HTTP/2. This + should be used inside a + <VirtualHost> + section to enable Upgrades to HTTP/2 for that virtual host. +

    +

    + This method of switching protocols is defined in HTTP/1.1 and + uses the "Upgrade" header (thus the name) to announce willingness + to use another protocol. This may happen on any request of a + HTTP/1.1 connection. +

    +

    + This method of protocol switching is enabled by default on cleartext + (potential h2c) connections and disabled on TLS (potential h2), + as mandated by RFC 7540. +

    +

    + Please be aware that Upgrades are only accepted for requests + that carry no body. POSTs and PUTs with content will never + trigger an upgrade to HTTP/2. + See H2Direct for an + alternative to Upgrade. +

    +

    + This mode only has an effect when h2 or h2c is enabled via + the Protocols. +

    +

    Example

    H2Upgrade on
    +
    + +
    +
    top
    +

    H2WindowSize Directive

    + + + + + + + +
    Description:Size of Stream Window for upstream data.
    Syntax:H2WindowSize bytes
    Default:H2WindowSize 65535
    Context:server config, virtual host
    Status:Extension
    Module:mod_http2
    +

    + This directive sets the size of the window that is used for flow control + from client to server and limits the amount of data the server has to buffer. + The client will stop sending on a stream once the limit has been reached until + the server announces more available space (as it has processed some of the data). +

    + This limit affects only request bodies, not its meta data such as headers. Also, + it has no effect on response bodies as the window size for those are managed + by the clients. +

    +

    Example

    H2WindowSize 128000
    +
    + +
    +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_http2.xml b/docs/manual/mod/mod_http2.xml new file mode 100644 index 00000000000..b7dcc959be8 --- /dev/null +++ b/docs/manual/mod/mod_http2.xml @@ -0,0 +1,1002 @@ + + + + + + + + + + mod_http2 + Support for the HTTP/2 transport layer + Extension + mod_http2.c + http2_module + Available in version 2.4.17 and later + + +

    This module provides HTTP/2 (RFC 7540) + support for the Apache HTTP Server.

    + +

    This module relies on libnghttp2 + to provide the core http/2 engine.

    + + Warning +

    This module is experimental. Its behaviors, directives, and + defaults are subject to more change from release to + release relative to other standard modules. Users are encouraged to + consult the "CHANGES" file for potential updates.

    +
    + +

    You must enable HTTP/2 via Protocols + in order to use the functionality described in this document. The + HTTP/2 protocol does not require the use of encryption so two schemes are available: + h2 (HTTP/2 over TLS) and h2c (HTTP/2 over TCP).

    + +

    Two useful configuration schemes are:

    + + HTTP/2 in a VirtualHost context (TLS only) + +Protocols h2 http/1.1 + +

    Allows HTTP/2 negotiation (h2) via TLS ALPN in a secure + VirtualHost. + HTTP/2 preamble checking (Direct mode, see H2Direct) is disabled by default for h2.

    +
    + + HTTP/2 in a Server context (TLS and cleartext) + +Protocols h2 h2c http/1.1 + +

    Allows HTTP/2 negotiation (h2) via TLS ALPN for secure + VirtualHost. Allows + HTTP/2 cleartext negotiation (h2c) upgrading from an initial HTTP/1.1 + connection or via HTTP/2 preamble checking (Direct mode, see + H2Direct).

    +
    + +

    Refer to the official HTTP/2 FAQ + for any doubt about the protocol.

    + +
    + +
    How it works + +
    HTTP/2 Dimensioning +

    + Enabling HTTP/2 on your Apache Server has impact on the resource + consumption and if you have a busy site, you may need to consider + carefully the implications. +

    +

    + The first noticeable thing after enabling HTTP/2 is that your server + processes will start additional threads. The reason for this is that + HTTP/2 gives all requests that it receives to its own Worker + threads for processing, collects the results and streams them out + to the client. +

    +

    + In the current implementation, these workers use a separate thread + pool from the MPM workers that you might be familiar with. This is + just how things are right now and not intended to be like this forever. + (It might be forever for the 2.4.x release line, though.) So, HTTP/2 + workers, or shorter H2Workers, will not show up in mod_status. They + are also not counted against directives such as ThreadsPerChild. However + they take ThreadsPerChild + as default if you have not configured something + else via H2MinWorkers and + H2MaxWorkers. +

    +

    + Another thing to watch out for is is memory consumption. Since HTTP/2 + keeps more state on the server to manage all the open request, priorities + for and dependencies between them, it will always need more memory + than HTTP/1.1 processing. There are three directives which steer the + memory footprint of a HTTP/2 connection: + H2MaxSessionStreams, + H2WindowSize and + H2StreamMaxMemSize. +

    +

    + H2MaxSessionStreams limits the + number of parallel requests that a client can make on a HTTP/2 connection. + It depends on your site how many you should allow. The default is 100 which + is plenty and unless you run into memory problems, I would keep it this + way. Most requests that browsers send are GETs without a body, so they + use up only a little bit of memory until the actual processing starts. +

    +

    + H2WindowSize controls how much + the client is allowed to send as body of a request, before it waits + for the server to encourage more. Or, the other way around, it is the + amount of request body data the server needs to be able to buffer. This + is per request. +

    +

    + And last, but not least, H2StreamMaxMemSize + controls how much response data shall be buffered. The request sits in + a H2Worker thread and is producing data, the HTTP/2 connection tries + to send this to the client. If the client does not read fast enough, + the connection will buffer this amount of data and then suspend the + H2Worker. +

    +

    + If you serve a lot of static files, H2SessionExtraFiles + is of interest. This tells the server how many file handles per + HTTP/2 connection it is allowed to waste for better performance. Because + when a request produces a static file as the response, the file handle + gets passed around and is buffered and not the file contents. That allows + to serve many large files without wasting memory or copying data + unnecessarily. However file handles are a limited resource for a process, + and if too many are used this way, requests may fail under load as + the amount of open handles has been exceeded. +

    +
    + +
    Multiple Hosts and Misdirected Requests +

    + Many sites use the same TLS certificate for multiple virtual hosts. The + certificate either has a wildcard name, such as '*.example.org' or carries + several alternate names. Browsers using HTTP/2 will recognize that and reuse + an already opened connection for such hosts. +

    +

    + While this is great for performance, it comes at a price: such vhosts + need more care in their configuration. The problem is that you will have + multiple requests for multiple hosts on the same TLS connection. And that + makes renegotiation impossible, in face the HTTP/2 standard forbids it. +

    +

    + So, if you have several virtual hosts using the same certificate and + want to use HTTP/2 for them, you need to make sure that all vhosts have + exactly the same SSL configuration. You need the same protocol, + ciphers and settings for client verification. +

    +

    + If you mix things, Apache httpd will detect it and return a special + response code, 421 Misdirected Request, to the client. +

    +
    + +
    Environment Variables +

    + This module can be configured to provide HTTP/2 related information + as additional environment variables to the SSI and CGI namespace, as well + as in custom log configurations (see %{VAR_NAME}e). +

    + + + + + + + + + + + + + + + + +
    Variable Name:Value Type:Description:
    HTTP2flagHTTP/2 is being used.
    H2PUSHflagHTTP/2 Server Push is enabled for this connection and also supported by the client.
    H2_PUSHflagalternate name for H2PUSH
    H2_PUSHEDstringempty or PUSHED for a request being pushed by the server.
    H2_PUSHED_ONnumberHTTP/2 stream number that triggered the push of this request.
    H2_STREAM_IDnumberHTTP/2 stream number of this request.
    H2_STREAM_TAGstringHTTP/2 process unique stream identifier, consisting of connection id and stream id separated by -.
    +
    + +
    + + + H2Direct + H2 Direct Protocol Switch + H2Direct on|off + H2Direct on for h2c, off for h2 protocol + + server config + virtual host + + + +

    + This directive toggles the usage of the HTTP/2 Direct Mode. This + should be used inside a + VirtualHost + section to enable direct HTTP/2 communication for that virtual host. +

    +

    + Direct communication means that if the first bytes received by the + server on a connection match the HTTP/2 preamble, the HTTP/2 + protocol is switched to immediately without further negotiation. + This mode is defined in RFC 7540 for the cleartext (h2c) case. Its + use on TLS connections not mandated by the standard. +

    +

    + When a server/vhost does not have h2 or h2c enabled via + Protocols, + the connection is never inspected for a HTTP/2 preamble. + H2Direct + does not matter then. This is important for connections that + use protocols where an initial read might hang indefinitely, such + as NNTP. +

    +

    + For clients that have out-of-band knowledge about a server + supporting h2c, direct HTTP/2 saves the client from having to + perform an HTTP/1.1 upgrade, resulting in better performance + and avoiding the Upgrade restrictions on request bodies. +

    +

    + This makes direct h2c attractive for server to server communication + as well, when the connection can be trusted or is secured by other means. +

    + Example + +H2Direct on + + +
    +
    + + + H2Push + H2 Server Push Switch + H2Push on|off + H2Push on + + server config + virtual host + + Available in version 2.4.18 and later. + + +

    + This directive toggles the usage of the HTTP/2 server push + protocol feature. This should be used inside a + VirtualHost + section to enable direct HTTP/2 communication for that virtual host. +

    +

    + The HTTP/2 protocol allows the server to push other resources to + a client when it asked for a particular one. This is helpful + if those resources are connected in some way and the client can + be expected to ask for it anyway. The pushing then saves the + time it takes the client to ask for the resources itself. On the + other hand, pushing resources the client never needs or already + has is a waste of bandwidth. +

    +

    + Server pushes are detected by inspecting the Link headers of + responses (see https://tools.ietf.org/html/rfc5988 for the + specification). When a link thus specified has the rel=preload + attribute, it is treated as a resource to be pushed. +

    +

    + Link headers in responses are either set by the application or + can be configured via mod_headers as: +

    + mod_headers example + +<Location /index.html> + Header add Link "</css/site.css>;rel=preload" + Header add Link "</images/logo.jpg>;rel=preload" +</Location> + + +

    + As the example shows, there can be several link headers added + to a response, resulting in several pushes being triggered. There + are no checks in the module to avoid pushing the same resource + twice or more to one client. Use with care. +

    +

    + HTTP/2 server pushes are enabled by default. This directive + allows it to be switch off on all resources of this server/virtual + host. +

    + Example + +H2Push off + + +

    + Last but not least, pushes happen only when the client signals + its willingness to accept those. Most browsers do, some, like Safari 9, + do not. Also, pushes also only happen for resources from the same + authority as the original response is for. +

    +
    +
    + + + H2PushDiarySize + H2 Server Push Diary Size + H2PushDiarySize n + H2PushDiarySize 256 + + server config + virtual host + + Available in version 2.4.19 and later. + + +

    + This directive toggles the maximum number of HTTP/2 server pushes + that are remembered per HTTP/2 connection. This can be used inside the + VirtualHost + section to influence the number for all connections to that virtual host. +

    +

    + The push diary records a digest (currently using a 64 bit number) of pushed + resources (their URL) to avoid duplicate pushes on the same connection. + These value are not persisted, so clients opening a new connection + will experience known pushes again. There is ongoing work to enable + a client to disclose a digest of the resources it already has, so + the diary maybe initialized by the client on each connection setup. +

    +

    + If the maximum size is reached, newer entries replace the oldest + ones. A diary entry uses 8 bytes, letting a + default diary with 256 entries consume around 2 KB of memory. +

    +

    + A size of 0 will effectively disable the push diary. +

    +
    +
    + + + H2PushPriority + H2 Server Push Priority + H2PushPriority mime-type [after|before|interleaved] [weight] + H2PushPriority * After 16 + + server config + virtual host + + Available in version 2.4.18 and later. For having an + effect, a nghttp2 library version 1.5.0 or newer is necessary. + + +

    + This directive defines the priority handling of pushed responses + based on the content-type of the response. This is usually defined + per server config, but may also appear in a virtual host. +

    +

    + HTTP/2 server pushes are always related to a client request. Each + such request/response pairs, or streams have a dependency + and a weight, together defining the priority of a stream. +

    +

    + When a stream depends on another, say X depends on Y, + then Y gets all bandwidth before X gets any. Note that this + does not mean that Y will block X. If Y has no data to send, + all bandwidth allocated to Y can be used by X. +

    +

    + When a stream has more than one dependant, say X1 and X2 both + depend on Y, the weight determines the bandwidth + allocation. If X1 and X2 have the same weight, they both get + half of the available bandwidth. If the weight of X1 is twice + as large as that for X2, X1 gets twice the bandwidth of X2. +

    +

    + Ultimately, every stream depends on the root stream which + gets all the bandwidth available, but never sends anything. So all + its bandwidth is distributed by weight among its children. Which + either have data to send or distribute the bandwidth to their + own children. And so on. If none of the children have data + to send, that bandwidth get distributed somewhere else according + to the same rules. +

    +

    + The purpose of this priority system is to always make use of + available bandwidth while allowing precedence and weight + to be given to specific streams. Since, normally, all streams + are initiated by the client, it is also the one that sets + these priorities. +

    +

    + Only when such a stream results in a PUSH, gets the server to + decide what the initial priority of such a pushed + stream is. In the examples below, X is the client stream. It + depends on Y and the server decides to PUSH streams P1 and P2 + onto X. +

    +

    + The default priority rule is: +

    + Default Priority Rule + +H2PushPriority * After 16 + + +

    + which reads as 'Send a pushed stream of any content-type + depending on the client stream with weight 16'. And so P1 + and P2 will be send after X and, as they have equal weight, + share bandwidth equally among themselves. +

    + Interleaved Priority Rule + +H2PushPriority text/css Interleaved 256 + + +

    + which reads as 'Send any CSS resource on the same dependency and + weight as the client stream'. If P1 has content-type 'text/css', + it will depend on Y (as does X) and its effective weight will be + calculated as P1ew = Xw * (P1w / 256). With P1w being + 256, this will make the effective weight the same as the weight + of X. If both X and P1 have data to send, bandwidth will be allocated + to both equally. +

    +

    + With Pw specified as 512, a pushed, interleaved stream would + get double the weight of X. With 128 only half as much. Note that + effective weights are always capped at 256. +

    + Before Priority Rule + +H2PushPriority application/json Before + + +

    + This says that any pushed stream of content type 'application/json' + should be send out before X. This makes P1 dependent + on Y and X dependent on P1. So, X will be stalled as long as + P1 has data to send. The effective weight is inherited from the + client stream. Specifying a weight is not allowed. +

    +

    + Be aware that the effect of priority specifications is limited + by the available server resources. If a server does not have + workers available for pushed streams, the data for the stream + may only ever arrive when other streams have been finished. +

    +

    + Last, but not least, there are some specifics of the syntax + to be used in this directive: +

    +
      +
    1. '*' is the only special content-type that matches all others. + 'image/*' will not work.
    2. +
    3. The default dependency is 'After'.
    4. +
    5. There are also default weights: for 'After' it is 16, 'interleaved' is 256. +
    6. +
    + Shorter Priority Rules + +H2PushPriority application/json 32 # an After rule +H2PushPriority image/jpeg before # weight inherited +H2PushPriority text/css interleaved # weight 256 default + + +
    +
    + + + H2Upgrade + H2 Upgrade Protocol Switch + H2Upgrade on|off + H2Upgrade on for h2c, off for h2 protocol + + server config + virtual host + + + +

    + This directive toggles the usage of the HTTP/1.1 Upgrade method + for switching to HTTP/2. This + should be used inside a + VirtualHost + section to enable Upgrades to HTTP/2 for that virtual host. +

    +

    + This method of switching protocols is defined in HTTP/1.1 and + uses the "Upgrade" header (thus the name) to announce willingness + to use another protocol. This may happen on any request of a + HTTP/1.1 connection. +

    +

    + This method of protocol switching is enabled by default on cleartext + (potential h2c) connections and disabled on TLS (potential h2), + as mandated by RFC 7540. +

    +

    + Please be aware that Upgrades are only accepted for requests + that carry no body. POSTs and PUTs with content will never + trigger an upgrade to HTTP/2. + See H2Direct for an + alternative to Upgrade. +

    +

    + This mode only has an effect when h2 or h2c is enabled via + the Protocols. +

    + Example + +H2Upgrade on + + +
    +
    + + + H2MaxSessionStreams + Maximum number of active streams per HTTP/2 session. + H2MaxSessionStreams n + H2MaxSessionStreams 100 + + server config + virtual host + + +

    + This directive sets the maximum number of active streams per HTTP/2 session (e.g. connection) + that the server allows. A stream is active if it is not idle or + closed according to RFC 7540. +

    + Example + +H2MaxSessionStreams 20 + + +
    +
    + + + H2StreamMaxMemSize + Maximum amount of output data buffered per stream. + H2StreamMaxMemSize bytes + H2StreamMaxMemSize 65536 + + server config + virtual host + + +

    + This directive sets the maximum number of outgoing data bytes buffered in memory + for an active streams. This memory is not allocated per stream as such. Allocations + are counted against this limit when they are about to be done. Stream processing + freezes when the limit has been reached and will only continue when buffered data + has been sent out to the client. +

    + Example + +H2StreamMaxMemSize 128000 + + +
    +
    + + + H2WindowSize + Size of Stream Window for upstream data. + H2WindowSize bytes + H2WindowSize 65535 + + server config + virtual host + + +

    + This directive sets the size of the window that is used for flow control + from client to server and limits the amount of data the server has to buffer. + The client will stop sending on a stream once the limit has been reached until + the server announces more available space (as it has processed some of the data). +

    + This limit affects only request bodies, not its meta data such as headers. Also, + it has no effect on response bodies as the window size for those are managed + by the clients. +

    + Example + +H2WindowSize 128000 + + +
    +
    + + + H2MinWorkers + Minimal number of worker threads to use per child process. + H2MinWorkers n + + server config + + +

    + This directive sets the minimum number of worker threads to spawn + per child process for HTTP/2 processing. If this directive is not used, + mod_http2 will chose a value suitable for the mpm + module loaded. +

    + Example + +H2MinWorkers 10 + + +
    +
    + + + H2MaxWorkers + Maximum number of worker threads to use per child process. + H2MaxWorkers n + + server config + + +

    + This directive sets the maximum number of worker threads to spawn + per child process for HTTP/2 processing. If this directive is not used, + mod_http2 will chose a value suitable for the mpm + module loaded. +

    + Example + +H2MaxWorkers 20 + + +
    +
    + + + H2MaxWorkerIdleSeconds + Maximum number of seconds h2 workers remain idle until shut down. + H2MaxWorkerIdleSeconds n + H2MaxWorkerIdleSeconds 600 + + server config + + +

    + This directive sets the maximum number of seconds a h2 worker may + idle until it shuts itself down. This only happens while the number of + h2 workers exceeds H2MinWorkers. +

    + Example + +H2MaxWorkerIdleSeconds 20 + + +
    +
    + + + H2SessionExtraFiles + Number of Extra File Handles + H2SessionExtraFiles n + + server config + virtual host + + +

    + This directive sets maximum number of extra file handles + a HTTP/2 session is allowed to use. A file handle is counted as + extra when it is transferred from a h2 worker thread to + the main HTTP/2 connection handling. This commonly happens when + serving static files. +

    + Depending on the processing model configured on the server, the + number of connections times number of active streams may exceed + the number of file handles for the process. On the other hand, + converting every file into memory bytes early results in too + many buffer writes. This option helps to mitigate that. +

    + The number of file handles used by a server process is then in + the order of: +

    +
    +                (h2_connections * extra_files) + (h2_max_worker)
    +            
    + Example + +H2SessionExtraFiles 10 + + +

    + If nothing is configured, the module tries to make a conservative + guess how many files are safe to use. This depends largely on the + MPM chosen. +

    +
    +
    + + + H2SerializeHeaders + Serialize Request/Response Processing Switch + H2SerializeHeaders on|off + H2SerializeHeaders off + + server config + virtual host + + +

    + This directive toggles if HTTP/2 requests shall be serialized in + HTTP/1.1 format for processing by httpd core or if + received binary data shall be passed into the request_recs + directly. +

    +

    + Serialization will lower performance, but gives more backward + compatibility in case custom filters/hooks need it. +

    + Example + +H2SerializeHeaders on + + +
    +
    + + + H2ModernTLSOnly + Require HTTP/2 connections to be "modern TLS" only + H2ModernTLSOnly on|off + H2ModernTLSOnly on + + server config + virtual host + + Available in version 2.4.18 and later. + + +

    + This directive toggles the security checks on HTTP/2 connections + in TLS mode (https:). This can be used server wide or for specific + VirtualHosts. +

    +

    + The security checks require that the TSL protocol is at least + TLSv1.2 and that none of the ciphers listed in RFC 7540, Appendix A + is used. These checks will be extended once new security requirements + come into place. +

    +

    + The name stems from the + Security/Server Side TLS + definitions at mozilla where "modern compatibility" is defined. Mozilla Firefox and + other browsers require modern compatibility for HTTP/2 connections. As everything + in OpSec, this is a moving target and can be expected to evolve in the future. +

    +

    + One purpose of having these checks in mod_http2 is to enforce this + security level for all connections, not only those from browsers. The other + purpose is to prevent the negotiation of HTTP/2 as a protocol should + the requirements not be met. +

    +

    + Ultimately, the security of the TLS connection is determined by the + server configuration directives for mod_ssl. +

    + Example + +H2ModernTLSOnly off + + +
    +
    + + + H2TLSWarmUpSize + + H2TLSWarmUpSize amount + H2TLSWarmUpSize 1048576 + + server config + virtual host + + Available in version 2.4.18 and later. + + +

    + This directive sets the number of bytes to be sent in small + TLS records (~1300 bytes) until doing maximum sized writes (16k) + on https: HTTP/2 connections. + This can be used server wide or for specific + VirtualHosts. +

    +

    + Measurements by google performance + labs show that best performance on TLS connections is reached, + if initial record sizes stay below the MTU level, to allow a + complete record to fit into an IP packet. +

    +

    + While TCP adjust its flow-control and window sizes, longer TLS + records can get stuck in queues or get lost and need retransmission. + This is of course true for all packets. TLS however needs the + whole record in order to decrypt it. Any missing bytes at the end + will stall usage of the received ones. +

    +

    + After a sufficient number of bytes have been send successfully, + the TCP state of the connection is stable and maximum TLS record + sizes (16 KB) can be used for optimal performance. +

    +

    + In deployments where servers are reached locally or over reliable + connections only, the value might be decreased with 0 disabling + any warmup phase altogether. +

    +

    + The following example sets the size to zero, effectively disabling + any warmup phase. +

    + Example + +H2TLSWarmUpSize 0 + + +
    +
    + + + H2TLSCoolDownSecs + + H2TLSCoolDownSecs seconds + H2TLSCoolDownSecs 1 + + server config + virtual host + + Available in version 2.4.18 and later. + + +

    + This directive sets the number of seconds of idle time on a TLS + connection before the TLS write size falls back to small (~1300 bytes) + length. + This can be used server wide or for specific + VirtualHosts. +

    +

    + See H2TLSWarmUpSize for a + description of TLS warmup. H2TLSCoolDownSecs reflects the fact + that connections may deteriorate over time (and TCP flow adjusts) + for idle connections as well. It is beneficial to overall performance + to fall back to the pre-warmup phase after a number of seconds that + no data has been sent. +

    +

    + In deployments where connections can be considered reliable, this + timer can be disabled by setting it to 0. +

    +

    + The following example sets the seconds to zero, effectively disabling + any cool down. Warmed up TLS connections stay on maximum record + size. +

    + Example + +H2TLSCoolDownSecs 0 + + +
    +
    + + + H2CopyFiles + Determine file handling in responses + H2CopyFiles on|off + H2CopyFiles off + + server config + virtual host + directory + .htaccess + + Available in version 2.4.24 and later. + + +

    + This directive influences how file content is handled in + responses. When off, which is the default, file handles + are passed from the requestion processing down to the main + connection, using the usual Apache setaside handling for + managing the lifetime of the file. +

    +

    + When set to on, file content is copied while the + request is still being processed and the buffered data is passed + on to the main connection. This is better if a third party + module is injecting files with different lifetimes into the response. +

    +

    + An example for such a module is mod_wsgi that may place + Python file handles into the response. Those files get close down when + Python thinks processing has finished. That may be well before + mod_http2 is done with them. +

    +
    +
    + + + H2PushResource + Declares resources for early pushing to the client + H2PushResource [add] path [critical] + + server config + virtual host + directory + .htaccess + + Available in version 2.4.24 and later. + + +

    + When added to a directory/location HTTP/2 PUSHes will be attempted + for all paths added via this directive. This directive can be used + several times for the same location. +

    +

    + This directive pushes resources much earlier than adding + Link headers via mod_headers. + mod_http2 announces these resources in a + 103 Early Hints interim response to the client. + That means that clients not supporting PUSH will still get + early preload hints. +

    +

    + In contrast to setting Link response headers + via mod_headers, this directive will only + take effect on HTTP/2 connections. +

    +

    + By adding critical to such a resource, the server + will give processing it more preference and send its data, once + available, before the data from the main request. +

    +
    +
    + + + H2EarlyHints + Determine sending of 103 status codes + H2EarlyHints on|off + H2EarlyHints off + + server config + virtual host + + Available in version 2.4.24 and later. + + +

    + This setting controls if HTTP status 103 interim responses are + forwarded to the client or not. By default, this is currently + not the case since a range of clients still have trouble with + unexpected interim responses. +

    +

    + When set to on, PUSH resources announced with + H2PushResource will trigger an interim 103 response + before the final response. The 103 response will carry Link + headers that advise the preload of such resources. +

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_http2.xml.meta b/docs/manual/mod/mod_http2.xml.meta new file mode 100644 index 00000000000..500e9da4cb1 --- /dev/null +++ b/docs/manual/mod/mod_http2.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_http2 + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_ident.html.en b/docs/manual/mod/mod_ident.html.en index c0260eb11f2..51021c85413 100644 --- a/docs/manual/mod/mod_ident.html.en +++ b/docs/manual/mod/mod_ident.html.en @@ -1,23 +1,28 @@ - -mod_ident - Apache HTTP Server +mod_ident - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_ident

    @@ -41,10 +46,10 @@
  • IdentityCheck
  • IdentityCheckTimeout
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    IdentityCheck Directive

    @@ -99,7 +104,28 @@ user  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ident.html.fr b/docs/manual/mod/mod_ident.html.fr index 445cecd3844..b215324ef33 100644 --- a/docs/manual/mod/mod_ident.html.fr +++ b/docs/manual/mod/mod_ident.html.fr @@ -1,23 +1,28 @@ - -mod_ident - Serveur Apache HTTP +mod_ident - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_ident

    +
  • Commentaires
  • top
    -

    IdentityCheck Directive

    +

    Directive IdentityCheck

    @@ -84,7 +89,7 @@ l'utilisateur distant
    top
    -
    Description:Active la journalisation de l'identit RFC 1413 de l'utilisateur distant
    @@ -108,7 +113,28 @@ ident fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ident.html.ja.utf8 b/docs/manual/mod/mod_ident.html.ja.utf8 index 89a8e614c4f..e9036f6ae79 100644 --- a/docs/manual/mod/mod_ident.html.ja.utf8 +++ b/docs/manual/mod/mod_ident.html.ja.utf8 @@ -1,28 +1,32 @@ - -mod_ident - Apache HTTP サーバ +mod_ident - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_ident

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    @@ -42,10 +46,10 @@
  • IdentityCheck
  • IdentityCheckTimeout
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    IdentityCheck ディレクティブ

    @@ -96,11 +100,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ident.html.ko.euc-kr b/docs/manual/mod/mod_ident.html.ko.euc-kr index 790c9deeaa5..82d94fd9c8b 100644 --- a/docs/manual/mod/mod_ident.html.ko.euc-kr +++ b/docs/manual/mod/mod_ident.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_ident - Apache HTTP Server +mod_ident - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >
    top

    IdentityCheck þ

    @@ -96,7 +101,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_imagemap.html b/docs/manual/mod/mod_imagemap.html index 0436d50082a..4b978b30672 100644 --- a/docs/manual/mod/mod_imagemap.html +++ b/docs/manual/mod/mod_imagemap.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_imagemap.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_imagemap.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/mod/mod_imagemap.html.en b/docs/manual/mod/mod_imagemap.html.en index bb0eb50b6b1..64c62ef9c20 100644 --- a/docs/manual/mod/mod_imagemap.html.en +++ b/docs/manual/mod/mod_imagemap.html.en @@ -1,27 +1,33 @@ - -mod_imagemap - Apache HTTP Server +mod_imagemap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_imagemap

    Available Languages:  en  | + fr  |  ko 

    Description:Dtermine le dlai d'attente pour les requtes ident
    @@ -41,28 +47,32 @@

    The following directive will activate files ending with .map as imagemap files:

    -

    AddHandler imap-file map

    +
    AddHandler imap-file map
    +

    Note that the following is still supported:

    -

    AddType application/x-httpd-imap map

    +
    AddType application/x-httpd-imap map
    +

    However, we are trying to phase out "magic MIME types" so we are deprecating this method.

    -
    top

    New Features

    @@ -335,6 +345,7 @@ that are not explicitly mapped
    + @@ -376,8 +387,30 @@ an imagemap

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_imagemap.html.fr b/docs/manual/mod/mod_imagemap.html.fr new file mode 100644 index 00000000000..6169eac79bb --- /dev/null +++ b/docs/manual/mod/mod_imagemap.html.fr @@ -0,0 +1,440 @@ + + + + + +mod_imagemap - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_imagemap

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:Server-side imagemap processing
    Description:Action if no coordinates are given when calling an imagemap
    Syntax:ImapMenu none|formatted|semiformatted|unformatted
    Default:ImapMenu formatted
    Context:server config, virtual host, directory, .htaccess
    Override:Indexes
    Status:Base
    + + +
    Description:Traitement des cartes des zones interactives d'une image +(imagemaps) au niveau du serveur
    Statut:Base
    IdentificateurdeModule:imagemap_module
    FichierSource:mod_imagemap.c
    +

    Sommaire

    + +

    Ce module traite les fichiers .map, et remplace + ainsi la fonctionnalit du programme CGI imagemap. Tout + rpertoire ou type de document configur pour utiliser le + gestionnaire imap-file ( l'aide des directives + AddHandler ou SetHandler), sera trait par ce + module.

    + +

    La directive suivante confre aux fichiers possdant l'extension + .map le statut de fichiers imagemap :

    + +
    AddHandler imap-file map
    + + +

    Notez que la syntaxe suivante reste encore supporte :

    + +
    AddType application/x-httpd-imap map
    + + +

    Cependant, nous essayons d'abandonner progressivement les "types + MIME magiques", et cette syntaxe est sur le point de devenir + obsolte.

    +
    + +
    top
    +
    +

    Nouvelles fonctionnalits

    + +

    Le module imagemap propose quelques nouvelles fonctionnalits qui + n'taient pas disponibles avec les programmes imagemap prcdemment + distribus.

    + +
      +
    • Rfrences d'URLs relatives l'information contenue dans + l'en-tte Referer: .
    • + +
    • Assignement <base> par dfaut via la + nouvelle directive base.
    • + +
    • Fichier imagemap.conf non requis.
    • + +
    • Rfrences des points.
    • + +
    • Gnration configurable de menus d'images interactives.
    • +
    +
    top
    +
    +

    Fichier imagemap

    + +

    Les lignes d'un fichier imagemap peuvent se prsenter sous + plusieurs formats :

    + +

    + directive valeur [x,y ...]
    + directive valeur "Texte de menu" [x,y + ...]
    + directive valeur x,y ... "Texte de menu" +

    + +

    Les directives sont base, default, + poly, circle, rect, ou + point. valeur est une URL absolue ou relative, ou une + des valeurs spciales numres ci-dessous. Les coordonnes sont des + paires x,y spares par des + espaces. Le texte entre guillemets est le texte du lien si un menu + imagemap est gnr. Les lignes commenant par '#' sont des + commentaires.

    + +

    Directives d'un fichier + imagemap

    +

    Les directives autorises dans un fichier imagemap sont au + nombre de six. Elles peuvent se trouver n'importe quelle + position dans le fichier, mais sont traites dans l'ordre selon + lequel elles sont enregistres dans le fichier imagemap.

    + +
    +
    Directive base
    + +

    Elle a le mme effet que <base + href="valeur">. Les URLs non absolues du + fichier imagemap sont considres comme relatives cette valeur. + La directive base l'emporte sur une directive + ImapBase dfinie dans + un fichier .htaccess ou dans le fichier de + configuration du serveur. En l'absence de directive de + configuration ImapBase, la valeur par + dfaut de base est + http://nom_serveur/.

    +

    base_uri est un synonyme de base. + Notez que la prsence ou l'absence d'un slash de fin dans l'URL + est importante.

    + +
    Directive default
    + +
    La dcision prendre si les coordonnes fournies ne + correspondent aucune des directives poly, + circle, ou rect, et si aucune directive + point n'est prsente. En l'absence de dfinition + d'une directive de configuration ImapDefault, la valeur par dfaut est + nocontent et provoque l'envoi d'un code de statut + 204 No Content. Le client verra toujours la mme + page s'afficher.
    + +
    Directive poly
    + +
    Accepte comme arguments trois cent points, et est actionne + si les coordonnes slectionnes par l'utilisateur tombent dans le + polygone dfini par ces points.
    + +
    Directive circle
    + +
    Accepte comme arguments les coordonnes du centre d'un cercle + et celles d'un point de ce cercle. Elle est actionne si les + coordonnes slectionnes par l'utilisateur tombent dans ce + cercle.
    + +
    Directive rect
    + +
    Accepte comme arguments les coordonnes des sommets de deux + angles opposs d'un rectangle. Elle est actionne si les + coordonnes slectionnes par l'utilisateur tombent dans ce + rectangle.
    + +
    Directive point
    + +
    Elle n'accepte qu'un seul point comme argument. Si aucune + autre directive ne correspond, c'est la directive + dont le point spcifi est le plus prs du point slectionn par + l'utilisateur qui est actionne. Notez que la directive + default ne sera pas suivie si une directive + point est prsente et si des coordonnes valides sont + fournies.
    +
    + + +

    Valeurs

    + +

    Les valeurs passes aux directives peuvent contenir :

    + +
    +
    une URL
    + +

    L'URL peut tre absolue ou relative. Les URLs relatives + peuvent contenir '..' et seront considres comme relatives la + valeur de base.

    +

    base en lui-mme, ne sera pas rsolu en fonction + de la valeur courante. Cependant, une directive base + mailto: fonctionnera correctement.

    + +
    map
    + +
    quivalent l'URL du fichier imagemap lui-mme. Aucune + coordonne n'est spcifie, et un menu sera donc gnr, moins + qu'une directive ImapMenu n'ait t dfinie + none.
    + +
    menu
    +
    quivalent map.
    + +
    referer
    + +
    quivalent l'URL du document rfrant. La valeur par dfaut + est http://nom_serveur/ si aucun en-tte + Referer: n'est prsent.
    + +
    nocontent
    + +
    Envoie un code de statut 204 No Content, + indiquant au client qu'il doit continuer afficher la mme page. + Valide pour toutes les directives, sauf base.
    + +
    error
    + +
    Envoie un code de statut d'chec 500 Server + Error. Valide pour toutes les directives, sauf + base, mais n'a de sens qu'avec la directive + default.
    +
    + + +

    Coordonnes

    + +
    +
    0,0 200,200
    + +
    Une coordonne se compose de deux valeurs, x et + y, spares par une virgule. Les coordonnes sont + spares entre elles par des espaces. Pour s'adapter la manire + dont Lynx traite les images interactives, la slection par un + utilisateur de la coordonne 0,0 a le mme effet que + si aucune coordonne n'a t slectionne.
    +
    + + + +

    Texte entre + guillemets

    + +
    +
    "Texte du menu"
    + +

    Aprs la valeur ou les coordonnes, la ligne peut + ventuellement contenir un texte entre guillemets. Cette chane + constitue le texte du lien si un menu est gnr :

    + +

    + <a href="http://example.com/">Texte de + menu</a> +

    + +

    Si aucun texte entre guillemets n'est prsent, le texte sera + constitu du nom du lien :

    + +

    + <a href="http://example.com/">http://example.com</a> +

    + +

    Si vous voulez insrer des guillemets dans le texte, vous devez + les inscrire sous la forme &quot;.

    +
    + + +
    top
    +
    +

    Exemple de fichier imagemap

    + +

    + #Les commentaires sont affichs dans un menu 'format' ou + #'semi-format'.
    + #Et peuvent contenir des balises html. <hr>
    + base referer
    + poly map "Puis-je avoir un menu, s'il vous plait ?" 0,0 0,10 10,10 10,0
    + rect .. 0,0 77,27 "le rpertoire du rfrant"
    + circle http://www.inetnebr.example.com/lincoln/feedback/ 195,0 305,27
    + rect autre_fichier "dans le mme rpertoire que le rfrant" 306,0 419,27
    + point http://www.zyzzyva.example.com/ 100,100
    + point http://www.tripod.example.com/ 200,200
    + rect mailto:nate@tripod.example.com 100,150 200,0 "Bogues?"
    +

    + +
    top
    +
    +

    Rfrencement de votre fichier +imagemap

    + +

    Exemple HTML

    + <a href="/maps/imagemap1.map">
    + + <img ismap src="/images/imagemap1.gif">
    +
    + </a> +

    + +

    Exemple XHTML

    + <a href="/maps/imagemap1.map">
    + + <img ismap="ismap" src="/images/imagemap1.gif" />
    +
    + </a> +

    + +
    +
    top
    +

    Directive ImapBase

    + + + + + + + + +
    Description:Valeur par dfaut de la directive base des +fichiers imagemap
    Syntaxe:ImapBase map|referer|URL
    Dfaut:ImapBase http://nom_serveur/
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Base
    Module:mod_imagemap
    +

    La directive ImapBase permet de dfinir la + valeur par dfaut de la directive base des fichiers + imagemap. Sa valeur est crase par la prsence ventuelle d'une + directive base dans le fichier imagemap. Si cette + directive est absente, la valeur par dfaut de la directive + base est + http://nom_serveur/.

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive ImapDefault

    + + + + + + + + +
    Description:Action entreprendre par dfaut lorsqu'un fichier imagemap +est invoqu avec des coordonnes qui ne correspondent aucune +cible
    Syntaxe:ImapDefault error|nocontent|map|referer|URL
    Dfaut:ImapDefault nocontent
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Base
    Module:mod_imagemap
    +

    La directive ImapDefault permet de dfinir + la valeur par dfaut de la directive default utilise + dans les fichiers imagemap. Sa valeur est crase par la prsence + ventuelle d'une directive default dans le fichier + imagemap. Si cette directive est absente, l'action associe + default est nocontent, ce qui implique + l'envoi d'un code de statut 204 No Content au client. + Dans ce cas, le client doit continuer afficher la mme page.

    + +
    +
    top
    +

    Directive ImapMenu

    + + + + + + + + +
    Description:Action entreprendre si aucune coordonne n'est fournie +lorsqu'on invoque un fichier imagemap
    Syntaxe:ImapMenu none|formatted|semiformatted|unformatted
    Dfaut:ImapMenu formatted
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Indexes
    Statut:Base
    Module:mod_imagemap
    +

    La directive ImapMenu permet de spcifier + l'action entreprendre lorsqu'un fichier imagemap est invoqu sans + coordonnes valides.

    + +
    +
    none
    +
    Si l'argument d'ImapMenu est none, aucun menu + n'est gnr, et l'action default est effectue.
    + +
    formatted
    +
    Le menu formatted est le menu le plus simple. Les + commentaires du fichier imagemap sont ignors. Un en-tte de + niveau un est affich, puis un sparateur horizontal, puis chacun + des liens sur une ligne spare. L'aspect du menu est similaire + celui d'un listing de rpertoire.
    + +
    semiformatted
    +
    Dans le menu semiformatted, les commentaires sont + affichs au moment o ils apparaissent dans le fichier imagemap. + Les lignes vides sont interprtes comme des lignes de sparation + HTML. Aucun en-tte ni sparateur horizontal n'est affich. part + ces diffrences, le menu semiformatted est identique + au menu formatted.
    + +
    unformatted
    +
    Les commentaires sont affichs et les lignes vides sont + ignores. N'est affich que ce qui apparait dans le fichier + imagemap. Toutes les lignes de sparation HTML et les + en-ttes doivent tre inclus en tant que commentaires dans le + fichier imagemap. Cela vous procure une grande souplesse pour + dfinir l'apparence de vos menus, mais vous oblige rdiger vos + fichiers imagemap en HTML, et non en texte plat.
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_imagemap.html.ko.euc-kr b/docs/manual/mod/mod_imagemap.html.ko.euc-kr index 69a223e9d5f..26908e0dbc9 100644 --- a/docs/manual/mod/mod_imagemap.html.ko.euc-kr +++ b/docs/manual/mod/mod_imagemap.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_imagemap - Apache HTTP Server +mod_imagemap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_imagemap

    ֽ ƴմϴ. @@ -49,19 +55,21 @@

    ׷ 츮 " Ư ǹ̰ ִ MIME type" Ϸ ϱ⶧ ̴.

    -
    top

    ο

    @@ -356,8 +364,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_imagemap.xml b/docs/manual/mod/mod_imagemap.xml index fab7a715d4e..1620af4640c 100644 --- a/docs/manual/mod/mod_imagemap.xml +++ b/docs/manual/mod/mod_imagemap.xml @@ -40,11 +40,11 @@

    The following directive will activate files ending with .map as imagemap files:

    - AddHandler imap-file map + AddHandler imap-file map

    Note that the following is still supported:

    - AddType application/x-httpd-imap map + AddType application/x-httpd-imap map

    However, we are trying to phase out "magic MIME types" so we are deprecating this method.

    @@ -278,6 +278,7 @@ Action if no coordinates are given when calling an imagemap ImapMenu none|formatted|semiformatted|unformatted +ImapMenu formatted server configvirtual host directory.htaccess Indexes diff --git a/docs/manual/mod/mod_imagemap.xml.fr b/docs/manual/mod/mod_imagemap.xml.fr new file mode 100644 index 00000000000..23a541d5296 --- /dev/null +++ b/docs/manual/mod/mod_imagemap.xml.fr @@ -0,0 +1,388 @@ + + + + + + + + + + + +mod_imagemap +Traitement des cartes des zones interactives d'une image +(imagemaps) au niveau du serveur +Base +mod_imagemap.c +imagemap_module + + +

    Ce module traite les fichiers .map, et remplace + ainsi la fonctionnalité du programme CGI imagemap. Tout + répertoire ou type de document configuré pour utiliser le + gestionnaire imap-file (à l'aide des directives + AddHandler ou SetHandler), sera traité par ce + module.

    + +

    La directive suivante confère aux fichiers possèdant l'extension + .map le statut de fichiers imagemap :

    + + AddHandler imap-file map + +

    Notez que la syntaxe suivante reste encore supportée :

    + + AddType application/x-httpd-imap map + +

    Cependant, nous essayons d'abandonner progressivement les "types + MIME magiques", et cette syntaxe est sur le point de devenir + obsolète.

    +
    + +
    Nouvelles fonctionnalités + +

    Le module imagemap propose quelques nouvelles fonctionnalités qui + n'étaient pas disponibles avec les programmes imagemap précédemment + distribués.

    + +
      +
    • Références d'URLs relatives à l'information contenue dans + l'en-tête Referer: .
    • + +
    • Assignement <base> par défaut via la + nouvelle directive base.
    • + +
    • Fichier imagemap.conf non requis.
    • + +
    • Références à des points.
    • + +
    • Génération configurable de menus d'images interactives.
    • +
    +
    + +
    Fichier imagemap + +

    Les lignes d'un fichier imagemap peuvent se présenter sous + plusieurs formats :

    + + + directive valeur [x,y ...]
    + directive valeur "Texte de menu" [x,y + ...]
    + directive valeur x,y ... "Texte de menu" +
    + +

    Les directives sont base, default, + poly, circle, rect, ou + point. valeur est une URL absolue ou relative, ou une + des valeurs spéciales énumérées ci-dessous. Les coordonnées sont des + paires x,y séparées par des + espaces. Le texte entre guillemets est le texte du lien si un menu + imagemap est généré. Les lignes commençant par '#' sont des + commentaires.

    + +
    Directives d'un fichier + imagemap +

    Les directives autorisées dans un fichier imagemap sont au + nombre de six. Elles peuvent se trouver à n'importe quelle + position dans le fichier, mais sont traitées dans l'ordre selon + lequel elles sont enregistrées dans le fichier imagemap.

    + +
    +
    Directive base
    + +

    Elle a le même effet que <base + href="valeur">. Les URLs non absolues du + fichier imagemap sont considérées comme relatives à cette valeur. + La directive base l'emporte sur une directive + ImapBase définie dans + un fichier .htaccess ou dans le fichier de + configuration du serveur. En l'absence de directive de + configuration ImapBase, la valeur par + défaut de base est + http://nom_serveur/.

    +

    base_uri est un synonyme de base. + Notez que la présence ou l'absence d'un slash de fin dans l'URL + est importante.

    + +
    Directive default
    + +
    La décision à prendre si les coordonnées fournies ne + correspondent à aucune des directives poly, + circle, ou rect, et si aucune directive + point n'est présente. En l'absence de définition + d'une directive de configuration ImapDefault, la valeur par défaut est + nocontent et provoque l'envoi d'un code de statut + 204 No Content. Le client verra toujours la même + page s'afficher.
    + +
    Directive poly
    + +
    Accepte comme arguments trois à cent points, et est actionnée + si les coordonnées sélectionnées par l'utilisateur tombent dans le + polygone défini par ces points.
    + +
    Directive circle
    + +
    Accepte comme arguments les coordonnées du centre d'un cercle + et celles d'un point de ce cercle. Elle est actionnée si les + coordonnées sélectionnées par l'utilisateur tombent dans ce + cercle.
    + +
    Directive rect
    + +
    Accepte comme arguments les coordonnées des sommets de deux + angles opposés d'un rectangle. Elle est actionnée si les + coordonnées sélectionnées par l'utilisateur tombent dans ce + rectangle.
    + +
    Directive point
    + +
    Elle n'accepte qu'un seul point comme argument. Si aucune + autre directive ne correspond, c'est la directive + dont le point spécifié est le plus près du point sélectionné par + l'utilisateur qui est actionnée. Notez que la directive + default ne sera pas suivie si une directive + point est présente et si des coordonnées valides sont + fournies.
    +
    +
    + +
    Valeurs + +

    Les valeurs passées aux directives peuvent contenir :

    + +
    +
    une URL
    + +

    L'URL peut être absolue ou relative. Les URLs relatives + peuvent contenir '..' et seront considérées comme relatives à la + valeur de base.

    +

    base en lui-même, ne sera pas résolu en fonction + de la valeur courante. Cependant, une directive base + mailto: fonctionnera correctement.

    + +
    map
    + +
    Équivalent à l'URL du fichier imagemap lui-même. Aucune + coordonnée n'est spécifiée, et un menu sera donc généré, à moins + qu'une directive ImapMenu n'ait été définie à + none.
    + +
    menu
    +
    Équivalent à map.
    + +
    referer
    + +
    Équivalent à l'URL du document référant. La valeur par défaut + est http://nom_serveur/ si aucun en-tête + Referer: n'est présent.
    + +
    nocontent
    + +
    Envoie un code de statut 204 No Content, + indiquant au client qu'il doit continuer à afficher la même page. + Valide pour toutes les directives, sauf base.
    + +
    error
    + +
    Envoie un code de statut d'échec 500 Server + Error. Valide pour toutes les directives, sauf + base, mais n'a de sens qu'avec la directive + default.
    +
    +
    + +
    Coordonnées + +
    +
    0,0 200,200
    + +
    Une coordonnée se compose de deux valeurs, x et + y, séparées par une virgule. Les coordonnées sont + séparées entre elles par des espaces. Pour s'adapter à la manière + dont Lynx traite les images interactives, la sélection par un + utilisateur de la coordonnée 0,0 a le même effet que + si aucune coordonnée n'a été sélectionnée.
    +
    + +
    + +
    Texte entre + guillemets + +
    +
    "Texte du menu"
    + +

    Après la valeur ou les coordonnées, la ligne peut + éventuellement contenir un texte entre guillemets. Cette chaîne + constitue le texte du lien si un menu est généré :

    + + + <a href="http://example.com/">Texte de + menu</a> + + +

    Si aucun texte entre guillemets n'est présent, le texte sera + constitué du nom du lien :

    + + + <a href="http://example.com/">http://example.com</a> + + +

    Si vous voulez insérer des guillemets dans le texte, vous devez + les inscrire sous la forme &quot;.

    +
    + +
    +
    + +
    Exemple de fichier imagemap + + + #Les commentaires sont affichés dans un menu 'formaté' ou + #'semi-formaté'.
    + #Et peuvent contenir des balises html. <hr>
    + base referer
    + poly map "Puis-je avoir un menu, s'il vous plait ?" 0,0 0,10 10,10 10,0
    + rect .. 0,0 77,27 "le répertoire du référant"
    + circle http://www.inetnebr.example.com/lincoln/feedback/ 195,0 305,27
    + rect autre_fichier "dans le même répertoire que le référant" 306,0 419,27
    + point http://www.zyzzyva.example.com/ 100,100
    + point http://www.tripod.example.com/ 200,200
    + rect mailto:nate@tripod.example.com 100,150 200,0 "Bogues?"
    +
    + +
    + +
    Référencement de votre fichier +imagemap + + Exemple HTML + <a href="/maps/imagemap1.map">
    + + <img ismap src="/images/imagemap1.gif">
    +
    + </a> +
    + + Exemple XHTML + <a href="/maps/imagemap1.map">
    + + <img ismap="ismap" src="/images/imagemap1.gif" />
    +
    + </a> +
    + +
    + + +ImapMenu +Action à entreprendre si aucune coordonnée n'est fournie +lorsqu'on invoque un fichier imagemap +ImapMenu none|formatted|semiformatted|unformatted +ImapMenu formatted +server configvirtual host +directory.htaccess +Indexes + + +

    La directive ImapMenu permet de spécifier + l'action à entreprendre lorsqu'un fichier imagemap est invoqué sans + coordonnées valides.

    + +
    +
    none
    +
    Si l'argument d'ImapMenu est none, aucun menu + n'est généré, et l'action default est effectuée.
    + +
    formatted
    +
    Le menu formatted est le menu le plus simple. Les + commentaires du fichier imagemap sont ignorés. Un en-tête de + niveau un est affiché, puis un séparateur horizontal, puis chacun + des liens sur une ligne séparée. L'aspect du menu est similaire à + celui d'un listing de répertoire.
    + +
    semiformatted
    +
    Dans le menu semiformatted, les commentaires sont + affichés au moment où ils apparaissent dans le fichier imagemap. + Les lignes vides sont interprètées comme des lignes de séparation + HTML. Aucun en-tête ni séparateur horizontal n'est affiché. À part + ces différences, le menu semiformatted est identique + au menu formatted.
    + +
    unformatted
    +
    Les commentaires sont affichés et les lignes vides sont + ignorées. N'est affiché que ce qui apparait dans le fichier + imagemap. Toutes les lignes de séparation HTML et les + en-têtes doivent être inclus en tant que commentaires dans le + fichier imagemap. Cela vous procure une grande souplesse pour + définir l'apparence de vos menus, mais vous oblige à rédiger vos + fichiers imagemap en HTML, et non en texte plat.
    +
    +
    +
    + + +ImapDefault +Action à entreprendre par défaut lorsqu'un fichier imagemap +est invoqué avec des coordonnées qui ne correspondent à aucune +cible +ImapDefault error|nocontent|map|referer|URL +ImapDefault nocontent +server configvirtual host +directory.htaccess +Indexes + + +

    La directive ImapDefault permet de définir + la valeur par défaut de la directive default utilisée + dans les fichiers imagemap. Sa valeur est écrasée par la présence + éventuelle d'une directive default dans le fichier + imagemap. Si cette directive est absente, l'action associée à + default est nocontent, ce qui implique + l'envoi d'un code de statut 204 No Content au client. + Dans ce cas, le client doit continuer à afficher la même page.

    +
    +
    + + +ImapBase +Valeur par défaut de la directive base des +fichiers imagemap +ImapBase map|referer|URL +ImapBase http://nom_serveur/ +server configvirtual host +directory.htaccess +Indexes + + +

    La directive ImapBase permet de définir la + valeur par défaut de la directive base des fichiers + imagemap. Sa valeur est écrasée par la présence éventuelle d'une + directive base dans le fichier imagemap. Si cette + directive est absente, la valeur par défaut de la directive + base est + http://nom_serveur/.

    +
    +UseCanonicalName +
    + +
    diff --git a/docs/manual/mod/mod_imagemap.xml.ko b/docs/manual/mod/mod_imagemap.xml.ko index ff597d745aa..a68ab9d0321 100644 --- a/docs/manual/mod/mod_imagemap.xml.ko +++ b/docs/manual/mod/mod_imagemap.xml.ko @@ -1,7 +1,7 @@ - + -mod_include - Apache HTTP Server +mod_include - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_include

    Available Languages:  en  | + fr  |  ja 

    - -
    Description:Server-parsed html documents (Server Side Includes)
    Status:Base
    ModuleIdentifier:include_module
    SourceFile:mod_include.c
    Compatibility:Implemented as an output filter since Apache -2.0
    +SourceFile:mod_include.c

    Summary

    This module provides a filter which will process files @@ -39,9 +43,17 @@ inclusion of other files or programs, as well as the setting and printing of environment variables.

    -
    top

    Enabling Server-Side Includes

    @@ -80,10 +83,9 @@ parse them and assign the resulting document the mime type of text/html:

    -

    - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -

    +
    AddType text/html .shtml
    +AddOutputFilter INCLUDES .shtml
    +

    The following directive must be given for the directories containing the shtml files (typically in a @@ -92,9 +94,8 @@ AllowOverride Options is set):

    -

    - Options +Includes -

    +
    Options +Includes
    +

    For backwards compatibility, the server-parsed handler also activates the @@ -116,7 +117,7 @@ configure the server to accept requests with PATH_INFO.

    top
    -

    Basic Elements

    +

    Available Elements

    The document is parsed as an HTML document, with special commands embedded as SGML comments. A command has the syntax:

    @@ -137,6 +138,8 @@ + + @@ -160,32 +163,65 @@ mod_cgi, and will only be available if this module is loaded.

    +

    The comment Element

    +

    This command doesn't output anything. Its only use is to + add comments within a file. These comments are not printed.

    + +

    This syntax is available in version 2.4.21 and later.

    + +

    + <!--#comment Blah Blah Blah --> +

    + +

    The config Element

    This command controls various aspects of the parsing. The valid attributes are:

    echomsg (Apache 2.1 and later)
    -
    The value is a message that is sent back to the +

    The value is a message that is sent back to the client if the echo element - attempts to echo an undefined variable. This overrides any SSIUndefinedEcho directives.

    + attempts to echo an undefined variable. This overrides any SSIUndefinedEcho directives.

    + +

    + <!--#config echomsg="[Value Undefined]" --> +

    +
    errmsg
    -
    The value is a message that is sent back to the +

    The value is a message that is sent back to the client if an error occurs while parsing the - document. This overrides any SSIErrorMsg directives.

    + document. This overrides any SSIErrorMsg directives.

    + +

    + <!--#config errmsg="[Oops, something broke.]" --> +

    +
    sizefmt
    -
    The value sets the format to be used when displaying +

    The value sets the format to be used when displaying the size of a file. Valid values are bytes for a count in bytes, or abbrev for a count in Kb or Mb as appropriate, for example a size of 1024 bytes - will be printed as "1K".

    + will be printed as "1K".

    + +

    + <!--#config sizefmt="abbrev" --> +

    + +
    timefmt
    -
    The value is a string to be used by the +

    The value is a string to be used by the strftime(3) library routine when printing - dates.

    + dates.

    + +

    + <!--#config timefmt=""%R, %B %d, %Y"" --> +

    + +
    @@ -246,6 +282,10 @@ In order to avoid cross-site scripting issues, you should always encode user supplied data. + +

    Example

    + <!--#echo encoding="entity" var="QUERY_STRING" --> +

    @@ -327,7 +367,18 @@
    file
    The value is a path relative to the directory - containing the current document being parsed.
    + containing the current document being parsed. + +

    + This file is <!--#fsize file="mod_include.html" --> bytes. +

    + + The value of file cannot start with a slash + (/), nor can it contain ../ so as to + refer to a file above the current directory or outside of the + document root. Attempting to so will result in the error message: + The given path was above the root path. +
    virtual
    The value is a (%-encoded) URL-path. If it does not begin with @@ -335,6 +386,14 @@ Note, that this does not print the size of any CGI output, but the size of the CGI script itself.
    + +

    + This file is <!--#fsize virtual="/docs/mod/mod_include.html" --> bytes. +

    + +

    Note that in many cases these two are exactly the same thing. + However, the file attribute doesn't respect URL-space + aliases.

    The flastmod Element

    @@ -424,12 +483,14 @@

    The printenv Element

    -

    This prints out a listing of all existing variables and +

    This prints out a plain text listing of all existing variables and their values. Special characters are entity encoded (see the echo element for details) before being output. There are no attributes.

    Example

    - <!--#printenv --> + <pre> + <!--#printenv --> + </pre>

    @@ -497,6 +558,16 @@
    DATE_LOCAL
    The current date in the local time zone.
    +
    DOCUMENT_ARGS
    +
    This variable contains the query string of the active SSI + document, or the empty string if a query string is not + included. For subrequests invoked through the + include SSI directive, QUERY_STRING + will represent the query string of the subrequest and + DOCUMENT_ARGS will represent the query string of + the SSI document. (Available in Apache HTTP Server 2.4.19 and + later.)
    +
    DOCUMENT_NAME
    The filename (excluding directories) of the document requested by the user.
    @@ -513,10 +584,13 @@ the user.
    QUERY_STRING_UNESCAPED
    -
    If a query string is present, this variable contains the - (%-decoded) query string, which is escaped for shell - usage (special characters like & etc. are - preceded by backslashes).
    +
    If a query string is present in the request for the active + SSI document, this variable contains the (%-decoded) query + string, which is escaped for shell usage (special + characters like & etc. are preceded by + backslashes). It is not set if a query string is not + present. Use DOCUMENT_ARGS if shell escaping + is not desired.
    top
    @@ -528,7 +602,7 @@ exec, flastmod, fsize, include, echo, and set directives. If SSILegacyExprParser is set to on, - substitution also occures in the arguments to conditional operators. + substitution also occurs in the arguments to conditional operators. You can insert a literal dollar sign into the string using backslash quoting:

    @@ -577,7 +651,7 @@

    The endif element ends the if element and is required.

    -

    test_condition is a boolean expression tha follows the +

    test_condition is a boolean expression which follows the ap_expr syntax. The syntax can be changed to be compatible with Apache HTTPD 2.2.x using SSILegacyExprParser.

    @@ -632,12 +706,10 @@
    -A string

    true if the URL represented by the string is accessible by - configuration, false otherwise. This test only has an effect if - SSIAccessEnable is on. This is useful - where content on a page is to be hidden from users who are not - authorized to view the URL, such as a link to that URL. Note - that the URL is only tested for whether access would be granted, - not whether the URL exists.

    + configuration, false otherwise. This is useful where content on a + page is to be hidden from users who are not authorized to view the + URL, such as a link to that URL. Note that the URL is only tested + for whether access would be granted, not whether the URL exists.

    Example

    <!--#if expr="-A /private" -->
    @@ -758,41 +830,6 @@ be escaped. This is regardless of their meaning to the regex engine.

    -
    -
    top
    -
    ElementDescription
    commentSSI comment
    config configure output formats
    echo
    - - - - - - -
    Description:Enable the -A flag in legacy conditional expressions.
    Syntax:SSIAccessEnable on|off
    Default:SSIAccessEnable off
    Context:directory, .htaccess
    Status:Base
    Module:mod_include
    -
    SSIAccessEnable has no effect unless - SSILegacyExprParser is set to - on. -
    - -

    The SSIAccessEnable directive controls whether - the -A test is enabled during conditional flow control processing when - using the 2.2.x compatible expression parser. - SSIAccessEnable can take on the following values:

    - -
    - -
    off
    -
    <!--#if expr="-A /foo"--> will be interpreted as a series - of string and regular expression tokens, the -A has no special - meaning.
    - -
    on
    -
    <!--#if expr="-A /foo"--> will evaluate to false if the - URL /foo is inaccessible by configuration, or true otherwise.
    - -
    - -
    top

    SSIEndTag Directive

    @@ -803,14 +840,12 @@ Context:server config, virtual host Status:Base Module:mod_include -Compatibility:Available in version 2.0.30 and later.

    This directive changes the string that mod_include looks for to mark the end of an include element.

    -

    Example

    - SSIEndTag "%>" -

    +
    SSIEndTag "%>"
    +

    See also

    @@ -830,7 +865,6 @@ directive]"
    Override:All Status:Base Module:mod_include -Compatibility:Available in version 2.0.30 and later.

    The SSIErrorMsg directive changes the error message displayed when mod_include encounters an @@ -841,9 +875,8 @@ directive]"

    This directive has the same effect as the <!--#config errmsg=message --> element.

    -

    Example

    - SSIErrorMsg "<!-- Error -->" -

    +
    SSIErrorMsg "<!-- Error -->"
    +
    top
    @@ -956,7 +989,6 @@ server. Context:server config, virtual host Status:Base Module:mod_include -Compatibility:Available in version 2.0.30 and later.

    This directive changes the string that mod_include looks for to mark an include element to process.

    @@ -965,10 +997,9 @@ server. output of a file each processing different commands (possibly at different times).

    -

    Example

    - SSIStartTag "<%"
    - SSIEndTag "%>" -

    +
    SSIStartTag "<%"
    +SSIEndTag   "%>"
    +

    The example given above, which also specifies a matching SSIEndTag, will @@ -995,7 +1026,6 @@ displayed Override:All Status:Base Module:mod_include -Compatibility:Available in version 2.0.30 and later.

    This directive changes the format in which date strings are displayed when echoing DATE environment variables. The @@ -1005,9 +1035,8 @@ displayed

    This directive has the same effect as the <!--#config timefmt=formatstring --> element.

    -

    Example

    - SSITimeFormat "%R, %B %d, %Y" -

    +
    SSITimeFormat "%R, %B %d, %Y"
    +

    The above directive would cause times to be displayed in the format "22:26, June 14, 2002".

    @@ -1023,14 +1052,12 @@ displayed Override:All Status:Base Module:mod_include -Compatibility:Available in version 2.0.34 and later.

    This directive changes the string that mod_include displays when a variable is not set and "echoed".

    -

    Example

    - SSIUndefinedEcho "<!-- undef -->" -

    +
    SSIUndefinedEcho "<!-- undef -->"
    +
    top
    @@ -1085,8 +1112,30 @@ set

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_include.html.fr b/docs/manual/mod/mod_include.html.fr new file mode 100644 index 00000000000..bb0b7e61805 --- /dev/null +++ b/docs/manual/mod/mod_include.html.fr @@ -0,0 +1,1225 @@ + + + + + +mod_include - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_include

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    + + + +
    Description:Documents html interprts par le serveur (Server Side +Includes ou SSI)
    Statut:Base
    IdentificateurdeModule:include_module
    FichierSource:mod_include.c
    +

    Sommaire

    + +

    Ce module fournit un filtre qui va traiter les fichiers avant + de les envoyer au client. Le traitement est contrl via des + commentaires SGML spcialement formats, aussi nomms + lments. Ces lments permettent l'insertion + conditionnelle de texte, l'inclusion d'autres fichiers ou + programmes, ainsi que la dfinition et l'affichage de variables + d'environnement.

    +
    + +
    top
    +
    +

    Activation des SSI

    + + +

    Les SSI sont implments par le filtre INCLUDES. Si des + documents contenant des directives SSI possdent une extension + .shtml, les directives suivantes indiqueront Apache de les + interprter et d'assigner le type MIME + text/html au document obtenu :

    + +
    AddType text/html .shtml
    +AddOutputFilter INCLUDES .shtml
    + + +

    L'option suivante doit tre dfinie pour les rpertoires qui + contiennent les fichiers shtml (en gnral dans une section + <Directory>, mais + cette option peut galement tre dfinie dans un fichier + .htaccess si AllowOverride Options a t dfini pour le + rpertoire considr) :

    + +
    Options +Includes
    + + +

    Pour des raisons de compatibilit ascendante, le gestionnaire server-parsed + peut aussi activer le filtre INCLUDES. Ainsi, Apache va activer le + filtre INCLUDES pour tout document de type MIME + text/x-server-parsed-html ou + text/x-server-parsed-html3 (et le document obtenu aura + pour type MIME text/html).

    + +

    Pour plus d'informations, voyez notre Tutoriel SSI.

    +
    top
    +
    +

    PATH_INFO et SSI

    + + +

    Les fichiers traits dans le cadre des SSI n'acceptent plus par + dfaut les requtes avec PATH_INFO (les informations + relatives au chemin en fin de requte). La directive AcceptPathInfo permet de configurer le + serveur de faon ce qu'il accepte ce genre de requte.

    +
    top
    +
    +

    Elments disponibles

    +

    Le document est interprt comme un document HTML, avec des + commandes spciales incluses sous forme de commentaires SGML. La + syntaxe d'une commande est la suivante :

    + +

    + <!--#lment attribut=valeur + attribut=valeur ... --> +

    + +

    Les valeurs sont souvent entoures de guillemets, mais on peut + aussi utiliser des apostrophes (') ou des apostrophes + inverses (`). De nombreuses commandes n'acceptent + qu'une seule paire attribut-valeur. Notez que le terminateur de + commentaire (-->) doit tre prcd d'un espace afin + d'tre sr qu'il ne soit pas considr comme un lment de commande + SSI. Notez aussi que le dlimiteur de dbut <!--# + est un lment de commande et ne doit donc pas contenir + d'espace.

    + +

    La table suivante contient la liste des lments autoriss :

    + + + + + + + + + + + + + + + + + + + + + +
    ElmentDescription
    commentcommentaire SSI
    configconfigure les formats de sortie
    echoaffiche le contenu de variables
    execexcute des programmes externes
    fsizeaffiche la taille d'un fichier
    flastmodaffiche la date de dernire modification d'un fichier
    includeinclut un fichier
    printenvaffiche toutes les variables disponibles
    setdfinit la valeur d'une variable
    + +

    Les lments SSI peuvent tre dfinis par d'autres modules que + mod_include. ce titre, l'lment exec est fourni par + mod_cgi, et ne sera disponible que si ce module est + charg.

    + +

    L'lment comment

    +

    Cette commande n'affiche aucune information. Elle n'a pour but que + l'ajout de commentaires dans un fichier et ces commentaires ne sont pas + affichs.

    + +

    Cette syntaxe est disponible partir de la version 2.4.21 du serveur + HTTP Apache.

    + +

    + <!--#comment Blah Blah Blah --> +

    + + +

    L'lment config

    +

    Cette commande contrle divers aspects de l'interprtation. Les + attributs valides sont :

    + +
    +
    echomsg (Versions 2.1 et suprieures + d'Apache)
    +

    La valeur est un message qui sera envoy au client si + l'lment echo tente + d'afficher le contenu d'une variable non dfinie. Cet attribut + l'emporte sur toute directive SSIUndefinedEcho.

    + +

    + <!--#config echomsg="[Valeur non dfinie]" --> +

    + +
    + +
    errmsg
    +

    La valeur est un message qui sera envoy au client si une + erreur survient lors de l'interprtation du document. Cet attribut + l'emporte sur toute directive SSIErrorMsg.

    + +

    + <!--#config errmsg="[Zut, quelque chose s'est mal pass.]" --> +

    + +
    + +
    sizefmt
    +

    La valeur dfinit l'unit employe lors de l'affichage de la + taille d'un fichier. Les valeurs possibles sont bytes + pour une taille en octets, ou abbrev pour une taille + en Ko ou Mo selon son importance ; par exemple, une taille de 1024 + octets sera affiche sous la forme "1K".

    + +

    + <!--#config sizefmt="abbrev" --> +

    + +
    + +
    timefmt
    +

    La valeur est une chane que pourra utiliser la fonction de la + bibliothque standard strftime(3) lors de l'affichage + des dates.

    + +

    + <!--#config timefmt=""%R, %B %d, %Y"" --> +

    + +
    + +
    + + +

    L'lment echo

    +

    Cette commande affiche le contenu d'une des variables include dfinies ci-dessous. Si + la variable n'est pas dfinie, le rsultat est dtermin par la + valeur de la directive SSIUndefinedEcho. Le format d'affichage des dates est + dfini par l'attribut timefmt de la commande + config.

    + +

    Attributs:

    + +
    +
    var
    +
    La valeur est le nom de la variable afficher.
    + +
    decoding
    +

    Spcifie si Apache doit effectuer un dcodage dans la + variable avant son traitement ultrieur. La valeur par dfaut est + none, et dans ce cas, aucun dcodage n'est effectu. + Si la valeur est url, un dcodage de type URL sera + effectu (il s'agit du codage de type %-encoding utilis dans les + URLs des liens, etc...). Si la valeur est urlencoded, + c'est un dcodage des lments de type + application/x-www-form-urlencode (que l'on trouve dans les chanes + de paramtres) qui sera effectu. Si la valeur est + base64, un + decodage de type base64 sera effectu, et si elle est + entity, c'est un dcodage des entits HTML qui sera + effectu. Ce dcodage est effectu avant tout codage ultrieur de + la variable. Il est possible d'effectuer plusieurs dcodages en + spcifiant plusieurs valeurs spares par des virgules. Les + spcifications de dcodages restent valables jusqu'au prochain + attribut de dcodage, ou la fin de l'lment.

    + +

    Pour tre pris en compte, l'attribut de dcodage + doit prcder l'attribut var correspondant.

    +
    + +
    encoding
    +

    Spcifie la manire dont Apache va coder les caractres + spciaux que la variable contient avant leur affichage. S'il est + dfini none, aucun codage ne sera effectu. S'il + est dfini url, un codage de type URL sera effectu + (aussi connu sous le nom de codage avec caractres % , il convient + pour les URLS des liens, etc...). S'il est dfini + urlencoded, c'est un codage compatible + application/x-www-form-urlencoded qui sera effectu ( utiliser + dans les chanes de paramtres). S'il est dfini + base64, c'est un encodage de type base64 qui sera + effectu. Au dbut d'un lment + echo, la valeur par dfaut est dfinie + entity, ce qui correspond un codage de type entit + (codage qui convient pour un lment HTML de type bloc, comme le + paragraphe d'un texte). Cette valeur par dfaut peut tre modifie + en ajoutant un attribut encoding, qui fera effet + jusqu' la dfinition d'un nouvel attribut encoding + ou la fin de l'lment echo.

    + +

    Pour produire son effet, l'attribut encoding doit + prcder l'attribut var concern.

    + +
    + Afin de prvenir les attaques de type cross-site scripting, il + est recommand de toujours encoder les donnes fournies + par les utilisateurs. +
    + +

    Example

    + <!--#echo encoding="entity" var="QUERY_STRING" --> +

    +
    +
    + + +

    L'lment exec

    +

    La commande exec excute la commande shell ou le + script spcifi. Elle ncessite le chargement du module + mod_cgi. Si Options IncludesNOEXEC est + dfinie, cette commande est dsactive. Les attributs disponibles + sont :

    + +
    +
    cgi
    +

    La valeur spcifie un chemin URL vers le script CGI (encod + avec caractres %). Si le chemin ne commence pas par un slash (/), + il est considr comme relatif au document courant. Le document + rfrenc par ce chemin est invoqu en tant que script CGI, mme + s'il n'est pas cens tre reconnu comme tel par le serveur. Les + scripts CGI doivent cependant tre activs dans le rpertoire qui + contient les scripts (via la directive ScriptAlias ou l'Options ExecCGI).

    + +

    Le PATH_INFO et la chane d'arguments + (QUERY_STRING) de la requte originale du client sont + fournis au script CGI ; ils ne peuvent pas tre spcifis + dans le chemin de l'URL. Le script disposera des variables include + en plus de l'environnement standard CGI.

    + +

    Exemple

    + <!--#exec cgi="/cgi-bin/exemple.cgi" --> +

    + +

    Si, la place d'un flux de sortie, le script renvoie un + en-tte Location:, ce dernier sera traduit en ancrage + HTML.

    + +

    L'lment include + virtual doit tre prfr exec cgi. En + particulier, si vous devez transmettre des arguments + supplmentaires un programme CGI en utilisant la chane + d'arguments de la requte, c'est impossible avec exec + cgi, mais vous pouvez y parvenir avec include + virtual comme suit :

    + +

    + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> +

    +
    + +
    cmd
    +

    Le serveur va excuter la commande fournie en utilisant + /bin/sh. La commande dispose des variables include, en plus du jeu habituel + de variables CGI.

    + +

    Il est toujours prfrable d'utiliser #include virtual la place de + #exec cgi ou #exec cmd. #include + virtual utilise le mcanisme standard des sous-requtes + d'Apache pour inclure des fichiers ou des scripts. Il a fait + l'objet de tests plus approfondis et sa maintenance est mieux + suivie.

    + +

    De plus, sur certaines plate-formes, comme Win32, et sous unix, + si l'on utilise suexec, il est + impossible de transmettre des arguments une commande dans une + directive exec, moins d'insrer des espaces dans la + commande. Ainsi, alors que ce qui suit fonctionnera sous unix avec + une configuration sans suexec, l'effet produit ne sera pas celui + dsir sous Win32, ou dans le cas de l'utilisation de suexec + :

    + +

    + <!--#exec cmd="perl /chemin/vers/script_perl arg1 arg2" --> +

    +
    +
    + + +

    L'lment fsize

    +

    Cette commande permet d'afficher la taille du fichier spcifi + en fonction des spcifications de format de sizefmt. + Attributs :

    + +
    +
    file
    +
    La valeur est le chemin du fichier, relatif au rpertoire + contenant le document en cours d'interprtation. + +

    + Ce fichier a une taille de <!--#fsize file="mod_include.html" + --> octets. +

    + + La valeur de file ne peut pas faire rfrence un + fichier situ un niveau suprieur de l'arborescence du rpertoire + courant ou en dehors de la racine des documents ; il ne peut donc + ni commencer par un slash, ni contenir la squence de caractres + ../. Si c'est le cas, le message d'erreur The + given path was above the root path sera renvoy. +
    + +
    virtual
    +
    La valeur est un chemin URL (cod avec caractres %). S'il ne + commence pas par un slash (/), il est considr comme relatif au + document courant. Notez que cette commande n'affiche pas + la taille de la sortie d'un programme CGI, mais la taille du + programme CGI lui-mme.
    +
    + +

    + Ce fichier a une taille de <!--#fsize + virtual="/docs/mod/mod_include.html" --> octets. +

    + +

    Notez que dans la plupart des cas, ces deux attributs sont + identiques. Cependant, l'attribut file ne respecte + pas les aliases URL-space.

    + + +

    L'lment flastmod

    +

    Cette commande permet d'afficher la date de dernire + modification du fichier spcifi, en fonction des spcifications + de format de timefmt. Les attributs sont les mmes + que ceux de la commande fsize.

    + + +

    L'lment include

    +

    Cette commande permet d'insrer le texte d'un autre document ou + fichier dans le fichier en cours d'interprtation. Tout fichier + inclus est soumis au contrle d'accs habituel. Si Options IncludesNOEXEC + est dfini pour le rpertoire contenant le fichier + interprt, seuls les documents possdant un + type MIME de type texte + (text/plain, text/html, etc...) seront + inclus. Les scripts CGI, quant eux, sont invoqus de manire + habituelle en utilisant l'URL complte fournie avec la commande, y + compris toute chane d'arguments ventuelle.

    + +

    Un attribut dfinit le chemin du document inclure, et peut + apparatre plusieurs fois dans l'lment inclure ; en retour, pour + chaque attribut fourni la commande include, une inclusion est + effectue. Les attributs disponibles sont :

    + +
    +
    file
    +
    La valeur est un chemin relatif au rpertoire contenant le + fichier en cours d'interprtation. Elle ne peut ni contenir + ../, ni tre un chemin absolu. Ainsi, vous ne pouvez + pas inclure de fichiers situs en dehors de l'arborescence du + site web ou dans un niveau suprieur celui du fichier courant + dans cette arborescence. Il est toujours prfrable d'utiliser + l'attribut virtual.
    + +
    virtual
    +

    La valeur est un chemin URL (cod avec caractres %). L'URL + ne peut contenir qu'un chemin et une chane d'arguments + ventuelle, l'exclusion de tout protocole ou nom d'hte. S'il ne + commence pas par un slash (/), il est considr comme relatif au + document courant.

    + +

    Une URL est construite partir de l'attribut, et la sortie que + renverrait le serveur si l'URL tait accde par le client est + incluse dans la sortie interprte. Les inclusions de fichiers + peuvent ainsi tre imbriques.

    + +

    Si l'URL spcifie correspond un programme CGI, le programme + sera excut, et son flux de sortie insr la place de la + directive dans le fichier interprt. Vous pouvez insrer une + chane d'arguments dans une URL correspond un programme CGI + :

    + +

    + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> +

    + +

    include virtual doit tre prfr exec + cgi pour inclure le flux de sortie d'un programme CGI dans + un document HTML.

    + +

    Si la directive KeptBodySize est correctement + dfinie et valide pour le fichier inclus, les tentatives de + requtes POST vers le document HTML qui inclut des fichiers seront + transmises aux sous-requtes en tant que requtes POST + elles-mmes. Sans cette directive, toutes les sous-requtes sont + traites en tant que requtes GET.

    + +
    + +
    onerror
    +

    La valeur est un chemin-URL (cod-%) qui est affich si une + tentative prcdente d'inclure un fichier ou un attribut virtuel a + chou. Pour produire son effet, cet attribut doit tre spcifi + aprs le fichier ou les attributs virtuels concerns. Si la + tentative d'inclure le chemin onerror choue, ou si onerror n'est + pas spcifi, c'est le message d'erreur par dfaut qui sera + inclus.

    + +

    + # Exemple simple
    + <!--#include virtual="/not-exist.html" onerror="/error.html" --> +

    + +

    + # Chemins onerror ddis
    + <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --> +

    + +
    +
    + + +

    L'lment printenv

    +

    Cette commande affiche la liste en mode texte de toutes les variables et de + leurs valeurs. Les caractres spciaux sont encods entity avant + d'tre affichs (se reporter l'lment echo pour plus de dtails). Cette + commande ne comporte pas d'attributs.

    + +

    Exemple

    + <pre> + <!--#printenv --> + </pre> +

    + + +

    L'lment set

    +

    Cette commande permet de dfinir la valeur d'une variable. Les + attributs sont :

    + +
    +
    var
    +
    Le nom de la variable dfinir.
    + +
    value
    +
    La valeur affecter la variable.
    +
    decoding
    +

    Spcifie si Apache doit effectuer un dcodage dans la + variable avant son traitement ultrieur. La valeur par dfaut est + none, et dans ce cas, aucun dcodage n'est effectu. + Si la valeur est url, urlencoded, + base64 ou + entity, c'est un dcodage de type URL, + application/x-www-form-urlencoded, base64 ou + entit HTML qui sera respectivement effectu. Il est possible + d'effectuer plusieurs dcodages en + spcifiant plusieurs valeurs spares par des virgules. Les + spcifications de dcodages restent valables jusqu'au prochain + attribut de dcodage, ou la fin de l'lment. Pour tre pris en + compte, l'attribut de dcodage + doit prcder l'attribut var correspondant.

    +
    + +
    encoding
    +

    Spcifie la manire dont Apache va encoder les caractres + spciaux que la variable contient avant leur affichage. S'il est + dfini none, aucun encodage ne sera effectu. Si la + valeur est url, urlencoding, + base64 ou + entity, c'est un encodage de type URL, + application/x-www-form-urlencoded, base64 ou + entit HTML qui sera respectivement effectu. Il est possible de + spcifier plusieurs types d'encodage en les sparant par des + virgules. La spcification du type d'encodage fera effet + jusqu' la dfinition d'un nouvel attribut encoding + ou la fin de l'lment. Pour produire son effet, l'attribut encoding doit + prcder l'attribut var concern. Les encodages sont + effectus aprs les oprations de dcodage.

    +
    + +
    + +

    Exemple

    + <!--#set var="category" value="help" --> +

    + +
    top
    +
    +

    Variables include

    + + +

    l'instar des variables de l'environnement CGI standard, ces + variables sont mises la disposition de la commande + echo, des oprateurs conditionnels if et + elif, et de tout programme invoqu par le document.

    + +
    +
    DATE_GMT
    +
    La date GMT (Greenwich Mean Time) courante.
    + +
    DATE_LOCAL
    +
    La date locale courante.
    + +
    DOCUMENT_ARGS
    +
    Cette variable contient la chane de paramtres de la requte du + document SSI actif, ou la chane vide si aucune chane de paramtres de + requte n'est incluse. Pour les sous-requtes invoques par la directive + SSI include, QUERY_STRING contiendra la chane + de paramtres de la sous-requte et DOCUMENT_ARGS la chane + de paramtres du document SSI (disponible partir de la version 2.4.19 du + serveur HTTP Apache).
    + +
    DOCUMENT_NAME
    +
    Le nom de base du fichier demand par l'utilisateur (sans son + chemin).
    + +
    DOCUMENT_URI
    +
    Le chemin URL (caractres % dcods) du document demand par + l'utilisateur. Notez que dans le cas d'inclusions de fichiers + imbriques, il ne s'agit pas de l'URL du document + courant. Notez galement que si l'URL est modifie en interne (par + exemple via une directive alias ou directoryindex), c'est l'URL modifie + que contiendra la variable.
    + +
    LAST_MODIFIED
    +
    La date de dernire modification du document demand par + l'utilisateur.
    + +
    QUERY_STRING_UNESCAPED
    +
    Si une chane d'arguments est prsente dans la requte pour le + document SSI actif, elle sera affecte + cette variable, les caractres %-dcods, et ventuellement + chapps pour qu'ils ne soient pas interprts par le + shell (les caractres spciaux comme &,etc... + sont prcds d'anti-slashes). Cette variable n'est pas dfinie si aucune + chane d'arguments n'est prsente. Utilisez DOCUMENT_ARGS si + l'chappement des caractres du shell n'est pas souhait.
    +
    +
    top
    +
    +

    Substitution de variable

    + +

    Une substitution de variable l'intrieur d'une chane entre + guillemets s'effectue dans la plupart des situations o cette + dernire peut raisonablement constituer un argument d'une directive + SSI. Sont concernes les directives config, + exec, flastmod, fsize, + include, echo, et set. Si la + directive SSILegacyExprParser est dfinie + on, la substitution s'effectue aussi dans les arguments + des oprateurs conditionnels. Vous pouvez insrer + un signe dollar en tant que caractre littral dans une chane en + utilisant un anti-slash :

    + +

    + <!--#set var="cur" value="\$test" --> +

    + +

    Si une rfrence de variable doit tre substitue au beau milieu + d'une squence de caractres qui pourrait tre elle-mme considre + comme un identifiant valide, l'ambigut peut tre leve en + entourant la rfrence d'accolades, la manire du shell :

    + +

    + <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> +

    + +

    Dans cet exemple, la variable Zed se verra affecter + la valeur "X_Y" si REMOTE_HOST et + REQUEST_METHOD contiennent respectivement + "X" et "Y".

    + +
    top
    +
    +

    Elments de contrle d'inclusion conditionnelle

    + + +

    Les lments de base du contrle d'inclusion conditionnelle sont + :

    + +

    + <!--#if expr="test_condition" -->
    + <!--#elif expr="test_condition" -->
    + <!--#else -->
    + <!--#endif --> +

    + +

    L'lment if fonctionne de la mme manire que + la directive if d'un langage de programmation. La condition est + value et si le rsultat est vrai, le texte qui suit jusqu'au + prochain lment elif, else ou + endif sera inclus dans le flux de sortie.

    + +

    Les lments elif ou else permettent + d'insrer du texte dans le flux de sortie si + test_condition s'est rvl faux. Ces lments sont + optionnels.

    + +

    L'lment endif termine le bloc de traitement + conditionnel if et est obligatoire.

    + +

    test_condition est une expression boolenne qui + emprunte la syntaxe ap_expr. La directive + SSILegacyExprParser + permet de modifier cette syntaxe pour la rendre compatible avec + Apache HTTPD 2.2.x.

    + +

    Le jeu de variables SSI avec l'lment var sont + exportes vers l'environnement de la requte et sont accessibles via + la fonction reqenv. Pour faire simple, le nom de + fonction v est aussi disponible dans le module + mod_include.

    + +

    Dans l'exemple suivant, "depuis le rseau local" sera affich si + l'adresse IP du client appartient au sous-rseau 10.0.0.0/8.

    + +

    + <!--#if expr='-R "10.0.0.0/8"' -->
    + + depuis le rseau local
    +
    + <!--#else -->
    + + depuis ailleurs
    +
    + <!--#endif --> +

    + +

    Dans l'exemple suivant, "foo vaut bar" sera affich si la variable + foo contient la valeur "bar".

    + +

    + <!--#if expr='v("foo") = "bar"' -->
    + + foo vaut bar
    +
    + <!--#endif --> +

    + +

    Documentation de rfrence

    +

    Voir aussi Les expressions dans le serveur + HTTP Apache pour une rfrence complte et des exemples. Les + fonctions restricted ne sont pas disponibles dans + mod_include.

    +
    +
    top
    +
    +

    Syntaxe des expressions hrite

    + + +

    Cette section dcrit la syntaxe de l'lment #if + expr dans le cas o la directive SSILegacyExprParser est dfinie + on.

    + +
    +
    chane
    +
    vrai si chane n'est pas vide
    + +
    -A string
    +

    vrai si l'URL que contient la chane est accessible du + point de vue de la configuration, faux sinon. Il + s'avre utile lorsqu'un lien vers une URL doit tre cach aux + utilisateurs qui ne sont pas autoriss voir cette URL. Notez que + le test porte sur l'autorisation d'accs l'URL, et non sur son + existence.

    + +

    Exemple

    + <!--#if expr="-A /prive" -->
    + + Cliquez <a href="/prive">ici</a> pour accder aux + informations prives.
    +
    + <!--#endif --> +

    +
    + +
    chane1 = chane2
    + chane1 == chane2
    + chane1 != chane2
    + +

    Compare chane1 chane2. Si + chane2 est de la forme + /chane2/, elle est traite comme une + expression rationnelle. Les expressions rationnelles sont + implmentes par le moteur PCRE + et possdent la mme syntaxe que celles de perl 5. Notez que == + n'est qu'un alias pour = et se comporte exactement de + la mme manire que ce dernier.

    + +

    Si vous faites une comparaison directe (= ou + ==), vous pouvez extraire des parties de l'expression + rationnelle. Les parties extraites sont stockes dans les + variables spciales $1 .. $9. L'ensemble + de la chane correspondant l'expression rationnelle est stock + dans la variable spciale $0.

    + +

    Exemple

    + <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" -->
    + + <!--#set var="session" value="$1" -->
    +
    + <!--#endif --> +

    +
    + +
    chane1 < chane2
    + chane1 <= chane2
    + chane1 > chane2
    + chane1 >= chane2
    + +
    Compare chane1 chane2. Notez que les + chanes sont compares de manire littrale (en utilisant + strcmp(3)). Ainsi, la chane "100" est infrieure + "20".
    + +
    ( test_condition )
    +
    vrai si test_condition est vrai
    + +
    ! test_condition
    +
    vrai si test_condition est faux
    + +
    test_condition1 && + test_condition2
    +
    vrai si test_condition1 et + test_condition2 sont tous les deux vrais
    + +
    test_condition1 || + test_condition2
    +
    vrai si au moins un des tests test_condition1 ou + test_condition2 est vrai
    +
    + +

    "=" et "!=" ont une priorit suprieure + "&&" et "||". "!" a + la priorit la plus haute. Ainsi, les deux directives suivantes sont + quivalentes :

    + +

    + <!--#if expr="$a = test1 && $b = test2" -->
    + <!--#if expr="($a = test1) && ($b = test2)" --> +

    + +

    Les oprateurs boolens && et + || ont la mme priorit. Ainsi, si vous voulez + augmenter la priorit d'un de ces oprateurs, vous devez utiliser + des parenthses.

    + +

    Tout ce qui n'est pas reconnu comme variable ou oprateur est + trait comme une chane. Les chanes peuvent aussi tre entoures + d'apostrophes : 'chane'. Les chanes sans apostrophe + ne peuvent pas contenir d'espaces (espaces ou tabulations) car + ceux-ci servent sparer certains lments comme les variables. Si + plusieurs chanes se trouvent dans une ligne, elles sont concatnes + en utilisant des espaces. Ainsi,

    + +

    chane1    chane2 devient chane1 chane2
    +
    + et
    +
    + 'chane1    chane2' devient chane1    chane2.

    + +

    Optimisation des expressions boolennes

    +

    Si les expressions atteignent une complexit suffisante pour + ralentir les traitements de manire significative, vous pouvez + essayer de les optimiser en fonction des rgles d'valuation :

    +
      +
    • Les expressions sont values de la gauche vers la droite
    • +
    • Les oprateurs boolens binaires (&& et + ||) font l'objet d'une valuation abrge chaque fois + que cela est possible. En d'autres termes, et selon la rgle + ci-dessus, mod_include value tout d'abord la + partie gauche de l'expression. Si le rsultat de l'valuation de + cette partie gauche suffit dterminer le rsultat final, + l'valuation s'arrte ici. Dans le cas contraire, la partie droite + est value, et le rsultat final tient compte des rsultats des + valuations des parties gauche et droite.
    • +
    • L'valuation abrge est dsactive tant qu'il reste des + expressions rgulires traiter. Ces dernires doivent tre + values afin de dfinir les variables correspondant aux + rfrences arrires ($1 .. $9).
    • +
    +

    Si vous voulez dterminer la manire dont une expression est + traite, vous pouvez recompiler mod_include en + utilisant l'option de compilation -DDEBUG_INCLUDE. + Ceci a pour effet d'insrer, pour chaque expression interprte, + des informations tiquetes, l'arbre d'interprtation et la + manire dont elle est value au sein du flux de sortie envoy au + client.

    +
    + +

    Slashes d'chappement dans les expressions + rationnelles

    +

    Tous les caractres slashes qui ne sont pas des sparateurs dans + votre expression rationnelle doivent tre chapps, et ceci sans + tenir compte de leur signification du point de vue du moteur + d'expressions rationnelles.

    +
    + +

    Documentation de rfrence

    +

    Voir le document Les expressions dans le + serveur HTTP Apache, pour une rfrence complte et des exemples.

    +
    + + +
    +
    top
    +

    Directive SSIEndTag

    + + + + + + + +
    Description:Chane qui termine l'lment include
    Syntaxe:SSIEndTag tag
    Dfaut:SSIEndTag "-->"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_include
    +

    Cette directive permet de modifier la chane que + mod_include interprte comme la fin d'un lment + include.

    + +
    SSIEndTag "%>"
    + + + +

    Voir aussi

    + +
    +
    top
    +

    Directive SSIErrorMsg

    + + + + + + + + +
    Description:Message d'erreur affich lorsqu'une erreur SSI +survient
    Syntaxe:SSIErrorMsg message
    Dfaut:SSIErrorMsg "[an error occurred while processing this +directive]"
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Base
    Module:mod_include
    +

    La directive SSIErrorMsg permet de + modifier le message d'erreur affich lorsqu'une erreur SSI survient. + Pour les serveurs en production, il est recommand de modifier le + message d'erreur par dfaut en "<!-- Error + -->", de faon ce que le message ne soit pas + prsent l'utilisateur.

    + +

    Cette directive a le mme effet que l'lment + <!--#config errmsg=message -->.

    + +
    SSIErrorMsg "<!-- Error -->"
    + + +
    +
    top
    +

    Directive SSIETag

    + + + + + + + + +
    Description:Dfinit si des en-ttes ETags sont gnrs par le serveur.
    Syntaxe:SSIETag on|off
    Dfaut:SSIETag off
    Contexte:rpertoire, .htaccess
    Statut:Base
    Module:mod_include
    Compatibilit:Disponible partir de la version 2.2.15 du serveur HTTP +Apache.
    +

    Dans le cas gnral, un fichier filtr par + mod_include peut contenir des lments soit + gnrs dynamiquement, soit ventuellement modifis indpendemment + du fichier original. En consquence, il est demand par dfaut au + serveur de ne pas gnrer d'en-tte ETag la rponse + en ajoutant no-etag aux informations de requte.

    + +

    Ce comportement peut tre modifi via la directive + SSIETag qui permet au serveur de gnrer un + en-tte ETag. On peut aussi l'utiliser pour la mise + en cache de la sortie. Notez qu'un serveur d'arrire-plan ou un + gnrateur de contenu dynamique peut lui-mme gnrer un en-tte + ETag, en ignorant l'information no-etag, + cet en-tte ETag tant transmis par + mod_include sans tenir compte de la dfinition de + la prsente directive. La directive SSIETag + peut prendre une des valeurs suivantes :

    + +
    + +
    off
    +
    no-etag sera ajout aux informations de + requte, et il sera demand au serveur de ne pas gnrer + d'en-tte ETag. Lorsqu'un serveur ignore la valeur + de no-etag et gnre tout de mme un en-tte + ETag, ce dernier sera respect.
    + +
    on
    +
    Les en-ttes ETag existants seront respects, + et ceux gnrs par le serveur seront ajouts la rponse.
    + +
    + + +
    +
    top
    +

    Directive SSILastModified

    + + + + + + + + +
    Description:Dfinit si des en-ttes Last-Modified sont +gnrs par le serveur.
    Syntaxe:SSILastModified on|off
    Dfaut:SSILastModified off
    Contexte:rpertoire, .htaccess
    Statut:Base
    Module:mod_include
    Compatibilit:Disponible partir de la version 2.2.15 du serveur HTTP +Apache.
    +

    Dans le cas gnral, un fichier filtr par + mod_include peut contenir des lments soit + gnrs dynamiquement, soit ventuellement modifis indpendemment + du fichier original. En consquence, l'en-tte + Last-Modified est supprim par dfaut de la rponse.

    + +

    La directive SSILastModified permet de + modifier ce comportement en faisant en sorte que l'en-tte + Last-Modified soit respect s'il est dj prsent, ou + dfini dans le cas contraire. On peut aussi l'utiliser pour la mise + en cache de la sortie. La directive + SSILastModified peut prendre une des + valeurs suivantes :

    + +
    + +
    off
    +
    L'en-tte Last-Modified sera supprim des + rponses, moins que la directive XBitHack ne soit dfinie + full comme dcrit plus loin.
    + +
    on
    +
    L'en-tte Last-Modified sera respect s'il est + dj prsent, et ajout la rponse si cette dernire est un + fichier et si l'en-tte est manquant. La directive SSILastModified l'emporte sur + la directive XBitHack.
    + +
    + + +
    +
    top
    +

    Directive SSILegacyExprParser

    + + + + + + + + +
    Description:Active le mode de compatibilit pour les expressions +conditionnelles.
    Syntaxe:SSILegacyExprParser on|off
    Dfaut:SSILegacyExprParser off
    Contexte:rpertoire, .htaccess
    Statut:Base
    Module:mod_include
    Compatibilit:Disponible partir de la version 2.3.13.
    +

    Depuis la version 2.3.13, mod_include a adopt + la nouvelle syntaxe ap_expr pour ses + expressions conditionnelles dans les lments de contrle de flux + #if. Cette directive permet de ractiver l'ancienne syntaxe qui est compatible avec les + versions 2.2.x et antrieures d'Apache HTTPD. +

    + +
    +
    top
    +

    Directive SSIStartTag

    + + + + + + + +
    Description:Chane qui marque le dbut d'un lment +include
    Syntaxe:SSIStartTag tag
    Dfaut:SSIStartTag "<!--#"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_include
    +

    Cette directive permet de modifier la chane que + mod_include interprte comme le dbut d'un lment + include.

    + +

    Cette option peut vous tre utile si vous avez deux serveurs qui + interprtent un fichier avec des commandes diffrentes (et + ventuellement des moments diffrents).

    + +
    SSIStartTag "<%"
    +SSIEndTag   "%>"
    + + +

    Avec l'exemple ci-dessus, qui dfinit aussi une directive + SSIEndTag, vous pourrez + inscrire des directives SSI comme dans l'exemple suivant :

    + +

    Directives SSI avec marques de dbut et de fin + personnalises

    + <%printenv %> +

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive SSITimeFormat

    + + + + + + + + +
    Description:Configuration du format d'affichage des dates
    Syntaxe:SSITimeFormat chane de formatage
    Dfaut:SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z"
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Base
    Module:mod_include
    +

    Cette directive permet de modifier le format d'affichage des +variables d'environnement DATE. La chane de +formatage est identique celle de la fonction +strftime(3) de la bibliothque C standard.

    + +

    Cette directive a le mme effet que l'lment + <!--#config timefmt=chane de formatage + -->.

    + +
    SSITimeFormat "%R, %B %d, %Y"
    + + +

    Avec l'exemple ci-dessus, les dates seront affiches dans le + style "22:26, June 14, 2002".

    + +
    +
    top
    +

    Directive SSIUndefinedEcho

    + + + + + + + + +
    Description:Chane afficher lorsqu'on tente d'extraire le contenu +d'une variable non dfinie
    Syntaxe:SSIUndefinedEcho chane
    Dfaut:SSIUndefinedEcho "(none)"
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Base
    Module:mod_include
    +

    Cette directive permet de modifier la chane affiche par + mod_include lorsqu'on tente d'extraire le contenu + d'une variable non dfinie.

    + +
    SSIUndefinedEcho "<!-- nondef -->"
    + + +
    +
    top
    +

    Directive XBitHack

    + + + + + + + + +
    Description:Interprte les directives SSI dans les fichiers dont le bit +d'excution est positionn
    Syntaxe:XBitHack on|off|full
    Dfaut:XBitHack off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_include
    +

    La directive XBitHack permet de contrler + l'interprtation des documents html standards. Elle n'affecte que + les fichiers dont le type MIME est + text/html. XBitHack peut prendre + les valeurs suivantes :

    + +
    +
    off
    +
    Aucun traitement particulier pour les fichiers + excutables.
    + +
    on
    +
    Tout fichier text/html dont le bit d'excution + est positionn pour le propritaire sera trait en tant que + document html interprt par le serveur.
    + +
    full
    +
    Identique on, avec test du bit d'excution pour + le groupe. Si ce dernier est positionn, la date de dernire + modification du fichier renvoy est dfinie la date de + dernire modification du fichier. Dans le cas contraire, aucune + date de dernire modification n'est renvoye. Le positionnement de + ce bit permet aux clients et aux mandataires de grer la mise en + cache du rsultat de la requte. + +

    Note

    +

    Il est recommand de n'utiliser l'option full que dans le cas + o vous tes certain que le bit d'excution du groupe est non + positionn pour les scripts SSI qui pourraient effectuer l'#include d'un programme CGI ou bien produire des sorties + diffrentes chaque accs (ou seraient susceptibles d'tre + modifies au cours des requtes ultrieures).

    + +

    Lorsqu'elle est dfinie on, la directive + SSILastModified + l'emporte sur la directive XBitHack.

    +
    + +
    +
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_include.html.ja.utf8 b/docs/manual/mod/mod_include.html.ja.utf8 index 9fcf7b5e432..65dbb0ad574 100644 --- a/docs/manual/mod/mod_include.html.ja.utf8 +++ b/docs/manual/mod/mod_include.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_include - Apache HTTP サーバ +mod_include - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_include

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -40,9 +47,16 @@ プログラムの出力の取り込み、環境変数の設定や表示を行なうことが できます。

    -
    top

    Server-Side Includes を有効にする

    @@ -643,34 +649,6 @@ エスケープしなければなりません。 正規表現の意味がどうであろうとエスケープは必要です。

    - -
    top
    -
    説明:サーバがパースする html ドキュメント (Server Side Includes)
    ステータス:Base
    モジュール識別子:include_module
    - - - - - - -
    説明:条件分岐フローの制御で -A フラグが使えるようにする
    構文:SSIAccessEnable on|off
    デフォルト:SSIAccessEnable off
    コンテキスト:ディレクトリ, .htaccess
    ステータス:Base
    モジュール:mod_include
    -

    SSIAccessEnable ディレクティブを使って、 - 条件分岐フローの制御で -A 検査が使えるようにします。 - SSIAccessEnable は次の値を引数にとります:

    - -
    - -
    off
    -
    <!--#if expr="-A /foo"--> では文字列や正規表現として - 解釈され、-A は特別な意味は持ちません。
    - -
    on
    -
    <!--#if expr="-A /foo"--> では、設定上 URL /foo - にアクセスできない場合 false で、アクセスできる場合は true
    - -
    - -
    top

    SSIEndTag ディレクティブ

    @@ -733,9 +711,9 @@ directive]"
    ステータス:Base モジュール:mod_include 互換性:Available in version 2.2.15 and later. -

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    SSILastModified ディレクティブ

    @@ -747,9 +725,9 @@ server. -
    ステータス:Base
    モジュール:mod_include
    互換性:Available in version 2.2.15 and later.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    SSILegacyExprParser ディレクティブ

    @@ -760,9 +738,9 @@ server. -
    ステータス:Base
    モジュール:mod_include
    互換性:Available in version 2.3.13 and later.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    SSIStartTag ディレクティブ

    @@ -893,9 +871,31 @@ server.
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_include.xml b/docs/manual/mod/mod_include.xml index 586e3d19c71..4f0cf52d018 100644 --- a/docs/manual/mod/mod_include.xml +++ b/docs/manual/mod/mod_include.xml @@ -27,8 +27,6 @@ Basemod_include.cinclude_module -Implemented as an output filter since Apache -2.0

    This module provides a filter which will process files @@ -53,10 +51,10 @@ parse them and assign the resulting document the mime type of text/html:

    - - AddType text/html .shtml
    - AddOutputFilter INCLUDES .shtml -
    + +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml +

    The following directive must be given for the directories containing the shtml files (typically in a @@ -65,9 +63,9 @@ AllowOverride Options is set):

    - - Options +Includes - + +Options +Includes +

    For backwards compatibility, the server-parsed handler also activates the @@ -91,7 +89,7 @@ configure the server to accept requests with PATH_INFO.

    -
    Basic Elements +
    Available Elements

    The document is parsed as an HTML document, with special commands embedded as SGML comments. A command has the syntax:

    @@ -112,6 +110,8 @@
    + + @@ -136,34 +136,67 @@ mod_cgi, and will only be available if this module is loaded.

    +
    The comment Element +

    This command doesn't output anything. Its only use is to + add comments within a file. These comments are not printed.

    + +

    This syntax is available in version 2.4.21 and later.

    + + + <!--#comment Blah Blah Blah --> + +
    +
    The config Element

    This command controls various aspects of the parsing. The valid attributes are:

    echomsg (Apache 2.1 and later)
    -
    The value is a message that is sent back to the +

    The value is a message that is sent back to the client if the echo element attempts to echo an undefined variable. This overrides any SSIUndefinedEcho directives.

    + module="mod_include">SSIUndefinedEcho directives.

    + + + <!--#config echomsg="[Value Undefined]" --> + +
    errmsg
    -
    The value is a message that is sent back to the +

    The value is a message that is sent back to the client if an error occurs while parsing the document. This overrides any SSIErrorMsg directives.

    + module="mod_include">SSIErrorMsg directives.

    + + + <!--#config errmsg="[Oops, something broke.]" --> + +
    sizefmt
    -
    The value sets the format to be used when displaying +

    The value sets the format to be used when displaying the size of a file. Valid values are bytes for a count in bytes, or abbrev for a count in Kb or Mb as appropriate, for example a size of 1024 bytes - will be printed as "1K".

    + will be printed as "1K".

    + + + <!--#config sizefmt="abbrev" --> + + +
    timefmt
    -
    The value is a string to be used by the +

    The value is a string to be used by the strftime(3) library routine when printing - dates.

    + dates.

    + + + <!--#config timefmt=""%R, %B %d, %Y"" --> + + +
    @@ -225,6 +258,10 @@ In order to avoid cross-site scripting issues, you should always encode user supplied data. + + Example + <!--#echo encoding="entity" var="QUERY_STRING" --> + @@ -308,7 +345,18 @@
    file
    The value is a path relative to the directory - containing the current document being parsed.
    + containing the current document being parsed. + + + This file is <!--#fsize file="mod_include.html" --> bytes. + + + The value of file cannot start with a slash + (/), nor can it contain ../ so as to + refer to a file above the current directory or outside of the + document root. Attempting to so will result in the error message: + The given path was above the root path. +
    virtual
    The value is a (%-encoded) URL-path. If it does not begin with @@ -316,6 +364,14 @@ Note, that this does not print the size of any CGI output, but the size of the CGI script itself.
    + + + This file is <!--#fsize virtual="/docs/mod/mod_include.html" --> bytes. + + +

    Note that in many cases these two are exactly the same thing. + However, the file attribute doesn't respect URL-space + aliases.

    The flastmod Element @@ -406,13 +462,15 @@
    The printenv Element -

    This prints out a listing of all existing variables and +

    This prints out a plain text listing of all existing variables and their values. Special characters are entity encoded (see the echo element for details) before being output. There are no attributes.

    Example - <!--#printenv --> + <pre> + <!--#printenv --> + </pre>
    @@ -480,6 +538,16 @@
    DATE_LOCAL
    The current date in the local time zone.
    +
    DOCUMENT_ARGS
    +
    This variable contains the query string of the active SSI + document, or the empty string if a query string is not + included. For subrequests invoked through the + include SSI directive, QUERY_STRING + will represent the query string of the subrequest and + DOCUMENT_ARGS will represent the query string of + the SSI document. (Available in Apache HTTP Server 2.4.19 and + later.)
    +
    DOCUMENT_NAME
    The filename (excluding directories) of the document requested by the user.
    @@ -498,10 +566,13 @@ the user.
    QUERY_STRING_UNESCAPED
    -
    If a query string is present, this variable contains the - (%-decoded) query string, which is escaped for shell - usage (special characters like & etc. are - preceded by backslashes).
    +
    If a query string is present in the request for the active + SSI document, this variable contains the (%-decoded) query + string, which is escaped for shell usage (special + characters like & etc. are preceded by + backslashes). It is not set if a query string is not + present. Use DOCUMENT_ARGS if shell escaping + is not desired.
    @@ -514,7 +585,7 @@ include, echo, and set directives. If SSILegacyExprParser is set to on, - substitution also occures in the arguments to conditional operators. + substitution also occurs in the arguments to conditional operators. You can insert a literal dollar sign into the string using backslash quoting:

    @@ -563,7 +634,7 @@

    The endif element ends the if element and is required.

    -

    test_condition is a boolean expression tha follows the +

    test_condition is a boolean expression which follows the ap_expr syntax. The syntax can be changed to be compatible with Apache HTTPD 2.2.x using SSILegacyExprParser.

    @@ -619,12 +690,10 @@
    -A string

    true if the URL represented by the string is accessible by - configuration, false otherwise. This test only has an effect if - SSIAccessEnable is on. This is useful - where content on a page is to be hidden from users who are not - authorized to view the URL, such as a link to that URL. Note - that the URL is only tested for whether access would be granted, - not whether the URL exists.

    + configuration, false otherwise. This is useful where content on a + page is to be hidden from users who are not authorized to view the + URL, such as a link to that URL. Note that the URL is only tested + for whether access would be granted, not whether the URL exists.

    Example <!--#if expr="-A /private" -->
    @@ -760,15 +829,14 @@ SSIEndTag "-->" server configvirtual host -Available in version 2.0.30 and later.

    This directive changes the string that mod_include looks for to mark the end of an include element.

    - Example - SSIEndTag "%>" - + +SSIEndTag "%>" +
    SSIStartTag @@ -782,15 +850,14 @@ server configvirtual host directory.htaccess All -Available in version 2.0.34 and later.

    This directive changes the string that mod_include displays when a variable is not set and "echoed".

    - Example - SSIUndefinedEcho "<!-- undef -->" - + +SSIUndefinedEcho "<!-- undef -->" +
    @@ -804,7 +871,6 @@ directive]" server configvirtual host directory.htaccess All -Available in version 2.0.30 and later.

    The SSIErrorMsg directive changes the error @@ -816,9 +882,9 @@ directive]"

    This directive has the same effect as the <!--#config errmsg=message --> element.

    - Example - SSIErrorMsg "<!-- Error -->" - + +SSIErrorMsg "<!-- Error -->" +
    @@ -829,7 +895,6 @@ directive]" SSIStartTag "<!--#" server configvirtual host -Available in version 2.0.30 and later.

    This directive changes the string that mod_include @@ -839,10 +904,10 @@ directive]" output of a file each processing different commands (possibly at different times).

    - Example - SSIStartTag "<%"
    - SSIEndTag "%>" -
    + +SSIStartTag "<%" +SSIEndTag "%>" +

    The example given above, which also specifies a matching SSIEndTag, will @@ -866,7 +931,6 @@ displayed server configvirtual host directory.htaccess All -Available in version 2.0.30 and later.

    This directive changes the format in which date strings are displayed @@ -877,49 +941,15 @@ displayed

    This directive has the same effect as the <!--#config timefmt=formatstring --> element.

    - Example - SSITimeFormat "%R, %B %d, %Y" - + +SSITimeFormat "%R, %B %d, %Y" +

    The above directive would cause times to be displayed in the format "22:26, June 14, 2002".

    - -SSIAccessEnable -Enable the -A flag in legacy conditional expressions. -SSIAccessEnable on|off -SSIAccessEnable off -directory.htaccess - - - SSIAccessEnable has no effect unless - SSILegacyExprParser is set to - on. - - -

    The SSIAccessEnable directive controls whether - the -A test is enabled during conditional flow control processing when - using the 2.2.x compatible expression parser. - SSIAccessEnable can take on the following values:

    - -
    - -
    off
    -
    <!--#if expr="-A /foo"--> will be interpreted as a series - of string and regular expression tokens, the -A has no special - meaning.
    - -
    on
    -
    <!--#if expr="-A /foo"--> will evaluate to false if the - URL /foo is inaccessible by configuration, or true otherwise.
    - -
    - -
    -
    - SSIETag Controls whether ETags are generated by the server. @@ -1070,4 +1100,3 @@ set - diff --git a/docs/manual/mod/mod_include.xml.fr b/docs/manual/mod/mod_include.xml.fr new file mode 100644 index 00000000000..e04d43c57ae --- /dev/null +++ b/docs/manual/mod/mod_include.xml.fr @@ -0,0 +1,1203 @@ + + + + + + + + + + + +mod_include +Documents html interprétés par le serveur (Server Side +Includes ou SSI) +Base +mod_include.c +include_module + + +

    Ce module fournit un filtre qui va traiter les fichiers avant + de les envoyer au client. Le traitement est contrôlé via des + commentaires SGML spécialement formatés, aussi nommés + éléments. Ces éléments permettent l'insertion + conditionnelle de texte, l'inclusion d'autres fichiers ou + programmes, ainsi que la définition et l'affichage de variables + d'environnement.

    +
    +Options +AcceptPathInfo +Les filtres +Tutoriel SSI + +
    + Activation des SSI + +

    Les SSI sont implémentés par le filtre INCLUDES. Si des + documents contenant des directives SSI possèdent une extension + .shtml, les directives suivantes indiqueront à Apache de les + interpréter et d'assigner le type MIME + text/html au document obtenu :

    + + +AddType text/html .shtml +AddOutputFilter INCLUDES .shtml + + +

    L'option suivante doit être définie pour les répertoires qui + contiennent les fichiers shtml (en général dans une section + Directory, mais + cette option peut également être définie dans un fichier + .htaccess si AllowOverride Options a été défini pour le + répertoire considéré) :

    + + + Options +Includes + + +

    Pour des raisons de compatibilité ascendante, le gestionnaire server-parsed + peut aussi activer le filtre INCLUDES. Ainsi, Apache va activer le + filtre INCLUDES pour tout document de type MIME + text/x-server-parsed-html ou + text/x-server-parsed-html3 (et le document obtenu aura + pour type MIME text/html).

    + +

    Pour plus d'informations, voyez notre Tutoriel SSI.

    +
    + +
    + PATH_INFO et SSI + +

    Les fichiers traités dans le cadre des SSI n'acceptent plus par + défaut les requêtes avec PATH_INFO (les informations + relatives au chemin en fin de requête). La directive AcceptPathInfo permet de configurer le + serveur de façon à ce qu'il accepte ce genre de requête.

    +
    + +
    Eléments disponibles +

    Le document est interprété comme un document HTML, avec des + commandes spéciales incluses sous forme de commentaires SGML. La + syntaxe d'une commande est la suivante :

    + + + <!--#élément attribut=valeur + attribut=valeur ... --> + + +

    Les valeurs sont souvent entourées de guillemets, mais on peut + aussi utiliser des apostrophes (') ou des apostrophes + inverses (`). De nombreuses commandes n'acceptent + qu'une seule paire attribut-valeur. Notez que le terminateur de + commentaire (-->) doit être précédé d'un espace afin + d'être sûr qu'il ne soit pas considéré comme un élément de commande + SSI. Notez aussi que le délimiteur de début <!--# + est un élément de commande et ne doit donc pas contenir + d'espace.

    + +

    La table suivante contient la liste des éléments autorisés :

    + +
    ElementDescription
    commentSSI comment
    config configure output formats
    echo
    + + + + + + + + + + + + + + + + + + + +
    ElémentDescription
    commentcommentaire SSI
    configconfigure les formats de sortie
    echoaffiche le contenu de variables
    execexécute des programmes externes
    fsizeaffiche la taille d'un fichier
    flastmodaffiche la date de dernière modification d'un fichier
    includeinclut un fichier
    printenvaffiche toutes les variables disponibles
    setdéfinit la valeur d'une variable
    + +

    Les éléments SSI peuvent être définis par d'autres modules que + mod_include. À ce titre, l'élément exec est fourni par + mod_cgi, et ne sera disponible que si ce module est + chargé.

    + +
    L'élément comment +

    Cette commande n'affiche aucune information. Elle n'a pour but que + l'ajout de commentaires dans un fichier et ces commentaires ne sont pas + affichés.

    + +

    Cette syntaxe est disponible à partir de la version 2.4.21 du serveur + HTTP Apache.

    + + + <!--#comment Blah Blah Blah --> + +
    + +
    L'élément config +

    Cette commande contrôle divers aspects de l'interprétation. Les + attributs valides sont :

    + +
    +
    echomsg (Versions 2.1 et supérieures + d'Apache)
    +

    La valeur est un message qui sera envoyé au client si + l'élément echo tente + d'afficher le contenu d'une variable non définie. Cet attribut + l'emporte sur toute directive SSIUndefinedEcho.

    + + + <!--#config echomsg="[Valeur non définie]" --> + + +
    + +
    errmsg
    +

    La valeur est un message qui sera envoyé au client si une + erreur survient lors de l'interprétation du document. Cet attribut + l'emporte sur toute directive SSIErrorMsg.

    + + + <!--#config errmsg="[Zut, quelque chose s'est mal passé.]" --> + + +
    + +
    sizefmt
    +

    La valeur définit l'unité employée lors de l'affichage de la + taille d'un fichier. Les valeurs possibles sont bytes + pour une taille en octets, ou abbrev pour une taille + en Ko ou Mo selon son importance ; par exemple, une taille de 1024 + octets sera affichée sous la forme "1K".

    + + + <!--#config sizefmt="abbrev" --> + + +
    + +
    timefmt
    +

    La valeur est une chaîne que pourra utiliser la fonction de la + bibliothèque standard strftime(3) lors de l'affichage + des dates.

    + + + <!--#config timefmt=""%R, %B %d, %Y"" --> + + +
    + +
    +
    + +
    L'élément echo +

    Cette commande affiche le contenu d'une des variables include définies ci-dessous. Si + la variable n'est pas définie, le résultat est déterminé par la + valeur de la directive SSIUndefinedEcho. Le format d'affichage des dates est + défini par l'attribut timefmt de la commande + config.

    + +

    Attributs:

    + +
    +
    var
    +
    La valeur est le nom de la variable à afficher.
    + +
    decoding
    +

    Spécifie si Apache doit effectuer un décodage dans la + variable avant son traitement ultérieur. La valeur par défaut est + none, et dans ce cas, aucun décodage n'est effectué. + Si la valeur est url, un décodage de type URL sera + effectué (il s'agit du codage de type %-encoding utilisé dans les + URLs des liens, etc...). Si la valeur est urlencoded, + c'est un décodage des éléments de type + application/x-www-form-urlencode (que l'on trouve dans les chaînes + de paramètres) qui sera effectué. Si la valeur est + base64, un + decodage de type base64 sera effectué, et si elle est + entity, c'est un décodage des entités HTML qui sera + effectué. Ce décodage est effectué avant tout codage ultérieur de + la variable. Il est possible d'effectuer plusieurs décodages en + spécifiant plusieurs valeurs séparées par des virgules. Les + spécifications de décodages restent valables jusqu'au prochain + attribut de décodage, ou la fin de l'élément.

    + +

    Pour être pris en compte, l'attribut de décodage + doit précéder l'attribut var correspondant.

    +
    + +
    encoding
    +

    Spécifie la manière dont Apache va coder les caractères + spéciaux que la variable contient avant leur affichage. S'il est + défini à none, aucun codage ne sera effectué. S'il + est défini à url, un codage de type URL sera effectué + (aussi connu sous le nom de codage avec caractères % , il convient + pour les URLS des liens, etc...). S'il est défini à + urlencoded, c'est un codage compatible + application/x-www-form-urlencoded qui sera effectué (à utiliser + dans les chaînes de paramètres). S'il est défini à + base64, c'est un encodage de type base64 qui sera + effectué. Au début d'un élément + echo, la valeur par défaut est définie à + entity, ce qui correspond à un codage de type entité + (codage qui convient pour un élément HTML de type bloc, comme le + paragraphe d'un texte). Cette valeur par défaut peut être modifiée + en ajoutant un attribut encoding, qui fera effet + jusqu'à la définition d'un nouvel attribut encoding + ou la fin de l'élément echo.

    + +

    Pour produire son effet, l'attribut encoding doit + précéder l'attribut var concerné.

    + + + Afin de prévenir les attaques de type cross-site scripting, il + est recommandé de toujours encoder les données fournies + par les utilisateurs. + + + Example + <!--#echo encoding="entity" var="QUERY_STRING" --> + +
    +
    +
    + +
    L'élément exec +

    La commande exec exécute la commande shell ou le + script spécifié. Elle nécessite le chargement du module + mod_cgi. Si Options IncludesNOEXEC est + définie, cette commande est désactivée. Les attributs disponibles + sont :

    + +
    +
    cgi
    +

    La valeur spécifie un chemin URL vers le script CGI (encodé + avec caractères %). Si le chemin ne commence pas par un slash (/), + il est considéré comme relatif au document courant. Le document + référencé par ce chemin est invoqué en tant que script CGI, même + s'il n'est pas censé être reconnu comme tel par le serveur. Les + scripts CGI doivent cependant être activés dans le répertoire qui + contient les scripts (via la directive ScriptAlias ou l'Options ExecCGI).

    + +

    Le PATH_INFO et la chaîne d'arguments + (QUERY_STRING) de la requête originale du client sont + fournis au script CGI ; ils ne peuvent pas être spécifiés + dans le chemin de l'URL. Le script disposera des variables include + en plus de l'environnement standard CGI.

    + + Exemple + <!--#exec cgi="/cgi-bin/exemple.cgi" --> + + +

    Si, à la place d'un flux de sortie, le script renvoie un + en-tête Location:, ce dernier sera traduit en ancrage + HTML.

    + +

    L'élément include + virtual doit être préféré à exec cgi. En + particulier, si vous devez transmettre des arguments + supplémentaires à un programme CGI en utilisant la chaîne + d'arguments de la requête, c'est impossible avec exec + cgi, mais vous pouvez y parvenir avec include + virtual comme suit :

    + + + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> + +
    + +
    cmd
    +

    Le serveur va exécuter la commande fournie en utilisant + /bin/sh. La commande dispose des variables include, en plus du jeu habituel + de variables CGI.

    + +

    Il est toujours préférable d'utiliser #include virtual à la place de + #exec cgi ou #exec cmd. #include + virtual utilise le mécanisme standard des sous-requêtes + d'Apache pour inclure des fichiers ou des scripts. Il a fait + l'objet de tests plus approfondis et sa maintenance est mieux + suivie.

    + +

    De plus, sur certaines plate-formes, comme Win32, et sous unix, + si l'on utilise suexec, il est + impossible de transmettre des arguments à une commande dans une + directive exec, à moins d'insérer des espaces dans la + commande. Ainsi, alors que ce qui suit fonctionnera sous unix avec + une configuration sans suexec, l'effet produit ne sera pas celui + désiré sous Win32, ou dans le cas de l'utilisation de suexec + :

    + + + <!--#exec cmd="perl /chemin/vers/script_perl arg1 arg2" --> + +
    +
    +
    + +
    L'élément fsize +

    Cette commande permet d'afficher la taille du fichier spécifié + en fonction des spécifications de format de sizefmt. + Attributs :

    + +
    +
    file
    +
    La valeur est le chemin du fichier, relatif au répertoire + contenant le document en cours d'interprétation. + + + Ce fichier a une taille de <!--#fsize file="mod_include.html" + --> octets. + + + La valeur de file ne peut pas faire référence à un + fichier situé à un niveau supérieur de l'arborescence du répertoire + courant ou en dehors de la racine des documents ; il ne peut donc + ni commencer par un slash, ni contenir la séquence de caractères + ../. Si c'est le cas, le message d'erreur The + given path was above the root path sera renvoyé. +
    + +
    virtual
    +
    La valeur est un chemin URL (codé avec caractères %). S'il ne + commence pas par un slash (/), il est considéré comme relatif au + document courant. Notez que cette commande n'affiche pas + la taille de la sortie d'un programme CGI, mais la taille du + programme CGI lui-même.
    +
    + + + Ce fichier a une taille de <!--#fsize + virtual="/docs/mod/mod_include.html" --> octets. + + +

    Notez que dans la plupart des cas, ces deux attributs sont + identiques. Cependant, l'attribut file ne respecte + pas les aliases URL-space.

    +
    + +
    L'élément flastmod +

    Cette commande permet d'afficher la date de dernière + modification du fichier spécifié, en fonction des spécifications + de format de timefmt. Les attributs sont les mêmes + que ceux de la commande fsize.

    +
    + +
    L'élément include +

    Cette commande permet d'insérer le texte d'un autre document ou + fichier dans le fichier en cours d'interprétation. Tout fichier + inclus est soumis au contrôle d'accès habituel. Si Options IncludesNOEXEC + est défini pour le répertoire contenant le fichier + interprété, seuls les documents possèdant un + type MIME de type texte + (text/plain, text/html, etc...) seront + inclus. Les scripts CGI, quant à eux, sont invoqués de manière + habituelle en utilisant l'URL complète fournie avec la commande, y + compris toute chaîne d'arguments éventuelle.

    + +

    Un attribut définit le chemin du document à inclure, et peut + apparaître plusieurs fois dans l'élément à inclure ; en retour, pour + chaque attribut fourni à la commande include, une inclusion est + effectuée. Les attributs disponibles sont :

    + +
    +
    file
    +
    La valeur est un chemin relatif au répertoire contenant le + fichier en cours d'interprétation. Elle ne peut ni contenir + ../, ni être un chemin absolu. Ainsi, vous ne pouvez + pas inclure de fichiers situés en dehors de l'arborescence du + site web ou dans un niveau supérieur à celui du fichier courant + dans cette arborescence. Il est toujours préférable d'utiliser + l'attribut virtual.
    + +
    virtual
    +

    La valeur est un chemin URL (codé avec caractères %). L'URL + ne peut contenir qu'un chemin et une chaîne d'arguments + éventuelle, à l'exclusion de tout protocole ou nom d'hôte. S'il ne + commence pas par un slash (/), il est considéré comme relatif au + document courant.

    + +

    Une URL est construite à partir de l'attribut, et la sortie que + renverrait le serveur si l'URL était accédée par le client est + incluse dans la sortie interprétée. Les inclusions de fichiers + peuvent ainsi être imbriquées.

    + +

    Si l'URL spécifiée correspond à un programme CGI, le programme + sera exécuté, et son flux de sortie inséré à la place de la + directive dans le fichier interprété. Vous pouvez insérer une + chaîne d'arguments dans une URL correspond à un programme CGI + :

    + + + <!--#include virtual="/cgi-bin/exemple.cgi?argument=valeur" --> + + +

    include virtual doit être préféré à exec + cgi pour inclure le flux de sortie d'un programme CGI dans + un document HTML.

    + +

    Si la directive KeptBodySize est correctement + définie et valide pour le fichier inclus, les tentatives de + requêtes POST vers le document HTML qui inclut des fichiers seront + transmises aux sous-requêtes en tant que requêtes POST + elles-mêmes. Sans cette directive, toutes les sous-requêtes sont + traitées en tant que requêtes GET.

    + +
    + +
    onerror
    +

    La valeur est un chemin-URL (codé-%) qui est affiché si une + tentative précédente d'inclure un fichier ou un attribut virtuel a + échoué. Pour produire son effet, cet attribut doit être spécifié + après le fichier ou les attributs virtuels concernés. Si la + tentative d'inclure le chemin onerror échoue, ou si onerror n'est + pas spécifié, c'est le message d'erreur par défaut qui sera + inclus.

    + + + # Exemple simple
    + <!--#include virtual="/not-exist.html" onerror="/error.html" --> +
    + + + # Chemins onerror dédiés
    + <!--#include virtual="/path-a.html" onerror="/error-a.html" virtual="/path-b.html" onerror="/error-b.html" --> +
    + +
    +
    +
    + +
    L'élément printenv +

    Cette commande affiche la liste en mode texte de toutes les variables et de + leurs valeurs. Les caractères spéciaux sont encodés entity avant + d'être affichés (se reporter à l'élément echo pour plus de détails). Cette + commande ne comporte pas d'attributs.

    + + Exemple + <pre> + <!--#printenv --> + </pre> + +
    + +
    L'élément set +

    Cette commande permet de définir la valeur d'une variable. Les + attributs sont :

    + +
    +
    var
    +
    Le nom de la variable à définir.
    + +
    value
    +
    La valeur à affecter à la variable.
    +
    decoding
    +

    Spécifie si Apache doit effectuer un décodage dans la + variable avant son traitement ultérieur. La valeur par défaut est + none, et dans ce cas, aucun décodage n'est effectué. + Si la valeur est url, urlencoded, + base64 ou + entity, c'est un décodage de type URL, + application/x-www-form-urlencoded, base64 ou + entité HTML qui sera respectivement effectué. Il est possible + d'effectuer plusieurs décodages en + spécifiant plusieurs valeurs séparées par des virgules. Les + spécifications de décodages restent valables jusqu'au prochain + attribut de décodage, ou la fin de l'élément. Pour être pris en + compte, l'attribut de décodage + doit précéder l'attribut var correspondant.

    +
    + +
    encoding
    +

    Spécifie la manière dont Apache va encoder les caractères + spéciaux que la variable contient avant leur affichage. S'il est + défini à none, aucun encodage ne sera effectué. Si la + valeur est url, urlencoding, + base64 ou + entity, c'est un encodage de type URL, + application/x-www-form-urlencoded, base64 ou + entité HTML qui sera respectivement effectué. Il est possible de + spécifier plusieurs types d'encodage en les séparant par des + virgules. La spécification du type d'encodage fera effet + jusqu'à la définition d'un nouvel attribut encoding + ou la fin de l'élément. Pour produire son effet, l'attribut encoding doit + précéder l'attribut var concerné. Les encodages sont + effectués après les opérations de décodage.

    +
    + +
    + + Exemple + <!--#set var="category" value="help" --> + +
    +
    + +
    + Variables include + +

    À l'instar des variables de l'environnement CGI standard, ces + variables sont mises à la disposition de la commande + echo, des opérateurs conditionnels if et + elif, et de tout programme invoqué par le document.

    + +
    +
    DATE_GMT
    +
    La date GMT (Greenwich Mean Time) courante.
    + +
    DATE_LOCAL
    +
    La date locale courante.
    + +
    DOCUMENT_ARGS
    +
    Cette variable contient la chaîne de paramètres de la requête du + document SSI actif, ou la chaîne vide si aucune chaîne de paramètres de + requête n'est incluse. Pour les sous-requêtes invoquées par la directive + SSI include, QUERY_STRING contiendra la chaîne + de paramètres de la sous-requête et DOCUMENT_ARGS la chaîne + de paramètres du document SSI (disponible à partir de la version 2.4.19 du + serveur HTTP Apache).
    + +
    DOCUMENT_NAME
    +
    Le nom de base du fichier demandé par l'utilisateur (sans son + chemin).
    + +
    DOCUMENT_URI
    +
    Le chemin URL (caractères % décodés) du document demandé par + l'utilisateur. Notez que dans le cas d'inclusions de fichiers + imbriquées, il ne s'agit pas de l'URL du document + courant. Notez également que si l'URL est modifiée en interne (par + exemple via une directive alias ou directoryindex), c'est l'URL modifiée + que contiendra la variable.
    + +
    LAST_MODIFIED
    +
    La date de dernière modification du document demandé par + l'utilisateur.
    + +
    QUERY_STRING_UNESCAPED
    +
    Si une chaîne d'arguments est présente dans la requête pour le + document SSI actif, elle sera affectée à + cette variable, les caractères %-décodés, et éventuellement + échappés pour qu'ils ne soient pas interprétés par le + shell (les caractères spéciaux comme &,etc... + sont précédés d'anti-slashes). Cette variable n'est pas définie si aucune + chaîne d'arguments n'est présente. Utilisez DOCUMENT_ARGS si + l'échappement des caractères du shell n'est pas souhaité.
    +
    +
    + +
    Substitution de variable + +

    Une substitution de variable à l'intérieur d'une chaîne entre + guillemets s'effectue dans la plupart des situations où cette + dernière peut raisonablement constituer un argument d'une directive + SSI. Sont concernées les directives config, + exec, flastmod, fsize, + include, echo, et set. Si la + directive SSILegacyExprParser est définie à + on, la substitution s'effectue aussi dans les arguments + des opérateurs conditionnels. Vous pouvez insérer + un signe dollar en tant que caractère littéral dans une chaîne en + utilisant un anti-slash :

    + + + <!--#set var="cur" value="\$test" --> + + +

    Si une référence de variable doit être substituée au beau milieu + d'une séquence de caractères qui pourrait être elle-même considérée + comme un identifiant valide, l'ambiguïté peut être levée en + entourant la référence d'accolades, à la manière du shell :

    + + + <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" --> + + +

    Dans cet exemple, la variable Zed se verra affecter + la valeur "X_Y" si REMOTE_HOST et + REQUEST_METHOD contiennent respectivement + "X" et "Y".

    + +
    + +
    + Eléments de contrôle d'inclusion conditionnelle + +

    Les éléments de base du contrôle d'inclusion conditionnelle sont + :

    + + + <!--#if expr="test_condition" -->
    + <!--#elif expr="test_condition" -->
    + <!--#else -->
    + <!--#endif --> +
    + +

    L'élément if fonctionne de la même manière que + la directive if d'un langage de programmation. La condition est + évaluée et si le résultat est vrai, le texte qui suit jusqu'au + prochain élément elif, else ou + endif sera inclus dans le flux de sortie.

    + +

    Les éléments elif ou else permettent + d'insérer du texte dans le flux de sortie si + test_condition s'est révélé faux. Ces éléments sont + optionnels.

    + +

    L'élément endif termine le bloc de traitement + conditionnel if et est obligatoire.

    + +

    test_condition est une expression booléenne qui + emprunte la syntaxe ap_expr. La directive + SSILegacyExprParser + permet de modifier cette syntaxe pour la rendre compatible avec + Apache HTTPD 2.2.x.

    + +

    Le jeu de variables SSI avec l'élément var sont + exportées vers l'environnement de la requête et sont accessibles via + la fonction reqenv. Pour faire simple, le nom de + fonction v est aussi disponible dans le module + mod_include.

    + +

    Dans l'exemple suivant, "depuis le réseau local" sera affiché si + l'adresse IP du client appartient au sous-réseau 10.0.0.0/8.

    + + + <!--#if expr='-R "10.0.0.0/8"' -->
    + + depuis le réseau local
    +
    + <!--#else -->
    + + depuis ailleurs
    +
    + <!--#endif --> +
    + +

    Dans l'exemple suivant, "foo vaut bar" sera affiché si la variable + foo contient la valeur "bar".

    + + + <!--#if expr='v("foo") = "bar"' -->
    + + foo vaut bar
    +
    + <!--#endif --> +
    + + Documentation de référence +

    Voir aussi Les expressions dans le serveur + HTTP Apache pour une référence complète et des exemples. Les + fonctions restricted ne sont pas disponibles dans + mod_include.

    +
    +
    + +
    + Syntaxe des expressions héritée + +

    Cette section décrit la syntaxe de l'élément #if + expr dans le cas où la directive SSILegacyExprParser est définie à + on.

    + +
    +
    chaîne
    +
    vrai si chaîne n'est pas vide
    + +
    -A string
    +

    vrai si l'URL que contient la chaîne est accessible du + point de vue de la configuration, faux sinon. Il + s'avère utile lorsqu'un lien vers une URL doit être caché aux + utilisateurs qui ne sont pas autorisés à voir cette URL. Notez que + le test porte sur l'autorisation d'accès à l'URL, et non sur son + existence.

    + + Exemple + <!--#if expr="-A /prive" -->
    + + Cliquez <a href="/prive">ici</a> pour accéder aux + informations privées.
    +
    + <!--#endif --> +
    +
    + +
    chaîne1 = chaîne2
    + chaîne1 == chaîne2
    + chaîne1 != chaîne2
    + +

    Compare chaîne1 à chaîne2. Si + chaîne2 est de la forme + /chaîne2/, elle est traitée comme une + expression rationnelle. Les expressions rationnelles sont + implémentées par le moteur PCRE + et possèdent la même syntaxe que celles de perl 5. Notez que == + n'est qu'un alias pour = et se comporte exactement de + la même manière que ce dernier.

    + +

    Si vous faites une comparaison directe (= ou + ==), vous pouvez extraire des parties de l'expression + rationnelle. Les parties extraites sont stockées dans les + variables spéciales $1 .. $9. L'ensemble + de la chaîne correspondant à l'expression rationnelle est stocké + dans la variable spéciale $0.

    + + Exemple + <!--#if expr="$QUERY_STRING = /^sid=([a-zA-Z0-9]+)/" -->
    + + <!--#set var="session" value="$1" -->
    +
    + <!--#endif --> +
    +
    + +
    chaîne1 < chaîne2
    + chaîne1 <= chaîne2
    + chaîne1 > chaîne2
    + chaîne1 >= chaîne2
    + +
    Compare chaîne1 à chaîne2. Notez que les + chaînes sont comparées de manière littérale (en utilisant + strcmp(3)). Ainsi, la chaîne "100" est inférieure à + "20".
    + +
    ( test_condition )
    +
    vrai si test_condition est vrai
    + +
    ! test_condition
    +
    vrai si test_condition est faux
    + +
    test_condition1 && + test_condition2
    +
    vrai si test_condition1 et + test_condition2 sont tous les deux vrais
    + +
    test_condition1 || + test_condition2
    +
    vrai si au moins un des tests test_condition1 ou + test_condition2 est vrai
    +
    + +

    "=" et "!=" ont une priorité supérieure + à "&&" et "||". "!" a + la priorité la plus haute. Ainsi, les deux directives suivantes sont + équivalentes :

    + + + <!--#if expr="$a = test1 && $b = test2" -->
    + <!--#if expr="($a = test1) && ($b = test2)" --> +
    + +

    Les opérateurs booléens && et + || ont la même priorité. Ainsi, si vous voulez + augmenter la priorité d'un de ces opérateurs, vous devez utiliser + des parenthèses.

    + +

    Tout ce qui n'est pas reconnu comme variable ou opérateur est + traité comme une chaîne. Les chaînes peuvent aussi être entourées + d'apostrophes : 'chaîne'. Les chaînes sans apostrophe + ne peuvent pas contenir d'espaces (espaces ou tabulations) car + ceux-ci servent à séparer certains éléments comme les variables. Si + plusieurs chaînes se trouvent dans une ligne, elles sont concaténées + en utilisant des espaces. Ainsi,

    + + +

    chaîne1    chaîne2 devient chaîne1 chaîne2
    +
    + et
    +
    + 'chaîne1    chaîne2' devient chaîne1    chaîne2.

    +
    + + Optimisation des expressions booléennes +

    Si les expressions atteignent une complexité suffisante pour + ralentir les traitements de manière significative, vous pouvez + essayer de les optimiser en fonction des règles d'évaluation :

    +
      +
    • Les expressions sont évaluées de la gauche vers la droite
    • +
    • Les opérateurs booléens binaires (&& et + ||) font l'objet d'une évaluation abrégée chaque fois + que cela est possible. En d'autres termes, et selon la règle + ci-dessus, mod_include évalue tout d'abord la + partie gauche de l'expression. Si le résultat de l'évaluation de + cette partie gauche suffit à déterminer le résultat final, + l'évaluation s'arrête ici. Dans le cas contraire, la partie droite + est évaluée, et le résultat final tient compte des résultats des + évaluations des parties gauche et droite.
    • +
    • L'évaluation abrégée est désactivée tant qu'il reste des + expressions régulières à traiter. Ces dernières doivent être + évaluées afin de définir les variables correspondant aux + références arrières ($1 .. $9).
    • +
    +

    Si vous voulez déterminer la manière dont une expression est + traitée, vous pouvez recompiler mod_include en + utilisant l'option de compilation -DDEBUG_INCLUDE. + Ceci a pour effet d'insérer, pour chaque expression interprétée, + des informations étiquetées, l'arbre d'interprétation et la + manière dont elle est évaluée au sein du flux de sortie envoyé au + client.

    +
    + + Slashes d'échappement dans les expressions + rationnelles +

    Tous les caractères slashes qui ne sont pas des séparateurs dans + votre expression rationnelle doivent être échappés, et ceci sans + tenir compte de leur signification du point de vue du moteur + d'expressions rationnelles.

    +
    + + Documentation de référence +

    Voir le document Les expressions dans le + serveur HTTP Apache, pour une référence complète et des exemples.

    +
    + + +
    + + +SSIEndTag +Chaîne qui termine l'élément include +SSIEndTag tag +SSIEndTag "-->" +server configvirtual host + + + +

    Cette directive permet de modifier la chaîne que + mod_include interprète comme la fin d'un élément + include.

    + + + SSIEndTag "%>" + + +
    +SSIStartTag +
    + + +SSIUndefinedEcho +Chaîne à afficher lorsqu'on tente d'extraire le contenu +d'une variable non définie +SSIUndefinedEcho chaîne +SSIUndefinedEcho "(none)" +server configvirtual host +directory.htaccess +All + + +

    Cette directive permet de modifier la chaîne affichée par + mod_include lorsqu'on tente d'extraire le contenu + d'une variable non définie.

    + + + SSIUndefinedEcho "<!-- nondef -->" + +
    +
    + + +SSIErrorMsg +Message d'erreur affiché lorsqu'une erreur SSI +survient +SSIErrorMsg message +SSIErrorMsg "[an error occurred while processing this +directive]" +server configvirtual host +directory.htaccess +All + + +

    La directive SSIErrorMsg permet de + modifier le message d'erreur affiché lorsqu'une erreur SSI survient. + Pour les serveurs en production, il est recommandé de modifier le + message d'erreur par défaut en "<!-- Error + -->", de façon à ce que le message ne soit pas + présenté à l'utilisateur.

    + +

    Cette directive a le même effet que l'élément + <!--#config errmsg=message -->.

    + + + SSIErrorMsg "<!-- Error -->" + +
    +
    + + +SSIStartTag +Chaîne qui marque le début d'un élément +include +SSIStartTag tag +SSIStartTag "<!--#" +server configvirtual host + + + +

    Cette directive permet de modifier la chaîne que + mod_include interprète comme le début d'un élément + include.

    + +

    Cette option peut vous être utile si vous avez deux serveurs qui + interprètent un fichier avec des commandes différentes (et + éventuellement à des moments différents).

    + + +SSIStartTag "<%" +SSIEndTag "%>" + + +

    Avec l'exemple ci-dessus, qui définit aussi une directive + SSIEndTag, vous pourrez + inscrire des directives SSI comme dans l'exemple suivant :

    + + Directives SSI avec marques de début et de fin + personnalisées + <%printenv %> + +
    +SSIEndTag +
    + + +SSITimeFormat +Configuration du format d'affichage des dates +SSITimeFormat chaîne de formatage +SSITimeFormat "%A, %d-%b-%Y %H:%M:%S %Z" + +server configvirtual host +directory.htaccess +All + + +

    Cette directive permet de modifier le format d'affichage des +variables d'environnement DATE. La chaîne de +formatage est identique à celle de la fonction +strftime(3) de la bibliothèque C standard.

    + +

    Cette directive a le même effet que l'élément + <!--#config timefmt=chaîne de formatage + -->.

    + + + SSITimeFormat "%R, %B %d, %Y" + + +

    Avec l'exemple ci-dessus, les dates seront affichées dans le + style "22:26, June 14, 2002".

    +
    +
    + + +SSIETag +Définit si des en-têtes ETags sont générés par le serveur. +SSIETag on|off +SSIETag off +directory.htaccess +Disponible à partir de la version 2.2.15 du serveur HTTP +Apache. + + +

    Dans le cas général, un fichier filtré par + mod_include peut contenir des éléments soit + générés dynamiquement, soit éventuellement modifiés indépendemment + du fichier original. En conséquence, il est demandé par défaut au + serveur de ne pas générer d'en-tête ETag à la réponse + en ajoutant no-etag aux informations de requête.

    + +

    Ce comportement peut être modifié via la directive + SSIETag qui permet au serveur de générer un + en-tête ETag. On peut aussi l'utiliser pour la mise + en cache de la sortie. Notez qu'un serveur d'arrière-plan ou un + générateur de contenu dynamique peut lui-même générer un en-tête + ETag, en ignorant l'information no-etag, + cet en-tête ETag étant transmis par + mod_include sans tenir compte de la définition de + la présente directive. La directive SSIETag + peut prendre une des valeurs suivantes :

    + +
    + +
    off
    +
    no-etag sera ajouté aux informations de + requête, et il sera demandé au serveur de ne pas générer + d'en-tête ETag. Lorsqu'un serveur ignore la valeur + de no-etag et génère tout de même un en-tête + ETag, ce dernier sera respecté.
    + +
    on
    +
    Les en-têtes ETag existants seront respectés, + et ceux générés par le serveur seront ajoutés à la réponse.
    + +
    + +
    +
    + + +SSILastModified +Définit si des en-têtes Last-Modified sont +générés par le serveur. +SSILastModified on|off +SSILastModified off +directory.htaccess +Disponible à partir de la version 2.2.15 du serveur HTTP +Apache. + + +

    Dans le cas général, un fichier filtré par + mod_include peut contenir des éléments soit + générés dynamiquement, soit éventuellement modifiés indépendemment + du fichier original. En conséquence, l'en-tête + Last-Modified est supprimé par défaut de la réponse.

    + +

    La directive SSILastModified permet de + modifier ce comportement en faisant en sorte que l'en-tête + Last-Modified soit respecté s'il est déjà présent, ou + défini dans le cas contraire. On peut aussi l'utiliser pour la mise + en cache de la sortie. La directive + SSILastModified peut prendre une des + valeurs suivantes :

    + +
    + +
    off
    +
    L'en-tête Last-Modified sera supprimé des + réponses, à moins que la directive XBitHack ne soit définie à + full comme décrit plus loin.
    + +
    on
    +
    L'en-tête Last-Modified sera respecté s'il est + déjà présent, et ajouté à la réponse si cette dernière est un + fichier et si l'en-tête est manquant. La directive SSILastModified l'emporte sur + la directive XBitHack.
    + +
    + +
    +
    + +SSILegacyExprParser +Active le mode de compatibilité pour les expressions +conditionnelles. +SSILegacyExprParser on|off +SSILegacyExprParser off +directory.htaccess +Disponible à partir de la version 2.3.13. + + +

    Depuis la version 2.3.13, mod_include a adopté + la nouvelle syntaxe ap_expr pour ses + expressions conditionnelles dans les éléments de contrôle de flux + #if. Cette directive permet de réactiver l'ancienne syntaxe qui est compatible avec les + versions 2.2.x et antérieures d'Apache HTTPD. +

    +
    +
    + + +XBitHack +Interprète les directives SSI dans les fichiers dont le bit +d'exécution est positionné +XBitHack on|off|full +XBitHack off +server configvirtual host +directory.htaccess +Options + + +

    La directive XBitHack permet de contrôler + l'interprétation des documents html standards. Elle n'affecte que + les fichiers dont le type MIME est + text/html. XBitHack peut prendre + les valeurs suivantes :

    + +
    +
    off
    +
    Aucun traitement particulier pour les fichiers + exécutables.
    + +
    on
    +
    Tout fichier text/html dont le bit d'exécution + est positionné pour le propriétaire sera traité en tant que + document html interprété par le serveur.
    + +
    full
    +
    Identique à on, avec test du bit d'exécution pour + le groupe. Si ce dernier est positionné, la date de dernière + modification du fichier renvoyé est définie à la date de + dernière modification du fichier. Dans le cas contraire, aucune + date de dernière modification n'est renvoyée. Le positionnement de + ce bit permet aux clients et aux mandataires de gérer la mise en + cache du résultat de la requête. + + Note +

    Il est recommandé de n'utiliser l'option full que dans le cas + où vous êtes certain que le bit d'exécution du groupe est non + positionné pour les scripts SSI qui pourraient effectuer l'#include d'un programme CGI ou bien produire des sorties + différentes à chaque accès (ou seraient susceptibles d'être + modifiées au cours des requêtes ultérieures).

    + +

    Lorsqu'elle est définie à on, la directive + SSILastModified + l'emporte sur la directive XBitHack.

    +
    + +
    +
    + +
    +
    + + diff --git a/docs/manual/mod/mod_include.xml.ja b/docs/manual/mod/mod_include.xml.ja index 943c4a78dfa..6e796948fba 100644 --- a/docs/manual/mod/mod_include.xml.ja +++ b/docs/manual/mod/mod_include.xml.ja @@ -1,7 +1,7 @@ - + -mod_info - Apache HTTP Server +mod_info - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_info

    @@ -36,42 +41,38 @@ configuration

    To configure mod_info, add the following to your httpd.conf file.

    -

    - <Location /server-info>
    - - SetHandler server-info
    -
    - </Location> -

    +
    <Location "/server-info">
    +    SetHandler server-info
    +</Location>
    + -

    You may wish to use mod_access inside the +

    You may wish to use mod_authz_host inside the <Location> directive to limit access to your server configuration information:

    -

    - <Location /server-info>
    - - SetHandler server-info
    - Require host example.com
    -
    - </Location> -

    +
    <Location "/server-info">
    +    SetHandler server-info
    +    Require host example.com
    +</Location>
    +

    Once configured, the server information is obtained by accessing http://your.host.example.com/server-info

    -
    top

    Security Issues

    @@ -90,18 +91,15 @@ configuration

    You will probably want to use mod_authz_host to limit access to your server configuration information.

    -

    Access control

    - <Location /server-info>
    - - SetHandler server-info
    - Order allow,deny
    - # Allow access from server itself
    - Allow from 127.0.0.1
    - # Additionally, allow access from local workstation
    - Allow from 192.168.1.17
    -
    - </Location> -

    +

    Access control

    <Location "/server-info">
    +    SetHandler server-info
    +    # Allow access from server itself
    +    Require ip 127.0.0.1
    +
    +    # Additionally, allow access from local workstation
    +    Require ip 192.168.1.17
    +</Location>
    +
    top

    Selecting the information shown

    @@ -133,8 +131,16 @@ configuration

    Dumping the configuration on startup

    If the config define -DDUMP_CONFIG is set, mod_info will dump the pre-parsed configuration to - stdout during server startup. This is roughly equivalent - to the ?config query.

    + stdout during server startup. Pre-parsed means that + directives like + <IfDefine> and + <IfModule> are + evaluated and environment varialbles are replaced. However it does + not represent the final state of the configuration. In particular, + it does not represent the merging or overriding that may happen + for repeated directives.

    + +

    This is roughly equivalent to the ?config query.

    top

    Known Limitations

    @@ -150,18 +156,18 @@ configuration LoadFile.
  • Directives which control the configuration file itself, such as Include, - <IfModule> and - <IfDefine> are not + <IfModule> and + <IfDefine> are not listed, but the included configuration directives are.
  • Comments are not listed. (This may be considered a feature.)
  • Configuration directives from .htaccess files are not listed (since they do not form part of the permanent server configuration).
  • Container directives such as - <Directory> + <Directory> are listed normally, but mod_info cannot figure out the line number for the closing - </Directory>.
  • + </Directory>.
  • Directives generated by third party modules such as mod_perl might not be listed.
  • @@ -180,13 +186,10 @@ information displayed by the server-info handler HTML interpreted, Additional Information for the module module-name. Example:

    -

    - AddModuleInfo mod_deflate.c 'See <a \
    - - href="http://www.apache.org/docs/trunk/mod/mod_deflate.html">\
    - http://www.apache.org/docs/trunk/mod/mod_deflate.html</a>' -
    -

    +
    AddModuleInfo mod_deflate.c 'See <a \
    +    href="http://httpd.apache.org/docs/2.4/mod/mod_deflate.html">\
    +    http://httpd.apache.org/docs/2.4/mod/mod_deflate.html</a>'
    +
    @@ -195,7 +198,28 @@ information displayed by the server-info handler  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_info.html.fr b/docs/manual/mod/mod_info.html.fr index 451bfccce86..d2d0be4935e 100644 --- a/docs/manual/mod/mod_info.html.fr +++ b/docs/manual/mod/mod_info.html.fr @@ -1,23 +1,28 @@ - -mod_info - Serveur Apache HTTP +mod_info - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_info

    @@ -36,42 +41,38 @@ serveur

    Pour activer mod_info, ajoutez les lignes suivantes votre fichier httpd.conf.

    -

    - <Location /infos-serveur>
    - - SetHandler server-info
    -
    - </Location> -

    +
    <Location "/server-info">
    +    SetHandler server-info
    +</Location>
    + -

    Il est recommand d'utiliser mod_access +

    Il est recommand d'utiliser mod_authz_host l'intrieur de la section <Location> afin de restreindre l'accs aux informations de configuration de votre serveur :

    -

    - <Location /infos-serveur>
    - - SetHandler server-info
    - Require host example.com
    -
    - </Location> -

    +
    <Location "/server-info">
    +    SetHandler server-info
    +    Require host example.com
    +</Location>
    +

    Une fois cette configuration effectue, les informations du serveur sont disponibles l'adresse http://votre-serveur.com/infos-serveur.

    -
    top

    Problmes lis la scurit

    @@ -93,19 +94,16 @@ serveur restreindre l'accs aux informations de configuration de votre serveur.

    -

    Contrle d'accs

    - <Location /infos-serveur>
    - - SetHandler server-info
    - Order allow,deny
    - # Autorisation d'accs depuis le serveur lui-mme
    - Allow from 127.0.0.1
    - # Autorisation d'accs depuis une station de travail du rseau - # local
    - Allow from 192.168.1.17
    -
    - </Location> -

    +

    Contrle d'accs

    <Location "/server-info">
    +    SetHandler server-info
    +    # Autorisation d'accs depuis le serveur lui-mme
    +    Require ip 127.0.0.1
    +
    +    # Autorisation d'accs depuis une station de travail du rseau
    +# local
    +    Require ip 192.168.1.17
    +</Location>
    +
    top

    Filtrage des informations affiches

    @@ -139,10 +137,18 @@ serveur

    Affichage de la configuration au dmarrage

    Si la directive de configuration define - -DDUMP_CONFIG est dfinie, mod_info va + -DDUMP_CONFIG est utilise, mod_info va envoyer la configuration printerprte vers stdout au - cours du dmarrage du serveur. Ceci est pratiquement quivalent au - paramtre de requte ?config.

    + cours du dmarrage du serveur. "Printerprte" signifie que + les directives telles que <IfDefine> et <IfModule> sont values et les variables + d'environnement remplaces par leurs valeurs. Cela ne reprsente + cependant pas la configuration dfinitive. En particulier, les + fusions ou crasementsde dfinitions en cas de directives multiples ne sont pas + reprsents.

    + +

    Le rsultat est quivalent celui de la requte + ?config.

    +
    top

    Limitations connues

    @@ -156,25 +162,26 @@ serveur prises en compte. Celles-ci comprennent ServerRoot, LoadModule et LoadFile.
  • Les directives qui contrlent le fichier de configuration lui-mme, comme Include, - <IfModule> et - <IfDefine> ne sont pas - prises en compte, mais les directives de configuration incluses le - sont.
  • + <IfModule> et + <IfDefine> ne + sont pas prises en compte, mais les directives de configuration + incluses le sont.
  • Les commentaires ne sont pas pris en compte (Ce qui peut tre considr comme une fonctionnalit).
  • Les directives de configuration des fichiers .htaccess ne sont pas prises en compte (car elles ne font pas partie de la configuration permanente du serveur).
  • -
  • Les directives de conteneur comme <Directory> sont affiches +
  • Les directives de conteneur comme <Directory> sont affiches normalement, mais mod_info est incapable de - dterminer le numro de ligne de la balise fermante </Directory>.
  • + dterminer le numro de ligne de la balise fermante + </Directory>.
  • Les directives gnres par des modules tiers comme mod_perl peuvent ne pas tre prises en compte.
  • top
    -

    AddModuleInfo Directive

    +

    Directive AddModuleInfo

    @@ -187,13 +194,10 @@ module affich en tant qu'Information supplmentaire interprte en HTML pour le module nom-module. Exemple :

    -

    - AddModuleInfo mod_deflate.c 'Voir <a \
    - - href="http://www.apache.org/docs/trunk/mod/mod_deflate.html">\
    - http://www.apache.org/docs/trunk/mod/mod_deflate.html</a>' -
    -

    +
    AddModuleInfo mod_deflate.c 'See <a \
    +    href="http://httpd.apache.org/docs/2.4/mod/mod_deflate.html">\
    +    http://httpd.apache.org/docs/2.4/mod/mod_deflate.html</a>'
    + @@ -202,7 +206,28 @@ module affich  fr  |  ja  |  ko 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_info.html.ja.utf8 b/docs/manual/mod/mod_info.html.ja.utf8 index 460d58401c4..77c17bdd8ee 100644 --- a/docs/manual/mod/mod_info.html.ja.utf8 +++ b/docs/manual/mod/mod_info.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_info - Apache HTTP サーバ +mod_info - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_info

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Ajoute des donnes supplmentaires aux informations de module affiches par le gestionnaire server-info
    @@ -64,16 +70,18 @@

    一旦設定すると、http://your.host.example.com/server-info にアクセスすることでサーバの情報を得られるようになります。

    -

    ディレクティブ

    - -

    トピック

    + +

    ディレクティブ

    + +

    Bugfix checklist

    参照

    +
    top

    Security Issues

    @@ -175,19 +183,40 @@

    AddModuleInfo mod_deflate.c 'See <a \
    - href="http://www.apache.org/docs/trunk/mod/mod_deflate.html">\
    - http://www.apache.org/docs/trunk/mod/mod_deflate.html</a>' + href="http://www.apache.org/docs/2.4/mod/mod_deflate.html">\
    + http://www.apache.org/docs/2.4/mod/mod_deflate.html</a>'

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_info.html.ko.euc-kr b/docs/manual/mod/mod_info.html.ko.euc-kr index b6b64ea2cf7..f25353625a4 100644 --- a/docs/manual/mod/mod_info.html.ko.euc-kr +++ b/docs/manual/mod/mod_info.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_info - Apache HTTP Server +mod_info - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_info

    @@ -49,16 +54,18 @@ http://your.host.example.com/server-info Ͽ ִ.

    -
    top

    @@ -153,8 +160,8 @@

    AddModuleInfo mod_deflate.c 'See <a \
    - href="http://www.apache.org/docs/trunk/mod/mod_deflate.html">\
    - http://www.apache.org/docs/docs/trunk/mod/mod_deflate.html</a>' + href="http://www.apache.org/docs/2.4/mod/mod_deflate.html">\
    + http://www.apache.org/docs/docs/2.4/mod/mod_deflate.html</a>'

    @@ -165,7 +172,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_info.xml b/docs/manual/mod/mod_info.xml index 0bfd6d645be..8461ac400c0 100644 --- a/docs/manual/mod/mod_info.xml +++ b/docs/manual/mod/mod_info.xml @@ -33,27 +33,23 @@ configuration

    To configure mod_info, add the following to your httpd.conf file.

    - - <Location /server-info>
    - - SetHandler server-info
    -
    - </Location> -
    + +<Location "/server-info"> + SetHandler server-info +</Location> + -

    You may wish to use mod_access inside the +

    You may wish to use mod_authz_host inside the Location directive to limit access to your server configuration information:

    - - <Location /server-info>
    - - SetHandler server-info
    - Require host example.com
    -
    - </Location> -
    + +<Location "/server-info"> + SetHandler server-info + Require host example.com +</Location> +

    Once configured, the server information is obtained by accessing http://your.host.example.com/server-info

    @@ -76,16 +72,16 @@ configuration to limit access to your server configuration information.

    Access control - <Location /server-info>
    - - SetHandler server-info
    - Order allow,deny
    - # Allow access from server itself
    - Allow from 127.0.0.1
    - # Additionally, allow access from local workstation
    - Allow from 192.168.1.17
    -
    - </Location> + +<Location "/server-info"> + SetHandler server-info + # Allow access from server itself + Require ip 127.0.0.1 + + # Additionally, allow access from local workstation + Require ip 192.168.1.17 +</Location> +
    @@ -118,8 +114,16 @@ configuration
    Dumping the configuration on startup

    If the config define -DDUMP_CONFIG is set, mod_info will dump the pre-parsed configuration to - stdout during server startup. This is roughly equivalent - to the ?config query.

    + stdout during server startup. Pre-parsed means that + directives like + IfDefine and + IfModule are + evaluated and environment varialbles are replaced. However it does + not represent the final state of the configuration. In particular, + it does not represent the merging or overriding that may happen + for repeated directives.

    + +

    This is roughly equivalent to the ?config query.

    Known Limitations @@ -135,18 +139,18 @@ configuration LoadFile.
  • Directives which control the configuration file itself, such as Include, - <IfModule> and - <IfDefine> are not + IfModule and + IfDefine are not listed, but the included configuration directives are.
  • Comments are not listed. (This may be considered a feature.)
  • Configuration directives from .htaccess files are not listed (since they do not form part of the permanent server configuration).
  • Container directives such as - <Directory> + Directory are listed normally, but mod_info cannot figure out the line number for the closing - </Directory>.
  • + /Directory.
  • Directives generated by third party modules such as mod_perl might not be listed.
  • @@ -165,13 +169,11 @@ information displayed by the server-info handler HTML interpreted, Additional Information for the module module-name. Example:

    - - AddModuleInfo mod_deflate.c 'See <a \
    - - href="http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\
    - http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>' -
    -
    + +AddModuleInfo mod_deflate.c 'See <a \ + href="http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\ + http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>' + diff --git a/docs/manual/mod/mod_info.xml.fr b/docs/manual/mod/mod_info.xml.fr index ac5209cf3a7..a6b3653f67f 100644 --- a/docs/manual/mod/mod_info.xml.fr +++ b/docs/manual/mod/mod_info.xml.fr @@ -1,7 +1,7 @@ - + @@ -35,27 +35,23 @@ serveur

    Pour activer mod_info, ajoutez les lignes suivantes à votre fichier httpd.conf.

    - - <Location /infos-serveur>
    - - SetHandler server-info
    -
    - </Location> -
    + +<Location "/server-info"> + SetHandler server-info +</Location> + -

    Il est recommandé d'utiliser mod_access à +

    Il est recommandé d'utiliser mod_authz_host à l'intérieur de la section Location afin de restreindre l'accès aux informations de configuration de votre serveur :

    - - <Location /infos-serveur>
    - - SetHandler server-info
    - Require host example.com
    -
    - </Location> -
    + +<Location "/server-info"> + SetHandler server-info + Require host example.com +</Location> +

    Une fois cette configuration effectuée, les informations du serveur sont disponibles à l'adresse @@ -82,17 +78,17 @@ serveur serveur.

    Contrôle d'accès - <Location /infos-serveur>
    - - SetHandler server-info
    - Order allow,deny
    - # Autorisation d'accès depuis le serveur lui-même
    - Allow from 127.0.0.1
    - # Autorisation d'accès depuis une station de travail du réseau - # local
    - Allow from 192.168.1.17
    -
    - </Location> + +<Location "/server-info"> + SetHandler server-info + # Autorisation d'accès depuis le serveur lui-même + Require ip 127.0.0.1 + + # Autorisation d'accès depuis une station de travail du réseau +# local + Require ip 192.168.1.17 +</Location> +
    @@ -127,10 +123,20 @@ serveur
    Affichage de la configuration au démarrage

    Si la directive de configuration define - -DDUMP_CONFIG est définie, mod_info va + -DDUMP_CONFIG est utilisée, mod_info va envoyer la configuration préinterprétée vers stdout au - cours du démarrage du serveur. Ceci est pratiquement équivalent au - paramètre de requête ?config.

    + cours du démarrage du serveur. "Préinterprétée" signifie que + les directives telles que IfDefine et IfModule sont évaluées et les variables + d'environnement remplacées par leurs valeurs. Cela ne représente + cependant pas la configuration définitive. En particulier, les + fusions ou écrasementsde définitions en cas de directives multiples ne sont pas + représentés.

    + +

    Le résultat est équivalent à celui de la requête + ?config.

    +
    Limitations connues @@ -147,20 +153,21 @@ serveur module="mod_so">LoadFile.
  • Les directives qui contrôlent le fichier de configuration lui-même, comme Include, - <IfModule> et - <IfDefine> ne sont pas - prises en compte, mais les directives de configuration incluses le - sont.
  • + IfModule et + IfDefine ne + sont pas prises en compte, mais les directives de configuration + incluses le sont.
  • Les commentaires ne sont pas pris en compte (Ce qui peut être considéré comme une fonctionnalité).
  • Les directives de configuration des fichiers .htaccess ne sont pas prises en compte (car elles ne font pas partie de la configuration permanente du serveur).
  • -
  • Les directives de conteneur comme <Directory> sont affichées +
  • Les directives de conteneur comme Directory sont affichées normalement, mais mod_info est incapable de - déterminer le numéro de ligne de la balise fermante </Directory>.
  • + déterminer le numéro de ligne de la balise fermante + /Directory.
  • Les directives générées par des modules tiers comme mod_perl peuvent ne pas être prises en compte.
  • @@ -180,13 +187,11 @@ module affichées par le gestionnaire server-info en tant qu'Information supplémentaire interprétée en HTML pour le module nom-module. Exemple :

    - - AddModuleInfo mod_deflate.c 'Voir <a \
    - - href="http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\
    - http://www.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>' -
    -
    + +AddModuleInfo mod_deflate.c 'See <a \ + href="http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html">\ + http://httpd.apache.org/docs/&httpd.docs;/mod/mod_deflate.html</a>' + diff --git a/docs/manual/mod/mod_info.xml.ja b/docs/manual/mod/mod_info.xml.ja index cdf24ce95ce..e24062c66b3 100644 --- a/docs/manual/mod/mod_info.xml.ja +++ b/docs/manual/mod/mod_info.xml.ja @@ -1,7 +1,7 @@ - + + -mod_isapi - Apache HTTP Server +mod_isapi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_isapi

    Available Languages:  en  | + fr  |  ko 

    説明:サーバの設定の包括的な概観を提供する
    ステータス:Extension
    モジュール識別子:info_module
    @@ -43,7 +49,12 @@ extension. Please do not post such problems to Apache's lists or bug reporting pages.

    -
    top

    Usage

    @@ -68,9 +76,8 @@ it to them with their file extensions. To enable any .dll file to be processed as an ISAPI extension, edit the httpd.conf file and add the following line:

    -

    - AddHandler isapi-handler .dll -

    +
    AddHandler isapi-handler .dll
    +
    In older versions of the Apache server, isapi-isa was the proper handler name, rather than @@ -83,9 +90,8 @@ requested module loaded. However, you may preload and keep a specific module loaded by using the following syntax in your httpd.conf:

    -

    - ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll -

    +
    ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
    +

    Whether or not you have preloaded an ISAPI extension, all ISAPI extensions are governed by the same permissions and @@ -224,7 +230,7 @@ GetServerVariable, as well as the ALL_HTTP and ALL_RAW values.

    -

    Apache httpd 2.0+ mod_isapi supports additional +

    Since httpd 2.0, mod_isapi supports additional features introduced in later versions of the ISAPI specification, as well as limited emulation of async I/O and the TransmitFile semantics. Apache httpd also supports preloading @@ -336,8 +342,30 @@ extensions

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_isapi.html.fr b/docs/manual/mod/mod_isapi.html.fr new file mode 100644 index 00000000000..89eda7d98fa --- /dev/null +++ b/docs/manual/mod/mod_isapi.html.fr @@ -0,0 +1,393 @@ + + + + + +mod_isapi - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_isapi

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:ISAPI Extensions within Apache for Windows
    + + + +
    Description:Extensions ISAPI dans Apache pour Windows
    Statut:Base
    IdentificateurdeModule:isapi_module
    FichierSource:mod_isapi.c
    Compatibilit:Win32 only
    +

    Sommaire

    + +

    Ce module implmente l'API des extensions du Serveur Internet. Il + permet Apache pour Windows de servir les extensions du Serveur + Internet (par exemple les modules .dll ISAPI), compte tenu des + restrictions spcifies.

    + +

    Les modules d'extension ISAPI (fichiers .dll) sont des modules + tiers. Leur auteur n'est pas le Groupe Apache, et nous n'assurons + donc pas leur support. Veuillez contacter directement l'auteur + d'ISAPI si vous rencontrez des problmes l'excution d'une + extension ISAPI. Merci de ne pas soumettre ce genre + de problme dans les listes d'Apache ou dans les pages de rapports + de bogues.

    +
    + +
    top
    +
    +

    Utilisation

    + +

    Dans le fichier de configuration du serveur, utilisez la + directive AddHandler pour + associer les fichiers ISAPI au gestionnaire + isapi-handler l'aide de l'extension de leur nom de + fichier. Pour faire en sorte que tout fichier .dll soit trait en + tant qu'extension ISAPI, ditez le fichier httpd.conf et ajoutez les + lignes suivantes :

    +
    AddHandler isapi-handler .dll
    + + +
    Dans les versions plus anciennes du serveur Apache, le nom du + gestionnaire tait isapi-isa au lieu de + isapi-handler. Depuis les versions de dveloppement 2.3 + du serveur Apache, isapi-isa n'est plus valide, et vous + devrez ventuellement modifier votre configuration pour utiliser + isapi-handler la place.
    + +

    Le serveur Apache ne propose aucun moyen de conserver en mmoire + un module charg. Vous pouvez cependant prcharger et garder un + module spcifique en mmoire en utilisant la syntaxe suivante dans + votre httpd.conf :

    +
    ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll
    + + +

    Que vous ayez ou non prcharg une extension ISAPI, ces dernires + sont toutes soumises au mmes restrictions et possdent les mmes + permissions que les scripts CGI. En d'autres termes, Options ExecCGI doit tre + dfini pour le rpertoire qui contient le fichier .dll ISAPI.

    + +

    Reportez-vous aux Notes additionnelles et au + Journal du programmeur pour plus de dtails + et une clarification propos du support spcifique ISAPI fourni par + le module mod_isapi.

    +
    top
    +
    +

    Notes additionnelles

    + +

    L'implmentation ISAPI d'Apache se conforme toutes les + spcifications ISAPI 2.0, l'exception de certaines extensions + "spcifiques Microsoft" utilisant des entres/sorties asynchrones. + Le modle des entres/sorties d'Apache ne permet pas l'criture et + la lecture asynchrone de la manire dont ISAPI pourrait le faire. Si + une extension tente d'utiliser des fonctionnalits non supportes, + comme les entres/sorties asynchrones, un message est enregistr + dans le journal des erreurs afin d'aider au dbogage. Comme ces + messages peuvent devenir envahissants, la directive + ISAPILogNotSupported Off permet de filter ce bruit de + fond.

    + +

    Si aucune option de configuration particulire n'est spcifie, + certains serveurs, comme Microsoft IIS, chargent l'extension ISAPI + dans le serveur et la conservent en mmoire jusqu' ce que + l'utilisation de cette dernire devienne trop leve. Apache, par + contre, charge et dcharge rellement l'extension ISAPI chaque fois + qu'elle est invoque, si la directive ISAPICacheFile n'a pas t spcifie. + Ce n'est pas trs performant, mais le modle de mmoire d'Apache + fait que cette mthode est la plus efficace. De nombreux modules + ISAPI prsentent des incompatibilits subtiles avec le serveur + Apache, et le dchargement de ces modules permet d'assurer la + stabilit du serveur.

    + +

    En outre, gardez l'esprit que si Apache supporte les extensions + ISAPI, il ne supporte pas les filtres ISAPI. Le + support des filtres sera peut-tre ajout dans le futur, mais n'a + pas encore t planifi.

    +
    top
    +
    +

    Journal du programmeur

    + +

    Si vous crivez des modules mod_isapi Apache + 2.0, vous devez limiter vos appels + ServerSupportFunction aux directives suivantes :

    + +
    +
    HSE_REQ_SEND_URL_REDIRECT_RESP
    +
    Redirige l'utilisateur vers une autre adresse.
    + Il doit s'agir d'une URL pleinement qualifie (comme + http://serveur/chemin).
    + +
    HSE_REQ_SEND_URL
    +
    Redirige l'utilisateur vers une autre adresse.
    + Ce ne doit pas tre une URL pleinement qualifie ; la mention du + protocole ou du nom du serveur n'est pas autorise (par exemple, + utilisez simplement /chemin).
    + La redirection n'est pas assure par le navigateur mais par le + serveur lui-mme.
    +

    Avertissement

    +

    Dans sa documentation rcente, Microsoft semble avoir + abandonn la distinction entre les deux fonctions + HSE_REQ_SEND_URL. Apache, quant lui, continue de + les traiter comme deux fonctions distinctes avec des contraintes + et des comportements spcifiques.

    +
    + +
    HSE_REQ_SEND_RESPONSE_HEADER
    +
    Apache accepte un corps de rponse aprs l'en-tte s'il se + situe aprs la ligne vide (deux caractres newline conscutifs) + dans la chane des arguments d'en-ttes. Ce corps ne doit pas + contenir de caractres NULL, car l'argument des en-ttes est + lui-mme termin par un caractre NULL.
    + +
    HSE_REQ_DONE_WITH_SESSION
    +
    Apache considre ceci comme sans objet, car la session est + ferme lorsque l'extension ISAPI termine son traitement.
    + +
    HSE_REQ_MAP_URL_TO_PATH
    +
    Apache va traduire un nom virtuel en nom physique.
    + +
    HSE_APPEND_LOG_PARAMETER
    +
    + Ce paramtre peut intervenir dans un de ces journaux : + + + +

    La premire option, le composant + %{isapi-parameter}n, est prfrable et toujours + disponible.

    +
    + +
    HSE_REQ_IS_KEEP_CONN
    +
    retourne le statut ngoci Keep-Alive.
    + +
    HSE_REQ_SEND_RESPONSE_HEADER_EX
    +
    se comportera comme indiqu dans le documentation, bien que le + drapeau fKeepConn soit ignor.
    + +
    HSE_REQ_IS_CONNECTED
    +
    renverra faux si la requte a t abandonne.
    +
    + +

    Apache renvoie FALSE pour tout appel non support + ServerSupportFunction, et GetLastError + renverra la valeur ERROR_INVALID_PARAMETER.

    + +

    ReadClient extrait la partie du corps de la requte + qui dpasse le tampon initial (dfini par la directive ISAPIReadAheadBuffer). En fonction de + la dfinition de la directive + ISAPIReadAheadBuffer (nombre d'octets + mettre dans le tampon avant d'appeler le gestionnaire ISAPI), les + requtes courtes sont envoyes en entier l'extension lorsque + celle-ci est invoque. Si la taille de la requte est trop + importante, l'extension ISAPI doit faire appel + ReadClient pour extraire la totalit du corps de la + requte.

    + +

    WriteClient est support, mais seulement avec le + drapeau HSE_IO_SYNC ou le drapeau "aucune option" + (valeur 0). Toute autre requte + WriteClient sera rejete avec une valeur de retour + FALSE, et GetLastError renverra la valeur + ERROR_INVALID_PARAMETER

    + +

    GetServerVariable est support, bien que les + variables tendues de serveur n'existent pas (comme dfini par + d'autres serveurs). Toutes les variables d'environnement CGI + usuelles d'Apache sont disponibles partir de + GetServerVariable, ainsi que les valeurs + ALL_HTTP et ALL_RAW.

    + +

    Depuis httpd 2.0, mod_isapi propose des + fonctionnalits supplmentaires introduites dans les versions + actualises de la spcification ISAPI, ainsi qu'une mulation + limite des entres/sorties asynchrones et la smantique + TransmitFile. Apache httpd supporte aussi le prchargement + des .dlls ISAPI des fins de performances.

    +
    +
    top
    +

    Directive ISAPIAppendLogToErrors

    + + + + + + + + +
    Description:Enregistrement des requtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans le journal des erreurs
    Syntaxe:ISAPIAppendLogToErrors on|off
    Dfaut:ISAPIAppendLogToErrors off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_isapi
    +

    Cette directive permet d'enregistrer les requtes + HSE_APPEND_LOG_PARAMETER de la part des extensions + ISAPI dans le journal des erreurs.

    + +
    +
    top
    +

    Directive ISAPIAppendLogToQuery

    + + + + + + + + +
    Description:Enregistre les requtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans la partie arguments de la requte
    Syntaxe:ISAPIAppendLogToQuery on|off
    Dfaut:ISAPIAppendLogToQuery on
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_isapi
    +

    Cette directive permet d'enregistrer les requtes + HSE_APPEND_LOG_PARAMETER de la part des extensions + ISAPI dans la partie arguments de la requte (ajout au composant + %q de la directive CustomLog).

    + +
    +
    top
    +

    Directive ISAPICacheFile

    + + + + + + +
    Description:Fichiers .dll ISAPI devant tre chargs au +dmarrage
    Syntaxe:ISAPICacheFile chemin-fichier +[chemin-fichier] +...
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_isapi
    +

    Cette directive permet de spcifier une liste, spars par des + espaces, de noms de fichiers devant tre chargs au dmarrage + du serveur Apache, et rester en mmoire jusqu' l'arrt du serveur. + Cette directive peut tre rpte pour chaque fichier .dll ISAPI + souhait. Le chemin complet du fichier doit tre spcifi. Si le + chemin n'est pas absolu, il sera considr comme relatif au + rpertoire dfini par la directive ServerRoot.

    + +
    +
    top
    +

    Directive ISAPIFakeAsync

    + + + + + + + + +
    Description:Emulation du support des entres/sorties asynchrones pour +les appels ISAPI
    Syntaxe:ISAPIFakeAsync on|off
    Dfaut:ISAPIFakeAsync off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_isapi
    +

    Lorsquelle est dfinie "on", cette directive permet d'muler le + support des entres/sorties asynchrones pour les appels ISAPI.

    + +
    +
    top
    +

    Directive ISAPILogNotSupported

    + + + + + + + + +
    Description:Journalisation des demandes de fonctionnalits non +supportes de la part des extensions ISAPI
    Syntaxe:ISAPILogNotSupported on|off
    Dfaut:ISAPILogNotSupported off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_isapi
    +

    Cette directive permet d'enregistrer dans le journal des erreurs + toutes les demandes de fonctionnalits non supportes de la part des + extensions ISAPI. Ceci peut aider les administrateurs dcortiquer + certains problmes. Lorsqu'elle a t dfinie "on" et si tous les + modules ISAPI fonctionnent, elle peut tre redfinie "off".

    + +
    +
    top
    +

    Directive ISAPIReadAheadBuffer

    + + + + + + + + +
    Description:Taille du tampon de lecture anticipe envoy aux extensions +ISAPI
    Syntaxe:ISAPIReadAheadBuffer taille
    Dfaut:ISAPIReadAheadBuffer 49152
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_isapi
    +

    Cette directive permet de dfinir la taille maximale du tampon de + lecture anticipe envoy aux extensions ISAPI lorsqu'elles sont + initialement invoques. Toute donne restante doit tre extraite en + faisant appel ReadClient ; certaines extensions ISAPI + peuvent ne pas supporter la fonction ReadClient. + Pour plus de dtails, veuillez vous adresser l'auteur de + l'extension ISAPI.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_isapi.html.ko.euc-kr b/docs/manual/mod/mod_isapi.html.ko.euc-kr index 71a433973e4..330db77b59e 100644 --- a/docs/manual/mod/mod_isapi.html.ko.euc-kr +++ b/docs/manual/mod/mod_isapi.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_isapi - Apache HTTP Server +mod_isapi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_isapi

    ֽ ƴմϴ. @@ -43,7 +49,12 @@ ϱ ٶ. ̷ ġ ϸƮ ׺ ø .

    -
    top

    @@ -312,8 +320,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_isapi.xml b/docs/manual/mod/mod_isapi.xml index 0e46499b415..3b10c9e861d 100644 --- a/docs/manual/mod/mod_isapi.xml +++ b/docs/manual/mod/mod_isapi.xml @@ -51,9 +51,9 @@ it to them with their file extensions. To enable any .dll file to be processed as an ISAPI extension, edit the httpd.conf file and add the following line:

    - + AddHandler isapi-handler .dll - + In older versions of the Apache server, isapi-isa was the proper handler name, rather than @@ -66,9 +66,9 @@ requested module loaded. However, you may preload and keep a specific module loaded by using the following syntax in your httpd.conf:

    - + ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll - +

    Whether or not you have preloaded an ISAPI extension, all ISAPI extensions are governed by the same permissions and @@ -212,7 +212,7 @@ GetServerVariable, as well as the ALL_HTTP and ALL_RAW values.

    -

    Apache httpd 2.0+ mod_isapi supports additional +

    Since httpd 2.0, mod_isapi supports additional features introduced in later versions of the ISAPI specification, as well as limited emulation of async I/O and the TransmitFile semantics. Apache httpd also supports preloading diff --git a/docs/manual/mod/mod_isapi.xml.fr b/docs/manual/mod/mod_isapi.xml.fr new file mode 100644 index 00000000000..7850e76cf04 --- /dev/null +++ b/docs/manual/mod/mod_isapi.xml.fr @@ -0,0 +1,352 @@ + + + + + + + + + + + +mod_isapi +Extensions ISAPI dans Apache pour Windows +Base +mod_isapi.c +isapi_module +Win32 only + +

    +

    Ce module implémente l'API des extensions du Serveur Internet. Il + permet à Apache pour Windows de servir les extensions du Serveur + Internet (par exemple les modules .dll ISAPI), compte tenu des + restrictions spécifiées.

    + +

    Les modules d'extension ISAPI (fichiers .dll) sont des modules + tiers. Leur auteur n'est pas le Groupe Apache, et nous n'assurons + donc pas leur support. Veuillez contacter directement l'auteur + d'ISAPI si vous rencontrez des problèmes à l'exécution d'une + extension ISAPI. Merci de ne pas soumettre ce genre + de problème dans les listes d'Apache ou dans les pages de rapports + de bogues.

    +
    + +
    Utilisation + +

    Dans le fichier de configuration du serveur, utilisez la + directive AddHandler pour + associer les fichiers ISAPI au gestionnaire + isapi-handler à l'aide de l'extension de leur nom de + fichier. Pour faire en sorte que tout fichier .dll soit traité en + tant qu'extension ISAPI, éditez le fichier httpd.conf et ajoutez les + lignes suivantes :

    + + AddHandler isapi-handler .dll + + + Dans les versions plus anciennes du serveur Apache, le nom du + gestionnaire était isapi-isa au lieu de + isapi-handler. Depuis les versions de développement 2.3 + du serveur Apache, isapi-isa n'est plus valide, et vous + devrez éventuellement modifier votre configuration pour utiliser + isapi-handler à la place. + +

    Le serveur Apache ne propose aucun moyen de conserver en mémoire + un module chargé. Vous pouvez cependant précharger et garder un + module spécifique en mémoire en utilisant la syntaxe suivante dans + votre httpd.conf :

    + + ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll + + +

    Que vous ayez ou non préchargé une extension ISAPI, ces dernières + sont toutes soumises au mêmes restrictions et possèdent les mêmes + permissions que les scripts CGI. En d'autres termes, Options ExecCGI doit être + défini pour le répertoire qui contient le fichier .dll ISAPI.

    + +

    Reportez-vous aux Notes additionnelles et au + Journal du programmeur pour plus de détails + et une clarification à propos du support spécifique ISAPI fourni par + le module mod_isapi.

    +
    + +
    Notes additionnelles + +

    L'implémentation ISAPI d'Apache se conforme à toutes les + spécifications ISAPI 2.0, à l'exception de certaines extensions + "spécifiques Microsoft" utilisant des entrées/sorties asynchrones. + Le modèle des entrées/sorties d'Apache ne permet pas l'écriture et + la lecture asynchrone de la manière dont ISAPI pourrait le faire. Si + une extension tente d'utiliser des fonctionnalités non supportées, + comme les entrées/sorties asynchrones, un message est enregistré + dans le journal des erreurs afin d'aider au débogage. Comme ces + messages peuvent devenir envahissants, la directive + ISAPILogNotSupported Off permet de filter ce bruit de + fond.

    + +

    Si aucune option de configuration particulière n'est spécifiée, + certains serveurs, comme Microsoft IIS, chargent l'extension ISAPI + dans le serveur et la conservent en mémoire jusqu'à ce que + l'utilisation de cette dernière devienne trop élevée. Apache, par + contre, charge et décharge réellement l'extension ISAPI chaque fois + qu'elle est invoquée, si la directive ISAPICacheFile n'a pas été spécifiée. + Ce n'est pas très performant, mais le modèle de mémoire d'Apache + fait que cette méthode est la plus efficace. De nombreux modules + ISAPI présentent des incompatibilités subtiles avec le serveur + Apache, et le déchargement de ces modules permet d'assurer la + stabilité du serveur.

    + +

    En outre, gardez à l'esprit que si Apache supporte les extensions + ISAPI, il ne supporte pas les filtres ISAPI. Le + support des filtres sera peut-être ajouté dans le futur, mais n'a + pas encore été planifié.

    +
    + +
    Journal du programmeur + +

    Si vous écrivez des modules mod_isapi Apache + 2.0, vous devez limiter vos appels à + ServerSupportFunction aux directives suivantes :

    + +
    +
    HSE_REQ_SEND_URL_REDIRECT_RESP
    +
    Redirige l'utilisateur vers une autre adresse.
    + Il doit s'agir d'une URL pleinement qualifiée (comme + http://serveur/chemin).
    + +
    HSE_REQ_SEND_URL
    +
    Redirige l'utilisateur vers une autre adresse.
    + Ce ne doit pas être une URL pleinement qualifiée ; la mention du + protocole ou du nom du serveur n'est pas autorisée (par exemple, + utilisez simplement /chemin).
    + La redirection n'est pas assurée par le navigateur mais par le + serveur lui-même.
    + Avertissement +

    Dans sa documentation récente, Microsoft semble avoir + abandonné la distinction entre les deux fonctions + HSE_REQ_SEND_URL. Apache, quant à lui, continue de + les traiter comme deux fonctions distinctes avec des contraintes + et des comportements spécifiques.

    +
    + +
    HSE_REQ_SEND_RESPONSE_HEADER
    +
    Apache accepte un corps de réponse après l'en-tête s'il se + situe après la ligne vide (deux caractères newline consécutifs) + dans la chaîne des arguments d'en-têtes. Ce corps ne doit pas + contenir de caractères NULL, car l'argument des en-têtes est + lui-même terminé par un caractère NULL.
    + +
    HSE_REQ_DONE_WITH_SESSION
    +
    Apache considère ceci comme sans objet, car la session est + fermée lorsque l'extension ISAPI termine son traitement.
    + +
    HSE_REQ_MAP_URL_TO_PATH
    +
    Apache va traduire un nom virtuel en nom physique.
    + +
    HSE_APPEND_LOG_PARAMETER
    +
    + Ce paramètre peut intervenir dans un de ces journaux : + +
      +
    • dans le composant \"%{isapi-parameter}n\" + d'une directive CustomLog
    • + +
    • dans le composant %q avec la directive + ISAPIAppendLogToQuery + On
    • + +
    • dans le journal des erreurs avec la directive ISAPIAppendLogToErrors + On
    • +
    + +

    La première option, le composant + %{isapi-parameter}n, est préférable et toujours + disponible.

    +
    + +
    HSE_REQ_IS_KEEP_CONN
    +
    retourne le statut négocié Keep-Alive.
    + +
    HSE_REQ_SEND_RESPONSE_HEADER_EX
    +
    se comportera comme indiqué dans le documentation, bien que le + drapeau fKeepConn soit ignoré.
    + +
    HSE_REQ_IS_CONNECTED
    +
    renverra faux si la requête a été abandonnée.
    +
    + +

    Apache renvoie FALSE pour tout appel non supporté à + ServerSupportFunction, et GetLastError + renverra la valeur ERROR_INVALID_PARAMETER.

    + +

    ReadClient extrait la partie du corps de la requête + qui dépasse le tampon initial (défini par la directive ISAPIReadAheadBuffer). En fonction de + la définition de la directive + ISAPIReadAheadBuffer (nombre d'octets à + mettre dans le tampon avant d'appeler le gestionnaire ISAPI), les + requêtes courtes sont envoyées en entier à l'extension lorsque + celle-ci est invoquée. Si la taille de la requête est trop + importante, l'extension ISAPI doit faire appel à + ReadClient pour extraire la totalité du corps de la + requête.

    + +

    WriteClient est supporté, mais seulement avec le + drapeau HSE_IO_SYNC ou le drapeau "aucune option" + (valeur 0). Toute autre requête + WriteClient sera rejetée avec une valeur de retour + FALSE, et GetLastError renverra la valeur + ERROR_INVALID_PARAMETER

    + +

    GetServerVariable est supporté, bien que les + variables étendues de serveur n'existent pas (comme défini par + d'autres serveurs). Toutes les variables d'environnement CGI + usuelles d'Apache sont disponibles à partir de + GetServerVariable, ainsi que les valeurs + ALL_HTTP et ALL_RAW.

    + +

    Depuis httpd 2.0, mod_isapi propose des + fonctionnalités supplémentaires introduites dans les versions + actualisées de la spécification ISAPI, ainsi qu'une émulation + limitée des entrées/sorties asynchrones et la sémantique + TransmitFile. Apache httpd supporte aussi le préchargement + des .dlls ISAPI à des fins de performances.

    +
    + + +ISAPICacheFile +Fichiers .dll ISAPI devant être chargés au +démarrage +ISAPICacheFile chemin-fichier +[chemin-fichier] +... +server configvirtual host + + + +

    Cette directive permet de spécifier une liste, séparés par des + espaces, de noms de fichiers devant être chargés au démarrage + du serveur Apache, et rester en mémoire jusqu'à l'arrêt du serveur. + Cette directive peut être répétée pour chaque fichier .dll ISAPI + souhaité. Le chemin complet du fichier doit être spécifié. Si le + chemin n'est pas absolu, il sera considéré comme relatif au + répertoire défini par la directive ServerRoot.

    +
    +
    + + +ISAPIReadAheadBuffer +Taille du tampon de lecture anticipée envoyé aux extensions +ISAPI +ISAPIReadAheadBuffer taille +ISAPIReadAheadBuffer 49152 +server configvirtual host +directory.htaccess +FileInfo + + +

    Cette directive permet de définir la taille maximale du tampon de + lecture anticipée envoyé aux extensions ISAPI lorsqu'elles sont + initialement invoquées. Toute donnée restante doit être extraite en + faisant appel à ReadClient ; certaines extensions ISAPI + peuvent ne pas supporter la fonction ReadClient. + Pour plus de détails, veuillez vous adresser à l'auteur de + l'extension ISAPI.

    +
    +
    + + +ISAPILogNotSupported +Journalisation des demandes de fonctionnalités non +supportées de la part des extensions ISAPI +ISAPILogNotSupported on|off +ISAPILogNotSupported off +server configvirtual host +directory.htaccess +FileInfo + + +

    Cette directive permet d'enregistrer dans le journal des erreurs + toutes les demandes de fonctionnalités non supportées de la part des + extensions ISAPI. Ceci peut aider les administrateurs à décortiquer + certains problèmes. Lorsqu'elle a été définie à "on" et si tous les + modules ISAPI fonctionnent, elle peut être redéfinie à "off".

    +
    +
    + + +ISAPIAppendLogToErrors +Enregistrement des requêtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans le journal des erreurs +ISAPIAppendLogToErrors on|off +ISAPIAppendLogToErrors off +server configvirtual host +directory.htaccess +FileInfo + + +

    Cette directive permet d'enregistrer les requêtes + HSE_APPEND_LOG_PARAMETER de la part des extensions + ISAPI dans le journal des erreurs.

    +
    +
    + + +ISAPIAppendLogToQuery +Enregistre les requêtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans la partie arguments de la requête +ISAPIAppendLogToQuery on|off +ISAPIAppendLogToQuery on +server configvirtual host +directory.htaccess +FileInfo + + +

    Cette directive permet d'enregistrer les requêtes + HSE_APPEND_LOG_PARAMETER de la part des extensions + ISAPI dans la partie arguments de la requête (ajouté au composant + %q de la directive CustomLog).

    +
    +
    + + +ISAPIFakeAsync +Emulation du support des entrées/sorties asynchrones pour +les appels ISAPI +ISAPIFakeAsync on|off +ISAPIFakeAsync off +server configvirtual host +directory.htaccess +FileInfo + + +

    Lorsquelle est définie à "on", cette directive permet d'émuler le + support des entrées/sorties asynchrones pour les appels ISAPI.

    +
    +
    + + + diff --git a/docs/manual/mod/mod_isapi.xml.ko b/docs/manual/mod/mod_isapi.xml.ko index 89b1b0f7dae..4bd4694133d 100644 --- a/docs/manual/mod/mod_isapi.xml.ko +++ b/docs/manual/mod/mod_isapi.xml.ko @@ -1,7 +1,7 @@ - + -mod_lbmethod_bybusyness - Apache HTTP Server +mod_lbmethod_bybusyness - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_lbmethod_bybusyness

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -34,17 +40,17 @@ It requires the services of mod_proxy_balancer, and provides the bybusyness load balancing method.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Pending Request Counting Algorithm

    @@ -68,8 +74,30 @@ provides the bybusyness load balancing method.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_bybusyness.html.fr b/docs/manual/mod/mod_lbmethod_bybusyness.html.fr new file mode 100644 index 00000000000..b65a210666c --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_bybusyness.html.fr @@ -0,0 +1,109 @@ + + + + + +mod_lbmethod_bybusyness - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_lbmethod_bybusyness

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Pending Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    Status:Extension
    + + + +
    Description:Algorithme de planification avec rpartition de charge de +l'attribution des requtes en attente pour le module +mod_proxy_balancer
    Statut:Extension
    IdentificateurdeModule:lbmethod_bybusyness_module
    FichierSource:mod_lbmethod_bybusyness.c
    Compatibilit:Dissoci de mod_proxy_balancer depuis la +version 2.3
    +

    Sommaire

    + +

    Ce module ne fournit pas lui-mme de directive de configuration. Il +ncessite les services de mod_proxy_balancer, et +fournit la mthode de rpartition de charge bybusyness.

    +
    +

    Sujets

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    +
    top
    +
    +

    Algorithme d'attribution des requtes en attente

    + + + +

    Activ via lbmethod=bybusyness, ce planificateur + surveille le nombre de requtes assignes chaque processus worker + l'instant prsent. Une nouvelle requte est automatiquement + assigne au processus worker auquel est assign le plus petit nombre de + requtes. Ceci s'avre utile dans le cas o les + processus worker mettent en file d'attente les requtes entrantes + indpendamment d'Apache, et permet de s'assurer que la longueur des + files reste raisonnable, et qu'une requte est toujours assigne au + processus worker qui sera mme de la servir le plus + rapidement et avec une latence rduite.

    + +

    Si plusieurs processus worker s'avrent les moins chargs, le + choix d'un de ces derniers est effectu partir des statistiques + (et des estimations de charges) qu'utilise la mthode de dcompte + des requtes. Au fil du temps, la distribution des tches finit par + ressembler celle de byrequests (tel qu'implment par + mod_lbmethod_byrequests).

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_bybusyness.xml.fr b/docs/manual/mod/mod_lbmethod_bybusyness.xml.fr new file mode 100644 index 00000000000..034befead0a --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_bybusyness.xml.fr @@ -0,0 +1,69 @@ + + + + + + + + + + + +mod_lbmethod_bybusyness +Algorithme de planification avec répartition de charge de +l'attribution des requêtes en attente pour le module +mod_proxy_balancer +Extension +mod_lbmethod_bybusyness.c +lbmethod_bybusyness_module +Dissocié de mod_proxy_balancer depuis la +version 2.3 + + +

    Ce module ne fournit pas lui-même de directive de configuration. Il +nécessite les services de mod_proxy_balancer, et +fournit la méthode de répartition de charge bybusyness.

    +
    +mod_proxy +mod_proxy_balancer + +
    + + Algorithme d'attribution des requêtes en attente + +

    Activé via lbmethod=bybusyness, ce planificateur + surveille le nombre de requêtes assignées à chaque processus worker + à l'instant présent. Une nouvelle requête est automatiquement + assignée au processus worker auquel est assigné le plus petit nombre de + requêtes. Ceci s'avère utile dans le cas où les + processus worker mettent en file d'attente les requêtes entrantes + indépendamment d'Apache, et permet de s'assurer que la longueur des + files reste raisonnable, et qu'une requête est toujours assignée au + processus worker qui sera à même de la servir le plus + rapidement et avec une latence réduite.

    + +

    Si plusieurs processus worker s'avèrent les moins chargés, le + choix d'un de ces derniers est effectué à partir des statistiques + (et des estimations de charges) qu'utilise la méthode de décompte + des requêtes. Au fil du temps, la distribution des tâches finit par + ressembler à celle de byrequests (tel qu'implémenté par + mod_lbmethod_byrequests).

    + +
    + +
    diff --git a/docs/manual/mod/mod_lbmethod_bybusyness.xml.meta b/docs/manual/mod/mod_lbmethod_bybusyness.xml.meta index c5acd9b5da8..5901d6dcb72 100644 --- a/docs/manual/mod/mod_lbmethod_bybusyness.xml.meta +++ b/docs/manual/mod/mod_lbmethod_bybusyness.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_lbmethod_byrequests.html b/docs/manual/mod/mod_lbmethod_byrequests.html index 0cc1f2cfcc3..7a00cef9976 100644 --- a/docs/manual/mod/mod_lbmethod_byrequests.html +++ b/docs/manual/mod/mod_lbmethod_byrequests.html @@ -3,3 +3,7 @@ URI: mod_lbmethod_byrequests.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_lbmethod_byrequests.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_lbmethod_byrequests.html.en b/docs/manual/mod/mod_lbmethod_byrequests.html.en index a5202ee01e6..94b59de6529 100644 --- a/docs/manual/mod/mod_lbmethod_byrequests.html.en +++ b/docs/manual/mod/mod_lbmethod_byrequests.html.en @@ -1,27 +1,33 @@ - -mod_lbmethod_byrequests - Apache HTTP Server +mod_lbmethod_byrequests - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_lbmethod_byrequests

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -34,17 +40,17 @@ It requires the services of mod_proxy_balancer, and provides the byrequests load balancing method..

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Request Counting Algorithm

    @@ -55,7 +61,7 @@ provides the byrequests load balancing method..

    of the number of requests. It works as follows:

    lbfactor is how much we expect this worker - to work, or the workers's work quota. This is + to work, or the workers' work quota. This is a normalized value representing their "share" of the amount of work to be done.

    @@ -220,8 +226,30 @@ candidate lbstatus -= total factor
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_byrequests.html.fr b/docs/manual/mod/mod_lbmethod_byrequests.html.fr new file mode 100644 index 00000000000..b355b8bf3c3 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_byrequests.html.fr @@ -0,0 +1,264 @@ + + + + + +mod_lbmethod_byrequests - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_lbmethod_byrequests

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Request Counting load balancer scheduler algorithm for mod_proxy_balancer
    Status:Extension
    + + + +
    Description:Algorithme de planification avec rpartition de charge du +traitement des requtes pour le module +mod_proxy_balancer
    Statut:Extension
    IdentificateurdeModule:lbmethod_byrequests_module
    FichierSource:mod_lbmethod_byrequests.c
    Compatibilit:Dissoci de mod_proxy_balancer dans la +version 2.3
    +

    Sommaire

    + +

    Ce module ne fournit pas lui-mme de directive de configuration. Il +ncessite les services de mod_proxy_balancer, et +fournit la mthode de rpartition de charge byrequests.

    +
    +

    Sujets

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    +
    top
    +
    +

    Algorithme d'attribution des requtes

    + +

    Activ via lbmethod=byrequests, ce planificateur + t conu dans le but de distribuer les requtes tous les + processus worker afin qu'ils traitent tous le nombre de requtes + pour lequel ils ont t configurs. Il fonctionne de la manire + suivante :

    + +

    lbfactor correspond la quantit de travail que + nous attendons de ce processus worker, ou en d'autres termes + son quota de travail. C'est une valeur normalise + reprsentant leur part du travail accomplir.

    + +

    lbstatus reprsente combien il est urgent que + ce processus worker travaille pour remplir son quota de + travail.

    + +

    Le worker est un membre du dispositif de rpartition + de charge, en gnral un serveur distant traitant un des protocoles + supports.

    + +

    On distribue chaque processus worker son quota de travail, puis + on regarde celui qui a le plus besoin de travailler + (le plus grand lbstatus). Ce processus est alors slectionn pour + travailler, et son lbstatus diminu de l'ensemble des quotas de + travail que nous avons distribus tous les processus. La somme de + tous les lbstatus n'est ainsi pas modifie, et nous pouvons + distribuer les requtes selon nos souhaits.

    + +

    Si certains processus workers sont dsactivs, les autres feront + l'objet d'une planification normale.

    + +
    for each worker in workers
    +    worker lbstatus += worker lbfactor
    +    total factor    += worker lbfactor
    +    if worker lbstatus > candidate lbstatus
    +        candidate = worker
    +
    +candidate lbstatus -= total factor
    + +

    Si un rpartiteur de charge est configur comme suit :

    + + + + + + + + + + + + + + + + +
    workerabcd
    lbfactor25252525
    lbstatus0000
    + +

    Et si b est dsactiv, la planification suivante est + mise en oeuvre :

    + + + + + + + + + + + + + + + + + + + + + + +
    workerabcd
    lbstatus-5002525
    lbstatus-250-2550
    lbstatus0000
    (repeat)
    + +

    C'est dire la chronologie suivante : a c + d + a c d a c + d ... Veuillez noter que :

    + + + + + + + + + + + +
    workerabcd
    lbfactor25252525
    + +

    A le mme effet que :

    + + + + + + + + + + + +
    workerabcd
    lbfactor1111
    + +

    Ceci est d au fait que toutes les valeurs de lbfactor + sont normalises et values en fonction des autres. Avec :

    + + + + + + + + + +
    workerabc
    lbfactor141
    + +

    le processus b va, en moyenne, se voir assigner 4 fois + plus de requtes que a et c.

    + +

    La configuration suivante, asymtrique, fonctionne comme on peut + s'y attendre :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    workerab
    lbfactor7030
     
    lbstatus-3030
    lbstatus40-40
    lbstatus10-10
    lbstatus-2020
    lbstatus-5050
    lbstatus20-20
    lbstatus-1010
    lbstatus-4040
    lbstatus30-30
    lbstatus00
    (repeat)
    + +

    Aprs 10 distributions, la planification se rpte et 7 + a sont slectionns avec 3 b intercals.

    +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_byrequests.xml b/docs/manual/mod/mod_lbmethod_byrequests.xml index a9a718153b9..41be7d0e7a7 100644 --- a/docs/manual/mod/mod_lbmethod_byrequests.xml +++ b/docs/manual/mod/mod_lbmethod_byrequests.xml @@ -46,7 +46,7 @@ provides the byrequests load balancing method..

    of the number of requests. It works as follows:

    lbfactor is how much we expect this worker - to work, or the workers's work quota. This is + to work, or the workers' work quota. This is a normalized value representing their "share" of the amount of work to be done.

    diff --git a/docs/manual/mod/mod_lbmethod_byrequests.xml.fr b/docs/manual/mod/mod_lbmethod_byrequests.xml.fr new file mode 100644 index 00000000000..816d8799523 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_byrequests.xml.fr @@ -0,0 +1,231 @@ + + + + + + + + + + + +mod_lbmethod_byrequests +Algorithme de planification avec répartition de charge du +traitement des requêtes pour le module +mod_proxy_balancer +Extension +mod_lbmethod_byrequests.c +lbmethod_byrequests_module +Dissocié de mod_proxy_balancer dans la +version 2.3 + + +

    Ce module ne fournit pas lui-même de directive de configuration. Il +nécessite les services de mod_proxy_balancer, et +fournit la méthode de répartition de charge byrequests.

    +
    +mod_proxy +mod_proxy_balancer + +
    + Algorithme d'attribution des requêtes +

    Activé via lbmethod=byrequests, ce planificateur à + été conçu dans le but de distribuer les requêtes à tous les + processus worker afin qu'ils traitent tous le nombre de requêtes + pour lequel ils ont été configurés. Il fonctionne de la manière + suivante :

    + +

    lbfactor correspond à la quantité de travail que + nous attendons de ce processus worker, ou en d'autres termes + son quota de travail. C'est une valeur normalisée + représentant leur part du travail à accomplir.

    + +

    lbstatus représente combien il est urgent que + ce processus worker travaille pour remplir son quota de + travail.

    + +

    Le worker est un membre du dispositif de répartition + de charge, en général un serveur distant traitant un des protocoles + supportés.

    + +

    On distribue à chaque processus worker son quota de travail, puis + on regarde celui qui a le plus besoin de travailler + (le plus grand lbstatus). Ce processus est alors sélectionné pour + travailler, et son lbstatus diminué de l'ensemble des quotas de + travail que nous avons distribués à tous les processus. La somme de + tous les lbstatus n'est ainsi pas modifiée, et nous pouvons + distribuer les requêtes selon nos souhaits.

    + +

    Si certains processus workers sont désactivés, les autres feront + l'objet d'une planification normale.

    + +
    for each worker in workers
    +    worker lbstatus += worker lbfactor
    +    total factor    += worker lbfactor
    +    if worker lbstatus > candidate lbstatus
    +        candidate = worker
    +
    +candidate lbstatus -= total factor
    +
    + +

    Si un répartiteur de charge est configuré comme suit :

    + + + + + + + + + + + + + + + + + +
    workerabcd
    lbfactor25252525
    lbstatus0000
    + +

    Et si b est désactivé, la planification suivante est + mise en oeuvre :

    + + + + + + + + + + + + + + + + + + + + + + + +
    workerabcd
    lbstatus-5002525
    lbstatus-250-2550
    lbstatus0000
    (repeat)
    + +

    C'est à dire la chronologie suivante : a c + d + a c d a c + d ... Veuillez noter que :

    + + + + + + + + + + + + +
    workerabcd
    lbfactor25252525
    + +

    A le même effet que :

    + + + + + + + + + + + + +
    workerabcd
    lbfactor1111
    + +

    Ceci est dû au fait que toutes les valeurs de lbfactor + sont normalisées et évaluées en fonction des autres. Avec :

    + + + + + + + + + + +
    workerabc
    lbfactor141
    + +

    le processus b va, en moyenne, se voir assigner 4 fois + plus de requêtes que a et c.

    + +

    La configuration suivante, asymétrique, fonctionne comme on peut + s'y attendre :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    workerab
    lbfactor7030
     
    lbstatus-3030
    lbstatus40-40
    lbstatus10-10
    lbstatus-2020
    lbstatus-5050
    lbstatus20-20
    lbstatus-1010
    lbstatus-4040
    lbstatus30-30
    lbstatus00
    (repeat)
    + +

    Après 10 distributions, la planification se répète et 7 + a sont sélectionnés avec 3 b intercalés.

    +
    + +
    diff --git a/docs/manual/mod/mod_lbmethod_byrequests.xml.meta b/docs/manual/mod/mod_lbmethod_byrequests.xml.meta index 47f906a6146..d167df8c29e 100644 --- a/docs/manual/mod/mod_lbmethod_byrequests.xml.meta +++ b/docs/manual/mod/mod_lbmethod_byrequests.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_lbmethod_bytraffic.html b/docs/manual/mod/mod_lbmethod_bytraffic.html index 99ff4a6a77f..74c1f9d12c3 100644 --- a/docs/manual/mod/mod_lbmethod_bytraffic.html +++ b/docs/manual/mod/mod_lbmethod_bytraffic.html @@ -3,3 +3,7 @@ URI: mod_lbmethod_bytraffic.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_lbmethod_bytraffic.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_lbmethod_bytraffic.html.en b/docs/manual/mod/mod_lbmethod_bytraffic.html.en index a5ca633beb5..88f075517e9 100644 --- a/docs/manual/mod/mod_lbmethod_bytraffic.html.en +++ b/docs/manual/mod/mod_lbmethod_bytraffic.html.en @@ -1,27 +1,33 @@ - -mod_lbmethod_bytraffic - Apache HTTP Server +mod_lbmethod_bytraffic - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_lbmethod_bytraffic

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -34,17 +40,17 @@ It requires the services of mod_proxy_balancer, and provides the bytraffic load balancing method..

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Weighted Traffic Counting Algorithm

    @@ -84,8 +90,30 @@ provides the bytraffic load balancing method..

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_bytraffic.html.fr b/docs/manual/mod/mod_lbmethod_bytraffic.html.fr new file mode 100644 index 00000000000..57a19bd4636 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_bytraffic.html.fr @@ -0,0 +1,125 @@ + + + + + +mod_lbmethod_bytraffic - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_lbmethod_bytraffic

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Weighted Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    Status:Extension
    + + + +
    Description:Algorithme de planification avec rpartition de charge en +fonction d'un niveau de trafic pour le module +mod_proxy_balancer
    Statut:Extension
    IdentificateurdeModule:lbmethod_bytraffic_module
    FichierSource:mod_lbmethod_bytraffic.c
    Compatibilit:Dissoci de mod_proxy_balancer depuis la +version 2.3
    +

    Sommaire

    + +

    Ce module ne fournit pas lui-mme de directive de configuration. Il +ncessite les services de mod_proxy_balancer, et +fournit la mthode de rpartition de charge bytraffic.

    +
    + +
    top
    +
    +

    Algorithme de rpartition en fonction d'un certain + trafic

    + +

    Activ via lbmethod=bytraffic, l'ide directrice de + ce planificateur est similaire celle de la mthode reposant sur le + nombre de requtes, avec les diffrences suivantes :

    + +

    lbfactor reprsente la quantit de trafic, en + octets, que nous voulons voir traite par le processus. Il + s'agit l aussi d'une valeur normalise reprsentant la part de + travail effectuer par le processus, mais au lieu de se baser sur + un nombre de requtes, on prend en compte la quantit de trafic que + ce processus a trait.

    + +

    Si un rpartiteur est configur comme suit :

    + + + + + + + + + +
    workerabc
    lbfactor121
    + +

    Cela signifie que nous souhaitons que b traite 2 fois + plus d'octets que a ou c. Cela n'entrane pas + ncessairement que b va traiter deux fois plus de + requtes, mais qu'il va traiter deux fois plus de trafic en termes + d'entres/sorties. A cet effet, les tailles de la requte et de sa + rponse assoccie sont prises en compte par l'algorithme de + slection et d'valuation du trafic.

    + +

    Note : les octets en entre sont valus avec la mme pondration + que les octets en sortie.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_bytraffic.xml.fr b/docs/manual/mod/mod_lbmethod_bytraffic.xml.fr new file mode 100644 index 00000000000..68e8451a364 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_bytraffic.xml.fr @@ -0,0 +1,85 @@ + + + + + + + + + + + +mod_lbmethod_bytraffic +Algorithme de planification avec répartition de charge en +fonction d'un niveau de trafic pour le module +mod_proxy_balancer +Extension +mod_lbmethod_bytraffic.c +lbmethod_bytraffic_module +Dissocié de mod_proxy_balancer depuis la +version 2.3 + + +

    Ce module ne fournit pas lui-même de directive de configuration. Il +nécessite les services de mod_proxy_balancer, et +fournit la méthode de répartition de charge bytraffic.

    +
    +mod_proxy +mod_proxy_balancer + +
    + Algorithme de répartition en fonction d'un certain + trafic +

    Activé via lbmethod=bytraffic, l'idée directrice de + ce planificateur est similaire à celle de la méthode reposant sur le + nombre de requêtes, avec les différences suivantes :

    + +

    lbfactor représente la quantité de trafic, en + octets, que nous voulons voir traitée par le processus. Il + s'agit là aussi d'une valeur normalisée représentant la part de + travail à effectuer par le processus, mais au lieu de se baser sur + un nombre de requêtes, on prend en compte la quantité de trafic que + ce processus a traité.

    + +

    Si un répartiteur est configuré comme suit :

    + + + + + + + + + + +
    workerabc
    lbfactor121
    + +

    Cela signifie que nous souhaitons que b traite 2 fois + plus d'octets que a ou c. Cela n'entraîne pas + nécessairement que b va traiter deux fois plus de + requêtes, mais qu'il va traiter deux fois plus de trafic en termes + d'entrées/sorties. A cet effet, les tailles de la requête et de sa + réponse assocciée sont prises en compte par l'algorithme de + sélection et d'évaluation du trafic.

    + +

    Note : les octets en entrée sont évalués avec la même pondération + que les octets en sortie.

    + +
    + +
    diff --git a/docs/manual/mod/mod_lbmethod_bytraffic.xml.meta b/docs/manual/mod/mod_lbmethod_bytraffic.xml.meta index acd2a9bb28e..f746a856423 100644 --- a/docs/manual/mod/mod_lbmethod_bytraffic.xml.meta +++ b/docs/manual/mod/mod_lbmethod_bytraffic.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.html b/docs/manual/mod/mod_lbmethod_heartbeat.html index bcea1f84948..2a97af74f78 100644 --- a/docs/manual/mod/mod_lbmethod_heartbeat.html +++ b/docs/manual/mod/mod_lbmethod_heartbeat.html @@ -3,3 +3,7 @@ URI: mod_lbmethod_heartbeat.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_lbmethod_heartbeat.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.html.en b/docs/manual/mod/mod_lbmethod_heartbeat.html.en index 959598897d6..220c28a1623 100644 --- a/docs/manual/mod/mod_lbmethod_heartbeat.html.en +++ b/docs/manual/mod/mod_lbmethod_heartbeat.html.en @@ -1,48 +1,60 @@ - -mod_lbmethod_heartbeat - Apache HTTP Server +mod_lbmethod_heartbeat - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_lbmethod_heartbeat

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    - - +
    Description: This document is still under development.
    Status:Extension
    +
    Description:Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer
    Status:Experimental
    ModuleIdentifier:lbmethod_heartbeat_module
    SourceFile:mod_lbmethod_heartbeat.c
    Compatibility:Available in version 2.3 and later

    Summary

    -
    This document is still under development.
    +

    lbmethod=heartbeat uses the services of mod_heartmonitor to balance between origin servers that are providing +heartbeat info via the mod_heartbeat module.

    + +

    This modules load balancing algorithm favors servers with more ready (idle) +capacity over time, but does not select the server with the most ready capacity +every time. Servers that have 0 active clients are penalized, with the +assumption that they are not fully initialized.

    +
  • Comments
  • top

    HeartbeatStorage Directive

    @@ -51,16 +63,40 @@ Syntax:HeartbeatStorage file-path Default:HeartbeatStorage logs/hb.dat Context:server config -Status:Extension +Status:Experimental Module:mod_lbmethod_heartbeat -
    This document is still under development.
    +

    The HeartbeatStorage directive specifies the + path to read heartbeat data. This flat-file is used only when + mod_slotmem_shm is not loaded.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.html.fr b/docs/manual/mod/mod_lbmethod_heartbeat.html.fr new file mode 100644 index 00000000000..2718b37f384 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_heartbeat.html.fr @@ -0,0 +1,109 @@ + + + + + +mod_lbmethod_heartbeat - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_lbmethod_heartbeat

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Algorithme d'ordonnancement de rpartition de charge pour +mod_proxy_balancer bas sur le comptage de trafic Heartbeat
    Statut:Exprimental
    IdentificateurdeModule:lbmethod_heartbeat_module
    FichierSource:mod_lbmethod_heartbeat.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    lbmethod=heartbeat utilise les services du module + mod_heartmonitor pour rpartir la charge entre les + serveurs d'origine qui fournissent des donnes heartbeat via le + module mod_heartbeat.

    + +

    Son algorithme de rpartition de charge favorise les serveurs dont la +capacit de traitement moyenne rpartie dans le temps est la plus +importante, mais il ne slectionne pas forcment le serveur qui prsente +la disponibilit instantane la plus importante. Les serveurs qui ne +possdent aucun client actif sont pnaliss, car ils sont considrs +comme non entirement initialiss.

    +
    + + +
    top
    +

    Directive HeartbeatStorage

    + + + + + + + +
    Description:Indique le chemin permettant de lire les donnes +heartbeat
    Syntaxe:HeartbeatStorage chemin-fichier
    Dfaut:HeartbeatStorage logs/hb.dat
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lbmethod_heartbeat
    +

    La directive HeartbeatStorage permet de + spcifier le chemin d'accs aux donnes heartbeat. Ce fichier texte + n'est utilis que si le module mod_slotmem_shm + n'est pas charg.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.xml b/docs/manual/mod/mod_lbmethod_heartbeat.xml index 7e831c55e54..9dd28f00122 100644 --- a/docs/manual/mod/mod_lbmethod_heartbeat.xml +++ b/docs/manual/mod/mod_lbmethod_heartbeat.xml @@ -23,15 +23,24 @@ mod_lbmethod_heartbeat - This document is still under development. -Extension +Heartbeat Traffic Counting load balancer scheduler algorithm for mod_proxy_balancer +Experimental mod_lbmethod_heartbeat.c lbmethod_heartbeat_module Available in version 2.3 and later - This document is still under development. +

    lbmethod=heartbeat uses the services of mod_heartmonitor to balance between origin servers that are providing +heartbeat info via the mod_heartbeat module.

    + +

    This modules load balancing algorithm favors servers with more ready (idle) +capacity over time, but does not select the server with the most ready capacity +every time. Servers that have 0 active clients are penalized, with the +assumption that they are not fully initialized.

    + mod_proxy mod_proxy_balancer mod_heartbeat @@ -45,8 +54,9 @@ server config - This document is still under development. +

    The HeartbeatStorage directive specifies the + path to read heartbeat data. This flat-file is used only when + mod_slotmem_shm is not loaded.

    -
    diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.xml.fr b/docs/manual/mod/mod_lbmethod_heartbeat.xml.fr new file mode 100644 index 00000000000..8e9854a4441 --- /dev/null +++ b/docs/manual/mod/mod_lbmethod_heartbeat.xml.fr @@ -0,0 +1,69 @@ + + + + + + + + + + + +mod_lbmethod_heartbeat +Algorithme d'ordonnancement de répartition de charge pour +mod_proxy_balancer basé sur le comptage de trafic Heartbeat +Experimental +mod_lbmethod_heartbeat.c +lbmethod_heartbeat_module +Disponible depuis la version 2.3 d'Apache + + +

    lbmethod=heartbeat utilise les services du module + mod_heartmonitor pour répartir la charge entre les + serveurs d'origine qui fournissent des données heartbeat via le + module mod_heartbeat.

    + +

    Son algorithme de répartition de charge favorise les serveurs dont la +capacité de traitement moyenne répartie dans le temps est la plus +importante, mais il ne sélectionne pas forcément le serveur qui présente +la disponibilité instantanée la plus importante. Les serveurs qui ne +possèdent aucun client actif sont pénalisés, car ils sont considérés +comme non entièrement initialisés.

    +
    + +mod_proxy +mod_proxy_balancer +mod_heartbeat +mod_heartmonitor + + +HeartbeatStorage +Indique le chemin permettant de lire les données +heartbeat +HeartbeatStorage chemin-fichier +HeartbeatStorage logs/hb.dat +server config + + +

    La directive HeartbeatStorage permet de + spécifier le chemin d'accès aux données heartbeat. Ce fichier texte + n'est utilisé que si le module mod_slotmem_shm + n'est pas chargé.

    +
    +
    +
    diff --git a/docs/manual/mod/mod_lbmethod_heartbeat.xml.meta b/docs/manual/mod/mod_lbmethod_heartbeat.xml.meta index a2156919b3a..8438aa0868a 100644 --- a/docs/manual/mod/mod_lbmethod_heartbeat.xml.meta +++ b/docs/manual/mod/mod_lbmethod_heartbeat.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_ldap.html.en b/docs/manual/mod/mod_ldap.html.en index cb86ba54027..8a8bd36ec31 100644 --- a/docs/manual/mod/mod_ldap.html.en +++ b/docs/manual/mod/mod_ldap.html.en @@ -1,23 +1,28 @@ - -mod_ldap - Apache HTTP Server +mod_ldap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_ldap

    @@ -28,8 +33,7 @@ by other LDAP modules Status:Extension ModuleIdentifier:ldap_module -SourceFile:util_ldap.c -Compatibility:Available in version 2.0.41 and later +SourceFile:util_ldap.c

    Summary

    This module was created to improve the performance of @@ -43,19 +47,24 @@ by other LDAP modules flag to the configure script when building Apache.

    -

    SSL/TLS support is dependant on which LDAP toolkit has been +

    SSL/TLS support is dependent on which LDAP toolkit has been linked to APR. As of this writing, APR-util supports: OpenLDAP SDK (2.x or later), Novell LDAP - SDK, - Mozilla LDAP SDK, native Solaris LDAP SDK (Mozilla based), - native Microsoft LDAP SDK, or the - iPlanet - (Netscape) SDK. See the APR + SDK, + Mozilla LDAP SDK, native Solaris LDAP SDK (Mozilla based) or the + native Microsoft LDAP SDK. See the APR website for details.

    -
    top

    Example Configuration

    @@ -89,34 +95,31 @@ by other LDAP modules mod_ldap to increase the performance of HTTP Basic authentication provided by mod_authnz_ldap.

    -

    - # Enable the LDAP connection pool and shared
    - # memory cache. Enable the LDAP cache status
    - # handler. Requires that mod_ldap and mod_authnz_ldap
    - # be loaded. Change the "yourdomain.example.com" to
    - # match your domain.
    -
    - LDAPSharedCacheSize 500000
    - LDAPCacheEntries 1024
    - LDAPCacheTTL 600
    - LDAPOpCacheEntries 1024
    - LDAPOpCacheTTL 600
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Enable the LDAP connection pool and shared
    +# memory cache. Enable the LDAP cache status
    +# handler. Requires that mod_ldap and mod_authnz_ldap
    +# be loaded. Change the "yourdomain.example.com" to
    +# match your domain.
    +
    +LDAPSharedCacheSize 500000
    +LDAPCacheEntries 1024
    +LDAPCacheTTL 600
    +LDAPOpCacheEntries 1024
    +LDAPOpCacheTTL 600
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    +
    top

    LDAP Connection Pool

    @@ -141,10 +144,10 @@ by other LDAP modules credentials used when binding to an LDAP server. These credentials can be provided to LDAP servers that do not allow anonymous binds during referral chasing. To control - this feature, see the - LDAPReferrals and - LDAPReferralHopLimit directives. By default, - this feature is enabled.

    + this feature, see the + LDAPReferrals and + LDAPReferralHopLimit + directives. By default, this feature is enabled.

    top

    LDAP Cache

    @@ -210,13 +213,10 @@ by other LDAP modules following directives could be used to access the mod_ldap cache information:

    -

    - <Location /server/cache-info>
    - - SetHandler ldap-status
    -
    - </Location> -

    +
    <Location "/server/cache-info">
    +    SetHandler ldap-status
    +</Location>
    +

    By fetching the URL http://servername/cache-info, the administrator can get a status report of every cache that is used @@ -231,58 +231,53 @@ by other LDAP modules

    Using SSL/TLS

    The ability to create an SSL and TLS connections to an LDAP server - is defined by the directives - LDAPTrustedGlobalCert, - LDAPTrustedClientCert and - LDAPTrustedMode. These directives specify the CA and - optional client certificates to be used, as well as the type of - encryption to be used on the connection (none, SSL or TLS/STARTTLS).

    - -

    - # Establish an SSL LDAP connection on port 636. Requires that
    - # mod_ldap and mod_authnz_ldap be loaded. Change the
    - # "yourdomain.example.com" to match your domain.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/certfile.der
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    - -

    - # Establish a TLS LDAP connection on port 389. Requires that
    - # mod_ldap and mod_authnz_ldap be loaded. Change the
    - # "yourdomain.example.com" to match your domain.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/certfile.der
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
    - Require valid-user
    -
    - </Location> -

    + is defined by the directives + LDAPTrustedGlobalCert, + LDAPTrustedClientCert + and LDAPTrustedMode. + These directives specify the CA and optional client certificates to be used, + as well as the type of encryption to be used on the connection (none, SSL or + TLS/STARTTLS).

    + +
    # Establish an SSL LDAP connection on port 636. Requires that
    +# mod_ldap and mod_authnz_ldap be loaded. Change the
    +# "yourdomain.example.com" to match your domain.
    +
    +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der"
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + + +
    # Establish a TLS LDAP connection on port 389. Requires that
    +# mod_ldap and mod_authnz_ldap be loaded. Change the
    +# "yourdomain.example.com" to match your domain.
    +
    +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der"
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" TLS
    +    Require valid-user
    +</Location>
    +
    top
    @@ -315,29 +310,26 @@ by other LDAP modules an error when an attempt is made to contact the LDAP server at runtime.

    -

    - # Specify a Netscape CA certificate file
    - LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
    - # Specify an optional key3.db file for client certificate support
    - LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
    - # Specify the secmod file if required
    - LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - LDAPTrustedClientCert CERT_NICKNAME <nickname> [password]
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Specify a Netscape CA certificate file
    +LDAPTrustedGlobalCert CA_CERT7_DB "/certs/cert7.db"
    +# Specify an optional key3.db file for client certificate support
    +LDAPTrustedGlobalCert CERT_KEY3_DB "/certs/key3.db"
    +# Specify the secmod file if required
    +LDAPTrustedGlobalCert CA_SECMOD "/certs/secmod"
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    LDAPTrustedClientCert CERT_NICKNAME <nickname> [password]
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + @@ -357,16 +349,15 @@ by other LDAP modules LDAPTrustedMode parameter. If an ldaps:// URL is specified, SSL mode is forced, override this directive.

    -

    - # Specify two CA certificate files
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - # Specify a client certificate file and key
    - LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password]
    - # Do not use this directive, as it will throw an error
    - #LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    -

    +
    # Specify two CA certificate files
    +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
    +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
    +# Specify a client certificate file and key
    +LDAPTrustedGlobalCert CERT_BASE64 "/certs/cert1.pem"
    +LDAPTrustedGlobalCert KEY_BASE64 "/certs/key1.pem" [password]
    +# Do not use this directive, as it will throw an error
    +#LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
    + @@ -389,30 +380,27 @@ by other LDAP modules (ldaps://) support has been deprecated to be replaced with TLS, although the SSL functionality still works.

    -

    - # Specify two CA certificate files
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
    - # CA certs respecified due to per-directory client certs
    - LDAPTrustedClientCert CA_DER /certs/cacert1.der
    - LDAPTrustedClientCert CA_BASE64 /certs/cacert2.pem
    - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Specify two CA certificate files
    +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
    +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
    +    LDAPTrustedClientCert KEY_BASE64 "/certs/key1.pem"
    +    # CA certs respecified due to per-directory client certs
    +    LDAPTrustedClientCert CA_DER "/certs/cacert1.der"
    +    LDAPTrustedClientCert CA_BASE64 "/certs/cacert2.pem"
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + @@ -487,7 +475,17 @@ by other LDAP modules

    A setting of 0 causes connections to never be saved in the backend connection pool. The default value of -1, and any other negative value, - allows connections of any age to be reused.

    + allows connections of any age to be reused.

    + +

    For performance reasons, the reference time used by this directive is + based on when the LDAP connection is returned to the pool, not the time + of the last successful I/O with the LDAP server.

    + +

    Since 2.4.10, new measures are in place to avoid the reference time + from being inflated by cache hits or slow requests. First, the reference + time is not updated if no backend LDAP conncetions were needed. Second, + the reference time uses the time the HTTP request was received instead + of the time the request is completed.

    This timeout defaults to units of seconds, but accepts suffixes for milliseconds (ms), minutes (min), and hours (h). @@ -511,7 +509,7 @@ by other LDAP modules

    If a connection is not successful with the timeout period, either an error will be returned or the LDAP client library will attempt to connect to a secondary LDAP server if one is specified (via a space-separated list of hostnames in the - AuthLDAPURL).

    + AuthLDAPURL).

    The default is 10 seconds, if the LDAP client library linked with the server supports the LDAP_OPT_NETWORK_TIMEOUT option.

    @@ -593,7 +591,7 @@ valid Status:Extension Module:mod_ldap -

    This directive, if enabled by the LDAPReferrals directive, +

    This directive, if enabled by the LDAPReferrals directive, limits the number of referral hops that are followed before terminating an LDAP query.

    @@ -606,20 +604,75 @@ valid

    LDAPReferrals Directive

    - + +
    Description:Enable referral chasing during queries to the LDAP server.
    Syntax:LDAPReferrals On|Off
    Syntax:LDAPReferrals On|Off|default
    Default:LDAPReferrals On
    Context:directory, .htaccess
    Override:AuthConfig
    Status:Extension
    Module:mod_ldap
    Compatibility:The default parameter is available in Apache 2.4.7 and later

    Some LDAP servers divide their directory among multiple domains and use referrals - to direct a client when a domain boundary is crossed. By setting LDAPReferrals On - referrals will be chased (setting it to off causes referrals to be ignored). The directive - LDAPReferralHopLimit works in conjunction with this directive to limit the - number of referral hops to follow before terminating the LDAP query. When referral processing - is enabled client credentials will be provided, via a rebind callback, for any LDAP server - requiring them.

    + to direct a client when a domain boundary is crossed. This is similar to a HTTP redirect. + LDAP client libraries may or may not chase referrals by default. This directive + explicitly configures the referral chasing in the underlying SDK.

    + + +

    LDAPReferrals takes the following values:

    +
    +
    "on"
    +

    When set to "on", the underlying SDK's referral chasing state + is enabled, LDAPReferralHopLimit is used to + override the SDK's hop limit, and an LDAP rebind callback is + registered.

    +
    "off"
    +

    When set to "off", the underlying SDK's referral chasing state + is disabled completely.

    +
    "default"
    +

    When set to "default", the underlying SDK's referral chasing state + is not changed, LDAPReferralHopLimit is not + used to overide the SDK's hop limit, and no LDAP rebind callback is + registered.

    +
    + +

    The directive LDAPReferralHopLimit works in conjunction with + this directive to limit the number of referral hops to follow before terminating the LDAP query. + When referral processing is enabled by a value of "On", client credentials will be provided, + via a rebind callback, for any LDAP server requiring them.

    + +
    +
    top
    +

    LDAPRetries Directive

    + + + + + + + +
    Description:Configures the number of LDAP server retries.
    Syntax:LDAPRetries number-of-retries
    Default:LDAPRetries 3
    Context:server config
    Status:Extension
    Module:mod_ldap
    +

    The server will retry failed LDAP requests up to + LDAPRetries times. Setting this + directive to 0 disables retries.

    +

    LDAP errors such as timeouts and refused connections are retryable.

    + +
    +
    top
    +

    LDAPRetryDelay Directive

    + + + + + + + +
    Description:Configures the delay between LDAP server retries.
    Syntax:LDAPRetryDelay seconds
    Default:LDAPRetryDelay 0
    Context:server config
    Status:Extension
    Module:mod_ldap
    +

    If LDAPRetryDelay is set to a non-zero + value, the server will delay retrying an LDAP request for the + specified amount of time. Setting this directive to 0 will + result in any retry to occur without delay.

    + +

    LDAP errors such as timeouts and refused connections are retryable.

    top
    @@ -661,6 +714,7 @@ valid Context:server config Status:Extension Module:mod_ldap +Compatibility:Apache HTTP Server 2.3.5 and later

    This directive configures the timeout for bind and search operations, as well as the LDAP_OPT_TIMEOUT option in the underlying LDAP client library, when available.

    @@ -690,7 +744,7 @@ connection client certificates.

    It specifies the directory path, file name or nickname of a per connection client certificate used when establishing an SSL or TLS connection to an LDAP server. Different locations or - directories may have their own independant client certificate + directories may have their own independent client certificate settings. Some LDAP toolkits (notably Novell) do not support per connection client certificates, and will throw an error on LDAP server connection if you try to use this directive @@ -792,7 +846,28 @@ Certificate Authority or global client certificates

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ldap.html.fr b/docs/manual/mod/mod_ldap.html.fr index 9653155ac93..4c641c0e93e 100644 --- a/docs/manual/mod/mod_ldap.html.fr +++ b/docs/manual/mod/mod_ldap.html.fr @@ -1,23 +1,28 @@ - -mod_ldap - Serveur Apache HTTP +mod_ldap - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_ldap

    @@ -28,9 +33,7 @@ cache du rsultat destination des autres modules LDAP Statut:Extension IdentificateurdeModule:ldap_module -FichierSource:util_ldap.c -Compatibilit:Disponible partir de la version 2.0.41 -d'Apache +FichierSource:util_ldap.c

    Sommaire

    Ce module a t conu dans le but d'amliorer les performances @@ -48,13 +51,19 @@ d'Apache LDAP qui a t li APR. Au moment o ces lignes sont crites, APR-util supporte OpenLDAP SDK (version 2.x ou suprieure), Novell LDAP - SDK, - Mozilla LDAP SDK, le SDK LDAP propre Solaris (bas sur - Mozilla), le SDK LDAP propre Microsoft, ou le SDK iPlanet - (Netscape). Voir le site web APR pour plus de dtails.

    + SDK, + Mozilla LDAP SDK, le SDK LDAP Solaris natif (bas sur Mozilla) + ou le SDK LDAP Microsoft natif. Voir le site web APR pour plus de dtails.

    -
    top

    Exemple de configuration

    @@ -89,34 +95,31 @@ d'Apache l'authentification HTTP de base fournie par mod_authnz_ldap.

    -

    - # Active la conservation des connexions LDAP et le cache partag en
    - # mmoire. Active le gestionnaire de statut du cache LDAP.
    - # Ncessite le chargement de mod_ldap et de mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPSharedCacheSize 500000
    - LDAPCacheEntries 1024
    - LDAPCacheTTL 600
    - LDAPOpCacheEntries 1024
    - LDAPOpCacheTTL 600
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protg par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Active la conservation des connexions LDAP et le cache partag en
    +# mmoire. Active le gestionnaire de statut du cache LDAP.
    +# Ncessite le chargement de mod_ldap et de mod_authnz_ldap.
    +# Remplacez "votre-domaine.example.com" par le nom de votre
    +# domaine.
    +
    +LDAPSharedCacheSize 500000
    +LDAPCacheEntries 1024
    +LDAPCacheTTL 600
    +LDAPOpCacheEntries 1024
    +LDAPOpCacheTTL 600
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +    
    +    Require host yourdomain.example.com
    +    
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    +
    top

    Conservation des connexions LDAP

    @@ -219,13 +222,10 @@ d'Apache suivantes pour accder aux informations du cache de mod_ldap :

    -

    - <Location /serveur/infos-cache>
    - - SetHandler ldap-status
    -
    - </Location> -

    +
    <Location "/server/cache-info">
    +    SetHandler ldap-status
    +</Location>
    +

    En se connectant l'URL http://nom-serveur/infos-cache, l'administrateur peut @@ -242,61 +242,55 @@ d'Apache

    Utiliser SSL/TLS

    La possibilit de crer des connexions SSL et TLS avec un serveur - LDAP est dfinie par les directives - LDAPTrustedGlobalCert, - LDAPTrustedClientCert et + LDAP est dfinie par les directives + LDAPTrustedGlobalCert, + LDAPTrustedClientCert et LDAPTrustedMode. Ces directives permettent de spcifier l'autorit de certification (CA), les certificats clients ventuels, ainsi que le type de chiffrement utiliser pour la connexion (none, SSL ou TLS/STARTTLS).

    -

    - # Etablissement d'une connexion SSL LDAP sur le port 636.
    - # Ncessite le chargement de mod_ldap et mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/fichier-certificat.der
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protg par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    - -

    - # Etablissement d'une connexion TLS LDAP sur le port 389.
    - # Ncessite le chargement de mod_ldap et mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/fichier-certificat.der
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protg par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
    - Require valid-user
    -
    - </Location> -

    +
    # Etablissement d'une connexion SSL LDAP sur le port 636.
    +# Ncessite le chargement de mod_ldap et mod_authnz_ldap.
    +# Remplacez "votre-domaine.example.com" par le nom de votre
    +# domaine.
    +
    +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der"
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +    
    +    Require host yourdomain.example.com
    +    
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + + +
    # Etablissement d'une connexion TLS LDAP sur le port 389.
    +# Ncessite le chargement de mod_ldap et mod_authnz_ldap.
    +# Remplacez "votre-domaine.example.com" par le nom de votre
    +# domaine.
    +
    +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der"
    +
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +    
    +    Require host yourdomain.example.com
    +    
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" TLS
    +    Require valid-user
    +</Location>
    +
    top
    @@ -332,31 +326,27 @@ d'Apache de STARTTLS engendrera une erreur lors des tentatives de contacter le serveur LDAP pendant l'excution.

    -

    - # Spcifie un fichier de certificats de CA Netscape
    - LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
    - # Spcifie un fichier key3db optionnel pour le support des - # certificats clients
    - LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
    - # Spcifie le fichier secmod si ncessaire
    - LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protg par LDAP"
    - AuthBasicProvider ldap
    - LDAPTrustedClientCert CERT_NICKNAME <nickname> - [mot de passe]
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Spcifie un fichier de certificats de CA Netscape
    +LDAPTrustedGlobalCert CA_CERT7_DB "/certs/cert7.db"
    +# Spcifie un fichier key3db optionnel pour le support des
    +# certificats clients
    +LDAPTrustedGlobalCert CERT_KEY3_DB "/certs/key3.db"
    +# Spcifie le fichier secmod si ncessaire
    +LDAPTrustedGlobalCert CA_SECMOD "/certs/secmod"
    +<Location "/ldap-status">
    +    SetHandler ldap-status
    +
    +    Require host yourdomain.example.com
    +
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    LDAPTrustedClientCert CERT_NICKNAME <nickname> [password]
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + @@ -379,19 +369,17 @@ d'Apache ldaps:// est spcifie, le mode SSL est forc, et l'emporte sur cette directive.

    -

    - # Spcifie deux fichiers contenant des certificats de CA
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - # Spcifie un fichier contenant des certificats clients - # ainsi qu'une cl
    - LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [mot de - passe]
    - # N'utilisez pas cette directive, sous peine de provoquer - # une erreur
    - #LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    -

    +
    # Spcifie deux fichiers contenant des certificats de CA
    +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
    +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
    +# Spcifie un fichier contenant des certificats clients
    +# ainsi qu'une cl
    +LDAPTrustedGlobalCert CERT_BASE64 "/certs/cert1.pem"
    +LDAPTrustedGlobalCert KEY_BASE64 "/certs/key1.pem" [password]
    +# N'utilisez pas cette directive, sous peine de provoquer
    +# une erreur
    +#LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
    + @@ -414,27 +402,27 @@ d'Apache OpenLDAP indique que le support SSL (ldaps://) tend tre remplac par TLS, bien que le mode SSL fonctionne toujours.

    -

    - # Spcifie deux fichiers contenant des certificats de CA
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
    - Satisfy any
    - AuthType Basic
    - AuthName "Protg par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -

    +
    # Spcifie deux fichiers contenant des certificats de CA
    +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der"
    +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem"
    +<Location /ldap-status>
    +    SetHandler ldap-status
    +    
    +    Require host yourdomain.example.com
    +    
    +    LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem"
    +    LDAPTrustedClientCert KEY_BASE64 "/certs/key1.pem"
    +    # CA certs respecified due to per-directory client certs
    +    LDAPTrustedClientCert CA_DER "/certs/cacert1.der"
    +    LDAPTrustedClientCert CA_BASE64 "/certs/cacert2.pem"
    +    Satisfy any
    +    AuthType Basic
    +    AuthName "LDAP Protected"
    +    AuthBasicProvider ldap
    +    AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one"
    +    Require valid-user
    +</Location>
    + @@ -464,7 +452,7 @@ d'Apache
    top
    -

    LDAPCacheEntries Directive

    +

    Directive LDAPCacheEntries

    @@ -482,7 +470,7 @@ primaire
    top
    -
    Description:Nombre maximum d'entres dans le cache LDAP primaire
    @@ -499,7 +487,7 @@ valides.
    top
    -
    Description:Dure pendant laquelle les entres du cache restent valides.
    @@ -522,6 +510,19 @@ Apache valeur par dfaut -1, ou toute autre valeur ngative, les connexions peuvent tre rutilises sans limite de dure.

    +

    Dans le but d'amliorer les performances, le temps de rfrence + qu'utilise cette directive correspond au moment o la connexion LDAP + est enregistre ou remise dans le jeu de connexions, et non au + moment du dernier change russi avec le serveur LDAP.

    + +

    La version 2.4.10 a introduit de nouvelles mesures permettant + d'viter une augmentation excessive du temps de rfrence due des + correspondances positives dans le cache ou des requtes lentes. A + cet effet, le temps de rfrence n'est pas ractualis si aucune + connexion LDAP d'arrire-plan n'est requise ; d'autre part, le temps + de rfrence se base sur le moment o la requte HTTP est reue, et + non sur le moment o la requte a t traite.

    +

    Cette dure de vie s'exprime par dfaut en secondes, mais il est possible d'utiliser d'autres units en ajoutant un suffixe : millisecondes (ms), minutes (min), ou heures (h). @@ -529,7 +530,7 @@ Apache

    top
    -
    Description:Dsactive les connexions d'arrire-plan qui sont restes inactives trop longtemps au sein du jeu de connexions.
    @@ -547,7 +548,7 @@ connexion

    Si la connexion n'a pas russi avant ce dlai, une erreur sera renvoye, ou la bibliothque client LDAP tentera de se connecter un second serveur LDAP, s'il en a t dfini un (via une liste de - noms d'htes spars par des espaces dans la directive AuthLDAPURL).

    + noms d'htes spars par des espaces dans la directive AuthLDAPURL).

    La valeur par dfaut est 10 secondes, si la bibliothque client LDAP lie avec le serveur supporte l'option @@ -562,7 +563,7 @@ connexion

    top
    -
    Description:Spcifie le dlai d'attente en secondes de la socket de connexion
    @@ -596,7 +597,7 @@ connexion
    top
    -
    Description:Active le dbogage dans le SDK LDAP
    Syntaxe:LDAPLibraryDebug 7
    @@ -614,7 +615,7 @@ op
    top
    -
    Description:Nombre d'entres utilises pour mettre en cache les oprations de comparaison LDAP
    @@ -630,7 +631,7 @@ restent valides
    top
    -
    Description:Dure pendant laquelle les entres du cache d'oprations restent valides
    Description:Le nombre maximum de redirections vers des serveurs alternatifs (referrals) avant l'abandon de la requte @@ -642,7 +643,7 @@ LDAP.
    Statut:Extension
    Module:mod_ldap
    -

    Si elle est active par la directive LDAPReferrals, +

    Si elle est active par la directive LDAPReferrals, cette directive permet de dfinir le nombre maximum de sauts vers des serveurs alternatifs (referrals) avant l'abandon de la requte LDAP.

    @@ -653,49 +654,112 @@ LDAP.
    top
    -

    LDAPReferrals Directive

    +

    Directive LDAPReferrals

    - + +
    Description:Active la redirection vers des serveurs alternatifs au cours des requtes vers le serveur LDAP.
    Syntaxe:LDAPReferrals On|Off
    Syntaxe:LDAPReferrals On|Off|default
    Dfaut:LDAPReferrals On
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ldap
    Compatibilit:Le paramtre default est disponible depuis la +version 2.4.7 du serveur HTTP Apache.

    Certains serveurs LDAP partagent leur annuaire en plusieurs domaines et utilisent le systme des redirections (referrals) pour aiguiller un client lorsque les limites d'un domaine doivent tre - franchies. En dfinissant LDAPReferrals On, les - redirections seront prises en compte (et bien entendu, en - dfinissant LDAPReferrals Off, les redirections seront - ignores). La directive LDAPReferralHopLimit complte - cette directive en dfinissant le nombre maximum de redirections - suivre avant l'abandon de la requte LDAP. Lorsque le traitement des - redirections est activ, les donnes d'identification du client - seront fournies, via un appel (callback) de ridentification, tout - serveur LDAP qui en fera la demande.

    + franchies. Ce processus est similaire une redirection HTTP. Les + bibliothques client LDAP ne respectent pas forcment ces + redirections par dfaut. Cette directive permet de configurer + explicitement les redirections LDAP dans le SDK sous-jacent.

    + +

    La directive LDAPReferrals accepte les + valeurs suivantes :

    + +
    +
    "on"
    +

    Avec la valeur "on", la prise en compte des redirections + LDAP par le SDK sous-jacent est active, la directive + LDAPReferralHopLimit permet de surcharger la + "hop limit" du SDK, et un "LDAP rebind callback" est enregistr.

    +
    "off"
    +

    Avec la valeur "off", la prise en compte des redirections + LDAP par le SDK sous-jacent est compltement dsactive.

    +
    "default"
    +

    Avec la valeur "default", la prise en compte des redirections + LDAP par le SDK sous-jacent n'est pas modifie, la directive + LDAPReferralHopLimit ne permet pas de surcharger la + "hop limit" du SDK, et aucun "LDAP rebind callback" n'est enregistr.

    +
    + +

    La directive LDAPReferralHopLimit travaille en + conjonction avec cette directive pour limiter le nombre de + redirections suivre pour achever le traitement de la requte LDAP. + Lorsque le processus de redirection est activ par la valeur "On", + les donnes d'authentification du client sont transmises via un + "rebind callback" tout serveur LDAP qui en fait la demande.

    + +
    +
    top
    +

    Directive LDAPRetries

    + + + + + + + +
    Description:Dfinit le nombre maximum de tentatives de connexions au +serveur LDAP.
    Syntaxe:LDAPRetries nombre d'essais
    Dfaut:LDAPRetries 3
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ldap
    +

    Suite des checs de connexion au serveur LDAP, le serveur + tentera de se connecter autant de fois qu'indiqu par la directive + LDAPRetries. Si cette directive est dfinie + 0, le serveur ne tentera pas d'autre connexion aprs un chec.

    +

    Il est possible d'effectuer une autre tentative de connexion en + cas d'erreurs LDAP du type dlai dpass ou connexion refuse.

    top
    -

    LDAPSharedCacheFile Directive

    +

    Directive LDAPRetryDelay

    + + + + + + + +
    Description:Dfinit le temps d'attente avant un autre essai de connexion au +serveur LDAP.
    Syntaxe:LDAPRetryDelay secondes
    Dfaut:LDAPRetryDelay 0
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ldap
    +

    Si la directive LDAPRetryDelay est dfinie + une valeur diffrente de 0, le serveur attendra pendant la dure + spcifie pour envoyer nouveau sa requte LDAP. Une valeur de 0 + implique une absence de dlai pour les essais successifs.

    + +

    Il est possible d'effectuer une autre tentative de connexion en + cas d'erreurs LDAP du type dlai dpass ou connexion refuse.

    + +
    +
    top
    +

    Directive LDAPSharedCacheFile

    - +
    Description:Dfinit le fichier du cache en mmoire partage
    Syntaxe:LDAPSharedCacheFile chemin/nom-fichier
    Syntaxe:LDAPSharedCacheFile chemin/fichier
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ldap
    -

    Cette directive permet de spcifier le chemin et le nom du +

    Cette directive permet de spcifier le chemin du fichier du cache en mmoire partage. Si elle n'est pas dfinie, la mmoire partage anonyme sera utilise si la plate-forme la supporte.

    +
    top
    -

    LDAPSharedCacheSize Directive

    +

    Directive LDAPSharedCacheSize

    @@ -712,7 +776,7 @@ partag
    top
    -
    Description:Taille en octets du cache en mmoire partage
    Syntaxe:LDAPSharedCacheSize octets
    @@ -721,6 +785,8 @@ recherche et d'identification LDAP en secondes +
    Description:Spcifie le dlai d'attente pour les oprations de recherche et d'identification LDAP en secondes
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ldap
    Compatibilit:Disponible partir de la version 2.3.5 du serveur HTTP +Apache

    Cette directive permet de spcifier le dlai d'attente pour les oprations de recherche et d'identification, ainsi que l'option @@ -741,7 +807,7 @@ recherche et d'identification LDAP en secondes

    top
    -

    LDAPTrustedClientCert Directive

    +

    Directive LDAPTrustedClientCert

    top
    -
    Description:Dfinit le nom de fichier contenant un certificat client ou un alias renvoyant vers un certificat client spcifique une connexion. @@ -778,7 +844,7 @@ connexion.
    top
    -
    Description:Dfinit le nom de fichier ou la base de donnes contenant les Autorits de Certification de confiance globales ou les certificats @@ -825,7 +891,7 @@ clients globaux
    @@ -851,7 +917,7 @@ connexion
    top
    -
    Description:Spcifie le mode (SSL ou TLS) utiliser lors de la connexion un serveur LDAP.
    @@ -870,7 +936,28 @@ serveur

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ldap.xml b/docs/manual/mod/mod_ldap.xml index 7d850fb4c3c..3c89c84cc70 100644 --- a/docs/manual/mod/mod_ldap.xml +++ b/docs/manual/mod/mod_ldap.xml @@ -28,7 +28,6 @@ by other LDAP modulesExtensionutil_ldap.cldap_module -Available in version 2.0.41 and later

    This module was created to improve the performance of @@ -42,15 +41,13 @@ by other LDAP modules flag to the configure script when building Apache.

    -

    SSL/TLS support is dependant on which LDAP toolkit has been +

    SSL/TLS support is dependent on which LDAP toolkit has been linked to APR. As of this writing, APR-util supports: OpenLDAP SDK (2.x or later), Novell LDAP - SDK, - Mozilla LDAP SDK, native Solaris LDAP SDK (Mozilla based), - native Microsoft LDAP SDK, or the - iPlanet - (Netscape) SDK. See the APR + SDK, + Mozilla LDAP SDK, native Solaris LDAP SDK (Mozilla based) or the + native Microsoft LDAP SDK. See the APR website for details.

    @@ -60,34 +57,32 @@ by other LDAP modulesmod_ldap to increase the performance of HTTP Basic authentication provided by mod_authnz_ldap.

    - - # Enable the LDAP connection pool and shared
    - # memory cache. Enable the LDAP cache status
    - # handler. Requires that mod_ldap and mod_authnz_ldap
    - # be loaded. Change the "yourdomain.example.com" to
    - # match your domain.
    -
    - LDAPSharedCacheSize 500000
    - LDAPCacheEntries 1024
    - LDAPCacheTTL 600
    - LDAPOpCacheEntries 1024
    - LDAPOpCacheTTL 600
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Enable the LDAP connection pool and shared +# memory cache. Enable the LDAP cache status +# handler. Requires that mod_ldap and mod_authnz_ldap +# be loaded. Change the "yourdomain.example.com" to +# match your domain. + +LDAPSharedCacheSize 500000 +LDAPCacheEntries 1024 +LDAPCacheTTL 600 +LDAPOpCacheEntries 1024 +LDAPOpCacheTTL 600 + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> +
    LDAP Connection Pool @@ -112,10 +107,10 @@ by other LDAP modules credentials used when binding to an LDAP server. These credentials can be provided to LDAP servers that do not allow anonymous binds during referral chasing. To control - this feature, see the - LDAPReferrals and - LDAPReferralHopLimit directives. By default, - this feature is enabled.

    + this feature, see the + LDAPReferrals and + LDAPReferralHopLimit + directives. By default, this feature is enabled.

    LDAP Cache @@ -183,13 +178,11 @@ by other LDAP modules following directives could be used to access the mod_ldap cache information:

    - - <Location /server/cache-info>
    - - SetHandler ldap-status
    -
    - </Location> -
    + +<Location "/server/cache-info"> + SetHandler ldap-status +</Location> +

    By fetching the URL http://servername/cache-info, the administrator can get a status report of every cache that is used @@ -204,58 +197,55 @@ by other LDAP modules

    Using SSL/TLS

    The ability to create an SSL and TLS connections to an LDAP server - is defined by the directives - LDAPTrustedGlobalCert, - LDAPTrustedClientCert and - LDAPTrustedMode. These directives specify the CA and - optional client certificates to be used, as well as the type of - encryption to be used on the connection (none, SSL or TLS/STARTTLS).

    - - - # Establish an SSL LDAP connection on port 636. Requires that
    - # mod_ldap and mod_authnz_ldap be loaded. Change the
    - # "yourdomain.example.com" to match your domain.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/certfile.der
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    - - - # Establish a TLS LDAP connection on port 389. Requires that
    - # mod_ldap and mod_authnz_ldap be loaded. Change the
    - # "yourdomain.example.com" to match your domain.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/certfile.der
    -
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
    - Require valid-user
    -
    - </Location> -
    + is defined by the directives + LDAPTrustedGlobalCert, + LDAPTrustedClientCert + and LDAPTrustedMode. + These directives specify the CA and optional client certificates to be used, + as well as the type of encryption to be used on the connection (none, SSL or + TLS/STARTTLS).

    + + +# Establish an SSL LDAP connection on port 636. Requires that +# mod_ldap and mod_authnz_ldap be loaded. Change the +# "yourdomain.example.com" to match your domain. + +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der" + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> + + + +# Establish a TLS LDAP connection on port 389. Requires that +# mod_ldap and mod_authnz_ldap be loaded. Change the +# "yourdomain.example.com" to match your domain. + +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der" + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" TLS + Require valid-user +</Location> +
    @@ -288,29 +278,27 @@ by other LDAP modules an error when an attempt is made to contact the LDAP server at runtime.

    - - # Specify a Netscape CA certificate file
    - LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
    - # Specify an optional key3.db file for client certificate support
    - LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
    - # Specify the secmod file if required
    - LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - LDAPTrustedClientCert CERT_NICKNAME <nickname> [password]
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Specify a Netscape CA certificate file +LDAPTrustedGlobalCert CA_CERT7_DB "/certs/cert7.db" +# Specify an optional key3.db file for client certificate support +LDAPTrustedGlobalCert CERT_KEY3_DB "/certs/key3.db" +# Specify the secmod file if required +LDAPTrustedGlobalCert CA_SECMOD "/certs/secmod" +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + LDAPTrustedClientCert CERT_NICKNAME <nickname> [password] + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> +
    @@ -330,16 +318,16 @@ by other LDAP modules LDAPTrustedMode parameter. If an ldaps:// URL is specified, SSL mode is forced, override this directive.

    - - # Specify two CA certificate files
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - # Specify a client certificate file and key
    - LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password]
    - # Do not use this directive, as it will throw an error
    - #LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    -
    + +# Specify two CA certificate files +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der" +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem" +# Specify a client certificate file and key +LDAPTrustedGlobalCert CERT_BASE64 "/certs/cert1.pem" +LDAPTrustedGlobalCert KEY_BASE64 "/certs/key1.pem" [password] +# Do not use this directive, as it will throw an error +#LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem" + @@ -362,30 +350,28 @@ by other LDAP modules (ldaps://) support has been deprecated to be replaced with TLS, although the SSL functionality still works.

    - - # Specify two CA certificate files
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - <Location /ldap-status>
    - - SetHandler ldap-status
    - - Require host yourdomain.example.com
    - - LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
    - # CA certs respecified due to per-directory client certs
    - LDAPTrustedClientCert CA_DER /certs/cacert1.der
    - LDAPTrustedClientCert CA_BASE64 /certs/cacert2.pem
    - Satisfy any
    - AuthType Basic
    - AuthName "LDAP Protected"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Specify two CA certificate files +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der" +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem" +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem" + LDAPTrustedClientCert KEY_BASE64 "/certs/key1.pem" + # CA certs respecified due to per-directory client certs + LDAPTrustedClientCert CA_DER "/certs/cacert1.der" + LDAPTrustedClientCert CA_BASE64 "/certs/cacert2.pem" + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> + @@ -508,7 +494,7 @@ validAuthConfig -

    This directive, if enabled by the LDAPReferrals directive, +

    This directive, if enabled by the LDAPReferrals directive, limits the number of referral hops that are followed before terminating an LDAP query.

    @@ -521,19 +507,71 @@ valid LDAPReferrals Enable referral chasing during queries to the LDAP server. -LDAPReferrals On|Off +LDAPReferrals On|Off|default LDAPReferrals On directory.htaccess AuthConfig +The default parameter is available in Apache 2.4.7 and later

    Some LDAP servers divide their directory among multiple domains and use referrals - to direct a client when a domain boundary is crossed. By setting LDAPReferrals On - referrals will be chased (setting it to off causes referrals to be ignored). The directive - LDAPReferralHopLimit works in conjunction with this directive to limit the - number of referral hops to follow before terminating the LDAP query. When referral processing - is enabled client credentials will be provided, via a rebind callback, for any LDAP server - requiring them.

    + to direct a client when a domain boundary is crossed. This is similar to a HTTP redirect. + LDAP client libraries may or may not chase referrals by default. This directive + explicitly configures the referral chasing in the underlying SDK.

    + + +

    LDAPReferrals takes the following values:

    +
    +
    "on"
    +

    When set to "on", the underlying SDK's referral chasing state + is enabled, LDAPReferralHopLimit is used to + override the SDK's hop limit, and an LDAP rebind callback is + registered.

    +
    "off"
    +

    When set to "off", the underlying SDK's referral chasing state + is disabled completely.

    +
    "default"
    +

    When set to "default", the underlying SDK's referral chasing state + is not changed, LDAPReferralHopLimit is not + used to overide the SDK's hop limit, and no LDAP rebind callback is + registered.

    +
    + +

    The directive LDAPReferralHopLimit works in conjunction with + this directive to limit the number of referral hops to follow before terminating the LDAP query. + When referral processing is enabled by a value of "On", client credentials will be provided, + via a rebind callback, for any LDAP server requiring them.

    +
    +
    + + +LDAPRetryDelay +Configures the delay between LDAP server retries. +LDAPRetryDelay seconds +LDAPRetryDelay 0 +server config + + +

    If LDAPRetryDelay is set to a non-zero + value, the server will delay retrying an LDAP request for the + specified amount of time. Setting this directive to 0 will + result in any retry to occur without delay.

    + +

    LDAP errors such as timeouts and refused connections are retryable.

    +
    +
    + + +LDAPRetries +Configures the number of LDAP server retries. +LDAPRetries number-of-retries +LDAPRetries 3 +server config + +

    The server will retry failed LDAP requests up to + LDAPRetries times. Setting this + directive to 0 disables retries.

    +

    LDAP errors such as timeouts and refused connections are retryable.

    @@ -587,7 +625,7 @@ connection client certificates.

    It specifies the directory path, file name or nickname of a per connection client certificate used when establishing an SSL or TLS connection to an LDAP server. Different locations or - directories may have their own independant client certificate + directories may have their own independent client certificate settings. Some LDAP toolkits (notably Novell) do not support per connection client certificates, and will throw an error on LDAP server connection if you try to use this directive @@ -646,7 +684,7 @@ connection client certificates.

    If a connection is not successful with the timeout period, either an error will be returned or the LDAP client library will attempt to connect to a secondary LDAP server if one is specified (via a space-separated list of hostnames in the - AuthLDAPURL).

    + AuthLDAPURL).

    The default is 10 seconds, if the LDAP client library linked with the server supports the LDAP_OPT_NETWORK_TIMEOUT option.

    @@ -665,6 +703,7 @@ connection client certificates. LDAPTimeout seconds LDAPTimeout 60 server config +Apache HTTP Server 2.3.5 and later

    This directive configures the timeout for bind and search operations, as well as @@ -713,7 +752,17 @@ connection client certificates.

    A setting of 0 causes connections to never be saved in the backend connection pool. The default value of -1, and any other negative value, - allows connections of any age to be reused.

    + allows connections of any age to be reused.

    + +

    For performance reasons, the reference time used by this directive is + based on when the LDAP connection is returned to the pool, not the time + of the last successful I/O with the LDAP server.

    + +

    Since 2.4.10, new measures are in place to avoid the reference time + from being inflated by cache hits or slow requests. First, the reference + time is not updated if no backend LDAP conncetions were needed. Second, + the reference time uses the time the HTTP request was received instead + of the time the request is completed.

    This timeout defaults to units of seconds, but accepts suffixes for milliseconds (ms), minutes (min), and hours (h). diff --git a/docs/manual/mod/mod_ldap.xml.fr b/docs/manual/mod/mod_ldap.xml.fr index 72b32fc1388..ad2764d25f7 100644 --- a/docs/manual/mod/mod_ldap.xml.fr +++ b/docs/manual/mod/mod_ldap.xml.fr @@ -1,7 +1,7 @@ - + @@ -31,8 +31,6 @@ cache du résultat à destination des autres modules LDAPExtension util_ldap.c ldap_module -Disponible à partir de la version 2.0.41 -d'Apache

    Ce module a été conçu dans le but d'améliorer les performances @@ -52,11 +50,9 @@ d'Apache href="http://www.openldap.org/">OpenLDAP SDK (version 2.x ou supérieure), Novell LDAP - SDK, - Mozilla LDAP SDK, le SDK LDAP propre à Solaris (basé sur - Mozilla), le SDK LDAP propre à Microsoft, ou le SDK iPlanet - (Netscape). Voir le site web , + Mozilla LDAP SDK, le SDK LDAP Solaris natif (basé sur Mozilla) + ou le SDK LDAP Microsoft natif. Voir le site web APR pour plus de détails.

    @@ -67,34 +63,32 @@ d'Apache l'authentification HTTP de base fournie par mod_authnz_ldap.

    - - # Active la conservation des connexions LDAP et le cache partagé en
    - # mémoire. Active le gestionnaire de statut du cache LDAP.
    - # Nécessite le chargement de mod_ldap et de mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPSharedCacheSize 500000
    - LDAPCacheEntries 1024
    - LDAPCacheTTL 600
    - LDAPOpCacheEntries 1024
    - LDAPOpCacheTTL 600
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protégé par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Active la conservation des connexions LDAP et le cache partagé en +# mémoire. Active le gestionnaire de statut du cache LDAP. +# Nécessite le chargement de mod_ldap et de mod_authnz_ldap. +# Remplacez "votre-domaine.example.com" par le nom de votre +# domaine. + +LDAPSharedCacheSize 500000 +LDAPCacheEntries 1024 +LDAPCacheTTL 600 +LDAPOpCacheEntries 1024 +LDAPOpCacheTTL 600 + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> +
    Conservation des connexions LDAP @@ -203,13 +197,11 @@ d'Apache suivantes pour accéder aux informations du cache de mod_ldap :

    - - <Location /serveur/infos-cache>
    - - SetHandler ldap-status
    -
    - </Location> -
    + +<Location "/server/cache-info"> + SetHandler ldap-status +</Location> +

    En se connectant à l'URL http://nom-serveur/infos-cache, l'administrateur peut @@ -234,53 +226,49 @@ d'Apache ainsi que le type de chiffrement à utiliser pour la connexion (none, SSL ou TLS/STARTTLS).

    - - # Etablissement d'une connexion SSL LDAP sur le port 636.
    - # Nécessite le chargement de mod_ldap et mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/fichier-certificat.der
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protégé par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    - - - # Etablissement d'une connexion TLS LDAP sur le port 389.
    - # Nécessite le chargement de mod_ldap et mod_authnz_ldap.
    - # Remplacez "votre-domaine.example.com" par le nom de votre
    - # domaine.
    -
    - LDAPTrustedGlobalCert CA_DER /certs/fichier-certificat.der
    -
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protégé par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS
    - Require valid-user
    -
    - </Location> -
    + +# Etablissement d'une connexion SSL LDAP sur le port 636. +# Nécessite le chargement de mod_ldap et mod_authnz_ldap. +# Remplacez "votre-domaine.example.com" par le nom de votre +# domaine. + +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der" + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> + + + +# Etablissement d'une connexion TLS LDAP sur le port 389. +# Nécessite le chargement de mod_ldap et mod_authnz_ldap. +# Remplacez "votre-domaine.example.com" par le nom de votre +# domaine. + +LDAPTrustedGlobalCert CA_DER "/certs/certfile.der" + +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldap://127.0.0.1/dc=example,dc=com?uid?one" TLS + Require valid-user +</Location> +
    @@ -316,31 +304,28 @@ d'Apache de STARTTLS engendrera une erreur lors des tentatives de contacter le serveur LDAP pendant l'exécution.

    - - # Spécifie un fichier de certificats de CA Netscape
    - LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db
    - # Spécifie un fichier key3db optionnel pour le support des - # certificats clients
    - LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db
    - # Spécifie le fichier secmod si nécessaire
    - LDAPTrustedGlobalCert CA_SECMOD /certs/secmod
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - Satisfy any
    - AuthType Basic
    - AuthName "Protégé par LDAP"
    - AuthBasicProvider ldap
    - LDAPTrustedClientCert CERT_NICKNAME <nickname> - [mot de passe]
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Spécifie un fichier de certificats de CA Netscape +LDAPTrustedGlobalCert CA_CERT7_DB "/certs/cert7.db" +# Spécifie un fichier key3db optionnel pour le support des +# certificats clients +LDAPTrustedGlobalCert CERT_KEY3_DB "/certs/key3.db" +# Spécifie le fichier secmod si nécessaire +LDAPTrustedGlobalCert CA_SECMOD "/certs/secmod" +<Location "/ldap-status"> + SetHandler ldap-status + + Require host yourdomain.example.com + + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + LDAPTrustedClientCert CERT_NICKNAME <nickname> [password] + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> + @@ -363,19 +348,18 @@ d'Apache ldaps:// est spécifiée, le mode SSL est forcé, et l'emporte sur cette directive.

    - - # Spécifie deux fichiers contenant des certificats de CA
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - # Spécifie un fichier contenant des certificats clients - # ainsi qu'une clé
    - LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [mot de - passe]
    - # N'utilisez pas cette directive, sous peine de provoquer - # une erreur
    - #LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    -
    + +# Spécifie deux fichiers contenant des certificats de CA +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der" +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem" +# Spécifie un fichier contenant des certificats clients +# ainsi qu'une clé +LDAPTrustedGlobalCert CERT_BASE64 "/certs/cert1.pem" +LDAPTrustedGlobalCert KEY_BASE64 "/certs/key1.pem" [password] +# N'utilisez pas cette directive, sous peine de provoquer +# une erreur +#LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem" + @@ -398,27 +382,28 @@ d'Apache OpenLDAP indique que le support SSL (ldaps://) tend à être remplacé par TLS, bien que le mode SSL fonctionne toujours.

    - - # Spécifie deux fichiers contenant des certificats de CA
    - LDAPTrustedGlobalCert CA_DER /certs/cacert1.der
    - LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem
    - <Location /statut-ldap>
    - - SetHandler ldap-status
    - - Require host votre-domaine.example.com
    - - LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem
    - LDAPTrustedClientCert KEY_BASE64 /certs/key1.pem
    - Satisfy any
    - AuthType Basic
    - AuthName "Protégé par LDAP"
    - AuthBasicProvider ldap
    - AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one
    - Require valid-user
    -
    - </Location> -
    + +# Spécifie deux fichiers contenant des certificats de CA +LDAPTrustedGlobalCert CA_DER "/certs/cacert1.der" +LDAPTrustedGlobalCert CA_BASE64 "/certs/cacert2.pem" +<Location /ldap-status> + SetHandler ldap-status + + Require host yourdomain.example.com + + LDAPTrustedClientCert CERT_BASE64 "/certs/cert1.pem" + LDAPTrustedClientCert KEY_BASE64 "/certs/key1.pem" + # CA certs respecified due to per-directory client certs + LDAPTrustedClientCert CA_DER "/certs/cacert1.der" + LDAPTrustedClientCert CA_BASE64 "/certs/cacert2.pem" + Satisfy any + AuthType Basic + AuthName "LDAP Protected" + AuthBasicProvider ldap + AuthLDAPURL "ldaps://127.0.0.1/dc=example,dc=com?uid?one" + Require valid-user +</Location> + @@ -468,14 +453,15 @@ d'Apache LDAPSharedCacheFile Définit le fichier du cache en mémoire partagée -LDAPSharedCacheFile chemin/nom-fichier +LDAPSharedCacheFile chemin/fichier server config -

    Cette directive permet de spécifier le chemin et le nom du +

    Cette directive permet de spécifier le chemin du fichier du cache en mémoire partagée. Si elle n'est pas définie, la mémoire partagée anonyme sera utilisée si la plate-forme la supporte.

    +
    @@ -555,7 +541,7 @@ LDAP. AuthConfig -

    Si elle est activée par la directive LDAPReferrals, +

    Si elle est activée par la directive LDAPReferrals, cette directive permet de définir le nombre maximum de sauts vers des serveurs alternatifs (referrals) avant l'abandon de la requête LDAP.

    @@ -570,24 +556,83 @@ LDAP. LDAPReferrals Active la redirection vers des serveurs alternatifs au cours des requêtes vers le serveur LDAP. -LDAPReferrals On|Off +LDAPReferrals On|Off|default LDAPReferrals On directory.htaccess AuthConfig +Le paramètre default est disponible depuis la +version 2.4.7 du serveur HTTP Apache.

    Certains serveurs LDAP partagent leur annuaire en plusieurs domaines et utilisent le système des redirections (referrals) pour aiguiller un client lorsque les limites d'un domaine doivent être - franchies. En définissant LDAPReferrals On, les - redirections seront prises en compte (et bien entendu, en - définissant LDAPReferrals Off, les redirections seront - ignorées). La directive LDAPReferralHopLimit complète - cette directive en définissant le nombre maximum de redirections à - suivre avant l'abandon de la requête LDAP. Lorsque le traitement des - redirections est activé, les données d'identification du client - seront fournies, via un appel (callback) de réidentification, à tout - serveur LDAP qui en fera la demande.

    + franchies. Ce processus est similaire à une redirection HTTP. Les + bibliothèques client LDAP ne respectent pas forcément ces + redirections par défaut. Cette directive permet de configurer + explicitement les redirections LDAP dans le SDK sous-jacent.

    + +

    La directive LDAPReferrals accepte les + valeurs suivantes :

    + +
    +
    "on"
    +

    Avec la valeur "on", la prise en compte des redirections + LDAP par le SDK sous-jacent est activée, la directive + LDAPReferralHopLimit permet de surcharger la + "hop limit" du SDK, et un "LDAP rebind callback" est enregistré.

    +
    "off"
    +

    Avec la valeur "off", la prise en compte des redirections + LDAP par le SDK sous-jacent est complètement désactivée.

    +
    "default"
    +

    Avec la valeur "default", la prise en compte des redirections + LDAP par le SDK sous-jacent n'est pas modifiée, la directive + LDAPReferralHopLimit ne permet pas de surcharger la + "hop limit" du SDK, et aucun "LDAP rebind callback" n'est enregistré.

    +
    + +

    La directive LDAPReferralHopLimit travaille en + conjonction avec cette directive pour limiter le nombre de + redirections à suivre pour achever le traitement de la requête LDAP. + Lorsque le processus de redirection est activé par la valeur "On", + les données d'authentification du client sont transmises via un + "rebind callback" à tout serveur LDAP qui en fait la demande.

    +
    + + + +LDAPRetryDelay +Définit le temps d'attente avant un autre essai de connexion au +serveur LDAP. +LDAPRetryDelay secondes +LDAPRetryDelay 0 +server config + + +

    Si la directive LDAPRetryDelay est définie + à une valeur différente de 0, le serveur attendra pendant la durée + spécifiée pour envoyer à nouveau sa requête LDAP. Une valeur de 0 + implique une absence de délai pour les essais successifs.

    + +

    Il est possible d'effectuer une autre tentative de connexion en + cas d'erreurs LDAP du type délai dépassé ou connexion refusée.

    +
    +
    + + +LDAPRetries +Définit le nombre maximum de tentatives de connexions au +serveur LDAP. +LDAPRetries nombre d'essais +LDAPRetries 3 +server config + +

    Suite à des échecs de connexion au serveur LDAP, le serveur + tentera de se connecter autant de fois qu'indiqué par la directive + LDAPRetries. Si cette directive est définie à + 0, le serveur ne tentera pas d'autre connexion après un échec.

    +

    Il est possible d'effectuer une autre tentative de connexion en + cas d'erreurs LDAP du type délai dépassé ou connexion refusée.

    @@ -718,7 +763,7 @@ connexion renvoyée, ou la bibliothèque client LDAP tentera de se connecter à un second serveur LDAP, s'il en a été défini un (via une liste de noms d'hôtes séparés par des espaces dans la directive AuthLDAPURL).

    + module="mod_authnz_ldap">AuthLDAPURL).

    La valeur par défaut est 10 secondes, si la bibliothèque client LDAP liée avec le serveur supporte l'option @@ -740,6 +785,8 @@ recherche et d'identification LDAP en secondes LDAPTimeout secondes LDAPTimeout 60 server config +Disponible à partir de la version 2.3.5 du serveur HTTP +Apache

    Cette directive permet de spécifier le délai d'attente pour les @@ -798,6 +845,19 @@ Apache valeur par défaut -1, ou toute autre valeur négative, les connexions peuvent être réutilisées sans limite de durée.

    +

    Dans le but d'améliorer les performances, le temps de référence + qu'utilise cette directive correspond au moment où la connexion LDAP + est enregistrée ou remise dans le jeu de connexions, et non au + moment du dernier échange réussi avec le serveur LDAP.

    + +

    La version 2.4.10 a introduit de nouvelles mesures permettant + d'éviter une augmentation excessive du temps de référence due à des + correspondances positives dans le cache ou des requêtes lentes. A + cet effet, le temps de référence n'est pas réactualisé si aucune + connexion LDAP d'arrière-plan n'est requise ; d'autre part, le temps + de référence se base sur le moment où la requête HTTP est reçue, et + non sur le moment où la requête a été traitée.

    +

    Cette durée de vie s'exprime par défaut en secondes, mais il est possible d'utiliser d'autres unités en ajoutant un suffixe : millisecondes (ms), minutes (min), ou heures (h). diff --git a/docs/manual/mod/mod_log_config.html b/docs/manual/mod/mod_log_config.html index 1e9233c9663..e13c8010455 100644 --- a/docs/manual/mod/mod_log_config.html +++ b/docs/manual/mod/mod_log_config.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_log_config.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_log_config.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_log_config.html.en b/docs/manual/mod/mod_log_config.html.en index 3183e21c1b5..e97b1847e8c 100644 --- a/docs/manual/mod/mod_log_config.html.en +++ b/docs/manual/mod/mod_log_config.html.en @@ -1,27 +1,33 @@ - -mod_log_config - Apache HTTP Server +mod_log_config - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_log_config

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -46,21 +52,22 @@ step. The TransferLog and CustomLog directives can be used multiple times in each server to cause each request to be logged to multiple files.

    -
    top

    Custom Log Formats

    @@ -81,89 +88,98 @@
    - - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + @@ -215,8 +239,19 @@ - + + + + + +
    Description:Force la vrification du certificat du serveur
    %% The percent sign.
    %aRemote IP-address.
    %AClient IP address of the request (see the + mod_remoteip module).
    %{c}aUnderlying peer IP address of the connection (see the + mod_remoteip module).
    %A Local IP-address.
    %B
    %B Size of response in bytes, excluding HTTP headers.
    %b
    %b Size of response in bytes, excluding HTTP headers. In CLF format, i.e. a '-' rather than a 0 when no bytes are sent.
    %{VARNAME}C
    %{VARNAME}C The contents of cookie VARNAME in the request sent to the server. Only version 0 cookies are fully supported.
    %D
    %D The time taken to serve the request, in microseconds.
    %{VARNAME}e
    %{VARNAME}e The contents of the environment variable VARNAME.
    %f
    %f Filename.
    %h
    %h Remote hostname. Will log the IP address if HostnameLookups is set to Off, which is the default. If it logs the hostname for only a few hosts, you probably have access control directives mentioning them by name. See the Require host documentation.
    %H
    %H The request protocol.
    %{VARNAME}i
    %{VARNAME}i The contents of VARNAME: header line(s) in the request sent to the server. Changes made by other - modules (e.g. mod_headers) affect this. + modules (e.g. mod_headers) affect this. If you're + interested in what the request header was prior to when most + modules would have modified it, use mod_setenvif + to copy the header into an internal environment variable and log + that value with the %{VARNAME}e described + above.
    %k
    %k Number of keepalive requests handled on this connection. Interesting if KeepAlive is being used, so that, for example, a '1' means the first keepalive request after the initial one, '2' the second, etc...; otherwise this is always 0 (indicating the initial request).
    %l
    %l Remote logname (from identd, if supplied). This will return a dash unless mod_ident is present and IdentityCheck is set On.
    %L
    %L The request log ID from the error log (or '-' if nothing has been logged to the error log for this request). Look for the matching error log line to see what request caused what error.
    %m
    %m The request method.
    %{VARNAME}n
    %{VARNAME}n The contents of note VARNAME from another module.
    %{VARNAME}o
    %{VARNAME}o The contents of VARNAME: header line(s) in the reply.
    %p
    %p The canonical port of the server serving the request.
    %{format}p
    %{format}p The canonical port of the server serving the request, or the server's actual port, or the client's actual port. Valid formats are canonical, local, or remote.
    %P
    %P The process ID of the child that serviced the request.
    %{format}P
    %{format}P The process ID or thread ID of the child that serviced the request. Valid formats are pid, tid, and hextid. hextid requires APR 1.2.0 or higher.
    %q
    %q The query string (prepended with a ? if a query string exists, otherwise an empty string).
    %r
    %r First line of request.
    %R
    %R The handler generating the response (if any).
    %s
    %s Status. For requests that have been internally redirected, this is the status of the original request. Use %>s for the final status.
    %t
    %t Time the request was received, in the format [18/Sep/2011:19:18:28 -0400]. The last number indicates the timezone offset from GMT
    %{format}t
    %{format}t The time, in the form given by format, which should be in an extended strftime(3) format (potentially localized). If the format starts with begin: (default) the time is taken @@ -183,8 +199,16 @@ formatting in the same format string. You can use multiple %{format}t tokens instead.
    %T
    %T The time taken to serve the request, in seconds.
    %{UNIT}TThe time taken to serve the request, in a time unit given by + UNIT. Valid units are ms for milliseconds, + us for microseconds, and s for seconds. + Using s gives the same result as %T + without any format; using us gives the same result + as %D. Combining %T with a unit is + available in 2.4.13 and later.
    %u Remote user if the request was authenticated. May be bogus if return status (%s) is 401 (unauthorized).
    Bytes received, including request and headers. Cannot be zero. You need to enable mod_logio to use this.
    %OBytes sent, including headers. Cannot be zero. You need to + Bytes sent, including headers. May be zero in rare cases + such as when a request is aborted before a response is sent. + You need to enable mod_logio to use this.
    %SBytes transferred (received and sent), including request and headers, + cannot be zero. This is the combination of %I and %O. You need to enable mod_logio to use this.
    %{VARNAME}^tiThe contents of VARNAME: trailer line(s) + in the request sent to the server.
    %{VARNAME}^toThe contents of VARNAME: trailer line(s) + in the response sent from the server.

    Modifiers

    @@ -224,7 +259,7 @@

    Particular items can be restricted to print only for responses with specific HTTP status codes by placing a comma-separated list of status codes immediately following the - "%". The status code list may be peceded by a "!" to + "%". The status code list may be preceded by a "!" to indicate negation.

    @@ -268,7 +303,7 @@ prior to 2.0.46, no escaping was performed on these strings so you had to be quite careful when dealing with raw log files.

    -

    In httpd 2.0, unlike 1.3, the %b and +

    Since httpd 2.0, unlike 1.3, the %b and %B format strings do not represent the number of bytes sent to the client, but simply the size in bytes of the HTTP response (which will differ, for instance, if the @@ -334,7 +369,6 @@

    -
    Format String
    Context:server config
    Status:Base
    Module:mod_log_config
    Compatibility:Available in versions 2.0.41 and later.

    The BufferedLogs directive causes mod_log_config to store several log entries in @@ -401,14 +435,13 @@ expr=expression]

    For example, the following two sets of directives have exactly the same effect:

    -

    - # CustomLog with format nickname
    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    -
    - # CustomLog with explicit format string
    - CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" -

    +
    # CustomLog with format nickname
    +LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog "logs/access_log" common
    +
    +# CustomLog with explicit format string
    +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b"
    +

    The third argument is optional and controls whether or not to log a particular request. The condition can be the @@ -416,7 +449,8 @@ expr=expression] clause) of a particular variable in the server environment. Alternatively, the condition can be expressed as arbitrary boolean expression. If the condition is not satisfied, the request - will not be logged.

    + will not be logged. References to HTTP headers in the expression + will not cause the header names to be added to the Vary header.

    Environment variables can be set on a per-request basis using the mod_setenvif @@ -425,19 +459,46 @@ expr=expression] images on your server in a separate logfile but not in your main log, you can use:

    -

    - SetEnvIf Request_URI \.gif$ gif-image
    - CustomLog gif-requests.log common env=gif-image
    - CustomLog nongif-requests.log common env=!gif-image -

    +
    SetEnvIf Request_URI \.gif$ gif-image
    +CustomLog "gif-requests.log" common env=gif-image
    +CustomLog "nongif-requests.log" common env=!gif-image
    +

    Or, to reproduce the behavior of the old RefererIgnore directive, you might use the following:

    -

    - SetEnvIf Referer example\.com localreferer
    - CustomLog referer.log referer env=!localreferer -

    +
    SetEnvIf Referer example\.com localreferer
    +CustomLog "referer.log" referer env=!localreferer
    + + +
    +
    top
    +

    GlobalLog Directive

    + + + + + + + +
    Description:Sets filename and format of log file
    Syntax:GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]
    Context:server config
    Status:Base
    Module:mod_log_config
    Compatibility:Available in Apache HTTP Server 2.4.19 and later
    + +

    The GlobalLog directive defines a log shared + by the main server configuration and all defined virtual hosts.

    + +

    The GlobalLog directive is identical to + the CustomLog directive, apart from the following + differences:

    +
      +
    • GlobalLog is not valid in virtual host + context.
    • +
    • GlobalLog is used by virtual hosts that + define their own CustomLog, unlike a + globally specified CustomLog.
    • +
    top
    @@ -480,9 +541,9 @@ expr=expression] to define another nickname. Note that the nickname should not contain percent signs (%).

    -

    Example

    - LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common -

    +

    Example

    LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
    +
    +
    top
    @@ -503,19 +564,40 @@ expr=expression]
    which does not define a nickname. Common Log Format is used if no other format has been specified.

    -

    Example

    - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    - TransferLog logs/access_log -

    +

    Example

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    +TransferLog logs/access_log
    +

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_config.html.fr b/docs/manual/mod/mod_log_config.html.fr new file mode 100644 index 00000000000..0c9909db1b5 --- /dev/null +++ b/docs/manual/mod/mod_log_config.html.fr @@ -0,0 +1,641 @@ + + + + + +mod_log_config - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_log_config

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + + + +
    Description:Journalisation des requtes envoyes au +serveur
    Statut:Base
    IdentificateurdeModule:log_config_module
    FichierSource:mod_log_config.c
    +

    Sommaire

    + +

    Ce module apporte une grande souplesse dans la journalisation des + requtes des clients. Les journaux sont crits sous un format + personnalisable, et peuvent tre enregistrs directement dans un + fichier, ou redirigs vers un programme externe. La journalisation + conditionnelle est supporte, si bien que des requtes individuelles + peuvent tre incluses ou exclues des journaux en fonction de leur + caractristiques.

    + +

    Ce module fournit trois directives : TransferLog cre un fichier + journal, LogFormat + dfinit un format personnalis, et CustomLog dfinit un fichier journal et un format en + une seule tape. Pour journaliser les requtes dans plusieurs + fichiers, vous pouvez utiliser plusieurs fois les directives + TransferLog et + CustomLog dans chaque serveur.

    +
    + +
    top
    +
    +

    Formats de journaux personnaliss

    + +

    L'argument format des directives LogFormat et CustomLog est une chane de + caractres. Cette chane dfinit le format de la journalisation des + requtes dans le fichier journal. Elle peut contenir des caractres + littraux qui seront reproduits dans le fichier journal, et les + caractres de contrle de style C "\n" et "\t" reprsentant + respectivement une nouvelle ligne et une tabulation. Les guillemets + et les anti-slashes littraux doivent tre chapps l'aide + d'anti-slashes.

    + +

    Les caractristiques de la requte en elle-mme sont journalises + en insrant des directives "%" dans la chane de + format, celles-ci tant remplaces dans le fichier journal par + certaines valeurs comme suit :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Chane de formatDescription
    %%Le signe "pourcentage"
    %aL'adresse IP distante (voir le module + mod_remoteip).
    %{c}aAdresse IP distante de la connexion(voir le module + mod_remoteip)
    %AL'adresse IP locale
    %BLa taille de la rponse en octets, en excluant les en-ttes + HTTP.
    %bLa taille de la rponse en octets, en excluant les en-ttes + HTTP. Au format CLF , c'est dire un '-' la + place d'un 0 lorsqu'aucun octet n'est renvoy.
    %{NOMVAR}CLe contenu du cookie NOMVAR dans la requte + envoye au serveur. Seuls les cookies version 0 sont pleinement + supports.
    %DLe temps mis servir la requte, en + microsecondes.
    %{NOMVAR}eLe contenu de la variable d'environnement + NOMVAR
    %fNom de fichier
    %hServeur distant. Contiendra l'adresse IP si la directive + HostnameLookups est dfinie + Off, ce qui est sa valeur par dfaut. Si cette + adresse IP n'est enregistre que pour certains serveurs, vous + avez probablement dfini des directives de contrle d'accs qui + mentionnent ces derniers par leurs noms. Voir la documentation de Require + host.
    %HLe protocole de la requte
    %{NOMVAR}iLe contenu des lignes d'en-tte + NOMVAR: dans la requte envoye au + serveur. Ces en-ttes sont ajouts par d'autres modules (par + exemple mod_headers). Si vous tes intress + par ce qu'tait l'en-tte de la requte avant d'tre modifi + par la plupart des modules, utilisez + mod_setenvif pour copier l'en-tte dans une + variable d'environnement interne et journaliser sa valeur via + le champ %{VARNAME}e dcrit plus haut. + +
    %kNombre de requtes persistantes en cours pour cette + connexion. Interessant si la directive KeepAlive est utilise ; par exemple, + '1' signifie la premire requte aprs la requte initiale, '2' + la seconde, etc... ; autrement, il s'agit toujours de 0 + (indiquant la requte initiale).
    %lLe nom de connexion distant (en provenance d'identd, si + disponible). Affiche un tiret, sauf si + mod_ident est prsent et si IdentityCheck est + On.
    %LL'identifiant du message de journalisation de la requte + dans le journal des erreurs (ou '-' si aucun message n'a + t enregistr dans le journal des erreurs pour cette requte)
    %mLa mthode de la requte
    %{NOMVAR}nLe contenu de la note NOMVAR en provenance d'un + autre module.
    %{NOMVAR}oLe contenu de la ligne d'en-tte + NOMVAR: de la rponse.
    %pLe port canonique du serveur servant la requte
    %{format}pLe port canonique du serveur servant la requte ou le + vritable port du serveur ou le vritable port du client. les + formats valides sont canonical, local, + ou remote. +
    %PLe numro de processus du processus enfant qui a servi la + requte.
    %{format}PLe numro de processus ou le numro de thread du processus + enfant qui a servi la requte. Les formats valides sont + pid, tid, et hextid. + hextid ncessite APR version 1.2.0 ou suprieure. +
    %qLa chane d'arguments (prfixe par un ? si une + chane d'arguments existe, sinon une chane vide)
    %rLa premire ligne de la requte
    %RLe gestionnaire qui gnre la rponse (s'il y en a un).
    %sStatut. Pour les requtes rediriges en interne, il s'agit + du statut de la requte *originale* --- %>s pour + la dernire.
    %tDate laquelle la requte a t reue (au format anglais + standard)
    %{format}tLa date, sous la forme spcifie par format, qui devrait + tre au format tendu strftime(3) (ventuellement + localis). Si le format commence par begin: (valeur + par dfaut), la date est extraite au dbut du traitement de la + requte ; s'il commence par end:, la date + correspond au moment o l'entre du journal est inscrite, par + consquent vers la fin du traitement de la requte. Hormis les + formats supports par strftime(3), les formats + suivants sont aussi disponibles : + + + + + + +
    secnombre de secondes depuis Epoch
    msecnombre de millisecondes depuis Epoch
    usecnombre de microsecondes depuis Epoch
    msec_fracfraction de milliseconde
    usec_fracfraction de microseconde
    + Ces symboles ne peuvent pas tre combins entre eux ou avec un + formatage strftime(3) dans la mme chane de + format. Par contre, vous pouvez utiliser plusieurs symboles + %{format}t.
    %TLe temps mis pour servir la requte, en secondes.
    %{UNIT}TLe temps mis pour traiter la requte dans une unit dfinie + par UNIT. Les valeurs d'unit valides sont + ms pour millisecondes, us pour + microsecondes et s pour secondes. Si + UNIT est omis, la valeur de l'unit par dfaut est + la seconde ; spcifier la valeur d'unit us revient + utiliser le format %D. La possibilit de + spcifier une valeur d'unit avec le format %T est + disponible depuis la version 2.4.13 du serveur HTTP Apache.
    %uL'utilisateur distant (en provenance d'auth ; peut tre faux + si le statut de retour (%s) est 401).
    %ULe chemin de la requte, l'exclusion de toute chane + d'arguments.
    %vLe nom canonique du serveur qui a servi la requte, dfini + par la directive ServerName.
    %VLa nom du serveur en tenant compte de la dfinition de la + directive UseCanonicalName.
    %XStatut de la connexion lorsque la rponse a t renvoye + : + + + + + + + + + +
    X =connexion abandonne avant l'envoi de la rponse.
    + =la connexion peut rester ouverte aprs l'envoi de la + rponse.
    - = la connexion sera ferme aprs l'envoi de la + rponse.
    + +
    %ILe nombre d'octets reus, en comptant la requte et les + en-ttes, ne peut tre nul. Ncessite l'activation de + mod_logio.
    %ONombre d'octets envoys, y compris les en-ttes. Peut tre + nul dans les rares cas o une requte est avorte avant que la + rponse ne soit envoye. Ncessite l'activation de + mod_logio.
    %SNombre d'octets transmis (en mission et rception), y + compris corps et en-ttes de requte. Ce nombre ne peut pas tre + nul, et il correspond la combinaison des formats %I et %O. + mod_logio doit tre charg pour pouvoir + utiliser ce format.
    %{VARNAME}^tiLe contenu de VARNAME: dans les + paramtres de la requte envoye au serveur.
    %{VARNAME}^toLe contenu de VARNAME: dans les + paramtres de la rponse envoye par le serveur.
    + +

    Modificateurs

    + +

    Il est possible de restreindre l'enregistrement de certains + lments + en fonction du code de statut de la rponse, en insrant une liste + de codes de statut spars par des virgules immdiatement aprs le + caractre "%". Par exemple, "%400,501{User-agent}i" + n'enregistrera l'en-tte User-agent que dans le cas + d'une erreur 400 ou 501. Avec les autres codes de statut, c'est la + chane littrale "-" qui sera enregistre. La liste + de codes peut tre prcde d'un "!" pour inverser la + condition : "%!200,304,302{Referer}i" enregistre + l'en-tte Referer pour toutes les requtes qui + ne renvoient pas un des trois codes spcifis.

    + +

    Les modificateurs "<" et ">" peuvent tre utiliss pour + les requtes qui ont t rediriges en interne afin de choisir si + c'est respectivement la requte originale ou finale qui doit tre + consulte. Par dfaut, les directives %s, %U, %T, %D, + et %r consultent la requte originale, alors que + toutes les autres consultent la requte finale. Ainsi, par + exemple, on peut utiliser %>s pour enregistrer le + statut final de la requte, et %<u pour + enregistrer l'utilisateur authentifi l'origine pour une requte + redirige en interne vers une ressource sans authentification.

    + + + +

    Quelques Notes

    + +

    Pour des raisons de scurit, partir de la version 2.0.46, + les caractres non imprimables et autres caractres spciaux dans + les directives %r, %i et %o + doivent tre chapps l'aide des squences + \xhh, + o hh est le code hexadcimal du caractre spcial. + Comme exceptions cette rgle, les caractres " et + \ doivent tre chapps par un anti-slash, et tous + les "blancs" doivent tre crits selon leur notation de style C + (\n, \t, etc...). Avant la version + 2.0.46, aucun chappement n'tait effectu sur ces chanes, et il + fallait tre trs prudent lors de l'exploitation des journaux + bruts.

    + +

    A la diffrence de la version 1.3, depuis httpd 2.0, les chanes + de format %b et %B ne reprsentent pas + le nombre d'octets envoys au client, mais simplement la taille en + octets de la rponse HTTP (les deux tant diffrents, par exemple, + si la connexion est abandonne, ou si SSL est utilis). Le format + %O fourni par mod_logio, + enregistrera le nombre rel d'octets envoys sur le rseau.

    + +

    Note : mod_cache est implment en tant que + gestionnaire basique et non en tant que gestionnaire standard. + C'est pourquoi la chane de format %R ne renverra pas + d'information propos du gestionnaire lorsqu'une mise en cache de + contenu entre en jeu.

    + + + +

    Exemples

    + +

    Quelques chanes de format couramment utilises :

    + +
    +
    Format de journal courant (CLF)
    +
    "%h %l %u %t \"%r\" %>s %b"
    + +
    Format de journal courant avec un serveur virtuel
    +
    "%v %h %l %u %t \"%r\" %>s %b"
    + +
    Format de journal NCSA tandu/combin
    +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\""
    + +
    Format de journal de la page qui contient le lien vers la + page concerne (Referer)
    +
    "%{Referer}i -> %U"
    + +
    Format de journal de l'agent (Navigateur)
    +
    "%{User-agent}i"
    +
    + +

    Vous pouvez utiliser plusieurs fois la directive + %{format}t pour construire un format de temps + utilisant les symboles de format tendus tels que + msec_frac :

    +
    +
    Format de temps prenant en compte les milisecondes
    +
    "%{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t"
    + +
    + + +
    top
    +
    +

    Considrations concernant la +scurit

    +

    Voir le document conseils matire de + scurit pour plus de dtails sur les raisons pour lesquelles + votre scurit pourrait tre compromise, si le rpertoire o sont + stocks les fichiers journaux sont inscriptibles par tout autre + utilisateur que celui qui dmarre le serveur.

    +
    +
    top
    +

    Directive BufferedLogs

    + + + + + + + +
    Description:Enregistre les entres du journal dans un tampon en mmoire +avant de les crire sur disque
    Syntaxe:BufferedLogs On|Off
    Dfaut:BufferedLogs Off
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_log_config
    +

    Lorsque la directive BufferedLogs est + "on", mod_log_config stocke de nombreuses entres + du journal en mmoire, et les crit d'un seul bloc sur disque, + plutt que de les crire aprs chaque requte. Sur certains + systmes, ceci peut amliorer l'efficacit des accs disque, et par + consquent les performances. La directive ne peut tre dfinie + qu'une seule fois pour l'ensemble du serveur ; elle ne peut pas tre + dfinie au niveau d'un serveur virtuel.

    + +
    Cette directive doit tre utilise avec + prcautions car un crash peut provoquer la perte de donnes de + journalisation.
    + +
    +
    top
    +

    Directive CustomLog

    + + + + + + +
    Description:Dfinit le nom et le format du fichier +journal
    Syntaxe:CustomLog fichier|pipe +format|alias +[env=[!]variable-environnement| +expr=expression]
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_log_config
    +

    La directive CustomLog permet de contrler + la journalisation des requtes destines au serveur. Un format de + journal est spcifi, et la journalisation peut s'effectuer de + manire conditionnelle en fonction des caractristiques de la + requte en utilisant des variables d'environnement.

    + +

    Le premier argument, qui spcifie l'emplacement o les journaux + seront crits, accepte deux types de valeurs :

    + +
    +
    fichier
    +
    Un nom de fichier, relatif au rpertoire dfini par la + directive ServerRoot.
    + +
    pipe
    +
    Le caractre pipe "|", suivi du chemin vers un + programme qui recevra les informations de la journalisation sur + son entre standard. Voir les notes propos de la journalisation redirige pour plus + d'informations. + +

    Scurit :

    +

    Si les journaux sont redirigs vers un programme, ce dernier + s'excutera sous l'utilisateur qui a dmarr + httpd. Ce sera l'utilisateur root si le serveur + a t dmarr par root ; vrifiez que le programme est + scuris.

    +
    +

    Note

    +

    Lors de la spcification d'un chemin de fichier sur les + plate-formes non-Unix, il faut prendre soin de ne pas oublier + que seuls les slashes directs doivent tre utiliss, mme si la + plate-forme autorise l'emploi d'anti-slashes. D'une manire + gnrale, c'est une bonne ide que de n'utiliser que des slashes + directs dans les fichiers de configuration.

    +
    +
    + +

    Le second argument permet de dfinir ce qui va tre crit dans le + fichier journal. Il peut contenir soit un alias prdfini + par une directive LogFormat, soit une chane de + format explicite comme dcrit dans la section formats de journaux.

    + +

    Par exemple, les deux blocs de directives suivants produisent le + mme effet :

    + +
    # Journal personnalis avec alias de format
    +LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog "logs/access_log" common
    +
    +# Journal personnalis avec chane de format explicite
    +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b"
    + + +

    Le troisime argument est optionnel et permet de contrler si une + requte doit tre ou non journalise. Dans le cas d'une clause + 'env=!nom', la condition peut tre la + prsence ou l'absence d'une variable particulire dans + l'environnement du serveur. Dans le cas + d'une clause 'expr=expression', la condition consiste + en une expression boolenne + quelconque. Si la condition n'est pas vrifie, la requte ne sera + pas journalise. D'ventuelles rfrences des en-ttes HTTP dans + l'expression rationnelle n'entraneront pas l'ajout des noms + d'en-tte correspondants l'en-tte Vary.

    + +

    Les variables d'environnement peuvent tre dfinies au niveau de + chaque requte en utilisant les modules + mod_setenvif et/ou mod_rewrite. + Par exemple, si vous voulez enregistrer les requtes pour toutes les + images GIF sur votre serveur dans un fichier journal spar, et pas + dans votre journal principal, vous pouvez utiliser :

    + +
    SetEnvIf Request_URI \.gif$ gif-image
    +CustomLog "gif-requests.log" common env=gif-image
    +CustomLog "nongif-requests.log" common env=!gif-image
    + + +

    Ou, pour reproduire le comportement de l'ancienne directive + RefererIgnore, vous pouvez utiliser :

    + +
    SetEnvIf Referer example\.com localreferer
    +CustomLog "referer.log" referer env=!localreferer
    + + +
    +
    top
    +

    Directive GlobalLog

    + + + + + + + +
    Description:Dfinit le nom et le format du fichier journal
    Syntaxe:GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_log_config
    Compatibilit:Disponible partir de la version 2.4.19 du serveur HTTP Apache
    + +

    La directive GlobalLog permet de spcifier un + journal partag entre le serveur principal et tous les serveurs virtuels + dfinis.

    + +

    Elle est identique la directive CustomLog ces + diffrences prs :

    +
      +
    • Elle n'est pas valide dans un contexte de serveur virtuel.
    • +
    • A la diffrence d'une directive CustomLog + dfinie globalement, elle est prise en compte par les serveurs virtuels + qui dfinissent leur propre directive CustomLog.
    • +
    + +
    +
    top
    +

    Directive LogFormat

    + + + + + + + +
    Description:Dcrit un format utilisable dans un fichier +journal
    Syntaxe:LogFormat format|alias +[alias]
    Dfaut:LogFormat "%h %l %u %t \"%r\" %>s %b"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_log_config
    +

    Cette directive permet de spcifier le format du fichier journal + des accs.

    + +

    La directive LogFormat se prsente sous + deux formes. Sous la premire forme, qui ne possde qu'un seul + argument, la directive dfinit le format qui sera utilis dans les + journaux spcifis par les directives + TransferLog ultrieures. L'argument unique + peut contenir un format explicite comme dcrit dans la + section formats de journaux personnaliss + ci-dessus. Il peut aussi contenir un alias faisant + rfrence un format de journal prdfini par une directive + LogFormat comme dcrit plus loin.

    + +

    Sous sa seconde forme, la directive + LogFormat associe un format + explicite un alias. Cet alias peut + ensuite s'utiliser dans les directives + LogFormat ou CustomLog ultrieures, ce qui + vite d'avoir rpter l'ensemble de la chane de format. Une + directive LogFormat qui dfinit un alias + ne fait rien d'autre -- c'est dire qu'elle ne + fait que dfinir l'alias, elle n'applique pas le format et n'en + fait pas le format par dfaut. Par consquent, elle n'affecte pas + les directives TransferLog ultrieures. En + outre, la directive LogFormat ne peut pas + utiliser un alias pour en dfinir un autre. Notez que l'alias ne + doit pas contenir de caractre pourcent (%).

    + +

    Exemple

    LogFormat "%v %h %l %u %t \"%r\" %>s %b" serveur_virtuel_commun
    +
    + + +
    +
    top
    +

    Directive TransferLog

    + + + + + + +
    Description:Spcifie l'emplacement d'un fichier journal
    Syntaxe:TransferLog fichier|pipe
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_log_config
    +

    Cette directive possde exactement les mmes arguments et produit + les mmes effets que la directive CustomLog, l'exception qu'elle + ne permet pas de spcifier un format de journal explicite ou la + journalisation conditionnelle des requtes. En l'occurrence, le + format de journal est dtermin par la dernire dfinition d'une + directive LogFormat + qui ne dfinit pas d'alias. Si aucun format particulier n'a t + spcifi, c'est le Common Log Format qui sera utilis.

    + +

    Exemple

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    +TransferLog logs/access_log
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_log_config.html.ja.utf8 b/docs/manual/mod/mod_log_config.html.ja.utf8 index 6eec738d93c..f59752ad882 100644 --- a/docs/manual/mod/mod_log_config.html.ja.utf8 +++ b/docs/manual/mod/mod_log_config.html.ja.utf8 @@ -1,34 +1,41 @@ - -mod_log_config - Apache HTTP サーバ +mod_log_config - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_log_config

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -51,21 +58,22 @@ CustomLog ディレクティブは複数回使用することができます。

    -
    top

    カスタムログ書式

    @@ -387,6 +395,21 @@
    top
    +
    説明:サーバへのリクエストのロギング
    ステータス:Base
    モジュール識別子:log_config_module
    + + + + + + +
    説明:Sets filename and format of log file
    構文:GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]
    コンテキスト:サーバ設定ファイル
    ステータス:Base
    モジュール:mod_log_config
    互換性:Available in Apache HTTP Server 2.4.19 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    LogFormat ディレクティブ

    @@ -455,11 +478,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_config.html.ko.euc-kr b/docs/manual/mod/mod_log_config.html.ko.euc-kr index ec35b424fc9..e974ea083e4 100644 --- a/docs/manual/mod/mod_log_config.html.ko.euc-kr +++ b/docs/manual/mod/mod_log_config.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_log_config - Apache HTTP Server +mod_log_config - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_log_config

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -46,21 +52,22 @@ CustomLog þ ϸ û Ͽ ִ.

    -
    top

    α ϱ

    @@ -323,6 +330,21 @@
    top
    +
    説明:ログファイルで使用する書式を設定する
    + + + + + + +
    :Sets filename and format of log file
    :GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]
    :ּ
    :Base
    :mod_log_config
    :Available in Apache HTTP Server 2.4.19 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    LogFormat þ

    @@ -388,10 +410,32 @@ +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_config.html.tr.utf8 b/docs/manual/mod/mod_log_config.html.tr.utf8 index c4776bf691c..f3cfa8642fc 100644 --- a/docs/manual/mod/mod_log_config.html.tr.utf8 +++ b/docs/manual/mod/mod_log_config.html.tr.utf8 @@ -1,32 +1,37 @@ - -mod_log_config - Apache HTTP Sunucusu +mod_log_config - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_log_config

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    :αϿ Ѵ
    @@ -48,21 +53,22 @@ her sunucu için birden fazla TransferLog ve CustomLog yönergesi belirtilebilir.

    -
    top
    Açıklama:Sunucuya yapılan isteklerin günlük kayıtlarının tutulması
    Durum:Temel
    - + - - - - + + + + + + - + - + - + içeriği. Sadece 0 sürümlü çerezler tam olarak desteklenir. + - + - - - - - - - + + + + + + + - + yapılan değişikliklerden etkilenir. Modüllerin çoğu bunu + değiştirdiğinde önceki istek başlık isminin ne olduğuyla + ilgileniyorsanız, başlığı bir ortam değişkenine kaydetmek için + mod_setenvif modülünü kullanın ve yukarıda + açıklandığı gibi bu değeri %{DEĞİŞKEN}e ile + günlüğe kaydedin. + - + + + - + - + - + - + + uzatılmış strftime(3) biçeminde belirtilmelidir (genelde + yerelleştirme amaçlı). begin: (öntanımlı) ile başlayan + biçemlerde süre isteğin başlangıcına göredir. end: ile + başlayan biçemlerde ise süre isteğin işlenmesinin bi,tmesine yakın, + günlük girdisinin yazılmaya başladığı ana göredir. + strftime(3) tarafından desteklenen biçemlere ek olarak + aşağıdaki biçem dizgecikleri de desteklenmektedir: +
    Belirteç Açıklama
    %%Yüzde imi
    Yüzde imi.
    %aUzak IP adresi
    %AYerel IP adresi
    %BUzak IP adresi ve isteğin portu + (mod_remoteip modülüne bakın).
    %{c}abağlantının emsal IP adresi and portu + (mod_remoteip modülüne bakın).
    %AYerel IP adresi.
    %B HTTP başlıkları hariç, yanıtın bayt cinsinden uzunluğu.
    %b
    %b HTTP başlıkları hariç, yanıtın bayt cinsinden uzunluğu. OGB biçeminde hiç bayt gönderilmemişse günlüğe '-' yerine '0' çıktılanır.
    %{DEĞİŞKEN}C
    %{DEĞİŞKEN}C İstek içinde sunucuya gönderilen DEĞİŞKEN çerezinin - içeriği.
    %D
    %D Mikrosaniye cinsinden isteği sunmak için harcanan zaman.
    %{DEĞİŞKEN}e
    %{DEĞİŞKEN}e DEĞİŞKEN ortam değişkeninin içeriği.
    %fDosya ismi
    %hUzak konak
    %Hİstek Protokolü
    %{DEĞİŞKEN}i
    %fDosya ismi.
    %hUzak konak ismi. HostnameLookups yönergesine öntanımlı olan + Off değeri atanmışsa, IP adresi günlüğe kaydedilir. Bir + kaç konak için konak ismi de günlüğe kaydoluyorsa muhtemelen onların + isimlerini içeren erişim denetim yönergelerine sahipsinizdir. Bak: Require host.
    %Hİstek Protokolü.
    %{DEĞİŞKEN}i İstekle birlikte sunucuya gönderilen DEĞİŞKEN: başlık satır(lar)ının içeriği. Diğer modüllerde (örn. mod_headers) - yapılan değişikliklerden etkilenir.
    %k
    %k Bu bağlantıda işlenen isteklerin sayısı; yani örneğin, '1' değeri bağlantı kurulduktan sonraki ilk kalıcı bağlantıyı, '2', ikinci bağlantıyı, ..., vb. gösterir; KeepAlive kullanılmışsa değer anlamlıdır; aksi takdirde değer daima 0’dır.
    %l
    %l Uzak kullanıcı kimliği (sağlanmışsa, identd üzerinden). mod_ident modülü mevcut ve IdentityCheck yönergesine değer olarak On atanmış olmadıkça bu belirteç için günlüğe tire imi yazılır.
    %LHata günlüğündeki istek günlük kimliği (veya bu istek için hata + günlüğüne hiçbir şey kaydedilmemise '-'). Bu hataya neyin sebep + olduğunu öğrenmek için ilgili hata günlüğü satırına bakın.
    %mİstek yöntemi
    İstek yöntemi.
    %{DEĞİŞKEN}n Diğer modüldeki DEĞİŞKEN bilgisinin içeriği.
    %{DEĞİŞKEN}o Yanıttaki DEĞİŞKEN: başlık satır(lar)ının içeriği.
    %pSunucunun isteği sunduğu meşru port
    Sunucunun isteği sunduğu meşru port.
    %{biçem}p Sunucunun veya istemcinin gerçek portu veya sunucunun isteği sunduğu meşru port. Geçerli biçemler: canonical, @@ -148,28 +170,57 @@
    %r İsteğin ilk satırı.
    %sDurum. Dahili olarak yönlendirilen istekler için isteğin *özgün* - durumudur --- isteğin son durumu için %>s - kullanınız.
    Durum. Dahili olarak yönlendirilmiş istekler için isteğin + özgün durumudur. İsteğin son durumu için + %>s kullanınız.
    %tİsteğin alındığı tarih ve saat (standart ingiliz biçemi).
    [18/Sep/2011:19:18:28 -0400] biçeminde isteğin + alındığı tarih ve saat. Sondaki sayı zaman diliminin GMT'ye + uzaklığıdır.
    %{biçem}t İsteğin alındığı tarih ve saat; biçem - strftime(3) biçeminde belirtilmelidir (genelde - yerelleştirme amaçlı).
    + + + + + +
    secMutlak zaman başlangıcından (epoch) + beri geçen saniye sayısı
    msecMutlak zaman başlangıcından beri + geçen milisaniye sayısı
    usecMutlak zaman başlangıcından beri + geçen mikrosaniye sayısı
    msec_fracmilisaniyelik kesir
    usec_fracmikrosaniyelik kesir
    + Bu dizgecikler, aynı biçem dizgesi içinde bir diğeriyle birlikte veya + strftime(3) biçemlemesiyle birlikte yer alamazlar fakat + çok sayıda %{biçem}t kullanılabilir. + %T Saniye cinsinden, isteği sunmak için harcanan zaman. -%u +%{BİRİM}T + BİRİM ile belirtilen zaman birimi cinsinden, isteği + sunmak için harcanan zaman. Geçerli birimler: milisaniye için + ms, mikrosaniye için us, saniye için + s. s kullanımı birimsiz %T ile + aynı sonucu verir; us kullanımı %D ile aynı + sonucu verir. Birimli %T kullanımı 2.4.13 ve sonrasında + geçerlidir. +%u Uzak kullanıcı (kimlik doğrulaması istenmişse vardır; durum kodu (%s) 401 ise yanlış olabilir). -%U +%U Herhangi bir sorgu dizgesi içermeksizin istenen URL yolu. -%v +%v İsteği sunan sunucunun meşru sunucu ismi (ServerName). -%V +%V UseCanonicalName ayarı ile ilgili sunucu ismi. -%X +%X Yanıt tamamlandığında bağlantı durumu: @@ -180,32 +231,45 @@ -
    Yanıt gönderildikten sonra bağlantı canlı kalabilir.
    - = Yanıt gönderildikten sonra bağlantı kapatılacak.
    - -

    (Apache 1.3’ün son sürümlerinde bu belirteç %c idi - fakat geçmişe yönelik olarak %{isim}c ssl - sözdizimi ile çelişiyordu.)

    -%I - İstek ve başlıklar dahil alınan bayt sayısı; sıfır olamaz. Bunu - kullanmak için mod_logio etkin olmalıdır. -%O - Başlıklar dahil gönderilen bayt sayısı; sıfır olamaz.Bunu + +%I + İstek ve başlıklar dahil alınan bayt sayısı. Sıfır olamaz. Bunu kullanmak için mod_logio etkin olmalıdır. +%O + Başlıklar dahil gönderilen bayt sayısı. Bir yanıtın + gönderilmesinden önce istekten vazgeçilmesi gibi nadir durumlarda + sıfır olabilir. Bunu kullanmak için mod_logio etkin + olmalıdır. +%S + Aktarılan bayt sayısı (alınan ve gönderilen), istekler ve başlıklar + dahil; sıfır olamaz. %I ve %O'nun birleşimidir. Bunu kullanmak için + mod_logio etkinleştirilmelidir. +%{ALANADI}^ti + Sunucuya gönderilen istekteki ALANADI: + Trailer satır(lar)ının içeriği. +%{VARNAME}^to + Sunucudan gönderilen yanıttaki ALANADI: + Trailer satır(lar)ının içeriği.

    Değiştiriciler

    Belli öğelerin sadece belli durum kodlarıyla ilgili yanıtlarla basılabilmesi için bu durum kodları % iminden hemen sonra virgüllerle - ayrılmış olarak yazılabilir. Örneğin, - "%400,501{User-agent}i" belirteci, - User-agent başlığını sadece 400 ve 501 hatalarında - günlüğe kaydeder. Diğer durum kodları için günlüğe "-" - yazılır. Durum kodlarını olumsuzlamak için başa bir "!" - konabilir. Örneğin, "%!200,304,302{Referer}i" belirteci, - 200,304,302 durum kodlarından biriyle dönmeyen tüm istekler için - Referer başlığını durum koduyla birlikte günlüğe - kaydedecektir.

    + ayrılmış olarak yazılabilir. Olumsuzlama belirtmek için durum kodu listesinin önüne bir "!" konabilir.

    + + + + + + + +
    Biçem DizgesiAnlamı
    %400,501{User-agent}iSadece 400 ve 501 hatalarında User-agent günlüğe + kaydedilir. Diğer durum kodları için günlüğe "-" yazılır. +
    %!200,304,302{Referer}i200,304,302 durum kodlarından biriyle dönmeyen tüm istekler için + Referer başlığı durum koduyla birlikte günlüğe + kaydedilir. Aksi takdirde günlüğe "-" yazılır. +

    İsteğin dahili olarak yönlendirilmesinde özgün durumunun mu yoksa son durumunun mu hesaba katılacağı "<" ve ">" değiştiricileri ile @@ -230,7 +294,7 @@ dışındadır. 2.0.46 sürümünün öncesinde bu dizgeler öncelenmezdi ve ham günlük dosyalarıyla çalışırken dikkatli olmak gerekirdi.

    -

    2.0 sürümünde 1.3 sürümünün aksine %b ve +

    2.0 sürümünden beri 1.3 sürümünün aksine %b ve %B biçem belirteçleri, istemciye gönderilen bayt sayısını değil, HTTP yanıtının bayt sayısını ifade ederdi (bu yanıt, örneğin, SSL kullanıldığında veya bağlantı koptuğunda farklı uzunlukta olur). @@ -238,6 +302,13 @@ mod_logio modülü tarafından sağlanan %O biçem belirteci kullanılmaktadır.

    +
    +

    Ek bilgi: mod_cache standat bir eylemci olarak değil + hızlı bir eylemci olarak gerçeklenmiştir. Bu nedenle, içerik + arabelleklemesi sözkonusu olduğunda %R biçem dizgesi + herhangi bir eylemci bilgisi döndürmeyecektir.

    +
    +

    Örnekler

    @@ -262,6 +333,14 @@
    User-agent başlığını içeren günlük biçemi
    "%{User-agent}i"
    + +

    msec_frac gibi ek biçem dizgeciklerini kullanan bir zaman + biçemi belirtmek isterseniz %{format}t biçem dizgesini + defalarca kullanabilirsiniz:

    +
    +
    Milisaniyeleri de içeren bir zaman damgası
    +
    "%{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t"
    +
    top
    @@ -291,7 +370,8 @@ sunucu geneli için belirtilebilir, sanal konaklar için ayrı ayrı yapılandırılamaz.

    -
    Bu yönerge deneyseldir ve dikkatli kullanılmalıdır.
    +
    Bir çökme günlük verisi kaybına sebep olacağından bu yönerge + dikkatli kullanılmalıdır.
    top
    @@ -300,7 +380,8 @@ Açıklama:Günlük dosyasın ismini ve girdi biçemini belirler. Sözdizimi:CustomLog dosya|borulu-süreç biçem|takma-ad -[env=[!]ortam-değişkeni] +[env=[!]ortam-değişkeni]| +expr=ifade] Bağlam:sunucu geneli, sanal konak Durum:Temel Modül:mod_log_config @@ -321,7 +402,8 @@
    borulu-süreç
    "|" boru karakteri ile öncelenmiş olarak günlük bilgisini standart girdisinden kabul edecek sürecin ismi (veya komut - satırı). + satırı) Daha fazla bilgi için borulu + günlüklere bakınız.

    Güvenlik:

    Bir borulu süreç kullanılmışsa, süreç httpd’yi @@ -343,20 +425,21 @@

    Örneğin, aşağıdaki iki yönerge kümesi aynı etkiye sahiptir:

    -

    - # Biçem dizgesi yerine takma ad içeren CustomLog
    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    -
    - # Biçem dizgesinin kendisini içeren CustomLog
    - CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" -

    - -

    Üçüncü argüman isteğe bağlı olup, sunucu ortamında belli bir değişkenin - varlığına bağlı olarak belli bir isteğin günlüğe kaydedilip - kaydedilmeyeceğini belirler. Eğer istek için belirtilen ortam değişkeni mevcutsa (veya - 'env=!değişken' durumunda mevcut değilse) istek - günlüğe kaydedilir.

    +
    # Biçem dizgesi yerine takma ad içeren CustomLog
    +LogFormat "%h %l %u %t \"%r\" %>s %b" common
    +CustomLog "logs/access_log" common
    +
    +# Biçem dizgesinin kendisini içeren CustomLog
    +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b"
    + + +

    Üçüncü argüman isteğe bağlı olup,belli bir isteğin günlüğe kaydedilip + kaydedilmeyeceğini belirler. Koşul, sunucu ortamında belli bir değişkenin varlığı veya + yokluğu olabilir (bir 'env=!isim' durumu). + İstenirse koşul keyfi bir mantıksal ifade + olarak da belirtilebilir. Eğer koşul sağlanmazsa istek günlüğe + kaydedilmez. İfadede bulunan HTTP başlıklarına başvurular bu başlık + isimlerinin Vary başlığına eklenmesine sebep olmaz.

    Ortam değişkenleri mod_setenvif ve/veya mod_rewrite modülleri kullanılarak her istek @@ -364,19 +447,46 @@ istekleri ana günlük dosyasına değil de başka bir dosyaya kaydetmek isterseniz:

    -

    - SetEnvIf Request_URI \.gif$ gif-image
    - CustomLog gif-requests.log common env=gif-image
    - CustomLog nongif-requests.log common env=!gif-image -

    +
    SetEnvIf Request_URI \.gif$ gif-image
    +CustomLog "gif-requests.log" common env=gif-image
    +CustomLog "nongif-requests.log" common env=!gif-image
    +

    Veya eski RefererIgnore yönergesinin davranışını taklit etmek isterseniz:

    -

    - SetEnvIf Referer example\.com yerel-atif
    - CustomLog referer.log referer env=!yerel-atif -

    +
    SetEnvIf Referer example\.com localreferer
    +CustomLog "referer.log" referer env=!localreferer
    + + +
    +
    top
    +

    GlobalLog Yönergesi

    + + + + + + + +
    Açıklama:Günlük dosyasının ismini ve biçemini belirler
    Sözdizimi:GlobalLog dosya|boru|sağlayıcı +biçem|takma_ad +[env=[!]ortam_değişkeni| +expr=ifade]
    Bağlam:sunucu geneli
    Durum:Temel
    Modül:mod_log_config
    Uyumluluk:Apache HTTP Sunucusunun 2.4.19 ve sonraki sürümlerinde kullanılabilir.
    + +

    GlobalLog yönergesi ana sunucu yapılandırması ve + tüm tanımlı sanal konaklarca paylaşılan bir günlük tanımlar.

    + +

    GlobalLog yönergesi aşağıdaki farklar dışında + CustomLog yönergesine eşdeğerdir:

    +
      +
    • GlobalLog sanal konak bağlamında belirtilirse + geçersizdir.
    • +
    • Sanal konaklar küresel bağlamda belirtilmiş bir + CustomLog yönergesinin tersine + GlobalLog yönergesini kendi + CustomLog yönergesiymiş gibi kullanır.
    • +
    top
    @@ -414,9 +524,8 @@ takma ada başka bir takma ad tanımlamakta da kullanılamaz. Bir takma adın yüzde imi (%) içeremeyeceğine de dikkat ediniz.

    -

    Örnek

    - LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common -

    +
    LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
    +
    top
    @@ -435,20 +544,40 @@ bir takma ad kullanılır. Açıkça bir günlük biçemi takma adı belirtilmedikçe Ortak Günlük Biçemi öntanımlıdır.

    -

    Örnek

    - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" - \"%{User-agent}i\""
    - TransferLog logs/access_log -

    +
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    +TransferLog "logs/access_log"
    +

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index 1943d5c2660..c7b3543ff6d 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -71,7 +71,12 @@ The percent sign. %a - Remote IP-address. + Client IP address of the request (see the + mod_remoteip module). + + %{c}a + Underlying peer IP address of the connection (see the + mod_remoteip module). %A Local IP-address. @@ -112,7 +117,12 @@ %{VARNAME}i The contents of VARNAME: header line(s) in the request sent to the server. Changes made by other - modules (e.g. mod_headers) affect this. + modules (e.g. mod_headers) affect this. If you're + interested in what the request header was prior to when most + modules would have modified it, use mod_setenvif + to copy the header into an internal environment variable and log + that value with the %{VARNAME}e described + above. %k @@ -206,6 +216,15 @@ %T The time taken to serve the request, in seconds. + %{UNIT}T + The time taken to serve the request, in a time unit given by + UNIT. Valid units are ms for milliseconds, + us for microseconds, and s for seconds. + Using s gives the same result as %T + without any format; using us gives the same result + as %D. Combining %T with a unit is + available in 2.4.13 and later. + %u Remote user if the request was authenticated. May be bogus if return status (%s) is 401 (unauthorized). @@ -243,8 +262,23 @@ You need to enable mod_logio to use this. %O - Bytes sent, including headers. Cannot be zero. You need to + Bytes sent, including headers. May be zero in rare cases + such as when a request is aborted before a response is sent. + You need to enable mod_logio to use this. + + %S + Bytes transferred (received and sent), including request and headers, + cannot be zero. This is the combination of %I and %O. You need to enable mod_logio to use this. + + %{VARNAME}^ti + The contents of VARNAME: trailer line(s) + in the request sent to the server. + + %{VARNAME}^to + The contents of VARNAME: trailer line(s) + in the response sent from the server. +
    Modifiers @@ -252,7 +286,7 @@

    Particular items can be restricted to print only for responses with specific HTTP status codes by placing a comma-separated list of status codes immediately following the - "%". The status code list may be peceded by a "!" to + "%". The status code list may be preceded by a "!" to indicate negation.

    @@ -302,7 +336,7 @@ prior to 2.0.46, no escaping was performed on these strings so you had to be quite careful when dealing with raw log files.

    -

    In httpd 2.0, unlike 1.3, the %b and +

    Since httpd 2.0, unlike 1.3, the %b and %B format strings do not represent the number of bytes sent to the client, but simply the size in bytes of the HTTP response (which will differ, for instance, if the @@ -367,7 +401,6 @@ BufferedLogs On|Off BufferedLogs Off server config -Available in versions 2.0.41 and later.

    The BufferedLogs directive causes @@ -436,14 +469,14 @@ expr=expression]

    For example, the following two sets of directives have exactly the same effect:

    - - # CustomLog with format nickname
    - LogFormat "%h %l %u %t \"%r\" %>s %b" common
    - CustomLog logs/access_log common
    -
    - # CustomLog with explicit format string
    - CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" -
    + +# CustomLog with format nickname +LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog "logs/access_log" common + +# CustomLog with explicit format string +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b" +

    The third argument is optional and controls whether or not to log a particular request. The condition can be the @@ -452,7 +485,8 @@ expr=expression] environment. Alternatively, the condition can be expressed as arbitrary boolean expression. If the condition is not satisfied, the request - will not be logged.

    + will not be logged. References to HTTP headers in the expression + will not cause the header names to be added to the Vary header.

    Environment variables can be set on a per-request basis using the mod_setenvif @@ -461,19 +495,19 @@ expr=expression] images on your server in a separate logfile but not in your main log, you can use:

    - - SetEnvIf Request_URI \.gif$ gif-image
    - CustomLog gif-requests.log common env=gif-image
    - CustomLog nongif-requests.log common env=!gif-image -
    + +SetEnvIf Request_URI \.gif$ gif-image +CustomLog "gif-requests.log" common env=gif-image +CustomLog "nongif-requests.log" common env=!gif-image +

    Or, to reproduce the behavior of the old RefererIgnore directive, you might use the following:

    - - SetEnvIf Referer example\.com localreferer
    - CustomLog referer.log referer env=!localreferer -
    + +SetEnvIf Referer example\.com localreferer +CustomLog "referer.log" referer env=!localreferer + @@ -517,8 +551,11 @@ expr=expression] percent signs (%).

    Example + LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common + + @@ -540,10 +577,42 @@ expr=expression] other format has been specified.

    Example - LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
    - TransferLog logs/access_log + +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" +TransferLog logs/access_log +
    + +GlobalLog +Sets filename and format of log file +GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression] +server config + +Available in Apache HTTP Server 2.4.19 and later + + + +

    The GlobalLog directive defines a log shared + by the main server configuration and all defined virtual hosts.

    + +

    The GlobalLog directive is identical to + the CustomLog directive, apart from the following + differences:

    +
      +
    • GlobalLog is not valid in virtual host + context.
    • +
    • GlobalLog is used by virtual hosts that + define their own CustomLog, unlike a + globally specified CustomLog.
    • +
    +
    +
    + + diff --git a/docs/manual/mod/mod_log_config.xml.fr b/docs/manual/mod/mod_log_config.xml.fr new file mode 100644 index 00000000000..deb138050c4 --- /dev/null +++ b/docs/manual/mod/mod_log_config.xml.fr @@ -0,0 +1,674 @@ + + + + + + + + + + + +mod_log_config +Journalisation des requêtes envoyées au +serveur +Base +mod_log_config.c +log_config_module + + +

    Ce module apporte une grande souplesse dans la journalisation des + requêtes des clients. Les journaux sont écrits sous un format + personnalisable, et peuvent être enregistrés directement dans un + fichier, ou redirigés vers un programme externe. La journalisation + conditionnelle est supportée, si bien que des requêtes individuelles + peuvent être incluses ou exclues des journaux en fonction de leur + caractéristiques.

    + +

    Ce module fournit trois directives : TransferLog crée un fichier + journal, LogFormat + définit un format personnalisé, et CustomLog définit un fichier journal et un format en + une seule étape. Pour journaliser les requêtes dans plusieurs + fichiers, vous pouvez utiliser plusieurs fois les directives + TransferLog et + CustomLog dans chaque serveur.

    +
    +Les fichiers journaux +d'Apache + +
    Formats de journaux personnalisés + +

    L'argument format des directives LogFormat et CustomLog est une chaîne de + caractères. Cette chaîne définit le format de la journalisation des + requêtes dans le fichier journal. Elle peut contenir des caractères + littéraux qui seront reproduits dans le fichier journal, et les + caractères de contrôle de style C "\n" et "\t" représentant + respectivement une nouvelle ligne et une tabulation. Les guillemets + et les anti-slashes littéraux doivent être échappés à l'aide + d'anti-slashes.

    + +

    Les caractéristiques de la requête en elle-même sont journalisées + en insérant des directives "%" dans la chaîne de + format, celles-ci étant remplacées dans le fichier journal par + certaines valeurs comme suit :

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Chaîne de formatDescription
    %%Le signe "pourcentage"
    %aL'adresse IP distante (voir le module + mod_remoteip).
    %{c}aAdresse IP distante de la connexion(voir le module + mod_remoteip)
    %AL'adresse IP locale
    %BLa taille de la réponse en octets, en excluant les en-têtes + HTTP.
    %bLa taille de la réponse en octets, en excluant les en-têtes + HTTP. Au format CLF , c'est à dire un '-' à la + place d'un 0 lorsqu'aucun octet n'est renvoyé.
    %{NOMVAR}CLe contenu du cookie NOMVAR dans la requête + envoyée au serveur. Seuls les cookies version 0 sont pleinement + supportés.
    %DLe temps mis à servir la requête, en + microsecondes.
    %{NOMVAR}eLe contenu de la variable d'environnement + NOMVAR
    %fNom de fichier
    %hServeur distant. Contiendra l'adresse IP si la directive + HostnameLookups est définie + à Off, ce qui est sa valeur par défaut. Si cette + adresse IP n'est enregistrée que pour certains serveurs, vous + avez probablement défini des directives de contrôle d'accès qui + mentionnent ces derniers par leurs noms. Voir la documentation de Require + host.
    %HLe protocole de la requête
    %{NOMVAR}iLe contenu des lignes d'en-tête + NOMVAR: dans la requête envoyée au + serveur. Ces en-têtes sont ajoutés par d'autres modules (par + exemple mod_headers). Si vous êtes intéressé + par ce qu'était l'en-tête de la requête avant d'être modifié + par la plupart des modules, utilisez + mod_setenvif pour copier l'en-tête dans une + variable d'environnement interne et journaliser sa valeur via + le champ %{VARNAME}e décrit plus haut. + +
    %kNombre de requêtes persistantes en cours pour cette + connexion. Interessant si la directive KeepAlive est utilisée ; par exemple, + '1' signifie la première requête après la requête initiale, '2' + la seconde, etc... ; autrement, il s'agit toujours de 0 + (indiquant la requête initiale).
    %lLe nom de connexion distant (en provenance d'identd, si + disponible). Affiche un tiret, sauf si + mod_ident est présent et si IdentityCheck est à + On.
    %LL'identifiant du message de journalisation de la requête + dans le journal des erreurs (ou '-' si aucun message n'a + été enregistré dans le journal des erreurs pour cette requête)
    %mLa méthode de la requête
    %{NOMVAR}nLe contenu de la note NOMVAR en provenance d'un + autre module.
    %{NOMVAR}oLe contenu de la ligne d'en-tête + NOMVAR: de la réponse.
    %pLe port canonique du serveur servant la requête
    %{format}pLe port canonique du serveur servant la requête ou le + véritable port du serveur ou le véritable port du client. les + formats valides sont canonical, local, + ou remote. +
    %PLe numéro de processus du processus enfant qui a servi la + requête.
    %{format}PLe numéro de processus ou le numéro de thread du processus + enfant qui a servi la requête. Les formats valides sont + pid, tid, et hextid. + hextid nécessite APR version 1.2.0 ou supérieure. +
    %qLa chaîne d'arguments (préfixée par un ? si une + chaîne d'arguments existe, sinon une chaîne vide)
    %rLa première ligne de la requête
    %RLe gestionnaire qui génère la réponse (s'il y en a un).
    %sStatut. Pour les requêtes redirigées en interne, il s'agit + du statut de la requête *originale* --- %>s pour + la dernière.
    %tDate à laquelle la requête a été reçue (au format anglais + standard)
    %{format}tLa date, sous la forme spécifiée par format, qui devrait + être au format étendu strftime(3) (éventuellement + localisé). Si le format commence par begin: (valeur + par défaut), la date est extraite au début du traitement de la + requête ; s'il commence par end:, la date + correspond au moment où l'entrée du journal est inscrite, par + conséquent vers la fin du traitement de la requête. Hormis les + formats supportés par strftime(3), les formats + suivants sont aussi disponibles : + + + + + + +
    secnombre de secondes depuis Epoch
    msecnombre de millisecondes depuis Epoch
    usecnombre de microsecondes depuis Epoch
    msec_fracfraction de milliseconde
    usec_fracfraction de microseconde
    + Ces symboles ne peuvent pas être combinés entre eux ou avec un + formatage strftime(3) dans la même chaîne de + format. Par contre, vous pouvez utiliser plusieurs symboles + %{format}t.
    %TLe temps mis pour servir la requête, en secondes.
    %{UNIT}TLe temps mis pour traiter la requête dans une unité définie + par UNIT. Les valeurs d'unité valides sont + ms pour millisecondes, us pour + microsecondes et s pour secondes. Si + UNIT est omis, la valeur de l'unité par défaut est + la seconde ; spécifier la valeur d'unité us revient + à utiliser le format %D. La possibilité de + spécifier une valeur d'unité avec le format %T est + disponible depuis la version 2.4.13 du serveur HTTP Apache.
    %uL'utilisateur distant (en provenance d'auth ; peut être faux + si le statut de retour (%s) est 401).
    %ULe chemin de la requête, à l'exclusion de toute chaîne + d'arguments.
    %vLe nom canonique du serveur qui a servi la requête, défini + par la directive ServerName.
    %VLa nom du serveur en tenant compte de la définition de la + directive UseCanonicalName.
    %XStatut de la connexion lorsque la réponse a été renvoyée + : + + + + + + + + + +
    X =connexion abandonnée avant l'envoi de la réponse.
    + =la connexion peut rester ouverte après l'envoi de la + réponse.
    - = la connexion sera fermée après l'envoi de la + réponse.
    + +
    %ILe nombre d'octets reçus, en comptant la requête et les + en-têtes, ne peut être nul. Nécessite l'activation de + mod_logio.
    %ONombre d'octets envoyés, y compris les en-têtes. Peut être + nul dans les rares cas où une requête est avortée avant que la + réponse ne soit envoyée. Nécessite l'activation de + mod_logio.
    %SNombre d'octets transmis (en émission et réception), y + compris corps et en-têtes de requête. Ce nombre ne peut pas être + nul, et il correspond à la combinaison des formats %I et %O. + mod_logio doit être chargé pour pouvoir + utiliser ce format.
    %{VARNAME}^tiLe contenu de VARNAME: dans les + paramètres de la requête envoyée au serveur.
    %{VARNAME}^toLe contenu de VARNAME: dans les + paramètres de la réponse envoyée par le serveur.
    + +
    Modificateurs + +

    Il est possible de restreindre l'enregistrement de certains + éléments + en fonction du code de statut de la réponse, en insérant une liste + de codes de statut séparés par des virgules immédiatement après le + caractère "%". Par exemple, "%400,501{User-agent}i" + n'enregistrera l'en-tête User-agent que dans le cas + d'une erreur 400 ou 501. Avec les autres codes de statut, c'est la + chaîne littérale "-" qui sera enregistrée. La liste + de codes peut être précédée d'un "!" pour inverser la + condition : "%!200,304,302{Referer}i" enregistre + l'en-tête Referer pour toutes les requêtes qui + ne renvoient pas un des trois codes spécifiés.

    + +

    Les modificateurs "<" et ">" peuvent être utilisés pour + les requêtes qui ont été redirigées en interne afin de choisir si + c'est respectivement la requête originale ou finale qui doit être + consultée. Par défaut, les directives %s, %U, %T, %D, + et %r consultent la requête originale, alors que + toutes les autres consultent la requête finale. Ainsi, par + exemple, on peut utiliser %>s pour enregistrer le + statut final de la requête, et %<u pour + enregistrer l'utilisateur authentifié à l'origine pour une requête + redirigée en interne vers une ressource sans authentification.

    + +
    + +
    Quelques Notes + +

    Pour des raisons de sécurité, à partir de la version 2.0.46, + les caractères non imprimables et autres caractères spéciaux dans + les directives %r, %i et %o + doivent être échappés à l'aide des séquences + \xhh, + où hh est le code hexadécimal du caractère spécial. + Comme exceptions à cette règle, les caractères " et + \ doivent être échappés par un anti-slash, et tous + les "blancs" doivent être écrits selon leur notation de style C + (\n, \t, etc...). Avant la version + 2.0.46, aucun échappement n'était effectué sur ces chaînes, et il + fallait être très prudent lors de l'exploitation des journaux + bruts.

    + +

    A la différence de la version 1.3, depuis httpd 2.0, les chaînes + de format %b et %B ne représentent pas + le nombre d'octets envoyés au client, mais simplement la taille en + octets de la réponse HTTP (les deux étant différents, par exemple, + si la connexion est abandonnée, ou si SSL est utilisé). Le format + %O fourni par mod_logio, + enregistrera le nombre réel d'octets envoyés sur le réseau.

    + +

    Note : mod_cache est implémenté en tant que + gestionnaire basique et non en tant que gestionnaire standard. + C'est pourquoi la chaîne de format %R ne renverra pas + d'information à propos du gestionnaire lorsqu'une mise en cache de + contenu entre en jeu.

    + +
    + +
    Exemples + +

    Quelques chaînes de format couramment utilisées :

    + +
    +
    Format de journal courant (CLF)
    +
    "%h %l %u %t \"%r\" %>s %b"
    + +
    Format de journal courant avec un serveur virtuel
    +
    "%v %h %l %u %t \"%r\" %>s %b"
    + +
    Format de journal NCSA étandu/combiné
    +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\""
    + +
    Format de journal de la page qui contient le lien vers la + page concernée (Referer)
    +
    "%{Referer}i -> %U"
    + +
    Format de journal de l'agent (Navigateur)
    +
    "%{User-agent}i"
    +
    + +

    Vous pouvez utiliser plusieurs fois la directive + %{format}t pour construire un format de temps + utilisant les symboles de format étendus tels que + msec_frac :

    +
    +
    Format de temps prenant en compte les milisecondes
    +
    "%{%d/%b/%Y %T}t.%{msec_frac}t %{%z}t"
    + +
    + +
    +
    + +
    Considérations concernant la +sécurité +

    Voir le document conseils à matière de + sécurité pour plus de détails sur les raisons pour lesquelles + votre sécurité pourrait être compromise, si le répertoire où sont + stockés les fichiers journaux sont inscriptibles par tout autre + utilisateur que celui qui démarre le serveur.

    +
    + + +BufferedLogs +Enregistre les entrées du journal dans un tampon en mémoire +avant de les écrire sur disque +BufferedLogs On|Off +BufferedLogs Off +server config + + +

    Lorsque la directive BufferedLogs est à + "on", mod_log_config stocke de nombreuses entrées + du journal en mémoire, et les écrit d'un seul bloc sur disque, + plutôt que de les écrire après chaque requête. Sur certains + systèmes, ceci peut améliorer l'efficacité des accès disque, et par + conséquent les performances. La directive ne peut être définie + qu'une seule fois pour l'ensemble du serveur ; elle ne peut pas être + définie au niveau d'un serveur virtuel.

    + + Cette directive doit être utilisée avec + précautions car un crash peut provoquer la perte de données de + journalisation. +
    +
    + + +CookieLog +Définit le nom du fichier pour la journalisation des +cookies +CookieLog nom-fichier +server configvirtual host + +Cette directive est obsolète. + + +

    La directive CookieLog permet de définir + le nom du fichier pour la journalisation des cookies. Le nom du + fichier est relatif au répertoire défini par la directive ServerRoot. Cette directive n'est présente + qu'à des fins de compatibilité avec with mod_cookies, + et est obsolète.

    +
    +
    + + +CustomLog +Définit le nom et le format du fichier +journal +CustomLog fichier|pipe +format|alias +[env=[!]variable-environnement| +expr=expression] +server configvirtual host + + + +

    La directive CustomLog permet de contrôler + la journalisation des requêtes destinées au serveur. Un format de + journal est spécifié, et la journalisation peut s'effectuer de + manière conditionnelle en fonction des caractéristiques de la + requête en utilisant des variables d'environnement.

    + +

    Le premier argument, qui spécifie l'emplacement où les journaux + seront écrits, accepte deux types de valeurs :

    + +
    +
    fichier
    +
    Un nom de fichier, relatif au répertoire défini par la + directive ServerRoot.
    + +
    pipe
    +
    Le caractère pipe "|", suivi du chemin vers un + programme qui recevra les informations de la journalisation sur + son entrée standard. Voir les notes à propos de la journalisation redirigée pour plus + d'informations. + + Sécurité : +

    Si les journaux sont redirigés vers un programme, ce dernier + s'exécutera sous l'utilisateur qui a démarré + httpd. Ce sera l'utilisateur root si le serveur + a été démarré par root ; vérifiez que le programme est + sécurisé.

    +
    + Note +

    Lors de la spécification d'un chemin de fichier sur les + plate-formes non-Unix, il faut prendre soin de ne pas oublier + que seuls les slashes directs doivent être utilisés, même si la + plate-forme autorise l'emploi d'anti-slashes. D'une manière + générale, c'est une bonne idée que de n'utiliser que des slashes + directs dans les fichiers de configuration.

    +
    +
    + +

    Le second argument permet de définir ce qui va être écrit dans le + fichier journal. Il peut contenir soit un alias prédéfini + par une directive LogFormat, soit une chaîne de + format explicite comme décrit dans la section formats de journaux.

    + +

    Par exemple, les deux blocs de directives suivants produisent le + même effet :

    + + +# Journal personnalisé avec alias de format +LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog "logs/access_log" common + +# Journal personnalisé avec chaîne de format explicite +CustomLog "logs/access_log" "%h %l %u %t \"%r\" %>s %b" + + +

    Le troisième argument est optionnel et permet de contrôler si une + requête doit être ou non journalisée. Dans le cas d'une clause + 'env=!nom', la condition peut être la + présence ou l'absence d'une variable particulière dans + l'environnement du serveur. Dans le cas + d'une clause 'expr=expression', la condition consiste + en une expression booléenne + quelconque. Si la condition n'est pas vérifiée, la requête ne sera + pas journalisée. D'éventuelles références à des en-têtes HTTP dans + l'expression rationnelle n'entraîneront pas l'ajout des noms + d'en-tête correspondants à l'en-tête Vary.

    + +

    Les variables d'environnement peuvent être définies au niveau de + chaque requête en utilisant les modules + mod_setenvif et/ou mod_rewrite. + Par exemple, si vous voulez enregistrer les requêtes pour toutes les + images GIF sur votre serveur dans un fichier journal séparé, et pas + dans votre journal principal, vous pouvez utiliser :

    + + +SetEnvIf Request_URI \.gif$ gif-image +CustomLog "gif-requests.log" common env=gif-image +CustomLog "nongif-requests.log" common env=!gif-image + + +

    Ou, pour reproduire le comportement de l'ancienne directive + RefererIgnore, vous pouvez utiliser :

    + + +SetEnvIf Referer example\.com localreferer +CustomLog "referer.log" referer env=!localreferer + +
    +
    + + +LogFormat +Décrit un format utilisable dans un fichier +journal +LogFormat format|alias +[alias] +LogFormat "%h %l %u %t \"%r\" %>s %b" +server configvirtual host + + + +

    Cette directive permet de spécifier le format du fichier journal + des accès.

    + +

    La directive LogFormat se présente sous + deux formes. Sous la première forme, qui ne possède qu'un seul + argument, la directive définit le format qui sera utilisé dans les + journaux spécifiés par les directives + TransferLog ultérieures. L'argument unique + peut contenir un format explicite comme décrit dans la + section formats de journaux personnalisés + ci-dessus. Il peut aussi contenir un alias faisant + référence à un format de journal prédéfini par une directive + LogFormat comme décrit plus loin.

    + +

    Sous sa seconde forme, la directive + LogFormat associe un format + explicite à un alias. Cet alias peut + ensuite s'utiliser dans les directives + LogFormat ou CustomLog ultérieures, ce qui + évite d'avoir à répéter l'ensemble de la chaîne de format. Une + directive LogFormat qui définit un alias + ne fait rien d'autre -- c'est à dire qu'elle ne + fait que définir l'alias, elle n'applique pas le format et n'en + fait pas le format par défaut. Par conséquent, elle n'affecte pas + les directives TransferLog ultérieures. En + outre, la directive LogFormat ne peut pas + utiliser un alias pour en définir un autre. Notez que l'alias ne + doit pas contenir de caractère pourcent (%).

    + + Exemple + + LogFormat "%v %h %l %u %t \"%r\" %>s %b" serveur_virtuel_commun + + + +
    +
    + + +TransferLog +Spécifie l'emplacement d'un fichier journal +TransferLog fichier|pipe +server configvirtual host + + + +

    Cette directive possède exactement les mêmes arguments et produit + les mêmes effets que la directive CustomLog, à l'exception qu'elle + ne permet pas de spécifier un format de journal explicite ou la + journalisation conditionnelle des requêtes. En l'occurrence, le + format de journal est déterminé par la dernière définition d'une + directive LogFormat + qui ne définit pas d'alias. Si aucun format particulier n'a été + spécifié, c'est le Common Log Format qui sera utilisé.

    + + Exemple + +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" +TransferLog logs/access_log + + +
    +
    + + +GlobalLog +Définit le nom et le format du fichier journal +GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression] +server config + +Disponible à partir de la version 2.4.19 du serveur HTTP Apache + + + +

    La directive GlobalLog permet de spécifier un + journal partagé entre le serveur principal et tous les serveurs virtuels + définis.

    + +

    Elle est identique à la directive CustomLog à ces + différences près :

    +
      +
    • Elle n'est pas valide dans un contexte de serveur virtuel.
    • +
    • A la différence d'une directive CustomLog + définie globalement, elle est prise en compte par les serveurs virtuels + qui définissent leur propre directive CustomLog.
    • +
    +
    +
    + + diff --git a/docs/manual/mod/mod_log_config.xml.ja b/docs/manual/mod/mod_log_config.xml.ja index 31139ca2f7a..7dcf648cdc1 100644 --- a/docs/manual/mod/mod_log_config.xml.ja +++ b/docs/manual/mod/mod_log_config.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_log_debug - Apache HTTP Server +mod_log_debug - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_log_debug

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -29,14 +35,16 @@
    Description:Additional configurable debug logging
    Status:Experimental
    SourceFile:mod_log_debug.c
    Compatibility:Available in Apache 2.3.14 and later
    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Examples

    @@ -45,20 +53,18 @@
  • Log message after request to /foo/* is processed: -

    - <Location /foo/>
    -   LogMessage "/foo/ has been requested"
    - </Location>
    -

    +
    <Location "/foo/">
    +LogMessage "/foo/ has been requested"
    +</Location>
    +
  • Log message if request to /foo/* is processed in a sub-request: -

    - <Location /foo/>
    -   LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}
    - </Location>
    -

    +
    <Location "/foo/">
    +LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}
    +</Location>
    + The default log_transaction hook is not executed for sub-requests, therefore we have to use a different hook. @@ -67,23 +73,20 @@
  • Log message if an IPv6 client causes a request timeout: -

    - LogMessage "IPv6 timeout from %{REMOTE_ADDR}" - "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" -

    +
    LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408"
    + Note the placing of the double quotes for the expr= argument.
  • Log the value of the "X-Foo" request environment variable in each stage of the request: -

    - <Location />
    -   LogMessage "%{reqenv:X-Foo}" hook=all
    - </Location>
    -

    +
    <Location "/">
    +LogMessage "%{reqenv:X-Foo}" hook=all
    +</Location>
    + Together with microsecond time stamps in the error log, - hook=all also allows to determine the times spent + hook=all also lets you determine the times spent in the different parts of the request processing.
  • @@ -92,7 +95,7 @@
    top

    LogMessage Directive

    -
    Description:Log userdefined message to error log +
    Description:Log user-defined message to error log
    Syntax:LogMessage message [hook=hook] [expr=expression] @@ -104,10 +107,11 @@

    This directive causes a user defined message to be logged to the error log. The message can use variables and functions from the - ap_expr syntax. The messages are logged at - loglevel info.

    + ap_expr syntax. References to HTTP headers + will not cause header names to be added to the Vary header. The + messages are logged at loglevel info.

    -

    The hook specifies before which phase of request procesing the message +

    The hook specifies before which phase of request processing the message will be logged. The following hooks are supported:

    @@ -131,14 +135,37 @@

    The optional expression allows to restrict the message if a condition is met. The details of the expression syntax are described in - the ap_expr documentation.

    + the ap_expr documentation. References to HTTP + headers will not cause the header names to be added to the Vary header.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_debug.html.fr b/docs/manual/mod/mod_log_debug.html.fr new file mode 100644 index 00000000000..6cef7236197 --- /dev/null +++ b/docs/manual/mod/mod_log_debug.html.fr @@ -0,0 +1,182 @@ + + + + + +mod_log_debug - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_log_debug

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Name
    + + + +
    Description:Journalisation supplmentaire des fins de dbogage
    Statut:Exprimental
    IdentificateurdeModule:log_debug_module
    FichierSource:mod_log_debug.c
    Compatibilit:Disponible depuis la version 2.3.14 d'Apache
    +
    +

    Sujets

    +

    Directives

    + +

    Traitement des bugs

    Voir aussi

    +
    +
    top
    +
    +

    Exemples

    + +
      +
    1. + Enregistre un message aprs le traitement d'une requte pour + /foo/* : + +
      <Location "/foo/">
      +LogMessage "/foo/ has been requested"
      +</Location>
      + +
    2. + +
    3. + Enregistre un message si une requte pour /foo/* est traite + dans une sous-requte : +
      <Location "/foo/">
      +LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}
      +</Location>
      + + + Le branchement (hook) par dfaut log_transaction n'est pas + excut pour les sous-requtes ; nous devons donc en utiliser un + autre. +
    4. + + +
    5. + Enregistre un message si un client IPv6 est l'origine d'un + dpassement de dlai pour une requte : +
      LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408"
      + + Notez l'emplacement des guillemets pour l'argument + expr=. +
    6. + +
    7. + Enregistre la valeur de la variable d'environnement de requte + "X-Foo" chaque tape du traitement : +
      <Location "/">
      +LogMessage "%{reqenv:X-Foo}" hook=all
      +</Location>
      + + En association avec les repres de temps en microsecondes du journal des erreurs, + hook=all permet aussi de dterminer la dure d'excution des + diffrentes phases du traitement de la requte. +
    8. + +
    +
    +
    top
    +

    Directive LogMessage

    + + + + + + + +
    Description:Enregistre des messages personnaliss dans le journal des +erreurs
    Syntaxe:LogMessage message +[hook=hook] [expr=expression] +
    Dfaut:Non dfini
    Contexte:rpertoire
    Statut:Exprimental
    Module:mod_log_debug
    +

    Cette directive permet d'enregistrer un message personnalis dans + le journal des erreurs. Ce message peut utiliser des variables et + des fonctions dans la syntaxe ap_expr. + D'ventuelles rfrences des en-ttes HTTP dans l'expression + rationnelle n'entraneront pas l'ajout des noms d'en-tte + correspondants l'en-tte Vary. + Les messages sont enregistrs au loglevel info.

    + +

    Le branchement (hook) prcise la phase du traitement de la + requte avant laquelle le message sera enregistr. Les branchements + suivants sont supports :

    + + + + + + + + + + + + + + +
    Nom
    translate_name
    type_checker
    quick_handler
    map_to_storage
    check_access
    check_access_ex
    insert_filter
    check_authn
    check_authz
    fixups
    handler
    log_transaction
    + +

    Le branchement par dfaut est log_transaction. La + valeur spciale all est galement supporte ; dans ce cas, + le message sera enregistr chaque phase. Tous les branchements ne + sont pas excuts pour chaque requte.

    + +

    L'expression optionnelle permet de restreindre l'enregistrement + du message en fonction d'une certaine condition. La syntaxe de + l'expression est dcrite dans la documentation ap_expr. D'ventuelles + rfrences des en-ttes HTTP dans l'expression + rationnelle n'entraneront pas l'ajout des noms d'en-tte + correspondants l'en-tte Vary.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_log_debug.xml b/docs/manual/mod/mod_log_debug.xml index 316346d90f5..d32a0a1089e 100644 --- a/docs/manual/mod/mod_log_debug.xml +++ b/docs/manual/mod/mod_log_debug.xml @@ -35,20 +35,20 @@
  • Log message after request to /foo/* is processed: - - <Location /foo/>
    -   LogMessage "/foo/ has been requested"
    - </Location>
    -
    + +<Location "/foo/"> +  LogMessage "/foo/ has been requested" +</Location> +
  • Log message if request to /foo/* is processed in a sub-request: - - <Location /foo/>
    -   LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ}
    - </Location>
    -
    + +<Location "/foo/"> +  LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ} +</Location> + The default log_transaction hook is not executed for sub-requests, therefore we have to use a different hook. @@ -57,23 +57,22 @@
  • Log message if an IPv6 client causes a request timeout: - - LogMessage "IPv6 timeout from %{REMOTE_ADDR}" - "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" - + + LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" + Note the placing of the double quotes for the expr= argument.
  • Log the value of the "X-Foo" request environment variable in each stage of the request: - - <Location />
    -   LogMessage "%{reqenv:X-Foo}" hook=all
    - </Location>
    -
    + +<Location "/"> +  LogMessage "%{reqenv:X-Foo}" hook=all +</Location> + Together with microsecond time stamps in the error log, - hook=all also allows to determine the times spent + hook=all also lets you determine the times spent in the different parts of the request processing.
  • @@ -82,7 +81,7 @@ LogMessage -Log userdefined message to error log +Log user-defined message to error log LogMessage message [hook=hook] [expr=expression] @@ -94,10 +93,11 @@

    This directive causes a user defined message to be logged to the error log. The message can use variables and functions from the - ap_expr syntax. The messages are logged at - loglevel info.

    + ap_expr syntax. References to HTTP headers + will not cause header names to be added to the Vary header. The + messages are logged at loglevel info.

    -

    The hook specifies before which phase of request procesing the message +

    The hook specifies before which phase of request processing the message will be logged. The following hooks are supported:

    @@ -123,7 +123,8 @@

    The optional expression allows to restrict the message if a condition is met. The details of the expression syntax are described in - the ap_expr documentation.

    + the ap_expr documentation. References to HTTP + headers will not cause the header names to be added to the Vary header.

    diff --git a/docs/manual/mod/mod_log_debug.xml.fr b/docs/manual/mod/mod_log_debug.xml.fr new file mode 100644 index 00000000000..f6bc7199fee --- /dev/null +++ b/docs/manual/mod/mod_log_debug.xml.fr @@ -0,0 +1,147 @@ + + + + + + + + + + + +mod_log_debug +Journalisation supplémentaire à des fins de débogage +Experimental +mod_log_debug.c +log_debug_module +Disponible depuis la version 2.3.14 d'Apache + +
    Exemples + +
      +
    1. + Enregistre un message après le traitement d'une requête pour + /foo/* : + + +<Location "/foo/"> +  LogMessage "/foo/ has been requested" +</Location> + +
    2. + +
    3. + Enregistre un message si une requête pour /foo/* est traitée + dans une sous-requête : + +<Location "/foo/"> +  LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ} +</Location> + + + Le branchement (hook) par défaut log_transaction n'est pas + exécuté pour les sous-requêtes ; nous devons donc en utiliser un + autre. +
    4. + + +
    5. + Enregistre un message si un client IPv6 est à l'origine d'un + dépassement de délai pour une requête : + + LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" + + Notez l'emplacement des guillemets pour l'argument + expr=. +
    6. + +
    7. + Enregistre la valeur de la variable d'environnement de requête + "X-Foo" à chaque étape du traitement : + +<Location "/"> +  LogMessage "%{reqenv:X-Foo}" hook=all +</Location> + + En association avec les repères de temps en microsecondes du journal des erreurs, + hook=all permet aussi de déterminer la durée d'exécution des + différentes phases du traitement de la requête. +
    8. + +
    +
    + + +LogMessage +Enregistre des messages personnalisés dans le journal des +erreurs +LogMessage message +[hook=hook] [expr=expression] + +Non défini +directory + + + +

    Cette directive permet d'enregistrer un message personnalisé dans + le journal des erreurs. Ce message peut utiliser des variables et + des fonctions dans la syntaxe ap_expr. + D'éventuelles références à des en-têtes HTTP dans l'expression + rationnelle n'entraîneront pas l'ajout des noms d'en-tête + correspondants à l'en-tête Vary. + Les messages sont enregistrés au loglevel info.

    + +

    Le branchement (hook) précise la phase du traitement de la + requête avant laquelle le message sera enregistré. Les branchements + suivants sont supportés :

    + +
    + + + + + + + + + + + + + + +
    Nom
    translate_name
    type_checker
    quick_handler
    map_to_storage
    check_access
    check_access_ex
    insert_filter
    check_authn
    check_authz
    fixups
    handler
    log_transaction
    + +

    Le branchement par défaut est log_transaction. La + valeur spéciale all est également supportée ; dans ce cas, + le message sera enregistré à chaque phase. Tous les branchements ne + sont pas exécutés pour chaque requête.

    + +

    L'expression optionnelle permet de restreindre l'enregistrement + du message en fonction d'une certaine condition. La syntaxe de + l'expression est décrite dans la documentation ap_expr. D'éventuelles + références à des en-têtes HTTP dans l'expression + rationnelle n'entraîneront pas l'ajout des noms d'en-tête + correspondants à l'en-tête Vary.

    + +
    + +
    + + diff --git a/docs/manual/mod/mod_log_debug.xml.meta b/docs/manual/mod/mod_log_debug.xml.meta index eace4d990d9..d52c5b7c16e 100644 --- a/docs/manual/mod/mod_log_debug.xml.meta +++ b/docs/manual/mod/mod_log_debug.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_log_forensic.html b/docs/manual/mod/mod_log_forensic.html index 8022c6cb7e3..45ef827707d 100644 --- a/docs/manual/mod/mod_log_forensic.html +++ b/docs/manual/mod/mod_log_forensic.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_log_forensic.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_log_forensic.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_log_forensic.html.en b/docs/manual/mod/mod_log_forensic.html.en index fc6a09aa920..1f77ba57698 100644 --- a/docs/manual/mod/mod_log_forensic.html.en +++ b/docs/manual/mod/mod_log_forensic.html.en @@ -1,27 +1,33 @@ - -mod_log_forensic - Apache HTTP Server +mod_log_forensic - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_log_forensic

    Available Languages:  en  | + fr  |  ja  |  tr 

    @@ -51,19 +57,19 @@ version 2.1 distribution's support directory, may be helpful in evaluating the forensic log output.

    -

    Directives

    - -

    Topics

    + +
  • Comments
  • top

    Forensic Log Format

    @@ -106,6 +112,10 @@ version 2.1 document for details on why your security could be compromised if the directory where logfiles are stored is writable by anyone other than the user that starts the server.

    +

    The log files may contain sensitive data such as the contents of + Authorization: headers (which can contain passwords), so + they should not be readable by anyone except the user that starts the + server.

    top

    ForensicLog Directive

    @@ -156,9 +166,31 @@ version 2.1

    Available Languages:  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_forensic.html.fr b/docs/manual/mod/mod_log_forensic.html.fr new file mode 100644 index 00000000000..88675e1f8e0 --- /dev/null +++ b/docs/manual/mod/mod_log_forensic.html.fr @@ -0,0 +1,218 @@ + + + + + +mod_log_forensic - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_log_forensic

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + tr 

    +
    + + + + +
    Description:Journalisation lgale des requtes envoyes au +serveur
    Statut:Extension
    IdentificateurdeModule:log_forensic_module
    FichierSource:mod_log_forensic.c
    Compatibilit:mod_unique_id n'est plus obligatoire +depuis la version 2.1
    +

    Sommaire

    + +

    Ce module permet la journalisation lgale des requtes client. La + journalisation s'effectuant avant et aprs le traitement de la + requte, le journal lgal contient deux lignes pour chaque requte. + Le processus de journalisation lgale est trs strict, savoir + :

    + +
      +
    • Le format est fig. Vous ne pouvez pas modifier le format du + journal l'excution.
    • +
    • S'il ne peut pas enregistrer ses donnes, le processus enfant se + termine aussitt, et peut ventuellement enregistrer un vidage + mmoire (selon la dfinition de la directive CoreDumpDirectory).
    • +
    + +

    Pour interprter les donnes du journal lgal, vous pouvez vous + aider du script check_forensic qui se trouve dans le + rpertoire support de la distribution.

    +
    Note de traduction : le terme "lgal" utilis dans le prsent document ne suggre aucunement que + ce module apporte une valeur juridique aux journaux. Il est comprendre dans le contexte + similaire ce que l'on trouve en analyse medico-lgale. En d'autres termes, la finalit de ce module + est de simplifier les oprations d'investigation autour du traitement des requtes par le serveur.
    +
    + +
    top
    +
    +

    Format du journal Forensic

    +

    Chaque requte fait l'objet d'une double journalisation. La + requte est journalise une premire fois avant son traitement + (c'est dire aprs la rception des en-ttes). La deuxime entre + du journal est crite aprs le traitement de la requte, en + fait au moment de la journalisation habituelle.

    + +

    Un identifiant unique est attribu chaque requte afin de + pouvoir l'identifier. Cette identifiant lgal peut faire l'objet + d'un enregistrement dans le journal standard en utilisant l'lment + de chane de format %{forensic-id}n. Si vous utilisez + mod_unique_id, c'est l'identifiant qu'il gnre qui + sera utilis.

    + +

    La premire partie de la journalisation de la requte enregistre + l'identifiant lgal, la ligne de la requte et tous les en-ttes + reus spars par des caractres pipe (|). Voici + titre d'exemple quoi pourrait ressembler une telle entre (tout + tant rassembl sur une seule ligne) :

    + +

    + +yQtJf8CoAB4AAFNXBIEAAAAA|GET /manual/de/images/down.gif + HTTP/1.1|Host:localhost%3a8080|User-Agent:Mozilla/5.0 (X11; + U; Linux i686; en-US; rv%3a1.6) Gecko/20040216 + Firefox/0.8|Accept:image/png, etc... +

    + +

    Le caractre plus ('+') de dbut indique qu'il s'agit de la + premire entre de journal pour cette requte. La seconde entre ne + contiendra qu'un caractre moins ('-') suivi de l'identifiant :

    + +

    + -yQtJf8CoAB4AAFNXBIEAAAAA +

    + +

    Le script check_forensic prend comme argument le nom + du fichier journal. Il recherche ces paires d'identifiants + +/- et affiche un message d'erreur si la + journalisation d'une requte n'est pas complte.

    +
    top
    +
    +

    Considrations propos de +scurit

    +

    Voir le document conseils en matire de + scurit pour des dtails sur les raisons pour lesquelles votre + scurit pourrait tre compromise si le rpertoire dans lequel les + fichiers journaux sont stocks sont inscriptibles par tout autre + utilisateur que celui qui dmarre le serveur.

    +

    Les fichiers journaux peuvent contenir des donnes sensibles + comme le contenu des en-ttes Authorization: (qui + peuvent contenir des mots de passe) ; ils ne doivent donc tre + lisibles que par l'utilisateur qui dmarre le serveur.

    +
    +
    top
    +

    Directive ForensicLog

    + + + + + + +
    Description:Dfinit le nom de fichier du journal lgal
    Syntaxe:ForensicLog nom-fichier|pipe
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_log_forensic
    +

    La directive ForensicLog permet de + contrler la journalisation des requtes des fins d'analyse + lgale. Chaque entre du journal se voit assigner un identifiant + unique qui peut tre associ la requte en utilisant la directive + CustomLog habituelle. + mod_log_forensic cre un lment nomm + forensic-id, qui peut tre ajout au journal standard + en utilisant l'lment de format %{forensic-id}n.

    + +

    L'argument, qui permet de spcifier l'emplacement vers lequel le + journal lgal sera crit, peut contenir les deux types de valeurs + suivants :

    + +
    +
    nom-fichier
    +
    Un nom de fichier relatif au rpertoire dfini par la + directive ServerRoot.
    + +
    pipe
    +
    Le caractre pipe "|", suivi du chemin vers un + programme qui recevra les informations de la journalisation sur + son entre standard. Le nom du programme peut tre relatif au + rpertoire dfini par la directive ServerRoot. + +

    Scurit :

    +

    Si les journaux sont redirigs vers un programme, ce dernier + s'excutera sous l'utilisateur qui a dmarr + httpd. Ce sera l'utilisateur root si le serveur + a t dmarr par root ; vrifiez que le programme est + scuris ou passe sous le contrle d'un utilisateur possdant des + droits restreints.

    +
    + +

    Note

    +

    Lors de la spcification d'un chemin de fichier sur les + plate-formes non-Unix, il faut prendre soin de ne pas oublier + que seuls les slashes directs doivent tre utiliss, mme si la + plate-forme autorise l'emploi d'anti-slashes. D'une manire + gnrale, c'est une bonne ide que de n'utiliser que des slashes + directs dans les fichiers de configuration.

    +
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_log_forensic.html.ja.utf8 b/docs/manual/mod/mod_log_forensic.html.ja.utf8 index 703c3bc2677..c4dddcd99ea 100644 --- a/docs/manual/mod/mod_log_forensic.html.ja.utf8 +++ b/docs/manual/mod/mod_log_forensic.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_log_forensic - Apache HTTP サーバ +mod_log_forensic - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_log_forensic

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -52,19 +59,19 @@ 配布物の support ディレクトリにある check_forensic スクリプトが役に立つでしょう。

    -

    ディレクティブ

    - -

    トピック

    + +
  • コメント
  • top

    Forensic ログフォーマット

    @@ -159,10 +166,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_forensic.html.tr.utf8 b/docs/manual/mod/mod_log_forensic.html.tr.utf8 index 8f1c89b51c0..8042f1a9b1d 100644 --- a/docs/manual/mod/mod_log_forensic.html.tr.utf8 +++ b/docs/manual/mod/mod_log_forensic.html.tr.utf8 @@ -1,31 +1,36 @@ - -mod_log_forensic - Apache HTTP Sunucusu +mod_log_forensic - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_log_forensic

    Mevcut Diller:  en  | + fr  |  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:サーバに送られたリクエストの forensic ロギング
    ステータス:Extension
    モジュール識別子:log_forensic_module
    @@ -49,19 +54,19 @@ check_forensic betiği adli günlük dosyalarının değerlendirilmesinde yardımcı olabilir.

    -

    Yönergeler

    - -

    Konular

    +

    Konular

    Ayrıca bakınız:

    +

    Yönergeler

    + +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Yorum
  • top

    Adli Günlük Biçemi

    @@ -105,6 +110,10 @@ dışında diğer kullanıcılar tarafından yazılabiliyor olması halinde güvenliğinizden nasıl feragat etmiş olacağınız güvenlik ipuçları belgesinde açıklanmıştır.

    +

    Günlük dosyaları, Authorization: başlıklarının (parola + içerebilen) içerikleri gibi hassas veriler içerebileceğinden bunların + sunucuyu başlatan kullanıcıdan başkası tarafından okunamaması sağlanmış + olmalıdır.

    top

    ForensicLog Yönergesi

    @@ -156,9 +165,31 @@

    Mevcut Diller:  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_log_forensic.xml b/docs/manual/mod/mod_log_forensic.xml index ab9ac6d69a6..5a31fb5c695 100644 --- a/docs/manual/mod/mod_log_forensic.xml +++ b/docs/manual/mod/mod_log_forensic.xml @@ -93,6 +93,10 @@ version 2.1 document for details on why your security could be compromised if the directory where logfiles are stored is writable by anyone other than the user that starts the server.

    +

    The log files may contain sensitive data such as the contents of + Authorization: headers (which can contain passwords), so + they should not be readable by anyone except the user that starts the + server.

    diff --git a/docs/manual/mod/mod_log_forensic.xml.fr b/docs/manual/mod/mod_log_forensic.xml.fr new file mode 100644 index 00000000000..c54794fdb4f --- /dev/null +++ b/docs/manual/mod/mod_log_forensic.xml.fr @@ -0,0 +1,173 @@ + + + + + + + + + + + +mod_log_forensic +Journalisation légale des requêtes envoyées au +serveur +Extension +mod_log_forensic.c +log_forensic_module +mod_unique_id n'est plus obligatoire +depuis la version 2.1 + + +

    Ce module permet la journalisation légale des requêtes client. La + journalisation s'effectuant avant et après le traitement de la + requête, le journal légal contient deux lignes pour chaque requête. + Le processus de journalisation légale est très strict, à savoir + :

    + +
      +
    • Le format est figé. Vous ne pouvez pas modifier le format du + journal à l'exécution.
    • +
    • S'il ne peut pas enregistrer ses données, le processus enfant se + termine aussitôt, et peut éventuellement enregistrer un vidage + mémoire (selon la définition de la directive CoreDumpDirectory).
    • +
    + +

    Pour interpréter les données du journal légal, vous pouvez vous + aider du script check_forensic qui se trouve dans le + répertoire support de la distribution.

    + Note de traduction : le terme "légal" utilisé dans le présent document ne suggère aucunement que + ce module apporte une valeur juridique aux journaux. Il est à comprendre dans le contexte + similaire à ce que l'on trouve en analyse medico-légale. En d'autres termes, la finalité de ce module + est de simplifier les opérations d'investigation autour du traitement des requêtes par le serveur. +
    +Les fichiers journaux +d'Apache +mod_log_config + +
    Format du journal Forensic +

    Chaque requête fait l'objet d'une double journalisation. La + requête est journalisée une première fois avant son traitement + (c'est à dire après la réception des en-têtes). La deuxième entrée + du journal est écrite après le traitement de la requête, en + fait au moment de la journalisation habituelle.

    + +

    Un identifiant unique est attribué à chaque requête afin de + pouvoir l'identifier. Cette identifiant légal peut faire l'objet + d'un enregistrement dans le journal standard en utilisant l'élément + de chaîne de format %{forensic-id}n. Si vous utilisez + mod_unique_id, c'est l'identifiant qu'il génère qui + sera utilisé.

    + +

    La première partie de la journalisation de la requête enregistre + l'identifiant légal, la ligne de la requête et tous les en-têtes + reçus séparés par des caractères pipe (|). Voici à + titre d'exemple à quoi pourrait ressembler une telle entrée (tout + étant rassemblé sur une seule ligne) :

    + + + +yQtJf8CoAB4AAFNXBIEAAAAA|GET /manual/de/images/down.gif + HTTP/1.1|Host:localhost%3a8080|User-Agent:Mozilla/5.0 (X11; + U; Linux i686; en-US; rv%3a1.6) Gecko/20040216 + Firefox/0.8|Accept:image/png, etc... + + +

    Le caractère plus ('+') de début indique qu'il s'agit de la + première entrée de journal pour cette requête. La seconde entrée ne + contiendra qu'un caractère moins ('-') suivi de l'identifiant :

    + + + -yQtJf8CoAB4AAFNXBIEAAAAA + + +

    Le script check_forensic prend comme argument le nom + du fichier journal. Il recherche ces paires d'identifiants + +/- et affiche un message d'erreur si la + journalisation d'une requête n'est pas complète.

    +
    + +
    Considérations à propos de +sécurité +

    Voir le document conseils en matière de + sécurité pour des détails sur les raisons pour lesquelles votre + sécurité pourrait être compromise si le répertoire dans lequel les + fichiers journaux sont stockés sont inscriptibles par tout autre + utilisateur que celui qui démarre le serveur.

    +

    Les fichiers journaux peuvent contenir des données sensibles + comme le contenu des en-têtes Authorization: (qui + peuvent contenir des mots de passe) ; ils ne doivent donc être + lisibles que par l'utilisateur qui démarre le serveur.

    +
    + + +ForensicLog +Définit le nom de fichier du journal légal +ForensicLog nom-fichier|pipe +server configvirtual host + + + +

    La directive ForensicLog permet de + contrôler la journalisation des requêtes à des fins d'analyse + légale. Chaque entrée du journal se voit assigner un identifiant + unique qui peut être associé à la requête en utilisant la directive + CustomLog habituelle. + mod_log_forensic crée un élément nommé + forensic-id, qui peut être ajouté au journal standard + en utilisant l'élément de format %{forensic-id}n.

    + +

    L'argument, qui permet de spécifier l'emplacement vers lequel le + journal légal sera écrit, peut contenir les deux types de valeurs + suivants :

    + +
    +
    nom-fichier
    +
    Un nom de fichier relatif au répertoire défini par la + directive ServerRoot.
    + +
    pipe
    +
    Le caractère pipe "|", suivi du chemin vers un + programme qui recevra les informations de la journalisation sur + son entrée standard. Le nom du programme peut être relatif au + répertoire défini par la directive ServerRoot. + + Sécurité : +

    Si les journaux sont redirigés vers un programme, ce dernier + s'exécutera sous l'utilisateur qui a démarré + httpd. Ce sera l'utilisateur root si le serveur + a été démarré par root ; vérifiez que le programme est + sécurisé ou passe sous le contrôle d'un utilisateur possédant des + droits restreints.

    +
    + + Note +

    Lors de la spécification d'un chemin de fichier sur les + plate-formes non-Unix, il faut prendre soin de ne pas oublier + que seuls les slashes directs doivent être utilisés, même si la + plate-forme autorise l'emploi d'anti-slashes. D'une manière + générale, c'est une bonne idée que de n'utiliser que des slashes + directs dans les fichiers de configuration.

    +
    +
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_log_forensic.xml.ja b/docs/manual/mod/mod_log_forensic.xml.ja index 7c04acc17be..e3e873e9c4e 100644 --- a/docs/manual/mod/mod_log_forensic.xml.ja +++ b/docs/manual/mod/mod_log_forensic.xml.ja @@ -1,7 +1,7 @@ - + + -mod_logio - Apache HTTP Server +mod_logio - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_logio

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -48,34 +54,44 @@ with the request that triggered the renegotiation.
    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    + +
  • Comments
  • top

    Custom Log Formats

    -

    This modules adds two new logging directives. The characteristics of the +

    This module adds three new logging directives. The characteristics of the request itself are logged by placing "%" directives in the format string, which are replaced in the log file by the values as follows:

    Açıklama:Sunucuya yapılan isteklerin adli günlük kayıtlarının tutulması
    Durum:Eklenti
    Modül Betimleyici:log_forensic_module
    - + - + + + + +
    Format String Description
    %...I
    %I Bytes received, including request and headers, cannot be zero.
    %...O
    %O Bytes sent, including headers, cannot be zero.
    %SBytes transferred (received and sent), including request and headers, + cannot be zero. This is the combination of %I and %O.
    + Available in Apache 2.4.7 and later
    %^FBDelay in microseconds between when the request arrived and the + first byte of the response headers are written. Only available if + LogIOTrackTTFB is set to ON.
    + Available in Apache 2.4.13 and later

    Usually, the functionality is used like this:

    @@ -86,13 +102,53 @@ \"%{User-agent}i\" %I %O"
    +
    top
    +

    LogIOTrackTTFB Directive

    + + + + + + + + + +
    Description:Enable tracking of time to first byte (TTFB)
    Syntax:LogIOTrackTTFB ON|OFF
    Default:LogIOTrackTTFB OFF
    Context:server config, virtual host, directory, .htaccess
    Override:none
    Status:Extension
    Module:mod_logio
    Compatibility:Apache HTTP Server 2.4.13 and later
    +

    This directive configures whether this module tracks the delay + between the request being read and the first byte of the response + headers being written. The resulting value may be logged with the + %^FB format.

    + +

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_logio.html.fr b/docs/manual/mod/mod_logio.html.fr new file mode 100644 index 00000000000..afb23d8687d --- /dev/null +++ b/docs/manual/mod/mod_logio.html.fr @@ -0,0 +1,160 @@ + + + + + +mod_logio - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_logio

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + + + +
    Description:Journalisation des octets en entre et en sortie pour +chaque requte
    Statut:Extension
    IdentificateurdeModule:logio_module
    FichierSource:mod_logio.c
    +

    Sommaire

    + + +

    Ce module permet d'enregistrer le nombre d'octets reus et + envoys pour chaque requte. Ce nombre reflte le nombre rel + d'octets transmis sur le rseau, et prend en compte les en-ttes et + corps des requtes et des rponses. Le dcompte est effectu avant + SSL/TLS en entre et aprs SSL/TLS en sortie, si bien que le + rsultat refltera toute modification introduite par le + chiffrement.

    + +

    Pour fonctionner, ce module requiert le chargement du module + mod_log_config.

    + +
    Lorsqu'on utilise les connexions persistantes avec SSL, le + supplment de trafic induit par la ngociation SSL est enregistr + dans le dcompte des octets transmis dans le cadre de la premire + requte de la connexion. Lors d'une rengociation SSL au niveau d'un + rpertoire, le dcompte d'octets est associ la + requte qui a dclench la rengociation.
    + +
    + +
    top
    +
    +

    Formats de journaux personnaliss

    + + +

    Ce module introduit trois nouvelles directives de journalisation. + Les caractristiques de la requte en elle-mme sont journalises en + insrant des directives "%" dans la chane de format, + qui seront remplaces comme suit dans le fichier journal :

    + + + + + + + + + + + +
    Chane de FormatDescription
    %IOctets reus, en-ttes et corps de requte inclus ; ne peut + pas tre nul.
    %OOctets envoys, en-ttes inclus ; ne peut + pas tre nul.
    %SNombre d'octets transmis (en mission et rception), y + compris corps et en-ttes de requte. Ce nombre ne peut pas tre + nul, et il correspond la combinaison des formats %I et %O.
    + Disponible depuis la version 2.4.7 du serveur HTTP Apache.
    %^FBDlai en microsecondes entre l'arrive de la requte et + l'criture du premier octet des en-ttes de la rponse. + Disponible uniquement si la directive + LogIOTrackTTFB a t dfinie ON.
    + Disponible partir de la version 2.4.13 du serveur HTTP Apache +
    + +

    En gnral, cette fonctionnalit s'utilise comme suit :

    + +
    +
    Format de journal d'entres/sorties combin :
    +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\" %I %O"
    +
    +
    +
    top
    +

    Directive LogIOTrackTTFB

    + + + + + + + + + +
    Description:Enable tracking of time to first byte (TTFB)
    Syntaxe:LogIOTrackTTFB ON|OFF
    Dfaut:LogIOTrackTTFB OFF
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:none
    Statut:Extension
    Module:mod_logio
    Compatibilit:Apache HTTP Server 2.4.13 and later

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_logio.html.ja.utf8 b/docs/manual/mod/mod_logio.html.ja.utf8 index 872d3c20962..fb25828c459 100644 --- a/docs/manual/mod/mod_logio.html.ja.utf8 +++ b/docs/manual/mod/mod_logio.html.ja.utf8 @@ -1,34 +1,41 @@ - -mod_logio - Apache HTTP サーバ +mod_logio - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_logio

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -47,16 +54,18 @@ 必要です。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    +

    トピック

    参照

    +

    ディレクティブ

    + +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    カスタムログ書式

    @@ -84,13 +93,49 @@ \"%{User-agent}i\" %I %O"
    +
    top
    +
    説明:リクエスト毎に入力バイト数と出力バイト数とをロギング
    ステータス:Extension
    モジュール識別子:logio_module
    + + + + + + + + +
    説明:Enable tracking of time to first byte (TTFB)
    構文:LogIOTrackTTFB ON|OFF
    デフォルト:LogIOTrackTTFB OFF
    コンテキスト:サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess
    上書き:none
    ステータス:Extension
    モジュール:mod_logio
    互換性:Apache HTTP Server 2.4.13 and later

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_logio.html.ko.euc-kr b/docs/manual/mod/mod_logio.html.ko.euc-kr index 91461b62b38..72e8ed2d232 100644 --- a/docs/manual/mod/mod_logio.html.ko.euc-kr +++ b/docs/manual/mod/mod_logio.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_logio - Apache HTTP Server +mod_logio - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_logio

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -45,16 +51,18 @@ ʿϴ.

    -

    þ

    -

    ⿡ þ ϴ.

    -

    + +
  • Comments
  • top

    α

    @@ -84,13 +92,49 @@
    +
    top
    +

    LogIOTrackTTFB þ

    + + + + + + + + + +
    :Enable tracking of time to first byte (TTFB)
    :LogIOTrackTTFB ON|OFF
    ⺻:LogIOTrackTTFB OFF
    :ּ, ȣƮ, directory, .htaccess
    Override ɼ:none
    :Extension
    :mod_logio
    :Apache HTTP Server 2.4.13 and later

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_logio.html.tr.utf8 b/docs/manual/mod/mod_logio.html.tr.utf8 index 6358364641f..a3511981728 100644 --- a/docs/manual/mod/mod_logio.html.tr.utf8 +++ b/docs/manual/mod/mod_logio.html.tr.utf8 @@ -1,27 +1,33 @@ - -mod_logio - Apache HTTP Sunucusu +mod_logio - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_logio

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -49,16 +55,18 @@ yeniden uzlaşımı tetikleyen istekle ilişkilendirilir.
    -

    Yönergeler

    -

    Bu modül yönerge içermez.

    -

    Konular

    +

    Konular

    Ayrıca bakınız:

    +

    Yönergeler

    + +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Yorum
  • top

    Özel Günlük Biçemleri

    @@ -66,15 +74,22 @@

    İsteğin belirgin özellikleri için, biçem dizgesinde yer alan % imli biçem belirteçlerinin yerine günlük dosyasında değerleri yazılır. Bu - modül iki yeni biçem belirteci ekler:

    + modül üç yeni biçem belirteci ekler:

    - + - + + + + +
    Biçem Belirteci Açıklama
    %...I
    %I İstek gövdesi ve başlıklar dahil alınan bayt sayısı; sıfır olamaz.
    %...O
    %O Başlıklar dahil gönderilen bayt sayısı; sıfır olamaz.
    %SAktarılan bayt sayısı (alınan ve gönderilen), istekler ve başlıklar + dahil; sıfır olamaz. %I ve %O'nun birleşimidir.
    + Apache 2.4.7 ve sonrasında kullanılabilmektedir.
    %^FBİstek gelip yanıt başlıklarının ilk baytı yazılana kadar mikrosaniye cinsinden geçen zaman. Sadece LogIOTrackTTFB yönergesine ON atanmışsa kullanılabilir.
    + Apache 2.4.13 ve sonrasında kullanılabilir.

    Genel olarak, işlevsellik şöyle kullanılır:

    @@ -85,13 +100,52 @@ \"%{User-agent}i\" %I %O"
    +
    top
    +

    LogIOTrackTTFB Yönergesi

    + + + + + + + + + +
    Açıklama:İlk baytın yazılmasına kadar geçen süreyi izler
    Sözdizimi:LogIOTrackTTFB ON|OFF
    Öntanımlı:LogIOTrackTTFB OFF
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:none
    Durum:Eklenti
    Modül:mod_logio
    Uyumluluk:Apache 2.4.13 ve sonrasında kullanılabilir
    +

    Bu yönerge isteğin okunmasından yanıt başlığının ilk baytının + yazılmasına kadar geçen sürenin izlenmesini yapılandırır. Sonuçlanan + değeri %^FB biçemi ile günlüğe kaydettirebilirsiniz.

    + +

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_logio.xml b/docs/manual/mod/mod_logio.xml index 905b1eab205..24ecc873a78 100644 --- a/docs/manual/mod/mod_logio.xml +++ b/docs/manual/mod/mod_logio.xml @@ -52,7 +52,7 @@
    Custom Log Formats -

    This modules adds two new logging directives. The characteristics of the +

    This module adds three new logging directives. The characteristics of the request itself are logged by placing "%" directives in the format string, which are replaced in the log file by the values as follows:

    @@ -61,12 +61,23 @@ Format String Description - %...I + %I Bytes received, including request and headers, cannot be zero. - %...O + %O Bytes sent, including headers, cannot be zero. + + %S + Bytes transferred (received and sent), including request and headers, + cannot be zero. This is the combination of %I and %O.
    + Available in Apache 2.4.7 and later + + %^FB + Delay in microseconds between when the request arrived and the + first byte of the response headers are written. Only available if + LogIOTrackTTFB is set to ON.
    + Available in Apache 2.4.13 and later

    Usually, the functionality is used like this:

    @@ -78,4 +89,22 @@
    + +LogIOTrackTTFB +Enable tracking of time to first byte (TTFB) +LogIOTrackTTFB ON|OFF +LogIOTrackTTFB OFF +server configvirtual host +directory.htaccess +none +Apache HTTP Server 2.4.13 and later + + +

    This directive configures whether this module tracks the delay + between the request being read and the first byte of the response + headers being written. The resulting value may be logged with the + %^FB format.

    +
    +
    + diff --git a/docs/manual/mod/mod_logio.xml.fr b/docs/manual/mod/mod_logio.xml.fr new file mode 100644 index 00000000000..04cf52c0c64 --- /dev/null +++ b/docs/manual/mod/mod_logio.xml.fr @@ -0,0 +1,104 @@ + + + + + + + + + + + +mod_logio +Journalisation des octets en entrée et en sortie pour +chaque requête +Extension +mod_logio.c +logio_module + + + +

    Ce module permet d'enregistrer le nombre d'octets reçus et + envoyés pour chaque requête. Ce nombre reflète le nombre réel + d'octets transmis sur le réseau, et prend en compte les en-têtes et + corps des requêtes et des réponses. Le décompte est effectué avant + SSL/TLS en entrée et après SSL/TLS en sortie, si bien que le + résultat reflètera toute modification introduite par le + chiffrement.

    + +

    Pour fonctionner, ce module requiert le chargement du module + mod_log_config.

    + + Lorsqu'on utilise les connexions persistantes avec SSL, le + supplément de trafic induit par la négociation SSL est enregistré + dans le décompte des octets transmis dans le cadre de la première + requête de la connexion. Lors d'une renégociation SSL au niveau d'un + répertoire, le décompte d'octets est associé à la + requête qui a déclenché la renégociation. + +
    + +mod_log_config +Les fichiers journaux +d'Apache + +
    +Formats de journaux personnalisés + +

    Ce module introduit trois nouvelles directives de journalisation. + Les caractéristiques de la requête en elle-même sont journalisées en + insérant des directives "%" dans la chaîne de format, + qui seront remplacées comme suit dans le fichier journal :

    + + + + + + + + + + + + + + + + +
    Chaîne de FormatDescription
    %IOctets reçus, en-têtes et corps de requête inclus ; ne peut + pas être nul.
    %OOctets envoyés, en-têtes inclus ; ne peut + pas être nul.
    %SNombre d'octets transmis (en émission et réception), y + compris corps et en-têtes de requête. Ce nombre ne peut pas être + nul, et il correspond à la combinaison des formats %I et %O.
    + Disponible depuis la version 2.4.7 du serveur HTTP Apache.
    %^FBDélai en microsecondes entre l'arrivée de la requête et + l'écriture du premier octet des en-têtes de la réponse. + Disponible uniquement si la directive + LogIOTrackTTFB a été définie à ON.
    + Disponible à partir de la version 2.4.13 du serveur HTTP Apache +
    + +

    En général, cette fonctionnalité s'utilise comme suit :

    + +
    +
    Format de journal d'entrées/sorties combiné :
    +
    "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" + \"%{User-agent}i\" %I %O"
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_logio.xml.ja b/docs/manual/mod/mod_logio.xml.ja index d273f3a135e..250b4e7eef2 100644 --- a/docs/manual/mod/mod_logio.xml.ja +++ b/docs/manual/mod/mod_logio.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_lua - Apache HTTP Server +mod_lua - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_lua

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -43,53 +49,73 @@ authorization

    mod_lua is still in experimental state. Until it is declared stable, usage and behavior may change -at any time.
    +at any time, even between stable releases of the 2.4.x series. +Be sure to check the CHANGES file before upgrading. + +

    Warning

    +

    This module holds a great deal of power over httpd, which is both a +strength and a potential security risk. It is not recommended +that you use this module on a server that is shared with users you do not +trust, as it can be abused to change the internal workings of httpd.

    +
    -
    top

    Basic Configuration

    The basic module loading directive is

    -

    - LoadModule lua_module modules/mod_lua.so -

    +
    LoadModule lua_module modules/mod_lua.so
    +

    mod_lua provides a handler named lua-script, -which can be used with an AddHandler directive:

    +which can be used with a SetHandler or +AddHandler directive:

    + +
    <Files "*.lua">
    +    SetHandler lua-script
    +</Files>
    -

    -AddHandler lua-script .lua -

    This will cause mod_lua to handle requests for files @@ -112,7 +138,9 @@ and mod_status. just evaluating a script body CGI style. A handler function looks something like this:

    -

    example.lua

    +
    +
    +example.lua
    -- example handler require "string" @@ -124,21 +152,29 @@ require "string" --]] function handle(r) r.content_type = "text/plain" - r:puts("Hello Lua World!\n") if r.method == 'GET' then + r:puts("Hello Lua World!\n") for k, v in pairs( r:parseargs() ) do - r:puts( string.format("%s: %s", k, v) ) + r:puts( string.format("%s: %s\n", k, v) ) end elseif r.method == 'POST' then + r:puts("Hello Lua World!\n") for k, v in pairs( r:parsebody() ) do - r:puts( string.format("%s: %s", k, v) ) + r:puts( string.format("%s: %s\n", k, v) ) end + elseif r.method == 'PUT' then +-- use our own Error contents + r:puts("Unsupported HTTP method " .. r.method) + r.status = 405 + return apache2.OK else - r:puts("unknown HTTP method " .. r.method) +-- use the ErrorDocument + return 501 end -end -
    + return apache2.OK +end +

    This handler function just prints out the uri or form encoded @@ -150,23 +186,150 @@ This means (and in fact encourages) that you can have multiple handlers (or hooks, or filters) in the same script.

    +
    top
    +
    +

    Writing Authorization Providers

    + + +

    mod_authz_core provides a high-level interface to +authorization that is much easier to use than using into the relevant +hooks directly. The first argument to the +Require directive gives +the name of the responsible authorization provider. For any +Require line, +mod_authz_core will call the authorization provider +of the given name, passing the rest of the line as parameters. The +provider will then check authorization and pass the result as return +value.

    + +

    The authz provider is normally called before authentication. If it needs to +know the authenticated user name (or if the user will be authenticated at +all), the provider must return apache2.AUTHZ_DENIED_NO_USER. +This will cause authentication to proceed and the authz provider to be +called a second time.

    + +

    The following authz provider function takes two arguments, one ip +address and one user name. It will allow access from the given ip address +without authentication, or if the authenticated user matches the second +argument:

    + +
    +authz_provider.lua
    + +require 'apache2' + +function authz_check_foo(r, ip, user) + if r.useragent_ip == ip then + return apache2.AUTHZ_GRANTED + elseif r.user == nil then + return apache2.AUTHZ_DENIED_NO_USER + elseif r.user == user then + return apache2.AUTHZ_GRANTED + else + return apache2.AUTHZ_DENIED + end +end
    + + +

    The following configuration registers this function as provider +foo and configures it for URL /:

    +
    LuaAuthzProvider foo authz_provider.lua authz_check_foo
    +<Location "/">
    +  Require foo 10.1.2.3 john_doe
    +</Location>
    + +
    top

    Writing Hooks

    Hook functions are how modules (and Lua scripts) participate in the processing of requests. Each type of hook exposed by the server exists for -a specific purposes such as mapping requests to the filesystem, -performing access control, or setting mimetypes. General purpose hooks -that simply run at handy times in the request lifecycle exist as well.

    +a specific purpose, such as mapping requests to the file system, +performing access control, or setting mime types:

    + +
    Description:Provides Lua hooks into various portions of the httpd request processing
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Hook phasemod_lua directiveDescription
    Quick handlerLuaQuickHandlerThis is the first hook that will be called after a request has + been mapped to a host or virtual host
    Translate nameLuaHookTranslateNameThis phase translates the requested URI into a filename on the + system. Modules such as mod_alias and + mod_rewrite operate in this phase.
    Map to storageLuaHookMapToStorageThis phase maps files to their physical, cached or external/proxied storage. + It can be used by proxy or caching modules
    Check AccessLuaHookAccessCheckerThis phase checks whether a client has access to a resource. This + phase is run before the user is authenticated, so beware. +
    Check User IDLuaHookCheckUserIDThis phase it used to check the negotiated user ID
    Check AuthorizationLuaHookAuthChecker or + LuaAuthzProviderThis phase authorizes a user based on the negotiated credentials, such as + user ID, client certificate etc. +
    Check TypeLuaHookTypeCheckerThis phase checks the requested file and assigns a content type and + a handler to it
    FixupsLuaHookFixupsThis is the final "fix anything" phase before the content handlers + are run. Any last-minute changes to the request should be made here.
    Content handlerfx. .lua files or through LuaMapHandlerThis is where the content is handled. Files are read, parsed, some are run, + and the result is sent to the client
    LoggingLuaHookLogOnce a request has been handled, it enters several logging phases, + which logs the request in either the error or access log. Mod_lua + is able to hook into the start of this and control logging output.
    -

    Hook functions are passed the request object as their only argument. +

    Hook functions are passed the request object as their only argument +(except for LuaAuthzProvider, which also gets passed the arguments from +the Require directive). They can return any value, depending on the hook, but most commonly -they'll return OK, DONE, or DECLINED, which you can write in lua as +they'll return OK, DONE, or DECLINED, which you can write in Lua as apache2.OK, apache2.DONE, or apache2.DECLINED, or else an HTTP status code.

    -

    translate_name.lua

    +
    +
    +translate_name.lua
    -- example hook that rewrites the URI to a filesystem path. require 'apache2' @@ -178,17 +341,19 @@ function translate_name(r) end -- we don't care about this URL, give another module a chance return apache2.DECLINED -end -
    +end -

    translate_name2.lua

    +
    +
    +
    +translate_name2.lua
    --[[ example hook that rewrites one URI to another URI. It returns a apache2.DECLINED to give other URL mappers a chance to work on the substitution, including the core translate_name hook which maps based on the DocumentRoot. - Note: It is currently undefined as to whether this runs before or after - mod_alias. + Note: Use the early/late flags in the directive to make it run before + or after mod_alias. --]] require 'apache2' @@ -199,8 +364,8 @@ function translate_name(r) return apache2.DECLINED end return apache2.DECLINED -end -
    +end +
    top

    Data Structures

    @@ -210,190 +375,649 @@ end

    The request_rec is mapped in as a userdata. It has a metatable which lets you do useful things with it. For the most part it - has the same fields as the request_rec struct (see httpd.h - until we get better docs here) many of which are writeable as + has the same fields as the request_rec struct, many of which are writable as well as readable. (The table fields' content can be changed, but the fields themselves cannot be set to different tables.)

    - - - +
    + - + + + + + + + + - + + - + + - - + + + + + + + + + + + + + + + + + + + + - + + - + + - - + + + + + + + + + + + + - + + - + + - + + - - + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + - + + + + + + + + - + + - + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - + + - + + - + + + + + + + + -
    Name Lua type WritableDescription
    allowoverridesstringnoThe AllowOverride options applied to the current request.
    ap_auth_type string noIf an authentication check was made, this is set to the type + of authentication (f.x. basic)
    args string yesThe query string arguments extracted from the request + (f.x. foo=bar&name=johnsmith)
    assbackwards boolean noSet to true if this is an HTTP/0.9 style request + (e.g. GET /foo (with no headers) )
    auth_namestringnoThe realm name used for authorization (if applicable).
    bannerstringnoThe server banner, f.x. Apache HTTP Server/2.4.3 openssl/0.9.8c
    basic_auth_pwstringnoThe basic auth password sent with this request, if any
    canonical_filename string noThe canonical filename of the request
    content_encoding string noThe content encoding of the current request
    content_type string yesThe content type of the current request, as determined in the + type_check phase (f.x. image/gif or text/html)
    context_prefixstringno +
    context_document_rootstringno +
    document_root string noThe document root of the host
    err_headers_out table noMIME header environment for the response, printed even on errors and + persist across internal redirects
    filename string yesThe file name that the request maps to, f.x. /www/example.com/foo.txt. This can be + changed in the translate-name or map-to-storage phases of a request to allow the + default handler (or script handlers) to serve a different file than what was requested.
    handler string yesThe name of the handler that should serve this request, f.x. + lua-script if it is to be served by mod_lua. This is typically set by the + AddHandler or SetHandler + directives, but could also be set via mod_lua to allow another handler to serve up a specific request + that would otherwise not be served by it. +
    headers_in table yesMIME header environment from the request. This contains headers such as Host, + User-Agent, Referer and so on.
    headers_out table yesMIME header environment for the response.
    hostname string noThe host name, as set by the Host: header or by a full URI.
    is_httpsbooleannoWhether or not this request is done via HTTPS
    is_initial_reqbooleannoWhether this request is the initial request or a sub-request
    limit_req_bodynumbernoThe size limit of the request body for this request, or 0 if no limit.
    log_idstringnoThe ID to identify request in access and error log.
    method string noThe request method, f.x. GET or POST.
    notes table yesA list of notes that can be passed on from one module to another.
    optionsstringnoThe Options directive applied to the current request.
    path_info string noThe PATH_INFO extracted from this request.
    portnumbernoThe server port used by the request.
    protocol string noThe protocol used, f.x. HTTP/1.1
    proxyreq string yesDenotes whether this is a proxy request or not. This value is generally set in + the post_read_request/translate_name phase of a request.
    range string noThe contents of the Range: header.
    remainingnumbernoThe number of bytes remaining to be read from the request body.
    server_builtstringnoThe time the server executable was built.
    server_namestringnoThe server name for this request.
    some_auth_requiredbooleannoWhether some authorization is/was required for this request.
    subprocess_env table yesThe environment variables set for this request.
    startednumbernoThe time the server was (re)started, in seconds since the epoch (Jan 1st, 1970)
    status number yesThe (current) HTTP return code for this request, f.x. 200 or 404.
    the_request string noThe request string as sent by the client, f.x. GET /foo/bar HTTP/1.1.
    unparsed_uri string noThe unparsed URI of the request
    uri string yesThe URI after it has been parsed by httpd
    user string yesIf an authentication check has been made, this is set to the name of the authenticated user.
    useragent_ipstringnoThe IP of the user agent making the request
    + +
    + +
    top
    +
    +

    Built in functions

    -

    The request_rec has (at least) the following methods:

    +

    The request_rec object has (at least) the following methods:

    -

    - r:addoutputfilter(name|function) -- add an output filter -

    +
    r:flush()   -- flushes the output buffer.
    +            -- Returns true if the flush was successful, false otherwise.
     
    -        

    - r:parseargs() -- returns a lua table containing the request's - query string arguments -

    +while we_have_stuff_to_send do + r:puts("Bla bla bla\n") -- print something to client + r:flush() -- flush the buffer (send to client) + r.usleep(500000) -- fake processing time for 0.5 sec. and repeat +end
    -

    - r:parsebody() -- parse the request body as a POST and return - a lua table -

    -

    - r:puts("hello", " world", "!") -- print to response body -

    +
    r:addoutputfilter(name|function) -- add an output filter:
    +
    +r:addoutputfilter("fooFilter") -- add the fooFilter to the output stream
    + + +
    r:sendfile(filename) -- sends an entire file to the client, using sendfile if supported by the current platform:
    +
    +if use_sendfile_thing then
    +    r:sendfile("/var/www/large_file.img")
    +end
    + + +
    r:parseargs() -- returns two tables; one standard key/value table for regular GET data, 
    +              -- and one for multi-value data (fx. foo=1&foo=2&foo=3):
    +
    +local GET, GETMULTI = r:parseargs()
    +r:puts("Your name is: " .. GET['name'] or "Unknown")
    + + +
    r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables,
    +                         -- just like r:parseargs().
    +                         -- An optional number may be passed to specify the maximum number 
    +                         -- of bytes to parse. Default is 8192 bytes:
    +                 
    +local POST, POSTMULTI = r:parsebody(1024*1024)
    +r:puts("Your name is: " .. POST['name'] or "Unknown")
    + + +
    r:puts("hello", " world", "!") -- print to response body, self explanatory
    + + +
    r:write("a single string") -- print to response body, self explanatory
    + + +
    r:escape_html("<html>test</html>") -- Escapes HTML code and returns the escaped result
    + + +
    r:base64_encode(string) -- Encodes a string using the Base64 encoding standard:
    +
    +local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q=
    + + +
    r:base64_decode(string) -- Decodes a Base64-encoded string:
    +
    +local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test'
    + + +
    r:md5(string) -- Calculates and returns the MD5 digest of a string (binary safe):
    +
    +local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339
    + + +
    r:sha1(string) -- Calculates and returns the SHA1 digest of a string (binary safe):
    +
    +local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19
    + + +
    r:escape(string) -- URL-Escapes a string:
    +
    +local url = "http://foo.bar/1 2 3 & 4 + 5"
    +local escaped = r:escape(url) -- returns 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5'
    + + +
    r:unescape(string) -- Unescapes an URL-escaped string:
    +
    +local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5"
    +local unescaped = r:unescape(url) -- returns 'http://foo.bar/1 2 3 & 4 + 5'
    + + +
    r:construct_url(string) -- Constructs an URL from an URI
    +
    +local url = r:construct_url(r.uri)
    + + +
    r.mpm_query(number) -- Queries the server for MPM information using ap_mpm_query:
    +
    +local mpm = r.mpm_query(14)
    +if mpm == 1 then
    +    r:puts("This server uses the Event MPM")
    +end
    + + +
    r:expr(string) -- Evaluates an expr string.
    +
    +if r:expr("%{HTTP_HOST} =~ /^www/") then
    +    r:puts("This host name starts with www")
    +end
    + + +
    r:scoreboard_process(a) -- Queries the server for information about the process at position a:
    +
    +local process = r:scoreboard_process(1)
    +r:puts("Server 1 has PID " .. process.pid)
    + + +
    r:scoreboard_worker(a, b) -- Queries for information about the worker thread, b, in process a:
    +
    +local thread = r:scoreboard_worker(1, 1)
    +r:puts("Server 1's thread 1 has thread ID " .. thread.tid .. " and is in " .. thread.status .. " status")
    + + + +
    r:clock() -- Returns the current time with microsecond precision
    + + +
    r:requestbody(filename) -- Reads and returns the request body of a request.
    +                -- If 'filename' is specified, it instead saves the
    +                -- contents to that file:
    +                
    +local input = r:requestbody()
    +r:puts("You sent the following request body to me:\n")
    +r:puts(input)
    + + +
    r:add_input_filter(filter_name) -- Adds 'filter_name' as an input filter
    + + +
    r.module_info(module_name) -- Queries the server for information about a module
    +
    +local mod = r.module_info("mod_lua.c")
    +if mod then
    +    for k, v in pairs(mod.commands) do
    +       r:puts( ("%s: %s\n"):format(k,v)) -- print out all directives accepted by this module
    +    end
    +end
    + + +
    r:loaded_modules() -- Returns a list of modules loaded by httpd:
    +
    +for k, module in pairs(r:loaded_modules()) do
    +    r:puts("I have loaded module " .. module .. "\n")
    +end
    + + +
    r:runtime_dir_relative(filename) -- Compute the name of a run-time file (e.g., shared memory "file") 
    +                         -- relative to the appropriate run-time directory.
    + + +
    r:server_info() -- Returns a table containing server information, such as 
    +                -- the name of the httpd executable file, mpm used etc.
    + + +
    r:set_document_root(file_path) -- Sets the document root for the request to file_path
    + + + + +
    r:set_context_info(prefix, docroot) -- Sets the context prefix and context document root for a request
    + + +
    r:os_escape_path(file_path) -- Converts an OS path to a URL in an OS dependent way
    + + +
    r:escape_logitem(string) -- Escapes a string for logging
    + + +
    r.strcmp_match(string, pattern) -- Checks if 'string' matches 'pattern' using strcmp_match (globs).
    +                        -- fx. whether 'www.example.com' matches '*.example.com':
    +                        
    +local match = r.strcmp_match("foobar.com", "foo*.com")
    +if match then 
    +    r:puts("foobar.com matches foo*.com")
    +end
    + + +
    r:set_keepalive() -- Sets the keepalive status for a request. Returns true if possible, false otherwise.
    + + +
    r:make_etag() -- Constructs and returns the etag for the current request.
    + + +
    r:send_interim_response(clear) -- Sends an interim (1xx) response to the client.
    +                       -- if 'clear' is true, available headers will be sent and cleared.
    + + +
    r:custom_response(status_code, string) -- Construct and set a custom response for a given status code.
    +                               -- This works much like the ErrorDocument directive:
    +                               
    +r:custom_response(404, "Baleted!")
    + + +
    r.exists_config_define(string) -- Checks whether a configuration definition exists or not:
    +
    +if r.exists_config_define("FOO") then
    +    r:puts("httpd was probably run with -DFOO, or it was defined in the configuration")
    +end
    + + +
    r:state_query(string) -- Queries the server for state information
    + + +
    r:stat(filename [,wanted]) -- Runs stat() on a file, and returns a table with file information:
    +
    +local info = r:stat("/var/www/foo.txt")
    +if info then
    +    r:puts("This file exists and was last modified at: " .. info.modified)
    +end
    + + +
    r:regex(string, pattern [,flags]) -- Runs a regular expression match on a string, returning captures if matched:
    +
    +local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]])
    +if matches then
    +    r:puts("The regex matched, and the last word captured ($2) was: " .. matches[2])
    +end
    +
    +-- Example ignoring case sensitivity:
    +local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1)
    +
    +-- Flags can be a bitwise combination of:
    +-- 0x01: Ignore case
    +-- 0x02: Multiline search
    + + +
    r.usleep(number_of_microseconds) -- Puts the script to sleep for a given number of microseconds.
    + + +
    r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and returns a database class.
    +                        -- See 'Database connectivity' for details.
    + + +
    r:ivm_set("key", value) -- Set an Inter-VM variable to hold a specific value.
    +                        -- These values persist even though the VM is gone or not being used,
    +                        -- and so should only be used if MaxConnectionsPerChild is > 0
    +                        -- Values can be numbers, strings and booleans, and are stored on a 
    +                        -- per process basis (so they won't do much good with a prefork mpm)
    +                        
    +r:ivm_get("key")        -- Fetches a variable set by ivm_set. Returns the contents of the variable
    +                        -- if it exists or nil if no such variable exists.
    +                        
    +-- An example getter/setter that saves a global variable outside the VM:
    +function handle(r)
    +    -- First VM to call this will get no value, and will have to create it
    +    local foo = r:ivm_get("cached_data")
    +    if not foo then
    +        foo = do_some_calcs() -- fake some return value
    +        r:ivm_set("cached_data", foo) -- set it globally
    +    end
    +    r:puts("Cached data is: ", foo)
    +end
    + + +
    r:htpassword(string [,algorithm [,cost]]) -- Creates a password hash from a string.
    +                                          -- algorithm: 0 = APMD5 (default), 1 = SHA, 2 = BCRYPT, 3 = CRYPT.
    +                                          -- cost: only valid with BCRYPT algorithm (default = 5).
    + + +
    r:mkdir(dir [,mode]) -- Creates a directory and sets mode to optional mode paramter.
    + + +
    r:mkrdir(dir [,mode]) -- Creates directories recursive and sets mode to optional mode paramter.
    + + +
    r:rmdir(dir) -- Removes a directory.
    + + +
    r:touch(file [,mtime]) -- Sets the file modification time to current time or to optional mtime msec value.
    + + +
    r:get_direntries(dir) -- Returns a table with all directory entries.
    +
    +function handle(r)
    +  local dir = r.context_document_root
    +  for _, f in ipairs(r:get_direntries(dir)) do
    +    local info = r:stat(dir .. "/" .. f)
    +    if info then
    +      local mtime = os.date(fmt, info.mtime / 1000000)
    +      local ftype = (info.filetype == 2) and "[dir] " or "[file]"
    +      r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) )
    +    end
    +  end
    +end
    + + +
    r.date_parse_rfc(string) -- Parses a date/time string and returns seconds since epoche.
    + + +
    r:getcookie(key) -- Gets a HTTP cookie
    + + +
    r:setcookie{
    +  key = [key],
    +  value = [value],
    +  expires = [expiry],
    +  secure = [boolean],
    +  httponly = [boolean],
    +  path = [path],
    +  domain = [domain]
    +} -- Sets a HTTP cookie, for instance:
    +
    +r:setcookie{
    +  key = "cookie1",
    +  value = "HDHfa9eyffh396rt",
    +  expires = os.time() + 86400,
    +  secure = true
    +}
    + + +
    r:wsupgrade() -- Upgrades a connection to WebSockets if possible (and requested):
    +if r:wsupgrade() then -- if we can upgrade:
    +    r:wswrite("Welcome to websockets!") -- write something to the client
    +    r:wsclose()  -- goodbye!
    +end
    + + +
    r:wsread() -- Reads a WebSocket frame from a WebSocket upgraded connection (see above):
    +
    +local line, isFinal = r:wsread() -- isFinal denotes whether this is the final frame.
    +                                 -- If it isn't, then more frames can be read
    +r:wswrite("You wrote: " .. line)
    + + +
    r:wswrite(line) -- Writes a frame to a WebSocket client:
    +r:wswrite("Hello, world!")
    + + +
    r:wsclose() -- Closes a WebSocket request and terminates it for httpd:
    +
    +if r:wsupgrade() then
    +    r:wswrite("Write something: ")
    +    local line = r:wsread() or "nothing"
    +    r:wswrite("You wrote: " .. line);
    +    r:wswrite("Goodbye!")
    +    r:wsclose()
    +end
    -

    - r:write("a single string") -- print to response body -

    - -
    top

    Logging Functions

    -

    - -- examples of logging messages
    - r:trace1("This is a trace log message") -- trace1 through trace8 can be used
    - r:debug("This is a debug log message")
    - r:info("This is an info log message")
    - r:notice("This is an notice log message")
    - r:warn("This is an warn log message")
    - r:err("This is an err log message")
    - r:alert("This is an alert log message")
    - r:crit("This is an crit log message")
    - r:emerg("This is an emerg log message")
    -

    +
    -- examples of logging messages
    +r:trace1("This is a trace log message") -- trace1 through trace8 can be used
    +r:debug("This is a debug log message")
    +r:info("This is an info log message")
    +r:notice("This is a notice log message")
    +r:warn("This is a warn log message")
    +r:err("This is an err log message")
    +r:alert("This is an alert log message")
    +r:crit("This is a crit log message")
    +r:emerg("This is an emerg log message")
    +
    top
    @@ -414,8 +1038,234 @@ end
    HTTP status code
    apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE
    internal constants used by mod_proxy
    +
    apache2.AUTHZ_DENIED, apache2.AUTHZ_GRANTED, apache2.AUTHZ_NEUTRAL, apache2.AUTHZ_GENERAL_ERROR, apache2.AUTHZ_DENIED_NO_USER
    +
    internal constants used by mod_authz_core
    +

    (Other HTTP status codes are not yet implemented.)

    +
    top
    +
    +

    Modifying contents with Lua filters

    + +

    + Filter functions implemented via LuaInputFilter + or LuaOutputFilter are designed as + three-stage non-blocking functions using coroutines to suspend and resume a + function as buckets are sent down the filter chain. The core structure of + such a function is: +

    +
    function filter(r)
    +    -- Our first yield is to signal that we are ready to receive buckets.
    +    -- Before this yield, we can set up our environment, check for conditions,
    +    -- and, if we deem it necessary, decline filtering a request alltogether:
    +    if something_bad then
    +        return -- This would skip this filter.
    +    end
    +    -- Regardless of whether we have data to prepend, a yield MUST be called here.
    +    -- Note that only output filters can prepend data. Input filters must use the 
    +    -- final stage to append data to the content.
    +    coroutine.yield([optional header to be prepended to the content])
    +    
    +    -- After we have yielded, buckets will be sent to us, one by one, and we can 
    +    -- do whatever we want with them and then pass on the result.
    +    -- Buckets are stored in the global variable 'bucket', so we create a loop
    +    -- that checks if 'bucket' is not nil:
    +    while bucket ~= nil do
    +        local output = mangle(bucket) -- Do some stuff to the content
    +        coroutine.yield(output) -- Return our new content to the filter chain
    +    end
    +
    +    -- Once the buckets are gone, 'bucket' is set to nil, which will exit the 
    +    -- loop and land us here. Anything extra we want to append to the content
    +    -- can be done by doing a final yield here. Both input and output filters 
    +    -- can append data to the content in this phase.
    +    coroutine.yield([optional footer to be appended to the content])
    +end
    + +
    top
    +
    +

    Database connectivity

    + +

    + Mod_lua implements a simple database feature for querying and running commands + on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle) + as well as mod_dbd. +

    +

    The example below shows how to acquire a database handle and return information from a table:

    +
    function handle(r)
    +    -- Acquire a database handle
    +    local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb")
    +    if not err then
    +        -- Select some information from it
    +        local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1")
    +        if not err then
    +            local rows = results(0) -- fetch all rows synchronously
    +            for k, row in pairs(rows) do
    +                r:puts( string.format("Name: %s, Age: %s<br/>", row[1], row[2]) )
    +            end
    +        else
    +            r:puts("Database query error: " .. err)
    +        end
    +        database:close()
    +    else
    +        r:puts("Could not connect to the database: " .. err)
    +    end
    +end
    + +

    + To utilize mod_dbd, specify mod_dbd + as the database type, or leave the field blank: +

    +
    local database = r:dbacquire("mod_dbd")
    + +

    Database object and contained functions

    + +

    The database object returned by dbacquire has the following methods:

    +

    Normal select and query from a database:

    +
    -- Run a statement and return the number of rows affected:
    +local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1")
    +
    +-- Run a statement and return a result set that can be used synchronously or async:
    +local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")
    + +

    Using prepared statements (recommended):

    +
    -- Create and run a prepared statement:
    +local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u")
    +if not errmsg then
    +    local result, errmsg = statement:query(20) -- run the statement with age > 20
    +end
    +
    +-- Fetch a prepared statement from a DBDPrepareSQL directive:
    +local statement, errmsg = database:prepared(r, "someTag")
    +if not errmsg then
    +    local result, errmsg = statement:select("John Doe", 123) -- inject the values "John Doe" and 123 into the statement
    +end
    + +

    Escaping values, closing databases etc:

    +
    -- Escape a value for use in a statement:
    +local escaped = database:escape(r, [["'|blabla]])
    +
    +-- Close a database connection and free up handles:
    +database:close()
    +
    +-- Check whether a database connection is up and running:
    +local connected = database:active()
    + + +

    Working with result sets

    + +

    The result set returned by db:select or by the prepared statement functions + created through db:prepare can be used to + fetch rows synchronously or asynchronously, depending on the row number specified:
    + result(0) fetches all rows in a synchronous manner, returning a table of rows.
    + result(-1) fetches the next available row in the set, asynchronously.
    + result(N) fetches row number N, asynchronously: +

    +
    -- fetch a result set using a regular query:
    +local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1")
    +
    +local rows = result(0) -- Fetch ALL rows synchronously
    +local row = result(-1) -- Fetch the next available row, asynchronously
    +local row = result(1234) -- Fetch row number 1234, asynchronously
    +local row = result(-1, true) -- Fetch the next available row, using row names as key indexes.
    + +

    One can construct a function that returns an iterative function to iterate over all rows + in a synchronous or asynchronous way, depending on the async argument: +

    +
    function rows(resultset, async)
    +    local a = 0
    +    local function getnext()
    +        a = a + 1
    +        local row = resultset(-1)
    +        return row and a or nil, row
    +    end
    +    if not async then
    +        return pairs(resultset(0))
    +    else
    +        return getnext, self
    +    end
    +end
    +
    +local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` > %u")
    +if not err then
    +     -- fetch rows asynchronously:
    +    local result, err = statement:select(20)
    +    if not err then
    +        for index, row in rows(result, true) do
    +            ....
    +        end
    +    end
    +
    +     -- fetch rows synchronously:
    +    local result, err = statement:select(20)
    +    if not err then
    +        for index, row in rows(result, false) do
    +            ....
    +        end
    +    end
    +end
    + + +

    Closing a database connection

    + + +

    Database handles should be closed using database:close() when they are no longer + needed. If you do not close them manually, they will eventually be garbage collected and + closed by mod_lua, but you may end up having too many unused connections to the database + if you leave the closing up to mod_lua. Essentially, the following two measures are + the same: +

    +
    -- Method 1: Manually close a handle
    +local database = r:dbacquire("mod_dbd")
    +database:close() -- All done
    +
    +-- Method 2: Letting the garbage collector close it
    +local database = r:dbacquire("mod_dbd")
    +database = nil -- throw away the reference
    +collectgarbage() -- close the handle via GC
    + + +

    Precautions when working with databases

    + +

    Although the standard query and run functions are freely + available, it is recommended that you use prepared statements whenever possible, to + both optimize performance (if your db handle lives on for a long time) and to minimize + the risk of SQL injection attacks. run and query should only + be used when there are no variables inserted into a statement (a static statement). + When using dynamic statements, use db:prepare or db:prepared. +

    + + +
    +
    top
    +

    LuaAuthzProvider Directive

    + + + + + + + +
    Description:Plug an authorization provider function into mod_authz_core +
    Syntax:LuaAuthzProvider provider_name /path/to/lua/script.lua function_name
    Context:server config
    Status:Experimental
    Module:mod_lua
    Compatibility:2.4.3 and later
    +

    After a lua function has been registered as authorization provider, it can be used +with the Require directive:

    + +
    LuaRoot "/usr/local/apache2/lua"
    +LuaAuthzProvider foo authz.lua authz_check_foo
    +<Location "/">
    +  Require foo johndoe
    +</Location>
    + +
    require "apache2"
    +function authz_check_foo(r, who)
    +    if r.user ~= who then return apache2.AUTHZ_DENIED
    +    return apache2.AUTHZ_GRANTED
    +end
    + + + +
    top

    LuaCodeCache Directive

    @@ -439,11 +1289,10 @@ end

    In general stat or forever is good for production, and stat or never for development.

    -

    Examples:

    - LuaCodeCache stat
    - LuaCodeCache forever
    - LuaCodeCache never
    -

    +

    Examples:

    LuaCodeCache stat
    +LuaCodeCache forever
    +LuaCodeCache never
    +
    @@ -479,8 +1328,7 @@ hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.

    a request. This can be used to implement arbitrary authentication and authorization checking. A very simple example:

    -
    -require 'apache2'
    +
    require 'apache2'
     
     -- fake authcheck hook
     -- If request has no auth info, set the response header and
    @@ -509,8 +1357,8 @@ function authcheck_hook(r)
           return 401
        end
        return apache2.OK
    -end
    -
    +end +

    Ordering

    The optional arguments "early" or "late" control when this script runs relative to other modules.

    @@ -533,7 +1381,7 @@ end
    top

    LuaHookFixups Directive

    - @@ -556,6 +1404,52 @@ processing
    Description:Provide a hook for the fixups phase of request +
    Description:Provide a hook for the fixups phase of a request processing
    Syntax:LuaHookFixups /path/to/lua/script.lua hook_function_name
    Context:server config, virtual host, directory, .htaccess
    Status:Experimental
    Module:mod_lua

    Not Yet Implemented

    +
    +
    top
    +

    LuaHookLog Directive

    + + + + + + + +
    Description:Provide a hook for the access log phase of a request +processing
    Syntax:LuaHookLog /path/to/lua/script.lua log_function_name
    Context:server config, virtual host, directory, .htaccess
    Override:All
    Status:Experimental
    Module:mod_lua
    +

    + This simple logging hook allows you to run a function when httpd enters the + logging phase of a request. With it, you can append data to your own logs, + manipulate data before the regular log is written, or prevent a log entry + from being created. To prevent the usual logging from happening, simply return + apache2.DONE in your logging handler, otherwise return + apache2.OK to tell httpd to log as normal. +

    +

    Example:

    +
    LuaHookLog "/path/to/script.lua" logger
    + +
    -- /path/to/script.lua --
    +function logger(r)
    +    -- flip a coin:
    +    -- If 1, then we write to our own Lua log and tell httpd not to log
    +    -- in the main log.
    +    -- If 2, then we just sanitize the output a bit and tell httpd to 
    +    -- log the sanitized bits.
    +
    +    if math.random(1,2) == 1 then
    +        -- Log stuff ourselves and don't log in the regular log
    +        local f = io.open("/foo/secret.log", "a")
    +        if f then
    +            f:write("Something secret happened at " .. r.uri .. "\n")
    +            f:close()
    +        end
    +        return apache2.DONE -- Tell httpd not to use the regular logging functions
    +    else
    +        r.uri = r.uri:gsub("somesecretstuff", "") -- sanitize the URI
    +        return apache2.OK -- tell httpd to log it.
    +    end
    +end
    + +
    top

    LuaHookMapToStorage Directive

    @@ -566,14 +1460,51 @@ processing Override:All Status:Experimental Module:mod_lua -

    ...

    + +

    Like LuaHookTranslateName but executed at the + map-to-storage phase of a request. Modules like mod_cache run at this phase, + which makes for an interesting example on what to do here:

    +
    LuaHookMapToStorage "/path/to/lua/script.lua" check_cache
    + +
    require"apache2"
    +cached_files = {}
    +
    +function read_file(filename) 
    +    local input = io.open(filename, "r")
    +    if input then
    +        local data = input:read("*a")
    +        cached_files[filename] = data
    +        file = cached_files[filename]
    +        input:close()
    +    end
    +    return cached_files[filename]
    +end
    +
    +function check_cache(r)
    +    if r.filename:match("%.png$") then -- Only match PNG files
    +        local file = cached_files[r.filename] -- Check cache entries
    +        if not file then
    +            file = read_file(r.filename)  -- Read file into cache
    +        end
    +        if file then -- If file exists, write it out
    +            r.status = 200
    +            r:write(file)
    +            r:info(("Sent %s to client from cache"):format(r.filename))
    +            return apache2.DONE -- skip default handler for PNG files
    +        end
    +    end
    +    return apache2.DECLINED -- If we had nothing to do, let others serve this.
    +end
    + + +
    top

    LuaHookTranslateName Directive

    - + @@ -594,11 +1525,11 @@ processing

    Example:

    -
    -# httpd.conf
    -LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper
    +
    # httpd.conf
    +LuaHookTranslateName "/scripts/conf/hooks.lua" silly_mapper
    --- /scripts/conf/hooks.lua -- + +
    -- /scripts/conf/hooks.lua --
     require "apache2"
     function silly_mapper(r)
         if r.uri == "/" then
    @@ -607,8 +1538,8 @@ function silly_mapper(r)
         else
             return apache2.DECLINED
         end
    -end
    -
    +end +

    Context

    This directive is not valid in <Directory>, <Files>, or htaccess context.

    @@ -627,7 +1558,100 @@ end -
    Description:Provide a hook for the translate name phase of request processing
    Syntax:LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]
    Context:server config, virtual host, directory
    Context:server config, virtual host
    Override:All
    Status:Experimental
    Module:mod_lua
    Override:All
    Status:Experimental
    Module:mod_lua

    ...

    +

    + This directive provides a hook for the type_checker phase of the request processing. + This phase is where requests are assigned a content type and a handler, and thus can + be used to modify the type and handler based on input: +

    +
    LuaHookTypeChecker "/path/to/lua/script.lua" type_checker
    + +
        function type_checker(r)
    +        if r.uri:match("%.to_gif$") then -- match foo.png.to_gif
    +            r.content_type = "image/gif" -- assign it the image/gif type
    +            r.handler = "gifWizard"      -- tell the gifWizard module to handle this
    +            r.filename = r.uri:gsub("%.to_gif$", "") -- fix the filename requested
    +            return apache2.OK
    +        end
    +
    +        return apache2.DECLINED
    +    end
    + + +
    +
    top
    +

    LuaInherit Directive

    + + + + + + + + + +
    Description:Controls how parent configuration sections are merged into children
    Syntax:LuaInherit none|parent-first|parent-last
    Default:LuaInherit parent-first
    Context:server config, virtual host, directory, .htaccess
    Override:All
    Status:Experimental
    Module:mod_lua
    Compatibility:2.4.0 and later

    By default, if LuaHook* directives are used in overlapping + Directory or Location configuration sections, the scripts defined in the + more specific section are run after those defined in the more + generic section (LuaInherit parent-first). You can reverse this order, or + make the parent context not apply at all.

    + +

    In previous 2.3.x releases, the default was effectively to ignore LuaHook* + directives from parent configuration sections.

    +
    +
    top
    +

    LuaInputFilter Directive

    + + + + + + + +
    Description:Provide a Lua function for content input filtering
    Syntax:LuaInputFilter filter_name /path/to/lua/script.lua function_name
    Context:server config
    Status:Experimental
    Module:mod_lua
    Compatibility:2.4.5 and later
    +

    Provides a means of adding a Lua function as an input filter. +As with output filters, input filters work as coroutines, +first yielding before buffers are sent, then yielding whenever +a bucket needs to be passed down the chain, and finally (optionally) +yielding anything that needs to be appended to the input data. The +global variable bucket holds the buckets as they are passed +onto the Lua script: +

    + +
    LuaInputFilter myInputFilter "/www/filter.lua" input_filter
    +<Files "*.lua">
    +  SetInputFilter myInputFilter
    +</Files>
    + +
    --[[
    +    Example input filter that converts all POST data to uppercase.
    +]]--
    +function input_filter(r)
    +    print("luaInputFilter called") -- debug print
    +    coroutine.yield() -- Yield and wait for buckets
    +    while bucket do -- For each bucket, do...
    +        local output = string.upper(bucket) -- Convert all POST data to uppercase
    +        coroutine.yield(output) -- Send converted data down the chain
    +    end
    +    -- No more buckets available.
    +    coroutine.yield("&filterSignature=1234") -- Append signature at the end
    +end
    + +

    +The input filter supports denying/skipping a filter if it is deemed unwanted: +

    +
    function input_filter(r)
    +    if not good then
    +        return -- Simply deny filtering, passing on the original content instead
    +    end
    +    coroutine.yield() -- wait for buckets
    +    ... -- insert filter stuff here
    +end
    + +

    +See "Modifying contents with Lua +filters" for more information. +

    +
    top

    LuaMapHandler Directive

    @@ -642,24 +1666,84 @@ end

    This directive matches a uri pattern to invoke a specific handler function in a specific file. It uses PCRE regular expressions to match the uri, and supports interpolating - match groups into both the file path and the function name - be careful writing your regular expressions to avoid security + match groups into both the file path and the function name. + Be careful writing your regular expressions to avoid security issues.

    -

    Examples:

    - LuaMapHandler /(\w+)/(/w+) /scripts/$1.lua handle_$2 -

    +

    Examples:

    LuaMapHandler "/(\w+)/(\w+)" "/scripts/$1.lua" "handle_$2"
    +

    This would match uri's such as /photos/show?id=9 to the file /scripts/photos.lua and invoke the handler function handle_show on the lua vm after loading that file.

    -

    - LuaMapHandler /bingo /scripts/wombat.lua -

    +
    LuaMapHandler "/bingo" "/scripts/wombat.lua"
    +

    This would invoke the "handle" function, which is the default if no specific function name is provided.

    +
    +
    top
    +

    LuaOutputFilter Directive

    + + + + + + + +
    Description:Provide a Lua function for content output filtering
    Syntax:LuaOutputFilter filter_name /path/to/lua/script.lua function_name
    Context:server config
    Status:Experimental
    Module:mod_lua
    Compatibility:2.4.5 and later
    +

    Provides a means of adding a Lua function as an output filter. +As with input filters, output filters work as coroutines, +first yielding before buffers are sent, then yielding whenever +a bucket needs to be passed down the chain, and finally (optionally) +yielding anything that needs to be appended to the input data. The +global variable bucket holds the buckets as they are passed +onto the Lua script: +

    + +
    LuaOutputFilter myOutputFilter "/www/filter.lua" output_filter
    +<Files "*.lua">
    +  SetOutputFilter myOutputFilter
    +</Files>
    + +
    --[[
    +    Example output filter that escapes all HTML entities in the output
    +]]--
    +function output_filter(r)
    +    coroutine.yield("(Handled by myOutputFilter)<br/>\n") -- Prepend some data to the output,
    +                                                          -- yield and wait for buckets.
    +    while bucket do -- For each bucket, do...
    +        local output = r:escape_html(bucket) -- Escape all output
    +        coroutine.yield(output) -- Send converted data down the chain
    +    end
    +    -- No more buckets available.
    +end
    + +

    +As with the input filter, the output filter supports denying/skipping a filter +if it is deemed unwanted: +

    +
    function output_filter(r)
    +    if not r.content_type:match("text/html") then
    +        return -- Simply deny filtering, passing on the original content instead
    +    end
    +    coroutine.yield() -- wait for buckets
    +    ... -- insert filter stuff here
    +end
    + +

    Lua filters with mod_filter

    +

    When a Lua filter is used as the underlying provider via the +FilterProvider directive, filtering +will only work when the filter-name is identical to the provider-name. +

    + +

    +See "Modifying contents with Lua filters" for more +information. +

    + +
    top

    LuaPackageCPath Directive

    @@ -690,22 +1774,28 @@ end conventions as lua. This just munges the package.path in the lua vms.

    -

    Examples:

    - LuaPackagePath /scripts/lib/?.lua
    - LuaPackagePath /scripts/lib/?/init.lua -

    +

    Examples:

    LuaPackagePath "/scripts/lib/?.lua"
    +LuaPackagePath "/scripts/lib/?/init.lua"
    +
    top

    LuaQuickHandler Directive

    - - + + -
    Description:Provide a hook for the quick handler of request processing
    Syntax:
    Context:server config, virtual host, directory, .htaccess
    Syntax:LuaQuickHandler /path/to/script.lua hook_function_name
    Context:server config, virtual host
    Override:All
    Status:Experimental
    Module:mod_lua

    ...

    + +

    + This phase is run immediately after the request has been mapped to a virtal host, + and can be used to either do some request processing before the other phases kick + in, or to serve a request without the need to translate, map to storage et cetera. + As this phase is run before anything else, directives such as <Location> or <Directory> are void in this phase, just as + URIs have not been properly parsed yet. +

    Context

    This directive is not valid in <Directory>, <Files>, or htaccess context.

    @@ -729,15 +1819,15 @@ end
    top

    LuaScope Directive

    - - + +
    Description:One of once, request, conn, server -- default is once
    Syntax:LuaScope once|request|conn|server [max|min max]
    Description:One of once, request, conn, thread -- default is once
    Syntax:LuaScope once|request|conn|thread|server [min] [max]
    Default:LuaScope once
    Context:server config, virtual host, directory, .htaccess
    Override:All
    Status:Experimental
    Module:mod_lua
    -

    Specify the lifecycle scope of the Lua interpreter which will +

    Specify the life cycle scope of the Lua interpreter which will be used by handlers in this "Directory." The default is "once"

    @@ -749,19 +1839,57 @@ end
    conn:
    Same as request but attached to the connection_rec
    +
    thread:
    Use the interpreter for the lifetime of the thread + handling the request (only available with threaded MPMs).
    +
    server:
    This one is different than others because the server scope is quite long lived, and multiple threads - will have the same server_rec. To accommodate this - server scoped interpreter are stored in an apr - resource list. The min and max arguments are intended - to specify the pool size, but are unused at this time.
    + will have the same server_rec. To accommodate this, + server scoped Lua states are stored in an apr + resource list. The min and max arguments + specify the minimum and maximum number of Lua states to keep in the + pool.
    +

    + Generally speaking, the thread and server scopes + execute roughly 2-3 times faster than the rest, because they don't have to + spawn new Lua states on every request (especially with the event MPM, as + even keepalive requests will use a new thread for each request). If you are + satisfied that your scripts will not have problems reusing a state, then + the thread or server scopes should be used for + maximum performance. While the thread scope will provide the + fastest responses, the server scope will use less memory, as + states are pooled, allowing f.x. 1000 threads to share only 100 Lua states, + thus using only 10% of the memory required by the thread scope. +

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_lua.html.fr b/docs/manual/mod/mod_lua.html.fr new file mode 100644 index 00000000000..6031a14a57e --- /dev/null +++ b/docs/manual/mod/mod_lua.html.fr @@ -0,0 +1,2045 @@ + + + + + +mod_lua - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_lua

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Fournit des points d'entre Lua dans diffrentes parties du +traitement des requtes httpd
    Statut:Exprimental
    IdentificateurdeModule:lua_module
    FichierSource:mod_lua.c
    Compatibilit:versions 2.3 et suprieures
    +

    Sommaire

    + +

    Ce module permet d'ajouter au serveur des extensions sous forme de +scripts crits dans le langage de programmation Lua. +mod_lua fournit de nombreuses extensions +(hooks) disponibles avec les modules natifs du serveur HTTP Apache, +comme les associations de requtes des fichiers, la gnration de +rponses dynamiques, le contrle d'accs, l'authentification et +l'autorisation.

    + +

    Vous trouverez davantage d'informations propos du langage de +programmation Lua sur le site web de +Lua.

    + +
    mod_lua est encore au stade exprimental. Son mode +d'utilisation et son comportement pourront changer tout moment jusqu' +ce qu'il passe au stade stable, et ce mme entre deux versions stables +2.4.x. N'oublez pas de consulter le fichier CHANGES avant toute mise +jour.
    + +

    Avertissement

    +

    Ce module possde une grande capacit d'action sur le fonctrionnement +de httpd, ce qui lui confre une grande puissance, mais peut aussi +induire un risque de scurit. Il est dconseill d'utiliser ce module +sur un serveur partag avec des utilisateurs auxquels vous ne pouvez pas +accorder une confiance absolue, car il peut permettre de modifier le +fonctionnement interne de httpd.

    +
    + +
    + +
    top
    +
    +

    Configuration de base

    + +

    La directive de base pour le chargement du module est

    + +
    LoadModule lua_module modules/mod_lua.so
    + + +

    +mod_lua fournit un gestionnaire nomm +lua-script qui peut tre utilis avec une directive +AddHandler ou SetHandler :

    + +
    <Files "*.lua">
    +    SetHandler lua-script
    +</Files>
    + + +

    +Ceci aura pour effet de faire traiter les requtes pour les fichiers +dont l'extension est .lua par mod_lua en +invoquant cette fonction de gestion de fichier. +

    + +

    Pour plus de dtails, voir la directive +LuaMapHandler. +

    +
    top
    +
    +

    Ecrire des gestionnaires

    +

    Dans l'API du serveur HTTP Apache, un gestionnaire est une sorte de +point d'accroche (hook) spcifique responsable de la gnration de la +rponse. mod_proxy, mod_cgi et +mod_status sont des exemples de modules comportant un +gestionnaire.

    + +

    mod_lua cherche toujours invoquer une fonction Lua pour le +gestionnaire, plutt que de simplement valuer le corps d'un script dans +le style de CGI. Une fonction de gestionnaire se prsente comme suit :

    + + +
    +example.lua
    +-- exemple de gestionnaire + +require "string" + +--[[ + Il s'agit du nom de mthode par dfaut pour les gestionnaires Lua ; + voir les noms de fonctions optionnels dans la directive + LuaMapHandler pour choisir un point d'entre diffrent. +--]] +function handle(r) + r.content_type = "text/plain" + + if r.method == 'GET' then + r:puts("Hello Lua World!\n") + for k, v in pairs( r:parseargs() ) do + r:puts( string.format("%s: %s\n", k, v) ) + end + elseif r.method == 'POST' then + r:puts("Hello Lua World!\n") + for k, v in pairs( r:parsebody() ) do + r:puts( string.format("%s: %s\n", k, v) ) + end + else + elseif r.method == 'PUT' then +-- message d'erreur personnalis + r:puts("Unsupported HTTP method " .. r.method) + r.status = 405 + return apache2.OK + else +-- message d'erreur ErrorDocument + return 501 + end + return apache2.OK +end
    + + +

    +Ce gestionnaire se contente d'afficher les arguments cods d'un uri ou +d'un formulaire dans un page au format texte. +

    + +

    +Cela signifie que vous pouvez (et tes encourag ) avoir plusieurs +gestionnaires (ou points d'entre, ou filtres) dans le mme script. +

    + +
    top
    +
    +

    Ecriture de fournisseurs d'autorisation

    + + +

    mod_authz_core fournit une interface d'autorisation +de haut niveau bien plus facile utiliser que dans les hooks +correspondants. Le premier argument de la directive Require permet de spcifier le +fournisseur d'autorisation utiliser. Pour chaque directive Require, +mod_authz_core appellera le fournisseur d'autorisation +spcifi, le reste de la ligne constituant les paramtres. Le +fournisseur considr va alors vrifier les autorisations et fournir le +rsultat dans une valeur de retour.

    + +

    En gnral, le fournisseur authz est appel avant l'authentification. +S'il doit connatre le nom d'utilisateur authentifi (ou si +l'utilisateur est appel tre authentifi), le fournisseur doit +renvoyer apache2.AUTHZ_DENIED_NO_USER, ce qui va +dclancher le processus d'authentification et un deuxime appel du +fournisseur authz.

    + +

    La fonction du fournisseur authz ci-dessous accepte deux arguments, +une adresse IP et un nom d'utilisateur. Elle autorise l'accs dans le +cas o la requte provient de l'adresse IP spcifie, ou si +l'utilisateur authentifi correspond au second argument :

    + +
    +authz_provider.lua
    + +require 'apache2' + +function authz_check_foo(r, ip, user) + if r.useragent_ip == ip then + return apache2.AUTHZ_GRANTED + elseif r.user == nil then + return apache2.AUTHZ_DENIED_NO_USER + elseif r.user == user then + return apache2.AUTHZ_GRANTED + else + return apache2.AUTHZ_DENIED + end +end
    + + +

    La configuration suivante enregistre cette fonction en tant que +fournisseur foo, et la configure por l'URL / :

    +
    LuaAuthzProvider foo authz_provider.lua authz_check_foo
    +<Location "/">
    +  Require foo 10.1.2.3 john_doe
    +</Location>
    + + +
    top
    +
    +

    Ecriture de fonctions d'accroche +(hooks)

    + +

    Les fonctions d'accroche dterminent la manire dont les modules (et +les scripts Lua) participent au traitement des requtes. Chaque type +d'accroche propos par le serveur a un rle spcifique, comme +l'association de requtes au systme de fichiers, le contrle d'accs, +ou la dfinition de types MIME :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Phase d'accrocheDirective mod_luaDescription
    Gestionnaire rapideLuaQuickHandlerIl s'agit de la premire accroche appele lorsqu'une requte + a t associe un serveur ou un serveur virtuel.
    Phase de traductionLuaHookTranslateNameCette phase traduit l'URI de la requte en nom de fichier + sur le systme. Ce sont des modules comme + mod_alias et mod_rewrite qui + interviennent au cours de cette phase.
    Choix du lieu de stockage de la ressourceLuaHookMapToStorageCette phase dfinit le lieu de stockage de la ressource : + physique, en cache ou externe/mandat. Elle est assure par les + modules de mandat ou de mise en cache.
    Autorisation d'accsLuaHookAccessCheckerCette phase vrifie si un client a l'autorisation d'accs + la ressource. Elle s'excute avant l'authentification de + l'utisateur ; il faut donc tre prudent. +
    Vrification de l'identifiant utilisateurLuaHookCheckUserIDCette phase vrifie l'identifiant de l'utilisateur ayant + fait l'objet d'une ngociation.
    Vrification de l'autorisation d'accsLuaHookAuthChecker + ou + LuaAuthzProviderCette phase vrifie l'autorisation d'accs d'un utilisateur + en fonction des ses paramtres de connexion, comme + l'identifiant, le certificat, etc... +
    Vrification du type de la ressourceLuaHookTypeCheckerCette phase assigne un type de contenu et un gestionnaire + la ressource.
    Derniers rglagesLuaHookFixupsC'est la dernire phase avant l'activation des gestionnaires + de contenu. Toute modification de dernire minute la requte + doit tre effectue ici.
    Gestionnaire de contenufichiers fx. .lua ou directive LuaMapHandlerC'est durant cette phase que le contenu est trait. Les + fichiers sont lus, interprts, certains sont excuts, et le + rsultat obtenu est envoy au client.
    JournalisationLuaHookLogLorsqu'une requte a t traite, plusieurs phases de + journalisation interviennent, et enregistrent leurs rsultats + dans les fichiers d'erreur ou d'accs. Mod_lua peut + s'intercaler au dpart de ce processus et ainsi contrler la + journalisation.
    + +

    Les fonctions d'accroche reoivent l'objet de la requte comme seul +argument (sauf LuaAuthzProvider qui reoit aussi des arguments en +provenance de la directive Require). Elles peuvent renvoyer une valeur, +selon la fonction, mais il s'agit en gnral d'un +code d'tat HTTP ou des valeurs OK, DONE, ou DECLINED, +que vous pouvez crire dans Lua sous la forme apache2.OK, +apache2.DONE, ou apache2.DECLINED.

    + + +
    +translate_name.lua
    +-- exemple d'accroche qui rcrit un URI en chemin du systme de fichiers. + +require 'apache2' + +function translate_name(r) + if r.uri == "/translate-name" then + r.filename = r.document_root .. "/find_me.txt" + return apache2.OK + end + -- on ne gre pas cette URL et on donne sa chance un autre module + return apache2.DECLINED +end
    + + + +
    +translate_name2.lua
    +--[[ exemple d'accroche qui rcrit un URI vers un autre URI. Il renvoie + un apache2.DECLINED pour permettre un autre interprteur d'URL de + travailler sur la substitution, y compris l'accroche translate_name + de base dont les tables de correspondances se basent sur DocumentRoot. + + Note: utilisez le drapeau early/late de la directive pour + l'excuter avant ou aprs mod_alias. +--]] + +require 'apache2' + +function translate_name(r) + if r.uri == "/translate-name" then + r.uri = "/find_me.txt" + return apache2.DECLINED + end + return apache2.DECLINED +end
    + +
    top
    +
    +

    Structures de donnes

    + +
    +
    request_rec
    +
    +

    request_rec est considre en tant que donne utilisateur. + Elle possde une mtatable qui vous permet d'accomplir des + choses intressantes. Pour la plus grande partie, elle possde + les mmes champs que la structure request_rec, la + plupart d'entre eux tant accessibles en lecture et criture (le + contenu des champs de la table peut tre modifi, mais les + champs eux-mmes ne peuvent pas tre tablis en tant que tables + distinctes).

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NomType LuaModifiableDescription
    allowoverridesstringnonL'option AllowOverride s'applique la requte courante.
    ap_auth_typestringnonCe champ contient le type d'authentification effectue + (par exemple basic)
    argsstringouiLa chane de paramtres de la requte (par exemple + foo=bar&name=johnsmith)
    assbackwardsbooleannoncontient true s'il s'agit d'une requte de style HTTP/0.9 + (par exemple GET /foo (sans champs d'en-tte) )
    auth_namestringnonLa chane d'identification utilise pour la vrification + de l'autorisation d'accs (si elle est disponible).
    bannerstringnonLa bannire du serveur, par exemple Apache HTTP + Server/2.4.3 openssl/0.9.8c
    basic_auth_pwstringnonLe mot de passe pour l'authentification de base envoy + avec la requte, s'il existe
    canonical_filenamestringnonLe nom de fichier canonique de la requte
    content_encodingstringnonLe type de codage du contenu de la requte courante
    content_typestringouiLe type de contenu de la requte courante, tel qu'il a t + dtermin au cours de la phase type_check (par exemple + image/gif ou text/html)
    context_prefixstringnon +
    context_document_rootstringnon +
    document_rootstringnonLa racine des documents du serveur
    err_headers_outtablenonL'en-tte MIME de l'environnement pour la rponse, crit + mme en cas d'erreur et conserv pendant les redirections + internes
    filenamestringouiLe nom de fichier correspondant la requte, par exemple + /www/example.com/foo.txt. Il peut tre modifi au cours des + phases translate-name ou map-to-storage du traitement de la + requte pour permettre au gestionnaire par dfaut (ou aux + gestionnaires de script) de servir une version du fichier + autre que celle demande.
    handlerstringouiLe nom du gestionnaire qui + doit traiter la requte, par exemple lua-script + si elle doit tre traite par mod_lua. Cette valeur est en + gnral dfinie via les directives AddHandler ou SetHandler, mais peut aussi l'tre + via mod_lua pour permettre un autre gestionnaire de traiter + une requte spcifique qui ne serait pas traite par dfaut + par ce dernier. +
    headers_intableouiLes en-ttes MIME de l'environnement de la requte. Il + s'agit des en-ttes comme Host, User-Agent, + Referer, etc...
    headers_outtableouiLes en-ttes MIME de l'environnement de la rponse.
    hostnamestringnonLe nom d'hte, tel que dfini par l'en-tte + Host: ou par un URI complet.
    is_httpsbooleannonIndique si la requte t faite via HTTPS
    is_initial_reqbooleannonIndique si la requte courante est la requte initiale ou + une sous-requte.
    limit_req_bodynumbernonLa taille maximale du corps de la requte, ou 0 si aucune + limite.
    log_idstringnonL'identifiant de la requte dans les journaux d'accs ou + d'erreur.
    methodstringnonLa mthode de la requte, par exemple GET ou + POST.
    notestableouiUne liste de notes qui peuvent tre transmises d'un module + l'autre.
    optionsstringnonLa valeur de la directive Options pour la requte + courante.
    path_infostringnonLa valeur de PATH_INFO extraite de la requte.
    portnumbernonLe port du serveur utilis par la requte.
    protocolstringnonLe protocole utilis, par exemple HTTP/1.1
    proxyreqstringouiIndique s'il s'agit d'une requte mandate ou non. Cette + valeur est en gnral dfinie au cours de la phase + post_read_request/translate_name du traitement de la requte.
    rangestringnonLe contenu de l'en-tte Range:.
    remainingnumbernonLe nombre d'octets du corps de la requte restant lire.
    server_builtstringnonLa date de compilation du serveur.
    server_namestringnonLe nom du serveur pour cette requte.
    some_auth_requiredbooleannonIndique si une autorisation est/tait requise pour cette + requte.
    subprocess_envtableouiLe jeu de variables d'environnement pour cette requte.
    startednumbernonLe moment o le serveur a t (re)dmarr, en secondes + depuis epoch (1er janvier 1970)
    statusnumberouiLe code de retour (courant) pour cette requte, par + exemple 200 ou 404.
    the_requeststringnonLa chane de la requte telle qu'elle a t envoye par le + client, par exemple GET /foo/bar HTTP/1.1.
    unparsed_uristringnonLa partie URI non interprte de la requte
    uristringouiL'URI aprs interprtation par httpd
    userstringouiSi une authentification a t effectue, nom de + l'utilisateur authentifi.
    useragent_ipstringnonL'adresse IP de l'agent qui a envoy la requte
    +
    +
    +
    top
    +
    +

    Mthodes de l'objet request_rec

    + +

    L'objet request_rec possde (au minimum) les mthodes suivantes :

    + +
    r:flush()   -- vide le tampon de sortie
    +            -- Renvoie true si le vidage a t effectu avec succs,
    +	    -- false dans le cas contraire.
    +
    +while nous_avons_des_donnes__envoyer do
    +    r:puts("Bla bla bla\n") -- envoi des donnes  envoyer vers le tampon
    +    r:flush() -- vidage du tampon (envoi au client)
    +    r.usleep(500000) -- mise en attente pendant 0.5 secondes et bouclage
    +end
    + + +
    r:addoutputfilter(name|function) -- ajoute un filtre en sortie
    +
    +r:addoutputfilter("fooFilter") -- insre le filtre fooFilter dans le flux de sortie
    + + +
    r:sendfile(filename) -- envoie un fichier entier au client en utilisant sendfile s'il est
    +                     -- support par la plateforme :
    +
    +if use_sendfile_thing then
    +    r:sendfile("/var/www/large_file.img")
    +end
    + + +
    r:parseargs() -- renvoie deux tables : une table standard de couples
    +              -- cl/valeur pour les donnes GET simples,
    +              -- et une autre pour les donnes
    +              -- multivalues (par exemple foo=1&foo=2&foo=3) :
    +
    +local GET, GETMULTI = r:parseargs()
    +r:puts("Votre nom est : " .. GET['name'] or "Unknown")
    + + + +
    r:parsebody()([sizeLimit]) -- interprte le corps de la
    +                           -- requte en tant que POST et renvoie
    +                           -- deux tables lua, comme r:parseargs(). Un
    +                           -- nombre optionnel peut tre fourni
    +                           -- pour spcifier le nombre maximal
    +                           -- d'octets  interprter. La
    +                           -- valeur par dfaut est 8192.
    +
    +local POST, POSTMULTI = r:parsebody(1024*1024)
    +r:puts("Votre nom est : " .. POST['name'] or "Unknown")
    + + + +
    r:puts("bonjour", " le monde", "!") -- affichage dans le corps de la rponse
    + + +
    r:write("une simple chane") -- affichage dans le corps de la rponse
    + + +
    r:escape_html("<html>test</html>") -- Echappe le code HTML et renvoie le rsultat
    + + +
    r:base64_encode(string) -- Encode une chane  l'aide du standard de codage Base64.
    +
    +local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q=
    + + +
    r:base64_decode(string) -- Dcode une chane code en Base64.
    +
    +local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test'
    + + +
    r:md5(string) -- Calcule et renvoie le condens MD5 d'une chane en mode binaire (binary safe).
    +
    +local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339
    + + +
    r:sha1(string) -- Calcule et renvoie le condens SHA1 d'une chane en mode binaire (binary safe).
    +
    +local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19
    + + +
    r:escape(string) -- Echappe une chane de type URL.
    +
    +local url = "http://foo.bar/1 2 3 & 4 + 5"
    +local escaped = r:escape(url) -- renvoie 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5'
    + + +
    r:unescape(string) -- Dschappe une chane de type URL.
    +
    +local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5"
    +local unescaped = r:unescape(url) -- renvoie 'http://foo.bar/1 2 3 & 4 + 5'
    + + +
    r:construct_url(string) -- Construit une URL  partir d'un URI
    +
    +local url = r:construct_url(r.uri)
    + + +
    r.mpm_query(number) -- Interroge le serveur  propos de son module MPM via la requte ap_mpm_query.
    +
    +local mpm = r.mpm_query(14)
    +if mpm == 1 then
    +    r:puts("Ce serveur utilise le MPM Event")
    +end
    + + +
    r:expr(string) -- Evalue une chane de type expr.
    +
    +if r:expr("%{HTTP_HOST} =~ /^www/") then
    +    r:puts("Ce nom d'hte commence par www")
    +end
    + + +
    r:scoreboard_process(a) -- Interroge le serveur  propos du
    +                        -- processus  la position a.
    +
    +local process = r:scoreboard_process(1)
    +r:puts("Le serveur 1 a comme PID " .. process.pid)
    + + +
    r:scoreboard_worker(a, b) -- Interroge le serveur  propos du
    +                          -- thread b, dans le processus a.
    +
    +local thread = r:scoreboard_worker(1, 1)
    +r:puts("L'ID du thread 1 du serveur 1 est " .. thread.tid .. " et son
    +tat est " .. thread.status)
    + + +
    r:clock() -- Renvoie l'heure courante avec une prcision d'une microseconde.
    + + +
    r:requestbody(filename) -- Lit et renvoie le corps d'une requte.
    +                        -- Si 'filename' est spcifi, le
    +                        -- corps de requte n'est pas
    +                        -- renvoy, mais sauvegard dans
    +                        -- le fichier correspondant.
    +
    +local input = r:requestbody()
    +r:puts("Vous m'avez envoy le corps de requte suivant :\n")
    +r:puts(input)
    + + +
    r:add_input_filter(filter_name) -- Ajoute le filtre en entre 'filter_name'.
    + + +
    r:module_info(module_name) -- Interroge le serveur  propos d'un module.
    +
    +local mod = r.module_info("mod_lua.c")
    +if mod then
    +    for k, v in pairs(mod.commands) do
    +       r:puts( ("%s: %s\n"):format(k,v)) -- affiche toutes les directives
    +                                         -- implmentes par ce module.
    +    end
    +end
    + + +
    r:loaded_modules() -- Renvoie une liste des modules chargs par httpd.
    +
    +for k, module in pairs(r:loaded_modules()) do
    +    r:puts("J'ai charg le module " .. module .. "\n")
    +end
    + + +
    r:runtime_dir_relative(filename) -- Gnre le nom d'un fichier run-time
    +                                 -- (par exemple la mmoire partage
    +                                 -- "file") relativement au rpertoire de run-time.
    + + +
    r:server_info() -- Renvoie une table contenant des informations 
    +                -- propos du serveur, comme le nom de
    +                -- l'excutable httpd, le module mpm utilis, etc...
    + + +
    r:set_document_root(file_path) -- Dfinit la racine des documents
    +                               -- pour la requte  file_path.
    + + +
    r:add_version_component(component_string) -- Ajoute un lment 
    +                                          -- la bannire du serveur.
    + + +
    r:set_context_info(prefix, docroot) -- Dfinit le prfixe et la
    +                                    -- racine des documents du contexte pour une requte.
    + + +
    r:os_escape_path(file_path) -- Convertit un chemin du systme de
    +                            -- fichiers en URL indpendamment du systme d'exploitation.
    + + +
    r:escape_logitem(string) -- Echappe une chane pour journalisation.
    + + +
    r.strcmp_match(string, pattern) -- Vrifie si 'string' correspond 
    +                                -- 'pattern' via la fonction strcmp_match (GLOBs). Par exemple, est-ce que
    +                                -- 'www.example.com' correspond  '*.example.com' ?
    +
    +local match = r.strcmp_match("foobar.com", "foo*.com")
    +if match then 
    +    r:puts("foobar.com matches foo*.com")
    +end
    + + +
    r:set_keepalive() -- Dfinit l'tat de persistance d'une requte.
    +                  -- Renvoie true dans la mesure du possible, false dans le cas contraire.
    + + +
    r:make_etag() -- Gnre et renvoie le etag pour la requte courante.
    + + +
    r:send_interim_response(clear) -- Renvoie une rponse d'intrim (1xx) au
    +                               -- client. Si 'clear' est vrai, les en-ttes disponibles
    +                               -- seront envoys et effacs.
    + + +
    r:custom_response(status_code, string) -- Gnre et dfinit une rponse
    +                                       -- personnalise pour un code d'tat particulier.
    +                                       -- Le fonctionnement est trs proche de celui de la directive ErrorDocument.
    +
    +r:custom_response(404, "Baleted!")
    + + +
    r.exists_config_define(string) -- Vrifie si une dfinition de configuration existe.
    +
    +if r.exists_config_define("FOO") then
    +    r:puts("httpd a probablement t lanc avec l'option -DFOO, ou FOO a
    +    t dfini dans la configuration")
    +end
    + + +
    r:state_query(string) -- Interroge le serveur  propos de son tat.
    + + +
    r:stat(filename [,wanted]) -- Excute stat() sur un fichier, et renvoie une table contenant
    +                           -- des informations  propos de ce fichier.
    +
    +local info = r:stat("/var/www/foo.txt")
    +if info then
    +    r:puts("Ce fichier existe et a t modifi pour la dernire fois  : " .. info.modified)
    +end
    + + +
    r:regex(string, pattern [,flags]) -- Excute une recherche  base d'expression rationnelle
    +                                  -- sur une chane, et renvoie les ventuelles correspondances trouves.
    +
    +local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]])
    +if matches then
    +    r:puts("L'expression rationnelle correspond et le dernier mot
    +    captur ($2) est : " .. matches[2])
    +end
    +
    +-- Exemple avec insensibilit  la casse :
    +local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1)
    +
    +-- les drapeaux peuvent tre une combibaison bit  bit de :
    +-- 0x01: insensibilit  la casse
    +-- 0x02: recherche multiligne
    + + +
    r.usleep(microsecondes) -- Interrompt l'excution du script pendant le nombre de microsecondes spcifi.
    + + +
    r:dbacquire(dbType[, dbParams]) -- Acquiert une connexion  une base de donnes et renvoie une classe database.
    +                                -- Voir 'Connectivit aux bases de donnes'
    +				-- pour plus de dtails.
    + + +
    r:ivm_set("key", value) -- Dfini une variable Inter-VM avec une valeur spcifique.
    +                        -- Ces valeurs sont conserves mme si la VM est
    +			-- arrte ou non utilise, et ne doivent donc tre
    +			-- utilises que si MaxConnectionsPerChild > 0.
    +			-- Les valeurs peuvent tre de type number, string
    +			-- ou boolean et sont stockes sparment pour
    +			-- chaque processus (elles ne seront donc pas d'une
    +			-- grande utilit si l'on utilise le mpm prefork).
    +                        
    +r:ivm_get("key")        -- Lit le contenu d'une variable dfinie via ivm_set. Renvoie
    +			-- le contenu de la variable si elle existe, ou nil
    +			-- dans le cas contraire.
    +                        
    +-- Voici un exemple de lecture/criture qui sauvegarde une variable
    +-- globale en dehors de la VM :
    +function handle(r)
    +    -- La premire VM qui effectue l'appel suivant n'obtiendra aucune
    +    -- valeur, et devra la crer
    +    local foo = r:ivm_get("cached_data")
    +    if not foo then
    +        foo = do_some_calcs() -- simulation de valeurs de retour
    +        r:ivm_set("cached_data", foo) -- dfinition globale de la variable
    +    end
    +    r:puts("La donne en cache est : ", foo)
    +end
    + +
    r:htpassword(string [,algorithm [,cost]]) -- Gnre un hash de mot de passe  partir d'une chane.
    +                                          -- algorithm: 0 = APMD5 (dfaut), 1 = SHA, 2 = BCRYPT, 3 = CRYPT.
    +                                          -- cost: ne s'utilise qu'avec l'algorythme BCRYPT (dfaut = 5).
    + + +
    r:mkdir(dir [,mode]) -- Cre un rpertoire et dfinit son mode via le paramtre optionnel mode.
    + + +
    r:mkrdir(dir [,mode]) -- Cre des rpertoires de manire rcursive et dfinit
    +                      -- leur mode via le paramtre optionnel mode.
    + + +
    r:rmdir(dir) -- Supprime un rpertoire.
    + + +
    r:touch(file [,mtime]) -- Dfinit la date de modification d'un fichier  la date courante ou 
    +                       -- la valeur optionnelle mtime en msec.
    + + +
    r:get_direntries(dir) -- Renvoie une table contenant toutes les entres de rpertoires.
    +
    +-- Renvoie un chemin sous forme clate en chemin, fichier, extension
    +function handle(r)
    +  local dir = r.context_document_root
    +  for _, f in ipairs(r:get_direntries(dir)) do
    +    local info = r:stat(dir .. "/" .. f)
    +    if info then
    +      local mtime = os.date(fmt, info.mtime / 1000000)
    +      local ftype = (info.filetype == 2) and "[dir] " or "[file]"
    +      r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) )
    +    end
    +  end
    +end
    + + +
    r.date_parse_rfc(string) -- Interprte une chane date/heure et renvoie l'quivalent en secondes depuis epoche.
    + + +
    r:getcookie(key) -- Obtient un cookie HTTP
    + + +
    r:setcookie(key, value, secure, expires) -- Dfinit un cookie HTTP, par exemple :
    +r:setcookie("foo", "bar and stuff", false, os.time() + 86400)
    + + +
    r:wsupgrade() -- Met  jour une connexion vers les WebSockets si possible (et si demand) :
    +if r:wsupgrade() then -- si la mise  jour est possible :
    +    r:wswrite("Bienvenue dans les websockets!") -- crit quelque chose  l'intention du client
    +    r:wsclose()  -- Au revoir !
    +end
    + + +
    r:wsread() -- Lit un cadre de websocket depuis une connexion vers websocket mise  jour (voir ci-dessus) :
    +           
    +local line, isFinal = r:wsread() -- isFinal indique s'il s'agit du cadre final.
    +                                 -- dans le cas contraire, on peut lire les cadres suivants
    +r:wswrite("Vous avez crit : " .. line)
    + + +
    r:wswrite(line) -- crit un cadre vers un client WebSocket :
    +r:wswrite("Bonjour le Monde !")
    + + +
    r:wsclose() -- ferme une requte WebSocket et l'achve pour httpd :
    +
    +if r:wsupgrade() then
    +    r:wswrite("Ecrire quelque chose : ")
    +    local line = r:wsread() or "nothing"
    +    r:wswrite("Vous avez crit : " .. line);
    +    r:wswrite("Au revoir !")
    +    r:wsclose()
    +end
    + +
    top
    +
    +

    Fonctions de journalisation

    + +
    	-- exemples de messages de journalisation
    +	r:trace1("Ceci est un message de journalisation de niveau
    +	trace") -- les niveaux valides vont de trace1  trace8 
    +        r:debug("Ceci est un message de journalisation de niveau debug")
    +        r:info("Ceci est un message de journalisation de niveau info")
    +        r:notice("Ceci est un message de journalisation de niveau notice")
    +        r:warn("Ceci est un message de journalisation de niveau warn")
    +        r:err("Ceci est un message de journalisation de niveau err")
    +        r:alert("Ceci est un message de journalisation de niveau alert")
    +        r:crit("Ceci est un message de journalisation de niveau crit")
    +        r:emerg("Ceci est un message de journalisation de niveau emerg")
    + + +
    top
    +
    +

    Paquet apache2

    +

    Le paquet nomm apache2 est fourni avec (au minimum) le +contenu suivant :

    +
    +
    apache2.OK
    +
    Constante interne OK. Les gestionnaires renverront cette valeur + s'ils ont trait la requte.
    +
    apache2.DECLINED
    +
    Constante interne DECLINED. Les gestionnaires renverront cette + valeur s'ils n'ont pas l'intention de traiter la requte.
    +
    apache2.DONE
    +
    Constante interne DONE.
    +
    apache2.version
    +
    Chane contenant la version du serveur HTTP Apache
    +
    apache2.HTTP_MOVED_TEMPORARILY
    +
    Code d'tat HTTP
    +
    apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE
    +
    Constantes internes utilises par mod_proxy
    +
    apache2.AUTHZ_DENIED, apache2.AUTHZ_GRANTED, apache2.AUTHZ_NEUTRAL, apache2.AUTHZ_GENERAL_ERROR, apache2.AUTHZ_DENIED_NO_USER
    +
    constantes internes utilises par mod_authz_core
    + +
    +

    Les autres codes d'tat HTTP ne sont pas encore implments.

    +
    top
    +
    +

    Modification de contenu avec les filtres lua

    + +

    + Les fonctions de filtrage implmentes via les directives LuaInputFilter ou LuaOutputFilter sont conues comme des + fonctions de 3me phase non blocantes utilisant des sous-routines + pour suspendre et reprendre l'excution d'une fonction lorsque des + paquets de donnes sont envoys la chane de filtrage. La + structure de base d'une telle fonction est : +

    +
    function filter(r)
    +    -- Nous indiquons tout d'abord que nous sommes prts  recevoir des
    +    -- blocs de donnes.
    +    -- Avant ceci, nous pouvons dfinir notre environnement, tester
    +    -- certaines conditions, et, si nous le jugeons ncessaire, refuser le
    +    -- filtrage d'une requte :
    +    if something_bad then
    +        return -- Le filtrage est saut
    +    end
    +    -- Sans se proccuper des donnes que nous devons ventuellement ajouter, un arrt est ralis ici.
    +    -- Noter que les filtres de sortie sont les seuls capables d'ajouter des lments au dbut des donnes.
    +    -- Les filtres en entre peuvent ajouter des lments  la fin des donnes au stade final.
    +
    +    coroutine.yield([optional header to be prepended to the content])
    +
    +    -- Aprs cet arrt, nous allons recevoir d'autres blocs de donnes, un par un ;
    +    -- nous pouvons les traiter comme il nous plat et procder  la rponse.
    +    -- Ces blocs sont conservs dans la variable globale 'bucket', nous ralisons donc
    +    -- une boucle pour vrifier que 'bucket' n'est pas vide :
    +    while bucket ~= nil do
    +        local output = mangle(bucket) -- Do some stuff to the content
    +        coroutine.yield(output) -- Return our new content to the filter chain
    +    end
    +
    +    -- Une fois les blocs de donnes puiss, 'bucket' est positionn  une valeur vide ('nil'),
    +    -- ce qui va nous faire sortir de cette boucle et nous amener  l'tape suivante.
    +    -- On peut ajouter ce qu'on veut  la fin des donnes  cette tape, qui constitue le dernier
    +    -- arrt. Les filtres d'entre comme de sortie peuvent servir  ajouter des lments  la fin
    +    --  des donnes  cette tape.
    +    coroutine.yield([optional footer to be appended to the content])
    +end
    + +
    top
    +
    +

    Connectivit aux bases de donnes

    + +

    Mod_lua implmente une fonctionnalit basique de connexion aux +bases de donnes permettant d'envoyer des requtes ou d'excuter des +commandes auprs des moteurs de base de donnes les plus courants +(mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle), ainsi que mod_dbd. +

    +

    L'exemple suivant montre comment se connecter une base de +donnes et extraire des informations d'une table :

    +
    function handle(r)
    +    -- connexion  la base de donnes
    +    local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb")
    +    if not err then
    +        -- Slection de certaines informations
    +        local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1")
    +        if not err then
    +            local rows = results(0) -- extrait tous les enregistrements en mode synchrone
    +            for k, row in pairs(rows) do
    +                r:puts( string.format("Name: %s, Age: %s<br/>", row[1], row[2]) )
    +            end
    +        else
    +            r:puts("Database query error: " .. err)
    +        end
    +        database:close()
    +    else
    +        r:puts("Connexion  la base de donnes impossible : " .. err)
    +    end
    +end
    + +

    + Pour utiliser mod_dbd, spcifiez +mod_dbd comme type de base de donnes, ou laissez le champ +vide : +

    +
    local database = r:dbacquire("mod_dbd")
    + +

    L'objet database et ses mthodes

    + +

    L'objet database renvoy par dbacquire possde +les mthodes suivantes :

    +

    Slection normale et requte vers une base de donnes +:

    +
    -- Excution d'une requte et renvoie du nombre d'enregistrements
    +affects :
    +local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1")
    +
    +-- Excution d'une requte et renvoie du rsultat qui peut tre utilis
    +en mode synchrone ou asynchrone :
    +local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")
    + +

    Utilisation de requtes prpares (recommand) :

    +
    -- Cration et excution d'une requte prpare :
    +local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u")
    +if not errmsg then
    +    local result, errmsg = statement:query(20) -- excute la requte pour age > 20
    +end
    +
    +-- Extrait une requte prpare depuis une directive DBDPrepareSQL :
    +local statement, errmsg = database:prepared(r, "someTag")
    +if not errmsg then
    +    local result, errmsg = statement:select("John Doe", 123) -- injecte les valeurs "John Doe" et 123 dans la requte
    +end
    + +

    Echappement de valeurs, fermeture de la base donnes, +etc...

    +
    -- Echappe une valeur pour pouvoir l'utiliser dans une requte :
    +local escaped = database:escape(r, [["'|blabla]])
    +
    +-- Ferme une base de donnes et libre les liens vers cette dernire :
    +database:close()
    +
    +-- Vrifie si une connexion  une base de donnes est en service et
    +oprationnelle :
    +local connected = database:active()
    + + +

    Travail avec les jeux d'enregistrements renvoys par les requtes

    + +

    Les jeux d'enregistrements renvoys par db:select ou par des +requtes prpares cres par db:prepare permettent de +slectionner des enregistrements en mode synchrone ou +asynchrone, selon le nombre d'enregistrements spcifi :
    + result(0) slectionne tous les enregistrements en mode +synchrone en renvoyant une table d'enregistrements.
    + result(-1) slectionne le prochain enregistrement disponible en +mode asynchrone.
    + result(N) slectionne l'enregistrement numro +N en mode asynchrone. +

    +
    -- extrait un jeu d'enregistrements via une requte rgulire :
    +local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1")
    +
    +local rows = result(0) -- slectionne tous les enregistrements en mode synchrone
    +local row = result(-1) -- slectionne le prochain enregistrement disponible en mode asynchrone
    +local row = result(1234) -- slectionne l'enregistrement 1234 en mode asynchrone
    +local row = result(-1, true) -- Lit l'enregistrement suivant en utilisant les noms d'enregistrements comme index.
    + +

    Il est possible de construire une fonction qui renvoie une +fonction itrative permettant de traiter tous les enregistrement en mode +synchrone ou asynchrone selon la valeur de l'argument async : +

    +
    function rows(resultset, async)
    +    local a = 0
    +    local function getnext()
    +        a = a + 1
    +        local row = resultset(-1)
    +        return row and a or nil, row
    +    end
    +    if not async then
    +        return pairs(resultset(0))
    +    else
    +        return getnext, self
    +    end
    +end
    +
    +local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` > %u")
    +if not err then
    +     -- slectionne des enregistrements en mode asynchrone :
    +    local result, err = statement:select(20)
    +    if not err then
    +        for index, row in rows(result, true) do
    +            ....
    +        end
    +    end
    +
    +     -- slectionne des enregistrements en mode synchrone :
    +    local result, err = statement:select(20)
    +    if not err then
    +        for index, row in rows(result, false) do
    +            ....
    +        end
    +    end
    +end
    + + +

    Fermeture d'une connexion une base de donnes

    + + +

    Lorsqu'elles ne sont plus utilises, les connexions aux bases de +donnes doivent tre fermes avec database:close(). Si vous +ne les fermez pas manuellement, mod_lua les fermera peut-tre en tant +que rsidus collects, mais si ce n'est pas le cas, vous pouvez finir +pas avoir trop de connexions vers la base de donnes inutilises. Les +deux mesures suivantes sont pratiquement identiques : +

    +
    -- Mthode 1 : fermeture manuelle de la connexion
    +local database = r:dbacquire("mod_dbd")
    +database:close() -- c'est tout
    +
    +-- Mthode 2 : on laisse le collecteur de rsidus la fermer
    +local database = r:dbacquire("mod_dbd")
    +database = nil -- on coupe le lien
    +collectgarbage() -- fermeture de la connexion par le collecteur de rsidus
    + + +

    Prcautions prendre lorsque l'on travaille avec les bases +de donnes

    + +

    Bien que les fonctions query et run +soient toujours disponibles, il est recommand d'utiliser des requtes +prpares chaque fois que possible, afin d'une part d'optimiser les +performances (si votre connexion reste longtemps en vie), et d'autre part +minimiser le risque d'attaques par injection SQL. Les fonctions +run et query ne doivent tre utilises que +lorsque la requte ne contient pas de variables (requte statique). Dans +le cas des requtes dynamiques, utilisez db:prepare ou +db:prepared. +

    + + +
    +
    top
    +

    Directive LuaAuthzProvider

    + + + + + + + +
    Description:Branche une fonction fournisseur d'autorisation dans mod_authz_core +
    Syntaxe:LuaAuthzProvider provider_name /path/to/lua/script.lua function_name
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Disponible depuis la version 2.4.3 du serveur HTTP Apache
    +

    Lorsqu'une fonction lua a t enregistre en tant que fournisseur +d'autorisation, elle peut tre appele via la directive Require :

    + + +
    LuaRoot "/usr/local/apache2/lua"
    +LuaAuthzProvider foo authz.lua authz_check_foo
    +<Location "/">
    +  Require foo johndoe
    +</Location>
    + +
    require "apache2"
    +function authz_check_foo(r, who)
    +    if r.user ~= who then return apache2.AUTHZ_DENIED
    +    return apache2.AUTHZ_GRANTED
    +end
    + + + +
    +
    top
    +

    Directive LuaCodeCache

    + + + + + + + + +
    Description:Configure le cache de code compil.
    Syntaxe:LuaCodeCache stat|forever|never
    Dfaut:LuaCodeCache stat
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua

    + Cette directive permet de dfinir le comportement du cache de code + en mmoire. La valeur par dfaut est stat ; dans ce cas, le script + du niveau le plus haut (et pas les scripts inclus) est vrifi + chaque fois que ce fichier est ncessaire, et est recharg si la + date de modification est plus rcente que celle du script dj + charg. Les autres valeurs permettent respectivement de garder le + fichier en cache perptuellement (forever - jamais vrifi ni + remplac), ou de ne jamais le mettre en cache (never).

    + +

    En gnral, les valeurs stat et forever sont utilises pour un + serveur en production, et les valeurs stat ou never pour un serveur + en dveloppement.

    + +

    Exemples :

    LuaCodeCache stat
    +LuaCodeCache forever
    +LuaCodeCache never
    +
    + + +
    +
    top
    +

    Directive LuaHookAccessChecker

    + + + + + + + + +
    Description:Fournit un point d'entre pour la phase access_checker du +traitement de la requte
    Syntaxe:LuaHookAccessChecker /chemin/vers/lua/script.lua hook_function_name [early|late]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Le troisime argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache.
    +

    Ajoute votre fonction d'accroche la phase access_checker. Une +fonction d'accroche access checker renvoie en gnral OK, DECLINED, ou +HTTP_FORBIDDEN.

    +

    Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrler le moment auquel ce script + s'excute par rapport aux autres modules.

    + +
    +
    top
    +

    Directive LuaHookAuthChecker

    + + + + + + + + +
    Description:Fournit un point d'entre pour la phase auth_checker du +traitement de la requte
    Syntaxe:LuaHookAuthChecker /chemin/vers/lua/script.lua hook_function_name [early|late]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Le troisime argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache.
    +

    Invoque une fonction lua au cours de la phase auth_checker du +traitement de la requte. Cette directive peut s'utiliser pour +implmenter une vrification arbitraire de l'authentification et de +l'autorisation. Voici un exemple trs simple : +

    +
    require 'apache2'
    +
    +-- fonction d'accroche authcheck fictive
    +-- Si la requte ne contient aucune donne d'authentification, l'en-tte
    +-- de la rponse est dfini et un code 401 est renvoy afin de demander au
    +-- navigateur d'effectuer une authentification basique. Si la requte
    +-- comporte des donnes d'authentification, elles ne sont pas vraiment
    +-- consultes, mais on admet la prise en compte de l'utilisateur 'foo' et
    +-- on la valide. On vrifie ensuite si l'utilisateur est bien 'foo' et on
    +-- accepte la requte.
    +function authcheck_hook(r)
    +
    +   -- recherche des informations d'authentification
    +   auth = r.headers_in['Authorization']
    +   if auth ~= nil then
    +     -- dfinition d'un utilisateur par dfaut
    +     r.user = 'foo'
    +   end
    +
    +   if r.user == nil then
    +      r:debug("authcheck: user is nil, returning 401")
    +      r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
    +      return 401
    +   elseif r.user == "foo" then
    +      r:debug('user foo: OK')
    +   else
    +      r:debug("authcheck: user='" .. r.user .. "'")
    +      r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"'
    +      return 401
    +   end
    +   return apache2.OK
    +end
    + +

    Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrler le moment auquel ce script + s'excute par rapport aux autres modules.

    + +
    +
    top
    +

    Directive LuaHookCheckUserID

    + + + + + + + + +
    Description:Fournit un point d'entre pour la phase check_user_id du +traitement de la requte
    Syntaxe:LuaHookCheckUserID /chemin/vers/lua/script.lua hook_function_name [early|late]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Le troisime argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache.

    ...

    +

    Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrler le moment auquel ce script + s'excute par rapport aux autres modules.

    + +
    +
    top
    +

    Directive LuaHookFixups

    + + + + + + + +
    Description:Fournit un point d'entre pour la phase de correction du +traitement de la requte
    Syntaxe:LuaHookFixups /chemin/vers/lua/script.lua hook_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    + Idem LuaHookTranslateName, mais s'excute durant la phase de + correction. +

    + +
    +
    top
    +

    Directive LuaHookInsertFilter

    + + + + + + + +
    Description:Fournit un point d'entre pour la phase insert_filter du +traitement de la requte
    Syntaxe:LuaHookInsertFilter /chemin/vers/lua/script.lua hook_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua

    Non encore implment

    +
    +
    top
    +

    Directive LuaHookLog

    + + + + + + + +
    Description:Permet une insertion dans la phase de journalisation du +traitement d'une requte
    Syntaxe:LuaHookLog /path/to/lua/script.lua log_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    + Ce dispositif d'insertion simple permet d'excuter une fonction + lorsque httpd entre dans la phase de journalisation du traitement + d'une requte. Vous pouvez ainsi ajouter des donnes vos propres + entres de journalisation, manipuler les entres du journal standard + avant leur enregistrement ou empcher l'enregistrement d'une entre + dans le journal. Pour empcher l'enregistrement normal des entres + du journal, renvoyez simplement apache2.DONE dans votre + gestionnaire de journalisation, ou au contraire, renvoyez + apache2.OK pour que httpd effectue une journalisation + normale. +

    +

    Exemple :

    +
    LuaHookLog "/path/to/script.lua" logger
    + +
    -- /path/to/script.lua --
    +function logger(r)
    +    -- on joue  pile ou face :
    +    -- Si on obtient 1, on crit dans notre propre journal Lua et on dit
    +    --  httpd de ne pas enregistrer d'entre dans le journal standard..
    +    -- Si on obtient 2, on nettoie un peu les donnes avant que httpd ne
    +    -- les enregistre dans le journal standard.
    +
    +    if math.random(1,2) == 1 then
    +        -- On effectue notre propre journalisation et le journal
    +	-- standard n'est pas aliment
    +        local f = io.open("/foo/secret.log", "a")
    +        if f then
    +            f:write("Quelque chose de secret est arriv  " .. r.uri .. "\n")
    +            f:close()
    +        end
    +        return apache2.DONE -- On dit  httpd de ne rien enregistrer
    +			    --dans le journal standard
    +    else
    +        r.uri = r.uri:gsub("somesecretstuff", "") -- nettoie les donnes
    +        return apache2.OK -- et httpd doit alors les enregistrer.
    +    end
    +end
    + + +
    +
    top
    +

    Directive LuaHookMapToStorage

    + + + + + + + +
    Description:Fournit un point d'entre pour la phase map_to_storage du +traitement de la requte
    Syntaxe:LuaHookMapToStorage /chemin/vers/lua/script.lua hook_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Identique la directive + LuaHookTranslateName, mais s'excute la + phase map-to-storage du traitement de la requte. Les modules comme + mod_cache agissent pendant cette phase, ce qui permet de prsenter + un exemple intressant de ce que l'on peut faire ici :

    +
    LuaHookMapToStorage "/path/to/lua/script.lua" check_cache
    + +
    require"apache2"
    +cached_files = {}
    +
    +function read_file(filename)
    +    local input = io.open(filename, "r")
    +    if input then
    +        local data = input:read("*a")
    +        cached_files[filename] = data
    +        file = cached_files[filename]
    +        input:close()
    +    end
    +    return cached_files[filename]
    +end
    +
    +function check_cache(r)
    +    if r.filename:match("%.png$") then -- Ne concerne que les fichiers PNG
    +        local file = cached_files[r.filename] -- Vrifie les entres du cache
    +        if not file then
    +            file = read_file(r.filename)  -- Lit le fichier vers le cache
    +        end
    +        if file then -- Si le fichier existe, on l'envoie
    +            r.status = 200
    +            r:write(file)
    +            r:info(("%s a t envoy au client depuis le cache"):format(r.filename))
    +            return apache2.DONE -- cout-circuite le gestionnaire par dfaut des fichiers PNG
    +        end
    +    end
    +    return apache2.DECLINED -- Si nous n'avons rien eu  faire, nous laissons les autres s'en charger
    +end
    + + + +
    +
    top
    +

    Directive LuaHookTranslateName

    + + + + + + + + +
    Description:Fournit un point d'entre la phase du nom de +traduction du traitement de la requte
    Syntaxe:LuaHookTranslateName /chemin/vers/lua/script.lua nom_fonction_hook [early|late]
    Contexte:configuration du serveur, serveur virtuel
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Le troisime argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache.

    + Cette directive permet d'ajouter un point d'entre ( + APR_HOOK_MIDDLE) la phase du nom de traduction du traitement de la + requte. La fonction hook accepte un seul argument, le request_rec, + et doit renvoyer un code d'tat qui est soit un code d'erreur HTTP, + ou une constante dfinie dans le module apache2 : apache2.OK, + apache2.DECLINED, ou apache2.DONE.

    + +

    Pour ceux qui ne sont pas familiers avec les points d'entre + (hook), en gros, chaque hook sera invoqu jusqu' ce que l'un + d'entre eux renvoie apache2.OK. Si un hook n'effectuer pas la + traduction, il doit juste renvoyer apache2.DECLINED. Si le + traitement de la requte doit tre interrompu, la valeur renvoye + doit tre apache2.DONE.

    + +

    Exemple :

    + +
    # httpd.conf
    +LuaHookTranslateName "/scripts/conf/hooks.lua" silly_mapper
    + + +
    -- /scripts/conf/hooks.lua --
    +require "apache2"
    +function silly_mapper(r)
    +    if r.uri == "/" then
    +        r.filename = "/var/www/home.lua"
    +        return apache2.OK
    +    else
    +        return apache2.DECLINED
    +    end
    +end
    + + +

    Contexte

    Cette directive ne peut tre + utilise ni l'intrieur d'une section <Directory> ou <Files>, ni dans un fichier htaccess.

    + +

    Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrler le moment auquel ce script + s'excute par rapport aux autres modules.

    + +
    +
    top
    +

    Directive LuaHookTypeChecker

    + + + + + + + +
    Description:Fournit un point d'entre pour la phase type_checker du +traitement de la requte
    Syntaxe:LuaHookTypeChecker /chemin/vers/lua/script.lua hook_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua

    + Cette directive fournit un point d'entre pour la phase + type_checker du traitement de la requte. Cette phase + correspond au moment o la requte se voit assigner un type et un + gestionnaire de contenu, et peut donc tre utilise pour modifier le + type et le gestionnaire en fonction de l'entre : +

    +
    LuaHookTypeChecker "/path/to/lua/script.lua" type_checker
    + +
        function type_checker(r)
    +        if r.uri:match("%.to_gif$") then -- foo.png.to_gif convient
    +            r.content_type = "image/gif" -- affectation du type image/gif
    +            r.handler = "gifWizard"      -- force le traitement de la requte par le module gifWizard
    +            r.filename = r.uri:gsub("%.to_gif$", "") -- corrige le nom du fichier demand
    +            return apache2.OK
    +        end
    +
    +        return apache2.DECLINED
    +    end
    + + +
    +
    top
    +

    Directive LuaInherit

    + + + + + + + + + +
    Description:Contrle la manire dont les sections de configuration +parentes sont fusionnes dans les enfants
    Syntaxe:LuaInherit none|parent-first|parent-last
    Dfaut:LuaInherit parent-first
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Versions 2.4.0 et suprieures

    Par dfaut, si des directives LuaHook* se trouvent dans + des sections de configuration Directory ou Location qui se + chevauchent, les scripts + dfinis dans les sections les plus spcifiques s'excutent + aprs ceux dfinis dans les sections plus gnriques + (LuaInherit parent-first). Vous pouvez inverser cet ordre, ou faire + en sorte que le contexte parent ne s'applique pas du tout.

    + +

    Jusqu'aux versions 2.3.x, le comportement par dfaut consistait + ignorer les directives LuaHook* situes dans les sections de + configuration parentes.

    +
    +
    top
    +

    Directive LuaInputFilter

    + + + + + + + +
    Description:Fournit une fonction Lua pour le filtrage en entre
    Syntaxe:LuaInputFilter filter_name /path/to/lua/script.lua function_name
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Disponible depuis la version 2.4.5 du serveur HTTP +Apache
    +

    Cette directive permet d'ajouter un filtre en entre sous la forme +d'une fonction Lua. A l'instar des filtres en sorties, les filtres en +entre fonctionnent comme des sous-routines, intervenant dans un premier +temps avant l'envoi du contenu des tampons, puis chaque fois qu'un +paquet de donnes doit tre transmis la chane, et ventuellement +produisant toute donne ajouter aux donnes en entre. La variable +globale bucket contient les paquets de donnes tels qu'ils +sont transmis au script Lua : +

    + +
    LuaInputFilter myInputFilter "/www/filter.lua" input_filter
    +<Files "*.lua">
    +  SetInputFilter myInputFilter
    +</Files>
    + +
    --[[
    +    Exemple de filtre en entre qui convertit toutes les donnes POST en
    +    majuscules.
    +]]--
    +function input_filter(r)
    +    print("luaInputFilter called") -- pour dbogage
    +    coroutine.yield() -- attend des paquets de donnes
    +    while bucket do -- Pour chaque paquet, faire ...
    +        local output = string.upper(bucket) -- Convertit toutes les donnes POST en majuscules
    +        coroutine.yield(output) -- Envoie les donnes traites  la chane de filtrage
    +    end
    +    -- plus aucune donne  traiter.
    +    coroutine.yield("&filterSignature=1234") -- Ajoute une signature  la fin
    +end
    + +

    +Le filtre en entre peut interdire ou sauter un filtre s'il est +considr comme indsirable : +

    +
    function input_filter(r)
    +    if not good then
    +        return -- Empche tout simplement le filtrage et transmet le contenu original
    +    end
    +    coroutine.yield() -- attend des paquets de donnes
    +    ...               -- insert les filtres ici
    +end
    + +

    +Voir "Modification de contenu avec les +filtres Lua" pour plus de dtails. +

    + +
    +
    top
    +

    Directive LuaMapHandler

    + + + + + + + +
    Description:Met en correspondance un chemin avec un gestionnaire lua
    Syntaxe:LuaMapHandler modele-uri /chemin/vers/lua/script.lua +[nom-fonction]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Cette directive permet de faire correspondre un modle d'uri avec + une fonction de gestionnaire situe dans un fichier spcifique. Elle + utilise les expressions rationnelles PCRE pour mettre en + correspondance l'uri, et supporte les groupes de correspondance + d'interpolation dans le chemin du fichier et le nom de la fonction. + Prenez garde aux problmes de scurit en crivant vos expressions + rationnelles.

    +

    Exemples :

    LuaMapHandler "/(\w+)/(\w+)" "/scripts/$1.lua" "handle_$2"
    +
    +

    Cette directive va faire correspondre des uri comme + /photos/show?id=9 au fichier /scripts/photos.lua, et invoquera la + fonction de gestionnaire handle_show au niveau de la vm lua + aprs chargement de ce fichier.

    + +
    LuaMapHandler "/bingo" "/scripts/wombat.lua"
    + +

    Cette directive invoquera la fonction "handle" qui est la + valeur par dfaut si aucun nom de fonction spcifique n'est + spcifi.

    + +
    +
    top
    +

    Directive LuaOutputFilter

    + + + + + + + +
    Description:Fournit une fonction Lua pour le filtrage de contenu en +sortie
    Syntaxe:LuaOutputFilter filter_name /path/to/lua/script.lua function_name
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    >Cette directive permet d'ajouter un filtre en sortie sous la forme +d'une fonction Lua. A l'instar des filtres en sorties, les filtres en +entre fonctionnent comme des sous-routines, intervenant dans un premier +temps avant l'envoi du contenu des tampons, puis chaque fois qu'un +paquet de donnes doit tre transmis la chane, et ventuellement +produisant toute donne ajouter aux donnes en sortie. La variable +globale bucket contient les paquets de donnes tels qu'ils +sont transmis au script Lua : +

    + +
    LuaOutputFilter myOutputFilter "/www/filter.lua" output_filter
    +<Files "*.lua">
    +  SetOutputFilter myOutputFilter
    +</Files>
    + +
    --[[
    +    Exemple de filtre en sortie qui chappe toutes les entits HTML en
    +    sortie
    +]]--
    +function output_filter(r)
    +    coroutine.yield("(Handled by myOutputFilter)<br/>\n") -- Ajoute des donnes au dbut de la sortie,
    +                                                                -- puis attend des paquets de donnes  traiter
    +    while bucket do -- Pour chaque paquet, faire ...
    +        local output = r:escape_html(bucket) -- Echappe les donnes en sortie
    +        coroutine.yield(output) -- Envoie les donnes traites  la chane
    +    end
    +    -- plus aucune donne  traiter.
    +end
    + +

    +Comme les filres en entre, le filtre en sortie peut interdire ou sauter un filtre s'il est +considr comme indsirable : +

    +
    function output_filter(r)
    +    if not r.content_type:match("text/html") then
    +        return -- Empche tout simplement le filtrage et transmet le contenu original
    +    end
    +    coroutine.yield() -- attend des paquets de donnes
    +    ...               -- insert les filtres ici
    +end
    + +

    Les filtres Lua avec mod_filter

    +

    Lorsqu'on utilise un filtre Lua comme fournisseur sous-jacent via la +directive FilterProvider, le +filtrage ne fonctionnera que si filter-name est identique +provider-name. +

    + +

    +Voir "Modification de contenu avec les +filtres Lua" pour plus de dtails. +

    + + +
    +
    top
    +

    Directive LuaPackageCPath

    + + + + + + + +
    Description:Ajoute un rpertoire au package.cpath de lua
    Syntaxe:LuaPackageCPath /chemin/vers/include/?.soa
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Cette directive permet d'ajouter un chemin la liste des chemins + de recherche des bibliothques partages de lua. Ceci modifie le + package.cpath dans les vms lua.

    + + +
    +
    top
    +

    Directive LuaPackagePath

    + + + + + + + +
    Description:Ajoute un rpertoire au package.path de lua
    Syntaxe:LuaPackagePath /chemin/vers/include/?.lua
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua

    Cette directive permet d'ajouter un chemin la liste des + chemins de recherche du module lua. Elle suit les mmes conventions + que lua. Ceci modifie le package.path dans les vms lua.

    + +

    Exemples :

    LuaPackagePath "/scripts/lib/?.lua"
    +LuaPackagePath "/scripts/lib/?/init.lua"
    +
    + +
    +
    top
    +

    Directive LuaQuickHandler

    + + + + + + + +
    Description:Fournit un point d'entre pour la gestion rapide du +traitement de la requte
    Syntaxe:LuaQuickHandler /path/to/script.lua hook_function_name
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Cette phase s'excute juste aprs l'attribution de la requte + un serveur virtuel, et permet d'effectuer certains traitements avant + le droulement des autres phases, ou de servir une requte sans + avoir la traduire, l'associer un espace de stockage, etc... + Comme cette phase s'excute avant toute autre, les directives telles + que <Location> ou + <Directory> ne + sont pas encore prises en compte, car Les URI n'ont pas encore t + entirement interprts. +

    +

    Contexte

    Cette directive ne peut tre + utilise ni l'intrieur d'une section <Directory> ou <Files>, ni dans un fichier htaccess.

    + +
    +
    top
    +

    Directive LuaRoot

    + + + + + + + +
    Description:Spcifie le chemin de base pour la rsolution des chemins +relatifs dans les directives de mod_lua
    Syntaxe:LuaRoot /chemin/vers/un/rpertoire
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Cette directive permet de spcifier le chemin de base qui sera + utilis pour valuer tous les chemins relatifs dans mod_lua. En + l'absence de cette directive, les chemins relatifs sont rsolus par + rapport au rpertoire de travail courant, ce qui ne sera pas + toujours appropri pour un serveur.

    + +
    +
    top
    +

    Directive LuaScope

    + + + + + + + + +
    Description:Une valeur parmi once, request, conn, thread -- la valeur par dfaut est once
    Syntaxe:LuaScope once|request|conn|thread|server [min] [max]
    Dfaut:LuaScope once
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    Statut:Exprimental
    Module:mod_lua
    +

    Cette directive permet de spcifier la dure de vie de + l'interprteur Lua qui sera utilis dans ce "rpertoire". La valeur + par dfaut est "once".

    + +
    +
    once:
    utilise l'interprteur une fois.
    + +
    request:
    utilise l'interprteur pour traiter tout ce + qui est bas sur le mme fichier dans la requte, et qui se trouve + aussi dans la porte de la requte.
    + +
    conn:
    idem request, mais attach connection_rec
    + +
    thread:
    Utilise l'interprteur pendant toute la dure + de vie du thread qui traite la requte (disponible seulement avec + les MPMs threads).
    + +
    server:
    Le comportement est ici diffrent, car la + porte du serveur prsente une dure de vie assez longue, et + plusieurs threads vont partager le mme server_rec. Pour grer tout + ceci, les tats lua du serveur sont stocks dans une liste de ressources + apr. Les arguments min et max permettent + de spcifier les nombres minimaux et maximaux d'tats lua stocker + dans la liste.
    +
    +

    En gnral, les portes thread et server + sont 2 3 fois plus rapides que les autres, car elles n'ont pas besoin + de rgnrer de nouveaux tats Lua chaque requte (comme c'est le + cas avec le MPM event, o mme les connexions persistantes utilisent un + nouveau thread pour chaque requte). Si vous pensez que vos scripts + n'auront pas de problme s'il rutilisent un tat, alors les portes + thread ou server doivent tre utilises car + elles prsenteront de meilleures performances. Alors que la porte + thread fournira les rponses les plus rapides, la porte + server utilisera moins de mmoire car les tats sont + rassembls dans des jeux, permettant par exemple 1000 threads de + partager 100 tats Lua, ne ncessitant ainsi que 10% de la mmoire + requise par la porte thread. +

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_lua.xml b/docs/manual/mod/mod_lua.xml index ae012d6e199..077fddc3ff9 100644 --- a/docs/manual/mod/mod_lua.xml +++ b/docs/manual/mod/mod_lua.xml @@ -44,7 +44,15 @@ authorization

    mod_lua is still in experimental state. Until it is declared stable, usage and behavior may change -at any time. +at any time, even between stable releases of the 2.4.x series. +Be sure to check the CHANGES file before upgrading. + +Warning +

    This module holds a great deal of power over httpd, which is both a +strength and a potential security risk. It is not recommended +that you use this module on a server that is shared with users you do not +trust, as it can be abused to change the internal workings of httpd.

    +
    @@ -52,17 +60,21 @@ at any time.

    The basic module loading directive is

    - + LoadModule lua_module modules/mod_lua.so - +

    mod_lua provides a handler named lua-script, -which can be used with an AddHandler directive:

    +which can be used with a SetHandler or +AddHandler directive:

    - -AddHandler lua-script .lua - + +<Files "*.lua"> + SetHandler lua-script +</Files> +

    This will cause mod_lua to handle requests for files @@ -85,7 +97,9 @@ and mod_status.

    just evaluating a script body CGI style. A handler function looks something like this:

    -example.lua
    +
    +
    +example.lua
    -- example handler require "string" @@ -97,21 +111,29 @@ require "string" --]] function handle(r) r.content_type = "text/plain" - r:puts("Hello Lua World!\n") if r.method == 'GET' then + r:puts("Hello Lua World!\n") for k, v in pairs( r:parseargs() ) do - r:puts( string.format("%s: %s", k, v) ) + r:puts( string.format("%s: %s\n", k, v) ) end elseif r.method == 'POST' then + r:puts("Hello Lua World!\n") for k, v in pairs( r:parsebody() ) do - r:puts( string.format("%s: %s", k, v) ) + r:puts( string.format("%s: %s\n", k, v) ) end + elseif r.method == 'PUT' then +-- use our own Error contents + r:puts("Unsupported HTTP method " .. r.method) + r.status = 405 + return apache2.OK else - r:puts("unknown HTTP method " .. r.method) +-- use the ErrorDocument + return 501 end + return apache2.OK end -
    +

    This handler function just prints out the uri or form encoded @@ -125,21 +147,151 @@ handlers (or hooks, or filters) in the same script.

    +
    +Writing Authorization Providers + +

    mod_authz_core provides a high-level interface to +authorization that is much easier to use than using into the relevant +hooks directly. The first argument to the +Require directive gives +the name of the responsible authorization provider. For any +Require line, +mod_authz_core will call the authorization provider +of the given name, passing the rest of the line as parameters. The +provider will then check authorization and pass the result as return +value.

    + +

    The authz provider is normally called before authentication. If it needs to +know the authenticated user name (or if the user will be authenticated at +all), the provider must return apache2.AUTHZ_DENIED_NO_USER. +This will cause authentication to proceed and the authz provider to be +called a second time.

    + +

    The following authz provider function takes two arguments, one ip +address and one user name. It will allow access from the given ip address +without authentication, or if the authenticated user matches the second +argument:

    + + +authz_provider.lua
    + +require 'apache2' + +function authz_check_foo(r, ip, user) + if r.useragent_ip == ip then + return apache2.AUTHZ_GRANTED + elseif r.user == nil then + return apache2.AUTHZ_DENIED_NO_USER + elseif r.user == user then + return apache2.AUTHZ_GRANTED + else + return apache2.AUTHZ_DENIED + end +end +
    + +

    The following configuration registers this function as provider +foo and configures it for URL /:

    + +LuaAuthzProvider foo authz_provider.lua authz_check_foo +<Location "/"> + Require foo 10.1.2.3 john_doe +</Location> + + +
    +
    Writing Hooks

    Hook functions are how modules (and Lua scripts) participate in the processing of requests. Each type of hook exposed by the server exists for -a specific purposes such as mapping requests to the filesystem, -performing access control, or setting mimetypes. General purpose hooks -that simply run at handy times in the request lifecycle exist as well.

    - -

    Hook functions are passed the request object as their only argument. +a specific purpose, such as mapping requests to the file system, +performing access control, or setting mime types:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Hook phasemod_lua directiveDescription
    Quick handlerLuaQuickHandlerThis is the first hook that will be called after a request has + been mapped to a host or virtual host
    Translate nameLuaHookTranslateNameThis phase translates the requested URI into a filename on the + system. Modules such as mod_alias and + mod_rewrite operate in this phase.
    Map to storageLuaHookMapToStorageThis phase maps files to their physical, cached or external/proxied storage. + It can be used by proxy or caching modules
    Check AccessLuaHookAccessCheckerThis phase checks whether a client has access to a resource. This + phase is run before the user is authenticated, so beware. +
    Check User IDLuaHookCheckUserIDThis phase it used to check the negotiated user ID
    Check AuthorizationLuaHookAuthChecker or + LuaAuthzProviderThis phase authorizes a user based on the negotiated credentials, such as + user ID, client certificate etc. +
    Check TypeLuaHookTypeCheckerThis phase checks the requested file and assigns a content type and + a handler to it
    FixupsLuaHookFixupsThis is the final "fix anything" phase before the content handlers + are run. Any last-minute changes to the request should be made here.
    Content handlerfx. .lua files or through LuaMapHandlerThis is where the content is handled. Files are read, parsed, some are run, + and the result is sent to the client
    LoggingLuaHookLogOnce a request has been handled, it enters several logging phases, + which logs the request in either the error or access log. Mod_lua + is able to hook into the start of this and control logging output.
    + +

    Hook functions are passed the request object as their only argument +(except for LuaAuthzProvider, which also gets passed the arguments from +the Require directive). They can return any value, depending on the hook, but most commonly -they'll return OK, DONE, or DECLINED, which you can write in lua as +they'll return OK, DONE, or DECLINED, which you can write in Lua as apache2.OK, apache2.DONE, or apache2.DECLINED, or else an HTTP status code.

    -translate_name.lua
    +
    +
    +translate_name.lua
    -- example hook that rewrites the URI to a filesystem path. require 'apache2' @@ -152,16 +304,18 @@ function translate_name(r) -- we don't care about this URL, give another module a chance return apache2.DECLINED end -
    + -translate_name2.lua
    +
    +
    +translate_name2.lua
    --[[ example hook that rewrites one URI to another URI. It returns a apache2.DECLINED to give other URL mappers a chance to work on the substitution, including the core translate_name hook which maps based on the DocumentRoot. - Note: It is currently undefined as to whether this runs before or after - mod_alias. + Note: Use the early/late flags in the directive to make it run before + or after mod_alias. --]] require 'apache2' @@ -173,7 +327,7 @@ function translate_name(r) end return apache2.DECLINED end -
    +
    Data Structures @@ -183,190 +337,712 @@ end

    The request_rec is mapped in as a userdata. It has a metatable which lets you do useful things with it. For the most part it - has the same fields as the request_rec struct (see httpd.h - until we get better docs here) many of which are writeable as + has the same fields as the request_rec struct, many of which are writable as well as readable. (The table fields' content can be changed, but the fields themselves cannot be set to different tables.)

    - +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Name Lua type WritableDescription
    allowoverridesstringnoThe AllowOverride options applied to the current request.
    ap_auth_type string noIf an authentication check was made, this is set to the type + of authentication (f.x. basic)
    args string yesThe query string arguments extracted from the request + (f.x. foo=bar&name=johnsmith)
    assbackwards boolean noSet to true if this is an HTTP/0.9 style request + (e.g. GET /foo (with no headers) )
    auth_namestringnoThe realm name used for authorization (if applicable).
    bannerstringnoThe server banner, f.x. Apache HTTP Server/2.4.3 openssl/0.9.8c
    basic_auth_pwstringnoThe basic auth password sent with this request, if any
    canonical_filename string noThe canonical filename of the request
    content_encoding string noThe content encoding of the current request
    content_type string yesThe content type of the current request, as determined in the + type_check phase (f.x. image/gif or text/html)
    context_prefixstringno
    context_document_rootstringno
    document_root string noThe document root of the host
    err_headers_out table noMIME header environment for the response, printed even on errors and + persist across internal redirects
    filename string yesThe file name that the request maps to, f.x. /www/example.com/foo.txt. This can be + changed in the translate-name or map-to-storage phases of a request to allow the + default handler (or script handlers) to serve a different file than what was requested.
    handler string yesThe name of the handler that should serve this request, f.x. + lua-script if it is to be served by mod_lua. This is typically set by the + AddHandler or SetHandler + directives, but could also be set via mod_lua to allow another handler to serve up a specific request + that would otherwise not be served by it. +
    headers_in table yesMIME header environment from the request. This contains headers such as Host, + User-Agent, Referer and so on.
    headers_out table yesMIME header environment for the response.
    hostname string noThe host name, as set by the Host: header or by a full URI.
    is_httpsbooleannoWhether or not this request is done via HTTPS
    is_initial_reqbooleannoWhether this request is the initial request or a sub-request
    limit_req_bodynumbernoThe size limit of the request body for this request, or 0 if no limit.
    log_idstringnoThe ID to identify request in access and error log.
    method string noThe request method, f.x. GET or POST.
    notes table yesA list of notes that can be passed on from one module to another.
    optionsstringnoThe Options directive applied to the current request.
    path_info string noThe PATH_INFO extracted from this request.
    portnumbernoThe server port used by the request.
    protocol string noThe protocol used, f.x. HTTP/1.1
    proxyreq string yesDenotes whether this is a proxy request or not. This value is generally set in + the post_read_request/translate_name phase of a request.
    range string noThe contents of the Range: header.
    remainingnumbernoThe number of bytes remaining to be read from the request body.
    server_builtstringnoThe time the server executable was built.
    server_namestringnoThe server name for this request.
    some_auth_requiredbooleannoWhether some authorization is/was required for this request.
    subprocess_env table yesThe environment variables set for this request.
    startednumbernoThe time the server was (re)started, in seconds since the epoch (Jan 1st, 1970)
    status number yesThe (current) HTTP return code for this request, f.x. 200 or 404.
    the_request string noThe request string as sent by the client, f.x. GET /foo/bar HTTP/1.1.
    unparsed_uri string noThe unparsed URI of the request
    uri string yesThe URI after it has been parsed by httpd
    user string yesIf an authentication check has been made, this is set to the name of the authenticated user.
    useragent_ipstringnoThe IP of the user agent making the request
    +
    + +
    +
    Built in functions -

    The request_rec has (at least) the following methods:

    +

    The request_rec object has (at least) the following methods:

    - - r:addoutputfilter(name|function) -- add an output filter - + +r:flush() -- flushes the output buffer. + -- Returns true if the flush was successful, false otherwise. - - r:parseargs() -- returns a lua table containing the request's - query string arguments - +while we_have_stuff_to_send do + r:puts("Bla bla bla\n") -- print something to client + r:flush() -- flush the buffer (send to client) + r.usleep(500000) -- fake processing time for 0.5 sec. and repeat +end + - - r:parsebody() -- parse the request body as a POST and return - a lua table - + +r:addoutputfilter(name|function) -- add an output filter: - - r:puts("hello", " world", "!") -- print to response body - +r:addoutputfilter("fooFilter") -- add the fooFilter to the output stream + - - r:write("a single string") -- print to response body - - - + +r:sendfile(filename) -- sends an entire file to the client, using sendfile if supported by the current platform: + +if use_sendfile_thing then + r:sendfile("/var/www/large_file.img") +end + + + +r:parseargs() -- returns two tables; one standard key/value table for regular GET data, + -- and one for multi-value data (fx. foo=1&foo=2&foo=3): + +local GET, GETMULTI = r:parseargs() +r:puts("Your name is: " .. GET['name'] or "Unknown") + + + +r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables, + -- just like r:parseargs(). + -- An optional number may be passed to specify the maximum number + -- of bytes to parse. Default is 8192 bytes: + +local POST, POSTMULTI = r:parsebody(1024*1024) +r:puts("Your name is: " .. POST['name'] or "Unknown") + + + +r:puts("hello", " world", "!") -- print to response body, self explanatory + + + +r:write("a single string") -- print to response body, self explanatory + + + +r:escape_html("<html>test</html>") -- Escapes HTML code and returns the escaped result + + + +r:base64_encode(string) -- Encodes a string using the Base64 encoding standard: + +local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q= + + + +r:base64_decode(string) -- Decodes a Base64-encoded string: + +local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test' + + + +r:md5(string) -- Calculates and returns the MD5 digest of a string (binary safe): + +local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339 + + + +r:sha1(string) -- Calculates and returns the SHA1 digest of a string (binary safe): + +local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19 + + + +r:escape(string) -- URL-Escapes a string: + +local url = "http://foo.bar/1 2 3 & 4 + 5" +local escaped = r:escape(url) -- returns 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5' + + + +r:unescape(string) -- Unescapes an URL-escaped string: + +local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5" +local unescaped = r:unescape(url) -- returns 'http://foo.bar/1 2 3 & 4 + 5' + + + +r:construct_url(string) -- Constructs an URL from an URI + +local url = r:construct_url(r.uri) + + + +r.mpm_query(number) -- Queries the server for MPM information using ap_mpm_query: + +local mpm = r.mpm_query(14) +if mpm == 1 then + r:puts("This server uses the Event MPM") +end + + + +r:expr(string) -- Evaluates an expr string. + +if r:expr("%{HTTP_HOST} =~ /^www/") then + r:puts("This host name starts with www") +end + + + +r:scoreboard_process(a) -- Queries the server for information about the process at position a: + +local process = r:scoreboard_process(1) +r:puts("Server 1 has PID " .. process.pid) + + + +r:scoreboard_worker(a, b) -- Queries for information about the worker thread, b, in process a: + +local thread = r:scoreboard_worker(1, 1) +r:puts("Server 1's thread 1 has thread ID " .. thread.tid .. " and is in " .. thread.status .. " status") + + + + +r:clock() -- Returns the current time with microsecond precision + + + +r:requestbody(filename) -- Reads and returns the request body of a request. + -- If 'filename' is specified, it instead saves the + -- contents to that file: + +local input = r:requestbody() +r:puts("You sent the following request body to me:\n") +r:puts(input) + + + +r:add_input_filter(filter_name) -- Adds 'filter_name' as an input filter + + + +r.module_info(module_name) -- Queries the server for information about a module + +local mod = r.module_info("mod_lua.c") +if mod then + for k, v in pairs(mod.commands) do + r:puts( ("%s: %s\n"):format(k,v)) -- print out all directives accepted by this module + end +end + + + +r:loaded_modules() -- Returns a list of modules loaded by httpd: + +for k, module in pairs(r:loaded_modules()) do + r:puts("I have loaded module " .. module .. "\n") +end + + + +r:runtime_dir_relative(filename) -- Compute the name of a run-time file (e.g., shared memory "file") + -- relative to the appropriate run-time directory. + + + +r:server_info() -- Returns a table containing server information, such as + -- the name of the httpd executable file, mpm used etc. + + + +r:set_document_root(file_path) -- Sets the document root for the request to file_path + + + + + +r:set_context_info(prefix, docroot) -- Sets the context prefix and context document root for a request + + + +r:os_escape_path(file_path) -- Converts an OS path to a URL in an OS dependent way + + + +r:escape_logitem(string) -- Escapes a string for logging + + + +r.strcmp_match(string, pattern) -- Checks if 'string' matches 'pattern' using strcmp_match (globs). + -- fx. whether 'www.example.com' matches '*.example.com': + +local match = r.strcmp_match("foobar.com", "foo*.com") +if match then + r:puts("foobar.com matches foo*.com") +end + + + +r:set_keepalive() -- Sets the keepalive status for a request. Returns true if possible, false otherwise. + + + +r:make_etag() -- Constructs and returns the etag for the current request. + + + +r:send_interim_response(clear) -- Sends an interim (1xx) response to the client. + -- if 'clear' is true, available headers will be sent and cleared. + + + +r:custom_response(status_code, string) -- Construct and set a custom response for a given status code. + -- This works much like the ErrorDocument directive: + +r:custom_response(404, "Baleted!") + + + +r.exists_config_define(string) -- Checks whether a configuration definition exists or not: + +if r.exists_config_define("FOO") then + r:puts("httpd was probably run with -DFOO, or it was defined in the configuration") +end + + + +r:state_query(string) -- Queries the server for state information + + + +r:stat(filename [,wanted]) -- Runs stat() on a file, and returns a table with file information: + +local info = r:stat("/var/www/foo.txt") +if info then + r:puts("This file exists and was last modified at: " .. info.modified) +end + + + +r:regex(string, pattern [,flags]) -- Runs a regular expression match on a string, returning captures if matched: + +local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]]) +if matches then + r:puts("The regex matched, and the last word captured ($2) was: " .. matches[2]) +end + +-- Example ignoring case sensitivity: +local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1) + +-- Flags can be a bitwise combination of: +-- 0x01: Ignore case +-- 0x02: Multiline search + + + +r.usleep(number_of_microseconds) -- Puts the script to sleep for a given number of microseconds. + + + +r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and returns a database class. + -- See 'Database connectivity' for details. + + + +r:ivm_set("key", value) -- Set an Inter-VM variable to hold a specific value. + -- These values persist even though the VM is gone or not being used, + -- and so should only be used if MaxConnectionsPerChild is > 0 + -- Values can be numbers, strings and booleans, and are stored on a + -- per process basis (so they won't do much good with a prefork mpm) + +r:ivm_get("key") -- Fetches a variable set by ivm_set. Returns the contents of the variable + -- if it exists or nil if no such variable exists. + +-- An example getter/setter that saves a global variable outside the VM: +function handle(r) + -- First VM to call this will get no value, and will have to create it + local foo = r:ivm_get("cached_data") + if not foo then + foo = do_some_calcs() -- fake some return value + r:ivm_set("cached_data", foo) -- set it globally + end + r:puts("Cached data is: ", foo) +end + + + +r:htpassword(string [,algorithm [,cost]]) -- Creates a password hash from a string. + -- algorithm: 0 = APMD5 (default), 1 = SHA, 2 = BCRYPT, 3 = CRYPT. + -- cost: only valid with BCRYPT algorithm (default = 5). + + + +r:mkdir(dir [,mode]) -- Creates a directory and sets mode to optional mode paramter. + + + +r:mkrdir(dir [,mode]) -- Creates directories recursive and sets mode to optional mode paramter. + + + +r:rmdir(dir) -- Removes a directory. + + + +r:touch(file [,mtime]) -- Sets the file modification time to current time or to optional mtime msec value. + + + +r:get_direntries(dir) -- Returns a table with all directory entries. + +function handle(r) + local dir = r.context_document_root + for _, f in ipairs(r:get_direntries(dir)) do + local info = r:stat(dir .. "/" .. f) + if info then + local mtime = os.date(fmt, info.mtime / 1000000) + local ftype = (info.filetype == 2) and "[dir] " or "[file]" + r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) ) + end + end +end + + + +r.date_parse_rfc(string) -- Parses a date/time string and returns seconds since epoche. + + + +r:getcookie(key) -- Gets a HTTP cookie + + + +r:setcookie{ + key = [key], + value = [value], + expires = [expiry], + secure = [boolean], + httponly = [boolean], + path = [path], + domain = [domain] +} -- Sets a HTTP cookie, for instance: + +r:setcookie{ + key = "cookie1", + value = "HDHfa9eyffh396rt", + expires = os.time() + 86400, + secure = true +} + + + +r:wsupgrade() -- Upgrades a connection to WebSockets if possible (and requested): +if r:wsupgrade() then -- if we can upgrade: + r:wswrite("Welcome to websockets!") -- write something to the client + r:wsclose() -- goodbye! +end + + + +r:wsread() -- Reads a WebSocket frame from a WebSocket upgraded connection (see above): + +local line, isFinal = r:wsread() -- isFinal denotes whether this is the final frame. + -- If it isn't, then more frames can be read +r:wswrite("You wrote: " .. line) + + + +r:wswrite(line) -- Writes a frame to a WebSocket client: +r:wswrite("Hello, world!") + + + +r:wsclose() -- Closes a WebSocket request and terminates it for httpd: + +if r:wsupgrade() then + r:wswrite("Write something: ") + local line = r:wsread() or "nothing" + r:wswrite("You wrote: " .. line); + r:wswrite("Goodbye!") + r:wsclose() +end +
    Logging Functions - - -- examples of logging messages
    - r:trace1("This is a trace log message") -- trace1 through trace8 can be used
    - r:debug("This is a debug log message")
    - r:info("This is an info log message")
    - r:notice("This is an notice log message")
    - r:warn("This is an warn log message")
    - r:err("This is an err log message")
    - r:alert("This is an alert log message")
    - r:crit("This is an crit log message")
    - r:emerg("This is an emerg log message")
    -
    + +-- examples of logging messages +r:trace1("This is a trace log message") -- trace1 through trace8 can be used +r:debug("This is a debug log message") +r:info("This is an info log message") +r:notice("This is a notice log message") +r:warn("This is a warn log message") +r:err("This is an err log message") +r:alert("This is an alert log message") +r:crit("This is a crit log message") +r:emerg("This is an emerg log message") +
    @@ -387,10 +1063,216 @@ end
    HTTP status code
    apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE
    internal constants used by mod_proxy
    +
    apache2.AUTHZ_DENIED, apache2.AUTHZ_GRANTED, apache2.AUTHZ_NEUTRAL, apache2.AUTHZ_GENERAL_ERROR, apache2.AUTHZ_DENIED_NO_USER
    +
    internal constants used by mod_authz_core
    +

    (Other HTTP status codes are not yet implemented.)

    +
    + Modifying contents with Lua filters +

    + Filter functions implemented via LuaInputFilter + or LuaOutputFilter are designed as + three-stage non-blocking functions using coroutines to suspend and resume a + function as buckets are sent down the filter chain. The core structure of + such a function is: +

    + +function filter(r) + -- Our first yield is to signal that we are ready to receive buckets. + -- Before this yield, we can set up our environment, check for conditions, + -- and, if we deem it necessary, decline filtering a request alltogether: + if something_bad then + return -- This would skip this filter. + end + -- Regardless of whether we have data to prepend, a yield MUST be called here. + -- Note that only output filters can prepend data. Input filters must use the + -- final stage to append data to the content. + coroutine.yield([optional header to be prepended to the content]) + + -- After we have yielded, buckets will be sent to us, one by one, and we can + -- do whatever we want with them and then pass on the result. + -- Buckets are stored in the global variable 'bucket', so we create a loop + -- that checks if 'bucket' is not nil: + while bucket ~= nil do + local output = mangle(bucket) -- Do some stuff to the content + coroutine.yield(output) -- Return our new content to the filter chain + end + + -- Once the buckets are gone, 'bucket' is set to nil, which will exit the + -- loop and land us here. Anything extra we want to append to the content + -- can be done by doing a final yield here. Both input and output filters + -- can append data to the content in this phase. + coroutine.yield([optional footer to be appended to the content]) +end + +
    + +
    + Database connectivity +

    + Mod_lua implements a simple database feature for querying and running commands + on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle) + as well as mod_dbd. +

    +

    The example below shows how to acquire a database handle and return information from a table:

    + +function handle(r) + -- Acquire a database handle + local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb") + if not err then + -- Select some information from it + local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1") + if not err then + local rows = results(0) -- fetch all rows synchronously + for k, row in pairs(rows) do + r:puts( string.format("Name: %s, Age: %s<br/>", row[1], row[2]) ) + end + else + r:puts("Database query error: " .. err) + end + database:close() + else + r:puts("Could not connect to the database: " .. err) + end +end + +

    + To utilize mod_dbd, specify mod_dbd + as the database type, or leave the field blank: +

    + + local database = r:dbacquire("mod_dbd") + +
    + Database object and contained functions +

    The database object returned by dbacquire has the following methods:

    +

    Normal select and query from a database:

    + +-- Run a statement and return the number of rows affected: +local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1") + +-- Run a statement and return a result set that can be used synchronously or async: +local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1") + +

    Using prepared statements (recommended):

    + +-- Create and run a prepared statement: +local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u") +if not errmsg then + local result, errmsg = statement:query(20) -- run the statement with age > 20 +end + +-- Fetch a prepared statement from a DBDPrepareSQL directive: +local statement, errmsg = database:prepared(r, "someTag") +if not errmsg then + local result, errmsg = statement:select("John Doe", 123) -- inject the values "John Doe" and 123 into the statement +end + + +

    Escaping values, closing databases etc:

    + +-- Escape a value for use in a statement: +local escaped = database:escape(r, [["'|blabla]]) + +-- Close a database connection and free up handles: +database:close() + +-- Check whether a database connection is up and running: +local connected = database:active() + +
    +
    + Working with result sets +

    The result set returned by db:select or by the prepared statement functions + created through db:prepare can be used to + fetch rows synchronously or asynchronously, depending on the row number specified:
    + result(0) fetches all rows in a synchronous manner, returning a table of rows.
    + result(-1) fetches the next available row in the set, asynchronously.
    + result(N) fetches row number N, asynchronously: +

    + +-- fetch a result set using a regular query: +local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1") + +local rows = result(0) -- Fetch ALL rows synchronously +local row = result(-1) -- Fetch the next available row, asynchronously +local row = result(1234) -- Fetch row number 1234, asynchronously +local row = result(-1, true) -- Fetch the next available row, using row names as key indexes. + +

    One can construct a function that returns an iterative function to iterate over all rows + in a synchronous or asynchronous way, depending on the async argument: +

    + +function rows(resultset, async) + local a = 0 + local function getnext() + a = a + 1 + local row = resultset(-1) + return row and a or nil, row + end + if not async then + return pairs(resultset(0)) + else + return getnext, self + end +end + +local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` > %u") +if not err then + -- fetch rows asynchronously: + local result, err = statement:select(20) + if not err then + for index, row in rows(result, true) do + .... + end + end + + -- fetch rows synchronously: + local result, err = statement:select(20) + if not err then + for index, row in rows(result, false) do + .... + end + end +end + +
    +
    + Closing a database connection + +

    Database handles should be closed using database:close() when they are no longer + needed. If you do not close them manually, they will eventually be garbage collected and + closed by mod_lua, but you may end up having too many unused connections to the database + if you leave the closing up to mod_lua. Essentially, the following two measures are + the same: +

    + +-- Method 1: Manually close a handle +local database = r:dbacquire("mod_dbd") +database:close() -- All done + +-- Method 2: Letting the garbage collector close it +local database = r:dbacquire("mod_dbd") +database = nil -- throw away the reference +collectgarbage() -- close the handle via GC + +
    +
    + Precautions when working with databases +

    Although the standard query and run functions are freely + available, it is recommended that you use prepared statements whenever possible, to + both optimize performance (if your db handle lives on for a long time) and to minimize + the risk of SQL injection attacks. run and query should only + be used when there are no variables inserted into a statement (a static statement). + When using dynamic statements, use db:prepare or db:prepared. +

    +
    + +
    + LuaRoot Specify the base path for resolving relative paths for mod_lua directives @@ -410,8 +1292,8 @@ end LuaScope -One of once, request, conn, server -- default is once -LuaScope once|request|conn|server [max|min max] +One of once, request, conn, thread -- default is once +LuaScope once|request|conn|thread|server [min] [max] LuaScope once server configvirtual host directory.htaccess @@ -419,7 +1301,7 @@ end All -

    Specify the lifecycle scope of the Lua interpreter which will +

    Specify the life cycle scope of the Lua interpreter which will be used by handlers in this "Directory." The default is "once"

    @@ -431,13 +1313,29 @@ end
    conn:
    Same as request but attached to the connection_rec
    +
    thread:
    Use the interpreter for the lifetime of the thread + handling the request (only available with threaded MPMs).
    +
    server:
    This one is different than others because the server scope is quite long lived, and multiple threads - will have the same server_rec. To accommodate this - server scoped interpreter are stored in an apr - resource list. The min and max arguments are intended - to specify the pool size, but are unused at this time.
    + will have the same server_rec. To accommodate this, + server scoped Lua states are stored in an apr + resource list. The min and max arguments + specify the minimum and maximum number of Lua states to keep in the + pool.
    +

    + Generally speaking, the thread and server scopes + execute roughly 2-3 times faster than the rest, because they don't have to + spawn new Lua states on every request (especially with the event MPM, as + even keepalive requests will use a new thread for each request). If you are + satisfied that your scripts will not have problems reusing a state, then + the thread or server scopes should be used for + maximum performance. While the thread scope will provide the + fastest responses, the server scope will use less memory, as + states are pooled, allowing f.x. 1000 threads to share only 100 Lua states, + thus using only 10% of the memory required by the thread scope. +

    @@ -453,20 +1351,22 @@ end

    This directive matches a uri pattern to invoke a specific handler function in a specific file. It uses PCRE regular expressions to match the uri, and supports interpolating - match groups into both the file path and the function name - be careful writing your regular expressions to avoid security + match groups into both the file path and the function name. + Be careful writing your regular expressions to avoid security issues.

    Examples: - LuaMapHandler /(\w+)/(/w+) /scripts/$1.lua handle_$2 + + LuaMapHandler "/(\w+)/(\w+)" "/scripts/$1.lua" "handle_$2" +

    This would match uri's such as /photos/show?id=9 to the file /scripts/photos.lua and invoke the handler function handle_show on the lua vm after loading that file.

    - - LuaMapHandler /bingo /scripts/wombat.lua - + + LuaMapHandler "/bingo" "/scripts/wombat.lua" +

    This would invoke the "handle" function, which is the default if no specific function name is provided.

    @@ -486,8 +1386,10 @@ end lua vms.

    Examples: - LuaPackagePath /scripts/lib/?.lua
    - LuaPackagePath /scripts/lib/?/init.lua + +LuaPackagePath "/scripts/lib/?.lua" +LuaPackagePath "/scripts/lib/?/init.lua" +
    @@ -514,7 +1416,8 @@ end Configure the compiled code cache. LuaCodeCache stat|forever|never LuaCodeCache stat -server configvirtual host + +server configvirtual host directory.htaccess All @@ -532,9 +1435,11 @@ end for development.

    Examples: - LuaCodeCache stat
    - LuaCodeCache forever
    - LuaCodeCache never
    + +LuaCodeCache stat +LuaCodeCache forever +LuaCodeCache never +
    @@ -545,7 +1450,6 @@ end Provide a hook for the translate name phase of request processing LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late] server configvirtual host -directory All The optional third argument is supported in 2.3.15 and later @@ -566,10 +1470,12 @@ end

    Example:

    -
    +
     # httpd.conf
    -LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper
    +LuaHookTranslateName "/scripts/conf/hooks.lua" silly_mapper
    +
     
    +
     -- /scripts/conf/hooks.lua --
     require "apache2"
     function silly_mapper(r)
    @@ -580,7 +1486,7 @@ function silly_mapper(r)
             return apache2.DECLINED
         end
     end
    -
    + Context

    This directive is not valid in Directory, LuaHookFixups -Provide a hook for the fixups phase of request +Provide a hook for the fixups phase of a request processing LuaHookFixups /path/to/lua/script.lua hook_function_name server configvirtual host @@ -609,6 +1515,55 @@ processing + +LuaHookLog +Provide a hook for the access log phase of a request +processing +LuaHookLog /path/to/lua/script.lua log_function_name +server configvirtual host +directory.htaccess + +All + +

    + This simple logging hook allows you to run a function when httpd enters the + logging phase of a request. With it, you can append data to your own logs, + manipulate data before the regular log is written, or prevent a log entry + from being created. To prevent the usual logging from happening, simply return + apache2.DONE in your logging handler, otherwise return + apache2.OK to tell httpd to log as normal. +

    +

    Example:

    + +LuaHookLog "/path/to/script.lua" logger + + +-- /path/to/script.lua -- +function logger(r) + -- flip a coin: + -- If 1, then we write to our own Lua log and tell httpd not to log + -- in the main log. + -- If 2, then we just sanitize the output a bit and tell httpd to + -- log the sanitized bits. + + if math.random(1,2) == 1 then + -- Log stuff ourselves and don't log in the regular log + local f = io.open("/foo/secret.log", "a") + if f then + f:write("Something secret happened at " .. r.uri .. "\n") + f:close() + end + return apache2.DONE -- Tell httpd not to use the regular logging functions + else + r.uri = r.uri:gsub("somesecretstuff", "") -- sanitize the URI + return apache2.OK -- tell httpd to log it. + end +end + + + + + LuaHookMapToStorage Provide a hook for the map_to_storage phase of request processing @@ -617,7 +1572,46 @@ processing directory.htaccess
    All -

    ...

    + +

    Like LuaHookTranslateName but executed at the + map-to-storage phase of a request. Modules like mod_cache run at this phase, + which makes for an interesting example on what to do here:

    + + LuaHookMapToStorage "/path/to/lua/script.lua" check_cache + + +require"apache2" +cached_files = {} + +function read_file(filename) + local input = io.open(filename, "r") + if input then + local data = input:read("*a") + cached_files[filename] = data + file = cached_files[filename] + input:close() + end + return cached_files[filename] +end + +function check_cache(r) + if r.filename:match("%.png$") then -- Only match PNG files + local file = cached_files[r.filename] -- Check cache entries + if not file then + file = read_file(r.filename) -- Read file into cache + end + if file then -- If file exists, write it out + r.status = 200 + r:write(file) + r:info(("Sent %s to client from cache"):format(r.filename)) + return apache2.DONE -- skip default handler for PNG files + end + end + return apache2.DECLINED -- If we had nothing to do, let others serve this. +end + + +
    @@ -643,7 +1637,27 @@ processing directory.htaccess All -

    ...

    +

    + This directive provides a hook for the type_checker phase of the request processing. + This phase is where requests are assigned a content type and a handler, and thus can + be used to modify the type and handler based on input: +

    + + LuaHookTypeChecker "/path/to/lua/script.lua" type_checker + + + function type_checker(r) + if r.uri:match("%.to_gif$") then -- match foo.png.to_gif + r.content_type = "image/gif" -- assign it the image/gif type + r.handler = "gifWizard" -- tell the gifWizard module to handle this + r.filename = r.uri:gsub("%.to_gif$", "") -- fix the filename requested + return apache2.OK + end + + return apache2.DECLINED + end + +
    @@ -660,7 +1674,7 @@ processing a request. This can be used to implement arbitrary authentication and authorization checking. A very simple example:

    -
    +
     require 'apache2'
     
     -- fake authcheck hook
    @@ -691,7 +1705,7 @@ function authcheck_hook(r)
        end
        return apache2.OK
     end
    -
    + Ordering

    The optional arguments "early" or "late" control when this script runs relative to other modules.

    @@ -725,15 +1739,43 @@ hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.

    Not Yet Implemented

    + +LuaInherit +Controls how parent configuration sections are merged into children +LuaInherit none|parent-first|parent-last +LuaInherit parent-first +server configvirtual host +directory.htaccess + +All +2.4.0 and later +

    By default, if LuaHook* directives are used in overlapping + Directory or Location configuration sections, the scripts defined in the + more specific section are run after those defined in the more + generic section (LuaInherit parent-first). You can reverse this order, or + make the parent context not apply at all.

    + +

    In previous 2.3.x releases, the default was effectively to ignore LuaHook* + directives from parent configuration sections.

    +
    + LuaQuickHandler Provide a hook for the quick handler of request processing - +LuaQuickHandler /path/to/script.lua hook_function_name server configvirtual host -directory.htaccess All -

    ...

    + +

    + This phase is run immediately after the request has been mapped to a virtal host, + and can be used to either do some request processing before the other phases kick + in, or to serve a request without the need to translate, map to storage et cetera. + As this phase is run before anything else, directives such as Location or Directory are void in this phase, just as + URIs have not been properly parsed yet. +

    Context

    This directive is not valid in Directory, Files, or htaccess @@ -741,4 +1783,159 @@ hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN.

    + +LuaAuthzProvider +Plug an authorization provider function into mod_authz_core + +LuaAuthzProvider provider_name /path/to/lua/script.lua function_name +server config +2.4.3 and later + + +

    After a lua function has been registered as authorization provider, it can be used +with the Require directive:

    + + +LuaRoot "/usr/local/apache2/lua" +LuaAuthzProvider foo authz.lua authz_check_foo +<Location "/"> + Require foo johndoe +</Location> + + +require "apache2" +function authz_check_foo(r, who) + if r.user ~= who then return apache2.AUTHZ_DENIED + return apache2.AUTHZ_GRANTED +end + + + +
    +
    + + + +LuaInputFilter +Provide a Lua function for content input filtering +LuaInputFilter filter_name /path/to/lua/script.lua function_name +server config +2.4.5 and later + + +

    Provides a means of adding a Lua function as an input filter. +As with output filters, input filters work as coroutines, +first yielding before buffers are sent, then yielding whenever +a bucket needs to be passed down the chain, and finally (optionally) +yielding anything that needs to be appended to the input data. The +global variable bucket holds the buckets as they are passed +onto the Lua script: +

    + + +LuaInputFilter myInputFilter "/www/filter.lua" input_filter +<Files "*.lua"> + SetInputFilter myInputFilter +</Files> + + +--[[ + Example input filter that converts all POST data to uppercase. +]]-- +function input_filter(r) + print("luaInputFilter called") -- debug print + coroutine.yield() -- Yield and wait for buckets + while bucket do -- For each bucket, do... + local output = string.upper(bucket) -- Convert all POST data to uppercase + coroutine.yield(output) -- Send converted data down the chain + end + -- No more buckets available. + coroutine.yield("&filterSignature=1234") -- Append signature at the end +end + +

    +The input filter supports denying/skipping a filter if it is deemed unwanted: +

    + +function input_filter(r) + if not good then + return -- Simply deny filtering, passing on the original content instead + end + coroutine.yield() -- wait for buckets + ... -- insert filter stuff here +end + +

    +See "Modifying contents with Lua +filters" for more information. +

    +
    +
    + + +LuaOutputFilter +Provide a Lua function for content output filtering +LuaOutputFilter filter_name /path/to/lua/script.lua function_name +server config +2.4.5 and later + + +

    Provides a means of adding a Lua function as an output filter. +As with input filters, output filters work as coroutines, +first yielding before buffers are sent, then yielding whenever +a bucket needs to be passed down the chain, and finally (optionally) +yielding anything that needs to be appended to the input data. The +global variable bucket holds the buckets as they are passed +onto the Lua script: +

    + + +LuaOutputFilter myOutputFilter "/www/filter.lua" output_filter +<Files "*.lua"> + SetOutputFilter myOutputFilter +</Files> + + +--[[ + Example output filter that escapes all HTML entities in the output +]]-- +function output_filter(r) + coroutine.yield("(Handled by myOutputFilter)<br/>\n") -- Prepend some data to the output, + -- yield and wait for buckets. + while bucket do -- For each bucket, do... + local output = r:escape_html(bucket) -- Escape all output + coroutine.yield(output) -- Send converted data down the chain + end + -- No more buckets available. +end + +

    +As with the input filter, the output filter supports denying/skipping a filter +if it is deemed unwanted: +

    + +function output_filter(r) + if not r.content_type:match("text/html") then + return -- Simply deny filtering, passing on the original content instead + end + coroutine.yield() -- wait for buckets + ... -- insert filter stuff here +end + +Lua filters with <module>mod_filter</module> +

    When a Lua filter is used as the underlying provider via the +FilterProvider directive, filtering +will only work when the filter-name is identical to the provider-name. +

    + +

    +See "Modifying contents with Lua filters" for more +information. +

    + +
    +
    + + + diff --git a/docs/manual/mod/mod_lua.xml.fr b/docs/manual/mod/mod_lua.xml.fr new file mode 100644 index 00000000000..24b9db72704 --- /dev/null +++ b/docs/manual/mod/mod_lua.xml.fr @@ -0,0 +1,2092 @@ + + + + + + + + + + + +mod_lua + +Fournit des points d'entrée Lua dans différentes parties du +traitement des requêtes httpd +Experimental +mod_lua.c +lua_module +versions 2.3 et supérieures + + +

    Ce module permet d'ajouter au serveur des extensions sous forme de +scripts écrits dans le langage de programmation Lua. +mod_lua fournit de nombreuses extensions +(hooks) disponibles avec les modules natifs du serveur HTTP Apache, +comme les associations de requêtes à des fichiers, la génération de +réponses dynamiques, le contrôle d'accès, l'authentification et +l'autorisation.

    + +

    Vous trouverez davantage d'informations à propos du langage de +programmation Lua sur le site web de +Lua.

    + +mod_lua est encore au stade expérimental. Son mode +d'utilisation et son comportement pourront changer à tout moment jusqu'à +ce qu'il passe au stade stable, et ce même entre deux versions stables +2.4.x. N'oublez pas de consulter le fichier CHANGES avant toute mise à +jour. + +Avertissement +

    Ce module possède une grande capacité d'action sur le fonctrionnement +de httpd, ce qui lui confère une grande puissance, mais peut aussi +induire un risque de sécurité. Il est déconseillé d'utiliser ce module +sur un serveur partagé avec des utilisateurs auxquels vous ne pouvez pas +accorder une confiance absolue, car il peut permettre de modifier le +fonctionnement interne de httpd.

    +
    + +
    + +
    Configuration de base + +

    La directive de base pour le chargement du module est

    + + + LoadModule lua_module modules/mod_lua.so + + +

    +mod_lua fournit un gestionnaire nommé +lua-script qui peut être utilisé avec une directive +AddHandler ou SetHandler :

    + + +<Files "*.lua"> + SetHandler lua-script +</Files> + + +

    +Ceci aura pour effet de faire traiter les requêtes pour les fichiers +dont l'extension est .lua par mod_lua en +invoquant cette fonction de gestion de fichier. +

    + +

    Pour plus de détails, voir la directive +LuaMapHandler. +

    +
    + +
    Ecrire des gestionnaires +

    Dans l'API du serveur HTTP Apache, un gestionnaire est une sorte de +point d'accroche (hook) spécifique responsable de la génération de la +réponse. mod_proxy, mod_cgi et +mod_status sont des exemples de modules comportant un +gestionnaire.

    + +

    mod_lua cherche toujours à invoquer une fonction Lua pour le +gestionnaire, plutôt que de simplement évaluer le corps d'un script dans +le style de CGI. Une fonction de gestionnaire se présente comme suit :

    + + + +example.lua
    +-- exemple de gestionnaire + +require "string" + +--[[ + Il s'agit du nom de méthode par défaut pour les gestionnaires Lua ; + voir les noms de fonctions optionnels dans la directive + LuaMapHandler pour choisir un point d'entrée différent. +--]] +function handle(r) + r.content_type = "text/plain" + + if r.method == 'GET' then + r:puts("Hello Lua World!\n") + for k, v in pairs( r:parseargs() ) do + r:puts( string.format("%s: %s\n", k, v) ) + end + elseif r.method == 'POST' then + r:puts("Hello Lua World!\n") + for k, v in pairs( r:parsebody() ) do + r:puts( string.format("%s: %s\n", k, v) ) + end + else + elseif r.method == 'PUT' then +-- message d'erreur personnalisé + r:puts("Unsupported HTTP method " .. r.method) + r.status = 405 + return apache2.OK + else +-- message d'erreur ErrorDocument + return 501 + end + return apache2.OK +end +
    + +

    +Ce gestionnaire se contente d'afficher les arguments codés d'un uri ou +d'un formulaire dans un page au format texte. +

    + +

    +Cela signifie que vous pouvez (et êtes encouragé à) avoir plusieurs +gestionnaires (ou points d'entrée, ou filtres) dans le même script. +

    + +
    +
    +Ecriture de fournisseurs d'autorisation + +

    mod_authz_core fournit une interface d'autorisation +de haut niveau bien plus facile à utiliser que dans les hooks +correspondants. Le premier argument de la directive Require permet de spécifier le +fournisseur d'autorisation à utiliser. Pour chaque directive Require, +mod_authz_core appellera le fournisseur d'autorisation +spécifié, le reste de la ligne constituant les paramètres. Le +fournisseur considéré va alors vérifier les autorisations et fournir le +résultat dans une valeur de retour.

    + +

    En général, le fournisseur authz est appelé avant l'authentification. +S'il doit connaître le nom d'utilisateur authentifié (ou si +l'utilisateur est appelé à être authentifié), le fournisseur doit +renvoyer apache2.AUTHZ_DENIED_NO_USER, ce qui va +déclancher le processus d'authentification et un deuxième appel du +fournisseur authz.

    + +

    La fonction du fournisseur authz ci-dessous accepte deux arguments, +une adresse IP et un nom d'utilisateur. Elle autorise l'accès dans le +cas où la requête provient de l'adresse IP spécifiée, ou si +l'utilisateur authentifié correspond au second argument :

    + + +authz_provider.lua
    + +require 'apache2' + +function authz_check_foo(r, ip, user) + if r.useragent_ip == ip then + return apache2.AUTHZ_GRANTED + elseif r.user == nil then + return apache2.AUTHZ_DENIED_NO_USER + elseif r.user == user then + return apache2.AUTHZ_GRANTED + else + return apache2.AUTHZ_DENIED + end +end +
    + +

    La configuration suivante enregistre cette fonction en tant que +fournisseur foo, et la configure por l'URL / :

    + +LuaAuthzProvider foo authz_provider.lua authz_check_foo +<Location "/"> + Require foo 10.1.2.3 john_doe +</Location> + + +
    + +
    Ecriture de fonctions d'accroche +(hooks) + +

    Les fonctions d'accroche déterminent la manière dont les modules (et +les scripts Lua) participent au traitement des requêtes. Chaque type +d'accroche proposé par le serveur a un rôle spécifique, comme +l'association de requêtes au système de fichiers, le contrôle d'accès, +ou la définition de types MIME :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Phase d'accrocheDirective mod_luaDescription
    Gestionnaire rapideLuaQuickHandlerIl s'agit de la première accroche appelée lorsqu'une requête + a été associée à un serveur ou un serveur virtuel.
    Phase de traductionLuaHookTranslateNameCette phase traduit l'URI de la requête en nom de fichier + sur le système. Ce sont des modules comme + mod_alias et mod_rewrite qui + interviennent au cours de cette phase.
    Choix du lieu de stockage de la ressourceLuaHookMapToStorageCette phase définit le lieu de stockage de la ressource : + physique, en cache ou externe/mandaté. Elle est assurée par les + modules de mandat ou de mise en cache.
    Autorisation d'accèsLuaHookAccessCheckerCette phase vérifie si un client a l'autorisation d'accès à + la ressource. Elle s'exécute avant l'authentification de + l'utisateur ; il faut donc être prudent. +
    Vérification de l'identifiant utilisateurLuaHookCheckUserIDCette phase vérifie l'identifiant de l'utilisateur ayant + fait l'objet d'une négociation.
    Vérification de l'autorisation d'accèsLuaHookAuthChecker + ou + LuaAuthzProviderCette phase vérifie l'autorisation d'accès d'un utilisateur + en fonction des ses paramètres de connexion, comme + l'identifiant, le certificat, etc... +
    Vérification du type de la ressourceLuaHookTypeCheckerCette phase assigne un type de contenu et un gestionnaire à + la ressource.
    Derniers réglagesLuaHookFixupsC'est la dernière phase avant l'activation des gestionnaires + de contenu. Toute modification de dernière minute à la requête + doit être effectuée ici.
    Gestionnaire de contenufichiers fx. .lua ou directive LuaMapHandlerC'est durant cette phase que le contenu est traité. Les + fichiers sont lus, interprétés, certains sont exécutés, et le + résultat obtenu est envoyé au client.
    JournalisationLuaHookLogLorsqu'une requête a été traitée, plusieurs phases de + journalisation interviennent, et enregistrent leurs résultats + dans les fichiers d'erreur ou d'accès. Mod_lua peut + s'intercaler au départ de ce processus et ainsi contrôler la + journalisation.
    + +

    Les fonctions d'accroche reçoivent l'objet de la requête comme seul +argument (sauf LuaAuthzProvider qui reçoit aussi des arguments en +provenance de la directive Require). Elles peuvent renvoyer une valeur, +selon la fonction, mais il s'agit en général d'un +code d'état HTTP ou des valeurs OK, DONE, ou DECLINED, +que vous pouvez écrire dans Lua sous la forme apache2.OK, +apache2.DONE, ou apache2.DECLINED.

    + + + +translate_name.lua
    +-- exemple d'accroche qui réécrit un URI en chemin du système de fichiers. + +require 'apache2' + +function translate_name(r) + if r.uri == "/translate-name" then + r.filename = r.document_root .. "/find_me.txt" + return apache2.OK + end + -- on ne gère pas cette URL et on donne sa chance à un autre module + return apache2.DECLINED +end +
    + + + +translate_name2.lua
    +--[[ exemple d'accroche qui réécrit un URI vers un autre URI. Il renvoie + un apache2.DECLINED pour permettre à un autre interpréteur d'URL de + travailler sur la substitution, y compris l'accroche translate_name + de base dont les tables de correspondances se basent sur DocumentRoot. + + Note: utilisez le drapeau early/late de la directive pour + l'exécuter avant ou après mod_alias. +--]] + +require 'apache2' + +function translate_name(r) + if r.uri == "/translate-name" then + r.uri = "/find_me.txt" + return apache2.DECLINED + end + return apache2.DECLINED +end +
    +
    + +
    Structures de données + +
    +
    request_rec
    +
    +

    request_rec est considérée en tant que donnée utilisateur. + Elle possède une métatable qui vous permet d'accomplir des + choses intéressantes. Pour la plus grande partie, elle possède + les mêmes champs que la structure request_rec, la + plupart d'entre eux étant accessibles en lecture et écriture (le + contenu des champs de la table peut être modifié, mais les + champs eux-mêmes ne peuvent pas être établis en tant que tables + distinctes).

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NomType LuaModifiableDescription
    allowoverridesstringnonL'option AllowOverride s'applique à la requête courante.
    ap_auth_typestringnonCe champ contient le type d'authentification effectuée + (par exemple basic)
    argsstringouiLa chaîne de paramètres de la requête (par exemple + foo=bar&name=johnsmith)
    assbackwardsbooleannoncontient true s'il s'agit d'une requête de style HTTP/0.9 + (par exemple GET /foo (sans champs d'en-tête) )
    auth_namestringnonLa chaîne d'identification utilisée pour la vérification + de l'autorisation d'accès (si elle est disponible).
    bannerstringnonLa bannière du serveur, par exemple Apache HTTP + Server/2.4.3 openssl/0.9.8c
    basic_auth_pwstringnonLe mot de passe pour l'authentification de base envoyé + avec la requête, s'il existe
    canonical_filenamestringnonLe nom de fichier canonique de la requête
    content_encodingstringnonLe type de codage du contenu de la requête courante
    content_typestringouiLe type de contenu de la requête courante, tel qu'il a été + déterminé au cours de la phase type_check (par exemple + image/gif ou text/html)
    context_prefixstringnon
    context_document_rootstringnon
    document_rootstringnonLa racine des documents du serveur
    err_headers_outtablenonL'en-tête MIME de l'environnement pour la réponse, écrit + même en cas d'erreur et conservé pendant les redirections + internes
    filenamestringouiLe nom de fichier correspondant à la requête, par exemple + /www/example.com/foo.txt. Il peut être modifié au cours des + phases translate-name ou map-to-storage du traitement de la + requête pour permettre au gestionnaire par défaut (ou aux + gestionnaires de script) de servir une version du fichier + autre que celle demandée.
    handlerstringouiLe nom du gestionnaire qui + doit traiter la requête, par exemple lua-script + si elle doit être traitée par mod_lua. Cette valeur est en + général définie via les directives AddHandler ou SetHandler, mais peut aussi l'être + via mod_lua pour permettre à un autre gestionnaire de traiter + une requête spécifique qui ne serait pas traitée par défaut + par ce dernier. +
    headers_intableouiLes en-têtes MIME de l'environnement de la requête. Il + s'agit des en-têtes comme Host, User-Agent, + Referer, etc...
    headers_outtableouiLes en-têtes MIME de l'environnement de la réponse.
    hostnamestringnonLe nom d'hôte, tel que défini par l'en-tête + Host: ou par un URI complet.
    is_httpsbooleannonIndique si la requête à été faite via HTTPS
    is_initial_reqbooleannonIndique si la requête courante est la requête initiale ou + une sous-requête.
    limit_req_bodynumbernonLa taille maximale du corps de la requête, ou 0 si aucune + limite.
    log_idstringnonL'identifiant de la requête dans les journaux d'accès ou + d'erreur.
    methodstringnonLa méthode de la requête, par exemple GET ou + POST.
    notestableouiUne liste de notes qui peuvent être transmises d'un module + à l'autre.
    optionsstringnonLa valeur de la directive Options pour la requête + courante.
    path_infostringnonLa valeur de PATH_INFO extraite de la requête.
    portnumbernonLe port du serveur utilisé par la requête.
    protocolstringnonLe protocole utilisé, par exemple HTTP/1.1
    proxyreqstringouiIndique s'il s'agit d'une requête mandatée ou non. Cette + valeur est en général définie au cours de la phase + post_read_request/translate_name du traitement de la requête.
    rangestringnonLe contenu de l'en-tête Range:.
    remainingnumbernonLe nombre d'octets du corps de la requête restant à lire.
    server_builtstringnonLa date de compilation du serveur.
    server_namestringnonLe nom du serveur pour cette requête.
    some_auth_requiredbooleannonIndique si une autorisation est/était requise pour cette + requête.
    subprocess_envtableouiLe jeu de variables d'environnement pour cette requête.
    startednumbernonLe moment où le serveur a été (re)démarré, en secondes + depuis epoch (1er janvier 1970)
    statusnumberouiLe code de retour (courant) pour cette requête, par + exemple 200 ou 404.
    the_requeststringnonLa chaîne de la requête telle qu'elle a été envoyée par le + client, par exemple GET /foo/bar HTTP/1.1.
    unparsed_uristringnonLa partie URI non interprétée de la requête
    uristringouiL'URI après interprétation par httpd
    userstringouiSi une authentification a été effectuée, nom de + l'utilisateur authentifié.
    useragent_ipstringnonL'adresse IP de l'agent qui a envoyé la requête
    +
    +
    +
    +
    Méthodes de l'objet request_rec + +

    L'objet request_rec possède (au minimum) les méthodes suivantes :

    + + +r:flush() -- vide le tampon de sortie + -- Renvoie true si le vidage a été effectué avec succès, + -- false dans le cas contraire. + +while nous_avons_des_données_à_envoyer do + r:puts("Bla bla bla\n") -- envoi des données à envoyer vers le tampon + r:flush() -- vidage du tampon (envoi au client) + r.usleep(500000) -- mise en attente pendant 0.5 secondes et bouclage +end + + + +r:addoutputfilter(name|function) -- ajoute un filtre en sortie + +r:addoutputfilter("fooFilter") -- insère le filtre fooFilter dans le flux de sortie + + + +r:sendfile(filename) -- envoie un fichier entier au client en utilisant sendfile s'il est + -- supporté par la plateforme : + +if use_sendfile_thing then + r:sendfile("/var/www/large_file.img") +end + + + +r:parseargs() -- renvoie deux tables : une table standard de couples + -- clé/valeur pour les données GET simples, + -- et une autre pour les données + -- multivaluées (par exemple foo=1&foo=2&foo=3) : + +local GET, GETMULTI = r:parseargs() +r:puts("Votre nom est : " .. GET['name'] or "Unknown") + + + + +r:parsebody()([sizeLimit]) -- interprète le corps de la + -- requête en tant que POST et renvoie + -- deux tables lua, comme r:parseargs(). Un + -- nombre optionnel peut être fourni + -- pour spécifier le nombre maximal + -- d'octets à interpréter. La + -- valeur par défaut est 8192. + +local POST, POSTMULTI = r:parsebody(1024*1024) +r:puts("Votre nom est : " .. POST['name'] or "Unknown") + + + + +r:puts("bonjour", " le monde", "!") -- affichage dans le corps de la réponse + + + +r:write("une simple chaîne") -- affichage dans le corps de la réponse + + + +r:escape_html("<html>test</html>") -- Echappe le code HTML et renvoie le résultat + + + +r:base64_encode(string) -- Encode une chaîne à l'aide du standard de codage Base64. + +local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q= + + + +r:base64_decode(string) -- Décode une chaîne codée en Base64. + +local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test' + + + +r:md5(string) -- Calcule et renvoie le condensé MD5 d'une chaîne en mode binaire (binary safe). + +local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339 + + + +r:sha1(string) -- Calcule et renvoie le condensé SHA1 d'une chaîne en mode binaire (binary safe). + +local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19 + + + +r:escape(string) -- Echappe une chaîne de type URL. + +local url = "http://foo.bar/1 2 3 & 4 + 5" +local escaped = r:escape(url) -- renvoie 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5' + + + +r:unescape(string) -- Déséchappe une chaîne de type URL. + +local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5" +local unescaped = r:unescape(url) -- renvoie 'http://foo.bar/1 2 3 & 4 + 5' + + + +r:construct_url(string) -- Construit une URL à partir d'un URI + +local url = r:construct_url(r.uri) + + + +r.mpm_query(number) -- Interroge le serveur à propos de son module MPM via la requête ap_mpm_query. + +local mpm = r.mpm_query(14) +if mpm == 1 then + r:puts("Ce serveur utilise le MPM Event") +end + + + +r:expr(string) -- Evalue une chaîne de type expr. + +if r:expr("%{HTTP_HOST} =~ /^www/") then + r:puts("Ce nom d'hôte commence par www") +end + + + +r:scoreboard_process(a) -- Interroge le serveur à propos du + -- processus à la position a. + +local process = r:scoreboard_process(1) +r:puts("Le serveur 1 a comme PID " .. process.pid) + + + +r:scoreboard_worker(a, b) -- Interroge le serveur à propos du + -- thread b, dans le processus a. + +local thread = r:scoreboard_worker(1, 1) +r:puts("L'ID du thread 1 du serveur 1 est " .. thread.tid .. " et son +état est " .. thread.status) + + + +r:clock() -- Renvoie l'heure courante avec une précision d'une microseconde. + + + +r:requestbody(filename) -- Lit et renvoie le corps d'une requête. + -- Si 'filename' est spécifié, le + -- corps de requête n'est pas + -- renvoyé, mais sauvegardé dans + -- le fichier correspondant. + +local input = r:requestbody() +r:puts("Vous m'avez envoyé le corps de requête suivant :\n") +r:puts(input) + + + +r:add_input_filter(filter_name) -- Ajoute le filtre en entrée 'filter_name'. + + + +r:module_info(module_name) -- Interroge le serveur à propos d'un module. + +local mod = r.module_info("mod_lua.c") +if mod then + for k, v in pairs(mod.commands) do + r:puts( ("%s: %s\n"):format(k,v)) -- affiche toutes les directives + -- implémentées par ce module. + end +end + + + +r:loaded_modules() -- Renvoie une liste des modules chargés par httpd. + +for k, module in pairs(r:loaded_modules()) do + r:puts("J'ai chargé le module " .. module .. "\n") +end + + + +r:runtime_dir_relative(filename) -- Génère le nom d'un fichier run-time + -- (par exemple la mémoire partagée + -- "file") relativement au répertoire de run-time. + + + +r:server_info() -- Renvoie une table contenant des informations à + -- propos du serveur, comme le nom de + -- l'exécutable httpd, le module mpm utilisé, etc... + + + +r:set_document_root(file_path) -- Définit la racine des documents + -- pour la requête à file_path. + + + +r:add_version_component(component_string) -- Ajoute un élément à + -- la bannière du serveur. + + + +r:set_context_info(prefix, docroot) -- Définit le préfixe et la + -- racine des documents du contexte pour une requête. + + + +r:os_escape_path(file_path) -- Convertit un chemin du système de + -- fichiers en URL indépendamment du système d'exploitation. + + + +r:escape_logitem(string) -- Echappe une chaîne pour journalisation. + + + +r.strcmp_match(string, pattern) -- Vérifie si 'string' correspond à + -- 'pattern' via la fonction strcmp_match (GLOBs). Par exemple, est-ce que + -- 'www.example.com' correspond à '*.example.com' ? + +local match = r.strcmp_match("foobar.com", "foo*.com") +if match then + r:puts("foobar.com matches foo*.com") +end + + + +r:set_keepalive() -- Définit l'état de persistance d'une requête. + -- Renvoie true dans la mesure du possible, false dans le cas contraire. + + + +r:make_etag() -- Génère et renvoie le etag pour la requête courante. + + + +r:send_interim_response(clear) -- Renvoie une réponse d'intérim (1xx) au + -- client. Si 'clear' est vrai, les en-têtes disponibles + -- seront envoyés et effacés. + + + +r:custom_response(status_code, string) -- Génère et définit une réponse + -- personnalisée pour un code d'état particulier. + -- Le fonctionnement est très proche de celui de la directive ErrorDocument. + +r:custom_response(404, "Baleted!") + + + +r.exists_config_define(string) -- Vérifie si une définition de configuration existe. + +if r.exists_config_define("FOO") then + r:puts("httpd a probablement été lancé avec l'option -DFOO, ou FOO a + été défini dans la configuration") +end + + + +r:state_query(string) -- Interroge le serveur à propos de son état. + + + +r:stat(filename [,wanted]) -- Exécute stat() sur un fichier, et renvoie une table contenant + -- des informations à propos de ce fichier. + +local info = r:stat("/var/www/foo.txt") +if info then + r:puts("Ce fichier existe et a été modifié pour la dernière fois à : " .. info.modified) +end + + + +r:regex(string, pattern [,flags]) -- Exécute une recherche à base d'expression rationnelle + -- sur une chaîne, et renvoie les éventuelles correspondances trouvées. + +local matches = r:regex("foo bar baz", [[foo (\w+) (\S*)]]) +if matches then + r:puts("L'expression rationnelle correspond et le dernier mot + capturé ($2) est : " .. matches[2]) +end + +-- Exemple avec insensibilité à la casse : +local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1) + +-- les drapeaux peuvent être une combibaison bit à bit de : +-- 0x01: insensibilité à la casse +-- 0x02: recherche multiligne + + + +r.usleep(microsecondes) -- Interrompt l'exécution du script pendant le nombre de microsecondes spécifié. + + + +r:dbacquire(dbType[, dbParams]) -- Acquiert une connexion à une base de données et renvoie une classe database. + -- Voir 'Connectivité aux bases de données' + -- pour plus de détails. + + + +r:ivm_set("key", value) -- Défini une variable Inter-VM avec une valeur spécifique. + -- Ces valeurs sont conservées même si la VM est + -- arrêtée ou non utilisée, et ne doivent donc être + -- utilisées que si MaxConnectionsPerChild > 0. + -- Les valeurs peuvent être de type number, string + -- ou boolean et sont stockées séparément pour + -- chaque processus (elles ne seront donc pas d'une + -- grande utilité si l'on utilise le mpm prefork). + +r:ivm_get("key") -- Lit le contenu d'une variable définie via ivm_set. Renvoie + -- le contenu de la variable si elle existe, ou nil + -- dans le cas contraire. + +-- Voici un exemple de lecture/écriture qui sauvegarde une variable +-- globale en dehors de la VM : +function handle(r) + -- La première VM qui effectue l'appel suivant n'obtiendra aucune + -- valeur, et devra la créer + local foo = r:ivm_get("cached_data") + if not foo then + foo = do_some_calcs() -- simulation de valeurs de retour + r:ivm_set("cached_data", foo) -- définition globale de la variable + end + r:puts("La donnée en cache est : ", foo) +end + + +r:htpassword(string [,algorithm [,cost]]) -- Génère un hash de mot de passe à partir d'une chaîne. + -- algorithm: 0 = APMD5 (défaut), 1 = SHA, 2 = BCRYPT, 3 = CRYPT. + -- cost: ne s'utilise qu'avec l'algorythme BCRYPT (défaut = 5). + + + +r:mkdir(dir [,mode]) -- Crée un répertoire et définit son mode via le paramètre optionnel mode. + + + +r:mkrdir(dir [,mode]) -- Crée des répertoires de manière récursive et définit + -- leur mode via le paramètre optionnel mode. + + + +r:rmdir(dir) -- Supprime un répertoire. + + + +r:touch(file [,mtime]) -- Définit la date de modification d'un fichier à la date courante ou à + -- la valeur optionnelle mtime en msec. + + + +r:get_direntries(dir) -- Renvoie une table contenant toutes les entrées de répertoires. + +-- Renvoie un chemin sous forme éclatée en chemin, fichier, extension +function handle(r) + local dir = r.context_document_root + for _, f in ipairs(r:get_direntries(dir)) do + local info = r:stat(dir .. "/" .. f) + if info then + local mtime = os.date(fmt, info.mtime / 1000000) + local ftype = (info.filetype == 2) and "[dir] " or "[file]" + r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) ) + end + end +end + + + +r.date_parse_rfc(string) -- Interprète une chaîne date/heure et renvoie l'équivalent en secondes depuis epoche. + + + +r:getcookie(key) -- Obtient un cookie HTTP + + + +r:setcookie(key, value, secure, expires) -- Définit un cookie HTTP, par exemple : +r:setcookie("foo", "bar and stuff", false, os.time() + 86400) + + + +r:wsupgrade() -- Met à jour une connexion vers les WebSockets si possible (et si demandé) : +if r:wsupgrade() then -- si la mise à jour est possible : + r:wswrite("Bienvenue dans les websockets!") -- écrit quelque chose à l'intention du client + r:wsclose() -- Au revoir ! +end + + + +r:wsread() -- Lit un cadre de websocket depuis une connexion vers websocket mise à jour (voir ci-dessus) : + +local line, isFinal = r:wsread() -- isFinal indique s'il s'agit du cadre final. + -- dans le cas contraire, on peut lire les cadres suivants +r:wswrite("Vous avez écrit : " .. line) + + + +r:wswrite(line) -- écrit un cadre vers un client WebSocket : +r:wswrite("Bonjour le Monde !") + + + +r:wsclose() -- ferme une requête WebSocket et l'achève pour httpd : + +if r:wsupgrade() then + r:wswrite("Ecrire quelque chose : ") + local line = r:wsread() or "nothing" + r:wswrite("Vous avez écrit : " .. line); + r:wswrite("Au revoir !") + r:wsclose() +end + +
    + +
    Fonctions de journalisation + + + -- exemples de messages de journalisation + r:trace1("Ceci est un message de journalisation de niveau + trace") -- les niveaux valides vont de trace1 à trace8 + r:debug("Ceci est un message de journalisation de niveau debug") + r:info("Ceci est un message de journalisation de niveau info") + r:notice("Ceci est un message de journalisation de niveau notice") + r:warn("Ceci est un message de journalisation de niveau warn") + r:err("Ceci est un message de journalisation de niveau err") + r:alert("Ceci est un message de journalisation de niveau alert") + r:crit("Ceci est un message de journalisation de niveau crit") + r:emerg("Ceci est un message de journalisation de niveau emerg") + + +
    + +
    Paquet apache2 +

    Le paquet nommé apache2 est fourni avec (au minimum) le +contenu suivant :

    +
    +
    apache2.OK
    +
    Constante interne OK. Les gestionnaires renverront cette valeur + s'ils ont traité la requête.
    +
    apache2.DECLINED
    +
    Constante interne DECLINED. Les gestionnaires renverront cette + valeur s'ils n'ont pas l'intention de traiter la requête.
    +
    apache2.DONE
    +
    Constante interne DONE.
    +
    apache2.version
    +
    Chaîne contenant la version du serveur HTTP Apache
    +
    apache2.HTTP_MOVED_TEMPORARILY
    +
    Code d'état HTTP
    +
    apache2.PROXYREQ_NONE, apache2.PROXYREQ_PROXY, apache2.PROXYREQ_REVERSE, apache2.PROXYREQ_RESPONSE
    +
    Constantes internes utilisées par mod_proxy
    +
    apache2.AUTHZ_DENIED, apache2.AUTHZ_GRANTED, apache2.AUTHZ_NEUTRAL, apache2.AUTHZ_GENERAL_ERROR, apache2.AUTHZ_DENIED_NO_USER
    +
    constantes internes utilisées par mod_authz_core
    + +
    +

    Les autres codes d'état HTTP ne sont pas encore implémentés.

    +
    + + +
    + Modification de contenu avec les filtres lua +

    + Les fonctions de filtrage implémentées via les directives LuaInputFilter ou LuaOutputFilter sont conçues comme des + fonctions de 3ème phase non blocantes utilisant des sous-routines + pour suspendre et reprendre l'exécution d'une fonction lorsque des + paquets de données sont envoyés à la chaîne de filtrage. La + structure de base d'une telle fonction est : +

    + +function filter(r) + -- Nous indiquons tout d'abord que nous sommes prêts à recevoir des + -- blocs de données. + -- Avant ceci, nous pouvons définir notre environnement, tester + -- certaines conditions, et, si nous le jugeons nécessaire, refuser le + -- filtrage d'une requête : + if something_bad then + return -- Le filtrage est sauté + end + -- Sans se préoccuper des données que nous devons éventuellement ajouter, un arrêt est réalisé ici. + -- Noter que les filtres de sortie sont les seuls capables d'ajouter des éléments au début des données. + -- Les filtres en entrée peuvent ajouter des éléments à la fin des données au stade final. + + coroutine.yield([optional header to be prepended to the content]) + + -- Après cet arrêt, nous allons recevoir d'autres blocs de données, un par un ; + -- nous pouvons les traiter comme il nous plaît et procéder à la réponse. + -- Ces blocs sont conservés dans la variable globale 'bucket', nous réalisons donc + -- une boucle pour vérifier que 'bucket' n'est pas vide : + while bucket ~= nil do + local output = mangle(bucket) -- Do some stuff to the content + coroutine.yield(output) -- Return our new content to the filter chain + end + + -- Une fois les blocs de données épuisés, 'bucket' est positionné à une valeur vide ('nil'), + -- ce qui va nous faire sortir de cette boucle et nous amener à l'étape suivante. + -- On peut ajouter ce qu'on veut à la fin des données à cette étape, qui constitue le dernier + -- arrêt. Les filtres d'entrée comme de sortie peuvent servir à ajouter des éléments à la fin + -- des données à cette étape. + coroutine.yield([optional footer to be appended to the content]) +end + +
    +
    + Connectivité aux bases de données +

    Mod_lua implémente une fonctionnalité basique de connexion aux +bases de données permettant d'envoyer des requêtes ou d'exécuter des +commandes auprès des moteurs de base de données les plus courants +(mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle), ainsi que mod_dbd. +

    +

    L'exemple suivant montre comment se connecter à une base de +données et extraire des informations d'une table :

    + +function handle(r) + -- connexion à la base de données + local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb") + if not err then + -- Sélection de certaines informations + local results, err = database:select(r, "SELECT `name`, `age` FROM `people` WHERE 1") + if not err then + local rows = results(0) -- extrait tous les enregistrements en mode synchrone + for k, row in pairs(rows) do + r:puts( string.format("Name: %s, Age: %s<br/>", row[1], row[2]) ) + end + else + r:puts("Database query error: " .. err) + end + database:close() + else + r:puts("Connexion à la base de données impossible : " .. err) + end +end + +

    + Pour utiliser mod_dbd, spécifiez +mod_dbd comme type de base de données, ou laissez le champ +vide : +

    + + local database = r:dbacquire("mod_dbd") + +
    + L'objet database et ses méthodes +

    L'objet database renvoyé par dbacquire possède +les méthodes suivantes :

    +

    Sélection normale et requête vers une base de données +:

    + +-- Exécution d'une requête et renvoie du nombre d'enregistrements +affectés : +local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1") + +-- Exécution d'une requête et renvoie du résultat qui peut être utilisé +en mode synchrone ou asynchrone : +local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1") + +

    Utilisation de requêtes préparées (recommandé) :

    + +-- Création et exécution d'une requête préparée : +local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u") +if not errmsg then + local result, errmsg = statement:query(20) -- exécute la requête pour age > 20 +end + +-- Extrait une requête préparée depuis une directive DBDPrepareSQL : +local statement, errmsg = database:prepared(r, "someTag") +if not errmsg then + local result, errmsg = statement:select("John Doe", 123) -- injecte les valeurs "John Doe" et 123 dans la requête +end + + +

    Echappement de valeurs, fermeture de la base données, +etc...

    + +-- Echappe une valeur pour pouvoir l'utiliser dans une requête : +local escaped = database:escape(r, [["'|blabla]]) + +-- Ferme une base de données et libère les liens vers cette dernière : +database:close() + +-- Vérifie si une connexion à une base de données est en service et +opérationnelle : +local connected = database:active() + +
    +
    + Travail avec les jeux d'enregistrements renvoyés par les requêtes +

    Les jeux d'enregistrements renvoyés par db:select ou par des +requêtes préparées créées par db:prepare permettent de +sélectionner des enregistrements en mode synchrone ou +asynchrone, selon le nombre d'enregistrements spécifié :
    + result(0) sélectionne tous les enregistrements en mode +synchrone en renvoyant une table d'enregistrements.
    + result(-1) sélectionne le prochain enregistrement disponible en +mode asynchrone.
    + result(N) sélectionne l'enregistrement numéro +N en mode asynchrone. +

    + +-- extrait un jeu d'enregistrements via une requête régulière : +local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1") + +local rows = result(0) -- sélectionne tous les enregistrements en mode synchrone +local row = result(-1) -- sélectionne le prochain enregistrement disponible en mode asynchrone +local row = result(1234) -- sélectionne l'enregistrement 1234 en mode asynchrone +local row = result(-1, true) -- Lit l'enregistrement suivant en utilisant les noms d'enregistrements comme index. + +

    Il est possible de construire une fonction qui renvoie une +fonction itérative permettant de traiter tous les enregistrement en mode +synchrone ou asynchrone selon la valeur de l'argument async : +

    + +function rows(resultset, async) + local a = 0 + local function getnext() + a = a + 1 + local row = resultset(-1) + return row and a or nil, row + end + if not async then + return pairs(resultset(0)) + else + return getnext, self + end +end + +local statement, err = db:prepare(r, "SELECT * FROM `tbl` WHERE `age` > %u") +if not err then + -- sélectionne des enregistrements en mode asynchrone : + local result, err = statement:select(20) + if not err then + for index, row in rows(result, true) do + .... + end + end + + -- sélectionne des enregistrements en mode synchrone : + local result, err = statement:select(20) + if not err then + for index, row in rows(result, false) do + .... + end + end +end + +
    +
    + Fermeture d'une connexion à une base de données + +

    Lorsqu'elles ne sont plus utilisées, les connexions aux bases de +données doivent être fermées avec database:close(). Si vous +ne les fermez pas manuellement, mod_lua les fermera peut-être en tant +que résidus collectés, mais si ce n'est pas le cas, vous pouvez finir +pas avoir trop de connexions vers la base de données inutilisées. Les +deux mesures suivantes sont pratiquement identiques : +

    + +-- Méthode 1 : fermeture manuelle de la connexion +local database = r:dbacquire("mod_dbd") +database:close() -- c'est tout + +-- Méthode 2 : on laisse le collecteur de résidus la fermer +local database = r:dbacquire("mod_dbd") +database = nil -- on coupe le lien +collectgarbage() -- fermeture de la connexion par le collecteur de résidus + +
    +
    + Précautions à prendre lorsque l'on travaille avec les bases +de données +

    Bien que les fonctions query et run +soient toujours disponibles, il est recommandé d'utiliser des requêtes +préparées chaque fois que possible, afin d'une part d'optimiser les +performances (si votre connexion reste longtemps en vie), et d'autre part +minimiser le risque d'attaques par injection SQL. Les fonctions +run et query ne doivent être utilisées que +lorsque la requête ne contient pas de variables (requête statique). Dans +le cas des requêtes dynamiques, utilisez db:prepare ou +db:prepared. +

    +
    + +
    + + +LuaRoot +Spécifie le chemin de base pour la résolution des chemins +relatifs dans les directives de mod_lua +LuaRoot /chemin/vers/un/répertoire +server configvirtual host +directory.htaccess + +All + + +

    Cette directive permet de spécifier le chemin de base qui sera + utilisé pour évaluer tous les chemins relatifs dans mod_lua. En + l'absence de cette directive, les chemins relatifs sont résolus par + rapport au répertoire de travail courant, ce qui ne sera pas + toujours approprié pour un serveur.

    +
    +
    + + +LuaScope +Une valeur parmi once, request, conn, thread -- la valeur par défaut est once +LuaScope once|request|conn|thread|server [min] [max] +LuaScope once +server configvirtual host +directory.htaccess + +All + + +

    Cette directive permet de spécifier la durée de vie de + l'interpréteur Lua qui sera utilisé dans ce "répertoire". La valeur + par défaut est "once".

    + +
    +
    once:
    utilise l'interpréteur une fois.
    + +
    request:
    utilise l'interpréteur pour traiter tout ce + qui est basé sur le même fichier dans la requête, et qui se trouve + aussi dans la portée de la requête.
    + +
    conn:
    idem request, mais attaché à connection_rec
    + +
    thread:
    Utilise l'interpréteur pendant toute la durée + de vie du thread qui traite la requête (disponible seulement avec + les MPMs threadés).
    + +
    server:
    Le comportement est ici différent, car la + portée du serveur présente une durée de vie assez longue, et + plusieurs threads vont partager le même server_rec. Pour gérer tout + ceci, les états lua du serveur sont stockés dans une liste de ressources + apr. Les arguments min et max permettent + de spécifier les nombres minimaux et maximaux d'états lua à stocker + dans la liste.
    +
    +

    En général, les portées thread et server + sont 2 à 3 fois plus rapides que les autres, car elles n'ont pas besoin + de régénérer de nouveaux états Lua à chaque requête (comme c'est le + cas avec le MPM event, où même les connexions persistantes utilisent un + nouveau thread pour chaque requête). Si vous pensez que vos scripts + n'auront pas de problème s'il réutilisent un état, alors les portées + thread ou server doivent être utilisées car + elles présenteront de meilleures performances. Alors que la portée + thread fournira les réponses les plus rapides, la portée + server utilisera moins de mémoire car les états sont + rassemblés dans des jeux, permettant par exemple à 1000 threads de + partager 100 états Lua, ne nécessitant ainsi que 10% de la mémoire + requise par la portée thread. +

    +
    +
    + + +LuaMapHandler +Met en correspondance un chemin avec un gestionnaire lua +LuaMapHandler modele-uri /chemin/vers/lua/script.lua +[nom-fonction] +server configvirtual host +directory.htaccess + +All + +

    Cette directive permet de faire correspondre un modèle d'uri avec + une fonction de gestionnaire située dans un fichier spécifique. Elle + utilise les expressions rationnelles PCRE pour mettre en + correspondance l'uri, et supporte les groupes de correspondance + d'interpolation dans le chemin du fichier et le nom de la fonction. + Prenez garde aux problèmes de sécurité en écrivant vos expressions + rationnelles.

    + Exemples : + + LuaMapHandler "/(\w+)/(\w+)" "/scripts/$1.lua" "handle_$2" + + +

    Cette directive va faire correspondre des uri comme + /photos/show?id=9 au fichier /scripts/photos.lua, et invoquera la + fonction de gestionnaire handle_show au niveau de la vm lua + après chargement de ce fichier.

    + + + LuaMapHandler "/bingo" "/scripts/wombat.lua" + +

    Cette directive invoquera la fonction "handle" qui est la + valeur par défaut si aucun nom de fonction spécifique n'est + spécifié.

    +
    +
    + + +LuaPackagePath +Ajoute un répertoire au package.path de lua +LuaPackagePath /chemin/vers/include/?.lua +server configvirtual host +directory.htaccess + +All +

    Cette directive permet d'ajouter un chemin à la liste des + chemins de recherche du module lua. Elle suit les mêmes conventions + que lua. Ceci modifie le package.path dans les vms lua.

    + + Exemples : + +LuaPackagePath "/scripts/lib/?.lua" +LuaPackagePath "/scripts/lib/?/init.lua" + + +
    +
    + + +LuaPackageCPath +Ajoute un répertoire au package.cpath de lua +LuaPackageCPath /chemin/vers/include/?.soa +server configvirtual host +directory.htaccess + +All + + +

    Cette directive permet d'ajouter un chemin à la liste des chemins + de recherche des bibliothèques partagées de lua. Ceci modifie le + package.cpath dans les vms lua.

    + +
    +
    + + +LuaCodeCache +Configure le cache de code compilé. +LuaCodeCache stat|forever|never +LuaCodeCache stat + +server configvirtual host +directory.htaccess + +All + +

    + Cette directive permet de définir le comportement du cache de code + en mémoire. La valeur par défaut est stat ; dans ce cas, le script + du niveau le plus haut (et pas les scripts inclus) est vérifié à + chaque fois que ce fichier est nécessaire, et est rechargé si la + date de modification est plus récente que celle du script déjà + chargé. Les autres valeurs permettent respectivement de garder le + fichier en cache perpétuellement (forever - jamais vérifié ni + remplacé), ou de ne jamais le mettre en cache (never).

    + +

    En général, les valeurs stat et forever sont utilisées pour un + serveur en production, et les valeurs stat ou never pour un serveur + en développement.

    + + Exemples : + +LuaCodeCache stat +LuaCodeCache forever +LuaCodeCache never + + + +
    +
    + + +LuaHookTranslateName +Fournit un point d'entrée à la phase du nom de +traduction du traitement de la requête +LuaHookTranslateName /chemin/vers/lua/script.lua nom_fonction_hook [early|late] +server configvirtual host + +All +Le troisième argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache. + +

    + Cette directive permet d'ajouter un point d'entrée (à + APR_HOOK_MIDDLE) à la phase du nom de traduction du traitement de la + requête. La fonction hook accepte un seul argument, le request_rec, + et doit renvoyer un code d'état qui est soit un code d'erreur HTTP, + ou une constante définie dans le module apache2 : apache2.OK, + apache2.DECLINED, ou apache2.DONE.

    + +

    Pour ceux qui ne sont pas familiers avec les points d'entrée + (hook), en gros, chaque hook sera invoqué jusqu'à ce que l'un + d'entre eux renvoie apache2.OK. Si un hook n'effectuer pas la + traduction, il doit juste renvoyer apache2.DECLINED. Si le + traitement de la requête doit être interrompu, la valeur renvoyée + doit être apache2.DONE.

    + +

    Exemple :

    + + +# httpd.conf +LuaHookTranslateName "/scripts/conf/hooks.lua" silly_mapper + + + +-- /scripts/conf/hooks.lua -- +require "apache2" +function silly_mapper(r) + if r.uri == "/" then + r.filename = "/var/www/home.lua" + return apache2.OK + else + return apache2.DECLINED + end +end + + + Contexte

    Cette directive ne peut être + utilisée ni à l'intérieur d'une section Directory ou Files, ni dans un fichier htaccess.

    + + Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrôler le moment auquel ce script + s'exécute par rapport aux autres modules.

    +
    +
    + + +LuaHookFixups +Fournit un point d'entrée pour la phase de correction du +traitement de la requête +LuaHookFixups /chemin/vers/lua/script.lua hook_function_name +server configvirtual host +directory.htaccess + +All + +

    + Idem LuaHookTranslateName, mais s'exécute durant la phase de + correction. +

    +
    +
    + + +LuaHookLog +Permet une insertion dans la phase de journalisation du +traitement d'une requête +LuaHookLog /path/to/lua/script.lua log_function_name +server configvirtual host +directory.htaccess + +All + +

    + Ce dispositif d'insertion simple permet d'exécuter une fonction + lorsque httpd entre dans la phase de journalisation du traitement + d'une requête. Vous pouvez ainsi ajouter des données à vos propres + entrées de journalisation, manipuler les entrées du journal standard + avant leur enregistrement ou empêcher l'enregistrement d'une entrée + dans le journal. Pour empêcher l'enregistrement normal des entrées + du journal, renvoyez simplement apache2.DONE dans votre + gestionnaire de journalisation, ou au contraire, renvoyez + apache2.OK pour que httpd effectue une journalisation + normale. +

    +

    Exemple :

    + +LuaHookLog "/path/to/script.lua" logger + + +-- /path/to/script.lua -- +function logger(r) + -- on joue à pile ou face : + -- Si on obtient 1, on écrit dans notre propre journal Lua et on dit + -- à httpd de ne pas enregistrer d'entrée dans le journal standard.. + -- Si on obtient 2, on nettoie un peu les données avant que httpd ne + -- les enregistre dans le journal standard. + + if math.random(1,2) == 1 then + -- On effectue notre propre journalisation et le journal + -- standard n'est pas alimenté + local f = io.open("/foo/secret.log", "a") + if f then + f:write("Quelque chose de secret est arrivé à " .. r.uri .. "\n") + f:close() + end + return apache2.DONE -- On dit à httpd de ne rien enregistrer + --dans le journal standard + else + r.uri = r.uri:gsub("somesecretstuff", "") -- nettoie les données + return apache2.OK -- et httpd doit alors les enregistrer. + end +end + +
    +
    + + + +LuaHookMapToStorage +Fournit un point d'entrée pour la phase map_to_storage du +traitement de la requête +LuaHookMapToStorage /chemin/vers/lua/script.lua hook_function_name +server configvirtual host +directory.htaccess + +All + +

    Identique à la directive + LuaHookTranslateName, mais s'exécute à la + phase map-to-storage du traitement de la requête. Les modules comme + mod_cache agissent pendant cette phase, ce qui permet de présenter + un exemple intéressant de ce que l'on peut faire ici :

    + + LuaHookMapToStorage "/path/to/lua/script.lua" check_cache + + +require"apache2" +cached_files = {} + +function read_file(filename) + local input = io.open(filename, "r") + if input then + local data = input:read("*a") + cached_files[filename] = data + file = cached_files[filename] + input:close() + end + return cached_files[filename] +end + +function check_cache(r) + if r.filename:match("%.png$") then -- Ne concerne que les fichiers PNG + local file = cached_files[r.filename] -- Vérifie les entrées du cache + if not file then + file = read_file(r.filename) -- Lit le fichier vers le cache + end + if file then -- Si le fichier existe, on l'envoie + r.status = 200 + r:write(file) + r:info(("%s a été envoyé au client depuis le cache"):format(r.filename)) + return apache2.DONE -- cout-circuite le gestionnaire par défaut des fichiers PNG + end + end + return apache2.DECLINED -- Si nous n'avons rien eu à faire, nous laissons les autres s'en charger +end + + +
    +
    + + +LuaHookCheckUserID +Fournit un point d'entrée pour la phase check_user_id du +traitement de la requête +LuaHookCheckUserID /chemin/vers/lua/script.lua hook_function_name [early|late] +server configvirtual host +directory.htaccess + +All +Le troisième argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache. +

    ...

    + Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrôler le moment auquel ce script + s'exécute par rapport aux autres modules.

    +
    +
    + + +LuaHookTypeChecker +Fournit un point d'entrée pour la phase type_checker du +traitement de la requête +LuaHookTypeChecker /chemin/vers/lua/script.lua hook_function_name +server configvirtual host +directory.htaccess + +All +

    + Cette directive fournit un point d'entrée pour la phase + type_checker du traitement de la requête. Cette phase + correspond au moment où la requête se voit assigner un type et un + gestionnaire de contenu, et peut donc être utilisée pour modifier le + type et le gestionnaire en fonction de l'entrée : +

    + + LuaHookTypeChecker "/path/to/lua/script.lua" type_checker + + + function type_checker(r) + if r.uri:match("%.to_gif$") then -- foo.png.to_gif convient + r.content_type = "image/gif" -- affectation du type image/gif + r.handler = "gifWizard" -- force le traitement de la requête par le module gifWizard + r.filename = r.uri:gsub("%.to_gif$", "") -- corrige le nom du fichier demandé + return apache2.OK + end + + return apache2.DECLINED + end + +
    +
    + + +LuaHookAuthChecker +Fournit un point d'entrée pour la phase auth_checker du +traitement de la requête +LuaHookAuthChecker /chemin/vers/lua/script.lua hook_function_name [early|late] +server configvirtual host +directory.htaccess + +All +Le troisième argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache. + +

    Invoque une fonction lua au cours de la phase auth_checker du +traitement de la requête. Cette directive peut s'utiliser pour +implémenter une vérification arbitraire de l'authentification et de +l'autorisation. Voici un exemple très simple : +

    + +require 'apache2' + +-- fonction d'accroche authcheck fictive +-- Si la requête ne contient aucune donnée d'authentification, l'en-tête +-- de la réponse est défini et un code 401 est renvoyé afin de demander au +-- navigateur d'effectuer une authentification basique. Si la requête +-- comporte des données d'authentification, elles ne sont pas vraiment +-- consultées, mais on admet la prise en compte de l'utilisateur 'foo' et +-- on la valide. On vérifie ensuite si l'utilisateur est bien 'foo' et on +-- accepte la requête. +function authcheck_hook(r) + + -- recherche des informations d'authentification + auth = r.headers_in['Authorization'] + if auth ~= nil then + -- définition d'un utilisateur par défaut + r.user = 'foo' + end + + if r.user == nil then + r:debug("authcheck: user is nil, returning 401") + r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"' + return 401 + elseif r.user == "foo" then + r:debug('user foo: OK') + else + r:debug("authcheck: user='" .. r.user .. "'") + r.err_headers_out['WWW-Authenticate'] = 'Basic realm="WallyWorld"' + return 401 + end + return apache2.OK +end + +Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrôler le moment auquel ce script + s'exécute par rapport aux autres modules.

    +
    +
    + + +LuaHookAccessChecker +Fournit un point d'entrée pour la phase access_checker du +traitement de la requête +LuaHookAccessChecker /chemin/vers/lua/script.lua hook_function_name [early|late] +server configvirtual host +directory.htaccess + +All +Le troisième argument optionnel est disponible depuis la +version 2.3.15 du serveur HTTP Apache. + + +

    Ajoute votre fonction d'accroche à la phase access_checker. Une +fonction d'accroche access checker renvoie en général OK, DECLINED, ou +HTTP_FORBIDDEN.

    +Ordonnancement

    Les arguments optionnels + "early" ou "late" permettent de contrôler le moment auquel ce script + s'exécute par rapport aux autres modules.

    +
    +
    + +LuaHookInsertFilter +Fournit un point d'entrée pour la phase insert_filter du +traitement de la requête +LuaHookInsertFilter /chemin/vers/lua/script.lua hook_function_name +server configvirtual host +directory.htaccess + +All +

    Non encore implémenté

    +
    + + +LuaInherit +Contrôle la manière dont les sections de configuration +parentes sont fusionnées dans les enfants +LuaInherit none|parent-first|parent-last +LuaInherit parent-first +server configvirtual host +directory.htaccess + +All +Versions 2.4.0 et supérieures +

    Par défaut, si des directives LuaHook* se trouvent dans + des sections de configuration Directory ou Location qui se + chevauchent, les scripts + définis dans les sections les plus spécifiques s'exécutent + après ceux définis dans les sections plus génériques + (LuaInherit parent-first). Vous pouvez inverser cet ordre, ou faire + en sorte que le contexte parent ne s'applique pas du tout.

    + +

    Jusqu'aux versions 2.3.x, le comportement par défaut consistait à + ignorer les directives LuaHook* situées dans les sections de + configuration parentes.

    +
    + + +LuaQuickHandler +Fournit un point d'entrée pour la gestion rapide du +traitement de la requête +LuaQuickHandler /path/to/script.lua hook_function_name +server configvirtual host +directory.htaccess + +All + +

    Cette phase s'exécute juste après l'attribution de la requête à + un serveur virtuel, et permet d'effectuer certains traitements avant + le déroulement des autres phases, ou de servir une requête sans + avoir à la traduire, l'associer à un espace de stockage, etc... + Comme cette phase s'exécute avant toute autre, les directives telles + que Location ou + Directory ne + sont pas encore prises en compte, car Les URI n'ont pas encore été + entièrement interprétés. +

    + Contexte

    Cette directive ne peut être + utilisée ni à l'intérieur d'une section Directory ou Files, ni dans un fichier htaccess.

    +
    +
    + + +LuaAuthzProvider +Branche une fonction fournisseur d'autorisation dans mod_authz_core + +LuaAuthzProvider provider_name /path/to/lua/script.lua function_name +server config +Disponible depuis la version 2.4.3 du serveur HTTP Apache + + +

    Lorsqu'une fonction lua a été enregistrée en tant que fournisseur +d'autorisation, elle peut être appelée via la directive Require :

    + + + +LuaRoot "/usr/local/apache2/lua" +LuaAuthzProvider foo authz.lua authz_check_foo +<Location "/"> + Require foo johndoe +</Location> + + +require "apache2" +function authz_check_foo(r, who) + if r.user ~= who then return apache2.AUTHZ_DENIED + return apache2.AUTHZ_GRANTED +end + + +
    +
    + + +LuaInputFilter +Fournit une fonction Lua pour le filtrage en entrée +LuaInputFilter filter_name /path/to/lua/script.lua function_name +server config +Disponible depuis la version 2.4.5 du serveur HTTP +Apache + + +

    Cette directive permet d'ajouter un filtre en entrée sous la forme +d'une fonction Lua. A l'instar des filtres en sorties, les filtres en +entrée fonctionnent comme des sous-routines, intervenant dans un premier +temps avant l'envoi du contenu des tampons, puis chaque fois qu'un +paquet de données doit être transmis à la chaîne, et éventuellement +produisant toute donnée à ajouter aux données en entrée. La variable +globale bucket contient les paquets de données tels qu'ils +sont transmis au script Lua : +

    + + +LuaInputFilter myInputFilter "/www/filter.lua" input_filter +<Files "*.lua"> + SetInputFilter myInputFilter +</Files> + + +--[[ + Exemple de filtre en entrée qui convertit toutes les données POST en + majuscules. +]]-- +function input_filter(r) + print("luaInputFilter called") -- pour débogage + coroutine.yield() -- attend des paquets de données + while bucket do -- Pour chaque paquet, faire ... + local output = string.upper(bucket) -- Convertit toutes les données POST en majuscules + coroutine.yield(output) -- Envoie les données traitées à la chaîne de filtrage + end + -- plus aucune donnée à traiter. + coroutine.yield("&filterSignature=1234") -- Ajoute une signature à la fin +end + +

    +Le filtre en entrée peut interdire ou sauter un filtre s'il est +considéré comme indésirable : +

    + +function input_filter(r) + if not good then + return -- Empêche tout simplement le filtrage et transmet le contenu original + end + coroutine.yield() -- attend des paquets de données + ... -- insert les filtres ici +end + +

    +Voir "Modification de contenu avec les +filtres Lua" pour plus de détails. +

    +
    +
    + + +LuaOutputFilter +Fournit une fonction Lua pour le filtrage de contenu en +sortie +LuaOutputFilter filter_name /path/to/lua/script.lua function_name +server config +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + + +

    >Cette directive permet d'ajouter un filtre en sortie sous la forme +d'une fonction Lua. A l'instar des filtres en sorties, les filtres en +entrée fonctionnent comme des sous-routines, intervenant dans un premier +temps avant l'envoi du contenu des tampons, puis chaque fois qu'un +paquet de données doit être transmis à la chaîne, et éventuellement +produisant toute donnée à ajouter aux données en sortie. La variable +globale bucket contient les paquets de données tels qu'ils +sont transmis au script Lua : +

    + + +LuaOutputFilter myOutputFilter "/www/filter.lua" output_filter +<Files "*.lua"> + SetOutputFilter myOutputFilter +</Files> + + +--[[ + Exemple de filtre en sortie qui échappe toutes les entités HTML en + sortie +]]-- +function output_filter(r) + coroutine.yield("(Handled by myOutputFilter)<br/>\n") -- Ajoute des données au début de la sortie, + -- puis attend des paquets de données à traiter + while bucket do -- Pour chaque paquet, faire ... + local output = r:escape_html(bucket) -- Echappe les données en sortie + coroutine.yield(output) -- Envoie les données traitées à la chaîne + end + -- plus aucune donnée à traiter. +end + +

    +Comme les filres en entrée, le filtre en sortie peut interdire ou sauter un filtre s'il est +considéré comme indésirable : +

    + +function output_filter(r) + if not r.content_type:match("text/html") then + return -- Empêche tout simplement le filtrage et transmet le contenu original + end + coroutine.yield() -- attend des paquets de données + ... -- insert les filtres ici +end + +Les filtres Lua avec <module>mod_filter</module> +

    Lorsqu'on utilise un filtre Lua comme fournisseur sous-jacent via la +directive FilterProvider, le +filtrage ne fonctionnera que si filter-name est identique à +provider-name. +

    + +

    +Voir "Modification de contenu avec les +filtres Lua" pour plus de détails. +

    + +
    +
    + +
    + diff --git a/docs/manual/mod/mod_lua.xml.meta b/docs/manual/mod/mod_lua.xml.meta index 44bad8d95b7..b55c7710e95 100644 --- a/docs/manual/mod/mod_lua.xml.meta +++ b/docs/manual/mod/mod_lua.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_macro.html b/docs/manual/mod/mod_macro.html new file mode 100644 index 00000000000..1b2896af112 --- /dev/null +++ b/docs/manual/mod/mod_macro.html @@ -0,0 +1,9 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_macro.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_macro.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en new file mode 100644 index 00000000000..5183108abd0 --- /dev/null +++ b/docs/manual/mod/mod_macro.html.en @@ -0,0 +1,302 @@ + + + + + +mod_macro - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_macro

    +
    +

    Available Languages:  en  | + fr 

    +
    + + + +
    Description:Provides macros within apache httpd runtime configuration files
    Status:Base
    ModuleIdentifier:macro_module
    SourceFile:mod_macro.c
    +

    Summary

    + + +

    Provides macros within Apache httpd runtime configuration files, + to ease the process of creating numerous similar configuration + blocks. When the server starts up, the macros are expanded using the + provided parameters, and the result is processed as along with the + rest of the configuration file.

    + +
    +

    Topics

    +

    Directives

    + +

    Bugfix checklist

    See also

    +
    +
    top
    +
    +

    Usage

    + +

    Macros are defined using <Macro> blocks, which contain the portion of +your configuration that needs to be repeated, complete with variables +for those parts that will need to be substituted.

    + +

    For example, you might use a macro to define a <VirtualHost> block, in order to define +multiple similar virtual hosts:

    + +
    <Macro VHost $name $domain>
    +<VirtualHost *:80>
    +    ServerName $domain
    +    ServerAlias www.$domain
    +
    +    DocumentRoot "/var/www/vhosts/$name"
    +    ErrorLog "/var/log/httpd/$name.error_log"
    +    CustomLog "/var/log/httpd/$name.access_log" combined
    +</VirtualHost>
    +</Macro>
    + + +

    Macro names are case-insensitive, like httpd configuration +directives. However, variable names are case sensitive.

    + +

    You would then invoke this macro several times to create virtual +hosts:

    + +
    Use VHost example example.com
    +Use VHost myhost hostname.org
    +Use VHost apache apache.org
    +
    +UndefMacro VHost
    + + +

    At server startup time, each of these Use +invocations would be expanded into a full virtualhost, as +described by the <Macro> +definition.

    + +

    The UndefMacro directive is +used so that later macros using the same variable names don't result in +conflicting definitions.

    + +

    A more elaborate version of this example may be seen below in the +Examples section.

    + +
    top
    +
    +

    Tips

    + +

    Parameter names should begin with a sigil such as $, +%, or @, so that they are clearly +identifiable, and also in order to help deal with interactions with +other directives, such as the core Define directive. Failure to do so will +result in a warning. Nevertheless, you are encouraged to have a good +knowledge of your entire server configuration in order to avoid reusing +the same variables in different scopes, which can cause confusion.

    + +

    Parameters prefixed with either $ or % are +not escaped. Parameters prefixes with @ are escaped in +quotes.

    + +

    Avoid using a parameter which contains another parameter as a prefix, +(For example, $win and $winter) as this may +cause confusion at expression evaluation time. In the event of such +confusion, the longest possible parameter name is used.

    + +

    If you want to use a value within another string, it is useful to +surround the parameter in braces, to avoid confusion:

    + +
    <Macro DocRoot ${docroot}>
    +    DocumentRoot "/var/www/${docroot}/htdocs"
    +</Macro>
    + + +
    top
    +
    +

    Examples

    + + +

    Virtual Host Definition

    + + +

    A common usage of mod_macro is for the creation of +dynamically-generated virtual hosts.

    + +
    ## Define a VHost Macro for repetitive configurations
    +
    +<Macro VHost $host $port $dir>
    +  Listen $port
    +  <VirtualHost *:$port>
    +
    +    ServerName $host
    +    DocumentRoot "$dir"
    +
    +    # Public document root
    +    <Directory "$dir">
    +        Require all granted
    +    </Directory>
    +
    +    # limit access to intranet subdir.
    +    <Directory "$dir/intranet">
    +      Require ip 10.0.0.0/8
    +    </Directory>
    +  </VirtualHost>
    +</Macro>
    +
    +## Use of VHost with different arguments.
    +
    +Use VHost www.apache.org 80 /vhosts/apache/htdocs
    +Use VHost example.org 8080 /vhosts/example/htdocs
    +Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs
    + + + +

    Removal of a macro definition

    + + +

    It's recommended that you undefine a macro once you've used it. This +avoids confusion in a complex configuration file where there may be +conflicts in variable names.

    + +
    <Macro DirGroup $dir $group>
    +  <Directory "$dir">
    +    Require group $group
    +  </Directory>
    +</Macro>
    +
    +Use DirGroup /www/apache/private private
    +Use DirGroup /www/apache/server  admin
    +
    +UndefMacro DirGroup
    + + + + +
    +
    top
    +

    <Macro> Directive

    + + + + + + +
    Description:Define a configuration file macro
    Syntax: +<Macro name [par1 .. parN]> +... </Macro>
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_macro
    +

    The <Macro> directive controls the + definition of a macro within the server runtime configuration files. + The first argument is the name of the macro. + Other arguments are parameters to the macro. It is good practice to prefix + parameter names with any of '$%@', and not macro names + with such characters. +

    + +
    <Macro LocalAccessPolicy>
    +    Require ip 10.2.16.0/24
    +</Macro>
    +
    +<Macro RestrictedAccessPolicy $ipnumbers>
    +    Require ip $ipnumbers
    +</Macro>
    + + +
    +
    top
    +

    UndefMacro Directive

    + + + + + + +
    Description:Undefine a macro
    Syntax:UndefMacro name
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_macro
    +

    The UndefMacro directive undefines a macro + which has been defined before hand.

    + +
    UndefMacro LocalAccessPolicy
    +UndefMacro RestrictedAccessPolicy
    + + +
    +
    top
    +

    Use Directive

    + + + + + + +
    Description:Use a macro
    Syntax:Use name [value1 ... valueN] +
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_macro
    +

    The Use directive controls the use of a macro. + The specified macro is expanded. It must be given the same number of + arguments as in the macro definition. The provided values are + associated to their corresponding initial parameters and are substituted + before processing.

    + +
    Use LocalAccessPolicy
    +...
    +Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"
    + + +

    is equivalent, with the macros defined above, to:

    + +
    Require ip 10.2.16.0/24
    +...
    +Require ip 192.54.172.0/24 192.54.148.0/24
    + + +
    +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_macro.html.fr b/docs/manual/mod/mod_macro.html.fr new file mode 100644 index 00000000000..6950af69abf --- /dev/null +++ b/docs/manual/mod/mod_macro.html.fr @@ -0,0 +1,309 @@ + + + + + +mod_macro - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_macro

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Ce module permet d'utiliser des macros dans les fichiers +de configuration Apache.
    Statut:Base
    IdentificateurdeModule:macro_module
    FichierSource:mod_macro.c
    +

    Sommaire

    + + +

    Ce module permet d'utiliser des macros dans les fichiers de + configuration l'excution du serveur HTTP Apache afin de faciliter + la cration de nombreux blocs de configuration similaires. Quand le + serveur dmarre, les macros sont excutes avec les paramtres + fournis, et le rsultat obtenu est trait au mme titre que le reste + du fichier de configuration.

    + +
    + +
    top
    +
    +

    Utilisation

    +

    On dfinit une macro l'aide des blocs <Macro> qui contiennent la portion de votre +configuration qui intervient de manire rptitive, y compris les +variables pour les parties qui devront tre substitues.

    + +

    Par exemple, vous pouvez utiliser une macro pour dfinir un bloc +<VirtualHost>, afin de pouvoir +dfinir de nombreux serveurs virtuels similaires :

    + +
    <Macro VHost $name $domain>
    +<VirtualHost *:80>
    +    ServerName $domain
    +    ServerAlias www.$domain
    +
    +    DocumentRoot "/var/www/vhosts/$name"
    +    ErrorLog "/var/log/httpd/$name.error_log"
    +    CustomLog "/var/log/httpd/$name.access_log" combined
    +</VirtualHost>
    +</Macro>
    + + +

    Comme les directives de configuration httpd, les noms des macros sont +insensibles la casse, la diffrence des variables qui y sont, elles, +sensibles.

    + +

    Vous pouvez alors invoquer cette macro autant de fois que vous le +voulez pour crer des serveurs virtuels

    + +
    Use VHost example example.com
    +Use VHost myhost hostname.org
    +Use VHost apache apache.org
    +
    +UndefMacro VHost
    + + +

    Au dmarrage du serveur, chacune de ces invocations +Use sera remplace par une dfinition de serveur +virtuel complte, comme dcrit dans la dfinition de la +<Macro>.

    + +

    La directive UndefMacro permet d'viter les +conflits de dfinitions qui pourraient provenir de l'utilisation +ultrieure de macros contenant les mmes noms de variables.

    + +

    Vous trouverez une version plus labore de cet exemple plus loin +dans la section Exemples.

    + +
    top
    +
    +

    Conseils

    + +

    Les noms de paramtres doivent commencer par un sigil tel que +$, %, ou @, de faon ce qu'ils +soient clairement identifiables, mais aussi afin de faciliter les +interactions avec les autres directives, comme la directive de base +Define. Dans le cas contraire, vous +recevrez un avertissement. En tout tat de cause, il est conseill +d'avoir une bonne connaissance globale de la configuration du serveur, +afin d'viter la rutilisation des mmes variables diffrents niveaux, +ce qui peut tre l'origine de confusions.

    + +

    Les paramtres prfixs par $ ou % ne sont +pas chapps. Les paramtres prfixs par @ sont chapps +entre guillemets.

    + +

    Evitez de prfixer un paramtre par le nom d'un autre paramtre (par +exemple, prsence simultane des paramtres $win et +$winter), car ceci peut introduire de la confusion lors de +l'valuation des expressions. Si cela se produit, c'est le nom de +paramtre le plus long possible qui sera utilis.

    + +

    Si vous dsirez insrer une valeur dans une chane, il est conseill +de l'entourer d'accolades afin d'viter toute confusion :

    + +
    <Macro DocRoot ${docroot}>
    +    DocumentRoot "/var/www/${docroot}/htdocs"
    +</Macro>
    + + +
    top
    +
    +

    Exemples

    + + +

    Dfinition de serveurs virtuels

    + + +

    Un exemple typique d'utilisation de mod_macro est la +cration dynamique de serveurs virtuels.

    + +
    ## Dfinition d'une macro VHost pour les configurations rptitives
    +
    +<Macro VHost $host $port $dir>
    +  Listen $port
    +  <VirtualHost *:$port>
    +
    +    ServerName $host
    +    DocumentRoot "$dir"
    +
    +    # Racine des documents publique
    +    <Directory "$dir">
    +      Require all granted
    +    </Directory>
    +
    +    # restriction d'accs au sous-rpertoire intranet.
    +    <Directory "$dir/intranet">
    +      Require ip 10.0.0.0/8
    +    </Directory>
    +  </VirtualHost>
    +</Macro>
    +
    +## Utilisation de la macro VHost avec diffrents arguments.
    +
    +Use VHost www.apache.org 80 /vhosts/apache/htdocs
    +Use VHost example.org 8080 /vhosts/example/htdocs
    +Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs
    + + + +

    Suppression d'une dfinition de macro

    + + +

    Il est recommand de supprimer la dfinition d'une macro aprs +l'avoir utilise. Ceci permet d'viter les confusions au sein d'un +fichier de configuration complexe o des conflits entre noms de +variables peuvent survenir.

    + +
    <Macro DirGroup $dir $group>
    +  <Directory "$dir">
    +    Require group $group
    +  </Directory>
    +</Macro>
    +
    +Use DirGroup /www/apache/private private
    +Use DirGroup /www/apache/server  admin
    +
    +UndefMacro DirGroup
    + + + + +
    +
    top
    +

    Directive <Macro>

    + + + + + + +
    Description:Dfinition d'une macro dans un fichier de configuration
    Syntaxe: +<Macro nom [par1 .. parN]> +... </Macro>
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_macro
    +

    La directive <Macro> permet de dfinir une macro + dans un fichier de configuration Apache. Le premier argument est le nom + de la macro, et les arguments suivants sont les paramtres. Il + est de bon aloi de prfixer les noms des paramtres d'une macro + avec un caractre parmi '$%@', et d'viter d'en faire + de mme avec les noms de macros. +

    + +
    <Macro LocalAccessPolicy>
    +  Require ip 10.2.16.0/24
    +</Macro>
    +
    +<Macro RestrictedAccessPolicy $ipnumbers>
    +   Require ip $ipnumbers
    +</Macro>
    + + +
    +
    top
    +

    Directive UndefMacro

    + + + + + + +
    Description:Supprime une macro
    Syntaxe:UndefMacro nom
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_macro
    +

    La directive UndefMacro annule la dfinition + d'une macro qui doit avoir t dfinie auparavant.

    + +
    UndefMacro LocalAccessPolicy
    +UndefMacro RestrictedAccessPolicy
    + + +
    +
    top
    +

    Directive Use

    + + + + + + +
    Description:Utilisation d'une macro
    Syntaxe:Use nom [valeur1 ... valeurN] +
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_macro
    +

    La directive Use permet d'utiliser une macro. + La macro considre est expanse. Son nombre d'arguments doit tre gal au + nombre de paramtres prciss dans sa dfinition. Les valeurs passes en + argument sont attribues aux paramtres correspondants et + substitues avant l'interprtation du texte de la macro.

    + +
    Use LocalAccessPolicy
    +...
    +Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"
    + + +

    est quivalent, avec les macros dfinies ci-dessus :

    + +
    Require ip 10.2.16.0/24
    +...
    +Require ip 192.54.172.0/24 192.54.148.0/24
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_macro.xml b/docs/manual/mod/mod_macro.xml new file mode 100644 index 00000000000..3bf6b348f97 --- /dev/null +++ b/docs/manual/mod/mod_macro.xml @@ -0,0 +1,280 @@ + + + + + + + + + +mod_macro +Provides macros within apache httpd runtime configuration files +Base +mod_macro.c +macro_module + + + +

    Provides macros within Apache httpd runtime configuration files, + to ease the process of creating numerous similar configuration + blocks. When the server starts up, the macros are expanded using the + provided parameters, and the result is processed as along with the + rest of the configuration file.

    + +
    + +
    Usage + +

    Macros are defined using Macro blocks, which contain the portion of +your configuration that needs to be repeated, complete with variables +for those parts that will need to be substituted.

    + +

    For example, you might use a macro to define a VirtualHost block, in order to define +multiple similar virtual hosts:

    + + +<Macro VHost $name $domain> +<VirtualHost *:80> + ServerName $domain + ServerAlias www.$domain + + DocumentRoot "/var/www/vhosts/$name" + ErrorLog "/var/log/httpd/$name.error_log" + CustomLog "/var/log/httpd/$name.access_log" combined +</VirtualHost> +</Macro> + + +

    Macro names are case-insensitive, like httpd configuration +directives. However, variable names are case sensitive.

    + +

    You would then invoke this macro several times to create virtual +hosts:

    + + +Use VHost example example.com +Use VHost myhost hostname.org +Use VHost apache apache.org + +UndefMacro VHost + + +

    At server startup time, each of these Use +invocations would be expanded into a full virtualhost, as +described by the Macro +definition.

    + +

    The UndefMacro directive is +used so that later macros using the same variable names don't result in +conflicting definitions.

    + +

    A more elaborate version of this example may be seen below in the +Examples section.

    + +
    + +
    Tips + +

    Parameter names should begin with a sigil such as $, +%, or @, so that they are clearly +identifiable, and also in order to help deal with interactions with +other directives, such as the core Define directive. Failure to do so will +result in a warning. Nevertheless, you are encouraged to have a good +knowledge of your entire server configuration in order to avoid reusing +the same variables in different scopes, which can cause confusion.

    + +

    Parameters prefixed with either $ or % are +not escaped. Parameters prefixes with @ are escaped in +quotes.

    + +

    Avoid using a parameter which contains another parameter as a prefix, +(For example, $win and $winter) as this may +cause confusion at expression evaluation time. In the event of such +confusion, the longest possible parameter name is used.

    + +

    If you want to use a value within another string, it is useful to +surround the parameter in braces, to avoid confusion:

    + + +<Macro DocRoot ${docroot}> + DocumentRoot "/var/www/${docroot}/htdocs" +</Macro> + + +
    + +
    +Examples + +
    +Virtual Host Definition + +

    A common usage of mod_macro is for the creation of +dynamically-generated virtual hosts.

    + + +## Define a VHost Macro for repetitive configurations + +<Macro VHost $host $port $dir> + Listen $port + <VirtualHost *:$port> + + ServerName $host + DocumentRoot "$dir" + + # Public document root + <Directory "$dir"> + Require all granted + </Directory> + + # limit access to intranet subdir. + <Directory "$dir/intranet"> + Require ip 10.0.0.0/8 + </Directory> + </VirtualHost> +</Macro> + +## Use of VHost with different arguments. + +Use VHost www.apache.org 80 /vhosts/apache/htdocs +Use VHost example.org 8080 /vhosts/example/htdocs +Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs + +
    + +
    +Removal of a macro definition + +

    It's recommended that you undefine a macro once you've used it. This +avoids confusion in a complex configuration file where there may be +conflicts in variable names.

    + + +<Macro DirGroup $dir $group> + <Directory "$dir"> + Require group $group + </Directory> +</Macro> + +Use DirGroup /www/apache/private private +Use DirGroup /www/apache/server admin + +UndefMacro DirGroup + + +
    + +
    + + + +Macro +Define a configuration file macro + +<Macro name [par1 .. parN]> +... </Macro> + +server config +virtual host +directory + + + +

    The Macro directive controls the + definition of a macro within the server runtime configuration files. + The first argument is the name of the macro. + Other arguments are parameters to the macro. It is good practice to prefix + parameter names with any of '$%@', and not macro names + with such characters. +

    + + +<Macro LocalAccessPolicy> + Require ip 10.2.16.0/24 +</Macro> + +<Macro RestrictedAccessPolicy $ipnumbers> + Require ip $ipnumbers +</Macro> + +
    +
    + + + +Use +Use a macro +Use name [value1 ... valueN] + + +server config +virtual host +directory + + + +

    The Use directive controls the use of a macro. + The specified macro is expanded. It must be given the same number of + arguments as in the macro definition. The provided values are + associated to their corresponding initial parameters and are substituted + before processing.

    + + +Use LocalAccessPolicy +... +Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24" + + +

    is equivalent, with the macros defined above, to:

    + + +Require ip 10.2.16.0/24 +... +Require ip 192.54.172.0/24 192.54.148.0/24 + +
    + +
    + + + +UndefMacro +Undefine a macro + +UndefMacro name + +server config +virtual host +directory + + + +

    The UndefMacro directive undefines a macro + which has been defined before hand.

    + + +UndefMacro LocalAccessPolicy +UndefMacro RestrictedAccessPolicy + +
    +
    + +
    diff --git a/docs/manual/mod/mod_macro.xml.fr b/docs/manual/mod/mod_macro.xml.fr new file mode 100644 index 00000000000..66c56f2e9c8 --- /dev/null +++ b/docs/manual/mod/mod_macro.xml.fr @@ -0,0 +1,286 @@ + + + + + + + + + + + +mod_macro +Ce module permet d'utiliser des macros dans les fichiers +de configuration Apache. +Base +mod_macro.c +macro_module + + + +

    Ce module permet d'utiliser des macros dans les fichiers de + configuration à l'exécution du serveur HTTP Apache afin de faciliter + la création de nombreux blocs de configuration similaires. Quand le + serveur démarre, les macros sont exécutées avec les paramètres + fournis, et le résultat obtenu est traité au même titre que le reste + du fichier de configuration.

    + +
    + +
    Utilisation +

    On définit une macro à l'aide des blocs Macro qui contiennent la portion de votre +configuration qui intervient de manière répétitive, y compris les +variables pour les parties qui devront être substituées.

    + +

    Par exemple, vous pouvez utiliser une macro pour définir un bloc +VirtualHost, afin de pouvoir +définir de nombreux serveurs virtuels similaires :

    + + +<Macro VHost $name $domain> +<VirtualHost *:80> + ServerName $domain + ServerAlias www.$domain + + DocumentRoot "/var/www/vhosts/$name" + ErrorLog "/var/log/httpd/$name.error_log" + CustomLog "/var/log/httpd/$name.access_log" combined +</VirtualHost> +</Macro> + + +

    Comme les directives de configuration httpd, les noms des macros sont +insensibles à la casse, à la différence des variables qui y sont, elles, +sensibles.

    + +

    Vous pouvez alors invoquer cette macro autant de fois que vous le +voulez pour créer des serveurs virtuels

    + + +Use VHost example example.com +Use VHost myhost hostname.org +Use VHost apache apache.org + +UndefMacro VHost + + +

    Au démarrage du serveur, chacune de ces invocations +Use sera remplacée par une définition de serveur +virtuel complète, comme décrit dans la définition de la +Macro.

    + +

    La directive UndefMacro permet d'éviter les +conflits de définitions qui pourraient provenir de l'utilisation +ultérieure de macros contenant les mêmes noms de variables.

    + +

    Vous trouverez une version plus élaborée de cet exemple plus loin +dans la section Exemples.

    + +
    + +
    Conseils + +

    Les noms de paramètres doivent commencer par un sigil tel que +$, %, ou @, de façon à ce qu'ils +soient clairement identifiables, mais aussi afin de faciliter les +interactions avec les autres directives, comme la directive de base +Define. Dans le cas contraire, vous +recevrez un avertissement. En tout état de cause, il est conseillé +d'avoir une bonne connaissance globale de la configuration du serveur, +afin d'éviter la réutilisation des mêmes variables à différents niveaux, +ce qui peut être à l'origine de confusions.

    + +

    Les paramètres préfixés par $ ou % ne sont +pas échappés. Les paramètres préfixés par @ sont échappés +entre guillemets.

    + +

    Evitez de préfixer un paramètre par le nom d'un autre paramètre (par +exemple, présence simultanée des paramètres $win et +$winter), car ceci peut introduire de la confusion lors de +l'évaluation des expressions. Si cela se produit, c'est le nom de +paramètre le plus long possible qui sera utilisé.

    + +

    Si vous désirez insérer une valeur dans une chaîne, il est conseillé +de l'entourer d'accolades afin d'éviter toute confusion :

    + + +<Macro DocRoot ${docroot}> + DocumentRoot "/var/www/${docroot}/htdocs" +</Macro> + + +
    + +
    +Exemples + +
    +Définition de serveurs virtuels + +

    Un exemple typique d'utilisation de mod_macro est la +création dynamique de serveurs virtuels.

    + + +## Définition d'une macro VHost pour les configurations répétitives + +<Macro VHost $host $port $dir> + Listen $port + <VirtualHost *:$port> + + ServerName $host + DocumentRoot "$dir" + + # Racine des documents publique + <Directory "$dir"> + Require all granted + </Directory> + + # restriction d'accès au sous-répertoire intranet. + <Directory "$dir/intranet"> + Require ip 10.0.0.0/8 + </Directory> + </VirtualHost> +</Macro> + +## Utilisation de la macro VHost avec différents arguments. + +Use VHost www.apache.org 80 /vhosts/apache/htdocs +Use VHost example.org 8080 /vhosts/example/htdocs +Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs + +
    + +
    +Suppression d'une définition de macro + +

    Il est recommandé de supprimer la définition d'une macro après +l'avoir utilisée. Ceci permet d'éviter les confusions au sein d'un +fichier de configuration complexe où des conflits entre noms de +variables peuvent survenir.

    + + +<Macro DirGroup $dir $group> + <Directory "$dir"> + Require group $group + </Directory> +</Macro> + +Use DirGroup /www/apache/private private +Use DirGroup /www/apache/server admin + +UndefMacro DirGroup + + +
    + +
    + + + +Macro +Définition d'une macro dans un fichier de configuration + +<Macro nom [par1 .. parN]> +... </Macro> + +server config +virtual host +directory + + + +

    La directive Macro permet de définir une macro + dans un fichier de configuration Apache. Le premier argument est le nom + de la macro, et les arguments suivants sont les paramètres. Il + est de bon aloi de préfixer les noms des paramètres d'une macro + avec un caractère parmi '$%@', et d'éviter d'en faire + de même avec les noms de macros. +

    + + +<Macro LocalAccessPolicy> + Require ip 10.2.16.0/24 +</Macro> + +<Macro RestrictedAccessPolicy $ipnumbers> + Require ip $ipnumbers +</Macro> + +
    +
    + + + +Use +Utilisation d'une macro +Use nom [valeur1 ... valeurN] + + +server config +virtual host +directory + + + +

    La directive Use permet d'utiliser une macro. + La macro considérée est expansée. Son nombre d'arguments doit être égal au + nombre de paramètres précisés dans sa définition. Les valeurs passées en + argument sont attribuées aux paramètres correspondants et + substituées avant l'interprétation du texte de la macro.

    + + +Use LocalAccessPolicy +... +Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24" + + +

    est équivalent, avec les macros définies ci-dessus à :

    + + +Require ip 10.2.16.0/24 +... +Require ip 192.54.172.0/24 192.54.148.0/24 + +
    +
    + + + +UndefMacro +Supprime une macro + +UndefMacro nom + +server config +virtual host +directory + + + +

    La directive UndefMacro annule la définition + d'une macro qui doit avoir été définie auparavant.

    + + +UndefMacro LocalAccessPolicy +UndefMacro RestrictedAccessPolicy + +
    +
    + +
    diff --git a/docs/manual/mod/mod_macro.xml.meta b/docs/manual/mod/mod_macro.xml.meta new file mode 100644 index 00000000000..2e26ebcdf4e --- /dev/null +++ b/docs/manual/mod/mod_macro.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_macro + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_mime.html b/docs/manual/mod/mod_mime.html index 942dc58a0ee..db18e2febb6 100644 --- a/docs/manual/mod/mod_mime.html +++ b/docs/manual/mod/mod_mime.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_mime.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_mime.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_mime.html.en b/docs/manual/mod/mod_mime.html.en index 96438fe1846..39b5679f606 100644 --- a/docs/manual/mod/mod_mime.html.en +++ b/docs/manual/mod/mod_mime.html.en @@ -1,27 +1,33 @@ - -mod_mime - Apache HTTP Server +mod_mime - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_mime

    Available Languages:  en  | + fr  |  ja 

    overriding any mappings that already exist for the same extension.

    -

    Example

    - AddLanguage ja .ja
    - AddCharset EUC-JP .euc
    - AddCharset ISO-2022-JP .jis
    - AddCharset SHIFT_JIS .sjis -

    +

    Example

    AddLanguage ja .ja
    +AddCharset EUC-JP .euc
    +AddCharset ISO-2022-JP .jis
    +AddCharset SHIFT_JIS .sjis
    +

    Then the document xxxx.ja.jis will be treated as being a Japanese document whose charset is ISO-2022-JP @@ -313,10 +316,9 @@ type overriding any mappings that already exist for the same extension.

    -

    Example

    - AddEncoding x-gzip .gz
    - AddEncoding x-compress .Z -

    +

    Example

    AddEncoding x-gzip .gz
    +AddEncoding x-compress .Z
    +

    This will cause filenames containing the .gz extension to be marked as encoded using the x-gzip encoding, and @@ -362,9 +364,8 @@ handler activate CGI scripts with the file extension .cgi, you might use:

    -

    - AddHandler cgi-script .cgi -

    +
    AddHandler cgi-script .cgi
    +

    Once that has been put into your httpd.conf file, any file containing the .cgi extension will be treated as a CGI program.

    @@ -390,8 +391,6 @@ client requests -
    Description:Associates the requested filename's extensions @@ -74,7 +80,12 @@ their last modified date) to ensure that all visitors are receive the corrected content headers.

    -
    top

    Files with Multiple Extensions

    @@ -153,13 +159,10 @@ script, but not the file bar.cgi.html, then instead of using AddHandler cgi-script .cgi, use

    -

    Configure handler based on final extension only

    - <FilesMatch \.cgi$> - - SetHandler cgi-script - - </FilesMatch> -

    +

    Configure handler based on final extension only

    <FilesMatch "[^.]+\.cgi$">
    +  SetHandler cgi-script
    +</FilesMatch>
    +
    top
    @@ -202,7 +205,8 @@ resource, in order to tell the client browser about the encoding method.

    -

    Content-encoding: pkzip

    +
    Content-encoding: pkzip
    +
    top

    Character sets and languages

    @@ -235,8 +239,8 @@ render the information.

    - Content-Language: en, fr
    - Content-Type: text/plain; charset=ISO-8859-1 +Content-Language: en, fr +Content-Type: text/plain; charset=ISO-8859-1

    The language specification is the two-letter abbreviation @@ -265,12 +269,11 @@ charset

    Override:FileInfo
    Status:Base
    Module:mod_mime
    Compatibility:AddInputFilter is only available in Apache 2.0.26 and -later.

    AddInputFilter maps the filename extension extension to the filters which @@ -437,11 +436,10 @@ language This directive overrides any mappings that already exist for the same extension.

    -

    Example

    - AddEncoding x-compress .Z
    - AddLanguage en .en
    - AddLanguage fr .fr -

    +

    Example

    AddEncoding x-compress .Z
    +AddLanguage en .en
    +AddLanguage fr .fr
    +

    Then the document xxxx.en.Z will be treated as being a compressed English document (as will the document @@ -456,11 +454,10 @@ language extension, the last one encountered is the one that is used. That is, for the case of:

    -

    - AddLanguage en .en
    - AddLanguage en-gb .en
    - AddLanguage en-us .en -

    +
    AddLanguage en .en
    +AddLanguage en-gb .en
    +AddLanguage en-us .en
    +

    documents with the extension .en would be treated as being en-us.

    @@ -486,8 +483,6 @@ responses from the server Override:FileInfo Status:Base Module:mod_mime -Compatibility:AddOutputFilter is only available in Apache 2.0.26 and -later.

    The AddOutputFilter directive maps the filename extension extension to the filters which will process responses @@ -500,9 +495,8 @@ later. .shtml files for server-side includes and will then compress the output using mod_deflate.

    -

    - AddOutputFilter INCLUDES;DEFLATE shtml -

    +
    AddOutputFilter INCLUDES;DEFLATE shtml
    +

    If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -513,6 +507,32 @@ later. extension argument will be compared against each of them.

    +

    Note that when defining a set of filters using the + AddOutputFilter directive, + any definition made will replace any previous definition made by + the AddOutputFilter + directive.

    + +
    # Effective filter "DEFLATE"
    +AddOutputFilter DEFLATE shtml
    +<Location "/foo">
    +  # Effective filter "INCLUDES", replacing "DEFLATE"
    +  AddOutputFilter INCLUDES shtml
    +</Location>
    +<Location "/bar">
    +  # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
    +  AddOutputFilter INCLUDES;DEFLATE shtml
    +</Location>
    +<Location "/bar/baz">
    +  # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
    +  AddOutputFilter BUFFER shtml
    +</Location>
    +<Location "/bar/baz/buz">
    +  # No effective filter, replacing "BUFFER"
    +  RemoveOutputFilter shtml
    +</Location>
    + +

    See also

    -

    Example

    - AddType image/gif .gif -

    +

    Example

    AddType image/gif .gif
    +

    Or, to specify multiple file extensions in one directive:

    -

    Example

    - AddType image/jpeg jpeg jpg jpe -

    +

    Example

    AddType image/jpeg jpeg jpg jpe
    +

    The extension argument is case-insensitive and can be specified with or without a leading dot. Filenames may have multiple extensions and the @@ -565,9 +583,8 @@ type can be achieved by qualifying a media-type with qs:

    -

    Example

    - Addtype application/rss+xml;qs=0.8 .xml -

    +

    Example

    AddType application/rss+xml;qs=0.8 .xml
    +

    This is useful in situations, e.g. when a client requesting Accept: */* can not actually processes @@ -579,6 +596,29 @@ type a Content-Type, this directive has no effect.

    +

    Note

    +

    If no handler is explicitly set for a request, the specified content + type will also be used as the handler name.

    + +

    When explicit directives such as + SetHandler or + AddHandler do not apply + to the current request, the internal handler name normally set by those + directives is instead set to the content type specified by this directive. +

    +

    + This is a historical behavior that may be used by some third-party modules + (such as mod_php) for taking responsibility for the matching request. +

    + +

    Configurations that rely on such "synthetic" types should be avoided. + Additionally, configurations that restrict access to + SetHandler or + AddHandler should + restrict access to this directive as well.

    +
    + +

    See also

    • ForceType
    • @@ -613,9 +653,8 @@ assigned a language-tag by some other means. by AddLanguage, then no Content-Language header field will be generated.

      -

      Example

      - DefaultLanguage en -

      +

      Example

      DefaultLanguage en
      +

      See also

        @@ -632,7 +671,6 @@ components as part of the filename Context:directory Status:Base Module:mod_mime -Compatibility:Available in Apache 2.0.41 and later

        The ModMimeUsePathInfo directive is used to combine the filename with the path_info URL component to @@ -642,9 +680,8 @@ components as part of the filename

        This directive is recommended when you have a virtual filesystem.

        -

        Example

        - ModMimeUsePathInfo On -

        +

        Example

        ModMimeUsePathInfo On
        +

        If you have a request for /index.php/foo.shtml mod_mime will now treat the @@ -672,7 +709,6 @@ a matching file with MultiViews Override:FileInfo Status:Base Module:mod_mime -Compatibility:Available in Apache 2.0.26 and later.

        MultiviewsMatch permits three different behaviors for mod_negotiation's @@ -701,16 +737,15 @@ a matching file with MultiViews

        You may finally allow Any extensions to match, even if mod_mime doesn't recognize the extension. This can cause - unpredicatable results, such as serving .old or .bak files the webmaster + unpredictable results, such as serving .old or .bak files the webmaster never expected to be served.

        For example, the following configuration will allow handlers and filters to participate in Multviews, but will exclude unknown files:

        -

        - MultiviewsMatch Handlers Filters -

        +
        MultiviewsMatch Handlers Filters
        +

        MultiviewsMatch is not allowed in a <Location> or <LocationMatch> section.

        @@ -733,8 +768,6 @@ extensions Override:FileInfo Status:Base Module:mod_mime -Compatibility:RemoveCharset is only available in Apache 2.0.24 and -later.

        The RemoveCharset directive removes any character set associations for files with the given extensions. @@ -745,9 +778,8 @@ later.

        The extension argument is case-insensitive and can be specified with or without a leading dot.

        -

        Example

        - RemoveCharset .html .shtml -

        +

        Example

        RemoveCharset .html .shtml
        +
    top
    @@ -768,15 +800,12 @@ extensions any associations inherited from parent directories or the server config files. An example of its use might be:

    -

    /foo/.htaccess:

    - AddEncoding x-gzip .gz
    - AddType text/plain .asc
    - <Files *.gz.asc>
    - - RemoveEncoding .gz
    -
    - </Files> -

    +

    /foo/.htaccess:

    AddEncoding x-gzip .gz
    +AddType text/plain .asc
    +<Files "*.gz.asc">
    +    RemoveEncoding .gz
    +</Files>
    +

    This will cause foo.gz to be marked as being encoded with the gzip method, but foo.gz.asc as an @@ -811,13 +840,11 @@ extensions associations inherited from parent directories or the server config files. An example of its use might be:

    -

    /foo/.htaccess:

    - AddHandler server-parsed .html -

    +

    /foo/.htaccess:

    AddHandler server-parsed .html
    +
    -

    /foo/bar/.htaccess:

    - RemoveHandler .html -

    +

    /foo/bar/.htaccess:

    RemoveHandler .html
    +

    This has the effect of returning .html files in the /foo/bar directory to being treated as normal @@ -838,8 +865,6 @@ extensions Override:FileInfo Status:Base Module:mod_mime -Compatibility:RemoveInputFilter is only available in Apache 2.0.26 and -later.

    The RemoveInputFilter directive removes any input filter associations for files with @@ -868,8 +893,6 @@ extensions Override:FileInfo Status:Base Module:mod_mime -Compatibility:RemoveLanguage is only available in Apache 2.0.24 and -later.

    The RemoveLanguage directive removes any language associations for files with the given extensions. This @@ -892,8 +915,6 @@ extensions Override:FileInfo Status:Base Module:mod_mime -Compatibility:RemoveOutputFilter is only available in Apache 2.0.26 and -later.

    The RemoveOutputFilter directive removes any output filter associations for files with @@ -905,9 +926,8 @@ later.

    The extension argument is case-insensitive and can be specified with or without a leading dot.

    -

    Example

    - RemoveOutputFilter shtml -

    +

    Example

    RemoveOutputFilter shtml
    +

    See also

      @@ -933,9 +953,8 @@ extensions directories or the server config files. An example of its use might be:

      -

      /foo/.htaccess:

      - RemoveType .cgi -

      +

      /foo/.htaccess:

      RemoveType .cgi
      +

      This will remove any special handling of .cgi files in the /foo/ directory and any beneath it, @@ -1012,8 +1031,30 @@ extensions

      Available Languages:  en  | + fr  |  ja 

      -
      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_mime.html.fr b/docs/manual/mod/mod_mime.html.fr new file mode 100644 index 00000000000..6606e2abe26 --- /dev/null +++ b/docs/manual/mod/mod_mime.html.fr @@ -0,0 +1,1129 @@ + + + + + +mod_mime - Serveur Apache HTTP Version 2.4 + + + + + + + + +
      <-
      + +
      +

      Module Apache mod_mime

      +
      +

      Langues Disponibles:  en  | + fr  | + ja 

      +
      + + + +
      Description:Associe les extensions des fichiers demands avec l'action +dclenche par ces fichiers et avec leur contenu (type MIME, langue, +jeu de caractre et codage)
      Statut:Base
      IdentificateurdeModule:mime_module
      FichierSource:mod_mime.c
      +

      Sommaire

      + +

      Ce module permet d'assigner des mtadonnes aux contenus + slectionns pour une rponse HTTP, en associant des modles d'URI + ou de noms de fichiers aux valeurs des mtadonnes. Par exemple, les + extensions de noms de fichiers dfinissent souvent le type de mdium + Internet, la langue, le jeu de caractres et le codage du contenu. + Ces informations sont relayes par les messages HTTP vhiculant ces + contenus, et utilises au cours de la ngociation de contenu lors de + la slection des diffrentes possibilits, de manire ce que les + prfrences des utilisateurs soient respectes lors du choix d'un + contenu servir parmi plusieurs autres contenus. Voir + mod_negotiation pour plus d'informations propos + de la ngociation de + contenu.

      + +

      Les directives AddCharset, AddEncoding, AddLanguage et AddType permettent d'associer des + extensions de fichiers aux mtadonnes de ces fichiers. Elles + dfinissent respectivement le jeu de caractres, le codage du + contenu, la langue du contenu et le type de + mdium (content-type) des documents. La directive + TypesConfig permet de + spcifier un fichier qui contient lui-mme des associations entre + extensions et types de media.

      + +

      De plus, mod_mime peut dfinir le gestionnaire et les filtres qui sont l'origine du contenu et + le traitent. Les directives AddHandler, AddOutputFilter, et AddInputFilter permettent de contrler + les modules ou les scripts qui vont servir le document. La directive + MultiviewsMatch permet + mod_negotiation de dterminer les extensions de + fichiers inclure lors des tests de correspondances multivues.

      + +

      Alors que mod_mime associe des mtadonnes avec + des extensions de fichiers, le serveur de base core + fournit des directives permettant d'associer tous les fichiers d'un + conteneur donn (par exemple <Location>, <Directory>, ou <Files>) avec des mtadonnes particulires. + Parmi ces directives, on trouve ForceType, SetHandler, SetInputFilter, et SetOutputFilter. Les directives du serveur + de base l'emportent sur toute directive d'association d'extensions + de noms de fichiers dfinie par mod_mime.

      + +

      Notez que la modification des mtadonnes d'un fichier ne modifie + pas la valeur de l'en-tte Last-Modified. Ainsi, + certaines copies de documents pralablement mises en cache peuvent + encore tre utilises par un client ou un mandataire avec les + anciens en-ttes. Si vous modifiez les mtadonnes (langue, type de + contenu, jeu de caractre ou codage), vous devez donc enregistrer + une modification du fichier concern (afin de mettre jour sa date + de dernire modification), pour tre sr que tous les visiteurs + recevront le documents avec les en-ttes corrects.

      +
      + +
      top
      +
      +

      Fichiers avec extensions +multiples

      +

      Les fichiers peuvent possder plusieurs extensions dont l'ordre + est normalement sans importance. Par exemple, si + le fichier welcome.html.fr est associ au type de + contenu text/html et la langue franaise, le fichier + welcome.fr.html possdera exactement les mme + mtadonnes. Si le fichier possde plusieurs extensions associes + au mme type de mtadonne, c'est celle de ces extensions la plus + droite qui sera utilise, except pour ce qui concerne les langues + et les codages de contenu. Par exemple, si .gif est + associ au type de mdium + image/gif, et .html au type de mdium + text/html, le fichier welcome.gif.html + sera associ au type de mdium text/html.

      + +

      Les Languages et les codages de contenu sont traits de + manire cumulative, car il est possible d'assigner plusieurs + langues ou codages une ressource particulire. Par exemple, le + fichier welcome.html.en.de sera servi avec les en-ttes + Content-Language: en, de et Content-Type: + text/html.

      + +

      Des prcautions doivent tre prises lorsqu'un fichier avec + extensions multiples est associ la fois un type de + mdium et un gestionnaire. En gnral, cela impliquera + la gestion de la requte par le module associ au gestionnaire. Par + exemple, si l'extension .imap est associe au + gestionnaire imap-file (du module + mod_imagemap), et si l'extension .html + est associe au type de mdium text/html, le fichier + world.imap.html sera la fois associ au gestionnaire + imap-file et au type de mdium text/html. + Pour son traitement, c'est le gestionnaire imap-file + qui sera utilis, et il sera donc trait en tant que fichier + imagemap.

      + +

      Si vous prfrez que seule la dernire partie d'un nom de fichier + spare du reste du nom par un point soit associe une mtadonne + particulire, n'utilisez pas les directives Add*. Par + exemple, si vous souhaitez que le fichier foo.html.cgi + soit trait en tant que script CGI, mais pas le fichier + bar.cgi.html, alors, au lieu d'utiliser + AddHandler cgi-script .cgi, utilisez plutt :

      + +

      Configuration du gestionnaire en se basant seulement + sur la dernire extension

      <FilesMatch "[^.]+\.cgi$">
      +  SetHandler cgi-script
      +</FilesMatch>
      +
      + +
      top
      +
      +

      Codage du contenu

      +

      Un fichier d'un type de mdium particulier + peut tre galement cod d'une certaine manire pour simplifier sa + transmission sur Internet. Alors que cela concerne en gnral la + compression, comme gzip, il peut aussi s'agir de + chiffrement, comme pgp ou d'un codage comme UUencoding, + qui est conu pour transmettre un fichier binaire sous un format + ASCII (texte).

      + +

      La RFC + HTTP/1.1, section 14.11 stipule ce titre :

      + +
      +

      Le champ d'en-tte Content-Encoding de l'entit est utilis en + tant que modificateur du type de mdium. Lorsqu'il est prsent, sa + valeur indique quels codages de contenu additionnels ont t + appliqus au corps de l'entit, et ainsi quels mcanismes de + dcodage doivent tre appliqus afin de retrouver le type de + mdium rfrenc par le champ d'en-tte Content-Type. Le codage de + contenu est principalement utilis pour permettre la compression + d'un document sans perdre l'information concernant le type de + mdium sous-jacent.

      +
      + +

      En utilisant plusieurs extensions (voir la section ci-dessus propos des extensions de + fichiers multiples), vous pouvez indiquer qu'un fichier est d'un + type, particulier, et possde aussi un codage + particulier.

      + +

      Considrons par exemple un fichier contenant un document + Microsoft Word et compress par pkzip pour rduire sa taille. Si + l'extension .doc est associe au type de fichier + Microsoft Word, et si l'extension .zip est associe au + codage de fichier pkzip, alors le fichier + Resume.doc.zip sera identifi comme document Word + compress par pkzip.

      + +

      Apache joint un en-tte Content-encoding la + ressource afin d'informer le navigateur client propos de la + mthode de codage.

      + +
      Content-encoding: pkzip
      + +
      top
      +
      +

      Jeux de caractres et langues

      +

      En plus du type de fichier et du codage, un autre lment + important d'information est la langue dans laquelle le document est + crit, et avec quel jeu de caractres le contenu du fichier doit + tre affich. Par exemple, un document peut tre crit en alphabet + vietnamien ou cyrillique, et doit tre affich en consquence. Cette + information est galement transmise via des en-ttes HTTP.

      + +

      Les jeu de caractres, langue, codage et type MIME sont tous + utiliss au cours du processus de ngociation de contenu (voir + mod_negotiation) afin de dterminer quel document + servir au client, lorsque plusieurs choix sont possibles en fonction + du jeu de caractres, de la langue, du codage ou du type MIME. Toutes + les associations d'extensions de noms de fichiers cres via les + directives AddCharset, + AddEncoding, AddLanguage et AddType (ainsi que les associations + d'extensions listes dans le fichier dfini par la directive + MimeMagicFile), + participent ce processus de slection. Les extensions de noms de + fichiers qui n'ont t associs que par des directives AddHandler, AddInputFilter ou AddOutputFilter, peuvent tre incluses + ou exclues du processus de slection en utilisant la directive + MultiviewsMatch.

      + +

      Jeu de caractres

      +

      Pour transmettre cette information supplmentaire, Apache peut + ajouter un en-tte Content-Language, afin de + spcifier la langue dans laquelle le document est crit, et peut + ajouter des informations additionnelles l'en-tte + Content-Type pour indiquer le jeu de caractres + particulier qui doit tre utilis pour restituer correctement le + document.

      + +

      + Content-Language: en, fr +Content-Type: text/plain; charset=ISO-8859-1 +

      + +

      La langue est spcifie via son abrviation en deux lettres. Le + jeu de caractres est le nom du jeu de caractres + particulier qui doit tre utilis.

      + +
      +
      top
      +

      Directive AddCharset

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers spcifies au +jeu de caractres spcifi
      Syntaxe:AddCharset jeu-car extension +[extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddCharset permet d'associer + les extensions de noms de fichiers spcifies au jeu de caractres + spcifi (le nom enregistr sur l'Internet d'un codage de caractres + donn). jeu-car est le paramtre jeu + de caractres du type de mdium pour les ressources dont le nom + de fichier contient extension. Cette association est + ajoute toutes les autres dj en vigueur, et crase toute + association prexistante pour la mme extension.

      + +

      Exemple

      AddLanguage ja .ja
      +AddCharset EUC-JP .euc
      +AddCharset ISO-2022-JP .jis
      +AddCharset SHIFT_JIS .sjis
      +
      + +

      Avec cet exemple, le document xxxx.ja.jis sera + trait en tant que document japonais dont le jeu de caractre est + ISO-2022-JP (idem pour le document + xxxx.jis.ja). La directive + AddCharset sert la fois informer le + client sur le codage des caractres du document afin que ce dernier + puisse tre interprt et affich correctement, et la ngociation de contenu, au + cours de laquelle le serveur dcide lequel parmi plusieurs + documents possibles il renvoie au client en fonction des prfrences + de ce dernier en matire de jeu de caractres.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + + +

      Voir aussi

      + +
      +
      top
      +

      Directive AddEncoding

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers donnes au type +de codage spcifi
      Syntaxe:AddEncoding codage extension +[extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddEncoding permet d'associer + les extensions de noms de fichiers donnes au codage de contenu HTTP + spcifi. codage est le codage de contenu HTTP ajouter + la valeur du champ d'en-tte Content-Encoding pour les documents + possdant l'extension spcifie. Cette association est + ajoute toutes les autres dj en vigueur, et crase toute + association prexistante pour la mme extension.

      + +

      Exemple

      AddEncoding x-gzip .gz
      +AddEncoding x-compress .Z
      +
      + +

      Avec cet exemple, les noms de fichiers possdant l'extension + .gz seront marqus comme cods l'aide du codage + x-gzip, et les noms de fichiers possdant l'extension + .Z comme cods avec x-compress.

      + +

      Les clients anciens n'acceptent que x-gzip et + x-compress, bien que les standards stipulent qu'ils + sont respectivement quivalents gzip et + compress. Apache effectue ses comparaisons de codages + de contenu en ignorant tout prfixe x-. Lorsqu'il + rpond avec un codage, Apache utilise l'une ou l'autre forme (c'est + dire x-foo ou foo) selon les besoins du + client. Si le client n'a pas besoin d'une forme particulire, Apache + utilisera la forme employe par la directive + AddEncoding. Pour rsumer, vous devez toujours utiliser + x-gzip et x-compress pour ces deux + codages spcifiques. Certains codages plus rcents, comme + deflate, doivent tre spcifis sans le prfixe + x-.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + +
      +
      top
      +

      Directive AddHandler

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers donnes au +gestionnaire spcifi
      Syntaxe:AddHandler nom-gestionnaire extension +[extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      Les fichiers dont le nom a pour extension extension + seront servis par le nom-gestionnaire spcifi. Cette + association est ajoute toutes les autres dj en vigueur, et + crase toute association prexistante pour la mme + extension. Par exemple, pour associer les scripts CGI + avec l'extension de fichier .cgi, vous pouvez utiliser + :

      + +
      AddHandler cgi-script .cgi
      + + +

      Une fois cette ligne insre dans votre fichier httpd.conf, tout + fichier possdant l'extension .cgi sera trait en tant + que programme CGI.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + +

      Voir aussi

      + +
      +
      top
      +

      Directive AddInputFilter

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers aux +filtres spcifis qui traiteront les requtes clients
      Syntaxe:AddInputFilter filtre[;filtre...] +extension [extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddInputFilter permet + d'associer l'extension de nom de fichier extension aux filtres spcifis qui traiteront les + requtes clients et les entres POST leur rception par le + serveur. Ceci s'ajoute toute dfinition de filtre prexistante, y + compris la directive SetInputFilter. Cette + association est ajoute toutes les autres dj en vigueur, et + crase toute association prexistante pour la mme + extension.

      + +

      Si plusieurs filtres sont spcifis, ils doivent tre + spars par des points-virgules et inscrits dans l'ordre selon + lequel ils devront traiter le contenu. L'argument filtre + est insensible la casse.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + + +

      Voir aussi

      + +
      +
      top
      +

      Directive AddLanguage

      + + + + + + + +
      Description:Associe l'extension de nom de fichier donne la langue +spcifi
      Syntaxe:AddLanguage symbole-langue extension +[extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddLanguage permet d'associer + l'extension de nom de fichier donne la langue spcifie. Les + fichiers dont l'extension correspond la valeur + de l'argument extension se voient attribuer la valeur de + l'argument symbole-langue comme en-tte HTTP + Content-Language en accord avec les identifiants de langues dfinis + par la RFC 3066. Cette directive l'emporte sur toute association + prexistante pour la mme extension.

      + +

      Exemple

      AddEncoding x-compress .Z
      +AddLanguage en .en
      +AddLanguage fr .fr
      +
      + +

      Avec cet exemple, le document xxxx.en.Z sera trait + en tant que document compress de langue anglaise (idem pour le + document xxxx.Z.en). Bien que la langue soit fournie au + client, le navigateur n'utilise habituellement pas cette + information. La directive AddLanguage est + principalement utilise au cours de la ngociation de contenu, o le + serveur choisit d'envoyer un document parmi plusieurs documents + possibles en fonction de la prfrence du client en matire de + langue.

      + +

      Si une extension fait l'objet de plusieurs associations de + langues, c'est la dernire qui sera utilise. Ainsi, dans le cas + suivant,

      + +
      AddLanguage en .en
      +AddLanguage en-gb .en
      +AddLanguage en-us .en
      + + +

      les documents possdant l'extension .en seront + traits en tant que documents de langue en-us.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + +

      Voir aussi

      + +
      +
      top
      +

      Directive AddOutputFilter

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers aux +filtres spcifis qui traiteront les rponses en provenance du +serveur
      Syntaxe:AddOutputFilter filtre[;filtre...] +extension [extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddOutputFilter permet + d'associer l'extension de nom de fichier dfinie par l'argument + extension aux filtres qui traiteront les rponses en + provenance du serveur avant de les envoyer au client. Ces filtres + s'ajoutent tout filtre dfini par d'autres directives comme + SetOutputFilter et AddOutputFilterByType. Cette association + est fusionne avec toute autre association en vigueur, et l'emporte + sur toute association prexistante pour la mme + extension.

      + +

      Avec l'exemple suivant, tous les fichiers .shtml + seront traits en tant qu'inclusions ct serveur (SSI), et la + sortie sera compresse l'aide du module + mod_deflate.

      + +
      AddOutputFilter INCLUDES;DEFLATE shtml
      + + +

      Si plusieurs filtres sont spcifis, ils doivent tre + spars par des points-virgules et inscrits dans l'ordre selon + lequel il devront traiter le contenu. L'argument filtre + est insensible la casse.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + +

      Notez que toute dfinition de filtres via la directive AddOutputFilter remplace toutes les + dfinitions prcdentes effectues via cette mme directive.

      + +
      # Filtre spcifi "DEFLATE"
      +AddOutputFilter DEFLATE shtml
      +<Location "/foo">
      +  # Filtre spcifi "INCLUDES", remplace "DEFLATE"
      +  AddOutputFilter INCLUDES shtml
      +</Location>
      +<Location "/bar">
      +  # Filtre spcifi "INCLUDES;DEFLATE", remplace "DEFLATE"
      +  AddOutputFilter INCLUDES;DEFLATE shtml
      +</Location>
      +<Location "/bar/baz">
      +  # Filtre spcifi "BUFFER", remplace "INCLUDES;DEFLATE"
      +  AddOutputFilter BUFFER shtml
      +</Location>
      +<Location "/bar/baz/buz">
      +  # Pas de filtre spcifi, suppression de "BUFFER"
      +  RemoveOutputFilter shtml
      +</Location>
      + + +

      Voir aussi

      + +
      +
      top
      +

      Directive AddType

      + + + + + + + +
      Description:Associe les extensions de noms de fichiers au type de +contenu spcifi
      Syntaxe:AddType type-mdium extension +[extension] ...
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive AddType permet d'associer les + extensions de noms de fichiers donnes au type de contenu spcifi. + type-mdium est le Type + MIME utiliser pour les fichiers dont le nom possde + l'extension extension. Cette association s'ajoute toute + autre association en vigueur, et l'emporte sur toute association + prexistante pour la mme extension.

      + +
      + Plutt que d'diter directement le fichier TypesConfig, il est recommand + d'utiliser la directive AddType pour + ajouter de nouveaux types de mdias. +
      + +

      Exemple

      AddType image/gif .gif
      +
      + +

      Ou, pour spcifier plusieurs extensions dans une seule directive + :

      + +

      Exemple

      AddType image/jpeg jpeg jpg jpe
      +
      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial. Les noms de fichiers + peuvent possder plusieurs extensions, et + l'argument extension sera compar chacune d'entre + elles.

      + +

      Il est possible d'obtenir un effet similaire celui de la + directive LanguagePriority du module + mod_negotiation en qualifiant un type de + mdia avec qs :

      + +

      Exemple

      AddType application/rss+xml;qs=0.8 .xml
      +
      + +

      Ceci peut s'avrer utile dans certaines situations, par exemple + lorsqu'un client qui a ajout un en-tte Accept: */* + sa requte n'est pas en mesure de traiter le contenu renvoy par le + serveur.

      + +

      la base, cette directive configure le type de contenu gnr + pour les fichiers statiques servis partir du systme de fichiers. + Dans le cas des ressources autres que les fichiers statiques pour + lesquelles le gnrateur de la rponse spcifie en gnral un + Content-Type, cette directive n'a aucun effet.

      + +

      Note

      +

      Si aucun gestionnaire n'est explicitement dfini pour une + requte, le type de contenu spcifi sera aussi utilis comme nom du + gestionnaire.

      + +

      Lorsqu'aucune directive comme SetHandler ou + module="mod_mime">AddHandler ne s'applique + une requte, le nom de gestionnaire interne normalement dfini + par une de ces directives est en fait dfini par le type de contenu + spcifi par la prsente directive.

      +

      + Pour des raisons historiques, certains modules tiers comme mod_php + peuvent adopter ce type de comportement pour prendre en compte la + requte concerne. +

      +

      Il est conseill d'viter les configurations qui reposent sur de + tels types "synthtiques". En outre, les configurations qui + limitent l'accs aux directives SetHandler ou AddHandler doivent aussi limiter + l'accs la directive AddType.

      +
      + + +

      Voir aussi

      + +
      +
      top
      +

      Directive DefaultLanguage

      + + + + + + + +
      Description:Dfinit un symbole de langue par dfaut affecter au champ +d'en-tte Content-Language pour toutes les ressources dans le contexte +courant auxquelles aucun symbole de langue n'a t +associ.
      Syntaxe:DefaultLanguage symbole-langue
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive DefaultLanguage permet + d'indiquer Apache que toutes les ressources du contexte courant + (par exemple, toutes les ressources concernes par le conteneur + <Directory> + courant) qui ne possdent pas d'extension de langue explicite + (comme .fr ou .de tel que dfini par la + directive AddLanguage), + verront leur en-tte HTTP Content-Language affect de la langue + symbole-langue. Ceci permet de marquer des arborescences + de rpertoires entires comme contenant des documents en franais, + par exemple, sans avoir renommer chaque fichier. Notez qu' la + diffrence de l'utilisation des extensions pour spcifier des + langues, DefaultLanguage ne permet de + spcifier qu'une seule langue.

      + +

      Si aucune directive DefaultLanguage n'est + en vigueur, et si un fichier ne possde pas d'extension configure + par la directive AddLanguage, aucun champ d'en-tte + Content-Language ne sera gnr.

      + +

      Exemple

      DefaultLanguage en
      +
      + +

      Voir aussi

      + +
      +
      top
      +

      Directive ModMimeUsePathInfo

      + + + + + + + +
      Description:Indique mod_mime de traiter les lments +de path_info en tant que parties du nom de +fichier
      Syntaxe:ModMimeUsePathInfo On|Off
      Dfaut:ModMimeUsePathInfo Off
      Contexte:rpertoire
      Statut:Base
      Module:mod_mime
      +

      La directive ModMimeUsePathInfo permet de + combiner le nom de fichier avec la partie path_info de + l'URL pour appliquer les directives mod_mime la + requte. La valeur par dfaut est Off - situation dans + laquelle l'lment path_info est ignor.

      + +

      L'utilisation de cette directive est conseille si vous utilisez + un systme de fichiers virtuel.

      + +

      Exemple

      ModMimeUsePathInfo On
      +
      + +

      Considrons une requte pour /index.php/foo.shtml, + mod_mime ne traitera pas la requte entrante comme + /index.php/foo.shtml et les directives comme + AddOutputFilter INCLUDES .shtml ajouteront le filtre + INCLUDES la requte. Si la directive + ModMimeUsePathInfo n'est pas dfinie, le + filtre INCLUDES ne sera pas ajout. Le fonctionnement + sera identique dans le cas des chemins virtuels, tels que ceux + dfinis par la directive <Location>

      + +

      Voir aussi

      + +
      +
      top
      +

      Directive MultiviewsMatch

      + + + + + + + + +
      Description:Les types de fichiers qui seront inclus lors d'une +recherche de correspondance de fichier avec les vues multiples +(MultiViews)
      Syntaxe:MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters]
      Dfaut:MultiviewsMatch NegotiatedOnly
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive MultiviewsMatch permet trois + comportements diffrents pour la fonctionnalit Multiviews du module + mod_negotiation. Les vues + multiples permettent d'associer une requte pour un fichier, par + exemple index.html, toute extension ngocie + s'ajoutant la requte de base, par exemple + index.html.en, index.html.fr, ou + index.html.gz.

      + +

      L'option NegotiatedOnly implique que toute extension + s'ajoutant au nom de base doit correspondre une extension de + mod_mime reconnue pour la ngociation de contenu, + par exemple Charset, Content-Type, Language, ou Encoding. C'est la + valeur d'option par dfaut, et la contrainte la plus stricte + dont les effets de bord inattendus sont les moins nombreux.

      + +

      Pour inclure des extensions associes avec des gestionnaires + et/ou des filtres, dfinissez la directive + MultiviewsMatch avec les mots-cls + Handlers, Filters, ou les deux. Si tous + les autres facteurs sont gaux, c'est le fichier de plus petite + taille qui sera servi ; par exemple, si le choix doit s'oprer entre + index.html.cgi de 500 octets et + index.html.pl de 1000 octets, c'est le fichier + .cgi qui l'emportera dans cet exemple. Les utilisateurs + de fichiers .asis auront avantage utiliser l'option + Handler, si les fichiers .asis sont associs au + gestionnaire asis-handler.

      + +

      Vous pouvez enfin autoriser l'association de toute extension avec + l'option Any, mme si mod_mime ne + reconnat pas l'extension. Ceci + peut conduire des rsultats imprvisibles, comme l'envoi de + fichiers .old ou .bak contrairement aux souhaits du webmaster.

      + +

      Par exemple, la configuration suivante va permettre l'inclusion + des extensions associes aux gestionnaires et aux filtres dans les + vues multiples, tout en excluant les fichiers de type inconnu :

      + +
      MultiviewsMatch Handlers Filters
      + + +

      L'utilisation de la directive + MultiviewsMatch dans une section <Location> ou <LocationMatch> n'est pas + permise.

      + + +

      Voir aussi

      + +
      +
      top
      +

      Directive RemoveCharset

      + + + + + + + +
      Description:Supprime toute association de jeu de caractres pour un +ensemble d'extensions de noms de fichiers
      Syntaxe:RemoveCharset extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveCharset permet de + supprimer toute association de jeu de caractres pour les fichiers + dont les noms possdent les extensions spcifies. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +

      Exemple

      RemoveCharset .html .shtml
      +
      + +
      +
      top
      +

      Directive RemoveEncoding

      + + + + + + + +
      Description:Supprime toute association de codage de contenu pour un +ensemble d'extensions de noms de fichiers
      Syntaxe:RemoveEncoding extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveEncoding permet de + supprimer toute association de codage pour les fichiers dont les + noms possdent les extensions spcifies. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + +

      /foo/.htaccess:

      AddEncoding x-gzip .gz
      +AddType text/plain .asc
      +<Files "*.gz.asc">
      +    RemoveEncoding .gz
      +</Files>
      +
      + +

      Avec cette configuration, le fichier foo.gz sera + marqu comme cod avec gzip, mais foo.gz.asc sera + marqu comme fichier texte non cod.

      + +

      Note

      +

      Les directives RemoveEncoding tant + traites aprs toute directive AddEncoding, il est possible + qu'elles annulent les effets de ces dernires si les deux + apparaissent dans la configuration du mme rpertoire.

      +
      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +
      +
      top
      +

      Directive RemoveHandler

      + + + + + + + +
      Description:Supprime toute association de gestionnaire un ensemble +d'extensions de noms de fichiers
      Syntaxe:RemoveHandler extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveHandler permet de + supprimer toute association de gestionnaire des fichiers dont le + nom possde l'extension donne. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + +

      /foo/.htaccess:

      AddHandler server-parsed .html
      +
      + +

      /foo/bar/.htaccess:

      RemoveHandler .html
      +
      + +

      Avec cette dernire ligne, les fichiers .html du + rpertoire /foo/bar seront traits en tant que fichiers + normaux, au lieu d'tre traits en tant que candidats + l'interprtation (voir le module mod_include + module).

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +
      +
      top
      +

      Directive RemoveInputFilter

      + + + + + + + +
      Description:Supprime toute association de filtre en entre un +ensemble d'extensions de noms de fichiers
      Syntaxe:RemoveInputFilter extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveInputFilter permet de + supprimer toute association de filtre + en entre des fichiers dont le nom possde l'extension donne. + Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +

      Voir aussi

      + +
      +
      top
      +

      Directive RemoveLanguage

      + + + + + + + +
      Description:Supprime toute association de langue un ensemble +d'extensions de noms de fichiers
      Syntaxe:RemoveLanguage extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveLanguage permet de + supprimer toute association de langue des fichiers dont le nom + possde l'extension donne. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +
      +
      top
      +

      Directive RemoveOutputFilter

      + + + + + + + +
      Description:Supprime toute association de filtre en sortie un +ensemble d'extensions de noms de fichiers
      Syntaxe:RemoveOutputFilter extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveOutputFilter permet de + supprimer toute association de filtre + en sortie des fichiers dont le nom possde l'extension donne. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier.

      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +

      Exemple

      RemoveOutputFilter shtml
      +
      + +

      Voir aussi

      + +
      +
      top
      +

      Directive RemoveType

      + + + + + + + +
      Description:Supprime toute association de type de contenu un ensemble +d'extensions de noms de fichiers
      Syntaxe:RemoveType extension [extension] +...
      Contexte:serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Base
      Module:mod_mime
      +

      La directive RemoveType permet de + supprimer toute association de type de + mdium des fichiers dont le nom possde l'extension + donne. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association hrite du rpertoire parent ou de la configuration du + serveur pour un rpertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + +

      /foo/.htaccess:

      RemoveType .cgi
      +
      + +

      Cette ligne aura pour effet de supprimer tout traitement + spcifique des fichiers .cgi dans le rpertoire + /foo/ et ses sous-rpertoires, et les rponses + contenant ce type de fichier ne possderont pas de champ d'en-tte + HTTP Content-Type.

      + +

      Note

      +

      Les directives RemoveType sont traites + aprs toutes les directives AddType, et il est possible que les + effets de ces dernires soient annuls si les deux types de + directives sont prsents au sein de la configuration du mme + rpertoire.

      +
      + +

      L'argument extension est insensible la casse et peut + tre spcifi avec ou sans le point initial.

      + +
      +
      top
      +

      Directive TypesConfig

      + + + + + + + +
      Description:Le chemin du fichier mime.types
      Syntaxe:TypesConfig chemin-fichier
      Dfaut:TypesConfig conf/mime.types
      Contexte:configuration du serveur
      Statut:Base
      Module:mod_mime
      +

      La directive TypesConfig permet de dfinir + le chemin du fichier de configuration des types de mdia. L'argument + chemin-fichier est un chemin relatif au rpertoire dfini + par la directive ServerRoot. Ce + fichier contient la liste des associations par dfaut des extensions + de noms de fichiers aux types de contenus. La plupart des + administrateurs utilisent le fichier mime.types fourni + par leur systme d'exploitation, + qui associe les extensions de noms de fichiers courantes la liste + officielle des types de mdia enregistrs par l'IANA et maintenue + http://www.iana.org/assignments/media-types/index.html, ainsi + qu'un grand nombre de types non officiels. Ce fichier permet de + simplifier le fichier httpd.conf en fournissant la + majorit des dfinitions de types de mdia, et ses dfinitions + peuvent tre crases par des directives AddType, selon les besoins. Il est + dconseill de modifier le contenu du fichier + mime.types car il peut tre remplac lors d'une mise + jour du serveur.

      + +

      Le fichier contient des lignes dont le format est identique + celui des arguments d'une directive AddType :

      + +

      + type-mdium [extension] ... +

      + +

      Les extensions sont insensibles la casse. Les lignes vides et + les lignes commenant par un dise (#) sont + ignores. Les lignes vides servent complter le fichier + mime.types. Apache httpd peut encore dterminer ces types via le + module mod_mime_magic.

      + +
      + Merci de ne pas soumettre de requtes au Projet + de Serveur HTTP Apache pour ajouter une entre dans le fichier + mime.types fourni, sauf si : + 1) le type de mdium est dj enregistr l'IANA + 2) et si l'extension est largement accepte et ne provoque pas de + conflits d'extensions entre les diffrentes plate-formes. Les + requtes du type catgorie/x-sous-type seront + systmatiquement rejetes, ainsi que toute nouvelle extension de + deux lettres, car elle ont de fortes chances d'entrer en conflit + par la suite avec les inombrables langues prexistantes et les + espaces de nommage des jeux de caractres. +
      + +

      Voir aussi

      + +
      +
      +
      +

      Langues Disponibles:  en  | + fr  | + ja 

      +
      top

      Commentaires

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      + \ No newline at end of file diff --git a/docs/manual/mod/mod_mime.html.ja.utf8 b/docs/manual/mod/mod_mime.html.ja.utf8 index b14710ffc5d..40764a97cec 100644 --- a/docs/manual/mod/mod_mime.html.ja.utf8 +++ b/docs/manual/mod/mod_mime.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_mime - Apache HTTP サーバ +mod_mime - Apache HTTP サーバ バージョン 2.4 - + + + + +

      Apache HTTP サーバ バージョン 2.4

      +
      <-
      +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

      Apache モジュール mod_mime

      -

      言語:  en  | +

      翻訳済み言語:  en  | + fr  |  ja 

      -
      この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
      +
      この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
      @@ -81,7 +88,12 @@ 受け取るように、影響を受けるファイルに 'touch' コマンドを実行する (最終更新日を更新する) 必要があるかもしれません。

      -
      top
      -

      言語:  en  | +

      翻訳済み言語:  en  | + fr  |  ja 

      -
      +
      top

      コメント

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_mime.xml b/docs/manual/mod/mod_mime.xml index 7edfe134fe4..bb38b19b8bd 100644 --- a/docs/manual/mod/mod_mime.xml +++ b/docs/manual/mod/mod_mime.xml @@ -143,11 +143,11 @@ module="mod_mime_magic">MimeMagicFile of using AddHandler cgi-script .cgi, use

      Configure handler based on final extension only - <FilesMatch \.cgi$> - - SetHandler cgi-script - - </FilesMatch> + +<FilesMatch "[^.]+\.cgi$"> + SetHandler cgi-script +</FilesMatch> + @@ -192,7 +192,7 @@ module="mod_mime_magic">MimeMagicFile resource, in order to tell the client browser about the encoding method.

      - Content-encoding: pkzip + Content-encoding: pkzip
      Character sets and languages @@ -232,8 +232,8 @@ module="mod_mime_magic">MimeMagicFile render the information.

      - Content-Language: en, fr
      - Content-Type: text/plain; charset=ISO-8859-1 +Content-Language: en, fr +Content-Type: text/plain; charset=ISO-8859-1

      The language specification is the two-letter abbreviation @@ -263,10 +263,12 @@ charset extension.

      Example - AddLanguage ja .ja
      - AddCharset EUC-JP .euc
      - AddCharset ISO-2022-JP .jis
      - AddCharset SHIFT_JIS .sjis + +AddLanguage ja .ja +AddCharset EUC-JP .euc +AddCharset ISO-2022-JP .jis +AddCharset SHIFT_JIS .sjis +

      Then the document xxxx.ja.jis will be treated @@ -310,8 +312,10 @@ type extension.

      Example - AddEncoding x-gzip .gz
      - AddEncoding x-compress .Z + +AddEncoding x-gzip .gz +AddEncoding x-compress .Z +

      This will cause filenames containing the .gz extension @@ -359,9 +363,9 @@ handler activate CGI scripts with the file extension .cgi, you might use:

      - + AddHandler cgi-script .cgi - +

      Once that has been put into your httpd.conf file, any file containing the .cgi extension will be treated as a CGI program.

      @@ -384,8 +388,6 @@ client requests server configvirtual host directory.htaccess FileInfo -AddInputFilter is only available in Apache 2.0.26 and -later.

      AddInputFilter maps the filename extension @@ -431,9 +433,11 @@ language extension.

      Example - AddEncoding x-compress .Z
      - AddLanguage en .en
      - AddLanguage fr .fr + +AddEncoding x-compress .Z +AddLanguage en .en +AddLanguage fr .fr +

      Then the document xxxx.en.Z will be treated as @@ -449,11 +453,11 @@ language extension, the last one encountered is the one that is used. That is, for the case of:

      - - AddLanguage en .en
      - AddLanguage en-gb .en
      - AddLanguage en-us .en -
      + +AddLanguage en .en +AddLanguage en-gb .en +AddLanguage en-us .en +

      documents with the extension .en would be treated as being en-us.

      @@ -476,8 +480,6 @@ responses from the server server configvirtual host directory.htaccess FileInfo -AddOutputFilter is only available in Apache 2.0.26 and -later.

      The AddOutputFilter directive maps the @@ -494,9 +496,9 @@ later. .shtml files for server-side includes and will then compress the output using mod_deflate.

      - + AddOutputFilter INCLUDES;DEFLATE shtml - +

      If more than one filter is specified, they must be separated by semicolons in the order in which they should process the @@ -507,6 +509,33 @@ later. href="#multipleext">multiple extensions and the extension argument will be compared against each of them.

      + +

      Note that when defining a set of filters using the + AddOutputFilter directive, + any definition made will replace any previous definition made by + the AddOutputFilter + directive.

      + + +# Effective filter "DEFLATE" +AddOutputFilter DEFLATE shtml +<Location "/foo"> + # Effective filter "INCLUDES", replacing "DEFLATE" + AddOutputFilter INCLUDES shtml +</Location> +<Location "/bar"> + # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE" + AddOutputFilter INCLUDES;DEFLATE shtml +</Location> +<Location "/bar/baz"> + # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE" + AddOutputFilter BUFFER shtml +</Location> +<Location "/bar/baz/buz"> + # No effective filter, replacing "BUFFER" + RemoveOutputFilter shtml +</Location> +
      RemoveOutputFilter SetOutputFilter @@ -538,13 +567,17 @@ type Example + AddType image/gif .gif +

      Or, to specify multiple file extensions in one directive:

      Example + AddType image/jpeg jpeg jpg jpe +

      The extension argument is case-insensitive and can @@ -559,7 +592,9 @@ type qs:

      Example - Addtype application/rss+xml;qs=0.8 .xml + + AddType application/rss+xml;qs=0.8 .xml +

      This is useful in situations, e.g. when a client @@ -571,6 +606,29 @@ type static files, where the generator of the response typically specifies a Content-Type, this directive has no effect.

      + + Note +

      If no handler is explicitly set for a request, the specified content + type will also be used as the handler name.

      + +

      When explicit directives such as + SetHandler or + AddHandler do not apply + to the current request, the internal handler name normally set by those + directives is instead set to the content type specified by this directive. +

      +

      + This is a historical behavior that may be used by some third-party modules + (such as mod_php) for taking responsibility for the matching request. +

      + +

      Configurations that rely on such "synthetic" types should be avoided. + Additionally, configurations that restrict access to + SetHandler or + AddHandler should + restrict access to this directive as well.

      +
      +
      ForceType mod_negotiation @@ -586,7 +644,6 @@ a matching file with MultiViews server configvirtual host directory.htaccess FileInfo -Available in Apache 2.0.26 and later.

      MultiviewsMatch permits three different @@ -616,16 +673,16 @@ a matching file with MultiViews

      You may finally allow Any extensions to match, even if mod_mime doesn't recognize the extension. This can cause - unpredicatable results, such as serving .old or .bak files the webmaster + unpredictable results, such as serving .old or .bak files the webmaster never expected to be served.

      For example, the following configuration will allow handlers and filters to participate in Multviews, but will exclude unknown files:

      - + MultiviewsMatch Handlers Filters - +

      MultiviewsMatch is not allowed in a Location or Content-Language header field will be generated.

      Example + DefaultLanguage en +
      mod_negotiation @@ -678,7 +737,6 @@ components as part of the filename ModMimeUsePathInfo On|Off ModMimeUsePathInfo Off directory -Available in Apache 2.0.41 and later

      The ModMimeUsePathInfo directive is used to @@ -690,7 +748,9 @@ components as part of the filename

      This directive is recommended when you have a virtual filesystem.

      Example + ModMimeUsePathInfo On +

      If you have a request for /index.php/foo.shtml @@ -715,8 +775,6 @@ extensions virtual hostdirectory .htaccess FileInfo -RemoveCharset is only available in Apache 2.0.24 and -later.

      The RemoveCharset directive removes any @@ -729,7 +787,9 @@ later. be specified with or without a leading dot.

      Example + RemoveCharset .html .shtml +
      @@ -752,13 +812,13 @@ extensions server config files. An example of its use might be:

      /foo/.htaccess: - AddEncoding x-gzip .gz
      - AddType text/plain .asc
      - <Files *.gz.asc>
      - - RemoveEncoding .gz
      -
      - </Files> + +AddEncoding x-gzip .gz +AddType text/plain .asc +<Files "*.gz.asc"> + RemoveEncoding .gz +</Files> +

      This will cause foo.gz to be marked as being @@ -795,11 +855,15 @@ extensions config files. An example of its use might be:

      /foo/.htaccess: + AddHandler server-parsed .html + /foo/bar/.htaccess: + RemoveHandler .html +

      This has the effect of returning .html files in @@ -821,8 +885,6 @@ extensions virtual hostdirectory .htaccess FileInfo -RemoveInputFilter is only available in Apache 2.0.26 and -later.

      The RemoveInputFilter directive removes any @@ -848,8 +910,6 @@ extensions virtual hostdirectory .htaccess FileInfo -RemoveLanguage is only available in Apache 2.0.24 and -later.

      The RemoveLanguage directive removes any @@ -872,8 +932,6 @@ extensions virtual hostdirectory .htaccess FileInfo -RemoveOutputFilter is only available in Apache 2.0.26 and -later.

      The RemoveOutputFilter directive removes any @@ -887,7 +945,9 @@ later. be specified with or without a leading dot.

      Example + RemoveOutputFilter shtml + AddOutputFilter @@ -912,7 +972,9 @@ extensions might be:

      /foo/.htaccess: + RemoveType .cgi +

      This will remove any special handling of .cgi diff --git a/docs/manual/mod/mod_mime.xml.fr b/docs/manual/mod/mod_mime.xml.fr new file mode 100644 index 00000000000..8105f921e1a --- /dev/null +++ b/docs/manual/mod/mod_mime.xml.fr @@ -0,0 +1,1124 @@ + + + + + + + + + + + +mod_mime +Associe les extensions des fichiers demandés avec l'action +déclenchée par ces fichiers et avec leur contenu (type MIME, langue, +jeu de caractère et codage) +Base +mod_mime.c +mime_module + +

      +

      Ce module permet d'assigner des métadonnées aux contenus + sélectionnés pour une réponse HTTP, en associant des modèles d'URI + ou de noms de fichiers aux valeurs des métadonnées. Par exemple, les + extensions de noms de fichiers définissent souvent le type de médium + Internet, la langue, le jeu de caractères et le codage du contenu. + Ces informations sont relayées par les messages HTTP véhiculant ces + contenus, et utilisées au cours de la négociation de contenu lors de + la sélection des différentes possibilités, de manière à ce que les + préférences des utilisateurs soient respectées lors du choix d'un + contenu à servir parmi plusieurs autres contenus. Voir + mod_negotiation pour plus d'informations à propos + de la négociation de + contenu.

      + +

      Les directives AddCharset, AddEncoding, AddLanguage et AddType permettent d'associer des + extensions de fichiers aux métadonnées de ces fichiers. Elles + définissent respectivement le jeu de caractères, le codage du + contenu, la langue du contenu et le type de + médium (content-type) des documents. La directive + TypesConfig permet de + spécifier un fichier qui contient lui-même des associations entre + extensions et types de media.

      + +

      De plus, mod_mime peut définir le gestionnaire et les filtres qui sont à l'origine du contenu et + le traitent. Les directives AddHandler, AddOutputFilter, et AddInputFilter permettent de contrôler + les modules ou les scripts qui vont servir le document. La directive + MultiviewsMatch permet à + mod_negotiation de déterminer les extensions de + fichiers à inclure lors des tests de correspondances multivues.

      + +

      Alors que mod_mime associe des métadonnées avec + des extensions de fichiers, le serveur de base core + fournit des directives permettant d'associer tous les fichiers d'un + conteneur donné (par exemple Location, Directory, ou Files) avec des métadonnées particulières. + Parmi ces directives, on trouve ForceType, SetHandler, SetInputFilter, et SetOutputFilter. Les directives du serveur + de base l'emportent sur toute directive d'association d'extensions + de noms de fichiers définie par mod_mime.

      + +

      Notez que la modification des métadonnées d'un fichier ne modifie + pas la valeur de l'en-tête Last-Modified. Ainsi, + certaines copies de documents préalablement mises en cache peuvent + encore être utilisées par un client ou un mandataire avec les + anciens en-têtes. Si vous modifiez les métadonnées (langue, type de + contenu, jeu de caractère ou codage), vous devez donc enregistrer + une modification du fichier concerné (afin de mettre à jour sa date + de dernière modification), pour être sûr que tous les visiteurs + recevront le documents avec les en-têtes corrects.

      +
      +MimeMagicFile +AddDefaultCharset +ForceType +SetHandler +SetInputFilter +SetOutputFilter + +
      Fichiers avec extensions +multiples +

      Les fichiers peuvent posséder plusieurs extensions dont l'ordre + est normalement sans importance. Par exemple, si + le fichier welcome.html.fr est associé au type de + contenu text/html et à la langue française, le fichier + welcome.fr.html possèdera exactement les même + métadonnées. Si le fichier possède plusieurs extensions associées + au même type de métadonnée, c'est celle de ces extensions la plus à + droite qui sera utilisée, excepté pour ce qui concerne les langues + et les codages de contenu. Par exemple, si .gif est + associé au type de médium + image/gif, et .html au type de médium + text/html, le fichier welcome.gif.html + sera associé au type de médium text/html.

      + +

      Les Languages et les codages de contenu sont traités de + manière cumulative, car il est possible d'assigner plusieurs + langues ou codages à une ressource particulière. Par exemple, le + fichier welcome.html.en.de sera servi avec les en-têtes + Content-Language: en, de et Content-Type: + text/html.

      + +

      Des précautions doivent être prises lorsqu'un fichier avec + extensions multiples est associé à la fois à un type de + médium et à un gestionnaire. En général, cela impliquera + la gestion de la requête par le module associé au gestionnaire. Par + exemple, si l'extension .imap est associée au + gestionnaire imap-file (du module + mod_imagemap), et si l'extension .html + est associée au type de médium text/html, le fichier + world.imap.html sera à la fois associé au gestionnaire + imap-file et au type de médium text/html. + Pour son traitement, c'est le gestionnaire imap-file + qui sera utilisé, et il sera donc traité en tant que fichier + imagemap.

      + +

      Si vous préférez que seule la dernière partie d'un nom de fichier + séparée du reste du nom par un point soit associée à une métadonnée + particulière, n'utilisez pas les directives Add*. Par + exemple, si vous souhaitez que le fichier foo.html.cgi + soit traité en tant que script CGI, mais pas le fichier + bar.cgi.html, alors, au lieu d'utiliser + AddHandler cgi-script .cgi, utilisez plutôt :

      + + Configuration du gestionnaire en se basant seulement + sur la dernière extension + +<FilesMatch "[^.]+\.cgi$"> + SetHandler cgi-script +</FilesMatch> + + + +
      + +
      Codage du contenu +

      Un fichier d'un type de médium particulier + peut être également codé d'une certaine manière pour simplifier sa + transmission sur Internet. Alors que cela concerne en général la + compression, comme gzip, il peut aussi s'agir de + chiffrement, comme pgp ou d'un codage comme UUencoding, + qui est conçu pour transmettre un fichier binaire sous un format + ASCII (texte).

      + +

      La RFC + HTTP/1.1, section 14.11 stipule à ce titre :

      + +
      +

      Le champ d'en-tête Content-Encoding de l'entité est utilisé en + tant que modificateur du type de médium. Lorsqu'il est présent, sa + valeur indique quels codages de contenu additionnels ont été + appliqués au corps de l'entité, et ainsi quels mécanismes de + décodage doivent être appliqués afin de retrouver le type de + médium référencé par le champ d'en-tête Content-Type. Le codage de + contenu est principalement utilisé pour permettre la compression + d'un document sans perdre l'information concernant le type de + médium sous-jacent.

      +
      + +

      En utilisant plusieurs extensions (voir la section ci-dessus à propos des extensions de + fichiers multiples), vous pouvez indiquer qu'un fichier est d'un + type, particulier, et possède aussi un codage + particulier.

      + +

      Considérons par exemple un fichier contenant un document + Microsoft Word et compressé par pkzip pour réduire sa taille. Si + l'extension .doc est associée au type de fichier + Microsoft Word, et si l'extension .zip est associée au + codage de fichier pkzip, alors le fichier + Resume.doc.zip sera identifié comme document Word + compressé par pkzip.

      + +

      Apache joint un en-tête Content-encoding à la + ressource afin d'informer le navigateur client à propos de la + méthode de codage.

      + + Content-encoding: pkzip +
      + +
      Jeux de caractères et langues +

      En plus du type de fichier et du codage, un autre élément + important d'information est la langue dans laquelle le document est + écrit, et avec quel jeu de caractères le contenu du fichier doit + être affiché. Par exemple, un document peut être écrit en alphabet + vietnamien ou cyrillique, et doit être affiché en conséquence. Cette + information est également transmise via des en-têtes HTTP.

      + +

      Les jeu de caractères, langue, codage et type MIME sont tous + utilisés au cours du processus de négociation de contenu (voir + mod_negotiation) afin de déterminer quel document + servir au client, lorsque plusieurs choix sont possibles en fonction + du jeu de caractères, de la langue, du codage ou du type MIME. Toutes + les associations d'extensions de noms de fichiers créées via les + directives AddCharset, + AddEncoding, AddLanguage et AddType (ainsi que les associations + d'extensions listées dans le fichier défini par la directive + MimeMagicFile), + participent à ce processus de sélection. Les extensions de noms de + fichiers qui n'ont été associés que par des directives AddHandler, AddInputFilter ou AddOutputFilter, peuvent être incluses + ou exclues du processus de sélection en utilisant la directive + MultiviewsMatch.

      + +
      Jeu de caractères +

      Pour transmettre cette information supplémentaire, Apache peut + ajouter un en-tête Content-Language, afin de + spécifier la langue dans laquelle le document est écrit, et peut + ajouter des informations additionnelles à l'en-tête + Content-Type pour indiquer le jeu de caractères + particulier qui doit être utilisé pour restituer correctement le + document.

      + + + Content-Language: en, fr +Content-Type: text/plain; charset=ISO-8859-1 + + +

      La langue est spécifiée via son abréviation en deux lettres. Le + jeu de caractères est le nom du jeu de caractères + particulier qui doit être utilisé.

      +
      +
      + + +AddCharset +Associe les extensions de noms de fichiers spécifiées au +jeu de caractères spécifié +AddCharset jeu-car extension +[extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddCharset permet d'associer + les extensions de noms de fichiers spécifiées au jeu de caractères + spécifié (le nom enregistré sur l'Internet d'un codage de caractères + donné). jeu-car est le paramètre jeu + de caractères du type de médium pour les ressources dont le nom + de fichier contient extension. Cette association est + ajoutée à toutes les autres déjà en vigueur, et écrase toute + association préexistante pour la même extension.

      + + Exemple + +AddLanguage ja .ja +AddCharset EUC-JP .euc +AddCharset ISO-2022-JP .jis +AddCharset SHIFT_JIS .sjis + + + +

      Avec cet exemple, le document xxxx.ja.jis sera + traité en tant que document japonais dont le jeu de caractère est + ISO-2022-JP (idem pour le document + xxxx.jis.ja). La directive + AddCharset sert à la fois à informer le + client sur le codage des caractères du document afin que ce dernier + puisse être interprété et affiché correctement, et à la négociation de contenu, au + cours de laquelle le serveur décide lequel parmi plusieurs + documents possibles il renvoie au client en fonction des préférences + de ce dernier en matière de jeu de caractères.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      + +
      +mod_negotiation +AddDefaultCharset +
      + + +AddEncoding +Associe les extensions de noms de fichiers données au type +de codage spécifié +AddEncoding codage extension +[extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddEncoding permet d'associer + les extensions de noms de fichiers données au codage de contenu HTTP + spécifié. codage est le codage de contenu HTTP à ajouter + à la valeur du champ d'en-tête Content-Encoding pour les documents + possédant l'extension spécifiée. Cette association est + ajoutée à toutes les autres déjà en vigueur, et écrase toute + association préexistante pour la même extension.

      + + Exemple + +AddEncoding x-gzip .gz +AddEncoding x-compress .Z + + + +

      Avec cet exemple, les noms de fichiers possédant l'extension + .gz seront marqués comme codés à l'aide du codage + x-gzip, et les noms de fichiers possédant l'extension + .Z comme codés avec x-compress.

      + +

      Les clients anciens n'acceptent que x-gzip et + x-compress, bien que les standards stipulent qu'ils + sont respectivement équivalents à gzip et + compress. Apache effectue ses comparaisons de codages + de contenu en ignorant tout préfixe x-. Lorsqu'il + répond avec un codage, Apache utilise l'une ou l'autre forme (c'est + à dire x-foo ou foo) selon les besoins du + client. Si le client n'a pas besoin d'une forme particulière, Apache + utilisera la forme employée par la directive + AddEncoding. Pour résumer, vous devez toujours utiliser + x-gzip et x-compress pour ces deux + codages spécifiques. Certains codages plus récents, comme + deflate, doivent être spécifiés sans le préfixe + x-.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      +
      +
      + + +AddHandler +Associe les extensions de noms de fichiers données au +gestionnaire spécifié +AddHandler nom-gestionnaire extension +[extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      Les fichiers dont le nom a pour extension extension + seront servis par le nom-gestionnaire spécifié. Cette + association est ajoutée à toutes les autres déjà en vigueur, et + écrase toute association préexistante pour la même + extension. Par exemple, pour associer les scripts CGI + avec l'extension de fichier .cgi, vous pouvez utiliser + :

      + + + AddHandler cgi-script .cgi + + +

      Une fois cette ligne insérée dans votre fichier httpd.conf, tout + fichier possédant l'extension .cgi sera traité en tant + que programme CGI.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      +
      +SetHandler +
      + + +AddInputFilter +Associe les extensions de noms de fichiers aux +filtres spécifiés qui traiteront les requêtes clients +AddInputFilter filtre[;filtre...] +extension [extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddInputFilter permet + d'associer l'extension de nom de fichier extension aux filtres spécifiés qui traiteront les + requêtes clients et les entrées POST à leur réception par le + serveur. Ceci s'ajoute à toute définition de filtre préexistante, y + compris la directive SetInputFilter. Cette + association est ajoutée à toutes les autres déjà en vigueur, et + écrase toute association préexistante pour la même + extension.

      + +

      Si plusieurs filtres sont spécifiés, ils doivent être + séparés par des points-virgules et inscrits dans l'ordre selon + lequel ils devront traiter le contenu. L'argument filtre + est insensible à la casse.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      + +
      +RemoveInputFilter +SetInputFilter +
      + + +AddLanguage +Associe l'extension de nom de fichier donnée à la langue +spécifié +AddLanguage symbole-langue extension +[extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddLanguage permet d'associer + l'extension de nom de fichier donnée à la langue spécifiée. Les + fichiers dont l'extension correspond à la valeur + de l'argument extension se voient attribuer la valeur de + l'argument symbole-langue comme en-tête HTTP + Content-Language en accord avec les identifiants de langues définis + par la RFC 3066. Cette directive l'emporte sur toute association + préexistante pour la même extension.

      + + Exemple + +AddEncoding x-compress .Z +AddLanguage en .en +AddLanguage fr .fr + + + +

      Avec cet exemple, le document xxxx.en.Z sera traité + en tant que document compressé de langue anglaise (idem pour le + document xxxx.Z.en). Bien que la langue soit fournie au + client, le navigateur n'utilise habituellement pas cette + information. La directive AddLanguage est + principalement utilisée au cours de la négociation de contenu, où le + serveur choisit d'envoyer un document parmi plusieurs documents + possibles en fonction de la préférence du client en matière de + langue.

      + +

      Si une extension fait l'objet de plusieurs associations de + langues, c'est la dernière qui sera utilisée. Ainsi, dans le cas + suivant,

      + + +AddLanguage en .en +AddLanguage en-gb .en +AddLanguage en-us .en + + +

      les documents possédant l'extension .en seront + traités en tant que documents de langue en-us.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      +
      +mod_negotiation +
      + + +AddOutputFilter +Associe les extensions de noms de fichiers aux +filtres spécifiés qui traiteront les réponses en provenance du +serveur +AddOutputFilter filtre[;filtre...] +extension [extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddOutputFilter permet + d'associer l'extension de nom de fichier définie par l'argument + extension aux filtres qui traiteront les réponses en + provenance du serveur avant de les envoyer au client. Ces filtres + s'ajoutent à tout filtre défini par d'autres directives comme + SetOutputFilter et AddOutputFilterByType. Cette association + est fusionnée avec toute autre association en vigueur, et l'emporte + sur toute association préexistante pour la même + extension.

      + +

      Avec l'exemple suivant, tous les fichiers .shtml + seront traités en tant qu'inclusions côté serveur (SSI), et la + sortie sera compressée à l'aide du module + mod_deflate.

      + + + AddOutputFilter INCLUDES;DEFLATE shtml + + +

      Si plusieurs filtres sont spécifiés, ils doivent être + séparés par des points-virgules et inscrits dans l'ordre selon + lequel il devront traiter le contenu. L'argument filtre + est insensible à la casse.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      + +

      Notez que toute définition de filtres via la directive AddOutputFilter remplace toutes les + définitions précédentes effectuées via cette même directive.

      + + +# Filtre spécifié "DEFLATE" +AddOutputFilter DEFLATE shtml +<Location "/foo"> + # Filtre spécifié "INCLUDES", remplace "DEFLATE" + AddOutputFilter INCLUDES shtml +</Location> +<Location "/bar"> + # Filtre spécifié "INCLUDES;DEFLATE", remplace "DEFLATE" + AddOutputFilter INCLUDES;DEFLATE shtml +</Location> +<Location "/bar/baz"> + # Filtre spécifié "BUFFER", remplace "INCLUDES;DEFLATE" + AddOutputFilter BUFFER shtml +</Location> +<Location "/bar/baz/buz"> + # Pas de filtre spécifié, suppression de "BUFFER" + RemoveOutputFilter shtml +</Location> + +
      +RemoveOutputFilter +SetOutputFilter +
      + + +AddType +Associe les extensions de noms de fichiers au type de +contenu spécifié +AddType type-médium extension +[extension] ... +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive AddType permet d'associer les + extensions de noms de fichiers données au type de contenu spécifié. + type-médium est le Type + MIME à utiliser pour les fichiers dont le nom possède + l'extension extension. Cette association s'ajoute à toute + autre association en vigueur, et l'emporte sur toute association + préexistante pour la même extension.

      + + + Plutôt que d'éditer directement le fichier TypesConfig, il est recommandé + d'utiliser la directive AddType pour + ajouter de nouveaux types de médias. + + + Exemple + + AddType image/gif .gif + + + +

      Ou, pour spécifier plusieurs extensions dans une seule directive + :

      + + Exemple + + AddType image/jpeg jpeg jpg jpe + + + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial. Les noms de fichiers + peuvent posséder plusieurs extensions, et + l'argument extension sera comparé à chacune d'entre + elles.

      + +

      Il est possible d'obtenir un effet similaire à celui de la + directive LanguagePriority du module + mod_negotiation en qualifiant un type de + média avec qs :

      + + Exemple + + AddType application/rss+xml;qs=0.8 .xml + + + +

      Ceci peut s'avérer utile dans certaines situations, par exemple + lorsqu'un client qui a ajouté un en-tête Accept: */* à + sa requête n'est pas en mesure de traiter le contenu renvoyé par le + serveur.

      + +

      À la base, cette directive configure le type de contenu généré + pour les fichiers statiques servis à partir du système de fichiers. + Dans le cas des ressources autres que les fichiers statiques pour + lesquelles le générateur de la réponse spécifie en général un + Content-Type, cette directive n'a aucun effet.

      + + Note +

      Si aucun gestionnaire n'est explicitement défini pour une + requête, le type de contenu spécifié sera aussi utilisé comme nom du + gestionnaire.

      + +

      Lorsqu'aucune directive comme SetHandler ou + module="mod_mime">AddHandler ne s'applique à + une requête, le nom de gestionnaire interne normalement défini + par une de ces directives est en fait défini par le type de contenu + spécifié par la présente directive.

      +

      + Pour des raisons historiques, certains modules tiers comme mod_php + peuvent adopter ce type de comportement pour prendre en compte la + requête concernée. +

      +

      Il est conseillé d'éviter les configurations qui reposent sur de + tels types "synthétiques". En outre, les configurations qui + limitent l'accès aux directives SetHandler ou AddHandler doivent aussi limiter + l'accès à la directive AddType.

      +
      + +
      +ForceType +mod_negotiation +
      + + +MultiviewsMatch +Les types de fichiers qui seront inclus lors d'une +recherche de correspondance de fichier avec les vues multiples +(MultiViews) +MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] +MultiviewsMatch NegotiatedOnly +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive MultiviewsMatch permet trois + comportements différents pour la fonctionnalité Multiviews du module + mod_negotiation. Les vues + multiples permettent d'associer une requête pour un fichier, par + exemple index.html, à toute extension négociée + s'ajoutant à la requête de base, par exemple + index.html.en, index.html.fr, ou + index.html.gz.

      + +

      L'option NegotiatedOnly implique que toute extension + s'ajoutant au nom de base doit correspondre à une extension de + mod_mime reconnue pour la négociation de contenu, + par exemple Charset, Content-Type, Language, ou Encoding. C'est la + valeur d'option par défaut, et la contrainte la plus stricte + dont les effets de bord inattendus sont les moins nombreux.

      + +

      Pour inclure des extensions associées avec des gestionnaires + et/ou des filtres, définissez la directive + MultiviewsMatch avec les mots-clés + Handlers, Filters, ou les deux. Si tous + les autres facteurs sont égaux, c'est le fichier de plus petite + taille qui sera servi ; par exemple, si le choix doit s'opérer entre + index.html.cgi de 500 octets et + index.html.pl de 1000 octets, c'est le fichier + .cgi qui l'emportera dans cet exemple. Les utilisateurs + de fichiers .asis auront avantage à utiliser l'option + Handler, si les fichiers .asis sont associés au + gestionnaire asis-handler.

      + +

      Vous pouvez enfin autoriser l'association de toute extension avec + l'option Any, même si mod_mime ne + reconnaît pas l'extension. Ceci + peut conduire à des résultats imprévisibles, comme l'envoi de + fichiers .old ou .bak contrairement aux souhaits du webmaster.

      + +

      Par exemple, la configuration suivante va permettre l'inclusion + des extensions associées aux gestionnaires et aux filtres dans les + vues multiples, tout en excluant les fichiers de type inconnu :

      + + + MultiviewsMatch Handlers Filters + + +

      L'utilisation de la directive + MultiviewsMatch dans une section Location ou LocationMatch n'est pas + permise.

      + +
      +Options +mod_negotiation +
      + + +DefaultLanguage +Définit un symbole de langue par défaut à affecter au champ +d'en-tête Content-Language pour toutes les ressources dans le contexte +courant auxquelles aucun symbole de langue n'a été +associé. +DefaultLanguage symbole-langue +server configvirtual host +directory.htaccess +FileInfo + + +

      La directive DefaultLanguage permet + d'indiquer à Apache que toutes les ressources du contexte courant + (par exemple, toutes les ressources concernées par le conteneur + Directory + courant) qui ne possèdent pas d'extension de langue explicite + (comme .fr ou .de tel que défini par la + directive AddLanguage), + verront leur en-tête HTTP Content-Language affecté de la langue + symbole-langue. Ceci permet de marquer des arborescences + de répertoires entières comme contenant des documents en français, + par exemple, sans avoir à renommer chaque fichier. Notez qu'à la + différence de l'utilisation des extensions pour spécifier des + langues, DefaultLanguage ne permet de + spécifier qu'une seule langue.

      + +

      Si aucune directive DefaultLanguage n'est + en vigueur, et si un fichier ne possède pas d'extension configurée + par la directive AddLanguage, aucun champ d'en-tête + Content-Language ne sera généré.

      + + Exemple + + DefaultLanguage en + + +
      +mod_negotiation +
      + + +ModMimeUsePathInfo +Indique à mod_mime de traiter les éléments +de path_info en tant que parties du nom de +fichier +ModMimeUsePathInfo On|Off +ModMimeUsePathInfo Off +directory + + +

      La directive ModMimeUsePathInfo permet de + combiner le nom de fichier avec la partie path_info de + l'URL pour appliquer les directives mod_mime à la + requête. La valeur par défaut est Off - situation dans + laquelle l'élément path_info est ignoré.

      + +

      L'utilisation de cette directive est conseillée si vous utilisez + un système de fichiers virtuel.

      + + Exemple + + ModMimeUsePathInfo On + + + +

      Considérons une requête pour /index.php/foo.shtml, + mod_mime ne traitera pas la requête entrante comme + /index.php/foo.shtml et les directives comme + AddOutputFilter INCLUDES .shtml ajouteront le filtre + INCLUDES à la requête. Si la directive + ModMimeUsePathInfo n'est pas définie, le + filtre INCLUDES ne sera pas ajouté. Le fonctionnement + sera identique dans le cas des chemins virtuels, tels que ceux + définis par la directive Location

      +
      +AcceptPathInfo +
      + + +RemoveCharset +Supprime toute association de jeu de caractères pour un +ensemble d'extensions de noms de fichiers +RemoveCharset extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveCharset permet de + supprimer toute association de jeu de caractères pour les fichiers + dont les noms possèdent les extensions spécifiées. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      + + Exemple + + RemoveCharset .html .shtml + + +
      +
      + + +RemoveEncoding +Supprime toute association de codage de contenu pour un +ensemble d'extensions de noms de fichiers +RemoveEncoding extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveEncoding permet de + supprimer toute association de codage pour les fichiers dont les + noms possèdent les extensions spécifiées. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + + /foo/.htaccess: + +AddEncoding x-gzip .gz +AddType text/plain .asc +<Files "*.gz.asc"> + RemoveEncoding .gz +</Files> + + + +

      Avec cette configuration, le fichier foo.gz sera + marqué comme codé avec gzip, mais foo.gz.asc sera + marqué comme fichier texte non codé.

      + + Note +

      Les directives RemoveEncoding étant + traitées après toute directive AddEncoding, il est possible + qu'elles annulent les effets de ces dernières si les deux + apparaissent dans la configuration du même répertoire.

      +
      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      +
      +
      + + +RemoveHandler +Supprime toute association de gestionnaire à un ensemble +d'extensions de noms de fichiers +RemoveHandler extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveHandler permet de + supprimer toute association de gestionnaire à des fichiers dont le + nom possède l'extension donnée. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + + /foo/.htaccess: + + AddHandler server-parsed .html + + + + /foo/bar/.htaccess: + + RemoveHandler .html + + + +

      Avec cette dernière ligne, les fichiers .html du + répertoire /foo/bar seront traités en tant que fichiers + normaux, au lieu d'être traités en tant que candidats à + l'interprétation (voir le module mod_include + module).

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      +
      +
      + + +RemoveInputFilter +Supprime toute association de filtre en entrée à un +ensemble d'extensions de noms de fichiers +RemoveInputFilter extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveInputFilter permet de + supprimer toute association de filtre + en entrée à des fichiers dont le nom possède l'extension donnée. + Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      +
      +AddInputFilter +SetInputFilter +
      + + +RemoveLanguage +Supprime toute association de langue à un ensemble +d'extensions de noms de fichiers +RemoveLanguage extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveLanguage permet de + supprimer toute association de langue à des fichiers dont le nom + possède l'extension donnée. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      +
      +
      + + +RemoveOutputFilter +Supprime toute association de filtre en sortie à un +ensemble d'extensions de noms de fichiers +RemoveOutputFilter extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveOutputFilter permet de + supprimer toute association de filtre + en sortie à des fichiers dont le nom possède l'extension donnée. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier.

      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      + + Exemple + + RemoveOutputFilter shtml + + +
      +AddOutputFilter +
      + + +RemoveType +Supprime toute association de type de contenu à un ensemble +d'extensions de noms de fichiers +RemoveType extension [extension] +... +virtual hostdirectory +.htaccess +FileInfo + + +

      La directive RemoveType permet de + supprimer toute association de type de + médium à des fichiers dont le nom possède l'extension + donnée. Ceci permet, au + sein des fichiers .htaccess, d'annuler toute + association héritée du répertoire parent ou de la configuration du + serveur pour un répertoire particulier. Voici un exemple + d'utilisation de cette directive :

      + + /foo/.htaccess: + + RemoveType .cgi + + + +

      Cette ligne aura pour effet de supprimer tout traitement + spécifique des fichiers .cgi dans le répertoire + /foo/ et ses sous-répertoires, et les réponses + contenant ce type de fichier ne possèderont pas de champ d'en-tête + HTTP Content-Type.

      + + Note +

      Les directives RemoveType sont traitées + après toutes les directives AddType, et il est possible que les + effets de ces dernières soient annulés si les deux types de + directives sont présents au sein de la configuration du même + répertoire.

      +
      + +

      L'argument extension est insensible à la casse et peut + être spécifié avec ou sans le point initial.

      +
      +
      + + +TypesConfig +Le chemin du fichier mime.types +TypesConfig chemin-fichier +TypesConfig conf/mime.types +server config + + +

      La directive TypesConfig permet de définir + le chemin du fichier de configuration des types de média. L'argument + chemin-fichier est un chemin relatif au répertoire défini + par la directive ServerRoot. Ce + fichier contient la liste des associations par défaut des extensions + de noms de fichiers aux types de contenus. La plupart des + administrateurs utilisent le fichier mime.types fourni + par leur système d'exploitation, + qui associe les extensions de noms de fichiers courantes à la liste + officielle des types de média enregistrés par l'IANA et maintenue à + http://www.iana.org/assignments/media-types/index.html, ainsi + qu'un grand nombre de types non officiels. Ce fichier permet de + simplifier le fichier httpd.conf en fournissant la + majorité des définitions de types de média, et ses définitions + peuvent être écrasées par des directives AddType, selon les besoins. Il est + déconseillé de modifier le contenu du fichier + mime.types car il peut être remplacé lors d'une mise à + jour du serveur.

      + +

      Le fichier contient des lignes dont le format est identique à + celui des arguments d'une directive AddType :

      + + + type-médium [extension] ... + + +

      Les extensions sont insensibles à la casse. Les lignes vides et + les lignes commençant par un dièse (#) sont + ignorées. Les lignes vides servent à compléter le fichier + mime.types. Apache httpd peut encore déterminer ces types via le + module mod_mime_magic.

      + + + Merci de ne pas soumettre de requêtes au Projet + de Serveur HTTP Apache pour ajouter une entrée dans le fichier + mime.types fourni, sauf si : + 1) le type de médium est déjà enregistré à l'IANA + 2) et si l'extension est largement acceptée et ne provoque pas de + conflits d'extensions entre les différentes plate-formes. Les + requêtes du type catégorie/x-sous-type seront + systématiquement rejetées, ainsi que toute nouvelle extension de + deux lettres, car elle ont de fortes chances d'entrer en conflit + par la suite avec les inombrables langues préexistantes et les + espaces de nommage des jeux de caractères. + +
      +mod_mime_magic +
      + + diff --git a/docs/manual/mod/mod_mime.xml.ja b/docs/manual/mod/mod_mime.xml.ja index 142e30874c0..44866e79eeb 100644 --- a/docs/manual/mod/mod_mime.xml.ja +++ b/docs/manual/mod/mod_mime.xml.ja @@ -1,7 +1,7 @@ - + -mod_mime_magic - Apache HTTP Server +mod_mime_magic - Apache HTTP Server Version 2.4 - + + + + +

      Apache HTTP Server Version 2.4

      +
      <-
      +Apache > HTTP Server > Documentation > Version 2.4 > Modules

      Apache Module mod_mime_magic

      -

      Available Languages:  en 

      +

      Available Languages:  en  | + fr 

      説明:リクエストされたファイルの拡張子とファイルの振る舞い (ハンドラとフィルタ)、内容 (MIME タイプ、言語、文字セット、エンコーディング) とを関連付ける
      @@ -42,16 +48,18 @@ what the contents are. This module is active only if the magic file is specified by the MimeMagicFile directive.

      -

      Directives

      - -

      Topics

      + +

      Directives

      + +

      Bugfix checklist

      See also

      +
      top

      Format of the Magic File

      @@ -261,15 +269,36 @@ using the specified magic file used, in which case the more specific setting overrides the main server's file.

      -

      Example

      - MimeMagicFile conf/magic -

      +

      Example

      MimeMagicFile conf/magic
      +
      -

      Available Languages:  en 

      -
      +

      Available Languages:  en  | + fr 

      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_mime_magic.html.fr b/docs/manual/mod/mod_mime_magic.html.fr new file mode 100644 index 00000000000..d9cd31fa2a1 --- /dev/null +++ b/docs/manual/mod/mod_mime_magic.html.fr @@ -0,0 +1,312 @@ + + + + + +mod_mime_magic - Serveur Apache HTTP Version 2.4 + + + + + + + + +
      <-
      + +
      +

      Module Apache mod_mime_magic

      +
      +

      Langues Disponibles:  en  | + fr 

      +
      +
      Description:Determines the MIME type of a file by looking at a few bytes of its contents
      + + +
      Description:Dtermine le type MIME d'un fichier partir de quelques +octets de son contenu
      Statut:Extension
      IdentificateurdeModule:mime_magic_module
      FichierSource:mod_mime_magic.c
      +

      Sommaire

      + +

      Ce module permet de dterminer le type + MIME des fichiers de la mme manire que la commande Unix + file(1), savoir en se basant sur les premiers octets + du fichier. Il est conu comme une "seconde ligne de dfense" pour + les cas o mod_mime ne parvient pas dterminer le + type du fichier.

      + +

      Ce module est driv d'une version libre de la commande Unix + file(1) qui utilise des "nombres magiques" et autres + marques distinctives issus du contenu du fichier pour essayer de + dterminer le type de contenu. Ce module n'est activ que si le + fichier magique est spcifi par la directive MimeMagicFile.

      +
      + +
      top
      +
      +

      Format du fichier magique

      + +

      Le fichier contient du texte ASCII sur 4 5 colonnes. Les lignes + vides sont autorises mais ignores. Toute ligne commenant par un + dise (#) est un commentaire. Les autres lignes sont + interprtes en colonnes comme suit :

      + + + + + + + + + + + + +
      ColonneDescription
      1numro de l'octet partir duquel la vrification dbute
      + ">" indique une dpendance par rapport la + dernire ligne non-">"
      2

      type de donne rechercher

      + + + + + + + + + + + + + + + + + + + + + + + + +
      bytecaractre unique
      shortentier sur 16 bits selon l'ordre de la machine
      longentier sur 32 bits selon l'ordre de la machine
      stringchane de taille choisie
      datedate au format entier long (secondes depuis le temps Unix epoch/1970)
      beshortentier 16 bits big-endian
      belongentier 32 bits big-endian
      bedatedate au format entier 32 bits big-endian
      leshortentier 16 bits little-endian
      lelongentier 32 bits little-endian
      ledatedate au format entier 32 bits little-endian
      3contenu des donnes rechercher
      4type MIME si correspondance
      5codage MIME si correspondance (optionnel)
      + +

      Par exemple, les lignes du fichier magique suivantes + permettraient de reconnatre certains formats audio :

      + +
      # Sun/NeXT audio data
      +0      string      .snd
      +>12    belong      1       audio/basic
      +>12    belong      2       audio/basic
      +>12    belong      3       audio/basic
      +>12    belong      4       audio/basic
      +>12    belong      5       audio/basic
      +>12    belong      6       audio/basic
      +>12    belong      7       audio/basic
      +>12    belong     23       audio/x-adpcm
      + +

      Et celles-ci permettraient de reconnatre la diffrence entre les + fichiers *.doc qui contiennent des documents Microsoft + Word et les documents FrameMaker (ce sont des formats de fichiers + incompatibles qui possdent le mme suffixe).

      + +
      # Frame
      +0  string  \<MakerFile        application/x-frame
      +0  string  \<MIFFile          application/x-frame
      +0  string  \<MakerDictionary  application/x-frame
      +0  string  \<MakerScreenFon   application/x-frame
      +0  string  \<MML              application/x-frame
      +0  string  \<Book             application/x-frame
      +0  string  \<Maker            application/x-frame
      +
      +# MS-Word
      +0  string  \376\067\0\043            application/msword
      +0  string  \320\317\021\340\241\261  application/msword
      +0  string  \333\245-\0\0\0           application/msword
      + +

      Un champ optionnel codage MIME peut tre ajout dans la cinquime + colonne. Par exemple, cette ligne permet de reconnatre les fichiers + compresss par gzip et dfinissent le type de codage.

      + +
      # gzip (GNU zip,  ne pas confondre avec
      +#       l'archiveur zip [Info-ZIP/PKWARE])
      +
      +0  string  \037\213  application/octet-stream  x-gzip
      +
      top
      +
      +

      Problmes lis aux performances

      +

      Ce module n'est pas fait pour tous les systmes. Si votre systme + parvient peine supporter sa charge, ou si vous testez les + performances d'un serveur web, il est dconseill d'utiliser ce + module car son fonctionnement a un prix en matire de ressources + consommes.

      + +

      Des efforts ont cependant t fournis pour amliorer les + performances du code original de la commande file(1) en + l'adaptant pour fonctionner sur un serveur web forte charge. Il a + t conu pour un serveur sur lequel des milliers d'utilisateurs + publient leurs propres documents, ce qui est probablement trs + courant sur un intranet. Il s'avre souvent bnfique qu'un serveur + puisse prendre des dcisions plus pertinentes propos du contenu + d'un fichier que celles se basant sur le nom du fichier seul, ne + serait-ce que pour diminuer le nombre d'appels du type "pourquoi ma + page ne s'affiche-t-elle pas ?" survenant lorsque les utilisateurs + nomment leurs fichiers incorrectement. Vous devez dterminer si la + charge supplmentaire convient votre environnement.

      +
      top
      +
      +

      Notes

      +

      Les notes suivantes s'appliquent au module + mod_mime_magic et sont incluses ici pour + conformit avec les restrictions de copyright des contributeurs + qui requirent de les accepter.

      +

      Note de traduction : ces informations de type lgal ne sont pas traductibles

      + +
      +

      mod_mime_magic: MIME type lookup via file magic numbers
      + Copyright (c) 1996-1997 Cisco Systems, Inc.

      + +

      This software was submitted by Cisco Systems to the Apache Group + in July 1997. Future revisions and derivatives of this source code + must acknowledge Cisco Systems as the original contributor of this + module. All other licensing and usage conditions are those of the + Apache Group.

      + +

      Some of this code is derived from the free version of the file + command originally posted to comp.sources.unix. Copyright info for + that program is included below as required.

      +
      + +
      +

      - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin.

      + +

      This software is not subject to any license of the American + Telephone and Telegraph Company or of the Regents of the University + of California.

      + +

      Permission is granted to anyone to use this software for any + purpose on any computer system, and to alter it and redistribute it + freely, subject to the following restrictions:

      + +
        +
      1. The author is not responsible for the consequences of use of + this software, no matter how awful, even if they arise from flaws + in it.
      2. + +
      3. The origin of this software must not be misrepresented, either + by explicit claim or by omission. Since few users ever read + sources, credits must appear in the documentation.
      4. + +
      5. Altered versions must be plainly marked as such, and must not + be misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation.
      6. + +
      7. This notice may not be removed or altered.
      8. +
      +
      + +
      +

      For compliance with Mr Darwin's terms: this has been very + significantly modified from the free "file" command.

      + +
        +
      • all-in-one file for compilation convenience when moving from + one version of Apache to the next.
      • + +
      • Memory allocation is done through the Apache API's pool + structure.
      • + +
      • All functions have had necessary Apache API request or server + structures passed to them where necessary to call other Apache API + routines. (i.e., usually for logging, files, or memory + allocation in itself or a called function.)
      • + +
      • struct magic has been converted from an array to a single-ended + linked list because it only grows one record at a time, it's only + accessed sequentially, and the Apache API has no equivalent of + realloc().
      • + +
      • Functions have been changed to get their parameters from the + server configuration instead of globals. (It should be reentrant + now but has not been tested in a threaded environment.)
      • + +
      • Places where it used to print results to stdout now saves them + in a list where they're used to set the MIME type in the Apache + request record.
      • + +
      • Command-line flags have been removed since they will never be + used here.
      • +
      +
      +
      +
      top
      +

      Directive MimeMagicFile

      + + + + + + +
      Description:Active la dtermination du type MIME en se basant sur le +contenu du fichier et en utilisant le fichier magique +spcifi
      Syntaxe:MimeMagicFile chemin-fichier
      Contexte:configuration du serveur, serveur virtuel
      Statut:Extension
      Module:mod_mime_magic
      +

      La directive MimeMagicFile permet + d'activer ce module, le fichier par dfaut fourni tant + conf/magic. Les chemins sans slash '/' de dbut sont + relatifs au rpertoire dfini par la directive ServerRoot. Les serveurs virtuels + utilisent le mme fichier que le serveur principal sauf si un + fichier spcifique a t dfini pour ce serveur virtuel, auquel cas + c'est ce dernier fichier qui sera utilis.

      + +

      Exemple

      MimeMagicFile conf/magic
      +
      + +
      +
      +
      +

      Langues Disponibles:  en  | + fr 

      +
      top

      Commentaires

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      + \ No newline at end of file diff --git a/docs/manual/mod/mod_mime_magic.xml b/docs/manual/mod/mod_mime_magic.xml index 0c40c38fb01..bd79868a4e2 100644 --- a/docs/manual/mod/mod_mime_magic.xml +++ b/docs/manual/mod/mod_mime_magic.xml @@ -264,7 +264,9 @@ using the specified magic file server's file.

      Example + MimeMagicFile conf/magic + diff --git a/docs/manual/mod/mod_mime_magic.xml.fr b/docs/manual/mod/mod_mime_magic.xml.fr new file mode 100644 index 00000000000..47c194f8c97 --- /dev/null +++ b/docs/manual/mod/mod_mime_magic.xml.fr @@ -0,0 +1,285 @@ + + + + + + + + + + + +mod_mime_magic +Détermine le type MIME d'un fichier à partir de quelques +octets de son contenu +Extension +mod_mime_magic.c +mime_magic_module + + +

      Ce module permet de déterminer le type + MIME des fichiers de la même manière que la commande Unix + file(1), à savoir en se basant sur les premiers octets + du fichier. Il est conçu comme une "seconde ligne de défense" pour + les cas où mod_mime ne parvient pas à déterminer le + type du fichier.

      + +

      Ce module est dérivé d'une version libre de la commande Unix + file(1) qui utilise des "nombres magiques" et autres + marques distinctives issus du contenu du fichier pour essayer de + déterminer le type de contenu. Ce module n'est activé que si le + fichier magique est spécifié par la directive MimeMagicFile.

      +
      + +
      Format du fichier magique + +

      Le fichier contient du texte ASCII sur 4 à 5 colonnes. Les lignes + vides sont autorisées mais ignorées. Toute ligne commençant par un + dièse (#) est un commentaire. Les autres lignes sont + interprétées en colonnes comme suit :

      + + + + + + + + + + + + + + + + + + +
      ColonneDescription
      1numéro de l'octet à partir duquel la vérification débute
      + ">" indique une dépendance par rapport à la + dernière ligne non-">"
      2

      type de donnée à rechercher

      + + + + + + + + + + + + + + + + + + + + + + + + +
      bytecaractère unique
      shortentier sur 16 bits selon l'ordre de la machine
      longentier sur 32 bits selon l'ordre de la machine
      stringchaîne de taille choisie
      datedate au format entier long (secondes depuis le temps Unix epoch/1970)
      beshortentier 16 bits big-endian
      belongentier 32 bits big-endian
      bedatedate au format entier 32 bits big-endian
      leshortentier 16 bits little-endian
      lelongentier 32 bits little-endian
      ledatedate au format entier 32 bits little-endian
      3contenu des données à rechercher
      4type MIME si correspondance
      5codage MIME si correspondance (optionnel)
      + +

      Par exemple, les lignes du fichier magique suivantes + permettraient de reconnaître certains formats audio :

      + + +
      # Sun/NeXT audio data
      +0      string      .snd
      +>12    belong      1       audio/basic
      +>12    belong      2       audio/basic
      +>12    belong      3       audio/basic
      +>12    belong      4       audio/basic
      +>12    belong      5       audio/basic
      +>12    belong      6       audio/basic
      +>12    belong      7       audio/basic
      +>12    belong     23       audio/x-adpcm
      +
      + +

      Et celles-ci permettraient de reconnaître la différence entre les + fichiers *.doc qui contiennent des documents Microsoft + Word et les documents FrameMaker (ce sont des formats de fichiers + incompatibles qui possèdent le même suffixe).

      + + +
      # Frame
      +0  string  \<MakerFile        application/x-frame
      +0  string  \<MIFFile          application/x-frame
      +0  string  \<MakerDictionary  application/x-frame
      +0  string  \<MakerScreenFon   application/x-frame
      +0  string  \<MML              application/x-frame
      +0  string  \<Book             application/x-frame
      +0  string  \<Maker            application/x-frame
      +
      +# MS-Word
      +0  string  \376\067\0\043            application/msword
      +0  string  \320\317\021\340\241\261  application/msword
      +0  string  \333\245-\0\0\0           application/msword
      +
      + +

      Un champ optionnel codage MIME peut être ajouté dans la cinquième + colonne. Par exemple, cette ligne permet de reconnaître les fichiers + compressés par gzip et définissent le type de codage.

      + + +
      # gzip (GNU zip, à ne pas confondre avec
      +#       l'archiveur zip [Info-ZIP/PKWARE])
      +
      +0  string  \037\213  application/octet-stream  x-gzip
      +
      +
      + +
      Problèmes liés aux performances +

      Ce module n'est pas fait pour tous les systèmes. Si votre système + parvient à peine à supporter sa charge, ou si vous testez les + performances d'un serveur web, il est déconseillé d'utiliser ce + module car son fonctionnement a un prix en matière de ressources + consommées.

      + +

      Des efforts ont cependant été fournis pour améliorer les + performances du code original de la commande file(1) en + l'adaptant pour fonctionner sur un serveur web à forte charge. Il a + été conçu pour un serveur sur lequel des milliers d'utilisateurs + publient leurs propres documents, ce qui est probablement très + courant sur un intranet. Il s'avère souvent bénéfique qu'un serveur + puisse prendre des décisions plus pertinentes à propos du contenu + d'un fichier que celles se basant sur le nom du fichier seul, ne + serait-ce que pour diminuer le nombre d'appels du type "pourquoi ma + page ne s'affiche-t-elle pas ?" survenant lorsque les utilisateurs + nomment leurs fichiers incorrectement. Vous devez déterminer si la + charge supplémentaire convient à votre environnement.

      +
      + +
      Notes +

      Les notes suivantes s'appliquent au module + mod_mime_magic et sont incluses ici pour + conformité avec les restrictions de copyright des contributeurs + qui requièrent de les accepter.

      +

      Note de traduction : ces informations de type légal ne sont pas traductibles

      + + +

      mod_mime_magic: MIME type lookup via file magic numbers
      + Copyright (c) 1996-1997 Cisco Systems, Inc.

      + +

      This software was submitted by Cisco Systems to the Apache Group + in July 1997. Future revisions and derivatives of this source code + must acknowledge Cisco Systems as the original contributor of this + module. All other licensing and usage conditions are those of the + Apache Group.

      + +

      Some of this code is derived from the free version of the file + command originally posted to comp.sources.unix. Copyright info for + that program is included below as required.

      +
      + + +

      - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin.

      + +

      This software is not subject to any license of the American + Telephone and Telegraph Company or of the Regents of the University + of California.

      + +

      Permission is granted to anyone to use this software for any + purpose on any computer system, and to alter it and redistribute it + freely, subject to the following restrictions:

      + +
        +
      1. The author is not responsible for the consequences of use of + this software, no matter how awful, even if they arise from flaws + in it.
      2. + +
      3. The origin of this software must not be misrepresented, either + by explicit claim or by omission. Since few users ever read + sources, credits must appear in the documentation.
      4. + +
      5. Altered versions must be plainly marked as such, and must not + be misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation.
      6. + +
      7. This notice may not be removed or altered.
      8. +
      +
      + + +

      For compliance with Mr Darwin's terms: this has been very + significantly modified from the free "file" command.

      + +
        +
      • all-in-one file for compilation convenience when moving from + one version of Apache to the next.
      • + +
      • Memory allocation is done through the Apache API's pool + structure.
      • + +
      • All functions have had necessary Apache API request or server + structures passed to them where necessary to call other Apache API + routines. (i.e., usually for logging, files, or memory + allocation in itself or a called function.)
      • + +
      • struct magic has been converted from an array to a single-ended + linked list because it only grows one record at a time, it's only + accessed sequentially, and the Apache API has no equivalent of + realloc().
      • + +
      • Functions have been changed to get their parameters from the + server configuration instead of globals. (It should be reentrant + now but has not been tested in a threaded environment.)
      • + +
      • Places where it used to print results to stdout now saves them + in a list where they're used to set the MIME type in the Apache + request record.
      • + +
      • Command-line flags have been removed since they will never be + used here.
      • +
      +
      +
      + + +MimeMagicFile +Active la détermination du type MIME en se basant sur le +contenu du fichier et en utilisant le fichier magique +spécifié +MimeMagicFile chemin-fichier +server configvirtual host + + + +

      La directive MimeMagicFile permet + d'activer ce module, le fichier par défaut fourni étant + conf/magic. Les chemins sans slash '/' de début sont + relatifs au répertoire défini par la directive ServerRoot. Les serveurs virtuels + utilisent le même fichier que le serveur principal sauf si un + fichier spécifique a été défini pour ce serveur virtuel, auquel cas + c'est ce dernier fichier qui sera utilisé.

      + + Exemple + + MimeMagicFile conf/magic + + +
      +
      + +
      diff --git a/docs/manual/mod/mod_mime_magic.xml.meta b/docs/manual/mod/mod_mime_magic.xml.meta index b697ddfa39f..f4302a5bc77 100644 --- a/docs/manual/mod/mod_mime_magic.xml.meta +++ b/docs/manual/mod/mod_mime_magic.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_negotiation.html.en b/docs/manual/mod/mod_negotiation.html.en index 60d891838e9..aa32c2dba2b 100644 --- a/docs/manual/mod/mod_negotiation.html.en +++ b/docs/manual/mod/mod_negotiation.html.en @@ -1,23 +1,28 @@ - -mod_negotiation - Apache HTTP Server +mod_negotiation - Apache HTTP Server Version 2.4 - + + + + +

      Apache HTTP Server Version 2.4

      +
      <-
      +Apache > HTTP Server > Documentation > Version 2.4 > Modules

      Apache Module mod_negotiation

      @@ -47,24 +52,24 @@ results.
    -
    top

    Type maps

    @@ -189,15 +194,21 @@ Negotiation and the .var file should be associated with the type-map handler with an AddHandler directive:

    -

    - AddHandler type-map .var -

    +
    AddHandler type-map .var
    -

    A request for document.html in this directory will - result in document.html.var being consulted, and the - variant chosen which most closely matches the language preference + +

    A request for document.html.var in this directory will + result in choosing the variant which most closely matches the language preference specified in the user's Accept-Language request header.

    + +

    If Multiviews is enabled, and MultiviewsMatch is set to "handlers" or "any", a request to + document.html will discover document.html.var and + continue negotiating with the explicit type map.

    + +

    Other configuration directives, such as Alias can be used to map document.html to + document.html.var.

    +
    top

    Multiviews

    @@ -252,7 +263,6 @@ found Override:FileInfo Status:Base Module:mod_negotiation -Compatibility:Available in version 2.0.30 and later

    The ForceLanguagePriority directive uses the given LanguagePriority to satisfy @@ -268,10 +278,9 @@ found (equally acceptable) then the first matching variant, en, will be served.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Prefer -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Prefer
    +

    ForceLanguagePriority Fallback uses LanguagePriority to @@ -281,10 +290,9 @@ found language response, but such a variant isn't found, then the first variant from the LanguagePriority list below will be served.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Fallback -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Fallback
    +

    Both options, Prefer and Fallback, may be specified, so either the first matching variant from LanguagePriority will be served if @@ -300,7 +308,7 @@ found

    top

    LanguagePriority Directive

    - @@ -314,9 +322,8 @@ the client does not express a preference express a preference, when handling a Multiviews request. The list of MIME-lang are in order of decreasing preference.

    -

    Example:

    - LanguagePriority en fr de -

    +
    LanguagePriority en fr de
    +

    For a request for foo.html, where foo.html.fr and foo.html.de both @@ -338,7 +345,28 @@ the client does not express a preference

    Available Languages:  en  |  fr  |  ja 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_negotiation.html.fr b/docs/manual/mod/mod_negotiation.html.fr index a4557071605..621f766a7a6 100644 --- a/docs/manual/mod/mod_negotiation.html.fr +++ b/docs/manual/mod/mod_negotiation.html.fr @@ -1,23 +1,28 @@ - -mod_negotiation - Serveur Apache HTTP +mod_negotiation - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_negotiation

    @@ -47,24 +52,24 @@ contenu de fichier implicite, et fait son choix parmi les rsultats.
    -
    top

    Tables de correspondances de types

    @@ -194,16 +199,23 @@ contenu et le fichier .var doit tre associ au gestionnaire type-map via une directive AddHandler :

    -

    - AddHandler type-map .var -

    +
    AddHandler type-map .var
    +

    A l'arrive d'une requte pour la ressource - document.html, le fichier - document.html.var sera consult, et la variante de + document.html.var, la variante de document.html qui correspond le mieux la prference de langage spcifie dans l'en-tte de la requte de l'utilisateur Accept-Language sera choisie.

    + +

    Si Multiviews est active, et si MultiviewsMatch est dfinie + "handlers" ou "any", une requte pour document.html va + rechercher document.html.var, et continuer la + ngociation avec le gestionnaire explicite type-map.

    + +

    D'autres directives de configuration, comme Alias, peuvent tre utilises pour + associer document.html avec + document.html.var.

    top

    Multivues

    @@ -223,7 +235,7 @@ contenu de ngociation de contenu lors du choix du fichier servir.

    top
    -
    Description:The precendence of language variants for cases where +
    Description:The precedence of language variants for cases where the client does not express a preference
    Syntax:LanguagePriority MIME-lang [MIME-lang] ...
    @@ -249,7 +261,7 @@ des documents dont le contenu a
    top
    -
    Description:Permet la mise en cache au niveau des serveurs mandataires des documents dont le contenu a t ngoci
    @@ -259,7 +271,6 @@ n'est pas trouv -
    Description:Action entreprendre si un document acceptable unique n'est pas trouv
    AllowOverride:FileInfo
    Statut:Base
    Module:mod_negotiation
    Compatibilit:Disponible depuis la version 2.0.30

    La directive ForceLanguagePriority utilise le langage dfini par la directive LanguagePriority pour terminer @@ -277,10 +288,9 @@ n'est pas trouv premire variante acceptable de langue en qui sera servie.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Prefer -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Prefer
    +

    ForceLanguagePriority Fallback utilise la directive LanguagePriority @@ -291,10 +301,9 @@ n'est pas trouv dans cette langue n'est trouve, c'est la premire variante de la liste dfinie par la directive LanguagePriority qui sera servie.

    -

    - LanguagePriority en fr de
    - ForceLanguagePriority Fallback -

    +
    LanguagePriority en fr de
    +ForceLanguagePriority Fallback
    +

    Les deux options, Prefer et Fallback, peuvent tre spcifies, de faon ce que la variante servie soit @@ -310,7 +319,7 @@ n'est pas trouv

    top
    -

    LanguagePriority Directive

    +

    Directive LanguagePriority

    @@ -328,9 +337,8 @@ cas o langages-MIME dans un ordre de prfrences dcroissantes.

    -

    Exemple:

    - LanguagePriority en fr de -

    +
    LanguagePriority en fr de
    +

    Dans le cas d'une requte pour foo.html, si foo.html.fr et foo.html.de existent, et si @@ -353,7 +361,28 @@ cas o

    Langues Disponibles:  en  |  fr  |  ja 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_negotiation.html.ja.utf8 b/docs/manual/mod/mod_negotiation.html.ja.utf8 index 9f2e796da84..34c26ca9e9e 100644 --- a/docs/manual/mod/mod_negotiation.html.ja.utf8 +++ b/docs/manual/mod/mod_negotiation.html.ja.utf8 @@ -1,33 +1,39 @@ - -mod_negotiation - Apache HTTP サーバ +mod_negotiation - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_negotiation

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:L'ordre de priorit des variantes de langages pour les cas o le client n'a pas formul de prfrences
    @@ -49,23 +55,23 @@ その結果から選択します。 -
    top

    タイプマップ

    @@ -239,7 +245,7 @@ 以下のディレクティブが指定されていて、ユーザの Accept-Languagees 言語のみを許可していて、さらにそのような variant がないときには、 以下の LanguagePriority - のリストの最初の variant が送れれます。

    + のリストの最初の variant が送られます。

    LanguagePriority en fr de
    @@ -296,10 +302,31 @@

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_negotiation.xml b/docs/manual/mod/mod_negotiation.xml index ef9593b1f52..97a11b04b06 100644 --- a/docs/manual/mod/mod_negotiation.xml +++ b/docs/manual/mod/mod_negotiation.xml @@ -177,15 +177,24 @@ Negotiation type-map handler with an AddHandler directive:

    - + AddHandler type-map .var - + -

    A request for document.html in this directory will - result in document.html.var being consulted, and the - variant chosen which most closely matches the language preference +

    A request for document.html.var in this directory will + result in choosing the variant which most closely matches the language preference specified in the user's Accept-Language request header.

    + +

    If Multiviews is enabled, and MultiviewsMatch is set to "handlers" or "any", a request to + document.html will discover document.html.var and + continue negotiating with the explicit type map.

    + +

    Other configuration directives, such as Alias can be used to map document.html to + document.html.var.

    +
    Multiviews @@ -239,7 +248,6 @@ found server configvirtual host directory.htaccess FileInfo -Available in version 2.0.30 and later

    The ForceLanguagePriority directive uses @@ -257,10 +265,10 @@ found (equally acceptable) then the first matching variant, en, will be served.

    - - LanguagePriority en fr de
    - ForceLanguagePriority Prefer -
    + +LanguagePriority en fr de +ForceLanguagePriority Prefer +

    ForceLanguagePriority Fallback uses LanguagePriority to @@ -271,10 +279,10 @@ found variant from the LanguagePriority list below will be served.

    - - LanguagePriority en fr de
    - ForceLanguagePriority Fallback -
    + +LanguagePriority en fr de +ForceLanguagePriority Fallback +

    Both options, Prefer and Fallback, may be specified, so either the first matching variant from LanguagePriority -The precendence of language variants for cases where +The precedence of language variants for cases where the client does not express a preference LanguagePriority MIME-lang [MIME-lang] ... @@ -302,9 +310,9 @@ the client does not express a preference express a preference, when handling a Multiviews request. The list of MIME-lang are in order of decreasing preference.

    - Example: + LanguagePriority en fr de - +

    For a request for foo.html, where foo.html.fr and foo.html.de both diff --git a/docs/manual/mod/mod_negotiation.xml.fr b/docs/manual/mod/mod_negotiation.xml.fr index 24e2324e49e..f19b8dc755a 100644 --- a/docs/manual/mod/mod_negotiation.xml.fr +++ b/docs/manual/mod/mod_negotiation.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -26,98 +26,98 @@ mod_negotiation Effectue la négociation de +href="../content-negotiation.html">négociation de contenu Base mod_negotiation.c negotiation_module

    -

    La négociation de contenu, ou plus précisément la sélection de - contenu, est la sélection parmi plusieurs documents disponibles, du - document qui "colle" au plus près des possibilités du client. Pour y - parvenir, deux méthodes sont employées.

    +

    La négociation de contenu, ou plus précisément la sélection de + contenu, est la sélection parmi plusieurs documents disponibles, du + document qui "colle" au plus près des possibilités du client. Pour y + parvenir, deux méthodes sont employées.

      -
    • Une table de correspondances de types (un fichier associé au +
    • Une table de correspondances de types (un fichier associé au gestionnaire type-map) qui contient une liste - explicite des fichiers contenant les différentes variantes.
    • + explicite des fichiers contenant les différentes variantes. -
    • Une recherche multivues (Multiviews) (activée par l'Options Multiviews), où le - serveur effectue une recherche de correspondance de modèle de nom - de fichier implicite, et fait son choix parmi les résultats.
    • +
    • Une recherche multivues (Multiviews) (activée par l'Options Multiviews), où le + serveur effectue une recherche de correspondance de modèle de nom + de fichier implicite, et fait son choix parmi les résultats.
    Options mod_mime -Négociation de +Négociation de contenu Variables d'environnement
    Tables de correspondances de types -

    Une table de correspondances de types possède un format similaire - à celui des en-têtes de messagerie RFC822. Elle contient des - descriptions de documents séparées par des lignes vides, toute ligne - commençant par un dièse ('#') étant considérée comme un +

    Une table de correspondances de types possède un format similaire + à celui des en-têtes de messagerie RFC822. Elle contient des + descriptions de documents séparées par des lignes vides, toute ligne + commençant par un dièse ('#') étant considérée comme un commentaire. Une description de document comporte plusieurs - enregistrements d'en-têtes ; chaque enregistrement peut être réparti - sur plusieurs lignes à condition que les lignes supplémentaires + enregistrements d'en-têtes ; chaque enregistrement peut être réparti + sur plusieurs lignes à condition que les lignes supplémentaires commencent par un ou plusieurs espaces. Lors du traitement, les - espaces de début de ligne seront supprimés et les lignes - concaténées. L'enregistrement d'un en-tête comprend un mot-clé qui - se termine toujours par un caractère "deux-points" ':', suivi d'une - valeur. Les espaces sont autorisés entre le nom d'en-tête et sa - valeur, ainsi qu'entre les différents éléments de la valeur. Les - en-têtes autorisés sont :

    + espaces de début de ligne seront supprimés et les lignes + concaténées. L'enregistrement d'un en-tête comprend un mot-clé qui + se termine toujours par un caractère "deux-points" ':', suivi d'une + valeur. Les espaces sont autorisés entre le nom d'en-tête et sa + valeur, ainsi qu'entre les différents éléments de la valeur. Les + en-têtes autorisés sont :

    Content-Encoding:
    -
    Le codage du fichier. Apache ne reconnaît que les codages - définis par une directive Le codage du fichier. Apache ne reconnaît que les codages + définis par une directive AddEncoding. Sont normalement inclus - les codages x-compress pour les fichiers compressés - avec compress, et x-gzip pour les fichiers compressés - avec gzip. Le préfixe x- est ignoré lors des + les codages x-compress pour les fichiers compressés + avec compress, et x-gzip pour les fichiers compressés + avec gzip. Le préfixe x- est ignoré lors des comparaisons de codages.
    Content-Language:
    Le(s) langage(s) de la variante, sous la forme d'un symbole de langage Internet standard (RFC 1766). Par - exemple, en correspond à l'anglais. Si la variante - contient plusieurs langages, ils sont séparés par des + exemple, en correspond à l'anglais. Si la variante + contient plusieurs langages, ils sont séparés par des virgules.
    Content-Length:
    -
    La taille du fichier en octets. Si cet en-tête n'est pas - présent, c'est la taille réelle du fichier qui est utilisée.
    +
    La taille du fichier en octets. Si cet en-tête n'est pas + présent, c'est la taille réelle du fichier qui est utilisée.
    Content-Type:
    Le type MIME du document - avec des paramètres optionnels. Les paramètres sont séparés du - type de médium ainsi qu'entre eux par un point-virgule, et - possèdent la syntaxe nom=valeur. Les paramètres + avec des paramètres optionnels. Les paramètres sont séparés du + type de médium ainsi qu'entre eux par un point-virgule, et + possèdent la syntaxe nom=valeur. Les paramètres courants sont :
    level
    -
    un entier spécifiant la version du type de média. Pour - text/html, la valeur par défaut est 2, sinon +
    un entier spécifiant la version du type de média. Pour + text/html, la valeur par défaut est 2, sinon 0.
    qs
    -
    un nombre en virgule flottante de 0[.000] à 1[.000], indiquant la - "qualité" relative de la variante courante par rapport aux - autres variantes disponibles, indépendamment des possibilités - du client. Par exemple, un fichier jpeg est en général une - source de qualité supérieure à un fichier ascii s'il est censé - représenter une image. Cependant, si la ressource représentée - est une image ascii, un fichier ascii possèdera une qualité - supérieure à un fichier jpeg. Toutes les valeurs de - qs sont donc spécifiques à une certaine +
    un nombre en virgule flottante de 0[.000] à 1[.000], indiquant la + "qualité" relative de la variante courante par rapport aux + autres variantes disponibles, indépendamment des possibilités + du client. Par exemple, un fichier jpeg est en général une + source de qualité supérieure à un fichier ascii s'il est censé + représenter une image. Cependant, si la ressource représentée + est une image ascii, un fichier ascii possèdera une qualité + supérieure à un fichier jpeg. Toutes les valeurs de + qs sont donc spécifiques à une certaine ressource.
    @@ -127,21 +127,21 @@ contenu
    URI:
    -
    l'URI du fichier contenant la variante (du type de médium - donné, codé selon le codage de contenu donné). Cet URI est - considéré comme relatif au fichier de correspondances ; il doit - être situé sur le même serveur, et doit faire référence au - fichier auquel le client se verrait accorder l'accès s'il était +
    l'URI du fichier contenant la variante (du type de médium + donné, codé selon le codage de contenu donné). Cet URI est + considéré comme relatif au fichier de correspondances ; il doit + être situé sur le même serveur, et doit faire référence au + fichier auquel le client se verrait accorder l'accès s'il était requis directement.
    Body:
    -
    Le contenu réel de la ressource - peut être inclus dans la table de correspondances en utilisant - l'en-tête Body. Cet en-tête doit contenir une chaîne désignant un - délimiteur pour le contenu du corps. Les lignes suivantes du - fichier de correspondances de types seront alors considérées comme - parties du corps de la ressource jusqu'à ce que le délimiteur soit - détecté. +
    Le contenu réel de la ressource + peut être inclus dans la table de correspondances en utilisant + l'en-tête Body. Cet en-tête doit contenir une chaîne désignant un + délimiteur pour le contenu du corps. Les lignes suivantes du + fichier de correspondances de types seront alors considérées comme + parties du corps de la ressource jusqu'à ce que le délimiteur soit + détecté. Exemple: Body:----xyz----
    @@ -155,8 +155,8 @@ contenu
    -

    Considérons une ressource, document.html, disponible - en anglais, en français et en allemand. Les fichiers correspondants +

    Considérons une ressource, document.html, disponible + en anglais, en français et en allemand. Les fichiers correspondants se nomment respectivement document.html.en, document.html.fr, et document.html.de. Le fichier de correspondances de types se nommera @@ -180,63 +180,73 @@ contenu -

    Ces quatre fichiers doivent se trouver dans le même répertoire, - et le fichier .var doit être associé au gestionnaire +

    Ces quatre fichiers doivent se trouver dans le même répertoire, + et le fichier .var doit être associé au gestionnaire type-map via une directive AddHandler :

    - + AddHandler type-map .var - + -

    A l'arrivée d'une requête pour la ressource - document.html, le fichier - document.html.var sera consulté, et la variante de - document.html qui correspond le mieux à la préference - de langage spécifiée dans l'en-tête de la requête de l'utilisateur +

    A l'arrivée d'une requête pour la ressource + document.html.var, la variante de + document.html qui correspond le mieux à la préference + de langage spécifiée dans l'en-tête de la requête de l'utilisateur Accept-Language sera choisie.

    + +

    Si Multiviews est activée, et si MultiviewsMatch est définie à + "handlers" ou "any", une requête pour document.html va + rechercher document.html.var, et continuer la + négociation avec le gestionnaire explicite type-map.

    + +

    D'autres directives de configuration, comme Alias, peuvent être utilisées pour + associer document.html avec + document.html.var.

    Multivues -

    Une recherche Multivues est activée par l'Une recherche Multivues est activée par l'Options Multiviews. Si le - serveur reçoit une requête pour /un/répertoire/foo, et - si /un/répertoire/foo n'existe pas, le serveur parcourt - le répertoire à la recherche de tous les fichiers de nom - foo.*, et simule véritablement une correspondance de - type qui nomme tous ces fichiers en leur assignant les mêmes type - de média et codage de contenu qu'ils auraient eus si le client avait + serveur reçoit une requête pour /un/répertoire/foo, et + si /un/répertoire/foo n'existe pas, le serveur parcourt + le répertoire à la recherche de tous les fichiers de nom + foo.*, et simule véritablement une correspondance de + type qui nomme tous ces fichiers en leur assignant les mêmes type + de média et codage de contenu qu'ils auraient eus si le client avait requis l'un d'entre eux avec son nom complet. Il choisit ensuite le fichier qui correspond le mieux au profile du client, puis renvoie le document.

    La directive MultiviewsMatch définit si Apache doit - prendre en compte les fichiers qui ne comportent pas de métadonnées - de négociation de contenu lors du choix du fichier à servir.

    + module="mod_mime">MultiviewsMatch définit si Apache doit + prendre en compte les fichiers qui ne comportent pas de métadonnées + de négociation de contenu lors du choix du fichier à servir.

    CacheNegotiatedDocs Permet la mise en cache au niveau des serveurs mandataires -des documents dont le contenu a été négocié +des documents dont le contenu a été négocié CacheNegotiatedDocs On|Off CacheNegotiatedDocs Off server configvirtual host -

    Si elle est définie à "on", cette directive permet la mise en +

    Si elle est définie à "on", cette directive permet la mise en cache au niveau des serveurs mandataires des documents dont le - contenu a été négocié. Le processus de mise en cache sera alors plus - efficace, mais des clients se trouvant derrière le mandataire + contenu a été négocié. Le processus de mise en cache sera alors plus + efficace, mais des clients se trouvant derrière le mandataire seront alors susceptibles de se voir servir des versions de - documents qui ne correspondent pas forcément à leurs attentes.

    + documents qui ne correspondent pas forcément à leurs attentes.

    -

    Cette directive ne s'applique qu'aux requêtes en provenance de - navigateurs HTTP/1.0. HTTP/1.1 fournit un bien meilleur contrôle de - la mise en cache des documents au contenu négocié, et cette - directive n'a aucun effet sur les réponses aux requêtes +

    Cette directive ne s'applique qu'aux requêtes en provenance de + navigateurs HTTP/1.0. HTTP/1.1 fournit un bien meilleur contrôle de + la mise en cache des documents au contenu négocié, et cette + directive n'a aucun effet sur les réponses aux requêtes HTTP/1.1.

    @@ -244,59 +254,58 @@ des documents dont le contenu a été négocié ForceLanguagePriority -Action à entreprendre si un document acceptable unique -n'est pas trouvé +Action à entreprendre si un document acceptable unique +n'est pas trouvé ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] ForceLanguagePriority Prefer server configvirtual host directory.htaccess FileInfo -Disponible depuis la version 2.0.30

    La directive ForceLanguagePriority utilise - le langage défini par la directive LanguagePriority pour terminer - la négociation lorsque le serveur n'est pas en mesure de trouver une + la négociation lorsque le serveur n'est pas en mesure de trouver une solution satisfaisante unique.

    ForceLanguagePriority Prefer utilise la directive - LanguagePriority pour servir le résultat d'un choix - unique, au lieu de renvoyer un résultat HTTP 300 (MULTIPLE CHOICES), - lorsque que plusieurs choix équivalents sont disponibles. Par - exemple, avec les deux directives ci-dessous, si l'en-tête - Accept-Language de l'utilisateur assigne à - en et de une qualité de .500 - (les deux langages sont également acceptables), alors c'est la - première variante acceptable de langue en qui sera + LanguagePriority pour servir le résultat d'un choix + unique, au lieu de renvoyer un résultat HTTP 300 (MULTIPLE CHOICES), + lorsque que plusieurs choix équivalents sont disponibles. Par + exemple, avec les deux directives ci-dessous, si l'en-tête + Accept-Language de l'utilisateur assigne à + en et de une qualité de .500 + (les deux langages sont également acceptables), alors c'est la + première variante acceptable de langue en qui sera servie.

    - - LanguagePriority en fr de
    - ForceLanguagePriority Prefer -
    + +LanguagePriority en fr de +ForceLanguagePriority Prefer +

    ForceLanguagePriority Fallback utilise la directive LanguagePriority - pour servir un résultat valide, au lieu de renvoyer un résultat HTTP + pour servir un résultat valide, au lieu de renvoyer un résultat HTTP 406 (NOT ACCEPTABLE). Avec les deux directives ci-dessous, si - l'en-tête Accept-Language de l'utilisateur ne mentionne - que les réponses de langage es, et si aucune variante - dans cette langue n'est trouvée, c'est la première variante de la - liste définie par la directive Accept-Language de l'utilisateur ne mentionne + que les réponses de langage es, et si aucune variante + dans cette langue n'est trouvée, c'est la première variante de la + liste définie par la directive LanguagePriority qui sera servie.

    - - LanguagePriority en fr de
    - ForceLanguagePriority Fallback -
    + +LanguagePriority en fr de +ForceLanguagePriority Fallback +

    Les deux options, Prefer et Fallback, - peuvent être spécifiées, de façon à ce que la variante servie soit - la première variante qui convient définie par la directive + peuvent être spécifiées, de façon à ce que la variante servie soit + la première variante qui convient définie par la directive LanguagePriority si - plusieurs variantes sont également acceptables, ou le premier - document disponible si aucune variante ne convient à la liste de + plusieurs variantes sont également acceptables, ou le premier + document disponible si aucune variante ne convient à la liste de langages acceptables fournie par le client.

    AddLanguage @@ -304,8 +313,8 @@ n'est pas trouvé LanguagePriority -L'ordre de priorité des variantes de langages pour les -cas où le client n'a pas formulé de préférences +L'ordre de priorité des variantes de langages pour les +cas où le client n'a pas formulé de préférences LanguagePriority langage-MIME [langage-MIME] ... server configvirtual host @@ -314,27 +323,27 @@ cas où le client n'a pas formulé de préférences

    La directive LanguagePriority permet de - définir, au cours du traitement d'une requête Multivues, l'ordre de - priorité des variantes de langages pour les cas - où le client n'a pas formulé de préférences. La liste énumère les - langages-MIME dans un ordre de préférences - décroissantes.

    + définir, au cours du traitement d'une requête Multivues, l'ordre de + priorité des variantes de langages pour les cas + où le client n'a pas formulé de préférences. La liste énumère les + langages-MIME dans un ordre de préférences + décroissantes.

    - Exemple: + LanguagePriority en fr de - + -

    Dans le cas d'une requête pour foo.html, si +

    Dans le cas d'une requête pour foo.html, si foo.html.fr et foo.html.de existent, et si - le client n'a pas formulé de préférences, c'est le fichier - foo.html.fr qui sera renvoyé.

    + le client n'a pas formulé de préférences, c'est le fichier + foo.html.fr qui sera renvoyé.

    Notez que cette directive n'a d'effet que si le 'meilleur' - langage n'a pas pu être déterminé d'une autre manière ou si la + langage n'a pas pu être déterminé d'une autre manière ou si la valeur de la directive ForceLanguagePriority est - différente de None. En général, c'est le client qui - détermine le langage préféré, non le serveur.

    + différente de None. En général, c'est le client qui + détermine le langage préféré, non le serveur.

    AddLanguage
    diff --git a/docs/manual/mod/mod_negotiation.xml.ja b/docs/manual/mod/mod_negotiation.xml.ja index 847f30e8573..c6a50032d4b 100644 --- a/docs/manual/mod/mod_negotiation.xml.ja +++ b/docs/manual/mod/mod_negotiation.xml.ja @@ -1,7 +1,7 @@ - + -mod_nw_ssl - Apache HTTP Server +mod_nw_ssl - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_nw_ssl

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    説明:コンテントネゴシエーション 機能を提供する
    ステータス:Base
    @@ -40,7 +46,9 @@
  • NWSSLUpgradeable
  • SecureListen
  • - +

    Bugfix checklist

    See also

    +
    top

    NWSSLTrustedCerts Directive

    @@ -90,8 +98,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_nw_ssl.html.fr b/docs/manual/mod/mod_nw_ssl.html.fr new file mode 100644 index 00000000000..e7b37b0dad0 --- /dev/null +++ b/docs/manual/mod/mod_nw_ssl.html.fr @@ -0,0 +1,131 @@ + + + + + +mod_nw_ssl - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_nw_ssl

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Enable SSL encryption for NetWare
    Status:Base
    + + + +
    Description:Active le chiffrement SSL pour Netware
    Statut:Base
    IdentificateurdeModule:nwssl_module
    FichierSource:mod_nw_ssl.c
    Compatibilit:NetWare seulement
    +

    Sommaire

    + +

    Ce module active le chiffrement SSL sur un port spcifique. Il + s'appuie sur la fonctionnalit de chiffrement SSL intgre au + systme d'exploitation Netware.

    +
    + + +
    top
    +

    Directive NWSSLTrustedCerts

    + + + + + + +
    Description:Liste de certificats clients supplmentaires
    Syntaxe:NWSSLTrustedCerts nom-fichier +[nom-fichier] ...
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_nw_ssl
    +

    Cette directive permet de spcifier une liste de fichiers (au + format DER) contenant des certificats clients utiliss lors de + l'tablissement d'une connexion SSL mandate. Chaque certificat + client utilis par un serveur doit tre enregistr sparment dans + son propre fichier .der.

    + +
    +
    top
    +

    Directive NWSSLUpgradeable

    + + + + + + +
    Description:Permet de promouvoir une connexion non SSL au statut de +connexion SSL la demande
    Syntaxe:NWSSLUpgradeable [adresse-IP:]num-port
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_nw_ssl
    +

    Cette directive permet de promouvoir une connexion tablie sur + l'adresse IP et/ou le port spcifis au statut de connexion SSL la + demande du client. L'adresse et/ou le port doivent avoir t dfinis + au pralable par une directive Listen.

    + +
    +
    top
    +

    Directive SecureListen

    + + + + + + +
    Description:Active le chiffrement SSL pour le port +spcifi
    Syntaxe:SecureListen [adresse-IP:]num-port +nom-certificat [MUTUAL]
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_nw_ssl
    +

    Cette directive permet de spcifier le port et le nom de + certificat de style eDirectory qui seront utiliss pour activer le + chiffrement SSL. En outre, un troisime paramtre optionnel permet + d'activer l'authentification mutuelle.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_nw_ssl.xml.fr b/docs/manual/mod/mod_nw_ssl.xml.fr new file mode 100644 index 00000000000..5f4f7a398a4 --- /dev/null +++ b/docs/manual/mod/mod_nw_ssl.xml.fr @@ -0,0 +1,88 @@ + + + + + + + + + + + +mod_nw_ssl +Active le chiffrement SSL pour Netware +Base +mod_nw_ssl.c +nwssl_module +NetWare seulement + + +

    Ce module active le chiffrement SSL sur un port spécifique. Il + s'appuie sur la fonctionnalité de chiffrement SSL intégrée au + système d'exploitation Netware.

    +
    + + +SecureListen +Active le chiffrement SSL pour le port +spécifié +SecureListen [adresse-IP:]num-port +nom-certificat [MUTUAL] +server config + + +

    Cette directive permet de spécifier le port et le nom de + certificat de style eDirectory qui seront utilisés pour activer le + chiffrement SSL. En outre, un troisième paramètre optionnel permet + d'activer l'authentification mutuelle.

    +
    +
    + + +NWSSLTrustedCerts +Liste de certificats clients supplémentaires +NWSSLTrustedCerts nom-fichier +[nom-fichier] ... +server config + + +

    Cette directive permet de spécifier une liste de fichiers (au + format DER) contenant des certificats clients utilisés lors de + l'établissement d'une connexion SSL mandatée. Chaque certificat + client utilisé par un serveur doit être enregistré séparément dans + son propre fichier .der.

    +
    +
    + + +NWSSLUpgradeable +Permet de promouvoir une connexion non SSL au statut de +connexion SSL à la demande +NWSSLUpgradeable [adresse-IP:]num-port +server config + + +

    Cette directive permet de promouvoir une connexion établie sur + l'adresse IP et/ou le port spécifiés au statut de connexion SSL à la + demande du client. L'adresse et/ou le port doivent avoir été définis + au préalable par une directive Listen.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_nw_ssl.xml.meta b/docs/manual/mod/mod_nw_ssl.xml.meta index 2c81bf124a6..6cdff9ea574 100644 --- a/docs/manual/mod/mod_nw_ssl.xml.meta +++ b/docs/manual/mod/mod_nw_ssl.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_privileges.html b/docs/manual/mod/mod_privileges.html index 9956b62fba7..53c085578eb 100644 --- a/docs/manual/mod/mod_privileges.html +++ b/docs/manual/mod/mod_privileges.html @@ -3,3 +3,7 @@ URI: mod_privileges.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_privileges.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_privileges.html.en b/docs/manual/mod/mod_privileges.html.en index 164ed325f23..dfec11d881e 100644 --- a/docs/manual/mod/mod_privileges.html.en +++ b/docs/manual/mod/mod_privileges.html.en @@ -1,39 +1,46 @@ - -mod_privileges - Apache HTTP Server +mod_privileges - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_privileges

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    +
    Description:Support for Solaris privileges and for running virtual hosts under different user IDs.
    Status:Experimental
    ModuleIdentifier:privileges_module
    SourceFile:mod_privileges.c
    Compatibility:Available in Apache 2.3 and up, on Solaris 10 and OpenSolaris platforms

    Summary

    This module enables different Virtual Hosts to run with different Unix User and Group IDs, and with different -Solaris Privileges. In particular, it offers a solution to the +Solaris Privileges. In particular, it offers a solution to the problem of privilege separation between different Virtual Hosts, first promised by the abandoned perchild MPM. It also offers other security enhancements.

    @@ -56,7 +63,10 @@ applications implemented in C as apache modules where privilege separation is an issue.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Security Considerations

    @@ -143,8 +152,8 @@ request-processing cycle.

    non-threaded MPMs (prefork or custom MPM).

    This server-wide directive determines whether Apache will run with - the privileges required to run - dtrace. + the privileges required to run + dtrace. Note that DTracePrivileges On will not in itself activate DTrace, but DTracePrivileges Off will prevent it working.

    @@ -156,6 +165,7 @@ non-threaded MPMs (preforkDescription:Trade off processing speed and efficiency vs security against malicious privileges-aware code. Syntax:PrivilegesMode FAST|SECURE|SELECTIVE +Default:PrivilegesMode FAST Context:server config, virtual host, directory Status:Experimental Module:mod_privileges @@ -205,14 +215,14 @@ subprocesses, and the privileges available to subprocesses. non-threaded MPMs (prefork or custom MPM).

    Determines whether the virtual host is allowed to run fork and exec, - the privileges required to run subprocesses. If this is set to + the privileges required to run subprocesses. If this is set to Off the virtualhost is denied the privileges and will not be able to run traditional CGI programs or scripts under the traditional mod_cgi, nor similar external programs such as those created by mod_ext_filter or RewriteMap prog. Note that it does not prevent CGI programs running under alternative - process and security models such as mod_fcgid, which is a recommended solution in Solaris.

    + process and security models such as mod_fcgid, which is a recommended solution in Solaris.

    If set to On or Secure, the virtual host is permitted to run external programs and scripts as above. Setting VHostCGIMode Secure has @@ -235,7 +245,7 @@ non-threaded MPMs (preforkmod_privileges is compiled with the BIG_SECURITY_HOLE compile-time option. -

    VHostCGIPrivs can be used to assign arbitrary privileges to subprocesses created by a virtual host, as discussed +

    VHostCGIPrivs can be used to assign arbitrary privileges to subprocesses created by a virtual host, as discussed under VHostCGIMode. Each privilege-name is the name of a Solaris privilege, such as file_setid or sys_nfs.

    @@ -268,7 +278,7 @@ non-threaded MPMs (preforkThe VHostGroup directive sets the Unix group under which the server will process requests to a virtualhost. The group is set before the request is processed and reset afterwards - using Solaris Privileges. Since the setting applies to the + using Solaris Privileges. Since the setting applies to the process, this is not compatible with threaded MPMs.

    Unix-group is one of:

    @@ -305,7 +315,7 @@ non-threaded MPMs (preforkmod_privileges is compiled with the BIG_SECURITY_HOLE compile-time option. -

    VHostPrivs can be used to assign arbitrary privileges to a virtual host. Each privilege-name +

    VHostPrivs can be used to assign arbitrary privileges to a virtual host. Each privilege-name is the name of a Solaris privilege, such as file_setid or sys_nfs.

    @@ -335,7 +345,7 @@ for the virtualhost. non-threaded MPMs (prefork or custom MPM).

    Determines whether the virtual host processes requests with - security enhanced by removal of Privileges that are rarely needed in a webserver, but which are + security enhanced by removal of Privileges that are rarely needed in a webserver, but which are available by default to a normal Unix user and may therefore be required by modules and applications. It is recommended that you retain the default (On) unless it prevents an application running. @@ -363,7 +373,7 @@ non-threaded MPMs (preforkThe VHostUser directive sets the Unix userid under which the server will process requests to a virtualhost. The userid is set before the request is processed and reset afterwards - using Solaris Privileges. Since the setting applies to the + using Solaris Privileges. Since the setting applies to the process, this is not compatible with threaded MPMs.

    Unix-userid is one of:

    @@ -388,8 +398,30 @@ non-threaded MPMs (prefork
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_privileges.html.fr b/docs/manual/mod/mod_privileges.html.fr new file mode 100644 index 00000000000..c5b84c5c8e9 --- /dev/null +++ b/docs/manual/mod/mod_privileges.html.fr @@ -0,0 +1,480 @@ + + + + + +mod_privileges - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_privileges

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Support des privilges de Solaris et de l'excution des +serveurs virtuels sous diffrents identifiants +utilisateurs.
    Statut:Exprimental
    IdentificateurdeModule:privileges_module
    FichierSource:mod_privileges.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache sur les +plates-formes Solaris 10 et OpenSolaris
    +

    Sommaire

    + +

    Ce module permet l'excution de diffrents serveurs virtuels sous +diffrents identifiants Unix User et Group, +et avec diffrents Privilges +Solaris. En particulier, il apporte au problme de +sparation des privilges entre les diffrents serveurs virtuels la +solution que devait apporter le module MPM abandonn perchild. Il +apporte aussi d'autres amliorations en matire de scurit.

    + +

    la diffrence de perchild, mod_privileges n'est +pas un module MPM. Il travaille au sein d'un modle de +traitement pour dfinir les privilges et les User/Group pour chaque +requte dans un mme processus. Il n'est donc pas compatible avec +les MPM threads, et refusera de s'excuter en cas d'utilisation d'un de +ces derniers.

    + +

    mod_privileges traite des problmes de scurit +similaires ceux de suexec ; mais la +diffrence de ce dernier, il ne s'applique pas seulement aux programmes +CGI, mais l'ensemble du cycle de traitement d'une requte, y compris +les applications in-process et les sous-processus. Il convient +particulirement l'excution des applications PHP sous +mod_php, qui est lui-mme incompatible avec les modules +MPM threads. Il est galement bien adapt aux autres applications de type +script in-process comme mod_perl, +mod_python, et mod_ruby, ainsi qu'aux +applications en langage C telles que les modules Apache pour lesquels la +sparation des privilges constitue un problme.

    + +
    + +
    top
    +
    +

    Considrations propos de scurit

    + +

    mod_privileges introduit de nouveaux problmes de +scurit dans les situations o du code non sr peut +s'excuter l'intrieur du processus du serveur web. +Ceci s'applique aux modules non srs, et aux scripts s'excutant sous +des modules comme mod_php ou mod_perl. Les scripts s'excutant en +externe (comme par exemple les scripts CGI ou ceux s'excutant sur un +serveur d'applications derrire mod_proxy ou mod_jk) ne sont pas +concerns.

    + +

    Les principaux problmes de scurit que l'on rencontre avec +mod_privileges sont :

    + + +
    • L'excution sous un utilisateur systme pose les mmes problmes +de scurit que mod_suexec, et pratiquement les mmes que cgiwrap et +suphp.
    • +
    • Une extension utilisateur (module ou script) malveillante, crite en connaissant les mcanismes +utiliss par mod_privileges, +pourrait lever ses privilges tout niveau +accessible au processus httpd dans tout serveur virtuel. Ceci introduit +de nouveaux risques si (et seulement si) mod_privileges est compil avec +l'option BIG_SECURITY_HOLE.
    • +
    • Une extension utilisateur (module ou script) malveillante, crite en connaissant les mcanismes +utiliss par mod_privileges, +pourrait lever ses privilges pour s'attribuer +l'identifiant utilisateur d'un autre utilisateur (et/ou groupe) +systme.
    • +
    + +

    La directive PrivilegesMode vous permet de +slectionner soit le mode FAST, soit le mode +SECURE. Vous pouvez panacher les modes en utilisant par +exemple le mode FAST pour les utilisateurs de confiance et +les chemins contenant du code entirement audit, tout en imposant le +mode SECURE o un utilisateur non sr a la possibilit +d'introduire du code.

    +

    Avant de dcrire les modes, il nous faut prsenter les cas +d'utilisation de la cible : "Benign" ou "Hostile". Dans une situation +"Benign", vous voulez sparer les utilisateurs pour leur confort, et les +protger, ainsi que le serveur, contre les risques induits par les +erreurs involontaires. Dans une situation "Hostile" - par exemple +l'hbergement d'un site commercial - il se peut que des utilisateurs +attaquent dlibrment le serveur ou s'attaquent entre eux.

    +
    +
    Mode FAST
    +
    En mode FAST, les requtes sont traites "in-process" +avec les uid/gid et privilges slectionns, si bien que la +surcharge est ngligeable. Ceci convient aux situations "Benign", mais +n'est pas scuris contre un attaquant augmentant ses privilges avec un +module ou script "in-process".
    +
    Mode SECURE
    +
    Une requte en mode SECURE gnre un sous-processus qui +supprime les privilges. Ce comportement est trs similaire +l'excution d'un programme CGI avec suexec, mais il reste valable tout +au long du cycle de traitement de la requte, avec en plus l'avantage +d'un contrle prcis des privilges.
    +
    +

    Vous pouvez slectionner diffrents +PrivilegesModes pour chaque serveur virtuel, et +mme dans un contexte de rpertoire l'intrieur d'un serveur virtuel. +Le mode FAST convient lorsque les utilisateurs sont srs +et/ou n'ont pas le privilge de charger du code "in-process". Le mode +SECURE convient dans les cas o du code non sr peut +s'excuter "in-process". Cependant, mme en mode SECURE, il +n'y a pas de protection contre un utilisateur malveillant qui a la +possibilit d'introduire du code supportant les privilges avant le +dbut du cycle de traitement de la requte.

    + +
    +
    top
    +

    Directive DTracePrivileges

    + + + + + + + + +
    Description:Dtermine si les privilges requis par dtrace sont +activs.
    Syntaxe:DTracePrivileges On|Off
    Dfaut:DTracePrivileges Off
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:>Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis).
    +

    Cette directive qui s'applique l'ensemble du serveur permet de + dterminer si Apache s'excutera avec les privilges requis pour excuter dtrace. + Notez que la dfinition DTracePrivileges On n'activera + pas elle-seule DTrace, mais que DTracePrivileges Off + l'empchera de fonctionner.

    + +
    +
    top
    +

    Directive PrivilegesMode

    + + + + + + + + +
    Description:Fait un compromis entre d'une part l'efficacit et la +vitesse de traitement et d'autre part la scurit l'encontre des codes +malicieux supportant les privilges.
    Syntaxe:PrivilegesMode FAST|SECURE|SELECTIVE
    Dfaut:PrivilegesMode FAST
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec des +modules MPMs non threads (comme prefork ou un module +personnalis).

    Cette directive permet de faire un compromis entre les +performances et la scurit l'encontre des codes malicieux supportant +les privilges. En mode SECURE, chaque requte est traite +dans un sous-processus scuris, ce qui induit une dgradation sensible +des performances. En mode FAST, le serveur n'est pas protg +contre l'augmentation de privilge comme dcrit plus haut.

    +

    Cette directive est sensiblement diffrente selon qu'elle se trouve +dans une section <Directory> (ou Location/Files/If) +ou au niveau global ou dans un <VirtualHost>.

    +

    Au niveau global, elle dfinit un comportement par dfaut dont +hriteront les serveurs virtuels. Dans un serveur virtuel, les modes +FAST ou SECURE agissent sur l'ensemble de la requte HTTP, et toute +dfinition de ces modes dans une section <Directory> +sera ignore. Le pseudo-mode SELECTIVE confie le choix +du mode FAST ou SECURE aux directives contenues dans une +section<Directory>.

    +

    Dans une section <Directory>, elle ne s'applique +que lorsque le mode SELECTIVE a t dfini pour le serveur virtuel. +Seuls FAST ou SECURE peuvent tre dfinis dans ce contexte (SELECTIVE +n'aurait pas de sens).

    +

    Avertissement

    + Lorsque le mode SELECTIVE a t dfini pour un serveur virtuel, + l'activation des privilges doit tre reporte aprs + la dtermination, par la phase de comparaison du traitement de + la requte, du contexte <Directory> qui + s'applique la requte. Ceci peut donner un attaquant + l'opportunit d'introduire du code via une directive RewriteMap s'excutant au + niveau global ou d'un serveur virtuel avant que les + privilges n'aient t supprims et l'uid/gid dfini. +
    + +
    +
    top
    +

    Directive VHostCGIMode

    + + + + + + + + +
    Description:Dtermine si le serveur virtuel peut excuter des +sous-processus, et dfinit les privilges disponibles pour ces +dernier.
    Syntaxe:VHostCGIMode On|Off|Secure
    Dfaut:VHostCGIMode On
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis).
    +

    Dtermine si le serveur virtuel est autoris excuter fork et + exec, et dfinit les privilges requis pour excuter des sous-processus. Si cette + directive est dfinie Off le serveur virtuel ne + disposera d'aucun privilge et ne pourra excuter ni des programmes + ou scripts CGI classiques via le module traditionnel + mod_cgi, ni des programmes externes similaires tels + que ceux crs via le module mod_ext_filter ou les + programmes de rcriture externes utiliss par la directive + RewriteMap. Notez que + ceci n'empche pas l'excution de programmes CGI via d'autres + processus et sous d'autres modles de scurit comme mod_fcgid, ce qui est la + solution recommande sous Solaris.

    +

    Si cette directive est dfinie On ou + Secure, le serveur virtuel pourra excuter les scripts et + programmes externes cits ci-dessus. Dfinir la directive + VHostCGIMode Secure a pour effet + supplmentaire de n'accorder aucun privilge aux sous-processus, + comme dcrit dans la directive + VHostSecure.

    + +
    +
    top
    +

    Directive VHostCGIPrivs

    + + + + + + + + +
    Description:Assigne des privilges au choix aux sous-processus crs +par un serveur virtuel.
    Syntaxe:VHostPrivs [+-]?nom-privilge [[+-]?nom-privilge] ...
    Dfaut:Aucun
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis) et lorsque mod_privileges est construit +avec l'option de compilation +BIG_SECURITY_HOLE.
    +

    La directive VHostCGIPrivs permet + d'assigner des privilges au choix aux sous-processus crs par un serveur + virtuel, comme dcrit dans la directive + VHostCGIMode. Chaque + nom-privilge correspond un privilge Solaris tel que + file_setid ou sys_nfs.

    + +

    nom-privilge peut tre ventuellement prfix par + + ou -, ce qui va respectivement accorder ou refuser le privilge. Si + nom-privilge est spcifi sans + ni -, tous les autres + privilges pralablement assigns au serveur virtuel seront refuss. + Cette directive permet de construire aisment votre propre jeu de + privilges en annulant tout rglage par dfaut.

    + +

    Scurit

    +

    L'utilisation de cette directive peut ouvrir d'immenses trous de + scurit dans les sous-processus Apache, jusqu' leur excution avec les + droits de root. Ne l'utilisez que si vous tes absolument sr de + comprendre ce que vous faites !

    + +
    +
    top
    +

    Directive VHostGroup

    + + + + + + + + +
    Description:Dfinit l'identifiant du groupe sous lequel s'excute un +serveur virtuel.
    Syntaxe:VHostGroup identifiant-groupe-unix
    Dfaut:Hrite de l'identifiant du groupe spcifi par la directive +Group
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis).
    +

    La directive VHostGroup permet de dfinir + l'identifiant du groupe unix sous lequel le serveur va traiter les + requtes par l'intermdiaire d'un serveur virtuel. L'identifiant + du groupe est dfini avant le traitement de la requte, puis + restaur sa valeur de dpart via les Privilges + Solaris. Comme la dfinition + s'applique au processus, cette directive est incompatible + avec les modules MPM threads.

    +

    Unix-group peut tre :

    +
    +
    Un nom de groupe
    +
    Fait rfrence au groupe donn par son nom.
    + +
    # suivi d'un numro de groupe.
    +
    Fait rfrence au groupe donn par son numro.
    +
    + +

    Scurit

    +

    Cette directive ne peut pas tre utilise pour excuter Apache en + tant que root ! Elle est tout de mme susceptible de poser des + problmes de scurit similaires ceux dcrits dans la + documentation de suexec.

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive VHostPrivs

    + + + + + + + + +
    Description:Assigne des privilges un serveur virtuel.
    Syntaxe:VHostPrivs [+-]?nom-privilge [[+-]?nom-privilge] ...
    Dfaut:Aucun
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis) et lorsque mod_privileges est construit +avec l'option de compilation +BIG_SECURITY_HOLE.
    +

    La directive VHostPrivs permet d'assigner + des privilges au choix un serveur virtuel. Chaque + nom-privilge correspond un privilge Solaris tel que + file_setid ou sys_nfs.

    + +

    nom-privilge peut tre ventuellement prfix par + + ou -, ce qui va respectivement accorder ou refuser le privilge. Si + nom-privilge est spcifi sans + ni -, tous les autres + privilges pralablement assigns au serveur virtuel seront refuss. + Cette directive permet de construire aisment votre propre jeu de + privilges en annulant tout rglage par dfaut.

    + +

    Scurit

    +

    L'utilisation de cette directive peut ouvrir d'immenses trous de + scurit dans Apache, jusqu'au traitement de requtes avec les + droits de root. Ne l'utilisez que si vous tes absolument sr de + comprendre ce que vous faites !

    + +
    +
    top
    +

    Directive VHostSecure

    + + + + + + + + +
    Description:Dtermine si le serveur s'excute avec une scurit avance +pour les serveurs virtuels.
    Syntaxe:VHostSecure On|Off
    Dfaut:VHostSecure On
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis).
    +

    Dtermine si les serveurs virtuels traitent les requtes avec une + scurit avance en supprimant les Privilges rarement requis par un serveur web, mais disponibles + par dfaut pour un utilisateur Unix standard, et donc susceptibles + d'tre demands par des modules et des applications. Il est + recommand de conserver la dfinition par dfaut (On), sauf si elle + empche une application de fonctionner. Comme la dfinition + s'applique au processus, cette directive est incompatible + avec les modules MPM threads.

    +

    Note

    +

    Le fait que la directive VHostSecure + empche une application de fonctionner peut constituer un signal + d'avertissement indiquant que la scurit de l'application doit tre + revue.

    + +
    +
    top
    +

    Directive VHostUser

    + + + + + + + + +
    Description:Dfinit l'identifiant utilisateur sous lequel s'excute un +serveur virtuel.
    Syntaxe:VHostUser identifiant-utilisateur-unix
    Dfaut:Hrite de l'identifiant utilisateur spcifi par la directive +User
    Contexte:serveur virtuel
    Statut:Exprimental
    Module:mod_privileges
    Compatibilit:Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threads (prefork ou MPM +personnalis).
    +

    La directive VHostUser permet de dfinir + l'identifiant utilisateur unix sous lequel le serveur va traiter les + requtes par l'intermdiaire d'un serveur virtuel. L'identifiant + utilisateur est dfini avant le traitement de la requte, puis + restaur sa valeur de dpart via les Privilges + Solaris. Comme la dfinition + s'applique au processus, cette directive est incompatible + avec les modules MPM threads.

    +

    identifiant-utilisateur-unix peut tre :

    +
    +
    Un nom d'utilisateur
    +
    Fait rfrence l'utilisateur donn par son nom.
    + +
    # suivi d'un numro d'utilisateur.
    +
    Fait rfrence l'utilisateur donn par son numro.
    +
    + +

    Scurit

    +

    Cette directive ne peut pas tre utilise pour excuter Apache en + tant que root ! Elle est tout de mme susceptible de poser des + problmes de scurit similaires ceux dcrits dans la + documentation de suexec.

    + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_privileges.xml b/docs/manual/mod/mod_privileges.xml index 0743fbcc1a1..facefc3e52d 100644 --- a/docs/manual/mod/mod_privileges.xml +++ b/docs/manual/mod/mod_privileges.xml @@ -26,6 +26,7 @@ Support for Solaris privileges and for running virtual hosts under different user IDs. Experimental +mod_privileges.c privileges_module Available in Apache 2.3 and up, on Solaris 10 and OpenSolaris platforms @@ -33,7 +34,7 @@ OpenSolaris platforms

    This module enables different Virtual Hosts to run with different Unix User and Group IDs, and with different -Solaris Privileges. In particular, it offers a solution to the problem of privilege separation between different Virtual Hosts, first promised by the abandoned perchild MPM. It also offers other security @@ -120,6 +121,7 @@ request-processing cycle.

    Trade off processing speed and efficiency vs security against malicious privileges-aware code. PrivilegesMode FAST|SECURE|SELECTIVE +PrivilegesMode FAST server config virtual host @@ -173,7 +175,7 @@ non-threaded MPMs (prefork or custom MPM). under which the server will process requests to a virtualhost. The userid is set before the request is processed and reset afterwards using Solaris Privileges. Since the setting applies to the process, this is not compatible with threaded MPMs.

    Unix-userid is one of:

    @@ -210,7 +212,7 @@ non-threaded MPMs (prefork or custom MPM). under which the server will process requests to a virtualhost. The group is set before the request is processed and reset afterwards using Solaris Privileges. Since the setting applies to the process, this is not compatible with threaded MPMs.

    Unix-group is one of:

    @@ -245,7 +247,7 @@ non-threaded MPMs (prefork or custom MPM).

    Determines whether the virtual host processes requests with security enhanced by removal of Privileges that are rarely needed in a webserver, but which are available by default to a normal Unix user and may therefore be required by modules and applications. It is recommended that @@ -272,7 +274,7 @@ non-threaded MPMs (prefork or custom MPM).

    Determines whether the virtual host is allowed to run fork and exec, the privileges required to run subprocesses. If this is set to Off the virtualhost is denied the privileges and will not be able to run traditional CGI programs or scripts under the traditional @@ -280,7 +282,8 @@ non-threaded MPMs (prefork or custom MPM). created by mod_ext_filter or RewriteMap prog. Note that it does not prevent CGI programs running under alternative - process and security models such as mod_fcgid, which is a recommended solution in Solaris.

    If set to On or Secure, the virtual host is permitted to run external programs and scripts as above. @@ -302,9 +305,9 @@ non-threaded MPMs (prefork or custom MPM).

    This server-wide directive determines whether Apache will run with the privileges required to run - dtrace. + dtrace. Note that DTracePrivileges On will not in itself activate DTrace, but DTracePrivileges Off will prevent it working.

    @@ -324,7 +327,7 @@ and when mod_privileges is compiled with the

    VHostPrivs can be used to assign arbitrary privileges to a virtual host. Each privilege-name is the name of a Solaris privilege, such as file_setid or sys_nfs.

    @@ -356,7 +359,7 @@ and when mod_privileges is compiled with the

    VHostCGIPrivs can be used to assign arbitrary privileges to subprocesses created by a virtual host, as discussed under VHostCGIMode. Each privilege-name is the name of a Solaris privilege, such as file_setid diff --git a/docs/manual/mod/mod_privileges.xml.fr b/docs/manual/mod/mod_privileges.xml.fr new file mode 100644 index 00000000000..83bce4ddef1 --- /dev/null +++ b/docs/manual/mod/mod_privileges.xml.fr @@ -0,0 +1,437 @@ + + + + + + + + + + + +mod_privileges +Support des privilèges de Solaris et de l'exécution des +serveurs virtuels sous différents identifiants +utilisateurs. +Experimental +mod_privileges.c +privileges_module +Disponible depuis la version 2.3 d'Apache sur les +plates-formes Solaris 10 et OpenSolaris + +

    +

    Ce module permet l'exécution de différents serveurs virtuels sous +différents identifiants Unix User et Group, +et avec différents Privilèges +Solaris. En particulier, il apporte au problème de +séparation des privilèges entre les différents serveurs virtuels la +solution que devait apporter le module MPM abandonné perchild. Il +apporte aussi d'autres améliorations en matière de sécurité.

    + +

    À la différence de perchild, mod_privileges n'est +pas un module MPM. Il travaille au sein d'un modèle de +traitement pour définir les privilèges et les User/Group pour chaque +requête dans un même processus. Il n'est donc pas compatible avec +les MPM threadés, et refusera de s'exécuter en cas d'utilisation d'un de +ces derniers.

    + +

    mod_privileges traite des problèmes de sécurité +similaires à ceux de suexec ; mais à la +différence de ce dernier, il ne s'applique pas seulement aux programmes +CGI, mais à l'ensemble du cycle de traitement d'une requête, y compris +les applications in-process et les sous-processus. Il convient +particulièrement à l'exécution des applications PHP sous +mod_php, qui est lui-même incompatible avec les modules +MPM threadés. Il est également bien adapté aux autres applications de type +script in-process comme mod_perl, +mod_python, et mod_ruby, ainsi qu'aux +applications en langage C telles que les modules Apache pour lesquels la +séparation des privilèges constitue un problème.

    + +
    + +
    Considérations à propos de sécurité + +

    mod_privileges introduit de nouveaux problèmes de +sécurité dans les situations où du code non sûr peut +s'exécuter à l'intérieur du processus du serveur web. +Ceci s'applique aux modules non sûrs, et aux scripts s'exécutant sous +des modules comme mod_php ou mod_perl. Les scripts s'exécutant en +externe (comme par exemple les scripts CGI ou ceux s'exécutant sur un +serveur d'applications derrière mod_proxy ou mod_jk) ne sont pas +concernés.

    + +

    Les principaux problèmes de sécurité que l'on rencontre avec +mod_privileges sont :

    + + +
    • L'exécution sous un utilisateur système pose les mêmes problèmes +de sécurité que mod_suexec, et pratiquement les mêmes que cgiwrap et +suphp.
    • +
    • Une extension utilisateur (module ou script) malveillante, écrite en connaissant les mécanismes +utilisés par mod_privileges, +pourrait élever ses privilèges à tout niveau +accessible au processus httpd dans tout serveur virtuel. Ceci introduit +de nouveaux risques si (et seulement si) mod_privileges est compilé avec +l'option BIG_SECURITY_HOLE.
    • +
    • Une extension utilisateur (module ou script) malveillante, écrite en connaissant les mécanismes +utilisés par mod_privileges, +pourrait élever ses privilèges pour s'attribuer +l'identifiant utilisateur d'un autre utilisateur (et/ou groupe) +système.
    • +
    + +

    La directive PrivilegesMode vous permet de +sélectionner soit le mode FAST, soit le mode +SECURE. Vous pouvez panacher les modes en utilisant par +exemple le mode FAST pour les utilisateurs de confiance et +les chemins contenant du code entièrement audité, tout en imposant le +mode SECURE où un utilisateur non sûr a la possibilité +d'introduire du code.

    +

    Avant de décrire les modes, il nous faut présenter les cas +d'utilisation de la cible : "Benign" ou "Hostile". Dans une situation +"Benign", vous voulez séparer les utilisateurs pour leur confort, et les +protéger, ainsi que le serveur, contre les risques induits par les +erreurs involontaires. Dans une situation "Hostile" - par exemple +l'hébergement d'un site commercial - il se peut que des utilisateurs +attaquent délibérément le serveur ou s'attaquent entre eux.

    +
    +
    Mode FAST
    +
    En mode FAST, les requêtes sont traitées "in-process" +avec les uid/gid et privilèges sélectionnés, si bien que la +surcharge est négligeable. Ceci convient aux situations "Benign", mais +n'est pas sécurisé contre un attaquant augmentant ses privilèges avec un +module ou script "in-process".
    +
    Mode SECURE
    +
    Une requête en mode SECURE génère un sous-processus qui +supprime les privilèges. Ce comportement est très similaire à +l'exécution d'un programme CGI avec suexec, mais il reste valable tout +au long du cycle de traitement de la requête, avec en plus l'avantage +d'un contrôle précis des privilèges.
    +
    +

    Vous pouvez sélectionner différents +PrivilegesModes pour chaque serveur virtuel, et +même dans un contexte de répertoire à l'intérieur d'un serveur virtuel. +Le mode FAST convient lorsque les utilisateurs sont sûrs +et/ou n'ont pas le privilège de charger du code "in-process". Le mode +SECURE convient dans les cas où du code non sûr peut +s'exécuter "in-process". Cependant, même en mode SECURE, il +n'y a pas de protection contre un utilisateur malveillant qui a la +possibilité d'introduire du code supportant les privilèges avant le +début du cycle de traitement de la requête.

    + +
    + +PrivilegesMode +Fait un compromis entre d'une part l'efficacité et la +vitesse de traitement et d'autre part la sécurité à l'encontre des codes +malicieux supportant les privilèges. +PrivilegesMode FAST|SECURE|SELECTIVE +PrivilegesMode FAST + + server config + virtual host + directory + +Disponible sous Solaris 10 et OpenSolaris avec des +modules MPMs non threadés (comme prefork ou un module +personnalisé). +

    Cette directive permet de faire un compromis entre les +performances et la sécurité à l'encontre des codes malicieux supportant +les privilèges. En mode SECURE, chaque requête est traitée +dans un sous-processus sécurisé, ce qui induit une dégradation sensible +des performances. En mode FAST, le serveur n'est pas protégé +contre l'augmentation de privilège comme décrit plus haut.

    +

    Cette directive est sensiblement différente selon qu'elle se trouve +dans une section <Directory> (ou Location/Files/If) +ou au niveau global ou dans un <VirtualHost>.

    +

    Au niveau global, elle définit un comportement par défaut dont +hériteront les serveurs virtuels. Dans un serveur virtuel, les modes +FAST ou SECURE agissent sur l'ensemble de la requête HTTP, et toute +définition de ces modes dans une section <Directory> +sera ignorée. Le pseudo-mode SELECTIVE confie le choix +du mode FAST ou SECURE aux directives contenues dans une +section<Directory>.

    +

    Dans une section <Directory>, elle ne s'applique +que lorsque le mode SELECTIVE a été défini pour le serveur virtuel. +Seuls FAST ou SECURE peuvent être définis dans ce contexte (SELECTIVE +n'aurait pas de sens).

    +Avertissement + Lorsque le mode SELECTIVE a été défini pour un serveur virtuel, + l'activation des privilèges doit être reportée après + la détermination, par la phase de comparaison du traitement de + la requête, du contexte <Directory> qui + s'applique à la requête. Ceci peut donner à un attaquant + l'opportunité d'introduire du code via une directive RewriteMap s'exécutant au + niveau global ou d'un serveur virtuel avant que les + privilèges n'aient été supprimés et l'uid/gid défini. + +
    +
    + + +VHostUser +Définit l'identifiant utilisateur sous lequel s'exécute un +serveur virtuel. +VHostUser identifiant-utilisateur-unix +Hérite de l'identifiant utilisateur spécifié par la directive +User +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé). + + +

    La directive VHostUser permet de définir + l'identifiant utilisateur unix sous lequel le serveur va traiter les + requêtes par l'intermédiaire d'un serveur virtuel. L'identifiant + utilisateur est défini avant le traitement de la requête, puis + restauré à sa valeur de départ via les Privilèges + Solaris. Comme la définition + s'applique au processus, cette directive est incompatible + avec les modules MPM threadés.

    +

    identifiant-utilisateur-unix peut être :

    +
    +
    Un nom d'utilisateur
    +
    Fait référence à l'utilisateur donné par son nom.
    + +
    # suivi d'un numéro d'utilisateur.
    +
    Fait référence à l'utilisateur donné par son numéro.
    +
    + + Sécurité +

    Cette directive ne peut pas être utilisée pour exécuter Apache en + tant que root ! Elle est tout de même susceptible de poser des + problèmes de sécurité similaires à ceux décrits dans la + documentation de suexec.

    +
    +User +SuexecUserGroup +
    + + +VHostGroup +Définit l'identifiant du groupe sous lequel s'exécute un +serveur virtuel. +VHostGroup identifiant-groupe-unix +Hérite de l'identifiant du groupe spécifié par la directive +Group +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé). + + +

    La directive VHostGroup permet de définir + l'identifiant du groupe unix sous lequel le serveur va traiter les + requêtes par l'intermédiaire d'un serveur virtuel. L'identifiant + du groupe est défini avant le traitement de la requête, puis + restauré à sa valeur de départ via les Privilèges + Solaris. Comme la définition + s'applique au processus, cette directive est incompatible + avec les modules MPM threadés.

    +

    Unix-group peut être :

    +
    +
    Un nom de groupe
    +
    Fait référence au groupe donné par son nom.
    + +
    # suivi d'un numéro de groupe.
    +
    Fait référence au groupe donné par son numéro.
    +
    + + Sécurité +

    Cette directive ne peut pas être utilisée pour exécuter Apache en + tant que root ! Elle est tout de même susceptible de poser des + problèmes de sécurité similaires à ceux décrits dans la + documentation de suexec.

    +
    +Group +SuexecUserGroup +
    + + +VHostSecure +Détermine si le serveur s'exécute avec une sécurité avancée +pour les serveurs virtuels. +VHostSecure On|Off +VHostSecure On +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé). + + +

    Détermine si les serveurs virtuels traitent les requêtes avec une + sécurité avancée en supprimant les Privilèges rarement requis par un serveur web, mais disponibles + par défaut pour un utilisateur Unix standard, et donc susceptibles + d'être demandés par des modules et des applications. Il est + recommandé de conserver la définition par défaut (On), sauf si elle + empêche une application de fonctionner. Comme la définition + s'applique au processus, cette directive est incompatible + avec les modules MPM threadés.

    + Note +

    Le fait que la directive VHostSecure + empêche une application de fonctionner peut constituer un signal + d'avertissement indiquant que la sécurité de l'application doit être + revue.

    +
    +
    + + +VHostCGIMode +Détermine si le serveur virtuel peut exécuter des +sous-processus, et définit les privilèges disponibles pour ces +dernier. +VHostCGIMode On|Off|Secure +VHostCGIMode On +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé). + + +

    Détermine si le serveur virtuel est autorisé à exécuter fork et + exec, et définit les privilèges requis pour exécuter des sous-processus. Si cette + directive est définie à Off le serveur virtuel ne + disposera d'aucun privilège et ne pourra exécuter ni des programmes + ou scripts CGI classiques via le module traditionnel + mod_cgi, ni des programmes externes similaires tels + que ceux créés via le module mod_ext_filter ou les + programmes de réécriture externes utilisés par la directive + RewriteMap. Notez que + ceci n'empêche pas l'exécution de programmes CGI via d'autres + processus et sous d'autres modèles de sécurité comme mod_fcgid, ce qui est la + solution recommandée sous Solaris.

    +

    Si cette directive est définie à On ou + Secure, le serveur virtuel pourra exécuter les scripts et + programmes externes cités ci-dessus. Définir la directive + VHostCGIMode à Secure a pour effet + supplémentaire de n'accorder aucun privilège aux sous-processus, + comme décrit dans la directive + VHostSecure.

    +
    +
    + + +DTracePrivileges +Détermine si les privilèges requis par dtrace sont +activés. +DTracePrivileges On|Off +DTracePrivileges Off +server config +>Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé). + + +

    Cette directive qui s'applique à l'ensemble du serveur permet de + déterminer si Apache s'exécutera avec les privilèges requis pour exécuter dtrace. + Notez que la définition DTracePrivileges On n'activera + pas à elle-seule DTrace, mais que DTracePrivileges Off + l'empêchera de fonctionner.

    +
    +
    + + +VHostPrivs +Assigne des privilèges à un serveur virtuel. +VHostPrivs [+-]?nom-privilège [[+-]?nom-privilège] ... +Aucun +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé) et lorsque mod_privileges est construit +avec l'option de compilation +BIG_SECURITY_HOLE. + + +

    La directive VHostPrivs permet d'assigner + des privilèges au choix à un serveur virtuel. Chaque + nom-privilège correspond à un privilège Solaris tel que + file_setid ou sys_nfs.

    + +

    nom-privilège peut être éventuellement préfixé par + + ou -, ce qui va respectivement accorder ou refuser le privilège. Si + nom-privilège est spécifié sans + ni -, tous les autres + privilèges préalablement assignés au serveur virtuel seront refusés. + Cette directive permet de construire aisément votre propre jeu de + privilèges en annulant tout réglage par défaut.

    + + Sécurité +

    L'utilisation de cette directive peut ouvrir d'immenses trous de + sécurité dans Apache, jusqu'au traitement de requêtes avec les + droits de root. Ne l'utilisez que si vous êtes absolument sûr de + comprendre ce que vous faites !

    +
    +
    + + +VHostCGIPrivs +Assigne des privilèges au choix aux sous-processus créés +par un serveur virtuel. +VHostPrivs [+-]?nom-privilège [[+-]?nom-privilège] ... +Aucun +virtual host +Disponible sous Solaris 10 et OpenSolaris avec les +modules MPM non-threadés (prefork ou MPM +personnalisé) et lorsque mod_privileges est construit +avec l'option de compilation +BIG_SECURITY_HOLE. + + +

    La directive VHostCGIPrivs permet + d'assigner des privilèges au choix aux sous-processus créés par un serveur + virtuel, comme décrit dans la directive + VHostCGIMode. Chaque + nom-privilège correspond à un privilège Solaris tel que + file_setid ou sys_nfs.

    + +

    nom-privilège peut être éventuellement préfixé par + + ou -, ce qui va respectivement accorder ou refuser le privilège. Si + nom-privilège est spécifié sans + ni -, tous les autres + privilèges préalablement assignés au serveur virtuel seront refusés. + Cette directive permet de construire aisément votre propre jeu de + privilèges en annulant tout réglage par défaut.

    + + Sécurité +

    L'utilisation de cette directive peut ouvrir d'immenses trous de + sécurité dans les sous-processus Apache, jusqu'à leur exécution avec les + droits de root. Ne l'utilisez que si vous êtes absolument sûr de + comprendre ce que vous faites !

    +
    +
    + + + + diff --git a/docs/manual/mod/mod_privileges.xml.meta b/docs/manual/mod/mod_privileges.xml.meta index 334dc46d7b9..40b28fd41a9 100644 --- a/docs/manual/mod/mod_privileges.xml.meta +++ b/docs/manual/mod/mod_privileges.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy.html.en b/docs/manual/mod/mod_proxy.html.en index 625cfe1c0c6..b706142945d 100644 --- a/docs/manual/mod/mod_proxy.html.en +++ b/docs/manual/mod/mod_proxy.html.en @@ -1,23 +1,28 @@ - -mod_proxy - Apache HTTP Server +mod_proxy - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy

    @@ -53,7 +58,7 @@ capabilities
  • mod_proxy_balancer and one or more - balancer modules, if load balancing is required. (See + balancer modules if load balancing is required. (See mod_proxy_balancer for more information.)
  • one or more proxy scheme, or protocol, modules: @@ -69,6 +74,7 @@ HTTP/0.9, HTTP/1.0, and HTTP/1.1mod_proxy_http SCGImod_proxy_scgi + WS and WSS (Web-sockets)mod_proxy_wstunnel
  • @@ -80,10 +86,25 @@ mod_ssl. These additional modules will need to be loaded and configured to take advantage of these features.

    -
    top

    Forward Proxies and Reverse @@ -146,7 +157,7 @@ server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server - as the target and the proxy then requests the content from the + as the target. The proxy then requests the content from the origin server and returns it to the client. The client must be specially configured to use the forward proxy to access other sites.

    @@ -166,15 +177,15 @@

    A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. - The client makes ordinary requests for content in the name-space + The client makes ordinary requests for content in the namespace of the reverse proxy. The reverse proxy then decides where to - send those requests, and returns the content as if it was itself + send those requests and returns the content as if it were itself the origin.

    A typical usage of a reverse proxy is to provide Internet users access to a server that is behind a firewall. Reverse proxies can also be used to balance load among several back-end - servers, or to provide caching for a slower back-end server. + servers or to provide caching for a slower back-end server. In addition, reverse proxies can be used simply to bring several servers into the same URL space.

    @@ -193,27 +204,41 @@

    In addition, if you wish to have caching enabled, consult the documentation from mod_cache.

    -

    Reverse Proxy

    - ProxyPass /foo http://foo.example.com/bar
    - ProxyPassReverse /foo http://foo.example.com/bar -

    +

    Reverse Proxy

    ProxyPass "/foo" "http://foo.example.com/bar"
    +ProxyPassReverse "/foo" "http://foo.example.com/bar"
    +
    + +

    Forward Proxy

    ProxyRequests On
    +ProxyVia On
    +
    +<Proxy "*">
    +  Require host internal.example.com
    +</Proxy>
    +
    +

    top
    +
    +

    Access via Handler

    + +

    You can also force a request to be handled as a reverse-proxy + request, by creating a suitable Handler pass-through. The example + configuration below will pass all requests for PHP scripts to the + specified FastCGI server using reverse proxy: +

    + +

    Reverse Proxy PHP scripts

    <FilesMatch "\.php$">
    +    # Unix sockets require 2.4.7 or later
    +    SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
    +</FilesMatch>
    +
    + +

    This feature is available in Apache HTTP Server 2.4.10 and later.

    -

    Forward Proxy

    - ProxyRequests On
    - ProxyVia On
    -
    - <Proxy *>
    - - Require host internal.example.com
    -
    - </Proxy> -

    top

    Workers

    The proxy manages the configuration of origin servers and their communication parameters in objects called workers. - There are two built-in workers, the default forward proxy worker and the + There are two built-in workers: the default forward proxy worker and the default reverse proxy worker. Additional workers can be configured explicitly.

    @@ -229,48 +254,42 @@ ProxyPassMatch when used for a reverse proxy:

    -

    - ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 -

    +
    ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30
    +

    This will create a worker associated with the origin server URL - http://backend.example.com and using the given timeout + http://backend.example.com that will use the given timeout values. When used in a forward proxy, workers are usually defined via the ProxySet directive:

    -

    - ProxySet http://backend.example.com connectiontimeout=5 timeout=30 -

    +
    ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30
    +

    or alternatively using Proxy and ProxySet:

    -

    - <Proxy http://backend.example.com>
    - - ProxySet connectiontimeout=5 timeout=30 - - </Proxy> -

    +
    <Proxy "http://backend.example.com">
    +  ProxySet connectiontimeout=5 timeout=30
    +</Proxy>
    +

    Using explicitly configured workers in the forward mode is not very common, because forward proxies usually communicate with many different origin servers. Creating explicit workers for some of the - origin servers can still be useful, if they are used very often. + origin servers can still be useful if they are used very often. Explicitly configured workers have no concept of forward or reverse proxying by themselves. They encapsulate a common concept of communication with origin servers. A worker created by ProxyPass for use in a - reverse proxy will be also used for forward proxy requests whenever - the URL to the origin server matches the worker URL and vice versa.

    + reverse proxy will also be used for forward proxy requests whenever + the URL to the origin server matches the worker URL, and vice versa.

    The URL identifying a direct worker is the URL of its origin server including any path components given:

    -

    - ProxyPass /examples http://backend.example.com/examples
    - ProxyPass /docs http://backend.example.com/docs -

    +
    ProxyPass "/examples" "http://backend.example.com/examples"
    +ProxyPass "/docs" "http://backend.example.com/docs"
    +

    This example defines two different workers, each using a separate connection pool and configuration.

    @@ -280,22 +299,21 @@ the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. In the following example

    -

    - ProxyPass /apps http://backend.example.com/ timeout=60
    - ProxyPass /examples http://backend.example.com/examples timeout=10 -

    +
    ProxyPass "/apps" "http://backend.example.com/" timeout=60
    +ProxyPass "/examples" "http://backend.example.com/examples" timeout=10
    +

    the second worker isn't actually created. Instead the first worker is used. The benefit is, that there is only one connection pool, so connections are more often reused. Note that all configuration attributes given explicitly for the later worker will be ignored. This will be logged - as a warning. In the above example the resulting timeout value + as a warning. In the above example, the resulting timeout value for the URL /examples will be 60 instead of 10!

    If you want to avoid worker sharing, sort your worker definitions by URL length, starting with the longest worker URLs. If you want to maximize - worker sharing use the reverse sort order. See also the related warning about + worker sharing, use the reverse sort order. See also the related warning about ordering ProxyPass directives.

    @@ -308,7 +326,7 @@ ProxySet.

    The set of options available for a direct worker - depends on the protocol, which is specified in the origin server URL. + depends on the protocol which is specified in the origin server URL. Available protocols include ajp, fcgi, ftp, http and scgi.

    @@ -323,19 +341,28 @@ Members are added to a balancer using BalancerMember.

    +

    DNS resolution for origin domains

    +

    DNS resolution happens when the socket to + the origin domain is created for the first time. + When connection pooling is used, each backend domain is resolved + only once per child process, and reused for all further connections + until the child is recycled. This information should to be considered + while planning DNS maintenance tasks involving backend domains. + Please also check ProxyPass + parameters for more details about connection reuse. +

    +
    +
    top
    -

    Controlling access to your proxy

    +

    Controlling Access to Your Proxy

    You can control who can access your proxy via the <Proxy> control block as in the following example:

    -

    - <Proxy *>
    - - Require ip 192.168.0
    -
    - </Proxy> -

    +
    <Proxy "*">
    +  Require ip 192.168.0
    +</Proxy>
    +

    For more information on access control directives, see mod_authz_host.

    @@ -392,15 +419,12 @@

    These are the force-proxy-request-1.0 and proxy-nokeepalive notes.

    -

    - <Location /buggyappserver/>
    - - ProxyPass http://buggyappserver:7001/foo/
    - SetEnv force-proxy-request-1.0 1
    - SetEnv proxy-nokeepalive 1
    -
    - </Location> -

    +
    <Location "/buggyappserver/">
    +  ProxyPass "http://buggyappserver:7001/foo/"
    +  SetEnv force-proxy-request-1.0 1
    +  SetEnv proxy-nokeepalive 1
    +</Location>
    +
    top
    @@ -463,6 +487,11 @@

    See also the ProxyPreserveHost and ProxyVia directives, which control other request headers.

    +

    Note: If you need to specify custom request headers to be + added to the forwarded request, use the + RequestHeader + directive.

    +
    top

    BalancerGrowth Directive

    @@ -478,9 +507,27 @@

    This directive allows for growth potential in the number of Balancers available for a virtualhost in addition to the - number pre-configured. It only take effect if there is at - least 1 pre-configured Balancer.

    + number pre-configured. It only takes effect if there is at + least one pre-configured Balancer.

    +
    +
    top
    +

    BalancerInherit Directive

    + + + + + + + + +
    Description:Inherit ProxyPassed Balancers/Workers from the main server
    Syntax:BalancerInherit On|Off
    Default:BalancerInherit On
    Context:server config, virtual host
    Status:Extension
    Module:mod_proxy
    Compatibility:BalancerInherit is only available in Apache HTTP Server 2.4.5 and later.
    +

    This directive will cause the current server/vhost to "inherit" ProxyPass + Balancers and Workers defined in the main server. This can cause issues and + inconsistent behavior if using the Balancer Manager and so should be disabled + if using that feature.

    +

    The setting in the global server defines the default for all vhosts.

    +
    top

    BalancerMember Directive

    @@ -493,17 +540,40 @@ Compatibility:BalancerMember is only available in Apache HTTP Server 2.2 and later. -

    This directive adds a member to a load balancing group. It could be used +

    This directive adds a member to a load balancing group. It can be used within a <Proxy balancer://...> container - directive, and can take any of the key value pair parameters available to + directive and can take any of the key value pair parameters available to ProxyPass directives.

    -

    One additional parameter is available only to BalancerMember directives: +

    One additional parameter is available only to BalancerMember directives: loadfactor. This is the member load factor - a number between 1 (default) and 100, which defines the weighted load to be applied to the member in question.

    -

    The balancerurl is only needed when not in <Proxy balancer://...> +

    The balancerurl is only needed when not within a + <Proxy balancer://...> container directive. It corresponds to the url of a balancer defined in ProxyPass directive.

    +

    The path component of the balancer URL in any + <Proxy balancer://...> container directive + is ignored.

    +

    Trailing slashes should typically be removed from the URL of a + BalancerMember.

    + +
    +
    top
    +

    BalancerPersist Directive

    + + + + + + + + +
    Description:Attempt to persist changes made by the Balancer Manager across restarts.
    Syntax:BalancerPersist On|Off
    Default:BalancerPersist Off
    Context:server config, virtual host
    Status:Extension
    Module:mod_proxy
    Compatibility:BalancerPersist is only available in Apache HTTP Server 2.4.4 and later.
    +

    This directive will cause the shared memory storage associated + with the balancers and balancer members to be persisted across + restarts. This allows these local changes to not be lost during the + normal restart/graceful state transitions.

    top
    @@ -523,10 +593,9 @@ directly always served directly, without forwarding to the configured ProxyRemote proxy server(s).

    -

    Example

    - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21 -

    +

    Example

    ProxyRemote  "*"  "http://firewall.example.com:81"
    +NoProxy         ".example.com" "192.168.112.0/21"
    +

    The host arguments to the NoProxy directive are one of the following type list:

    @@ -551,7 +620,7 @@ directly

    Note

    Domain name comparisons are done without regard to the case, and Domains are always assumed to be anchored in the root of the - DNS tree, therefore two domains .ExAmple.com and + DNS tree; therefore, the two domains .ExAmple.com and .example.com. (note the trailing period) are considered equal. Since a domain comparison does not involve a DNS lookup, it is much more efficient than subnet comparison.

    @@ -578,7 +647,7 @@ directly

    As a degenerate case, a SubNet with 32 valid bits is the - equivalent to an IPAddr, while a SubNet with zero + equivalent to an IPAddr, while a SubNet with zero valid bits (e.g., 0.0.0.0/0) is the same as the constant _Default_, matching any IP address.

    @@ -620,7 +689,7 @@ directly link.

    Hostname comparisons are done without regard to the case, and Hostnames are always assumed to be anchored in the root - of the DNS tree, therefore two hosts WWW.ExAmple.com + of the DNS tree; therefore, the two hosts WWW.ExAmple.com and www.example.com. (note the trailing period) are considered equal.

    @@ -648,25 +717,31 @@ directly yournetwork.example.com to access content via your proxy server:

    -

    - <Proxy *>
    - - Require host yournetwork.example.com
    -
    - </Proxy> -

    +
    <Proxy "*">
    +  Require host yournetwork.example.com
    +</Proxy>
    +

    The following example will process all files in the foo directory of example.com through the INCLUDES filter when they are sent through the proxy server:

    -

    - <Proxy http://example.com/foo/*>
    - - SetOutputFilter INCLUDES
    -
    - </Proxy> -

    +
    <Proxy "http://example.com/foo/*">
    +  SetOutputFilter INCLUDES
    +</Proxy>
    + + +

    Differences from the Location configuration section

    +

    A backend URL matches the configuration section if it begins with the + the wildcard-url string, even if the last path segment in the + directive only matches a prefix of the backend URL. For example, + <Proxy "http://example.com/foo"> matches all of + http://example.com/foo, http://example.com/foo/bar, and + http://example.com/foobar. The matching of the final URL differs + from the behavior of the <Location> section, which for purposes of this note + treats the final path component as if it ended in a slash.

    +

    For more control over the matching, see <ProxyMatch>.

    +

    See also

    @@ -702,17 +777,16 @@ response Context:server config, virtual host Status:Extension Module:mod_proxy -Compatibility:Available in Apache HTTP Server 2.0.44 and later

    The ProxyBadHeader directive determines the - behaviour of mod_proxy if it receives syntactically invalid + behavior of mod_proxy if it receives syntactically invalid response header lines (i.e. containing no colon) from the origin server. The following arguments are possible:

    IsError
    Abort the request and end up with a 502 (Bad Gateway) response. This is - the default behaviour.
    + the default behavior.
    Ignore
    Treat bad header lines as if they weren't sent.
    @@ -743,9 +817,8 @@ proxied may be hostnames during startup, and cache them for match test as well. That may slow down the startup time of the server.

    -

    Example

    - ProxyBlock news.example.com auctions.example.com friends.example.com -

    +

    Example

    ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com"
    +

    Note that example would also be sufficient to match any of these sites.

    @@ -754,9 +827,8 @@ proxied

    Note also that

    -

    - ProxyBlock * -

    +
    ProxyBlock "*"
    +

    blocks connections to all sites.

    @@ -777,11 +849,10 @@ proxied response to the same host with the configured Domain appended will be generated.

    -

    Example

    - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21
    - ProxyDomain .example.com -

    +

    Example

    ProxyRemote  "*"  "http://firewall.example.com:81"
    +NoProxy         ".example.com" "192.168.112.0/21"
    +ProxyDomain     ".example.com"
    +
    top
    @@ -793,15 +864,14 @@ proxied Context:server config, virtual host, directory Status:Extension Module:mod_proxy -Compatibility:Available in version 2.0 and later -

    This directive is useful for reverse-proxy setups, where you want to +

    This directive is useful for reverse-proxy setups where you want to have a common look and feel on the error pages seen by the end user. This also allows for included files (via mod_include's SSI) to get - the error code and act accordingly (default behavior would display - the error page of the proxied server, turning this on shows the SSI - Error message).

    + the error code and act accordingly. (Default behavior would display + the error page of the proxied server. Turning this on shows the SSI + Error message.)

    This directive does not affect the processing of informational (1xx), normal success (2xx), or redirect (3xx) responses.

    @@ -818,15 +888,18 @@ proxied Module:mod_proxy

    The ProxyIOBufferSize directive adjusts the size - of the internal buffer, which is used as a scratchpad for the data between + of the internal buffer which is used as a scratchpad for the data between input and output. The size must be at least 512.

    -

    In almost every case there's no reason to change that value.

    -

    If used with AJP this directive sets the maximum AJP packet size in - bytes. If you change it from the default, you must also change the - packetSize attribute of your AJP connector on the - Tomcat side! The attribute packetSize is only available - in Tomcat 5.5.20+ and 6.0.2+

    +

    In almost every case, there's no reason to change that value.

    + +

    If used with AJP, this directive sets the maximum AJP packet size in + bytes. Values larger than 65536 are set to 65536. If you change it from + the default, you must also change the packetSize attribute of + your AJP connector on the Tomcat side! The attribute + packetSize is only available in Tomcat 5.5.20+ + and 6.0.2+

    +

    Normally it is not necessary to change the maximum packet size. Problems with the default value have been reported when sending certificates or certificate chains.

    @@ -844,9 +917,21 @@ proxied resources Module:mod_proxy

    The <ProxyMatch> directive is - identical to the <Proxy> directive, except it matches URLs + identical to the <Proxy> directive, except that it matches URLs using regular expressions.

    +

    From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of URLs to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

    + +
    <ProxyMatch "^http://(?<sitename>[^/]+)">
    +    Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</ProxyMatch>
    + +

    See also

    • <Proxy>
    • @@ -862,24 +947,22 @@ through Context:server config, virtual host Status:Extension Module:mod_proxy -Compatibility:Available in Apache HTTP Server 2.0 and later; - default behaviour changed in 2.2.7/2.3 +Compatibility:Default behaviour changed in 2.2.7

      The ProxyMaxForwards directive specifies the - maximum number of proxies through which a request may pass, if there's no + maximum number of proxies through which a request may pass if there's no Max-Forwards header supplied with the request. This may - be set to prevent infinite proxy loops, or a DoS attack.

      + be set to prevent infinite proxy loops or a DoS attack.

      -

      Example

      - ProxyMaxForwards 15 -

      +

      Example

      ProxyMaxForwards 15
      +

      Note that setting ProxyMaxForwards is a violation of the HTTP/1.1 protocol (RFC2616), which forbids a Proxy setting Max-Forwards if the Client didn't set it. Earlier Apache httpd versions would always set it. A negative ProxyMaxForwards value, including the - default -1, gives you protocol-compliant behaviour, but may + default -1, gives you protocol-compliant behavior but may leave you open to loops.

      @@ -888,49 +971,70 @@ through + [key=value ...]] [nocanon] [interpolate] [noquery] +
      Description:Maps remote servers into the local server URL-space
      Syntax:ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]
      Context:server config, virtual host, directory
      Status:Extension
      Module:mod_proxy
      Compatibility:Unix Domain Socket (UDS) support added in 2.4.7

      This directive allows remote servers to be mapped into the - space of the local server; the local server does not act as a - proxy in the conventional sense, but appears to be a mirror of the + space of the local server. The local server does not act as a + proxy in the conventional sense but appears to be a mirror of the remote server. The local server is often called a reverse proxy or gateway. The path is the name of a local virtual path; url is a partial URL for the remote server and cannot include a query string.

      +
      Note: This directive is not supported within + <Directory> and + <Files> containers.
      +
      The ProxyRequests directive should usually be set off when using ProxyPass.
      +

      In 2.4.7 and later, support for using a Unix Domain Socket is available by using a target + which prepends unix:/path/lis.sock|. For example, to proxy + HTTP and target the UDS at /home/www/socket, you would use + unix:/home/www.socket|http://localhost/whatever/.

      + +
      Note: The path associated with the unix: + URL is DefaultRuntimeDir aware.
      + +

      When used inside a <Location> section, the first argument is omitted and the local + directory is obtained from the <Location>. The same will occur inside a + <LocationMatch> section; + however, ProxyPass does not interpret the regexp as such, so it is necessary + to use ProxyPassMatch in this situation instead.

      +

      Suppose the local server has address http://example.com/; then

      -

      - <Location /mirror/foo/>
      - - ProxyPass http://backend.example.com/
      -
      - </Location>
      -

      +
      <Location "/mirror/foo/">
      +    ProxyPass "http://backend.example.com/"
      +</Location>
      +

      will cause a local request for http://example.com/mirror/foo/bar to be internally converted into a proxy request to http://backend.example.com/bar.

      -

      The following alternative syntax is possible, however carries a - performance penalty when present in large numbers:

      +

      If you require a more flexible reverse-proxy configuration, see the + RewriteRule directive with the + [P] flag.

      + +

      The following alternative syntax is possible; however, it can carry a + performance penalty when present in very large numbers. The advantage of + the below syntax is that it allows for dynamic control via the + Balancer Manager interface:

      + +
      ProxyPass "/mirror/foo/" "http://backend.example.com/"
      -

      - ProxyPass /mirror/foo/ http://backend.example.com/ -

      If the first argument ends with a trailing /, the second - argument should also end with a trailing / and vice - versa. Otherwise the resulting requests to the backend may miss some + argument should also end with a trailing /, and vice + versa. Otherwise, the resulting requests to the backend may miss some needed slashes and do not deliver the expected results.

      @@ -938,23 +1042,17 @@ through

      The ! directive is useful in situations where you don't want to reverse-proxy a subdirectory, e.g.

      -

      - <Location /mirror/foo/>
      - - ProxyPass http://backend.example.com/
      -
      - </Location>
      - <Location /mirror/foo/i>
      - - ProxyPass !
      -
      - </Location>
      -

      +
      <Location "/mirror/foo/">
      +    ProxyPass "http://backend.example.com/"
      +</Location>
      +<Location "/mirror/foo/i">
      +    ProxyPass "!"
      +</Location>
      + + +
      ProxyPass "/mirror/foo/i" "!"
      +ProxyPass "/mirror/foo" "http://backend.example.com"
      -

      - ProxyPass /mirror/foo/i !
      - ProxyPass /mirror/foo http://backend.example.com -

      will proxy all requests to /mirror/foo to backend.example.com except requests made to @@ -966,24 +1064,26 @@ through rules are checked in the order of configuration. The first rule that matches wins. So usually you should sort conflicting ProxyPass rules starting with the - longest URLs first. Otherwise later rules for longer URLS will be hidden + longest URLs first. Otherwise, later rules for longer URLS will be hidden by any earlier rule which uses a leading substring of the URL. Note that there is some relation with worker sharing. In contrast, only one ProxyPass directive can be placed in a Location block, and the most specific location will take precedence.

      -

      For the same reasons exclusions must come before the +

      For the same reasons, exclusions must come before the general ProxyPass directives.

      +

      ProxyPass key=value Parameters

      +

      In Apache HTTP Server 2.1 and later, mod_proxy supports pooled connections to a backend server. Connections created on demand can be retained in a pool for future use. Limits on the pool size and other settings can be coded on the ProxyPass directive - using key=value parameters, described in the table + using key=value parameters, described in the tables below.

      By default, mod_proxy will allow and retain the maximum number of @@ -1000,9 +1100,8 @@ through among all child processes, except when only one child process is allowed by configuration or MPM design.

      -

      Example

      - ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 -

      +

      Example

      ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300
      +
      BalancerMember parameters
      @@ -1020,7 +1119,7 @@ through @@ -1034,16 +1133,16 @@ through closed more aggressively. - @@ -1058,14 +1157,20 @@ through robin DNS. To disable connection pooling reuse, set this property value to On. + + + @@ -1081,10 +1186,11 @@ through @@ -1126,16 +1232,16 @@ through @@ -1151,11 +1257,11 @@ through
      Maximum number of connections that will be allowed to the backend server. The default for this limit is the number of threads per process in the active MPM. In the Prefork MPM, this is always 1, - while with other MPMs it is controlled by the + while with other MPMs, it is controlled by the ThreadsPerChild directive.
      smax max
      acquire -If set this will be the maximum time to wait for a free + If set, this will be the maximum time to wait for a free connection in the connection pool, in milliseconds. If there are no free - connections in the pool the Apache httpd will return SERVER_BUSY + connections in the pool, the Apache httpd will return SERVER_BUSY status to the client.
      connectiontimeout timeout Connect timeout in seconds. The number of seconds Apache httpd waits for the creation of a connection to - the backend to complete. By adding a postfix of ms the timeout can be + the backend to complete. By adding a postfix of ms, the timeout can be also set in milliseconds.
      disablereuse
      enablereuseOnThis is the inverse of 'disablereuse' above, provided as a + convenience for scheme handlers that require opt-in for connection + reuse (such as mod_proxy_fcgi). 2.4.11 and later only. +
      flushpackets off Determines whether the proxy module will auto-flush the output brigade after each "chunk" of data. 'off' means that it will flush - only when needed, 'on' means after each chunk is sent and + only when needed; 'on' means after each chunk is sent; and 'auto' means poll/wait for a period of time and flush if no input has been received for 'flushwait' milliseconds. - Currently this is in effect only for AJP. + Currently, this is in effect only for AJP.
      flushwait 10
      keepalive Off

      This parameter should be used when you have a firewall between your - Apache httpd and the backend server, who tend to drop inactive connections. + Apache httpd and the backend server, which tends to drop inactive connections. This flag will tell the Operating System to send KEEP_ALIVE - messages on inactive connections and thus prevent the firewall to drop the connection. - To enable keepalive set this property value to On.

      + messages on inactive connections and thus prevent the firewall from dropping + the connection. + To enable keepalive, set this property value to On.

      The frequency of initial and subsequent TCP keepalive probes depends on global OS settings, and may be as high as 2 hours. To be useful, the frequency configured in the OS must be smaller than the threshold used @@ -1100,19 +1206,19 @@ through

      0 Ping property tells the webserver to "test" the connection to the backend before forwarding the request. For AJP, it causes - mod_proxy_ajpto send a CPING + mod_proxy_ajp to send a CPING request on the ajp13 connection (implemented on Tomcat 3.3.2+, 4.1.28+ and 5.0.13+). For HTTP, it causes mod_proxy_http to send a 100-Continue to the backend (only valid for HTTP/1.1 - for non HTTP/1.1 backends, this property has no - effect). In both cases the parameter is the delay in seconds to wait + effect). In both cases, the parameter is the delay in seconds to wait for the reply. This feature has been added to avoid problems with hung and busy backends. This will increase the network traffic during the normal operation which could be an issue, but it will lower the traffic in case some of the cluster nodes are down or busy. - By adding a postfix of ms the delay can be also set in + By adding a postfix of ms, the delay can be also set in milliseconds.
      receivebuffersize
      - Redirection Route of the worker. This value is usually set dynamically to enable safe removal of the node from - the cluster. If set all requests without session id will be - redirected to the BalancerMember that has route parametar - equal as this value. + the cluster. If set, all requests without session id will be + redirected to the BalancerMember that has route parameter + equal to this value.
      retry 60 Connection pool worker retry timeout in seconds. If the connection pool worker to the backend server is in the error state, Apache httpd will not forward any requests to that server until the timeout - expires. This enables to shut down the backend server for maintenance, + expires. This enables to shut down the backend server for maintenance and bring it back online later. A value of 0 means always retry workers in an error state with no timeout.
      - + -
      D: Worker is disabled and will not accept any requests.
      S: Worker is administratively stopped.
      I: Worker is in ignore-errors mode, and will always be considered available.
      I: Worker is in ignore-errors mode and will always be considered available.
      H: Worker is in hot-standby mode and will only be used if no other viable workers are available.
      E: Worker is in an error state.
      N: Worker is in drain mode, and will only accept existing sticky sessions +
      N: Worker is in drain mode and will only accept existing sticky sessions destined for itself and ignore all other requests.
      Status can be set (which is the default) by prepending with '+' or @@ -1175,16 +1281,22 @@ through connection will not be used again; it will be closed at some later time. + flusher + flush +

      Name of the provider used by mod_proxy_fdpass. + See the documentation of this module for more details.

      +

      If the Proxy directive scheme starts with the - balancer:// (eg: balancer://cluster/, - any path information is ignored) then a virtual worker that does not really - communicate with the backend server will be created. Instead it is responsible - for the management of several "real" workers. In that case the special set of - parameters can be add to this virtual worker. See mod_proxy_balancer - for more information about how the balancer works. + balancer:// (eg: balancer://cluster, + any path information is ignored), then a virtual worker that does not really + communicate with the backend server will be created. Instead, it is responsible + for the management of several "real" workers. In that case, the special set of + parameters can be added to this virtual worker. + See mod_proxy_balancer for more information about how + the balancer works.

      Balancer parameters
      @@ -1195,9 +1307,9 @@ through @@ -1205,9 +1317,9 @@ through - @@ -1215,27 +1327,42 @@ through like JSESSIONID or PHPSESSIONID, and it depends on the backend application server that support sessions. If the backend application server uses different name for cookies - and url encoded id (like servlet containers) use | to to separate them. - The first part is for the cookie the second for the path. + and url encoded id (like servlet containers) use | to separate them. + The first part is for the cookie the second for the path.
      + Available in Apache HTTP Server 2.4.4 and later. + + + + - - - + + + + + +
      byrequests Balancer load-balance method. Select the load-balancing scheduler method to use. Either byrequests, to perform weighted - request counting, bytraffic, to perform weighted - traffic byte count balancing, or bybusyness, to perform - pending request balancing. Default is byrequests. + request counting; bytraffic, to perform weighted + traffic byte count balancing; or bybusyness, to perform + pending request balancing. The default is byrequests.
      maxattempts One less than the number of workers, or 1 with a single worker.
      nofailover OffIf set to On the session will break if the worker is in - error state or disabled. Set this value to On if backend servers do not - support session replication. + If set to On, the session will break if the worker is in + error state or disabled. Set this value to On if backend + servers do not support session replication.
      stickysession -
      stickysessionsep"."Sets the separation symbol in the session cookie. Some backend application servers + do not use the '.' as the symbol. For example, the Oracle Weblogic server uses + '!'. The correct symbol can be set using this option. The setting of 'Off' + signifies that no symbol is used.
      scolonpathdelim OffIf set to On the semi-colon character ';' will be - used as an additional sticky session path deliminator/separator. This + If set to On, the semi-colon character ';' will be + used as an additional sticky session path delimiter/separator. This is mainly used to emulate mod_jk's behavior when dealing with paths such as JSESSIONID=6736bcf34;foo=aabfa
      timeout 0Balancer timeout in seconds. If set this will be the maximum time - to wait for a free worker. Default is not to wait. + Balancer timeout in seconds. If set, this will be the maximum time + to wait for a free worker. The default is to not wait.
      failonstatus -A single or comma-separated list of HTTP status codes. If set this will + A single or comma-separated list of HTTP status codes. If set, this will force the worker into error state when the backend returns any status code in the list. Worker recovery behaves the same as other worker errors.
      failontimeoutOffIf set, an IO read timeout after a request is sent to the backend will + force the worker into error state. Worker recovery behaves the same as other + worker errors.
      + Available in Apache HTTP Server 2.4.5 and later. +
      nonce <auto> The protective nonce used in the balancer-manager application page. @@ -1253,67 +1380,100 @@ through
      Number of additional BalancerMembers to allow to be added to this balancer in addition to those defined at configuration.
      forcerecoveryOnForce the immediate recovery of all workers without considering the + retry parameter of the workers if all workers of a balancer are + in error state. There might be cases where an already overloaded backend + can get into deeper trouble if the recovery of all workers is enforced + without considering the retry parameter of each worker. In this case, + set to Off.
      + Available in Apache HTTP Server 2.4.2 and later. +
      -

      A sample balancer setup

      -

      - ProxyPass /special-area http://special.example.com smax=5 max=10
      - ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
      - <Proxy balancer://mycluster>
      - - BalancerMember ajp://1.2.3.4:8009
      - BalancerMember ajp://1.2.3.5:8009 loadfactor=20
      - # Less powerful server, don't send as many requests there,
      - BalancerMember ajp://1.2.3.6:8009 loadfactor=5
      -
      - </Proxy> -

      - -

      Setting up a hot-standby, that will only be used if no other - members are available

      -

      - ProxyPass / balancer://hotcluster/
      - <Proxy balancer://hotcluster>
      - - BalancerMember ajp://1.2.3.4:8009 loadfactor=1
      - BalancerMember ajp://1.2.3.5:8009 loadfactor=2
      - # The below is the hot standby
      - BalancerMember ajp://1.2.3.6:8009 status=+H
      - ProxySet lbmethod=bytraffic -
      - </Proxy> -

      +

      A sample balancer setup:

      +
      ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
      +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
      +<Proxy "balancer://mycluster">
      +    BalancerMember "ajp://1.2.3.4:8009"
      +    BalancerMember "ajp://1.2.3.5:8009" loadfactor=20
      +    # Less powerful server, don't send as many requests there,
      +    BalancerMember "ajp://1.2.3.6:8009" loadfactor=5
      +</Proxy>
      + + +

      Setting up a hot-standby that will only be used if no other + members are available:

      +
      ProxyPass "/" "balancer://hotcluster/"
      +<Proxy "balancer://hotcluster">
      +    BalancerMember "ajp://1.2.3.4:8009" loadfactor=1
      +    BalancerMember "ajp://1.2.3.5:8009" loadfactor=2
      +    # The server below is on hot standby
      +    BalancerMember "ajp://1.2.3.6:8009" status=+H
      +    ProxySet lbmethod=bytraffic
      +</Proxy>
      + + +

      Additional ProxyPass Keywords

      Normally, mod_proxy will canonicalise ProxyPassed URLs. But this may be incompatible with some backends, particularly those that make use of PATH_INFO. The optional nocanon - keyword suppresses this, and passes the URL path "raw" to the - backend. Note that may affect the security of your backend, as it - removes the normal limited protection against URL-based attacks + keyword suppresses this and passes the URL path "raw" to the + backend. Note that this keyword may affect the security of your backend, + as it removes the normal limited protection against URL-based attacks provided by the proxy.

      -

      The optional interpolate keyword (available in - httpd 2.2.9 and later), in combination with - ProxyPassInterpolateEnv causes the ProxyPass +

      Normally, mod_proxy will include the query string when + generating the SCRIPT_FILENAME environment variable. + The optional noquery keyword (available in + httpd 2.4.1 and later) prevents this.

      + +

      The optional interpolate keyword, in combination with + ProxyPassInterpolateEnv, causes the ProxyPass to interpolate environment variables, using the syntax ${VARNAME}. Note that many of the standard CGI-derived environment variables will not exist when this interpolation happens, so you may still have to resort to mod_rewrite - for complex rules.

      + for complex rules. Also note that interpolation is not supported + within the scheme portion of a URL. Dynamic determination of the + scheme can be accomplished with mod_rewrite as in the + following example.

      -

      When used inside a <Location> section, the first argument is omitted and the local - directory is obtained from the <Location>. The same will occur inside a - <LocationMatch> section, - however ProxyPass does not interpret the regexp as such, so it is necessary - to use ProxyPassMatch in this situation instead.

      +
      RewriteEngine On
       
      -    

      This directive is not supported in <Directory> or <Files> sections.

      +RewriteCond "%{HTTPS}" =off +RewriteRule "." "-" [E=protocol:http] +RewriteCond "%{HTTPS}" =on +RewriteRule "." "-" [E=protocol:https] -

      If you require a more flexible reverse-proxy configuration, see the - RewriteRule directive with the - [P] flag.

      +RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P] +ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverse "/mirror/foo/" "https://backend.example.com/"
      + +
      top
      +

      ProxyPassInherit Directive

      + + + + + + + + +
      Description:Inherit ProxyPass directives defined from the main server
      Syntax:ProxyPassInherit On|Off
      Default:ProxyPassInherit On
      Context:server config, virtual host
      Status:Extension
      Module:mod_proxy
      Compatibility:ProxyPassInherit is only available in Apache HTTP Server 2.4.5 and later. +
      +

      This directive will cause the current server/vhost to "inherit" + ProxyPass + directives defined in the main server. This can cause issues and + inconsistent behavior if using the Balancer Manager for dynamic changes + and so should be disabled if using that feature.

      +

      The setting in the global server defines the default for all vhosts.

      +

      Disabling ProxyPassInherit also disables BalancerInherit.

      +
      top

      ProxyPassInterpolateEnv Directive

      @@ -1328,18 +1488,18 @@ through

      This directive, together with the interpolate argument to ProxyPass, ProxyPassReverse, - ProxyPassReverseCookieDomain and - ProxyPassReverseCookiePath + ProxyPassReverseCookieDomain, and + ProxyPassReverseCookiePath, enables reverse proxies to be dynamically - configured using environment variables, which may be set by + configured using environment variables which may be set by another module such as mod_rewrite. It affects the ProxyPass, ProxyPassReverse, ProxyPassReverseCookieDomain, and - ProxyPassReverseCookiePath directives, + ProxyPassReverseCookiePath directives and causes them to substitute the value of an environment variable varname for the string ${varname} - in configuration directives.

      + in configuration directives if the interpolate option is set.

      Keep this turned off (for server performance) unless you need it!

      @@ -1353,18 +1513,20 @@ through Status:Extension Module:mod_proxy -

      This directive is equivalent to ProxyPass, - but makes use of regular expressions, instead of simple prefix matching. The +

      This directive is equivalent to ProxyPass + but makes use of regular expressions instead of simple prefix matching. The supplied regular expression is matched against the url, and if it matches, the server will substitute any parenthesized matches into the given string and use it as a new url.

      +
      Note: This directive cannot be used within a + <Directory> context.
      +

      Suppose the local server has address http://example.com/; then

      -

      - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 -

      +
      ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com/$1"
      +

      will cause a local request for http://example.com/foo/bar.gif to be internally converted @@ -1373,15 +1535,13 @@ through

      The URL argument must be parsable as a URL before regexp substitutions (as well as after). This limits the matches you can use. For instance, if we had used

      -

      - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 -

      +
      ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1"
      +

      in our previous example, it would fail with a syntax error at server startup. This is a bug (PR 46665 in the ASF bugzilla), and the workaround is to reformulate the match:

      -

      - ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 -

      +
      ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1"
      +

      The ! directive is useful in situations where you don't want to reverse-proxy a subdirectory.

      @@ -1393,12 +1553,19 @@ through RewriteRule directive with the [P] flag.

      +
      +

      Default Substitution

      +

      When the URL parameter doesn't use any backreferences into the regular + expression, the original URL will be appended to the URL parameter. +

      +
      +

      Security Warning

      Take care when constructing the target URL of the rule, considering the security impact from allowing the client influence over the set of URLs to which your server will act as a proxy. Ensure that the scheme - and hostname part of the URL is either fixed, or does not allow the + and hostname part of the URL is either fixed or does not allow the client undue influence.

      @@ -1417,59 +1584,59 @@ proxied server

      This directive lets Apache httpd adjust the URL in the Location, Content-Location and URI headers on HTTP redirect responses. This is essential when Apache httpd is used as a - reverse proxy (or gateway) to avoid by-passing the reverse proxy + reverse proxy (or gateway) to avoid bypassing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy.

      Only the HTTP response headers specifically mentioned above will be rewritten. Apache httpd will not rewrite other response - headers, nor will it rewrite URL references inside HTML pages. + headers, nor will it by default rewrite URL references inside HTML pages. This means that if the proxied content contains absolute URL - references, they will by-pass the proxy. A third-party module - that will look inside the HTML and rewrite URL references is Nick - Kew's mod_proxy_html.

      + references, they will bypass the proxy. To rewrite HTML content to + match the proxy, you must load and enable mod_proxy_html. +

      -

      path is the name of a local virtual path. url is a - partial URL for the remote server - the same way they are used for the +

      path is the name of a local virtual path; url is a + partial URL for the remote server. + These parameters are used the same way as for the ProxyPass directive.

      For example, suppose the local server has address http://example.com/; then

      -

      - ProxyPass /mirror/foo/ http://backend.example.com/
      - ProxyPassReverse /mirror/foo/ http://backend.example.com/
      - ProxyPassReverseCookieDomain backend.example.com public.example.com
      - ProxyPassReverseCookiePath / /mirror/foo/ -

      +
      ProxyPass         "/mirror/foo/" "http://backend.example.com/"
      +ProxyPassReverse  "/mirror/foo/" "http://backend.example.com/"
      +ProxyPassReverseCookieDomain  "backend.example.com"  "public.example.com"
      +ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
      +

      will not only cause a local request for the http://example.com/mirror/foo/bar to be internally converted into a proxy request to http://backend.example.com/bar - (the functionality ProxyPass provides here). It also takes care - of redirects the server backend.example.com sends: when - http://backend.example.com/bar is redirected by him to - http://backend.example.com/quux Apache httpd adjusts this to + (the functionality which ProxyPass provides here). + It also takes care of redirects which the server backend.example.com + sends when redirecting http://backend.example.com/bar to + http://backend.example.com/quux . Apache httpd adjusts this to http://example.com/mirror/foo/quux before forwarding the HTTP redirect response to the client. Note that the hostname used for constructing the URL is chosen in respect to the setting of the UseCanonicalName directive.

      Note that this ProxyPassReverse directive can - also be used in conjunction with the proxy pass-through feature + also be used in conjunction with the proxy feature (RewriteRule ... [P]) from mod_rewrite because it doesn't depend on a corresponding ProxyPass directive.

      -

      The optional interpolate keyword (available in - httpd 2.2.9 and later), used together with +

      The optional interpolate keyword, used together with ProxyPassInterpolateEnv, enables interpolation of environment variables specified using the format ${VARNAME}. -

      + Note that interpolation is not supported within the scheme portion of a + URL.

      When used inside a <Location> section, the first argument is omitted and the local directory is obtained from the <Location>. The same occurs inside a <LocationMatch> section, but will probably not work as intended, as ProxyPassReverse will interpret the regexp literally as a path; if needed in this situation, specify the ProxyPassReverse outside - the section, or in a separate <Location> section.

      + the section or in a separate <Location> section.

      This directive is not supported in <Directory> or <Files> sections.

      @@ -1502,10 +1669,24 @@ proxied server Status:Extension Module:mod_proxy -

      Usage is basically similar to -ProxyPassReverse, but instead of -rewriting headers that are a URL, this rewrites the path -string in Set-Cookie headers.

      +

      +Useful in conjunction with +ProxyPassReverse +in situations where backend URL paths are mapped to public paths on the +reverse proxy. This directive rewrites the path string in +Set-Cookie headers. If the beginning of the cookie path matches +internal-path, the cookie path will be replaced with +public-path. +

      +In the example given with +ProxyPassReverse, the directive: +

      +
      ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
      + +

      +will rewrite a cookie with backend path / (or +/example or, in fact, anything) to /mirror/foo/. +

      top
      @@ -1518,12 +1699,12 @@ request Context:server config, virtual host, directory Status:Extension Module:mod_proxy -Compatibility:Available in Apache HTTP Server 2.0.31 and later. Usable in directory +Compatibility:Usable in directory context in 2.3.3 and later.

      When enabled, this option will pass the Host: line from the incoming request to the proxied host, instead of the hostname specified in the - ProxyPass line.

      + ProxyPass line.

      This option should normally be turned Off. It is mostly useful in special configurations like proxied mass name-based virtual @@ -1548,9 +1729,8 @@ connections to 0 to indicate that the system's default buffer size should be used.

      -

      Example

      - ProxyReceiveBufferSize 2048 -

      +

      Example

      ProxyReceiveBufferSize 2048
      +
      top
      @@ -1578,17 +1758,16 @@ connections are supported by this module. When using https, the requests are forwarded through the remote proxy using the HTTP CONNECT method.

      -

      Example

      - ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
      - ProxyRemote * http://cleverproxy.localdomain
      - ProxyRemote ftp http://ftpproxy.mydomain:8080 -

      +

      Example

      ProxyRemote "http://goodguys.example.com/" "http://mirrorguys.example.com:8000"
      +ProxyRemote "*" "http://cleverproxy.localdomain"
      +ProxyRemote "ftp" "http://ftpproxy.mydomain:8080"
      +

      In the last example, the proxy will forward FTP requests, encapsulated as yet another HTTP proxy request, to another proxy which can handle them.

      -

      This option also supports reverse proxy configuration - a backend +

      This option also supports reverse proxy configuration; a backend webserver can be embedded within a virtualhost URL space even if that server is hidden by another forward proxy.

      @@ -1604,7 +1783,7 @@ expressions Module:mod_proxy

      The ProxyRemoteMatch is identical to the - ProxyRemote directive, except the + ProxyRemote directive, except that the first argument is a regular expression match against the requested URL.

      @@ -1631,6 +1810,9 @@ expressions need also mod_proxy_http or mod_proxy_ftp (or both) present in the server.

      +

      In order to get the functionality of (forward) proxying HTTPS sites, you + need mod_proxy_connect enabled in the server.

      +

      Warning

      Do not enable proxying with ProxyRequests until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large.

      @@ -1662,35 +1844,27 @@ expressions RewriteRule instead of a ProxyPass directive.

      -

      - <Proxy balancer://hotcluster>
      - - BalancerMember http://www2.example.com:8080 loadfactor=1
      - BalancerMember http://www3.example.com:8080 loadfactor=2
      - ProxySet lbmethod=bytraffic
      -
      - </Proxy> -

      +
      <Proxy "balancer://hotcluster">
      +    BalancerMember "http://www2.example.com:8080" loadfactor=1
      +    BalancerMember "http://www3.example.com:8080" loadfactor=2
      +    ProxySet lbmethod=bytraffic
      +</Proxy>
      +
      -

      - <Proxy http://backend>
      - - ProxySet keepalive=On
      -
      - </Proxy> -

      +
      <Proxy "http://backend">
      +    ProxySet keepalive=On
      +</Proxy>
      -

      - ProxySet balancer://foo lbmethod=bytraffic timeout=15 -

      -

      - ProxySet ajp://backend:7001 timeout=15 -

      +
      ProxySet "balancer://foo" lbmethod=bytraffic timeout=15
      + + +
      ProxySet "ajp://backend:7001" timeout=15
      +

      Warning

      Keep in mind that the same parameter key can have a different meaning - depending whether it is applied to a balancer or a worker as shown by the two + depending whether it is applied to a balancer or a worker, as shown by the two examples above regarding timeout.

      @@ -1739,7 +1913,6 @@ expressions Context:server config, virtual host Status:Extension Module:mod_proxy -Compatibility:Available in Apache HTTP Server 2.0.31 and later

      This directive allows a user to specifiy a timeout on proxy requests. This is useful when you have a slow/buggy appserver which hangs, and you @@ -1786,7 +1959,28 @@ header for proxied requests

      Available Languages:  en  |  fr  |  ja 

      -
      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy.html.fr b/docs/manual/mod/mod_proxy.html.fr index b539b52c0d6..ba49e494a74 100644 --- a/docs/manual/mod/mod_proxy.html.fr +++ b/docs/manual/mod/mod_proxy.html.fr @@ -1,23 +1,28 @@ - -mod_proxy - Serveur Apache HTTP +mod_proxy - Serveur Apache HTTP Version 2.4 - + + + + +

      Serveur Apache HTTP Version 2.4

      +
      <-
      +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

      Module Apache mod_proxy

      @@ -69,16 +74,17 @@ AJP13 (Protocole Apache JServe version 1.3)mod_proxy_ajp CONNECT (pour - SSL)mod_proxy_connect + SSL)mod_proxy_connect FastCGImod_proxy_fcgi ftpmod_proxy_ftp HTTP/0.9, HTTP/1.0, et - HTTP/1.1mod_proxy_http + HTTP/1.1mod_proxy_http SCGImod_proxy_scgi + WS and WSS (Web-sockets)mod_proxy_wstunnel
    - +

    En outre, d'autres modules fournissent des fonctionnalits tendues. mod_cache et ses modules associs fournissent la mise en cache. Les directives SSLProxy* @@ -87,10 +93,28 @@ additionnels devront tre chargs et configurs pour pouvoir disposer de ces fonctionnalits.

    -
    top
    top
    +
    +

    Accs via un gestionnaire

    + +

    Vous pouvez aussi forcer le traitement d'une requte en tant que + requte de mandataire inverse en crant un gestionnaire de transfert + appropri. Dans l'exemple suivant, toutes les requtes pour + des scripts PHP seront transmises au serveur FastCGI + spcifi via un mandat inverse : +

    + +

    Scripts PHP et mandataire inverse

    <FilesMatch "\.php$">
    +    # Les sockets Unix ncessitent une version 2.4.7 ou suprieure du
    +    # serveur HTTP Apache
    +    SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
    +</FilesMatch>
    +
    + +

    Cette fonctionnalit est disponible partir de la version + 2.4.10 du serveur HTTP Apache.

    -

    Mandataire direct

    - ProxyRequests On
    - ProxyVia On
    -
    - <Proxy *>
    - - Require host internal.example.com
    -
    - </Proxy> -

    top

    Workers

    @@ -248,29 +276,26 @@ Ils sont en gnral dfinis via les directives ProxyPass ou ProxyPassMatch lorsqu'on les utilise dans le cadre d'un mandataire inverse :

    -

    - ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 -

    +
    ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30
    +
    +

    Cette directive va crer un worker associ l'URL du serveur - original http://backend.example.com, et utilisant les + original http://backend.example.com qui utilisera les valeurs de timeout donnes. Lorsqu'ils sont utiliss dans le cadre d'un mandataire direct, les workers sont en gnral dfinis via la directive ProxySet,

    -

    - ProxySet http://backend.example.com connectiontimeout=5 timeout=30 -

    +
    ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30
    +
    +

    ou encore via les directives Proxy et ProxySet :

    -

    - <Proxy http://backend.example.com>
    - - ProxySet connectiontimeout=5 timeout=30 - - </Proxy> -

    +
    <Proxy "http://backend.example.com">
    +  ProxySet connectiontimeout=5 timeout=30
    +</Proxy>
    +

    L'utilisation de workers dfinis explicitement dans le mode mandataire direct n'est pas trs courante, car les mandataires @@ -288,10 +313,9 @@

    L'URL qui identifie un worker correspond l'URL de son serveur original, y compris un ventuel chemin donn :

    -

    - ProxyPass /exemples http://backend.example.com/exemples
    - ProxyPass /docs http://backend.example.com/docs -

    +
    ProxyPass "/examples" "http://backend.example.com/examples"
    +ProxyPass "/docs" "http://backend.example.com/docs"
    +

    Dans cet exemple, deux workers diffrents sont dfinis, chacun d'eux utilisant des configurations et jeux de connexions @@ -303,10 +327,9 @@ correspond au dbut de l'URL d'un autre worker dfini plus loin dans le fichier de configuration. Dans l'exemple suivant,

    -

    - ProxyPass /apps http://backend.example.com/ timeout=60
    - ProxyPass /examples http://backend.example.com/exemples timeout=10 -

    +
    ProxyPass "/apps" "http://backend.example.com/" timeout=60
    +ProxyPass "/examples" "http://backend.example.com/examples" timeout=10
    +

    le second worker n'est pas vraiment cr. C'est le premier worker qui est en fait utilis. L'avantage de ceci rside dans @@ -351,6 +374,20 @@ rpartition. La directive BalancerMember permet d'ajouter des membres au rpartiteur.

    +

    Rsolution DNS pour les domaines originaux

    +

    La rsolution DNS s'effectue lorsque le socket vers le + domaine original est cr pour la premire fois. Lorsque le pooling de + connexions est utilis, chaque domaine d'arrire-plan n'est rsolu qu'une + seule fois pour chaque processus enfant, et cette rsolution est rutilise + pour toutes les connexions ultrieures jusqu' ce que le processus enfant + soit recycl. Ce comportement doit tre pris en considration lorsqu'on + planifie des tches de maintenance du DNS impactant les domaines + d'arrire-plan. Veuillez aussi vous reporter aux paramtres de la + directive ProxyPass pour plus de + dtails propos de la rutilisation des connexions. +

    +
    +
    top

    Contrler l'accs votre @@ -359,13 +396,10 @@ de contrle <Proxy> comme dans l'exemple suivant :

    -

    - <Proxy *>
    - - Require ip 192.168.0
    -
    - </Proxy> -

    +
    <Proxy "*">
    +  Require ip 192.168.0
    +</Proxy>
    +

    Pour plus de dtails sur les directives de contrle d'accs, voir la documentation du module @@ -379,7 +413,7 @@ tout en masquant sa vritable identit. Ceci reprsente un danger non seulement pour votre rseau, mais aussi pour l'Internet au sens large. Dans le cas de la mise en oeuvre d'un mandataire - inverse (en dfinissant la directive ProxyPass "off"), le contrle + inverse (en utilisant la directive ProxyPass avec ProxyRequests Off), le contrle d'accs est moins critique car les clients ne peuvent contacter que les serveurs que vous avez spcifis.

    @@ -435,15 +469,12 @@

    Il s'agit des variables force-proxy-request-1.0 et proxy-nokeepalive.

    -

    - <Location /serveur-non-conforme/>
    - - ProxyPass http://serveur-non-conforme:7001/foo/
    - SetEnv force-proxy-request-1.0 1
    - SetEnv proxy-nokeepalive 1
    -
    - </Location> -

    +
    <Location "/buggyappserver/">
    +  ProxyPass "http://buggyappserver:7001/foo/"
    +  SetEnv force-proxy-request-1.0 1
    +  SetEnv proxy-nokeepalive 1
    +</Location>
    +

    top
    @@ -514,9 +545,12 @@

    Voir aussi les directives ProxyPreserveHost et ProxyVia directives, qui permettent de contrler d'autres en-ttes de requte.

    +

    Note : Si vous devez ajouter des en-ttes particuliers la + requte mandate, utilisez la directive RequestHeader.

    +
    top
    -

    BalancerGrowth Directive

    +

    Directive BalancerGrowth

    @@ -535,7 +569,32 @@ serveur HTTP Apache
    top
    -
    Description:Nombre de membres supplmentaires pouvant tre ajouts aprs la configuration initiale
    + + + + + + + +
    Description:Hritage des membres du groupes de rpartition de + charge du mandataire dfinis au niveau du serveur principal
    Syntaxe:BalancerInherit On|Off
    Dfaut:BalancerInherit On
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible partir de la version 2.4.5 du serveur + HTTP Apache.
    +

    Cette directive permet d'attribuer au serveur virtuel courant + l'hritage des membres de groupes de rpartition de charge + dfinis au niveau du serveur + principal. Elle ne doit pas tre active si vous + utilisez la fonctionnalit de modifications dynamiques du + gestionnaire de rpartition de charge (Balancer Manager) pour + viter des problmes et des comportements inattendus.

    +

    Les dfinitions au niveau du serveur principal constituent + les dfinitions par dfaut au niveau des serveurs virtuels.

    + + +
    +
    top
    +

    Directive BalancerMember

    @@ -545,23 +604,49 @@ charge
    Description:Ajoute un membre un groupe de rpartition de charge
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.2 du serveur HTTP Apache.
    -

    Cette directive parmet d'ajouter un membre un groupe de +

    Cette directive permet d'ajouter un membre un groupe de rpartition de charge. Elle peut se trouver dans un conteneur <Proxy balancer://...>, et accepte tous les paramtres de paires cl/valeur que supporte la directive ProxyPass.

    -

    La directive BalancerMember accepte un paramtre +

    La directive BalancerMember accepte un paramtre supplmentaire : loadfactor. Il s'agit du facteur de charge du membre - un nombre entre 1 (valeur par dfaut) et 100, qui dfinit la charge appliquer au membre en question.

    -

    L'argument balancerurl n'est requis que s'il ne se trouve pas +

    L'argument balancerurl n'est requis que s'il ne se trouve pas dj dans la directive de conteneur <Proxy balancer://...>. Il correspond l'URL d'un rpartiteur de charge dfini par une directive ProxyPass.

    +

    La partie chemin de l'URL du rpartiteur dans toute directive de + conteneur <Proxy balancer://...> est + ignore.

    +

    En particulier, le slash de fin de l'URL d'un + BalancerMember doit tre supprim.

    top
    -

    NoProxy Directive

    +

    Directive BalancerPersist

    + + + + + + + + +
    Description:Tente de conserver les changements effectus par le + gestionnaire de rpartition de charge aprs un redmarrage du + serveur.
    Syntaxe:BalancerPersist On|Off
    Dfaut:BalancerPersist Off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:BalancerPersist n'est disponible qu' partir de la + version 2.4.4 du serveur HTTP Apache.
    +

    Cette directive permet de conserver le contenu de l'espace + mmoire partag associ aux rpartiteurs de charge et leurs + membres aprs un redmarrage du serveur. Ces modifications + locales ne sont ainsi pas perdues lors des transitions d'tat + dues un redmarrage.

    + +
    +
    top
    +

    Directive NoProxy

    @@ -579,10 +664,9 @@ directement sans tre redirige vers le(s) serveur(s) mandataire(s) dfini(s) par la directive ProxyRemote.

    -

    Exemple

    - ProxyRemote * http://pare-feu.example.com:81
    - NoProxy .example.com 192.168.112.0/21 -

    +

    Exemple

    ProxyRemote  "*"  "http://firewall.example.com:81"
    +NoProxy         ".example.com" "192.168.112.0/21"
    +

    Le type des arguments serveur de la directive NoProxy appartiennent la liste suivante @@ -645,7 +729,7 @@ directement

    Comme cas extrmes, un Sous-rseau avec un masque de - sous-rseau de 32 bits significatifs est quivalent une adresse IP, alors qu'un Sous-rseau avec un masque de + sous-rseau de 32 bits significatifs est quivalent une adresse IP, alors qu'un Sous-rseau avec un masque de sous-rseau de 0 bit significatif (c'est dire 0.0.0.0/0) est identique la constante _Default_, et peut correspondre toute adresse IP.

    @@ -705,7 +789,7 @@ directement
    top
    -
    Description:Serveurs, domaines ou rseaux auquels on se connectera directement
    @@ -721,26 +805,35 @@ mandat contenu via votre serveur mandataire que les htes appartenant votre-reseau.example.com :

    -

    - <Proxy *>
    - - Require host votre-reseau.example.com
    -
    - </Proxy> -

    +
    <Proxy "*">
    +  Require host votre-reseau.example.com
    +</Proxy>
    +

    Dans l'exemple suivant, tous les fichiers du rpertoire foo de example.com seront traits par le filtre INCLUDES lorsqu'ils seront envoys par l'intermdiaire du serveur mandataire :

    -

    - <Proxy http://example.com/foo/*>
    - - SetOutputFilter INCLUDES
    -
    - </Proxy> -

    +
    <Proxy "http://example.com/foo/*">
    +  SetOutputFilter INCLUDES
    +</Proxy>
    + + +

    Diffrences avec la section de configuration Location

    +

    Une URL d'arrire-plan sera concerne par le conteneur Proxy si + elle commence par la url-avec-jokers, mme si le + dernier segment de chemin de la directive ne correspond qu' un + prfixe de segment dee chemin de l'URL d'arrire-plan. Par exemple, <Proxy + "http://example.com/foo"> correspondra entre autres aux URLs + http://example.com/foo, http://example.com/foo/bar, et + http://example.com/foobar. La correspondance de l'URL finale + diffre du comportement de la section <Location> qui, pour le cas de cette note, + traitera le segment de chemin final comme s'il se terminait par un + slash.

    +

    Pour un contrle plus fin de la correspondance des URL, voir la + directive <ProxyMatch>.

    +

    Voir aussi

    @@ -749,7 +842,7 @@ mandat
    top
    -
    Description:Conteneur de directives s'appliquant des ressources mandates
    @@ -770,7 +863,7 @@ en-t
    top
    -
    Description:Ajoute des informations propos du mandataire aux en-ttes X-Forwarded-*
    @@ -779,7 +872,6 @@ incorrectes d'une r -
    Description:Dtermine la manire de traiter les lignes d'en-tte incorrectes d'une rponse
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.0.44 du serveur HTTP Apache

    La directive ProxyBadHeader permet de dterminer le comportement de mod_proxy lorsqu'il @@ -806,7 +898,7 @@ incorrectes d'une r

    top
    -

    ProxyBlock Directive

    +

    Directive ProxyBlock

    @@ -827,9 +919,8 @@ mandataire fins de comparaisons ultrieures. Ceci peut ralentir le dmarrage du serveur.

    -

    Exemple

    - ProxyBlock news.example.com auctions.example.com friends.example.com -

    +

    Exemple

    ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com"
    +

    Notez qu'example suffirait aussi pour atteindre ces sites.

    @@ -838,15 +929,14 @@ mandataire

    Notez aussi que

    -

    - ProxyBlock * -

    +
    ProxyBlock "*"
    +

    bloque les connexions vers tous les sites.

    top
    -
    Description:Termes, serveurs ou domaines bloqus par le mandataire
    @@ -863,15 +953,14 @@ mandat gnrer une rponse de redirection vers le mme hte suffix par le Domaine spcifi.

    -

    Exemple

    - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21
    - ProxyDomain .example.com -

    +

    Exemple

    ProxyRemote  "*"  "http://firewall.example.com:81"
    +NoProxy         ".example.com" "192.168.112.0/21"
    +ProxyDomain     ".example.com"
    +
    top
    -
    Description:Nom de domaine par dfaut pour les requtes mandates
    @@ -880,7 +969,6 @@ mandat -
    Description:Outrepasser les pages d'erreur pour les contenus mandats
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.0 d'Apache

    Cette directive est utile pour les configurations de mandataires inverses, lorsque vous souhaitez que les pages d'erreur envoyes @@ -897,7 +985,7 @@ mandat

    top
    -

    ProxyIOBufferSize Directive

    +

    Directive ProxyIOBufferSize

    @@ -914,8 +1002,11 @@ donn

    Dans la plupart des cas, il n'y a aucune raison de modifier cette valeur.

    +

    Si elle est utilise avec AJP, cette directive permet de dfinir - la taille maximale du paquet AJP en octets. Si vous ne conservez pas + la taille maximale du paquet AJP en octets. Si la valeur spcifie + est suprieure 65536, elle est corrige et prend la valeur 65536. + Si vous ne conservez pas la valeur par dfaut, vous devez aussi modifier l'attribut packetSize de votre connecteur AJP du ct de Tomcat ! L'attribut packetSize n'est disponible que dans Tomcat @@ -928,7 +1019,7 @@ donn

    top
    -
    Description:Dtermine la taille du tampon interne de transfert de donnes
    @@ -941,13 +1032,27 @@ mandat identique la directive <Proxy>, l'exception qu'elle dfinit les URLs auxquelles elle s'applique en utilisant une expression rationnelle.

    +

    A partir de la version 2.4.8, les groupes nomms et les + rfrences arrires sont extraits et enregistrs dans + l'environnement avec leur nom en majuscules et prfix par "MATCH_". Ceci permet + de rfrencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + viter toute confusion, les rfrences arrires numrotes (non + nommes) sont ignores. Vous devez utiliser la place des groupes + nomms.

    + +
    <ProxyMatch "^http://(?<sitename>[^/]+)">
    +    Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example
    +</ProxyMatch>
    + +

    Voir aussi

    top
    -
    Description:Conteneur de directives s'appliquant des ressources mandates correspondant une expression rationnelle
    @@ -956,8 +1061,8 @@ requ - +
    Description:Nombre maximum de mandataires travers lesquelles une requte peut tre redirige
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.0 du serveur HTTP Apache ; comportement par dfaut -modifi dans 2.2.7/2.3
    Compatibilit:Comportement par dfaut +modifi dans 2.2.7

    La directive ProxyMaxForwards permet de spcifier le nombre maximum de mandataires travers lesquels une @@ -966,9 +1071,8 @@ modifi contre les boucles infinies de mandataires ou contre les attaques de type dni de service.

    -

    Exemple

    - ProxyMaxForwards 15 -

    +

    Exemple

    ProxyMaxForwards 15
    +

    Notez que la dfinition de la directive ProxyMaxForwards constitue une violation du @@ -982,18 +1086,20 @@ modifi

    top
    -

    ProxyPass Directive

    +

    Directive ProxyPass

    + [cl=valeur ...]] [nocanon] [interpolate] [noquery] +
    Description:Rfrencer des serveurs distants depuis l'espace d'URLs du serveur local
    Syntaxe:ProxyPass [chemin] !|url [cl=valeur - [cl=valeur ...]] [nocanon] [interpolate]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Les sockets de style Unix (Unix Domain Socket - UDS) +sont supports partir de la version 2.4.7 du serveur HTTP Apache

    Cette directive permet de rfrencer des serveurs distants depuis - l'espace d'URLs du serveur local ; le serveur + l'espace d'URLs du serveur local. Le serveur local n'agit pas en tant que mandataire au sens conventionnel, mais plutt comme miroir du serveur distant. Le serveur local est souvent nomm mandataire inverse ou @@ -1001,32 +1107,57 @@ l'espace d'URLs du serveur local chemin virtuel local ; url est une URL partielle pour le serveur distant et ne doit pas contenir de chane d'arguments.

    +
    Note : Cette directive n'est pas supporte au sein + des sections <Directory> + et <Files>.
    +
    En gnral, la directive ProxyRequests doit tre dfinie off lorsqu'on utilise la directive ProxyPass.
    +

    Les sockets de style Unix sont supports partir de la version + 2.4.7 du serveur HTTP Apache ; pour utiliser cette fonctionnalit, + il suffit d'utiliser une URL cible prfixe par + unix:/path/lis.sock|. Par exemple, pour mandater HTTP + et cibler l'UDS /home/www/socket, vous devez utiliser + unix:/home/www.socket|http://localhost/whatever/.

    + +
    Note :Le chemin associ l'URL + unix: tient compte de la directive + DefaultRuntimeDir.
    + +

    Lorsque cette directive est utilise dans une section <Location>, le premier + argument est omis et le rpertoire local est obtenu partir de + l'argument de la directive <Location>. Il en est de mme l'intrieur + d'une section <LocationMatch>, mais le rsultat ne sera + probablement pas celui attendu car ProxyPassReverse va interprter + l'expression rationnelle littralement comme un chemin ; si besoin + est dans ce cas, dfinissez la directive ProxyPassReverse en dehors + de la section, ou dans une section <Location> spare.

    +

    Supposons que le serveur local a pour adresse http://example.com/ ; alors la ligne

    -

    - <Location /miroir/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    -

    +
    <Location "/mirror/foo/">
    +    ProxyPass "http://backend.example.com/"
    +</Location>
    +

    va convertir en interne toute requte pour http://example.com/miroir/foo/bar en une requte mandate pour http://backend.example.com/bar.

    -

    La syntaxe alternative suivante est valide, bien qu'elle induise - une dgradation des performances lorsqu'elle est prsente en grand - nombre :

    +

    Si vous avez besoin d'un configuration de mandataire inverse plus + souple, reportez-vous la documentaion de la directive RewriteRule et son drapeau + [P].

    + +

    La syntaxe alternative suivante est valide, bien qu'elle puisse + induire une dgradation des performances lorsqu'elle est + prsente en trs grand nombre. Elle possde l'avantage de + permettre un contrle dynamique via l'interface Balancer Manager :

    + +
    ProxyPass "/miroir/foo/" "http://backend.example.com/"
    -

    - ProxyPass /miroir/foo/ http://backend.example.com/ -

    Si le premier argument se termine par un slash @@ -1040,23 +1171,17 @@ l'espace d'URLs du serveur local

    Le drapeau ! permet de soustraire un sous-rpertoire du mandat inverse, comme dans l'exemple suivant :

    -

    - <Location /miroir/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    - <Location /miroir/foo/i>
    - - ProxyPass !
    -
    - </Location>
    -

    +
    <Location "/mirror/foo/">
    +    ProxyPass "http://backend.example.com/"
    +</Location>
    +<Location "/mirror/foo/i">
    +    ProxyPass "!"
    +</Location>
    + + +
    ProxyPass "/mirror/foo/i" "!"
    +ProxyPass "/mirror/foo" "http://backend.example.com"
    -

    - ProxyPass /miroir/foo/i !
    - ProxyPass /miroir/foo http://backend.example.com -

    va mandater toutes les requtes pour /miroir/foo vers backend.example.com, sauf les requtes @@ -1081,14 +1206,16 @@ l'espace d'URLs du serveur local

    +

    ProxyPass cl=valeur Paramtres

    +

    Depuis la version 2.1 du serveur HTTP Apache, mod_proxy supporte les groupements de connexions vers un serveur d'arrire-plan. Les connexions cres la demande peuvent tre enregistres dans un groupement pour une utilisation ultrieure. La taille du groupe ainsi que d'autres caractristiques peuvent tre dfinies via la directive ProxyPass au moyen de paramtres - cl=valeur dont la description fait l'objet du tableau - ci-dessous.

    + cl=valeur dont la description fait l'objet des + tableaux ci-dessous.

    Par dfaut, mod_proxy permet et met en rserve le nombre maximum de connexions pouvant tre utilises simultanment par le processus @@ -1108,9 +1235,8 @@ l'espace d'URLs du serveur local enfants, sauf si un seul processus enfant est autoris par la configuration ou la conception du module multi-processus (MPM).

    -

    Exemple

    - ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 -

    +

    Exemple

    ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300
    +
    Paramtres de BalancerMember
    @@ -1171,12 +1297,21 @@ l'espace d'URLs du serveur local (round-robin DNS). Pour dsactiver la rutilisation du jeu de connexions, dfinissez cette cl On. + + + dlai en secondes pour l'attente de la rponse. Cette fonctionnalit a t ajoute pour viter les problmes avec les serveurs d'arrire-plan bloqus ou surchargs. - + Le trafic rseau peut s'en trouver augment en fonctionnement normal, ce qui peut poser problme, mais peut s'en trouver diminu dans les @@ -1310,12 +1445,17 @@ l'espace d'URLs du serveur local limite atteinte, une connexion ne sera pas rutilise ; elle sera ferme aprs un dlai variable. + + +
    enablereuseOnCe paramtre est utilis par les gestionnaires de protocole pour + lesquels la rutilisation des connexions est optionnelle (comme + mod_proxy_fcgi). C'est le contraire du + paramtre 'disablereuse' ci-dessus, et il est support par les + versions 2.4.11 et suprieures du serveur HTTP Apache. +
    flushpackets off Permet de dfinir si le module mandataire doit vider automatiquement le tampon de sortie aprs chaque tronon de - donnes. 'off' signifie que le tampon sera vid si ncessaire, - 'on' que le tampon sera vid aprs chaque envoi d'un + donnes. 'off' signifie que le tampon sera vid si + ncessaire ; + 'on' signifie que le tampon sera vid aprs chaque envoi d'un tronon de donnes, et 'auto' que le tampon sera vid aprs un dlai de 'flushwait' millisecondes si aucune entre n'est reue. Actuellement, cette cl n'est supporte que par AJP. @@ -1232,7 +1367,7 @@ l'espace d'URLs du serveur local
    flusherflush

    Nom du fournisseur utilis par mod_proxy_fdpass. + Voir la documentation de ce module pour plus de dtails.

    +

    Si l'URL de la directive Proxy dbute par balancer:// (par exemple: - balancer://cluster/, toute information relative au + balancer://cluster, toute information relative au chemin est ignore), alors un serveur cible virtuel ne communiquant pas rellement avec le serveur d'arrire-plan sera cr. Celui-ci sera en fait responsable de la gestion de plusieurs serveurs cibles "rels". Dans @@ -1350,7 +1490,7 @@ l'espace d'URLs du serveur local Off Si ce paramtre est dfini On, la session va s'interrompre si le serveur cible est dans un tat d'erreur ou - dsactiv. Dfinissez ce paramtre On si le serveur + dsactiv. Dfinissez ce paramtre On si le serveur d'arrire-plan ne supporte pas la rplication de session. stickysession @@ -1359,10 +1499,21 @@ l'espace d'URLs du serveur local gnralement du style JSESSIONID ou PHPSESSIONID, et dpend du serveur d'application d'arrire-plan qui supporte les sessions. Si le serveur - d'application d'arrire-plan utilise des noms diffrents pour + d'application d'arrire-plan utilise un nom diffrent pour les cookies et les identifiants cods d'URL (comme les conteneurs de servlet), sparez-les par le caractre '|'. La - premire partie contient le cookie et la seconde le chemin. + premire partie contient le cookie et la seconde le chemin.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. + + stickysessionsep + "." + Dfinit le caractre de sparation dans le cookie de + session. Certains serveurs d'application d'arrire-plan + n'utilisent pas le caractre '.' comme sparateur. Par exemple + le serveur Oracle Weblogic utilise le caractre '!'. Cette + option permet d'attribuer au caractre de sparation la valeur + approprie. Si elle est dfinie 'Off', aucun caractre de + sparation n'est utilis. scolonpathdelim Off @@ -1387,7 +1538,15 @@ l'espace d'URLs du serveur local dans la liste. La rcupration du worker s'effectue comme dans le cas des autres erreurs de worker. - + failontimeout + Off + Si ce paramtre est dfini "On", un dlai d'attente + dpass en entre/sortie aprs envoi d'une requte au serveur + d'arrire-plan va mettre le processus en tat d'erreur. La + sortie de cet tat d'erreur se passe de la mme faon que pour + les autres erreurs.
    + Disponible partir de la version 2.4.5 du serveur HTTP Apache. + nonce <auto> Le nombre usage unique de protection utilis dans la page @@ -1406,38 +1565,45 @@ l'espace d'URLs du serveur local 0 Nombre de membres supplmentaires que l'on peut ajouter ce rpartiteur en plus de ceux dfinis au niveau de la - configuration. + configuration. + + forcerecovery + On + Force la relance immdiate de tous les membres sans tenir + compte de leur paramtre retry dans le cas o ils sont tous en + tat d'erreur. Il peut cependant arriver qu'un membre dj + surcharg entre dans une situation critique si la relance de + tous les membres est force sans tenir compte du paramtre retry + de chaque membre. Dans ce cas, dfinissez ce paramtre + Off.
    + Disponible depuis la version 2.4.2 du serveur HTTP Apache.

    Exemple de configuration d'un rpartiteur de charge

    -

    - ProxyPass /zone-speciale http://special.example.com smax=5 max=10
    - ProxyPass / balancer://mon-cluster/ stickysession=JSESSIONID|jsessionid nofailover=On
    - <Proxy balancer://mon-cluster>
    - - BalancerMember ajp://1.2.3.4:8009
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=20
    - # Serveur moins puissant ; faites-lui traiter moins de requtes,
    - BalancerMember ajp://1.2.3.6:8009 loadfactor=5
    -
    - </Proxy> -

    +
    ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
    +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
    +<Proxy "balancer://mycluster">
    +    BalancerMember "ajp://1.2.3.4:8009"
    +    BalancerMember "ajp://1.2.3.5:8009" loadfactor=20
    +    # Less powerful server, don't send as many requests there,
    +    BalancerMember "ajp://1.2.3.6:8009" loadfactor=5
    +</Proxy>
    +

    Configuration d'un serveur cible de rserve qui ne sera utilis que si aucun autre serveur cible n'est disponible

    -

    - ProxyPass / balancer://hotcluster/
    - <Proxy balancer://hotcluster>
    - - BalancerMember ajp://1.2.3.4:8009 loadfactor=1
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=2
    - # La ligne suivante configure le serveur cible de rserve
    - BalancerMember ajp://1.2.3.6:8009 status=+H
    - ProxySet lbmethod=bytraffic -
    - </Proxy> -

    +
    ProxyPass "/" "balancer://hotcluster/"
    +<Proxy "balancer://hotcluster">
    +    BalancerMember "ajp://1.2.3.4:8009" loadfactor=1
    +    BalancerMember "ajp://1.2.3.5:8009" loadfactor=2
    +    # The server below is on hot standby
    +    BalancerMember "ajp://1.2.3.6:8009" status=+H
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    + + +

    Mots-cls additionnels de ProxyPass

    Normalement, mod_proxy va mettre sous leur forme canonique les URLs traites par ProxyPass. Mais ceci peut tre incompatible avec @@ -1449,15 +1615,11 @@ l'espace d'URLs du serveur local car la protection limite contre les attaques base d'URL que fournit le mandataire est alors supprime.

    -

    Le mot-cl optionnel interpolate (disponible depuis - httpd 2.2.9), en combinaison avec la directive - ProxyPassInterpolateEnv, permet ProxyPass - d'interpoler les variables d'environnement l'aide de la syntaxe - ${VARNAME}. Notez que de nombreuses variables - d'environnement standard drives de CGI n'existeront pas lorsque - l'interpolation se produit ; vous devrez alors encore avoir avoir - recours mod_rewrite pour des rgles - complexes.

    +

    Par dfaut, mod_proxy inclut la chane de paramtres lors de la + gnration de la variable d'environnement + SCRIPT_FILENAME. Le mot-cl optionnel noquery + (disponible partir de la version 2.4.1) permet d'exclure cette + chane.

    Lorsque la directive ProxyPass est utilise l'intrieur d'une section <Location>, le premier argument est omis et le rpertoire @@ -1475,10 +1637,59 @@ l'espace d'URLs du serveur local souple, reportez-vous la documentaion de la directive RewriteRule et son drapeau [P].

    +

    Le mot-cl optionnel interpolate, en combinaison avec la directive + ProxyPassInterpolateEnv, permet ProxyPass + d'interpoler les variables d'environnement l'aide de la syntaxe + ${VARNAME}. Notez que de nombreuses variables + d'environnement standard drives de CGI n'existeront pas lorsque + l'interpolation se produit ; vous devrez alors encore avoir avoir + recours mod_rewrite pour des rgles + complexes. Notez aussi que l'interpolation n'est pas supporte dans + la partie protocole d'une URL. La dtermination dynamique du + protocole peut tre effectue l'aide de + mod_rewrite comme dans l'exemple suivant :

    + +
    RewriteEngine On
    +
    +RewriteCond "%{HTTPS}" =off
    +RewriteRule "". "-" [E=protocol:http]
    +RewriteCond "%{HTTPS}" =on
    +RewriteRule "." "-" [E=protocol:https]
    +
    +RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P]
    +ProxyPassReverse  "/mirror/foo/" "http://backend.example.com/"
    +ProxyPassReverse  "/mirror/foo/" "https://backend.example.com/"
    + +
    top
    -

    ProxyPassInterpolateEnv Directive

    +

    Directive ProxyPassInherit

    + + + + + + + + +
    Description:Hritage des directives ProxyPass dfinies au niveau du +serveur principal
    Syntaxe:ProxyPassInherit On|Off
    Dfaut:ProxyPassInherit On
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible partir de la version 2.4.5 du serveur +HTTP Apache.
    +

    Cette directive permet un serveur virtuel d'hriter des + directives ProxyPass dfinies + au niveau du serveur principal. Si vous utilisez la fonctionnalit de + modifications dynamiques du Balancer Manager, cette directive peut + causer des problmes et des comportements inattendus et doit donc + tre dsactive.

    +

    Les valeurs dfinies au niveau du serveur principal + constituent les valeurs par dfaut pour tous les serveurs virtuels.

    +

    La dsactivation de ProxyPassInherit dsactive aussi la + directive BalancerInherit.

    + +
    +
    top
    +

    Directive ProxyPassInterpolateEnv

    @@ -1503,13 +1714,14 @@ les configurations de mandataires inversesProxyPassReverseCookiePath, en leur indiquant de remplacer la chane ${nom_var} dans les directives de configuration par la valeur de la variable d'environnement - nom_var.

    + nom_var (si l'option interpolate est + spcifie).

    Conservez cette directive off (pour les performances du serveur), sauf si vous en avez rellement besoin.

    top
    -
    Description:Active l'interpolation des variables d'environnement dans les configurations de mandataires inverses
    @@ -1527,12 +1739,14 @@ du serveur local en utilisant des expressions rationnelles toute correspondance entre parenthses dans la chane donne et l'utiliser comme nouvelle url.

    +
    Note : Cette directive ne peut pas tre + utilise dans un contexte de niveau rpertoire.
    +

    Supposons que le serveur local a pour adresse http://example.com/ ; alors

    -

    - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 -

    +
    ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com/$1"
    +

    va provoquer la conversion interne de la requte locale http://example.com/foo/bar.gif en une requte mandate @@ -1543,16 +1757,15 @@ du serveur local en utilisant des expressions rationnelles avant les substitutions d'expressions rationnelles (et doit aussi l'tre aprs). Ceci limite les correspondances que vous pouvez utiliser. Par exemple, si l'on avait utilis

    -

    - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 -

    +
            ProxyPassMatch "^(/.*\.gif)$"
    +	"http://backend.example.com:8000$1"
    +

    dans l'exemple prcdent, nous aurions provoqu une erreur de syntaxe au dmarrage du serveur. C'est une bogue (PR 46665 dans ASF bugzilla), et il est possible de la contourner en reformulant la correspondance :

    -

    - ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 -

    +
    ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1"
    +

    Le drapeau ! vous permet de ne pas mandater un @@ -1566,6 +1779,14 @@ du serveur local en utilisant des expressions rationnelles plus flexible, voyez la directive RewriteRule avec le drapeau [P].

    +
    +

    Substitution par dfaut

    +

    Lorsque le paramtre URL n'utilise pas de rfrences arrires + dans l'expression rationnelle, l'URL originale sera ajoute au + paramtre URL. +

    +
    +

    Avertissement propos de la scurit

    Lors de la construction de l'URL cible de la rgle, il convient @@ -1578,7 +1799,7 @@ du serveur local en utilisant des expressions rationnelles

    top
    -
    Description:Fait correspondre des serveurs distants dans l'espace d'URL du serveur local en utilisant des expressions rationnelles
    @@ -1599,52 +1820,55 @@ par un serveur mandat

    Seuls les en-ttes de rponse HTTP spcialement mentionns ci-dessus seront rcrits. Apache httpd ne rcrira ni les autres en-ttes - de rponse, ni les rfrences d'URLs dans les pages HTML. Cela + de rponse, ni par dfaut les rfrences d'URLs dans les pages HTML. Cela signifie que dans le cas o un contenu mandat contient des rfrences des URLs absolues, elles court-circuiteront le - mandataire. Le module mod_proxy_html - de Nick Kew est un module tiers qui parcourt le code HTML et rcrit - les rfrences d'URL.

    + mandataire. Pour rcrire un contenu HTML afin qu'il corresponde au + mandataire, vous devez charger et activer le module + mod_proxy_html. +

    chemin est le nom d'un chemin virtuel local. - url est une URL partielle pour le serveur distant - ils - sont utiliss de la mme faon qu'avec la directive ProxyPass.

    + url est une URL partielle pour le serveur distant. Ces + paramtres s'utilisent de la mme faon qu'avec la + directive ProxyPass.

    Supposons par exemple que le serveur local a pour adresse http://example.com/ ; alors

    -

    - ProxyPass /miroir/foo/ http://backend.example.com/
    - ProxyPassReverse /miroir/foo/ http://backend.example.com/
    - ProxyPassReverseCookieDomain backend.example.com public.example.com
    - ProxyPassReverseCookiePath / /miroir/foo/ -

    +
    ProxyPass         "/mirror/foo/" "http://backend.example.com/"
    +ProxyPassReverse  "/mirror/foo/" "http://backend.example.com/"
    +ProxyPassReverseCookieDomain  "backend.example.com" "public.example.com"
    +ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
    +

    ne va pas seulement provoquer la conversion interne d'une requte locale pour http://example.com/miroir/foo/bar en une requte mandate pour http://backend.example.com/bar (la fonctionnalit fournie par ProxyPass). Il va aussi s'occuper des redirections que le serveur - backend.example.com envoie : lorsque - http://backend.example.com/bar est redirig par - celui-ci vers http://backend.example.com/quux, Apache + backend.example.com envoie lorsqu'il redirige + http://backend.example.com/bar vers + http://backend.example.com/quux. Apache httpd corrige ceci en http://example.com/miroir/foo/quux avant de faire suivre la redirection HTTP au client. Notez que le nom d'hte utilis pour construire l'URL est choisi en respectant la dfinition de la directive UseCanonicalName.

    Notez que la directive ProxyPassReverse - peut aussi tre utilise en conjonction avec la fonctionnalit - pass-through (RewriteRule ... [P]) du module + peut aussi tre utilise en conjonction avec la + fonctionnalit de mandataire + (RewriteRule ... [P]) du module mod_rewrite, car elle ne dpend pas d'une directive ProxyPass correspondante.

    -

    Le mot-cl optionnel interpolate (disponible depuis - httpd 2.2.9), utilis en combinaison avec la directive +

    Le mot-cl optionnel interpolate, en + combinaison avec la directive ProxyPassInterpolateEnv, permet l'interpolation des variables d'environnement spcifies en - utilisant le format ${VARNAME}. + utilisant le format ${VARNAME} Notez que l'interpolation + n'est pas supporte dans la partie protocole d'une URL.

    Lorsque cette directive est utilise dans une section <Location>, le premier @@ -1662,7 +1886,7 @@ par un serveur mandat

    top
    -
    Description:Ajuste l'URL dans les en-ttes de la rponse HTTP envoye par un serveur mandat en inverse
    @@ -1680,7 +1904,7 @@ r
    top
    -
    Description:Ajuste la chane correspondant au domaine dans les en-ttes Set-Cookie en provenance d'un serveur mandat
    @@ -1690,15 +1914,29 @@ Set-Cookie en provenance d'un serveur mandat
    Description:Ajuste la chane correspondant au chemin dans les en-ttes Set-Cookie en provenance d'un serveur mandat
    Statut:Extension
    Module:mod_proxy
    -

    L'utilisation de cette directive est similaire celle de la -directive ProxyPassReverse, -mais au lieu de rcrire des en-ttes qui contiennent des URLs, elle -rcrit la chane correspondant au chemin dans les en-ttes -Set-Cookie.

    +

    +Cette directive s'avre utile en conjonction avec la directive +ProxyPassReverse dans les +situations o les chemins d'URL d'arrire-plan correspondent des +chemins publics sur le mandataire inverse. Cette directive permet de +rcrire la chane path dans les en-ttes +Set-Cookie. Si le dbut du chemin du cookie correspond +chemin-interne, le chemin du cookie sera remplac par +chemin-public. +

    +Dans l'exemple fourni avec la directive ProxyPassReverse, la directive : +

    +
    ProxyPassReverseCookiePath  "/"  "/mirror/foo/"
    + +

    +va rcrire un cookie possdant un chemin d'arrire-plan / +(ou /example ou en fait tout chemin) +en /mirror/foo/.. +

    top
    -

    ProxyPreserveHost Directive

    +

    Directive ProxyPreserveHost

    @@ -1707,12 +1945,12 @@ du mandataire -
    Description:Utilise l'en-tte de requte entrante Host pour la requte du mandataire
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.0.31 du serveur HTTP Apache. Utilisable +
    Compatibilit:Utilisable dans un contexte de rpertoire depuis la version 2.3.3.

    Lorsqu'elle est active, cette directive va transmettre l'en-tte Host: de la requte entrante vers le serveur mandat, au lieu du nom - d'hte spcifi par la directive ProxyPass.

    + d'hte spcifi par la directive ProxyPass.

    Cette directive est habituellement dfinie Off. Elle est principalement utile dans les configurations particulires @@ -1722,7 +1960,7 @@ dans un contexte de r

    top
    -

    ProxyReceiveBufferSize Directive

    +

    Directive ProxyReceiveBufferSize

    @@ -1739,13 +1977,12 @@ et FTP0 pour indiquer que la taille de tampon par dfaut du systme doit tre utilise.

    -

    Exemple

    - ProxyReceiveBufferSize 2048 -

    +

    Exemple

    ProxyReceiveBufferSize 2048
    +
    top
    -
    Description:Taille du tampon rseau pour les connexions mandates HTTP et FTP
    @@ -1773,24 +2010,24 @@ requ https, les requtes sont rediriges par le mandataire distant en utilisant la mthode HTTP CONNECT.

    -

    Exemple

    - ProxyRemote http://bons-gars.example.com/ http://gars-mirroirs.example.com:8000
    - ProxyRemote * http://mandataire-intelligent.localdomain
    - ProxyRemote ftp http://mandataire-ftp.mon-domaine:8080 -

    +

    Exemple

    ProxyRemote "http://goodguys.example.com/"
    +"http://mirrorguys.example.com:8000"
    +ProxyRemote "*" "http://cleverproxy.localdomain"
    +ProxyRemote "ftp" "http://ftpproxy.mydomain:8080"
    +

    Dans la dernire ligne de l'exemple, le mandataire va faire suivre les requtes FTP, encapsules dans une autre requte mandate HTTP, vers un autre mandataire capable de les traiter.

    Cette directive supporte aussi les configurations de mandataire - inverse - un serveur web d'arrire-plan peut tre intgr dans + inverse ; un serveur web d'arrire-plan peut tre intgr dans l'espace d'URL d'un serveur virtuel, mme si ce serveur est cach par un autre mandataire direct.

    top
    -
    Description:Mandataire distant utiliser pour traiter certaines requtes
    @@ -1807,7 +2044,7 @@ correspondant
    top
    -
    Description:Le mandataire distant utiliser pour traiter les requtes correspondant une expression rationnelle
    @@ -1831,6 +2068,9 @@ directmod_proxy_ftp doivent galement tre chargs dans le serveur.

    +

    Pour activer la fonctionnalit de mandataire sur les sites chiffrs en HTTPS, le module + mod_proxy_connect doit galement tre charg dans le serveur.

    +

    Avertissement

    N'activez pas la fonctionnalit de mandataire avec la directive ProxyRequests avant @@ -1846,7 +2086,7 @@ inverses

    top
    -
    Description:Active la fonctionnalit (standard) de mandataire direct
    est cr. Ceci peut s'avrer utile pour la mise en oeuvre d'un mandataire inverse via une directive RewriteRule au lieu de ProxyPass.

    -

    - <Proxy balancer://hotcluster>
    - - BalancerMember http://www2.example.com:8080 loadfactor=1
    - BalancerMember http://www3.example.com:8080 loadfactor=2
    - ProxySet lbmethod=bytraffic
    -
    - </Proxy> -

    +
    <Proxy "balancer://hotcluster">
    +    BalancerMember "http://www2.example.com:8080" loadfactor=1
    +    BalancerMember "http://www3.example.com:8080" loadfactor=2
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    +
    -

    - <Proxy http://backend>
    - - ProxySet keepalive=On
    -
    - </Proxy> -

    +
    <Proxy "http://backend">
    +    ProxySet keepalive=On
    +</Proxy>
    -

    - ProxySet balancer://foo lbmethod=bytraffic timeout=15 -

    -

    - ProxySet ajp://backend:7001 timeout=15 -

    +
    ProxySet "balancer://foo" lbmethod=bytraffic timeout=15
    + + +
    ProxySet "ajp://backend:7001" timeout=15
    +

    Avertissement

    Gardez l'esprit qu'une mme cl de paramtre peut avoir @@ -1903,7 +2135,7 @@ du serveur HTTP Apache.

    top
    -
    Description:Dfinit diffrents paramtres relatifs la rpartition de charge des mandataires et aux membres des groupes de rpartition de @@ -1867,31 +2107,23 @@ du serveur HTTP Apache.
    @@ -1920,7 +2152,7 @@ sortantes
    top
    -
    Description:Dfinit l'adresse IP locale pour les connexions mandates sortantes
    @@ -1942,7 +2174,7 @@ mod_status
    top
    -
    Description:Affiche l'tat du rpartiteur de charge du mandataire dans mod_status
    @@ -1951,7 +2183,6 @@ mandat -
    Description:Dlai d'attente rseau pour les requtes mandates
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy
    Compatibilit:Disponible depuis la version 2.0.31 du serveur HTTP Apache

    Cette directive permet l'utilisateur de spcifier un dlai pour les requtes mandates. Ceci s'avre utile dans le cas d'un serveur @@ -1962,7 +2193,7 @@ mandat

    top
    -

    ProxyVia Directive

    +

    Directive ProxyVia

    @@ -2004,7 +2235,28 @@ mandat

    Langues Disponibles:  en  |  fr  |  ja 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy.html.ja.utf8 b/docs/manual/mod/mod_proxy.html.ja.utf8 index 07eac5e96b6..02002816b52 100644 --- a/docs/manual/mod/mod_proxy.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy.html.ja.utf8 @@ -1,33 +1,39 @@ - -mod_proxy - Apache HTTP サーバ +mod_proxy - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_proxy

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Information fournie dans l'en-tte de rponse HTTP Via pour les requtes mandates
    @@ -64,10 +70,21 @@ 提供されています。これらの機能を利用するためには、該当するモジュールを 組み込んで設定しなければなりません。

    -
    top
    -
    説明:HTTP/1.1 プロキシ/ゲートウェイサーバ
    ステータス:Extension
    モジュール識別子:proxy_module
    モジュール:mod_proxy
    互換性:BalancerGrowth is only available in Apache HTTP Server 2.3.13 and later.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top
    +

    BalancerInherit ディレクティブ

    + + + + + + + + +
    説明:Inherit ProxyPassed Balancers/Workers from the main server
    構文:BalancerInherit On|Off
    デフォルト:BalancerInherit On
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_proxy
    互換性:BalancerInherit is only available in Apache HTTP Server 2.4.5 and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    BalancerMember ディレクティブ

    @@ -327,6 +349,19 @@

    Documentation not yet translated. Please see English version of document.

    top
    +

    BalancerPersist ディレクティブ

    + + + + + + + + +
    説明:Attempt to persist changes made by the Balancer Manager across restarts.
    構文:BalancerPersist On|Off
    デフォルト:BalancerPersist Off
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_proxy
    互換性:BalancerPersist is only available in Apache HTTP Server 2.4.4 and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    NoProxy ディレクティブ

    @@ -506,9 +541,9 @@ -
    説明:直接接続する ホスト、ドメイン、ネットワーク
    ステータス:Extension
    モジュール:mod_proxy
    互換性:Available in version 2.3.10 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    ProxyBadHeader ディレクティブ

    @@ -881,6 +916,20 @@
    top
    +
    + + + + + + + +
    説明:Inherit ProxyPass directives defined from the main server
    構文:ProxyPassInherit On|Off
    デフォルト:ProxyPassInherit On
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_proxy
    互換性:ProxyPassInherit is only available in Apache HTTP Server 2.4.5 and later. +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    ProxyPassInterpolateEnv ディレクティブ

    @@ -1128,9 +1177,9 @@ URL を調整する -
    説明:Enable Environment Variable interpolation in Reverse Proxy configurations
    ステータス:Extension
    モジュール:mod_proxy
    互換性:Available in version 2.3.9 and later

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    ProxyStatus ディレクティブ

    @@ -1195,10 +1244,31 @@ URL を調整する
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index d694301e4ae..c028626d576 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -53,7 +53,7 @@ capabilities
  • mod_proxy_balancer and one or more - balancer modules, if load balancing is required. (See + balancer modules if load balancing is required. (See mod_proxy_balancer for more information.)
  • one or more proxy scheme, or protocol, modules: @@ -69,6 +69,7 @@
  • +
    HTTP/0.9, HTTP/1.0, and HTTP/1.1mod_proxy_http
    SCGImod_proxy_scgi
    WS and WSS (Web-sockets)mod_proxy_wstunnel
    @@ -87,6 +88,7 @@ mod_proxy_ftp mod_proxy_http mod_proxy_scgi +mod_proxy_wstunnel mod_proxy_balancer mod_ssl @@ -99,7 +101,7 @@ server that sits between the client and the origin server. In order to get content from the origin server, the client sends a request to the proxy naming the origin server - as the target and the proxy then requests the content from the + as the target. The proxy then requests the content from the origin server and returns it to the client. The client must be specially configured to use the forward proxy to access other sites.

    @@ -120,15 +122,15 @@

    A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. - The client makes ordinary requests for content in the name-space + The client makes ordinary requests for content in the namespace of the reverse proxy. The reverse proxy then decides where to - send those requests, and returns the content as if it was itself + send those requests and returns the content as if it were itself the origin.

    A typical usage of a reverse proxy is to provide Internet users access to a server that is behind a firewall. Reverse proxies can also be used to balance load among several back-end - servers, or to provide caching for a slower back-end server. + servers or to provide caching for a slower back-end server. In addition, reverse proxies can be used simply to bring several servers into the same URL space.

    @@ -151,27 +153,49 @@ the documentation from mod_cache.

    Reverse Proxy - ProxyPass /foo http://foo.example.com/bar
    - ProxyPassReverse /foo http://foo.example.com/bar + +ProxyPass "/foo" "http://foo.example.com/bar" +ProxyPassReverse "/foo" "http://foo.example.com/bar" +
    Forward Proxy - ProxyRequests On
    - ProxyVia On
    -
    - <Proxy *>
    - - Require host internal.example.com
    -
    - </Proxy> + +ProxyRequests On +ProxyVia On + +<Proxy "*"> + Require host internal.example.com +</Proxy> +
    +
    Access via Handler + +

    You can also force a request to be handled as a reverse-proxy + request, by creating a suitable Handler pass-through. The example + configuration below will pass all requests for PHP scripts to the + specified FastCGI server using reverse proxy: +

    + + Reverse Proxy PHP scripts + +<FilesMatch "\.php$"> + # Unix sockets require 2.4.7 or later + SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/" +</FilesMatch> + + + +

    This feature is available in Apache HTTP Server 2.4.10 and later.

    + +
    Workers

    The proxy manages the configuration of origin servers and their communication parameters in objects called workers. - There are two built-in workers, the default forward proxy worker and the + There are two built-in workers: the default forward proxy worker and the default reverse proxy worker. Additional workers can be configured explicitly.

    @@ -187,48 +211,46 @@ ProxyPassMatch when used for a reverse proxy:

    - - ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 - + + ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30 +

    This will create a worker associated with the origin server URL - http://backend.example.com and using the given timeout + http://backend.example.com that will use the given timeout values. When used in a forward proxy, workers are usually defined via the ProxySet directive:

    - - ProxySet http://backend.example.com connectiontimeout=5 timeout=30 - + + ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30 +

    or alternatively using Proxy and ProxySet:

    - - <Proxy http://backend.example.com>
    - - ProxySet connectiontimeout=5 timeout=30 - - </Proxy> -
    + +<Proxy "http://backend.example.com"> + ProxySet connectiontimeout=5 timeout=30 +</Proxy> +

    Using explicitly configured workers in the forward mode is not very common, because forward proxies usually communicate with many different origin servers. Creating explicit workers for some of the - origin servers can still be useful, if they are used very often. + origin servers can still be useful if they are used very often. Explicitly configured workers have no concept of forward or reverse proxying by themselves. They encapsulate a common concept of communication with origin servers. A worker created by ProxyPass for use in a - reverse proxy will be also used for forward proxy requests whenever - the URL to the origin server matches the worker URL and vice versa.

    + reverse proxy will also be used for forward proxy requests whenever + the URL to the origin server matches the worker URL, and vice versa.

    The URL identifying a direct worker is the URL of its origin server including any path components given:

    - - ProxyPass /examples http://backend.example.com/examples
    - ProxyPass /docs http://backend.example.com/docs -
    + +ProxyPass "/examples" "http://backend.example.com/examples" +ProxyPass "/docs" "http://backend.example.com/docs" +

    This example defines two different workers, each using a separate connection pool and configuration.

    @@ -238,22 +260,22 @@ the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. In the following example

    - - ProxyPass /apps http://backend.example.com/ timeout=60
    - ProxyPass /examples http://backend.example.com/examples timeout=10 -
    + +ProxyPass "/apps" "http://backend.example.com/" timeout=60 +ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 +

    the second worker isn't actually created. Instead the first worker is used. The benefit is, that there is only one connection pool, so connections are more often reused. Note that all configuration attributes given explicitly for the later worker will be ignored. This will be logged - as a warning. In the above example the resulting timeout value + as a warning. In the above example, the resulting timeout value for the URL /examples will be 60 instead of 10!

    If you want to avoid worker sharing, sort your worker definitions by URL length, starting with the longest worker URLs. If you want to maximize - worker sharing use the reverse sort order. See also the related warning about + worker sharing, use the reverse sort order. See also the related warning about ordering ProxyPass directives.

    @@ -266,7 +288,7 @@ ProxySet.

    The set of options available for a direct worker - depends on the protocol, which is specified in the origin server URL. + depends on the protocol which is specified in the origin server URL. Available protocols include ajp, fcgi, ftp, http and scgi.

    @@ -281,20 +303,30 @@ Members are added to a balancer using BalancerMember.

    + DNS resolution for origin domains +

    DNS resolution happens when the socket to + the origin domain is created for the first time. + When connection pooling is used, each backend domain is resolved + only once per child process, and reused for all further connections + until the child is recycled. This information should to be considered + while planning DNS maintenance tasks involving backend domains. + Please also check ProxyPass + parameters for more details about connection reuse. +

    +
    +
    -
    Controlling access to your proxy +
    Controlling Access to Your Proxy

    You can control who can access your proxy via the Proxy control block as in the following example:

    - - <Proxy *>
    - - Require ip 192.168.0
    -
    - </Proxy> -
    + +<Proxy "*"> + Require ip 192.168.0 +</Proxy> +

    For more information on access control directives, see mod_authz_host.

    @@ -358,15 +390,13 @@

    These are the force-proxy-request-1.0 and proxy-nokeepalive notes.

    - - <Location /buggyappserver/>
    - - ProxyPass http://buggyappserver:7001/foo/
    - SetEnv force-proxy-request-1.0 1
    - SetEnv proxy-nokeepalive 1
    -
    - </Location> -
    + +<Location "/buggyappserver/"> + ProxyPass "http://buggyappserver:7001/foo/" + SetEnv force-proxy-request-1.0 1 + SetEnv proxy-nokeepalive 1 +</Location> +
    @@ -433,6 +463,11 @@ module="mod_proxy">ProxyVia directives, which control other request headers.

    +

    Note: If you need to specify custom request headers to be + added to the forwarded request, use the + RequestHeader + directive.

    +
    @@ -452,25 +487,35 @@ yournetwork.example.com to access content via your proxy server:

    - - <Proxy *>
    - - Require host yournetwork.example.com
    -
    - </Proxy> -
    + +<Proxy "*"> + Require host yournetwork.example.com +</Proxy> +

    The following example will process all files in the foo directory of example.com through the INCLUDES filter when they are sent through the proxy server:

    - - <Proxy http://example.com/foo/*>
    - - SetOutputFilter INCLUDES
    -
    - </Proxy> -
    + +<Proxy "http://example.com/foo/*"> + SetOutputFilter INCLUDES +</Proxy> + + + Differences from the Location configuration section +

    A backend URL matches the configuration section if it begins with the + the wildcard-url string, even if the last path segment in the + directive only matches a prefix of the backend URL. For example, + <Proxy "http://example.com/foo"> matches all of + http://example.com/foo, http://example.com/foo/bar, and + http://example.com/foobar. The matching of the final URL differs + from the behavior of the Location section, which for purposes of this note + treats the final path component as if it ended in a slash.

    +

    For more control over the matching, see ProxyMatch.

    +
    ProxyMatch @@ -484,18 +529,17 @@ response ProxyBadHeader IsError server configvirtual host -Available in Apache HTTP Server 2.0.44 and later

    The ProxyBadHeader directive determines the - behaviour of mod_proxy if it receives syntactically invalid + behavior of mod_proxy if it receives syntactically invalid response header lines (i.e. containing no colon) from the origin server. The following arguments are possible:

    IsError
    Abort the request and end up with a 502 (Bad Gateway) response. This is - the default behaviour.
    + the default behavior.
    Ignore
    Treat bad header lines as if they weren't sent.
    @@ -519,8 +563,21 @@ proxied resources

    The ProxyMatch directive is identical to the Proxy directive, except it matches URLs + type="section">Proxy directive, except that it matches URLs using regular expressions.

    + +

    From 2.4.8 onwards, named groups and backreferences are captured and + written to the environment with the corresponding name prefixed with + "MATCH_" and in upper case. This allows elements of URLs to be referenced + from within expressions and modules like + mod_rewrite. In order to prevent confusion, numbered + (unnamed) backreferences are ignored. Use named groups instead.

    + + +<ProxyMatch "^http://(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</ProxyMatch> +
    Proxy @@ -534,13 +591,13 @@ request server configvirtual host directory -Available in Apache HTTP Server 2.0.31 and later. Usable in directory +Usable in directory context in 2.3.3 and later.

    When enabled, this option will pass the Host: line from the incoming request to the proxied host, instead of the hostname specified in the - ProxyPass line.

    + ProxyPass line.

    This option should normally be turned Off. It is mostly useful in special configurations like proxied mass name-based virtual @@ -570,6 +627,9 @@ context in 2.3.3 and later. need also mod_proxy_http or mod_proxy_ftp (or both) present in the server.

    +

    In order to get the functionality of (forward) proxying HTTPS sites, you + need mod_proxy_connect enabled in the server.

    + Warning

    Do not enable proxying with ProxyRequests until you have are forwarded through the remote proxy using the HTTP CONNECT method.

    Example - ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000
    - ProxyRemote * http://cleverproxy.localdomain
    - ProxyRemote ftp http://ftpproxy.mydomain:8080 + +ProxyRemote "http://goodguys.example.com/" "http://mirrorguys.example.com:8000" +ProxyRemote "*" "http://cleverproxy.localdomain" +ProxyRemote "ftp" "http://ftpproxy.mydomain:8080" +

    In the last example, the proxy will forward FTP requests, encapsulated as yet another HTTP proxy request, to another proxy which can handle them.

    -

    This option also supports reverse proxy configuration - a backend +

    This option also supports reverse proxy configuration; a backend webserver can be embedded within a virtualhost URL space even if that server is hidden by another forward proxy.

    @@ -630,7 +692,7 @@ expressions

    The ProxyRemoteMatch is identical to the - ProxyRemote directive, except the + ProxyRemote directive, except that the first argument is a regular expression match against the requested URL.

    @@ -647,11 +709,61 @@ expressions

    This directive allows for growth potential in the number of Balancers available for a virtualhost in addition to the - number pre-configured. It only take effect if there is at - least 1 pre-configured Balancer.

    + number pre-configured. It only takes effect if there is at + least one pre-configured Balancer.

    + + BalancerPersist + Attempt to persist changes made by the Balancer Manager across restarts. + BalancerPersist On|Off + BalancerPersist Off + server configvirtual host + BalancerPersist is only available in Apache HTTP Server 2.4.4 and later. + +

    This directive will cause the shared memory storage associated + with the balancers and balancer members to be persisted across + restarts. This allows these local changes to not be lost during the + normal restart/graceful state transitions.

    +
    +
    + + + ProxyPassInherit + Inherit ProxyPass directives defined from the main server + ProxyPassInherit On|Off + ProxyPassInherit On + server configvirtual host + ProxyPassInherit is only available in Apache HTTP Server 2.4.5 and later. + + +

    This directive will cause the current server/vhost to "inherit" + ProxyPass + directives defined in the main server. This can cause issues and + inconsistent behavior if using the Balancer Manager for dynamic changes + and so should be disabled if using that feature.

    +

    The setting in the global server defines the default for all vhosts.

    +

    Disabling ProxyPassInherit also disables BalancerInherit.

    +
    +
    + + + BalancerInherit + Inherit ProxyPassed Balancers/Workers from the main server + BalancerInherit On|Off + BalancerInherit On + server configvirtual host + BalancerInherit is only available in Apache HTTP Server 2.4.5 and later. + +

    This directive will cause the current server/vhost to "inherit" ProxyPass + Balancers and Workers defined in the main server. This can cause issues and + inconsistent behavior if using the Balancer Manager and so should be disabled + if using that feature.

    +

    The setting in the global server defines the default for all vhosts.

    +
    +
    + BalancerMember Add a member to a load balancing group @@ -662,18 +774,23 @@ expressions BalancerMember is only available in Apache HTTP Server 2.2 and later. -

    This directive adds a member to a load balancing group. It could be used +

    This directive adds a member to a load balancing group. It can be used within a <Proxy balancer://...> container - directive, and can take any of the key value pair parameters available to + directive and can take any of the key value pair parameters available to ProxyPass directives.

    -

    One additional parameter is available only to BalancerMember directives: +

    One additional parameter is available only to BalancerMember directives: loadfactor. This is the member load factor - a number between 1 (default) and 100, which defines the weighted load to be applied to the member in question.

    -

    The balancerurl is only needed when not in <Proxy balancer://...> +

    The balancerurl is only needed when not within a + <Proxy balancer://...> container directive. It corresponds to the url of a balancer defined in ProxyPass directive.

    +

    The path component of the balancer URL in any + <Proxy balancer://...> container directive + is ignored.

    +

    Trailing slashes should typically be removed from the URL of a + BalancerMember.

    @@ -697,34 +814,32 @@ expressions ProxyPass directive.

    - <Proxy balancer://hotcluster>
    - - BalancerMember http://www2.example.com:8080 loadfactor=1
    - BalancerMember http://www3.example.com:8080 loadfactor=2
    - ProxySet lbmethod=bytraffic
    -
    - </Proxy> + +<Proxy "balancer://hotcluster"> + BalancerMember "http://www2.example.com:8080" loadfactor=1 + BalancerMember "http://www3.example.com:8080" loadfactor=2 + ProxySet lbmethod=bytraffic +</Proxy> +
    - - <Proxy http://backend>
    - - ProxySet keepalive=On
    -
    - </Proxy> -
    + +<Proxy "http://backend"> + ProxySet keepalive=On +</Proxy> + - - ProxySet balancer://foo lbmethod=bytraffic timeout=15 - + + ProxySet "balancer://foo" lbmethod=bytraffic timeout=15 + - - ProxySet ajp://backend:7001 timeout=15 - + + ProxySet "ajp://backend:7001" timeout=15 + Warning

    Keep in mind that the same parameter key can have a different meaning - depending whether it is applied to a balancer or a worker as shown by the two + depending whether it is applied to a balancer or a worker, as shown by the two examples above regarding timeout.

    @@ -735,51 +850,76 @@ expressions ProxyPass Maps remote servers into the local server URL-space ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate] + [key=value ...]] [nocanon] [interpolate] [noquery] server configvirtual host directory +Unix Domain Socket (UDS) support added in 2.4.7

    This directive allows remote servers to be mapped into the - space of the local server; the local server does not act as a - proxy in the conventional sense, but appears to be a mirror of the + space of the local server. The local server does not act as a + proxy in the conventional sense but appears to be a mirror of the remote server. The local server is often called a reverse proxy or gateway. The path is the name of a local virtual path; url is a partial URL for the remote server and cannot include a query string.

    + Note: This directive is not supported within + Directory and + Files containers. + The ProxyRequests directive should usually be set off when using ProxyPass. +

    In 2.4.7 and later, support for using a Unix Domain Socket is available by using a target + which prepends unix:/path/lis.sock|. For example, to proxy + HTTP and target the UDS at /home/www/socket, you would use + unix:/home/www.socket|http://localhost/whatever/.

    + + Note: The path associated with the unix: + URL is DefaultRuntimeDir aware. + +

    When used inside a Location section, the first argument is omitted and the local + directory is obtained from the Location. The same will occur inside a + LocationMatch section; + however, ProxyPass does not interpret the regexp as such, so it is necessary + to use ProxyPassMatch in this situation instead.

    +

    Suppose the local server has address http://example.com/; then

    - - <Location /mirror/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    -
    + +<Location "/mirror/foo/"> + ProxyPass "http://backend.example.com/" +</Location> +

    will cause a local request for http://example.com/mirror/foo/bar to be internally converted into a proxy request to http://backend.example.com/bar.

    -

    The following alternative syntax is possible, however carries a - performance penalty when present in large numbers:

    +

    If you require a more flexible reverse-proxy configuration, see the + RewriteRule directive with the + [P] flag.

    - - ProxyPass /mirror/foo/ http://backend.example.com/ - +

    The following alternative syntax is possible; however, it can carry a + performance penalty when present in very large numbers. The advantage of + the below syntax is that it allows for dynamic control via the + Balancer Manager interface:

    + + + ProxyPass "/mirror/foo/" "http://backend.example.com/" +

    If the first argument ends with a trailing /, the second - argument should also end with a trailing / and vice - versa. Otherwise the resulting requests to the backend may miss some + argument should also end with a trailing /, and vice + versa. Otherwise, the resulting requests to the backend may miss some needed slashes and do not deliver the expected results.

    @@ -787,23 +927,19 @@ expressions

    The ! directive is useful in situations where you don't want to reverse-proxy a subdirectory, e.g.

    - - <Location /mirror/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    - <Location /mirror/foo/i>
    - - ProxyPass !
    -
    - </Location>
    -
    + +<Location "/mirror/foo/"> + ProxyPass "http://backend.example.com/" +</Location> +<Location "/mirror/foo/i"> + ProxyPass "!" +</Location> + - - ProxyPass /mirror/foo/i !
    - ProxyPass /mirror/foo http://backend.example.com -
    + +ProxyPass "/mirror/foo/i" "!" +ProxyPass "/mirror/foo" "http://backend.example.com" +

    will proxy all requests to /mirror/foo to backend.example.com except requests made to @@ -815,24 +951,26 @@ expressions rules are checked in the order of configuration. The first rule that matches wins. So usually you should sort conflicting ProxyPass rules starting with the - longest URLs first. Otherwise later rules for longer URLS will be hidden + longest URLs first. Otherwise, later rules for longer URLS will be hidden by any earlier rule which uses a leading substring of the URL. Note that there is some relation with worker sharing. In contrast, only one ProxyPass directive can be placed in a Location block, and the most specific location will take precedence.

    -

    For the same reasons exclusions must come before the +

    For the same reasons, exclusions must come before the general ProxyPass directives.

    +

    ProxyPass key=value Parameters

    +

    In Apache HTTP Server 2.1 and later, mod_proxy supports pooled connections to a backend server. Connections created on demand can be retained in a pool for future use. Limits on the pool size and other settings can be coded on the ProxyPass directive - using key=value parameters, described in the table + using key=value parameters, described in the tables below.

    By default, mod_proxy will allow and retain the maximum number of @@ -850,7 +988,9 @@ expressions by configuration or MPM design.

    Example - ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 + + ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300 +
    BalancerMember parameters
    @@ -869,7 +1009,7 @@ expressions Maximum number of connections that will be allowed to the backend server. The default for this limit is the number of threads per process in the active MPM. In the Prefork MPM, this is always 1, - while with other MPMs it is controlled by the + while with other MPMs, it is controlled by the ThreadsPerChild directive. smax max @@ -883,16 +1023,16 @@ expressions closed more aggressively. acquire - - If set this will be the maximum time to wait for a free + If set, this will be the maximum time to wait for a free connection in the connection pool, in milliseconds. If there are no free - connections in the pool the Apache httpd will return SERVER_BUSY + connections in the pool, the Apache httpd will return SERVER_BUSY status to the client. connectiontimeout timeout Connect timeout in seconds. The number of seconds Apache httpd waits for the creation of a connection to - the backend to complete. By adding a postfix of ms the timeout can be + the backend to complete. By adding a postfix of ms, the timeout can be also set in milliseconds. disablereuse @@ -907,14 +1047,20 @@ expressions robin DNS. To disable connection pooling reuse, set this property value to On. + enablereuse + On + This is the inverse of 'disablereuse' above, provided as a + convenience for scheme handlers that require opt-in for connection + reuse (such as mod_proxy_fcgi). 2.4.11 and later only. + flushpackets off Determines whether the proxy module will auto-flush the output brigade after each "chunk" of data. 'off' means that it will flush - only when needed, 'on' means after each chunk is sent and + only when needed; 'on' means after each chunk is sent; and 'auto' means poll/wait for a period of time and flush if no input has been received for 'flushwait' milliseconds. - Currently this is in effect only for AJP. + Currently, this is in effect only for AJP. flushwait 10 @@ -930,10 +1076,11 @@ expressions keepalive Off

    This parameter should be used when you have a firewall between your - Apache httpd and the backend server, who tend to drop inactive connections. + Apache httpd and the backend server, which tends to drop inactive connections. This flag will tell the Operating System to send KEEP_ALIVE - messages on inactive connections and thus prevent the firewall to drop the connection. - To enable keepalive set this property value to On.

    + messages on inactive connections and thus prevent the firewall from dropping + the connection. + To enable keepalive, set this property value to On.

    The frequency of initial and subsequent TCP keepalive probes depends on global OS settings, and may be as high as 2 hours. To be useful, the frequency configured in the OS must be smaller than the threshold used @@ -949,19 +1096,19 @@ expressions 0 Ping property tells the webserver to "test" the connection to the backend before forwarding the request. For AJP, it causes - mod_proxy_ajpto send a CPING + mod_proxy_ajp to send a CPING request on the ajp13 connection (implemented on Tomcat 3.3.2+, 4.1.28+ and 5.0.13+). For HTTP, it causes mod_proxy_http to send a 100-Continue to the backend (only valid for HTTP/1.1 - for non HTTP/1.1 backends, this property has no - effect). In both cases the parameter is the delay in seconds to wait + effect). In both cases, the parameter is the delay in seconds to wait for the reply. This feature has been added to avoid problems with hung and busy backends. This will increase the network traffic during the normal operation which could be an issue, but it will lower the traffic in case some of the cluster nodes are down or busy. - By adding a postfix of ms the delay can be also set in + By adding a postfix of ms, the delay can be also set in milliseconds. receivebuffersize @@ -975,16 +1122,16 @@ expressions - Redirection Route of the worker. This value is usually set dynamically to enable safe removal of the node from - the cluster. If set all requests without session id will be - redirected to the BalancerMember that has route parametar - equal as this value. + the cluster. If set, all requests without session id will be + redirected to the BalancerMember that has route parameter + equal to this value. retry 60 Connection pool worker retry timeout in seconds. If the connection pool worker to the backend server is in the error state, Apache httpd will not forward any requests to that server until the timeout - expires. This enables to shut down the backend server for maintenance, + expires. This enables to shut down the backend server for maintenance and bring it back online later. A value of 0 means always retry workers in an error state with no timeout. @@ -1000,11 +1147,11 @@ expressions - + -
    D: Worker is disabled and will not accept any requests.
    S: Worker is administratively stopped.
    I: Worker is in ignore-errors mode, and will always be considered available.
    I: Worker is in ignore-errors mode and will always be considered available.
    H: Worker is in hot-standby mode and will only be used if no other viable workers are available.
    E: Worker is in an error state.
    N: Worker is in drain mode, and will only accept existing sticky sessions +
    N: Worker is in drain mode and will only accept existing sticky sessions destined for itself and ignore all other requests.
    Status can be set (which is the default) by prepending with '+' or @@ -1024,16 +1171,22 @@ expressions connection will not be used again; it will be closed at some later time. + flusher + flush +

    Name of the provider used by mod_proxy_fdpass. + See the documentation of this module for more details.

    +

    If the Proxy directive scheme starts with the - balancer:// (eg: balancer://cluster/, - any path information is ignored) then a virtual worker that does not really - communicate with the backend server will be created. Instead it is responsible - for the management of several "real" workers. In that case the special set of - parameters can be add to this virtual worker. See mod_proxy_balancer - for more information about how the balancer works. + balancer:// (eg: balancer://cluster, + any path information is ignored), then a virtual worker that does not really + communicate with the backend server will be created. Instead, it is responsible + for the management of several "real" workers. In that case, the special set of + parameters can be added to this virtual worker. + See mod_proxy_balancer for more information about how + the balancer works.

    Balancer parameters
    @@ -1044,9 +1197,9 @@ expressions @@ -1054,9 +1207,9 @@ expressions - @@ -1064,27 +1217,42 @@ expressions like JSESSIONID or PHPSESSIONID, and it depends on the backend application server that support sessions. If the backend application server uses different name for cookies - and url encoded id (like servlet containers) use | to to separate them. - The first part is for the cookie the second for the path. + and url encoded id (like servlet containers) use | to separate them. + The first part is for the cookie the second for the path.
    + Available in Apache HTTP Server 2.4.4 and later. + + + + - - - + + + + + +
    byrequests Balancer load-balance method. Select the load-balancing scheduler method to use. Either byrequests, to perform weighted - request counting, bytraffic, to perform weighted - traffic byte count balancing, or bybusyness, to perform - pending request balancing. Default is byrequests. + request counting; bytraffic, to perform weighted + traffic byte count balancing; or bybusyness, to perform + pending request balancing. The default is byrequests.
    maxattempts One less than the number of workers, or 1 with a single worker.
    nofailover OffIf set to On the session will break if the worker is in - error state or disabled. Set this value to On if backend servers do not - support session replication. + If set to On, the session will break if the worker is in + error state or disabled. Set this value to On if backend + servers do not support session replication.
    stickysession -
    stickysessionsep"."Sets the separation symbol in the session cookie. Some backend application servers + do not use the '.' as the symbol. For example, the Oracle Weblogic server uses + '!'. The correct symbol can be set using this option. The setting of 'Off' + signifies that no symbol is used.
    scolonpathdelim OffIf set to On the semi-colon character ';' will be - used as an additional sticky session path deliminator/separator. This + If set to On, the semi-colon character ';' will be + used as an additional sticky session path delimiter/separator. This is mainly used to emulate mod_jk's behavior when dealing with paths such as JSESSIONID=6736bcf34;foo=aabfa
    timeout 0Balancer timeout in seconds. If set this will be the maximum time - to wait for a free worker. Default is not to wait. + Balancer timeout in seconds. If set, this will be the maximum time + to wait for a free worker. The default is to not wait.
    failonstatus -A single or comma-separated list of HTTP status codes. If set this will + A single or comma-separated list of HTTP status codes. If set, this will force the worker into error state when the backend returns any status code in the list. Worker recovery behaves the same as other worker errors.
    failontimeoutOffIf set, an IO read timeout after a request is sent to the backend will + force the worker into error state. Worker recovery behaves the same as other + worker errors.
    + Available in Apache HTTP Server 2.4.5 and later. +
    nonce <auto> The protective nonce used in the balancer-manager application page. @@ -1102,70 +1270,81 @@ expressions Number of additional BalancerMembers to allow to be added to this balancer in addition to those defined at configuration.
    forcerecoveryOnForce the immediate recovery of all workers without considering the + retry parameter of the workers if all workers of a balancer are + in error state. There might be cases where an already overloaded backend + can get into deeper trouble if the recovery of all workers is enforced + without considering the retry parameter of each worker. In this case, + set to Off.
    + Available in Apache HTTP Server 2.4.2 and later. +
    -

    A sample balancer setup

    - - ProxyPass /special-area http://special.example.com smax=5 max=10
    - ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
    - <Proxy balancer://mycluster>
    - - BalancerMember ajp://1.2.3.4:8009
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=20
    - # Less powerful server, don't send as many requests there,
    - BalancerMember ajp://1.2.3.6:8009 loadfactor=5
    -
    - </Proxy> -
    - -

    Setting up a hot-standby, that will only be used if no other - members are available

    - - ProxyPass / balancer://hotcluster/
    - <Proxy balancer://hotcluster>
    - - BalancerMember ajp://1.2.3.4:8009 loadfactor=1
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=2
    - # The below is the hot standby
    - BalancerMember ajp://1.2.3.6:8009 status=+H
    - ProxySet lbmethod=bytraffic -
    - </Proxy> -
    +

    A sample balancer setup:

    + +ProxyPass "/special-area" "http://special.example.com" smax=5 max=10 +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On +<Proxy "balancer://mycluster"> + BalancerMember "ajp://1.2.3.4:8009" + BalancerMember "ajp://1.2.3.5:8009" loadfactor=20 + # Less powerful server, don't send as many requests there, + BalancerMember "ajp://1.2.3.6:8009" loadfactor=5 +</Proxy> + + +

    Setting up a hot-standby that will only be used if no other + members are available:

    + +ProxyPass "/" "balancer://hotcluster/" +<Proxy "balancer://hotcluster"> + BalancerMember "ajp://1.2.3.4:8009" loadfactor=1 + BalancerMember "ajp://1.2.3.5:8009" loadfactor=2 + # The server below is on hot standby + BalancerMember "ajp://1.2.3.6:8009" status=+H + ProxySet lbmethod=bytraffic +</Proxy> + + +

    Additional ProxyPass Keywords

    Normally, mod_proxy will canonicalise ProxyPassed URLs. But this may be incompatible with some backends, particularly those that make use of PATH_INFO. The optional nocanon - keyword suppresses this, and passes the URL path "raw" to the - backend. Note that may affect the security of your backend, as it - removes the normal limited protection against URL-based attacks + keyword suppresses this and passes the URL path "raw" to the + backend. Note that this keyword may affect the security of your backend, + as it removes the normal limited protection against URL-based attacks provided by the proxy.

    -

    The optional interpolate keyword (available in - httpd 2.2.9 and later), in combination with - ProxyPassInterpolateEnv causes the ProxyPass +

    Normally, mod_proxy will include the query string when + generating the SCRIPT_FILENAME environment variable. + The optional noquery keyword (available in + httpd 2.4.1 and later) prevents this.

    + +

    The optional interpolate keyword, in combination with + ProxyPassInterpolateEnv, causes the ProxyPass to interpolate environment variables, using the syntax ${VARNAME}. Note that many of the standard CGI-derived environment variables will not exist when this interpolation happens, so you may still have to resort to mod_rewrite - for complex rules.

    - -

    When used inside a Location section, the first argument is omitted and the local - directory is obtained from the Location. The same will occur inside a - LocationMatch section, - however ProxyPass does not interpret the regexp as such, so it is necessary - to use ProxyPassMatch in this situation instead.

    - -

    This directive is not supported in Directory or Files sections.

    - -

    If you require a more flexible reverse-proxy configuration, see the - RewriteRule directive with the - [P] flag.

    - + for complex rules. Also note that interpolation is not supported + within the scheme portion of a URL. Dynamic determination of the + scheme can be accomplished with mod_rewrite as in the + following example.

    + + +RewriteEngine On + +RewriteCond "%{HTTPS}" =off +RewriteRule "." "-" [E=protocol:http] +RewriteCond "%{HTTPS}" =on +RewriteRule "." "-" [E=protocol:https] + +RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P] +ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverse "/mirror/foo/" "https://backend.example.com/" + @@ -1179,18 +1358,21 @@ expressions -

    This directive is equivalent to ProxyPass, - but makes use of regular expressions, instead of simple prefix matching. The +

    This directive is equivalent to ProxyPass + but makes use of regular expressions instead of simple prefix matching. The supplied regular expression is matched against the url, and if it matches, the server will substitute any parenthesized matches into the given string and use it as a new url.

    + Note: This directive cannot be used within a + <Directory> context. +

    Suppose the local server has address http://example.com/; then

    - - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 - + + ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com/$1" +

    will cause a local request for http://example.com/foo/bar.gif to be internally converted @@ -1199,15 +1381,15 @@ expressions

    The URL argument must be parsable as a URL before regexp substitutions (as well as after). This limits the matches you can use. For instance, if we had used

    - - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 - + + ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com:8000$1" +

    in our previous example, it would fail with a syntax error at server startup. This is a bug (PR 46665 in the ASF bugzilla), and the workaround is to reformulate the match:

    - - ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 - + + ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1" +

    The ! directive is useful in situations where you don't want to reverse-proxy a subdirectory.

    @@ -1221,12 +1403,19 @@ expressions RewriteRule directive with the [P] flag.

    + + Default Substitution +

    When the URL parameter doesn't use any backreferences into the regular + expression, the original URL will be appended to the URL parameter. +

    +
    + Security Warning

    Take care when constructing the target URL of the rule, considering the security impact from allowing the client influence over the set of URLs to which your server will act as a proxy. Ensure that the scheme - and hostname part of the URL is either fixed, or does not allow the + and hostname part of the URL is either fixed or does not allow the client undue influence.

    @@ -1246,56 +1435,56 @@ proxied server

    This directive lets Apache httpd adjust the URL in the Location, Content-Location and URI headers on HTTP redirect responses. This is essential when Apache httpd is used as a - reverse proxy (or gateway) to avoid by-passing the reverse proxy + reverse proxy (or gateway) to avoid bypassing the reverse proxy because of HTTP redirects on the backend servers which stay behind the reverse proxy.

    Only the HTTP response headers specifically mentioned above will be rewritten. Apache httpd will not rewrite other response - headers, nor will it rewrite URL references inside HTML pages. + headers, nor will it by default rewrite URL references inside HTML pages. This means that if the proxied content contains absolute URL - references, they will by-pass the proxy. A third-party module - that will look inside the HTML and rewrite URL references is Nick - Kew's mod_proxy_html.

    + references, they will bypass the proxy. To rewrite HTML content to + match the proxy, you must load and enable mod_proxy_html. +

    -

    path is the name of a local virtual path. url is a - partial URL for the remote server - the same way they are used for the +

    path is the name of a local virtual path; url is a + partial URL for the remote server. + These parameters are used the same way as for the ProxyPass directive.

    For example, suppose the local server has address http://example.com/; then

    - - ProxyPass /mirror/foo/ http://backend.example.com/
    - ProxyPassReverse /mirror/foo/ http://backend.example.com/
    - ProxyPassReverseCookieDomain backend.example.com public.example.com
    - ProxyPassReverseCookiePath / /mirror/foo/ -
    + +ProxyPass "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverseCookieDomain "backend.example.com" "public.example.com" +ProxyPassReverseCookiePath "/" "/mirror/foo/" +

    will not only cause a local request for the http://example.com/mirror/foo/bar to be internally converted into a proxy request to http://backend.example.com/bar - (the functionality ProxyPass provides here). It also takes care - of redirects the server backend.example.com sends: when - http://backend.example.com/bar is redirected by him to - http://backend.example.com/quux Apache httpd adjusts this to + (the functionality which ProxyPass provides here). + It also takes care of redirects which the server backend.example.com + sends when redirecting http://backend.example.com/bar to + http://backend.example.com/quux . Apache httpd adjusts this to http://example.com/mirror/foo/quux before forwarding the HTTP redirect response to the client. Note that the hostname used for constructing the URL is chosen in respect to the setting of the UseCanonicalName directive.

    Note that this ProxyPassReverse directive can - also be used in conjunction with the proxy pass-through feature + also be used in conjunction with the proxy feature (RewriteRule ... [P]) from mod_rewrite because it doesn't depend on a corresponding ProxyPass directive.

    -

    The optional interpolate keyword (available in - httpd 2.2.9 and later), used together with +

    The optional interpolate keyword, used together with ProxyPassInterpolateEnv, enables interpolation of environment variables specified using the format ${VARNAME}. -

    + Note that interpolation is not supported within the scheme portion of a + URL.

    When used inside a Location section, the first argument is omitted and the local @@ -1304,7 +1493,7 @@ proxied server module="core">LocationMatch section, but will probably not work as intended, as ProxyPassReverse will interpret the regexp literally as a path; if needed in this situation, specify the ProxyPassReverse outside - the section, or in a separate Location section.

    This directive is not supported in domain string in Set-Cookie headers.

    + + ProxyPassReverseCookiePath Adjusts the Path string in Set-Cookie headers from a reverse- @@ -1339,10 +1530,25 @@ proxied server directory -

    Usage is basically similar to -ProxyPassReverse, but instead of -rewriting headers that are a URL, this rewrites the path -string in Set-Cookie headers.

    +

    +Useful in conjunction with +ProxyPassReverse +in situations where backend URL paths are mapped to public paths on the +reverse proxy. This directive rewrites the path string in +Set-Cookie headers. If the beginning of the cookie path matches +internal-path, the cookie path will be replaced with +public-path. +

    +In the example given with +ProxyPassReverse, the directive: +

    + + ProxyPassReverseCookiePath "/" "/mirror/foo/" + +

    +will rewrite a cookie with backend path / (or +/example or, in fact, anything) to /mirror/foo/. +

    @@ -1365,7 +1571,9 @@ proxied well. That may slow down the startup time of the server.

    Example - ProxyBlock news.example.com auctions.example.com friends.example.com + + ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com" +

    Note that example would also be sufficient to match any @@ -1375,9 +1583,9 @@ proxied

    Note also that

    - - ProxyBlock * - + + ProxyBlock "*" +

    blocks connections to all sites.

    @@ -1400,7 +1608,9 @@ connections be used.

    Example + ProxyReceiveBufferSize 2048 + @@ -1415,15 +1625,18 @@ connections

    The ProxyIOBufferSize directive adjusts the size - of the internal buffer, which is used as a scratchpad for the data between + of the internal buffer which is used as a scratchpad for the data between input and output. The size must be at least 512.

    -

    In almost every case there's no reason to change that value.

    -

    If used with AJP this directive sets the maximum AJP packet size in - bytes. If you change it from the default, you must also change the - packetSize attribute of your AJP connector on the - Tomcat side! The attribute packetSize is only available - in Tomcat 5.5.20+ and 6.0.2+

    +

    In almost every case, there's no reason to change that value.

    + +

    If used with AJP, this directive sets the maximum AJP packet size in + bytes. Values larger than 65536 are set to 65536. If you change it from + the default, you must also change the packetSize attribute of + your AJP connector on the Tomcat side! The attribute + packetSize is only available in Tomcat 5.5.20+ + and 6.0.2+

    +

    Normally it is not necessary to change the maximum packet size. Problems with the default value have been reported when sending certificates or certificate chains.

    @@ -1439,17 +1652,18 @@ through ProxyMaxForwards -1 server configvirtual host -Available in Apache HTTP Server 2.0 and later; - default behaviour changed in 2.2.7/2.3 +Default behaviour changed in 2.2.7

    The ProxyMaxForwards directive specifies the - maximum number of proxies through which a request may pass, if there's no + maximum number of proxies through which a request may pass if there's no Max-Forwards header supplied with the request. This may - be set to prevent infinite proxy loops, or a DoS attack.

    + be set to prevent infinite proxy loops or a DoS attack.

    Example + ProxyMaxForwards 15 +

    Note that setting ProxyMaxForwards is a @@ -1457,7 +1671,7 @@ through setting Max-Forwards if the Client didn't set it. Earlier Apache httpd versions would always set it. A negative ProxyMaxForwards value, including the - default -1, gives you protocol-compliant behaviour, but may + default -1, gives you protocol-compliant behavior but may leave you open to loops.

    @@ -1479,8 +1693,10 @@ directly ProxyRemote proxy server(s).

    Example - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21 + +ProxyRemote "*" "http://firewall.example.com:81" +NoProxy ".example.com" "192.168.112.0/21" +

    The host arguments to the NoProxy @@ -1507,7 +1723,7 @@ directly Note

    Domain name comparisons are done without regard to the case, and Domains are always assumed to be anchored in the root of the - DNS tree, therefore two domains .ExAmple.com and + DNS tree; therefore, the two domains .ExAmple.com and .example.com. (note the trailing period) are considered equal. Since a domain comparison does not involve a DNS lookup, it is much more efficient than subnet comparison.

    @@ -1534,7 +1750,7 @@ directly

    As a degenerate case, a SubNet with 32 valid bits is the - equivalent to an IPAddr, while a SubNet with zero + equivalent to an IPAddr, while a SubNet with zero valid bits (e.g., 0.0.0.0/0) is the same as the constant _Default_, matching any IP address.

    @@ -1577,7 +1793,7 @@ directly link.

    Hostname comparisons are done without regard to the case, and Hostnames are always assumed to be anchored in the root - of the DNS tree, therefore two hosts WWW.ExAmple.com + of the DNS tree; therefore, the two hosts WWW.ExAmple.com and www.example.com. (note the trailing period) are considered equal.

    @@ -1593,7 +1809,6 @@ directly Value of Timeout server configvirtual host -Available in Apache HTTP Server 2.0.31 and later

    This directive allows a user to specifiy a timeout on proxy requests. @@ -1619,9 +1834,11 @@ directly will be generated.

    Example - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21
    - ProxyDomain .example.com + +ProxyRemote "*" "http://firewall.example.com:81" +NoProxy ".example.com" "192.168.112.0/21" +ProxyDomain ".example.com" +
    @@ -1669,16 +1886,15 @@ header for proxied requests server configvirtual host directory -Available in version 2.0 and later -

    This directive is useful for reverse-proxy setups, where you want to +

    This directive is useful for reverse-proxy setups where you want to have a common look and feel on the error pages seen by the end user. This also allows for included files (via mod_include's SSI) to get - the error code and act accordingly (default behavior would display - the error page of the proxied server, turning this on shows the SSI - Error message).

    + the error code and act accordingly. (Default behavior would display + the error page of the proxied server. Turning this on shows the SSI + Error message.)

    This directive does not affect the processing of informational (1xx), normal success (2xx), or redirect (3xx) responses.

    @@ -1699,18 +1915,18 @@ header for proxied requests

    This directive, together with the interpolate argument to ProxyPass, ProxyPassReverse, - ProxyPassReverseCookieDomain and - ProxyPassReverseCookiePath + ProxyPassReverseCookieDomain, and + ProxyPassReverseCookiePath, enables reverse proxies to be dynamically - configured using environment variables, which may be set by + configured using environment variables which may be set by another module such as mod_rewrite. It affects the ProxyPass, ProxyPassReverse, ProxyPassReverseCookieDomain, and - ProxyPassReverseCookiePath directives, + ProxyPassReverseCookiePath directives and causes them to substitute the value of an environment variable varname for the string ${varname} - in configuration directives.

    + in configuration directives if the interpolate option is set.

    Keep this turned off (for server performance) unless you need it!

    diff --git a/docs/manual/mod/mod_proxy.xml.fr b/docs/manual/mod/mod_proxy.xml.fr index 7ebf934d926..deee27f26e3 100644 --- a/docs/manual/mod/mod_proxy.xml.fr +++ b/docs/manual/mod/mod_proxy.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -32,34 +32,34 @@ Avertissement -

    N'activez pas la fonctionnalité de mandataire avec la directive +

    N'activez pas la fonctionnalité de mandataire avec la directive ProxyRequests avant - d'avoir sécurisé votre serveur. Les serveurs - mandataires ouverts sont dangereux pour votre réseau, + d'avoir sécurisé votre serveur. Les serveurs + mandataires ouverts sont dangereux pour votre réseau, mais aussi pour l'Internet au sens large.

    -

    mod_proxy et ses modules associés implémentent +

    mod_proxy et ses modules associés implémentent un mandataire/passerelle pour le serveur HTTP Apache, et supportent de nombreux protocoles courants, ainsi que plusieurs algorithmes de - répartition de charge. Le support de protocoles et d'algorithmes de - répartition de charge supplémentaires peut être assuré par des + répartition de charge. Le support de protocoles et d'algorithmes de + répartition de charge supplémentaires peut être assuré par des modules tiers.

    -

    Un jeu de modules chargés dans le serveur permet de fournir les - fonctionnalités souhaitées. Ces modules peuvent être inclus - statiquement à la compilation, ou dynamiquement via la directive +

    Un jeu de modules chargés dans le serveur permet de fournir les + fonctionnalités souhaitées. Ces modules peuvent être inclus + statiquement à la compilation, ou dynamiquement via la directive LoadModule. Ce jeu de module doit comporter :

      -
    • mod_proxy, qui fournit les fonctionnalités de +
    • mod_proxy, qui fournit les fonctionnalités de base d'un mandataire
    • mod_proxy_balancer et un ou plusieurs modules - de répartition, si la répartition de charge doit être mise en + de répartition, si la répartition de charge doit être mise en oeuvre (Voir la documentation de - mod_proxy_balancer pour plus de détails).
    • + mod_proxy_balancer pour plus de détails).
    • un ou plusieurs modules de types de mandataire, ou protocoles : @@ -69,23 +69,24 @@ AJP13 (Protocole Apache JServe version 1.3)mod_proxy_ajp CONNECT (pour - SSL)mod_proxy_connect + SSL)mod_proxy_connect FastCGImod_proxy_fcgi ftpmod_proxy_ftp HTTP/0.9, HTTP/1.0, et - HTTP/1.1mod_proxy_http + HTTP/1.1mod_proxy_http SCGImod_proxy_scgi + WS and WSS (Web-sockets)mod_proxy_wstunnel
    - -

    En outre, d'autres modules fournissent des fonctionnalités - étendues. mod_cache et ses modules associés + +

    En outre, d'autres modules fournissent des fonctionnalités + étendues. mod_cache et ses modules associés fournissent la mise en cache. Les directives SSLProxy* du module mod_ssl permettent de contacter des serveurs distants en utilisant le protocole SSL/TLS. Ces modules - additionnels devront être chargés et configurés pour pouvoir - disposer de ces fonctionnalités.

    + additionnels devront être chargés et configurés pour pouvoir + disposer de ces fonctionnalités.

    mod_cache mod_proxy_ajp @@ -94,437 +95,494 @@ mod_proxy_ftp mod_proxy_http mod_proxy_scgi +mod_proxy_wstunnel mod_proxy_balancer mod_ssl
    Mandataires directs et mandataires/passerelles inverses -

    Le serveur HTTP Apache peut être configuré dans les deux modes mandataire - direct et mandataire inverse (aussi nommé +

    Le serveur HTTP Apache peut être configuré dans les deux modes mandataire + direct et mandataire inverse (aussi nommé mode passerelle).

    Un mandataire direct standard est un serveur - intermédiaire qui s'intercale entre le client et le serveur - demandé. Pour obtenir un contenu hébergé par - le serveur demandé, le client envoie une requête au - mandataire en nommant le serveur demandé comme - cible, puis le mandataire extrait le contenu depuis le - serveur demandé et le renvoie enfin au client. Le client doit être - configuré de manière appropriée pour pouvoir utiliser le mandataire - direct afin d'accéder à d'autres sites.

    - -

    L'accès à Internet depuis des clients situés derrière un + intermédiaire qui s'intercale entre le client et le serveur + demandé. Pour obtenir un contenu hébergé par + le serveur demandé, le client envoie une requête au + mandataire en nommant le serveur demandé comme + cible. Le mandataire extrait alors le contenu depuis le + serveur demandé et le renvoie enfin au client. Le client doit être + configuré de manière appropriée pour pouvoir utiliser le mandataire + direct afin d'accéder à d'autres sites.

    + +

    L'accès à Internet depuis des clients situés derrière un pare-feu est une utilisation typique du mandataire direct. Le mandataire direct peut aussi utiliser la mise en cache (fournie - par mod_cache) pour réduire la charge du - réseau.

    + par mod_cache) pour réduire la charge du + réseau.

    -

    La fonctionnalité de mandataire direct est activée via la +

    La fonctionnalité de mandataire direct est activée via la directive ProxyRequests. - Comme les mandataires directs permettent aux clients d'accéder à + Comme les mandataires directs permettent aux clients d'accéder à des sites quelconques via votre serveur et de dissimuler leur - véritable origine, il est indispensable de sécuriser votre serveur de façon à ce que seuls - les clients autorisés puissent accéder à votre serveur avant - d'activer la fonctionnalité de mandataire direct.

    + véritable origine, il est indispensable de sécuriser votre serveur de façon à ce que seuls + les clients autorisés puissent accéder à votre serveur avant + d'activer la fonctionnalité de mandataire direct.

    Un mandataire inverse (ou passerelle), - quant à lui, apparaît au client comme un serveur web standard. - Aucune configuration particulière du client n'est nécessaire. Le + quant à lui, apparaît au client comme un serveur web standard. + Aucune configuration particulière du client n'est nécessaire. Le client adresse ses demandes de contenus ordinaires dans l'espace - de nommage du mandataire inverse. Ce dernier décide alors où - envoyer ces requêtes, et renvoie le contenu au client comme s'il - l'hébergeait lui-même.

    + de nommage du mandataire inverse. Ce dernier décide alors où + envoyer ces requêtes, et renvoie le contenu au client comme s'il + l'hébergeait lui-même.

    -

    L'accès d'utilisateurs depuis Internet vers un serveur situé - derrière un pare-feu est une utilisation typique du mandataire +

    L'accès d'utilisateurs depuis Internet vers un serveur situé + derrière un pare-feu est une utilisation typique du mandataire inverse. On peut aussi utiliser les mandataires inverses pour - mettre en oeuvre une répartition de charge entre plusieurs - serveurs en arrière-plan, ou fournir un cache pour un serveur - d'arrière-plan plus lent. Les mandataires inverses peuvent aussi - tout simplement servir à rassembler plusieurs serveurs dans le - même espace de nommage d'URLs.

    + mettre en oeuvre une répartition de charge entre plusieurs + serveurs en arrière-plan, ou fournir un cache pour un serveur + d'arrière-plan plus lent. Les mandataires inverses peuvent aussi + tout simplement servir à rassembler plusieurs serveurs dans le + même espace de nommage d'URLs.

    -

    La fonctionnalité de mandataire inverse est activée via la +

    La fonctionnalité de mandataire inverse est activée via la directive ProxyPass ou le drapeau [P] de la directive RewriteRule. Il n'est - pas nécessaire de définir pas nécessaire de définir ProxyRequests pour configurer un mandataire inverse.

    Exemples simples -

    Les exemples ci-dessous illustrent de manière très basique la - mise en oeuvre de la fonctionnalité de mandataire et ne sont là que - pour vous aider à démarrer. Reportez-vous à la documentation de +

    Les exemples ci-dessous illustrent de manière très basique la + mise en oeuvre de la fonctionnalité de mandataire et ne sont là que + pour vous aider à démarrer. Reportez-vous à la documentation de chaque directive.

    -

    Si en outre, vous désirez activer la mise en cache, consultez la +

    Si en outre, vous désirez activer la mise en cache, consultez la documentation de mod_cache.

    Mandataire inverse - ProxyPass /foo http://foo.example.com/bar
    - ProxyPassReverse /foo http://foo.example.com/bar + +ProxyPass "/foo" "http://foo.example.com/bar" +ProxyPassReverse "/foo" "http://foo.example.com/bar" +
    Mandataire direct - ProxyRequests On
    - ProxyVia On
    -
    - <Proxy *>
    - - Require host internal.example.com
    -
    - </Proxy> + +ProxyRequests On +ProxyVia On + +<Proxy "*"> + Require host internal.example.com +</Proxy> +
    +
    Accès via un gestionnaire + +

    Vous pouvez aussi forcer le traitement d'une requête en tant que + requête de mandataire inverse en créant un gestionnaire de transfert + approprié. Dans l'exemple suivant, toutes les requêtes pour + des scripts PHP seront transmises au serveur FastCGI + spécifié via un mandat inverse : +

    + + Scripts PHP et mandataire inverse + +<FilesMatch "\.php$"> + # Les sockets Unix nécessitent une version 2.4.7 ou supérieure du + # serveur HTTP Apache + SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/" +</FilesMatch> + + + +

    Cette fonctionnalité est disponible à partir de la version + 2.4.10 du serveur HTTP Apache.

    + +
    +
    Workers -

    Le mandataire gère la configuration et les paramètres de - communication des serveurs originaux au sein d'objets nommés +

    Le mandataire gère la configuration et les paramètres de + communication des serveurs originaux au sein d'objets nommés workers. Deux types de worker sont fournis : le worker - par défaut du mandataire direct et le worker par défaut du - mandataire inverse. Il est aussi possible de définir explicitement - des workers supplémentaires.

    + par défaut du mandataire direct et le worker par défaut du + mandataire inverse. Il est aussi possible de définir explicitement + des workers supplémentaires.

    -

    Les deux workers par défaut possèdent une configuration figée - et seront utilisés si aucun autre worker ne correspond à la - requête. Ils n'utilisent ni les jeux de connexions (connection +

    Les deux workers par défaut possèdent une configuration figée + et seront utilisés si aucun autre worker ne correspond à la + requête. Ils n'utilisent ni les jeux de connexions (connection pooling), ni les connexions HTTP persistantes (Keep-Alive). En effet, les - connexions TCP vers le serveur original sont fermées et ouvertes - pour chaque requête.

    + connexions TCP vers le serveur original sont fermées et ouvertes + pour chaque requête.

    -

    Les workers définis explicitement sont identifiés par leur URL. - Ils sont en général définis via les directives Les workers définis explicitement sont identifiés par leur URL. + Ils sont en général définis via les directives ProxyPass ou ProxyPassMatch lorsqu'on les utilise dans le cadre d'un mandataire inverse :

    - ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 + + ProxyPass "/example" "http://backend.example.com" connectiontimeout=5 timeout=30 + + -

    Cette directive va créer un worker associé à l'URL du serveur - original http://backend.example.com, et utilisant les - valeurs de timeout données. Lorsqu'ils sont utilisés dans le cadre - d'un mandataire direct, les workers sont en général définis via la +

    Cette directive va créer un worker associé à l'URL du serveur + original http://backend.example.com qui utilisera les + valeurs de timeout données. Lorsqu'ils sont utilisés dans le cadre + d'un mandataire direct, les workers sont en général définis via la directive ProxySet,

    - ProxySet http://backend.example.com connectiontimeout=5 timeout=30 + + ProxySet "http://backend.example.com" connectiontimeout=5 timeout=30 + +

    ou encore via les directives Proxy et ProxySet :

    - - <Proxy http://backend.example.com>
    - - ProxySet connectiontimeout=5 timeout=30 - - </Proxy> -
    - -

    L'utilisation de workers définis explicitement dans le mode - mandataire direct n'est pas très courante, car les mandataires - directs communiquent en général avec de nombreux serveurs - originaux. La création explicite de workers pour certains serveurs - originaux peut cependant s'avérer utile si ces serveurs sont - très souvent sollicités. A leur niveau, les workers explicitement - définis ne possèdent aucune notion de mandataire direct ou + +<Proxy "http://backend.example.com"> + ProxySet connectiontimeout=5 timeout=30 +</Proxy> + + +

    L'utilisation de workers définis explicitement dans le mode + mandataire direct n'est pas très courante, car les mandataires + directs communiquent en général avec de nombreux serveurs + originaux. La création explicite de workers pour certains serveurs + originaux peut cependant s'avérer utile si ces serveurs sont + très souvent sollicités. A leur niveau, les workers explicitement + définis ne possèdent aucune notion de mandataire direct ou inverse. Ils encapsulent un concept de communication commun avec - les serveurs originaux. Un worker créé via la directive ProxyPass pour être utilisé dans le - cadre d'un mandataire inverse sera aussi utilisé dans le cadre + les serveurs originaux. Un worker créé via la directive ProxyPass pour être utilisé dans le + cadre d'un mandataire inverse sera aussi utilisé dans le cadre d'un mandataire directe chaque fois que l'URL vers le serveur - original correspondra à l'URL du worker, et vice versa.

    + original correspondra à l'URL du worker, et vice versa.

    -

    L'URL qui identifie un worker correspond à l'URL de son serveur - original, y compris un éventuel chemin donné :

    +

    L'URL qui identifie un worker correspond à l'URL de son serveur + original, y compris un éventuel chemin donné :

    - - ProxyPass /exemples http://backend.example.com/exemples
    - ProxyPass /docs http://backend.example.com/docs -
    + +ProxyPass "/examples" "http://backend.example.com/examples" +ProxyPass "/docs" "http://backend.example.com/docs" + -

    Dans cet exemple, deux workers différents sont définis, chacun +

    Dans cet exemple, deux workers différents sont définis, chacun d'eux utilisant des configurations et jeux de connexions - séparés.

    + séparés.

    Partage de workers

    Le partage de workers intervient lorsque les URLs des workers s'entrecoupent, ce qui arrive lorsque l'URL d'un worker - correspond au début de l'URL d'un autre worker défini plus loin + correspond au début de l'URL d'un autre worker défini plus loin dans le fichier de configuration. Dans l'exemple suivant,

    - - ProxyPass /apps http://backend.example.com/ timeout=60
    - ProxyPass /examples http://backend.example.com/exemples timeout=10 -
    + +ProxyPass "/apps" "http://backend.example.com/" timeout=60 +ProxyPass "/examples" "http://backend.example.com/examples" timeout=10 + -

    le second worker n'est pas vraiment créé. C'est le premier - worker qui est en fait utilisé. L'avantage de ceci réside dans +

    le second worker n'est pas vraiment créé. C'est le premier + worker qui est en fait utilisé. L'avantage de ceci réside dans le fait qu'il n'existe qu'un seul jeu de connexions, ces - dernières étant donc réutilisées plus souvent. Notez que tous - les attributs de configuration définis explicitement pour le - deuxième worker seront ignorés, ce qui sera journalisé en tant + dernières étant donc réutilisées plus souvent. Notez que tous + les attributs de configuration définis explicitement pour le + deuxième worker seront ignorés, ce qui sera journalisé en tant qu'avertissement. Ainsi, dans l'exemple ci-dessus, la valeur de timeout retenue pour l'URL /exemples sera 60, et non 10 !

    -

    Si vous voulez empêcher le partage de workers, classez vos - définitions de workers selon la longueur des URLs, de la plus - longue à la plus courte. Si au contraire vous voulez favoriser +

    Si vous voulez empêcher le partage de workers, classez vos + définitions de workers selon la longueur des URLs, de la plus + longue à la plus courte. Si au contraire vous voulez favoriser ce partage, utilisez l'ordre de classement inverse. Voir aussi - l'avertissement à propos de l'ordre de classement des directives + l'avertissement à propos de l'ordre de classement des directives ProxyPass.

    -

    Les workers définis explicitement sont de deux sortes : - workers directs et workers de répartition (de +

    Les workers définis explicitement sont de deux sortes : + workers directs et workers de répartition (de charge). Ils supportent de nombreux attributs de - configuration importants décrits dans la directive ProxyPass. Ces mêmes attributs - peuvent aussi être définis via la directive ProxyPass. Ces mêmes attributs + peuvent aussi être définis via la directive ProxySet.

    -

    Le jeu d'options disponibles pour un worker direct dépend du - protocole spécifié dans l'URL du serveur original. Les protocoles +

    Le jeu d'options disponibles pour un worker direct dépend du + protocole spécifié dans l'URL du serveur original. Les protocoles disponibles comprennent ajp, fcgi, ftp, http et scgi.

    -

    Les workers de répartition sont des workers virtuels qui +

    Les workers de répartition sont des workers virtuels qui utilisent les workers directs, connus comme faisant partie de leurs - membres, pour le traitement effectif des requêtes. Chaque - répartiteur peut comporter plusieurs membres. Lorsqu'il traite une - requête, il choisit un de ses membres en fonction de l'algorithme - de répartition de charge défini.

    + membres, pour le traitement effectif des requêtes. Chaque + répartiteur peut comporter plusieurs membres. Lorsqu'il traite une + requête, il choisit un de ses membres en fonction de l'algorithme + de répartition de charge défini.

    -

    Un worker de répartition est créé si son URL de worker comporte +

    Un worker de répartition est créé si son URL de worker comporte balancer comme indicateur de protocole. L'URL du - répartiteur permet d'identifier de manière unique le worker de - répartition. La directive BalancerMember permet d'ajouter des - membres au répartiteur.

    + membres au répartiteur.

    + + Résolution DNS pour les domaines originaux +

    La résolution DNS s'effectue lorsque le socket vers le + domaine original est créé pour la première fois. Lorsque le pooling de + connexions est utilisé, chaque domaine d'arrière-plan n'est résolu qu'une + seule fois pour chaque processus enfant, et cette résolution est réutilisée + pour toutes les connexions ultérieures jusqu'à ce que le processus enfant + soit recyclé. Ce comportement doit être pris en considération lorsqu'on + planifie des tâches de maintenance du DNS impactant les domaines + d'arrière-plan. Veuillez aussi vous reporter aux paramètres de la + directive ProxyPass pour plus de + détails à propos de la réutilisation des connexions. +

    +
    -
    Contrôler l'accès à votre + <section id="access"><title>Contrôler l'accès à votre mandataire -

    Vous pouvez restreindre l'accès à votre mandataire via le bloc - de contrôle Vous pouvez restreindre l'accès à votre mandataire via le bloc + de contrôle Proxy comme dans l'exemple suivant :

    - - <Proxy *>
    - - Require ip 192.168.0
    -
    - </Proxy> -
    + +<Proxy "*"> + Require ip 192.168.0 +</Proxy> + -

    Pour plus de détails sur les directives de contrôle d'accès, +

    Pour plus de détails sur les directives de contrôle d'accès, voir la documentation du module mod_authz_host.

    -

    Restreindre l'accès de manière stricte est essentiel si vous - mettez en oeuvre un mandataire direct (en définissant la directive - ProxyRequests à "on"). - Dans le cas contraire, votre serveur pourrait être utilisé par - n'importe quel client pour accéder à des serveurs quelconques, - tout en masquant sa véritable identité. Ceci représente un danger - non seulement pour votre réseau, mais aussi pour l'Internet au +

    Restreindre l'accès de manière stricte est essentiel si vous + mettez en oeuvre un mandataire direct (en définissant la directive + ProxyRequests à "on"). + Dans le cas contraire, votre serveur pourrait être utilisé par + n'importe quel client pour accéder à des serveurs quelconques, + tout en masquant sa véritable identité. Ceci représente un danger + non seulement pour votre réseau, mais aussi pour l'Internet au sens large. Dans le cas de la mise en oeuvre d'un mandataire - inverse (en définissant la directive ProxyPass à "off"), le contrôle - d'accès est moins critique car les clients ne peuvent contacter - que les serveurs que vous avez spécifiés.

    + inverse (en utilisant la directive ProxyPass avec ProxyRequests Off), le contrôle + d'accès est moins critique car les clients ne peuvent contacter + que les serveurs que vous avez spécifiés.

    Voir aussi la variable d'environnement Proxy-Chain-Auth.

    -
    Ralentissement au démarrage +
    Ralentissement au démarrage

    Si vous utilisez la directive ProxyBlock, les noms d'hôtes sont résolus en adresses - IP puis ces dernières mises en cache au cours du démarrage - à des fins de tests de comparaisons ultérieurs. Ce processus peut + >ProxyBlock, les noms d'hôtes sont résolus en adresses + IP puis ces dernières mises en cache au cours du démarrage + à des fins de tests de comparaisons ultérieurs. Ce processus peut durer plusieurs secondes (ou d'avantage) en fonction de la vitesse - à laquelle s'effectue la résolution des noms d'hôtes.

    + à laquelle s'effectue la résolution des noms d'hôtes.

    Mandataire en Intranet -

    Un serveur mandataire Apache httpd situé à l'intérieur d'un Intranet - doit faire suivre les requêtes destinées à un serveur externe à - travers le pare-feu de l'entreprise (pour ce faire, définissez la +

    Un serveur mandataire Apache httpd situé à l'intérieur d'un Intranet + doit faire suivre les requêtes destinées à un serveur externe à + travers le pare-feu de l'entreprise (pour ce faire, définissez la directive ProxyRemote de - façon à ce qu'elle fasse suivre le protocole concerné - vers le mandataire du pare-feu). Cependant, lorsqu'il doit accéder - à des ressources situées dans l'Intranet, il peut se passer du - pare-feu pour accéder aux serveurs. A cet effet, la directive + façon à ce qu'elle fasse suivre le protocole concerné + vers le mandataire du pare-feu). Cependant, lorsqu'il doit accéder + à des ressources situées dans l'Intranet, il peut se passer du + pare-feu pour accéder aux serveurs. A cet effet, la directive NoProxy permet de - spécifier quels hôtes appartiennent à l'Intranet et peuvent donc - être accédés directement.

    + spécifier quels hôtes appartiennent à l'Intranet et peuvent donc + être accédés directement.

    -

    Les utilisateurs d'un Intranet ont tendance à oublier le nom du - domaine local dans leurs requêtes WWW, et demandent par exemple +

    Les utilisateurs d'un Intranet ont tendance à oublier le nom du + domaine local dans leurs requêtes WWW, et demandent par exemple "http://un-serveur/" au lieu de http://un-serveur.example.com/. Certains serveurs - mandataires commerciaux acceptent ce genre de requête et les + mandataires commerciaux acceptent ce genre de requête et les traitent simplement en utilisant un nom de domaine local implicite. Lorsque la directive ProxyDomain est utilisée et si le - serveur est configuré comme - mandataire, Apache httpd peut renvoyer une réponse de redirection et + module="mod_proxy">ProxyDomain est utilisée et si le + serveur est configuré comme + mandataire, Apache httpd peut renvoyer une réponse de redirection et ainsi fournir au client l'adresse de serveur correcte, - entièrement qualifiée. C'est la méthode à privilégier car le + entièrement qualifiée. C'est la méthode à privilégier car le fichier des marque-pages de l'utilisateur contiendra alors des - noms de serveurs entièrement qualifiés.

    + noms de serveurs entièrement qualifiés.

    Ajustements relatifs au protocole -

    Pour les cas où mod_proxy envoie des requêtes - vers un serveur qui n'implémente pas correctement les connexions +

    Pour les cas où mod_proxy envoie des requêtes + vers un serveur qui n'implémente pas correctement les connexions persistantes ou le protocole HTTP/1.1, il existe deux variables - d'environnement qui permettent de forcer les requêtes à utiliser + d'environnement qui permettent de forcer les requêtes à utiliser le protocole HTTP/1.0 avec connexions non persistantes. Elles - peuvent être définies via la directive SetEnv.

    Il s'agit des variables force-proxy-request-1.0 et proxy-nokeepalive.

    - - <Location /serveur-non-conforme/>
    - - ProxyPass http://serveur-non-conforme:7001/foo/
    - SetEnv force-proxy-request-1.0 1
    - SetEnv proxy-nokeepalive 1
    -
    - </Location> -
    + +<Location "/buggyappserver/"> + ProxyPass "http://buggyappserver:7001/foo/" + SetEnv force-proxy-request-1.0 1 + SetEnv proxy-nokeepalive 1 +</Location> +
    -
    Corps de requêtes +
    Corps de requêtes -

    Certaines méthodes de requêtes comme POST comportent un corps de - requête. Le protocole HTTP stipule que les requêtes qui comportent +

    Certaines méthodes de requêtes comme POST comportent un corps de + requête. Le protocole HTTP stipule que les requêtes qui comportent un corps doivent soit utiliser un codage de transmission - fractionnée (chunked transfer encoding), soit envoyer un en-tête de requête + fractionnée (chunked transfer encoding), soit envoyer un en-tête de requête Content-Length. Lorsqu'il fait suivre ce genre de - requête vers le serveur demandé, mod_proxy_http - s'efforce toujours d'envoyer l'en-tête Content-Length. - Par contre, si la taille du corps est importante, et si la requête - originale utilise un codage à fractionnement, ce dernier peut aussi - être utilisé dans la requête montante. Ce comportement peut être - contrôlé à l'aide de variables - d'environnement. Ainsi, si elle est définie, la variable - proxy-sendcl assure une compatibilité maximale avec les - serveurs demandés en imposant l'envoi de l'en-tête + requête vers le serveur demandé, mod_proxy_http + s'efforce toujours d'envoyer l'en-tête Content-Length. + Par contre, si la taille du corps est importante, et si la requête + originale utilise un codage à fractionnement, ce dernier peut aussi + être utilisé dans la requête montante. Ce comportement peut être + contrôlé à l'aide de variables + d'environnement. Ainsi, si elle est définie, la variable + proxy-sendcl assure une compatibilité maximale avec les + serveurs demandés en imposant l'envoi de l'en-tête Content-Length, alors que proxy-sendchunked diminue la consommation de ressources - en imposant l'utilisation d'un codage à fractionnement.

    + en imposant l'utilisation d'un codage à fractionnement.

    Dans certaines circonstances, le serveur doit mettre en file - d'attente sur disque les corps de requêtes afin de satisfaire le - traitement demandé des corps de requêtes. Par exemple, cette mise en - file d'attente se produira si le corps original a été envoyé selon un - codage morcelé (et possède une taille importante), alors que - l'administrateur a demandé que les requêtes du serveur - d'arrière-plan soient envoyées avec l'en-tête Content-Length ou en + d'attente sur disque les corps de requêtes afin de satisfaire le + traitement demandé des corps de requêtes. Par exemple, cette mise en + file d'attente se produira si le corps original a été envoyé selon un + codage morcelé (et possède une taille importante), alors que + l'administrateur a demandé que les requêtes du serveur + d'arrière-plan soient envoyées avec l'en-tête Content-Length ou en HTTP/1.0. Cette mise en file d'attente se produira aussi si le corps - de la requête contient déjà un en-tête Content-Length, alors que le - serveur est configuré pour filtrer les corps des requêtes entrantes.

    + de la requête contient déjà un en-tête Content-Length, alors que le + serveur est configuré pour filtrer les corps des requêtes entrantes.

    La directive LimitRequestBody ne s'applique qu'aux - corps de requêtes que le serveur met en file d'attente sur disque.

    + corps de requêtes que le serveur met en file d'attente sur disque.

    -
    En-têtes de requête du mandataire + <section id="x-headers"><title>En-têtes de requête du mandataire inverse -

    Lorsqu'il est configuré en mode mandataire inverse (en utilisant +

    Lorsqu'il est configuré en mode mandataire inverse (en utilisant par exemple la directive ProxyPass), - mod_proxy_http ajoute plusieurs en-têtes de requête - afin de transmettre des informations au serveur demandé. Ces - en-têtes sont les suivants :

    + mod_proxy_http ajoute plusieurs en-têtes de requête + afin de transmettre des informations au serveur demandé. Ces + en-têtes sont les suivants :

    X-Forwarded-For
    L'adresse IP du client.
    X-Forwarded-Host
    -
    L'hôte d'origine demandé par le client dans l'en-tête de - requête HTTP Host.
    +
    L'hôte d'origine demandé par le client dans l'en-tête de + requête HTTP Host.
    X-Forwarded-Server
    -
    Le nom d'hôte du serveur mandataire.
    +
    Le nom d'hôte du serveur mandataire.
    -

    Ces en-têtes doivent être utilisés avec précautions sur le - serveur demandé, car ils contiendront plus d'une valeur (séparées - par des virgules) si la requête originale contenait déjà un de ces - en-têtes. Par exemple, vous pouvez utiliser - %{X-Forwarded-For}i dans la chaîne de format du journal - du serveur demandé pour enregistrer les adresses IP des clients +

    Ces en-têtes doivent être utilisés avec précautions sur le + serveur demandé, car ils contiendront plus d'une valeur (séparées + par des virgules) si la requête originale contenait déjà un de ces + en-têtes. Par exemple, vous pouvez utiliser + %{X-Forwarded-For}i dans la chaîne de format du journal + du serveur demandé pour enregistrer les adresses IP des clients originaux, mais il est possible que vous obteniez plusieurs adresses - si la requête passe à travers plusieurs mandataires.

    + si la requête passe à travers plusieurs mandataires.

    Voir aussi les directives ProxyPreserveHost et ProxyVia directives, qui permettent - de contrôler d'autres en-têtes de requête.

    + de contrôler d'autres en-têtes de requête.

    + +

    Note : Si vous devez ajouter des en-têtes particuliers à la + requête mandatée, utilisez la directive RequestHeader.

    Proxy -Conteneur de directives s'appliquant à des ressources -mandatées +Conteneur de directives s'appliquant à des ressources +mandatées <Proxy url-avec-jokers> ...</Proxy> server configvirtual host -

    Les directives situées dans une section Les directives situées dans une section Proxy ne s'appliquent qu'au contenu - mandaté concerné. Les jokers de style shell sont autorisés.

    + mandaté concerné. Les jokers de style shell sont autorisés.

    -

    Par exemple, les lignes suivantes n'autoriseront à accéder à un - contenu via votre serveur mandataire que les hôtes appartenant à +

    Par exemple, les lignes suivantes n'autoriseront à accéder à un + contenu via votre serveur mandataire que les hôtes appartenant à votre-reseau.example.com :

    - - <Proxy *>
    - - Require host votre-reseau.example.com
    -
    - </Proxy> -
    - -

    Dans l'exemple suivant, tous les fichiers du répertoire - foo de example.com seront traités par le - filtre INCLUDES lorsqu'ils seront envoyés par - l'intermédiaire du serveur mandataire :

    - - - <Proxy http://example.com/foo/*>
    - - SetOutputFilter INCLUDES
    -
    - </Proxy> -
    + +<Proxy "*"> + Require host votre-reseau.example.com +</Proxy> + + +

    Dans l'exemple suivant, tous les fichiers du répertoire + foo de example.com seront traités par le + filtre INCLUDES lorsqu'ils seront envoyés par + l'intermédiaire du serveur mandataire :

    + + +<Proxy "http://example.com/foo/*"> + SetOutputFilter INCLUDES +</Proxy> + + + Différences avec la section de configuration Location +

    Une URL d'arrière-plan sera concernée par le conteneur Proxy si + elle commence par la url-avec-jokers, même si le + dernier segment de chemin de la directive ne correspond qu'à un + préfixe de segment dee chemin de l'URL d'arrière-plan. Par exemple, <Proxy + "http://example.com/foo"> correspondra entre autres aux URLs + http://example.com/foo, http://example.com/foo/bar, et + http://example.com/foobar. La correspondance de l'URL finale + diffère du comportement de la section Location qui, pour le cas de cette note, + traitera le segment de chemin final comme s'il se terminait par un + slash.

    +

    Pour un contrôle plus fin de la correspondance des URL, voir la + directive ProxyMatch.

    +
    ProxyMatch @@ -532,86 +590,101 @@ mandatées ProxyBadHeader -Détermine la manière de traiter les lignes d'en-tête -incorrectes d'une réponse +Détermine la manière de traiter les lignes d'en-tête +incorrectes d'une réponse ProxyBadHeader IsError|Ignore|StartBody ProxyBadHeader IsError server configvirtual host -Disponible depuis la version 2.0.44 du serveur HTTP Apache

    La directive ProxyBadHeader permet de - déterminer le comportement de mod_proxy lorsqu'il - reçoit des lignes d'en-tête de réponse dont la syntaxe n'est pas valide (c'est - à dire ne contenant pas de caractère ':') en provenance du serveur + déterminer le comportement de mod_proxy lorsqu'il + reçoit des lignes d'en-tête de réponse dont la syntaxe n'est pas valide (c'est + à dire ne contenant pas de caractère ':') en provenance du serveur original. Les arguments disponibles sont :

    IsError
    -
    Annule la requête et renvoie une réponse de code 502 (mauvaise - passerelle). C'est le comportement par défaut.
    +
    Annule la requête et renvoie une réponse de code 502 (mauvaise + passerelle). C'est le comportement par défaut.
    Ignore
    -
    Traite les lignes d'en-tête incorrectes comme si elles n'avaient - pas été envoyées.
    +
    Traite les lignes d'en-tête incorrectes comme si elles n'avaient + pas été envoyées.
    StartBody
    -
    A la réception de la première ligne d'en-tête incorrecte, les - autres en-têtes sont lus et ce qui reste est traité en tant que - corps. Ceci facilite la prise en compte des serveurs d'arrière-plan - bogués qui oublient d'insérer une ligne vide entre les - en-têtes et le corps.
    +
    A la réception de la première ligne d'en-tête incorrecte, les + autres en-têtes sont lus et ce qui reste est traité en tant que + corps. Ceci facilite la prise en compte des serveurs d'arrière-plan + bogués qui oublient d'insérer une ligne vide entre les + en-têtes et le corps.
    ProxyMatch -Conteneur de directives s'appliquant à des ressources -mandatées correspondant à une expression rationnelle +Conteneur de directives s'appliquant à des ressources +mandatées correspondant à une expression rationnelle <ProxyMatch regex> ...</ProxyMatch> server configvirtual host

    La directive ProxyMatch est - identique à la directive Proxy, à l'exception qu'elle définit + identique à la directive Proxy, à l'exception qu'elle définit les URLs auxquelles elle s'applique en utilisant une expression rationnelle.

    + +

    A partir de la version 2.4.8, les groupes nommés et les + références arrières sont extraits et enregistrés dans + l'environnement avec leur nom en majuscules et préfixé par "MATCH_". Ceci permet + de référencer des URLs dans des expressions + ou au sein de modules comme mod_rewrite. Pour + éviter toute confusion, les références arrières numérotées (non + nommées) sont ignorées. Vous devez utiliser à la place des groupes + nommés.

    + + +<ProxyMatch "^http://(?<sitename>[^/]+)"> + Require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example +</ProxyMatch> +
    Proxy
    ProxyPreserveHost -Utilise l'en-tête de requête entrante Host pour la requête +Utilise l'en-tête de requête entrante Host pour la requête du mandataire ProxyPreserveHost On|Off ProxyPreserveHost Off server configvirtual host directory -Disponible depuis la version 2.0.31 du serveur HTTP Apache. Utilisable -dans un contexte de répertoire depuis la version 2.3.3. +Utilisable +dans un contexte de répertoire depuis la version 2.3.3. -

    Lorsqu'elle est activée, cette directive va transmettre l'en-tête - Host: de la requête entrante vers le serveur mandaté, au lieu du nom - d'hôte spécifié par la directive ProxyPass.

    - -

    Cette directive est habituellement définie à Off. - Elle est principalement utile dans les configurations particulières - comme l'hébergement virtuel mandaté en masse à base de nom, où - l'en-tête Host d'origine doit être évalué par le serveur - d'arrière-plan.

    +

    Lorsqu'elle est activée, cette directive va transmettre l'en-tête + Host: de la requête entrante vers le serveur mandaté, au lieu du nom + d'hôte spécifié par la directive ProxyPass.

    + +

    Cette directive est habituellement définie à Off. + Elle est principalement utile dans les configurations particulières + comme l'hébergement virtuel mandaté en masse à base de nom, où + l'en-tête Host d'origine doit être évalué par le serveur + d'arrière-plan.

    ProxyRequests -Active la fonctionnalité (standard) de mandataire +Active la fonctionnalité (standard) de mandataire direct ProxyRequests On|Off ProxyRequests Off @@ -619,26 +692,29 @@ direct -

    Cette directive permet d'activer/désactiver la fonctionnalité de - serveur mandataire direct d'Apache httpd. Définir ProxyRequests à +

    Cette directive permet d'activer/désactiver la fonctionnalité de + serveur mandataire direct d'Apache httpd. Définir ProxyRequests à Off n'interdit pas l'utilisation de la directive ProxyPass.

    Pour une configuration typique de mandataire inverse ou - passerelle, cette directive doit être définie à + passerelle, cette directive doit être définie à Off.

    -

    Afin d'activer la fonctionnalité de mandataire pour des sites +

    Afin d'activer la fonctionnalité de mandataire pour des sites HTTP et/ou FTP, les modules mod_proxy_http et/ou - mod_proxy_ftp doivent également être chargés dans le + mod_proxy_ftp doivent également être chargés dans le serveur.

    +

    Pour activer la fonctionnalité de mandataire sur les sites chiffrés en HTTPS, le module + mod_proxy_connect doit également être chargé dans le serveur.

    + Avertissement -

    N'activez pas la fonctionnalité de mandataire avec la directive +

    N'activez pas la fonctionnalité de mandataire avec la directive ProxyRequests avant - d'avoir sécurisé votre serveur. Les serveurs + d'avoir sécurisé votre serveur. Les serveurs mandataires ouverts sont dangereux non seulement pour votre - réseau, mais aussi pour l'Internet au sens large.

    + réseau, mais aussi pour l'Internet au sens large.

    Mandataires/Passerelles directs et @@ -647,19 +723,19 @@ inverses ProxyRemote -Mandataire distant à utiliser pour traiter certaines -requêtes +Mandataire distant à utiliser pour traiter certaines +requêtes ProxyRemote comparaison serveur-distant server configvirtual host -

    Cette directive permet de définir des mandataires distants pour +

    Cette directive permet de définir des mandataires distants pour ce mandataire. comparaison est soit le nom d'un protocole que supporte le serveur distant, soit une URL partielle pour - laquelle le serveur distant devra être utilisé, soit * - pour indiquer que le serveur distant doit être utilisé pour toutes - les requêtes. serveur-distant est une URL partielle + laquelle le serveur distant devra être utilisé, soit * + pour indiquer que le serveur distant doit être utilisé pour toutes + les requêtes. serveur-distant est une URL partielle correspondant au serveur distant. Syntaxe :

    @@ -667,146 +743,216 @@ requêtes protocole://nom-serveur[:port] -

    protocole est effectivement le protocole à utiliser +

    protocole est effectivement le protocole à utiliser pour communiquer avec le serveur distant ; ce module ne supporte que http et https. Lorsqu'on utilise - https, les requêtes sont redirigées par le mandataire - distant en utilisant la méthode HTTP CONNECT.

    + https, les requêtes sont redirigées par le mandataire + distant en utilisant la méthode HTTP CONNECT.

    Exemple - ProxyRemote http://bons-gars.example.com/ http://gars-mirroirs.example.com:8000
    - ProxyRemote * http://mandataire-intelligent.localdomain
    - ProxyRemote ftp http://mandataire-ftp.mon-domaine:8080 + +ProxyRemote "http://goodguys.example.com/" +"http://mirrorguys.example.com:8000" +ProxyRemote "*" "http://cleverproxy.localdomain" +ProxyRemote "ftp" "http://ftpproxy.mydomain:8080" +
    -

    Dans la dernière ligne de l'exemple, le mandataire va faire - suivre les requêtes FTP, encapsulées dans une autre requête mandatée +

    Dans la dernière ligne de l'exemple, le mandataire va faire + suivre les requêtes FTP, encapsulées dans une autre requête mandatée HTTP, vers un autre mandataire capable de les traiter.

    Cette directive supporte aussi les configurations de mandataire - inverse - un serveur web d'arrière-plan peut être intégré dans - l'espace d'URL d'un serveur virtuel, même si ce serveur est caché + inverse ; un serveur web d'arrière-plan peut être intégré dans + l'espace d'URL d'un serveur virtuel, même si ce serveur est caché par un autre mandataire direct.

    ProxyRemoteMatch -Le mandataire distant à utiliser pour traiter les requêtes -correspondant à une expression rationnelle +Le mandataire distant à utiliser pour traiter les requêtes +correspondant à une expression rationnelle ProxyRemoteMatch regex serveur-distant server configvirtual host

    La directive ProxyRemoteMatch est - identique à la directive ProxyRemote, à l'exception du + identique à la directive ProxyRemote, à l'exception du premier argument qui est une expression - rationnelle à mettre en correspondance avec l'URL de la - requête.

    + rationnelle à mettre en correspondance avec l'URL de la + requête.

    BalancerGrowth -Nombre de membres supplémentaires pouvant être ajoutés -après la configuration initiale +Nombre de membres supplémentaires pouvant être ajoutés +après la configuration initiale BalancerGrowth # BalancerGrowth 5 server configvirtual host BalancerGrowth est disponible depuis la version 2.3.13 du serveur HTTP Apache -

    Cette directive permet de définir le nombre de membres pouvant - être ajoutés au groupe de répartition de charge préconfiguré d'un - serveur virtuel. Elle n'est active que si le groupe a été - préconfiguré avec un membre au minimum.

    +

    Cette directive permet de définir le nombre de membres pouvant + être ajoutés au groupe de répartition de charge préconfiguré d'un + serveur virtuel. Elle n'est active que si le groupe a été + préconfiguré avec un membre au minimum.

    + +BalancerPersist + Tente de conserver les changements effectués par le + gestionnaire de répartition de charge après un redémarrage du + serveur. + BalancerPersist On|Off + BalancerPersist Off + server configvirtual host + BalancerPersist n'est disponible qu'à partir de la + version 2.4.4 du serveur HTTP Apache. + +

    Cette directive permet de conserver le contenu de l'espace + mémoire partagé associé aux répartiteurs de charge et à leurs + membres après un redémarrage du serveur. Ces modifications + locales ne sont ainsi pas perdues lors des transitions d'état + dues à un redémarrage.

    +
    +
    + + +ProxyPassInherit + Héritage des directives ProxyPass définies au niveau du +serveur principal + ProxyPassInherit On|Off + ProxyPassInherit On + server configvirtual host + Disponible à partir de la version 2.4.5 du serveur +HTTP Apache. + +

    Cette directive permet à un serveur virtuel d'hériter des + directives ProxyPass définies + au niveau du serveur principal. Si vous utilisez la fonctionnalité de + modifications dynamiques du Balancer Manager, cette directive peut + causer des problèmes et des comportements inattendus et doit donc + être désactivée.

    +

    Les valeurs définies au niveau du serveur principal + constituent les valeurs par défaut pour tous les serveurs virtuels.

    +

    La désactivation de ProxyPassInherit désactive aussi la + directive BalancerInherit.

    +
    +
    + + + BalancerInherit + Héritage des membres du groupes de répartition de + charge du mandataire définis au niveau du serveur principal + BalancerInherit On|Off + BalancerInherit On + server configvirtual host + Disponible à partir de la version 2.4.5 du serveur + HTTP Apache. + +

    Cette directive permet d'attribuer au serveur virtuel courant + l'héritage des membres de groupes de répartition de charge + définis au niveau du serveur + principal. Elle ne doit pas être activée si vous + utilisez la fonctionnalité de modifications dynamiques du + gestionnaire de répartition de charge (Balancer Manager) pour + éviter des problèmes et des comportements inattendus.

    +

    Les définitions au niveau du serveur principal constituent + les définitions par défaut au niveau des serveurs virtuels.

    + +
    +
    + BalancerMember -Ajoute un membre à un groupe de répartition de +Ajoute un membre à un groupe de répartition de charge BalancerMember [balancerurl] url [clé=valeur [clé=valeur ...]] + >clé=valeur [clé=valeur ...]] directory Disponible depuis la version 2.2 du serveur HTTP Apache. -

    Cette directive parmet d'ajouter un membre à un groupe de - répartition de charge. Elle peut se trouver dans un conteneur +

    Cette directive permet d'ajouter un membre à un groupe de + répartition de charge. Elle peut se trouver dans un conteneur <Proxy balancer://...>, et accepte - tous les paramètres de paires clé/valeur que supporte la directive + tous les paramètres de paires clé/valeur que supporte la directive ProxyPass.

    -

    La directive BalancerMember accepte un paramètre - supplémentaire : loadfactor. Il s'agit du facteur de - charge du membre - un nombre entre 1 (valeur par défaut) et 100, qui - définit la charge à appliquer au membre en question.

    -

    L'argument balancerurl n'est requis que s'il ne se trouve pas - dèjà dans la directive de conteneur <Proxy - balancer://...>. Il correspond à l'URL d'un - répartiteur de charge défini par une directive La directive BalancerMember accepte un paramètre + supplémentaire : loadfactor. Il s'agit du facteur de + charge du membre - un nombre entre 1 (valeur par défaut) et 100, qui + définit la charge à appliquer au membre en question.

    +

    L'argument balancerurl n'est requis que s'il ne se trouve pas + dèjà dans la directive de conteneur <Proxy + balancer://...>. Il correspond à l'URL d'un + répartiteur de charge défini par une directive ProxyPass.

    +

    La partie chemin de l'URL du répartiteur dans toute directive de + conteneur <Proxy balancer://...> est + ignorée.

    +

    En particulier, le slash de fin de l'URL d'un + BalancerMember doit être supprimé.

    ProxySet -Définit différents paramètres relatifs à la répartition de -charge des mandataires et aux membres des groupes de répartition de +Définit différents paramètres relatifs à la répartition de +charge des mandataires et aux membres des groupes de répartition de charge -ProxySet url clé=valeur [clé=valeur ...] +ProxySet url clé=valeur [clé=valeur ...] directory ProxySet n'est disponible que depuis la version 2.2 du serveur HTTP Apache. -

    Cette directive propose une méthode alternative pour définir tout - paramètre relatif aux répartiteurs de charge et serveurs cibles de - mandataires normalement définis via la directive Cette directive propose une méthode alternative pour définir tout + paramètre relatif aux répartiteurs de charge et serveurs cibles de + mandataires normalement définis via la directive ProxyPass. Si elle se trouve dans un - conteneur <Proxy url de répartiteur|url de + conteneur <Proxy url de répartiteur|url de serveur cible>, l'argument url n'est pas - nécessaire. Comme effet de bord, le répartiteur ou serveur cible respectif - est créé. Ceci peut s'avérer utile pour la mise en oeuvre d'un + nécessaire. Comme effet de bord, le répartiteur ou serveur cible respectif + est créé. Ceci peut s'avérer utile pour la mise en oeuvre d'un mandataire inverse via une directive RewriteRule au lieu de ProxyPass.

    - <Proxy balancer://hotcluster>
    - - BalancerMember http://www2.example.com:8080 loadfactor=1
    - BalancerMember http://www3.example.com:8080 loadfactor=2
    - ProxySet lbmethod=bytraffic
    -
    - </Proxy> + +<Proxy "balancer://hotcluster"> + BalancerMember "http://www2.example.com:8080" loadfactor=1 + BalancerMember "http://www3.example.com:8080" loadfactor=2 + ProxySet lbmethod=bytraffic +</Proxy> +
    - - <Proxy http://backend>
    - - ProxySet keepalive=On
    -
    - </Proxy> -
    + +<Proxy "http://backend"> + ProxySet keepalive=On +</Proxy> + - - ProxySet balancer://foo lbmethod=bytraffic timeout=15 - + + ProxySet "balancer://foo" lbmethod=bytraffic timeout=15 + - - ProxySet ajp://backend:7001 timeout=15 - + + ProxySet "ajp://backend:7001" timeout=15 + Avertissement -

    Gardez à l'esprit qu'une même clé de paramètre peut avoir - différentes significations selon qu'elle s'applique à un - répartiteur ou à un serveur cible, et ceci est illustré par les deux - exemples précédents où il est question d'un timeout.

    +

    Gardez à l'esprit qu'une même clé de paramètre peut avoir + différentes significations selon qu'elle s'applique à un + répartiteur ou à un serveur cible, et ceci est illustré par les deux + exemples précédents où il est question d'un timeout.

    @@ -814,507 +960,606 @@ du serveur HTTP Apache. ProxyPass -Référencer des serveurs distants depuis +Référencer des serveurs distants depuis l'espace d'URLs du serveur local -ProxyPass [chemin] !|url [clé=valeur - [clé=valeur ...]] [nocanon] [interpolate] +ProxyPass [chemin] !|url [clé=valeur + [clé=valeur ...]] [nocanon] [interpolate] [noquery] server configvirtual host directory +Les sockets de style Unix (Unix Domain Socket - UDS) +sont supportés à partir de la version 2.4.7 du serveur HTTP Apache + -

    Cette directive permet de référencer des serveurs distants depuis - l'espace d'URLs du serveur local ; le serveur +

    Cette directive permet de référencer des serveurs distants depuis + l'espace d'URLs du serveur local. Le serveur local n'agit pas en tant que mandataire au sens conventionnel, mais - plutôt comme miroir du serveur distant. Le serveur local est - souvent nommé mandataire inverse ou + plutôt comme miroir du serveur distant. Le serveur local est + souvent nommé mandataire inverse ou passerelle. L'argument chemin est le nom d'un chemin virtuel local ; url est une URL partielle pour le - serveur distant et ne doit pas contenir de chaîne d'arguments.

    + serveur distant et ne doit pas contenir de chaîne d'arguments.

    + + Note : Cette directive n'est pas supportée au sein + des sections Directory + et Files. - En général, la directive ProxyRequests doit être définie à + En général, la directive ProxyRequests doit être définie à off lorsqu'on utilise la directive ProxyPass. +

    Les sockets de style Unix sont supportés à partir de la version + 2.4.7 du serveur HTTP Apache ; pour utiliser cette fonctionnalité, + il suffit d'utiliser une URL cible préfixée par + unix:/path/lis.sock|. Par exemple, pour mandater HTTP + et cibler l'UDS /home/www/socket, vous devez utiliser + unix:/home/www.socket|http://localhost/whatever/.

    + + Note :Le chemin associé à l'URL + unix: tient compte de la directive + DefaultRuntimeDir. + +

    Lorsque cette directive est utilisée dans une section Location, le premier + argument est omis et le répertoire local est obtenu à partir de + l'argument de la directive Location. Il en est de même à l'intérieur + d'une section LocationMatch, mais le résultat ne sera + probablement pas celui attendu car ProxyPassReverse va interpréter + l'expression rationnelle littéralement comme un chemin ; si besoin + est dans ce cas, définissez la directive ProxyPassReverse en dehors + de la section, ou dans une section Location séparée.

    +

    Supposons que le serveur local a pour adresse http://example.com/ ; alors la ligne

    - - <Location /miroir/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    -
    + +<Location "/mirror/foo/"> + ProxyPass "http://backend.example.com/" +</Location> + -

    va convertir en interne toute requête pour - http://example.com/miroir/foo/bar en une requête - mandatée pour http://backend.example.com/bar.

    +

    va convertir en interne toute requête pour + http://example.com/miroir/foo/bar en une requête + mandatée pour http://backend.example.com/bar.

    + +

    Si vous avez besoin d'un configuration de mandataire inverse plus + souple, reportez-vous à la documentaion de la directive RewriteRule et son drapeau + [P].

    -

    La syntaxe alternative suivante est valide, bien qu'elle induise - une dégradation des performances lorsqu'elle est présente en grand - nombre :

    +

    La syntaxe alternative suivante est valide, bien qu'elle puisse + induire une dégradation des performances lorsqu'elle est + présente en très grand nombre. Elle possède l'avantage de + permettre un contrôle dynamique via l'interface Balancer Manager :

    - - ProxyPass /miroir/foo/ http://backend.example.com/ - + + ProxyPass "/miroir/foo/" "http://backend.example.com/" +

    Si le premier argument se termine par un slash - /, il doit en être de même pour le second argument + /, il doit en être de même pour le second argument et vice versa. Dans le cas contraire, il risque de manquer des - slashes nécessaires dans la requête résultante vers le serveur - d'arrière-plan et les résulats ne seront pas ceux attendus. + slashes nécessaires dans la requête résultante vers le serveur + d'arrière-plan et les résulats ne seront pas ceux attendus.

    -

    Le drapeau ! permet de soustraire un sous-répertoire +

    Le drapeau ! permet de soustraire un sous-répertoire du mandat inverse, comme dans l'exemple suivant :

    - - <Location /miroir/foo/>
    - - ProxyPass http://backend.example.com/
    -
    - </Location>
    - <Location /miroir/foo/i>
    - - ProxyPass !
    -
    - </Location>
    -
    - - - ProxyPass /miroir/foo/i !
    - ProxyPass /miroir/foo http://backend.example.com -
    - -

    va mandater toutes les requêtes pour /miroir/foo - vers backend.example.com, sauf les requêtes + +<Location "/mirror/foo/"> + ProxyPass "http://backend.example.com/" +</Location> +<Location "/mirror/foo/i"> + ProxyPass "!" +</Location> + + + +ProxyPass "/mirror/foo/i" "!" +ProxyPass "/mirror/foo" "http://backend.example.com" + + +

    va mandater toutes les requêtes pour /miroir/foo + vers backend.example.com, sauf les requêtes pour /miroir/foo/i.

    Ordre de classement des directives ProxyPass

    Les directives ProxyPass et ProxyPassMatch sont évaluées dans + module="mod_proxy">ProxyPassMatch sont évaluées dans l'ordre de leur apparition dans le fichier de configuration. La - première règle qui correspond s'applique. Vous devez donc en - général classer les règles ProxyPass qui entrent en conflit de - l'URL la plus longue à la plus courte. Dans le cas contraire, les - règles situées après une règle dont l'URL correspond au début de - leur propre URL seront ignorées. Notez que tout ceci est en + l'URL la plus longue à la plus courte. Dans le cas contraire, les + règles situées après une règle dont l'URL correspond au début de + leur propre URL seront ignorées. Notez que tout ceci est en relation avec le partage de workers. Par contre, on ne peut placer qu'une seule directive ProxyPass dans une section Location, et c'est la section - la plus spécifique qui l'emportera.

    + la plus spécifique qui l'emportera.

    -

    Pour les mêmes raisons, les exclusions doivent se situer +

    Pour les mêmes raisons, les exclusions doivent se situer avant les directives ProxyPass - générales.

    + générales.

    +

    ProxyPass clé=valeur Paramètres

    +

    Depuis la version 2.1 du serveur HTTP Apache, mod_proxy supporte - les groupements de connexions vers un serveur d'arrière-plan. Les - connexions créées à la demande peuvent être enregistrées dans un - groupement pour une utilisation ultérieure. La taille du groupe - ainsi que d'autres caractéristiques peuvent être définies via la - directive ProxyPass au moyen de paramètres - clé=valeur dont la description fait l'objet du tableau - ci-dessous.

    - -

    Par défaut, mod_proxy permet et met en réserve le nombre maximum - de connexions pouvant être utilisées simultanément par le processus - enfant concerné du serveur web. Le paramètre max permet - de réduire cette valeur par défaut. Le paramètre ttl, - quant à lui, permet de définir une durée de vie optionnelle ; les - connexions qui n'ont pas été utilisées pendant au moins - ttl secondes seront fermées. ttl permet - aussi d'empêcher l'utilisation d'une connexion susceptible d'être - fermée suite à une fin de vie de connexion persistante sur le - serveur d'arrière-plan.

    + les groupements de connexions vers un serveur d'arrière-plan. Les + connexions créées à la demande peuvent être enregistrées dans un + groupement pour une utilisation ultérieure. La taille du groupe + ainsi que d'autres caractéristiques peuvent être définies via la + directive ProxyPass au moyen de paramètres + clé=valeur dont la description fait l'objet des + tableaux ci-dessous.

    + +

    Par défaut, mod_proxy permet et met en réserve le nombre maximum + de connexions pouvant être utilisées simultanément par le processus + enfant concerné du serveur web. Le paramètre max permet + de réduire cette valeur par défaut. Le paramètre ttl, + quant à lui, permet de définir une durée de vie optionnelle ; les + connexions qui n'ont pas été utilisées pendant au moins + ttl secondes seront fermées. ttl permet + aussi d'empêcher l'utilisation d'une connexion susceptible d'être + fermée suite à une fin de vie de connexion persistante sur le + serveur d'arrière-plan.

    Le groupement de connexions est maintenu au niveau de chaque processus enfant du serveur web, et max, ainsi que les - autres paramètres, ne font - l'objet d'aucune coordination entre les différents processus - enfants, sauf si un seul processus enfant est autorisé par la + autres paramètres, ne font + l'objet d'aucune coordination entre les différents processus + enfants, sauf si un seul processus enfant est autorisé par la configuration ou la conception du module multi-processus (MPM).

    Exemple - ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 + + ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300 + -
    Paramètres de BalancerMember
    +
    Paramètres de BalancerMember
    - - + + - + - - + - - - + + + - - - - - - - - - - - - + + +
    ParamètreDéfaut
    ParamètreDéfaut Description
    min 0Nombre minimum d'entrées dans le pool de connexions, - distinct du nombre de connexions effectif. La valeur par défaut - ne doit être modifiée que dans des circonstances particulières - où la mémoire associée aux connexions avec le serveur - d'arrière-plan doit être préallouée ou réservée dans le tas.
    Nombre minimum d'entrées dans le pool de connexions, + distinct du nombre de connexions effectif. La valeur par défaut + ne doit être modifiée que dans des circonstances particulières + où la mémoire associée aux connexions avec le serveur + d'arrière-plan doit être préallouée ou réservée dans le tas.
    max 1...nNombre maximum de connexions autorisées vers le serveur - d'arrière-plan. La valeur par défaut correspond au nombre de + Nombre maximum de connexions autorisées vers le serveur + d'arrière-plan. La valeur par défaut correspond au nombre de threads par processus pour le MPM (Module Multi Processus) actif. La valeur sera toujours 1 pour le MPM Prefork, alors - qu'elle dépendra de la définition de la directive + qu'elle dépendra de la définition de la directive ThreadsPerChild pour les autres MPMs.
    smax maxLes entrées du pool de connexions conservées au delà de - cette limite sont libérées au cours de certaines opérations si - elles n'ont pas été utilisées au cours de leur durée de vie, - définie par le paramètre ttl. Si l'entrée du pool - de connexions est associée à une connexion, cette dernière sera - fermée. La valeur par défaut ne doit être modifiée que dans des - circonstances particulières où les entrées du pool de connexions - et toutes connexions associées qui ont dépassé leur durée de vie - doivent être libérées ou fermées de manière plus autoritaire.
    Les entrées du pool de connexions conservées au delà de + cette limite sont libérées au cours de certaines opérations si + elles n'ont pas été utilisées au cours de leur durée de vie, + définie par le paramètre ttl. Si l'entrée du pool + de connexions est associée à une connexion, cette dernière sera + fermée. La valeur par défaut ne doit être modifiée que dans des + circonstances particulières où les entrées du pool de connexions + et toutes connexions associées qui ont dépassé leur durée de vie + doivent être libérées ou fermées de manière plus autoritaire.
    acquire -Cette clé permet de définir le délai maximum d'attente pour + Cette clé permet de définir le délai maximum d'attente pour une connexion libre dans le jeu de connexions, en millisecondes. S'il n'y a pas de connexion libre dans le jeu, Apache httpd renverra - l'état SERVER_BUSY au client. + l'état SERVER_BUSY au client.
    connectiontimeout timeoutDélai d'attente d'une connexion en secondes. - La durée en secondes pendant laquelle Apache httpd va attendre pour - l'établissement d'une connexion vers le serveur d'arrière-plan. - Le délai peut être spécifié en millisecondes en ajoutant le + Délai d'attente d'une connexion en secondes. + La durée en secondes pendant laquelle Apache httpd va attendre pour + l'établissement d'une connexion vers le serveur d'arrière-plan. + Le délai peut être spécifié en millisecondes en ajoutant le suffixe ms.
    disablereuse OffVous pouvez utiliser cette clé pour forcer mod_proxy à - fermer immédiatement une connexion vers le serveur - d'arrière-plan après utilisation, et ainsi désactiver le jeu de - connexions permanentes vers ce serveur. Ceci peut s'avérer utile - dans des situations où un pare-feu situé entre Apache httpd et le - serveur d'arrière-plan (quelque soit le protocole) interrompt - des connexions de manière silencieuse, ou lorsque le serveur - d'arrière-plan lui-même est accessible par rotation de DNS - (round-robin DNS). Pour désactiver la réutilisation du jeu de - connexions, définissez cette clé à On. + Vous pouvez utiliser cette clé pour forcer mod_proxy à + fermer immédiatement une connexion vers le serveur + d'arrière-plan après utilisation, et ainsi désactiver le jeu de + connexions permanentes vers ce serveur. Ceci peut s'avérer utile + dans des situations où un pare-feu situé entre Apache httpd et le + serveur d'arrière-plan (quelque soit le protocole) interrompt + des connexions de manière silencieuse, ou lorsque le serveur + d'arrière-plan lui-même est accessible par rotation de DNS + (round-robin DNS). Pour désactiver la réutilisation du jeu de + connexions, définissez cette clé à On. +
    enablereuseOnCe paramètre est utilisé par les gestionnaires de protocole pour + lesquels la réutilisation des connexions est optionnelle (comme + mod_proxy_fcgi). C'est le contraire du + paramètre 'disablereuse' ci-dessus, et il est supporté par les + versions 2.4.11 et supérieures du serveur HTTP Apache.
    flushpackets offPermet de définir si le module mandataire doit vider - automatiquement le tampon de sortie après chaque tronçon de - données. 'off' signifie que le tampon sera vidé si nécessaire, - 'on' que le tampon sera vidé après chaque envoi d'un - tronçon de données, et 'auto' que le tampon sera vidé après un - délai de 'flushwait' millisecondes si aucune entrée n'est reçue. - Actuellement, cette clé n'est supportée que par AJP. + Permet de définir si le module mandataire doit vider + automatiquement le tampon de sortie après chaque tronçon de + données. 'off' signifie que le tampon sera vidé si + nécessaire ; + 'on' signifie que le tampon sera vidé après chaque envoi d'un + tronçon de données, et 'auto' que le tampon sera vidé après un + délai de 'flushwait' millisecondes si aucune entrée n'est reçue. + Actuellement, cette clé n'est supportée que par AJP.
    flushwait 10Le délai d'attente pour une entrée additionnelle, en + Le délai d'attente pour une entrée additionnelle, en millisecondes, avant le vidage du tampon en sortie dans le cas - où 'flushpackets' est à 'auto'. + où 'flushpackets' est à 'auto'.
    iobuffersize 8192Permet de définir la taille du tampon d'entrées/sorties du - bloc-notes interne. Cette clé vous permet d'outrepasser la + Permet de définir la taille du tampon d'entrées/sorties du + bloc-notes interne. Cette clé vous permet d'outrepasser la directive ProxyIOBufferSize pour un - serveur cible spécifique. La valeur doit être au minimum 512 ou définie - à 0 pour la valeur par défaut du système de 8192. + serveur cible spécifique. La valeur doit être au minimum 512 ou définie + à 0 pour la valeur par défaut du système de 8192.
    keepalive Off

    Cette clé doit être utilisée lorsque vous avez un pare-feu - entre Apache httpd et le serveur d'arrière-plan, et si ce dernier tend - à interrompre les connexions inactives. Cette clé va faire en - sorte que le système d'exploitation envoie des messages +

    Cette clé doit être utilisée lorsque vous avez un pare-feu + entre Apache httpd et le serveur d'arrière-plan, et si ce dernier tend + à interrompre les connexions inactives. Cette clé va faire en + sorte que le système d'exploitation envoie des messages KEEP_ALIVE sur chacune des connexions inactives et - ainsi éviter la fermeture de la connexion par le pare-feu. + ainsi éviter la fermeture de la connexion par le pare-feu. Pour conserver les connexions persistantes, definissez cette - propriété à On.

    -

    La fréquence de vérification des connexions TCP persistantes - initiale et subséquentes dépend de la configuration globale de l'OS, - et peut atteindre 2 heures. Pour être utile, la fréquence configurée - dans l'OS doit être inférieure au seuil utilisé par le pare-feu.

    + propriété à On.

    +

    La fréquence de vérification des connexions TCP persistantes + initiale et subséquentes dépend de la configuration globale de l'OS, + et peut atteindre 2 heures. Pour être utile, la fréquence configurée + dans l'OS doit être inférieure au seuil utilisé par le pare-feu.

    lbset 0Définit le groupe de répartition de charge dont le serveur cible - est membre. Le répartiteur de charge va essayer tous les membres - d'un groupe de répartition de charge de numéro inférieur avant - d'essayer ceux dont le groupe possède un numéro supérieur. + Définit le groupe de répartition de charge dont le serveur cible + est membre. Le répartiteur de charge va essayer tous les membres + d'un groupe de répartition de charge de numéro inférieur avant + d'essayer ceux dont le groupe possède un numéro supérieur.
    ping 0Avec la clé Ping, le serveur web va "tester" la connexion - vers le serveur d'arrière-plan avant de transmettre la requête. - Avec AJP, mod_proxy_ajp envoie une requête - CPING sur la connexion ajp13 (implémenté sur Tomcat + Avec la clé Ping, le serveur web va "tester" la connexion + vers le serveur d'arrière-plan avant de transmettre la requête. + Avec AJP, mod_proxy_ajp envoie une requête + CPING sur la connexion ajp13 (implémenté sur Tomcat 3.3.2+, 4.1.28+ et 5.0.13+). Avec HTTP, mod_proxy_http envoie 100-Continue - au serveur d'arrière-plan (seulement avecHTTP/1.1 - pour les - serveurs d'arrière-plan non HTTP/1.1, cette clé ne produit - aucun effet). Dans les deux cas, ce paramètre correspond au - délai en secondes pour l'attente de la réponse. Cette - fonctionnalité a été ajoutée pour éviter les problèmes avec les - serveurs d'arrière-plan bloqués ou surchargés. - + au serveur d'arrière-plan (seulement avecHTTP/1.1 - pour les + serveurs d'arrière-plan non HTTP/1.1, cette clé ne produit + aucun effet). Dans les deux cas, ce paramètre correspond au + délai en secondes pour l'attente de la réponse. Cette + fonctionnalité a été ajoutée pour éviter les problèmes avec les + serveurs d'arrière-plan bloqués ou surchargés. + Le trafic - réseau peut s'en trouver augmenté en fonctionnement normal, ce - qui peut poser problème, mais peut s'en trouver diminué dans les - cas où les noeuds de cluster sont arrêtés ou - surchargés. Le délai peut - aussi être défini en millisecondes en ajoutant le suffixe + réseau peut s'en trouver augmenté en fonctionnement normal, ce + qui peut poser problème, mais peut s'en trouver diminué dans les + cas où les noeuds de cluster sont arrêtés ou + surchargés. Le délai peut + aussi être défini en millisecondes en ajoutant le suffixe ms.
    receivebuffersize 0Définit la taille du tampon réseau explicite (TCP/IP) pour - les connexions mandatées. Cette clé vous permet d'outrepasser la + Définit la taille du tampon réseau explicite (TCP/IP) pour + les connexions mandatées. Cette clé vous permet d'outrepasser la directive ProxyReceiveBufferSize pour un - serveur cible spécifique. Sa valeur doit être au minimum 512 ou définie - à 0 pour la valeur par défaut du système. + serveur cible spécifique. Sa valeur doit être au minimum 512 ou définie + à 0 pour la valeur par défaut du système.
    redirect - Route pour la redirection du serveur cible. Cette valeur est en - général définie dynamiquement pour permettre une suppression - sécurisée du noeud du cluster. Si cette clé est définie, toutes - les requêtes sans identifiant de session seront redirigées vers - le membre de groupe de répartition de charge dont la route - correspond à la valeur de la clé. + général définie dynamiquement pour permettre une suppression + sécurisée du noeud du cluster. Si cette clé est définie, toutes + les requêtes sans identifiant de session seront redirigées vers + le membre de groupe de répartition de charge dont la route + correspond à la valeur de la clé.
    retry 60Délai entre deux essais du serveur cible du jeu de connexions en + Délai entre deux essais du serveur cible du jeu de connexions en secondes. Si le serveur cible du jeu de connexions vers le serveur - d'arrière-plan est dans un état d'erreur, Apache httpd ne redirigera - pas de requête vers ce serveur avant l'expiration du délai - spécifié. Ceci permet d'arrêter le serveur d'arrière-plan pour + d'arrière-plan est dans un état d'erreur, Apache httpd ne redirigera + pas de requête vers ce serveur avant l'expiration du délai + spécifié. Ceci permet d'arrêter le serveur d'arrière-plan pour maintenance, et de le remettre en ligne plus tard. Une valeur de - 0 implique de toujours essayer les serveurs cibles dans un état d'erreur - sans délai. + 0 implique de toujours essayer les serveurs cibles dans un état d'erreur + sans délai.
    route -La route du serveur cible lorsqu'il est utilisé au sein d'un - répartiteur de charge. La route est une valeur ajoutée à + La route du serveur cible lorsqu'il est utilisé au sein d'un + répartiteur de charge. La route est une valeur ajoutée à l'identifiant de session.
    status -Valeur constituée d'une simple lettre et définissant l'état + Valeur constituée d'une simple lettre et définissant l'état initial de ce serveur cible. - - - + + + + utilisé que si aucun autre serveur n'est disponible. + toutes les autres requêtes.
    D: le serveur cible est désactivé et n'accepte aucune requête.
    S: le serveur cible est arrêté.
    I: le serveur cible est en mode "erreurs ignorées", - et sera toujours considéré comme disponible.
    D: le serveur cible est désactivé et n'accepte aucune requête.
    S: le serveur cible est arrêté.
    I: le serveur cible est en mode "erreurs ignorées", + et sera toujours considéré comme disponible.
    H: le serveur cible est en mode d'attente et ne sera - utilisé que si aucun autre serveur n'est disponible.
    E: le serveur cible est en erreur.
    N: le serveur cible est en mode vidage, n'acceptera que les sessions persistantes qui lui appartiennent, et refusera - toutes les autres requêtes.
    - Une valeur d'état peut être définie (ce qui - correspond au comportement par défaut) en préfixant la valeur - par '+', ou annulée en préfixant la valeur par '-'. Ainsi, la - valeur 'S-E' définit l'état de ce serveur cible à "arrêté" et supprime + Une valeur d'état peut être définie (ce qui + correspond au comportement par défaut) en préfixant la valeur + par '+', ou annulée en préfixant la valeur par '-'. Ainsi, la + valeur 'S-E' définit l'état de ce serveur cible à "arrêté" et supprime le drapeau "en-erreur".
    timeout ProxyTimeoutDélai d'attente de la connexion en secondes. Le nombre de + Délai d'attente de la connexion en secondes. Le nombre de secondes pendant lesquelles Apache httpd attend l'envoi de - données vers le serveur d'arrière-plan. + données vers le serveur d'arrière-plan.
    ttl -Durée de vie des connexions inactives et des entrées du pool - de connexions associées en secondes. Une fois cette - limite atteinte, une connexion ne sera pas réutilisée ; elle - sera fermée après un délai variable. + Durée de vie des connexions inactives et des entrées du pool + de connexions associées en secondes. Une fois cette + limite atteinte, une connexion ne sera pas réutilisée ; elle + sera fermée après un délai variable. +
    flusherflush

    Nom du fournisseur utilisé par mod_proxy_fdpass. + Voir la documentation de ce module pour plus de détails.

    -

    Si l'URL de la directive Proxy débute par +

    Si l'URL de la directive Proxy débute par balancer:// (par exemple: - balancer://cluster/, toute information relative au - chemin est ignorée), alors un serveur cible virtuel ne communiquant pas - réellement avec le serveur d'arrière-plan sera créé. Celui-ci sera - en fait responsable de la gestion de plusieurs serveurs cibles "réels". Dans - ce cas, un jeu de paramètres particuliers s'applique à ce serveur cible + balancer://cluster, toute information relative au + chemin est ignorée), alors un serveur cible virtuel ne communiquant pas + réellement avec le serveur d'arrière-plan sera créé. Celui-ci sera + en fait responsable de la gestion de plusieurs serveurs cibles "réels". Dans + ce cas, un jeu de paramètres particuliers s'applique à ce serveur cible virtuel. Voir mod_proxy_balancer pour plus - d'informations à propos du fonctionnement du répartiteur de + d'informations à propos du fonctionnement du répartiteur de charge.

    -
    Paramètres du répartiteur
    +
    Paramètres du répartiteur
    - - + + - - - - + + + - - - - + + + - - + + +
    ParamètreDéfaut
    ParamètreDéfaut Description
    lbmethod byrequestsMéthode de répartition de charge utilisée. Permet de - sélectionner la méthode de planification de la répartition de - charge à utiliser. La valeur est soit byrequests, - pour effectuer un décompte de requêtes pondérées, soit - bytraffic, pour effectuer une répartition en - fonction du décompte des octets transmis, soit - bybusyness, pour effectuer une répartition en - fonction des requêtes en attente. La valeur par défaut est + Méthode de répartition de charge utilisée. Permet de + sélectionner la méthode de planification de la répartition de + charge à utiliser. La valeur est soit byrequests, + pour effectuer un décompte de requêtes pondérées, soit + bytraffic, pour effectuer une répartition en + fonction du décompte des octets transmis, soit + bybusyness, pour effectuer une répartition en + fonction des requêtes en attente. La valeur par défaut est byrequests.
    maxattempts 1 de moins que le nombre de workers, ou 1 avec un seul workerNombre maximum d'échecs avant abandon. + Nombre maximum d'échecs avant abandon.
    nofailover OffSi ce paramètre est défini à On, la session va - s'interrompre si le serveur cible est dans un état d'erreur ou - désactivé. Définissez ce paramètre à On si le serveur - d'arrière-plan ne supporte pas la réplication de session. + Si ce paramètre est défini à On, la session va + s'interrompre si le serveur cible est dans un état d'erreur ou + désactivé. Définissez ce paramètre à On si le serveur + d'arrière-plan ne supporte pas la réplication de session.
    stickysession -Nom de session persistant du répartiteur. La valeur est - généralement du style JSESSIONID ou - PHPSESSIONID, et dépend du serveur d'application - d'arrière-plan qui supporte les sessions. Si le serveur - d'application d'arrière-plan utilise des noms différents pour - les cookies et les identifiants codés d'URL (comme les - conteneurs de servlet), séparez-les par le caractère '|'. La - première partie contient le cookie et la seconde le chemin. + Nom de session persistant du répartiteur. La valeur est + généralement du style JSESSIONID ou + PHPSESSIONID, et dépend du serveur d'application + d'arrière-plan qui supporte les sessions. Si le serveur + d'application d'arrière-plan utilise un nom différent pour + les cookies et les identifiants codés d'URL (comme les + conteneurs de servlet), séparez-les par le caractère '|'. La + première partie contient le cookie et la seconde le chemin.
    + Disponible depuis la version 2.4.4 du serveur HTTP Apache. +
    stickysessionsep"."Définit le caractère de séparation dans le cookie de + session. Certains serveurs d'application d'arrière-plan + n'utilisent pas le caractère '.' comme séparateur. Par exemple + le serveur Oracle Weblogic utilise le caractère '!'. Cette + option permet d'attribuer au caractère de séparation la valeur + appropriée. Si elle est définie à 'Off', aucun caractère de + séparation n'est utilisé.
    scolonpathdelim OffSi ce paramètre est défini à On, le caractère - ';' sera utilisé comme séparateur de chemin de session + Si ce paramètre est défini à On, le caractère + ';' sera utilisé comme séparateur de chemin de session persistante additionnel. Ceci permet principalement de simuler le comportement de mod_jk lorsqu'on utilise des chemins du style JSESSIONID=6736bcf34;foo=aabfa.
    timeout 0Délai du répartiteur en secondes. Si ce paramètre est - défini, sa valeur correspond à la durée maximale d'attente pour - un serveur cible libre. Le comportement par défaut est de ne pas + Délai du répartiteur en secondes. Si ce paramètre est + défini, sa valeur correspond à la durée maximale d'attente pour + un serveur cible libre. Le comportement par défaut est de ne pas attendre.
    failonstatus -Une liste de codes d'état HTTP séparés par des virgules. Si - ce paramètre est présent, le worker se mettra en erreur si le - serveur d'arrière-plan renvoie un des codes d'état spécifiés - dans la liste. La récupération du worker s'effectue comme dans + Une liste de codes d'état HTTP séparés par des virgules. Si + ce paramètre est présent, le worker se mettra en erreur si le + serveur d'arrière-plan renvoie un des codes d'état spécifiés + dans la liste. La récupération du worker s'effectue comme dans le cas des autres erreurs de worker.
    failontimeoutOffSi ce paramètre est défini à "On", un délai d'attente + dépassé en entrée/sortie après envoi d'une requête au serveur + d'arrière-plan va mettre le processus en état d'erreur. La + sortie de cet état d'erreur se passe de la même façon que pour + les autres erreurs.
    + Disponible à partir de la version 2.4.5 du serveur HTTP Apache. +
    nonce <auto>Le nombre à usage unique de protection utilisé dans la page - de l'application balancer-manager. Par défaut, la - protection de la page est assurée par un nombre à usage unique - automatique à base d'UUID. Si une valeur est précisée, elle sera - utilisée comme nombre à usage unique. La valeur - None désactive la vérification du nombre à usage + Le nombre à usage unique de protection utilisé dans la page + de l'application balancer-manager. Par défaut, la + protection de la page est assurée par un nombre à usage unique + automatique à base d'UUID. Si une valeur est précisée, elle sera + utilisée comme nombre à usage unique. La valeur + None désactive la vérification du nombre à usage unique. Note -

    En plus du nombre à usage unique, la page de l'application - balancer-manager peut être protégée par une ACL.

    +

    En plus du nombre à usage unique, la page de l'application + balancer-manager peut être protégée par une ACL.

    growth 0Nombre de membres supplémentaires que l'on peut ajouter à ce - répartiteur en plus de ceux définis au niveau de la - configuration. + Nombre de membres supplémentaires que l'on peut ajouter à ce + répartiteur en plus de ceux définis au niveau de la + configuration. +
    forcerecoveryOnForce la relance immédiate de tous les membres sans tenir + compte de leur paramètre retry dans le cas où ils sont tous en + état d'erreur. Il peut cependant arriver qu'un membre déjà + surchargé entre dans une situation critique si la relance de + tous les membres est forcée sans tenir compte du paramètre retry + de chaque membre. Dans ce cas, définissez ce paramètre à + Off.
    + Disponible depuis la version 2.4.2 du serveur HTTP Apache.
    -

    Exemple de configuration d'un répartiteur de charge

    - - ProxyPass /zone-speciale http://special.example.com smax=5 max=10
    - ProxyPass / balancer://mon-cluster/ stickysession=JSESSIONID|jsessionid nofailover=On
    - <Proxy balancer://mon-cluster>
    - - BalancerMember ajp://1.2.3.4:8009
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=20
    - # Serveur moins puissant ; faites-lui traiter moins de requêtes,
    - BalancerMember ajp://1.2.3.6:8009 loadfactor=5
    -
    - </Proxy> -
    - -

    Configuration d'un serveur cible de réserve qui ne sera utilisé que si +

    Exemple de configuration d'un répartiteur de charge

    + +ProxyPass "/special-area" "http://special.example.com" smax=5 max=10 +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On +<Proxy "balancer://mycluster"> + BalancerMember "ajp://1.2.3.4:8009" + BalancerMember "ajp://1.2.3.5:8009" loadfactor=20 + # Less powerful server, don't send as many requests there, + BalancerMember "ajp://1.2.3.6:8009" loadfactor=5 +</Proxy> + + +

    Configuration d'un serveur cible de réserve qui ne sera utilisé que si aucun autre serveur cible n'est disponible

    - - ProxyPass / balancer://hotcluster/
    - <Proxy balancer://hotcluster>
    - - BalancerMember ajp://1.2.3.4:8009 loadfactor=1
    - BalancerMember ajp://1.2.3.5:8009 loadfactor=2
    - # La ligne suivante configure le serveur cible de réserve
    - BalancerMember ajp://1.2.3.6:8009 status=+H
    - ProxySet lbmethod=bytraffic -
    - </Proxy> -
    + +ProxyPass "/" "balancer://hotcluster/" +<Proxy "balancer://hotcluster"> + BalancerMember "ajp://1.2.3.4:8009" loadfactor=1 + BalancerMember "ajp://1.2.3.5:8009" loadfactor=2 + # The server below is on hot standby + BalancerMember "ajp://1.2.3.6:8009" status=+H + ProxySet lbmethod=bytraffic +</Proxy> + + +

    Mots-clés additionnels de ProxyPass

    Normalement, mod_proxy va mettre sous leur forme canonique les - URLs traitées par ProxyPass. Mais ceci peut être incompatible avec - certains serveurs d'arrière-plan, et en particulier avec ceux qui - utilisent PATH_INFO. Le mot-clé optionnel + URLs traitées par ProxyPass. Mais ceci peut être incompatible avec + certains serveurs d'arrière-plan, et en particulier avec ceux qui + utilisent PATH_INFO. Le mot-clé optionnel nocanon modifie ce comportement et permet de transmettre - le chemin d'URL sous sa forme brute au serveur d'arrière-plan. Notez - que ceci peut affecter la sécurité de votre serveur d'arrière-plan, - car la protection limitée contre les attaques à base d'URL que - fournit le mandataire est alors supprimée.

    - -

    Le mot-clé optionnel interpolate (disponible depuis - httpd 2.2.9), en combinaison avec la directive - ProxyPassInterpolateEnv, permet à ProxyPass - d'interpoler les variables d'environnement à l'aide de la syntaxe - ${VARNAME}. Notez que de nombreuses variables - d'environnement standard dérivées de CGI n'existeront pas lorsque - l'interpolation se produit ; vous devrez alors encore avoir avoir - recours à mod_rewrite pour des règles - complexes.

    - -

    Lorsque la directive ProxyPass est utilisée à l'intérieur d'une + le chemin d'URL sous sa forme brute au serveur d'arrière-plan. Notez + que ceci peut affecter la sécurité de votre serveur d'arrière-plan, + car la protection limitée contre les attaques à base d'URL que + fournit le mandataire est alors supprimée.

    + +

    Par défaut, mod_proxy inclut la chaîne de paramètres lors de la + génération de la variable d'environnement + SCRIPT_FILENAME. Le mot-clé optionnel noquery + (disponible à partir de la version 2.4.1) permet d'exclure cette + chaîne.

    + +

    Lorsque la directive ProxyPass est utilisée à l'intérieur d'une section Location, le premier argument est omis et le répertoire - local est obtenu à partir de la section Location. Il en sera de même dans une + >Location, le premier argument est omis et le répertoire + local est obtenu à partir de la section Location. Il en sera de même dans une section LocationMatch ; cependant, ProxyPass - n'interprète pas les expressions rationnelles, et il sera ici - nécessaire d'utiliser la directive - ProxyPassMatch à la place.

    + n'interprète pas les expressions rationnelles, et il sera ici + nécessaire d'utiliser la directive + ProxyPassMatch à la place.

    -

    Cette directive ne peut pas être placée dans une section +

    Cette directive ne peut pas être placée dans une section Directory ou Files.

    Si vous avez besoin d'un configuration de mandataire inverse plus - souple, reportez-vous à la documentaion de la directive RewriteRule et son drapeau [P].

    +

    Le mot-clé optionnel interpolate, en combinaison avec la directive + ProxyPassInterpolateEnv, permet à ProxyPass + d'interpoler les variables d'environnement à l'aide de la syntaxe + ${VARNAME}. Notez que de nombreuses variables + d'environnement standard dérivées de CGI n'existeront pas lorsque + l'interpolation se produit ; vous devrez alors encore avoir avoir + recours à mod_rewrite pour des règles + complexes. Notez aussi que l'interpolation n'est pas supportée dans + la partie protocole d'une URL. La détermination dynamique du + protocole peut être effectuée à l'aide de + mod_rewrite comme dans l'exemple suivant :

    + + +RewriteEngine On + +RewriteCond "%{HTTPS}" =off +RewriteRule "". "-" [E=protocol:http] +RewriteCond "%{HTTPS}" =on +RewriteRule "." "-" [E=protocol:https] + +RewriteRule "^/mirror/foo/(.*)" "%{ENV:protocol}://backend.example.com/$1" [P] +ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverse "/mirror/foo/" "https://backend.example.com/" + +
    @@ -1323,55 +1568,59 @@ l'espace d'URLs du serveur local
    Fait correspondre des serveurs distants dans l'espace d'URL du serveur local en utilisant des expressions rationnelles ProxyPassMatch [regex] !|url -[clé=valeur - [clé=valeur ...]] +[clé=valeur + [clé=valeur ...]] server configvirtual host directory -

    Cette directive est identique à la directive Cette directive est identique à la directive ProxyPass, mais fait usage des expressions rationnelles, au lieu d'une simple comparaison de - préfixes. L'expression rationnelle spécifiée est comparée à + préfixes. L'expression rationnelle spécifiée est comparée à l'url, et si elle correspond, le serveur va substituer - toute correspondance entre parenthèses dans la chaîne donnée et + toute correspondance entre parenthèses dans la chaîne donnée et l'utiliser comme nouvelle url.

    + Note : Cette directive ne peut pas être + utilisée dans un contexte de niveau répertoire. +

    Supposons que le serveur local a pour adresse http://example.com/ ; alors

    - - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 - + + ProxyPassMatch "^(/.*\.gif)$" "http://backend.example.com/$1" + -

    va provoquer la conversion interne de la requête locale - http://example.com/foo/bar.gif en une requête mandatée +

    va provoquer la conversion interne de la requête locale + http://example.com/foo/bar.gif en une requête mandatée pour http://backend.example.com/foo/bar.gif.

    Note -

    L'argument URL doit pouvoir être interprété en tant qu'URL +

    L'argument URL doit pouvoir être interprété en tant qu'URL avant les substitutions d'expressions rationnelles (et - doit aussi l'être après). Ceci limite les correspondances que vous - pouvez utiliser. Par exemple, si l'on avait utilisé

    - - ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 - -

    dans l'exemple précédent, nous aurions provoqué une erreur de - syntaxe au démarrage du serveur. C'est une bogue (PR 46665 dans + doit aussi l'être après). Ceci limite les correspondances que vous + pouvez utiliser. Par exemple, si l'on avait utilisé

    + + ProxyPassMatch "^(/.*\.gif)$" + "http://backend.example.com:8000$1" + +

    dans l'exemple précédent, nous aurions provoqué une erreur de + syntaxe au démarrage du serveur. C'est une bogue (PR 46665 dans ASF bugzilla), et il est possible de la contourner en reformulant la correspondance :

    - - ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 - + + ProxyPassMatch "^/(.*\.gif)$" "http://backend.example.com:8000/$1" +

    Le drapeau ! vous permet de ne pas mandater un - sous-répertoire donné.

    + sous-répertoire donné.

    Dans une section LocationMatch, le premier argument est - omis et l'expression rationnelle est obtenue à partir de la directive + omis et l'expression rationnelle est obtenue à partir de la directive LocationMatch.

    Si vous avez besoin d'une configuration du mandataire inverse @@ -1379,10 +1628,18 @@ du serveur local en utilisant des expressions rationnelles module="mod_rewrite">RewriteRule avec le drapeau [P].

    + + Substitution par défaut +

    Lorsque le paramètre URL n'utilise pas de références arrières + dans l'expression rationnelle, l'URL originale sera ajoutée au + paramètre URL. +

    +
    + - Avertissement à propos de la sécurité -

    Lors de la construction de l'URL cible de la règle, il convient - de prendre en compte l'impact en matière de sécurité qu'aura le + Avertissement à propos de la sécurité +

    Lors de la construction de l'URL cible de la règle, il convient + de prendre en compte l'impact en matière de sécurité qu'aura le fait de permettre au client d'influencer le jeu d'URLs pour lesquelles votre serveur agira en tant que mandataire. Assurez-vous que la partie protocole://nom-serveur de l'URL soit @@ -1393,8 +1650,8 @@ du serveur local en utilisant des expressions rationnelles ProxyPassReverse -Ajuste l'URL dans les en-têtes de la réponse HTTP envoyée -par un serveur mandaté en inverse +Ajuste l'URL dans les en-têtes de la réponse HTTP envoyée +par un serveur mandaté en inverse ProxyPassReverse [chemin] url [interpolate] server configvirtual host @@ -1403,81 +1660,83 @@ par un serveur mandaté en inverse

    Cette directive permet de faire en sorte qu'Apache httpd ajuste l'URL - dans les en-têtes Location, - Content-Location et URI des réponses de - redirection HTTP. Ceci est essentiel lorsqu'Apache httpd est utilisé en - tant que mandataire inverse (ou passerelle), afin d'éviter de + dans les en-têtes Location, + Content-Location et URI des réponses de + redirection HTTP. Ceci est essentiel lorsqu'Apache httpd est utilisé en + tant que mandataire inverse (ou passerelle), afin d'éviter de court-circuiter le mandataire inverse suite aux redirections HTTP - sur le serveur d'arrière-plan qui restent derrière le mandataire + sur le serveur d'arrière-plan qui restent derrière le mandataire inverse.

    -

    Seuls les en-têtes de réponse HTTP spécialement mentionnés - ci-dessus seront réécrits. Apache httpd ne réécrira ni les autres en-têtes - de réponse, ni les références d'URLs dans les pages HTML. Cela - signifie que dans le cas où un contenu mandaté contient des - références à des URLs absolues, elles court-circuiteront le - mandataire. Le module mod_proxy_html - de Nick Kew est un module tiers qui parcourt le code HTML et réécrit - les références d'URL.

    +

    Seuls les en-têtes de réponse HTTP spécialement mentionnés + ci-dessus seront réécrits. Apache httpd ne réécrira ni les autres en-têtes + de réponse, ni par défaut les références d'URLs dans les pages HTML. Cela + signifie que dans le cas où un contenu mandaté contient des + références à des URLs absolues, elles court-circuiteront le + mandataire. Pour réécrire un contenu HTML afin qu'il corresponde au + mandataire, vous devez charger et activer le module + mod_proxy_html. +

    chemin est le nom d'un chemin virtuel local. - url est une URL partielle pour le serveur distant - ils - sont utilisés de la même façon qu'avec la directive ProxyPass.

    + url est une URL partielle pour le serveur distant. Ces + paramètres s'utilisent de la même façon qu'avec la + directive ProxyPass.

    Supposons par exemple que le serveur local a pour adresse http://example.com/ ; alors

    - - ProxyPass /miroir/foo/ http://backend.example.com/
    - ProxyPassReverse /miroir/foo/ http://backend.example.com/
    - ProxyPassReverseCookieDomain backend.example.com public.example.com
    - ProxyPassReverseCookiePath / /miroir/foo/ -
    + +ProxyPass "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" +ProxyPassReverseCookieDomain "backend.example.com" "public.example.com" +ProxyPassReverseCookiePath "/" "/mirror/foo/" + -

    ne va pas seulement provoquer la conversion interne d'une requête +

    ne va pas seulement provoquer la conversion interne d'une requête locale pour http://example.com/miroir/foo/bar en une - requête mandatée pour http://backend.example.com/bar - (la fonctionnalité fournie par ProxyPass). Il va + requête mandatée pour http://backend.example.com/bar + (la fonctionnalité fournie par ProxyPass). Il va aussi s'occuper des redirections que le serveur - backend.example.com envoie : lorsque - http://backend.example.com/bar est redirigé par - celui-ci vers http://backend.example.com/quux, Apache + backend.example.com envoie lorsqu'il redirige + http://backend.example.com/bar vers + http://backend.example.com/quux. Apache httpd corrige ceci en http://example.com/miroir/foo/quux avant de faire suivre la redirection HTTP au client. Notez que le - nom d'hôte utilisé pour construire l'URL est choisi en respectant la - définition de la directive UseCanonicalName.

    Notez que la directive ProxyPassReverse - peut aussi être utilisée en conjonction avec la fonctionnalité - pass-through (RewriteRule ... [P]) du module - mod_rewrite, car elle ne dépend pas d'une directive + peut aussi être utilisée en conjonction avec la + fonctionnalité de mandataire + (RewriteRule ... [P]) du module + mod_rewrite, car elle ne dépend pas d'une directive ProxyPass correspondante.

    -

    Le mot-clé optionnel interpolate (disponible depuis - httpd 2.2.9), utilisé en combinaison avec la directive +

    Le mot-clé optionnel interpolate, en + combinaison avec la directive ProxyPassInterpolateEnv, permet - l'interpolation des variables d'environnement spécifiées en - utilisant le format ${VARNAME}. + l'interpolation des variables d'environnement spécifiées en + utilisant le format ${VARNAME} Notez que l'interpolation + n'est pas supportée dans la partie protocole d'une URL.

    -

    Lorsque cette directive est utilisée dans une section Lorsque cette directive est utilisée dans une section Location, le premier - argument est omis et le répertoire local est obtenu à partir de + argument est omis et le répertoire local est obtenu à partir de l'argument de la directive Location. Il en est de même à l'intérieur + module="core">Location. Il en est de même à l'intérieur d'une section LocationMatch, mais le résultat ne sera - probablement pas celui attendu car ProxyPassReverse va interpréter - l'expression rationnelle littéralement comme un chemin ; si besoin - est dans ce cas, définissez la directive ProxyPassReverse en dehors + module="core">LocationMatch, mais le résultat ne sera + probablement pas celui attendu car ProxyPassReverse va interpréter + l'expression rationnelle littéralement comme un chemin ; si besoin + est dans ce cas, définissez la directive ProxyPassReverse en dehors de la section, ou dans une section Location séparée.

    + module="core">Location séparée.

    -

    Cette directive ne peut pas être placée dans une section +

    Cette directive ne peut pas être placée dans une section Directory ou Files.

    @@ -1485,42 +1744,60 @@ par un serveur mandaté en inverse ProxyPassReverseCookieDomain -Ajuste la chaîne correspondant au domaine dans les en-têtes -Set-Cookie en provenance d'un serveur mandaté +Ajuste la chaîne correspondant au domaine dans les en-têtes +Set-Cookie en provenance d'un serveur mandaté ProxyPassReverseCookieDomain domaine-interne domaine-public [interpolate] server configvirtual host directory -

    L'utilisation de cette directive est similaire à celle de la +

    L'utilisation de cette directive est similaire à celle de la directive ProxyPassReverse, -mais au lieu de réécrire des en-têtes qui contiennent des URLs, elle -réécrit la chaîne correspondant au domaine dans les en-têtes +mais au lieu de réécrire des en-têtes qui contiennent des URLs, elle +réécrit la chaîne correspondant au domaine dans les en-têtes Set-Cookie.

    + + ProxyPassReverseCookiePath -Ajuste la chaîne correspondant au chemin dans les en-têtes -Set-Cookie en provenance d'un serveur mandaté +Ajuste la chaîne correspondant au chemin dans les en-têtes +Set-Cookie en provenance d'un serveur mandaté ProxyPassReverseCookiePath chemin-interne chemin-public [interpolate] server configvirtual host directory -

    L'utilisation de cette directive est similaire à celle de la -directive ProxyPassReverse, -mais au lieu de réécrire des en-têtes qui contiennent des URLs, elle -réécrit la chaîne correspondant au chemin dans les en-têtes -Set-Cookie.

    +

    +Cette directive s'avère utile en conjonction avec la directive +ProxyPassReverse dans les +situations où les chemins d'URL d'arrière-plan correspondent à des +chemins publics sur le mandataire inverse. Cette directive permet de +réécrire la chaîne path dans les en-têtes +Set-Cookie. Si le début du chemin du cookie correspond à +chemin-interne, le chemin du cookie sera remplacé par +chemin-public. +

    +Dans l'exemple fourni avec la directive ProxyPassReverse, la directive : +

    + + ProxyPassReverseCookiePath "/" "/mirror/foo/" + +

    +va réécrire un cookie possédant un chemin d'arrière-plan / +(ou /example ou en fait tout chemin) +en /mirror/foo/.. +

    ProxyBlock -Termes, serveurs ou domaines bloqués par le +Termes, serveurs ou domaines bloqués par le mandataire ProxyBlock *|terme|serveur|domaine [terme|serveur|domaine] ... @@ -1529,30 +1806,32 @@ mandataire

    La directive ProxyBlock permet de - spécifier une liste de termes, serveurs et/ou domaines, séparés par - des espaces. Les requêtes de documents HTTP, HTTPS, FTP vers des + spécifier une liste de termes, serveurs et/ou domaines, séparés par + des espaces. Les requêtes de documents HTTP, HTTPS, FTP vers des sites dont les noms contiennent des termes, noms de serveur ou - domaine correspondants seront bloqués par le serveur - mandataire. La module proxy va aussi tenter de déterminer les - adresses IP des éléments de la liste qui peuvent correspondre à des - noms d'hôtes au cours du démarrage, et les mettra en cache à des - fins de comparaisons ultérieures. Ceci peut ralentir le démarrage du + domaine correspondants seront bloqués par le serveur + mandataire. La module proxy va aussi tenter de déterminer les + adresses IP des éléments de la liste qui peuvent correspondre à des + noms d'hôtes au cours du démarrage, et les mettra en cache à des + fins de comparaisons ultérieures. Ceci peut ralentir le démarrage du serveur.

    Exemple - ProxyBlock news.example.com auctions.example.com friends.example.com + + ProxyBlock "news.example.com" "auctions.example.com" "friends.example.com" +

    Notez qu'example suffirait aussi pour atteindre ces sites.

    -

    Hosts conviendrait aussi s'il était référencé par adresse IP.

    +

    Hosts conviendrait aussi s'il était référencé par adresse IP.

    Notez aussi que

    - - ProxyBlock * - + + ProxyBlock "*" +

    bloque les connexions vers tous les sites.

    @@ -1560,7 +1839,7 @@ mandataire ProxyReceiveBufferSize -Taille du tampon réseau pour les connexions mandatées HTTP +Taille du tampon réseau pour les connexions mandatées HTTP et FTP ProxyReceiveBufferSize octets ProxyReceiveBufferSize 0 @@ -1569,22 +1848,24 @@ et FTP

    La directive ProxyReceiveBufferSize permet - de spécifier une taille de tampon réseau explicite (TCP/IP) pour les - connexions mandatées HTTP et FTP, afin d'améliorer le débit de - données. Elle doit être supérieure à 512 ou définie à - 0 pour indiquer que la taille de tampon par défaut du - système doit être utilisée.

    + de spécifier une taille de tampon réseau explicite (TCP/IP) pour les + connexions mandatées HTTP et FTP, afin d'améliorer le débit de + données. Elle doit être supérieure à 512 ou définie à + 0 pour indiquer que la taille de tampon par défaut du + système doit être utilisée.

    Exemple + ProxyReceiveBufferSize 2048 +
    ProxyIOBufferSize -Détermine la taille du tampon interne de transfert de -données +Détermine la taille du tampon interne de transfert de +données ProxyIOBufferSize octets ProxyIOBufferSize 8192 server configvirtual host @@ -1592,21 +1873,24 @@ données

    La directive ProxyIOBufferSize permet - d'ajuster la taille du tampon interne utilisé comme bloc-note pour - les transferts de données entre entrée et sortie. La taille minimale + d'ajuster la taille du tampon interne utilisé comme bloc-note pour + les transferts de données entre entrée et sortie. La taille minimale est de 512 octets.

    Dans la plupart des cas, il n'y a aucune raison de modifier cette valeur.

    -

    Si elle est utilisée avec AJP, cette directive permet de définir - la taille maximale du paquet AJP en octets. Si vous ne conservez pas - la valeur par défaut, vous devez aussi modifier l'attribut - packetSize de votre connecteur AJP du côté de Tomcat ! + +

    Si elle est utilisée avec AJP, cette directive permet de définir + la taille maximale du paquet AJP en octets. Si la valeur spécifiée + est supérieure à 65536, elle est corrigée et prend la valeur 65536. + Si vous ne conservez pas + la valeur par défaut, vous devez aussi modifier l'attribut + packetSize de votre connecteur AJP du côté de Tomcat ! L'attribut packetSize n'est disponible que dans Tomcat 5.5.20+ et 6.0.2+.

    -

    Il n'est normalement pas nécessaire de modifier la taille - maximale du paquet. Des problèmes ont cependant été rapportés avec - la valeur par défaut lors de l'envoi de certificats ou de chaînes de +

    Il n'est normalement pas nécessaire de modifier la taille + maximale du paquet. Des problèmes ont cependant été rapportés avec + la valeur par défaut lors de l'envoi de certificats ou de chaînes de certificats.

    @@ -1614,65 +1898,69 @@ données ProxyMaxForwards -Nombre maximum de mandataires à travers lesquelles une -requête peut être redirigée +Nombre maximum de mandataires à travers lesquelles une +requête peut être redirigée ProxyMaxForwards nombre ProxyMaxForwards -1 server configvirtual host -Disponible depuis la version 2.0 du serveur HTTP Apache ; comportement par défaut -modifié dans 2.2.7/2.3 +Comportement par défaut +modifié dans 2.2.7

    La directive ProxyMaxForwards permet de - spécifier le nombre maximum de mandataires à travers lesquels une - requête peut passer dans le cas où la la requête ne contient pas - d'en-tête Max-Forwards. Ceci permet de se prémunir + spécifier le nombre maximum de mandataires à travers lesquels une + requête peut passer dans le cas où la la requête ne contient pas + d'en-tête Max-Forwards. Ceci permet de se prémunir contre les boucles infinies de mandataires ou contre les attaques de - type déni de service.

    + type déni de service.

    Exemple + ProxyMaxForwards 15 + -

    Notez que la définition de la directive +

    Notez que la définition de la directive ProxyMaxForwards constitue une violation du - protocole HTTP/1.1 (RFC2616), qui interdit à un mandataire de - définir Max-Forwards si le client ne l'a pas fait - lui-même. Les versions précédentes d'Apache httpd la définissaient - systématiquement. Une valeur négative de + protocole HTTP/1.1 (RFC2616), qui interdit à un mandataire de + définir Max-Forwards si le client ne l'a pas fait + lui-même. Les versions précédentes d'Apache httpd la définissaient + systématiquement. Une valeur négative de ProxyMaxForwards, y compris la valeur par - défaut -1, implique un comportement compatible avec le protocole, + défaut -1, implique un comportement compatible avec le protocole, mais vous expose aux bouclages infinis.

    NoProxy -Serveurs, domaines ou réseaux auquels on se connectera +Serveurs, domaines ou réseaux auquels on se connectera directement NoProxy domaine [domaine] ... server configvirtual host -

    Cette directive n'a d'utilité que pour les serveurs mandataires +

    Cette directive n'a d'utilité que pour les serveurs mandataires Apache httpd au sein d'Intranets. La directive - NoProxy permet de spécifier une liste de - sous-réseaux, d'adresses IP, de serveurs et/ou de domaines séparés - par des espaces. Une requête pour un serveur qui correspond à un ou - plusieurs critères sera toujours servie par ce serveur directement, - sans être redirigée vers le(s) serveur(s) mandataire(s) défini(s) par + NoProxy permet de spécifier une liste de + sous-réseaux, d'adresses IP, de serveurs et/ou de domaines séparés + par des espaces. Une requête pour un serveur qui correspond à un ou + plusieurs critères sera toujours servie par ce serveur directement, + sans être redirigée vers le(s) serveur(s) mandataire(s) défini(s) par la directive ProxyRemote.

    Exemple - ProxyRemote * http://pare-feu.example.com:81
    - NoProxy .example.com 192.168.112.0/21 + +ProxyRemote "*" "http://firewall.example.com:81" +NoProxy ".example.com" "192.168.112.0/21" +

    Le type des arguments serveur de la directive - NoProxy appartiennent à la liste suivante + NoProxy appartiennent à la liste suivante :

    @@ -1680,8 +1968,8 @@ directement
    Domaine

    Un domaine est ici un nom de domaine DNS partiellement - qualifié précédé d'un point. Il représente une liste de serveurs qui - appartiennent logiquement au même domaine ou à la même zonz DNS + qualifié précédé d'un point. Il représente une liste de serveurs qui + appartiennent logiquement au même domaine ou à la même zonz DNS (en d'autres termes, les nom des serveurs se terminent tous par domaine).

    @@ -1690,69 +1978,69 @@ directement

    Pour faire la distinction entre domaines et nom d'hôtes (des points de vue à la fois + href="#hostname">nom d'hôtes (des points de vue à la fois syntaxique et - sémantique, un domaine DNS pouvant aussi avoir un enregistrement DNS - de type A !), les domaines sont toujours spécifiés en les - préfixant par un point.

    + sémantique, un domaine DNS pouvant aussi avoir un enregistrement DNS + de type A !), les domaines sont toujours spécifiés en les + préfixant par un point.

    Note

    Les comparaisons de noms de domaines s'effectuent sans tenir compte de la casse, et les parties droites des Domaines - sont toujours censées correspondre à la racine de l'arborescence + sont toujours censées correspondre à la racine de l'arborescence DNS, si bien que les domaines .ExEmple.com et - .example.com. (notez le point à la fin du nom) sont - considérés comme identiques. Comme une comparaison de domaines ne - nécessite pas de recherche DNS, elle est beaucoup plus efficace - qu'une comparaison de sous-réseaux.

    + .example.com. (notez le point à la fin du nom) sont + considérés comme identiques. Comme une comparaison de domaines ne + nécessite pas de recherche DNS, elle est beaucoup plus efficace + qu'une comparaison de sous-réseaux.

    -
    Sous-réseau
    +
    Sous-réseau
    -

    Un Sous-réseau est une adresse internet partiellement - qualifiée sous forme numérique (quatre nombres séparés par des +

    Un Sous-réseau est une adresse internet partiellement + qualifiée sous forme numérique (quatre nombres séparés par des points), optionnellement suivie d'un slash et du masque de - sous-réseau spécifiant le nombre de bits significatifs dans le - Sous-réseau. Il représente un sous-réseau de serveurs qui - peuvent être atteints depuis la même interface réseau. En l'absence - de masque de sous-réseau explicite, il est sous-entendu que les - digits manquants (ou caractères 0) de fin spécifient le masque de - sous-réseau (Dans ce cas, le masque de sous-réseau ne peut être + sous-réseau spécifiant le nombre de bits significatifs dans le + Sous-réseau. Il représente un sous-réseau de serveurs qui + peuvent être atteints depuis la même interface réseau. En l'absence + de masque de sous-réseau explicite, il est sous-entendu que les + digits manquants (ou caractères 0) de fin spécifient le masque de + sous-réseau (Dans ce cas, le masque de sous-réseau ne peut être qu'un multiple de 8). Voici quelques exemples :

    192.168 ou 192.168.0.0
    -
    le sous-réseau 192.168.0.0 avec un masque de sous-réseau - implicite de 16 bits significatifs (parfois exprimé sous la forme +
    le sous-réseau 192.168.0.0 avec un masque de sous-réseau + implicite de 16 bits significatifs (parfois exprimé sous la forme 255.255.0.0)
    192.168.112.0/21
    -
    le sous-réseau 192.168.112.0/21 avec un masque de - sous-réseau implicite de 21 bits significatifs (parfois exprimé +
    le sous-réseau 192.168.112.0/21 avec un masque de + sous-réseau implicite de 21 bits significatifs (parfois exprimé sous la forme255.255.248.0)
    -

    Comme cas extrêmes, un Sous-réseau avec un masque de - sous-réseau de 32 bits significatifs est équivalent à une adresse IP, alors qu'un Sous-réseau avec un masque de - sous-réseau de 0 bit significatif (c'est à dire 0.0.0.0/0) est - identique à la constante _Default_, et peut correspondre - à toute adresse IP.

    +

    Comme cas extrêmes, un Sous-réseau avec un masque de + sous-réseau de 32 bits significatifs est équivalent à une adresse IP, alors qu'un Sous-réseau avec un masque de + sous-réseau de 0 bit significatif (c'est à dire 0.0.0.0/0) est + identique à la constante _Default_, et peut correspondre + à toute adresse IP.

    Adresse IP

    Une Adresse IP est une adresse internet pleinement - qualifiée sous forme numérique (quatre nombres séparés par des - points). En général, cette adresse représente un serveur, mais elle - ne doit pas nécessairement correspondre à un nom de domaine DNS.

    + qualifiée sous forme numérique (quatre nombres séparés par des + points). En général, cette adresse représente un serveur, mais elle + ne doit pas nécessairement correspondre à un nom de domaine DNS.

    Exemple 192.168.123.7 Note -

    Une Adresse IP ne nécessite pas de résolution DNS, - et peut ainsi s'avérer plus efficace quant aux performances +

    Une Adresse IP ne nécessite pas de résolution DNS, + et peut ainsi s'avérer plus efficace quant aux performances d'Apache.

    @@ -1760,12 +2048,12 @@ directement
    Nom de serveur

    Un Nom de serveur est un nom de domaine DNS pleinement - qualifié qui peut être résolu en une ou plusieurs adresses IP par le - service de noms de domaines DNS. Il représente un hôte logique (par + qualifié qui peut être résolu en une ou plusieurs adresses IP par le + service de noms de domaines DNS. Il représente un hôte logique (par opposition aux Domaines, voir - ci-dessus), et doit pouvoir être résolu en une ou plusieurs adresses IP (ou souvent en une liste - d'hôtes avec différentes adresses + d'hôtes avec différentes adresses IP).

    Exemples @@ -1775,104 +2063,105 @@ directement Note

    Dans de nombreuses situations, il est plus efficace de - spécifier une adresse IP qu'un - Nom de serveur car cela évite d'avoir à effectuer une - recherche DNS. La résolution de nom dans Apache httpd peut prendre un - temps très long lorsque la connexion avec le serveur de noms + spécifier une adresse IP qu'un + Nom de serveur car cela évite d'avoir à effectuer une + recherche DNS. La résolution de nom dans Apache httpd peut prendre un + temps très long lorsque la connexion avec le serveur de noms utilise une liaison PPP lente.

    Les comparaisons de Nom de serveur s'effectuent sans tenir compte de la casse, et les parties droites des Noms de serveur - sont toujours censées correspondre à la racine de l'arborescence + sont toujours censées correspondre à la racine de l'arborescence DNS, si bien que les domaines WWW.ExEmple.com et - www.example.com. (notez le point à la fin du nom) sont - considérés comme identiques.

    + www.example.com. (notez le point à la fin du nom) sont + considérés comme identiques.

    -Problèmes liés au DNS +Problèmes liés au DNS
    ProxyTimeout -Délai d'attente réseau pour les requêtes -mandatées +Délai d'attente réseau pour les requêtes +mandatées ProxyTimeout secondes Valeur de la directive Timeout server configvirtual host -Disponible depuis la version 2.0.31 du serveur HTTP Apache -

    Cette directive permet à l'utilisateur de spécifier un délai pour - les requêtes mandatées. Ceci s'avère utile dans le cas d'un serveur - d'applications lent et bogué qui a tendance à se bloquer, et si vous - préférez simplement renvoyer une erreur timeout et abandonner la - connexion en douceur plutôt que d'attendre jusqu'à ce que le serveur - veuille bien répondre.

    +

    Cette directive permet à l'utilisateur de spécifier un délai pour + les requêtes mandatées. Ceci s'avère utile dans le cas d'un serveur + d'applications lent et bogué qui a tendance à se bloquer, et si vous + préférez simplement renvoyer une erreur timeout et abandonner la + connexion en douceur plutôt que d'attendre jusqu'à ce que le serveur + veuille bien répondre.

    ProxyDomain -Nom de domaine par défaut pour les requêtes -mandatées +Nom de domaine par défaut pour les requêtes +mandatées ProxyDomain Domaine server configvirtual host -

    Cette directive n'a d'utilité que pour les serveurs mandataires +

    Cette directive n'a d'utilité que pour les serveurs mandataires Apache httpd au sein d'un Intranet. La directive - ProxyDomain permet de spécifier le domaine - par défaut auquel le serveur mandataire apache appartient. Si le - serveur reçoit une requête pour un hôte sans nom de domaine, il va - générer une réponse de redirection vers le même hôte suffixé par le - Domaine spécifié.

    + ProxyDomain permet de spécifier le domaine + par défaut auquel le serveur mandataire apache appartient. Si le + serveur reçoit une requête pour un hôte sans nom de domaine, il va + générer une réponse de redirection vers le même hôte suffixé par le + Domaine spécifié.

    Exemple - ProxyRemote * http://firewall.example.com:81
    - NoProxy .example.com 192.168.112.0/21
    - ProxyDomain .example.com + +ProxyRemote "*" "http://firewall.example.com:81" +NoProxy ".example.com" "192.168.112.0/21" +ProxyDomain ".example.com" +
    ProxyVia -Information fournie dans l'en-tête de réponse HTTP -Via pour les requêtes mandatées +Information fournie dans l'en-tête de réponse HTTP +Via pour les requêtes mandatées ProxyVia On|Off|Full|Block ProxyVia Off server configvirtual host -

    Cette directive permet de contrôler l'utilisation de l'en-tête - HTTP Via: par le mandataire. Le but recherché est de - contrôler le flux des requêtes mandatées tout au long d'une chaîne +

    Cette directive permet de contrôler l'utilisation de l'en-tête + HTTP Via: par le mandataire. Le but recherché est de + contrôler le flux des requêtes mandatées tout au long d'une chaîne de serveurs mandataires. Voir RFC 2616 (HTTP/1.1), - section 14.45 pour une description des lignes d'en-tête + section 14.45 pour une description des lignes d'en-tête Via:.

      -
    • Si elle est définie à Off, valeur par défaut, cette - directive n'effectue aucun traitement particulier. Si une requête ou - une réponse contient un en-tête Via:, il est transmis +
    • Si elle est définie à Off, valeur par défaut, cette + directive n'effectue aucun traitement particulier. Si une requête ou + une réponse contient un en-tête Via:, il est transmis sans modification.
    • -
    • Si elle est définie à On, chaque requête ou réponse - se verra ajouter une ligne d'en-tête Via: pour le +
    • Si elle est définie à On, chaque requête ou réponse + se verra ajouter une ligne d'en-tête Via: pour le serveur courant.
    • -
    • Si elle est définie à Full, chaque ligne d'en-tête +
    • Si elle est définie à Full, chaque ligne d'en-tête Via: se verra ajouter la version du serveur Apache httpd sous la forme d'un champ de commentaire Via:.
    • -
    • Si elle est définie à Block, chaque requête - mandatée verra ses lignes d'en-tête Via: supprimées. - Aucun nouvel en-tête Via: ne sera généré.
    • +
    • Si elle est définie à Block, chaque requête + mandatée verra ses lignes d'en-tête Via: supprimées. + Aucun nouvel en-tête Via: ne sera généré.
    @@ -1880,26 +2169,25 @@ mandatées ProxyErrorOverride Outrepasser les pages d'erreur pour les contenus -mandatés +mandatés ProxyErrorOverride On|Off ProxyErrorOverride Off server configvirtual host directory -Disponible depuis la version 2.0 d'Apache

    Cette directive est utile pour les configurations de mandataires - inverses, lorsque vous souhaitez que les pages d'erreur envoyées - aux utilisateurs finaux présentent un aspect homogène. Elle permet + inverses, lorsque vous souhaitez que les pages d'erreur envoyées + aux utilisateurs finaux présentent un aspect homogène. Elle permet aussi l'inclusion de fichiers (via les SSI de mod_include) pour obtenir le code d'erreur et agir - en conséquence (le comportement par défaut afficherait la page - d'erreur du serveur mandaté, alors que c'est le message d'erreur SSI - qui sera affiché si cette directive est à "on").

    + en conséquence (le comportement par défaut afficherait la page + d'erreur du serveur mandaté, alors que c'est le message d'erreur SSI + qui sera affiché si cette directive est à "on").

    -

    Cette directive n'affecte pas le traitement des réponses - informatives (1xx), de type succès normal (2xx), ou de redirection +

    Cette directive n'affecte pas le traitement des réponses + informatives (1xx), de type succès normal (2xx), ou de redirection (3xx).

    @@ -1921,24 +2209,25 @@ les configurations de mandataires inverses ProxyPassReverse, ProxyPassReverseCookieDomain et ProxyPassReverseCookiePath, permet de - configurer dynamiquement un mandataire inverse à l'aide de - variables d'environnement, ces dernières pouvant être définies par un + configurer dynamiquement un mandataire inverse à l'aide de + variables d'environnement, ces dernières pouvant être définies par un autre module comme mod_rewrite. Elle affecte les directives ProxyPass, ProxyPassReverse, ProxyPassReverseCookieDomain, et ProxyPassReverseCookiePath, en leur indiquant - de remplacer la chaîne ${nom_var} dans les directives + de remplacer la chaîne ${nom_var} dans les directives de configuration par la valeur de la variable d'environnement - nom_var.

    -

    Conservez cette directive à off (pour les performances du - serveur), sauf si vous en avez réellement besoin.

    + nom_var (si l'option interpolate est + spécifiée).

    +

    Conservez cette directive à off (pour les performances du + serveur), sauf si vous en avez réellement besoin.

    ProxyStatus -Affiche l'état du répartiteur de charge du mandataire dans +Affiche l'état du répartiteur de charge du mandataire dans mod_status ProxyStatus Off|On|Full ProxyStatus Off @@ -1948,11 +2237,11 @@ mod_status Disponible depuis la version 2.2 d'Apache -

    Cette directive permet de spécifier si les données d'état du - répartiteur de charge du mandataire doivent être affichées via la - page d'état du serveur du module mod_status.

    +

    Cette directive permet de spécifier si les données d'état du + répartiteur de charge du mandataire doivent être affichées via la + page d'état du serveur du module mod_status.

    Note -

    L'argument Full produit le même effet que +

    L'argument Full produit le même effet que l'argument On.

    @@ -1961,8 +2250,8 @@ mod_status ProxyAddHeaders -Ajoute des informations à propos du mandataire aux -en-têtes X-Forwarded-* +Ajoute des informations à propos du mandataire aux +en-têtes X-Forwarded-* ProxyAddHeaders Off|On ProxyAddHeaders On server config @@ -1972,11 +2261,11 @@ en-têtes X-Forwarded-* Disponible depuis la version 2.3.10 -

    Cette directive permet de passer au serveur d'arrière-plan des - informations à propos du mandataire via les en-têtes HTTP +

    Cette directive permet de passer au serveur d'arrière-plan des + informations à propos du mandataire via les en-têtes HTTP X-Forwarded-For, X-Forwarded-Host et X-Forwarded-Server.

    - Utilité -

    Cette option n'est utile que dans le cas du mandat HTTP traité + Utilité +

    Cette option n'est utile que dans le cas du mandat HTTP traité par mod_proxy_http.

    @@ -1984,18 +2273,18 @@ en-têtes X-Forwarded-* ProxySourceAddress -Définit l'adresse IP locale pour les connexions mandatées +Définit l'adresse IP locale pour les connexions mandatées sortantes ProxySourceAddress adresse server config virtual host Disponible depuis la version 2.3.9 - + -

    Cette directive permet de définir une adresse IP locale - spécifique à laquelle faire référence lors d'une connexion à un - serveur d'arrière-plan.

    +

    Cette directive permet de définir une adresse IP locale + spécifique à laquelle faire référence lors d'une connexion à un + serveur d'arrière-plan.

    diff --git a/docs/manual/mod/mod_proxy.xml.ja b/docs/manual/mod/mod_proxy.xml.ja index 6e2035d3f02..c59e075487f 100644 --- a/docs/manual/mod/mod_proxy.xml.ja +++ b/docs/manual/mod/mod_proxy.xml.ja @@ -1,7 +1,7 @@ - + -mod_proxy_ajp - Apache HTTP Server +mod_proxy_ajp - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_ajp

    Available Languages:  en  | + fr  |  ja 

    Description:AJP support module for @@ -46,10 +52,7 @@ large.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Usage

    @@ -69,21 +75,17 @@ (e.g. Apache Tomcat) using the AJP13 protocol. The usage is similar to an HTTP reverse proxy, but uses the ajp:// prefix:

    -

    Simple Reverse Proxy

    - ProxyPass /app ajp://backend.example.com:8009/app -

    +

    Simple Reverse Proxy

    ProxyPass "/app" "ajp://backend.example.com:8009/app"
    +

    Balancers may also be used:

    -

    Balancer Reverse Proxy

    - <Proxy balancer://cluster>
    - - BalancerMember ajp://app1.example.com:8009 loadfactor=1
    - BalancerMember ajp://app2.example.com:8009 loadfactor=2
    - ProxySet lbmethod=bytraffic
    -
    - </Proxy>
    - ProxyPass /app balancer://cluster/app -

    +

    Balancer Reverse Proxy

    <Proxy "balancer://cluster">
    +    BalancerMember "ajp://app1.example.com:8009" loadfactor=1
    +    BalancerMember "ajp://app2.example.com:8009" loadfactor=2
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    +ProxyPass "/app" "balancer://cluster/app"
    +

    Note that usually no ProxyPassReverse @@ -97,10 +99,9 @@ backend. In this case, a redirect header can be rewritten relative to the original host URL (not the backend ajp:// URL), for example:

    -

    Rewriting Proxied Path

    - ProxyPass /apps/foo ajp://backend.example.com:8009/foo
    - ProxyPassReverse /apps/foo http://www.example.com/foo -

    +

    Rewriting Proxied Path

    ProxyPass "/apps/foo" "ajp://backend.example.com:8009/foo"
    +ProxyPassReverse "/apps/foo" "http://www.example.com/foo"
    +

    However, it is usually better to deploy the application on the backend server at the same path as the proxy rather than to take this approach.

    @@ -129,10 +130,10 @@ the connection can be in one of the following states:

    • Idle
      No request is being handled over this connection.
    • -
    • Assigned
      The connecton is handling a specific request.
    • +
    • Assigned
      The connection is handling a specific request.

    Once a connection is assigned to handle a particular request, the basic - request informaton (e.g. HTTP headers, etc) is sent over the connection in + request information (e.g. HTTP headers, etc) is sent over the connection in a highly condensed form (e.g. common strings are encoded as integers). Details of that format are below in Request Packet Structure. If there is a body to the request (content-length > 0), that is sent in a @@ -148,7 +149,7 @@ been transferred yet. This is necessary because the packets have a fixed maximum size and arbitrary amounts of data can be included the body of a request (for uploaded files, for example). (Note: this is unrelated to - HTTP chunked tranfer). + HTTP chunked transfer).

  • END_RESPONSE
    Finish the request-handling cycle.
  • Each message is accompanied by a differently formatted packet of data. @@ -158,11 +159,7 @@

    Basic Packet Structure

    There is a bit of an XDR heritage to this protocol, but it differs in lots of ways (no 4 byte alignment, for example).

    -

    Byte order: I am not clear about the endian-ness of the individual - bytes. I'm guessing the bytes are little-endian, because that's what - XDR specifies, and I'm guessing that sys/socket library is magically - making that so (on the C side). If anyone with a better knowledge of - socket calls can step in, that would be great.

    +

    AJP13 uses network byte order for all data types.

    There are four data types in the protocol: bytes, booleans, integers and strings.

    @@ -203,11 +200,12 @@ suggest that the maximum payload could be as large as 2^16, in fact, the code sets the maximum to be 8K.

    + - + - + @@ -215,7 +213,7 @@ - + @@ -223,11 +221,12 @@
    Packet Format (Server->Container)Packet Format (Server->Container)
    ByteByte 0 1 24...(n+3)
    ContentsContents 0x12 0x34 Data Length (n)
    + - + - + @@ -235,7 +234,7 @@ - + @@ -250,6 +249,7 @@

    The web server can send the following messages to the servlet container:

    Packet Format (Container->Server)Packet Format (Container->Server)
    ByteByte 0 1 24...(n+3)
    ContentsContents A B Data Length (n)
    + @@ -286,11 +286,12 @@

    To ensure some basic security, the container will only actually do the Shutdown if the request comes from the same machine on which it's hosted.

    -

    The first Data packet is send immediatly after the +

    The first Data packet is send immediately after the Forward Request by the web server.

    The servlet container can send the following types of messages to the webserver:

    Code Type of Packet
    + @@ -334,8 +335,7 @@

    Request Packet Structure

    For messages from the server to the container of type Forward Request:

    -
    -AJP13_FORWARD_REQUEST :=
    +    
    AJP13_FORWARD_REQUEST :=
         prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
         method           (byte)
         protocol         (string)
    @@ -348,25 +348,19 @@ AJP13_FORWARD_REQUEST :=
         num_headers      (integer)
         request_headers *(req_header_name req_header_value)
         attributes      *(attribut_name attribute_value)
    -    request_terminator (byte) OxFF
    -    
    + request_terminator (byte) OxFF

    The request_headers have the following structure: -

    -req_header_name :=
    +    

    req_header_name :=
         sc_req_header_name | (string)  [see below for how this is parsed]
     
     sc_req_header_name := 0xA0xx (integer)
     
    -req_header_value := (string)
    -
    +req_header_value := (string)

    The attributes are optional and have the following structure:

    -
    -attribute_name := sc_a_name | (sc_a_req_attribute string)
    -
    -attribute_value := (string)
    +    
    attribute_name := sc_a_name | (sc_a_req_attribute string)
     
    -    
    +attribute_value := (string)

    Not that the all-important header is content-length, because it determines whether or not the container looks for another packet immediately.

    @@ -455,7 +449,7 @@ attribute_value := (string) header names. If the first byte is not 0xA0, it assumes that the two-byte integer is the length of a string, which is then read in.

    This works on the assumption that no header names will have length - greater than 0x9999 (==0xA000 - 1), which is perfectly + greater than 0x9FFF (==0xA000 - 1), which is perfectly reasonable, though somewhat arbitrary.

    Note:

    The content-length header is extremely @@ -519,8 +513,7 @@ attribute_value := (string)

    Response Packet Structure

    for messages which the container can send back to the server.

    -
    -AJP13_SEND_BODY_CHUNK :=
    +    
    AJP13_SEND_BODY_CHUNK :=
       prefix_code   3
       chunk_length  (integer)
       chunk        *(byte)
    @@ -548,8 +541,7 @@ AJP13_END_RESPONSE :=
     
     AJP13_GET_BODY_CHUNK :=
       prefix_code       6
    -  requested_length  (integer)
    -    
    + requested_length (integer)

    Details:

    Send Body Chunk

    The chunk is basically binary data, and is sent directly back to the @@ -580,15 +572,15 @@ AJP13_GET_BODY_CHUNK :=

    End Response

    Signals the end of this request-handling cycle. If the - reuse flag is true (==1), this TCP connection can - now be used to handle new incoming requests. If reuse is false - (anything other than 1 in the actual C code), the connection should + reuse flag is true (anything other than 0 in the actual + C code), this TCP connection can now be used to handle new incoming + requests. If reuse is false (==0), the connection should be closed.

    Get Body Chunk

    The container asks for more data from the request (If the body was too large to fit in the first packet sent over or when the request is - chuncked). The server will send a body packet back with an amount of data + chunked). The server will send a body packet back with an amount of data which is the minimum of the request_length, the maximum send body size (8186 (8 Kbytes - 6)), and the number of bytes actually left to send from the request body.
    @@ -601,8 +593,30 @@ AJP13_GET_BODY_CHUNK :=

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_ajp.html.fr b/docs/manual/mod/mod_proxy_ajp.html.fr new file mode 100644 index 00000000000..dfe7e76086e --- /dev/null +++ b/docs/manual/mod/mod_proxy_ajp.html.fr @@ -0,0 +1,677 @@ + + + + + +mod_proxy_ajp - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_ajp

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    +
    Code Type of Packet
    + + + +
    Description:Module de support AJP pour +mod_proxy
    Statut:Extension
    IdentificateurdeModule:proxy_ajp_module
    FichierSource:mod_proxy_ajp.c
    Compatibilit:Disponible depuis la version 2.1 d'Apache
    +

    Sommaire

    + +

    Ce module ncessite le chargement de mod_proxy. Il fournit le support du Protocole Apache + JServ version 1.3 (nomm dans la suite de ce document + AJP13).

    + +

    Pour tre en mesure d'exploiter le protocole AJP13, + il est donc ncessaire de charger les modules + mod_proxy et mod_proxy_ajp.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +
    top
    +
    +

    Utilisation

    +

    Ce module permet de mandater en inverse un serveur d'application + d'arrire-plan (comme Apache Tomcat) qui utilise le protocole AJP13. + Son utilisation est similaire celle d'un mandataire inverse HTTP, + mais s'appuie sur le prefixe ajp:// :

    + +

    Mandataire inverse simple

    ProxyPass "/app" "ajp://backend.example.com:8009/app"
    +
    + +

    On peut aussi configurer un rpartiteur de charge :

    +

    Mandataire inverse avec rpartiteur de charge

    <Proxy balancer://cluster>
    +    BalancerMember "ajp://app1.example.com:8009" loadfactor=1
    +    BalancerMember "ajp://app2.example.com:8009" loadfactor=2
    +    ProxySet lbmethod=bytraffic
    +</Proxy>
    +ProxyPass "/app" "balancer://cluster/app"
    +
    + +

    Notez qu'en gnral, la directive ProxyPassReverse n'est pas + ncessaire. La requte AJP inclut l'en-tte host original fourni + au mandataire, et le serveur d'application est sens gnrer des + en-ttes auto-rfrenants relatifs cet hte ; aucune rcriture + n'est donc ncessaire.

    + +

    La situation la plus courante dans laquelle la directive ProxyPassReverse est ncessaire se + rencontre lorsque le chemin de l'URL au niveau du mandataire est + diffrente de celle du serveur d'arrire-plan. Dans ce cas, un + en-tte redirect peut tre rcrit relativement l'URL de l'hte + original (et non du serveur d'arrire-plan ajp:// URL) + ; par exemple :

    +

    Rcriture d'un chemin mandat

    ProxyPass "/apps/foo" "ajp://backend.example.com:8009/foo"
    +ProxyPassReverse "/apps/foo" "http://www.example.com/foo"
    +
    +

    Il est cependant prfrable en gnral de dployer l'application + sur le serveur d'arrire-plan avec le mme chemin que sur le + mandataire. +

    +
    top
    +
    +

    Variables d'environnement

    +

    Les variables d'environnement dont le nom possde le prfixe + AJP_ sont transmises au serveur original en tant + qu'attributs de requte AJP (le prfixe AJP_ tant supprim du nom + de la cl).

    +
    top
    +
    +

    Vue d'ensemble du protocole

    +

    Le protocole AJP13 est orient paquet. Le format + binaire a t prfr, probablement pour des raisons de + performances, au format texte pourtant plus lisible. Le serveur web + communique avec le conteneur de servlets sur une connexion TCP. Pour + diminuer la charge induite par le processus de cration de socket, + le serveur web va tenter d'utiliser des connexions TCP persistantes + avec le conteneur de servlets, et de rutiliser les connexions + pendant plusieurs cycles requtes/rponse.

    +

    Lorsqu'une connexion a t assigne une requte particulire, + elle ne sera utilise pour aucune autre jusqu' ce que le cycle de + traitement de la requte se soit termin. En d'autres termes, il n'y + a pas de multiplexage des requtes sur une connexion. Ceci se + traduit par un code beaucoup plus simple chaque extrmit de la + connexion, un nombre plus important de connexions tant cependant + ouvertes en mme temps.

    +

    Lorsque le serveur web a ouvert une connexion vers le conteneur + de servlets, celle-ci peut se trouver dans l'un des tats suivants + :

    +
      +
    • Idle
      Aucune requte n'est traite sur cette + connexion.
    • +
    • Assigned
      La connexion fait l'objet d'un traitement de + requte.
    • +
    +

    Lorsqu'une connexion est assigne au traitement d'une requte + particulire, les informations de base de cette dernire (comme les + en-ttes HTTP, etc...) sont envoyes sur la connexion sous une forme + trs condense (par exemple les chanes courantes sont codes sous + forme d'entiers). Vous trouverez des dtails sur ce format plus + loin dans la structure des paquets de requte. Si la requte possde + un corps (content-length > 0), il est envoy dans un + paquet spar immdiatement aprs.

    +

    A ce moment, le conteneur est probablement prt traiter la + requte. Au cours de ce traitement, il peut renvoyer les messages + suivants au serveur web :

    +
      +
    • SEND_HEADERS
      Renvoie un jeu d'en-ttes au navigateur.
    • +
    • SEND_BODY_CHUNK
      Renvoie un tronon de corps de requte au + navigateur. +
    • +
    • GET_BODY_CHUNK
      Reoit un autre tronon de donnes de la + requte si elle n'a pas encore t transmise intgralement. Ce type + de transmission est ncessaire car les paquets possdent une taille + maximale fixe, et des quantits quelconques de donnes peuvent tre + contenues dans le corps de la requte (pour un chargement de + fichier, par exemple). Notez que cela n'a rien voir avec le + transfert HTTP fractionn.
    • +
    • END_RESPONSE
      Termine le cycle du traitement de la + requte.
    • +
    +

    Chaque message est associ un paquet de donnes format + diffremment. Voir plus loin les structures des paquets de rponses + pour plus de dtails.

    +
    top
    +
    +

    Structure de base des paquets

    +

    Ce protocole hrite en partie de XDR, mais il diffre sur de + nombreux points (pas d'alignement sur 4 bits, par exemple).

    +

    AJP13 utilise les octets selon leur ordre d'arrive par le rseau + pour tous les types de donnes.

    +

    Le protocole comporte quatre types de donnes : octets, boolens, + entiers et chanes de caractres.

    +
    +
    Octet
    Un seul octet.
    +
    Boolen
    +
    Un seul octet, 1 = vrai, 0 = faux. + L'utilisation d'autres valeurs non nulles (dans le style C) peut + fonctionner dans certains cas, mais pas dans certains autres..
    +
    Entier
    +
    Un nombre compris entre 0 et 2^16 (32768), stock + sur 2 octets en dbutant par l'octet de poids forts.
    +
    Chane
    +
    Une chane de taille variable (longueur limite 2^16). Elle + est code comme suit : les deux premiers octets reprsentent la + longueur de la chane, les octets suivants constituent la chane + proprement dite (y compris le '\0' final). Notez que la longueur + encode dans les deux premiers octets ne prend pas en compte le + '\0' final, de la mme manire que strlen. Cela peut + prter confusion du point de vue de Java qui est surcharg de + dclarations d'autoincrmentation tranges destines traiter + ces terminateurs. Je suppose que le but dans lequel cela a + t conu ainsi tait de permettre au code C d'tre plus efficace + lors de la lecture de chanes en provenance du conteneur de + servlets -- avec le caractre \0 final, le code C peut transmettre + des rfrences dans un seul tampon, sans avoir effectuer de + copie. En l'absence du caractre \0 final, le code C doit + effectuer une copie afin de pouvoir tenir compte de sa notion de + chane.
    +
    + +

    Taille du paquet

    +

    Selon la majorit du code, la taille maximale du paquet est de + 8 * 1024 bytes (8K). La taille relle du paquet est + encode dans l'en-tte.

    + +

    En-ttes de paquet

    +

    Les paquets envoys par le serveur vers le conteneur commencent + par 0x1234. Les paquets envoys par le conteneur vers + le serveur commencent par AB (c'est dire le code + ASCII de A suivi du code ASCII de B). Ensuite, vient un entier (cod + comme ci-dessus) reprsentant la longueur des donnes transmises. + Bien que ceci puisse faire croire que la taille maximale des donnes + est de 2^16, le code dfinit en fait ce maximum 8K.

    + + + + + + + + + + + + + + + + + + + + +
    Format du paquet (Serveur->Conteneur)
    Octet01234...(n+3)
    Contenu0x120x34Taille des donnes (n)Data
    + + + + + + + + + + + + + + + + + + + + +
    Format du paquet + (Conteneur->Serveur)
    Octet01234...(n+3)
    ContenuABTaille des donnes (n)Data
    +

    Pour la plupart des paquets, le premier octet de la charge utile + encode le type de message, l'exception des paquets contenant un + corps de requte envoys du serveur vers le conteneur -- ils + comportent un en-tte standard (0x1234 suivi de la taille + du paquet), mais celui-ci n'est suivi d'aucun prfixe.

    +

    Le serveur web peut envoyer les messages suivants au conteneur + de servlets :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CodeType de paquetSignification
    2Fait suivre la requteDbute le cycle de traitement de la requte avec les donnes + qui suivent.
    7ArrtLe serveur web demande au conteneur de s'arrter.
    8PingLe serveur web demande au conteneur de prendre le contrle + (phase de connexion scurise).
    10CPingLe serveur web demande au conteneur de rpondre rapidement + avec un CPong. +
    noneDonnesTaille (2 octets) et les donnes correspondantes.
    +

    des fins de scurit, le conteneur n'effectuera rellement son + Arrt que si la demande provient de la machine par + laquelle il est hberg.

    +

    Le premier paquet Donnes est envoy immdiatement + aprs le paquet Faire suivre la requte par le serveur + web.

    +

    Le conteneur de servlets peut envoyer les types de messages + suivants au serveur web :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CodeType de paquetSignification
    3Envoi d'un tronon de corpsEnvoi d'un tronon de corps depuis le conteneur de servlets + vers le serveur web (et probablement vers le navigateur).
    4Envoie les en-ttesEnvoi des en-ttes de rponse depuis le conteneur de + servlets vers le serveur web (et probablement vers le + navigateur).
    5Fin de la rponseMarque la fin de la rponse (et par consquent du cycle de + traitement de la requte). +
    6Rception du tronon de corps suivantRception de la suite des donnes de la requte si elles + n'ont pas encore t entirement transmises.
    9Rponse CPongLa rponse une requte CPing
    +

    Chacun des messages ci-dessus possde une structure interne + diffrente dont vous trouverez les dtails ci-dessous.

    + +
    top
    +
    +

    Structure des paquets de +requte

    +

    Pour les messages de type Faire suivre la requte depuis + le serveur vers le conteneur :

    +
    AJP13_FORWARD_REQUEST :=
    +    prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
    +    method           (byte)
    +    protocol         (string)
    +    req_uri          (string)
    +    remote_addr      (string)
    +    remote_host      (string)
    +    server_name      (string)
    +    server_port      (integer)
    +    is_ssl           (boolean)
    +    num_headers      (integer)
    +    request_headers *(req_header_name req_header_value)
    +    attributes      *(attribut_name attribute_value)
    +    request_terminator (byte) OxFF
    +

    Les request_headers possdent la structure suivante + : +

    req_header_name :=
    +    sc_req_header_name | (string)  [voir ci-dessous pour la manire dont
    +    ceci est interprt]
    +
    +sc_req_header_name := 0xA0xx (integer)
    +
    +req_header_value := (string)
    +

    Les attributes sont optionnels et possdent la + structure suivante :

    +
    attribute_name := sc_a_name | (sc_a_req_attribute string)
    +
    +attribute_value := (string)
    +

    Un des en-ttes les plus importants est + content-length, car il indique si le conteneur doit ou + non attendre un autre paquet immdiatement.

    +

    Description dtaille de la requte que le serveur + fait suivre vers le conteneur +

    +

    Prfixe de la requte

    +

    Pour toutes les requtes, ce prfixe est 2. Voir ci-dessus pour + les dtails des autres codes de prfixes.

    + +

    Mthode

    +

    La mthode HTTP, encode sous la forme d'un seul octet :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nom commandeCode
    OPTIONS1
    GET2
    HEAD3
    POST4
    PUT5
    DELETE6
    TRACE7
    PROPFIND8
    PROPPATCH9
    MKCOL10
    COPY11
    MOVE12
    LOCK13
    UNLOCK14
    ACL15
    REPORT16
    VERSION-CONTROL17
    CHECKIN18
    CHECKOUT19
    UNCHECKOUT20
    SEARCH21
    MKWORKSPACE22
    UPDATE23
    LABEL24
    MERGE25
    BASELINE_CONTROL26
    MKACTIVITY27
    +

    Les versions futures d'ajp13 pourront transmettre des mthodes + supplmentaires, mme si elles ne font pas partie de cette + liste.

    + +

    protocol, req_uri, remote_addr, remote_host, server_name, + server_port, is_ssl

    +

    Les significations de ces lments sont triviales. Ils sont tous + obligatoires et seront envoys avec chaque requte.

    + +

    En-ttes

    +

    La structure de request_headers est la suivante + : tout d'abord, le nombre d'en-ttes num_headers est + encod, suivi d'une liste de paires nom d'en-tte + req_header_name / valeur req_header_value. + Les noms d'en-ttes courants sont cods sous forme d'entiers afin de + gagner de la place. Si le nom d'en-tte ne fait partie de la liste + des en-ttes courants, il est encod normalement (une chane de + caractres prfixe par la taille). La liste des en-ttes courants + sc_req_header_name avec leurs codes se prsente comme + suit (il sont tous sensibles la casse) :

    + + + + + + + + + + + + + + + + + + + +
    NomValeur du codeNom du code
    accept0xA001SC_REQ_ACCEPT
    accept-charset0xA002SC_REQ_ACCEPT_CHARSET +
    accept-encoding0xA003SC_REQ_ACCEPT_ENCODING +
    accept-language0xA004SC_REQ_ACCEPT_LANGUAGE +
    authorization0xA005SC_REQ_AUTHORIZATION
    connection0xA006SC_REQ_CONNECTION
    content-type0xA007SC_REQ_CONTENT_TYPE
    content-length0xA008SC_REQ_CONTENT_LENGTH
    cookie0xA009SC_REQ_COOKIE
    cookie20xA00ASC_REQ_COOKIE2
    host0xA00BSC_REQ_HOST
    pragma0xA00CSC_REQ_PRAGMA
    referer0xA00DSC_REQ_REFERER
    user-agent0xA00ESC_REQ_USER_AGENT
    +

    Le code Java qui lit ceci extrait l'entier reprsent par les + deux premiers octets, et si le premier octet est + '0xA0', il utilise l'entier reprsent par le deuxime + octet comme index d'un tableau de noms d'en-ttes. Si le premier + octet n'est pas 0xA0, l'entier reprsent par les deux + octets est considr comme la longueur d'une chane qui est alors + lue.

    +

    Ceci ne peut fonctionner que si aucun nom d'en-tte ne possde + une taille suprieure 0x9FFF (==0xA000 - 1), ce qui + est vraisemblable, bien qu'un peu arbitraire.

    +

    Note:

    + L'en-tte content-length est extrmement important. + S'il est prsent et non nul, le conteneur considre que la requte + possde un corps (une requte POST, par exemple), et lit + immdiatement le paquet suivant dans le flux d'entre pour extraire + ce corps. +
    + +

    Attributs

    +

    Les attributs prfixs par ? (par exemple + ?context) sont tous optionnels. Chacun d'eux est + reprsent par un octet correspondant au type de l'attribut et par + sa valeur (chane ou entier). Ils peuvent tre envoys dans un ordre + quelconque (bien que le code C les envoie dans l'ordre ci-dessous). + Un code de terminaison spcial est envoy pour signaler la fin de la + liste des attributs optionnels. La liste des codes est la suivante + :

    + + + + + + + + + + + + + + +
    InformationValeur codeType de valeurNote
    ?context0x01-Non implment + actuellement +
    ?servlet_path0x02-Non implment + actuellement +
    ?remote_user0x03String
    ?auth_type0x04String
    ?query_string0x05String
    ?jvm_route0x06String
    ?ssl_cert0x07String
    ?ssl_cipher0x08String
    ?ssl_session0x09String
    ?req_attribute0x0AStringNom (le + nom de l'attribut vient ensuite)
    ?ssl_key_size0x0BInteger
    are_done0xFF-request_terminator
    +

    context et servlet_path ne sont pas + dfinis actuellement par le code C, et la majorit du code Java + ignore compltement ce qui est envoy par l'intermdiaire de ces + champs (il va mme parfois s'interrompre si une chane est + envoye aprs un de ces codes). Je ne sais pas si c'est une bogue ou + une fonctionnalit non implmente, ou tout simplement du code + obsolte, mais en tout cas, il n'est pris en charge par aucune des + deux extrmits de la connexion.

    +

    remote_user et auth_type concernent + probablement l'authentification au niveau HTTP, et contiennent le + nom de l'utilisateur distant ainsi que le type d'authentification + utilise pour tablir son identit ( savoir Basic, Digest).

    +

    query_string, ssl_cert, + ssl_cipher et ssl_session contiennent les + lments HTTP et HTTPS correspondants.

    +

    jvm_route est utilis dans le cadre des sessions + persistantes, en associant une session utilisateur une instance + Tomcat particulire en prsence de plusieurs rpartiteurs de + charge.

    +

    Au del de cette liste de base, tout autre attribut + supplmentaire peut tre envoy via le code + req_attribute 0x0A. Une paire de chanes + reprsentant le nom et la valeur de l'attribut est envoye + immdiatement aprs chaque instance de ce code. Les variables + d'environnement sont transmises par cette mthode.

    +

    Enfin, lorsque tous les attributs ont t transmis, le + terminateur d'attributs, 0xFF, est envoy. Ce dernier + indique la fois la fin de la liste d'attributs et la fin du paquet + de la requte

    + +
    top
    +
    +

    Structure du paquet de la +rponse

    +

    Pour les messages que le conteneur peut renvoyer au + serveur.

    +
    AJP13_SEND_BODY_CHUNK :=
    +  prefix_code   3
    +  chunk_length  (integer)
    +  chunk        *(byte)
    +  chunk_terminator (byte) Ox00
    +
    +
    +AJP13_SEND_HEADERS :=
    +  prefix_code       4
    +  http_status_code  (integer)
    +  http_status_msg   (string)
    +  num_headers       (integer)
    +  response_headers *(res_header_name header_value)
    +
    +res_header_name :=
    +    sc_res_header_name | (string)   [voir ci-dessous pour la manire
    +    dont ceci est interprt]
    +
    +sc_res_header_name := 0xA0 (byte)
    +
    +header_value := (string)
    +
    +AJP13_END_RESPONSE :=
    +  prefix_code       5
    +  reuse             (boolean)
    +
    +
    +AJP13_GET_BODY_CHUNK :=
    +  prefix_code       6
    +  requested_length  (integer)
    +

    Dtails:

    +

    Envoi d'un tronon de corps

    +

    Le tronon se compose essentiellement de donnes binaires et est + renvoy directement au navigateur.

    + +

    Envoi des en-ttes

    +

    Les code et message d'tat correspondent aux code et message HTTP + habituels (par exemple 200 et OK). Les + noms d'en-ttes de rponses sont cods de la mme faon que les noms + d'en-ttes de requtes. Voir ci-dessus le codage des en-ttes pour + plus de dtails propos de la manire dont les codes se distinguent + des chanes.
    + Les codes des en-ttes courants sont ::

    + + + + + + + + + + + + + +
    NomValeur code
    Content-Type0xA001
    Content-Language0xA002
    Content-Length0xA003
    Date0xA004
    Last-Modified0xA005
    Location0xA006
    Set-Cookie0xA007
    Set-Cookie20xA008
    Servlet-Engine0xA009
    Status0xA00A
    WWW-Authenticate0xA00B
    +

    La valeur de l'en-tte est code immdiatement aprs le code ou + la chane du nom d'en-tte.

    + +

    Fin de la rponse

    +

    Signale la fin de ce cycle de traitement de requte. Si le + drapeau reuse est true (toute valeur autre que + 0 en langage C pur), cette + connexion TCP peut tre rutilise pour traiter de nouvelles + requtes entrantes. Si reuse est false + (==0), la connexion sera ferme.

    + +

    Rception d'un tronon de corps

    +

    Le conteneur rclame la suite des donnes de la requte (dans le + cas o la taille du corps tait trop importante pour pouvoir tre + contenue dans le premier paquet envoy, o lorsque la requte est + fractionne). Le serveur va alors envoyer un paquet contenant une + quantit de donnes correspondant au minimum de la + request_length, la taille maximale de corps envoye + (8186 (8 Koctets - 6)), et le nombre rel d'octets + restants envoyer pour ce corps de requte.
    + S'il ne reste plus de donnes transmettre pour ce corps de requte + (c'est dire si le conteneur de servlets tente de lire au del de + la fin du corps), le serveur va renvoyer un paquet vide + dont la charge utile est de longueur 0 et se prsentant sous la + forme (0x12,0x34,0x00,0x00).

    + +
    + +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 b/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 index 96520482f48..1bd3af57e8c 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_proxy_ajp - Apache HTTP サーバ +mod_proxy_ajp - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_proxy_ajp

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -48,18 +55,18 @@ インターネット全体にとっても危険です。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    +

    トピック

    参照

    +

    ディレクティブ

    +

    このモジュールにディレクティブはありません。

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    プロトコルの概要

    @@ -280,8 +287,7 @@

    リクエストパケット構造

    サーバからコンテナへ送られるメッセージが Forward Request 型の場合 :

    -
    -AJP13_FORWARD_REQUEST :=
    +    
    AJP13_FORWARD_REQUEST :=
         prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
         method           (byte)
         protocol         (string)
    @@ -294,24 +300,18 @@ AJP13_FORWARD_REQUEST :=
         num_headers      (integer)
         request_headers *(req_header_name req_header_value)
         attributes      *(attribut_name attribute_value)
    -    request_terminator (byte) OxFF
    -    
    + request_terminator (byte) OxFF

    request_headers は次のような構造になっています : -

    -req_header_name := 
    +    

    req_header_name := 
         sc_req_header_name | (string)  [see below for how this is parsed]
     
     sc_req_header_name := 0xA0xx (integer)
     
    -req_header_value := (string)
    -
    +req_header_value := (string)

    属性 はオプションで、次のような構造をしています :

    -
    -attribute_name := sc_a_name | (sc_a_req_attribute string)
    -
    -attribute_value := (string)
    +    
    attribute_name := sc_a_name | (sc_a_req_attribute string)
     
    -    
    +attribute_value := (string)

    もっとも重要なヘッダは content-length だということに 注意してください。コンテナは次のパケットを探すかどうかを、 それを見て決めるからです。

    @@ -459,8 +459,7 @@ attribute_value := (string)

    レスポンスパケット構造

    コンテナがサーバに送り返すことのできるメッセージ:

    -
    -AJP13_SEND_BODY_CHUNK :=
    +    
    AJP13_SEND_BODY_CHUNK :=
       prefix_code   3
       chunk_length  (integer)
       chunk        *(byte)
    @@ -487,8 +486,7 @@ AJP13_END_RESPONSE :=
     
     AJP13_GET_BODY_CHUNK :=
       prefix_code       6
    -  requested_length  (integer)
    -    
    + requested_length (integer)

    詳細 :

    Send Body Chunk

    チャンクは基本的にはバイナリデータで、ブラウザに直接送られます。

    @@ -537,9 +535,31 @@ AJP13_GET_BODY_CHUNK :=
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_ajp.xml b/docs/manual/mod/mod_proxy_ajp.xml index 10f25ccdbf4..9cd0e7060d9 100644 --- a/docs/manual/mod/mod_proxy_ajp.xml +++ b/docs/manual/mod/mod_proxy_ajp.xml @@ -57,19 +57,21 @@ an HTTP reverse proxy, but uses the ajp:// prefix:

    Simple Reverse Proxy - ProxyPass /app ajp://backend.example.com:8009/app + + ProxyPass "/app" "ajp://backend.example.com:8009/app" +

    Balancers may also be used:

    Balancer Reverse Proxy - <Proxy balancer://cluster>
    - - BalancerMember ajp://app1.example.com:8009 loadfactor=1
    - BalancerMember ajp://app2.example.com:8009 loadfactor=2
    - ProxySet lbmethod=bytraffic
    -
    - </Proxy>
    - ProxyPass /app balancer://cluster/app + +<Proxy "balancer://cluster"> + BalancerMember "ajp://app1.example.com:8009" loadfactor=1 + BalancerMember "ajp://app2.example.com:8009" loadfactor=2 + ProxySet lbmethod=bytraffic +</Proxy> +ProxyPass "/app" "balancer://cluster/app" +

    Note that usually no @@ -85,8 +87,10 @@ original host URL (not the backend ajp:// URL), for example:

    Rewriting Proxied Path - ProxyPass /apps/foo ajp://backend.example.com:8009/foo
    - ProxyPassReverse /apps/foo http://www.example.com/foo + +ProxyPass "/apps/foo" "ajp://backend.example.com:8009/foo" +ProxyPassReverse "/apps/foo" "http://www.example.com/foo" +

    However, it is usually better to deploy the application on the backend server at the same path as the proxy rather than to take this approach. @@ -116,10 +120,10 @@ the connection can be in one of the following states:

    • Idle
      No request is being handled over this connection.
    • -
    • Assigned
      The connecton is handling a specific request.
    • +
    • Assigned
      The connection is handling a specific request.

    Once a connection is assigned to handle a particular request, the basic - request informaton (e.g. HTTP headers, etc) is sent over the connection in + request information (e.g. HTTP headers, etc) is sent over the connection in a highly condensed form (e.g. common strings are encoded as integers). Details of that format are below in Request Packet Structure. If there is a body to the request (content-length > 0), that is sent in a @@ -135,7 +139,7 @@ been transferred yet. This is necessary because the packets have a fixed maximum size and arbitrary amounts of data can be included the body of a request (for uploaded files, for example). (Note: this is unrelated to - HTTP chunked tranfer). + HTTP chunked transfer).

  • END_RESPONSE
    Finish the request-handling cycle.
  • Each message is accompanied by a differently formatted packet of data. @@ -145,11 +149,7 @@

    Basic Packet Structure

    There is a bit of an XDR heritage to this protocol, but it differs in lots of ways (no 4 byte alignment, for example).

    -

    Byte order: I am not clear about the endian-ness of the individual - bytes. I'm guessing the bytes are little-endian, because that's what - XDR specifies, and I'm guessing that sys/socket library is magically - making that so (on the C side). If anyone with a better knowledge of - socket calls can step in, that would be great.

    +

    AJP13 uses network byte order for all data types.

    There are four data types in the protocol: bytes, booleans, integers and strings.

    @@ -190,11 +190,12 @@ suggest that the maximum payload could be as large as 2^16, in fact, the code sets the maximum to be 8K.

    説明:mod_proxy で AJP をサポートするためのモジュール
    ステータス:Extension
    + - + - + @@ -202,7 +203,7 @@ - + @@ -210,11 +211,12 @@
    Packet Format (Server->Container)Packet Format (Server->Container)
    ByteByte 0 1 24...(n+3)
    ContentsContents 0x12 0x34 Data Length (n)
    + - + - + @@ -222,7 +224,7 @@ - + @@ -237,6 +239,7 @@

    The web server can send the following messages to the servlet container:

    Packet Format (Container->Server)Packet Format (Container->Server)
    ByteByte 0 1 24...(n+3)
    ContentsContents A B Data Length (n)
    + @@ -273,11 +276,12 @@

    To ensure some basic security, the container will only actually do the Shutdown if the request comes from the same machine on which it's hosted.

    -

    The first Data packet is send immediatly after the +

    The first Data packet is send immediately after the Forward Request by the web server.

    The servlet container can send the following types of messages to the webserver:

    Code Type of Packet
    + @@ -441,7 +445,7 @@ attribute_value := (string) header names. If the first byte is not 0xA0, it assumes that the two-byte integer is the length of a string, which is then read in.

    This works on the assumption that no header names will have length - greater than 0x9999 (==0xA000 - 1), which is perfectly + greater than 0x9FFF (==0xA000 - 1), which is perfectly reasonable, though somewhat arbitrary.

    Note: The content-length header is extremely @@ -566,15 +570,15 @@ AJP13_GET_BODY_CHUNK :=
    End Response

    Signals the end of this request-handling cycle. If the - reuse flag is true (==1), this TCP connection can - now be used to handle new incoming requests. If reuse is false - (anything other than 1 in the actual C code), the connection should + reuse flag is true (anything other than 0 in the actual + C code), this TCP connection can now be used to handle new incoming + requests. If reuse is false (==0), the connection should be closed.

    Get Body Chunk

    The container asks for more data from the request (If the body was too large to fit in the first packet sent over or when the request is - chuncked). The server will send a body packet back with an amount of data + chunked). The server will send a body packet back with an amount of data which is the minimum of the request_length, the maximum send body size (8186 (8 Kbytes - 6)), and the number of bytes actually left to send from the request body.
    diff --git a/docs/manual/mod/mod_proxy_ajp.xml.fr b/docs/manual/mod/mod_proxy_ajp.xml.fr new file mode 100644 index 00000000000..36bf317365c --- /dev/null +++ b/docs/manual/mod/mod_proxy_ajp.xml.fr @@ -0,0 +1,651 @@ + + + + + + + + + + + +mod_proxy_ajp +Module de support AJP pour +mod_proxy +Extension +mod_proxy_ajp.c +proxy_ajp_module +Disponible depuis la version 2.1 d'Apache + +

    +

    Ce module nécessite le chargement de mod_proxy. Il fournit le support du Protocole Apache + JServ version 1.3 (nommé dans la suite de ce document + AJP13).

    + +

    Pour être en mesure d'exploiter le protocole AJP13, + il est donc nécessaire de charger les modules + mod_proxy et mod_proxy_ajp.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +mod_proxy +Documentation sur les variables +d'environnement + +
    Utilisation +

    Ce module permet de mandater en inverse un serveur d'application + d'arrière-plan (comme Apache Tomcat) qui utilise le protocole AJP13. + Son utilisation est similaire à celle d'un mandataire inverse HTTP, + mais s'appuie sur le prefixe ajp:// :

    + + Mandataire inverse simple + + ProxyPass "/app" "ajp://backend.example.com:8009/app" + + + +

    On peut aussi configurer un répartiteur de charge :

    + Mandataire inverse avec répartiteur de charge + +<Proxy balancer://cluster> + BalancerMember "ajp://app1.example.com:8009" loadfactor=1 + BalancerMember "ajp://app2.example.com:8009" loadfactor=2 + ProxySet lbmethod=bytraffic +</Proxy> +ProxyPass "/app" "balancer://cluster/app" + + + +

    Notez qu'en général, la directive ProxyPassReverse n'est pas + nécessaire. La requête AJP inclut l'en-tête host original fourni + au mandataire, et le serveur d'application est sensé générer des + en-têtes auto-référençants relatifs à cet hôte ; aucune réécriture + n'est donc nécessaire.

    + +

    La situation la plus courante dans laquelle la directive ProxyPassReverse est nécessaire se + rencontre lorsque le chemin de l'URL au niveau du mandataire est + différente de celle du serveur d'arrière-plan. Dans ce cas, un + en-tête redirect peut être réécrit relativement à l'URL de l'hôte + original (et non du serveur d'arrière-plan ajp:// URL) + ; par exemple :

    + Réécriture d'un chemin mandaté + +ProxyPass "/apps/foo" "ajp://backend.example.com:8009/foo" +ProxyPassReverse "/apps/foo" "http://www.example.com/foo" + + +

    Il est cependant préférable en général de déployer l'application + sur le serveur d'arrière-plan avec le même chemin que sur le + mandataire. +

    +
    + +
    Variables d'environnement +

    Les variables d'environnement dont le nom possède le préfixe + AJP_ sont transmises au serveur original en tant + qu'attributs de requête AJP (le préfixe AJP_ étant supprimé du nom + de la clé).

    +
    + +
    Vue d'ensemble du protocole +

    Le protocole AJP13 est orienté paquet. Le format + binaire a été préféré, probablement pour des raisons de + performances, au format texte pourtant plus lisible. Le serveur web + communique avec le conteneur de servlets sur une connexion TCP. Pour + diminuer la charge induite par le processus de création de socket, + le serveur web va tenter d'utiliser des connexions TCP persistantes + avec le conteneur de servlets, et de réutiliser les connexions + pendant plusieurs cycles requêtes/réponse.

    +

    Lorsqu'une connexion a été assignée à une requête particulière, + elle ne sera utilisée pour aucune autre jusqu'à ce que le cycle de + traitement de la requête se soit terminé. En d'autres termes, il n'y + a pas de multiplexage des requêtes sur une connexion. Ceci se + traduit par un code beaucoup plus simple à chaque extrémité de la + connexion, un nombre plus important de connexions étant cependant + ouvertes en même temps.

    +

    Lorsque le serveur web a ouvert une connexion vers le conteneur + de servlets, celle-ci peut se trouver dans l'un des états suivants + :

    +
      +
    • Idle
      Aucune requête n'est traitée sur cette + connexion.
    • +
    • Assigned
      La connexion fait l'objet d'un traitement de + requête.
    • +
    +

    Lorsqu'une connexion est assignée au traitement d'une requête + particulière, les informations de base de cette dernière (comme les + en-têtes HTTP, etc...) sont envoyées sur la connexion sous une forme + très condensée (par exemple les chaînes courantes sont codées sous + forme d'entiers). Vous trouverez des détails sur ce format plus + loin dans la structure des paquets de requête. Si la requête possède + un corps (content-length > 0), il est envoyé dans un + paquet séparé immédiatement après.

    +

    A ce moment, le conteneur est probablement prêt à traiter la + requête. Au cours de ce traitement, il peut renvoyer les messages + suivants au serveur web :

    +
      +
    • SEND_HEADERS
      Renvoie un jeu d'en-têtes au navigateur.
    • +
    • SEND_BODY_CHUNK
      Renvoie un tronçon de corps de requête au + navigateur. +
    • +
    • GET_BODY_CHUNK
      Reçoit un autre tronçon de données de la + requête si elle n'a pas encore été transmise intégralement. Ce type + de transmission est nécessaire car les paquets possèdent une taille + maximale fixe, et des quantités quelconques de données peuvent être + contenues dans le corps de la requête (pour un chargement de + fichier, par exemple). Notez que cela n'a rien à voir avec le + transfert HTTP fractionné.
    • +
    • END_RESPONSE
      Termine le cycle du traitement de la + requête.
    • +
    +

    Chaque message est associé à un paquet de données formaté + différemment. Voir plus loin les structures des paquets de réponses + pour plus de détails.

    +
    + +
    Structure de base des paquets +

    Ce protocole hérite en partie de XDR, mais il diffère sur de + nombreux points (pas d'alignement sur 4 bits, par exemple).

    +

    AJP13 utilise les octets selon leur ordre d'arrivée par le réseau + pour tous les types de données.

    +

    Le protocole comporte quatre types de données : octets, booléens, + entiers et chaînes de caractères.

    +
    +
    Octet
    Un seul octet.
    +
    Booléen
    +
    Un seul octet, 1 = vrai, 0 = faux. + L'utilisation d'autres valeurs non nulles (dans le style C) peut + fonctionner dans certains cas, mais pas dans certains autres..
    +
    Entier
    +
    Un nombre compris entre 0 et 2^16 (32768), stocké + sur 2 octets en débutant par l'octet de poids forts.
    +
    Chaîne
    +
    Une chaîne de taille variable (longueur limitée à 2^16). Elle + est codée comme suit : les deux premiers octets représentent la + longueur de la chaîne, les octets suivants constituent la chaîne + proprement dite (y compris le '\0' final). Notez que la longueur + encodée dans les deux premiers octets ne prend pas en compte le + '\0' final, de la même manière que strlen. Cela peut + prêter à confusion du point de vue de Java qui est surchargé de + déclarations d'autoincrémentation étranges destinées à traiter + ces terminateurs. Je suppose que le but dans lequel cela a + été conçu ainsi était de permettre au code C d'être plus efficace + lors de la lecture de chaînes en provenance du conteneur de + servlets -- avec le caractère \0 final, le code C peut transmettre + des références dans un seul tampon, sans avoir à effectuer de + copie. En l'absence du caractère \0 final, le code C doit + effectuer une copie afin de pouvoir tenir compte de sa notion de + chaîne.
    +
    + +
    Taille du paquet +

    Selon la majorité du code, la taille maximale du paquet est de + 8 * 1024 bytes (8K). La taille réelle du paquet est + encodée dans l'en-tête.

    +
    +
    En-têtes de paquet +

    Les paquets envoyés par le serveur vers le conteneur commencent + par 0x1234. Les paquets envoyés par le conteneur vers + le serveur commencent par AB (c'est à dire le code + ASCII de A suivi du code ASCII de B). Ensuite, vient un entier (codé + comme ci-dessus) représentant la longueur des données transmises. + Bien que ceci puisse faire croire que la taille maximale des données + est de 2^16, le code définit en fait ce maximum à 8K.

    +
    Code Type of Packet
    + + + + + + + + + + + + + + + + + + + +
    Format du paquet (Serveur->Conteneur)
    Octet01234...(n+3)
    Contenu0x120x34Taille des données (n)Data
    + + + + + + + + + + + + + + + + + + + + +
    Format du paquet + (Conteneur->Serveur)
    Octet01234...(n+3)
    ContenuABTaille des données (n)Data
    +

    Pour la plupart des paquets, le premier octet de la charge utile + encode le type de message, à l'exception des paquets contenant un + corps de requête envoyés du serveur vers le conteneur -- ils + comportent un en-tête standard (0x1234 suivi de la taille + du paquet), mais celui-ci n'est suivi d'aucun préfixe.

    +

    Le serveur web peut envoyer les messages suivants au conteneur + de servlets :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CodeType de paquetSignification
    2Fait suivre la requêteDébute le cycle de traitement de la requête avec les données + qui suivent.
    7ArrêtLe serveur web demande au conteneur de s'arrêter.
    8PingLe serveur web demande au conteneur de prendre le contrôle + (phase de connexion sécurisée).
    10CPingLe serveur web demande au conteneur de répondre rapidement + avec un CPong. +
    noneDonnéesTaille (2 octets) et les données correspondantes.
    +

    À des fins de sécurité, le conteneur n'effectuera réellement son + Arrêt que si la demande provient de la machine par + laquelle il est hébergé.

    +

    Le premier paquet Données est envoyé immédiatement + après le paquet Faire suivre la requête par le serveur + web.

    +

    Le conteneur de servlets peut envoyer les types de messages + suivants au serveur web :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CodeType de paquetSignification
    3Envoi d'un tronçon de corpsEnvoi d'un tronçon de corps depuis le conteneur de servlets + vers le serveur web (et probablement vers le navigateur).
    4Envoie les en-têtesEnvoi des en-têtes de réponse depuis le conteneur de + servlets vers le serveur web (et probablement vers le + navigateur).
    5Fin de la réponseMarque la fin de la réponse (et par conséquent du cycle de + traitement de la requête). +
    6Réception du tronçon de corps suivantRéception de la suite des données de la requête si elles + n'ont pas encore été entièrement transmises.
    9Réponse CPongLa réponse à une requête CPing
    +

    Chacun des messages ci-dessus possède une structure interne + différente dont vous trouverez les détails ci-dessous.

    + + +
    Structure des paquets de +requête +

    Pour les messages de type Faire suivre la requête depuis + le serveur vers le conteneur :

    +
    +AJP13_FORWARD_REQUEST :=
    +    prefix_code      (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
    +    method           (byte)
    +    protocol         (string)
    +    req_uri          (string)
    +    remote_addr      (string)
    +    remote_host      (string)
    +    server_name      (string)
    +    server_port      (integer)
    +    is_ssl           (boolean)
    +    num_headers      (integer)
    +    request_headers *(req_header_name req_header_value)
    +    attributes      *(attribut_name attribute_value)
    +    request_terminator (byte) OxFF
    +    
    +

    Les request_headers possèdent la structure suivante + : +

    +req_header_name :=
    +    sc_req_header_name | (string)  [voir ci-dessous pour la manière dont
    +    ceci est interprété]
    +
    +sc_req_header_name := 0xA0xx (integer)
    +
    +req_header_value := (string)
    +
    +

    Les attributes sont optionnels et possèdent la + structure suivante :

    +
    +attribute_name := sc_a_name | (sc_a_req_attribute string)
    +
    +attribute_value := (string)
    +
    +    
    +

    Un des en-têtes les plus importants est + content-length, car il indique si le conteneur doit ou + non attendre un autre paquet immédiatement.

    +
    Description détaillée de la requête que le serveur + fait suivre vers le conteneur +
    +
    Préfixe de la requête +

    Pour toutes les requêtes, ce préfixe est 2. Voir ci-dessus pour + les détails des autres codes de préfixes.

    +
    +
    Méthode +

    La méthode HTTP, encodée sous la forme d'un seul octet :

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nom commandeCode
    OPTIONS1
    GET2
    HEAD3
    POST4
    PUT5
    DELETE6
    TRACE7
    PROPFIND8
    PROPPATCH9
    MKCOL10
    COPY11
    MOVE12
    LOCK13
    UNLOCK14
    ACL15
    REPORT16
    VERSION-CONTROL17
    CHECKIN18
    CHECKOUT19
    UNCHECKOUT20
    SEARCH21
    MKWORKSPACE22
    UPDATE23
    LABEL24
    MERGE25
    BASELINE_CONTROL26
    MKACTIVITY27
    +

    Les versions futures d'ajp13 pourront transmettre des méthodes + supplémentaires, même si elles ne font pas partie de cette + liste.

    +
    +
    protocol, req_uri, remote_addr, remote_host, server_name, + server_port, is_ssl +

    Les significations de ces éléments sont triviales. Ils sont tous + obligatoires et seront envoyés avec chaque requête.

    +
    +
    En-têtes +

    La structure de request_headers est la suivante + : tout d'abord, le nombre d'en-têtes num_headers est + encodé, suivi d'une liste de paires nom d'en-tête + req_header_name / valeur req_header_value. + Les noms d'en-têtes courants sont codés sous forme d'entiers afin de + gagner de la place. Si le nom d'en-tête ne fait partie de la liste + des en-têtes courants, il est encodé normalement (une chaîne de + caractères préfixée par la taille). La liste des en-têtes courants + sc_req_header_name avec leurs codes se présente comme + suit (il sont tous sensibles à la casse) :

    + + + + + + + + + + + + + + + + + + + +
    NomValeur du codeNom du code
    accept0xA001SC_REQ_ACCEPT
    accept-charset0xA002SC_REQ_ACCEPT_CHARSET +
    accept-encoding0xA003SC_REQ_ACCEPT_ENCODING +
    accept-language0xA004SC_REQ_ACCEPT_LANGUAGE +
    authorization0xA005SC_REQ_AUTHORIZATION
    connection0xA006SC_REQ_CONNECTION
    content-type0xA007SC_REQ_CONTENT_TYPE
    content-length0xA008SC_REQ_CONTENT_LENGTH
    cookie0xA009SC_REQ_COOKIE
    cookie20xA00ASC_REQ_COOKIE2
    host0xA00BSC_REQ_HOST
    pragma0xA00CSC_REQ_PRAGMA
    referer0xA00DSC_REQ_REFERER
    user-agent0xA00ESC_REQ_USER_AGENT
    +

    Le code Java qui lit ceci extrait l'entier représenté par les + deux premiers octets, et si le premier octet est + '0xA0', il utilise l'entier représenté par le deuxième + octet comme index d'un tableau de noms d'en-têtes. Si le premier + octet n'est pas 0xA0, l'entier représenté par les deux + octets est considéré comme la longueur d'une chaîne qui est alors + lue.

    +

    Ceci ne peut fonctionner que si aucun nom d'en-tête ne possède + une taille supérieure à 0x9FFF (==0xA000 - 1), ce qui + est vraisemblable, bien qu'un peu arbitraire.

    + Note: + L'en-tête content-length est extrêmement important. + S'il est présent et non nul, le conteneur considère que la requête + possède un corps (une requête POST, par exemple), et lit + immédiatement le paquet suivant dans le flux d'entrée pour extraire + ce corps. + +
    +
    Attributs +

    Les attributs préfixés par ? (par exemple + ?context) sont tous optionnels. Chacun d'eux est + représenté par un octet correspondant au type de l'attribut et par + sa valeur (chaîne ou entier). Ils peuvent être envoyés dans un ordre + quelconque (bien que le code C les envoie dans l'ordre ci-dessous). + Un code de terminaison spécial est envoyé pour signaler la fin de la + liste des attributs optionnels. La liste des codes est la suivante + :

    + + + + + + + + + + + + + + +
    InformationValeur codeType de valeurNote
    ?context0x01-Non implémenté + actuellement +
    ?servlet_path0x02-Non implémenté + actuellement +
    ?remote_user0x03String
    ?auth_type0x04String
    ?query_string0x05String
    ?jvm_route0x06String
    ?ssl_cert0x07String
    ?ssl_cipher0x08String
    ?ssl_session0x09String
    ?req_attribute0x0AStringNom (le + nom de l'attribut vient ensuite)
    ?ssl_key_size0x0BInteger
    are_done0xFF-request_terminator
    +

    context et servlet_path ne sont pas + définis actuellement par le code C, et la majorité du code Java + ignore complètement ce qui est envoyé par l'intermédiaire de ces + champs (il va même parfois s'interrompre si une chaîne est + envoyée après un de ces codes). Je ne sais pas si c'est une bogue ou + une fonctionnalité non implémentée, ou tout simplement du code + obsolète, mais en tout cas, il n'est pris en charge par aucune des + deux extrémités de la connexion.

    +

    remote_user et auth_type concernent + probablement l'authentification au niveau HTTP, et contiennent le + nom de l'utilisateur distant ainsi que le type d'authentification + utilisée pour établir son identité (à savoir Basic, Digest).

    +

    query_string, ssl_cert, + ssl_cipher et ssl_session contiennent les + éléments HTTP et HTTPS correspondants.

    +

    jvm_route est utilisé dans le cadre des sessions + persistantes, en associant une session utilisateur à une instance + Tomcat particulière en présence de plusieurs répartiteurs de + charge.

    +

    Au delà de cette liste de base, tout autre attribut + supplémentaire peut être envoyé via le code + req_attribute 0x0A. Une paire de chaînes + représentant le nom et la valeur de l'attribut est envoyée + immédiatement après chaque instance de ce code. Les variables + d'environnement sont transmises par cette méthode.

    +

    Enfin, lorsque tous les attributs ont été transmis, le + terminateur d'attributs, 0xFF, est envoyé. Ce dernier + indique à la fois la fin de la liste d'attributs et la fin du paquet + de la requête

    +
    +
    + +
    Structure du paquet de la +réponse +

    Pour les messages que le conteneur peut renvoyer au + serveur.

    +
    +AJP13_SEND_BODY_CHUNK :=
    +  prefix_code   3
    +  chunk_length  (integer)
    +  chunk        *(byte)
    +  chunk_terminator (byte) Ox00
    +
    +
    +AJP13_SEND_HEADERS :=
    +  prefix_code       4
    +  http_status_code  (integer)
    +  http_status_msg   (string)
    +  num_headers       (integer)
    +  response_headers *(res_header_name header_value)
    +
    +res_header_name :=
    +    sc_res_header_name | (string)   [voir ci-dessous pour la manière
    +    dont ceci est interprété]
    +
    +sc_res_header_name := 0xA0 (byte)
    +
    +header_value := (string)
    +
    +AJP13_END_RESPONSE :=
    +  prefix_code       5
    +  reuse             (boolean)
    +
    +
    +AJP13_GET_BODY_CHUNK :=
    +  prefix_code       6
    +  requested_length  (integer)
    +    
    +
    Détails:
    +
    Envoi d'un tronçon de corps +

    Le tronçon se compose essentiellement de données binaires et est + renvoyé directement au navigateur.

    +
    +
    Envoi des en-têtes +

    Les code et message d'état correspondent aux code et message HTTP + habituels (par exemple 200 et OK). Les + noms d'en-têtes de réponses sont codés de la même façon que les noms + d'en-têtes de requêtes. Voir ci-dessus le codage des en-têtes pour + plus de détails à propos de la manière dont les codes se distinguent + des chaînes.
    + Les codes des en-têtes courants sont ::

    + + + + + + + + + + + + + +
    NomValeur code
    Content-Type0xA001
    Content-Language0xA002
    Content-Length0xA003
    Date0xA004
    Last-Modified0xA005
    Location0xA006
    Set-Cookie0xA007
    Set-Cookie20xA008
    Servlet-Engine0xA009
    Status0xA00A
    WWW-Authenticate0xA00B
    +

    La valeur de l'en-tête est codée immédiatement après le code ou + la chaîne du nom d'en-tête.

    +
    +
    Fin de la réponse +

    Signale la fin de ce cycle de traitement de requête. Si le + drapeau reuse est à true (toute valeur autre que + 0 en langage C pur), cette + connexion TCP peut être réutilisée pour traiter de nouvelles + requêtes entrantes. Si reuse est à false + (==0), la connexion sera fermée.

    +
    +
    Réception d'un tronçon de corps +

    Le conteneur réclame la suite des données de la requête (dans le + cas où la taille du corps était trop importante pour pouvoir être + contenue dans le premier paquet envoyé, où lorsque la requête est + fractionnée). Le serveur va alors envoyer un paquet contenant une + quantité de données correspondant au minimum de la + request_length, la taille maximale de corps envoyée + (8186 (8 Koctets - 6)), et le nombre réel d'octets + restants à envoyer pour ce corps de requête.
    + S'il ne reste plus de données à transmettre pour ce corps de requête + (c'est à dire si le conteneur de servlets tente de lire au delà de + la fin du corps), le serveur va renvoyer un paquet vide + dont la charge utile est de longueur 0 et se présentant sous la + forme (0x12,0x34,0x00,0x00).

    +
    +
    + + + diff --git a/docs/manual/mod/mod_proxy_ajp.xml.ja b/docs/manual/mod/mod_proxy_ajp.xml.ja index 835f9c507a2..698975c2c9a 100644 --- a/docs/manual/mod/mod_proxy_ajp.xml.ja +++ b/docs/manual/mod/mod_proxy_ajp.xml.ja @@ -1,7 +1,7 @@ - + -mod_proxy_balancer - Apache HTTP Server +mod_proxy_balancer - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_balancer

    Available Languages:  en  | + fr  |  ja 

    @@ -31,16 +37,23 @@
    Description:mod_proxy extension for load balancing
    Compatibility:Available in version 2.1 and later

    Summary

    -

    This module requires the service of mod_proxy. It provides load balancing support for - HTTP, FTP and AJP13 protocols -

    - -

    Load balancing scheduler algorithm is provided by not this - module but other modules such as: - mod_lbmethod_byrequests, - mod_lbmethod_bytraffic and - mod_lbmethod_bybusyness. -

    +

    This module requires the service of mod_proxy and it provides load balancing for + all the supported protocols. The most important ones are:

    + + +

    The Load balancing scheduler algorithm is not provided by this + module but from other ones such as:

    +

    Thus, in order to get the ability of load balancing, mod_proxy, mod_proxy_balancer @@ -53,10 +66,7 @@ large.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    + +
  • Comments
  • top

    Load balancer scheduler algorithm

    @@ -105,31 +118,28 @@ load balancing between two back-end servers:

    -

    - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80
    - BalancerMember http://192.168.1.51:80
    - </Proxy>
    - ProxyPass /test balancer://mycluster
    - ProxyPassReverse /test balancer://mycluster -

    +
    <Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80"
    +    BalancerMember "http://192.168.1.51:80"
    +</Proxy>
    +ProxyPass "/test" "balancer://mycluster"
    +ProxyPassReverse "/test" "balancer://mycluster"
    +

    Another example of how to provide load balancing with stickyness using mod_headers, even if the back-end server does not set a suitable session cookie:

    -

    - Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" - env=BALANCER_ROUTE_CHANGED
    - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80 route=1
    - BalancerMember http://192.168.1.51:80 route=2
    - ProxySet stickysession=ROUTEID
    - </Proxy>
    - ProxyPass /test balancer://mycluster
    - ProxyPassReverse /test balancer://mycluster -

    +
    Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
    +<Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80" route=1
    +    BalancerMember "http://192.168.1.51:80" route=2
    +    ProxySet stickysession=ROUTEID
    +</Proxy>
    +ProxyPass "/test" "balancer://mycluster"
    +ProxyPassReverse "/test" "balancer://mycluster"
    +
    top

    Exported Environment Variables

    @@ -191,7 +201,7 @@ mod_status. Balancer manager enables dynamic update of balancer members. You can use balancer manager to change the balance - factor or a particular member, or put it in the off line + factor of a particular member, or put it in the off line mode.

    @@ -202,17 +212,17 @@

    To enable load balancer management for browsers from the example.com domain add this code to your httpd.conf configuration file

    -

    - <Location /balancer-manager>
    - SetHandler balancer-manager
    -
    - Require host example.com
    - </Location> -

    +
    <Location "/balancer-manager">
    +    SetHandler balancer-manager
    +    Require host example.com
    +</Location>
    +

    You can now access load balancer manager by using a Web browser to access the page - http://your.server.name/balancer-manager

    + http://your.server.name/balancer-manager. Please note + that only Balancers defined outside of <Location ...> + containers can be dynamically controlled by the Manager.

    top

    Details on load balancer stickyness

    @@ -262,20 +272,19 @@

    Finally you can support cookies and URL encoding at the same time, by configuring the name of the cookie and the name of the URL parameter separated by a vertical bar (|) as in the following example:

    -

    - ProxyPass /test balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On
    - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80 route=node1
    - BalancerMember http://192.168.1.51:80 route=node2
    - </Proxy>
    -

    +
    ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On
    +<Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80" route=node1
    +    BalancerMember "http://192.168.1.51:80" route=node2
    +</Proxy>
    +

    If the cookie and the request parameter both provide routing information for the same request, the information from the request parameter is used.

    top

    Troubleshooting load balancer stickyness

    -

    If you experience stickyness errors, e.g. users loose their +

    If you experience stickyness errors, e.g. users lose their application sessions and need to login again, you first want to check whether this is because the back-ends are sometimes unavailable or whether your configuration is wrong. To find out about possible @@ -318,8 +327,30 @@

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_balancer.html.fr b/docs/manual/mod/mod_proxy_balancer.html.fr new file mode 100644 index 00000000000..3cd5643d452 --- /dev/null +++ b/docs/manual/mod/mod_proxy_balancer.html.fr @@ -0,0 +1,402 @@ + + + + + +mod_proxy_balancer - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_balancer

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    + + + + +
    Description:Extension de mod_proxy pour le support de +la rpartition de charge
    Statut:Extension
    IdentificateurdeModule:proxy_balancer_module
    FichierSource:mod_proxy_balancer.c
    Compatibilit:Disponible depuis la version 2.1 d'Apache
    +

    Sommaire

    + +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy, et il fournit le support de + la rpartition de charge pour tous les protocoles supports. Parmi ces + protocoles, les plus importants sont :

    + + + +

    L'algorithme de planification de la rpartition de charge n'est pas + fourni par ce module, mais par ceux-ci :

    + + +

    Ainsi, pour mettre en oeuvre la rpartition de charge, + mod_proxy, mod_proxy_balancer et + au moins un des modules fournissant l'algorithme de planification de + la rpartition de charge doivent tre chargs dans le serveur.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +
    top
    +
    +

    L'algorithme de planification de la rpartition de + charge

    + +

    A l'heure actuelle, 3 algorithmes de planification de la + rpartition de charge sont disponibles : ils se basent + respectivement sur le comptage des requtes, la mesure du trafic et + le comptage des requtes en attente. Ils sont contrls par la + valeur de lbmethod dans la dfinition du rpartiteur. + Voir la directive ProxyPass pour plus de dtails, et en + particulier la configuration du rpartiteur et de ses membres.

    +
    top
    +
    +

    Rpartition de charge avec abonnement utilisateur + (stickyness)

    + +

    Le rpartiteur supporte l'abonnement utilisateur. Lorsqu'une + requte est mandate vers un serveur d'arrire-plan particulier, + toutes les requtes suivantes du mme utilisateur seront alors + mandates vers le mme serveur d'arrire-plan. De nombreux + rpartiteurs de charge implmentent cette fonctionnalit via une + table qui associe les adresses IP des clients aux serveurs + d'arrire-plan. Cette approche est transparente aux clients et aux + serveurs d'arrire-plan, mais induit certains problmes : + distribution de charge ingale si les clients se trouvent eux-mmes + derrire un mandataire, erreurs d'abonnement lorsqu'un client + possde une adresse IP dynamique qui peut changer au cours d'une + session et perte d'abonnement en cas de dpassement de la table de + correspondances.

    +

    Le module mod_proxy_balancer implmente + l'abonnement selon deux alternatives : les cookies et le codage + d'URL. Le cookie peut tre fourni par le serveur d'arrire-plan ou + par le serveur web Apache lui-mme, alors que le codage d'URL est en + gnral effectu par le serveur d'arrire-plan.

    + +
    top
    +
    +

    Exemples de configuration d'un rpartiteur

    + +

    Avant de nous plonger dans les dtails techniques, voici un + exemple d'utilisation de mod_proxy_balancer mettant + en oeuvre la rpartition de charge entre deux serveurs + d'arrire-plan : +

    + +
    <Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80"
    +    BalancerMember "http://192.168.1.51:80"
    +</Proxy>
    +ProxyPass "/test" "balancer://mycluster"
    +ProxyPassReverse "/test" "balancer://mycluster"
    + + + +

    Voici un autre exemple de rpartiteur de charge avec + abonnement utilisant mod_headers, + fonctionnant mme si le serveur d'arrire-plan ne dfinit pas de + cookie de session appropri : +

    + +
    Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
    +<Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80" route=1
    +    BalancerMember "http://192.168.1.51:80" route=2
    +    ProxySet stickysession=ROUTEID
    +</Proxy>
    +ProxyPass "/test" "balancer://mycluster"
    +ProxyPassReverse "/test" "balancer://mycluster"
    + + +
    top
    +
    +

    Variables d'environnement exportes

    + +

    A l'heure actuelle, 6 variables d'environnement sont exportes :

    + +
    + +
    BALANCER_SESSION_STICKY
    +
    +

    Cette variable se voir assigne la valeur de + stickysession pour la requte courante. Il s'agit du + nom du cookie ou du paramtre de requte utilis pour les sessions + avec abonnement.

    +
    + + +
    BALANCER_SESSION_ROUTE
    +
    +

    Cette variable se voit assigne la route interprte + pour la requte courante.

    +
    + + +
    BALANCER_NAME
    +
    +

    Cette variable se voit assign le nom du rpartiteur pour la + requte courante. Il s'agit d'une valeur du style + balancer://foo.

    +
    + + +
    BALANCER_WORKER_NAME
    +
    +

    Cette variable se voit assign le nom du membre du groupe de + rpartition de charge utilis pour la requte courante. Il s'agit + d'une valeur du style http://hostA:1234.

    +
    + + +
    BALANCER_WORKER_ROUTE
    +
    +

    Cette variable se voit assigne la route du membre du + groupe de rpartition de charge qui sera utilis pour la requte + courante.

    +
    + + +
    BALANCER_ROUTE_CHANGED
    +
    +

    Cette variable est dfinie 1 si la route de la session ne + correspond pas celle du membre du groupe de rpartition de charge + (BALANCER_SESSION_ROUTE != BALANCER_WORKER_ROUTE), ou si la session + ne possde pas encore de route tablie. Elle peut servir + dterminer quand il est ventuellement ncessaire d'envoyer au + client une route mise jour lorsque les sessions persistantes sont + utilises.

    +
    +
    + +
    top
    +
    +

    Activation du support du gestionnaire de rpartiteur

    + +

    Cette fonctionnalit ncessite le chargement du module + mod_status. Le gestionnaire de rpartiteur permet + la mise jour dynamique des membres du groupe de rpartition de + charge. Vous pouvez utiliser le gestionnaire de rpartiteur pour + modifier le facteur de charge d'un membre particulier, ou passer ce + dernier en mode hors ligne. +

    + +

    Ainsi, pour mettre en oeuvre la gestion du rpartiteur de charge, + mod_status et mod_proxy_balancer + doivent tre chargs dans le serveur.

    + +

    Pour permettre la gestion du rpartiteur de charge aux + navigateurs appartenant au domaine example.com, ajoutez ces lignes + votre fichier de configuration httpd.conf :

    +
    <Location "/balancer-manager">
    +    SetHandler balancer-manager
    +    Require host example.com
    +</Location>
    + + +

    Vous pourrez alors accder au gestionnaire du rpartiteur de + charge en utilisant un navigateur web pour afficher la page + http://nom.de.votre.serveur/balancer-manager. Notez que + pour pouvoir contrler dynamiquement un membre de groupe de + rpartition, ce dernier ne doit pas tre dfini au sein d'une + section <Location ...>.

    +
    top
    +
    +

    Dtails propos de la rpartition de charge par abonnement + (stickyness)

    + +

    Si l'abonnement s'appuie sur un cookie, vous devez dfinir le nom + de ce cookie dont le contenu prcise le serveur d'arrire-plan + utiliser. Pour ce faire, on utilise l'attribut + stickysession avec la directive ProxyPass ou ProxySet. Le nom du cookie est + sensible la casse. Le rpartiteur extrait le contenu du cookie et + recherche un serveur membre dont la route correspond + cette valeur. La route doit aussi tre dfinie dans la directive ProxyPass ou ProxySet. Le cookie peut tre dfini + soit par le serveur d'arrire-plan, soit, comme indiqu dans l'exemple ci-dessus par le serveur web Apache + lui-mme.

    +

    Certains serveurs d'arrire-plan, tels qu'Apache Tomcat, + utilisent une forme sensiblement diffrente de cookie d'abonnement. + Tomcat ajoute le nom de l'instance Tomcat la fin de son + identifiant de session, prcd par un point. Ainsi, si le serveur + web Apache trouve un point dans la valeur du cookie d'abonnement, il + n'utilisera que la partie situe aprs ce point pour + rechercher sa route. Pour que Tomcat puisse connatre son nom + d'instance, vous devez dfinir l'attribut jvmRoute dans + son fichier de configuration conf/server.xml la + valeur de la route du serveur qui se connecte au Tomcat + considr. Le nom du cookie de session utilis par Tomcat (et plus + gnralement par les applications web Java base de servlets) est + JSESSIONID (en majuscules), mais peut tre modifi.

    + +

    La seconde mthode pour implmenter l'abonnement est le codage + d'URL. Ici, le serveur web recherche un paramtre dans l'URL de la + requte. Le nom du paramtre est spcifi par l'attribut + stickysession. Pour trouver un serveur membre, on + recherche un serveur dont la route est gale la valeur + du paramtre. Comme il n'est pas ais d'extraire et de manipuler + tous les liens URL contenus dans les rponses, le travail consistant + ajouter les paramtres chaque lien est gnralement effectu par + le serveur d'arrire-plan qui gnre le contenu. Bien qu'il soit + possible dans certains cas d'effectuer ces ajouts au niveau du + serveur web via les modules mod_substitute ou + mod_sed, cette mthode peut dgrader les + performances.

    + +

    Les standards Java implmentent le codage d'URL de manire + sensiblement diffrente. Ils ajoutent une information de chemin + l'URL en utilisant un point-virgule (;) comme + sparateur, puis ajoutent enfin l'identifiant de session. Comme dans + le cas des cookies, Apache Tomcat peut insrer la valeur de + l'attribut jvmRoute dans cette information de chemin. + Pour qu'Apache puisse trouver ce genre d'information de chemin, vous + devez dfinir scolonpathdelim On dans la + directive ProxyPass ou + ProxySet.

    + +

    Enfin, vous pouvez utiliser simultanment les cookies et le codage + d'URL en dfinissant le nom du cookie et le nom du paramtre d'URL + spars par une barre verticale (|) comme dans + l'exemple suivant :

    +
    ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On
    +<Proxy "balancer://mycluster">
    +    BalancerMember "http://192.168.1.50:80" route=node1
    +    BalancerMember "http://192.168.1.51:80" route=node2
    +</Proxy>
    + +

    Si le cookie et le paramtre de requte fournissent tous deux une + information de route correcte pour la mme requte, c'est + l'information en provenance du paramtre de requte qui sera + retenue.

    +
    top
    +
    +

    Rsolution des problmes lis la rpartition de charge par + abonnement

    + +

    Si vous tes confront des erreurs d'abonnement, comme la + ncessit pour les utilisateurs de se reconnecter suite une perte + de session d'application, vous devez tout d'abord vrifier si ceci + n'est pas du une indisponibilit sporadique des serveurs + d'arrire-plan ou une erreur de configuration. La prsence de + messages d'erreur de type proxy dans le journal des erreurs d'Apache + pourra rvler des problmes de stabilit au niveau des serveurs + d'arrire-plan.

    +

    Pour contrler votre configuration, regardez tout d'abord si + l'abonnement est base de cookie ou de codage d'URL. L'tape + suivante consiste enregistrer certaines donnes dans le journal + des accs en utilisant un format + de journalisation personnalis. Les champs intressants + sont les suivants :

    +
    +
    %{MONCOOKIE}C
    +
    La valeur que contient le cookie de nom MONCOOKIE. + Le nom doit correspondre au nom dfini par l'attribut + stickysession.
    +
    %{Set-Cookie}o
    +
    Ce champ contient tout cookie dfini par le serveur + d'arrire-plan. Vous pouvez ainsi vrifier si le serveur + d'arrire-plan dfinit bien le cookie de session auquel vous vous + attendez, et quelle valeur il est dfini.
    +
    %{BALANCER_SESSION_STICKY}e
    +
    Le nom du cookie ou du paramtre de requte utilis pour la + recherche de l'information de routage.
    +
    %{BALANCER_SESSION_ROUTE}e
    +
    L'information de routage extraite de la requte.
    +
    %{BALANCER_WORKER_ROUTE}e
    +
    La route du serveur choisi.
    +
    %{BALANCER_ROUTE_CHANGED}e
    +
    Contient la valeur 1 si la route extraite de la + requte est diffrente de la route du serveur ; autrement dit, le + traitement de la requte n'a pas pu tre effectu dans le cadre + d'une rpartition de charge par abonnement.
    +
    +

    Les pertes de session sont souvent dues des expirations de + session dont la valeur peut en gnral tre configure au niveau du + serveur d'arrire-plan.

    +

    Si le niveau de journalisation est dfini debug ou + plus, le rpartiteur journalise aussi des informations dtailles + propos de l'abonnement dans le journal des erreurs, ce qui facilite + la rsolution des problmes d'abonnement. Notez cependant que le + volume de journalisation pourra alors s'avrer trop important pour + un serveur en production sous forte charge.

    +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_balancer.html.ja.utf8 b/docs/manual/mod/mod_proxy_balancer.html.ja.utf8 index c61346705ba..5da7b7c6080 100644 --- a/docs/manual/mod/mod_proxy_balancer.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy_balancer.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_proxy_balancer - Apache HTTP サーバ +mod_proxy_balancer - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_proxy_balancer

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -48,18 +55,18 @@ インターネット全体にとっても危険です。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    + +
  • コメント
  • top

    ロードバランサのスケジューラのアルゴリズム

    @@ -312,9 +319,31 @@ candidate lbstatus -= total factor
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_balancer.xml b/docs/manual/mod/mod_proxy_balancer.xml index 97fed366675..05ed1f0c986 100644 --- a/docs/manual/mod/mod_proxy_balancer.xml +++ b/docs/manual/mod/mod_proxy_balancer.xml @@ -31,16 +31,23 @@

    This module requires the service of mod_proxy. It provides load balancing support for - HTTP, FTP and AJP13 protocols -

    - -

    Load balancing scheduler algorithm is provided by not this - module but other modules such as: - mod_lbmethod_byrequests, - mod_lbmethod_bytraffic and - mod_lbmethod_bybusyness. -

    + >mod_proxy and it provides load balancing for + all the supported protocols. The most important ones are:

    +
      +
    • HTTP, using mod_proxy_http
    • +
    • FTP, using mod_proxy_ftp
    • +
    • AJP13, using mod_proxy_ajp
    • +
    • WebSocket, using mod_proxy_wstunnel
    • +
    + +

    The Load balancing scheduler algorithm is not provided by this + module but from other ones such as:

    +
      +
    • mod_lbmethod_byrequests
    • +
    • mod_lbmethod_bytraffic
    • +
    • mod_lbmethod_bybusyness
    • +
    • mod_lbmethod_heartbeat
    • +

    Thus, in order to get the ability of load balancing, mod_proxy, mod_proxy_balancer @@ -90,31 +97,30 @@ load balancing between two back-end servers:

    - - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80
    - BalancerMember http://192.168.1.51:80
    - </Proxy>
    - ProxyPass /test balancer://mycluster
    - ProxyPassReverse /test balancer://mycluster -
    + +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" + BalancerMember "http://192.168.1.51:80" +</Proxy> +ProxyPass "/test" "balancer://mycluster" +ProxyPassReverse "/test" "balancer://mycluster" +

    Another example of how to provide load balancing with stickyness using mod_headers, even if the back-end server does not set a suitable session cookie:

    - - Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" - env=BALANCER_ROUTE_CHANGED
    - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80 route=1
    - BalancerMember http://192.168.1.51:80 route=2
    - ProxySet stickysession=ROUTEID
    - </Proxy>
    - ProxyPass /test balancer://mycluster
    - ProxyPassReverse /test balancer://mycluster -
    + +Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" route=1 + BalancerMember "http://192.168.1.51:80" route=2 + ProxySet stickysession=ROUTEID +</Proxy> +ProxyPass "/test" "balancer://mycluster" +ProxyPassReverse "/test" "balancer://mycluster" +
    @@ -176,7 +182,7 @@ mod_status. Balancer manager enables dynamic update of balancer members. You can use balancer manager to change the balance - factor or a particular member, or put it in the off line + factor of a particular member, or put it in the off line mode.

    @@ -187,17 +193,18 @@

    To enable load balancer management for browsers from the example.com domain add this code to your httpd.conf configuration file

    - - <Location /balancer-manager>
    - SetHandler balancer-manager
    -
    - Require host example.com
    - </Location> -
    + +<Location "/balancer-manager"> + SetHandler balancer-manager + Require host example.com +</Location> +

    You can now access load balancer manager by using a Web browser to access the page - http://your.server.name/balancer-manager

    + http://your.server.name/balancer-manager. Please note + that only Balancers defined outside of <Location ...> + containers can be dynamically controlled by the Manager.

    @@ -247,20 +254,20 @@

    Finally you can support cookies and URL encoding at the same time, by configuring the name of the cookie and the name of the URL parameter separated by a vertical bar (|) as in the following example:

    - - ProxyPass /test balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On
    - <Proxy balancer://mycluster>
    - BalancerMember http://192.168.1.50:80 route=node1
    - BalancerMember http://192.168.1.51:80 route=node2
    - </Proxy>
    -
    + +ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" route=node1 + BalancerMember "http://192.168.1.51:80" route=node2 +</Proxy> +

    If the cookie and the request parameter both provide routing information for the same request, the information from the request parameter is used.

    Troubleshooting load balancer stickyness -

    If you experience stickyness errors, e.g. users loose their +

    If you experience stickyness errors, e.g. users lose their application sessions and need to login again, you first want to check whether this is because the back-ends are sometimes unavailable or whether your configuration is wrong. To find out about possible diff --git a/docs/manual/mod/mod_proxy_balancer.xml.fr b/docs/manual/mod/mod_proxy_balancer.xml.fr new file mode 100644 index 00000000000..fc0f989f0ef --- /dev/null +++ b/docs/manual/mod/mod_proxy_balancer.xml.fr @@ -0,0 +1,361 @@ + + + + + + + + + + + +mod_proxy_balancer +Extension de mod_proxy pour le support de +la répartition de charge +Extension +mod_proxy_balancer.c +proxy_balancer_module +Disponible depuis la version 2.1 d'Apache + +

    +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy, et il fournit le support de + la répartition de charge pour tous les protocoles supportés. Parmi ces + protocoles, les plus importants sont :

    +
      +
    • HTTP, avec le module mod_proxy_http
    • +
    • FTP, avec le module mod_proxy_ftp
    • +
    • AJP13, avec le module mod_proxy_ajp
    • +
    • WebSocket, avec le module mod_proxy_wstunnel
    • +
    + + +

    L'algorithme de planification de la répartition de charge n'est pas + fourni par ce module, mais par ceux-ci :

    +
      +
    • mod_lbmethod_byrequests
    • +
    • mod_lbmethod_bytraffic
    • +
    • mod_lbmethod_bybusyness
    • +
    • mod_lbmethod_heartbeat
    • +
    + +

    Ainsi, pour mettre en oeuvre la répartition de charge, + mod_proxy, mod_proxy_balancer et + au moins un des modules fournissant l'algorithme de planification de + la répartition de charge doivent être chargés dans le serveur.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    +mod_proxy + +
    + L'algorithme de planification de la répartition de + charge +

    A l'heure actuelle, 3 algorithmes de planification de la + répartition de charge sont disponibles : ils se basent + respectivement sur le comptage des requêtes, la mesure du trafic et + le comptage des requêtes en attente. Ils sont contrôlés par la + valeur de lbmethod dans la définition du répartiteur. + Voir la directive ProxyPass pour plus de détails, et en + particulier la configuration du répartiteur et de ses membres.

    +
    + +
    + Répartition de charge avec abonnement utilisateur + (stickyness) +

    Le répartiteur supporte l'abonnement utilisateur. Lorsqu'une + requête est mandatée vers un serveur d'arrière-plan particulier, + toutes les requêtes suivantes du même utilisateur seront alors + mandatées vers le même serveur d'arrière-plan. De nombreux + répartiteurs de charge implémentent cette fonctionnalité via une + table qui associe les adresses IP des clients aux serveurs + d'arrière-plan. Cette approche est transparente aux clients et aux + serveurs d'arrière-plan, mais induit certains problèmes : + distribution de charge inégale si les clients se trouvent eux-mêmes + derrière un mandataire, erreurs d'abonnement lorsqu'un client + possède une adresse IP dynamique qui peut changer au cours d'une + session et perte d'abonnement en cas de dépassement de la table de + correspondances.

    +

    Le module mod_proxy_balancer implémente + l'abonnement selon deux alternatives : les cookies et le codage + d'URL. Le cookie peut être fourni par le serveur d'arrière-plan ou + par le serveur web Apache lui-même, alors que le codage d'URL est en + général effectué par le serveur d'arrière-plan.

    + +
    + +
    + Exemples de configuration d'un répartiteur +

    Avant de nous plonger dans les détails techniques, voici un + exemple d'utilisation de mod_proxy_balancer mettant + en oeuvre la répartition de charge entre deux serveurs + d'arrière-plan : +

    + + +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" + BalancerMember "http://192.168.1.51:80" +</Proxy> +ProxyPass "/test" "balancer://mycluster" +ProxyPassReverse "/test" "balancer://mycluster" + + + +

    Voici un autre exemple de répartiteur de charge avec + abonnement utilisant mod_headers, + fonctionnant même si le serveur d'arrière-plan ne définit pas de + cookie de session approprié : +

    + + +Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" route=1 + BalancerMember "http://192.168.1.51:80" route=2 + ProxySet stickysession=ROUTEID +</Proxy> +ProxyPass "/test" "balancer://mycluster" +ProxyPassReverse "/test" "balancer://mycluster" + + +
    + +
    + Variables d'environnement exportées +

    A l'heure actuelle, 6 variables d'environnement sont exportées :

    + +
    + +
    BALANCER_SESSION_STICKY
    +
    +

    Cette variable se voir assignée la valeur de + stickysession pour la requête courante. Il s'agit du + nom du cookie ou du paramètre de requête utilisé pour les sessions + avec abonnement.

    +
    + + +
    BALANCER_SESSION_ROUTE
    +
    +

    Cette variable se voit assignée la route interprétée + pour la requête courante.

    +
    + + +
    BALANCER_NAME
    +
    +

    Cette variable se voit assigné le nom du répartiteur pour la + requête courante. Il s'agit d'une valeur du style + balancer://foo.

    +
    + + +
    BALANCER_WORKER_NAME
    +
    +

    Cette variable se voit assigné le nom du membre du groupe de + répartition de charge utilisé pour la requête courante. Il s'agit + d'une valeur du style http://hostA:1234.

    +
    + + +
    BALANCER_WORKER_ROUTE
    +
    +

    Cette variable se voit assignée la route du membre du + groupe de répartition de charge qui sera utilisé pour la requête + courante.

    +
    + + +
    BALANCER_ROUTE_CHANGED
    +
    +

    Cette variable est définie à 1 si la route de la session ne + correspond pas à celle du membre du groupe de répartition de charge + (BALANCER_SESSION_ROUTE != BALANCER_WORKER_ROUTE), ou si la session + ne possède pas encore de route établie. Elle peut servir à + déterminer quand il est éventuellement nécessaire d'envoyer au + client une route mise à jour lorsque les sessions persistantes sont + utilisées.

    +
    +
    + +
    + +
    + Activation du support du gestionnaire de répartiteur +

    Cette fonctionnalité nécessite le chargement du module + mod_status. Le gestionnaire de répartiteur permet + la mise à jour dynamique des membres du groupe de répartition de + charge. Vous pouvez utiliser le gestionnaire de répartiteur pour + modifier le facteur de charge d'un membre particulier, ou passer ce + dernier en mode hors ligne. +

    + +

    Ainsi, pour mettre en oeuvre la gestion du répartiteur de charge, + mod_status et mod_proxy_balancer + doivent être chargés dans le serveur.

    + +

    Pour permettre la gestion du répartiteur de charge aux + navigateurs appartenant au domaine example.com, ajoutez ces lignes à + votre fichier de configuration httpd.conf :

    + +<Location "/balancer-manager"> + SetHandler balancer-manager + Require host example.com +</Location> + + +

    Vous pourrez alors accéder au gestionnaire du répartiteur de + charge en utilisant un navigateur web pour afficher la page + http://nom.de.votre.serveur/balancer-manager. Notez que + pour pouvoir contrôler dynamiquement un membre de groupe de + répartition, ce dernier ne doit pas être défini au sein d'une + section <Location ...>.

    +
    + +
    + Détails à propos de la répartition de charge par abonnement + (stickyness) +

    Si l'abonnement s'appuie sur un cookie, vous devez définir le nom + de ce cookie dont le contenu précise le serveur d'arrière-plan à + utiliser. Pour ce faire, on utilise l'attribut + stickysession avec la directive ProxyPass ou ProxySet. Le nom du cookie est + sensible à la casse. Le répartiteur extrait le contenu du cookie et + recherche un serveur membre dont la route correspond à + cette valeur. La route doit aussi être définie dans la directive ProxyPass ou ProxySet. Le cookie peut être défini + soit par le serveur d'arrière-plan, soit, comme indiqué dans l'exemple ci-dessus par le serveur web Apache + lui-même.

    +

    Certains serveurs d'arrière-plan, tels qu'Apache Tomcat, + utilisent une forme sensiblement différente de cookie d'abonnement. + Tomcat ajoute le nom de l'instance Tomcat à la fin de son + identifiant de session, précédé par un point. Ainsi, si le serveur + web Apache trouve un point dans la valeur du cookie d'abonnement, il + n'utilisera que la partie située après ce point pour + rechercher sa route. Pour que Tomcat puisse connaître son nom + d'instance, vous devez définir l'attribut jvmRoute dans + son fichier de configuration conf/server.xml à la + valeur de la route du serveur qui se connecte au Tomcat + considéré. Le nom du cookie de session utilisé par Tomcat (et plus + généralement par les applications web Java à base de servlets) est + JSESSIONID (en majuscules), mais peut être modifié.

    + +

    La seconde méthode pour implémenter l'abonnement est le codage + d'URL. Ici, le serveur web recherche un paramètre dans l'URL de la + requête. Le nom du paramètre est spécifié par l'attribut + stickysession. Pour trouver un serveur membre, on + recherche un serveur dont la route est égale à la valeur + du paramètre. Comme il n'est pas aisé d'extraire et de manipuler + tous les liens URL contenus dans les réponses, le travail consistant + à ajouter les paramètres à chaque lien est généralement effectué par + le serveur d'arrière-plan qui génère le contenu. Bien qu'il soit + possible dans certains cas d'effectuer ces ajouts au niveau du + serveur web via les modules mod_substitute ou + mod_sed, cette méthode peut dégrader les + performances.

    + +

    Les standards Java implémentent le codage d'URL de manière + sensiblement différente. Ils ajoutent une information de chemin à + l'URL en utilisant un point-virgule (;) comme + séparateur, puis ajoutent enfin l'identifiant de session. Comme dans + le cas des cookies, Apache Tomcat peut insérer la valeur de + l'attribut jvmRoute dans cette information de chemin. + Pour qu'Apache puisse trouver ce genre d'information de chemin, vous + devez définir scolonpathdelim à On dans la + directive ProxyPass ou + ProxySet.

    + +

    Enfin, vous pouvez utiliser simultanément les cookies et le codage + d'URL en définissant le nom du cookie et le nom du paramètre d'URL + séparés par une barre verticale (|) comme dans + l'exemple suivant :

    + +ProxyPass "/test" "balancer://mycluster" stickysession=JSESSIONID|jsessionid scolonpathdelim=On +<Proxy "balancer://mycluster"> + BalancerMember "http://192.168.1.50:80" route=node1 + BalancerMember "http://192.168.1.51:80" route=node2 +</Proxy> + +

    Si le cookie et le paramètre de requête fournissent tous deux une + information de route correcte pour la même requête, c'est + l'information en provenance du paramètre de requête qui sera + retenue.

    +
    + +
    + Résolution des problèmes liés à la répartition de charge par + abonnement +

    Si vous êtes confronté à des erreurs d'abonnement, comme la + nécessité pour les utilisateurs de se reconnecter suite à une perte + de session d'application, vous devez tout d'abord vérifier si ceci + n'est pas du à une indisponibilité sporadique des serveurs + d'arrière-plan ou à une erreur de configuration. La présence de + messages d'erreur de type proxy dans le journal des erreurs d'Apache + pourra révéler des problèmes de stabilité au niveau des serveurs + d'arrière-plan.

    +

    Pour contrôler votre configuration, regardez tout d'abord si + l'abonnement est à base de cookie ou de codage d'URL. L'étape + suivante consiste à enregistrer certaines données dans le journal + des accès en utilisant un format + de journalisation personnalisé. Les champs intéressants + sont les suivants :

    +
    +
    %{MONCOOKIE}C
    +
    La valeur que contient le cookie de nom MONCOOKIE. + Le nom doit correspondre au nom défini par l'attribut + stickysession.
    +
    %{Set-Cookie}o
    +
    Ce champ contient tout cookie défini par le serveur + d'arrière-plan. Vous pouvez ainsi vérifier si le serveur + d'arrière-plan définit bien le cookie de session auquel vous vous + attendez, et à quelle valeur il est défini.
    +
    %{BALANCER_SESSION_STICKY}e
    +
    Le nom du cookie ou du paramètre de requête utilisé pour la + recherche de l'information de routage.
    +
    %{BALANCER_SESSION_ROUTE}e
    +
    L'information de routage extraite de la requête.
    +
    %{BALANCER_WORKER_ROUTE}e
    +
    La route du serveur choisi.
    +
    %{BALANCER_ROUTE_CHANGED}e
    +
    Contient la valeur 1 si la route extraite de la + requête est différente de la route du serveur ; autrement dit, le + traitement de la requête n'a pas pu être effectué dans le cadre + d'une répartition de charge par abonnement.
    +
    +

    Les pertes de session sont souvent dues à des expirations de + session dont la valeur peut en général être configurée au niveau du + serveur d'arrière-plan.

    +

    Si le niveau de journalisation est défini à debug ou + plus, le répartiteur journalise aussi des informations détaillées à + propos de l'abonnement dans le journal des erreurs, ce qui facilite + la résolution des problèmes d'abonnement. Notez cependant que le + volume de journalisation pourra alors s'avérer trop important pour + un serveur en production sous forte charge.

    +
    + + diff --git a/docs/manual/mod/mod_proxy_balancer.xml.ja b/docs/manual/mod/mod_proxy_balancer.xml.ja index 009a7f52a78..ea3ae54cc0a 100644 --- a/docs/manual/mod/mod_proxy_balancer.xml.ja +++ b/docs/manual/mod/mod_proxy_balancer.xml.ja @@ -1,7 +1,7 @@ - + -mod_proxy_connect - Apache HTTP Server +mod_proxy_connect - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_connect

    Available Languages:  en  | + fr  |  ja 

    説明:負荷分散のための mod_proxy 拡張
    ステータス:Extension
    モジュール識別子:proxy_balancer_module

    Available Languages:  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_connect.html.fr b/docs/manual/mod/mod_proxy_connect.html.fr new file mode 100644 index 00000000000..4eb2bdd4d89 --- /dev/null +++ b/docs/manual/mod/mod_proxy_connect.html.fr @@ -0,0 +1,143 @@ + + + + + +mod_proxy_connect - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_connect

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    +
    Description:mod_proxy extension for @@ -39,7 +45,7 @@ requests, mod_proxy and mod_proxy_connect have to be present in the server.

    -

    CONNECT is also used, when the server needs to send an HTTPS request +

    CONNECT is also used when the server needs to send an HTTPS request through a forward proxy. In this case the server acts as a CONNECT client. This functionality is part of mod_proxy and mod_proxy_connect is not needed in this case.

    @@ -50,17 +56,17 @@ large.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Request notes

    @@ -102,8 +108,30 @@ Port ranges available since Apache 2.3.7.
    + + +
    Description:Extension de mod_proxy pour le traitement +des requtes CONNECT
    Statut:Extension
    IdentificateurdeModule:proxy_connect_module
    FichierSource:mod_proxy_connect.c
    +

    Sommaire

    + +

    Pour fonctionner, ce module ncessite le chargement de + mod_proxy. Il fournit le support de la mthode HTTP + CONNECT. Cette mthode est principalement utilise pour + faire franchir les serveurs mandataires aux requtes SSL l'aide + d'un tunnel.

    + +

    Ainsi, pour pouvoir traiter les requtes CONNECT, + mod_proxy et mod_proxy_connect + doivent tre chargs dans le serveur.

    + +

    CONNECT est aussi utilise lorsque le serveur doit envoyer une + requte HTTPS via un mandataire. Dans ce cas, le serveur se comporte + comme un client CONNECT. Cette fonctionnalit tant fournie par le + module mod_proxy, le module + mod_proxy_connect n'est dans ce cas pas ncessaire.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +
    top
    +
    +

    Informations sur les requtes

    +

    mod_proxy_connect enregistre les informations + suivantes pour journalisation via le format %{NOMVAR}n + dans les directives LogFormat ou ErrorLogFormat : +

    +
    +
    proxy-source-port
    +
    Le port local utilis pour la connexion vers le serveur + d'arrire-plan.
    +
    +
    +
    top
    +

    Directive AllowCONNECT

    + + + + + + + + +
    Description:Ports autoriss se CONNECTer travers le +mandataire
    Syntaxe:AllowCONNECT port[-port] +[port[-port]] ...
    Dfaut:AllowCONNECT 443 563
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy_connect
    Compatibilit:Dplac depuis mod_proxy partir +d'Apache 2.3.5. Plages de ports disponibles depuis Apache 2.3.7.
    +

    La directive AllowCONNECT permet de + spcifier une liste de numros ou de plages de ports auxquels la + mthode de mandataire CONNECT pourra se connecter. Les + navigateurs rcents utilisent cette mthode dans le cas o une + connexion https est requise et o le tunneling + mandataire sur HTTP est en service.

    + +

    Par dfaut, seuls les ports par dfauts https (443) + et snews (563) sont pris en compte. Vous pouvez + utiliser la directive AllowCONNECT pour + outrepasser ces valeurs par dfaut et n'autoriser les connexions que + vers les ports spcifis.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_connect.html.ja.utf8 b/docs/manual/mod/mod_proxy_connect.html.ja.utf8 index 14d411bf62d..65696e002de 100644 --- a/docs/manual/mod/mod_proxy_connect.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy_connect.html.ja.utf8 @@ -1,32 +1,39 @@ - -mod_proxy_connect - Apache HTTP サーバ +mod_proxy_connect - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_proxy_connect

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -53,11 +60,11 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    AllowCONNECT ディレクティブ

    @@ -72,14 +79,36 @@ proxy
    -
    説明:CONNECT リクエストを扱う mod_proxy 用の拡張
    ステータス:Extension
    モジュール:mod_proxy_connect
    互換性:Moved from mod_proxy in Apache 2.3.5. Port ranges available since Apache 2.3.7.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_connect.xml b/docs/manual/mod/mod_proxy_connect.xml index a6837a794ca..01761f2cef3 100644 --- a/docs/manual/mod/mod_proxy_connect.xml +++ b/docs/manual/mod/mod_proxy_connect.xml @@ -39,7 +39,7 @@ requests, mod_proxy and mod_proxy_connect have to be present in the server.

    -

    CONNECT is also used, when the server needs to send an HTTPS request +

    CONNECT is also used when the server needs to send an HTTPS request through a forward proxy. In this case the server acts as a CONNECT client. This functionality is part of mod_proxy and mod_proxy_connect is not needed in this case.

    diff --git a/docs/manual/mod/mod_proxy_connect.xml.fr b/docs/manual/mod/mod_proxy_connect.xml.fr new file mode 100644 index 00000000000..79203ab96d5 --- /dev/null +++ b/docs/manual/mod/mod_proxy_connect.xml.fr @@ -0,0 +1,103 @@ + + + + + + + + + + + +mod_proxy_connect +Extension de mod_proxy pour le traitement +des requêtes CONNECT +Extension +mod_proxy_connect.c +proxy_connect_module + + +

    Pour fonctionner, ce module nécessite le chargement de + mod_proxy. Il fournit le support de la méthode HTTP + CONNECT. Cette méthode est principalement utilisée pour + faire franchir les serveurs mandataires aux requêtes SSL à l'aide + d'un tunnel.

    + +

    Ainsi, pour pouvoir traiter les requêtes CONNECT, + mod_proxy et mod_proxy_connect + doivent être chargés dans le serveur.

    + +

    CONNECT est aussi utilisée lorsque le serveur doit envoyer une + requête HTTPS via un mandataire. Dans ce cas, le serveur se comporte + comme un client CONNECT. Cette fonctionnalité étant fournie par le + module mod_proxy, le module + mod_proxy_connect n'est dans ce cas pas nécessaire.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    +mod_proxy + +
    Informations sur les requêtes +

    mod_proxy_connect enregistre les informations + suivantes pour journalisation via le format %{NOMVAR}n + dans les directives LogFormat ou ErrorLogFormat : +

    +
    +
    proxy-source-port
    +
    Le port local utilisé pour la connexion vers le serveur + d'arrière-plan.
    +
    +
    + + +AllowCONNECT +Ports autorisés à se CONNECTer à travers le +mandataire +AllowCONNECT port[-port] +[port[-port]] ... +AllowCONNECT 443 563 +server configvirtual host + +Déplacé depuis mod_proxy à partir +d'Apache 2.3.5. Plages de ports disponibles depuis Apache 2.3.7. + + +

    La directive AllowCONNECT permet de + spécifier une liste de numéros ou de plages de ports auxquels la + méthode de mandataire CONNECT pourra se connecter. Les + navigateurs récents utilisent cette méthode dans le cas où une + connexion https est requise et où le tunneling + mandataire sur HTTP est en service.

    + +

    Par défaut, seuls les ports par défauts https (443) + et snews (563) sont pris en compte. Vous pouvez + utiliser la directive AllowCONNECT pour + outrepasser ces valeurs par défaut et n'autoriser les connexions que + vers les ports spécifiés.

    +
    +
    + + +
    diff --git a/docs/manual/mod/mod_proxy_connect.xml.ja b/docs/manual/mod/mod_proxy_connect.xml.ja index 8a78ed03f57..c8bd702c54b 100644 --- a/docs/manual/mod/mod_proxy_connect.xml.ja +++ b/docs/manual/mod/mod_proxy_connect.xml.ja @@ -1,7 +1,7 @@ - + -mod_proxy_express - Apache HTTP Server +mod_proxy_express - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_express

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -38,7 +44,7 @@ than mod_proxy_balancer, which also provides dynamic growth, but is intended to handle much, much larger numbers of backends. It is ideally suited as a - front-end HTTP switch.

    + front-end HTTP switch and for micro-services architectures.

    This module requires the service of mod_proxy.

    @@ -59,10 +65,12 @@
  • It does not support regex or pattern matching at all.
  • It emulates: -

    - ProxyPass / backend.server:port
    - ProxyPassReverse / backend.server:port
    -

    +
    <VirtualHost *:80>
    +   ServerName front.end.server
    +   ProxyPass "/" "back.end.server:port"
    +   ProxyPassReverse "/" "back.end.server:port"
    +</VirtualHost>
    + That is, the entire URL is appended to the mapped backend URL. This is in keeping with the intent of being a simple but fast reverse proxy switch. @@ -77,10 +85,10 @@
  • ProxyExpressDBMType
  • ProxyExpressEnable
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    ProxyExpressDBMFile Directive

    @@ -118,6 +126,7 @@

    Configuration

    + ProxyExpressEnable on
    ProxyExpressDBMFile emap

    @@ -137,7 +146,16 @@

    The ProxyExpressDBMType directive controls the DBM type expected by the module. The default is the default DBM type created with - httxt2dbm

    + httxt2dbm.

    +

    Possible values are (not all may be available at run time):

    +
    Description:Dynamic mass reverse proxy extension for mod_proxy
    + + + + + +
    ValueDescription
    db Berkeley DB files
    gdbm GDBM files
    ndbm NDBM files
    sdbm SDBM files (always available)
    default default DBM type
    +
    top
    @@ -157,8 +175,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_express.html.fr b/docs/manual/mod/mod_proxy_express.html.fr new file mode 100644 index 00000000000..c3140687bf2 --- /dev/null +++ b/docs/manual/mod/mod_proxy_express.html.fr @@ -0,0 +1,210 @@ + + + + + +mod_proxy_express - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_express

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    + + + +
    Description:Extension mod_proxy pour le mandatement +dynamique inverse de masse
    Statut:Extension
    IdentificateurdeModule:proxy_express_module
    FichierSource:mod_proxy_express.c
    +

    Sommaire

    + +

    Ce module cre dynamiquement en masse des mandataires inverses en + faisant correspondre l'en-tte Host: de la requte HTTP un nom de + serveur et une URL d'arrire-plan stocks dans un fichier DBM. Il + est ainsi plus ais d'utiliser un grand nombre de + mandataires inverses sans avoir modifier la configuration. Il est + loin de possder autant de fonctionnalits que + mod_proxy_balancer, qui propose aussi la croissance + dynamique, mais il est conu pour grer un nombre beaucoup plus important + de serveurs d'arrire-plan. Il convient parfaitement pour crer un + commutateur HTTP frontal.

    + +

    Pour pouvoir tre utilis, ce module ncessite le chargement de + mod_proxy.

    + +

    Avertissement

    +

    N'activez le mandatement que si vous avez scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux pour votre rseau, et + dans une plus large mesure pour Internet.

    +
    + +

    Limitations

    +
      +
    • Ce module n'est pas conu pour remplacer les fonctionnalits + dynamiques de mod_proxy_balancer. Par contre, il + peut constituer une alternative lgre et rapide + mod_rewrite lorsque ce dernier utilise la directive + RewriteMap et le drapeau [P] + pour le mandatement inverse partir d'une table de correspondances. +
    • +
    • Il ne supporte pas les mises en correspondance bases sur les + expressions rationnelles ou les modles. +
    • +
    • Il mule : +
      <VirtualHost *:80>
      +   ServerName front.end.server
      +   ProxyPass "/" "back.end.server:port"
      +   ProxyPassReverse "/" "back.end.server:port"
      +</VirtualHost>
      + + En d'autres termes, l'URL dans son ensemble est ajoute l'URL + d'arrire-plan correspondante, tout ceci dans le but de + proposer un commutateur mandataire inverse simple mais rapide. +
    • +
    +
    + +
    + + +
    top
    +

    Directive ProxyExpressDBMFile

    + + + + + + + + +
    Description:Chemin du fichier DBM.
    Syntaxe:ProxyExpressDBMFile <chemin>
    Dfaut:None
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy_express
    Compatibilit:Disponible partir de la version 2.3.13 d'Apache
    +

    La directive ProxyExpressDBMFile permet de + dfinir le chemin du fichier DBM de correspondance Express. Ce fichier + permet de faire correspondre le nom de serveur extrait de l'en-tte + Host: de la requte entrante avec une URL d'arrire-plan.

    + +

    Note

    +

    Ce fichier est labor partir d'un fichier texte l'aide de + l'utilitaire httxt2dbm.

    + +

    Fichier de correspondances ProxyExpress

    + ##
    + ##express-map.txt:
    + ##
    +
    + www1.example.com http://192.168.211.2:8080
    + www2.example.com http://192.168.211.12:8088
    + www3.example.com http://192.168.212.10
    +

    + +

    Cration du fichier DBM

    + httxt2dbm -i express-map.txt -o emap
    +

    + +

    Configuration

    + ProxyExpressEnable on
    + ProxyExpressDBMFile emap
    +

    +
    + +
    +
    top
    +

    Directive ProxyExpressDBMType

    + + + + + + + + +
    Description:Type de fichier DBM.
    Syntaxe:ProxyExpressDBMFile <type>
    Dfaut:"default"
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy_express
    Compatibilit:Disponible partir de la version 2.3.13 d'Apache
    +

    La directive ProxyExpressDBMType permet de + dfinir le type de fichier DBM requis par le module. La valeur par + dfaut correspond au type DBM par dfaut du fichier cr par + l'utilitaire httxt2dbm.

    +

    Les valeurs possibles sont (mais toutes ne seront pas disponibles + l'excution) :

    + + + + + + +
    ValueDescription
    dbFichiers Berkeley DB
    gdbmFichiers GDBM
    ndbmFichiers NDBM
    sdbmFichiers SDBM (toujours disponible)
    defaulttype DBM par dfaut
    + + +
    +
    top
    +

    Directive ProxyExpressEnable

    + + + + + + + + +
    Description:Active la fonctionnalit du module.
    Syntaxe:ProxyExpressEnable [on|off]
    Dfaut:off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_proxy_express
    Compatibilit:Disponible partir de la version 2.3.13 d'Apache
    +

    La directive ProxyExpressEnable permet + d'activer/dsactiver le module.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_express.xml b/docs/manual/mod/mod_proxy_express.xml index 50c991024bf..a4ec2d82f15 100644 --- a/docs/manual/mod/mod_proxy_express.xml +++ b/docs/manual/mod/mod_proxy_express.xml @@ -38,7 +38,7 @@ than mod_proxy_balancer, which also provides dynamic growth, but is intended to handle much, much larger numbers of backends. It is ideally suited as a - front-end HTTP switch.

    + front-end HTTP switch and for micro-services architectures.

    This module requires the service of mod_proxy.

    @@ -61,10 +61,13 @@
  • It does not support regex or pattern matching at all.
  • It emulates: - - ProxyPass / backend.server:port
    - ProxyPassReverse / backend.server:port
    -
    + +<VirtualHost *:80> + ServerName front.end.server + ProxyPass "/" "back.end.server:port" + ProxyPassReverse "/" "back.end.server:port" +</VirtualHost> + That is, the entire URL is appended to the mapped backend URL. This is in keeping with the intent of being a simple but fast reverse proxy switch. @@ -125,6 +128,7 @@ Configuration + ProxyExpressEnable on
    ProxyExpressDBMFile emap
    @@ -144,7 +148,19 @@

    The ProxyExpressDBMType directive controls the DBM type expected by the module. The default is the default DBM type created with - httxt2dbm

    + httxt2dbm
    .

    +

    Possible values are (not all may be available at run time):

    + + + + + + + + + +
    ValueDescription
    db Berkeley DB files
    gdbm GDBM files
    ndbm NDBM files
    sdbm SDBM files (always available)
    default default DBM type
    + diff --git a/docs/manual/mod/mod_proxy_express.xml.fr b/docs/manual/mod/mod_proxy_express.xml.fr new file mode 100644 index 00000000000..528bdc23b79 --- /dev/null +++ b/docs/manual/mod/mod_proxy_express.xml.fr @@ -0,0 +1,174 @@ + + + + + + + + + + + +mod_proxy_express +Extension à mod_proxy pour le mandatement +dynamique inverse de masse +Extension +mod_proxy_express.c +proxy_express_module + + +

    Ce module crée dynamiquement en masse des mandataires inverses en + faisant correspondre l'en-tête Host: de la requête HTTP à un nom de + serveur et une URL d'arrière-plan stockés dans un fichier DBM. Il + est ainsi plus aisé d'utiliser un grand nombre de + mandataires inverses sans avoir à modifier la configuration. Il est + loin de posséder autant de fonctionnalités que + mod_proxy_balancer, qui propose aussi la croissance + dynamique, mais il est conçu pour gérer un nombre beaucoup plus important + de serveurs d'arrière-plan. Il convient parfaitement pour créer un + commutateur HTTP frontal.

    + +

    Pour pouvoir être utilisé, ce module nécessite le chargement de + mod_proxy.

    + + Avertissement +

    N'activez le mandatement que si vous avez sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux pour votre réseau, et + dans une plus large mesure pour Internet.

    +
    + +Limitations +
      +
    • Ce module n'est pas conçu pour remplacer les fonctionnalités + dynamiques de mod_proxy_balancer. Par contre, il + peut constituer une alternative légère et rapide à + mod_rewrite lorsque ce dernier utilise la directive + RewriteMap et le drapeau [P] + pour le mandatement inverse à partir d'une table de correspondances. +
    • +
    • Il ne supporte pas les mises en correspondance basées sur les + expressions rationnelles ou les modèles. +
    • +
    • Il émule : + +<VirtualHost *:80> + ServerName front.end.server + ProxyPass "/" "back.end.server:port" + ProxyPassReverse "/" "back.end.server:port" +</VirtualHost> + + En d'autres termes, l'URL dans son ensemble est ajoutée à l'URL + d'arrière-plan correspondante, tout ceci dans le but de + proposer un commutateur mandataire inverse simple mais rapide. +
    • +
    +
    + +
    +mod_proxy + + +ProxyExpressEnable +Active la fonctionnalité du module. +ProxyExpressEnable [on|off] +off +server configvirtual host + +Disponible à partir de la version 2.3.13 d'Apache + + +

    La directive ProxyExpressEnable permet + d'activer/désactiver le module.

    +
    +
    + + +ProxyExpressDBMFile +Chemin du fichier DBM. +ProxyExpressDBMFile <chemin> +None +server configvirtual host + +Disponible à partir de la version 2.3.13 d'Apache + + +

    La directive ProxyExpressDBMFile permet de + définir le chemin du fichier DBM de correspondance Express. Ce fichier + permet de faire correspondre le nom de serveur extrait de l'en-tête + Host: de la requête entrante avec une URL d'arrière-plan.

    + + Note +

    Ce fichier est élaboré à partir d'un fichier texte à l'aide de + l'utilitaire httxt2dbm.

    + + Fichier de correspondances ProxyExpress + ##
    + ##express-map.txt:
    + ##
    +
    + www1.example.com http://192.168.211.2:8080
    + www2.example.com http://192.168.211.12:8088
    + www3.example.com http://192.168.212.10
    +
    + + Création du fichier DBM + httxt2dbm -i express-map.txt -o emap
    +
    + + Configuration + ProxyExpressEnable on
    + ProxyExpressDBMFile emap
    +
    +
    +
    +
    + + +ProxyExpressDBMType +Type de fichier DBM. +ProxyExpressDBMFile <type> +"default" +server configvirtual host + +Disponible à partir de la version 2.3.13 d'Apache + + +

    La directive ProxyExpressDBMType permet de + définir le type de fichier DBM requis par le module. La valeur par + défaut correspond au type DBM par défaut du fichier créé par + l'utilitaire httxt2dbm.

    +

    Les valeurs possibles sont (mais toutes ne seront pas disponibles à + l'exécution) :

    + + + + + + + + + +
    ValueDescription
    dbFichiers Berkeley DB
    gdbmFichiers GDBM
    ndbmFichiers NDBM
    sdbmFichiers SDBM (toujours disponible)
    defaulttype DBM par défaut
    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_proxy_express.xml.meta b/docs/manual/mod/mod_proxy_express.xml.meta index a0a06bf7e9c..388a98eecd9 100644 --- a/docs/manual/mod/mod_proxy_express.xml.meta +++ b/docs/manual/mod/mod_proxy_express.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_fcgi.html b/docs/manual/mod/mod_proxy_fcgi.html index 037143a41d0..cc4f061edea 100644 --- a/docs/manual/mod/mod_proxy_fcgi.html +++ b/docs/manual/mod/mod_proxy_fcgi.html @@ -3,3 +3,7 @@ URI: mod_proxy_fcgi.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_proxy_fcgi.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_fcgi.html.en b/docs/manual/mod/mod_proxy_fcgi.html.en index 71d3edfef64..62defada447 100644 --- a/docs/manual/mod/mod_proxy_fcgi.html.en +++ b/docs/manual/mod/mod_proxy_fcgi.html.en @@ -1,27 +1,33 @@ - -mod_proxy_fcgi - Apache HTTP Server +mod_proxy_fcgi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_fcgi

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -41,8 +47,10 @@

    Unlike mod_fcgid and mod_fastcgi, mod_proxy_fcgi has no provision for starting the - application process; fcgistarter is provided for - that purpose.

    + application process; fcgistarter is provided + (on some platforms) for that purpose. Alternatively, external launching + or process management may be available in the FastCGI application + framework in use.

    Warning

    Do not enable proxying until you have secured your server. Open proxy @@ -50,42 +58,52 @@ large.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • mod_authnz_fcgi
  • +
  • Comments
  • top

    Examples

    Remember, in order to make the following examples work, you have to enable mod_proxy and mod_proxy_fcgi.

    -

    Single application instance

    - ProxyPass /myapp/ fcgi://localhost:4000/ -

    - -

    This application should be able to handle multiple concurrent - connections. mod_proxy enables connection reuse by - default, so after a request has been completed the connection will be - held open by that httpd child process and won't be reused until that - httpd process routes another request to the application. If the - FastCGI application is unable to handle enough concurrent connections - from httpd, requests can block waiting for the application to close - an existing connection. One way to resolve this is to disable connection - reuse on the ProxyPass directive, as shown in - the following example:

    - -

    Single application instance, no connection reuse

    - ProxyPass /myapp/ fcgi://localhost:4000/ disablereuse=on -

    +

    Single application instance

    ProxyPass "/myapp/" "fcgi://localhost:4000/"
    +
    + +

    mod_proxy_fcgi disables connection reuse by + default, so after a request has been completed the connection will NOT be + held open by that httpd child process and won't be reused. If the + FastCGI application is able to handle concurrent connections + from httpd, you can opt-in to connection reuse as shown in the following + example:

    + +

    Single application instance, connection reuse (2.4.11 and later)

    ProxyPass "/myapp/" "fcgi://localhost:4000/" enablereuse=on
    +
    + +

    The following example passes the request URI as a filesystem + path for the PHP-FPM daemon to run. The request URL is implicitly added + to the 2nd parameter. The hostname and port following fcgi:// are where + PHP-FPM is listening. Connection pooling is enabled.

    +

    PHP-FPM

    ProxyPassMatch "^/myapp/.*\.php(/.*)?$" "fcgi://localhost:9000/var/www/" enablereuse=on
    +
    + +

    The following example passes the request URI as a filesystem + path for the PHP-FPM daemon to run. In this case, PHP-FPM is listening on + a unix domain socket (UDS). Requires 2.4.9 or later. With this syntax, + the hostname and optional port following fcgi:// are ignored.

    +

    PHP-FPM with UDS

    # UDS does not currently support connection reuse
    +ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/"
    +

    The balanced gateway needs mod_proxy_balancer and at least one load balancer algorithm module, such as @@ -93,15 +111,45 @@ modules listed above. mod_lbmethod_byrequests is the default, and will be used for this example configuration.

    -

    Balanced gateway to multiple application instances

    - ProxyPass /myapp/ balancer://myappcluster/
    - <Proxy balancer://myappcluster/>
    - - BalancerMember fcgi://localhost:4000/
    - BalancerMember fcgi://localhost:4001/
    -
    - </Proxy> -

    +

    Balanced gateway to multiple application instances

    ProxyPass "/myapp/" "balancer://myappcluster/"
    +<Proxy "balancer://myappcluster/">
    +    BalancerMember "fcgi://localhost:4000"
    +    BalancerMember "fcgi://localhost:4001"
    +</Proxy>
    +
    + +

    You can also force a request to be handled as a reverse-proxy + request, by creating a suitable Handler pass-through. The example + configuration below will pass all requests for PHP scripts to the + specified FastCGI server using reverse proxy. + This feature is available in Apache HTTP Server 2.4.10 and later. For performance + reasons, you will want to define a worker + representing the same fcgi:// backend. The benefit of this form is that it + allows the normal mapping of URI to filename to occur in the server, and the + local filesystem result is passed to the backend. When FastCGI is + configured this way, the server can calculate the most accurate + PATH_INFO. +

    +

    Proxy via Handler

    <FilesMatch "\.php$">
    +    # Note: The only part that varies is /path/to/app.sock
    +    SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
    +</FilesMatch>
    +
    +# Define a matching worker.
    +# The part that is matched to the SetHandler is the part that
    +# follows the pipe. If you need to distinguish, "localhost; can
    +# be anything unique.
    +<Proxy "fcgi://localhost/" enablereuse=on max=10>
    +</Proxy>
    +
    +<FilesMatch ...>
    +    SetHandler  "proxy:fcgi://localhost:9000"
    +</FilesMatch>
    +
    +<FilesMatch ...>
    +    SetHandler  "proxy:balancer://myappcluster/"
    +</FilesMatch>
    +
    top

    Environment Variables

    @@ -111,19 +159,61 @@ provider:

    proxy-fcgi-pathinfo
    -
    By default mod_proxy_fcgi will neither create - nor export the PATH_INFO environment variable. This allows +
    When configured via ProxyPass or ProxyPassMatch, mod_proxy_fcgi will not + set the PATH_INFO environment variable. This allows the backend FCGI server to correctly determine SCRIPT_NAME and Script-URI and be compliant with RFC 3875 section 3.3. If instead you need mod_proxy_fcgi to generate a "best guess" for PATH_INFO, set this env-var. - This is a workaround for a bug in some FCGI implementations.
    + This is a workaround for a bug in some FCGI implementations. This + variable can be set to multiple values to tweak at how the best guess + is chosen (In 2.4.11 and later only): +
    +
    first-dot
    +
    PATH_INFO is split from the slash following the + first "." in the URL.
    +
    last-dot
    +
    PATH_INFO is split from the slash following the + last "." in the URL.
    +
    full
    +
    PATH_INFO is calculated by an attempt to map the URL to the + local filesystem.
    +
    unescape
    +
    PATH_INFO is the path component of the URL, unescaped / + decoded.
    +
    any other value
    +
    PATH_INFO is the same as the path component of the URL. + Originally, this was the only proxy-fcgi-pathinfo option.
    +
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_fcgi.html.fr b/docs/manual/mod/mod_proxy_fcgi.html.fr new file mode 100644 index 00000000000..9b5d2608e2d --- /dev/null +++ b/docs/manual/mod/mod_proxy_fcgi.html.fr @@ -0,0 +1,231 @@ + + + + + +mod_proxy_fcgi - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_fcgi

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:FastCGI support module for mod_proxy
    + + + +
    Description:Module fournissant le support de FastCGI +mod_proxy
    Statut:Extension
    IdentificateurdeModule:proxy_fcgi_module
    FichierSource:mod_proxy_fcgi.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    Pour fonctionner, ce module ncessite le chargement de + mod_proxy. Il fournit le support du protocole FastCGI.

    + +

    Ainsi, pour pouvoir traiter le protocole FastCGI, + mod_proxy et mod_proxy_fcgi + doivent tre chargs dans le serveur.

    + +

    A la diffrence de mod_fcgid et mod_fastcgi, + mod_proxy_fcgi n'est pas en mesure de dmarrer le + processus de l'application ; fcgistarter est + fourni cet effet sur certaines plateformes. Le framework + applicatif FastCGI utilis peut aussi fournir la gestion des + processus ou des lancements de programmes externes.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    +

    Sujets

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    +
    top
    +
    +

    Exemples

    +

    Pour que ces exemples fonctionnent, vous ne devez pas oublier + d'activer mod_proxy et + mod_proxy_fcgi.

    + +

    Instance d'application unique

    ProxyPass "/mon_appli/" "fcgi://localhost:4000/"
    +
    + + +

    mod_proxy_fcgi interdisant par dfaut la + rutilisation des connexions, lorsqu'une requte a t traite, la + connexion ne sera pas maintenue ouverte par le processus enfant + httpd, et ne sera donc pas rutilise. Cependant, si l'application + FastCGI supporte les connexions httpd simultanes, vous pouvez opter + pour la rutilisation des connexions comme dans l'exemple suivant :

    + +

    Instance d'application unique, rutilisation + des connexions (versions 2.4.11 et suprieures)

    ProxyPass "/myapp/" "fcgi://localhost:4000/" enablereuse=on
    +
    + +

    Dans l'exemple suivant, l'URI de la requte est transmis en tant + que chemin du systme de fichiers pour l'excution du dmon PHP-FPM. + L'URL de la requte est implicitement ajoute au second paramtre. + PHP-FPM est l'coute de l'hte et du port qui + suivent fcgi://. La conservation des connexions est active.

    +

    PHP-FPM

    ProxyPassMatch "^/myapp/.*\.php(/.*)?$" "fcgi://localhost:9000/var/www/" enablereuse=on
    +
    + +

    Dans l'exemple suivant, l'URI de la requte est transmis en tant + que chemin du systme de fichiers pour l'excution du dmon PHP-FPM. + Dans ce cas cependant, PHP-FPM est l'coute d'un socket de domaine + unix (UDS). Cette fonctionnalit est disponible partir de la + version 2.4.9. Avec cette syntaxe, si un nom d'hte et un port sont + ajouts aprs fcgi://, ils seront ignors.

    +

    PHP-FPM with UDS

          # A ce jour, UDS ne supporte pas la rutilisation des connexions
    +      ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/"
    +
    + +

    La passerelle rpartition de charge ncessite le chargement du + module mod_proxy_balancer et d'au moins un module + fournissant un algorithme de rpartition de charge, comme + mod_lbmethod_byrequests en plus des modules + dj cits. mod_lbmethod_byrequests est le module + par dfaut et sera utilis dans cet exemple de configuration.

    + +

    Passerelle rpartition de charge vers plusieurs + instances de l'application

    ProxyPass "/myapp/" "balancer://myappcluster/"
    +<Proxy "balancer://myappcluster/">
    +    BalancerMember "fcgi://localhost:4000"
    +    BalancerMember "fcgi://localhost:4001"
    +</Proxy>
    +
    + +

    Vous pouvez aussi forcer le traitement d'une requte en tant que + requte de mandataire inverse en crant un court-circuiteur de + gestionnaire appropri. Dans l'exemple ci-dessous, toutes les + requtes pour des scripts PHP seront transmises au serveur FastCGI + spcifi par mandat inverse. Cette fonctionnalit est disponible + partir de la version 2.4.10 du serveur HTTP Apache. Pour des raisons + de performances, il est recommand de dfinir un worker (configuration d'un + mandataire) reprsentant le mme serveur fcgi:// d'arrire-plan. + Avec cette configuration, il est possible d'effectuer une + correspondance directe entre l'URI et le chemin du fichier sur le + serveur, et le chemin local du fichier sera alors transmis au serveur + d'arrire-plan. Lorsque FastCGI est configur ainsi, le serveur est + en mesure de calculer le PATH_INFO le plus appropri. +

    +

    Mandataire via un gestionnaire

    <FilesMatch "\.php$">
    +    # Note : la seule partie variable est /path/to/app.sock
    +    SetHandler  "proxy:unix:/path/to/app.sock|fcgi://localhost/"
    +</FilesMatch>
    +   # Dfinition d'une configuration de mandataire qui convient.
    +   # La partie qui est mise en correspondance avec la valeur de
    +   # SetHandler est la partie qui suit le "pipe". Si vous devez faire
    +   # une distinction, "localhost" peut tre chang en un nom de serveur
    +   # unique.
    +   <Proxy "fcgi://localhost/" enablereuse=on max=10>
    +   </Proxy>
    +
    +<FilesMatch ...>
    +    SetHandler  "proxy:fcgi://localhost:9000"
    +</FilesMatch>
    +
    +<FilesMatch ...>
    +    SetHandler  "proxy:balancer://myappcluster/"
    +</FilesMatch>
    +
    +
    top
    +
    +

    Variables d'environnement

    +

    En plus des directives de configuration qui contrlent le + comportement de mod_proxy, de nombreuses + variables d'environnement permettent de piloter le + fournisseur du protocole FCGI :

    +
    +
    proxy-fcgi-pathinfo
    +
    Par dfaut, mod_proxy_fcgi ne crera jamais + ni n'exportera la variable d'environnement PATH_INFO, + ce qui permet au serveur FCGI d'arrire-plan de dterminer + correctement SCRIPT_NAME et Script-URI, et + de se conformer la section 3.3 de la RFC 3875. Si au contraire + vous avez souhaitez que mod_proxy_fcgi gnre une + "estimation la plus exacte possible" de PATH_INFO, + dfinissez la variable d'environnement + proxy-fcgi-pathinfo. Ceci peut servir de + contournement pour une bogue prsente dans certaines + implmentations de FCGI. Cette variable peut tre + multivalue afin de pouvoir choisir la valeur la plus approprie + (versions 2.4.11 et suprieures) : +
    +
    first-dot
    +
    PATH_INFO est extrait partir du slash qui suit le + premier "." de l'URL.
    +
    last-dot
    +
    PATH_INFO est extrait partir du slash qui suit le + dernier "." de l'URL.
    +
    full
    +
    PATH_INFO est calcul en supposant que l'URL correspond au + chemin du systme de fichiers.
    +
    unescape
    +
    PATH_INFO correspond la partie chemin de l'URL avec ses + squences d'chappement dcodes.
    +
    toute autre valeur
    +
    PATH_INFO correspond la partie chemin de l'URL. + Auparavant, c'tait la seule option pour proxy-fcgi-pathinfo.
    +
    +
    +
    +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_fcgi.xml b/docs/manual/mod/mod_proxy_fcgi.xml index 5de04b121ef..fa5f27da284 100644 --- a/docs/manual/mod/mod_proxy_fcgi.xml +++ b/docs/manual/mod/mod_proxy_fcgi.xml @@ -42,8 +42,10 @@

    Unlike mod_fcgid and mod_fastcgi, mod_proxy_fcgi has no provision for starting the - application process; fcgistarter is provided for - that purpose.

    + application process; fcgistarter is provided + (on some platforms) for that purpose. Alternatively, external launching + or process management may be available in the FastCGI application + framework in use.

    Warning

    Do not enable proxying until you have fcgistarter mod_proxy +mod_authnz_fcgi

    Examples

    Remember, in order to make the following examples work, you have to enable mod_proxy and mod_proxy_fcgi.

    Single application instance - ProxyPass /myapp/ fcgi://localhost:4000/ + +ProxyPass "/myapp/" "fcgi://localhost:4000/" + -

    This application should be able to handle multiple concurrent - connections. mod_proxy enables connection reuse by - default, so after a request has been completed the connection will be - held open by that httpd child process and won't be reused until that - httpd process routes another request to the application. If the - FastCGI application is unable to handle enough concurrent connections - from httpd, requests can block waiting for the application to close - an existing connection. One way to resolve this is to disable connection - reuse on the ProxyPass directive, as shown in - the following example:

    - - Single application instance, no connection reuse - ProxyPass /myapp/ fcgi://localhost:4000/ disablereuse=on +

    mod_proxy_fcgi disables connection reuse by + default, so after a request has been completed the connection will NOT be + held open by that httpd child process and won't be reused. If the + FastCGI application is able to handle concurrent connections + from httpd, you can opt-in to connection reuse as shown in the following + example:

    + + Single application instance, connection reuse (2.4.11 and later) + +ProxyPass "/myapp/" "fcgi://localhost:4000/" enablereuse=on + + + +

    The following example passes the request URI as a filesystem + path for the PHP-FPM daemon to run. The request URL is implicitly added + to the 2nd parameter. The hostname and port following fcgi:// are where + PHP-FPM is listening. Connection pooling is enabled.

    + PHP-FPM + +ProxyPassMatch "^/myapp/.*\.php(/.*)?$" "fcgi://localhost:9000/var/www/" enablereuse=on + + + +

    The following example passes the request URI as a filesystem + path for the PHP-FPM daemon to run. In this case, PHP-FPM is listening on + a unix domain socket (UDS). Requires 2.4.9 or later. With this syntax, + the hostname and optional port following fcgi:// are ignored.

    + PHP-FPM with UDS + +# UDS does not currently support connection reuse +ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/" +

    The balanced gateway needs mod_proxy_balancer and @@ -86,14 +110,50 @@ default, and will be used for this example configuration.

    Balanced gateway to multiple application instances - ProxyPass /myapp/ balancer://myappcluster/
    - <Proxy balancer://myappcluster/>
    - - BalancerMember fcgi://localhost:4000/
    - BalancerMember fcgi://localhost:4001/
    -
    - </Proxy> + +ProxyPass "/myapp/" "balancer://myappcluster/" +<Proxy "balancer://myappcluster/"> + BalancerMember "fcgi://localhost:4000" + BalancerMember "fcgi://localhost:4001" +</Proxy> +
    + +

    You can also force a request to be handled as a reverse-proxy + request, by creating a suitable Handler pass-through. The example + configuration below will pass all requests for PHP scripts to the + specified FastCGI server using reverse proxy. + This feature is available in Apache HTTP Server 2.4.10 and later. For performance + reasons, you will want to define a worker + representing the same fcgi:// backend. The benefit of this form is that it + allows the normal mapping of URI to filename to occur in the server, and the + local filesystem result is passed to the backend. When FastCGI is + configured this way, the server can calculate the most accurate + PATH_INFO. +

    + Proxy via Handler + +<FilesMatch "\.php$"> + # Note: The only part that varies is /path/to/app.sock + SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/" +</FilesMatch> + +# Define a matching worker. +# The part that is matched to the SetHandler is the part that +# follows the pipe. If you need to distinguish, "localhost; can +# be anything unique. +<Proxy "fcgi://localhost/" enablereuse=on max=10> +</Proxy> + +<FilesMatch ...> + SetHandler "proxy:fcgi://localhost:9000" +</FilesMatch> + +<FilesMatch ...> + SetHandler "proxy:balancer://myappcluster/" +</FilesMatch> + +
    Environment Variables @@ -103,13 +163,35 @@ provider:

    proxy-fcgi-pathinfo
    -
    By default mod_proxy_fcgi will neither create - nor export the PATH_INFO environment variable. This allows +
    When configured via ProxyPass or ProxyPassMatch, mod_proxy_fcgi will not + set the PATH_INFO environment variable. This allows the backend FCGI server to correctly determine SCRIPT_NAME and Script-URI and be compliant with RFC 3875 section 3.3. If instead you need mod_proxy_fcgi to generate a "best guess" for PATH_INFO, set this env-var. - This is a workaround for a bug in some FCGI implementations.
    + This is a workaround for a bug in some FCGI implementations. This + variable can be set to multiple values to tweak at how the best guess + is chosen (In 2.4.11 and later only): +
    +
    first-dot
    +
    PATH_INFO is split from the slash following the + first "." in the URL.
    +
    last-dot
    +
    PATH_INFO is split from the slash following the + last "." in the URL.
    +
    full
    +
    PATH_INFO is calculated by an attempt to map the URL to the + local filesystem.
    +
    unescape
    +
    PATH_INFO is the path component of the URL, unescaped / + decoded.
    +
    any other value
    +
    PATH_INFO is the same as the path component of the URL. + Originally, this was the only proxy-fcgi-pathinfo option.
    +
    +
    diff --git a/docs/manual/mod/mod_proxy_fcgi.xml.fr b/docs/manual/mod/mod_proxy_fcgi.xml.fr new file mode 100644 index 00000000000..c01bd2c10ca --- /dev/null +++ b/docs/manual/mod/mod_proxy_fcgi.xml.fr @@ -0,0 +1,214 @@ + + + + + + + + + + + +mod_proxy_fcgi +Module fournissant le support de FastCGI à +mod_proxy +Extension +mod_proxy_fcgi.c +proxy_fcgi_module +Disponible depuis la version 2.3 d'Apache + + +

    Pour fonctionner, ce module nécessite le chargement de + mod_proxy. Il fournit le support du protocole FastCGI.

    + +

    Ainsi, pour pouvoir traiter le protocole FastCGI, + mod_proxy et mod_proxy_fcgi + doivent être chargés dans le serveur.

    + +

    A la différence de mod_fcgid et mod_fastcgi, + mod_proxy_fcgi n'est pas en mesure de démarrer le + processus de l'application ; fcgistarter est + fourni à cet effet sur certaines plateformes. Le framework + applicatif FastCGI utilisé peut aussi fournir la gestion des + processus ou des lancements de programmes externes.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +fcgistarter +mod_proxy +mod_authnz_fcgi + +
    Exemples +

    Pour que ces exemples fonctionnent, vous ne devez pas oublier + d'activer mod_proxy et + mod_proxy_fcgi.

    + + Instance d'application unique + + ProxyPass "/mon_appli/" "fcgi://localhost:4000/" + + + + +

    mod_proxy_fcgi interdisant par défaut la + réutilisation des connexions, lorsqu'une requête a été traitée, la + connexion ne sera pas maintenue ouverte par le processus enfant + httpd, et ne sera donc pas réutilisée. Cependant, si l'application + FastCGI supporte les connexions httpd simultanées, vous pouvez opter + pour la réutilisation des connexions comme dans l'exemple suivant :

    + + Instance d'application unique, réutilisation + des connexions (versions 2.4.11 et supérieures) + + ProxyPass "/myapp/" "fcgi://localhost:4000/" enablereuse=on + + + +

    Dans l'exemple suivant, l'URI de la requête est transmis en tant + que chemin du système de fichiers pour l'exécution du démon PHP-FPM. + L'URL de la requête est implicitement ajoutée au second paramètre. + PHP-FPM est à l'écoute de l'hôte et du port qui + suivent fcgi://. La conservation des connexions est activée.

    + PHP-FPM + + ProxyPassMatch "^/myapp/.*\.php(/.*)?$" "fcgi://localhost:9000/var/www/" enablereuse=on + + + +

    Dans l'exemple suivant, l'URI de la requête est transmis en tant + que chemin du système de fichiers pour l'exécution du démon PHP-FPM. + Dans ce cas cependant, PHP-FPM est à l'écoute d'un socket de domaine + unix (UDS). Cette fonctionnalité est disponible à partir de la + version 2.4.9. Avec cette syntaxe, si un nom d'hôte et un port sont + ajoutés après fcgi://, ils seront ignorés.

    + PHP-FPM with UDS + + # A ce jour, UDS ne supporte pas la réutilisation des connexions + ProxyPassMatch "^/(.*\.php(/.*)?)$" "unix:/var/run/php5-fpm.sock|fcgi://localhost/var/www/" + + + +

    La passerelle à répartition de charge nécessite le chargement du + module mod_proxy_balancer et d'au moins un module + fournissant un algorithme de répartition de charge, comme + mod_lbmethod_byrequests en plus des modules + déjà cités. mod_lbmethod_byrequests est le module + par défaut et sera utilisé dans cet exemple de configuration.

    + + Passerelle à répartition de charge vers plusieurs + instances de l'application + +ProxyPass "/myapp/" "balancer://myappcluster/" +<Proxy "balancer://myappcluster/"> + BalancerMember "fcgi://localhost:4000" + BalancerMember "fcgi://localhost:4001" +</Proxy> + + + +

    Vous pouvez aussi forcer le traitement d'une requête en tant que + requête de mandataire inverse en créant un court-circuiteur de + gestionnaire approprié. Dans l'exemple ci-dessous, toutes les + requêtes pour des scripts PHP seront transmises au serveur FastCGI + spécifié par mandat inverse. Cette fonctionnalité est disponible à + partir de la version 2.4.10 du serveur HTTP Apache. Pour des raisons + de performances, il est recommandé de définir un worker (configuration d'un + mandataire) représentant le même serveur fcgi:// d'arrière-plan. + Avec cette configuration, il est possible d'effectuer une + correspondance directe entre l'URI et le chemin du fichier sur le + serveur, et le chemin local du fichier sera alors transmis au serveur + d'arrière-plan. Lorsque FastCGI est configuré ainsi, le serveur est + en mesure de calculer le PATH_INFO le plus approprié. +

    + Mandataire via un gestionnaire + +<FilesMatch "\.php$"> + # Note : la seule partie variable est /path/to/app.sock + SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/" +</FilesMatch> + # Définition d'une configuration de mandataire qui convient. + # La partie qui est mise en correspondance avec la valeur de + # SetHandler est la partie qui suit le "pipe". Si vous devez faire + # une distinction, "localhost" peut être changé en un nom de serveur + # unique. + <Proxy "fcgi://localhost/" enablereuse=on max=10> + </Proxy> + +<FilesMatch ...> + SetHandler "proxy:fcgi://localhost:9000" +</FilesMatch> + +<FilesMatch ...> + SetHandler "proxy:balancer://myappcluster/" +</FilesMatch> + + +
    + +
    Variables d'environnement +

    En plus des directives de configuration qui contrôlent le + comportement de mod_proxy, de nombreuses + variables d'environnement permettent de piloter le + fournisseur du protocole FCGI :

    +
    +
    proxy-fcgi-pathinfo
    +
    Par défaut, mod_proxy_fcgi ne créera jamais + ni n'exportera la variable d'environnement PATH_INFO, + ce qui permet au serveur FCGI d'arrière-plan de déterminer + correctement SCRIPT_NAME et Script-URI, et + de se conformer à la section 3.3 de la RFC 3875. Si au contraire + vous avez souhaitez que mod_proxy_fcgi génère une + "estimation la plus exacte possible" de PATH_INFO, + définissez la variable d'environnement + proxy-fcgi-pathinfo. Ceci peut servir de + contournement pour une bogue présente dans certaines + implémentations de FCGI. Cette variable peut être + multivaluée afin de pouvoir choisir la valeur la plus appropriée + (versions 2.4.11 et supérieures) : +
    +
    first-dot
    +
    PATH_INFO est extrait à partir du slash qui suit le + premier "." de l'URL.
    +
    last-dot
    +
    PATH_INFO est extrait à partir du slash qui suit le + dernier "." de l'URL.
    +
    full
    +
    PATH_INFO est calculé en supposant que l'URL correspond au + chemin du système de fichiers.
    +
    unescape
    +
    PATH_INFO correspond à la partie chemin de l'URL avec ses + séquences d'échappement décodées.
    +
    toute autre valeur
    +
    PATH_INFO correspond à la partie chemin de l'URL. + Auparavant, c'était la seule option pour proxy-fcgi-pathinfo.
    +
    +
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_proxy_fcgi.xml.meta b/docs/manual/mod/mod_proxy_fcgi.xml.meta index 76863e38366..6b7f40e7157 100644 --- a/docs/manual/mod/mod_proxy_fcgi.xml.meta +++ b/docs/manual/mod/mod_proxy_fcgi.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_fdpass.html b/docs/manual/mod/mod_proxy_fdpass.html index b660e02764d..87478ac85d1 100644 --- a/docs/manual/mod/mod_proxy_fdpass.html +++ b/docs/manual/mod/mod_proxy_fdpass.html @@ -3,3 +3,7 @@ URI: mod_proxy_fdpass.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_proxy_fdpass.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_fdpass.html.en b/docs/manual/mod/mod_proxy_fdpass.html.en index 29885e06b96..50d9f1f0374 100644 --- a/docs/manual/mod/mod_proxy_fdpass.html.en +++ b/docs/manual/mod/mod_proxy_fdpass.html.en @@ -1,27 +1,33 @@ - -mod_proxy_fdpass - Apache HTTP Server +mod_proxy_fdpass - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_fdpass

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -41,9 +47,14 @@

    The module has a proxy_fdpass_flusher provider interface, which allows another module to optionally send the response headers, or even - the start of the response body. The default flush provider disables keep-alive, - and sends the response headers, letting the external process just send a - response body.

    + the start of the response body. The default flush provider + disables keep-alive, and sends the response headers, letting the external + process just send a response body. +

    + +

    In order to use another provider, you have to set the flusher + parameter in the ProxyPass directive. +

    At this time the only data passed to the external process is the client socket. To receive a client socket, call recvfrom with an allocated @@ -54,15 +65,37 @@

    Directives

    This module provides no directives.

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_fdpass.html.fr b/docs/manual/mod/mod_proxy_fdpass.html.fr new file mode 100644 index 00000000000..d14ca5bccc7 --- /dev/null +++ b/docs/manual/mod/mod_proxy_fdpass.html.fr @@ -0,0 +1,104 @@ + + + + + +mod_proxy_fdpass - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_fdpass

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:fdpass external process support module for mod_proxy
    + + + +
    Description:Module fournissant le support des processus externes fdpass + mod_proxy
    Statut:Extension
    IdentificateurdeModule:proxy_fdpass_module
    FichierSource:mod_proxy_fdpass.c
    Compatibilit:Disponible pour unix depuis la version 2.3 +d'Apache
    +

    Sommaire

    + +

    Pour fonctionner, ce module ncessite le chargement de + mod_proxy. Il permet le passage de la socket du client + vers un autre processus.

    + +

    mod_proxy_fdpass utilise la capacit des sockets de + domaine AF_UNIX transmettre un + descripteur de fichier ouvert afin de permettre un autre + processus de terminer le traitement de la requte. +

    + +

    Le module possde une interface de fournisseur + proxy_fdpass_flusher qui permet ventuellement un + autre module d'envoyer les en-ttes de la rponse, ou mme le dbut + du corps de la rponse. Le fournisseur par dfaut flush dsactive la + persistence, et envoie les en-ttes de la rponse, laissant le soin + au processus externe d'envoyer le corps de la rponse.

    + +

    Pour utiliser un autre fournisseur, vous devez spcifier le paramtre + flusher de la directive ProxyPass. +

    + +

    l'heure actuelle, la seule donne transmise au processus + externe est la socket du client. Pour recevoir une socket client, + appelez recvfrom avec une structure struct cmsghdr alloue. Les versions + futures de ce module pourront transmettre d'autres donnes que le + socket client. +

    +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_fdpass.xml b/docs/manual/mod/mod_proxy_fdpass.xml index 5d61836d79b..745ad142cbf 100644 --- a/docs/manual/mod/mod_proxy_fdpass.xml +++ b/docs/manual/mod/mod_proxy_fdpass.xml @@ -42,9 +42,14 @@

    The module has a proxy_fdpass_flusher provider interface, which allows another module to optionally send the response headers, or even - the start of the response body. The default flush provider disables keep-alive, - and sends the response headers, letting the external process just send a - response body.

    + the start of the response body. The default flush provider + disables keep-alive, and sends the response headers, letting the external + process just send a response body. +

    + +

    In order to use another provider, you have to set the flusher + parameter in the ProxyPass directive. +

    At this time the only data passed to the external process is the client socket. To receive a client socket, call recvfrom with an allocated diff --git a/docs/manual/mod/mod_proxy_fdpass.xml.fr b/docs/manual/mod/mod_proxy_fdpass.xml.fr new file mode 100644 index 00000000000..986671a86b3 --- /dev/null +++ b/docs/manual/mod/mod_proxy_fdpass.xml.fr @@ -0,0 +1,71 @@ + + + + + + + + + + + +mod_proxy_fdpass +Module fournissant le support des processus externes fdpass +à mod_proxy +Extension +mod_proxy_fdpass.c +proxy_fdpass_module +Disponible pour unix depuis la version 2.3 +d'Apache + +

    +

    Pour fonctionner, ce module nécessite le chargement de + mod_proxy. Il permet le passage de la socket du client + vers un autre processus.

    + +

    mod_proxy_fdpass utilise la capacité des sockets de + domaine AF_UNIX à transmettre un + descripteur de fichier ouvert afin de permettre à un autre + processus de terminer le traitement de la requête. +

    + +

    Le module possède une interface de fournisseur + proxy_fdpass_flusher qui permet éventuellement à un + autre module d'envoyer les en-têtes de la réponse, ou même le début + du corps de la réponse. Le fournisseur par défaut flush désactive la + persistence, et envoie les en-têtes de la réponse, laissant le soin + au processus externe d'envoyer le corps de la réponse.

    + +

    Pour utiliser un autre fournisseur, vous devez spécifier le paramètre + flusher de la directive ProxyPass. +

    + +

    À l'heure actuelle, la seule donnée transmise au processus + externe est la socket du client. Pour recevoir une socket client, + appelez recvfrom avec une structure struct cmsghdr allouée. Les versions + futures de ce module pourront transmettre d'autres données que le + socket client. +

    +
    + +mod_proxy + diff --git a/docs/manual/mod/mod_proxy_fdpass.xml.meta b/docs/manual/mod/mod_proxy_fdpass.xml.meta index a88dd484200..a99a7942b5a 100644 --- a/docs/manual/mod/mod_proxy_fdpass.xml.meta +++ b/docs/manual/mod/mod_proxy_fdpass.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_ftp.html b/docs/manual/mod/mod_proxy_ftp.html index 0cdfe603aa4..928eb93ef8b 100644 --- a/docs/manual/mod/mod_proxy_ftp.html +++ b/docs/manual/mod/mod_proxy_ftp.html @@ -3,3 +3,7 @@ URI: mod_proxy_ftp.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_proxy_ftp.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_ftp.html.en b/docs/manual/mod/mod_proxy_ftp.html.en index cb2452e9f53..c64a64c583b 100644 --- a/docs/manual/mod/mod_proxy_ftp.html.en +++ b/docs/manual/mod/mod_proxy_ftp.html.en @@ -1,27 +1,33 @@ - -mod_proxy_ftp - Apache HTTP Server +mod_proxy_ftp - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_ftp

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -44,13 +50,7 @@ large.

    -
    top
    top

    How can I force an FTP ASCII download of @@ -116,7 +123,7 @@

    How can I hide the FTP cleartext password in my browser's URL line?

    To log in to an FTP server by username and password, Apache uses - different strategies. In absense of a user name and password in the URL + different strategies. In absence of a user name and password in the URL altogether, Apache sends an anonymous login to the FTP server, i.e.,

    @@ -155,7 +162,7 @@ a base64-encoded cleartext string, and between the Apache proxy and the FTP server as plaintext. You should therefore think twice before accessing your FTP server via HTTP (or before accessing your personal - files via FTP at all!) When using unsecure channels, an eavesdropper + files via FTP at all!) When using insecure channels, an eavesdropper might intercept your password on its way.

    top
    @@ -195,7 +202,7 @@ - +
    Description:FTP support module for mod_proxy
    Context:server config, virtual host, directory
    Status:Extension
    Module:mod_proxy_ftp
    Compatibility:Available in Apache xxx and later
    Compatibility:Available in Apache 2.3.3 and later

    The ProxyFtpEscapeWildcards directive controls whether wildcard characters ("*?[{~") in requested @@ -217,7 +224,7 @@ Context:server config, virtual host, directory Status:Extension Module:mod_proxy_ftp -Compatibility:Available in Apache xxx and later +Compatibility:Available in Apache 2.3.3 and later

    The ProxyFtpListOnWildcard directive controls whether wildcard characters ("*?[{~") in requested @@ -229,8 +236,30 @@

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_ftp.html.fr b/docs/manual/mod/mod_proxy_ftp.html.fr new file mode 100644 index 00000000000..e440002b073 --- /dev/null +++ b/docs/manual/mod/mod_proxy_ftp.html.fr @@ -0,0 +1,297 @@ + + + + + +mod_proxy_ftp - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_ftp

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Module fournissant le support FTP +mod_proxy
    Statut:Extension
    IdentificateurdeModule:proxy_ftp_module
    FichierSource:mod_proxy_ftp.c
    +

    Sommaire

    + +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy. Il fournit le support du + mandatement des sites FTP. Notez que le support FTP est + actuellement limit la mthode GET.

    + +

    Ainsi, pour pouvoir traiter les requtes FTP mandates, + mod_proxy, et mod_proxy_ftp + doivent tre chargs dans le serveur.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +
    top
    +
    +

    Pourquoi les fichiers du type + xxx ne sont-ils pas tlchargeables par FTP ?

    +

    Ce type particulier de fichier n'est probablement pas dfini en + temps que application/octet-stream dans le fichier + de configuration mime.types de votre mandataire. La ligne suivante + peut y remdier :

    + +
    application/octet-stream   bin dms lha lzh exe class tgz taz
    +

    Vous pouvez aussi dfinir par dfaut tous les types de fichiers + en tant que fichiers binaires :

    +
    ForceType application/octet-stream
    +
    +
    top
    +
    +

    Comment puis-je forcer le tlchargement + FTP en mode ASCII du fichier xxx ?

    +

    Dans les rares siruations o vous devez tlcharger un fichier + spcifique en utilisant la mthode de transfert FTP + ASCII (alors que le mode transfert par dfaut est + binary), vous pouvez modifier le mode de transfert de + mod_proxy en suffixant la requte avec + ;type=a pour forcer un transfert en mode ASCII (les + listings de rpertoires FTP sont cependant quant eux transmis en + mode ASCII).

    +
    top
    +
    +

    Comment puis-je effectuer un + chargement FTP ?

    +

    Actuellement, seule la mthode GET est supporte pour FTP dans + mod_proxy. Vous pouvez en revanche utiliser le chargement HTTP (POST + or PUT) via un mandataire Apache.

    +
    top
    +
    +

    Comment puis-je accder par FTP + des fichiers situs en dehors de mon rpertoire home ?

    +

    Un URI FTP est considr comme relatif au rpertoire home de + l'utilisateur connect. Hlas, vous ne pouvez pas utiliser /../ + pour atteindre des rpertoires de niveau suprieur, car les points + sont interprts par le navigateur et ne sont donc pas vraiment + envoys au serveur FTP. Pour traiter ce problme, une mthode + nomme Squid %2f hack a t implmente dans le + mandataire FTP Apache ; cette solution est aussi utilise par + d'autres serveurs mandataires courants comme le Cache mandataire Squid. En + prfixant par /%2f le chemin de votre requte, vous + pouvez faire en sorte que le mandataire modifie le rpertoire FTP + racine en / (au lieu du rpertoire home). Par + exemple, pour extraire le fichier /etc/motd, vous + pourriez utiliser l'URL :

    + +

    + ftp://utilisateur@serveur/%2f/etc/motd +

    +
    top
    +
    +

    Comment puis-je dissimuler le mot de + passe FTP apparaissant en clair dans la ligne d'URL de mon + navigateur ?

    +

    Apache utilise diffrentes stratgies pour effectuer une + connexion un serveur FTP l'aide d'un nom d'utilisateur et d'un + mot de passe. En l'absence de nom d'utilisateur et de mot de passe + dans l'URL, Apache tente une connexion anonyme auprs du serveur + FTP comme suit :

    + +

    + utilisateur : anonymous
    + mot de passe : apache_proxy@ +

    + +

    Ceci fonctionne avec tous les serveurs FTP courants configurs + pour accepter les connexions anonymes.

    + +

    Pour une connexion personnalise avec un nom d'utilisateur + spcifique, vous pouvez intgrer ce dernier dans l'URL comme suit + :

    + +

    + ftp://nom-utilisateur@serveur/mon-fichier +

    + +

    Si le serveur FTP demande un mot de passe pour ce nom + d'utilisateur (ce qu'il est cens faire), Apache va renvoyer au + client une rponse 401 (Autorisation requise), ce qui + fera afficher au navigateur une bote de dialogue utilisateur/mot + de passe. Une fois le mot de passe saisi, la connexion est tente + nouveau, et si elle russit, la ressource demande est + prsente. L'avantage de cette procdure rside dans le fait que + votre navigateur n'affiche pas le mot de passe en clair, ce qu'il + aurait fait si vous aviez utilis l'URL :

    + +

    + ftp://nom-utilisateur:mot-de-passe + @serveur/mon-fichier +

    + +

    Note

    +

    Le mot de passe transmis de cette manire n'est pas chiffr + lorsqu'il est envoy. Il transite entre votre navigateur et le + serveur mandataire Apache sous la forme d'une chane de texte en + clair code en base64, et entre le mandataire Apache et le + serveur FTP en texte pur. Vous devez par consquent rflchir + deux fois avant d'accder votre serveur FTP via HTTP (et d'une + manire gnrale avant d'accder vos fichiers personnels via + FTP !) sur des canaux non scuriss, car des oreilles + indiscrtes pourraient intercepter votre mot de passe au cours + de son transfert.

    +
    +
    top
    +
    +

    Pourquoi reois-je un listing de + fichiers alors que j'ai demand le tlchargement d'un fichier + ?

    +

    Apache examine l'URL de la requte afin de permettre la + navigation dans les rpertoires d'un serveur FTP ainsi que le + tlchargement de fichiers. Si elle ressemble un rpertoire, ou + contient des caractres gnriques ("*?[{~"), alors Apache + considre que c'est un listing qui est demand, et non un + tlchargement.

    +

    Vous pouvez dsactiver le traitement spcial des noms contenant + des caractres gnriques. Voir cet effet la directive + ProxyFtpListOnWildcard. +

    +
    +
    top
    +

    Directive ProxyFtpDirCharset

    + + + + + + + + +
    Description:Dfinit le jeu de caractres des listings FTP +mandats
    Syntaxe:ProxyFtpDirCharset jeu-caractres
    Dfaut:ProxyFtpDirCharset ISO-8859-1
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy_ftp
    Compatibilit:Disponible depuis la version 2.2.7 d'Apache. Dplac +depuis mod_proxy partir de la version 2.3.5 d'Apache
    +

    La directive ProxyFtpDirCharset permet de + dfinir le jeu de caractres utiliser pour les listings FTP en + HTML gnrs par mod_proxy_ftp.

    + +
    +
    top
    +

    Directive ProxyFtpEscapeWildcards

    + + + + + + + + +
    Description:Les caractres gnriques dans les noms de fichiers +doivent-ils tre chapps lorsqu'ils sont envoys au serveur FTP ?
    Syntaxe:ProxyFtpEscapeWildcards [on|off]
    Dfaut:on
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy_ftp
    Compatibilit:Disponible depuis la version 2.3.3 du serveur HTTP Apache
    +

    La directive ProxyFtpEscapeWildcards permet + de dterminer si les caractres gnriques ("*?[{~") que contiennent + les noms de fichiers demands doivent tre chapps pas un slash + invers avant d'tre envoys au serveur FTP. Il s'agit du comportement + par dfaut ; cependant, de nombreux serveurs FTP n'ont aucune + connaissance de la notion d'chappement, et tentent de servir le + fichier demand sous sa forme littrale, en incluant les slashes + inverss dans son nom.

    +

    Dfinissez cette directive "off" pour permettre le + tlchargement de fichiers dont les noms contiennent des caractres + gnriques depuis des serveurs FTP qui ne connaissent pas + l'chappement des caractres gnriques.

    + +
    +
    top
    +

    Directive ProxyFtpListOnWildcard

    + + + + + + + + +
    Description:Les caractres gnriques dans les noms de fichiers +demands doivent-ils dclencher l'affichage d'un listing ?
    Syntaxe:ProxyFtpListOnWildcard [on|off]
    Dfaut:on
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy_ftp
    Compatibilit:Disponible depuis la version 2.3.3 du serveur HTTP Apache
    +

    La directive ProxyFtpListOnWildcard permet + de dterminer si les caractres gnriques ("*?[{~") que contiennent + les noms de fichiers demands provoquent l'affichage d'un listing de + fichiers par mod_proxy_ftp au lieu de tlcharger un + fichier. Il s'agit de leur comportement par dfaut (valeur on). + Dfinissez cette directive "off" pour permettre le tlchargement de + fichiers mme si leur nom contient des caractres gnriques.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_ftp.xml b/docs/manual/mod/mod_proxy_ftp.xml index 77582e711b5..b8cdd53ad48 100644 --- a/docs/manual/mod/mod_proxy_ftp.xml +++ b/docs/manual/mod/mod_proxy_ftp.xml @@ -59,7 +59,7 @@

    Alternatively you may prefer to default everything to binary:

    -
    ForceType application/octet-stream
    + ForceType application/octet-stream
    @@ -100,7 +100,7 @@
    How can I hide the FTP cleartext password in my browser's URL line?

    To log in to an FTP server by username and password, Apache uses - different strategies. In absense of a user name and password in the URL + different strategies. In absence of a user name and password in the URL altogether, Apache sends an anonymous login to the FTP server, i.e.,

    @@ -139,7 +139,7 @@ a base64-encoded cleartext string, and between the Apache proxy and the FTP server as plaintext. You should therefore think twice before accessing your FTP server via HTTP (or before accessing your personal - files via FTP at all!) When using unsecure channels, an eavesdropper + files via FTP at all!) When using insecure channels, an eavesdropper might intercept your password on its way.

    @@ -162,7 +162,7 @@ on server configvirtual host directory -Available in Apache xxx and later +Available in Apache 2.3.3 and later

    The ProxyFtpListOnWildcard directive @@ -181,7 +181,7 @@ on server configvirtual host directory -Available in Apache xxx and later +Available in Apache 2.3.3 and later

    The ProxyFtpEscapeWildcards directive diff --git a/docs/manual/mod/mod_proxy_ftp.xml.fr b/docs/manual/mod/mod_proxy_ftp.xml.fr new file mode 100644 index 00000000000..8cbb1766087 --- /dev/null +++ b/docs/manual/mod/mod_proxy_ftp.xml.fr @@ -0,0 +1,245 @@ + + + + + + + + + + + +mod_proxy_ftp +Module fournissant le support FTP à +mod_proxy +Extension +mod_proxy_ftp.c +proxy_ftp_module + +

    +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy. Il fournit le support du + mandatement des sites FTP. Notez que le support FTP est + actuellement limité à la méthode GET.

    + +

    Ainsi, pour pouvoir traiter les requêtes FTP mandatées, + mod_proxy, et mod_proxy_ftp + doivent être chargés dans le serveur.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    +mod_proxy + +
    Pourquoi les fichiers du type + <var>xxx</var> ne sont-ils pas téléchargeables par FTP ? +

    Ce type particulier de fichier n'est probablement pas défini en + temps que application/octet-stream dans le fichier + de configuration mime.types de votre mandataire. La ligne suivante + peut y remédier :

    + + +
    application/octet-stream   bin dms lha lzh exe class tgz taz
    +
    +

    Vous pouvez aussi définir par défaut tous les types de fichiers + en tant que fichiers binaires :

    + +ForceType application/octet-stream + +
    + +
    Comment puis-je forcer le téléchargement + FTP en mode ASCII du fichier <var>xxx</var> ? +

    Dans les rares siruations où vous devez télécharger un fichier + spécifique en utilisant la méthode de transfert FTP + ASCII (alors que le mode transfert par défaut est + binary), vous pouvez modifier le mode de transfert de + mod_proxy en suffixant la requête avec + ;type=a pour forcer un transfert en mode ASCII (les + listings de répertoires FTP sont cependant quant à eux transmis en + mode ASCII).

    +
    + +
    Comment puis-je effectuer un + chargement FTP ? +

    Actuellement, seule la méthode GET est supportée pour FTP dans + mod_proxy. Vous pouvez en revanche utiliser le chargement HTTP (POST + or PUT) via un mandataire Apache.

    +
    + +
    Comment puis-je accéder par FTP à + des fichiers situés en dehors de mon répertoire home ? +

    Un URI FTP est considéré comme relatif au répertoire home de + l'utilisateur connecté. Hélas, vous ne pouvez pas utiliser /../ + pour atteindre des répertoires de niveau supérieur, car les points + sont interprétés par le navigateur et ne sont donc pas vraiment + envoyés au serveur FTP. Pour traiter ce problème, une méthode + nommée Squid %2f hack a été implémentée dans le + mandataire FTP Apache ; cette solution est aussi utilisée par + d'autres serveurs mandataires courants comme le Cache mandataire Squid. En + préfixant par /%2f le chemin de votre requête, vous + pouvez faire en sorte que le mandataire modifie le répertoire FTP + racine en / (au lieu du répertoire home). Par + exemple, pour extraire le fichier /etc/motd, vous + pourriez utiliser l'URL :

    + + + ftp://utilisateur@serveur/%2f/etc/motd + +
    + +
    Comment puis-je dissimuler le mot de + passe FTP apparaissant en clair dans la ligne d'URL de mon + navigateur ? +

    Apache utilise différentes stratégies pour effectuer une + connexion à un serveur FTP à l'aide d'un nom d'utilisateur et d'un + mot de passe. En l'absence de nom d'utilisateur et de mot de passe + dans l'URL, Apache tente une connexion anonyme auprès du serveur + FTP comme suit :

    + + + utilisateur : anonymous
    + mot de passe : apache_proxy@ +
    + +

    Ceci fonctionne avec tous les serveurs FTP courants configurés + pour accepter les connexions anonymes.

    + +

    Pour une connexion personnalisée avec un nom d'utilisateur + spécifique, vous pouvez intégrer ce dernier dans l'URL comme suit + :

    + + + ftp://nom-utilisateur@serveur/mon-fichier + + +

    Si le serveur FTP demande un mot de passe pour ce nom + d'utilisateur (ce qu'il est censé faire), Apache va renvoyer au + client une réponse 401 (Autorisation requise), ce qui + fera afficher au navigateur une boîte de dialogue utilisateur/mot + de passe. Une fois le mot de passe saisi, la connexion est tentée + à nouveau, et si elle réussit, la ressource demandée est + présentée. L'avantage de cette procédure réside dans le fait que + votre navigateur n'affiche pas le mot de passe en clair, ce qu'il + aurait fait si vous aviez utilisé l'URL :

    + + + ftp://nom-utilisateur:mot-de-passe + @serveur/mon-fichier + + + Note +

    Le mot de passe transmis de cette manière n'est pas chiffré + lorsqu'il est envoyé. Il transite entre votre navigateur et le + serveur mandataire Apache sous la forme d'une chaîne de texte en + clair codée en base64, et entre le mandataire Apache et le + serveur FTP en texte pur. Vous devez par conséquent réfléchir à + deux fois avant d'accéder à votre serveur FTP via HTTP (et d'une + manière générale avant d'accéder à vos fichiers personnels via + FTP !) sur des canaux non sécurisés, car des oreilles + indiscrètes pourraient intercepter votre mot de passe au cours + de son transfert.

    +
    +
    + +
    Pourquoi reçois-je un listing de + fichiers alors que j'ai demandé le téléchargement d'un fichier + ? +

    Apache examine l'URL de la requête afin de permettre la + navigation dans les répertoires d'un serveur FTP ainsi que le + téléchargement de fichiers. Si elle ressemble à un répertoire, ou + contient des caractères génériques ("*?[{~"), alors Apache + considère que c'est un listing qui est demandé, et non un + téléchargement.

    +

    Vous pouvez désactiver le traitement spécial des noms contenant + des caractères génériques. Voir à cet effet la directive + ProxyFtpListOnWildcard. +

    +
    + + +ProxyFtpListOnWildcard +Les caractères génériques dans les noms de fichiers +demandés doivent-ils déclencher l'affichage d'un listing ? +ProxyFtpListOnWildcard [on|off] +on +server configvirtual host + directory +Disponible depuis la version 2.3.3 du serveur HTTP Apache + + +

    La directive ProxyFtpListOnWildcard permet + de déterminer si les caractères génériques ("*?[{~") que contiennent + les noms de fichiers demandés provoquent l'affichage d'un listing de + fichiers par mod_proxy_ftp au lieu de télécharger un + fichier. Il s'agit de leur comportement par défaut (valeur on). + Définissez cette directive à "off" pour permettre le téléchargement de + fichiers même si leur nom contient des caractères génériques.

    +
    +
    + + +ProxyFtpEscapeWildcards +Les caractères génériques dans les noms de fichiers +doivent-ils être échappés lorsqu'ils sont envoyés au serveur FTP ? +ProxyFtpEscapeWildcards [on|off] +on +server configvirtual host + directory +Disponible depuis la version 2.3.3 du serveur HTTP Apache + + +

    La directive ProxyFtpEscapeWildcards permet + de déterminer si les caractères génériques ("*?[{~") que contiennent + les noms de fichiers demandés doivent être échappés pas un slash + inversé avant d'être envoyés au serveur FTP. Il s'agit du comportement + par défaut ; cependant, de nombreux serveurs FTP n'ont aucune + connaissance de la notion d'échappement, et tentent de servir le + fichier demandé sous sa forme littérale, en incluant les slashes + inversés dans son nom.

    +

    Définissez cette directive à "off" pour permettre le + téléchargement de fichiers dont les noms contiennent des caractères + génériques depuis des serveurs FTP qui ne connaissent pas + l'échappement des caractères génériques.

    +
    +
    + + +ProxyFtpDirCharset +Définit le jeu de caractères des listings FTP +mandatés +ProxyFtpDirCharset jeu-caractères +ProxyFtpDirCharset ISO-8859-1 +server configvirtual host +directory +Disponible depuis la version 2.2.7 d'Apache. Déplacé +depuis mod_proxy à partir de la version 2.3.5 d'Apache + + +

    La directive ProxyFtpDirCharset permet de + définir le jeu de caractères à utiliser pour les listings FTP en + HTML générés par mod_proxy_ftp.

    +
    +
    + + diff --git a/docs/manual/mod/mod_proxy_ftp.xml.meta b/docs/manual/mod/mod_proxy_ftp.xml.meta index 1a0b188f798..b95c3fd4e3a 100644 --- a/docs/manual/mod/mod_proxy_ftp.xml.meta +++ b/docs/manual/mod/mod_proxy_ftp.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_hcheck.html b/docs/manual/mod/mod_proxy_hcheck.html new file mode 100644 index 00000000000..93eed7c9012 --- /dev/null +++ b/docs/manual/mod/mod_proxy_hcheck.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_proxy_hcheck.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_hcheck.html.en b/docs/manual/mod/mod_proxy_hcheck.html.en new file mode 100644 index 00000000000..fbe8a54c5b2 --- /dev/null +++ b/docs/manual/mod/mod_proxy_hcheck.html.en @@ -0,0 +1,256 @@ + + + + + +mod_proxy_hcheck - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_proxy_hcheck

    +
    +

    Available Languages:  en 

    +
    + + + + +
    Description:Dynamic health check of Balancer members (workers) for +mod_proxy
    Status:Extension
    ModuleIdentifier:proxy_hcheck_module
    SourceFile:mod_proxy_hcheck.c
    Compatibility:Available in Apache 2.4.21 and later
    +

    Summary

    + +

    This module provides for dynamic health checking of balancer + members (workers). This can be enabled on a worker-by-worker + basis. The health check is done independently of the + actual reverse proxy requests.

    + +

    This module requires the service of mod_watchdog.

    + +

    Parameters

    +

    The health check mechanism is enabled via the use of additional + BalancerMember parameters, which are configured in the standard + way via ProxyPass:

    + +

    A new BalancerMember status state (flag) is defined via this module: "C". + When the worker is taken offline due to failures as determined by the health + check module, this flag is set, and can be seen (and modified) via the + balancer-manager.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParameterDefaultDescription
    hcmethodNoneNo dynamic health check performed. Choices are: + + + + + + + + + + +
    MethodDescriptionNote
    NoneNo dynamic health checking done
    TCPCheck that a socket to the backend can be created: e.g. "are you up"
    OPTIONSSend an HTTP OPTIONS request to the backend*
    HEADSend an HTTP HEAD request to the backend*
    GETSend an HTTP GET request to the backend*
    *: Unless hcexpr is used, a 2xx or 3xx HTTP status will be interpreted as passing the health check
    +
    hcpasses1Number of successful health check tests before worker is re-enabled
    hcfails1Number of failed health check tests before worker is disabled
    hcinterval30Period of health checks in seconds (e.g. performed every 30 seconds)
    hcuri Additional URI to be appended to the worker URL for the health check.
    hctemplate Name of template, created via ProxyHCTemplate to use for setting health check parameters for this worker
    hcexpr Name of expression, created via ProxyHCExpr, used to check response headers for health.
    + If not used, 2xx thru 3xx status codes imply success
    +
    + +
    + +
    top
    +
    +

    Usage examples

    + + +

    The following example shows how one might configured health checking + for various backend servers:

    + + +
    ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
    +ProxyHCExpr gdown {%{REQUEST_STATUS} =~ /^[5]/}
    +ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
    +
    +<Proxy balancer://foo>
    +  BalancerMember http://www.example.com/  hcmethod=GET hcexpr=in_maint hcuri=/status.php
    +  BalancerMember http://www2.example.com/  hcmethod=HEAD hcexpr=ok234 hcinterval=10
    +  BalancerMember http://www3.example.com/ hcmethod=TCP hcinterval=5 hcpasses=2 hcfails=3
    +  BalancerMember http://www4.example.com/
    +</Proxy>
    +
    +ProxyPass "/" "balancer://foo"
    +ProxyPassReverse "/" "balancer://foo"
    + + +

    In this scenario, http://www.example.com/ is health checked by sending a GET /status.php +request to that server and seeing that the returned page does not include the string Under maintenance. If +it does, that server is put in health-check fail mode, and disabled. This dynamic check is performed +every 30 seconds, which is the default.

    + +

    http://www2.example.com/ is checked by sending a simple HEAD request every +10 seconds and making sure that the response status is 2xx, 3xx or 4xx. http://www3.example.com/ is checked +every 5 seconds by simply ensuring that the socket to that server is up. If the backend is marked as +"down" and it passes 2 health check, it will be re-enabled and added back into the load balancer. +It takes 3 back-to-back health check failures to disable the server and move it out +of rotation. Finally, http://www4.example.com/ is +not dynamically checked at all.

    + +
    +
    top
    +

    ProxyHCExpr Directive

    + + + + + + +
    Description:Creates a named condition expression to use to determine health of the backend based on its response.
    Syntax:ProxyHCExpr name {ap_expr expression}
    Context:server config, virtual host
    Status:Extension
    Module:mod_proxy_hcheck
    +

    The ProxyHCExpr directive allows + for creating a named condition expression that checks the response + headers of the backend server to determine its health. This named + condition can then be assigned to balancer members via the hcexpr + parameter

    + +

    ProxyHCExpr: Allow for 2xx/3xx/4xx as passing

    ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
    +ProxyPass "/apps"     "http://backend.example.com/" hcexpr=ok234
    +
    + +
    + The expression can use curly-parens ("{}") as + quoting deliminators in addition to normal quotes. +
    + +

    If using a health check method (eg: GET) which results in a response + body, that body itself can be checked via ap_expr using the hc() + expression function, which is unique to this module.

    + +

    In the following example, we send the backend a GET request + and if the response body contains the phrase Under maintenance, + we want to disable the backend.

    + +

    ProxyHCExpr: Checking response body

    ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
    +ProxyPass "/apps"     "http://backend.example.com/" hcexpr=in_maint hcmethod=get hcuri=/status.php
    +
    + +

    NOTE: Since response body can quite large, it is best if used against specific status pages.

    + +
    +
    top
    +

    ProxyHCTemplate Directive

    + + + + + + +
    Description:Creates a named template for setting various health check parameters
    Syntax:ProxyHCTemplate name parameter=setting <...>
    Context:server config, virtual host
    Status:Extension
    Module:mod_proxy_hcheck
    +

    The ProxyHCTemplate directive allows + for creating a named set (template) of health check parameters + that can then be assigned to balancer members via the hctemplate + parameter

    + +

    ProxyHCTemplate

    ProxyHCTemplate tcp5 hcmethod=tcp hcinterval=5
    +ProxyPass "/apps"     "http://backend.example.com/" hctemplate=tcp5
    +
    + + +
    +
    top
    +

    ProxyHCTPsize Directive

    + + + + + + +
    Description:Sets the size of the threadpool used for the health check workers.
    Syntax:ProxyHCTPsize <size>
    Context:server config, virtual host
    Status:Extension
    Module:mod_proxy_hcheck
    +

    If Apache httpd and APR are built with thread support, the health check + module will offload the work of the actual checking to a threadpool + associated with the Watchdog process, allowing for parallel checks. + The ProxyHCTPsize directive + determines the size of this threadpool. If set to 0, no threadpool + is used at all, resulting in serialized health checks. The default size is 16.

    + +

    ProxyHCTPsize

    ProxyHCTPsize 32
    +
    + + +
    +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_hcheck.xml b/docs/manual/mod/mod_proxy_hcheck.xml new file mode 100644 index 00000000000..a27ce296318 --- /dev/null +++ b/docs/manual/mod/mod_proxy_hcheck.xml @@ -0,0 +1,229 @@ + + + + + + + + + +mod_proxy_hcheck +Dynamic health check of Balancer members (workers) for +mod_proxy +Extension +mod_proxy_hcheck.c +proxy_hcheck_module +Available in Apache 2.4.21 and later + + +

    This module provides for dynamic health checking of balancer + members (workers). This can be enabled on a worker-by-worker + basis. The health check is done independently of the + actual reverse proxy requests.

    + +

    This module requires the service of mod_watchdog.

    + +Parameters +

    The health check mechanism is enabled via the use of additional + BalancerMember parameters, which are configured in the standard + way via ProxyPass:

    + +

    A new BalancerMember status state (flag) is defined via this module: "C". + When the worker is taken offline due to failures as determined by the health + check module, this flag is set, and can be seen (and modified) via the + balancer-manager.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ParameterDefaultDescription
    hcmethodNoneNo dynamic health check performed. Choices are: + + + + + + + + + + +
    MethodDescriptionNote
    NoneNo dynamic health checking done
    TCPCheck that a socket to the backend can be created: e.g. "are you up"
    OPTIONSSend an HTTP OPTIONS request to the backend*
    HEADSend an HTTP HEAD request to the backend*
    GETSend an HTTP GET request to the backend*
    *: Unless hcexpr is used, a 2xx or 3xx HTTP status will be interpreted as passing the health check
    +
    hcpasses1Number of successful health check tests before worker is re-enabled
    hcfails1Number of failed health check tests before worker is disabled
    hcinterval30Period of health checks in seconds (e.g. performed every 30 seconds)
    hcuri Additional URI to be appended to the worker URL for the health check.
    hctemplate Name of template, created via ProxyHCTemplate to use for setting health check parameters for this worker
    hcexpr Name of expression, created via ProxyHCExpr, used to check response headers for health.
    + If not used, 2xx thru 3xx status codes imply success
    +
    + +
    +mod_proxy + +
    + + Usage examples +

    The following example shows how one might configured health checking + for various backend servers:

    + + + +ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/} +ProxyHCExpr gdown {%{REQUEST_STATUS} =~ /^[5]/} +ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/} + +<Proxy balancer://foo> + BalancerMember http://www.example.com/ hcmethod=GET hcexpr=in_maint hcuri=/status.php + BalancerMember http://www2.example.com/ hcmethod=HEAD hcexpr=ok234 hcinterval=10 + BalancerMember http://www3.example.com/ hcmethod=TCP hcinterval=5 hcpasses=2 hcfails=3 + BalancerMember http://www4.example.com/ +</Proxy> + +ProxyPass "/" "balancer://foo" +ProxyPassReverse "/" "balancer://foo" + + +

    In this scenario, http://www.example.com/ is health checked by sending a GET /status.php +request to that server and seeing that the returned page does not include the string Under maintenance. If +it does, that server is put in health-check fail mode, and disabled. This dynamic check is performed +every 30 seconds, which is the default.

    + +

    http://www2.example.com/ is checked by sending a simple HEAD request every +10 seconds and making sure that the response status is 2xx, 3xx or 4xx. http://www3.example.com/ is checked +every 5 seconds by simply ensuring that the socket to that server is up. If the backend is marked as +"down" and it passes 2 health check, it will be re-enabled and added back into the load balancer. +It takes 3 back-to-back health check failures to disable the server and move it out +of rotation. Finally, http://www4.example.com/ is +not dynamically checked at all.

    + +
    + + +ProxyHCExpr +Creates a named condition expression to use to determine health of the backend based on its response. +ProxyHCExpr name {ap_expr expression} +server configvirtual host + + + +

    The ProxyHCExpr directive allows + for creating a named condition expression that checks the response + headers of the backend server to determine its health. This named + condition can then be assigned to balancer members via the hcexpr + parameter

    + + ProxyHCExpr: Allow for 2xx/3xx/4xx as passing + +ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/} +ProxyPass "/apps" "http://backend.example.com/" hcexpr=ok234 + + + + + The expression can use curly-parens ("{}") as + quoting deliminators in addition to normal quotes. + + +

    If using a health check method (eg: GET) which results in a response + body, that body itself can be checked via ap_expr using the hc() + expression function, which is unique to this module.

    + +

    In the following example, we send the backend a GET request + and if the response body contains the phrase Under maintenance, + we want to disable the backend.

    + + ProxyHCExpr: Checking response body + +ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/} +ProxyPass "/apps" "http://backend.example.com/" hcexpr=in_maint hcmethod=get hcuri=/status.php + + + +

    NOTE: Since response body can quite large, it is best if used against specific status pages.

    +
    +
    + + + +ProxyHCTemplate +Creates a named template for setting various health check parameters +ProxyHCTemplate name parameter=setting <...> +server configvirtual host + + + +

    The ProxyHCTemplate directive allows + for creating a named set (template) of health check parameters + that can then be assigned to balancer members via the hctemplate + parameter

    + + ProxyHCTemplate + +ProxyHCTemplate tcp5 hcmethod=tcp hcinterval=5 +ProxyPass "/apps" "http://backend.example.com/" hctemplate=tcp5 + + + +
    +
    + + +ProxyHCTPsize +Sets the size of the threadpool used for the health check workers. +ProxyHCTPsize <size> +server configvirtual host + + + +

    If Apache httpd and APR are built with thread support, the health check + module will offload the work of the actual checking to a threadpool + associated with the Watchdog process, allowing for parallel checks. + The ProxyHCTPsize directive + determines the size of this threadpool. If set to 0, no threadpool + is used at all, resulting in serialized health checks. The default size is 16.

    + + ProxyHCTPsize + +ProxyHCTPsize 32 + + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_proxy_hcheck.xml.meta b/docs/manual/mod/mod_proxy_hcheck.xml.meta new file mode 100644 index 00000000000..a325b81c63f --- /dev/null +++ b/docs/manual/mod/mod_proxy_hcheck.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_proxy_hcheck + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_proxy_html.html b/docs/manual/mod/mod_proxy_html.html index 5f72597ff3c..b615b8e5398 100644 --- a/docs/manual/mod/mod_proxy_html.html +++ b/docs/manual/mod/mod_proxy_html.html @@ -3,3 +3,7 @@ URI: mod_proxy_html.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_proxy_html.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_html.html.en b/docs/manual/mod/mod_proxy_html.html.en index 1fe59a24441..e6d10550d14 100644 --- a/docs/manual/mod/mod_proxy_html.html.en +++ b/docs/manual/mod/mod_proxy_html.html.en @@ -1,27 +1,33 @@ - -mod_proxy_html - Apache HTTP Server +mod_proxy_html - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_html

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -32,9 +38,21 @@ from Clients' networks in a proxy context. for earlier 2.x versions
    Description:Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context.

    Summary

    -

    This module provides an output filter to rewrite HTML links in a proxy situation, to ensure that links work for users outside the proxy. It serves the same purpose as Apache's ProxyPassReverse directive does for HTTP headers, and is an essential component of a reverse proxy.

    +

    This module provides an output filter to rewrite HTML links in a +proxy situation, to ensure that links work for users outside the proxy. +It serves the same purpose as Apache's ProxyPassReverse directive does +for HTTP headers, and is an essential component of a reverse proxy.

    -

    For example, if a company has an application server at appserver.example.com that is only visible from within the company's internal network, and a public webserver www.example.com, they may wish to provide a gateway to the application server at http://www.example.com/appserver/. When the application server links to itself, those links need to be rewritten to work through the gateway. mod_proxy_html serves to rewrite <a href="http://appserver.example.com/foo/bar.html">foobar</a> to <a href="http://www.example.com/appserver/foo/bar.html">foobar</a> making it accessible from outside.

    +

    For example, if a company has an application server at +appserver.example.com that is only visible from within +the company's internal network, and a public webserver +www.example.com, they may wish to provide a gateway to the +application server at http://www.example.com/appserver/. +When the application server links to itself, those links need to be +rewritten to work through the gateway. mod_proxy_html serves to rewrite +<a href="http://appserver.example.com/foo/bar.html">foobar</a> to +<a href="http://www.example.com/appserver/foo/bar.html">foobar</a> +making it accessible from outside.

    mod_proxy_html was originally developed at Webing, whose extensive documentation may be useful to users.

    @@ -50,10 +68,13 @@ extensive documentation
  • ProxyHTMLFixups
  • ProxyHTMLInterp
  • ProxyHTMLLinks
  • +
  • ProxyHTMLMeta
  • ProxyHTMLStripComments
  • ProxyHTMLURLMap
  • - +

    Bugfix checklist

    See also

    +
    top

    ProxyHTMLBufSize Directive

    @@ -67,12 +88,13 @@ stylesheets. Compatibility:Version 2.4 and later; available as a third-party for earlier 2.x versions -

    In order to parse non-HTML content (stylesheets and scripts), mod_proxy_html +

    In order to parse non-HTML content (stylesheets and scripts) embedded +in HTML documents, mod_proxy_html has to read the entire script or stylesheet into a buffer. This buffer will be expanded as necessary to hold the largest script or stylesheet in a page, -in increments of [nnnn] as set by this directive.

    +in increments of bytes as set by this directive.

    The default is 8192, and will work well for almost all pages. However, -if you know you're proxying a lot of pages containing stylesheets and/or +if you know you're proxying pages containing stylesheets and/or scripts bigger than 8K (that is, for a single script or stylesheet, NOT in total), it will be more efficient to set a larger buffer size and avoid the need to resize the buffer dynamically during a request. @@ -126,7 +148,7 @@ generates decent HTML or XHTML, set it accordingly.

    If the first form is used, mod_proxy_html will also clean up the HTML to the specified standard. It cannot fix every error, but it will strip out bogus elements and attributes. -It will also optionally log other errors at LogLevel Debug.

    +It will also optionally log other errors at LogLevel Debug.

    top
    @@ -134,6 +156,7 @@ It will also optionally log other errors at Description:Turns the proxy_html filter on or off. Syntax:ProxyHTMLEnable On|Off +Default:ProxyHTMLEnable Off Context:server config, virtual host, directory Status:Base Module:mod_proxy_html @@ -161,11 +184,14 @@ module for earlier 2.x versions. for earlier 2.x versions

    Specifies one or more attributes to treat as scripting events and -apply ProxyHTMLURLMaps to where appropriate. +apply ProxyHTMLURLMaps to where enabled. You can specify any number of attributes in one or more ProxyHTMLEvents directives.

    -

    The default configuration defines the events in standard HTML 4 -and XHTML 1.

    +

    Normally you'll set this globally. If you set ProxyHTMLEvents in more than +one scope so that one overrides the other, you'll need to specify a complete +set in each of those scopes.

    +

    A default configuration is supplied in proxy-html.conf +and defines the events in standard HTML 4 and XHTML 1.

    top
    @@ -174,19 +200,27 @@ and XHTML 1.

    Description:Determines whether to fix links in inline scripts, stylesheets, and scripting events. Syntax:ProxyHTMLExtended On|Off +Default:ProxyHTMLExtended Off Context:server config, virtual host, directory Status:Base Module:mod_proxy_html Compatibility:Version 2.4 and later; available as a third-party for earlier 2.x versions -

    Set to Off, HTML links are rewritten according +

    Set to Off, HTML links are rewritten according to the ProxyHTMLURLMap directives, but links appearing in Javascript and CSS are ignored.

    -

    Set to On, all scripting events and embedded scripts or +

    Set to On, all scripting events (as determined by +ProxyHTMLEvents) and embedded scripts or stylesheets are also processed by the ProxyHTMLURLMap rules, according to the flags set for each rule. Since this requires more -parsing, performance will be best if you only enable it when strictly necessary.

    +parsing, performance will be best if you only enable it when strictly necessary. +

    +You'll also need to take care over patterns matched, since the parser has no +knowledge of what is a URL within an embedded script or stylesheet. +In particular, extended matching of / is likely to lead to +false matches. +

    top
    @@ -217,6 +251,7 @@ Only use them if you know you have a broken backend server.

    Description:Enables per-request interpolation of ProxyHTMLURLMap rules. Syntax:ProxyHTMLInterp On|Off +Default:ProxyHTMLInterp Off Context:server config, virtual host, directory Status:Base Module:mod_proxy_html @@ -243,10 +278,74 @@ for earlier 2.x versions for earlier 2.x versions

    Specifies elements that have URL attributes that should be rewritten -using standard ProxyHTMLURLMaps. You will need one -ProxyHTMLLinks directive per element, but it can have any number of attributes.

    -

    The default configuration defines the HTML links for standard HTML 4 -and XHTML 1.

    +using standard ProxyHTMLURLMaps. +You will need one ProxyHTMLLinks directive per element, +but it can have any number of attributes.

    +

    Normally you'll set this globally. If you set ProxyHTMLLinks in more than +one scope so that one overrides the other, you'll need to specify a complete +set in each of those scopes.

    +

    A default configuration is supplied in proxy-html.conf +and defines the HTML links for standard HTML 4 and XHTML 1.

    +

    Examples from proxy-html.conf

    ProxyHTMLLinks  a          href
    +ProxyHTMLLinks  area       href
    +ProxyHTMLLinks  link       href
    +ProxyHTMLLinks  img        src longdesc usemap
    +ProxyHTMLLinks  object     classid codebase data usemap
    +ProxyHTMLLinks  q          cite
    +ProxyHTMLLinks  blockquote cite
    +ProxyHTMLLinks  ins        cite
    +ProxyHTMLLinks  del        cite
    +ProxyHTMLLinks  form       action
    +ProxyHTMLLinks  input      src usemap
    +ProxyHTMLLinks  head       profile
    +ProxyHTMLLinks  base       href
    +ProxyHTMLLinks  script     src for
    +
    + + +
    top
    +

    ProxyHTMLMeta Directive

    + + + + + + + + +
    Description:Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    Syntax:ProxyHTMLMeta On|Off
    Default:ProxyHTMLMeta Off
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_proxy_html
    Compatibility:Version 2.4 and later; available as a third-party +module for earlier 2.x versions.
    +

    This turns on or off pre-parsing of metadata in HTML + <head> sections.

    +

    If not required, turning ProxyHTMLMeta Off will give a small + performance boost by skipping this parse step. However, it + is sometimes necessary for internationalisation to work correctly.

    +

    ProxyHTMLMeta has two effects. Firstly and most importantly + it enables detection of character encodings declared in the form

    +
    <meta http-equiv="Content-Type" content="text/html;charset=foo">
    +

    or, in the case of an XHTML document, an XML declaration. + It is NOT required if the charset is declared in a real HTTP header + (which is always preferable) from the backend server, nor if the + document is utf-8 (unicode) or a subset such as ASCII. + You may also be able to dispense with it where documents use a + default declared using xml2EncDefault, but that risks propagating an + incorrect declaration. A ProxyHTMLCharsetOut + can remove that risk, but is likely to be a bigger processing + overhead than enabling ProxyHTMLMeta.

    +

    The other effect of enabling ProxyHTMLMeta is to parse all + <meta http-equiv=...> declarations and convert + them to real HTTP headers, in keeping with the original purpose + of this form of the HTML <meta> element.

    + +

    Warning

    + Because ProxyHTMLMeta promotes all + http-equiv elements to HTTP headers, it is important that you + only enable it in cases where you trust the HTML content as much as you + trust the upstream server. If the HTML is controlled by bad actors, it + will be possible for them to inject arbitrary, possibly malicious, HTTP + headers into your server's responses. +
    top
    @@ -254,6 +353,7 @@ and XHTML 1.

    + @@ -280,10 +380,14 @@ filter chain if stripping comments!

    Description:Determines whether to strip HTML comments.
    Syntax:ProxyHTMLStripComments On|Off
    Default:ProxyHTMLStripComments Off
    Context:server config, virtual host, directory
    Status:Base
    Module:mod_proxy_html
    Compatibility:Version 2.4 and later; available as a third-party module for earlier 2.x versions.
    -

    This is the key directive for rewriting HTML links. When parsing a document, +

    This is the key directive for rewriting HTML links. When parsing a document, whenever a link target matches from-pattern, the matching portion will be rewritten to to-pattern, as modified by any -flags supplied.

    +flags supplied and by the +ProxyHTMLExtended directive. +Only the elements specified using +the ProxyHTMLLinks directive +will be considered as HTML links.

    The optional third argument may define any of the following Flags. Flags are case-sensitive.

    @@ -345,12 +449,41 @@ Patterns supported are as above.

    +

    The optional fourth cond argument defines a condition +that will be evaluated per Request, provided +ProxyHTMLInterp is On. +If the condition evaluates FALSE the map will not be applied in this request. +If TRUE, or if no condition is defined, the map is applied.

    +

    A cond is evaluated by the Expression Parser. In addition, the simpler syntax of conditions +in mod_proxy_html 3.x for HTTPD 2.0 and 2.2 is also supported.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_html.html.fr b/docs/manual/mod/mod_proxy_html.html.fr new file mode 100644 index 00000000000..154cd8f630f --- /dev/null +++ b/docs/manual/mod/mod_proxy_html.html.fr @@ -0,0 +1,554 @@ + + + + + +mod_proxy_html - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_html

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Rcrit les liens HTML afin de s'assurer qu'ils soient bien +adressables depuis les rseaux des clients dans un contexte de +mandataire.
    Statut:Base
    IdentificateurdeModule:proxy_html_module
    FichierSource:mod_proxy_html.c
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures
    +

    Sommaire

    + +

    Ce module fournit un filtre en sortie permettant de rcrire les + liens HTML dans un contexte de mandataire, afin de s'assurer que ces + liens fonctionnent pour les utilisateurs en dehors du mandataire. Il + accomplit la mme tche que la directive ProxyPassReverse d'Apache + accomplit pour les en-ttes HTTP, et fait partie des composants + essentiels d'un mandataire inverse.

    + +

    Par exemple, si une entreprise possde un serveur d'applications +nomm appserver.example.com qui n'est visible que depuis son rseau +interne, et un serveur web public www.example.com, il peut +tre souhaitable de fournir une passerelle vers le serveur d'application + l'adresse http://www.example.com/appserver/. Lorsque le +serveur d'applications prsente un lien vers lui-mme, ce lien doit tre +rcrit pour fonctionner travers la passerelle. A cet effet, +mod_proxy_html permet de rcrire <a +href="http://appserver.example.com/foo/bar.html">foobar</a> +en <a +href="http://www.example.com/appserver/foo/bar.html">foobar</a>, +ce qui permet de rendre le serveur d'applications accessible depuis +l'extrieur.

    + +

    mod_proxy_html a t dvelopp l'origine Webing, dont la documentation +dtaille pourra s'avrer utile aux utilisateurs.

    +
    + + +
    top
    +

    Directive ProxyHTMLBufSize

    + + + + + + + +
    Description:Dfinit l'incrment de la taille du tampon, ainsi que sa +taille initiale, pour la mise en +tampon des scripts en ligne et des feuilles de style.
    Syntaxe:ProxyHTMLBufSize nb-octets
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Pour pouvoir interprter du contenu non HTML (feuilles de style et +scripts) embarqu dans des documents HTML, mod_proxy_html doit le lire +et le mmoriser en entier dans un +tampon. Ce tampon devra tre tendu autant que ncessaire afin de +pouvoir accueillir le plus grand script ou la plus grande feuille de +style de la page, selon un incrment de nb-octets que cette +directive permet de dfinir.

    +

    La valeur par dfaut est 8192 et sera suffisante pour la plupart des +pages. Cependant, si vous savez que vous allez mandater des +pages contenant des feuilles de style et/ou scripts plus grands que 8k +(cette taille s'entend pour chaque script ou feuilles de style, non pour +leur ensemble), il sera plus efficace de dfinir une taille de +tampon initiale plus grande afin d'viter d'avoir le redimensionner +dynamiquement au cours du traitement d'une requte. +

    + +
    +
    top
    +

    Directive ProxyHTMLCharsetOut

    + + + + + + + +
    Description:Spcifie un jeu de caractres pour la sortie de +mod_proxy_html.
    Syntaxe:ProxyHTMLCharsetOut jeu-de-caractres | *
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive permet de spcifier un jeu de caractres pour la +sortie de mod_proxy_html. Elle ne devrait jamais tre utilise, car tout +changement par rapport la valeur par dfaut UTF-8 (Unicode - +utilis en interne par libxml2) induit une charge supplmentaire de +traitement. La dfinition spciale ProxyHTMLCharsetOut * +permet de gnrer une sortie qui utilisera le mme encodage que +l'entre.

    +

    Notez que tout ceci ne fonctionne que si le module +mod_xml2enc est charg.

    + +
    +
    top
    +

    Directive ProxyHTMLDocType

    + + + + + + + +
    Description:Dfinit une dclaration de type de document HTML ou XHTML.
    Syntaxe:ProxyHTMLDocType HTML|XHTML [Legacy]
    OU +
    ProxyHTMLDocType fpi [SGML|XML]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Avec la premire syntaxe, les documents seront dclars de type HTML +4.01 ou XHTML 1.0 selon l'option spcifie. Cette option dtermine aussi +si la syntaxe utilise en sortie est HTML ou XHTML. Notez que le format +des documents en provenance du serveur d'arrire-plan n'est pas +important, car l'interprteur le dtectera automatiquement. Si le +second argument optionnel est dfini "Legacy", les documents seront +dclars de type "Transitional" ; cette option peut tre ncessaire si +vous mandatez du contenu datant d'avant 1998, ou si vous travaillez avec +des outils de cration/publication dficients.

    +

    Avec la deuxime syntaxe, cette directive vous permet d'insrer votre +propre FPI (Formal Public Identifier). Le second argument optionnel +dtermine si la syntaxe utilise sera SGML/HTML ou XML/XHTML.

    +

    Par dfaut, aucun FPI n'est insr, tant donn qu'il vaut mieux pas +de FPI du tout qu'un FPI bogu. Si par contre votre serveur d'arrire-plan +gnre du contenu HTML ou XHTML correct, vous pouvez dfinir cette +directive en consquence.

    +

    Avec la premire syntaxe, mod_proxy_html va aussi mettre le code HTML +en conformit avec le standard spcifi. Il ne pourra pas corriger +toutes les erreurs, mais il va supprimer les lments et attributs non +conformes. Il peut aussi journaliser les autres erreurs si la directive +LogLevel est dfinie +Debug.

    + +
    +
    top
    +

    Directive ProxyHTMLEnable

    + + + + + + + + +
    Description:Permet d'activer/dsactiver le filtre proxy_html.
    Syntaxe:ProxyHTMLEnable On|Off
    Dfaut:ProxyHTMLEnable Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive est un simple commutateur permettant + d'activer/dsactiver le filtre proxy_html. Si + mod_xml2enc est charg, elle va aussi activer + automatiquement le support de l'internationalisation.

    +

    Notez que le filtre proxy_html s'agira que si les donnes sont de + type HTML (Content-Type text/html ou application/xhtml+xml), et si + elles passent par un mandataire. Vous pouvez passer outre ces + contraintes ( vos risques et prils) en dfinissant la variable + d'environnement PROXY_HTML_FORCE.

    + +
    +
    top
    +

    Directive ProxyHTMLEvents

    + + + + + + + +
    Description:Spcifie les attributs traiter comme des vnements de +type scripting.
    Syntaxe:ProxyHTMLEvents attribut [attribut ...]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive permet de spcifier un ou plusieurs attributs +traiter comme +des vnements de type scripting et de leur appliquer les rgles +ProxyHTMLURLMap lorsqu'elles ont t dfinies. Vous +pouvez spcifier un nombre quelconque d'attributs dans une ou plusieurs +directives ProxyHTMLEvents.

    +

    Normalement, cette directive est dfinie globalement. Si vous +dfinissez ProxyHTMLEvents plusieurs niveaux, certains niveaux +l'emportant sur d'autres, vous devrez spcifier un jeu complet +d'vnements pour chaque niveau.

    +

    Le fichier proxy-html.conf fournit une configuration par +dfaut et dfinit les vnements selon les standards +HTML 4 et XHTML 1.

    + +
    +
    top
    +

    Directive ProxyHTMLExtended

    + + + + + + + + +
    Description:Dtermine si l'on doit corriger les liens dans les scripts +en ligne, les feuilles de style et les vnements de type scripting.
    Syntaxe:ProxyHTMLExtended On|Off
    Dfaut:ProxyHTMLExtended Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Si cette directive est dfinie Off, les liens HTML +sont rcrits en fonction des directives +ProxyHTMLURLMap, mais les liens qui apparaissent +dans le code Javascript et les feuilles de style restent inchangs.

    +

    Si elle est dfinie On, tous les vnements de type +scripting (dfinis par la directive +ProxyHTMLEvents) et les scripts inclus ou les +feuilles de style sont aussi +traits par les rgles ProxyHTMLURLMap, en +fonction des drapeaux dfinis pour chacune d'entre elles. Ne dfinissez +cette directive On qu'en cas de ncessit absolue, car la +charge supplmentaire induite impacte les performances.

    +

    Vous devez aussi prter attention aux modles de comparaison, car +l'interprteur n'a aucune notion de la forme que pourrait prendre une URL dans un +script embarqu ou une feuille de style. En particulier, la comparaison +tendus du caractre / a de fortes chances d'induire des +correspondances errones.

    + +
    +
    top
    +

    Directive ProxyHTMLFixups

    + + + + + + + +
    Description:Corrige les erreurs HTML simples.
    Syntaxe:ProxyHTMLFixups [lowercase] [dospath] [reset]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive accepte un trois arguments parmi les suivants :

    +
      +
    • lowercaseLes Urls sont rcrites en minuscules
    • +
    • dospathLes slashes inverss dans les URLs sont +remplacs par des slashes directs.
    • +
    • resetAnnule toute option dfinie un niveau suprieur +dans la configuration
    • +
    +

    Cette directive doit tre utilise avec prudence. Elle peut corriger +certaines erreurs de cration, mais risque aussi de modifier par erreur +des liens corrects. Ne l'utilisez que si vous tes sr que le serveur +d'arrire-plan est dficient.

    + +
    +
    top
    +

    Directive ProxyHTMLInterp

    + + + + + + + + +
    Description:Active la rinterprtation des rgles +ProxyHTMLURLMap pour chaque requte.
    Syntaxe:ProxyHTMLInterp On|Off
    Dfaut:ProxyHTMLInterp Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive permet d'activer le rinterprtation pour chaque + requte des modles source et cible de la directive + ProxyHTMLURLMap.

    +

    Si la rinterprtation n'est pas active, toutes les rgles sont + prcompiles au dmarrage du serveur. Si elle est active, les + rgles doivent tre recompiles pour chaque requte, ce qui induit + une charge de traitement supplmentaire. Elle ne doit donc tre active que si + cela s'avre ncessaire.

    + +
    +
    top
    +

    Directive ProxyHTMLLinks

    + + + + + + + +
    Description:Spcifie les lments HTML dont les attributs d'URL doivent +tre rcrits.
    Syntaxe:ProxyHTMLLinks lment attribut [attribut2 ...]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Cette directive permet de spcifier les lments dont les attributs d'URL +doivent tre rcrits en utilisant les rgles standards ProxyHTMLURLMap. Vous devez dfinir une +directive ProxyHTMLLinks pour chaque lment, mais chacune d'entre elles peut +spcifier un nombre quelconque d'attributs

    Normalement, cette directive +est dfinie globalement. Si vous dfinissez ProxyHTMLLinks plusieurs niveaux, +certains niveaux l'emportant sur d'autres, vous devrez spcifier un jeu complet +de liens pour chaque niveau.

    Le fichier proxy-html.conf +fournit une configuration par dfaut et dfinit les liens HTML selon les +standards HTML 4 et XHTML 1.

    +

    Exemples issus de proxy-html.conf

    ProxyHTMLLinks  a          href
    +ProxyHTMLLinks  area       href
    +ProxyHTMLLinks  link       href
    +ProxyHTMLLinks  img        src longdesc usemap
    +ProxyHTMLLinks  object     classid codebase data usemap
    +ProxyHTMLLinks  q          cite
    +ProxyHTMLLinks  blockquote cite
    +ProxyHTMLLinks  ins        cite
    +ProxyHTMLLinks  del        cite
    +ProxyHTMLLinks  form       action
    +ProxyHTMLLinks  input      src usemap
    +ProxyHTMLLinks  head       profile
    +ProxyHTMLLinks  base       href
    +ProxyHTMLLinks  script     src for
    +
    + +
    +
    top
    +

    Directive ProxyHTMLMeta

    + + + + + + + + +
    Description:Active ou dsactive une printerprtation supplmentaire +des mtadonnes dans les sections HTML <head>.
    Syntaxe:ProxyHTMLMeta On|Off
    Dfaut:ProxyHTMLMeta Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible partir de la version 2.4 du serveur HTTP +Apache ; propos en tant que module tiers dans les versions 2.x +prcdentes.
    +

    Cette directive permet d'activer ou dsactiver une + printerprtation supplmentaire des mtadonnes dans les sections + HTML <head>. Si cette printerprtation n'est pas + requise, dfinissez ProxyHTMLMeta Off et les performances + seront lgrement amliores. Cependant, elle s'avre parfois + ncessaire pour assurer un fonctionnement correct de l'internationalisation.

    +

    La directive ProxyHTMLMeta a deux effets. Le premier et le plus + important est la dtection des codages de caractres dclars sous + la forme

    +
    <meta http-equiv="Content-Type" content="text/html;charset=foo">
    +

    ou, dans le cas d'un document XHTML, sous la forme d'une + dclaration XML. Elle n'est pas ncessaire si le jeu de caractres + est dclar explicitement dans un en-tte HTTP (ce qui est + prfrable) en provenance du serveur d'arrire-plan, ou si le + document est en utf-8 (unicode) ou un de ses + sous-ensembles comme ASCII. Vous pourrez aussi vous en passer + lorsque le document utilise une valeur par dfaut dclare via la + directive xml2EncDefault, avec le risque de + propager une dclaration incorrecte. Une directive + ProxyHTMLCharsetOut permettra d'annuler ce + risque, mais pourra induire une surcharge de traitement suprieure + celle de ProxyHTMLMeta.

    +

    Le deuxime effet est l'interprtation de toutes les dclarations + <meta http-equiv=...> et leur conversion en + en-ttes HTTP, afin de conserver le but original de cette forme + de mtalment HTML.

    + +

    Avertissement

    Compte tenu du fait que la + directive ProxyHTMLMeta promeut tous les lments + http-equiv au rang d'en-ttes HTTP, il est conseill de ne + l'activer que si vous faites autant confiance au contenu HTML qu' votre + serveur mandataire. Avec cette directive en effet, si ce contenu est gr + par des gens malintentionns, ces derniers seront en mesure d'injecter des + en-ttes HTTP arbitraires et peut-tre malveillants dans les rponses de + votre serveur. +
    + +
    +
    top
    +

    Directive ProxyHTMLStripComments

    + + + + + + + + +
    Description:Dtermine si les commentaires HTML doivent tre supprims.
    Syntaxe:ProxyHTMLStripComments On|Off
    Dfaut:ProxyHTMLStripComments Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Si cette directive est dfinie On, mod_proxy_html +supprimera les commentaires HTML. Notez que cela supprimera aussi tout +script ou style inclus dans les commentaires (une monstruosit +introduite en 1995/1996 avec Netscape 2 pour les navigateurs plus +anciens, et encore utilise de nos jours). Cette directive peut aussi +interfrer avec des processeurs bass sur les commentaires comme SSI ou +ESI : assurez-vous d'excuter ces derniers avant mod_proxy_html +dans la chane de filtrage si vous supprimez les commentaires !

    + +
    +
    top
    +

    Directive ProxyHTMLURLMap

    + + + + + + + +
    Description:Dfinit une rgle de rcriture des liens HTML
    Syntaxe:ProxyHTMLURLMap modle-source modle-cible [drapeaux] [cond]
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_proxy_html
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antrieures.
    +

    Il s'agit de la directive la plus importante pour la rcriture des +liens HTML. Lors de l'interprtation d'un document, chaque fois qu'un +lien correspond modle-source, la partie du lien concerne +sera rcrite en modle-cible, en tenant compte des +modifications induites par les drapeaux ventuellement spcifis et par +la directive ProxyHTMLExtended. +Ne seront considrs comme des liens HTML que les lments spcifis via la +directive ProxyHTMLLinks.

    + +

    Le troisime argument optionnel permet de ffinir un des drapeaux +suivants (les drapeaux sont sensibles la casse) :

    +
    +
    h
    +

    Ignore les liens HTML (les traverse sans les modifier)

    +
    e
    +

    Ignore les vnements de scripting (les traverse sans les +modifier)

    +
    c
    +

    Traverse les sections de type style ou script sans les modifier.

    + +
    L
    +

    Last-match. Si cette rgle s'applique, aucune autre rgle ne sera +prise en compte (notez qu'il s'agit du comportement automatique pour les +liens HTML).

    +
    l
    +

    L'oppos de L. Passe outre le comportement par dfaut du +changement unique pour les liens HTML.

    +
    R
    +

    Utilise des expressions rationnelles pour les modles. +modle-source est une expression rationnelle, et +modle-cible une chane de remplacement qui peut tre base +elle aussi sur une expression rationnelle. La mmorisation dans les +expressions rationnelles est supporte : vous pouvez utiliser des +parenthses () dans le modle-source, et rcuprer la +correspondance de leur contenu via les variables $1 $9 dans le +modle-cible.

    + +

    Si le drapeau R n'est pas fourni, la directive utilisera des chanes +littrales pour les diffrents modles de recherche/remplacement. La +logique de recherche est "commence par" dans les liens HTML, et +"contient" dans les vnements de scripting et les sections de +type style ou script. +

    +
    +
    x
    +

    Utilise les expressions rationnelles tendues POSIX. Ne +s'applique qu'avec R.

    +
    i
    +

    Recherche de correspondance sensible la casse. Ne +s'applique qu'avec R.

    + +
    n
    +

    Dsactive la mmorisation dans les expressions rationnelles (pour +amliorer les performances). Ne s'applique qu'avec R.

    +
    s
    +

    Recherche de correspondance dans les expressions rationnelles +base sur la ligne. Ne s'applique qu'avec R.

    +
    ^
    +

    Recherche de correspondance au dbut seulement. Ne concerne que +les recherches de correspondance par rapport des chanes, et ne +s'applique pas aux liens HTML.

    +
    $
    +

    Recherche de correspondance la fin seulement. Ne concerne que +les recherches de correspondance par rapport des chanes, et ne +s'applique pas aux liens HTML.

    +
    V
    +

    Insre des variables d'environnement dans le +modle-cible. Un modle-cible de la forme +${varname|default} sera remplac par la valeur de la +variable d'environnement varname. Si cette dernire n'est +pas dfinie, modle-cible sera remplac par +default. La spcification de |default est +facultative.

    +

    NOTE: l'insertion de variables d'environnement n'est possible que si +la directive ProxyHTMLInterp a t dfinie +On.

    +
    + +
    v
    +

    Insre des variables d'environnement dans le +modle-source. La syntaxe du modle est identique la +syntaxe prcdente.

    +

    NOTE: l'insertion de variables d'environnement n'est possible que si +la directive ProxyHTMLInterp a t dfinie +On.

    +
    +
    + +

    Le quatrime argument optionnel cond dfinit une +condition qui sera value pour chaque requte, sous rserve que la +directive ProxyHTMLInterp ait t dfinie +On. Si la condition est value FALSE, la rgle ne sera pas +applique la requte. Si elle est value TRUE, ou si aucune +condition n'est dfinie, la rgle s'applique.

    +

    La condition est value par l'interprteur d'expression. La syntaxe simple des +conditions dans mod_proxy_html 3.x pour HTTPD 2.0 et 2.2 est aussi +supporte.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_html.xml b/docs/manual/mod/mod_proxy_html.xml index 2d3555b771f..c687d69da21 100644 --- a/docs/manual/mod/mod_proxy_html.xml +++ b/docs/manual/mod/mod_proxy_html.xml @@ -32,19 +32,79 @@ from Clients' networks in a proxy context. for earlier 2.x versions -

    This module provides an output filter to rewrite HTML links in a proxy situation, to ensure that links work for users outside the proxy. It serves the same purpose as Apache's ProxyPassReverse directive does for HTTP headers, and is an essential component of a reverse proxy.

    - -

    For example, if a company has an application server at appserver.example.com that is only visible from within the company's internal network, and a public webserver www.example.com, they may wish to provide a gateway to the application server at http://www.example.com/appserver/. When the application server links to itself, those links need to be rewritten to work through the gateway. mod_proxy_html serves to rewrite <a href="http://appserver.example.com/foo/bar.html">foobar</a> to <a href="http://www.example.com/appserver/foo/bar.html">foobar</a> making it accessible from outside.

    +

    This module provides an output filter to rewrite HTML links in a +proxy situation, to ensure that links work for users outside the proxy. +It serves the same purpose as Apache's ProxyPassReverse directive does +for HTTP headers, and is an essential component of a reverse proxy.

    + +

    For example, if a company has an application server at +appserver.example.com that is only visible from within +the company's internal network, and a public webserver +www.example.com, they may wish to provide a gateway to the +application server at http://www.example.com/appserver/. +When the application server links to itself, those links need to be +rewritten to work through the gateway. mod_proxy_html serves to rewrite +<a href="http://appserver.example.com/foo/bar.html">foobar</a> to +<a href="http://www.example.com/appserver/foo/bar.html">foobar</a> +making it accessible from outside.

    mod_proxy_html was originally developed at WebÞing, whose extensive documentation may be useful to users.

    + +ProxyHTMLMeta +Turns on or off extra pre-parsing of metadata in HTML +<head> sections. +ProxyHTMLMeta On|Off +ProxyHTMLMeta Off +server config +virtual hostdirectory + +Version 2.4 and later; available as a third-party +module for earlier 2.x versions. + + +

    This turns on or off pre-parsing of metadata in HTML + <head> sections.

    +

    If not required, turning ProxyHTMLMeta Off will give a small + performance boost by skipping this parse step. However, it + is sometimes necessary for internationalisation to work correctly.

    +

    ProxyHTMLMeta has two effects. Firstly and most importantly + it enables detection of character encodings declared in the form

    +
    <meta http-equiv="Content-Type" content="text/html;charset=foo">
    +

    or, in the case of an XHTML document, an XML declaration. + It is NOT required if the charset is declared in a real HTTP header + (which is always preferable) from the backend server, nor if the + document is utf-8 (unicode) or a subset such as ASCII. + You may also be able to dispense with it where documents use a + default declared using xml2EncDefault, but that risks propagating an + incorrect declaration. A ProxyHTMLCharsetOut + can remove that risk, but is likely to be a bigger processing + overhead than enabling ProxyHTMLMeta.

    +

    The other effect of enabling ProxyHTMLMeta is to parse all + <meta http-equiv=...> declarations and convert + them to real HTTP headers, in keeping with the original purpose + of this form of the HTML <meta> element.

    + + Warning + Because ProxyHTMLMeta promotes all + http-equiv elements to HTTP headers, it is important that you + only enable it in cases where you trust the HTML content as much as you + trust the upstream server. If the HTML is controlled by bad actors, it + will be possible for them to inject arbitrary, possibly malicious, HTTP + headers into your server's responses. + +
    +
    + ProxyHTMLEnable Turns the proxy_html filter on or off. ProxyHTMLEnable On|Off +ProxyHTMLEnable Off server config virtual hostdirectory @@ -73,10 +133,14 @@ module for earlier 2.x versions. module for earlier 2.x versions. -

    This is the key directive for rewriting HTML links. When parsing a document, +

    This is the key directive for rewriting HTML links. When parsing a document, whenever a link target matches from-pattern, the matching portion will be rewritten to to-pattern, as modified by any -flags supplied.

    +flags supplied and by the +ProxyHTMLExtended directive. +Only the elements specified using +the ProxyHTMLLinks directive +will be considered as HTML links.

    The optional third argument may define any of the following Flags. Flags are case-sensitive.

    @@ -154,6 +218,7 @@ in mod_proxy_html 3.x for HTTPD 2.0 and 2.2 is also supported.

    Enables per-request interpolation of ProxyHTMLURLMap rules. ProxyHTMLInterp On|Off +ProxyHTMLInterp Off server config virtual hostdirectory @@ -199,7 +264,7 @@ generates decent HTML or XHTML, set it accordingly.

    will also clean up the HTML to the specified standard. It cannot fix every error, but it will strip out bogus elements and attributes. It will also optionally log other errors at LogLevel Debug.

    +module="core">LogLevel Debug.

    @@ -230,19 +295,27 @@ Only use them if you know you have a broken backend server.

    Determines whether to fix links in inline scripts, stylesheets, and scripting events. ProxyHTMLExtended On|Off +ProxyHTMLExtended Off server config virtual hostdirectory Version 2.4 and later; available as a third-party for earlier 2.x versions -

    Set to Off, HTML links are rewritten according +

    Set to Off, HTML links are rewritten according to the ProxyHTMLURLMap directives, but links appearing in Javascript and CSS are ignored.

    -

    Set to On, all scripting events and embedded scripts or +

    Set to On, all scripting events (as determined by +ProxyHTMLEvents) and embedded scripts or stylesheets are also processed by the ProxyHTMLURLMap rules, according to the flags set for each rule. Since this requires more -parsing, performance will be best if you only enable it when strictly necessary.

    +parsing, performance will be best if you only enable it when strictly necessary. +

    +You'll also need to take care over patterns matched, since the parser has no +knowledge of what is a URL within an embedded script or stylesheet. +In particular, extended matching of / is likely to lead to +false matches. +

    @@ -250,6 +323,7 @@ parsing, performance will be best if you only enable it when strictly necessary. ProxyHTMLStripComments Determines whether to strip HTML comments. ProxyHTMLStripComments On|Off +ProxyHTMLStripComments Off server config virtual hostdirectory @@ -277,12 +351,13 @@ stylesheets. Version 2.4 and later; available as a third-party for earlier 2.x versions -

    In order to parse non-HTML content (stylesheets and scripts), mod_proxy_html +

    In order to parse non-HTML content (stylesheets and scripts) embedded +in HTML documents, mod_proxy_html has to read the entire script or stylesheet into a buffer. This buffer will be expanded as necessary to hold the largest script or stylesheet in a page, -in increments of [nnnn] as set by this directive.

    +in increments of bytes as set by this directive.

    The default is 8192, and will work well for almost all pages. However, -if you know you're proxying a lot of pages containing stylesheets and/or +if you know you're proxying pages containing stylesheets and/or scripts bigger than 8K (that is, for a single script or stylesheet, NOT in total), it will be more efficient to set a larger buffer size and avoid the need to resize the buffer dynamically during a request. @@ -301,11 +376,14 @@ size and avoid the need to resize the buffer dynamically during a request. for earlier 2.x versions

    Specifies one or more attributes to treat as scripting events and -apply ProxyHTMLURLMaps to where appropriate. +apply ProxyHTMLURLMaps to where enabled. You can specify any number of attributes in one or more ProxyHTMLEvents directives.

    -

    The default configuration defines the events in standard HTML 4 -and XHTML 1.

    +

    Normally you'll set this globally. If you set ProxyHTMLEvents in more than +one scope so that one overrides the other, you'll need to specify a complete +set in each of those scopes.

    +

    A default configuration is supplied in proxy-html.conf +and defines the events in standard HTML 4 and XHTML 1.

    @@ -320,10 +398,33 @@ and XHTML 1.

    for earlier 2.x versions

    Specifies elements that have URL attributes that should be rewritten -using standard ProxyHTMLURLMaps. You will need one -ProxyHTMLLinks directive per element, but it can have any number of attributes.

    -

    The default configuration defines the HTML links for standard HTML 4 -and XHTML 1.

    +using standard ProxyHTMLURLMaps. +You will need one ProxyHTMLLinks directive per element, +but it can have any number of attributes.

    +

    Normally you'll set this globally. If you set ProxyHTMLLinks in more than +one scope so that one overrides the other, you'll need to specify a complete +set in each of those scopes.

    +

    A default configuration is supplied in proxy-html.conf +and defines the HTML links for standard HTML 4 and XHTML 1.

    + +Examples from proxy-html.conf + +ProxyHTMLLinks a href +ProxyHTMLLinks area href +ProxyHTMLLinks link href +ProxyHTMLLinks img src longdesc usemap +ProxyHTMLLinks object classid codebase data usemap +ProxyHTMLLinks q cite +ProxyHTMLLinks blockquote cite +ProxyHTMLLinks ins cite +ProxyHTMLLinks del cite +ProxyHTMLLinks form action +ProxyHTMLLinks input src usemap +ProxyHTMLLinks head profile +ProxyHTMLLinks base href +ProxyHTMLLinks script src for + +
    diff --git a/docs/manual/mod/mod_proxy_html.xml.fr b/docs/manual/mod/mod_proxy_html.xml.fr new file mode 100644 index 00000000000..210bc908ba2 --- /dev/null +++ b/docs/manual/mod/mod_proxy_html.xml.fr @@ -0,0 +1,520 @@ + + + + + + + + + + + +mod_proxy_html +Réécrit les liens HTML afin de s'assurer qu'ils soient bien +adressables depuis les réseaux des clients dans un contexte de +mandataire. +Base +mod_proxy_html.c +proxy_html_module +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures + + +

    Ce module fournit un filtre en sortie permettant de réécrire les + liens HTML dans un contexte de mandataire, afin de s'assurer que ces + liens fonctionnent pour les utilisateurs en dehors du mandataire. Il + accomplit la même tâche que la directive ProxyPassReverse d'Apache + accomplit pour les en-têtes HTTP, et fait partie des composants + essentiels d'un mandataire inverse.

    + +

    Par exemple, si une entreprise possède un serveur d'applications +nommé appserver.example.com qui n'est visible que depuis son réseau +interne, et un serveur web public www.example.com, il peut +être souhaitable de fournir une passerelle vers le serveur d'application +à l'adresse http://www.example.com/appserver/. Lorsque le +serveur d'applications présente un lien vers lui-même, ce lien doit être +réécrit pour fonctionner à travers la passerelle. A cet effet, +mod_proxy_html permet de réécrire <a +href="http://appserver.example.com/foo/bar.html">foobar</a> +en <a +href="http://www.example.com/appserver/foo/bar.html">foobar</a>, +ce qui permet de rendre le serveur d'applications accessible depuis +l'extérieur.

    + +

    mod_proxy_html a été développé à l'origine à WebÞing, dont la documentation +détaillée pourra s'avérer utile aux utilisateurs.

    +
    + + +ProxyHTMLMeta +Active ou désactive une préinterprétation supplémentaire +des métadonnées dans les sections HTML <head>. +ProxyHTMLMeta On|Off +ProxyHTMLMeta Off +server config +virtual hostdirectory + +Disponible à partir de la version 2.4 du serveur HTTP +Apache ; proposé en tant que module tiers dans les versions 2.x +précédentes. + + +

    Cette directive permet d'activer ou désactiver une + préinterprétation supplémentaire des métadonnées dans les sections + HTML <head>. Si cette préinterprétation n'est pas + requise, définissez ProxyHTMLMeta à Off et les performances + seront légèrement améliorées. Cependant, elle s'avère parfois + nécessaire pour assurer un fonctionnement correct de l'internationalisation.

    +

    La directive ProxyHTMLMeta a deux effets. Le premier et le plus + important est la détection des codages de caractères déclarés sous + la forme

    +
    <meta http-equiv="Content-Type" content="text/html;charset=foo">
    +

    ou, dans le cas d'un document XHTML, sous la forme d'une + déclaration XML. Elle n'est pas nécessaire si le jeu de caractères + est déclaré explicitement dans un en-tête HTTP (ce qui est + préférable) en provenance du serveur d'arrière-plan, ou si le + document est en utf-8 (unicode) ou un de ses + sous-ensembles comme ASCII. Vous pourrez aussi vous en passer + lorsque le document utilise une valeur par défaut déclarée via la + directive xml2EncDefault, avec le risque de + propager une déclaration incorrecte. Une directive + ProxyHTMLCharsetOut permettra d'annuler ce + risque, mais pourra induire une surcharge de traitement supérieure à + celle de ProxyHTMLMeta.

    +

    Le deuxième effet est l'interprétation de toutes les déclarations + <meta http-equiv=...> et leur conversion en + en-têtes HTTP, afin de conserver le but original de cette forme + de métaélément HTML.

    + + Avertissement Compte tenu du fait que la + directive ProxyHTMLMeta promeut tous les éléments + http-equiv au rang d'en-têtes HTTP, il est conseillé de ne + l'activer que si vous faites autant confiance au contenu HTML qu'à votre + serveur mandataire. Avec cette directive en effet, si ce contenu est géré + par des gens malintentionnés, ces derniers seront en mesure d'injecter des + en-têtes HTTP arbitraires et peut-être malveillants dans les réponses de + votre serveur. + +
    +
    + + +ProxyHTMLEnable +Permet d'activer/désactiver le filtre proxy_html. +ProxyHTMLEnable On|Off +ProxyHTMLEnable Off +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + + +

    Cette directive est un simple commutateur permettant + d'activer/désactiver le filtre proxy_html. Si + mod_xml2enc est chargé, elle va aussi activer + automatiquement le support de l'internationalisation.

    +

    Notez que le filtre proxy_html s'agira que si les données sont de + type HTML (Content-Type text/html ou application/xhtml+xml), et si + elles passent par un mandataire. Vous pouvez passer outre ces + contraintes (à vos risques et périls) en définissant la variable + d'environnement PROXY_HTML_FORCE.

    +
    +
    + + +ProxyHTMLURLMap +Définit une règle de réécriture des liens HTML +ProxyHTMLURLMap modèle-source modèle-cible [drapeaux] [cond] +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + + +

    Il s'agit de la directive la plus importante pour la réécriture des +liens HTML. Lors de l'interprétation d'un document, chaque fois qu'un +lien correspond à modèle-source, la partie du lien concernée +sera réécrite en modèle-cible, en tenant compte des +modifications induites par les drapeaux éventuellement spécifiés et par +la directive ProxyHTMLExtended. +Ne seront considérés comme des liens HTML que les éléments spécifiés via la +directive ProxyHTMLLinks.

    + +

    Le troisième argument optionnel permet de féfinir un des drapeaux +suivants (les drapeaux sont sensibles à la casse) :

    +
    +
    h
    +

    Ignore les liens HTML (les traverse sans les modifier)

    +
    e
    +

    Ignore les évènements de scripting (les traverse sans les +modifier)

    +
    c
    +

    Traverse les sections de type style ou script sans les modifier.

    + +
    L
    +

    Last-match. Si cette règle s'applique, aucune autre règle ne sera +prise en compte (notez qu'il s'agit du comportement automatique pour les +liens HTML).

    +
    l
    +

    L'opposé de L. Passe outre le comportement par défaut du +changement unique pour les liens HTML.

    +
    R
    +

    Utilise des expressions rationnelles pour les modèles. +modèle-source est une expression rationnelle, et +modèle-cible une chaîne de remplacement qui peut être basée +elle aussi sur une expression rationnelle. La mémorisation dans les +expressions rationnelles est supportée : vous pouvez utiliser des +parenthèses () dans le modèle-source, et récupérer la +correspondance de leur contenu via les variables $1 à $9 dans le +modèle-cible.

    + +

    Si le drapeau R n'est pas fourni, la directive utilisera des chaînes +littérales pour les différents modèles de recherche/remplacement. La +logique de recherche est "commence par" dans les liens HTML, et +"contient" dans les évènements de scripting et les sections de +type style ou script. +

    +
    +
    x
    +

    Utilise les expressions rationnelles étendues POSIX. Ne +s'applique qu'avec R.

    +
    i
    +

    Recherche de correspondance sensible à la casse. Ne +s'applique qu'avec R.

    + +
    n
    +

    Désactive la mémorisation dans les expressions rationnelles (pour +améliorer les performances). Ne s'applique qu'avec R.

    +
    s
    +

    Recherche de correspondance dans les expressions rationnelles +basée sur la ligne. Ne s'applique qu'avec R.

    +
    ^
    +

    Recherche de correspondance au début seulement. Ne concerne que +les recherches de correspondance par rapport à des chaînes, et ne +s'applique pas aux liens HTML.

    +
    $
    +

    Recherche de correspondance à la fin seulement. Ne concerne que +les recherches de correspondance par rapport à des chaînes, et ne +s'applique pas aux liens HTML.

    +
    V
    +

    Insère des variables d'environnement dans le +modèle-cible. Un modèle-cible de la forme +${varname|default} sera remplacé par la valeur de la +variable d'environnement varname. Si cette dernière n'est +pas définie, modèle-cible sera remplacé par +default. La spécification de |default est +facultative.

    +

    NOTE: l'insertion de variables d'environnement n'est possible que si +la directive ProxyHTMLInterp a été définie à +On.

    +
    + +
    v
    +

    Insère des variables d'environnement dans le +modèle-source. La syntaxe du modèle est identique à la +syntaxe précédente.

    +

    NOTE: l'insertion de variables d'environnement n'est possible que si +la directive ProxyHTMLInterp a été définie à +On.

    +
    +
    + +

    Le quatrième argument optionnel cond définit une +condition qui sera évaluée pour chaque requête, sous réserve que la +directive ProxyHTMLInterp ait été définie à +On. Si la condition est évaluée à FALSE, la règle ne sera pas +appliquée à la requête. Si elle est évaluée à TRUE, ou si aucune +condition n'est définie, la règle s'applique.

    +

    La condition est évaluée par l'interpréteur d'expression. La syntaxe simple des +conditions dans mod_proxy_html 3.x pour HTTPD 2.0 et 2.2 est aussi +supportée.

    +
    +
    + + +ProxyHTMLInterp +Active la réinterprétation des règles +ProxyHTMLURLMap pour chaque requête. +ProxyHTMLInterp On|Off +ProxyHTMLInterp Off +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + + +

    Cette directive permet d'activer le réinterprétation pour chaque + requête des modèles source et cible de la directive + ProxyHTMLURLMap.

    +

    Si la réinterprétation n'est pas activée, toutes les règles sont + précompilées au démarrage du serveur. Si elle est activée, les + règles doivent être recompilées pour chaque requête, ce qui induit + une charge de traitement supplémentaire. Elle ne doit donc être activée que si + cela s'avère nécessaire.

    +
    +
    + + +ProxyHTMLDocType +Définit une déclaration de type de document HTML ou XHTML. +ProxyHTMLDocType HTML|XHTML [Legacy]
    OU +
    ProxyHTMLDocType fpi [SGML|XML]
    +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + + +

    Avec la première syntaxe, les documents seront déclarés de type HTML +4.01 ou XHTML 1.0 selon l'option spécifiée. Cette option détermine aussi +si la syntaxe utilisée en sortie est HTML ou XHTML. Notez que le format +des documents en provenance du serveur d'arrière-plan n'est pas +important, car l'interpréteur le détectera automatiquement. Si le +second argument optionnel est défini à "Legacy", les documents seront +déclarés de type "Transitional" ; cette option peut être nécessaire si +vous mandatez du contenu datant d'avant 1998, ou si vous travaillez avec +des outils de création/publication déficients.

    +

    Avec la deuxième syntaxe, cette directive vous permet d'insérer votre +propre FPI (Formal Public Identifier). Le second argument optionnel +détermine si la syntaxe utilisée sera SGML/HTML ou XML/XHTML.

    +

    Par défaut, aucun FPI n'est inséré, étant donné qu'il vaut mieux pas +de FPI du tout qu'un FPI bogué. Si par contre votre serveur d'arrière-plan +génère du contenu HTML ou XHTML correct, vous pouvez définir cette +directive en conséquence.

    +

    Avec la première syntaxe, mod_proxy_html va aussi mettre le code HTML +en conformité avec le standard spécifié. Il ne pourra pas corriger +toutes les erreurs, mais il va supprimer les éléments et attributs non +conformes. Il peut aussi journaliser les autres erreurs si la directive +LogLevel est définie à +Debug.

    +
    +
    + + +ProxyHTMLFixups +Corrige les erreurs HTML simples. +ProxyHTMLFixups [lowercase] [dospath] [reset] +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Cette directive accepte un à trois arguments parmi les suivants :

    +
      +
    • lowercaseLes Urls sont réécrites en minuscules
    • +
    • dospathLes slashes inversés dans les URLs sont +remplacés par des slashes directs.
    • +
    • resetAnnule toute option définie à un niveau supérieur +dans la configuration
    • +
    +

    Cette directive doit être utilisée avec prudence. Elle peut corriger +certaines erreurs de création, mais risque aussi de modifier par erreur +des liens corrects. Ne l'utilisez que si vous êtes sûr que le serveur +d'arrière-plan est déficient.

    +
    +
    + + +ProxyHTMLExtended +Détermine si l'on doit corriger les liens dans les scripts +en ligne, les feuilles de style et les évènements de type scripting. +ProxyHTMLExtended On|Off +ProxyHTMLExtended Off +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Si cette directive est définie à Off, les liens HTML +sont réécrits en fonction des directives +ProxyHTMLURLMap, mais les liens qui apparaissent +dans le code Javascript et les feuilles de style restent inchangés.

    +

    Si elle est définie à On, tous les évènements de type +scripting (définis par la directive +ProxyHTMLEvents) et les scripts inclus ou les +feuilles de style sont aussi +traités par les règles ProxyHTMLURLMap, en +fonction des drapeaux définis pour chacune d'entre elles. Ne définissez +cette directive à On qu'en cas de nécessité absolue, car la +charge supplémentaire induite impacte les performances.

    +

    Vous devez aussi prêter attention aux modèles de comparaison, car +l'interpréteur n'a aucune notion de la forme que pourrait prendre une URL dans un +script embarqué ou une feuille de style. En particulier, la comparaison +étendus du caractère / a de fortes chances d'induire des +correspondances erronées.

    +
    +
    + + +ProxyHTMLStripComments +Détermine si les commentaires HTML doivent être supprimés. +ProxyHTMLStripComments On|Off +ProxyHTMLStripComments Off +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Si cette directive est définie à On, mod_proxy_html +supprimera les commentaires HTML. Notez que cela supprimera aussi tout +script ou style inclus dans les commentaires (une monstruosité +introduite en 1995/1996 avec Netscape 2 pour les navigateurs plus +anciens, et encore utilisée de nos jours). Cette directive peut aussi +interférer avec des processeurs basés sur les commentaires comme SSI ou +ESI : assurez-vous d'exécuter ces derniers avant mod_proxy_html +dans la chaîne de filtrage si vous supprimez les commentaires !

    +
    +
    + + +ProxyHTMLBufSize +Définit l'incrément de la taille du tampon, ainsi que sa +taille initiale, pour la mise en +tampon des scripts en ligne et des feuilles de style. +ProxyHTMLBufSize nb-octets +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Pour pouvoir interpréter du contenu non HTML (feuilles de style et +scripts) embarqué dans des documents HTML, mod_proxy_html doit le lire +et le mémoriser en entier dans un +tampon. Ce tampon devra être étendu autant que nécessaire afin de +pouvoir accueillir le plus grand script ou la plus grande feuille de +style de la page, selon un incrément de nb-octets que cette +directive permet de définir.

    +

    La valeur par défaut est 8192 et sera suffisante pour la plupart des +pages. Cependant, si vous savez que vous allez mandater des +pages contenant des feuilles de style et/ou scripts plus grands que 8k +(cette taille s'entend pour chaque script ou feuilles de style, non pour +leur ensemble), il sera plus efficace de définir une taille de +tampon initiale plus grande afin d'éviter d'avoir à le redimensionner +dynamiquement au cours du traitement d'une requête. +

    +
    +
    + + +ProxyHTMLEvents +Spécifie les attributs à traiter comme des évènements de +type scripting. +ProxyHTMLEvents attribut [attribut ...] +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Cette directive permet de spécifier un ou plusieurs attributs à +traiter comme +des évènements de type scripting et de leur appliquer les règles +ProxyHTMLURLMap lorsqu'elles ont été définies. Vous +pouvez spécifier un nombre quelconque d'attributs dans une ou plusieurs +directives ProxyHTMLEvents.

    +

    Normalement, cette directive est définie globalement. Si vous +définissez ProxyHTMLEvents à plusieurs niveaux, certains niveaux +l'emportant sur d'autres, vous devrez spécifier un jeu complet +d'évènements pour chaque niveau.

    +

    Le fichier proxy-html.conf fournit une configuration par +défaut et définit les évènements selon les standards +HTML 4 et XHTML 1.

    +
    +
    + + +ProxyHTMLLinks +Spécifie les éléments HTML dont les attributs d'URL doivent +être réécrits. +ProxyHTMLLinks élément attribut [attribut2 ...] +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Cette directive permet de spécifier les éléments dont les attributs d'URL +doivent être réécrits en utilisant les règles standards ProxyHTMLURLMap. Vous devez définir une +directive ProxyHTMLLinks pour chaque élément, mais chacune d'entre elles peut +spécifier un nombre quelconque d'attributs

    Normalement, cette directive +est définie globalement. Si vous définissez ProxyHTMLLinks à plusieurs niveaux, +certains niveaux l'emportant sur d'autres, vous devrez spécifier un jeu complet +de liens pour chaque niveau.

    Le fichier proxy-html.conf +fournit une configuration par défaut et définit les liens HTML selon les +standards HTML 4 et XHTML 1.

    + +Exemples issus de proxy-html.conf + +ProxyHTMLLinks a href +ProxyHTMLLinks area href +ProxyHTMLLinks link href +ProxyHTMLLinks img src longdesc usemap +ProxyHTMLLinks object classid codebase data usemap +ProxyHTMLLinks q cite +ProxyHTMLLinks blockquote cite +ProxyHTMLLinks ins cite +ProxyHTMLLinks del cite +ProxyHTMLLinks form action +ProxyHTMLLinks input src usemap +ProxyHTMLLinks head profile +ProxyHTMLLinks base href +ProxyHTMLLinks script src for + + +
    +
    + + +ProxyHTMLCharsetOut +Spécifie un jeu de caractères pour la sortie de +mod_proxy_html. +ProxyHTMLCharsetOut jeu-de-caractères | * +server config +virtual hostdirectory + +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.x antérieures. + +

    Cette directive permet de spécifier un jeu de caractères pour la +sortie de mod_proxy_html. Elle ne devrait jamais être utilisée, car tout +changement par rapport à la valeur par défaut UTF-8 (Unicode - +utilisé en interne par libxml2) induit une charge supplémentaire de +traitement. La définition spéciale ProxyHTMLCharsetOut * +permet de générer une sortie qui utilisera le même encodage que +l'entrée.

    +

    Notez que tout ceci ne fonctionne que si le module +mod_xml2enc est chargé.

    +
    +
    + + + +
    + diff --git a/docs/manual/mod/mod_proxy_html.xml.meta b/docs/manual/mod/mod_proxy_html.xml.meta index b4533b110ff..cd380113ea6 100644 --- a/docs/manual/mod/mod_proxy_html.xml.meta +++ b/docs/manual/mod/mod_proxy_html.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_http.html.en b/docs/manual/mod/mod_proxy_http.html.en index 33b94aa1b93..385fcb082c0 100644 --- a/docs/manual/mod/mod_proxy_http.html.en +++ b/docs/manual/mod/mod_proxy_http.html.en @@ -1,23 +1,28 @@ - -mod_proxy_http - Apache HTTP Server +mod_proxy_http - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_http

    @@ -48,25 +53,26 @@ large.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    See also

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Environment Variables

    In addition to the configuration directives that control the behaviour of mod_proxy, there are a number of environment variables that control the HTTP protocol - provider:

    + provider. Environment variables below that don't specify specific values + are enabled when set to any value.

    proxy-sendextracrlf
    Causes proxy to send an extra CR-LF newline on the end of a @@ -112,8 +118,8 @@ compliant, or proxy-interim-response Suppress to suppress interim responses.
    proxy-initial-not-pooled
    -
    If this variable is set no pooled connection will be reused - if the client connection is an initial connection. This avoids +
    If this variable is set, no pooled connection will be reused + if the client request is the initial request on the frontend connection. This avoids the "proxy: error reading status line from remote server" error message caused by the race condition that the backend server closed the pooled connection after the connection check by the proxy and @@ -141,7 +147,28 @@

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_http.html.fr b/docs/manual/mod/mod_proxy_http.html.fr index c82f25e2cad..b46049245c4 100644 --- a/docs/manual/mod/mod_proxy_http.html.fr +++ b/docs/manual/mod/mod_proxy_http.html.fr @@ -1,23 +1,28 @@ - -mod_proxy_http - Serveur Apache HTTP +mod_proxy_http - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_proxy_http

    @@ -50,28 +55,31 @@ votre rseau, mais aussi pour l'Internet au sens large.

    -

    Directives

    -

    Ce module ne fournit aucune directive.

    -

    Sujets

    +

    Sujets

    Voir aussi

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
  • Commentaires
  • top

    Variables d'environnement

    Outre les directives de configuration qui contrlent le comportement de mod_proxy, plusieurs variables d'environnement permettent de contrler le fournisseur du - protocole HTTP :

    + protocole HTTP. Parmi les variables suivantes, celle qui ne + ncessitent pas de valeur particulire sont dfinies quelle que soit + la valeur qu'on leur affecte.

    proxy-sendextracrlf
    Provoque l'envoi par le mandataire d'une nouvelle ligne - CR-LF supplmentaire la fin de la requte. Cei constitue un + CR-LF supplmentaire la fin de la requte. + Ceci constitue un moyen de contournement d'une bogue de certains navigateurs.
    force-proxy-request-1.0
    @@ -126,8 +134,9 @@ Suppress
    pour supprimer les rponses intermdiaires.
    proxy-initial-not-pooled
    Si cette variable est dfinie, aucune connexion faisant - partie d'un jeu ne sera rutilise si la connexion client est - une connexion initiale. Ceci permet d'viter le message d'erreur + partie d'un jeu ne sera rutilise si la requte + du client est la requte initiale pour une connexion. + Ceci permet d'viter le message d'erreur "proxy: error reading status line from remote server" caus par la situation de comptition au cours de laquelle le serveur cible ferme la connexion du jeu aprs la vrification de la @@ -157,7 +166,28 @@

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_http.xml b/docs/manual/mod/mod_proxy_http.xml index 163836e6798..7f3cef5f268 100644 --- a/docs/manual/mod/mod_proxy_http.xml +++ b/docs/manual/mod/mod_proxy_http.xml @@ -56,7 +56,8 @@

    In addition to the configuration directives that control the behaviour of mod_proxy, there are a number of environment variables that control the HTTP protocol - provider:

    + provider. Environment variables below that don't specify specific values + are enabled when set to any value.

    proxy-sendextracrlf
    Causes proxy to send an extra CR-LF newline on the end of a @@ -102,8 +103,8 @@ compliant, or proxy-interim-response Suppress to suppress interim responses.
    proxy-initial-not-pooled
    -
    If this variable is set no pooled connection will be reused - if the client connection is an initial connection. This avoids +
    If this variable is set, no pooled connection will be reused + if the client request is the initial request on the frontend connection. This avoids the "proxy: error reading status line from remote server" error message caused by the race condition that the backend server closed the pooled connection after the connection check by the proxy and diff --git a/docs/manual/mod/mod_proxy_http.xml.fr b/docs/manual/mod/mod_proxy_http.xml.fr index 1fb5481927f..c2b4d468107 100644 --- a/docs/manual/mod/mod_proxy_http.xml.fr +++ b/docs/manual/mod/mod_proxy_http.xml.fr @@ -1,7 +1,7 @@ - + @@ -59,11 +59,14 @@

    Outre les directives de configuration qui contrôlent le comportement de mod_proxy, plusieurs variables d'environnement permettent de contrôler le fournisseur du - protocole HTTP :

    + protocole HTTP. Parmi les variables suivantes, celle qui ne + nécessitent pas de valeur particulière sont définies quelle que soit + la valeur qu'on leur affecte.

    proxy-sendextracrlf
    Provoque l'envoi par le mandataire d'une nouvelle ligne - CR-LF supplémentaire à la fin de la requête. Cei constitue un + CR-LF supplémentaire à la fin de la requête. + Ceci constitue un moyen de contournement d'une bogue de certains navigateurs.
    force-proxy-request-1.0
    @@ -118,8 +121,9 @@ Suppress
    pour supprimer les réponses intermédiaires.
    proxy-initial-not-pooled
    Si cette variable est définie, aucune connexion faisant - partie d'un jeu ne sera réutilisée si la connexion client est - une connexion initiale. Ceci permet d'éviter le message d'erreur + partie d'un jeu ne sera réutilisée si la requête + du client est la requête initiale pour une connexion. + Ceci permet d'éviter le message d'erreur "proxy: error reading status line from remote server" causé par la situation de compétition au cours de laquelle le serveur cible ferme la connexion du jeu après la vérification de la diff --git a/docs/manual/mod/mod_proxy_http2.html b/docs/manual/mod/mod_proxy_http2.html new file mode 100644 index 00000000000..8144eefdb81 --- /dev/null +++ b/docs/manual/mod/mod_proxy_http2.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_proxy_http2.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_http2.html.en b/docs/manual/mod/mod_proxy_http2.html.en new file mode 100644 index 00000000000..00080db8653 --- /dev/null +++ b/docs/manual/mod/mod_proxy_http2.html.en @@ -0,0 +1,137 @@ + + + + + +mod_proxy_http2 - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_proxy_http2

    +
    +

    Available Languages:  en 

    +
    + + + +
    Description:HTTP/2 support module for +mod_proxy
    Status:Extension
    ModuleIdentifier:proxy_http2_module
    SourceFile:mod_proxy_http2.c
    +

    Summary

    + +

    This module requires the service of mod_proxy. It provides the features used for + proxying HTTP/2 requests. mod_proxy_http2 + supports HTTP/2 only. It does not + provide any downgrades to HTTP/1.1.

    + +

    Thus, in order to get the ability of handling HTTP/2 proxy requests, + mod_proxy and mod_proxy_http2 + have to be present in the server.

    + +

    mod_proxy_http2 works with incoming requests + over HTTP/1.1 and HTTP/2 requests. If mod_http2 + handles the frontend connection, requests against the same HTTP/2 + backend are sent over a single connection, whenever possible.

    + +

    This module relies on libnghttp2 + to provide the core http/2 engine.

    + +

    Warning

    +

    This module is experimental. Its behaviors, directives, and + defaults are subject to more change from release to + release relative to other standard modules. Users are encouraged to + consult the "CHANGES" file for potential updates.

    +
    + +

    Warning

    +

    Do not enable proxying until you have secured your server. Open proxy + servers are dangerous both to your network and to the Internet at + large.

    +
    +
    +

    Topics

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    +
    top
    +
    +

    Basic Examples

    + +

    The examples below demonstrate how to configure HTTP/2 for + backend connections for a reverse proxy.

    + +

    HTTP/2 (TLS)

    ProxyPass "/app" "h2://app.example.com"
    +ProxyPassReverse "/app" "h2://app.example.com"
    +
    + +

    HTTP/2 (cleartext)

    ProxyPass "/app" "h2c://app.example.com"
    +ProxyPassReverse "/app" "h2c://app.example.com"
    +
    +
    top
    +
    +

    Request notes

    +

    mod_proxy_http creates the following request notes for + logging using the %{VARNAME}n format in + LogFormat or + ErrorLogFormat: +

    +
    +
    proxy-source-port
    +
    The local port used for the connection to the backend server.
    +
    proxy-status
    +
    The HTTP/2 status received from the backend server.
    +
    +
    +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_http2.xml b/docs/manual/mod/mod_proxy_http2.xml new file mode 100644 index 00000000000..d6bcae9aa24 --- /dev/null +++ b/docs/manual/mod/mod_proxy_http2.xml @@ -0,0 +1,103 @@ + + + + + + + + + +mod_proxy_http2 +HTTP/2 support module for +mod_proxy +Extension +mod_proxy_http2.c +proxy_http2_module + + +

    This module requires the service of mod_proxy. It provides the features used for + proxying HTTP/2 requests. mod_proxy_http2 + supports HTTP/2 only. It does not + provide any downgrades to HTTP/1.1.

    + +

    Thus, in order to get the ability of handling HTTP/2 proxy requests, + mod_proxy and mod_proxy_http2 + have to be present in the server.

    + +

    mod_proxy_http2 works with incoming requests + over HTTP/1.1 and HTTP/2 requests. If mod_http2 + handles the frontend connection, requests against the same HTTP/2 + backend are sent over a single connection, whenever possible.

    + +

    This module relies on libnghttp2 + to provide the core http/2 engine.

    + + Warning +

    This module is experimental. Its behaviors, directives, and + defaults are subject to more change from release to + release relative to other standard modules. Users are encouraged to + consult the "CHANGES" file for potential updates.

    +
    + + Warning +

    Do not enable proxying until you have secured your server. Open proxy + servers are dangerous both to your network and to the Internet at + large.

    +
    +
    +mod_http2 +mod_proxy +mod_proxy_connect + +
    Basic Examples + +

    The examples below demonstrate how to configure HTTP/2 for + backend connections for a reverse proxy.

    + + HTTP/2 (TLS) + +ProxyPass "/app" "h2://app.example.com" +ProxyPassReverse "/app" "h2://app.example.com" + + + + HTTP/2 (cleartext) + +ProxyPass "/app" "h2c://app.example.com" +ProxyPassReverse "/app" "h2c://app.example.com" + + +
    + +
    Request notes +

    mod_proxy_http creates the following request notes for + logging using the %{VARNAME}n format in + LogFormat or + ErrorLogFormat: +

    +
    +
    proxy-source-port
    +
    The local port used for the connection to the backend server.
    +
    proxy-status
    +
    The HTTP/2 status received from the backend server.
    +
    +
    + +
    diff --git a/docs/manual/mod/mod_proxy_http2.xml.meta b/docs/manual/mod/mod_proxy_http2.xml.meta new file mode 100644 index 00000000000..2ccd79bba66 --- /dev/null +++ b/docs/manual/mod/mod_proxy_http2.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_proxy_http2 + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_proxy_scgi.html b/docs/manual/mod/mod_proxy_scgi.html index 590ef84df50..fd75046f0b6 100644 --- a/docs/manual/mod/mod_proxy_scgi.html +++ b/docs/manual/mod/mod_proxy_scgi.html @@ -3,3 +3,7 @@ URI: mod_proxy_scgi.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_proxy_scgi.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_scgi.html.en b/docs/manual/mod/mod_proxy_scgi.html.en index e6eb5f113f7..cb62d58d966 100644 --- a/docs/manual/mod/mod_proxy_scgi.html.en +++ b/docs/manual/mod/mod_proxy_scgi.html.en @@ -1,27 +1,33 @@ - -mod_proxy_scgi - Apache HTTP Server +mod_proxy_scgi - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_proxy_scgi

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -44,29 +50,28 @@ large.

    -
    top

    Examples

    Remember, in order to make the following examples work, you have to enable mod_proxy and mod_proxy_scgi.

    -

    Simple gateway

    - ProxyPass /scgi-bin/ scgi://localhost:4000/ -

    +

    Simple gateway

    ProxyPass /scgi-bin/ scgi://localhost:4000/
    +

    The balanced gateway needs mod_proxy_balancer and at least one load balancer algorithm module, such as @@ -74,21 +79,18 @@ modules listed above. mod_lbmethod_byrequests is the default, and will be used for this example configuration.

    -

    Balanced gateway

    - ProxyPass /scgi-bin/ balancer://somecluster/
    - <Proxy balancer://somecluster/>
    - - BalancerMember scgi://localhost:4000/
    - BalancerMember scgi://localhost:4001/
    -
    - </Proxy> -

    +

    Balanced gateway

    ProxyPass "/scgi-bin/" "balancer://somecluster/"
    +<Proxy "balancer://somecluster">
    +    BalancerMember "scgi://localhost:4000"
    +    BalancerMember "scgi://localhost:4001"
    +</Proxy>
    +
    top

    Environment Variables

    In addition to the configuration directives that control the - behaviour of mod_proxy, there are a number of - environment variables that control the SCGI protocol + behaviour of mod_proxy, an environment + variable may also control the SCGI protocol provider:

    proxy-scgi-pathinfo
    @@ -97,7 +99,11 @@ the backend SCGI server to correctly determine SCRIPT_NAME and Script-URI and be compliant with RFC 3875 section 3.3. If instead you need mod_proxy_scgi to generate - a "best guess" for PATH_INFO, set this env-var. + a "best guess" for PATH_INFO, set this env-var. The + variable must be set before SetEnv + is effective. SetEnvIf can be + used instead: SetEnvIf Request_URI . proxy-scgi-pathinfo +
    top
    @@ -105,27 +111,34 @@
    Description:SCGI gateway module for mod_proxy
    Status:Extension
    - + +
    Description:Enable or disable internal redirect responses from the backend
    Syntax:ProxySCGIInternalRedirect On|Off
    Syntax:ProxySCGIInternalRedirect On|Off|Headername
    Default:ProxySCGIInternalRedirect On
    Context:server config, virtual host, directory
    Status:Extension
    Module:mod_proxy_scgi
    Compatibility:The Headername feature is available in version +2.4.13 and later

    The ProxySCGIInternalRedirect enables the backend to internally redirect the gateway to a different URL. This feature - origins in mod_cgi, which internally redirects the - response, if the response status is OK (200) and - the response contains a Location header and its value starts - with a slash (/). This value is interpreted as a new local - URL the apache internally redirects to.

    + originates in mod_cgi, which internally redirects the + response if the response status is OK (200) and + the response contains a Location (or configured alternate + header) and its value starts with a slash (/). This value is + interpreted as a new local URL that Apache httpd internally redirects to.

    mod_proxy_scgi does the same as mod_cgi in this regard, except that you can turn off the - feature.

    + feature or specify the use of a header other than Location.

    -

    Example

    - ProxySCGIInternalRedirect Off -

    +

    Example

        ProxySCGIInternalRedirect Off
    +
    +# Django and some other frameworks will fully qualify "local URLs"
    +# set by the application, so an alternate header must be used.
    +<Location /django-app/>
    +    ProxySCGIInternalRedirect X-Location
    +</Location>
    +
    top
    @@ -140,10 +153,10 @@ header Module:mod_proxy_scgi

    The ProxySCGISendfile directive enables the - SCGI backend to let files serve directly by the gateway. This is useful - performance purposes -- the httpd can use sendfile or other + SCGI backend to let files be served directly by the gateway. This is useful + for performance purposes — httpd can use sendfile or other optimizations, which are not possible if the file comes over the backend - socket.

    + socket. Additionally, the file contents are not transmitted twice.

    The ProxySCGISendfile argument determines the gateway behaviour:

    @@ -152,28 +165,49 @@ header
    On
    The gateway looks for a backend response header called - X-Sendfile and interprets the value as filename to serve. The - header is removed from the final response headers. This is equivalent to + X-Sendfile and interprets the value as the filename to serve. + The header is removed from the final response headers. This is equivalent to ProxySCGISendfile X-Sendfile.
    anything else
    Similar to On, but instead of the hardcoded header name - the argument is applied as header name.
    + X-Sendfile, the argument is used as the header name.
    -

    Example

    - # Use the default header (X-Sendfile)
    - ProxySCGISendfile On
    -
    - # Use a different header
    - ProxySCGISendfile X-Send-Static -

    +

    Example

    # Use the default header (X-Sendfile)
    +ProxySCGISendfile On
    +    
    +# Use a different header
    +ProxySCGISendfile X-Send-Static
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_scgi.html.fr b/docs/manual/mod/mod_proxy_scgi.html.fr new file mode 100644 index 00000000000..538ae8a3910 --- /dev/null +++ b/docs/manual/mod/mod_proxy_scgi.html.fr @@ -0,0 +1,230 @@ + + + + + +mod_proxy_scgi - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_proxy_scgi

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Module fournissant le support de la passerelle SCGI +mod_proxy
    Statut:Extension
    IdentificateurdeModule:proxy_scgi_module
    FichierSource:mod_proxy_scgi.c
    Compatibilit:Disponible depuis la version 2.2.14 d'Apache
    +

    Sommaire

    + +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy. Il fournit le support du + protocole SCGI, version + 1.

    + +

    Ainsi, pour tre en mesure de traiter le protocole SCGI, + mod_proxy et mod_proxy_scgi + doivent tre chargs dans le serveur.

    + +

    Avertissement

    +

    N'activez pas la fonctionnalit de mandataire avant d'avoir scuris votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre rseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +
    top
    +
    +

    Exemples

    +

    Rappelez-vous, pour que les exemples suivants puissent + fonctionner, vous devez activer mod_proxy et + mod_proxy_scgi.

    + +

    Passerelle simple

    ProxyPass /scgi-bin/ scgi://localhost:4000/
    +
    + +

    La passerelle rpartition de charge ncessite le chargement du + module mod_proxy_balancer et d'au moins un module + fournissant un algorithme de rpartition de charge, comme + mod_lbmethod_byrequests en plus des modules + dj cits. mod_lbmethod_byrequests est le module + par dfaut et sera utilis dans cet exemple de configuration.

    + +

    Passerelle rpartition de charge

    ProxyPass "/scgi-bin/" "balancer://somecluster/"
    +<Proxy "balancer://somecluster">
    +    BalancerMember "scgi://localhost:4000"
    +    BalancerMember "scgi://localhost:4001"
    +</Proxy>
    +
    +
    top
    +
    +

    Variables d'environnement

    +

    En plus des directives de configuration qui permettent de + contrler le comportement de mod_proxy, une + variable d'environnement peut aussi + contrler le fournisseur de protocole SCGI :

    +
    +
    proxy-scgi-pathinfo
    +
    Par dfaut, mod_proxy_scgi ne crera ni + exportera jamais la variable d'environnement + PATH_INFO. Ceci permet au serveur SCGI d'arrire-plan + de dterminer correctement SCRIPT_NAME et + Script-URI, et de rester en conformit avec la section + 3.3 de la RFC 3875. Si au contraire vous souhaitez que + mod_proxy_scgi gnre une estimation la plus + prcise possible de PATH_INFO, dfinissez cette + variable d'environnement. La variable doit tre dfinie avant + que la directive SetEnv ne soit effective. Il est possible + d'utiliser la place la directive SetEnvIf : SetEnvIf Request_URI . proxy-scgi-pathinfo +
    +
    +
    +
    top
    +

    Directive ProxySCGIInternalRedirect

    + + + + + + + + +
    Description:Active ou dsactive les rponses de redirection interne en +provenance du serveur cible.
    Syntaxe:ProxySCGIInternalRedirect On|Off|Headername
    Dfaut:ProxySCGIInternalRedirect On
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy_scgi
    Compatibilit:Le paramtre Headername est disponible depuis +la version 2.4.13 du serveur HTTP Apache.
    +

    La directive ProxySCGIInternalRedirect + permet au serveur cible de rediriger en interne la passerelle vers + une URL diffrente. Cette fonctionnalit trouve son origine dans + mod_cgi qui redirige la rponse en interne si + l'tat de la rponse est OK (200), et si + la rponse contient un en-tte Location + (ou un autre en-tte dfini) dont la valeur + dbute par un slash (/). Cette valeur est interprte + comme une nouvelle URL locale vers laquelle Apache httpd effectue sa + redirection.

    + +

    De ce point de vue, mod_proxy_scgi fait la mme + chose que mod_cgi, mais vous pouvez en plus + dsactiver la fonctionnalit ou spcifier + l'utilisation d'un en-tte autre que Location.

    + +

    Exemple

        ProxySCGIInternalRedirect Off
    +# Django et certains autres frameworks qualifient pleinement les "URLs
    +# locales" dfinies par l'application ; il faut donc utiliser un autre
    +# en-tte.
    +<Location /django-app/>
    +    ProxySCGIInternalRedirect X-Location
    +</Location>
    +
    + +
    +
    top
    +

    Directive ProxySCGISendfile

    + + + + + + + +
    Description:Active l'valuation du pseudo en-tte de rponse +X-Sendfile
    Syntaxe:ProxySCGISendfile On|Off|nom-en-tte
    Dfaut:ProxySCGISendfile Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Extension
    Module:mod_proxy_scgi
    +

    La directive ProxySCGISendfile permet au + serveur cible SCGI de faire servir les fichiers directement par la + passerelle. Ceci s'avre bnfique en + matire de performances — + httpd peut alors utiliser sendfile ou d'autres + optimisations, ce qui n'est pas possible si les fichiers passent par + la socket du serveur cible. En outre, les fichiers ne sont transmis + qu'une seule fois.

    +

    L'argument de la directive + ProxySCGISendfile dtermine le comportement + de la passerelle :

    +
    +
    Off
    +
    Aucun traitement particulier n'est effectu.
    + +
    On
    +
    La passerelle recherche un en-tte dans la rponse du serveur + cible nomm X-Sendfile, et interprte sa valeur comme + le nom du fichier servir. L'en-tte est ensuite supprim de la + rponse finale. Cet argument produit le mme effet que + ProxySCGISendfile X-Sendfile.
    + +
    toute autre valeur
    +
    Identique On, mais au lieu de rechercher le nom + d'en-tte cod en dur X-Sendfile, c'est la + valeur de l'argument qui constitue le nom de l'en-tte + rechercher.
    +
    + +

    Exemple

        # Utilise le nom d'en-tte par dfaut (X-Sendfile)
    +    ProxySCGISendfile On
    +
    +    # Utilise un nom d'en-tte diffrent
    +    ProxySCGISendfile X-Send-Static
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_scgi.xml b/docs/manual/mod/mod_proxy_scgi.xml index 4fd0b532505..79b4293c389 100644 --- a/docs/manual/mod/mod_proxy_scgi.xml +++ b/docs/manual/mod/mod_proxy_scgi.xml @@ -1,4 +1,4 @@ - + @@ -55,7 +55,9 @@ enable mod_proxy and mod_proxy_scgi.

    Simple gateway + ProxyPass /scgi-bin/ scgi://localhost:4000/ +

    The balanced gateway needs mod_proxy_balancer and @@ -65,20 +67,20 @@ default, and will be used for this example configuration.

    Balanced gateway - ProxyPass /scgi-bin/ balancer://somecluster/
    - <Proxy balancer://somecluster/>
    - - BalancerMember scgi://localhost:4000/
    - BalancerMember scgi://localhost:4001/
    -
    - </Proxy> + +ProxyPass "/scgi-bin/" "balancer://somecluster/" +<Proxy "balancer://somecluster"> + BalancerMember "scgi://localhost:4000" + BalancerMember "scgi://localhost:4001" +</Proxy> +
    Environment Variables

    In addition to the configuration directives that control the - behaviour of mod_proxy, there are a number of - environment variables that control the SCGI protocol + behaviour of mod_proxy, an environment + variable may also control the SCGI protocol provider:

    proxy-scgi-pathinfo
    @@ -87,7 +89,11 @@ the backend SCGI server to correctly determine SCRIPT_NAME and Script-URI and be compliant with RFC 3875 section 3.3. If instead you need mod_proxy_scgi to generate - a "best guess" for PATH_INFO, set this env-var. + a "best guess" for PATH_INFO, set this env-var. The + variable must be set before SetEnv + is effective. SetEnvIf can be + used instead: SetEnvIf Request_URI . proxy-scgi-pathinfo +
    @@ -102,10 +108,10 @@ header

    The ProxySCGISendfile directive enables the - SCGI backend to let files serve directly by the gateway. This is useful - performance purposes -- the httpd can use sendfile or other + SCGI backend to let files be served directly by the gateway. This is useful + for performance purposes — httpd can use sendfile or other optimizations, which are not possible if the file comes over the backend - socket.

    + socket. Additionally, the file contents are not transmitted twice.

    The ProxySCGISendfile argument determines the gateway behaviour:

    @@ -114,21 +120,23 @@ header
    On
    The gateway looks for a backend response header called - X-Sendfile and interprets the value as filename to serve. The - header is removed from the final response headers. This is equivalent to + X-Sendfile and interprets the value as the filename to serve. + The header is removed from the final response headers. This is equivalent to ProxySCGISendfile X-Sendfile.
    anything else
    Similar to On, but instead of the hardcoded header name - the argument is applied as header name.
    + X-Sendfile, the argument is used as the header name.
    Example - # Use the default header (X-Sendfile)
    - ProxySCGISendfile On
    -
    - # Use a different header
    - ProxySCGISendfile X-Send-Static + +# Use the default header (X-Sendfile) +ProxySCGISendfile On + +# Use a different header +ProxySCGISendfile X-Send-Static +
    @@ -137,26 +145,36 @@ header ProxySCGIInternalRedirect Enable or disable internal redirect responses from the backend -ProxySCGIInternalRedirect On|Off +ProxySCGIInternalRedirect On|Off|Headername ProxySCGIInternalRedirect On server configvirtual host directory +The Headername feature is available in version +2.4.13 and later

    The ProxySCGIInternalRedirect enables the backend to internally redirect the gateway to a different URL. This feature - origins in mod_cgi, which internally redirects the - response, if the response status is OK (200) and - the response contains a Location header and its value starts - with a slash (/). This value is interpreted as a new local - URL the apache internally redirects to.

    + originates in mod_cgi, which internally redirects the + response if the response status is OK (200) and + the response contains a Location (or configured alternate + header) and its value starts with a slash (/). This value is + interpreted as a new local URL that Apache httpd internally redirects to.

    mod_proxy_scgi does the same as mod_cgi in this regard, except that you can turn off the - feature.

    + feature or specify the use of a header other than Location.

    Example + ProxySCGIInternalRedirect Off + +# Django and some other frameworks will fully qualify "local URLs" +# set by the application, so an alternate header must be used. +<Location /django-app/> + ProxySCGIInternalRedirect X-Location +</Location> +
    diff --git a/docs/manual/mod/mod_proxy_scgi.xml.fr b/docs/manual/mod/mod_proxy_scgi.xml.fr new file mode 100644 index 00000000000..72235e90fd6 --- /dev/null +++ b/docs/manual/mod/mod_proxy_scgi.xml.fr @@ -0,0 +1,203 @@ + + + + + + + + + + + +mod_proxy_scgi +Module fournissant le support de la passerelle SCGI à +mod_proxy +Extension +mod_proxy_scgi.c +proxy_scgi_module +Disponible depuis la version 2.2.14 d'Apache + + +

    Pour pouvoir fonctionner, ce module requiert le + chargement de mod_proxy. Il fournit le support du + protocole SCGI, version + 1.

    + +

    Ainsi, pour être en mesure de traiter le protocole SCGI, + mod_proxy et mod_proxy_scgi + doivent être chargés dans le serveur.

    + + Avertissement +

    N'activez pas la fonctionnalité de mandataire avant d'avoir sécurisé votre serveur. Les + serveurs mandataires ouverts sont dangereux non seulement pour + votre réseau, mais aussi pour l'Internet au sens large.

    +
    +
    + +mod_proxy +mod_proxy_balancer + +
    Exemples +

    Rappelez-vous, pour que les exemples suivants puissent + fonctionner, vous devez activer mod_proxy et + mod_proxy_scgi.

    + + Passerelle simple + + ProxyPass /scgi-bin/ scgi://localhost:4000/ + + + +

    La passerelle à répartition de charge nécessite le chargement du + module mod_proxy_balancer et d'au moins un module + fournissant un algorithme de répartition de charge, comme + mod_lbmethod_byrequests en plus des modules + déjà cités. mod_lbmethod_byrequests est le module + par défaut et sera utilisé dans cet exemple de configuration.

    + + Passerelle à répartition de charge + +ProxyPass "/scgi-bin/" "balancer://somecluster/" +<Proxy "balancer://somecluster"> + BalancerMember "scgi://localhost:4000" + BalancerMember "scgi://localhost:4001" +</Proxy> + + +
    + +
    Variables d'environnement +

    En plus des directives de configuration qui permettent de + contrôler le comportement de mod_proxy, une + variable d'environnement peut aussi + contrôler le fournisseur de protocole SCGI :

    +
    +
    proxy-scgi-pathinfo
    +
    Par défaut, mod_proxy_scgi ne créera ni + exportera jamais la variable d'environnement + PATH_INFO. Ceci permet au serveur SCGI d'arrière-plan + de déterminer correctement SCRIPT_NAME et + Script-URI, et de rester en conformité avec la section + 3.3 de la RFC 3875. Si au contraire vous souhaitez que + mod_proxy_scgi génère une estimation la plus + précise possible de PATH_INFO, définissez cette + variable d'environnement. La variable doit être définie avant + que la directive SetEnv ne soit effective. Il est possible + d'utiliser à la place la directive SetEnvIf : SetEnvIf Request_URI . proxy-scgi-pathinfo +
    +
    +
    + + +ProxySCGISendfile +Active l'évaluation du pseudo en-tête de réponse +X-Sendfile +ProxySCGISendfile On|Off|nom-en-tête +ProxySCGISendfile Off +server configvirtual host +directory + + +

    La directive ProxySCGISendfile permet au + serveur cible SCGI de faire servir les fichiers directement par la + passerelle. Ceci s'avère bénéfique en + matière de performances — + httpd peut alors utiliser sendfile ou d'autres + optimisations, ce qui n'est pas possible si les fichiers passent par + la socket du serveur cible. En outre, les fichiers ne sont transmis + qu'une seule fois.

    +

    L'argument de la directive + ProxySCGISendfile détermine le comportement + de la passerelle :

    +
    +
    Off
    +
    Aucun traitement particulier n'est effectué.
    + +
    On
    +
    La passerelle recherche un en-tête dans la réponse du serveur + cible nommé X-Sendfile, et interprète sa valeur comme + le nom du fichier à servir. L'en-tête est ensuite supprimé de la + réponse finale. Cet argument produit le même effet que + ProxySCGISendfile X-Sendfile.
    + +
    toute autre valeur
    +
    Identique à On, mais au lieu de rechercher le nom + d'en-tête codé en dur X-Sendfile, c'est la + valeur de l'argument qui constitue le nom de l'en-tête + à rechercher.
    +
    + + Exemple + + # Utilise le nom d'en-tête par défaut (X-Sendfile) + ProxySCGISendfile On + + # Utilise un nom d'en-tête différent + ProxySCGISendfile X-Send-Static + + +
    +
    + + +ProxySCGIInternalRedirect +Active ou désactive les réponses de redirection interne en +provenance du serveur cible. +ProxySCGIInternalRedirect On|Off|Headername +ProxySCGIInternalRedirect On +server configvirtual host +directory +Le paramètre Headername est disponible depuis +la version 2.4.13 du serveur HTTP Apache. + + +

    La directive ProxySCGIInternalRedirect + permet au serveur cible de rediriger en interne la passerelle vers + une URL différente. Cette fonctionnalité trouve son origine dans + mod_cgi qui redirige la réponse en interne si + l'état de la réponse est OK (200), et si + la réponse contient un en-tête Location + (ou un autre en-tête défini) dont la valeur + débute par un slash (/). Cette valeur est interprétée + comme une nouvelle URL locale vers laquelle Apache httpd effectue sa + redirection.

    + +

    De ce point de vue, mod_proxy_scgi fait la même + chose que mod_cgi, mais vous pouvez en plus + désactiver la fonctionnalité ou spécifier + l'utilisation d'un en-tête autre que Location.

    + + Exemple + + ProxySCGIInternalRedirect Off +# Django et certains autres frameworks qualifient pleinement les "URLs +# locales" définies par l'application ; il faut donc utiliser un autre +# en-tête. +<Location /django-app/> + ProxySCGIInternalRedirect X-Location +</Location> + + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_proxy_scgi.xml.meta b/docs/manual/mod/mod_proxy_scgi.xml.meta index 143cd4fa7d9..a125bc5adeb 100644 --- a/docs/manual/mod/mod_proxy_scgi.xml.meta +++ b/docs/manual/mod/mod_proxy_scgi.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_proxy_wstunnel.html b/docs/manual/mod/mod_proxy_wstunnel.html new file mode 100644 index 00000000000..9eea9810327 --- /dev/null +++ b/docs/manual/mod/mod_proxy_wstunnel.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_proxy_wstunnel.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_proxy_wstunnel.html.en b/docs/manual/mod/mod_proxy_wstunnel.html.en new file mode 100644 index 00000000000..266e56de213 --- /dev/null +++ b/docs/manual/mod/mod_proxy_wstunnel.html.en @@ -0,0 +1,90 @@ + + + + + +mod_proxy_wstunnel - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_proxy_wstunnel

    +
    +

    Available Languages:  en 

    +
    + + + + +
    Description:Websockets support module for +mod_proxy
    Status:Extension
    ModuleIdentifier:proxy_wstunnel_module
    SourceFile:mod_proxy_wstunnel.c
    Compatibility:Available in httpd 2.4.5 and later
    +

    Summary

    + +

    This module requires the service of mod_proxy. It provides support for the tunnelling of web + socket connections to a backend websockets server. The connection + is automatically upgraded to a websocket connection:

    + +

    HTTP Response

    Upgrade: WebSocket
    +Connection: Upgrade
    +
    + +

    Proxying requests to a websockets server like echo.websocket.org can be done using the +ProxyPass directive:

    +
    ProxyPass "/ws2/"  "ws://echo.websocket.org/"
    +ProxyPass "/wss2/" "wss://echo.websocket.org/"
    + + +

    Load balancing for multiple backends can be achieved using mod_proxy_balancer.

    +
    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    + +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_proxy_wstunnel.xml b/docs/manual/mod/mod_proxy_wstunnel.xml new file mode 100644 index 00000000000..907576766db --- /dev/null +++ b/docs/manual/mod/mod_proxy_wstunnel.xml @@ -0,0 +1,57 @@ + + + + + + + + + +mod_proxy_wstunnel +Websockets support module for +mod_proxy +Extension +mod_proxy_wstunnel.c +proxy_wstunnel_module +Available in httpd 2.4.5 and later + + +

    This module requires the service of mod_proxy. It provides support for the tunnelling of web + socket connections to a backend websockets server. The connection + is automatically upgraded to a websocket connection:

    + + HTTP Response + +Upgrade: WebSocket +Connection: Upgrade + + + +

    Proxying requests to a websockets server like echo.websocket.org can be done using the +ProxyPass directive:

    + +ProxyPass "/ws2/" "ws://echo.websocket.org/" +ProxyPass "/wss2/" "wss://echo.websocket.org/" + + +

    Load balancing for multiple backends can be achieved using mod_proxy_balancer.

    +
    + +mod_proxy +
    diff --git a/docs/manual/mod/mod_proxy_wstunnel.xml.meta b/docs/manual/mod/mod_proxy_wstunnel.xml.meta new file mode 100644 index 00000000000..d12fab9bcb4 --- /dev/null +++ b/docs/manual/mod/mod_proxy_wstunnel.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_proxy_wstunnel + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_ratelimit.html b/docs/manual/mod/mod_ratelimit.html index 7e6095c685f..87ef11a7d6d 100644 --- a/docs/manual/mod/mod_ratelimit.html +++ b/docs/manual/mod/mod_ratelimit.html @@ -3,3 +3,7 @@ URI: mod_ratelimit.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_ratelimit.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_ratelimit.html.en b/docs/manual/mod/mod_ratelimit.html.en index 37ff6f762de..76c302a535c 100644 --- a/docs/manual/mod/mod_ratelimit.html.en +++ b/docs/manual/mod/mod_ratelimit.html.en @@ -1,58 +1,97 @@ - -mod_ratelimit - Apache HTTP Server +mod_ratelimit - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_ratelimit

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    -
    Description:Bandwidth Rate Limiting for Clients
    Status:Extension
    ModuleIdentifier:ratelimit_module
    SourceFile:mod_ratelimit.c
    +SourceFile:mod_ratelimit.c +Compatibility:rate-initial-burst available in httpd 2.4.24 and later.

    Summary

    -

    Provides a rate_limit filter to limit client bandwidth. -The connection speed to be simulated is specified, in kb/s, using the environment +

    Provides a filter named RATE_LIMIT to limit client bandwidth. +The throttling is applied to each HTTP response while it is transferred to the client, +and not aggregated at IP/client level. +The connection speed to be simulated is specified, in KiB/s, using the environment variable rate-limit.

    -

    Example Configuration

    -<Location /downloads>
    - -SetHandler RATE_LIMIT
    -SetEnv rate-limit 400
    -
    -</Location> -

    +

    Optionally, an initial amount of burst data, in KiB, may be +configured to be passed at full speed before throttling to the +specified rate limit. This value is optional, and is set using +the environment variable rate-initial-burst.

    + +

    Example Configuration

    <Location "/downloads">
    +    SetOutputFilter RATE_LIMIT
    +    SetEnv rate-limit 400 
    +    SetEnv rate-initial-burst 512
    +</Location>
    +
    +If the value specified for rate-limit causes integer overflow, the rate-limited will be disabled. +If the value specified for rate-limit-burst causes integer overflow, the burst will be disabled. +

    Directives

    This module provides no directives.

    -
    +

    Bugfix checklist

    See also

    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ratelimit.html.fr b/docs/manual/mod/mod_ratelimit.html.fr new file mode 100644 index 00000000000..6121e065525 --- /dev/null +++ b/docs/manual/mod/mod_ratelimit.html.fr @@ -0,0 +1,87 @@ + + + + + +mod_ratelimit - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_ratelimit

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    + + + +
    Description:Limitation de la bande passante pour les clients
    Statut:Extension
    IdentificateurdeModule:ratelimit_module
    FichierSource:mod_ratelimit.c
    +

    Sommaire

    + + +

    Ce module fournit un filtre rate_limit pour limiter la +bande passante des clients. La variable d'environnement +rate-limit permet de spcifier, en kb/s, le dbit de la +connexion simuler.

    + +

    Exemple de configuration

    <Location "/downloads">
    +    SetOutputFilter RATE_LIMIT
    +    SetEnv rate-limit 400
    +</Location>
    +
    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_ratelimit.xml b/docs/manual/mod/mod_ratelimit.xml index 079c4464b53..2e4418abe5e 100644 --- a/docs/manual/mod/mod_ratelimit.xml +++ b/docs/manual/mod/mod_ratelimit.xml @@ -30,20 +30,35 @@ the document to validate. --> Extension mod_ratelimit.c ratelimit_module +rate-initial-burst available in httpd 2.4.24 and later. -

    Provides a rate_limit filter to limit client bandwidth. -The connection speed to be simulated is specified, in kb/s, using the environment +

    Provides a filter named RATE_LIMIT to limit client bandwidth. +The throttling is applied to each HTTP response while it is transferred to the client, +and not aggregated at IP/client level. +The connection speed to be simulated is specified, in KiB/s, using the environment variable rate-limit.

    +

    Optionally, an initial amount of burst data, in KiB, may be +configured to be passed at full speed before throttling to the +specified rate limit. This value is optional, and is set using +the environment variable rate-initial-burst.

    + Example Configuration -<Location /downloads>
    - -SetHandler RATE_LIMIT
    -SetEnv rate-limit 400
    -
    + +<Location "/downloads"> + SetOutputFilter RATE_LIMIT + SetEnv rate-limit 400 + SetEnv rate-initial-burst 512 </Location> + + + +If the value specified for rate-limit causes integer overflow, the rate-limited will be disabled. +If the value specified for rate-limit-burst causes integer overflow, the burst will be disabled. + +
    diff --git a/docs/manual/mod/mod_ratelimit.xml.fr b/docs/manual/mod/mod_ratelimit.xml.fr new file mode 100644 index 00000000000..eefe54692c8 --- /dev/null +++ b/docs/manual/mod/mod_ratelimit.xml.fr @@ -0,0 +1,55 @@ + + + + + + + + + + + + +mod_ratelimit +Limitation de la bande passante pour les clients +Extension +mod_ratelimit.c +ratelimit_module + + + +

    Ce module fournit un filtre rate_limit pour limiter la +bande passante des clients. La variable d'environnement +rate-limit permet de spécifier, en kb/s, le débit de la +connexion à simuler.

    + +Exemple de configuration + +<Location "/downloads"> + SetOutputFilter RATE_LIMIT + SetEnv rate-limit 400 +</Location> + + + +
    + +
    + diff --git a/docs/manual/mod/mod_ratelimit.xml.meta b/docs/manual/mod/mod_ratelimit.xml.meta index 472bc80e47f..c44ea5cee2a 100644 --- a/docs/manual/mod/mod_ratelimit.xml.meta +++ b/docs/manual/mod/mod_ratelimit.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_reflector.html b/docs/manual/mod/mod_reflector.html index 2d220f67145..788294bf23e 100644 --- a/docs/manual/mod/mod_reflector.html +++ b/docs/manual/mod/mod_reflector.html @@ -3,3 +3,7 @@ URI: mod_reflector.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_reflector.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_reflector.html.en b/docs/manual/mod/mod_reflector.html.en index 680b1700a03..095f7898d08 100644 --- a/docs/manual/mod/mod_reflector.html.en +++ b/docs/manual/mod/mod_reflector.html.en @@ -1,27 +1,33 @@ - -mod_reflector - Apache HTTP Server +mod_reflector - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_reflector

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -36,14 +42,16 @@ the request into a response. This module can be used to turn an output filter into an HTTP service.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Examples

    @@ -52,23 +60,21 @@
    Pass the request body through the DEFLATE filter to compress the body. This request requires a Content-Encoding request header containing "gzip" for the filter to return compressed data. -

    - <Location /compress>
    - SetHandler reflector
    - SetOutputFilter DEFLATE
    - </Location> -

    +
    <Location "/compress">
    +    SetHandler reflector
    +    SetOutputFilter DEFLATE
    +</Location>
    +
    Image downsampling service
    Pass the request body through an image downsampling filter, and reflect the results to the caller. -

    - <Location /downsample>
    - SetHandler reflector
    - SetOutputFilter DOWNSAMPLE
    - </Location> -

    +
    <Location "/downsample">
    +    SetHandler reflector
    +    SetOutputFilter DOWNSAMPLE
    +</Location>
    +
    @@ -90,8 +96,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_reflector.html.fr b/docs/manual/mod/mod_reflector.html.fr new file mode 100644 index 00000000000..2b7195bbe0c --- /dev/null +++ b/docs/manual/mod/mod_reflector.html.fr @@ -0,0 +1,129 @@ + + + + + +mod_reflector - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_reflector

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Reflect a request body as a response via the output filter stack.
    Status:Base
    + + + +
    Description:Rflchit un corps de requte comme rponse via la pile de +filtres en sortie.
    Statut:Base
    IdentificateurdeModule:reflector_module
    FichierSource:mod_reflector.c
    Compatibilit:Versions 2.3 et ultrieures
    +

    Sommaire

    + +

    Ce module permet de renvoyer un corps de requte au client, aprs + l'avoir fait passer par la pile de filtres en sortie. Une chane de + filtres configure de manire approprie peut tre utilise pour + transformer la requte en rponse. Ce module peut ainsi tre utilis + pour transformer un filtre en sortie en service HTTP.

    +
    + +
    top
    +
    +

    Exemples

    +
    +
    Service de compression
    +
    Fait passer le corps de la requte par le filtre DEFLATE pour le + compresser. Cette requte ncessite un en-tte Content-Encoding + contenant la valeur "gzip" pour que le filtre renvoie les donnes + compresses. +
    <Location "/compress">
    +    SetHandler reflector
    +    SetOutputFilter DEFLATE
    +</Location>
    + +
    + +
    Service d'abaissement de l'chantillonnage d'image
    +
    Fait passer le corps de la requte par un filtre d'abaissement + de l'chantillonnage d'image, et renvoie le rsultat au client. +
    <Location "/downsample">
    +    SetHandler reflector
    +    SetOutputFilter DOWNSAMPLE
    +</Location>
    + +
    +
    +
    +
    top
    +

    Directive ReflectorHeader

    + + + + + + + +
    Description:Rflchit un en-tte d'entre dans les en-ttes de sortie
    Syntaxe:ReflectorHeader en-tte-entre [en-tte-sortie]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Base
    Module:mod_reflector
    +

    Cette directive permet de contrler la rpercution des en-ttes + de la requte dans la rponse. Le premier argument correspond au nom + de l'en-tte copier. Si le second argument (optionnel) est + spcifi, il dfinit le nom sous lequel l'en-tte sera rpercut + dans la rponse ; dans le cas contraire, c'est le nom de l'en-tte + original qui sera utilis.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_reflector.xml b/docs/manual/mod/mod_reflector.xml index 880170e8b73..06e44967832 100644 --- a/docs/manual/mod/mod_reflector.xml +++ b/docs/manual/mod/mod_reflector.xml @@ -43,23 +43,23 @@
    Pass the request body through the DEFLATE filter to compress the body. This request requires a Content-Encoding request header containing "gzip" for the filter to return compressed data. - - <Location /compress>
    - SetHandler reflector
    - SetOutputFilter DEFLATE
    - </Location> -
    + +<Location "/compress"> + SetHandler reflector + SetOutputFilter DEFLATE +</Location> +
    Image downsampling service
    Pass the request body through an image downsampling filter, and reflect the results to the caller. - - <Location /downsample>
    - SetHandler reflector
    - SetOutputFilter DOWNSAMPLE
    - </Location> -
    + +<Location "/downsample"> + SetHandler reflector + SetOutputFilter DOWNSAMPLE +</Location> +
    diff --git a/docs/manual/mod/mod_reflector.xml.fr b/docs/manual/mod/mod_reflector.xml.fr new file mode 100644 index 00000000000..c1c79d44345 --- /dev/null +++ b/docs/manual/mod/mod_reflector.xml.fr @@ -0,0 +1,89 @@ + + + + + + + + + + + +mod_reflector +Réfléchit un corps de requête comme réponse via la pile de +filtres en sortie. +Base +mod_reflector.c +reflector_module +Versions 2.3 et ultérieures + + +

    Ce module permet de renvoyer un corps de requête au client, après + l'avoir fait passer par la pile de filtres en sortie. Une chaîne de + filtres configurée de manière appropriée peut être utilisée pour + transformer la requête en réponse. Ce module peut ainsi être utilisé + pour transformer un filtre en sortie en service HTTP.

    +
    + +
    Exemples +
    +
    Service de compression
    +
    Fait passer le corps de la requête par le filtre DEFLATE pour le + compresser. Cette requête nécessite un en-tête Content-Encoding + contenant la valeur "gzip" pour que le filtre renvoie les données + compressées. + +<Location "/compress"> + SetHandler reflector + SetOutputFilter DEFLATE +</Location> + +
    + +
    Service d'abaissement de l'échantillonnage d'image
    +
    Fait passer le corps de la requête par un filtre d'abaissement + de l'échantillonnage d'image, et renvoie le résultat au client. + +<Location "/downsample"> + SetHandler reflector + SetOutputFilter DOWNSAMPLE +</Location> + +
    +
    +
    + + +ReflectorHeader +Réfléchit un en-tête d'entrée dans les en-têtes de sortie +ReflectorHeader en-tête-entrée [en-tête-sortie] +server configvirtual host +directory.htaccess +Options + + +

    Cette directive permet de contrôler la répercution des en-têtes + de la requête dans la réponse. Le premier argument correspond au nom + de l'en-tête à copier. Si le second argument (optionnel) est + spécifié, il définit le nom sous lequel l'en-tête sera répercuté + dans la réponse ; dans le cas contraire, c'est le nom de l'en-tête + original qui sera utilisé.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_reflector.xml.meta b/docs/manual/mod/mod_reflector.xml.meta index d7945b496e9..70e22cc9373 100644 --- a/docs/manual/mod/mod_reflector.xml.meta +++ b/docs/manual/mod/mod_reflector.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_remoteip.html.en b/docs/manual/mod/mod_remoteip.html.en index 02be77c3155..532de924db5 100644 --- a/docs/manual/mod/mod_remoteip.html.en +++ b/docs/manual/mod/mod_remoteip.html.en @@ -1,63 +1,69 @@ - -mod_remoteip - Apache HTTP Server +mod_remoteip - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_remoteip

    Available Languages:  en  |  fr 

    -
    Description:Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +
    Description:Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers.
    Status:Base
    ModuleIdentifier:remoteip_module
    SourceFile:mod_remoteip.c

    Summary

    -

    This module is used to treat the remote host which initiated the - request as the originating remote host as identified by httpd for the - purposes of authorization and logging, even where that remote host is +

    This module is used to treat the useragent which initiated the + request as the originating useragent as identified by httpd for the + purposes of authorization and logging, even where that useragent is behind a load balancer, front end server, or proxy server.

    -

    The module replaces the apparent remote (client) IP/hostname for - the request with the IP address reported in the request header - configured with the RemoteIPHeader directive.

    +

    The module overrides the client IP address for the connection + with the useragent IP address reported in the request header configured + with the RemoteIPHeader directive.

    -

    Once replaced as instructed, this apparent IP address is then used - for mod_authz_host features - <Require host> - and <Require ip>, - is reported by mod_status, and is recorded by - mod_log_config %a and %h - directives. It also determines the machine probed for an inetd - identity by mod_ident based on the - IdentityCheck configuration.

    +

    Once replaced as instructed, this overridden useragent IP address is + then used for the mod_authz_host + Require ip + feature, is reported by mod_status, and is recorded by + mod_log_config %a and core + %a format strings. The underlying client IP of the connection + is available in the %{c}a format string.

    It is critical to only enable this behavior from - intermediate hosts (proxies, etc) which are trusted by this server, since - it is trivial for the remote client to impersonate another client.
    + it is trivial for the remote useragent to impersonate another + useragent. -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    Remote IP Processing

    -

    Apache identifies the client with the connection's remote_ip value, - and the connection remote_host and remote_logname are derived from this - value. These fields play a role in authentication, authorization and - logging and other purposes by other loadable modules.

    +

    Apache by default identifies the useragent with the connection's + client_ip value, and the connection remote_host and remote_logname are + derived from this value. These fields play a role in authentication, + authorization and logging and other purposes by other loadable + modules.

    -

    mod_remoteip replaces the true remote_ip with the advertised remote_ip as - provided by a proxy, for every evaluation of the client that occurs in the - server, and resets the remote_host and remote_logname values to trigger a - fresh dns or ident query of the remote IP address.

    +

    mod_remoteip overrides the client IP of the connection with the + advertised useragent IP as provided by a proxy or load balancer, for + the duration of the request. A load balancer might establish a long + lived keepalive connection with the server, and each request will + have the correct useragent IP, even though the underlying client IP + address of the load balancer remains unchanged.

    -

    When multiple, comma delimited remote IP addresses are listed in the +

    When multiple, comma delimited useragent IP addresses are listed in the header value, they are processed in Right-to-Left order. Processing - halts when a given remote IP address is not trusted to present the - preceeding IP address. The header field is updated to this remaining + halts when a given useragent IP address is not trusted to present the + preceding IP address. The header field is updated to this remaining list of unconfirmed IP addresses, or if all IP addresses were trusted, this header is removed from the request altogether.

    -

    In replacing the remote_ip, the module stores the list of intermediate +

    In overriding the client IP, the module stores the list of intermediate hosts in a remoteip-proxy-ip-list note, which mod_log_config can record using the %{remoteip-proxy-ip-list}n format token. If the administrator needs to store this as an additional header, this same value can also be recording as a header using the directive - RemoteIPProxiesHeader.

    + RemoteIPProxiesHeader.

    IPv4-over-IPv6 Mapped Addresses

    As with httpd in general, any IPv4-over-IPv6 mapped addresses are recorded @@ -111,35 +116,33 @@ balancer via the request headers.

    Internal (Private) Addresses

    All internal addresses 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 blocks (and IPv6 addresses outside of the public 2000::/3 block) are only - evaluated by mod_remoteip when RemoteIPInternalProxy + evaluated by mod_remoteip when RemoteIPInternalProxy internal (intranet) proxies are registered.
    top

    RemoteIPHeader Directive

    - +
    Description:Declare the header field which should be parsed for client IP addresses
    Description:Declare the header field which should be parsed for useragent IP addresses
    Syntax:RemoteIPHeader header-field
    Context:server config, virtual host
    Status:Base
    Module:mod_remoteip
    -

    The RemoteIPHeader directive triggers +

    The RemoteIPHeader directive triggers mod_remoteip to treat the value of the specified - header-field header as the client IP address, or list - of intermediate client IP addresses, subject to further configuration - of the RemoteIPInternalProxy and - RemoteIPTrustedProxy directives. Unless these + header-field header as the useragent IP address, or list + of intermediate useragent IP addresses, subject to further configuration + of the RemoteIPInternalProxy and + RemoteIPTrustedProxy directives. Unless these other directives are used, mod_remoteip will trust all - hosts presenting a RemoteIPHeader IP value.

    + hosts presenting a RemoteIPHeader IP value.

    -

    Internal (Load Balancer) Example

    - RemoteIPHeader X-Client-IP -

    +

    Internal (Load Balancer) Example

    RemoteIPHeader X-Client-IP
    +
    -

    Proxy Example

    - RemoteIPHeader X-Forwarded-For -

    +

    Proxy Example

    RemoteIPHeader X-Forwarded-For
    +
    top
    @@ -151,18 +154,17 @@ balancer via the request headers.
    Status:Base
    Module:mod_remoteip
    -

    The RemoteIPInternalProxy directive adds one +

    The RemoteIPInternalProxy directive adds one or more addresses (or address blocks) to trust as presenting a valid - RemoteIPHeader value of the client IP. Unlike the - RemoteIPTrustedProxy directive, any IP address + RemoteIPHeader value of the useragent IP. Unlike the + RemoteIPTrustedProxy directive, any IP address presented in this header, including private intranet addresses, are trusted when passed from these proxies.

    -

    Internal (Load Balancer) Example

    - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxy 10.0.2.0/24
    - RemoteIPTrustedProxy gateway.localdomain -

    +

    Internal (Load Balancer) Example

    RemoteIPHeader X-Client-IP
    +RemoteIPInternalProxy 10.0.2.0/24
    +RemoteIPInternalProxy gateway.localdomain
    +
    top
    @@ -174,24 +176,21 @@ balancer via the request headers. Status:Base Module:mod_remoteip -

    The RemoteIPInternalProxyList directive specifies +

    The RemoteIPInternalProxyList directive specifies a file parsed at startup, and builds a list of addresses (or address blocks) - to trust as presenting a valid RemoteIPHeader value of the client IP.

    + to trust as presenting a valid RemoteIPHeader value of the useragent IP.

    The '#' hash character designates a comment line, otherwise each whitespace or newline separated entry is processed identically to - the RemoteIPInternalProxy directive.

    + the RemoteIPInternalProxy directive.

    -

    Internal (Load Balancer) Example

    - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxyList conf/trusted-proxies.lst -

    +

    Internal (Load Balancer) Example

    RemoteIPHeader X-Client-IP
    +RemoteIPInternalProxyList conf/trusted-proxies.lst
    +
    -

    conf/trusted-proxies.lst contents

    - # Our internally trusted proxies;
    - 10.0.2.0/24 #Everyone in the testing group
    - gateway.localdomain #The front end balancer -

    +

    conf/trusted-proxies.lst contents

    # Our internally trusted proxies;
    +10.0.2.0/24         #Everyone in the testing group
    +gateway.localdomain #The front end balancer
    top
    @@ -203,17 +202,17 @@ balancer via the request headers. Status:Base Module:mod_remoteip -

    The RemoteIPProxiesHeader directive specifies +

    The RemoteIPProxiesHeader directive specifies a header into which mod_remoteip will collect a list of - all of the intermediate client IP addresses trusted to resolve the actual - remote IP. Note that intermediate RemoteIPTrustedProxy - addresses are recorded in this header, while any intermediate - RemoteIPInternalProxy addresses are discarded.

    + all of the intermediate client IP addresses trusted to resolve the useragent + IP of the request. Note that intermediate + RemoteIPTrustedProxy addresses are recorded in + this header, while any intermediate + RemoteIPInternalProxy addresses are discarded.

    -

    Example

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPProxiesHeader X-Forwarded-By -

    +

    Example

    RemoteIPHeader X-Forwarded-For
    +RemoteIPProxiesHeader X-Forwarded-By
    +
    top
    @@ -225,20 +224,19 @@ balancer via the request headers. Status:Base Module:mod_remoteip -

    The RemoteIPTrustedProxy directive adds one +

    The RemoteIPTrustedProxy directive adds one or more addresses (or address blocks) to trust as presenting a valid - RemoteIPHeader value of the client IP. Unlike the - RemoteIPInternalProxy directive, any intranet + RemoteIPHeader value of the useragent IP. Unlike the + RemoteIPInternalProxy directive, any intranet or private IP address reported by such proxies, including the 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 blocks (or outside of the IPv6 public - 2000::/3 block) are not trusted as the remote IP, and are left in the - RemoteIPHeader header's value.

    + 2000::/3 block) are not trusted as the useragent IP, and are left in the + RemoteIPHeader header's value.

    -

    Trusted (Load Balancer) Example

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxy 10.0.2.16/28
    - RemoteIPTrustedProxy proxy.example.com -

    +

    Trusted (Load Balancer) Example

    RemoteIPHeader X-Forwarded-For
    +RemoteIPTrustedProxy 10.0.2.16/28
    +RemoteIPTrustedProxy proxy.example.com
    +
    top
    @@ -250,18 +248,17 @@ balancer via the request headers. Status:Base Module:mod_remoteip -

    The RemoteIPTrustedProxyList directive specifies +

    The RemoteIPTrustedProxyList directive specifies a file parsed at startup, and builds a list of addresses (or address blocks) - to trust as presenting a valid RemoteIPHeader value of the client IP.

    + to trust as presenting a valid RemoteIPHeader value of the useragent IP.

    The '#' hash character designates a comment line, otherwise - each whitespace or newline seperated entry is processed identically to - the RemoteIPTrustedProxy directive.

    + each whitespace or newline separated entry is processed identically to + the RemoteIPTrustedProxy directive.

    -

    Trusted (Load Balancer) Example

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxyList conf/trusted-proxies.lst -

    +

    Trusted (Load Balancer) Example

    RemoteIPHeader X-Forwarded-For
    +RemoteIPTrustedProxyList conf/trusted-proxies.lst
    +

    conf/trusted-proxies.lst contents

    # Identified external proxies;
    @@ -274,7 +271,28 @@ balancer via the request headers.

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_remoteip.html.fr b/docs/manual/mod/mod_remoteip.html.fr index 6db247fa9e3..a41befd1a17 100644 --- a/docs/manual/mod/mod_remoteip.html.fr +++ b/docs/manual/mod/mod_remoteip.html.fr @@ -1,30 +1,35 @@ - -mod_remoteip - Serveur Apache HTTP +mod_remoteip - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_remoteip

    Langues Disponibles:  en  |  fr 

    -
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_reqtimeout.html.fr b/docs/manual/mod/mod_reqtimeout.html.fr new file mode 100644 index 00000000000..f64b93771d0 --- /dev/null +++ b/docs/manual/mod/mod_reqtimeout.html.fr @@ -0,0 +1,215 @@ + + + + + +mod_reqtimeout - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_reqtimeout

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Remplace l'adresse IP et le nom d'hte apparents du client + @@ -33,26 +38,25 @@ r
    Description:Remplace l'adresse IP du client pour la requte par l'adresse IP prsente par un mandataire ou un rpartiteur de charge via les en-ttes de la requte.
    FichierSource:mod_remoteip.c

    Sommaire

    -

    Ce module permet de traiter l'hte distant qui a initi la - requte en tant qu'hte distant original du point de vue de httpd - des fins d'autorisation et de connexion, mme si cet hte distant se +

    Ce module permet de traiter le client qui a initi la + requte en tant que client original du point de vue de httpd + des fins d'autorisation et de connexion, mme si ce client se trouve derrire un rpartiteur de charge, un serveur frontal, ou un serveur mandataire.

    -

    Le module remplace les adresse IP et nom d'hte apparents - distants (du client) pour la requte par l'adresse IP indique dans +

    Le module remplace l'adresse IP du client + pour la connexion par l'adresse IP indique dans l'en-tte de requte configur via la directive - RemoteIPHeader.

    + RemoteIPHeader.

    -

    Une fois remplace comme indiqu, cette adresse IP apparente est - utilise pour les fonctionnalits <Require host> et <Require ip> de +

    Une fois sa valeur modifie comme indiqu, cette adresse IP client est + utilise pour la fonctionnalit Require ip de mod_authz_host ; elle est aussi affiche par - mod_status, et enregistre via les directives - %a et %h du module - mod_log_config. Elle permet aussi d'identifier la - machine en essayant de lui attribuer une identit inetd via le - module mod_ident et en fonction de la configuration - de la directive IdentityCheck.

    + mod_status, et enregistre via les chanes de formatage + %a des modules mod_log_config et core. + L'adresse IP client sous-jacente de la connexion est enregistre via la chane de + formatage %{c}a. +

    Il est essentiel de n'activer cette fonctionnalit que pour les requtes en provenance des serveurs @@ -60,7 +64,10 @@ r confiance, car il est trivial pour le client distant d'usurper l'identit d'un autre client.
    -
    top

    Traitement des adresses distantes

    -

    Apache identifie le client par la valeur remote_ip de la +

    Par dfaut, Apache identifie le client via la valeur client_ip de la connexion, et de cette valeur dcoulent les valeurs remote_host et remote_logname de la connexion. Ces champs jouent un rle - dans l'authentification, l'autorisation et la connexion, ainsi que + dans l'authentification, l'autorisation et la journalisation, ainsi que dans d'autres traitements effectus par d'autres modules chargeables.

    -

    mod_remoteip remplace la vritable remote_ip par la remote_ip - indique par exemple par un mandataire chaque fois que le serveur - effectue une valuation du client, et rinitialise les valeurs de - remote_host et remote_logname afin de dclencher une nouvelle - requte dns ou ident sur l'adresse IP distante.

    +

    mod_remoteip remplace l'adresse IP client de la connexion par l'adresse IP client + indique par exemple par un mandataire ou un rpartiteur de charge + pour toute la dure de la requte. Un rpartiteur de charge pourra ainsi + tablir une connexion keepalive de longue dure avec le serveur, chaque + requte conservant alors l'adresse IP client correcte bien que l'adresse IP + client sous-jacente du rpartiteur de charge reste inchange.

    Lorsque la valeur de l'en-tte comporte plusieurs adresses IP - distantes spares par des virgules, celles-ci sont traites de la + client spares par des virgules, celles-ci sont traites de la droite vers la gauche. Le traitement s'arrte lorsque l'adresse IP - distante courante n'est pas digne de confiance pour prsenter + client courante n'est pas digne de confiance pour prsenter l'adresse IP prcdente. Le champ d'en-tte est alors mis jour de faon ne contenir que cette liste d'adresses non confirmes, ou bien, si toutes les adresses IP sont dignes de confiance, cet en-tte est tout bonnement supprim de la requte.

    -

    Lors du remplacement de l'adresse IP distante, le module stocke +

    Lors du remplacement de l'adresse IP client, le module stocke la liste des htes intermdiaires dans un mmo remoteip-proxy-ip-list, que l'on peut faire enregistrer par mod_log_config en utilisant le symbole de format %{remoteip-proxy-ip-list}n. Si l'administrateur doit stocker ceci dans un en-tte additionnel, la mme valeur peut aussi tre enregistre sous la forme d'un en-tte en utilisant la - directive RemoteIPProxiesHeader.

    + directive RemoteIPProxiesHeader.

    Adresses IPv4 converties au format IPv6

    Avec httpd, d'une manire gnrale, toute adresse IPv4 convertie au @@ -123,11 +127,11 @@ r 169.254/16 and 127/8 (ainsi que les adresses IPv6 en dehors du bloc public 2000::/3 block) ne sont values par mod_remoteip que lorsque des mandataires internes (intranet) - RemoteIPInternalProxy sont enregistrs.
    + RemoteIPInternalProxy sont enregistrs.
    top
    -

    RemoteIPHeader Directive

    +

    Directive RemoteIPHeader

    @@ -136,29 +140,33 @@ du client
    Description:Dfinit le champ d'en-tte qui contiendra les adresses IP du client
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPHeader indique +

    La directive RemoteIPHeader indique mod_remoteip de traiter la valeur de l'en-tte spcifi comme l'adresse IP du client, ou comme une liste d'adresses IP clients intermdiaires, en fonction de la configuration des directives - RemoteIPInternalProxy et - RemoteIPTrustedProxy. Si ces deux dernires + RemoteIPInternalProxy et + RemoteIPTrustedProxy. Si ces + deux dernires directives ne sont pas utilises, + mod_remoteip traitera tout hte prsentant une adresse non + interne dans l'en-tte RemoteIPHeader comme hte de confiance.

    + +
    Si ces deux dernires directives ne sont pas utilises, mod_remoteip - traitera tout hte prsentant une valeur d'IP - RemoteIPHeader comme hte de confiance.

    + traitera tout hte prsentant une adresse non interne + dans l'en-tte RemoteIPHeader comme hte de + confiance.

    Exemple usage interne (rpartiteur de - charge)

    - RemoteIPHeader X-Client-IP -

    + charge)
    RemoteIPHeader X-Client-IP
    +
    -

    Exemple dans le cas d'un mandataire

    - RemoteIPHeader X-Forwarded-For -

    +

    Exemple dans le cas d'un mandataire

    RemoteIPHeader X-Forwarded-For
    +
    top
    -

    RemoteIPInternalProxy Directive

    +

    Directive RemoteIPInternalProxy

    @@ -168,25 +176,24 @@ confiance pour pr
    Description:Dclare les adresses IP intranet clients comme dignes de confiance pour prsenter la valeur RemoteIPHeader
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPInternalProxy permet +

    La directive RemoteIPInternalProxy permet d'ajouter une ou plusieurs adresses (ou blocs d'adresses) auxquelles on peut faire confiance pour prsenter une valeur RemoteIPHeader valide de l'adresse IP du client. A la diffrence de la directive - RemoteIPTrustedProxy, toute adresse IP + RemoteIPTrustedProxy, toute adresse IP prsente dans cet en-tte, y comprises les adresses intranet prives, sont considres comme dignes de confiance lorsqu'elles sont indiques par ces mandataires.

    Exemple usage interne (rpartiteur de - charge)

    - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxy 10.0.2.0/24
    - RemoteIPTrustedProxy passerelle.domaine-local -

    + charge)
    RemoteIPHeader X-Client-IP
    +RemoteIPInternalProxy 10.0.2.0/24
    +RemoteIPInternalProxy gateway.localdomain
    +
    top
    -

    RemoteIPInternalProxyList Directive

    +

    Directive RemoteIPInternalProxyList

    @@ -195,7 +202,7 @@ confiance pour pr
    Description:Dclare les adresses IP intranet clients comme dignes de confiance pour prsenter la valeur RemoteIPHeader
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPInternalProxyList +

    La directive RemoteIPInternalProxyList permet de spcifier un fichier parcouru au dmarrage du serveur pour construire une liste d'adresses (ou blocs d'adresses), auxquelles on peut faire confiance pour prsenter une valeur RemoteIPHeader @@ -206,23 +213,20 @@ confiance pour pr ligne ou tous les lments d'une ligne spars par un espace sont traits de la mme faon qu'avec la directive - RemoteIPInternalProxy.

    + RemoteIPInternalProxy.

    Exemple usage interne (rpartiteur de - charge)

    - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxyList conf/mandataires-de-confiance.lst -

    + charge)
    RemoteIPHeader X-Client-IP
    +RemoteIPInternalProxyList conf/trusted-proxies.lst
    +
    -

    contenu de conf/mandataires-de-confiance.lst

    - # Nos mandataires internes de confiance
    - 10.0.2.0/24 # Tout le monde dans le groupe de test
    - passerelle.domaine-local # Le frontal rpartiteur de charge -

    +

    contenu de conf/mandataires-de-confiance.lst

             # Nos mandataires internes de confiance
    +         10.0.2.0/24         # Tout le monde dans le groupe de test
    +         passerelle.domaine-local # Le frontal rpartiteur de charge
    top
    -

    RemoteIPProxiesHeader Directive

    +

    Directive RemoteIPProxiesHeader

    @@ -231,25 +235,24 @@ adresses IP interm
    Description:Dclare le champ d'en-tte qui contiendra toutes les adresses IP intermdiaires
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPProxiesHeader permet +

    La directive RemoteIPProxiesHeader permet de spcifier l'en-tte dans lequel mod_remoteip va collecter une liste de toutes les adresses IP clients intermdiaires - auxquelles on pourra faire confiance pour rsoudre la vritable - adresse IP distante. Notez que les adresses intermdiaires - RemoteIPTrustedProxy sont enregistres dans + auxquelles on pourra faire confiance pour rsoudre l'adresse IP + client de la requte. Notez que les adresses intermdiaires + RemoteIPTrustedProxy sont enregistres dans cet en-tte, alors que toute adresse intermdiaire - RemoteIPInternalProxy est omise.

    + RemoteIPInternalProxy est omise.

    -

    Exemple

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPProxiesHeader X-Forwarded-By -

    +

    Exemple

    RemoteIPHeader X-Forwarded-For
    +RemoteIPProxiesHeader X-Forwarded-By
    +
    top
    -

    RemoteIPTrustedProxy Directive

    +

    Directive RemoteIPTrustedProxy

    - @@ -257,28 +260,27 @@ confiance pour pr
    Description:Dclare les adresses IP intranet clients comme dignes de +
    Description:Dclare les adresses IP clientes de l'intranet dignes de confiance pour prsenter la valeur RemoteIPHeader
    Syntaxe:RemoteIPTrustedProxy ip-mandataire|ip-mandataire/sous-rseau|nom-hte ...
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPTrustedProxy permet +

    La directive RemoteIPTrustedProxy permet d'ajouter une ou plusieurs adresses, ou blocs d'adresses, auxquelles on peut faire confiance pour prsenter une valeur RemoteIPHeader valide de l'adresse IP du client. A la diffrence de la directive - RemoteIPInternalProxy, toutes les adresses IP + RemoteIPInternalProxy, toutes les adresses IP intranet ou prives indiques par de tels mandataires, y compris les blocs d'adresses 10/8, 172.16/12, 192.168/16, 169.254/16 et 127/8 (ou situe en dehors du bloc IPv6 public 2000::/3), ne sont pas dignes de confiance en tant qu'adresses IP distantes, et se situent gauche dans le contenu de l'en-tte - RemoteIPHeader.

    + RemoteIPHeader.

    Exemple d'adresse de confiance (rpartiteur de - charge

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxy 10.0.2.16/28
    - RemoteIPTrustedProxy proxy.example.com -

    + charge
    RemoteIPHeader X-Forwarded-For
    +RemoteIPTrustedProxy 10.0.2.16/28
    +RemoteIPTrustedProxy proxy.example.com
    +
    top
    -

    RemoteIPTrustedProxyList Directive

    +

    Directive RemoteIPTrustedProxyList

    @@ -287,7 +289,7 @@ confiance pour pr
    Description:Dclare les adresses IP intranet clients comme dignes de confiance pour prsenter la valeur RemoteIPHeader
    Statut:Base
    Module:mod_remoteip
    -

    La directive RemoteIPTrustedProxyList +

    La directive RemoteIPTrustedProxyList permet de spcifier un fichier parcouru au dmarrage du serveur pour construire une liste d'adresses (ou blocs d'adresses), auxquelles on peut faire confiance pour prsenter une valeur RemoteIPHeader @@ -297,13 +299,12 @@ confiance pour pr sinon, toutes les lignes spares par un caractre nouvelle ligne ou tous les lments d'une ligne spars par un espace sont traits de la mme faon qu'avec la directive - RemoteIPTrustedProxy.

    + RemoteIPTrustedProxy.

    Exemple d'adresse de confiance (rpartiteur de - charge

    - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxyList conf/mandataires-de-confiance.lst -

    + charge
    RemoteIPHeader X-Forwarded-For
    +RemoteIPTrustedProxyList conf/trusted-proxies.lst
    +

    conf/mandataires-de-confiance.lst contents

    # Mandataires externes identifis
    @@ -316,7 +317,28 @@ confiance pour pr

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_remoteip.xml b/docs/manual/mod/mod_remoteip.xml index 695f4b22054..7edf995b005 100644 --- a/docs/manual/mod/mod_remoteip.xml +++ b/docs/manual/mod/mod_remoteip.xml @@ -23,9 +23,9 @@ mod_remoteip -Replaces the apparent client remote IP address and hostname -for the request with the IP address list presented by a proxies or a load -balancer via the request headers. +Replaces the original client IP address for the connection +with the useragent IP address list presented by a proxies or a load balancer +via the request headers. Base @@ -33,61 +33,61 @@ balancer via the request headers. remoteip_module -

    This module is used to treat the remote host which initiated the - request as the originating remote host as identified by httpd for the - purposes of authorization and logging, even where that remote host is +

    This module is used to treat the useragent which initiated the + request as the originating useragent as identified by httpd for the + purposes of authorization and logging, even where that useragent is behind a load balancer, front end server, or proxy server.

    -

    The module replaces the apparent remote (client) IP/hostname for - the request with the IP address reported in the request header - configured with the RemoteIPHeader directive.

    +

    The module overrides the client IP address for the connection + with the useragent IP address reported in the request header configured + with the RemoteIPHeader directive.

    -

    Once replaced as instructed, this apparent IP address is then used - for mod_authz_host features - Require host - and Require ip, - is reported by mod_status, and is recorded by - mod_log_config %a and %h - directives. It also determines the machine probed for an inetd - identity by mod_ident based on the - IdentityCheck configuration.

    +

    Once replaced as instructed, this overridden useragent IP address is + then used for the mod_authz_host + Require ip + feature, is reported by mod_status, and is recorded by + mod_log_config %a and core + %a format strings. The underlying client IP of the connection + is available in the %{c}a format string.

    It is critical to only enable this behavior from - intermediate hosts (proxies, etc) which are trusted by this server, since - it is trivial for the remote client to impersonate another client. + it is trivial for the remote useragent to impersonate another + useragent.
    mod_authz_host mod_status mod_log_config -mod_ident
    Remote IP Processing -

    Apache identifies the client with the connection's remote_ip value, - and the connection remote_host and remote_logname are derived from this - value. These fields play a role in authentication, authorization and - logging and other purposes by other loadable modules.

    +

    Apache by default identifies the useragent with the connection's + client_ip value, and the connection remote_host and remote_logname are + derived from this value. These fields play a role in authentication, + authorization and logging and other purposes by other loadable + modules.

    -

    mod_remoteip replaces the true remote_ip with the advertised remote_ip as - provided by a proxy, for every evaluation of the client that occurs in the - server, and resets the remote_host and remote_logname values to trigger a - fresh dns or ident query of the remote IP address.

    +

    mod_remoteip overrides the client IP of the connection with the + advertised useragent IP as provided by a proxy or load balancer, for + the duration of the request. A load balancer might establish a long + lived keepalive connection with the server, and each request will + have the correct useragent IP, even though the underlying client IP + address of the load balancer remains unchanged.

    -

    When multiple, comma delimited remote IP addresses are listed in the +

    When multiple, comma delimited useragent IP addresses are listed in the header value, they are processed in Right-to-Left order. Processing - halts when a given remote IP address is not trusted to present the - preceeding IP address. The header field is updated to this remaining + halts when a given useragent IP address is not trusted to present the + preceding IP address. The header field is updated to this remaining list of unconfirmed IP addresses, or if all IP addresses were trusted, this header is removed from the request altogether.

    -

    In replacing the remote_ip, the module stores the list of intermediate +

    In overriding the client IP, the module stores the list of intermediate hosts in a remoteip-proxy-ip-list note, which mod_log_config can record using the %{remoteip-proxy-ip-list}n format token. If the administrator needs to store this as an additional header, this same value can also be recording as a header using the directive - RemoteIPProxiesHeader.

    + RemoteIPProxiesHeader.

    IPv4-over-IPv6 Mapped Addresses As with httpd in general, any IPv4-over-IPv6 mapped addresses are recorded @@ -96,33 +96,37 @@ balancer via the request headers. Internal (Private) Addresses All internal addresses 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 blocks (and IPv6 addresses outside of the public 2000::/3 block) are only - evaluated by mod_remoteip when RemoteIPInternalProxy + evaluated by mod_remoteip when RemoteIPInternalProxy internal (intranet) proxies are registered.
    RemoteIPHeader -Declare the header field which should be parsed for client IP addresses +Declare the header field which should be parsed for useragent IP addresses RemoteIPHeader header-field server configvirtual host -

    The RemoteIPHeader directive triggers +

    The RemoteIPHeader directive triggers mod_remoteip to treat the value of the specified - header-field header as the client IP address, or list - of intermediate client IP addresses, subject to further configuration - of the RemoteIPInternalProxy and - RemoteIPTrustedProxy directives. Unless these + header-field header as the useragent IP address, or list + of intermediate useragent IP addresses, subject to further configuration + of the RemoteIPInternalProxy and + RemoteIPTrustedProxy directives. Unless these other directives are used, mod_remoteip will trust all - hosts presenting a RemoteIPHeader IP value.

    + hosts presenting a RemoteIPHeader IP value.

    Internal (Load Balancer) Example + RemoteIPHeader X-Client-IP + Proxy Example + RemoteIPHeader X-Forwarded-For +
    @@ -134,17 +138,19 @@ balancer via the request headers. server configvirtual host -

    The RemoteIPInternalProxy directive adds one +

    The RemoteIPInternalProxy directive adds one or more addresses (or address blocks) to trust as presenting a valid - RemoteIPHeader value of the client IP. Unlike the - RemoteIPTrustedProxy directive, any IP address + RemoteIPHeader value of the useragent IP. Unlike the + RemoteIPTrustedProxy directive, any IP address presented in this header, including private intranet addresses, are trusted when passed from these proxies.

    Internal (Load Balancer) Example - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxy 10.0.2.0/24
    - RemoteIPTrustedProxy gateway.localdomain + +RemoteIPHeader X-Client-IP +RemoteIPInternalProxy 10.0.2.0/24 +RemoteIPInternalProxy gateway.localdomain +
    @@ -156,23 +162,27 @@ balancer via the request headers. server configvirtual host -

    The RemoteIPInternalProxyList directive specifies +

    The RemoteIPInternalProxyList directive specifies a file parsed at startup, and builds a list of addresses (or address blocks) - to trust as presenting a valid RemoteIPHeader value of the client IP.

    + to trust as presenting a valid RemoteIPHeader value of the useragent IP.

    The '#' hash character designates a comment line, otherwise each whitespace or newline separated entry is processed identically to - the RemoteIPInternalProxy directive.

    + the RemoteIPInternalProxy directive.

    Internal (Load Balancer) Example - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxyList conf/trusted-proxies.lst + +RemoteIPHeader X-Client-IP +RemoteIPInternalProxyList conf/trusted-proxies.lst +
    conf/trusted-proxies.lst contents - # Our internally trusted proxies;
    - 10.0.2.0/24 #Everyone in the testing group
    - gateway.localdomain #The front end balancer +
    +# Our internally trusted proxies;
    +10.0.2.0/24         #Everyone in the testing group
    +gateway.localdomain #The front end balancer
    +
    @@ -184,16 +194,19 @@ balancer via the request headers. server configvirtual host -

    The RemoteIPProxiesHeader directive specifies +

    The RemoteIPProxiesHeader directive specifies a header into which mod_remoteip will collect a list of - all of the intermediate client IP addresses trusted to resolve the actual - remote IP. Note that intermediate RemoteIPTrustedProxy - addresses are recorded in this header, while any intermediate - RemoteIPInternalProxy addresses are discarded.

    + all of the intermediate client IP addresses trusted to resolve the useragent + IP of the request. Note that intermediate + RemoteIPTrustedProxy addresses are recorded in + this header, while any intermediate + RemoteIPInternalProxy addresses are discarded.

    Example - RemoteIPHeader X-Forwarded-For
    - RemoteIPProxiesHeader X-Forwarded-By + +RemoteIPHeader X-Forwarded-For +RemoteIPProxiesHeader X-Forwarded-By +
    @@ -205,19 +218,21 @@ balancer via the request headers. server configvirtual host -

    The RemoteIPTrustedProxy directive adds one +

    The RemoteIPTrustedProxy directive adds one or more addresses (or address blocks) to trust as presenting a valid - RemoteIPHeader value of the client IP. Unlike the - RemoteIPInternalProxy directive, any intranet + RemoteIPHeader value of the useragent IP. Unlike the + RemoteIPInternalProxy directive, any intranet or private IP address reported by such proxies, including the 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 blocks (or outside of the IPv6 public - 2000::/3 block) are not trusted as the remote IP, and are left in the - RemoteIPHeader header's value.

    + 2000::/3 block) are not trusted as the useragent IP, and are left in the + RemoteIPHeader header's value.

    Trusted (Load Balancer) Example - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxy 10.0.2.16/28
    - RemoteIPTrustedProxy proxy.example.com + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxy 10.0.2.16/28 +RemoteIPTrustedProxy proxy.example.com +
    @@ -229,17 +244,19 @@ balancer via the request headers. server configvirtual host -

    The RemoteIPTrustedProxyList directive specifies +

    The RemoteIPTrustedProxyList directive specifies a file parsed at startup, and builds a list of addresses (or address blocks) - to trust as presenting a valid RemoteIPHeader value of the client IP.

    + to trust as presenting a valid RemoteIPHeader value of the useragent IP.

    The '#' hash character designates a comment line, otherwise - each whitespace or newline seperated entry is processed identically to - the RemoteIPTrustedProxy directive.

    + each whitespace or newline separated entry is processed identically to + the RemoteIPTrustedProxy directive.

    Trusted (Load Balancer) Example - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxyList conf/trusted-proxies.lst + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxyList conf/trusted-proxies.lst +
    conf/trusted-proxies.lst contents diff --git a/docs/manual/mod/mod_remoteip.xml.fr b/docs/manual/mod/mod_remoteip.xml.fr index 26f6bd34b7e..10f837749c9 100644 --- a/docs/manual/mod/mod_remoteip.xml.fr +++ b/docs/manual/mod/mod_remoteip.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,9 +25,9 @@ mod_remoteip -Remplace l'adresse IP et le nom d'hôte apparents du client -pour la requête par l'adresse IP présentée par un mandataire ou un -répartiteur de charge via les en-têtes de la requête. +Remplace l'adresse IP du client +pour la requête par l'adresse IP présentée par un mandataire ou un +répartiteur de charge via les en-têtes de la requête. Base @@ -35,262 +35,283 @@ répartiteur de charge via les en-têtes de la requête. remoteip_module -

    Ce module permet de traiter l'hôte distant qui a initié la - requête en tant qu'hôte distant original du point de vue de httpd à - des fins d'autorisation et de connexion, même si cet hôte distant se - trouve derrière un répartiteur de charge, un serveur frontal, ou un +

    Ce module permet de traiter le client qui a initié la + requête en tant que client original du point de vue de httpd à + des fins d'autorisation et de connexion, même si ce client se + trouve derrière un répartiteur de charge, un serveur frontal, ou un serveur mandataire.

    -

    Le module remplace les adresse IP et nom d'hôte apparents - distants (du client) pour la requête par l'adresse IP indiquée dans - l'en-tête de requête configuré via la directive - RemoteIPHeader.

    - -

    Une fois remplacée comme indiqué, cette adresse IP apparente est - utilisée pour les fonctionnalités Require host et Require ip de - mod_authz_host ; elle est aussi affichée par - mod_status, et enregistrée via les directives - %a et %h du module - mod_log_config. Elle permet aussi d'identifier la - machine en essayant de lui attribuer une identité inetd via le - module mod_ident et en fonction de la configuration - de la directive IdentityCheck.

    +

    Le module remplace l'adresse IP du client + pour la connexion par l'adresse IP indiquée dans + l'en-tête de requête configuré via la directive + RemoteIPHeader.

    + +

    Une fois sa valeur modifiée comme indiqué, cette adresse IP client est + utilisée pour la fonctionnalité Require ip de + mod_authz_host ; elle est aussi affichée par + mod_status, et enregistrée via les chaînes de formatage + %a des modules mod_log_config et core. + L'adresse IP client sous-jacente de la connexion est enregistrée via la chaîne de + formatage %{c}a. +

    Il est essentiel de n'activer cette - fonctionnalité que pour les requêtes en provenance des serveurs - intermédiaires (mandataires, etc...) auxquels le serveur peut faire + fonctionnalité que pour les requêtes en provenance des serveurs + intermédiaires (mandataires, etc...) auxquels le serveur peut faire confiance, car il est trivial pour le client distant d'usurper - l'identité d'un autre client. + l'identité d'un autre client.
    mod_authz_host mod_status mod_log_config -mod_ident
    Traitement des adresses distantes -

    Apache identifie le client par la valeur remote_ip de la - connexion, et de cette valeur découlent les valeurs remote_host et - remote_logname de la connexion. Ces champs jouent un rôle - dans l'authentification, l'autorisation et la connexion, ainsi que - dans d'autres traitements effectués par d'autres modules +

    Par défaut, Apache identifie le client via la valeur client_ip de la + connexion, et de cette valeur découlent les valeurs remote_host et + remote_logname de la connexion. Ces champs jouent un rôle + dans l'authentification, l'autorisation et la journalisation, ainsi que + dans d'autres traitements effectués par d'autres modules chargeables.

    -

    mod_remoteip remplace la véritable remote_ip par la remote_ip - indiquée par exemple par un mandataire chaque fois que le serveur - effectue une évaluation du client, et réinitialise les valeurs de - remote_host et remote_logname afin de déclencher une nouvelle - requête dns ou ident sur l'adresse IP distante.

    - -

    Lorsque la valeur de l'en-tête comporte plusieurs adresses IP - distantes séparées par des virgules, celles-ci sont traitées de la - droite vers la gauche. Le traitement s'arrête lorsque l'adresse IP - distante courante n'est pas digne de confiance pour présenter - l'adresse IP précédente. Le champ d'en-tête est alors mis à jour de - façon à ne contenir que cette liste d'adresses non confirmées, ou +

    mod_remoteip remplace l'adresse IP client de la connexion par l'adresse IP client + indiquée par exemple par un mandataire ou un répartiteur de charge + pour toute la durée de la requête. Un répartiteur de charge pourra ainsi + établir une connexion keepalive de longue durée avec le serveur, chaque + requête conservant alors l'adresse IP client correcte bien que l'adresse IP + client sous-jacente du répartiteur de charge reste inchangée.

    + +

    Lorsque la valeur de l'en-tête comporte plusieurs adresses IP + client séparées par des virgules, celles-ci sont traitées de la + droite vers la gauche. Le traitement s'arrête lorsque l'adresse IP + client courante n'est pas digne de confiance pour présenter + l'adresse IP précédente. Le champ d'en-tête est alors mis à jour de + façon à ne contenir que cette liste d'adresses non confirmées, ou bien, si toutes les adresses IP sont dignes de confiance, cet - en-tête est tout bonnement supprimé de la requête.

    + en-tête est tout bonnement supprimé de la requête.

    -

    Lors du remplacement de l'adresse IP distante, le module stocke - la liste des hôtes intermédiaires dans un mémo +

    Lors du remplacement de l'adresse IP client, le module stocke + la liste des hôtes intermédiaires dans un mémo remoteip-proxy-ip-list, que l'on peut faire enregistrer par mod_log_config en utilisant le symbole de format %{remoteip-proxy-ip-list}n. Si l'administrateur doit - stocker ceci dans un en-tête additionnel, la même valeur peut aussi - être enregistrée sous la forme d'un en-tête en utilisant la - directive RemoteIPProxiesHeader.

    + stocker ceci dans un en-tête additionnel, la même valeur peut aussi + être enregistrée sous la forme d'un en-tête en utilisant la + directive RemoteIPProxiesHeader.

    Adresses IPv4 converties au format IPv6 - Avec httpd, d'une manière générale, toute adresse IPv4 convertie au - format IPv6 est enregistrée sous sa forme IPv4. + Avec httpd, d'une manière générale, toute adresse IPv4 convertie au + format IPv6 est enregistrée sous sa forme IPv4. - Adresses internes (privées) + Adresses internes (privées) Tous les blocs d'adresses internes 10/8, 172.16/12, 192.168/16, 169.254/16 and 127/8 (ainsi que les adresses IPv6 en dehors du bloc - public 2000::/3 block) ne sont évaluées par mod_remoteip que lorsque + public 2000::/3 block) ne sont évaluées par mod_remoteip que lorsque des mandataires internes (intranet) - RemoteIPInternalProxy sont enregistrés. + RemoteIPInternalProxy sont enregistrés.
    RemoteIPHeader -Définit le champ d'en-tête qui contiendra les adresses IP +Définit le champ d'en-tête qui contiendra les adresses IP du client -RemoteIPHeader en-tête +RemoteIPHeader en-tête server configvirtual host -

    La directive RemoteIPHeader indique à +

    La directive RemoteIPHeader indique à mod_remoteip de traiter la valeur de - l'en-tête spécifié comme l'adresse IP du client, ou comme - une liste d'adresses IP clients intermédiaires, en fonction de la + l'en-tête spécifié comme l'adresse IP du client, ou comme + une liste d'adresses IP clients intermédiaires, en fonction de la configuration des directives - RemoteIPInternalProxy et - RemoteIPTrustedProxy. Si ces deux dernières - directives ne sont pas utilisées, mod_remoteip - traitera tout hôte présentant une valeur d'IP - RemoteIPHeader comme hôte de confiance.

    - - Exemple à usage interne (répartiteur de + <directive module="mod_remoteip">RemoteIPInternalProxy</directive> et + <directive module="mod_remoteip">RemoteIPTrustedProxy</directive>. Si ces + deux dernières directives ne sont pas utilisées, + <module>mod_remoteip</module> traitera tout hôte présentant une adresse non + interne dans l'en-tête <directive + module="mod_remoteip">RemoteIPHeader</directive> comme hôte de confiance.</p> + + <note type="warning">Si ces deux dernières + directives ne sont pas utilisées, <module>mod_remoteip</module> + traitera tout hôte présentant une adresse non interne + dans l'en-tête <directive + module="mod_remoteip">RemoteIPHeader</directive> comme hôte de + confiance.</note> + + <example><title>Exemple à usage interne (répartiteur de charge) + RemoteIPHeader X-Client-IP + Exemple dans le cas d'un mandataire + RemoteIPHeader X-Forwarded-For +
    RemoteIPInternalProxy -Déclare les adresses IP intranet clients comme dignes de -confiance pour présenter la valeur RemoteIPHeader +Déclare les adresses IP intranet clients comme dignes de +confiance pour présenter la valeur RemoteIPHeader RemoteIPInternalProxy -ip-mandataire|ip-mandataire/sous-réseau|nom-hôte ... +ip-mandataire|ip-mandataire/sous-réseau|nom-hôte ... server configvirtual host -

    La directive RemoteIPInternalProxy permet +

    La directive RemoteIPInternalProxy permet d'ajouter une ou plusieurs adresses (ou blocs d'adresses) auxquelles - on peut faire confiance pour présenter une valeur RemoteIPHeader - valide de l'adresse IP du client. A la différence de la directive - RemoteIPTrustedProxy, toute adresse IP - présentée dans cet en-tête, y comprises les adresses intranet - privées, sont considérées comme dignes de confiance lorsqu'elles - sont indiquées par ces mandataires.

    - - Exemple à usage interne (répartiteur de + on peut faire confiance pour présenter une valeur RemoteIPHeader + valide de l'adresse IP du client. A la différence de la directive + <directive module="mod_remoteip">RemoteIPTrustedProxy</directive>, toute adresse IP + présentée dans cet en-tête, y comprises les adresses intranet + privées, sont considérées comme dignes de confiance lorsqu'elles + sont indiquées par ces mandataires.</p> + + <example><title>Exemple à usage interne (répartiteur de charge) - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxy 10.0.2.0/24
    - RemoteIPTrustedProxy passerelle.domaine-local + +RemoteIPHeader X-Client-IP +RemoteIPInternalProxy 10.0.2.0/24 +RemoteIPInternalProxy gateway.localdomain +
    RemoteIPInternalProxyList -Déclare les adresses IP intranet clients comme dignes de -confiance pour présenter la valeur RemoteIPHeader +Déclare les adresses IP intranet clients comme dignes de +confiance pour présenter la valeur RemoteIPHeader RemoteIPInternalProxyList nom-fichier server configvirtual host -

    La directive RemoteIPInternalProxyList - permet de spécifier un fichier parcouru au démarrage du serveur pour +

    La directive RemoteIPInternalProxyList + permet de spécifier un fichier parcouru au démarrage du serveur pour construire une liste d'adresses (ou blocs d'adresses), auxquelles - on peut faire confiance pour présenter une valeur RemoteIPHeader + on peut faire confiance pour présenter une valeur RemoteIPHeader valide de l'adresse IP du client.

    -

    Le caractère '#' indique une ligne de commentaires, - sinon, toutes les lignes séparées par un caractère nouvelle +

    Le caractère '#' indique une ligne de commentaires, + sinon, toutes les lignes séparées par un caractère nouvelle ligne ou - tous les éléments d'une ligne séparés par un espace sont traités de - la même façon qu'avec la directive - RemoteIPInternalProxy.

    + tous les éléments d'une ligne séparés par un espace sont traités de + la même façon qu'avec la directive + RemoteIPInternalProxy.

    - Exemple à usage interne (répartiteur de + <example><title>Exemple à usage interne (répartiteur de charge) - RemoteIPHeader X-Client-IP
    - RemoteIPTrustedProxyList conf/mandataires-de-confiance.lst + +RemoteIPHeader X-Client-IP +RemoteIPInternalProxyList conf/trusted-proxies.lst +
    contenu de conf/mandataires-de-confiance.lst - # Nos mandataires internes de confiance
    - 10.0.2.0/24 # Tout le monde dans le groupe de test
    - passerelle.domaine-local # Le frontal répartiteur de charge +
    +         # Nos mandataires internes de confiance
    +         10.0.2.0/24         # Tout le monde dans le groupe de test
    +         passerelle.domaine-local # Le frontal répartiteur de charge
    +    
    RemoteIPProxiesHeader -Déclare le champ d'en-tête qui contiendra toutes les -adresses IP intermédiaires -RemoteIPProxiesHeader Nom_en-tête +Déclare le champ d'en-tête qui contiendra toutes les +adresses IP intermédiaires +RemoteIPProxiesHeader Nom_en-tête server configvirtual host -

    La directive RemoteIPProxiesHeader permet - de spécifier l'en-tête dans lequel mod_remoteip va - collecter une liste de toutes les adresses IP clients intermédiaires - auxquelles on pourra faire confiance pour résoudre la véritable - adresse IP distante. Notez que les adresses intermédiaires - RemoteIPTrustedProxy sont enregistrées dans - cet en-tête, alors que toute adresse intermédiaire - RemoteIPInternalProxy est omise.

    +

    La directive RemoteIPProxiesHeader permet + de spécifier l'en-tête dans lequel mod_remoteip va + collecter une liste de toutes les adresses IP clients intermédiaires + auxquelles on pourra faire confiance pour résoudre l'adresse IP + client de la requête. Notez que les adresses intermédiaires + RemoteIPTrustedProxy sont enregistrées dans + cet en-tête, alors que toute adresse intermédiaire + RemoteIPInternalProxy est omise.

    Exemple - RemoteIPHeader X-Forwarded-For
    - RemoteIPProxiesHeader X-Forwarded-By + +RemoteIPHeader X-Forwarded-For +RemoteIPProxiesHeader X-Forwarded-By +
    RemoteIPTrustedProxy -Déclare les adresses IP intranet clients comme dignes de -confiance pour présenter la valeur RemoteIPHeader +Déclare les adresses IP clientes de l'intranet dignes de +confiance pour présenter la valeur RemoteIPHeader RemoteIPTrustedProxy -ip-mandataire|ip-mandataire/sous-réseau|nom-hôte ... +ip-mandataire|ip-mandataire/sous-réseau|nom-hôte ... server configvirtual host -

    La directive RemoteIPTrustedProxy permet +

    La directive RemoteIPTrustedProxy permet d'ajouter une ou plusieurs adresses, ou blocs d'adresses, auxquelles - on peut faire confiance pour présenter une valeur RemoteIPHeader - valide de l'adresse IP du client. A la différence de la directive - RemoteIPInternalProxy, toutes les adresses IP - intranet ou privées indiquées par de tels mandataires, y compris les + on peut faire confiance pour présenter une valeur RemoteIPHeader + valide de l'adresse IP du client. A la différence de la directive + RemoteIPInternalProxy, toutes les adresses IP + intranet ou privées indiquées par de tels mandataires, y compris les blocs d'adresses 10/8, 172.16/12, 192.168/16, 169.254/16 et 127/8 - (ou située en dehors du bloc IPv6 public 2000::/3), ne sont pas + (ou située en dehors du bloc IPv6 public 2000::/3), ne sont pas dignes de confiance en tant qu'adresses IP distantes, et se situent - à gauche dans le contenu de l'en-tête - RemoteIPHeader.

    + à gauche dans le contenu de l'en-tête + RemoteIPHeader.

    - Exemple d'adresse de confiance (répartiteur de + <example><title>Exemple d'adresse de confiance (répartiteur de charge - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxy 10.0.2.16/28
    - RemoteIPTrustedProxy proxy.example.com + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxy 10.0.2.16/28 +RemoteIPTrustedProxy proxy.example.com +
    RemoteIPTrustedProxyList -Déclare les adresses IP intranet clients comme dignes de -confiance pour présenter la valeur RemoteIPHeader +Déclare les adresses IP intranet clients comme dignes de +confiance pour présenter la valeur RemoteIPHeader RemoteIPTrustedProxyList nom-fichier server configvirtual host -

    La directive RemoteIPTrustedProxyList - permet de spécifier un fichier parcouru au démarrage du serveur pour +

    La directive RemoteIPTrustedProxyList + permet de spécifier un fichier parcouru au démarrage du serveur pour construire une liste d'adresses (ou blocs d'adresses), auxquelles - on peut faire confiance pour présenter une valeur RemoteIPHeader + on peut faire confiance pour présenter une valeur RemoteIPHeader valide de l'adresse IP du client.

    -

    Le caractère '#' indique une ligne de commentaires, - sinon, toutes les lignes séparées par un caractère nouvelle ligne ou - tous les éléments d'une ligne séparés par un espace sont traités de - la même façon qu'avec la directive - RemoteIPTrustedProxy.

    +

    Le caractère '#' indique une ligne de commentaires, + sinon, toutes les lignes séparées par un caractère nouvelle ligne ou + tous les éléments d'une ligne séparés par un espace sont traités de + la même façon qu'avec la directive + RemoteIPTrustedProxy.

    - Exemple d'adresse de confiance (répartiteur de + <example><title>Exemple d'adresse de confiance (répartiteur de charge - RemoteIPHeader X-Forwarded-For
    - RemoteIPTrustedProxyList conf/mandataires-de-confiance.lst + +RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxyList conf/trusted-proxies.lst +
    conf/mandataires-de-confiance.lst contents - # Mandataires externes identifiés
    + # Mandataires externes identifiés
    192.0.2.16/28 #groupe wap phone de mandataires
    proxy.isp.example.com #un FAI bien connu
    @@ -299,3 +320,4 @@ confiance pour présenter la valeur RemoteIPHeader
    + diff --git a/docs/manual/mod/mod_reqtimeout.html b/docs/manual/mod/mod_reqtimeout.html index 08f5a21fa3c..e44a50bb422 100644 --- a/docs/manual/mod/mod_reqtimeout.html +++ b/docs/manual/mod/mod_reqtimeout.html @@ -3,3 +3,7 @@ URI: mod_reqtimeout.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_reqtimeout.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_reqtimeout.html.en b/docs/manual/mod/mod_reqtimeout.html.en index ca58d77aa11..a69980bfbc0 100644 --- a/docs/manual/mod/mod_reqtimeout.html.en +++ b/docs/manual/mod/mod_reqtimeout.html.en @@ -1,27 +1,33 @@ - -mod_reqtimeout - Apache HTTP Server +mod_reqtimeout - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_reqtimeout

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -30,14 +36,16 @@
    Description:Set timeout and minimum data rate for receiving requests
    SourceFile:mod_reqtimeout.c
    Compatibility:Available in Apache HTTPD 2.2.15 and later
    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Examples

    @@ -47,21 +55,19 @@ Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body: -

    - RequestReadTimeout header=10 body=30 -

    +
    RequestReadTimeout header=10 body=30
    +
  • Allow at least 10 seconds to receive the request body. If the client sends data, increase the timeout by 1 second for every - 1000 bytes received, with no upper limit for the timeout (exept for + 1000 bytes received, with no upper limit for the timeout (except for the limit given indirectly by LimitRequestBody): -

    - RequestReadTimeout body=10,MinRate=1000 -

    +
    RequestReadTimeout body=10,MinRate=1000
    +
  • @@ -70,9 +76,8 @@ 500 bytes received. But do not allow more than 30 seconds for the request including the headers: -

    - RequestReadTimeout header=10-30,MinRate=500 -

    +
    RequestReadTimeout header=10-30,MinRate=500
    +
  • @@ -80,9 +85,8 @@ If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low: -

    - RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 -

    +
    RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
    +
  • @@ -172,8 +176,30 @@ version 2.3.14 and earlier.
    + + + +
    Description:Dfinit le dlai maximum et le taux minimum de transfert des +donnes pour la rception des requtes +
    Statut:Extension
    IdentificateurdeModule:reqtimeout_module
    FichierSource:mod_reqtimeout.c
    Compatibilit:Disponible depuis la version 2.2.15 du serveur HTTP Apache
    +
    + +
    top
    +
    +

    Exemples

    + +
      +
    1. + Accorde 10 secondes pour la rception des en-ttes de la requte + et 30 secondes pour la rception du corps : + +
      RequestTimeout headerinit=10 body=30
      + +
    2. + +
    3. + Accorde au moins 10 secondes pour la rception du corps de + la requte. Si le client envoie des donnes, augmente ce dlai + d'une seconde pour chaque paquet de 1000 octets reus, sans + limite suprieure (sauf si une limite a t + spcifie via la directive LimitRequestBody) : + +
      RequestReadTimeout body=10,MinRate=1000
      + +
    4. + +
    5. + Accorde au moins 10 secondes pour la rception de de la + requte, en-ttes inclus. Si le client envoie des donnes, augmente ce dlai + d'une seconde pour chaque paquet de 500 octets reus, mais + n'alloue que 30 secondes pour la requte, en-ttes inclus : + +
      RequestReadTimeout header=10-30,MinRate=500
      + +
    6. + +
    7. + En gnral, un serveur doit avoir ses dlais d'en-tte et de + corps configurs. Si les serveurs virtuels http et https + utilisent une configuration commune, les dlais ne doivent pas + tre dfinis trop bas : + +
      RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
      + +
    8. + +
    +
    +
    top
    +

    Directive RequestReadTimeout

    + + + + + + + + +
    Description:Dfinit des dlais maximums pour la rception des en-ttes +et corps des requtes en provenance du client. +
    Syntaxe:RequestReadTimeout +[header=dlai[-dlai-maxi][,MinRate=taux-mini] +[body=dlai[-dlai-maxi][,MinRate=taux-mini] +
    Dfaut:header=20-40,MinRate=500 body=20,MinRate=500
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_reqtimeout
    Compatibilit:Disponible depuis la version 2.2.15 du serveur HTTP +Apache ; dsactive par dfaut depuis la version 2.3.14.
    +

    Cette directive permet de dfinir diffrents dlais pour la + rception des en-ttes et corps des requtes en provenance du + client. Si le client ne parvient pas respecter ces dlais, un code + d'erreur 408 REQUEST TIME OUT est envoy.

    + +

    Pour les serveurs virtuels SSL, le dlai concernant les en-ttes + inclut le temps ncessaire la ngociation SSL initiale. Si le + navigateur du client est configur pour demander des listes de + rvocations de certificats, et si le serveur correspondant n'est pas + disponible, le dlai avant lequel le navigateur va abandonner son + attente de CRL au cours de la ngociation SSL initiale peut tre + assez important. Par consquent, les valeurs de dlais d'en-ttes ne + doivent pas tre trop basses pour les serveurs virtuels SSL. Le dlai + concernant le corps inclut le temps ncessaire la rengociation + SSL (si elle est ncessaire).

    + +

    Lorsqu'une directive AcceptFilter est active (ce qui est en + gnral le cas sous Linux et FreeBSD), la socket n'est envoye au + processus du serveur qu'aprs la rception du premier octet (ou de + l'ensemble de la requte si httpready est dfini). Le + dlai configur pour les en-ttes via la directive + RequestReadTimeout n'entre en ligne de compte qu'une fois + la socket reue par le processus du serveur.

    + +

    Il existe deux mthodes pour spcifier le dlai (pour l'en-tte + ou le corps) : +

    + +
      + +
    • Valeur de dlai fixe:
      + +

      type=dlai

      + +

      Le temps en secondes allou pour la lecture des en-ttes ou du + corps de la requte. La valeur 0 signifie aucune limite.

      +
    • + +
    • Dsactivation du module pour un serveur virtuel ::
      + +

      header=0 body=0

      + +

      Avec cet exemple, le module mod_reqtimeout est + compltement dsactiv.

      +
    • + +
    • La valeur du dlai qui est augmente lorsque des donnes + sont reues :
      +

      + type=dlai,MinRate=taux-mini +

      + +

      Identique ce qui prcde, mais chaque fois que des donnes sont + reues, la valeur du dlai est augmente en fonction du taux-mini + spcifi (en octets par seconde).

      +
    • + +
    • La valeur du dlai augmente lorsque des donnes sont + reues, jusqu' une limite suprieure:
      +

      + type=dlai-dlai-maxi,MinRate=taux-mini +

      + +

      Identique ce qui prcde, mais le dlai n'augmentera pas au + del de la borne suprieure du dlai spcifie.

      +
    • + +
    + + + + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_reqtimeout.xml b/docs/manual/mod/mod_reqtimeout.xml index 3707843081e..cb5d5c89b2e 100644 --- a/docs/manual/mod/mod_reqtimeout.xml +++ b/docs/manual/mod/mod_reqtimeout.xml @@ -37,21 +37,21 @@ Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body: - + RequestReadTimeout header=10 body=30 - +
  • Allow at least 10 seconds to receive the request body. If the client sends data, increase the timeout by 1 second for every - 1000 bytes received, with no upper limit for the timeout (exept for + 1000 bytes received, with no upper limit for the timeout (except for the limit given indirectly by LimitRequestBody): - + RequestReadTimeout body=10,MinRate=1000 - +
  • @@ -60,9 +60,9 @@ 500 bytes received. But do not allow more than 30 seconds for the request including the headers: - + RequestReadTimeout header=10-30,MinRate=500 - +
  • @@ -70,9 +70,9 @@ If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low: - + RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 - +
  • diff --git a/docs/manual/mod/mod_reqtimeout.xml.fr b/docs/manual/mod/mod_reqtimeout.xml.fr new file mode 100644 index 00000000000..5d42e16e362 --- /dev/null +++ b/docs/manual/mod/mod_reqtimeout.xml.fr @@ -0,0 +1,179 @@ + + + + + + + + + + + +mod_reqtimeout +Définit le délai maximum et le taux minimum de transfert des +données pour la réception des requêtes + +Extension +mod_reqtimeout.c +reqtimeout_module +Disponible depuis la version 2.2.15 du serveur HTTP Apache + +
    Exemples + +
      +
    1. + Accorde 10 secondes pour la réception des en-têtes de la requête + et 30 secondes pour la réception du corps : + + + RequestTimeout headerinit=10 body=30 + +
    2. + +
    3. + Accorde au moins 10 secondes pour la réception du corps de + la requête. Si le client envoie des données, augmente ce délai + d'une seconde pour chaque paquet de 1000 octets reçus, sans + limite supérieure (sauf si une limite a été + spécifiée via la directive LimitRequestBody) : + + + RequestReadTimeout body=10,MinRate=1000 + +
    4. + +
    5. + Accorde au moins 10 secondes pour la réception de de la + requête, en-têtes inclus. Si le client envoie des données, augmente ce délai + d'une seconde pour chaque paquet de 500 octets reçus, mais + n'alloue que 30 secondes pour la requête, en-têtes inclus : + + + RequestReadTimeout header=10-30,MinRate=500 + +
    6. + +
    7. + En général, un serveur doit avoir ses délais d'en-tête et de + corps configurés. Si les serveurs virtuels http et https + utilisent une configuration commune, les délais ne doivent pas + être définis trop bas : + + + RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 + +
    8. + +
    +
    + + +RequestReadTimeout +Définit des délais maximums pour la réception des en-têtes +et corps des requêtes en provenance du client. + +RequestReadTimeout +[header=délai[-délai-maxi][,MinRate=taux-mini] +[body=délai[-délai-maxi][,MinRate=taux-mini] + +header=20-40,MinRate=500 body=20,MinRate=500 +server configvirtual host + +Disponible depuis la version 2.2.15 du serveur HTTP +Apache ; désactivée par défaut depuis la version 2.3.14. + + +

    Cette directive permet de définir différents délais pour la + réception des en-têtes et corps des requêtes en provenance du + client. Si le client ne parvient pas à respecter ces délais, un code + d'erreur 408 REQUEST TIME OUT est envoyé.

    + +

    Pour les serveurs virtuels SSL, le délai concernant les en-têtes + inclut le temps nécessaire à la négociation SSL initiale. Si le + navigateur du client est configuré pour demander des listes de + révocations de certificats, et si le serveur correspondant n'est pas + disponible, le délai avant lequel le navigateur va abandonner son + attente de CRL au cours de la négociation SSL initiale peut être + assez important. Par conséquent, les valeurs de délais d'en-têtes ne + doivent pas être trop basses pour les serveurs virtuels SSL. Le délai + concernant le corps inclut le temps nécessaire à la renégociation + SSL (si elle est nécessaire).

    + +

    Lorsqu'une directive AcceptFilter est active (ce qui est en + général le cas sous Linux et FreeBSD), la socket n'est envoyée au + processus du serveur qu'après la réception du premier octet (ou de + l'ensemble de la requête si httpready est défini). Le + délai configuré pour les en-têtes via la directive + RequestReadTimeout n'entre en ligne de compte qu'une fois + la socket reçue par le processus du serveur.

    + +

    Il existe deux méthodes pour spécifier le délai (pour l'en-tête + ou le corps) : +

    + +
      + +
    • Valeur de délai fixe:
      + + type=délai + +

      Le temps en secondes alloué pour la lecture des en-têtes ou du + corps de la requête. La valeur 0 signifie aucune limite.

      +
    • + +
    • Désactivation du module pour un serveur virtuel ::
      + + header=0 body=0 + +

      Avec cet exemple, le module mod_reqtimeout est + complètement désactivé.

      +
    • + +
    • La valeur du délai qui est augmentée lorsque des données + sont reçues :
      + + type=délai,MinRate=taux-mini + + +

      Identique à ce qui précède, mais chaque fois que des données sont + reçues, la valeur du délai est augmentée en fonction du taux-mini + spécifié (en octets par seconde).

      +
    • + +
    • La valeur du délai augmente lorsque des données sont + reçues, jusqu'à une limite supérieure:
      + + type=délai-délai-maxi,MinRate=taux-mini + + +

      Identique à ce qui précède, mais le délai n'augmentera pas au + delà de la borne supérieure du délai spécifiée.

      +
    • + +
    + + + + +
    + +
    + +
    diff --git a/docs/manual/mod/mod_reqtimeout.xml.meta b/docs/manual/mod/mod_reqtimeout.xml.meta index ac7d1faf4c0..01ba09f7837 100644 --- a/docs/manual/mod/mod_reqtimeout.xml.meta +++ b/docs/manual/mod/mod_reqtimeout.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_request.html b/docs/manual/mod/mod_request.html index 0340c0eb620..62bdbfddf70 100644 --- a/docs/manual/mod/mod_request.html +++ b/docs/manual/mod/mod_request.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_request.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_request.html.tr.utf8 Content-Language: tr Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_request.html.en b/docs/manual/mod/mod_request.html.en index c43819346eb..6111a5b7d23 100644 --- a/docs/manual/mod/mod_request.html.en +++ b/docs/manual/mod/mod_request.html.en @@ -1,27 +1,33 @@ - -mod_request - Apache HTTP Server +mod_request - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_request

    Available Languages:  en  | + fr  |  tr 

    @@ -34,7 +40,9 @@ - +

    Bugfix checklist

    See also

    +
    top

    KeptBodySize Directive

    @@ -95,8 +103,30 @@ mod_include.

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_request.html.fr b/docs/manual/mod/mod_request.html.fr new file mode 100644 index 00000000000..ca4edb67559 --- /dev/null +++ b/docs/manual/mod/mod_request.html.fr @@ -0,0 +1,138 @@ + + + + + +mod_request - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_request

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    +
    Description:Filters to handle and make available HTTP request bodies
    + + + +
    Description:Filtres permettant de traiter et de mettre disposition +les corps de requtes HTTP
    Statut:Base
    IdentificateurdeModule:request_module
    FichierSource:mod_request.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +
    + + +
    top
    +

    Directive KeptBodySize

    + + + + + + + +
    Description:Conserve le corps de la requte concurrence de la taille +maximale spcifie, pour une utilisation ventuelle par des filtres +comme mod_include.
    Syntaxe:KeptBodySize taille maximale en octets
    Dfaut:KeptBodySize 0
    Contexte:rpertoire
    Statut:Base
    Module:mod_request
    +

    Dans une situation normale, les gestionnaires de requte tels que + le gestionnaire par dfaut des fichiers statiques suppriment le + corps de la requte s'il n'est pas ncessaire au gestionnaire de + requte. Il en rsulte que les filtres comme mod_include sont + limits des requtes GET lors de l'inclusion d'autres + URLs en tant que sous-requtes, et ceci mme si la requte originale + tait une requte POST, car le corps de la requte a + t supprim et n'est donc plus disponible une fois le traitement du + filtre mis en oeuvre.

    + +

    Lorsque l'argument de cette directive a une valeur suprieure + zro, les gestionnaires de requte qui suppriment habituellement les + corps de requte vont alors conserver ces corps de requte, + concurrence de la taille maximale spcifie, pour tre + ventuellement utiliss par des filtres. Dans le cas du filtre + mod_include, une tentative de requte POST pour un + fichier shtml statique se traduira par des sous-requtes + POST, et non par des sous-requtes GET + comme avant.

    + +

    Cette fonctionnalit permet de dcouper des pages web complexes + et des applications web en petits lments individuels, et de + combiner ces lments avec la structure de la page web sous-jacente + en utilisant mod_include. Les lments peuvent se + prsenter sous la forme de programmes CGI, de langages de scripts, + ou d'URLs issues d'un mandataire inverse dans l'espace d'URL d'un + autre serveur en utilisant mod_proxy.

    + +

    Note : Chaque requte dont le corps est ainsi + conserv doit tre enregistre temporairement en mmoire vive + jusqu' la fin du traitement de la requte. Il faut donc s'assurer + que la mmoire RAM du serveur est suffisante pour pouvoir supporter + la charge induite. L'utilisation de cette directive doit tre + limite certaines portions de votre espace d'URL bien prcises qui + le ncessitent, et en spcifiant comme taille maximale une valeur la + plus petite possible, mais tout de mme suffisante pour un corps de + requte.

    + +

    Si la taille de la requte envoye par le client dpasse la taille + maximale autorise par cette directive, le serveur renverra l'erreur + 413 Request Entity Too Large.

    + + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_request.html.tr.utf8 b/docs/manual/mod/mod_request.html.tr.utf8 index 9e37a1cdd8d..615afebd601 100644 --- a/docs/manual/mod/mod_request.html.tr.utf8 +++ b/docs/manual/mod/mod_request.html.tr.utf8 @@ -1,27 +1,33 @@ - -mod_request - Apache HTTP Sunucusu +mod_request - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_request

    Mevcut Diller:  en  | + fr  |  tr 

    @@ -34,7 +40,9 @@ - +

    Bugfix checklist

    Ayrıca bakınız:

    +
    top

    KeptBodySize Yönergesi

    @@ -95,8 +103,30 @@ istek gövdesi iptal edilmek yerine belirtilen azami boyutta tutulur.

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_request.xml.fr b/docs/manual/mod/mod_request.xml.fr new file mode 100644 index 00000000000..ee3d06ccad8 --- /dev/null +++ b/docs/manual/mod/mod_request.xml.fr @@ -0,0 +1,94 @@ + + + + + + + + + + + +mod_request +Filtres permettant de traiter et de mettre à disposition +les corps de requêtes HTTP +Base +mod_request.c +request_module +Disponible depuis la version 2.3 d'Apache + + +KeptBodySize +Conserve le corps de la requête à concurrence de la taille +maximale spécifiée, pour une utilisation éventuelle par des filtres +comme mod_include. +KeptBodySize taille maximale en octets +KeptBodySize 0 +directory + + + +

    Dans une situation normale, les gestionnaires de requête tels que + le gestionnaire par défaut des fichiers statiques suppriment le + corps de la requête s'il n'est pas nécessaire au gestionnaire de + requête. Il en résulte que les filtres comme mod_include sont + limités à des requêtes GET lors de l'inclusion d'autres + URLs en tant que sous-requêtes, et ceci même si la requête originale + était une requête POST, car le corps de la requête a + été supprimé et n'est donc plus disponible une fois le traitement du + filtre mis en oeuvre.

    + +

    Lorsque l'argument de cette directive a une valeur supérieure à + zéro, les gestionnaires de requête qui suppriment habituellement les + corps de requête vont alors conserver ces corps de requête, à + concurrence de la taille maximale spécifiée, pour être + éventuellement utilisés par des filtres. Dans le cas du filtre + mod_include, une tentative de requête POST pour un + fichier shtml statique se traduira par des sous-requêtes + POST, et non par des sous-requêtes GET + comme avant.

    + +

    Cette fonctionnalité permet de découper des pages web complexes + et des applications web en petits éléments individuels, et de + combiner ces éléments avec la structure de la page web sous-jacente + en utilisant mod_include. Les éléments peuvent se + présenter sous la forme de programmes CGI, de langages de scripts, + ou d'URLs issues d'un mandataire inverse dans l'espace d'URL d'un + autre serveur en utilisant mod_proxy.

    + +

    Note : Chaque requête dont le corps est ainsi + conservé doit être enregistrée temporairement en mémoire vive + jusqu'à la fin du traitement de la requête. Il faut donc s'assurer + que la mémoire RAM du serveur est suffisante pour pouvoir supporter + la charge induite. L'utilisation de cette directive doit être + limitée à certaines portions de votre espace d'URL bien précises qui + le nécessitent, et en spécifiant comme taille maximale une valeur la + plus petite possible, mais tout de même suffisante pour un corps de + requête.

    + +

    Si la taille de la requête envoyée par le client dépasse la taille + maximale autorisée par cette directive, le serveur renverra l'erreur + 413 Request Entity Too Large.

    + +
    + +la documentation de mod_include +la documentation de mod_auth_form +
    + +
    diff --git a/docs/manual/mod/mod_request.xml.meta b/docs/manual/mod/mod_request.xml.meta index 0b2b8c4ac7f..61e71b948c9 100644 --- a/docs/manual/mod/mod_request.xml.meta +++ b/docs/manual/mod/mod_request.xml.meta @@ -8,6 +8,7 @@ en + fr tr diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index 6723e9740cf..6158586af7f 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -1,23 +1,28 @@ - -mod_rewrite - Apache HTTP Server +mod_rewrite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_rewrite

    @@ -32,7 +37,7 @@ URLs on the fly

    Summary

    The mod_rewrite module uses a rule-based rewriting - engine, based on a regular-expression parser, to rewrite requested URLs on + engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

    @@ -51,7 +56,10 @@ URLs on the fly

    Further details, discussion, and examples, are provided in the detailed mod_rewrite documentation.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Logging

    @@ -81,9 +88,8 @@ URLs on the fly level higher than trace2 only for debugging!
    -

    Example

    - LogLevel alert rewrite:trace3 -

    +

    Example

    LogLevel alert rewrite:trace3
    +

    RewriteLog

    Those familiar with earlier versions of @@ -112,38 +118,42 @@ URLs on the fly

    Açıklama:HTTP istek gövdelerini işleme sokup kullanılabilir kılan süzgeçler
    Status:Extension
    Module:mod_rewrite
    -

    The RewriteBase directive explicitly - sets the base URL-path (not filesystem directory path!) for per-directory rewrites - that result in the substitution of a relative path. - When you use a RewriteRule - in a .htaccess file, mod_rewrite strips off - the local directory prefix before processing, then rewrites the rest of - the URL. When the rewrite is completed, mod_rewrite - automatically adds the local directory prefix (or the - RewriteBase when set) back on to the substitution - before handing it back to the core of the server as if it were the original - URL.

    - -

    This directive is required for per-directory rewrites whose context - is a directory made available via the Alias - directive, when the substitution uses a relative path.

    - -

    If your URL path does not exist verbatim on the filesystem, - or isn't directly under your DocumentRoot, - you must use RewriteBase in every - .htaccess file where you want to use RewriteRule directives.

    - -

    The example below demonstrates how to map - http://example.com/myapp/index.html to - /home/www/example/newsite.html, in a .htaccess file. This - assumes that the content available at - http://example.com/ is on disk at /home/www/example/

    -
    -RewriteEngine On
    -# The URL-path used to get to this context, not the filesystem path
    -RewriteBase /myapp/
    -RewriteRule ^index\.html$  newsite.html
    -
    +

    The RewriteBase directive specifies the + URL prefix to be used for per-directory (htaccess) + RewriteRule directives that + substitute a relative path.

    +

    This directive is required when you use a relative path + in a substitution in per-directory (htaccess) context unless any + of the following conditions are true:

    +
      +
    • The original request, and the substitution, are underneath the + DocumentRoot + (as opposed to reachable by other means, such as + Alias).
    • +
    • The filesystem path to the directory containing the + RewriteRule, + suffixed by the relative + substitution is also valid as a URL path on the server + (this is rare).
    • +
    • In Apache HTTP Server 2.4.16 and later, this directive may be + omitted when the request is mapped via + Alias + or mod_userdir.
    • +
    + +

    In the example below, RewriteBase is necessary + to avoid rewriting to http://example.com/opt/myapp-1.2.3/welcome.html + since the resource was not relative to the document root. This + misconfiguration would normally cause the server to look for an "opt" + directory under the document root.

    +
    DocumentRoot "/var/www/example.com"
    +AliasMatch "^/myapp" "/opt/myapp-1.2.3"
    +<Directory "/opt/myapp-1.2.3">
    +    RewriteEngine On
    +    RewriteBase "/myapp/"
    +    RewriteRule "^index\.html$"  "welcome.html"
    +</Directory>
    +
    @@ -153,7 +163,7 @@ RewriteRule ^index\.html$ newsite.html Description:Defines a condition under which rewriting will take place Syntax: RewriteCond - TestString CondPattern + TestString CondPattern [flags]
    Context:server config, virtual host, directory, .htaccess Override:FileInfo Status:Extension @@ -209,26 +219,30 @@ RewriteRule ^index\.html$ newsite.html - HTTP_USER_AGENT
    - HTTP_REFERER
    + HTTP_ACCEPT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    - HTTP_ACCEPT
    + HTTP_REFERER
    + HTTP_USER_AGENT
    + AUTH_TYPE
    + CONN_REMOTE_ADDR
    + CONTEXT_PREFIX
    + CONTEXT_DOCUMENT_ROOT
    + IPV6
    + PATH_INFO
    + QUERY_STRING
    REMOTE_ADDR
    REMOTE_HOST
    + REMOTE_IDENT
    REMOTE_PORT
    REMOTE_USER
    - REMOTE_IDENT
    REQUEST_METHOD
    SCRIPT_FILENAME
    - PATH_INFO
    - QUERY_STRING
    - AUTH_TYPE
    @@ -241,9 +255,11 @@ RewriteRule ^index\.html$ newsite.html DOCUMENT_ROOT
    + SCRIPT_GROUP
    + SCRIPT_USER
    + SERVER_ADDR
    SERVER_ADMIN
    SERVER_NAME
    - SERVER_ADDR
    SERVER_PORT
    SERVER_PROTOCOL
    SERVER_SOFTWARE
    @@ -262,12 +278,14 @@ RewriteRule ^index\.html$ newsite.html API_VERSION
    - THE_REQUEST
    - REQUEST_URI
    - REQUEST_FILENAME
    - IS_SUBREQ
    + CONN_REMOTE_ADDR
    HTTPS
    + IS_SUBREQ
    + REMOTE_ADDR
    + REQUEST_FILENAME
    REQUEST_SCHEME
    + REQUEST_URI
    + THE_REQUEST
    @@ -276,8 +294,8 @@ RewriteRule ^index\.html$ newsite.html correspond to the similarly named HTTP MIME-headers, C variables of the Apache HTTP Server or struct tm fields of the Unix system. - Most are documented elsewhere in the Manual or in - the CGI specification.

    + Most are documented here + or elsewhere in the Manual or in the CGI specification.

    SERVER_NAME and SERVER_PORT depend on the values of UseCanonicalName and @@ -285,16 +303,7 @@ RewriteRule ^index\.html$ newsite.html respectively.

    Those that are special to mod_rewrite include those below.

    -
    -
    IS_SUBREQ
    - -
    Will contain the text "true" if the request - currently being processed is a sub-request, - "false" otherwise. Sub-requests may be generated - by modules that need to resolve additional files - or URIs in order to complete their tasks.
    -
    API_VERSION
    This is the version of the Apache httpd module API @@ -306,21 +315,30 @@ RewriteRule ^index\.html$ newsite.html instance, it is 19990320:10), but is mainly of interest to module authors.
    -
    THE_REQUEST
    +
    CONN_REMOTE_ADDR
    -
    The full HTTP request line sent by the - browser to the server (e.g., "GET - /index.html HTTP/1.1"). This does not - include any additional headers sent by the - browser. This value has not been unescaped - (decoded), unlike most other variables below.
    +
    Since 2.4.8: The peer IP address of the connection (see the + mod_remoteip module).
    -
    REQUEST_URI
    +
    HTTPS
    -
    The path component of the requested URI, - such as "/index.html". This notably excludes the - query string which is available as as its own variable - named QUERY_STRING.
    +
    Will contain the text "on" if the connection is + using SSL/TLS, or "off" otherwise. (This variable + can be safely used regardless of whether or not + mod_ssl is loaded).
    + +
    IS_SUBREQ
    + +
    Will contain the text "true" if the request + currently being processed is a sub-request, + "false" otherwise. Sub-requests may be generated + by modules that need to resolve additional files + or URIs in order to complete their tasks.
    + +
    REMOTE_ADDR
    + +
    The IP address of the remote host (see the + mod_remoteip module).
    REQUEST_FILENAME
    @@ -329,29 +347,43 @@ RewriteRule ^index\.html$ newsite.html been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same - value as REQUEST_URI. - -
    HTTPS
    - -
    Will contain the text "on" if the connection is - using SSL/TLS, or "off" otherwise. (This variable - can be safely used regardless of whether or not - mod_ssl is loaded).
    + value as REQUEST_URI. Depending on the value of + AcceptPathInfo, the + server may have only used some leading components of the + REQUEST_URI to map the request to a file. +
    REQUEST_SCHEME
    -
    Will contain the scheme of the request (ususally +
    Will contain the scheme of the request (usually "http" or "https"). This value can be influenced with ServerName.
    +
    REQUEST_URI
    + +
    The path component of the requested URI, + such as "/index.html". This notably excludes the + query string which is available as its own variable + named QUERY_STRING.
    + +
    THE_REQUEST
    + +
    The full HTTP request line sent by the + browser to the server (e.g., "GET + /index.html HTTP/1.1"). This does not + include any additional headers sent by the + browser. This value has not been unescaped + (decoded), unlike most other variables below.
    +
    -
    -

    If the TestString has the special value expr, the - CondPattern will be treated as a - ap_expr.

    +

    If the TestString has the special value expr, + the CondPattern will be treated as an + ap_expr. HTTP headers referenced in the + expression will be added to the Vary header if the novary + flag is not given.

    Other things you should be aware of:

    @@ -391,7 +423,9 @@ RewriteRule ^index\.html$ newsite.html mod_ssl is loaded, but will always expand to the empty string if it is not. Example: %{SSL:SSL_CIPHER_USEKEYSIZE} may expand to - 128. + 128. These variables are available even without + setting the StdEnvVars option of the + SSLOptions directive.
  • %{HTTP:header}, where header can be @@ -401,7 +435,7 @@ RewriteRule ^index\.html$ newsite.html the value of the HTTP header ``Proxy-Connection:''.

    If a HTTP header is used in a condition this header is added to - the Vary header of the response in case the condition evaluates to + the Vary header of the response in case the condition evaluates to true for the request. It is not added if the condition evaluates to false for the request. Adding the HTTP header to the Vary header of the response is needed for proper caching.

    @@ -410,7 +444,8 @@ RewriteRule ^index\.html$ newsite.html so that certain conditions might not be evaluated at all.

  • - %{LA-U:variable} can be used for look-aheads which perform + %{LA-U:variable} + can be used for look-aheads which perform an internal (URL-based) sub-request to determine the final value of variable. This can be used to access variable for rewriting which is not available at the current @@ -448,167 +483,197 @@ RewriteRule ^index\.html$ newsite.html
    1. You can prefix the pattern string with a - '!' character (exclamation mark) to specify a - non-matching pattern.
    2. + '!' character (exclamation mark) to negate the result + of the condition, no matter what kind of CondPattern is used. +
    3. You can perform lexicographical string comparisons: -
        -
      • '<CondPattern' (lexicographically - precedes)
        +
        +
        <CondPattern
        +
        Lexicographically precedes
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes - CondPattern.
      • + CondPattern. -
      • '>CondPattern' (lexicographically - follows)
        +
        >CondPattern
        +
        Lexicographically follows
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows - CondPattern.
      • + CondPattern. -
      • '=CondPattern' (lexicographically - equal)
        +
        =CondPattern
        +
        Lexicographically equal
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString is lexicographically equal to CondPattern (the two strings are exactly equal, character for character). If CondPattern is "" (two quotation marks) this - compares TestString to the empty string.
      • + compares TestString to the empty string. -
      • '<=CondPattern' (lexicographically - less than or equal to)
        +
        <=CondPattern
        +
        Lexicographically less than or equal to
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes CondPattern, or is equal to CondPattern - (the two strings are equal, character for character).
      • + (the two strings are equal, character for character). -
      • '>=CondPattern' (lexicographically - greater than or equal to)
        +
        >=CondPattern
        +
        Lexicographically greater than or equal to
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows CondPattern, or is equal to CondPattern - (the two strings are equal, character for character).
      • -
    4. + (the two strings are equal, character for character). + +
    5. You can perform integer comparisons: -
        +
        -
      • '-eq' (is numerically - equal to)
        +
        -eq
        +
        Is numerically equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if - the two are numerically equal.
      • + the two are numerically equal. -
      • '-ge' (is numerically - greater than or equal to)
        +
        -ge
        +
        Is numerically greater than or equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically greater than or equal - to the CondPattern.
      • + to the CondPattern. -
      • '-gt' (is numerically - greater than)
        +
        -gt
        +
        Is numerically greater than
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically greater than - the CondPattern.
      • + the CondPattern. -
      • '-le' (is numerically - less than or equal to)
        +
        -le
        +
        Is numerically less than or equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically less than or equal to the CondPattern. Avoid confusion with the -l by using the -L or - -h variant.
      • + -h variant. -
      • '-lt' (is numerically - less than)
        +
        -lt
        +
        Is numerically less than
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically less than the CondPattern. Avoid confusion with the -l by using the -L or - -h variant.
      • + -h variant. + +
        -ne
        +
        Is numerically not equal to
        + The TestString is treated as an integer, and is + numerically compared to the CondPattern. True if + the two are numerically different. This is equivalent to + !-eq.
        -
      +
    6. You can perform various file attribute tests: -
        -
      • '-d' (is - directory)
        + + +
        + +
        -d
        + +
        Is directory.
        Treats the TestString as a pathname and tests - whether or not it exists, and is a directory.
      • + whether or not it exists, and is a directory. + + +
        -f
        + +
        Is regular file.
        -
      • '-f' (is regular - file)
        Treats the TestString as a pathname and tests - whether or not it exists, and is a regular file.
      • + whether or not it exists, and is a regular file. +
        + +
        -F
        -
      • '-F' (is existing file, via - subrequest)
        +
        Is existing file, via subrequest.
        Checks whether or not TestString is a valid file, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - - it can impact your server's performance!
      • + it can impact your server's performance! + -
      • '-H' (is symbolic link, bash convention)
        - See -l.
      • +
        -h
        +
        Is symbolic link, bash convention.
        + See -l. +
        -
      • '-l' (is symbolic - link)
        +
        -l
        + +
        Is symbolic link.
        Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link. May also use the bash convention of -L or -h if there's a possibility of confusion such as when using the -lt or - -le tests.
      • + -le tests. + -
      • '-L' (is symbolic link, bash convention)
        - See -l.
      • +
        -L
        +
        Is symbolic link, bash convention.
        + See -l.
        -
      • '-s' (is regular file, with - size)
        +
        -s
        +
        Is regular file, with size.
        Treats the TestString as a pathname and tests whether or not it exists, and is a regular file with size greater - than zero.
      • + than zero. -
      • '-U' (is existing URL, via - subrequest)
        +
        -U
        +

        Is existing URL, via subrequest.
        Checks whether or not TestString is a valid URL, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - - it can impact your server's performance!

      • - -
      • '-x' (has executable - permissions)
        + it can impact your server's performance!

        +

        This flag only returns information about things + like access control, authentication, and authorization. This flag + does not return information about the status code the + configured handler (static file, CGI, proxy, etc.) would have + returned.

        + +
        -x
        +
        Has executable permissions.
        Treats the TestString as a pathname and tests whether or not it exists, and has executable permissions. These permissions are determined according to - the underlying OS.
      • + the underlying OS. + + + + For example: + +
        RewriteCond /var/www/%{REQUEST_URI} !-f
        +RewriteRule ^(.+) /other/archive/$1 [R]
        -
      -

      Note:

      - All of these tests can - also be prefixed by an exclamation mark ('!') to - negate their meaning. -
    7. -
    8. +
    9. If the TestString has the special value expr, the - CondPattern will be treated as a + CondPattern will be treated as an ap_expr.

      @@ -617,19 +682,18 @@ RewriteRule ^index\.html$ newsite.html to block unwanted hotlinking.

      -

      - RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
      - RewriteRule ^/images - [F] -

      +
      RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
      +RewriteRule "^/images" "-" [F]
      +
    10. +
    -
  • You can also set special flags for - CondPattern by appending +

    You can also set special flags for CondPattern by appending [flags] as the third argument to the RewriteCond directive, where flags is a comma-separated list of any of the - following flags: - + following flags:

    +
    • 'nocase|NC' (no case)
      @@ -646,12 +710,11 @@ RewriteRule ^index\.html$ newsite.html Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: -
      -RewriteCond %{REMOTE_HOST}  ^host1  [OR]
      -RewriteCond %{REMOTE_HOST}  ^host2  [OR]
      -RewriteCond %{REMOTE_HOST}  ^host3
      -RewriteRule ...some special stuff for any of these hosts...
      -
      +
      RewriteCond "%{REMOTE_HOST}"  "^host1"  [OR]
      +RewriteCond "%{REMOTE_HOST}"  "^host2"  [OR]
      +RewriteCond "%{REMOTE_HOST}"  "^host3"
      +RewriteRule ...some special stuff for any of these hosts...
      + Without this flag you would have to write the condition/rule pair three times. @@ -667,8 +730,6 @@ RewriteRule ...some special stuff for any of these hosts... is well understood.
    -
  • -

    Example:

    @@ -676,26 +737,17 @@ RewriteRule ...some special stuff for any of these hosts... ``User-Agent:'' header of the request, you can use the following:

    -
    -RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
    -RewriteRule  ^/$                 /homepage.max.html  [L]
    +
    RewriteCond  "%{HTTP_USER_AGENT}"  "(iPhone|Blackberry|Android)"
    +RewriteRule  "^/$"                 "/homepage.mobile.html"  [L]
     
    -RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
    -RewriteRule  ^/$                 /homepage.min.html  [L]
    +RewriteRule  "^/$"                 "/homepage.std.html"     [L]
    -RewriteRule ^/$ /homepage.std.html [L] -

    Explanation: If you use a browser which identifies itself - as 'Mozilla' (including Netscape Navigator, Mozilla etc), then you - get the max homepage (which could include frames, or other special - features). - If you use the Lynx browser (which is terminal-based), then - you get the min homepage (which could be a version designed for - easy, text-only browsing). - If neither of these conditions apply (you use any other browser, - or your browser identifies itself as something non-standard), you get - the std (standard) homepage.

    + as a mobile browser (note that the example is incomplete, as + there are many other mobile platforms), the mobile version of + the homepage is served. Otherwise, the standard page is served. +

    @@ -717,17 +769,18 @@ RewriteRule ^/$ /homepage.std.html [L] all. It does not even update the SCRIPT_URx environment variables.

    -

    Use this directive to disable the module instead of - commenting out all the RewriteRule directives!

    +

    Use this directive to disable rules in a particular context, + rather than commenting out all the RewriteRule directives.

    Note that rewrite configurations are not inherited by virtual hosts. This means that you need to have a RewriteEngine on directive for each virtual host in which you wish to use rewrite rules.

    -

    RewriteMap directives of the type prg +

    RewriteMap directives + of the type prg are not started during server initialization if they're defined in a - context that does not have RewriteEngine set to + context that does not have RewriteEngine set to on

    @@ -740,8 +793,6 @@ RewriteRule ^/$ /homepage.std.html [L] Context:server config, virtual host Status:Extension Module:mod_rewrite -Compatibility:The choice of different dbm types is available in -Apache HTTP Server 2.0.41 and later

    The RewriteMap directive defines a Rewriting Map which can be used inside rule @@ -774,16 +825,14 @@ Apache HTTP Server 2.0.41 and later

    For example, you might define a RewriteMap as:

    -

    - RewriteMap examplemap txt:/path/to/file/map.txt -

    +
    RewriteMap examplemap "txt:/path/to/file/map.txt"
    +

    You would then be able to use this map in a RewriteRule as follows:

    -

    - RewriteRule ^/ex/(.*) ${examplemap:$1} -

    +
    RewriteRule "^/ex/(.*)" "${examplemap:$1}"
    +

    The following combinations for MapType and MapSource can be used:

    @@ -830,8 +879,6 @@ Apache HTTP Server 2.0.41 and later Override:FileInfo Status:Extension Module:mod_rewrite -Compatibility:MaxRedirects is no longer available in version 2.1 and -later

    The RewriteOptions directive sets some @@ -867,12 +914,106 @@ later

    InheritBefore

    Like Inherit above, but the rules from the parent scope - are applied before rules specified in the child scope. + are applied before rules specified in the child scope.
    Available in Apache HTTP Server 2.3.10 and later.

    - +
    InheritDown
    +
    + +

    If this option is enabled, all child configurations will inherit + the configuration of the current configuration. It is equivalent to + specifying RewriteOptions Inherit in all child + configurations. See the Inherit option for more details + on how the parent-child relationships are handled.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    InheritDownBefore
    +
    + +

    Like InheritDown above, but the rules from the current + scope are applied before rules specified in any child's + scope.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    IgnoreInherit
    +
    + +

    This option forces the current and child configurations to ignore + all rules that would be inherited from a parent specifying + InheritDown or InheritDownBefore.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    AllowNoSlash
    +
    +

    By default, mod_rewrite will ignore URLs that map to a + directory on disk but lack a trailing slash, in the expectation that + the mod_dir module will issue the client with a redirect to + the canonical URL with a trailing slash.

    + +

    When the DirectorySlash directive + is set to off, the AllowNoSlash option can be enabled to ensure + that rewrite rules are no longer ignored. This option makes it possible to + apply rewrite rules within .htaccess files that match the directory without + a trailing slash, if so desired.
    + Available in Apache HTTP Server 2.4.0 and later.

    +
    + +
    AllowAnyURI
    +
    + +

    When RewriteRule + is used in VirtualHost or server context with + version 2.2.22 or later of httpd, mod_rewrite + will only process the rewrite rules if the request URI is a URL-path. This avoids + some security issues where particular rules could allow + "surprising" pattern expansions (see CVE-2011-3368 + and CVE-2011-4317). + To lift the restriction on matching a URL-path, the + AllowAnyURI option can be enabled, and + mod_rewrite will apply the rule set to any + request URI string, regardless of whether that string matches + the URL-path grammar required by the HTTP specification.
    + Available in Apache HTTP Server 2.4.3 and later.

    + +
    +

    Security Warning

    + +

    Enabling this option will make the server vulnerable to + security issues if used with rewrite rules which are not + carefully authored. It is strongly recommended + that this option is not used. In particular, beware of input + strings containing the '@' character which could + change the interpretation of the transformed URI, as per the + above CVE names.

    +
    +
    + +
    MergeBase
    +
    + +

    With this option, the value of RewriteBase is copied from where it's explicitly defined + into any sub-directory or sub-location that doesn't define its own + RewriteBase. This was the + default behavior in 2.4.0 through 2.4.3, and the flag to restore it is + available Apache HTTP Server 2.4.4 and later.

    +
    + +
    IgnoreContextInfo
    +
    + +

    When a relative substitution is made + in directory (htaccess) context and RewriteBase has not been set, this module uses some + extended URL and filesystem context information to change the + relative substitution back into a URL. Modules such as + mod_userdir and mod_alias + supply this extended context info. Available in 2.4.16 and later.

    +
    +
    top
    @@ -894,27 +1035,40 @@ later

    Pattern is a perl compatible regular - expression. On the first RewriteRule it is applied to the (%-decoded) - URL-path of the request; - subsequent patterns are applied to the output of the last matched - RewriteRule.

    + expression. What this pattern is compared against varies depending + on where the RewriteRule directive is defined.

    What is matched?

    -

    In VirtualHost context, - The Pattern will initially be matched against the part of the - URL after the hostname and port, and before the query string (e.g. "/app1/index.html").

    -

    In Directory and htaccess context, - the Pattern will initially be matched against the - filesystem path, after removing the prefix that lead the server - to the current RewriteRule (e.g. "app1/index.html" - or "index.html" depending on where the directives are defined).

    +
      +
    • In VirtualHost context, + The Pattern will initially be matched against the part of the + URL after the hostname and port, and before the query string (e.g. "/app1/index.html"). + This is the (%-decoded) URL-path.

    • + +
    • In per-directory context (Directory and .htaccess), + the Pattern is matched against only a partial path, for example a request + of "/app1/index.html" may result in comparison against "app1/index.html" + or "index.html" depending on where the RewriteRule is + defined.

      + +

      The directory path where the rule is defined is stripped from the currently mapped + filesystem path before comparison (up to and including a trailing slash). + The net result of this per-directory prefix stripping is that rules in + this context only match against the portion of the currently mapped filesystem path + "below" where the rule is defined.

      + +

      Directives such as DocumentRoot and Alias, or even the + result of previous RewriteRule substitutions, determine + the currently mapped filesystem path. +

      +
    • -

      If you wish to match against the hostname, port, or query string, use a +

    • If you wish to match against the hostname, port, or query string, use a RewriteCond with the %{HTTP_HOST}, %{SERVER_PORT}, or - %{QUERY_STRING} variables respectively.

      - + %{QUERY_STRING} variables respectively.

    • +

    Per-directory Rewrites

    @@ -929,25 +1083,22 @@ administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewrite engine. This restriction is required for security reasons. -
  • When using the rewrite engine in .htaccess files the -per-directory prefix (which always is the same for a specific -directory) is automatically removed for the RewriteRule pattern matching -and automatically added after any relative (not starting with a -slash or protocol name) substitution encounters the end of a rule set. -See the RewriteBase +
  • See the RewriteBase directive for more information regarding what prefix will be added back to -relative substitions.
  • +relative substitutions.
  • If you wish to match against the full URL-path in a per-directory (htaccess) RewriteRule, use the %{REQUEST_URI} variable in -a RewriteCond.
  • +a RewriteCond.
  • The removed prefix always ends with a slash, meaning the matching occurs against a string which never has a leading slash. Therefore, a Pattern with ^/ never matches in per-directory context.
  • -
  • Although rewrite rules are syntactically permitted in <Location> and <Files> sections, this -should never be necessary and is unsupported.
  • +
  • Although rewrite rules are syntactically permitted in <Location> and <Files> sections +(including their regular expression counterparts), this +should never be necessary and is unsupported. A likely feature +to break in these contexts is relative substitutions.
  • @@ -982,7 +1133,10 @@ cannot use $N in the substitution string!
    file-system path
    Designates the location on the file-system of the resource - to be delivered to the client.
    + to be delivered to the client. Substitutions are only + treated as a file-system path when the rule is configured in + server (virtualhost) context and the first component of the + path in the substitution exists in the file-system
    URL-path
    @@ -994,7 +1148,9 @@ cannot use $N in the substitution string! you specify a Substitution string of /www/file.html, then this will be treated as a URL-path unless a directory named www - exists at the root or your file-system, in which case it will + exists at the root or your file-system (or, in the case of + using rewrites in a .htaccess file, relative to + your document root), in which case it will be treated as a file-system path. If you wish other URL-mapping directives (such as Alias) to be applied to the resulting URL-path, use the [PT] flag as @@ -1019,7 +1175,7 @@ cannot use $N in the substitution string! -

    In addition to plain text, the Substition string can include

    +

    In addition to plain text, the Substitution string can include

    1. back-references ($N) to the RewriteRule @@ -1040,14 +1196,16 @@ cannot use $N in the substitution string! (N=0..9), which will be replaced by the contents of the Nth group of the matched Pattern. The server-variables are the same - as for the TestString of a RewriteCond + as for the TestString of a + RewriteCond directive. The mapping-functions come from the - RewriteMap directive and are explained there. + RewriteMap + directive and are explained there. These three types of variables are expanded in the order above.

      Rewrite rules are applied to the results of previous rewrite rules, in the order in which they are defined - in the config file. The URI or file path (see "What is matched?", above) is completely + in the config file. The URL-path or file-system path (see "What is matched?", above) is completely replaced by the Substitution and the rewriting process continues until all rules have been applied, or it is explicitly terminated by an @@ -1069,133 +1227,147 @@ cannot use $N in the substitution string!

      Additionally you can set special actions to be performed by appending [flags] - as the third argument to the RewriteRule + as the third argument to the RewriteRule directive. Flags is a comma-separated list, surround by square brackets, of any of the flags in the following table. More details, and examples, for each flag, are available in the Rewrite Flags document.

      - - +
      Flag and syntax
      - + - + + + + + - + - + - + - + + + + + + the environment variable VAR to be unset. + details ... - + - + - + - + - + - + - - + - + - + - + - + - + - + - + + + + + - - - - - + - + -
      Flag and syntax Function
      BEscape non-alphanumeric characters before applying - the transformation. details ...Escape non-alphanumeric characters in backreferences before + applying the transformation. details ...
      backrefnoplus|BNPIf backreferences are being escaped, spaces should be escaped to + %20 instead of +. Useful when the backreference will be used in the + path component rather than the query string.details ...
      chain|C Rule is chained to the following rule. If the rule fails, the rule(s) chained to it will be skipped. details ...
      cookie|CO=NAME:VAL Sets a cookie in the client browser. Full syntax is: CO=NAME:VAL:domain[:lifetime[:path[:secure[:httponly]]]] details ...
      discardpath|DPI Causes the PATH_INFO portion of the rewritten URI to be discarded. details ...
      ENDStop the rewriting process immediately and don't apply any + more rules. Also prevents further execution of rewrite rules + in per-directory and .htaccess context. (Available in 2.3.9 and later) + details ...
      env|E=[!]VAR[:VAL] Causes an environment variable VAR to be set (to the value VAL if provided). The form !VAR causes - the environment variable VAR to be unset.details ...
      forbidden|F Returns a 403 FORBIDDEN response to the client browser. details ...
      gone|G Returns a 410 GONE response to the client browser. details ...
      Handler|H=Content-handler Causes the resulting URI to be sent to the specified Content-handler for processing. details ...
      last|L Stop the rewriting process immediately and don't apply any more rules. Especially note caveats for per-directory and .htaccess context (see also the END flag). details ...
      next|N Re-run the rewriting process, starting again with the first rule, using the result of the ruleset so far as a starting point. details ...
      nocase|NCMakes the pattern pattern comparison case-insensitive. + Makes the pattern comparison case-insensitive. details ...
      noescape|NE Prevent mod_rewrite from applying hexcode escaping of special characters in the result of the rewrite. details ...
      nosubreq|NS Causes a rule to be skipped if the current request is an internal sub-request. details ...
      proxy|P Force the substitution URL to be internally sent as a proxy request. details ...
      passthrough|PT Forces the resulting URI to be passed back to the URL mapping engine for processing of other URI-to-filename translators, such as Alias or Redirect. details ...
      qsappend|QSAAppends any query string created in the rewrite target to - any query string that was in the original request URL. details ...Appends any query string from the original request URL to + any query string created in the rewrite target.details ...
      qsdiscard|QSD Discard any query string attached to the incoming URI. details ...
      qslast|QSLInterpret the last (right-most) question mark as the query string + delimeter, instead of the first (left-most) as normally used. + Available in 2.4.19 and later. + details + ...
      redirect|R[=code] Forces an external redirect, optionally with the specified HTTP status code. details ...
      ENDStop the rewriting process immediately and don't apply any - more rules. Also prevents further execution of rewrite rules - in per-directory and .htaccess context. (Available in 2.3.9 and later) - details ...
      skip|S=num Tells the rewriting engine to skip the next num rules if the current rule matches. details ...
      type|T=MIME-type Force the MIME-type of the target file to be the specified type. details ...
      +

      Home directory expansion

      When the substitution string begins with a string @@ -1218,68 +1390,55 @@ directive.

      /somepath/pathinfo
      '':

      - - +
      - - - + - - - + - - - + - - - + - - - + - - - + @@ -1287,80 +1446,65 @@ directive.

      Inside per-directory configuration for /somepath
      - (/physical/path/to/somepath/.htacccess, with - RewriteBase /somepath)
      + (/physical/path/to/somepath/.htaccess, with + RewriteBase "/somepath")
      for request ``GET /somepath/localpath/pathinfo'':

      -
      Given Rule Resulting Substitution
      ^/somepath(.*) otherpath$1 invalid, not supported
      ^/somepath(.*) otherpath$1 [R] invalid, not supported
      ^/somepath(.*) otherpath$1 [P] invalid, not supported
      ^/somepath(.*) /otherpath$1 /otherpath/pathinfo
      ^/somepath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
      ^/somepath(.*) /otherpath$1 [P] doesn't make sense, not supported
      ^/somepath(.*) http://thishost/otherpath$1 /otherpath/pathinfo
      ^/somepath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
      ^/somepath(.*) http://thishost/otherpath$1 [P] doesn't make sense, not supported
      ^/somepath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo via external redirection
      ^/somepath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)
      ^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo via internal proxy
      - - +
      - - - + - - - + - - - + - - - + - - - + - - - + -
      Given Rule Resulting Substitution
      ^localpath(.*) otherpath$1 /somepath/otherpath/pathinfo
      ^localpath(.*) otherpath$1 [R] http://thishost/somepath/otherpath/pathinfo via external redirection
      ^localpath(.*) otherpath$1 [P] doesn't make sense, not supported
      ^localpath(.*) /otherpath$1 /otherpath/pathinfo
      ^localpath(.*) /otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
      ^localpath(.*) /otherpath$1 [P] doesn't make sense, not supported
      ^localpath(.*) http://thishost/otherpath$1 /otherpath/pathinfo
      ^localpath(.*) http://thishost/otherpath$1 [R] http://thishost/otherpath/pathinfo via external redirection
      ^localpath(.*) http://thishost/otherpath$1 [P] doesn't make sense, not supported
      ^localpath(.*) http://otherhost/otherpath$1 http://otherhost/otherpath/pathinfo via external redirection
      ^localpath(.*) http://otherhost/otherpath$1 [R] http://otherhost/otherpath/pathinfo via external redirection (the [R] flag is redundant)
      ^localpath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo via internal proxy
      @@ -1369,7 +1513,28 @@ redirection

      Available Languages:  en  |  fr 

      -
      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_rewrite.html.fr b/docs/manual/mod/mod_rewrite.html.fr index 1bdf86607dc..fcf11f36c2c 100644 --- a/docs/manual/mod/mod_rewrite.html.fr +++ b/docs/manual/mod/mod_rewrite.html.fr @@ -1,23 +1,28 @@ - -mod_rewrite - Serveur Apache HTTP +mod_rewrite - Serveur Apache HTTP Version 2.4 - + + + + +

      Serveur Apache HTTP Version 2.4

      +
      <-
      +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

      Module Apache mod_rewrite

      @@ -34,7 +39,7 @@ r

      Le module mod_rewrite utilise un moteur de rcriture base de rgles, bas sur un interprteur - d'expressions rationnelles, pour rcrire les URLs la vole. Par + d'expressions rationnelles PCRE, pour rcrire les URLs la vole. Par dfaut, mod_rewrite met en correspondance une URL avec le systme de fichiers. Cependant, on peut aussi l'utiliser pour rediriger une URL vers une autre URL, ou pour invoquer une @@ -58,7 +63,10 @@ r documentation dtaille sur mod_rewrite.

      -

      Directives

      +

      Sujets

      +

      Directives

      -

      Sujets

      -
      +

      Traitement des bugs

      Voir aussi

      +
      top

      Journalisation

      @@ -90,9 +97,8 @@ r suprieur trace2 qu' des fins de dbogage !
      -

      Exemple

      - LogLevel alert rewrite:trace3 -

      +

      Exemple

      LogLevel alert rewrite:trace3
      +

      RewriteLog

      Ceux qui sont familiers avec les versions prcdentes de @@ -113,67 +119,69 @@ r

      top
      -

      RewriteBase Directive

      +

      Directive RewriteBase

      - +
      Description:Dfinit l'URL de base pour les rcritures au niveau rpertoire
      Syntaxe:RewriteBase chemin URL
      Syntaxe:RewriteBase chemin_URL
      Dfaut:Pas de valeur par dfaut
      Contexte:rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Extension
      Module:mod_rewrite
      -

      La directive RewriteBase dfinit - explicitement le chemin URL de base (et non le chemin du - rpertoire dans le systme de fichiers !) pour les rcritures dans un contexte - de rpertoire dont le rsultat est la substitution d'un - chemin relatif. Lorsque vous utilisez une directive RewriteRule dans un fichier - .htaccess, mod_rewrite enlve le - prfixe de rpertoire local avant d'effectuer le traitement, puis - rcrit ce qui reste de l'URL. Lorsque la rcriture est termine, - mod_rewrite ajoute automatiquement le prfixe de - rpertoire local (ou la valeur de la directive - RewriteBase si cette dernire est dfinie) - la chane de substitution avant de la remettre disposition du - serveur, comme s'il s'agissait de l'URL d'origine.

      - -

      Cette directive est requise pour les rcritures - dans un contexte de rpertoire dfini via la directive - Alias lorsque la - substitution utilise un chemin relatif.

      - -

      Si votre chemin URL n'existe pas rellement dans le systme de - fichiers, ou ne trouve pas directement sous le rpertoire dfini - par la directive DocumentRoot, vous devez utiliser la - directive RewriteBase dans chaque fichier - .htaccess o vous voulez utiliser des directives RewriteRule.

      - -

      L'exemple ci-dessous montre comment faire correspondre - http://example.com/mon-appli/index.html - /home/www/exemple/nouveau_site.html dans un fichier - .htaccess. On suppose que le contenu disponible - http://example.com/ se situe sur le disque - /home/www/exemple/.

      - -
      -RewriteEngine On
      -# Le chemin URL utilis pour arriver dans ce contexte, et non le chemin
      -# du systme de fichiers
      -RewriteBase /mon-appli/
      -RewriteRule ^index\.html$  nouveau_site.html
      -
      +

      La directive RewriteBase permet de + spcifier le prfixe d'URL utiliser dans un contexte de + rpertoire (htaccess) pour les directives + RewriteRule qui rcrivent vers un chemin + relatif.

      +

      Cette directive est obligatoire si vous utilisez un + chemin relatif dans une substitution, et dans un contexte de + rpertoire (htaccess), sauf si au moins une de ces conditions est + vrifie :

      +
        +
      • La requte initiale, ainsi que la substitution, se + situent par raport la valeur de la directive + DocumentRoot (c'est + dire que pour y accder, il n'est pas ncessaire d'utiliser + une directive telle qu'Alias).
      • +
      • Le chemin du systme de fichiers vers le rpertoire + contenant la RewriteRule, suffix par + la substitution relative est aussi valide en tant qu'URL sur + le serveur (ce qui est rare).
      • +
      • A partir de la version 2.4.16 du serveur HTTP Apache, + cette directive peut tre omise lorsque la requte est mise en + correspondance avec le systme de fichiers via la directive + Alias ou le module + mod_userdir.
      • +
      + +

      Dans l'exemple ci-dessous, la directive +RewriteBase est ncessaire afin d'viter une +rcriture en http://example.com/opt/myapp-1.2.3/welcome.html car la +ressource n'tait pas relative la racine des documents. Cette erreur +de configuration aurait conduit le serveur rechercher un rpertoire +"opt" la racine des documents.

      + +
      DocumentRoot "/var/www/example.com"
      +AliasMatch "^/myapp" "/opt/myapp-1.2.3"
      +<Directory "/opt/myapp-1.2.3">
      + RewriteEngine On
      +    RewriteBase "/myapp/"
      +    RewriteRule "^index\.html$"  "welcome.html"
      +</Directory>
      +
      top
      -

      RewriteCond Directive

      +

      Directive RewriteCond

      + chane_de_testexpression_de_comparaison [drapeaux] @@ -205,8 +213,8 @@ la r : ce sont des rfrences arrires de la forme %N (0 <= N <= 9). %1 %9 permettent d'accder aux parties regroupes (entre - parenthses) du modle, issues de la RewriteRule - concerne par le jeu de conditions RewriteCond + parenthses) du modle, issues de la dernire + condition RewriteCond satisfaite du jeu de conditions RewriteCond courant. %0 donne accs l'ensemble de la chane correspondant au modle.
    2. @@ -229,26 +237,30 @@ la r
    3. Description:Dfinit une condition qui devra tre satisfaite pour que la rcriture soit effectue
      Syntaxe: RewriteCond - chane de test expression de comparaison
      Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
      AllowOverride:FileInfo
      Statut:Extension
      - HTTP_USER_AGENT
      - HTTP_REFERER
      + HTTP_ACCEPT
      HTTP_COOKIE
      HTTP_FORWARDED
      HTTP_HOST
      HTTP_PROXY_CONNECTION
      - HTTP_ACCEPT
      + HTTP_REFERER
      + HTTP_USER_AGENT
      + AUTH_TYPE
      + CONN_REMOTE_ADDR
      + CONTEXT_PREFIX
      + CONTEXT_DOCUMENT_ROOT
      + IPV6
      + PATH_INFO
      + QUERY_STRING
      REMOTE_ADDR
      REMOTE_HOST
      + REMOTE_IDENT
      REMOTE_PORT
      REMOTE_USER
      - REMOTE_IDENT
      REQUEST_METHOD
      SCRIPT_FILENAME
      - PATH_INFO
      - QUERY_STRING
      - AUTH_TYPE
      @@ -261,9 +273,11 @@ la r
      DOCUMENT_ROOT
      + SCRIPT_GROUP
      + SCRIPT_USER
      + SERVER_ADDR
      SERVER_ADMIN
      SERVER_NAME
      - SERVER_ADDR
      SERVER_PORT
      SERVER_PROTOCOL
      SERVER_SOFTWARE
      @@ -282,12 +296,14 @@ la r
      API_VERSION
      - THE_REQUEST
      - REQUEST_URI
      - REQUEST_FILENAME
      - IS_SUBREQ
      + CONN_REMOTE_ADDR
      HTTPS
      - REQUEST_SCHEME
      + IS_SUBREQ
      + REMOTE_ADDR
      + REQUEST_FILENAME
      + REQUEST_SCHEME
      + REQUEST_URI
      + THE_REQUEST
      @@ -295,24 +311,17 @@ la r

      Ces variables correspondent toutes aux en-ttes MIME HTTP de mmes noms, au variables C du serveur HTTP Apache, ou aux champs struct tm du systme Unix. La - plupart d'entre elles sont documentes ailleurs dans le - manuel ou dans la spcification CGI.

      + plupart d'entre elles sont documentes ici, dans la + spcification CGI ou ailleurs dans le + manuel.

      SERVER_NAME et SERVER_PORT dpendent respectivement des valeurs des directives UseCanonicalName et UseCanonicalPhysicalPort.

      Parmi les variables spcifiques mod_rewrite, ou trouve les suivantes :

      -
      +
      -
      IS_SUBREQ
      - -
      Contient le texte "true" si la requte en cours - de traitement est une sous-requte, "false" dans le - cas contraire. Une sous-requte est gnre quand un - module a besoin de se rfrer des fichiers ou URIs - addidionnels pour pouvoir mener bien sa tche.
      -
      API_VERSION
      C'est la version de l'API des modules Apache httpd @@ -326,21 +335,30 @@ la r il s'agit de la version 19990320:10), mais intresse principalement les auteurs de modules.
      -
      THE_REQUEST
      +
      CONN_REMOTE_ADDR
      -
      La ligne de requte HTTP complte envoye par le - navigateur au serveur (par exemple, "GET - /index.html HTTP/1.1"), l'exclusion de tout - en-tte ajout par le navigateur. Cette - valeur n'a pas t dschappe (dcode), la - diffrence de la plupart des variables suivantes.
      +
      A partir de la version 2.4.8 : l'adresse IP distante de + la connexion (voir le module + mod_remoteip).
      -
      REQUEST_URI
      +
      HTTPS
      -
      La partie chemin de l'URI de la requte, comme - "/index.html". En particulier, ceci exclut la chane - de paramtres qui est quant elle disponible via sa - propre variable QUERY_STRING.
      +
      Contient le texte "on" si la connexion + utilise SSL/TLS, "off" dans le cas contraire + (Cette variable peut tre utilise sans problme, que + mod_ssl soit charg ou non).
      + +
      IS_SUBREQ
      + +
      Contient le texte "true" si la requte en cours + de traitement est une sous-requte, "false" dans le + cas contraire. Une sous-requte est gnre quand un + module a besoin de se rfrer des fichiers ou URIs + addidionnels pour pouvoir mener bien sa tche.
      + +
      REMOTE_ADDR
      +
      L'adresse IP de l'hte distant (se rfrer au + module mod_remoteip).
      REQUEST_FILENAME
      @@ -350,14 +368,11 @@ la r au moment o on y fait rfrence. Dans le cas contraire, et en particulier dans le cas d'un serveur virtuel, REQUEST_FILENAME contient la - valeur de REQUEST_URI. - -
      HTTPS
      - -
      Contient le texte "on" si la connexion - utilise SSL/TLS, "off" dans le cas contraire - (Cette variable peut tre utilise sans problme, que - mod_ssl soit charg ou non.
      + valeur de REQUEST_URI. En fonction de la + valeur de la directive AcceptPathInfo, le serveur + peut n'utiliser que certains lments de tte du + REQUEST_URI pour dterminer quel + fichier correspond la requte.
      REQUEST_SCHEME
      @@ -365,14 +380,32 @@ la r "http" ou "https"). La valeur peut tre modifie par la directive ServerName. +
      REQUEST_URI
      + +
      La partie chemin de l'URI de la requte, comme + "/index.html". Ceci exclut en particulier la chane de + paramtres de la requte qui est contenue dans la + variable QUERY_STRING.
      + +
      THE_REQUEST
      + +
      La ligne de requte HTTP complte envoye par le + navigateur au serveur (par exemple, "GET + /index.html HTTP/1.1"), l'exclusion de tout + en-tte ajout par le navigateur. Cette + valeur n'a pas t dschappe (dcode), la + diffrence de la plupart des variables suivantes.
      -
      +
    4. -

      Si la chane de test contient la valeur spciale - expr, expression de comparaison sera trait - en tant qu'expression rationnelle de type ap_expr.

      +

      Si la chane_de_test contient la valeur spciale + expr, expression_de_comparaison sera trait + en tant qu'expression rationnelle de type ap_expr. Si des en-ttes HTTP sont + rfrencs dans l'expression rationnelle, et si le drapeau + novary n'est pas activ, ils seront ajouts + l'en-tte Vary.

      Autres points connatre ::

        @@ -419,7 +452,10 @@ la r d'environnement SSL . Si mod_ssl n'est pas charg, cette variable contiendra toujours une chane vide. Exemple : %{SSL:SSL_CIPHER_USEKEYSIZE} pourra - contenir la valeur 128. + contenir la valeur 128. Ces variables sont + disponibles mme si l'option StdEnvVars de la + directive SSLOptions n'a + pas t dfinie.
      1. On peut utiliser %{HTTP:en-tte}, o @@ -441,7 +477,7 @@ la r
      2. A des fins de rfrence avant, on peut utiliser, - %{LA-U:variable}, qui + %{LA-U:variable}, qui permet d'effectuer une sous-requte interne base d'URL, afin de dterminer la valeur finale de variable. Ceci permet d'accder la valeur d'une variable pour la rcriture inconnue @@ -467,191 +503,215 @@ la r
      -

      expression de comparaison est une expression +

      expression_de_comparaison est une expression rationnelle qui est applique l'instance actuelle de - chane de test. chane de test est d'abord + chane_de_test. chane_de_test est d'abord value, puis compare - l'expression de comparaison.

      + l'expression_de_comparaison.

      -

      expression de comparaison est en gnral une +

      expression_de_comparaison est en gnral une expression rationnelle compatible perl, mais vous disposez des syntaxes supplmentaires suivantes pour effectuer - d'autres tests utiles sur chane de test : + d'autres tests utiles sur chane_de_test :

      1. Vous pouvez prfixer l'expression avec un caractre - '!' (point d'exclamation) pour indiquer une - expression de non-correspondance.
      2. + '!' (point d'exclamation) pour inverser le rsultat + de la condition, quelle que soit l'expression de + comparaison utilise.
      3. Vous pouvez effectuer des comparaisons lexicographiques de chanes : -
          -
        • '<expression' (infrieur au sens - lexicographique)
          +
          +
          <expression
          +
          infrieur au sens lexicographique
          Traite l'expression comme une chane de caractres et la compare lexicographiquement - chane de test. La condition est satisfaite si - chane de test est infrieure au sens - lexicographique l'expression.
        • + chane_de_test. La condition est satisfaite si + chane_de_test est infrieure au sens + lexicographique l'expression. -
        • '>expression' (suprieur au sens - lexicographique)
          +
          >expression
          +
          suprieur au sens lexicographique
          Traite l'expression comme une chane de caractres et la compare lexicographiquement - chane de test. La condition est satisfaite si - chane de test est suprieure au sens - lexicographique l'expression.
        • + chane_de_test. La condition est satisfaite si + chane_de_test est suprieure au sens + lexicographique l'expression. -
        • '=expression' (gal au sens - lexicographique)
          +
          =expression
          +
          gal au sens lexicographique
          Traite l'expression comme une chane de caractres et la compare lexicographiquement - chane de test. La condition est satisfaite si - chane de test est gale au sens + chane_de_test. La condition est satisfaite si + chane_de_test est gale au sens lexicographique l'expression (les deux chanes sont exactement identiques, caractre pour caractre). Si expression est "" (deux guillemets), - chane de test est compare la chane vide.
        • + chane_de_test est compare la + chane vide. -
        • '<=expression de comparaison' (infrieur ou gal - au sens lexicographique)
          - Considre l'expression de comparaison comme une +
          <=expression de comparaison
          +
          infrieur ou gal au sens lexicographique
          + Considre l'expression_de_comparaison comme une chane de caractres et la compare au sens lexicographique - la chane de test. Vrai si chane de test - prcde lexicographiquement expression de comparaison, ou est - gale expression de comparaison (les deux chanes - sont identiques, caractre pour caractre).
        • - -
        • '>=expression de comparaison' - (suprieur ou gal au sens lexicographique)
          - Considre l'expression de comparaison comme une + la chane_de_test. Vrai si chane_de_test + prcde lexicographiquement expression_de_comparaison, ou est + gale expression_de_comparaison (les deux chanes + sont identiques, caractre pour caractre). + +
          >=expression de comparaison
          +
          suprieur ou gal au sens lexicographique
          + Considre l'expression_de_comparaison comme une chane de caractres et la compare au sens lexicographique - la chane de test. Vrai si chane de test - suit lexicographiquement expression de comparaison, ou est - gale expression de comparaison (les deux chanes - sont identiques, caractre pour caractre).
        • -
      4. + la chane_de_test. Vrai si chane_de_test + suit lexicographiquement expression_de_comparaison, ou est + gale expression_de_comparaison (les deux chanes + sont identiques, caractre pour caractre). + +
      5. Vous pouvez effectuer des comparaisons d'entiers : -
          +
          -
        • '-eq' (est numriquement gal )
          - La chane de test est considre comme un entier, +
          -eq
          +
          est numriquement gal
          + La chane_de_test est considre comme un entier, et est compare numriquement l'expression de comparaison. Vrai si les deux expressions sont - numriquement gales.
        • + numriquement gales. -
        • '-ge' (est numriquement suprieur ou - gal )
          - La chane de test est considre comme un entier, +
          -ge
          +
          est numriquement suprieur ou gal
          + La chane_de_test est considre comme un entier, et est compare numriquement l'expression de - comparaison. Vrai si chane de test est - numriquement - suprieure ou gale expression de comparaison.
        • + comparaison. Vrai si chane_de_test est + numriquement suprieure ou gale + expression_de_comparaison. -
        • '-gt' (est numriquement suprieur )
          - La chane de test est considre comme un entier, +
          -gt
          +
          est numriquement suprieur
          + La chane_de_test est considre comme un entier, et est compare numriquement l'expression de - comparaison. Vrai si chane de test est + comparaison. Vrai si chane_de_test est numriquement - suprieure expression de comparaison.
        • + suprieure expression_de_comparaison. -
        • '-le' (est numriquement infrieur ou - gal )
          - La chane de test est considre comme un entier, +
          -le
          +
          est numriquement infrieur ou gal
          + La chane_de_test est considre comme un entier, et est compare numriquement l'expression de - comparaison. Vrai si chane de test est + comparaison. Vrai si chane_de_test est numriquement - infrieure ou gale expression de comparaison. + infrieure ou gale expression_de_comparaison. Attention la confusion avec le drapeau -l en utilisant la variante the -L ou - -h.
        • + -h. -
        • '-lt' (est numriquement infrieur )
          - La chane de test est considre comme un entier, +
          -lt
          +
          est numriquement infrieur
          + La chane_de_test est considre comme un entier, et est compare numriquement l'expression de - comparaison. Vrai si chane de test est + comparaison. Vrai si chane_de_test est numriquement - infrieure expression de comparaison. + infrieure expression_de_comparaison. Attention la confusion avec le drapeau -l en utilisant la variante the -L ou - -h.
        • + -h. + +
          -ne
          +
          Est numriquement non gal
          + La Chane de test est considre comme un entier et est + numriquement compare l'expression de comparaison. Vrai + si les deux lments compars sont numriquement diffrents. + Equivalent !-eq.
          -
        +
      6. Vous pouvez effectuer diffrents tests sur les attributs de fichier : -
          +
          -
        • '-d' (est un rpertoire - - directory)
          - Traite chane de test comme un chemin et vrifie - s'il existe ou pas, et s'il s'agit d'un rpertoire.
        • +
          -d
          +
          est un rpertoire
          + Traite chane_de_test comme un chemin et vrifie + s'il existe ou pas, et s'il s'agit d'un rpertoire.
          -
        • '-f' (est un - fichier rgulier)
          - Traite chane de test comme un chemin et vrifie - s'il existe ou pas, et s'il s'agit d'un fichier rgulier.
        • +
          -f
          +
          est un fichier rgulier
          + Traite chane_de_test comme un chemin et vrifie + s'il existe ou pas, et s'il s'agit d'un fichier rgulier.
          -
        • '-F' (test de l'existence d'un fichier - via une sous-requte)
          - Vrifie si chane de test est un fichier valide, +
          -F
          +
          test de l'existence d'un fichier via une sous-requte
          + Vrifie si chane_de_test est un fichier valide, accessible travers tous les contrles d'accs du serveur actuellement configurs pour ce chemin. C'est une sous-requte interne qui effectue cette vrification - utiliser avec prcautions car les performances du serveur - peuvent s'en trouver affectes !
        • + peuvent s'en trouver affectes ! -
        • '-H' (est un lien symbolique, selon la - convention bash)
          - Voir -l.
        • +
          -h
          +
          est un lien symbolique, selon la convention bash
          + Voir -l.
          -
        • '-l' (est un lien symbolique)
          - Considre la chane de test comme un chemin et +
          -l
          +
          est un lien symbolique
          + Considre la chane_de_test comme un chemin et vrifie son existence et si elle est un lien symbolique. On peut aussi utiliser la convention bash -L ou -h lorsqu'il y a risque de confusion - avec les tests -lt ou -le.
        • + avec les tests -lt ou -le. -
        • '-L' (est un lien symbolique, selon la - convention bash)
          - Voir -l.
        • +
          -L
          +
          est un lien symbolique, selon la convention bash
          + Voir -l.
          -
        • '-s' (est un fichier rgulier d'une - certaine taille)
          - Considre la chane de test comme un chemin et +
          -s
          +
          est un fichier rgulier d'une certaine taille
          + Considre la chane_de_test comme un chemin et vrifie son existence et si elle est un fichier rgulier - d'une taille suprieure zro.
        • + d'une taille suprieure zro. -
        • '-U' (test de l'existence d'une - URL via une sous-requte)
          - Vrifie si chane de test est une URL valide, +
          -U
          +

          test de l'existence d'une + URL via une sous-requte
          + Vrifie si chane_de_test est une URL valide, accessible travers tous les contrles d'accs du serveur actuellement configurs pour ce chemin. C'est une sous-requte interne qui effectue cette vrification - utiliser avec prcautions car les performances du serveur - peuvent s'en trouver affectes !

        • - -
        • '-x' (a l'attribut d'excution positionn)
          - Considre la chane de test comme un chemin et + peuvent s'en trouver affectes !

          +

          Ce drapeau ne renvoie que des informations + concernant le contrle d'accs, l'authentification et + l'autorisation. Il ne renvoie pas d'informations + concernant le code d'tat que le gestionnaire configur + (static file, CGI, proxy, etc...) aurait, quant lui, + retourn.

          + +
          -x
          +
          a l'attribut d'excution positionn
          + Considre la chane_de_test comme un chemin et vrifie son existence et si elle a son attribut d'excution positionn. Ce positionnement est dtermin en fonction de - l'OS sous-jacent.
        • + l'OS sous-jacent. + +
          + + Par exemple: + +
          RewriteCond /var/www/%{REQUEST_URI} !-f
          +RewriteRule ^(.+) /other/archive/$1 [R]
          -
        -

        Note :

        - Tous ces tests peuvent aussi tre prfixs par un point - d'exclamation ('!') pour inverser leur signification. -
      7. -

        Si la chane de test contient la valeur spciale +

        Si la chane_de_test contient la valeur spciale expr, la chane de comparaison sera traite en tant qu'expression rationnelle de type ap_expr.

        @@ -662,28 +722,28 @@ la r non dsir.

        -

        - RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
        - RewriteRule ^/images - [F] -

        +
                   RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
        +           RewriteRule "^/images" "-" [F]
        +
      8. +
      -
    5. Vous pouvez aussi dfinir certains drapeaux pour - l'expression de comparaison en ajoutant ces +

      Vous pouvez aussi dfinir certains drapeaux pour + l'expression_de_comparaison en ajoutant ces [drapeaux] comme troisime argument de la directive RewriteCond, o drapeaux est un - sous-ensemble spar par des virgules des drapeaux suivants : + sous-ensemble spar par des virgules des drapeaux suivants :

      • 'nocase|NC' (no case)
        Rend le test insensible la casse - il n'est pas fait de distinction entre majuscules et minuscules, la fois dans le - dveloppement de chane de test et dans - expression de comparaison. Ce drapeau n'est pris en - compte que lors d'une comparaison entre chane de test - et expression de comparaison. Il ne l'est pas pour les + dveloppement de chane_de_test et dans + expression_de_comparaison. Ce drapeau n'est pris en + compte que lors d'une comparaison entre chane_de_test + et expression_de_comparaison. Il ne l'est pas pour les vrification par sous-requtes ou sur le systme de fichiers.
      • @@ -693,12 +753,11 @@ la r Permet de chaner les conditions de rgles avec un OU au lieu du AND implicite. Exemple typique : -
        -RewriteCond %{REMOTE_HOST}  ^host1  [OR]
        -RewriteCond %{REMOTE_HOST}  ^host2  [OR]
        -RewriteCond %{REMOTE_HOST}  ^host3
        -RewriteRule ...rgles concernant tous ces htes...
        -
        +
        RewriteCond "%{REMOTE_HOST}"  "^host1"  [OR]
        +RewriteCond "%{REMOTE_HOST}"  "^host2"  [OR]
        +RewriteCond "%{REMOTE_HOST}"  "^host3"
        +RewriteRule ...rgles concernant tous ces htes...
        + Sans ce drapeau, les paires condition/rgle devraient tre crites trois fois. @@ -715,8 +774,7 @@ RewriteRule ...r fonctionnement de l'en-tte Vary.
      -
    6. -
    +

    Exemple :

    @@ -724,34 +782,24 @@ RewriteRule ...r l'en-tte ``User-Agent:'' de la requte, vous pouvez utiliser ce qui suit :

    -
    -RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
    -RewriteRule  ^/$                 /homepage.max.html  [L]
    +
    RewriteCond  "%{HTTP_USER_AGENT}"  "(iPhone|Blackberry|Android)"
    +RewriteRule  "^/$"               "/homepage.mobile.html"  [L]
     
    -RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
    -RewriteRule  ^/$                 /homepage.min.html  [L]
    +RewriteRule  "^/$"                 "/homepage.std.html"  [L]
    -RewriteRule ^/$ /homepage.std.html [L] -

    Explications : si vous utilisez un navigateur - (Netscape Navigator, Mozilla etc) qui s'identifie comme - 'Mozilla', vous accderez la page d'accueil max (qui - peut contenir des frames, ou d'autres ressources - particulires). - Si vous utilisez le navigateur Lynx (qui est un navigateur - en mode texte), vous accderez une page d'accueil min - (qui peut tre une version conue pour une navigation simple - base sur le texte). - Si aucune de ces conditions n'est satisfaite (vous utilisez tout - autre navigateur, ou votre navigateur s'identifie de manire non - standard), vous accderez la page d'accueil std - (standard).

    + qui s'identifie comme un + navigateur de plateforme mobile (notez que l'exemple est + incomplet car il existe de nombreuses autres plateformes + mobiles), c'est la version pour mobile de la page d'accueil qui + sera renvoye. Dans le cas contraire, ce sera la page d'accueil + standard.

    top
    -

    RewriteEngine Directive

    +

    Directive RewriteEngine

    @@ -769,8 +817,9 @@ moteur de r mettra pas jour les variables d'environnement SCRIPT_URx.

    -

    Pour dsactiver le module, il vaut mieux utiliser cette - directive que commenter toutes les directives RewriteRule !

    +

    Plutt que de commenter toutes les directives RewriteRule, il est prfrable + d'utiliser cette directive si l'on souhaite dsactiver les + rgles de rcriture dans un contexte particulier.

    Notez que les htes virtuels n'hritent pas des configurations de rcriture. Ceci implique que vous devez @@ -778,7 +827,7 @@ moteur de r hte virtuel pour lequel vous souhaitez utiliser des rgles de rcriture.

    -

    Les directives RewriteMap du type +

    Les directives RewriteMap du type prg ne sont pas prises en compte au cours de l'initialisation du serveur si elle ont t dfinies dans un contexte o la directive RewriteEngine n'a @@ -787,18 +836,15 @@ moteur de r

    top
    -
    Description:Active ou dsactive l'excution du moteur de rcriture
    - -
    Description:Dfinit une fonction de mise en correspondance pour la recherche de mots-cls
    Syntaxe:RewriteMap nom de la correspondance type de -correspondance:source de la correspondance +
    Syntaxe:RewriteMap MapName MapType:MapSource
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_rewrite
    Compatibilit:Il est possible de choisir entre plusieurs types de -bases de donnes depuis la version 2.0.41 du serveur HTTP Apache

    La directive RewriteMap dfinit une Table de correspondance pour la rcriture que les @@ -808,24 +854,21 @@ bases de donn La source utilise pour cette recherche peut tre de plusieurs types.

    -

    nom de la - correspondance est le nom de la table de correspondance +

    MapName est le nom de la table de correspondance et servira spcifier une fonction de mise en correspondance pour les chanes de substitution d'une rgle de rcriture selon une des constructions suivantes :

    - ${ nom de la - correspondance : + ${ MapName : mot-cl }
    - ${ nom de la - correspondance : + ${ MapName : mot-cl | valeur par dfaut }

    Lorsqu'une telle construction est rencontre, la table de - correspondance Nom de la correspondance est consulte + correspondance MapName est consulte et la cl mot-cl recherche. Si la cl est trouve, la construction est remplace par la valeur de remplacement. Si la cl n'est pas trouve, @@ -838,19 +881,17 @@ bases de donn

    Par exemple, vous pouvez dfinir une directive RewriteMap comme suit

    -

    - RewriteMap map-exemple txt:/chemin/vers/fichier/map.txt -

    +
    RewriteMap map-exemple "txt:/chemin/vers/fichier/map.txt"
    +

    Vous pourrez ensuite utiliser cette table dans une directive RewriteRule comme suit :

    -

    - RewriteRule ^/ex/(.*) ${map-exemple:$1} -

    +
    RewriteRule "^/ex/(.*)" "${map-exemple:$1}"
    +

    Les combinaisons suivantes pour type de correspondance - et source de la correspondance + et MapSource peuvent tre utilises :

    @@ -873,12 +914,12 @@ bases de donn
    prg
    Appelle un programme externe ou un script pour effectuer la - rcriture (Dtails + rcriture (Dtails ...).
    dbd or fastdbd
    Une commande SQL SELECT excuter pour rechercher la cible - de rcriture (Dtails + de rcriture (Dtails ...).
    @@ -887,7 +928,7 @@ bases de donn
    top
    -

    RewriteOptions Directive

    +

    Directive RewriteOptions

    @@ -896,8 +937,6 @@ pour le moteur de r -
    Description:Configure certaines options spciales pour le moteur de rcriture
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_rewrite
    Compatibilit:MaxRedirects n'est plus disponible depuis -la version version 2.1

    La directive RewriteOptions dfinit @@ -935,15 +974,123 @@ la version version 2.1

    Mme effet que l'option Inherit ci-dessus, mais les rgles spcifies dans le niveau parent s'appliquent avant les rgles spcifies dans le niveau - enfant. Disponible depuis la version 2.3.10 du serveur HTTP - Apache.

    + enfant.
    + Disponible depuis la version 2.3.10 du serveur HTTP Apache.

    + + +
    InheritDown
    +
    + +

    Si cette option est active, toutes les configurations enfants + hriteront de la configuration courante. Il en est de mme si l'on + spcifie RewriteOptions Inherit dans toutes les + configurations enfants. Voir l'option Inherit pour + plus de dtails propos de la manire dont les relations + parent-enfants sont traites.
    + Cette option est disponible partir + de la version 2.4.8 du serveur HTTP Apache.

    +
    + +
    InheritDownBefore
    +
    + +

    L'effet de cette option est quivalent celui de l'option + InheritDown ci-dessus, mais les rgles de la + configuration parente s'appliquent avant toute + rgle de la configuration enfant.
    + Cette option est disponible partir + de la version 2.4.8 du serveur HTTP Apache.

    +
    + +
    IgnoreInherit
    +
    + +

    Si cette option est active, les configurations courante et + enfants ignoreront toute rgle hrite d'une configuration parente + via les options InheritDown ou + InheritDownBefore.
    + Cette option est disponible partir + de la version 2.4.8 du serveur HTTP Apache.

    +
    + +
    AllowNoSlash
    +
    +

    Par dfaut, mod_rewrite ignore les URLs qui + correspondent un rpertoire sur disque, mais ne comportent pas + de slash final, afin que le module mod_dir + redirige le client vers l'URL canonique avec un slash final.

    + +

    Lorsque la directive DirectorySlash est dfinie off, il + est possible de spcifier l'option AllowNoSlash pour + s'assurer que les rgles de rcriture ne soient plus ignores. + Si on le souhaite, cette option permet de faire s'appliquer des + rgles de rcriture qui correspondent un rpertoire sans slash + final au sein de fichiers .htaccess.
    + Elle est disponible + partir de la version 2.4.0 du serveur HTTP Apache.

    +
    + +
    AllowAnyURI
    +
    + +

    A partir de la version 2.2.22 de httpd, lorsqu'une directive RewriteRule se situe dans un + contexte de serveur virtuel ou de serveur principal, + mod_rewrite ne traitera les rgles de rcriture + que si l'URI de la requte respecte la syntaxe d'un chemin URL. Ceci permet + d'viter certains problmes de scurit o des rgles + particulires pourraient permettre des dveloppements de modles + inattendus (voir CVE-2011-3368 + et CVE-2011-4317). + Pour s'affranchir de la restriction relative la syntaxe des chemins URL, on peut + utiliser l'option AllowAnyURI, afin de permettre + mod_rewrite d'appliquer le jeu de rgles toute + chane de requte URI, sans vrifier si cette dernire respecte la + grammaire des chemins URL dfinie dans la spcification HTTP.
    + Disponible depuis la version 2.4.3 du serveur HTTP Apache.

    + +
    +

    Avertissement propos de la scurit

    + +

    L'utilisation de cette option rendra le serveur vulnrable + certains problmes de scurit si les rgles de rcritures + concernes n'ont pas t rdiges avec soin. Il est par consquent + fortement recommand de ne pas utiliser cette + option. En particulier, prtez attention aux chanes en entre contenant le + caractre '@', qui peuvent modifier l'interprtation + de l'URI rcrite, comme indiqu dans les liens ci-dessus.

    +
    +
    + +
    MergeBase
    +
    + +

    Avec cette option, la valeur de la directive RewriteBase est recopie depuis + une valeur explicitement dfinie dans tout sous-rpertoire qui ne + dfinit pas sa propre directive RewriteBase. Il s'agissait du + comportement par dfaut avec les versions 2.4.0 2.4.3, et ce + drapeau qui permet de retrouver ce comportement est disponible + depuis la version 2.4.4 du serveur HTTP Apache.

    +
    + +
    IgnoreContextInfo
    +
    + +

    Lors d'une + substitution relative dans un contexte de rpertoire (htaccess), + et si la directive RewriteBase n'a pas t dfinie, + ce module utilise des informations en provenance d'une extension + d'URL et du contexte du systme de fichiers pour transformer la + sustitution relative en URL. Par exemple, les modules + mod_userdir et mod_alias + utilisent ces informations de contexte tendu. Disponible partir de la + version 2.4.16 du serveur HTTP Apache.

    top
    -

    RewriteRule Directive

    +

    Directive RewriteRule

    Modle est une expression rationnelle - compatible perl. Dans la premire rgle de rcriture, - l'expression est compare au (%-decoded) - chemin de l'URL de la - requte ; les expressions suivantes sont compares la sortie de - la dernire rgle de rcriture qui a t applique.

    + compatible perl. Ce avec quoi ce modle est compar dpend de l'endroit o + la directive RewriteRule est dfinie.

    Qu'est-ce qui est compar ?

    -

    Dans un contexte de serveur virtuel VirtualHost, le modle est tout +

      +
    • Dans un contexte de serveur virtuel VirtualHost, le modle est tout d'abord compar la portion de l'URL situe entre le nom d'hte ventuellement accompagn du port, et la chane de paramtres (par - exemple "/app1/index.html").

      - -

      Dans les contextes de rpertoire Directory et htaccess, le - modle est tout d'abord compar au chemin du systme - de fichiers, aprs suppression du prfixe ou chemin de base - ayant conduit la rgle RewriteRule (par - exemple "app1/index.html" ou - "index.html" selon l'endroit o les directives sont dfinies).

      + exemple "/app1/index.html"). Il s'agit du URL-path dcod de sa valeur "%xx".

    • + +
    • Dans un contexte de rpertoire (sections Directory et fichiers .htaccess), le + Modle est compar avec une partie de chemin ; par exemple une + requte pour "/app1/index.html" entranera une comparaison avec + "app1/index.html" ou "index.html" selon l'endroit o la directive + RewriteRule est dfinie.

      + +

      Le chemin o la rgle est dfini est supprim du chemin correspondant + du systme de fichiers avant comparaison (jusqu'au slash final compris). + En consquence de cette suppression, les rgles dfinies dans + ce contexte n'effectuent des comparaisons qu'avec la portion du chemin + du systme de fichiers "en dessous" de l'endroit o la rgle est dfinie.

      + +

      Le chemin correspondant actuel du systme de fichiers est dtermin par + des directives telles que DocumentRoot et + Alias, ou mme le rsultat de substitutions dans + des rgles RewriteRule prcdentes. +

      +
    • -

      Si vous souhaitez faire une comparaison sur le nom +

    • Si vous souhaitez faire une comparaison sur le nom d'hte, le port, ou la chane de requte, utilisez une directive RewriteCond comportant respectivement les variables %{HTTP_HOST}, %{SERVER_PORT}, ou - %{QUERY_STRING}.

      + %{QUERY_STRING}.

    • +
    +

    Rcritures dans un contexte de rpertoire

    @@ -1006,22 +1165,15 @@ niveau du r moteur de rcriture. Cette restriction a t instaure des fins de scurit. -
  • Lorsqu'on utilise le moteur de rcriture dans un fichier -.htaccess, le chemin de base du rpertoire courant (qui est -toujours le mme pour ce mme rpertoire) est automatiquement -supprim au cours de la comparaison avec le modle de la rgle -de rcriture, et automatiquement ajout lorsqu'une -substitution relative (ne dbutant pas par un slash ou un nom de -protocole) arrive la fin d'un jeu de rgles. Voir la directive -RewriteBase pour plus de -dtails propos de l'ajout du prfixe aprs les substitutions -relatives.
  • +
  • Voir la directive +RewriteBase pour plus de dtails +propos de l'ajout du prfixe aprs les substitutions relatives.
  • Si vous souhaitez effectuer une comparaison en prenant en compte l'intgralit du chemin de l'URL dans un contexte de rpertoire (htaccess), vous devez utiliser la variable %{REQUEST_URI} dans la directive -RewriteCond.
  • +RewriteCond.
  • Le prefixe supprim se termine toujours par un slash, ce qui signifie que la comparaison s'effectue avec une chane qui ne comporte @@ -1029,8 +1181,11 @@ signifie que la comparaison s'effectue avec une cha ^/ ne correspondra jamais dans un contexte de rpertoire.
  • Bien que les rgles de rcriture soient permises du point de vue de -la syntaxe dans les sections <Location> et <Files>, elles n'y sont pas prises en compte, et -n'y sont priori d'aucune utilit.
  • +la syntaxe dans les sections <Location> et <Files> (y compris leurs versions sous forme +d'expression rationnelle), elles n'y sont pas prises en compte, et +n'y sont priori d'aucune utilit. Les substitutions +relatives sont une fonctionnalit qui n'est, elle non-plus pas supporte +dans ce genre de contexte.
    @@ -1068,7 +1223,12 @@ substitution !
    un chemin du systme de fichiers
    Il indique alors la localisation dans le systme de - fichiers de la ressource qui doit tre envoye au client.
    + fichiers de la ressource qui doit tre envoye au + client. Les substitutions ne sont traites en tant que chemins du + systme de fichiers que si la rgle est configure dans un + contexte de serveur (serveur virtuel), et si le premier + composant du chemin dans la substitution existe dans le systme + de fichiers.
    chemin d'URL
    @@ -1081,7 +1241,9 @@ substitution ! Substitution/www/file.html, cette dernire sera traite comme un chemin d'URL moins qu'un rpertoire nomm www n'existe la racine - de votre systme de fichiers, auquel cas la chane de + de votre systme de fichiers (ou dans le cas d'une + rcriture au sein d'un fichier .htaccess, + relativement la racine des documents), auquel cas la chane de substitution sera traite comme un chemin du systme de fichiers. Si vous dsirez que d'autres directives de correspondance d'URL (comme la directive Alias) soient appliques au @@ -1108,7 +1270,7 @@ substitution ! -

    En plus du texte, la chane Substition peut +

    En plus du texte, la chane Substitution peut comporter :

      @@ -1130,15 +1292,15 @@ substitution ! $N (N=0..9), qui seront remplacs par le contenu du Nme groupe du Modle qui correspondait. Les variables du serveur - sont les mmes que dans la Chane de test d'une - directive RewriteCond. Les fonctions de comparaison - sont issues de la directive RewriteMap dans la + sont les mmes que dans la Chane_de_test d'une + directive RewriteCond. Les + fonctions de comparaison sont issues de la directive RewriteMap dans la section de laquelle elles sont dcrites. Ces trois types de variables sont values dans l'ordre ci-dessus.

      Chaque rgle de rcriture s'applique au rsultat de la rgle prcdente, selon l'ordre dans lequel elles ont t dfinies dans - le fichier de configuration. L'URI du chemin du fichier (voir + le fichier de configuration. Le chemin de l'URL ou du systme de fichier (voir ci-dessus Qu'est-ce qui est compar ?) est intgralement remplace par la chane de Substitution et le @@ -1167,28 +1329,36 @@ substitution ! des [drapeaux] comme troisime argument de la directive - RewriteRule. Spars par des virgules au sein d'une + RewriteRule. Spars par des virgules au sein d'une liste encadre par des crochets, les drapeaux peuvent tre choisis dans la table suivante. Vous trouverez plus de dtails, et des exemples pour chaque drapeau dans le document propos des drapeaux de rcriture.

      -
    Description:Dfinit les rgles pour le moteur de rcriture
    Syntaxe:RewriteRule @@ -963,32 +1110,44 @@ la version version 2.1
    - +
    Drapeaux et syntaxe
    - + - - - + + + + + + - + - + - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + + + + + - - - - - + - + -
    Drapeaux et syntaxe Fonction
    BEchappe les caractres non-alphanumriques avant + Echappe les caractres non-alphanumriques + dans les rfrences arrires avant d'appliquer la transformation. dtails ...
    chain|C
    backrefnoplus|BNPAvec ce drapeau, si les rfrences arrires sont chappes, + les espaces seront chapps en %20 au lieu de +. Ceci s'avre + utile lorsqu'une rfrence arrire est utilise dans la partie + chemin, et non dans la chane de paramtres de la requte ; + pour plus de dtails, voir ici.
    chain|C La rgle est chane avec la rgle suivante. Si la rgle choue, la ou les rgles avec lesquelles elle est est chane seront sautes. dtails ...
    cookie|CO=NAME:VAL Dfinit un cookie au niveau du navigateur client. La syntaxe complte est : @@ -1196,109 +1366,116 @@ substitution ! dtails ...
    discardpath|DPI Supprime la partie PATH_INFO de l'URI rcrit. dtails ...
    ENDStoppe le processus de rcriture immdiatement et + n'applique plus aucune rgle. Empche aussi l'application + ultrieure de rgles de rcriture dans les contextes de + rpertoire et de fichier .htaccess (disponible partir de la + version 2.3.9 du serveur HTTP Apache). dtails ...
    env|E=[!]VAR[:VAL] Dfinit la variable d'environnement VAR ( la valeur VAL si elle est fournie). La variante !VAR annule la dfinition de la variable VAR.dtails ...
    forbidden|F Renvoie une rponse 403 FORBIDDEN au navigateur client. dtails ...
    gone|G Renvoie un message d'erreur 410 GONE au navigateur client. dtails ...
    Handler|H=Gestionnaire de contenu L'URI rsultant est envoy au Gestionnaire de contenu pour traitement. dtails ...
    last|L Arrte le processus de rcriture immdiatement et n'applique plus aucune rgle. Prtez une attention particulire aux mises en garde concernant les contextes de niveau rpertoire et .htaccess (voir aussi le drapeau END). dtails ...
    next|N Rexcute le processus de rcriture partir de la premire rgle, en utilisant le rsultat du jeu de rgles, sous rserve qu'il y ait un point de dpart. dtails ...
    nocase|NC Rend la comparaison entre modles insensible la casse. dtails ...
    noescape|NE Empche mod_rewrite d'effectuer un chappement hexadcimal des caractres spciaux dans le rsultat de la rcriture. dtails ...
    nosubreq|NS La rgle est saute si la requte courante est une sous-requte interne. dtails ...
    proxy|P Force l'envoi en interne de l'URL de substitution en tant que requte mandataire. dtails ...
    passthrough|PT L'URI rsultant est repass au moteur de mise en correspondance des URLs pour y tre trait par d'autres traducteurs URI-vers-nom de fichier, comme Alias ou Redirect. dtails ...
    qsappend|QSAAjoute toute chane de paramtres cre dans la cible de - rcriture toute chane de paramtres prsente dans l'URL de la - requte originale. dtails ...Ajoute toute chane de paramtres prsente dans l'URL de la + requte originale toute chane de paramtres cre dans la + cible de rcriture. dtails ...
    qsdiscard|QSD Supprime toute chane de paramtres de l'URI entrant. dtails ...
    redirect|R[=code]
    qslast|QSLInterprte le dernier (le plus droite) point d'interrogation comme + le dlimiteur de la chane de paramtres de la requte, au lieu du + premier (le plus gauche) comme c'est le cas habituellement. Disponble + partir de la version 2.4.19 du serveur HTTP Apache. dtails ...
    redirect|R[=code] Force une redirection externe, avec un code de statut HTTP optionnel. dtails ...
    ENDArrte le processus de rcriture immdiatement et - n'applique plus aucune rgle. Empche aussi l'excution - ultrieure de rgles de rcriture dans des contextes de - rpertoire et des fichiers .htaccess (disponible depuis la - version 2.3.9) dtails ...
    skip|S=nombre Si la rgle courante s'applique, le moteur de rcriture doit sauter les nombre rgles suivantes. dtails ...
    type|T=MIME-type Force l'attribution du Type-MIME spcifi au fichier cible. dtails ...
    +

    Dveloppement du rpertoire home

    Quand la chane de substitution commence par quelque chose comme @@ -1319,69 +1496,56 @@ utilis /chemin/infochemin'':

    - - +
    - - - + - - - + - - - + - - - + - - - + - - - + @@ -1390,80 +1554,65 @@ redondant)

    Dans une configuration de niveau rpertoire pour /chemin
    (/chemin/physique/vers/chemin/.htacccess, avec - RewriteBase /chemin)
    + RewriteBase "/chemin")
    pour la requte ``GET /chemin/chemin-local/infochemin'':

    -
    Rgle Rsultat de la substitution
    ^/un_chemin(.*) autre_chemin$1 invalide, non support
    ^/un_chemin(.*) autre_chemin$1 [R] invalide, non support
    ^/un_chemin(.*) autre_chemin$1 [P] invalide, non support
    ^/un_chemin(.*) /autre_chemin$1 /autre_chemin/info_chemin
    ^/un_chemin(.*) /autre_chemin$1 [R] http://cet_hote/autre_chemin/info_chemin via une redirection externe
    ^/un_chemin(.*) /autre_chemin$1 [P] sans objet, non support
    ^/un_chemin(.*) http://cet_hote/autre_chemin$1 /autre_chemin/info_chemin
    ^/un_chemin(.*) http://cet_hote/autre_chemin$1 [R] http://cet_hote/autre_chemin/info_chemin via une redirection externe
    ^/un_chemin(.*) http://cet_hote/autre_chemin$1 [P] sans objet, non support
    ^/un_chemin(.*) http://autre_hote/autre_chemin$1 http://autre_hote/autre_chemin/info_chemin via une redirection externe
    ^/un_chemin(.*) http://autre_hote/autre_chemin$1 [R] http://autre_hote/autre_chemin/info_chemin (le drapeau [R] est redondant)
    ^/somepath(.*) http://otherhost/otherpath$1 [P] http://otherhost/otherpath/pathinfo via internal proxy
    - - +
    - - - + - - - + - - - + - - - + - - - + - - - + -
    Rgle Rsultat de la substitution
    ^chemin-local(.*) autre-chemin$1 /chemin/autre-chemin/infochemin
    ^chemin-local(.*) autre-chemin$1 [R] http://cet-hte/chemin/autre-chemin/infochemin via redirection externe
    ^chemin-local(.*) autre-chemin$1 [P] n'a pas lieu d'tre, non support
    ^chemin-local(.*) /autre-chemin$1 /autre-chemin/infochemin
    ^chemin-local(.*) /autre-chemin$1 [R] http://cet-hte/autre-chemin/infochemin via redirection externe
    ^chemin-local(.*) /autre-chemin$1 [P] n'a pas lieu d'tre, non support
    ^chemin-local(.*) http://cet-hte/autre-chemin$1 /autre-chemin/infochemin
    ^chemin-local(.*) http://cet-hte/autre-chemin$1 [R] http://cet-hte/autre-chemin/infochemin via redirection externe
    ^chemin-local(.*) http://cet-hte/autre-chemin$1 [P] n'a pas lieu d'tre, non support
    ^chemin-local(.*) http://autre hte/autre-chemin$1 http://autre hte/autre-chemin/infochemin via redirection externe
    ^chemin-local(.*) http://autre hte/autre-chemin$1 [R] http://autre hte/autre-chemin/infochemin via redirection externe (le drapeau [R] est redondant)
    ^chemin-local(.*) http://autre hte/autre-chemin$1 [P] http://autre hte/autre-chemin/infochemin via un mandataire interne
    @@ -1472,7 +1621,28 @@ externe

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index c12df7f3519..1b0028f1529 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -33,7 +33,7 @@ URLs on the fly

    The mod_rewrite module uses a rule-based rewriting - engine, based on a regular-expression parser, to rewrite requested URLs on + engine, based on a PCRE regular-expression parser, to rewrite requested URLs on the fly. By default, mod_rewrite maps a URL to a filesystem path. However, it can also be used to redirect one URL to another URL, or to invoke an internal proxy fetch.

    @@ -69,7 +69,9 @@ URLs on the fly Example - LogLevel alert rewrite:trace3 + +LogLevel alert rewrite:trace3 + RewriteLog @@ -106,18 +108,19 @@ URLs on the fly all. It does not even update the SCRIPT_URx environment variables.

    -

    Use this directive to disable the module instead of - commenting out all the RewriteRule directives!

    +

    Use this directive to disable rules in a particular context, + rather than commenting out all the RewriteRule directives.

    Note that rewrite configurations are not inherited by virtual hosts. This means that you need to have a RewriteEngine on directive for each virtual host in which you wish to use rewrite rules.

    -

    RewriteMap directives of the type prg +

    RewriteMap directives + of the type prg are not started during server initialization if they're defined in a - context that does not have RewriteEngine set to + context that does not have RewriteEngine set to on

    @@ -130,8 +133,6 @@ URLs on the fly server configvirtual host directory.htaccess FileInfo -MaxRedirects is no longer available in version 2.1 and -later

    The RewriteOptions directive sets some @@ -167,12 +168,111 @@ later

    InheritBefore

    Like Inherit above, but the rules from the parent scope - are applied before rules specified in the child scope. + are applied before rules specified in the child scope.
    Available in Apache HTTP Server 2.3.10 and later.

    - +
    InheritDown
    +
    + +

    If this option is enabled, all child configurations will inherit + the configuration of the current configuration. It is equivalent to + specifying RewriteOptions Inherit in all child + configurations. See the Inherit option for more details + on how the parent-child relationships are handled.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    InheritDownBefore
    +
    + +

    Like InheritDown above, but the rules from the current + scope are applied before rules specified in any child's + scope.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    IgnoreInherit
    +
    + +

    This option forces the current and child configurations to ignore + all rules that would be inherited from a parent specifying + InheritDown or InheritDownBefore.
    + Available in Apache HTTP Server 2.4.8 and later.

    +
    + +
    AllowNoSlash
    +
    +

    By default, mod_rewrite will ignore URLs that map to a + directory on disk but lack a trailing slash, in the expectation that + the mod_dir module will issue the client with a redirect to + the canonical URL with a trailing slash.

    + +

    When the DirectorySlash directive + is set to off, the AllowNoSlash option can be enabled to ensure + that rewrite rules are no longer ignored. This option makes it possible to + apply rewrite rules within .htaccess files that match the directory without + a trailing slash, if so desired.
    + Available in Apache HTTP Server 2.4.0 and later.

    +
    + +
    AllowAnyURI
    +
    + +

    When RewriteRule + is used in VirtualHost or server context with + version 2.2.22 or later of httpd, mod_rewrite + will only process the rewrite rules if the request URI is a URL-path. This avoids + some security issues where particular rules could allow + "surprising" pattern expansions (see CVE-2011-3368 + and CVE-2011-4317). + To lift the restriction on matching a URL-path, the + AllowAnyURI option can be enabled, and + mod_rewrite will apply the rule set to any + request URI string, regardless of whether that string matches + the URL-path grammar required by the HTTP specification.
    + Available in Apache HTTP Server 2.4.3 and later.

    + + + Security Warning + +

    Enabling this option will make the server vulnerable to + security issues if used with rewrite rules which are not + carefully authored. It is strongly recommended + that this option is not used. In particular, beware of input + strings containing the '@' character which could + change the interpretation of the transformed URI, as per the + above CVE names.

    +
    +
    + +
    MergeBase
    +
    + +

    With this option, the value of RewriteBase is copied from where it's explicitly defined + into any sub-directory or sub-location that doesn't define its own + RewriteBase. This was the + default behavior in 2.4.0 through 2.4.3, and the flag to restore it is + available Apache HTTP Server 2.4.4 and later.

    +
    +
    IgnoreContextInfo
    +
    + +

    When a relative substitution is made + in directory (htaccess) context and RewriteBase has not been set, this module uses some + extended URL and filesystem context information to change the + relative substitution back into a URL. Modules such as + mod_userdir and mod_alias + supply this extended context info. Available in 2.4.16 and later.

    +
    + +
    @@ -184,8 +284,6 @@ later server configvirtual host -The choice of different dbm types is available in -Apache HTTP Server 2.0.41 and later

    The RewriteMap directive defines a @@ -219,16 +317,16 @@ Apache HTTP Server 2.0.41 and later

    For example, you might define a RewriteMap as:

    - - RewriteMap examplemap txt:/path/to/file/map.txt - + +RewriteMap examplemap "txt:/path/to/file/map.txt" +

    You would then be able to use this map in a RewriteRule as follows:

    - - RewriteRule ^/ex/(.*) ${examplemap:$1} - + +RewriteRule "^/ex/(.*)" "${examplemap:$1}" +

    The following combinations for MapType and MapSource can be used:

    @@ -278,41 +376,43 @@ Apache HTTP Server 2.0.41 and later FileInfo -

    The RewriteBase directive explicitly - sets the base URL-path (not filesystem directory path!) for per-directory rewrites - that result in the substitution of a relative path. - When you use a RewriteRule - in a .htaccess file, mod_rewrite strips off - the local directory prefix before processing, then rewrites the rest of - the URL. When the rewrite is completed, mod_rewrite - automatically adds the local directory prefix (or the - RewriteBase when set) back on to the substitution - before handing it back to the core of the server as if it were the original - URL.

    - -

    This directive is required for per-directory rewrites whose context - is a directory made available via the Alias - directive, when the substitution uses a relative path.

    - -

    If your URL path does not exist verbatim on the filesystem, - or isn't directly under your DocumentRoot, - you must use RewriteBase in every - .htaccess file where you want to use RewriteRule directives.

    +

    The RewriteBase directive specifies the + URL prefix to be used for per-directory (htaccess) + RewriteRule directives that + substitute a relative path.

    +

    This directive is required when you use a relative path + in a substitution in per-directory (htaccess) context unless any + of the following conditions are true:

    +
      +
    • The original request, and the substitution, are underneath the + DocumentRoot + (as opposed to reachable by other means, such as + Alias).
    • +
    • The filesystem path to the directory containing the + RewriteRule, + suffixed by the relative + substitution is also valid as a URL path on the server + (this is rare).
    • +
    • In Apache HTTP Server 2.4.16 and later, this directive may be + omitted when the request is mapped via + Alias + or mod_userdir.
    • +
    -

    The example below demonstrates how to map - http://example.com/myapp/index.html to - /home/www/example/newsite.html, in a .htaccess file. This - assumes that the content available at - http://example.com/ is on disk at /home/www/example/

    - -
    -RewriteEngine On
    -# The URL-path used to get to this context, not the filesystem path
    -RewriteBase /myapp/
    -RewriteRule ^index\.html$  newsite.html
    -
    -
    +

    In the example below, RewriteBase is necessary + to avoid rewriting to http://example.com/opt/myapp-1.2.3/welcome.html + since the resource was not relative to the document root. This + misconfiguration would normally cause the server to look for an "opt" + directory under the document root.

    + +DocumentRoot "/var/www/example.com" +AliasMatch "^/myapp" "/opt/myapp-1.2.3" +<Directory "/opt/myapp-1.2.3"> + RewriteEngine On + RewriteBase "/myapp/" + RewriteRule "^index\.html$" "welcome.html" +</Directory> +
    @@ -323,7 +423,7 @@ RewriteRule ^index\.html$ newsite.html Defines a condition under which rewriting will take place RewriteCond - TestString CondPattern + TestString CondPattern [flags] server configvirtual host directory.htaccess FileInfo @@ -382,26 +482,30 @@ RewriteRule ^index\.html$ newsite.html - HTTP_USER_AGENT
    - HTTP_REFERER
    + HTTP_ACCEPT
    HTTP_COOKIE
    HTTP_FORWARDED
    HTTP_HOST
    HTTP_PROXY_CONNECTION
    - HTTP_ACCEPT
    + HTTP_REFERER
    + HTTP_USER_AGENT
    + AUTH_TYPE
    + CONN_REMOTE_ADDR
    + CONTEXT_PREFIX
    + CONTEXT_DOCUMENT_ROOT
    + IPV6
    + PATH_INFO
    + QUERY_STRING
    REMOTE_ADDR
    REMOTE_HOST
    + REMOTE_IDENT
    REMOTE_PORT
    REMOTE_USER
    - REMOTE_IDENT
    REQUEST_METHOD
    SCRIPT_FILENAME
    - PATH_INFO
    - QUERY_STRING
    - AUTH_TYPE
    @@ -414,9 +518,11 @@ RewriteRule ^index\.html$ newsite.html DOCUMENT_ROOT
    + SCRIPT_GROUP
    + SCRIPT_USER
    + SERVER_ADDR
    SERVER_ADMIN
    SERVER_NAME
    - SERVER_ADDR
    SERVER_PORT
    SERVER_PROTOCOL
    SERVER_SOFTWARE
    @@ -435,12 +541,14 @@ RewriteRule ^index\.html$ newsite.html API_VERSION
    - THE_REQUEST
    - REQUEST_URI
    - REQUEST_FILENAME
    - IS_SUBREQ
    + CONN_REMOTE_ADDR
    HTTPS
    + IS_SUBREQ
    + REMOTE_ADDR
    + REQUEST_FILENAME
    REQUEST_SCHEME
    + REQUEST_URI
    + THE_REQUEST
    @@ -449,8 +557,8 @@ RewriteRule ^index\.html$ newsite.html correspond to the similarly named HTTP MIME-headers, C variables of the Apache HTTP Server or struct tm fields of the Unix system. - Most are documented elsewhere in the Manual or in - the CGI specification.

    + Most are documented here + or elsewhere in the Manual or in the CGI specification.

    SERVER_NAME and SERVER_PORT depend on the values of UseCanonicalName and @@ -458,16 +566,7 @@ RewriteRule ^index\.html$ newsite.html respectively.

    Those that are special to mod_rewrite include those below.

    -
    -
    IS_SUBREQ
    - -
    Will contain the text "true" if the request - currently being processed is a sub-request, - "false" otherwise. Sub-requests may be generated - by modules that need to resolve additional files - or URIs in order to complete their tasks.
    -
    API_VERSION
    This is the version of the Apache httpd module API @@ -479,21 +578,30 @@ RewriteRule ^index\.html$ newsite.html instance, it is 19990320:10), but is mainly of interest to module authors.
    -
    THE_REQUEST
    +
    CONN_REMOTE_ADDR
    -
    The full HTTP request line sent by the - browser to the server (e.g., "GET - /index.html HTTP/1.1"). This does not - include any additional headers sent by the - browser. This value has not been unescaped - (decoded), unlike most other variables below.
    +
    Since 2.4.8: The peer IP address of the connection (see the + mod_remoteip module).
    -
    REQUEST_URI
    +
    HTTPS
    -
    The path component of the requested URI, - such as "/index.html". This notably excludes the - query string which is available as as its own variable - named QUERY_STRING.
    +
    Will contain the text "on" if the connection is + using SSL/TLS, or "off" otherwise. (This variable + can be safely used regardless of whether or not + mod_ssl is loaded).
    + +
    IS_SUBREQ
    + +
    Will contain the text "true" if the request + currently being processed is a sub-request, + "false" otherwise. Sub-requests may be generated + by modules that need to resolve additional files + or URIs in order to complete their tasks.
    + +
    REMOTE_ADDR
    + +
    The IP address of the remote host (see the + mod_remoteip module).
    REQUEST_FILENAME
    @@ -502,29 +610,43 @@ RewriteRule ^index\.html$ newsite.html been determined by the server at the time REQUEST_FILENAME is referenced. Otherwise, such as when used in virtual host context, the same - value as REQUEST_URI. - -
    HTTPS
    - -
    Will contain the text "on" if the connection is - using SSL/TLS, or "off" otherwise. (This variable - can be safely used regardless of whether or not - mod_ssl is loaded).
    + value as REQUEST_URI. Depending on the value of + AcceptPathInfo, the + server may have only used some leading components of the + REQUEST_URI to map the request to a file. +
    REQUEST_SCHEME
    -
    Will contain the scheme of the request (ususally +
    Will contain the scheme of the request (usually "http" or "https"). This value can be influenced with ServerName.
    +
    REQUEST_URI
    + +
    The path component of the requested URI, + such as "/index.html". This notably excludes the + query string which is available as its own variable + named QUERY_STRING.
    + +
    THE_REQUEST
    + +
    The full HTTP request line sent by the + browser to the server (e.g., "GET + /index.html HTTP/1.1"). This does not + include any additional headers sent by the + browser. This value has not been unescaped + (decoded), unlike most other variables below.
    +
    -
    -

    If the TestString has the special value expr, the - CondPattern will be treated as a - ap_expr.

    +

    If the TestString has the special value expr, + the CondPattern will be treated as an + ap_expr. HTTP headers referenced in the + expression will be added to the Vary header if the novary + flag is not given.

    Other things you should be aware of:

    @@ -564,7 +686,9 @@ RewriteRule ^index\.html$ newsite.html mod_ssl is loaded, but will always expand to the empty string if it is not. Example: %{SSL:SSL_CIPHER_USEKEYSIZE} may expand to - 128. + 128. These variables are available even without + setting the StdEnvVars option of the + SSLOptions directive.
  • %{HTTP:header}, where header can be @@ -574,7 +698,7 @@ RewriteRule ^index\.html$ newsite.html the value of the HTTP header ``Proxy-Connection:''.

    If a HTTP header is used in a condition this header is added to - the Vary header of the response in case the condition evaluates to + the Vary header of the response in case the condition evaluates to true for the request. It is not added if the condition evaluates to false for the request. Adding the HTTP header to the Vary header of the response is needed for proper caching.

    @@ -583,7 +707,8 @@ RewriteRule ^index\.html$ newsite.html so that certain conditions might not be evaluated at all.

  • - %{LA-U:variable} can be used for look-aheads which perform + %{LA-U:variable} + can be used for look-aheads which perform an internal (URL-based) sub-request to determine the final value of variable. This can be used to access variable for rewriting which is not available at the current @@ -621,167 +746,198 @@ RewriteRule ^index\.html$ newsite.html
    1. You can prefix the pattern string with a - '!' character (exclamation mark) to specify a - non-matching pattern.
    2. + '!' character (exclamation mark) to negate the result + of the condition, no matter what kind of CondPattern is used. +
    3. You can perform lexicographical string comparisons: -
        -
      • '<CondPattern' (lexicographically - precedes)
        +
        +
        <CondPattern
        +
        Lexicographically precedes
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes - CondPattern.
      • + CondPattern. -
      • '>CondPattern' (lexicographically - follows)
        +
        >CondPattern
        +
        Lexicographically follows
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows - CondPattern.
      • + CondPattern. -
      • '=CondPattern' (lexicographically - equal)
        +
        =CondPattern
        +
        Lexicographically equal
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString is lexicographically equal to CondPattern (the two strings are exactly equal, character for character). If CondPattern is "" (two quotation marks) this - compares TestString to the empty string.
      • + compares TestString to the empty string. -
      • '<=CondPattern' (lexicographically - less than or equal to)
        +
        <=CondPattern
        +
        Lexicographically less than or equal to
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically precedes CondPattern, or is equal to CondPattern - (the two strings are equal, character for character).
      • + (the two strings are equal, character for character). -
      • '>=CondPattern' (lexicographically - greater than or equal to)
        +
        >=CondPattern
        +
        Lexicographically greater than or equal to
        Treats the CondPattern as a plain string and compares it lexicographically to TestString. True if TestString lexicographically follows CondPattern, or is equal to CondPattern - (the two strings are equal, character for character).
      • -
    4. + (the two strings are equal, character for character). + +
    5. You can perform integer comparisons: -
        +
        -
      • '-eq' (is numerically - equal to)
        +
        -eq
        +
        Is numerically equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if - the two are numerically equal.
      • + the two are numerically equal. -
      • '-ge' (is numerically - greater than or equal to)
        +
        -ge
        +
        Is numerically greater than or equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically greater than or equal - to the CondPattern.
      • + to the CondPattern. -
      • '-gt' (is numerically - greater than)
        +
        -gt
        +
        Is numerically greater than
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically greater than - the CondPattern.
      • + the CondPattern. -
      • '-le' (is numerically - less than or equal to)
        +
        -le
        +
        Is numerically less than or equal to
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically less than or equal to the CondPattern. Avoid confusion with the -l by using the -L or - -h variant.
      • + -h variant. -
      • '-lt' (is numerically - less than)
        +
        -lt
        +
        Is numerically less than
        The TestString is treated as an integer, and is numerically compared to the CondPattern. True if the TestString is numerically less than the CondPattern. Avoid confusion with the -l by using the -L or - -h variant.
      • + -h variant. -
      +
      -ne
      +
      Is numerically not equal to
      + The TestString is treated as an integer, and is + numerically compared to the CondPattern. True if + the two are numerically different. This is equivalent to + !-eq.
      + +
    6. You can perform various file attribute tests: -
        -
      • '-d' (is - directory)
        + + +
        + +
        -d
        + +
        Is directory.
        Treats the TestString as a pathname and tests - whether or not it exists, and is a directory.
      • + whether or not it exists, and is a directory. + + +
        -f
        + +
        Is regular file.
        -
      • '-f' (is regular - file)
        Treats the TestString as a pathname and tests - whether or not it exists, and is a regular file.
      • + whether or not it exists, and is a regular file. +
        + +
        -F
        -
      • '-F' (is existing file, via - subrequest)
        +
        Is existing file, via subrequest.
        Checks whether or not TestString is a valid file, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - - it can impact your server's performance!
      • + it can impact your server's performance! + + +
        -h
        +
        Is symbolic link, bash convention.
        + See -l. +
        -
      • '-H' (is symbolic link, bash convention)
        - See -l.
      • +
        -l
        -
      • '-l' (is symbolic - link)
        +
        Is symbolic link.
        Treats the TestString as a pathname and tests whether or not it exists, and is a symbolic link. May also use the bash convention of -L or -h if there's a possibility of confusion such as when using the -lt or - -le tests.
      • + -le tests. + -
      • '-L' (is symbolic link, bash convention)
        - See -l.
      • +
        -L
        +
        Is symbolic link, bash convention.
        + See -l.
        -
      • '-s' (is regular file, with - size)
        +
        -s
        +
        Is regular file, with size.
        Treats the TestString as a pathname and tests whether or not it exists, and is a regular file with size greater - than zero.
      • + than zero. -
      • '-U' (is existing URL, via - subrequest)
        +
        -U
        +

        Is existing URL, via subrequest.
        Checks whether or not TestString is a valid URL, accessible via all the server's currently-configured access controls for that path. This uses an internal subrequest to do the check, so use it with care - - it can impact your server's performance!

      • - -
      • '-x' (has executable - permissions)
        + it can impact your server's performance!

        +

        This flag only returns information about things + like access control, authentication, and authorization. This flag + does not return information about the status code the + configured handler (static file, CGI, proxy, etc.) would have + returned.

        + +
        -x
        +
        Has executable permissions.
        Treats the TestString as a pathname and tests whether or not it exists, and has executable permissions. These permissions are determined according to - the underlying OS.
      • + the underlying OS. -
      + + + For example: + + +RewriteCond /var/www/%{REQUEST_URI} !-f +RewriteRule ^(.+) /other/archive/$1 [R] + -Note: - All of these tests can - also be prefixed by an exclamation mark ('!') to - negate their meaning. -
    7. -
    8. +
    9. If the TestString has the special value expr, the - CondPattern will be treated as a + CondPattern will be treated as an ap_expr.

      @@ -790,19 +946,19 @@ RewriteRule ^index\.html$ newsite.html to block unwanted hotlinking.

      - - RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
      - RewriteRule ^/images - [F] -
      + +RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'" +RewriteRule "^/images" "-" [F] +
    10. +
    -
  • You can also set special flags for - CondPattern by appending +

    You can also set special flags for CondPattern by appending [flags] as the third argument to the RewriteCond directive, where flags is a comma-separated list of any of the - following flags: - + following flags:

    +
    • 'nocase|NC' (no case)
      @@ -819,14 +975,12 @@ RewriteRule ^index\.html$ newsite.html Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: - -
      -RewriteCond %{REMOTE_HOST}  ^host1  [OR]
      -RewriteCond %{REMOTE_HOST}  ^host2  [OR]
      -RewriteCond %{REMOTE_HOST}  ^host3
      +
      +RewriteCond "%{REMOTE_HOST}"  "^host1"  [OR]
      +RewriteCond "%{REMOTE_HOST}"  "^host2"  [OR]
      +RewriteCond "%{REMOTE_HOST}"  "^host3"
       RewriteRule ...some special stuff for any of these hosts...
      -
      -
      + Without this flag you would have to write the condition/rule pair three times. @@ -842,8 +996,6 @@ RewriteRule ...some special stuff for any of these hosts... is well understood.
    -
  • -

    Example:

    @@ -851,28 +1003,18 @@ RewriteRule ...some special stuff for any of these hosts... ``User-Agent:'' header of the request, you can use the following:

    - -
    -RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
    -RewriteRule  ^/$                 /homepage.max.html  [L]
    -
    -RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
    -RewriteRule  ^/$                 /homepage.min.html  [L]
    +
    +RewriteCond  "%{HTTP_USER_AGENT}"  "(iPhone|Blackberry|Android)"
    +RewriteRule  "^/$"                 "/homepage.mobile.html"  [L]
     
    -RewriteRule  ^/$                 /homepage.std.html  [L]
    -
    -
    +RewriteRule "^/$" "/homepage.std.html" [L] +

    Explanation: If you use a browser which identifies itself - as 'Mozilla' (including Netscape Navigator, Mozilla etc), then you - get the max homepage (which could include frames, or other special - features). - If you use the Lynx browser (which is terminal-based), then - you get the min homepage (which could be a version designed for - easy, text-only browsing). - If neither of these conditions apply (you use any other browser, - or your browser identifies itself as something non-standard), you get - the std (standard) homepage.

    + as a mobile browser (note that the example is incomplete, as + there are many other mobile platforms), the mobile version of + the homepage is served. Otherwise, the standard page is served. +

    @@ -896,27 +1038,41 @@ RewriteRule ^/$ /homepage.std.html [L]

    Pattern is a perl compatible regular - expression. On the first RewriteRule it is applied to the (%-decoded) - URL-path of the request; - subsequent patterns are applied to the output of the last matched - RewriteRule.

    + expression. What this pattern is compared against varies depending + on where the RewriteRule directive is defined.

    <a id="what_is_matched" name="what_is_matched">What is matched?</a> -

    In VirtualHost context, - The Pattern will initially be matched against the part of the - URL after the hostname and port, and before the query string (e.g. "/app1/index.html").

    -

    In Directory and htaccess context, - the Pattern will initially be matched against the - filesystem path, after removing the prefix that lead the server - to the current RewriteRule (e.g. "app1/index.html" - or "index.html" depending on where the directives are defined).

    +
      +
    • In VirtualHost context, + The Pattern will initially be matched against the part of the + URL after the hostname and port, and before the query string (e.g. "/app1/index.html"). + This is the (%-decoded) URL-path.

    • + +
    • In per-directory context (Directory and .htaccess), + the Pattern is matched against only a partial path, for example a request + of "/app1/index.html" may result in comparison against "app1/index.html" + or "index.html" depending on where the RewriteRule is + defined.

      + +

      The directory path where the rule is defined is stripped from the currently mapped + filesystem path before comparison (up to and including a trailing slash). + The net result of this per-directory prefix stripping is that rules in + this context only match against the portion of the currently mapped filesystem path + "below" where the rule is defined.

      + +

      Directives such as DocumentRoot and Alias, or even the + result of previous RewriteRule substitutions, determine + the currently mapped filesystem path. +

      +
    • -

      If you wish to match against the hostname, port, or query string, use a +

    • If you wish to match against the hostname, port, or query string, use a RewriteCond with the %{HTTP_HOST}, %{SERVER_PORT}, or - %{QUERY_STRING} variables respectively.

      - + %{QUERY_STRING} variables respectively.

    • +
    Per-directory Rewrites @@ -933,18 +1089,13 @@ administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewrite engine. This restriction is required for security reasons. -
  • When using the rewrite engine in .htaccess files the -per-directory prefix (which always is the same for a specific -directory) is automatically removed for the RewriteRule pattern matching -and automatically added after any relative (not starting with a -slash or protocol name) substitution encounters the end of a rule set. -See the RewriteBase +
  • See the RewriteBase directive for more information regarding what prefix will be added back to -relative substitions.
  • +relative substitutions.
  • If you wish to match against the full URL-path in a per-directory (htaccess) RewriteRule, use the %{REQUEST_URI} variable in -a RewriteCond.
  • +a RewriteCond.
  • The removed prefix always ends with a slash, meaning the matching occurs against a string which never has a leading slash. Therefore, a Pattern with ^/ never @@ -952,8 +1103,10 @@ matches in per-directory context.
  • Although rewrite rules are syntactically permitted in Location and Files sections, this -should never be necessary and is unsupported.
  • +type="section" module="core">Files sections +(including their regular expression counterparts), this +should never be necessary and is unsupported. A likely feature +to break in these contexts is relative substitutions.
    @@ -988,7 +1141,10 @@ cannot use $N in the substitution string!
    file-system path
    Designates the location on the file-system of the resource - to be delivered to the client.
    + to be delivered to the client. Substitutions are only + treated as a file-system path when the rule is configured in + server (virtualhost) context and the first component of the + path in the substitution exists in the file-system
    URL-path
    @@ -1001,7 +1157,9 @@ cannot use $N in the substitution string! you specify a Substitution string of /www/file.html, then this will be treated as a URL-path unless a directory named www - exists at the root or your file-system, in which case it will + exists at the root or your file-system (or, in the case of + using rewrites in a .htaccess file, relative to + your document root), in which case it will be treated as a file-system path. If you wish other URL-mapping directives (such as Alias) to be applied to the @@ -1027,7 +1185,7 @@ cannot use $N in the substitution string! -

    In addition to plain text, the Substition string can include

    +

    In addition to plain text, the Substitution string can include

    1. back-references ($N) to the RewriteRule @@ -1048,14 +1206,16 @@ cannot use $N in the substitution string! (N=0..9), which will be replaced by the contents of the Nth group of the matched Pattern. The server-variables are the same - as for the TestString of a RewriteCond + as for the TestString of a + RewriteCond directive. The mapping-functions come from the - RewriteMap directive and are explained there. + RewriteMap + directive and are explained there. These three types of variables are expanded in the order above.

      Rewrite rules are applied to the results of previous rewrite rules, in the order in which they are defined - in the config file. The URI or file path (see "What is matched?", above) is completely replaced by the Substitution and the rewriting process continues until all rules have been applied, @@ -1079,22 +1239,30 @@ cannot use $N in the substitution string!

      Additionally you can set special actions to be performed by appending [flags] - as the third argument to the RewriteRule + as the third argument to the RewriteRule directive. Flags is a comma-separated list, surround by square brackets, of any of the flags in the following table. More details, and examples, for each flag, are available in the Rewrite Flags document.

      - +
      - + + + + + + + + + + the environment variable VAR to be unset. + details ... @@ -1152,7 +1327,7 @@ cannot use $N in the substitution string! - @@ -1183,8 +1358,8 @@ cannot use $N in the substitution string! - @@ -1193,6 +1368,15 @@ cannot use $N in the substitution string! details ... + + + + + - - - - +
      Flag and syntax Function
      BEscape non-alphanumeric characters before applying - the transformation. Escape non-alphanumeric characters in backreferences before + applying the transformation. details ...
      backrefnoplus|BNPIf backreferences are being escaped, spaces should be escaped to + %20 instead of +. Useful when the backreference will be used in the + path component rather than the query string.details ...
      chain|C Rule is chained to the following rule. If the rule fails, @@ -1113,12 +1281,19 @@ cannot use $N in the substitution string! discarded. details ...
      ENDStop the rewriting process immediately and don't apply any + more rules. Also prevents further execution of rewrite rules + in per-directory and .htaccess context. (Available in 2.3.9 and later) + details ...
      env|E=[!]VAR[:VAL] Causes an environment variable VAR to be set (to the value VAL if provided). The form !VAR causes - the environment variable VAR to be unset.details ...
      forbidden|F
      nocase|NCMakes the pattern pattern comparison case-insensitive. + Makes the pattern comparison case-insensitive. details ...
      qsappend|QSAAppends any query string created in the rewrite target to - any query string that was in the original request URL. Appends any query string from the original request URL to + any query string created in the rewrite target.details ...
      qslast|QSLInterpret the last (right-most) question mark as the query string + delimeter, instead of the first (left-most) as normally used. + Available in 2.4.19 and later. + details + ...
      redirect|R[=code] Forces an external redirect, optionally with the specified @@ -1200,13 +1384,6 @@ cannot use $N in the substitution string! href="../rewrite/flags.html#flag_r">details ...
      ENDStop the rewriting process immediately and don't apply any - more rules. Also prevents further execution of rewrite rules - in per-directory and .htaccess context. (Available in 2.3.9 and later) - details ...
      skip|S=num Tells the rewriting engine to skip the next num @@ -1242,7 +1419,7 @@ directive.

      /somepath/pathinfo'':

      - +
      @@ -1311,13 +1488,13 @@ directive.

      Inside per-directory configuration for /somepath
      - (/physical/path/to/somepath/.htacccess, with - RewriteBase /somepath)
      + (/physical/path/to/somepath/.htaccess, with + RewriteBase "/somepath")
      for request ``GET /somepath/localpath/pathinfo'':

      -
      Given Rule Resulting Substitution
      +
      diff --git a/docs/manual/mod/mod_rewrite.xml.fr b/docs/manual/mod/mod_rewrite.xml.fr index ad6dae0f586..c0564eddf5a 100644 --- a/docs/manual/mod/mod_rewrite.xml.fr +++ b/docs/manual/mod/mod_rewrite.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -26,9 +26,9 @@ mod_rewrite -Ce module fournit un moteur de réécriture à base de -règles permettant de réécrire les URLs des requêtes -à la volée +Ce module fournit un moteur de réécriture à base de +règles permettant de réécrire les URLs des requêtes +à la voléeExtensionmod_rewrite.c @@ -36,63 +36,65 @@ règles permettant de réécrire les URLs des requêtes

      Le module mod_rewrite utilise un moteur de - réécriture à base de règles, basé sur un interpréteur - d'expressions rationnelles, pour réécrire les URLs à la volée. Par - défaut, mod_rewrite met en correspondance une URL - avec le système de fichiers. Cependant, on peut aussi l'utiliser + réécriture à base de règles, basé sur un interpréteur + d'expressions rationnelles PCRE, pour réécrire les URLs à la volée. Par + défaut, mod_rewrite met en correspondance une URL + avec le système de fichiers. Cependant, on peut aussi l'utiliser pour rediriger une URL vers une autre URL, ou pour invoquer une - requête interne à destination du mandataire.

      -

      mod_rewrite fournit une méthode souple et - puissante pour manipuler les URLs en utilisant un nombre illimité - de règles. Chaque règle peut être associée à un nombre illimité de - conditions, afin de vous permettre de réécrire les URLs en + requête interne à destination du mandataire.

      +

      mod_rewrite fournit une méthode souple et + puissante pour manipuler les URLs en utilisant un nombre illimité + de règles. Chaque règle peut être associée à un nombre illimité de + conditions, afin de vous permettre de réécrire les URLs en fonction de variables du serveur, de variables d'environnement, - d'en-têtes HTTP, ou de repères temporels.

      -

      mod_rewrite agit sur la totalité de l'URL, y - compris la partie chemin. Une règle de réécriture peut être - invoquée dans httpd.conf ou dans un fichier - .htaccess. Le chemin généré par une règle de - réécriture peut inclure une chaîne de paramètres, ou peut renvoyer + d'en-têtes HTTP, ou de repères temporels.

      +

      mod_rewrite agit sur la totalité de l'URL, y + compris la partie chemin. Une règle de réécriture peut être + invoquée dans httpd.conf ou dans un fichier + .htaccess. Le chemin généré par une règle de + réécriture peut inclure une chaîne de paramètres, ou peut renvoyer vers un traitement secondaire interne, une redirection vers une - requête externe ou vers le mandataire interne.

      + requête externe ou vers le mandataire interne.

      -

      Vous trouverez d'avantage de détails, discussions et exemples +

      Vous trouverez d'avantage de détails, discussions et exemples dans la - documentation détaillée + documentation détaillée sur mod_rewrite.

      Journalisation -

      mod_rewrite offre une journalisation détaillée - de ses actions aux niveaux de journalisation trace1 à - trace8. Le niveau de journalisation peut être défini de - manière spécifique à mod_rewrite via la directive +

      mod_rewrite offre une journalisation détaillée + de ses actions aux niveaux de journalisation trace1 à + trace8. Le niveau de journalisation peut être défini de + manière spécifique à mod_rewrite via la directive LogLevel : jusqu'au niveau - debug aucune action n'est journalisée, alors qu'elles + debug aucune action n'est journalisée, alors qu'elles le sont pratiquement toutes au niveau trace8.

      - L'utilisation d'un niveau de journalisation élevé pour + L'utilisation d'un niveau de journalisation élevé pour mod_rewrite va ralentir votre serveur HTTP Apache - de manière dramatique ! N'utilisez un niveau de journalisation - supérieur à trace2 qu'à des fins de débogage ! + de manière dramatique ! N'utilisez un niveau de journalisation + supérieur à trace2 qu'à des fins de débogage ! Exemple - LogLevel alert rewrite:trace3 + +LogLevel alert rewrite:trace3 + RewriteLog -

      Ceux qui sont familiers avec les versions précédentes de +

      Ceux qui sont familiers avec les versions précédentes de mod_rewrite vont probablement rechercher en vain les directives RewriteLog et - RewriteLogLevel. Elles ont été en effet remplacées + RewriteLogLevel. Elles ont été en effet remplacées par une configuration de la journalisation par module, comme - mentionné plus haut. + mentionné plus haut.

      -

      Pour extraire les traces spécifiques à +

      Pour extraire les traces spécifiques à mod_rewrite, affichez le fichier journal en redirigeant la sortie vers grep :

      @@ -104,8 +106,8 @@ règles permettant de réécrire les URLs des requêtes RewriteEngine -Active ou désactive l'exécution du -moteur de réécriture +Active ou désactive l'exécution du +moteur de réécriture RewriteEngine on|off RewriteEngine off server configvirtual host @@ -115,26 +117,27 @@ moteur de réécriture

      La directive RewriteEngine active ou - désactive l'exécution du moteur de réécriture. Si sa valeur est - off, ce module n'exécutera aucun traitement et ne - mettra pas à jour les variables d'environnement + désactive l'exécution du moteur de réécriture. Si sa valeur est + off, ce module n'exécutera aucun traitement et ne + mettra pas à jour les variables d'environnement SCRIPT_URx.

      -

      Pour désactiver le module, il vaut mieux utiliser cette - directive que commenter toutes les directives RewriteRule !

      +

      Plutôt que de commenter toutes les directives RewriteRule, il est préférable + d'utiliser cette directive si l'on souhaite désactiver les + règles de réécriture dans un contexte particulier.

      -

      Notez que les hôtes virtuels n'héritent pas des - configurations de réécriture. Ceci implique que vous devez - insérer une directive RewriteEngine on dans chaque - hôte virtuel pour lequel vous souhaitez utiliser des règles - de réécriture.

      +

      Notez que les hôtes virtuels n'héritent pas des + configurations de réécriture. Ceci implique que vous devez + insérer une directive RewriteEngine on dans chaque + hôte virtuel pour lequel vous souhaitez utiliser des règles + de réécriture.

      -

      Les directives RewriteMap du type +

      Les directives RewriteMap du type prg ne sont pas prises en compte au cours de - l'initialisation du serveur si elle ont été définies dans un - contexte où la directive RewriteEngine n'a - pas été définie à on.

      + l'initialisation du serveur si elle ont été définies dans un + contexte où la directive RewriteEngine n'a + pas été définie à on.

      @@ -142,54 +145,168 @@ moteur de réécriture RewriteOptions -Configure certaines options spéciales -pour le moteur de réécriture +Configure certaines options spéciales +pour le moteur de réécriture RewriteOptions Options server configvirtual host directory.htaccess FileInfo -MaxRedirects n'est plus disponible depuis -la version version 2.1 -

      La directive RewriteOptions définit - certaines options spéciales pour la configuration au niveau du - serveur ou du répertoire. La chaîne de caractères Option +

      La directive RewriteOptions définit + certaines options spéciales pour la configuration au niveau du + serveur ou du répertoire. La chaîne de caractères Option ne peut actuellement prendre qu'une des valeurs suivantes :

      Inherit
      -

      Ceci force la configuration locale à hériter de la - configuration du niveau supérieur. Dans le contexte des hôtes +

      Ceci force la configuration locale à hériter de la + configuration du niveau supérieur. Dans le contexte des hôtes virtuels, cela signifie que les correspondances, conditions et - règles du serveur principal sont héritées. Dans le contexte des - répertoires, cela signifie que les conditions et règles de la + règles du serveur principal sont héritées. Dans le contexte des + répertoires, cela signifie que les conditions et règles de la configuration .htaccess ou les sections Directory du répertoire - parent sont héritées. Les règles héritées sont virtuellement - copiées dans la section où cette directive est utilisée. Si elles - sont utilisées avec des règles locales, les règles héritées sont - placées après ces dernières. La place de cette directive - avant - ou après les règles locales - n'a aucune influence sur ce - comportement. Si des règles locales ont forcé l'arrêt de la - réécriture, les règles héritées ne seront pas traitées.

      + type="section" module="core">Directory du répertoire + parent sont héritées. Les règles héritées sont virtuellement + copiées dans la section où cette directive est utilisée. Si elles + sont utilisées avec des règles locales, les règles héritées sont + placées après ces dernières. La place de cette directive - avant + ou après les règles locales - n'a aucune influence sur ce + comportement. Si des règles locales ont forcé l'arrêt de la + réécriture, les règles héritées ne seront pas traitées.

      - Les règles héritées du niveau parent sont appliquées - after après les règles spécifiées dans le niveau + Les règles héritées du niveau parent sont appliquées + after après les règles spécifiées dans le niveau enfant.
      InheritBefore
      -

      Même effet que l'option Inherit ci-dessus, mais - les règles spécifiées dans le niveau parent s'appliquent - avant les règles spécifiées dans le niveau - enfant. Disponible depuis la version 2.3.10 du serveur HTTP - Apache.

      +

      Même effet que l'option Inherit ci-dessus, mais + les règles spécifiées dans le niveau parent s'appliquent + avant les règles spécifiées dans le niveau + enfant.
      + Disponible depuis la version 2.3.10 du serveur HTTP Apache.

      +
      + +
      InheritDown
      +
      + +

      Si cette option est activée, toutes les configurations enfants + hériteront de la configuration courante. Il en est de même si l'on + spécifie RewriteOptions Inherit dans toutes les + configurations enfants. Voir l'option Inherit pour + plus de détails à propos de la manière dont les relations + parent-enfants sont traitées.
      + Cette option est disponible à partir + de la version 2.4.8 du serveur HTTP Apache.

      +
      + +
      InheritDownBefore
      +
      + +

      L'effet de cette option est équivalent à celui de l'option + InheritDown ci-dessus, mais les règles de la + configuration parente s'appliquent avant toute + règle de la configuration enfant.
      + Cette option est disponible à partir + de la version 2.4.8 du serveur HTTP Apache.

      +
      + +
      IgnoreInherit
      +
      + +

      Si cette option est activée, les configurations courante et + enfants ignoreront toute règle héritée d'une configuration parente + via les options InheritDown ou + InheritDownBefore.
      + Cette option est disponible à partir + de la version 2.4.8 du serveur HTTP Apache.

      +
      + +
      AllowNoSlash
      +
      +

      Par défaut, mod_rewrite ignore les URLs qui + correspondent à un répertoire sur disque, mais ne comportent pas + de slash final, afin que le module mod_dir + redirige le client vers l'URL canonique avec un slash final.

      + +

      Lorsque la directive DirectorySlash est définie à off, il + est possible de spécifier l'option AllowNoSlash pour + s'assurer que les règles de réécriture ne soient plus ignorées. + Si on le souhaite, cette option permet de faire s'appliquer des + règles de réécriture qui correspondent à un répertoire sans slash + final au sein de fichiers .htaccess.
      + Elle est disponible à + partir de la version 2.4.0 du serveur HTTP Apache.

      +
      + +
      AllowAnyURI
      +
      + +

      A partir de la version 2.2.22 de httpd, lorsqu'une directive RewriteRule se situe dans un + contexte de serveur virtuel ou de serveur principal, + mod_rewrite ne traitera les règles de réécriture + que si l'URI de la requête respecte la syntaxe d'un chemin URL. Ceci permet + d'éviter certains problèmes de sécurité où des règles + particulières pourraient permettre des développements de modèles + inattendus (voir CVE-2011-3368 + et CVE-2011-4317). + Pour s'affranchir de la restriction relative à la syntaxe des chemins URL, on peut + utiliser l'option AllowAnyURI, afin de permettre à + mod_rewrite d'appliquer le jeu de règles à toute + chaîne de requête URI, sans vérifier si cette dernière respecte la + grammaire des chemins URL définie dans la spécification HTTP.
      + Disponible depuis la version 2.4.3 du serveur HTTP Apache.

      + + + Avertissement à propos de la sécurité + +

      L'utilisation de cette option rendra le serveur vulnérable à + certains problèmes de sécurité si les règles de réécritures + concernées n'ont pas été rédigées avec soin. Il est par conséquent + fortement recommandé de ne pas utiliser cette + option. En particulier, prêtez attention aux chaînes en entrée contenant le + caractère '@', qui peuvent modifier l'interprétation + de l'URI réécrite, comme indiqué dans les liens ci-dessus.

      +
      +
      + +
      MergeBase
      +
      + +

      Avec cette option, la valeur de la directive RewriteBase est recopiée depuis + une valeur explicitement définie dans tout sous-répertoire qui ne + définit pas sa propre directive RewriteBase. Il s'agissait du + comportement par défaut avec les versions 2.4.0 à 2.4.3, et ce + drapeau qui permet de retrouver ce comportement est disponible + depuis la version 2.4.4 du serveur HTTP Apache.

      +
      + +
      IgnoreContextInfo
      +
      + +

      Lors d'une + substitution relative dans un contexte de répertoire (htaccess), + et si la directive RewriteBase n'a pas été définie, + ce module utilise des informations en provenance d'une extension + d'URL et du contexte du système de fichiers pour transformer la + sustitution relative en URL. Par exemple, les modules + mod_userdir et mod_alias + utilisent ces informations de contexte étendu. Disponible à partir de la + version 2.4.16 du serveur HTTP Apache.

      @@ -199,104 +316,98 @@ la version version 2.1 RewriteMap -Définit une fonction de mise en correspondance pour la -recherche de mots-clés -RewriteMap nom de la correspondance type de -correspondance:source de la correspondance +Définit une fonction de mise en correspondance pour la +recherche de mots-clés +RewriteMap MapName MapType:MapSource server configvirtual host -Il est possible de choisir entre plusieurs types de -bases de données depuis la version 2.0.41 du serveur HTTP Apache -

      La directive RewriteMap définit une - Table de correspondance pour la réécriture que les +

      La directive RewriteMap définit une + Table de correspondance pour la réécriture que les fonctions de mise en correspondance - peuvent utiliser dans les chaînes de substitution des règles - pour insérer/substituer des champs en recherchant des mots-clés. - La source utilisée pour cette recherche peut être de plusieurs + peuvent utiliser dans les chaînes de substitution des règles + pour insérer/substituer des champs en recherchant des mots-clés. + La source utilisée pour cette recherche peut être de plusieurs types.

      -

      nom de la - correspondance est le nom de la table de correspondance - et servira à spécifier une fonction de mise en correspondance - pour les chaînes de substitution d'une règle de réécriture selon +

      MapName est le nom de la table de correspondance + et servira à spécifier une fonction de mise en correspondance + pour les chaînes de substitution d'une règle de réécriture selon une des constructions suivantes :

      - ${ nom de la - correspondance : - mot-clé }
      - ${ nom de la - correspondance : - mot-clé | valeur par défaut + ${ MapName : + mot-clé }
      + ${ MapName : + mot-clé | valeur par défaut }

      -

      Lorsqu'une telle construction est rencontrée, la table de - correspondance Nom de la correspondance est consultée - et la clé mot-clé recherchée. Si la clé est trouvée, la - construction est remplacée par - la valeur de remplacement. Si la clé n'est pas trouvée, - elle est remplacée par la valeur par défaut, ou par une - chaîne vide si aucune valeur par défaut n'est - spécifiée. La valeur vide se comporte comme si la - clé était absente ; il est donc impossible de distinguer une - valeur vide d'une absence de clé.

      - -

      Par exemple, vous pouvez définir une directive +

      Lorsqu'une telle construction est rencontrée, la table de + correspondance MapName est consultée + et la clé mot-clé recherchée. Si la clé est trouvée, la + construction est remplacée par + la valeur de remplacement. Si la clé n'est pas trouvée, + elle est remplacée par la valeur par défaut, ou par une + chaîne vide si aucune valeur par défaut n'est + spécifiée. La valeur vide se comporte comme si la + clé était absente ; il est donc impossible de distinguer une + valeur vide d'une absence de clé.

      + +

      Par exemple, vous pouvez définir une directive RewriteMap comme suit

      - - RewriteMap map-exemple txt:/chemin/vers/fichier/map.txt - + + RewriteMap map-exemple "txt:/chemin/vers/fichier/map.txt" +

      Vous pourrez ensuite utiliser cette table dans une directive RewriteRule comme suit :

      - - RewriteRule ^/ex/(.*) ${map-exemple:$1} - + + RewriteRule "^/ex/(.*)" "${map-exemple:$1}" +

      Les combinaisons suivantes pour type de correspondance - et source de la correspondance - peuvent être utilisées :

      + et MapSource + peuvent être utilisées :

      txt
      -
      Un fichier texte contenant des paires clé-valeur séparées +
      Un fichier texte contenant des paires clé-valeur séparées par des espaces, une paire par ligne (Détails ...).
      + href="../rewrite/rewritemap.html#txt">Détails ...).
      rnd
      -
      Sélection aléatoire d'une entrée depuis un fichier texte (Détails ...).
      +
      Sélection aléatoire d'une entrée depuis un fichier texte (Détails ...).
      dbm
      -
      Recherche une entrée dans un fichier dbm contenant des - paires nom-valeur. Le condensé hash est élaboré à partir d'un +
      Recherche une entrée dans un fichier dbm contenant des + paires nom-valeur. Le condensé hash est élaboré à partir d'un format de fichier texte via l'utilitaire httxt2dbm (Détails ...).
      + href="../rewrite/rewritemap.html#dbm">Détails ...).
      int
      Une des quatre fonctions internes disponibles que fournit RewriteMap: toupper, tolower, escape ou unescape - (Détails ...).
      + (Détails ...).
      prg
      Appelle un programme externe ou un script pour effectuer la - réécriture (Détails + réécriture (Détails ...).
      dbd or fastdbd
      -
      Une commande SQL SELECT à exécuter pour rechercher la cible - de réécriture (Détails +
      Une commande SQL SELECT à exécuter pour rechercher la cible + de réécriture (Détails ...).
      -

      Vous trouverez plus de détails et de nombreux exemples dans le Vous trouverez plus de détails et de nombreux exemples dans le RewriteMap HowTo.

      @@ -304,59 +415,58 @@ href="../rewrite/rewritemap.html">RewriteMap HowTo.

      RewriteBase -Définit l'URL de base pour les réécritures au niveau -répertoire -RewriteBase chemin URL -Pas de valeur par défaut +Définit l'URL de base pour les réécritures au niveau +répertoire +RewriteBase chemin_URL +Pas de valeur par défaut directory.htaccess FileInfo -

      La directive RewriteBase définit - explicitement le chemin URL de base (et non le chemin du - répertoire dans le système de fichiers !) pour les réécritures dans un contexte - de répertoire dont le résultat est la substitution d'un - chemin relatif. Lorsque vous utilisez une directive RewriteRule dans un fichier - .htaccess, mod_rewrite enlève le - préfixe de répertoire local avant d'effectuer le traitement, puis - réécrit ce qui reste de l'URL. Lorsque la réécriture est terminée, - mod_rewrite ajoute automatiquement le préfixe de - répertoire local (ou la valeur de la directive - RewriteBase si cette dernière est définie) - à la chaîne de substitution avant de la remettre à disposition du - serveur, comme s'il s'agissait de l'URL d'origine.

      - -

      Cette directive est requise pour les réécritures - dans un contexte de répertoire défini via la directive - Alias lorsque la - substitution utilise un chemin relatif.

      - -

      Si votre chemin URL n'existe pas réellement dans le système de - fichiers, ou ne trouve pas directement sous le répertoire défini - par la directive DocumentRoot, vous devez utiliser la - directive RewriteBase dans chaque fichier - .htaccess où vous voulez utiliser des directives RewriteRule.

      - -

      L'exemple ci-dessous montre comment faire correspondre - http://example.com/mon-appli/index.html à - /home/www/exemple/nouveau_site.html dans un fichier - .htaccess. On suppose que le contenu disponible à - http://example.com/ se situe sur le disque à - /home/www/exemple/.

      - - -
      -RewriteEngine On
      -# Le chemin URL utilisé pour arriver dans ce contexte, et non le chemin
      -# du système de fichiers
      -RewriteBase /mon-appli/
      -RewriteRule ^index\.html$  nouveau_site.html
      -
      -
      +

      La directive RewriteBase permet de + spécifier le préfixe d'URL à utiliser dans un contexte de + répertoire (htaccess) pour les directives + RewriteRule qui réécrivent vers un chemin + relatif.

      +

      Cette directive est obligatoire si vous utilisez un + chemin relatif dans une substitution, et dans un contexte de + répertoire (htaccess), sauf si au moins une de ces conditions est + vérifiée :

      +
        +
      • La requête initiale, ainsi que la substitution, se + situent par raport à la valeur de la directive + DocumentRoot (c'est à + dire que pour y accéder, il n'est pas nécessaire d'utiliser + une directive telle qu'Alias).
      • +
      • Le chemin du système de fichiers vers le répertoire + contenant la RewriteRule, suffixé par + la substitution relative est aussi valide en tant qu'URL sur + le serveur (ce qui est rare).
      • +
      • A partir de la version 2.4.16 du serveur HTTP Apache, + cette directive peut être omise lorsque la requête est mise en + correspondance avec le système de fichiers via la directive + Alias ou le module + mod_userdir.
      • +
      + +

      Dans l'exemple ci-dessous, la directive +RewriteBase est nécessaire afin d'éviter une +réécriture en http://example.com/opt/myapp-1.2.3/welcome.html car la +ressource n'était pas relative à la racine des documents. Cette erreur +de configuration aurait conduit le serveur à rechercher un répertoire +"opt" à la racine des documents.

      + + +DocumentRoot "/var/www/example.com" +AliasMatch "^/myapp" "/opt/myapp-1.2.3" +<Directory "/opt/myapp-1.2.3"> + RewriteEngine On + RewriteBase "/myapp/" + RewriteRule "^index\.html$" "welcome.html" +</Directory> +
      @@ -364,105 +474,111 @@ RewriteRule ^index\.html$ nouveau_site.html RewriteCond -Définit une condition qui devra être satisfaite pour que -la réécriture soit effectuée +Définit une condition qui devra être satisfaite pour que +la réécriture soit effectuée RewriteCond - chaîne de test expression de comparaison + chaîne_de_test expression_de_comparaison [drapeaux]
      server configvirtual host directory.htaccess FileInfo -

      La directive RewriteCond permet de définir une - condition d'exécution d'une règle. Une ou plusieurs conditions - RewriteCond peuvent précéder une +

      La directive RewriteCond permet de définir une + condition d'exécution d'une règle. Une ou plusieurs conditions + RewriteCond peuvent précéder une directive RewriteRule. La règle de réécriture correspondante n'est - ainsi exécutée que si ces conditions sont satisfaites, - et si l'URI correspond au modèle spécifié dans la - règle.

      + >RewriteRule. La règle de réécriture correspondante n'est + ainsi exécutée que si ces conditions sont satisfaites, + et si l'URI correspond au modèle spécifié dans la + règle.

      -

      TestString est une chaîne qui peut contenir les +

      TestString est une chaîne qui peut contenir les extensions suivantes en plus du texte simple :

      • - références arrières de règle de réécriture : - ce sont des références arrières de la forme - $N (0 <= N <= 9). $1 à $9 - permettent d'accéder aux parties regroupées (entre - parenthèses) du modèle, issues de la RewriteRule - concernée par le jeu de conditions RewriteCond - courant. $0 donne accès à l'ensemble de la chaîne - correspondant au modèle.
      • + références arrières de règle de réécriture : + ce sont des références arrières de la forme + $N (0 <= N <= 9). $1 à $9 + permettent d'accéder aux parties regroupées (entre + parenthèses) du modèle, issues de la RewriteRule + concernée par le jeu de conditions RewriteCond + courant. $0 donne accès à l'ensemble de la chaîne + correspondant au modèle.
      • - Références arrières de condition de réécriture - : ce sont des références arrières de la forme - %N (0 <= N <= 9). %1 à %9 - permettent d'accéder aux parties regroupées (entre - parenthèses) du modèle, issues de la RewriteRule - concernée par le jeu de conditions RewriteCond - courant. %0 donne accès à l'ensemble de la chaîne - correspondant au modèle.
      • + Références arrières de condition de réécriture + : ce sont des références arrières de la forme + %N (0 <= N <= 9). %1 à %9 + permettent d'accéder aux parties regroupées (entre + parenthèses) du modèle, issues de la dernière + condition RewriteCond satisfaite du jeu de conditions RewriteCond + courant. %0 donne accès à l'ensemble de la chaîne + correspondant au modèle.
      • - extensions de table de réécriture : + extensions de table de réécriture : ce sont des extensions de la forme ${nomTable:clé|défaut}. Voir la ${nomTable:clé|défaut}. Voir la href="#mapfunc">documentation sur RewriteMap - pour plus de détails. + pour plus de détails.
      • Variables du serveur : ce sont des variables de la forme %{ NAME_OF_VARIABLE }, - où NOM_DE_VARIABLE peut contenir une chaîne issue + où NOM_DE_VARIABLE peut contenir une chaîne issue de la liste suivante :
      Given Rule
      - + - +
      En-têtes HTTP : connexion & requête: En-têtes HTTP : connexion & requête:
      - HTTP_USER_AGENT
      - HTTP_REFERER
      + HTTP_ACCEPT
      HTTP_COOKIE
      HTTP_FORWARDED
      HTTP_HOST
      HTTP_PROXY_CONNECTION
      - HTTP_ACCEPT
      + HTTP_REFERER
      + HTTP_USER_AGENT
      + AUTH_TYPE
      + CONN_REMOTE_ADDR
      + CONTEXT_PREFIX
      + CONTEXT_DOCUMENT_ROOT
      + IPV6
      + PATH_INFO
      + QUERY_STRING
      REMOTE_ADDR
      REMOTE_HOST
      + REMOTE_IDENT
      REMOTE_PORT
      REMOTE_USER
      - REMOTE_IDENT
      REQUEST_METHOD
      SCRIPT_FILENAME
      - PATH_INFO
      - QUERY_STRING
      - AUTH_TYPE
      variables internes au serveur : date et heure : spéciaux :variables internes au serveur : date et heure : spéciaux :
      DOCUMENT_ROOT
      + SCRIPT_GROUP
      + SCRIPT_USER
      + SERVER_ADDR
      SERVER_ADMIN
      SERVER_NAME
      - SERVER_ADDR
      SERVER_PORT
      SERVER_PROTOCOL
      SERVER_SOFTWARE
      @@ -481,103 +597,124 @@ la réécriture soit effectuée
      API_VERSION
      - THE_REQUEST
      - REQUEST_URI
      - REQUEST_FILENAME
      - IS_SUBREQ
      + CONN_REMOTE_ADDR
      HTTPS
      - REQUEST_SCHEME
      + IS_SUBREQ
      + REMOTE_ADDR
      + REQUEST_FILENAME
      + REQUEST_SCHEME
      + REQUEST_URI
      + THE_REQUEST
      -

      Ces variables correspondent toutes aux en-têtes MIME - HTTP de mêmes noms, au variables C du serveur HTTP Apache, ou - aux champs struct tm du système Unix. La - plupart d'entre elles sont documentées ailleurs dans le - manuel ou dans la spécification CGI.

      +

      Ces variables correspondent toutes aux en-têtes MIME + HTTP de mêmes noms, au variables C du serveur HTTP Apache, ou + aux champs struct tm du système Unix. La + plupart d'entre elles sont documentées ici, dans la + spécification CGI ou ailleurs dans le + manuel.

      -

      SERVER_NAME et SERVER_PORT dépendent respectivement +

      SERVER_NAME et SERVER_PORT dépendent respectivement des valeurs des directives UseCanonicalName et UseCanonicalPhysicalPort.

      Parmi les variables - spécifiques à mod_rewrite, ou trouve les suivantes :

      - + spécifiques à mod_rewrite, ou trouve les suivantes :

      +
      -
      IS_SUBREQ
      - -
      Contient le texte "true" si la requête en cours - de traitement est une sous-requête, "false" dans le - cas contraire. Une sous-requête est générée quand un - module a besoin de se référer à des fichiers ou URIs - addidionnels pour pouvoir mener à bien sa tâche.
      -
      API_VERSION
      C'est la version de l'API des modules Apache httpd (l'interface interne entre le serveur et les modules) pour la construction courante de httpd, telle qu'elle - est définie dans include/ap_mmn.h. La version de l'API - des modules correspond à la version du serveur Apache + est définie dans include/ap_mmn.h. La version de l'API + des modules correspond à la version du serveur Apache httpd - utilisé (par exemple, pour la version 1.3.14 d'Apache + utilisé (par exemple, pour la version 1.3.14 d'Apache httpd, - il s'agit de la version 19990320:10), mais intéresse + il s'agit de la version 19990320:10), mais intéresse principalement les auteurs de modules.
      -
      THE_REQUEST
      +
      CONN_REMOTE_ADDR
      -
      La ligne de requête HTTP complète envoyée par le - navigateur au serveur (par exemple, "GET - /index.html HTTP/1.1"), à l'exclusion de tout - en-tête ajouté par le navigateur. Cette - valeur n'a pas été déséchappée (décodée), à la - différence de la plupart des variables suivantes.
      +
      A partir de la version 2.4.8 : l'adresse IP distante de + la connexion (voir le module + mod_remoteip).
      -
      REQUEST_URI
      +
      HTTPS
      -
      La partie chemin de l'URI de la requête, comme - "/index.html". En particulier, ceci exclut la chaîne - de paramètres qui est quant à elle disponible via sa - propre variable QUERY_STRING.
      +
      Contient le texte "on" si la connexion + utilise SSL/TLS, "off" dans le cas contraire + (Cette variable peut être utilisée sans problème, que + mod_ssl soit chargé ou non).
      + +
      IS_SUBREQ
      + +
      Contient le texte "true" si la requête en cours + de traitement est une sous-requête, "false" dans le + cas contraire. Une sous-requête est générée quand un + module a besoin de se référer à des fichiers ou URIs + addidionnels pour pouvoir mener à bien sa tâche.
      + +
      REMOTE_ADDR
      +
      L'adresse IP de l'hôte distant (se référer au + module mod_remoteip).
      REQUEST_FILENAME
      -
      Le chemin complet local au système de fichiers +
      Le chemin complet local au système de fichiers du fichier ou du script correspondant - à la requête, s'il a déjà été déterminé par le serveur - au moment où on y fait référence. Dans le cas + à la requête, s'il a déjà été déterminé par le serveur + au moment où on y fait référence. Dans le cas contraire, et en particulier dans le cas d'un serveur virtuel, REQUEST_FILENAME contient la - valeur de REQUEST_URI.
      - -
      HTTPS
      - -
      Contient le texte "on" si la connexion - utilise SSL/TLS, "off" dans le cas contraire - (Cette variable peut être utilisée sans problème, que - mod_ssl soit chargé ou non.
      + valeur de REQUEST_URI. En fonction de la + valeur de la directive AcceptPathInfo, le serveur + peut n'utiliser que certains éléments de tête du + REQUEST_URI pour déterminer à quel + fichier correspond la requête.
      REQUEST_SCHEME
      -
      Contient le protocole de la requête (en général - "http" ou "https"). La valeur peut être modifiée par +
      Contient le protocole de la requête (en général + "http" ou "https"). La valeur peut être modifiée par la directive ServerName.
      +
      REQUEST_URI
      + +
      La partie chemin de l'URI de la requête, comme + "/index.html". Ceci exclut en particulier la chaîne de + paramètres de la requête qui est contenue dans la + variable QUERY_STRING.
      + +
      THE_REQUEST
      + +
      La ligne de requête HTTP complète envoyée par le + navigateur au serveur (par exemple, "GET + /index.html HTTP/1.1"), à l'exclusion de tout + en-tête ajouté par le navigateur. Cette + valeur n'a pas été déséchappée (décodée), à la + différence de la plupart des variables suivantes.
      -
      + -

      Si la chaîne de test contient la valeur spéciale - expr, expression de comparaison sera traité +

      Si la chaîne_de_test contient la valeur spéciale + expr, expression_de_comparaison sera traité en tant qu'expression rationnelle de type ap_expr.

      + href="../expr.html">ap_expr. Si des en-têtes HTTP sont + référencés dans l'expression rationnelle, et si le drapeau + novary n'est pas activé, ils seront ajoutés à + l'en-tête Vary.

      -

      Autres points à connaître ::

      +

      Autres points à connaître ::

      1. Les variables SCRIPT_FILENAME et @@ -585,376 +722,391 @@ la réécriture soit effectuée du champ filename de la structure interne request_recdu serveur HTTP Apache. Le premier nom correspond au nom de variable bien connu CGI, - alors que le second est l'équivalent de REQUEST_URI (qui + alors que le second est l'équivalent de REQUEST_URI (qui contient la valeur du champ uri de request_rec).

        -

        Si une substitution intervient et si la réécriture se - poursuit, la valeur des deux variables sera mise à jour en - conséquence.

        -

        Dans le contexte du serveur principal (c'est à dire avant que - la requête ne soit mise en correspondance avec le système de +

        Si une substitution intervient et si la réécriture se + poursuit, la valeur des deux variables sera mise à jour en + conséquence.

        +

        Dans le contexte du serveur principal (c'est à dire avant que + la requête ne soit mise en correspondance avec le système de fichiers), SCRIPT_FILENAME et REQUEST_FILENAME ne peuvent pas - contenir le chemin entier dans le système de fichiers local car - ce chemin b'est pas connu à ce stade du traitement. Dans ce cas, + contenir le chemin entier dans le système de fichiers local car + ce chemin b'est pas connu à ce stade du traitement. Dans ce cas, les deux variables contiendront la valeur de REQUEST_URI. Pour - obtenir le chemin complet de la requête dans le système de + obtenir le chemin complet de la requête dans le système de fichiers local dans le contexte du serveur principal, utilisez une - référence avant à base d'URL - %{LA-U:REQUEST_FILENAME} pour déterminer la valeur + référence avant à base d'URL + %{LA-U:REQUEST_FILENAME} pour déterminer la valeur finale de REQUEST_FILENAME.

      2. - %{ENV:variable}, où variable peut - correspondre à une variable d'environnement quelconque.
      3. + %{ENV:variable}, où variable peut + correspondre à une variable d'environnement quelconque.
      4. - %{ENV:variable} est aussi disponible, où - variable peut correspondre à toute variable - d'environnement. Peut être consulté via des structures internes + %{ENV:variable} est aussi disponible, où + variable peut correspondre à toute variable + d'environnement. Peut être consulté via des structures internes d'Apache httpd et (si on ne les trouve pas ici) via la fonction - getenv() à partir du processus du serveur Apache + getenv() à partir du processus du serveur Apache httpd.
      5. -
      6. Que mod_ssl soit chargé ou non, on peut - utiliser %{SSL:variable}, où variable - peut être remplacé par le nom d'une +
      7. Que mod_ssl soit chargé ou non, on peut + utiliser %{SSL:variable}, où variable + peut être remplacé par le nom d'une variable d'environnement SSL . Si mod_ssl n'est pas - chargé, cette variable contiendra toujours une chaîne vide. + chargé, cette variable contiendra toujours une chaîne vide. Exemple : %{SSL:SSL_CIPHER_USEKEYSIZE} pourra - contenir la valeur 128.
      8. + contenir la valeur 128. Ces variables sont + disponibles même si l'option StdEnvVars de la + directive SSLOptions n'a + pas été définie.
      9. - On peut utiliser %{HTTP:en-tête}, où - en-tête peut correspondre à tout nom d'en-tête MIME - HTTP, pour extraire la valeur d'un en-tête envoyé dans la - requête HTTP. Par exemple, %{HTTP:Proxy-Connection} - contiendra la valeur de l'en-tête HTTP + On peut utiliser %{HTTP:en-tête}, où + en-tête peut correspondre à tout nom d'en-tête MIME + HTTP, pour extraire la valeur d'un en-tête envoyé dans la + requête HTTP. Par exemple, %{HTTP:Proxy-Connection} + contiendra la valeur de l'en-tête HTTP "Proxy-Connection:". - Si on utilise un en-tête HTTP - dans une condition, et si cette condition est évaluée à - vrai pour la requête, cet en-tête sera ajouté à l'en-tête Vary de - la réponse. Il ne le sera pas si la condition est évaluée à - faux. L'ajout de l'en-tête HTTP à l'en-tête Vary - est nécessaire à une mise en cache appropriée. -

        Il faut garder à l'esprit que les conditions suivent une + Si on utilise un en-tête HTTP + dans une condition, et si cette condition est évaluée à + vrai pour la requête, cet en-tête sera ajouté à l'en-tête Vary de + la réponse. Il ne le sera pas si la condition est évaluée à + faux. L'ajout de l'en-tête HTTP à l'en-tête Vary + est nécessaire à une mise en cache appropriée. +

        Il faut garder à l'esprit que les conditions suivent une logique de cout-circuit si le drapeau - 'ornext|OR' est utilisé, et que de - ce fait, certaines d'entre elles ne seront pas évaluées.

        + 'ornext|OR' est utilisé, et que de + ce fait, certaines d'entre elles ne seront pas évaluées.

      10. -
      11. A des fins de référence avant, on peut utiliser, - %{LA-U:variable}, qui - permet d'effectuer une sous-requête interne à base d'URL, afin - de déterminer la valeur finale de variable. Ceci permet - d'accéder à la valeur d'une variable pour la réécriture inconnue - à ce stade du traitement, mais qui sera définie au - cours d'une phase ultérieure. -

        Par exemple, pour effectuer une réécriture dépendant de la +

      12. A des fins de référence avant, on peut utiliser, + %{LA-U:variable}, qui + permet d'effectuer une sous-requête interne à base d'URL, afin + de déterminer la valeur finale de variable. Ceci permet + d'accéder à la valeur d'une variable pour la réécriture inconnue + à ce stade du traitement, mais qui sera définie au + cours d'une phase ultérieure. +

        Par exemple, pour effectuer une réécriture dépendant de la variable REMOTE_USER dans le contexte du serveur principal (fichier httpd.conf), vous devez utiliser - %{LA-U:REMOTE_USER} - cette variable est définie - par la phase d'autorisation qui intervient après la - phase de traduction d'URL (pendant laquelle mod_rewrite opère).

        -

        Par contre, comme mod_rewrite implémente son contexte de - répertoire (fichier .htaccess) via la phase Fixup + %{LA-U:REMOTE_USER} - cette variable est définie + par la phase d'autorisation qui intervient après la + phase de traduction d'URL (pendant laquelle mod_rewrite opère).

        +

        Par contre, comme mod_rewrite implémente son contexte de + répertoire (fichier .htaccess) via la phase Fixup de l'API, et comme la phase d'autorisation intervient - avant cette dernière, vous pouvez vous contenter + avant cette dernière, vous pouvez vous contenter d'utiliser %{REMOTE_USER} dans ce contexte.

      13. - %{LA-F:variable} peut être utilisée pour effectuer - une sous-requête interne (basée sur le nom de fichier), afin de - déterminer la valeur finale de variable. La plupart du - temps, elle est identique à LA-U (voir ci-dessus).
      14. + %{LA-F:variable} peut être utilisée pour effectuer + une sous-requête interne (basée sur le nom de fichier), afin de + déterminer la valeur finale de variable. La plupart du + temps, elle est identique à LA-U (voir ci-dessus).
      -

      expression de comparaison est une expression - rationnelle qui est appliquée à l'instance actuelle de - chaîne de test. chaîne de test est d'abord - évaluée, puis comparée à - l'expression de comparaison.

      +

      expression_de_comparaison est une expression + rationnelle qui est appliquée à l'instance actuelle de + chaîne_de_test. chaîne_de_test est d'abord + évaluée, puis comparée à + l'expression_de_comparaison.

      -

      expression de comparaison est en général une +

      expression_de_comparaison est en général une expression rationnelle compatible perl, mais vous - disposez des syntaxes supplémentaires suivantes pour effectuer - d'autres tests utiles sur chaîne de test : + disposez des syntaxes supplémentaires suivantes pour effectuer + d'autres tests utiles sur chaîne_de_test :

        -
      1. Vous pouvez préfixer l'expression avec un caractère - '!' (point d'exclamation) pour indiquer une - expression de non-correspondance.
      2. +
      3. Vous pouvez préfixer l'expression avec un caractère + '!' (point d'exclamation) pour inverser le résultat + de la condition, quelle que soit l'expression de + comparaison utilisée.
      4. Vous pouvez effectuer des comparaisons lexicographiques de - chaînes : - -
          -
        • '<expression' (inférieur au sens - lexicographique)
          - Traite l'expression comme une chaîne de - caractères et la compare lexicographiquement à - chaîne de test. La condition est satisfaite si - chaîne de test est inférieure au sens - lexicographique à l'expression.
        • - -
        • '>expression' (supérieur au sens - lexicographique)
          - Traite l'expression comme une chaîne de - caractères et la compare lexicographiquement à - chaîne de test. La condition est satisfaite si - chaîne de test est supérieure au sens - lexicographique à l'expression.
        • - -
        • '=expression' (égal au sens - lexicographique)
          - Traite l'expression comme une chaîne de - caractères et la compare lexicographiquement à - chaîne de test. La condition est satisfaite si - chaîne de test est égale au sens - lexicographique à l'expression (les deux chaînes - sont exactement identiques, caractère pour caractère). Si + chaînes : + +
          +
          <expression
          +
          inférieur au sens lexicographique
          + Traite l'expression comme une chaîne de + caractères et la compare lexicographiquement à + chaîne_de_test. La condition est satisfaite si + chaîne_de_test est inférieure au sens + lexicographique à l'expression.
          + +
          >expression
          +
          supérieur au sens lexicographique
          + Traite l'expression comme une chaîne de + caractères et la compare lexicographiquement à + chaîne_de_test. La condition est satisfaite si + chaîne_de_test est supérieure au sens + lexicographique à l'expression.
          + +
          =expression
          +
          égal au sens lexicographique
          + Traite l'expression comme une chaîne de + caractères et la compare lexicographiquement à + chaîne_de_test. La condition est satisfaite si + chaîne_de_test est égale au sens + lexicographique à l'expression (les deux chaînes + sont exactement identiques, caractère pour caractère). Si expression est "" (deux guillemets), - chaîne de test est comparée à la chaîne vide.
        • - -
        • '<=expression de comparaison' (inférieur ou égal à - au sens lexicographique)
          - Considère l'expression de comparaison comme une - chaîne de caractères et la compare au sens lexicographique à - la chaîne de test. Vrai si chaîne de test - précède lexicographiquement expression de comparaison, ou est - égale à expression de comparaison (les deux chaînes - sont identiques, caractère pour caractère).
        • - -
        • '>=expression de comparaison' - (supérieur ou égal à au sens lexicographique)
          - Considère l'expression de comparaison comme une - chaîne de caractères et la compare au sens lexicographique à - la chaîne de test. Vrai si chaîne de test - suit lexicographiquement expression de comparaison, ou est - égale à expression de comparaison (les deux chaînes - sont identiques, caractère pour caractère).
        • -
      5. + chaîne_de_test est comparée à la + chaîne vide. + +
        <=expression de comparaison
        +
        inférieur ou égal à au sens lexicographique
        + Considère l'expression_de_comparaison comme une + chaîne de caractères et la compare au sens lexicographique à + la chaîne_de_test. Vrai si chaîne_de_test + précède lexicographiquement expression_de_comparaison, ou est + égale à expression_de_comparaison (les deux chaînes + sont identiques, caractère pour caractère).
        + +
        >=expression de comparaison
        +
        supérieur ou égal à au sens lexicographique
        + Considère l'expression_de_comparaison comme une + chaîne de caractères et la compare au sens lexicographique à + la chaîne_de_test. Vrai si chaîne_de_test + suit lexicographiquement expression_de_comparaison, ou est + égale à expression_de_comparaison (les deux chaînes + sont identiques, caractère pour caractère).
        + +
      6. Vous pouvez effectuer des comparaisons d'entiers : -
          +
          -
        • '-eq' (est numériquement égal à)
          - La chaîne de test est considérée comme un entier, - et est comparée numériquement à l'expression de +
          -eq
          +
          est numériquement égal à
          + La chaîne_de_test est considérée comme un entier, + et est comparée numériquement à l'expression de comparaison. Vrai si les deux expressions sont - numériquement égales.
        • - -
        • '-ge' (est numériquement supérieur ou - égal à)
          - La chaîne de test est considérée comme un entier, - et est comparée numériquement à l'expression de - comparaison. Vrai si chaîne de test est - numériquement - supérieure ou égale à expression de comparaison.
        • - -
        • '-gt' (est numériquement supérieur à)
          - La chaîne de test est considérée comme un entier, - et est comparée numériquement à l'expression de - comparaison. Vrai si chaîne de test est - numériquement - supérieure à expression de comparaison.
        • - -
        • '-le' (est numériquement inférieur ou - égal à)
          - La chaîne de test est considérée comme un entier, - et est comparée numériquement à l'expression de - comparaison. Vrai si chaîne de test est - numériquement - inférieure ou égale à expression de comparaison. - Attention à la confusion avec le drapeau -l + numériquement égales. + +
          -ge
          +
          est numériquement supérieur ou égal à
          + La chaîne_de_test est considérée comme un entier, + et est comparée numériquement à l'expression de + comparaison. Vrai si chaîne_de_test est + numériquement supérieure ou égale à + expression_de_comparaison.
          + +
          -gt
          +
          est numériquement supérieur à
          + La chaîne_de_test est considérée comme un entier, + et est comparée numériquement à l'expression de + comparaison. Vrai si chaîne_de_test est + numériquement + supérieure à expression_de_comparaison.
          + +
          -le
          +
          est numériquement inférieur ou égal à
          + La chaîne_de_test est considérée comme un entier, + et est comparée numériquement à l'expression de + comparaison. Vrai si chaîne_de_test est + numériquement + inférieure ou égale à expression_de_comparaison. + Attention à la confusion avec le drapeau -l en utilisant la variante the -L ou - -h.
        • - -
        • '-lt' (est numériquement inférieur à)
          - La chaîne de test est considérée comme un entier, - et est comparée numériquement à l'expression de - comparaison. Vrai si chaîne de test est - numériquement - inférieure à expression de comparaison. - Attention à la confusion avec le drapeau -l + -h. + +
          -lt
          +
          est numériquement inférieur à
          + La chaîne_de_test est considérée comme un entier, + et est comparée numériquement à l'expression de + comparaison. Vrai si chaîne_de_test est + numériquement + inférieure à expression_de_comparaison. + Attention à la confusion avec le drapeau -l en utilisant la variante the -L ou - -h.
        • + -h. -
        +
        -ne
        +
        Est numériquement non égal à
        + La Chaîne de test est considérée comme un entier et est + numériquement comparée à l'expression de comparaison. Vrai + si les deux éléments comparés sont numériquement différents. + Equivalent à !-eq.
        + +
      7. -
      8. Vous pouvez effectuer différents tests sur les attributs de +
      9. Vous pouvez effectuer différents tests sur les attributs de fichier : -
          - -
        • '-d' (est un répertoire - - directory)
          - Traite chaîne de test comme un chemin et vérifie - s'il existe ou pas, et s'il s'agit d'un répertoire.
        • - -
        • '-f' (est un - fichier régulier)
          - Traite chaîne de test comme un chemin et vérifie - s'il existe ou pas, et s'il s'agit d'un fichier régulier.
        • - -
        • '-F' (test de l'existence d'un fichier - via une sous-requête)
          - Vérifie si chaîne de test est un fichier valide, - accessible à travers tous les contrôles d'accès du serveur - actuellement configurés pour ce chemin. C'est une - sous-requête interne qui effectue cette vérification - à - utiliser avec précautions car les performances du serveur - peuvent s'en trouver affectées !
        • - -
        • '-H' (est un lien symbolique, selon la - convention bash)
          - Voir -l.
        • - -
        • '-l' (est un lien symbolique)
          - Considère la chaîne de test comme un chemin et - vérifie son existence et si elle est un lien symbolique. On +
          + +
          -d
          +
          est un répertoire
          + Traite chaîne_de_test comme un chemin et vérifie + s'il existe ou pas, et s'il s'agit d'un répertoire.
          + +
          -f
          +
          est un fichier régulier
          + Traite chaîne_de_test comme un chemin et vérifie + s'il existe ou pas, et s'il s'agit d'un fichier régulier.
          + +
          -F
          +
          test de l'existence d'un fichier via une sous-requête
          + Vérifie si chaîne_de_test est un fichier valide, + accessible à travers tous les contrôles d'accès du serveur + actuellement configurés pour ce chemin. C'est une + sous-requête interne qui effectue cette vérification - à + utiliser avec précautions car les performances du serveur + peuvent s'en trouver affectées !
          + +
          -h
          +
          est un lien symbolique, selon la convention bash
          + Voir -l.
          + +
          -l
          +
          est un lien symbolique
          + Considère la chaîne_de_test comme un chemin et + vérifie son existence et si elle est un lien symbolique. On peut aussi utiliser la convention bash -L ou -h lorsqu'il y a risque de confusion - avec les tests -lt ou -le.
        • - -
        • '-L' (est un lien symbolique, selon la - convention bash)
          - Voir -l.
        • - -
        • '-s' (est un fichier régulier d'une - certaine taille)
          - Considère la chaîne de test comme un chemin et - vérifie son existence et si elle est un fichier régulier - d'une taille supérieure à zéro.
        • - -
        • '-U' (test de l'existence d'une - URL via une sous-requête)
          - Vérifie si chaîne de test est une URL valide, - accessible à travers tous les contrôles d'accès du serveur - actuellement configurés pour ce chemin. C'est une - sous-requête interne qui effectue cette vérification - à - utiliser avec précautions car les performances du serveur - peuvent s'en trouver affectées !
        • - -
        • '-x' (a l'attribut d'exécution positionné)
          - Considère la chaîne de test comme un chemin et - vérifie son existence et si elle a son attribut d'exécution - positionné. Ce positionnement est déterminé en fonction de - l'OS sous-jacent.
        • - -
        - -Note : - Tous ces tests peuvent aussi être préfixés par un point - d'exclamation ('!') pour inverser leur signification. - + avec les tests -lt ou -le. + +
        -L
        +
        est un lien symbolique, selon la convention bash
        + Voir -l.
        + +
        -s
        +
        est un fichier régulier d'une certaine taille
        + Considère la chaîne_de_test comme un chemin et + vérifie son existence et si elle est un fichier régulier + d'une taille supérieure à zéro.
        + +
        -U
        +

        test de l'existence d'une + URL via une sous-requête
        + Vérifie si chaîne_de_test est une URL valide, + accessible à travers tous les contrôles d'accès du serveur + actuellement configurés pour ce chemin. C'est une + sous-requête interne qui effectue cette vérification - à + utiliser avec précautions car les performances du serveur + peuvent s'en trouver affectées !

        +

        Ce drapeau ne renvoie que des informations + concernant le contrôle d'accès, l'authentification et + l'autorisation. Il ne renvoie pas d'informations + concernant le code d'état que le gestionnaire configuré + (static file, CGI, proxy, etc...) aurait, quant à lui, + retourné.

        + +
        -x
        +
        a l'attribut d'exécution positionné
        + Considère la chaîne_de_test comme un chemin et + vérifie son existence et si elle a son attribut d'exécution + positionné. Ce positionnement est déterminé en fonction de + l'OS sous-jacent.
        + + + + Par exemple: + + +RewriteCond /var/www/%{REQUEST_URI} !-f +RewriteRule ^(.+) /other/archive/$1 [R] + +
      10. -

        Si la chaîne de test contient la valeur spéciale - expr, la chaîne de comparaison sera - traitée en tant qu'expression rationnelle de type Si la chaîne_de_test contient la valeur spéciale + expr, la chaîne de comparaison sera + traitée en tant qu'expression rationnelle de type ap_expr.

        Dans l'exemple ci-dessous, on utilise -strmatch - pour comparer le REFERER avec le nom d'hôte du - site afin de bloquer le hotlinking (référencement direct) - non désiré. + pour comparer le REFERER avec le nom d'hôte du + site afin de bloquer le hotlinking (référencement direct) + non désiré.

        - - RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"
        - RewriteRule ^/images - [F] -
        + + RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'" + RewriteRule "^/images" "-" [F] +
      11. +
      -
    2. Vous pouvez aussi définir certains drapeaux pour - l'expression de comparaison en ajoutant ces +

      Vous pouvez aussi définir certains drapeaux pour + l'expression_de_comparaison en ajoutant ces [drapeaux] - comme troisième argument de la directive - RewriteCond, où drapeaux est un - sous-ensemble séparé par des virgules des drapeaux suivants : + comme troisième argument de la directive + RewriteCond, où drapeaux est un + sous-ensemble séparé par des virgules des drapeaux suivants :

      • 'nocase|NC' (no case)
        - Rend le test insensible à la casse - il n'est pas fait de - distinction entre majuscules et minuscules, à la fois dans le - développement de chaîne de test et dans - expression de comparaison. Ce drapeau n'est pris en - compte que lors d'une comparaison entre chaîne de test - et expression de comparaison. Il ne l'est pas pour les - vérification par sous-requêtes ou sur le système de + Rend le test insensible à la casse - il n'est pas fait de + distinction entre majuscules et minuscules, à la fois dans le + développement de chaîne_de_test et dans + expression_de_comparaison. Ce drapeau n'est pris en + compte que lors d'une comparaison entre chaîne_de_test + et expression_de_comparaison. Il ne l'est pas pour les + vérification par sous-requêtes ou sur le système de fichiers.
      • 'ornext|OR' (ou condition suivante)
        - Permet de chaîner les conditions de règles avec un OU au + Permet de chaîner les conditions de règles avec un OU au lieu du AND implicite. Exemple typique : - -
        -RewriteCond %{REMOTE_HOST}  ^host1  [OR]
        -RewriteCond %{REMOTE_HOST}  ^host2  [OR]
        -RewriteCond %{REMOTE_HOST}  ^host3
        -RewriteRule ...règles concernant tous ces hôtes...
        -
        -
        + +RewriteCond "%{REMOTE_HOST}" "^host1" [OR] +RewriteCond "%{REMOTE_HOST}" "^host2" [OR] +RewriteCond "%{REMOTE_HOST}" "^host3" +RewriteRule ...règles concernant tous ces hôtes... + Sans ce drapeau, les paires - condition/règle devraient être écrites trois fois. + condition/règle devraient être écrites trois fois.
      • 'novary|NV' (no vary)
        - Si la condition contient un en-tête HTTP, ce drapeau empêche - ce dernier d'être ajouté à l'en-tête Vary de la réponse.
        + Si la condition contient un en-tête HTTP, ce drapeau empêche + ce dernier d'être ajouté à l'en-tête Vary de la réponse.
        L'utilisation de ce drapeau peut provoquer une mise en cache - incorrecte de la réponse, si la représentation de cette réponse - varie avec la valeur de l'en-tête considéré. Ce drapeau ne - devrait donc être utilisé que si l'on maîtrise parfaitement le - fonctionnement de l'en-tête Vary. + incorrecte de la réponse, si la représentation de cette réponse + varie avec la valeur de l'en-tête considéré. Ce drapeau ne + devrait donc être utilisé que si l'on maîtrise parfaitement le + fonctionnement de l'en-tête Vary.
      -
    3. - +

      Exemple :

      -

      Pour réécrire la page d'accueil d'un site en fonction de - l'en-tête ``User-Agent:'' de la requête, vous +

      Pour réécrire la page d'accueil d'un site en fonction de + l'en-tête ``User-Agent:'' de la requête, vous pouvez utiliser ce qui suit :

      - -
      -RewriteCond  %{HTTP_USER_AGENT}  ^Mozilla
      -RewriteRule  ^/$                 /homepage.max.html  [L]
      -
      -RewriteCond  %{HTTP_USER_AGENT}  ^Lynx
      -RewriteRule  ^/$                 /homepage.min.html  [L]
      +
      +RewriteCond  "%{HTTP_USER_AGENT}"  "(iPhone|Blackberry|Android)"
      +RewriteRule  "^/$"               "/homepage.mobile.html"  [L]
       
      -RewriteRule  ^/$                 /homepage.std.html  [L]
      -
      -
      +RewriteRule "^/$" "/homepage.std.html" [L] +

      Explications : si vous utilisez un navigateur - (Netscape Navigator, Mozilla etc) qui s'identifie comme - 'Mozilla', vous accèderez à la page d'accueil max (qui - peut contenir des frames, ou d'autres ressources - particulières). - Si vous utilisez le navigateur Lynx (qui est un navigateur - en mode texte), vous accèderez à une page d'accueil min - (qui peut être une version conçue pour une navigation simple - basée sur le texte). - Si aucune de ces conditions n'est satisfaite (vous utilisez tout - autre navigateur, ou votre navigateur s'identifie de manière non - standard), vous accèderez à la page d'accueil std - (standard).

      + qui s'identifie comme un + navigateur de plateforme mobile (notez que l'exemple est + incomplet car il existe de nombreuses autres plateformes + mobiles), c'est la version pour mobile de la page d'accueil qui + sera renvoyée. Dans le cas contraire, ce sera la page d'accueil + standard.

      @@ -962,399 +1114,436 @@ RewriteRule ^/$ /homepage.std.html [L] RewriteRule -Définit les règles pour le moteur de réécriture +Définit les règles pour le moteur de réécriture RewriteRule - Modèle Substitution [drapeaux] + Modèle Substitution [drapeaux] server configvirtual host directory.htaccess FileInfo

      La directive RewriteRule est le - véritable cheval de trait de la réécriture. La directive peut - apparaître plusieurs fois, chaque instance définissant une - règle de réécriture particulière. L'ordre dans lequel ces règles - sont définies est important - il s'agit de l'ordre dans lequel - les règles seront appliquées au cours du processus de - réécriture.

      - -

      Modèle est une + véritable cheval de trait de la réécriture. La directive peut + apparaître plusieurs fois, chaque instance définissant une + règle de réécriture particulière. L'ordre dans lequel ces règles + sont définies est important - il s'agit de l'ordre dans lequel + les règles seront appliquées au cours du processus de + réécriture.

      + +

      Modèle est une expression rationnelle - compatible perl. Dans la première règle de réécriture, - l'expression est comparée au (%-decoded) - chemin de l'URL de la - requête ; les expressions suivantes sont comparées à la sortie de - la dernière règle de réécriture qui a été appliquée.

      - -<a id="what_is_matched" name="what_is_matched">Qu'est-ce qui est comparé ?</a> - -

      Dans un contexte de serveur virtuel VirtualHost, le modèle est tout - d'abord comparé à la portion de l'URL située entre le nom d'hôte - éventuellement accompagné du port, et la chaîne de paramètres (par - exemple "/app1/index.html").

      - -

      Dans les contextes de répertoire Directory et htaccess, le - modèle est tout d'abord comparé au chemin du système - de fichiers, après suppression du préfixe ou chemin de base - ayant conduit à la règle RewriteRule (par - exemple "app1/index.html" ou - "index.html" selon l'endroit où les directives sont définies).

      - -

      Si vous souhaitez faire une comparaison sur le nom - d'hôte, le port, ou la chaîne de requête, utilisez une + compatible perl. Ce avec quoi ce modèle est comparé dépend de l'endroit où + la directive RewriteRule est définie.

      + +<a id="what_is_matched" name="what_is_matched">Qu'est-ce qui est comparé ?</a> + +
        +
      • Dans un contexte de serveur virtuel VirtualHost, le modèle est tout + d'abord comparé à la portion de l'URL située entre le nom d'hôte + éventuellement accompagné du port, et la chaîne de paramètres (par + exemple "/app1/index.html"). Il s'agit du URL-path décodé de sa valeur "%xx".

      • + +
      • Dans un contexte de répertoire (sections Directory et fichiers .htaccess), le + Modèle est comparé avec une partie de chemin ; par exemple une + requête pour "/app1/index.html" entraînera une comparaison avec + "app1/index.html" ou "index.html" selon l'endroit où la directive + RewriteRule est définie.

        + +

        Le chemin où la règle est défini est supprimé du chemin correspondant + du système de fichiers avant comparaison (jusqu'au slash final compris). + En conséquence de cette suppression, les règles définies dans + ce contexte n'effectuent des comparaisons qu'avec la portion du chemin + du système de fichiers "en dessous" de l'endroit où la règle est définie.

        + +

        Le chemin correspondant actuel du système de fichiers est déterminé par + des directives telles que DocumentRoot et + Alias, ou même le résultat de substitutions dans + des règles RewriteRule précédentes. +

        +
      • + +
      • Si vous souhaitez faire une comparaison sur le nom + d'hôte, le port, ou la chaîne de requête, utilisez une directive RewriteCond comportant respectivement les variables %{HTTP_HOST}, %{SERVER_PORT}, ou - %{QUERY_STRING}.

        + %{QUERY_STRING}.

      • +
      +
      -Réécritures dans un contexte de répertoire +Réécritures dans un contexte de répertoire
        -
      • L'utilisation du moteur de réécriture dans les +
      • L'utilisation du moteur de réécriture dans les fichiers .htaccess et les sections Directory est un peu plus complexe.
      • -
      • Pour activer le moteur de réécriture dans ces contextes, vous devez -définir "RewriteEngine On" et -"Options FollowSymLinks". Si l'administrateur a désactivé -la possibilité de modifier l'option FollowSymLinks au -niveau du répertoire d'un utilisateur, vous ne pouvez pas utiliser le -moteur de réécriture. Cette restriction a été instaurée à des fins de -sécurité.
      • - -
      • Lorsqu'on utilise le moteur de réécriture dans un fichier -.htaccess, le chemin de base du répertoire courant (qui est -toujours le même pour ce même répertoire) est automatiquement -supprimé au cours de la comparaison avec le modèle de la règle -de réécriture, et automatiquement ajouté lorsqu'une -substitution relative (ne débutant pas par un slash ou un nom de -protocole) arrive à la fin d'un jeu de règles. Voir la directive -RewriteBase pour plus de -détails à propos de l'ajout du préfixe après les substitutions -relatives.
      • +
      • Pour activer le moteur de réécriture dans ces contextes, vous devez +définir "RewriteEngine On" et +"Options FollowSymLinks". Si l'administrateur a désactivé +la possibilité de modifier l'option FollowSymLinks au +niveau du répertoire d'un utilisateur, vous ne pouvez pas utiliser le +moteur de réécriture. Cette restriction a été instaurée à des fins de +sécurité.
      • + +
      • Voir la directive +RewriteBase pour plus de détails à +propos de l'ajout du préfixe après les substitutions relatives.
      • Si vous souhaitez effectuer une comparaison en prenant en compte -l'intégralité du -chemin de l'URL dans un contexte de répertoire (htaccess), vous devez +l'intégralité du +chemin de l'URL dans un contexte de répertoire (htaccess), vous devez utiliser la variable %{REQUEST_URI} dans la directive -RewriteCond.
      • +RewriteCond. -
      • Le prefixe supprimé se termine toujours par un slash, ce qui -signifie que la comparaison s'effectue avec une chaîne qui ne comporte -jamais de slash de début. Ainsi, un modèle contenant -^/ ne correspondra jamais dans un contexte de répertoire.
      • +
      • Le prefixe supprimé se termine toujours par un slash, ce qui +signifie que la comparaison s'effectue avec une chaîne qui ne comporte +jamais de slash de début. Ainsi, un modèle contenant +^/ ne correspondra jamais dans un contexte de répertoire.
      • -
      • Bien que les règles de réécriture soient permises du point de vue de +
      • Bien que les règles de réécriture soient permises du point de vue de la syntaxe dans les sections Location et Files, elles n'y sont pas prises en compte, et -n'y sont à priori d'aucune utilité.
      • +module="core">Files (y compris leurs versions sous forme +d'expression rationnelle), elles n'y sont pas prises en compte, et +n'y sont à priori d'aucune utilité. Les substitutions +relatives sont une fonctionnalité qui n'est, elle non-plus pas supportée +dans ce genre de contexte.
      -

      Pour quelques conseils à propos des Pour quelques conseils à propos des expressions rationnelles, voir le document Introduction à + href="../rewrite/intro.html#regex">Introduction à mod_rewrite.

      -

      Dans mod_rewrite, on peut aussi utiliser le caractère NON - ('!') comme préfixe de modèle. Ceci vous permet - d'inverser la signification d'un modèle, soit pour dire - ``si l'URL considérée ne correspond PAS à - ce modèle''. Le caractère NON peut donc être utilisé à +

      Dans mod_rewrite, on peut aussi utiliser le caractère NON + ('!') comme préfixe de modèle. Ceci vous permet + d'inverser la signification d'un modèle, soit pour dire + ``si l'URL considérée ne correspond PAS à + ce modèle''. Le caractère NON peut donc être utilisé à titre exceptionnel, lorsqu'il est plus simple d'effectuer une - comparaison avec le modèle inversé, ou dans la dernière règle - par défaut.

      + comparaison avec le modèle inversé, ou dans la dernière règle + par défaut.

      Note -Si vous utilisez le caractère NON pour inverser la signification d'un -modèle, vous ne pouvez pas inclure de parties génériques groupées dans -le modèle. Ceci est dû au fait que, lorsque le modèle ne correspond -pas (autrement dit, sa négation correspond), les groupes sont vides. -Ainsi, si vous utilisez des modèles inversés, vous ne pouvez -pas vous référer aux groupes par $N dans la chaîne de +Si vous utilisez le caractère NON pour inverser la signification d'un +modèle, vous ne pouvez pas inclure de parties génériques groupées dans +le modèle. Ceci est dû au fait que, lorsque le modèle ne correspond +pas (autrement dit, sa négation correspond), les groupes sont vides. +Ainsi, si vous utilisez des modèles inversés, vous ne pouvez +pas vous référer aux groupes par $N dans la chaîne de substitution ! -

      Dans une règle de réécriture, - Substitution est la chaîne - de caractères qui remplace le chemin de l'URL original qui - correspondait au Modèle. Substitution peut - être :

      +

      Dans une règle de réécriture, + Substitution est la chaîne + de caractères qui remplace le chemin de l'URL original qui + correspondait au Modèle. Substitution peut + être :

      -
      un chemin du système de fichiers
      +
      un chemin du système de fichiers
      -
      Il indique alors la localisation dans le système de - fichiers de la ressource qui doit être envoyée au client.
      +
      Il indique alors la localisation dans le système de + fichiers de la ressource qui doit être envoyée au + client. Les substitutions ne sont traitées en tant que chemins du + système de fichiers que si la règle est configurée dans un + contexte de serveur (serveur virtuel), et si le premier + composant du chemin dans la substitution existe dans le système + de fichiers.
      chemin d'URL
      -
      Un chemin relatif à la valeur de Un chemin relatif à la valeur de DocumentRoot vers la ressource qui - doit être servie. Notez que mod_rewrite - essaie de deviner si vous avez spécifié un chemin du système - de fichiers ou un chemin d'URL en vérifiant si la première - partie du chemin existe à la racine du système de fichiers. - Par exemple, si vous avez spécifié comme chaîne de + doit être servie. Notez que mod_rewrite + essaie de deviner si vous avez spécifié un chemin du système + de fichiers ou un chemin d'URL en vérifiant si la première + partie du chemin existe à la racine du système de fichiers. + Par exemple, si vous avez spécifié comme chaîne de Substitution /www/file.html, cette - dernière sera traitée comme un chemin d'URL à moins - qu'un répertoire nommé www n'existe à la racine - de votre système de fichiers, auquel cas la chaîne de - substitution sera traitée comme un chemin du système de - fichiers. Si vous désirez que d'autres directives de + dernière sera traitée comme un chemin d'URL à moins + qu'un répertoire nommé www n'existe à la racine + de votre système de fichiers (ou dans le cas d'une + réécriture au sein d'un fichier .htaccess, + relativement à la racine des documents), auquel cas la chaîne de + substitution sera traitée comme un chemin du système de + fichiers. Si vous désirez que d'autres directives de correspondance d'URL (comme la directive Alias) soient appliquées au - chemin d'URL résultant, utilisez le drapeau [PT] - comme décrit ci-dessous.
      + module="mod_alias">Alias) soient appliquées au + chemin d'URL résultant, utilisez le drapeau [PT] + comme décrit ci-dessous.
      URL absolue
      -
      Si une URL absolue est spécifiée, - mod_rewrite vérifie si le nom d'hôte - correspond à celui de l'hôte local. Si c'est le cas, le - protocole et le nom d'hôte sont supprimés, et ce qui reste est - traité comme un chemin d'URL. Dans le cas contraire, une - redirection externe vers l'URL indiquée est effectuée. Pour - forcer une redirection externe vers l'hôte local, voir le +
      Si une URL absolue est spécifiée, + mod_rewrite vérifie si le nom d'hôte + correspond à celui de l'hôte local. Si c'est le cas, le + protocole et le nom d'hôte sont supprimés, et ce qui reste est + traité comme un chemin d'URL. Dans le cas contraire, une + redirection externe vers l'URL indiquée est effectuée. Pour + forcer une redirection externe vers l'hôte local, voir le drapeau [R] ci-dessous.
      - (tiret)
      -
      Un tiret indique qu'aucune substitution ne doit être - effectuée (le chemin considéré est transmis sans changement). - Ceci est utile quand un drapeau doit être appliqué sans +
      Un tiret indique qu'aucune substitution ne doit être + effectuée (le chemin considéré est transmis sans changement). + Ceci est utile quand un drapeau doit être appliqué sans modifier le chemin (voir ci-dessous).
      -

      En plus du texte, la chaîne Substition peut +

      En plus du texte, la chaîne Substitution peut comporter :

        -
      1. des références arrières ($N) vers le modèle +
      2. des références arrières ($N) vers le modèle d'une directive RewriteRule
      3. -
      4. des références arrières (%N) vers le dernier - modèle d'une directive RewriteCond qui correspondait
      5. +
      6. des références arrières (%N) vers le dernier + modèle d'une directive RewriteCond qui correspondait
      7. -
      8. des variables du serveur comme dans les chaînes de test de - condition d'une règle (%{VARNAME})
      9. +
      10. des variables du serveur comme dans les chaînes de test de + condition d'une règle (%{VARNAME})
      11. des appels de fonctions de comparaison - (${nom correspondance:clé|défaut})
      12. + (${nom correspondance:clé|défaut})
      -

      Les références arrières sont des identificateurs de la forme +

      Les références arrières sont des identificateurs de la forme $N (N=0..9), qui - seront remplacés par le contenu du Nème groupe - du Modèle qui correspondait. Les variables du serveur - sont les mêmes que dans la Chaîne de test d'une - directive RewriteCond. Les fonctions de comparaison - sont issues de la directive RewriteMap dans la - section de laquelle elles sont décrites. Ces trois types de - variables sont évaluées dans l'ordre ci-dessus.

      - -

      Chaque règle de réécriture s'applique au résultat de la règle - précédente, selon l'ordre dans lequel elles ont été définies dans - le fichier de configuration. L'URI du chemin du fichier (voir + seront remplacés par le contenu du Nème groupe + du Modèle qui correspondait. Les variables du serveur + sont les mêmes que dans la Chaîne_de_test d'une + directive RewriteCond. Les + fonctions de comparaison sont issues de la directive RewriteMap dans la + section de laquelle elles sont décrites. Ces trois types de + variables sont évaluées dans l'ordre ci-dessus.

      + +

      Chaque règle de réécriture s'applique au résultat de la règle + précédente, selon l'ordre dans lequel elles ont été définies dans + le fichier de configuration. Le chemin de l'URL ou du système de fichier (voir ci-dessus Qu'est-ce qui est - comparé ?) est intégralement - remplacée par la chaîne de Substitution et le - processus de réécriture se poursuit jusqu'à ce que toutes les - règles aient été appliquées, ou qu'il soit explicitement stoppé + comparé ?) est intégralement + remplacée par la chaîne de Substitution et le + processus de réécriture se poursuit jusqu'à ce que toutes les + règles aient été appliquées, ou qu'il soit explicitement stoppé par un drapeau L, - ou par un autre drapeau qui implique un arrêt immédiat, comme + ou par un autre drapeau qui implique un arrêt immédiat, comme END ou F.

      - Modifier la chaîne de requête -

      Par défaut, la chaîne de requête est transmise sans - modification. Vous pouvez cependant créer dans la chaîne de - substitution des URLs dont une partie constitue une chaîne de - requête. Pour cela, ajoutez simplement un point d'interrogation - dans la chaîne de substitution pour indiquer que le texte qui - suit doit être réinjecté dans la chaîne de requête. Pour - supprimer une chaîne de requête, terminez simplement la chaîne de + Modifier la chaîne de requête +

      Par défaut, la chaîne de requête est transmise sans + modification. Vous pouvez cependant créer dans la chaîne de + substitution des URLs dont une partie constitue une chaîne de + requête. Pour cela, ajoutez simplement un point d'interrogation + dans la chaîne de substitution pour indiquer que le texte qui + suit doit être réinjecté dans la chaîne de requête. Pour + supprimer une chaîne de requête, terminez simplement la chaîne de substitution par un point d'interrogation. Pour combiner les - nouvelles chaînes de requête avec les anciennes, utilisez le + nouvelles chaînes de requête avec les anciennes, utilisez le drapeau [QSA].

      -

      En outre, vous pouvez spécifier des actions spéciales à effectuer en ajoutant +

      En outre, vous pouvez spécifier des actions spéciales à effectuer en ajoutant des [drapeaux] - comme troisième argument de la directive - RewriteRule. Séparés par des virgules au sein d'une - liste encadrée par des crochets, les drapeaux peuvent - être choisis dans la table suivante. Vous trouverez plus de - détails, et des exemples pour chaque drapeau dans le document à propos des drapeaux de - réécriture.

      - - + comme troisième argument de la directive + RewriteRule. Séparés par des virgules au sein d'une + liste encadrée par des crochets, les drapeaux peuvent + être choisis dans la table suivante. Vous trouverez plus de + détails, et des exemples pour chaque drapeau dans le document à propos des drapeaux de + réécriture.

      + +
      - + href="../rewrite/flags.html#flag_b">détails ... - - + + + + + + + - - + + + + - + annule la définition de la variable VAR.détails ... - + + href="../rewrite/flags.html#flag_g">détails ... - + href="../rewrite/flags.html#flag_h">détails ... - + href="../rewrite/flags.html#flag_l">détails ... - - + - + - + - + href="../rewrite/flags.html#flag_pt">détails ... - + - - + + + + + + - - - - - + + spécifié au fichier cible. détails ...
      Drapeaux et syntaxe Fonction
      BEchappe les caractères non-alphanumériques avant + Echappe les caractères non-alphanumériques + dans les références arrières avant d'appliquer la transformation. détails ...
      chain|CLa règle est chaînée avec la règle suivante. Si la règle - échoue, la ou les règles avec lesquelles elle est est chaînée - seront sautées. détails ...backrefnoplus|BNPAvec ce drapeau, si les références arrières sont échappées, + les espaces seront échappés en %20 au lieu de +. Ceci s'avère + utile lorsqu'une référence arrière est utilisée dans la partie + chemin, et non dans la chaîne de paramètres de la requête ; + pour plus de détails, voir ici.
      chain|CLa règle est chaînée avec la règle suivante. Si la règle + échoue, la ou les règles avec lesquelles elle est est chaînée + seront sautées. détails ...
      cookie|CO=NAME:VALDéfinit un cookie au niveau du navigateur client. La syntaxe - complète est : + Définit un cookie au niveau du navigateur client. La syntaxe + complète est : CO=NAME:VAL:domain[:lifetime[:path[:secure[:httponly]]]] details ... - détails ... + détails ...
      discardpath|DPISupprime la partie PATH_INFO de l'URI réécrit. détails + Supprime la partie PATH_INFO de l'URI réécrit. détails ...
      ENDStoppe le processus de réécriture immédiatement et + n'applique plus aucune règle. Empêche aussi l'application + ultérieure de règles de réécriture dans les contextes de + répertoire et de fichier .htaccess (disponible à partir de la + version 2.3.9 du serveur HTTP Apache). détails ...
      env|E=[!]VAR[:VAL]Définit la variable d'environnement VAR (à la valeur + Définit la variable d'environnement VAR (à la valeur VAL si elle est fournie). La variante !VAR - annule la définition de la variable VAR.détails ...
      forbidden|FRenvoie une réponse 403 FORBIDDEN au navigateur client. - détails ...Renvoie une réponse 403 FORBIDDEN au navigateur client. + détails ...
      gone|G Renvoie un message d'erreur 410 GONE au navigateur client. détails ...
      Handler|H=Gestionnaire de contenuL'URI résultant est envoyé au Gestionnaire de + L'URI résultant est envoyé au Gestionnaire de contenu pour traitement. détails ...
      last|LArrête le processus de réécriture immédiatement et n'applique - plus aucune règle. Prêtez une attention particulière aux mises - en garde concernant les contextes de niveau répertoire et + Arrête le processus de réécriture immédiatement et n'applique + plus aucune règle. Prêtez une attention particulière aux mises + en garde concernant les contextes de niveau répertoire et .htaccess (voir aussi le drapeau END). détails ...
      next|NRéexécute le processus de réécriture à partir de la première - règle, en utilisant le résultat du jeu de règles, sous réserve - qu'il y ait un point de départ. détails + Réexécute le processus de réécriture à partir de la première + règle, en utilisant le résultat du jeu de règles, sous réserve + qu'il y ait un point de départ. détails ...
      nocase|NCRend la comparaison entre modèles insensible à la casse. - détails ...Rend la comparaison entre modèles insensible à la casse. + détails ...
      noescape|NEEmpêche mod_rewrite d'effectuer un échappement hexadécimal - des caractères spéciaux dans le résultat de la réécriture. détails ...Empêche mod_rewrite d'effectuer un échappement hexadécimal + des caractères spéciaux dans le résultat de la réécriture. détails ...
      nosubreq|NSLa règle est sautée si la requête courante est une - sous-requête interne. détails ...La règle est sautée si la requête courante est une + sous-requête interne. détails ...
      proxy|P Force l'envoi en interne de l'URL de substitution en tant - que requête mandataire. détails + que requête mandataire. détails ...
      passthrough|PTL'URI résultant est repassé au moteur de mise en - correspondance des URLs pour y être traité par d'autres + L'URI résultant est repassé au moteur de mise en + correspondance des URLs pour y être traité par d'autres traducteurs URI-vers-nom de fichier, comme Alias ou Redirect. détails ...
      qsappend|QSAAjoute toute chaîne de paramètres créée dans la cible de - réécriture à toute chaîne de paramètres présente dans l'URL de la - requête originale. détails ...Ajoute toute chaîne de paramètres présente dans l'URL de la + requête originale à toute chaîne de paramètres créée dans la + cible de réécriture. détails ...
      qsdiscard|QSDSupprime toute chaîne de paramètres de l'URI entrant. détails + Supprime toute chaîne de paramètres de l'URI entrant. détails ...
      redirect|R[=code]qslast|QSLInterprète le dernier (le plus à droite) point d'interrogation comme + le délimiteur de la chaîne de paramètres de la requête, au lieu du + premier (le plus à gauche) comme c'est le cas habituellement. Disponble + à partir de la version 2.4.19 du serveur HTTP Apache. détails ...
      redirect|R[=code] Force une redirection externe, avec un code de statut HTTP optionnel. détails ... + href="../rewrite/flags.html#flag_r">détails ...
      ENDArrête le processus de réécriture immédiatement et - n'applique plus aucune règle. Empêche aussi l'exécution - ultérieure de règles de réécriture dans des contextes de - répertoire et des fichiers .htaccess (disponible depuis la - version 2.3.9) détails ...
      skip|S=nombreSi la règle courante s'applique, le moteur de réécriture - doit sauter les nombre règles suivantes. détails ...Si la règle courante s'applique, le moteur de réécriture + doit sauter les nombre règles suivantes. détails ...
      type|T=MIME-type Force l'attribution du Type-MIME - spécifié au fichier cible. détails ...
      -Développement du répertoire home -

      Quand la chaîne de substitution commence par quelque chose comme -"/~user" (de manière explicite ou par références arrières), mod_rewrite -développe le répertoire home sans tenir compte de la présence ou de la +Développement du répertoire home +

      Quand la chaîne de substitution commence par quelque chose comme +"/~user" (de manière explicite ou par références arrières), mod_rewrite +développe le répertoire home sans tenir compte de la présence ou de la configuration du module mod_userdir.

      -

      Ce développement n'est pas effectué si le drapeau PT est -utilisé dans la directive RewriteRule

      +

      Ce développement n'est pas effectué si le drapeau PT est +utilisé dans la directive RewriteRule

      Voici toutes les combinaisons de substitution et leurs @@ -1362,29 +1551,29 @@ utilisé dans la directive RewriteRuleDans la configuration au niveau du serveur principal (httpd.conf)
      - pour la requête ``GET + pour la requête ``GET /chemin/infochemin'':

      - +
      - - + + - + - + - + @@ -1399,7 +1588,7 @@ utilisé dans la directive RewriteRule - + @@ -1414,7 +1603,7 @@ utilisé dans la directive RewriteRule - + @@ -1434,19 +1623,19 @@ redondant)
      RègleRésultat de la substitutionRègleRésultat de la substitution
      ^/un_chemin(.*) autre_chemin$1invalide, non supportéinvalide, non supporté
      ^/un_chemin(.*) autre_chemin$1 [R]invalide, non supportéinvalide, non supporté
      ^/un_chemin(.*) autre_chemin$1 [P]invalide, non supportéinvalide, non supporté
      ^/un_chemin(.*) /autre_chemin$1 [P]sans objet, non supportésans objet, non supporté
      ^/un_chemin(.*) http://cet_hote/autre_chemin$1 [P]sans objet, non supportésans objet, non supporté
      -

      Dans une configuration de niveau répertoire pour +

      Dans une configuration de niveau répertoire pour /chemin
      (/chemin/physique/vers/chemin/.htacccess, avec - RewriteBase /chemin)
      - pour la requête ``GET + RewriteBase "/chemin")
      + pour la requête ``GET /chemin/chemin-local/infochemin'':

      - +
      - - + + @@ -1456,13 +1645,13 @@ redondant) - - + @@ -1472,43 +1661,43 @@ externe - + - + - + - - + + - - + + - - + + - - + - - + +
      RègleRésultat de la substitutionRègleRésultat de la substitution
      ^chemin-local(.*) autre-chemin$1 [R]http://cet-hôte/chemin/autre-chemin/infochemin via redirection +http://cet-hôte/chemin/autre-chemin/infochemin via redirection externe
      ^chemin-local(.*) autre-chemin$1 [P]n'a pas lieu d'être, non supportén'a pas lieu d'être, non supporté
      ^chemin-local(.*) /autre-chemin$1 [R]http://cet-hôte/autre-chemin/infochemin via redirection externehttp://cet-hôte/autre-chemin/infochemin via redirection externe
      ^chemin-local(.*) /autre-chemin$1 [P]n'a pas lieu d'être, non supportén'a pas lieu d'être, non supporté
      ^chemin-local(.*) http://cet-hôte/autre-chemin$1^chemin-local(.*) http://cet-hôte/autre-chemin$1 /autre-chemin/infochemin
      ^chemin-local(.*) http://cet-hôte/autre-chemin$1 [R]http://cet-hôte/autre-chemin/infochemin via redirection externe^chemin-local(.*) http://cet-hôte/autre-chemin$1 [R]http://cet-hôte/autre-chemin/infochemin via redirection externe
      ^chemin-local(.*) http://cet-hôte/autre-chemin$1 [P]n'a pas lieu d'être, non supporté^chemin-local(.*) http://cet-hôte/autre-chemin$1 [P]n'a pas lieu d'être, non supporté
      ^chemin-local(.*) http://autre hôte/autre-chemin$1http://autre hôte/autre-chemin/infochemin via redirection externe^chemin-local(.*) http://autre hôte/autre-chemin$1http://autre hôte/autre-chemin/infochemin via redirection externe
      ^chemin-local(.*) http://autre hôte/autre-chemin$1 [R]http://autre hôte/autre-chemin/infochemin via redirection externe +^chemin-local(.*) http://autre hôte/autre-chemin$1 [R]http://autre hôte/autre-chemin/infochemin via redirection externe (le drapeau [R] est redondant)
      ^chemin-local(.*) http://autre hôte/autre-chemin$1 [P]http://autre hôte/autre-chemin/infochemin via un mandataire interne^chemin-local(.*) http://autre hôte/autre-chemin$1 [P]http://autre hôte/autre-chemin/infochemin via un mandataire interne
      diff --git a/docs/manual/mod/mod_sed.html.en b/docs/manual/mod/mod_sed.html.en index a825ee6a766..1d77741a2ec 100644 --- a/docs/manual/mod/mod_sed.html.en +++ b/docs/manual/mod/mod_sed.html.en @@ -1,23 +1,28 @@ - -mod_sed - Apache HTTP Server +mod_sed - Apache HTTP Server Version 2.4 - + + + + +

      Apache HTTP Server Version 2.4

      +
      <-
      +Apache > HTTP Server > Documentation > Version 2.4 > Modules

      Apache Module mod_sed

      @@ -34,7 +39,7 @@

      mod_sed is an in-process content filter. The mod_sed filter implements the sed editing commands implemented by the Solaris 10 sed -program as described in the manual +program as described in the manual page. However, unlike sed, mod_sed doesn't take data from standard input. Instead, the filter acts on the entity data sent between client and @@ -55,58 +60,50 @@ Both the input and output filters only process the data if newline characters ar

      A tutorial article on mod_sed, and why it is more powerful than simple -string or regular expression search and replace, is available on +string or regular expression search and replace, is available on the author's blog.

      -

      Directives

      + +

      Bugfix checklist

      See also

      +
      top

      Sample Configuration

      -

      Adding an output filter

      - # In the following example, the sed filter will change the string
      - # "monday" to "MON" and the string "sunday" to SUN in html documents
      - # before sending to the client.
      - - <Directory "/var/www/docs/sed">
      - - AddOutputFilter Sed html
      - OutputSed "s/monday/MON/g"
      - OutputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      -

      +

      Adding an output filter

      # In the following example, the sed filter will change the string
      +# "monday" to "MON" and the string "sunday" to SUN in html documents
      +# before sending to the client.
      +<Directory "/var/www/docs/sed"> 
      +    AddOutputFilter Sed html 
      +    OutputSed "s/monday/MON/g" 
      +    OutputSed "s/sunday/SUN/g" 
      +</Directory>
      +
      -

      Adding an input filter

      - # In the following example, the sed filter will change the string
      - # "monday" to "MON" and the string "sunday" to SUN in the POST data
      - # sent to PHP.
      - - <Directory "/var/www/docs/sed">
      - - AddInputFilter Sed php
      - InputSed "s/monday/MON/g"
      - InputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      -

      +

      Adding an input filter

      # In the following example, the sed filter will change the string
      +# "monday" to "MON" and the string "sunday" to SUN in the POST data
      +# sent to PHP.
      +<Directory "/var/www/docs/sed"> 
      +    AddInputFilter Sed php 
      +    InputSed "s/monday/MON/g" 
      +    InputSed "s/sunday/SUN/g" 
      +</Directory>
      +
      top

      Sed Commands

      Complete details of the sed command can be found from the - sed manual + sed manual page.

      @@ -156,7 +153,28 @@ page.

      Available Languages:  en  |  fr 

      -
      +
      top

      Comments

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_sed.html.fr b/docs/manual/mod/mod_sed.html.fr index e40d737aba8..4f360609161 100644 --- a/docs/manual/mod/mod_sed.html.fr +++ b/docs/manual/mod/mod_sed.html.fr @@ -1,23 +1,28 @@ - -mod_sed - Serveur Apache HTTP +mod_sed - Serveur Apache HTTP Version 2.4 - + + + + +

      Serveur Apache HTTP Version 2.4

      +
      <-
      +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

      Module Apache mod_sed

      @@ -35,7 +40,7 @@

      mod_sed est un filtre de contenu "in-process". Le filtre mod_sed fournit les commandes d'dition de sed implmentes par le programme sed de -Solaris 10 comme dcrit dans la page de +Solaris 10 comme dcrit dans la page de manuel. Cependant, la diffrence de sed, mod_sed ne reoit pas de donnes sur son entre standard. Au lieu de cela, le filtre agit sur les donnes changes @@ -63,60 +68,52 @@ caract donnes, ce qui reste est trait comme la dernire ligne.

      -

      Vous trouverez sur le blog de +

      Vous trouverez sur le blog de l'auteur un article en forme de tutoriel, ainsi que les raisons pour lesquelles ce filtre est plus puissant qu'une simple recherche/remplacement de chane ou d'expression rationnelle.

      -
      top

      Exemple de configuration

      -

      Ajout d'un filtre en sortie

      - # Dans l'exemple suivant, le filtre sed va remplacer la chane +

      Ajout d'un filtre en sortie

      # Dans l'exemple suivant, le filtre sed va remplacer la chane
       	 # "monday" par "MON" et la chane "sunday" par "SUN" dans les
      -	 # documents html avant de les envoyer au client.
      - - <Directory "/var/www/docs/sed">
      - - AddOutputFilter Sed html
      - OutputSed "s/monday/MON/g"
      - OutputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      -

      + # documents html avant de les envoyer au client. +<Directory "/var/www/docs/sed"> + AddOutputFilter Sed html + OutputSed "s/monday/MON/g" + OutputSed "s/sunday/SUN/g" +</Directory> +
      -

      Ajout d'un filtre en entre

      - # Dans l'exemple suivant, le filtre sed va remplacer la chane +

      Ajout d'un filtre en entre

               # Dans l'exemple suivant, le filtre sed va remplacer la chane
       	 # "monday" par "MON" et la chane "sunday" par "SUN" dans les
      -	 # donnes POST envoyes  PHP.
      - - <Directory "/var/www/docs/sed">
      - - AddInputFilter Sed php
      - InputSed "s/monday/MON/g"
      - InputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      -

      + # donnes POST envoyes PHP. + <Directory "/var/www/docs/sed"> + AddInputFilter Sed php + InputSed "s/monday/MON/g" + InputSed "s/sunday/SUN/g" +</Directory> +
      top

      Commandes sed

      Vous trouverez tous les dtails propos de la commande - sed dans sa page + sed dans sa page de manuel.

      @@ -135,7 +132,7 @@ recherche/remplacement de cha
      top
      -

      InputSed Directive

      +

      Directive InputSed

      @@ -151,7 +148,7 @@ requ
      top
      -
      Description:Commande sed excuter pour le filtrage des donnes d'une requte (en gnral des donnes POST)
      @@ -170,7 +167,28 @@ r

      Langues Disponibles:  en  |  fr 

      -
      +
      top

      Commentaires

      Notice:
      This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
      +
      \ No newline at end of file diff --git a/docs/manual/mod/mod_sed.xml b/docs/manual/mod/mod_sed.xml index b414589685c..639a909d5e2 100644 --- a/docs/manual/mod/mod_sed.xml +++ b/docs/manual/mod/mod_sed.xml @@ -33,7 +33,7 @@

      mod_sed is an in-process content filter. The mod_sed filter implements the sed editing commands implemented by the Solaris 10 sed -program as described in the manual +program as described in the manual page. However, unlike sed, mod_sed doesn't take data from standard input. Instead, the filter acts on the entity data sent between client and @@ -55,46 +55,42 @@ Both the input and output filters only process the data if newline characters ar

      A tutorial article on mod_sed, and why it is more powerful than simple string or regular expression search and replace, is available on +href="https://blogs.oracle.com/basant/entry/using_mod_sed_to_filter">on the author's blog.

      Sample Configuration Adding an output filter - # In the following example, the sed filter will change the string
      - # "monday" to "MON" and the string "sunday" to SUN in html documents
      - # before sending to the client.
      - - <Directory "/var/www/docs/sed">
      - - AddOutputFilter Sed html
      - OutputSed "s/monday/MON/g"
      - OutputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      + +# In the following example, the sed filter will change the string +# "monday" to "MON" and the string "sunday" to SUN in html documents +# before sending to the client. +<Directory "/var/www/docs/sed"> + AddOutputFilter Sed html + OutputSed "s/monday/MON/g" + OutputSed "s/sunday/SUN/g" +</Directory> +
      Adding an input filter - # In the following example, the sed filter will change the string
      - # "monday" to "MON" and the string "sunday" to SUN in the POST data
      - # sent to PHP.
      - - <Directory "/var/www/docs/sed">
      - - AddInputFilter Sed php
      - InputSed "s/monday/MON/g"
      - InputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      + +# In the following example, the sed filter will change the string +# "monday" to "MON" and the string "sunday" to SUN in the POST data +# sent to PHP. +<Directory "/var/www/docs/sed"> + AddInputFilter Sed php + InputSed "s/monday/MON/g" + InputSed "s/sunday/SUN/g" +</Directory> +
      Sed Commands

      Complete details of the sed command can be found from the - sed manual + sed manual page.

      diff --git a/docs/manual/mod/mod_sed.xml.fr b/docs/manual/mod/mod_sed.xml.fr index a07a9b866c4..9f9419930f2 100644 --- a/docs/manual/mod/mod_sed.xml.fr +++ b/docs/manual/mod/mod_sed.xml.fr @@ -1,7 +1,7 @@ - + @@ -37,7 +37,7 @@ filtre mod_sed fournit les commandes d'édition de sed implémentées par le programme sed de Solaris 10 comme décrit dans la page de +href="http://www.gnu.org/software/sed/manual/sed.txt">page de manuel. Cependant, à la différence de sed, mod_sed ne reçoit pas de données sur son entrée standard. Au lieu de cela, le filtre agit sur les données échangées @@ -66,7 +66,7 @@ données, ce qui reste est traité comme la dernière ligne.

      Vous trouverez sur le blog de +href="https://blogs.oracle.com/basant/entry/using_mod_sed_to_filter">blog de l'auteur un article en forme de tutoriel, ainsi que les raisons pour lesquelles ce filtre est plus puissant qu'une simple recherche/remplacement de chaîne ou d'expression rationnelle.

      @@ -75,40 +75,35 @@ recherche/remplacement de chaîne ou d'expression rationnelle.

      Exemple de configuration Ajout d'un filtre en sortie - # Dans l'exemple suivant, le filtre sed va remplacer la chaîne + +# Dans l'exemple suivant, le filtre sed va remplacer la chaîne # "monday" par "MON" et la chaîne "sunday" par "SUN" dans les - # documents html avant de les envoyer au client.
      - - <Directory "/var/www/docs/sed">
      - - AddOutputFilter Sed html
      - OutputSed "s/monday/MON/g"
      - OutputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      + # documents html avant de les envoyer au client. +<Directory "/var/www/docs/sed"> + AddOutputFilter Sed html + OutputSed "s/monday/MON/g" + OutputSed "s/sunday/SUN/g" +</Directory> +
      Ajout d'un filtre en entrée + # Dans l'exemple suivant, le filtre sed va remplacer la chaîne # "monday" par "MON" et la chaîne "sunday" par "SUN" dans les - # données POST envoyées à PHP.
      - - <Directory "/var/www/docs/sed">
      - - AddInputFilter Sed php
      - InputSed "s/monday/MON/g"
      - InputSed "s/sunday/SUN/g"
      -
      - </Directory>
      -
      + # données POST envoyées à PHP. + <Directory "/var/www/docs/sed"> + AddInputFilter Sed php + InputSed "s/monday/MON/g" + InputSed "s/sunday/SUN/g" +</Directory> +
      Commandes sed

      Vous trouverez tous les détails à propos de la commande - sed dans sa page + sed dans sa page de manuel.

      diff --git a/docs/manual/mod/mod_session.html b/docs/manual/mod/mod_session.html index 79b314b8d26..77ecb721cdc 100644 --- a/docs/manual/mod/mod_session.html +++ b/docs/manual/mod/mod_session.html @@ -3,3 +3,7 @@ URI: mod_session.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_session.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_session.html.en b/docs/manual/mod/mod_session.html.en index fc287626d2f..19c359e3cb2 100644 --- a/docs/manual/mod/mod_session.html.en +++ b/docs/manual/mod/mod_session.html.en @@ -1,27 +1,33 @@ - -mod_session - Apache HTTP Server +mod_session - Apache HTTP Server Version 2.4 - + + + + +

      Apache HTTP Server Version 2.4

      +
      <-
      +Apache > HTTP Server > Documentation > Version 2.4 > Modules

      Apache Module mod_session

      -

      Available Languages:  en 

      +

      Available Languages:  en  | + fr 

      Description:Commande sed pour le filtrage des contenus de type rponse
      @@ -57,16 +63,7 @@ environment variables and HTTP headers, as appropriate.

      -
      top

      What is a session?

      At the core of the session interface is a table of key and value pairs - that are made accessible across browser requests.

      + that are made accessible across browser requests. These pairs can be set + to any valid string, as needed by the application making use of the + session.

      + +

      The "session" is a application/x-www-form-urlencoded + string containing these key value pairs, as defined by the + HTML specification.

      -

      These pairs can be set to any valid string, as needed by the - application making use of the session.

      +

      The session can optionally be encrypted and base64 encoded before + being written to the storage mechanism, as defined by the + administrator.

      top
      @@ -124,9 +138,9 @@
      top

      Keeping sessions on the browser

      -

      Where keeping track of a session on a server is too resource - intensive or inconvenient, the option exists to store the contents - of the session within a cookie on the client browser instead.

      +

      In high traffic environments where keeping track of a session on a + server is too resource intensive or inconvenient, the option exists to store + the contents of the session within a cookie on the client browser instead.

      This has the advantage that minimal resources are required on the server to keep track of sessions, and multiple servers within a server @@ -148,45 +162,41 @@ where the session will be stored. In this example, the session will be stored on the browser, in a cookie called session.

      -

      Browser based session

      - Session On
      - SessionCookieName session path=/
      -

      +

      Browser based session

      Session On
      +SessionCookieName session path=/
      +

      The session is not useful unless it can be written to or read from. The following example shows how values can be injected into the session through the use of a predetermined HTTP response header called X-Replace-Session.

      -

      Writing to a session

      - Session On
      - SessionCookieName session path=/
      - SessionHeader X-Replace-Session
      -

      +

      Writing to a session

      Session On
      +SessionCookieName session path=/
      +SessionHeader X-Replace-Session
      +

      The header should contain name value pairs expressed in the same format as a query string in a URL, as in the example below. Setting a key to the empty string has the effect of removing that key from the session.

      -

      CGI to write to a session

      - #!/bin/bash
      - echo "Content-Type: text/plain"
      - echo "X-Replace-Session: key1=foo&key2=&key3=bar"
      - echo
      - env
      -

      +

      CGI to write to a session

      #!/bin/bash
      +echo "Content-Type: text/plain"
      +echo "X-Replace-Session: key1=foo&key2=&key3=bar"
      +echo
      +env
      +

      If configured, the session can be read back from the HTTP_SESSION environment variable. By default, the session is kept private, so this has to be explicitly turned on with the SessionEnv directive.

      -

      Read from a session

      - Session On
      - SessionEnv On
      - SessionCookieName session path=/
      - SessionHeader X-Replace-Session
      -

      +

      Read from a session

      Session On
      +SessionEnv On
      +SessionCookieName session path=/
      +SessionHeader X-Replace-Session
      +

      Once read, the CGI variable HTTP_SESSION should contain the value key1=foo&key3=bar.

      @@ -205,11 +215,10 @@ placed on the browser using the mod_session_crypto module.

      -

      Browser based encrypted session

      - Session On
      - SessionCryptoPassphrase secret
      - SessionCookieName session path=/
      -

      +

      Browser based encrypted session

      Session On
      +SessionCryptoPassphrase secret
      +SessionCookieName session path=/
      +

      The session will be automatically decrypted on load, and encrypted on save by Apache, the underlying application using the session need have @@ -242,11 +251,10 @@

      Standard cookie parameters can be specified after the name of the cookie, as in the example below.

      -

      Setting cookie parameters

      - Session On
      - SessionCryptoPassphrase secret
      - SessionCookieName session path=/private;domain=example.com;httponly;secure;
      -

      +

      Setting cookie parameters

      Session On
      +SessionCryptoPassphrase secret
      +SessionCookieName session path=/private;domain=example.com;httponly;secure;
      +

      In cases where the Apache server forms the frontend for backend origin servers, it is possible to have the session cookies removed from the incoming HTTP headers using @@ -264,20 +272,78 @@ mod_auth_form saves the user's login name and password within the session.

      -

      Form based authentication

      - Session On
      - SessionCryptoPassphrase secret
      - SessionCookieName session path=/
      - AuthFormProvider file
      - AuthUserFile conf/passwd
      - AuthType form
      - AuthName realm
      - ...
      -

      +

      Form based authentication

      Session On
      +SessionCryptoPassphrase secret
      +SessionCookieName session path=/
      +AuthFormProvider file
      +AuthUserFile "conf/passwd"
      +AuthType form
      +AuthName realm
      +#...
      +

      See the mod_auth_form module for documentation and complete examples.

      +
      top
      +
      +

      Integrating Sessions with External Applications

      + +

      In order for sessions to be useful, it must be possible to share the contents + of a session with external applications, and it must be possible for an + external application to write a session of its own.

      + +

      A typical example might be an application that changes a user's password set by + mod_auth_form. This application would need to read the current + username and password from the session, make the required changes to the user's + password, and then write the new password to the session in order to provide a + seamless transition to the new password.

      + +

      A second example might involve an application that registers a new user for + the first time. When registration is complete, the username and password is + written to the session, providing a seamless transition to being logged in.

      + +
      +
      Apache modules
      +
      Modules within the server that need access to the session can use the + mod_session.h API in order to read from and write to the + session. This mechanism is used by modules like mod_auth_form. +
      + +
      CGI programs and scripting languages
      +
      Applications that run within the webserver can optionally retrieve the + value of the session from the HTTP_SESSION environment + variable. The session should be encoded as a + application/x-www-form-urlencoded string as described by the + HTML specification. The environment + variable is controlled by the setting of the + SessionEnv directive. The session + can be written to by the script by returning a + application/x-www-form-urlencoded response header with a name + set by the SessionHeader + directive. In both cases, any encryption or decryption, and the reading the + session from or writing the session to the chosen storage mechanism is handled + by the mod_session modules and corresponding configuration. +
      + +
      Applications behind mod_proxy
      +
      If the SessionHeader + directive is used to define an HTTP request header, the session, encoded as + a application/x-www-form-urlencoded string, will be made + available to the application. If the same header is provided in the response, + the value of this response header will be used to replace the session. As + above, any encryption or decryption, and the reading the session from or + writing the session to the chosen storage mechanism is handled by the + mod_session modules and corresponding configuration.
      + +
      Standalone applications
      +
      Applications might choose to manipulate the session outside the control + of the Apache HTTP server. In this case, it is the responsibility of the + application to read the session from the chosen storage mechanism, + decrypt the session, update the session, encrypt the session and write + the session to the chosen storage mechanism, as appropriate.
      +
      +
      top

      Session Directive

      @@ -286,6 +352,7 @@
      +
      Description:Session support
      Status:Extension
      Syntax:Session On|Off
      Default:Session Off
      Context:server config, virtual host, directory, .htaccess
      Override:AuthConfig
      Status:Extension
      Module:mod_session
      @@ -302,6 +369,7 @@
      Syntax:SessionEnv On|Off
      Default:SessionEnv Off
      Context:server config, virtual host, directory, .htaccess
      Override:AuthConfig
      Status:Extension
      Module:mod_session
      @@ -350,6 +418,7 @@ Syntax:SessionHeader header Default:none Context:server config, virtual host, directory, .htaccess +Override:AuthConfig Status:Extension Module:mod_session @@ -375,6 +444,7 @@ Syntax:SessionInclude path Default:all URLs Context:server config, virtual host, directory, .htaccess +Override:AuthConfig Status:Extension Module:mod_session @@ -398,6 +468,7 @@ Syntax:SessionMaxAge maxage Default:SessionMaxAge 0 Context:server config, virtual host, directory, .htaccess +Override:AuthConfig Status:Extension Module:mod_session @@ -414,8 +485,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_session.html.fr b/docs/manual/mod/mod_session.html.fr new file mode 100644 index 00000000000..73ed7d1474d --- /dev/null +++ b/docs/manual/mod/mod_session.html.fr @@ -0,0 +1,578 @@ + + + + + +mod_session - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_session

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Support des sessions
    Statut:Extension
    IdentificateurdeModule:session_module
    FichierSource:mod_session.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    Avertissement

    +

    Le module session fait usage des cookies HTTP, et peut ce + titre tre victime d'attaques de type Cross Site Scripting, ou + divulguer des informations caractre priv aux clients. Veuillez + vous assurer que les risques ainsi encourus ont t pris en compte + avant d'activer le support des sessions sur votre serveur.

    +
    + +

    Ce module fournit le support d'une interface de session pour + chaque utilisateur au niveau du serveur global. Les sessions + permettent de transmettre diverses informations : l'utilisateur + est-il connect ou non, ou toute autre information qui doit tre + conserve d'une requte l'autre.

    + +

    Les sessions peuvent tre stockes sur le serveur, ou au niveau + du navigateur. Les sessions peuvent galement tre chiffres pour une + scurit accrue. Ces fonctionnalits sont rparties entre diffrents + modules complmentaires de mod_session : + mod_session_crypto, + mod_session_cookie et + mod_session_dbd. Chargez les modules appropris + en fonction des besoins du serveur (soit statiquement la + compilation, soit dynamiquement via la directive LoadModule).

    + +

    Les sessions peuvent tre manipules par d'autres modules qui + dpendent de la session, ou la session peut tre lue et crite dans + des variables d'environnement et des en-ttes HTTP, selon les + besoins.

    + +
    + +
    top
    +
    +

    Qu'est-ce qu'une session ?

    +

    Au coeur de l'interface de session se trouve une table de + paires cl/valeur qui sont accessibles d'une requte du navigateur + l'autre. Les valeurs de cls peuvent se voir affecter toute chane + de caractres valide, en fonction des besoins de l'application qui + fait usage de la session.

    + +

    Une "session" est une chane + application/x-www-form-urlencoded qui contient la + paire cl/valeur dfinie par la spcification HTML.

    + +

    Selon les souhaits de l'administrateur, la session peut tre + chiffre et code en base64 avant d'tre soumise au dispositif de + stockage.

    + +
    top
    +
    +

    Qui peut utiliser une session + ?

    +

    L'interface de session a t conue l'origine pour tre + utilise par d'autres modules du serveur comme + mod_auth_form ; les applications base de + programmes CGI peuvent cependant se voir accorder l'accs au + contenu d'une session via la variable d'environnement + HTTP_SESSION. Il est possible de modifier et/ou de mettre jour + une session en insrant un en-tte de rponse HTTP contenant les + nouveaux paramtres de session.

    + +
    top
    +
    +

    Stockage des sessions sur le + serveur

    +

    Apache peut tre configur pour stocker les sessions + utilisateurs sur un serveur particulier ou un groupe de serveurs. + Cette fonctionnalit est similaire aux sessions disponibles sur + les serveurs d'applications courants.

    + +

    Selon la configuration, les sessions sont suivies + partir d'un identifiant de session stock dans un cookie, ou + extraites de la chane de paramtres de l'URL, comme dans les + requtes GET courantes.

    + +

    Comme le contenu de la session est stock exclusivement sur le + serveur, il est ncessaire de prserver la confidentialit de ce + contenu. Ceci a des implications en matire de performance et de + consommation de ressources lorsqu'un grand nombre de sessions est + stock, ou lorsqu'un grand nombre de serveurs doivent se partager + les sessions entre eux.

    + +

    Le module mod_session_dbd permet de stocker + les sessions utilisateurs dans une base de donnes SQL via le + module mod_dbd.

    + +
    top
    +
    +

    Stockage des sessions au niveau + du navigateur

    +

    Dans les environnements haut trafic o le stockage d'une + session sur un serveur consomme trop + de ressources, il est possible de stocker le contenu de la session + dans un cookie au niveau du navigateur client.

    + +

    Ceci a pour avantage de ne ncessiter qu'une quantit minimale de + ressources sur le serveur pour suivre les sessions, et vite + plusieurs serveurs parmi une fort de serveurs de devoir partager + les informations de session.

    + +

    Le contenu de la session est cependant prsent au client, avec + pour consquence un risque de perte de confidentialit. Le module + mod_session_crypto peut tre configur pour + chiffrer le contenu de la session avant qu'elle soit stocke au + niveau du client.

    + +

    Le module mod_session_cookie permet de stocker + les sessions au niveau du navigateur dans un cookie HTTP.

    + +
    top
    +
    +

    Exemples simples

    + +

    La cration d'une session consiste simplement ouvrir la + session, et dcider de l'endroit o elle doit tre stocke. Dans + l'exemple suivant, la session sera stocke au niveau du + navigateur, dans un cookie nomm session.

    + +

    Session stocke au niveau du navigateur

    Session On
    +SessionCookieName session path=/
    +
    + +

    Une session est inutile s'il n'est pas possible d'y lire + ou d'y crire. L'exemple suivant montre comment des valeurs + peuvent tre injectes dans une session l'aide d'un en-tte de + rponse HTTP prdtermin nomm + X-Replace-Session.

    + +

    Ecriture dans une session

    Session On
    +SessionCookieName session path=/
    +SessionHeader X-Replace-Session
    +
    + +

    L'en-tte doit contenir des paires cl/valeur sous le mme + format que celui de la chane d'argument d'une URL, comme dans + l'exemple suivant. Donner pour valeur une cl la chane vide a + pour effet de supprimer la cl de la session.

    + +

    Script CGI pour crire dans une session

    #!/bin/bash
    +echo "Content-Type: text/plain"
    +echo "X-Replace-Session: key1=foo&key2=&key3=bar"
    +echo
    +env
    +
    + +

    Selon la configuration, les informations de la session peuvent + tre extraites de la variable d'environnement HTTP_SESSION. Par + dfaut la session est prive, et cette fonctionnalit doit donc + tre explicitement active via la directive SessionEnv.

    + +

    Lecture depuis une session

    Session On
    +SessionEnv On
    +SessionCookieName session path=/
    +SessionHeader X-Replace-Session
    +
    + +

    Une fois la lecture effectue, la variable CGI + HTTP_SESSION doit contenir la valeur + cl1=foo&cl3=bar.

    + +
    top
    +
    +

    Confidentialit des + sessions

    + +

    En utilisant la fonctionnalit de votre navigateur "Afficher + les cookies", vous pouvez voir une rprsentation de la session + sous forme de texte en clair. Ceci peut poser problme si le + contenu de la session doit tre dissimul l'utilisateur final, + ou si un tiers accde sans autorisation aux informations de + session.

    + +

    ce titre, le contenu de la session peut tre chiffr l'aide + du module mod_session_crypto avant d'tre stock + au niveau du navigateur.

    + +

    Session chiffre avant stockage au niveau du + navigateur

    Session On
    +SessionCryptoPassphrase secret
    +SessionCookieName session path=/
    +
    + +

    La session sera automatiquement dchiffre la lecture, et + rechiffre par Apache lors de la sauvegarde, si bien que + l'application sous-jacente qui utilise la session n'a pas se + proccuper de savoir si un chiffrement a t mis en oeuvre ou + non.

    + +

    Les sessions stockes sur le serveur plutt qu'au niveau du + navigateur peuvent aussi tre chiffres, prservant par l-mme la + confidentialit lorsque des informations sensibles sont partages + entre les serveurs web d'une fort de serveurs l'aide du module + mod_session_dbd.

    + +
    top
    +
    +

    Confidentialit du cookie

    + +

    Le mcanisme de cookie HTTP offre aussi des fonctionnalits + quant la confidentialit, comme la possibilit de + restreindre le transport du cookie aux pages protges par SSL + seulement, ou l'interdiction pour les scripts java qui + s'excutent au niveau du navigateur d'obtenir l'accs au contenu + du cookie.

    + +

    Avertissement

    +

    Certaines fonctionnalits de confidentialit du cookie HTTP ne + sont pas standardises, ou ne sont pas toujours implmentes au + niveau du navigateur. Les modules de session vous permettent de + dfinir les paramtres du cookie, mais il n'est pas garanti que la + confidentialit sera respecte par le navigateur. Si la scurit + est la principale proccupation, chiffrez le contenu de la session + avec le module mod_session_crypto, ou stockez la + session sur le serveur avec le module + mod_session_dbd.

    +
    + +

    Les paramtres standards du cookie peuvent tre spcifis aprs + le nom du cookie comme dans l'exemple suivant :

    + +

    Dfinition des paramtres du cookie

    Session On
    +SessionCryptoPassphrase secret
    +SessionCookieName session path=/private;domain=example.com;httponly;secure;
    +
    + +

    Dans les cas o le serveur Apache sert de frontal pour des + serveurs d'arrire-plan, il est possible de supprimer les cookies + de session des en-ttes HTTP entrants l'aide de la directive + SessionCookieRemove. Ceci + permet d'empcher les serveurs d'arrire-plan d'accder au contenu + des cookies de session. +

    + +
    top
    +
    +

    Support des sessions pour + l'authentification

    + +

    Comme il est possible de le faire avec de nombreux serveurs + d'applications, les modules d'authentification peuvent utiliser + une session pour stocker le nom d'utilisateur et le mot de passe + aprs connexion. Le module mod_auth_form par + exemple, sauvegarde les nom de connexion et mot de passe de + l'utilisateur dans une session.

    + +

    Authentification base de formulaire

    Session On
    +SessionCryptoPassphrase secret
    +SessionCookieName session path=/
    +AuthFormProvider file
    +AuthUserFile "conf/passwd"
    +AuthType form
    +AuthName realm
    +#...
    +
    + +

    Pour la documentation et des exemples complets, voir le module + mod_auth_form.

    + +
    top
    +
    +

    Intgration des sessions avec les + applications externes

    + +

    Pour que les sessions soient utiles, leur contenu doit tre + accessible aux applications externes, et ces dernires doivent + elles-mmes tre capables d'crire une session.

    + +

    L'exemple type est une application qui modifie le mot de passe + d'un utilisateur dfini par mod_auth_form. Cette + application doit pouvoir extraire les nom d'utilisateur et mot de + passe courants de la session, effectuer les modifications + demandes, puis crire le nouveau mot de passe dans la session, + afin que la transition vers le nouveau mot de passe soit + transparente.

    + +

    Un autre exemple met en jeu une application qui enregistre un + nouvel utilisateur pour la premire fois. Une fois + l'enregistrement termin, le nom d'utilisateur et le mot de passe + sont crits dans la session, fournissant l aussi une transition + transparente.

    + +
    +
    Modules Apache
    +
    Selon les besoins, les modules du serveur peuvent utiliser + l'API mod_session.h pour lire et crire dans les + sessions. Les modules tels que mod_auth_form + utilisent ce mcanisme. +
    + +
    Programmes CGI et langages de script
    +
    Les applications qui s'excutent au sein du serveur web + peuvent ventuellement extraire la valeur de la session de la + variable d'environnement HTTP_SESSION. La session + doit tre code sous la forme d'une chane + application/x-www-form-urlencoded selon les + prconisations de la specification HTML. Cette + variable d'environnement est dfinie via la directive SessionEnv. Un script peut crire + dans la session en renvoyant un en-tte de rponse + application/x-www-form-urlencoded dont le nom est + dfini via la directive SessionHeader. Dans les deux cas, + tout chiffrement ou dchiffrement, ainsi que la lecture ou + l'criture de ou vers la session partir du mcanisme de stockage + choisi sont grs par le module mod_session et la + configuration correspondante. +
    + +
    Applications situes derrire mod_proxy
    +
    Si la directive SessionHeader est utilise pour + dfinir un en-tte de requte HTTP, la session code sous la forme + d'une chane application/x-www-form-urlencoded + sera accessible pour l'application. Si ce mme en-tte est fourni + dans la rponse, sa valeur sera utilise pour remplacer la + session. Comme prcdemment, tout chiffrement ou dchiffrement, + ainsi que la lecture ou + l'criture de ou vers la session partir du mcanisme de stockage + choisi sont grs par le module mod_session et la + configuration correspondante.
    + +
    Applications indpendantes
    +
    Les applications peuvent choisir de manipuler la session en + s'affranchissant du contrle du serveur HTTP Apache. Dans ce cas, + c'est l'application qui doit prendre en charge la lecture de la + session depuis le mcanisme de stockage choisi, son dchiffrement, + sa mise jour, son chiffrement et sa rcriture vers le mcanisme + de stockage choisi de manire approprie.
    +
    + +
    +
    top
    +

    Directive Session

    + + + + + + + + +
    Description:Ouvre une session pour le contexte courant
    Syntaxe:Session On|Off
    Dfaut:Session Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_session
    +

    La directive Session permet d'ouvrir une + session pour le contexte ou conteneur courant. Les directives + suivantes permettent de dfinir o la session sera stocke et + comment sera assure la confidentialit.

    + +
    +
    top
    +

    Directive SessionEnv

    + + + + + + + + +
    Description:Dfinit si le contenu de la session doit tre enregistr +dans la variable d'environnement HTTP_SESSION
    Syntaxe:SessionEnv On|Off
    Dfaut:SessionEnv Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_session
    +

    Lorsque la directive SessionEnv est + dfinie On, le contenu de la session est enregistr + dans une variable d'environnement CGI nomme + HTTP_SESSION.

    + +

    La chane est crite sous le mme format que celui de la chane + d'arguments d'une URL, comme dans l'exemple suivant :

    + +

    + cl1=foo&cl3=bar +

    + + +
    +
    top
    +

    Directive SessionExclude

    + + + + + + + +
    Description:Dfinit les prfixes d'URLs pour lesquels une session sera +ignore
    Syntaxe:SessionExclude chemin
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session
    +

    La directive SessionExclude permet de + dfinir les prfixes d'URLs pour lesquels la session sera + dsactive. Ceci peut amliorer l'efficacit d'un site web, en + ciblant de manire plus prcise l'espace d'URL pour lequel une + session devra tre maintenue. Par dfaut, toutes les URLs du + contexte ou du conteneur courant sont incluses dans la session. La + directive SessionExclude + l'emporte sur la directive SessionInclude.

    + +

    Avertissement

    +

    Cette directive a un comportement similaire celui de l'attribut + chemin des cookies HTTP, mais ne doit pas tre confondue + avec cet attribut. En effet, cette directive ne dfinit pas + l'attribut chemin, qui doit tre configur + sparment.

    + +
    +
    top
    +

    Directive SessionHeader

    + + + + + + + + +
    Description:Importation des mises jour de session depuis l'en-tte de +rponse HTTP spcifi
    Syntaxe:SessionHeader en-tte
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_session
    +

    La directive SessionHeader permet de + dfinir le nom d'un en-tte de rponse HTTP qui, s'il est prsent, + sera lu et son contenu crit dans la session courante.

    + +

    Le contenu de l'en-tte doit se prsenter sous le mme format que + celui de la chane d'arguments d'une URL, comme dans l'exemple + suivant :

    + +

    + cl1=foo&cl2=&cl3=bar +

    + +

    Si une cl a pour valeur la chane vide, elle sera supprime de + la session.

    + + +
    +
    top
    +

    Directive SessionInclude

    + + + + + + + + +
    Description:Dfinit les prfixes d'URL pour lesquels une session est +valide
    Syntaxe:SessionInclude chemin
    Dfaut:toutes URLs
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_session
    +

    La directive SessionInclude permet de + dfinir les prfixes d'URL spcifiques pour lesquels une session + sera valide. Ceci peut amliorer l'efficacit d'un site web, en + ciblant de manire plus prcise l'espace d'URL pour lequel une + session devra tre maintenue. Par dfaut, toutes les URLs du + contexte ou du conteneur courant sont incluses dans la session.

    + +

    Avertissement

    +

    Cette directive a un comportement similaire celui de l'attribut + chemin des cookies HTTP, mais ne doit pas tre confondue + avec cet attribut. En effet, cette directive ne dfinit pas + l'attribut chemin, qui doit tre configur sparment.

    + +
    +
    top
    +

    Directive SessionMaxAge

    + + + + + + + + +
    Description:Dfinit une dure de vie maximale pour la session en +secondes
    Syntaxe:SessionMaxAge dure de vie maximale
    Dfaut:SessionMaxAge 0
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_session
    +

    La directive SessionMaxAge permet de + dfinir la dure maximale pendant laquelle une session restera + valide. Lorsqu'une session est sauvegarde, cette dure est + rinitialise et la session peut continuer d'exister. Si la dure + d'une session dpasse cette limite sans qu'une requte au serveur ne + vienne la rafrachir, la session va passer hors dlai et sera + supprime. Lorsqu'une session est utilise pour stocker les + informations de connexion d'un utilisateur, ceci aura pour effet de + le dconnecter automatiquement aprs le dlai spcifi.

    + +

    Donner cette directive la valeur 0 empche l'expiration de la + session.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_session.xml b/docs/manual/mod/mod_session.xml index e81286b5f3f..dc48a96b757 100644 --- a/docs/manual/mod/mod_session.xml +++ b/docs/manual/mod/mod_session.xml @@ -63,10 +63,17 @@
    What is a session?

    At the core of the session interface is a table of key and value pairs - that are made accessible across browser requests.

    + that are made accessible across browser requests. These pairs can be set + to any valid string, as needed by the application making use of the + session.

    -

    These pairs can be set to any valid string, as needed by the - application making use of the session.

    +

    The "session" is a application/x-www-form-urlencoded + string containing these key value pairs, as defined by the + HTML specification.

    + +

    The session can optionally be encrypted and base64 encoded before + being written to the storage mechanism, as defined by the + administrator.

    Who can use a session? @@ -99,9 +106,9 @@
    Keeping sessions on the browser -

    Where keeping track of a session on a server is too resource - intensive or inconvenient, the option exists to store the contents - of the session within a cookie on the client browser instead.

    +

    In high traffic environments where keeping track of a session on a + server is too resource intensive or inconvenient, the option exists to store + the contents of the session within a cookie on the client browser instead.

    This has the advantage that minimal resources are required on the server to keep track of sessions, and multiple servers within a server @@ -124,8 +131,10 @@ stored on the browser, in a cookie called session.

    Browser based session - Session On
    - SessionCookieName session path=/
    + +Session On +SessionCookieName session path=/ +

    The session is not useful unless it can be written to or read from. The @@ -134,9 +143,11 @@ X-Replace-Session.

    Writing to a session - Session On
    - SessionCookieName session path=/
    - SessionHeader X-Replace-Session
    + +Session On +SessionCookieName session path=/ +SessionHeader X-Replace-Session +

    The header should contain name value pairs expressed in the same format @@ -144,11 +155,13 @@ empty string has the effect of removing that key from the session.

    CGI to write to a session - #!/bin/bash
    - echo "Content-Type: text/plain"
    - echo "X-Replace-Session: key1=foo&key2=&key3=bar"
    - echo
    - env
    + +#!/bin/bash +echo "Content-Type: text/plain" +echo "X-Replace-Session: key1=foo&key2=&key3=bar" +echo +env +

    If configured, the session can be read back from the HTTP_SESSION @@ -157,10 +170,12 @@ SessionEnv directive.

    Read from a session - Session On
    - SessionEnv On
    - SessionCookieName session path=/
    - SessionHeader X-Replace-Session
    + +Session On +SessionEnv On +SessionCookieName session path=/ +SessionHeader X-Replace-Session +

    Once read, the CGI variable HTTP_SESSION should contain @@ -180,9 +195,11 @@ module.

    Browser based encrypted session - Session On
    - SessionCryptoPassphrase secret
    - SessionCookieName session path=/
    + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/ +

    The session will be automatically decrypted on load, and encrypted on @@ -216,9 +233,11 @@ as in the example below.

    Setting cookie parameters - Session On
    - SessionCryptoPassphrase secret
    - SessionCookieName session path=/private;domain=example.com;httponly;secure;
    + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/private;domain=example.com;httponly;secure; +

    In cases where the Apache server forms the frontend for backend origin servers, @@ -237,20 +256,80 @@ the session.

    Form based authentication - Session On
    - SessionCryptoPassphrase secret
    - SessionCookieName session path=/
    - AuthFormProvider file
    - AuthUserFile conf/passwd
    - AuthType form
    - AuthName realm
    - ...
    + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/ +AuthFormProvider file +AuthUserFile "conf/passwd" +AuthType form +AuthName realm +#... +

    See the mod_auth_form module for documentation and complete examples.

    +
    Integrating Sessions with External Applications + +

    In order for sessions to be useful, it must be possible to share the contents + of a session with external applications, and it must be possible for an + external application to write a session of its own.

    + +

    A typical example might be an application that changes a user's password set by + mod_auth_form. This application would need to read the current + username and password from the session, make the required changes to the user's + password, and then write the new password to the session in order to provide a + seamless transition to the new password.

    + +

    A second example might involve an application that registers a new user for + the first time. When registration is complete, the username and password is + written to the session, providing a seamless transition to being logged in.

    + +
    +
    Apache modules
    +
    Modules within the server that need access to the session can use the + mod_session.h API in order to read from and write to the + session. This mechanism is used by modules like mod_auth_form. +
    + +
    CGI programs and scripting languages
    +
    Applications that run within the webserver can optionally retrieve the + value of the session from the HTTP_SESSION environment + variable. The session should be encoded as a + application/x-www-form-urlencoded string as described by the + HTML specification. The environment + variable is controlled by the setting of the + SessionEnv directive. The session + can be written to by the script by returning a + application/x-www-form-urlencoded response header with a name + set by the SessionHeader + directive. In both cases, any encryption or decryption, and the reading the + session from or writing the session to the chosen storage mechanism is handled + by the mod_session modules and corresponding configuration. +
    + +
    Applications behind mod_proxy
    +
    If the SessionHeader + directive is used to define an HTTP request header, the session, encoded as + a application/x-www-form-urlencoded string, will be made + available to the application. If the same header is provided in the response, + the value of this response header will be used to replace the session. As + above, any encryption or decryption, and the reading the session from or + writing the session to the chosen storage mechanism is handled by the + mod_session modules and corresponding configuration.
    + +
    Standalone applications
    +
    Applications might choose to manipulate the session outside the control + of the Apache HTTP server. In this case, it is the responsibility of the + application to read the session from the chosen storage mechanism, + decrypt the session, update the session, encrypt the session and write + the session to the chosen storage mechanism, as appropriate.
    +
    + +
    Session @@ -262,6 +341,7 @@ directory .htaccess +AuthConfig

    The Session directive enables a session for the @@ -280,6 +360,7 @@ directory .htaccess +AuthConfig

    The SessionMaxAge directive defines a time limit @@ -305,6 +386,7 @@ directory .htaccess +AuthConfig

    If set to On, the SessionEnv directive @@ -330,6 +412,7 @@ directory .htaccess +AuthConfig

    The SessionHeader directive defines the name of an @@ -358,6 +441,7 @@ directory .htaccess +AuthConfig

    The SessionInclude directive allows sessions to diff --git a/docs/manual/mod/mod_session.xml.fr b/docs/manual/mod/mod_session.xml.fr new file mode 100644 index 00000000000..c4bf602c993 --- /dev/null +++ b/docs/manual/mod/mod_session.xml.fr @@ -0,0 +1,560 @@ + + + + + + + + + + + +mod_session +Support des sessions +Extension +mod_session.c +session_module +Disponible depuis la version 2.3 d'Apache + +

    + Avertissement +

    Le module session fait usage des cookies HTTP, et peut à ce + titre être victime d'attaques de type Cross Site Scripting, ou + divulguer des informations à caractère privé aux clients. Veuillez + vous assurer que les risques ainsi encourus ont été pris en compte + avant d'activer le support des sessions sur votre serveur.

    +
    + +

    Ce module fournit le support d'une interface de session pour + chaque utilisateur au niveau du serveur global. Les sessions + permettent de transmettre diverses informations : l'utilisateur + est-il connecté ou non, ou toute autre information qui doit être + conservée d'une requête à l'autre.

    + +

    Les sessions peuvent être stockées sur le serveur, ou au niveau + du navigateur. Les sessions peuvent également être chiffrées pour une + sécurité accrue. Ces fonctionnalités sont réparties entre différents + modules complémentaires de mod_session : + mod_session_crypto, + mod_session_cookie et + mod_session_dbd. Chargez les modules appropriés + en fonction des besoins du serveur (soit statiquement à la + compilation, soit dynamiquement via la directive LoadModule).

    + +

    Les sessions peuvent être manipulées par d'autres modules qui + dépendent de la session, ou la session peut être lue et écrite dans + des variables d'environnement et des en-têtes HTTP, selon les + besoins.

    + +
    +mod_session_cookie +mod_session_crypto +mod_session_dbd + +
    Qu'est-ce qu'une session ? +

    Au coeur de l'interface de session se trouve une table de + paires clé/valeur qui sont accessibles d'une requête du navigateur + à l'autre. Les valeurs de clés peuvent se voir affecter toute chaîne + de caractères valide, en fonction des besoins de l'application qui + fait usage de la session.

    + +

    Une "session" est une chaîne + application/x-www-form-urlencoded qui contient la + paire clé/valeur définie par la spécification HTML.

    + +

    Selon les souhaits de l'administrateur, la session peut être + chiffrée et codée en base64 avant d'être soumise au dispositif de + stockage.

    + +
    +
    Qui peut utiliser une session + ? +

    L'interface de session a été conçue à l'origine pour être + utilisée par d'autres modules du serveur comme + mod_auth_form ; les applications à base de + programmes CGI peuvent cependant se voir accorder l'accès au + contenu d'une session via la variable d'environnement + HTTP_SESSION. Il est possible de modifier et/ou de mettre à jour + une session en insérant un en-tête de réponse HTTP contenant les + nouveaux paramètres de session.

    + +
    +
    Stockage des sessions sur le + serveur +

    Apache peut être configuré pour stocker les sessions + utilisateurs sur un serveur particulier ou un groupe de serveurs. + Cette fonctionnalité est similaire aux sessions disponibles sur + les serveurs d'applications courants.

    + +

    Selon la configuration, les sessions sont suivies à + partir d'un identifiant de session stocké dans un cookie, ou + extraites de la chaîne de paramètres de l'URL, comme dans les + requêtes GET courantes.

    + +

    Comme le contenu de la session est stocké exclusivement sur le + serveur, il est nécessaire de préserver la confidentialité de ce + contenu. Ceci a des implications en matière de performance et de + consommation de ressources lorsqu'un grand nombre de sessions est + stocké, ou lorsqu'un grand nombre de serveurs doivent se partager + les sessions entre eux.

    + +

    Le module mod_session_dbd permet de stocker + les sessions utilisateurs dans une base de données SQL via le + module mod_dbd.

    + +
    + +
    Stockage des sessions au niveau + du navigateur +

    Dans les environnements à haut trafic où le stockage d'une + session sur un serveur consomme trop + de ressources, il est possible de stocker le contenu de la session + dans un cookie au niveau du navigateur client.

    + +

    Ceci a pour avantage de ne nécessiter qu'une quantité minimale de + ressources sur le serveur pour suivre les sessions, et évite à + plusieurs serveurs parmi une forêt de serveurs de devoir partager + les informations de session.

    + +

    Le contenu de la session est cependant présenté au client, avec + pour conséquence un risque de perte de confidentialité. Le module + mod_session_crypto peut être configuré pour + chiffrer le contenu de la session avant qu'elle soit stockée au + niveau du client.

    + +

    Le module mod_session_cookie permet de stocker + les sessions au niveau du navigateur dans un cookie HTTP.

    + +
    + +
    Exemples simples + +

    La création d'une session consiste simplement à ouvrir la + session, et à décider de l'endroit où elle doit être stockée. Dans + l'exemple suivant, la session sera stockée au niveau du + navigateur, dans un cookie nommé session.

    + + Session stockée au niveau du navigateur + +Session On +SessionCookieName session path=/ + + + +

    Une session est inutile s'il n'est pas possible d'y lire + ou d'y écrire. L'exemple suivant montre comment des valeurs + peuvent être injectées dans une session à l'aide d'un en-tête de + réponse HTTP prédéterminé nommé + X-Replace-Session.

    + + Ecriture dans une session + +Session On +SessionCookieName session path=/ +SessionHeader X-Replace-Session + + + +

    L'en-tête doit contenir des paires clé/valeur sous le même + format que celui de la chaîne d'argument d'une URL, comme dans + l'exemple suivant. Donner pour valeur à une clé la chaîne vide a + pour effet de supprimer la clé de la session.

    + + Script CGI pour écrire dans une session + +#!/bin/bash +echo "Content-Type: text/plain" +echo "X-Replace-Session: key1=foo&key2=&key3=bar" +echo +env + + + +

    Selon la configuration, les informations de la session peuvent + être extraites de la variable d'environnement HTTP_SESSION. Par + défaut la session est privée, et cette fonctionnalité doit donc + être explicitement activée via la directive SessionEnv.

    + + Lecture depuis une session + +Session On +SessionEnv On +SessionCookieName session path=/ +SessionHeader X-Replace-Session + + + +

    Une fois la lecture effectuée, la variable CGI + HTTP_SESSION doit contenir la valeur + clé1=foo&clé3=bar.

    + +
    +
    Confidentialité des + sessions + +

    En utilisant la fonctionnalité de votre navigateur "Afficher + les cookies", vous pouvez voir une réprésentation de la session + sous forme de texte en clair. Ceci peut poser problème si le + contenu de la session doit être dissimulé à l'utilisateur final, + ou si un tiers accède sans autorisation aux informations de + session.

    + +

    À ce titre, le contenu de la session peut être chiffré à l'aide + du module mod_session_crypto avant d'être stocké + au niveau du navigateur.

    + + Session chiffrée avant stockage au niveau du + navigateur + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/ + + + +

    La session sera automatiquement déchiffrée à la lecture, et + rechiffrée par Apache lors de la sauvegarde, si bien que + l'application sous-jacente qui utilise la session n'a pas à se + préoccuper de savoir si un chiffrement a été mis en oeuvre ou + non.

    + +

    Les sessions stockées sur le serveur plutôt qu'au niveau du + navigateur peuvent aussi être chiffrées, préservant par là-même la + confidentialité lorsque des informations sensibles sont partagées + entre les serveurs web d'une forêt de serveurs à l'aide du module + mod_session_dbd.

    + +
    +
    Confidentialité du cookie + +

    Le mécanisme de cookie HTTP offre aussi des fonctionnalités + quant à la confidentialité, comme la possibilité de + restreindre le transport du cookie aux pages protégées par SSL + seulement, ou l'interdiction pour les scripts java qui + s'exécutent au niveau du navigateur d'obtenir l'accès au contenu + du cookie.

    + + Avertissement +

    Certaines fonctionnalités de confidentialité du cookie HTTP ne + sont pas standardisées, ou ne sont pas toujours implémentées au + niveau du navigateur. Les modules de session vous permettent de + définir les paramètres du cookie, mais il n'est pas garanti que la + confidentialité sera respectée par le navigateur. Si la sécurité + est la principale préoccupation, chiffrez le contenu de la session + avec le module mod_session_crypto, ou stockez la + session sur le serveur avec le module + mod_session_dbd.

    +
    + +

    Les paramètres standards du cookie peuvent être spécifiés après + le nom du cookie comme dans l'exemple suivant :

    + + Définition des paramètres du cookie + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/private;domain=example.com;httponly;secure; + + + +

    Dans les cas où le serveur Apache sert de frontal pour des + serveurs d'arrière-plan, il est possible de supprimer les cookies + de session des en-têtes HTTP entrants à l'aide de la directive + SessionCookieRemove. Ceci + permet d'empêcher les serveurs d'arrière-plan d'accéder au contenu + des cookies de session. +

    + +
    +
    Support des sessions pour + l'authentification + +

    Comme il est possible de le faire avec de nombreux serveurs + d'applications, les modules d'authentification peuvent utiliser + une session pour stocker le nom d'utilisateur et le mot de passe + après connexion. Le module mod_auth_form par + exemple, sauvegarde les nom de connexion et mot de passe de + l'utilisateur dans une session.

    + + Authentification à base de formulaire + +Session On +SessionCryptoPassphrase secret +SessionCookieName session path=/ +AuthFormProvider file +AuthUserFile "conf/passwd" +AuthType form +AuthName realm +#... + + + +

    Pour la documentation et des exemples complets, voir le module + mod_auth_form.

    + +
    + +
    Intégration des sessions avec les + applications externes + +

    Pour que les sessions soient utiles, leur contenu doit être + accessible aux applications externes, et ces dernières doivent + elles-mêmes être capables d'écrire une session.

    + +

    L'exemple type est une application qui modifie le mot de passe + d'un utilisateur défini par mod_auth_form. Cette + application doit pouvoir extraire les nom d'utilisateur et mot de + passe courants de la session, effectuer les modifications + demandées, puis écrire le nouveau mot de passe dans la session, + afin que la transition vers le nouveau mot de passe soit + transparente.

    + +

    Un autre exemple met en jeu une application qui enregistre un + nouvel utilisateur pour la première fois. Une fois + l'enregistrement terminé, le nom d'utilisateur et le mot de passe + sont écrits dans la session, fournissant là aussi une transition + transparente.

    + +
    +
    Modules Apache
    +
    Selon les besoins, les modules du serveur peuvent utiliser + l'API mod_session.h pour lire et écrire dans les + sessions. Les modules tels que mod_auth_form + utilisent ce mécanisme. +
    + +
    Programmes CGI et langages de script
    +
    Les applications qui s'exécutent au sein du serveur web + peuvent éventuellement extraire la valeur de la session de la + variable d'environnement HTTP_SESSION. La session + doit être codée sous la forme d'une chaîne + application/x-www-form-urlencoded selon les + préconisations de la specification HTML. Cette + variable d'environnement est définie via la directive SessionEnv. Un script peut écrire + dans la session en renvoyant un en-tête de réponse + application/x-www-form-urlencoded dont le nom est + défini via la directive SessionHeader. Dans les deux cas, + tout chiffrement ou déchiffrement, ainsi que la lecture ou + l'écriture de ou vers la session à partir du mécanisme de stockage + choisi sont gérés par le module mod_session et la + configuration correspondante. +
    + +
    Applications situées derrière mod_proxy
    +
    Si la directive SessionHeader est utilisée pour + définir un en-tête de requête HTTP, la session codée sous la forme + d'une chaîne application/x-www-form-urlencoded + sera accessible pour l'application. Si ce même en-tête est fourni + dans la réponse, sa valeur sera utilisée pour remplacer la + session. Comme précédemment, tout chiffrement ou déchiffrement, + ainsi que la lecture ou + l'écriture de ou vers la session à partir du mécanisme de stockage + choisi sont gérés par le module mod_session et la + configuration correspondante.
    + +
    Applications indépendantes
    +
    Les applications peuvent choisir de manipuler la session en + s'affranchissant du contrôle du serveur HTTP Apache. Dans ce cas, + c'est l'application qui doit prendre en charge la lecture de la + session depuis le mécanisme de stockage choisi, son déchiffrement, + sa mise à jour, son chiffrement et sa réécriture vers le mécanisme + de stockage choisi de manière appropriée.
    +
    + +
    + + +Session +Ouvre une session pour le contexte courant +Session On|Off +Session Off +server config +virtual host +directory +.htaccess + +AuthConfig + + +

    La directive Session permet d'ouvrir une + session pour le contexte ou conteneur courant. Les directives + suivantes permettent de définir où la session sera stockée et + comment sera assurée la confidentialité.

    +
    +
    + + +SessionMaxAge +Définit une durée de vie maximale pour la session en +secondes +SessionMaxAge durée de vie maximale +SessionMaxAge 0 +server config +virtual host +directory +.htaccess + +AuthConfig + + +

    La directive SessionMaxAge permet de + définir la durée maximale pendant laquelle une session restera + valide. Lorsqu'une session est sauvegardée, cette durée est + réinitialisée et la session peut continuer d'exister. Si la durée + d'une session dépasse cette limite sans qu'une requête au serveur ne + vienne la rafraîchir, la session va passer hors délai et sera + supprimée. Lorsqu'une session est utilisée pour stocker les + informations de connexion d'un utilisateur, ceci aura pour effet de + le déconnecter automatiquement après le délai spécifié.

    + +

    Donner à cette directive la valeur 0 empêche l'expiration de la + session.

    +
    +
    + + +SessionEnv +Définit si le contenu de la session doit être enregistré +dans la variable d'environnement HTTP_SESSION +SessionEnv On|Off +SessionEnv Off +server config +virtual host +directory +.htaccess + +AuthConfig + + +

    Lorsque la directive SessionEnv est + définie à On, le contenu de la session est enregistré + dans une variable d'environnement CGI nommée + HTTP_SESSION.

    + +

    La chaîne est écrite sous le même format que celui de la chaîne + d'arguments d'une URL, comme dans l'exemple suivant :

    + + + clé1=foo&clé3=bar + + +
    +
    + + +SessionHeader +Importation des mises à jour de session depuis l'en-tête de +réponse HTTP spécifié +SessionHeader en-tête +none +server config +virtual host +directory +.htaccess + +AuthConfig + + +

    La directive SessionHeader permet de + définir le nom d'un en-tête de réponse HTTP qui, s'il est présent, + sera lu et son contenu écrit dans la session courante.

    + +

    Le contenu de l'en-tête doit se présenter sous le même format que + celui de la chaîne d'arguments d'une URL, comme dans l'exemple + suivant :

    + + + clé1=foo&clé2=&clé3=bar + + +

    Si une clé a pour valeur la chaîne vide, elle sera supprimée de + la session.

    + +
    +
    + + +SessionInclude +Définit les préfixes d'URL pour lesquels une session est +valide +SessionInclude chemin +toutes URLs +server config +virtual host +directory +.htaccess + +AuthConfig + + +

    La directive SessionInclude permet de + définir les préfixes d'URL spécifiques pour lesquels une session + sera valide. Ceci peut améliorer l'efficacité d'un site web, en + ciblant de manière plus précise l'espace d'URL pour lequel une + session devra être maintenue. Par défaut, toutes les URLs du + contexte ou du conteneur courant sont incluses dans la session.

    + + Avertissement +

    Cette directive a un comportement similaire à celui de l'attribut + chemin des cookies HTTP, mais ne doit pas être confondue + avec cet attribut. En effet, cette directive ne définit pas + l'attribut chemin, qui doit être configuré séparément.

    +
    +
    + + +SessionExclude +Définit les préfixes d'URLs pour lesquels une session sera +ignorée +SessionExclude chemin +none +server config +virtual host +directory +.htaccess + + + +

    La directive SessionExclude permet de + définir les préfixes d'URLs pour lesquels la session sera + désactivée. Ceci peut améliorer l'efficacité d'un site web, en + ciblant de manière plus précise l'espace d'URL pour lequel une + session devra être maintenue. Par défaut, toutes les URLs du + contexte ou du conteneur courant sont incluses dans la session. La + directive SessionExclude + l'emporte sur la directive SessionInclude.

    + + Avertissement +

    Cette directive a un comportement similaire à celui de l'attribut + chemin des cookies HTTP, mais ne doit pas être confondue + avec cet attribut. En effet, cette directive ne définit pas + l'attribut chemin, qui doit être configuré + séparément.

    +
    +
    + + diff --git a/docs/manual/mod/mod_session.xml.meta b/docs/manual/mod/mod_session.xml.meta index 2f03ccac5f3..c620b372142 100644 --- a/docs/manual/mod/mod_session.xml.meta +++ b/docs/manual/mod/mod_session.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_session_cookie.html b/docs/manual/mod/mod_session_cookie.html index b0ee5a4aea1..f699710b576 100644 --- a/docs/manual/mod/mod_session_cookie.html +++ b/docs/manual/mod/mod_session_cookie.html @@ -3,3 +3,7 @@ URI: mod_session_cookie.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_session_cookie.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_session_cookie.html.en b/docs/manual/mod/mod_session_cookie.html.en index d6b82e9258c..610fb125549 100644 --- a/docs/manual/mod/mod_session_cookie.html.en +++ b/docs/manual/mod/mod_session_cookie.html.en @@ -1,27 +1,33 @@ - -mod_session_cookie - Apache HTTP Server +mod_session_cookie - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_session_cookie

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -54,21 +60,21 @@ the mod_session module.

    -
    top

    Basic Examples

    @@ -76,10 +82,9 @@

    To create a simple session and store it in a cookie called session, configure the session as follows:

    -

    Browser based session

    - Session On
    - SessionCookieName session path=/
    -

    +

    Browser based session

    Session On
    +SessionCookieName session path=/
    +

    For more examples on how the session can be configured to be read from and written to by a CGI application, see the @@ -109,10 +114,9 @@ Apache. Ensure that your attributes are defined correctly as per the cookie specification.

    -

    Cookie with attributes

    - Session On
    - SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    -

    +

    Cookie with attributes

    Session On
    +SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    +
    @@ -136,10 +140,9 @@ Apache. Ensure that your attributes are defined correctly as per the cookie specification.

    -

    Cookie2 with attributes

    - Session On
    - SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    -

    +

    Cookie2 with attributes

    Session On
    +SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    +
    @@ -165,8 +168,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_session_cookie.html.fr b/docs/manual/mod/mod_session_cookie.html.fr new file mode 100644 index 00000000000..4c5a5fc88a5 --- /dev/null +++ b/docs/manual/mod/mod_session_cookie.html.fr @@ -0,0 +1,217 @@ + + + + + +mod_session_cookie - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_session_cookie

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Cookie based session support
    Status:Extension
    + + + +
    Description:Support des sessions bas sur les cookies
    Statut:Extension
    IdentificateurdeModule:session_cookie_module
    FichierSource:mod_session_cookie.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    Avertissement

    +

    Les modules de session font usage des cookies HTTP, et peuvent + ce titre tre victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations caractre priv aux clients. + Veuillez vous assurer que les risques ainsi encourus ont t pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du stockage des sessions utilisateur au niveau du navigateur + distant dans des cookies HTTP.

    + +

    L'utilisation de cookies pour stocker les sessions dcharge le + serveur ou le groupe de serveurs de la ncessit de stocker les + sessions localement, ou de collaborer pour partager les sessions, et + peut tre utile dans les environnements fort trafic o le stockage + des sessions sur le serveur pourrait s'avrer trop consommateur de + ressources.

    + +

    Si la confidentialit de la session doit tre prserve, le + contenu de cette dernire peut tre chiffr avant d'tre enregistr + au niveau du client l'aide du module + mod_session_crypto.

    + +

    Pour plus de dtails propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    + +
    top
    +
    +

    Exemples simples

    + +

    Pour crer une session et la stocker dans un cookie nomm + session, configurez-la comme suit :

    + +

    Session stocke au niveau du navigateur

    Session On
    +SessionCookieName session path=/
    +
    + +

    Pour plus d'exemples sur la manire dont une session doit tre + configure pour qu'une application CGI puisse l'utiliser, voir la + section exemples de la documentation du module + mod_session.

    + +

    Pour des dtails sur la manire dont une session peut tre + utilise pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    +
    top
    +

    Directive SessionCookieName

    + + + + + + + +
    Description:Nom et attributs du cookie RFC2109 dans lequel la session +est stocke
    Syntaxe:SessionCookieName nom attributs
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_cookie
    +

    La directive SessionCookieName permet de + spcifier le nom et les attributs optionnels d'un cookie compatible + RFC2109 dans lequel la session sera stocke. Les cookies RFC2109 + sont dfinis en utilisant l'en-tte HTTP Set-Cookie. +

    + +

    Une liste optionnelle d'attributs peut tre spcifie, comme dans + l'exemple suivant. Ces attributs sont insrs tels quels dans le + cookie, et ne sont pas interprts par Apache. Assurez-vous que vos + attributs soient dfinis correctement selon la spcification des + cookies. +

    + +

    Cookie avec attributs

    Session On
    +SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    +
    + + +
    +
    top
    +

    Directive SessionCookieName2

    + + + + + + + +
    Description:Nom et attributs pour le cookie RFC2965 dans lequel est +stocke la session
    Syntaxe:SessionCookieName2 nom attributs
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_cookie
    +

    La directive SessionCookieName2 permet de + spcifier le nom et les attributs optionnels d'un cookie compatible + RFC2965 dans lequel la session sera stocke. Les cookies RFC2965 + sont dfinis en utilisant l'en-tte HTTP + Set-Cookie2. +

    + +

    Une liste optionnelle d'attributs peut tre spcifie, comme dans + l'exemple suivant. Ces attributs sont insrs tels quels dans le + cookie, et ne sont pas interprts par Apache. Assurez-vous que vos + attributs soient dfinis correctement selon la spcification des + cookies. +

    + +

    Cookie2 avec attributs

    Session On
    +SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    +
    + + +
    +
    top
    +

    Directive SessionCookieRemove

    + + + + + + + +
    Description:Dtermine si les cookies de session doivent tre supprims +des en-ttes HTTP entrants
    Syntaxe:SessionCookieRemove On|Off
    Dfaut:SessionCookieRemove Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_cookie
    +

    La directive SessionCookieRemove permet de + dterminer si les cookies contenant la session doivent tre + supprims des en-ttes pendant le traitement de la requte.

    + +

    Dans le cas d'un mandataire inverse o le serveur Apache sert de + frontal un serveur d'arrire-plan, rvler le contenu du cookie de + session ce dernier peut conduire une violation de la + confidentialit. ce titre, si cette directive est dfinie "on", + le cookie de session sera supprim des en-ttes HTTP entrants.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_session_cookie.xml b/docs/manual/mod/mod_session_cookie.xml index 5eadd4ffdb2..39a86b531c7 100644 --- a/docs/manual/mod/mod_session_cookie.xml +++ b/docs/manual/mod/mod_session_cookie.xml @@ -64,8 +64,10 @@ session, configure the session as follows:

    Browser based session - Session On
    - SessionCookieName session path=/
    + +Session On +SessionCookieName session path=/ +

    For more examples on how the session can be configured to be read @@ -100,8 +102,10 @@

    Cookie with attributes - Session On
    - SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    + +Session On +SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1; +
    @@ -130,8 +134,10 @@

    Cookie2 with attributes - Session On
    - SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    + +Session On +SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; +
    diff --git a/docs/manual/mod/mod_session_cookie.xml.fr b/docs/manual/mod/mod_session_cookie.xml.fr new file mode 100644 index 00000000000..ff60196abb0 --- /dev/null +++ b/docs/manual/mod/mod_session_cookie.xml.fr @@ -0,0 +1,191 @@ + + + + + + + + + + + +mod_session_cookie +Support des sessions basé sur les cookies +Extension +mod_session_cookie.c +session_cookie_module +Disponible depuis la version 2.3 d'Apache + + + Avertissement +

    Les modules de session font usage des cookies HTTP, et peuvent + à ce titre être victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations à caractère privé aux clients. + Veuillez vous assurer que les risques ainsi encourus ont été pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du stockage des sessions utilisateur au niveau du navigateur + distant dans des cookies HTTP.

    + +

    L'utilisation de cookies pour stocker les sessions décharge le + serveur ou le groupe de serveurs de la nécessité de stocker les + sessions localement, ou de collaborer pour partager les sessions, et + peut être utile dans les environnements à fort trafic où le stockage + des sessions sur le serveur pourrait s'avérer trop consommateur de + ressources.

    + +

    Si la confidentialité de la session doit être préservée, le + contenu de cette dernière peut être chiffré avant d'être enregistré + au niveau du client à l'aide du module + mod_session_crypto.

    + +

    Pour plus de détails à propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    +mod_session +mod_session_crypto +mod_session_dbd + +
    Exemples simples + +

    Pour créer une session et la stocker dans un cookie nommé + session, configurez-la comme suit :

    + + Session stockée au niveau du navigateur + +Session On +SessionCookieName session path=/ + + + +

    Pour plus d'exemples sur la manière dont une session doit être + configurée pour qu'une application CGI puisse l'utiliser, voir la + section exemples de la documentation du module + mod_session.

    + +

    Pour des détails sur la manière dont une session peut être + utilisée pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    + + +SessionCookieName +Nom et attributs du cookie RFC2109 dans lequel la session +est stockée +SessionCookieName nom attributs +none +server config +virtual host +directory +.htaccess + + + +

    La directive SessionCookieName permet de + spécifier le nom et les attributs optionnels d'un cookie compatible + RFC2109 dans lequel la session sera stockée. Les cookies RFC2109 + sont définis en utilisant l'en-tête HTTP Set-Cookie. +

    + +

    Une liste optionnelle d'attributs peut être spécifiée, comme dans + l'exemple suivant. Ces attributs sont insérés tels quels dans le + cookie, et ne sont pas interprétés par Apache. Assurez-vous que vos + attributs soient définis correctement selon la spécification des + cookies. +

    + + Cookie avec attributs + +Session On +SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1; + + + +
    +
    + + +SessionCookieName2 +Nom et attributs pour le cookie RFC2965 dans lequel est +stockée la session +SessionCookieName2 nom attributs +none +server config +virtual host +directory +.htaccess + + + +

    La directive SessionCookieName2 permet de + spécifier le nom et les attributs optionnels d'un cookie compatible + RFC2965 dans lequel la session sera stockée. Les cookies RFC2965 + sont définis en utilisant l'en-tête HTTP + Set-Cookie2. +

    + +

    Une liste optionnelle d'attributs peut être spécifiée, comme dans + l'exemple suivant. Ces attributs sont insérés tels quels dans le + cookie, et ne sont pas interprétés par Apache. Assurez-vous que vos + attributs soient définis correctement selon la spécification des + cookies. +

    + + Cookie2 avec attributs + +Session On +SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; + + + +
    +
    + + +SessionCookieRemove +Détermine si les cookies de session doivent être supprimés +des en-têtes HTTP entrants +SessionCookieRemove On|Off +SessionCookieRemove Off +server config +virtual host +directory +.htaccess + + + +

    La directive SessionCookieRemove permet de + déterminer si les cookies contenant la session doivent être + supprimés des en-têtes pendant le traitement de la requête.

    + +

    Dans le cas d'un mandataire inverse où le serveur Apache sert de + frontal à un serveur d'arrière-plan, révéler le contenu du cookie de + session à ce dernier peut conduire à une violation de la + confidentialité. À ce titre, si cette directive est définie à "on", + le cookie de session sera supprimé des en-têtes HTTP entrants.

    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_session_cookie.xml.meta b/docs/manual/mod/mod_session_cookie.xml.meta index cf3b2f57268..261119e1227 100644 --- a/docs/manual/mod/mod_session_cookie.xml.meta +++ b/docs/manual/mod/mod_session_cookie.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_session_crypto.html b/docs/manual/mod/mod_session_crypto.html index b6577a8ef78..f0186dec0a8 100644 --- a/docs/manual/mod/mod_session_crypto.html +++ b/docs/manual/mod/mod_session_crypto.html @@ -3,3 +3,7 @@ URI: mod_session_crypto.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_session_crypto.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_session_crypto.html.en b/docs/manual/mod/mod_session_crypto.html.en index b1c9924045d..5bde011ab47 100644 --- a/docs/manual/mod/mod_session_crypto.html.en +++ b/docs/manual/mod/mod_session_crypto.html.en @@ -1,27 +1,33 @@ - -mod_session_crypto - Apache HTTP Server +mod_session_crypto - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_session_crypto

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -50,21 +56,22 @@ the mod_session module.

    -
    top

    Basic Usage

    @@ -72,11 +79,10 @@

    To create a simple encrypted session and store it in a cookie called session, configure the session as follows:

    -

    Browser based encrypted session

    - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret -

    +

    Browser based encrypted session

    Session On
    +SessionCookieName session path=/
    +SessionCryptoPassphrase secret
    +

    The session will be encrypted with the given key. Different servers can be configured to share sessions by ensuring the same encryption key is used @@ -128,31 +134,27 @@

    The NSS crypto driver requires some parameters for configuration, which are specified as parameters with optional values after the driver name.

    -

    NSS without a certificate database

    - SessionCryptoDriver nss -

    +

    NSS without a certificate database

    SessionCryptoDriver nss
    +
    -

    NSS with certificate database

    - SessionCryptoDriver nss dir=certs -

    +

    NSS with certificate database

    SessionCryptoDriver nss dir=certs
    +
    -

    NSS with certificate database and parameters

    - SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod -

    +

    NSS with certificate database and parameters

    SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod
    +
    -

    NSS with paths containing spaces

    - SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod -

    +

    NSS with paths containing spaces

    SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod
    +
    -

    The NSS crypto driver might have already been configured by another - part of the server, for example from mod_nss or - mod_ldap. If found to have already been configured, - a warning will be logged, and the existing configuration will have taken affect. - To avoid this warning, use the noinit parameter as follows.

    +

    The NSS crypto driver might have already been + configured by another part of the server, for example from + mod_nss or mod_ldap. If found to + have already been configured, a warning will be logged, and the + existing configuration will have taken affect. To avoid this + warning, use the noinit parameter as follows.

    -

    NSS with certificate database

    - SessionCryptoDriver nss noinit -

    +

    NSS with certificate database

    SessionCryptoDriver nss noinit
    +

    To prevent confusion, ensure that all modules requiring NSS are configured with identical parameters.

    @@ -160,9 +162,8 @@

    The openssl crypto driver supports an optional parameter to specify the engine to be used for encryption.

    -

    OpenSSL with engine support

    - SessionCryptoDriver openssl engine=name -

    +

    OpenSSL with engine support

    SessionCryptoDriver openssl engine=name
    +
    @@ -191,12 +192,74 @@ secret to the end of the list, and once rolled out completely to all servers, remove the first key from the start of the list.

    +

    As of version 2.4.7 if the value begins with exec: the resulting command + will be executed and the first line returned to standard output by the program will be + used as the key.

    +
    #key used as-is
    +SessionCryptoPassphrase secret
    +
    +#Run /path/to/program to get key
    +SessionCryptoPassphrase exec:/path/to/program
    +
    +#Run /path/to/otherProgram and provide arguments
    +SessionCryptoPassphrase "exec:/path/to/otherProgram argument1"
    + + + +
    top
    +
    Description:Session encryption support
    Status:Experimental
    + + + + + + + +
    Description:File containing keys used to encrypt the session
    Syntax:SessionCryptoPassphraseFile filename
    Default:none
    Context:server config, virtual host, directory
    Status:Experimental
    Module:mod_session_crypto
    Compatibility:Available in Apache 2.3.0 and later
    +

    The SessionCryptoPassphraseFile directive specifies the + name of a configuration file containing the keys to use for encrypting or decrypting + the session, specified one per line. The file is read on server start, and a graceful + restart will be necessary for httpd to pick up changes to the keys.

    + +

    Unlike the SessionCryptoPassphrase directive, the keys are + not exposed within the httpd configuration and can be hidden by protecting the file + appropriately.

    + +

    Multiple keys can be specified in order to support key rotation. The first key + listed will be used for encryption, while all keys listed will be attempted for + decryption. To rotate keys across multiple servers over a period of time, add a new + secret to the end of the list, and once rolled out completely to all servers, remove + the first key from the start of the list.

    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_session_crypto.html.fr b/docs/manual/mod/mod_session_crypto.html.fr new file mode 100644 index 00000000000..145374f9e41 --- /dev/null +++ b/docs/manual/mod/mod_session_crypto.html.fr @@ -0,0 +1,291 @@ + + + + + +mod_session_crypto - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_session_crypto

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Support du chiffrement des sessions
    Statut:Exprimental
    IdentificateurdeModule:session_crypto_module
    FichierSource:mod_session_crypto.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    Avertissement

    +

    Les modules de session font usage des cookies HTTP, et peuvent + ce titre tre victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations caractre priv aux clients. + Veuillez vous assurer que les risques ainsi encourus ont t pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du chiffrement des sessions utilisateur avant de les + enregistrer dans une base de donnes locale, ou dans un cookie HTTP + au niveau du navigateur distant.

    + +

    Il peut contribuer prserver la confidentialit des sessions + lorsque leur contenu doit rester priv pour + l'utilisateur, ou lorsqu'une protection contre les attaques de type + cross site scripting est ncessaire.

    + +

    Pour plus de dtails propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    + +
    top
    +
    +

    Utilisation de base

    + +

    Pour crer une session chiffre et la stocker dans un cookie + nomm session, configurez la comme suit :

    + +

    Session chiffre stocke au niveau du + serveur

    Session On
    +SessionCookieName session path=/
    +SessionCryptoPassphrase secret
    +
    + +

    La session sera chiffre avec la cl spcifie. Il est possible + de configurer plusieurs serveurs pour qu'ils puissent partager des + sessions, en s'assurant que la mme cl de chiffrement est + utilise sur chaque serveur.

    + +

    Si la cl de chiffrement est modifie, les sessions seront + automatiquement invalides.

    + +

    Pour des dtails sur la manire dont une session peut tre + utilise pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    +
    top
    +

    Directive SessionCryptoCipher

    + + + + + + + + +
    Description:L'algorithme utiliser pour le chiffrement de la session
    Syntaxe:SessionCryptoCipher algorithme
    Dfaut:aes256
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Exprimental
    Module:mod_session_crypto
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive SessionCryptoCipher permet de + spcifier l'algorithme utiliser pour le chiffrement. En l'absence + de spcification, l'algorithme par dfaut est aes256.

    + +

    L'algorithme peut tre choisi, en fonction du moteur de chiffrement + utilis, parmi les valeurs suivantes :

    + +
    • 3des192
    • aes128
    • aes192
    • aes256
    + + +
    +
    top
    +

    Directive SessionCryptoDriver

    + + + + + + + + +
    Description:Le pilote de chiffrement utiliser pour chiffrer les +sessions
    Syntaxe:SessionCryptoDriver nom [param[=valeur]]
    Dfaut:aucun
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_session_crypto
    Compatibilit:Disponible depuis la version 2.3.0 +d'Apache
    +

    La directive SessionCryptoDriver permet de + spcifier le nom du pilote utiliser pour le chiffrement. Si aucun + pilote n'est spcifi, le pilote utilis par dfaut sera le pilote + recommand compil avec APR-util.

    + +

    Le pilote de chiffrement NSS ncessite certains + paramtres de configuration, qui seront spcifis comme arguments de + la directive avec des valeurs optionnelles aprs le nom du + pilote.

    + +

    NSS sans base de donnes de certificats

    SessionCryptoDriver nss
    +
    + +

    NSS avec base de donnes de certificats

    SessionCryptoDriver nss dir=certs
    +
    + +

    NSS avec base de donnes de certificats et + paramtres

    SessionCryptoDriver nss dir=certs cl3=cl3.db cert7=cert7.db secmod=secmod
    +
    + +

    NSS avec chemins contenant des espaces

    SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod
    +
    + +

    Le pilote de chiffrement NSS peut avoir t configur + au pralable dans une autre partie du serveur, par exemple depuis + mod_nss ou mod_ldap. Si c'est le + cas, un avertissement sera enregistr dans le journal, et la + configuration existante s'en trouvera affecte. Pour viter cet + avertissement, utilisez le paramtre noinit comme suit :

    + +

    NSS avec base de donnes de certificats

    SessionCryptoDriver nss noinit
    +
    + +

    Pour viter la confusion, assurez-vous que tous les modules + utilisant NSS soient configurs avec des paramtres identiques.

    + +

    Le pilote de chiffrement openssl accepte un paramtre + optionnel permettant de spcifier le moteur de chiffrement + utiliser.

    + +

    OpenSSL avec spcification du moteur de chiffrement

    SessionCryptoDriver openssl engine=nom-moteur
    +
    + + +
    +
    top
    +

    Directive SessionCryptoPassphrase

    + + + + + + + + +
    Description:La cl utilise pour chiffrer la session
    Syntaxe:SessionCryptoPassphrase secret [ secret ... ]
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Exprimental
    Module:mod_session_crypto
    Compatibilit:Disponible depuis la version 2.3.0 +d'Apache
    +

    La directive SessionCryptoPassphrase + permet de spcifier les cls utiliser pour chiffrer de manire + symtrique le contenu de la session avant de l'enregistrer, ou pour + dchiffrer le contenu de la session aprs sa lecture.

    + +

    L'utilisation de cls longues et composes de caractres vraiment + alatoires est plus performant en matire de scurit. Modifier une + cl sur un serveur a pour effet d'invalider toutes les sessions + existantes.

    + +

    Il est possible de spcifier plusieurs cls afin de mettre en + oeuvre la rotation de cls. La premire cl spcifie sera utilise + pour le chiffrement, alors que l'ensemble des cls spcifies le + sera pour le dchiffrement. Pour effectuer une rotation priodique + des cls sur plusieurs serveurs, ajoutez une nouvelle cl en fin de + liste, puis, une fois la rotation complte effectue, supprimez la + premire cl de la liste.

    + +

    Depuis la version 2.4.7, si la valeur de l'argument commence par exec: , la commande + spcifie sera excute, et la premire ligne que cette dernire + renverra sur la sortie standard sera utilise comme cl.

    +
    # cl spcifie et utilise en tant que tel
    +SessionCryptoPassphrase secret
    +
    +# excution de /path/to/program pour gnrer la cl
    +SessionCryptoPassphrase exec:/path/to/program
    +
    +# excution de /path/to/program avec un argument pour gnrer la cl
    +SessionCryptoPassphrase "exec:/path/to/otherProgram argument1"
    + + +
    +
    top
    +

    Directive SessionCryptoPassphraseFile

    + + + + + + + + +
    Description:Le fichier contenant les cls utilises pour chiffrer la +session
    Syntaxe:SessionCryptoPassphraseFile nom-fichier
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Exprimental
    Module:mod_session_crypto
    Compatibilit:Disponible depuis la version 2.3.0 du serveur HTTP Apache
    +

    La directive SessionCryptoPassphraseFile + permet de spcifier le nom d'un fichier de configuration contenant + les cls utiliser pour le chiffrement et le dchiffrement de la + session (une cl par ligne). Le fichier est lu au dmarrage du + serveur, et un redmarrage graceful est ncessaire pour prendre en + compte un ventuel changement de cls.

    + +

    la diffrence de la directive + SessionCryptoPassphrase, les cls ne sont pas + prsentes dans le fichier de configuration de httpd et peuvent tre + caches via une protection approprie du fichier de cls.

    + +

    Il est possible de spcifier plusieurs cls afin de mettre en + oeuvre la rotation de cls. La premire cl spcifie sera utilise + pour le chiffrement, alors que l'ensemble des cls spcifies le + sera pour le dchiffrement. Pour effectuer une rotation priodique + des cls sur plusieurs serveurs, ajoutez une nouvelle cl en fin de + liste, puis, une fois la rotation complte effectue, supprimez la + premire cl de la liste.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_session_crypto.xml b/docs/manual/mod/mod_session_crypto.xml index 87523919618..dd8e7da98f2 100644 --- a/docs/manual/mod/mod_session_crypto.xml +++ b/docs/manual/mod/mod_session_crypto.xml @@ -60,9 +60,11 @@ session, configure the session as follows:

    Browser based encrypted session - Session On
    - SessionCookieName session path=/
    - SessionCryptoPassphrase secret + +Session On +SessionCookieName session path=/ +SessionCryptoPassphrase secret +

    The session will be encrypted with the given key. Different servers can @@ -95,29 +97,40 @@ which are specified as parameters with optional values after the driver name.

    NSS without a certificate database + SessionCryptoDriver nss + NSS with certificate database + SessionCryptoDriver nss dir=certs + NSS with certificate database and parameters + SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod + NSS with paths containing spaces + SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod + -

    The NSS crypto driver might have already been configured by another - part of the server, for example from mod_nss or - mod_ldap. If found to have already been configured, - a warning will be logged, and the existing configuration will have taken affect. - To avoid this warning, use the noinit parameter as follows.

    +

    The NSS crypto driver might have already been + configured by another part of the server, for example from + mod_nss or mod_ldap. If found to + have already been configured, a warning will be logged, and the + existing configuration will have taken affect. To avoid this + warning, use the noinit parameter as follows.

    NSS with certificate database + SessionCryptoDriver nss noinit +

    To prevent confusion, ensure that all modules requiring NSS are configured with @@ -127,7 +140,9 @@ the engine to be used for encryption.

    OpenSSL with engine support + SessionCryptoDriver openssl engine=name + @@ -160,6 +175,50 @@ secret to the end of the list, and once rolled out completely to all servers, remove the first key from the start of the list.

    +

    As of version 2.4.7 if the value begins with exec: the resulting command + will be executed and the first line returned to standard output by the program will be + used as the key.

    +
    +#key used as-is
    +SessionCryptoPassphrase secret
    +
    +#Run /path/to/program to get key
    +SessionCryptoPassphrase exec:/path/to/program
    +
    +#Run /path/to/otherProgram and provide arguments
    +SessionCryptoPassphrase "exec:/path/to/otherProgram argument1"
    +
    + + + + + +SessionCryptoPassphraseFile +File containing keys used to encrypt the session +SessionCryptoPassphraseFile filename +none +server config +virtual host +directory + +Available in Apache 2.3.0 and later + + +

    The SessionCryptoPassphraseFile directive specifies the + name of a configuration file containing the keys to use for encrypting or decrypting + the session, specified one per line. The file is read on server start, and a graceful + restart will be necessary for httpd to pick up changes to the keys.

    + +

    Unlike the SessionCryptoPassphrase directive, the keys are + not exposed within the httpd configuration and can be hidden by protecting the file + appropriately.

    + +

    Multiple keys can be specified in order to support key rotation. The first key + listed will be used for encryption, while all keys listed will be attempted for + decryption. To rotate keys across multiple servers over a period of time, add a new + secret to the end of the list, and once rolled out completely to all servers, remove + the first key from the start of the list.

    +
    diff --git a/docs/manual/mod/mod_session_crypto.xml.fr b/docs/manual/mod/mod_session_crypto.xml.fr new file mode 100644 index 00000000000..acb9cea03ec --- /dev/null +++ b/docs/manual/mod/mod_session_crypto.xml.fr @@ -0,0 +1,277 @@ + + + + + + + + + + + +mod_session_crypto +Support du chiffrement des sessions +Experimental +mod_session_crypto.c +session_crypto_module +Disponible depuis la version 2.3 d'Apache + + + Avertissement +

    Les modules de session font usage des cookies HTTP, et peuvent + à ce titre être victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations à caractère privé aux clients. + Veuillez vous assurer que les risques ainsi encourus ont été pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du chiffrement des sessions utilisateur avant de les + enregistrer dans une base de données locale, ou dans un cookie HTTP + au niveau du navigateur distant.

    + +

    Il peut contribuer à préserver la confidentialité des sessions + lorsque leur contenu doit rester privé pour + l'utilisateur, ou lorsqu'une protection contre les attaques de type + cross site scripting est nécessaire.

    + +

    Pour plus de détails à propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    +mod_session +mod_session_cookie +mod_session_dbd + +
    Utilisation de base + +

    Pour créer une session chiffrée et la stocker dans un cookie + nommé session, configurez la comme suit :

    + + Session chiffrée stockée au niveau du + serveur + +Session On +SessionCookieName session path=/ +SessionCryptoPassphrase secret + + + +

    La session sera chiffrée avec la clé spécifiée. Il est possible + de configurer plusieurs serveurs pour qu'ils puissent partager des + sessions, en s'assurant que la même clé de chiffrement est + utilisée sur chaque serveur.

    + +

    Si la clé de chiffrement est modifiée, les sessions seront + automatiquement invalidées.

    + +

    Pour des détails sur la manière dont une session peut être + utilisée pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    + + +SessionCryptoDriver +Le pilote de chiffrement à utiliser pour chiffrer les +sessions +SessionCryptoDriver nom [param[=valeur]] +aucun +server config + +Disponible depuis la version 2.3.0 +d'Apache + + +

    La directive SessionCryptoDriver permet de + spécifier le nom du pilote à utiliser pour le chiffrement. Si aucun + pilote n'est spécifié, le pilote utilisé par défaut sera le pilote + recommandé compilé avec APR-util.

    + +

    Le pilote de chiffrement NSS nécessite certains + paramètres de configuration, qui seront spécifiés comme arguments de + la directive avec des valeurs optionnelles après le nom du + pilote.

    + + NSS sans base de données de certificats + + SessionCryptoDriver nss + + + + NSS avec base de données de certificats + + SessionCryptoDriver nss dir=certs + + + + NSS avec base de données de certificats et + paramètres + + SessionCryptoDriver nss dir=certs clé3=clé3.db cert7=cert7.db secmod=secmod + + + + NSS avec chemins contenant des espaces + + SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod + + + +

    Le pilote de chiffrement NSS peut avoir été configuré + au préalable dans une autre partie du serveur, par exemple depuis + mod_nss ou mod_ldap. Si c'est le + cas, un avertissement sera enregistré dans le journal, et la + configuration existante s'en trouvera affectée. Pour éviter cet + avertissement, utilisez le paramètre noinit comme suit :

    + + NSS avec base de données de certificats + + SessionCryptoDriver nss noinit + + + +

    Pour éviter la confusion, assurez-vous que tous les modules + utilisant NSS soient configurés avec des paramètres identiques.

    + +

    Le pilote de chiffrement openssl accepte un paramètre + optionnel permettant de spécifier le moteur de chiffrement à + utiliser.

    + + OpenSSL avec spécification du moteur de chiffrement + + SessionCryptoDriver openssl engine=nom-moteur + + + +
    +
    + + +SessionCryptoPassphrase +La clé utilisée pour chiffrer la session +SessionCryptoPassphrase secret [ secret ... ] +none +server config +virtual host +directory +.htaccess + +Disponible depuis la version 2.3.0 +d'Apache + + +

    La directive SessionCryptoPassphrase + permet de spécifier les clés à utiliser pour chiffrer de manière + symétrique le contenu de la session avant de l'enregistrer, ou pour + déchiffrer le contenu de la session après sa lecture.

    + +

    L'utilisation de clés longues et composées de caractères vraiment + aléatoires est plus performant en matière de sécurité. Modifier une + clé sur un serveur a pour effet d'invalider toutes les sessions + existantes.

    + +

    Il est possible de spécifier plusieurs clés afin de mettre en + oeuvre la rotation de clés. La première clé spécifiée sera utilisée + pour le chiffrement, alors que l'ensemble des clés spécifiées le + sera pour le déchiffrement. Pour effectuer une rotation périodique + des clés sur plusieurs serveurs, ajoutez une nouvelle clé en fin de + liste, puis, une fois la rotation complète effectuée, supprimez la + première clé de la liste.

    + +

    Depuis la version 2.4.7, si la valeur de l'argument commence par exec: , la commande + spécifiée sera exécutée, et la première ligne que cette dernière + renverra sur la sortie standard sera utilisée comme clé.

    +
    +# clé spécifiée et utilisée en tant que tel
    +SessionCryptoPassphrase secret
    +
    +# exécution de /path/to/program pour générer la clé
    +SessionCryptoPassphrase exec:/path/to/program
    +
    +# exécution de /path/to/program avec un argument pour générer la clé
    +SessionCryptoPassphrase "exec:/path/to/otherProgram argument1"
    +
    + +
    +
    + + +SessionCryptoPassphraseFile +Le fichier contenant les clés utilisées pour chiffrer la +session +SessionCryptoPassphraseFile nom-fichier +none +server config +virtual host +directory + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive SessionCryptoPassphraseFile + permet de spécifier le nom d'un fichier de configuration contenant + les clés à utiliser pour le chiffrement et le déchiffrement de la + session (une clé par ligne). Le fichier est lu au démarrage du + serveur, et un redémarrage graceful est nécessaire pour prendre en + compte un éventuel changement de clés.

    + +

    À la différence de la directive + SessionCryptoPassphrase, les clés ne sont pas + présentes dans le fichier de configuration de httpd et peuvent être + cachées via une protection appropriée du fichier de clés.

    + +

    Il est possible de spécifier plusieurs clés afin de mettre en + oeuvre la rotation de clés. La première clé spécifiée sera utilisée + pour le chiffrement, alors que l'ensemble des clés spécifiées le + sera pour le déchiffrement. Pour effectuer une rotation périodique + des clés sur plusieurs serveurs, ajoutez une nouvelle clé en fin de + liste, puis, une fois la rotation complète effectuée, supprimez la + première clé de la liste.

    + +
    +
    + + +SessionCryptoCipher +L'algorithme à utiliser pour le chiffrement de la session +SessionCryptoCipher algorithme +aes256 +server config +virtual host +directory +.htaccess + +Disponible depuis la version 2.3.0 du serveur HTTP Apache + + +

    La directive SessionCryptoCipher permet de + spécifier l'algorithme à utiliser pour le chiffrement. En l'absence + de spécification, l'algorithme par défaut est aes256.

    + +

    L'algorithme peut être choisi, en fonction du moteur de chiffrement + utilisé, parmi les valeurs suivantes :

    + +
    • 3des192
    • aes128
    • aes192
    • aes256
    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_session_crypto.xml.meta b/docs/manual/mod/mod_session_crypto.xml.meta index 330ec8e577a..56dc35d438e 100644 --- a/docs/manual/mod/mod_session_crypto.xml.meta +++ b/docs/manual/mod/mod_session_crypto.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_session_dbd.html b/docs/manual/mod/mod_session_dbd.html index a01d8bfa136..c4e0f5df7a4 100644 --- a/docs/manual/mod/mod_session_dbd.html +++ b/docs/manual/mod/mod_session_dbd.html @@ -3,3 +3,7 @@ URI: mod_session_dbd.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_session_dbd.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_session_dbd.html.en b/docs/manual/mod/mod_session_dbd.html.en index 499d3fdfc04..f9a2d99b2a0 100644 --- a/docs/manual/mod/mod_session_dbd.html.en +++ b/docs/manual/mod/mod_session_dbd.html.en @@ -1,27 +1,33 @@ - -mod_session_dbd - Apache HTTP Server +mod_session_dbd - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_session_dbd

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -57,7 +63,13 @@ the mod_session module.

    -
    top

    DBD Configuration

    @@ -93,15 +99,14 @@ to update an existing session, to insert a new session, and to delete an expired or empty session. These queries are configured as per the example below.

    -

    Sample DBD configuration

    - DBDriver pgsql
    - DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"
    - DBDPrepareSQL "delete from session where key = %s" deletesession
    - DBDPrepareSQL "update session set value = %s, expiry = %lld where key = %s" updatesession
    - DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession
    - DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession
    - DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession
    -

    +

    Sample DBD configuration

    DBDriver pgsql
    +DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"
    +DBDPrepareSQL "delete from session where key = %s" deletesession
    +DBDPrepareSQL "update session set value = %s, expiry = %lld, key = %s where key = %s" updatesession
    +DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession
    +DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession
    +DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession
    +
    top
    @@ -115,10 +120,9 @@ table called apachesession, and save the session ID in a cookie called session, configure the session as follows:

    -

    SQL based anonymous session

    - Session On
    - SessionDBDCookieName session path=/
    -

    +

    SQL based anonymous session

    Session On
    +SessionDBDCookieName session path=/
    +

    For more examples on how the session can be configured to be read from and written to by a CGI application, see the @@ -146,10 +150,9 @@ table called apachesession, and with the session keyed to the userid, configure the session as follows:

    -

    SQL based per user session

    - Session On
    - SessionDBDPerUser On
    -

    +

    SQL based per user session

    Session On
    +SessionDBDPerUser On
    +
    top
    @@ -184,10 +187,9 @@ Apache. Ensure that your attributes are defined correctly as per the cookie specification.

    -

    Cookie with attributes

    - Session On
    - SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    -

    +

    Cookie with attributes

    Session On
    +SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    +
    @@ -211,10 +213,9 @@ Apache. Ensure that your attributes are defined correctly as per the cookie specification.

    -

    Cookie2 with attributes

    - Session On
    - SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    -

    +

    Cookie2 with attributes

    Session On
    +SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    +
    @@ -327,8 +328,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_session_dbd.html.fr b/docs/manual/mod/mod_session_dbd.html.fr new file mode 100644 index 00000000000..5d81913a94b --- /dev/null +++ b/docs/manual/mod/mod_session_dbd.html.fr @@ -0,0 +1,407 @@ + + + + + +mod_session_dbd - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_session_dbd

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:DBD/SQL based session support
    Status:Extension
    + + + +
    Description:Support des session bas sur DBD/SQL
    Statut:Extension
    IdentificateurdeModule:session_dbd_module
    FichierSource:mod_session_dbd.c
    Compatibilit:Disponible depuis la version 2.3 d'Apache
    +

    Sommaire

    + +

    Avertissement

    +

    Les modules de session font usage des cookies HTTP, et peuvent + ce titre tre victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations caractre priv aux clients. + Veuillez vous assurer que les risques ainsi encourus ont t pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du stockage des sessions utilisateur dans une base de + donnes SQL en utilisant le module mod_dbd.

    + +

    Les sessions sont soit anonymes, et la session + est alors identifie par un UUID unique stock dans un cookie au + niveau du navigateur, soit propres l'utilisateur, + et la session est alors identifie par l'identifiant de + l'utilisateur connect.

    + +

    Les sessions bases sur SQL sont dissimules au navigateur, et + permettent ainsi de prserver la confidentialit sans avoir recours + au chiffrement.

    + +

    Plusieurs serveurs web d'une fort de serveurs peuvent choisir de + partager une base de donnes, et ainsi partager les sessions entre + eux.

    + +

    Pour plus de dtails propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    + +
    top
    +
    +

    Configuration de DBD

    + +

    Pour que le module mod_session_dbd puisse tre + configur et maintenir une session, il faut tout d'abord + configurer le module mod_dbd pour que le serveur + puisse excuter des requtes vers la base de donnes.

    + +

    Quatre types de requtes sont ncessaires pour maintenir une + session, slectionner ou mettre jour une session existante, + insrer une nouvelle session et supprimer une session vide ou + arrive expiration. Ces requtes sont configures comme dans + l'exemple suivant :

    + +

    Exemple de configuration de DBD

    DBDriver pgsql
    +DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"
    +DBDPrepareSQL "delete from session where key = %s" deletesession
    +DBDPrepareSQL "update session set value = %s, expiry = %lld, key = %s where key = %s" updatesession
    +DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession
    +DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession
    +DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession
    +
    + +
    top
    +
    +

    Sessions anonymes

    + +

    Les sessions anonymes sont identifies par un UUID unique, et + stockes dans un cookie au niveau du navigateur. Cette mthode est + similaire celle utilise par la plupart des serveurs + d'applications pour stocker les informations de session.

    + +

    Pour crer une session anonyme, la stocker dans une table de + base de donne postgres nomme apachesession, et + sauvegarder l'identifiant de session dans un cookie nomm + session, configurez la session comme suit :

    + +

    Session anonyme base sur SQL

    Session On
    +SessionDBDCookieName session path=/
    +
    + +

    Pour plus d'exemples sur la manire dont une application CGI + peut accder aux informations de session, voir la section exemples + de la documentation du module mod_session.

    + +

    Pour des dtails sur la manire dont une session peut tre + utilise pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    top
    +
    +

    Sessions propres un + utilisateur

    + +

    Les sessions propres un utilisateur sont identifies par le + nom de l'utilisateur authentifi avec succs. Ceci permet + d'assurer une confidentialit optimale, car aucun traitement + externe la session n'existe en dehors du contexte + authentifi.

    + +

    Les sessions propres un utilisateur ne fonctionnent que dans + un environnement d'authentification correctement configur, qu'il + s'agisse d'une authentification de base, base de condenss + (digest) ou de certificats client SSL. Suite des limitations + dues des dpendances mutuelles, les sessions propres un + utilisateur ne peuvent pas tre utilises pour stocker les donnes + d'authentification en provenance d'un module comme + mod_auth_form.

    + +

    Pour crer une session propre un utilisateur, la stocker dans + une table de base de donnes postgres nomme + apachesession, avec comme cl de session l'identifiant + utilisateur, ajoutez les lignes suivantes :

    + +

    Session propre un utilisateur base sur SQL

    Session On
    +SessionDBDPerUser On
    +
    + +
    top
    +
    +

    Nettoyage de la base de + donnes

    +

    Avec le temps, la base de donnes va commencer accumuler des + sessions expires. Pour le moment, le module + mod_session_dbd n'est pas en mesure de grer + automatiquement l'expiration des sessions.

    + +

    Avertissement

    +

    L'administrateur devra mettre en oeuvre un traitement externe + via cron pour nettoyer les sessions expires.

    +
    + +
    +
    top
    +

    Directive SessionDBDCookieName

    + + + + + + + +
    Description:Nom et attributs du cookie RFC2109 qui contient +l'identifiant de session
    Syntaxe:SessionDBDCookieName nom attributs
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDCookieName permet + de spcifier le nom et les attributs optionnels d'un cookie + compatible RFC2109 qui contiendra l'identifiant de session. Les + cookies RFC2109 sont dfinis l'aide de l'en-tte HTTP + Set-Cookie. +

    + +

    Une liste optionnelle d'attributs peut tre spcifie pour ce + cookie, comme dans l'exemple ci-dessous. Ces attributs sont insrs + dans le cookie tels quels, et ne sont pas interprts par Apache. + Assurez-vous que vos attributs sont dfinis correctement selon la + spcification des cookies. +

    + +

    Cookie avec attributs

    Session On
    +SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    +
    + + +
    +
    top
    +

    Directive SessionDBDCookieName2

    + + + + + + + +
    Description:Nom et attributs du cookie RFC2965 qui contient +l'identifiant de session
    Syntaxe:SessionDBDCookieName2 nom attributs
    Dfaut:none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDCookieName2 permet + de spcifier le nom et les attributs optionnels d'un cookie + compatible RFC2965 qui contiendra l'identifiant de session. Les + cookies RFC2965 sont dfinis l'aide de l'en-tte HTTP + Set-Cookie2. +

    + +

    Une liste optionnelle d'attributs peut tre spcifie pour ce + cookie, comme dans l'exemple ci-dessous. Ces attributs sont insrs + dans le cookie tel quel, et ne sont pas interprts par Apache. + Assurez-vous que vos attributs sont dfinis correctement selon la + spcification des cookies. +

    + +

    Cookie2 avec attributs

    Session On
    +SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    +
    + + +
    +
    top
    +

    Directive SessionDBDCookieRemove

    + + + + + + + +
    Description:Dtermine si les cookies de session doivent tre supprims +des en-ttes HTTP entrants
    Syntaxe:SessionDBDCookieRemove On|Off
    Dfaut:SessionDBDCookieRemove On
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDCookieRemove permet + de dterminer si les cookies contenant l'identifiant de session + doivent tre supprims des en-ttes pendant le traitement de la + requte.

    + +

    Dans le cas d'un mandataire inverse o le serveur Apache sert de + frontal un serveur d'arrire-plan, rvler le contenu du cookie de + session ce dernier peut conduire une violation de la + confidentialit. ce titre, si cette directive est dfinie "on", + le cookie de session sera supprim des en-ttes HTTP entrants.

    + + +
    +
    top
    +

    Directive SessionDBDDeleteLabel

    + + + + + + + +
    Description:La requte SQL utiliser pour supprimer des sessions de la +base de donnes
    Syntaxe:SessionDBDDeleteLabel tiquette
    Dfaut:SessionDBDDeleteLabel deletesession
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDDeleteLabel permet + de dfinir l'tiquette de la requte de suppression utiliser par + dfaut pour supprimer une session vide ou expire. Cette + tiquette doit avoir t dfinie au pralable via une directive + DBDPrepareSQL.

    + + +
    +
    top
    +

    Directive SessionDBDInsertLabel

    + + + + + + + +
    Description:La requte SQL utiliser pour insrer des sessions dans la +base de donnes
    Syntaxe:SessionDBDInsertLabel tiquette
    Dfaut:SessionDBDInsertLabel insertsession
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDInsertLabel permet + de dfinir l'tiquette de la requte d'insertion par dfaut + charger dans une session. Cette + tiquette doit avoir t dfinie au pralable via une directive + DBDPrepareSQL.

    + +

    Si une tentative de mise jour d'une session ne concerne aucun + enregistrement, c'est cette requte qui sera utilise pour insrer + la session dans la base de donnes.

    + + +
    +
    top
    +

    Directive SessionDBDPerUser

    + + + + + + + +
    Description:Active une session propre un utilisateur
    Syntaxe:SessionDBDPerUser On|Off
    Dfaut:SessionDBDPerUser Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDPerUser permet + d'activer une session propre un utilisateur, dont la cl sera le + nom de l'utilisateur connect. Si l'utilisateur n'est pas connect, + la directive sera ignore.

    + + +
    +
    top
    +

    Directive SessionDBDSelectLabel

    + + + + + + + +
    Description:La requte SQL utiliser pour slectionner des sessions +dans la base de donnes
    Syntaxe:SessionDBDSelectLabel tiquette
    Dfaut:SessionDBDSelectLabel selectsession
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDSelectLabel permet + de dfinir l'tiquette de la requte de slection par dfaut + utiliser pour charger une session. Cette tiquette doit avoir t + dfinie au pralable via une directive DBDPrepareSQL.

    + + +
    +
    top
    +

    Directive SessionDBDUpdateLabel

    + + + + + + + +
    Description:La requte SQL utiliser pour mettre jour des sessions +prexistantes dans la base de donnes
    Syntaxe:SessionDBDUpdateLabel tiquette
    Dfaut:SessionDBDUpdateLabel updatesession
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Extension
    Module:mod_session_dbd
    +

    La directive SessionDBDUpdateLabel permet + de dfinir l'tiquette de la requte de mise jour par dfaut + charger dans une session. Cette + tiquette doit avoir t dfinie au pralable via une directive + DBDPrepareSQL.

    + +

    Si une tentative de mise jour d'une session ne concerne aucun + enregistrement, c'est la requte d'insertion qui sera appele pour + insrer la session dans la base de donnes. Si la base de donnes + supporte InsertOrUpdate, modifiez cette requte pour effectuer la + mise jour en une seule requte au lieu de deux.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_session_dbd.xml b/docs/manual/mod/mod_session_dbd.xml index b1663ed66ab..adc5ba2ebd7 100644 --- a/docs/manual/mod/mod_session_dbd.xml +++ b/docs/manual/mod/mod_session_dbd.xml @@ -73,13 +73,15 @@ session. These queries are configured as per the example below.

    Sample DBD configuration - DBDriver pgsql
    - DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost"
    - DBDPrepareSQL "delete from session where key = %s" deletesession
    - DBDPrepareSQL "update session set value = %s, expiry = %lld where key = %s" updatesession
    - DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession
    - DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession
    - DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession
    + +DBDriver pgsql +DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost" +DBDPrepareSQL "delete from session where key = %s" deletesession +DBDPrepareSQL "update session set value = %s, expiry = %lld, key = %s where key = %s" updatesession +DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession +DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession +DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession +
    @@ -95,8 +97,10 @@ called session, configure the session as follows:

    SQL based anonymous session - Session On
    - SessionDBDCookieName session path=/
    + +Session On +SessionDBDCookieName session path=/ +

    For more examples on how the session can be configured to be read @@ -126,8 +130,10 @@ userid, configure the session as follows:

    SQL based per user session - Session On
    - SessionDBDPerUser On
    + +Session On +SessionDBDPerUser On +
    @@ -167,8 +173,10 @@

    Cookie with attributes - Session On
    - SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;
    + +Session On +SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1; +
    @@ -197,8 +205,10 @@

    Cookie2 with attributes - Session On
    - SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;
    + +Session On +SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; +
    diff --git a/docs/manual/mod/mod_session_dbd.xml.fr b/docs/manual/mod/mod_session_dbd.xml.fr new file mode 100644 index 00000000000..da43d0a9420 --- /dev/null +++ b/docs/manual/mod/mod_session_dbd.xml.fr @@ -0,0 +1,393 @@ + + + + + + + + + + + +mod_session_dbd +Support des session basé sur DBD/SQL +Extension +mod_session_dbd.c +session_dbd_module +Disponible depuis la version 2.3 d'Apache + + + Avertissement +

    Les modules de session font usage des cookies HTTP, et peuvent + à ce titre être victimes d'attaques de type Cross Site Scripting, + ou divulguer des informations à caractère privé aux clients. + Veuillez vous assurer que les risques ainsi encourus ont été pris + en compte avant d'activer le support des sessions sur votre + serveur.

    +
    + +

    Ce sous-module du module mod_session fournit le + support du stockage des sessions utilisateur dans une base de + données SQL en utilisant le module mod_dbd.

    + +

    Les sessions sont soit anonymes, et la session + est alors identifiée par un UUID unique stocké dans un cookie au + niveau du navigateur, soit propres à l'utilisateur, + et la session est alors identifiée par l'identifiant de + l'utilisateur connecté.

    + +

    Les sessions basées sur SQL sont dissimulées au navigateur, et + permettent ainsi de préserver la confidentialité sans avoir recours + au chiffrement.

    + +

    Plusieurs serveurs web d'une forêt de serveurs peuvent choisir de + partager une base de données, et ainsi partager les sessions entre + eux.

    + +

    Pour plus de détails à propos de l'interface des sessions, voir + la documentation du module mod_session.

    + +
    +mod_session +mod_session_crypto +mod_session_cookie +mod_dbd + +
    Configuration de DBD + +

    Pour que le module mod_session_dbd puisse être + configuré et maintenir une session, il faut tout d'abord + configurer le module mod_dbd pour que le serveur + puisse exécuter des requêtes vers la base de données.

    + +

    Quatre types de requêtes sont nécessaires pour maintenir une + session, sélectionner ou mettre à jour une session existante, + insérer une nouvelle session et supprimer une session vide ou + arrivée à expiration. Ces requêtes sont configurées comme dans + l'exemple suivant :

    + + Exemple de configuration de DBD + +DBDriver pgsql +DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost" +DBDPrepareSQL "delete from session where key = %s" deletesession +DBDPrepareSQL "update session set value = %s, expiry = %lld, key = %s where key = %s" updatesession +DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession +DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession +DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession + + + +
    + +
    Sessions anonymes + +

    Les sessions anonymes sont identifiées par un UUID unique, et + stockées dans un cookie au niveau du navigateur. Cette méthode est + similaire à celle utilisée par la plupart des serveurs + d'applications pour stocker les informations de session.

    + +

    Pour créer une session anonyme, la stocker dans une table de + base de donnée postgres nommée apachesession, et + sauvegarder l'identifiant de session dans un cookie nommé + session, configurez la session comme suit :

    + + Session anonyme basée sur SQL + +Session On +SessionDBDCookieName session path=/ + + + +

    Pour plus d'exemples sur la manière dont une application CGI + peut accéder aux informations de session, voir la section exemples + de la documentation du module mod_session.

    + +

    Pour des détails sur la manière dont une session peut être + utilisée pour stocker des informations de type nom + d'utilisateur/mot de passe, voir la documentation du module + mod_auth_form.

    + +
    + +
    Sessions propres à un + utilisateur + +

    Les sessions propres à un utilisateur sont identifiées par le + nom de l'utilisateur authentifié avec succès. Ceci permet + d'assurer une confidentialité optimale, car aucun traitement + externe à la session n'existe en dehors du contexte + authentifié.

    + +

    Les sessions propres à un utilisateur ne fonctionnent que dans + un environnement d'authentification correctement configuré, qu'il + s'agisse d'une authentification de base, à base de condensés + (digest) ou de certificats client SSL. Suite à des limitations + dues à des dépendances mutuelles, les sessions propres à un + utilisateur ne peuvent pas être utilisées pour stocker les données + d'authentification en provenance d'un module comme + mod_auth_form.

    + +

    Pour créer une session propre à un utilisateur, la stocker dans + une table de base de données postgres nommée + apachesession, avec comme clé de session l'identifiant + utilisateur, ajoutez les lignes suivantes :

    + + Session propre à un utilisateur basée sur SQL + +Session On +SessionDBDPerUser On + + + +
    + +
    Nettoyage de la base de + données +

    Avec le temps, la base de données va commencer à accumuler des + sessions expirées. Pour le moment, le module + mod_session_dbd n'est pas en mesure de gérer + automatiquement l'expiration des sessions.

    + + Avertissement +

    L'administrateur devra mettre en oeuvre un traitement externe + via cron pour nettoyer les sessions expirées.

    +
    + +
    + + +SessionDBDCookieName +Nom et attributs du cookie RFC2109 qui contient +l'identifiant de session +SessionDBDCookieName nom attributs +none +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDCookieName permet + de spécifier le nom et les attributs optionnels d'un cookie + compatible RFC2109 qui contiendra l'identifiant de session. Les + cookies RFC2109 sont définis à l'aide de l'en-tête HTTP + Set-Cookie. +

    + +

    Une liste optionnelle d'attributs peut être spécifiée pour ce + cookie, comme dans l'exemple ci-dessous. Ces attributs sont insérés + dans le cookie tels quels, et ne sont pas interprétés par Apache. + Assurez-vous que vos attributs sont définis correctement selon la + spécification des cookies. +

    + + Cookie avec attributs + +Session On +SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1; + + + +
    +
    + + +SessionDBDCookieName2 +Nom et attributs du cookie RFC2965 qui contient +l'identifiant de session +SessionDBDCookieName2 nom attributs +none +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDCookieName2 permet + de spécifier le nom et les attributs optionnels d'un cookie + compatible RFC2965 qui contiendra l'identifiant de session. Les + cookies RFC2965 sont définis à l'aide de l'en-tête HTTP + Set-Cookie2. +

    + +

    Une liste optionnelle d'attributs peut être spécifiée pour ce + cookie, comme dans l'exemple ci-dessous. Ces attributs sont insérés + dans le cookie tel quel, et ne sont pas interprétés par Apache. + Assurez-vous que vos attributs sont définis correctement selon la + spécification des cookies. +

    + + Cookie2 avec attributs + +Session On +SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; + + + +
    +
    + + +SessionDBDCookieRemove +Détermine si les cookies de session doivent être supprimés +des en-têtes HTTP entrants +SessionDBDCookieRemove On|Off +SessionDBDCookieRemove On +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDCookieRemove permet + de déterminer si les cookies contenant l'identifiant de session + doivent être supprimés des en-têtes pendant le traitement de la + requête.

    + +

    Dans le cas d'un mandataire inverse où le serveur Apache sert de + frontal à un serveur d'arrière-plan, révéler le contenu du cookie de + session à ce dernier peut conduire à une violation de la + confidentialité. À ce titre, si cette directive est définie à "on", + le cookie de session sera supprimé des en-têtes HTTP entrants.

    + +
    +
    + + +SessionDBDPerUser +Active une session propre à un utilisateur +SessionDBDPerUser On|Off +SessionDBDPerUser Off +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDPerUser permet + d'activer une session propre à un utilisateur, dont la clé sera le + nom de l'utilisateur connecté. Si l'utilisateur n'est pas connecté, + la directive sera ignorée.

    + +
    +
    + + +SessionDBDSelectLabel +La requête SQL à utiliser pour sélectionner des sessions +dans la base de données +SessionDBDSelectLabel étiquette +SessionDBDSelectLabel selectsession +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDSelectLabel permet + de définir l'étiquette de la requête de sélection par défaut à + utiliser pour charger une session. Cette étiquette doit avoir été + définie au préalable via une directive DBDPrepareSQL.

    + +
    +
    + + +SessionDBDInsertLabel +La requête SQL à utiliser pour insérer des sessions dans la +base de données +SessionDBDInsertLabel étiquette +SessionDBDInsertLabel insertsession +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDInsertLabel permet + de définir l'étiquette de la requête d'insertion par défaut à + charger dans une session. Cette + étiquette doit avoir été définie au préalable via une directive + DBDPrepareSQL.

    + +

    Si une tentative de mise à jour d'une session ne concerne aucun + enregistrement, c'est cette requête qui sera utilisée pour insérer + la session dans la base de données.

    + +
    +
    + + +SessionDBDUpdateLabel +La requête SQL à utiliser pour mettre à jour des sessions +préexistantes dans la base de données +SessionDBDUpdateLabel étiquette +SessionDBDUpdateLabel updatesession +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDUpdateLabel permet + de définir l'étiquette de la requête de mise à jour par défaut à + charger dans une session. Cette + étiquette doit avoir été définie au préalable via une directive + DBDPrepareSQL.

    + +

    Si une tentative de mise à jour d'une session ne concerne aucun + enregistrement, c'est la requête d'insertion qui sera appelée pour + insérer la session dans la base de données. Si la base de données + supporte InsertOrUpdate, modifiez cette requête pour effectuer la + mise à jour en une seule requête au lieu de deux.

    + +
    +
    + + +SessionDBDDeleteLabel +La requête SQL à utiliser pour supprimer des sessions de la +base de données +SessionDBDDeleteLabel étiquette +SessionDBDDeleteLabel deletesession +server config +virtual host +directory +.htaccess + + + +

    La directive SessionDBDDeleteLabel permet + de définir l'étiquette de la requête de suppression à utiliser par + défaut pour supprimer une session vide ou expirée. Cette + étiquette doit avoir été définie au préalable via une directive + DBDPrepareSQL.

    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_session_dbd.xml.meta b/docs/manual/mod/mod_session_dbd.xml.meta index 84eaffc38b5..89c45169494 100644 --- a/docs/manual/mod/mod_session_dbd.xml.meta +++ b/docs/manual/mod/mod_session_dbd.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_setenvif.html.en b/docs/manual/mod/mod_setenvif.html.en index 34ffa036f5c..151ba1a2f7b 100644 --- a/docs/manual/mod/mod_setenvif.html.en +++ b/docs/manual/mod/mod_setenvif.html.en @@ -1,23 +1,28 @@ - -mod_setenvif - Apache HTTP Server +mod_setenvif - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_setenvif

    @@ -47,10 +52,20 @@ on characteristics of the request such as this example, which sets netscape if the browser is mozilla but not MSIE.

    -

    - BrowserMatch ^Mozilla netscape
    - BrowserMatch MSIE !netscape
    -

    +
    BrowserMatch ^Mozilla netscape
    +BrowserMatch MSIE !netscape
    + + +

    When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.

    +

    Directives

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    BrowserMatch Directive

    @@ -82,17 +97,15 @@ on characteristics of the request sets environment variables conditional on the User-Agent HTTP request header. The following two lines have the same effect:

    -

    - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -

    +
    BrowserMatch Robot is_a_robot
    +SetEnvIf User-Agent Robot is_a_robot
    +

    Some additional examples:

    -

    - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    - BrowserMatch MSIE !javascript
    -

    +
    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +BrowserMatch MSIE !javascript
    +
    top
    @@ -112,19 +125,17 @@ respect to case semantically identical to the BrowserMatch directive. However, it provides for case-insensitive matching. For example:

    -

    - BrowserMatchNoCase mac platform=macintosh
    - BrowserMatchNoCase win platform=windows
    -

    +
    BrowserMatchNoCase mac platform=macintosh
    +BrowserMatchNoCase win platform=windows
    +

    The BrowserMatch and BrowserMatchNoCase directives are special cases of the SetEnvIf and SetEnvIfNoCase directives. The following two lines have the same effect:

    -

    - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -

    +
    BrowserMatchNoCase Robot is_a_robot
    +SetEnvIfNoCase User-Agent Robot is_a_robot
    +
    top
    @@ -216,20 +227,21 @@ of

    value. Since version 2.0.51, Apache httpd will recognize occurrences of $1..$9 within value and replace them by parenthesized subexpressions - of regex.

    + of regex. $0 provides access to the whole + string matched by that pattern.

    + +
    SetEnvIf Request_URI "\.gif$" object_is_image=gif
    +SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
    +SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
    +    
    +SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
    +    
    +SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    +    
    +SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1
     
    -

    Example:

    +SetEnvIf ^TS ^[a-z] HAVE_TS

    - SetEnvIf Request_URI "\.gif$" object_is_image=gif
    - SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
    - SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
    - :
    - SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
    - :
    - SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    - :
    - SetEnvIf ^TS ^[a-z] HAVE_TS
    -

    The first three will set the environment variable object_is_image if the request was for an image @@ -262,13 +274,12 @@ for additional examples. Module:mod_setenvif

    The SetEnvIfExpr directive defines - environment variables based on an <If> + environment variables based on an <If> ap_expr. These expressions will be evaluated at runtime, and applied env-variable in the same fashion as SetEnvIf.

    -

    - SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered -

    +
    SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered
    +

    This would set the environment variable iso_delivered every time our application attempts to send it via X-Sendfile

    @@ -276,15 +287,14 @@ for additional examples.

    A more useful example would be to set the variable rfc1918 if the remote IP address is a private address according to RFC 1918:

    -

    - SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 -

    +
    SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918
    +

    See also

    @@ -307,9 +317,8 @@ without respect to case the SetEnvIf directive, and differs only in that the regular expression matching is performed in a case-insensitive manner. For example:

    -

    - SetEnvIfNoCase Host Example\.Org site=example -

    +
    SetEnvIfNoCase Host Example\.Org site=example
    +

    This will cause the site environment variable to be set to "example" if the HTTP request header @@ -325,7 +334,28 @@ without respect to case  ja  |  ko  |  tr 

    - +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_setenvif.html.fr b/docs/manual/mod/mod_setenvif.html.fr index 70ee7ec58e0..095caf2df43 100644 --- a/docs/manual/mod/mod_setenvif.html.fr +++ b/docs/manual/mod/mod_setenvif.html.fr @@ -1,23 +1,28 @@ - -mod_setenvif - Serveur Apache HTTP +mod_setenvif - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_setenvif

    @@ -28,7 +33,7 @@  tr 

    +de certainescaractristiques de la requte
    Description:Permet de dfinir des variables d'environnement en fonction -de caractristiques de la requte
    Statut:Base
    IdentificateurdeModule:setenvif_module
    FichierSource:mod_setenvif.c
    @@ -36,9 +41,8 @@ de caract

    Le module mod_setenvif vous permet de dfinir - des variables d'environnement internes en fonction du fait que telle ou telle - caractristique de la requte correspond ou non aux expressions - rationnelles que vous spcifiez. Ces variables d'environnement + des variables d'environnement internes de manire conditionnelle en fonction + de critres que vous pouvez spcifier. Ces variables d'environnement peuvent tre utilises par d'autres parties du serveur pour prendre des dcisions quant aux actions entreprendre, et pour dterminer si les scripts CGI et les pages SSI doivent pouvoir y accder.

    @@ -49,10 +53,19 @@ de caract exemple qui dfinit netscape si le navigateur est Mozilla et non MSIE.

    -

    - BrowserMatch ^Mozilla netscape
    - BrowserMatch MSIE !netscape
    -

    +
    BrowserMatch ^Mozilla netscape
    +BrowserMatch MSIE !netscape
    + + +

    Lorsque le serveur cherche un chemin via une sous-requte interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il gnre un + listing du contenu d'un rpertoire via le module + mod_autoindex, la sous-requte n'hrite pas des + variables d'environnement spcifiques la requte. En outre, cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas values + sparment dans la sous-requte.

    +
    +
  • Commentaires
  • top
    -

    BrowserMatch Directive

    +

    Directive BrowserMatch

    @@ -85,21 +98,19 @@ contenu de l'en-t d'environnement en fonction du contenu de l'en-tte de requte HTTP User-Agent. Les deux lignes suivantes produisent le mme effet :

    -

    - BrowserMatchNoCase Robot est_un_robot
    - SetEnvIfNoCase User-Agent Robot est_un_robot
    -

    +
    BrowserMatch Robot is_a_robot
    +SetEnvIf User-Agent Robot is_a_robot
    +

    Quelques exemples supplmentaires :

    -

    - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    - BrowserMatch MSIE !javascript
    -

    +
    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +BrowserMatch MSIE !javascript
    +
    top
    -
    Description:Dfinit des variables d'environnement en fonction du contenu de l'en-tte HTTP User-Agent

    La directive BrowserMatchNoCase est identique sur le plan smantique la directive BrowserMatch. Elle permet cependant une comparaison insensible la casse. Par exemple :

    -

    - BrowserMatchNoCase mac platform=macintosh
    - BrowserMatchNoCase win platform=windows
    -

    +
    BrowserMatchNoCase mac platform=macintosh
    +BrowserMatchNoCase win platform=windows
    +

    Les directives BrowserMatch et BrowserMatchNoCase sont des cas particuliers des directives SetEnvIf et SetEnvIfNoCase. Ainsi, les deux lignes suivantes produisent le mme effet :

    -

    - BrowserMatchNoCase Robot est_un_robot
    - SetEnvIfNoCase User-Agent Robot est_un_robot
    -

    +
    BrowserMatchNoCase Robot is_a_robot
    +SetEnvIfNoCase User-Agent Robot is_a_robot
    +
    top
    -
    Description:Dfinit des variables d'environnement en fonction du contenu de l'en-tte HTTP User-Agent sans tenir compte de la @@ -115,24 +126,22 @@ casse
    @@ -147,7 +156,7 @@ attributs de la requ

    La directive SetEnvIf permet de dfinir des variables d'environnement en fonction des attributs de la requte. L'attribut spcifi comme premier argument peut - se prsenter sous l'une des quatre formes suivantes :

    + se prsenter sous l'une des trois formes suivantes :

    1. Un champ d'en-tte de requte HTTP (voir la RFC2616 pour @@ -210,9 +219,9 @@ ainsi que les valeurs optionnelles qui doivent leur peuvent se prsenter sous les formes suivantes :

        -
      1. nom-variable, or
      2. +
      3. nom-variable, ou
      4. -
      5. !nom-variable, or
      6. +
      7. !nom-variable, ou
      8. nom-variable=valeur
      @@ -225,27 +234,28 @@ peuvent se pr $1..$9 l'intrieur de valeur, et les remplace par les sous-expressions entre parenthses correspondantes de - regex.

      + regex. $0 permet d'accder l'ensemble de la chane + qui correspond ce modle.

      + +
      SetEnvIf Request_URI "\.gif$" object_is_image=gif
      +SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
      +SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
      +    
      +SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
      +    
      +SetEnvIf object_is_image xbm XBIT_PROCESSING=1
       
      -

      Example:

      +SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1 + +SetEnvIf ^TS ^[a-z] HAVE_TS

      - SetEnvIf Request_URI "\.gif$" objet_est_une_image=gif
      - SetEnvIf Request_URI "\.jpg$" objet_est_une_image=jpg
      - SetEnvIf Request_URI "\.xbm$" objet_est_une_image=xbm
      - :
      - SetEnvIf Referer www\.mon-domaine\.example\.com rfrant_intra_site
      - :
      - SetEnvIf objet_est_une_image xbm XBIT_PROCESSING=1
      - :
      - SetEnvIf ^TS ^[a-z] HAVE_TS
      -

      Les trois premires lignes dfinissent la variable d'environnement objet_est_une_image si l'objet de la requte est un fichier image, et la quatrime dfinit la variable - rfrant_intra_site si la page rfrante se trouve + intra_site_referral si la page rfrante se trouve quelque part dans le site web - www.mon-domaine.example.com.

      + www.mydomain.example.com.

      La dernire ligne dfinit la variable d'environnement HAVE_TS si la requte contient un en-tte dont le nom @@ -260,7 +270,7 @@ serveur HTTP Apache pour des exemples suppl

      top
      -
    Description:Dfinit des variables d'environnement en fonction des attributs de la requte
    Description:Dfinit des variables d'environnement en fonction d'une expression ap_expr
    Syntaxe:SetEnvIfExpr expr @@ -273,14 +283,13 @@ serveur HTTP Apache pour des exemples suppl

    La directive SetEnvIfExpr permet de dfinir des variables d'environnement en fonction d'une expression - <If> ap_expr. Cette + <If> ap_expr. Cette expression est value l'excution, et utilise les variables d'environnement env-variable de la mme manire que la directive SetEnvIf.

    -

    - SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered -

    +
    SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered
    +

    Dans cet exemple, la variable d'environnement iso_delivered est dfinie chaque fois que notre @@ -290,21 +299,20 @@ serveur HTTP Apache pour des exemples suppl l'adresse IP distante est une adresse prive au sens de la RFC 1918 :

    -

    - SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 -

    +
    SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918
    +

    Voir aussi

    top
    -

    SetEnvIfNoCase Directive

    +

    Directive SetEnvIfNoCase

    @@ -321,9 +329,8 @@ attributs de la requ d'un point de vue smantique la directive SetEnvIf, et ne s'en distingue que par le fait que la comparaison des expressions rationnelles est effectue sans tenir compte de la casse. Par exemple :

    -

    - SetEnvIfNoCase Host Example\.Org site=apache -

    +
    SetEnvIfNoCase Host Example\.Org site=example
    +

    Cette ligne va dfinir la variable d'environnement site avec la valeur "example" si le champ @@ -339,7 +346,28 @@ attributs de la requ  ja  |  ko  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_setenvif.html.ja.utf8 b/docs/manual/mod/mod_setenvif.html.ja.utf8 index fdd1b5c2028..cf0b4f7b014 100644 --- a/docs/manual/mod/mod_setenvif.html.ja.utf8 +++ b/docs/manual/mod/mod_setenvif.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_setenvif - Apache HTTP サーバ +mod_setenvif - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_setenvif

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    Description:Dfinit des variables d'environnement en fonction des attributs de la requte sans tenir compte de la casse
    @@ -61,10 +67,10 @@
  • SetEnvIfExpr
  • SetEnvIfNoCase
  • -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    BrowserMatch ディレクティブ

    @@ -302,12 +308,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_setenvif.html.ko.euc-kr b/docs/manual/mod/mod_setenvif.html.ko.euc-kr index 7644a29ee1f..7699bb48bbe 100644 --- a/docs/manual/mod/mod_setenvif.html.ko.euc-kr +++ b/docs/manual/mod/mod_setenvif.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_setenvif - Apache HTTP Server +mod_setenvif - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_setenvif

    +
  • Comments
  • top

    BrowserMatch þ

    @@ -265,7 +270,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_setenvif.html.tr.utf8 b/docs/manual/mod/mod_setenvif.html.tr.utf8 index a1401bb22cd..629055dff6d 100644 --- a/docs/manual/mod/mod_setenvif.html.tr.utf8 +++ b/docs/manual/mod/mod_setenvif.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_setenvif - Apache HTTP Sunucusu +mod_setenvif - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_setenvif

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:リクエストの特徴に基づいた環境変数の設定を可能にする
    ステータス:Base
    モジュール識別子:setenvif_module
    @@ -35,20 +39,31 @@

    Özet

    -

    mod_setenvif modülü ortam değişkenlerinin isteğin - farklı bileşenlerinin belirttiğiniz düzenli ifade ile eşleşmesine bağlı - olarak atanmasını mümkün kılar. Bu ortam değişkenleri sunucunun çeşitli - kısımlarında yapılacak eylemlere karar verirken kullanılır.

    +

    mod_setenvif modülü dahili ortam değişkenlerinin + isteğin farklı bileşenlerinin belirttiğiniz düzenli ifade ile eşleşmesine + bağlı olarak atanmasını mümkün kılar. Bu ortam değişkenleri sunucunun + çeşitli kısımlarında yapılacak eylemlerin yanında CGI betiklerinde ve SSI + sayfalarında kullanılabilir hale gelmelerine karar verilirken + kullanılır.

    Yönergeler yapılandırma dosyasında yer aldıkları sıraya göre ele alınırlar. Böylece daha karmaşık dizilimler kullanılabilir, bu örnekteki tarayıcı Mozilla ise netscape ortam değişkeni atanmakta, MSIE ise atanmamaktadır.

    -

    - BrowserMatch ^Mozilla netscape
    - BrowserMatch MSIE !netscape
    -

    +
    BrowserMatch ^Mozilla netscape
    +BrowserMatch MSIE !netscape
    + + +

    mod_autoindex ile dizin listesi oluşturulması + veya bir DirectoryIndex + için yol aranması gibi bir dahili alt + istek için sunucu yol araması yaparken isteklere özgü + ortam değişkenleri alt istekler tarafından miras alınMAZ. Buna ek + olarak, mod_setenvif modülünün devreye girdiği API + fazlarından dolayı yapılan alt isteklerde + SetEnvIf yönergeleri + ayrı ayrı değerlendirilMEZ.

    Yönergeler

    -

    Ayrıca bakınız:

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Apache HTTP Sunucusundaki Ortam Değişkenleri
  • +
  • Yorum
  • top

    BrowserMatch Yönergesi

    @@ -79,18 +94,16 @@ ve ortam değişkenlerine User-Agent HTTP istek başlığının değerine göre atama yapar. Aşağıdaki iki satır aynı etkiye sahiptir:

    -

    - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -

    +
    BrowserMatch Robot is_a_robot
    +SetEnvIf User-Agent Robot is_a_robot
    +

    Başka örnekler:

    -

    - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    - BrowserMatch MSIE !javascript
    -

    +
    BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    +BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    +BrowserMatch MSIE !javascript
    +
    top
    @@ -110,19 +123,17 @@ duyarsız eşleşmelerine bağlı olarak belirler. anlamsal olarak BrowserMatch yönergesinin eşdeğeridir. Ancak, eşleşmelerde harf büyüklüğüne duyarsızdır. Örnek:

    -

    - BrowserMatchNoCase mac platform=macintosh
    - BrowserMatchNoCase win platform=windows
    -

    +
    BrowserMatchNoCase mac platform=macintosh
    +BrowserMatchNoCase win platform=windows
    +

    BrowserMatch ve BrowserMatchNoCase yönergeleri SetEnvIf ve SetEnvIfNoCase yönergelerinin özel halleridir. Bu bakımda aşağıdaki iki satır aynı etkiye sahiptir:

    -

    - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -

    +
    BrowserMatchNoCase Robot is_a_robot
    +SetEnvIfNoCase User-Agent Robot is_a_robot
    +
    top
    @@ -183,15 +194,6 @@ duyarsız eşleşmelerine bağlı olarak belirler. Ortam değişkenlerinin dikkate alınabilmesi için istek öznitelikleri arasında hiçbir eşleşme olmaması ve öznitelik olarak bir düzenli ifade belirtilmemiş olması gerekir. - -
  • Nesne kimliği oid olan bir SSL istemci - sertifikası eklentisine bir başvuru. SSL olarak yapılmamış bir istekte - veya yapılandırılmış bir oid’in yokluğunda - hiçbir değişken ataması yapılmaz. Birden fazla - oid söz konusu ise aralarına virgül - (',') konarak ilgili dizgeler birleştirilir. - oid dizge değerli bir eklentiyi - betimlemelidir.
  • İkinci bileşen (düzifd) bir düzenli ifadedir. düzifd @@ -212,53 +214,77 @@ duyarsız eşleşmelerine bağlı olarak belirler.

    İlk biçemde değişkene "1" değeri atanır. İkincisinde atanmış bir değişken atanmamış yapılır. Üçüncüsünde ise değişkene belirtilen - değer bire bir atanır. 2.0.52 sürümünden itibaren - parantezli düzenli ifadelerin sonuçları ile değiştirilmek üzere - value içinde $1..$9 - gösterimleri tanınmaktadır.

    - -

    Örnek:

    - SetEnvIf Request_URI "\.gif$" nesne_bir_resim=gif
    - SetEnvIf Request_URI "\.jpg$" nesne_bir_resim=jpg
    - SetEnvIf Request_URI "\.xbm$" nesne_bir_resim=xbm
    - :
    - SetEnvIf Referer belgeler\.alanismi\.mesela\.dom dahili_site_istendi
    - :
    - SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    - :
    - SetEnvIf OID("2.16.840.1.113730.1.13") "(.*)" NetscapeComment=$1
    - :
    - SetEnvIf ^TS* ^[a-z].* TS_VAR
    -

    + değer bire bir atanır. 2.0.51 sürümünden itibaren + Apache httpd parantezli düzenli ifadelerin sonuçları ile değiştirilmek + üzere value içinde $1..$9 + gösterimleri tanınmaktadır. $0 bu kalıp ile eşleşen tüm dizgeye erişir.

    + +
    SetEnvIf Request_URI "\.gif$" nesne_bir_resim=gif
    +SetEnvIf Request_URI "\.jpg$" nesne_bir_resim=jpg
    +SetEnvIf Request_URI "\.xbm$" nesne_bir_resim=xbm
    +
    +SetEnvIf Referer belgeler\.alanismi\.example\.com dahili_site_istendi
    +
    +SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    +
    +SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1
    +
    +SetEnvIf ^TS  ^[a-z]  TS_VAR
    +

    İlk üçünde istek bir resim dosyası için yapılmışsa nesne_bir_resim ortam değişkeni atanmakta, dördüncüsünde - istenen sayfa belgeler.alanismi.mesela.dom adlı sitede + istenen sayfa belgeler.alanismi.example.com adlı sitede bulunuyorsa dahili_site_istendi ortam değişkeni atanmaktadır.

    -

    Altıncı örnekte NetscapeComment ortam değişkenine ilgili - SSL istemci sertifikası alanındaki (varsa) dizge atanmaktadır.

    -

    Son örnekte ise istekte "TS" ile başlayıp [a-z] arasındaki karakterlerle devam eden bir başlık alanı varsa TS_VAR ortam değişkeni atanmaktadır.

    Ayrıca bakınız:

    top
    Açıklama:Ortam değişkenlerinin isteğin özelliklerine uygun olarak atanmasını sağlar
    Durum:Temel
    Modül Betimleyici:setenvif_module
    - - + + + -
    Açıklama:Sets environment variables based on an ap_expr expression
    Sözdizimi:
    Açıklama:Bir ap_expr ifadesine dayanarak ortam değişkenlerine değer atar
    Sözdizimi:SetEnvIfExpr ifade + [!]ort-değişkeni[=değer] + [[!]ort-değişkeni[=değer]] ...
    Bağlam:sunucu geneli, sanal konak, dizin, .htaccess
    Geçersizleştirme:FileInfo
    Durum:Temel
    Modül:mod_setenvif

    Documentation not yet translated. Please see English version of document.

    + +

    SetEnvIfExpr yönergesi bir <If> ap_expr + ifadesine dayanarak ortam değişkenlerine değer atar. Bu ifadeler çalışma + anında değerlendirilirerek SetEnvIf yönergesindeki + gibi ort-değişkenine uygulanır.

    + +
    SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered
    + + +

    Burada uygulamamızın her X-Sendfile göndermeye çalışmasında + ortam değişkenine iso_delivered değeri atanmaktadır.

    + +

    Uzak IP adresi RFC 1918'e göre özel bir adres ise rfc1918 değişkenine 1 + atanması daha kullanışlı bir örnek olurdu:

    + +
    SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918
    + + +

    Ayrıca bakınız:

    +
    top

    SetEnvIfNoCase Yönergesi

    @@ -272,21 +298,19 @@ bağlı olmaksızın yapılmış tanımlara göre atar. Geçersizleştirme:FileInfo Durum:Temel Modül:mod_setenvif -Uyumluluk:Apache 1.3 ve sonrasında mevcuttur.

    SetEnvIfNoCase yönergesi sözdizimsel ve anlamsal olarak SetEnvIf yönergesinin eşdeğeridir. Ancak, eşleşmelerde harf büyüklüğüne duyarsızdır. Örnek:

    -

    - SetEnvIfNoCase Host Apache\.Org site=apache -

    +
    SetEnvIfNoCase Host Example\.Org site=example
    +

    Burada, Host: HTTP istek başlığında - Apache.Org, apache.org veya harf büyüklüğünce + Example.Org, example.org veya harf büyüklüğünce farklı benzerleri belirtilmişse site ortam değişkenine - "apache" değeri atanmaktadır.

    + "example" değeri atanmaktadır.

    @@ -296,7 +320,28 @@ bağlı olmaksızın yapılmış tanımlara göre atar.  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_setenvif.xml b/docs/manual/mod/mod_setenvif.xml index 9ff7ff404e8..41e68ae8b6b 100644 --- a/docs/manual/mod/mod_setenvif.xml +++ b/docs/manual/mod/mod_setenvif.xml @@ -44,10 +44,21 @@ on characteristics of the request such as this example, which sets netscape if the browser is mozilla but not MSIE.

    - - BrowserMatch ^Mozilla netscape
    - BrowserMatch MSIE !netscape
    -
    + +BrowserMatch ^Mozilla netscape +BrowserMatch MSIE !netscape + + +

    When the server looks up a path via an internal + subrequest such as looking + for a DirectoryIndex + or generating a directory listing with mod_autoindex, + per-request environment variables are not inherited in the + subrequest. Additionally, + SetEnvIf directives + are not separately evaluated in the subrequest due to the API phases + mod_setenvif takes action in.

    +
    Environment Variables in Apache HTTP Server @@ -69,17 +80,17 @@ on characteristics of the request sets environment variables conditional on the User-Agent HTTP request header. The following two lines have the same effect:

    - - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -
    + +BrowserMatch Robot is_a_robot +SetEnvIf User-Agent Robot is_a_robot +

    Some additional examples:

    - - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    - BrowserMatch MSIE !javascript
    -
    + +BrowserMatch ^Mozilla forms jpeg=yes browser=netscape +BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript +BrowserMatch MSIE !javascript + @@ -101,20 +112,20 @@ respect to case module="mod_setenvif">BrowserMatch directive. However, it provides for case-insensitive matching. For example:

    - - BrowserMatchNoCase mac platform=macintosh
    - BrowserMatchNoCase win platform=windows
    -
    + +BrowserMatchNoCase mac platform=macintosh +BrowserMatchNoCase win platform=windows +

    The BrowserMatch and BrowserMatchNoCase directives are special cases of the SetEnvIf and SetEnvIfNoCase directives. The following two lines have the same effect:

    - - BrowserMatchNoCase Robot is_a_robot
    - SetEnvIfNoCase User-Agent Robot is_a_robot
    -
    + +BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robot + @@ -209,20 +220,22 @@ of

    value. Since version 2.0.51, Apache httpd will recognize occurrences of $1..$9 within value and replace them by parenthesized subexpressions - of regex.

    - - -Example: - SetEnvIf Request_URI "\.gif$" object_is_image=gif
    - SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
    - SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
    - :
    - SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral
    - :
    - SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    - :
    - SetEnvIf ^TS ^[a-z] HAVE_TS
    -
    + of regex. $0 provides access to the whole + string matched by that pattern.

    + + +SetEnvIf Request_URI "\.gif$" object_is_image=gif +SetEnvIf Request_URI "\.jpg$" object_is_image=jpg +SetEnvIf Request_URI "\.xbm$" object_is_image=xbm + +SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral + +SetEnvIf object_is_image xbm XBIT_PROCESSING=1 + +SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1 + +SetEnvIf ^TS ^[a-z] HAVE_TS +

    The first three will set the environment variable object_is_image if the request was for an image @@ -256,14 +269,14 @@ for additional examples.

    The SetEnvIfExpr directive defines - environment variables based on an If + environment variables based on an If ap_expr. These expressions will be evaluated at runtime, and applied env-variable in the same fashion as SetEnvIf.

    - + SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered - +

    This would set the environment variable iso_delivered every time our application attempts to send it via X-Sendfile

    @@ -271,14 +284,14 @@ for additional examples.

    A more useful example would be to set the variable rfc1918 if the remote IP address is a private address according to RFC 1918:

    - + SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 - + Expressions in Apache HTTP Server, for a complete reference and more examples. -If can be used to achive similar +If can be used to achieve similar results. mod_filter @@ -301,9 +314,9 @@ without respect to case the SetEnvIf directive, and differs only in that the regular expression matching is performed in a case-insensitive manner. For example:

    - + SetEnvIfNoCase Host Example\.Org site=example - +

    This will cause the site environment variable to be set to "example" if the HTTP request header diff --git a/docs/manual/mod/mod_setenvif.xml.fr b/docs/manual/mod/mod_setenvif.xml.fr index 93d38b070ed..c41006f78a8 100644 --- a/docs/manual/mod/mod_setenvif.xml.fr +++ b/docs/manual/mod/mod_setenvif.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,32 +25,44 @@ mod_setenvif -Permet de définir des variables d'environnement en fonction -de caractéristiques de la requête +Permet de définir des variables d'environnement en fonction +de certainescaractéristiques de la requête Base mod_setenvif.c setenvif_module

    -

    Le module mod_setenvif vous permet de définir - des variables d'environnement internes en fonction du fait que telle ou telle - caractéristique de la requête correspond ou non aux expressions - rationnelles que vous spécifiez. Ces variables d'environnement - peuvent être utilisées par d'autres parties du serveur pour prendre - des décisions quant aux actions à entreprendre, et pour déterminer - si les scripts CGI et les pages SSI doivent pouvoir y accéder.

    - -

    Les directives sont interprétées selon l'ordre dans lequel elles - apparaîssent dans les fichiers de configuration. Ainsi, des - séquences plus complexes peuvent être utilisées, comme dans cet - exemple qui définit netscape si le navigateur est Mozilla et non +

    Le module mod_setenvif vous permet de définir + des variables d'environnement internes de manière conditionnelle en fonction + de critères que vous pouvez spécifier. Ces variables d'environnement + peuvent être utilisées par d'autres parties du serveur pour prendre + des décisions quant aux actions à entreprendre, et pour déterminer + si les scripts CGI et les pages SSI doivent pouvoir y accéder.

    + +

    Les directives sont interprétées selon l'ordre dans lequel elles + apparaîssent dans les fichiers de configuration. Ainsi, des + séquences plus complexes peuvent être utilisées, comme dans cet + exemple qui définit netscape si le navigateur est Mozilla et non MSIE.

    - - BrowserMatch ^Mozilla netscape
    - BrowserMatch MSIE !netscape
    -
    + +BrowserMatch ^Mozilla netscape +BrowserMatch MSIE !netscape + + +

    Lorsque le serveur cherche un chemin via une sous-requête interne (par exemple la + recherche d'un DirectoryIndex), ou lorsqu'il génère un + listing du contenu d'un répertoire via le module + mod_autoindex, la sous-requête n'hérite pas des + variables d'environnement spécifiques à la requête. En outre, à cause + des phases de l'API auxquelles mod_setenvif prend + part, les directives SetEnvIf ne sont pas évaluées + séparément dans la sous-requête.

    +
    Les variables d'environnement et le @@ -58,8 +70,8 @@ serveur HTTP Apache BrowserMatch -Définit des variables d'environnement en fonction du -contenu de l'en-tête HTTP User-Agent +Définit des variables d'environnement en fonction du +contenu de l'en-tête HTTP User-Agent BrowserMatch regex [!]env-variable[=valeur] [[!]env-variable[=valeur]] ... server config @@ -70,28 +82,28 @@ contenu de l'en-tête HTTP User-Agent

    La directive BrowserMatch est un cas particulier de la directive SetEnvIf, qui définit des variables - d'environnement en fonction du contenu de l'en-tête de requête HTTP - User-Agent. Les deux lignes suivantes produisent le même + module="mod_setenvif">SetEnvIf, qui définit des variables + d'environnement en fonction du contenu de l'en-tête de requête HTTP + User-Agent. Les deux lignes suivantes produisent le même effet :

    - - BrowserMatchNoCase Robot est_un_robot
    - SetEnvIfNoCase User-Agent Robot est_un_robot
    -
    - -

    Quelques exemples supplémentaires :

    - - BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
    - BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
    - BrowserMatch MSIE !javascript
    -
    + +BrowserMatch Robot is_a_robot +SetEnvIf User-Agent Robot is_a_robot + + +

    Quelques exemples supplémentaires :

    + +BrowserMatch ^Mozilla forms jpeg=yes browser=netscape +BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript +BrowserMatch MSIE !javascript +
    BrowserMatchNoCase -Définit des variables d'environnement en fonction du -contenu de l'en-tête HTTP User-Agent sans tenir compte de la +Définit des variables d'environnement en fonction du +contenu de l'en-tête HTTP User-Agent sans tenir compte de la casse BrowserMatchNoCase regex [!]env-variable[=valeur] [[!]env-variable[=valeur]] ... @@ -103,30 +115,30 @@ casse

    La directive BrowserMatchNoCase est - identique sur le plan sémantique à la directive BrowserMatch. Elle permet - cependant une comparaison insensible à la casse. Par exemple :

    - - BrowserMatchNoCase mac platform=macintosh
    - BrowserMatchNoCase win platform=windows
    -
    + cependant une comparaison insensible à la casse. Par exemple :

    + +BrowserMatchNoCase mac platform=macintosh +BrowserMatchNoCase win platform=windows +

    Les directives BrowserMatch et BrowserMatchNoCase sont des cas particuliers des directives SetEnvIf et SetEnvIfNoCase. - Ainsi, les deux lignes suivantes produisent le même effet :

    - - BrowserMatchNoCase Robot est_un_robot
    - SetEnvIfNoCase User-Agent Robot est_un_robot
    -
    + Ainsi, les deux lignes suivantes produisent le même effet :

    + +BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robot +
    SetEnvIf -Définit des variables d'environnement en fonction des -attributs de la requête +Définit des variables d'environnement en fonction des +attributs de la requête SetEnvIf attribut regex [!]env-variable[=valeur] [[!]env-variable[=valeur]] ... @@ -136,127 +148,129 @@ attributs de la requête FileInfo -

    La directive SetEnvIf permet de définir +

    La directive SetEnvIf permet de définir des variables d'environnement en fonction des attributs de la - requête. L'attribut spécifié comme premier argument peut - se présenter sous l'une des quatre formes suivantes :

    + requête. L'attribut spécifié comme premier argument peut + se présenter sous l'une des trois formes suivantes :

      -
    1. Un champ d'en-tête de requête HTTP (voir la Un champ d'en-tête de requête HTTP (voir la RFC2616 pour - plus d'information à leur propos) ; par exemple : Host, + plus d'information à leur propos) ; par exemple : Host, User-Agent, Referer, ou Accept-Language. Il est possible d'utiliser une - expression rationnelle pour spécifier un jeu d'en-têtes de - requête.
    2. + expression rationnelle pour spécifier un jeu d'en-têtes de + requête. -
    3. Une des caractéristiques de la requête suivantes : +
    4. Une des caractéristiques de la requête suivantes :
        -
      • Remote_Host - le nom d'hôte (s'il est disponible) - du client qui effectue la requête
      • +
      • Remote_Host - le nom d'hôte (s'il est disponible) + du client qui effectue la requête
      • Remote_Addr - l'adresse IP du client qui effectue - la requête
      • + la requête -
      • Server_Addr - l'adresse IP du serveur qui a reçu - la requête (uniquement à partir des versions supérieures à +
      • Server_Addr - l'adresse IP du serveur qui a reçu + la requête (uniquement à partir des versions supérieures à 2.0.43)
      • -
      • Request_Method - Le nom de la méthode HTTP - utilisée (GET, POST, et +
      • Request_Method - Le nom de la méthode HTTP + utilisée (GET, POST, et cetera...)
      • Request_Protocol - le nom et la version du - protocole utilisé pour la requête (par exemple "HTTP/0.9", + protocole utilisé pour la requête (par exemple "HTTP/0.9", "HTTP/1.1", etc...)
      • -
      • Request_URI - la ressource demandée dans la ligne - de requête HTTP -- en général la partie de l'URL suivant le - protocole et le nom du serveur, sans la chaîne d'arguments. Voir +
      • Request_URI - la ressource demandée dans la ligne + de requête HTTP -- en général la partie de l'URL suivant le + protocole et le nom du serveur, sans la chaîne d'arguments. Voir la directive RewriteCond du module mod_rewrite pour plus d'informations sur la - manière de mettre en correspondance votre chaîne d'arguments.
      • + manière de mettre en correspondance votre chaîne d'arguments.
    5. Le nom d'une variable d'environnement parmi la liste de celles qui -sont associées à la requête. Ceci permet à la directive +sont associées à la requête. Ceci permet à la directive SetEnvIf d'effectuer des tests en fonction du -résultat de comparaisons précédentes. Seules les variables -d'environnement définies par des directives -SetEnvIf[NoCase] précédentes sont disponibles pour -effectuer des tests de cette manière. 'Précédentes' signifie qu'elles se -trouvent à un niveau plus global de la configuration (par exemple au +résultat de comparaisons précédentes. Seules les variables +d'environnement définies par des directives +SetEnvIf[NoCase] précédentes sont disponibles pour +effectuer des tests de cette manière. 'Précédentes' signifie qu'elles se +trouvent à un niveau plus global de la configuration (par exemple au niveau du serveur principal), ou plus haut chronologiquement dans le contexte de la directive. Les variables d'environnement ne seront prises -en compte que si aucune correspondance n'a été trouvée parmi les -caractéristiques de la requête, et si attribut n'a pas été -spécifié sous la forme d'une expression rationnelle.
    6. +en compte que si aucune correspondance n'a été trouvée parmi les +caractéristiques de la requête, et si attribut n'a pas été +spécifié sous la forme d'une expression rationnelle.

    Le second argument (regex) est une expression rationnelle. Si regex -correspond à l'attribut, les arguments suivants sont évalués.

    +correspond à l'attribut, les arguments suivants sont évalués.

    -

    Le reste des arguments constitue les noms des variables à définir, -ainsi que les valeurs optionnelles qui doivent leur être affectées. Ils -peuvent se présenter sous les formes suivantes :

    +

    Le reste des arguments constitue les noms des variables à définir, +ainsi que les valeurs optionnelles qui doivent leur être affectées. Ils +peuvent se présenter sous les formes suivantes :

      -
    1. nom-variable, or
    2. +
    3. nom-variable, ou
    4. -
    5. !nom-variable, or
    6. +
    7. !nom-variable, ou
    8. nom-variable=valeur
    -

    Dans la première forme, la valeur sera définie à "1". Dans la - seconde forme, la variable sera supprimée si elle a été définie au - préalable, et dans la troisième forme, la variable sera définie à la - valeur littérale spécifiée par valeur. Depuis - la version 2.0.51, Apache httpd reconnaît les occurrences de variables - $1..$9 à l'intérieur de +

    Dans la première forme, la valeur sera définie à "1". Dans la + seconde forme, la variable sera supprimée si elle a été définie au + préalable, et dans la troisième forme, la variable sera définie à la + valeur littérale spécifiée par valeur. Depuis + la version 2.0.51, Apache httpd reconnaît les occurrences de variables + $1..$9 à l'intérieur de valeur, et les remplace par les - sous-expressions entre parenthèses correspondantes de - regex.

    - - -Example: - SetEnvIf Request_URI "\.gif$" objet_est_une_image=gif
    - SetEnvIf Request_URI "\.jpg$" objet_est_une_image=jpg
    - SetEnvIf Request_URI "\.xbm$" objet_est_une_image=xbm
    - :
    - SetEnvIf Referer www\.mon-domaine\.example\.com référant_intra_site
    - :
    - SetEnvIf objet_est_une_image xbm XBIT_PROCESSING=1
    - :
    - SetEnvIf ^TS ^[a-z] HAVE_TS
    -
    - -

    Les trois premières lignes définissent la variable + sous-expressions entre parenthèses correspondantes de + regex. $0 permet d'accéder à l'ensemble de la chaîne + qui correspond à ce modèle.

    + + +SetEnvIf Request_URI "\.gif$" object_is_image=gif +SetEnvIf Request_URI "\.jpg$" object_is_image=jpg +SetEnvIf Request_URI "\.xbm$" object_is_image=xbm + +SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral + +SetEnvIf object_is_image xbm XBIT_PROCESSING=1 + +SetEnvIf Request_URI "\.(.*)$" EXTENSION=$1 + +SetEnvIf ^TS ^[a-z] HAVE_TS + + +

    Les trois premières lignes définissent la variable d'environnement objet_est_une_image si l'objet de la - requête est un fichier image, et la quatrième définit la variable - référant_intra_site si la page référante se trouve + requête est un fichier image, et la quatrième définit la variable + intra_site_referral si la page référante se trouve quelque part dans le site web - www.mon-domaine.example.com.

    + www.mydomain.example.com.

    -

    La dernière ligne définit la variable d'environnement - HAVE_TS si la requête contient un en-tête dont le nom - commence par "TS" et dont la valeur commence par tout caractère du +

    La dernière ligne définit la variable d'environnement + HAVE_TS si la requête contient un en-tête dont le nom + commence par "TS" et dont la valeur commence par tout caractère du jeu [a-z].

    Les variables d'environnement et le -serveur HTTP Apache pour des exemples supplémentaires. +serveur HTTP Apache pour des exemples supplémentaires.
    SetEnvIfExpr -Définit des variables d'environnement en fonction d'une expression ap_expr +Définit des variables d'environnement en fonction d'une expression ap_expr SetEnvIfExpr expr [!]env-variable[=valeur] [[!]env-variable[=valeur]] ... @@ -267,40 +281,41 @@ serveur HTTP Apache pour des exemples supplémentaires.

    La directive SetEnvIfExpr permet de - définir des variables d'environnement en fonction d'une expression - If ap_expr. Cette - expression est évaluée à l'exécution, et utilise les variables - d'environnement env-variable de la même manière que la + définir des variables d'environnement en fonction d'une expression + If ap_expr. Cette + expression est évaluée à l'exécution, et utilise les variables + d'environnement env-variable de la même manière que la directive SetEnvIf.

    - + SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered - +

    Dans cet exemple, la variable d'environnement - iso_delivered est définie chaque fois que notre + iso_delivered est définie chaque fois que notre application tente de l'envoyer via X-Sendfile.

    -

    Il pourrait être plus utile de définir une variable rfc1918 si - l'adresse IP distante est une adresse privée au sens de la RFC 1918 +

    Il pourrait être plus utile de définir une variable rfc1918 si + l'adresse IP distante est une adresse privée au sens de la RFC 1918 :

    - + SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 - +
    Les expressions dans le serveur HTTP -Apache, pour une référence complète et davantage d'exemples. -La directive If peut être -utilisée pour obtenir des résultats similaires. +Apache, pour une référence complète et davantage d'exemples.
    +La directive If permet d'obtenir des résultats +similaires. mod_filter SetEnvIfNoCase -Définit des variables d'environnement en fonction des -attributs de la requête sans tenir compte de la casse +Définit des variables d'environnement en fonction des +attributs de la requête sans tenir compte de la casse SetEnvIfNoCase attribut regex [!]env-variable[=valeur] [[!]env-variable[=valeur]] ... @@ -312,19 +327,19 @@ attributs de la requête sans tenir compte de la casse

    La directive SetEnvIfNoCase est identique - d'un point de vue sémantique à la directive SetEnvIf, et ne s'en distingue que par le fait que la comparaison des expressions rationnelles est - effectuée sans tenir compte de la casse. Par exemple :

    - - SetEnvIfNoCase Host Example\.Org site=apache - + effectuée sans tenir compte de la casse. Par exemple :

    + + SetEnvIfNoCase Host Example\.Org site=example + -

    Cette ligne va définir la variable d'environnement +

    Cette ligne va définir la variable d'environnement site avec la valeur "example" si le champ - d'en-tête de requête HTTP Host: est présent et contient + d'en-tête de requête HTTP Host: est présent et contient Example.Org, example.org, ou une autre - combinaison des mêmes caractères, sans tenir compte de la casse.

    + combinaison des mêmes caractères, sans tenir compte de la casse.

    diff --git a/docs/manual/mod/mod_setenvif.xml.ja b/docs/manual/mod/mod_setenvif.xml.ja index 0ccc9a7520b..74d15ceef36 100644 --- a/docs/manual/mod/mod_setenvif.xml.ja +++ b/docs/manual/mod/mod_setenvif.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_slotmem_plain - Apache HTTP Server +mod_slotmem_plain - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_slotmem_plain

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    - +
    Description:Slot-based shared memory provider.
    Status:Extension
    ModuleIdentifier:mod_slotmem_plain
    ModuleIdentifier:slotmem_plain_module
    SourceFile:mod_slotmem_plain.c

    Summary

    @@ -67,10 +73,13 @@
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    return the total data size, in bytes, of a slot in the segment
    -
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);
    -
    grab or allocate a slot and mark as in-use (does not do any data copying)
    +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    grab or allocate the first free slot and mark as in-use (does not do any data copying)
    -
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    forced grab or allocate the specified slot and mark as in-use (does not do any data copying)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    release or free a slot and mark as not in-use (does not do any data copying)
    @@ -78,12 +87,36 @@

    Directives

    This module provides no directives.

    -
    +

    Bugfix checklist

    See also

    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_slotmem_plain.html.fr b/docs/manual/mod/mod_slotmem_plain.html.fr new file mode 100644 index 00000000000..48416899a18 --- /dev/null +++ b/docs/manual/mod/mod_slotmem_plain.html.fr @@ -0,0 +1,128 @@ + + + + + +mod_slotmem_plain - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_slotmem_plain

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de mmoire partage base de +slots.
    Statut:Extension
    IdentificateurdeModule:slotmem_plain_module
    FichierSource:mod_slotmem_plain.c
    +

    Sommaire

    + +

    mod_slotmem_plain est un fournisseur de mmoire qui + permet la cration et l'utilisation d'un segment de mmoire contigu + dans lequel les ensembles de donnes sont organiss en "slots". +

    + +

    Si la mmoire doit tre partage entre des threads et des + processus, il est prfrable d'utiliser le fournisseur + mod_slotmem_shm. +

    + +

    mod_slotmem_plain fournit une API comprenant les + fonctions suivantes : +

    + +
    +
    apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
    +
    appelle le callback sur tous les slots actifs
    + +
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    +
    cre un nouveau slot de mmoire dont chaque objet aura une + taille de item_size.
    + +
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    +
    rattache un slot de mmoire existant.
    + +
    apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)
    +
    indique la mmoire associe ce slot actif.
    + +
    apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)
    +
    lit la mmoire depuis ce slot et la transfre vers dest
    + +
    apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)
    +
    crit dans ce slot la mmoire en provenance de src
    + +
    unsigned int num_slots(ap_slotmem_instance_t *s)
    +
    renvoie le nombre total de slots contenus dans ce segment
    + +
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    +
    renvoie la taille totale des donnes, en octets, contenues + dans un slot de ce segment
    + +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    alloue le premier slot disponible et le marque comme utilis (n'effectue aucune + copie de donnes)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    force l'allocation ou l'appropriation du slot spcifi et le marque comme utilis (n'effectue aucune + copie de donnes)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    libre un slot et le marque comme non utilis (n'effectue aucune + copie de donnes)
    +
    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_slotmem_plain.xml b/docs/manual/mod/mod_slotmem_plain.xml index 1c70f3ce874..6cd8fe58427 100644 --- a/docs/manual/mod/mod_slotmem_plain.xml +++ b/docs/manual/mod/mod_slotmem_plain.xml @@ -26,7 +26,7 @@ Slot-based shared memory provider. Extension mod_slotmem_plain.c -mod_slotmem_plain +slotmem_plain_module

    mod_slotmem_plain is a memory provider which @@ -67,10 +67,13 @@

    apr_size_t slot_size(ap_slotmem_instance_t *s)
    return the total data size, in bytes, of a slot in the segment
    -
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);
    -
    grab or allocate a slot and mark as in-use (does not do any data copying)
    +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    grab or allocate the first free slot and mark as in-use (does not do any data copying)
    -
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    forced grab or allocate the specified slot and mark as in-use (does not do any data copying)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    release or free a slot and mark as not in-use (does not do any data copying)
    diff --git a/docs/manual/mod/mod_slotmem_plain.xml.fr b/docs/manual/mod/mod_slotmem_plain.xml.fr new file mode 100644 index 00000000000..c77ed404f54 --- /dev/null +++ b/docs/manual/mod/mod_slotmem_plain.xml.fr @@ -0,0 +1,91 @@ + + + + + + + + + + + +mod_slotmem_plain +Fournisseur de mémoire partagée à base de +slots. +Extension +mod_slotmem_plain.c +slotmem_plain_module + + +

    mod_slotmem_plain est un fournisseur de mémoire qui + permet la création et l'utilisation d'un segment de mémoire contigu + dans lequel les ensembles de données sont organisés en "slots". +

    + +

    Si la mémoire doit être partagée entre des threads et des + processus, il est préférable d'utiliser le fournisseur + mod_slotmem_shm. +

    + +

    mod_slotmem_plain fournit une API comprenant les + fonctions suivantes : +

    + +
    +
    apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
    +
    appelle le callback sur tous les slots actifs
    + +
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    +
    crée un nouveau slot de mémoire dont chaque objet aura une + taille de item_size.
    + +
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    +
    rattache à un slot de mémoire existant.
    + +
    apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)
    +
    indique la mémoire associée à ce slot actif.
    + +
    apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)
    +
    lit la mémoire depuis ce slot et la transfère vers dest
    + +
    apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)
    +
    écrit dans ce slot la mémoire en provenance de src
    + +
    unsigned int num_slots(ap_slotmem_instance_t *s)
    +
    renvoie le nombre total de slots contenus dans ce segment
    + +
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    +
    renvoie la taille totale des données, en octets, contenues + dans un slot de ce segment
    + +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    alloue le premier slot disponible et le marque comme utilisé (n'effectue aucune + copie de données)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    force l'allocation ou l'appropriation du slot spécifié et le marque comme utilisé (n'effectue aucune + copie de données)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    libère un slot et le marque comme non utilisé (n'effectue aucune + copie de données)
    +
    + +
    + +
    diff --git a/docs/manual/mod/mod_slotmem_plain.xml.meta b/docs/manual/mod/mod_slotmem_plain.xml.meta index f361b7930d0..f15ceb55649 100644 --- a/docs/manual/mod/mod_slotmem_plain.xml.meta +++ b/docs/manual/mod/mod_slotmem_plain.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_slotmem_shm.html b/docs/manual/mod/mod_slotmem_shm.html index b4c9ca4bb19..12d155bcae0 100644 --- a/docs/manual/mod/mod_slotmem_shm.html +++ b/docs/manual/mod/mod_slotmem_shm.html @@ -3,3 +3,7 @@ URI: mod_slotmem_shm.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_slotmem_shm.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_slotmem_shm.html.en b/docs/manual/mod/mod_slotmem_shm.html.en index 668ffabe475..e15305d6394 100644 --- a/docs/manual/mod/mod_slotmem_shm.html.en +++ b/docs/manual/mod/mod_slotmem_shm.html.en @@ -1,31 +1,37 @@ - -mod_slotmem_shm - Apache HTTP Server +mod_slotmem_shm - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_slotmem_shm

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    - +
    Description:Slot-based shared memory provider.
    Status:Extension
    ModuleIdentifier:mod_slotmem_shm_module
    ModuleIdentifier:slotmem_shm_module
    SourceFile:mod_slotmem_shm.c

    Summary

    @@ -38,7 +44,9 @@ restart, whether graceful or not. The data itself is stored and restored within a file noted by the name parameter in the create and attach - calls. + calls. If not specified with an absolute path, the file will be + created relative to the path specified by the + DefaultRuntimeDir directive.

    mod_slotmem_shm provides the following API functions: @@ -49,17 +57,15 @@

    call the callback on all worker slots
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    -
    create a new slotmem with each item size is item_size. name is the filename for the persistent store of - the shared memory. Values are: +
    create a new slotmem with each item size is item_size. name is used to generate a filename for the persistent store of + the shared memory if configured. Values are:
    "none"
    -
    Does not persist shared memory in file.
    -
    "anonymous"
    -
    $server_root/logs/anonymous.slotmem
    -
    ":file-name"
    -
    $server_root/logs/file-name.slotmem
    -
    "absolute-file-name"
    -
    $absolute-file-name.slotmem
    +
    Anonymous shared memory and no persistent store
    +
    "file-name"
    +
    [DefaultRuntimeDir]/file-name
    +
    "/absolute-file-name"
    +
    Absolute file name
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    @@ -80,8 +86,11 @@
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    return the total data size, in bytes, of a slot in the segment
    -
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);
    -
    grab or allocate a slot and mark as in-use (does not do any data copying)
    +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    grab or allocate the first free slot and mark as in-use (does not do any data copying)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    forced grab or allocate the specified slot and mark as in-use (does not do any data copying)
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    release or free a slot and mark as not in-use (does not do any data copying)
    @@ -91,12 +100,36 @@

    Directives

    This module provides no directives.

    -
    +

    Bugfix checklist

    See also

    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_slotmem_shm.html.fr b/docs/manual/mod/mod_slotmem_shm.html.fr new file mode 100644 index 00000000000..0741c48c1c0 --- /dev/null +++ b/docs/manual/mod/mod_slotmem_shm.html.fr @@ -0,0 +1,146 @@ + + + + + +mod_slotmem_shm - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_slotmem_shm

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de mmoire partage base sur les +slots.
    Statut:Extension
    IdentificateurdeModule:slotmem_shm_module
    FichierSource:mod_slotmem_shm.c
    +

    Sommaire

    + +

    mod_slotmem_shm est un fournisseur de mmoire qui + permet la cration et l'accs un segment de mmoire partage dans + lequel les ensembles de donnes sont organiss en "slots". +

    + +

    L'ensemble de la mmoire partage est effac chaque + redmarrage, que ce dernier soit graceful ou non. Les donnes sont + stockes et restitues dans et partir d'un fichier dfini par le + paramtre name des appels create et + attach. Si son chemin absolu n'est pas spcifi, le + chemin du fichier sera relatif au chemin dfini par la directive + DefaultRuntimeDir. +

    + +

    mod_slotmem_shm fournit les fonctions d'API suivantes + : +

    + +
    +
    apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
    +
    appelle le callback pour tous les slots actifs
    + +
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    +
    cre un nouveau slot de mmoire dont chaque taille d'objet est + item_size. name est utilis pour gnrer le nom du fichier + permettant de stocker/restaurer le contenu de la mmoire partage + si la configuration le spcifie. Les valeurs possibles sont : +
    +
    "none"
    +
    Mmoire partage anonyme et pas de stockage + persistant
    +
    "file-name"
    +
    [DefaultRuntimeDir]/file-name
    +
    Absolute file name
    +
    $absolute-file-name
    +
    +
    + +
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    +
    attache un slot de mmoire existant. Voir + create pour la description du paramtre + name.
    + +
    apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)
    +
    obtient la mmoire associe ce slot actif.
    + +
    apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)
    +
    lit la mmoire depuis ce slot et la transfre vers dest
    + +
    apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)
    +
    crit dans ce slot la mmoire en provenance de src
    + +
    unsigned int num_slots(ap_slotmem_instance_t *s)
    +
    renvoie le nombre total de slots contenus dans ce segment
    + +
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    +
    renvoie la taille totale des donnes, en octets, contenues + dans un slot de ce segment
    + +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    alloue ou s'approprie le premier slot disponible et le marque comme utilis (n'effectue aucune + copie de donnes)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    force l'allocation ou l'attribution du slot spcifi et le marque comme utilis (n'effectue aucune + copie de donnes)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    libre un slot et le marque comme non utilis (n'effectue aucune + copie de donnes)
    +
    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_slotmem_shm.xml b/docs/manual/mod/mod_slotmem_shm.xml index 0e475794d2c..4c45aa2c655 100644 --- a/docs/manual/mod/mod_slotmem_shm.xml +++ b/docs/manual/mod/mod_slotmem_shm.xml @@ -26,7 +26,7 @@ Slot-based shared memory provider. Extension mod_slotmem_shm.c -mod_slotmem_shm_module +slotmem_shm_module

    mod_slotmem_shm is a memory provider which @@ -38,7 +38,9 @@ restart, whether graceful or not. The data itself is stored and restored within a file noted by the name parameter in the create and attach - calls. + calls. If not specified with an absolute path, the file will be + created relative to the path specified by the + DefaultRuntimeDir directive.

    mod_slotmem_shm provides the following API functions: @@ -49,17 +51,15 @@

    call the callback on all worker slots
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    -
    create a new slotmem with each item size is item_size. name is the filename for the persistent store of - the shared memory. Values are: +
    create a new slotmem with each item size is item_size. name is used to generate a filename for the persistent store of + the shared memory if configured. Values are:
    "none"
    -
    Does not persist shared memory in file.
    -
    "anonymous"
    -
    $server_root/logs/anonymous.slotmem
    -
    ":file-name"
    -
    $server_root/logs/file-name.slotmem
    -
    "absolute-file-name"
    -
    $absolute-file-name.slotmem
    +
    Anonymous shared memory and no persistent store
    +
    "file-name"
    +
    [DefaultRuntimeDir]/file-name
    +
    "/absolute-file-name"
    +
    Absolute file name
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    @@ -80,8 +80,11 @@
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    return the total data size, in bytes, of a slot in the segment
    -
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int item_id);
    -
    grab or allocate a slot and mark as in-use (does not do any data copying)
    +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    grab or allocate the first free slot and mark as in-use (does not do any data copying)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    forced grab or allocate the specified slot and mark as in-use (does not do any data copying)
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    release or free a slot and mark as not in-use (does not do any data copying)
    diff --git a/docs/manual/mod/mod_slotmem_shm.xml.fr b/docs/manual/mod/mod_slotmem_shm.xml.fr new file mode 100644 index 00000000000..5e12dce1b27 --- /dev/null +++ b/docs/manual/mod/mod_slotmem_shm.xml.fr @@ -0,0 +1,109 @@ + + + + + + + + + + + +mod_slotmem_shm +Fournisseur de mémoire partagée basée sur les +slots. +Extension +mod_slotmem_shm.c +slotmem_shm_module + + +

    mod_slotmem_shm est un fournisseur de mémoire qui + permet la création et l'accès à un segment de mémoire partagée dans + lequel les ensembles de données sont organisés en "slots". +

    + +

    L'ensemble de la mémoire partagée est effacé à chaque + redémarrage, que ce dernier soit graceful ou non. Les données sont + stockées et restituées dans et à partir d'un fichier défini par le + paramètre name des appels create et + attach. Si son chemin absolu n'est pas spécifié, le + chemin du fichier sera relatif au chemin défini par la directive + DefaultRuntimeDir. +

    + +

    mod_slotmem_shm fournit les fonctions d'API suivantes + : +

    + +
    +
    apr_status_t doall(ap_slotmem_instance_t *s, ap_slotmem_callback_fn_t *func, void *data, apr_pool_t *pool)
    +
    appelle le callback pour tous les slots actifs
    + +
    apr_status_t create(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool)
    +
    crée un nouveau slot de mémoire dont chaque taille d'objet est + item_size. name est utilisé pour générer le nom du fichier + permettant de stocker/restaurer le contenu de la mémoire partagée + si la configuration le spécifie. Les valeurs possibles sont : +
    +
    "none"
    +
    Mémoire partagée anonyme et pas de stockage + persistant
    +
    "file-name"
    +
    [DefaultRuntimeDir]/file-name
    +
    Absolute file name
    +
    $absolute-file-name
    +
    +
    + +
    apr_status_t attach(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool)
    +
    attache à un slot de mémoire existant. Voir + create pour la description du paramètre + name.
    + +
    apr_status_t dptr(ap_slotmem_instance_t *s, unsigned int item_id, void**mem)
    +
    obtient la mémoire associée à ce slot actif.
    + +
    apr_status_t get(ap_slotmem_instance_t *s, unsigned int item_id, unsigned char *dest, apr_size_t dest_len)
    +
    lit la mémoire depuis ce slot et la transfère vers dest
    + +
    apr_status_t put(ap_slotmem_instance_t *slot, unsigned int item_id, unsigned char *src, apr_size_t src_len)
    +
    écrit dans ce slot la mémoire en provenance de src
    + +
    unsigned int num_slots(ap_slotmem_instance_t *s)
    +
    renvoie le nombre total de slots contenus dans ce segment
    + +
    apr_size_t slot_size(ap_slotmem_instance_t *s)
    +
    renvoie la taille totale des données, en octets, contenues + dans un slot de ce segment
    + +
    apr_status_t grab(ap_slotmem_instance_t *s, unsigned int *item_id);
    +
    alloue ou s'approprie le premier slot disponible et le marque comme utilisé (n'effectue aucune + copie de données)
    + +
    apr_status_t fgrab(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    force l'allocation ou l'attribution du slot spécifié et le marque comme utilisé (n'effectue aucune + copie de données)
    + +
    apr_status_t release(ap_slotmem_instance_t *s, unsigned int item_id);
    +
    libère un slot et le marque comme non utilisé (n'effectue aucune + copie de données)
    +
    + +
    + +
    diff --git a/docs/manual/mod/mod_slotmem_shm.xml.meta b/docs/manual/mod/mod_slotmem_shm.xml.meta index 7cfbb9afcfd..ec491332e7b 100644 --- a/docs/manual/mod/mod_slotmem_shm.xml.meta +++ b/docs/manual/mod/mod_slotmem_shm.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_so.html.en b/docs/manual/mod/mod_so.html.en index 406968b5b34..1b9360c484f 100644 --- a/docs/manual/mod/mod_so.html.en +++ b/docs/manual/mod/mod_so.html.en @@ -1,23 +1,28 @@ - -mod_so - Apache HTTP Server +mod_so - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_so

    @@ -43,7 +48,7 @@ Windows

    On Unix, the loaded code typically comes from shared object files (usually with .so extension), on Windows - this may either the .so or .dll + this may either be the .so or .dll extension.

    Warning

    @@ -54,15 +59,17 @@ Windows version.

    -
    top

    Creating Loadable Modules for Windows

    @@ -95,7 +102,7 @@ Windows

    The second way is to compile the module as a DLL, a shared library that can be loaded into the server at runtime, using - the LoadModule + the LoadModule directive. These module DLLs can be distributed and run on any Apache httpd for Windows installation, without recompilation of the server.

    @@ -143,12 +150,12 @@ Windows - +
    Description:Link in the named object file or library
    Syntax:LoadFile filename [filename] ...
    Context:server config
    Context:server config, virtual host
    Status:Extension
    Module:mod_so
    -

    The LoadFile directive links in the named object files or +

    The LoadFile directive links in the named object files or libraries when the server is started or restarted; this is used to load additional code which may be required for some module to work. Filename is either an absolute path or @@ -156,7 +163,8 @@ Windows

    For example:

    -

    LoadFile libexec/libxmlparse.so

    +
    LoadFile "libexec/libxmlparse.so"
    +
    @@ -166,20 +174,21 @@ Windows Description:Links in the object file or library, and adds to the list of active modules Syntax:LoadModule module filename -Context:server config +Context:server config, virtual host Status:Extension Module:mod_so -

    The LoadModule directive links in the object file or library +

    The LoadModule directive links in the object file or library filename and adds the module structure named module to the list of active modules. Module is the name of the external variable of type module in the file, and is listed as the Module Identifier - in the module documentation. Example:

    + in the module documentation.

    + +

    For example:

    + +
    LoadModule status_module "modules/mod_status.so"
    -

    - LoadModule status_module modules/mod_status.so -

    loads the named module from the modules subdirectory of the ServerRoot.

    @@ -192,7 +201,28 @@ of active modules  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_so.html.fr b/docs/manual/mod/mod_so.html.fr index 2bf344dfd0f..c23b388736a 100644 --- a/docs/manual/mod/mod_so.html.fr +++ b/docs/manual/mod/mod_so.html.fr @@ -1,23 +1,28 @@ - -mod_so - Serveur Apache HTTP +mod_so - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_so

    @@ -57,16 +62,18 @@ inclus) nouvelle version.

    -
    top

    Cration de modules chargeables pour @@ -104,7 +111,7 @@ Windows

    La seconde mthode consiste compiler le module en tant que DLL, savoir une bibliothque partage qui pourra tre charge dans le serveur en cours d'excution via la directive - LoadModule. Ces modules DLL + LoadModule. Ces modules DLL peuvent tre distribus et excuts sur toute installation d'Apache httpd pour Windows, sans avoir recompiler le serveur.

    @@ -151,50 +158,53 @@ Windows
    top
    -

    LoadFile Directive

    +

    Directive LoadFile

    - +
    Description:Liaison du fichier objet ou de la bibliothque spcifi
    Syntaxe:LoadFile nom-fichier [nom-fichier] ...
    Contexte:configuration du serveur
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_so
    -

    La directive LoadFile permet de lier le fichier objet ou la - bibliothque spcifi au serveur lors du dmarrage ou du redmarrage +

    La directive LoadFile permet de lier le fichier + objet ou la bibliothque spcifi au serveur lors du + dmarrage ou du redmarrage de ce dernier ; ceci permet d'ajouter tout code additionnel ncessaire au fonctionnement d'un module. nom-fichier est soit un chemin absolu, soit un chemin relatif au rpertoire dfini par la directive ServerRoot.

    -

    Par exemple:

    +

    Par exemple :

    + +
    LoadFile "libexec/libxmlparse.so"
    -

    LoadFile libexec/libxmlparse.so

    top
    -

    LoadModule Directive

    +

    Directive LoadModule

    - +
    Description:Liaison avec le serveur du fichier objet ou de la bibliothque spcifi, et ajout de ce dernier la liste des modules actifs
    Syntaxe:LoadModule module nom-fichier
    Contexte:configuration du serveur
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_so
    -

    La directive LoadModule permet de lier le fichier objet ou la +

    La directive LoadModule permet de lier le fichier objet ou la bibliothque nom-fichier avec le serveur, et d'ajouter la structure de module nomme module la liste des modules actifs. module est le nom de la variable externe de type module dans le fichier, et est rfrenc comme Identificateur de - module dans la documentation des modules. Exemple :

    + module dans la documentation des modules.

    + +

    Par exemple :

    + +
    LoadModule status_module "modules/mod_status.so"
    -

    - LoadModule status_module modules/mod_status.so -

    charge le module spcifi depuis le sous-rpertoire des modules situ la racine du serveur.

    @@ -207,7 +217,28 @@ actifs  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_so.html.ja.utf8 b/docs/manual/mod/mod_so.html.ja.utf8 index ee306a2dba0..99f6fd68587 100644 --- a/docs/manual/mod/mod_so.html.ja.utf8 +++ b/docs/manual/mod/mod_so.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_so - Apache HTTP サーバ +mod_so - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_so

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -43,7 +49,7 @@

    いくつかのオペレーティングシステムでは、サーバの再コンパイルをする代わりに、 このモジュールを使用して 動的共有オブジェクト - (DSO) 機構により、実行時に Apache にモジュールを読み込ませることが + (DSO) 機構により、実行時に Apache HTTP Server にモジュールを読み込ませることが できます。

    Unix 上では、読み込まれるコードは通常は共有オブジェクトファイル @@ -52,34 +58,40 @@ です。

    警告

    -

    Apache 1.3 のモジュールを直接 Apache 2.0 で使うことはできません - ― モジュールは Apache 2.0 用に動的にロードされるか、 - 直接組み込まれるために修正されなければなりません。

    +

    Apache HTTP Server のあるメジャーバージョン向けにビルドされたモジュールは一般に + 他のメジャーバージョンでは動きません。(例えば 1.3 と 2.0、 2.0 と 2.2) + またメジャーバージョン間ではAPIの変更がしばしば発生し、そのため新しい + メジャーバージョン向けにモジュールの修正が必要になることがあります。

    -

    ディレクティブ

    +

    トピック

    +
      +
    • Windows 用のロード可能なモジュールを作成する
    • +

    ディレクティブ

    -

    トピック

    -
      -
    • Windows 用のロード可能なモジュールを作成する
    • -
    +

    Bugfix checklist

    参照

    +
    top

    Windows 用のロード可能なモジュールを作成する

    -

    Apache 1.3.15 と 2.0 とで Windows のモジュール名の形式は変更されました - ― モジュールは mod_foo.so という名前になりました。

    - -

    まだ mod_so で ApacheModuleFoo.dll という名前のモジュールも - ロードされますが、新しい名前の付け方を使う方が好まれます。モジュールを - 2.0 用に移植しているのであれば、2.0 の習慣に合うように名前を +

    Windows において動的にロードされるモジュールの拡張子は普通 .dll + ですが、Apache httpd のモジュールは mod_whatever.so + といった名前を持ちます。これは、他のプラットフォームでの通常の形式に + あわせたものです。しかしながら、サードパーティ製モジュール、例えばPHPなど、 + は今でも .dll の拡張子を使っています。

    + +

    まだ mod_soApacheModuleFoo.dll という名前の + モジュールもロードされますが、新しい名前の付け方を使う方が好まれます。 + モジュールを 2.0 用に移植しているのであれば、2.0 の習慣に合うように名前を 修正してください。

    -

    Apache のモジュール API は UNIX と Windows 間では変更されていません。 +

    Apache httpd のモジュール API は UNIX と Windows 間では変更されていません。 多くのモジュールは全く変更なし、もしくは簡単な変更により Windows で実行できるようになります。ただし、それ以外の Windows には無い Unix アーキテクチャーの機能に依存したモジュールは動作しません。

    @@ -87,7 +99,7 @@

    モジュールが実際に動作するときは、 二つの方法のどちらかでサーバに追加することができます。まず、Unix と同様にサーバにコンパイルして組み込むことができます。Windows - 用の Apache は Unix 用の Apache にある Configure + 用の Apache httpd は Unix 用の Apache にある Configure プログラムがありませんので、モジュールのソースファイルを ApacheCore プロジェクトファイルに追加し、シンボルを os\win32\modules.c ファイルに追加する必要があります。

    @@ -97,13 +109,13 @@ LoadModule ディレクティブによりサーバに読み込むことができます。これらのモジュール DLL はそのまま配布することが可能で、サーバを再コンパイルすることなく、Windows - 用の Apache のすべてのインストールで実行することができます。

    + 用の Apache httpd のすべてのインストールで実行することができます。

    モジュール DLL を作成するためには、 モジュールの作成に小さな変更を行なう必要があります。 つまり、モジュールのレコード (これは後で作成されます。 以下を参照してください) が DLL からエクスポートされなければなりません。 - これを行なうには、AP_MODULE_DECLARE_DATA (Apache + これを行なうには、AP_MODULE_DECLARE_DATA (Apache httpd のヘッダファイルで定義されています) をモジュールのモジュールレコード 定義の部分に追加してください。たとえば、モジュールに

    @@ -124,7 +136,7 @@

    さあ、あなたのモジュールの DLL を作成しましょう。これを、 libhttpd.lib 共有ライブラリがコンパイルされたときに作成された ibhttpd.lib エクスポートライブラリとリンクしてください。この時に、 - Apache のヘッダファイルが正しい位置にあるように、 + Apache httpd のヘッダファイルが正しい位置にあるように、 コンパイラの設定を変える必要があるかもしれません。 このライブラリはサーバルートの modules ディレクトリにあります。 ビルド環境が正しく設定されるように、既存のモジュール用の .dsp を @@ -142,7 +154,7 @@

    説明:起動時や再起動時に実行コードとモジュールをサーバにロードする
    ステータス:Extension
    - +
    説明:指定されたオブジェクトファイルやライブラリをリンクする
    構文:LoadFile filename [filename] ...
    コンテキスト:サーバ設定ファイル
    コンテキスト:サーバ設定ファイル, バーチャルホスト
    ステータス:Extension
    モジュール:mod_so
    @@ -154,7 +166,8 @@

    例:

    -

    LoadFile libexec/libxmlparse.so

    +
    LoadFile libexec/libxmlparse.so
    +
    @@ -164,7 +177,7 @@ 説明:オブジェクトファイルやライブラリをリンクし、使用モジュールの リストに追加する 構文:LoadModule module filename -コンテキスト:サーバ設定ファイル +コンテキスト:サーバ設定ファイル, バーチャルホスト ステータス:Extension モジュール:mod_so @@ -176,9 +189,8 @@ 型の外部変数の名前で、モジュールのドキュメントに モジュール識別子として書かれているものです。例 :

    -

    - LoadModule status_module modules/mod_status.so -

    +
    LoadModule status_module modules/mod_status.so
    +

    これは ServerRoot の modules サブディレクトリから指定された名前の モジュールをロードします。

    @@ -186,12 +198,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_so.html.ko.euc-kr b/docs/manual/mod/mod_so.html.ko.euc-kr index 2e08b960983..216a4cc680b 100644 --- a/docs/manual/mod/mod_so.html.ko.euc-kr +++ b/docs/manual/mod/mod_so.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_so - Apache HTTP Server +mod_so - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_so

    @@ -52,15 +57,17 @@ ؾ Ѵ.

    -
    top

     о

    @@ -174,7 +181,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_so.html.tr.utf8 b/docs/manual/mod/mod_so.html.tr.utf8 index c9454f7103a..377b186a6a4 100644 --- a/docs/manual/mod/mod_so.html.tr.utf8 +++ b/docs/manual/mod/mod_so.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_so - Apache HTTP Sunucusu +mod_so - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_so

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -37,70 +41,74 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

    Özet

    -

    Seçilen işletim sistemleri üzerinde bu modül Apache’nin yeniden - derlenmesini gerektirmeden modüllerin Devingen - Paylaşımlı Nesne (DSO) mekanizması üzerinden kullanılabilmesini - sağlar.

    +

    Seçilen işletim sistemleri üzerinde bu modül Apache HTTP Sunucusunun + yeniden derlenmesini gerektirmeden modüllerin Devingen Paylaşımlı Nesne (DSO) mekanizması üzerinden + kullanılabilmesini sağlar.

    Unix’te yüklenen kod genellikle paylaşımlı nesne dosyalarından (.so uzantılı dosyalar), Windows’ta ise ya .so ya da .dll uzantılı dosyalardan gelir.

    Uyarı

    -

    Apache 1.3 modülleri Apache 2.0’da doğrudan kullanılamazlar - modül ya - devingen olarak yüklenecek hale getirilmeli ya da Apache 2.0’ın içinde - derlenmelidir.

    +

    Apache HTTP Sunucusunun ana sürümlerinden biri (1.3, 2.0, 2.2, 2.4 gibi) + için derlenmiş modüller genelde bir diğerinde çalışmaz. Genellikle + aralarında API değişikliği sözkonusu olduğundan çalışması için modüllerde + yeni sürüme göre değişiklik yapılması gerekir.

    -
    top

    Yüklenebilir Modüllerin Windows için Oluşturulması

    Bilginize

    -

    Windows için modül isimlendirme biçemi Apache 1.3.15 ve 2.0 - sürümlerinde değişmiştir; modüllere artık mod_filanca.so biçeminde isim - verilmektedir.

    +

    Windows üzeinde yüklenebilir dosyalar genelde .dll sonekini + alırlar. Apache httpd modülleri ise diğer platformlardaki gibi + mod_filanca.so biçeminde isimlendirilmektedir. Bununla + birlikte, üçüncü parti modüllerden bazılarının (PHP gibi) hala + .dll sonekini kullandığı görülmektedir.

    -

    mod_so modülü ApacheModuleFoo.dll biçeminde +

    mod_so modülü ApacheModuleFoo.dll biçeminde isimlendirilmiş modülleri hala yüklemekteyse de yeni adlandırma uzlaşımı tercih edilmelidir. Yüklenebilir modülleri 2.0’a dönüştürüyorsanız, lütfen isimlerini de 2.0 uzlaşımına uygun hale getiriniz.

    -

    Apache modül programlama arayüzü Unix ve Windows sürümleri arasında - değişiklik göstermez. Unix için kullanılan çoğu modül hiç değişiklik - yapmadan ya da çok küçük bir değişiklikle Windows’ta da çalışmaktadır. - Çalışmayanlar Unix platformunun sahip olduğu ancak Windows platformunun - sahip olmadığı nitelikleri kullanan modüllerdir.

    +

    Apache httpd modül programlama arayüzü Unix ve Windows sürümleri + arasında değişiklik göstermez. Unix için kullanılan çoğu modül hiç + değişiklik yapmadan ya da çok küçük bir değişiklikle Windows’ta da + çalışmaktadır. Çalışmayanlar Unix platformunun sahip olduğu ancak Windows + platformunun sahip olmadığı nitelikleri kullanan modüllerdir.

    Bir modül Windows’ta çalıştığı zaman, sunucuya iki şekilde yüklenebilir. Unix’te olduğu gibi, doğrudan sunucunun içinde - derlenebilir. Windows için hazırlanan Apache paketi, Unix için geçerli - olan Configure betiğini içermediğinden modülün kaynak - dosyası ApacheCore proje dosyasına, sembolleri de + derlenebilir. Windows için hazırlanan Apache httpd paketi, Unix için + geçerli olan Configure betiğini içermediğinden modülün + kaynak dosyası ApacheCore proje dosyasına, sembolleri de os\win32\modules.c dosyasına eklenmelidir.

    İkinci yol ise modülü bir paylaşımlı kütüphane olarak çalışma anında LoadModule yönergesi ile yüklemek için bir DLL olarak derlemektir. Bu DLL modüller dağıtılabilir ve - sunucuyu yeniden derlemek gerekmeksizin her Windows için Apache + sunucuyu yeniden derlemek gerekmeksizin her Windows için Apache httpd kurulumunda çalışabilir.

    Bir modül DLL’i oluşturmak için modülün kaynak dosyasında küçük bir değişiklik yapmak gerekir: Modül kaydının daha sonra oluşturulacak olan DLL’den ihraç edilebilmesi gerekir (aşağıya bakınız). Bunu yapmak için - modülün modül kaydı tanımına (Apache başlık dosyalarında tanımlanmış - olan) AP_MODULE_DECLARE_DATA eklenmelidir. Örneğin, - modülünüz

    + modülün modül kaydı tanımına (Apache httpd başlık dosyalarında + tanımlanmış olan) AP_MODULE_DECLARE_DATA eklenmelidir. + Örneğin, modülünüz

    module foo_module; @@ -120,7 +128,7 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

    Artık modülü içeren bir DLL oluşturmaya hazırsınız. Bunu, libhttpd.dll paylaşımlı kütüphanesi derlenirken oluşturulan libhttpd.lib ihraç - kütüphanesi ile ilintilemeniz gerekecektir. Ayrıca, Apache başlık + kütüphanesi ile ilintilemeniz gerekecektir. Ayrıca, Apache httpd başlık dosyalarının doğru konumlandığından emin olmak için derleyici seçeneklerinde değişiklik yapmanız gerekebilir. Bu kütüphaneyi sunucunuzun kök dizini altındaki modules dizininde @@ -141,7 +149,7 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

    - +
    Açıklama:Modüllerin ve çalıştırılabilir kodun sunucunun başlatılması veya yeniden başlatılması sırasında yüklenmesini sağlar.
    Durum:Eklenti
    Açıklama:Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler.
    Sözdizimi:LoadFile dosya-ismi [dosya-ismi] ...
    Bağlam:sunucu geneli
    Bağlam:sunucu geneli, sanal konak
    Durum:Eklenti
    Modül:mod_so
    @@ -156,7 +164,8 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

    Örnek:

    -

    LoadFile libexec/libxmlparse.so

    +
    LoadFile libexec/libxmlparse.so
    +
    @@ -166,7 +175,7 @@ yeniden başlatılması sırasında yüklenmesini sağlar. Açıklama:Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler ve etkin modül listesine ekler. Sözdizimi:LoadModule modül dosya-ismi -Bağlam:sunucu geneli +Bağlam:sunucu geneli, sanal konak Durum:Eklenti Modül:mod_so @@ -176,11 +185,12 @@ ve etkin modül listesine ekler. modül ismiyle ekler. modül, modülün kaynak dosyasında module türündeki tek harici değişkenin ismi olup modül belgelerinde Modül Betimleyici olarak - geçer. Örneğin,

    + geçer.

    + +

    Örneğin,

    + +
    LoadModule status_module modules/mod_status.so
    -

    - LoadModule status_module modules/mod_status.so -

    satırı ile ismi belirtilen dosya ServerRoot dizini altındaki modules alt dizininden yüklenir.

    @@ -193,7 +203,28 @@ ve etkin modül listesine ekler.  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_so.xml b/docs/manual/mod/mod_so.xml index cef79cb8dad..06b39efc32f 100644 --- a/docs/manual/mod/mod_so.xml +++ b/docs/manual/mod/mod_so.xml @@ -40,7 +40,7 @@ Windows

    On Unix, the loaded code typically comes from shared object files (usually with .so extension), on Windows - this may either the .so or .dll + this may either be the .so or .dll extension.

    Warning @@ -82,7 +82,7 @@ Windows

    The second way is to compile the module as a DLL, a shared library that can be loaded into the server at runtime, using - the LoadModule + the LoadModule directive. These module DLLs can be distributed and run on any Apache httpd for Windows installation, without recompilation of the server.

    @@ -132,11 +132,12 @@ Windows LoadFile filename [filename] ... server config +virtual host -

    The LoadFile directive links in the named object files or +

    The LoadFile directive links in the named object files or libraries when the server is started or restarted; this is used to load additional code which may be required for some module to work. Filename is either an absolute path or @@ -144,7 +145,9 @@ Windows

    For example:

    - LoadFile libexec/libxmlparse.so + +LoadFile "libexec/libxmlparse.so" +
    @@ -156,20 +159,23 @@ of active modules LoadModule module filename server config +virtual host -

    The LoadModule directive links in the object file or library +

    The LoadModule directive links in the object file or library filename and adds the module structure named module to the list of active modules. Module is the name of the external variable of type module in the file, and is listed as the Module Identifier - in the module documentation. Example:

    + in the module documentation.

    - - LoadModule status_module modules/mod_status.so - +

    For example:

    + + +LoadModule status_module "modules/mod_status.so" +

    loads the named module from the modules subdirectory of the ServerRoot.

    diff --git a/docs/manual/mod/mod_so.xml.fr b/docs/manual/mod/mod_so.xml.fr index 5c34d85950b..3e9b02d9dda 100644 --- a/docs/manual/mod/mod_so.xml.fr +++ b/docs/manual/mod/mod_so.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,8 +25,8 @@ mod_so -Chargement de modules ou de code exécutable au cours du -démarrage ou du redémarrage du serveur +Chargement de modules ou de code exécutable au cours du +démarrage ou du redémarrage du serveur Extension mod_so.c so_module @@ -35,33 +35,33 @@ inclus) -

    Sur les systèmes d'exploitation sélectionnés, ce module peut être - utilisé pour charger des modules dans le serveur HTTP Apache en cours d'exécution - grâce au mécanisme des Dynamic Shared Object ou Objets Partagés - Dynamiquement (DSO), et évite ainsi de devoir effectuer une +

    Sur les systèmes d'exploitation sélectionnés, ce module peut être + utilisé pour charger des modules dans le serveur HTTP Apache en cours d'exécution + grâce au mécanisme des Dynamic Shared Object ou Objets Partagés + Dynamiquement (DSO), et évite ainsi de devoir effectuer une recompilation.

    -

    Sous Unix, le code chargé provient en général de fichiers objet - partagés possèdant en général l'extension .so, alors - que sous Windows, l'extension peut être soit .so, soit +

    Sous Unix, le code chargé provient en général de fichiers objet + partagés possèdant en général l'extension .so, alors + que sous Windows, l'extension peut être soit .so, soit .dll.

    Avertissement -

    En général, les modules compilés pour une version majeure du +

    En général, les modules compilés pour une version majeure du serveur HTTP Apache ne fonctionneront pas avec une autre (par - exemple de 1.3 à 2.0 ou 2.0 à 2.2). D'une version majeure à l'autre, - il y a souvent des modifications d'API qui nécessitent des + exemple de 1.3 à 2.0 ou 2.0 à 2.2). D'une version majeure à l'autre, + il y a souvent des modifications d'API qui nécessitent des modifications du module pour qu'il puisse fonctionner avec la nouvelle version.

    -
    Création de modules chargeables pour +<section id="windows"><title>Création de modules chargeables pour Windows Note -

    Sous Windows, où les modules chargeables possèdent en général +

    Sous Windows, où les modules chargeables possèdent en général l'extension de nom de fichier .dll, les modules Apache httpd se nomment mod_nom-module.so, tout comme sur les autres plates-formes. Vous trouverez cependant encore des modules @@ -69,40 +69,40 @@ Windows convention de nommage avec extension .dll.

    Bien que mod_so puisse encore charger des modules - possèdant un nom du style ApacheModuleFoo.dll, - il est préférable d'utiliser la + possèdant un nom du style ApacheModuleFoo.dll, + il est préférable d'utiliser la nouvelle convention de nommage ; si vous modifiez votre module chargeable pour la version 2.0, veuillez aussi modifier son nom pour respecter cette nouvelle convention.

    Les API des modules Apache httpd sous Unix et Windows sont identiques. Alors que certains modules s'appuient sur certains - aspects de l'architecture Unix non présents dans Windows, et ne - fonctionneront donc pas sur cette dernière plate-forme, de nombreux + aspects de l'architecture Unix non présents dans Windows, et ne + fonctionneront donc pas sur cette dernière plate-forme, de nombreux modules fonctionnent sous Windows avec peu ou pas de modification - par rapport à leur version Unix.

    + par rapport à leur version Unix.

    -

    Lorsqu'un module fonctionne, il peut être ajouté au serveur de - deux manières. Sous Unix, il peut être compilé dans le serveur. +

    Lorsqu'un module fonctionne, il peut être ajouté au serveur de + deux manières. Sous Unix, il peut être compilé dans le serveur. Comme Apache httpd pour Windows ne dispose pas du programme - Configure propre à Apache httpd pour Unix, le fichier source - du module doit être ajouté au fichier projet Apache de base, et ses - symboles ajoutés au fichier os\win32\modules.c.

    - -

    La seconde méthode consiste à compiler le module en tant que DLL, - à savoir une bibliothèque partagée qui pourra être chargée dans le - serveur en cours d'exécution via la directive - LoadModule. Ces modules DLL - peuvent être distribués et exécutés sur toute installation d'Apache - httpd pour Windows, sans avoir à recompiler le serveur.

    - -

    Pour créer un module DLL, il est nécessaire d'apporter une légère - modification à son fichier source : l'enregistrement du module doit - être exporté depuis la DLL (qui sera elle-même créée plus tard ; + Configure propre à Apache httpd pour Unix, le fichier source + du module doit être ajouté au fichier projet Apache de base, et ses + symboles ajoutés au fichier os\win32\modules.c.

    + +

    La seconde méthode consiste à compiler le module en tant que DLL, + à savoir une bibliothèque partagée qui pourra être chargée dans le + serveur en cours d'exécution via la directive + LoadModule. Ces modules DLL + peuvent être distribués et exécutés sur toute installation d'Apache + httpd pour Windows, sans avoir à recompiler le serveur.

    + +

    Pour créer un module DLL, il est nécessaire d'apporter une légère + modification à son fichier source : l'enregistrement du module doit + être exporté depuis la DLL (qui sera elle-même créée plus tard ; voir plus loin). Pour ce faire, ajoutez la macro - AP_MODULE_DECLARE_DATA (définie dans les fichiers - d'en-têtes d'Apache httpd) à la définition de l'enregistrement de votre - module. Par exemple, si votre module est déclaré comme suit :

    + AP_MODULE_DECLARE_DATA (définie dans les fichiers + d'en-têtes d'Apache httpd) à la définition de l'enregistrement de votre + module. Par exemple, si votre module est déclaré comme suit :

    module foo_module; @@ -114,53 +114,57 @@ Windows

    Notez que cette macro ne sera prise en compte que sous Windows, - si bien que le module poura être utilisé sans changement sous Unix, - si besoin est. Alternativement, si vous êtes familier avec les + si bien que le module poura être utilisé sans changement sous Unix, + si besoin est. Alternativement, si vous êtes familier avec les fichiers .DEF, vous pouvez les utiliser pour exporter l'enregistrement du module.

    -

    Maintenant, nous sommes prêts à créer une DLL contenant notre - module. Il va falloir pour cela la lier avec la bibliothèque - d'export libhttpd.lib qui a été créée au cours de la compilation de - la bibliothèque partagée libhttpd.dll. Il sera peut-être aussi - nécessaire de modifier la configuration du compilateur pour - s'assurer que les fichiers d'en-têtes d'Apache httpd seront correctement - localisés. Vous trouverez cette bibliothèque à la racine du - répertoire des modules de votre serveur. Il est souhaitable +

    Maintenant, nous sommes prêts à créer une DLL contenant notre + module. Il va falloir pour cela la lier avec la bibliothèque + d'export libhttpd.lib qui a été créée au cours de la compilation de + la bibliothèque partagée libhttpd.dll. Il sera peut-être aussi + nécessaire de modifier la configuration du compilateur pour + s'assurer que les fichiers d'en-têtes d'Apache httpd seront correctement + localisés. Vous trouverez cette bibliothèque à la racine du + répertoire des modules de votre serveur. Il est souhaitable d'utiliser un fichier de module .dsp existant dans l'arborescence afin de s'assurer que l'environnement de compilation est - correctement configuré, mais vous pouvez aussi comparer les options - de compilation et d'édition de liens à votre fichier .dsp.

    + correctement configuré, mais vous pouvez aussi comparer les options + de compilation et d'édition de liens à votre fichier .dsp.

    -

    Ceci devrait créer une version DLL de votre module. Il vous - suffit maintenant de l'enregistrer dans le répertoire - modules à la racine de votre serveur, et d'utiliser la +

    Ceci devrait créer une version DLL de votre module. Il vous + suffit maintenant de l'enregistrer dans le répertoire + modules à la racine de votre serveur, et d'utiliser la directive LoadModule pour la charger.

    LoadFile -Liaison du fichier objet ou de la bibliothèque -spécifié +Liaison du fichier objet ou de la bibliothèque +spécifié LoadFile nom-fichier [nom-fichier] ... server config +virtual host -

    La directive LoadFile permet de lier le fichier objet ou la - bibliothèque spécifié au serveur lors du démarrage ou du redémarrage +

    La directive LoadFile permet de lier le fichier + objet ou la bibliothèque spécifié au serveur lors du + démarrage ou du redémarrage de ce dernier ; ceci permet d'ajouter tout code additionnel - nécessaire au fonctionnement d'un module. + nécessaire au fonctionnement d'un module. nom-fichier est soit un chemin absolu, soit un chemin - relatif au répertoire défini par la directive ServerRoot.

    -

    Par exemple:

    +

    Par exemple :

    - LoadFile libexec/libxmlparse.so + +LoadFile "libexec/libxmlparse.so" +
    @@ -168,28 +172,31 @@ spécifié LoadModule Liaison avec le serveur du fichier objet ou de la -bibliothèque spécifié, et ajout de ce dernier à la liste des modules +bibliothèque spécifié, et ajout de ce dernier à la liste des modules actifs LoadModule module nom-fichier server config +virtual host -

    La directive LoadModule permet de lier le fichier objet ou la - bibliothèque nom-fichier avec le serveur, et d'ajouter la - structure de module nommée module à la liste des modules +

    La directive LoadModule permet de lier le fichier objet ou la + bibliothèque nom-fichier avec le serveur, et d'ajouter la + structure de module nommée module à la liste des modules actifs. module est le nom de la variable externe de type - module dans le fichier, et est référencé comme module dans le fichier, et est référencé comme Identificateur de - module dans la documentation des modules. Exemple :

    + module dans la documentation des modules.

    - - LoadModule status_module modules/mod_status.so - +

    Par exemple :

    -

    charge le module spécifié depuis le sous-répertoire des modules - situé à la racine du serveur.

    + +LoadModule status_module "modules/mod_status.so" + + +

    charge le module spécifié depuis le sous-répertoire des modules + situé à la racine du serveur.

    diff --git a/docs/manual/mod/mod_so.xml.ja b/docs/manual/mod/mod_so.xml.ja index d78a58ae0bd..d0d0bc4a1a9 100644 --- a/docs/manual/mod/mod_so.xml.ja +++ b/docs/manual/mod/mod_so.xml.ja @@ -1,7 +1,7 @@ - + + + +mod_socache_dbm - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_socache_dbm

    +
    +

    Available Languages:  en  | + fr 

    +
    + + + +
    Description:DBM based shared object cache provider.
    Status:Extension
    ModuleIdentifier:socache_dbm_module
    SourceFile:mod_socache_dbm.c
    +

    Summary

    + +

    mod_socache_dbm is a shared object cache provider + which provides for creation and access to a cache backed by a + DBM database. +

    + +

    + dbm:/path/to/datafile +

    + +

    Details of other shared object cache providers can be found + here. +

    + +
    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    + +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_dbm.html.fr b/docs/manual/mod/mod_socache_dbm.html.fr new file mode 100644 index 00000000000..7ab22f2a458 --- /dev/null +++ b/docs/manual/mod/mod_socache_dbm.html.fr @@ -0,0 +1,86 @@ + + + + + +mod_socache_dbm - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_socache_dbm

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de cache d'objets partags bas sur DBM.
    Statut:Extension
    IdentificateurdeModule:socache_dbm_module
    FichierSource:mod_socache_dbm.c
    +

    Sommaire

    + +

    Le module mod_socache_dbm est un fournisseur de cache + d'objets partags qui permet la cration et l'accs un cache + maintenu par une base de donnes DBM. +

    + +

    + dbm:/chemin/vers/datafile +

    + +

    Vous trouverez des dtails propos des autres fournisseurs de + cache d'objets partags ici. +

    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_dbm.xml b/docs/manual/mod/mod_socache_dbm.xml new file mode 100644 index 00000000000..9cb636c92dc --- /dev/null +++ b/docs/manual/mod/mod_socache_dbm.xml @@ -0,0 +1,47 @@ + + + + + + + + + +mod_socache_dbm +DBM based shared object cache provider. +Extension +mod_socache_dbm.c +socache_dbm_module + + +

    mod_socache_dbm is a shared object cache provider + which provides for creation and access to a cache backed by a + DBM database. +

    + + + dbm:/path/to/datafile + + +

    Details of other shared object cache providers can be found + here. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_dbm.xml.fr b/docs/manual/mod/mod_socache_dbm.xml.fr new file mode 100644 index 00000000000..006af371369 --- /dev/null +++ b/docs/manual/mod/mod_socache_dbm.xml.fr @@ -0,0 +1,49 @@ + + + + + + + + + + + +mod_socache_dbm +Fournisseur de cache d'objets partagés basé sur DBM. +Extension +mod_socache_dbm.c +socache_dbm_module + + +

    Le module mod_socache_dbm est un fournisseur de cache + d'objets partagés qui permet la création et l'accès à un cache + maintenu par une base de données DBM. +

    + + + dbm:/chemin/vers/datafile + + +

    Vous trouverez des détails à propos des autres fournisseurs de + cache d'objets partagés ici. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_dbm.xml.meta b/docs/manual/mod/mod_socache_dbm.xml.meta new file mode 100644 index 00000000000..3c0e26b7122 --- /dev/null +++ b/docs/manual/mod/mod_socache_dbm.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_socache_dbm + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_socache_dc.html b/docs/manual/mod/mod_socache_dc.html new file mode 100644 index 00000000000..56074f75454 --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.html @@ -0,0 +1,9 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_socache_dc.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_socache_dc.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_socache_dc.html.en b/docs/manual/mod/mod_socache_dc.html.en new file mode 100644 index 00000000000..c270628bd05 --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.html.en @@ -0,0 +1,84 @@ + + + + + +mod_socache_dc - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_socache_dc

    +
    +

    Available Languages:  en  | + fr 

    +
    + + + +
    Description:Distcache based shared object cache provider.
    Status:Extension
    ModuleIdentifier:socache_dc_module
    SourceFile:mod_socache_dc.c
    +

    Summary

    + +

    mod_socache_dc is a shared object cache provider + which provides for creation and access to a cache backed by the + distcache + distributed session caching libraries. +

    + +

    Details of other shared object cache providers can be found + here. +

    + +
    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    + +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_dc.html.fr b/docs/manual/mod/mod_socache_dc.html.fr new file mode 100644 index 00000000000..8a0a69f7abe --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.html.fr @@ -0,0 +1,83 @@ + + + + + +mod_socache_dc - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_socache_dc

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de cache d'objets partags bas sur dc.
    Statut:Extension
    IdentificateurdeModule:socache_dc_module
    FichierSource:mod_socache_dc.c
    +

    Sommaire

    + +

    Le module mod_socache_dc est un fournisseur de cache + d'objets partags qui permet la cration et l'accs un cache + maintenu par les bibliothques de mise en cache de sessions + distribues distcache. +

    + +

    Vous trouverez des dtails propos des autres fournisseurs de + cache d'objets partags ici. +

    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_dc.xml b/docs/manual/mod/mod_socache_dc.xml new file mode 100644 index 00000000000..a6d865d52f6 --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.xml @@ -0,0 +1,44 @@ + + + + + + + + + +mod_socache_dc +Distcache based shared object cache provider. +Extension +mod_socache_dc.c +socache_dc_module + + +

    mod_socache_dc is a shared object cache provider + which provides for creation and access to a cache backed by the + distcache + distributed session caching libraries. +

    + +

    Details of other shared object cache providers can be found + here. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_dc.xml.fr b/docs/manual/mod/mod_socache_dc.xml.fr new file mode 100644 index 00000000000..e2aed317316 --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.xml.fr @@ -0,0 +1,46 @@ + + + + + + + + + + + +mod_socache_dc +Fournisseur de cache d'objets partagés basé sur dc. +Extension +mod_socache_dc.c +socache_dc_module + + +

    Le module mod_socache_dc est un fournisseur de cache + d'objets partagés qui permet la création et l'accès à un cache + maintenu par les bibliothèques de mise en cache de sessions + distribuées distcache. +

    + +

    Vous trouverez des détails à propos des autres fournisseurs de + cache d'objets partagés ici. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_dc.xml.meta b/docs/manual/mod/mod_socache_dc.xml.meta new file mode 100644 index 00000000000..e1f2ad42818 --- /dev/null +++ b/docs/manual/mod/mod_socache_dc.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_socache_dc + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_socache_memcache.html b/docs/manual/mod/mod_socache_memcache.html new file mode 100644 index 00000000000..4670c895e43 --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.html @@ -0,0 +1,9 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_socache_memcache.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_socache_memcache.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_socache_memcache.html.en b/docs/manual/mod/mod_socache_memcache.html.en new file mode 100644 index 00000000000..a8506e7cc62 --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.html.en @@ -0,0 +1,129 @@ + + + + + +mod_socache_memcache - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_socache_memcache

    +
    +

    Available Languages:  en  | + fr 

    +
    + + + +
    Description:Memcache based shared object cache provider.
    Status:Extension
    ModuleIdentifier:socache_memcache_module
    SourceFile:mod_socache_memcache.c
    +

    Summary

    + +

    mod_socache_memcache is a shared object cache provider + which provides for creation and access to a cache backed by the + memcached + high-performance, distributed memory object caching system. +

    + + +

    This shared object cache provider's "create" method requires a + comma separated list of memcached host/port specifications. If using + this provider via another modules configuration (such as + SSLSessionCache), provide + the list of servers as the optional "arg" parameter.

    + +
    SSLSessionCache memcache:memcache.example.com:12345,memcache2.example.com:12345
    + + +

    Details of other shared object cache providers can be found + here. +

    + +
    +

    Directives

    + +

    Bugfix checklist

    See also

    +
    + +
    top
    +

    MemcacheConnTTL Directive

    + + + + + + + + +
    Description:Keepalive time for idle connections
    Syntax:MemcacheConnTTL num[units]
    Default:MemcacheConnTTL 15s
    Context:server config, virtual host
    Status:Extension
    Module:mod_socache_memcache
    Compatibility:Available in Apache 2.4.17 and later
    + +

    Set the time to keep idle connections with the memcache server(s) + alive (threaded platforms only).

    + +

    Valid values for MemcacheConnTTL are times + up to one hour. 0 means no timeout.

    + +

    This timeout defaults to units of seconds, but accepts + suffixes for milliseconds (ms), seconds (s), minutes (min), and hours (h). +

    + +

    Before Apache 2.4.17, this timeout was hardcoded and its value was 600 usec. + So, the closest configuration to match the legacy behaviour is to set + MemcacheConnTTL to 1ms.

    + +
    # Set a timeout of 10 minutes
    +MemcacheConnTTL 10min
    +# Set a timeout of 60 seconds
    +MemcacheConnTTL 60
    +
    + + +
    +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_memcache.html.fr b/docs/manual/mod/mod_socache_memcache.html.fr new file mode 100644 index 00000000000..6ab1d7f1fb6 --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.html.fr @@ -0,0 +1,135 @@ + + + + + +mod_socache_memcache - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_socache_memcache

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de cache d'objets partags bas sur Memcache.
    Statut:Extension
    IdentificateurdeModule:socache_memcache_module
    FichierSource:mod_socache_memcache.c
    +

    Sommaire

    + +

    Le module mod_socache_memcache est un fournisseur de cache + d'objets partags qui permet la cration et l'accs un cache + maintenu par le systme de mise en cache d'objets en mmoire + distribue hautes performances memcached. +

    + +

    Cette mthode "create" du fournisseur de cache d'objets partags + requiert une liste de spcifications hte/port en cache mmoire + spares par des virgules. Si vous utilisez ce fournisseur + dans la configuration d'autres modules (comme + SSLSessionCache), vous devez + fournir la liste des serveurs sous la forme du paramtre optionnel + "arg".

    + +
    SSLSessionCache memcache:memcache.example.com:12345,memcache2.example.com:12345
    + + +

    Vous trouverez des dtails propos des autres fournisseurs de + cache d'objets partags ici. +

    + +
    + + +
    top
    +

    Directive MemcacheConnTTL

    + + + + + + + + +
    Description:Dure de conservation des connexions inactives
    Syntaxe:MemcacheConnTTL num[units]
    Dfaut:MemcacheConnTTL 15s
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_socache_memcache
    Compatibilit:Disponible partir de la version 2.4.17 du serveur HTTP +Apache.
    + +

    Dfinit la dure pendant laquelle les connexions + inactives avec le(s) serveur(s) memcache seront conserves + (plateformes threades seulement).

    + +

    Les valeurs valides de la directive + MemcacheConnTTL sont des dures d'une heure + maximum. La valeur 0 signifie une absence de premption

    + +

    L'unit par dfaut pour ce dlai est la seconde, mais vous + pouvez ajouter un suffixe pour spcifier une unit diffrente ; ms + pour milliseconde, s pour seconde, min pour minute et h pour heure.. +

    + +

    Dans les versions antrieures 2.4.17, ce dlai tait cod en + dur et sa valeur tait 600 microsecondes. La valeur la plus proche + de cette ancienne valeur pour la directive + MemcacheConnTTL est donc 1ms.

    + +
    # Dfinition d'un dlai de 10 minutes
    +MemcacheConnTTL 10min
    +# Dfinition d'un dlai de 60 secondes
    +MemcacheConnTTL 60
    +
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_memcache.xml b/docs/manual/mod/mod_socache_memcache.xml new file mode 100644 index 00000000000..5bf4dfee6ce --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.xml @@ -0,0 +1,94 @@ + + + + + + + + + +mod_socache_memcache +Memcache based shared object cache provider. +Extension +mod_socache_memcache.c +socache_memcache_module + + +

    mod_socache_memcache is a shared object cache provider + which provides for creation and access to a cache backed by the + memcached + high-performance, distributed memory object caching system. +

    + + +

    This shared object cache provider's "create" method requires a + comma separated list of memcached host/port specifications. If using + this provider via another modules configuration (such as + SSLSessionCache), provide + the list of servers as the optional "arg" parameter.

    + + + SSLSessionCache memcache:memcache.example.com:12345,memcache2.example.com:12345 + + +

    Details of other shared object cache providers can be found + here. +

    + +
    + + +MemcacheConnTTL +Keepalive time for idle connections +MemcacheConnTTL num[units] +MemcacheConnTTL 15s + +server config +virtual host + +Available in Apache 2.4.17 and later + + + +

    Set the time to keep idle connections with the memcache server(s) + alive (threaded platforms only).

    + +

    Valid values for MemcacheConnTTL are times + up to one hour. 0 means no timeout.

    + +

    This timeout defaults to units of seconds, but accepts + suffixes for milliseconds (ms), seconds (s), minutes (min), and hours (h). +

    + +

    Before Apache 2.4.17, this timeout was hardcoded and its value was 600 usec. + So, the closest configuration to match the legacy behaviour is to set + MemcacheConnTTL to 1ms.

    + + + +# Set a timeout of 10 minutes +MemcacheConnTTL 10min +# Set a timeout of 60 seconds +MemcacheConnTTL 60 + + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_socache_memcache.xml.fr b/docs/manual/mod/mod_socache_memcache.xml.fr new file mode 100644 index 00000000000..af968a2f7ea --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.xml.fr @@ -0,0 +1,103 @@ + + + + + + + + + + + +mod_socache_memcache +Fournisseur de cache d'objets partagés basé sur Memcache. +Extension +mod_socache_memcache.c +socache_memcache_module + + +

    Le module mod_socache_memcache est un fournisseur de cache + d'objets partagés qui permet la création et l'accès à un cache + maintenu par le système de mise en cache d'objets en mémoire + distribuée à hautes performances memcached. +

    + +

    Cette méthode "create" du fournisseur de cache d'objets partagés + requiert une liste de spécifications hôte/port en cache mémoire + séparées par des virgules. Si vous utilisez ce fournisseur + dans la configuration d'autres modules (comme + SSLSessionCache), vous devez + fournir la liste des serveurs sous la forme du paramètre optionnel + "arg".

    + + + SSLSessionCache memcache:memcache.example.com:12345,memcache2.example.com:12345 + + +

    Vous trouverez des détails à propos des autres fournisseurs de + cache d'objets partagés ici. +

    + +
    + + +MemcacheConnTTL +Durée de conservation des connexions inactives +MemcacheConnTTL num[units] +MemcacheConnTTL 15s + +server config +virtual host + +Disponible à partir de la version 2.4.17 du serveur HTTP +Apache. + + + +

    Définit la durée pendant laquelle les connexions + inactives avec le(s) serveur(s) memcache seront conservées + (plateformes threadées seulement).

    + +

    Les valeurs valides de la directive + MemcacheConnTTL sont des durées d'une heure + maximum. La valeur 0 signifie une absence de péremption

    + +

    L'unité par défaut pour ce délai est la seconde, mais vous + pouvez ajouter un suffixe pour spécifier une unité différente ; ms + pour milliseconde, s pour seconde, min pour minute et h pour heure.. +

    + +

    Dans les versions antérieures à 2.4.17, ce délai était codé en + dur et sa valeur était 600 microsecondes. La valeur la plus proche + de cette ancienne valeur pour la directive + MemcacheConnTTL est donc 1ms.

    + + + +# Définition d'un délai de 10 minutes +MemcacheConnTTL 10min +# Définition d'un délai de 60 secondes +MemcacheConnTTL 60 + + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_socache_memcache.xml.meta b/docs/manual/mod/mod_socache_memcache.xml.meta new file mode 100644 index 00000000000..7b6d723f5b7 --- /dev/null +++ b/docs/manual/mod/mod_socache_memcache.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_socache_memcache + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_socache_shmcb.html b/docs/manual/mod/mod_socache_shmcb.html new file mode 100644 index 00000000000..1fa64fc1dee --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.html @@ -0,0 +1,9 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_socache_shmcb.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 + +URI: mod_socache_shmcb.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_socache_shmcb.html.en b/docs/manual/mod/mod_socache_shmcb.html.en new file mode 100644 index 00000000000..92956ce3cb3 --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.html.en @@ -0,0 +1,87 @@ + + + + + +mod_socache_shmcb - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_socache_shmcb

    +
    +

    Available Languages:  en  | + fr 

    +
    + + + +
    Description:shmcb based shared object cache provider.
    Status:Extension
    ModuleIdentifier:socache_shmcb_module
    SourceFile:mod_socache_shmcb.c
    +

    Summary

    + +

    mod_socache_shmcb is a shared object cache provider + which provides for creation and access to a cache backed by a + high-performance cyclic buffer inside a shared memory segment. +

    + +

    + shmcb:/path/to/datafile(512000) +

    + +

    Details of other shared object cache providers can be found + here. +

    + +
    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    + +
    +
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_shmcb.html.fr b/docs/manual/mod/mod_socache_shmcb.html.fr new file mode 100644 index 00000000000..ca0a5bb1966 --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.html.fr @@ -0,0 +1,87 @@ + + + + + +mod_socache_shmcb - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_socache_shmcb

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Fournisseur de cache d'objets partags bas sur shmcb.
    Statut:Extension
    IdentificateurdeModule:socache_shmcb_module
    FichierSource:mod_socache_shmcb.c
    +

    Sommaire

    + +

    Le module mod_socache_shmcb est un fournisseur de cache + d'objets partags qui permet la cration et l'accs un cache + maintenu par un tampon cyclique hautes performances au sein d'un + segment de mmoire partage. +

    + +

    + shmcb:/chemin/vers/datafile(512000) +

    + +

    Vous trouverez des dtails propos des autres fournisseurs de + cache d'objets partags ici. +

    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_socache_shmcb.xml b/docs/manual/mod/mod_socache_shmcb.xml new file mode 100644 index 00000000000..9c6e61dad0c --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.xml @@ -0,0 +1,47 @@ + + + + + + + + + +mod_socache_shmcb +shmcb based shared object cache provider. +Extension +mod_socache_shmcb.c +socache_shmcb_module + + +

    mod_socache_shmcb is a shared object cache provider + which provides for creation and access to a cache backed by a + high-performance cyclic buffer inside a shared memory segment. +

    + + + shmcb:/path/to/datafile(512000) + + +

    Details of other shared object cache providers can be found + here. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_shmcb.xml.fr b/docs/manual/mod/mod_socache_shmcb.xml.fr new file mode 100644 index 00000000000..75d388a785c --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.xml.fr @@ -0,0 +1,50 @@ + + + + + + + + + + + +mod_socache_shmcb +Fournisseur de cache d'objets partagés basé sur shmcb. +Extension +mod_socache_shmcb.c +socache_shmcb_module + + +

    Le module mod_socache_shmcb est un fournisseur de cache + d'objets partagés qui permet la création et l'accès à un cache + maintenu par un tampon cyclique à hautes performances au sein d'un + segment de mémoire partagée. +

    + + + shmcb:/chemin/vers/datafile(512000) + + +

    Vous trouverez des détails à propos des autres fournisseurs de + cache d'objets partagés ici. +

    + +
    + +
    diff --git a/docs/manual/mod/mod_socache_shmcb.xml.meta b/docs/manual/mod/mod_socache_shmcb.xml.meta new file mode 100644 index 00000000000..ddd7d4bafff --- /dev/null +++ b/docs/manual/mod/mod_socache_shmcb.xml.meta @@ -0,0 +1,13 @@ + + + + + mod_socache_shmcb + /mod/ + .. + + + en + fr + + diff --git a/docs/manual/mod/mod_speling.html b/docs/manual/mod/mod_speling.html index 7cc8d4ee000..8d138c2f9a5 100644 --- a/docs/manual/mod/mod_speling.html +++ b/docs/manual/mod/mod_speling.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_speling.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_speling.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_speling.html.en b/docs/manual/mod/mod_speling.html.en index bae5be0613e..8239ba00ce9 100644 --- a/docs/manual/mod/mod_speling.html.en +++ b/docs/manual/mod/mod_speling.html.en @@ -1,27 +1,33 @@ - -mod_speling - Apache HTTP Server +mod_speling - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_speling

    Available Languages:  en  | + fr  |  ja  |  ko 

    @@ -67,7 +73,9 @@ misspellings.
  • CheckCaseOnly
  • CheckSpelling
  • -
    +

    Bugfix checklist

    See also

    +
    top

    CheckCaseOnly Directive

    @@ -115,7 +123,7 @@ module directory names.
  • spelling corrections apply strictly to existing files, so - a request for the <Location /status> may + a request for the <Location "/status"> may get incorrectly treated as the negotiated file "/stats.html".
  • @@ -132,9 +140,31 @@ module

    Available Languages:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_speling.html.fr b/docs/manual/mod/mod_speling.html.fr new file mode 100644 index 00000000000..01aed4906d8 --- /dev/null +++ b/docs/manual/mod/mod_speling.html.fr @@ -0,0 +1,171 @@ + + + + + +mod_speling - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_speling

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    + + + +
    Description:Tente de corriger les erreurs de casse dans les URLs ou les +fautes de frappe mineures.
    Statut:Extension
    IdentificateurdeModule:speling_module
    FichierSource:mod_speling.c
    +

    Sommaire

    + + +

    Il arrive que des requtes pour des documents ne puissent pas + tre traites par le serveur Apache de base cause d'une erreur + de frappe ou de casse. Ce module permet de traiter ce + problme en essayant de trouver un document correspondant, mme + lorsque tous les autres modules y ont renonc. Sa mthode de travail + consiste comparer chaque nom de document du rpertoire demand + avec le document de la requte sans tenir compte de la + casse, et en acceptant jusqu' une erreur + (insertion, omission, inversion de caractre ou caractre + erron). Une liste de tous les documents qui correspondent est alors + labore en utilisant cette stratgie.

    + +

    Si aprs le parcours du rpertoire,

    + +
      +
    • aucun document correspondant n'a t trouv, Apache procdera + normalement et renverra une erreur "document non trouv".
    • + +
    • un seul document correspondant pratiquement la requte a + t trouv, celui-ci est renvoy sous la forme d'une rponse de + redirection.
    • + +
    • plusieurs documents pouvant correspondre ont t trouvs, une + liste des documents est envoye au client afin que ce dernier + puisse slectionner le document correct.
    • +
    + +
    + + +
    top
    +

    Directive CheckCaseOnly

    + + + + + + + + +
    Description:Limite l'action du module aux corrections de +majuscules
    Syntaxe:CheckCaseOnly on|off
    Dfaut:CheckCaseOnly Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Extension
    Module:mod_speling
    +

    Lorsqu'elle est dfinie "on", cette directive permet de limiter + l'action du module aux inversions majuscule/minuscule. Les autres + corrections ne sont pas effectues.

    + + +
    +
    top
    +

    Directive CheckSpelling

    + + + + + + + + +
    Description:Active le module de correction
    Syntaxe:CheckSpelling on|off
    Dfaut:CheckSpelling Off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Extension
    Module:mod_speling
    +

    Cette directive permet d'activer ou de dsactiver le module de + correction. Lorsqu'il est activ, rappelez-vous que :

    + +
      +
    • le parcours du rpertoire ncessaire la correction aura un + impact sur les performances du serveur lorsque de nombreuses + corrections devront tre effectues au mme moment.
    • + +
    • l'arborescence ne doit pas contenir de documents + sensibles qui pourraient tre considrs par erreur comme + correspondant la requte.
    • + +
    • le module ne corrige pas les noms d'utilisateur mal + orthographis (comme dans + http://mon.serveur/~apahce/), mais seulement les noms + de fichiers ou de rpertoires.
    • + +
    • les corrections s'appliquent strictement aux fichiers + existants, si bien qu'une requte pour <Location + "/status"> pour tre traite de manire incorrecte comme + une requte pour le fichier ngoci "/stats.html".
    • +
    + + +

    mod_speling ne doit pas tre activ pour des rpertoires o DAV l'est aussi, car il va essayer de + "corriger" les noms des ressources nouvellement cres en fonction + des noms de fichiers existants ; par exemple, lors du chargement + d'un nouveau document doc43.html, il est possible qu'il + redirige vers un document existant doc34.html, ce qui + ne correspond pas ce que l'on souhaite. +

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_speling.html.ja.utf8 b/docs/manual/mod/mod_speling.html.ja.utf8 index a6eea223817..8402e078999 100644 --- a/docs/manual/mod/mod_speling.html.ja.utf8 +++ b/docs/manual/mod/mod_speling.html.ja.utf8 @@ -1,33 +1,40 @@ - -mod_speling - Apache HTTP サーバ +mod_speling - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_speling

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -70,7 +77,9 @@
  • CheckCaseOnly
  • CheckSpelling
  • - +

    Bugfix checklist

    参照

    +
    top

    CheckCaseOnly ディレクティブ

    @@ -138,10 +147,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_speling.html.ko.euc-kr b/docs/manual/mod/mod_speling.html.ko.euc-kr index 6d09ab1d31b..2748206852d 100644 --- a/docs/manual/mod/mod_speling.html.ko.euc-kr +++ b/docs/manual/mod/mod_speling.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_speling - Apache HTTP Server +mod_speling - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_speling

    @@ -62,7 +68,9 @@
  • CheckCaseOnly
  • CheckSpelling
  • -
    +

    Bugfix checklist

    +
    top

    CheckCaseOnly þ

    @@ -123,9 +131,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_speling.xml b/docs/manual/mod/mod_speling.xml index 4219c2f66c6..959b522684d 100644 --- a/docs/manual/mod/mod_speling.xml +++ b/docs/manual/mod/mod_speling.xml @@ -97,7 +97,7 @@ module directory names.
  • spelling corrections apply strictly to existing files, so - a request for the <Location /status> may + a request for the <Location "/status"> may get incorrectly treated as the negotiated file "/stats.html".
  • diff --git a/docs/manual/mod/mod_speling.xml.fr b/docs/manual/mod/mod_speling.xml.fr new file mode 100644 index 00000000000..464f00bef60 --- /dev/null +++ b/docs/manual/mod/mod_speling.xml.fr @@ -0,0 +1,139 @@ + + + + + + + + + + + +mod_speling +Tente de corriger les erreurs de casse dans les URLs ou les +fautes de frappe mineures. +Extension +mod_speling.c +speling_module + + + + + +

    Il arrive que des requêtes pour des documents ne puissent pas + être traitées par le serveur Apache de base à cause d'une erreur + de frappe ou de casse. Ce module permet de traiter ce + problème en essayant de trouver un document correspondant, même + lorsque tous les autres modules y ont renoncé. Sa méthode de travail + consiste à comparer chaque nom de document du répertoire demandé + avec le document de la requête sans tenir compte de la + casse, et en acceptant jusqu'à une erreur + (insertion, omission, inversion de caractère ou caractère + erroné). Une liste de tous les documents qui correspondent est alors + élaborée en utilisant cette stratégie.

    + +

    Si après le parcours du répertoire,

    + +
      +
    • aucun document correspondant n'a été trouvé, Apache procèdera + normalement et renverra une erreur "document non trouvé".
    • + +
    • un seul document correspondant pratiquement à la requête a + été trouvé, celui-ci est renvoyé sous la forme d'une réponse de + redirection.
    • + +
    • plusieurs documents pouvant correspondre ont été trouvés, une + liste des documents est envoyée au client afin que ce dernier + puisse sélectionner le document correct.
    • +
    + +
    + + + +CheckSpelling +Active le module de correction +CheckSpelling on|off +CheckSpelling Off + +server config +virtual host +directory +.htaccess + +Options + + +

    Cette directive permet d'activer ou de désactiver le module de + correction. Lorsqu'il est activé, rappelez-vous que :

    + +
      +
    • le parcours du répertoire nécessaire à la correction aura un + impact sur les performances du serveur lorsque de nombreuses + corrections devront être effectuées au même moment.
    • + +
    • l'arborescence ne doit pas contenir de documents + sensibles qui pourraient être considérés par erreur comme + correspondant à la requête.
    • + +
    • le module ne corrige pas les noms d'utilisateur mal + orthographiés (comme dans + http://mon.serveur/~apahce/), mais seulement les noms + de fichiers ou de répertoires.
    • + +
    • les corrections s'appliquent strictement aux fichiers + existants, si bien qu'une requête pour <Location + "/status"> pour être traitée de manière incorrecte comme + une requête pour le fichier négocié "/stats.html".
    • +
    + + +

    mod_speling ne doit pas être activé pour des répertoires où DAV l'est aussi, car il va essayer de + "corriger" les noms des ressources nouvellement créées en fonction + des noms de fichiers existants ; par exemple, lors du chargement + d'un nouveau document doc43.html, il est possible qu'il + redirige vers un document existant doc34.html, ce qui + ne correspond pas à ce que l'on souhaite. +

    +
    +
    + + +CheckCaseOnly +Limite l'action du module aux corrections de +majuscules +CheckCaseOnly on|off +CheckCaseOnly Off + +server config +virtual host +directory +.htaccess + +Options + + +

    Lorsqu'elle est définie à "on", cette directive permet de limiter + l'action du module aux inversions majuscule/minuscule. Les autres + corrections ne sont pas effectuées.

    + +
    +
    + +
    diff --git a/docs/manual/mod/mod_speling.xml.ja b/docs/manual/mod/mod_speling.xml.ja index 8ba4b273284..26d694c60b6 100644 --- a/docs/manual/mod/mod_speling.xml.ja +++ b/docs/manual/mod/mod_speling.xml.ja @@ -1,7 +1,7 @@ - + + -mod_ssl - Apache HTTP Server +mod_ssl - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_ssl

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    説明:ユーザが入力したであろう間違った URL を、 大文字小文字の区別を無視することと一つ以下の綴り間違いを許容することで 修正を試みる
    @@ -30,9 +36,8 @@ Layer (SSL) and Transport Layer Security (TLS) protocols
    Description:Strong cryptography using the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols
    SourceFile:mod_ssl.c

    Summary

    -

    This module provides SSL v2/v3 and TLS v1 support for the Apache -HTTP Server. It was contributed by Ralf S. Engelschall based on his -mod_ssl project and originally derived from work by Ben Laurie.

    +

    This module provides SSL v3 and TLS v1.x support for the Apache +HTTP Server. SSL v2 is no longer supported.

    This module relies on OpenSSL to provide the cryptography engine.

    @@ -40,7 +45,14 @@ to provide the cryptography engine.

    Further details, discussion, and examples are provided in the SSL documentation.

    -
    top

    Environment Variables

    @@ -130,7 +147,7 @@ compatibility variables.

    Description: HTTPS flag HTTPS is being used. -SSL_PROTOCOL string The SSL protocol version (SSLv2, SSLv3, TLSv1) +SSL_PROTOCOL string The SSL protocol version (SSLv3, TLSv1, TLSv1.1, TLSv1.2) SSL_SESSION_ID string The hex-encoded SSL session id SSL_SESSION_RESUMED string Initial or Resumed SSL Session. Note: multiple requests may be served over the same (Initial or Resumed) SSL session if HTTP KeepAlive is in use SSL_SECURE_RENEG string true if secure renegotiation is supported, else false @@ -145,6 +162,9 @@ compatibility variables.

    SSL_CLIENT_M_SERIAL string The serial of the client certificate SSL_CLIENT_S_DN string Subject DN in client's certificate SSL_CLIENT_S_DN_x509 string Component of client's Subject DN +SSL_CLIENT_SAN_Email_n string Client certificate's subjectAltName extension entries of type rfc822Name +SSL_CLIENT_SAN_DNS_n string Client certificate's subjectAltName extension entries of type dNSName +SSL_CLIENT_SAN_OTHER_msUPN_n string Client certificate's subjectAltName extension entries of type otherName, Microsoft User Principal Name form (OID 1.3.6.1.4.1.311.20.2.3) SSL_CLIENT_I_DN string Issuer DN of client's certificate SSL_CLIENT_I_DN_x509 string Component of client's Issuer DN SSL_CLIENT_V_START string Validity of client's certificate (start time) @@ -154,10 +174,14 @@ compatibility variables.

    SSL_CLIENT_A_KEY string Algorithm used for the public key of client's certificate SSL_CLIENT_CERT string PEM-encoded client certificate SSL_CLIENT_CERT_CHAIN_n string PEM-encoded certificates in client certificate chain +SSL_CLIENT_CERT_RFC4523_CEA string Serial number and issuer of the certificate. The format matches that of the CertificateExactAssertion in RFC4523 SSL_CLIENT_VERIFY string NONE, SUCCESS, GENEROUS or FAILED:reason SSL_SERVER_M_VERSION string The version of the server certificate SSL_SERVER_M_SERIAL string The serial of the server certificate SSL_SERVER_S_DN string Subject DN in server's certificate +SSL_SERVER_SAN_Email_n string Server certificate's subjectAltName extension entries of type rfc822Name +SSL_SERVER_SAN_DNS_n string Server certificate's subjectAltName extension entries of type dNSName +SSL_SERVER_SAN_OTHER_dnsSRV_n string Server certificate's subjectAltName extension entries of type otherName, SRVName form (OID 1.3.6.1.5.5.7.8.7, RFC 4985) SSL_SERVER_S_DN_x509 string Component of server's Subject DN SSL_SERVER_I_DN string Issuer DN of server's certificate SSL_SERVER_I_DN_x509 string Component of server's Issuer DN @@ -166,6 +190,9 @@ compatibility variables.

    SSL_SERVER_A_SIG string Algorithm used for the signature of server's certificate SSL_SERVER_A_KEY string Algorithm used for the public key of server's certificate SSL_SERVER_CERT string PEM-encoded server certificate +SSL_SRP_USER string SRP username +SSL_SRP_USERINFO string SRP user info +SSL_TLS_SNI string Contents of the SNI TLS extension (if supplied with ClientHello)

    x509 specifies a component of an X.509 DN; one of @@ -236,10 +263,11 @@ you find in the above table.

    For backward compatibility there is additionally a special ``%{name}c'' cryptography format function provided. Information about this function is provided in the Compatibility chapter.

    -

    Example

    -CustomLog logs/ssl_request_log \ - "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" -

    +

    Example

    CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    +
    +

    These formats even work without setting the StdEnvVars +option of the SSLOptions +directive.

    top
    top
    +
    +

    Expression Parser Extension

    + +

    When mod_ssl is built into Apache or at least +loaded (under DSO situation) any variables +provided by mod_ssl can be used in expressions +for the ap_expr Expression Parser. +The variables can be referenced using the syntax +``%{varname}''. Starting +with version 2.4.18 one can also use the +mod_rewrite style syntax +``%{SSL:varname}'' or +the function style syntax +``ssl(varname)''.

    +

    Example (using mod_headers)

    Header set X-SSL-PROTOCOL "expr=%{SSL_PROTOCOL}"
    +Header set X-SSL-CIPHER "expr=%{SSL:SSL_CIPHER}"
    +
    +

    This feature even works without setting the StdEnvVars +option of the SSLOptions +directive.

    top
    top
    @@ -346,11 +392,9 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    -

    Example

    -SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/ -

    +contains the appropriate symbolic links.

    +

    Example

    SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
    +
    top
    @@ -387,9 +431,8 @@ directives.

    specify an all-in-one file containing a concatenation of PEM-encoded CA certificates.

    -

    Example

    -SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt -

    +

    Example

    SSLCADNRequestFile "/usr/local/apache2/conf/ca-names.crt"
    +
    top
    @@ -412,23 +455,22 @@ details.

    through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure -this directory contains the appropriate symbolic links. Use the -Makefile which comes with mod_ssl to accomplish this -task.

    -

    Example

    -SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/ -

    +this directory contains the appropriate symbolic links.

    +

    Example

    SSLCADNRequestPath "/usr/local/apache2/conf/ca-names.crt/"
    +
    top

    SSLCARevocationCheck Directive

    - + +
    Description:Enable CRL-based revocation checking
    Syntax:SSLCARevocationCheck chain|leaf|none
    Syntax:SSLCARevocationCheck chain|leaf|none flags
    Default:SSLCARevocationCheck none
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Optional flags available in httpd 2.5-dev or +later

    Enables certificate revocation list (CRL) checking. At least one of @@ -438,23 +480,32 @@ configured. When set to chain (recommended setting), CRL checks are applied to all certificates in the chain, while setting it to leaf limits the checks to the end-entity cert.

    -
    -

    When set to chain or leaf, -CRLs must be available for successful validation

    -

    -Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when -no CRL(s) were found in any of the locations configured with -SSLCARevocationFile -or SSLCARevocationPath. -With the introduction of this directive, the behavior has been changed: -when checking is enabled, CRLs must be present for the validation -to succeed - otherwise it will fail with an -"unable to get certificate CRL" error. -

    +

    The available flags are:

    +
      +
    • no_crl_for_cert_ok +

      + Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when + no CRL(s) for the checked certificate(s) were found in any of the locations + configured with SSLCARevocationFile + or SSLCARevocationPath. +

      +

      + With the introduction of SSLCARevocationFile, + the behavior has been changed: by default with chain or + leaf, CRLs must be present for the + validation to succeed - otherwise it will fail with an + "unable to get certificate CRL" error. +

      +

      + The flag no_crl_for_cert_ok allows to restore + previous behaviour. +

      +
    • +
    +

    Example

    SSLCARevocationCheck chain
    +
    +

    Compatibility with versions 2.2

    SSLCARevocationCheck chain no_crl_for_cert_ok
    -

    Example

    -SSLCARevocationCheck chain -

    top
    @@ -474,9 +525,8 @@ Authorities (CA) whose clients you deal with. These are used for Client Authentication. Such a file is simply the concatenation of the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally to SSLCARevocationPath.

    -

    Example

    -SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl -

    +

    Example

    SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl"
    +
    top
    @@ -498,11 +548,9 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-value.rN. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    -

    Example

    -SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/ -

    +contains the appropriate symbolic links.

    +

    Example

    SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
    +
    top
    @@ -514,6 +562,13 @@ SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/ Status:Extension Module:mod_ssl +

    SSLCertificateChainFile is deprecated

    +

    SSLCertificateChainFile became obsolete with version 2.4.8, +when SSLCertificateFile +was extended to also load intermediate CA certificates from the server +certificate file.

    +
    +

    This directive sets the optional all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the @@ -537,57 +592,139 @@ But be careful: Providing the certificate chain works only if you are using a using a coupled RSA+DSA certificate pair, this will work only if actually both certificates use the same certificate chain. Else the browsers will be confused in this situation.

    -

    Example

    -SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt -

    +

    Example

    SSLCertificateChainFile "/usr/local/apache2/conf/ssl.crt/ca.crt"
    +
    top

    SSLCertificateFile Directive

    - +
    Description:Server PEM-encoded X.509 Certificate file
    Description:Server PEM-encoded X.509 certificate data file
    Syntax:SSLCertificateFile file-path
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl

    -This directive points to the PEM-encoded Certificate file for the server and -optionally also to the corresponding RSA or DSA Private Key file for it -(contained in the same file). If the contained Private Key is encrypted the -Pass Phrase dialog is forced at startup time. This directive can be used up to -two times (referencing different filenames) when both a RSA and a DSA based -server certificate is used in parallel.

    -

    Example

    -SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt -

    +This directive points to a file with certificate data in PEM format. +At a minimum, the file must include an end-entity (leaf) certificate. +The directive can be used multiple times (referencing different filenames) +to support multiple algorithms for server authentication - typically +RSA, DSA, and ECC. The number of supported algorithms depends on the +OpenSSL version being used for mod_ssl: with version 1.0.0 or later, +openssl list-public-key-algorithms will output a list +of supported algorithms, see also the note below about limitations +of OpenSSL versions prior to 1.0.2 and the ways to work around them. +

    + +

    +The files may also include intermediate CA certificates, sorted from +leaf to root. This is supported with version 2.4.8 and later, +and obsoletes SSLCertificateChainFile. +When running with OpenSSL 1.0.2 or later, this allows +to configure the intermediate CA chain on a per-certificate basis. +

    + +

    +Custom DH parameters and an EC curve name for ephemeral keys, +can also be added to end of the first file configured using +SSLCertificateFile. +This is supported in version 2.4.7 or later. +Such parameters can be generated using the commands +openssl dhparam and openssl ecparam. +The parameters can be added as-is to the end of the first +certificate file. Only the first file can be used for custom +parameters, as they are applied independently of the authentication +algorithm type. +

    + +

    +Finally the end-entity certificate's private key can also be +added to the certificate file instead of using a separate +SSLCertificateKeyFile +directive. This practice is highly discouraged. If it is used, +the certificate files using such an embedded key must be configured +after the certificates using a separate key file. If the private +key is encrypted, the pass phrase dialog is forced at startup time. +

    + +
    +

    DH parameter interoperability with primes > 1024 bit

    +

    +Beginning with version 2.4.7, mod_ssl makes use of +standardized DH parameters with prime lengths of 2048, 3072 and 4096 bits +and with additional prime lengths of 6144 and 8192 bits beginning with +version 2.4.10 +(from RFC 3526), and hands +them out to clients based on the length of the certificate's RSA/DSA key. +With Java-based clients in particular (Java 7 or earlier), this may lead +to handshake failures - see this +FAQ answer for working around +such issues. +

    +
    + +
    +

    Default DH parameters when using multiple certificates and OpenSSL +versions prior to 1.0.2

    +

    +When using multiple certificates to support different authentication algorithms +(like RSA, DSA, but mainly ECC) and OpenSSL prior to 1.0.2, it is recommended +to either use custom DH parameters (preferably) by adding them to the +first certificate file (as described above), or to order the +SSLCertificateFile directives such that RSA/DSA +certificates are placed after the ECC one. +

    +

    +This is due to a limitation in older versions of OpenSSL which don't let the +Apache HTTP Server determine the currently selected certificate at handshake +time (when the DH parameters must be sent to the peer) but instead always +provide the last configured certificate. Consequently, the server may select +default DH parameters based on the length of the wrong certificate's key (ECC +keys are much smaller than RSA/DSA ones and their length is not relevant for +selecting DH primes). +

    +

    +Since custom DH parameters always take precedence over the default ones, this +issue can be avoided by creating and configuring them (as described above), +thus using a custom/suitable length. +

    +
    + +

    Example

    SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt"
    +
    top

    SSLCertificateKeyFile Directive

    - +
    Description:Server PEM-encoded Private Key file
    Description:Server PEM-encoded private key file
    Syntax:SSLCertificateKeyFile file-path
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl

    -This directive points to the PEM-encoded Private Key file for the -server. If the Private Key is not combined with the Certificate in the -SSLCertificateFile, use this additional directive to -point to the file with the stand-alone Private Key. When -SSLCertificateFile is used and the file -contains both the Certificate and the Private Key this directive need -not be used. But we strongly discourage this practice. Instead we -recommend you to separate the Certificate and the Private Key. If the -contained Private Key is encrypted, the Pass Phrase dialog is forced -at startup time. This directive can be used up to two times -(referencing different filenames) when both a RSA and a DSA based -private key is used in parallel.

    -

    Example

    -SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key -

    +This directive points to the PEM-encoded private key file for the +server. If the contained private key is encrypted, the pass phrase +dialog is forced at startup time.

    + +

    +The directive can be used multiple times (referencing different filenames) +to support multiple algorithms for server authentication. For each +SSLCertificateKeyFile +directive, there must be a matching SSLCertificateFile +directive.

    + +

    +The private key may also be combined with the certificate in the file given by +SSLCertificateFile, but this practice +is highly discouraged. If it is used, the certificate files using such +an embedded key must be configured after the certificates using a separate +key file.

    + +

    Example

    SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
    +
    top
    @@ -616,23 +753,24 @@ An SSL cipher specification in cipher-spec is composed of 4 major attributes plus a few extra minor ones:

    • Key Exchange Algorithm:
      - RSA or Diffie-Hellman variants. + RSA, Diffie-Hellman, Elliptic Curve Diffie-Hellman, Secure Remote Password
    • Authentication Algorithm:
      - RSA, Diffie-Hellman, DSS or none. + RSA, Diffie-Hellman, DSS, ECDSA, or none.
    • Cipher/Encryption Algorithm:
      - DES, Triple-DES, RC4, RC2, IDEA or none. + AES, DES, Triple-DES, RC4, RC2, IDEA, etc.
    • MAC Digest Algorithm:
      - MD5, SHA or SHA1. + MD5, SHA or SHA1, SHA256, SHA384.
    -

    An SSL cipher can also be an export cipher and is either an SSLv2 or SSLv3/TLSv1 -cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use, -one can either specify all the Ciphers, one at a time, or use aliases to -specify the preference and order for the ciphers (see Table -1).

    +

    An SSL cipher can also be an export cipher. SSLv2 ciphers are no longer +supported. To specify which ciphers to use, one can either specify all the +Ciphers, one at a time, or use aliases to specify the preference and order +for the ciphers (see Table +1). The actually available ciphers and aliases depends on the used +openssl version. Newer openssl versions may include additional ciphers.

    @@ -642,24 +780,28 @@ specify the preference and order for the ciphers (see Table + - - - - - - + + + + + + + + - + + + - @@ -671,67 +813,70 @@ specify the preference and order for the ciphers (see Table + + + - + +
    kDHr Diffie-Hellman key exchange with RSA key
    kDHd Diffie-Hellman key exchange with DSA key
    kEDH Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)
    kSRP Secure Remote Password (SRP) key exchange
    Authentication Algorithm:
    aNULL No authentication
    aRSA RSA authentication
    aDSS DSS authentication
    aDH Diffie-Hellman authentication
    Cipher Encoding Algorithm:
    eNULL No encoding
    DES DES encoding
    3DES Triple-DES encoding
    RC4 RC4 encoding
    RC2 RC2 encoding
    IDEA IDEA encoding
    eNULL No encryption
    NULL alias for eNULL
    AES AES encryption
    DES DES encryption
    3DES Triple-DES encryption
    RC4 RC4 encryption
    RC2 RC2 encryption
    IDEA IDEA encryption
    MAC Digest Algorithm:
    MD5 MD5 hash function
    SHA1 SHA1 hash function
    SHA SHA hash function
    SHA alias for SHA1
    SHA256 SHA256 hash function
    SHA384 SHA384 hash function
    Aliases:
    SSLv2 all SSL version 2.0 ciphers
    SSLv3 all SSL version 3.0 ciphers
    TLSv1 all TLS version 1.0 ciphers
    EXP all export ciphers
    RSA all ciphers using RSA key exchange
    DH all ciphers using Diffie-Hellman key exchange
    EDH all ciphers using Ephemeral Diffie-Hellman key exchange
    ECDH Elliptic Curve Diffie-Hellman key exchange
    ADH all ciphers using Anonymous Diffie-Hellman key exchange
    AECDH all ciphers using Anonymous Elliptic Curve Diffie-Hellman key exchange
    SRP all ciphers using Secure Remote Password (SRP) key exchange
    DSS all ciphers using DSS authentication
    NULL all ciphers using no encryption
    ECDSA all ciphers using ECDSA authentication
    aNULL all ciphers using no authentication

    Now where this becomes interesting is that these can be put together to specify the order and ciphers you wish to use. To speed this up -there are also aliases (SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM, +there are also aliases (SSLv3, TLSv1, EXP, LOW, MEDIUM, HIGH) for certain groups of ciphers. These tags can be joined together with prefixes to form the cipher-spec. Available prefixes are:

    • none: add cipher to list
    • -
    • +: add ciphers to list and pull them to current location in list
    • +
    • +: move matching ciphers to the current location in list
    • -: remove cipher from list (can be added later again)
    • !: kill cipher from list completely (can not be added later again)
    + +
    +

    aNULL, eNULL and EXP +ciphers are always disabled

    +

    Beginning with version 2.4.7, null and export-grade +ciphers are always disabled, as mod_ssl unconditionally adds +!aNULL:!eNULL:!EXP to any cipher string at initialization.

    +
    +

    A simpler way to look at all of this is to use the ``openssl ciphers -v'' command which provides a nice way to successively create the correct cipher-spec string. The default cipher-spec string depends on the version of the OpenSSL libraries used. Let's suppose it is -``ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'' which -means the following: first, remove from consideration any ciphers that do not -authenticate, i.e. for SSL the Anonymous Diffie-Hellman ciphers. Next, -use ciphers using RC4 and RSA. Next include the high, medium and then the low -security ciphers. Finally pull all SSLv2 and export ciphers to the -end of the list.

    -
    -$ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
    -NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
    -NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
    -EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
    +``RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'' which
    +means the following: Put RC4-SHA and AES128-SHA at
    +the beginning. We do this, because these ciphers offer a good compromise
    +between speed and security. Next, include high and medium security ciphers.
    +Finally, remove all ciphers which do not authenticate, i.e. for SSL the
    +Anonymous Diffie-Hellman ciphers, as well as all ciphers which use
    +MD5 as hash algorithm, because it has been proven insufficient.

    +
    $ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'
    +RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=SHA1
    +AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
    +DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
     ...                     ...               ...     ...           ...
    -EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
    -EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
    -EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
    -
    +SEED-SHA SSLv3 Kx=RSA Au=RSA Enc=SEED(128) Mac=SHA1 +PSK-RC4-SHA SSLv3 Kx=PSK Au=PSK Enc=RC4(128) Mac=SHA1 +KRB5-RC4-SHA SSLv3 Kx=KRB5 Au=KRB5 Enc=RC4(128) Mac=SHA1

    The complete list of particular RSA & DH ciphers for SSL is given in Table 2.

    -

    Example

    -SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW -

    +

    Example

    SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
    +
    - - - - - - - - @@ -748,6 +893,26 @@ SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
    Cipher-Tag Protocol Key Ex. Auth. Enc. MAC Type
    RSA Ciphers:
    DES-CBC3-SHA SSLv3 RSA RSA 3DES(168) SHA1
    DES-CBC3-MD5 SSLv2 RSA RSA 3DES(168) MD5
    IDEA-CBC-SHA SSLv3 RSA RSA IDEA(128) SHA1
    RC4-SHA SSLv3 RSA RSA RC4(128) SHA1
    RC4-MD5 SSLv3 RSA RSA RC4(128) MD5
    IDEA-CBC-MD5 SSLv2 RSA RSA IDEA(128) MD5
    RC2-CBC-MD5 SSLv2 RSA RSA RC2(128) MD5
    RC4-MD5 SSLv2 RSA RSA RC4(128) MD5
    DES-CBC-SHA SSLv3 RSA RSA DES(56) SHA1
    RC4-64-MD5 SSLv2 RSA RSA RC4(64) MD5
    DES-CBC-MD5 SSLv2 RSA RSA DES(56) MD5
    EXP-DES-CBC-SHA SSLv3 RSA(512) RSA DES(40) SHA1 export
    EXP-RC2-CBC-MD5 SSLv3 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv3 RSA(512) RSA RC4(40) MD5 export
    EXP-RC2-CBC-MD5 SSLv2 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv2 RSA(512) RSA RC4(40) MD5 export
    NULL-SHA SSLv3 RSA RSA None SHA1
    NULL-MD5 SSLv3 RSA RSA None MD5
    Diffie-Hellman Ciphers:
    EXP-ADH-RC4-MD5 SSLv3 DH(512) None RC4(40) MD5 export
    + +
    top
    +

    SSLCompression Directive

    + + + + + + + + +
    Description:Enable compression on the SSL level
    Syntax:SSLCompression on|off
    Default:SSLCompression off
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.3 and later, if using OpenSSL 0.9.8 or later; +virtual host scope available if using OpenSSL 1.0.0 or later. +The default used to be on in version 2.4.3.
    +

    This directive allows to enable compression on the SSL level.

    +
    +

    Enabling compression causes security issues in most setups (the so called +CRIME attack).

    +
    +
    top

    SSLCryptoDevice Directive

    @@ -769,10 +934,9 @@ separate "-engine" releases of OpenSSL 0.9.6 must be used.

    To discover which engine names are supported, run the command "openssl engine".

    -

    Example

    -# For a Broadcom accelerator:
    -SSLCryptoDevice ubsec -

    +

    Example

    # For a Broadcom accelerator:
    +SSLCryptoDevice ubsec
    +
    top
    @@ -790,12 +954,11 @@ This directive toggles the usage of the SSL/TLS Protocol Engine. This is should be used inside a <VirtualHost> section to enable SSL/TLS for a that virtual host. By default the SSL/TLS Protocol Engine is disabled for both the main server and all configured virtual hosts.

    -

    Example

    -<VirtualHost _default_:443>
    -SSLEngine on
    -...
    -</VirtualHost> -

    +

    Example

    <VirtualHost _default_:443>
    +SSLEngine on
    +#...
    +</VirtualHost>
    +

    In Apache 2.1 and later, SSLEngine can be set to optional. This enables support for RFC 2817, Upgrading to TLS @@ -834,25 +997,24 @@ by the applicable Security Policy.

    SSLHonorCipherOrder Directive

    - + + -
    Description:Option to prefer the server's cipher preference order
    Syntax:SSLHonorCipherOrder flag
    Syntax:SSLHonorCipherOrder on|off
    Default:SSLHonorCipherOrder off
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in Apache 2.1 and later, if using OpenSSL 0.9.7 or later

    When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead.

    -

    Example

    -SSLHonorCipherOrder on -

    +

    Example

    SSLHonorCipherOrder on
    +
    top

    SSLInsecureRenegotiation Directive

    - + @@ -880,9 +1042,8 @@ the Man-in-the-Middle prefix attack as described in CVE-2009-3555.

    -

    Example

    -SSLInsecureRenegotiation on -

    +

    Example

    SSLInsecureRenegotiation on
    +

    The SSL_SECURE_RENEG environment variable can be used from an SSI or CGI script to determine whether secure renegotiation is @@ -898,7 +1059,6 @@ supported for a given SSL connection.

    -
    Description:Option to enable support for insecure renegotiation
    Syntax:SSLInsecureRenegotiation flag
    Syntax:SSLInsecureRenegotiation on|off
    Default:SSLInsecureRenegotiation off
    Context:server config, virtual host
    Status:Extension
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the default OCSP responder to use. If SSLOCSPOverrideResponder is not enabled, the URI given will be used only if no responder URI is specified in @@ -909,11 +1069,11 @@ the certificate being verified.

    SSLOCSPEnable Directive

    - + + -
    Description:Enable OCSP validation of the client certificate chain
    Syntax:SSLOCSPEnable flag
    Syntax:SSLOCSPEnable on|off
    Default:SSLOCSPEnable off
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option enables OCSP validation of the client certificate chain. If this option is enabled, certificates in the client's @@ -926,28 +1086,41 @@ itself, or derived by configuration; see the SSLOCSPOverrideResponder directives.

    -

    Example

    -SSLVerifyClient on
    -SSLOCSPEnable on
    -SSLOCSPDefaultResponder http://responder.example.com:8888/responder
    -SSLOCSPOverrideResponder on -

    +

    Example

    SSLVerifyClient on
    +SSLOCSPEnable on
    +SSLOCSPDefaultResponder "http://responder.example.com:8888/responder"
    +SSLOCSPOverrideResponder on
    +
    top

    SSLOCSPOverrideResponder Directive

    - + + -
    Description:Force use of the default responder URI for OCSP validation
    Syntax:SSLOCSPOverrideResponder flag
    Syntax:SSLOCSPOverrideResponder on|off
    Default:SSLOCSPOverrideResponder off
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option forces the configured default OCSP responder to be used during OCSP certificate validation, regardless of whether the certificate being validated references an OCSP responder.

    +
    +
    top
    +

    SSLOCSPProxyURL Directive

    + + + + + + + +
    Description:Proxy URL to use for OCSP requests
    Syntax:SSLOCSPProxyURL url
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.19 and later
    +

    This option allows to set the URL of a HTTP proxy that should be used for +all queries to OCSP responders.

    +
    top

    SSLOCSPResponderTimeout Directive

    @@ -958,7 +1131,6 @@ certificate being validated references an OCSP responder.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the timeout for queries to OCSP responders, when SSLOCSPEnable is turned on.

    @@ -973,7 +1145,6 @@ certificate being validated references an OCSP responder.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the maximum allowable age ("freshness") for OCSP responses. The default value (-1) does not enforce a maximum age, @@ -990,11 +1161,63 @@ which means that OCSP responses are considered valid as long as their Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the maximum allowable time skew for OCSP responses (when checking their thisUpdate and nextUpdate fields).

    +
    +
    top
    +

    SSLOCSPUseRequestNonce Directive

    + + + + + + + + +
    Description:Use a nonce within OCSP queries
    Syntax:SSLOCSPUseRequestNonce on|off
    Default:SSLOCSPUseRequestNonce on
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.10 and later
    +

    This option determines whether queries to OCSP responders should contain +a nonce or not. By default, a query nonce is always used and checked against +the response's one. When the responder does not use nonces (e.g. Microsoft OCSP +Responder), this option should be turned off.

    + +
    +
    top
    +

    SSLOpenSSLConfCmd Directive

    + + + + + + + +
    Description:Configure OpenSSL parameters through its SSL_CONF API
    Syntax:SSLOpenSSLConfCmd command-name command-value
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.8 and later, if using OpenSSL 1.0.2 or later
    +

    This directive exposes OpenSSL's SSL_CONF API to mod_ssl, +allowing a flexible configuration of OpenSSL parameters without the need +of implementing additional mod_ssl directives when new +features are added to OpenSSL.

    + +

    The set of available SSLOpenSSLConfCmd commands +depends on the OpenSSL version being used for mod_ssl +(at least version 1.0.2 is required). For a list of supported command +names, see the section Supported configuration file commands in the +SSL_CONF_cmd(3) manual page for OpenSSL.

    + +

    Some of the SSLOpenSSLConfCmd commands can be used +as an alternative to existing directives (such as +SSLCipherSuite or +SSLProtocol), +though it should be noted that the syntax / allowable values for the parameters +may sometimes differ.

    + +

    Examples

    SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference
    +SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1
    +SSLOpenSSLConfCmd ServerInfoFile "/usr/local/apache2/conf/server-info.pem"
    +SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2"
    +SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256
    +
    +
    top

    SSLOptions Directive

    @@ -1053,6 +1276,11 @@ The available options are:

    word `password''. Those who live under MD5-based encryption (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5 hash of the same word: ``$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/''.

    + +

    Note that the AuthBasicFake + directive within mod_auth_basic can be used as a more + general mechanism for faking basic authentication, giving control over the + structure of both the username and password.

  • StrictRequire

    @@ -1076,7 +1304,7 @@ The available options are:

    SSL parameters causes a full SSL renegotiation handshake. When this option is used mod_ssl tries to avoid unnecessary handshakes by doing more granular (but still safe) parameter checks. Nevertheless these granular - checks sometimes maybe not what the user expects, so enable this on a + checks sometimes may not be what the user expects, so enable this on a per-directory basis only, please.

  • LegacyDNStringFormat @@ -1095,12 +1323,11 @@ The available options are:

  • -

    Example

    -SSLOptions +FakeBasicAuth -StrictRequire
    -<Files ~ "\.(cgi|shtml)$">
    - SSLOptions +StdEnvVars -ExportCertData
    -<Files> -

    +

    Example

    SSLOptions +FakeBasicAuth -StrictRequire
    +<Files ~ "\.(cgi|shtml)$">
    +    SSLOptions +StdEnvVars -ExportCertData
    +</Files>
    +
    top
    @@ -1159,12 +1386,17 @@ query can be done in two ways which can be configured by Here an external program is configured which is called at startup for each encrypted Private Key file. It is called with two arguments (the first is of the form ``servername:portnumber'', the second is either - ``RSA'' or ``DSA''), which indicate for which - server and algorithm it has to print the corresponding Pass Phrase to - stdout. The intent is that this external program first runs - security checks to make sure that the system is not compromised by an - attacker, and only when these checks were passed successfully it provides - the Pass Phrase.

    + ``RSA'', ``DSA'', ``ECC'' or an + integer index starting at 3 if more than three keys are configured), which + indicate for which server and algorithm it has to print the corresponding + Pass Phrase to stdout. In versions 2.4.8 (unreleased) + and 2.4.9, it is called with one argument, a string of the + form ``servername:portnumber:index'' (with index + being a zero-based integer number), which indicate the server, TCP port + and certificate number. The intent is that this external + program first runs security checks to make sure that the system is not + compromised by an attacker, and only when these checks were passed + successfully it provides the Pass Phrase.

    Both these security checks, and the way the Pass Phrase is determined, can be as complex as you like. Mod_ssl just defines the interface: an @@ -1176,57 +1408,60 @@ query can be done in two ways which can be configured by The reuse-algorithm above is used here, too. In other words: The external program is called only once per unique Pass Phrase.

    -

    Example

    -SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter -

    +

    Example

    SSLPassPhraseDialog "exec:/usr/local/apache/sbin/pp-filter"
    +
    top

    SSLProtocol Directive

    - + - +
    Description:Configure usable SSL protocol versions
    Description:Configure usable SSL/TLS protocol versions
    Syntax:SSLProtocol [+|-]protocol ...
    Default:SSLProtocol all
    Default:SSLProtocol all -SSLv3 (up to 2.4.16: all)
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl

    -This directive can be used to control which versions of the SSL protocol +This directive can be used to control which versions of the SSL/TLS protocol will be accepted in new connections.

    The available (case-insensitive) protocols are:

      -
    • SSLv2 -

      - This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the - original SSL protocol as designed by Netscape Corporation. Though it's - use has been deprecated, because of weaknesses in the security of the protocol.

    • -
    • SSLv3

      This is the Secure Sockets Layer (SSL) protocol, version 3.0, from the Netscape Corporation. - It is the successor to SSLv2 and the predecessor to TLSv1. It's supported by - almost all popular browsers.

    • + It is the successor to SSLv2 and the predecessor to TLSv1, but is + deprecated in RFC 7568.

    • TLSv1

      - This is the Transport Layer Security (TLS) protocol, version 1.0. It is the - successor to SSLv3 and is defined in RFC2246. - Which has been obsoleted by RFC4346.

    • + This is the Transport Layer Security (TLS) protocol, version 1.0. + It is the successor to SSLv3 and is defined in + RFC 2246. + It is supported by nearly every client.

      -
    • All +
    • TLSv1.1 (when using OpenSSL 1.0.1 and later)

      - This is a shortcut for ``+SSLv2 +SSLv3 +TLSv1'' and a - convenient way for enabling all protocols except one when used in - combination with the minus sign on a protocol as the example above - shows.

    • + A revision of the TLS 1.0 protocol, as defined in + RFC 4346.

      + +
    • TLSv1.2 (when using OpenSSL 1.0.1 and later) +

      + A revision of the TLS 1.1 protocol, as defined in + RFC 5246.

    • + +
    • all +

      + This is a shortcut for ``+SSLv3 +TLSv1'' or + - when using OpenSSL 1.0.1 and later - + ``+SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2'', respectively + (except for OpenSSL versions compiled with the ``no-ssl3'' configuration + option, where all does not include +SSLv3).

    -

    Example

    -# enable SSLv3 and TLSv1, but not SSLv2
    -SSLProtocol all -SSLv2 -

    +

    Example

    SSLProtocol TLSv1
    +
    top
    @@ -1246,9 +1481,8 @@ with. These are used for Remote Server Authentication. Such a file is simply the concatenation of the various PEM-encoded Certificate files, in order of preference. This can be used alternatively and/or additionally to SSLProxyCACertificatePath.

    -

    Example

    -SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt -

    +

    Example

    SSLProxyCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt"
    +
    top
    @@ -1270,11 +1504,9 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    -

    Example

    -SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/ -

    +contains the appropriate symbolic links.

    +

    Example

    SSLProxyCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
    +
    top
    @@ -1310,9 +1542,8 @@ to succeed - otherwise it will fail with an "unable to get certificate CRL" error.

    -

    Example

    -SSLProxyCARevocationCheck chain -

    +

    Example

    SSLProxyCARevocationCheck chain
    +
    top
    @@ -1332,9 +1563,8 @@ Authorities (CA) whose remote servers you deal with. These are used for Remote Server Authentication. Such a file is simply the concatenation of the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally to SSLProxyCARevocationPath.

    -

    Example

    -SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl -

    +

    Example

    SSLProxyCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl"
    +
    top
    @@ -1356,17 +1586,15 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-value.rN. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    -

    Example

    -SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/ -

    +contains the appropriate symbolic links.

    +

    Example

    SSLProxyCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
    +
    top

    SSLProxyCheckPeerCN Directive

    - @@ -1375,13 +1603,33 @@ SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/
    Description:Whether to check the remote server certificates CN field +
    Description:Whether to check the remote server certificate's CN field
    Syntax:SSLProxyCheckPeerCN on|off
    Default:SSLProxyCheckPeerCN on
    Module:mod_ssl

    -This directive sets whether the remote server certificates CN field is +This directive sets whether the remote server certificate's CN field is compared against the hostname of the request URL. If both are not equal -a 502 status code (Bad Gateway) is sent. +a 502 status code (Bad Gateway) is sent. SSLProxyCheckPeerCN is +superseded by SSLProxyCheckPeerName +in release 2.4.5 and later.

    -

    Example

    -SSLProxyCheckPeerCN on -

    +

    +In all releases 2.4.5 through 2.4.20, setting +SSLProxyCheckPeerName off was sufficient to enable this behavior +(as the SSLProxyCheckPeerCN default was on.) In +these releases, both directives must be set to off to completely +avoid remote server certificate name validation. Many users reported this +to be very confusing. +

    +

    +As of release 2.4.21, all configurations which enable either one of the +SSLProxyCheckPeerName or SSLProxyCheckPeerCN options +will use the new SSLProxyCheckPeerName +behavior, and all configurations which disable either one of the +SSLProxyCheckPeerName or SSLProxyCheckPeerCN options +will supress all remote server certificate name validation. Only the following +configuration will trigger the legacy certificate CN comparison in 2.4.21 and +later releases; +

    +

    Example

    SSLProxyCheckPeerCN on
    +SSLProxyCheckPeerName off
    +
    top
    @@ -1400,9 +1648,48 @@ This directive sets whether it is checked if the remote server certificate is expired or not. If the check fails a 502 status code (Bad Gateway) is sent.

    -

    Example

    -SSLProxyCheckPeerExpire on -

    +

    Example

    SSLProxyCheckPeerExpire on
    +
    + + +
    top
    +

    SSLProxyCheckPeerName Directive

    + + + + + + + + +
    Description:Configure host name checking for remote server certificates +
    Syntax:SSLProxyCheckPeerName on|off
    Default:SSLProxyCheckPeerName on
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Apache HTTP Server 2.4.5 and later
    +

    +This directive configures host name checking for server certificates when +mod_ssl is acting as an SSL client. The check will succeed if the host name +from the request URI matches one of the CN attribute(s) of the certificate's +subject, or matches the subjectAltName extension. If the check fails, the SSL +request is aborted and a 502 status code (Bad Gateway) is returned. +

    +

    +Wildcard matching is supported for specific cases: an subjectAltName entry +of type dNSName, or CN attributes starting with *. will match +with any host name of the same number of name elements and the same suffix. +E.g. *.example.org will match foo.example.org, +but will not match foo.bar.example.org, because the number of +elements in the respective host names differs. +

    +

    +This feature was introduced in 2.4.5 and superseded the behavior of the +SSLProxyCheckPeerCN directive, which +only tested the exact value in the first CN attribute against the host name. +However, many users were confused by the behavior of using these directives +individually, so the mutual behavior of SSLProxyCheckPeerName +and SSLProxyCheckPeerCN directives were improved in release +2.4.21. See the SSLProxyCheckPeerCN +directive description for the original behavior and details of these +improvements. +

    top
    @@ -1411,13 +1698,14 @@ SSLProxyCheckPeerExpire on Description:Cipher Suite available for negotiation in SSL proxy handshake Syntax:SSLProxyCipherSuite cipher-spec -Default:SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP +Default:SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP Context:server config, virtual host, directory, .htaccess Override:AuthConfig Status:Extension Module:mod_ssl -

    Equivalent to SSLCipherSuite, but for the proxy connection. +

    Equivalent to SSLCipherSuite, but +for the proxy connection. Please refer to SSLCipherSuite for additional information.

    @@ -1436,13 +1724,20 @@ for additional information.

    This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This is usually used inside a <VirtualHost> section to enable SSL/TLS for proxy usage in a particular virtual host. By default the SSL/TLS Protocol Engine is -disabled for proxy image both for the main server and all configured virtual hosts.

    -

    Example

    -<VirtualHost _default_:443>
    -SSLProxyEngine on
    -...
    -</VirtualHost> -

    +disabled for proxy both for the main server and all configured virtual hosts.

    + +

    Note that the SSLProxyEngine directive should not, in +general, be included in a virtual host that will be acting as a +forward proxy (using <Proxy> +or ProxyRequests directives). +SSLProxyEngine is not required to enable a forward proxy +server to proxy SSL/TLS requests.

    + +

    Example

    <VirtualHost _default_:443>
    +    SSLProxyEngine on
    +    #...
    +</VirtualHost>
    +
    top
    @@ -1468,12 +1763,11 @@ be examined and a chain of trust will be constructed.

    Security warning

    If this directive is enabled, all of the certificates in the file will be -trusted as if they were also in +trusted as if they were also in SSLProxyCACertificateFile.

    -

    Example

    -SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pem -

    +

    Example

    SSLProxyMachineCertificateChainFile "/usr/local/apache2/conf/ssl.crt/proxyCA.pem"
    +
    top
    @@ -1498,9 +1792,8 @@ or additionally to SSLProxyMachineCertificatePath.

    Currently there is no support for encrypted private keys

    -

    Example

    -SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem -

    +

    Example

    SSLProxyMachineCertificateFile "/usr/local/apache2/conf/ssl.crt/proxy.pem"
    +
    top
    @@ -1520,15 +1813,12 @@ keys used for authentication of the proxy server to remote servers.

    The files in this directory must be PEM-encoded and are accessed through hash filenames. Additionally, you must create symbolic links named hash-value.N. And you should always make sure this -directory contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task. -

    +directory contains the appropriate symbolic links.

    Currently there is no support for encrypted private keys

    -

    Example

    -SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/ -

    +

    Example

    SSLProxyMachineCertificatePath "/usr/local/apache2/conf/proxy.crt/"
    +
    top
    @@ -1536,7 +1826,7 @@ SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/ - + @@ -1584,9 +1874,8 @@ The following levels are available for level:

    optional doesn't work with all servers and level optional_no_ca is actually against the idea of authentication (but can be used to establish SSL test pages, etc.)

    -

    Example

    -SSLProxyVerify require -

    +

    Example

    SSLProxyVerify require
    +
    top
    @@ -1611,9 +1900,8 @@ remote server certificates are accepted only, the default depth of 1 means the remote server certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is under SSLProxyCACertificatePath), etc.

    -

    Example

    -SSLProxyVerifyDepth 10 -

    +

    Example

    SSLProxyVerifyDepth 10
    +
    top
    @@ -1637,7 +1925,7 @@ in the global server context because the PRNG is a global facility.

    The following source variants are available:

    • builtin -

      This is the always available builtin seeding source. It's usage +

      This is the always available builtin seeding source. Its usage consumes minimum CPU cycles under runtime and hence can be always used without drawbacks. The source used for seeding the PRNG contains of the current time, the current process id and (when applicable) a randomly @@ -1667,16 +1955,7 @@ The following source variants are available:

      can take a long time). Here using an existing /dev/urandom is better, because it never blocks and actually gives the amount of requested data. The drawback is just that the quality of the received data may not - be the best.

      -

      - On some platforms like FreeBSD one can even control how the entropy is - actually generated, i.e. by which system interrupts. More details one can - find under rndcontrol(8) on those platforms. Alternatively, when - your system lacks such a random device, you can use tool - like EGD - (Entropy Gathering Daemon) and run it's client program with the - exec:/path/to/program/ variant (see below) or use - egd:/path/to/egd-socket (see below).

    • + be the best.

    • exec:/path/to/program

      @@ -1700,15 +1979,14 @@ The following source variants are available:

      /crypto/) to seed the PRNG. Use this if no random device exists on your platform.

    -

    Example

    -SSLRandomSeed startup builtin
    -SSLRandomSeed startup file:/dev/random
    -SSLRandomSeed startup file:/dev/urandom 1024
    -SSLRandomSeed startup exec:/usr/local/bin/truerand 16
    -SSLRandomSeed connect builtin
    -SSLRandomSeed connect file:/dev/random
    -SSLRandomSeed connect file:/dev/urandom 1024
    -

    +

    Example

    SSLRandomSeed startup builtin
    +SSLRandomSeed startup "file:/dev/random"
    +SSLRandomSeed startup "file:/dev/urandom" 1024
    +SSLRandomSeed startup "exec:/usr/local/bin/truerand" 16
    +SSLRandomSeed connect builtin
    +SSLRandomSeed connect "file:/dev/random"
    +SSLRandomSeed connect "file:/dev/urandom" 1024
    +
    top
    @@ -1736,9 +2014,8 @@ will be untrusted so a denial of service attack by consumption of memory must be considered when changing this configuration setting.

    -

    Example

    -SSLRenegBufferSize 262144 -

    +

    Example

    SSLRenegBufferSize 262144
    +
    top
    @@ -1752,6 +2029,28 @@ boolean expression is true
    Description:Configure usable SSL protocol flavors for proxy usage
    Syntax:SSLProxyProtocol [+|-]protocol ...
    Default:SSLProxyProtocol all
    Default:SSLProxyProtocol all -SSLv3 (up to 2.4.16: all)
    Context:server config, virtual host
    Override:Options
    Status:Extension
    Status:Extension
    Module:mod_ssl
    + +

    SSLRequire is deprecated

    +

    SSLRequire is deprecated and should in general be replaced +by Require expr. The so called +ap_expr syntax of Require expr is +a superset of the syntax of SSLRequire, with the following +exception:

    + +

    In SSLRequire, the comparison operators <, +<=, ... are completely equivalent to the operators +lt, le, ... and work in a somewhat peculiar way that +first compares the length of two strings and then the lexical order. +On the other hand, ap_expr has two sets of +comparison operators: The operators <, +<=, ... do lexical string comparison, while the operators +-lt, -le, ... do integer comparison. +For the latter, there are also aliases without the leading dashes: +lt, le, ... +

    + +
    +

    This directive specifies a general access requirement which has to be fulfilled in order to allow access. It is a very powerful directive because the @@ -1761,8 +2060,7 @@ containing any number of access checks.

    The expression must match the following syntax (given as a BNF grammar notation):

    -
    -expr     ::= "true" | "false"
    +
    expr     ::= "true" | "false"
                | "!" expr
                | expr "&&" expr
                | expr "||" expr
    @@ -1791,25 +2089,25 @@ word     ::= digit
     digit    ::= [0-9]+
     cstring  ::= "..."
     variable ::= "%{" varname "}"
    -function ::= funcname "(" funcargs ")"
    -
    +function ::= funcname "(" funcargs ")"

    For varname any of the variables described in Environment Variables can be used. For funcname the available functions are listed in the ap_expr documentation.

    -

    Notice that expression is first parsed into an internal machine -representation and then evaluated in a second step. Actually, in Global and -Per-Server Class context expression is parsed at startup time and -at runtime only the machine representation is executed. For Per-Directory -context this is different: here expression has to be parsed and -immediately executed for every request.

    -

    Example

    SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/                \
    -            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."        \
    -            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}  \
    -            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5          \
    -            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
    -           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    +

    The expression is parsed into an internal machine +representation when the configuration is loaded, and then evaluated +during request processing. In .htaccess context, the expression is +both parsed and executed each time the .htaccess file is encountered during +request processing.

    + +

    Example

    SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/                   \
    +            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."          \
    +            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}    \
    +            and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5          \
    +            and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20       ) \
    +           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    +

    The PeerExtList(object-ID) function expects to find zero or more instances of the X.509 certificate extension @@ -1819,9 +2117,8 @@ exactly against the value of an extension identified with this OID. (If multiple extensions with the same OID are present, at least one extension must match).

    -

    Example

    -SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6") -

    +

    Example

    SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6")
    +

    Notes on the PeerExtList function

    @@ -1842,27 +2139,6 @@ the left-hand-side expression.

    -

    SSLRequire is deprecated

    -

    SSLRequire is deprecated and should in general be replaced -by Require expr. The so called -ap_expr syntax of Require expr is -a superset of the syntax of SSLRequire, with the following -exception:

    - -

    In SSLRequire, the comparison operators <, -<=, ... are completely equivalent to the operators -lt, le, ... and work in a somewhat pecular way that -first compares the length of two strings and then the lexical order. -On the other hand, ap_expr has two sets of -comparison operators: The operators <, -<=, ... do lexical string comparison, while the operators --lt, -le, ... do integer comparison. -For the latter, there are also aliases without the leading dashes: -lt, le, ... -

    - -
    -

    See also

      @@ -1891,9 +2167,8 @@ the current connection. This is very handy inside the SSL-enabled virtual host or directories for defending against configuration errors that expose stuff that should be protected. When this directive is present all requests are denied which are not using SSL.

      -

      Example

      -SSLRequireSSL -

      +

      Example

      SSLRequireSSL
      +
      top
      @@ -1936,33 +2211,35 @@ The following five storage types are currently supported:

      This makes use of a DBM hashfile on the local disk to synchronize the local OpenSSL memory caches of the server - processes. This session cache may suffer reliability issues under - high load.

      + processes. This session cache may suffer reliability issues under + high load. To use this, ensure that + mod_socache_dbm is loaded.

      -
    • shm:/path/to/datafile[(size)] +
    • shmcb:/path/to/datafile[(size)]

      This makes use of a high-performance cyclic buffer (approx. size bytes in size) inside a shared memory segment in RAM (established via /path/to/datafile) to synchronize the local OpenSSL memory caches of the server - processes. This is the recommended session cache.

    • + processes. This is the recommended session cache. To use this, + ensure that mod_socache_shmcb is loaded.

    • dc:UNIX:/path/to/socket -

      This makes use of the distcache distributed session +

      This makes use of the distcache distributed session caching libraries. The argument should specify the location of the server or proxy to be used using the distcache address syntax; for example, UNIX:/path/to/socket specifies a UNIX domain socket (typically a local dc_client proxy); IP:server.example.com:9001 specifies an IP - address.

    • + address. To use this, ensure that + mod_socache_dc is loaded.

    -

    Examples

    -SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data
    -SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000) -

    +

    Examples

    SSLSessionCache "dbm:/usr/local/apache/logs/ssl_gcache_data"
    +SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)"
    +

    The ssl-cache mutex is used to serialize access to the session cache to prevent corruption. This mutex can be configured @@ -1979,16 +2256,127 @@ in the Session Cache Context:server config, virtual host Status:Extension Module:mod_ssl +Compatibility:Applies also to RFC 5077 TLS session resumption in Apache 2.4.10 and later

    This directive sets the timeout in seconds for the information stored in the -global/inter-process SSL Session Cache and the OpenSSL internal memory cache. +global/inter-process SSL Session Cache, the OpenSSL internal memory cache and +for sessions resumed by TLS session resumption (RFC 5077). It can be set as low as 15 for testing, but should be set to higher values like 300 in real life.

    +

    Example

    SSLSessionCacheTimeout 600
    +
    + + +
    top
    +

    SSLSessionTicketKeyFile Directive

    + + + + + + + +
    Description:Persistent encryption/decryption key for TLS session tickets
    Syntax:SSLSessionTicketKeyFile file-path
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.0 and later, if using OpenSSL 0.9.8h or later
    +

    Optionally configures a secret key for encrypting and decrypting +TLS session tickets, as defined in +RFC 5077. +Primarily suitable for clustered environments where TLS sessions information +should be shared between multiple nodes. For single-instance httpd setups, +it is recommended to not configure a ticket key file, but to +rely on (random) keys generated by mod_ssl at startup, instead.

    +

    The ticket key file must contain 48 bytes of random data, +preferrably created from a high-entropy source. On a Unix-based system, +a ticket key file can be created as follows:

    + +

    +dd if=/dev/random of=/path/to/file.tkey bs=1 count=48 +

    + +

    Ticket keys should be rotated (replaced) on a frequent basis, +as this is the only way to invalidate an existing session ticket - +OpenSSL currently doesn't allow to specify a limit for ticket lifetimes. +A new ticket key only gets used after restarting the web server. +All existing session tickets become invalid after a restart.

    + +
    +

    The ticket key file contains sensitive keying material and should +be protected with file permissions similar to those used for +SSLCertificateKeyFile.

    +
    + +
    +
    top
    +

    SSLSessionTickets Directive

    + + + + + + + + +
    Description:Enable or disable use of TLS session tickets
    Syntax:SSLSessionTickets on|off
    Default:SSLSessionTickets on
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.11 and later, if using OpenSSL 0.9.8f +or later.
    +

    This directive allows to enable or disable the use of TLS session tickets +(RFC 5077).

    +
    +

    TLS session tickets are enabled by default. Using them without restarting +the web server with an appropriate frequency (e.g. daily) compromises perfect +forward secrecy.

    +
    + +
    +
    top
    +

    SSLSRPUnknownUserSeed Directive

    + + + + + + + +
    Description:SRP unknown user seed
    Syntax:SSLSRPUnknownUserSeed secret-string
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.4 and later, if using OpenSSL 1.0.1 or +later
    +

    +This directive sets the seed used to fake SRP user parameters for unknown +users, to avoid leaking whether a given user exists. Specify a secret +string. If this directive is not used, then Apache will return the +UNKNOWN_PSK_IDENTITY alert to clients who specify an unknown username. +

    Example

    -SSLSessionCacheTimeout 600 +SSLSRPUnknownUserSeed "secret"

    +
    +
    top
    +

    SSLSRPVerifierFile Directive

    + + + + + + + +
    Description:Path to SRP verifier file
    Syntax:SSLSRPVerifierFile file-path
    Context:server config, virtual host
    Status:Extension
    Module:mod_ssl
    Compatibility:Available in httpd 2.4.4 and later, if using OpenSSL 1.0.1 or +later
    +

    +This directive enables TLS-SRP and sets the path to the OpenSSL SRP (Secure +Remote Password) verifier file containing TLS-SRP usernames, verifiers, salts, +and group parameters.

    +

    Example

    +SSLSRPVerifierFile "/path/to/file.srpv" +

    +

    +The verifier file can be created with the openssl command line +utility:

    +

    Creating the SRP verifier file

    +openssl srp -srpvfile passwd.srpv -userinfo "some info" -add username +

    +

    The value given with the optional -userinfo parameter is +avalable in the SSL_SRP_USERINFO request environment variable.

    + +
    top

    SSLStaplingCache Directive

    @@ -1998,7 +2386,7 @@ SSLSessionCacheTimeout 600 Context:server config Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    Configures the cache used to store OCSP responses which get included in the TLS handshake if SSLUseStapling @@ -2017,7 +2405,7 @@ the same storage types are supported as with Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    Sets the timeout in seconds before invalid responses in the OCSP stapling cache (configured through SSLStaplingCache) will expire. @@ -2034,7 +2422,7 @@ To set the cache timeout for valid responses, see Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    When enabled and a query to an OCSP responder for stapling purposes fails, mod_ssl will synthesize a "tryLater" response for the @@ -2050,11 +2438,11 @@ is also enabled.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    This directive overrides the URI of an OCSP responder as obtained from the authorityInfoAccess (AIA) extension of the certificate. -Of potential use when going through a proxy for retrieving OCSP queries.

    +One potential use is when a proxy is used for retrieving OCSP queries.

    top
    @@ -2066,7 +2454,7 @@ Of potential use when going through a proxy for retrieving OCSP queries.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    This option sets the timeout for queries to OCSP responders when SSLUseStapling is enabled @@ -2082,7 +2470,7 @@ and mod_ssl is querying a responder for OCSP stapling purposes.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    This option sets the maximum allowable age ("freshness") when considering OCSP responses for stapling purposes, i.e. when @@ -2101,7 +2489,7 @@ which means that OCSP responses are considered valid as long as their Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    This option sets the maximum allowable time skew when mod_ssl checks the thisUpdate and nextUpdate fields of OCSP responses @@ -2118,12 +2506,14 @@ if SSLUseStapling i Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    When enabled, mod_ssl will pass responses from unsuccessful -stapling related OCSP queries (such as status errors, expired responses etc.) -on to the client. If set to off, no stapled responses -for failed queries will be included in the TLS handshake.

    +stapling related OCSP queries (such as responses with an overall status +other than "successful", responses with a certificate status other than +"good", expired responses etc.) on to the client. +If set to off, only responses indicating a certificate status +of "good" will be included in the TLS handshake.

    top
    @@ -2135,7 +2525,7 @@ for failed queries will be included in the TLS handshake.

    Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    Sets the timeout in seconds before responses in the OCSP stapling cache (configured through SSLStaplingCache) @@ -2172,9 +2562,8 @@ This option is only available if httpd was compiled against an SNI capable version of OpenSSL.

    -

    Example

    -SSLStrictSNIVHostCheck on -

    +

    Example

    SSLStrictSNIVHostCheck on
    +
    top
    @@ -2186,7 +2575,6 @@ SSLStrictSNIVHostCheck on Override:AuthConfig Status:Extension Module:mod_ssl -Compatibility:Available in Apache 2.0.51 and later

    This directive sets the "user" field in the Apache request object. @@ -2198,9 +2586,8 @@ any of the SSL environment variables.

    Note that this directive has no effect if the FakeBasicAuth option is used (see SSLOptions).

    -

    Example

    -SSLUserName SSL_CLIENT_S_DN_CN -

    +

    Example

    SSLUserName SSL_CLIENT_S_DN_CN
    +
    top
    @@ -2212,7 +2599,7 @@ SSLUserName SSL_CLIENT_S_DN_CN Context:server config, virtual host Status:Extension Module:mod_ssl -Compatibility:Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Compatibility:Available if using OpenSSL 0.9.8h or later

    This option enables OCSP stapling, as defined by the "Certificate Status Request" TLS extension specified in RFC 6066. If enabled (and @@ -2222,15 +2609,24 @@ for its own certificate in the TLS handshake. Configuring an prerequisite for enabling OCSP stapling.

    OCSP stapling relieves the client of querying the OCSP responder -on its own, but it should be noted that in its current specification, +on its own, but it should be noted that with the RFC 6066 specification, the server's CertificateStatus reply may only include an OCSP response for a single cert. For server certificates with intermediate CA certificates in their chain (the typical case nowadays), -stapling in its current form therefore only partially achieves the -stated goal of "saving roundtrips and resources" - see also the -"Adding Multiple TLS Certificate Status Extension requests" Internet draft. +stapling in its current implementation therefore only partially achieves the +stated goal of "saving roundtrips and resources" - see also +RFC 6961 +(TLS Multiple Certificate Status Extension).

    +

    When OCSP stapling is enabled, the ssl-stapling mutex is used +to control access to the OCSP stapling cache in order to prevent corruption, +and the sss-stapling-refresh mutex is used to control refreshes +of OCSP responses. These mutexes can be configured using the +Mutex directive. +

    + +
    top

    SSLVerifyClient Directive

    @@ -2262,16 +2658,11 @@ The following levels are available for level:

    the client has to present a valid Certificate
  • optional_no_ca: the client may present a valid Certificate
    - but it need not to be (successfully) verifiable.
  • + but it need not to be (successfully) verifiable. This option + cannot be relied upon for client authentication. -

    In practice only levels none and -require are really interesting, because level -optional doesn't work with all browsers and level -optional_no_ca is actually against the idea of -authentication (but can be used to establish SSL test pages, etc.)

    -

    Example

    -SSLVerifyClient require -

    +

    Example

    SSLVerifyClient require
    +
    top
    @@ -2302,15 +2693,36 @@ certificates are accepted only, the default depth of 1 means the client certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is under SSLCACertificatePath), etc.

    -

    Example

    -SSLVerifyDepth 10 -

    +

    Example

    SSLVerifyDepth 10
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_ssl.html.fr b/docs/manual/mod/mod_ssl.html.fr new file mode 100644 index 00000000000..7367db302f5 --- /dev/null +++ b/docs/manual/mod/mod_ssl.html.fr @@ -0,0 +1,3016 @@ + + + + + +mod_ssl - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_ssl

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description:Chiffrement de haut niveau bas sur les protocoles Secure +Sockets Layer (SSL) et Transport Layer Security (TLS)
    Statut:Extension
    IdentificateurdeModule:ssl_module
    FichierSource:mod_ssl.c
    +

    Sommaire

    + +

    Ce module fournit le support SSL v3 et TLS v1 au serveur HTTP +Apache. SSL v2 n'est plus support.

    + +

    Ce module s'appuie sur OpenSSL +pour fournir le moteur de chiffrement.

    + +

    D'autres dtails, discussions et exemples sont fournis dans la documentation SSL.

    +
    +

    Sujets

    +

    Directives

    + +

    Traitement des bugs

    Voir aussi

    +
    +
    top
    +
    +

    Variables d'environnement

    + +

    Ce module peut tre configur pour fournir aux espaces de nommage SSI +et CGI de nombreux lments d'informations concernant SSL par le biais +de variables d'environnement supplmentaires. Par dfaut, et pour +des raisons de performances, ces informations ne sont pas fournies (Voir +la directive SSLOptions StdEnvVars ci-dessous). +Les variables gnres se trouvent dans la table ci-dessous. +Ces informations peuvent galement tre disponible sous des noms diffrents + des fins de compatibilit ascendante. Reportez-vous au chapitre Compatibilit pour plus de dtails +propos des variables de compatibilit.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nom de la variable :Type de valeur :Description :
    HTTPS drapeauHTTPS est utilis.
    SSL_PROTOCOL chaneLa version du protocole SSL (SSLv3, TLSv1, TLSv1.1, TLSv1.2)
    SSL_SESSION_ID chaneL'identifiant de session SSL cod en hexadcimal
    SSL_SESSION_RESUMED chaneSession SSL initiale ou reprise. Note : plusieurs requtes peuvent +tre servies dans le cadre de la mme session SSL (initiale ou reprise) +si les connexions persistantes (HTTP KeepAlive) sont utilises
    SSL_SECURE_RENEG chanetrue si la rengociation scurise est supporte, +false dans le cas contraire
    SSL_CIPHER chaneLe nom de l'algorithme de chiffrement
    SSL_CIPHER_EXPORT chanetrue si l'algorithme de chiffrement est un algorithme +export
    SSL_CIPHER_USEKEYSIZE nombreNombre de bits de chiffrement (rellement utiliss)
    SSL_CIPHER_ALGKEYSIZE nombreNombre de bits de chiffrement (possible)
    SSL_COMPRESS_METHOD chaneMthode de compression SSL ngocie
    SSL_VERSION_INTERFACE chaneLa version du programme mod_ssl
    SSL_VERSION_LIBRARY chaneLa version du programme OpenSSL
    SSL_CLIENT_M_VERSION chaneLa version du certificat client
    SSL_CLIENT_M_SERIAL chaneLe numro de srie du certificat client
    SSL_CLIENT_S_DN chaneLe DN sujet du certificat client
    SSL_CLIENT_S_DN_x509 chaneElment du DN sujet du client
    SSL_CLIENT_SAN_Email_n chaneLes entres d'extension subjectAltName du certificat client de type rfc822Name
    SSL_CLIENT_SAN_DNS_n chaneLes entres d'extension subjectAltName du certificat client de type dNSName
    SSL_CLIENT_SAN_OTHER_msUPN_nchane Extensions subjectAltName de type otherName du +certificat client, forme Microsoft du nom principal de l'utilisateur (OID 1.3.6.1.4.1.311.20.2.3)
    SSL_CLIENT_I_DN chaneDN de l'metteur du certificat du client
    SSL_CLIENT_I_DN_x509 chaneElment du DN de l'metteur du certificat du client
    SSL_CLIENT_V_START chaneValidit du certificat du client (date de dbut)
    SSL_CLIENT_V_END chaneValidit du certificat du client (date de fin)
    SSL_CLIENT_V_REMAIN chaneNombre de jours avant expiration du certificat du client
    SSL_CLIENT_A_SIG chaneAlgorithme utilis pour la signature du certificat du client
    SSL_CLIENT_A_KEY chaneAlgorithme utilis pour la cl publique du certificat du client
    SSL_CLIENT_CERT chaneCertificat du client au format PEM
    SSL_CLIENT_CERT_CHAIN_nchane Certificats de la chane de certification du +client au format PEM
    SSL_CLIENT_CERT_RFC4523_CEA chaneNumro de srie et fournisseur du certificat. le format correspond +celui de la CertificateExactAssertion dans la RFC4523
    SSL_CLIENT_VERIFY chaneNONE, SUCCESS, GENEROUS ou +FAILED:raison
    SSL_SERVER_M_VERSION chaneLa version du certificat du serveur
    SSL_SERVER_M_SERIAL chane + +The serial of the server certificate
    SSL_SERVER_S_DN chaneDN sujet du certificat du serveur
    SSL_SERVER_S_DN_x509 chaneElment du DN sujet du certificat du serveur
    SSL_SERVER_SAN_Email_nchane Les entres d'extension subjectAltName du +certificat de serveur de type rfc822Name
    SSL_SERVER_SAN_DNS_n chaneLes entres d'extension subjectAltName du +certificat de serveur de type dNSName
    SSL_SERVER_SAN_OTHER_dnsSRV_nchane Extensions subjectAltName de type otherName du +certificat serveur, sous la forme SRVName (OID 1.3.6.1.5.5.7.8.7, RFC 4985)
    SSL_SERVER_I_DN chaneDN de l'metteur du certificat du serveur
    SSL_SERVER_I_DN_x509 chaneElment du DN de l'metteur du certificat du serveur
    SSL_SERVER_V_START chaneValidit du certificat du serveur (date de ddut)
    SSL_SERVER_V_END chaneValidit du certificat du serveur (date de fin)
    SSL_SERVER_A_SIG chaneAlgorithme utilis pour la signature du certificat du serveur
    SSL_SERVER_A_KEY chaneAlgorithme utilis pour la cl publique du certificat du serveur
    SSL_SERVER_CERT chaneCertificat du serveur au format PEM
    SSL_SRP_USER chanenom d'utilisateur SRP
    SSL_SRP_USERINFO chaneinformations sur l'utilisateur SRP
    SSL_TLS_SNI stringContenu de l'extension SNI TLS (si support par ClientHello)
    + +

    x509 spcifie un lment de DN X.509 parmi +C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email. A partir de la version +2.1 d'Apache, x509 peut aussi comporter un suffixe numrique +_n. Si le DN en question comporte plusieurs attributs de +noms identiques, ce suffixe constitue un index dbutant zro et +permettant de slectionner un +attribut particulier. Par exemple, si le DN sujet du certificat du +serveur comporte deux champs OU, on peut utiliser +SSL_SERVER_S_DN_OU_0 et SSL_SERVER_S_DN_OU_1 +pour rfrencer chacun d'entre eux. Un nom de variable sans suffixe +_n est quivalent au mme nom avec le suffixe +_0, ce qui correspond au premier attribut (ou au seul) +caractrisant le DN. +Lorsque la table d'environnement est remplie en utilisant l'option +StdEnvVars de la directive SSLOptions, le premier attribut (ou le +seul) caractrisant le DN est enregistr avec un nom sans suffixe ; +autrement dit, aucune entre possdant comme suffixe _0 +n'est enregistre.

    + +

    Le format des variables *_DN a chang depuis la version +2.3.11 d'Apache HTTPD. Voir l'option LegacyDNStringFormat +de la directive SSLOptions pour +plus de dtails.

    + +

    SSL_CLIENT_V_REMAIN n'est disponible qu' partir de la +version 2.1.

    + +

    Plusieurs variables d'environnement additionnelles peuvent tre +utilises dans les expressions SSLRequire, ou +dans les formats de journalisation personnaliss :

    + +
    HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
    +HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
    +HTTP_COOKIE            REMOTE_HOST           API_VERSION
    +HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
    +HTTP_HOST              IS_SUBREQ             TIME_MON
    +HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
    +HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
    +THE_REQUEST            SERVER_NAME           TIME_MIN
    +REQUEST_FILENAME       SERVER_PORT           TIME_SEC
    +REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
    +REQUEST_SCHEME         REMOTE_ADDR           TIME
    +REQUEST_URI            REMOTE_USER
    + +

    Dans ces contextes, deux formats spciaux peuvent aussi tre utiliss +:

    + +
    +
    ENV:nom_variable
    +
    Correspond la variable d'environnement standard + nom_variable.
    + +
    HTTP:nom_en-tte
    +
    Correspond la valeur de l'en-tte de requte dont le nom est + nom_en-tte.
    +
    + +
    top
    +
    +

    Formats de journaux +personnaliss

    + +

    Lorsque mod_ssl est compil dans le serveur Apache +ou mme charg (en mode DSO), des fonctions supplmentaires sont +disponibles pour le Format de journal personnalis du +module mod_log_config. A ce titre, la fonction de +format d'eXtension ``%{nom-var}x'' +peut tre utilise pour prsenter en extension toute variable fournie +par tout module, et en particulier celles fournies par mod_ssl et que +vous trouverez dans la table ci-dessus.

    +

    +A des fins de compatibilit ascendante, il existe une fonction de format +cryptographique supplmentaire +``%{nom}c''. Vous trouverez toutes +les informations propos de cette fonction dans le chapitre Compatibilit.

    +

    Exemple

    CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    +
    +

    Ces formats sont disponibles mme si l'option StdEnvVars de la +directive SSLOptions n'a pas t +dfinie.

    +
    top
    +
    +

    Information propos de la requte

    + +

    mod_ssl enregistre des informations propos de la +requte que l'on peut restituer dans les journaux avec la chane de +format %{nom}n via le module +mod_log_config.

    + +

    Les informations enregistres sont les suivantes :

    + +
    +
    ssl-access-forbidden
    +
    Cette information contient la valeur 1 si l'accs a + t refus suite une directive SSLRequire ou + SSLRequireSSL.
    + +
    ssl-secure-reneg
    +
    Si mod_ssl a t compil avec une version + d'OpenSSL qui supporte la rengociation scurise, si SSL est utilis + pour la connexion courante et si le client supporte lui aussi la + rengociation scurise, cette information contiendra la valeur + 1. Si le client ne supporte pas la rengociation + scurise, l'information contiendra la valeur 0. Si + mod_ssl n'a pas t compil avec une version + d'OpenSSL qui supporte la rengociation scurise, ou si SSL n'est pas + utilis pour la connexion courante, le contenu de l'information ne + sera pas dfini.
    +
    + +
    top
    +
    +

    Extension pour l'interprtation +des expressions

    + +

    Lorsque mod_ssl est compil statiquement avec +Apache, ou mme charg dynamiquement (en tant que module DSO), toute variable en provenance de mod_ssl peut +tre utilise pour l'interprtation des +expression ap_expr. Les variables peuvent tre rfrences en +utilisant la syntaxe ``%{varname}''. +A partir de la version 2.4.18, on peut aussi utiliser la syntaxe de +style mod_rewrite +``%{SSL:varname}'', ou la syntaxe de +style fonction ``ssl(varname)''.

    +

    Exemple (en utilisant mod_headers)

    Header set X-SSL-PROTOCOL "expr=%{SSL_PROTOCOL}"
    +Header set X-SSL-CIPHER "expr=%{SSL:SSL_CIPHER}"
    +
    +

    Cette fonctionnalit est disponible mme si l'option +StdEnvVars de la directive SSLOptions n'a pas t dfinie.

    +
    top
    +
    +

    Fournisseurs d'autorisation +disponibles avec Require

    + +

    mod_ssl propose quelques fournisseurs + d'autorisation utiliser avec la directive Require du module + mod_authz_core.

    + +

    Require ssl

    + +

    Le fournisseur ssl refuse l'accs si une connexion + n'est pas chiffre avec SSL. L'effet est similaire celui de la + directive SSLRequireSSL.

    + + +
    Require ssl
    + + + + + +

    Require ssl-verify-client

    + +

    Le fournisseur ssl autorise l'accs si + l'utilisateur est authentifi via un certificat client valide. Ceci + n'a un effet que si SSLVerifyClient optional est actif.

    + +

    Dans l'exemple suivant, l'accs est autoris si le client est + authentifi via un certificat client ou par nom d'utilisateur/mot de + passe :

    + +
    Require ssl-verify-client
    +Require valid-user
    + + + + +
    +
    top
    +

    Directive SSLCACertificateFile

    + + + + + + +
    Description:Fichier contenant une concatnation des certificats de CA +cods en PEM pour l'authentification des clients
    Syntaxe:SSLCACertificateFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier tout-en-un o vous +pouvez rassembler les certificats des Autorits de Certification (CAs) +pour les clients auxquels vous avez faire. On les utilise pour +l'authentification des clients. Un tel fichier contient la simple +concatnation des diffrents fichiers de certificats cods en PEM, par +ordre de prfrence. Cette directive peut tre utilise la place et/ou +en complment de la directive SSLCACertificatePath.

    +

    Exemple

    SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt"
    +
    + +
    +
    top
    +

    Directive SSLCACertificatePath

    + + + + + + +
    Description:Rpertoire des certificats de CA cods en PEM pour +l'authentification des clients
    Syntaxe:SSLCACertificatePath chemin-rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le rpertoire o sont stocks les +certificats des Autorits de Certification (CAs) pour les clients +auxquels vous avez faire. On les utilise pour vrifier le certificat +du client au cours de l'authentification de ce dernier.

    +

    +Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce rpertoire +: vous devez aussi crer des liens symboliques nomms +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +

    Exemple

    SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
    +
    + +
    +
    top
    +

    Directive SSLCADNRequestFile

    + + + + + + +
    Description:Fichier contenant la concatnation des certificats de CA +cods en PEM pour la dfinition de noms de CA acceptables
    Syntaxe:SSLCADNRequestFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Lorsque mod_ssl demande un certificat client, une liste de noms +d'Autorits de Certification acceptables est envoye au client au +cours de la phase d'initialisation de la connexion SSL. Le client peut +alors utiliser cette liste de noms de CA pour slectionner un certificat +client appropri parmi ceux dont il dispose.

    + +

    Si aucune des directives SSLCADNRequestPath ou SSLCADNRequestFile n'est dfinie, la liste +de noms de CsA acceptables envoye au client est la liste des noms de +tous les certificats de CA spcifis par les directives SSLCACertificateFile et SSLCACertificatePath ; en d'autres termes, +c'est la liste des noms de CAs qui sera effectivement utilise pour +vrifier le certificat du client.

    + +

    Dans certaines situations, il est utile de pouvoir envoyer +une liste de noms de CA acceptables qui diffre de la liste des CAs +effectivement utiliss pour vrifier le certificat du client ; +considrons par exemple le cas o le certificat du client est sign par +des CAs intermdiaires. On peut ici utiliser les directives SSLCADNRequestPath et/ou SSLCADNRequestFile, et les noms de CA +acceptables seront alors extraits de l'ensemble des certificats contenus +dans le rpertoire et/ou le fichier dfinis par cette paire de +directives.

    + +

    SSLCADNRequestFile doit +spcifier un fichier tout-en-un contenant une concatnation des +certificats de CA cods en PEM.

    + +

    Exemple

    SSLCADNRequestFile "/usr/local/apache2/conf/ca-names.crt"
    +
    + +
    +
    top
    +

    Directive SSLCADNRequestPath

    + + + + + + +
    Description:Rpertoire contenant des fichiers de certificats de CA +cods en PEM pour la dfinition de noms de CA acceptables
    Syntaxe:SSLCADNRequestPath chemin-rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    + +

    Cette directive optionnelle permet de dfinir la liste de noms de +CAs acceptables qui sera envoye au client lorsqu'un certificat de +client est demand. Voir la directive SSLCADNRequestFile pour plus de +dtails.

    + +

    Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce rpertoire +: vous devez aussi crer des liens symboliques nomms +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +

    Exemple

    SSLCADNRequestPath "/usr/local/apache2/conf/ca-names.crt/"
    +
    + +
    +
    top
    +

    Directive SSLCARevocationCheck

    + + + + + + + + +
    Description:Active la vrification des rvocations base sur les CRL
    Syntaxe:SSLCARevocationCheck chain|leaf|none flags
    Dfaut:SSLCARevocationCheck none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Le drapeau optionnel flags est disponible partir de la +version 2.5-dev du serveur HTTP Apache
    +

    +Active la vrification des rvocations base sur les Listes de +Rvocations de Certificats (CRL). Au moins une des directives SSLCARevocationFile ou SSLCARevocationPath doit tre dfinie. +Lorsque cette directive est dfinie chain (valeur +recommande), les vrifications CRL sont effectues sur tous les +certificats de la chane, alors que la valeur leaf limite +la vrification au certificat hors chane (la feuille). +

    +

    flags peut prendre comme valeurs

    +
      +
    • no_crl_for_cert_ok +

      +Avant la version 2.3.15, les vrifications CRL dans mod_ssl +russissaient mme si aucune CRL n'tait trouve dans les chemins +dfinis par les directives SSLCARevocationFile ou SSLCARevocationPath.

      +

      Le comportement a +chang avec l'introduction de la directive +SSLCARevocationFile : par dfaut avec +chain ou leaf, les CRLs doivent tre prsentes pour que la +validation russisse ; dans le cas contraire, elle chouera avec une +erreur "unable to get certificate CRL".

      +

      La valeur no_crl_for_cert_ok du drapeau flag permet de +retrouver le comportement prcdent.

      +
    • +
    +

    Exemple

    SSLCARevocationCheck chain
    +
    +

    Compatibilit avec la branche 2.2

    SSLCARevocationCheck chain no_crl_for_cert_ok
    +
    + +
    +
    top
    +

    Directive SSLCARevocationFile

    + + + + + + +
    Description:Fichier contenant la concatnation des CRLs des CA cods en +PEM pour l'authentification des clients
    Syntaxe:SSLCARevocationFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier tout-en-un o sont +rassembles les Listes de Rvocation de Certificats (CRLs) des Autorits +de certification (CAs) pour les clients auxquels vous avez faire. On +les utilise pour l'authentification des clients. Un tel fichier contient +la simple concatnation des diffrents fichiers de CRLs cods en PEM, +dans l'ordre de prfrence. Cette directive peut tre utilise la +place et/ou en complment de la directive SSLCARevocationPath.

    +

    Exemple

    SSLCARevocationFile
    +"/usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl"
    +
    + +
    +
    top
    +

    Directive SSLCARevocationPath

    + + + + + + +
    Description:Rpertoire des CRLs de CA cods en PEM pour +l'authentification des clients
    Syntaxe:SSLCARevocationPath chemin-rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le rpertoire o sont stockes les +Listes de Rvocation de Certificats (CRL) des Autorits de Certification +(CAs) pour les clients auxquels vous avez faire. On les utilise pour +rvoquer les certificats des clients au cours de l'authentification de +ces derniers.

    +

    +Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Il ne +suffit donc pas de placer les fichiers de CRL dans ce rpertoire +: vous devez aussi crer des liens symboliques nomms +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +

    Exemple

    SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
    +
    + +
    +
    top
    +

    Directive SSLCertificateChainFile

    + + + + + + +
    Description:Fichier contenant les certificats de CA du serveur cods en +PEM
    Syntaxe:SSLCertificateChainFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    SSLCertificateChainFile est obsolte

    +

    SSLCertificateChainFile est devenue obsolte avec la +version 2.4.8, lorsque la directive +SSLCertificateFile a t tendue +pour supporter aussi les certificats de CA intermdiaires dans le +fichier de certificats du serveur.

    +
    +

    +Cette directive permet de dfinir le fichier optionnel +tout-en-un o vous pouvez rassembler les certificats des +Autorits de Certification (CA) qui forment la chane de certification +du certificat du serveur. Cette chane dbute par le certificat de la CA +qui a dlivr le certificat du serveur et peut remonter jusqu'au +certificat de la CA racine. Un tel fichier contient la simple +concatnation des diffrents certificats de CA cods en PEM, en gnral +dans l'ordre de la chane de certification.

    +

    Elle doit tre utilise la place et/ou en complment de la +directive SSLCACertificatePath +pour construire explicitement la chane de certification du serveur qui +est envoye au navigateur en plus du certificat du serveur. Elle s'avre +particulirement utile pour viter les conflits avec les certificats de +CA lorsqu'on utilise l'authentification du client. Comme le fait de +placer un certificat de CA de la chane de certification du serveur dans +la directive SSLCACertificatePath produit le mme effet +pour la construction de la chane de certification, cette directive a +pour effet colatral de faire accepter les certificats clients fournis +par cette mme CA, au cours de l'authentification du client.

    +

    +Soyez cependant prudent : fournir la chane de certification ne +fonctionne que si vous utilisez un simple certificat de +serveur RSA ou DSA. Si vous utilisez une paire de certificats +coupls RSA+DSA , cela ne fonctionnera que si les deux certificats +utilisent vraiment la mme chane de certification. Dans le cas +contraire, la confusion risque de s'installer au niveau des +navigateurs.

    +

    Exemple

    SSLCertificateChainFile "/usr/local/apache2/conf/ssl.crt/ca.crt"
    +
    + +
    +
    top
    +

    Directive SSLCertificateFile

    + + + + + + +
    Description:Fichier de donnes contenant le certificat X.509 du serveur cod en +PEM
    Syntaxe:SSLCertificateFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette directive permet de dfinir le fichier de donnes contenant +les informations de certificat +X.509 du serveur codes au format PEM. Ce fichier doit contenir +au minimum un certificat d'entit finale (feuille). +La directive peut tre utilise plusieurs fois (elle rfrence des +fichiers diffrents) pour accepter plusieurs algorithmes +d'authentification au niveau du serveur - souvent RSA, DSA et ECC. Le +nombre d'algorithmes supports dpend de la version d'OpenSSL utilise +avec mod_ssl : partir de la version 1.0.0, la commande openssl +list-public-key-algorithms affiche la liste des algorithmes +supports. Voir aussi la note ci-dessous propos des limitations des versions +d'OpenSSL antrieures 1.0.2 et la manire de les contourner. +

    + +

    Les fichiers peuvent aussi contenir des certificats de CA +intermdiaires tris depuis la feuille vers la racine. Cette +fonctionnalit est disponible depuis la version 2.4.8 du serveur HTTP +Apache, et rend obsolte la directive SSLCertificateChainFile. A partir de la +version 1.0.2 d'OpenSSL, il est alors possible de configurer la chane +de certification en fonction du certificat.

    + +

    Depuis la version 2.4.7 du serveur HTTP Apache, on peut aussi ajouter +des paramtres DH personnaliss et un nom EC +curve pour les cls phmres la fin du premier fichier dfini par la +directive SSLCertificateFile. +Ces paramtres peuvent tre gnrs avec les commandes openssl +dhparam et openssl ecparam, et ils peuvent tre +ajouts tel quel la fin du premier fichier de certificat. En effet, +seul le premier fichier de certificat dfini peut tre utilis pour +enregistrer des paramtres personnaliss, car ces derniers s'appliquent +indpendamment de l'algorithme d'authentification utilis. +

    + +

    Enfin, il est aussi possible d'ajouter la cl prive du certificat de +l'entit finale au fichier de certificat, ce qui permet de se passer +d'une directive SSLCertificateKeyFile spare. Cette +pratique est cependant fortement dconseille. En effet, les fichiers de +certificats qui contiennent de tels cls embarques doivent tre dfinis +avant les certificats en utilisant un fichier de cl spar. En outre, +si la cl est chiffre, une bote de dialogue pour entrer le mot de +passe de la cl s'ouvre au dmarrage du serveur. +

    + +
    +

    Interoprabilit des paramtres DH avec les nombres premiers de +plus de 1024 bits

    +

    +Depuis la version 2.4.7, mod_ssl utilise des +paramtres DH standardiss avec des nombres premiers de 2048, 3072 et +4096 bits, et avec des nombres premiers de 6144 et 8192 bits depuis la +version 2.4.10 (voir RFC +3526), et les fournit aux clients en fonction de la longueur de la +cl du certificat RSA/DSA. En particulier avec les clients bass sur +Java (versions 7 et antrieures), ceci peut provoquer des erreurs au +cours de la ngociation - voir cette rponse de la FAQ SSL pour +contourner les problmes de ce genre. +

    +
    + +
    +

    Paramtres DH par dfaut lorsqu'on utilise plusieurs certificats et une +version d'OpenSSL antrieure 1.0.2.

    +

    +Lorsqu'on utilise plusieurs certificats pour supporter diffrents algorithmes +d'authentification (comme RSA, DSA, mais principalement ECC) et une +version d'OpenSSL antrieure 1.0.2, il est recommand soit d'utiliser des +paramtres DH spcifiques (solution privilgier) en les ajoutant au premier +fichier certificat (comme dcrit ci-dessus), soit d'ordonner les directives +SSLCertificateFile de faon ce que les certificats +RSA/DSA soit placs aprs les certificats ECC. +

    +

    +Cette limitation est prsente dans les anciennes versions d'OpenSSL qui +prsentent toujours le dernier certificat configur, au lieu +de laisser le serveur HTTP Apache dterminer le certificat slectionn lors de +la phase de ngociation de la connexion (lorsque les paramtres DH doivent tre +envoys l'hte distant). +De ce fait, le serveur peut slectionner des paramtres DH par dfaut bass sur +la longueur de la cl du mauvais certificat (les cls ECC sont beaucoup plus +petites que les cls RSA/DSA et leur longueur n'est pas pertinente pour la +slection des nombres premiers DH). +

    +

    +Ce problme peut tre rsolu en crant et configurant des paramtres DH +spcifiques (comme dcrit ci-dessus), car ils l'emportent toujours sur les +paramtres DH par dfaut, et vous pourrez ainsi utiliser une longueur spcifique +et approprie. +

    +
    + +

    Exemple

    SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt"
    +
    + +
    +
    top
    +

    Directive SSLCertificateKeyFile

    + + + + + + +
    Description:Fichier contenant la cl prive du serveur code en +PEM
    Syntaxe:SSLCertificateKeyFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette directive permet de dfinir le fichier contenant la cl prive du +serveur code en PEM. Si la cl prive est +chiffre, une bote de dialogue demandant le mot de passe s'ouvre au +dmarrage.

    + +

    +Cette directive peut tre utilise plusieurs fois pour rfrencer +diffrents noms de fichiers, afin de supporter plusieurs algorithmes +pour l'authentification du serveur. A chaque directive SSLCertificateKeyFile doit tre associe +une directive SSLCertificateFile correspondante. +

    + +

    +La cl priv peut aussi tre ajoute au fichier dfini par la directive +SSLCertificateFile, mais cette +pratique est fortement dconseille. En effet, les fichiers de +certificats qui comportent une telle cl doivent tre dfinis aprs les +certificats en utilisant un fichier de cl spar.

    + +

    Exemple

    SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
    +
    + +
    +
    top
    +

    Directive SSLCipherSuite

    + + + + + + + + +
    Description:Algorithmes de chiffrement disponibles pour la ngociation +au cours de l'initialisation de la connexion SSL
    Syntaxe:SSLCipherSuite algorithmes
    Dfaut:SSLCipherSuite DEFAULT (dpend de la version d'OpenSSL +installe)
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive complexe utilise la chane algorithmes +contenant la liste des algorithmes de chiffrement OpenSSL que le client +peut utiliser au cours de la phase d'initialisation de la connexion SSL. +Notez que cette directive peut tre utilise aussi bien dans un contexte +de serveur que dans un contexte de rpertoire. Dans un contexte de +serveur, elle s'applique l'initialisation SSL standard lorsqu'une +connexion est tablie. Dans un contexte de rpertoire, elle force une +rengociation SSL avec la liste d'algorithmes de chiffrement spcifie +aprs la lecture d'une requte HTTP, mais avant l'envoi de la rponse +HTTP.

    +

    +La liste d'algorithmes de chiffrement SSL spcifie par l'argument +algorithmes comporte quatre attributs principaux auxquels +s'ajoutent quelques attributs secondaires :

    +
      +
    • Algorithme d'change de cls:
      + RSA, Diffie-Hellman, Elliptic Curve Diffie-Hellman, Secure Remote Password +
    • +
    • Algorithme d'authentification:
      + RSA, Diffie-Hellman, DSS, ECDSA ou none. +
    • +
    • Algorithme de chiffrement:
      + AES, DES, Triple-DES, RC4, RC2, IDEA, etc... +
    • +
    • Algorithme de condens MAC:
      + MD5, SHA or SHA1, SHA256, SHA384. +
    • +
    +

    L'algorithme de chiffrement peut aussi provenir de l'extrieur. Les +algorithmes SSLv2 ne sont plus supports. +Pour dfinir les algorithmes utiliser, on +peut soit spcifier tous les algorithmes la fois, soit utiliser des +alias pour spcifier une liste d'algorithmes dans leur ordre de +prfrence (voir Table 1). Les algorithmes et +alias effectivement disponibles dpendent de la version d'openssl +utilise. Les versions ultrieures d'openssl inclueront probablement des +algorithmes supplmentaires.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Symbole Description
    Algorithme d'change de cls :
    kRSA Echange de cls RSA
    kDHr Echange de cls Diffie-Hellman avec +cl RSA
    kDHd Echange de cls Diffie-Hellman avec +cl DSA
    kEDH Echange de cls Diffie-Hellman +temporaires (pas de certificat)
    kSRP change de cls avec mot de passe +distant scuris (SRP)
    Algorithmes d'authentification :
    aNULL Pas d'authentification
    aRSA Authentification RSA
    aDSS Authentification DSS
    aDH Authentification Diffie-Hellman
    Algorithmes de chiffrement :
    eNULL Pas de chiffrement
    NULL alias pour eNULL
    AES Chiffrement AES
    DES Chiffrement DES
    3DES Chiffrement Triple-DES
    RC4 Chiffrement RC4
    RC2 Chiffrement RC2
    IDEA Chiffrement IDEA
    Algorithmes de condenss MAC :
    MD5 Fonction de hashage MD5
    SHA1 Fonction de hashage SHA1
    SHA alias pour SHA1
    SHA256 >Fonction de hashage SHA256
    SHA384 >Fonction de hashage SHA384
    Alias :
    SSLv3 tous les algorithmes de chiffrement +SSL version 3.0
    TLSv1 tous les algorithmes de chiffrement +TLS version 1.0
    EXP tous les algorithmes de chiffrement +externes
    EXPORT40 tous les algorithmes de chiffrement +externes limits 40 bits
    EXPORT56 tous les algorithmes de chiffrement +externes limits 56 bits
    LOW tous les algorithmes de chiffrement +faibles (non externes, DES simple)
    MEDIUM tous les algorithmes avec +chiffrement 128 bits
    HIGH tous les algorithmes +utilisant Triple-DES
    RSA tous les algorithmes +utilisant l'change de cls RSA
    DH tous les algorithmes +utilisant l'change de cls Diffie-Hellman
    EDH tous les algorithmes +utilisant l'change de cls Diffie-Hellman temporaires
    ECDH change de cls Elliptic Curve Diffie-Hellman
    ADH tous les algorithmes +utilisant l'change de cls Diffie-Hellman anonymes
    AECDH tous les algorithmes +utilisant l'change de cls Elliptic Curve Diffie-Hellman
    SRP tous les algorithmes utilisant +l'change de cls avec mot de passe distant scuris (SRP)
    DSS tous les algorithmes +utilisant l'authentification DSS
    ECDSA tous les algorithmes +utilisant l'authentification ECDSA
    aNULL tous les algorithmes +n'utilisant aucune authentification
    +

    +Cela devient intressant lorsque tous ces symboles sont combins +ensemble pour spcifier les algorithmes disponibles et l'ordre dans +lequel vous voulez les utiliser. Pour simplifier tout cela, vous +disposez aussi d'alias (SSLv3, TLSv1, EXP, LOW, MEDIUM, +HIGH) pour certains groupes d'algorithmes. Ces symboles peuvent +tre relis par des prfixes pour former la chane algorithmes. +Les prfixes disponibles sont :

    +
      +
    • none: ajoute l'algorithme la liste
    • +
    • +: dplace les algorithmes qui conviennent la +place courante dans la liste
    • +
    • -: supprime l'algorithme de la liste (peut tre rajout +plus tard)
    • +
    • !: supprime dfinitivement l'algorithme de la liste (ne +peut plus y tre rajout plus tard)
    • +
    + +
    +

    Les algorithmes aNULL, eNULL et +EXP sont toujours dsactivs

    +

    Depuis la version 2.4.7, les +algorithmes de type null ou destins l'exportation sont toujours +dsactivs car mod_ssl ajoute obligatoirement +!aNULL:!eNULL:!EXP toute chane d'algorithme de +chiffrement l'initialisation.

    +
    + +

    Pour vous simplifier la vie, vous pouvez utiliser la commande +``openssl ciphers -v'' qui vous fournit un moyen simple de +crer la chane algorithmes avec succs. La chane +algorithmes par dfaut dpend de la version des bibliothques +SSL installes. Supposons qu'elle contienne +``RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'', ce qui +stipule de mettre RC4-SHA et AES128-SHA en +premiers, car ces algorithmes prsentent un bon compromis entre vitesse +et scurit. Viennent ensuite les algorithmes de scurit leve et +moyenne. En fin de compte, les algorithmes qui n'offrent aucune +authentification sont exclus, comme les algorithmes anonymes +Diffie-Hellman pour SSL, ainsi que tous les algorithmes qui utilisent +MD5 pour le hashage, car celui-ci est reconnu comme +insuffisant.

    +
    $ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'
    +RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=SHA1
    +AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
    +DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
    +...                     ...               ...     ...           ...
    +SEED-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=SEED(128) Mac=SHA1
    +PSK-RC4-SHA             SSLv3 Kx=PSK      Au=PSK  Enc=RC4(128)  Mac=SHA1
    +KRB5-RC4-SHA            SSLv3 Kx=KRB5     Au=KRB5 Enc=RC4(128)  Mac=SHA1
    +

    Vous trouverez la liste complte des algorithmes RSA & DH +spcifiques SSL dans la Table 2.

    +

    Exemple

    SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Symbole algorithme ProtocoleEchange de cls Authentification ChiffrementCondens MAC Type
    Algorithmes RSA :
    DES-CBC3-SHA SSLv3 RSA RSA 3DES(168) SHA1
    IDEA-CBC-SHA SSLv3 RSA RSA IDEA(128) SHA1
    RC4-SHA SSLv3 RSA RSA RC4(128) SHA1
    RC4-MD5 SSLv3 RSA RSA RC4(128) MD5
    DES-CBC-SHA SSLv3 RSA RSA DES(56) SHA1
    EXP-DES-CBC-SHA SSLv3 RSA(512) RSA DES(40) SHA1 export
    EXP-RC2-CBC-MD5 SSLv3 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv3 RSA(512) RSA RC4(40) MD5 export
    NULL-SHA SSLv3 RSA RSA None SHA1
    NULL-MD5 SSLv3 RSA RSA None MD5
    Algorithmes Diffie-Hellman :
    ADH-DES-CBC3-SHA SSLv3 DH None 3DES(168) SHA1
    ADH-DES-CBC-SHA SSLv3 DH None DES(56) SHA1
    ADH-RC4-MD5 SSLv3 DH None RC4(128) MD5
    EDH-RSA-DES-CBC3-SHA SSLv3 DH RSA 3DES(168) SHA1
    EDH-DSS-DES-CBC3-SHA SSLv3 DH DSS 3DES(168) SHA1
    EDH-RSA-DES-CBC-SHA SSLv3 DH RSA DES(56) SHA1
    EDH-DSS-DES-CBC-SHA SSLv3 DH DSS DES(56) SHA1
    EXP-EDH-RSA-DES-CBC-SHA SSLv3 DH(512) RSA DES(40) SHA1 export
    EXP-EDH-DSS-DES-CBC-SHA SSLv3 DH(512) DSS DES(40) SHA1 export
    EXP-ADH-DES-CBC-SHA SSLv3 DH(512) None DES(40) SHA1 export
    EXP-ADH-RC4-MD5 SSLv3 DH(512) None RC4(40) MD5 export
    + +
    +
    top
    +

    Directive SSLCompression

    + + + + + + + + +
    Description:Permet d'activer la compression au niveau SSL
    Syntaxe:SSLCompression on|off
    Dfaut:SSLCompression off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible partir de la version 2.4.3 du serveur HTTP +Apache, si on utilise une version d'OpenSSL 0.9.8 ou suprieure ; +l'utilisation dans un contexte de serveur virtuel n'est disponible que +si on utilise une version d'OpenSSL 1.0.0 ou suprieure. La valeur par +dfaut tait on dans la version 2.4.3.
    +

    Cette directive permet d'activer la compression au niveau SSL.

    +
    +

    L'activation de la compression est l'origine de problmes de +scurit dans la plupart des configurations (l'attaque nomme CRIME).

    +
    + +
    +
    top
    +

    Directive SSLCryptoDevice

    + + + + + + + +
    Description:Active l'utilisation d'un acclrateur matriel de +chiffrement
    Syntaxe:SSLCryptoDevice moteur
    Dfaut:SSLCryptoDevice builtin
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet d'activer l'utilisation d'une carte acclratrice +de chiffrement qui prendra en compte certaines parties du traitement +relatif SSL. Cette directive n'est utilisable que si la bote +outils SSL t compile avec le support "engine" ; les versions 0.9.7 +et suprieures d'OpenSSL possdent par dfaut le support "engine", alors +qu'avec la version 0.9.6, il faut utiliser les distributions spares +"-engine".

    + +

    Pour dterminer les moteurs supports, excutez la commande +"openssl engine".

    + +

    Exemple

    # Pour un acclrateur Broadcom :
    +SSLCryptoDevice ubsec
    +
    + +
    +
    top
    +

    Directive SSLEngine

    + + + + + + + +
    Description:Interrupteur marche/arrt du moteur SSL
    Syntaxe:SSLEngine on|off|optional
    Dfaut:SSLEngine off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet d'activer/dsactiver le moteur du protocole +SSL/TLS. Elle doit tre utilise dans une section <VirtualHost> pour activer +SSL/TLS pour ce serveur virtuel particulier. Par dfaut, le moteur du +protocole SSL/TLS est dsactiv pour le serveur principal et tous les +serveurs virtuels configurs.

    +

    Exemple

    <VirtualHost _default_:443>
    +SSLEngine on
    +#...
    +</VirtualHost>
    +
    +

    Depuis la version 2.1 d'Apache, la directive +SSLEngine peut tre dfinie +optional, ce qui active le support de RFC 2817, Upgrading to +TLS Within HTTP/1.1. Pour le moment, aucun navigateur web ne supporte +RFC 2817.

    + +
    +
    top
    +

    Directive SSLFIPS

    + + + + + + + +
    Description:Coimmutateur du mode SSL FIPS
    Syntaxe:SSLFIPS on|off
    Dfaut:SSLFIPS off
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet d'activer/dsactiver l'utilisation du drapeau +FIPS_mode de la bibliothque SSL. Elle doit tre dfinie dans le +contexte du serveur principal, et n'accepte pas les configurations +sources de conflits (SSLFIPS on suivi de SSLFIPS off par exemple). Le +mode s'applique toutes les oprations de la bibliothque SSL. +

    +

    +Si httpd a t compil avec une bibliothque SSL qui ne supporte pas le +drapeau FIPS_mode, la directive SSLFIPS on chouera. +Reportez-vous au document sur la politique de scurit FIPS 140-2 de la +bibliothque du fournisseur SSL, pour les prrequis spcifiques +ncessaires l'utilisation de mod_ssl selon un mode d'opration +approuv par FIPS 140-2 ; notez que mod_ssl en lui-mme n'est pas +valid, mais peut tre dcrit comme utilisant un module de chiffrement +valid par FIPS 140-2, lorsque tous les composants sont assembls et mis +en oeuvre selon les recommandations de la politique de scurit +applicable. +

    + +
    +
    top
    +

    Directive SSLHonorCipherOrder

    + + + + + + + +
    Description:Option permettant de classer les algorithmes de chiffrement +du serveur par ordre de prfrence
    Syntaxe:SSLHonorCipherOrder on|off
    Dfaut:SSLHonorCipherOrder off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Normalement, ce sont les prfrences du client qui sont prises en +compte lors du choix d'un algorithme de chiffrement au cours d'une +ngociation SSLv3 ou TLSv1. Si cette directive est active, ce sont les +prfrences du serveur qui seront prises en compte la place.

    +

    Exemple

    SSLHonorCipherOrder on
    +
    + +
    +
    top
    +

    Directive SSLInsecureRenegotiation

    + + + + + + + + +
    Description:Option permettant d'activer le support de la rengociation +non scurise
    Syntaxe:SSLInsecureRenegotiation on|off
    Dfaut:SSLInsecureRenegotiation off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis httpd 2.2.15, si une version 0.9.8m +ou suprieure d'OpenSSL est utilise
    +

    Comme il a t spcifi, toutes les versions des protocoles SSL et +TLS (jusqu' la version 1.2 de TLS incluse) taient vulnrables une +attaque de type Man-in-the-Middle (CVE-2009-3555) +au cours d'une rengociation. Cette vulnrabilit permettait un +attaquant de prfixer la requte HTTP (telle qu'elle tait vue du +serveur) avec un texte choisi. Une extension du protocole a t +dveloppe pour corriger cette vulnrabilit, sous rserve qu'elle soit +supporte par le client et le serveur.

    + +

    Si mod_ssl est li une version 0.9.8m ou +suprieure d'OpenSSL, par dfaut, la rengociation n'est accorde qu'aux +clients qui supportent la nouvelle extension du protocole. Si +cette directive est active, la rengociation sera accorde aux anciens +clients (non patchs), quoique de manire non scurise

    + +

    Avertissement propos de la scurit

    +

    Si cette directive est active, les connexions SSL seront vulnrables +aux attaques de type prfixe Man-in-the-Middle comme dcrit dans CVE-2009-3555.

    +
    + +

    Exemple

    SSLInsecureRenegotiation on
    +
    + +

    La variable d'environnement SSL_SECURE_RENEG peut tre +utilise dans un script SSI ou CGI pour dterminer si la rengociation +scurise est supporte pour une connexion SSL donne.

    + + +
    +
    top
    +

    Directive SSLOCSPDefaultResponder

    + + + + + + +
    Description:Dfinit l'URI du rpondeur par dfaut pour la validation +OCSP
    Syntaxe:SSLOCSDefaultResponder uri
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette directive permet de dfinir le rpondeur OCSP par dfaut. Si la +directive SSLOCSPOverrideResponder n'est pas active, +l'URI spcifi ne sera utilis que si aucun URI de rpondeur n'est +spcifi dans le certificat en cours de vrification.

    + +
    +
    top
    +

    Directive SSLOCSPEnable

    + + + + + + + +
    Description:Active la validation OCSP de la chane de certificats du +client
    Syntaxe:SSLOCSPEnable on|off
    Dfaut:SSLOCSPEnable off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette directive permet d'activer la validation OCSP de la chane de +certificats du client. Si elle est active, les certificats de la chane +de certificats du client seront valids auprs d'un rpondeur OCSP, une +fois la vrification normale effectue (vrification des CRLs +incluse).

    + +

    Le rpondeur OCSP utilis est soit extrait du certificat lui-mme, +soit spcifi dans la configuration ; voir les directives SSLOCSPDefaultResponder et SSLOCSPOverrideResponder.

    + +

    Exemple

    SSLVerifyClient on
    +SSLOCSPEnable on
    +SSLOCSPDefaultResponder "http://responder.example.com:8888/responder"
    +SSLOCSPOverrideResponder on
    +
    + +
    +
    top
    +

    Directive SSLOCSPOverrideResponder

    + + + + + + + +
    Description:Force l'utilisation de l'URI du rpondeur par dfaut pour +la validation OCSP
    Syntaxe:SSLOCSPOverrideResponder on|off
    Dfaut:SSLOCSPOverrideResponder off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Force l'utilisation, au cours d'une validation OCSP de certificat, du +rpondeur OCSP par dfaut spcifi dans la configuration, que le +certificat en cours de vrification fasse mention d'un rpondeur OCSP ou +non.

    + +
    +
    top
    +

    Directive SSLOCSPProxyURL

    + + + + + + + +
    Description:Adresse de mandataire utiliser pour les requtes OCSP
    Syntaxe:SSLOCSPProxyURL url
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible partir de la version 2.4.19 du serveur HTTP Apache
    +

    Cette directive permet de dfinir l'URL d'un mandataire HTTP qui devra tre +utilis pour toutes les requtes vers un rpondeur OCSP.

    + +
    +
    top
    +

    Directive SSLOCSPResponderTimeout

    + + + + + + + +
    Description:Dlai d'attente pour les requtes OCSP
    Syntaxe:SSLOCSPResponderTimeout secondes
    Dfaut:SSLOCSPResponderTimeout 10
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette option permet de dfinir le dlai d'attente pour les requtes +destination des rpondeurs OCSP, lorsque la directive SSLOCSPEnable est on.

    + +
    +
    top
    +

    Directive SSLOCSPResponseMaxAge

    + + + + + + + +
    Description:Age maximum autoris pour les rponses OCSP
    Syntaxe:SSLOCSPResponseMaxAge secondes
    Dfaut:SSLOCSPResponseMaxAge -1
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette option permet de dfinir l'ge maximum autoris (la +"fraicheur") des rponses OCSP. La valeur par dfault (-1) +signifie qu'aucun ge maximum n'est dfini ; autrement dit, les +rponses OCSP sont considres comme valides tant que la valeur de leur +champ nextUpdate se situe dans le futur.

    + +
    +
    top
    +

    Directive SSLOCSPResponseTimeSkew

    + + + + + + + +
    Description:Drive temporelle maximale autorise pour la validation des +rponses OCSP
    Syntaxe:SSLOCSPResponseTimeSkew secondes
    Dfaut:SSLOCSPResponseTimeSkew 300
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    Cette option permet de dfinir la drive temporelle maximale +autorise pour les rponses OCSP (lors de la vrification des champs +thisUpdate et nextUpdate).

    + +
    +
    top
    +

    Directive SSLOCSPUseRequestNonce

    + + + + + + + + +
    Description:Use a nonce within OCSP queries
    Syntaxe:SSLOCSPUseRequestNonce on|off
    Dfaut:SSLOCSPUseRequestNonce on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Available in httpd 2.4.10 and later

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top
    +

    Directive SSLOpenSSLConfCmd

    + + + + + + + +
    Description:Configuration des paramtres d'OpenSSL via son API SSL_CONF
    Syntaxe:SSLOpenSSLConfCmd commande valeur
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis la version 2.4.8 du serveur HTTP +Apache avec OpenSSL 1.0.2 ou suprieur
    +

    Cette directive permet mod_ssl d'accder l'API SSL_CONF +d'OpenSSL. Il n'est ainsi plus ncessaire d'implmenter des +directives supplmentaires pour mod_ssl lorsque de nouvelles +fonctionnalits sont ajoutes OpenSSL, ce qui rend la configuration de +ce dernier beaucoup plus souple.

    + +

    Le jeu de commandes disponibles pour la directive +SSLOpenSSLConfCmd dpend de la version d'OpenSSL +utilise pour mod_ssl (la version minimale 1.0.2 est un +prrequis). Pour obtenir la liste des commandes supportes, voir la +section Supported configuration file commands de la page de +manuel d'OpenSSL SSL_CONF_cmd(3).

    + +

    Certaines commandes peuvent remplacer des directives existantes +(comme SSLCipherSuite ou +SSLProtocol) ; notez cependant +que la syntaxe et/ou les valeurs possibles peuvent diffrer.

    + +

    Examples

    SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference
    +SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1
    +SSLOpenSSLConfCmd ServerInfoFile
    +"/usr/local/apache2/conf/server-info.pem"
    +SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2"
    +SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256
    +
    + +
    +
    top
    +

    Directive SSLOptions

    + + + + + + + +
    Description:Configure diffrentes options d'excution du moteur SSL
    Syntaxe:SSLOptions [+|-]option ...
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:Options
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de contrler diffrentes options d'excution du +moteur SSL dans un contexte de rpertoire. Normalement, si plusieurs +SSLOptions peuvent s'appliquer un rpertoire, c'est la +plus spcifique qui est vritablement prise en compte ; les options ne +se combinent pas entre elles. Elles se combinent cependant entre elles +si elles sont toutes prcdes par un symbole plus +(+) ou moins (-). Toute option prcde d'un ++ est ajoute aux options actuellement en vigueur, et toute +option prcde d'un - est supprime de ces mmes +options. +

    +

    +Les options disponibles sont :

    +
      +
    • StdEnvVars +

      + Lorsque cette option est active, le jeu standard de variables + d'environnement SSL relatives CGI/SSI est cr. Cette option est + dsactive par dfaut pour des raisons de performances, car + l'extraction des informations constitue une opration assez coteuse + en ressources. On n'active donc en gnral cette option que pour les + requtes CGI et SSI.

      +
    • +
    • ExportCertData +

      + Lorsque cette option est active, des variables d'environnement + CGI/SSI supplmentaires sont cres : SSL_SERVER_CERT, + SSL_CLIENT_CERT et + SSL_CLIENT_CERT_CHAIN_n (avec n = + 0,1,2,..). Elles contiennent les certificats X.509 cods en PEM du + serveur et du client pour la connexion HTTPS courante, et peuvent + tre utilises par les scripts CGI pour une vrification de + certificat plus labore. De plus, tous les autres certificats de la + chane de certificats du client sont aussi fournis. Tout ceci gonfle + un peu l'environnement, et c'est la raison pour laquelle vous ne + devez activer cette option qu' la demande.

      +
    • +
    • FakeBasicAuth +

      + Lorsque cette option est active, le Nom Distinctif (DN) sujet du + certificat client X509 est traduit en un nom d'utilisateur pour + l'autorisation HTTP de base. Cela signifie que les mthodes + d'authentification standard d'Apache peuvent tre utilises pour le + contrle d'accs. Le nom d'utilisateur est tout simplement le Sujet + du certificat X509 du client (il peut tre dtermin en utilisant la + commande OpenSSL openssl x509 : openssl x509 + -noout -subject -in certificat.crt). + Notez qu'aucun mot de passe n'est envoy par l'utilisateur. Chaque + entre du fichier des utilisateurs doit comporter ce mot de passe : + ``xxj31ZMTZzkVA'', qui est la version chiffre en DES + du mot ``password''. Ceux qui travaillent avec un + chiffrement bas sur MD5 (par exemple sous FreeBSD ou BSD/OS, + etc...) doivent utiliser le condens MD5 suivant pour le mme mot : + ``$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/''.

      + +

      Notez que la directive AuthBasicFake implmente par le + module mod_auth_basic peut tre utilise d'une + manire plus gnrale comme simulation d'authentification basique, + ce qui permet de contrler la structure nom utilisateur/mot de + passe.

      +
    • +
    • StrictRequire +

      + Cette option force l'interdiction d'accs lorsque + SSLRequireSSL ou SSLRequire a dcid que + l'accs devait tre interdit. Par dfaut, dans le cas o + une directive ``Satisfy any'' est utilise, et si + d'autres restrictions d'accs ont t franchies, on passe en gnral + outre l'interdiction d'accs due SSLRequireSSL ou + SSLRequire (parce que c'est ainsi que le mcanisme + Satisfy d'Apache doit fonctionner). Pour des + restrictions d'accs plus strictes, vous pouvez cependant utiliser + SSLRequireSSL et/ou SSLRequire en + combinaison avec une option ``SSLOptions + +StrictRequire''. Une directive ``Satisfy Any'' + n'a alors aucune chance d'autoriser l'accs si mod_ssl a dcid de + l'interdire.

      +
    • +
    • OptRenegotiate +

      + Cette option active la gestion optimise de la rengociation des + connexions SSL intervenant lorsque les directives SSL sont utilises + dans un contexte de rpertoire. Par dfaut un schma strict est + appliqu, et chaque reconfiguration des paramtres SSL au + niveau du rpertoire implique une phase de rengociation SSL + complte. Avec cette option, mod_ssl essaie d'viter les + changes non ncessaires en effectuant des vrifications de + paramtres plus granulaires (mais tout de mme efficaces). + Nanmoins, ces vrifications granulaires peuvent ne pas correspondre + ce qu'attend l'utilisateur, et il est donc recommand de n'activer + cette option que dans un contexte de rpertoire.

      +
    • +
    • LegacyDNStringFormat +

      + Cette option permet d'agir sur la manire dont les valeurs des + variables SSL_{CLIENT,SERVER}_{I,S}_DN sont formates. + Depuis la version 2.3.11, Apache HTTPD utilise par dfaut un format + compatible avec la RFC 2253. Ce format utilise des virgules comme + dlimiteurs entre les attributs, permet l'utilisation de caractres + non-ASCII (qui sont alors convertis en UTF8), chappe certains + caractres spciaux avec des slashes inverss, et trie les attributs + en plaant l'attribut "C" en dernire position.

      + +

      Si l'option LegacyDNStringFormat est prsente, c'est + l'ancien format qui sera utilis : les attributs sont tris avec + l'attribut "C" en premire position, les sparateurs sont des + slashes non inverss, les caractres non-ASCII ne sont pas supports + et le support des caractres spciaux n'est pas fiable. +

      +
    • +
    +

    Exemple

    SSLOptions +FakeBasicAuth -StrictRequire
    +<Files ~ "\.(cgi|shtml)$">
    +    SSLOptions +StdEnvVars -ExportCertData
    +</Files>
    +
    + +
    +
    top
    +

    Directive SSLPassPhraseDialog

    + + + + + + + +
    Description:Mthode utilise pour entrer le mot de passe pour les cls +prives chiffres
    Syntaxe:SSLPassPhraseDialog type
    Dfaut:SSLPassPhraseDialog builtin
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    +

    +Lors de son dmarrage, Apache doit lire les diffrents fichiers de +certificats (voir la directive SSLCertificateFile) et de cls prives +(voir la directive SSLCertificateKeyFile) des serveurs +virtuels o SSL est activ. Comme, pour des raisons de scurit, les +fichiers de cls prives sont en gnral chiffrs, mod_ssl doit +demander l'administrateur un mot de passe pour dchiffrer ces +fichiers. L'argument type permet de choisir la manire dont +cette demande peut tre formule parmi les trois suivantes :

    +
      +
    • builtin +

      + C'est la mthode par dfaut, et un dialogue interactive de terminal + s'ouvre au cours du dmarrage juste avant qu'Apache ne se dtache du + terminal. A ce moment, l'administrateur doit entrer manuellement un + mot de passe pour chaque fichier de cl prive chiffr. Etant donn + qu'il peut y avoir un grand nombre de serveurs virtuels configurs + avec SSL activ, le protocole de rutilisation suivant est utilis + pour minimiser le dialogue : lorsqu'un fichier de cl prive est + chiffr, tous les mots de passe connus (au dbut, il n'y en a aucun, + bien entendu) sont essays. Si l'un de ces mots de passe connus + convient, aucun dialogue ne s'ouvrira pour ce fichier de + cl prive particulier. Si aucun ne convient, un autre mot de passe + sera demand partir du terminal et sera mis en mmoire pour le + fichier de cl prive suivant (pour lequel il pourra ventuellement + tre rutilis).

      +

      + Cette mthode confre mod_ssl une grande souplesse (car pour N + fichiers de cl prive chiffrs, vous pouvez utiliser N + mots de passe diffrents - mais vous devrez alors tous les fournir, + bien entendu), tout en minimisant le dialogue de terminal (vous + pouvez en effet utiliser un seul mot de passe pour les N fichiers de + cl prive et vous n'aurez alors l'entrer qu'une seule + fois).

    • + +
    • |/chemin/vers/programme [arguments...] + +

      Ce mode permet d'utiliser un programme externe qui va se prsenter + comme une redirection vers un priphrique d'entre particulier ; le + texte de prompt standard utilis pour le mode builtin + est envoy au programme sur stdin, et celui-ci doit + renvoyer des mots de passe sur stdout. Si + plusieurs mots de passe sont requis (ou si un mot de passe incorrect + a t entr), un texte de prompt supplmentaire sera crit aprs le + retour du premier mot de passe, et d'autres mots de passe devront + alors tre rcrits.

    • + +
    • exec:/chemin/vers/programme +

      + Ici, un programme externe est appel au dmarrage du serveur pour + chaque fichier de cl prive chiffr.Il est appel avec deux + arguments (le premier est de la forme + ``nom-serveur:port'', le second + est ``RSA'', ``DSA'', ``ECC'' + ou un index entier commenant 3 si plus de 3 cls ont t + configures), qui + indiquent pour quels serveur et algorithme il doit crire le mot de + passe correspondant sur stdout. Avec les versions 2.4.8 + (non ralise) et + 2.4.9, il est appel avec un seul argument, une chane de la forme + "servername:portnumber:index" (o index + est un nombre entier commenant zro), qui spcifie le serveur, + le port TCP et un numro de certificat. Le but recherch est + l'excution de vrifications de scurit pralables permettant de + s'assurer que le systme n'est pas victime d'une attaque, et de ne + fournir le mot de passe que si toutes les vrifications ont t + effectues avec succs.

      +

      + Ces vrifications de scurit, ainsi que la manire dont le mot de + passe est dtermin peuvent tre aussi sophistiqus que vous le + dsirez. Mod_ssl ne dfinit que l'interface : un programme + excutable qui crit le mot de passe sur stdout. Ni + plus, ni moins ! Ainsi, si vous tes vraiment paranoaque en matire + de scurit, voici votre interface. Tout le reste doit tre confi + l'administrateur titre d'exercice, car les besoins en scurit + locale sont trs diffrents.

      +

      + L'algorithme de rutilisation est utilis ici aussi. En d'autres + termes, le programme externe n'est appel qu'une fois par mot de + passe unique.

    • +
    +

    Exemple

    SSLPassPhraseDialog "exec:/usr/local/apache/sbin/pp-filter"
    +
    + +
    +
    top
    +

    Directive SSLProtocol

    + + + + + + + +
    Description:Indique les versions du protocole SSL/TLS +disponibles
    Syntaxe:SSLProtocol [+|-]protocole ...
    Dfaut:SSLProtocol all -SSLv3 (jusqu' la version 2.4.16 : all)
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir quelles versions du protocole SSL/TLS +seront acceptes lors de l'initialisation d'une nouvelle connexion.

    +

    +Les protocoles disponibles sont les suivants (sensibles la +casse) :

    +
      +
    • SSLv3 +

      + Il s'agit du protocole Secure Sockets Layer (SSL) version 3.0 de + Netscape Corporation. C'est le successeur de SSLv2 et le + prdcesseur de TLSv1, mais est considr comme + obsolte dans la RFC + 7568

    • + +
    • TLSv1 +

      + Il s'agit du protocole Transport Layer Security (TLS) version 1.0. + C'est le successeur de SSLv3, et il est dfini dans la RFC2246. Il est + support par la plupart des clients.

    • + +
    • TLSv1.1 ( partir de la version 1.0.1 d'OpenSSL) +

      + Une rvision du protocole TLS 1.0 dfinie dans la RFC 4346.

    • + +
    • TLSv1.2 ( partir de la version 1.0.1 d'OpenSSL) +

      + Une rvision du protocole TLS 1.1 dfinie dans la RFC 5246.

    • + +
    • all +

      + C'est un raccourci pour ``+SSLv3 +TLSv1'' ou - partir + de la version 1.0.1 d'OpenSSL - ``+SSLv3 +TLSv1 +TLSv1.1 + +TLSv1.2'' (sauf si OpenSSL a t compil avec l'option + ``no-ssl3'', auquel cas all n'inclura pas + +SSLv3).

    • +
    +

    Exemple

    SSLProtocol TLSv1
    +
    + +
    +
    top
    +

    Directive SSLProxyCACertificateFile

    + + + + + + +
    Description:Fichier contenant la concatnation des certificats de CA +cods en PEM pour l'authentification des serveurs distants
    Syntaxe:SSLProxyCACertificateFile file-path
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier tout-en-un o sont +stocks les certificats des Autorits de Certification (CA) pour les +serveurs distants auxquels vous avez faire. On les utilise +lors de l'authentification du serveur distant. Un tel fichier contient +la simple concatnation des diffrents fichiers de certificats cods en +PEM, classs par ordre de prfrence. On peut utiliser cette directive +la place et/ou en complment de la directive SSLProxyCACertificatePath.

    +

    Exemple

    SSLProxyCACertificateFile
    +"/usr/local/apache2/conf/ssl.crt/ca-bundle-serveur.distant.crt"
    +
    + +
    +
    top
    +

    Directive SSLProxyCACertificatePath

    + + + + + + +
    Description:Rpertoire des certificats de CA cods en PEM pour +l'authentification des serveurs distants
    Syntaxe:SSLProxyCACertificatePath chemin-rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de spcifier le rpertoire o sont stocks les +certificats des Autorits de Certification (CAs) pour les serveurs +distants auxquels vous avez faire. On les utilise pour vrifier le +certificat du serveur distant lors de l'authentification de ce +dernier.

    +

    +Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce rpertoire +: vous devez aussi crer des liens symboliques nomms +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +

    Exemple

    SSLProxyCACertificatePath "/usr/local/apache2/conf/ssl.crt/"
    +
    + +
    +
    top
    +

    Directive SSLProxyCARevocationCheck

    + + + + + + + +
    Description:Active la vrification des rvocations base sur les CRLs +pour l'authentification du serveur distant
    Syntaxe:SSLProxyCARevocationCheck chain|leaf|none
    Dfaut:SSLProxyCARevocationCheck none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Active la vrification des rvocations base sur les Listes de +rvocations de Certificats (CRL) pour les serveurs distants +auxquels vous vous connectez. A moins une des directives SSLProxyCARevocationFile ou SSLProxyCARevocationPath doit tre dfinie. +Lorsque cette directive est dfinie chain (valeur +recommande), les vrifications CRL sont effectues sur tous les +certificats de la chane, alors que la valeur leaf limite +la vrification au certificat hors chane (la feuille). +

    +
    +

    Lorsque la directive est dfinie chain ou +leaf, les CRLs doivent tre disponibles pour que la +validation russisse

    +

    +Avant la version 2.3.15, les vrifications CRL dans mod_ssl +russissaient mme si aucune CRL n'tait trouve dans les chemins +dfinis par les directives SSLProxyCARevocationFile ou SSLProxyCARevocationPath. Le comportement a +chang avec l'introduction de cette directive : lorsque la vrification +est active, les CRLs doivent tre prsentes pour que la +validation russisse ; dans le cas contraire, elle chouera avec une +erreur "CRL introuvable". +

    +
    +

    Exemple

    SSLProxyCARevocationCheck chain
    +
    + +
    +
    top
    +

    Directive SSLProxyCARevocationFile

    + + + + + + +
    Description:Fichier contenant la concatnation des CRLs de CA cods en +PEM pour l'authentification des serveurs distants
    Syntaxe:SSLProxyCARevocationFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier tout-en-un o sont +rassembles les Listes de Rvocation de Certificats (CRLs) des Autorits +de certification (CAs) pour les serveurs distants auxquels vous +avez faire. On les utilise pour l'authentification des serveurs +distants. Un tel fichier contient la simple concatnation des diffrents +fichiers de CRLs cods en PEM, classs par ordre de prfrence. Cette +directive peut tre utilise la place et/ou en complment de la +directive SSLProxyCARevocationPath.

    +

    Exemple

    SSLProxyCARevocationFile
    +"/usr/local/apache2/conf/ssl.crl/ca-bundle-serveur.distant.crl"
    +
    + +
    +
    top
    +

    Directive SSLProxyCARevocationPath

    + + + + + + +
    Description:Rpertoire des CRLs de CA cods en PEM pour +l'authentification des serveurs distants
    Syntaxe:SSLProxyCARevocationPath chemin-rpertoire
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le rpertoire o sont stockes les +Listes de Rvocation de Certificats (CRL) des Autorits de Certification +(CAs) pour les serveurs distants auxquels vous avez faire. On les +utilise pour rvoquer les certificats des serveurs distants au cours de +l'authentification de ces derniers.

    +

    +Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Il ne +suffit donc pas de placer les fichiers de CRL dans ce rpertoire +: vous devez aussi crer des liens symboliques nomms +valeur-de-hashage.rN, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +

    Exemple

    SSLProxyCARevocationPath "/usr/local/apache2/conf/ssl.crl/"
    +
    + +
    +
    top
    +

    Directive SSLProxyCheckPeerCN

    + + + + + + + +
    Description:Configuration de la vrification du champ CN du certificat +du serveur distant +
    Syntaxe:SSLProxyCheckPeerCN on|off
    Dfaut:SSLProxyCheckPeerCN on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir si le champ CN du certificat du serveur +distant doit tre compar au nom de serveur de l'URL de la requte. S'ils ne +correspondent pas, un code d'tat 502 (Bad Gateway) est envoy. A partir de la +version 2.4.5, SSLProxyCheckPeerCN a t remplac par SSLProxyCheckPeerName. +

    +

    +De la version 2.4.5 la version 2.4.20, spcifier SSLProxyCheckPeerName +off tait suffisant pour obtenir ce comportement (car la valeur par +dfaut de SSLProxyCheckPeerCN tait on). Avec ces +versions, les deux directives doivent tre dfinies off pour +viter toute validation du nom de certificat du serveur distant, et de +nombreux utilisateurs ont signal ce comportement comme trs perturbant. +

    +

    +A partir de la version 2.4.21, toutes les configurations qui activent au moins +une des deux directives SSLProxyCheckPeerName ou +SSLProxyCheckPeerCN adopteront le nouveau comportement de la +directive SSLProxyCheckPeerName, et +toutes les configurations qui dsactivent une des deux directives +SSLProxyCheckPeerName ou SSLProxyCheckPeerCN +viteront toute validation du nom de certificat du serveur distant. Seule la +configuration suivante permettra de retrouver la comparaison de CN +traditionnelle pour les versions 2.4.21 et suprieures : +

    +

    Exemple

    SSLProxyCheckPeerCN on
    +SSLProxyCheckPeerName off
    +
    + +
    +
    top
    +

    Directive SSLProxyCheckPeerExpire

    + + + + + + + +
    Description:Configuration de la vrification de l'expiration du +certificat du serveur distant +
    Syntaxe:SSLProxyCheckPeerExpire on|off
    Dfaut:SSLProxyCheckPeerExpire on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir si l'expiration du certificat du +serveur distant doit tre vrifie ou non. Si la vrification choue, un +code d'tat 502 (Bad Gateway) est envoy. +

    +

    Exemple

    SSLProxyCheckPeerExpire on
    +
    + +
    +
    top
    +

    Directive SSLProxyCheckPeerName

    + + + + + + + + +
    Description:Configure la vrification du nom d'hte dans les +certificats serveur distants +
    Syntaxe:SSLProxyCheckPeerName on|off
    Dfaut:SSLProxyCheckPeerName on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    +Cette directive permet de configurer la vrification du nom d'hte pour +les certificats serveur lorsque mod_ssl agit en tant que client SSL. La +vrification russit si le nom d'hte de l'URI de la requte correspond un +des attributs CN du sujet du certificat, ou l'extension subjectAltName. Si la +vrification choue, la requte SSL +avorte, et un code d'erreur 502 (Bad Gateway) est renvoy. +

    +

    +Les caractres gnriques sont supports dans certains cas bien spcifiques : +une entre subjectAltName de type dNSName ou les attributs CN +commenant par *. correspondront tout nom d'hte comportant +le mme nombre de champs et le mme suffixe ; par exemple, +*.example.org correspondra foo.example.org, +mais pas foo.bar.example.org car le nombre d'lments dans les +nom est diffrent. +

    +

    +Cette fonctionnalit a t introduite avec la version 2.4.5 et l'emporte sur la +directive SSLProxyCheckPeerCN qui ne +comparait que la valeur exacte du premier attribut CN avec le nom d'hte. +Cependant, de nombreux utilisateurs taient dconcerts par le comportement +induit par l'utilisation de ces deux directives individuellement, si bien que ce +comportement a t amlior avec la version 2.4.21. Voir la description de la +directive SSLProxyCheckPeerCN pour le +comportement original et des dtails propos de ces amliorations. +

    + +
    +
    top
    +

    Directive SSLProxyCipherSuite

    + + + + + + + + +
    Description:Algorithmes de chiffrement disponibles pour la ngociation +lors de l'initialisation d'une connexion SSL de mandataire
    Syntaxe:SSLProxyCipherSuite algorithmes
    Dfaut:SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    Cette directive est quivalente la directive SSLCipherSuite, mais s'applique une connexion de +mandataire. Veuillez vous reporter la directive SSLCipherSuite pour plus d'informations.

    + +
    +
    top
    +

    Directive SSLProxyEngine

    + + + + + + + +
    Description:Interrupteur marche/arrt du moteur de mandataire +SSL
    Syntaxe:SSLProxyEngine on|off
    Dfaut:SSLProxyEngine off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet d'activer/dsactiver l'utilisation du moteur de +protocole SSL/TLS pour le mandataire. On l'utilise en gnral +l'intrieur d'une section <VirtualHost> pour activer le protocole SSL/TLS +dans le cadre d'un mandataire pour un serveur virtuel particulier. Par +dfaut, le moteur de protocole SSL/TLS est dsactiv pour la fonction de +mandataire du serveur principal et de tous les serveurs virtuels +configurs.

    + +

    Notez que la directive SSLProxyEngine ne doit +gnralement pas tre utilise dans le cadre d'un serveur virtuel qui agit en +tant que mandataire direct (via les directives <Proxy> ou ProxyRequests). +SSLProxyEngine n'est pas ncessaire pour activer un +serveur mandataire direct pour les requtes SSL/TLS.

    + + +

    Exemple

    <VirtualHost _default_:443>
    +    SSLProxyEngine on
    +    #...
    +</VirtualHost>
    +
    + +
    +
    top
    +

    Directive SSLProxyMachineCertificateChainFile

    + + + + + + + +
    Description:Fichier de certificats de CA encods PEM concatns permettant au +mandataire de choisir un certificat
    Syntaxe:SSLProxyMachineCertificateChainFile nom-fichier
    Contexte:configuration du serveur
    AllowOverride:Sans objet
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier global o est enregistre +la chane de certification pour tous les certificats clients utiliss. +Elle est ncessaire si le serveur distant prsente une liste de +certificats de CA qui ne sont pas les signataires directs d'un des +certificats clients configurs. +

    +

    +Ce fichier contient tout simplement la concatnation des diffrents +fichiers de certificats encods PEM. Au dmarrage, chaque certificat +client configur est examin et une chane de certification est +construite. +

    +

    Avertissement en matire de scurit

    +

    Si cette directive est dfinie, tous les certificats contenus dans le +fichier spcifi seront considrs comme tant de confiance, comme s'ils +taient aussi dsigns dans la directive SSLProxyCACertificateFile.

    +
    +

    Exemple

    SSLProxyMachineCertificateChainFile
    +"/usr/local/apache2/conf/ssl.crt/proxyCA.pem"
    +
    + +
    +
    top
    +

    Directive SSLProxyMachineCertificateFile

    + + + + + + + +
    Description:Fichier contenant la concatnation des cls et certificats +clients cods en PEM que le mandataire doit utiliser
    Syntaxe:SSLProxyMachineCertificateFile chemin-fichier
    Contexte:configuration du serveur
    AllowOverride:Sans objet
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le fichier tout-en-un o sont stocks +les cls et certificats permettant au serveur mandataire de +s'authentifier auprs des serveurs distants. +

    +

    +Le fichier spcifi est la simple concatnation des diffrents fichiers +de certificats cods en PEM, classs par ordre de prfrence. Cette +directive s'utilise la place ou en complment de la directive +SSLProxyMachineCertificatePath. +

    +
    +

    Actuellement, les cls prives chiffres ne sont pas supportes.

    +
    +

    Exemple

    SSLProxyMachineCertificateFile
    +"/usr/local/apache2/conf/ssl.crt/proxy.pem"
    +
    + +
    +
    top
    +

    Directive SSLProxyMachineCertificatePath

    + + + + + + + +
    Description:Rpertoire des cls et certificats clients cods en PEM que +le mandataire doit utiliser
    Syntaxe:SSLProxyMachineCertificatePath chemin-rpertoire
    Contexte:configuration du serveur
    AllowOverride:Sans objet
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le rpertoire o sont stocks les cls +et certificats permettant au serveur mandataire de s'authentifier auprs +des serveurs distants. +

    +

    Les fichiers de ce rpertoire doivent tre cods en PEM et ils sont +accds via des noms de fichier sous forme de condenss ou hash. Vous +devez donc aussi crer des liens symboliques nomms +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce rpertoire contient les liens symboliques appropris.

    +
    +

    Actuellement, les cls prives chiffres ne sont pas supportes.

    +
    +

    Exemple

    SSLProxyMachineCertificatePath "/usr/local/apache2/conf/proxy.crt/"
    +
    + +
    +
    top
    +

    Directive SSLProxyProtocol

    + + + + + + + + +
    Description:Dfinit les protocoles SSL disponibles pour la fonction de +mandataire
    Syntaxe:SSLProxyProtocol [+|-]protocole ...
    Dfaut:SSLProxyProtocol all -SSLv3 (jusqu' la version 2.4.16: all)
    Contexte:configuration du serveur, serveur virtuel
    AllowOverride:Options
    Statut:Extension
    Module:mod_ssl
    + +

    +Cette directive permet de dfinir les protocoles SSL que mod_ssl peut +utiliser lors de l'laboration de son environnement de serveur pour la +fonction de mandataire. Il ne se connectera qu'aux serveurs utilisant un +des protocoles spcifis.

    +

    Veuillez vous reporter la directive SSLProtocol pour plus d'informations. +

    + +
    +
    top
    +

    Directive SSLProxyVerify

    + + + + + + + +
    Description:Niveau de vrification du certificat du serveur +distant
    Syntaxe:SSLProxyVerify niveau
    Dfaut:SSLProxyVerify none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    + +

    Lorsqu'un mandataire est configur pour faire suivre les requtes +vers un serveur SSL distant, cette directive permet de configurer la +vrification du certificat de ce serveur distant.

    + +

    +Les valeurs de niveaux disponibles sont les suivantes :

    +
      +
    • none: + aucun certificat n'est requis pour le serveur distant
    • +
    • optional: + le serveur distant peut prsenter un certificat valide
    • +
    • require: + le serveur distant doit prsenter un certificat valide
    • +
    • optional_no_ca: + le serveur distant peut prsenter un certificat valide
      + mais il n'est pas ncessaire qu'il soit vrifiable (avec succs).
    • +
    +

    En pratique, seuls les niveaux none et +require sont vraiment intressants, car le niveau +optional ne fonctionne pas avec tous les serveurs, et +le niveau optional_no_ca va tout fait l'encontre de +l'ide que l'on peut se faire de l'authentification (mais peut tout de +mme tre utilis pour tablir des pages de test SSL, etc...).

    + +

    Exemple

    SSLProxyVerify require
    +
    + +
    +
    top
    +

    Directive SSLProxyVerifyDepth

    + + + + + + + + +
    Description:Niveau de profondeur maximum dans les certificats de CA +lors de la vrification du certificat du serveur distant
    Syntaxe:SSLProxyVerifyDepth niveau
    Dfaut:SSLProxyVerifyDepth 1
    Contexte:configuration du serveur, serveur virtuel
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le niveau de profondeur maximum +jusqu'auquel mod_ssl doit aller au cours de sa vrification avant de +dcider que le serveur distant ne possde pas de certificat valide.

    +

    +La profondeur correspond en fait au nombre maximum de fournisseurs de +certificats intermdiaires, c'est dire le nombre maximum de +certificats +de CA que l'on peut consulter lors de la vrification du certificat du +serveur distant. Une profondeur de 0 signifie que seuls les certificats +de serveurs distants auto-signs sont accepts, et la profondeur par +dfaut de 1 que le certificat du serveur distant peut tre soit +auto-sign, soit sign par une CA connue directement du serveur (en +d'autres termes, le certificat de CA est rfrenc par la directive +SSLProxyCACertificatePath), +etc...

    +

    Exemple

    SSLProxyVerifyDepth 10
    +
    + +
    +
    top
    +

    Directive SSLRandomSeed

    + + + + + + +
    Description:Source de dclenchement du Gnrateur de Nombres +Pseudo-Alatoires (PRNG)
    Syntaxe:SSLRandomSeed contexte source +[nombre]
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir une ou plusieurs sources de +dclenchement du Gnrateur de Nombres Pseudo-Alatoires (PRNG) dans +OpenSSL au dmarrage du serveur (si contexte a pour valeur +startup) et/ou juste avant l'tablissement d'une nouvelle +connexion SSL (si contexte a pour valeur connect). +Cette directive ne peut tre utilise qu'au niveau du serveur global car +le PRNG est un service global.

    +

    +Les diffrentes valeurs de source disponibles sont :

    +
      +
    • builtin +

      Cette source de dclenchement intgre est toujours disponible. + Son utilisation consomme un minimum de cycles CPU en cours + d'excution, et son utilisation ne prsente de ce fait aucun + problme. La source utilise pour dclencher le PRNG contient la + date courante, l'identifiant du processus courant et (si disponible) + un extrait de 1Ko alatoirement choisi de la structure d'Apache pour + les changes inter-processus. Ceci prsente un inconvnient car le + caractre alatoire de cette source n'est pas vraiment fort, et au + dmarrage (lorsque la structure d'changes n'est pas encore + disponible), cette source ne produit que quelques octets d'entropie. + Vous devez donc toujours utiliser une source de dclenchement + additionnelle, au moins pour le dmarrage.

    • +
    • file:/chemin/vers/source +

      + Cette variante utilise un fichier externe + file:/chemin/vers/source comme source de dclenchement + du PRNG. Lorsque nombre est spcifi, seuls les + nombre premiers octets du fichier forment l'entropie (et + nombre est fourni comme premier argument + /chemin/vers/source). Lorsque nombre n'est pas + spcifi, l'ensemble du fichier forme l'entropie (et 0 + est fourni comme premier argument + /chemin/vers/source). Utilisez cette source en + particulier au dmarrage, par exemple avec un fichier de + priphrique /dev/random et/ou + /dev/urandom (qui sont en gnral prsent sur les + plate-formes drives d'Unix modernes comme FreeBSD et Linux).

      +

      Soyez cependant prudent : en gnral, + /dev/random ne fournit que l'entropie dont il dispose + rellement ; en d'autres termes, lorsque vous demandez 512 octets + d'entropie, si le priphrique ne dispose que de 100 octets, deux + choses peuvent se produire : sur certaines plates-formes, vous ne + recevez que les 100 octets, alors que sur d'autres, la lecture se + bloque jusqu' ce qu'un nombre suffisant d'octets soit disponible + (ce qui peut prendre beaucoup de temps). Il est prfrable ici + d'utiliser le priphrique /dev/urandom, car il ne se + bloque jamais et fournit vraiment la quantit de donnes demandes. + Comme inconvnient, les donnes reues ne sont pas forcment de la + meilleure qualit.

    • + +
    • exec:/chemin/vers/programme +

      + Cette variante utilise un excutable externe + /chemin/vers/programme comme source de dclenchement du + PRNG. Lorsque nombre est spcifi, seules les + nombre premiers octets de son flux stdout + forment l'entropie. Lorsque nombre n'est pas spcifi, + l'intgralit des donnes produites sur stdout forment + l'entropie. N'utilisez cette variante qu'au dmarrage o une source + de dclenchement fortement alatoire est ncessaire, en utilisant + un programme externe (comme dans l'exemple + ci-dessous avec l'utilitaire truerand bas sur la + bibliothque truerand de AT&T que vous trouverez + dans la distribution de mod_ssl). Bien entendu, l'utilisation de + cette variante dans un contexte "connection" ralentit le serveur de + manire trop importante, et en gnral, vous devez donc viter + d'utiliser des programmes externes dans ce contexte.

    • +
    • egd:/chemin/vers/socket-egd (Unix seulement) +

      Cette variante utilise le socket de domaine Unix du Dmon + Gnrateur d'Entropie externe ou Entropy Gathering Daemon ou EGD + (voir http://www.lothar.com/tech + /crypto/) pour dclencher le PRNG. N'utilisez cette variante que + si votre plate-forme ne possde pas de priphrique random ou + urandom.

    • +
    +

    Exemple

    SSLRandomSeed startup builtin
    +SSLRandomSeed startup "file:/dev/random"
    +SSLRandomSeed startup "file:/dev/urandom" 1024
    +SSLRandomSeed startup "exec:/usr/local/bin/truerand" 16
    +SSLRandomSeed connect builtin
    +SSLRandomSeed connect "file:/dev/random"
    +SSLRandomSeed connect "file:/dev/urandom" 1024
    +
    + +
    +
    top
    +

    Directive SSLRenegBufferSize

    + + + + + + + + +
    Description:Dfinit la taille du tampon de rengociation +SSL
    Syntaxe:SSLRenegBufferSize taille
    Dfaut:SSLRenegBufferSize 131072
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    + +

    Si une rengociation SSL est requise dans un contexte de rpertoire, +par exemple avec l'utilisation de SSLVerifyClient dans un bloc Directory ou +Location, mod_ssl doit mettre en tampon en mmoire tout corps de requte +HTTP en attendant qu'une nouvelle initialisation de connexion SSL puisse +tre effectue. Cette directive permet de dfinir la quantit de mmoire + allouer pour ce tampon.

    + +

    +Notez que dans de nombreuses configurations, le client qui envoie un +corps de requte n'est pas forcment digne de confiance, et l'on doit +par consquent prendre en considration la possibilit d'une attaque de +type dni de service lorsqu'on modifie la valeur de cette directive. +

    + +

    Exemple

    SSLRenegBufferSize 262144
    +
    + +
    +
    top
    +

    Directive SSLRequire

    + + + + + + + +
    Description:N'autorise l'accs que lorsqu'une expression boolenne +complexe et arbitraire est vraie
    Syntaxe:SSLRequire expression
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    SSLRequire est obsolte

    +

    SSLRequire est obsolte et doit en gnral tre +remplace par l'expression Require. La syntaxe ap_expr de l'expression Require est +une extension de la syntaxe de SSLRequire, avec les +diffrences suivantes :

    + +

    Avec SSLRequire, les oprateurs de comparaison +<, <=, ... sont strictement quivalents +aux oprateurs lt, le, ... , et fonctionnent +selon une mthode qui compare tout d'abord la longueur des deux chanes, +puis l'ordre alphabtique. Les expressions ap_expr, quant elles, possdent deux jeux +d'oprateurs de comparaison : les oprateurs <, +<=, ... effectuent une comparaison alphabtique de +chanes, alors que les oprateurs -lt, -le, +... effectuent une comparaison d'entiers. Ces derniers possdent aussi +des alias sans tiret initial : lt, le, ... +

    + +
    + +

    Cette directive permet de spcifier une condition gnrale d'accs +qui doit tre entirement satisfaite pour que l'accs soit autoris. +C'est une directive trs puissante, car la condition d'accs spcifie +est une expression boolenne complexe et arbitraire contenant un nombre +quelconque de vrifications quant aux autorisations d'accs.

    +

    +L'expression doit respecter la syntaxe suivante (fournie ici +sous la forme d'une notation dans le style de la grammaire BNF) :

    +
    +
    expr     ::= "true" | "false"
    +           | "!" expr
    +           | expr "&&" expr
    +           | expr "||" expr
    +           | "(" expr ")"
    +           | comp
    +
    +comp     ::= word "==" word | word "eq" word
    +           | word "!=" word | word "ne" word
    +           | word "<"  word | word "lt" word
    +           | word "<=" word | word "le" word
    +           | word ">"  word | word "gt" word
    +           | word ">=" word | word "ge" word
    +           | word "in" "{" wordlist "}"
    +           | word "in" "PeerExtList(" word ")"
    +           | word "=~" regex
    +           | word "!~" regex
    +
    +wordlist ::= word
    +           | wordlist "," word
    +
    +word     ::= digit
    +           | cstring
    +           | variable
    +           | function
    +
    +digit    ::= [0-9]+
    +cstring  ::= "..."
    +variable ::= "%{" varname "}"
    +function ::= funcname "(" funcargs ")"
    +
    +

    Pour varname, toute variable dcrite dans Variables d'environnement pourra tre utilise. +Pour funcname, vous trouverez la liste des fonctions +disponibles dans la documentation +ap_expr.

    + +

    expression est interprte et traduite +sous une forme machine interne lors du chargement de la configuration, +puis value lors du traitement de la requte. Dans le contexte des +fichiers .htaccess, expression est interprte et excute +chaque fois que le fichier .htaccess intervient lors du traitement de la +requte.

    +

    Exemple

    SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/                   \
    +            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."          \
    +            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}    \
    +            and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5          \
    +            and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20       ) \
    +           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    +
    + + +

    La fonction PeerExtList(identifiant objet) +recherche une instance d'extension de certificat X.509 identifie par +identifiant objet (OID) dans le certificat client. L'expression est +value true si la partie gauche de la chane correspond exactement +la valeur d'une extension identifie par cet OID (Si plusieurs +extensions possdent le mme OID, l'une d'entre elles au moins doit +correspondre). +

    + +

    Exemple

    SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6")
    +
    + +

    Notes propos de la fonction PeerExtList

    + +
      + +
    • L'identifiant objet peut tre spcifi soit comme un nom +descriptif reconnu par la bibliothque SSL, tel que +"nsComment", soit comme un OID numrique tel que +"1.2.3.4.5.6".

    • + +
    • Les expressions contenant des types connus de la bibliothque +SSL sont transformes en chanes avant comparaison. Pour les extensions +contenant un type non connu de la bibliothque SSL, mod_ssl va essayer +d'interprter la valeur s'il s'agit d'un des types ASN.1 primaires UTF8String, +IA5String, VisibleString, ou BMPString. Si l'extension correspond un +de ces types, la chane sera convertie en UTF-8 si ncessaire, puis +compare avec la partie gauche de l'expression.

    • + +
    +
    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive SSLRequireSSL

    + + + + + + + +
    Description:Interdit l'accs lorsque la requte HTTP n'utilise pas +SSL
    Syntaxe:SSLRequireSSL
    Contexte:rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive interdit l'accs si HTTP sur SSL (c'est dire HTTPS) +n'est pas activ pour la connexion courante. Ceci est trs pratique dans +un serveur virtuel o SSL est activ ou dans un rpertoire pour se +protger des erreurs de configuration qui pourraient donner accs des +ressources protges. Lorsque cette directive est prsente, toutes les +requtes qui n'utilisent pas SSL sont rejetes.

    +

    Exemple

    SSLRequireSSL
    +
    + +
    +
    top
    +

    Directive SSLSessionCache

    + + + + + + + +
    Description:Type du cache de session SSL global et +inter-processus
    Syntaxe:SSLSessionCache type
    Dfaut:SSLSessionCache none
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de configurer le type de stockage du cache de +session SSL global et inter-processus. Ce cache est une fonctionnalit +optionnelle qui acclre le traitement parallle des requtes. Pour ce +qui est des requtes vers un mme processus du serveur (via HTTP +keep-alive), OpenSSL met en cache les informations de session SSL en +interne. Mais comme les clients modernes demandent des images en ligne +et d'autres donnes via des requtes parallles (un nombre de quatre +requtes parallles est courant), ces requtes vont tre servies par +plusieurs processus du serveur pr-dclenchs. Ici, un cache +inter-processus permet d'viter des ngociations de session +inutiles.

    +

    +Les quatre types de stockage suivants sont actuellement +supports :

    +
      +
    • none + +

      Cette valeur dsactive le cache de session global et + inter-processus, ce qui va ralentir le serveur de manire sensible + et peut poser problme avec certains navigateurs, en particulier si + les certificats clients sont activs. Cette configuration n'est pas + recommande.

    • + +
    • nonenotnull + +

      Cette valeur dsactive tout cache de session global et + inter-processus. Cependant, elle force OpenSSL envoyer un + identifiant de session non nul afin de s'adapter aux clients bogus + qui en ncessitent un.

    • + +
    • dbm:/chemin/vers/fichier-donnes + +

      Cette valeur utilise un fichier de hashage DBM sur disque local + pour synchroniser les caches OpenSSL locaux en mmoire des processus + du serveur. Ce cache de session peut tre sujet des problmes de + fiabilit sous forte charge. Pour l'utiliser, le module + mod_socache_dbm doit tre charg.

    • + +
    • shmcb:/chemin/vers/fichier-donnes[(nombre)] + +

      Cette valeur utilise un tampon cyclique hautes performances + (d'une taille d'environ nombre octets) dans un segment de + mmoire partage en RAM (tabli via + /chemin/vers/fichier-donnes, pour synchroniser les + caches OpenSSL locaux en mmoire des processus du serveur. C'est le + type de cache de session recommand. Pour l'utiliser, le module + mod_socache_shmcb doit tre charg.

    • + +
    • dc:UNIX:/chemin/vers/socket + +

      Cette valeur utilise les bibliothques de mise en cache de + sessions distribue sur distcache. + L'argument doit spcifier le serveur ou mandataire utiliser en + utilisant la syntaxe d'adressage distcache ; par exemple, + UNIX:/chemin/vers/socket spcifie une socket de domaine + Unix (en gnral un mandataire de dc_client local) ; + IP:serveur.example.com:9001 spcifie une adresse IP. + Pour l'utiliser, le module mod_socache_dc doit tre + charg.

    • + +
    + +

    Exemples

    SSLSessionCache "dbm:/usr/local/apache/logs/ssl_gcache_data"
    +SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)"
    +
    + +

    Le mutex ssl-cache permet de srialiser l'accs au cache +de session afin d'viter toute corruption. Ce mutex peut tre configur +via la directive Mutex.

    + +
    +
    top
    +

    Directive SSLSessionCacheTimeout

    + + + + + + + + +
    Description:Nombre de secondes avant l'expiration d'une session SSL +dans le cache de sessions
    Syntaxe:SSLSessionCacheTimeout secondes
    Dfaut:SSLSessionCacheTimeout 300
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:S'applique aussi la reprise de session TLS (RFC 5077) +partir de la version 2.4.10 du serveur HTTP Apache
    +

    +Cette directive permet de dfinir la dure de vie en secondes des +informations stockes dans le cache de sessions SSL global et +inter-processus, dans le cache OpenSSL interne en mmoire et pour +les sessions rinitialises par la reprise de session TLS (RFC 5077). elle peut +tre dfinie une valeur d'environ 15 des fins de test, mais une +valeur trs suprieure comme 300 en production.

    +

    Exemple

    SSLSessionCacheTimeout 600
    +
    + +
    +
    top
    +

    Directive SSLSessionTicketKeyFile

    + + + + + + + +
    Description:Cl de chiffrement/dchiffrement permanente pour les +tickets de session TLS
    Syntaxe:SSLSessionTicketKeyFile chemin-fichier
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis la version 2.4.0 du serveur HTTP +Apache, sous rserve que l'on utilise une version 0.9.8h ou suprieure +d'OpenSSL
    +

    Cette directive permet de dfinir une cl secrte pour le chiffrement +et le dchiffrement des tickets de session TLS selon les prconisations +de la RFC 5077. Elle a +t conue l'origine pour les environnements de clusters o les +donnes des sessions TLS doivent tre partages entre plusieurs noeuds. +Pour les configurations ne comportant qu'une seule instance de httpd, il +est prfrable d'utiliser les cls (alatoires) gnres par mod_ssl au +dmarrage du serveur.

    +

    Le fichier doit contenir 48 octets de donnes alatoires cres de +prfrence par une source haute entropie. Sur un systme de type UNIX, +il est possible de crer le fichier contenant la cl de la manire +suivante :

    + +

    +dd if=/dev/random of=/chemin/vers/fichier.tkey bs=1 count=48 +

    + +

    Ces cls doivent tre renouveles frquemment, car il s'agit du seul +moyen d'invalider un ticket de session existant - OpenSSL ne permet pas +actuellement de spcifier une limite la dure de +vie des tickets. Une nouvelle cl ne peut tre utilise qu'aprs avoir +redmarr le serveur. Tous les tickets de session existants deviennent +invalides aprs le redmarrage du serveur.

    + +
    +

    Ce fichier contient des donnes sensibles et doit donc tre protg +par des permissions similaires celles du fichier spcifi par la +directive SSLCertificateKeyFile.

    +
    + +
    +
    top
    +

    Directive SSLSessionTickets

    + + + + + + + + +
    Description:Active ou dsactive les tickets de session TLS
    Syntaxe:SSLSessionTickets on|off
    Dfaut:SSLSessionTickets on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible partir de la version 2.4.11 du serveur HTTP +Apache, sous rserve d'utiliser OpenSSL version 0.9.8f ou suprieure. +
    +

    Cette directive permet d'activer ou de dsactiver l'utilisation des +tickets de session TLS (RFC 5077).

    +
    +

    Les tickets de session TLS sont activs par dfaut. Les utiliser sans +redmarrer le serveur selon une priodicit approprie (par exemple +quotidiennement) compromet cependant le niveau de confidentialit.

    +
    + +
    +
    top
    +

    Directive SSLSRPUnknownUserSeed

    + + + + + + + +
    Description:Source d'ala pour utilisateur SRP inconnu
    Syntaxe:SSLSRPUnknownUserSeed secret-string
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis la version 2.4.4 du serveur HTTP +Apache, si la version 1.0.1 ou suprieure d'OpenSSL est utilise.
    +

    +Cette directive permet de dfinir la source d'ala utiliser +pour les utilisateurs SRP inconnus, ceci afin de combler les manques en +cas d'existence d'un tel utilisateur. Elle dfinit une chane secrte. Si +cette directive n'est pas dfinie, Apache renverra une alerte +UNKNOWN_PSK_IDENTITY aux clients qui fournissent un nom d'utilisateur +inconnu. +

    +

    Exemple

    +SSLSRPUnknownUserSeed "secret" +

    + +
    +
    top
    +

    Directive SSLSRPVerifierFile

    + + + + + + + +
    Description:Chemin du fichier de vrification SRP
    Syntaxe:SSLSRPVerifierFile file-path
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis la version 2.4.4 du serveur HTTP +Apache, si la version 1.0.1 ou suprieure d'OpenSSL est utilise.
    +

    +Cette directive permet d'activer TLS-SRP et de dfinir le chemin du +fichier de vrification OpenSSL SRP (Mot de passe distant scuris) +contenant les noms d'utilisateurs TLS-SRP, les vrificateurs, les +"grains de sel" (salts), ainsi que les paramtres de groupe.

    +

    Exemple

    +SSLSRPVerifierFile "/path/to/file.srpv" +

    +

    +Le fichier de vrification peut tre cr via l'utilitaire en ligne de +commande openssl :

    +

    Cration du fichier de vrification SRP

    +openssl srp -srpvfile passwd.srpv -userinfo "some info" -add username +

    +

    La valeur affecte au paramtre optionnel -userinfo est +enregistre dans la variable d'environnement +SSL_SRP_USERINFO.

    + + +
    +
    top
    +

    Directive SSLStaplingCache

    + + + + + + + +
    Description:Configuration du cache pour l'agrafage OCSP
    Syntaxe:SSLStaplingCache type
    Contexte:configuration du serveur
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Si SSLUseStapling est "on", +cette directive permet de configurer le cache destin stocker les +rponses OCSP incluses dans la ngociation TLS. La configuration d'un +cache est obligatoire pour pouvoir utiliser l'agrafage OCSP. A +l'exception de none et nonenotnull, cette +directive supporte les mmes types de stockage que la directive +SSLSessionCache.

    + + +
    +
    top
    +

    Directive SSLStaplingErrorCacheTimeout

    + + + + + + + + +
    Description:Dure de vie des rponses invalides dans le cache pour +agrafage OCSP
    Syntaxe:SSLStaplingErrorCacheTimeout secondes
    Dfaut:SSLStaplingErrorCacheTimeout 600
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de dfinir la dure de vie des rponses +invalides dans le cache pour agrafage OCSP configur via la +directive SSLStaplingCache. Pour +dfinir la dure de vie des rponses valides, voir la directive +SSLStaplingStandardCacheTimeout.

    + +
    +
    top
    +

    Directive SSLStaplingFakeTryLater

    + + + + + + + + +
    Description:Gnre une rponse "tryLater" pour les requtes OCSP choues
    Syntaxe:SSLStaplingFakeTryLater on|off
    Dfaut:SSLStaplingFakeTryLater on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Lorsque cette directive est active, et si une requte vers un +serveur OCSP des fins d'inclusion dans une ngociation TLS choue, +mod_ssl va gnrer une rponse "tryLater" pour le client (SSLStaplingReturnResponderErrors doit tre +active).

    + +
    +
    top
    +

    Directive SSLStaplingForceURL

    + + + + + + + +
    Description:Remplace l'URI du serveur OCSP spcifi dans l'extension +AIA du certificat
    Syntaxe:SSLStaplingForceURL uri
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de remplacer l'URI du serveur OCSP extraite de +l'extension authorityInfoAccess (AIA) du certificat. Elle peut s'avrer +utile lorsqu'on passe par un mandataire

    + +
    +
    top
    +

    Directive SSLStaplingResponderTimeout

    + + + + + + + + +
    Description:Temps d'attente maximum pour les requtes vers les serveurs +OCSP
    Syntaxe:SSLStaplingResponderTimeout secondes
    Dfaut:SSLStaplingResponderTimeout 10
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de dfinir le temps d'attente maximum lorsque +mod_ssl envoie une requte vers un serveur OCSP afin d'obtenir une +rponse destine tre incluse dans les ngociations TLS avec les +clients (SSLUseStapling doit +avoir t active au pralable).

    + +
    +
    top
    +

    Directive SSLStaplingResponseMaxAge

    + + + + + + + + +
    Description:Age maximum autoris des rponses OCSP incluses dans la +ngociation TLS
    Syntaxe:SSLStaplingResponseMaxAge secondes
    Dfaut:SSLStaplingResponseMaxAge -1
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de dfinir l'ge maximum autoris +("fracheur") des rponses OCSP incluses dans la ngociation TLS +(SSLUseStapling doit +avoir t active au pralable). La valeur par dfaut (-1) +ne dfinit aucun ge maximum, ce qui signifie que les rponses OCSP sont +considres comme valides partir du moment o le contenu de leur champ +nextUpdate se trouve dans le futur.

    + +
    +
    top
    +

    Directive SSLStaplingResponseTimeSkew

    + + + + + + + + +
    Description:Dure de vie maximale autorise des rponses OCSP incluses dans la +ngociation TLS
    Syntaxe:SSLStaplingResponseTimeSkew secondes
    Dfaut:SSLStaplingResponseTimeSkew 300
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de spcifier l'intervalle de temps maximum que +mod_ssl va calculer en faisant la diffrence entre les contenus des +champs nextUpdate et thisUpdate des rponses +OCSP incluses dans la ngociation TLS. Pour pouvoir utiliser cette +directive, SSLUseStapling doit +tre "on".

    + +
    +
    top
    +

    Directive SSLStaplingReturnResponderErrors

    + + + + + + + + +
    Description:Transmet au client les erreurs survenues lors des requtes +OCSP
    Syntaxe:SSLStaplingReturnResponderErrors on|off
    Dfaut:SSLStaplingReturnResponderErrors on
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Lorsque cette directive est active, mod_ssl va transmettre au client les +rponses concernant les requtes OCSP +choues (comme les rponses avec un statut gnral autre que +"successful", les rponses avec un statut de certificat autre que +"good", les rponses arrives expiration, etc...). +Lorsqu'elle est off, seules les rponses avec un +statut de certificat gal "good" seront incluses dans la ngociation +TLS.

    + +
    +
    top
    +

    Directive SSLStaplingStandardCacheTimeout

    + + + + + + + + +
    Description:Dure de vie des rponses OCSP dans le cache
    Syntaxe:SSLStaplingStandardCacheTimeout secondes
    Dfaut:SSLStaplingStandardCacheTimeout 3600
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet de dfinir la dure de vie des rponses OCSP +dans le cache configur via la directive SSLStaplingCache. Elle ne s'applique qu'aux +rponse valides, alors que la directive SSLStaplingErrorCacheTimeout s'applique aux +rponses invalides ou non disponibles. +

    + +
    +
    top
    +

    Directive SSLStrictSNIVHostCheck

    + + + + + + + + +
    Description:Contrle de l'accs des clients non-SNI un serveur virtuel +base de nom. +
    Syntaxe:SSLStrictSNIVHostCheck on|off
    Dfaut:SSLStrictSNIVHostCheck off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible depuis la version 2.2.12 d'Apache
    +

    +Cette directive permet de contrler l'accs des clients non-SNI un serveur +virtuel base de nom. Si elle est dfinie on dans le +serveur virtuel base de nom par dfaut, les +clients non-SNI ne seront autoriss accder aucun serveur virtuel +appartenant cette combinaison IP/port. Par +contre, si elle est dfinie on dans un serveur virtuel +quelconque, les clients non-SNI ne se verront interdire l'accs qu' ce +serveur. +

    + +

    +Cette option n'est disponible que si httpd a t compil avec une +version d'OpenSSL supportant SNI. +

    + +

    Exemple

    SSLStrictSNIVHostCheck on
    +
    + +
    +
    top
    +

    Directive SSLUserName

    + + + + + + + +
    Description:Nom de la variable servant dterminer le nom de +l'utilisateur
    Syntaxe:SSLUserName nom-var
    Contexte:configuration du serveur, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette variable permet de dfinir le champ "user" de l'objet de la +requte Apache. Ce champ est utilis par des modules de plus bas niveau +pour identifier l'utilisateur avec une chane de caractres. En +particulier, l'utilisation de cette directive peut provoquer la +dfinition de la variable d'environnement REMOTE_USER. +La valeur de l'argument nom-var peut correspondre toute variable d'environnement SSL.

    + +

    Notez que cette directive est sans effet si l'option +FakeBasicAuth est utilise (voir SSLOptions).

    + +

    Exemple

    SSLUserName SSL_CLIENT_S_DN_CN
    +
    + +
    +
    top
    +

    Directive SSLUseStapling

    + + + + + + + + +
    Description:Active l'ajout des rponses OCSP la ngociation TLS
    Syntaxe:SSLUseStapling on|off
    Dfaut:SSLUseStapling off
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_ssl
    Compatibilit:Disponible si on utilise OpenSSL version 0.9.8h ou suprieure
    +

    Cette directive permet d'activer l'"Agrafage OCSP" (OCSP stapling) +selon la dfinition de l'extension TLS "Certificate Status Request" +fournie dans la RFC 6066. Si elle est active et si le client le +demande, mod_ssl va inclure une rponse OCSP propos de son propre +certificat dans la ngociation TLS. Pour pouvoir activer l'Agrafage +OCSP, il est ncessaire de configurer un SSLStaplingCache.

    + +

    L'agrafage OCSP dispense le client de requrir le serveur OCSP +directement ; il faut cependant noter que selon les spcifications de la +RFC 6066, la rponse CertificateStatus du serveur ne peut +inclure une rponse OCSP que pour un seul certificat. Pour les +certificats de serveur comportant des certificats de CA intermdiaires +dans leur chane (c'est un cas typique de nos jours), l'implmentation +actuelle de l'agrafage OCSP n'atteint que partiellement l'objectif d' +"conomie en questions/rponse et en ressources". Pour plus de dtails, +voir la RFC 6961 (TLS +Multiple Certificate Status Extension). +

    + +

    Lorsque l'agrafage OCSP est activ, le mutex +ssl-stapling contrle l'accs au cache de l'agrafage OCSP +afin de prvenir toute corruption, et le mutex +sss-stapling-refresh contrle le raffrachissement des +rponses OCSP. Ces mutex peuvent tre configurs via la directive +Mutex. +

    + +
    +
    top
    +

    Directive SSLVerifyClient

    + + + + + + + + +
    Description:Niveau de vrification du certificat client
    Syntaxe:SSLVerifyClient niveau
    Dfaut:SSLVerifyClient none
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de dfinir le niveau de vrification du +certificat pour l'authentification du client. Notez que cette directive +peut tre utilise la fois dans les contextes du serveur principal et +du rpertoire. Dans le contexte du serveur principal, elle s'applique au +processus d'authentification du client utilis au cours de la +ngociation SSL standard lors de l'tablissement d'une connexion. Dans +un contexte de rpertoire, elle force une rengociation SSL avec le +niveau de vrification du client spcifi, aprs la lecture d'une +requte HTTP, mais avant l'envoi de la rponse HTTP.

    +

    +Les valeurs de niveau disponibles sont les suivantes :

    +
      +
    • none: + aucun certificat client n'est requis
    • +
    • optional: + le client peut prsenter un certificat valide
    • +
    • require: + le client doit prsenter un certificat valide
    • +
    • optional_no_ca: + le client peut prsenter un certificat valide, mais il n'est pas + ncessaire que ce dernier soit vrifiable (avec succs). Cette option ne + peut pas tre utilise lors de l'authentification du client.
    • +
    +

    Exemple

    SSLVerifyClient require
    +
    + +
    +
    top
    +

    Directive SSLVerifyDepth

    + + + + + + + + +
    Description:Profondeur maximale des certificats de CA pour la +vrification des certificats clients
    Syntaxe:SSLVerifyDepth nombre
    Dfaut:SSLVerifyDepth 1
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:AuthConfig
    Statut:Extension
    Module:mod_ssl
    +

    +Cette directive permet de spcifier la profondeur maximale laquelle +mod_ssl va effectuer sa vrification avant de dcider que le client ne +possde pas de certificat valide. Notez que cette directive peut tre +utilise la fois dans les contextes du serveur principal et de +rpertoire. Dans le contexte du serveur principal, elle s'applique au +processus d'authentification du client utilis au cours de la +ngociation SSL standard lors de l'tablissement d'une connexion. Dans +un contexte de rpertoire, elle force une rengociation SSL avec le +client selon la nouvelle profondeur spcifie, aprs la lecture d'une +requte HTTP, mais avant l'envoi de la rponse HTTP.

    +

    +La profondeur correspond au nombre maximum de fournisseurs de +certificats intermdiaires, c'est dire le nombre maximum de +certificats de CA que l'on est autoris suivre lors de la vrification +du certificat du client. Une profondeur de 0 signifie que seuls les +certificats clients auto-signs sont accepts ; la profondeur par dfaut +de 1 signifie que le certificat client peut tre soit auto-sign, soit +sign par une CA connue directement du serveur (c'est dire que le +certificat de la CA doit tre rfrenc par la directive SSLCACertificatePath), etc...

    +

    Exemple

    SSLVerifyDepth 10
    +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_ssl.xml b/docs/manual/mod/mod_ssl.xml index 3b342b47bfc..596876c0056 100644 --- a/docs/manual/mod/mod_ssl.xml +++ b/docs/manual/mod/mod_ssl.xml @@ -30,9 +30,8 @@ Layer (SSL) and Transport Layer Security (TLS) protocols ssl_module
    -

    This module provides SSL v2/v3 and TLS v1 support for the Apache -HTTP Server. It was contributed by Ralf S. Engelschall based on his -mod_ssl project and originally derived from work by Ben Laurie.

    +

    This module provides SSL v3 and TLS v1.x support for the Apache +HTTP Server. SSL v2 is no longer supported.

    This module relies on OpenSSL to provide the cryptography engine.

    @@ -61,7 +60,7 @@ compatibility variables.

    Description: HTTPS flag HTTPS is being used. -SSL_PROTOCOL string The SSL protocol version (SSLv2, SSLv3, TLSv1) +SSL_PROTOCOL string The SSL protocol version (SSLv3, TLSv1, TLSv1.1, TLSv1.2) SSL_SESSION_ID string The hex-encoded SSL session id SSL_SESSION_RESUMED string Initial or Resumed SSL Session. Note: multiple requests may be served over the same (Initial or Resumed) SSL session if HTTP KeepAlive is in use SSL_SECURE_RENEG string true if secure renegotiation is supported, else false @@ -76,6 +75,9 @@ compatibility variables.

    SSL_CLIENT_M_SERIAL string The serial of the client certificate SSL_CLIENT_S_DN string Subject DN in client's certificate SSL_CLIENT_S_DN_x509 string Component of client's Subject DN +SSL_CLIENT_SAN_Email_n string Client certificate's subjectAltName extension entries of type rfc822Name +SSL_CLIENT_SAN_DNS_n string Client certificate's subjectAltName extension entries of type dNSName +SSL_CLIENT_SAN_OTHER_msUPN_n string Client certificate's subjectAltName extension entries of type otherName, Microsoft User Principal Name form (OID 1.3.6.1.4.1.311.20.2.3) SSL_CLIENT_I_DN string Issuer DN of client's certificate SSL_CLIENT_I_DN_x509 string Component of client's Issuer DN SSL_CLIENT_V_START string Validity of client's certificate (start time) @@ -85,10 +87,14 @@ compatibility variables.

    SSL_CLIENT_A_KEY string Algorithm used for the public key of client's certificate SSL_CLIENT_CERT string PEM-encoded client certificate SSL_CLIENT_CERT_CHAIN_n string PEM-encoded certificates in client certificate chain +SSL_CLIENT_CERT_RFC4523_CEA string Serial number and issuer of the certificate. The format matches that of the CertificateExactAssertion in RFC4523 SSL_CLIENT_VERIFY string NONE, SUCCESS, GENEROUS or FAILED:reason SSL_SERVER_M_VERSION string The version of the server certificate SSL_SERVER_M_SERIAL string The serial of the server certificate SSL_SERVER_S_DN string Subject DN in server's certificate +SSL_SERVER_SAN_Email_n string Server certificate's subjectAltName extension entries of type rfc822Name +SSL_SERVER_SAN_DNS_n string Server certificate's subjectAltName extension entries of type dNSName +SSL_SERVER_SAN_OTHER_dnsSRV_n string Server certificate's subjectAltName extension entries of type otherName, SRVName form (OID 1.3.6.1.5.5.7.8.7, RFC 4985) SSL_SERVER_S_DN_x509 string Component of server's Subject DN SSL_SERVER_I_DN string Issuer DN of server's certificate SSL_SERVER_I_DN_x509 string Component of server's Issuer DN @@ -97,6 +103,9 @@ compatibility variables.

    SSL_SERVER_A_SIG string Algorithm used for the signature of server's certificate SSL_SERVER_A_KEY string Algorithm used for the public key of server's certificate SSL_SERVER_CERT string PEM-encoded server certificate +SSL_SRP_USER string SRP username +SSL_SRP_USERINFO string SRP user info +SSL_TLS_SNI string Contents of the SNI TLS extension (if supplied with ClientHello)

    x509 specifies a component of an X.509 DN; one of @@ -170,9 +179,13 @@ For backward compatibility there is additionally a special provided. Information about this function is provided in the Compatibility chapter.

    Example -CustomLog logs/ssl_request_log \ - "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + +CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + +

    These formats even work without setting the StdEnvVars +option of the SSLOptions +directive.

    Request Notes @@ -203,6 +216,30 @@ string in mod_log_config.

    +
    Expression Parser Extension + +

    When mod_ssl is built into Apache or at least +loaded (under DSO situation) any variables +provided by mod_ssl can be used in expressions +for the ap_expr Expression Parser. +The variables can be referenced using the syntax +``%{varname}''. Starting +with version 2.4.18 one can also use the +mod_rewrite style syntax +``%{SSL:varname}'' or +the function style syntax +``ssl(varname)''.

    +Example (using <module>mod_headers</module>) + +Header set X-SSL-PROTOCOL "expr=%{SSL_PROTOCOL}" +Header set X-SSL-CIPHER "expr=%{SSL:SSL_CIPHER}" + + +

    This feature even works without setting the StdEnvVars +option of the SSLOptions +directive.

    +
    +
    Authorization providers for use with Require

    mod_ssl provides a few authentication providers for use @@ -215,9 +252,9 @@ string in mod_log_config.

    encrypted with SSL. This is similar to the SSLRequireSSL directive.

    - + Require ssl - +
    @@ -230,10 +267,10 @@ string in mod_log_config.

    The following example grants access if the user is authenticated either with a client certificate or by username and password.

    - - Require ssl-verify-client
    - Require valid-user -
    + +Require ssl-verify-client +Require valid-user + @@ -294,12 +331,17 @@ query can be done in two ways which can be configured by Here an external program is configured which is called at startup for each encrypted Private Key file. It is called with two arguments (the first is of the form ``servername:portnumber'', the second is either - ``RSA'' or ``DSA''), which indicate for which - server and algorithm it has to print the corresponding Pass Phrase to - stdout. The intent is that this external program first runs - security checks to make sure that the system is not compromised by an - attacker, and only when these checks were passed successfully it provides - the Pass Phrase.

    + ``RSA'', ``DSA'', ``ECC'' or an + integer index starting at 3 if more than three keys are configured), which + indicate for which server and algorithm it has to print the corresponding + Pass Phrase to stdout. In versions 2.4.8 (unreleased) + and 2.4.9, it is called with one argument, a string of the + form ``servername:portnumber:index'' (with index + being a zero-based integer number), which indicate the server, TCP port + and certificate number. The intent is that this external + program first runs security checks to make sure that the system is not + compromised by an attacker, and only when these checks were passed + successfully it provides the Pass Phrase.

    Both these security checks, and the way the Pass Phrase is determined, can be as complex as you like. Mod_ssl just defines the interface: an @@ -312,7 +354,9 @@ query can be done in two ways which can be configured by program is called only once per unique Pass Phrase.

    Example -SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter + +SSLPassPhraseDialog "exec:/usr/local/apache/sbin/pp-filter" + @@ -336,7 +380,7 @@ in the global server context because the PRNG is a global facility.

    The following source variants are available:

    • builtin -

      This is the always available builtin seeding source. It's usage +

      This is the always available builtin seeding source. Its usage consumes minimum CPU cycles under runtime and hence can be always used without drawbacks. The source used for seeding the PRNG contains of the current time, the current process id and (when applicable) a randomly @@ -366,16 +410,7 @@ The following source variants are available:

      can take a long time). Here using an existing /dev/urandom is better, because it never blocks and actually gives the amount of requested data. The drawback is just that the quality of the received data may not - be the best.

      -

      - On some platforms like FreeBSD one can even control how the entropy is - actually generated, i.e. by which system interrupts. More details one can - find under rndcontrol(8) on those platforms. Alternatively, when - your system lacks such a random device, you can use tool - like EGD - (Entropy Gathering Daemon) and run it's client program with the - exec:/path/to/program/ variant (see below) or use - egd:/path/to/egd-socket (see below).

    • + be the best.

    • exec:/path/to/program

      @@ -401,13 +436,15 @@ The following source variants are available:

      on your platform.

    Example -SSLRandomSeed startup builtin
    -SSLRandomSeed startup file:/dev/random
    -SSLRandomSeed startup file:/dev/urandom 1024
    -SSLRandomSeed startup exec:/usr/local/bin/truerand 16
    -SSLRandomSeed connect builtin
    -SSLRandomSeed connect file:/dev/random
    -SSLRandomSeed connect file:/dev/urandom 1024
    + +SSLRandomSeed startup builtin +SSLRandomSeed startup "file:/dev/random" +SSLRandomSeed startup "file:/dev/urandom" 1024 +SSLRandomSeed startup "exec:/usr/local/bin/truerand" 16 +SSLRandomSeed connect builtin +SSLRandomSeed connect "file:/dev/random" +SSLRandomSeed connect "file:/dev/urandom" 1024 +
    @@ -450,33 +487,38 @@ The following five storage types are currently supported:

    This makes use of a DBM hashfile on the local disk to synchronize the local OpenSSL memory caches of the server - processes. This session cache may suffer reliability issues under - high load.

    + processes. This session cache may suffer reliability issues under + high load. To use this, ensure that + mod_socache_dbm is loaded.

    -
  • shm:/path/to/datafile[(size)] +
  • shmcb:/path/to/datafile[(size)]

    This makes use of a high-performance cyclic buffer (approx. size bytes in size) inside a shared memory segment in RAM (established via /path/to/datafile) to synchronize the local OpenSSL memory caches of the server - processes. This is the recommended session cache.

  • + processes. This is the recommended session cache. To use this, + ensure that mod_socache_shmcb is loaded.

  • dc:UNIX:/path/to/socket

    This makes use of the distcache distributed session + href="http://distcache.sourceforge.net/">distcache distributed session caching libraries. The argument should specify the location of the server or proxy to be used using the distcache address syntax; for example, UNIX:/path/to/socket specifies a UNIX domain socket (typically a local dc_client proxy); IP:server.example.com:9001 specifies an IP - address.

  • + address. To use this, ensure that + mod_socache_dc is loaded.

    Examples -SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data
    -SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000) + +SSLSessionCache "dbm:/usr/local/apache/logs/ssl_gcache_data" +SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)" +

    The ssl-cache mutex is used to serialize access to @@ -493,15 +535,19 @@ in the Session Cache SSLSessionCacheTimeout 300 server config virtual host +Applies also to RFC 5077 TLS session resumption in Apache 2.4.10 and later

    This directive sets the timeout in seconds for the information stored in the -global/inter-process SSL Session Cache and the OpenSSL internal memory cache. +global/inter-process SSL Session Cache, the OpenSSL internal memory cache and +for sessions resumed by TLS session resumption (RFC 5077). It can be set as low as 15 for testing, but should be set to higher values like 300 in real life.

    Example + SSLSessionCacheTimeout 600 + @@ -522,10 +568,12 @@ type="section">VirtualHost section to enable SSL/TLS for a that virtual host. By default the SSL/TLS Protocol Engine is disabled for both the main server and all configured virtual hosts.

    Example -<VirtualHost _default_:443>
    -SSLEngine on
    -...
    + +<VirtualHost _default_:443> +SSLEngine on +#... </VirtualHost> +

    In Apache 2.1 and later, SSLEngine can be set to optional. This enables support for @@ -563,48 +611,55 @@ by the applicable Security Policy. SSLProtocol -Configure usable SSL protocol versions +Configure usable SSL/TLS protocol versions SSLProtocol [+|-]protocol ... -SSLProtocol all +SSLProtocol all -SSLv3 (up to 2.4.16: all) server config virtual host

    -This directive can be used to control which versions of the SSL protocol +This directive can be used to control which versions of the SSL/TLS protocol will be accepted in new connections.

    The available (case-insensitive) protocols are:

      -
    • SSLv2 -

      - This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the - original SSL protocol as designed by Netscape Corporation. Though it's - use has been deprecated, because of weaknesses in the security of the protocol.

    • -
    • SSLv3

      This is the Secure Sockets Layer (SSL) protocol, version 3.0, from the Netscape Corporation. - It is the successor to SSLv2 and the predecessor to TLSv1. It's supported by - almost all popular browsers.

    • + It is the successor to SSLv2 and the predecessor to TLSv1, but is + deprecated in RFC 7568.

    • TLSv1

      - This is the Transport Layer Security (TLS) protocol, version 1.0. It is the - successor to SSLv3 and is defined in RFC2246. - Which has been obsoleted by RFC4346.

    • + This is the Transport Layer Security (TLS) protocol, version 1.0. + It is the successor to SSLv3 and is defined in + RFC 2246. + It is supported by nearly every client.

      -
    • All +
    • TLSv1.1 (when using OpenSSL 1.0.1 and later)

      - This is a shortcut for ``+SSLv2 +SSLv3 +TLSv1'' and a - convenient way for enabling all protocols except one when used in - combination with the minus sign on a protocol as the example above - shows.

    • + A revision of the TLS 1.0 protocol, as defined in + RFC 4346.

      + +
    • TLSv1.2 (when using OpenSSL 1.0.1 and later) +

      + A revision of the TLS 1.1 protocol, as defined in + RFC 5246.

    • + +
    • all +

      + This is a shortcut for ``+SSLv3 +TLSv1'' or + - when using OpenSSL 1.0.1 and later - + ``+SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2'', respectively + (except for OpenSSL versions compiled with the ``no-ssl3'' configuration + option, where all does not include +SSLv3).

    Example -# enable SSLv3 and TLSv1, but not SSLv2
    -SSLProtocol all -SSLv2 + +SSLProtocol TLSv1 +
    @@ -636,23 +691,24 @@ An SSL cipher specification in cipher-spec is composed of 4 major attributes plus a few extra minor ones:

    • Key Exchange Algorithm:
      - RSA or Diffie-Hellman variants. + RSA, Diffie-Hellman, Elliptic Curve Diffie-Hellman, Secure Remote Password
    • Authentication Algorithm:
      - RSA, Diffie-Hellman, DSS or none. + RSA, Diffie-Hellman, DSS, ECDSA, or none.
    • Cipher/Encryption Algorithm:
      - DES, Triple-DES, RC4, RC2, IDEA or none. + AES, DES, Triple-DES, RC4, RC2, IDEA, etc.
    • MAC Digest Algorithm:
      - MD5, SHA or SHA1. + MD5, SHA or SHA1, SHA256, SHA384.
    -

    An SSL cipher can also be an export cipher and is either an SSLv2 or SSLv3/TLSv1 -cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use, -one can either specify all the Ciphers, one at a time, or use aliases to -specify the preference and order for the ciphers (see Table -1).

    +

    An SSL cipher can also be an export cipher. SSLv2 ciphers are no longer +supported. To specify which ciphers to use, one can either specify all the +Ciphers, one at a time, or use aliases to specify the preference and order +for the ciphers (see Table +1). The actually available ciphers and aliases depends on the used +openssl version. Newer openssl versions may include additional ciphers.

    @@ -662,24 +718,28 @@ specify the preference and order for the ciphers (see Table + - - - - - - + + + + + + + + - + + + - @@ -691,49 +751,65 @@ specify the preference and order for the ciphers (see Table + + + - + +
    kDHr Diffie-Hellman key exchange with RSA key
    kDHd Diffie-Hellman key exchange with DSA key
    kEDH Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)
    kSRP Secure Remote Password (SRP) key exchange
    Authentication Algorithm:
    aNULL No authentication
    aRSA RSA authentication
    aDSS DSS authentication
    aDH Diffie-Hellman authentication
    Cipher Encoding Algorithm:
    eNULL No encoding
    DES DES encoding
    3DES Triple-DES encoding
    RC4 RC4 encoding
    RC2 RC2 encoding
    IDEA IDEA encoding
    eNULL No encryption
    NULL alias for eNULL
    AES AES encryption
    DES DES encryption
    3DES Triple-DES encryption
    RC4 RC4 encryption
    RC2 RC2 encryption
    IDEA IDEA encryption
    MAC Digest Algorithm:
    MD5 MD5 hash function
    SHA1 SHA1 hash function
    SHA SHA hash function
    SHA alias for SHA1
    SHA256 SHA256 hash function
    SHA384 SHA384 hash function
    Aliases:
    SSLv2 all SSL version 2.0 ciphers
    SSLv3 all SSL version 3.0 ciphers
    TLSv1 all TLS version 1.0 ciphers
    EXP all export ciphers
    RSA all ciphers using RSA key exchange
    DH all ciphers using Diffie-Hellman key exchange
    EDH all ciphers using Ephemeral Diffie-Hellman key exchange
    ECDH Elliptic Curve Diffie-Hellman key exchange
    ADH all ciphers using Anonymous Diffie-Hellman key exchange
    AECDH all ciphers using Anonymous Elliptic Curve Diffie-Hellman key exchange
    SRP all ciphers using Secure Remote Password (SRP) key exchange
    DSS all ciphers using DSS authentication
    NULL all ciphers using no encryption
    ECDSA all ciphers using ECDSA authentication
    aNULL all ciphers using no authentication

    Now where this becomes interesting is that these can be put together to specify the order and ciphers you wish to use. To speed this up -there are also aliases (SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM, +there are also aliases (SSLv3, TLSv1, EXP, LOW, MEDIUM, HIGH) for certain groups of ciphers. These tags can be joined together with prefixes to form the cipher-spec. Available prefixes are:

    • none: add cipher to list
    • -
    • +: add ciphers to list and pull them to current location in list
    • +
    • +: move matching ciphers to the current location in list
    • -: remove cipher from list (can be added later again)
    • !: kill cipher from list completely (can not be added later again)
    + + +<code>aNULL</code>, <code>eNULL</code> and <code>EXP</code> +ciphers are always disabled +

    Beginning with version 2.4.7, null and export-grade +ciphers are always disabled, as mod_ssl unconditionally adds +!aNULL:!eNULL:!EXP to any cipher string at initialization.

    +
    +

    A simpler way to look at all of this is to use the ``openssl ciphers -v'' command which provides a nice way to successively create the correct cipher-spec string. The default cipher-spec string depends on the version of the OpenSSL libraries used. Let's suppose it is -``ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'' which -means the following: first, remove from consideration any ciphers that do not -authenticate, i.e. for SSL the Anonymous Diffie-Hellman ciphers. Next, -use ciphers using RC4 and RSA. Next include the high, medium and then the low -security ciphers. Finally pull all SSLv2 and export ciphers to the -end of the list.

    +``RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'' which +means the following: Put RC4-SHA and AES128-SHA at +the beginning. We do this, because these ciphers offer a good compromise +between speed and security. Next, include high and medium security ciphers. +Finally, remove all ciphers which do not authenticate, i.e. for SSL the +Anonymous Diffie-Hellman ciphers, as well as all ciphers which use +MD5 as hash algorithm, because it has been proven insufficient.

    -$ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
    -NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
    -NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
    -EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
    +$ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'
    +RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=SHA1
    +AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
    +DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
     ...                     ...               ...     ...           ...
    -EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
    -EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
    -EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
    +SEED-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=SEED(128) Mac=SHA1
    +PSK-RC4-SHA             SSLv3 Kx=PSK      Au=PSK  Enc=RC4(128)  Mac=SHA1
    +KRB5-RC4-SHA            SSLv3 Kx=KRB5     Au=KRB5 Enc=RC4(128)  Mac=SHA1
     

    The complete list of particular RSA & DH ciphers for SSL is given in Table 2.

    Example + SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW + @@ -742,21 +818,13 @@ SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW - - - - - - - - @@ -777,48 +845,137 @@ SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW SSLCertificateFile -Server PEM-encoded X.509 Certificate file +Server PEM-encoded X.509 certificate data file SSLCertificateFile file-path server config virtual host

    -This directive points to the PEM-encoded Certificate file for the server and -optionally also to the corresponding RSA or DSA Private Key file for it -(contained in the same file). If the contained Private Key is encrypted the -Pass Phrase dialog is forced at startup time. This directive can be used up to -two times (referencing different filenames) when both a RSA and a DSA based -server certificate is used in parallel.

    +This directive points to a file with certificate data in PEM format. +At a minimum, the file must include an end-entity (leaf) certificate. +The directive can be used multiple times (referencing different filenames) +to support multiple algorithms for server authentication - typically +RSA, DSA, and ECC. The number of supported algorithms depends on the +OpenSSL version being used for mod_ssl: with version 1.0.0 or later, +openssl list-public-key-algorithms will output a list +of supported algorithms, see also the note below about limitations +of OpenSSL versions prior to 1.0.2 and the ways to work around them. +

    + +

    +The files may also include intermediate CA certificates, sorted from +leaf to root. This is supported with version 2.4.8 and later, +and obsoletes SSLCertificateChainFile. +When running with OpenSSL 1.0.2 or later, this allows +to configure the intermediate CA chain on a per-certificate basis. +

    + +

    +Custom DH parameters and an EC curve name for ephemeral keys, +can also be added to end of the first file configured using +SSLCertificateFile. +This is supported in version 2.4.7 or later. +Such parameters can be generated using the commands +openssl dhparam and openssl ecparam. +The parameters can be added as-is to the end of the first +certificate file. Only the first file can be used for custom +parameters, as they are applied independently of the authentication +algorithm type. +

    + +

    +Finally the end-entity certificate's private key can also be +added to the certificate file instead of using a separate +SSLCertificateKeyFile +directive. This practice is highly discouraged. If it is used, +the certificate files using such an embedded key must be configured +after the certificates using a separate key file. If the private +key is encrypted, the pass phrase dialog is forced at startup time. +

    + + +DH parameter interoperability with primes > 1024 bit +

    +Beginning with version 2.4.7, mod_ssl makes use of +standardized DH parameters with prime lengths of 2048, 3072 and 4096 bits +and with additional prime lengths of 6144 and 8192 bits beginning with +version 2.4.10 +(from RFC 3526), and hands +them out to clients based on the length of the certificate's RSA/DSA key. +With Java-based clients in particular (Java 7 or earlier), this may lead +to handshake failures - see this +FAQ answer for working around +such issues. +

    +
    + + +Default DH parameters when using multiple certificates and OpenSSL +versions prior to 1.0.2 +

    +When using multiple certificates to support different authentication algorithms +(like RSA, DSA, but mainly ECC) and OpenSSL prior to 1.0.2, it is recommended +to either use custom DH parameters (preferably) by adding them to the +first certificate file (as described above), or to order the +SSLCertificateFile directives such that RSA/DSA +certificates are placed after the ECC one. +

    +

    +This is due to a limitation in older versions of OpenSSL which don't let the +Apache HTTP Server determine the currently selected certificate at handshake +time (when the DH parameters must be sent to the peer) but instead always +provide the last configured certificate. Consequently, the server may select +default DH parameters based on the length of the wrong certificate's key (ECC +keys are much smaller than RSA/DSA ones and their length is not relevant for +selecting DH primes). +

    +

    +Since custom DH parameters always take precedence over the default ones, this +issue can be avoided by creating and configuring them (as described above), +thus using a custom/suitable length. +

    +
    + Example -SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt + +SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt" +
    SSLCertificateKeyFile -Server PEM-encoded Private Key file +Server PEM-encoded private key file SSLCertificateKeyFile file-path server config virtual host

    -This directive points to the PEM-encoded Private Key file for the -server. If the Private Key is not combined with the Certificate in the -SSLCertificateFile, use this additional directive to -point to the file with the stand-alone Private Key. When -SSLCertificateFile is used and the file -contains both the Certificate and the Private Key this directive need -not be used. But we strongly discourage this practice. Instead we -recommend you to separate the Certificate and the Private Key. If the -contained Private Key is encrypted, the Pass Phrase dialog is forced -at startup time. This directive can be used up to two times -(referencing different filenames) when both a RSA and a DSA based -private key is used in parallel.

    +This directive points to the PEM-encoded private key file for the +server. If the contained private key is encrypted, the pass phrase +dialog is forced at startup time.

    + +

    +The directive can be used multiple times (referencing different filenames) +to support multiple algorithms for server authentication. For each +SSLCertificateKeyFile +directive, there must be a matching SSLCertificateFile +directive.

    + +

    +The private key may also be combined with the certificate in the file given by +SSLCertificateFile, but this practice +is highly discouraged. If it is used, the certificate files using such +an embedded key must be configured after the certificates using a separate +key file.

    + Example -SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key + +SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key" +
    @@ -831,6 +988,13 @@ SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key virtual host +SSLCertificateChainFile is deprecated +

    SSLCertificateChainFile became obsolete with version 2.4.8, +when SSLCertificateFile +was extended to also load intermediate CA certificates from the server +certificate file.

    +
    +

    This directive sets the optional all-in-one file where you can assemble the certificates of Certification Authorities (CA) which form the @@ -857,7 +1021,9 @@ using a coupled RSA+DSA certificate pair, this will work only if actually both certificates use the same certificate chain. Else the browsers will be confused in this situation.

    Example -SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt + +SSLCertificateChainFile "/usr/local/apache2/conf/ssl.crt/ca.crt" +
    @@ -880,10 +1046,11 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    +contains the appropriate symbolic links.

    Example -SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/ + +SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt/" + @@ -905,7 +1072,9 @@ concatenation of the various PEM-encoded Certificate files, in order of preference. This can be used alternatively and/or additionally to SSLCACertificatePath.

    Example -SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt + +SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt" + @@ -950,7 +1119,9 @@ specify an all-in-one file containing a concatenation of PEM-encoded CA certificates.

    Example -SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt + +SSLCADNRequestFile "/usr/local/apache2/conf/ca-names.crt" + @@ -975,11 +1146,11 @@ details.

    through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure -this directory contains the appropriate symbolic links. Use the -Makefile which comes with mod_ssl to accomplish this -task.

    +this directory contains the appropriate symbolic links.

    Example -SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/ + +SSLCADNRequestPath "/usr/local/apache2/conf/ca-names.crt/" + @@ -1002,10 +1173,11 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-value.rN. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    +contains the appropriate symbolic links.

    Example -SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/ + +SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl/" + @@ -1028,7 +1200,9 @@ the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally to SSLCARevocationPath.

    Example -SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl + +SSLCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl" + @@ -1036,10 +1210,12 @@ SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl SSLCARevocationCheck Enable CRL-based revocation checking -SSLCARevocationCheck chain|leaf|none +SSLCARevocationCheck chain|leaf|none flags SSLCARevocationCheck none server config virtual host +Optional flags available in httpd 2.5-dev or +later

    @@ -1050,22 +1226,37 @@ configured. When set to chain (recommended setting), CRL checks are applied to all certificates in the chain, while setting it to leaf limits the checks to the end-entity cert.

    - -When set to <code>chain</code> or <code>leaf</code>, -CRLs <em>must</em> be available for successful validation -

    -Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when -no CRL(s) were found in any of the locations configured with -SSLCARevocationFile -or SSLCARevocationPath. -With the introduction of this directive, the behavior has been changed: -when checking is enabled, CRLs must be present for the validation -to succeed - otherwise it will fail with an -"unable to get certificate CRL" error. -

    -
    +

    The available flags are:

    +
      +
    • no_crl_for_cert_ok +

      + Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when + no CRL(s) for the checked certificate(s) were found in any of the locations + configured with SSLCARevocationFile + or SSLCARevocationPath. +

      +

      + With the introduction of SSLCARevocationFile, + the behavior has been changed: by default with chain or + leaf, CRLs must be present for the + validation to succeed - otherwise it will fail with an + "unable to get certificate CRL" error. +

      +

      + The flag no_crl_for_cert_ok allows to restore + previous behaviour. +

      +
    • +
    Example + SSLCARevocationCheck chain + + +Compatibility with versions 2.2 + +SSLCARevocationCheck chain no_crl_for_cert_ok +
    @@ -1101,15 +1292,13 @@ The following levels are available for level:

    the client has to present a valid Certificate
  • optional_no_ca: the client may present a valid Certificate
    - but it need not to be (successfully) verifiable.
  • + but it need not to be (successfully) verifiable. This option + cannot be relied upon for client authentication. -

    In practice only levels none and -require are really interesting, because level -optional doesn't work with all browsers and level -optional_no_ca is actually against the idea of -authentication (but can be used to establish SSL test pages, etc.)

    Example + SSLVerifyClient require + @@ -1144,7 +1333,60 @@ certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is under SSLCACertificatePath), etc.

    Example + SSLVerifyDepth 10 + + + + + + +SSLSRPVerifierFile +Path to SRP verifier file +SSLSRPVerifierFile file-path +server config +virtual host +Available in httpd 2.4.4 and later, if using OpenSSL 1.0.1 or +later + + +

    +This directive enables TLS-SRP and sets the path to the OpenSSL SRP (Secure +Remote Password) verifier file containing TLS-SRP usernames, verifiers, salts, +and group parameters.

    +Example +SSLSRPVerifierFile "/path/to/file.srpv" + +

    +The verifier file can be created with the openssl command line +utility:

    +Creating the SRP verifier file +openssl srp -srpvfile passwd.srpv -userinfo "some info" -add username + +

    The value given with the optional -userinfo parameter is +avalable in the SSL_SRP_USERINFO request environment variable.

    + +
    +
    + + +SSLSRPUnknownUserSeed +SRP unknown user seed +SSLSRPUnknownUserSeed secret-string +server config +virtual host +Available in httpd 2.4.4 and later, if using OpenSSL 1.0.1 or +later + + +

    +This directive sets the seed used to fake SRP user parameters for unknown +users, to avoid leaking whether a given user exists. Specify a secret +string. If this directive is not used, then Apache will return the +UNKNOWN_PSK_IDENTITY alert to clients who specify an unknown username. +

    +Example +SSLSRPUnknownUserSeed "secret"
    @@ -1207,6 +1449,11 @@ The available options are:

    word `password''. Those who live under MD5-based encryption (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5 hash of the same word: ``$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/''.

    + +

    Note that the AuthBasicFake + directive within mod_auth_basic can be used as a more + general mechanism for faking basic authentication, giving control over the + structure of both the username and password.

  • StrictRequire

    @@ -1230,7 +1477,7 @@ The available options are:

    SSL parameters causes a full SSL renegotiation handshake. When this option is used mod_ssl tries to avoid unnecessary handshakes by doing more granular (but still safe) parameter checks. Nevertheless these granular - checks sometimes maybe not what the user expects, so enable this on a + checks sometimes may not be what the user expects, so enable this on a per-directory basis only, please.

  • LegacyDNStringFormat @@ -1250,10 +1497,12 @@ The available options are:

  • Example -SSLOptions +FakeBasicAuth -StrictRequire
    -<Files ~ "\.(cgi|shtml)$">
    - SSLOptions +StdEnvVars -ExportCertData
    -<Files> + +SSLOptions +FakeBasicAuth -StrictRequire +<Files ~ "\.(cgi|shtml)$"> + SSLOptions +StdEnvVars -ExportCertData +</Files> +
    @@ -1275,7 +1524,9 @@ host or directories for defending against configuration errors that expose stuff that should be protected. When this directive is present all requests are denied which are not using SSL.

    Example + SSLRequireSSL + @@ -1290,6 +1541,28 @@ boolean expression is trueAuthConfig + +SSLRequire is deprecated +

    SSLRequire is deprecated and should in general be replaced +by Require expr. The so called +ap_expr syntax of Require expr is +a superset of the syntax of SSLRequire, with the following +exception:

    + +

    In SSLRequire, the comparison operators <, +<=, ... are completely equivalent to the operators +lt, le, ... and work in a somewhat peculiar way that +first compares the length of two strings and then the lexical order. +On the other hand, ap_expr has two sets of +comparison operators: The operators <, +<=, ... do lexical string comparison, while the operators +-lt, -le, ... do integer comparison. +For the latter, there are also aliases without the leading dashes: +lt, le, ... +

    + +
    +

    This directive specifies a general access requirement which has to be fulfilled in order to allow access. It is a very powerful directive because the @@ -1337,19 +1610,21 @@ href="#envvars">Environment Variables can be used. For funcname the available functions are listed in the ap_expr documentation.

    -

    Notice that expression is first parsed into an internal machine -representation and then evaluated in a second step. Actually, in Global and -Per-Server Class context expression is parsed at startup time and -at runtime only the machine representation is executed. For Per-Directory -context this is different: here expression has to be parsed and -immediately executed for every request.

    +

    The expression is parsed into an internal machine +representation when the configuration is loaded, and then evaluated +during request processing. In .htaccess context, the expression is +both parsed and executed each time the .htaccess file is encountered during +request processing.

    + Example -
    SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/                \
    -            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."        \
    -            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}  \
    -            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5          \
    -            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
    -           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
    + +SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \ + and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ + and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ + and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5 \ + and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20 ) \ + or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ +

    The PeerExtList(object-ID) function expects @@ -1361,7 +1636,9 @@ exactly against the value of an extension identified with this OID. extension must match).

    Example + SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6") + Notes on the PeerExtList function @@ -1383,27 +1660,6 @@ the left-hand-side expression.

    -SSLRequire is deprecated -

    SSLRequire is deprecated and should in general be replaced -by Require expr. The so called -ap_expr syntax of Require expr is -a superset of the syntax of SSLRequire, with the following -exception:

    - -

    In SSLRequire, the comparison operators <, -<=, ... are completely equivalent to the operators -lt, le, ... and work in a somewhat pecular way that -first compares the length of two strings and then the lexical order. -On the other hand, ap_expr has two sets of -comparison operators: The operators <, -<=, ... do lexical string comparison, while the operators --lt, -le, ... do integer comparison. -For the latter, there are also aliases without the leading dashes: -lt, le, ... -

    - -
    -
    Environment Variables in Apache HTTP Server, for additional examples. @@ -1439,7 +1695,9 @@ memory must be considered when changing this configuration setting.

    Example + SSLRenegBufferSize 262144 + @@ -1471,7 +1729,9 @@ version of OpenSSL.

    Example + SSLStrictSNIVHostCheck on + @@ -1491,14 +1751,14 @@ keys used for authentication of the proxy server to remote servers.

    The files in this directory must be PEM-encoded and are accessed through hash filenames. Additionally, you must create symbolic links named hash-value.N. And you should always make sure this -directory contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task. -

    +directory contains the appropriate symbolic links.

    Currently there is no support for encrypted private keys

    Example -SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/ + +SSLProxyMachineCertificatePath "/usr/local/apache2/conf/proxy.crt/" + @@ -1525,7 +1785,9 @@ or additionally to SSLProxyMachineCertificatePath.

    Currently there is no support for encrypted private keys

    Example -SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem + +SSLProxyMachineCertificateFile "/usr/local/apache2/conf/ssl.crt/proxy.pem" + @@ -1555,7 +1817,9 @@ trusted as if they were also in SSLProxyCACertificateFile.

    Example -SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pem + +SSLProxyMachineCertificateChainFile "/usr/local/apache2/conf/ssl.crt/proxyCA.pem" + @@ -1592,7 +1856,9 @@ The following levels are available for level:

    optional_no_ca is actually against the idea of authentication (but can be used to establish SSL test pages, etc.)

    Example + SSLProxyVerify require + @@ -1619,7 +1885,9 @@ the remote server certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is under SSLProxyCACertificatePath), etc.

    Example + SSLProxyVerifyDepth 10 + @@ -1640,14 +1908,16 @@ is expired or not. If the check fails a 502 status code (Bad Gateway) is sent.

    Example + SSLProxyCheckPeerExpire on + SSLProxyCheckPeerCN -Whether to check the remote server certificates CN field +Whether to check the remote server certificate's CN field SSLProxyCheckPeerCN on|off SSLProxyCheckPeerCN on @@ -1656,16 +1926,79 @@ SSLProxyCheckPeerExpire on

    -This directive sets whether the remote server certificates CN field is +This directive sets whether the remote server certificate's CN field is compared against the hostname of the request URL. If both are not equal -a 502 status code (Bad Gateway) is sent. +a 502 status code (Bad Gateway) is sent. SSLProxyCheckPeerCN is +superseded by SSLProxyCheckPeerName +in release 2.4.5 and later. +

    +

    +In all releases 2.4.5 through 2.4.20, setting +SSLProxyCheckPeerName off was sufficient to enable this behavior +(as the SSLProxyCheckPeerCN default was on.) In +these releases, both directives must be set to off to completely +avoid remote server certificate name validation. Many users reported this +to be very confusing. +

    +

    +As of release 2.4.21, all configurations which enable either one of the +SSLProxyCheckPeerName or SSLProxyCheckPeerCN options +will use the new SSLProxyCheckPeerName +behavior, and all configurations which disable either one of the +SSLProxyCheckPeerName or SSLProxyCheckPeerCN options +will supress all remote server certificate name validation. Only the following +configuration will trigger the legacy certificate CN comparison in 2.4.21 and +later releases;

    Example + SSLProxyCheckPeerCN on +SSLProxyCheckPeerName off +
    + +SSLProxyCheckPeerName +Configure host name checking for remote server certificates + +SSLProxyCheckPeerName on|off +SSLProxyCheckPeerName on +server config +virtual host +Apache HTTP Server 2.4.5 and later + + +

    +This directive configures host name checking for server certificates when +mod_ssl is acting as an SSL client. The check will succeed if the host name +from the request URI matches one of the CN attribute(s) of the certificate's +subject, or matches the subjectAltName extension. If the check fails, the SSL +request is aborted and a 502 status code (Bad Gateway) is returned. +

    +

    +Wildcard matching is supported for specific cases: an subjectAltName entry +of type dNSName, or CN attributes starting with *. will match +with any host name of the same number of name elements and the same suffix. +E.g. *.example.org will match foo.example.org, +but will not match foo.bar.example.org, because the number of +elements in the respective host names differs. +

    +

    +This feature was introduced in 2.4.5 and superseded the behavior of the +SSLProxyCheckPeerCN directive, which +only tested the exact value in the first CN attribute against the host name. +However, many users were confused by the behavior of using these directives +individually, so the mutual behavior of SSLProxyCheckPeerName +and SSLProxyCheckPeerCN directives were improved in release +2.4.21. See the SSLProxyCheckPeerCN +directive description for the original behavior and details of these +improvements. +

    +
    +
    + SSLProxyEngine SSL Proxy Engine Operation Switch @@ -1680,12 +2013,22 @@ This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This is usually used inside a VirtualHost section to enable SSL/TLS for proxy usage in a particular virtual host. By default the SSL/TLS Protocol Engine is -disabled for proxy image both for the main server and all configured virtual hosts.

    +disabled for proxy both for the main server and all configured virtual hosts.

    + +

    Note that the SSLProxyEngine directive should not, in +general, be included in a virtual host that will be acting as a +forward proxy (using Proxy +or ProxyRequests directives). +SSLProxyEngine is not required to enable a forward proxy +server to proxy SSL/TLS requests.

    + Example -<VirtualHost _default_:443>
    -SSLProxyEngine on
    -...
    + +<VirtualHost _default_:443> + SSLProxyEngine on + #... </VirtualHost> +
    @@ -1694,7 +2037,7 @@ SSLProxyEngine on
    SSLProxyProtocol Configure usable SSL protocol flavors for proxy usage SSLProxyProtocol [+|-]protocol ... -SSLProxyProtocol all +SSLProxyProtocol all -SSLv3 (up to 2.4.16: all) server config virtual host Options @@ -1716,14 +2059,15 @@ for additional information. Cipher Suite available for negotiation in SSL proxy handshake SSLProxyCipherSuite cipher-spec -SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP +SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP server config virtual host directory .htaccess AuthConfig -

    Equivalent to SSLCipherSuite, but for the proxy connection. +

    Equivalent to SSLCipherSuite, but +for the proxy connection. Please refer to SSLCipherSuite for additional information.

    @@ -1747,10 +2091,11 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-value.N. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    +contains the appropriate symbolic links.

    Example -SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/ + +SSLProxyCACertificatePath "/usr/local/apache2/conf/ssl.crt/" + @@ -1772,7 +2117,9 @@ concatenation of the various PEM-encoded Certificate files, in order of preference. This can be used alternatively and/or additionally to SSLProxyCACertificatePath.

    Example -SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt + +SSLProxyCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt" + @@ -1795,10 +2142,11 @@ The files in this directory have to be PEM-encoded and are accessed through hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-value.rN. And you should always make sure this directory -contains the appropriate symbolic links. Use the Makefile which -comes with mod_ssl to accomplish this task.

    +contains the appropriate symbolic links.

    Example -SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/ + +SSLProxyCARevocationPath "/usr/local/apache2/conf/ssl.crl/" + @@ -1821,7 +2169,9 @@ the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally to SSLProxyCARevocationPath.

    Example -SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl + +SSLProxyCARevocationFile "/usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl" + @@ -1859,7 +2209,9 @@ to succeed - otherwise it will fail with an

    Example + SSLProxyCARevocationCheck chain + @@ -1872,7 +2224,6 @@ SSLProxyCARevocationCheck chain directory .htaccess AuthConfig -Available in Apache 2.0.51 and later

    @@ -1887,7 +2238,9 @@ any of the SSL environment variables.

    href="#ssloptions">SSLOptions).

    Example + SSLUserName SSL_CLIENT_S_DN_CN +
    @@ -1895,17 +2248,19 @@ SSLUserName SSL_CLIENT_S_DN_CN SSLHonorCipherOrder Option to prefer the server's cipher preference order -SSLHonorCipherOrder flag +SSLHonorCipherOrder on|off +SSLHonorCipherOrder off server config virtual host -Available in Apache 2.1 and later, if using OpenSSL 0.9.7 or later

    When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead.

    Example + SSLHonorCipherOrder on +
    @@ -1929,8 +2284,10 @@ separate "-engine" releases of OpenSSL 0.9.6 must be used.

    "openssl engine".

    Example -# For a Broadcom accelerator:
    + +# For a Broadcom accelerator: SSLCryptoDevice ubsec +
    @@ -1938,10 +2295,10 @@ SSLCryptoDevice ubsec SSLOCSPEnable Enable OCSP validation of the client certificate chain -SSLOCSPEnable flag +SSLOCSPEnable on|off +SSLOCSPEnable off server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option enables OCSP validation of the client certificate @@ -1956,10 +2313,12 @@ itself, or derived by configuration; see the directives.

    Example -SSLVerifyClient on
    -SSLOCSPEnable on
    -SSLOCSPDefaultResponder http://responder.example.com:8888/responder
    + +SSLVerifyClient on +SSLOCSPEnable on +SSLOCSPDefaultResponder "http://responder.example.com:8888/responder" SSLOCSPOverrideResponder on +
    @@ -1970,7 +2329,6 @@ SSLOCSPOverrideResponder on SSLOCSDefaultResponder uri server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the default OCSP responder to use. If SSLOCSPOverrideResponder Force use of the default responder URI for OCSP validation -SSLOCSPOverrideResponder flag +SSLOCSPOverrideResponder on|off +SSLOCSPOverrideResponder off server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option forces the configured default OCSP responder to be used @@ -2002,7 +2360,6 @@ certificate being validated references an OCSP responder.

    SSLOCSPResponseTimeSkew 300 server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the maximum allowable time skew for OCSP responses @@ -2017,7 +2374,6 @@ certificate being validated references an OCSP responder.

    SSLOCSPResponseMaxAge -1 server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the maximum allowable age ("freshness") for OCSP responses. @@ -2034,7 +2390,6 @@ which means that OCSP responses are considered valid as long as their SSLOCSPResponderTimeout 10 server config virtual host -Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later

    This option sets the timeout for queries to OCSP responders, when @@ -2042,10 +2397,41 @@ which means that OCSP responses are considered valid as long as their + +SSLOCSPUseRequestNonce +Use a nonce within OCSP queries +SSLOCSPUseRequestNonce on|off +SSLOCSPUseRequestNonce on +server config +virtual host +Available in httpd 2.4.10 and later + + +

    This option determines whether queries to OCSP responders should contain +a nonce or not. By default, a query nonce is always used and checked against +the response's one. When the responder does not use nonces (e.g. Microsoft OCSP +Responder), this option should be turned off.

    +
    + + + +SSLOCSPProxyURL +Proxy URL to use for OCSP requests +SSLOCSPProxyURL url +server config +virtual host +Available in httpd 2.4.19 and later + + +

    This option allows to set the URL of a HTTP proxy that should be used for +all queries to OCSP responders.

    +
    +
    + SSLInsecureRenegotiation Option to enable support for insecure renegotiation -SSLInsecureRenegotiation flag +SSLInsecureRenegotiation on|off SSLInsecureRenegotiation off server config virtual host @@ -2074,7 +2460,9 @@ in CVE-200 Example + SSLInsecureRenegotiation on +

    The SSL_SECURE_RENEG environment variable can be used @@ -2091,7 +2479,7 @@ supported for a given SSL connection.

    SSLUseStapling off server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    This option enables OCSP stapling, as defined by the "Certificate @@ -2102,15 +2490,23 @@ for its own certificate in the TLS handshake. Configuring an prerequisite for enabling OCSP stapling.

    OCSP stapling relieves the client of querying the OCSP responder -on its own, but it should be noted that in its current specification, +on its own, but it should be noted that with the RFC 6066 specification, the server's CertificateStatus reply may only include an OCSP response for a single cert. For server certificates with intermediate CA certificates in their chain (the typical case nowadays), -stapling in its current form therefore only partially achieves the -stated goal of "saving roundtrips and resources" - see also the -"Adding Multiple TLS Certificate Status Extension requests" Internet draft. +stapling in its current implementation therefore only partially achieves the +stated goal of "saving roundtrips and resources" - see also +RFC 6961 +(TLS Multiple Certificate Status Extension). +

    + +

    When OCSP stapling is enabled, the ssl-stapling mutex is used +to control access to the OCSP stapling cache in order to prevent corruption, +and the sss-stapling-refresh mutex is used to control refreshes +of OCSP responses. These mutexes can be configured using the +Mutex directive.

    +
    @@ -2119,7 +2515,7 @@ href="https://datatracker.ietf.org/doc/draft-pettersen-tls-ext-multiple-ocsp/"> Configures the OCSP stapling cache SSLStaplingCache type server config -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    Configures the cache used to store OCSP responses which get included @@ -2138,7 +2534,7 @@ the same storage types are supported as with SSLStaplingResponseTimeSkew 300 server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    This option sets the maximum allowable time skew when mod_ssl checks the @@ -2155,7 +2551,7 @@ if SSLUseStapling is turned on.

    SSLStaplingResponderTimeout 10 server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    This option sets the timeout for queries to OCSP responders when @@ -2171,7 +2567,7 @@ and mod_ssl is querying a responder for OCSP stapling purposes.

    SSLStaplingResponseMaxAge -1 server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    This option sets the maximum allowable age ("freshness") when @@ -2190,7 +2586,7 @@ which means that OCSP responses are considered valid as long as their SSLStaplingStandardCacheTimeout 3600 server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    Sets the timeout in seconds before responses in the OCSP stapling cache @@ -2209,13 +2605,15 @@ used for controlling the timeout for invalid/unavailable responses. SSLStaplingReturnResponderErrors on server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    When enabled, mod_ssl will pass responses from unsuccessful -stapling related OCSP queries (such as status errors, expired responses etc.) -on to the client. If set to off, no stapled responses -for failed queries will be included in the TLS handshake.

    +stapling related OCSP queries (such as responses with an overall status +other than "successful", responses with a certificate status other than +"good", expired responses etc.) on to the client. +If set to off, only responses indicating a certificate status +of "good" will be included in the TLS handshake.

    @@ -2226,7 +2624,7 @@ for failed queries will be included in the TLS handshake.

    SSLStaplingFakeTryLater on server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    When enabled and a query to an OCSP responder for stapling @@ -2244,7 +2642,7 @@ is also enabled.

    SSLStaplingErrorCacheTimeout 600 server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    Sets the timeout in seconds before invalid responses @@ -2261,12 +2659,130 @@ To set the cache timeout for valid responses, see SSLStaplingForceURL uri server config virtual host -Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later +Available if using OpenSSL 0.9.8h or later

    This directive overrides the URI of an OCSP responder as obtained from the authorityInfoAccess (AIA) extension of the certificate. -Of potential use when going through a proxy for retrieving OCSP queries.

    +One potential use is when a proxy is used for retrieving OCSP queries.

    +
    + + + +SSLSessionTicketKeyFile +Persistent encryption/decryption key for TLS session tickets +SSLSessionTicketKeyFile file-path +server config +virtual host +Available in httpd 2.4.0 and later, if using OpenSSL 0.9.8h or later + + +

    Optionally configures a secret key for encrypting and decrypting +TLS session tickets, as defined in +RFC 5077. +Primarily suitable for clustered environments where TLS sessions information +should be shared between multiple nodes. For single-instance httpd setups, +it is recommended to not configure a ticket key file, but to +rely on (random) keys generated by mod_ssl at startup, instead.

    +

    The ticket key file must contain 48 bytes of random data, +preferrably created from a high-entropy source. On a Unix-based system, +a ticket key file can be created as follows:

    + + +dd if=/dev/random of=/path/to/file.tkey bs=1 count=48 + + +

    Ticket keys should be rotated (replaced) on a frequent basis, +as this is the only way to invalidate an existing session ticket - +OpenSSL currently doesn't allow to specify a limit for ticket lifetimes. +A new ticket key only gets used after restarting the web server. +All existing session tickets become invalid after a restart.

    + + +

    The ticket key file contains sensitive keying material and should +be protected with file permissions similar to those used for +SSLCertificateKeyFile.

    +
    +
    +
    + + +SSLCompression +Enable compression on the SSL level +SSLCompression on|off +SSLCompression off +server config +virtual host +Available in httpd 2.4.3 and later, if using OpenSSL 0.9.8 or later; +virtual host scope available if using OpenSSL 1.0.0 or later. +The default used to be on in version 2.4.3. + + +

    This directive allows to enable compression on the SSL level.

    + +

    Enabling compression causes security issues in most setups (the so called +CRIME attack).

    +
    +
    +
    + + +SSLSessionTickets +Enable or disable use of TLS session tickets +SSLSessionTickets on|off +SSLSessionTickets on +server config +virtual host +Available in httpd 2.4.11 and later, if using OpenSSL 0.9.8f +or later. + + +

    This directive allows to enable or disable the use of TLS session tickets +(RFC 5077).

    + +

    TLS session tickets are enabled by default. Using them without restarting +the web server with an appropriate frequency (e.g. daily) compromises perfect +forward secrecy.

    +
    +
    +
    + + +SSLOpenSSLConfCmd +Configure OpenSSL parameters through its SSL_CONF API +SSLOpenSSLConfCmd command-name command-value +server config +virtual host +Available in httpd 2.4.8 and later, if using OpenSSL 1.0.2 or later + + +

    This directive exposes OpenSSL's SSL_CONF API to mod_ssl, +allowing a flexible configuration of OpenSSL parameters without the need +of implementing additional mod_ssl directives when new +features are added to OpenSSL.

    + +

    The set of available SSLOpenSSLConfCmd commands +depends on the OpenSSL version being used for mod_ssl +(at least version 1.0.2 is required). For a list of supported command +names, see the section Supported configuration file commands in the +SSL_CONF_cmd(3) manual page for OpenSSL.

    + +

    Some of the SSLOpenSSLConfCmd commands can be used +as an alternative to existing directives (such as +SSLCipherSuite or +SSLProtocol), +though it should be noted that the syntax / allowable values for the parameters +may sometimes differ.

    + +Examples + +SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference +SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1 +SSLOpenSSLConfCmd ServerInfoFile "/usr/local/apache2/conf/server-info.pem" +SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2" +SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256 + +
    diff --git a/docs/manual/mod/mod_ssl.xml.fr b/docs/manual/mod/mod_ssl.xml.fr new file mode 100644 index 00000000000..236ca74707a --- /dev/null +++ b/docs/manual/mod/mod_ssl.xml.fr @@ -0,0 +1,3105 @@ + + + + + + + + + + + +mod_ssl +Chiffrement de haut niveau basé sur les protocoles Secure +Sockets Layer (SSL) et Transport Layer Security (TLS) +Extension +mod_ssl.c +ssl_module + + +

    Ce module fournit le support SSL v3 et TLS v1 au serveur HTTP +Apache. SSL v2 n'est plus supporté.

    + +

    Ce module s'appuie sur OpenSSL +pour fournir le moteur de chiffrement.

    + +

    D'autres détails, discussions et exemples sont fournis dans la documentation SSL.

    +
    + +
    Variables d'environnement + +

    Ce module peut être configuré pour fournir aux espaces de nommage SSI +et CGI de nombreux éléments d'informations concernant SSL par le biais +de variables d'environnement supplémentaires. Par défaut, et pour +des raisons de performances, ces informations ne sont pas fournies (Voir +la directive SSLOptions StdEnvVars ci-dessous). +Les variables générées se trouvent dans la table ci-dessous. +Ces informations peuvent également être disponible sous des noms différents +à des fins de compatibilité ascendante. Reportez-vous au chapitre Compatibilité pour plus de détails à +propos des variables de compatibilité.

    + +
    Cipher-Tag Protocol Key Ex. Auth. Enc. MAC Type
    RSA Ciphers:
    DES-CBC3-SHA SSLv3 RSA RSA 3DES(168) SHA1
    DES-CBC3-MD5 SSLv2 RSA RSA 3DES(168) MD5
    IDEA-CBC-SHA SSLv3 RSA RSA IDEA(128) SHA1
    RC4-SHA SSLv3 RSA RSA RC4(128) SHA1
    RC4-MD5 SSLv3 RSA RSA RC4(128) MD5
    IDEA-CBC-MD5 SSLv2 RSA RSA IDEA(128) MD5
    RC2-CBC-MD5 SSLv2 RSA RSA RC2(128) MD5
    RC4-MD5 SSLv2 RSA RSA RC4(128) MD5
    DES-CBC-SHA SSLv3 RSA RSA DES(56) SHA1
    RC4-64-MD5 SSLv2 RSA RSA RC4(64) MD5
    DES-CBC-MD5 SSLv2 RSA RSA DES(56) MD5
    EXP-DES-CBC-SHA SSLv3 RSA(512) RSA DES(40) SHA1 export
    EXP-RC2-CBC-MD5 SSLv3 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv3 RSA(512) RSA RC4(40) MD5 export
    EXP-RC2-CBC-MD5 SSLv2 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv2 RSA(512) RSA RC4(40) MD5 export
    NULL-SHA SSLv3 RSA RSA None SHA1
    NULL-MD5 SSLv3 RSA RSA None MD5
    Diffie-Hellman Ciphers:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nom de la variable :Type de valeur :Description :
    HTTPS drapeauHTTPS est utilisé.
    SSL_PROTOCOL chaîneLa version du protocole SSL (SSLv3, TLSv1, TLSv1.1, TLSv1.2)
    SSL_SESSION_ID chaîneL'identifiant de session SSL codé en hexadécimal
    SSL_SESSION_RESUMED chaîneSession SSL initiale ou reprise. Note : plusieurs requêtes peuvent +être servies dans le cadre de la même session SSL (initiale ou reprise) +si les connexions persistantes (HTTP KeepAlive) sont utilisées
    SSL_SECURE_RENEG chaînetrue si la renégociation sécurisée est supportée, +false dans le cas contraire
    SSL_CIPHER chaîneLe nom de l'algorithme de chiffrement
    SSL_CIPHER_EXPORT chaînetrue si l'algorithme de chiffrement est un algorithme +exporté
    SSL_CIPHER_USEKEYSIZE nombreNombre de bits de chiffrement (réellement utilisés)
    SSL_CIPHER_ALGKEYSIZE nombreNombre de bits de chiffrement (possible)
    SSL_COMPRESS_METHOD chaîneMéthode de compression SSL négociée
    SSL_VERSION_INTERFACE chaîneLa version du programme mod_ssl
    SSL_VERSION_LIBRARY chaîneLa version du programme OpenSSL
    SSL_CLIENT_M_VERSION chaîneLa version du certificat client
    SSL_CLIENT_M_SERIAL chaîneLe numéro de série du certificat client
    SSL_CLIENT_S_DN chaîneLe DN sujet du certificat client
    SSL_CLIENT_S_DN_x509 chaîneElément du DN sujet du client
    SSL_CLIENT_SAN_Email_n chaîneLes entrées d'extension subjectAltName du certificat client de type rfc822Name
    SSL_CLIENT_SAN_DNS_n chaîneLes entrées d'extension subjectAltName du certificat client de type dNSName
    SSL_CLIENT_SAN_OTHER_msUPN_nchaîne Extensions subjectAltName de type otherName du +certificat client, forme Microsoft du nom principal de l'utilisateur (OID 1.3.6.1.4.1.311.20.2.3)
    SSL_CLIENT_I_DN chaîneDN de l'émetteur du certificat du client
    SSL_CLIENT_I_DN_x509 chaîneElément du DN de l'émetteur du certificat du client
    SSL_CLIENT_V_START chaîneValidité du certificat du client (date de début)
    SSL_CLIENT_V_END chaîneValidité du certificat du client (date de fin)
    SSL_CLIENT_V_REMAIN chaîneNombre de jours avant expiration du certificat du client
    SSL_CLIENT_A_SIG chaîneAlgorithme utilisé pour la signature du certificat du client
    SSL_CLIENT_A_KEY chaîneAlgorithme utilisé pour la clé publique du certificat du client
    SSL_CLIENT_CERT chaîneCertificat du client au format PEM
    SSL_CLIENT_CERT_CHAIN_nchaîne Certificats de la chaîne de certification du +client au format PEM
    SSL_CLIENT_CERT_RFC4523_CEA chaîneNuméro de série et fournisseur du certificat. le format correspond à +celui de la CertificateExactAssertion dans la RFC4523
    SSL_CLIENT_VERIFY chaîneNONE, SUCCESS, GENEROUS ou +FAILED:raison
    SSL_SERVER_M_VERSION chaîneLa version du certificat du serveur
    SSL_SERVER_M_SERIAL chaîne + +The serial of the server certificate
    SSL_SERVER_S_DN chaîneDN sujet du certificat du serveur
    SSL_SERVER_S_DN_x509 chaîneElément du DN sujet du certificat du serveur
    SSL_SERVER_SAN_Email_nchaîne Les entrées d'extension subjectAltName du +certificat de serveur de type rfc822Name
    SSL_SERVER_SAN_DNS_n chaîneLes entrées d'extension subjectAltName du +certificat de serveur de type dNSName
    SSL_SERVER_SAN_OTHER_dnsSRV_nchaîne Extensions subjectAltName de type otherName du +certificat serveur, sous la forme SRVName (OID 1.3.6.1.5.5.7.8.7, RFC 4985)
    SSL_SERVER_I_DN chaîneDN de l'émetteur du certificat du serveur
    SSL_SERVER_I_DN_x509 chaîneElément du DN de l'émetteur du certificat du serveur
    SSL_SERVER_V_START chaîneValidité du certificat du serveur (date de dédut)
    SSL_SERVER_V_END chaîneValidité du certificat du serveur (date de fin)
    SSL_SERVER_A_SIG chaîneAlgorithme utilisé pour la signature du certificat du serveur
    SSL_SERVER_A_KEY chaîneAlgorithme utilisé pour la clé publique du certificat du serveur
    SSL_SERVER_CERT chaîneCertificat du serveur au format PEM
    SSL_SRP_USER chaînenom d'utilisateur SRP
    SSL_SRP_USERINFO chaîneinformations sur l'utilisateur SRP
    SSL_TLS_SNI stringContenu de l'extension SNI TLS (si supporté par ClientHello)
    + +

    x509 spécifie un élément de DN X.509 parmi +C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email. A partir de la version +2.1 d'Apache, x509 peut aussi comporter un suffixe numérique +_n. Si le DN en question comporte plusieurs attributs de +noms identiques, ce suffixe constitue un index débutant à zéro et +permettant de sélectionner un +attribut particulier. Par exemple, si le DN sujet du certificat du +serveur comporte deux champs OU, on peut utiliser +SSL_SERVER_S_DN_OU_0 et SSL_SERVER_S_DN_OU_1 +pour référencer chacun d'entre eux. Un nom de variable sans suffixe +_n est équivalent au même nom avec le suffixe +_0, ce qui correspond au premier attribut (ou au seul) +caractérisant le DN. +Lorsque la table d'environnement est remplie en utilisant l'option +StdEnvVars de la directive SSLOptions, le premier attribut (ou le +seul) caractérisant le DN est enregistré avec un nom sans suffixe ; +autrement dit, aucune entrée possédant comme suffixe _0 +n'est enregistrée.

    + +

    Le format des variables *_DN a changé depuis la version +2.3.11 d'Apache HTTPD. Voir l'option LegacyDNStringFormat +de la directive SSLOptions pour +plus de détails.

    + +

    SSL_CLIENT_V_REMAIN n'est disponible qu'à partir de la +version 2.1.

    + +

    Plusieurs variables d'environnement additionnelles peuvent être +utilisées dans les expressions SSLRequire, ou +dans les formats de journalisation personnalisés :

    + +
    HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
    +HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
    +HTTP_COOKIE            REMOTE_HOST           API_VERSION
    +HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
    +HTTP_HOST              IS_SUBREQ             TIME_MON
    +HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
    +HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
    +THE_REQUEST            SERVER_NAME           TIME_MIN
    +REQUEST_FILENAME       SERVER_PORT           TIME_SEC
    +REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
    +REQUEST_SCHEME         REMOTE_ADDR           TIME
    +REQUEST_URI            REMOTE_USER
    + +

    Dans ces contextes, deux formats spéciaux peuvent aussi être utilisés +:

    + +
    +
    ENV:nom_variable
    +
    Correspond à la variable d'environnement standard + nom_variable.
    + +
    HTTP:nom_en-tête
    +
    Correspond à la valeur de l'en-tête de requête dont le nom est + nom_en-tête.
    +
    + + + +
    Formats de journaux +personnalisés + +

    Lorsque mod_ssl est compilé dans le serveur Apache +ou même chargé (en mode DSO), des fonctions supplémentaires sont +disponibles pour le Format de journal personnalisé du +module mod_log_config. A ce titre, la fonction de +format d'eXtension ``%{nom-var}x'' +peut être utilisée pour présenter en extension toute variable fournie +par tout module, et en particulier celles fournies par mod_ssl et que +vous trouverez dans la table ci-dessus.

    +

    +A des fins de compatibilité ascendante, il existe une fonction de format +cryptographique supplémentaire +``%{nom}c''. Vous trouverez toutes +les informations à propos de cette fonction dans le chapitre Compatibilité.

    +Exemple + +CustomLog "logs/ssl_request_log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + +

    Ces formats sont disponibles même si l'option StdEnvVars de la +directive SSLOptions n'a pas été +définie.

    +
    + +
    Information à propos de la requête + +

    mod_ssl enregistre des informations à propos de la +requête que l'on peut restituer dans les journaux avec la chaîne de +format %{nom}n via le module +mod_log_config.

    + +

    Les informations enregistrées sont les suivantes :

    + +
    +
    ssl-access-forbidden
    +
    Cette information contient la valeur 1 si l'accès a + été refusé suite à une directive SSLRequire ou + SSLRequireSSL.
    + +
    ssl-secure-reneg
    +
    Si mod_ssl a été compilé avec une version + d'OpenSSL qui supporte la renégociation sécurisée, si SSL est utilisé + pour la connexion courante et si le client supporte lui aussi la + renégociation sécurisée, cette information contiendra la valeur + 1. Si le client ne supporte pas la renégociation + sécurisée, l'information contiendra la valeur 0. Si + mod_ssl n'a pas été compilé avec une version + d'OpenSSL qui supporte la renégociation sécurisée, ou si SSL n'est pas + utilisé pour la connexion courante, le contenu de l'information ne + sera pas défini.
    +
    + +
    + +
    Extension pour l'interprétation +des expressions + +

    Lorsque mod_ssl est compilé statiquement avec +Apache, ou même chargé dynamiquement (en tant que module DSO), toute variable en provenance de mod_ssl peut +être utilisée pour l'interprétation des +expression ap_expr. Les variables peuvent être référencées en +utilisant la syntaxe ``%{varname}''. +A partir de la version 2.4.18, on peut aussi utiliser la syntaxe de +style mod_rewrite +``%{SSL:varname}'', ou la syntaxe de +style fonction ``ssl(varname)''.

    +Exemple (en utilisant <module>mod_headers</module>) + +Header set X-SSL-PROTOCOL "expr=%{SSL_PROTOCOL}" +Header set X-SSL-CIPHER "expr=%{SSL:SSL_CIPHER}" + + +

    Cette fonctionnalité est disponible même si l'option +StdEnvVars de la directive SSLOptions n'a pas été définie.

    +
    + +
    Fournisseurs d'autorisation +disponibles avec Require + +

    mod_ssl propose quelques fournisseurs + d'autorisation à utiliser avec la directive Require du module + mod_authz_core.

    + +
    Require ssl + +

    Le fournisseur ssl refuse l'accès si une connexion + n'est pas chiffrée avec SSL. L'effet est similaire à celui de la + directive SSLRequireSSL.

    + + + + Require ssl + + + +
    + +
    Require ssl-verify-client + +

    Le fournisseur ssl autorise l'accès si + l'utilisateur est authentifié via un certificat client valide. Ceci + n'a un effet que si SSLVerifyClient optional est actif.

    + +

    Dans l'exemple suivant, l'accès est autorisé si le client est + authentifié via un certificat client ou par nom d'utilisateur/mot de + passe :

    + + +Require ssl-verify-client +Require valid-user + + +
    + +
    + + +SSLPassPhraseDialog +Méthode utilisée pour entrer le mot de passe pour les clés +privées chiffrées +SSLPassPhraseDialog type +SSLPassPhraseDialog builtin +server config + + +

    +Lors de son démarrage, Apache doit lire les différents fichiers de +certificats (voir la directive SSLCertificateFile) et de clés privées +(voir la directive SSLCertificateKeyFile) des serveurs +virtuels où SSL est activé. Comme, pour des raisons de sécurité, les +fichiers de clés privées sont en général chiffrés, mod_ssl doit +demander à l'administrateur un mot de passe pour déchiffrer ces +fichiers. L'argument type permet de choisir la manière dont +cette demande peut être formulée parmi les trois suivantes :

    +
      +
    • builtin +

      + C'est la méthode par défaut, et un dialogue interactive de terminal + s'ouvre au cours du démarrage juste avant qu'Apache ne se détache du + terminal. A ce moment, l'administrateur doit entrer manuellement un + mot de passe pour chaque fichier de clé privée chiffré. Etant donné + qu'il peut y avoir un grand nombre de serveurs virtuels configurés + avec SSL activé, le protocole de réutilisation suivant est utilisé + pour minimiser le dialogue : lorsqu'un fichier de clé privée est + chiffré, tous les mots de passe connus (au début, il n'y en a aucun, + bien entendu) sont essayés. Si l'un de ces mots de passe connus + convient, aucun dialogue ne s'ouvrira pour ce fichier de + clé privée particulier. Si aucun ne convient, un autre mot de passe + sera demandé à partir du terminal et sera mis en mémoire pour le + fichier de clé privée suivant (pour lequel il pourra éventuellement + être réutilisé).

      +

      + Cette méthode confère à mod_ssl une grande souplesse (car pour N + fichiers de clé privée chiffrés, vous pouvez utiliser N + mots de passe différents - mais vous devrez alors tous les fournir, + bien entendu), tout en minimisant le dialogue de terminal (vous + pouvez en effet utiliser un seul mot de passe pour les N fichiers de + clé privée et vous n'aurez alors à l'entrer qu'une seule + fois).

    • + +
    • |/chemin/vers/programme [arguments...] + +

      Ce mode permet d'utiliser un programme externe qui va se présenter + comme une redirection vers un périphérique d'entrée particulier ; le + texte de prompt standard utilisé pour le mode builtin + est envoyé au programme sur stdin, et celui-ci doit + renvoyer des mots de passe sur stdout. Si + plusieurs mots de passe sont requis (ou si un mot de passe incorrect + a été entré), un texte de prompt supplémentaire sera écrit après le + retour du premier mot de passe, et d'autres mots de passe devront + alors être réécrits.

    • + +
    • exec:/chemin/vers/programme +

      + Ici, un programme externe est appelé au démarrage du serveur pour + chaque fichier de clé privée chiffré.Il est appelé avec deux + arguments (le premier est de la forme + ``nom-serveur:port'', le second + est ``RSA'', ``DSA'', ``ECC'' + ou un index entier commençant à 3 si plus de 3 clés ont été + configurées), qui + indiquent pour quels serveur et algorithme il doit écrire le mot de + passe correspondant sur stdout. Avec les versions 2.4.8 + (non réalisée) et + 2.4.9, il est appelé avec un seul argument, une chaîne de la forme + "servername:portnumber:index" (où index + est un nombre entier commençant à zéro), qui spécifie le serveur, + le port TCP et un numéro de certificat. Le but recherché est + l'exécution de vérifications de sécurité préalables permettant de + s'assurer que le système n'est pas victime d'une attaque, et de ne + fournir le mot de passe que si toutes les vérifications ont été + effectuées avec succès.

      +

      + Ces vérifications de sécurité, ainsi que la manière dont le mot de + passe est déterminé peuvent être aussi sophistiqués que vous le + désirez. Mod_ssl ne définit que l'interface : un programme + exécutable qui écrit le mot de passe sur stdout. Ni + plus, ni moins ! Ainsi, si vous êtes vraiment paranoïaque en matière + de sécurité, voici votre interface. Tout le reste doit être confié à + l'administrateur à titre d'exercice, car les besoins en sécurité + locale sont très différents.

      +

      + L'algorithme de réutilisation est utilisé ici aussi. En d'autres + termes, le programme externe n'est appelé qu'une fois par mot de + passe unique.

    • +
    +Exemple + +SSLPassPhraseDialog "exec:/usr/local/apache/sbin/pp-filter" + + +
    +
    + + +SSLRandomSeed +Source de déclenchement du Générateur de Nombres +Pseudo-Aléatoires (PRNG) +SSLRandomSeed contexte source +[nombre] +server config + + +

    +Cette directive permet de définir une ou plusieurs sources de +déclenchement du Générateur de Nombres Pseudo-Aléatoires (PRNG) dans +OpenSSL au démarrage du serveur (si contexte a pour valeur +startup) et/ou juste avant l'établissement d'une nouvelle +connexion SSL (si contexte a pour valeur connect). +Cette directive ne peut être utilisée qu'au niveau du serveur global car +le PRNG est un service global.

    +

    +Les différentes valeurs de source disponibles sont :

    +
      +
    • builtin +

      Cette source de déclenchement intégrée est toujours disponible. + Son utilisation consomme un minimum de cycles CPU en cours + d'exécution, et son utilisation ne présente de ce fait aucun + problème. La source utilisée pour déclencher le PRNG contient la + date courante, l'identifiant du processus courant et (si disponible) + un extrait de 1Ko aléatoirement choisi de la structure d'Apache pour + les échanges inter-processus. Ceci présente un inconvénient car le + caractère aléatoire de cette source n'est pas vraiment fort, et au + démarrage (lorsque la structure d'échanges n'est pas encore + disponible), cette source ne produit que quelques octets d'entropie. + Vous devez donc toujours utiliser une source de déclenchement + additionnelle, au moins pour le démarrage.

    • +
    • file:/chemin/vers/source +

      + Cette variante utilise un fichier externe + file:/chemin/vers/source comme source de déclenchement + du PRNG. Lorsque nombre est spécifié, seuls les + nombre premiers octets du fichier forment l'entropie (et + nombre est fourni comme premier argument à + /chemin/vers/source). Lorsque nombre n'est pas + spécifié, l'ensemble du fichier forme l'entropie (et 0 + est fourni comme premier argument à + /chemin/vers/source). Utilisez cette source en + particulier au démarrage, par exemple avec un fichier de + périphérique /dev/random et/ou + /dev/urandom (qui sont en général présent sur les + plate-formes dérivées d'Unix modernes comme FreeBSD et Linux).

      +

      Soyez cependant prudent : en général, + /dev/random ne fournit que l'entropie dont il dispose + réellement ; en d'autres termes, lorsque vous demandez 512 octets + d'entropie, si le périphérique ne dispose que de 100 octets, deux + choses peuvent se produire : sur certaines plates-formes, vous ne + recevez que les 100 octets, alors que sur d'autres, la lecture se + bloque jusqu'à ce qu'un nombre suffisant d'octets soit disponible + (ce qui peut prendre beaucoup de temps). Il est préférable ici + d'utiliser le périphérique /dev/urandom, car il ne se + bloque jamais et fournit vraiment la quantité de données demandées. + Comme inconvénient, les données reçues ne sont pas forcément de la + meilleure qualité.

    • + +
    • exec:/chemin/vers/programme +

      + Cette variante utilise un exécutable externe + /chemin/vers/programme comme source de déclenchement du + PRNG. Lorsque nombre est spécifié, seules les + nombre premiers octets de son flux stdout + forment l'entropie. Lorsque nombre n'est pas spécifié, + l'intégralité des données produites sur stdout forment + l'entropie. N'utilisez cette variante qu'au démarrage où une source + de déclenchement fortement aléatoire est nécessaire, en utilisant + un programme externe (comme dans l'exemple + ci-dessous avec l'utilitaire truerand basé sur la + bibliothèque truerand de AT&T que vous trouverez + dans la distribution de mod_ssl). Bien entendu, l'utilisation de + cette variante dans un contexte "connection" ralentit le serveur de + manière trop importante, et en général, vous devez donc éviter + d'utiliser des programmes externes dans ce contexte.

    • +
    • egd:/chemin/vers/socket-egd (Unix seulement) +

      Cette variante utilise le socket de domaine Unix du Démon + Générateur d'Entropie externe ou Entropy Gathering Daemon ou EGD + (voir http://www.lothar.com/tech + /crypto/) pour déclencher le PRNG. N'utilisez cette variante que + si votre plate-forme ne possède pas de périphérique random ou + urandom.

    • +
    +Exemple + +SSLRandomSeed startup builtin +SSLRandomSeed startup "file:/dev/random" +SSLRandomSeed startup "file:/dev/urandom" 1024 +SSLRandomSeed startup "exec:/usr/local/bin/truerand" 16 +SSLRandomSeed connect builtin +SSLRandomSeed connect "file:/dev/random" +SSLRandomSeed connect "file:/dev/urandom" 1024 + + +
    +
    + + +SSLSessionCache +Type du cache de session SSL global et +inter-processus +SSLSessionCache type +SSLSessionCache none +server config + + +

    +Cette directive permet de configurer le type de stockage du cache de +session SSL global et inter-processus. Ce cache est une fonctionnalité +optionnelle qui accélère le traitement parallèle des requêtes. Pour ce +qui est des requêtes vers un même processus du serveur (via HTTP +keep-alive), OpenSSL met en cache les informations de session SSL en +interne. Mais comme les clients modernes demandent des images en ligne +et d'autres données via des requêtes parallèles (un nombre de quatre +requêtes parallèles est courant), ces requêtes vont être servies par +plusieurs processus du serveur pré-déclenchés. Ici, un cache +inter-processus permet d'éviter des négociations de session +inutiles.

    +

    +Les quatre types de stockage suivants sont actuellement +supportés :

    +
      +
    • none + +

      Cette valeur désactive le cache de session global et + inter-processus, ce qui va ralentir le serveur de manière sensible + et peut poser problème avec certains navigateurs, en particulier si + les certificats clients sont activés. Cette configuration n'est pas + recommandée.

    • + +
    • nonenotnull + +

      Cette valeur désactive tout cache de session global et + inter-processus. Cependant, elle force OpenSSL à envoyer un + identifiant de session non nul afin de s'adapter aux clients bogués + qui en nécessitent un.

    • + +
    • dbm:/chemin/vers/fichier-données + +

      Cette valeur utilise un fichier de hashage DBM sur disque local + pour synchroniser les caches OpenSSL locaux en mémoire des processus + du serveur. Ce cache de session peut être sujet à des problèmes de + fiabilité sous forte charge. Pour l'utiliser, le module + mod_socache_dbm doit être chargé.

    • + +
    • shmcb:/chemin/vers/fichier-données[(nombre)] + +

      Cette valeur utilise un tampon cyclique à hautes performances + (d'une taille d'environ nombre octets) dans un segment de + mémoire partagée en RAM (établi via + /chemin/vers/fichier-données, pour synchroniser les + caches OpenSSL locaux en mémoire des processus du serveur. C'est le + type de cache de session recommandé. Pour l'utiliser, le module + mod_socache_shmcb doit être chargé.

    • + +
    • dc:UNIX:/chemin/vers/socket + +

      Cette valeur utilise les bibliothèques de mise en cache de + sessions distribuée sur distcache. + L'argument doit spécifier le serveur ou mandataire à utiliser en + utilisant la syntaxe d'adressage distcache ; par exemple, + UNIX:/chemin/vers/socket spécifie une socket de domaine + Unix (en général un mandataire de dc_client local) ; + IP:serveur.example.com:9001 spécifie une adresse IP. + Pour l'utiliser, le module mod_socache_dc doit être + chargé.

    • + +
    + +Exemples + +SSLSessionCache "dbm:/usr/local/apache/logs/ssl_gcache_data" +SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)" + + + +

    Le mutex ssl-cache permet de sérialiser l'accès au cache +de session afin d'éviter toute corruption. Ce mutex peut être configuré +via la directive Mutex.

    +
    +
    + + +SSLSessionCacheTimeout +Nombre de secondes avant l'expiration d'une session SSL +dans le cache de sessions +SSLSessionCacheTimeout secondes +SSLSessionCacheTimeout 300 +server config +virtual host +S'applique aussi à la reprise de session TLS (RFC 5077) à +partir de la version 2.4.10 du serveur HTTP Apache + + +

    +Cette directive permet de définir la durée de vie en secondes des +informations stockées dans le cache de sessions SSL global et +inter-processus, dans le cache OpenSSL interne en mémoire et pour +les sessions réinitialisées par la reprise de session TLS (RFC 5077). elle peut +être définie à une valeur d'environ 15 à des fins de test, mais à une +valeur très supérieure comme 300 en production.

    +Exemple + +SSLSessionCacheTimeout 600 + + +
    +
    + + +SSLEngine +Interrupteur marche/arrêt du moteur SSL +SSLEngine on|off|optional +SSLEngine off +server config +virtual host + + +

    +Cette directive permet d'activer/désactiver le moteur du protocole +SSL/TLS. Elle doit être utilisée dans une section VirtualHost pour activer +SSL/TLS pour ce serveur virtuel particulier. Par défaut, le moteur du +protocole SSL/TLS est désactivé pour le serveur principal et tous les +serveurs virtuels configurés.

    +Exemple + +<VirtualHost _default_:443> +SSLEngine on +#... +</VirtualHost> + + +

    Depuis la version 2.1 d'Apache, la directive +SSLEngine peut être définie à +optional, ce qui active le support de RFC 2817, Upgrading to +TLS Within HTTP/1.1. Pour le moment, aucun navigateur web ne supporte +RFC 2817.

    +
    +
    + + +SSLFIPS +Coimmutateur du mode SSL FIPS +SSLFIPS on|off +SSLFIPS off +server config + + +

    +Cette directive permet d'activer/désactiver l'utilisation du drapeau +FIPS_mode de la bibliothèque SSL. Elle doit être définie dans le +contexte du serveur principal, et n'accepte pas les configurations +sources de conflits (SSLFIPS on suivi de SSLFIPS off par exemple). Le +mode s'applique à toutes les opérations de la bibliothèque SSL. +

    +

    +Si httpd a été compilé avec une bibliothèque SSL qui ne supporte pas le +drapeau FIPS_mode, la directive SSLFIPS on échouera. +Reportez-vous au document sur la politique de sécurité FIPS 140-2 de la +bibliothèque du fournisseur SSL, pour les prérequis spécifiques +nécessaires à l'utilisation de mod_ssl selon un mode d'opération +approuvé par FIPS 140-2 ; notez que mod_ssl en lui-même n'est pas +validé, mais peut être décrit comme utilisant un module de chiffrement +validé par FIPS 140-2, lorsque tous les composants sont assemblés et mis +en oeuvre selon les recommandations de la politique de sécurité +applicable. +

    +
    +
    + + +SSLProtocol +Indique les versions du protocole SSL/TLS +disponibles +SSLProtocol [+|-]protocole ... +SSLProtocol all -SSLv3 (jusqu'à la version 2.4.16 : all) +server config +virtual host + + +

    +Cette directive permet de définir quelles versions du protocole SSL/TLS +seront acceptées lors de l'initialisation d'une nouvelle connexion.

    +

    +Les protocoles disponibles sont les suivants (sensibles à la +casse) :

    +
      +
    • SSLv3 +

      + Il s'agit du protocole Secure Sockets Layer (SSL) version 3.0 de + Netscape Corporation. C'est le successeur de SSLv2 et le + prédécesseur de TLSv1, mais est considéré comme + obsolète dans la RFC + 7568

    • + +
    • TLSv1 +

      + Il s'agit du protocole Transport Layer Security (TLS) version 1.0. + C'est le successeur de SSLv3, et il est défini dans la RFC2246. Il est + supporté par la plupart des clients.

    • + +
    • TLSv1.1 (à partir de la version 1.0.1 d'OpenSSL) +

      + Une révision du protocole TLS 1.0 définie dans la RFC 4346.

    • + +
    • TLSv1.2 (à partir de la version 1.0.1 d'OpenSSL) +

      + Une révision du protocole TLS 1.1 définie dans la RFC 5246.

    • + +
    • all +

      + C'est un raccourci pour ``+SSLv3 +TLSv1'' ou - à partir + de la version 1.0.1 d'OpenSSL - ``+SSLv3 +TLSv1 +TLSv1.1 + +TLSv1.2'' (sauf si OpenSSL a été compilé avec l'option + ``no-ssl3'', auquel cas all n'inclura pas + +SSLv3).

    • +
    +Exemple + +SSLProtocol TLSv1 + + +
    +
    + + +SSLCipherSuite +Algorithmes de chiffrement disponibles pour la négociation +au cours de l'initialisation de la connexion SSL +SSLCipherSuite algorithmes +SSLCipherSuite DEFAULT (dépend de la version d'OpenSSL +installée) +server config +virtual host +directory +.htaccess +AuthConfig + + +

    +Cette directive complexe utilise la chaîne algorithmes +contenant la liste des algorithmes de chiffrement OpenSSL que le client +peut utiliser au cours de la phase d'initialisation de la connexion SSL. +Notez que cette directive peut être utilisée aussi bien dans un contexte +de serveur que dans un contexte de répertoire. Dans un contexte de +serveur, elle s'applique à l'initialisation SSL standard lorsqu'une +connexion est établie. Dans un contexte de répertoire, elle force une +renégociation SSL avec la liste d'algorithmes de chiffrement spécifiée +après la lecture d'une requête HTTP, mais avant l'envoi de la réponse +HTTP.

    +

    +La liste d'algorithmes de chiffrement SSL spécifiée par l'argument +algorithmes comporte quatre attributs principaux auxquels +s'ajoutent quelques attributs secondaires :

    +
      +
    • Algorithme d'échange de clés:
      + RSA, Diffie-Hellman, Elliptic Curve Diffie-Hellman, Secure Remote Password +
    • +
    • Algorithme d'authentification:
      + RSA, Diffie-Hellman, DSS, ECDSA ou none. +
    • +
    • Algorithme de chiffrement:
      + AES, DES, Triple-DES, RC4, RC2, IDEA, etc... +
    • +
    • Algorithme de condensé MAC:
      + MD5, SHA or SHA1, SHA256, SHA384. +
    • +
    +

    L'algorithme de chiffrement peut aussi provenir de l'extérieur. Les +algorithmes SSLv2 ne sont plus supportés. +Pour définir les algorithmes à utiliser, on +peut soit spécifier tous les algorithmes à la fois, soit utiliser des +alias pour spécifier une liste d'algorithmes dans leur ordre de +préférence (voir Table 1). Les algorithmes et +alias effectivement disponibles dépendent de la version d'openssl +utilisée. Les versions ultérieures d'openssl inclueront probablement des +algorithmes supplémentaires.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Symbole Description
    Algorithme d'échange de clés :
    kRSA Echange de clés RSA
    kDHr Echange de clés Diffie-Hellman avec +clé RSA
    kDHd Echange de clés Diffie-Hellman avec +clé DSA
    kEDH Echange de clés Diffie-Hellman +temporaires (pas de certificat)
    kSRP échange de clés avec mot de passe +distant sécurisé (SRP)
    Algorithmes d'authentification :
    aNULL Pas d'authentification
    aRSA Authentification RSA
    aDSS Authentification DSS
    aDH Authentification Diffie-Hellman
    Algorithmes de chiffrement :
    eNULL Pas de chiffrement
    NULL alias pour eNULL
    AES Chiffrement AES
    DES Chiffrement DES
    3DES Chiffrement Triple-DES
    RC4 Chiffrement RC4
    RC2 Chiffrement RC2
    IDEA Chiffrement IDEA
    Algorithmes de condensés MAC :
    MD5 Fonction de hashage MD5
    SHA1 Fonction de hashage SHA1
    SHA alias pour SHA1
    SHA256 >Fonction de hashage SHA256
    SHA384 >Fonction de hashage SHA384
    Alias :
    SSLv3 tous les algorithmes de chiffrement +SSL version 3.0
    TLSv1 tous les algorithmes de chiffrement +TLS version 1.0
    EXP tous les algorithmes de chiffrement +externes
    EXPORT40 tous les algorithmes de chiffrement +externes limités à 40 bits
    EXPORT56 tous les algorithmes de chiffrement +externes limités à 56 bits
    LOW tous les algorithmes de chiffrement +faibles (non externes, DES simple)
    MEDIUM tous les algorithmes avec +chiffrement 128 bits
    HIGH tous les algorithmes +utilisant Triple-DES
    RSA tous les algorithmes +utilisant l'échange de clés RSA
    DH tous les algorithmes +utilisant l'échange de clés Diffie-Hellman
    EDH tous les algorithmes +utilisant l'échange de clés Diffie-Hellman temporaires
    ECDH échange de clés Elliptic Curve Diffie-Hellman
    ADH tous les algorithmes +utilisant l'échange de clés Diffie-Hellman anonymes
    AECDH tous les algorithmes +utilisant l'échange de clés Elliptic Curve Diffie-Hellman
    SRP tous les algorithmes utilisant +l'échange de clés avec mot de passe distant sécurisé (SRP)
    DSS tous les algorithmes +utilisant l'authentification DSS
    ECDSA tous les algorithmes +utilisant l'authentification ECDSA
    aNULL tous les algorithmes +n'utilisant aucune authentification
    +

    +Cela devient intéressant lorsque tous ces symboles sont combinés +ensemble pour spécifier les algorithmes disponibles et l'ordre dans +lequel vous voulez les utiliser. Pour simplifier tout cela, vous +disposez aussi d'alias (SSLv3, TLSv1, EXP, LOW, MEDIUM, +HIGH) pour certains groupes d'algorithmes. Ces symboles peuvent +être reliés par des préfixes pour former la chaîne algorithmes. +Les préfixes disponibles sont :

    +
      +
    • none: ajoute l'algorithme à la liste
    • +
    • +: déplace les algorithmes qui conviennent à la +place courante dans la liste
    • +
    • -: supprime l'algorithme de la liste (peut être rajouté +plus tard)
    • +
    • !: supprime définitivement l'algorithme de la liste (ne +peut plus y être rajouté plus tard)
    • +
    + + +Les algorithmes <code>aNULL</code>, <code>eNULL</code> et +<code>EXP</code> sont toujours désactivés +

    Depuis la version 2.4.7, les +algorithmes de type null ou destinés à l'exportation sont toujours +désactivés car mod_ssl ajoute obligatoirement +!aNULL:!eNULL:!EXP à toute chaîne d'algorithme de +chiffrement à l'initialisation.

    +
    + +

    Pour vous simplifier la vie, vous pouvez utiliser la commande +``openssl ciphers -v'' qui vous fournit un moyen simple de +créer la chaîne algorithmes avec succès. La chaîne +algorithmes par défaut dépend de la version des bibliothèques +SSL installées. Supposons qu'elle contienne +``RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'', ce qui +stipule de mettre RC4-SHA et AES128-SHA en +premiers, car ces algorithmes présentent un bon compromis entre vitesse +et sécurité. Viennent ensuite les algorithmes de sécurité élevée et +moyenne. En fin de compte, les algorithmes qui n'offrent aucune +authentification sont exclus, comme les algorithmes anonymes +Diffie-Hellman pour SSL, ainsi que tous les algorithmes qui utilisent +MD5 pour le hashage, car celui-ci est reconnu comme +insuffisant.

    + +
    +$ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'
    +RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=SHA1
    +AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
    +DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
    +...                     ...               ...     ...           ...
    +SEED-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=SEED(128) Mac=SHA1
    +PSK-RC4-SHA             SSLv3 Kx=PSK      Au=PSK  Enc=RC4(128)  Mac=SHA1
    +KRB5-RC4-SHA            SSLv3 Kx=KRB5     Au=KRB5 Enc=RC4(128)  Mac=SHA1
    +
    +
    +

    Vous trouverez la liste complète des algorithmes RSA & DH +spécifiques à SSL dans la Table 2.

    +Exemple + +SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Symbole algorithme ProtocoleEchange de clés Authentification ChiffrementCondensé MAC Type
    Algorithmes RSA :
    DES-CBC3-SHA SSLv3 RSA RSA 3DES(168) SHA1
    IDEA-CBC-SHA SSLv3 RSA RSA IDEA(128) SHA1
    RC4-SHA SSLv3 RSA RSA RC4(128) SHA1
    RC4-MD5 SSLv3 RSA RSA RC4(128) MD5
    DES-CBC-SHA SSLv3 RSA RSA DES(56) SHA1
    EXP-DES-CBC-SHA SSLv3 RSA(512) RSA DES(40) SHA1 export
    EXP-RC2-CBC-MD5 SSLv3 RSA(512) RSA RC2(40) MD5 export
    EXP-RC4-MD5 SSLv3 RSA(512) RSA RC4(40) MD5 export
    NULL-SHA SSLv3 RSA RSA None SHA1
    NULL-MD5 SSLv3 RSA RSA None MD5
    Algorithmes Diffie-Hellman :
    ADH-DES-CBC3-SHA SSLv3 DH None 3DES(168) SHA1
    ADH-DES-CBC-SHA SSLv3 DH None DES(56) SHA1
    ADH-RC4-MD5 SSLv3 DH None RC4(128) MD5
    EDH-RSA-DES-CBC3-SHA SSLv3 DH RSA 3DES(168) SHA1
    EDH-DSS-DES-CBC3-SHA SSLv3 DH DSS 3DES(168) SHA1
    EDH-RSA-DES-CBC-SHA SSLv3 DH RSA DES(56) SHA1
    EDH-DSS-DES-CBC-SHA SSLv3 DH DSS DES(56) SHA1
    EXP-EDH-RSA-DES-CBC-SHA SSLv3 DH(512) RSA DES(40) SHA1 export
    EXP-EDH-DSS-DES-CBC-SHA SSLv3 DH(512) DSS DES(40) SHA1 export
    EXP-ADH-DES-CBC-SHA SSLv3 DH(512) None DES(40) SHA1 export
    EXP-ADH-RC4-MD5 SSLv3 DH(512) None RC4(40) MD5 export
    +
    +
    + + +SSLCertificateFile +Fichier de données contenant le certificat X.509 du serveur codé en +PEM +SSLCertificateFile chemin-fichier +server config +virtual host + + +

    Cette directive permet de définir le fichier de données contenant +les informations de certificat +X.509 du serveur codées au format PEM. Ce fichier doit contenir +au minimum un certificat d'entité finale (feuille). +La directive peut être utilisée plusieurs fois (elle référence des +fichiers différents) pour accepter plusieurs algorithmes +d'authentification au niveau du serveur - souvent RSA, DSA et ECC. Le +nombre d'algorithmes supportés dépend de la version d'OpenSSL utilisée +avec mod_ssl : à partir de la version 1.0.0, la commande openssl +list-public-key-algorithms affiche la liste des algorithmes +supportés. Voir aussi la note ci-dessous à propos des limitations des versions +d'OpenSSL antérieures à 1.0.2 et la manière de les contourner. +

    + +

    Les fichiers peuvent aussi contenir des certificats de CA +intermédiaires triés depuis la feuille vers la racine. Cette +fonctionnalité est disponible depuis la version 2.4.8 du serveur HTTP +Apache, et rend obsolète la directive SSLCertificateChainFile. A partir de la +version 1.0.2 d'OpenSSL, il est alors possible de configurer la chaîne +de certification en fonction du certificat.

    + +

    Depuis la version 2.4.7 du serveur HTTP Apache, on peut aussi ajouter +des paramètres DH personnalisés et un nom EC +curve pour les clés éphémères à la fin du premier fichier défini par la +directive SSLCertificateFile. +Ces paramètres peuvent être générés avec les commandes openssl +dhparam et openssl ecparam, et ils peuvent être +ajoutés tel quel à la fin du premier fichier de certificat. En effet, +seul le premier fichier de certificat défini peut être utilisé pour +enregistrer des paramètres personnalisés, car ces derniers s'appliquent +indépendamment de l'algorithme d'authentification utilisé. +

    + +

    Enfin, il est aussi possible d'ajouter la clé privée du certificat de +l'entité finale au fichier de certificat, ce qui permet de se passer +d'une directive SSLCertificateKeyFile séparée. Cette +pratique est cependant fortement déconseillée. En effet, les fichiers de +certificats qui contiennent de tels clés embarquées doivent être définis +avant les certificats en utilisant un fichier de clé séparé. En outre, +si la clé est chiffrée, une boîte de dialogue pour entrer le mot de +passe de la clé s'ouvre au démarrage du serveur. +

    + + +Interopérabilité des paramètres DH avec les nombres premiers de +plus de 1024 bits +

    +Depuis la version 2.4.7, mod_ssl utilise des +paramètres DH standardisés avec des nombres premiers de 2048, 3072 et +4096 bits, et avec des nombres premiers de 6144 et 8192 bits depuis la +version 2.4.10 (voir RFC +3526), et les fournit aux clients en fonction de la longueur de la +clé du certificat RSA/DSA. En particulier avec les clients basés sur +Java (versions 7 et antérieures), ceci peut provoquer des erreurs au +cours de la négociation - voir cette réponse de la FAQ SSL pour +contourner les problèmes de ce genre. +

    +
    + + +Paramètres DH par défaut lorsqu'on utilise plusieurs certificats et une +version d'OpenSSL antérieure à 1.0.2. +

    +Lorsqu'on utilise plusieurs certificats pour supporter différents algorithmes +d'authentification (comme RSA, DSA, mais principalement ECC) et une +version d'OpenSSL antérieure à 1.0.2, il est recommandé soit d'utiliser des +paramètres DH spécifiques (solution à privilégier) en les ajoutant au premier +fichier certificat (comme décrit ci-dessus), soit d'ordonner les directives +SSLCertificateFile de façon à ce que les certificats +RSA/DSA soit placés après les certificats ECC. +

    +

    +Cette limitation est présente dans les anciennes versions d'OpenSSL qui +présentent toujours le dernier certificat configuré, au lieu +de laisser le serveur HTTP Apache déterminer le certificat sélectionné lors de +la phase de négociation de la connexion (lorsque les paramètres DH doivent être +envoyés à l'hôte distant). +De ce fait, le serveur peut sélectionner des paramètres DH par défaut basés sur +la longueur de la clé du mauvais certificat (les clés ECC sont beaucoup plus +petites que les clés RSA/DSA et leur longueur n'est pas pertinente pour la +sélection des nombres premiers DH). +

    +

    +Ce problème peut être résolu en créant et configurant des paramètres DH +spécifiques (comme décrit ci-dessus), car ils l'emportent toujours sur les +paramètres DH par défaut, et vous pourrez ainsi utiliser une longueur spécifique +et appropriée. +

    +
    + +Exemple + +SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt" + + +
    +
    + + +SSLCertificateKeyFile +Fichier contenant la clé privée du serveur codée en +PEM +SSLCertificateKeyFile chemin-fichier +server config +virtual host + + +

    Cette directive permet de définir le fichier contenant la clé privée du +serveur codée en PEM. Si la clé privée est +chiffrée, une boîte de dialogue demandant le mot de passe s'ouvre au +démarrage.

    + +

    +Cette directive peut être utilisée plusieurs fois pour référencer +différents noms de fichiers, afin de supporter plusieurs algorithmes +pour l'authentification du serveur. A chaque directive SSLCertificateKeyFile doit être associée +une directive SSLCertificateFile correspondante. +

    + +

    +La clé privé peut aussi être ajoutée au fichier défini par la directive +SSLCertificateFile, mais cette +pratique est fortement déconseillée. En effet, les fichiers de +certificats qui comportent une telle clé doivent être définis après les +certificats en utilisant un fichier de clé séparé.

    + +Exemple + +SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key" + + +
    +
    + + +SSLCertificateChainFile +Fichier contenant les certificats de CA du serveur codés en +PEM +SSLCertificateChainFile chemin-fichier +server config +virtual host + + +SSLCertificateChainFile est obsolète +

    SSLCertificateChainFile est devenue obsolète avec la +version 2.4.8, lorsque la directive +SSLCertificateFile a été étendue +pour supporter aussi les certificats de CA intermédiaires dans le +fichier de certificats du serveur.

    +
    +

    +Cette directive permet de définir le fichier optionnel +tout-en-un où vous pouvez rassembler les certificats des +Autorités de Certification (CA) qui forment la chaîne de certification +du certificat du serveur. Cette chaîne débute par le certificat de la CA +qui a délivré le certificat du serveur et peut remonter jusqu'au +certificat de la CA racine. Un tel fichier contient la simple +concaténation des différents certificats de CA codés en PEM, en général +dans l'ordre de la chaîne de certification.

    +

    Elle doit être utilisée à la place et/ou en complément de la +directive SSLCACertificatePath +pour construire explicitement la chaîne de certification du serveur qui +est envoyée au navigateur en plus du certificat du serveur. Elle s'avère +particulièrement utile pour éviter les conflits avec les certificats de +CA lorsqu'on utilise l'authentification du client. Comme le fait de +placer un certificat de CA de la chaîne de certification du serveur dans +la directive SSLCACertificatePath produit le même effet +pour la construction de la chaîne de certification, cette directive a +pour effet colatéral de faire accepter les certificats clients fournis +par cette même CA, au cours de l'authentification du client.

    +

    +Soyez cependant prudent : fournir la chaîne de certification ne +fonctionne que si vous utilisez un simple certificat de +serveur RSA ou DSA. Si vous utilisez une paire de certificats +couplés RSA+DSA , cela ne fonctionnera que si les deux certificats +utilisent vraiment la même chaîne de certification. Dans le cas +contraire, la confusion risque de s'installer au niveau des +navigateurs.

    +Exemple + +SSLCertificateChainFile "/usr/local/apache2/conf/ssl.crt/ca.crt" + + +
    +
    + + +SSLCACertificatePath +Répertoire des certificats de CA codés en PEM pour +l'authentification des clients +SSLCACertificatePath chemin-répertoire +server config +virtual host + + +

    +Cette directive permet de définir le répertoire où sont stockés les +certificats des Autorités de Certification (CAs) pour les clients +auxquels vous avez à faire. On les utilise pour vérifier le certificat +du client au cours de l'authentification de ce dernier.

    +

    +Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce répertoire +: vous devez aussi créer des liens symboliques nommés +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    +Exemple + +SSLCACertificatePath "/usr/local/apache2/conf/ssl.crt/" + + +
    +
    + + +SSLCACertificateFile +Fichier contenant une concaténation des certificats de CA +codés en PEM pour l'authentification des clients +SSLCACertificateFile chemin-fichier +server config +virtual host + + +

    +Cette directive permet de définir le fichier tout-en-un où vous +pouvez rassembler les certificats des Autorités de Certification (CAs) +pour les clients auxquels vous avez à faire. On les utilise pour +l'authentification des clients. Un tel fichier contient la simple +concaténation des différents fichiers de certificats codés en PEM, par +ordre de préférence. Cette directive peut être utilisée à la place et/ou +en complément de la directive SSLCACertificatePath.

    +Exemple + +SSLCACertificateFile "/usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt" + + +
    +
    + + +SSLCADNRequestFile +Fichier contenant la concaténation des certificats de CA +codés en PEM pour la définition de noms de CA acceptables +SSLCADNRequestFile chemin-fichier +server config +virtual host + + +

    Lorsque mod_ssl demande un certificat client, une liste de noms +d'Autorités de Certification acceptables est envoyée au client au +cours de la phase d'initialisation de la connexion SSL. Le client peut +alors utiliser cette liste de noms de CA pour sélectionner un certificat +client approprié parmi ceux dont il dispose.

    + +

    Si aucune des directives SSLCADNRequestPath ou SSLCADNRequestFile n'est définie, la liste +de noms de CsA acceptables envoyée au client est la liste des noms de +tous les certificats de CA spécifiés par les directives SSLCACertificateFile et SSLCACertificatePath ; en d'autres termes, +c'est la liste des noms de CAs qui sera effectivement utilisée pour +vérifier le certificat du client.

    + +

    Dans certaines situations, il est utile de pouvoir envoyer +une liste de noms de CA acceptables qui diffère de la liste des CAs +effectivement utilisés pour vérifier le certificat du client ; +considérons par exemple le cas où le certificat du client est signé par +des CAs intermédiaires. On peut ici utiliser les directives SSLCADNRequestPath et/ou SSLCADNRequestFile, et les noms de CA +acceptables seront alors extraits de l'ensemble des certificats contenus +dans le répertoire et/ou le fichier définis par cette paire de +directives.

    + +

    SSLCADNRequestFile doit +spécifier un fichier tout-en-un contenant une concaténation des +certificats de CA codés en PEM.

    + +Exemple + +SSLCADNRequestFile "/usr/local/apache2/conf/ca-names.crt" + + +
    +
    + + +SSLCADNRequestPath +Répertoire contenant des fichiers de certificats de CA +codés en PEM pour la définition de noms de CA acceptables +SSLCADNRequestPath chemin-répertoire +server config +virtual host + + + +

    Cette directive optionnelle permet de définir la liste de noms de +CAs acceptables qui sera envoyée au client lorsqu'un certificat de +client est demandé. Voir la directive SSLCADNRequestFile pour plus de +détails.

    + +

    Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce répertoire +: vous devez aussi créer des liens symboliques nommés +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    +Exemple + +SSLCADNRequestPath "/usr/local/apache2/conf/ca-names.crt/" + + +
    +
    + + +SSLCARevocationPath +Répertoire des CRLs de CA codés en PEM pour +l'authentification des clients +SSLCARevocationPath chemin-répertoire +server config +virtual host + + +

    +Cette directive permet de définir le répertoire où sont stockées les +Listes de Révocation de Certificats (CRL) des Autorités de Certification +(CAs) pour les clients auxquels vous avez à faire. On les utilise pour +révoquer les certificats des clients au cours de l'authentification de +ces derniers.

    +

    +Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Il ne +suffit donc pas de placer les fichiers de CRL dans ce répertoire +: vous devez aussi créer des liens symboliques nommés +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    +Exemple + +SSLCARevocationPath "/usr/local/apache2/conf/ssl.crl/" + + +
    +
    + + +SSLCARevocationFile +Fichier contenant la concaténation des CRLs des CA codés en +PEM pour l'authentification des clients +SSLCARevocationFile chemin-fichier +server config +virtual host + + +

    +Cette directive permet de définir le fichier tout-en-un où sont +rassemblées les Listes de Révocation de Certificats (CRLs) des Autorités +de certification (CAs) pour les clients auxquels vous avez à faire. On +les utilise pour l'authentification des clients. Un tel fichier contient +la simple concaténation des différents fichiers de CRLs codés en PEM, +dans l'ordre de préférence. Cette directive peut être utilisée à la +place et/ou en complément de la directive SSLCARevocationPath.

    +Exemple + +SSLCARevocationFile +"/usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl" + + +
    +
    + + +SSLCARevocationCheck +Active la vérification des révocations basée sur les CRL +SSLCARevocationCheck chain|leaf|none flags +SSLCARevocationCheck none +server config +virtual host +Le drapeau optionnel flags est disponible à partir de la +version 2.5-dev du serveur HTTP Apache + + +

    +Active la vérification des révocations basée sur les Listes de +Révocations de Certificats (CRL). Au moins une des directives SSLCARevocationFile ou SSLCARevocationPath doit être définie. +Lorsque cette directive est définie à chain (valeur +recommandée), les vérifications CRL sont effectuées sur tous les +certificats de la chaîne, alors que la valeur leaf limite +la vérification au certificat hors chaîne (la feuille). +

    +

    flags peut prendre comme valeurs

    +
      +
    • no_crl_for_cert_ok +

      +Avant la version 2.3.15, les vérifications CRL dans mod_ssl +réussissaient même si aucune CRL n'était trouvée dans les chemins +définis par les directives SSLCARevocationFile ou SSLCARevocationPath.

      +

      Le comportement a +changé avec l'introduction de la directive +SSLCARevocationFile : par défaut avec +chain ou leaf, les CRLs doivent être présentes pour que la +validation réussisse ; dans le cas contraire, elle échouera avec une +erreur "unable to get certificate CRL".

      +

      La valeur no_crl_for_cert_ok du drapeau flag permet de +retrouver le comportement précédent.

      +
    • +
    +Exemple + +SSLCARevocationCheck chain + + +Compatibilité avec la branche 2.2 + +SSLCARevocationCheck chain no_crl_for_cert_ok + + +
    +
    + + +SSLVerifyClient +Niveau de vérification du certificat client +SSLVerifyClient niveau +SSLVerifyClient none +server config +virtual host +directory +.htaccess +AuthConfig + + +

    +Cette directive permet de définir le niveau de vérification du +certificat pour l'authentification du client. Notez que cette directive +peut être utilisée à la fois dans les contextes du serveur principal et +du répertoire. Dans le contexte du serveur principal, elle s'applique au +processus d'authentification du client utilisé au cours de la +négociation SSL standard lors de l'établissement d'une connexion. Dans +un contexte de répertoire, elle force une renégociation SSL avec le +niveau de vérification du client spécifié, après la lecture d'une +requête HTTP, mais avant l'envoi de la réponse HTTP.

    +

    +Les valeurs de niveau disponibles sont les suivantes :

    +
      +
    • none: + aucun certificat client n'est requis
    • +
    • optional: + le client peut présenter un certificat valide
    • +
    • require: + le client doit présenter un certificat valide
    • +
    • optional_no_ca: + le client peut présenter un certificat valide, mais il n'est pas + nécessaire que ce dernier soit vérifiable (avec succès). Cette option ne + peut pas être utilisée lors de l'authentification du client.
    • +
    +Exemple + +SSLVerifyClient require + + +
    +
    + + +SSLVerifyDepth +Profondeur maximale des certificats de CA pour la +vérification des certificats clients +SSLVerifyDepth nombre +SSLVerifyDepth 1 +server config +virtual host +directory +.htaccess +AuthConfig + + +

    +Cette directive permet de spécifier la profondeur maximale à laquelle +mod_ssl va effectuer sa vérification avant de décider que le client ne +possède pas de certificat valide. Notez que cette directive peut être +utilisée à la fois dans les contextes du serveur principal et de +répertoire. Dans le contexte du serveur principal, elle s'applique au +processus d'authentification du client utilisé au cours de la +négociation SSL standard lors de l'établissement d'une connexion. Dans +un contexte de répertoire, elle force une renégociation SSL avec le +client selon la nouvelle profondeur spécifiée, après la lecture d'une +requête HTTP, mais avant l'envoi de la réponse HTTP.

    +

    +La profondeur correspond au nombre maximum de fournisseurs de +certificats intermédiaires, c'est à dire le nombre maximum de +certificats de CA que l'on est autorisé à suivre lors de la vérification +du certificat du client. Une profondeur de 0 signifie que seuls les +certificats clients auto-signés sont acceptés ; la profondeur par défaut +de 1 signifie que le certificat client peut être soit auto-signé, soit +signé par une CA connue directement du serveur (c'est à dire que le +certificat de la CA doit être référencé par la directive SSLCACertificatePath), etc...

    +Exemple + +SSLVerifyDepth 10 + + +
    +
    + + +SSLSRPVerifierFile +Chemin du fichier de vérification SRP +SSLSRPVerifierFile file-path +server config +virtual host +Disponible depuis la version 2.4.4 du serveur HTTP +Apache, si la version 1.0.1 ou supérieure d'OpenSSL est utilisée. + + +

    +Cette directive permet d'activer TLS-SRP et de définir le chemin du +fichier de vérification OpenSSL SRP (Mot de passe distant sécurisé) +contenant les noms d'utilisateurs TLS-SRP, les vérificateurs, les +"grains de sel" (salts), ainsi que les paramètres de groupe.

    +Exemple +SSLSRPVerifierFile "/path/to/file.srpv" + +

    +Le fichier de vérification peut être créé via l'utilitaire en ligne de +commande openssl :

    +Création du fichier de vérification SRP +openssl srp -srpvfile passwd.srpv -userinfo "some info" -add username + +

    La valeur affectée au paramètre optionnel -userinfo est +enregistrée dans la variable d'environnement +SSL_SRP_USERINFO.

    + +
    +
    + + +SSLSRPUnknownUserSeed +Source d'aléa pour utilisateur SRP inconnu +SSLSRPUnknownUserSeed secret-string +server config +virtual host +Disponible depuis la version 2.4.4 du serveur HTTP +Apache, si la version 1.0.1 ou supérieure d'OpenSSL est utilisée. + + +

    +Cette directive permet de définir la source d'aléa à utiliser +pour les utilisateurs SRP inconnus, ceci afin de combler les manques en +cas d'existence d'un tel utilisateur. Elle définit une chaîne secrète. Si +cette directive n'est pas définie, Apache renverra une alerte +UNKNOWN_PSK_IDENTITY aux clients qui fournissent un nom d'utilisateur +inconnu. +

    +Exemple +SSLSRPUnknownUserSeed "secret" + +
    +
    + + +SSLOptions +Configure différentes options d'exécution du moteur SSL +SSLOptions [+|-]option ... +server config +virtual host +directory +.htaccess +Options + + +

    +Cette directive permet de contrôler différentes options d'exécution du +moteur SSL dans un contexte de répertoire. Normalement, si plusieurs +SSLOptions peuvent s'appliquer à un répertoire, c'est la +plus spécifique qui est véritablement prise en compte ; les options ne +se combinent pas entre elles. Elles se combinent cependant entre elles +si elles sont toutes précédées par un symbole plus +(+) ou moins (-). Toute option précédée d'un ++ est ajoutée aux options actuellement en vigueur, et toute +option précédée d'un - est supprimée de ces mêmes +options. +

    +

    +Les options disponibles sont :

    +
      +
    • StdEnvVars +

      + Lorsque cette option est activée, le jeu standard de variables + d'environnement SSL relatives à CGI/SSI est créé. Cette option est + désactivée par défaut pour des raisons de performances, car + l'extraction des informations constitue une opération assez coûteuse + en ressources. On n'active donc en général cette option que pour les + requêtes CGI et SSI.

      +
    • +
    • ExportCertData +

      + Lorsque cette option est activée, des variables d'environnement + CGI/SSI supplémentaires sont créées : SSL_SERVER_CERT, + SSL_CLIENT_CERT et + SSL_CLIENT_CERT_CHAIN_n (avec n = + 0,1,2,..). Elles contiennent les certificats X.509 codés en PEM du + serveur et du client pour la connexion HTTPS courante, et peuvent + être utilisées par les scripts CGI pour une vérification de + certificat plus élaborée. De plus, tous les autres certificats de la + chaîne de certificats du client sont aussi fournis. Tout ceci gonfle + un peu l'environnement, et c'est la raison pour laquelle vous ne + devez activer cette option qu'à la demande.

      +
    • +
    • FakeBasicAuth +

      + Lorsque cette option est activée, le Nom Distinctif (DN) sujet du + certificat client X509 est traduit en un nom d'utilisateur pour + l'autorisation HTTP de base. Cela signifie que les méthodes + d'authentification standard d'Apache peuvent être utilisées pour le + contrôle d'accès. Le nom d'utilisateur est tout simplement le Sujet + du certificat X509 du client (il peut être déterminé en utilisant la + commande OpenSSL openssl x509 : openssl x509 + -noout -subject -in certificat.crt). + Notez qu'aucun mot de passe n'est envoyé par l'utilisateur. Chaque + entrée du fichier des utilisateurs doit comporter ce mot de passe : + ``xxj31ZMTZzkVA'', qui est la version chiffrée en DES + du mot ``password''. Ceux qui travaillent avec un + chiffrement basé sur MD5 (par exemple sous FreeBSD ou BSD/OS, + etc...) doivent utiliser le condensé MD5 suivant pour le même mot : + ``$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/''.

      + +

      Notez que la directive AuthBasicFake implémentée par le + module mod_auth_basic peut être utilisée d'une + manière plus générale comme simulation d'authentification basique, + ce qui permet de contrôler la structure nom utilisateur/mot de + passe.

      +
    • +
    • StrictRequire +

      + Cette option force l'interdiction d'accès lorsque + SSLRequireSSL ou SSLRequire a décidé que + l'accès devait être interdit. Par défaut, dans le cas où + une directive ``Satisfy any'' est utilisée, et si + d'autres restrictions d'accès ont été franchies, on passe en général + outre l'interdiction d'accès due à SSLRequireSSL ou + SSLRequire (parce que c'est ainsi que le mécanisme + Satisfy d'Apache doit fonctionner). Pour des + restrictions d'accès plus strictes, vous pouvez cependant utiliser + SSLRequireSSL et/ou SSLRequire en + combinaison avec une option ``SSLOptions + +StrictRequire''. Une directive ``Satisfy Any'' + n'a alors aucune chance d'autoriser l'accès si mod_ssl a décidé de + l'interdire.

      +
    • +
    • OptRenegotiate +

      + Cette option active la gestion optimisée de la renégociation des + connexions SSL intervenant lorsque les directives SSL sont utilisées + dans un contexte de répertoire. Par défaut un schéma strict est + appliqué, et chaque reconfiguration des paramètres SSL au + niveau du répertoire implique une phase de renégociation SSL + complète. Avec cette option, mod_ssl essaie d'éviter les + échanges non nécessaires en effectuant des vérifications de + paramètres plus granulaires (mais tout de même efficaces). + Néanmoins, ces vérifications granulaires peuvent ne pas correspondre + à ce qu'attend l'utilisateur, et il est donc recommandé de n'activer + cette option que dans un contexte de répertoire.

      +
    • +
    • LegacyDNStringFormat +

      + Cette option permet d'agir sur la manière dont les valeurs des + variables SSL_{CLIENT,SERVER}_{I,S}_DN sont formatées. + Depuis la version 2.3.11, Apache HTTPD utilise par défaut un format + compatible avec la RFC 2253. Ce format utilise des virgules comme + délimiteurs entre les attributs, permet l'utilisation de caractères + non-ASCII (qui sont alors convertis en UTF8), échappe certains + caractères spéciaux avec des slashes inversés, et trie les attributs + en plaçant l'attribut "C" en dernière position.

      + +

      Si l'option LegacyDNStringFormat est présente, c'est + l'ancien format qui sera utilisé : les attributs sont triés avec + l'attribut "C" en première position, les séparateurs sont des + slashes non inversés, les caractères non-ASCII ne sont pas supportés + et le support des caractères spéciaux n'est pas fiable. +

      +
    • +
    +Exemple + +SSLOptions +FakeBasicAuth -StrictRequire +<Files ~ "\.(cgi|shtml)$"> + SSLOptions +StdEnvVars -ExportCertData +</Files> + + +
    +
    + + +SSLRequireSSL +Interdit l'accès lorsque la requête HTTP n'utilise pas +SSL +SSLRequireSSL +directory +.htaccess +AuthConfig + + +

    +Cette directive interdit l'accès si HTTP sur SSL (c'est à dire HTTPS) +n'est pas activé pour la connexion courante. Ceci est très pratique dans +un serveur virtuel où SSL est activé ou dans un répertoire pour se +protéger des erreurs de configuration qui pourraient donner accès à des +ressources protégées. Lorsque cette directive est présente, toutes les +requêtes qui n'utilisent pas SSL sont rejetées.

    +Exemple + +SSLRequireSSL + + +
    +
    + + +SSLRequire +N'autorise l'accès que lorsqu'une expression booléenne +complexe et arbitraire est vraie +SSLRequire expression +directory +.htaccess +AuthConfig + + +SSLRequire est obsolète +

    SSLRequire est obsolète et doit en général être +remplacée par l'expression Require. La syntaxe ap_expr de l'expression Require est +une extension de la syntaxe de SSLRequire, avec les +différences suivantes :

    + +

    Avec SSLRequire, les opérateurs de comparaison +<, <=, ... sont strictement équivalents +aux opérateurs lt, le, ... , et fonctionnent +selon une méthode qui compare tout d'abord la longueur des deux chaînes, +puis l'ordre alphabétique. Les expressions ap_expr, quant à elles, possèdent deux jeux +d'opérateurs de comparaison : les opérateurs <, +<=, ... effectuent une comparaison alphabétique de +chaînes, alors que les opérateurs -lt, -le, +... effectuent une comparaison d'entiers. Ces derniers possèdent aussi +des alias sans tiret initial : lt, le, ... +

    + +
    + +

    Cette directive permet de spécifier une condition générale d'accès +qui doit être entièrement satisfaite pour que l'accès soit autorisé. +C'est une directive très puissante, car la condition d'accès spécifiée +est une expression booléenne complexe et arbitraire contenant un nombre +quelconque de vérifications quant aux autorisations d'accès.

    +

    +L'expression doit respecter la syntaxe suivante (fournie ici +sous la forme d'une notation dans le style de la grammaire BNF) :

    +
    +
    +expr     ::= "true" | "false"
    +           | "!" expr
    +           | expr "&&" expr
    +           | expr "||" expr
    +           | "(" expr ")"
    +           | comp
    +
    +comp     ::= word "==" word | word "eq" word
    +           | word "!=" word | word "ne" word
    +           | word "<"  word | word "lt" word
    +           | word "<=" word | word "le" word
    +           | word ">"  word | word "gt" word
    +           | word ">=" word | word "ge" word
    +           | word "in" "{" wordlist "}"
    +           | word "in" "PeerExtList(" word ")"
    +           | word "=~" regex
    +           | word "!~" regex
    +
    +wordlist ::= word
    +           | wordlist "," word
    +
    +word     ::= digit
    +           | cstring
    +           | variable
    +           | function
    +
    +digit    ::= [0-9]+
    +cstring  ::= "..."
    +variable ::= "%{" varname "}"
    +function ::= funcname "(" funcargs ")"
    +
    +
    +

    Pour varname, toute variable décrite dans Variables d'environnement pourra être utilisée. +Pour funcname, vous trouverez la liste des fonctions +disponibles dans la documentation +ap_expr.

    + +

    expression est interprétée et traduite +sous une forme machine interne lors du chargement de la configuration, +puis évaluée lors du traitement de la requête. Dans le contexte des +fichiers .htaccess, expression est interprétée et exécutée +chaque fois que le fichier .htaccess intervient lors du traitement de la +requête.

    +Exemple + +SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \ + and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ + and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ + and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5 \ + and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20 ) \ + or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ + + + + +

    La fonction PeerExtList(identifiant objet) +recherche une instance d'extension de certificat X.509 identifiée par +identifiant objet (OID) dans le certificat client. L'expression est +évaluée à true si la partie gauche de la chaîne correspond exactement à +la valeur d'une extension identifiée par cet OID (Si plusieurs +extensions possèdent le même OID, l'une d'entre elles au moins doit +correspondre). +

    + +Exemple + +SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6") + + + +Notes à propos de la fonction PeerExtList + +
      + +
    • L'identifiant objet peut être spécifié soit comme un nom +descriptif reconnu par la bibliothèque SSL, tel que +"nsComment", soit comme un OID numérique tel que +"1.2.3.4.5.6".

    • + +
    • Les expressions contenant des types connus de la bibliothèque +SSL sont transformées en chaînes avant comparaison. Pour les extensions +contenant un type non connu de la bibliothèque SSL, mod_ssl va essayer +d'interpréter la valeur s'il s'agit d'un des types ASN.1 primaires UTF8String, +IA5String, VisibleString, ou BMPString. Si l'extension correspond à un +de ces types, la chaîne sera convertie en UTF-8 si nécessaire, puis +comparée avec la partie gauche de l'expression.

    • + +
    +
    + +
    +Les variables d'environnement dans le +serveur HTTP Apache, pour d'autres exemples. + +Require expr +Syntaxe générale des expressions dans le +serveur HTTP Apache + +
    + + +SSLRenegBufferSize +Définit la taille du tampon de renégociation +SSL +SSLRenegBufferSize taille +SSLRenegBufferSize 131072 +directory +.htaccess +AuthConfig + + + +

    Si une renégociation SSL est requise dans un contexte de répertoire, +par exemple avec l'utilisation de SSLVerifyClient dans un bloc Directory ou +Location, mod_ssl doit mettre en tampon en mémoire tout corps de requête +HTTP en attendant qu'une nouvelle initialisation de connexion SSL puisse +être effectuée. Cette directive permet de définir la quantité de mémoire +à allouer pour ce tampon.

    + +

    +Notez que dans de nombreuses configurations, le client qui envoie un +corps de requête n'est pas forcément digne de confiance, et l'on doit +par conséquent prendre en considération la possibilité d'une attaque de +type déni de service lorsqu'on modifie la valeur de cette directive. +

    + +Exemple + +SSLRenegBufferSize 262144 + + +
    +
    + + +SSLStrictSNIVHostCheck +Contrôle de l'accès des clients non-SNI à un serveur virtuel à +base de nom. + +SSLStrictSNIVHostCheck on|off +SSLStrictSNIVHostCheck off +server config +virtual host +Disponible depuis la version 2.2.12 d'Apache + + +

    +Cette directive permet de contrôler l'accès des clients non-SNI à un serveur +virtuel à base de nom. Si elle est définie à on dans le +serveur virtuel à base de nom par défaut, les +clients non-SNI ne seront autorisés à accéder à aucun serveur virtuel +appartenant à cette combinaison IP/port. Par +contre, si elle est définie à on dans un serveur virtuel +quelconque, les clients non-SNI ne se verront interdire l'accès qu'à ce +serveur. +

    + +

    +Cette option n'est disponible que si httpd a été compilé avec une +version d'OpenSSL supportant SNI. +

    + +Exemple + +SSLStrictSNIVHostCheck on + + +
    +
    + + +SSLProxyMachineCertificatePath +Répertoire des clés et certificats clients codés en PEM que +le mandataire doit utiliser +SSLProxyMachineCertificatePath chemin-répertoire +server config +Sans objet + + +

    +Cette directive permet de définir le répertoire où sont stockés les clés +et certificats permettant au serveur mandataire de s'authentifier auprès +des serveurs distants. +

    +

    Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Vous +devez donc aussi créer des liens symboliques nommés +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    + +

    Actuellement, les clés privées chiffrées ne sont pas supportées.

    +
    +Exemple + +SSLProxyMachineCertificatePath "/usr/local/apache2/conf/proxy.crt/" + + +
    +
    + + + +SSLProxyMachineCertificateFile +Fichier contenant la concaténation des clés et certificats +clients codés en PEM que le mandataire doit utiliser +SSLProxyMachineCertificateFile chemin-fichier +server config +Sans objet + + +

    +Cette directive permet de définir le fichier tout-en-un où sont stockés +les clés et certificats permettant au serveur mandataire de +s'authentifier auprès des serveurs distants. +

    +

    +Le fichier spécifié est la simple concaténation des différents fichiers +de certificats codés en PEM, classés par ordre de préférence. Cette +directive s'utilise à la place ou en complément de la directive +SSLProxyMachineCertificatePath. +

    + +

    Actuellement, les clés privées chiffrées ne sont pas supportées.

    +
    +Exemple + +SSLProxyMachineCertificateFile +"/usr/local/apache2/conf/ssl.crt/proxy.pem" + + +
    +
    + + +SSLProxyMachineCertificateChainFile +Fichier de certificats de CA encodés PEM concaténés permettant au +mandataire de choisir un certificat +SSLProxyMachineCertificateChainFile nom-fichier +server config +Sans objet + + +

    +Cette directive permet de définir le fichier global où est enregistrée +la chaîne de certification pour tous les certificats clients utilisés. +Elle est nécessaire si le serveur distant présente une liste de +certificats de CA qui ne sont pas les signataires directs d'un des +certificats clients configurés. +

    +

    +Ce fichier contient tout simplement la concaténation des différents +fichiers de certificats encodés PEM. Au démarrage, chaque certificat +client configuré est examiné et une chaîne de certification est +construite. +

    +Avertissement en matière de sécurité +

    Si cette directive est définie, tous les certificats contenus dans le +fichier spécifié seront considérés comme étant de confiance, comme s'ils +étaient aussi désignés dans la directive SSLProxyCACertificateFile.

    +
    +Exemple + +SSLProxyMachineCertificateChainFile +"/usr/local/apache2/conf/ssl.crt/proxyCA.pem" + + +
    +
    + + +SSLProxyVerify +Niveau de vérification du certificat du serveur +distant +SSLProxyVerify niveau +SSLProxyVerify none +server config +virtual host + + + +

    Lorsqu'un mandataire est configuré pour faire suivre les requêtes +vers un serveur SSL distant, cette directive permet de configurer la +vérification du certificat de ce serveur distant.

    + +

    +Les valeurs de niveaux disponibles sont les suivantes :

    +
      +
    • none: + aucun certificat n'est requis pour le serveur distant
    • +
    • optional: + le serveur distant peut présenter un certificat valide
    • +
    • require: + le serveur distant doit présenter un certificat valide
    • +
    • optional_no_ca: + le serveur distant peut présenter un certificat valide
      + mais il n'est pas nécessaire qu'il soit vérifiable (avec succès).
    • +
    +

    En pratique, seuls les niveaux none et +require sont vraiment intéressants, car le niveau +optional ne fonctionne pas avec tous les serveurs, et +le niveau optional_no_ca va tout à fait à l'encontre de +l'idée que l'on peut se faire de l'authentification (mais peut tout de +même être utilisé pour établir des pages de test SSL, etc...).

    + +Exemple + +SSLProxyVerify require + + +
    +
    + + +SSLProxyVerifyDepth +Niveau de profondeur maximum dans les certificats de CA +lors de la vérification du certificat du serveur distant +SSLProxyVerifyDepth niveau +SSLProxyVerifyDepth 1 +server config +virtual host +AuthConfig + + +

    +Cette directive permet de définir le niveau de profondeur maximum +jusqu'auquel mod_ssl doit aller au cours de sa vérification avant de +décider que le serveur distant ne possède pas de certificat valide.

    +

    +La profondeur correspond en fait au nombre maximum de fournisseurs de +certificats intermédiaires, c'est à dire le nombre maximum de +certificats +de CA que l'on peut consulter lors de la vérification du certificat du +serveur distant. Une profondeur de 0 signifie que seuls les certificats +de serveurs distants auto-signés sont acceptés, et la profondeur par +défaut de 1 que le certificat du serveur distant peut être soit +auto-signé, soit signé par une CA connue directement du serveur (en +d'autres termes, le certificat de CA est référencé par la directive +SSLProxyCACertificatePath), +etc...

    +Exemple + +SSLProxyVerifyDepth 10 + + +
    +
    + + +SSLProxyCheckPeerExpire +Configuration de la vérification de l'expiration du +certificat du serveur distant + +SSLProxyCheckPeerExpire on|off +SSLProxyCheckPeerExpire on +server config +virtual host + + +

    +Cette directive permet de définir si l'expiration du certificat du +serveur distant doit être vérifiée ou non. Si la vérification échoue, un +code d'état 502 (Bad Gateway) est envoyé. +

    +Exemple + +SSLProxyCheckPeerExpire on + + +
    +
    + + +SSLProxyCheckPeerCN +Configuration de la vérification du champ CN du certificat +du serveur distant + +SSLProxyCheckPeerCN on|off +SSLProxyCheckPeerCN on +server config +virtual host + + +

    +Cette directive permet de définir si le champ CN du certificat du serveur +distant doit être comparé au nom de serveur de l'URL de la requête. S'ils ne +correspondent pas, un code d'état 502 (Bad Gateway) est envoyé. A partir de la +version 2.4.5, SSLProxyCheckPeerCN a été remplacé par SSLProxyCheckPeerName. +

    +

    +De la version 2.4.5 à la version 2.4.20, spécifier SSLProxyCheckPeerName +off était suffisant pour obtenir ce comportement (car la valeur par +défaut de SSLProxyCheckPeerCN était on). Avec ces +versions, les deux directives doivent être définies à off pour +éviter toute validation du nom de certificat du serveur distant, et de +nombreux utilisateurs ont signalé ce comportement comme très perturbant. +

    +

    +A partir de la version 2.4.21, toutes les configurations qui activent au moins +une des deux directives SSLProxyCheckPeerName ou +SSLProxyCheckPeerCN adopteront le nouveau comportement de la +directive SSLProxyCheckPeerName, et +toutes les configurations qui désactivent une des deux directives +SSLProxyCheckPeerName ou SSLProxyCheckPeerCN +éviteront toute validation du nom de certificat du serveur distant. Seule la +configuration suivante permettra de retrouver la comparaison de CN +traditionnelle pour les versions 2.4.21 et supérieures : +

    +Exemple + +SSLProxyCheckPeerCN on +SSLProxyCheckPeerName off + + +
    +
    + + +SSLProxyCheckPeerName +Configure la vérification du nom d'hôte dans les +certificats serveur distants + +SSLProxyCheckPeerName on|off +SSLProxyCheckPeerName on +server config +virtual host +Disponible à partir de la version 2.4.5 du serveur HTTP +Apache + +

    +Cette directive permet de configurer la vérification du nom d'hôte pour +les certificats serveur lorsque mod_ssl agit en tant que client SSL. La +vérification réussit si le nom d'hôte de l'URI de la requête correspond à un +des attributs CN du sujet du certificat, ou à l'extension subjectAltName. Si la +vérification échoue, la requête SSL +avorte, et un code d'erreur 502 (Bad Gateway) est renvoyé. +

    +

    +Les caractères génériques sont supportés dans certains cas bien spécifiques : +une entrée subjectAltName de type dNSName ou les attributs CN +commençant par *. correspondront à tout nom d'hôte comportant +le même nombre de champs et le même suffixe ; par exemple, +*.example.org correspondra à foo.example.org, +mais pas à foo.bar.example.org car le nombre d'éléments dans les +nom est différent. +

    +

    +Cette fonctionnalité a été introduite avec la version 2.4.5 et l'emporte sur la +directive SSLProxyCheckPeerCN qui ne +comparait que la valeur exacte du premier attribut CN avec le nom d'hôte. +Cependant, de nombreux utilisateurs étaient déconcertés par le comportement +induit par l'utilisation de ces deux directives individuellement, si bien que ce +comportement a été amélioré avec la version 2.4.21. Voir la description de la +directive SSLProxyCheckPeerCN pour le +comportement original et des détails à propos de ces améliorations. +

    +
    +
    + + +SSLProxyEngine +Interrupteur marche/arrêt du moteur de mandataire +SSL +SSLProxyEngine on|off +SSLProxyEngine off +server config +virtual host + + +

    +Cette directive permet d'activer/désactiver l'utilisation du moteur de +protocole SSL/TLS pour le mandataire. On l'utilise en général à +l'intérieur d'une section VirtualHost pour activer le protocole SSL/TLS +dans le cadre d'un mandataire pour un serveur virtuel particulier. Par +défaut, le moteur de protocole SSL/TLS est désactivé pour la fonction de +mandataire du serveur principal et de tous les serveurs virtuels +configurés.

    + +

    Notez que la directive SSLProxyEngine ne doit +généralement pas être utilisée dans le cadre d'un serveur virtuel qui agit en +tant que mandataire direct (via les directives Proxy ou ProxyRequests). +SSLProxyEngine n'est pas nécessaire pour activer un +serveur mandataire direct pour les requêtes SSL/TLS.

    + + +Exemple + +<VirtualHost _default_:443> + SSLProxyEngine on + #... +</VirtualHost> + + +
    +
    + + +SSLProxyProtocol +Définit les protocoles SSL disponibles pour la fonction de +mandataire +SSLProxyProtocol [+|-]protocole ... +SSLProxyProtocol all -SSLv3 (jusqu'à la version 2.4.16: all) +server config +virtual host +Options + + + +

    +Cette directive permet de définir les protocoles SSL que mod_ssl peut +utiliser lors de l'élaboration de son environnement de serveur pour la +fonction de mandataire. Il ne se connectera qu'aux serveurs utilisant un +des protocoles spécifiés.

    +

    Veuillez vous reporter à la directive SSLProtocol pour plus d'informations. +

    +
    +
    + + +SSLProxyCipherSuite +Algorithmes de chiffrement disponibles pour la négociation +lors de l'initialisation d'une connexion SSL de mandataire +SSLProxyCipherSuite algorithmes +SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP +server config +virtual host +directory +.htaccess +AuthConfig + +

    Cette directive est équivalente à la directive SSLCipherSuite, mais s'applique à une connexion de +mandataire. Veuillez vous reporter à la directive SSLCipherSuite pour plus d'informations.

    +
    + +
    + +SSLProxyCACertificatePath +Répertoire des certificats de CA codés en PEM pour +l'authentification des serveurs distants +SSLProxyCACertificatePath chemin-répertoire +server config +virtual host + + +

    +Cette directive permet de spécifier le répertoire où sont stockés les +certificats des Autorités de Certification (CAs) pour les serveurs +distants auxquels vous avez à faire. On les utilise pour vérifier le +certificat du serveur distant lors de l'authentification de ce +dernier.

    +

    +Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Il ne +suffit donc pas de placer les fichiers de certificats dans ce répertoire +: vous devez aussi créer des liens symboliques nommés +valeur-de-hashage.N, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    +Exemple + +SSLProxyCACertificatePath "/usr/local/apache2/conf/ssl.crt/" + + +
    +
    + + +SSLProxyCACertificateFile +Fichier contenant la concaténation des certificats de CA +codés en PEM pour l'authentification des serveurs distants +SSLProxyCACertificateFile file-path +server config +virtual host + + +

    +Cette directive permet de définir le fichier tout-en-un où sont +stockés les certificats des Autorités de Certification (CA) pour les +serveurs distants auxquels vous avez à faire. On les utilise +lors de l'authentification du serveur distant. Un tel fichier contient +la simple concaténation des différents fichiers de certificats codés en +PEM, classés par ordre de préférence. On peut utiliser cette directive à +la place et/ou en complément de la directive SSLProxyCACertificatePath.

    +Exemple + +SSLProxyCACertificateFile +"/usr/local/apache2/conf/ssl.crt/ca-bundle-serveur.distant.crt" + + +
    +
    + + +SSLProxyCARevocationPath +Répertoire des CRLs de CA codés en PEM pour +l'authentification des serveurs distants +SSLProxyCARevocationPath chemin-répertoire +server config +virtual host + + +

    +Cette directive permet de définir le répertoire où sont stockées les +Listes de Révocation de Certificats (CRL) des Autorités de Certification +(CAs) pour les serveurs distants auxquels vous avez à faire. On les +utilise pour révoquer les certificats des serveurs distants au cours de +l'authentification de ces derniers.

    +

    +Les fichiers de ce répertoire doivent être codés en PEM et ils sont +accédés via des noms de fichier sous forme de condensés ou hash. Il ne +suffit donc pas de placer les fichiers de CRL dans ce répertoire +: vous devez aussi créer des liens symboliques nommés +valeur-de-hashage.rN, et vous devez toujours vous +assurer que ce répertoire contient les liens symboliques appropriés.

    +Exemple + +SSLProxyCARevocationPath "/usr/local/apache2/conf/ssl.crl/" + + +
    +
    + + +SSLProxyCARevocationFile +Fichier contenant la concaténation des CRLs de CA codés en +PEM pour l'authentification des serveurs distants +SSLProxyCARevocationFile chemin-fichier +server config +virtual host + + +

    +Cette directive permet de définir le fichier tout-en-un où sont +rassemblées les Listes de Révocation de Certificats (CRLs) des Autorités +de certification (CAs) pour les serveurs distants auxquels vous +avez à faire. On les utilise pour l'authentification des serveurs +distants. Un tel fichier contient la simple concaténation des différents +fichiers de CRLs codés en PEM, classés par ordre de préférence. Cette +directive peut être utilisée à la place et/ou en complément de la +directive SSLProxyCARevocationPath.

    +Exemple + +SSLProxyCARevocationFile +"/usr/local/apache2/conf/ssl.crl/ca-bundle-serveur.distant.crl" + + +
    +
    + + +SSLProxyCARevocationCheck +Active la vérification des révocations basée sur les CRLs +pour l'authentification du serveur distant +SSLProxyCARevocationCheck chain|leaf|none +SSLProxyCARevocationCheck none +server config +virtual host + + +

    +Active la vérification des révocations basée sur les Listes de +révocations de Certificats (CRL) pour les serveurs distants +auxquels vous vous connectez. A moins une des directives SSLProxyCARevocationFile ou SSLProxyCARevocationPath doit être définie. +Lorsque cette directive est définie à chain (valeur +recommandée), les vérifications CRL sont effectuées sur tous les +certificats de la chaîne, alors que la valeur leaf limite +la vérification au certificat hors chaîne (la feuille). +

    + +Lorsque la directive est définie à <code>chain</code> ou +<code>leaf</code>, les CRLs doivent être disponibles pour que la +validation réussisse +

    +Avant la version 2.3.15, les vérifications CRL dans mod_ssl +réussissaient même si aucune CRL n'était trouvée dans les chemins +définis par les directives SSLProxyCARevocationFile ou SSLProxyCARevocationPath. Le comportement a +changé avec l'introduction de cette directive : lorsque la vérification +est activée, les CRLs doivent être présentes pour que la +validation réussisse ; dans le cas contraire, elle échouera avec une +erreur "CRL introuvable". +

    +
    +Exemple + +SSLProxyCARevocationCheck chain + + +
    +
    + + +SSLUserName +Nom de la variable servant à déterminer le nom de +l'utilisateur +SSLUserName nom-var +server config +directory +.htaccess +AuthConfig + + +

    +Cette variable permet de définir le champ "user" de l'objet de la +requête Apache. Ce champ est utilisé par des modules de plus bas niveau +pour identifier l'utilisateur avec une chaîne de caractères. En +particulier, l'utilisation de cette directive peut provoquer la +définition de la variable d'environnement REMOTE_USER. +La valeur de l'argument nom-var peut correspondre à toute variable d'environnement SSL.

    + +

    Notez que cette directive est sans effet si l'option +FakeBasicAuth est utilisée (voir SSLOptions).

    + +Exemple + +SSLUserName SSL_CLIENT_S_DN_CN + + +
    +
    + + +SSLHonorCipherOrder +Option permettant de classer les algorithmes de chiffrement +du serveur par ordre de préférence +SSLHonorCipherOrder on|off +SSLHonorCipherOrder off +server config +virtual host + + +

    Normalement, ce sont les préférences du client qui sont prises en +compte lors du choix d'un algorithme de chiffrement au cours d'une +négociation SSLv3 ou TLSv1. Si cette directive est activée, ce sont les +préférences du serveur qui seront prises en compte à la place.

    +Exemple + +SSLHonorCipherOrder on + + +
    +
    + + +SSLCryptoDevice +Active l'utilisation d'un accélérateur matériel de +chiffrement +SSLCryptoDevice moteur +SSLCryptoDevice builtin +server config + + +

    +Cette directive permet d'activer l'utilisation d'une carte accélératrice +de chiffrement qui prendra en compte certaines parties du traitement +relatif à SSL. Cette directive n'est utilisable que si la boîte à +outils SSL à été compilée avec le support "engine" ; les versions 0.9.7 +et supérieures d'OpenSSL possèdent par défaut le support "engine", alors +qu'avec la version 0.9.6, il faut utiliser les distributions séparées +"-engine".

    + +

    Pour déterminer les moteurs supportés, exécutez la commande +"openssl engine".

    + +Exemple + +# Pour un accélérateur Broadcom : +SSLCryptoDevice ubsec + + +
    +
    + + +SSLOCSPEnable +Active la validation OCSP de la chaîne de certificats du +client +SSLOCSPEnable on|off +SSLOCSPEnable off +server config +virtual host + + +

    Cette directive permet d'activer la validation OCSP de la chaîne de +certificats du client. Si elle est activée, les certificats de la chaîne +de certificats du client seront validés auprès d'un répondeur OCSP, une +fois la vérification normale effectuée (vérification des CRLs +incluse).

    + +

    Le répondeur OCSP utilisé est soit extrait du certificat lui-même, +soit spécifié dans la configuration ; voir les directives SSLOCSPDefaultResponder et SSLOCSPOverrideResponder.

    + +Exemple + +SSLVerifyClient on +SSLOCSPEnable on +SSLOCSPDefaultResponder "http://responder.example.com:8888/responder" +SSLOCSPOverrideResponder on + + +
    +
    + + +SSLOCSPDefaultResponder +Définit l'URI du répondeur par défaut pour la validation +OCSP +SSLOCSDefaultResponder uri +server config +virtual host + + +

    Cette directive permet de définir le répondeur OCSP par défaut. Si la +directive SSLOCSPOverrideResponder n'est pas activée, +l'URI spécifié ne sera utilisé que si aucun URI de répondeur n'est +spécifié dans le certificat en cours de vérification.

    +
    +
    + + +SSLOCSPOverrideResponder +Force l'utilisation de l'URI du répondeur par défaut pour +la validation OCSP +SSLOCSPOverrideResponder on|off +SSLOCSPOverrideResponder off +server config +virtual host + + +

    Force l'utilisation, au cours d'une validation OCSP de certificat, du +répondeur OCSP par défaut spécifié dans la configuration, que le +certificat en cours de vérification fasse mention d'un répondeur OCSP ou +non.

    +
    +
    + + +SSLOCSPResponseTimeSkew +Dérive temporelle maximale autorisée pour la validation des +réponses OCSP +SSLOCSPResponseTimeSkew secondes +SSLOCSPResponseTimeSkew 300 +server config +virtual host + + +

    Cette option permet de définir la dérive temporelle maximale +autorisée pour les réponses OCSP (lors de la vérification des champs +thisUpdate et nextUpdate).

    +
    +
    + + +SSLOCSPResponseMaxAge +Age maximum autorisé pour les réponses OCSP +SSLOCSPResponseMaxAge secondes +SSLOCSPResponseMaxAge -1 +server config +virtual host + + +

    Cette option permet de définir l'âge maximum autorisé (la +"fraicheur") des réponses OCSP. La valeur par défault (-1) +signifie qu'aucun âge maximum n'est défini ; autrement dit, les +réponses OCSP sont considérées comme valides tant que la valeur de leur +champ nextUpdate se situe dans le futur.

    +
    +
    + + +SSLOCSPResponderTimeout +Délai d'attente pour les requêtes OCSP +SSLOCSPResponderTimeout secondes +SSLOCSPResponderTimeout 10 +server config +virtual host + + +

    Cette option permet de définir le délai d'attente pour les requêtes à +destination des répondeurs OCSP, lorsque la directive SSLOCSPEnable est à on.

    +
    +
    + + +SSLOCSPProxyURL +Adresse de mandataire à utiliser pour les requêtes OCSP +SSLOCSPProxyURL url +server config +virtual host +Disponible à partir de la version 2.4.19 du serveur HTTP Apache + + +

    Cette directive permet de définir l'URL d'un mandataire HTTP qui devra être +utilisé pour toutes les requêtes vers un répondeur OCSP.

    +
    +
    + + +SSLInsecureRenegotiation +Option permettant d'activer le support de la renégociation +non sécurisée +SSLInsecureRenegotiation on|off +SSLInsecureRenegotiation off +server config +virtual host +Disponible depuis httpd 2.2.15, si une version 0.9.8m +ou supérieure d'OpenSSL est utilisée + + +

    Comme il a été spécifié, toutes les versions des protocoles SSL et +TLS (jusqu'à la version 1.2 de TLS incluse) étaient vulnérables à une +attaque de type Man-in-the-Middle (CVE-2009-3555) +au cours d'une renégociation. Cette vulnérabilité permettait à un +attaquant de préfixer la requête HTTP (telle qu'elle était vue du +serveur) avec un texte choisi. Une extension du protocole a été +développée pour corriger cette vulnérabilité, sous réserve qu'elle soit +supportée par le client et le serveur.

    + +

    Si mod_ssl est lié à une version 0.9.8m ou +supérieure d'OpenSSL, par défaut, la renégociation n'est accordée qu'aux +clients qui supportent la nouvelle extension du protocole. Si +cette directive est activée, la renégociation sera accordée aux anciens +clients (non patchés), quoique de manière non sécurisée

    + +Avertissement à propos de la sécurité +

    Si cette directive est activée, les connexions SSL seront vulnérables +aux attaques de type préfixe Man-in-the-Middle comme décrit dans CVE-2009-3555.

    +
    + +Exemple + +SSLInsecureRenegotiation on + + + +

    La variable d'environnement SSL_SECURE_RENEG peut être +utilisée dans un script SSI ou CGI pour déterminer si la renégociation +sécurisée est supportée pour une connexion SSL donnée.

    + +
    +
    + + +SSLUseStapling +Active l'ajout des réponses OCSP à la négociation TLS +SSLUseStapling on|off +SSLUseStapling off +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet d'activer l'"Agrafage OCSP" (OCSP stapling) +selon la définition de l'extension TLS "Certificate Status Request" +fournie dans la RFC 6066. Si elle est activée et si le client le +demande, mod_ssl va inclure une réponse OCSP à propos de son propre +certificat dans la négociation TLS. Pour pouvoir activer l'Agrafage +OCSP, il est nécessaire de configurer un SSLStaplingCache.

    + +

    L'agrafage OCSP dispense le client de requérir le serveur OCSP +directement ; il faut cependant noter que selon les spécifications de la +RFC 6066, la réponse CertificateStatus du serveur ne peut +inclure une réponse OCSP que pour un seul certificat. Pour les +certificats de serveur comportant des certificats de CA intermédiaires +dans leur chaîne (c'est un cas typique de nos jours), l'implémentation +actuelle de l'agrafage OCSP n'atteint que partiellement l'objectif d' +"économie en questions/réponse et en ressources". Pour plus de détails, +voir la RFC 6961 (TLS +Multiple Certificate Status Extension). +

    + +

    Lorsque l'agrafage OCSP est activé, le mutex +ssl-stapling contrôle l'accès au cache de l'agrafage OCSP +afin de prévenir toute corruption, et le mutex +sss-stapling-refresh contrôle le raffraîchissement des +réponses OCSP. Ces mutex peuvent être configurés via la directive +Mutex. +

    +
    +
    + + +SSLStaplingCache +Configuration du cache pour l'agrafage OCSP +SSLStaplingCache type +server config +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Si SSLUseStapling est à "on", +cette directive permet de configurer le cache destiné à stocker les +réponses OCSP incluses dans la négociation TLS. La configuration d'un +cache est obligatoire pour pouvoir utiliser l'agrafage OCSP. A +l'exception de none et nonenotnull, cette +directive supporte les mêmes types de stockage que la directive +SSLSessionCache.

    + +
    +
    + + +SSLStaplingResponseTimeSkew +Durée de vie maximale autorisée des réponses OCSP incluses dans la +négociation TLS +SSLStaplingResponseTimeSkew secondes +SSLStaplingResponseTimeSkew 300 +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de spécifier l'intervalle de temps maximum que +mod_ssl va calculer en faisant la différence entre les contenus des +champs nextUpdate et thisUpdate des réponses +OCSP incluses dans la négociation TLS. Pour pouvoir utiliser cette +directive, SSLUseStapling doit +être à "on".

    +
    +
    + + +SSLStaplingResponderTimeout +Temps d'attente maximum pour les requêtes vers les serveurs +OCSP +SSLStaplingResponderTimeout secondes +SSLStaplingResponderTimeout 10 +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de définir le temps d'attente maximum lorsque +mod_ssl envoie une requête vers un serveur OCSP afin d'obtenir une +réponse destinée à être incluse dans les négociations TLS avec les +clients (SSLUseStapling doit +avoir été activée au préalable).

    +
    +
    + + +SSLStaplingResponseMaxAge +Age maximum autorisé des réponses OCSP incluses dans la +négociation TLS +SSLStaplingResponseMaxAge secondes +SSLStaplingResponseMaxAge -1 +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de définir l'âge maximum autorisé +("fraîcheur") des réponses OCSP incluses dans la négociation TLS +(SSLUseStapling doit +avoir été activée au préalable). La valeur par défaut (-1) +ne définit aucun âge maximum, ce qui signifie que les réponses OCSP sont +considérées comme valides à partir du moment où le contenu de leur champ +nextUpdate se trouve dans le futur.

    +
    +
    + + +SSLStaplingStandardCacheTimeout +Durée de vie des réponses OCSP dans le cache +SSLStaplingStandardCacheTimeout secondes +SSLStaplingStandardCacheTimeout 3600 +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de définir la durée de vie des réponses OCSP +dans le cache configuré via la directive SSLStaplingCache. Elle ne s'applique qu'aux +réponse valides, alors que la directive SSLStaplingErrorCacheTimeout s'applique aux +réponses invalides ou non disponibles. +

    +
    +
    + + +SSLStaplingReturnResponderErrors +Transmet au client les erreurs survenues lors des requêtes +OCSP +SSLStaplingReturnResponderErrors on|off +SSLStaplingReturnResponderErrors on +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Lorsque cette directive est activée, mod_ssl va transmettre au client les +réponses concernant les requêtes OCSP +échouées (comme les réponses avec un statut général autre que +"successful", les réponses avec un statut de certificat autre que +"good", les réponses arrivées à expiration, etc...). +Lorsqu'elle est à off, seules les réponses avec un +statut de certificat égal à "good" seront incluses dans la négociation +TLS.

    +
    +
    + + +SSLStaplingFakeTryLater +Génère une réponse "tryLater" pour les requêtes OCSP échouées +SSLStaplingFakeTryLater on|off +SSLStaplingFakeTryLater on +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Lorsque cette directive est activée, et si une requête vers un +serveur OCSP à des fins d'inclusion dans une négociation TLS échoue, +mod_ssl va générer une réponse "tryLater" pour le client (SSLStaplingReturnResponderErrors doit être +activée).

    +
    +
    + + +SSLStaplingErrorCacheTimeout +Durée de vie des réponses invalides dans le cache pour +agrafage OCSP +SSLStaplingErrorCacheTimeout secondes +SSLStaplingErrorCacheTimeout 600 +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de définir la durée de vie des réponses +invalides dans le cache pour agrafage OCSP configuré via la +directive SSLStaplingCache. Pour +définir la durée de vie des réponses valides, voir la directive +SSLStaplingStandardCacheTimeout.

    +
    +
    + + +SSLStaplingForceURL +Remplace l'URI du serveur OCSP spécifié dans l'extension +AIA du certificat +SSLStaplingForceURL uri +server config +virtual host +Disponible si on utilise OpenSSL version 0.9.8h ou supérieure + + +

    Cette directive permet de remplacer l'URI du serveur OCSP extraite de +l'extension authorityInfoAccess (AIA) du certificat. Elle peut s'avérer +utile lorsqu'on passe par un mandataire

    +
    +
    + + +SSLSessionTicketKeyFile +Clé de chiffrement/déchiffrement permanente pour les +tickets de session TLS +SSLSessionTicketKeyFile chemin-fichier +server config +virtual host +Disponible depuis la version 2.4.0 du serveur HTTP +Apache, sous réserve que l'on utilise une version 0.9.8h ou supérieure +d'OpenSSL + + +

    Cette directive permet de définir une clé secrète pour le chiffrement +et le déchiffrement des tickets de session TLS selon les préconisations +de la RFC 5077. Elle a +été conçue à l'origine pour les environnements de clusters où les +données des sessions TLS doivent être partagées entre plusieurs noeuds. +Pour les configurations ne comportant qu'une seule instance de httpd, il +est préférable d'utiliser les clés (aléatoires) générées par mod_ssl au +démarrage du serveur.

    +

    Le fichier doit contenir 48 octets de données aléatoires créées de +préférence par une source à haute entropie. Sur un système de type UNIX, +il est possible de créer le fichier contenant la clé de la manière +suivante :

    + + +dd if=/dev/random of=/chemin/vers/fichier.tkey bs=1 count=48 + + +

    Ces clés doivent être renouvelées fréquemment, car il s'agit du seul +moyen d'invalider un ticket de session existant - OpenSSL ne permet pas +actuellement de spécifier une limite à la durée de +vie des tickets. Une nouvelle clé ne peut être utilisée qu'après avoir +redémarré le serveur. Tous les tickets de session existants deviennent +invalides après le redémarrage du serveur.

    + + +

    Ce fichier contient des données sensibles et doit donc être protégé +par des permissions similaires à celles du fichier spécifié par la +directive SSLCertificateKeyFile.

    +
    +
    +
    + + +SSLCompression +Permet d'activer la compression au niveau SSL +SSLCompression on|off +SSLCompression off +server config +virtual host +Disponible à partir de la version 2.4.3 du serveur HTTP +Apache, si on utilise une version d'OpenSSL 0.9.8 ou supérieure ; +l'utilisation dans un contexte de serveur virtuel n'est disponible que +si on utilise une version d'OpenSSL 1.0.0 ou supérieure. La valeur par +défaut était on dans la version 2.4.3. + + +

    Cette directive permet d'activer la compression au niveau SSL.

    + +

    L'activation de la compression est à l'origine de problèmes de +sécurité dans la plupart des configurations (l'attaque nommée CRIME).

    +
    +
    +
    + + +SSLSessionTickets +Active ou désactive les tickets de session TLS +SSLSessionTickets on|off +SSLSessionTickets on +server config +virtual host +Disponible à partir de la version 2.4.11 du serveur HTTP +Apache, sous réserve d'utiliser OpenSSL version 0.9.8f ou supérieure. + + + +

    Cette directive permet d'activer ou de désactiver l'utilisation des +tickets de session TLS (RFC 5077).

    + +

    Les tickets de session TLS sont activés par défaut. Les utiliser sans +redémarrer le serveur selon une périodicité appropriée (par exemple +quotidiennement) compromet cependant le niveau de confidentialité.

    +
    +
    +
    + + +SSLOpenSSLConfCmd +Configuration des paramètres d'OpenSSL via son API SSL_CONF +SSLOpenSSLConfCmd commande valeur +server config +virtual host +Disponible depuis la version 2.4.8 du serveur HTTP +Apache avec OpenSSL 1.0.2 ou supérieur + + +

    Cette directive permet à mod_ssl d'accéder à l'API SSL_CONF +d'OpenSSL. Il n'est ainsi plus nécessaire d'implémenter des +directives supplémentaires pour mod_ssl lorsque de nouvelles +fonctionnalités sont ajoutées à OpenSSL, ce qui rend la configuration de +ce dernier beaucoup plus souple.

    + +

    Le jeu de commandes disponibles pour la directive +SSLOpenSSLConfCmd dépend de la version d'OpenSSL +utilisée pour mod_ssl (la version minimale 1.0.2 est un +prérequis). Pour obtenir la liste des commandes supportées, voir la +section Supported configuration file commands de la page de +manuel d'OpenSSL SSL_CONF_cmd(3).

    + +

    Certaines commandes peuvent remplacer des directives existantes +(comme SSLCipherSuite ou +SSLProtocol) ; notez cependant +que la syntaxe et/ou les valeurs possibles peuvent différer.

    + +Examples + +SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference +SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1 +SSLOpenSSLConfCmd ServerInfoFile +"/usr/local/apache2/conf/server-info.pem" +SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2" +SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256 + + +
    +
    + + diff --git a/docs/manual/mod/mod_ssl.xml.meta b/docs/manual/mod/mod_ssl.xml.meta index 388e2f70250..736a11a017e 100644 --- a/docs/manual/mod/mod_ssl.xml.meta +++ b/docs/manual/mod/mod_ssl.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_status.html.en b/docs/manual/mod/mod_status.html.en index a9e28534708..472fb79d0ac 100644 --- a/docs/manual/mod/mod_status.html.en +++ b/docs/manual/mod/mod_status.html.en @@ -1,23 +1,28 @@ - -mod_status - Apache HTTP Server +mod_status - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_status

    @@ -73,16 +78,18 @@ performance toggle ExtendedStatus On by default.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    + +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    top

    Enabling Status Support

    @@ -91,15 +98,11 @@ performance

    To enable status reports only for browsers from the example.com domain add this code to your httpd.conf configuration file

    -

    - <Location /server-status>
    - - SetHandler server-status
    -
    - Require host example.com
    -
    - </Location> -

    +
    <Location "/server-status">
    +    SetHandler server-status
    +    Require host example.com
    +</Location>
    +

    You can now access server statistics by using a Web browser to access the page @@ -174,7 +177,28 @@ performance  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_status.html.fr b/docs/manual/mod/mod_status.html.fr index 2bcf89562fa..3cde055ee09 100644 --- a/docs/manual/mod/mod_status.html.fr +++ b/docs/manual/mod/mod_status.html.fr @@ -1,23 +1,28 @@ - -mod_status - Serveur Apache HTTP +mod_status - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_status

    @@ -75,16 +80,18 @@ du serveur 2.3.6, le chargement de mod_status dfinit automatiquement ExtendedStatus On.

    -
    top

    Activation du rapport d'tat

    @@ -93,15 +100,11 @@ du serveur

    Pour n'activer les rapports d'tat que pour les navigateurs appartenent au domaine example.com, ajoutez ces lignes votre fichier de configuration httpd.conf :

    -

    - <Location /etat-serveur>
    - - SetHandler server-status
    -
    - Require host example.com
    -
    - </Location> -

    +
    <Location "/etat-serveur">
    +    SetHandler server-status
    +    Require host example.com
    +</Location>
    +

    Il est alors possible d'obtenir les statistiques du serveur en utilisant un navigateur web et en accdant la page @@ -180,7 +183,28 @@ du serveur  ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_status.html.ja.utf8 b/docs/manual/mod/mod_status.html.ja.utf8 index 8fd31d4f586..521f5bc7ef5 100644 --- a/docs/manual/mod/mod_status.html.ja.utf8 +++ b/docs/manual/mod/mod_status.html.ja.utf8 @@ -1,35 +1,41 @@ - -mod_status - Apache HTTP サーバ +mod_status - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_status

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -70,14 +76,16 @@ ExtendedStatusOn になっている必要があります。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    + +

    ディレクティブ

    +

    このモジュールにディレクティブはありません。

    +

    Bugfix checklist

    参照

    +
    top

    Status を使用可能にする

    @@ -132,12 +140,33 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_status.html.ko.euc-kr b/docs/manual/mod/mod_status.html.ko.euc-kr index a79320e7914..a613c482bdb 100644 --- a/docs/manual/mod/mod_status.html.ko.euc-kr +++ b/docs/manual/mod/mod_status.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_status - Apache HTTP Server +mod_status - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_status

    @@ -66,14 +71,16 @@

    ǥ ġ "(*)" ǥ 踦 . Ͻ ɼ ؾ Ѵ.

    -

    þ

    -

    ⿡ þ ϴ.

    -

    + +

    þ

    +

    ⿡ þ ϴ.

    +

    Bugfix checklist

    +
    top

    Status ϱ

    @@ -131,7 +138,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_status.html.tr.utf8 b/docs/manual/mod/mod_status.html.tr.utf8 index 2caf1b7193b..e3c26f39b9f 100644 --- a/docs/manual/mod/mod_status.html.tr.utf8 +++ b/docs/manual/mod/mod_status.html.tr.utf8 @@ -1,23 +1,28 @@ - -mod_status - Apache HTTP Sunucusu +mod_status - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_status

    @@ -27,7 +32,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:サーバの活動状況と性能に関する情報を提供する
    ステータス:Base
    モジュール識別子:status_module
    @@ -59,43 +63,42 @@
  • Saniyedeki ortalama istek sayısı, saniyedeki bayt sayısı ve istek başına ortalama bayt sayısı (*)
  • -
  • Apache tarafınan toplamda ve her çocuk süreç tarafından ayrı ayrı - kullanılan o anki işlemci zamanı yüzdesi (*)
  • +
  • Birlikte tüm çocuk süreçler tarafınan toplamda ve her çocuk süreç + tarafından ayrı ayrı kullanılan o anki işlemci zamanı yüzdesi (*)
  • O an işlem görmekte olan konakların ve isteklerin sayısı (*)
  • -

    "(*)" imli bilgiler sadece ExtendedStatus yönergesinin değeri On olduğu - takdirde mevcuttur.

    +

    "(*)" imli bilgiler sadece ExtendedStatus yönergesinin değeri On olduğu + takdirde mevcuttur. 2.3.6 sürümünde, bu modulün yüklenmesi öntanımlı + olarak ExtendedStatus yönergesinin + değerini On yapacaktır.

    -

    Yönergeler

    -

    Bu modül yönerge içermez.

    -

    Konular

    + +
  • Sorun gidermek için server-status kullanımı
  • +

    Yönergeler

    +

    Bu modül yönerge içermez.

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
    top

    Durum Bilgisi Desteğinin Etkinleştirilmesi

    -

    Durum raporları, sadece mesela.dom alanından ve sadece tarayıcılar için +

    Durum raporları, sadece example.com alanından ve sadece tarayıcılar için etkin kılınmak istenirse httpd.conf dosyasına şu satırlar eklenebilir:

    -

    - <Location /server-status>
    - - SetHandler server-status
    -
    - Order Deny,Allow
    - Deny from all
    - Allow from .mesela.dom
    -
    - </Location> -

    +
    <Location "/server-status">
    +    SetHandler server-status
    +    Require host example.com
    +</Location>
    +

    Sunucu istatistiklerine tarayıcınızla erişmek isterseniz, http://sunucunuzun.ismi.buraya/server-status @@ -118,17 +121,48 @@

    Durum dosyasının makine tarafından okunabilen sürümüne http://sunucunuzun.ismi.buraya/server-status?auto şeklinde bir istek yaparak erişebilirsiniz. Bu, kendiliğinden çalıştığı - takdirde yararlıdır; Apache dağıtımının /support dizininde - bulunan log_server_status isimli perl betiğine bakınız.

    + takdirde yararlıdır; Apache HTTP Sunucusu kurulumunuzun + /support dizininde bulunan log_server_status + isimli Perl betiğine bakınız.

    Güvenlik

    - mod_status sunucu içinde derlendiği takdirde + mod_status sunucuya yüklendiği takdirde istatistikleri raporlama yeteneği dizin içi yapılandırma dosyaları (.htaccess gibi) dahil tüm yapılandırma dosyaları için kullanılabilir olacaktır. Bu durum güvenlik ile ilgili olarak siteniz için içinden çıkılması güç durumlara yol açabilir (çapanoğlu durumu).
    +
    top
    +
    +

    Sorun gidermek için server-status kullanımı

    + + +

    Sunucunuzun kullanılabilir tüm özkaynakları (işlemci veya bellek) + sömürdüğü ve sizin de bu soruna hangi istemcilerin veya isteklerin yol + açtığını saptamak istediğiniz durumda sorunu gidermek için başlangıç yeri + olarak server-status sayfası kullanılabilir.

    + +

    Önce ExtendedStatus yönergesine On + atadığınızsan emin olun. Böylece her çocuk süreç veya evre için tüm istek + ve istemci bilgilerini görebilirsiniz.

    + +

    (top veya benzeri bir süreç izleme aracı kullanarak) Artık + kendi süreç listenize ana zanlılar olan süreçleri bulmak için + bakabilirsiniz. Sorunun çeşidine bağlı olarak top çıktısını + işlemci kullanımına veya bellek kullanımına göre sıralatabilirsiniz.

    + +

    server-status sayfasını yeniden yükleyip bu süreç + kimliklerine bakın. Böylece, bu süreçler tarafından hangi isteklerin hangi + istemcilere sunulduğunu görebilirsiniz. İstekler kısa sürelerle görünürler, + bu bakımdan iş üstünde yakalamak için çeşitli denemeler yapmanız + gerekebilir.

    + +

    Bu işlem, yük sorununuzdan birinci derecede sorumlu istek türleri veya + istemciler hakkında bir fikir verecektir. Çoğu durumda belli bir HTTP + uygulamasının yanlış davrandığını veya belli bir istemcinin sitenize + saldırmakta olduğunu farkedersiniz.

    +
    @@ -137,7 +171,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_status.xml b/docs/manual/mod/mod_status.xml index 20c7cc90499..fad50d078cb 100644 --- a/docs/manual/mod/mod_status.xml +++ b/docs/manual/mod/mod_status.xml @@ -77,15 +77,12 @@ performance

    To enable status reports only for browsers from the example.com domain add this code to your httpd.conf configuration file

    - - <Location /server-status>
    - - SetHandler server-status
    -
    - Require host example.com
    -
    - </Location> -
    + +<Location "/server-status"> + SetHandler server-status + Require host example.com +</Location> +

    You can now access server statistics by using a Web browser to access the page diff --git a/docs/manual/mod/mod_status.xml.fr b/docs/manual/mod/mod_status.xml.fr index 0bd6baec03b..574277e0366 100644 --- a/docs/manual/mod/mod_status.xml.fr +++ b/docs/manual/mod/mod_status.xml.fr @@ -1,7 +1,7 @@ - + @@ -81,15 +81,12 @@ du serveur

    Pour n'activer les rapports d'état que pour les navigateurs appartenent au domaine example.com, ajoutez ces lignes à votre fichier de configuration httpd.conf :

    - - <Location /etat-serveur>
    - - SetHandler server-status
    -
    - Require host example.com
    -
    - </Location> -
    + +<Location "/etat-serveur"> + SetHandler server-status + Require host example.com +</Location> +

    Il est alors possible d'obtenir les statistiques du serveur en utilisant un navigateur web et en accédant à la page diff --git a/docs/manual/mod/mod_status.xml.ja b/docs/manual/mod/mod_status.xml.ja index 9fe3a871841..4cd6f5f8684 100644 --- a/docs/manual/mod/mod_status.xml.ja +++ b/docs/manual/mod/mod_status.xml.ja @@ -2,7 +2,7 @@ - + + + -mod_substitute - Apache HTTP Server +mod_substitute - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_substitute

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Açıklama:Sunucu etkinliği ve başarımı hakkında bilgi sağlar.
    Durum:Temel
    Modül Betimleyici:status_module
    @@ -37,8 +43,12 @@ +

    Bugfix checklist

    See also

    +
    top

    Substitute Directive

    @@ -64,11 +74,11 @@ Using the n flag forces the pattern to be treated as a fixed string.
    f
    -
    The f flag causes mod_substitute to flatten the +
    The f flag causes mod_substitute to flatten the result of a substitution allowing for later substitutions to take place on the boundary of this one. This is the default.
    q
    -
    The q flag causes mod_substitute to not +
    The q flag causes mod_substitute to not flatten the buckets after each substitution. This can result in much faster response and a decrease in memory utilization, but should only be used if there is no possibility @@ -76,38 +86,29 @@ or regex of a subsequent one.
    -

    Example

    - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - Substitute s/foo/bar/ni
    -
    - </Location> -

    +

    Example

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    Substitute "s/foo/bar/ni"
    +</Location>
    +

    If either the pattern or the substitution contain a slash character then an alternative delimiter should be used:

    -

    Example of using an alternate delimiter

    - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - Substitute "s|<BR */?>|<br />|i" -
    - </Location> -

    +

    Example of using an alternate delimiter

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    Substitute "s|<BR */?>|<br />|i"
    +</Location>
    +

    Backreferences can be used in the comparison and in the substitution, when regular expressions are used, as illustrated in the following example:

    -

    Example of using backreferences and captures

    - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - # "foo=k,bar=k" -> "foo/bar=k"
    - Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" -
    - </Location> -

    +

    Example of using backreferences and captures

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    # "foo=k,bar=k" -> "foo/bar=k"
    +    Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
    +</Location>
    +

    A common use scenario for mod_substitute is the situation in which a front-end server proxies requests to a back-end @@ -115,28 +116,100 @@ to the back-end server. These URLs don't work for the end-user, since the back-end server is unreachable.

    -

    In this case, mod_substutite can be used to rewrite +

    In this case, mod_substitute can be used to rewrite those URLs into something that will work from the front end:

    -

    Rewriting URLs embedded in proxied content

    - ProxyPass /blog/ http://internal.blog.example.com
    - ProxyPassReverse /blog/ http://internal.blog.example.com/
    -
    - Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" -

    +

    Rewriting URLs embedded in proxied content

    ProxyPass        "/blog/" "http://internal.blog.example.com"
    +ProxyPassReverse "/blog/" "http://internal.blog.example.com/"
    +
    +Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
    +

    ProxyPassReverse modifies any Location (redirect) headers that are sent by the back-end server, and, in this example, - Substitute takes care of the rest of the problem by + Substitute takes care of the rest of the problem by fixing up the HTML response as well.

    +
    +
    top
    +
    Description:Perform search and replace operations on response bodies
    Status:Extension
    + + + + + + + + +
    Description:Change the merge order of inherited patterns
    Syntax:SubstituteInheritBefore on|off
    Default:SubstituteInheritBefore off
    Context:directory, .htaccess
    Override:FileInfo
    Status:Extension
    Module:mod_substitute
    Compatibility:Available in httpd 2.4.17 and later
    +

    Whether to apply the inherited Substitute + patterns first (on), or after the ones of the current + context (off). + SubstituteInheritBefore is itself inherited, + hence contexts that inherit it (those that don't specify their own + SubstituteInheritBefore value) will apply the + closest defined merge order.

    + +
    +
    top
    +

    SubstituteMaxLineLength Directive

    + + + + + + + + + +
    Description:Set the maximum line size
    Syntax:SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G)
    Default:SubstituteMaxLineLength 1m
    Context:directory, .htaccess
    Override:FileInfo
    Status:Extension
    Module:mod_substitute
    Compatibility:Available in httpd 2.4.11 and later
    +

    The maximum line size handled by mod_substitute + is limited to restrict memory use. The limit can be configured + using SubstituteMaxLineLength. + The value can be given as the number of bytes and can be suffixed + with a single letter b, B, k, + K, m, M, g, + G to provide the size in bytes, kilobytes, megabytes + or gigabytes respectively.

    + +

    Example

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    SubstituteMaxLineLength 10m
    +    Substitute "s/foo/bar/ni"
    +</Location>
    +
    + +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_substitute.html.fr b/docs/manual/mod/mod_substitute.html.fr new file mode 100644 index 00000000000..8b4ce042721 --- /dev/null +++ b/docs/manual/mod/mod_substitute.html.fr @@ -0,0 +1,233 @@ + + + + + +mod_substitute - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_substitute

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Effectue des oprations de recherche/remplacement sur les +corps de rponses
    Statut:Extension
    IdentificateurdeModule:substitute_module
    FichierSource:mod_substitute.c
    Compatibilit:Disponible depuis la version 2.2.7 +du serveur HTTP Apache
    +

    Sommaire

    + +

    mod_substitute fournit un mcanisme permettant + d'effectuer des substitutions de chanes fixes ou d'expressions + rationnelles sur les corps de rponses.

    +
    + + +
    top
    +

    Directive Substitute

    + + + + + + + +
    Description:Modle de substition dans le contenu de la +rponse
    Syntaxe:Substitute s/modle/substitution/[infq]
    Contexte:rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_substitute
    +

    La directive Substitute permet de + spcifier un modle de recherche/remplacement appliquer au corps + de la rponse.

    + +

    La signification du modle peut tre modifie via toute + combinaison de ces drapeaux :

    + +
    +
    i
    +
    Effectue une comparaison sans tenir compte de la casse.
    +
    n
    +
    Par dfaut, le modle est trait en tant qu'expression + rationnelle. Le drapeau n force le traitement du + modle en tant que chane fixe.
    +
    f
    + +
    Avec le drapeau f, mod_substitute met plat le + rsultat d'une substitution (les conteneurs ou buckets ne sont + pas dissocis), ce qui permet d'ventuelles substitutions + ultrieures de s'effectuer sur cette dernire. C'est le + comportement par dfaut.
    +
    q
    + +
    Avec le drapeau q, mod_substitute dissocie les + conteneurs (ou buckets) aprs chaque substitution. Ceci peut + amliorer la rapidit de la rponse et diminuer la quantit de + mmoire utilise, mais ne doit tre utilis que s'il n'existe + aucune possibilit pour que le rsultat d'une substitution ne + corresponde au modle ou l'expression rationnelle d'une + substitution ultrieure.
    +
    + +

    Exemple

    <Location "/>
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    Substitute "s/foo/bar/ni"
    +</Location>
    +
    + +

    Si le modle ou la chane de substitution contient un caractre + slash '/', il faut utiliser un autre dlimiteur :

    + +

    Exemple d'utilisation d'un dlimiteur + alternatif

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    Substitute "s|<BR */?>|<br />|i"
    +</Location>
    +
    + +

    Lorsqu'on utilise des expressions rationnelles, on peut insrer + des rfrences arrires dans les oprations de comparaison et de + substitution, comme illustr dans l'exemple suivant :

    +

    Exemple d'utilisation de rfrences arrires et de captures

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    # "foo=k,bar=k" -> "foo/bar=k"
    +    Substitute "s|foo=(\w+),bar=\1|foo/bar=$1"
    +</Location>
    +
    + +

    Un scnario courant d'utilisation de mod_substitute + est la situation o un serveur frontal mandate des requtes pour un + serveur d'arrire-plan qui renvoie des documents HTML contenant des + URLs intgres codes en dur qui font rfrence ce serveur + d'arrire-plan. Ces URLs ne fonctionnent pas pour l'utilisateur + final car le serveur d'arrire-plan est hors d'atteinte.

    + +

    On peut, dans ce cas, utiliser mod_substitute pour + rcrire ces URLs afin qu'elles soit utilisables dans la partie + situe derrire le mandataire :

    + +

    Rcriture des URLs intgres un contenu mandat

    ProxyPass        "/blog/" "http://internal.blog.example.com"
    +ProxyPassReverse "/blog/" "http://internal.blog.example.com/"
    +
    +Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"
    +
    + +

    La directive ProxyPassReverse modifie tout en-tte + Location (redirection) envoy par le serveur + d'arrire-plan et, dans cet exemple, la directive + Substitute se charge son tour de la modification de + la rponse HTML.

    + + +
    +
    top
    +

    Directive SubstituteInheritBefore

    + + + + + + + + + +
    Description:Modifie l'ordre de fusion des modles hrits
    Syntaxe:SubstituteInheritBefore on|off
    Dfaut:SubstituteInheritBefore on
    Contexte:rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_substitute
    Compatibilit:Disponible partir de la version 2.4.17 du serveur HTTP +Apache
    +

    Cette directive permet de dfinir si l'on applique les modles +Substitute hrits en premier +(valeur on), ou aprs ceux du +contexte courant (valeur off). La valeur de la directive +SubstituteInheritBefore est +elle-mme hrite, et les contextes qui en hritent (ceux qui ne +dfinissent pas explicitement leur propre directive +SubstituteInheritBefore) appliqueront donc +l'ordre de fusion dfini le plus proche.

    + +
    +
    top
    +

    Directive SubstituteMaxLineLength

    + + + + + + + + + +
    Description:Dfinit la longueur de ligne maximale
    Syntaxe:SubstituteMaxLineLength octets(b|B|k|K|m|M|g|G)
    Dfaut:SubstituteMaxLineLength 1m
    Contexte:rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_substitute
    Compatibilit:Disponible partir de la version 2.4.11 du serveur HTTP +Apache
    +

    La taille de la ligne traite par mod_substitute + est limite afin de restreindre l'utilisation des ressources + mmoire. La directive SubstituteMaxLineLength + permet de dfinir cette limite. La valeur de la limite peut tre + spcifie sous la forme d'un nombre d'octets, et peut tre suffixe + par une des lettres b, B, k, + K, m, M, g ou + G pour fournir une valeur respectivement en octets, + kiloOctets, mgaOctets ou gigaOctets.

    + +

    Example

    <Location "/">
    +    AddOutputFilterByType SUBSTITUTE text/html
    +    SubstituteMaxLineLength 10m
    +    Substitute "s/foo/bar/ni"
    +</Location>
    +
    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_substitute.xml b/docs/manual/mod/mod_substitute.xml index 0e0ab41e48e..406274c4a99 100644 --- a/docs/manual/mod/mod_substitute.xml +++ b/docs/manual/mod/mod_substitute.xml @@ -58,11 +58,11 @@ Using the n flag forces the pattern to be treated as a fixed string.
    f
    -
    The f flag causes mod_substitute to flatten the +
    The f flag causes mod_substitute to flatten the result of a substitution allowing for later substitutions to take place on the boundary of this one. This is the default.
    q
    -
    The q flag causes mod_substitute to not +
    The q flag causes mod_substitute to not flatten the buckets after each substitution. This can result in much faster response and a decrease in memory utilization, but should only be used if there is no possibility @@ -71,36 +71,36 @@ Example - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - Substitute s/foo/bar/ni
    -
    - </Location> + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + Substitute "s/foo/bar/ni" +</Location> +

    If either the pattern or the substitution contain a slash character then an alternative delimiter should be used:

    Example of using an alternate delimiter - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - Substitute "s|<BR */?>|<br />|i" -
    - </Location> + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + Substitute "s|<BR */?>|<br />|i" +</Location> +

    Backreferences can be used in the comparison and in the substitution, when regular expressions are used, as illustrated in the following example:

    Example of using backreferences and captures - <Location /> - - AddOutputFilterByType SUBSTITUTE text/html
    - # "foo=k,bar=k" -> "foo/bar=k"
    - Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" -
    - </Location> + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + # "foo=k,bar=k" -> "foo/bar=k" + Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" +</Location> +

    A common use scenario for mod_substitute is the @@ -109,23 +109,79 @@ to the back-end server. These URLs don't work for the end-user, since the back-end server is unreachable.

    -

    In this case, mod_substutite can be used to rewrite +

    In this case, mod_substitute can be used to rewrite those URLs into something that will work from the front end:

    Rewriting URLs embedded in proxied content - ProxyPass /blog/ http://internal.blog.example.com
    - ProxyPassReverse /blog/ http://internal.blog.example.com/
    -
    - Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" + +ProxyPass "/blog/" "http://internal.blog.example.com" +ProxyPassReverse "/blog/" "http://internal.blog.example.com/" + +Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" +

    ProxyPassReverse modifies any Location (redirect) headers that are sent by the back-end server, and, in this example, - Substitute takes care of the rest of the problem by + Substitute takes care of the rest of the problem by fixing up the HTML response as well.

    + +SubstituteMaxLineLength +Set the maximum line size +SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) +SubstituteMaxLineLength 1m +directory +.htaccess +FileInfo +Available in httpd 2.4.11 and later + + +

    The maximum line size handled by mod_substitute + is limited to restrict memory use. The limit can be configured + using SubstituteMaxLineLength. + The value can be given as the number of bytes and can be suffixed + with a single letter b, B, k, + K, m, M, g, + G to provide the size in bytes, kilobytes, megabytes + or gigabytes respectively.

    + + Example + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + SubstituteMaxLineLength 10m + Substitute "s/foo/bar/ni" +</Location> + + + +
    +
    + + +SubstituteInheritBefore +Change the merge order of inherited patterns +SubstituteInheritBefore on|off +SubstituteInheritBefore off +directory +.htaccess +FileInfo +Available in httpd 2.4.17 and later + + +

    Whether to apply the inherited Substitute + patterns first (on), or after the ones of the current + context (off). + SubstituteInheritBefore is itself inherited, + hence contexts that inherit it (those that don't specify their own + SubstituteInheritBefore value) will apply the + closest defined merge order.

    +
    +
    + diff --git a/docs/manual/mod/mod_substitute.xml.fr b/docs/manual/mod/mod_substitute.xml.fr new file mode 100644 index 00000000000..fb9f7901bac --- /dev/null +++ b/docs/manual/mod/mod_substitute.xml.fr @@ -0,0 +1,210 @@ + + + + + + + + + + + +mod_substitute +Effectue des opérations de recherche/remplacement sur les +corps de réponses +Extension +mod_substitute.c +substitute_module +Disponible depuis la version 2.2.7 +du serveur HTTP Apache + + +

    mod_substitute fournit un mécanisme permettant + d'effectuer des substitutions de chaînes fixes ou d'expressions + rationnelles sur les corps de réponses.

    +
    + + +Substitute +Modèle de substition dans le contenu de la +réponse +Substitute s/modèle/substitution/[infq] +directory +.htaccess +FileInfo + + +

    La directive Substitute permet de + spécifier un modèle de recherche/remplacement à appliquer au corps + de la réponse.

    + +

    La signification du modèle peut être modifiée via toute + combinaison de ces drapeaux :

    + +
    +
    i
    +
    Effectue une comparaison sans tenir compte de la casse.
    +
    n
    +
    Par défaut, le modèle est traité en tant qu'expression + rationnelle. Le drapeau n force le traitement du + modèle en tant que chaîne fixe.
    +
    f
    + +
    Avec le drapeau f, mod_substitute met à plat le + résultat d'une substitution (les conteneurs ou buckets ne sont + pas dissociés), ce qui permet à d'éventuelles substitutions + ultérieures de s'effectuer sur cette dernière. C'est le + comportement par défaut.
    +
    q
    + +
    Avec le drapeau q, mod_substitute dissocie les + conteneurs (ou buckets) après chaque substitution. Ceci peut + améliorer la rapidité de la réponse et diminuer la quantité de + mémoire utilisée, mais ne doit être utilisé que s'il n'existe + aucune possibilité pour que le résultat d'une substitution ne + corresponde au modèle ou à l'expression rationnelle d'une + substitution ultérieure.
    +
    + + Exemple + +<Location "/> + AddOutputFilterByType SUBSTITUTE text/html + Substitute "s/foo/bar/ni" +</Location> + + + +

    Si le modèle ou la chaîne de substitution contient un caractère + slash '/', il faut utiliser un autre délimiteur :

    + + Exemple d'utilisation d'un délimiteur + alternatif + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + Substitute "s|<BR */?>|<br />|i" +</Location> + + + +

    Lorsqu'on utilise des expressions rationnelles, on peut insérer + des références arrières dans les opérations de comparaison et de + substitution, comme illustré dans l'exemple suivant :

    + Exemple d'utilisation de références arrières et de captures + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + # "foo=k,bar=k" -> "foo/bar=k" + Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" +</Location> + + + +

    Un scénario courant d'utilisation de mod_substitute + est la situation où un serveur frontal mandate des requêtes pour un + serveur d'arrière-plan qui renvoie des documents HTML contenant des + URLs intégrées codées en dur qui font référence à ce serveur + d'arrière-plan. Ces URLs ne fonctionnent pas pour l'utilisateur + final car le serveur d'arrière-plan est hors d'atteinte.

    + +

    On peut, dans ce cas, utiliser mod_substitute pour + réécrire ces URLs afin qu'elles soit utilisables dans la partie + située derrière le mandataire :

    + + Réécriture des URLs intégrées à un contenu mandaté + +ProxyPass "/blog/" "http://internal.blog.example.com" +ProxyPassReverse "/blog/" "http://internal.blog.example.com/" + +Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" + + + +

    La directive ProxyPassReverse modifie tout en-tête + Location (redirection) envoyé par le serveur + d'arrière-plan et, dans cet exemple, la directive + Substitute se charge à son tour de la modification de + la réponse HTML.

    + +
    +
    + + +SubstituteMaxLineLength +Définit la longueur de ligne maximale +SubstituteMaxLineLength octets(b|B|k|K|m|M|g|G) +SubstituteMaxLineLength 1m +directory +.htaccess +FileInfo +Disponible à partir de la version 2.4.11 du serveur HTTP +Apache + + +

    La taille de la ligne traitée par mod_substitute + est limitée afin de restreindre l'utilisation des ressources + mémoire. La directive SubstituteMaxLineLength + permet de définir cette limite. La valeur de la limite peut être + spécifiée sous la forme d'un nombre d'octets, et peut être suffixée + par une des lettres b, B, k, + K, m, M, g ou + G pour fournir une valeur respectivement en octets, + kiloOctets, mégaOctets ou gigaOctets.

    + + Example + +<Location "/"> + AddOutputFilterByType SUBSTITUTE text/html + SubstituteMaxLineLength 10m + Substitute "s/foo/bar/ni" +</Location> + + + +
    +
    + + +SubstituteInheritBefore +Modifie l'ordre de fusion des modèles hérités +SubstituteInheritBefore on|off +SubstituteInheritBefore on +directory +.htaccess +FileInfo +Disponible à partir de la version 2.4.17 du serveur HTTP +Apache + + +

    Cette directive permet de définir si l'on applique les modèles +Substitute hérités en premier +(valeur on), ou après ceux du +contexte courant (valeur off). La valeur de la directive +SubstituteInheritBefore est +elle-même héritée, et les contextes qui en héritent (ceux qui ne +définissent pas explicitement leur propre directive +SubstituteInheritBefore) appliqueront donc +l'ordre de fusion défini le plus proche.

    +
    +
    + +
    diff --git a/docs/manual/mod/mod_substitute.xml.meta b/docs/manual/mod/mod_substitute.xml.meta index f9dbd2933f9..c991ba2149b 100644 --- a/docs/manual/mod/mod_substitute.xml.meta +++ b/docs/manual/mod/mod_substitute.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_suexec.html b/docs/manual/mod/mod_suexec.html index f5d06c29162..7bf30c42b72 100644 --- a/docs/manual/mod/mod_suexec.html +++ b/docs/manual/mod/mod_suexec.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_suexec.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_suexec.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_suexec.html.en b/docs/manual/mod/mod_suexec.html.en index 09537711d2b..393ae11491f 100644 --- a/docs/manual/mod/mod_suexec.html.en +++ b/docs/manual/mod/mod_suexec.html.en @@ -1,27 +1,33 @@ - -mod_suexec - Apache HTTP Server +mod_suexec - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_suexec

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -30,8 +36,7 @@ and Group Status:Extension ModuleIdentifier:suexec_module -SourceFile:mod_suexec.c -Compatibility:Available in Apache 2.0 and later +SourceFile:mod_suexec.c

    Summary

    This module, in combination with the suexec support program allows @@ -41,10 +46,10 @@ and Group

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    SuexecUserGroup Directive

    @@ -54,20 +59,16 @@ and Group Context:server config, virtual host Status:Extension Module:mod_suexec -Compatibility:SuexecUserGroup is only available in 2.0 and -later.

    The SuexecUserGroup directive allows you to specify a user and group for CGI programs to run as. Non-CGI requests are still processed with the user specified in the User directive.

    -

    Example

    - - SuexecUserGroup nobody nogroup -

    +

    Example

    SuexecUserGroup nobody nogroup
    +
    -

    In Apache httpd 2.3.9 and later, startup will fail if this - directive is specified but the suEXEC feature is disabled.

    +

    Startup will fail if this directive is specified but the suEXEC + feature is disabled.

    See also

      @@ -77,10 +78,32 @@ later.

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_suexec.html.fr b/docs/manual/mod/mod_suexec.html.fr new file mode 100644 index 00000000000..6baf07a594f --- /dev/null +++ b/docs/manual/mod/mod_suexec.html.fr @@ -0,0 +1,114 @@ + + + + + +mod_suexec - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_suexec

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + + + +
    Description:Permet l'excution des scripts CGI sous l'utilisateur et +le groupe spcifis
    Statut:Extension
    IdentificateurdeModule:suexec_module
    FichierSource:mod_suexec.c
    +

    Sommaire

    + +

    Ce module, en combinaison avec son programme support + suexec, permet l'excution des scripts CGI sous + l'utilisateur et le groupe spcifis.

    +
    + + +
    top
    +

    Directive SuexecUserGroup

    + + + + + + +
    Description:L'utilisateur et le groupe sous lesquels les programmes CGI +doivent s'excuter
    Syntaxe:SuexecUserGroup Utilisateur Groupe
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_suexec
    +

    La directive SuexecUserGroup permet de + spcifier l'utilisateur et le groupe sous lesquels les programmes + CGI doivent s'excuter. Les requtes non CGI seront toujours + traites avec l'utilisateur spcifi par la directive User.

    + +

    Exemple

    SuexecUserGroup nobody nogroup
    +
    + +

    Le dmarrage chouera si cette + directive est spcifie et si la fonctionnalit suEXEC est + dsactive.

    + + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_suexec.html.ja.utf8 b/docs/manual/mod/mod_suexec.html.ja.utf8 index 23c5a67a9b8..f564b8adeec 100644 --- a/docs/manual/mod/mod_suexec.html.ja.utf8 +++ b/docs/manual/mod/mod_suexec.html.ja.utf8 @@ -1,34 +1,41 @@ - -mod_suexec - Apache HTTP サーバ +mod_suexec - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_suexec

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -44,10 +51,10 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_suexec.html.ko.euc-kr b/docs/manual/mod/mod_suexec.html.ko.euc-kr index 07aa700f25c..6ec62d3d492 100644 --- a/docs/manual/mod/mod_suexec.html.ko.euc-kr +++ b/docs/manual/mod/mod_suexec.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_suexec - Apache HTTP Server +mod_suexec - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_suexec

    +
  • Comments
  • top

    SuexecUserGroup þ

    @@ -74,10 +80,32 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_suexec.html.tr.utf8 b/docs/manual/mod/mod_suexec.html.tr.utf8 index fd08c396482..8b417332fa8 100644 --- a/docs/manual/mod/mod_suexec.html.tr.utf8 +++ b/docs/manual/mod/mod_suexec.html.tr.utf8 @@ -1,38 +1,42 @@ - -mod_suexec - Apache HTTP Sunucusu +mod_suexec - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_suexec

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:指定されたユーザとグループで CGI スクリプトを実行する
    ステータス:Extension
    モジュール識別子:suexec_module
    - -
    Açıklama:CGI betiklerinin belli bir kullanıcı ve grubun aidiyetinde çalışmasını mümkün kılar.
    Durum:Eklenti
    Modül Betimleyici:suexec_module
    Kaynak Dosyası:mod_suexec.c
    Uyumluluk:Apache 2.0 ve sonrasında mevcuttur.
    +Kaynak Dosyası:mod_suexec.c

    Özet

    Bu modül suexec programı ile birlikte CGI @@ -43,10 +47,10 @@

    -

    Ayrıca bakınız:

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Yorum
  • top

    SuexecUserGroup Yönergesi

    @@ -57,29 +61,53 @@ Bağlam:sunucu geneli, sanal konak Durum:Eklenti Modül:mod_suexec -Uyumluluk:Apache 2.0 ve sonrasında mevcuttur.

    SuexecUserGroup yönergesi CGI programlarını çalıştıracak kullanıcı ve grubu belirtmeye yarar. CGI harici istekler hala User yönergesinde - belirtilen kullanıcı tarafından yerine getirilir. Bu yönerge, Apache - 1.3 yapılandırmasında sanal konak bölümlerindeki User ve - Group yönergelerinin yerini almak üzere tasarlanmıştır.

    + belirtilen kullanıcı tarafından yerine getirilir.

    + +
    SuexecUserGroup nobody nogroup
    -

    Örnek

    - - SuexecUserGroup nobody nogroup -

    +

    Bu yönerge belirtildiği halde + Suexec + özelliği etkinleştirilmemişse Apache httpd başlatılamaz.

    +

    Ayrıca bakınız:

    +

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_suexec.xml b/docs/manual/mod/mod_suexec.xml index f2d3ce0d788..65bb70e4089 100644 --- a/docs/manual/mod/mod_suexec.xml +++ b/docs/manual/mod/mod_suexec.xml @@ -28,7 +28,6 @@ and Group Extension mod_suexec.c suexec_module -Available in Apache 2.0 and later
    @@ -46,8 +45,6 @@ and Group SuexecUserGroup User Group server config virtual host -SuexecUserGroup is only available in 2.0 and -later.

    The SuexecUserGroup directive allows you @@ -57,11 +54,13 @@ later. Example + SuexecUserGroup nobody nogroup + -

    In Apache httpd 2.3.9 and later, startup will fail if this - directive is specified but the suEXEC feature is disabled.

    +

    Startup will fail if this directive is specified but the suEXEC + feature is disabled.

    Suexec diff --git a/docs/manual/mod/mod_suexec.xml.fr b/docs/manual/mod/mod_suexec.xml.fr new file mode 100644 index 00000000000..22b3e3f566f --- /dev/null +++ b/docs/manual/mod/mod_suexec.xml.fr @@ -0,0 +1,76 @@ + + + + + + + + + + + +mod_suexec +Permet l'exécution des scripts CGI sous l'utilisateur et +le groupe spécifiés +Extension +mod_suexec.c +suexec_module + + + +

    Ce module, en combinaison avec son programme support + suexec, permet l'exécution des scripts CGI sous + l'utilisateur et le groupe spécifiés.

    +
    + +Support de SuEXEC + + + +SuexecUserGroup +L'utilisateur et le groupe sous lesquels les programmes CGI +doivent s'exécuter +SuexecUserGroup Utilisateur Groupe +server config +virtual host + + +

    La directive SuexecUserGroup permet de + spécifier l'utilisateur et le groupe sous lesquels les programmes + CGI doivent s'exécuter. Les requêtes non CGI seront toujours + traitées avec l'utilisateur spécifié par la directive User.

    + + + Exemple + + SuexecUserGroup nobody nogroup + + + +

    Le démarrage échouera si cette + directive est spécifiée et si la fonctionnalité suEXEC est + désactivée.

    + +
    + +Suexec +
    + +
    + diff --git a/docs/manual/mod/mod_suexec.xml.ja b/docs/manual/mod/mod_suexec.xml.ja index f940fce2ec8..2f4ae79ae40 100644 --- a/docs/manual/mod/mod_suexec.xml.ja +++ b/docs/manual/mod/mod_suexec.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_unique_id - Apache HTTP Server +mod_unique_id - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_unique_id

    @@ -43,13 +48,15 @@ identifier for each request useful for various reasons which are beyond the scope of this document.

    -

    Directives

    -

    This module provides no - directives.

    -

    Topics

    +

    Topics

    +

    Directives

    +

    This module provides no + directives.

    +

    Bugfix checklist

    See also

    +
    top

    Theory

    @@ -193,7 +200,7 @@ identifier for each request and can otherwise use the same alphabet and bit length. Since the time stamps are essentially an increasing sequence, it's sufficient to have a flag second in which all machines - in the cluster stop serving and request, and stop using the old + in the cluster stop serving any request, and stop using the old encoding format. Afterwards they can resume requests and begin issuing the new encodings.

    @@ -216,7 +223,28 @@ identifier for each request  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unique_id.html.fr b/docs/manual/mod/mod_unique_id.html.fr index 507c78ae73a..f5b3cf7a33d 100644 --- a/docs/manual/mod/mod_unique_id.html.fr +++ b/docs/manual/mod/mod_unique_id.html.fr @@ -1,23 +1,28 @@ - -mod_unique_id - Serveur Apache HTTP +mod_unique_id - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4 > Modules

    Module Apache mod_unique_id

    @@ -43,12 +48,14 @@ identifiant unique pour chaque requ raisons dont la nature se situe au del de la porte de ce document.

    -

    Directives

    -

    Ce module ne fournit aucune directive.

    -

    Sujets

    +

    Sujets

    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +

    Traitement des bugs

    Voir aussi

    +
    top

    Thorie

    @@ -211,8 +218,8 @@ identifiant unique pour chaque requ conserver le repre de temps comme premier lment, et pour le reste, utiliser les mme alphabet et longueur en bits. Comme les repres de temps constituent essentiellement un squence croissante, - il suffit que toutes les machines du cluster arrtent de servir et - de requrir dans la mme seconde repre, et n'utilisent + il suffit que toutes les machines du cluster arrtent de traiter + toute requte dans la mme seconde repre, et n'utilisent alors plus l'ancien format de codage. Ensuite, elles peuvent reprendre le traitement des requtes en utilisant les nouveaux codages.

    @@ -238,7 +245,28 @@ identifiant unique pour chaque requ  fr  |  ja  |  ko 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unique_id.html.ja.utf8 b/docs/manual/mod/mod_unique_id.html.ja.utf8 index b9bd0e3e529..d6fafe83cbf 100644 --- a/docs/manual/mod/mod_unique_id.html.ja.utf8 +++ b/docs/manual/mod/mod_unique_id.html.ja.utf8 @@ -1,34 +1,40 @@ - -mod_unique_id - Apache HTTP サーバ +mod_unique_id - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_unique_id

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -46,12 +52,14 @@ 一意な識別子が便利な理由はいろいろありますが、 このドキュメントの目的からは外れるため、ここでは説明しません。

    -

    ディレクティブ

    -

    このモジュールにディレクティブはありません。

    -

    トピック

    +

    トピック

    +

    ディレクティブ

    +

    このモジュールにディレクティブはありません。

    +

    Bugfix checklist

    参照

    +
    top

    理論

    @@ -209,11 +217,32 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unique_id.html.ko.euc-kr b/docs/manual/mod/mod_unique_id.html.ko.euc-kr index 48430d45b36..75ad6671299 100644 --- a/docs/manual/mod/mod_unique_id.html.ko.euc-kr +++ b/docs/manual/mod/mod_unique_id.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_unique_id - Apache HTTP Server +mod_unique_id - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_unique_id

    @@ -43,12 +48,14 @@ UNIQUE_ID Ѵ. ĺڴ 뵵 , Ѿ.

    -

    þ

    -

    ⿡ þ ϴ.

    -

    +

    +

    þ

    +

    ⿡ þ ϴ.

    +

    Bugfix checklist

    +
    top

    ̷

    @@ -187,7 +194,28 @@  fr  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unique_id.xml b/docs/manual/mod/mod_unique_id.xml index 51117801418..df76ae7b8fe 100644 --- a/docs/manual/mod/mod_unique_id.xml +++ b/docs/manual/mod/mod_unique_id.xml @@ -182,7 +182,7 @@ identifier for each request and can otherwise use the same alphabet and bit length. Since the time stamps are essentially an increasing sequence, it's sufficient to have a flag second in which all machines - in the cluster stop serving and request, and stop using the old + in the cluster stop serving any request, and stop using the old encoding format. Afterwards they can resume requests and begin issuing the new encodings.

    diff --git a/docs/manual/mod/mod_unique_id.xml.fr b/docs/manual/mod/mod_unique_id.xml.fr index f487e8ac66d..be637f2697e 100644 --- a/docs/manual/mod/mod_unique_id.xml.fr +++ b/docs/manual/mod/mod_unique_id.xml.fr @@ -1,7 +1,7 @@ - + @@ -203,8 +203,8 @@ identifiant unique pour chaque requête conserver le repère de temps comme premier élément, et pour le reste, utiliser les même alphabet et longueur en bits. Comme les repères de temps constituent essentiellement un séquence croissante, - il suffit que toutes les machines du cluster arrêtent de servir et - de requérir dans la même seconde repère, et n'utilisent + il suffit que toutes les machines du cluster arrêtent de traiter + toute requête dans la même seconde repère, et n'utilisent alors plus l'ancien format de codage. Ensuite, elles peuvent reprendre le traitement des requêtes en utilisant les nouveaux codages.

    diff --git a/docs/manual/mod/mod_unique_id.xml.ja b/docs/manual/mod/mod_unique_id.xml.ja index 9a670ab457a..e28fc579546 100644 --- a/docs/manual/mod/mod_unique_id.xml.ja +++ b/docs/manual/mod/mod_unique_id.xml.ja @@ -1,7 +1,7 @@ - + + -mod_unixd - Apache HTTP Server +mod_unixd - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_unixd

    Available Languages:  en  | + fr  |  tr 

    説明:それぞれのリクエストに対する一意な識別子の入った環境変数を 提供する
    ステータス:Extension
    -
    Description:Basic (required) security for Unix-family platforms.
    Status:Base
    +Status:Base +ModuleIdentifier:unixd_module +SourceFile:mod_unixd.c

    Directives

    -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    ChrootDir Directive

    @@ -70,8 +78,6 @@ requests Context:server config Status:Base Module:mod_unixd -Compatibility:Only valid in global server config since Apache -2.0

    The Group directive sets the group under which the server will answer requests. In order to use this @@ -88,9 +94,8 @@ requests

    Refers to a group by its number.
    -

    Example

    - Group www-group -

    +

    Example

    Group www-group
    +

    It is recommended that you set up a new group specifically for running the server. Some admins use user nobody, @@ -118,7 +123,6 @@ Off otherwise Context:server config Status:Base Module:mod_unixd -Compatibility:Available in Apache httpd 2.3.9 and later

    When On, startup will fail if the suexec binary doesn't exist or has an invalid owner or file mode.

    @@ -136,8 +140,6 @@ requests Context:server config Status:Base Module:mod_unixd -Compatibility:Only valid in global server config since Apache -2.0

    The User directive sets the user ID as which the server will answer requests. In order to use this @@ -180,8 +182,30 @@ requests

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unixd.html.fr b/docs/manual/mod/mod_unixd.html.fr new file mode 100644 index 00000000000..5c0f5ffc0c4 --- /dev/null +++ b/docs/manual/mod/mod_unixd.html.fr @@ -0,0 +1,226 @@ + + + + + +mod_unixd - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_unixd

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    + + + +
    Description:Scurit de base (ncessaire) pour les plates-formes de la +famille Unix.
    Statut:Base
    IdentificateurdeModule:unixd_module
    FichierSource:mod_unixd.c
    +
    + + +
    top
    +

    Directive ChrootDir

    + + + + + + + + +
    Description:Rpertoire dans lequel Apache doit se positionner au +dmarrage aprs avoir effectu un chroot(8).
    Syntaxe:ChrootDir chemin-rpertoire
    Dfaut:Non dfini
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_unixd
    Compatibilit:Disponible depuis la version 2.2.10 d'Apache
    +

    Cette directive fait en sorte que le serveur effectue un + chroot(8) vers le rpertoire spcifi aprs le dmarrage, + mais avant d'accepter les requtes en provenance du rseau.

    +

    Notez que l'excution du serveur dans un environnement chroot + n'est pas simple et ncessite une configuration particulire, en + particulier si vous utilisez des scripts CGI ou PHP. Il est + conseill de se familiariser avec l'opration chroot avant d'essayer + d'utiliser cette fonctionnalit.

    + +
    +
    top
    +

    Directive Group

    + + + + + + + +
    Description:Groupe sous lequel le serveur va traiter les +requtes
    Syntaxe:Group groupe unix
    Dfaut:Group #-1
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_unixd
    +

    La directive Group permet de dfinir le + groupe sous lequel le serveur va traiter les requtes. Pour + utiliser cette directive, le serveur doit avoir t dmarr par + root. Si vous dmarrez le serveur en tant + qu'utilisateur non root, celui-ci ne pourra pas adopter le groupe + spcifi comme groupe d'excution, et continuera s'excuter sous + le groupe de l'utilisateur qui l'aura lanc. groupe unix + peut se prsenter sous la forme :

    + +
    +
    d'un nom de groupe
    +
    Rfrence le groupe spcifi par son nom.
    + +
    du caractre # suivi d'un numro de groupe.
    +
    Rfrence le groupe spcifi par son numro.
    +
    + +

    Exemple

    Group www-group
    +
    + +

    Il est conseill de crer un groupe ddi l'excution du + serveur. Certains administrateurs utilisent l'utilisateur + nobody, mais ce n'est pas toujours souhaitable ou mme + possible.

    + +

    Scurit

    +

    Ne dfinissez pas la directive Group (ou + User) + root moins de savoir exactement ce que vous faites + ainsi que les dangers encourus.

    +
    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive Suexec

    + + + + + + + +
    Description:Active ou dsactive la fonctionnalit suEXEC
    Syntaxe:Suexec On|Off
    Dfaut:On si le binaire suexec existe avec les mode et propritaire +appropris, Off dans le cas contraire
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_unixd
    +

    Lorsque cette directive est dfinie On, le dmarrage chouera si + le binaire suexec n'existe pas, ou possde un propritaire ou mode + fichier invalide.

    +

    Lorsque cette directive est dfinie Off, suEXEC sera dsactiv, + mme si le binaire suexec existe et possde un propritaire et mode + fichier valides.

    + +
    +
    top
    +

    Directive User

    + + + + + + + +
    Description:L'utilisateur sous lequel le serveur va traiter les +requtes
    Syntaxe:User utilisateur unix
    Dfaut:User #-1
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_unixd
    +

    La directive User permet de dfinir + l'utilisateur sous lequel le serveur va traiter les requtes. Pour + utiliser cette directive, le serveur doit avoir t dmarr + par root. Si vous dmarrez le serveur en tant + qu'utilisateur non root, celui-ci ne pourra pas adopter + l'utilisateur avec privilges restreints comme utilisateur + d'excution, et continuera s'excuter sous + l'utilisateur qui l'aura lanc. Si vous dmarrez le serveur en tant + que root, il est normal que le processus parent + continue s'excuter sous root. utilisateur unix peut se + prsenter sous la forme :

    + +
    +
    d'un nom d'utilisateur
    +
    Rfrence l'utilisateur spcifi par son nom.
    + +
    le caractre # suivi d'un numro d'utilisateur.
    +
    Rfrence l'utilisateur spcifi par son numro.
    +
    + +

    L'utilisateur ne doit pas possder de privilges qui lui + permettraient d'accder des fichiers non destins au + monde extrieur, et paralllement, l'utilisateur ne doit pas + excuter de code dont l'usage soit destin un usage autre que les + requtes HTTP. Il est conseill de crer un utilisateur et un groupe + ddis l'excution du serveur. Certains administrateurs utilisent + l'utilisateur nobody, mais ce n'est pas toujours + souhaitable, car l'utilisateur nobody peut avoir + diverses utilisations dans le systme.

    + +

    Scurit

    +

    Ne dfinissez pas la directive Group (ou + User) + root moins de savoir exactement ce que vous faites + ainsi que les dangers encourus.

    +
    + + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_unixd.html.tr.utf8 b/docs/manual/mod/mod_unixd.html.tr.utf8 index 1138c8a503b..42647250f0c 100644 --- a/docs/manual/mod/mod_unixd.html.tr.utf8 +++ b/docs/manual/mod/mod_unixd.html.tr.utf8 @@ -1,32 +1,39 @@ - -mod_unixd - Apache HTTP Sunucusu +mod_unixd - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_unixd

    Mevcut Diller:  en  | + fr  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -
    Açıklama:Unix ailesi platformlar için temel (gerekli) güvenlik.
    Durum:Temel
    +Durum:Temel +Modül Betimleyici:unixd_module +Kaynak Dosyası:mod_unixd.c

    Yönergeler

    -
    +

    Bugfix checklist

    Ayrıca bakınız:

    +
    top

    ChrootDir Yönergesi

    @@ -47,10 +57,12 @@ Bağlam:sunucu geneli Durum:Temel Modül:mod_unixd +Uyumluluk:Apache HTTP Sunucusunun 2.2.10 and laterve sonraki sürümlerinde + kullanılabilir. -

    Bu yönerge httpd 2.2.9(?) ve sonrasında mevcuttur ve sunucuya - başlatıldıktan sonra ağdan gelen istekleri kabul etmeden önce - belirtilen dizine chroot(8) yapmasını söyler.

    +

    Bu yönerge sunucuya başlatıldıktan sonra ağdan gelen istekleri kabul + etmeden önce belirtilen dizine chroot(8) yapmasını söyler.

    +

    Sunucuyu chroot altında çalıştırmanın basit bir işlem olmadığına ve özellikle CGI veya PHP gibi betikler çalıştırıyorsanız ek ayarlamalar yapmanız gerektiğine dikkat ediniz. Lütfen, bu özelliği kullanmaya @@ -67,7 +79,6 @@ Bağlam:sunucu geneli Durum:Temel Modül:mod_unixd -Uyumluluk:Apache 2.0’dan itibaren sadece sunucu geneli için geçerlidir.

    Group yönergesi, sunucunun hangi grup altında isteklere yanıt vereceğini belirler. Bu yönergenin uygulanabilmesi için @@ -84,9 +95,8 @@

    Gruba numarası ile başvurulur.
    -

    Örnek

    - Group www-group -

    +
    Group www-group
    +

    Çalışan sunucu için özellikle yeni bir grup atamanız önerilir. Bazı sistem yöneticileri nobody grubunu kullanırlar fakat @@ -108,16 +118,20 @@

    top

    Suexec Yönergesi

    - + - + - -
    Açıklama:Enable or disable the suEXEC feature
    Açıklama:suEXEC özelliğini etkin veya etkisiz yapar
    Sözdizimi:Suexec On|Off
    Öntanımlı:On if suexec binary exists with proper owner and mode, -Off otherwise
    Öntanımlı:suexec çalıştırılabiliri uygun sahip ve kip ile mevcutsa On, değilse + Off
    Bağlam:sunucu geneli
    Durum:Temel
    Modül:mod_unixd
    Uyumluluk:Available in Apache httpd 2.3.9 and later

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    + +

    On olduğunda, suexec çalıştırılabiliri yoksa veya dosya kipi ve sahibi + geçersizse httpd başlatılamaz.

    +

    Off olduğunda, suexec çalıştırılabiliri varsa ve hatta dosya kipi ve + sahibi geçerli olsa bile suEXEC özelliği iptal edilir.

    + +
    top

    User Yönergesi

    @@ -128,8 +142,6 @@ Off otherwise -
    Bağlam:sunucu geneli
    Durum:Temel
    Modül:mod_unixd
    Uyumluluk:Apache 2.0’dan itibaren sadece sunucu geneli için - geçerlidir.

    User yönergesi, sunucunun hangi kullanıcı olarak isteklere yanıt vereceğini belirler. Bu yönergenin uygulanabilmesi için @@ -173,8 +185,30 @@ Off otherwise

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_unixd.xml b/docs/manual/mod/mod_unixd.xml index f16541f892a..4b70219a87f 100644 --- a/docs/manual/mod/mod_unixd.xml +++ b/docs/manual/mod/mod_unixd.xml @@ -25,6 +25,8 @@ mod_unixd Basic (required) security for Unix-family platforms. Base +mod_unixd.c +unixd_module suEXEC support @@ -35,8 +37,6 @@ requests Group unix-group Group #-1 server config -Only valid in global server config since Apache -2.0

    The Group directive sets the group under @@ -55,7 +55,9 @@ requests Example + Group www-group +

    It is recommended that you set up a new group specifically for @@ -80,8 +82,6 @@ requests User unix-userid User #-1 server config -Only valid in global server config since Apache -2.0

    The User directive sets the user ID as @@ -149,7 +149,6 @@ requests On if suexec binary exists with proper owner and mode, Off otherwise server config -Available in Apache httpd 2.3.9 and later

    When On, startup will fail if the suexec binary doesn't exist diff --git a/docs/manual/mod/mod_unixd.xml.fr b/docs/manual/mod/mod_unixd.xml.fr new file mode 100644 index 00000000000..bf20dc38922 --- /dev/null +++ b/docs/manual/mod/mod_unixd.xml.fr @@ -0,0 +1,176 @@ + + + + + + + + + + + +mod_unixd +Sécurité de base (nécessaire) pour les plates-formes de la +famille Unix. +Base +mod_unixd.c +unixd_module + +Support de suEXEC + + +Group +Groupe sous lequel le serveur va traiter les +requêtes +Group groupe unix +Group #-1 +server config + + +

    La directive Group permet de définir le + groupe sous lequel le serveur va traiter les requêtes. Pour + utiliser cette directive, le serveur doit avoir été démarré par + root. Si vous démarrez le serveur en tant + qu'utilisateur non root, celui-ci ne pourra pas adopter le groupe + spécifié comme groupe d'exécution, et continuera à s'exécuter sous + le groupe de l'utilisateur qui l'aura lancé. groupe unix + peut se présenter sous la forme :

    + +
    +
    d'un nom de groupe
    +
    Référence le groupe spécifié par son nom.
    + +
    du caractère # suivi d'un numéro de groupe.
    +
    Référence le groupe spécifié par son numéro.
    +
    + + Exemple + + Group www-group + + + +

    Il est conseillé de créer un groupe dédié à l'exécution du + serveur. Certains administrateurs utilisent l'utilisateur + nobody, mais ce n'est pas toujours souhaitable ou même + possible.

    + + Sécurité +

    Ne définissez pas la directive Group (ou + User) à + root à moins de savoir exactement ce que vous faites + ainsi que les dangers encourus.

    +
    + +
    +VHostGroup +SuexecUserGroup + + + +User +L'utilisateur sous lequel le serveur va traiter les +requêtes +User utilisateur unix +User #-1 +server config + + +

    La directive User permet de définir + l'utilisateur sous lequel le serveur va traiter les requêtes. Pour + utiliser cette directive, le serveur doit avoir été démarré + par root. Si vous démarrez le serveur en tant + qu'utilisateur non root, celui-ci ne pourra pas adopter + l'utilisateur avec privilèges restreints comme utilisateur + d'exécution, et continuera à s'exécuter sous + l'utilisateur qui l'aura lancé. Si vous démarrez le serveur en tant + que root, il est normal que le processus parent + continue à s'exécuter sous root. utilisateur unix peut se + présenter sous la forme :

    + +
    +
    d'un nom d'utilisateur
    +
    Référence l'utilisateur spécifié par son nom.
    + +
    le caractère # suivi d'un numéro d'utilisateur.
    +
    Référence l'utilisateur spécifié par son numéro.
    +
    + +

    L'utilisateur ne doit pas posséder de privilèges qui lui + permettraient d'accéder à des fichiers non destinés au + monde extérieur, et parallèlement, l'utilisateur ne doit pas + exécuter de code dont l'usage soit destiné à un usage autre que les + requêtes HTTP. Il est conseillé de créer un utilisateur et un groupe + dédiés à l'exécution du serveur. Certains administrateurs utilisent + l'utilisateur nobody, mais ce n'est pas toujours + souhaitable, car l'utilisateur nobody peut avoir + diverses utilisations dans le système.

    + + Sécurité +

    Ne définissez pas la directive Group (ou + User) à + root à moins de savoir exactement ce que vous faites + ainsi que les dangers encourus.

    +
    + +
    +VHostUser +SuexecUserGroup +
    + + +ChrootDir +Répertoire dans lequel Apache doit se positionner au +démarrage après avoir effectué un chroot(8). +ChrootDir chemin-répertoire +Non défini +server config +mod_unixd +Disponible depuis la version 2.2.10 d'Apache + + +

    Cette directive fait en sorte que le serveur effectue un + chroot(8) vers le répertoire spécifié après le démarrage, + mais avant d'accepter les requêtes en provenance du réseau.

    +

    Notez que l'exécution du serveur dans un environnement chroot + n'est pas simple et nécessite une configuration particulière, en + particulier si vous utilisez des scripts CGI ou PHP. Il est + conseillé de se familiariser avec l'opération chroot avant d'essayer + d'utiliser cette fonctionnalité.

    +
    +
    + + +Suexec +Active ou désactive la fonctionnalité suEXEC +Suexec On|Off +On si le binaire suexec existe avec les mode et propriétaire +appropriés, Off dans le cas contraire +server config + + +

    Lorsque cette directive est définie à On, le démarrage échouera si + le binaire suexec n'existe pas, ou possède un propriétaire ou mode + fichier invalide.

    +

    Lorsque cette directive est définie à Off, suEXEC sera désactivé, + même si le binaire suexec existe et possède un propriétaire et mode + fichier valides.

    +
    +
    + + diff --git a/docs/manual/mod/mod_unixd.xml.meta b/docs/manual/mod/mod_unixd.xml.meta index d4be6af810f..ba6df1a2b9c 100644 --- a/docs/manual/mod/mod_unixd.xml.meta +++ b/docs/manual/mod/mod_unixd.xml.meta @@ -8,6 +8,7 @@ en - tr + fr + tr diff --git a/docs/manual/mod/mod_unixd.xml.tr b/docs/manual/mod/mod_unixd.xml.tr index 70e4cd7a0d6..f2a92a436e0 100644 --- a/docs/manual/mod/mod_unixd.xml.tr +++ b/docs/manual/mod/mod_unixd.xml.tr @@ -1,10 +1,10 @@ - + -mod_userdir - Apache HTTP Server +mod_userdir - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_userdir

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -39,13 +45,13 @@ -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    UserDir Directive

    @@ -87,7 +93,7 @@ tutorial

    If neither the enabled nor the disabled keywords appear in the - Userdir directive, the argument is treated as a + Userdir directive, the argument is treated as a filename pattern, and is used to turn the name into a directory specification. A request for http://www.example.com/~bob/one/two.html will be @@ -131,24 +137,21 @@ tutorial

    To allow a few users to have UserDir directories, but not anyone else, use the following:

    -

    - UserDir disabled
    - UserDir enabled user1 user2 user3 -

    +
    UserDir disabled
    +UserDir enabled user1 user2 user3
    +

    To allow most users to have UserDir directories, but deny this to a few, use the following:

    -

    - UserDir disabled user4 user5 user6 -

    +
    UserDir disabled user4 user5 user6
    +

    It is also possible to specify alternative user directories. If you use a command like:

    -

    - Userdir public_html /usr/web http://www.example.com/ -

    +
    UserDir "public_html" "/usr/web" "http://www.example.com/"
    +

    With a request for http://www.example.com/~bob/one/two.html, will try to @@ -163,7 +166,7 @@ tutorial

    User directory substitution is not active by default in versions 2.1.4 and later. In earlier versions, UserDir public_html - was assumed if no UserDir + was assumed if no UserDir directive was present.

    Merging details

    @@ -181,10 +184,32 @@ tutorial

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_userdir.html.fr b/docs/manual/mod/mod_userdir.html.fr new file mode 100644 index 00000000000..265ecb12d57 --- /dev/null +++ b/docs/manual/mod/mod_userdir.html.fr @@ -0,0 +1,226 @@ + + + + + +mod_userdir - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_userdir

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + + + +
    Description:Rpertoires propres un utilisateur
    Statut:Base
    IdentificateurdeModule:userdir_module
    FichierSource:mod_userdir.c
    +

    Sommaire

    + +

    Ce module permet l'accs aux rpertoires propres un utilisateur en +utilisant la syntaxe http://example.com/~utilisateur/.

    +
    + + +
    top
    +

    Directive UserDir

    + + + + + + +
    Description:Chemin des rpertoires propres un +utilisateur
    Syntaxe:UserDir nom-rpertoire [nom-rpertoire] ... +
    Contexte:configuration du serveur, serveur virtuel
    Statut:Base
    Module:mod_userdir
    + +

    La directive UserDir permet de dfinir le + rpertoire rel du rpertoire home d'un utilisateur utiliser la + rception d'une requte pour un document de cet utilisateur. + nom-rpertoire peut se prsenter sous la forme suivante + :

    + +
      +
    • Le nom d'un rpertoire ou un modle tel que ceux prsents + ci-dessous.
    • + +
    • Le mot-cl disabled. Toutes les + traductions nom d'utilisateur vers rpertoire sont alors + dsactives, l'exception de celles comportant le mot-cl + enabled (voir ci-dessous).
    • + +
    • Le mot-cl disabled suivi d'une liste de noms + d'utilisateurs spars par des espaces. Les noms d'utilisateurs + apparaissant dans une telle liste ne feront jamais + l'objet d'une traduction vers un rpertoire, mme dans le cas o + ils apparatront dans une clause enabled.
    • + +
    • Le mot-cl enabled suivi d'une liste de noms + d'utilisateurs spars par des espaces. Les noms d'utilisateurs + apparaissant dans une telle liste seront traduits en rpertoires + mme dans le cas o une clause disable globale est active, mais + pas s'ils apparaissent aussi dans une clause + disabled.
    • +
    + +

    Si aucun mot-cl enabled ou disabled + n'apparait dans la directive Userdir, l'argument est + trait en tant que modle de fichier, et utilis pour traduire le + nom d'utilisateur en une spcification de rpertoire. Une requte + pour http://www.example.com/~bob/un/deux.html sera + traduite en :

    + + + + + + + + + + +
    Directive Userdir utiliseChemin traduit
    UserDir public_html~bob/public_html/un/deux.html
    UserDir /usr/web/usr/web/bob/un/deux.html
    UserDir /home/*/www/home/bob/www/un/deux.html
    + +

    Les directives suivantes vont envoyer des redirections au client + :

    + + + + + + + + + + +
    Directive Userdir utiliseChemin traduit
    UserDir http://www.example.com/utilisateurshttp://www.example.com/utilisateurs/bob/un/deux.html
    UserDir http://www.example.com/*/usrhttp://www.example.com/bob/usr/un/deux.html
    UserDir http://www.example.com/~*/http://www.example.com/~bob/un/deux.html
    + +
    + Soyez prudent avec cette directive ; par exemple, + "UserDir ./" ferait correspondre + "/~root" "/" - ce qui n'est + probablement pas souhait. Il est fortement recommand d'inclure + une dclaration "UserDir disabled root" dans votre + configuration. Voir aussi la directive Directory et la page Conseils en matire de + scurit pour plus d'informations. +
    + +

    Exemples supplmentaires :

    + +

    Pour permettre quelques utilisateurs et seulement ceux-ci de + possder des rpertoires UserDir, utilisez la + configuration suivante :

    + +
    UserDir disabled
    +UserDir enabled user1 user2 user3
    + + +

    Pour permettre la plupart des utilisateurs de possder des + rpertoires UserDir, mais l'interdire quelques uns, + utilisez la configuration suivante :

    + +
    UserDir disabled utilisateur4 utilisateur5 utilisateur6
    + + +

    Il est aussi possible de spcifier des rpertoires utilisateurs + alternatifs. Si vous utilisez une commande comme :

    + +
    UserDir "public_html" "/usr/web" "http://www.example.com/"
    + + +

    Avec une requte pour + http://www.example.com/~bob/un/deux.html, le serveur + tentera tout d'abord de trouver la page + ~bob/public_html/un/deux.html, puis + /usr/web/bob/un/deux.html, et enfin il enverra une + redirection vers + http://www.example.com/bob/un/deux.html.

    + +

    Si vous spcifiez une redirection, elle doit tre la dernire + alternative de la liste. Apache httpd ne pouvant pas dterminer si la + redirection a russi, si cette dernire ne se trouve pas en fin de + liste, c'est cette alternative qui sera toujours utilise.

    + +

    La substitution de rpertoire utilisateur n'est pas active par + dfaut depuis la version 2.1.4. Dans les versions prcdentes, + UserDir public_html tait sous-entendu si aucune + directive UserDir + n'tait prsente.

    + +

    Dtails propos de la fusion

    +

    Lorsqu'on passe du contexte global au contexte de serveur + virtuel, les listes d'utilisateurs spcifiques activs ou dsactivs + sont remplaces par les listes du contexte, et non fusionnes.

    + + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_userdir.html.ja.utf8 b/docs/manual/mod/mod_userdir.html.ja.utf8 index f86476fd4ec..8e678b7d790 100644 --- a/docs/manual/mod/mod_userdir.html.ja.utf8 +++ b/docs/manual/mod/mod_userdir.html.ja.utf8 @@ -1,34 +1,41 @@ - -mod_userdir - Apache HTTP サーバ +mod_userdir - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_userdir

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -44,13 +51,13 @@ -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    UserDir ディレクティブ

    @@ -82,8 +89,8 @@ enabled 節にあったとしても、 決してディレクトリ変換は行われません。 -
  • enebled キーワードとスペース区切りのユーザ名リスト。 - 全体では変換が無効になっていたといたとしても、 +
  • enabled キーワードとスペース区切りのユーザ名リスト。 + 全体では変換が無効になっていたとしても、 これらのユーザ名にはディレクトリ変換が行われます。 ただし、disabled 節にもあれば変換はされません。
  • @@ -180,11 +187,33 @@ Apache はリダイレクトが成功するかどうかを決めることはで
    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_userdir.html.ko.euc-kr b/docs/manual/mod/mod_userdir.html.ko.euc-kr index 2403a2a45d6..77bad7897b3 100644 --- a/docs/manual/mod/mod_userdir.html.ko.euc-kr +++ b/docs/manual/mod/mod_userdir.html.ko.euc-kr @@ -1,27 +1,33 @@ - -mod_userdir - Apache HTTP Server +mod_userdir - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_userdir

    +
  • Comments
  • top

    UserDir þ

    @@ -154,10 +160,32 @@ http://www.foo.com/bob/one/two.html
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_userdir.html.tr.utf8 b/docs/manual/mod/mod_userdir.html.tr.utf8 index bddab72fa6b..1e67ed0dabf 100644 --- a/docs/manual/mod/mod_userdir.html.tr.utf8 +++ b/docs/manual/mod/mod_userdir.html.tr.utf8 @@ -1,32 +1,37 @@ - -mod_userdir - Apache HTTP Sunucusu +mod_userdir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_userdir

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:ユーザ専用のディレクトリを提供
    ステータス:Base
    @@ -34,14 +39,14 @@

    Özet

    Bu modül kullanıcılara özel dizinlere - http://mesela.dom/~kullanıcı/ sözdizimi kullanılarak + http://example.com/~kullanıcı/ sözdizimi kullanılarak erişilebilmesini mümkün kılar.

    Yönergeler

    -

    Ayrıca bakınız:

    +

    Bugfix checklist

    Ayrıca bakınız:

    +
  • Yorum
  • top

    UserDir Yönergesi

    @@ -84,10 +89,10 @@ listede yer alan dizinlere dönüşüm uygulanır. -

    Userdir yönergesinde ne enabled ne de +

    Userdir yönergesinde ne enabled ne de disabled varsa, argüman bir dosya ismi kalıbı olarak ele alınır ve kullanıcı belge kök dizininin yolunu oluşturmakta kullanılır. - http://mesela.dom/~ali/bir/iki.html şöyle dönüştürülür:

    + http://example.com/~ali/bir/iki.html şöyle dönüştürülür:

    Açıklama:Kullanıcılara özel dizinler
    Durum:Temel
    Modül Betimleyici:userdir_module
    @@ -105,12 +110,12 @@
    Kullanılan UserDir yönergesi    
    - - - - - - + + + + + +
    Kullanılan UserDir yönergesi     Elde edilen yönlendirme
    UserDir http://mesela.dom/usershttp://mesela.dom/users/ali/bir/iki.html
    UserDir http://mesela.dom/*/usrhttp://mesela.dom/ali/usr/bir/iki.html
    UserDir http://mesela.dom/~*/http://mesela.dom/~ali/bir/iki.html
    UserDir http://example.com/usershttp://example.com/users/ali/bir/iki.html
    UserDir http://example.com/*/usrhttp://example.com/ali/usr/bir/iki.html
    UserDir http://example.com/~*/http://example.com/~ali/bir/iki.html
    @@ -128,56 +133,81 @@

    Bir kaç kullanıcı hariç kalan herkesin UserDir dizinlerini iptal etmek için şunu yapabilirsiniz:

    -

    - UserDir disabled
    - UserDir enabled birey1 birey2 birey3 -

    +
    UserDir disabled
    +UserDir enabled birey1 birey2 birey3
    +

    Bir kaç kullanıcı hariç kalan herkesin UserDir dizinlerini etkin kılmak için şunu yapabilirsiniz:

    -

    - UserDir disabled birey4 birey5 birey6 -

    +
    UserDir disabled birey4 birey5 birey6
    +

    Birden fazla dizin belirtmek de mümkündür:

    -

    - Userdir public_html /usr/siteler http://mesela.dom/ -

    +
    Userdir "public_html" "/usr/siteler" "http://example.com/"
    -

    Bu örneğe göre, http://mesela.dom/~ali/bir/iki.html + +

    Bu örneğe göre, http://example.com/~ali/bir/iki.html şeklinde bir istek alındığında sunucu önce - http://mesela.dom/~ali/bir/iki.html yönlendirmesini + http://example.com/~ali/bir/iki.html yönlendirmesini deneyecektir. Onu bulamazsa isteği /usr/siteler/ali/bir/iki.html dosyasını arayacak onu da - bulamazsa istemciyi http://mesela.dom/ali/bir/iki.html + bulamazsa istemciyi http://example.com/ali/bir/iki.html adresine yönlendirecektir.

    Argüman listesine bir yönlendirme ekleyecekseniz, bu, listenin son - elemanı olmalıdır. Apache yönlendirmenin başarılı sonuç verip + elemanı olmalıdır. Apache httpd yönlendirmenin başarılı sonuç verip vermediğini bilemeyecektir. Bu bakımdan, listede bu yönlendirmeden sonra bir yönlendirme daha bulunması daha iyi olacaktır.

    Kullanıcı dizini dönüşümü Apache 2.1.4 sürümü ve sonrasında öntanımlı - olarak etkin değildir. Daha önceki sürümlerde bir UserDir yönergesinin yokluğunda + olarak etkin değildir. Daha önceki sürümlerde bir + UserDir yönergesinin yokluğunda UserDir public_html öntanımlıydı.

    +

    Ayrıntıların birleştirilmesi

    +

    Etkinleştirilen ve etkisizleştirilen kullanıcılara özgü listeler küresel + etki alanından sanal konak etki alanına aktarılırken yer değiştirme + yapılır, mevcutla birleştirilmez.

    +

    Ayrıca bakınız:

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_userdir.xml b/docs/manual/mod/mod_userdir.xml index 4937aa9733e..d30cd819fb8 100644 --- a/docs/manual/mod/mod_userdir.xml +++ b/docs/manual/mod/mod_userdir.xml @@ -78,7 +78,7 @@ host

    If neither the enabled nor the disabled keywords appear in the - Userdir directive, the argument is treated as a + Userdir directive, the argument is treated as a filename pattern, and is used to turn the name into a directory specification. A request for http://www.example.com/~bob/one/two.html will be @@ -124,24 +124,24 @@ host

    To allow a few users to have UserDir directories, but not anyone else, use the following:

    - - UserDir disabled
    - UserDir enabled user1 user2 user3 -
    + +UserDir disabled +UserDir enabled user1 user2 user3 +

    To allow most users to have UserDir directories, but deny this to a few, use the following:

    - + UserDir disabled user4 user5 user6 - +

    It is also possible to specify alternative user directories. If you use a command like:

    - - Userdir public_html /usr/web http://www.example.com/ - + + UserDir "public_html" "/usr/web" "http://www.example.com/" +

    With a request for http://www.example.com/~bob/one/two.html, will try to @@ -156,7 +156,7 @@ host

    User directory substitution is not active by default in versions 2.1.4 and later. In earlier versions, UserDir public_html - was assumed if no UserDir + was assumed if no UserDir directive was present.

    Merging details diff --git a/docs/manual/mod/mod_userdir.xml.fr b/docs/manual/mod/mod_userdir.xml.fr new file mode 100644 index 00000000000..ab23b5ff83e --- /dev/null +++ b/docs/manual/mod/mod_userdir.xml.fr @@ -0,0 +1,188 @@ + + + + + + + + + + + +mod_userdir +Répertoires propres à un utilisateur +Base +mod_userdir.c +userdir_module + + +

    Ce module permet l'accès aux répertoires propres à un utilisateur en +utilisant la syntaxe http://example.com/~utilisateur/.

    +
    + +Mise en correspondance des URLs +avec le système de fichiers +Tutoriel +public_html + + + +UserDir +Chemin des répertoires propres à un +utilisateur +UserDir nom-répertoire [nom-répertoire] ... + +server config +virtual host + + + +

    La directive UserDir permet de définir le + répertoire réel du répertoire home d'un utilisateur à utiliser à la + réception d'une requête pour un document de cet utilisateur. + nom-répertoire peut se présenter sous la forme suivante + :

    + +
      +
    • Le nom d'un répertoire ou un modèle tel que ceux présentés + ci-dessous.
    • + +
    • Le mot-clé disabled. Toutes les + traductions nom d'utilisateur vers répertoire sont alors + désactivées, à l'exception de celles comportant le mot-clé + enabled (voir ci-dessous).
    • + +
    • Le mot-clé disabled suivi d'une liste de noms + d'utilisateurs séparés par des espaces. Les noms d'utilisateurs + apparaissant dans une telle liste ne feront jamais + l'objet d'une traduction vers un répertoire, même dans le cas où + ils apparaîtront dans une clause enabled.
    • + +
    • Le mot-clé enabled suivi d'une liste de noms + d'utilisateurs séparés par des espaces. Les noms d'utilisateurs + apparaissant dans une telle liste seront traduits en répertoires + même dans le cas où une clause disable globale est active, mais + pas s'ils apparaissent aussi dans une clause + disabled.
    • +
    + +

    Si aucun mot-clé enabled ou disabled + n'apparait dans la directive Userdir, l'argument est + traité en tant que modèle de fichier, et utilisé pour traduire le + nom d'utilisateur en une spécification de répertoire. Une requête + pour http://www.example.com/~bob/un/deux.html sera + traduite en :

    + + + + + + + + + + +
    Directive Userdir utiliséeChemin traduit
    UserDir public_html~bob/public_html/un/deux.html
    UserDir /usr/web/usr/web/bob/un/deux.html
    UserDir /home/*/www/home/bob/www/un/deux.html
    + +

    Les directives suivantes vont envoyer des redirections au client + :

    + + + + + + + + + + +
    Directive Userdir utiliséeChemin traduit
    UserDir http://www.example.com/utilisateurshttp://www.example.com/utilisateurs/bob/un/deux.html
    UserDir http://www.example.com/*/usrhttp://www.example.com/bob/usr/un/deux.html
    UserDir http://www.example.com/~*/http://www.example.com/~bob/un/deux.html
    + + + Soyez prudent avec cette directive ; par exemple, + "UserDir ./" ferait correspondre + "/~root" à "/" - ce qui n'est + probablement pas souhaité. Il est fortement recommandé d'inclure + une déclaration "UserDir disabled root" dans votre + configuration. Voir aussi la directive Directory et la page Conseils en matière de + sécurité pour plus d'informations. + + +

    Exemples supplémentaires :

    + +

    Pour permettre à quelques utilisateurs et seulement à ceux-ci de + posséder des répertoires UserDir, utilisez la + configuration suivante :

    + + +UserDir disabled +UserDir enabled user1 user2 user3 + + +

    Pour permettre à la plupart des utilisateurs de posséder des + répertoires UserDir, mais l'interdire à quelques uns, + utilisez la configuration suivante :

    + + + UserDir disabled utilisateur4 utilisateur5 utilisateur6 + + +

    Il est aussi possible de spécifier des répertoires utilisateurs + alternatifs. Si vous utilisez une commande comme :

    + + + UserDir "public_html" "/usr/web" "http://www.example.com/" + + +

    Avec une requête pour + http://www.example.com/~bob/un/deux.html, le serveur + tentera tout d'abord de trouver la page à + ~bob/public_html/un/deux.html, puis à + /usr/web/bob/un/deux.html, et enfin il enverra une + redirection vers + http://www.example.com/bob/un/deux.html.

    + +

    Si vous spécifiez une redirection, elle doit être la dernière + alternative de la liste. Apache httpd ne pouvant pas déterminer si la + redirection a réussi, si cette dernière ne se trouve pas en fin de + liste, c'est cette alternative qui sera toujours utilisée.

    + +

    La substitution de répertoire utilisateur n'est pas activée par + défaut depuis la version 2.1.4. Dans les versions précédentes, + UserDir public_html était sous-entendu si aucune + directive UserDir + n'était présente.

    + + Détails à propos de la fusion +

    Lorsqu'on passe du contexte global au contexte de serveur + virtuel, les listes d'utilisateurs spécifiques activés ou désactivés + sont remplacées par les listes du contexte, et non fusionnées.

    + +
    + + + Tutoriel sur les répertoires web + utilisateur + + +
    +
    + + diff --git a/docs/manual/mod/mod_userdir.xml.ja b/docs/manual/mod/mod_userdir.xml.ja index f711e93f851..e4f58a2b46d 100644 --- a/docs/manual/mod/mod_userdir.xml.ja +++ b/docs/manual/mod/mod_userdir.xml.ja @@ -1,7 +1,7 @@ - + + + -mod_usertrack - Apache HTTP Server +mod_usertrack - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_usertrack

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Description: Clickstream logging of user activity on a site @@ -34,7 +40,10 @@

    Provides tracking of a user through your website via browser cookies.

    -

    Directives

    +

    Topics

    +

    Directives

    -

    Topics

    -
    +

    Bugfix checklist

    See also

    +
    top

    Logging

    @@ -54,10 +62,9 @@

    mod_usertrack sets a cookie which can be logged via mod_log_config configurable logging formats:

    -

    - LogFormat "%{Apache}n %r %t" usertrack
    - CustomLog logs/clickstream.log usertrack -

    +
    LogFormat "%{Apache}n %r %t" usertrack
    +CustomLog logs/clickstream.log usertrack
    +
    top
    @@ -92,9 +99,8 @@ level domain (for example .example.co.uk). -

    - CookieDomain .example.com -

    +
    CookieDomain .example.com
    +
    top
    @@ -118,9 +124,8 @@

    If this directive is not used, cookies last only for the current browser session.

    -

    - CookieExpires "3 weeks" -

    +
    CookieExpires "3 weeks"
    +
    top
    @@ -142,9 +147,8 @@ unpredictable if you use a name containing unusual characters. Valid characters include A-Z, a-z, 0-9, "_", and "-".

    -

    - CookieName clicktrack -

    +
    CookieName clicktrack
    +
    top
    @@ -180,9 +184,8 @@ three of these formats, with Cookie2 being the preferred format.

    -

    - CookieStyle Cookie2 -

    +
    CookieStyle Cookie2
    +
    top
    @@ -204,16 +207,37 @@ mod_usertrack will not activate cookies.

    -

    - CookieTracking on -

    +
    CookieTracking on
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_usertrack.html.fr b/docs/manual/mod/mod_usertrack.html.fr new file mode 100644 index 00000000000..80276d80dd8 --- /dev/null +++ b/docs/manual/mod/mod_usertrack.html.fr @@ -0,0 +1,251 @@ + + + + + +mod_usertrack - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_usertrack

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    Description: +Journalisation Clickstream des liens parcourus par un +utilisateur sur un site +
    Statut:Extension
    IdentificateurdeModule:usertrack_module
    FichierSource:mod_usertrack.c
    +

    Sommaire

    + +

    Ce module permet de suivre le parcours d'un utilisateur travers + votre site web en faisant appel aux cookies de navigateur.

    +
    + +
    top
    +
    +

    Journalisation

    + + +

    mod_usertrack dfinit un cookie qui peut tre + journalis via les formats configurables du module + mod_log_config :

    + +
    LogFormat "%{Apache}n %r %t" usertrack
    +CustomLog logs/clickstream.log usertrack
    + + + +
    +
    top
    +

    Directive CookieDomain

    + + + + + + + +
    Description:Le domaine auquel le cookie traceur +s'applique
    Syntaxe:CookieDomain domaine
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_usertrack
    + +

    Cette directive permet de dfinir le domaine auquel le cookie + traceur s'applique. Si elle n'est pas prsente, aucun domaine n'est + inclus dans le champ d'en-tte cookie.

    + +

    La chane dommaine doit commencer par un point, + et doit comporter au moins un point entour + d'autres caractres. Par exemple, .example.com est + une chane valide, mais www.example.com et + .com ne le sont pas.

    + +
    La plupart des navigateurs utiliss actuellement n'autorisent + pas la dfinition de cookies pour un domaine racine de deux niveaux, + tel que .co.uk, bien qu'un tel domaine remplisse les + conditions de validit dcrites ci-dessus.
    + + Ces domaines sont quivalents des domaines racines comme + .com, et autoriser de tels cookies peut constituer un + risque en matire de scurit. Ainsi, si vous vous situez sous un + domaine racine de deux niveaux, vous devez encore utiliser votre + domaine vritable, comme vous le feriez avec tout autre domaine + racine (par exemple .example.co.uk). +
    + +
    CookieDomain .example.com
    + + +
    +
    top
    +

    Directive CookieExpires

    + + + + + + + +
    Description:Dure avant expiration du cookie traceur
    Syntaxe:CookieExpires dure
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_usertrack
    +

    Lorsqu'elle est utilise, cette directive dfinit une dure avant + l'expiration du cookie gnr par le module usertrack. La + dure peut tre spcifie sous la forme d'un nombre de + secondes, ou sous une forme du + style "2 weeks 3 days 7 hours". les termes valides sont : years, + months, weeks, days, hours, minutes et seconds. Si la dure est + spcifie dans un format autre qu'un nombre de secondes, elle doit + tre entoure de guillemets.

    + +

    Si cette directive est absente, la dure de vie des cookies est + limite la session actuelle du navigateur.

    + +
    CookieExpires "3 weeks"
    + + +
    +
    top
    +

    Directive CookieName

    + + + + + + + + +
    Description:Nom du cookie traceur
    Syntaxe:CookieName symbole
    Dfaut:CookieName Apache
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_usertrack
    +

    Cette directive vous permet de modifier le nom du cookie que ce + module utilise pour sa journalisation. Le nom par dfaut du cookie + est "Apache".

    + +

    Vous devez spcifier un nom de cookie valide ; les rsultats sont + imprvisibles si vous utilisez un nom contenant des caractres + inhabituels. Les caractres valides font partie des intervales A-Z, + a-z, 0-9, "_", et "-".

    + +
    CookieName clicktrack
    + + +
    +
    top
    +

    Directive CookieStyle

    + + + + + + + + +
    Description:Format du champ d'en-tte cookie
    Syntaxe:CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965
    Dfaut:CookieStyle Netscape
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_usertrack
    +

    Cette directive permet de contrler le format du champ d'en-tte + cookie. Les trois formats autoriss sont :

    + +
      +
    • Netscape : il s'agit du format original, mais + est dsormais obsolte. C'est le format par dfaut et il + correspond la syntaxe historique utilise par Apache.
    • + +
    • Cookie ou RFC2109 : c'est la + syntaxe qui remplace la syntaxe Netscape.
    • + +
    • Cookie2 ou RFC2965 : c'est + la syntaxe de cookie la plus actuelle.
    • +
    + +

    Tous les clients ne supportent pas l'ensemble de ces formats, + mais il est conseill d'utiliser le plus rcent qui sera en gnral + support par le navigateur utilis par vos utilisateurs. A l'heure o ce + document est crit, la plupart des navigateurs supportent ces trois + formats, Cookie2 tant le format recommand.

    + +
    CookieStyle Cookie2
    + + +
    +
    top
    +

    Directive CookieTracking

    + + + + + + + + +
    Description:Active le cookie traceur
    Syntaxe:CookieTracking on|off
    Dfaut:CookieTracking off
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:FileInfo
    Statut:Extension
    Module:mod_usertrack
    +

    Lorsque le module mod_usertrack est charg, et + si CookieTracking on est dfinie, Apache enverra un + cookie traceur pour toute nouvelle requte. Cette directive peut + tre utilise pour activer ou dsactiver ce comportement pour un + serveur virtuel ou un rpertoire. Par dfaut, l'activation de + mod_usertrack ne suffit pas pour + activer les cookies.

    + +
    CookieTracking on
    + + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_usertrack.xml b/docs/manual/mod/mod_usertrack.xml index 173fd1ba75f..acaf6b3be81 100644 --- a/docs/manual/mod/mod_usertrack.xml +++ b/docs/manual/mod/mod_usertrack.xml @@ -41,10 +41,10 @@

    mod_usertrack sets a cookie which can be logged via mod_log_config configurable logging formats:

    - - LogFormat "%{Apache}n %r %t" usertrack
    - CustomLog logs/clickstream.log usertrack -
    + +LogFormat "%{Apache}n %r %t" usertrack +CustomLog logs/clickstream.log usertrack + @@ -83,9 +83,9 @@ level domain (for example .example.co.uk). - + CookieDomain .example.com - + @@ -114,9 +114,9 @@

    If this directive is not used, cookies last only for the current browser session.

    - + CookieExpires "3 weeks" - + @@ -142,9 +142,9 @@ unpredictable if you use a name containing unusual characters. Valid characters include A-Z, a-z, 0-9, "_", and "-".

    - + CookieName clicktrack - + @@ -185,9 +185,9 @@ three of these formats, with Cookie2 being the preferred format.

    - + CookieStyle Cookie2 - + @@ -215,9 +215,9 @@ mod_usertrack will not activate cookies.

    - + CookieTracking on - + diff --git a/docs/manual/mod/mod_usertrack.xml.fr b/docs/manual/mod/mod_usertrack.xml.fr new file mode 100644 index 00000000000..1bcb8d3e9e8 --- /dev/null +++ b/docs/manual/mod/mod_usertrack.xml.fr @@ -0,0 +1,235 @@ + + + + + + + + + + +mod_usertrack + +Journalisation Clickstream des liens parcourus par un +utilisateur sur un site + +Extension +mod_usertrack.c +usertrack_module + + +

    Ce module permet de suivre le parcours d'un utilisateur à travers + votre site web en faisant appel aux cookies de navigateur.

    +
    + + +
    +Journalisation + +

    mod_usertrack définit un cookie qui peut être + journalisé via les formats configurables du module + mod_log_config :

    + + +LogFormat "%{Apache}n %r %t" usertrack +CustomLog logs/clickstream.log usertrack + + + +
    + + +CookieDomain +Le domaine auquel le cookie traceur +s'applique +CookieDomain domaine + +server config +virtual host +directory +.htaccess + +FileInfo + + + +

    Cette directive permet de définir le domaine auquel le cookie + traceur s'applique. Si elle n'est pas présente, aucun domaine n'est + inclus dans le champ d'en-tête cookie.

    + +

    La chaîne dommaine doit commencer par un point, + et doit comporter au moins un point entouré + d'autres caractères. Par exemple, .example.com est + une chaîne valide, mais www.example.com et + .com ne le sont pas.

    + + La plupart des navigateurs utilisés actuellement n'autorisent + pas la définition de cookies pour un domaine racine de deux niveaux, + tel que .co.uk, bien qu'un tel domaine remplisse les + conditions de validité décrites ci-dessus.
    + + Ces domaines sont équivalents à des domaines racines comme + .com, et autoriser de tels cookies peut constituer un + risque en matière de sécurité. Ainsi, si vous vous situez sous un + domaine racine de deux niveaux, vous devez encore utiliser votre + domaine véritable, comme vous le feriez avec tout autre domaine + racine (par exemple .example.co.uk). +
    + + + CookieDomain .example.com + +
    +
    + + + +CookieExpires +Durée avant expiration du cookie traceur +CookieExpires durée + +server config +virtual host +directory +.htaccess + +FileInfo + + +

    Lorsqu'elle est utilisée, cette directive définit une durée avant + l'expiration du cookie généré par le module usertrack. La + durée peut être spécifiée sous la forme d'un nombre de + secondes, ou sous une forme du + style "2 weeks 3 days 7 hours". les termes valides sont : years, + months, weeks, days, hours, minutes et seconds. Si la durée est + spécifiée dans un format autre qu'un nombre de secondes, elle doit + être entourée de guillemets.

    + +

    Si cette directive est absente, la durée de vie des cookies est + limitée à la session actuelle du navigateur.

    + + + CookieExpires "3 weeks" + +
    +
    + + +CookieName +Nom du cookie traceur +CookieName symbole +CookieName Apache + +server config +virtual host +directory +.htaccess + +FileInfo + + +

    Cette directive vous permet de modifier le nom du cookie que ce + module utilise pour sa journalisation. Le nom par défaut du cookie + est "Apache".

    + +

    Vous devez spécifier un nom de cookie valide ; les résultats sont + imprévisibles si vous utilisez un nom contenant des caractères + inhabituels. Les caractères valides font partie des intervales A-Z, + a-z, 0-9, "_", et "-".

    + + + CookieName clicktrack + +
    + +
    + + +CookieStyle +Format du champ d'en-tête cookie +CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 +CookieStyle Netscape + +server config +virtual host +directory +.htaccess + +FileInfo + + +

    Cette directive permet de contrôler le format du champ d'en-tête + cookie. Les trois formats autorisés sont :

    + +
      +
    • Netscape : il s'agit du format original, mais + est désormais obsolète. C'est le format par défaut et il + correspond à la syntaxe historique utilisée par Apache.
    • + +
    • Cookie ou RFC2109 : c'est la + syntaxe qui remplace la syntaxe Netscape.
    • + +
    • Cookie2 ou RFC2965 : c'est + la syntaxe de cookie la plus actuelle.
    • +
    + +

    Tous les clients ne supportent pas l'ensemble de ces formats, + mais il est conseillé d'utiliser le plus récent qui sera en général + supporté par le navigateur utilisé par vos utilisateurs. A l'heure où ce + document est écrit, la plupart des navigateurs supportent ces trois + formats, Cookie2 étant le format recommandé.

    + + + CookieStyle Cookie2 + +
    +
    + + + + +CookieTracking +Active le cookie traceur +CookieTracking on|off +CookieTracking off + +server config +virtual host +directory +.htaccess + +FileInfo + + +

    Lorsque le module mod_usertrack est chargé, et + si CookieTracking on est définie, Apache enverra un + cookie traceur pour toute nouvelle requête. Cette directive peut + être utilisée pour activer ou désactiver ce comportement pour un + serveur virtuel ou un répertoire. Par défaut, l'activation de + mod_usertrack ne suffit pas pour + activer les cookies.

    + + + CookieTracking on + + +
    +
    + +
    diff --git a/docs/manual/mod/mod_usertrack.xml.meta b/docs/manual/mod/mod_usertrack.xml.meta index ee41117f20d..8a7ae2254a2 100644 --- a/docs/manual/mod/mod_usertrack.xml.meta +++ b/docs/manual/mod/mod_usertrack.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mod_version.html.en b/docs/manual/mod/mod_version.html.en index 8d6e25b96f7..a9ca11cd09e 100644 --- a/docs/manual/mod/mod_version.html.en +++ b/docs/manual/mod/mod_version.html.en @@ -1,23 +1,28 @@ - -mod_version - Apache HTTP Server +mod_version - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_version

    @@ -28,8 +33,7 @@ - -
    Description:Version dependent configuration
    Status:Extension
    ModuleIdentifier:version_module
    SourceFile:mod_version.c
    Compatibility:Available in version 2.0.56 and later
    +
    SourceFile:mod_version.c

    Summary

    This module is designed for the use in test suites and large @@ -38,19 +42,14 @@ allows a flexible version checking including numeric comparisons and regular expressions.

    -

    Examples

    - <IfVersion 2.1.0>
    - - # current httpd version is exactly 2.1.0
    -
    - </IfVersion>
    -
    - <IfVersion >= 2.2>
    - - # use really new features :-)
    -
    - </IfVersion> -

    +

    Examples

    <IfVersion 2.4.2>
    +    # current httpd version is exactly 2.4.2
    +</IfVersion>
    +
    +<IfVersion >= 2.5>
    +    # use really new features :-)
    +</IfVersion>
    +

    See below for further possibilities.

    @@ -58,7 +57,9 @@ -
    +

    Bugfix checklist

    See also

    +
    top

    <IfVersion> Directive

    @@ -95,14 +96,11 @@ httpd version is less or equal -

    Example

    - <IfVersion >= 2.1>
    - - # this happens only in versions greater or
    - # equal 2.1.0.
    -
    - </IfVersion> -

    +

    Example

    <IfVersion >= 2.3>
    +    # this happens only in versions greater or
    +    # equal 2.3.0.
    +</IfVersion>
    +

    Besides the numerical comparison it is possible to match a regular expression @@ -117,24 +115,18 @@ regex -

    Example

    - <IfVersion = /^2.1.[01234]$/>
    - - # e.g. workaround for buggy versions - - </IfVersion> -

    +

    Example

    <IfVersion = /^2.4.[01234]$/>
    +    # e.g. workaround for buggy versions
    +</IfVersion>
    +

    In order to reverse the meaning, all operators can be preceded by an exclamation mark (!):

    -

    - <IfVersion !~ ^2.1.[01234]$>
    - - # not for those versions
    -
    - </IfVersion> -

    +
    <IfVersion !~ ^2.4.[01234]$>
    +    # not for those versions
    +</IfVersion>
    +

    If the operator is omitted, it is assumed to be =.

    @@ -145,7 +137,28 @@

    Available Languages:  en  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_version.html.ja.utf8 b/docs/manual/mod/mod_version.html.ja.utf8 index 40daffe3d3b..2f81d933d59 100644 --- a/docs/manual/mod/mod_version.html.ja.utf8 +++ b/docs/manual/mod/mod_version.html.ja.utf8 @@ -1,38 +1,39 @@ - -mod_version - Apache HTTP サーバ +mod_version - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache モジュール mod_version

    -

    言語:  en  | +

    翻訳済み言語:  en  |  ja  |  ko 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    - -
    説明:バージョン依存の設定
    ステータス:Extension
    モジュール識別子:version_module
    ソースファイル:mod_version.c
    互換性:バージョン 2.0.56 以降
    +ソースファイル:mod_version.c

    概要

    様々なバージョンの httpd の異なる設定を扱うことになる、 @@ -41,19 +42,14 @@ 提供します。これを使うと、数字の比較や正規表現による柔軟な バージョンチェックができるようになります。

    -

    - <IfVersion 2.1.0>
    - - # current httpd version is exactly 2.1.0
    -
    - </IfVersion>
    -
    - <IfVersion >= 2.2>
    - - # use really new features :-)
    -
    - </IfVersion> -

    +

    <IfVersion 2.4.2>
    +    # current httpd version is exactly 2.4.2
    +</IfVersion>
    +
    +<IfVersion >= 2.5>
    +    # use really new features :-)
    +</IfVersion>
    +

    詳細は以下を読んでください。

    @@ -61,7 +57,9 @@ -
    +

    Bugfix checklist

    参照

    +
    top

    <IfVersion> ディレクティブ

    @@ -96,14 +94,11 @@ 指定以下の httpd バージョン -

    - <IfVersion >= 2.1>
    - - # this happens only in versions greater or
    - # equal 2.1.0.
    -
    - </IfVersion> -

    +

    <IfVersion >= 2.3>
    +    # this happens only in versions greater or
    +    # equal 2.3.0.
    +</IfVersion>
    +

    数値比較に加えて、http のバージョン番号に対して 正規表現による @@ -118,24 +113,18 @@ regex 形式 -

    - <IfVersion = /^2.1.[01234]$/>
    - - # e.g. workaround for buggy versions - - </IfVersion> -

    +

    <IfVersion = /^2.4.[01234]$/>
    +    # e.g. workaround for buggy versions
    +</IfVersion>
    +

    マッチングの否定を表現するために、すべてのオペレータは前に 感嘆符 (!)を付けることができます:

    -

    - <IfVersion !~ ^2.1.[01234]$>
    - - # not for those versions
    -
    - </IfVersion> -

    +
    <IfVersion !~ ^2.4.[01234]$>
    +    # not for those versions
    +</IfVersion>
    +

    operator が省略されたときは = と みなされます。

    @@ -143,10 +132,31 @@
    -

    言語:  en  | +

    翻訳済み言語:  en  |  ja  |  ko 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_version.html.ko.euc-kr b/docs/manual/mod/mod_version.html.ko.euc-kr index 870b53ad852..29be07313cd 100644 --- a/docs/manual/mod/mod_version.html.ko.euc-kr +++ b/docs/manual/mod/mod_version.html.ko.euc-kr @@ -1,23 +1,28 @@ - -mod_version - Apache HTTP Server +mod_version - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    ġ mod_version

    @@ -60,7 +65,9 @@ -
    +

    Bugfix checklist

    +
    top

    <IfVersion> þ

    @@ -144,7 +151,28 @@

    :  en  |  ja  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_version.xml b/docs/manual/mod/mod_version.xml index 3b6b41a3b17..00bd288a40a 100644 --- a/docs/manual/mod/mod_version.xml +++ b/docs/manual/mod/mod_version.xml @@ -26,7 +26,6 @@ Extension mod_version.c version_module -Available in version 2.0.56 and later

    This module is designed for the use in test suites and large @@ -37,17 +36,15 @@ regular expressions.

    Examples - <IfVersion 2.1.0>
    - - # current httpd version is exactly 2.1.0
    -
    - </IfVersion>
    -
    - <IfVersion >= 2.2>
    - - # use really new features :-)
    -
    - </IfVersion> + +<IfVersion 2.4.2> + # current httpd version is exactly 2.4.2 +</IfVersion> + +<IfVersion >= 2.5> + # use really new features :-) +</IfVersion> +

    See below for further possibilities.

    @@ -89,12 +86,12 @@ Example - <IfVersion >= 2.1>
    - - # this happens only in versions greater or
    - # equal 2.1.0.
    -
    - </IfVersion> + +<IfVersion >= 2.3> + # this happens only in versions greater or + # equal 2.3.0. +</IfVersion> +

    Besides the numerical comparison it is possible to match a @@ -112,23 +109,21 @@ Example - <IfVersion = /^2.1.[01234]$/>
    - - # e.g. workaround for buggy versions - - </IfVersion> + +<IfVersion = /^2.4.[01234]$/> + # e.g. workaround for buggy versions +</IfVersion> +

    In order to reverse the meaning, all operators can be preceded by an exclamation mark (!):

    - - <IfVersion !~ ^2.1.[01234]$>
    - - # not for those versions
    -
    - </IfVersion> -
    + +<IfVersion !~ ^2.4.[01234]$> + # not for those versions +</IfVersion> +

    If the operator is omitted, it is assumed to be =.

    diff --git a/docs/manual/mod/mod_version.xml.ja b/docs/manual/mod/mod_version.xml.ja index 87834fedbc4..ef1073fc30c 100644 --- a/docs/manual/mod/mod_version.xml.ja +++ b/docs/manual/mod/mod_version.xml.ja @@ -1,7 +1,7 @@ - + + -mod_vhost_alias - Apache HTTP Server +mod_vhost_alias - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_vhost_alias

    Available Languages:  en  | + fr  |  tr 

    /cgi-bin/script.pl to /usr/local/apache2/cgi-bin/script.pl in all cases:

    -

    - ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
    - VirtualScriptAlias /never/found/%0/cgi-bin/ -

    +
    ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"
    +VirtualScriptAlias "/never/found/%0/cgi-bin/"
    + -
    top

    Directory Name Interpolation

    @@ -140,10 +145,9 @@ hosting

    For simple name-based virtual hosts you might use the following directives in your server configuration file:

    -

    - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/vhosts/%0 -

    +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/vhosts/%0"
    +

    A request for http://www.example.com/directory/file.html will be @@ -156,10 +160,9 @@ hosting vhosts directory. To do this you might use the following in your configuration file:

    -

    - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2 -

    +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2"
    +

    A request for http://www.domain.example.com/directory/file.html @@ -169,30 +172,45 @@ hosting

    A more even spread of files can be achieved by hashing from the end of the name, for example:

    -

    - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2 -

    +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2"
    +

    The example request would come from /usr/local/apache/vhosts/example.com/n/i/a/domain/directory/file.html.

    Alternatively you might use:

    -

    - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+ -

    +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+"
    +

    The example request would come from /usr/local/apache/vhosts/example.com/d/o/m/ain/directory/file.html.

    +

    A very common request by users is the ability to point multiple domains to multiple +document roots without having to worry about the length or number of parts of the +hostname being requested. If the requested hostname is sub.www.domain.example.com + instead of simply www.domain.example.com, then using %3+ will result in the document +root being /usr/local/apache/vhosts/domain.example.com/... instead of the +intended example.com directory. In such cases, it can be beneficial to use +the combination %-2.0.%-1.0, which will always yield the domain name and the +tld, for example example.com regardless of the number of subdomains appended +to the hostname. As such, one can make a configuration that will direct all first, second +or third level subdomains to the same directory: +

    +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"
    + +

    +In the example above, both www.example.com as well as www.sub.example.com +or example.com will all point to /usr/local/apache/vhosts/example.com. +

    +

    For IP-based virtual hosting you might use the following in your configuration file:

    -

    - UseCanonicalName DNS
    - VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs
    - VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin -

    +
    UseCanonicalName DNS
    +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs"
    +VirtualScriptAliasIP  "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin"
    +

    A request for http://www.domain.example.com/directory/file.html @@ -209,9 +227,8 @@ hosting a % directive, you can work around the problem in the following way:

    -

    - VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0 -

    +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"
    +

    A request for http://www.domain.example.com/directory/file.html @@ -243,6 +260,14 @@ for a given virtual host VirtualDocumentRoot is turned off. This directive cannot be used in the same context as VirtualDocumentRootIP.

    +

    Note

    +VirtualDocumentRoot will override any DocumentRoot directives you may have put in the same +context or child contexts. Putting a VirtualDocumentRoot +in the global server scope will effectively override DocumentRoot directives in any virtual hosts defined later +on, unless you set VirtualDocumentRoot to None +in each virtual host. +
    +
    top
    @@ -287,7 +312,7 @@ a given virtual host
    top
    Description:Provides for dynamically configured mass virtual @@ -45,29 +51,28 @@ hosting
    - @@ -307,8 +332,30 @@ a given virtual host

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_vhost_alias.html.fr b/docs/manual/mod/mod_vhost_alias.html.fr new file mode 100644 index 00000000000..8749db13aca --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.html.fr @@ -0,0 +1,385 @@ + + + + + +mod_vhost_alias - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_vhost_alias

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    +
    Description:Dynamically configure the location of the cgi directory for +
    Description:Dynamically configure the location of the CGI directory for a given virtual host
    Syntax:VirtualScriptAliasIP interpolated-directory|none
    Default:VirtualScriptAliasIP none
    + + +
    Description:Permet de configurer dynamiquement l'hbergement virtuel de +masse
    Statut:Extension
    IdentificateurdeModule:vhost_alias_module
    FichierSource:mod_vhost_alias.c
    +

    Sommaire

    + +

    Ce module permet de crer des serveurs virtuels configurs + dynamiquement, en autorisant l'utilisation de l'adresse IP et/ou de + l'en-tte Host: de la requte HTTP comme partie du nom + de chemin afin de dterminer les fichiers servir. Ceci facilite la + gestion d'un grand nombre de serveurs virtuels possdant des + configurations similaires.

    + +

    Note

    +

    Si les modules mod_alias ou + mod_userdir sont utiliss pour traduire les URIs + en noms de fichiers, ils l'emportent sur les directives du module + mod_vhost_alias dcrites ci-dessous. Par + exemple, la configuration suivante fera correspondre + /cgi-bin/script.pl + /usr/local/apache2/cgi-bin/script.pl dans tous les cas :

    + +
    ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"
    +VirtualScriptAlias "/never/found/%0/cgi-bin/"
    + +
    +
    + +
    top
    +
    +

    Interpolation du nom de rpertoire

    + + +

    Toutes les directives de ce module insrent une chane dans un + nom de chemin. La chane insre (que nous appellerons maintenant le + "nom") peut tre soit le nom du serveur (voir la directive + UseCanonicalName pour les + dtails sur la manire dont il est dtermin), soit l'adresse IP du + serveur virtuel hberg par le serveur sous la forme d'un quadruplet + d'octets spars par des points. L'insertion est contrle par des + spcificateurs inspirs de printf et possdant de + nombreux formats :

    + + + + + + + + + + + + +
    %%insre un %
    %pinsre le numro de port du serveur virtuel
    %N.Minsre le nom (en partie)
    + +

    N et M permettent de spcifier des + sous-chanes du nom. N slectionne un des composants du + nom spars par des points, et M slectionne des + caractres l'intrieur de ce que N a slectionn. + M est optionnel et sa valeur par dfaut est 0 s'il + n'est pas spcifi ; le point doit tre prsent si et seulement si + M l'est aussi. Les modes d'insertion sont les suivants + :

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    0le nom en entier
    1la premire partie
    2la seconde partie
    -1la dernire partie
    -2l'avant-dernire partie
    2+toutes les parties partir de la seconde
    -2+toutes les parties jusqu' l'avant-dernire
    1+ et -1+identique 0
    + +

    Si N ou M est plus grand que le nombre + de parties disponibles, seul un caractre de soulignement est + insr.

    + +
    top
    +
    +

    Exemples

    + + +

    Pour des serveurs virtuels simples base de nom, utilisez les + directives suivantes dans le fichier de configuration de votre + serveur :

    + +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/vhosts/%0"
    + + +

    Une requte pour + http://www.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/www.example.com/repertoire/fichier.html. +

    + +

    Pour un trs grand nombre de serveurs virtuels, il est avantageux + d'organiser les fichiers de faon rduire la taille du rpertoire + vhosts. Pour ce faire, insrez les lignes suivantes + dans votre fichier de configuration :

    + +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2"
    + + +

    Une requte pour + http://www.domaine.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/example.com/d/o/m/domaine/repertoire/fichier.html.

    + +

    Une rpartition plus rgulire des fichiers peut tre obtenue en + partant de la fin d'un composant du nom, comme dans l'exemple + suivant :

    + +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2"
    + + +

    La requte prcdente concernerait alors + /usr/local/apache/vhosts/example.com/e/n/i/domaine/repertoire/fichier.html.

    + +

    Vous pouvez galement utiliser :

    + +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+"
    + + +

    La requte prcdente concernerait alors + /usr/local/apache/vhosts/example.com/d/o/m/aine/repertoire/fichier.html.

    + +

    Une demande trs courante des utilisateurs concerne la possibilit de + faire correspondre plusieurs racines de documents plusieurs + domaines, sans avoir se proccuper de la longueur ou du nombre de + parties du nom d'hte faisant partie de la requte. Si le nom d'hte + de la requte est sub.www.domain.example.com au lieu de + simplement www.domain.example.com, alors en utilisant + %3+, la racine des documents sera + /usr/local/apache/vhosts/domain.example.com/... au + lieu du rpertoire example.com attendu. Dans ce genre + de situation, il peut s'avrer prfrable d'utiliser la combinaison + %-2.0.%-1.0 qui fournira toujours le nom de domaine et + le tld, par exemple example.com sans tenir compte du + nombre de sous-domaines ajouts au nom d'hte. Dans ces conditions, + il est possible d'laborer une configuration qui associera les + sous-domaines de premier, second et troisime niveau au mme + rpertoire : +

    +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"
    + +

    +Dans l'exemple ci-dessus, www.example.com, +www.sub.example.com ou example.com +correspondront tous au rpertoire +/usr/local/apache/vhosts/example.com. +

    + + + +

    Pour l'hbergement virtuel base d'adresse IP, vous pouvez + insrer les lignes suivantes dans votre fichier de configuration + :

    + +
    UseCanonicalName DNS
    +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs"
    +VirtualScriptAliasIP  "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin"
    + + +

    Si l'adresse IP de www.domaine.example.com est + 10.20.30.40, une requte pour + http://www.domaine.example.com/repertoire/fichier.html + concernera la ressource + /usr/local/apache/vhosts/10/20/30/40/docs/repertoire/fichier.html. + Une requte pour + http://www.domaine.example.com/cgi-bin/script.pl + concernera la ressource + /usr/local/apache/vhosts/10/20/30/40/cgi-bin/script.pl.

    + +

    Si vous voulez insrer le caractre . dans une + directive VirtualDocumentRoot, et si cela cre un + conflit avec un spcificateur %, vous pouvez contourner + le problme de la manire suivante :

    + +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0"
    + + +

    Une requte pour + http://www.domaine.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/domaine.exemple/repertoire/fichier.html.

    + +

    Les spcificateurs de format %V et %A + de la directive LogFormat s'avrent trs utiles + lorsqu'ils sont utiliss en conjonction avec ce module.

    +
    +
    top
    +

    Directive VirtualDocumentRoot

    + + + + + + + +
    Description:Permet une configuration dynamique de la racine des +documents d'un serveur virtuel donn
    Syntaxe:VirtualDocumentRoot rpertoire-interpol|none
    Dfaut:VirtualDocumentRoot none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_vhost_alias
    + +

    La directive VirtualDocumentRoot vous + permet de spcifier o le serveur HTTP Apache pourra trouver vos + documents en se basant + sur le nom du serveur. Le rsultat de l'expansion du + rpertoire-interpol est utilis comme racine de + l'arborescence des documents d'une manire similaire l'argument de + la directive DocumentRoot. Si + rpertoire-interpol a pour valeur none, la + directive VirtualDocumentRoot est dsactive. + Cette directive ne peut pas tre utilise dans le mme contexte que + la directive VirtualDocumentRootIP.

    + +

    Note

    +La directive VirtualDocumentRoot l'emporte sur +toute directive DocumentRoot +dfinie dans le mme contexte ou dans des contextes enfants. Le fait de +dfinir une directive VirtualDocumentRoot dans le +contexte du serveur principal va effectivement l'emporter sur toute +directive DocumentRoot dfinie dans +un serveur virtuel quelconque, si vous n'avez pas dfini +VirtualDocumentRoot None dans ce +serveur virtuel. +
    + + +
    +
    top
    +

    Directive VirtualDocumentRootIP

    + + + + + + + +
    Description:Configuration dynamique de la racine des documents pour un +serveur virtuel donn
    Syntaxe:VirtualDocumentRootIP rpertoire-interpol|none
    Dfaut:VirtualDocumentRootIP none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_vhost_alias
    + +

    La directive VirtualDocumentRootIP est +identique la directive VirtualDocumentRoot l'exception +prs qu'elle utilise l'adresse IP du serveur virtuel pour +l'interpolation du rpertoire la place du nom du serveur.

    + +
    +
    top
    +

    Directive VirtualScriptAlias

    + + + + + + + +
    Description:Configuration dynamique du rpertoire des scripts CGI pour +un serveur virtuel donn
    Syntaxe:VirtualScriptAlias rpertoire-interpol|none
    Dfaut:VirtualScriptAlias none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_vhost_alias
    + +

    La directive VirtualScriptAlias vous + permet de spcifier o Apache httpd pourra trouver les scripts CGI selon une + mthode similaire celle qu'utilise la directive VirtualDocumentRoot pour les + autres documents. Elle recherche des requtes dont l'URI commence + par /cgi-bin/, comme le ferait la directive ScriptAlias.

    + + +
    +
    top
    +

    Directive VirtualScriptAliasIP

    + + + + + + + +
    Description:Configuration dynamique du rpertoire des scripts CGI pour +un serveur virtuel donn
    Syntaxe:VirtualScriptAliasIP rpertoire-interpol|none
    Dfaut:VirtualScriptAliasIP none
    Contexte:configuration du serveur, serveur virtuel
    Statut:Extension
    Module:mod_vhost_alias
    + +

    La directive VirtualScriptAliasIP est + identique la directive VirtualScriptAlias + l'exception prs qu'elle utilise l'adresse IP du serveur virtuel + pour l'interpolation du rpertoire la place du nom du serveur.

    + + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_vhost_alias.html.tr.utf8 b/docs/manual/mod/mod_vhost_alias.html.tr.utf8 index f393ac98cfc..3dceef68934 100644 --- a/docs/manual/mod/mod_vhost_alias.html.tr.utf8 +++ b/docs/manual/mod/mod_vhost_alias.html.tr.utf8 @@ -1,30 +1,35 @@ - -mod_vhost_alias - Apache HTTP Sunucusu +mod_vhost_alias - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache Modülü mod_vhost_alias

    Mevcut Diller:  en  | + fr  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -45,29 +50,28 @@ her durumda /cgi-bin/script.pl betiğini /usr/local/apache2/cgi-bin/script.pl betiğine eşleyecektir:

    -

    - ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
    - VirtualScriptAlias /nerede/bilinmiyor/%0/cgi-bin/ -

    +
    ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/"
    +VirtualScriptAlias "/nerede/bilinmiyor/%0/cgi-bin/"
    + -
    top

    Dizin İsimlerinin Elde Edilmesi

    @@ -138,65 +142,79 @@ Sanal Barındırma

    Sunucu yapılandırma dosyanızda isme dayalı sanal konaklar için aşağıdaki yönergeler kullanılıyor olsun:

    -

    - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/sankonlar/%0 -

    +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/sankonlar/%0"
    -

    http://mesela.dom/dizin/dosya.html için yapılan bir istek - /usr/local/apache/sankonlar/mesela.dom/dizin/dosya.html + +

    http://example.com/dizin/dosya.html için yapılan bir istek + /usr/local/apache/sankonlar/example.com/dizin/dosya.html dosyası ile yerine getirilecektir.

    Çok büyük sayıda sanal konak için sankonlar dizininin boyutlarını küçük tutmak amacıyla dosyalar düzenlenebilir. Bunu yapılandırma dosyanızda şöyle yapabilirsiniz:

    -

    - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2 -

    +
    UseCanonicalName    Off
    +VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2"
    + -

    http://falan.filan.mesela.dom/dizin/dosya.html için +

    http://falan.filan.example.com/dizin/dosya.html için yapılan bir istek - /usr/local/apache/sankonlar/mesela.dom/f/i/l/filan/dizin/dosya.html + /usr/local/apache/sankonlar/example.com/f/i/l/filan/dizin/dosya.html ile yerine getirilecektir.

    Bu sefer de parçaları ismin sonundan toplayalım:

    -

    - VirtualDocumentRoot /usr/local/apache/sankonlar/%3+/%2.-1/%2.-2/%2.-3/%2 -

    +
    VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.-1/%2.-2/%2.-3/%2"
    +

    Bu durumda istek - /usr/local/apache/sankonlar/mesela.dom/n/a/l/filan/dizin/dosya.html - ile karşılanırdı.

    + /usr/local/apache/sankonlar/example.com/n/a/l/filan/dizin/dosya.html + ile karşılanırdı.

    Şöyle bir şey de yapabilirsiniz:

    -

    - VirtualDocumentRoot /usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2.4+ -

    +
    VirtualDocumentRoot "/usr/local/apache/sankonlar/%3+/%2.1/%2.2/%2.3/%2.4+"
    +

    Bu örnek için istek - /usr/local/apache/sankonlar/mesela.dom/f/i/l/an/dizin/dosya.html + /usr/local/apache/sankonlar/example.com/f/i/l/an/dizin/dosya.html dosyasından karşılanırdı.

    +

    Kullanıcıların çoğunun ortak isteği, istenen konak adının uzunluğu veya + sayısı için endişelenmeksizin çok sayıda belge köküne çok sayıda alan + adından erişilebilmesidir. Eğer istenen konak adı + www.domain.example.com değil de + sub.www.domain.example.com ise %3+ kullanımı, belge kök + dizininin düşünüldüğü gibi example.com değil + /usr/local/apache/vhosts/domain.example.com/... olmasını + sağlar. Böyle durumlarda, daima alan adı ve tld ile sonuçlanan + %-2.0.%-1.0 birleşiminin kullanımı daha yararlı olabilir. + Böylece, tüm ilk, ikinci ve üçüncü seviye alt alan adlarını aynı dizine + yönlendirecek bir yapılandırma yapılabilir:

    + +
    VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"
    + + +

    Yukarıdaki örnekte, example.com, + www.example.com ve hatta www.sub.example.com + bile /usr/local/apache/vhosts/example.com dizinine + yönlendirilecektir.

    +

    IP’ye dayalı sanal konaklar için yapılandırma dosyanızda şu satırlar olabilirdi:

    -

    - UseCanonicalName DNS
    - VirtualDocumentRootIP - /usr/local/apache/sankonlar/%1/%2/%3/%4/belgeler
    - VirtualScriptAliasIP /usr/local/apache/sankonlar/%1/%2/%3/%4/cgi-bin -

    +
    UseCanonicalName DNS
    +VirtualDocumentRootIP "/usr/local/apache/sankonlar/%1/%2/%3/%4/belgeler"
    +VirtualScriptAliasIP  "/usr/local/apache/sankonlar/%1/%2/%3/%4/cgi-bin"
    + -

    http://falan.filan.mesela.dom/dizin/dosya.html için - yapılan bir istek eğer falan.filan.mesela.dom’un IP adresi +

    http://falan.filan.example.com/dizin/dosya.html için + yapılan bir istek eğer falan.filan.example.com’un IP adresi 10.20.30.40 olsaydı, /usr/local/apache/sankonlar/10/20/30/40/belgeler/dizin/dosya.html dosyası ile karşılanırdı. - http://falan.filan.mesela.dom/cgi-bin/betik.pl için yapılan + http://falan.filan.example.com/cgi-bin/betik.pl için yapılan bir istek ise /usr/local/apache/sankonlar/10/20/30/40/cgi-bin/betik.pl betiğinin çalıştırılması ile sağlanırdı.

    @@ -205,11 +223,10 @@ Sanal Barındırma karakterini içermesini isterseniz, bir biçem belirteci ile karışıklığa sebep olmaksızın bunu şöyle sağlayabilirsiniz:

    -

    - VirtualDocumentRoot /usr/local/apache/sankonlar/%2.0.%3.0 -

    +
    VirtualDocumentRoot "/usr/local/apache/sankonlar/%2.0.%3.0"
    -

    Bu durumda http://falan.filan.mesela.dom/dizin/dosya.html + +

    Bu durumda http://falan.filan.example.com/dizin/dosya.html için yapılan bir istek /usr/local/apache/sankonlar/filan.mesela/dizin/dosya.html dosyası ile karşılanacaktır.

    @@ -231,7 +248,7 @@ Sanal Barındırma
    Açıklama:Kitlesel sanal konakların devingen olarak yapılandırılmasını sağlar
    Durum:Eklenti
    Modül Betimleyici:vhost_alias_module

    VirtualDocumentRoot yönergesi sunucu ismine göre - belgelerin bulunacağı yeri Apache’nin saptamasını sağlar. + belgelerin bulunacağı yeri Apache HTTP Sunucusunun saptamasını sağlar. hesaplanan-dizin’in dönüşüm sonucu DocumentRoot yönergesinin değeriymiş gibi belge ağacının kök dizini olarak kullanılır. hesaplanan-dizin yerine none @@ -239,6 +256,14 @@ Sanal Barındırma olur. Bu yönerge VirtualDocumentRootIP yönergesinin kullanıldığı bağlamda yer alamaz.

    +

    Bilginize

    + VirtualDocumentRoot yönergesi aynı bağlamda veya + alt bağlamlarda da kullanılabilen DocumentRoot yönergelerini geçersiz kılar. + Genel sunucu etki alanına bir VirtualDocumentRoot + konulması, daha sonra yer alan her sanal konak tanımı içinde + VirtualDocumentRoot yönergesine None + atamadıkça bu sanal konaklarda yapılmış DocumentRoot atamalarını geçersiz kılacaktır. +
    top
    @@ -271,10 +296,11 @@ Sanal Barındırma

    VirtualScriptAlias yönergesi, CGI betiklerinin - bulunacağı yeri Apache’nin saptamasını sağlamak bakımından VirtualDocumentRoot yönergesinin - yaptığını yapar. /cgi-bin/ ile başlayan istekler için ise - ScriptAlias yönergesinin - yaptığını yapar.

    + bulunacağı yeri Apache httpd’nin saptamasını sağlamak bakımından + VirtualDocumentRoot + yönergesinin yaptığını yapar. /cgi-bin/ ile başlayan + istekler için ise ScriptAlias + yönergesinin yaptığını yapar.

    @@ -299,8 +325,30 @@ Sanal Barındırma

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_vhost_alias.xml b/docs/manual/mod/mod_vhost_alias.xml index 35164eb6487..d5d77edebf1 100644 --- a/docs/manual/mod/mod_vhost_alias.xml +++ b/docs/manual/mod/mod_vhost_alias.xml @@ -44,10 +44,10 @@ hosting /cgi-bin/script.pl
    to /usr/local/apache2/cgi-bin/script.pl in all cases:

    - - ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/
    - VirtualScriptAlias /never/found/%0/cgi-bin/ -
    + +ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" +VirtualScriptAlias "/never/found/%0/cgi-bin/" +
    @@ -126,10 +126,10 @@ hosting

    For simple name-based virtual hosts you might use the following directives in your server configuration file:

    - - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/vhosts/%0 -
    + +UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%0" +

    A request for http://www.example.com/directory/file.html will be @@ -142,10 +142,10 @@ hosting vhosts directory. To do this you might use the following in your configuration file:

    - - UseCanonicalName Off
    - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2 -
    + +UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2" +

    A request for http://www.domain.example.com/directory/file.html @@ -155,30 +155,49 @@ hosting

    A more even spread of files can be achieved by hashing from the end of the name, for example:

    - - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2 - + + VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2" +

    The example request would come from /usr/local/apache/vhosts/example.com/n/i/a/domain/directory/file.html.

    Alternatively you might use:

    - - VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+ - + + VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+" +

    The example request would come from /usr/local/apache/vhosts/example.com/d/o/m/ain/directory/file.html.

    +

    A very common request by users is the ability to point multiple domains to multiple +document roots without having to worry about the length or number of parts of the +hostname being requested. If the requested hostname is sub.www.domain.example.com + instead of simply www.domain.example.com, then using %3+ will result in the document +root being /usr/local/apache/vhosts/domain.example.com/... instead of the +intended example.com directory. In such cases, it can be beneficial to use +the combination %-2.0.%-1.0, which will always yield the domain name and the +tld, for example example.com regardless of the number of subdomains appended +to the hostname. As such, one can make a configuration that will direct all first, second +or third level subdomains to the same directory: +

    + + VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0" + +

    +In the example above, both www.example.com as well as www.sub.example.com +or example.com will all point to /usr/local/apache/vhosts/example.com. +

    +

    For IP-based virtual hosting you might use the following in your configuration file:

    - - UseCanonicalName DNS
    - VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs
    - VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin -
    + +UseCanonicalName DNS +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs" +VirtualScriptAliasIP "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin" +

    A request for http://www.domain.example.com/directory/file.html @@ -195,9 +214,9 @@ hosting a % directive, you can work around the problem in the following way:

    - - VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0 - + + VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0" +

    A request for http://www.domain.example.com/directory/file.html @@ -233,7 +252,18 @@ for a given virtual host cannot be used in the same context as VirtualDocumentRootIP.

    +Note +VirtualDocumentRoot will override any DocumentRoot directives you may have put in the same +context or child contexts. Putting a VirtualDocumentRoot +in the global server scope will effectively override DocumentRoot directives in any virtual hosts defined later +on, unless you set VirtualDocumentRoot to None +in each virtual host. + + + @@ -283,7 +313,7 @@ a given virtual host VirtualScriptAliasIP -Dynamically configure the location of the cgi directory for +Dynamically configure the location of the CGI directory for a given virtual host VirtualScriptAliasIP interpolated-directory|none VirtualScriptAliasIP none diff --git a/docs/manual/mod/mod_vhost_alias.xml.fr b/docs/manual/mod/mod_vhost_alias.xml.fr new file mode 100644 index 00000000000..ff2c05a2af1 --- /dev/null +++ b/docs/manual/mod/mod_vhost_alias.xml.fr @@ -0,0 +1,361 @@ + + + + + + + + + + + +mod_vhost_alias +Permet de configurer dynamiquement l'hébergement virtuel de +masse +Extension +mod_vhost_alias.c +vhost_alias_module + + +

    Ce module permet de créer des serveurs virtuels configurés + dynamiquement, en autorisant l'utilisation de l'adresse IP et/ou de + l'en-tête Host: de la requête HTTP comme partie du nom + de chemin afin de déterminer les fichiers à servir. Ceci facilite la + gestion d'un grand nombre de serveurs virtuels possèdant des + configurations similaires.

    + + Note +

    Si les modules mod_alias ou + mod_userdir sont utilisés pour traduire les URIs + en noms de fichiers, ils l'emportent sur les directives du module + mod_vhost_alias décrites ci-dessous. Par + exemple, la configuration suivante fera correspondre + /cgi-bin/script.pl à + /usr/local/apache2/cgi-bin/script.pl dans tous les cas :

    + + +ScriptAlias "/cgi-bin/" "/usr/local/apache2/cgi-bin/" +VirtualScriptAlias "/never/found/%0/cgi-bin/" + +
    +
    + +UseCanonicalName +Configuration dynamique de +l'hébergement virtuel de masse + +
    + Interpolation du nom de répertoire + +

    Toutes les directives de ce module insèrent une chaîne dans un + nom de chemin. La chaîne insérée (que nous appellerons maintenant le + "nom") peut être soit le nom du serveur (voir la directive + UseCanonicalName pour les + détails sur la manière dont il est déterminé), soit l'adresse IP du + serveur virtuel hébergé par le serveur sous la forme d'un quadruplet + d'octets séparés par des points. L'insertion est contrôlée par des + spécificateurs inspirés de printf et possèdant de + nombreux formats :

    + + + + + + + + + + + + +
    %%insère un %
    %pinsère le numéro de port du serveur virtuel
    %N.Minsère le nom (en partie)
    + +

    N et M permettent de spécifier des + sous-chaînes du nom. N sélectionne un des composants du + nom séparés par des points, et M sélectionne des + caractères à l'intérieur de ce que N a sélectionné. + M est optionnel et sa valeur par défaut est 0 s'il + n'est pas spécifié ; le point doit être présent si et seulement si + M l'est aussi. Les modes d'insertion sont les suivants + :

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    0le nom en entier
    1la première partie
    2la seconde partie
    -1la dernière partie
    -2l'avant-dernière partie
    2+toutes les parties à partir de la seconde
    -2+toutes les parties jusqu'à l'avant-dernière
    1+ et -1+identique à 0
    + +

    Si N ou M est plus grand que le nombre + de parties disponibles, seul un caractère de soulignement est + inséré.

    + +
    + +
    + Exemples + +

    Pour des serveurs virtuels simples à base de nom, utilisez les + directives suivantes dans le fichier de configuration de votre + serveur :

    + + +UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%0" + + +

    Une requête pour + http://www.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/www.example.com/repertoire/fichier.html. +

    + +

    Pour un très grand nombre de serveurs virtuels, il est avantageux + d'organiser les fichiers de façon à réduire la taille du répertoire + vhosts. Pour ce faire, insérez les lignes suivantes + dans votre fichier de configuration :

    + + +UseCanonicalName Off +VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2" + + +

    Une requête pour + http://www.domaine.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/example.com/d/o/m/domaine/repertoire/fichier.html.

    + +

    Une répartition plus régulière des fichiers peut être obtenue en + partant de la fin d'un composant du nom, comme dans l'exemple + suivant :

    + + + VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2" + + +

    La requête précédente concernerait alors + /usr/local/apache/vhosts/example.com/e/n/i/domaine/repertoire/fichier.html.

    + +

    Vous pouvez également utiliser :

    + + + VirtualDocumentRoot "/usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+" + + +

    La requête précédente concernerait alors + /usr/local/apache/vhosts/example.com/d/o/m/aine/repertoire/fichier.html.

    + +

    Une demande très courante des utilisateurs concerne la possibilité de + faire correspondre plusieurs racines de documents à plusieurs + domaines, sans avoir à se préoccuper de la longueur ou du nombre de + parties du nom d'hôte faisant partie de la requête. Si le nom d'hôte + de la requête est sub.www.domain.example.com au lieu de + simplement www.domain.example.com, alors en utilisant + %3+, la racine des documents sera + /usr/local/apache/vhosts/domain.example.com/... au + lieu du répertoire example.com attendu. Dans ce genre + de situation, il peut s'avérer préférable d'utiliser la combinaison + %-2.0.%-1.0 qui fournira toujours le nom de domaine et + le tld, par exemple example.com sans tenir compte du + nombre de sous-domaines ajoutés au nom d'hôte. Dans ces conditions, + il est possible d'élaborer une configuration qui associera les + sous-domaines de premier, second et troisième niveau au même + répertoire : +

    + + VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0" + +

    +Dans l'exemple ci-dessus, www.example.com, +www.sub.example.com ou example.com +correspondront tous au répertoire +/usr/local/apache/vhosts/example.com. +

    + + + +

    Pour l'hébergement virtuel à base d'adresse IP, vous pouvez + insérer les lignes suivantes dans votre fichier de configuration + :

    + + +UseCanonicalName DNS +VirtualDocumentRootIP "/usr/local/apache/vhosts/%1/%2/%3/%4/docs" +VirtualScriptAliasIP "/usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin" + + +

    Si l'adresse IP de www.domaine.example.com est + 10.20.30.40, une requête pour + http://www.domaine.example.com/repertoire/fichier.html + concernera la ressource + /usr/local/apache/vhosts/10/20/30/40/docs/repertoire/fichier.html. + Une requête pour + http://www.domaine.example.com/cgi-bin/script.pl + concernera la ressource + /usr/local/apache/vhosts/10/20/30/40/cgi-bin/script.pl.

    + +

    Si vous voulez insérer le caractère . dans une + directive VirtualDocumentRoot, et si cela crée un + conflit avec un spécificateur %, vous pouvez contourner + le problème de la manière suivante :

    + + + VirtualDocumentRoot "/usr/local/apache/vhosts/%2.0.%3.0" + + +

    Une requête pour + http://www.domaine.example.com/repertoire/fichier.html + concernera alors la ressource + /usr/local/apache/vhosts/domaine.exemple/repertoire/fichier.html.

    + +

    Les spécificateurs de format %V et %A + de la directive LogFormat s'avèrent très utiles + lorsqu'ils sont utilisés en conjonction avec ce module.

    +
    + + +VirtualDocumentRoot +Permet une configuration dynamique de la racine des +documents d'un serveur virtuel donné +VirtualDocumentRoot répertoire-interpolé|none +VirtualDocumentRoot none + +server config +virtual host + + + + +

    La directive VirtualDocumentRoot vous + permet de spécifier où le serveur HTTP Apache pourra trouver vos + documents en se basant + sur le nom du serveur. Le résultat de l'expansion du + répertoire-interpolé est utilisé comme racine de + l'arborescence des documents d'une manière similaire à l'argument de + la directive DocumentRoot. Si + répertoire-interpolé a pour valeur none, la + directive VirtualDocumentRoot est désactivée. + Cette directive ne peut pas être utilisée dans le même contexte que + la directive VirtualDocumentRootIP.

    + +Note +La directive VirtualDocumentRoot l'emporte sur +toute directive DocumentRoot +définie dans le même contexte ou dans des contextes enfants. Le fait de +définir une directive VirtualDocumentRoot dans le +contexte du serveur principal va effectivement l'emporter sur toute +directive DocumentRoot définie dans +un serveur virtuel quelconque, si vous n'avez pas défini +VirtualDocumentRoot à None dans ce +serveur virtuel. + + +
    +
    + + +VirtualDocumentRootIP +Configuration dynamique de la racine des documents pour un +serveur virtuel donné +VirtualDocumentRootIP répertoire-interpolé|none +VirtualDocumentRootIP none + +server config +virtual host + + + + +

    La directive VirtualDocumentRootIP est +identique à la directive VirtualDocumentRoot à l'exception +près qu'elle utilise l'adresse IP du serveur virtuel pour +l'interpolation du répertoire à la place du nom du serveur.

    +
    +
    + + +VirtualScriptAlias +Configuration dynamique du répertoire des scripts CGI pour +un serveur virtuel donné +VirtualScriptAlias répertoire-interpolé|none +VirtualScriptAlias none + +server config +virtual host + + + + +

    La directive VirtualScriptAlias vous + permet de spécifier où Apache httpd pourra trouver les scripts CGI selon une + méthode similaire à celle qu'utilise la directive VirtualDocumentRoot pour les + autres documents. Elle recherche des requêtes dont l'URI commence + par /cgi-bin/, comme le ferait la directive ScriptAlias.

    + +
    +
    + + +VirtualScriptAliasIP +Configuration dynamique du répertoire des scripts CGI pour +un serveur virtuel donné +VirtualScriptAliasIP répertoire-interpolé|none +VirtualScriptAliasIP none + +server config +virtual host + + + + +

    La directive VirtualScriptAliasIP est + identique à la directive VirtualScriptAlias à + l'exception près qu'elle utilise l'adresse IP du serveur virtuel + pour l'interpolation du répertoire à la place du nom du serveur.

    + +
    + +
    +
    + diff --git a/docs/manual/mod/mod_vhost_alias.xml.meta b/docs/manual/mod/mod_vhost_alias.xml.meta index 42966587478..2b99288d855 100644 --- a/docs/manual/mod/mod_vhost_alias.xml.meta +++ b/docs/manual/mod/mod_vhost_alias.xml.meta @@ -8,6 +8,7 @@ en - tr + fr + tr diff --git a/docs/manual/mod/mod_vhost_alias.xml.tr b/docs/manual/mod/mod_vhost_alias.xml.tr index 6c14c11af7f..c328416a0bb 100644 --- a/docs/manual/mod/mod_vhost_alias.xml.tr +++ b/docs/manual/mod/mod_vhost_alias.xml.tr @@ -1,10 +1,10 @@ - + +mod_watchdog - Apache HTTP Server Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_watchdog

    +
    +

    Available Languages:  en 

    +
    + + + + +
    Description:provides infrastructure for other modules to periodically run + tasks
    Status:Base
    ModuleIdentifier:watchdog_module
    SourceFile:mod_watchdog.c
    Compatibility:Available in Apache 2.3 and later
    +

    Summary

    + +

    mod_watchdog defines programmatic hooks for other modules to +periodically run tasks. These modules can register handlers for +mod_watchdog hooks. Currently, the following modules in the +Apache distribution use this functionality:

    + +
    +To allow a module to use mod_watchdog functionality, +mod_watchdog itself must be statically linked to the server +core or, if a dynamic module, be loaded before the calling module. +
    +
    +

    Directives

    + +

    Bugfix checklist

    See also

    +
    + +
    top
    +

    WatchdogInterval Directive

    + + + + + + + +
    Description:Watchdog interval in seconds
    Syntax:WatchdogInterval number-of-seconds
    Default:WatchdogInterval 1
    Context:server config
    Status:Base
    Module:mod_watchdog
    +

    Sets the interval at which the watchdog_step hook runs. Default is to run every +second.

    + +
    +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_watchdog.xml b/docs/manual/mod/mod_watchdog.xml new file mode 100644 index 00000000000..75cdb0765f0 --- /dev/null +++ b/docs/manual/mod/mod_watchdog.xml @@ -0,0 +1,61 @@ + + + + + + + + +mod_watchdog +provides infrastructure for other modules to periodically run + tasks +Base +mod_watchdog.c +watchdog_module +Available in Apache 2.3 and later + + +

    mod_watchdog defines programmatic hooks for other modules to +periodically run tasks. These modules can register handlers for +mod_watchdog hooks. Currently, the following modules in the +Apache distribution use this functionality:

    +
      +
    • mod_heartbeat
    • +
    • mod_heartmonitor
    • +
    + +To allow a module to use mod_watchdog functionality, +mod_watchdog itself must be statically linked to the server +core or, if a dynamic module, be loaded before the calling module. + +
    + + +WatchdogInterval +Watchdog interval in seconds +WatchdogInterval number-of-seconds +WatchdogInterval 1 +server config + + +

    Sets the interval at which the watchdog_step hook runs. Default is to run every +second.

    +
    +
    +
    + diff --git a/docs/manual/mod/mod_watchdog.xml.meta b/docs/manual/mod/mod_watchdog.xml.meta new file mode 100644 index 00000000000..c6d93ae5b05 --- /dev/null +++ b/docs/manual/mod/mod_watchdog.xml.meta @@ -0,0 +1,12 @@ + + + + + mod_watchdog + /mod/ + .. + + + en + + diff --git a/docs/manual/mod/mod_xml2enc.html b/docs/manual/mod/mod_xml2enc.html index b2e3e45c36d..a25cae6775e 100644 --- a/docs/manual/mod/mod_xml2enc.html +++ b/docs/manual/mod/mod_xml2enc.html @@ -3,3 +3,7 @@ URI: mod_xml2enc.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_xml2enc.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_xml2enc.html.en b/docs/manual/mod/mod_xml2enc.html.en index 017be5787e3..a248d9a445d 100644 --- a/docs/manual/mod/mod_xml2enc.html.en +++ b/docs/manual/mod/mod_xml2enc.html.en @@ -1,27 +1,33 @@ - -mod_xml2enc - Apache HTTP Server +mod_xml2enc - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache Module mod_xml2enc

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -40,20 +46,22 @@ for 2.2.x versions
    Description:Enhanced charset/internationalisation support for libxml2-based filter modules
    after markup processing, and will ensure the correct charset value is set in the HTTP Content-Type header.

    -
    top

    Usage

    @@ -73,8 +81,9 @@ for 2.2.x versions
    Non-enabled modules

    To use it with a libxml2-based module that isn't explicitly enabled for mod_xml2enc, you will have to configure the filter chain yourself. - So to use it with a filter foo provided by a module mod_foo to - improve the latter's i18n support with HTML and XML, you could use

    + So to use it with a filter foo provided by a module + mod_foo to improve the latter's i18n support with HTML + and XML, you could use

    
         FilterProvider iconv    xml2enc Content-Type $text/html
         FilterProvider iconv    xml2enc Content-Type $xml
    @@ -82,7 +91,7 @@ for 2.2.x versions
         FilterProvider markup   foo Content-Type $xml
         FilterChain     iconv markup
         
    -

    mod_foo will now support any character set supported by either +

    mod_foo will now support any character set supported by either (or both) of libxml2 or apr_xlate/iconv.

    top
    @@ -162,7 +171,8 @@ module for earlier versions. information, you can set this default to help mod_xml2enc process the data correctly. For example, to work with the default value of Latin1 (iso-8859-1 specified in HTTP/1.0, use

    -

    xml2EncDefault iso-8859-1

    +
    xml2EncDefault iso-8859-1
    +
    top
    @@ -182,8 +192,30 @@ module for earlier versions.
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mod_xml2enc.html.fr b/docs/manual/mod/mod_xml2enc.html.fr new file mode 100644 index 00000000000..0cf02ad2f25 --- /dev/null +++ b/docs/manual/mod/mod_xml2enc.html.fr @@ -0,0 +1,241 @@ + + + + + +mod_xml2enc - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_xml2enc

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + + +
    Description:Support avanc de l'internationalisation et des jeux de +caractres pour les modules de filtrage bass sur libxml2
    Statut:Base
    IdentificateurdeModule:xml2enc_module
    FichierSource:mod_xml2enc.c
    Compatibilit:Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.2.x
    +

    Sommaire

    + +

    Ce module fournit un support avanc de l'internationalisation + pour les modules de filtrage supportant les balises (markup-aware) + comme mod_proxy_html. Il est capable de dtecter + automatiquement l'encodage des donnes en entre et de s'assurer + qu'elle sont traites correctement par l'interprteur libxml2, y compris la conversion en + Unicode (UTF-8) si ncessaire. Il peut aussi convertir les donnes + dans l'encodage de votre choix aprs le traitement des balises, et + s'assurera que le jeu de caractres appropri sera dfini + dans l'en-tte HTTP Content-Type.

    +
    + +
    top
    +
    +

    Utilisation

    +

    Il existe deux scnarios d'utilisation : le cas des modules + programms pour travailler avec mod_xml2enc ; et les autres :

    +
    +
    Modules de filtrages programms pour mod_xml2enc
    +

    Les modules comme mod_proxy_html versions 3.1 et + suprieures utilisent la fonction optionnelle + xml2enc_charset pour dterminer la valeur de l'argument + "jeu de caractres" transmettre l'interprteur libxml2, et + disposent de la fonction optionnelle xml2enc_filter + pour effectuer un encodage ultrieur ventuel. L'utilisation de + mod_xml2enc avec un module prprogramm cet effet ne ncessite + aucune configuration : ce dernier configurera mod_xml2enc pour vous + (sachant que vous pouvez tout de mme le personnaliser via les + directives de configuration ci-dessous).

    +
    +
    Modules de filtrages non programms pour mod_xml2enc
    +

    Pour utiliser mod_xml2enc avec un module bas sur libxml2 qui n'a + pas t explicitement programm pour mod_xml2enc, vous devrez + configurer la chane de filtrage vous-mme. Ainsi, pour utiliser + mod_xml2enc avec un filtre foo fourni par un module + mod_foo et pour + amliorer le support i18n de ce dernier avec HTML et XML, vous + pouvez utiliser les directives suivantes :

    +
    
    +    FilterProvider iconv    xml2enc Content-Type $text/html
    +    FilterProvider iconv    xml2enc Content-Type $xml
    +    FilterProvider markup   foo Content-Type $text/html
    +    FilterProvider markup   foo Content-Type $xml
    +    FilterChain     iconv markup
    +    
    +

    mod_foo supportera alors tout jeu de caractre support soit par + libxml2, soit par apr_xlate/iconv, soit par les deux.

    +
    +
    top
    +
    +

    API de programmation

    +

    Les programmeurs de modules de filtrage bass sur libxml2 sont + encourags les prprogrammer pour mod_xml2enc, afin de fournir un + support i18n solide aux utilisateurs sans avoir rinventer la + roue. L'API de programmation est dcrite dans + mod_xml2enc.h, et mod_proxy_html est un + exemple de son utilisation.

    +
    top
    +
    +

    Dtection et encodage

    +

    A la diffrence de mod_charset_lite, mod_xml2enc + est conu pour travailler avec des donnes dont l'encodage ne peut + pas tre connu, et donc configur, l'avance. Il utilise donc les + techniques de 'reniflage' suivantes pour dtecter le type d'encodage + des donnes HTTP :

    +
      +
    1. Si l'en-tte HTTP Content-Type contient un + paramtre charset, c'est ce dernier qui sera utilis.
    2. +
    3. Si les donnes commancent par une balise XML concernant + l'ordre des octets (BOM) ou par une dclaration d'encodage XML, + c'est celle-ci qui sera utilise.
    4. +
    5. Si un type d'encodage est dclar dans un lment HTML + <META>, c'est ce dernier qui sera utilis.
    6. +
    7. Si aucun des lments prcdents n'est trouv, c'est la + valeur par dfaut dfinie par la directive + xml2EncDefault qui sera utilise.
    8. +
    +

    Les conditions sont testes dans cet ordre . Ds qu'une rgle + s'applique, elle est utilise et la dtection est termine.

    +
    top
    +
    +

    Codage en sortie

    +

    libxml2 utilise toujours UTF-8 +(Unicode) en interne, et les modules de filtrage bass sur libxml2 +utiliseront cet encodage en sortie par dfaut. mod_xml2enc peut modifier +l'encodage en sortie via l'API, mais il n'y a actuellement aucun moyen de le +configurer directement.

    +

    La modification de l'encodage en sortie ne devrait (du moins en thorie) +jamais tre ncessaire, et est mme dconseille cause de la charge de +traitement supplmentaire impose au serveur par une conversion non +ncessaire.

    +
    top
    +
    +

    Codages non supports

    +

    Si vous travaillez avec des encodages non supports par aucune des +mthodes de conversion disponibles sur votre plateforme, vous pouvez +tout de mme leur associer un alias vers un code support via la +directive xml2EncAlias.

    +
    +
    top
    +

    Directive xml2EncAlias

    + + + + + + +
    Description:Dfinit des alias pour les valeurs d'encodage
    Syntaxe:xml2EncAlias jeu-de-caractres alias [alias ...]
    Contexte:configuration du serveur
    Statut:Base
    Module:mod_xml2enc
    +

    Cette directive de niveau serveur permet de dfinir un ou + plusieurs alias pour un encodage. Elle permet au support d'encodage de + libxml2 de traiter en interne des encodages non reconnus par libxml2 + en utilisant la table de conversion pour un encodage reconnu. Elle + permet d'atteindre deux objectifs : supporter des jeux (ou noms) de + caractres non reconnus par libxml2 ou iconv, et viter une + conversion pour un encodage lorsque cela n'est pas ncessaire.

    + +
    +
    top
    +

    Directive xml2EncDefault

    + + + + + + + +
    Description:Dfinit un encodage par dfaut utiliser lorsqu'aucune +information ne peut tre automatiquement dtecte
    Syntaxe:xml2EncDefault nom
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Base
    Module:mod_xml2enc
    Compatibilit:Disponible depuis la version 2.4.0 du serveur HTTP Apache +; disponible depuis un module tiers dans les versions antrieures.
    +

    Si vous traitez des donnes dont l'encodage est connu, mais ne + contenant aucune information propos de ce dernier, vous pouvez + dfinir une valeur par dfaut afin d'aider mod_xml2enc traiter + correctement les donnes. Par exemple, pour dfinir la valeur par + dfaut Latin1 (iso-8859-1 specifie dans HTTP/1.0), + utilisez :

    +
    xml2EncDefault iso-8859-1
    + + +
    +
    top
    +

    Directive xml2StartParse

    + + + + + + +
    Description:Indique l'interprteur partir de quelle balise il doit +commencer son traitement.
    Syntaxe:xml2StartParse lment [lment ...]
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    Statut:Base
    Module:mod_xml2enc
    +

    Cette directive permet de spcifier partir de quelle balise, + parmi les lments spcifis, l'interprteur de balise doit + commencer son traitement. Ccei permet de contourner le problme des + serveurs d'arrire-plan qui insrent des lments non conformes en + dbut de donnes, ce qui a pour effet de perturber l'interprteur (voir un exemple ici).

    +

    Elle ne doit tre utilise ni pour les documents XML, ni pour les + documents HTML correctement formats.

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mod_xml2enc.xml b/docs/manual/mod/mod_xml2enc.xml index 82bd50dffa0..732a656579c 100644 --- a/docs/manual/mod/mod_xml2enc.xml +++ b/docs/manual/mod/mod_xml2enc.xml @@ -59,8 +59,9 @@ for 2.2.x versions
    Non-enabled modules

    To use it with a libxml2-based module that isn't explicitly enabled for mod_xml2enc, you will have to configure the filter chain yourself. - So to use it with a filter foo provided by a module mod_foo to - improve the latter's i18n support with HTML and XML, you could use

    + So to use it with a filter foo provided by a module + mod_foo to improve the latter's i18n support with HTML + and XML, you could use

    
         FilterProvider iconv    xml2enc Content-Type $text/html
         FilterProvider iconv    xml2enc Content-Type $xml
    @@ -68,7 +69,7 @@ for 2.2.x versions
         FilterProvider markup   foo Content-Type $xml
         FilterChain     iconv markup
         
    -

    mod_foo will now support any character set supported by either +

    mod_foo will now support any character set supported by either (or both) of libxml2 or apr_xlate/iconv.

    @@ -132,7 +133,7 @@ module for earlier versions. information, you can set this default to help mod_xml2enc process the data correctly. For example, to work with the default value of Latin1 (iso-8859-1 specified in HTTP/1.0, use

    - xml2EncDefault iso-8859-1 + xml2EncDefault iso-8859-1
    diff --git a/docs/manual/mod/mod_xml2enc.xml.fr b/docs/manual/mod/mod_xml2enc.xml.fr new file mode 100644 index 00000000000..97972bfae2e --- /dev/null +++ b/docs/manual/mod/mod_xml2enc.xml.fr @@ -0,0 +1,196 @@ + + + + + + + + + + + +mod_xml2enc +Support avancé de l'internationalisation et des jeux de +caractères pour les modules de filtrage basés sur libxml2 +Base +mod_xml2enc.c +xml2enc_module +Disponible depuis la version 2.4 du serveur HTTP Apache. +Disponible en tant que module tiers dans les versions 2.2.x + + +

    Ce module fournit un support avancé de l'internationalisation + pour les modules de filtrage supportant les balises (markup-aware) + comme mod_proxy_html. Il est capable de détecter + automatiquement l'encodage des données en entrée et de s'assurer + qu'elle sont traitées correctement par l'interpréteur libxml2, y compris la conversion en + Unicode (UTF-8) si nécessaire. Il peut aussi convertir les données + dans l'encodage de votre choix après le traitement des balises, et + s'assurera que le jeu de caractères approprié sera défini + dans l'en-tête HTTP Content-Type.

    +
    + +
    Utilisation +

    Il existe deux scénarios d'utilisation : le cas des modules + programmés pour travailler avec mod_xml2enc ; et les autres :

    +
    +
    Modules de filtrages programmés pour mod_xml2enc
    +

    Les modules comme mod_proxy_html versions 3.1 et + supérieures utilisent la fonction optionnelle + xml2enc_charset pour déterminer la valeur de l'argument + "jeu de caractères" à transmettre à l'interpréteur libxml2, et + disposent de la fonction optionnelle xml2enc_filter + pour effectuer un encodage ultérieur éventuel. L'utilisation de + mod_xml2enc avec un module préprogrammé à cet effet ne nécessite + aucune configuration : ce dernier configurera mod_xml2enc pour vous + (sachant que vous pouvez tout de même le personnaliser via les + directives de configuration ci-dessous).

    +
    +
    Modules de filtrages non programmés pour mod_xml2enc
    +

    Pour utiliser mod_xml2enc avec un module basé sur libxml2 qui n'a + pas été explicitement programmé pour mod_xml2enc, vous devrez + configurer la chaîne de filtrage vous-même. Ainsi, pour utiliser + mod_xml2enc avec un filtre foo fourni par un module + mod_foo et pour + améliorer le support i18n de ce dernier avec HTML et XML, vous + pouvez utiliser les directives suivantes :

    +
    
    +    FilterProvider iconv    xml2enc Content-Type $text/html
    +    FilterProvider iconv    xml2enc Content-Type $xml
    +    FilterProvider markup   foo Content-Type $text/html
    +    FilterProvider markup   foo Content-Type $xml
    +    FilterChain     iconv markup
    +    
    +

    mod_foo supportera alors tout jeu de caractère supporté soit par + libxml2, soit par apr_xlate/iconv, soit par les deux.

    +
    +
    + +
    API de programmation +

    Les programmeurs de modules de filtrage basés sur libxml2 sont + encouragés à les préprogrammer pour mod_xml2enc, afin de fournir un + support i18n solide aux utilisateurs sans avoir à réinventer la + roue. L'API de programmation est décrite dans + mod_xml2enc.h, et mod_proxy_html est un + exemple de son utilisation.

    +
    + +
    Détection et encodage +

    A la différence de mod_charset_lite, mod_xml2enc + est conçu pour travailler avec des données dont l'encodage ne peut + pas être connu, et donc configuré, à l'avance. Il utilise donc les + techniques de 'reniflage' suivantes pour détecter le type d'encodage + des données HTTP :

    +
      +
    1. Si l'en-tête HTTP Content-Type contient un + paramètre charset, c'est ce dernier qui sera utilisé.
    2. +
    3. Si les données commancent par une balise XML concernant + l'ordre des octets (BOM) ou par une déclaration d'encodage XML, + c'est celle-ci qui sera utilisée.
    4. +
    5. Si un type d'encodage est déclaré dans un élément HTML + <META>, c'est ce dernier qui sera utilisé.
    6. +
    7. Si aucun des éléments précédents n'est trouvé, c'est la + valeur par défaut définie par la directive + xml2EncDefault qui sera utilisée.
    8. +
    +

    Les conditions sont testées dans cet ordre . Dès qu'une règle + s'applique, elle est utilisée et la détection est terminée.

    +
    + +
    Codage en sortie +

    libxml2 utilise toujours UTF-8 +(Unicode) en interne, et les modules de filtrage basés sur libxml2 +utiliseront cet encodage en sortie par défaut. mod_xml2enc peut modifier +l'encodage en sortie via l'API, mais il n'y a actuellement aucun moyen de le +configurer directement.

    +

    La modification de l'encodage en sortie ne devrait (du moins en théorie) +jamais être nécessaire, et est même déconseillée à cause de la charge de +traitement supplémentaire imposée au serveur par une conversion non +nécessaire.

    +
    + +
    Codages non supportés +

    Si vous travaillez avec des encodages non supportés par aucune des +méthodes de conversion disponibles sur votre plateforme, vous pouvez +tout de même leur associer un alias vers un code supporté via la +directive xml2EncAlias.

    +
    + + +xml2EncDefault +Définit un encodage par défaut à utiliser lorsqu'aucune +information ne peut être automatiquement détectée +xml2EncDefault nom +server config +virtual hostdirectory +.htaccess +Disponible depuis la version 2.4.0 du serveur HTTP Apache +; disponible depuis un module tiers dans les versions antérieures. + + +

    Si vous traitez des données dont l'encodage est connu, mais ne + contenant aucune information à propos de ce dernier, vous pouvez + définir une valeur par défaut afin d'aider mod_xml2enc à traiter + correctement les données. Par exemple, pour définir la valeur par + défaut Latin1 (iso-8859-1 specifiée dans HTTP/1.0), + utilisez :

    + xml2EncDefault iso-8859-1 +
    +
    + + +xml2EncAlias +Définit des alias pour les valeurs d'encodage +xml2EncAlias jeu-de-caractères alias [alias ...] +server config + + +

    Cette directive de niveau serveur permet de définir un ou + plusieurs alias pour un encodage. Elle permet au support d'encodage de + libxml2 de traiter en interne des encodages non reconnus par libxml2 + en utilisant la table de conversion pour un encodage reconnu. Elle + permet d'atteindre deux objectifs : supporter des jeux (ou noms) de + caractères non reconnus par libxml2 ou iconv, et éviter une + conversion pour un encodage lorsque cela n'est pas nécessaire.

    +
    +
    + + +xml2StartParse +Indique à l'interpréteur à partir de quelle balise il doit +commencer son traitement. +xml2StartParse élément [élément ...] +server configvirtual host +directory.htaccess + + +

    Cette directive permet de spécifier à partir de quelle balise, + parmi les éléments spécifiés, l'interpréteur de balise doit + commencer son traitement. Ccei permet de contourner le problème des + serveurs d'arrière-plan qui insèrent des éléments non conformes en + début de données, ce qui a pour effet de perturber l'interpréteur (voir un exemple ici).

    +

    Elle ne doit être utilisée ni pour les documents XML, ni pour les + documents HTML correctement formatés.

    +
    +
    + +
    + diff --git a/docs/manual/mod/mod_xml2enc.xml.meta b/docs/manual/mod/mod_xml2enc.xml.meta index 485a8b43e30..317673379cb 100644 --- a/docs/manual/mod/mod_xml2enc.xml.meta +++ b/docs/manual/mod/mod_xml2enc.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/module-dict.html b/docs/manual/mod/module-dict.html index d00e7b5800f..77738c92554 100644 --- a/docs/manual/mod/module-dict.html +++ b/docs/manual/mod/module-dict.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: module-dict.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: module-dict.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/module-dict.html.en b/docs/manual/mod/module-dict.html.en index 82f22ce3063..0ad3b1a5866 100644 --- a/docs/manual/mod/module-dict.html.en +++ b/docs/manual/mod/module-dict.html.en @@ -1,24 +1,30 @@ - -Terms Used to Describe Modules - Apache HTTP Server +Terms Used to Describe Modules - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Terms Used to Describe Modules

    +Apache > HTTP Server > Documentation > Version 2.4

    Terms Used to Describe Modules

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -32,7 +38,7 @@
  • Source File
  • Module Identifier
  • Compatibility
  • -
    +

    See also

    top

    Description

    @@ -110,10 +116,32 @@

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/module-dict.html.fr b/docs/manual/mod/module-dict.html.fr new file mode 100644 index 00000000000..77f92f96619 --- /dev/null +++ b/docs/manual/mod/module-dict.html.fr @@ -0,0 +1,147 @@ + + + + + +Termes utiliss pour dcrire les modules - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Termes utiliss pour dcrire les modules

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    + +

    Ce document dcrit les termes utiliss pour dcrire chaque module Apache.

    +
    + +
    top
    +
    +

    Description

    + +

    Une brve description des fonctions du module.

    +
    top
    +
    +

    Statut

    + +

    Ce terme indique le degr de rapprochement du module par rapport + au coeur du serveur web Apache ; en d'autres termes, vous pouvez + tre amen recompiler le serveur pour pouvoir accder au module et + ses fonctionnalits. Les valeurs possibles de cet attribut sont + :

    + +
    +
    MPM
    + +
    Un module dont le statut est "MPM" est un module Multi-Processus. A la diffrence des + autres modules, un seul module MPM peut et doit tre utilis par Apache + la fois. Ce type de module est responsable de la rpartition et du + traitement de base des requtes.
    + +
    Base
    + +
    Un module dont le statut est "Base" est compil dans le + serveur et charg avec ce dernier par dfaut ; il est donc + toujours disponible moins que vous n'ayez fait en sorte de + supprimer le module de votre configuration.
    + +
    Extension
    + +
    Un module dont le statut est "Extension" n'est pas compil et + charg dans le serveur par dfaut. Pour activer le module et + accder ses fonctionnalits, vous devez modifier la + configuration de la compilation du serveur et recompiler + Apache.
    + +
    Exprimental
    + +
    Le statut "Experimental" indique que le module fait partie du + kit Apache, mais que vous devez l'utiliser vos risques et + prils. Le module est document des fins d'exhaustivit, et + n'est pas obligatoirement support.
    + +
    Externe
    + +
    Ce statut indique que le module ("module tiers") ne fait pas + partie de la distribution de base d'Apache. Nous ne sommes pas + responsables de ces modules et n'en assurons pas le support.
    +
    +
    top
    +
    +

    Fichier source

    + +

    Il s'agit tout simplement de la liste des noms des fichiers + source qui contiennent le code du module. C'est aussi le nom utilis + par la directive <IfModule>.

    +
    top
    +
    +

    Identificateur de module

    + +

    C'est une chane permettant d'identifier le module utiliser + dans la directive LoadModule + pour le chargement dynamique des modules. En particulier, c'est le + nom de la variable externe de type module dans le fichier + source.

    +
    top
    +
    +

    Compatibilit

    + +

    Si le module ne faisait pas partie de la distribution originale + d'Apache version 2, la version partir de laquelle il est + disponible est indique ici. En outre, si le module n'est disponible + que sur certaines plates-formes, cela sera mentionn ici.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/module-dict.html.ja.utf8 b/docs/manual/mod/module-dict.html.ja.utf8 index 3a5c16dbea6..9ac820063dc 100644 --- a/docs/manual/mod/module-dict.html.ja.utf8 +++ b/docs/manual/mod/module-dict.html.ja.utf8 @@ -1,25 +1,30 @@ - -Apache モジュールの解説で使用する用語 - Apache HTTP サーバ +Apache モジュールの解説で使用する用語 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache モジュールの解説で使用する用語

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    Apache モジュールの解説で使用する用語

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -33,7 +38,7 @@
  • ソースファイル
  • モジュール識別子
  • 互換性
  • -
    +

    参照

    top

    説明

    @@ -112,11 +117,33 @@ 詳細はここに書かれています。

    -

    言語:  en  | +

    翻訳済み言語:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/module-dict.html.ko.euc-kr b/docs/manual/mod/module-dict.html.ko.euc-kr index adfeaf57eda..bedfe23a4d9 100644 --- a/docs/manual/mod/module-dict.html.ko.euc-kr +++ b/docs/manual/mod/module-dict.html.ko.euc-kr @@ -1,24 +1,30 @@ - - ϱ - Apache HTTP Server + ϱ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ϱ

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -32,7 +38,7 @@
  • ҽ
  • -
    +

    top

    @@ -102,10 +108,32 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/module-dict.html.tr.utf8 b/docs/manual/mod/module-dict.html.tr.utf8 index ef1bda50028..962fe3966cd 100644 --- a/docs/manual/mod/module-dict.html.tr.utf8 +++ b/docs/manual/mod/module-dict.html.tr.utf8 @@ -1,24 +1,30 @@ - -Modülleri Tanımlamakta Kullanılan Terimler - Apache HTTP Sunucusu +Modülleri Tanımlamakta Kullanılan Terimler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Modülleri Tanımlamakta Kullanılan Terimler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Modülleri Tanımlamakta Kullanılan Terimler

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -31,7 +37,7 @@
  • Kaynak Dosyası
  • Modül Betimleyici
  • Uyumluluk
  • -
    +

    Ayrıca bakınız:

    top

    Açıklama

    @@ -82,10 +88,32 @@

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/module-dict.xml.fr b/docs/manual/mod/module-dict.xml.fr new file mode 100644 index 00000000000..2be18d735be --- /dev/null +++ b/docs/manual/mod/module-dict.xml.fr @@ -0,0 +1,111 @@ + + + + + + + + + + + + Termes utilisés pour décrire les modules + + +

    Ce document décrit les termes utilisés pour décrire chaque module Apache.

    +
    + +
    Description + +

    Une brève description des fonctions du module.

    +
    + +
    Statut + +

    Ce terme indique le degré de rapprochement du module par rapport + au coeur du serveur web Apache ; en d'autres termes, vous pouvez + être amené à recompiler le serveur pour pouvoir accéder au module et + à ses fonctionnalités. Les valeurs possibles de cet attribut sont + :

    + +
    +
    MPM
    + +
    Un module dont le statut est "MPM" est un module Multi-Processus. A la différence des + autres modules, un seul module MPM peut et doit être utilisé par Apache à + la fois. Ce type de module est responsable de la répartition et du + traitement de base des requêtes.
    + +
    Base
    + +
    Un module dont le statut est "Base" est compilé dans le + serveur et chargé avec ce dernier par défaut ; il est donc + toujours disponible à moins que vous n'ayez fait en sorte de + supprimer le module de votre configuration.
    + +
    Extension
    + +
    Un module dont le statut est "Extension" n'est pas compilé et + chargé dans le serveur par défaut. Pour activer le module et + accéder à ses fonctionnalités, vous devez modifier la + configuration de la compilation du serveur et recompiler + Apache.
    + +
    Expérimental
    + +
    Le statut "Experimental" indique que le module fait partie du + kit Apache, mais que vous devez l'utiliser à vos risques et + périls. Le module est documenté à des fins d'exhaustivité, et + n'est pas obligatoirement supporté.
    + +
    Externe
    + +
    Ce statut indique que le module ("module tiers") ne fait pas + partie de la distribution de base d'Apache. Nous ne sommes pas + responsables de ces modules et n'en assurons pas le support.
    +
    +
    + +
    Fichier source + +

    Il s'agit tout simplement de la liste des noms des fichiers + source qui contiennent le code du module. C'est aussi le nom utilisé + par la directive IfModule.

    +
    + +
    Identificateur de module + +

    C'est une chaîne permettant d'identifier le module à utiliser + dans la directive LoadModule + pour le chargement dynamique des modules. En particulier, c'est le + nom de la variable externe de type module dans le fichier + source.

    +
    + +
    Compatibilité + +

    Si le module ne faisait pas partie de la distribution originale + d'Apache version 2, la version à partir de laquelle il est + disponible est indiquée ici. En outre, si le module n'est disponible + que sur certaines plates-formes, cela sera mentionné ici.

    +
    + +
    diff --git a/docs/manual/mod/module-dict.xml.meta b/docs/manual/mod/module-dict.xml.meta index 2dc35b5d049..1a6a298c364 100644 --- a/docs/manual/mod/module-dict.xml.meta +++ b/docs/manual/mod/module-dict.xml.meta @@ -8,6 +8,7 @@ en + fr ja ko tr diff --git a/docs/manual/mod/mpm_common.html b/docs/manual/mod/mpm_common.html index 059c2662c78..234685936ad 100644 --- a/docs/manual/mod/mpm_common.html +++ b/docs/manual/mod/mpm_common.html @@ -8,6 +8,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mpm_common.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mpm_common.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mpm_common.html.de b/docs/manual/mod/mpm_common.html.de index 8cecc5906ac..0f0bfb32685 100644 --- a/docs/manual/mod/mpm_common.html.de +++ b/docs/manual/mod/mpm_common.html.de @@ -1,28 +1,34 @@ - -mpm_common - Apache HTTP Server +mpm_common - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Allgemeine Direktiven der Apache-MPMs

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    @@ -40,6 +46,7 @@
  • GracefulShutdownTimeout
  • Listen
  • ListenBackLog
  • +
  • ListenCoresBucketsRatio
  • MaxConnectionsPerChild
  • MaxMemFree
  • MaxRequestWorkers
  • @@ -56,7 +63,9 @@
  • ThreadsPerChild
  • ThreadStackSize
  • -
    +

    Bugfix checklist

    Siehe auch

    +
    top

    CoreDumpDirectory-Direktive

    @@ -117,11 +126,11 @@ Ausnahmefehler behandeln lassen kann - - + + - +
    Beschreibung:Specify a timeout after which a gracefully shutdown server will exit.
    Syntax:GracefulShutDownTimeout seconds
    Voreinstellung:GracefulShutDownTimeout 0
    Syntax:GracefulShutdownTimeout seconds
    Voreinstellung:GracefulShutdownTimeout 0
    Kontext:Serverkonfiguration
    Status:MPM
    Modul:prefork, worker, event
    Modul:event, worker, prefork
    Kompatibilitt:Available in version 2.2 and later

    Die Dokumentation zu dieser Direktive wurde noch nicht bersetzt. Bitte schauen Sie in die englische @@ -218,6 +227,24 @@ will exit.

    top
    +

    ListenCoresBucketsRatio-Direktive

    + + + + + + + + +
    Beschreibung:Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    Syntax:ListenCoresBucketsRatio ratio
    Voreinstellung:ListenCoresBucketsRatio 0 (disabled)
    Kontext:Serverkonfiguration
    Status:MPM
    Modul:event, worker, prefork
    Kompatibilitt:Available in Apache HTTP Server 2.4.17, with a kernel supporting +the socket option SO_REUSEPORT and distributing new connections +evenly across listening processes' (or threads') sockets using it (eg. Linux +3.9 and later, but not the current implementations of SO_REUSEPORT +in *BSDs.

    Die Dokumentation zu dieser Direktive wurde + noch nicht bersetzt. Bitte schauen Sie in die englische + Version.

    +
    top

    MaxConnectionsPerChild-Direktive

    - +
    Beschreibung:Limit on the number of connections that an individual child server @@ -226,7 +253,7 @@ will handle during its life
    Voreinstellung:MaxConnectionsPerChild 0
    Kontext:Serverkonfiguration
    Status:MPM
    Modul:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker
    Modul:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    Kompatibilitt:Available Apache HTTP Server 2.3.9 and later. The old name MaxRequestsPerChild is still supported.

    Die Dokumentation zu dieser Direktive wurde @@ -259,7 +286,7 @@ simultaneously Voreinstellung:See usage for details Kontext:Serverkonfiguration Status:MPM -Modul:event, prefork, worker +Modul:event, worker, prefork

    Die Dokumentation zu dieser Direktive wurde noch nicht bersetzt. Bitte schauen Sie in die englische Version.

    @@ -419,7 +446,7 @@ ablegt Voreinstellung:ReceiveBufferSize 0 Kontext:Serverkonfiguration Status:MPM -Modul:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Modul:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    Die Dokumentation zu dieser Direktive wurde noch nicht bersetzt. Bitte schauen Sie in die englische Version.

    @@ -723,9 +750,31 @@ verwendet wird, die Client-Verbindungen bearbeiten.

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_common.html.en b/docs/manual/mod/mpm_common.html.en index 907d31c72cd..a9ce504dbfc 100644 --- a/docs/manual/mod/mpm_common.html.en +++ b/docs/manual/mod/mpm_common.html.en @@ -1,28 +1,34 @@ - -mpm_common - Apache HTTP Server +mpm_common - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM Common Directives

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    @@ -37,6 +43,7 @@ more than one multi-processing module (MPM)
  • GracefulShutdownTimeout
  • Listen
  • ListenBackLog
  • +
  • ListenCoresBucketsRatio
  • MaxConnectionsPerChild
  • MaxMemFree
  • MaxRequestWorkers
  • @@ -53,7 +60,9 @@ more than one multi-processing module (MPM)
  • ThreadsPerChild
  • ThreadStackSize
  • -
    +

    Bugfix checklist

    See also

    +
    top

    CoreDumpDirectory Directive

    @@ -64,7 +73,7 @@ switch before dumping core Default:See usage for the default setting Context:server config Status:MPM -Module:event, prefork, worker +Module:event, worker, prefork

    This controls the directory to which Apache httpd attempts to switch before dumping core. If your operating system is configured to @@ -113,8 +122,7 @@ after a crash Default:EnableExceptionHook Off Context:server config Status:MPM -Module:event, prefork, worker -Compatibility:Available in version 2.0.49 and later +Module:event, worker, prefork

    For safety reasons this directive is only available if the server was configured with the --enable-exception-hook option. It @@ -123,7 +131,7 @@ after a crash

    There are already two modules, mod_whatkilledus and mod_backtrace that make use of this hook. Please have a - look at Jeff Trawick's EnableExceptionHook site for more information about these.

    + look at Jeff Trawick's EnableExceptionHook site for more information about these.

    top
    @@ -131,11 +139,11 @@ after a crash - - + + - +
    Description:Specify a timeout after which a gracefully shutdown server will exit.
    Syntax:GracefulShutDownTimeout seconds
    Default:GracefulShutDownTimeout 0
    Syntax:GracefulShutdownTimeout seconds
    Default:GracefulShutdownTimeout 0
    Context:server config
    Status:MPM
    Module:prefork, worker, event
    Module:event, worker, prefork
    Compatibility:Available in version 2.2 and later

    The GracefulShutdownTimeout specifies @@ -154,9 +162,8 @@ listens to Syntax:Listen [IP-address:]portnumber [protocol] Context:server config Status:MPM -Module:mpm_netware, mpm_winnt, mpmt_os2, prefork, worker, event -Compatibility:Required directive since Apache HTTP Server 2.0
    -The protocol argument was added in 2.1.5 +Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2 +Compatibility:The protocol argument was added in 2.1.5

    The Listen directive instructs Apache httpd to listen to only specific IP addresses or ports; by default it @@ -179,25 +186,22 @@ The protocol argument was added in 2.1.5

    For example, to make the server accept connections on both port 80 and port 8000, use:

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    To make the server accept connections on two specified interfaces and port numbers, use

    -

    - Listen 192.170.2.1:80
    - Listen 192.170.2.5:8000 -

    +
    Listen 192.170.2.1:80
    +Listen 192.170.2.5:8000
    +

    IPv6 addresses must be surrounded in square brackets, as in the following example:

    -

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 -

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +

    The optional protocol argument is not required for most configurations. If not specified, https is the default for @@ -209,9 +213,8 @@ The protocol argument was added in 2.1.5

    You only need to set the protocol if you are running on non-standard ports. For example, running an https site on port 8443:

    -

    - Listen 192.170.2.1:8443 https -

    +
    Listen 192.170.2.1:8443 https
    +

    Error condition

    Multiple Listen directives for the same ip @@ -238,7 +241,7 @@ including other causes. Default:ListenBacklog 511 Context:server config Status:MPM -Module:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    The maximum length of the queue of pending connections. Generally no tuning is needed or desired, however on some @@ -252,6 +255,57 @@ including other causes. but use a number based on (but normally larger than) what is set.

    +
    +
    top
    +

    ListenCoresBucketsRatio Directive

    + + + + + + + + +
    Description:Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    Syntax:ListenCoresBucketsRatio ratio
    Default:ListenCoresBucketsRatio 0 (disabled)
    Context:server config
    Status:MPM
    Module:event, worker, prefork
    Compatibility:Available in Apache HTTP Server 2.4.17, with a kernel supporting +the socket option SO_REUSEPORT and distributing new connections +evenly across listening processes' (or threads') sockets using it (eg. Linux +3.9 and later, but not the current implementations of SO_REUSEPORT +in *BSDs.
    +

    A ratio between the number of (online) CPU cores and the + number of listeners' buckets can be used to make Apache HTTP Server create + num_cpu_cores / ratio listening buckets, each containing its + own Listen-ing socket(s) on the same port(s), and + then make each child handle a single bucket (with round-robin distribution + of the buckets at children creation time).

    + +

    Meaning of "online" CPU core

    +

    On Linux (and also BSD) a CPU core can be turned on/off if + Hotplug + is configured, therefore ListenCoresBucketsRatio needs to + take this parameter into account while calculating the number of buckets to create.

    +
    + +

    ListenCoresBucketsRatio can improve the + scalability when accepting new connections is/becomes the bottleneck. + On systems with a large number of CPU cores, enabling this feature has + been tested to show significant performances improvement and shorter + responses time.

    + +

    There must be at least twice the number of CPU cores than the + configured ratio for this to be active. The recommended + ratio is 8, hence at least 16 + cores should be available at runtime when this value is used. + The right ratio to obtain maximum performance needs to be calculated + for each target system, testing multiple values and observing the variations in your + key performance metrics.

    + +

    This directive influences the calculation of the + MinSpareThreads and + MaxSpareThreads lower bound values. + The number of children processes needs to be a multiple of the number + of buckets to optimally accept connections.

    +
    top

    MaxConnectionsPerChild Directive

    @@ -262,7 +316,7 @@ will handle during its life Default:MaxConnectionsPerChild 0 Context:server config Status:MPM -Module:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2 Compatibility:Available Apache HTTP Server 2.3.9 and later. The old name MaxRequestsPerChild is still supported. @@ -284,14 +338,15 @@ will handle during its life Description:Maximum amount of memory that the main allocator is allowed to hold without calling free() Syntax:MaxMemFree KBytes -Default:MaxMemFree 0 +Default:MaxMemFree 2048 Context:server config Status:MPM -Module:event, mpm_netware, prefork, worker, mpm_winnt +Module:event, worker, prefork, mpm_winnt, mpm_netware

    The MaxMemFree directive sets the - maximum number of free Kbytes that the main allocator is allowed - to hold without calling free(). When not set, or when set + maximum number of free Kbytes that every allocator is allowed + to hold without calling free(). In threaded MPMs, every + thread has its own allocator. When set to zero, the threshold will be set to unlimited.

    @@ -304,7 +359,7 @@ simultaneously Default:See usage for details Context:server config Status:MPM -Module:event, prefork, worker +Module:event, worker, prefork

    The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served. Any @@ -328,7 +383,7 @@ simultaneously you must also raise ServerLimit.

    MaxRequestWorkers was called - MaxClients before version 2.3.13. The old name ist still + MaxClients before version 2.3.13. The old name is still supported.

    @@ -340,16 +395,18 @@ simultaneously Default:See usage for details Context:server config Status:MPM -Module:event, mpm_netware, mpmt_os2, worker +Module:event, worker, mpm_netware, mpmt_os2

    Maximum number of idle threads. Different MPMs deal with this directive differently.

    -

    For worker, the default is - MaxSpareThreads 250. This MPM deals with idle threads +

    For worker and event, the default is + MaxSpareThreads 250. These MPMs deal with idle threads on a server-wide basis. If there are too many idle threads in the server then child processes are killed until the number of idle - threads is less than this number.

    + threads is less than this number. Additional processes/threads + might be created if ListenCoresBucketsRatio + is enabled.

    For mpm_netware the default is MaxSpareThreads 100. Since this MPM runs a @@ -367,9 +424,10 @@ simultaneously

  • mpm_netware wants the value to be greater than MinSpareThreads.
  • -
  • For worker, the value must be greater or equal - to the sum of MinSpareThreads - and ThreadsPerChild.
  • +
  • For worker and event, the value + must be greater or equal to the sum of + MinSpareThreads and + ThreadsPerChild.
  • @@ -389,17 +447,18 @@ spikes Default:See usage for details Context:server config Status:MPM -Module:event, mpm_netware, mpmt_os2, worker +Module:event, worker, mpm_netware, mpmt_os2

    Minimum number of idle threads to handle request spikes. - Different MPMs deal with this directive - differently.

    + Different MPMs deal with this directive differently.

    -

    worker uses a default of MinSpareThreads - 75 and deals with idle threads on a server-wide basis. If - there aren't enough idle threads in the server then child +

    worker and event use a default of + MinSpareThreads 75 and deal with idle threads on a server-wide + basis. If there aren't enough idle threads in the server then child processes are created until the number of idle threads is greater - than number.

    + than number. Additional processes/threads + might be created if ListenCoresBucketsRatio + is enabled.

    mpm_netware uses a default of MinSpareThreads 10 and, since it is a single-process @@ -425,16 +484,15 @@ of the daemon Default:PidFile logs/httpd.pid Context:server config Status:MPM -Module:event, mpm_winnt, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpm_winnt, mpmt_os2

    The PidFile directive sets the file to which the server records the process id of the daemon. If the filename is not absolute then it is assumed to be relative to the ServerRoot.

    -

    Example

    - PidFile /var/run/apache.pid -

    +

    Example

    PidFile /var/run/apache.pid
    +

    It is often useful to be able to send the server a signal, so that it closes and then re-opens its ErrorLog and TransferLog, and @@ -459,7 +517,7 @@ of the daemon Default:ReceiveBufferSize 0 Context:server config Status:MPM -Module:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    The server will set the TCP receive buffer size to the number of bytes specified.

    @@ -474,10 +532,10 @@ of the daemon Description:Location of the file used to store coordination data for the child processes Syntax:ScoreBoardFile file-path -Default:ScoreBoardFile logs/apache_status +Default:ScoreBoardFile logs/apache_runtime_status Context:server config Status:MPM -Module:event, mpm_winnt, prefork, worker +Module:event, worker, prefork, mpm_winnt

    Apache HTTP Server uses a scoreboard to communicate between its parent and child processes. Some architectures require a file to facilitate @@ -487,9 +545,8 @@ the child processes disk (using file-based shared memory). Specifying this directive causes Apache httpd to always create the file on the disk.

    -

    Example

    - ScoreBoardFile /var/run/apache_status -

    +

    Example

    ScoreBoardFile /var/run/apache_runtime_status
    +

    File-based shared memory is useful for third-party applications that require direct access to the scoreboard.

    @@ -513,11 +570,11 @@ Apache HTTP Server Default:SendBufferSize 0 Context:server config Status:MPM -Module:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    Sets the server's TCP send buffer size to the number of bytes specified. It is often useful to set this past the OS's standard - default value on high speed, high latency conections + default value on high speed, high latency connections (i.e., 100ms or so, such as transcontinental fast pipes).

    If set to the value of 0, the server will use the @@ -541,16 +598,19 @@ Apache HTTP Server Default:See usage for details Context:server config Status:MPM -Module:event, prefork, worker +Module:event, worker, prefork

    For the prefork MPM, this directive sets the maximum configured value for MaxRequestWorkers for the lifetime of the - Apache httpd process. For the worker MPM, this directive - in combination with ThreadLimit sets + Apache httpd process. For the worker and event + MPMs, this directive in combination with ThreadLimit sets the maximum configured value for MaxRequestWorkers for the lifetime of the - Apache httpd process. Any attempts to change this directive during a - restart will be ignored, but MaxRequestWorkers can be modified during - a restart.

    + Apache httpd process. For the event MPM, this directive + also defines how many old server processes may keep running and finish processing + open connections. + Any attempts to change this directive during a restart will be ignored, but + MaxRequestWorkers can be modified + during a restart.

    Special care must be taken when using this directive. If ServerLimit is set to a value much higher @@ -564,12 +624,17 @@ Apache HTTP Server Do not set the value of this directive any higher than what you might want to set MaxRequestWorkers to.

    -

    With worker, use this directive only - if your MaxRequestWorkers and - ThreadsPerChild +

    With worker, use this directive only if your + MaxRequestWorkers + and ThreadsPerChild settings require more than 16 server processes (default). Do not set the value of this directive any higher than the number of server - processes required by what you may want for MaxRequestWorkers and ThreadsPerChild.

    + processes required by what you may want for MaxRequestWorkers and ThreadsPerChild.

    + +

    With event, increase this directive if the process + number defined by your MaxRequestWorkers and ThreadsPerChild settings, plus the + number of gracefully shutting down processes, is more than 16 server + processes (default).

    Note

    There is a hard limit of ServerLimit 20000 compiled @@ -592,7 +657,7 @@ Apache HTTP Server Default:See usage for details Context:server config Status:MPM -Module:event, mpmt_os2, prefork, worker +Module:event, worker, prefork, mpmt_os2

    The StartServers directive sets the number of child server processes created on startup. As the number @@ -602,10 +667,10 @@ Apache HTTP Server MinSpareServers, MaxSpareServers) there is usually little reason to adjust this parameter.

    -

    The default value differs from MPM to MPM. worker - defaults to StartServers 3; prefork - defaults to 5; mpmt_os2 defaults to - 2.

    +

    The default value differs from MPM to MPM. worker and + event default to StartServers 3; + prefork defaults to 5; mpmt_os2 + defaults to 2.

    top
    @@ -642,9 +707,7 @@ per child process Default:See usage for details Context:server config Status:MPM -Module:event, mpm_winnt, worker -Compatibility:Available for mpm_winnt in Apache HTTP Server 2.0.41 -and later +Module:event, worker, mpm_winnt

    This directive sets the maximum configured value for ThreadsPerChild for the lifetime of the Apache httpd process. Any attempts to change this directive @@ -667,6 +730,7 @@ and later

    Note

    There is a hard limit of ThreadLimit 20000 (or + ThreadLimit 100000 with event, ThreadLimit 15000 with mpm_winnt) compiled into the server. This is intended to avoid nasty effects caused by typos. To increase it even further past this limit, you @@ -683,7 +747,7 @@ and later Default:See usage for details Context:server config Status:MPM -Module:event, mpm_winnt, worker +Module:event, worker, mpm_winnt

    This directive sets the number of threads created by each child process. The child creates these threads at startup and @@ -708,7 +772,7 @@ client connections Default:65536 on NetWare; varies on other operating systems Context:server config Status:MPM -Module:event, mpm_netware, mpmt_os2, mpm_winnt, worker, event +Module:event, worker, mpm_winnt, mpm_netware, mpmt_os2 Compatibility:Available in Apache HTTP Server 2.1 and later

    The ThreadStackSize directive sets the @@ -759,9 +823,31 @@ client connections

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_common.html.fr b/docs/manual/mod/mpm_common.html.fr new file mode 100644 index 00000000000..74e1c7f619e --- /dev/null +++ b/docs/manual/mod/mpm_common.html.fr @@ -0,0 +1,932 @@ + + + + + +mpm_common - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM : Directives Communes

    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    + +
    Description:Une srie de directives implmentes par plusieurs +modules multi-processus (MPM)
    Statut:MPM
    +
    + + +
    top
    +

    Directive CoreDumpDirectory

    + + + + + + + +
    Description:Le rpertoire dans lequel le serveur HTTP Apache va tenter de se +positionner avant d'effectuer un vidage mmoire
    Syntaxe:CoreDumpDirectory rpertoire
    Dfaut:Voir ci-dessous pour le rpertoire par dfaut
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    +

    Cette directive permet de dfinir le rpertoire dans lequel + Apache httpd va tenter de se positionner avant d'effectuer un vidage + mmoire sur disque. + Si votre systme d'exploitation est configur pour crer des + fichiers de vidage mmoire dans le rpertoire de travail des + processus qui se sont crashs, + CoreDumpDirectory est ncessaire pour + dfinir un rpertoire de travail autre que le rpertoire par dfaut + ServerRoot, ce rpertoire de + travail ne devant pas tre accessible en criture par l'utilisateur sous + lequel le serveur s'excute.

    + +

    Si vous avez besoin d'un vidage mmoire pour le dbogage, vous + pouvez utiliser cette directive pour le placer un endroit + diffrent. Cette directive n'a aucun effet si votre systme + d'exploitation n'est pas configur pour crer des + fichiers de vidage mmoire dans le rpertoire de travail des + processus qui se sont crashs.

    + +

    Vidages mmoire sous Linux

    +

    Si Apache httpd est dmarr sous l'utilisateur root puis bascule vers + un autre utilisateur, le noyau Linux dsactive les + vidages mmoire, mme si le rpertoire est accessible en criture au + processus. Apache httpd (versions 2.0.46 et suprieures) ractive les + vidages mmoire sous Linux 2.4 et au del, mais seulement si vous + dfinissez une directive CoreDumpDirectory.

    +
    + +
    +

    Vidages mmoire sous BSD

    +

    Pour activer le vidage mmoire des excutables suid sur les + systmes de style BSD (comme FreeBSD), dfinissez + kern.sugid_coredump 1. +

    +
    + +

    Signaux spcifiques

    +

    CoreDumpDirectory n'est trait qu' la + reception d'un certain nombre de signaux , SIGFPE, SIGILL, SIGABORT, + SIGSEGV, et SIGBUS.

    +

    + Sur certains systmes d'exploitation, SIGQUIT provoque aussi un + vidage mmoire, mais n'est pas trait par les directives + CoreDumpDirectory ou + EnableExceptionHook, si bien que la + dfinition du rpertoire d'enregistrement du vidage mmoire est + entirement dvolue au systme d'exploitation.

    +
    + +
    +
    top
    +

    Directive EnableExceptionHook

    + + + + + + + +
    Description:Active un hook ("point d'accrochage logiciel") qui excute des +gestionnaires d'exception aprs un crash
    Syntaxe:EnableExceptionHook On|Off
    Dfaut:EnableExceptionHook Off
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    +

    Pour des raisons de scurit, cette directive n'est disponible + que si la compilation du serveur a t configure avec l'option + --enable-exception-hook. Elle permet d'activer un hook + ("point d'accrochage logiciel") + qui autorise certains modules externes effectuer un branchement et + accomplir telle ou telle action aprs le crash d'un processus + enfant.

    + +

    Deux modules, mod_whatkilledus et + mod_backtrace utilisent ce hook. Veuillez vous + rfrer la page EnableExceptionHook de Jeff Trawick pour plus + d'informations leur sujet.

    + +
    +
    top
    +

    Directive GracefulShutdownTimeout

    + + + + + + + + +
    Description:Spcifie le dlai maximum aprs lequel le serveur va +s'arrter dans le cas d'un arrt "en douceur"
    Syntaxe:GracefulShutdownTimeout seconds
    Dfaut:GracefulShutdownTimeout 0
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    Compatibilit:Disponible dans les versions 2.2 et suprieures
    +

    La directive GracefulShutdownTimeout + permet de spcifier le temps, en secondes, pendant lequel le serveur + va continuer fonctionner aprs avoir reu un signal + "graceful-stop" ("Arrt en douceur"), afin de terminer le traitement + des connexions en cours.

    + +

    Dfinir cette valeur zro signifie au serveur d'attendre + jusqu' ce que toutes les requtes en cours aient t traites.

    + +
    +
    top
    +

    Directive Listen

    + + + + + + + +
    Description:Les adresses IP et ports sur lesquels le serveur coute
    Syntaxe:Listen [adresse IP:]numro port +[protocole]
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    Compatibilit:L'argument protocole est support depuis la version +2.1.5
    +

    La directive Listen permet de signifier + Apache httpd de ne se mettre l'coute que sur les adresses IP et ports spcifis ; par + dfaut, le serveur rpond aux requtes en provenance de toutes les + interfaces rseau. La directive Listen est + dornavant requise, et si elle est absente du fichier de + configuration, le serveur refusera de dmarrer. Ceci constitue un + changement par rapport aux versions prcdentes d'Apache httpd.

    + +

    La directive Listen signifie au serveur de + n'accepter les requtes entrantes que vers le port ou le couple + adresse-port spcifi. Si seulement un port est spcifi, le serveur + se met l'coute sur ce port sur toutes les interfaces rseau. Si une adresse IP + et un port sont spcifis, le serveur va se mettre l'coute sur ce port sur + l'interface rseau correspondant l'adresse IP.

    + +

    On peut utiliser autant de directives + Listen que ncessaire pour spcifier + plusieurs adresses et/ou ports couter. Le serveur rpondra aux + requtes vers tous les adresses et ports spcifis.

    + +

    Par exemple, pour que le serveur accepte les connexions sur les + ports 80 et 8000, utilisez :

    + +
    Listen 80
    +Listen 8000
    + + +

    Pour que le serveur accepte les connexions sur deux interfaces et + ports particuliers, spcifiez :

    + +
    Listen 192.170.2.1:80
    +Listen 192.170.2.5:8000
    + + +

    Les adressee IPv6 doivent tre entoures de crochets, comme dans + l'exemple suivant :

    + +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    + + +

    L'argument optionnel protocole n'est pas ncessaire + dans la plupart des configurations. S'il est absent, + https est la valeur par dfaut pour le port 443 et + http l'est pour tous les autres ports. L'argument + protocole sert dterminer quel module doit traiter une requte, et + appliquer des optimisations spcifiques certains protocoles + l'aide de la directive AcceptFilter.

    + +

    La spcification d'un protocole n'est ncessaire que si vous + utilisez des ports non standards. Par exemple, pour configurer un + site en https sur le port 8443 :

    + +
    Listen 192.170.2.1:8443 https
    + + +

    Condition d'erreur

    + Plusieurs directives Listen pour les mmes + adresse IP/port vont provoquer l'envoi d'un message d'erreur + Address already in use. +
    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive ListenBackLog

    + + + + + + + +
    Description:Longueur maximale de la liste d'attente des +connexions
    Syntaxe:ListenBacklog backlog
    Dfaut:ListenBacklog 511
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    +

    La longueur maximale de la liste d'attente des connexions. En + gnral, aucune modification n'est ncessaire, ni mme souhaitable ; + cependant, sur certains systmes, il peut tre ncessaire + d'en augmenter la valeur en cas d'attaque TCP SYN flood (envoi en + masse de requtes SYN pour saturer le serveur). Voir le paramtre + backlog de l'appel systme listen(2).

    + +

    En fait, l'argument backlog sera souvent limit une valeur + infrieure en fonction du systme d'exploitation. Notez aussi que de + nombreux systmes d'exploitation ne tiennent pas vraiment compte de + la valeur spcifie pour l'argument backlog, mais s'en inspirent + seulement (et choisissent en gnral une valeur suprieure).

    + +
    +
    top
    +

    Directive ListenCoresBucketsRatio

    + + + + + + + + +
    Description:Rapport entre le nombre de coeurs de processeur activs et +le nombre de segments d'coute
    Syntaxe:ListenCoresBucketsRatio ratio
    Dfaut:ListenCoresBucketsRatio 0 (disabled)
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    Compatibilit:Disponible partir de la version 2.4.13 du serveur HTTP +Apache, avec un noyau supportant l'option de socket +SO_REUSEPORT, et distribuant uniformment les nouvelles +connexions aux sockets d'coute des processus (ou threads) qui +l'utilisent (par exemple Linux versions 3.9 et ultrieures, mais pas +l'implmentation courante de SO_REUSEPORT par les +plateformes de type BSD.
    +

    Vous pouvez utiliser la directive + ListenCoresBucketsRatio pour spcifier un + ratio entre le nombre de coeurs de CPU activs et le + nombre de segments d'coute (listeners' buckets) souhaits ; le + serveur HTTP Apache va alors crernum_cpu_cores / ratio + segments d'coute, chacun contenant son propre socket d'coute + Listen sur le ou les mmes ports ; chaque + processus enfant sera associ un seul segment d'coute (avec une + distribution de type round-robin des segments la cration des + processus enfants).

    + +

    Dfinition du terme coeur de CPU activ ("online")

    +

    Sous Linux et BSD, un coeur de CPU peut tre activ ou dsactiv si Hotplug + a t configur ; la directive + ListenCoresBucketsRatio doit donc tenir compte de ce + paramtre pour calculer le nombre de segments d'coute crer.

    +
    + +

    La directive ListenCoresBucketsRatio peut + amliorer le support de la monte en charge lorsque l'arrive de + nouvelles connexions est/devient un goulot d'tranglement. Le test + de cette fonctionnalit avec des machines possdant un nombre de + coeurs de CPU important a permit de constater une amlioration des + performances significative et des temps de rponse plus courts.

    + +

    Pour que cette fonctionnalit soit active, le nombre de coeurs + de CPU doit tre gal au moins au double du ratio + spcifi. Si vous spcifiez la valeur recommande pour + ratio, savoir 8, le nombre minimum de + coeurs de processeurs disponibles sera alors de 16. La valeur + optimale de ratio permettant d'obtenir des performances maximales + doit tre calcule pour chaque systme cible, en testant plusieurs valeurs + et en observant les rsultats.

    + +

    Cette directive influence le calcul des valeurs limites infrieures de + MinSpareThreads et MaxSpareThreads. En effet, pour accepter les + connexions de manire optimale, le nombre de processus enfants doit tre un + multiple du nombre de segments d'coute.

    + +
    +
    top
    +

    Directive MaxConnectionsPerChild

    + + + + + + + + +
    Description:Limite le nombre de connexions qu'un processus enfant va +traiter au cours de son fonctionnement
    Syntaxe:MaxConnectionsPerChild number
    Dfaut:MaxConnectionsPerChild 0
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    Compatibilit:Disponible depuis la version 2.3.9 du serveur HTTP +Apache. L'ancien nom MaxRequestsPerChild est encore +support.
    +

    La directive MaxConnectionsPerChild permet de + dfinir le nombre maximum de connexions qu'un processus enfant va + pouvoir traiter au cours de son fonctionnement. Lorsqu'il a trait + MaxConnectionsPerChild connexions, le processus + enfant est arrt. Si MaxConnectionsPerChild est + dfinie 0, il n'y a plus aucune limite sur le nombre + de connexions que le processus pourra traiter.

    + +

    Dfinir MaxConnectionsPerChild une valeur + non nulle limite la quantit de mmoire qu'un processus peut + consommer cause de fuites (accidentelles) de mmoire.

    + + +
    +
    top
    +

    Directive MaxMemFree

    + + + + + + + +
    Description:Quantit maximale de mmoire que l'allocateur principal est +autoris conserver sans appeler free()
    Syntaxe:MaxMemFree KOctets
    Dfaut:MaxMemFree 2048
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware
    +

    La directive MaxMemFree permet de dfinir + le nombre maximum de KOctets libres que tout allocateur est + autoris conserver sans appeler free(). Dans les MPMs + threads, chaque thread possde son propre allocateur. Si elle est + dfinie 0, la quantit de mmoire libre que peut conserver un + allocateur est illimite.

    + +
    +
    top
    +

    Directive MaxRequestWorkers

    + + + + + + + +
    Description:Nombre maximum de connexions pouvant tre traites +simultanment
    Syntaxe:MaxRequestWorkers nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    +

    La directive MaxRequestWorkers permet de fixer le + nombre maximum de requtes pouvant tre traites simultanment. + Si la limite MaxRequestWorkers est atteinte, toute + tentative de connexion sera normalement mise dans une file + d'attente, et ceci jusqu' un certain nombre dpendant de la + directive ListenBacklog. + Lorsqu'un processus enfant se librera suite la fin du traitement + d'une requte, la connexion en attente pourra tre traite son + tour.

    + +

    Pour les serveurs non threads (c'est dire utilisant + prefork), la directive + MaxRequestWorkers dfinit alors le nombre maximum de + processus enfants qui pourront tre lancs simultanment pour + traiter les requtes. La valeur par dfaut est 256 ; si + vous l'augmentez, vous devez aussi augmenter la valeur de la + directive ServerLimit.

    + +

    Pour les serveur threads et hybrides (utilisant par + exemple event ou worker), + MaxRequestWorkers dfinit alors le nombre total de + threads qui seront disponibles pour servir les clients. Dans le + cas des MPMs hybrides, la valeur par dfaut est 16 + (directive ServerLimit) multipli par la valeur + 25 (directive ThreadsPerChild). Par consquent, pour affecter la + directive MaxRequestWorkers une valeur qui requiert + plus de 16 processus, vous devez aussi augmenter la valeur de la + directive ServerLimit.

    + +

    Le nom de la directive MaxRequestWorkers + tait MaxClients avant la version 2.3.13. Cet + ancien nom est encore support.

    + +
    +
    top
    +

    Directive MaxSpareThreads

    + + + + + + + +
    Description:Nombre maximum de threads inactifs
    Syntaxe:MaxSpareThreads nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, mpm_netware, mpmt_os2
    +

    C'est le nombre maximum de threads inactifs. Les MPMs utilisent + cette directive de diffrentes manires.

    + +

    Pour worker et event, la dfinition par dfaut est + MaxSpareThreads 250. Ce MPM gre les threads inactifs + au niveau du serveur. Si le serveur possde trop de threads + inactifs, des processus enfants seront arrts jusqu' ce que le + nombre de threads inactifs repasse en dessous de cette limite. Des + processus/threads supplmentaires sont susceptibles d'tre crs si + ListenCoresBucketsRatio est + active.

    + +

    Pour mpm_netware, la dfinition par dfaut est + MaxSpareThreads 100. Comme ce MPM n'excute qu'un seul + processus, le nombre de processus inactifs est surveill au + niveau du serveur.

    + +

    mpmt_os2 fonctionne de manire similaire + mpm_netware. Pour mpmt_os2, la + valeur par dfaut est 10.

    + +

    Contraintes

    +

    La gamme de valeurs pour MaxSpareThreads + est limite. Apache httpd corrigera automatiquement cette valeur selon + les rgles suivantes :

    + +
    + +

    Voir aussi

    + +
    +
    top
    +

    Directive MinSpareThreads

    + + + + + + + +
    Description:Nombre minimum de threads inactifs qui seront disponibles +pour pouvoir traiter les pics de requtes
    Syntaxe:MinSpareThreads nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, mpm_netware, mpmt_os2
    +

    C'est le nombre minimum de threads inactifs pour tre en mesure + de traiter les pics de requtes. Les MPMs utilisent cette directive + de diffrentes manires.

    + +

    Avec worker et event, la dfinition par dfaut est + MinSpareThreads 75, et le nombre de threads inactifs + est surveill au niveau du serveur. Si le serveur ne possde pas + assez de threads inactifs, des processus enfants sont crs jusqu' + ce que le nombre de threads inactifs repasse au dessus de + nombre. Des processus/threads supplmentaires peuvent + tre crs si ListenCoresBucketsRatio est active.

    + +

    Avec mpm_netware, la dfinition par dfaut est + MinSpareThreads 10 et, comme ce MPM n'excute qu'un + seul processus, le nombre de threads est surveill au niveau du + serveur.

    + +

    mpmt_os2 fonctionne de manire similaire + mpm_netware. Pour mpmt_os2, la + valeur par dfaut est 5.

    + + +

    Voir aussi

    + +
    +
    top
    +

    Directive PidFile

    + + + + + + + +
    Description:Ficher dans lequel le serveur enregistre l'identificateur +de processus du dmon
    Syntaxe:PidFile nom fichier
    Dfaut:PidFile logs/httpd.pid
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpmt_os2
    +

    La directive PidFile permet de dfinir le + ficher dans lequel le serveur + enregistre l'identificateur de processus du dmon. Si le chemin du + fichier n'est pas absolu, il est considr comme relatif au chemin + dfini par la directive ServerRoot.

    + +

    Exemple

    PidFile /var/run/apache.pid
    +
    + +

    Il est souvent utile de pouvoir envoyer un signal au + serveur afin qu'il ferme et ouvre nouveau ses journaux + d'erreur et de transfert, et recharge son + fichier de configuration. Pour ce faire, on envoie un signal SIGHUP + (kill -1) l'identificateur de processus enregistr dans le fichier + dfini par la directive PidFile.

    + +

    La directive PidFile fait l'objet des + mmes avertissements que ceux concernant le chemin d'enregistrement + des fichiers journaux et la scurit.

    + +

    Note

    +

    Depuis la version 2 du serveur HTTP Apache, nous recommandons de n'utiliser + que le script apachectl, ou le script de + dmarrage fourni avec votre systme d'exploitation pour (re)dmarrer ou + arrter le serveur.

    +
    + +
    +
    top
    +

    Directive ReceiveBufferSize

    + + + + + + + +
    Description:Taille du tampon TCP en entre
    Syntaxe:ReceiveBufferSize octets
    Dfaut:ReceiveBufferSize 0
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    +

    Le serveur va fixer la taille du tampon TCP en entre au + nombre d'octets spcifi.

    + +

    Si la directive est dfinie 0, le serveur va + utiliser la valeur par dfaut adopte par le systme + d'exploitation.

    + +
    +
    top
    +

    Directive ScoreBoardFile

    + + + + + + + +
    Description:Chemin du fichier o sont stockes les donnes concernant +la coordination des processus enfants
    Syntaxe:ScoreBoardFile chemin fichier
    Dfaut:ScoreBoardFile logs/apache_runtime_status
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt
    +

    Le serveur HTTP Apache utilise un tableau de bord pour la + communication entre le processus parent et les processus enfants. + Pour faciliter cette communication, certaines architectures + ncessitent un fichier. En l'absence de cette directive, donc si + aucun nom de fichier n'est spcifi, Apache httpd tentera tout + d'abord de crer un tableau uniquement en mmoire (en utilisant la + mmoire partage anonyme) ; et si il n'y parvient pas, il tentera de + crer un fichier sur disque (en utilisant la mmoire partage base + de fichier). Si cette directive est utilise, Apache httpd crera + systmatiquement un fichier sur disque.

    + +

    Exemple

    ScoreBoardFile /var/run/apache_runtime_status
    +
    + +

    Une mmoire partage sous forme de fichier est utile pour les + applications tierces qui ncessitent un accs direct au tableau de + bord des processus.

    + +

    Si vous utilisez un ScoreBoardFile, vous + pourrez constater une amlioration des performances en le plaant + sur un disque virtuel en RAM. Assurez-vous cependant de tenir compte + des mmes avertissements que ceux concernant le chemin du fichier + journal et la scurit.

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive SendBufferSize

    + + + + + + + +
    Description:Taille du tampon TCP en sortie
    Syntaxe:SendBufferSize octets
    Dfaut:SendBufferSize 0
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    +

    Dfinit la taille du tampon TCP en sortie avec le nombre + d'octets spcifi. Ceci s'avre souvent trs utile pour augmenter les + valeurs par dfaut standards du pass des systmes d'exploitation + pour les transmissions grande vitesse et haute densit (c'est + dire de l'ordre de 100ms comme sur les liaisons rapides + transcontinentales).

    + +

    Si la directive est dfinie 0, le serveur va + utiliser la valeur par dfaut adopte par le systme + d'exploitation.

    + +

    L'amlioration des performances des connexions grande vitesse + et temps de latence lev, peut ncessiter + une intervention au niveau de la configuration de votre systme + d'exploitation.

    + +

    Sous certains systmes d'exploitation, la modification du + comportement TCP via une augmentation de la valeur de + SendBufferSize risque de ne pas tre + perceptible, si la directive EnableSendfile n'est pas dfinie OFF. + Cette interaction ne s'applique qu'aux fichiers statiques.

    + +
    +
    top
    +

    Directive ServerLimit

    + + + + + + + +
    Description:Limite suprieure de la dfinition du nombre de +processus
    Syntaxe:ServerLimit nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork
    +

    Avec le MPM prefork, cette directive dfinit le + nombre maximum que l'on peut affecter la directive MaxRequestWorkers, et ceci pour la + dure de vie du processus Apache httpd. Avec les + MPMs worker et event, cette directive, en combinaison avec + ThreadLimit, dfinit le + nombre maximum que l'on peut affecter MaxRequestWorkers, et ceci pour la dure de + vie du processus Apache httpd. Au cours d'un redmarrage, vous pouvez + modifier la valeur de la directive MaxRequestWorkers, alors que toute + tentative de modification de la valeur de la directive ServerLimit sera ignore.

    + +

    Cette directive doit tre utilise avec prcaution. Si + ServerLimit est dfinie une valeur beaucoup + plus grande que ncessaire, de la mmoire partage supplmentaire + sera inutilement alloue. Si la fois + ServerLimit et MaxRequestWorkers possdent des valeurs + suprieures ce que le systme peut supporter, ce dernier peut + devenir instable ou Apache httpd peut tout simplement refuser de dmarrer.

    + +

    Avec les MPMs prefork et event, n'utilisez cette directive + que si vous devez dfinir MaxRequestWorkers une valeur suprieure + 256 (valeur par dfaut). N'affectez pas la directive ServerLimit une valeur suprieure + celle que vous avez prvu d'affecter la directive MaxRequestWorkers.

    + +

    Avec worker, n'utilisez cette directive que si + la dfinition de vos directives MaxRequestWorkers et ThreadsPerChild ncessitent plus de + 16 processus serveurs (valeur par dfaut). N'affectez pas la + directive ServerLimit une + valeur suprieure au nombre de processus requis pour la dfinition + des directives MaxRequestWorkers + et ThreadsPerChild.

    + +

    Note

    +

    Il existe une limite de ServerLimit 20000 code en + dur dans le serveur (200000 pour le MPM prefork). + Ceci est cens viter les effets dsastreux que pourrait provoquer + une faute de frappe. Pour dpasser cette limite, vous devez + modifier la valeur de MAX_SERVER_LIMIT dans le fichier source du + mpm et recompiler le serveur.

    +
    + +

    Voir aussi

    + +
    +
    top
    +

    Directive StartServers

    + + + + + + + +
    Description:Nombre de processus enfants du serveur crs au +dmarrage
    Syntaxe:StartServers nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, prefork, mpmt_os2
    +

    La directive StartServers permet de + dfinir le nombre de processus enfants du serveur crs au + dmarrage. Comme le nombre de processus est contrl dynamiquement + en fonction de la charge (voir MinSpareThreads, MaxSpareThreads, MinSpareServers, MaxSpareServers), il n'est en gnral + pas ncessaire d'ajuster ce paramtre.

    + +

    La valeur par dfaut diffre d'un MPM l'autre. Pour + worker et event, la dfinition par dfaut est + StartServers 3 ; la valeur par dfaut est + 5 pour prefork et 2 + pour mpmt_os2.

    + +
    +
    top
    +

    Directive StartThreads

    + + + + + + + +
    Description:Nombre de threads crs au dmarrage
    Syntaxe:StartThreads nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:mpm_netware
    +

    C'est le nombre de threads crs au dmarrage du serveur. Comme + le nombre de threads est contrl dynamiquement + en fonction de la charge (voir MinSpareThreads, MaxSpareThreads, MinSpareServers, MaxSpareServers), il n'est en gnral + pas ncessaire d'ajuster ce paramtre.

    + +

    Pour mpm_netware, la dfinition par dfaut est + StartThreads 50 et, comme il n'y a qu'un processus, il + s'agit du nombre total de threads crs au dmarrage pour servir les + requtes.

    + +
    +
    top
    +

    Directive ThreadLimit

    + + + + + + + +
    Description:Le nombre de threads maximum que l'on peut dfinir par +processus enfant
    Syntaxe:ThreadLimit nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, mpm_winnt
    +

    Cette directive permet de dfinir le nombre maximum que l'on peut + affecter la directive ThreadsPerChild pour la dure de vie + du processus Apache httpd. La directive ThreadsPerChild peut tre modifie + au cours d'un redmarrage jusqu' la valeur de la directive ThreadLimit, mais toute tentative + de modification de la directive ThreadLimit au cours d'un + redmarrage sera ignore.

    + +

    L'utilisation de cette directive doit faire l'objet de + prcautions particulires. Si ThreadLimit est + dfinie une valeur trs suprieure la directive ThreadsPerChild, de la mmoire + partage supplmentaire sera inutilement alloue. Si les directives + ThreadLimit et ThreadsPerChild sont dfinies des + valeurs suprieures ce que le systme peut supporter, ce dernier + peut devenir instable, ou Apache httpd peut tout simplement refuser de + dmarrer. Ne dfinissez pas cette directive une valeur suprieure + la valeur maximale que vous pensez affecter la directive ThreadsPerChild pour le processus + Apache httpd en cours d'excution.

    + +

    La valeur par dfaut de la directive + ThreadLimit est 1920 avec + mpm_winnt, et 64 avec les autres + MPMs.

    + +

    Note

    +

    Il existe une limite de ThreadLimit 20000 (ou + ThreadLimit 100000 avec event, + ThreadLimit 15000 avec mpm_winnt) + code en dur dans le serveur. Ceci est cens viter les effets + dsastreux que pourrait provoquer une faute de frappe. Pour + dpasser cette limite, vous devez modifier la valeur de + MAX_THREAD_LIMIT dans le fichier source du mpm et recompiler le + serveur.

    +
    + +
    +
    top
    +

    Directive ThreadsPerChild

    + + + + + + + +
    Description:Nombre de threads crs par chaque processus +enfant
    Syntaxe:ThreadsPerChild nombre
    Dfaut:Voir ci-dessous pour plus de dtails
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, mpm_winnt
    +

    Cette directive permet de dfinir le nombre de threads que va + crer chaque processus enfant. Un processus enfant cre ces threads + au dmarrage et n'en cre plus d'autres par la suite. Si l'on + utilise un MPM comme mpm_winnt qui ne lance qu'un + processus enfant, ce nombre doit tre suffisamment grand pour + supporter la charge du serveur. Avec un MPM comme + worker qui lance plusieurs processus enfants, c'est + le nombre total de threads qui doit tre suffisamment grand + pour supporter la charge du serveur.

    + +

    La valeur par dfaut de la directive + ThreadsPerChild est 64 avec + mpm_winnt, et 25 avec les autres + MPMs.

    + +
    +
    top
    +

    Directive ThreadStackSize

    + + + + + + + + +
    Description:La taille en octets de la pile qu'utilisent les threads qui +traitent les connexions clients
    Syntaxe:ThreadStackSize taille
    Dfaut:65536 sous NetWare; varie en fonction des autres systmes +d'exploitation
    Contexte:configuration du serveur
    Statut:MPM
    Module:event, worker, mpm_winnt, mpm_netware, mpmt_os2
    Compatibilit:Disponible dans les versions 2.1 et suprieures +du serveur HTTP Apache
    +

    La directive ThreadStackSize permet de + dfinir la taille de la pile (pour les donnes propres) qu'utilisent + les threads qui traitent les connexions clients en faisant appel + des modules. Dans la plupart des cas, la valeur par dfaut de la + taille de la pile du systme d'exploitation convient, mais il existe + certaines situations o il peut s'avrer ncessaire de l'ajuster + :

    + +
      +
    • Sur les plates-formes qui possdent une valeur par dfaut de + taille de la pile relativement petite (par exemple HP-UX), Apache + httpd peut se crasher si l'on utilise certains modules tiers qui + possdent un quantit de donnes propres stockes relativement + importante. Il se peut que ces mmes modules fonctionnent + correctement sur d'autres plate-formes o la valeur par dfaut de + la taille de la pile est suprieure. Ce type de crash peut tre + evit en dfinissant ThreadStackSize une + valeur suprieure la valeur par dfaut du systme + d'exploitation. Ce type d'ajustement n'est ncessaire que si le + fournisseur du module tiers en fait mention, ou si le diagnostic + d'un crash d'Apache httpd indique que la taille de la pile tait trop + petite.
    • + +
    • Sur les plates-formes o la taille par dfaut de la pile des + threads est sensiblement suprieure la taille ncessaire pour la + configuration du serveur web, il est possible de disposer d'un + plus grand nombre de threads par processus enfant si la directive + ThreadStackSize est dfinie une valeur + infrieure la valeur par dfaut du systme d'exploitation. + Cependant, ce + type d'ajustement ne doit tre effectu que dans un environnement + de test permettant de qualifier le serveur web au maximum de ses + possibilits, car il peut arriver, dans de rares cas, que des + requtes ncessitent une taille de pile suprieure pour pouvoir + tre traites. La taille minimale requise pour la pile dpend + fortement des modules utiliss, mais toute modification dans la + configuration du serveur web peut invalider la dfinition courante + de la directive ThreadStackSize.
    • + +
    • Sous Linux, cette directive ne peut tre utilise que pour + augmenter la valeur par defaut de la taille de la pile, car + l'appel systme sous-jacent utilise cette valeur comme taille de pile + minimale. C'est la limite logicielle (souvent leve) + pour ulimit -s (8Mo si aucune limite) qui est + utilise comme taille de pile par dfaut.
    • +
    + +
    Il est recommand de ne pas rduire + ThreadStackSize, moins qu'un grand nombre + de threads par processus enfant ne soit ncessaire. Sur certaines + plates-formes (y compris Linux), une valeur de 128000 est dj trop + basse et provoque des crashes avec certains modules courants.
    + +
    +
    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mpm_common.html.ja.utf8 b/docs/manual/mod/mpm_common.html.ja.utf8 index 13977944e45..47072c14c6a 100644 --- a/docs/manual/mod/mpm_common.html.ja.utf8 +++ b/docs/manual/mod/mpm_common.html.ja.utf8 @@ -1,34 +1,41 @@ - -mpm_common - Apache HTTP サーバ +mpm_common - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache MPM 共通ディレクティブ

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    説明:二つ以上のマルチプロセッシングモジュール (MPM) で実装されているディレクティブのコレクション
    ステータス:MPM
    @@ -40,6 +47,7 @@
  • GracefulShutdownTimeout
  • Listen
  • ListenBackLog
  • +
  • ListenCoresBucketsRatio
  • MaxConnectionsPerChild
  • MaxMemFree
  • MaxRequestWorkers
  • @@ -56,7 +64,9 @@
  • ThreadsPerChild
  • ThreadStackSize
  • -
    +

    Bugfix checklist

    参照

    +
    top
    top
    +

    ListenCoresBucketsRatio ディレクティブ

    + + + + + + + + +
    説明:Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    構文:ListenCoresBucketsRatio ratio
    デフォルト:ListenCoresBucketsRatio 0 (disabled)
    コンテキスト:サーバ設定ファイル
    ステータス:MPM
    モジュール:event, worker, prefork
    互換性:Available in Apache HTTP Server 2.4.17, with a kernel supporting +the socket option SO_REUSEPORT and distributing new connections +evenly across listening processes' (or threads') sockets using it (eg. Linux +3.9 and later, but not the current implementations of SO_REUSEPORT +in *BSDs.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    MaxConnectionsPerChild ディレクティブ

    - + -
    説明:Limit on the number of connections that an individual child server @@ -244,12 +272,12 @@ will handle during its life
    デフォルト:MaxConnectionsPerChild 0
    コンテキスト:サーバ設定ファイル
    ステータス:MPM
    モジュール:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker
    モジュール:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2
    互換性:Available Apache HTTP Server 2.3.9 and later. The old name MaxRequestsPerChild is still supported.

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    MaxMemFree ディレクティブ

    @@ -276,10 +304,10 @@ simultaneously - -
    デフォルト:See usage for details
    コンテキスト:サーバ設定ファイル
    ステータス:MPM
    モジュール:event, prefork, worker

    The documentation for this directive has - not been translated yet. Please have a look at the English - version.

    +モジュール:event, worker, prefork +

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    top

    MaxSpareThreads ディレクティブ

    @@ -551,7 +579,7 @@ simultaneouslyThreadsPerChild の設定で 16 サーバプロセス (デフォルト) 以上必要になる場合にのみ使用してください。希望の - MaxClients と + MaxClients ThreadsPerChild とくらべて、必要となるサーバプロセス数以上に大きな値を 設定することは避けてください。

    @@ -741,11 +769,33 @@ simultaneously
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_common.html.tr.utf8 b/docs/manual/mod/mpm_common.html.tr.utf8 index 480d13c71da..8c34b68364c 100644 --- a/docs/manual/mod/mpm_common.html.tr.utf8 +++ b/docs/manual/mod/mpm_common.html.tr.utf8 @@ -1,32 +1,37 @@ - -mpm_common - Apache HTTP Sunucusu +mpm_common - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache MPM Ortak Yönergeleri

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    Açıklama:Birden fazla Çok Süreçlilik Modülü (MPM) tarafından gerçeklenmiş yönergeler bütünü.
    Durum:MPM
    @@ -38,6 +43,7 @@
  • GracefulShutdownTimeout
  • Listen
  • ListenBackLog
  • +
  • ListenCoresBucketsRatio
  • MaxConnectionsPerChild
  • MaxMemFree
  • MaxRequestWorkers
  • @@ -54,43 +60,54 @@
  • ThreadsPerChild
  • ThreadStackSize
  • -
    +

    Bugfix checklist

    Ayrıca bakınız:

    +
    top

    CoreDumpDirectory Yönergesi

    - + - +
    Açıklama:core dosyasını dökümlemek üzere Apache’nin geçmeye - çalışacağı dizin.
    Açıklama:core dosyasını dökümlemek üzere Apache HTTP + Sunucusunun geçmeye çalışacağı dizin.
    Sözdizimi:CoreDumpDirectory dizin
    Öntanımlı:Öntanımlı değer için aşağıdaki açıklamaya bakınız
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:mpm_winnt, prefork, worker
    Modül:event, worker, prefork
    -

    Bu yönerge core dosyasını dökümlemek üzere Apache’nin +

    Bu yönerge core dosyasını dökümlemek üzere Apache httpd’nin geçmeye çalışacağı dizini belirler. Eğer işletim sisteminiz, çöken bir - sürecin olması durumunda core dosyasını çalışma dizinine - yazacak şekilde yapılandırılmışsa, + sürecin olması durumunda core dosyasını çöken sürecin + çalışma dizinine yazacak şekilde yapılandırılmışsa, CoreDumpDirectory yönergesinin değeri olarak, öntanımlı olan ve sunucuyu çalıştıran kullanıcı tarafından yazılamayan - ServerRoot dizini yerine çalışma - dizinini belirtmek gerekir.

    + ServerRoot dizini yerine başka bir + çalışma dizini belirtmek gerekir.

    +

    Hata ayıklamak amacıyla bir core dosyası dökümlemek isterseniz farklı bir yer belirtmek için bu yönergeyi kullanabilirsiniz. Eğer işletim sisteminiz çöken bir sürecin olması - durumunda core dosyasını çalışma dizinine yazacak şekilde - yapılandırılmamışsa, bu yönergenin bir etkisi olmaz.

    + durumunda core dosyasını çöken sürecin çalışma dizinine + yazacak şekilde yapılandırılmamışsa, bu yönergenin bir etkisi olmaz.

    Linux üzerinde core dökümlemek

    -

    Apache root olarak başlatılıp başka bir kullanıcıya geçilirse Linux - çekirdeği süreç tarafından yazılabilir olsa bile core - dökümlemeyi iptal eder. Eğer +

    Apache httpd root olarak başlatılıp başka bir kullanıcıya geçilirse + Linux çekirdeği, süreç tarafından yazılabilir olsa bile + core dökümlemeyi iptal eder. Eğer CoreDumpDirectory yönergesi ile açıkça bir - dizin belirtirseniz, Apache (2.0.46 ve sonraki sürümleri), Linux 2.4 - ve sonrasında core dökümlemeyi yeniden + dizin belirtirseniz, Apache httpd (2.0.46 ve sonraki sürümleri), Linux + 2.4 ve sonrasında core dökümlemeyi yeniden etkinleştirecektir.

    +
    +

    BSD üzerinde core dökümlemek

    +

    BSD sistemlerinde (FreeBSD gibi) suid bitli çalıştırılabilirlerin + core dökümlemesini etkin kılmak için + kern.sugid_coredump değişkenine 1 değerini atayın. +

    +
    +

    Özel sinyaller

    CoreDumpDirectory işlemi sadece belli sinyaller için gerçekleşir: SIGFPE, SIGILL, SIGABORT, SIGSEGV ve @@ -113,8 +130,7 @@ Öntanımlı:EnableExceptionHook Off Bağlam:sunucu geneli Durum:MPM -Modül:prefork, worker -Uyumluluk:Sürüm 2.0.49 ve sonrasında mevcuttur +Modül:event, worker, prefork

    Güvenlik sebebiyle bu yönerge sadece Apache --enable-exception-hook seçeneği ile yapılandırılmışsa @@ -124,7 +140,7 @@

    Bu kancayı kullanan iki modül (mod_whatkilledus ve mod_backtrace) zaten vardır. bunlar hakkında daha fazla bilgi - edinmek için Jeff Trawick'in EnableExceptionHook sitesine bakabilirsiniz.

    + edinmek için Jeff Trawick'in EnableExceptionHook sitesine bakabilirsiniz.

    top
    @@ -132,11 +148,11 @@ - - + + - +
    Açıklama:Sunucunun nazikçe kapatılmasının ardından ana süreç çıkana kadar geçecek süre için bir zaman aşımı belirler.
    Sözdizimi:GracefulShutDownTimeout saniye
    Öntanımlı:GracefulShutDownTimeout 0
    Sözdizimi:GracefulShutdownTimeout saniye
    Öntanımlı:GracefulShutdownTimeout 0
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:prefork, worker, event
    Modül:event, worker, prefork
    Uyumluluk:Sürüm 2.2 ve sonrasında mevcuttur

    GracefulShutdownTimeout yönergesi, sunucuya @@ -156,18 +172,18 @@ [protokol] Bağlam:sunucu geneli Durum:MPM -Modül:mpm_netware, mpm_winnt, mpmt_os2, perchild, prefork, worker, event -Uyumluluk:Apache 2.0’dan beri gerekli yönergelerden biridir.
    -protokol argümanı 2.1.5 sürümünde eklenmiştir. +Modül:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2 +Uyumluluk:protokol değiştirgesi 2.1.5 sürümünde + eklenmiştir. -

    Listen yönergesi Apache’yi sadece belli IP +

    Listen yönergesi Apache httpd’yi sadece belli IP adreslerini ve portlarını dinlemeye sevkeder. Listen artık belirtilmesi zorunlu yönergelerden biridir. Yapılandırma dosyasında bulunmadığı takdirde sunucu - başlatılırken başarısız olacaktır. Bu Apache Sunucusunun önceki + başlatılırken başarısız olacaktır. Bu Apache HTTP Sunucusunun önceki sürümünde böyle değildi.

    -

    Listen yönergesi Apache’ye, sadece belli +

    Listen yönergesi Apache httpd’ye, sadece belli portlardan veya IP adresi ve port çiftlerinden gelen istekleri kabul etmesini söyler. Eğer sadece port numarası belirtilmişse sunucu belirtilen portu bütün ağ arabirimlerinde dinleyecektir. Eğer portla @@ -182,25 +198,22 @@

    Örneğin sunucunun hem port 80 hem de port 8000’den istek kabul etmesini istiyorsanız bunu şöyle belirtebilirsiniz:

    -

    - Listen 80
    - Listen 8000 -

    +
    Listen 80
    +Listen 8000
    +

    Sunucunun belirtilen iki ağ arabiriminden ve port numarasından gelen bağlantıları kabul etmesi için şu yapılandırmayı kullanabilirsiniz:

    -

    - Listen 192.170.2.1:80
    - Listen 192.170.2.5:8000 -

    +
    Listen 192.170.2.1:80
    +Listen 192.170.2.5:8000
    +

    IPv6 adresleri belirtilirken örnekteki gibi köşeli ayraçlar arasına alınmalıdır:

    -

    - Listen [2001:db8::a00:20ff:fea7:ccea]:80 -

    +
    Listen [2001:db8::a00:20ff:fea7:ccea]:80
    +

    İsteğe bağlı protocol argümanı çoğu yapılandırmada gerekli değildir. Belirtilmediği takdirde. port 443 için https ve @@ -213,9 +226,8 @@ https sitesi çalıştırmak istiyorsanız bunu şöyle belirtebilirsiniz:

    -

    - Listen 192.170.2.1:8443 https -

    +
    Listen 192.170.2.1:8443 https
    +
    top
    @@ -240,7 +254,7 @@ Öntanımlı:ListenBacklog 511 Bağlam:sunucu geneli Durum:MPM -Modül:beos, leader, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Modül:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    Bekleyen bağlantılar kuyruğunun azami uzunluğu. Genellikle bu ayar ne gerekir ne de istenir. Ancak bazı sistemlerde TCP SYN yüklenme @@ -254,51 +268,131 @@ ile ne belirttiğinize bakmaksızın kendisi için atanmış değeri (fakat normal olarak daha büyüğünü) kullanacağına dikkat ediniz.

    +
    +
    top
    +

    ListenCoresBucketsRatio Yönergesi

    + + + + + + + + +
    Açıklama:İşlemci çekirdek sayısının dinleyenlerin buket sayısına oranı
    Sözdizimi:ListenCoresBucketsRatio oran
    Öntanımlı:ListenCoresBucketsRatio 0 (iptal)
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:event, worker, prefork
    Uyumluluk:Apache HTTP Server 2.4.17 ve sonrasında, + SO_REUSEPORT soket seçeneğini destekleyen bir Linux çekirdeğinin + varlığında ve yeni bağlantıların bunu kullanan dinleme süreçlerinin (veya + evrelerinin) soketleri arasında eşit paylaştırılıyor olması halinde + kullanılır. Örneğin Linux 3.9 ve sonrasında kullanılabilirken *BSD'lerin şu + anki SO_REUSEPORT gerçeklenimi ile kullanılamaz.
    +

    (çevrimiçi) İşlemci çekirdek sayısının dinleyenlerin buket sayısına + oranı, Apache HTTP Sunucusunun işlemci_çekirdek_sayısı / + oran sayıda dinleme buketi oluşturması için kullanılabilir ve bu + buketlerin herbiri aynı portlar üzerinde kendi + Listen soketlerini içeriyor olurlar. Bu durumda, + her çocuk süreç tek bir buketle çalışır (çocukların oluşturulması + sırasında buketler döner dağılımla eşleştirilir).

    + +

    "çevrimiçi" İşlemci çekirdek sayısının anlamı

    +

    Linux için (ve ayrıca BSD) bir işlemci çekirdeği Hotplug yapılandırılarak açılıp kapatıalbilir. + Dolayısıyla, ListenCoresBucketsRatio yönergesi + oluşturulacak buket sayısını hesaplarken bu yapılandırmayı esas alır.

    +
    + +

    ListenCoresBucketsRatio yeni bağlantılar kabul + edilirken/darboğazlar oluşurken ölçeklenebilirliği arttırabilir. Çok + sayıda işlemci çekirdekli sistemlerde bu özelliğin etkinleştirilmesinin + önemli başarım artışları ve daha kısa yanıt süreleri oluşturduğu + gözlenmiştir.

    + +

    Bu oranın etkin olabilmesi için işlemci çekirdeği çift sayıda + olmalıdır. oran için önerilen değer 8 olup bu + durumda çalışma anında en azından 16 çekirdek + kullanılabiliyor olmalıdır. En iyi başarımı elde etmek gereken + oran her sistem için hesaplanmalı, çok sayıda değer denenmeli + ve başlıca başarım ölçütlerinizin çeşitli sonuçları iyi gözlemlenmelidir. +

    +
    top

    MaxConnectionsPerChild Yönergesi

    - - + + - - -
    Açıklama:Limit on the number of connections that an individual child server -will handle during its life
    Sözdizimi:MaxConnectionsPerChild number
    Açıklama:Tek bir çocuk sürecin ömrü boyunca işleme sokabileceği istek + sayısını sınırlamakta kullanılır.
    Sözdizimi:MaxConnectionsPerChild sayı
    Öntanımlı:MaxConnectionsPerChild 0
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:event, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker
    Uyumluluk:Available Apache HTTP Server 2.3.9 and later. The old name -MaxRequestsPerChild is still supported.

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    +Modül:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2 +Uyumluluk:Apache HTTP Sunucusunun 2.3.9 ve sonraki sürümlerinde + kullanılabilmektedir. Eski isim MaxRequestsPerChild hala + desteklenmektedir. + +

    MaxConnectionsPerChild yönergesi, tek bir çocuk + sürecin işleme sokabileceği istek sayısını sınırlamakta kullanılır. + MaxConnectionsPerChild istekten sonra çocuk süreç + ölür. Eğer MaxConnectionsPerChild için + 0 belirtilmişse sürecin ömrü sonsuz olacaktır.

    + +

    MaxConnectionsPerChild için sıfırdan farklı bir + değer belirtilmesi sürecin kullanacağı bellek miktarını sınırlamak + suretiyle olası bellek sızıntılarını engeller.

    + +
    top

    MaxMemFree Yönergesi

    - + - +
    Açıklama:free() çağrılmaksızın ana bellek ayırıcının ayırmasına izin verilen azami bellek miktarını belirler.
    Sözdizimi:MaxMemFree kB-sayısı
    Öntanımlı:MaxMemFree 0
    Öntanımlı:MaxMemFree 2048
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:beos, leader, mpm_netware, prefork, threadpool, worker, mpm_winnt
    Modül:event, worker, prefork, mpm_winnt, mpm_netware

    MaxMemFree yönergesi, free() - çağrılmaksızın ana bellek ayırıcının ayırmasına izin verilen azami - bellek miktarını kB cinsinden belirler. Bir değerle belirtilmediğinde - veya 0 değeriyle belirtildiğinde eşik sınırsız + çağrılmaksızın her bellek ayırıcının ayırmasına izin verilen azami + bellek miktarını kB cinsinden belirler. Evreli MPM'lerde her evre kendi + ayırıcısına sahiptir. 0 değeri belirtildiğinde eşik sınırsız olacaktır.

    top

    MaxRequestWorkers Yönergesi

    - - - + + + - -
    Açıklama:Maximum number of connections that will be processed -simultaneously
    Sözdizimi:MaxRequestWorkers number
    Öntanımlı:See usage for details
    Açıklama:Aynı anda işleme sokulacak azami bağlantı sayısı
    Sözdizimi:MaxRequestWorkers sayı
    Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız.
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:event, prefork, worker

    Bu yönergenin belgesi henüz Türkçeye çevrilmedi. - Lütfen İngilizce sürümüne bakınız.

    +Modül:event, worker, prefork + +

    MaxRequestWorkers yönergesi aynı anda işleme + sokulacak bağlantı sayısını sınırlamak için kullanılır. MaxRequestWorkers bağlantı isteğinden fazlası geldiği + takdirde bu istekler normal olarak kuyruğa alınıp bekletilir. Kuyrukta + bekletilecek isteklerin azami sayısı ise ListenBacklog yönergesi ile belirlenir. İstek sunmakta olan + çocuk süreçlerden biri serbest kaldığında bekletilen bağlantılardan + birine hizmet sunulmaya başlanır.

    + +

    Evreli olmayan sunucularda (prefork gibi) + MaxRequestWorkers yönergesi istekleri sunmak için + başlatılacak çocuk süreçlerin azami sayısını belirler. Öntanımlı değer + 256 olup bu değeri arttırmak isterseniz ServerLimit değerini de + arttırmalısınız.

    + +

    Çok evreli ve melez sunucularda (event veya + worker gibi) MaxRequestWorkers + yönergesi istemcilere hizmet verecek evre sayısını sınırlar. Öntanımlı + değer melez MPM’ler için 16'dır + (ServerLimit ile ThreadsPerChild çarpılır: 16 x + 25). Bu bakımdan MaxRequestWorkers değerini + 16 süreçten fazlasına ayarlamak için ServerLimit değerini de arttırmalısınız.

    + +

    MaxRequestWorkers yerine 2.3.13 öncesinde + MaxClients kullanılırdı. Eski isim hala + desteklenmektedir.

    + +
    top

    MaxSpareThreads Yönergesi

    @@ -307,33 +401,37 @@ simultaneously - +
    Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız.
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:mpm_netware, mpmt_os2, worker
    Modül:event, worker, mpm_netware, mpmt_os2

    Boştaki azami evre sayısı. Her MPM bu yönerge karşısında farklı davranır.

    -

    worker için MaxSpareThreads 250 - öntanımlıdır. Bu MPM boştaki evreleri sunucu genelinde izler. Eğer - sunucuda çok fazla boşta evre varsa, sunucu boştaki evrelerin sayısı bu - sınırın altına inene kadar çocuk süreçleri öldürür.

    +

    worker ve event için + MaxSpareThreads 250 öntanımlıdır. Bu MPM'ler boştaki + evreleri sunucu genelinde izler. Eğer sunucuda çok fazla boşta evre + varsa, sunucu boştaki evrelerin sayısı bu sınırın altına inene kadar + çocuk süreçleri öldürür. + ListenCoresBucketsRatio + yönergesi etkinse ek süreçler/evreler oluşabilir.

    mpm_netware için MaxSpareThreads 100 öntanımlıdır. Bu MPM tek bir süreç olarak çalıştığından boştaki evre sayısı aynı zamanda sunucu genelinde boştaki evre sayısıdır.

    - +

    mpmt_os2 modülü mpm_netware modülü gibi çalışır. mpmt_os2 için öntanımlı değer 10'dur.

    Kısıtlamalar

    MaxSpareThreads için değer aralığı sınırlıdır. - Apache belirtilen değeri aşağıdaki kurallara uygun olarak + Apache httpd belirtilen değeri aşağıdaki kurallara uygun olarak kendiliğinden düzeltecektir:

    @@ -343,6 +441,7 @@ simultaneously
    top
    @@ -354,16 +453,18 @@ simultaneously Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız. Bağlam:sunucu geneli Durum:MPM -Modül:beos, leader, mpm_netware, mpmt_os2, worker +Modül:event, worker, mpm_netware, mpmt_os2

    İsteklerin ani artışında devreye girecek boştaki evrelerin asgari sayısı. Her MPM bu yönerge karşısında farklı davranır.

    -

    worker modülü için MinSpareThreads - 75 öntanımlıdır ve bu modül boştaki evreleri sunucu genelinde - izler. Eğer sunucuda boştaki evre sayısı yetersizse, sunucu, boştaki - evrelerin sayısı bu sınırın üstüne çıkana kadar çocuk süreç - oluşturur.

    +

    worker ve event modülü için + MinSpareThreads 75 öntanımlıdır ve bu modül boştaki evreleri + sunucu genelinde izler. Eğer sunucuda boştaki evre sayısı yetersizse, + sunucu, boştaki evrelerin sayısı bu sınırın üstüne çıkana kadar çocuk + süreç oluşturur. + ListenCoresBucketsRatio + yönergesi etkinse ek süreçler/evreler oluşabilir.

    mpm_netware için MinSpareThreads 10 öntanımlıdır ve tek süreç kendisi olduğundan izleme sunucu genelinde @@ -378,6 +479,7 @@ simultaneously

    top
    @@ -388,16 +490,15 @@ simultaneously Öntanımlı:PidFile logs/httpd.pid Bağlam:sunucu geneli Durum:MPM -Modül:mpm_winnt, mpmt_os2, prefork, worker +Modül:event, worker, prefork, mpm_winnt, mpmt_os2

    PidFile yönergesi, sunucunun artalan sürecinin süreç kimliğinin kaydedileceği dosyayı belirler. Dosya ismi mutlak dosya yoluyla belirtilmemişse dosya yolunun ServerRoot dizinine göre belirtildiği kabul edilir.

    -

    Örnek

    - PidFile /var/run/apache.pid -

    +
    PidFile /var/run/apache.pid
    +

    Sunucuya sinyal gönderebilmek çoğunlukla işe yarar. Böylece ErrorLog ve TransferLog dosyaları kapatılıp yeniden açılır ve yapılandırma dosyaları yeniden okunur. Bu, @@ -409,7 +510,7 @@ simultaneously olabilir.

    Ek Bilgi

    -

    Apache 2’de sunucuyu (yeniden) başlatırken veya durdururken sadece +

    Apache HTTP Sunucusunu (yeniden) başlatırken veya durdururken sadece apachectl betiğini kullanmanız önerilir.

    @@ -422,14 +523,15 @@ simultaneously Öntanımlı:ReceiveBufferSize 0 Bağlam:sunucu geneli Durum:MPM -Modül:mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Modül:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2 -

    Sunucu TCP alım tamponu boyunu bayt-sayısı ile belirtilen - bayta ayarlayacaktır.

    +

    Sunucunun TCP alım tamponu boyunu bayt-sayısı ile belirtilen + bayta ayarlar.

    0 değeri atarsanız sunucu işletim sistemi öntanımlısını kullanacaktır.

    +
    top

    ScoreBoardFile Yönergesi

    @@ -437,22 +539,22 @@ simultaneously Açıklama:Çocuk süreçler için eşgüdüm verisini saklamakta kullanılan dosyanın yerini belirler. Sözdizimi:ScoreBoardFile dosya-yolu -Öntanımlı:ScoreBoardFile logs/apache_status +Öntanımlı:ScoreBoardFile logs/apache_runtime_status Bağlam:sunucu geneli Durum:MPM -Modül:mpm_winnt, prefork, worker +Modül:event, worker, prefork, mpm_winnt -

    Apache ana ve çocuk süreçler arasında iletişim için bir çetele tutar. +

    Apache HTTP Sunucusu ana ve çocuk süreçler arasında iletişim için bir + çetele tutar. Bazı mimariler bu iletişimi kolaylaştırmak için bir dosya gerektirir. - Eğer yönerge belirtilmezse Apache çeteleyi önce tamamen bellekte + Eğer yönerge belirtilmezse Apache httpd çeteleyi önce tamamen bellekte oluşturmayı dener (anonim paylaşımlı bellek kullanarak); bunda başarılı olamazsa dosyayı diskte oluşturmaya çalışacaktır (paylaşımlı belleğe - eşlemli dosya kullanarak). Bu yönergenin belirtilmesi Apache sunucusunun + eşlemli dosya kullanarak). Bu yönergenin belirtilmesi Apache httpd'nin dosyayı daima diskte oluşturmasına sebep olur.

    -

    Örnek

    - ScoreBoardFile /var/run/apache_status -

    +
    ScoreBoardFile /var/run/apache_status
    +

    Paylaşımlı belleğe eşlemli dosya, çeteleye doğrudan erişmesi gereken üçüncü parti uygulamalar için yararlıdır.

    @@ -464,7 +566,8 @@ simultaneously

    Ayrıca bakınız:

    top
    @@ -475,17 +578,27 @@ simultaneously Öntanımlı:SendBufferSize 0 Bağlam:sunucu geneli Durum:MPM -Modül:beos, leader, mpm_netware, mpm_winnt, mpmt_os2, prefork, worker +Modül:event, worker, prefork, mpm_winnt, mpm_netware, mpmt_os2

    Sunucu TCP gönderim tamponu boyunu bayt-sayısı ile - belirtilen bayta ayarlayacaktır. Yüksek hızlı yüksek yataklık süresi - için standart işletim sistemi öntanımlılarını arttırmak çok yararlıdır - (örneğin, kıtalar arası hızlı borularda olduğu gibi 100 ms - civarında).

    + belirtilen bayta ayarlayacaktır. Yüksek hızlı yüksek yataklık süreli + bağlantılarda işletim sisteminin öntanımlı değerini aşacak şekilde (örn, + kıtalararası hızlı hatlarda 100ms veya fazlası) ayarlamak çoğunlukla + kullanışlıdır.

    0 değeri atarsanız sunucu işletim sistemi öntanımlısını kullanacaktır.

    +

    İşletim sisteminizin ilaveten yapılandırılması, yüksek hız, yüksek + gecikme bağlantılarında daha yüksek başarım elde etmek için gerekli + olabilir.

    + +

    Bazı işletim sistemlerinde, TCP davranışı, EnableSendfile yönergesine Off + değeri atanmadıkça görülemeyen, büyükçe bir + SendBufferSize değerinden kaynaklanarak değişir. + Bu etkileşim sadece duruk dosyalarda görülür.

    + +
    top

    ServerLimit Yönergesi

    @@ -495,47 +608,56 @@ simultaneously Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız. Bağlam:sunucu geneli Durum:MPM -Modül:prefork, worker +Modül:event, worker, prefork

    prefork modülü söz konusu olduğunda bu yönerge, Apache - sürecinin ömrü boyunca MaxClients yönergesine atanabilecek - azami değeri belirler. worker modülü sözkonusu - olduğunda ise, Apache sürecinin ömrü boyunca MaxClients yönergesine atanabilecek - azami değeri ThreadLimit ile - birlikte belirler. Bu yönergeyi bir yeniden başlatma sırasında - değiştirirseniz bu değişiklik yok sayılır fakat MaxClients değişiklikleri dikkate - alınır.

    + httpd sürecinin ömrü boyunca MaxRequestWorkers yönergesine atanabilecek + azami değeri belirler. worker ve event + modülü sözkonusu + olduğunda ise, Apache httpd sürecinin ömrü boyunca MaxRequestWorkers yönergesine + atanabilecek azami değeri ThreadLimit ile birlikte belirler. event modülü + için bu yönerge kaç eski sunucunun çalışmayı sürdüreceğini ve kaçının açık + bağlantıları işlemeyi bitireceğini belirler. Bu yönergeyi bir yeniden + başlatma sırasında değiştirirseniz bu değişiklik yok sayılır fakat + MaxRequestWorkers + değişiklikleri dikkate alınır.

    Bu yönergenin kullanılması özel bir dikkat gerektirir. Eğer ServerLimit gereğinden yüksek bir değere ayarlanırsa, gereksiz yere paylaşımlı bellek ayrılmış olur. Eğer - ServerLimit ve MaxClients değerleri sistemin - işleyebileceğinden daha yüksek değerlere ayarlanırsa Apache + ServerLimit ve MaxRequestWorkers değerleri sistemin + işleyebileceğinden daha yüksek değerlere ayarlanırsa Apache httpd başlayamayacağı gibi sistemi kararsız hale de getirebilir.

    -

    Bu yönergeyi prefork modülü ile sadece MaxClients yönergesine 256’dan +

    Bu yönergeyi prefork modülü ile sadece MaxRequestWorkers yönergesine 256’dan (öntanımlı) daha büyük bir değer atayacaksanız kullanınız. Bu yönergeye - MaxClients için atamak + MaxRequestWorkers için atamak istediğiniz değerden fazlasını atamayınız.

    worker modülü söz konusu olduğunda bu yönergeyi - MaxClients ve + MaxRequestWorkers ve ThreadsPerChild ayarları 16 sunucu sürecinden (16 öntanımlıdır) fazlasını gerektiriyorsa - ayarlayınız. Bu yönergeye MaxClients - ve ThreadsPerChild için gerekli gördüğünüz - sunucu süreci sayısından fazlasını atamayınız.

    + ayarlayınız. Bu yönergeye MaxRequestWorkers ve ThreadsPerChild için gerekli gördüğünüz sunucu süreci + sayısından fazlasını atamayınız.

    -

    Ek Bilgi

    +

    event modülü söz konusu olduğunda, MaxRequestWorkers ve ThreadsPerChild yönergeleri ile belirlenen + süreç sayısına ek olarak zarifçe kapatılan süreçlerin sayısıyla arttırıp 16 + sunucu sürecinden (16 öntanımlıdır) fazlasına ayarlayınız.

    + +

    Ek Bilgi

    Sunucu içinde derlenmiş olarak ServerLimit 20000 şeklinde bir zorlayıcı sınır vardır (prefork için 200000’dir). Bu önlem, yazım hatalarının istenmeyen sonuçlara yol - açmasını engellemek için düşünülmüştür.

    + açmasını engellemek için düşünülmüştür. Bu sınırı daha da arttırmak + için mpm kaynak dosyasındaki MAX_SERVER_LIMIT değerini değiştirip + sunucuyu yeniden derlemeniz gerekir.

    Ayrıca bakınız:

    top
    @@ -547,16 +669,21 @@ simultaneously Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız. Bağlam:sunucu geneli Durum:MPM -Modül:mpmt_os2, prefork, worker +Modül:event, worker, prefork, mpmt_os2

    StartServers yönergesi, sunucunun başlatılması sırasında oluşturulan çocuk süreçlerin sayısını belirler. Süreç sayısı normal olarak yüke bağlı olarak değişse de bu değerin ayarlanmasını - gerektirecek küçük bir sebep vardır.

    + gerektirecek küçük bir sebep vardır. + (MinSpareThreads, + MaxSpareThreads, + MinSpareServers, + MaxSpareServers yönergelerine + bakınız.)

    Öntanımlı değer MPM’den MPM’e fark eder. Öntanımlı değer - worker için 3 iken - prefork için 5, + worker ve event için 3 + iken prefork için 5, mpmt_os2 için 2'dir.

    @@ -574,7 +701,12 @@ simultaneously

    StartThreads yönergesi, sunucunun başlatılması sırasında oluşturulan evrelerin sayısını belirler. Evre sayısı normal olarak yüke bağlı olarak değişse de bu değerin ayarlanmasını - gerektirecek küçük bir sebep vardır.

    + gerektirecek küçük bir sebep vardır. + (MinSpareThreads, + MaxSpareThreads, + MinSpareServers, + MaxSpareServers yönergelerine + bakınız.)

    mpm_netware için StartThreads 50 öntanımlı olup, sadece tek bir süreç olduğundan, sunucunun başlatılması @@ -585,15 +717,14 @@ simultaneously

    ThreadLimit Yönergesi

    + belirler. - - +
    Açıklama:Çocuk süreç başına ayarlanabilir evre sayısının üst sınırını - belirler.
    Sözdizimi:ThreadLimit sayı
    Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız.
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:mpm_winnt, worker
    Uyumluluk:mpm_winnt için Apache 2.0.41 ve sonrasında mevcuttur.
    Modül:event, worker, mpm_winnt
    -

    Bu yönerge, Apache sürecinin ömrü boyunca ThreadsPerChild yönergesine +

    Bu yönerge, Apache httpd sürecinin ömrü boyunca ThreadsPerChild yönergesine atanabilecek azami değeri belirler. Bu yönergeyi bir yeniden başlatma sırasında değiştirirseniz bu değişiklik yok sayılır fakat ThreadsPerChild değişiklikleri dikkate alınır.

    @@ -602,9 +733,9 @@ simultaneously ThreadLimit değeri ThreadsPerChild değerinden yüksek bir değere ayarlanırsa, gereksiz yere paylaşımlı bellek ayrılmış olur. Eğer ThreadLimit ve ThreadsPerChild değerleri sistemin - işleyebileceğinden daha yüksek değerlere ayarlanırsa Apache + işleyebileceğinden daha yüksek değerlere ayarlanırsa Apache httpd başlayamayacağı gibi sistemi kararsız hale de getirebilir. Bu yönergeye - Apache sunucusunun çalışması için öngörülmüş en büyük değerden daha + Apache httpd'nin çalışması için öngörülmüş en büyük değerden daha yükseğini atamayınız.

    ThreadLimit yönergesinin öntanımlı değeri @@ -614,8 +745,11 @@ simultaneously

    Ek Bilgi

    Sunucu içinde derlenmiş olarak ThreadLimit 20000 şeklinde bir zorlayıcı sınır vardır (mpm_winnt için - 15000’dir). Bu önlem, yazım hatalarının istenmeyen sonuçlara yol - açmasını engellemek için düşünülmüştür.

    + 15000, event için ThreadLimit 100000). + Bu önlem, yazım hatalarının istenmeyen sonuçlara yol + açmasını engellemek için düşünülmüştür. Bu sınırı daha da arttırmak + için mpm kaynak dosyasındaki MAX_SERVER_LIMIT değerini değiştirip + sunucuyu yeniden derlemeniz gerekir.

    @@ -628,16 +762,16 @@ simultaneously Öntanımlı:Ayrıntılar için aşağıdaki açıklamaya bakınız. Bağlam:sunucu geneli Durum:MPM -Modül:mpm_winnt, worker +Modül:event, worker, mpm_winnt

    Bu yönerge, her çocuk süreç tarafından oluşturulan evrelerin sayısını belirler. Çocuk süreçler bu evreleri başlatıldıklarında oluştururlar ve bundan daha fazlasını asla oluşturmazlar. mpm_winnt gibi sadece bir çocuk sürecin bulunduğu bir MPM kullanıyorsanız, bu - sayı sunucunun tüm yükünü kaldırabilecek kadar büyük olmalıdır. + sayı Apache httpd'nin tüm yükünü kaldırabilecek kadar büyük olmalıdır. worker gibi çok çocuk süreçli bir MPM kullanıyorsanız, - toplam evre sayısı sunucunun tüm yükünü kaldırabilecek kadar - büyük olmalıdır.

    + toplam evre sayısı Apache httpd'nin tüm yükünü kaldırabilecek + kadar büyük olmalıdır.

    ThreadsPerChild için öntanımlı değer mpm_winnt kullanıldığında 64 diğerleri @@ -654,8 +788,9 @@ simultaneously değişir. Bağlam:sunucu geneli Durum:MPM -Modül:mpm_netware, mpm_winnt, worker -Uyumluluk:Apache 2.1 ve sonrasında mevcuttur. +Modül:event, worker, mpm_winnt, mpm_netware, mpmt_os2 +Uyumluluk:Apache HTTP Sunucusu 2.1 ve sonrasında + kullanılabilir.

    ThreadStackSize yönergesi, istemci bağlantılarını elde eden evreler ve bu bağlantıları işlemekte yardımcı @@ -665,13 +800,13 @@ simultaneously olabilir:

      -
    • HP-UX gibi görece küçük yığıt boyuna sahip platformlarda, Apache, - görece büyük yığıt alanı kullanan bazı üçüncü parti modüller yüzünden - çökebilir. Bu modüller öntanımlı yığıt boyu daha büyük olan diğer - platformlarda sorunsuz çalışabilir. Bu tür çökmeler +
    • HP-UX gibi görece küçük yığıt boyuna sahip platformlarda, Apache + httpd, görece büyük yığıt alanı kullanan bazı üçüncü parti modüller + yüzünden çökebilir. Bu modüller öntanımlı yığıt boyu daha büyük olan + diğer platformlarda sorunsuz çalışabilir. Bu tür çökmeler ThreadStackSize yönergesine daha büyük yığıt boyu atanarak çözümlenir. Böyle bir ayarlamayı sadece üçüncü parti - modülün üreticisi bunun gerekliliğini belirtmişse veya Apache’nin + modülün üreticisi bunun gerekliliğini belirtmişse veya Apache httpd’nin evre yığıt boyutunun küçüklüğünden dolayı çöktüğü teşhis edildiği takdirde yapınız.
    • @@ -681,19 +816,54 @@ simultaneously düşük bir değer atanmışsa çocuk süreç başına evre sayısının yüksek olduğu durumlarda bu yığıt yetmeyebilir. Böyle bir ayarlama sadece sunucunun öldüresiye denendiği dolayısıyla yığıt boyutlarının aşırı - zorlandığı deneme ortamlarında yapılmalıdır. Sunucu yapılandırmasında - yapılan bir değişiklik mevcut ThreadStackSize - ayarını geçersiz hale getirebilir. + zorlandığı deneme ortamlarında yapılmalıdır. Gereken en küçük yığıt + boyutu kullanılan modüle sıkı sıkıya bağlıdır, fakat Apache httpd + yapılandırmasında yapılan bir değişiklik mevcut + ThreadStackSize ayarını geçersiz hale + getirebilir. + +
    • Linux üzerinde, ilgili sistem çağrısı en küçük yığıt boyutu + olarak bu değeri kullanacağından, bu yönerge sadece öntanımlı yığıt + boyutunu arttırmak için kullanılabilir. ulimit -s için + (çoğunlukla büyükçe) soft sınır (sınırsızsa 8MB), öntanımlı yığıt + boyutu olarak kullanılır.
    +
    Çocuk süreç başına yüksek bir evre sayısı gerekmedikçe + ThreadStackSize değerinin azaltılmaması önerilir. + Bazı platformlarda (Linux dahil), 128000 ayarı zaten çok düşüktür ve daha + da azaltmak bazı modüllerle çökmeye sebep olur.
    +

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_common.xml b/docs/manual/mod/mpm_common.xml index 3a5031628b8..1da81bcd5e3 100644 --- a/docs/manual/mod/mpm_common.xml +++ b/docs/manual/mod/mpm_common.xml @@ -34,8 +34,8 @@ switch before dumping core CoreDumpDirectory directory See usage for the default setting server config -eventprefork -worker +eventworker +prefork

    This controls the directory to which Apache httpd attempts to @@ -86,9 +86,8 @@ after a crash EnableExceptionHook Off server config -eventprefork -worker -Available in version 2.0.49 and later +eventworker +prefork

    For safety reasons this directive is only available if the server was @@ -99,7 +98,7 @@ after a crash

    There are already two modules, mod_whatkilledus and mod_backtrace that make use of this hook. Please have a look at Jeff Trawick's EnableExceptionHook site for more information about these.

    @@ -108,11 +107,11 @@ after a crash GracefulShutdownTimeout Specify a timeout after which a gracefully shutdown server will exit. -GracefulShutDownTimeout seconds -GracefulShutDownTimeout 0 +GracefulShutdownTimeout seconds +GracefulShutdownTimeout 0 server config -preforkworker -event +eventworker +prefork Available in version 2.2 and later @@ -132,8 +131,9 @@ of the daemon PidFile filename PidFile logs/httpd.pid server config -eventmpm_winnt -mpmt_os2preforkworker +eventworker +preforkmpm_winnt +mpmt_os2 @@ -143,7 +143,9 @@ of the daemon ServerRoot.

    Example + PidFile /var/run/apache.pid +

    It is often useful to be able to send the server a signal, @@ -172,13 +174,11 @@ of the daemon listens to Listen [IP-address:]portnumber [protocol] server config -mpm_netwarempm_winnt -mpmt_os2 -preforkworker -event +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 -Required directive since Apache HTTP Server 2.0
    -The protocol argument was added in 2.1.5
    +The protocol argument was added in 2.1.5

    The Listen directive instructs Apache httpd to @@ -202,25 +202,25 @@ The protocol argument was added in 2.1.5

    For example, to make the server accept connections on both port 80 and port 8000, use:

    - - Listen 80
    - Listen 8000 -
    + +Listen 80 +Listen 8000 +

    To make the server accept connections on two specified interfaces and port numbers, use

    - - Listen 192.170.2.1:80
    - Listen 192.170.2.5:8000 -
    + +Listen 192.170.2.1:80 +Listen 192.170.2.5:8000 +

    IPv6 addresses must be surrounded in square brackets, as in the following example:

    - + Listen [2001:db8::a00:20ff:fea7:ccea]:80 - +

    The optional protocol argument is not required for most configurations. If not specified, https is the default for @@ -232,9 +232,9 @@ The protocol argument was added in 2.1.5

    You only need to set the protocol if you are running on non-standard ports. For example, running an https site on port 8443:

    - + Listen 192.170.2.1:8443 https - + Error condition Multiple Listen directives for the same ip @@ -252,17 +252,69 @@ discussion of the Address already in use error message, including other causes. + +ListenCoresBucketsRatio +Ratio between the number of CPU cores (online) and the number of +listeners' buckets +ListenCoresBucketsRatio ratio +ListenCoresBucketsRatio 0 (disabled) +server config +eventworker +prefork + +Available in Apache HTTP Server 2.4.17, with a kernel supporting +the socket option SO_REUSEPORT and distributing new connections +evenly across listening processes' (or threads') sockets using it (eg. Linux +3.9 and later, but not the current implementations of SO_REUSEPORT +in *BSDs. + + +

    A ratio between the number of (online) CPU cores and the + number of listeners' buckets can be used to make Apache HTTP Server create + num_cpu_cores / ratio listening buckets, each containing its + own Listen-ing socket(s) on the same port(s), and + then make each child handle a single bucket (with round-robin distribution + of the buckets at children creation time).

    + + Meaning of "online" CPU core +

    On Linux (and also BSD) a CPU core can be turned on/off if + Hotplug + is configured, therefore ListenCoresBucketsRatio needs to + take this parameter into account while calculating the number of buckets to create.

    +
    + +

    ListenCoresBucketsRatio can improve the + scalability when accepting new connections is/becomes the bottleneck. + On systems with a large number of CPU cores, enabling this feature has + been tested to show significant performances improvement and shorter + responses time.

    + +

    There must be at least twice the number of CPU cores than the + configured ratio for this to be active. The recommended + ratio is 8, hence at least 16 + cores should be available at runtime when this value is used. + The right ratio to obtain maximum performance needs to be calculated + for each target system, testing multiple values and observing the variations in your + key performance metrics.

    + +

    This directive influences the calculation of the + MinSpareThreads and + MaxSpareThreads lower bound values. + The number of children processes needs to be a multiple of the number + of buckets to optimally accept connections.

    +
    +
    + ListenBackLog Maximum length of the queue of pending connections ListenBacklog backlog ListenBacklog 511 server config - -event -mpm_netwarempm_winnt -mpmt_os2prefork -worker +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 +

    The maximum length of the queue of pending connections. @@ -286,8 +338,8 @@ simultaneously MaxRequestWorkers number See usage for details server config -eventprefork -worker +eventworker +prefork @@ -317,7 +369,7 @@ simultaneously >ServerLimit.

    MaxRequestWorkers was called - MaxClients before version 2.3.13. The old name ist still + MaxClients before version 2.3.13. The old name is still supported.

    @@ -327,16 +379,18 @@ simultaneously Maximum amount of memory that the main allocator is allowed to hold without calling free() MaxMemFree KBytes -MaxMemFree 0 +MaxMemFree 2048 server config -eventmpm_netware -preforkworkermpm_winnt +eventworker +preforkmpm_winnt +mpm_netware

    The MaxMemFree directive sets the - maximum number of free Kbytes that the main allocator is allowed - to hold without calling free(). When not set, or when set + maximum number of free Kbytes that every allocator is allowed + to hold without calling free(). In threaded MPMs, every + thread has its own allocator. When set to zero, the threshold will be set to unlimited.

    @@ -348,9 +402,10 @@ will handle during its life MaxConnectionsPerChild number MaxConnectionsPerChild 0 server config -eventmpm_netware -mpm_winntmpmt_os2 -preforkworker +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + Available Apache HTTP Server 2.3.9 and later. The old name MaxRequestsPerChild is still supported. @@ -374,18 +429,21 @@ will handle during its life MaxSpareThreads number See usage for details server config -eventmpm_netware -mpmt_os2worker +eventworker +mpm_netwarempmt_os2 +

    Maximum number of idle threads. Different MPMs deal with this directive differently.

    -

    For worker, the default is - MaxSpareThreads 250. This MPM deals with idle threads +

    For worker and event, the default is + MaxSpareThreads 250. These MPMs deal with idle threads on a server-wide basis. If there are too many idle threads in the server then child processes are killed until the number of idle - threads is less than this number.

    + threads is less than this number. Additional processes/threads + might be created if ListenCoresBucketsRatio + is enabled.

    For mpm_netware the default is MaxSpareThreads 100. Since this MPM runs a @@ -403,9 +461,10 @@ will handle during its life

  • mpm_netware wants the value to be greater than MinSpareThreads.
  • -
  • For worker, the value must be greater or equal - to the sum of MinSpareThreads - and ThreadsPerChild.
  • +
  • For worker and event, the value + must be greater or equal to the sum of + MinSpareThreads and + ThreadsPerChild.
  • @@ -421,19 +480,21 @@ spikes MinSpareThreads number See usage for details server config -eventmpm_netware -mpmt_os2worker +eventworker +mpm_netwarempmt_os2 +

    Minimum number of idle threads to handle request spikes. - Different MPMs deal with this directive - differently.

    + Different MPMs deal with this directive differently.

    -

    worker uses a default of MinSpareThreads - 75 and deals with idle threads on a server-wide basis. If - there aren't enough idle threads in the server then child +

    worker and event use a default of + MinSpareThreads 75 and deal with idle threads on a server-wide + basis. If there aren't enough idle threads in the server then child processes are created until the number of idle threads is greater - than number.

    + than number. Additional processes/threads + might be created if ListenCoresBucketsRatio + is enabled.

    mpm_netware uses a default of MinSpareThreads 10 and, since it is a single-process @@ -453,10 +514,11 @@ spikes Location of the file used to store coordination data for the child processes ScoreBoardFile file-path -ScoreBoardFile logs/apache_status +ScoreBoardFile logs/apache_runtime_status server config -eventmpm_winnt -preforkworker +eventworker +preforkmpm_winnt +

    Apache HTTP Server uses a scoreboard to communicate between its parent @@ -468,7 +530,9 @@ the child processes Apache httpd to always create the file on the disk.

    Example - ScoreBoardFile /var/run/apache_status + + ScoreBoardFile /var/run/apache_runtime_status +

    File-based shared memory is useful for third-party applications @@ -489,9 +553,10 @@ Apache HTTP Server ReceiveBufferSize bytes ReceiveBufferSize 0 server config -eventmpm_netware -mpm_winntmpmt_os2prefork -worker +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 +

    The server will set the TCP receive buffer size to the number of @@ -508,14 +573,15 @@ Apache HTTP Server SendBufferSize bytes SendBufferSize 0 server config -eventmpm_netware -mpm_winntmpmt_os2prefork -worker +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 +

    Sets the server's TCP send buffer size to the number of bytes specified. It is often useful to set this past the OS's standard - default value on high speed, high latency conections + default value on high speed, high latency connections (i.e., 100ms or so, such as transcontinental fast pipes).

    If set to the value of 0, the server will use the @@ -538,22 +604,25 @@ Apache HTTP Server ServerLimit number See usage for details server config -eventprefork -worker +eventworker +prefork +

    For the prefork MPM, this directive sets the maximum configured value for MaxRequestWorkers for the lifetime of the - Apache httpd process. For the worker MPM, this directive - in combination with worker and event + MPMs, this directive in combination with ThreadLimit sets the maximum configured value for MaxRequestWorkers for the lifetime of the - Apache httpd process. Any attempts to change this directive during a - restart will be ignored, but MaxRequestWorkers can be modified during - a restart.

    + Apache httpd process. For the event MPM, this directive + also defines how many old server processes may keep running and finish processing + open connections. + Any attempts to change this directive during a restart will be ignored, but + MaxRequestWorkers can be modified + during a restart.

    Special care must be taken when using this directive. If ServerLimit is set to a value much higher @@ -570,15 +639,22 @@ Apache HTTP Server might want to set MaxRequestWorkers to.

    -

    With worker, use this directive only - if your MaxRequestWorkers and - ThreadsPerChild +

    With worker, use this directive only if your + MaxRequestWorkers + and ThreadsPerChild settings require more than 16 server processes (default). Do not set the value of this directive any higher than the number of server processes required by what you may want for MaxRequestWorkers and ThreadsPerChild.

    +

    With event, increase this directive if the process + number defined by your MaxRequestWorkers and ThreadsPerChild settings, plus the + number of gracefully shutting down processes, is more than 16 server + processes (default).

    + Note

    There is a hard limit of ServerLimit 20000 compiled into the server (for the prefork MPM 200000). This is @@ -596,8 +672,8 @@ Apache HTTP Server StartServers number See usage for details server config -eventmpmt_os2 -preforkworker +eventworker +preforkmpmt_os2 @@ -610,10 +686,10 @@ Apache HTTP Server module="prefork">MaxSpareServers) there is usually little reason to adjust this parameter.

    -

    The default value differs from MPM to MPM. worker - defaults to StartServers 3; prefork - defaults to 5; mpmt_os2 defaults to - 2.

    +

    The default value differs from MPM to MPM. worker and + event default to StartServers 3; + prefork defaults to 5; mpmt_os2 + defaults to 2.

    @@ -650,10 +726,9 @@ per child process ThreadLimit number See usage for details server config -eventmpm_winnt -worker -Available for mpm_winnt in Apache HTTP Server 2.0.41 -and later +eventworker +mpm_winnt +

    This directive sets the maximum configured value for Note

    There is a hard limit of ThreadLimit 20000 (or + ThreadLimit 100000 with event, ThreadLimit 15000 with mpm_winnt) compiled into the server. This is intended to avoid nasty effects caused by typos. To increase it even further past this limit, you @@ -696,8 +772,9 @@ and later ThreadsPerChild number See usage for details server config -eventmpm_winnt -worker +eventworker +mpm_winnt +

    This directive sets the number of threads created by each @@ -722,9 +799,9 @@ client connections ThreadStackSize size 65536 on NetWare; varies on other operating systems server config -eventmpm_netware -mpmt_os2mpm_winntworker -event +eventworker +mpm_winntmpm_netware +mpmt_os2 Available in Apache HTTP Server 2.1 and later diff --git a/docs/manual/mod/mpm_common.xml.de b/docs/manual/mod/mpm_common.xml.de index dc729491a9b..5dd532e166c 100644 --- a/docs/manual/mod/mpm_common.xml.de +++ b/docs/manual/mod/mpm_common.xml.de @@ -1,7 +1,7 @@ - + + + + + + + + +mpm_common +Une série de directives implémentées par plusieurs +modules multi-processus (MPM) +MPM + + +CoreDumpDirectory +Le répertoire dans lequel le serveur HTTP Apache va tenter de se +positionner avant d'effectuer un vidage mémoire +CoreDumpDirectory répertoire +Voir ci-dessous pour le répertoire par défaut +server config +eventworker +prefork + + +

    Cette directive permet de définir le répertoire dans lequel + Apache httpd va tenter de se positionner avant d'effectuer un vidage + mémoire sur disque. + Si votre système d'exploitation est configuré pour créer des + fichiers de vidage mémoire dans le répertoire de travail des + processus qui se sont crashés, + CoreDumpDirectory est nécessaire pour + définir un répertoire de travail autre que le répertoire par défaut + ServerRoot, ce répertoire de + travail ne devant pas être accessible en écriture par l'utilisateur sous + lequel le serveur s'exécute.

    + +

    Si vous avez besoin d'un vidage mémoire pour le débogage, vous + pouvez utiliser cette directive pour le placer à un endroit + différent. Cette directive n'a aucun effet si votre système + d'exploitation n'est pas configuré pour créer des + fichiers de vidage mémoire dans le répertoire de travail des + processus qui se sont crashés.

    + + Vidages mémoire sous Linux +

    Si Apache httpd est démarré sous l'utilisateur root puis bascule vers + un autre utilisateur, le noyau Linux désactive les + vidages mémoire, même si le répertoire est accessible en écriture au + processus. Apache httpd (versions 2.0.46 et supérieures) réactive les + vidages mémoire sous Linux 2.4 et au delà, mais seulement si vous + définissez une directive CoreDumpDirectory.

    +
    + + + Vidages mémoire sous BSD +

    Pour activer le vidage mémoire des exécutables suid sur les + systèmes de style BSD (comme FreeBSD), définissez + kern.sugid_coredump à 1. +

    +
    + + Signaux spécifiques +

    CoreDumpDirectory n'est traité qu'à la + reception d'un certain nombre de signaux , SIGFPE, SIGILL, SIGABORT, + SIGSEGV, et SIGBUS.

    +

    + Sur certains systèmes d'exploitation, SIGQUIT provoque aussi un + vidage mémoire, mais n'est pas traité par les directives + CoreDumpDirectory ou + EnableExceptionHook, si bien que la + définition du répertoire d'enregistrement du vidage mémoire est + entièrement dévolue au système d'exploitation.

    +
    +
    + + + +EnableExceptionHook +Active un hook ("point d'accrochage logiciel") qui exécute des +gestionnaires d'exception après un crash +EnableExceptionHook On|Off +EnableExceptionHook Off +server config + +eventworker +prefork + + +

    Pour des raisons de sécurité, cette directive n'est disponible + que si la compilation du serveur a été configurée avec l'option + --enable-exception-hook. Elle permet d'activer un hook + ("point d'accrochage logiciel") + qui autorise certains modules externes à effectuer un branchement et + accomplir telle ou telle action après le crash d'un processus + enfant.

    + +

    Deux modules, mod_whatkilledus et + mod_backtrace utilisent ce hook. Veuillez vous + référer à la page EnableExceptionHook de Jeff Trawick pour plus + d'informations à leur sujet.

    +
    +
    + + +GracefulShutdownTimeout +Spécifie le délai maximum après lequel le serveur va +s'arrêter dans le cas d'un arrêt "en douceur" +GracefulShutdownTimeout seconds +GracefulShutdownTimeout 0 +server config +eventworker +prefork +Disponible dans les versions 2.2 et supérieures + + +

    La directive GracefulShutdownTimeout + permet de spécifier le temps, en secondes, pendant lequel le serveur + va continuer à fonctionner après avoir reçu un signal + "graceful-stop" ("Arrêt en douceur"), afin de terminer le traitement + des connexions en cours.

    + +

    Définir cette valeur à zéro signifie au serveur d'attendre + jusqu'à ce que toutes les requêtes en cours aient été traitées.

    +
    +
    + + +PidFile +Ficher dans lequel le serveur enregistre l'identificateur +de processus du démon +PidFile nom fichier +PidFile logs/httpd.pid +server config +eventworker +preforkmpm_winnt +mpmt_os2 + + + +

    La directive PidFile permet de définir le + ficher dans lequel le serveur + enregistre l'identificateur de processus du démon. Si le chemin du + fichier n'est pas absolu, il est considéré comme relatif au chemin + défini par la directive ServerRoot.

    + + Exemple + + PidFile /var/run/apache.pid + + + +

    Il est souvent utile de pouvoir envoyer un signal au + serveur afin qu'il ferme et ouvre à nouveau ses journaux + d'erreur et de transfert, et recharge son + fichier de configuration. Pour ce faire, on envoie un signal SIGHUP + (kill -1) à l'identificateur de processus enregistré dans le fichier + défini par la directive PidFile.

    + +

    La directive PidFile fait l'objet des + mêmes avertissements que ceux concernant le chemin d'enregistrement + des fichiers journaux et la sécurité.

    + + Note +

    Depuis la version 2 du serveur HTTP Apache, nous recommandons de n'utiliser + que le script apachectl, ou le script de + démarrage fourni avec votre système d'exploitation pour (re)démarrer ou + arrêter le serveur.

    +
    +
    +
    + + +Listen +Les adresses IP et ports sur lesquels le serveur écoute +Listen [adresse IP:]numéro port +[protocole] +server config +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + +L'argument protocole est supporté depuis la version +2.1.5 + + +

    La directive Listen permet de signifier à + Apache httpd de ne se mettre à l'écoute que sur les adresses IP et ports spécifiés ; par + défaut, le serveur répond aux requêtes en provenance de toutes les + interfaces réseau. La directive Listen est + dorénavant requise, et si elle est absente du fichier de + configuration, le serveur refusera de démarrer. Ceci constitue un + changement par rapport aux versions précédentes d'Apache httpd.

    + +

    La directive Listen signifie au serveur de + n'accepter les requêtes entrantes que vers le port ou le couple + adresse-port spécifié. Si seulement un port est spécifié, le serveur + se met à l'écoute sur ce port sur toutes les interfaces réseau. Si une adresse IP + et un port sont spécifiés, le serveur va se mettre à l'écoute sur ce port sur + l'interface réseau correspondant à l'adresse IP.

    + +

    On peut utiliser autant de directives + Listen que nécessaire pour spécifier + plusieurs adresses et/ou ports à écouter. Le serveur répondra aux + requêtes vers tous les adresses et ports spécifiés.

    + +

    Par exemple, pour que le serveur accepte les connexions sur les + ports 80 et 8000, utilisez :

    + + +Listen 80 +Listen 8000 + + +

    Pour que le serveur accepte les connexions sur deux interfaces et + ports particuliers, spécifiez :

    + + +Listen 192.170.2.1:80 +Listen 192.170.2.5:8000 + + +

    Les adressee IPv6 doivent être entourées de crochets, comme dans + l'exemple suivant :

    + + + Listen [2001:db8::a00:20ff:fea7:ccea]:80 + + +

    L'argument optionnel protocole n'est pas nécessaire + dans la plupart des configurations. S'il est absent, + https est la valeur par défaut pour le port 443 et + http l'est pour tous les autres ports. L'argument + protocole sert à déterminer quel module doit traiter une requête, et + à appliquer des optimisations spécifiques à certains protocoles à + l'aide de la directive AcceptFilter.

    + +

    La spécification d'un protocole n'est nécessaire que si vous + utilisez des ports non standards. Par exemple, pour configurer un + site en https sur le port 8443 :

    + + + Listen 192.170.2.1:8443 https + + + Condition d'erreur + Plusieurs directives Listen pour les mêmes + adresse IP/port vont provoquer l'envoi d'un message d'erreur + Address already in use. + + +
    +Problèmes avec DNS +Définition des adresses et ports +qu'utilise le serveur HTTP Apache +Autre +discussion à propos du message d'erreur Address already in +use, citant d'autres causes possibles. +
    + + +ListenCoresBucketsRatio +Rapport entre le nombre de coeurs de processeur activés et +le nombre de segments d'écoute +ListenCoresBucketsRatio ratio +ListenCoresBucketsRatio 0 (disabled) +server config +eventworker +prefork + +Disponible à partir de la version 2.4.13 du serveur HTTP +Apache, avec un noyau supportant l'option de socket +SO_REUSEPORT, et distribuant uniformément les nouvelles +connexions aux sockets d'écoute des processus (ou threads) qui +l'utilisent (par exemple Linux versions 3.9 et ultérieures, mais pas +l'implémentation courante de SO_REUSEPORT par les +plateformes de type BSD. + + +

    Vous pouvez utiliser la directive + ListenCoresBucketsRatio pour spécifier un + ratio entre le nombre de coeurs de CPU activés et le + nombre de segments d'écoute (listeners' buckets) souhaités ; le + serveur HTTP Apache va alors créernum_cpu_cores / ratio + segments d'écoute, chacun contenant son propre socket d'écoute + Listen sur le ou les mêmes ports ; chaque + processus enfant sera associé à un seul segment d'écoute (avec une + distribution de type round-robin des segments à la création des + processus enfants).

    + + Définition du terme coeur de CPU activé ("online") +

    Sous Linux et BSD, un coeur de CPU peut être activé ou désactivé si Hotplug + a été configuré ; la directive + ListenCoresBucketsRatio doit donc tenir compte de ce + paramètre pour calculer le nombre de segments d'écoute à créer.

    +
    + +

    La directive ListenCoresBucketsRatio peut + améliorer le support de la montée en charge lorsque l'arrivée de + nouvelles connexions est/devient un goulot d'étranglement. Le test + de cette fonctionnalité avec des machines possédant un nombre de + coeurs de CPU important a permit de constater une amélioration des + performances significative et des temps de réponse plus courts.

    + +

    Pour que cette fonctionnalité soit activée, le nombre de coeurs + de CPU doit être égal au moins au double du ratio + spécifié. Si vous spécifiez la valeur recommandée pour + ratio, à savoir 8, le nombre minimum de + coeurs de processeurs disponibles sera alors de 16. La valeur + optimale de ratio permettant d'obtenir des performances maximales + doit être calculée pour chaque système cible, en testant plusieurs valeurs + et en observant les résultats.

    + +

    Cette directive influence le calcul des valeurs limites inférieures de + MinSpareThreads et MaxSpareThreads. En effet, pour accepter les + connexions de manière optimale, le nombre de processus enfants doit être un + multiple du nombre de segments d'écoute.

    +
    +
    + + +ListenBackLog +Longueur maximale de la liste d'attente des +connexions +ListenBacklog backlog +ListenBacklog 511 +server config +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + + + +

    La longueur maximale de la liste d'attente des connexions. En + général, aucune modification n'est nécessaire, ni même souhaitable ; + cependant, sur certains systèmes, il peut être nécessaire + d'en augmenter la valeur en cas d'attaque TCP SYN flood (envoi en + masse de requêtes SYN pour saturer le serveur). Voir le paramètre + backlog de l'appel système listen(2).

    + +

    En fait, l'argument backlog sera souvent limité à une valeur + inférieure en fonction du système d'exploitation. Notez aussi que de + nombreux systèmes d'exploitation ne tiennent pas vraiment compte de + la valeur spécifiée pour l'argument backlog, mais s'en inspirent + seulement (et choisissent en général une valeur supérieure).

    +
    +
    + + +MaxRequestWorkers +Nombre maximum de connexions pouvant être traitées +simultanément +MaxRequestWorkers nombre +Voir ci-dessous pour plus de détails +server config +eventworker +prefork + + + +

    La directive MaxRequestWorkers permet de fixer le + nombre maximum de requêtes pouvant être traitées simultanément. + Si la limite MaxRequestWorkers est atteinte, toute + tentative de connexion sera normalement mise dans une file + d'attente, et ceci jusqu'à un certain nombre dépendant de la + directive ListenBacklog. + Lorsqu'un processus enfant se libèrera suite à la fin du traitement + d'une requête, la connexion en attente pourra être traitée à son + tour.

    + +

    Pour les serveurs non threadés (c'est à dire utilisant + prefork), la directive + MaxRequestWorkers définit alors le nombre maximum de + processus enfants qui pourront être lancés simultanément pour + traiter les requêtes. La valeur par défaut est 256 ; si + vous l'augmentez, vous devez aussi augmenter la valeur de la + directive ServerLimit.

    + +

    Pour les serveur threadés et hybrides (utilisant par + exemple event ou worker), + MaxRequestWorkers définit alors le nombre total de + threads qui seront disponibles pour servir les clients. Dans le + cas des MPMs hybrides, la valeur par défaut est 16 + (directive ServerLimit) multiplié par la valeur + 25 (directive ThreadsPerChild). Par conséquent, pour affecter à la + directive MaxRequestWorkers une valeur qui requiert + plus de 16 processus, vous devez aussi augmenter la valeur de la + directive ServerLimit.

    + +

    Le nom de la directive MaxRequestWorkers + était MaxClients avant la version 2.3.13. Cet + ancien nom est encore supporté.

    +
    +
    + + +MaxMemFree +Quantité maximale de mémoire que l'allocateur principal est +autorisé à conserver sans appeler free() +MaxMemFree KOctets +MaxMemFree 2048 +server config +eventworker +preforkmpm_winnt +mpm_netware + + + +

    La directive MaxMemFree permet de définir + le nombre maximum de KOctets libres que tout allocateur est + autorisé à conserver sans appeler free(). Dans les MPMs + threadés, chaque thread possède son propre allocateur. Si elle est + définie à 0, la quantité de mémoire libre que peut conserver un + allocateur est illimitée.

    +
    +
    + + +MaxConnectionsPerChild +Limite le nombre de connexions qu'un processus enfant va +traiter au cours de son fonctionnement +MaxConnectionsPerChild number +MaxConnectionsPerChild 0 +server config +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + +Disponible depuis la version 2.3.9 du serveur HTTP +Apache. L'ancien nom MaxRequestsPerChild est encore +supporté. + + +

    La directive MaxConnectionsPerChild permet de + définir le nombre maximum de connexions qu'un processus enfant va + pouvoir traiter au cours de son fonctionnement. Lorsqu'il a traité + MaxConnectionsPerChild connexions, le processus + enfant est arrêté. Si MaxConnectionsPerChild est + définie à 0, il n'y a plus aucune limite sur le nombre + de connexions que le processus pourra traiter.

    + +

    Définir MaxConnectionsPerChild à une valeur + non nulle limite la quantité de mémoire qu'un processus peut + consommer à cause de fuites (accidentelles) de mémoire.

    + +
    +
    + + +MaxSpareThreads +Nombre maximum de threads inactifs +MaxSpareThreads nombre +Voir ci-dessous pour plus de détails +server config +eventworker +mpm_netwarempmt_os2 + + + +

    C'est le nombre maximum de threads inactifs. Les MPMs utilisent + cette directive de différentes manières.

    + +

    Pour worker et event, la définition par défaut est + MaxSpareThreads 250. Ce MPM gère les threads inactifs + au niveau du serveur. Si le serveur possède trop de threads + inactifs, des processus enfants seront arrêtés jusqu'à ce que le + nombre de threads inactifs repasse en dessous de cette limite. Des + processus/threads supplémentaires sont susceptibles d'être créés si + ListenCoresBucketsRatio est + activée.

    + +

    Pour mpm_netware, la définition par défaut est + MaxSpareThreads 100. Comme ce MPM n'exécute qu'un seul + processus, le nombre de processus inactifs est surveillé au + niveau du serveur.

    + +

    mpmt_os2 fonctionne de manière similaire à + mpm_netware. Pour mpmt_os2, la + valeur par défaut est 10.

    + + Contraintes +

    La gamme de valeurs pour MaxSpareThreads + est limitée. Apache httpd corrigera automatiquement cette valeur selon + les règles suivantes :

    +
      +
    • Avec mpm_netware, MaxSpareThreads doit être supérieure à MinSpareThreads.
    • + +
    • Avec + worker et event, MaxSpareThreads + doit être supérieure ou égale à la somme de MinSpareThreads et ThreadsPerChild.
    • +
    +
    +
    +MinSpareThreads +StartServers +MaxSpareServers +
    + + +MinSpareThreads +Nombre minimum de threads inactifs qui seront disponibles +pour pouvoir traiter les pics de requêtes +MinSpareThreads nombre +Voir ci-dessous pour plus de détails +server config +eventworker +mpm_netwarempmt_os2 + + + +

    C'est le nombre minimum de threads inactifs pour être en mesure + de traiter les pics de requêtes. Les MPMs utilisent cette directive + de différentes manières.

    + +

    Avec worker et event, la définition par défaut est + MinSpareThreads 75, et le nombre de threads inactifs + est surveillé au niveau du serveur. Si le serveur ne possède pas + assez de threads inactifs, des processus enfants sont créés jusqu'à + ce que le nombre de threads inactifs repasse au dessus de + nombre. Des processus/threads supplémentaires peuvent + être créés si ListenCoresBucketsRatio est activée.

    + +

    Avec mpm_netware, la définition par défaut est + MinSpareThreads 10 et, comme ce MPM n'exécute qu'un + seul processus, le nombre de threads est surveillé au niveau du + serveur.

    + +

    mpmt_os2 fonctionne de manière similaire à + mpm_netware. Pour mpmt_os2, la + valeur par défaut est 5.

    + +
    +MaxSpareThreads +StartServers +MinSpareServers +
    + + +ScoreBoardFile +Chemin du fichier où sont stockées les données concernant +la coordination des processus enfants +ScoreBoardFile chemin fichier +ScoreBoardFile logs/apache_runtime_status +server config +eventworker +preforkmpm_winnt + + + +

    Le serveur HTTP Apache utilise un tableau de bord pour la + communication entre le processus parent et les processus enfants. + Pour faciliter cette communication, certaines architectures + nécessitent un fichier. En l'absence de cette directive, donc si + aucun nom de fichier n'est spécifié, Apache httpd tentera tout + d'abord de créer un tableau uniquement en mémoire (en utilisant la + mémoire partagée anonyme) ; et si il n'y parvient pas, il tentera de + créer un fichier sur disque (en utilisant la mémoire partagée à base + de fichier). Si cette directive est utilisée, Apache httpd créera + systématiquement un fichier sur disque.

    + + Exemple + + ScoreBoardFile /var/run/apache_runtime_status + + + +

    Une mémoire partagée sous forme de fichier est utile pour les + applications tierces qui nécessitent un accès direct au tableau de + bord des processus.

    + +

    Si vous utilisez un ScoreBoardFile, vous + pourrez constater une amélioration des performances en le plaçant + sur un disque virtuel en RAM. Assurez-vous cependant de tenir compte + des mêmes avertissements que ceux concernant le chemin du fichier + journal et la sécurité.

    +
    +Arrêter et redémarrer +le serveur HTTP Apache +
    + + +ReceiveBufferSize +Taille du tampon TCP en entrée +ReceiveBufferSize octets +ReceiveBufferSize 0 +server config +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + + + +

    Le serveur va fixer la taille du tampon TCP en entrée au + nombre d'octets spécifié.

    + +

    Si la directive est définie à 0, le serveur va + utiliser la valeur par défaut adoptée par le système + d'exploitation.

    +
    +
    + + +SendBufferSize +Taille du tampon TCP en sortie +SendBufferSize octets +SendBufferSize 0 +server config +eventworker +preforkmpm_winnt +mpm_netwarempmt_os2 + + + +

    Définit la taille du tampon TCP en sortie avec le nombre + d'octets spécifié. Ceci s'avère souvent très utile pour augmenter les + valeurs par défaut standards du passé des systèmes d'exploitation + pour les transmissions à grande vitesse et haute densité (c'est + à dire de l'ordre de 100ms comme sur les liaisons rapides + transcontinentales).

    + +

    Si la directive est définie à 0, le serveur va + utiliser la valeur par défaut adoptée par le système + d'exploitation.

    + +

    L'amélioration des performances des connexions à grande vitesse + et à temps de latence élevé, peut nécessiter + une intervention au niveau de la configuration de votre système + d'exploitation.

    + +

    Sous certains systèmes d'exploitation, la modification du + comportement TCP via une augmentation de la valeur de + SendBufferSize risque de ne pas être + perceptible, si la directive EnableSendfile n'est pas définie à OFF. + Cette interaction ne s'applique qu'aux fichiers statiques.

    +
    +
    + + +ServerLimit +Limite supérieure de la définition du nombre de +processus +ServerLimit nombre +Voir ci-dessous pour plus de détails +server config +eventworker +prefork + + + +

    Avec le MPM prefork, cette directive définit le + nombre maximum que l'on peut affecter à la directive MaxRequestWorkers, et ceci pour la + durée de vie du processus Apache httpd. Avec les + MPMs worker et event, cette directive, en combinaison avec + ThreadLimit, définit le + nombre maximum que l'on peut affecter à MaxRequestWorkers, et ceci pour la durée de + vie du processus Apache httpd. Au cours d'un redémarrage, vous pouvez + modifier la valeur de la directive MaxRequestWorkers, alors que toute + tentative de modification de la valeur de la directive ServerLimit sera ignorée.

    + +

    Cette directive doit être utilisée avec précaution. Si + ServerLimit est définie à une valeur beaucoup + plus grande que nécessaire, de la mémoire partagée supplémentaire + sera inutilement allouée. Si à la fois + ServerLimit et MaxRequestWorkers possèdent des valeurs + supérieures à ce que le système peut supporter, ce dernier peut + devenir instable ou Apache httpd peut tout simplement refuser de démarrer.

    + +

    Avec les MPMs prefork et event, n'utilisez cette directive + que si vous devez définir MaxRequestWorkers à une valeur supérieure à + 256 (valeur par défaut). N'affectez pas à la directive ServerLimit une valeur supérieure à + celle que vous avez prévu d'affecter à la directive MaxRequestWorkers.

    + +

    Avec worker, n'utilisez cette directive que si + la définition de vos directives MaxRequestWorkers et ThreadsPerChild nécessitent plus de + 16 processus serveurs (valeur par défaut). N'affectez pas à la + directive ServerLimit une + valeur supérieure au nombre de processus requis pour la définition + des directives MaxRequestWorkers + et ThreadsPerChild.

    + + Note +

    Il existe une limite de ServerLimit 20000 codée en + dur dans le serveur (200000 pour le MPM prefork). + Ceci est censé éviter les effets désastreux que pourrait provoquer + une faute de frappe. Pour dépasser cette limite, vous devez + modifier la valeur de MAX_SERVER_LIMIT dans le fichier source du + mpm et recompiler le serveur.

    +
    +
    +Arrêter et redémarrer +le serveur HTTP Apache +
    + + +StartServers +Nombre de processus enfants du serveur créés au +démarrage +StartServers nombre +Voir ci-dessous pour plus de détails +server config +eventworker +preforkmpmt_os2 + + + +

    La directive StartServers permet de + définir le nombre de processus enfants du serveur créés au + démarrage. Comme le nombre de processus est contrôlé dynamiquement + en fonction de la charge (voir MinSpareThreads, MaxSpareThreads, MinSpareServers, MaxSpareServers), il n'est en général + pas nécessaire d'ajuster ce paramètre.

    + +

    La valeur par défaut diffère d'un MPM à l'autre. Pour + worker et event, la définition par défaut est + StartServers 3 ; la valeur par défaut est + 5 pour prefork et 2 + pour mpmt_os2.

    +
    +
    + + +StartThreads +Nombre de threads créés au démarrage +StartThreads nombre +Voir ci-dessous pour plus de détails +server config +mpm_netware + + +

    C'est le nombre de threads créés au démarrage du serveur. Comme + le nombre de threads est contrôlé dynamiquement + en fonction de la charge (voir MinSpareThreads, MaxSpareThreads, MinSpareServers, MaxSpareServers), il n'est en général + pas nécessaire d'ajuster ce paramètre.

    + +

    Pour mpm_netware, la définition par défaut est + StartThreads 50 et, comme il n'y a qu'un processus, il + s'agit du nombre total de threads créés au démarrage pour servir les + requêtes.

    +
    +
    + + +ThreadLimit +Le nombre de threads maximum que l'on peut définir par +processus enfant +ThreadLimit nombre +Voir ci-dessous pour plus de détails +server config +eventworker +mpm_winnt + + + +

    Cette directive permet de définir le nombre maximum que l'on peut + affecter à la directive ThreadsPerChild pour la durée de vie + du processus Apache httpd. La directive ThreadsPerChild peut être modifiée + au cours d'un redémarrage jusqu'à la valeur de la directive ThreadLimit, mais toute tentative + de modification de la directive ThreadLimit au cours d'un + redémarrage sera ignorée.

    + +

    L'utilisation de cette directive doit faire l'objet de + précautions particulières. Si ThreadLimit est + définie à une valeur très supérieure à la directive ThreadsPerChild, de la mémoire + partagée supplémentaire sera inutilement allouée. Si les directives + ThreadLimit et ThreadsPerChild sont définies à des + valeurs supérieures à ce que le système peut supporter, ce dernier + peut devenir instable, ou Apache httpd peut tout simplement refuser de + démarrer. Ne définissez pas cette directive à une valeur supérieure + à la valeur maximale que vous pensez affecter à la directive ThreadsPerChild pour le processus + Apache httpd en cours d'exécution.

    + +

    La valeur par défaut de la directive + ThreadLimit est 1920 avec + mpm_winnt, et 64 avec les autres + MPMs.

    + + Note +

    Il existe une limite de ThreadLimit 20000 (ou + ThreadLimit 100000 avec event, + ThreadLimit 15000 avec mpm_winnt) + codée en dur dans le serveur. Ceci est censé éviter les effets + désastreux que pourrait provoquer une faute de frappe. Pour + dépasser cette limite, vous devez modifier la valeur de + MAX_THREAD_LIMIT dans le fichier source du mpm et recompiler le + serveur.

    +
    +
    +
    + + +ThreadsPerChild +Nombre de threads créés par chaque processus +enfant +ThreadsPerChild nombre +Voir ci-dessous pour plus de détails +server config +eventworker +mpm_winnt + + + +

    Cette directive permet de définir le nombre de threads que va + créer chaque processus enfant. Un processus enfant crée ces threads + au démarrage et n'en crée plus d'autres par la suite. Si l'on + utilise un MPM comme mpm_winnt qui ne lance qu'un + processus enfant, ce nombre doit être suffisamment grand pour + supporter la charge du serveur. Avec un MPM comme + worker qui lance plusieurs processus enfants, c'est + le nombre total de threads qui doit être suffisamment grand + pour supporter la charge du serveur.

    + +

    La valeur par défaut de la directive + ThreadsPerChild est 64 avec + mpm_winnt, et 25 avec les autres + MPMs.

    +
    +
    + + +ThreadStackSize +La taille en octets de la pile qu'utilisent les threads qui +traitent les connexions clients +ThreadStackSize taille +65536 sous NetWare; varie en fonction des autres systèmes +d'exploitation +server config +eventworker +mpm_winntmpm_netware +mpmt_os2 + +Disponible dans les versions 2.1 et supérieures +du serveur HTTP Apache + + +

    La directive ThreadStackSize permet de + définir la taille de la pile (pour les données propres) qu'utilisent + les threads qui traitent les connexions clients en faisant appel à + des modules. Dans la plupart des cas, la valeur par défaut de la + taille de la pile du système d'exploitation convient, mais il existe + certaines situations où il peut s'avérer nécessaire de l'ajuster + :

    + +
      +
    • Sur les plates-formes qui possèdent une valeur par défaut de + taille de la pile relativement petite (par exemple HP-UX), Apache + httpd peut se crasher si l'on utilise certains modules tiers qui + possèdent un quantité de données propres stockées relativement + importante. Il se peut que ces mêmes modules fonctionnent + correctement sur d'autres plate-formes où la valeur par défaut de + la taille de la pile est supérieure. Ce type de crash peut être + evité en définissant ThreadStackSize à une + valeur supérieure à la valeur par défaut du système + d'exploitation. Ce type d'ajustement n'est nécessaire que si le + fournisseur du module tiers en fait mention, ou si le diagnostic + d'un crash d'Apache httpd indique que la taille de la pile était trop + petite.
    • + +
    • Sur les plates-formes où la taille par défaut de la pile des + threads est sensiblement supérieure à la taille nécessaire pour la + configuration du serveur web, il est possible de disposer d'un + plus grand nombre de threads par processus enfant si la directive + ThreadStackSize est définie à une valeur + inférieure à la valeur par défaut du système d'exploitation. + Cependant, ce + type d'ajustement ne doit être effectué que dans un environnement + de test permettant de qualifier le serveur web au maximum de ses + possibilités, car il peut arriver, dans de rares cas, que des + requêtes nécessitent une taille de pile supérieure pour pouvoir + être traitées. La taille minimale requise pour la pile dépend + fortement des modules utilisés, mais toute modification dans la + configuration du serveur web peut invalider la définition courante + de la directive ThreadStackSize.
    • + +
    • Sous Linux, cette directive ne peut être utilisée que pour + augmenter la valeur par defaut de la taille de la pile, car + l'appel système sous-jacent utilise cette valeur comme taille de pile + minimale. C'est la limite logicielle (souvent élevée) + pour ulimit -s (8Mo si aucune limite) qui est + utilisée comme taille de pile par défaut.
    • +
    + + Il est recommandé de ne pas réduire + ThreadStackSize, à moins qu'un grand nombre + de threads par processus enfant ne soit nécessaire. Sur certaines + plates-formes (y compris Linux), une valeur de 128000 est déjà trop + basse et provoque des crashes avec certains modules courants. +
    +
    + + diff --git a/docs/manual/mod/mpm_common.xml.ja b/docs/manual/mod/mpm_common.xml.ja index dbf9da8c064..779c540354f 100644 --- a/docs/manual/mod/mpm_common.xml.ja +++ b/docs/manual/mod/mpm_common.xml.ja @@ -1,7 +1,7 @@ - + + -mpm_netware - Apache HTTP Server +mpm_netware - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM netware

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -74,12 +80,12 @@
  • StartThreads
  • ThreadStackSize
  • -

    See also

    +

    Bugfix checklist

    See also

    +
  • Comments
  • top

    MaxThreads Directive

    @@ -103,8 +109,30 @@
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_netware.html.fr b/docs/manual/mod/mpm_netware.html.fr new file mode 100644 index 00000000000..a67d42424df --- /dev/null +++ b/docs/manual/mod/mpm_netware.html.fr @@ -0,0 +1,140 @@ + + + + + +mpm_netware - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM netware

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Multi-Processing Module implementing an exclusively threaded web server optimized for Novell NetWare
    + + +
    Description:Module multi-processus implmentant un serveur web bas +exclusivement sur les threads et optimis pour Novell +NetWare
    Statut:MPM
    IdentificateurdeModule:mpm_netware_module
    FichierSource:mpm_netware.c
    +

    Sommaire

    + +

    Ce module multi-processus (MPM) implmente un serveur web bas + exclusivement sur les threads et optimis pour Novell NetWare.

    + +

    Le thread matre est charg du lancement de threads esclaves qui + attendent les connexions et les traitent au fur et mesure de leur + arrive. Le serveur HTTP Apache essaie toujours de maintenir + plusieurs threads + esclaves en spare (en rserve) ou inactifs. De cette + faon, les clients n'ont pas besoin d'attendre le lancement d'un + nouveau thread enfant pour que leurs requtes soient traites.

    + +

    Les directives StartThreads, MinSpareThreads, MaxSpareThreads, et MaxThreads contrlent + la manire dont le thread matre cre les threads esclaves afin de + traiter les requtes. En gnral, Apache httpd s'auto-rgule correctement, + et la plupart des sites ne ncessitent aucune modification des + valeurs par dfaut de ces directives. Pour les sites dont le serveur + est limit en mmoire, il peut s'avrer ncessaire de diminuer la + valeur de la directive MaxThreads afin d'viter une + hyper-activit du serveur (arrts de threads inactifs et lancement incessant + de nouveau threads). Vous trouverez plus d'informations + propos du contrle de la cration de processus dans le document conseils en matire de + performances.

    + +

    La directive MaxRequestsPerChild + contrle la frquence laquelle le serveur recycle ses processus + en arrtant les anciens et en en lanant de nouveaux. Sous le + systme d'exploitation NetWare, il est vivement recommand de + laisser cette directive 0, ce qui permet aux threads esclaves de + continuer traiter les requtes indfiniment.

    +
    + + +
    top
    +

    Directive MaxThreads

    + + + + + + + +
    Description:Dfinit le nombre maximum de threads esclaves
    Syntaxe:MaxThreads nombre
    Dfaut:MaxThreads 2048
    Contexte:configuration du serveur
    Statut:MPM
    Module:mpm_netware
    +

    La directive MaxThreads dfinit + le nombre maximum de threads esclaves que l'on dsire autoriser. La + valeur par dfaut correspondant la valeur code en dur la + compilation, la valeur de cette directive ne peut donc qu'tre + diminue, comme dans l'exemple suivant :

    + +

    + MaxThreads 512 +

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mpm_netware.xml.fr b/docs/manual/mod/mpm_netware.xml.fr new file mode 100644 index 00000000000..6394fe58b68 --- /dev/null +++ b/docs/manual/mod/mpm_netware.xml.fr @@ -0,0 +1,117 @@ + + + + + + + + + + +mpm_netware +Module multi-processus implémentant un serveur web basé +exclusivement sur les threads et optimisé pour Novell +NetWare +MPM +mpm_netware.c +mpm_netware_module + + +

    Ce module multi-processus (MPM) implémente un serveur web basé + exclusivement sur les threads et optimisé pour Novell NetWare.

    + +

    Le thread maître est chargé du lancement de threads esclaves qui + attendent les connexions et les traitent au fur et à mesure de leur + arrivée. Le serveur HTTP Apache essaie toujours de maintenir + plusieurs threads + esclaves en spare (en réserve) ou inactifs. De cette + façon, les clients n'ont pas besoin d'attendre le lancement d'un + nouveau thread enfant pour que leurs requêtes soient traitées.

    + +

    Les directives StartThreads, MinSpareThreads, MaxSpareThreads, et MaxThreads contrôlent + la manière dont le thread maître crée les threads esclaves afin de + traiter les requêtes. En général, Apache httpd s'auto-régule correctement, + et la plupart des sites ne nécessitent aucune modification des + valeurs par défaut de ces directives. Pour les sites dont le serveur + est limité en mémoire, il peut s'avérer nécessaire de diminuer la + valeur de la directive MaxThreads afin d'éviter une + hyper-activité du serveur (arrêts de threads inactifs et lancement incessant + de nouveau threads). Vous trouverez plus d'informations à + propos du contrôle de la création de processus dans le document conseils en matière de + performances.

    + +

    La directive MaxRequestsPerChild + contrôle la fréquence à laquelle le serveur recycle ses processus + en arrêtant les anciens et en en lançant de nouveaux. Sous le + système d'exploitation NetWare, il est vivement recommandé de + laisser cette directive à 0, ce qui permet aux threads esclaves de + continuer à traiter les requêtes indéfiniment.

    +
    +Définition des adresses et ports +qu'utilise Apache httpd + + +Listen + +ListenBacklog + +MaxMemFree + +MaxRequestsPerChild + +ReceiveBufferSize + +SendBufferSize + +MaxSpareThreads + +MinSpareThreads + +StartThreads + +ThreadStackSize + + + +MaxThreads +Définit le nombre maximum de threads esclaves +MaxThreads nombre +MaxThreads 2048 +server config + + +

    La directive MaxThreads définit + le nombre maximum de threads esclaves que l'on désire autoriser. La + valeur par défaut correspondant à la valeur codée en dur à la + compilation, la valeur de cette directive ne peut donc qu'être + diminuée, comme dans l'exemple suivant :

    + + + MaxThreads 512 + +
    +
    + +
    diff --git a/docs/manual/mod/mpm_netware.xml.meta b/docs/manual/mod/mpm_netware.xml.meta index 2fea66827c3..9b8f967461a 100644 --- a/docs/manual/mod/mpm_netware.xml.meta +++ b/docs/manual/mod/mpm_netware.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/mpm_winnt.html b/docs/manual/mod/mpm_winnt.html index 2c0ccc92f71..7370f15f878 100644 --- a/docs/manual/mod/mpm_winnt.html +++ b/docs/manual/mod/mpm_winnt.html @@ -8,6 +8,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mpm_winnt.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mpm_winnt.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mpm_winnt.html.de b/docs/manual/mod/mpm_winnt.html.de index c1bd0027998..8f52ebc585a 100644 --- a/docs/manual/mod/mpm_winnt.html.de +++ b/docs/manual/mod/mpm_winnt.html.de @@ -1,28 +1,34 @@ - -mpm_winnt - Apache HTTP Server +mpm_winnt - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Apache-MPM winnt

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja 

    Diese bersetzung ist mglicherweise @@ -42,6 +48,7 @@
    +

    Bugfix checklist

    Siehe auch

    +

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_winnt.html.en b/docs/manual/mod/mpm_winnt.html.en index ffa0b623e34..53ace45e01b 100644 --- a/docs/manual/mod/mpm_winnt.html.en +++ b/docs/manual/mod/mpm_winnt.html.en @@ -1,32 +1,37 @@ - -mpm_winnt - Apache HTTP Server +mpm_winnt - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM winnt

    Available Languages:  de  |  en  | + fr  |  ja 

    - +
    Description:This Multi-Processing Module is optimized for Windows -NT.
    Description:Multi-Processing Module optimized for Windows NT.
    Status:MPM
    ModuleIdentifier:mpm_winnt_module
    SourceFile:mpm_winnt.c
    @@ -36,9 +41,71 @@ NT. Windows NT operating systems. It uses a single control process which launches a single child process which in turn creates threads to handle requests

    + +

    Capacity is configured using the + ThreadsPerChild directive, + which sets the maximum number of concurrent client connections.

    + +

    By default, this MPM uses advanced Windows APIs for accepting + new client connections. In some configurations, third-party products + may interfere with this implementation, with the following messages + written to the web server log:

    + +

    + Child: Encountered too many AcceptEx faults accepting client connections.
    + winnt_mpm: falling back to 'AcceptFilter none'. +

    + +

    The MPM falls back to a safer implementation, but some client requests + were not processed correctly. In order to avoid this error, use + AcceptFilter with accept filter + none.

    + +
    AcceptFilter http none
    +AcceptFilter https none
    + + +

    In Apache httpd 2.0 and 2.2, + Win32DisableAcceptEx was used for this purpose.

    + +

    The WinNT MPM differs from the Unix MPMs such as worker and event + in several areas:

    + +
      +
    • When a child process is exiting due to shutdown, restart, or + MaxConnectionsPerChild, + active requests in the exiting process have + TimeOut seconds to finish before + processing is aborted. Alternate types of restart and shutdown are not + implemented.
    • + +
    • New child processes read the configuration files instead of + inheriting the configuration from the parent. The behavior will + be the same as on Unix if the child process is created at startup + or restart, but if a child process is created because the prior + one crashed or reached + MaxConnectionsPerChild, + any pending changes to the configuration will become active in the + child at that point, and the parent and child will be using a + different configuration. If planned configuration changes have been + partially implemented and the current configuration cannot be + parsed, the replacement child process cannot start up and the server + will halt. Because of this behavior, configuration files should not + be changed until the time of a server restart.
    • + +
    • The monitor and fatal_exception hooks + are not currently implemented.
    • + +
    • AcceptFilter is implemented in the MPM + and has a different type of control over handling of new connections. + (Refer to the AcceptFilter + documentation for details.)
    • +
    +
    +

    Bugfix checklist

    See also

    +

    Available Languages:  de  |  en  | + fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_winnt.html.fr b/docs/manual/mod/mpm_winnt.html.fr new file mode 100644 index 00000000000..05522f3c265 --- /dev/null +++ b/docs/manual/mod/mpm_winnt.html.fr @@ -0,0 +1,163 @@ + + + + + +mpm_winnt - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM winnt

    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja 

    +
    + + + +
    Description:Module multi-processus optimis pour Windows +NT.
    Statut:MPM
    IdentificateurdeModule:mpm_winnt_module
    FichierSource:mpm_winnt.c
    +

    Sommaire

    + +

    Ce module multi-processus (MPM) est le module par dfaut pour les + systmes d'exploitation de style Windows NT. Il consiste en un + processus de contrle unique qui lance un processus enfant unique, + ce dernier crant son tour des threads pour traiter les + requtes.

    + +

    La directive ThreadsPerChild dfinit le + nombre maximal de connexions clientes simultanes.

    + +

    Ce MPM utilise par dfaut les APIs Windows avances pour accepter + les nouvelles connexions des clients. Avec certaines configurations, + des produits tiers peuvent interfrer avec cette implmentation, et + provoquer l'enregistrement des messages suivants dans les journaux + du serveur :

    + +

    + Child: Encountered too many AcceptEx faults accepting client connections.
    + winnt_mpm: falling back to 'AcceptFilter none'. +

    + +

    Le MPM se rabat sur une implmentation plus sre, mais certaines + requtes n'ont pas t traites correctement. Pour viter cette + erreur, dfinissez la directive AcceptFilter none.

    + +
    AcceptFilter http none
    +AcceptFilter https none
    + + +

    Avec les versions 2.0 et 2.2 d'Apache httpd, c'est la directive + Win32DisableAcceptEx qui tait utilise cet + effet.

    + +

    Le MPM WinNT diffre des autres MPMs Unix comme worker et event + bien des gards :

    + +
      +
    • Lorsqu'un processus enfant s'arrte suite un arrt ou + redmarrage du serveur, ou lorsque que la limite MaxConnectionsPerChild est + atteinte, les requtes en cours de traitement par ce processus en + cours d'arrt n'ont que TimeOut secondes pour s'excuter avant + l'arrt du processus. Les autres types de redmarrage ou arrt ne + sont pas implments.
    • + +
    • Les nouveau processus enfants relisent les fichiers de + configuration au lieu d'en hriter du parent. Ce comportement ne + pose pas de problme si le processus enfant est cr au dmarrage + ou redmarrage, mais dans le cas o un processus enfant est cr + parce qu'un autre processus enfant s'est arrt ou a atteint la + limite MaxConnectionsPerChild, tout + changement survenu entre temps dans la configuration sera alors + pris en compte dans le processus enfant, et parent et enfant + utiliseront une configuration diffrente. Si des modifications + planifies de la configuration ont t partiellement effectues, + et si la configuration courante n'est pas interprtable, le + processus enfant de remplacement ne pourra pas dmarrer, et le + serveur s'arrtera. En consquence, toute modification des + fichiers de configuration doit tre accompagne d'un redmarrage + du serveur.
    • + +
    • Les hooks monitor et fatal_exception + ne sont pas encore implments.
    • + +
    • La directive AcceptFilter est + implmente par le MPM et fournit un type de contrle diffrent + sur le traitement des nouvelles connexions (Voir la documentation + de la directive AcceptFilter + pour plus de dtails).
    • +
    + +
    + + +
    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mpm_winnt.html.ja.utf8 b/docs/manual/mod/mpm_winnt.html.ja.utf8 index e7c9d5fac80..998462c65ce 100644 --- a/docs/manual/mod/mpm_winnt.html.ja.utf8 +++ b/docs/manual/mod/mpm_winnt.html.ja.utf8 @@ -1,33 +1,40 @@ - -mpm_winnt - Apache HTTP サーバ +mpm_winnt - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache MPM winnt

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -43,6 +50,7 @@ +

    Bugfix checklist

    参照

    +
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpm_winnt.xml b/docs/manual/mod/mpm_winnt.xml index 2b5fa4af0d5..ae87a46db3a 100644 --- a/docs/manual/mod/mpm_winnt.xml +++ b/docs/manual/mod/mpm_winnt.xml @@ -23,8 +23,7 @@ mpm_winnt -This Multi-Processing Module is optimized for Windows -NT. +Multi-Processing Module optimized for Windows NT. MPM mpm_winnt.c mpm_winnt_module @@ -34,8 +33,74 @@ NT. Windows NT operating systems. It uses a single control process which launches a single child process which in turn creates threads to handle requests

    + +

    Capacity is configured using the + ThreadsPerChild directive, + which sets the maximum number of concurrent client connections.

    + +

    By default, this MPM uses advanced Windows APIs for accepting + new client connections. In some configurations, third-party products + may interfere with this implementation, with the following messages + written to the web server log:

    + + + Child: Encountered too many AcceptEx faults accepting client connections.
    + winnt_mpm: falling back to 'AcceptFilter none'. +
    + +

    The MPM falls back to a safer implementation, but some client requests + were not processed correctly. In order to avoid this error, use + AcceptFilter with accept filter + none.

    + + +AcceptFilter http none +AcceptFilter https none + + +

    In Apache httpd 2.0 and 2.2, + Win32DisableAcceptEx was used for this purpose.

    + +

    The WinNT MPM differs from the Unix MPMs such as worker and event + in several areas:

    + +
      +
    • When a child process is exiting due to shutdown, restart, or + MaxConnectionsPerChild, + active requests in the exiting process have + TimeOut seconds to finish before + processing is aborted. Alternate types of restart and shutdown are not + implemented.
    • + +
    • New child processes read the configuration files instead of + inheriting the configuration from the parent. The behavior will + be the same as on Unix if the child process is created at startup + or restart, but if a child process is created because the prior + one crashed or reached + MaxConnectionsPerChild, + any pending changes to the configuration will become active in the + child at that point, and the parent and child will be using a + different configuration. If planned configuration changes have been + partially implemented and the current configuration cannot be + parsed, the replacement child process cannot start up and the server + will halt. Because of this behavior, configuration files should not + be changed until the time of a server restart.
    • + +
    • The monitor and fatal_exception hooks + are not currently implemented.
    • + +
    • AcceptFilter is implemented in the MPM + and has a different type of control over handling of new connections. + (Refer to the AcceptFilter + documentation for details.)
    • +
    + +Using Apache HTTP Server on Microsoft Windows + +AcceptFilter + CoreDumpDirectory PidFile diff --git a/docs/manual/mod/mpm_winnt.xml.de b/docs/manual/mod/mpm_winnt.xml.de index e2c534502b5..311b5d455ba 100644 --- a/docs/manual/mod/mpm_winnt.xml.de +++ b/docs/manual/mod/mpm_winnt.xml.de @@ -1,7 +1,7 @@ - + + + + + + + + +mpm_winnt +Module multi-processus optimisé pour Windows +NT. +MPM +mpm_winnt.c +mpm_winnt_module + + +

    Ce module multi-processus (MPM) est le module par défaut pour les + systèmes d'exploitation de style Windows NT. Il consiste en un + processus de contrôle unique qui lance un processus enfant unique, + ce dernier créant à son tour des threads pour traiter les + requêtes.

    + +

    La directive ThreadsPerChild définit le + nombre maximal de connexions clientes simultanées.

    + +

    Ce MPM utilise par défaut les APIs Windows avancées pour accepter + les nouvelles connexions des clients. Avec certaines configurations, + des produits tiers peuvent interférer avec cette implémentation, et + provoquer l'enregistrement des messages suivants dans les journaux + du serveur :

    + + + Child: Encountered too many AcceptEx faults accepting client connections.
    + winnt_mpm: falling back to 'AcceptFilter none'. +
    + +

    Le MPM se rabat sur une implémentation plus sûre, mais certaines + requêtes n'ont pas été traitées correctement. Pour éviter cette + erreur, définissez la directive AcceptFilter à none.

    + + +AcceptFilter http none +AcceptFilter https none + + +

    Avec les versions 2.0 et 2.2 d'Apache httpd, c'est la directive + Win32DisableAcceptEx qui était utilisée à cet + effet.

    + +

    Le MPM WinNT diffère des autres MPMs Unix comme worker et event + à bien des égards :

    + +
      +
    • Lorsqu'un processus enfant s'arrête suite à un arrêt ou + redémarrage du serveur, ou lorsque que la limite MaxConnectionsPerChild est + atteinte, les requêtes en cours de traitement par ce processus en + cours d'arrêt n'ont que TimeOut secondes pour s'exécuter avant + l'arrêt du processus. Les autres types de redémarrage ou arrêt ne + sont pas implémentés.
    • + +
    • Les nouveau processus enfants relisent les fichiers de + configuration au lieu d'en hériter du parent. Ce comportement ne + pose pas de problème si le processus enfant est créé au démarrage + ou redémarrage, mais dans le cas où un processus enfant est créé + parce qu'un autre processus enfant s'est arrêté ou a atteint la + limite MaxConnectionsPerChild, tout + changement survenu entre temps dans la configuration sera alors + pris en compte dans le processus enfant, et parent et enfant + utiliseront une configuration différente. Si des modifications + planifiées de la configuration ont été partiellement effectuées, + et si la configuration courante n'est pas interprétable, le + processus enfant de remplacement ne pourra pas démarrer, et le + serveur s'arrêtera. En conséquence, toute modification des + fichiers de configuration doit être accompagnée d'un redémarrage + du serveur.
    • + +
    • Les hooks monitor et fatal_exception + ne sont pas encore implémentés.
    • + +
    • La directive AcceptFilter est + implémentée par le MPM et fournit un type de contrôle différent + sur le traitement des nouvelles connexions (Voir la documentation + de la directive AcceptFilter + pour plus de détails).
    • +
    + +
    + +Utiliser le serveur HTTP +Apache sous Microsoft Windows + +AcceptFilter + + +CoreDumpDirectory + +PidFile + +Listen + +ListenBacklog + +MaxConnectionsPerChild + +MaxMemFree + +ScoreBoardFile + +ReceiveBufferSize + +SendBufferSize + +ThreadLimit + +ThreadsPerChild + +ThreadStackSize + + +
    diff --git a/docs/manual/mod/mpm_winnt.xml.ja b/docs/manual/mod/mpm_winnt.xml.ja index 8b24e763ac5..c162447ff73 100644 --- a/docs/manual/mod/mpm_winnt.xml.ja +++ b/docs/manual/mod/mpm_winnt.xml.ja @@ -1,7 +1,7 @@ - + -mpmt_os2 - Apache HTTP Server +mpmt_os2 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM os2

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    説明:Windows NT 向けに最適化されたマルチプロセッシングモジュール
    ステータス:MPM
    @@ -32,12 +38,12 @@

    The Server consists of a main, parent process and a small, static number of child processes.

    -

    The parent process's job is to manage the child processes. This +

    The parent process' job is to manage the child processes. This involves spawning children as required to ensure there are always StartServers processes accepting connections.

    -

    Each child process consists of a a pool of worker threads and a +

    Each child process consists of a pool of worker threads and a main thread that accepts connections and passes them to the workers via a work queue. The worker thread pool is dynamic, managed by a maintenance thread so that the number of idle threads is kept between @@ -46,7 +52,7 @@

    +
  • Comments
  • -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/mpmt_os2.html.fr b/docs/manual/mod/mpmt_os2.html.fr new file mode 100644 index 00000000000..2eda66a49fe --- /dev/null +++ b/docs/manual/mod/mpmt_os2.html.fr @@ -0,0 +1,102 @@ + + + + + +mpmt_os2 - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM os2

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Hybrid multi-process, multi-threaded MPM for OS/2
    Status:MPM
    + + +
    Description:MPM hybride multi-processus, multi-thread pour +OS/2
    Statut:MPM
    IdentificateurdeModule:mpm_mpmt_os2_module
    FichierSource:mpmt_os2.c
    +

    Sommaire

    + +

    Le serveur se compose d'un processus principal parent, et d'un + petit nombre fixe de processus enfants.

    + +

    La tche du processus parent consiste grer les processus + enfants, c'est dire lancer ces processus de manire ce + qu'il y en ait toujours un nombre gal la valeur de la directive + StartServers pour traiter + les connexions.

    + +

    Chaque processus enfant comporte un jeu de threads esclaves et un + thread matre qui accepte les connexions et les distribue aux + esclaves via une file de travail. Le jeu de threads esclaves est + dynamique et gr par un thread de maintenance de faon ce que le + nombre de threads inactifs soit maintenu entre MinSpareThreads et MaxSpareThreads.

    +
    + + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/mpmt_os2.xml b/docs/manual/mod/mpmt_os2.xml index 63a41290ef1..8a54c881e3b 100644 --- a/docs/manual/mod/mpmt_os2.xml +++ b/docs/manual/mod/mpmt_os2.xml @@ -32,12 +32,12 @@

    The Server consists of a main, parent process and a small, static number of child processes.

    -

    The parent process's job is to manage the child processes. This +

    The parent process' job is to manage the child processes. This involves spawning children as required to ensure there are always StartServers processes accepting connections.

    -

    Each child process consists of a a pool of worker threads and a +

    Each child process consists of a pool of worker threads and a main thread that accepts connections and passes them to the workers via a work queue. The worker thread pool is dynamic, managed by a maintenance thread so that the number of idle threads is kept between @@ -47,9 +47,9 @@ Setting which addresses and ports Apache uses -User +User -Group +Group Listen diff --git a/docs/manual/mod/mpmt_os2.xml.fr b/docs/manual/mod/mpmt_os2.xml.fr new file mode 100644 index 00000000000..8ad4bef1a44 --- /dev/null +++ b/docs/manual/mod/mpmt_os2.xml.fr @@ -0,0 +1,78 @@ + + + + + + + + + + + +mpmt_os2 +MPM hybride multi-processus, multi-thread pour +OS/2 +MPM +mpmt_os2.c +mpm_mpmt_os2_module + +

    +

    Le serveur se compose d'un processus principal parent, et d'un + petit nombre fixe de processus enfants.

    + +

    La tâche du processus parent consiste à gérer les processus + enfants, c'est à dire lancer ces processus de manière à ce + qu'il y en ait toujours un nombre égal à la valeur de la directive + StartServers pour traiter + les connexions.

    + +

    Chaque processus enfant comporte un jeu de threads esclaves et un + thread maître qui accepte les connexions et les distribue aux + esclaves via une file de travail. Le jeu de threads esclaves est + dynamique et géré par un thread de maintenance de façon à ce que le + nombre de threads inactifs soit maintenu entre MinSpareThreads et MaxSpareThreads.

    +
    +Définition des adresses et ports +qu'utilise Apache + +User + +Group + +Listen + +ListenBacklog + +ReceiveBufferSize + +SendBufferSize + +MaxConnectionsPerChild + +MaxSpareThreads + +MinSpareThreads + +PidFile + +StartServers + + + diff --git a/docs/manual/mod/mpmt_os2.xml.meta b/docs/manual/mod/mpmt_os2.xml.meta index dfe34172d98..f380b827f62 100644 --- a/docs/manual/mod/mpmt_os2.xml.meta +++ b/docs/manual/mod/mpmt_os2.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/mod/prefork.html b/docs/manual/mod/prefork.html index c21f42f3d8b..a0bc723a13a 100644 --- a/docs/manual/mod/prefork.html +++ b/docs/manual/mod/prefork.html @@ -8,6 +8,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: prefork.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: prefork.html.ja.utf8 Content-Language: ja Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/prefork.html.de b/docs/manual/mod/prefork.html.de index 835c78f1e4b..80cde7fb237 100644 --- a/docs/manual/mod/prefork.html.de +++ b/docs/manual/mod/prefork.html.de @@ -1,28 +1,34 @@ - -prefork - Apache HTTP Server +prefork - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Apache-MPM prefork

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    @@ -52,7 +58,10 @@ erwarten, aber klein genug, um sicherzustellen, dass genug physischer Arbeitsspeicher fr alle Prozesse vorhanden ist.

    -
    top

    Arbeitsweise

    @@ -186,9 +192,31 @@

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/prefork.html.en b/docs/manual/mod/prefork.html.en index 1f37be9a11d..4d54ad44e85 100644 --- a/docs/manual/mod/prefork.html.en +++ b/docs/manual/mod/prefork.html.en @@ -1,28 +1,34 @@ - -prefork - Apache HTTP Server +prefork - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM prefork

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    @@ -47,7 +53,10 @@ small enough to assure that there is enough physical RAM for all processes.

    -
    top

    How it Works

    @@ -182,9 +188,31 @@ uses

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/prefork.html.fr b/docs/manual/mod/prefork.html.fr new file mode 100644 index 00000000000..19b35d9a924 --- /dev/null +++ b/docs/manual/mod/prefork.html.fr @@ -0,0 +1,233 @@ + + + + + +prefork - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM prefork

    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    + + + +
    Description:Implmente un serveur web avec dmarrage anticip de +processus, sans thread
    Statut:MPM
    IdentificateurdeModule:mpm_prefork_module
    FichierSource:prefork.c
    +

    Sommaire

    + +

    Ce module multi-processus (MPM) implmente un serveur web avec + dmarrage anticip de processus. Chaque processus du serveur peut + rpondre aux requtes entrantes, et un processus parent contrle la + taille du jeu de processus enfants. Il est particulirement indiqu pour les + sites qui ne doivent pas utiliser les threads afin de maintenir une + compatibilit avec certaines bibliothques non sres du point de vue + des threads. C'est galement le MPM le plus appropri si l'on veut + isoler les requtes les unes des autres, de faon ce qu'un + problme concernant une requte n'affecte pas les autres.

    + +

    Ce MPM s'auto-contrle de manire efficace, de sorte qu'il est + rarement ncessaire d'ajuster ses directives de configuration. Le + plus important est la dfinition de la directive MaxRequestWorkers ; sa valeur doit tre + assez grande pour pouvoir traiter autant de requtes simultanes que + vous pensez recevoir, mais assez petite pour conserver suffisamment + de mmoire RAM pour tous les processus.

    +
    + +
    top
    +
    +

    Comment a marche

    +

    Un processus de contrle unique a pour tche de lancer les + processus enfants qui attendent les connexions et les traitent au + fur et mesure qu'elles arrivent. Apache httpd essaie toujours de + maintenir plusieurs processus serveurs inactifs ou en + rserve, afin de pouvoir traiter les requtes entrantes. De + cette faon, les clients n'ont pas besoin d'attendre le dmarrage + d'un nouveau processus enfant pour que leurs requtes puissent tre + traites.

    + +

    Les directives StartServers, MinSpareServers, MaxSpareServers et MaxRequestWorkers permettent de contrler + la manire dont le processus parent cre les processus enfants pour + traiter les requtes. En gnral, Apache httpd s'auto-contrle de manire + efficace, de sorte que la plupart des sites peuvent conserver les + valeurs par dfaut des directives. Les sites qui doivent traiter + plus de 256 requtes simultanes doivent augmenter la valeur de + MaxRequestWorkers, alors que les + sites dont la ressource mmoire est limite doivent la diminuer afin + d'viter une hyperactivit du serveur (utilisation excessive de la + mmoire virtuelle sur disque). Vous trouverez plus d'informations + propos du contrle de la cration de processus dans le document conseils en matire de + performances

    + +

    Alors que le processus parent est en gnral dmarr en tant que + root sous Unix afin de pouvoir se mettre l'coute sur le port 80, les + processus enfants sont lancs par Apache httpd sous un utilisateur avec + privilges restreints. On peut contrler les privilges accords aux + processus enfants d'Apache httpd l'aide des directives User et Group. Les processus enfants doivent + tre en mesure de lire tous les contenus destins tre servis, + mais leurs privilges doivent tre aussi bas que possible.

    + +

    La directive MaxConnectionsPerChild permet de + contrler la frquence laquelle le serveur recycle ses processus + en arrtant les plus anciens et en en lanant de nouveaux.

    + +

    Ce module MPM utilise le mutex mpm-accept pour + srialiser l'accs aux connexions entrantes lorsque peut se + prsenter un problme d'afflux de requtes (en gnral quand il y a + plusieurs sockets en coute). Les aspects de l'implmentation de ce + mutex peuvent tre configurs via la directive Mutex. Vous trouverez des informations + supplmentaires propos de ce mutex dans la documentation propos + des conseils en matire de + performances

    +
    +
    top
    +

    Directive MaxSpareServers

    + + + + + + + +
    Description:Nombre maximum de processus serveurs enfants +inactifs
    Syntaxe:MaxSpareServers nombre
    Dfaut:MaxSpareServers 10
    Contexte:configuration du serveur
    Statut:MPM
    Module:prefork
    +

    La directive MaxSpareServers permet de + dfinir le nombre maximum souhait de processus serveurs enfants + inactifs. Un processus inactif est un processus qui ne + traite pas de requte. S'il y a plus de + MaxSpareServers processus inactifs, le + processus parent arrtera les processus excdentaires.

    + +

    La modification de ce paramtre n'est ncessaire que + dans le cas de sites trs sollicits. Dfinir ce paramtre une + valeur trs grande est cependant dans la plupart des cas une + mauvaise ide. Si vous essayez d'affecter ce paramtre une valeur + gale ou infrieure la valeur de MinSpareServers, le serveur HTTP Apache + l'ajustera automatiquement la valeur de + MinSpareServers + 1.

    + +

    Voir aussi

    + +
    +
    top
    +

    Directive MinSpareServers

    + + + + + + + +
    Description:Nombre minimum de processus serveurs enfants +inactifs
    Syntaxe:MinSpareServers nombre
    Dfaut:MinSpareServers 5
    Contexte:configuration du serveur
    Statut:MPM
    Module:prefork
    +

    La directive MinSpareServers permet de + dfinir le nombre minimum dsir de processus serveurs enfants + inactifs. Un processus inactif est un processus qui ne + traite pas de requte. S'il y a moins de + MinSpareServers processus inactifs, le + processus parent va crer de nouveaux enfants de la manire suivante + : il en cre un, attend une seconde, il en cre deux, attend une + seconde, il en cre quatre, puis continue ainsi exponentiellement + jusu' ce que son taux de cration de processus enfants soit de 32 + par seconde. Il ne s'arrte que lorsque le nombre de processus + enfants correspond la dfinition de la directive + MinSpareServers.

    + +

    La modification de ce paramtre n'est ncessaire que + dans le cas de sites trs sollicits. Dfinir ce paramtre une + valeur trs grande est dans la plupart des cas une mauvaise + ide.

    + +

    Voir aussi

    + +
    +
    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/prefork.html.ja.utf8 b/docs/manual/mod/prefork.html.ja.utf8 index 076d9960a53..69d60809beb 100644 --- a/docs/manual/mod/prefork.html.ja.utf8 +++ b/docs/manual/mod/prefork.html.ja.utf8 @@ -1,34 +1,41 @@ - -prefork - Apache HTTP サーバ +prefork - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache MPM prefork

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -53,7 +60,10 @@ ということです。

    -

    ディレクティブ

    +

    トピック

    +

    ディレクティブ

    -

    トピック

    -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    動作方法

    @@ -181,11 +188,33 @@
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/prefork.html.tr.utf8 b/docs/manual/mod/prefork.html.tr.utf8 index 9d965b1baa0..e8f8a43b260 100644 --- a/docs/manual/mod/prefork.html.tr.utf8 +++ b/docs/manual/mod/prefork.html.tr.utf8 @@ -1,52 +1,62 @@ - -prefork - Apache HTTP Sunucusu +prefork - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache MPM prefork

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:スレッドを使わず、先行して fork を行なうウェブサーバを実装
    ステータス:MPM
    Açıklama:Evresiz ön çatallamalı HTTP sunucusu oluşturur
    Durum:MPM
    Modül Betimleyici:mpm_prefork_module
    Kaynak Dosyası:prefork.c

    Özet

    -

    Bu çok süreçlilik modülü (MPM) Apache 1.3’ün yaptığı gibi evresiz ve - çocuk süreçlerin önceden çatallandığı bir HTTP sunucusu oluşturur. - Evresiz kütüphanelerle uyumluluk için evrelemeden kaçınma ihtiyacında - olan siteler için uygundur. Ayrıca istekleri birbirlerinden yalıtmak - için en iyi MPM’dir, dolayısıyla herhangi bir istekle ilgili bir sorun - diğerlerini etkilemez.

    +

    Bu çok süreçlilik modülü (MPM) evresiz ve + çocuk süreçlerin önceden çatallandığı bir HTTP sunucusu oluşturur. Her + çocuk süreç gelen bir isteğe yanıt verirken ebeveyn süreç çocuk süreç + havuzunu yönetir. Evresiz kütüphanelerle uyumluluk için evrelemeden + kaçınma ihtiyacında olan siteler için uygundur. Ayrıca istekleri + birbirlerinden yalıtmak için en iyi MPM’dir, dolayısıyla herhangi bir + istekle ilgili bir sorun diğerlerini etkilemez.

    Bu MPM kendi kendine her duruma çok iyi uyum sağladığından yapılandırma yönergeleri ile yapılandırılmaya nadiren ihtiyaç gösterir. - Yönergelerin en önemlisi MaxClients olup, değeri aynı anda almayı umduğunuz istek - sayısını işleyebilecek kadar büyük, fiziksel belleğin tüm süreçlerin - ihtiyaçlarını karşılamasına yetecek kadar da küçük olması gerekir.

    + Yönergelerin en önemlisi MaxRequestWorkers olup, değeri aynı anda almayı umduğunuz + istek sayısını işleyebilecek kadar büyük, fiziksel belleğin tüm + süreçlerin ihtiyaçlarını karşılamasına yetecek kadar da küçük olması + gerekir.

    -
    top

    Nasıl çalışır?

    Bağlantıları dinleyip gerektiğinde onlara hizmet sunan çocuk süreçleri - devreye almak tek bir denetim sürecinin sorumluluğundadır. Apache + devreye almak tek bir denetim sürecinin sorumluluğundadır. Apache httpd daima, gelen isteklere hizmet vermeye hazır bekleyen en fazla sayıda sunucu sürecini yedekte tutmaya veya boşta bekletmeye çalışır. Bu suretle, istemcilere isteklerinin sunulması için yeni çocuk süreçlerin çatallanmasını beklemek gerekmez.

    Ana sürecin istekleri sunacak çocuk süreçleri oluşturma işlemini nasıl - gerçekleştireceği StartServers, MinSpareServers, MaxSpareServers ve MaxClients yönergeleri ile düzenlenir. Apache + gerçekleştireceği StartServers, MinSpareServers, MaxSpareServers ve MaxRequestWorkers yönergeleri ile düzenlenir. Apache httpd kendiliğinden her duruma çok iyi uyum sağladığından, genelde, çoğu sitenin bu yönergelerin öntanımlı değerlerini değiştirmesi gerekmez. - Aynı anda 256’dan fazla isteğe hizmet sunacak sitelerin MaxClients değerini arttırmaları + Aynı anda 256’dan fazla isteğe hizmet sunacak sitelerin MaxRequestWorkers değerini arttırmaları gerekebilir. Ancak, fiziksel belleği yeterli olmayan sitelerin de sunucunun belleği diske takaslamasını önlemek için bu değeri azaltmaları gerekebilir. Süreç oluşturmanın ayarlanması ile ilgili daha @@ -97,17 +104,23 @@ ayarlanması

    Unix altında 80. portu dinleyebilmek için ana sürecin root tarafından çalıştırılmış olması gerekirse de çocuk - süreçler Apache tarafından daha az yetkili bir kullanıcının aidiyetinde - çalıştırılırlar. Apache’nin çocuk süreçlerinin kullanıcı ve gruplarını - ayarlamak için User ve - Group yönergeleri - kullanılır. Çocuk süreçlerin sunacakları içeriği okumaya yetkili - olmaları gerekir, fakat bu yetkinin mümkün olduğunca kısıtlı + süreçler Apache httpd tarafından daha az yetkili bir kullanıcının + aidiyetinde çalıştırılırlar. Apache httpd’nin çocuk süreçlerinin + kullanıcı ve gruplarını ayarlamak için User ve Group + yönergeleri kullanılır. Çocuk süreçlerin sunacakları içeriği okumaya + yetkili olmaları gerekir, fakat bu yetkinin mümkün olduğunca kısıtlı tutulmasına çalışılmalıdır.

    -

    MaxRequestsPerChild +

    MaxConnectionsPerChild yönergesi ana sunucunun eski süreçleri öldürüp yenilerini oluşturmayı ne kadar sıklıkla yapacağını denetler.

    + +

    Bu MPM, gürleyen sürü sorunu ortaya çıktığında (genelde çok sayıda + dinlenen soket varlığında) gelen bağlantılara erişimi dizgileştirmek için + mpm-accept muteksini kullanır. Bu muteksin gerçeklenimle + ilgili hususları Mutex yönergesi ile + yapılandırılabilir. Bu muteks hakkında ek bilgi için başarımın arttırılması + belgesine bakınız.

    top

    MaxSpareServers Yönergesi

    @@ -128,13 +141,14 @@ ayarlanması

    Bu parametrenin ayarlanması sadece çok meşgul siteler için gerekli olabilir. Bu parametreye çok büyük bir değerin atanması oldukça kötü bir fikirdir. Eğer bu değeri MinSpareServers değerine eşit veya daha küçük bir değere - ayarlarsanız, Apache bu değeri kendiliğinden MinSpareServers + 1 olarak + ayarlarsanız, Apache HTTP Sunucusu bu değeri kendiliğinden MinSpareServers + 1 olarak değiştirecektir.

    Ayrıca bakınız:

    top
    @@ -151,8 +165,12 @@ ayarlanması çocuk sunucu süreçlerinin asgari sayısını belirler. Boştaki süreç, o an bir isteğe hizmet sunmayan süreçtir. Eğer MinSpareServers sayıda süreçten daha az boşta - süreç varsa ana süreç sayıyı tamamlamak için saniyede en fazla 1 süreç - olmak üzere yeni çocuk süreçler oluşturacaktır.

    + süreç varsa ana süreç sayıyı tamamlamak için yeni çocuk süreçler + oluşturacaktır: Bir tane oluşturur, 1 saniye bekler, sonra 2 tane + oluşturur, 1 saniye bekler, sonra 4 tane oluşturur ve saniyede 32 çocuk + süreç oluşturuluncaya kadar böyle üstel olarak artar. Artış + MinSpareServers ile belirlenen sayıda + duracaktır.

    Bu parametrenin ayarlanması sadece çok meşgul siteler için gerekli olabilir. Bu parametreye çok büyük bir değerin atanması oldukça kötü @@ -162,15 +180,38 @@ ayarlanması

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/prefork.xml.fr b/docs/manual/mod/prefork.xml.fr new file mode 100644 index 00000000000..5397a120b2c --- /dev/null +++ b/docs/manual/mod/prefork.xml.fr @@ -0,0 +1,204 @@ + + + + + + + + + + + +prefork +Implémente un serveur web avec démarrage anticipé de +processus, sans thread +MPM +prefork.c +mpm_prefork_module + + +

    Ce module multi-processus (MPM) implémente un serveur web avec + démarrage anticipé de processus. Chaque processus du serveur peut + répondre aux requêtes entrantes, et un processus parent contrôle la + taille du jeu de processus enfants. Il est particulièrement indiqué pour les + sites qui ne doivent pas utiliser les threads afin de maintenir une + compatibilité avec certaines bibliothèques non sûres du point de vue + des threads. C'est également le MPM le plus approprié si l'on veut + isoler les requêtes les unes des autres, de façon à ce qu'un + problème concernant une requête n'affecte pas les autres.

    + +

    Ce MPM s'auto-contrôle de manière efficace, de sorte qu'il est + rarement nécessaire d'ajuster ses directives de configuration. Le + plus important est la définition de la directive MaxRequestWorkers ; sa valeur doit être + assez grande pour pouvoir traiter autant de requêtes simultanées que + vous pensez recevoir, mais assez petite pour conserver suffisamment + de mémoire RAM pour tous les processus.

    +
    +Définition des adresses et ports +qu'utilise le serveur HTTP Apache + +
    Comment ça marche +

    Un processus de contrôle unique a pour tâche de lancer les + processus enfants qui attendent les connexions et les traitent au + fur et à mesure qu'elles arrivent. Apache httpd essaie toujours de + maintenir plusieurs processus serveurs inactifs ou en + réserve, afin de pouvoir traiter les requêtes entrantes. De + cette façon, les clients n'ont pas besoin d'attendre le démarrage + d'un nouveau processus enfant pour que leurs requêtes puissent être + traitées.

    + +

    Les directives StartServers, MinSpareServers, MaxSpareServers et MaxRequestWorkers permettent de contrôler + la manière dont le processus parent crée les processus enfants pour + traiter les requêtes. En général, Apache httpd s'auto-contrôle de manière + efficace, de sorte que la plupart des sites peuvent conserver les + valeurs par défaut des directives. Les sites qui doivent traiter + plus de 256 requêtes simultanées doivent augmenter la valeur de + MaxRequestWorkers, alors que les + sites dont la ressource mémoire est limitée doivent la diminuer afin + d'éviter une hyperactivité du serveur (utilisation excessive de la + mémoire virtuelle sur disque). Vous trouverez plus d'informations à + propos du contrôle de la création de processus dans le document conseils en matière de + performances

    + +

    Alors que le processus parent est en général démarré en tant que + root sous Unix afin de pouvoir se mettre à l'écoute sur le port 80, les + processus enfants sont lancés par Apache httpd sous un utilisateur avec + privilèges restreints. On peut contrôler les privilèges accordés aux + processus enfants d'Apache httpd à l'aide des directives User et Group. Les processus enfants doivent + être en mesure de lire tous les contenus destinés à être servis, + mais leurs privilèges doivent être aussi bas que possible.

    + +

    La directive MaxConnectionsPerChild permet de + contrôler la fréquence à laquelle le serveur recycle ses processus + en arrêtant les plus anciens et en en lançant de nouveaux.

    + +

    Ce module MPM utilise le mutex mpm-accept pour + sérialiser l'accès aux connexions entrantes lorsque peut se + présenter un problème d'afflux de requêtes (en général quand il y a + plusieurs sockets en écoute). Les aspects de l'implémentation de ce + mutex peuvent être configurés via la directive Mutex. Vous trouverez des informations + supplémentaires à propos de ce mutex dans la documentation à propos + des conseils en matière de + performances

    +
    + +CoreDumpDirectory + +EnableExceptionHook + +PidFile + +Listen + +ListenBacklog + +MaxRequestWorkers + +MaxMemFree + +MaxConnectionsPerChild + +ScoreBoardFile + +ReceiveBufferSize + +SendBufferSize + +ServerLimit + +StartServers + +User + +Group + + + +MaxSpareServers +Nombre maximum de processus serveurs enfants +inactifs +MaxSpareServers nombre +MaxSpareServers 10 +server config + + +

    La directive MaxSpareServers permet de + définir le nombre maximum souhaité de processus serveurs enfants + inactifs. Un processus inactif est un processus qui ne + traite pas de requête. S'il y a plus de + MaxSpareServers processus inactifs, le + processus parent arrêtera les processus excédentaires.

    + +

    La modification de ce paramètre n'est nécessaire que + dans le cas de sites très sollicités. Définir ce paramètre à une + valeur très grande est cependant dans la plupart des cas une + mauvaise idée. Si vous essayez d'affecter à ce paramètre une valeur + égale ou inférieure à la valeur de MinSpareServers, le serveur HTTP Apache + l'ajustera automatiquement à la valeur de + MinSpareServers + 1.

    +
    +MinSpareServers +StartServers +MaxSpareThreads +
    + + +MinSpareServers +Nombre minimum de processus serveurs enfants +inactifs +MinSpareServers nombre +MinSpareServers 5 +server config + + +

    La directive MinSpareServers permet de + définir le nombre minimum désiré de processus serveurs enfants + inactifs. Un processus inactif est un processus qui ne + traite pas de requête. S'il y a moins de + MinSpareServers processus inactifs, le + processus parent va créer de nouveaux enfants de la manière suivante + : il en crée un, attend une seconde, il en crée deux, attend une + seconde, il en crée quatre, puis continue ainsi exponentiellement + jusu'à ce que son taux de création de processus enfants soit de 32 + par seconde. Il ne s'arrête que lorsque le nombre de processus + enfants correspond à la définition de la directive + MinSpareServers.

    + +

    La modification de ce paramètre n'est nécessaire que + dans le cas de sites très sollicités. Définir ce paramètre à une + valeur très grande est dans la plupart des cas une mauvaise + idée.

    +
    +MaxSpareServers +StartServers +MinSpareThreads +
    + +
    + diff --git a/docs/manual/mod/prefork.xml.meta b/docs/manual/mod/prefork.xml.meta index 12e914b06ad..abaac63b165 100644 --- a/docs/manual/mod/prefork.xml.meta +++ b/docs/manual/mod/prefork.xml.meta @@ -9,7 +9,8 @@ de en + fr ja - tr + tr diff --git a/docs/manual/mod/prefork.xml.tr b/docs/manual/mod/prefork.xml.tr index 5fe3a0b895b..4f5728a2c1a 100644 --- a/docs/manual/mod/prefork.xml.tr +++ b/docs/manual/mod/prefork.xml.tr @@ -1,7 +1,7 @@ - + -Kurzreferenz der Direktiven - Apache HTTP Server +Kurzreferenz der Direktiven - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Kurzreferenz der Direktiven

    Verfgbare Sprachen:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    Diese bersetzung ist mglicherweise - nicht mehr aktuell. Bitte prfen Sie die englische Version auf - die neuesten nderungen.

    Die Kurzreferenz der Direktiven zeigt die Verwendung, Voreinstellung, den Status und den Kontext aller @@ -40,15 +43,15 @@

    Die erste Spalte enthlt den Namen und die Verwendung. Die zweite Spalte zeigt die Voreinstellung der Direktive, sofern eine Voreinstellung existiert. Wenn die Voreinstellung zu breit - fr die Anzeige ist, werden die ersten Buchstaben angegeben, - gefolgt von einem "+".

    + fr die Anzeige ist, wird sie abgeschnitten und mit einem + nachfolgenden "+" versehen.

    Die dritte und vierte Spalte geben den Kontext an, in dem die Direktive erlaubt ist, sowie den Status der Direktive entsprechend der Legende.

    - + - + - + - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -114,8 +117,8 @@ responses from the server - + @@ -130,7 +133,7 @@ werden d - + + + @@ -161,9 +169,6 @@ passwords for authentication response hashes in digest authentication - - @@ -186,13 +191,13 @@ lower level modules - + - + @@ -203,9 +208,9 @@ authorization groups. - - @@ -228,12 +233,18 @@ authentication - + + + @@ -253,7 +264,9 @@ alias authentication succeeds but authorization fails - + + + @@ -268,7 +281,7 @@ respect to case - @@ -301,40 +314,57 @@ cached by proxy servers before data is sent downstream + + + + + + - + - - - - - + + + + + + - - + - - - - - - + + + + + - - - - - - + + + + + - + + @@ -348,12 +378,17 @@ configured - + - - - - + + + + + + + ... </Directory> - + - - - - + - - - - + + + - - - - - - + - - - + + - - - - + - - - - + + + - - - - - - - + + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + @@ -497,7 +564,7 @@ auf nachfolgende Anfragen wartet the specified maximum size, for potential use by filters such as mod_include. @@ -509,7 +576,9 @@ operations - + + + @@ -541,39 +610,52 @@ Request-Bodys - - + + - - - + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + @@ -592,10 +674,12 @@ simultaneously Servers + + - @@ -604,7 +688,7 @@ using the specified magic file - + ... - + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - + - - - - - - + - - - - - + + + + - - - - - - - - - - + - - + - - + - - + - - - - - - + - - - - - - - - + + + + + + + + @@ -839,7 +937,7 @@ Dokumenten - + - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -920,7 +1023,7 @@ proxy handshake - + @@ -936,6 +1039,10 @@ HTTP request Cache + + + + @@ -957,6 +1064,8 @@ Certificate verification werden + + - + + + IP-Adressen angewendet werden - - + - - + - +
    sServerkonfiguration
    vVirtual Host
    dVerzeichnis
    AddType media-type extension [extension] ...svdhB
    Maps the given filename extensions onto the specified content type
    Alias URL-path -file-path|directory-pathsvB
    Maps URLs to filesystem locations
    Alias [URL-path] +file-path|directory-pathsvdB
    Maps URLs to filesystem locations
    AliasMatch regex file-path|directory-pathsvB
    Maps URLs to filesystem locations using regular expressions
    AllowMethods reset|HTTP-method [HTTP-method]... reset dX
    Restrict access to the listed HTTP methods
    AllowOverride All|None|Direktiven-Typ -[Direktiven-Typ] ... All dC
    Direktiven-Typen, die in .htaccess-Dateien +[Direktiven-Typ] ... None (2.3.9 und sp +dC
    Direktiven-Typen, die in .htaccess-Dateien erlaubt sind.
    AllowOverrideList None|directive [directive-type] ... None dC
    Individual directives that are allowed in @@ -146,8 +149,13 @@ formatted email address
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    Sets whether authorization and authentication are passed to lower level modules
    AuthBasicProvider provider-name -[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    Sets the name of a text file containing the list of user groups for authorization
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    Sets the name of a text file containing the list of users and passwords for authentication
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables conditional on HTTP User-Agent
    CacheDirLevels levels 2 svE
    The number of levels of subdirectories in the cache.
    CacheDisable url-string | onsvdhE
    Disable caching of specified URLs
    CacheEnable cache_type [url-string]svdhE
    Enable caching of specified URLs using a specified storage +
    CacheEnable cache_type [url-string]svdE
    Enable caching of specified URLs using a specified storage manager
    CacheFile file-path [file-path] ...sX
    Cache a list of file handles at startup time
    CacheHeader on|off off svdhE
    Add an X-Cache header to the response.
    CacheRoot directorysvE
    The directory root under which cache files are stored
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on svdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off svdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off svdhE
    Attempt to cache requests or responses that have been marked as no-store.
    CacheStorePrivate On|Off Off svdhE
    Attempt to cache responses that the server has marked as private
    CGIMapExtension CGI-Pfad .EndungdhC
    Technik zur Bestimmung des Interpreters fr +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension CGI-Pfad .EndungdhC
    Technik zur Bestimmung des Interpreters fr CGI-Skripte
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling +
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling module
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Aktiviert die Generierung von Content-MD5 +
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Aktiviert die Generierung von Content-MD5 HTTP-Response-Headern
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory VerzeichnissM
    Verzeichnis, in das der Apache zu wechseln versucht, bevor er +
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory VerzeichnissM
    Verzeichnis, in das der Apache zu wechseln versucht, bevor er einen Hauptspeicherauszug erstellt
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname [env=[!]environment-variable| -expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on +expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on a DAV resource
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage language-tagsvdhB
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType MIME-Type text/plain svdhC
    MIME-Content-Type, der gesendet wird, wenn der Server den Typ +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType MIME-Type text/plain svdhC
    MIME-Content-Type, der gesendet wird, wenn der Server den Typ nicht auf andere Weise ermitteln kann.
    Define ParameternamesC
    Define the existence of a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    Define ParameternamesC
    Define the existence of a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    How much memory should be used by zlib for compression
    DeflateWindowSize value 15 svE
    Zlib compression window size
    Deny from all|host|env=[!]env-variable @@ -363,110 +398,142 @@ server
    svC
    Umschliet eine Gruppe von Direktiven, die nur auf das genannte Verzeichnis des Dateisystems und Unterverzeichnisse angewendet werden
    DirectoryIndex - disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests a directory
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    Umschliet eine Gruppe von Direktiven, die auf +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Umschliet eine Gruppe von Direktiven, die auf Verzeichnisse des Dateisystems und ihre Unterverzeichnisse abgebildet werden, welche auf einen regulren Ausdruck passen
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot Verzeichnis /usr/local/apache/h +svC
    Verzeichnis, welches den Haupt-Dokumentenbaum bildet, der im +
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot Verzeichnis /usr/local/apache/h +svC
    Verzeichnis, welches den Haupt-Dokumentenbaum bildet, der im Web sichtbar ist.
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    Aktiviert einen Hook, der nach einem Absturz noch +
    EnableExceptionHook On|Off Off sM
    Aktiviert einen Hook, der nach einem Absturz noch Ausnahmefehler behandeln lassen kann
    EnableMMAP On|Off On svdhC
    Verwende Memory-Mapping, um Dateien whrend der +
    EnableMMAP On|Off On svdhC
    Verwende Memory-Mapping, um Dateien whrend der Auslieferung zu lesen
    EnableSendfile On|Off On svdhC
    Verwende die sendfile-Untersttzung des Kernels, um +
    EnableSendfile On|Off On svdhC
    Verwende die sendfile-Untersttzung des Kernels, um Dateien an den Client auszuliefern
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument Fehlercode DokumentsvdhC
    Das, was der Server im Fehlerfall an den Client +
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument Fehlercode DokumentsvdhC
    Das, was der Server im Fehlerfall an den Client zurckgibt
    ErrorLog Dateiname|syslog[:facility] logs/error_log (Uni +svC
    Ablageort, an dem der Server Fehler protokolliert
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module +
    ErrorLog Dateiname|syslog[:facility] logs/error_log (Uni +svC
    Ablageort, an dem der Server Fehler protokolliert
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires +
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires headers
    ExpiresByType MIME-type -<code>secondssvdhE
    Value of the Expires header configured +
    ExpiresByType MIME-type +<code>secondssvdhE
    Value of the Expires header configured by MIME type
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag Komponente ... INode MTime Size svdhC
    Dateiattribute, die zur Erstellung des HTTP-Response-Headers +
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource disabled | local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag Komponente ... INode MTime Size svdhC
    Dateiattribute, die zur Erstellung des HTTP-Response-Headers ETag verwendet werden
    <Files Dateiname> ... </Files>svdhC
    Enthlt Direktiven, die sich nur auf passende Dateinamen +
    <Files Dateiname> ... </Files>svdhC
    Enthlt Direktiven, die sich nur auf passende Dateinamen beziehen
    <FilesMatch regex> ... </FilesMatch>svdhC
    Enthlt Direktiven, die fr Dateinamen gelten, die +
    <FilesMatch regex> ... </FilesMatch>svdhC
    Enthlt Direktiven, die fr Dateinamen gelten, die auf einen regulren Ausdruck passen
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not found
    ForceType MIME-Type|NonedhC
    Erzwingt die Auslieferung aller passendenden Dateien mit dem +
    ForceType MIME-Type|NonedhC
    Erzwingt die Auslieferung aller passendenden Dateien mit dem angegebenen MIME-Content-Type
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    Specify a timeout after which a gracefully shutdown server +
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutdownTimeout seconds 0 sM
    Specify a timeout after which a gracefully shutdown server will exit.
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top +
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top of the index listing
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    Aktiviert DNS-Lookups auf Client-IP-Adressen
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote user
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is +
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime
    <IfDefine [!]Parametername> ... - </IfDefine>svdhC
    Schliet Direktiven ein, die nur ausgefhrt werden, +
    <IfDefine [!]Parametername> ... + </IfDefine>svdhC
    Schliet Direktiven ein, die nur ausgefhrt werden, wenn eine Testbedingung beim Start wahr ist
    <IfModule [!]Modulname|Modulbezeichner> - ... </IfModule>svdhC
    Schliet Direktiven ein, die abhngig vom +
    <IfModule [!]Modulname|Modulbezeichner> + ... </IfModule>svdhC
    Schliet Direktiven ein, die abhngig vom Vorhandensein oder Fehlen eines speziellen Moduls ausgefhrt werden
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action if no coordinates are given when calling an imagemap
    Include Dateiname|VerzeichnissvdC
    Fgt andere Konfigurationsdateien innerhalb der +
    Include Dateiname|VerzeichnissvdC
    Fgt andere Konfigurationsdateien innerhalb der Server-Konfigurationsdatei ein
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IndexHeadInsert "markup ..."svdhB
    Inserts text in the HEAD section of an index page.
    IndexIgnore file [file] ... "." svdhB
    Adds to the list of files to hide when listing a directory
    LanguagePriority MIME-lang [MIME-lang] -...svdhB
    The precendence of language variants for cases where +...svdhB
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    Listen [IP-Addresse:]PortsM
    IP-Adressen und Ports, an denen der Server lauscht
    ListenBacklog backlogsM
    Maximale Lnge der Warteschlange schwebender Verbindungen
    LoadFile filename [filename] ...sE
    Link in the named object file or library
    LoadModule module filenamesE
    Links in the object file or library, and adds to the list +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...svE
    Link in the named object file or library
    LoadModule module filenamesvE
    Links in the object file or library, and adds to the list of active modules
    <Location - URL-Pfad|URL> ... </Location>svC
    Wendet die enthaltenen Direktiven nur auf die entsprechenden +
    <Location + URL-Pfad|URL> ... </Location>svC
    Wendet die enthaltenen Direktiven nur auf die entsprechenden URLs an
    <LocationMatch - regex> ... </LocationMatch>svC
    Wendet die enthaltenen Direktiven nur auf URLs an, die auf +
    <LocationMatch + regex> ... </LocationMatch>svC
    Wendet die enthaltenen Direktiven nur auf URLs an, die auf regulre Ausdrcke passen
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel Level warn svC
    Steuert die Ausfhrlichkeit des Fehlerprotokolls
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests Anzahl 100 svC
    Anzahl der Anfragen, die bei einer persistenten Verbindung zulssig sind
    MaxSpareThreads AnzahlsM
    Maximale Anzahl unbeschftigter Threads
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off svdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathsvE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads AnzahlsM
    Minimale Anzahl unbeschftigter Threads, die zur Bedienung von Anfragespitzen zur Verfgung stehen
    MMapFile file-path [file-path] ...sX
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dB
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -629,10 +713,12 @@ evaluated.
    svdhB
    Passes environment variables from the shell
    PidFile Dateiname logs/httpd.pid sM
    Datei, in welcher der Server die Prozess-ID des Daemons ablegt
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|Off Off svX
    Turn the echo server on or off
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Determines how to handle bad header lines in a @@ -648,20 +734,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>svE
    Container for directives applied to regular-expression-matched @@ -669,41 +760,44 @@ proxied resources
    ProxyMaxForwards number -1 svE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    Name of the file that will be inserted at the end of the index listing
    ReceiveBufferSize bytes 0 sM
    TCP receive buffer size
    Redirect [status] URL-path +
    Redirect [status] [URL-path] URLsvdhB
    Sends an external redirect asking the client to fetch a different URL
    RedirectMatch [status] regex @@ -714,117 +808,121 @@ a different URL
    RedirectTemp URL-path URLsvdhB
    Sends an external temporary redirect asking the client to fetch a different URL
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdhB
    Removes any character set associations for a set of file +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdhB
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...vdhB
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...vdhB
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...vdhB
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...vdhB
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...vdhB
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...vdhB
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...vdhB
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...vdhB
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...vdhB
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...vdhB
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...vdhB
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...vdhB
    Removes any content type associations for a set of file extensions
    RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]svdhE
    Configure HTTP request headers
    RequestReadTimeout +
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP request headers
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU Sekunden|max [Sekunden|max]svdhC
    Begrenzt den CPU-Verbrauch von Prozessen, die von +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU Sekunden|max [Sekunden|max]svdhC
    Begrenzt den CPU-Verbrauch von Prozessen, die von Apache-Kindprozessen gestartet wurden
    RLimitMEM Bytes|max [Bytes|max]svdhC
    Begrenzt den Speicherverbrauch von Prozessen, die von +
    RLimitMEM Bytes|max [Bytes|max]svdhC
    Begrenzt den Speicherverbrauch von Prozessen, die von Apache-Kindprozessen gestartet wurden
    RLimitNPROC Zahl|max [Zahl|max]svdhC
    Begrenzt die Anzahl der Prozesse, die von Prozessen gestartet +
    RLimitNPROC Zahl|max [Zahl|max]svdhC
    Begrenzt die Anzahl der Prozesse, die von Prozessen gestartet werden knnen, der ihrerseits von Apache-Kinprozessen gestartet wurden
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile Dateipfad logs/apache_status sM
    Ablageort der Datei, die zur Speicherung von Daten zur +
    ScoreBoardFile Dateipfad logs/apache_status sM
    Ablageort der Datei, die zur Speicherung von Daten zur Koordinierung der Kindprozesse verwendet wird
    Script Methode CGI-SkriptsvdB
    Aktiviert ein CGI-Skript fr eine bestimmte +
    Script Methode CGI-SkriptsvdB
    Aktiviert ein CGI-Skript fr eine bestimmte Anfragemethode.
    ScriptAlias URL-path -file-path|directory-pathsvB
    Maps a URL to a filesystem location and designates the +
    ScriptAlias [URL-path] +file-path|directory-pathsvdB
    Maps a URL to a filesystem location and designates the target as a CGI script
    ScriptAliasMatch regex -file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression and designates the target as a CGI script
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Methode zur Ermittlung des Interpreters von +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Methode zur Ermittlung des Interpreters von CGI-Skripten
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded +
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded in the scriptlog
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path logs/cgisock sB
    The filename prefix of the socket to use for communication with +
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path cgisock sB
    The filename prefix of the socket to use for communication with the cgi daemon
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize Bytes 0 sM
    Gre des TCP-Puffers
    ServerAdmin E-Mail-Adresse|URLsvC
    E-Mail-Adresse, die der Server in Fehlermeldungen einfgt, +
    SendBufferSize Bytes 0 sM
    Gre des TCP-Puffers
    ServerAdmin E-Mail-Adresse|URLsvC
    E-Mail-Adresse, die der Server in Fehlermeldungen einfgt, welche an den Client gesendet werden
    ServerAlias Hostname [Hostname] ...vC
    Alternativer Name fr einen Host, der verwendet wird, wenn +
    ServerAlias Hostname [Hostname] ...vC
    Alternativer Name fr einen Host, der verwendet wird, wenn Anfragen einem namensbasierten virtuellen Host zugeordnet werden
    ServerLimit AnzahlsM
    Obergrenze fr die konfigurierbare Anzahl von +
    ServerLimit AnzahlsM
    Obergrenze fr die konfigurierbare Anzahl von Prozessen
    ServerName -voll-qualifizierter-Domainname[:port]svC
    Rechnername und Port, die der Server dazu verwendet, sich +
    ServerName +voll-qualifizierter-Domainname[:port]svC
    Rechnername und Port, die der Server dazu verwendet, sich selbst zu identifizieren
    ServerPath URL-PfadvC
    Veralteter URL-Pfad fr einen namensbasierten +
    ServerPath URL-PfadvC
    Veralteter URL-Pfad fr einen namensbasierten virtuellen Host, auf den von einem inkompatiblen Browser zugegriffen wird
    ServerRoot Verzeichnis /usr/local/apache sC
    Basisverzeichnis der Serverinstallation
    ServerSignature On|Off|EMail Off svdhC
    Konfiguriert die Fuzeile von servergenerierten +
    ServerRoot Verzeichnis /usr/local/apache sC
    Basisverzeichnis der Serverinstallation
    ServerSignature On|Off|EMail Off svdhC
    Konfiguriert die Fuzeile von servergenerierten Dokumenten
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Konfiguriert den HTTP-Response-Header +
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Konfiguriert den HTTP-Response-Header Server
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SessionHeader headersvdhE
    Import session updates from a given HTTP response header
    SessionInclude pathsvdhE
    Define URL prefixes for which a session is valid
    SessionMaxAge maxage 0 svdhE
    Define a maximum age in seconds for a session
    SetEnv env-variable valuesvdhB
    Sets environment variables
    SetEnv env-variable [value]svdhB
    Sets environment variables
    SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables based on attributes of the request @@ -856,63 +954,68 @@ einen Handler
    SetInputFilter Filter[;Filter...]svdhC
    Bestimmt die Filter, die Client-Anfragen und POST-Eingaben verarbeiten
    SetOutputFilter Filter[;Filter...]svdhC
    Bestimmt die Filter, die Antworten des Servers verarbeiten
    SSIAccessEnable on|off off dhB
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI error
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartThreads AnzahlsM
    Anzahl der Threads, die beim Start erstellt werden
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    User and group for CGI programs to run as
    ThreadLimit AnzahlsM
    Bestimmt die Obergrenze der konfigurierbaren Anzahl von Threads @@ -971,8 +1080,11 @@ bevor er die Anfrage abbricht
    TransferLog file|pipesvB
    Specify location of a log file
    TypesConfig file-path conf/mime.types sB
    The location of the mime.types file
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    Removes variables from the environment
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    Removes variables from the environment
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|DNS Off svdC
    Bestimmt, wie der Server seinen eigenen Namen und Port ermittelt
    UseCanonicalPhysicalPort On|Off Off svdC
    Bestimmt, wie der Server seinen eigenen Namen und Port @@ -1000,24 +1112,47 @@ for a given virtual host
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.

    Verfgbare Sprachen:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.en b/docs/manual/mod/quickreference.html.en index e08f9c25fae..3d4829b6154 100644 --- a/docs/manual/mod/quickreference.html.en +++ b/docs/manual/mod/quickreference.html.en @@ -1,28 +1,34 @@ - -Directive Quick Reference - Apache HTTP Server +Directive Quick Reference - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Directive Quick Reference

    Available Languages:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -43,7 +49,7 @@ tables below.

    - + - + - + - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -107,8 +113,8 @@ responses from the server - + @@ -139,8 +145,13 @@ formatted email address - + + + @@ -154,9 +165,6 @@ passwords for authentication response hashes in digest authentication - - @@ -179,13 +187,13 @@ lower level modules - + - + @@ -196,9 +204,9 @@ authorization groups. - - @@ -221,12 +229,18 @@ authentication - + + + @@ -246,7 +260,9 @@ alias authentication succeeds but authorization fails - + + + @@ -261,7 +277,7 @@ respect to case - @@ -294,40 +310,57 @@ cached by proxy servers before data is sent downstream + + + + + + - + - - - - - + + + + + + - - + - - - - - - + + + + + - - - - - - + + + + + - + + @@ -341,15 +374,20 @@ configured - + - - - - + + + + + + + - + - - - - + - - - - + + + - - - - - - + + + - - - + + - - - - + - - - - + + + - - - - - - - + + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + the specified maximum size, for potential use by filters such as mod_include. @@ -500,7 +570,9 @@ operations - + + + @@ -531,45 +603,58 @@ from the client - - + + - - - + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + - @@ -582,10 +667,12 @@ simultaneously + + - @@ -593,7 +680,7 @@ using the specified magic file - + ... - + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - + - - - - - - + - - - - - + + + + - - - - - - - - - - + - - + - - + - - + - - - + - - - - + + - - - - - - - + + + + + + + + @@ -823,7 +924,7 @@ header - + [!]env-variable[=value] [[!]env-variable[=value]] ... - - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -905,7 +1011,7 @@ proxy handshake - + @@ -921,6 +1027,10 @@ HTTP request Cache + + + + @@ -941,6 +1051,8 @@ Certificate verification + + - + + + @@ -982,24 +1097,47 @@ for a given virtual host hostname or IP address - - + - - + - +
    sserver config
    vvirtual host
    ddirectory
    AddType media-type extension [extension] ...svdhB
    Maps the given filename extensions onto the specified content type
    Alias URL-path -file-path|directory-pathsvB
    Maps URLs to filesystem locations
    Alias [URL-path] +file-path|directory-pathsvdB
    Maps URLs to filesystem locations
    AliasMatch regex file-path|directory-pathsvB
    Maps URLs to filesystem locations using regular expressions
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    Sets whether authorization and authentication are passed to lower level modules
    AuthBasicProvider provider-name -[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    Sets the name of a text file containing the list of user groups for authorization
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    Sets the name of a text file containing the list of users and passwords for authentication
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables conditional on HTTP User-Agent
    CacheDirLevels levels 2 svE
    The number of levels of subdirectories in the cache.
    CacheDisable url-string | onsvdhE
    Disable caching of specified URLs
    CacheEnable cache_type [url-string]svdhE
    Enable caching of specified URLs using a specified storage +
    CacheEnable cache_type [url-string]svdE
    Enable caching of specified URLs using a specified storage manager
    CacheFile file-path [file-path] ...sX
    Cache a list of file handles at startup time
    CacheHeader on|off off svdhE
    Add an X-Cache header to the response.
    CacheRoot directorysvE
    The directory root under which cache files are stored
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on svdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off svdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off svdhE
    Attempt to cache requests or responses that have been marked as no-store.
    CacheStorePrivate On|Off Off svdhE
    Attempt to cache responses that the server has marked as private
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI scripts
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling +
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling module
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response +
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response headers
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to +
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to switch before dumping core
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname [env=[!]environment-variable| -expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on +expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on a DAV resource
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage language-tagsvdhB
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings if the value is not none. In prior versions, DefaultType would specify a default media type to assign to response content for which no other media type configuration could be found.
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    How much memory should be used by zlib for compression
    DeflateWindowSize value 15 svE
    Zlib compression window size
    Deny from all|host|env=[!]env-variable @@ -358,105 +396,137 @@ server
    <Directory directory-path> ... </Directory>svC
    Enclose a group of directives that apply only to the named file-system directory, sub-directories, and their contents.
    DirectoryIndex - disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests a directory
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    Enclose directives that apply to +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Enclose directives that apply to the contents of file-system directories matching a regular expression.
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path /usr/local/apache/h +svC
    Directory that forms the main document tree visible +
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path "/usr/local/apache/ +svC
    Directory that forms the main document tree visible from the web
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers +
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers after a crash
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client +
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client in case of an error
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module +
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires +
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires headers
    ExpiresByType MIME-type -<code>secondssvdhE
    Value of the Expires header configured +
    ExpiresByType MIME-type +<code>secondssvdhE
    Value of the Expires header configured by MIME type
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag +
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource disabled | local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag HTTP response header for static files
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched +
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched filenames
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched +
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched filenames
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not found
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified +
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified media type in the HTTP Content-Type header field
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    Specify a timeout after which a gracefully shutdown server +
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutdownTimeout seconds 0 sM
    Specify a timeout after which a gracefully shutdown server will exit.
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top +
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top of the index listing
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    Enables DNS lookups on client IP addresses
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote user
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is +
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime
    <IfDefine [!]parameter-name> ... - </IfDefine>svdhC
    Encloses directives that will be processed only +
    <IfDefine [!]parameter-name> ... + </IfDefine>svdhC
    Encloses directives that will be processed only if a test is true at startup
    <IfModule [!]module-file|module-identifier> ... - </IfModule>svdhC
    Encloses directives that are processed conditional on the +
    <IfModule [!]module-file|module-identifier> ... + </IfModule>svdhC
    Encloses directives that are processed conditional on the presence or absence of a specific module
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action if no coordinates are given when calling an imagemap
    Include [optional|strict] file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +
    Include file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within the server configuration files
    IndexHeadInsert "markup ..."svdhB
    Inserts text in the HEAD section of an index page.
    IndexIgnore file [file] ... "." svdhB
    Adds to the list of files to hide when listing @@ -488,7 +558,7 @@ requests on a persistent connection
    LanguagePriority MIME-lang [MIME-lang] -...svdhB
    The precendence of language variants for cases where +...svdhB
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    Listen [IP-address:]portnumber [protocol]sM
    IP addresses and ports that the server listens to
    ListenBacklog backlogsM
    Maximum length of the queue of pending connections
    LoadFile filename [filename] ...sE
    Link in the named object file or library
    LoadModule module filenamesE
    Links in the object file or library, and adds to the list +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...svE
    Link in the named object file or library
    LoadModule module filenamesvE
    Links in the object file or library, and adds to the list of active modules
    <Location - URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching +
    <Location + URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching URLs
    <LocationMatch - regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression +
    <LocationMatch + regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression matching URLs
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel [module:]level [module:level] ... warn svdC
    Controls the verbosity of the ErrorLog
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests number 100 svC
    Number of requests allowed on a persistent connection
    MaxMemFree KBytes 0 sM
    Maximum amount of memory that the main allocator is allowed +
    MaxMemFree KBytes 2048 sM
    Maximum amount of memory that the main allocator is allowed to hold without calling free()
    MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdC
    Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource
    MaxSpareServers number 10 sM
    Maximum number of idle child server processes
    MaxSpareThreads numbersM
    Maximum number of idle threads
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off svdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathsvE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads numbersM
    Minimum number of idle threads available to handle request spikes
    MMapFile file-path [file-path] ...sX
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dB
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -618,10 +705,12 @@ evaluated.
    svdhB
    Passes environment variables from the shell
    PidFile filename logs/httpd.pid sM
    File where the server records the process ID of the daemon
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|Off Off svX
    Turn the echo server on or off
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Determines how to handle bad header lines in a @@ -637,20 +726,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>svE
    Container for directives applied to regular-expression-matched @@ -658,41 +752,44 @@ proxied resources
    ProxyMaxForwards number -1 svE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    Name of the file that will be inserted at the end of the index listing
    ReceiveBufferSize bytes 0 sM
    TCP receive buffer size
    Redirect [status] URL-path +
    Redirect [status] [URL-path] URLsvdhB
    Sends an external redirect asking the client to fetch a different URL
    RedirectMatch [status] regex @@ -703,112 +800,116 @@ a different URL
    RedirectTemp URL-path URLsvdhB
    Sends an external temporary redirect asking the client to fetch a different URL
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdhB
    Removes any character set associations for a set of file +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdhB
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...vdhB
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...vdhB
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...vdhB
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...vdhB
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...vdhB
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...vdhB
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...vdhB
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...vdhB
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...vdhB
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...vdhB
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...vdhB
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...vdhB
    Removes any content type associations for a set of file extensions
    RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]svdhE
    Configure HTTP request headers
    RequestReadTimeout +
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP request headers
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched by Apache httpd children
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched +
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched by Apache httpd children
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by +
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by processes launched by Apache httpd children
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile file-path logs/apache_status sM
    Location of the file used to store coordination data for +
    ScoreBoardFile file-path logs/apache_runtime +sM
    Location of the file used to store coordination data for the child processes
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request +
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request method.
    ScriptAlias URL-path -file-path|directory-pathsvB
    Maps a URL to a filesystem location and designates the +
    ScriptAlias [URL-path] +file-path|directory-pathsvdB
    Maps a URL to a filesystem location and designates the target as a CGI script
    ScriptAliasMatch regex -file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression and designates the target as a CGI script
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI scripts
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded +
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded in the scriptlog
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path logs/cgisock sB
    The filename prefix of the socket to use for communication with +
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path cgisock sB
    The filename prefix of the socket to use for communication with the cgi daemon
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error +
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error messages sent to the client
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests +
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests to name-virtual hosts
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    Hostname and port that the server uses to identify +
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]domain-name|ip-address[:port]svC
    Hostname and port that the server uses to identify itself
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that +
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that is accessed by an incompatible browser
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response +
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response header
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SessionHeader headersvdhE
    Import session updates from a given HTTP response header
    SessionInclude pathsvdhE
    Define URL prefixes for which a session is valid
    SessionMaxAge maxage 0 svdhE
    Define a maximum age in seconds for a session
    SetEnv env-variable valuesvdhB
    Sets environment variables
    SetEnv env-variable [value]svdhB
    Sets environment variables
    SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables based on attributes of the request @@ -835,69 +936,74 @@ header
    svdhB
    Sets environment variables based on attributes of the request without respect to case
    SetHandler handler-name|NonesvdhC
    Forces all matching files to be processed by a +
    SetHandler handler-name|none|expressionsvdhC
    Forces all matching files to be processed by a handler
    SetInputFilter filter[;filter...]svdhC
    Sets the filters that will process client requests and POST input
    SetOutputFilter filter[;filter...]svdhC
    Sets the filters that will process responses from the server
    SSIAccessEnable on|off off dhB
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI error
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartServers numbersM
    Number of child server processes created at startup
    StartThreads numbersM
    Number of threads created on startup
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    User and group for CGI programs to run as
    ThreadLimit numbersM
    Sets the upper limit on the configurable number of threads @@ -954,8 +1066,11 @@ certain events before failing a request
    TransferLog file|pipesvB
    Specify location of a log file
    TypesConfig file-path conf/mime.types sB
    The location of the mime.types file
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    Removes variables from the environment
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    Removes variables from the environment
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|DNS Off svdC
    Configures how the server determines its own name and port
    UseCanonicalPhysicalPort On|Off Off svdC
    Configures how the server determines its own port
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.

    Available Languages:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.es b/docs/manual/mod/quickreference.html.es index 67fa0e5310a..4182170d058 100644 --- a/docs/manual/mod/quickreference.html.es +++ b/docs/manual/mod/quickreference.html.es @@ -1,37 +1,39 @@ - -Gua Rpida de Referencia de Directivas - Servidor HTTP Apache +Gua Rpida de Referencia de Directivas - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-
    +Apache > Servidor HTTP > Documentacin > Versin 2.4 > Mdulos

    Gua Rpida de Referencia de Directivas

    Idiomas disponibles:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    Esta traduccin podra estar - obsoleta. Consulte la versin en ingls de la - documentacin para comprobar si se han producido cambios - recientemente.

    La Gua Rpida de Referencia de Directivas muestra el uso, las opciones por defecto, el estado y el contexto de cada directiva de @@ -42,7 +44,7 @@

    La primera columna muestra el nombre y el uso de la directiva. La segunda columna muestra el valor por defecto de la directiva, si existe ese valor por defecto. Si el valor por defecto es - demasiado largo para mostrarlo, el primer caracter va seguido de + demasiado largo para mostrarlo, el primer carcter va seguido de un signo "+".

    La tercera y la cuarta columna listan los contextos en los que @@ -50,10 +52,10 @@ acuerdo con las notas que detallan ms abajo.

    - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  - +
    sserver config
    vvirtual host
    ddirectory
    ddirectorio
    h.htaccess
    @@ -61,7 +63,7 @@ - +
    CCore
    BBase
    EExtensin
    XExperimental
    TExternal
    TExterno
    @@ -114,8 +116,8 @@ responses from the server - + @@ -146,8 +148,13 @@ formatted email address - + + + @@ -161,9 +168,6 @@ passwords for authentication response hashes in digest authentication - - @@ -186,13 +190,13 @@ lower level modules - + - + @@ -203,9 +207,9 @@ authorization groups. - - @@ -228,12 +232,18 @@ authentication - + + + @@ -253,7 +263,9 @@ alias authentication succeeds but authorization fails - + + + @@ -268,7 +280,7 @@ respect to case - @@ -301,40 +313,57 @@ cached by proxy servers before data is sent downstream + + + + + + - + - - - - - + + + + + + - - + - - - - - - + + + + + - - - - - - + + + + + - + + @@ -348,15 +377,20 @@ configured - + - - - - + + + + + + + - + - - - - + - - - - + + + - - - - - - + + + - - - + + - - - - + - - - - + + + - - - - - - - + + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + the specified maximum size, for potential use by filters such as mod_include. @@ -507,7 +573,9 @@ operations - + + + @@ -538,45 +606,58 @@ from the client - - + + - - - + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + - @@ -589,10 +670,12 @@ simultaneously + + - @@ -600,7 +683,7 @@ using the specified magic file - + ... - + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - + - - - - - - + - - - - - + + + + - - - - - - - - - - + - - + - - + - - + - - - + - - - - + + - - - - - - - + + + + + + + + @@ -830,7 +927,7 @@ header - + input - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -912,7 +1014,7 @@ proxy handshake - + @@ -928,6 +1030,10 @@ HTTP request Cache + + + + @@ -948,6 +1054,8 @@ Certificate verification + + - + + + hostname or IP address - - + - - + - +
    AddType media-type extension [extension] ...svdhB
    Maps the given filename extensions onto the specified content type
    Alias URL-path -file-path|directory-pathsvB
    Maps URLs to filesystem locations
    Alias [URL-path] +file-path|directory-pathsvdB
    Maps URLs to filesystem locations
    AliasMatch regex file-path|directory-pathsvB
    Maps URLs to filesystem locations using regular expressions
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    Sets whether authorization and authentication are passed to lower level modules
    AuthBasicProvider provider-name -[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    Sets the name of a text file containing the list of user groups for authorization
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    Sets the name of a text file containing the list of users and passwords for authentication
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables conditional on HTTP User-Agent
    CacheDirLevels levels 2 svE
    The number of levels of subdirectories in the cache.
    CacheDisable url-string | onsvdhE
    Disable caching of specified URLs
    CacheEnable cache_type [url-string]svdhE
    Enable caching of specified URLs using a specified storage +
    CacheEnable cache_type [url-string]svdE
    Enable caching of specified URLs using a specified storage manager
    CacheFile file-path [file-path] ...sX
    Cache a list of file handles at startup time
    CacheHeader on|off off svdhE
    Add an X-Cache header to the response.
    CacheRoot directorysvE
    The directory root under which cache files are stored
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on svdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off svdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off svdhE
    Attempt to cache requests or responses that have been marked as no-store.
    CacheStorePrivate On|Off Off svdhE
    Attempt to cache responses that the server has marked as private
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI scripts
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling +
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling module
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response +
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response headers
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to +
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to switch before dumping core
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname [env=[!]environment-variable| -expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on +expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on a DAV resource
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage language-tagsvdhB
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings if the value is not none. In prior versions, DefaultType would specify a default media type to assign to response content for which no other media type configuration could be found.
    Define parameter-namesC
    Define the existence of a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    Define parameter-namesC
    Define the existence of a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    How much memory should be used by zlib for compression
    DeflateWindowSize value 15 svE
    Zlib compression window size
    Deny from all|host|env=[!]env-variable @@ -365,105 +399,137 @@ server
    <Directory directory-path> ... </Directory>svC
    Enclose a group of directives that apply only to the named file-system directory, sub-directories, and their contents.
    DirectoryIndex - disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests a directory
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    Enclose directives that apply to +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Enclose directives that apply to the contents of file-system directories matching a regular expression.
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path /usr/local/apache/h +svC
    Directory that forms the main document tree visible +
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path /usr/local/apache/h +svC
    Directory that forms the main document tree visible from the web
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers +
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers after a crash
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client +
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client in case of an error
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLog [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module +
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLog [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires +
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires headers
    ExpiresByType MIME-type -<code>secondssvdhE
    Value of the Expires header configured +
    ExpiresByType MIME-type +<code>secondssvdhE
    Value of the Expires header configured by MIME type
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... INode MTime Size svdhC
    File attributes used to create the ETag +
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource disabled | local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... INode MTime Size svdhC
    File attributes used to create the ETag HTTP response header for static files
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched +
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched filenames
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched +
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched filenames
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not found
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified +
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified media type in the HTTP Content-Type header field
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    Specify a timeout after which a gracefully shutdown server +
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutdownTimeout seconds 0 sM
    Specify a timeout after which a gracefully shutdown server will exit.
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top +
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top of the index listing
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    Enables DNS lookups on client IP addresses
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote user
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is +
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime
    <IfDefine [!]parameter-name> ... - </IfDefine>svdhC
    Encloses directives that will be processed only +
    <IfDefine [!]parameter-name> ... + </IfDefine>svdhC
    Encloses directives that will be processed only if a test is true at startup
    <IfModule [!]module-file|module-identifier> ... - </IfModule>svdhC
    Encloses directives that are processed conditional on the +
    <IfModule [!]module-file|module-identifier> ... + </IfModule>svdhC
    Encloses directives that are processed conditional on the presence or absence of a specific module
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action if no coordinates are given when calling an imagemap
    Include [optional|strict] file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +
    Include [optional|strict] file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within the server configuration files
    IndexHeadInsert "markup ..."svdhB
    Inserts text in the HEAD section of an index page.
    IndexIgnore file [file] ... "." svdhB
    Adds to the list of files to hide when listing @@ -495,7 +561,7 @@ requests on a persistent connection
    LanguagePriority MIME-lang [MIME-lang] -...svdhB
    The precendence of language variants for cases where +...svdhB
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    Listen [IP-address:]portnumber [protocol]sM
    IP addresses and ports that the server listens to
    ListenBacklog backlogsM
    Maximum length of the queue of pending connections
    LoadFile filename [filename] ...sE
    Link in the named object file or library
    LoadModule module filenamesE
    Links in the object file or library, and adds to the list +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...svE
    Link in the named object file or library
    LoadModule module filenamesvE
    Links in the object file or library, and adds to the list of active modules
    <Location - URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching +
    <Location + URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching URLs
    <LocationMatch - regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression +
    <LocationMatch + regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression matching URLs
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel [module:]level [module:level] ... warn svdC
    Controls the verbosity of the ErrorLog
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests number 100 svC
    Number of requests allowed on a persistent connection
    MaxMemFree KBytes 0 sM
    Maximum amount of memory that the main allocator is allowed +
    MaxMemFree KBytes 2048 sM
    Maximum amount of memory that the main allocator is allowed to hold without calling free()
    MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdC
    Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource
    MaxSpareServers number 10 sM
    Maximum number of idle child server processes
    MaxSpareThreads numbersM
    Maximum number of idle threads
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off svdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathsvE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads numbersM
    Minimum number of idle threads available to handle request spikes
    MMapFile file-path [file-path] ...sX
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dB
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -625,10 +708,12 @@ evaluated.
    svdhB
    Passes environment variables from the shell
    PidFile filename logs/httpd.pid sM
    File where the server records the process ID of the daemon
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|Off Off svX
    Turn the echo server on or off
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Determines how to handle bad header lines in a @@ -644,20 +729,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>svE
    Container for directives applied to regular-expression-matched @@ -665,41 +755,44 @@ proxied resources
    ProxyMaxForwards number -1 svE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    Name of the file that will be inserted at the end of the index listing
    ReceiveBufferSize bytes 0 sM
    TCP receive buffer size
    Redirect [status] URL-path +
    Redirect [status] [URL-path] URLsvdhB
    Sends an external redirect asking the client to fetch a different URL
    RedirectMatch [status] regex @@ -710,112 +803,116 @@ a different URL
    RedirectTemp URL-path URLsvdhB
    Sends an external temporary redirect asking the client to fetch a different URL
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdhB
    Removes any character set associations for a set of file +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdhB
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...vdhB
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...vdhB
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...vdhB
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...vdhB
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...vdhB
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...vdhB
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...vdhB
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...vdhB
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...vdhB
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...vdhB
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...vdhB
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...vdhB
    Removes any content type associations for a set of file extensions
    RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]svdhE
    Configure HTTP request headers
    RequestReadTimeout +
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP request headers
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched by Apache httpd children
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched +
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched by Apache httpd children
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by +
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by processes launched by Apache httpd children
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile file-path logs/apache_status sM
    Location of the file used to store coordination data for +
    ScoreBoardFile file-path logs/apache_runtime +sM
    Location of the file used to store coordination data for the child processes
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request +
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request method.
    ScriptAlias URL-path -file-path|directory-pathsvB
    Maps a URL to a filesystem location and designates the +
    ScriptAlias [URL-path] +file-path|directory-pathsvdB
    Maps a URL to a filesystem location and designates the target as a CGI script
    ScriptAliasMatch regex -file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression and designates the target as a CGI script
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI scripts
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded +
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded in the scriptlog
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path logs/cgisock sB
    The filename prefix of the socket to use for communication with +
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path cgisock sB
    The filename prefix of the socket to use for communication with the cgi daemon
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error +
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error messages sent to the client
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests +
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests to name-virtual hosts
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    Hostname and port that the server uses to identify +
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    Hostname and port that the server uses to identify itself
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that +
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that is accessed by an incompatible browser
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response +
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response header
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SessionHeader headersvdhE
    Import session updates from a given HTTP response header
    SessionInclude pathsvdhE
    Define URL prefixes for which a session is valid
    SessionMaxAge maxage 0 svdhE
    Define a maximum age in seconds for a session
    SetEnv env-variable valuesvdhB
    Sets environment variables
    SetEnv env-variable [value]svdhB
    Sets environment variables
    SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables based on attributes of the request @@ -848,63 +945,68 @@ handler
    SetOutputFilter filter[;filter...]svdhC
    Sets the filters that will process responses from the server
    SSIAccessEnable on|off off dhB
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI error
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartServers numbersM
    Number of child server processes created at startup
    StartThreads numbersM
    Number of threads created on startup
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    User and group for CGI programs to run as
    ThreadLimit numbersM
    Sets the upper limit on the configurable number of threads @@ -961,8 +1069,11 @@ certain events before failing a request
    TransferLog file|pipesvB
    Specify location of a log file
    TypesConfig file-path conf/mime.types sB
    The location of the mime.types file
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    Removes variables from the environment
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    Removes variables from the environment
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|DNS Off svdC
    Configures how the server determines its own name and port
    UseCanonicalPhysicalPort On|Off Off svdC
    Configures how the server determines its own name and @@ -990,24 +1101,47 @@ for a given virtual host
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.

    Idiomas disponibles:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.fr b/docs/manual/mod/quickreference.html.fr new file mode 100644 index 00000000000..5995acb4fed --- /dev/null +++ b/docs/manual/mod/quickreference.html.fr @@ -0,0 +1,1435 @@ + + + + + +Document de rfrence rapide des directives - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +

    Document de rfrence rapide des directives

    +
    +

    Langues Disponibles:  de  | + en  | + es  | + fr  | + ja  | + ko  | + tr  | + zh-cn 

    +
    + +

    Le document de rfrence rapide des directives montre l'usage, + les valeurs par dfaut, le statut, + et le contexte de chaque directive de configuration d'Apache. Pour plus + d'informations sur chacun de ces termes, voir le Dictionnaire des directives.

    + +

    La premire colonne donne le nom de la directive et son usage. + Si la directive possde une valeur par dfaut, elle est indique dans la + deuxime colonne. + Si la valeur par dfaut est trop grande pour pouvoir tre affiche, + elle sera tronque et suivie d'un "+".

    + +

    La troisime colonne numre les contextes dans + lesquels la directive est applicable, et la quatrime indique son statut en accord avec le + tableau des lgendes ci-dessous.

    +
    +
    + + + +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  + + + +
    sconfiguration du serveur
    vserveur virtuel
    drpertoire
    h.htaccess
    + + + + + +
    CCore
    MMPM
    BBase
    EExtension
    XExprimental
    TExterne
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AcceptFilter protocole filtre +d'acceptationsC
    Permet d'optimiser la configuration d'une socket pour +l'coute d'un protocole
    AcceptPathInfo On|Off|Default Default svdhC
    Les ressources acceptent des informations sous forme d'un +nom de chemin en fin de requte.
    AccessFileName nom-du-fichier +[nom-du-fichier] ... .htaccess svC
    Nom du fichier de configuration distribu
    Action type d'action script cgi +[virtual]svdhB
    Active un script CGI pour un gestionnaire ou un type de +contenu particulier
    AddAlt texte fichier [fichier] ...svdhB
    Texte optionnel afficher la place d'un icne pour un +fichier en fonction de son nom
    AddAltByEncoding texte codage MIME +[codage MIME] ...svdhB
    Texte optionnel afficher la place d'un icne pour un +fichier en fonction de son codage MIME
    AddAltByType texte type MIME +[type MIME] ...svdhB
    Texte optionnel afficher la place d'un icne pour un +fichier en fonction de son type MIME
    AddCharset jeu-car extension +[extension] ...svdhB
    Associe les extensions de noms de fichiers spcifies au +jeu de caractres spcifi
    AddDefaultCharset On|Off|jeu de caractres Off svdhC
    Paramtre jeu de caractres par dfaut ajouter quand le +type de contenu d'une rponse est text/plain ou +text/html
    AddDescription texte [fichier] ...svdhB
    Afficher la description d'un fichier
    AddEncoding codage extension +[extension] ...svdhB
    Associe les extensions de noms de fichiers donnes au type +de codage spcifi
    AddHandler nom-gestionnaire extension +[extension] ...svdhB
    Associe les extensions de noms de fichiers donnes au +gestionnaire spcifi
    AddIcon icne nom [nom] +...svdhB
    Icne afficher pour un fichier en fonction de son +nom
    AddIconByEncoding icne codage MIME +[codage MIME] ...svdhB
    Icne afficher ct d'un fichier en fonction de son +codage MIME
    AddIconByType icne type MIME +[type MIME] ...svdhB
    Icne afficher ct d'un fichier en fonction de son +type MIME
    AddInputFilter filtre[;filtre...] +extension [extension] ...svdhB
    Associe les extensions de noms de fichiers aux +filtres spcifis qui traiteront les requtes clients
    AddLanguage symbole-langue extension +[extension] ...svdhB
    Associe l'extension de nom de fichier donne la langue +spcifi
    AddModuleInfo nom-module chanesvE
    Ajoute des donnes supplmentaires aux informations de +module affiches par le gestionnaire server-info
    AddOutputFilter filtre[;filtre...] +extension [extension] ...svdhB
    Associe les extensions de noms de fichiers aux +filtres spcifis qui traiteront les rponses en provenance du +serveur
    AddOutputFilterByType filtre[;filtre...] +type_de_mdia [type_de_mdia] ...svdhB
    assigne un filtre en sortie pour un type de mdia +particulier
    AddType type-mdium extension +[extension] ...svdhB
    Associe les extensions de noms de fichiers au type de +contenu spcifi
    Alias [chemin URL] +chemin fichier|chemin rpertoiresvB
    Met en correspondance des URLs avec des chemins du systme +de fichiers
    AliasMatch regex +chemin fichier|chemin rpertoiresvB
    Met en correspondance des URLs avec le systme de fichiers +en faisant intervenir les expressions rationnelles
    Allow from all|hte|env=[!]variable +d'environnement +[hte|env=[!]variable d'environnement] ...dhE
    Spcifie quels htes peuvent accder une certaine zone du +serveur
    AllowCONNECT port[-port] +[port[-port]] ... 443 563 svE
    Ports autoriss se CONNECTer travers le +mandataire
    AllowEncodedSlashes On|Off|NoDecode Off svC
    Dtermine si les sparateurs de chemin encods sont +autoriss transiter dans les URLs tels quels
    AllowMethods reset|HTTP-method +[HTTP-method]... reset dX
    Restreint l'accs aux mthodes HTTP spcifies
    AllowOverride All|None|type directive +[type directive] ... None partir de la +dC
    Types de directives autorises dans les fichiers +.htaccess
    AllowOverrideList None|directive +[directive-type] ... None dC
    Directives autorises dans les fichiers .htaccess
    Anonymous utilisateur [utilisateur] +...dhE
    Dfinit la liste des identifiants utilisateur autoriss +accder sans vrification du mot de passe
    Anonymous_LogEmail On|Off On dhE
    Dtermine si le mot de passe fourni sera enregistr dans le +journal des erreurs
    Anonymous_MustGiveEmail On|Off On dhE
    Dtermine si l'abscence de mot de passe est +autorise
    Anonymous_NoUserID On|Off Off dhE
    Dtermine si le champ identifiant peut tre +vide
    Anonymous_VerifyEmail On|Off Off dhE
    Dtermine s'il faut vrifier que le format de l'adresse +email fournie comme mot de passe est correct
    AsyncRequestWorkerFactor facteursM
    Limite le nombre de connexions simultanes par thread
    AuthBasicAuthoritative On|Off On dhB
    Dfinit si les processus d'autorisation et +d'authentification peuvent tre confis des modules de plus bas +niveau
    AuthBasicFake off|nom-utilisateur [mot-de-passe]dhB
    Authentification de base simule l'aide des nom +d'utilisateur et mot de passe fournis
    AuthBasicProvider nom fournisseur +[nom fournisseur] ... file dhB
    Dfinit le(les) fournisseur(s) d'authentification pour +cette zone du site web
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Vrifie les mots de passe auprs des fournisseurs +d'authentification la manire de l'authentification de type Digest. +
    AuthDBDUserPWQuery requtedE
    Requte SQL servant vrifier le mot de passe d'un +utilisateur
    AuthDBDUserRealmQuery requtedE
    Requte SQL servant vrifier une empreinte de mot de +passe pour un utilisateur et un identifiant d'authentification. +
    AuthDBMGroupFile chemin-fichierdhE
    Dfinit le nom du fichier de base de donnes contenant la +liste des groupes d'utilisateurs permettant de dfinir les +autorisations des utilisateurs
    AuthDBMType default|SDBM|GDBM|NDBM|DB default dhE
    Dfinit le type de fichier de base de donnes utilis pour +stocker les mots de passe
    AuthDBMUserFile chemin-fichierdhE
    Dfinit le nom d'un fichier de base de donnes pour +l'authentification contenant la liste +des utilisateurs et de leurs mots de passe
    AuthDigestAlgorithm MD5|MD5-sess MD5 dhE
    Slectionne l'algorithme utilis pour calculer les +condenss du dfit et de sa rponse
    AuthDigestDomain URI [URI] ...dhE
    Les URIs qui se trouvent dans le mme espace de protection +concernant l'authentification base de condenss
    AuthDigestNonceLifetime secondes 300 dhE
    Dure de validit du nombre valeur unique du +serveur (nonce)
    AuthDigestProvider nom fournisseur +[nom fournisseur] ... file dhE
    Dfinit le(s) fournisseurs(s) d'authentification pour la +zone du site web concerne
    AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhE
    Dtermine le niveau de protection fourni par +l'authentification base de condens
    AuthDigestShmemSize taille 1000 sE
    La quantit de mmoire partage allouer afin de conserver +les informations propos des clients
    AuthFormAuthoritative On|Off On dhB
    Dtermine si l'autorisation et l'authentification sont confis +des modules de plus bas niveau
    AuthFormBody nom du champdB
    Le nom du champ de formulaire contenant le corps de la +requte effectuer en cas de connexion russie
    AuthFormDisableNoStore On|Off Off dB
    Dsactive l'en-tte CacheControl no-store sur la page de +connexion
    AuthFormFakeBasicAuth On|Off Off dB
    Simule une en-tte d'authentification de base
    AuthFormLocation nom du champdB
    Le nom du champ de formulaire qui contiendra l'URL vers +laquelle l'utilisateur sera redirig en cas de connexion +russie
    AuthFormLoginRequiredLocation urldB
    L'URL de la page vers laquelle on doit tre redirig si une +authentification est requise
    AuthFormLoginSuccessLocation urldB
    L'URL de la page vers laquelle on doit tre redirig en cas +de connexion russie
    AuthFormLogoutLocation uridB
    L'URL vers laquelle un utilisateur devra tre redirig +aprs s'tre dconnect
    AuthFormMethod nom du champdB
    Le nom du champ de formulaire contenant la mthode de la +requte effectuer en cas de connexion russie
    AuthFormMimetype nom du champdB
    Le nom du champ de formulaire contenant le type MIME du +corps de la requte effectuer en cas de connexion +russie
    AuthFormPassword nom du champdB
    Le nom du champ de formulaire qui contient le mot de passe +de connexion
    AuthFormProvider nom fournisseur +[nom fournisseur] ... file dhB
    Dfinit le(s) fournisseur(s) d'authentification pour la +zone concerne
    AuthFormSitePassphrase secretdB
    Court-circuite l'authentification pour les sites fort +trafic
    AuthFormSize tailledB
    La taille maximale en octets du formulaire dont seront +extraites les informations de connexion
    AuthFormUsername nom du champdB
    Le nom du champ de formulaire qui contient le nom de +connexion
    AuthGroupFile chemin-fichierdhB
    Dfinit le nom d'un fichier texte contenant la liste des +groupes d'utilisateurs permettant de dfinir les autorisations des +utilisateurs
    AuthLDAPAuthorizePrefix prfixe AUTHORIZE_ dhE
    Spcifie le prfixe ajout aux variables d'environnement +durant la phase d'autorisation
    AuthLDAPBindAuthoritative off|on on dhE
    Dtermine si l'on doit utiliser d'autres fournisseurs +d'authentification lorsque le serveur ne peut pas valider les donnes +d'authentification de l'utilisateur, alors que ce dernier possde un +DN.
    AuthLDAPBindDN dndhE
    Un DN optionnel pour se connecter au serveur +LDAP
    AuthLDAPBindPassword mot-de-passedhE
    Mot de passe utiliser en conjonction avec le DN de +connexion
    AuthLDAPCharsetConfig chemin-fichiersE
    Chemin du fichier de configuration de la correspondance +langage/jeu de caractres
    AuthLDAPCompareAsUser on|off off dhE
    Utilisation des donnes d'authentification de l'utilisateur +pour effectuer les comparaisons pour l'attribution des autorisations
    AuthLDAPCompareDNOnServer on|off on dhE
    Utilise le serveur LDAP pour comparer les DNs
    AuthLDAPDereferenceAliases never|searching|finding|always always dhE
    quel moment le module va drfrencer les +alias
    AuthLDAPGroupAttribute attribut member uniquemember +dhE
    L'attribut LDAP utilis pour vrifier l'appartenance d'un +utilisateur un groupe.
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Utilise le DN de l'utilisateur pour vrifier son +appartenance un groupe
    AuthLDAPInitialBindAsUser off|on off dhE
    Dtermine si le serveur effectue la recherche initiale du +DN en utilisant le nom propre de l'utilisateur pour l'authentification +de base +et non de manire anonyme, ou en utilisant des donnes d'authentification +codes en dur pour le serveur
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (nom de l'u +dhE
    Spcifie la modification a apporter au nom d'utilisateur +pour l'authentification de base lors de l'authentification auprs du +serveur LDAP pour effectuer une recherche de DN
    AuthLDAPMaxSubGroupDepth Nombre 10 dhE
    Spcifie la profondeur d'imbrication des sous-groupes +maximale prise en compte avant l'abandon de la recherche de +l'utilisateur.
    AuthLDAPRemoteUserAttribute uiddhE
    Spcifie l'attribut dont la valeur renvoye au cours de la +requte de l'utilisateur sera utilise pour dfinir la variable +d'environnement REMOTE_USER
    AuthLDAPRemoteUserIsDN on|off off dhE
    Utilise le DN de l'utilisateur pour dfinir la variable +d'environnement REMOTE_USER
    AuthLDAPSearchAsUser on|off off dhE
    Utilise les donnes d'authentification de l'utilisateur +pour la recherche des autorisations
    AuthLDAPSubGroupAttribute attributdhE
    Spcifie les noms d'attribut, un par directive, utiliss +pour diffrencier les membres du groupe courant qui sont eux-mmes des +groupes.
    AuthLDAPSubGroupClass ObjectClass-LDAP groupOfNames groupO +dhE
    Spcifie quelles valeurs d'objectClass LDAP identifient les +objets de l'annuaire qui sont des groupes au cours du traitement des +sous-groupes.
    AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhE
    L'URL permettant de spcifier les paramtres de la +recherche LDAP
    AuthMerging Off | And | Or Off dhB
    Dfinit la manire dont chaque logique d'autorisation des +sections de configuration se combine avec celles des sections de +configuration prcdentes.
    AuthName domaine d'autorisationdhB
    L'identifiant de l'autorisation utiliser avec +l'authentification HTTP
    AuthnCacheContext directory|server|chane-personnalisedB
    Spcifie une chane de contexte utiliser dans la cl du +cache
    AuthnCacheEnablesB
    Active la mise en cache de l'authentification en tout +endroit
    AuthnCacheProvideFor fournisseur-authn [...]dhB
    Spcifie le fournisseur pour lequel on veut effectuer une +mise en cache
    AuthnCacheSOCache nom-fournisseur[:arguments-fournisseur]sB
    Slectionne le fournisseur socache d'arrire-plan +utiliser
    AuthnCacheTimeout dure-de-vie (secondes)dhB
    Dfinit une dure de vie pour les entres du cache
    <AuthnProviderAlias alias-fournisseur> +... </AuthnProviderAlias>sB
    Regroupe un ensemble de directives qui constituent une +extension d'un fournisseur d'authentification de base et lui attribue +l'alias spcifi
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type d'authentification utilisateur
    AuthUserFile chemin-fichierdhB
    Dfinit le nom d'un fichier texte pour l'authentification +contenant la liste des utilisateurs et de leurs mots de +passe
    AuthzDBDLoginToReferer On|Off Off dE
    Dfinit si le client doit tre redirig vers la page +d'origine en cas de connexion ou de dconnexion russie si un en-tte +de requte Referer est prsent
    AuthzDBDQuery requtedE
    Dfinit la requte SQL pour l'opration requise
    AuthzDBDRedirectQuery requtedE
    Dfinit une requte pour rechercher une page vers laquelle +rediriger l'utilisateur aprs une connexion russie
    AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhE
    Dfinit le type de fichier de base de donnes contenant +la liste des groupes d'utilisateurs
    <AuthzProviderAlias fournisseur-de-base Alias +Paramtres-Require> +... </AuthzProviderAlias> +sB
    Regroupe des directives reprsentant une extension d'un +fournisseur d'autorisation de base qui pourra tre rfrence l'aide +de l'alias spcifi
    AuthzSendForbiddenOnFailure On|Off Off dhB
    Envoie '403 FORBIDDEN' au lieu de '401 UNAUTHORIZED' si +l'authentification russit et si l'autorisation a t refuse. +
    BalancerGrowth # 5 svE
    Nombre de membres supplmentaires pouvant tre ajouts +aprs la configuration initiale
    BalancerInherit On|Off On svE
    Hritage des membres du groupes de rpartition de + charge du mandataire dfinis au niveau du serveur principal
    BalancerMember [balancerurl] url [cl=valeur [cl=valeur ...]]dE
    Ajoute un membre un groupe de rpartition de +charge
    BalancerPersist On|Off Off svE
    Tente de conserver les changements effectus par le + gestionnaire de rpartition de charge aprs un redmarrage du + serveur.
    BrowserMatch regex [!]env-variable[=valeur] +[[!]env-variable[=valeur]] ...svdhB
    Dfinit des variables d'environnement en fonction du +contenu de l'en-tte HTTP User-Agent
    BrowserMatchNoCase regex [!]env-variable[=valeur] + [[!]env-variable[=valeur]] ...svdhB
    Dfinit des variables d'environnement en fonction du +contenu de l'en-tte HTTP User-Agent sans tenir compte de la +casse
    BufferedLogs On|Off Off sB
    Enregistre les entres du journal dans un tampon en mmoire +avant de les crire sur disque
    BufferSize entier 131072 svdhE
    Taille maximale en octets du filtre par tampon
    CacheDefaultExpire secondes 3600 (une heure) svdhE
    La dure par dfaut de mise en cache d'un document +lorsqu'aucune date d'expiration n'a t spcifie.
    CacheDetailHeader on|off off svdhE
    Ajoute un en-tte X-Cache-Detail la rponse.
    CacheDirLength longueur 2 svE
    Le nombre de caractres des noms des +sous-rpertoires
    CacheDirLevels niveaux 2 svE
    Le nombre de niveaux de sous-rpertoires que comportera le +cache.
    CacheDisable chane-url | onsvdhE
    Dsactive la mise en cache des URLs +spcifies
    CacheEnable type de cache [chane +URL]svdE
    Active la mise en cache des URLs spcifies en utilisant le +gestionnaire de stockage prcis
    CacheFile chemin fichier [chemin fichier] ...sX
    Met en cache une liste de gestionnaires de fichiers au +dmarrage
    CacheHeader on|off off svdhE
    Ajoute un en-tte X-Cache la rponse.
    CacheIgnoreCacheControl On|Off Off svE
    Ignore les en-ttes de requte enjoignant de ne pas servir +le contenu au client depuis le cache
    CacheIgnoreHeaders en-tte [en-tte] ... None svE
    Ne pas stocker le(s) en-tte(s) spcifi(s) dans le cache. +
    CacheIgnoreNoLastMod On|Off Off svdhE
    Ignore le fait qu'une rponse ne possde pas d'en-tte Last +Modified.
    CacheIgnoreQueryString On|Off Off svE
    Ignore la chane de paramtres lors de la mise en +cache
    CacheIgnoreURLSessionIdentifiers identifiant +[identifiant] ... None svE
    Ignore les identifiants de session dfinis encods dans +l'URL lors de la mise en cache +
    CacheKeyBaseURL URL http://example.com svE
    Remplace l'URL de base des cls du cache mandates en +inverse
    CacheLastModifiedFactor flottant 0.1 svdhE
    Le facteur utilis pour gnrer une date d'expiration en +fonction de la date de dernire modification.
    CacheLock on|off off svE
    Active la protection contre les temptes de requtes.
    CacheLockMaxAge entier 5 svE
    Dfinit la dure de vie maximale d'un verrou de cache.
    CacheLockPath rpertoire /tmp/mod_cache-lock +svE
    Dfinit le rpertoire des verrous.
    CacheMaxExpire secondes 86400 (une journe) +svdhE
    La dure maximale en secondes de mise en cache d'un +document
    CacheMaxFileSize octets 1000000 svdhE
    >La taille maximale (en octets) d'un document pour pouvoir +tre stock dans le cache
    CacheMinExpire secondes 0 svdhE
    La dure minimale en secondes de mise en cache d'un +document
    CacheMinFileSize octets 1 svdhE
    La taille minimale (en octets) d'un document pour pouvoir +tre stock dans le cache
    CacheNegotiatedDocs On|Off Off svB
    Permet la mise en cache au niveau des serveurs mandataires +des documents dont le contenu a t ngoci
    CacheQuickHandler on|off on svE
    Excute le cache partir d'un gestionnaire rapide.
    CacheReadSize octets 0 svdhE
    La quantit minimale (en octets) de donnes lire et +mettre en cache avant de les envoyer au client
    CacheReadTime millisecondes 0 svdhE
    Le temps minimum (en millisecondes) qui doit s'couler +avant d'envoyer les donnes au client
    CacheRoot rpertoiresvE
    La racine du rpertoire dans lequel les fichiers du cache +seront stocks
    CacheSocache type[:args]svE
    Implmentation du cache d'objets partags utiliser
    CacheSocacheMaxSize octets 102400 svdhE
    La taille maximale d'une entre pouvant tre place dans le +cache
    CacheSocacheMaxTime secondes 86400 svdhE
    La dure maximale de stockage d'un document dans le cache +avant premption
    CacheSocacheMinTime seconds 600 svdhE
    La dure minimale de stockage d'un document dans le cache
    CacheSocacheReadSize octets 0 svdhE
    La quantit minimale de donnes du document lire et +mettre en cache avant envoi au client
    CacheSocacheReadTime millisecondes 0 svdhE
    La dure minimale de lecture avant l'envoi des donnes
    CacheStaleOnError on|off on svdhE
    Sert du contenu non jour la place de rponses 5xx.
    CacheStoreExpired On|Off Off svdhE
    Tente de mettre en cache les rponses que le serveur +considre comme arrives expiration
    CacheStoreNoStore On|Off Off svdhE
    Tente de mettre en cache les requtes ou rponses dont +l'entte Cache-Control: a pour valeur no-store.
    CacheStorePrivate On|Off Off svdhE
    Tente de mettre en cache des rponses que le serveur a +marques comme prives
    CGIDScriptTimeout time[s|ms]svdhB
    Dure maximale d'attente de la prochaine sortie du +programme CGI
    CGIMapExtension chemin CGI .extensiondhC
    Technique permettant de localiser l'interprteur des +scripts CGI
    CGIPassAuth On|Off Off dhC
    Active la transmission d'en-ttes d'autorisation HTTP aux scripts en +tant que variables CGI
    CGIVar variable ruledhC
    Contrle la manire dont certaines variables CGI sont dfinies
    CharsetDefault jeu de caractressvdhE
    Jeu de caractre vers lequel la traduction doit +s'effectuer
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Prcise les dtails de la traduction du jeu de +caractres
    CharsetSourceEnc jeu de caractressvdhE
    Jeu de caractres source des fichiers
    CheckCaseOnly on|off Off svdhE
    Limite l'action du module aux corrections de +majuscules
    CheckSpelling on|off Off svdhE
    Active le module de correction
    ChrootDir chemin-rpertoiresB
    Rpertoire dans lequel Apache doit se positionner au +dmarrage aprs avoir effectu un chroot(8).
    ContentDigest On|Off Off svdhC
    Active la gnration d'un en-tte Content-MD5 +dans la rponse HTTP
    CookieDomain domainesvdhE
    Le domaine auquel le cookie traceur +s'applique
    CookieExpires duresvdhE
    Dure avant expiration du cookie traceur
    CookieName symbole Apache svdhE
    Nom du cookie traceur
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format du champ d'en-tte cookie
    CookieTracking on|off off svdhE
    Active le cookie traceur
    CoreDumpDirectory rpertoiresM
    Le rpertoire dans lequel le serveur HTTP Apache va tenter de se +positionner avant d'effectuer un vidage mmoire
    CustomLog fichier|pipe +format|alias +[env=[!]variable-environnement| +expr=expression]svB
    Dfinit le nom et le format du fichier +journal
    Dav On|Off|nom fournisseur Off dE
    Active les mthodes HTTP WebDAV
    DavDepthInfinity on|off off svdE
    Autorise les requtes PROPFIND avec en-tte Depth: +Infinity
    DavGenericLockDB chemin fichiersvdE
    Chemin de la base de donnes des verrous DAV
    DavLockDB chemin fichiersvE
    Chemin de la base de donnes des verrous DAV
    DavMinTimeout secondes 0 svdE
    Dure minimale pendant laquelle le serveur maintient un +verrou sur une ressource DAV
    DBDExptime dure en secondes 300 svE
    Dure de vie des connexions inactives
    DBDInitSQL "instruction SQL"svE
    Excute une instruction SQL aprs connexion une base de +donnes
    DBDKeep nombre 2 svE
    Nombre maximum de connexions maintenues
    DBDMax nombre 10 svE
    Nombre maximum de connexions
    DBDMin nombre 1 svE
    Nombre minimum de connexions
    DBDParams +param1=valeur1[,param2=valeur2]svE
    Paramtres de la connexion la base de +donnes
    DBDPersist On|OffsvE
    Utiliser ou non des connexions persistentes
    DBDPrepareSQL "requte SQL" tiquettesvE
    Dfinit une requte SQL prpare
    DBDriver nomsvE
    Spcifie un pilote SQL
    DefaultIcon chemin URLsvdhB
    Icne afficher par dfaut lorsqu'aucun icne spcifique +n'est prcis
    DefaultLanguage symbole-languesvdhB
    Dfinit un symbole de langue par dfaut affecter au champ +d'en-tte Content-Language pour toutes les ressources dans le contexte +courant auxquelles aucun symbole de langue n'a t +associ.
    DefaultRuntimeDir chemin-rpertoire DEFAULT_REL_RUNTIME +sC
    Rpertoire de base des fichiers crs au cours de l'excution du serveur
    DefaultType type mdia|none none svdhC
    Les seuls effets de cette directive sont des missions +d'avertissements si sa valeur est diffrente de none. Dans +les versions prcdentes, DefaultType permettait de spcifier un type de +mdia assigner par dfaut au contenu d'une rponse pour lequel aucun +autre type de mdia n'avait t trouv. +
    Define nom-paramtre [valeur-paramtre]svdC
    Permet de dfinir une variable
    DeflateBufferSize valeur 8096 svE
    Taille du fragment que zlib devra comprimer en une seule +fois
    DeflateCompressionLevel valeursvE
    Le niveau de compression que nous appliquons la +sortie
    DeflateFilterNote [type] nom de la notesvE
    Enregistre le taux de compression sous la forme d'une note + des fins de journalisation
    DeflateInflateLimitRequestBodyvaluesvdhE
    Taille maximale des corps de requte dcompresss
    DeflateInflateRatioBurst valuesvdhE
    Nombre maximal de fois que le ratio de dcompression d'un +corps de requte peut tre dpass
    DeflateInflateRatioLimit valuesvdhE
    Ratio de dcompression maximum pour les corps de requtes
    DeflateMemLevel valeur 9 svE
    La quantit de mmoire utilisable par zlib pour la +compression
    DeflateWindowSize valeur 15 svE
    Taille de la fentre de compression zlib
    Deny from all|hte|env=[!]variable +d'environnement +[hte|env=[!]variable d'environnement] ...dhE
    Dfinit quels htes ne sont pas autoriss accder au +serveur
    <Directory chemin rpertoire> +... </Directory>svC
    Regroupe un ensemble de directives qui ne s'appliquent +qu'au rpertoire concern du systme de fichiers, ses +sous-rpertoires, et leur contenu.
    DirectoryCheckHandler On|Off Off svdhB
    Dfinit la rponse de ce module lorsqu'un autre +gestionnaire est utilis
    DirectoryIndex + disabled | url locale [url locale] ... index.html svdhB
    Liste des fichiers ressources rechercher lorsque le +client envoie une requte pour un rpertoire
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +3xx-code + off svdhB
    Dfinit une redirection externe pour les index de +rpertoires. +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Regroupe des directives qui s'appliquent au contenu de rpertoires +du systme de fichiers correspondant une expression rationnelle
    DirectorySlash On|Off On svdhB
    Activation/Dsactivation de la redirection "slash de +fin"
    DocumentRoot chemin rpertoire "/usr/local/apache/ +svC
    Racine principale de l'arborescence des documents visible +depuis Internet
    DTracePrivileges On|Off Off sX
    Dtermine si les privilges requis par dtrace sont +activs.
    DumpIOInput On|Off Off sE
    Enregistre toutes les entres dans le journal des +erreurs
    DumpIOOutput On|Off Off sE
    Enregistre toutes les sorties dans le journal des +erreurs
    <Else> ... </Else>svdhC
    Contient des directives qui ne s'appliquent que si la +condition correspondant la section <If> ou <ElseIf> prcdente n'est pas satisfaite par la +requte l'excution
    <ElseIf expression> ... </ElseIf>svdhC
    Contient des directives qui ne s'appliquent que si la +condition correspondante est satisfaite par une requte l'excution, +alors que la condition correspondant la section <If> ou <ElseIf> prcdente ne l'tait pas.
    EnableExceptionHook On|Off Off sM
    Active un hook ("point d'accrochage logiciel") qui excute des +gestionnaires d'exception aprs un crash
    EnableMMAP On|Off On svdhC
    Utilise la projection en mmoire (Memory-Mapping) pour +lire les fichiers pendant qu'ils sont servis
    EnableSendfile On|Off Off svdhC
    Utilise le support sendfile du noyau pour servir les +fichiers aux clients
    Error messagesvdhC
    Interrompt la lecture de la configuration avec un message +d'erreur personnalis
    ErrorDocument code erreur documentsvdhC
    Document que le serveur renvoie au client en cas +d'erreur
    ErrorLog chemin fichier|syslog[:facility] logs/error_log (Uni +svC
    Dfinition du chemin du journal des erreurs
    ErrorLogFormat [connection|request] formatsvC
    Spcification du format des entres du journal des erreurs
    ExamplesvdhX
    Directive de dmonstration pour illustrer l'API des modules +Apache
    ExpiresActive On|Off Off svdhE
    Active la gnration d'en-ttes +Expires
    ExpiresByType type MIME +<code>secondessvdhE
    Dfinition de la valeur de l'en-tte Expires +en fonction du type MIME
    ExpiresDefault <code>secondessvdhE
    Mode de calcul par dfaut de la date +d'expiration
    ExtendedStatus On|Off Off sC
    Extrait des informations d'tat tendues pour chaque +requte
    ExtFilterDefine nom_filtre paramtressE
    Dfinit un filtre externe
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure les options de +mod_ext_filter
    FallbackResource disabled | url-localesvdhB
    Dfinit une URL par dfaut pour les requtes qui ne ciblent +aucun fichier
    FileETag composant ... MTime Size svdhC
    Caractristiques de fichier utilises lors de la gnration +de l'en-tte de rponse HTTP ETag pour les fichiers statiques
    <Files nom fichier> ... </Files>svdhC
    Contient des directives qui s'appliquent aux fichiers +prciss
    <FilesMatch expression rationnelle> ... +</FilesMatch>svdhC
    Contient des directives qui s'appliquent des fichiers +spcifis sous la forme d'expressions rationnelles
    FilterChain [+=-@!]nom_filtre ...svdhB
    Configure la chane de filtrage
    FilterDeclare nom_filtre [type]svdhB
    Dclare un filtre intelligent
    FilterProtocol nom_filtre [nom_fournisseur] + drapeaux_protocolesvdhB
    Vrifie le respect du protocole HTTP
    FilterProvider nom_filtre nom_fournisseur + expressionsvdhB
    Enregistre un filtre de contenu
    FilterTrace nom_filtre niveausvdB
    Obtention d'informations de dbogage/diagnostique en +provenance de mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action entreprendre si un document acceptable unique +n'est pas trouv
    ForceType type mdium|NonedhC
    Force le type de mdium spcifi dans le champ d'en-tte +HTTP Content-Type pour les fichiers correspondants
    ForensicLog nom-fichier|pipesvE
    Dfinit le nom de fichier du journal lgal
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Dfinit le nom et le format du fichier journal
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Rpertoire dans lequel crire les donnes de profiling +gmon.out.
    GracefulShutdownTimeout seconds 0 sM
    Spcifie le dlai maximum aprs lequel le serveur va +s'arrter dans le cas d'un arrt "en douceur"
    Group groupe unix #-1 sB
    Groupe sous lequel le serveur va traiter les +requtes
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +en-tte [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] +svdhE
    Configure les en-ttes d'une rponse HTTP
    HeaderName nom fichiersvdhB
    Nom du fichier qui sera insr au dbut de la page +contenant l'index
    HeartbeatAddress addr:portsX
    Adresse multicast laquelle envoyer les requtes +heartbeat
    HeartbeatListenaddr:portsX
    Adresse multicast d'coute des requtes entrantes heartbeat
    HeartbeatMaxServers nombre-de-serveurs 10 sX
    Spcifie le nombre maximal de serveurs qui pourront envoyer +des requtes heartbeat ce serveur.
    HeartbeatStorage chemin fichier logs/hb.dat sX
    Chemin vers le stockage des donnes heartbeat
    HeartbeatStorage chemin-fichier logs/hb.dat sX
    Indique le chemin permettant de lire les donnes +heartbeat
    HostnameLookups On|Off|Double Off svdC
    Active la recherche DNS sur les adresses IP des +clients
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    Active la journalisation de l'identit RFC 1413 de +l'utilisateur distant
    IdentityCheckTimeout secondes 30 svdE
    Dtermine le dlai d'attente pour les requtes +ident
    <If expression> ... </If>svdhC
    Contient des directives qui ne s'appliquent que si une +condition est satisfaite au cours du traitement d'une +requte
    <IfDefine [!]paramtre> ... + </IfDefine>svdhC
    Contient des directives qui ne s'appliqueront que si un +test retourne "vrai" au dmarrage du serveur
    <IfModule [!]fichier module|identificateur +module> ... </IfModule>svdhC
    Contient des directives qui ne s'appliquent qu'en fonction +de la prsence ou de l'absence d'un module spcifique
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://nom_serveur/ +svdhB
    Valeur par dfaut de la directive base des +fichiers imagemap
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Action entreprendre par dfaut lorsqu'un fichier imagemap +est invoqu avec des coordonnes qui ne correspondent aucune +cible
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action entreprendre si aucune coordonne n'est fournie +lorsqu'on invoque un fichier imagemap
    Include chemin-fichier|chemin-rpertoire|wildcardsvdC
    Inclut d'autres fichiers de configuration dans un des +fichiers de configuration du serveur
    IncludeOptional +chemin-fichier|chemin-rpertoire|wildcardsvdC
    Inclusion de fichiers dans le fichier de configuration
    IndexHeadInsert "marque ..."svdhB
    Insre du texte dans la section HEAD de la page +d'index.
    IndexIgnore fichier [fichier] ... "." svdhB
    Ajouts la liste des fichiers cacher lors de l'affichage +de l'index d'un rpertoire
    IndexIgnoreReset ON|OFFsvdhB
    Vide la liste des fichiers cacher lors de l'affichage du +contenu d'un rpertoire
    IndexOptions [+|-]option [[+|-]option] +...svdhB
    Diverses options de configuration pour l'indexation d'un +rpertoire
    IndexOrderDefault Ascending|Descending +Name|Date|Size|Description Ascending Name svdhB
    Dfinit l'ordre d'affichage par dfaut d'un index de +rpertoire
    IndexStyleSheet chemin-urlsvdhB
    Ajoute une feuille de style CSS l'index du +rpertoire
    InputSed commande-seddh
    Commande sed excuter pour le filtrage des donnes d'une +requte (en gnral des donnes POST)
    ISAPIAppendLogToErrors on|off off svdhB
    Enregistrement des requtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans le journal des erreurs
    ISAPIAppendLogToQuery on|off on svdhB
    Enregistre les requtes +HSE_APPEND_LOG_PARAMETER de la part des extensions ISAPI +dans la partie arguments de la requte
    ISAPICacheFile chemin-fichier +[chemin-fichier] +...svB
    Fichiers .dll ISAPI devant tre chargs au +dmarrage
    ISAPIFakeAsync on|off off svdhB
    Emulation du support des entres/sorties asynchrones pour +les appels ISAPI
    ISAPILogNotSupported on|off off svdhB
    Journalisation des demandes de fonctionnalits non +supportes de la part des extensions ISAPI
    ISAPIReadAheadBuffer taille 49152 svdhB
    Taille du tampon de lecture anticipe envoy aux extensions +ISAPI
    KeepAlive On|Off On svC
    Active les connexions HTTP persistantes
    KeepAliveTimeout nombre[ms] 5 svC
    Dure pendant laquelle le serveur va attendre une requte +avant de fermer une connexion persistante
    KeptBodySize taille maximale en octets 0 dB
    Conserve le corps de la requte concurrence de la taille +maximale spcifie, pour une utilisation ventuelle par des filtres +comme mod_include.
    LanguagePriority langage-MIME [langage-MIME] +...svdhB
    L'ordre de priorit des variantes de langages pour les +cas o le client n'a pas formul de prfrences
    LDAPCacheEntries nombre 1024 sE
    Nombre maximum d'entres dans le cache LDAP +primaire
    LDAPCacheTTL secondes 600 sE
    Dure pendant laquelle les entres du cache restent +valides.
    LDAPConnectionPoolTTL n -1 svE
    Dsactive les connexions d'arrire-plan qui sont restes +inactives trop longtemps au sein du jeu de connexions.
    LDAPConnectionTimeout secondessE
    Spcifie le dlai d'attente en secondes de la socket de +connexion
    LDAPLibraryDebug 7sE
    Active le dbogage dans le SDK LDAP
    LDAPOpCacheEntries nombre 1024 sE
    Nombre d'entres utilises pour mettre en cache les +oprations de comparaison LDAP
    LDAPOpCacheTTL secondes 600 sE
    Dure pendant laquelle les entres du cache d'oprations +restent valides
    LDAPReferralHopLimit nombredhE
    Le nombre maximum de redirections vers des serveurs +alternatifs (referrals) avant l'abandon de la requte +LDAP.
    LDAPReferrals On|Off|default On dhE
    Active la redirection vers des serveurs alternatifs au +cours des requtes vers le serveur LDAP.
    LDAPRetries nombre d'essais 3 sE
    Dfinit le nombre maximum de tentatives de connexions au +serveur LDAP.
    LDAPRetryDelay secondes 0 sE
    Dfinit le temps d'attente avant un autre essai de connexion au +serveur LDAP.
    LDAPSharedCacheFile chemin/fichiersE
    Dfinit le fichier du cache en mmoire +partage
    LDAPSharedCacheSize octets 500000 sE
    Taille en octets du cache en mmoire partage
    LDAPTimeout secondes 60 sE
    Spcifie le dlai d'attente pour les oprations de +recherche et d'identification LDAP en secondes
    LDAPTrustedClientCert type +chemin/nom-fichier/alias [mot de passe]svdhE
    Dfinit le nom de fichier contenant un certificat client ou +un alias renvoyant vers un certificat client spcifique une connexion. +Tous les SDK LDAP ne supportent pas les certificats clients par +connexion.
    LDAPTrustedGlobalCert type +chemin/nom-fichier [mot de passe]sE
    Dfinit le nom de fichier ou la base de donnes contenant +les Autorits de Certification de confiance globales ou les certificats +clients globaux
    LDAPTrustedMode typesvE
    Spcifie le mode (SSL ou TLS) utiliser lors de la +connexion un serveur LDAP.
    LDAPVerifyServerCert On|Off On sE
    Force la vrification du certificat du +serveur
    <Limit mthode [mthode] ... > ... + </Limit>dhC
    Limite les contrles d'accs que la section contient +certaines mthodes HTTP
    <LimitExcept mthode [mthode] ... > ... + </LimitExcept>dhC
    Applique les contrles d'accs toutes les mthodes HTTP, +sauf celles qui sont spcifies
    LimitInternalRecursion nombre [nombre] 10 svC
    Dtermine le nombre maximal de redirections internes et de +sous-requtes imbriques
    LimitRequestBody octets 0 svdhC
    limite la taille maximale du corps de la requte HTTP +envoye par le client
    LimitRequestFields nombre 100 svC
    Limite le nombre de champs d'en-tte autoriss dans une +requte HTTP
    LimitRequestFieldSize octets 8190 svC
    Ddinit la taille maximale autorise d'un en-tte de +requte HTTP
    LimitRequestLine octets 8190 svC
    Dfinit la taille maximale d'une ligne de requte +HTTP
    LimitXMLRequestBody octets 1000000 svdhC
    Dfinit la taille maximale du corps d'une requte au format +XML
    Listen [adresse IP:]numro port +[protocole]sM
    Les adresses IP et ports sur lesquels le serveur coute
    ListenBacklog backlogsM
    Longueur maximale de la liste d'attente des +connexions
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Rapport entre le nombre de coeurs de processeur activs et +le nombre de segments d'coute
    LoadFile nom-fichier [nom-fichier] ...svE
    Liaison du fichier objet ou de la bibliothque +spcifi
    LoadModule module nom-fichiersvE
    Liaison avec le serveur du fichier objet ou de la +bibliothque spcifi, et ajout de ce dernier la liste des modules +actifs
    <Location + chemin URL|URL> ... </Location>svC
    N'applique les directives contenues qu'aux URLs +spcifies
    <LocationMatch + regex> ... </LocationMatch>svC
    N'applique les directives contenues qu'aux URLs +correspondant une expression rationnelle
    LogFormat format|alias +[alias] "%h %l %u %t \"%r\" +svB
    Dcrit un format utilisable dans un fichier +journal
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel [module:]niveau + [module:niveau] ... + warn svdC
    Contrle la verbosit du journal des erreurs
    LogMessage message +[hook=hook] [expr=expression] +dX
    Enregistre des messages personnaliss dans le journal des +erreurs
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Branche une fonction fournisseur d'autorisation dans mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure le cache de code compil.
    LuaHookAccessChecker /chemin/vers/lua/script.lua hook_function_name [early|late]svdhX
    Fournit un point d'entre pour la phase access_checker du +traitement de la requte
    LuaHookAuthChecker /chemin/vers/lua/script.lua hook_function_name [early|late]svdhX
    Fournit un point d'entre pour la phase auth_checker du +traitement de la requte
    LuaHookCheckUserID /chemin/vers/lua/script.lua hook_function_name [early|late]svdhX
    Fournit un point d'entre pour la phase check_user_id du +traitement de la requte
    LuaHookFixups /chemin/vers/lua/script.lua hook_function_namesvdhX
    Fournit un point d'entre pour la phase de correction du +traitement de la requte
    LuaHookInsertFilter /chemin/vers/lua/script.lua hook_function_namesvdhX
    Fournit un point d'entre pour la phase insert_filter du +traitement de la requte
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Permet une insertion dans la phase de journalisation du +traitement d'une requte
    LuaHookMapToStorage /chemin/vers/lua/script.lua hook_function_namesvdhX
    Fournit un point d'entre pour la phase map_to_storage du +traitement de la requte
    LuaHookTranslateName /chemin/vers/lua/script.lua nom_fonction_hook [early|late]svX
    Fournit un point d'entre la phase du nom de +traduction du traitement de la requte
    LuaHookTypeChecker /chemin/vers/lua/script.lua hook_function_namesvdhX
    Fournit un point d'entre pour la phase type_checker du +traitement de la requte
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Contrle la manire dont les sections de configuration +parentes sont fusionnes dans les enfants
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Fournit une fonction Lua pour le filtrage en entre
    LuaMapHandler modele-uri /chemin/vers/lua/script.lua +[nom-fonction]svdhX
    Met en correspondance un chemin avec un gestionnaire lua
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Fournit une fonction Lua pour le filtrage de contenu en +sortie
    LuaPackageCPath /chemin/vers/include/?.soasvdhX
    Ajoute un rpertoire au package.cpath de lua
    LuaPackagePath /chemin/vers/include/?.luasvdhX
    Ajoute un rpertoire au package.path de lua
    LuaQuickHandler /path/to/script.lua hook_function_namesvdhX
    Fournit un point d'entre pour la gestion rapide du +traitement de la requte
    LuaRoot /chemin/vers/un/rpertoiresvdhX
    Spcifie le chemin de base pour la rsolution des chemins +relatifs dans les directives de mod_lua
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    Une valeur parmi once, request, conn, thread -- la valeur par dfaut est once
    +<Macro nom [par1 .. parN]> +... </Macro>svdB
    Dfinition d'une macro dans un fichier de configuration
    MaxConnectionsPerChild number 0 sM
    Limite le nombre de connexions qu'un processus enfant va +traiter au cours de son fonctionnement
    MaxKeepAliveRequests nombre 100 svC
    Nombre de requtes permises pour une connexion +persistante
    MaxMemFree KOctets 2048 sM
    Quantit maximale de mmoire que l'allocateur principal est +autoris conserver sans appeler free()
    MaxRangeOverlaps default | unlimited | none | nombre de + chevauchements 20 svdC
    Nombre de chevauchements de segments de donnes autoris + (par exemple 100-200,150-300) avant le renvoi de la + ressource complte
    MaxRangeReversals default | unlimited | none | nombre + d'inversions 20 svdC
    Nombre d'inversions d'ordre autoris dans la spcification des + segments de donnes (par exemple 100-200,50-70) avant le renvoi de la + ressource complte
    MaxRanges default | unlimited | none | nombre de segments 200 svdC
    Nombre de segments de donnes autoris avant le renvoi de +l'intgralit de la ressource
    MaxRequestWorkers nombresM
    Nombre maximum de connexions pouvant tre traites +simultanment
    MaxSpareServers nombre 10 sM
    Nombre maximum de processus serveurs enfants +inactifs
    MaxSpareThreads nombresM
    Nombre maximum de threads inactifs
    MaxThreads nombre 2048 sM
    Dfinit le nombre maximum de threads esclaves
    MemcacheConnTTL num[units] 15s svE
    Dure de conservation des connexions inactives
    MergeTrailers [on|off] off svC
    Dtermine si les donnes supplmentaires (trailers) sont +fusionnes avec les en-ttes
    MetaDir rpertoire .web svdhE
    Le nom du rpertoire o trouver les fichiers de +mtainformations dans le style du CERN
    MetaFiles on|off off svdhE
    Active le traitement des mtafichiers du CERN
    MetaSuffix suffixe .meta svdhE
    Suffixe du fichier contenant les mtainformations dans le +style du CERN
    MimeMagicFile chemin-fichiersvE
    Active la dtermination du type MIME en se basant sur le +contenu du fichier et en utilisant le fichier magique +spcifi
    MinSpareServers nombre 5 sM
    Nombre minimum de processus serveurs enfants +inactifs
    MinSpareThreads nombresM
    Nombre minimum de threads inactifs qui seront disponibles +pour pouvoir traiter les pics de requtes
    MMapFile chemin fichier [chemin fichier] ...sX
    Charge au dmarrage une liste de fichiers en mmoire
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Standard de modem simuler
    ModMimeUsePathInfo On|Off Off dB
    Indique mod_mime de traiter les lments +de path_info en tant que parties du nom de +fichier
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] NegotiatedOnly svdhB
    Les types de fichiers qui seront inclus lors d'une +recherche de correspondance de fichier avec les vues multiples +(MultiViews)
    Mutex mcanisme [default|nom-mutex] ... [OmitPID] default sC
    Dfinit les mcanismes de mutex et le repertoire du fichier +verrou pour tous les mutex ou seulement les mutex spcifis
    NameVirtualHost adresse[:port]sC
    OBSOLETE : Dfinit une adresse IP pour les serveurs virtuels base de +nom
    NoProxy domaine [domaine] ...svE
    Serveurs, domaines ou rseaux auquels on se connectera +directement
    NWSSLTrustedCerts nom-fichier +[nom-fichier] ...sB
    Liste de certificats clients supplmentaires
    NWSSLUpgradeable [adresse-IP:]num-portsB
    Permet de promouvoir une connexion non SSL au statut de +connexion SSL la demande
    Options + [+|-]option [[+|-]option] ... FollowSymlinks svdhC
    Dfinit les fonctionnalits disponibles pour un rpertoire +particulier
    Order ordre Deny,Allow dhE
    Dfinit le statut d'accs par dfaut et l'ordre dans lequel +les directives Allow et +Deny sont values.
    OutputSed commande-seddh
    Commande sed pour le filtrage des contenus de type +rponse
    PassEnv var-env [var-env] +...svdhB
    Transmet des variables d'environnement depuis le +shell
    PidFile nom fichier logs/httpd.pid sM
    Ficher dans lequel le serveur enregistre l'identificateur +de processus du dmon
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Fait un compromis entre d'une part l'efficacit et la +vitesse de traitement et d'autre part la scurit l'encontre des codes +malicieux supportant les privilges.
    Protocol protocolesvC
    Protocole pour une socket d'coute
    ProtocolEcho On|Off Off svX
    Active ou dsactive le serveur d'cho
    Protocols protocole ... http/1.1 svC
    Protocoles disponibles pour un serveur virtuel ou non
    ProtocolsHonorOrder On|Off On svC
    Dtermine qui du client ou du serveur dtermine l'ordre + des protocoles au cours de la ngociation de la connexion
    <Proxy url-avec-jokers> ...</Proxy>svE
    Conteneur de directives s'appliquant des ressources +mandates
    ProxyAddHeaders Off|On On svdE
    Ajoute des informations propos du mandataire aux +en-ttes X-Forwarded-*
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Dtermine la manire de traiter les lignes d'en-tte +incorrectes d'une rponse
    ProxyBlock *|terme|serveur|domaine +[terme|serveur|domaine] ...svE
    Termes, serveurs ou domaines bloqus par le +mandataire
    ProxyDomain DomainesvE
    Nom de domaine par dfaut pour les requtes +mandates
    ProxyErrorOverride On|Off Off svdE
    Outrepasser les pages d'erreur pour les contenus +mandats
    ProxyExpressDBMFile <chemin>svE
    Chemin du fichier DBM.
    ProxyExpressDBMFile <type>svE
    Type de fichier DBM.
    ProxyExpressEnable [on|off]svE
    Active la fonctionnalit du module.
    ProxyFtpDirCharset jeu-caractres ISO-8859-1 svdE
    Dfinit le jeu de caractres des listings FTP +mandats
    ProxyFtpEscapeWildcards [on|off]svdE
    Les caractres gnriques dans les noms de fichiers +doivent-ils tre chapps lorsqu'ils sont envoys au serveur FTP ?
    ProxyFtpListOnWildcard [on|off]svdE
    Les caractres gnriques dans les noms de fichiers +demands doivent-ils dclencher l'affichage d'un listing ?
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize nb-octetssvdB
    Dfinit l'incrment de la taille du tampon, ainsi que sa +taille initiale, pour la mise en +tampon des scripts en ligne et des feuilles de style.
    ProxyHTMLCharsetOut jeu-de-caractres | *svdB
    Spcifie un jeu de caractres pour la sortie de +mod_proxy_html.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OU +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Dfinit une dclaration de type de document HTML ou XHTML.
    ProxyHTMLEnable On|Off Off svdB
    Permet d'activer/dsactiver le filtre proxy_html.
    ProxyHTMLEvents attribut [attribut ...]svdB
    Spcifie les attributs traiter comme des vnements de +type scripting.
    ProxyHTMLExtended On|Off Off svdB
    Dtermine si l'on doit corriger les liens dans les scripts +en ligne, les feuilles de style et les vnements de type scripting.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Corrige les erreurs HTML simples.
    ProxyHTMLInterp On|Off Off svdB
    Active la rinterprtation des rgles +ProxyHTMLURLMap pour chaque requte.
    ProxyHTMLLinks lment attribut [attribut2 ...]svdB
    Spcifie les lments HTML dont les attributs d'URL doivent +tre rcrits.
    ProxyHTMLMeta On|Off Off svdB
    Active ou dsactive une printerprtation supplmentaire +des mtadonnes dans les sections HTML <head>.
    ProxyHTMLStripComments On|Off Off svdB
    Dtermine si les commentaires HTML doivent tre supprims.
    ProxyHTMLURLMap modle-source modle-cible [drapeaux] [cond]svdB
    Dfinit une rgle de rcriture des liens HTML
    ProxyIOBufferSize octets 8192 svE
    Dtermine la taille du tampon interne de transfert de +donnes
    <ProxyMatch regex> ...</ProxyMatch>svE
    Conteneur de directives s'appliquant des ressources +mandates correspondant une expression rationnelle
    ProxyMaxForwards nombre -1 svE
    Nombre maximum de mandataires travers lesquelles une +requte peut tre redirige
    ProxyPass [chemin] !|url [cl=valeur + [cl=valeur ...]] [nocanon] [interpolate] [noquery]svdE
    Rfrencer des serveurs distants depuis +l'espace d'URLs du serveur local
    ProxyPassInherit On|Off On svE
    Hritage des directives ProxyPass dfinies au niveau du +serveur principal
    ProxyPassInterpolateEnv On|Off Off svdE
    Active l'interpolation des variables d'environnement dans +les configurations de mandataires inverses
    ProxyPassMatch [regex] !|url +[cl=valeur + [cl=valeur ...]]svdE
    Fait correspondre des serveurs distants dans l'espace d'URL +du serveur local en utilisant des expressions rationnelles
    ProxyPassReverse [chemin] url +[interpolate]svdE
    Ajuste l'URL dans les en-ttes de la rponse HTTP envoye +par un serveur mandat en inverse
    ProxyPassReverseCookieDomain domaine-interne +domaine-public [interpolate]svdE
    Ajuste la chane correspondant au domaine dans les en-ttes +Set-Cookie en provenance d'un serveur mandat
    ProxyPassReverseCookiePath chemin-interne +chemin-public [interpolate]svdE
    Ajuste la chane correspondant au chemin dans les en-ttes +Set-Cookie en provenance d'un serveur mandat
    ProxyPreserveHost On|Off Off svdE
    Utilise l'en-tte de requte entrante Host pour la requte +du mandataire
    ProxyReceiveBufferSize octets 0 svE
    Taille du tampon rseau pour les connexions mandates HTTP +et FTP
    ProxyRemote comparaison serveur-distantsvE
    Mandataire distant utiliser pour traiter certaines +requtes
    ProxyRemoteMatch regex serveur-distantsvE
    Le mandataire distant utiliser pour traiter les requtes +correspondant une expression rationnelle
    ProxyRequests On|Off Off svE
    Active la fonctionnalit (standard) de mandataire +direct
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Active ou dsactive les rponses de redirection interne en +provenance du serveur cible.
    ProxySCGISendfile On|Off|nom-en-tte Off svdE
    Active l'valuation du pseudo en-tte de rponse +X-Sendfile
    ProxySet url cl=valeur [cl=valeur ...]dE
    Dfinit diffrents paramtres relatifs la rpartition de +charge des mandataires et aux membres des groupes de rpartition de +charge
    ProxySourceAddress adressesvE
    Dfinit l'adresse IP locale pour les connexions mandates +sortantes
    ProxyStatus Off|On|Full Off svE
    Affiche l'tat du rpartiteur de charge du mandataire dans +mod_status
    ProxyTimeout secondessvE
    Dlai d'attente rseau pour les requtes +mandates
    ProxyVia On|Off|Full|Block Off svE
    Information fournie dans l'en-tte de rponse HTTP +Via pour les requtes mandates
    QualifyRedirectURL ON|OFF OFF svdC
    Vrifie si la variable d'environnement REDIRECT_URL est +pleinement qualifie
    ReadmeName nom-fichiersvdhB
    Nom du fichier dont le contenu sera insr la fin de +l'index
    ReceiveBufferSize octets 0 sM
    Taille du tampon TCP en entre
    Redirect [tat] [URL-path] +URLsvdhB
    Envoie une redirection externe demandant au client +d'effectuer une autre requte avec une URL diffrente
    RedirectMatch [tat] regex +URLsvdhB
    Envoie une redirection externe faisant appel aux +expressions rationnelles pour la mise en correspondance de l'URL +courante
    RedirectPermanent chemin URL URLsvdhB
    Envoie une redirection externe permanente demandant au +client d'effectuer une nouvelle requte avec une URL +diffrente
    RedirectTemp chemin URL URLsvdhB
    Envoie une redirection externe temporaire demandant au +client d'effectuer une nouvelle requte avec une URL +diffrente
    ReflectorHeader en-tte-entre [en-tte-sortie]svdhB
    Rflchit un en-tte d'entre dans les en-ttes de sortie
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader en-ttesvB
    Dfinit le champ d'en-tte qui contiendra les adresses IP +du client
    RemoteIPInternalProxy +ip-mandataire|ip-mandataire/sous-rseau|nom-hte ...svB
    Dclare les adresses IP intranet clients comme dignes de +confiance pour prsenter la valeur RemoteIPHeader
    RemoteIPInternalProxyList nom-fichiersvB
    Dclare les adresses IP intranet clients comme dignes de +confiance pour prsenter la valeur RemoteIPHeader
    RemoteIPProxiesHeader Nom_en-ttesvB
    Dclare le champ d'en-tte qui contiendra toutes les +adresses IP intermdiaires
    RemoteIPTrustedProxy +ip-mandataire|ip-mandataire/sous-rseau|nom-hte ...svB
    Dclare les adresses IP clientes de l'intranet dignes de +confiance pour prsenter la valeur RemoteIPHeader
    RemoteIPTrustedProxyList nom-fichiersvB
    Dclare les adresses IP intranet clients comme dignes de +confiance pour prsenter la valeur RemoteIPHeader
    RemoveCharset extension [extension] +...vdhB
    Supprime toute association de jeu de caractres pour un +ensemble d'extensions de noms de fichiers
    RemoveEncoding extension [extension] +...vdhB
    Supprime toute association de codage de contenu pour un +ensemble d'extensions de noms de fichiers
    RemoveHandler extension [extension] +...vdhB
    Supprime toute association de gestionnaire un ensemble +d'extensions de noms de fichiers
    RemoveInputFilter extension [extension] +...vdhB
    Supprime toute association de filtre en entre un +ensemble d'extensions de noms de fichiers
    RemoveLanguage extension [extension] +...vdhB
    Supprime toute association de langue un ensemble +d'extensions de noms de fichiers
    RemoveOutputFilter extension [extension] +...vdhB
    Supprime toute association de filtre en sortie un +ensemble d'extensions de noms de fichiers
    RemoveType extension [extension] +...vdhB
    Supprime toute association de type de contenu un ensemble +d'extensions de noms de fichiers
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +en-tte [[expr=]valeur +[remplacement] +[early|env=[!]variable|expr=expression]] +svdhE
    Configure les en-ttes d'une requte HTTP
    RequestReadTimeout +[header=dlai[-dlai-maxi][,MinRate=taux-mini] +[body=dlai[-dlai-maxi][,MinRate=taux-mini] +svE
    Dfinit des dlais maximums pour la rception des en-ttes +et corps des requtes en provenance du client. +
    Require [not] nom-entit [nom-entit] +...dhB
    Vrifie si un utilisateur authentifi a une +autorisation d'accs accorde par un fournisseur +d'autorisation.
    <RequireAll> ... </RequireAll>dhB
    Regroupe plusieurs directives d'autorisation dont aucune ne +doit chouer et dont au moins une doit retourner un rsultat positif +pour que la directive globale retourne elle-mme un rsultat +positif.
    <RequireAny> ... </RequireAny>dhB
    Regroupe des directives d'autorisation dont au moins une +doit retourner un rsultat positif pour que la directive globale +retourne elle-mme un rsultat positif.
    <RequireNone> ... </RequireNone>dhB
    Regroupe des directives d'autorisation dont aucune ne doit +retourner un rsultat positif pour que la directive globale n'choue +pas.
    RewriteBase chemin_URLdhE
    Dfinit l'URL de base pour les rcritures au niveau +rpertoire
    RewriteCond + chane_de_test expression_de_comparaison [drapeaux]svdhE
    Dfinit une condition qui devra tre satisfaite pour que +la rcriture soit effectue +
    RewriteEngine on|off off svdhE
    Active ou dsactive l'excution du +moteur de rcriture
    RewriteMap MapName MapType:MapSource +svE
    Dfinit une fonction de mise en correspondance pour la +recherche de mots-cls
    RewriteOptions OptionssvdhE
    Configure certaines options spciales +pour le moteur de rcriture
    RewriteRule + Modle Substitution [drapeaux]svdhE
    Dfinit les rgles pour le moteur de rcriture
    RLimitCPU secondes|max [secondes|max]svdhC
    Limite le temps CPU allou aux processus initis par les +processus enfants d'Apache httpd
    RLimitMEM octets|max [octets|max]svdhC
    Limite la mmoire alloue aux processus initis par les +processus enfants d'Apache httpd
    RLimitNPROC nombre|max [nombre|max]svdhC
    Limite le nombre de processus qui peuvent tre initis par +les processus initis par les processus enfants d'Apache httpd
    Satisfy Any|All All dhE
    Interaction entre le contrle d'accs en fonction de l'hte +et l'authentification utilisateur
    ScoreBoardFile chemin fichier logs/apache_runtime +sM
    Chemin du fichier o sont stockes les donnes concernant +la coordination des processus enfants
    Script mthode script cgisvdB
    Active un script CGI dans le cas d'une mthode de requte +particulire.
    ScriptAlias [chemin URL] +chemin fichier|chemin rpertoiresvdB
    Fait correspondre une URL une zone du systme de fichiers +et dsigne la cible comme script CGI
    ScriptAliasMatch regex +chemin fichier|chemin rpertoiresvB
    Fait correspondre une URL une zone du systme de fichiers +en faisant appel aux expressions rationnelles et en dsignant la cible +comme un script CGI
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Permet de localiser l'interprteur des scripts +CGI
    ScriptLog chemin fichiersvB
    Chemin du fichier journal des erreurs du script +CGI
    ScriptLogBuffer octets 1024 svB
    Taille maximale des requtes PUT ou POST qui seront +enregistres dans le journal du script
    ScriptLogLength octets 10385760 svB
    Taille maximale du fichier journal des scripts +CGI
    ScriptSock chemin fichier cgisock sB
    Le prfixe du nom de fichier du socket utiliser pour +communiquer avec le dmon CGI
    SecureListen [adresse-IP:]num-port +nom-certificat [MUTUAL]sB
    Active le chiffrement SSL pour le port +spcifi
    SeeRequestTail On|Off Off sC
    Dtermine si mod_status affiche les 63 premiers caractres +d'une requte ou les 63 derniers, en supposant que la requte +elle-mme possde plus de 63 caractres.
    SendBufferSize octets 0 sM
    Taille du tampon TCP en sortie
    ServerAdmin adresse lectronique|URLsvC
    L'adresse lectronique que le serveur inclut dans les +messages d'erreur envoys au client
    ServerAlias nom serveur [nom serveur] +...vC
    Autres noms d'un serveur utilisables pour atteindre des +serveurs virtuels base de nom
    ServerLimit nombresM
    Limite suprieure de la dfinition du nombre de +processus
    ServerName +[protocole://]nom-de-domaine|adresse-ip[:port]svC
    Nom d'hte et port que le serveur utilise pour +s'authentifier lui-mme
    ServerPath chemin d'URLvC
    Nom de chemin d'URL hrit pour un serveur virtuel base +de nom accd par un navigateur incompatible
    ServerRoot chemin de rpertoire /usr/local/apache sC
    Racine du rpertoire d'installation du +serveur
    ServerSignature On|Off|EMail Off svdhC
    Dfinit un pied de page pour les documents gnrs par le +serveur
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configure l'en-tte Server de la rponse +HTTP
    Session On|Off Off svdhE
    Ouvre une session pour le contexte courant
    SessionCookieName nom attributssvdhE
    Nom et attributs du cookie RFC2109 dans lequel la session +est stocke
    SessionCookieName2 nom attributssvdhE
    Nom et attributs pour le cookie RFC2965 dans lequel est +stocke la session
    SessionCookieRemove On|Off Off svdhE
    Dtermine si les cookies de session doivent tre supprims +des en-ttes HTTP entrants
    SessionCryptoCipher algorithmesvdhX
    L'algorithme utiliser pour le chiffrement de la session
    SessionCryptoDriver nom [param[=valeur]]sX
    Le pilote de chiffrement utiliser pour chiffrer les +sessions
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    La cl utilise pour chiffrer la session
    SessionCryptoPassphraseFile nom-fichiersvdX
    Le fichier contenant les cls utilises pour chiffrer la +session
    SessionDBDCookieName nom attributssvdhE
    Nom et attributs du cookie RFC2109 qui contient +l'identifiant de session
    SessionDBDCookieName2 nom attributssvdhE
    Nom et attributs du cookie RFC2965 qui contient +l'identifiant de session
    SessionDBDCookieRemove On|Off On svdhE
    Dtermine si les cookies de session doivent tre supprims +des en-ttes HTTP entrants
    SessionDBDDeleteLabel tiquette deletesession svdhE
    La requte SQL utiliser pour supprimer des sessions de la +base de donnes
    SessionDBDInsertLabel tiquette insertsession svdhE
    La requte SQL utiliser pour insrer des sessions dans la +base de donnes
    SessionDBDPerUser On|Off Off svdhE
    Active une session propre un utilisateur
    SessionDBDSelectLabel tiquette selectsession svdhE
    La requte SQL utiliser pour slectionner des sessions +dans la base de donnes
    SessionDBDUpdateLabel tiquette updatesession svdhE
    La requte SQL utiliser pour mettre jour des sessions +prexistantes dans la base de donnes
    SessionEnv On|Off Off svdhE
    Dfinit si le contenu de la session doit tre enregistr +dans la variable d'environnement HTTP_SESSION
    SessionExclude cheminsvdhE
    Dfinit les prfixes d'URLs pour lesquels une session sera +ignore
    SessionHeader en-ttesvdhE
    Importation des mises jour de session depuis l'en-tte de +rponse HTTP spcifi
    SessionInclude cheminsvdhE
    Dfinit les prfixes d'URL pour lesquels une session est +valide
    SessionMaxAge dure de vie maximale 0 svdhE
    Dfinit une dure de vie maximale pour la session en +secondes
    SetEnv var-env [valeur]svdhB
    Dfinit des variables d'environnement
    SetEnvIf attribut + regex [!]env-variable[=valeur] + [[!]env-variable[=valeur]] ...svdhB
    Dfinit des variables d'environnement en fonction des +attributs de la requte
    SetEnvIfExpr expr + [!]env-variable[=valeur] + [[!]env-variable[=valeur]] ...svdhB
    Dfinit des variables d'environnement en fonction d'une expression ap_expr
    SetEnvIfNoCase attribut regex + [!]env-variable[=valeur] + [[!]env-variable[=valeur]] ...svdhB
    Dfinit des variables d'environnement en fonction des +attributs de la requte sans tenir compte de la casse
    SetHandler handler-name|none|expressionsvdhC
    Force le traitement des fichiers spcifis par un +gestionnaire particulier
    SetInputFilter filtre[;filtre...]svdhC
    Dfinit les filtres par lesquels vont passer les requtes +client et les donnes POST
    SetOutputFilter filtre[;filtre...]svdhC
    Dfinit les filtres par lesquels vont passer les rponses +du serveur
    SSIEndTag tag "-->" svB
    Chane qui termine l'lment include
    SSIErrorMsg message "[an error occurred +svdhB
    Message d'erreur affich lorsqu'une erreur SSI +survient
    SSIETag on|off off dhB
    Dfinit si des en-ttes ETags sont gnrs par le serveur.
    SSILastModified on|off off dhB
    Dfinit si des en-ttes Last-Modified sont +gnrs par le serveur.
    SSILegacyExprParser on|off off dhB
    Active le mode de compatibilit pour les expressions +conditionnelles.
    SSIStartTag tag "<!--#" svB
    Chane qui marque le dbut d'un lment +include
    SSITimeFormat chane de formatage "%A, %d-%b-%Y %H:%M +svdhB
    Configuration du format d'affichage des dates
    SSIUndefinedEcho chane "(none)" svdhB
    Chane afficher lorsqu'on tente d'extraire le contenu +d'une variable non dfinie
    SSLCACertificateFile chemin-fichiersvE
    Fichier contenant une concatnation des certificats de CA +cods en PEM pour l'authentification des clients
    SSLCACertificatePath chemin-rpertoiresvE
    Rpertoire des certificats de CA cods en PEM pour +l'authentification des clients
    SSLCADNRequestFile chemin-fichiersvE
    Fichier contenant la concatnation des certificats de CA +cods en PEM pour la dfinition de noms de CA acceptables
    SSLCADNRequestPath chemin-rpertoiresvE
    Rpertoire contenant des fichiers de certificats de CA +cods en PEM pour la dfinition de noms de CA acceptables
    SSLCARevocationCheck chain|leaf|none flags none svE
    Active la vrification des rvocations base sur les CRL
    SSLCARevocationFile chemin-fichiersvE
    Fichier contenant la concatnation des CRLs des CA cods en +PEM pour l'authentification des clients
    SSLCARevocationPath chemin-rpertoiresvE
    Rpertoire des CRLs de CA cods en PEM pour +l'authentification des clients
    SSLCertificateChainFile chemin-fichiersvE
    Fichier contenant les certificats de CA du serveur cods en +PEM
    SSLCertificateFile chemin-fichiersvE
    Fichier de donnes contenant le certificat X.509 du serveur cod en +PEM
    SSLCertificateKeyFile chemin-fichiersvE
    Fichier contenant la cl prive du serveur code en +PEM
    SSLCipherSuite algorithmes DEFAULT (dpend de +svdhE
    Algorithmes de chiffrement disponibles pour la ngociation +au cours de l'initialisation de la connexion SSL
    SSLCompression on|off off svE
    Permet d'activer la compression au niveau SSL
    SSLCryptoDevice moteur builtin sE
    Active l'utilisation d'un acclrateur matriel de +chiffrement
    SSLEngine on|off|optional off svE
    Interrupteur marche/arrt du moteur SSL
    SSLFIPS on|off off sE
    Coimmutateur du mode SSL FIPS
    SSLHonorCipherOrder on|off off svE
    Option permettant de classer les algorithmes de chiffrement +du serveur par ordre de prfrence
    SSLInsecureRenegotiation on|off off svE
    Option permettant d'activer le support de la rengociation +non scurise
    SSLOCSDefaultResponder urisvE
    Dfinit l'URI du rpondeur par dfaut pour la validation +OCSP
    SSLOCSPEnable on|off off svE
    Active la validation OCSP de la chane de certificats du +client
    SSLOCSPOverrideResponder on|off off svE
    Force l'utilisation de l'URI du rpondeur par dfaut pour +la validation OCSP
    SSLOCSPProxyURL urlsvE
    Adresse de mandataire utiliser pour les requtes OCSP
    SSLOCSPResponderTimeout secondes 10 svE
    Dlai d'attente pour les requtes OCSP
    SSLOCSPResponseMaxAge secondes -1 svE
    Age maximum autoris pour les rponses OCSP
    SSLOCSPResponseTimeSkew secondes 300 svE
    Drive temporelle maximale autorise pour la validation des +rponses OCSP
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd commande valeursvE
    Configuration des paramtres d'OpenSSL via son API SSL_CONF
    SSLOptions [+|-]option ...svdhE
    Configure diffrentes options d'excution du moteur SSL
    SSLPassPhraseDialog type builtin sE
    Mthode utilise pour entrer le mot de passe pour les cls +prives chiffres
    SSLProtocol [+|-]protocole ... all -SSLv3 (jusqu' +svE
    Indique les versions du protocole SSL/TLS +disponibles
    SSLProxyCACertificateFile file-pathsvE
    Fichier contenant la concatnation des certificats de CA +cods en PEM pour l'authentification des serveurs distants
    SSLProxyCACertificatePath chemin-rpertoiresvE
    Rpertoire des certificats de CA cods en PEM pour +l'authentification des serveurs distants
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Active la vrification des rvocations base sur les CRLs +pour l'authentification du serveur distant
    SSLProxyCARevocationFile chemin-fichiersvE
    Fichier contenant la concatnation des CRLs de CA cods en +PEM pour l'authentification des serveurs distants
    SSLProxyCARevocationPath chemin-rpertoiresvE
    Rpertoire des CRLs de CA cods en PEM pour +l'authentification des serveurs distants
    SSLProxyCheckPeerCN on|off on svE
    Configuration de la vrification du champ CN du certificat +du serveur distant +
    SSLProxyCheckPeerExpire on|off on svE
    Configuration de la vrification de l'expiration du +certificat du serveur distant +
    SSLProxyCheckPeerName on|off on svE
    Configure la vrification du nom d'hte dans les +certificats serveur distants +
    SSLProxyCipherSuite algorithmes ALL:!ADH:RC4+RSA:+H +svdhE
    Algorithmes de chiffrement disponibles pour la ngociation +lors de l'initialisation d'une connexion SSL de mandataire
    SSLProxyEngine on|off off svE
    Interrupteur marche/arrt du moteur de mandataire +SSL
    SSLProxyMachineCertificateChainFile nom-fichiersE
    Fichier de certificats de CA encods PEM concatns permettant au +mandataire de choisir un certificat
    SSLProxyMachineCertificateFile chemin-fichiersE
    Fichier contenant la concatnation des cls et certificats +clients cods en PEM que le mandataire doit utiliser
    SSLProxyMachineCertificatePath chemin-rpertoiresE
    Rpertoire des cls et certificats clients cods en PEM que +le mandataire doit utiliser
    SSLProxyProtocol [+|-]protocole ... all -SSLv3 (jusqu' +svE
    Dfinit les protocoles SSL disponibles pour la fonction de +mandataire
    SSLProxyVerify niveau none svE
    Niveau de vrification du certificat du serveur +distant
    SSLProxyVerifyDepth niveau 1 svE
    Niveau de profondeur maximum dans les certificats de CA +lors de la vrification du certificat du serveur distant
    SSLRandomSeed contexte source +[nombre]sE
    Source de dclenchement du Gnrateur de Nombres +Pseudo-Alatoires (PRNG)
    SSLRenegBufferSize taille 131072 dhE
    Dfinit la taille du tampon de rengociation +SSL
    SSLRequire expressiondhE
    N'autorise l'accs que lorsqu'une expression boolenne +complexe et arbitraire est vraie
    SSLRequireSSLdhE
    Interdit l'accs lorsque la requte HTTP n'utilise pas +SSL
    SSLSessionCache type none sE
    Type du cache de session SSL global et +inter-processus
    SSLSessionCacheTimeout secondes 300 svE
    Nombre de secondes avant l'expiration d'une session SSL +dans le cache de sessions
    SSLSessionTicketKeyFile chemin-fichiersvE
    Cl de chiffrement/dchiffrement permanente pour les +tickets de session TLS
    SSLSessionTickets on|off on svE
    Active ou dsactive les tickets de session TLS
    SSLSRPUnknownUserSeed secret-stringsvE
    Source d'ala pour utilisateur SRP inconnu
    SSLSRPVerifierFile file-pathsvE
    Chemin du fichier de vrification SRP
    SSLStaplingCache typesE
    Configuration du cache pour l'agrafage OCSP
    SSLStaplingErrorCacheTimeout secondes 600 svE
    Dure de vie des rponses invalides dans le cache pour +agrafage OCSP
    SSLStaplingFakeTryLater on|off on svE
    Gnre une rponse "tryLater" pour les requtes OCSP choues
    SSLStaplingForceURL urisvE
    Remplace l'URI du serveur OCSP spcifi dans l'extension +AIA du certificat
    SSLStaplingResponderTimeout secondes 10 svE
    Temps d'attente maximum pour les requtes vers les serveurs +OCSP
    SSLStaplingResponseMaxAge secondes -1 svE
    Age maximum autoris des rponses OCSP incluses dans la +ngociation TLS
    SSLStaplingResponseTimeSkew secondes 300 svE
    Dure de vie maximale autorise des rponses OCSP incluses dans la +ngociation TLS
    SSLStaplingReturnResponderErrors on|off on svE
    Transmet au client les erreurs survenues lors des requtes +OCSP
    SSLStaplingStandardCacheTimeout secondes 3600 svE
    Dure de vie des rponses OCSP dans le cache
    SSLStrictSNIVHostCheck on|off off svE
    Contrle de l'accs des clients non-SNI un serveur virtuel +base de nom. +
    SSLUserName nom-varsdhE
    Nom de la variable servant dterminer le nom de +l'utilisateur
    SSLUseStapling on|off off svE
    Active l'ajout des rponses OCSP la ngociation TLS
    SSLVerifyClient niveau none svdhE
    Niveau de vrification du certificat client
    SSLVerifyDepth nombre 1 svdhE
    Profondeur maximale des certificats de CA pour la +vrification des certificats clients
    StartServers nombresM
    Nombre de processus enfants du serveur crs au +dmarrage
    StartThreads nombresM
    Nombre de threads crs au dmarrage
    Substitute s/modle/substitution/[infq]dhE
    Modle de substition dans le contenu de la +rponse
    SubstituteInheritBefore on|off on dhE
    Modifie l'ordre de fusion des modles hrits
    SubstituteMaxLineLength octets(b|B|k|K|m|M|g|G) 1m dhE
    Dfinit la longueur de ligne maximale
    Suexec On|OffsB
    Active ou dsactive la fonctionnalit suEXEC
    SuexecUserGroup Utilisateur GroupesvE
    L'utilisateur et le groupe sous lesquels les programmes CGI +doivent s'excuter
    ThreadLimit nombresM
    Le nombre de threads maximum que l'on peut dfinir par +processus enfant
    ThreadsPerChild nombresM
    Nombre de threads crs par chaque processus +enfant
    ThreadStackSize taillesM
    La taille en octets de la pile qu'utilisent les threads qui +traitent les connexions clients
    TimeOut secondes 60 svC
    Temps pendant lequel le serveur va attendre certains +vnements avant de considrer qu'une requte a chou
    TraceEnable [on|off|extended] on svC
    Dtermine le comportement des requtes +TRACE
    TransferLog fichier|pipesvB
    Spcifie l'emplacement d'un fichier journal
    TypesConfig chemin-fichier conf/mime.types sB
    Le chemin du fichier mime.types
    UnDefine nom-variablesC
    Invalide la dfinition d'une variable
    UndefMacro nomsvdB
    Supprime une macro
    UnsetEnv var-env [var-env] +...svdhB
    Supprime des variables de l'environnement
    Use nom [valeur1 ... valeurN] +svdB
    Utilisation d'une macro
    UseCanonicalName On|Off|DNS Off svdC
    Dfinit la manire dont le serveur dtermine son propre nom +et son port
    UseCanonicalPhysicalPort On|Off Off svdC
    Dfinit la manire dont le serveur +dtermine son propre port
    User utilisateur unix #-1 sB
    L'utilisateur sous lequel le serveur va traiter les +requtes
    UserDir nom-rpertoire [nom-rpertoire] ... +svB
    Chemin des rpertoires propres un +utilisateur
    VHostCGIMode On|Off|Secure On vX
    Dtermine si le serveur virtuel peut excuter des +sous-processus, et dfinit les privilges disponibles pour ces +dernier.
    VHostPrivs [+-]?nom-privilge [[+-]?nom-privilge] ...vX
    Assigne des privilges au choix aux sous-processus crs +par un serveur virtuel.
    VHostGroup identifiant-groupe-unixvX
    Dfinit l'identifiant du groupe sous lequel s'excute un +serveur virtuel.
    VHostPrivs [+-]?nom-privilge [[+-]?nom-privilge] ...vX
    Assigne des privilges un serveur virtuel.
    VHostSecure On|Off On vX
    Dtermine si le serveur s'excute avec une scurit avance +pour les serveurs virtuels.
    VHostUser identifiant-utilisateur-unixvX
    Dfinit l'identifiant utilisateur sous lequel s'excute un +serveur virtuel.
    VirtualDocumentRoot rpertoire-interpol|none none svE
    Permet une configuration dynamique de la racine des +documents d'un serveur virtuel donn
    VirtualDocumentRootIP rpertoire-interpol|none none svE
    Configuration dynamique de la racine des documents pour un +serveur virtuel donn
    <VirtualHost + adresse IP[:port] [adresse + IP[:port]] ...> ... + </VirtualHost>sC
    Contient des directives qui ne s'appliquent qu' un nom +d'hte spcifique ou une adresse IP
    VirtualScriptAlias rpertoire-interpol|none none svE
    Configuration dynamique du rpertoire des scripts CGI pour +un serveur virtuel donn
    VirtualScriptAliasIP rpertoire-interpol|none none svE
    Configuration dynamique du rpertoire des scripts CGI pour +un serveur virtuel donn
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Interprte les directives SSI dans les fichiers dont le bit +d'excution est positionn
    xml2EncAlias jeu-de-caractres alias [alias ...]sB
    Dfinit des alias pour les valeurs d'encodage
    xml2EncDefault nomsvdhB
    Dfinit un encodage par dfaut utiliser lorsqu'aucune +information ne peut tre automatiquement dtecte
    xml2StartParse lment [lment ...]svdhB
    Indique l'interprteur partir de quelle balise il doit +commencer son traitement.
    +
    +

    Langues Disponibles:  de  | + en  | + es  | + fr  | + ja  | + ko  | + tr  | + zh-cn 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.ja.utf8 b/docs/manual/mod/quickreference.html.ja.utf8 index 4cab871cd3f..789ec6b357a 100644 --- a/docs/manual/mod/quickreference.html.ja.utf8 +++ b/docs/manual/mod/quickreference.html.ja.utf8 @@ -1,36 +1,39 @@ - -ディレクティブ クイックリファレンス - Apache HTTP サーバ +ディレクティブ クイックリファレンス - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    ディレクティブ クイックリファレンス

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。

    ディレクティブ クイックリファレンスでは、各 Apache 設定ディレクティブの 使用方法、デフォルト値、ステータスとコンテキストを示しています。 @@ -40,15 +43,15 @@

    第 1 列目はディレクティブの名前と使用方法です。 第 2 列目は (もしあれば) デフォルト値となっています。 - デフォルト値が長すぎて表示しきれない場合は、最初の文字列の後ろに - 「 + 」が続きます。

    + デフォルト値が長すぎて表示しきれない場合は、途中まで表示した上で、、 + 「 + 」で続きがあることを示しています。

    第 3, 4 列は、下の表の注釈に従って、 ディレクティブの使用できるコンテキストと、 ディレクティブのステータスが示されています。

    - + - + @@ -354,7 +359,7 @@ - + @@ -468,7 +473,7 @@ - + @@ -554,7 +559,7 @@ - @@ -584,7 +589,28 @@

    Available Languages:  en  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/ebcdic.html.ko.euc-kr b/docs/manual/platform/ebcdic.html.ko.euc-kr index 55d304402f0..0075616fdab 100644 --- a/docs/manual/platform/ebcdic.html.ko.euc-kr +++ b/docs/manual/platform/ebcdic.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ EBCDIC - Apache HTTP Server +ġ EBCDIC - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ EBCDIC

    :  en  |  ko 

    @@ -38,7 +43,7 @@
  • 忡 ؼ
  • ġ
  • ڰ
  • -
    +

    top

    ġ EBCDIC

    @@ -523,7 +528,7 @@
    - @@ -553,7 +558,28 @@

    :  en  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/ebcdic.xml b/docs/manual/platform/ebcdic.xml index 7a355fb063d..59024a0dfe6 100644 --- a/docs/manual/platform/ebcdic.xml +++ b/docs/manual/platform/ebcdic.xml @@ -327,7 +327,7 @@ - + @@ -351,7 +351,7 @@ - + @@ -465,7 +465,7 @@ - + @@ -551,7 +551,8 @@ - diff --git a/docs/manual/platform/ebcdic.xml.ko b/docs/manual/platform/ebcdic.xml.ko index 1c59685551b..77253349cd3 100644 --- a/docs/manual/platform/ebcdic.xml.ko +++ b/docs/manual/platform/ebcdic.xml.ko @@ -1,7 +1,7 @@ - + -Platform Specific Notes - Apache HTTP Server +Platform Specific Notes - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Platform Specific Notes

    +Apache > HTTP Server > Documentation > Version 2.4

    Platform Specific Notes

    Available Languages:  en  | + fr  |  ko  |  zh-cn 

    top
    @@ -35,7 +42,7 @@
    Using Apache
    -

    This document explains how to install, configure and run Apache 2.0 +

    This document explains how to install, configure and run Apache 2.4 under Microsoft Windows.

    See: Using Apache with Microsoft Windows

    @@ -54,6 +61,22 @@
    top
    +

    Unix Systems

    + + + +
    +
    RPM Based Systems (Redhat / CentOS / Fedora)
    +
    +

    This document explains how to build, install, and run Apache 2.4 + on systems supporting the RPM packaging format.

    + +

    See: Using Apache With RPM Based Systems

    +
    +
    + +
    top
    +

    Other Platforms

    @@ -61,7 +84,7 @@
    Novell NetWare
    -

    This document explains how to install, configure and run Apache 2.0 +

    This document explains how to install, configure and run Apache 2.4 under Novell NetWare 5.1 and above.

    See: Using Apache With Novell NetWare

    @@ -77,7 +100,7 @@
    Warning: This document has not been updated to take into account changes made in - the 2.0 version of the Apache HTTP Server. Some of the + the 2.4 version of the Apache HTTP Server. Some of the information may still be relevant, but please use it with care.
    @@ -88,9 +111,14 @@

    Available Languages:  en  | + fr  |  ko  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    + \ No newline at end of file diff --git a/docs/manual/platform/index.html.fr b/docs/manual/platform/index.html.fr new file mode 100644 index 00000000000..42458c5947b --- /dev/null +++ b/docs/manual/platform/index.html.fr @@ -0,0 +1,130 @@ + + + + + +Notes spcifiques aux diffrentes plateformes. - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Notes spcifiques aux diffrentes plateformes.

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + zh-cn 

    +
    +
    + +
    top
    +
    +

    Microsoft Windows

    + + + +
    +
    Utilisation d'Apache
    +
    +

    Ce document explique comment installer, configurer et + excuter Apache 2.4 sous Microsoft Windows.

    + +

    Voir : Utilisation d'Apache avec Microsoft Windows

    +
    +
    + +
    +
    Compilation d'Apache
    +
    +

    Il y a de nombreux points importants connatre avant de se + lancer dans la compilation d'Apache. Ce document en donne la + description.

    + +

    Voir : Compilation d'Apache pour Microsoft Windows

    +
    +
    + +
    top
    +
    +

    Systmes de type Unix

    + + + +
    +
    Systmes base de paquets RPM (Redhat / CentOS / Fedora)
    +
    +

    Ce document explique comment installer, configurer et + excuter Apache 2.4 sur des systmes qui supportent le format de + paquet RPM.

    + +

    Voir : Utilisation d'Apache avec les + systmes base de paquets RPM

    +
    +
    + +
    top
    +
    +

    Autres plateformes

    + + + +
    +
    Novell NetWare
    +
    +

    Ce document explique comment installer, configurer et + excuter Apache 2.4 sous Novell NetWare versions 5.1 et + suprieures.

    + +

    Voir : Utilisation d'Apache avec Novell NetWare

    +
    +
    + +
    +
    EBCDIC
    +
    +

    La version 1.3 du serveur HTTP Apache est la premire + avoir t porte vers une machine de type mainframe (non-ASCII) + qui utilisait le jeu de caractres EBCDIC comme jeu de + caractres natif.

    + +
    Avertissement :Ce document + n'a pas fait l'objet d'une mise jour pour intgrer les + modifications intervenues partir de la version 2.4 du serveur + HTTP Apache. Certaines des informations qu'il contient sont + toujours pertinentes, mais il est conseill de les utiliser avec + prudence.
    + +

    Voir : Le portage d'Apache vers EBCDIC

    +
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + zh-cn 

    +
    + \ No newline at end of file diff --git a/docs/manual/platform/index.html.ko.euc-kr b/docs/manual/platform/index.html.ko.euc-kr index baacdb6a385..3814ae68d95 100644 --- a/docs/manual/platform/index.html.ko.euc-kr +++ b/docs/manual/platform/index.html.ko.euc-kr @@ -1,27 +1,35 @@ - -÷ - Apache HTTP Server +÷ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ÷

    +
    ֽ ƴմϴ. + ֱٿ ϼ.
    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/platform/index.html.zh-cn b/docs/manual/platform/index.html.zh-cn.utf8 similarity index 74% rename from docs/manual/platform/index.html.zh-cn rename to docs/manual/platform/index.html.zh-cn.utf8 index 6f32c9b9510..03e2eeefa8d 100644 --- a/docs/manual/platform/index.html.zh-cn +++ b/docs/manual/platform/index.html.zh-cn.utf8 @@ -1,27 +1,34 @@ - -平台相关说明 - Apache HTTP 服务器 +平台相关说明 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    平台相关说明

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    平台相关说明

    可用语言:  en  | + fr  |  ko  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    可用语言:  en  | + fr  |  ko  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/platform/index.xml b/docs/manual/platform/index.xml index 9e08f75374a..fa4af3eb763 100644 --- a/docs/manual/platform/index.xml +++ b/docs/manual/platform/index.xml @@ -32,7 +32,7 @@
    Using Apache
    -

    This document explains how to install, configure and run Apache 2.0 +

    This document explains how to install, configure and run Apache 2.4 under Microsoft Windows.

    See: Using Apache with Microsoft Windows

    @@ -52,6 +52,22 @@ +
    + + Unix Systems + +
    +
    RPM Based Systems (Redhat / CentOS / Fedora)
    +
    +

    This document explains how to build, install, and run Apache 2.4 + on systems supporting the RPM packaging format.

    + +

    See: Using Apache With RPM Based Systems

    +
    +
    + +
    +
    Other Platforms @@ -59,7 +75,7 @@
    Novell NetWare
    -

    This document explains how to install, configure and run Apache 2.0 +

    This document explains how to install, configure and run Apache 2.4 under Novell NetWare 5.1 and above.

    See: Using Apache With Novell NetWare

    @@ -75,7 +91,7 @@ Warning: This document has not been updated to take into account changes made in - the 2.0 version of the Apache HTTP Server. Some of the + the 2.4 version of the Apache HTTP Server. Some of the information may still be relevant, but please use it with care. diff --git a/docs/manual/platform/index.xml.fr b/docs/manual/platform/index.xml.fr new file mode 100644 index 00000000000..f32df5b7539 --- /dev/null +++ b/docs/manual/platform/index.xml.fr @@ -0,0 +1,112 @@ + + + + + + + + + + + + + Notes spécifiques aux différentes plateformes. + +
    + + Microsoft Windows + +
    +
    Utilisation d'Apache
    +
    +

    Ce document explique comment installer, configurer et + exécuter Apache 2.4 sous Microsoft Windows.

    + +

    Voir : Utilisation d'Apache avec Microsoft Windows

    +
    +
    + +
    +
    Compilation d'Apache
    +
    +

    Il y a de nombreux points importants à connaître avant de se + lancer dans la compilation d'Apache. Ce document en donne la + description.

    + +

    Voir : Compilation d'Apache pour Microsoft Windows

    +
    +
    + +
    + +
    + + Systèmes de type Unix + +
    +
    Systèmes à base de paquets RPM (Redhat / CentOS / Fedora)
    +
    +

    Ce document explique comment installer, configurer et + exécuter Apache 2.4 sur des systèmes qui supportent le format de + paquet RPM.

    + +

    Voir : Utilisation d'Apache avec les + systèmes à base de paquets RPM

    +
    +
    + +
    + +
    + + Autres plateformes + +
    +
    Novell NetWare
    +
    +

    Ce document explique comment installer, configurer et + exécuter Apache 2.4 sous Novell NetWare versions 5.1 et + supérieures.

    + +

    Voir : Utilisation d'Apache avec Novell NetWare

    +
    +
    + +
    +
    EBCDIC
    +
    +

    La version 1.3 du serveur HTTP Apache est la première à + avoir été portée vers une machine de type mainframe (non-ASCII) + qui utilisait le jeu de caractères EBCDIC comme jeu de + caractères natif.

    + + Avertissement :Ce document + n'a pas fait l'objet d'une mise à jour pour intégrer les + modifications intervenues à partir de la version 2.4 du serveur + HTTP Apache. Certaines des informations qu'il contient sont + toujours pertinentes, mais il est conseillé de les utiliser avec + prudence. + +

    Voir : Le portage d'Apache vers EBCDIC

    +
    +
    + +
    + +
    diff --git a/docs/manual/platform/index.xml.ko b/docs/manual/platform/index.xml.ko index 3295fd73518..dab05035dd8 100644 --- a/docs/manual/platform/index.xml.ko +++ b/docs/manual/platform/index.xml.ko @@ -1,7 +1,7 @@ - + + -Using Apache With Novell NetWare - Apache HTTP Server +Using Apache With Novell NetWare - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Using Apache With Novell NetWare

    +Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Using Apache With Novell NetWare

    Available Languages:  en  | + fr  |  ko 

    @@ -29,14 +35,15 @@ bug reporting page.

    -

    The bug reporting page and dev-httpd mailing list are not - provided to answer questions about configuration or running Apache. - Before you submit a bug report or request, first consult this document, the - Frequently Asked Questions page and the other - relevant documentation topics. If you still have a question or problem, - post it to the - novell.devsup.webserver newsgroup, where many Apache users are more than - willing to answer new and obscure questions about using Apache on NetWare.

    +

    The bug reporting page and dev-httpd mailing list are + not provided to answer questions about configuration or + running Apache. Before you submit a bug report or request, first + consult this document, the Frequently Asked + Questions page and the other relevant documentation topics. If + you still have a question or problem, post it to the + novell.devsup.webserver newsgroup, where many Apache users are + more than willing to answer new and obscure questions about using + Apache on NetWare.

    Most of this document assumes that you are installing Apache from a binary distribution. If you want to compile Apache @@ -51,7 +58,7 @@

  • Running Apache for NetWare
  • Configuring Apache for NetWare
  • Compiling Apache for NetWare
  • -
    +

    See also

    top

    Requirements

    @@ -324,7 +331,7 @@

    Apache is configured by reading configuration files usually stored in the conf directory. These are the same as files used to configure the Unix version, but there are a few different directives for - Apache on NetWare. See the Apache + Apache on NetWare. See the Apache module documentation for all the available directives.

    The main differences in Apache for NetWare are:

    @@ -657,8 +664,30 @@

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/netware.html.fr b/docs/manual/platform/netware.html.fr new file mode 100644 index 00000000000..e67dd829338 --- /dev/null +++ b/docs/manual/platform/netware.html.fr @@ -0,0 +1,763 @@ + + + + + +Utilisation d'Apache avec Novell NetWare - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Utilisation d'Apache avec Novell NetWare

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + + +

    Ce document explique l'installation, la configuration et le + lancement d'Apache 2.0 sous Novell NetWare 6.0 et les versions + ultrieures. Si vous trouvez une bogue, ou voulez tout simplement + contribuer de quelque manire que ce soit, utilisez s'il vous plait + notre page des + rapports de bogues.

    + +

    La page des rapports de bogues et la liste de diffusion dev-httpd + ne doivent pas tre utilises pour poser des questions propos de + la configuration ou du lancement d'Apache. Avant de soumettre un + rapport de bogue ou une question, consultez ce document, la FAQ ou tout autre sujet de la + documentation en rapport avec votre problme. Si vous n'avez + toujours pas rsolu votre problme, postez votre question dans le + newsgroup + novell.devsup.webserver, o de nombreux utilisateurs d'Apache + sont prts rpondre toutes les nouvelles et obscures questions + propos de l'utilisation d'Apache sous Netware.

    + +

    Dans la majeure partie de ce document, vous tes sens avoir + install Apache partir d'une distribution binaire. Si vous voulez + compiler Apache vous-mme (par exemple pour aider au dveloppement, + ou pour rechercher des bogues), reportez-vous la section traitant + de la Compilation d'Apache pour Netware + ci-dessous.

    + +
    + +
    top
    +
    +

    Prrequis

    + + + +

    Apache 2.0 ncessite NetWare 6.0 service pack 3 et suprieurs + pour fonctionner. Si vous utilisez un service pack antrieur SP3, + vous devez installer les dernires Bibliothques + Netware pour C (LibC).

    + +

    Vous trouverez les service packs Netware ici.

    + +

    Apache 2.0 pour NetWare peut aussi fonctionner dans un + environnement NetWare 5.1, partir du moment o le dernier service + pack ou la dernire version des Bibliothques + Netware pour C (LibC) ont t installs. ATTENTION + : Apache 2.0 pour NetWare n'a pas t test dans cet + environnement car il n'a pas t conu pour ce dernier.

    + +
    top
    +
    +

    Tlchargement d'Apache pour NetWare

    + + + +

    Les informations propos de la dernire version + d'Apache sont disponibles sur le site web d'Apache http://www.apache.org/. Vous y + trouverez la version courante, des versions alpha ou bta-test plus + rcentes, ainsi que des sites miroirs et des sites FTP anonymes. Les + distributions binaires des dernires versions d'Apache 2.0 pour + NetWare sont disponibles ici.

    + +
    top
    +
    +

    Installation d'Apache pour NetWare

    + + + +

    Il n'existe pas actuellement de programme d'installation d'Apache + pour Netware. Si vous installez Apache 2.0 pour NetWare partir des + sources, vous devrez copier les fichiers sur le serveur + manuellement.

    + +

    Suivez ces instructions pour installer Apache sous Netware + partir de la distribution binaire (en supposant que vous effectuez + l'installation dans sys:/apache2) :

    + +
      +
    • Dcompressez le fichier binaire tlcharg la racine du + volume SYS: (vous pouvez cependant l'installer dans + tout volume)
    • + +
    • Editez le fichier httpd.conf et dfinissez les + directives ServerRoot et + ServerName avec les valeurs + correctes des chemins de fichiers qui correspondent la + configuration de votre serveur.
    • + +
    • Ajoutez SYS:/APACHE2 au chemin de recherche, par + une commande du style :

      SEARCH ADD + SYS:\APACHE2

    • + +
    + +

    Suivez ces instructions pour installer Apache pour Netware + manuellement partir de votre propre rpertoire de sources (en + supposant que vous effectuez l'installation dans + sys:/apache2) :

    + +
      +
    • Crez un rpertoire que vous appellerez Apache2 + dans un volume Netware.
    • + +
    • Copiez APACHE2.NLM, APRLIB.NLM dans + SYS:/APACHE2.
    • + +
    • Crez un rpertoire que vous appellerez BIN dans + SYS:/APACHE2.
    • + +
    • Copiez HTDIGEST.NLM, HTPASSWD.NLM, + HTDBM.NLM, LOGRES.NLM, + ROTLOGS.NLM dans SYS:/APACHE2/BIN.
    • + +
    • Crez un rpertoire que vous appellerez CONF dans + SYS:/APACHE2.
    • + +
    • Copiez le fichier HTTPD-STD.CONF dans le + rpertoire SYS:/APACHE2/CONF et renommez-le en + HTTPD.CONF.
    • + +
    • Copiez les fichiers MIME.TYPES, + CHARSET.CONV et MAGIC dans le rpertoire + SYS:/APACHE2/CONF.
    • + +
    • Copiez tous les fichiers et sous-rpertoires de + \HTTPD-2.0\DOCS\ICONS dans + SYS:/APACHE2/ICONS.
    • + +
    • Copiez tous les fichiers et sous-rpertoires de + \HTTPD-2.0\DOCS\MANUAL dans + SYS:/APACHE2/MANUAL.
    • + +
    • Copiez tous les fichiers et sous-rpertoires de + \HTTPD-2.0\DOCS\ERROR dans + SYS:/APACHE2/ERROR.
    • + +
    • Copiez tous les fichiers et sous-rpertoires de + \HTTPD-2.0\DOCS\DOCROOT dans + SYS:/APACHE2/HTDOCS.
    • + +
    • Crez le rpertoire SYS:/APACHE2/LOGS sur le + serveur.
    • + +
    • Crez le rpertoire SYS:/APACHE2/CGI-BIN sur le + serveur.
    • + +
    • Crez le rpertoire SYS:/APACHE2/MODULES et + copiez tous les modules nlm dans le rpertoire + modules.
    • + +
    • Editez le fichier HTTPD.CONF, et recherchez + toutes les marques @@Value@@ afin de les remplacer + par les valeurs appropries.
    • + +
    • Ajoutez SYS:/APACHE2 au chemin de recherche, par + une commande du style :

      SEARCH ADD + SYS:\APACHE2

      .
    • +
    + +

    Outre le volume par dfaut SYS, Apache peut tre + install dans tout autre volume.

    + +

    Au cours du processus d'installation, l'ajout du mot-cl + "install" la ligne de commande du makefile va provoquer la + construction d'une distribution complte sous forme d'un paquetage + dans le sous-rpertoire DIST. Vous pouvez simplement + installer Apache en copiant la distribution cre prcdemment la + racine d'un volume Netware (voir Compilation + d'Apache pour NetWare ci-dessous).

    + +
    top
    +
    +

    Excuter Apache pour NetWare

    + + + +

    Pour dmarrer Apache, tapez simplement apache dans + la console. Ceci aura pour effet de charger Apache dans l'espace + d'adressage du systme d'exploitation. Si vous prfrez charger + Apache dans un espace d'adressage protg, vous pouvez spcifier cet + espace d'adressage l'aide de l'instruction de chargement suivante + :

    + +

    + load address space = apache2 apache2 +

    + +

    Cette instruction va charger Apache dans un espace d'adressage + appel apache2. Il est possible d'excuter plusieurs instances + simultanes d'Apache sous Netware, en chargeant chacune d'entre + elles dans son propre espace d'adressage protg.

    + +

    Une fois dmarr, Apache coute le port 80 ( moins que vous + n'ayez modifi la directive Listen dans les fichiers de + configuration). Pour vous connecter au serveur et afficher la page + par dfaut, lancez un navigateur et entrez le nom du serveur ou son + adresse IP. Vous devriez voir une page de bienvenue, et un lien vers + le manuel Apache. Si rien ne se produit, ou si vous obtenez un + message d'erreur, consultez le fichier error_log dans + le rpertoire logs.

    + +

    Lorsque votre installation de base fonctionne, vous devez la + configurer correctement en ditant les fichiers du rpertoire + conf.

    + +

    Pour arrter une instance d'Apache s'excutant dans l'espace + d'adressage du systme d'exploitation, entrez simplement dans la + console :

    + +

    + unload apache2 +

    + +

    ou

    + +

    + apache2 shutdown +

    + +

    Si Apache s'excute dans un espace d'adressage protg, spcifiez + cet espace d'adressage dans l'instruction d'arrt :

    + +

    + unload address space = apache2 apache2 +

    + +

    Lorsqu'on travaille avec Apache, il est important de savoir + comment il trouve ses fichiers de configuration. Vous pouvez + spcifier un fichier de configuration sur la ligne de commande de + deux manires :

    + +
      +
    • -f spcifie un chemin vers un fichier de + configuration particulier
    • +
    + +

    + apache2 -f "vol:/nom-serveur/conf/fich-conf.conf" +

    + +

    + apache -f test/test.conf +

    + +

    Dans ces cas, la directive ServerRoot doit tre correctement dfinie + dans le fichier de configuration.

    + +

    Si vous ne spcifiez pas de nom de fichier de configuration avec + l'option -f, Apache utilisera le nom de fichier cod en + dur dans le serveur, en gnral conf/httpd.conf. + L'invocation d'Apache avec l'option -V indiquera ce nom + comme valeur de l'tiquette SERVER_CONFIG_FILE. Apache + va ensuite dterminer son ServerRoot en effectuant les tests + suivants, dans cet ordre

    + +
      +
    • Une directive ServerRoot via une option + -C switch.
    • + +
    • L'option de ligne de commande -d.
    • + +
    • Le contenu du rpertoire courant.
    • + +
    • La racine du rpertoire d'installation code en dur dans le + serveur.
    • +
    + +

    La racine du rpertoire d'installation code en dur dans le + serveur est en gnral sys:/apache2. L'invocation + d'Apache avec l'option -V indiquera ce chemin comme + valeur de l'tiquette HTTPD_ROOT.

    + +

    Apache 2.0 pour Netware comporte un jeu d'options de ligne de + commande permettant d'afficher ou de modifier certaines + caractristiques de l'instance du serveur web en cours d'excution. + Ces options ne sont disponibles que lorsqu'Apache est en cours + d'excution. Chacune de ces options doit tre prcde du mot-cl + APACHE2.

    + +
    +
    RESTART
    +
    Demande Apache d'arrter tout worker thread en cours + d'excution lorsqu'il devient inactif, de recharger le fichier de + configuration, et de redmarrer chaque worker thread en fonction + de la nouvelle configuration.
    + +
    VERSION
    +
    Affiche des informations propos de la version de l'instance + d'Apache en cours d'excution.
    + +
    MODULES
    +
    Affiche la liste des modules chargs (intgrs et + externes).
    + +
    DIRECTIVES
    +
    Affiche la liste des directives disponibles.
    + +
    SETTINGS
    +
    Active ou dsactive l'affichage du statut des threads sur la + console. En cas d'activation, l'tat de chaque thread en cours + d'excution s'affiche sur l'cran de la console Apache.
    + +
    SHUTDOWN
    +
    Arrte l'instance du serveur web Apache en cours + d'excution.
    + +
    HELP
    +
    Dcrit chacune des options disponibles au cours de l'excution + d'Apache.
    +
    + +

    Par dfaut, ces options sont passes l'instance d'apache + s'excutant dans l'espace d'adressage du systme d'exploitation. + Pour passer une option une instance d'Apache spcifique + s'excutant dans un espace d'adressage protg, ajouter le paramtre + -p suivi du nom de l'espace d'adressage. Pour plus d'informations, + tapez "apache2 Help" sur la ligne de commande.

    + +
    top
    +
    +

    Configuration d'Apache pour NetWare

    + + + +

    Apache lit en gnral ses fichiers de configuration dans le + rpertoire conf. Ces fichiers sont les mmes que ceux + de la version Unix, mais quelques directives sont diffrentes sous + Netware. Voir la Documentation Apache pour + l'ensemble des directives disponibles.

    + +

    Les principales diffrences propres Apache pour NetWare sont + :

    + +
      +
    • +

      Comme Apache pour Netware est une application multithread, + elle n'utilise pas de processus spar pour chaque requte, + comme c'est le cas pour certaines implmentations sous Unix. Il + n'y a que des threads en cours d'excution : un thread parent, + et plusieurs threads enfants ou worker qui traitent les + requtes.

      + +

      En consquence, les directives de gestion des "processus" + sont diffrentes :

      + +

      MaxConnectionsPerChild - comme sous + Unix, cette directive contrle le nombre maximum de connexions + qu'un worker thread peut traiter avant de s'arrter. Avec la + valeur par dfaut MaxConnectionsPerChild 0, + le thread va pouvoir traiter un nombre illimit de requtes. + Cette valeur est recommande sous Netware, moins que vous + n'ayez des raisons particulires de la modifier.

      + +

      StartThreads - + Cette directive indique au serveur le nombre de threads qu'il + doit lancer au dmarrage. Il est recommand de conserver la + valeur par dfaut StartThreads 50.

      + +

      MinSpareThreads - + Cette directive indique au serveur le nombre de worker threads + additionnels qu'il doit lancer si le nombre de threads inactifs + tombe en dessous de cette valeur. Il est recommand de conserver la + valeur par dfaut MinSpareThreads 10.

      + +

      MaxSpareThreads - + Cette directive indique au serveur qu'il doit commencer + arrter des worker threads si le nombre de threads inactifs + passe au dessus de cette valeur. Il est recommand de conserver + la valeur par dfaut MaxSpareThreads 100.

      + +

      MaxThreads - + Cette directive impose un nombre maximum de worker threads. Il + est recommand de conserver la valeur par dfaut + ThreadsPerChild 250.

      + +

      ThreadStackSize - + Cette directive indique au serveur la taille de la pile + utiliser pour un worker thread individuel. Il est recommand de + conserver la valeur par dfaut ThreadStackSize + 65536.

      +
    • + +
    • +

      Les directives qui acceptent des noms de fichiers comme + arguments ne doivent pas utiliser des noms de fichiers Unix, + mais des noms de fichiers Netware. Cependant, comme Apache + utilise des noms de style Unix en interne, on doit utiliser des + slashes et non des antislashes. Il est recommand de prfixer + tous les chemins de fichiers racines par un nom de volume. Si ce + dernier est omis, Apache supposera que le volume est + SYS:, ce qui n'est pas forcment correct.

      +
    • + +
    • +

      Apache pour Netware a la possibilit de charger des modules + en cours d'excution, sans avoir recompiler le serveur. Si + Apache est compil avec les options par dfaut, il va installer + de nombreux modules optionnels dans le rpertoire + \Apache2\modules. Pour les activer, ou en activer + d'autres, on doit utiliser la directive LoadModule. Par exemple, pour + activer le module status, ajoutez la ligne suivante :

      + +

      + LoadModule status_module modules/status.nlm +

      + +

      Des informations propos de la cration de modules + chargeables sont aussi disponibles.

      +
    • +
    + +

    Autres directives spcifiques Netware :

    + + + +
      +
    • CGIMapExtension - + Cette directive associe une extension de fichier CGI un + interprteur de script.
    • +
    +
      +
    • SecureListen - + Cette directive active le chiffrement SSL pour un port + spcifique.
    • +
    +
      +
    • NWSSLTrustedCerts - + Cette directive permet d'ajouter des certificats de confiance + pouvant tre utiliss pour crer des connexions scurises vers + des serveurs mandataires.
    • +
    +
      +
    • NWSSLUpgradeable - + Cette directive permet de faire passer en SSL une connexion + initialise sur les adresse IP et Port spcifis.
    • +
    + + + +
    top
    +
    +

    Compilation d'Apache pour NetWare

    + + + +

    La compilation d'Apache ncessite MetroWerks CodeWarrior 6.x ou + suprieur. Une fois compil, Apache peut tre install la racine + de tout volume Netware. Le rpertoire d'installation par dfaut est + sys:/Apache2.

    + +

    Avant de dmarrer Apache, vous devez remplir le rpertoire + conf. Copiez le fichier HTTPD-STD.CONF + depuis le rpertoire conf de la distribution et + renommez-le en HTTPD.CONF. Editez le fichier + HTTPD.CONF en recherchant les repres + @@Value@@, et remplacez ces derniers par la valeur + approprie. Copiez de mme les fichiers conf/magic et + conf/mime.types. Vous pouvez aussi construire une + distribution complte en ajoutant le mot-cl install + lors de l'invocation des makefiles.

    + +

    Prrequis :

    + + + +

    Les outils de dveloppement suivants sont ncessaires pour la + compilation d'Apache pour Netware :

    + + + + + +

    Compiler Apache en utilisant les makefiles Netware + :

    + + + +
      +
    • Dfinissez la variable d'environnement + NOVELLLIBC avec le chemin des bibliothques Netware + pour C SDK ; par exemple :

      Set + NOVELLLIBC=c:\novell\ndk\libc

    • + +
    • Dfinissez la variable d'environnement + METROWERKS avec le chemin de votre compilateur + Metrowerks CodeWarrior ; par exemple :

      Set + METROWERKS=C:\Program Files\Metrowerks\CodeWarrior

      . Si + vous l'avez install dans le rpertoire par dfaut + C:\Program Files\Metrowerks\CodeWarrior, vous + n'avez pas besoin de dfinir cette variable.
    • + +
    • Dfinissez la variable d'environnement LDAPSDK + avec le chemin des bibliothques LDAP pour C ; par exemple : +

      Set + LDAPSDK=c:\Novell\NDK\cldapsdk\NetWare\libc

    • + +
    • Dfinissez la variable d'environnement ZLIBSDK + avec le chemin du code source de la bibliothque Zlib ; par + exemple :

      Set ZLIBSDK=D:\NOVELL\zlib

    • + +
    • Dfinissez la variable d'environnement PCRESDK + avec le chemin d'installation du code source de la bibliothque + PCRE ; par exemple : +

      Set PCRESDK=D:\NOVELL\pcre

      +
    • + +
    • Dfinissez la variable d'environnement AP_WORK + avec le chemin du code source de httpd. +

      Set AP_WORK=D:\httpd-2.0.x

    • + +
    • Dfinissez la variable d'environnement APR_WORK + avec le chemin du code source d'apr ; en gnral + \httpd\srclib\apr, mais le projet APR peut se + trouver en dehors de la structure des rpertoires de httpd. +

      Set APR_WORK=D:\apr-1.x.x

    • + +
    • Dfinissez la variable d'environnement APU_WORK + avec le chemin du code source d'apr-util ; en + gnral \httpd\srclib\apr-util, mais le projet + APR-UTIL peut se trouver en dehors de la structure des + rpertoires de httpd.

      Set + APU_WORK=D:\apr-util-1.x.x

    • + +
    • Vrifiez que les chemins des utilitaires AWK et GNU make + (gmake.exe) ont bien t inclus dans la variable + d'environnement systme PATH.
    • + +
    • Tlchargez le code source et dcompressez-le dans un + rpertoire de votre choix sur votre station de travail.
    • + +
    • Positionnez-vous dans le rpertoire \httpd-2.0 + et compilez les utilitaires prcompils l'aide de la commande + "gmake -f nwgnumakefile prebuild". Cette cible va + crer le rpertoire \httpd-2.0\nwprebuild, et y + copier tous les utilitaires ncessaires au franchissement des + tapes suivantes de la compilation.
    • + +
    • Copiez les fichiers + \httpd-2.0\nwprebuild\GENCHARS.nlm et + \httpd-2.0\nwprebuild\DFTABLES.nlm vers le volume + SYS: d'un serveur Netware et excutez-les l'aide + des commandes suivantes : +

      + SYS:\genchars > sys:\test_char.h
      + SYS:\dftables sys:\chartables.c
      +

      +
    • + +
    • Copiez les fichiers test_char.h et + chartables.c vers le rpertoire + \httpd-2.0\os\netware de la machine o s'effectue + la compilation.
    • + +
    • Positionnez-vous dans le rpertoire \httpd-2.0 + et compilez Apache l'aide de la commande "gmake -f + nwgnumakefile". Vous pouvez crer un rpertoire pour la + distribution en ajoutant le paramtre install la commande ; + par exemple : +

      gmake -f nwgnumakefile install

      +
    • +
    + + + +

    Options de make supplmentaires

    + + + +
      +
    • gmake -f nwgnumakefile

      Compile les versions + de distribution de tous les binaires et les copie dans un + rpertoire \release.

    • + +
    • gmake -f nwgnumakefile DEBUG=1

      Compile les versions + de dbogage de tous les binaires et les copie dans un + rpertoire \debug.

    • + +
    • gmake -f nwgnumakefile install

      Cre une + distribution complte d'Apache avec les binaires, la + documentation et les fichiers support dans un rpertoire + \dist\Apache2.

    • + +
    • gmake -f nwgnumakefile prebuild

      Compile tous + les utilitaires prcompils et les copie dans le rpertoire + \nwprebuild.

    • + +
    • gmake -f nwgnumakefile installdev

      Mme effet + que l'option install, mais en plus, les rpertoires + \lib et \include sont crs dans le + rpertoire de destination, et les en-ttes et fichiers d'import + y sont copis.

    • + +
    • gmake -f nwgnumakefile clean

      Supprime tous + les fichiers objets et les binaires de la zone de compilation + \release.o, ou \debug.o si + DEBUG a t dfini.

    • + +
    • gmake -f nwgnumakefile clobber_all

      Mme effet + que clean, mais en plus, le rpertoire de la distribution est + supprim s'il existe.

    • +
    + + + +

    Variables d'environnement supplmentaires

    + + + +
      +
    • Pour compiler tous les modules exprimentaux, dfinissez la + variable d'environnement EXPERIMENTAL : +

      Set EXPERIMENTAL=1

      +
    • + +
    • Pour compiler Apache en utilisant les sockets de style BSD + standard, plutt que Winsock, dfinissez la variable + d'environnement USE_STDSOCKETS : +

      Set USE_STDSOCKETS=1

      +
    • + +
    + + + +

    Compilation de mod_ssl pour la plate-forme Netware

    + + + +

    Pour fournir les services SSL, Apache pour Netware utilise par + dfaut le module intgr mod_nw_ssl. Ce module ne + fournit que les services SSL implments par le systme + d'exploitation Netware lui-mme pour grer tous les chiffrements + pour un port donn. Cependant, on peut aussi utiliser mod_ssl de + la mme manire que sur les autres plate-formes.

    + +

    Afin de pouvoir compiler mod_ssl pour la plate-forme Netware, + les bibliothques OpenSSL doivent tre disponibles. Elles peuvent + tre installes de la manire suivante :

    + +
      +
    • Tlchargez la dernire distribution du code source + d'OpenSSL 0.9.8 depuis la page OpenSSL Source (les + versions 0.9.7 doivent tre patches, et ne sont donc pas + recommandes).
    • + +
    • Editez le fichier NetWare/set_env.bat, et + effectuez toutes modifications ncessaires des chemins des + outils et utilitaires en fonction de votre environnement de + dveloppement.
    • + +
    • Excutez les scripts suivants depuis la racine du + rpertoire des sources d'OpenSSL : +

      + Netware\set_env netware-libc
      + Netware\build netware-libc +

      + Pour des raisons de performances, vous devez activer la + compilation avec le code ASM. Tlcharger NASM depuis le site SF. Configurez + ensuite OpenSSL pour utiliser le code ASM : +

      + Netware\build netware-libc nw-nasm enable-mdc2 enable-md5 +

      + Attention : n'utilisez pas l'Assembleur CodeWarrior - il + produit un code de mauvaise qualit !
    • + +
    • Avant de compiler Apache, dfinissez la variable + d'environnement OSSLSDK avec le chemin absolu de + la racine du rpertoire du code source d'openssl, et + dfinissez WITH_MOD_SSL 1. +

      + Set OSSLSDK=d:\openssl-0.9.8x
      + Set WITH_MOD_SSL=1 +

    • + +
    + + + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/platform/netware.html.ko.euc-kr b/docs/manual/platform/netware.html.ko.euc-kr index 6b7a5e17620..4e780b3f62c 100644 --- a/docs/manual/platform/netware.html.ko.euc-kr +++ b/docs/manual/platform/netware.html.ko.euc-kr @@ -1,24 +1,30 @@ - -Novell NetWare ġ ϱ - Apache HTTP Server +Novell NetWare ġ ϱ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Novell NetWare ġ ϱ

    ֽ ƴմϴ. @@ -50,7 +56,7 @@
  • NetWare ġ ϱ
  • NetWare ġ ϱ
  • Netware ġ ϱ
  • -
    +

    top

    @@ -574,8 +580,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/netware.xml b/docs/manual/platform/netware.xml index 39e16edf889..258b80e08e8 100644 --- a/docs/manual/platform/netware.xml +++ b/docs/manual/platform/netware.xml @@ -33,14 +33,17 @@ bug reporting page.

    -

    The bug reporting page and dev-httpd mailing list are not - provided to answer questions about configuration or running Apache. - Before you submit a bug report or request, first consult this document, the - Frequently Asked Questions page and the other - relevant documentation topics. If you still have a question or problem, - post it to the - novell.devsup.webserver newsgroup, where many Apache users are more than - willing to answer new and obscure questions about using Apache on NetWare.

    +

    The bug reporting page and dev-httpd mailing list are + not provided to answer questions about configuration or + running Apache. Before you submit a bug report or request, first + consult this document, the Frequently Asked + Questions page and the other relevant documentation topics. If + you still have a question or problem, post it to the + novell.devsup.webserver newsgroup, where many Apache users are + more than willing to answer new and obscure questions about using + Apache on NetWare.

    Most of this document assumes that you are installing Apache from a binary distribution. If you want to compile Apache @@ -324,7 +327,7 @@

    Apache is configured by reading configuration files usually stored in the conf directory. These are the same as files used to configure the Unix version, but there are a few different directives for - Apache on NetWare. See the Apache + Apache on NetWare. See the Apache module documentation for all the available directives.

    The main differences in Apache for NetWare are:

    diff --git a/docs/manual/platform/netware.xml.fr b/docs/manual/platform/netware.xml.fr new file mode 100644 index 00000000000..70f5675b543 --- /dev/null +++ b/docs/manual/platform/netware.xml.fr @@ -0,0 +1,751 @@ + + + + + + + + + + + Notes spécifiques à un système + + Utilisation d'Apache avec Novell NetWare + + + +

    Ce document explique l'installation, la configuration et le + lancement d'Apache 2.0 sous Novell NetWare 6.0 et les versions + ultérieures. Si vous trouvez une bogue, ou voulez tout simplement + contribuer de quelque manière que ce soit, utilisez s'il vous plait + notre page des + rapports de bogues.

    + +

    La page des rapports de bogues et la liste de diffusion dev-httpd + ne doivent pas être utilisées pour poser des questions à propos de + la configuration ou du lancement d'Apache. Avant de soumettre un + rapport de bogue ou une question, consultez ce document, la FAQ ou tout autre sujet de la + documentation en rapport avec votre problème. Si vous n'avez + toujours pas résolu votre problème, postez votre question dans le + newsgroup + novell.devsup.webserver, où de nombreux utilisateurs d'Apache + sont prêts à répondre à toutes les nouvelles et obscures questions à + propos de l'utilisation d'Apache sous Netware.

    + +

    Dans la majeure partie de ce document, vous êtes sensé avoir + installé Apache à partir d'une distribution binaire. Si vous voulez + compiler Apache vous-même (par exemple pour aider au développement, + ou pour rechercher des bogues), reportez-vous à la section traitant + de la Compilation d'Apache pour Netware + ci-dessous.

    + +
    + +
    + + Prérequis + +

    Apache 2.0 nécessite NetWare 6.0 service pack 3 et supérieurs + pour fonctionner. Si vous utilisez un service pack antérieur à SP3, + vous devez installer les dernières Bibliothèques + Netware pour C (LibC).

    + +

    Vous trouverez les service packs Netware ici.

    + +

    Apache 2.0 pour NetWare peut aussi fonctionner dans un + environnement NetWare 5.1, à partir du moment où le dernier service + pack ou la dernière version des Bibliothèques + Netware pour C (LibC) ont été installés. ATTENTION + : Apache 2.0 pour NetWare n'a pas été testé dans cet + environnement car il n'a pas été conçu pour ce dernier.

    + +
    + +
    + + Téléchargement d'Apache pour NetWare + +

    Les informations à propos de la dernière version + d'Apache sont disponibles sur le site web d'Apache à http://www.apache.org/. Vous y + trouverez la version courante, des versions alpha ou bêta-test plus + récentes, ainsi que des sites miroirs et des sites FTP anonymes. Les + distributions binaires des dernières versions d'Apache 2.0 pour + NetWare sont disponibles ici.

    + +
    + +
    + + Installation d'Apache pour NetWare + +

    Il n'existe pas actuellement de programme d'installation d'Apache + pour Netware. Si vous installez Apache 2.0 pour NetWare à partir des + sources, vous devrez copier les fichiers sur le serveur + manuellement.

    + +

    Suivez ces instructions pour installer Apache sous Netware à + partir de la distribution binaire (en supposant que vous effectuez + l'installation dans sys:/apache2) :

    + +
      +
    • Décompressez le fichier binaire téléchargé à la racine du + volume SYS: (vous pouvez cependant l'installer dans + tout volume)
    • + +
    • Editez le fichier httpd.conf et définissez les + directives ServerRoot et + ServerName avec les valeurs + correctes des chemins de fichiers qui correspondent à la + configuration de votre serveur.
    • + +
    • Ajoutez SYS:/APACHE2 au chemin de recherche, par + une commande du style : SEARCH ADD + SYS:\APACHE2
    • + +
    + +

    Suivez ces instructions pour installer Apache pour Netware + manuellement à partir de votre propre répertoire de sources (en + supposant que vous effectuez l'installation dans + sys:/apache2) :

    + +
      +
    • Créez un répertoire que vous appellerez Apache2 + dans un volume Netware.
    • + +
    • Copiez APACHE2.NLM, APRLIB.NLM dans + SYS:/APACHE2.
    • + +
    • Créez un répertoire que vous appellerez BIN dans + SYS:/APACHE2.
    • + +
    • Copiez HTDIGEST.NLM, HTPASSWD.NLM, + HTDBM.NLM, LOGRES.NLM, + ROTLOGS.NLM dans SYS:/APACHE2/BIN.
    • + +
    • Créez un répertoire que vous appellerez CONF dans + SYS:/APACHE2.
    • + +
    • Copiez le fichier HTTPD-STD.CONF dans le + répertoire SYS:/APACHE2/CONF et renommez-le en + HTTPD.CONF.
    • + +
    • Copiez les fichiers MIME.TYPES, + CHARSET.CONV et MAGIC dans le répertoire + SYS:/APACHE2/CONF.
    • + +
    • Copiez tous les fichiers et sous-répertoires de + \HTTPD-2.0\DOCS\ICONS dans + SYS:/APACHE2/ICONS.
    • + +
    • Copiez tous les fichiers et sous-répertoires de + \HTTPD-2.0\DOCS\MANUAL dans + SYS:/APACHE2/MANUAL.
    • + +
    • Copiez tous les fichiers et sous-répertoires de + \HTTPD-2.0\DOCS\ERROR dans + SYS:/APACHE2/ERROR.
    • + +
    • Copiez tous les fichiers et sous-répertoires de + \HTTPD-2.0\DOCS\DOCROOT dans + SYS:/APACHE2/HTDOCS.
    • + +
    • Créez le répertoire SYS:/APACHE2/LOGS sur le + serveur.
    • + +
    • Créez le répertoire SYS:/APACHE2/CGI-BIN sur le + serveur.
    • + +
    • Créez le répertoire SYS:/APACHE2/MODULES et + copiez tous les modules nlm dans le répertoire + modules.
    • + +
    • Editez le fichier HTTPD.CONF, et recherchez + toutes les marques @@Value@@ afin de les remplacer + par les valeurs appropriées.
    • + +
    • Ajoutez SYS:/APACHE2 au chemin de recherche, par + une commande du style : SEARCH ADD + SYS:\APACHE2.
    • +
    + +

    Outre le volume par défaut SYS, Apache peut être + installé dans tout autre volume.

    + +

    Au cours du processus d'installation, l'ajout du mot-clé + "install" à la ligne de commande du makefile va provoquer la + construction d'une distribution complète sous forme d'un paquetage + dans le sous-répertoire DIST. Vous pouvez simplement + installer Apache en copiant la distribution créée précédemment à la + racine d'un volume Netware (voir Compilation + d'Apache pour NetWare ci-dessous).

    + +
    + +
    + + Exécuter Apache pour NetWare + +

    Pour démarrer Apache, tapez simplement apache dans + la console. Ceci aura pour effet de charger Apache dans l'espace + d'adressage du système d'exploitation. Si vous préférez charger + Apache dans un espace d'adressage protégé, vous pouvez spécifier cet + espace d'adressage à l'aide de l'instruction de chargement suivante + :

    + + + load address space = apache2 apache2 + + +

    Cette instruction va charger Apache dans un espace d'adressage + appelé apache2. Il est possible d'exécuter plusieurs instances + simultanées d'Apache sous Netware, en chargeant chacune d'entre + elles dans son propre espace d'adressage protégé.

    + +

    Une fois démarré, Apache écoute le port 80 (à moins que vous + n'ayez modifié la directive Listen dans les fichiers de + configuration). Pour vous connecter au serveur et afficher la page + par défaut, lancez un navigateur et entrez le nom du serveur ou son + adresse IP. Vous devriez voir une page de bienvenue, et un lien vers + le manuel Apache. Si rien ne se produit, ou si vous obtenez un + message d'erreur, consultez le fichier error_log dans + le répertoire logs.

    + +

    Lorsque votre installation de base fonctionne, vous devez la + configurer correctement en éditant les fichiers du répertoire + conf.

    + +

    Pour arrêter une instance d'Apache s'exécutant dans l'espace + d'adressage du système d'exploitation, entrez simplement dans la + console :

    + + + unload apache2 + + +

    ou

    + + + apache2 shutdown + + +

    Si Apache s'exécute dans un espace d'adressage protégé, spécifiez + cet espace d'adressage dans l'instruction d'arrêt :

    + + + unload address space = apache2 apache2 + + +

    Lorsqu'on travaille avec Apache, il est important de savoir + comment il trouve ses fichiers de configuration. Vous pouvez + spécifier un fichier de configuration sur la ligne de commande de + deux manières :

    + +
      +
    • -f spécifie un chemin vers un fichier de + configuration particulier
    • +
    + + + apache2 -f "vol:/nom-serveur/conf/fich-conf.conf" + + + + apache -f test/test.conf + + +

    Dans ces cas, la directive ServerRoot doit être correctement définie + dans le fichier de configuration.

    + +

    Si vous ne spécifiez pas de nom de fichier de configuration avec + l'option -f, Apache utilisera le nom de fichier codé en + dur dans le serveur, en général conf/httpd.conf. + L'invocation d'Apache avec l'option -V indiquera ce nom + comme valeur de l'étiquette SERVER_CONFIG_FILE. Apache + va ensuite déterminer son ServerRoot en effectuant les tests + suivants, dans cet ordre

    + +
      +
    • Une directive ServerRoot via une option + -C switch.
    • + +
    • L'option de ligne de commande -d.
    • + +
    • Le contenu du répertoire courant.
    • + +
    • La racine du répertoire d'installation codée en dur dans le + serveur.
    • +
    + +

    La racine du répertoire d'installation codée en dur dans le + serveur est en général sys:/apache2. L'invocation + d'Apache avec l'option -V indiquera ce chemin comme + valeur de l'étiquette HTTPD_ROOT.

    + +

    Apache 2.0 pour Netware comporte un jeu d'options de ligne de + commande permettant d'afficher ou de modifier certaines + caractéristiques de l'instance du serveur web en cours d'exécution. + Ces options ne sont disponibles que lorsqu'Apache est en cours + d'exécution. Chacune de ces options doit être précédée du mot-clé + APACHE2.

    + +
    +
    RESTART
    +
    Demande à Apache d'arrêter tout worker thread en cours + d'exécution lorsqu'il devient inactif, de recharger le fichier de + configuration, et de redémarrer chaque worker thread en fonction + de la nouvelle configuration.
    + +
    VERSION
    +
    Affiche des informations à propos de la version de l'instance + d'Apache en cours d'exécution.
    + +
    MODULES
    +
    Affiche la liste des modules chargés (intégrés et + externes).
    + +
    DIRECTIVES
    +
    Affiche la liste des directives disponibles.
    + +
    SETTINGS
    +
    Active ou désactive l'affichage du statut des threads sur la + console. En cas d'activation, l'état de chaque thread en cours + d'exécution s'affiche sur l'écran de la console Apache.
    + +
    SHUTDOWN
    +
    Arrête l'instance du serveur web Apache en cours + d'exécution.
    + +
    HELP
    +
    Décrit chacune des options disponibles au cours de l'exécution + d'Apache.
    +
    + +

    Par défaut, ces options sont passées à l'instance d'apache + s'exécutant dans l'espace d'adressage du système d'exploitation. + Pour passer une option à une instance d'Apache spécifique + s'exécutant dans un espace d'adressage protégé, ajouter le paramètre + -p suivi du nom de l'espace d'adressage. Pour plus d'informations, + tapez "apache2 Help" sur la ligne de commande.

    + +
    + +
    + + Configuration d'Apache pour NetWare + +

    Apache lit en général ses fichiers de configuration dans le + répertoire conf. Ces fichiers sont les mêmes que ceux + de la version Unix, mais quelques directives sont différentes sous + Netware. Voir la Documentation Apache pour + l'ensemble des directives disponibles.

    + +

    Les principales différences propres à Apache pour NetWare sont + :

    + +
      +
    • +

      Comme Apache pour Netware est une application multithread, + elle n'utilise pas de processus séparé pour chaque requête, + comme c'est le cas pour certaines implémentations sous Unix. Il + n'y a que des threads en cours d'exécution : un thread parent, + et plusieurs threads enfants ou worker qui traitent les + requêtes.

      + +

      En conséquence, les directives de gestion des "processus" + sont différentes :

      + +

      MaxConnectionsPerChild - comme sous + Unix, cette directive contrôle le nombre maximum de connexions + qu'un worker thread peut traiter avant de s'arrêter. Avec la + valeur par défaut MaxConnectionsPerChild 0, + le thread va pouvoir traiter un nombre illimité de requêtes. + Cette valeur est recommandée sous Netware, à moins que vous + n'ayez des raisons particulières de la modifier.

      + +

      StartThreads - + Cette directive indique au serveur le nombre de threads qu'il + doit lancer au démarrage. Il est recommandé de conserver la + valeur par défaut StartThreads 50.

      + +

      MinSpareThreads - + Cette directive indique au serveur le nombre de worker threads + additionnels qu'il doit lancer si le nombre de threads inactifs + tombe en dessous de cette valeur. Il est recommandé de conserver la + valeur par défaut MinSpareThreads 10.

      + +

      MaxSpareThreads - + Cette directive indique au serveur qu'il doit commencer à + arrêter des worker threads si le nombre de threads inactifs + passe au dessus de cette valeur. Il est recommandé de conserver + la valeur par défaut MaxSpareThreads 100.

      + +

      MaxThreads - + Cette directive impose un nombre maximum de worker threads. Il + est recommandé de conserver la valeur par défaut + ThreadsPerChild 250.

      + +

      ThreadStackSize - + Cette directive indique au serveur la taille de la pile à + utiliser pour un worker thread individuel. Il est recommandé de + conserver la valeur par défaut ThreadStackSize + 65536.

      +
    • + +
    • +

      Les directives qui acceptent des noms de fichiers comme + arguments ne doivent pas utiliser des noms de fichiers Unix, + mais des noms de fichiers Netware. Cependant, comme Apache + utilise des noms de style Unix en interne, on doit utiliser des + slashes et non des antislashes. Il est recommandé de préfixer + tous les chemins de fichiers racines par un nom de volume. Si ce + dernier est omis, Apache supposera que le volume est + SYS:, ce qui n'est pas forcément correct.

      +
    • + +
    • +

      Apache pour Netware a la possibilité de charger des modules + en cours d'exécution, sans avoir à recompiler le serveur. Si + Apache est compilé avec les options par défaut, il va installer + de nombreux modules optionnels dans le répertoire + \Apache2\modules. Pour les activer, ou en activer + d'autres, on doit utiliser la directive LoadModule. Par exemple, pour + activer le module status, ajoutez la ligne suivante :

      + + + LoadModule status_module modules/status.nlm + + +

      Des informations à propos de la création de modules + chargeables sont aussi disponibles.

      +
    • +
    + +
    + + Autres directives spécifiques à Netware : + +
      +
    • CGIMapExtension - + Cette directive associe une extension de fichier CGI à un + interpréteur de script.
    • +
    +
      +
    • SecureListen - + Cette directive active le chiffrement SSL pour un port + spécifique.
    • +
    +
      +
    • NWSSLTrustedCerts - + Cette directive permet d'ajouter des certificats de confiance + pouvant être utilisés pour créer des connexions sécurisées vers + des serveurs mandataires.
    • +
    +
      +
    • NWSSLUpgradeable - + Cette directive permet de faire passer en SSL une connexion + initialisée sur les adresse IP et Port spécifiés.
    • +
    + +
    + +
    + +
    + + Compilation d'Apache pour NetWare + +

    La compilation d'Apache nécessite MetroWerks CodeWarrior 6.x ou + supérieur. Une fois compilé, Apache peut être installé à la racine + de tout volume Netware. Le répertoire d'installation par défaut est + sys:/Apache2.

    + +

    Avant de démarrer Apache, vous devez remplir le répertoire + conf. Copiez le fichier HTTPD-STD.CONF + depuis le répertoire conf de la distribution et + renommez-le en HTTPD.CONF. Editez le fichier + HTTPD.CONF en recherchant les repères + @@Value@@, et remplacez ces derniers par la valeur + appropriée. Copiez de même les fichiers conf/magic et + conf/mime.types. Vous pouvez aussi construire une + distribution complète en ajoutant le mot-clé install + lors de l'invocation des makefiles.

    + +
    + + Prérequis : + +

    Les outils de développement suivants sont nécessaires pour la + compilation d'Apache pour Netware :

    + + + +
    + +
    + + Compiler Apache en utilisant les makefiles Netware + : + +
      +
    • Définissez la variable d'environnement + NOVELLLIBC avec le chemin des bibliothèques Netware + pour C SDK ; par exemple : Set + NOVELLLIBC=c:\novell\ndk\libc
    • + +
    • Définissez la variable d'environnement + METROWERKS avec le chemin de votre compilateur + Metrowerks CodeWarrior ; par exemple : Set + METROWERKS=C:\Program Files\Metrowerks\CodeWarrior. Si + vous l'avez installé dans le répertoire par défaut + C:\Program Files\Metrowerks\CodeWarrior, vous + n'avez pas besoin de définir cette variable.
    • + +
    • Définissez la variable d'environnement LDAPSDK + avec le chemin des bibliothèques LDAP pour C ; par exemple : + Set + LDAPSDK=c:\Novell\NDK\cldapsdk\NetWare\libc
    • + +
    • Définissez la variable d'environnement ZLIBSDK + avec le chemin du code source de la bibliothèque Zlib ; par + exemple : Set ZLIBSDK=D:\NOVELL\zlib
    • + +
    • Définissez la variable d'environnement PCRESDK + avec le chemin d'installation du code source de la bibliothèque + PCRE ; par exemple : + Set PCRESDK=D:\NOVELL\pcre +
    • + +
    • Définissez la variable d'environnement AP_WORK + avec le chemin du code source de httpd. + Set AP_WORK=D:\httpd-2.0.x
    • + +
    • Définissez la variable d'environnement APR_WORK + avec le chemin du code source d'apr ; en général + \httpd\srclib\apr, mais le projet APR peut se + trouver en dehors de la structure des répertoires de httpd. + Set APR_WORK=D:\apr-1.x.x
    • + +
    • Définissez la variable d'environnement APU_WORK + avec le chemin du code source d'apr-util ; en + général \httpd\srclib\apr-util, mais le projet + APR-UTIL peut se trouver en dehors de la structure des + répertoires de httpd. Set + APU_WORK=D:\apr-util-1.x.x
    • + +
    • Vérifiez que les chemins des utilitaires AWK et GNU make + (gmake.exe) ont bien été inclus dans la variable + d'environnement système PATH.
    • + +
    • Téléchargez le code source et décompressez-le dans un + répertoire de votre choix sur votre station de travail.
    • + +
    • Positionnez-vous dans le répertoire \httpd-2.0 + et compilez les utilitaires précompilés à l'aide de la commande + "gmake -f nwgnumakefile prebuild". Cette cible va + créer le répertoire \httpd-2.0\nwprebuild, et y + copier tous les utilitaires nécessaires au franchissement des + étapes suivantes de la compilation.
    • + +
    • Copiez les fichiers + \httpd-2.0\nwprebuild\GENCHARS.nlm et + \httpd-2.0\nwprebuild\DFTABLES.nlm vers le volume + SYS: d'un serveur Netware et exécutez-les à l'aide + des commandes suivantes : + + SYS:\genchars > sys:\test_char.h
      + SYS:\dftables sys:\chartables.c
      +
      +
    • + +
    • Copiez les fichiers test_char.h et + chartables.c vers le répertoire + \httpd-2.0\os\netware de la machine où s'effectue + la compilation.
    • + +
    • Positionnez-vous dans le répertoire \httpd-2.0 + et compilez Apache à l'aide de la commande "gmake -f + nwgnumakefile". Vous pouvez créer un répertoire pour la + distribution en ajoutant le paramètre install à la commande ; + par exemple : + gmake -f nwgnumakefile install +
    • +
    + +
    + +
    + + Options de make supplémentaires + +
      +
    • gmake -f nwgnumakefile

      Compile les versions + de distribution de tous les binaires et les copie dans un + répertoire \release.

    • + +
    • gmake -f nwgnumakefile DEBUG=1

      Compile les versions + de débogage de tous les binaires et les copie dans un + répertoire \debug.

    • + +
    • gmake -f nwgnumakefile install

      Crée une + distribution complète d'Apache avec les binaires, la + documentation et les fichiers support dans un répertoire + \dist\Apache2.

    • + +
    • gmake -f nwgnumakefile prebuild

      Compile tous + les utilitaires précompilés et les copie dans le répertoire + \nwprebuild.

    • + +
    • gmake -f nwgnumakefile installdev

      Même effet + que l'option install, mais en plus, les répertoires + \lib et \include sont créés dans le + répertoire de destination, et les en-têtes et fichiers d'import + y sont copiés.

    • + +
    • gmake -f nwgnumakefile clean

      Supprime tous + les fichiers objets et les binaires de la zone de compilation + \release.o, ou \debug.o si + DEBUG a été défini.

    • + +
    • gmake -f nwgnumakefile clobber_all

      Même effet + que clean, mais en plus, le répertoire de la distribution est + supprimé s'il existe.

    • +
    + +
    + +
    + + Variables d'environnement supplémentaires + +
      +
    • Pour compiler tous les modules expérimentaux, définissez la + variable d'environnement EXPERIMENTAL : + Set EXPERIMENTAL=1 +
    • + +
    • Pour compiler Apache en utilisant les sockets de style BSD + standard, plutôt que Winsock, définissez la variable + d'environnement USE_STDSOCKETS : + Set USE_STDSOCKETS=1 +
    • + +
    + +
    + +
    + + Compilation de mod_ssl pour la plate-forme Netware + +

    Pour fournir les services SSL, Apache pour Netware utilise par + défaut le module intégré mod_nw_ssl. Ce module ne + fournit que les services SSL implémentés par le système + d'exploitation Netware lui-même pour gérer tous les chiffrements + pour un port donné. Cependant, on peut aussi utiliser mod_ssl de + la même manière que sur les autres plate-formes.

    + +

    Afin de pouvoir compiler mod_ssl pour la plate-forme Netware, + les bibliothèques OpenSSL doivent être disponibles. Elles peuvent + être installées de la manière suivante :

    + +
      +
    • Téléchargez la dernière distribution du code source + d'OpenSSL 0.9.8 depuis la page OpenSSL Source (les + versions 0.9.7 doivent être patchées, et ne sont donc pas + recommandées).
    • + +
    • Editez le fichier NetWare/set_env.bat, et + effectuez toutes modifications nécessaires des chemins des + outils et utilitaires en fonction de votre environnement de + développement.
    • + +
    • Exécutez les scripts suivants depuis la racine du + répertoire des sources d'OpenSSL : + + Netware\set_env netware-libc
      + Netware\build netware-libc +
      + Pour des raisons de performances, vous devez activer la + compilation avec le code ASM. Télécharger NASM depuis le site SF. Configurez + ensuite OpenSSL pour utiliser le code ASM : + + Netware\build netware-libc nw-nasm enable-mdc2 enable-md5 + + Attention : n'utilisez pas l'Assembleur CodeWarrior - il + produit un code de mauvaise qualité !
    • + +
    • Avant de compiler Apache, définissez la variable + d'environnement OSSLSDK avec le chemin absolu de + la racine du répertoire du code source d'openssl, et + définissez WITH_MOD_SSL à 1. + + Set OSSLSDK=d:\openssl-0.9.8x
      + Set WITH_MOD_SSL=1 +
    • + +
    + +
    + +
    + +
    + diff --git a/docs/manual/platform/netware.xml.ko b/docs/manual/platform/netware.xml.ko index 4a523417330..2e4cd18a215 100644 --- a/docs/manual/platform/netware.xml.ko +++ b/docs/manual/platform/netware.xml.ko @@ -1,7 +1,7 @@ - + -Running a High-Performance Web Server on HPUX - Apache HTTP Server +Running a High-Performance Web Server on HPUX - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Running a High-Performance Web Server on HPUX

    +Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Running a High-Performance Web Server on HPUX

    Available Languages:  en  | + fr  |  ko 

    -
    -Date: Wed, 05 Nov 1997 16:59:34 -0800
    +
    Date: Wed, 05 Nov 1997 16:59:34 -0800
     From: Rick Jones <raj@cup.hp.com>
     Reply-To: raj@cup.hp.com
     Organization: Network Performance
    -Subject: HP-UX tuning tips
    -
    +Subject: HP-UX tuning tips

    Here are some tuning tips for HP-UX to add to the tuning page.

    @@ -98,8 +102,30 @@ Subject: HP-UX tuning tips

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/perf-hp.html.fr b/docs/manual/platform/perf-hp.html.fr new file mode 100644 index 00000000000..7f376af784a --- /dev/null +++ b/docs/manual/platform/perf-hp.html.fr @@ -0,0 +1,143 @@ + + + + + +Mise en oeuvre d'un serveur Web hautes performances sous + HPUX - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Mise en oeuvre d'un serveur Web hautes performances sous + HPUX

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + + +
    Date: Wed, 05 Nov 1997 16:59:34 -0800
    +From: Rick Jones <raj@cup.hp.com>
    +Reply-To: raj@cup.hp.com
    +Organization: Network Performance
    +Subject: HP-UX tuning tips
    + +

    Traduction du corps du message cit ci-dessus :

    + +

    Voici quelques conseils de personnalisation pour HPUX ajouter + la page de personnalisation.

    + +

    Pour HP-UX 9.X: mettre jour vers la version 10.20
    + Pour HP-UX 10.[00|01|10]: mettre jour vers la version 10.20

    + +

    Pour HP-UX 10.20:

    + +

    Installez le dernier patch cumulatif propos du transport ARPA. + Ceci va vous permettre de configurer la taille de la table de + hashage de recherche de connexion TCP. La valeur par dfaut est 256 + conteneurs et doit tre une puissance de deux. cet effet, utilisez + adb pour modifier l'image *disque* du noyau. Le nom de la variable + est tcp_hash_size. Notez qu'il est impratif d'utiliser + "W" pour spcifier une quantit sur 32 bits, et non + "w" qui indique une valeur sur 16 bits, lors de la + modification de l'image disque car la variable + tcp_hash_size est une quantit sur 32 bits.

    + +

    Comment dterminer cette valeur ? Examinez la sortie de ftp://ftp.cup.hp.com/dist/networking/tools/connhist, et + comptez le nombre total de connexions TCP existant sur le systme. + Il est en gnral souhaitable que ce nombre divis par la taille de + la table de hashage soit raisonnablement petit, disons infrieur + 10. Les administrateurs peuvent consulter le document SPECweb96 de + HP pour quelques rglages courants. On peut les trouver http://www.specbench.org/. Si + un systme HP-UX traite 1000 connexions SPECweb96 par seconde, une + valeur de temps TIME_WAIT de 60 secondes permettrait le + suivi de 60000 connexions TCP.

    + +

    Les administrateurs peuvent tester la profondeur de leur file + d'attente d'coute avec ftp://ftp.cup.hp.com/dist/networking/misc/listenq.

    + +

    Si Apache s'excute sur un systme base de PA-8000, il est + conseill de modifier l'excutable Apache avec la commande chatr + afin d'utiliser une page de grande taille. La commande sera du style + "chatr +pi L <BINARY>". Le GID de l'excutable en + cours de fonctionnement doit possder le privilge + MLOCK. Pour assigner ce privilge MLOCK, + consultez Setprivgrp(1m). La modification peut tre + valide en excutant Glance et en examinant les portions de mmoire + du/des serveur(s) afin de s'assurer qu'elles montrent une fraction + non triviale du segment de texte verrouill.

    + +

    Si Apache s'excute sur un systme MP (multi-processeurs), il est + conseill d'crire un petit programme qui utilise + mpctl() et permettant d'associer les processus aux + processeurs. Un simple algorithme pid % numcpu suffira + probablement. Cette modification peut aussi tre ajoute dans le + code source.

    + +

    Si l'administrateur s'intresse au nombre de connexions + FIN_WAIT_2, il peut utiliser nettune pour diminuer la + valeur de tcp_keepstart. Il devra cependant tre + prudent - surtout ne pas diminuer cette valeur en dessous de, disons + deux quatre minutes. Si tcp_hash_size a t dfini, + il est probablement appropri de laisser les connexions + FIN_WAIT_2 prendre plus de temps expirer (peut-tre + mme la valeur par dfaut de deux heures) - elles n'auront en + gnral pas un grand impact sur les performances.

    + +

    On peut ajouter d'autres choses au code de base, mais elles + feront peut-tre l'objet d'un autre email. N'hsitez pas m'envoyer + un message si vous tes intress.

    + +

    sincrement ,

    + +

    rick jones

    + +

    http://www.netperf.org/netperf/

    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/platform/perf-hp.html.ko.euc-kr b/docs/manual/platform/perf-hp.html.ko.euc-kr index b7511c5499c..f6ec17e6dd6 100644 --- a/docs/manual/platform/perf-hp.html.ko.euc-kr +++ b/docs/manual/platform/perf-hp.html.ko.euc-kr @@ -1,37 +1,41 @@ - -HPUX ϱ - Apache HTTP Server +HPUX ϱ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    HPUX ϱ

    ֽ ƴմϴ. ֱٿ ϼ.
    -
    -Date: Wed, 05 Nov 1997 16:59:34 -0800
    +
    Date: Wed, 05 Nov 1997 16:59:34 -0800
     From: Rick Jones <raj@cup.hp.com>
     Reply-To: raj@cup.hp.com
     Organization: Network Performance
    -Subject: HP-UX tuning tips
    -
    +Subject: HP-UX tuning tips

    ߰ HP-UX ̴.

    @@ -95,8 +99,30 @@ Subject: HP-UX tuning tips

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/perf-hp.xml.fr b/docs/manual/platform/perf-hp.xml.fr new file mode 100644 index 00000000000..42d526e55df --- /dev/null +++ b/docs/manual/platform/perf-hp.xml.fr @@ -0,0 +1,126 @@ + + + + + + + + + + + Notes spécifiques aux + plates-formes + + Mise en oeuvre d'un serveur Web hautes performances sous + HPUX + + + +
    +Date: Wed, 05 Nov 1997 16:59:34 -0800
    +From: Rick Jones <raj@cup.hp.com>
    +Reply-To: raj@cup.hp.com
    +Organization: Network Performance
    +Subject: HP-UX tuning tips
    +
    + +

    Traduction du corps du message cité ci-dessus :

    + +

    Voici quelques conseils de personnalisation pour HPUX à ajouter à + la page de personnalisation.

    + +

    Pour HP-UX 9.X: mettre à jour vers la version 10.20
    + Pour HP-UX 10.[00|01|10]: mettre à jour vers la version 10.20

    + +

    Pour HP-UX 10.20:

    + +

    Installez le dernier patch cumulatif à propos du transport ARPA. + Ceci va vous permettre de configurer la taille de la table de + hashage de recherche de connexion TCP. La valeur par défaut est 256 + conteneurs et doit être une puissance de deux. À cet effet, utilisez + adb pour modifier l'image *disque* du noyau. Le nom de la variable + est tcp_hash_size. Notez qu'il est impératif d'utiliser + "W" pour spécifier une quantité sur 32 bits, et non + "w" qui indique une valeur sur 16 bits, lors de la + modification de l'image disque car la variable + tcp_hash_size est une quantité sur 32 bits.

    + +

    Comment déterminer cette valeur ? Examinez la sortie de ftp://ftp.cup.hp.com/dist/networking/tools/connhist, et + comptez le nombre total de connexions TCP existant sur le système. + Il est en général souhaitable que ce nombre divisé par la taille de + la table de hashage soit raisonnablement petit, disons inférieur à + 10. Les administrateurs peuvent consulter le document SPECweb96 de + HP pour quelques réglages courants. On peut les trouver à http://www.specbench.org/. Si + un système HP-UX traite 1000 connexions SPECweb96 par seconde, une + valeur de temps TIME_WAIT de 60 secondes permettrait le + suivi de 60000 connexions TCP.

    + +

    Les administrateurs peuvent tester la profondeur de leur file + d'attente d'écoute avec ftp://ftp.cup.hp.com/dist/networking/misc/listenq.

    + +

    Si Apache s'exécute sur un système à base de PA-8000, il est + conseillé de modifier l'exécutable Apache avec la commande chatr + afin d'utiliser une page de grande taille. La commande sera du style + "chatr +pi L <BINARY>". Le GID de l'exécutable en + cours de fonctionnement doit posséder le privilège + MLOCK. Pour assigner ce privilège MLOCK, + consultez Setprivgrp(1m). La modification peut être + validée en exécutant Glance et en examinant les portions de mémoire + du/des serveur(s) afin de s'assurer qu'elles montrent une fraction + non triviale du segment de texte verrouillé.

    + +

    Si Apache s'exécute sur un système MP (multi-processeurs), il est + conseillé d'écrire un petit programme qui utilise + mpctl() et permettant d'associer les processus aux + processeurs. Un simple algorithme pid % numcpu suffira + probablement. Cette modification peut aussi être ajoutée dans le + code source.

    + +

    Si l'administrateur s'intéresse au nombre de connexions + FIN_WAIT_2, il peut utiliser nettune pour diminuer la + valeur de tcp_keepstart. Il devra cependant être + prudent - surtout ne pas diminuer cette valeur en dessous de, disons + deux à quatre minutes. Si tcp_hash_size a été défini, + il est probablement approprié de laisser les connexions + FIN_WAIT_2 prendre plus de temps à expirer (peut-être + même la valeur par défaut de deux heures) - elles n'auront en + général pas un grand impact sur les performances.

    + +

    On peut ajouter d'autres choses au code de base, mais elles + feront peut-être l'objet d'un autre email. N'hésitez pas à m'envoyer + un message si vous êtes intéressé.

    + +

    sincèrement ,

    + +

    rick jones

    + +

    http://www.netperf.org/netperf/

    + +
    + +
    + + diff --git a/docs/manual/platform/perf-hp.xml.meta b/docs/manual/platform/perf-hp.xml.meta index 7a68ad8a1e2..f633bb000d9 100644 --- a/docs/manual/platform/perf-hp.xml.meta +++ b/docs/manual/platform/perf-hp.xml.meta @@ -8,6 +8,7 @@ en + fr ko diff --git a/docs/manual/platform/rpm.html b/docs/manual/platform/rpm.html new file mode 100644 index 00000000000..8776009a2e5 --- /dev/null +++ b/docs/manual/platform/rpm.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: rpm.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/platform/rpm.html.en b/docs/manual/platform/rpm.html.en new file mode 100644 index 00000000000..23a1aeb70fb --- /dev/null +++ b/docs/manual/platform/rpm.html.en @@ -0,0 +1,246 @@ + + + + + +Using Apache With RPM Based Systems (Redhat / CentOS / Fedora) - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    Using Apache With RPM Based Systems (Redhat / CentOS / Fedora)

    +
    +

    Available Languages:  en 

    +
    + + +

    While many distributions make Apache httpd available as operating system + supported packages, it can sometimes be desirable to install and use the + canonical version of Apache httpd on these systems, replacing the natively + provided versions of the packages.

    + +

    While the Apache httpd project does not currently create binary RPMs + for the various distributions out there, it is easy to build your own + binary RPMs from the canonical Apache httpd tarball.

    + +

    This document explains how to build, install, configure and run + Apache httpd 2.4 under Unix systems supporting the RPM packaging format.

    + +
    + +
    top
    +
    +

    Creating a Source RPM

    + + +

    The Apache httpd source tarball can be converted into an SRPM as + follows:

    + +

    + rpmbuild -ts httpd-2.4.x.tar.bz2 +

    + +
    top
    +
    +

    Building RPMs

    + + +

    RPMs can be built directly from the Apache httpd source tarballs using + the following command:

    + +

    + rpmbuild -tb httpd-2.4.x.tar.bz2 +

    + +

    Corresponding "-devel" packages will be required to be installed on your + build system prior to building the RPMs, the rpmbuild command + will automatically calculate what RPMs are required and will list any + dependencies that are missing on your system. These "-devel" packages will + not be required after the build is completed, and can be safely removed.

    + +

    If successful, the following RPMs will be created:

    + +
    +
    httpd-2.4.x-1.i686.rpm
    +
    The core server and basic module set.
    + +
    httpd-debuginfo-2.4.x-1.i686.rpm
    +
    Debugging symbols for the server and all modules.
    + +
    httpd-devel-2.4.x-1.i686.rpm
    +
    Headers and development files for the server.
    + +
    httpd-manual-2.4.x-1.i686.rpm
    +
    The webserver manual.
    + +
    httpd-tools-2.4.x-1.i686.rpm
    +
    Supporting tools for the webserver.
    + +
    mod_authnz_ldap-2.4.x-1.i686.rpm
    +
    mod_ldap and mod_authnz_ldap, with + corresponding dependency on openldap.
    + +
    mod_lua-2.4.x-1.i686.rpm
    +
    mod_lua module, with + corresponding dependency on lua.
    + +
    mod_proxy_html-2.4.x-1.i686.rpm
    +
    mod_proxy_html module, with + corresponding dependency on libxml2.
    + +
    mod_socache_dc-2.4.x-1.i686.rpm
    +
    mod_socache_dc module, with + corresponding dependency on distcache.
    + +
    mod_ssl-2.4.x-1.i686.rpm
    +
    mod_ssl module, with + corresponding dependency on openssl.
    + +
    + +
    top
    +
    +

    Installing the Server

    + + +

    The httpd RPM is the only RPM necessary to get a basic + server to run. Install it as follows:

    + +

    + rpm -U httpd-2.4.x-1.i686.rpm +

    + +

    Self contained modules are included with the server. Modules that + depend on external libraries are provided as separate RPMs to install + if needed.

    + +
    top
    +
    +

    Configuring the Default Instance of Apache httpd

    + + +

    The default configuration for the server is installed by default + beneath the /etc/httpd directory, with logs written by + default to /var/log/httpd. The environment for the + webserver is set by default within the optional + /etc/sysconfig/httpd file.

    + +

    Start the server as follows:

    + +

    + service httpd restart +

    + +
    top
    +
    +

    Configuring Additional Instances of Apache httpd on the Same Machine

    + + +

    It is possible to configure additional instances of the Apache + httpd server running independently alongside each other on the same + machine. These instances can have independent configurations, and + can potentially run as separate users if so configured.

    + +

    This was done by making the httpd startup script aware of its own + name. This name is then used to find the environment file for the + server, and in turn, the server root of the server instance.

    + +

    To create an additional instance called + httpd-additional, follow these steps:

    + +
      +
    • Create a symbolic link to the startup script for the additional + server: + +

      + ln -s /etc/rc.d/init.d/httpd /etc/rc.d/init.d/httpd-additional
      + chkconfig --add httpd-additional +

      + +
    • + +
    • Create an environment file for the server, using the + /etc/sysconfig/httpd file as a template: + +

      + # template from httpd
      + cp /etc/sysconfig/httpd /etc/sysconfig/httpd-additional +

      + +

      + # blank template
      + touch /etc/sysconfig/httpd-additional +

      + + Edit /etc/sysconfig/httpd-additional and pass the + server root of the new server instance within the + OPTIONS environment variable. + +

      + OPTIONS="-d /etc/httpd-additional -f conf/httpd-additional.conf" +

      + +
    • + +
    • Edit the server configuration file + /etc/httpd-additional/conf/httpd-additional.conf to + ensure the correct ports and paths are configured. +
    • + +
    • Start the server as follows: + +

      + service httpd-additional restart +

      + +
    • + +
    • Repeat this process as required for each server instance.
    • +
    + +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/platform/rpm.xml b/docs/manual/platform/rpm.xml new file mode 100644 index 00000000000..8aac7c0dd4f --- /dev/null +++ b/docs/manual/platform/rpm.xml @@ -0,0 +1,215 @@ + + + + + + + + + Platform Specific Notes + + Using Apache With RPM Based Systems (Redhat / CentOS / Fedora) + + + +

    While many distributions make Apache httpd available as operating system + supported packages, it can sometimes be desirable to install and use the + canonical version of Apache httpd on these systems, replacing the natively + provided versions of the packages.

    + +

    While the Apache httpd project does not currently create binary RPMs + for the various distributions out there, it is easy to build your own + binary RPMs from the canonical Apache httpd tarball.

    + +

    This document explains how to build, install, configure and run + Apache httpd 2.4 under Unix systems supporting the RPM packaging format.

    + +
    + +
    + Creating a Source RPM + +

    The Apache httpd source tarball can be converted into an SRPM as + follows:

    + + + rpmbuild -ts httpd-2.4.x.tar.bz2 + + +
    + +
    + Building RPMs + +

    RPMs can be built directly from the Apache httpd source tarballs using + the following command:

    + + + rpmbuild -tb httpd-2.4.x.tar.bz2 + + +

    Corresponding "-devel" packages will be required to be installed on your + build system prior to building the RPMs, the rpmbuild command + will automatically calculate what RPMs are required and will list any + dependencies that are missing on your system. These "-devel" packages will + not be required after the build is completed, and can be safely removed.

    + +

    If successful, the following RPMs will be created:

    + +
    +
    httpd-2.4.x-1.i686.rpm
    +
    The core server and basic module set.
    + +
    httpd-debuginfo-2.4.x-1.i686.rpm
    +
    Debugging symbols for the server and all modules.
    + +
    httpd-devel-2.4.x-1.i686.rpm
    +
    Headers and development files for the server.
    + +
    httpd-manual-2.4.x-1.i686.rpm
    +
    The webserver manual.
    + +
    httpd-tools-2.4.x-1.i686.rpm
    +
    Supporting tools for the webserver.
    + +
    mod_authnz_ldap-2.4.x-1.i686.rpm
    +
    mod_ldap and mod_authnz_ldap, with + corresponding dependency on openldap.
    + +
    mod_lua-2.4.x-1.i686.rpm
    +
    mod_lua module, with + corresponding dependency on lua.
    + +
    mod_proxy_html-2.4.x-1.i686.rpm
    +
    mod_proxy_html module, with + corresponding dependency on libxml2.
    + +
    mod_socache_dc-2.4.x-1.i686.rpm
    +
    mod_socache_dc module, with + corresponding dependency on distcache.
    + +
    mod_ssl-2.4.x-1.i686.rpm
    +
    mod_ssl module, with + corresponding dependency on openssl.
    + +
    + +
    + +
    + Installing the Server + +

    The httpd RPM is the only RPM necessary to get a basic + server to run. Install it as follows:

    + + + rpm -U httpd-2.4.x-1.i686.rpm + + +

    Self contained modules are included with the server. Modules that + depend on external libraries are provided as separate RPMs to install + if needed.

    + +
    + +
    + Configuring the Default Instance of Apache httpd + +

    The default configuration for the server is installed by default + beneath the /etc/httpd directory, with logs written by + default to /var/log/httpd. The environment for the + webserver is set by default within the optional + /etc/sysconfig/httpd file.

    + +

    Start the server as follows:

    + + + service httpd restart + + +
    + +
    + Configuring Additional Instances of Apache httpd on the Same Machine + +

    It is possible to configure additional instances of the Apache + httpd server running independently alongside each other on the same + machine. These instances can have independent configurations, and + can potentially run as separate users if so configured.

    + +

    This was done by making the httpd startup script aware of its own + name. This name is then used to find the environment file for the + server, and in turn, the server root of the server instance.

    + +

    To create an additional instance called + httpd-additional, follow these steps:

    + +
      +
    • Create a symbolic link to the startup script for the additional + server: + + + ln -s /etc/rc.d/init.d/httpd /etc/rc.d/init.d/httpd-additional
      + chkconfig --add httpd-additional +
      + +
    • + +
    • Create an environment file for the server, using the + /etc/sysconfig/httpd file as a template: + + + # template from httpd
      + cp /etc/sysconfig/httpd /etc/sysconfig/httpd-additional +
      + + + # blank template
      + touch /etc/sysconfig/httpd-additional +
      + + Edit /etc/sysconfig/httpd-additional and pass the + server root of the new server instance within the + OPTIONS environment variable. + + + OPTIONS="-d /etc/httpd-additional -f conf/httpd-additional.conf" + + +
    • + +
    • Edit the server configuration file + /etc/httpd-additional/conf/httpd-additional.conf to + ensure the correct ports and paths are configured. +
    • + +
    • Start the server as follows: + + + service httpd-additional restart + + +
    • + +
    • Repeat this process as required for each server instance.
    • +
    + +
    + +
    + diff --git a/docs/manual/platform/rpm.xml.meta b/docs/manual/platform/rpm.xml.meta new file mode 100644 index 00000000000..bf85489f9af --- /dev/null +++ b/docs/manual/platform/rpm.xml.meta @@ -0,0 +1,12 @@ + + + + + rpm + /platform/ + .. + + + en + + diff --git a/docs/manual/platform/win_compiling.html b/docs/manual/platform/win_compiling.html index 2ac828ca299..43ef475732d 100644 --- a/docs/manual/platform/win_compiling.html +++ b/docs/manual/platform/win_compiling.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: win_compiling.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: win_compiling.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/platform/win_compiling.html.en b/docs/manual/platform/win_compiling.html.en index 997b52e849a..02ea281dec2 100644 --- a/docs/manual/platform/win_compiling.html.en +++ b/docs/manual/platform/win_compiling.html.en @@ -1,43 +1,53 @@ - -Compiling Apache for Microsoft Windows - Apache HTTP Server +Compiling Apache for Microsoft Windows - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Compiling Apache for Microsoft Windows

    +Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Compiling Apache for Microsoft Windows

    Available Languages:  en  | + fr  |  ko 

    There are many important points to consider before you begin compiling - Apache. See Using Apache with Microsoft - Windows before you begin.

    + Apache HTTP Server (httpd). See Using Apache HTTP + Server on Microsoft Windows before you begin.

    + +

    httpd can be built on Windows using a cmake-based build system or with + Visual Studio project files maintained by httpd developers. The cmake-based + build system directly supports more versions of Visual Studio but currently + has considerable functional limitations.

    - +
    top
    top
    -
    -

    Command-Line Build

    + + +

    Building from Unix sources

    + + + +

    The policy of the Apache HTTP Server project is to only release Unix sources. + Windows source packages made available for download have been supplied by + volunteers and may not be available for every release. You can still build + the server on Windows from the Unix source tarball with just a few additional + steps.

    + +
      +
    1. Download and unpack the Unix source tarball for the latest version.
    2. +
    3. Download and unpack the Unix source tarball for latest version of + APR, AR-Util and APR-Iconv, place these sources in directories httpd-2.x.x\srclib\apr, httpd-2.x.x\srclib\apr-util and httpd-2.x.x\srclib\apr-iconv
    4. +
    5. Open a Command Prompt and CD to the httpd-2.x.x folder
    6. +
    7. Run the line endings conversion utility at the prompt;
    8. +
    + +

    + perl srclib\apr\build\lineends.pl +

    + +

    You can now build the server with the Visual Studio development + environment using the IDE. Command-Line builds of the server are not + possible from Unix sources unless you export .mak files as explained + below. +

    + + + +

    Command-Line Build

    @@ -271,9 +311,9 @@ Review the initial comments in Makefile.win for additional options that can be provided when invoking the build.

    -
    top
    -
    -

    Developer Studio Workspace IDE Build

    + + +

    Developer Studio Workspace IDE Build

    @@ -327,9 +367,9 @@ zlib exist, and based on the setting of DBD_LIST and DBM_LIST environment variables.

    -
    top
    -
    -

    Exporting command-line .mak files

    + + +

    Exporting command-line .mak files

    @@ -371,9 +411,9 @@ should be simple, with minimal compilation and linkage flags that can be recognized by all Visual Studio environments.

    -
    top
    -
    -

    Installation

    + + +

    Installation

    @@ -395,9 +435,9 @@ to be installed into \Apache22 (of the current drive).

    -
    top
    -
    -

    Warning about building Apache from the development tree

    + + +

    Warning about building Apache from the development tree

    @@ -409,11 +449,60 @@ unnecessary if you build from within the Microsoft Developer Studio environment.
    + +
    top
    +
    +

    Building httpd with cmake

    + + +

    The primary documentation for this build mechanism is in the + README.cmake file in the source distribution. Refer to that file + for detailed instructions.

    + +

    Building httpd with cmake requires building APR and APR-util separately. + Refer to their README.cmake files for instructions.

    + +

    The primary limitations of the cmake-based build are inherited from the APR-util + project, and are listed below because of their impact on httpd:

    + +
      +
    • No cmake build for the APR-iconv subproject is available, and the + APR-util cmake build cannot consume an existing APR-iconv build. Thus, + mod_charset_lite and possibly some third-party modules + cannot be used.
    • +
    • The cmake build for the APR-util subproject does not support most of the + optional DBM and DBD libraries supported by the included Visual Studio + project files. This limits the database backends supported by a number of + bundled and third-party modules.
    • +
    +

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/win_compiling.html.fr b/docs/manual/platform/win_compiling.html.fr new file mode 100644 index 00000000000..9358a9a23f2 --- /dev/null +++ b/docs/manual/platform/win_compiling.html.fr @@ -0,0 +1,594 @@ + + + + + +Compiler Apache pour Microsoft Windows - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Compiler Apache pour Microsoft Windows

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + + +

    Il y a de nombreux points importants connatre avant de + compiler Le serveur HTTP Apache pour Microsoft Windows. Avant de commencer, lisez le + document Utiliser le serveur HTTP Apache avec Microsoft + Windows.

    + +

    httpd peut tre compil sous Windows en utilisant une chane de + compilation base sur cmake, ou partir de fichiers projet Visual + Studio maintenus par les dveloppeurs de httpd. La chane de + compilation base sur cmake supporte directement davantage de + versions de Visual Studio, mais possde actuellement des + fonctionnalits trs limites.

    + +
    + +
    top
    +
    +

    Prrequis

    + + + +

    Pour compiler Apache, l'environnement doit satisfaire aux + conditions suivantes :

    + +
      +
    • +

      Espace disque

      + +

      Assurez-vous de disposer d'un minimum de 200 Mo d'espace + disque disponible. Aprs l'installation, Apache occupe environ + 80 Mo d'espace disque, plus l'espace rserv aux journaux et au + cache, la taille de ces derniers pouvant augmenter rapidement. + Les besoins rels en espace disque dpendent troitement de la + configuration choisie et des bibliothques ou modules tiers + installs, en particulier lorsqu'OpenSSL est mis en oeuvre. + Comme de nombreux fichiers sont au format texte et donc + facilement compressibles, l'utilisation de la compression du + systme de fichiers NTFS divise ces besoins par deux.

      +
    • + +
    • +

      Correctifs requis

      + +

      Le binaire httpd est compil l'aide de nombreux correctifs + appliqus aux paquets tiers, ce qui permet de s'assurer que le + code fourni est bien compilable et dboguable. Ces correctifs + sont disponibles http://www.apache.org/dist/httpd/binaries/win32/patches_applied/, + et il est recommand de les appliquer afin d'obtenir un + rsultat identique aux binaires "officiels" distribus par + l'ASF.

      +
    • + +
    • +

      Microsoft Visual C++ 6.0 (Visual Studio 97) ou suprieur.

      + +

      Apache peut tre compil en utilisant l'outil ligne de + commande, ou depuis l'espace de travail IDE Visual Studio. Pour + la compilation depuis la ligne de commandes, l'environnement + doit comporter les variables the PATH, + INCLUDE, LIB, ainsi que d'autres + variables qui peuvent tre dfinies via le script + vcvars32.bat :

      + +
      Vous pouvez vous procurer le paquet du Processeur Visual + Studio pour votre ancienne version de Visual Studio, ou une + version complte (et non Express) d'une dition plus rcente de + Visual Studio pour l'assembleur ml.exe. Ceci vous permettra, si + vous le souhaitez, de compiler OpenSSL en utilisant une + implmentation du code d'assemblage plus efficace.
      + +
      Seule la chane d'outils de compilation de Microsoft est + supporte de manire suivie par les contributeurs actifs httpd. + Bien que le projet accepte rgulirement des correctifs pour + s'assurer que MinGW et d'autre outils de compilation + fonctionnent, ou mme pour les amliorer, ils ne sont pas + maintenus de manire suivie et sont mme souvent hors d'tat + de fonctionner certains stades du dveloppement normal.
      +
    • + +
    • +

      Le SDK de la plate-forme Windows mis jour, fvrier 2003 ou + plus rcent.

      + +

      Un SDK appropri pour la plate-forme Windows est inclus par + dfaut dans les versions compltes (et non Express/lite) de + Visual C++ 7.1 (Visual Studio 2002) et suprieures ; les + utilisateurs peuvent ignorer ces tapes, moins qu'ils aient + choisi d'utiliser une version plus rcente ou diffrente du SDK.

      + +

      Pour pouvoir utiliser Visual C++ 6.0 or 7.0 (Studio 2000 + .NET), l'environnement du SDK de la plate-forme doit tre prpar en utilisant le + script setenv.bat (install par le SDK de la plate-forme) avant de + lancer la compilation en ligne de commande ou l'interface GUI + msdev/devenv. L'installation du SDK de la plate-forme pour les + versions Express de Visual Studio (2003 et suprieures) devrait + ajuster l'environnement par dfaut de manire approprie.

      + +

      + "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32"
      + "c:\Program Files\Platform SDK\setenv.bat" +

      + + +
    • + +
    • +

      Perl et awk

      + +

      De nombreuses tapes recommandes ici ncessitent un + interprteur perl durant le processus de prparation de la + compilation.

      + +

      Pour installer Apache partir du systme de compilation, de + nombreux fichiers sont modifis via l'utilitaire + awk.exe. awk effectue la modification des fichiers + au moment de l'installation ; il a t choisi car il ncessite + un tlchargement de petite taille (par rapport Perl ou + WSH/VB). Le site de Brian Kernighan http://www.cs.princeton.edu/~bwk/btl.mirror/ propose un + binaire prcompil pour Win32, http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe, que + vous devez enregistrer sous le nom awk.exe (plutt + que awk95.exe).

      + +
      Si awk.exe n'est pas trouv, la cible install du fichier + Makefile.win n'effectuera aucune substitution dans les fichiers + .conf installs. Vous devez modifier manuellement les fichiers + .conf installs afin de permettre au serveur de dmarrer. + Recherchez et remplacez toutes les balises "@token@" par une + valeur approprie.
      + +
      L'IDE Visual Studio ne trouvera le chemin de + awk.exe que dans la variable PATH, ou dans le + chemin des excutables spcifi par l'option de menu Tools -> + Options -> (Projects ->) Directories. Assurez-vous + qu'awk.exe est bien dans votre chemin systme.
      + +
      Notez aussi, si vous utilisez les outils Cygwin (http://www.cygwin.com/), que + l'utilitaire awk de nomme gawk.exe et que le + fichier awk.exe est en fait un lien symbolique vers + le fichier gawk.exe. Le shell de commandes Windows + ne reconnat pas les liens symboliques, et par consquent la + compilation d'InstallBin chouera. Pour contourner le problme, + vous pouvez supprimer le lien awk.exe de + l'installation de Cygwin, et copier gawk.exe vers + awk.exe. Notez aussi que les portages cygwin/mingw + de gawk 3.0.x taient bogus ; veuillez par consquent effectuer + une mise jour vers la version 3.1.x avant l'utilisation de + tout portage de gawk.
      +
    • + +
    • +

      [Optionnel] bibliothque zlib (pour le module + mod_deflate)

      + +

      Zlib doit tre installe dans un sous-rpertoire du + rpertoire srclib et nomm zlib. Elle + doit tre compile directement cette place. Zlib est + disponible l'adresse http://www.zlib.net/ -- le + fonctionnement correct du module mod_deflate a + t vrifi avec la version 1.2.3.

      + +

      + nmake -f win32\Makefile.msc
      + nmake -f win32\Makefile.msc test +

      +
    • + +
    • +

      [Optionnel] Bibliothques OpenSSL (pour le module + mod_ssl et ab.exe avec le support + ssl)

      + +
      La bibliothque OpenSSL est un logiciel de chiffrement. Le + pays dans lequel vous rsidez peut imposer des restrictions + l'importation, la possession, l'utilisation, et/ou la + rexportation vers un autre pays des logiciels de chiffrement. + AVANT d'utiliser tout logiciel de chiffrement, veuillez + consulter la lgislation de votre pays, les rgles et politiques + d'importation, de possession, ou d'utilisation, et de + rexportation des logiciels de chiffrement, afin de dterminer + si vous en avez le droit. Voir http://www.wassenaar.org/ + pour plus de dtails.
      + +

      La configuration et la compilation d'OpenSSL ncessite + l'installation de perl.

      + +

      Pour pouvoir compiler mod_ssl ou le projet + abs.exe, qui devient ab.c avec le support SSL + activ, vous devez + tlcharger OpenSSL l'adresse http://www.openssl.org/source/, + et l'installer dans un sous-rpertoire du rpertoire + srclib que vous nommerez openssl. Afin + de prparer OpenSSL la liaison avec le module Apache mod_ssl + ou abs.exe, et dsactiver les fonctionnalits d'Openssl grves + de brevets, vous pouvez utiliser la commande de compilation + suivante :

      + +

      + perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 + -Ipath/to/srclib/zlib -Lpath/to/srclib/zlib
      + ms\do_masm.bat
      + nmake -f ms\ntdll.mak +

      + +
      Il est dconseill d'utiliser zlib-dynamic, car la charge + de la dcompression des flux SSL est alors transfre la + premire requte qui doit charger la dll zlib. Notez que le + correctif propos active le drapeau -L afin de pouvoir + fonctionner avec les compilations Windows, corrige le nom de + zdll.lib et s'assure que les fichiers .pdb sont gnrs afin de + pouvoir rsoudre les problmes. Si l'assembleur n'est pas + install, vous devez ajouter no-asm ci-dessus et utiliser le + script ms\do_ms.bat la place de ms\do_masm.bat.
      +
    • + +
    • +

      [Optionnel] Bibliothques de bases de donnes (pour +mod_dbd et mod_authn_dbm)

      + +

      La bibliothque apr-util fournit un accs aux fonctionnalits + clients dbm (base de donnes base de cls) et dbd (base de + donnes base de requtes) au serveur httpd et certains de + ses modules, comme les modules d'authentification et + d'autorisation. Les fournisseurs sdbm dbm et odbc dbd sont + compils automatiquement.

      + +

      Le support dbd inclut le paquet instantclient Oracle, MySQL, + PostgreSQL et sqlite. Par exemple, pour les compiler tous, + dfinissez LIB de faon inclure le chemin des bibliothques, + INCLUDE de faon inclure le chemin des en-ttes, et PATH de + faon inclure le chemin des dll et bin de chacun des quatre + SDK, et dfinissez la variable d'environnement DBD_LIST de faon + indiquer au processus de compilation quels SDKs pilotes + clients du sont correctement installs ; par exemple :

      + +

      + set DBD_LIST=sqlite3 pgsql oracle mysql +

      + +

      De manire similaire, le support dbm peut tre tendu avec + DBM_LIST pour compiler un fournisseur Berkeley DB (db) et/ou un + fournisseur gdbm, en configurant tout d'abord de la mme manire + LIB, INCLUDE et PATH afin de s'assurer que les bibliothques et + en-ttes de la bibliothque client sont bien disponibles.

      + +

      + set DBM_LIST=db gdbm +

      + +
      En fonction du choix des distributions de bases de + donnes, il peut s'avrer ncessaire de modifier le nom des + cibles de l'dition de liens (par exemple gdbm.lib la place de + libgdb.lib) listes dans les fichiers .dsp/.mak des rpertoires + srclib\apr-util\dbd ou ...\dbm correspondants.
      + +

      Voir le fichier README-win32.txt pour plus d'informations + propos de l'obtention des diffrents SDKs pilotes de bases de + donnes.

      +
    • + +
    + +
    top
    +
    +

    Compilation partir des sources Unix

    + + + +

    Le projet du serveur HTTP Apache pour politique de ne fournir + que des sources de type Unix. Les paquets source de type Windows + disponibles en tlchargement ont t labors par des + contributeurs, et ne seront pas forcment reconduits pour toutes les + versions. Vous pouvez cependant compiler le serveur sous Windows + partir des sources Unix en ajoutant quelques tapes supplmentaires.

    + +
      +
    1. Tlchargez et ouvrez le tarball source Unix de la dernire + version du serveur HTTP Apache.
    2. +
    3. Tlchargez et ouvrez le tarball source Unix de la dernire + version de APR, APR-Util et APR-Iconv, et copier l'arborescence + obtenue dans httpd-2.x.x\srclib\apr, httpd-2.x.x\srclib\apr-util + et httpd-2.x.x\srclib\apr-iconv
    4. +
    5. Ouvrez la console et placez-vous au niveau du rpertoire httpd-2.x.x
    6. +
    7. Excutez l'utilitaire de conversion de fins de ligne
    8. +
    + +

    + perl srclib\apr\build\lineends.pl +

    + +

    Vous pouvez maintenant compiler le serveur via l'environnement de + dveloppement Visual Studio en utilisant l'IDE. Les compilations + du serveur en ligne de commande ne sont possibles avec des sources + de type Unix que si vous exportez les fichiers .mak comme indiqu + ci-dessous. +

    + +
    top
    +
    +

    Compilation partir de la ligne de commandes

    + + + +

    Makefile.win est le makefile principal ou racine + d'Apache. Pour compiler Apache sous Windows, utilisez simplement une + des commandes suivantes pour compiler la version + release ou debug :

    + +

    + nmake /f Makefile.win _apacher

    + nmake /f Makefile.win _apached +

    + + +

    Ces deux commandes effectuent la compilation d'Apache. Cependant, + avec la deuxime, les fichiers rsultants ne seront pas optimiss, + ce qui va faciliter l'examen pas pas du code pour trouver des + bogues et rsoudre les problmes.

    + +

    Vous pouvez indiquer vos choix en matire de fournisseurs dbd et + dbm l'aide des variables (d'environnement) additionnelles de make + DBD_LIST et DBM_LIST ; voir les commentaires propos des + [Optionnel] Bibliothques de bases de donnes ci-dessus. Consultez + les commentaires initiaux dans Makefile.win pour plus d'options + pouvant tre fournies lors de la compilation.

    + +
    top
    +
    +

    Compilation depuis l'espace de travail IDE de Developer + Studio

    + + + +

    Apache peut aussi tre compil depuis l'environnement de + dveloppement Visual Studio de VC++. Pour simplifier ce processus, + l'espace de travail Visual Studio Apache.dsw est + fourni. Cet espace de travail expose la liste complte des projets + .dsp actifs ncessaires l'installation binaire + complte d'Apache. Il inclut les dpendances entre projets afin que + ces derniers soient compils selon l'ordre appropri.

    + +

    Ouvrez l'espace de travail Apache.dsw, et + slectionnez InstallBin (compilation + Release ou Debug, selon vos souhaits) + comme Active Project. InstallBin provoque la + compilation de tous les projets concerns, puis invoque + Makefile.win pour installer les excutables et dlls + compils. Vous pouvez modifier la valeur de INSTDIR= + via la configuration de InstallBin, onglet Gnral, + entre ligne de commandes de compilation. La valeur par dfaut de + INSTDIR est le rpertoire /Apache2. Si + vous dsirez effectuer un test de compilation (sans installation), + slectionnez le projet BuildBin.

    + +

    Les fichiers projets .dsp sont distribus au format + Visual Studio 6.0 (98). Visual C++ 5.0 (97) les reconnat. Les + utilisateurs de Visual Studio 2002 (.NET) et versions suprieures + doivent convertir Apache.dsw et les fichiers + .dsp en un projet Apache.sln, ainsi que + les fichiers .msproj ; assurez-vous de reconvertir le + fichier .msproj si l'un des fichiers source + .dsp est modifi ! Cette opration est vraiment trs + simple, il suffit de rouvrir Apache.dsw dans l'IDE + VC++ 7.0 et de le reconvertir.

    + + +
    Il y a une erreur dans la conversion .vcproj des fichiers + .dsp. devenv.exe interprte mal le drapeau + /D pour les drapeaux RC contenant de grandes /D'finitions entoures + de guillemets, et contenant elles-mmes des espaces. Ainsi, la + commande : +

    + perl srclib\apr\build\cvtdsp.pl -2005 +

    + va convertir les drapeaux /D pour les drapeaux RC afin d'utiliser + une syntaxe alternative, interprtable ; malheureusement, cette + syntaxe n'est pas supporte par Visual Studio 97 ou ses fichiers + .mak exports. Ces drapeaux /D permettent de transmettre la longue + description des fichiers de mod_apachemodule.so leurs compilations + d'identificateur de version de ressource .rc partage.
    + + + +

    Les utilisateurs de Visual Studio 2002 (.NET) et versions + suprieures doivent aussi utiliser + la bote de dialogue Configuration Manager du menu Build pour + dcocher les deux versions Debug et + Release des modules mod_ssl + et mod_deflate pour abs. Ces modules + sont compils + en invoquant nmake ou directement l'IDE avec la cible + BinBuild pour compiler ces modules de manire + conditionnelle si les sous-rpertoires de srclib + openssl et/ou zlib existent, et en + fonction des dfinitions des variables d'environnement + DBD_LIST et DBM_LIST.

    + +
    top
    +
    +

    Export des fichiers .mak de la ligne de commandes

    + + + + +

    Les fichiers .mak exports posent plus de problmes, + mais les utilisateurs de Visual C++ 5.0 en ont besoin pour compiler + mod_ssl, abs (ab avec support + SSL) et/ou mod_deflate. Les fichiers .mak + supportent aussi un choix plus large de distributions de chanes + d'outils C++, comme Visual Studio Express.

    + +

    Vous devez tout d'abord compiler tous les projets afin de crer + toutes les cibles dynamiques auto-gnres, de faon ce que les + dpendances puissent tre interprtes correctement. Compilez + l'ensemble du projet depuis l'IDE Visual Studio 6.0 (98), en + utilisant la cible BuildAll, puis utilisez le menu de + projet Export pour tous les makefiles (en cochant "with + dependencies"). Utilisez la commande suivante pour transformer les + chemins absolus en chemins relatifs de faon ce que la compilation + puisse s'effectuer depuis n'importe quelle position dans + l'arborescence :

    + +

    + perl srclib\apr\build\fixwin32mak.pl +

    + +

    Vous devez excuter cette commande depuis la racine de + l'arborescence des sources de httpd. Tout fichier projet + .mak et .dep du rpertoire courant et de + ses sous-rpertoires sera corrig, et les repres de temps ajusts + en fonction des .dsp.

    + +

    Vrifiez toujours le SDK de la plate-forme ou autres chemins + fichiers locaux, spcifiques la machine dans les fichiers + .mak et .dep gnrs. Le rpertoire + DevStudio\Common\MSDev98\bin\ (VC6) contient un fichier + sysincl.dat qui numre toutes les exceptions. Mettez + jour ce fichier (en particulier les chemins avec slashes et + anti-slashes, tels que sys/time.h et + sys\time.h) de faon ignorer ces nouvelles + dpendances. Inclure les chemins d'installation locale dans un + fichier .mak distribu fera chouer la + compilation.

    + +

    Si vous soumettez un patch qui modifie les fichiers projet, nous + devons valider la modification de ces fichiers projet au format + Visual Studio 6.0. Les modifications doivent tres simples, avec un + minimum de drapeaux de compilation et d'dition de liens qui + pourront tre reconnus par tous les environnements Visual + Studio.

    + +
    top
    +
    +

    Installation

    + + + + +

    Une fois compil, Apache doit tre install dans le rpertoire + racine du serveur. La valeur par dfaut est le rpertoire + \Apache2, sur le mme disque.

    + +

    Pour compiler et installer automatiquement tous les fichiers dans + le rpertoire rep dsir, utilisez une des commandes + nmake suivantes :

    + +

    + nmake /f Makefile.win installr INSTDIR=dir
    + nmake /f Makefile.win installd INSTDIR=dir +

    + +

    L'argument rep de INSTDIR permet de + spcifier le rpertoire d'installation ; il peut tre omis si Apache + doit tre install dans \Apache22 (du lecteur de disque + courant.

    + +
    top
    +
    +

    Avertissement propos de la compilation d'Apache partir de +l'arborescence de dveloppement

    + + + +
    Notez que seuls les fichiers .dsp sont + maintenus d'une distribution release l'autre. Les + fichiers .mak ne sont PAS rgnrs, suite + l'norme perte de temps des relecteurs . Vous ne + pouvez donc pas utiliser les commandes NMAKE + ci-dessus pour compiler des fichiers de projet .dsp + rviss si vous n'exporter pas ensuite vous-mme tous les + fichiers .mak du projet. Ceci n'est pas ncessaire + si vous effectuez la compilation depuis l'environnement + Microsoft Developer Studio.
    + +
    top
    +
    +

    Compilation de httpd avec cmake

    + + +

    La documentation principale pour ce mcanisme de compilation se trouve + dans le fichier README.cmake situ dans l'arborescence + des sources. Consultez ce fichier pour des instructions dtailles.

    + +

    Pour compiler httpd avec cmake, vous devez compiler APR et APR-util + sparment. Consultez les fichiers README.cmake de ces + projets pour obtenir des instructions.

    + +

    Les principales limitations de la compilation base sur cmake sont + hrites du projet APR-util et sont numres ci-dessous cause de + leur impact sur httpd :

    + +
      +
    • Il n'est pas possible de compiler le projet APR-iconv avec + cmake, et la compilation de APR-util ne peut pas utiliser de projet + APR-iconv prcompil. A cause de cela, il n'est pas possible + d'utiliser mod_charset_lite et probablement + d'autres modules tiers.
    • +
    • La compilation du sous-projet APR-util avec cmake ne supporte + pas la plupart des bibliothques optionnelles DBM et DBD utilises + par les fichiers projet Visual Studio inclus. Cela limite les + serveurs de bases de donnes d'arrire-plan supports par de + nombreux modules tiers ou inclus.
    • +
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/platform/win_compiling.html.ko.euc-kr b/docs/manual/platform/win_compiling.html.ko.euc-kr index 15cab04fe61..24856119c86 100644 --- a/docs/manual/platform/win_compiling.html.ko.euc-kr +++ b/docs/manual/platform/win_compiling.html.ko.euc-kr @@ -1,24 +1,30 @@ - -Microsoft Windows ġ - Apache HTTP Server +Microsoft Windows ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Microsoft Windows ġ

    ֽ ƴմϴ. @@ -33,7 +39,7 @@
  • ࿡ ϱ
  • Developer Studio Workspace IDE ϱ
  • Ʈ
  • -
    +

    top

    @@ -176,11 +182,9 @@ ִ. Windows NT release debug ϴ ɾ :

    -
    -nmake /f Makefile.win _apacher
    +    
    nmake /f Makefile.win _apacher
     
    -nmake /f Makefile.win _apached
    -    
    +nmake /f Makefile.win _apached

    ɾ ġ Ѵ. ڴ Ͽ Ͽ ׸ ã ϱ @@ -320,8 +324,7 @@ nmake /f Makefile.win _apached

    ϰ ϴ dir ڵ ġϷ nmake ɾ ϳ Ѵ:

    -
    -nmake /f Makefile.win installr INSTDIR=dir
    +    
    nmake /f Makefile.win installr INSTDIR=dir
     
     nmake /f Makefile.win installd INSTDIR=dir
         
    @@ -416,8 +419,30 @@ nmake /f Makefile.win installd INSTDIR=dir

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/win_compiling.xml b/docs/manual/platform/win_compiling.xml index 57b6abfe60d..454875e7734 100644 --- a/docs/manual/platform/win_compiling.xml +++ b/docs/manual/platform/win_compiling.xml @@ -28,11 +28,19 @@

    There are many important points to consider before you begin compiling - Apache. See Using Apache with Microsoft - Windows before you begin.

    + Apache HTTP Server (httpd). See Using Apache HTTP + Server on Microsoft Windows before you begin.

    + +

    httpd can be built on Windows using a cmake-based build system or with + Visual Studio project files maintained by httpd developers. The cmake-based + build system directly supports more versions of Visual Studio but currently + has considerable functional limitations.

    +
    + Building httpd with the included Visual Studio project files +
    Requirements @@ -249,6 +257,36 @@
    +
    + + Building from Unix sources + +

    The policy of the Apache HTTP Server project is to only release Unix sources. + Windows source packages made available for download have been supplied by + volunteers and may not be available for every release. You can still build + the server on Windows from the Unix source tarball with just a few additional + steps.

    + +
      +
    1. Download and unpack the Unix source tarball for the latest version.
    2. +
    3. Download and unpack the Unix source tarball for latest version of + APR, AR-Util and APR-Iconv, place these sources in directories httpd-2.x.x\srclib\apr, httpd-2.x.x\srclib\apr-util and httpd-2.x.x\srclib\apr-iconv
    4. +
    5. Open a Command Prompt and CD to the httpd-2.x.x folder
    6. +
    7. Run the line endings conversion utility at the prompt;
    8. +
    + + + perl srclib\apr\build\lineends.pl + + +

    You can now build the server with the Visual Studio development + environment using the IDE. Command-Line builds of the server are not + possible from Unix sources unless you export .mak files as explained + below. +

    + +
    +
    Command-Line Build @@ -411,6 +449,33 @@ Developer Studio environment.
    +
    + +
    + Building httpd with cmake + +

    The primary documentation for this build mechanism is in the + README.cmake file in the source distribution. Refer to that file + for detailed instructions.

    + +

    Building httpd with cmake requires building APR and APR-util separately. + Refer to their README.cmake files for instructions.

    + +

    The primary limitations of the cmake-based build are inherited from the APR-util + project, and are listed below because of their impact on httpd:

    + +
      +
    • No cmake build for the APR-iconv subproject is available, and the + APR-util cmake build cannot consume an existing APR-iconv build. Thus, + mod_charset_lite and possibly some third-party modules + cannot be used.
    • +
    • The cmake build for the APR-util subproject does not support most of the + optional DBM and DBD libraries supported by the included Visual Studio + project files. This limits the database backends supported by a number of + bundled and third-party modules.
    • +
    + +
    diff --git a/docs/manual/platform/win_compiling.xml.fr b/docs/manual/platform/win_compiling.xml.fr new file mode 100644 index 00000000000..b9151723b88 --- /dev/null +++ b/docs/manual/platform/win_compiling.xml.fr @@ -0,0 +1,566 @@ + + + + + + + + + + + Notes spécifiques à certaines + plates-formes + + Compiler Apache pour Microsoft Windows + + + +

    Il y a de nombreux points importants à connaître avant de + compiler Le serveur HTTP Apache pour Microsoft Windows. Avant de commencer, lisez le + document Utiliser le serveur HTTP Apache avec Microsoft + Windows.

    + +

    httpd peut être compilé sous Windows en utilisant une chaîne de + compilation basée sur cmake, ou à partir de fichiers projet Visual + Studio maintenus par les développeurs de httpd. La chaîne de + compilation basée sur cmake supporte directement davantage de + versions de Visual Studio, mais possède actuellement des + fonctionnalités très limitées.

    + +
    + +
    + + Prérequis + +

    Pour compiler Apache, l'environnement doit satisfaire aux + conditions suivantes :

    + +
      +
    • +

      Espace disque

      + +

      Assurez-vous de disposer d'un minimum de 200 Mo d'espace + disque disponible. Après l'installation, Apache occupe environ + 80 Mo d'espace disque, plus l'espace réservé aux journaux et au + cache, la taille de ces derniers pouvant augmenter rapidement. + Les besoins réels en espace disque dépendent étroitement de la + configuration choisie et des bibliothèques ou modules tiers + installés, en particulier lorsqu'OpenSSL est mis en oeuvre. + Comme de nombreux fichiers sont au format texte et donc + facilement compressibles, l'utilisation de la compression du + système de fichiers NTFS divise ces besoins par deux.

      +
    • + +
    • +

      Correctifs requis

      + +

      Le binaire httpd est compilé à l'aide de nombreux correctifs + appliqués aux paquets tiers, ce qui permet de s'assurer que le + code fourni est bien compilable et déboguable. Ces correctifs + sont disponibles à http://www.apache.org/dist/httpd/binaries/win32/patches_applied/, + et il est recommandé de les appliquer afin d'obtenir un + résultat identique aux binaires "officiels" distribués par + l'ASF.

      +
    • + +
    • +

      Microsoft Visual C++ 6.0 (Visual Studio 97) ou supérieur.

      + +

      Apache peut être compilé en utilisant l'outil ligne de + commande, ou depuis l'espace de travail IDE Visual Studio. Pour + la compilation depuis la ligne de commandes, l'environnement + doit comporter les variables the PATH, + INCLUDE, LIB, ainsi que d'autres + variables qui peuvent être définies via le script + vcvars32.bat :

      + + Vous pouvez vous procurer le paquet du Processeur Visual + Studio pour votre ancienne version de Visual Studio, ou une + version complète (et non Express) d'une édition plus récente de + Visual Studio pour l'assembleur ml.exe. Ceci vous permettra, si + vous le souhaitez, de compiler OpenSSL en utilisant une + implémentation du code d'assemblage plus efficace. + + Seule la chaîne d'outils de compilation de Microsoft est + supportée de manière suivie par les contributeurs actifs à httpd. + Bien que le projet accepte régulièrement des correctifs pour + s'assurer que MinGW et d'autre outils de compilation + fonctionnent, ou même pour les améliorer, ils ne sont pas + maintenus de manière suivie et sont même souvent hors d'état + de fonctionner à certains stades du développement normal. +
    • + +
    • +

      Le SDK de la plate-forme Windows mis à jour, février 2003 ou + plus récent.

      + +

      Un SDK approprié pour la plate-forme Windows est inclus par + défaut dans les versions complètes (et non Express/lite) de + Visual C++ 7.1 (Visual Studio 2002) et supérieures ; les + utilisateurs peuvent ignorer ces étapes, à moins qu'ils aient + choisi d'utiliser une version plus récente ou différente du SDK.

      + +

      Pour pouvoir utiliser Visual C++ 6.0 or 7.0 (Studio 2000 + .NET), l'environnement du SDK de la plate-forme doit être préparé en utilisant le + script setenv.bat (installé par le SDK de la plate-forme) avant de + lancer la compilation en ligne de commande ou l'interface GUI + msdev/devenv. L'installation du SDK de la plate-forme pour les + versions Express de Visual Studio (2003 et supérieures) devrait + ajuster l'environnement par défaut de manière appropriée.

      + + + "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32"
      + "c:\Program Files\Platform SDK\setenv.bat" +
      + + +
    • + +
    • +

      Perl et awk

      + +

      De nombreuses étapes recommandées ici nécessitent un + interpréteur perl durant le processus de préparation de la + compilation.

      + +

      Pour installer Apache à partir du système de compilation, de + nombreux fichiers sont modifiés via l'utilitaire + awk.exe. awk effectue la modification des fichiers + au moment de l'installation ; il a été choisi car il nécessite + un téléchargement de petite taille (par rapport à Perl ou + WSH/VB). Le site de Brian Kernighan http://www.cs.princeton.edu/~bwk/btl.mirror/ propose un + binaire précompilé pour Win32, http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe, que + vous devez enregistrer sous le nom awk.exe (plutôt + que awk95.exe).

      + + Si awk.exe n'est pas trouvé, la cible install du fichier + Makefile.win n'effectuera aucune substitution dans les fichiers + .conf installés. Vous devez modifier manuellement les fichiers + .conf installés afin de permettre au serveur de démarrer. + Recherchez et remplacez toutes les balises "@token@" par une + valeur appropriée. + + L'IDE Visual Studio ne trouvera le chemin de + awk.exe que dans la variable PATH, ou dans le + chemin des exécutables spécifié par l'option de menu Tools -> + Options -> (Projects ->) Directories. Assurez-vous + qu'awk.exe est bien dans votre chemin système. + + Notez aussi, si vous utilisez les outils Cygwin (http://www.cygwin.com/), que + l'utilitaire awk de nomme gawk.exe et que le + fichier awk.exe est en fait un lien symbolique vers + le fichier gawk.exe. Le shell de commandes Windows + ne reconnaît pas les liens symboliques, et par conséquent la + compilation d'InstallBin échouera. Pour contourner le problème, + vous pouvez supprimer le lien awk.exe de + l'installation de Cygwin, et copier gawk.exe vers + awk.exe. Notez aussi que les portages cygwin/mingw + de gawk 3.0.x étaient bogués ; veuillez par conséquent effectuer + une mise à jour vers la version 3.1.x avant l'utilisation de + tout portage de gawk. +
    • + +
    • +

      [Optionnel] bibliothèque zlib (pour le module + mod_deflate)

      + +

      Zlib doit être installée dans un sous-répertoire du + répertoire srclib et nommé zlib. Elle + doit être compilée directement à cette place. Zlib est + disponible à l'adresse http://www.zlib.net/ -- le + fonctionnement correct du module mod_deflate a + été vérifié avec la version 1.2.3.

      + + + nmake -f win32\Makefile.msc
      + nmake -f win32\Makefile.msc test +
      +
    • + +
    • +

      [Optionnel] Bibliothèques OpenSSL (pour le module + mod_ssl et ab.exe avec le support + ssl)

      + + La bibliothèque OpenSSL est un logiciel de chiffrement. Le + pays dans lequel vous résidez peut imposer des restrictions à + l'importation, la possession, l'utilisation, et/ou la + réexportation vers un autre pays des logiciels de chiffrement. + AVANT d'utiliser tout logiciel de chiffrement, veuillez + consulter la législation de votre pays, les règles et politiques + d'importation, de possession, ou d'utilisation, et de + réexportation des logiciels de chiffrement, afin de déterminer + si vous en avez le droit. Voir http://www.wassenaar.org/ + pour plus de détails. + +

      La configuration et la compilation d'OpenSSL nécessite + l'installation de perl.

      + +

      Pour pouvoir compiler mod_ssl ou le projet + abs.exe, qui devient ab.c avec le support SSL + activé, vous devez + télécharger OpenSSL à l'adresse http://www.openssl.org/source/, + et l'installer dans un sous-répertoire du répertoire + srclib que vous nommerez openssl. Afin + de préparer OpenSSL à la liaison avec le module Apache mod_ssl + ou abs.exe, et désactiver les fonctionnalités d'Openssl grévées + de brevets, vous pouvez utiliser la commande de compilation + suivante :

      + + + perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 + -Ipath/to/srclib/zlib -Lpath/to/srclib/zlib
      + ms\do_masm.bat
      + nmake -f ms\ntdll.mak +
      + + Il est déconseillé d'utiliser zlib-dynamic, car la charge + de la décompression des flux SSL est alors transférée à la + première requête qui doit charger la dll zlib. Notez que le + correctif proposé active le drapeau -L afin de pouvoir + fonctionner avec les compilations Windows, corrige le nom de + zdll.lib et s'assure que les fichiers .pdb sont générés afin de + pouvoir résoudre les problèmes. Si l'assembleur n'est pas + installé, vous devez ajouter no-asm ci-dessus et utiliser le + script ms\do_ms.bat à la place de ms\do_masm.bat. +
    • + +
    • +

      [Optionnel] Bibliothèques de bases de données (pour +mod_dbd et mod_authn_dbm)

      + +

      La bibliothèque apr-util fournit un accès aux fonctionnalités + clients dbm (base de données à base de clés) et dbd (base de + données à base de requêtes) au serveur httpd et à certains de + ses modules, comme les modules d'authentification et + d'autorisation. Les fournisseurs sdbm dbm et odbc dbd sont + compilés automatiquement.

      + +

      Le support dbd inclut le paquet instantclient Oracle, MySQL, + PostgreSQL et sqlite. Par exemple, pour les compiler tous, + définissez LIB de façon à inclure le chemin des bibliothèques, + INCLUDE de façon à inclure le chemin des en-têtes, et PATH de + façon à inclure le chemin des dll et bin de chacun des quatre + SDK, et définissez la variable d'environnement DBD_LIST de façon + à indiquer au processus de compilation quels SDKs pilotes + clients du sont correctement installés ; par exemple :

      + + + set DBD_LIST=sqlite3 pgsql oracle mysql + + +

      De manière similaire, le support dbm peut être étendu avec + DBM_LIST pour compiler un fournisseur Berkeley DB (db) et/ou un + fournisseur gdbm, en configurant tout d'abord de la même manière + LIB, INCLUDE et PATH afin de s'assurer que les bibliothèques et + en-têtes de la bibliothèque client sont bien disponibles.

      + + + set DBM_LIST=db gdbm + + + En fonction du choix des distributions de bases de + données, il peut s'avérer nécessaire de modifier le nom des + cibles de l'édition de liens (par exemple gdbm.lib à la place de + libgdb.lib) listées dans les fichiers .dsp/.mak des répertoires + srclib\apr-util\dbd ou ...\dbm correspondants. + +

      Voir le fichier README-win32.txt pour plus d'informations à + propos de l'obtention des différents SDKs pilotes de bases de + données.

      +
    • + +
    + +
    + +
    + + Compilation à partir des sources Unix + +

    Le projet du serveur HTTP Apache à pour politique de ne fournir + que des sources de type Unix. Les paquets source de type Windows + disponibles en téléchargement ont été élaborés par des + contributeurs, et ne seront pas forcément reconduits pour toutes les + versions. Vous pouvez cependant compiler le serveur sous Windows à + partir des sources Unix en ajoutant quelques étapes supplémentaires.

    + +
      +
    1. Téléchargez et ouvrez le tarball source Unix de la dernière + version du serveur HTTP Apache.
    2. +
    3. Téléchargez et ouvrez le tarball source Unix de la dernière + version de APR, APR-Util et APR-Iconv, et copier l'arborescence + obtenue dans httpd-2.x.x\srclib\apr, httpd-2.x.x\srclib\apr-util + et httpd-2.x.x\srclib\apr-iconv
    4. +
    5. Ouvrez la console et placez-vous au niveau du répertoire httpd-2.x.x
    6. +
    7. Exécutez l'utilitaire de conversion de fins de ligne
    8. +
    + + + perl srclib\apr\build\lineends.pl + + +

    Vous pouvez maintenant compiler le serveur via l'environnement de + développement Visual Studio en utilisant l'IDE. Les compilations + du serveur en ligne de commande ne sont possibles avec des sources + de type Unix que si vous exportez les fichiers .mak comme indiqué + ci-dessous. +

    + +
    + +
    + + Compilation à partir de la ligne de commandes + +

    Makefile.win est le makefile principal ou racine + d'Apache. Pour compiler Apache sous Windows, utilisez simplement une + des commandes suivantes pour compiler la version + release ou debug :

    + + + nmake /f Makefile.win _apacher

    + nmake /f Makefile.win _apached +
    + + +

    Ces deux commandes effectuent la compilation d'Apache. Cependant, + avec la deuxième, les fichiers résultants ne seront pas optimisés, + ce qui va faciliter l'examen pas à pas du code pour trouver des + bogues et résoudre les problèmes.

    + +

    Vous pouvez indiquer vos choix en matière de fournisseurs dbd et + dbm à l'aide des variables (d'environnement) additionnelles de make + DBD_LIST et DBM_LIST ; voir les commentaires à propos des + [Optionnel] Bibliothèques de bases de données ci-dessus. Consultez + les commentaires initiaux dans Makefile.win pour plus d'options + pouvant être fournies lors de la compilation.

    + +
    + +
    + + Compilation depuis l'espace de travail IDE de Developer + Studio + +

    Apache peut aussi être compilé depuis l'environnement de + développement Visual Studio de VC++. Pour simplifier ce processus, + l'espace de travail Visual Studio Apache.dsw est + fourni. Cet espace de travail expose la liste complète des projets + .dsp actifs nécessaires à l'installation binaire + complète d'Apache. Il inclut les dépendances entre projets afin que + ces derniers soient compilés selon l'ordre approprié.

    + +

    Ouvrez l'espace de travail Apache.dsw, et + sélectionnez InstallBin (compilation + Release ou Debug, selon vos souhaits) + comme Active Project. InstallBin provoque la + compilation de tous les projets concernés, puis invoque + Makefile.win pour installer les exécutables et dlls + compilés. Vous pouvez modifier la valeur de INSTDIR= + via la configuration de InstallBin, onglet Général, + entrée ligne de commandes de compilation. La valeur par défaut de + INSTDIR est le répertoire /Apache2. Si + vous désirez effectuer un test de compilation (sans installation), + sélectionnez le projet BuildBin.

    + +

    Les fichiers projets .dsp sont distribués au format + Visual Studio 6.0 (98). Visual C++ 5.0 (97) les reconnaît. Les + utilisateurs de Visual Studio 2002 (.NET) et versions supérieures + doivent convertir Apache.dsw et les fichiers + .dsp en un projet Apache.sln, ainsi que + les fichiers .msproj ; assurez-vous de reconvertir le + fichier .msproj si l'un des fichiers source + .dsp est modifié ! Cette opération est vraiment très + simple, il suffit de réouvrir Apache.dsw dans l'IDE + VC++ 7.0 et de le reconvertir.

    + + + Il y a une erreur dans la conversion .vcproj des fichiers + .dsp. devenv.exe interprète mal le drapeau + /D pour les drapeaux RC contenant de grandes /D'éfinitions entourées + de guillemets, et contenant elles-mêmes des espaces. Ainsi, la + commande : + + perl srclib\apr\build\cvtdsp.pl -2005 + + va convertir les drapeaux /D pour les drapeaux RC afin d'utiliser + une syntaxe alternative, interprétable ; malheureusement, cette + syntaxe n'est pas supportée par Visual Studio 97 ou ses fichiers + .mak exportés. Ces drapeaux /D permettent de transmettre la longue + description des fichiers de mod_apachemodule.so à leurs compilations + d'identificateur de version de ressource .rc partagée. + + + +

    Les utilisateurs de Visual Studio 2002 (.NET) et versions + supérieures doivent aussi utiliser + la boîte de dialogue Configuration Manager du menu Build pour + décocher les deux versions Debug et + Release des modules mod_ssl + et mod_deflate pour abs. Ces modules + sont compilés + en invoquant nmake ou directement l'IDE avec la cible + BinBuild pour compiler ces modules de manière + conditionnelle si les sous-répertoires de srclib + openssl et/ou zlib existent, et en + fonction des définitions des variables d'environnement + DBD_LIST et DBM_LIST.

    + +
    + +
    + + Export des fichiers .mak de la ligne de commandes + + +

    Les fichiers .mak exportés posent plus de problèmes, + mais les utilisateurs de Visual C++ 5.0 en ont besoin pour compiler + mod_ssl, abs (ab avec support + SSL) et/ou mod_deflate. Les fichiers .mak + supportent aussi un choix plus large de distributions de chaînes + d'outils C++, comme Visual Studio Express.

    + +

    Vous devez tout d'abord compiler tous les projets afin de créer + toutes les cibles dynamiques auto-générées, de façon à ce que les + dépendances puissent être interprétées correctement. Compilez + l'ensemble du projet depuis l'IDE Visual Studio 6.0 (98), en + utilisant la cible BuildAll, puis utilisez le menu de + projet Export pour tous les makefiles (en cochant "with + dependencies"). Utilisez la commande suivante pour transformer les + chemins absolus en chemins relatifs de façon à ce que la compilation + puisse s'effectuer depuis n'importe quelle position dans + l'arborescence :

    + + + perl srclib\apr\build\fixwin32mak.pl + + +

    Vous devez exécuter cette commande depuis la racine de + l'arborescence des sources de httpd. Tout fichier projet + .mak et .dep du répertoire courant et de + ses sous-répertoires sera corrigé, et les repères de temps ajustés + en fonction des .dsp.

    + +

    Vérifiez toujours le SDK de la plate-forme ou autres chemins + fichiers locaux, spécifiques à la machine dans les fichiers + .mak et .dep générés. Le répertoire + DevStudio\Common\MSDev98\bin\ (VC6) contient un fichier + sysincl.dat qui énumère toutes les exceptions. Mettez à + jour ce fichier (en particulier les chemins avec slashes et + anti-slashes, tels que sys/time.h et + sys\time.h) de façon à ignorer ces nouvelles + dépendances. Inclure les chemins d'installation locale dans un + fichier .mak distribué fera échouer la + compilation.

    + +

    Si vous soumettez un patch qui modifie les fichiers projet, nous + devons valider la modification de ces fichiers projet au format + Visual Studio 6.0. Les modifications doivent êtres simples, avec un + minimum de drapeaux de compilation et d'édition de liens qui + pourront être reconnus par tous les environnements Visual + Studio.

    + +
    + +
    + + + Installation + +

    Une fois compilé, Apache doit être installé dans le répertoire + racine du serveur. La valeur par défaut est le répertoire + \Apache2, sur le même disque.

    + +

    Pour compiler et installer automatiquement tous les fichiers dans + le répertoire rep désiré, utilisez une des commandes + nmake suivantes :

    + + + nmake /f Makefile.win installr INSTDIR=dir
    + nmake /f Makefile.win installd INSTDIR=dir +
    + +

    L'argument rep de INSTDIR permet de + spécifier le répertoire d'installation ; il peut être omis si Apache + doit être installé dans \Apache22 (du lecteur de disque + courant.

    + +
    + +
    + +Avertissement à propos de la compilation d'Apache à partir de +l'arborescence de développement + + Notez que seuls les fichiers .dsp sont + maintenus d'une distribution release à l'autre. Les + fichiers .mak ne sont PAS régénérés, suite à + l'énorme perte de temps des relecteurs . Vous ne + pouvez donc pas utiliser les commandes NMAKE + ci-dessus pour compiler des fichiers de projet .dsp + révisés si vous n'exporter pas ensuite vous-même tous les + fichiers .mak du projet. Ceci n'est pas nécessaire + si vous effectuez la compilation depuis l'environnement + Microsoft Developer Studio. + +
    + +
    + Compilation de httpd avec cmake + +

    La documentation principale pour ce mécanisme de compilation se trouve + dans le fichier README.cmake situé dans l'arborescence + des sources. Consultez ce fichier pour des instructions détaillées.

    + +

    Pour compiler httpd avec cmake, vous devez compiler APR et APR-util + séparément. Consultez les fichiers README.cmake de ces + projets pour obtenir des instructions.

    + +

    Les principales limitations de la compilation basée sur cmake sont + héritées du projet APR-util et sont énumérées ci-dessous à cause de + leur impact sur httpd :

    + +
      +
    • Il n'est pas possible de compiler le projet APR-iconv avec + cmake, et la compilation de APR-util ne peut pas utiliser de projet + APR-iconv précompilé. A cause de cela, il n'est pas possible + d'utiliser mod_charset_lite et probablement + d'autres modules tiers.
    • +
    • La compilation du sous-projet APR-util avec cmake ne supporte + pas la plupart des bibliothèques optionnelles DBM et DBD utilisées + par les fichiers projet Visual Studio inclus. Cela limite les + serveurs de bases de données d'arrière-plan supportés par de + nombreux modules tiers ou inclus.
    • +
    + +
    + +
    + diff --git a/docs/manual/platform/win_compiling.xml.ko b/docs/manual/platform/win_compiling.xml.ko index ce299a474a8..b6f3e282f75 100644 --- a/docs/manual/platform/win_compiling.xml.ko +++ b/docs/manual/platform/win_compiling.xml.ko @@ -1,7 +1,7 @@ - + -Using Apache HTTP Server on Microsoft Windows - Apache HTTP Server +Using Apache HTTP Server on Microsoft Windows - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Using Apache HTTP Server on Microsoft Windows

    +Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Using Apache HTTP Server on Microsoft Windows

    Available Languages:  en  | + fr  |  ko 

    This document explains how to install, configure and run - Apache 2.3 under Microsoft Windows. If you have questions after + Apache 2.4 under Microsoft Windows. If you have questions after reviewing the documentation (and any event and error logs), you should consult the peer-supported users' mailing @@ -37,22 +43,20 @@

    +
  • Windows Tuning
  • +

    See also

    top

    Operating System Requirements

    -

    The primary Windows platform for running Apache 2.3 is Windows - 2000 or later. The binary installer only works with the x86 family - of processors, such as Intel and AMD processors. Always obtain and +

    The primary Windows platform for running Apache 2.4 is Windows + 2000 or later. Always obtain and install the current service pack to avoid operating system bugs.

    Apache HTTP Server versions later than 2.2 will not run on any @@ -62,170 +66,22 @@

    Downloading Apache for Windows

    -

    Information on the latest versions of Apache can be found on the - web site of the Apache web server at - http://httpd.apache.org/download.cgi. - There you will find the current release, as well as more recent alpha - or beta test versions, and a list of HTTP and FTP mirrors from which - you can download the Apache web server. Please use a mirror near to - you for a fast and reliable download.

    - -

    For Windows installations you should download the version of - Apache for Windows with the .msi extension. This is a - single Microsoft Installer file, which contains a ready-to-run - build of Apache. There is a separate .zip file, - which contains only the source code, see the summary above.

    - -

    There is a choice between an *-openssl-*.msi flavor and - a *-no_ssl.msi flavor. The *-openssl-*.msi flavor is distributed - by the Apache Software Foundation under ECCN 5D002 pursuant to - US Export Law license exception TSU. This law may or may not - apply to your circumstance, please review the httpd README as - well as the ASF - Export Classifications and Source Links page. The project - provides no further guidance to third parties in resolving the - legal circumstances which apply in each circumstance.

    -
    top
    -
    -

    Installing Apache for Windows

    - - -

    You need Microsoft Installer 2.0 or above for the installation - to work. For Windows NT 4.0 and 2000 refer to Microsoft's article - KB 292539. - Windows XP and later do not require this update.

    - -

    Note that you cannot install two versions of Apache 2.3 on the - same computer with the binary installer. You can, however, install - a version of the 1.3 series and a version of the - 2.3 series on the same computer without problems. If you need to - have two different 2.3 versions on the same computer, you have to - compile and install Apache from the - source.

    - -

    Run the Apache .msi file you downloaded above. The - installation will ask you for these things:

    - -
      -
    1. Network Domain. Enter the DNS domain in which - your server is or will be registered in. For example, if your - server's full DNS name is server.example.net, you would - type example.net here.

    2. - -
    3. Server Name. Your server's full DNS name. - From the example above, you would type server.example.net - here.

    4. - -
    5. Administrator's Email Address. Enter the - server administrator's or webmaster's email address here. This - address will be displayed along with error messages to the client - by default.

    6. - -
    7. For whom to install Apache Select for - All Users, on Port 80, as a Service - Recommended if you'd - like your new Apache to listen at port 80 for incoming traffic. - It will run as a service (that is, Apache will run even if no one - is logged in on the server at the moment) Select only for - the Current User, on Port 8080, when started Manually if - you'd like to install Apache for your personal experimenting or - if you already have another WWW server running on port 80.

    8. - -
    9. The installation type. Select Typical - for everything except the source code and libraries for module - development. With Custom you can specify what to - install. A full install will require about 13 megabytes of free - disk space. This does not include the size of your web - site(s).

    10. - -
    11. Where to install. The default path is - C:\Program Files\Apache Software Foundation - under which a directory called - Apache2.3 will be created by default.

    12. -
    - -

    During the installation, Apache will configure the files in the - conf subdirectory to reflect the chosen installation - directory. However, if any of the configuration files in this - directory already exist, they will not be overwritten. Instead, the - new copy of the corresponding file will be left with the extension - .default. So, for example, if conf\httpd.conf - already exists, it will be renamed as conf\httpd.conf.default. - After the installation you should manually check to see what new - settings are in the .default file, and if necessary, - update your existing configuration file.

    - -

    Also, if you already have a file called htdocs\index.html, - it will not be overwritten (and no index.html.default - will be installed either). This means it should be safe to install - Apache over an existing installation, although you would have to - stop the existing running server before doing the installation, and - then start the new one after the installation is finished.

    - -

    After installing Apache, you must edit the configuration files - in the conf subdirectory as required. These files - will be configured during the installation so that Apache is ready - to be run from the directory it was installed into, with the - documents server from the subdirectory htdocs. There - are lots of other options which you should set before you really - start using Apache. However, to get started quickly, the files - should work as installed.

    -
    top
    -
    -

    Advanced Installation Topics

    - - -

    One feature of the installer, "Build Headers and Libraries", can be - ignored by most users, but should be installed if compiling third party - modules. The "APR Iconv Code Pages" can similarly be omitted by most - users, unless using mod_charset_lite or a third party - module which relies on APR internationalization features.

    - -

    There are requests to ship a .zip file from time to time. There is - no point in the ASF consuming additional storage, mirroring and bandwidth - for this purpose, because the .msi installer allows the installation - artifacts to all be unpacked using the msiexec /a network - installation option. Using this command against any .msi will result - in an exploded tree of all of the individual files and components.

    - -

    The installation options above can be customized by users familiar - with msiexec.exe options and silent installation. The actual installer - sources are available in the httpd/httpd/win32-msi/ tree of the httpd - project subversion respository. For reference, some of the more common - variables which may be modified are;

    - -
      -
    • AgreeToLicense (toggle to "Yes")
    • -
    • ALLUSERS (choose between Null and "1")
    • -
    • ApplicationUsers (toggle to "OnlyCurrentUser")
    • -
    • EXISTING_APACHE_SERVICE_PATH
    • -
    • INSTALLDIR (default "ProgramFilesFolder\Apache Software Foundation\Apache2.2\")
    • -
    • INSTALLLEVEL (default "100", refer to list below)
    • -
    • RESOLVED_WINSOCK2 (toggle to "1")
    • -
    • SERVERADMIN
    • -
    • SERVERDOMAIN
    • -
    • SERVERNAME
    • -
    • SERVERPORT (default "80")
    • -
    • SERVERSSLPORT (default "443")
    • -
    • SERVICEINTERNALNAME (default "Apache2.2", no spaces!)
    • -
    • SERVICENAME (default "Apache2.2", include spaces)
    • -
    • SetupType (default "Typical")
    • -
    - -

    The installation level of various features, which may be individually - toggled, include;

    +

    The Apache HTTP Server Project itself does not provide binary releases of + software, only source code. Individual committers may provide + binary packages as a convenience, but it is not a release deliverable.

    +

    If you cannot compile the Apache HTTP Server + yourself, you can obtain a binary package from numerous binary distributions + available on the Internet.

    +

    Popular options for deploying Apache httpd, and, optionally, PHP + and MySQL, on Microsoft Windows, include:

      -
    • Apache (1, base Apache HTTP Server 2.2 feature)
    • -
    • ApacheDocs (11, Apache Documentation)
    • -
    • ApacheMonitoring (41, Apache Service Taskbar Icon)
    • -
    • ApacheRuntime (1, Apache Runtime)
    • -
    • BuildFiles (101, Build Headers and Libraries)
    • -
    • Iconv (21, APR Iconv Code Pages)
    • -
    • OpensslBin (31, OpenSSL Runtime)
    • -
    • SslBin (41, Ssl Binaries)
    • +
    • ApacheHaus
    • +
    • Apache Lounge
    • +
    • BitNami WAMP Stack
    • +
    • WampServer
    • +
    • XAMPP
    - -
    top

    Customizing Apache for Windows

    @@ -274,9 +130,7 @@ Windows filenames instead of Unix ones. However, because Apache may interpret backslashes as an "escape character" sequence, you should consistently use forward slashes in path names, not - backslashes. Drive letters can be used; if omitted, the drive - of the SystemRoot directive (or -d command line option) becomes - the default.

    + backslashes.

  • While filenames are generally case-insensitive on Windows, URLs are still treated internally as case-sensitive @@ -290,12 +144,11 @@ how it is accessed. If you wish to assure that only lowercase is used in URLs, you can use something like:

    -

    - RewriteEngine On
    - RewriteMap lowercase int:tolower
    - RewriteCond %{REQUEST_URI} [A-Z]
    - RewriteRule (.*) ${lowercase:$1} [R,L] -

  • +
    RewriteEngine On
    +RewriteMap lowercase int:tolower
    +RewriteCond "%{REQUEST_URI}" "[A-Z]"
    +RewriteRule "(.*)" "${lowercase:$1}" [R,L]
    +
  • When running, Apache needs write access only to the logs directory and any configured cache directory tree. Due to the @@ -303,22 +156,21 @@ validate all path names given. This means that each directory which Apache evaluates, from the drive root up to the directory leaf, must have read, list and traverse directory permissions. - If Apache2.3 is installed at C:\Program Files, then the root - directory, Program Files and Apache2.3 must all be visible + If Apache2.4 is installed at C:\Program Files, then the root + directory, Program Files and Apache2.4 must all be visible to Apache.

  • Apache for Windows contains the ability to load modules at runtime, without recompiling the server. If Apache is compiled normally, it will install a number of optional modules in the - \Apache2.3\modules directory. To activate these or - other modules, the new LoadModule + \Apache2.4\modules directory. To activate these or + other modules, the LoadModule directive must be used. For example, to activate the status module, use the following (in addition to the status-activating directives in access.conf):

    -

    - LoadModule status_module modules/mod_status.so -

    +
    LoadModule status_module modules/mod_status.so
    +

    Information on creating loadable modules is also available.

  • @@ -345,7 +197,7 @@ Windows event log when running on Windows NT. This mechanism acts as a backup for those situations where Apache is not yet prepared to use the error.log file. You can - review the Windows Applicat Event Log by using the Event Viewer, + review the Windows Application Event Log by using the Event Viewer, e.g. Start - Settings - Control Panel - Administrative Tools - Event Viewer.

    @@ -355,13 +207,6 @@

    Running Apache as a Service

    -

    You can install Apache as a service automatically during the - installation. If you chose to install for all users, the - installation will create an Apache service for you. If you specify - to install for yourself only, you can manually register Apache as a - service after the installation. You have to be a member of the - Administrators group for the service installation to succeed.

    -

    Apache comes with a utility called the Apache Service Monitor. With it you can see and manage the state of all installed Apache services on any machine on your network. To be able to manage an @@ -379,7 +224,8 @@

    If you need to specify the name of the service you want to install, use the following command. You have to do this if you have several different service installations of Apache on your - computer.

    + computer. If you specify a name during the install, you have to + also specify it during any other -k operation.

    httpd.exe -k install -n "MyServiceName" @@ -393,7 +239,7 @@

    If you use the first command without any special parameters except - -k install, the service will be called Apache2.3 + -k install, the service will be called Apache2.4 and the configuration will be assumed to be conf\httpd.conf.

    @@ -411,8 +257,8 @@

    Normal starting, restarting and shutting down of an Apache service is usually done via the Apache Service Monitor, by using - commands like NET START Apache2.3 and NET STOP - Apache2.3 or via normal Windows service management. Before + commands like NET START Apache2.4 and NET STOP + Apache2.4 or via normal Windows service management. Before starting Apache as a service by any means, you should test the service's configuration file by using:

    @@ -424,27 +270,27 @@ too. To start an installed Apache service you'll use this:

    - httpd.exe -k start + httpd.exe -k start -n "MyServiceName"

    To stop an Apache service via the command line switches, use this:

    - httpd.exe -k stop + httpd.exe -k stop -n "MyServiceName"

    or

    - httpd.exe -k shutdown + httpd.exe -k shutdown -n "MyServiceName"

    You can also restart a running service and force it to reread its configuration file by using:

    - httpd.exe -k restart + httpd.exe -k restart -n "MyServiceName"

    By default, all Apache services are registered to run as the @@ -490,7 +336,7 @@

    It is usually a good practice to grant the user the Apache - service runs as read and execute (RX) access to the whole Apache2.3 + service runs as read and execute (RX) access to the whole Apache2.4 directory, except the logs subdirectory, where the user has to have at least change (RWXD) rights.
    @@ -513,7 +359,7 @@ Windows Control Panel, you may get the following message:

    - Could not start the Apache2.3 service on \\COMPUTER
    + Could not start the Apache2.4 service on \\COMPUTER
    Error 1067; The process terminated unexpectedly.

    @@ -547,7 +393,7 @@

    You can also run Apache via the shortcut Start Apache in Console placed to Start Menu --> Programs --> Apache HTTP Server - 2.3.xx --> Control Apache Server during the installation. + 2.4.xx --> Control Apache Server during the installation. This will open a console window and start Apache inside it. If you don't have Apache installed as a service, the window will remain visible until you stop Apache by pressing Control-C in the console @@ -593,12 +439,13 @@ Programs. Change to the folder to which you installed Apache, type the command httpd.exe, and read the error message. Then change to the logs folder, and review the error.log - file for configuration mistakes. If you accepted the defaults when - you installed Apache, the commands would be:

    + file for configuration mistakes. Assuming httpd was installed into + C:\Program Files\Apache Software Foundation\Apache2.4\, + you can do the following:

    c:
    - cd "\Program Files\Apache Software Foundation\Apache2.3\bin"
    + cd "\Program Files\Apache Software Foundation\Apache2.4\bin"
    httpd.exe

    @@ -671,32 +518,6 @@ HTTPD_ROOT. -

    During the installation, a version-specific registry key is - created in the Windows registry. The location of this key depends - on the type of the installation. If you chose to install Apache - for all users, the key is located under the - HKEY_LOCAL_MACHINE hive, like this (the version - numbers will of course vary between different versions of Apache: -

    - -

    - HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache\2.2.2 -

    - -

    Correspondingly, if you chose to install Apache for the current - user only, the key is located under the HKEY_CURRENT_USER - hive, the contents of which are dependent of the user currently - logged on:

    - -

    - HKEY_CURRENT_USER\SOFTWARE\Apache Software Foundation\Apache\2.2.2 -

    - -

    This key is compiled into the server and can enable you to test - new versions without affecting the current version. Of course, you - must take care not to install the new version in the same - directory as another version.

    -

    If you did not do a binary install, Apache will in some scenarios complain about the missing registry key. This warning can be ignored if the server was otherwise able to find its @@ -770,10 +591,10 @@

    Mapped drive letters
    -
    e.g., Alias /images/ Z:/
    +
    e.g., Alias "/images/" "Z:/"
    UNC paths
    -
    e.g., Alias /images/ //imagehost/www/images/
    +
    e.g., Alias "/images/" "//imagehost/www/images/"

    Mapped drive letters allow the administrator to maintain the @@ -786,30 +607,58 @@ (Arcane and error prone procedures may work around the restriction on mapped drive letters, but this is not recommended.)

    -

    Example DocumentRoot with UNC path

    - DocumentRoot //dochost/www/html/ -

    +

    Example DocumentRoot with UNC path

    DocumentRoot "//dochost/www/html/"
    +
    + +

    Example DocumentRoot with IP address in UNC path

    DocumentRoot "//192.168.1.50/docs/"
    +
    -

    Example DocumentRoot with IP address in UNC path

    - DocumentRoot //192.168.1.50/docs/
    -

    +

    Example Alias and corresponding Directory with UNC path

    Alias "/images/" "//imagehost/www/images/"
     
    -  

    Example Alias and corresponding Directory with UNC path

    - Alias /images/ //imagehost/www/images/
    -
    - <Directory //imagehost/www/images/>
    - ...
    - <Directory>
    -

    +<Directory "//imagehost/www/images/"> +#... +<Directory>
    +

    When running Apache httpd as a service, you must create a separate account in order to access network resources, as described above.

    +
    top
    +
    +

    Windows Tuning

    + +
      +
    • If more than a few dozen piped loggers are used on an operating system + instance, scaling up the "desktop heap" is often necessary. For + more detailed information, refer to the piped logging documentation.

    • +

    Available Languages:  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/windows.html.fr b/docs/manual/platform/windows.html.fr new file mode 100644 index 00000000000..6ee4b6f2479 --- /dev/null +++ b/docs/manual/platform/windows.html.fr @@ -0,0 +1,718 @@ + + + + + +Utilisation du serveur HTTP Apache sous Microsoft Windows - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Utilisation du serveur HTTP Apache sous Microsoft Windows

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    + + +

    Ce document dcrit l'installation, la configuration et + l'excution d'Apache 2.4 sous Microsoft Windows. Si vous avez des + questions aprs avoir lu la documentation, ou si vous avez rencontr + des vnements particuliers ou des rapports d'erreur, vous pouvez + consultez la liste + de diffusion de la communaut des utilisateurs.

    + +

    Dans ce document, nous supposons que vous installez une + distribution binaire d'Apache. Si vous voulez compiler Apache + vous-mme (par exemple pour aider au dveloppement ou pour + rechercher des bogues), rfrez-vous au document Compilation d'Apache pour Microsoft + Windows.

    + +
    + +
    top
    +
    +

    Prrequis du systme d'exploitation

    + + +

    La plate-forme Windows de base pour l'excution d'Apache 2.4 est + Windows 2000 ou suprieur. Veillez toujours vous procurer et installer le + dernier service pack afin d'viter les bogues du systme + d'exploitation.

    + +
    Les versions du serveur HTTP Apache suprieures 2.2 ne + fonctionneront sous aucun systme d'exploitation d'une version + antrieure Windows 2000.
    + +
    top
    +
    +

    Tlchargement d'Apache pour Windows

    + + +

    Le projet du serveur HTTP Apache proprement dit ne fournit pas de + distribution binaire mais seulement le code source. Certains membres + du projet peuvent mettre disposition des paquets binaires + titre individuel, mais ceux-ci n'ont pas vocation tre + distribus publiquement.

    + +

    Si vous n'tes + pas en mesure de compiler le serveur HTTP Apache vous-mme, vous + pouvez vous procurer un paquet binaire auprs des nombreuses + distributions disponibles sur Internet.

    + +

    Quelques solutions populaires pour dployer Apache httpd, et + ventuellement PHP et MySQL sous Microsoft Windows :

    + +
    top
    +
    +

    Personnaliser Apache pour Windows

    + + +

    La configuration d'Apache est enregistre dans les fichiers du + sous-rpertoire conf. Ce sont les mme fichiers que + ceux utiliss pour configurer la version Unix, mais il y a quelques + directives spcifiques Apache pour Windows. Voir l'index des directives pour la liste + des directives disponibles.

    + +

    Les principales spcificits d'Apache pour Windows sont :

    +
      +
    • Comme Apache pour Windows est un programme multithread, il + ne lance pas de processus spar pour chaque requte, comme Apache + peut le faire sous Unix. En fait, il n'y a en gnral que deux + processus Apache en excution : un processus parent, et un + processus enfant qui traite les requtes. Chaque requte est + traite par un thread spar au sein du processus enfant.

      + +

      Les directives de gestion de processus diffrent galement :

      + +

      MaxConnectionsPerChild + : comme dans la version Unix, cette directive contrle le nombre + de connexions qu'un + processus enfant particulier va traiter avant de s'arrter. + Cependant, la diffrence d'Unix, un processus de remplacement + n'est pas instantanment disponible. Utilisez la dfinition par + dfaut MaxConnectionsPerChild 0, sauf si vous + risquez de manquer de mmoire dans des modules tiers ou dans des + applications in-process.

      + +
      Attention : le fichier de + configuration du serveur est recharg lorsqu'un nouveau processus + enfant est dmarr. En consquence, si vous avez modifi + httpd.conf, le nouveau processus enfant peut ne pas + dmarrer, ou vous pouvez obtenir des rsultats + inattendus.
      + +

      ThreadsPerChild : il + s'agit d'une nouvelle directive. Elle indique au serveur le nombre + de threads qu'il doit utiliser. Elle dfinit le nombre maximum de + connexions simultanes que le serveur peut grer ; vous devez + donc vous assurer que ce nombre soit suffisamment grand pour les + besoins de votre site. La valeur par dfaut ThreadsPerChild + 150 est recommande, mais doit tre ajuste la valeur + maximale estime de connexions simultanes accepter.

    • + +
    • Les directives qui acceptent des noms de fichiers comme + arguments doivent utiliser des noms de fichiers Windows et non + Unix. Cependant, comme Apache peut interprter les anti-slashes + comme des squences d'chappement de caractres, vous devez + absolument utiliser des slashes dans les noms de chemins la + place des anti-slashes.

    • + +
    • Alors que les noms de fichiers sont en gnral insensibles + la casse sous Windows, les URLs sont encore sensibles la casse + en interne avant d'tre mises en correspondance avec le systme de + fichiers. Par exemple, les directives <Location>, Alias, et ProxyPass utilisent toutes des + arguments sensibles la casse. Pour cette raison, il est + particulirement recommand d'utiliser la directive <Directory> lorsqu'on + dsire limiter l'accs certains contenus du systme de fichiers, + car cette directive s'applique tout contenu d'un rpertoire, + sans tenir compte de la manire dont on y accde. Pour vous + assurer que seules des minuscules sont utilises dans les URLs, + vous pouvez utiliser ceci :

      + +
      RewriteEngine On
      +RewriteMap lowercase int:tolower
      +RewriteCond "%{REQUEST_URI}" "[A-Z]"
      +RewriteRule "(.*)" "${lowercase:$1}" [R,L]
      +
    • + +
    • Lors de son excution, Apache n'a besoin d'un accs en + criture qu'au rpertoire des journaux et toute arborescence de + rpertoires de cache configure. Suite au problme d'insensibilit + la casse et au format de noms courts 8.3, Apache doit valider + tous les noms de chemins fournis. Cela signifie que chaque + rpertoire qu'Apache value doit avoir les droits en lecture, + listage et parcours, et ceci depuis la racine jusqu'aux feuilles. + Si Apache2.4 est install dans C:\Program Files, le rpertoire + racine, Program Files et Apache2.4 doivent tous tre visibles pour + Apache

    • + +
    • Apache peut charger divers modules sans qu'il soit ncessaire + de recompiler le serveur. Si Apache est compil + normalement, il va installer de nombreux modules optionnels dans + le rpertoire \Apache2.4\modules. Pour activer ces + modules ou d'autres modules, on doit utiliser la + directive LoadModule. Par + exemple, pour activer le module status, ajoutez la ligne suivante + (en plus des directives d'activation de status dans + access.conf) :

      + +
      LoadModule status_module modules/mod_status.so
      + + +

      Des informations sont aussi votre disposition pour crer des modules + chargeables

    • + +
    • Apache peut aussi charger des extensions ISAPI (Internet + Server Application Programming Interface), comme celles qu'utilise + Microsoft IIS et d'autres serveurs Windows. Voir ici pour plus + d'informations. Notez qu'Apache ne peut pas + charger de filtres ISAPI, et que les gestionnaires ISAPI contenant + des extensions de fonctionnalits Microsoft ne fonctionneront + pas.

    • + +
    • Pour les scripts CGI, la mthode qu'utilise Apache pour + dterminer l'interprteur du script est configurable grce la + directive ScriptInterpreterSource

    • + +
    • Comme il est souvent difficile de grer des fichiers avec + des noms du style .htaccess sous Windows, vous avez + tout intrt changer le nom de ce fichier de configuration par + rpertoire l'aide de la directive AccessFilename.

    • + +
    • Toute erreur survenant au cours du processus de dmarrage + d'Apache est enregistre dans le journal des vnements de + Windows si l'on est sous Windows NT. Ce mcanisme fonctionne comme + une sauvegarde pour les situations o Apache n'est pas encore prt + utiliser le fichier error.log. Vous pouvez + consulter le journal des vnements applicatifs Windows en + utilisant l'observateur d'vnements : Dmarrage - Paramtres - + Panneau de configuration - Outils d'administration - Observateur + d'vnements.

    • +
    + +
    top
    +
    +

    Excuter Apache en tant que service

    + + +

    Apache fournit un utilitaire nomm Apache Service Monitor + (Moniteur du service Apache). Grce lui, vous pouvez voir et grer + l'tat de tous les services Apache installs sur toutes les machines + du rseau. Pour pouvoir grer un service Apache avec le moniteur, + vous devez d'abord installer le service (soit automatiquement au + cours de l'installation, soit manuellement).

    + +

    Vous pouvez installer Apache en tant que service Windows NT + partir de la ligne de commandes et depuis le sous-rpertoire Apache + bin comme suit :

    + +

    + httpd.exe -k install +

    + +

    Si vous avez install plusieurs services Apache sur votre + ordinateur, vous devrez spcifier le nom du service que vous voulez + installer en utilisant la commande suivante (notez que si vous + spcifiez un nom durant l'installation, vous devrez aussi le + spcifier pour toute opration comportant l'option -k) :

    + +

    + httpd.exe -k install -n "Nom-service" +

    + +

    Si un service doit utiliser un fichier de configuration + spcifique, utilisez ceci :

    + +

    + httpd.exe -k install -n "Nom-service" -f "c:\fichiers\Nom-service.conf" +

    + +

    Si vous utilisez la premire commande sans paramtre particulier, + except -k install, le service aura pour nom + Apache2.4 et le fichier de configuration sera cens + tre conf\httpd.conf.

    + +

    Supprimer un service Apache est trs simple. Utilisez + simplement :

    + +

    + httpd.exe -k uninstall +

    + +

    On peut spcifier un service Apache particulier en utilisant + :

    + +

    + httpd.exe -k uninstall -n "Nom service" +

    + +

    Normalement, le dmarrage, le redmarrage et l'arrt d'un + service Apache s'effectuent via le Moniteur de Service Apache, ou en + utilisant des commandes telles que NET START Apache2.4 et + NET STOP Apache2.4, ou encore via le gestionnaire de + services standard de Windows. Avant de dmarrer Apache en tant que + service dans quelque but que ce soit, vous devez tester le fichier + de configuration du service en utilisant :

    + +

    + httpd.exe -n "Nom-service" -t +

    + +

    Vous pouvez aussi contrler un service Apache l'aide de ses + options de ligne de commande. Avec cette mthode, pour dmarrer un + service Apache install, vous utiliserez :

    + +

    + httpd.exe -k start -n "Nom-Service" +

    + +

    Pour arrter un service Apache via les options de lignes de + commande, utilisez ceci :

    + +

    + httpd.exe -k stop -n "Nom-Service" +

    + +

    ou

    + +

    + httpd.exe -k shutdown -n "Nom-Service" +

    + +

    Vous pouvez aussi redmarrer un service en excution et le forcer + relire son fichier de configuration en utilisant :

    + +

    + httpd.exe -k restart -n "Nom-Service" +

    + +

    Par dfaut, tous les services Apache sont configurs pour + s'excuter sous l'utilisateur system (le compte + LocalSystem). Le compte LocalSystem n'a + pas de privilges sur votre rseau, que ce soit via un mcanisme + scuris de Windows, y compris le systme de fichiers, des tubes + nomms, DCOM ou des RPC scuriss. Il a cependant des privilges + levs en local.

    + +
    N'accordez jamais de privilges rseau + au compte LocalSystem ! Si Apache doit pouvoir accder + des ressources rseau, crez un compte spar pour Apache comme + indiqu ci-dessous.
    + +

    Il est fortement fortement conseill aux utilisateurs de crer un + compte spar pour excuter le(s) service(s) Apache, et mme + obligatoire si vous devez accder des ressources rseau via + Apache.

    + +
      +
    1. Crez un compte d'utilisateur du domaine normal, et + assurez-vous de retenir son mot de passe.
    2. + +
    3. Accordez l'utilisateur nouvellement cr les privilges + Log on as a service et Act as part of the + operating system. Sous Windows NT 4.0, ces privilges sont + accords via le Gestionnaire des utilisateurs du Domaine, mais + sous Windows 2000 et XP, vous aurez plutt intrt utiliser une + GPO pour propager ces configurations. Vous pouvez aussi effectuer + ces rglages via la Politique de Scurit Locale intgre la + MMC.
    4. + +
    5. Vrifiez que le compte nouvellement cr est membre du groupe + Utilisateurs
    6. + +
    7. Accordez ce compte les droits Lecture et Excution (RX) sur + tous les documents et rpertoires de scripts (htdocs + et cgi-bin par exemple), et aussi sur l'excutable + binaire httpd.exe.
    8. + +
    9. Accordez aussi ce compte les droits de modification sur le + rpertoire logs.
    10. + +
    + +
    Il est en gnral de bonne pratique d'accorder l'utilisateur + sous lequel le service Apache s'excute les droits en lecture et + excution (RX) sur l'ensemble du rpertoire Apache2.4, sauf pour le + sous-rpertoire logs, sur lequel l'utilisateur doit + avoir au moins les droits de modification (RWXD).
    + +

    Si vous permettez ce compte de se connecter en tant + qu'utilisateur et service, vous pouvez ouvrir une session sous ce + compte et vrifier s'il a bien le droit d'excuter les scripts, de + lire les pages web, et si vous pouvez dmarrer Apache partir d'une + console Windows. Si tout fonctionne, et si vous avez suivi les + tapes ci-dessus, Apache devrait s'excuter en tant que service sans + problme.

    + +
    Le code d'erreur 2186 indique probablement + qu'Apache ne peut pas accder une ressource rseau ncessaire, et + que vous devez revoir la configuration "Log On As" (Se connecter en + tant que ...) du service.
    + +

    Lorsqu'Apache dmarre en tant que service, il se peut que vous + obteniez un message d'erreur du Gestionnaire de Services Windows. + Par exemple, si vous essayez de dmarrer Apache en utilisant + l'applet Services du Panneau de configuration de Windows, vous + pouvez obtenir le message suivant :

    + +

    + Could not start the Apache2.4 service on \\COMPUTER
    + Error 1067; The process terminated unexpectedly. +

    + +

    Vous obtiendrez cette erreur caractre gnral pour tout + problme survenant au cours du dmarrage du service Apache. Afin de + dterminer exactement la cause du problme, vous devez suivre les + instructions permettant d'excuter Apache pour Windows depuis la + ligne de commande.

    + +

    Si vous rencontrez des problmes avec le service, il est + conseill de suivre les instructions ci-dessous afin d'essayer de + dmarrer httpd.exe depuis une console, et d'analyser les erreurs + plutt que vous dmener essayer de dmarrer le service.

    + +
    top
    +
    +

    Excuter Apache depuis la console

    + + +

    Il est en gnral recommand d'excuter Apache en tant que + service, mais il est parfois plus simple d'utiliser la ligne de + commande, en particulier au cours de la configuration initiale et + les tests.

    + +

    Pour excuter Apache depuis la ligne de commande et en tant + qu'application de console, utilisez la commande suivante :

    + +

    + httpd.exe +

    + +

    Apache va dmarrer, et continuera son excution jusqu' ce qu'on + l'arrte en tapant Ctrl-C.

    + +

    Vous pouvez galement dmarrer Apache via le raccourci "Dmarrer + Apache dans une console" plac dans Dmarrer --> + Programmes --> Apache HTTP Server 2.4.xx --> Control Apache + Server au cours de l'installation. Ceci va + ouvrir une console Windows, et y dmarrer Apache. + Si vous n'avez pas install Apache en tant que service, la + fentre Windows restera ouverte jusqu' ce que vous arrtiez Apache + en tapant Ctrl-C dans cette fentre. Le serveur va alors s'arrter + au bout de quelques secondes. Cependant, si vous avez install + Apache en tant que service, c'est ce dernier que le raccourci + ci-dessus va lancer. Si le service Apache est dj en cours + d'excution, le raccourci va rester sans effet.

    + +

    Si Apache s'excute en tant que service, vous pouvez l'arrter en + ouvrant une autre console et en entrant :

    + +

    + httpd.exe -k shutdown +

    + +

    Plutt que de lancer Apache partir d'une console, il est + prfrable de l'excuter en tant que service car dans ce cas, il + termine proprement les oprations en cours avant de s'teindre.

    + +

    Si le serveur a t lanc depuis une console, vous ne pouvez + l'arrter qu'en pressant la combinaison de touches Ctrl-C dans la + mme fentre.

    + +

    Vous pouvez aussi redmarrer Apache. Ceci le force recharger + son fichier de configuration. Toute opration en cours peut tre + acheve sans interruption. Pour redmarrer Apache, vous pouvez soit + taper Control-Break dans la fentre de console que vous avez + utilise pour le dmarrer, soit entrer :

    + +

    + httpd.exe -k restart +

    + +

    si le serveur s'excute en tant que service.

    + +
    Note pour les utilisateurs familiers de la version Unix + d'Apache : les commandes ci-dessus reprsentent pour Windows + l'quivalent des commandes kill -TERM pid et + kill -USR1 pid. L'option de ligne de commande + -k a t choisie titre de rapprochement avec la + commande kill utilise sous Unix.
    + +

    Si la fentre de la console Apache se ferme immdiatement ou + inopinment aprs le dmarrage d'Apache, ouvrez une console Windows + depuis le menu Dmarrer --> Programmes. Placez-vous dans le + rpertoire d'installation d'Apache, tapez la commande + httpd.exe, et observez le message d'erreur. Allez + ensuite dans le rpertoire des journaux, et visualisez le fichier + error.log pour dtecter d'ventuelles erreurs de + configuration. Si Apache a t install dans C:\Program + Files\Apache Software Foundation\Apache2.4\, vous + pouvez entrer ce qui suit :

    + +

    + c:
    + cd "\Program Files\Apache Software Foundation\Apache2.4\bin"
    + httpd.exe +

    + +

    Attendez ensuite qu'Apache s'arrte ou tapez Ctrl-C. Entrez alors + la commande suivante :

    + +

    + cd ..\logs
    + more < error.log +

    + +

    Lorsqu'on travaille avec Apache, il est important de comprendre + comment ce dernier trouve son fichier de configuration. Vous pouvez + spcifier un fichier de configuration partir de la ligne de + commande de deux faons :

    + +
      +
    • L'option -f permet de spcifier un chemin + absolu ou relatif vers un fichier de configuration particulier + :

      (sous Windows 9x, il est recommand d'utiliser la ligne de + commande cause du manque de fiabilit du support des services + fourni par ce systme). + +

      + httpd.exe -f "c:\fichiers-de-mon-serveur\autre-config.conf" +

      + +

      ou

      + +

      + httpd.exe -f fichiers-de-mon-serveur\autre-config.conf +

    • + +
    • L'option -n permet de spcifier le service + Apache install dont le fichier de configuration doit tre utilis + :

      + +

      + httpd.exe -n "Nom-service" +

      +
    • +
    + +

    Dans les deux cas, la directive ServerRoot doit tre correctement dfinie + dans le fichier de configuration.

    + +

    Si vous ne spcifiez aucun fichier de configuration l'aide des + options -f ou -n, Apache utilisera le nom + du fichier de configuration compil dans le serveur, en gnral + conf\httpd.conf. Ce chemin cod en dur est relatif au + rpertoire d'installation. Vous pouvez vrifier ce chemin partir + de la valeur de l'tiquette SERVER_CONFIG_FILE en + invoquant Apache avec l'option -V, comme ceci :

    + +

    + httpd.exe -V +

    + +

    Apache va ensuite essayer de dterminer la valeur de son + ServerRoot en effectuant les + recherches suivantes, dans cet ordre :

    + +
      +
    1. Une directive ServerRoot + via l'option de ligne de commande -C.
    2. + +
    3. L'option de ligne de commande -d.
    4. + +
    5. Le rpertoire de travail courant.
    6. + +
    7. Une entre de la base de registre cre dans le cas d'une + installation binaire.
    8. + +
    9. La racine des documents (DocumentRoot) code en dur + dans le serveur. Elle + correspond par dfaut /apache, et vous pouvez le + vrifier en tapant httpd.exe -V et en recherchant + l'tiquette HTTPD_ROOT.
    10. +
    + +

    Si vous n'avez pas effectu d'installation binaire, dans certains + scnarios, Apache va signaler l'absence de cette cl de registre. + On peut passer outre cet avertissement si le serveur a t en mesure + de trouver son fichier de configuration d'une autre manire.

    + +

    La valeur de cette cl correspond au rpertoire ServerRoot qui contient lui-mme le + sous-rpertoire conf. Lors de son dmarrage, Apache lit + le fichier httpd.conf partir de ce rpertoire. Si ce + fichier contient une directive ServerRoot qui spcifie un rpertoire + diffrent de celui que contient la cl de registre ci-dessus, Apache + oubliera la cl de registre, et utilisera le rpertoire spcifi par + le fichier de configuration. Si vous dplacez le rpertoire Apache + ou ses fichiers de configuration, il est vital de mettre jour la + directive ServerRoot dans + httpd.conf afin de reflter la nouvelle + localisation.

    + +
    top
    +
    +

    Vrification de l'installation

    + + +

    Une fois Apache dmarr (soit partir d'une console Windows, + soit en tant que service), ce dernier va se mettre l'coute sur + le port 80 ( moins que vous ayiez modifi la directive Listen dans les fichiers de + configuration ou que vous ayiez install Apache pour l'utilisateur + courant seulement). Pour vous connecter au serveur et accder la + page par dfaut, lancez un navigateur et entrez cette URL :

    + +

    + http://localhost/ +

    + +

    Apache devrait renvoyer une page de bienvenue et vous devriez + voir s'afficher "It Works!". Si rien ne se passe ou si vous obtenez + une erreur, consultez le fichier error.log dans le + sous-rpertoire logs. Si votre serveur n'est pas + connect au rseau, ou si vous avez de srieux problmes avec la + configuration de votre DNS (Domain Name Service), vous devez + utiliser cette URL :

    + +

    + http://127.0.0.1/ +

    + +

    Si Apache coute un port non standard, vous devez le prciser + explicitement dans l'URL :

    + +

    + http://127.0.0.1:8080/ +

    + +

    Aprs que votre installation de base fonctionne, vous devez la + configurer correctement en ditant les fichiers du sous-rpertoire + conf. Encore une fois, si vous modifiez la + configuration du service Apache sous Windows NT, essayez d'abord de + redmarrer le service depuis la ligne de commande afin de vous + assurer de l'absence d'erreur.

    + +

    Comme Apache ne peut pas partager le mme port + avec d'autres applications TCP/IP, il se peut que vous soyez amen + arrter, dsinstaller ou reconfigurer certains services avant de + dmarrer Apache. Ces services entrant en conflit avec Apache + comprennent les autres serveurs WWW, certaines implmentations de + pare-feu, et mme certaines applications client (comme Skype) qui + utilisent le port 80 afin de contourner les pare-feu.

    + +
    top
    +
    +

    Configuration de l'accs aux ressources rseau

    + + +

    L'accs des fichiers par le rseau peut tre spcifi via deux + mcanismes fournis par Windows :

    + +
    +
    Association de lettres de lecteur
    +
    Par exemple, Alias "/images/" "Z:/"
    + +
    chemins UNC
    +
    Par exemple, Alias "/images/" "//imagehost/www/images/"
    +
    + +

    L'association de lettres de lecteur permet l'administrateur de + maintenir une correspondance avec une certaine machine et un certain + chemin en dehors de la configuration d'Apache httpd. Cependant, ces + associations ne sont possibles que dans le cadre des sessions + interactives, et ne sont pas directement disponibles pour Apache httpd + lorsqu'il est dmarr en tant que service. N'utilisez par + consquent que des + chemins UNC pour les ressources rseau dans httpd.conf, de + faon ce que les ressources soient accessibles quelle que soit la + manire dont Apache httpd a t dmarr (des procdures exotiques et + probablement sujettes aux erreurs peuvent permettre de contourner la + restriction due aux associations de lettres de lecteur, mais leur + utilisation est dconseille).

    + +

    Exemple de DocumentRoot avec chemin UNC

    DocumentRoot "//dochost/www/html/"
    +
    + +

    Exemple de DocumentRoot avec adresse IP dans le chemin UNC

    DocumentRoot "//192.168.1.50/docs/"
    +
    + +

    Exemple d'Alias et rpertoire correspondant avec + chemin UNC

    Alias "/images/" "//imagehost/www/images/"
    +
    +<Directory "//imagehost/www/images/">
    +#...
    +<Directory>
    +
    + +

    Lorsqu'Apache s'excute en tant que service, vous devez crer un + compte spcifique afin de pouvoir accder aux ressources rseau, comme + dcrit ci-dessus.

    +
    top
    +
    +

    Personnalisation sous Windows

    + +
      +
    • Si on utilise un grand nombre de redirections de journaux + via des pipes, il est souvent ncessaire d'augmenter la + taille de la mmoire du bureau ("desktop heap"). Pour une information plus + dtaille, veuillez vous reporter la documentation sur les redirections de journaux.

    • +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/platform/windows.html.ko.euc-kr b/docs/manual/platform/windows.html.ko.euc-kr index 7ecc7ddfffc..e2a16439895 100644 --- a/docs/manual/platform/windows.html.ko.euc-kr +++ b/docs/manual/platform/windows.html.ko.euc-kr @@ -1,24 +1,30 @@ - -Microsoft Windows ġ - Apache HTTP Server +Microsoft Windows ġ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Microsoft Windows ġ

    ֽ ƴմϴ. @@ -54,7 +60,7 @@
  • ġ Service ϱ
  • ġ ܼ α׷ ϱ
  • ġǾ ˻ϱ
  • -
    +

    top

    ü 䱸

    @@ -681,8 +687,30 @@

    :  en  | + fr  |  ko 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/platform/windows.xml b/docs/manual/platform/windows.xml index a2fd8f5bec7..c4c3ba08dc4 100644 --- a/docs/manual/platform/windows.xml +++ b/docs/manual/platform/windows.xml @@ -27,7 +27,7 @@

    This document explains how to install, configure and run - Apache 2.3 under Microsoft Windows. If you have questions after + Apache 2.&httpd.minor; under Microsoft Windows. If you have questions after reviewing the documentation (and any event and error logs), you should consult the peer-supported users' mailing @@ -43,9 +43,8 @@

    Operating System Requirements -

    The primary Windows platform for running Apache 2.3 is Windows - 2000 or later. The binary installer only works with the x86 family - of processors, such as Intel and AMD processors. Always obtain and +

    The primary Windows platform for running Apache 2.&httpd.minor; is Windows + 2000 or later. Always obtain and install the current service pack to avoid operating system bugs.

    Apache HTTP Server versions later than 2.2 will not run on any @@ -55,171 +54,25 @@
    Downloading Apache for Windows -

    Information on the latest versions of Apache can be found on the - web site of the Apache web server at - http://httpd.apache.org/download.cgi. - There you will find the current release, as well as more recent alpha - or beta test versions, and a list of HTTP and FTP mirrors from which - you can download the Apache web server. Please use a mirror near to - you for a fast and reliable download.

    - -

    For Windows installations you should download the version of - Apache for Windows with the .msi extension. This is a - single Microsoft Installer file, which contains a ready-to-run - build of Apache. There is a separate .zip file, - which contains only the source code, see the summary above.

    - -

    There is a choice between an *-openssl-*.msi flavor and - a *-no_ssl.msi flavor. The *-openssl-*.msi flavor is distributed - by the Apache Software Foundation under ECCN 5D002 pursuant to - US Export Law license exception TSU. This law may or may not - apply to your circumstance, please review the httpd README as - well as the ASF - Export Classifications and Source Links page. The project - provides no further guidance to third parties in resolving the - legal circumstances which apply in each circumstance.

    -
    - -
    - Installing Apache for Windows - -

    You need Microsoft Installer 2.0 or above for the installation - to work. For Windows NT 4.0 and 2000 refer to Microsoft's article - KB 292539. - Windows XP and later do not require this update.

    - -

    Note that you cannot install two versions of Apache 2.3 on the - same computer with the binary installer. You can, however, install - a version of the 1.3 series and a version of the - 2.3 series on the same computer without problems. If you need to - have two different 2.3 versions on the same computer, you have to - compile and install Apache from the - source.

    - -

    Run the Apache .msi file you downloaded above. The - installation will ask you for these things:

    - -
      -
    1. Network Domain. Enter the DNS domain in which - your server is or will be registered in. For example, if your - server's full DNS name is server.example.net, you would - type example.net here.

    2. - -
    3. Server Name. Your server's full DNS name. - From the example above, you would type server.example.net - here.

    4. - -
    5. Administrator's Email Address. Enter the - server administrator's or webmaster's email address here. This - address will be displayed along with error messages to the client - by default.

    6. - -
    7. For whom to install Apache Select for - All Users, on Port 80, as a Service - Recommended if you'd - like your new Apache to listen at port 80 for incoming traffic. - It will run as a service (that is, Apache will run even if no one - is logged in on the server at the moment) Select only for - the Current User, on Port 8080, when started Manually if - you'd like to install Apache for your personal experimenting or - if you already have another WWW server running on port 80.

    8. - -
    9. The installation type. Select Typical - for everything except the source code and libraries for module - development. With Custom you can specify what to - install. A full install will require about 13 megabytes of free - disk space. This does not include the size of your web - site(s).

    10. - -
    11. Where to install. The default path is - C:\Program Files\Apache Software Foundation - under which a directory called - Apache2.3 will be created by default.

    12. -
    - -

    During the installation, Apache will configure the files in the - conf subdirectory to reflect the chosen installation - directory. However, if any of the configuration files in this - directory already exist, they will not be overwritten. Instead, the - new copy of the corresponding file will be left with the extension - .default. So, for example, if conf\httpd.conf - already exists, it will be renamed as conf\httpd.conf.default. - After the installation you should manually check to see what new - settings are in the .default file, and if necessary, - update your existing configuration file.

    - -

    Also, if you already have a file called htdocs\index.html, - it will not be overwritten (and no index.html.default - will be installed either). This means it should be safe to install - Apache over an existing installation, although you would have to - stop the existing running server before doing the installation, and - then start the new one after the installation is finished.

    - -

    After installing Apache, you must edit the configuration files - in the conf subdirectory as required. These files - will be configured during the installation so that Apache is ready - to be run from the directory it was installed into, with the - documents server from the subdirectory htdocs. There - are lots of other options which you should set before you really - start using Apache. However, to get started quickly, the files - should work as installed.

    -
    - -
    - Advanced Installation Topics - -

    One feature of the installer, "Build Headers and Libraries", can be - ignored by most users, but should be installed if compiling third party - modules. The "APR Iconv Code Pages" can similarly be omitted by most - users, unless using mod_charset_lite or a third party - module which relies on APR internationalization features.

    - -

    There are requests to ship a .zip file from time to time. There is - no point in the ASF consuming additional storage, mirroring and bandwidth - for this purpose, because the .msi installer allows the installation - artifacts to all be unpacked using the msiexec /a network - installation option. Using this command against any .msi will result - in an exploded tree of all of the individual files and components.

    - -

    The installation options above can be customized by users familiar - with msiexec.exe options and silent installation. The actual installer - sources are available in the httpd/httpd/win32-msi/ tree of the httpd - project subversion respository. For reference, some of the more common - variables which may be modified are;

    - -
      -
    • AgreeToLicense (toggle to "Yes")
    • -
    • ALLUSERS (choose between Null and "1")
    • -
    • ApplicationUsers (toggle to "OnlyCurrentUser")
    • -
    • EXISTING_APACHE_SERVICE_PATH
    • -
    • INSTALLDIR (default "ProgramFilesFolder\Apache Software Foundation\Apache2.2\")
    • -
    • INSTALLLEVEL (default "100", refer to list below)
    • -
    • RESOLVED_WINSOCK2 (toggle to "1")
    • -
    • SERVERADMIN
    • -
    • SERVERDOMAIN
    • -
    • SERVERNAME
    • -
    • SERVERPORT (default "80")
    • -
    • SERVERSSLPORT (default "443")
    • -
    • SERVICEINTERNALNAME (default "Apache2.2", no spaces!)
    • -
    • SERVICENAME (default "Apache2.2", include spaces)
    • -
    • SetupType (default "Typical")
    • -
    - -

    The installation level of various features, which may be individually - toggled, include;

    +

    The Apache HTTP Server Project itself does not provide binary releases of + software, only source code. Individual committers may provide + binary packages as a convenience, but it is not a release deliverable.

    +

    If you cannot compile the Apache HTTP Server + yourself, you can obtain a binary package from numerous binary distributions + available on the Internet.

    +

    Popular options for deploying Apache httpd, and, optionally, PHP + and MySQL, on Microsoft Windows, include:

      -
    • Apache (1, base Apache HTTP Server 2.2 feature)
    • -
    • ApacheDocs (11, Apache Documentation)
    • -
    • ApacheMonitoring (41, Apache Service Taskbar Icon)
    • -
    • ApacheRuntime (1, Apache Runtime)
    • -
    • BuildFiles (101, Build Headers and Libraries)
    • -
    • Iconv (21, APR Iconv Code Pages)
    • -
    • OpensslBin (31, OpenSSL Runtime)
    • -
    • SslBin (41, Ssl Binaries)
    • +
    • ApacheHaus
    • +
    • Apache Lounge
    • +
    • BitNami WAMP Stack
    • +
    • WampServer
    • +
    • XAMPP
    +
    -
    Customizing Apache for Windows @@ -266,9 +119,7 @@ Windows filenames instead of Unix ones. However, because Apache may interpret backslashes as an "escape character" sequence, you should consistently use forward slashes in path names, not - backslashes. Drive letters can be used; if omitted, the drive - of the SystemRoot directive (or -d command line option) becomes - the default.

    + backslashes.

  • While filenames are generally case-insensitive on Windows, URLs are still treated internally as case-sensitive @@ -284,12 +135,12 @@ how it is accessed. If you wish to assure that only lowercase is used in URLs, you can use something like:

    - - RewriteEngine On
    - RewriteMap lowercase int:tolower
    - RewriteCond %{REQUEST_URI} [A-Z]
    - RewriteRule (.*) ${lowercase:$1} [R,L] -
  • + +RewriteEngine On +RewriteMap lowercase int:tolower +RewriteCond "%{REQUEST_URI}" "[A-Z]" +RewriteRule "(.*)" "${lowercase:$1}" [R,L] +
  • When running, Apache needs write access only to the logs directory and any configured cache directory tree. Due to the @@ -297,22 +148,22 @@ validate all path names given. This means that each directory which Apache evaluates, from the drive root up to the directory leaf, must have read, list and traverse directory permissions. - If Apache2.3 is installed at C:\Program Files, then the root - directory, Program Files and Apache2.3 must all be visible + If Apache2.&httpd.minor; is installed at C:\Program Files, then the root + directory, Program Files and Apache2.&httpd.minor; must all be visible to Apache.

  • Apache for Windows contains the ability to load modules at runtime, without recompiling the server. If Apache is compiled normally, it will install a number of optional modules in the - \Apache2.3\modules directory. To activate these or - other modules, the new LoadModule + \Apache2.&httpd.minor;\modules directory. To activate these or + other modules, the LoadModule directive must be used. For example, to activate the status module, use the following (in addition to the status-activating directives in access.conf):

    - + LoadModule status_module modules/mod_status.so - +

    Information on creating loadable modules is also available.

  • @@ -339,7 +190,7 @@ Windows event log when running on Windows NT. This mechanism acts as a backup for those situations where Apache is not yet prepared to use the error.log file. You can - review the Windows Applicat Event Log by using the Event Viewer, + review the Windows Application Event Log by using the Event Viewer, e.g. Start - Settings - Control Panel - Administrative Tools - Event Viewer.

    @@ -349,13 +200,6 @@
    Running Apache as a Service -

    You can install Apache as a service automatically during the - installation. If you chose to install for all users, the - installation will create an Apache service for you. If you specify - to install for yourself only, you can manually register Apache as a - service after the installation. You have to be a member of the - Administrators group for the service installation to succeed.

    -

    Apache comes with a utility called the Apache Service Monitor. With it you can see and manage the state of all installed Apache services on any machine on your network. To be able to manage an @@ -373,7 +217,8 @@

    If you need to specify the name of the service you want to install, use the following command. You have to do this if you have several different service installations of Apache on your - computer.

    + computer. If you specify a name during the install, you have to + also specify it during any other -k operation.

    httpd.exe -k install -n "MyServiceName" @@ -387,7 +232,7 @@

    If you use the first command without any special parameters except - -k install, the service will be called Apache2.3 + -k install, the service will be called Apache2.&httpd.minor; and the configuration will be assumed to be conf\httpd.conf.

    @@ -405,8 +250,8 @@

    Normal starting, restarting and shutting down of an Apache service is usually done via the Apache Service Monitor, by using - commands like NET START Apache2.3 and NET STOP - Apache2.3 or via normal Windows service management. Before + commands like NET START Apache2.&httpd.minor; and NET STOP + Apache2.&httpd.minor; or via normal Windows service management. Before starting Apache as a service by any means, you should test the service's configuration file by using:

    @@ -418,27 +263,27 @@ too. To start an installed Apache service you'll use this:

    - httpd.exe -k start + httpd.exe -k start -n "MyServiceName"

    To stop an Apache service via the command line switches, use this:

    - httpd.exe -k stop + httpd.exe -k stop -n "MyServiceName"

    or

    - httpd.exe -k shutdown + httpd.exe -k shutdown -n "MyServiceName"

    You can also restart a running service and force it to reread its configuration file by using:

    - httpd.exe -k restart + httpd.exe -k restart -n "MyServiceName"

    By default, all Apache services are registered to run as the @@ -484,7 +329,7 @@ It is usually a good practice to grant the user the Apache - service runs as read and execute (RX) access to the whole Apache2.3 + service runs as read and execute (RX) access to the whole Apache2.&httpd.minor; directory, except the logs subdirectory, where the user has to have at least change (RWXD) rights. @@ -507,7 +352,7 @@ Windows Control Panel, you may get the following message:

    - Could not start the Apache2.3 service on \\COMPUTER
    + Could not start the Apache2.&httpd.minor; service on \\COMPUTER
    Error 1067; The process terminated unexpectedly.
    @@ -541,7 +386,7 @@

    You can also run Apache via the shortcut Start Apache in Console placed to Start Menu --> Programs --> Apache HTTP Server - 2.3.xx --> Control Apache Server during the installation. + 2.&httpd.minor;.xx --> Control Apache Server during the installation. This will open a console window and start Apache inside it. If you don't have Apache installed as a service, the window will remain visible until you stop Apache by pressing Control-C in the console @@ -587,12 +432,13 @@ Programs. Change to the folder to which you installed Apache, type the command httpd.exe, and read the error message. Then change to the logs folder, and review the error.log - file for configuration mistakes. If you accepted the defaults when - you installed Apache, the commands would be:

    + file for configuration mistakes. Assuming httpd was installed into + C:\Program Files\Apache Software Foundation\Apache2.&httpd.minor;\, + you can do the following:

    c:
    - cd "\Program Files\Apache Software Foundation\Apache2.3\bin"
    + cd "\Program Files\Apache Software Foundation\Apache2.&httpd.minor;\bin"
    httpd.exe
    @@ -666,32 +512,6 @@ HTTPD_ROOT. -

    During the installation, a version-specific registry key is - created in the Windows registry. The location of this key depends - on the type of the installation. If you chose to install Apache - for all users, the key is located under the - HKEY_LOCAL_MACHINE hive, like this (the version - numbers will of course vary between different versions of Apache: -

    - - - HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Apache\2.2.2 - - -

    Correspondingly, if you chose to install Apache for the current - user only, the key is located under the HKEY_CURRENT_USER - hive, the contents of which are dependent of the user currently - logged on:

    - - - HKEY_CURRENT_USER\SOFTWARE\Apache Software Foundation\Apache\2.2.2 - - -

    This key is compiled into the server and can enable you to test - new versions without affecting the current version. Of course, you - must take care not to install the new version in the same - directory as another version.

    -

    If you did not do a binary install, Apache will in some scenarios complain about the missing registry key. This warning can be ignored if the server was otherwise able to find its @@ -765,10 +585,10 @@

    Mapped drive letters
    -
    e.g., Alias /images/ Z:/
    +
    e.g., Alias "/images/" "Z:/"
    UNC paths
    -
    e.g., Alias /images/ //imagehost/www/images/
    +
    e.g., Alias "/images/" "//imagehost/www/images/"

    Mapped drive letters allow the administrator to maintain the @@ -782,19 +602,25 @@ on mapped drive letters, but this is not recommended.)

    Example DocumentRoot with UNC path - DocumentRoot //dochost/www/html/ + + DocumentRoot "//dochost/www/html/" + Example DocumentRoot with IP address in UNC path - DocumentRoot //192.168.1.50/docs/
    + + DocumentRoot "//192.168.1.50/docs/" +
    Example Alias and corresponding Directory with UNC path - Alias /images/ //imagehost/www/images/
    -
    - <Directory //imagehost/www/images/>
    - ...
    - <Directory>
    + +Alias "/images/" "//imagehost/www/images/" + +<Directory "//imagehost/www/images/"> +#... +<Directory> +

    When running Apache httpd as a service, you must create a @@ -802,4 +628,13 @@ above.

    +
    + Windows Tuning +
      +
    • If more than a few dozen piped loggers are used on an operating system + instance, scaling up the "desktop heap" is often necessary. For + more detailed information, refer to the piped logging documentation.

    • +
    +
    diff --git a/docs/manual/platform/windows.xml.fr b/docs/manual/platform/windows.xml.fr new file mode 100644 index 00000000000..7994580da96 --- /dev/null +++ b/docs/manual/platform/windows.xml.fr @@ -0,0 +1,707 @@ + + + + + + + + + + + Notes spécifiques à un + système + + Utilisation du serveur HTTP Apache sous Microsoft Windows + + + +

    Ce document décrit l'installation, la configuration et + l'exécution d'Apache 2.&httpd.minor; sous Microsoft Windows. Si vous avez des + questions après avoir lu la documentation, ou si vous avez rencontré + des évènements particuliers ou des rapports d'erreur, vous pouvez + consultez la liste + de diffusion de la communauté des utilisateurs.

    + +

    Dans ce document, nous supposons que vous installez une + distribution binaire d'Apache. Si vous voulez compiler Apache + vous-même (par exemple pour aider au développement ou pour + rechercher des bogues), référez-vous au document Compilation d'Apache pour Microsoft + Windows.

    + +
    + +
    + Prérequis du système d'exploitation + +

    La plate-forme Windows de base pour l'exécution d'Apache 2.&httpd.minor; est + Windows 2000 ou supérieur. Veillez à toujours vous procurer et installer le + dernier service pack afin d'éviter les bogues du système + d'exploitation.

    + + Les versions du serveur HTTP Apache supérieures à 2.2 ne + fonctionneront sous aucun système d'exploitation d'une version + antérieure à Windows 2000. + +
    + +
    + Téléchargement d'Apache pour Windows + +

    Le projet du serveur HTTP Apache proprement dit ne fournit pas de + distribution binaire mais seulement le code source. Certains membres + du projet peuvent mettre à disposition des paquets binaires + à titre individuel, mais ceux-ci n'ont pas vocation à être + distribués publiquement.

    + +

    Si vous n'êtes + pas en mesure de compiler le serveur HTTP Apache vous-même, vous + pouvez vous procurer un paquet binaire auprès des nombreuses + distributions disponibles sur Internet.

    + +

    Quelques solutions populaires pour déployer Apache httpd, et + éventuellement PHP et MySQL sous Microsoft Windows :

    + +
    + +
    + Personnaliser Apache pour Windows + +

    La configuration d'Apache est enregistrée dans les fichiers du + sous-répertoire conf. Ce sont les même fichiers que + ceux utilisés pour configurer la version Unix, mais il y a quelques + directives spécifiques à Apache pour Windows. Voir l'index des directives pour la liste + des directives disponibles.

    + +

    Les principales spécificités d'Apache pour Windows sont :

    +
      +
    • Comme Apache pour Windows est un programme multithread, il + ne lance pas de processus séparé pour chaque requête, comme Apache + peut le faire sous Unix. En fait, il n'y a en général que deux + processus Apache en exécution : un processus parent, et un + processus enfant qui traite les requêtes. Chaque requête est + traitée par un thread séparé au sein du processus enfant.

      + +

      Les directives de gestion de processus diffèrent également :

      + +

      MaxConnectionsPerChild + : comme dans la version Unix, cette directive contrôle le nombre + de connexions qu'un + processus enfant particulier va traiter avant de s'arrêter. + Cependant, à la différence d'Unix, un processus de remplacement + n'est pas instantanément disponible. Utilisez la définition par + défaut MaxConnectionsPerChild 0, sauf si vous + risquez de manquer de mémoire dans des modules tiers ou dans des + applications in-process.

      + + Attention : le fichier de + configuration du serveur est rechargé lorsqu'un nouveau processus + enfant est démarré. En conséquence, si vous avez modifié + httpd.conf, le nouveau processus enfant peut ne pas + démarrer, ou vous pouvez obtenir des résultats + inattendus. + +

      ThreadsPerChild : il + s'agit d'une nouvelle directive. Elle indique au serveur le nombre + de threads qu'il doit utiliser. Elle définit le nombre maximum de + connexions simultanées que le serveur peut gérer ; vous devez + donc vous assurer que ce nombre soit suffisamment grand pour les + besoins de votre site. La valeur par défaut ThreadsPerChild + 150 est recommandée, mais doit être ajustée à la valeur + maximale estimée de connexions simultanées à accepter.

    • + +
    • Les directives qui acceptent des noms de fichiers comme + arguments doivent utiliser des noms de fichiers Windows et non + Unix. Cependant, comme Apache peut interpréter les anti-slashes + comme des séquences d'échappement de caractères, vous devez + absolument utiliser des slashes dans les noms de chemins à la + place des anti-slashes.

    • + +
    • Alors que les noms de fichiers sont en général insensibles + à la casse sous Windows, les URLs sont encore sensibles à la casse + en interne avant d'être mises en correspondance avec le système de + fichiers. Par exemple, les directives Location, Alias, et ProxyPass utilisent toutes des + arguments sensibles à la casse. Pour cette raison, il est + particulièrement recommandé d'utiliser la directive Directory lorsqu'on + désire limiter l'accès à certains contenus du système de fichiers, + car cette directive s'applique à tout contenu d'un répertoire, + sans tenir compte de la manière dont on y accède. Pour vous + assurer que seules des minuscules sont utilisées dans les URLs, + vous pouvez utiliser ceci :

      + + +RewriteEngine On +RewriteMap lowercase int:tolower +RewriteCond "%{REQUEST_URI}" "[A-Z]" +RewriteRule "(.*)" "${lowercase:$1}" [R,L] +
    • + +
    • Lors de son exécution, Apache n'a besoin d'un accès en + écriture qu'au répertoire des journaux et à toute arborescence de + répertoires de cache configurée. Suite au problème d'insensibilité + à la casse et au format de noms courts 8.3, Apache doit valider + tous les noms de chemins fournis. Cela signifie que chaque + répertoire qu'Apache évalue doit avoir les droits en lecture, + listage et parcours, et ceci depuis la racine jusqu'aux feuilles. + Si Apache2.&httpd.minor; est installé dans C:\Program Files, le répertoire + racine, Program Files et Apache2.&httpd.minor; doivent tous être visibles pour + Apache

    • + +
    • Apache peut charger divers modules sans qu'il soit nécessaire + de recompiler le serveur. Si Apache est compilé + normalement, il va installer de nombreux modules optionnels dans + le répertoire \Apache2.&httpd.minor;\modules. Pour activer ces + modules ou d'autres modules, on doit utiliser la + directive LoadModule. Par + exemple, pour activer le module status, ajoutez la ligne suivante + (en plus des directives d'activation de status dans + access.conf) :

      + + + LoadModule status_module modules/mod_status.so + + +

      Des informations sont aussi à votre disposition pour créer des modules + chargeables

    • + +
    • Apache peut aussi charger des extensions ISAPI (Internet + Server Application Programming Interface), comme celles qu'utilise + Microsoft IIS et d'autres serveurs Windows. Voir ici pour plus + d'informations. Notez qu'Apache ne peut pas + charger de filtres ISAPI, et que les gestionnaires ISAPI contenant + des extensions de fonctionnalités Microsoft ne fonctionneront + pas.

    • + +
    • Pour les scripts CGI, la méthode qu'utilise Apache pour + déterminer l'interpréteur du script est configurable grâce à la + directive ScriptInterpreterSource

    • + +
    • Comme il est souvent difficile de gérer des fichiers avec + des noms du style .htaccess sous Windows, vous avez + tout intérêt à changer le nom de ce fichier de configuration par + répertoire à l'aide de la directive AccessFilename.

    • + +
    • Toute erreur survenant au cours du processus de démarrage + d'Apache est enregistrée dans le journal des évènements de + Windows si l'on est sous Windows NT. Ce mécanisme fonctionne comme + une sauvegarde pour les situations où Apache n'est pas encore prêt + à utiliser le fichier error.log. Vous pouvez + consulter le journal des évènements applicatifs Windows en + utilisant l'observateur d'évènements : Démarrage - Paramètres - + Panneau de configuration - Outils d'administration - Observateur + d'évènements.

    • +
    + +
    + +
    + Exécuter Apache en tant que service + +

    Apache fournit un utilitaire nommé Apache Service Monitor + (Moniteur du service Apache). Grâce à lui, vous pouvez voir et gérer + l'état de tous les services Apache installés sur toutes les machines + du réseau. Pour pouvoir gérer un service Apache avec le moniteur, + vous devez d'abord installer le service (soit automatiquement au + cours de l'installation, soit manuellement).

    + +

    Vous pouvez installer Apache en tant que service Windows NT à + partir de la ligne de commandes et depuis le sous-répertoire Apache + bin comme suit :

    + + + httpd.exe -k install + + +

    Si vous avez installé plusieurs services Apache sur votre + ordinateur, vous devrez spécifier le nom du service que vous voulez + installer en utilisant la commande suivante (notez que si vous + spécifiez un nom durant l'installation, vous devrez aussi le + spécifier pour toute opération comportant l'option -k) :

    + + + httpd.exe -k install -n "Nom-service" + + +

    Si un service doit utiliser un fichier de configuration + spécifique, utilisez ceci :

    + + + httpd.exe -k install -n "Nom-service" -f "c:\fichiers\Nom-service.conf" + + +

    Si vous utilisez la première commande sans paramètre particulier, + excepté -k install, le service aura pour nom + Apache2.&httpd.minor; et le fichier de configuration sera censé + être conf\httpd.conf.

    + +

    Supprimer un service Apache est très simple. Utilisez + simplement :

    + + + httpd.exe -k uninstall + + +

    On peut spécifier un service Apache particulier en utilisant + :

    + + + httpd.exe -k uninstall -n "Nom service" + + +

    Normalement, le démarrage, le redémarrage et l'arrêt d'un + service Apache s'effectuent via le Moniteur de Service Apache, ou en + utilisant des commandes telles que NET START Apache2.&httpd.minor; et + NET STOP Apache2.&httpd.minor;, ou encore via le gestionnaire de + services standard de Windows. Avant de démarrer Apache en tant que + service dans quelque but que ce soit, vous devez tester le fichier + de configuration du service en utilisant :

    + + + httpd.exe -n "Nom-service" -t + + +

    Vous pouvez aussi contrôler un service Apache à l'aide de ses + options de ligne de commande. Avec cette méthode, pour démarrer un + service Apache installé, vous utiliserez :

    + + + httpd.exe -k start -n "Nom-Service" + + +

    Pour arrêter un service Apache via les options de lignes de + commande, utilisez ceci :

    + + + httpd.exe -k stop -n "Nom-Service" + + +

    ou

    + + + httpd.exe -k shutdown -n "Nom-Service" + + +

    Vous pouvez aussi redémarrer un service en exécution et le forcer + à relire son fichier de configuration en utilisant :

    + + + httpd.exe -k restart -n "Nom-Service" + + +

    Par défaut, tous les services Apache sont configurés pour + s'exécuter sous l'utilisateur system (le compte + LocalSystem). Le compte LocalSystem n'a + pas de privilèges sur votre réseau, que ce soit via un mécanisme + sécurisé de Windows, y compris le système de fichiers, des tubes + nommés, DCOM ou des RPC sécurisés. Il a cependant des privilèges + élevés en local.

    + + N'accordez jamais de privilèges réseau + au compte LocalSystem ! Si Apache doit pouvoir accéder + à des ressources réseau, créez un compte séparé pour Apache comme + indiqué ci-dessous. + +

    Il est fortement fortement conseillé aux utilisateurs de créer un + compte séparé pour exécuter le(s) service(s) Apache, et même + obligatoire si vous devez accéder à des ressources réseau via + Apache.

    + +
      +
    1. Créez un compte d'utilisateur du domaine normal, et + assurez-vous de retenir son mot de passe.
    2. + +
    3. Accordez à l'utilisateur nouvellement créé les privilèges + Log on as a service et Act as part of the + operating system. Sous Windows NT 4.0, ces privilèges sont + accordés via le Gestionnaire des utilisateurs du Domaine, mais + sous Windows 2000 et XP, vous aurez plutôt intérêt à utiliser une + GPO pour propager ces configurations. Vous pouvez aussi effectuer + ces réglages via la Politique de Sécurité Locale intégrée à la + MMC.
    4. + +
    5. Vérifiez que le compte nouvellement créé est membre du groupe + Utilisateurs
    6. + +
    7. Accordez à ce compte les droits Lecture et Exécution (RX) sur + tous les documents et répertoires de scripts (htdocs + et cgi-bin par exemple), et aussi sur l'exécutable + binaire httpd.exe.
    8. + +
    9. Accordez aussi à ce compte les droits de modification sur le + répertoire logs.
    10. + +
    + + Il est en général de bonne pratique d'accorder à l'utilisateur + sous lequel le service Apache s'exécute les droits en lecture et + exécution (RX) sur l'ensemble du répertoire Apache2.&httpd.minor;, sauf pour le + sous-répertoire logs, sur lequel l'utilisateur doit + avoir au moins les droits de modification (RWXD). + +

    Si vous permettez à ce compte de se connecter en tant + qu'utilisateur et service, vous pouvez ouvrir une session sous ce + compte et vérifier s'il a bien le droit d'exécuter les scripts, de + lire les pages web, et si vous pouvez démarrer Apache à partir d'une + console Windows. Si tout fonctionne, et si vous avez suivi les + étapes ci-dessus, Apache devrait s'exécuter en tant que service sans + problème.

    + + Le code d'erreur 2186 indique probablement + qu'Apache ne peut pas accéder à une ressource réseau nécessaire, et + que vous devez revoir la configuration "Log On As" (Se connecter en + tant que ...) du service. + +

    Lorsqu'Apache démarre en tant que service, il se peut que vous + obteniez un message d'erreur du Gestionnaire de Services Windows. + Par exemple, si vous essayez de démarrer Apache en utilisant + l'applet Services du Panneau de configuration de Windows, vous + pouvez obtenir le message suivant :

    + + + Could not start the Apache2.&httpd.minor; service on \\COMPUTER
    + Error 1067; The process terminated unexpectedly. +
    + +

    Vous obtiendrez cette erreur à caractère général pour tout + problème survenant au cours du démarrage du service Apache. Afin de + déterminer exactement la cause du problème, vous devez suivre les + instructions permettant d'exécuter Apache pour Windows depuis la + ligne de commande.

    + +

    Si vous rencontrez des problèmes avec le service, il est + conseillé de suivre les instructions ci-dessous afin d'essayer de + démarrer httpd.exe depuis une console, et d'analyser les erreurs + plutôt que vous démener à essayer de démarrer le service.

    + +
    + +
    + Exécuter Apache depuis la console + +

    Il est en général recommandé d'exécuter Apache en tant que + service, mais il est parfois plus simple d'utiliser la ligne de + commande, en particulier au cours de la configuration initiale et + les tests.

    + +

    Pour exécuter Apache depuis la ligne de commande et en tant + qu'application de console, utilisez la commande suivante :

    + + + httpd.exe + + +

    Apache va démarrer, et continuera son exécution jusqu'à ce qu'on + l'arrête en tapant Ctrl-C.

    + +

    Vous pouvez également démarrer Apache via le raccourci "Démarrer + Apache dans une console" placé dans Démarrer --> + Programmes --> Apache HTTP Server 2.&httpd.minor;.xx --> Control Apache + Server au cours de l'installation. Ceci va + ouvrir une console Windows, et y démarrer Apache. + Si vous n'avez pas installé Apache en tant que service, la + fenêtre Windows restera ouverte jusqu'à ce que vous arrêtiez Apache + en tapant Ctrl-C dans cette fenêtre. Le serveur va alors s'arrêter + au bout de quelques secondes. Cependant, si vous avez installé + Apache en tant que service, c'est ce dernier que le raccourci + ci-dessus va lancer. Si le service Apache est déjà en cours + d'exécution, le raccourci va rester sans effet.

    + +

    Si Apache s'exécute en tant que service, vous pouvez l'arrêter en + ouvrant une autre console et en entrant :

    + + + httpd.exe -k shutdown + + +

    Plutôt que de lancer Apache à partir d'une console, il est + préférable de l'exécuter en tant que service car dans ce cas, il + termine proprement les opérations en cours avant de s'éteindre.

    + +

    Si le serveur a été lancé depuis une console, vous ne pouvez + l'arrêter qu'en pressant la combinaison de touches Ctrl-C dans la + même fenêtre.

    + +

    Vous pouvez aussi redémarrer Apache. Ceci le force à recharger + son fichier de configuration. Toute opération en cours peut être + achevée sans interruption. Pour redémarrer Apache, vous pouvez soit + taper Control-Break dans la fenêtre de console que vous avez + utilisée pour le démarrer, soit entrer :

    + + + httpd.exe -k restart + + +

    si le serveur s'exécute en tant que service.

    + + Note pour les utilisateurs familiers de la version Unix + d'Apache : les commandes ci-dessus représentent pour Windows + l'équivalent des commandes kill -TERM pid et + kill -USR1 pid. L'option de ligne de commande + -k a été choisie à titre de rapprochement avec la + commande kill utilisée sous Unix. + +

    Si la fenêtre de la console Apache se ferme immédiatement ou + inopinément après le démarrage d'Apache, ouvrez une console Windows + depuis le menu Démarrer --> Programmes. Placez-vous dans le + répertoire d'installation d'Apache, tapez la commande + httpd.exe, et observez le message d'erreur. Allez + ensuite dans le répertoire des journaux, et visualisez le fichier + error.log pour détecter d'éventuelles erreurs de + configuration. Si Apache a été installé dans C:\Program + Files\Apache Software Foundation\Apache2.&httpd.minor;\, vous + pouvez entrer ce qui suit :

    + + + c:
    + cd "\Program Files\Apache Software Foundation\Apache2.&httpd.minor;\bin"
    + httpd.exe +
    + +

    Attendez ensuite qu'Apache s'arrête ou tapez Ctrl-C. Entrez alors + la commande suivante :

    + + + cd ..\logs
    + more < error.log +
    + +

    Lorsqu'on travaille avec Apache, il est important de comprendre + comment ce dernier trouve son fichier de configuration. Vous pouvez + spécifier un fichier de configuration à partir de la ligne de + commande de deux façons :

    + +
      +
    • L'option -f permet de spécifier un chemin + absolu ou relatif vers un fichier de configuration particulier + :

      (sous Windows 9x, il est recommandé d'utiliser la ligne de + commande à cause du manque de fiabilité du support des services + fourni par ce système). + + + httpd.exe -f "c:\fichiers-de-mon-serveur\autre-config.conf" + + +

      ou

      + + + httpd.exe -f fichiers-de-mon-serveur\autre-config.conf +
    • + +
    • L'option -n permet de spécifier le service + Apache installé dont le fichier de configuration doit être utilisé + :

      + + + httpd.exe -n "Nom-service" + +
    • +
    + +

    Dans les deux cas, la directive ServerRoot doit être correctement définie + dans le fichier de configuration.

    + +

    Si vous ne spécifiez aucun fichier de configuration à l'aide des + options -f ou -n, Apache utilisera le nom + du fichier de configuration compilé dans le serveur, en général + conf\httpd.conf. Ce chemin codé en dur est relatif au + répertoire d'installation. Vous pouvez vérifier ce chemin à partir + de la valeur de l'étiquette SERVER_CONFIG_FILE en + invoquant Apache avec l'option -V, comme ceci :

    + + + httpd.exe -V + + +

    Apache va ensuite essayer de déterminer la valeur de son + ServerRoot en effectuant les + recherches suivantes, dans cet ordre :

    + +
      +
    1. Une directive ServerRoot + via l'option de ligne de commande -C.
    2. + +
    3. L'option de ligne de commande -d.
    4. + +
    5. Le répertoire de travail courant.
    6. + +
    7. Une entrée de la base de registre créée dans le cas d'une + installation binaire.
    8. + +
    9. La racine des documents (DocumentRoot) codée en dur + dans le serveur. Elle + correspond par défaut à /apache, et vous pouvez le + vérifier en tapant httpd.exe -V et en recherchant + l'étiquette HTTPD_ROOT.
    10. +
    + +

    Si vous n'avez pas effectué d'installation binaire, dans certains + scénarios, Apache va signaler l'absence de cette clé de registre. + On peut passer outre cet avertissement si le serveur a été en mesure + de trouver son fichier de configuration d'une autre manière.

    + +

    La valeur de cette clé correspond au répertoire ServerRoot qui contient lui-même le + sous-répertoire conf. Lors de son démarrage, Apache lit + le fichier httpd.conf à partir de ce répertoire. Si ce + fichier contient une directive ServerRoot qui spécifie un répertoire + différent de celui que contient la clé de registre ci-dessus, Apache + oubliera la clé de registre, et utilisera le répertoire spécifié par + le fichier de configuration. Si vous déplacez le répertoire Apache + ou ses fichiers de configuration, il est vital de mettre à jour la + directive ServerRoot dans + httpd.conf afin de refléter la nouvelle + localisation.

    + +
    + +
    + Vérification de l'installation + +

    Une fois Apache démarré (soit à partir d'une console Windows, + soit en tant que service), ce dernier va se mettre à l'écoute sur + le port 80 (à moins que vous ayiez modifié la directive Listen dans les fichiers de + configuration ou que vous ayiez installé Apache pour l'utilisateur + courant seulement). Pour vous connecter au serveur et accéder à la + page par défaut, lancez un navigateur et entrez cette URL :

    + + + http://localhost/ + + +

    Apache devrait renvoyer une page de bienvenue et vous devriez + voir s'afficher "It Works!". Si rien ne se passe ou si vous obtenez + une erreur, consultez le fichier error.log dans le + sous-répertoire logs. Si votre serveur n'est pas + connecté au réseau, ou si vous avez de sérieux problèmes avec la + configuration de votre DNS (Domain Name Service), vous devez + utiliser cette URL :

    + + + http://127.0.0.1/ + + +

    Si Apache écoute un port non standard, vous devez le préciser + explicitement dans l'URL :

    + + + http://127.0.0.1:8080/ + + +

    Après que votre installation de base fonctionne, vous devez la + configurer correctement en éditant les fichiers du sous-répertoire + conf. Encore une fois, si vous modifiez la + configuration du service Apache sous Windows NT, essayez d'abord de + redémarrer le service depuis la ligne de commande afin de vous + assurer de l'absence d'erreur.

    + +

    Comme Apache ne peut pas partager le même port + avec d'autres applications TCP/IP, il se peut que vous soyez amené à + arrêter, désinstaller ou reconfigurer certains services avant de + démarrer Apache. Ces services entrant en conflit avec Apache + comprennent les autres serveurs WWW, certaines implémentations de + pare-feu, et même certaines applications client (comme Skype) qui + utilisent le port 80 afin de contourner les pare-feu.

    + +
    + +
    + Configuration de l'accès aux ressources réseau + +

    L'accès à des fichiers par le réseau peut être spécifié via deux + mécanismes fournis par Windows :

    + +
    +
    Association de lettres de lecteur
    +
    Par exemple, Alias "/images/" "Z:/"
    + +
    chemins UNC
    +
    Par exemple, Alias "/images/" "//imagehost/www/images/"
    +
    + +

    L'association de lettres de lecteur permet à l'administrateur de + maintenir une correspondance avec une certaine machine et un certain + chemin en dehors de la configuration d'Apache httpd. Cependant, ces + associations ne sont possibles que dans le cadre des sessions + interactives, et ne sont pas directement disponibles pour Apache httpd + lorsqu'il est démarré en tant que service. N'utilisez par + conséquent que des + chemins UNC pour les ressources réseau dans httpd.conf, de + façon à ce que les ressources soient accessibles quelle que soit la + manière dont Apache httpd a été démarré (des procédures exotiques et + probablement sujettes aux erreurs peuvent permettre de contourner la + restriction due aux associations de lettres de lecteur, mais leur + utilisation est déconseillée).

    + + Exemple de DocumentRoot avec chemin UNC + + DocumentRoot "//dochost/www/html/" + + + + Exemple de DocumentRoot avec adresse IP dans le chemin UNC + + DocumentRoot "//192.168.1.50/docs/" + + + + Exemple d'Alias et répertoire correspondant avec + chemin UNC + +Alias "/images/" "//imagehost/www/images/" + +<Directory "//imagehost/www/images/"> +#... +<Directory> + + + +

    Lorsqu'Apache s'exécute en tant que service, vous devez créer un + compte spécifique afin de pouvoir accéder aux ressources réseau, comme + décrit ci-dessus.

    +
    + +
    + Personnalisation sous Windows +
      +
    • Si on utilise un grand nombre de redirections de journaux + via des pipes, il est souvent nécessaire d'augmenter la + taille de la mémoire du bureau ("desktop heap"). Pour une information plus + détaillée, veuillez vous reporter à la documentation sur les redirections de journaux.

    • +
    +
    + +
    diff --git a/docs/manual/platform/windows.xml.ko b/docs/manual/platform/windows.xml.ko index 939297be03b..aa079180f27 100644 --- a/docs/manual/platform/windows.xml.ko +++ b/docs/manual/platform/windows.xml.ko @@ -1,7 +1,7 @@ - + -ab - Apache HTTP server benchmarking tool - Apache HTTP Server +ab - Apache HTTP server benchmarking tool - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ab - Apache HTTP server benchmarking tool

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    ab - Apache HTTP server benchmarking tool

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -31,8 +37,9 @@
    +

    See also

    top

    Synopsis

    @@ -50,12 +57,14 @@ [ -H custom-header ] [ -i ] [ -k ] + [ -l ] + [ -m HTTP-method ] [ -n requests ] [ -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -r ] - [ -s ] + [ -s timeout ] [ -S ] [ -t timelimit ] [ -T content-type ] @@ -105,7 +114,8 @@ 'gnuplot' file; as the results are already 'binned'.
    -f protocol
    -
    Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL).
    +
    Specify SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). + TLS1.1 and TLS1.2 support available in 2.4.4 and later.
    -g gnuplot-file
    Write all measured values out as a 'gnuplot' or TSV (Tab separate @@ -128,6 +138,16 @@
    Enable the HTTP KeepAlive feature, i.e., perform multiple requests within one HTTP session. Default is no KeepAlive.
    +
    -l
    +
    Do not report errors if the length of the responses is not constant. This + can be useful for dynamic pages. + Available in 2.4.7 and later. +
    + +
    -m HTTP-method
    +
    Custom HTTP method for the requests. + Available in 2.4.10 and later.
    +
    -n requests
    Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to @@ -151,11 +171,10 @@
    -r
    Don't exit on socket receive errors.
    -
    -s
    -
    When compiled in (ab -h will show you) use the SSL - protected https rather than the http protocol. - This feature is experimental and very rudimentary. You probably - do not want to use it.
    +
    -s timeout
    +
    Maximum number of seconds to wait before the socket times out. + Default is 30 seconds. + Available in 2.4.4 and later.
    -S
    Do not display the median and standard deviation values, nor display @@ -171,7 +190,7 @@
    -T content-type
    Content-type header to use for POST/PUT data, eg. application/x-www-form-urlencoded. - Default: text/plain.
    + Default is text/plain.
    -u PUT-file
    File containing data to PUT. Remember to also set -T.
    @@ -206,6 +225,92 @@
    top
    +

    Output

    +

    The following list describes the values returned by ab: +

    + +
    +
    Server Software
    +
    The value, if any, returned in the server HTTP header + of the first successful response. This includes all characters in the + header from beginning to the point a character with decimal value of 32 + (most notably: a space or CR/LF) is detected.
    + +
    Server Hostname
    +
    The DNS or IP address given on the command line
    + +
    Server Port
    +
    The port to which ab is connecting. If no port is given on the + command line, this will default to 80 for http and 443 for + https.
    + +
    SSL/TLS Protocol
    +
    The protocol parameters negotiated between the client and server. + This will only be printed if SSL is used.
    + +
    Document Path
    +
    The request URI parsed from the command line string.
    + +
    Document Length
    +
    This is the size in bytes of the first successfully returned document. + If the document length changes during testing, the response is + considered an error.
    + +
    Concurrency Level
    +
    The number of concurrent clients used during the test
    + +
    Time taken for tests
    +
    This is the time taken from the moment the first socket connection + is created to the moment the last response is received
    + +
    Complete requests
    +
    The number of successful responses received
    + +
    Failed requests
    +
    The number of requests that were considered a failure. If the + number is greater than zero, another line will be printed showing the + number of requests that failed due to connecting, reading, incorrect + content length, or exceptions.
    + +
    Write errors
    +
    The number of errors that failed during write (broken pipe).
    + +
    Non-2xx responses
    +
    The number of responses that were not in the 200 series of response + codes. If all responses were 200, this field is not printed.
    + +
    Keep-Alive requests
    +
    The number of connections that resulted in Keep-Alive requests
    + +
    Total body sent
    +
    If configured to send data as part of the test, this is the total + number of bytes sent during the tests. This field is omitted if the test + did not include a body to send.
    + +
    Total transferred
    +
    The total number of bytes received from the server. This number + is essentially the number of bytes sent over the wire.
    + +
    HTML transferred
    +
    The total number of document bytes received from the server. This + number excludes bytes received in HTTP headers
    + +
    Requests per second
    +
    This is the number of requests per second. This value is the result + of dividing the number of requests by the total time taken
    + +
    Time per request
    +
    The average time spent per request. The first value is calculated + with the formula concurrency * timetaken * 1000 / done + while the second value is calculated with the formula + timetaken * 1000 / done
    + +
    Transfer rate
    +
    The rate of transfer as calculated by the formula + totalread / 1024 / timetaken
    +
    +
    top
    +

    Bugs

    There are various statically declared buffers of fixed length. Combined with the lazy parsing of the command line arguments, the response headers @@ -218,9 +323,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/ab.html.fr b/docs/manual/programs/ab.html.fr new file mode 100644 index 00000000000..3d9eae0b188 --- /dev/null +++ b/docs/manual/programs/ab.html.fr @@ -0,0 +1,396 @@ + + + + + +ab - L'outil de test des performances du serveur HTTP +Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    ab - L'outil de test des performances du serveur HTTP +Apache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    ab est un utilitaire qui vous permet de tester les + performances de votre serveur HTTP Apache. Il a t conu pour vous + donner une ide du degr de performances de votre installation + d'Apache. Il vous permet en particulier de dterminer le nombre de + rqutes que votre installation d'Apache est capable de servir par + seconde.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    ab + [ -A nom-utilisateur:mot-de-passe ] + [ -b taille-tampon ] + [ -B adresse-locale ] + [ -c simultanit ] + [ -C nom-cookie=valeur ] + [ -d ] + [ -e fichier-csv ] + [ -f protocole ] + [ -g fichier-gnuplot ] + [ -h ] + [ -H en-tte-personnalis ] + [ -i ] + [ -k ] + [ -l ] + [ -m HTTP-method ] + [ -n requtes ] + [ -p fichier-POST ] + [ -P + nom-utilisateur-mandataire:mot-de-passe ] + [ -q ] + [ -r ] + [ -s timeout ] + [ -S ] + [ -t limite-de-dure ] + [ -T type-de-contenu ] + [ -u fichier PUT ] + [ -v verbosit] + [ -V ] + [ -w ] + [ -x <table>-attributs ] + [ -X mandataire[:port] ] + [ -y <tr>-attributs ] + [ -z <td>-attributs ] + [ -Z algorithme-chiffrement ] + [http[s]://]nom-serveur[:port]/chemin

    +
    top
    +
    +

    Options

    +
    +
    -A nom-utilisateur:mot-de-passe
    +
    Fournit le support d'une authentification de base vers le + serveur. Les nom-utilisateur et mot-de-passe sont spars par un + seul caractre : et transmis sous forme code base64. + La chane est envoye que le serveur en ait besoin ou non (qu'il ait + renvoy un code "401 authentication needed" ou non).
    + +
    -b taille-tampon
    +
    Taille du tampon d'mission/rception TCP, en octets.
    + +
    -B adresse-locale
    +
    Adresse laquelle se rattacher lors des connexions sortantes.
    + +
    -c simultanit
    +
    Nombre de requtes effectuer simultanment. Par dfaut, une + seule requte est effectue la fois.
    + +
    -C nom-cookie=valeur
    +
    Ajoute une ligne Cookie: la requte. L'argument + se prsente en gnral sous la forme d'une + paire nom=valeur. Ce champ peut + tre rpt.
    + +
    -d
    + +
    N'affiche pas le "pourcentage servi dans la table XX [ms]". + (support de l'hritage).
    + +
    -e fichier-csv
    +
    Enregistre des valeurs spares par des virgules (CSV) dans un + fichier, indiquant pour chaque pourcentage (de 1% 100 %), le temps + (en millisecondes) mis pour servir ce pourcentage de requtes. Ce + fichier est en gnral plus utile qu'un fichier 'gnuplot', car les + rsultats sont dj sous forme binaire.
    + +
    -f protocole
    +
    Spcifie le protocole SSL/TLS (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). + TLS1.1 et TLS1.2 sont supports partir de la version 2.4.4 du + serveur HTTP Apache.
    + +
    -g fichier-gnuplot
    +
    Enregistre toutes les valeurs mesures dans un fichier 'gnuplot' + ou TSV (valeurs spares par des tabulations). Ce fichier peut tre + facilement import dans des programmes comme Gnuplot, IDL, + Mathematica, Igor ou mme Excel. La premire ligne du fichier + contient les noms des valeurs.
    + +
    -h
    +
    Affiche une aide propos de l'utilisation du programme.
    + +
    -H en-tte-personnalis
    +
    Ajoute des en-ttes supplmentaires la requte. L'argument se + prsente sous la forme d'une ligne d'en-tte valide, autrement dit + une paire champ/valeur spars par un caractre ':' (par exemple + "Accept-Encoding: zip/zop;8bit").
    + +
    -i
    +
    Effectue des requtes HEAD plutt que + GET.
    + +
    -k
    +
    Active la fonctionnalit des connexions HTTP persistantes + (KeepAlive), c'est dire effectue plusieurs requtes au cours d'une + seule session HTTP. Cette fonctionnalit est dsactive par + dfaut.
    + +
    -l
    +
    Ne signale pas les erreurs si la taille de la rponse n'est pas + constante. Cette option peut s'avrer utile pour les pages + dynamiques. Disponible partir de la version 2.4.7 du serveur HTTP + Apache. +
    + +
    -m HTTP-method
    +
    Mthode HTTP personnalise utiliser pour les requtes. + Disponible partir de la version 2.4.10 du serveur HTTP + Apache.
    + +
    -n requtes
    +
    Nombre de requtes effectuer au cours du test de performances. + Par dfaut, une seule requte est effectue, ce qui ne permet pas + d'obtenir des rsultats reprsentatifs.
    + +
    -p fichier-POST
    +
    Fichier contenant les donnes pour les requtes POST. + Assurez-vous de spcifier aussi le paramtre -T.
    + +
    -P nom-utilisateur-mandataire:mot-de-passe
    +
    Fournit les informations d'authentification basique pour un + mandataire en-route. Les nom d'utilisateur et mot de passe sont + spars par un simple caractre : et envoys sur le + rseau cods en base64. La chane est envoye, que le mandataire en + ait besoin ou non (qu'il ait renvoy un code "407 proxy + authentication needed" ou non).
    + +
    -q
    +
    Lorsque plus de 150 requtes sont traites, ab + affiche la progression du traitement sur stderr tous + les 10% du nombre total ou toutes les 100 requtes. Le drapeau + -q permet de supprimer ces messages.
    + +
    -r
    +
    Ne s'arrte pas en cas d'erreur de rception du socket.
    + +
    -s timeout
    +
    Temps maximum d'attente en secondes du socket avant de considrer + le dlai comme dpass. La valeur par dfaut est de 30 secondes. + Disponible partir de la version 2.4.4 du serveur HTTP + Apache.
    + +
    -S
    +
    N'affiche ni les valeurs de dviation standards et mdianes, ni + les messages d'erreur et d'avertissement lorsque les valeurs + mdianes et moyennes sont gales une ou deux fois la valeur de + dviation standard. Par dfaut les valeurs mini/moyenne/maxi sont + affiches (support de l'hritage).
    + + +
    -t limite-dure
    +
    Dure maximale en secondes du test de performances. Ceci + implique un -n 50000 en interne. Utilisez cette option + si vous souhaitez tester les performances du serveur pendant une + dure fixe l'avance. Par dfaut, il n'y a pas de limite de + dure.
    + +
    -T type-contenu
    +
    Valeur de l'en-tte Content-type utiliser pour les donnes + POST/PUT, par exemple + application/x-www-form-urlencoded. + La valeur par dfaut est text/plain.
    + +
    -u fichier PUT
    +
    Fichier contenant des donnes PUT. Ne pas oublier de spcifier + aussi -T.
    + +
    -v verbosit
    +
    Dfinit le niveau de verbosit - les niveaux 4 et + suprieurs permettent d'afficher des informations propos des + en-ttes, les niveaux 3 et suprieurs les codes de + rponse (404, 200, etc...), et les niveaux 2 et + suprieurs les messages d'avertissement et d'information.
    + +
    -V
    +
    Affiche le numro de version et s'arrte.
    + +
    -w
    +
    Affiche les rsultats dans des tables HTML. La table par dfaut + comporte deux colonnes sur fond blanc.
    + +
    -x <table>-attributs
    +
    La chane utiliser comme attributs pour + <table>. Les attributs sont insrs + <table ici >.
    + +
    -X mandataire[:port]
    +
    Utilise un serveur mandataire pour les requtes.
    + +
    -y <tr>-attributs
    +
    La chane utiliser comme attributs pour + <tr>.
    + +
    -z <td>-attributs
    +
    La chane utiliser comme attributs pour + <td>.
    + +
    -Z algorithme-chiffrement
    +
    Spcifie l'algorithme de chiffrement SSL/TLS (Voir les + algorithme de chiffrement openssl).
    +
    +
    top
    +
    +

    Sortie

    +

    Vous touverez dans ce qui suit la liste des valeurs retournes + par ab : +

    + +
    +
    Server Software
    +
    La valeur, si elle existe, de l'en-tte HTTP + server renvoye dans la premire rponse russie. + Elle comporte tous les caractres de l'en-tte jusqu' ce qu'un + caractre de valeur dcimale 32 soit rencontr (le plus souvent + un espace ou une fin de ligne).
    + +
    Server Hostname
    +
    Le nom DNS ou l'adresse IP fourni dans la ligne de commande.
    + +
    Server Port
    +
    Le port auquel ab est connect. Si la ligne de commande ne + spcifie aucun port, le port par dfaut sera 80 pour http et 443 + pour https.
    + +
    SSL/TLS Protocol
    +
    Les paramtres de protocole ngocis entre le client et le + serveur. Uniquement si SSL est utilis.
    + +
    Document Path
    +
    L'URI de la requte interprt partir de la chane de la + ligne de commande.
    + +
    Document Length
    +
    Il s'agit de la taille en octets du premier document renvoy + avec succs. Si la taille du document est modifie au cours + du test, la rponse est considre comme une erreur.
    + +
    Concurrency Level
    +
    Le nombre de clients simultans utiliss au cours du test.
    + +
    Time taken for tests
    +
    Il s'agit du temps coul entre le moment de la premire + connexion au socket et la rception de la dernire + rponse.
    + +
    Complete requests
    +
    Le nombre de rponses reues avec succs.
    + +
    Failed requests
    +
    Le nombre de requtes considres comme errones. Si ce + nombre est diffrent de 0, une ligne supplmentaire indiquera le + nombre de requtes ayant chou suite un problme de + connexion, de lecture, de taille de contenu errone ou + d'exceptions.
    + +
    Write errors
    +
    Le nombre d'erreurs rencontres en cours d'criture (broken pipe).
    + +
    Non-2xx responses
    +
    Le nombre de rponses dont le code tait en dehors de la + srie 200. Si toutes les rponses appartiennent la srie 200, + cette ligne est absente.
    + +
    Keep-Alive requests
    +
    Le nombre de connexions promues l'tat de connexions + persistantes.
    + +
    Total body sent
    +
    Si le test a t configur dans ce sens, il s'agit du nombre + total d'octets envoys au cours du test. Ce champ est omis si le + test ne prvoyait pas d'envoi de corps.
    + +
    Total transferred
    +
    Le nombre total d'octets reus du serveur. Ce nombre + correspond peu prs au nombre d'octets envoys sur la ligne.
    + +
    HTML transferred
    +
    Le nombre total d'octets utiles (contenus) reus du serveur. + Ce nombre n'inclut pas les octets correspondant aux en-ttes + HTTP.
    + +
    Requests per second
    +
    Il s'agit du nombre de requtes par seconde. Il correspond + au nombre de requtes divis par la dure totale du traitement.
    + +
    Time per request
    +
    La dure moyenne du traitement d'une requte. La premire + valeur est calcule selon la formule concurrency * + timetaken * 1000 / done, alors que la seconde valeur est + calcule selon la formule timetaken * 1000 / done.
    + +
    Transfer rate
    +
    Le taux de transfert calcul selon la formule + totalread / 1024 / timetaken.
    +
    +
    top
    +
    +

    Bogues

    +

    De nombreux tampons de taille fixe sont dclars statiquement. + Combin avec l'interprtation poussive des arguments de la ligne de + commande, les en-ttes de rponse du serveur et autres entres + externes, ceci peut vous affecter.

    + +

    HTTP/1.x n'est pas compltement implment ; seules certaines + formes de rponses 'attendues' sont acceptes. L'utilisation + relativement intense de strstr(3) provoque un affichage + en tte de profil, ce qui peut faire croire un problme de + performances ; en d'autres termes, vous mesurez les performances de + ab plutt que celles du serveur.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/ab.html.ko.euc-kr b/docs/manual/programs/ab.html.ko.euc-kr index 4c7f597ddb1..d18b3f1091c 100644 --- a/docs/manual/programs/ab.html.ko.euc-kr +++ b/docs/manual/programs/ab.html.ko.euc-kr @@ -1,24 +1,30 @@ - -ab - ġ ɰ˻ - Apache HTTP Server +ab - ġ ɰ˻ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ab - ġ ɰ˻

    @@ -33,7 +39,7 @@ +

    top

    @@ -195,9 +201,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/ab.html.tr.utf8 b/docs/manual/programs/ab.html.tr.utf8 index b9cd9cb87ef..e29ea3d8530 100644 --- a/docs/manual/programs/ab.html.tr.utf8 +++ b/docs/manual/programs/ab.html.tr.utf8 @@ -1,28 +1,33 @@ - -ab - Apache HTTP sunucusu başarım ölçme aracı - Apache HTTP Sunucusu +ab - Apache HTTP sunucusu başarım ölçme aracı - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    ab - Apache HTTP sunucusu başarım ölçme aracı

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    ab - Apache HTTP sunucusu başarım ölçme aracı

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    ab Apache Hiper Metin Aktarım Protokolü (HTTP) sunucunuzun başarımını ölçmek amacıyla kullanabileceğiniz bir @@ -33,14 +38,16 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    ab [ -A yetkili-kullanıcı:parola ] [ -b tampon-boyu ] + [ -B yerel-adres ] [ -c bağlantı-sayısı ] [ -C çerez-ismi=değer ] [ -d ] @@ -51,12 +58,14 @@ [ -H özel-başlık ] [ -i ] [ -k ] + [ -l ] + [ -m HTTP-yöntemi ] [ -n istek-sayısı ] [ -p POST-dosyası ] [ -P vekil-yetkilisi:parola ] [ -q ] [ -r ] - [ -s ] + [ -s zamanasimi ] [ -S ] [ -t saniye ] [ -T içerik-türü ] @@ -69,7 +78,8 @@ [ -y <tr>-öznitelikleri ] [ -z <td>-öznitelikleri ] [ -Z şifre-kümesi ] - [http[s]://]konakadı[:port]/dizin

    + [http[s]://]konakadı[:port]/dizin +

    top

    Seçenekler

    @@ -85,6 +95,9 @@
    -b tampon-boyu
    TCP gönderme/alma tamponlarının bayt cinsinden uzunluğu.
    +
    -B yerel-adres
    +
    Uzak bağlantılar yaparken dinlenecek adres.
    +
    -c bağlantı-sayısı
    Aynı anda işleme sokulacak bağlantı sayısı. Aynı anda bir bağlantı öntanımlı değerdir.
    @@ -106,7 +119,9 @@ dosyasından daha yararlıdır.
    -f protokol
    -
    SSL/TLS protokolü belirtilir (SSL2, SSL3, TLS1 veya ALL).
    +
    SSL/TLS protokolü belirtilir (SSL2, SSL3, TLS1, TLS1.1, TLS1.2 veya + ALL). TLS1.1 ve TLS1.2 desteği 2.4.4 ve sonraki sürümler + içindir.
    -g gnuplot-dosyası
    Ölçülen değerler bir 'gnuplot' veya TSV (sekme ayraçlı değerler) @@ -131,6 +146,15 @@ bir oturum içinde çok sayıda isteğe hizmet sunulabilir. Özellik öntanımlı olarak kapalıdır.
    +
    -l
    +
    Yanıtarın uzunluğu sabit değilse hataları raporlamaz. Özdevinimli + sayfalarda kullanışlı olabilir. 2.4.7 ve sonraki sürümler + içindir.
    + +
    -m HTTP-yöntemi
    +
    İstekler için özel HTTP yöntemi, belirtilir. + 2.4.10 ve sonraki sürümler içindir.
    +
    -n istek-sayısı
    Kıyaslama oturumu sırasında sunucuya uygulanacak istek sayısı. Öntanımlı olarak hiçbir başarım ölçütü sağlamayan tek bir istek @@ -159,12 +183,10 @@
    -r
    Soket hata alsa bile program çıkmaz.
    -
    -s
    -
    Derlendiği takdirde (ab -h bunu - gösterir) http protokolü yerine SSL korumalı - https protokolü kullanılır. Bu özellik henüz - emekleme aşamasında olup geliştirilmeye devam edilmektedir. Bu - bakımdan kullanımı önerilmez.
    +
    -s zamanasimi
    +
    Soket zaman aşımına uğramadan önce beklenecek azami saniye sayısı. + 30 saniye öntanımlı süredir. + 2.4.4 ve sonraki sürümler içindir.
    -S
    Ortalama ve ortanca değerler arasında bir veya iki standart sapmadan @@ -221,7 +243,92 @@ belirtilir.
    -Z şifre-kümesi
    -
    SSL/TLS şifre kümesi belirtilir (openssl(1) şifrelerine bakınız).
    +
    SSL/TLS şifre kümesi belirtilir + (openssl(1) şifrelerine bakınız).
    + +
    top
    +
    +

    Çıktı

    +

    Aşağıda ab tarafından döndürülen değerler + açıklanmıştır:

    + +
    +
    Server Software
    +
    İlk başarılı yanıtın, varsa, server HTTP başlığında + döndürülen değer. Bu başlıktaki başlangıçtan 32 ondalık değerli + karaktere (genellikle boşluk veya CR/LF karakteri) kadar tüm + karakterleri içerir.
    + +
    Server Hostname
    +
    Komut satırında belirtilen DNS veya IP adresi.
    + +
    Server Port
    +
    ab'nin bağlandığı port. Komut + satırında port belirtilmemişse, öntanımlı olarak http için 80, https + için 443'tür.
    + +
    SSL/TLS Protocol
    +
    İstemci le sunucu arasında uzlaşılmış protokol değerleri. Bu sadece + SSL kullanılıyorsa çıktılanır.
    + +
    Document Path
    +
    Komut satırı dizgesinden çözümlenen isteğin URI'si.
    + +
    Document Length
    +
    Başarıyla döndürülen ilk belgenin bayt cinsinden uzunluğu. Eğer + belge uzunluğu sınama sırasında değişirse yanıt bir hata + içerecektir.
    + +
    Concurrency Level
    +
    Sınama sırasında kullanılan eşzamanlı istemcilerin sayısı.
    + +
    Time taken for tests
    +
    İlk soket bağlantısının alındığı andan son yanıtın alındığı ana + kadar geçen süre.
    + +
    Complete requests
    +
    Alınan başarılı yanıtların sayısı.
    + +
    Failed requests
    +
    Başarısızlık olarak addedilen isteklerin sayısı. Sayı sıfırdan + büyükse, diğer satırda, bağlanma, okuma, yanlış içerik uzunluğu, + istisnalar gibi sebeplerle başarısız olmuş istekler gösterilir.
    + +
    Write errors
    +
    Başarısız yazma hatalarının (kırık boru) sayısı.
    + +
    Non-2xx responses
    +
    200 serisi yanıt kodları ile açıklanamayan yanıtların sayısı. Tüm + yanıtlar 200 olursa bu alan çıktılanmaz.
    + +
    Keep-Alive requests
    +
    Keep-Alive isteklerinde sonuçlanan bağlantı sayısı.
    + +
    Total body sent
    +
    Sınamanın parçası olarak veri gönderimi yapılandırılmışsa, bu + sınama sırasında gönderilen toplam bayt sayısıdır. Sınama sırasında + gövde gönderilmiyorsa bu alan çıktılanmaz.
    + +
    Total transferred
    +
    Sunucudan alınan toplam bayt sayısı. Bu sayı aslında hattan + gönderilen bayt sayısıdır.
    + +
    HTML transferred
    +
    Sunucudan alınan belge baytlarının sayısı. Bu sayı HTTP + başlıklarının bayt sayısını içermez.
    + +
    Requests per second
    +
    Saniyedeki istek sayısı. İstek sayısının toplam süreye + oranıdır.
    + +
    Time per request
    +
    İstek başına harcanan süre. İlk değer eşzamanlılık * süre * + 1000 / biten formülüyle hesaplanırken ikincisi için + süre * 1000 / biten formülü kullanılır.
    + +
    Transfer rate
    +
    okunantoplam / 1024 / süre formülüyle hesaplanan + aktarım hızı.
    top
    @@ -239,9 +346,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/ab.xml b/docs/manual/programs/ab.xml index 11b0f88d13a..a4777b3bb6b 100644 --- a/docs/manual/programs/ab.xml +++ b/docs/manual/programs/ab.xml @@ -49,12 +49,14 @@ [ -Hcustom-header ] [ -i ] [ -k ] + [ -l ] + [ -mHTTP-method ] [ -nrequests ] [ -pPOST-file ] [ -Pproxy-auth-username:password ] [ -q ] [ -r ] - [ -s ] + [ -stimeout ] [ -S ] [ -ttimelimit ] [ -Tcontent-type ] @@ -104,7 +106,8 @@ 'gnuplot' file; as the results are already 'binned'.
    -f protocol
    -
    Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL).
    +
    Specify SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). + TLS1.1 and TLS1.2 support available in 2.4.4 and later.
    -g gnuplot-file
    Write all measured values out as a 'gnuplot' or TSV (Tab separate @@ -127,6 +130,16 @@
    Enable the HTTP KeepAlive feature, i.e., perform multiple requests within one HTTP session. Default is no KeepAlive.
    +
    -l
    +
    Do not report errors if the length of the responses is not constant. This + can be useful for dynamic pages. + Available in 2.4.7 and later. +
    + +
    -m HTTP-method
    +
    Custom HTTP method for the requests. + Available in 2.4.10 and later.
    +
    -n requests
    Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to @@ -150,11 +163,10 @@
    -r
    Don't exit on socket receive errors.
    -
    -s
    -
    When compiled in (ab -h will show you) use the SSL - protected https rather than the http protocol. - This feature is experimental and very rudimentary. You probably - do not want to use it.
    +
    -s timeout
    +
    Maximum number of seconds to wait before the socket times out. + Default is 30 seconds. + Available in 2.4.4 and later.
    -S
    Do not display the median and standard deviation values, nor display @@ -170,7 +182,7 @@
    -T content-type
    Content-type header to use for POST/PUT data, eg. application/x-www-form-urlencoded. - Default: text/plain.
    + Default is text/plain.
    -u PUT-file
    File containing data to PUT. Remember to also set -T.
    @@ -205,6 +217,92 @@ +
    Output +

    The following list describes the values returned by ab: +

    + +
    +
    Server Software
    +
    The value, if any, returned in the server HTTP header + of the first successful response. This includes all characters in the + header from beginning to the point a character with decimal value of 32 + (most notably: a space or CR/LF) is detected.
    + +
    Server Hostname
    +
    The DNS or IP address given on the command line
    + +
    Server Port
    +
    The port to which ab is connecting. If no port is given on the + command line, this will default to 80 for http and 443 for + https.
    + +
    SSL/TLS Protocol
    +
    The protocol parameters negotiated between the client and server. + This will only be printed if SSL is used.
    + +
    Document Path
    +
    The request URI parsed from the command line string.
    + +
    Document Length
    +
    This is the size in bytes of the first successfully returned document. + If the document length changes during testing, the response is + considered an error.
    + +
    Concurrency Level
    +
    The number of concurrent clients used during the test
    + +
    Time taken for tests
    +
    This is the time taken from the moment the first socket connection + is created to the moment the last response is received
    + +
    Complete requests
    +
    The number of successful responses received
    + +
    Failed requests
    +
    The number of requests that were considered a failure. If the + number is greater than zero, another line will be printed showing the + number of requests that failed due to connecting, reading, incorrect + content length, or exceptions.
    + +
    Write errors
    +
    The number of errors that failed during write (broken pipe).
    + +
    Non-2xx responses
    +
    The number of responses that were not in the 200 series of response + codes. If all responses were 200, this field is not printed.
    + +
    Keep-Alive requests
    +
    The number of connections that resulted in Keep-Alive requests
    + +
    Total body sent
    +
    If configured to send data as part of the test, this is the total + number of bytes sent during the tests. This field is omitted if the test + did not include a body to send.
    + +
    Total transferred
    +
    The total number of bytes received from the server. This number + is essentially the number of bytes sent over the wire.
    + +
    HTML transferred
    +
    The total number of document bytes received from the server. This + number excludes bytes received in HTTP headers
    + +
    Requests per second
    +
    This is the number of requests per second. This value is the result + of dividing the number of requests by the total time taken
    + +
    Time per request
    +
    The average time spent per request. The first value is calculated + with the formula concurrency * timetaken * 1000 / done + while the second value is calculated with the formula + timetaken * 1000 / done
    + +
    Transfer rate
    +
    The rate of transfer as calculated by the formula + totalread / 1024 / timetaken
    +
    +
    +
    Bugs

    There are various statically declared buffers of fixed length. Combined with the lazy parsing of the command line arguments, the response headers @@ -216,4 +314,5 @@ would measure the ab performance rather than the server's.

    + diff --git a/docs/manual/programs/ab.xml.fr b/docs/manual/programs/ab.xml.fr new file mode 100644 index 00000000000..147ee0e70e3 --- /dev/null +++ b/docs/manual/programs/ab.xml.fr @@ -0,0 +1,361 @@ + + + + + + + + + + +Programmes + +ab - L'outil de test des performances du serveur HTTP +Apache + + +

    ab est un utilitaire qui vous permet de tester les + performances de votre serveur HTTP Apache. Il a été conçu pour vous + donner une idée du degré de performances de votre installation + d'Apache. Il vous permet en particulier de déterminer le nombre de + réquêtes que votre installation d'Apache est capable de servir par + seconde.

    +
    +httpd + +
    Syntaxe +

    ab + [ -A nom-utilisateur:mot-de-passe ] + [ -b taille-tampon ] + [ -B adresse-locale ] + [ -c simultanéité ] + [ -C nom-cookie=valeur ] + [ -d ] + [ -e fichier-csv ] + [ -f protocole ] + [ -g fichier-gnuplot ] + [ -h ] + [ -H en-tête-personnalisé ] + [ -i ] + [ -k ] + [ -l ] + [ -m HTTP-method ] + [ -n requêtes ] + [ -p fichier-POST ] + [ -P + nom-utilisateur-mandataire:mot-de-passe ] + [ -q ] + [ -r ] + [ -s timeout ] + [ -S ] + [ -t limite-de-durée ] + [ -T type-de-contenu ] + [ -u fichier PUT ] + [ -v verbosité] + [ -V ] + [ -w ] + [ -x <table>-attributs ] + [ -X mandataire[:port] ] + [ -y <tr>-attributs ] + [ -z <td>-attributs ] + [ -Z algorithme-chiffrement ] + [http[s]://]nom-serveur[:port]/chemin

    +
    + +
    Options +
    +
    -A nom-utilisateur:mot-de-passe
    +
    Fournit le support d'une authentification de base vers le + serveur. Les nom-utilisateur et mot-de-passe sont séparés par un + seul caractère : et transmis sous forme codée base64. + La chaîne est envoyée que le serveur en ait besoin ou non (qu'il ait + renvoyé un code "401 authentication needed" ou non).
    + +
    -b taille-tampon
    +
    Taille du tampon d'émission/réception TCP, en octets.
    + +
    -B adresse-locale
    +
    Adresse à laquelle se rattacher lors des connexions sortantes.
    + +
    -c simultanéité
    +
    Nombre de requêtes à effectuer simultanément. Par défaut, une + seule requête est effectuée à la fois.
    + +
    -C nom-cookie=valeur
    +
    Ajoute une ligne Cookie: à la requête. L'argument + se présente en général sous la forme d'une + paire nom=valeur. Ce champ peut + être répété.
    + +
    -d
    + +
    N'affiche pas le "pourcentage servi dans la table XX [ms]". + (support de l'héritage).
    + +
    -e fichier-csv
    +
    Enregistre des valeurs séparées par des virgules (CSV) dans un + fichier, indiquant pour chaque pourcentage (de 1% à 100 %), le temps + (en millisecondes) mis pour servir ce pourcentage de requêtes. Ce + fichier est en général plus utile qu'un fichier 'gnuplot', car les + résultats sont déjà sous forme binaire.
    + +
    -f protocole
    +
    Spécifie le protocole SSL/TLS (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). + TLS1.1 et TLS1.2 sont supportés à partir de la version 2.4.4 du + serveur HTTP Apache.
    + +
    -g fichier-gnuplot
    +
    Enregistre toutes les valeurs mesurées dans un fichier 'gnuplot' + ou TSV (valeurs séparées par des tabulations). Ce fichier peut être + facilement importé dans des programmes comme Gnuplot, IDL, + Mathematica, Igor ou même Excel. La première ligne du fichier + contient les noms des valeurs.
    + +
    -h
    +
    Affiche une aide à propos de l'utilisation du programme.
    + +
    -H en-tête-personnalisé
    +
    Ajoute des en-têtes supplémentaires à la requête. L'argument se + présente sous la forme d'une ligne d'en-tête valide, autrement dit + une paire champ/valeur séparés par un caractère ':' (par exemple + "Accept-Encoding: zip/zop;8bit").
    + +
    -i
    +
    Effectue des requêtes HEAD plutôt que + GET.
    + +
    -k
    +
    Active la fonctionnalité des connexions HTTP persistantes + (KeepAlive), c'est à dire effectue plusieurs requêtes au cours d'une + seule session HTTP. Cette fonctionnalité est désactivée par + défaut.
    + +
    -l
    +
    Ne signale pas les erreurs si la taille de la réponse n'est pas + constante. Cette option peut s'avérer utile pour les pages + dynamiques. Disponible à partir de la version 2.4.7 du serveur HTTP + Apache. +
    + +
    -m HTTP-method
    +
    Méthode HTTP personnalisée à utiliser pour les requêtes. + Disponible à partir de la version 2.4.10 du serveur HTTP + Apache.
    + +
    -n requêtes
    +
    Nombre de requêtes à effectuer au cours du test de performances. + Par défaut, une seule requête est effectuée, ce qui ne permet pas + d'obtenir des résultats représentatifs.
    + +
    -p fichier-POST
    +
    Fichier contenant les données pour les requêtes POST. + Assurez-vous de spécifier aussi le paramètre -T.
    + +
    -P nom-utilisateur-mandataire:mot-de-passe
    +
    Fournit les informations d'authentification basique pour un + mandataire en-route. Les nom d'utilisateur et mot de passe sont + séparés par un simple caractère : et envoyés sur le + réseau codés en base64. La chaîne est envoyée, que le mandataire en + ait besoin ou non (qu'il ait renvoyé un code "407 proxy + authentication needed" ou non).
    + +
    -q
    +
    Lorsque plus de 150 requêtes sont traitées, ab + affiche la progression du traitement sur stderr tous + les 10% du nombre total ou toutes les 100 requêtes. Le drapeau + -q permet de supprimer ces messages.
    + +
    -r
    +
    Ne s'arrête pas en cas d'erreur de réception du socket.
    + +
    -s timeout
    +
    Temps maximum d'attente en secondes du socket avant de considérer + le délai comme dépassé. La valeur par défaut est de 30 secondes. + Disponible à partir de la version 2.4.4 du serveur HTTP + Apache.
    + +
    -S
    +
    N'affiche ni les valeurs de déviation standards et médianes, ni + les messages d'erreur et d'avertissement lorsque les valeurs + médianes et moyennes sont égales à une ou deux fois la valeur de + déviation standard. Par défaut les valeurs mini/moyenne/maxi sont + affichées (support de l'héritage).
    + + +
    -t limite-durée
    +
    Durée maximale en secondes du test de performances. Ceci + implique un -n 50000 en interne. Utilisez cette option + si vous souhaitez tester les performances du serveur pendant une + durée fixée à l'avance. Par défaut, il n'y a pas de limite de + durée.
    + +
    -T type-contenu
    +
    Valeur de l'en-tête Content-type à utiliser pour les données + POST/PUT, par exemple + application/x-www-form-urlencoded. + La valeur par défaut est text/plain.
    + +
    -u fichier PUT
    +
    Fichier contenant des données PUT. Ne pas oublier de spécifier + aussi -T.
    + +
    -v verbosité
    +
    Définit le niveau de verbosité - les niveaux 4 et + supérieurs permettent d'afficher des informations à propos des + en-têtes, les niveaux 3 et supérieurs les codes de + réponse (404, 200, etc...), et les niveaux 2 et + supérieurs les messages d'avertissement et d'information.
    + +
    -V
    +
    Affiche le numéro de version et s'arrête.
    + +
    -w
    +
    Affiche les résultats dans des tables HTML. La table par défaut + comporte deux colonnes sur fond blanc.
    + +
    -x <table>-attributs
    +
    La chaîne à utiliser comme attributs pour + <table>. Les attributs sont insérés + <table ici >.
    + +
    -X mandataire[:port]
    +
    Utilise un serveur mandataire pour les requêtes.
    + +
    -y <tr>-attributs
    +
    La chaîne à utiliser comme attributs pour + <tr>.
    + +
    -z <td>-attributs
    +
    La chaîne à utiliser comme attributs pour + <td>.
    + +
    -Z algorithme-chiffrement
    +
    Spécifie l'algorithme de chiffrement SSL/TLS (Voir les + algorithme de chiffrement openssl).
    +
    +
    + +
    Sortie +

    Vous touverez dans ce qui suit la liste des valeurs retournées + par ab : +

    + +
    +
    Server Software
    +
    La valeur, si elle existe, de l'en-tête HTTP + server renvoyée dans la première réponse réussie. + Elle comporte tous les caractères de l'en-tête jusqu'à ce qu'un + caractère de valeur décimale 32 soit rencontré (le plus souvent + un espace ou une fin de ligne).
    + +
    Server Hostname
    +
    Le nom DNS ou l'adresse IP fourni dans la ligne de commande.
    + +
    Server Port
    +
    Le port auquel ab est connecté. Si la ligne de commande ne + spécifie aucun port, le port par défaut sera 80 pour http et 443 + pour https.
    + +
    SSL/TLS Protocol
    +
    Les paramètres de protocole négociés entre le client et le + serveur. Uniquement si SSL est utilisé.
    + +
    Document Path
    +
    L'URI de la requête interprété à partir de la chaîne de la + ligne de commande.
    + +
    Document Length
    +
    Il s'agit de la taille en octets du premier document renvoyé + avec succès. Si la taille du document est modifiée au cours + du test, la réponse est considérée comme une erreur.
    + +
    Concurrency Level
    +
    Le nombre de clients simultanés utilisés au cours du test.
    + +
    Time taken for tests
    +
    Il s'agit du temps écoulé entre le moment de la première + connexion au socket et la réception de la dernière + réponse.
    + +
    Complete requests
    +
    Le nombre de réponses reçues avec succès.
    + +
    Failed requests
    +
    Le nombre de requêtes considérées comme erronées. Si ce + nombre est différent de 0, une ligne supplémentaire indiquera le + nombre de requêtes ayant échoué suite à un problème de + connexion, de lecture, de taille de contenu erronée ou + d'exceptions.
    + +
    Write errors
    +
    Le nombre d'erreurs rencontrées en cours d'écriture (broken pipe).
    + +
    Non-2xx responses
    +
    Le nombre de réponses dont le code était en dehors de la + série 200. Si toutes les réponses appartiennent à la série 200, + cette ligne est absente.
    + +
    Keep-Alive requests
    +
    Le nombre de connexions promues à l'état de connexions + persistantes.
    + +
    Total body sent
    +
    Si le test a été configuré dans ce sens, il s'agit du nombre + total d'octets envoyés au cours du test. Ce champ est omis si le + test ne prévoyait pas d'envoi de corps.
    + +
    Total transferred
    +
    Le nombre total d'octets reçus du serveur. Ce nombre + correspond à peu près au nombre d'octets envoyés sur la ligne.
    + +
    HTML transferred
    +
    Le nombre total d'octets utiles (contenus) reçus du serveur. + Ce nombre n'inclut pas les octets correspondant aux en-têtes + HTTP.
    + +
    Requests per second
    +
    Il s'agit du nombre de requêtes par seconde. Il correspond + au nombre de requêtes divisé par la durée totale du traitement.
    + +
    Time per request
    +
    La durée moyenne du traitement d'une requête. La première + valeur est calculée selon la formule concurrency * + timetaken * 1000 / done, alors que la seconde valeur est + calculée selon la formule timetaken * 1000 / done.
    + +
    Transfer rate
    +
    Le taux de transfert calculé selon la formule + totalread / 1024 / timetaken.
    +
    +
    + +
    Bogues +

    De nombreux tampons de taille fixe sont déclarés statiquement. + Combiné avec l'interprétation poussive des arguments de la ligne de + commande, les en-têtes de réponse du serveur et autres entrées + externes, ceci peut vous affecter.

    + +

    HTTP/1.x n'est pas complètement implémenté ; seules certaines + formes de réponses 'attendues' sont acceptées. L'utilisation + relativement intense de strstr(3) provoque un affichage + en tête de profil, ce qui peut faire croire à un problème de + performances ; en d'autres termes, vous mesurez les performances de + ab plutôt que celles du serveur.

    +
    + +
    diff --git a/docs/manual/programs/ab.xml.ko b/docs/manual/programs/ab.xml.ko index 965a17c1bef..06a65bcac70 100644 --- a/docs/manual/programs/ab.xml.ko +++ b/docs/manual/programs/ab.xml.ko @@ -1,7 +1,7 @@ - + + -apachectl - Apache HTTP Server Control Interface - Apache HTTP Server +apachectl - Apache HTTP Server Control Interface - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    apachectl - Apache HTTP Server Control Interface

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs
    top

    Synopsis

    @@ -152,9 +158,31 @@ use the normal apachectl start.

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apachectl.html.fr b/docs/manual/programs/apachectl.html.fr new file mode 100644 index 00000000000..e8700f9fcff --- /dev/null +++ b/docs/manual/programs/apachectl.html.fr @@ -0,0 +1,202 @@ + + + + + +apachectl - L'interface de contrle du serveur HTTP + Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    apachectl - L'interface de contrle du serveur HTTP + Apache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    apachectl est un frontal pour le serveur HTTP + Apache. Il a t conu pour aider l'administrateur contrler le + fonctionnement du dmon Apache httpd.

    + +

    Le script apachectl possde deux modes de + fonctionnement. Il peut fonctionner en tant que simple frontal + de la commande httpd et ne fait alors que + dfinir toute variable d'environnement ncessaire, puis invoque + httpd en lui passant tout argument de ligne de + commande souhait. Il peut aussi fonctionner en tant que script + d'initialisation SysV n'acceptant qu'un seul argument tel que + start, restart et stop, et + traduisant ce dernier en signaux appropris pour le dmon + httpd.

    + +

    Si votre installation d'Apache utilise des chemins non + standards, vous devrez diter le script apachectl afin + de dfinir les chemins appropris pour le binaire + httpd. Vous pouvez aussi spcifier tout argument + de ligne de commande de httpd ncessaire. Voir + les commentaires dans le script pour plus de dtails.

    + +

    Le script apachectl renvoie une valeur gale 0 en + cas de succs, et une valeur suprieure 0 en cas de problme. + Voir les commentaires dans le script pour plus de dtails.

    +
    + +
    top
    +
    +

    Rsum

    + +

    En mode frontal (pass-through), apachectl peut spcifier +tous les arguments qu'accepte le binaire httpd.

    + +

    apachectl [ argument-httpd ]

    + +

    En mode script d'initialisation SysV, apachectl +n'accepte qu'un seul des arguments dfinis ci-dessous.

    + +

    apachectl commande

    + +
    top
    +
    +

    Options

    + +

    Seules les options du style initialisation SysV sont dcrites ici. +Les autres arguments sont dcrits dans la page de manuel de +httpd.

    + +
    + +
    start
    + +
    Dmarre le dmon Apache httpd. Renvoie une erreur +s'il est dj en cours d'excution. quivalent apachectl -k +start.
    + +
    stop
    + +
    Arrte le dmon Apache httpd. quivalent +apachectl -k stop.
    + +
    restart
    + +
    Redmarre le dmon Apache httpd. Si le dmon +n'est pas en cours d'excution, il est dmarr. Cette option vrifie +automatiquement les fichiers de configuration (de la mme manire que +l'option configtest ) avant de lancer le redmarrage, afin +d'tre sr que le fonctionnement du dmon ne sera pas compromis. +Equivalent apachectl -k restart.
    + +
    fullstatus
    + +
    Affiche le rapport d'tat complet du module +mod_status. Pour que ceci fonctionne, +mod_status doit tre activ dans votre serveur et vous +devez disposer d'un navigateur en mode texte tel que lynx +sur votre systme. L'URL utilise pour accder au rapport d'tat peut +tre modifie en dfinissant la variable STATUSURL dans le +script.
    + +
    status
    + +
    Affiche un rapport d'tat succinct. Similaire l'option +fullstatus, except que la liste des requtes en cours de +traitement est omise.
    + +
    graceful
    + +
    Redmarre le dmon Apache httpd en douceur. Si le +dmon n'est pas en cours d'excution, il est dmarr. la diffrence +d'un redmarrage normal, les connexions en cours ne sont pas fermes. +Comme effet de bord, les anciens fichiers journaux ne seront pas ferms +immdiatement. Cela signifie que si l'on utilise un script de rotation +des journaux, un dlai suffisant sera ncessaire afin d'tre sr que les +fichiers journaux seront bien ferms avant leur traitement par le script +de rotation. Cette option vrifie +automatiquement les fichiers de configuration (de la mme manire que +l'option configtest ) avant de lancer le redmarrage, afin +d'tre sr que le fonctionnement du dmon ne sera pas compromis. +quivalent apachectl -k graceful.
    + +
    graceful-stop
    + +
    Arrte le dmon Apache httpd en douceur. la +diffrence d'un arrt normal, les connexions en cours ne sont pas +fermes. Comme effet de bord, les anciens fichiers journaux ne seront +pas ferms immdiatement. quivalent apachectl -k +graceful-stop.
    + +
    configtest
    + +
    Effectue une vrification de la syntaxe du fichier de configuration. +Avec cette option, le script parcourt le fichier de configuration et +renvoie soit Syntax Ok, soit des informations dtailles +propos des ventuelles erreurs de syntaxe. Equivalent apachectl +-t.
    + +
    + +

    Les options suivantes taient disponibles dans les anciennes versions +et ont t supprimes.

    + +
    + +
    startssl
    + +
    Pour dmarrer httpd avec le support SSL, vous +devez diter votre fichier de configuration et y inclure les +directives appropries, puis utiliser la commande de dmarrage normale +apachectl start.
    + +
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/apachectl.html.ko.euc-kr b/docs/manual/programs/apachectl.html.ko.euc-kr index 399a1c14847..65878de65c2 100644 --- a/docs/manual/programs/apachectl.html.ko.euc-kr +++ b/docs/manual/programs/apachectl.html.ko.euc-kr @@ -1,24 +1,30 @@ - -apachectl - ġ ̽ - Apache HTTP Server +apachectl - ġ ̽ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    apachectl - ġ ̽

    @@ -51,7 +57,7 @@
    +

    top

    @@ -138,9 +144,31 @@ Ok Ȥ
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apachectl.html.tr.utf8 b/docs/manual/programs/apachectl.html.tr.utf8 index ceba6e6766e..59c107adb25 100644 --- a/docs/manual/programs/apachectl.html.tr.utf8 +++ b/docs/manual/programs/apachectl.html.tr.utf8 @@ -1,28 +1,33 @@ - -apachectl - Apache HTTP Sunucusu Denetim Arayüzü - Apache HTTP Sunucusu +apachectl - Apache HTTP Sunucusu Denetim Arayüzü - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    apachectl - Apache HTTP Sunucusu Denetim Arayüzü

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    apachectl - Apache HTTP Sunucusu Denetim Arayüzü

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    apachectl Apache Hiper Metin Aktarım Protokolü (HTTP) sunucusu için bir denetim aracıdır. Sistem @@ -57,7 +62,7 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -160,9 +165,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apachectl.xml.fr b/docs/manual/programs/apachectl.xml.fr new file mode 100644 index 00000000000..1ee7271fe23 --- /dev/null +++ b/docs/manual/programs/apachectl.xml.fr @@ -0,0 +1,173 @@ + + + + + + + + + + +Programmes + + apachectl - L'interface de contrôle du serveur HTTP + Apache + + +

    apachectl est un frontal pour le serveur HTTP + Apache. Il a été conçu pour aider l'administrateur à contrôler le + fonctionnement du démon Apache httpd.

    + +

    Le script apachectl possède deux modes de + fonctionnement. Il peut fonctionner en tant que simple frontal + de la commande httpd et ne fait alors que + définir toute variable d'environnement nécessaire, puis invoque + httpd en lui passant tout argument de ligne de + commande souhaité. Il peut aussi fonctionner en tant que script + d'initialisation SysV n'acceptant qu'un seul argument tel que + start, restart et stop, et + traduisant ce dernier en signaux appropriés pour le démon + httpd.

    + +

    Si votre installation d'Apache utilise des chemins non + standards, vous devrez éditer le script apachectl afin + de définir les chemins appropriés pour le binaire + httpd. Vous pouvez aussi spécifier tout argument + de ligne de commande de httpd nécessaire. Voir + les commentaires dans le script pour plus de détails.

    + +

    Le script apachectl renvoie une valeur égale à 0 en + cas de succès, et une valeur supérieure à 0 en cas de problème. + Voir les commentaires dans le script pour plus de détails.

    +
    +Démarrer Apache +Arrêter Apache +Fichiers de +configuration +Documentation spécifique aux +plates-formes +httpd + +
    Résumé + +

    En mode frontal (pass-through), apachectl peut spécifier +tous les arguments qu'accepte le binaire httpd.

    + +

    apachectl [ argument-httpd ]

    + +

    En mode script d'initialisation SysV, apachectl +n'accepte qu'un seul des arguments définis ci-dessous.

    + +

    apachectl commande

    + +
    + +
    Options + +

    Seules les options du style initialisation SysV sont décrites ici. +Les autres arguments sont décrits dans la page de manuel de +httpd.

    + +
    + +
    start
    + +
    Démarre le démon Apache httpd. Renvoie une erreur +s'il est déjà en cours d'exécution. Équivalent à apachectl -k +start.
    + +
    stop
    + +
    Arrête le démon Apache httpd. Équivalent à +apachectl -k stop.
    + +
    restart
    + +
    Redémarre le démon Apache httpd. Si le démon +n'est pas en cours d'exécution, il est démarré. Cette option vérifie +automatiquement les fichiers de configuration (de la même manière que +l'option configtest ) avant de lancer le redémarrage, afin +d'être sûr que le fonctionnement du démon ne sera pas compromis. +Equivalent à apachectl -k restart.
    + +
    fullstatus
    + +
    Affiche le rapport d'état complet du module +mod_status. Pour que ceci fonctionne, +mod_status doit être activé dans votre serveur et vous +devez disposer d'un navigateur en mode texte tel que lynx +sur votre système. L'URL utilisée pour accéder au rapport d'état peut +être modifiée en définissant la variable STATUSURL dans le +script.
    + +
    status
    + +
    Affiche un rapport d'état succinct. Similaire à l'option +fullstatus, excepté que la liste des requêtes en cours de +traitement est omise.
    + +
    graceful
    + +
    Redémarre le démon Apache httpd en douceur. Si le +démon n'est pas en cours d'exécution, il est démarré. À la différence +d'un redémarrage normal, les connexions en cours ne sont pas fermées. +Comme effet de bord, les anciens fichiers journaux ne seront pas fermés +immédiatement. Cela signifie que si l'on utilise un script de rotation +des journaux, un délai suffisant sera nécessaire afin d'être sûr que les +fichiers journaux seront bien fermés avant leur traitement par le script +de rotation. Cette option vérifie +automatiquement les fichiers de configuration (de la même manière que +l'option configtest ) avant de lancer le redémarrage, afin +d'être sûr que le fonctionnement du démon ne sera pas compromis. +Équivalent à apachectl -k graceful.
    + +
    graceful-stop
    + +
    Arrête le démon Apache httpd en douceur. À la +différence d'un arrêt normal, les connexions en cours ne sont pas +fermées. Comme effet de bord, les anciens fichiers journaux ne seront +pas fermés immédiatement. Équivalent à apachectl -k +graceful-stop.
    + +
    configtest
    + +
    Effectue une vérification de la syntaxe du fichier de configuration. +Avec cette option, le script parcourt le fichier de configuration et +renvoie soit Syntax Ok, soit des informations détaillées à +propos des éventuelles erreurs de syntaxe. Equivalent à apachectl +-t.
    + +
    + +

    Les options suivantes étaient disponibles dans les anciennes versions +et ont été supprimées.

    + +
    + +
    startssl
    + +
    Pour démarrer httpd avec le support SSL, vous +devez éditer votre fichier de configuration et y inclure les +directives appropriées, puis utiliser la commande de démarrage normale +apachectl start.
    + +
    + +
    + +
    diff --git a/docs/manual/programs/apachectl.xml.meta b/docs/manual/programs/apachectl.xml.meta index 68ddb626985..367877a41e1 100644 --- a/docs/manual/programs/apachectl.xml.meta +++ b/docs/manual/programs/apachectl.xml.meta @@ -8,7 +8,8 @@ en + fr ko - tr + tr diff --git a/docs/manual/programs/apachectl.xml.tr b/docs/manual/programs/apachectl.xml.tr index 9e9e1b47581..190db6fdf97 100644 --- a/docs/manual/programs/apachectl.xml.tr +++ b/docs/manual/programs/apachectl.xml.tr @@ -1,7 +1,7 @@ - + -apxs - APache eXtenSion tool - Apache HTTP Server +apxs - APache eXtenSion tool - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    apxs - APache eXtenSion tool

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    apxs - APache eXtenSion tool

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -77,7 +83,7 @@ +

    See also

    top

    Synopsis

    @@ -210,6 +216,11 @@
    This option passes linker-flags as additional flags to the libtool --mode=link command. Use this to add local linker-specific options.
    + +
    -p
    +
    This option causes apxs to link against the apr/apr-util libraries. + This is useful when compiling helper programs that use the apr/apr-util + libraries.
    @@ -323,9 +334,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apxs.html.fr b/docs/manual/programs/apxs.html.fr new file mode 100644 index 00000000000..5200fe04736 --- /dev/null +++ b/docs/manual/programs/apxs.html.fr @@ -0,0 +1,395 @@ + + + + + +apxs - Utilitaire pour les extensions d'Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    apxs - Utilitaire pour les extensions d'Apache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    apxs est un utilitaire permettant de compiler et + d'installer des modules en tant qu'extensions du serveur HTTP + Apache. A cet effet, un objet dynamique partag (DSO) est compil + partir d'un ou plusieurs fichiers sources ou objets et + peut tre charg pendant l'excution du serveur Apache via la + directive LoadModule du + module mod_so.

    + +

    Pour pouvoir utiliser ce mcanisme d'extensions, votre + plate-forme doit supporter la fonctionnalit DSO, et votre binaire + httpd Apache doit tre compil avec le module + mod_so. Si ce n'est pas le cas, l'utilitaire + apxs vous le signalera. Vous pouvez aussi vrifier + vous-mme ces prrequis en excutant manuellement la commande :

    + +

    + $ httpd -l +

    + +

    Le module mod_so doit faire partie de la liste + des modules affiche. Si ces prrequis sont prsents, vous pouvez + facilement tendre les fonctionnalits de votre serveur Apache en + installant vos propres modules l'aide de l'utilitaire + apxs, via le mcanisme DSO :

    + +

    + $ apxs -i -a -c mod_foo.c
    + gcc -fpic -DSHARED_MODULE -I/chemin/vers/apache/include -c mod_foo.c
    + ld -Bshareable -o mod_foo.so mod_foo.o
    + cp mod_foo.so /chemin/vers/apache/modules/mod_foo.so
    + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/etc/httpd.conf]
    + $ apachectl restart
    + /chemin/vers/apache/sbin/apachectl restart: httpd not running, trying to start
    + [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    + /chemin/vers/apache/sbin/apachectl restart: httpd started
    + $ _ +

    + +

    Les arguments fichiers peuvent correspondre un + fichier source C (.c), un fichier objet (.o) ou mme une archive de + bibliothques (.a). L'utilitaire apxs reconnat + automatiquement ces extensions et utilise automatiquement les + fichiers source C pour la compilation, et les fichiers objets et + archives pour l'dition de liens. Cependant, si vous utilisez des + fichiers objets prcompils, assurez-vous que leur code soit + indpendant de la position (PIC), afin de pouvoir les utiliser avec + un objet partag charg dynamiquement. Avec GCC, par exemple, il + vous suffit de toujours utiliser l'option de compilation + -fpic. Pour les autres compilateurs C, consultez leur + page de manuel, ou vrifiez les drapeaux qu'apxs + utilise pour compiler les fichiers objets.

    + +

    Pour plus de dtails propos du support DSO dans Apache, lire la + documentation du module mod_so, ou mme, consultez + le fichier source src/modules/standard/mod_so.c.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    apxs -g + [ -S nom=valeur ] + -n nom-module

    + +

    apxs -q + [ -v ] + [ -S nom=valeur ] + requte ...

    + +

    apxs -c + [ -S nom=valeur ] + [ -o fichier-dso ] + [ -I rpertoire-inc ] + [ -D nom=valeur ] + [ -L rpertoire-lib ] + [ -l nom-bibliothque ] + [ -Wc,options-compilation ] + [ -Wl,options-edition-liens ] + fichiers ...

    + +

    apxs -i + [ -S nom=valeur ] + [ -n nom-module ] + [ -a ] + [ -A ] + fichier-dso ...

    + +

    apxs -e + [ -S nom=valeur ] + [ -n nom-module ] + [ -a ] + [ -A ] + fichier-dso ...

    +
    top
    +
    +

    Options

    +

    Options courantes

    +
    +
    -n nom-module
    +
    Dfinit explicitement le nom du module pour les options + -i (install) et -g (gnration de + modles). Utilisez cette option pour spcifier de manire + explicite le nom du module. Pour l'option -g, cette + option est ncessaire ; pour l'option -i, + l'utilitaire apxs tente de dterminer le nom du + module partir des sources, ou ( dfaut) en le dduisant du nom + de fichier.
    +
    + + +

    Options de requte

    +
    +
    -q
    +
    Effectue une requte propos des variables et de + l'environnement utiliss pour compiler httpd. + Lorsqu'elle est invoque sans paramtre requte, cette + option affiche toutes les variables connues, ainsi que leurs + valeurs. Le paramtre optionnel -v formate la liste + affiche. + +

    Utilisez cette option pour dterminer manuellement les options + utilises pour compiler le binaire httpd qui chargera + votre module. Ajoutez par exemple

    +

    + INC=-I`apxs -q INCLUDEDIR` +

    + +

    dans vos propres Makefiles si vous devez accder manuellement + aux fichiers d'en-ttes C d'Apache.

    +
    + + +

    Options de configuration

    +
    +
    -S nom=valeur
    +
    Cette option permet de modifier la configuration d'apxs + dcrite ci-dessus.
    +
    + + +

    Option de gnration des + modles

    +
    +
    -g
    +
    Cette option permet de gnrer un sous-rpertoire + nom (voir option -n) contenant deux + fichiers : le premier fichier est un exemple de fichier source de + module nomm mod_nom.c que l'on peut + utiliser comme modle pour crer ses propres modules, ou comme + point de dpart pour se familiariser avec le mcanisme apxs ; le + second fichier est le Makefile correspondant + facilitant la compilation et l'installation de ce module.
    +
    + +

    Options de compilation DSO

    +
    +
    -c
    +
    Cette option indique une opration de compilation. Tout + d'abord, les fichiers sources (.c) spcifis par + fichiers sont compils en fichiers objets + correspondants (.o), puis un objet dynamiquement partag + fichier-dso est compil via une dition de liens de ces + fichiers objets avec les autres fichiers objets (.o and .a) + spcifis par fichiers. Si l'option -o + n'est pas spcifie, le nom du fichier rsultant est dduit du + premier nom de fichier spcifi par fichiers, et ainsi + prend en gnral pour valeur par dfaut + mod_nom.so.
    + +
    -o fichier-dso
    +
    Spcifie de manire explicite le nom de fichier de l'objet + partag dynamiquement cr. Sans cette option, et si le nom ne + peut pas tre dduit de la liste fichiers, c'est le nom + par dfaut mod_unknown.so qui sera utilis.
    + +
    -D nom=valeur
    +
    Cette option est transmise directement la commande de + compilation. Vous pouvez l'utiliser pour ajouter vos propres + dfinitions au processus de compilation.
    + +
    -I rpertoire-inc
    +
    Cette option est transmise directement la commande de + compilation. Vous pouvez l'utiliser pour ajouter vos propres + chemins de recherche des rpertoires include au processus de + compilation.
    + +
    -L rpertoire-lib
    +
    Cette option est transmise directement la commande d'dition + de liens. Vous pouvez l'utiliser pour ajouter vos propres + chemins de recherche des rpertoires de bibliothques au processus + de compilation.
    + +
    -l nom-bibliothque
    +
    Cette option est transmise directement la commande d'dition + de liens. Vous pouvez l'utiliser pour ajouter vos propres + bibliothques rechercher au processus de compilation.
    + +
    -Wc,options-compilation
    +
    Cette option transmet les options-compilation en + tant qu'options supplmentaires la commande libtool + --mode=compile. Vous pouvez l'utiliser pour ajouter des + options locales spcifiques au compilateur.
    + +
    -Wl,options-edition-liens
    +
    Cette option transmet les options-edition-liens en + tant qu'options supplmentaires la commande libtool + --mode=link. Vous pouvez l'utiliser pour ajouter des + options locales spcifiques l'diteur de liens.
    + +
    -p
    +
    Avec cette option, apxs effectue l'dition de liens avec les + bibliothques apr/apr-util. Elle permet de compiler les programmes + helper qui utilisent les bibliothques apr/apr-util.
    +
    + + +

    Options d'installation et de configuration DSO

    + +
    +
    -i
    +
    Cette option indique une opration d'installation et installe + un ou plusieurs objets dynamiquement partags dans le rpertoire + modules du serveur.
    + +
    -a
    +
    Cette option active le module en ajoutant automatiquement une + directive LoadModule + correspondante au fichier de configuration d'Apache + httpd.conf, ou en l'activant s'il existe dj.
    + +
    -A
    +
    Identique l'option -a, la diffrence que la + directive LoadModule cre + est prfixe par un caractre dise (#) ; le module + est ainsi prpar pour une activation ultrieure, mais est + dsactiv dans un premier temps.
    + +
    -e
    +
    Cette option indique une opration d'dition de liens et peut + tre utilise avec les options -a et -A + de la mme manire qu'au cours de l'opration d'installation pour + diter le fichier de configuration d'Apache + httpd.conf, sans toutefois installer le module.
    +
    + +
    top
    +
    +

    Exemples

    +

    Supposons que vous disposiez d'un module Apache nomm + mod_foo.c et destin tendre les fonctionnalits du + serveur. Pour ce faire, vous devez tout d'abord compiler le fichier + source C en un objet partag pouvant tre charg dans le serveur + Apache l'excution, via la commande suivante :

    + +

    + $ apxs -c mod_foo.c
    + /chemin/vers/libtool --mode=compile gcc ... -c mod_foo.c
    + /chemin/vers/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo
    + $ _ +

    + +

    Vous devez ensuite vrifier la configuration d'Apache en vous + assurant qu'une directive LoadModule est bien prsente pour + charger cet objet partag. Pour simplifier cette tape, + apxs propose une mthode automatique d'installation de + l'objet partag dans son rpertoire "modules", et de mise jour du + fichier httpd.conf en consquence. Pour bnficier de + cette automatisation, utilisez la commande suivante :

    + +

    + $ apxs -i -a mod_foo.la
    + /chemin/vers/instdso.sh mod_foo.la /chemin/vers/apache/modules
    + /chemin/vers/libtool --mode=install cp mod_foo.la /chemin/vers/apache/modules + ... + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/conf/httpd.conf]
    + $ _ +

    + +

    Une ligne contenant

    + +

    + LoadModule foo_module modules/mod_foo.so +

    + +

    est alors ajoute au fichier de configuration si ce n'est pas + dj fait. Si vous voulez que le module soit dsactiv par dfaut, + utilisez l'option -A comme suit :

    + +

    + $ apxs -i -A mod_foo.c +

    + +

    Pour un test rapide du mcanisme apxs, vous pouvez crer un + exemple de modle de module Apache, ainsi que le Makefile + correspondant via :

    + +

    + $ apxs -g -n foo
    + Creating [DIR] foo
    + Creating [FILE] foo/Makefile
    + Creating [FILE] foo/modules.mk
    + Creating [FILE] foo/mod_foo.c
    + Creating [FILE] foo/.deps
    + $ _ +

    + +

    Vous pouvez ensuite compiler immdiatement ce module exemple en + objet partag et le charger dans le serveur Apache :

    + +

    + $ cd foo
    + $ make all reload
    + apxs -c mod_foo.c
    + /chemin/vers/libtool --mode=compile gcc ... -c mod_foo.c
    + /chemin/vers/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo
    + apxs -i -a -n "foo" mod_foo.la
    + /chemin/vers/instdso.sh mod_foo.la /chemin/vers/apache/modules
    + /chemin/vers/libtool --mode=install cp mod_foo.la /chemin/vers/apache/modules + ... + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/conf/httpd.conf]
    + apachectl restart
    + /chemin/vers/apache/sbin/apachectl restart: httpd not running, trying to start
    + [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    + /chemin/vers/apache/sbin/apachectl restart: httpd started
    + $ _ +

    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/apxs.html.ko.euc-kr b/docs/manual/programs/apxs.html.ko.euc-kr index 9c96fda2d5e..5c315edc632 100644 --- a/docs/manual/programs/apxs.html.ko.euc-kr +++ b/docs/manual/programs/apxs.html.ko.euc-kr @@ -1,24 +1,30 @@ - -apxs - APache eXtenSion - Apache HTTP Server +apxs - APache eXtenSion - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    apxs - APache eXtenSion

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    apxs - APache eXtenSion

    @@ -78,7 +84,7 @@ +

    top

    @@ -318,9 +324,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apxs.html.tr.utf8 b/docs/manual/programs/apxs.html.tr.utf8 index 9c1e96d2ffc..a3ec946e946 100644 --- a/docs/manual/programs/apxs.html.tr.utf8 +++ b/docs/manual/programs/apxs.html.tr.utf8 @@ -1,28 +1,33 @@ - -apxs - Apache Eklenti Aracı - Apache HTTP Sunucusu +apxs - Apache Eklenti Aracı - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    apxs - Apache Eklenti Aracı

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    apxs - Apache Eklenti Aracı

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    apxs, Apache Hiper Metin Aktarım Protokolü (HTTP) sunucusu için ek modül derleme ve kurulum aracıdır. Bu @@ -86,7 +91,7 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -108,6 +113,7 @@ [ -l kütüphane-adı ] [ -Wc,derleyici-seçenekleri ] [ -Wl,ilintileyici-seçenekleri ] + [ -p ] dosya ...

    apxs -i @@ -227,6 +233,11 @@

    Bu seçenek libtool --mode=link komutuna doğrudan seçenek aktarmak için kullanılır. Bu seçeneği yerel ilintileyiciniz için gereken ek seçenekleri belirtmek için kullanın.
    + +
    -p
    +
    Bu seçenek apxs'in apr/apr-util kütüphaneleriyle ilintilenmesini + sağlar. apr/apr-util kütüphanelerini kullanan yardımcı uygulamaları + derlerken yararlıdır.
    @@ -347,9 +358,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/apxs.xml b/docs/manual/programs/apxs.xml index 309fccfe118..be5e0c35eec 100644 --- a/docs/manual/programs/apxs.xml +++ b/docs/manual/programs/apxs.xml @@ -210,6 +210,11 @@
    This option passes linker-flags as additional flags to the libtool --mode=link command. Use this to add local linker-specific options.
    + +
    -p
    +
    This option causes apxs to link against the apr/apr-util libraries. + This is useful when compiling helper programs that use the apr/apr-util + libraries.
    diff --git a/docs/manual/programs/apxs.xml.fr b/docs/manual/programs/apxs.xml.fr new file mode 100644 index 00000000000..0bfe66db74e --- /dev/null +++ b/docs/manual/programs/apxs.xml.fr @@ -0,0 +1,363 @@ + + + + + + + + + + +Programmes + +apxs - Utilitaire pour les extensions d'Apache + + +

    apxs est un utilitaire permettant de compiler et + d'installer des modules en tant qu'extensions du serveur HTTP + Apache. A cet effet, un objet dynamique partagé (DSO) est compilé à + partir d'un ou plusieurs fichiers sources ou objets et + peut être chargé pendant l'exécution du serveur Apache via la + directive LoadModule du + module mod_so.

    + +

    Pour pouvoir utiliser ce mécanisme d'extensions, votre + plate-forme doit supporter la fonctionnalité DSO, et votre binaire + httpd Apache doit être compilé avec le module + mod_so. Si ce n'est pas le cas, l'utilitaire + apxs vous le signalera. Vous pouvez aussi vérifier + vous-même ces prérequis en exécutant manuellement la commande :

    + + + $ httpd -l + + +

    Le module mod_so doit faire partie de la liste + des modules affichée. Si ces prérequis sont présents, vous pouvez + facilement étendre les fonctionnalités de votre serveur Apache en + installant vos propres modules à l'aide de l'utilitaire + apxs, via le mécanisme DSO :

    + + + $ apxs -i -a -c mod_foo.c
    + gcc -fpic -DSHARED_MODULE -I/chemin/vers/apache/include -c mod_foo.c
    + ld -Bshareable -o mod_foo.so mod_foo.o
    + cp mod_foo.so /chemin/vers/apache/modules/mod_foo.so
    + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/etc/httpd.conf]
    + $ apachectl restart
    + /chemin/vers/apache/sbin/apachectl restart: httpd not running, trying to start
    + [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    + /chemin/vers/apache/sbin/apachectl restart: httpd started
    + $ _ +
    + +

    Les arguments fichiers peuvent correspondre à un + fichier source C (.c), un fichier objet (.o) ou même une archive de + bibliothèques (.a). L'utilitaire apxs reconnaît + automatiquement ces extensions et utilise automatiquement les + fichiers source C pour la compilation, et les fichiers objets et + archives pour l'édition de liens. Cependant, si vous utilisez des + fichiers objets précompilés, assurez-vous que leur code soit + indépendant de la position (PIC), afin de pouvoir les utiliser avec + un objet partagé chargé dynamiquement. Avec GCC, par exemple, il + vous suffit de toujours utiliser l'option de compilation + -fpic. Pour les autres compilateurs C, consultez leur + page de manuel, ou vérifiez les drapeaux qu'apxs + utilise pour compiler les fichiers objets.

    + +

    Pour plus de détails à propos du support DSO dans Apache, lire la + documentation du module mod_so, ou même, consultez + le fichier source src/modules/standard/mod_so.c.

    +
    +apachectl +httpd + +
    Syntaxe +

    apxs -g + [ -S nom=valeur ] + -n nom-module

    + +

    apxs -q + [ -v ] + [ -S nom=valeur ] + requête ...

    + +

    apxs -c + [ -S nom=valeur ] + [ -o fichier-dso ] + [ -I répertoire-inc ] + [ -D nom=valeur ] + [ -L répertoire-lib ] + [ -l nom-bibliothèque ] + [ -Wc,options-compilation ] + [ -Wl,options-edition-liens ] + fichiers ...

    + +

    apxs -i + [ -S nom=valeur ] + [ -n nom-module ] + [ -a ] + [ -A ] + fichier-dso ...

    + +

    apxs -e + [ -S nom=valeur ] + [ -n nom-module ] + [ -a ] + [ -A ] + fichier-dso ...

    +
    + +
    Options +
    Options courantes +
    +
    -n nom-module
    +
    Définit explicitement le nom du module pour les options + -i (install) et -g (génération de + modèles). Utilisez cette option pour spécifier de manière + explicite le nom du module. Pour l'option -g, cette + option est nécessaire ; pour l'option -i, + l'utilitaire apxs tente de déterminer le nom du + module à partir des sources, ou (à défaut) en le déduisant du nom + de fichier.
    +
    +
    + +
    Options de requête +
    +
    -q
    +
    Effectue une requête à propos des variables et de + l'environnement utilisés pour compiler httpd. + Lorsqu'elle est invoquée sans paramètre requête, cette + option affiche toutes les variables connues, ainsi que leurs + valeurs. Le paramètre optionnel -v formate la liste + affichée. + +

    Utilisez cette option pour déterminer manuellement les options + utilisées pour compiler le binaire httpd qui chargera + votre module. Ajoutez par exemple

    + + INC=-I`apxs -q INCLUDEDIR` + + +

    dans vos propres Makefiles si vous devez accéder manuellement + aux fichiers d'en-têtes C d'Apache.

    +
    +
    + +
    Options de configuration +
    +
    -S nom=valeur
    +
    Cette option permet de modifier la configuration d'apxs + décrite ci-dessus.
    +
    +
    + +
    Option de génération des + modèles +
    +
    -g
    +
    Cette option permet de générer un sous-répertoire + nom (voir option -n) contenant deux + fichiers : le premier fichier est un exemple de fichier source de + module nommé mod_nom.c que l'on peut + utiliser comme modèle pour créer ses propres modules, ou comme + point de départ pour se familiariser avec le mécanisme apxs ; le + second fichier est le Makefile correspondant + facilitant la compilation et l'installation de ce module.
    +
    +
    +
    Options de compilation DSO +
    +
    -c
    +
    Cette option indique une opération de compilation. Tout + d'abord, les fichiers sources (.c) spécifiés par + fichiers sont compilés en fichiers objets + correspondants (.o), puis un objet dynamiquement partagé + fichier-dso est compilé via une édition de liens de ces + fichiers objets avec les autres fichiers objets (.o and .a) + spécifiés par fichiers. Si l'option -o + n'est pas spécifiée, le nom du fichier résultant est déduit du + premier nom de fichier spécifié par fichiers, et ainsi + prend en général pour valeur par défaut + mod_nom.so.
    + +
    -o fichier-dso
    +
    Spécifie de manière explicite le nom de fichier de l'objet + partagé dynamiquement créé. Sans cette option, et si le nom ne + peut pas être déduit de la liste fichiers, c'est le nom + par défaut mod_unknown.so qui sera utilisé.
    + +
    -D nom=valeur
    +
    Cette option est transmise directement à la commande de + compilation. Vous pouvez l'utiliser pour ajouter vos propres + définitions au processus de compilation.
    + +
    -I répertoire-inc
    +
    Cette option est transmise directement à la commande de + compilation. Vous pouvez l'utiliser pour ajouter vos propres + chemins de recherche des répertoires include au processus de + compilation.
    + +
    -L répertoire-lib
    +
    Cette option est transmise directement à la commande d'édition + de liens. Vous pouvez l'utiliser pour ajouter vos propres + chemins de recherche des répertoires de bibliothèques au processus + de compilation.
    + +
    -l nom-bibliothèque
    +
    Cette option est transmise directement à la commande d'édition + de liens. Vous pouvez l'utiliser pour ajouter vos propres + bibliothèques à rechercher au processus de compilation.
    + +
    -Wc,options-compilation
    +
    Cette option transmet les options-compilation en + tant qu'options supplémentaires à la commande libtool + --mode=compile. Vous pouvez l'utiliser pour ajouter des + options locales spécifiques au compilateur.
    + +
    -Wl,options-edition-liens
    +
    Cette option transmet les options-edition-liens en + tant qu'options supplémentaires à la commande libtool + --mode=link. Vous pouvez l'utiliser pour ajouter des + options locales spécifiques à l'éditeur de liens.
    + +
    -p
    +
    Avec cette option, apxs effectue l'édition de liens avec les + bibliothèques apr/apr-util. Elle permet de compiler les programmes + helper qui utilisent les bibliothèques apr/apr-util.
    +
    +
    + +
    + Options d'installation et de configuration DSO +
    +
    -i
    +
    Cette option indique une opération d'installation et installe + un ou plusieurs objets dynamiquement partagés dans le répertoire + modules du serveur.
    + +
    -a
    +
    Cette option active le module en ajoutant automatiquement une + directive LoadModule + correspondante au fichier de configuration d'Apache + httpd.conf, ou en l'activant s'il existe déjà.
    + +
    -A
    +
    Identique à l'option -a, à la différence que la + directive LoadModule créée + est préfixée par un caractère dièse (#) ; le module + est ainsi préparé pour une activation ultérieure, mais est + désactivé dans un premier temps.
    + +
    -e
    +
    Cette option indique une opération d'édition de liens et peut + être utilisée avec les options -a et -A + de la même manière qu'au cours de l'opération d'installation pour + éditer le fichier de configuration d'Apache + httpd.conf, sans toutefois installer le module.
    +
    +
    +
    + +
    Exemples +

    Supposons que vous disposiez d'un module Apache nommé + mod_foo.c et destiné à étendre les fonctionnalités du + serveur. Pour ce faire, vous devez tout d'abord compiler le fichier + source C en un objet partagé pouvant être chargé dans le serveur + Apache à l'exécution, via la commande suivante :

    + + + $ apxs -c mod_foo.c
    + /chemin/vers/libtool --mode=compile gcc ... -c mod_foo.c
    + /chemin/vers/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo
    + $ _ +
    + +

    Vous devez ensuite vérifier la configuration d'Apache en vous + assurant qu'une directive LoadModule est bien présente pour + charger cet objet partagé. Pour simplifier cette étape, + apxs propose une méthode automatique d'installation de + l'objet partagé dans son répertoire "modules", et de mise à jour du + fichier httpd.conf en conséquence. Pour bénéficier de + cette automatisation, utilisez la commande suivante :

    + + + $ apxs -i -a mod_foo.la
    + /chemin/vers/instdso.sh mod_foo.la /chemin/vers/apache/modules
    + /chemin/vers/libtool --mode=install cp mod_foo.la /chemin/vers/apache/modules + ... + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/conf/httpd.conf]
    + $ _ +
    + +

    Une ligne contenant

    + + + LoadModule foo_module modules/mod_foo.so + + +

    est alors ajoutée au fichier de configuration si ce n'est pas + déjà fait. Si vous voulez que le module soit désactivé par défaut, + utilisez l'option -A comme suit :

    + + + $ apxs -i -A mod_foo.c + + +

    Pour un test rapide du mécanisme apxs, vous pouvez créer un + exemple de modèle de module Apache, ainsi que le Makefile + correspondant via :

    + + + $ apxs -g -n foo
    + Creating [DIR] foo
    + Creating [FILE] foo/Makefile
    + Creating [FILE] foo/modules.mk
    + Creating [FILE] foo/mod_foo.c
    + Creating [FILE] foo/.deps
    + $ _ +
    + +

    Vous pouvez ensuite compiler immédiatement ce module exemple en + objet partagé et le charger dans le serveur Apache :

    + + + $ cd foo
    + $ make all reload
    + apxs -c mod_foo.c
    + /chemin/vers/libtool --mode=compile gcc ... -c mod_foo.c
    + /chemin/vers/libtool --mode=link gcc ... -o mod_foo.la mod_foo.slo
    + apxs -i -a -n "foo" mod_foo.la
    + /chemin/vers/instdso.sh mod_foo.la /chemin/vers/apache/modules
    + /chemin/vers/libtool --mode=install cp mod_foo.la /chemin/vers/apache/modules + ... + chmod 755 /chemin/vers/apache/modules/mod_foo.so
    + [activation du module `foo' dans /chemin/vers/apache/conf/httpd.conf]
    + apachectl restart
    + /chemin/vers/apache/sbin/apachectl restart: httpd not running, trying to start
    + [Tue Mar 31 11:27:55 1998] [debug] mod_so.c(303): loaded module foo_module
    + /chemin/vers/apache/sbin/apachectl restart: httpd started
    + $ _ +
    + +
    +
    diff --git a/docs/manual/programs/apxs.xml.ko b/docs/manual/programs/apxs.xml.ko index 2d60c66eb84..be2502236dd 100644 --- a/docs/manual/programs/apxs.xml.ko +++ b/docs/manual/programs/apxs.xml.ko @@ -1,7 +1,7 @@ - + + -configure - Configure the source tree - Apache HTTP Server +configure - Configure the source tree - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    configure - Configure the source tree

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    configure - Configure the source tree

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -35,7 +41,7 @@ +

    See also

    top

    Synopsis

    @@ -187,7 +193,7 @@
    --libexecdir=DIR
    Install the program executables (i.e., shared modules) in DIR. By default libexecdir is set to - EPREFIX/libexec.
    + EPREFIX/modules.
    --localstatedir=DIR
    Install modifiable single-machine data in DIR. @@ -288,10 +294,10 @@

    Choosing modules to compile

    Most modules are compiled by default and have to be disabled - explicitly or by using the keywords few or - none (see --enable-modules, - --enable-mods-shared and --enable-mods-static - below for further explanation) to be removed.

    + explicitly or by using the keyword few + (see --enable-modules, --enable-mods-shared + and --enable-mods-static below for further explanation) + or --enable-modules=none to be removed as a group.

    Other modules are not compiled by default and have to be enabled explicitly or by using the keywords all or @@ -300,8 +306,8 @@

    To find out which modules are compiled by default, run ./configure -h or ./configure --help and look under Optional Features. Suppose you - are interested in mod_example1 and - mod_example2, and you + are interested in mod_example1 and + mod_example2, and you see this:

    Optional Features:
    @@ -386,7 +392,8 @@
         

    Cumulative and other options

    --enable-maintainer-mode
    -
    Turn on debugging and compile time warnings.
    +
    Turn on debugging and compile time warnings + and load all compiled modules.
    --enable-mods-shared=MODULE-LIST
    @@ -400,7 +407,7 @@ --enable-mods-shared='headers rewrite dav'

    Additionally you can use the special keywords reallyall, - all, most, few and none. + all, most and few. For example,

    --enable-mods-shared=most @@ -422,16 +429,6 @@ LoadModule directives for all built modules can be activated via the configure option --enable-load-all-modules.

    -

    Caveat: - --enable-mods-shared=all does not actually build all - modules. To build all modules then, one might use:

    -

    - ./configure \
    - - --with-ldap \
    - --enable-mods-shared="all ssl ldap cache proxy authn_alias file_cache authnz_ldap charset_lite dav_lock cache_disk" -
    -

    --enable-mods-static=MODULE-LIST
    @@ -679,9 +676,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/configure.html.fr b/docs/manual/programs/configure.html.fr new file mode 100644 index 00000000000..4ccbe34951e --- /dev/null +++ b/docs/manual/programs/configure.html.fr @@ -0,0 +1,790 @@ + + + + + +configure - Configure l'arborescence des sources - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    configure - Configure l'arborescence des sources

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    Le script configure permet de configurer + l'arborescence des sources afin de compiler et installer le serveur + HTTP Apache sur votre plate-forme spcifique. De nombreuses options + vous permettent de compiler un serveur correspondant vos propres + besoins.

    + +

    Ce script, situ dans le rpertoire racine de la distribution des + sources, ne concerne que la compilation sur les systmes Unix et + apparents. Pour les autres plates-formes, voir la documentation spcifique de ces + dernires.

    +
    + +
    top
    +
    +

    Rsum

    +

    Vous devez appeler le script configure depuis le + rpertoire racine de la distribution.

    + +

    ./configure [OPTION]... + [VARIABLE=VALEUR]...

    + +

    Pour dfinir des variables d'environnement (par exemple + CC,CFLAGS, etc...), utilisez la clause + VARIABLE=VALEUR. Voir ci-dessous pour la description de quelques variables + usuelles.

    +
    top
    +
    +

    Options

    + + +

    Options de Configuration

    + +

    Les options suivantes affectent le comportement du script + configure.

    + +
    +
    -C
    +
    --config-cache
    +
    C'est un alias pour --cache-file=config.cache
    + +
    --cache-file=FICHIER
    +
    Les rsultats des tests seront mis en cache dans le fichier + FICHIER. Cette option est dsactive par dfaut.
    + +
    -h
    +
    --help [short|recursive]
    +
    Affichage de l'aide et sortie du script. Avec l'argument + short, seules les options spcifiques ce paquet + seront affiches. L'argument recursive permet + d'afficher l'aide de tous les paquets inclus.
    + +
    -n
    +
    --no-create
    +
    Le script configure s'excute normalement, mais + ne cre pas les fichiers rsultants. Ceci permet de vrifier les + rsultats des tests avant de gnrer les fichiers makefile pour la + compilation.
    + +
    -q
    +
    --quiet
    +
    Les messages checking ... ne sont pas affichs au + cours du processus de configuration.
    + +
    --srcdir=DIR
    +
    Dfinit le rpertoire DIR comme rpertoire des + fichiers sources. Par dfaut, c'est le rpertoire o se situe le + script configure, ou le rpertoire parent.
    + +
    --silent
    +
    Identique --quiet
    + +
    -V
    +
    --version
    +
    Affichage des informations de copyright et sortie du + script.
    +
    + + +

    Rpertoires + d'installation

    + +

    Ces options permettent de spcifier le rpertoire d'installation. + L'arborescence de l'installation dpend de l'organisation (layout) + slectionne.

    + +
    +
    --prefix=PREFIX
    +
    Installe les fichiers indpendants de l'architecture dans + PREFIX. Par dfaut, le rpertoire d'installation est + /usr/local/apache2.
    + +
    --exec-prefix=EPREFIX
    +
    Installe les fichiers dpendants de l'architecture dans + EPREFIX. La valeur par dfaut de cette option + correspond la valeur de la variable + PREFIX.
    +
    + +

    Par dfaut, make install va installer tous les + fichiers dans /usr/local/apache2/bin, + /usr/local/apache2/lib, etc... Vous pouvez cependant + spcifier un prfixe d'installation autre que + /usr/local/apache2 en utilisant l'option + --prefix (par exemple --prefix=$HOME).

    + +

    Spcifier une organisation (layout) des + rpertoires

    +
    +
    --enable-layout=LAYOUT
    +
    Configure le code source et les scripts de compilation de + faon ce que l'arborescence d'installation adopte + l'organisation LAYOUT. Ceci vous permet de spcifier + des chemins spars pour chaque type de fichier de + l'installation du serveur HTTP Apache. Le fichier + config.layout contient de nombreux exemples de + configurations, et vous pouvez crer vos propres configurations + personnalises en vous basant sur ces exemples. Les diffrentes + organisations contenues dans ce fichier sont enregistres sous + forme de sections <Layout + FOO>...</Layout> et rfrences dans ce cas par + le nom FOO. L'organisation par dfaut + est Apache.
    +
    + + +

    Configuration avance des + rpertoires d'installation

    + +

    Pour une dfinition plus prcise des rpertoires + d'installation, utilisez les options ci-dessous. Notez que les + rpertoires par dfaut sont dfinis par autoconf, et + que leurs valeurs sont crases par les valeurs correspondantes + dfinies lors du choix de l'organisation des rpertoires + (layout).

    + +
    +
    --bindir=DIR
    +
    Installe les excutables utilisateur dans DIR. + Les excutables utilisateur sont des programmes support comme + htpasswd, dbmmanage, + etc..., et destins aux administrateurs du site. Par dfaut, + DIR est dfini + EPREFIX/bin.
    + +
    --datadir=DIR
    +
    Installe les donnes non modifiables indpendantes de + l'architecture dans DIR. Par dfaut, + datadir est dfini + PREFIX/share. Cette option est fournie + par autoconf et actuellement inutilise.
    + +
    --includedir=DIR
    +
    Installe les fichiers d'en-ttes C dans DIR. Par + dfaut, includedir est dfini + EPREFIX/include.
    + +
    --infodir=DIR
    +
    Installe la documentation info dans DIR. Par + dfaut, infodir est dfini + PREFIX/info. Cette option est + actuellement inutilise.
    + +
    --libdir=DIR
    +
    Installe les fichiers objet des bibliothques dans + DIR. Par dfaut, libdir est dfini + EPREFIX/lib.
    + +
    --libexecdir=DIR
    +
    Installe les excutables du programme (autrement dit les + modules partags) dans DIR. Par dfaut, + libexecdir est dfini + EPREFIX/modules.
    + +
    --localstatedir=DIR
    +
    Installe les donnes temporaires modifiables spcifiques + la machine dans + DIR. Par dfaut, localstatedir est + dfini PREFIX/var. Cette option est + fournie par autoconf et est actuellement + inutilise.
    + +
    --mandir=DIR
    +
    Installe les pages de manuel dans DIR. Par + dfaut, mandir est dfini + EPREFIX/man.
    + +
    --oldincludedir=DIR
    +
    Installe les fichiers d'en-ttes C pour les programmes + autres que gcc dans DIR. Par dfaut, + oldincludedir est dfini + /usr/include. Cette option est fournie par + autoconf et est actuellement inutilise.
    + +
    --sbindir=DIR
    +
    Installe les excutables de l'administrateur systme dans + DIR. Ce sont les programmes du serveur comme + httpd, apachectl, + suexec, etc..., qui sont ncessaires + l'excution du serveur HTTP Apache. Par dfaut, + sbindir est dfini + EPREFIX/sbin.
    + +
    --sharedstatedir=DIR
    +
    Installe les donnes modifiables indpendantes de + l'architecture dans DIR. Par dfaut, + sharedstatedir est dfini + PREFIX/com. Cette option est fournie par + autoconf et est actuellement inutilise.
    + +
    --sysconfdir=DIR
    +
    Installe les donnes non modifiables spcifiques la + machine comme les fichiers de configuration du serveur + httpd.conf, mime.types, etc... dans + DIR. Par dfaut, sysconfdir est dfini + PREFIX/conf.
    +
    + + + +

    Types de systmes

    + +

    Ces options sont utilises pour la cross-compilation du serveur + HTTP Apache afin de pouvoir l'utiliser sur un autre systme. Dans le + cas gnral o la compilation et l'excution du serveur ont lieu sur + le mme systme, ces options ne sont pas utilises.

    + +
    +
    --build=BUILD
    +
    Dfinit le type du systme sur lequel les outils sont + compils. Par dfaut, il s'agit de la chane renvoye par le + script config.guess.
    + +
    --host=HOST
    +
    Dfinit le type du systme sur lequel le serveur s'excutera. + Par dfaut, HOST est identique BUILD.
    + +
    --target=TARGET
    +
    Configure pour construire des compilateurs pour le type de + systme TARGET. Par dfaut, TARGET est + identique HOST. Cette option est fournie par + autoconf et n'est pas requise par le serveur HTTP + Apache.
    +
    + + +

    Fonctionnalits + optionnelles

    + +

    Ces options vous permettent de configurer avec prcision les + fonctionnalits de votre futur serveur HTTP.

    + +

    Syntaxe gnrale

    +

    D'une manire gnrale, vous pouvez utiliser la syntaxe + suivante pour activer ou dsactiver une fonctionnalit :

    + +
    +
    --disable-FONCTIONNALITE
    +
    Dsactive la fonctionnalit FONCTIONNALITE. + Identique + --enable-FONCTIONNALITE=no.
    + +
    --enable-FONCTIONNALITE[=ARG]
    +
    Active la fonctionnalit FONCTIONNALITE. La + valeur par dfaut de ARG est yes.
    + +
    --enable-MODULE=shared
    +
    Le module spcifi sera compil en tant que module DSO. Par + dfaut, les modules activs sont lis dynamiquement.
    + +
    --enable-MODULE=static
    +
    Le module correspondant sera li statiquement.
    +
    + +

    Note

    + Si vous spcifiez --enable-foo, et si + foo n'existe pas, configure ne le + signalera pas ; vous devez donc prendre soin de taper les + options correctement. +
    + + +

    Choix des modules compiler

    +

    La plupart des modules sont compils par dfaut et ils doivent tre + dsactivs de manire explicite ou via le mots-cl few (voir + ci-dessous --enable-modules, + --enable-mods-shared et --enable-mods-static + pour une explication plus dtaille), ou + --enable-modules=none pour les dsactiver tous.

    + +

    Par dfaut, les autres modules ne sont pas compils et doivent + tre activs explicitement, ou en utilisant les mots-cls + all ou reallyall pour tre disponibles.

    + +

    Pour dterminer quels modules sont compils par dfaut, + excutez la commande ./configure -h ou + ./configure --help, et consultez les Optional + Features. Par exemple, supposons que vous soyez intress + par les modules mod_example1 et + mod_example2, et que vous voyiez ceci :

    + +
    Optional Features:
    +  ...
    +  --disable-example1     example module 1
    +  --enable-example2      example module 2
    +  ...
    + +

    Le module mod_example1 est ici activ par + dfaut, et vous devez spcifier --disable-example1 + si vous ne voulez pas le compiler. Par contre, le module + mod_example2 est dsactiv par dfaut, et vous + devez spcifier --enable-example2 si vous voulez le + compiler.

    + + + +

    Modules Multi-Processus

    +

    Les Modules Multi-Processus, ou MPMs, + constituent le coeur du serveur. Un seul MPM doit tre actif pour + que le serveur puisse fonctionner. Vous trouverez la liste des + MPMs disponibles module index page.

    + +

    Les MPMs peuvent tre compils en tant que modules DSO pour un + chargement dynamique, ou lis statiquement avec le serveur, et + sont activs via les options suivantes :

    + +
    +
    --with-mpm=MPM
    +
    +

    Slectionne le MPM par dfaut pour votre serveur. Si les + MPMs sont compils en tant que modules DSO (voir + --enable-mpms-shared), cette option spcifie le + MPM qui sera charg par dfaut selon le fichier de + configuration. Dans le cas contraire, cette option spcifie le + seul MPM disponible qui sera li statiquement avec le + serveur.

    +

    Si cette option est omise, c'est le MPM par dfaut pour votre + systme d'exploitation qui sera utilis.

    +
    + +
    --enable-mpms-shared=Liste de MPM
    +
    +

    Dfinit une liste de MPMs compiler en tant que modules + dynamiquement partags (DSO). Un de ces modules doit tre + charg dynamiquement via la directive LoadModule.

    +

    Liste de MPM est une liste, entoure + d'apostrophes, de noms de MPM spars par des espaces. Par + exemple :

    +

    + --enable-mpms-shared='prefork worker' +

    +

    Vous pouvez aussi utiliser le mot-cl all, ce + qui aura pour effet de spcifier tous les MPMs qui supportent + le chargement dynamique sur la plate-forme considre, et de + les compiler en tant que modules DSO. Par exemple :

    +

    + --enable-mpms-shared=all +

    +
    +
    + + +

    Modules tiers

    +

    Pour ajouter des modules tiers, utilisez les options suivantes + :

    + +
    +
    --with-module=type-module:fichier-module[, + type-module:fichier-module]
    +

    Ajoute un ou plusieurs modules tiers la liste des + modules lis statiquement. Le fichier source du module + fichier-module sera recherch dans le sous-rpertoire + type-module de l'arborescence des sources de votre + serveur HTTP Apache. S'il ne l'y trouve pas, + configure considrera fichier-module + comme un chemin de fichier absolu et essaiera de copier le + fichier source dans le sous-rpertoire type-module. + Si ce sous-rpertoire n'existe pas, il sera cr et un fichier + Makefile.in standard y sera enregistr.

    +

    Cette option est conue pour ajouter de petits modules + externes ne comportant qu'un seul fichier source. Pour des + modules plus complexes, vous devrez lire la documentation du + fournisseur du module.

    +

    Note

    + Si vous voulez compiler un module DSO (li de manire + dynamique au lieu de statique), utilisez le programme + apxs.
    +
    + +
    + + +

    Options cumulatives et autres + options

    +
    +
    --enable-maintainer-mode
    +
    Active les avertissements de dbogage et de compilation et + charge tous les modules compils.
    + +
    --enable-mods-shared=LISTE-MODULES
    +
    +

    Dfinit une liste de modules activer et compiler en + tant que modules dynamiques partags. Cela signifie que ces + modules doivent tre chargs dynamiquement en utilisant la + directive LoadModule.

    +

    LISTE-MODULES est une liste, entoure + d'apostrophes, de noms de modules + spars par des espaces. Les noms + des modules sont spcifis sans le prfixe mod_. + Par exemple :

    +

    + --enable-mods-shared='headers rewrite dav' +

    +

    Vous pouvez aussi utiliser les mots-cls reallyall, + all, most et few. Par + exemple,

    +

    + --enable-mods-shared=most +

    +

    va compiler la plupart des modules en tant que modules DSO,

    +

    + --enable-mods-shared=few +

    +

    ne compilera qu'un jeu de modules de base.

    +

    Le jeu par dfaut correspond au mot-cl most.

    + +

    Les directives LoadModule correspondant aux + diffrents modules choisis sont automatiquement gnres dans + le fichier de configuration principal. Par dfaut, toutes ces + directives sont mises en commentaire, sauf pour les modules + requis ou ceux explicitement slectionns par un argument + --enable-nom-module du script configure. Vous + pouvez modifier le jeu de modules charg en activant ou + dsactivant les directives LoadModule dans le fichier + httpd.conf. En outre, les directives LoadModule peuvent tre actives + pour tous les modules compils via l'option + --enable-load-all-modules du script configure.

    + +
    + +
    --enable-mods-static=MODULE-LIST
    +
    Cette option produit le mme effet que l'option + --enable-mods-shared, l'exception que les modules + seront lis statiquement. Cela signifie que les modules + spcifis seront toujours disponibles au cours du fonctionnement + de httpd. Ils n'ont pas besoin d'tre chargs + via la directive LoadModule.
    + +
    --enable-modules=MODULE-LIST
    +
    Cette option se comporte comme + --enable-mods-shared, et va aussi lier les modules + concerns dynamiquement. Le mot-cl spcial none + dsactive la compilation de tous les modules.
    + +
    --enable-v4-mapped
    +
    Permet aux sockets IPv6 de traiter les connexions IPv4.
    + +
    --with-port=PORT
    +
    Permet de dfinir le port que le programme + httpd va couter. Ce numro de port est + utilis lors de la gnration du fichier de configuration + httpd.conf. Sa valeur par dfaut est 80.
    + +
    --with-program-name
    +
    Permet de dfinir un nom d'excutable alternatif. Le nom par + dfaut est httpd.
    +
    + + + +

    Paquets optionnels

    +

    Ces options permettent de dfinir des paquets optionnels.

    + +

    Syntaxe gnrale

    +

    D'une manire gnrale, vous pouvez utiliser la syntaxe + suivante pour dfinir un paquet optionnel :

    + +
    +
    --with-PAQUET[=ARG]
    +
    Utilise le paquet PAQUET. La valeur par dfaut de + ARG est yes.
    + +
    --without-PAQUET
    +
    N'utilise pas le paquet PAQUET. Cette option est + identique --with-PAQUET=no. Elle est + fournie par autoconf mais n'est pas trs utile pour + le serveur HTTP Apache.
    +
    + + + + +

    Paquets spcifiques

    +
    +
    --with-apr=REP|FICHIER
    +
    La Bibliothque pour la portabilit + d'Apache ou + Apache Portable Runtime (APR) fait partie de la + distribution des sources de httpd et est compile + automatiquement avec le serveur HTTP. Si vous voulez utiliser + une APR dj installe la place, vous devez indiquer + configure le chemin du script + apr-config. Vous pouvez spcifier le chemin absolu + et le nom ou le rpertoire d'installation de l'APR. + apr-config doit se trouver dans ce rpertoire ou + dans le sous-repertoire bin.
    + +
    --with-apr-util=REP|FICHIER
    +
    Les utilitaires pour la Bibliothque pour la portabilit + d'Apache ou Apache Portable Runtime Utilities (APU) font partie de la + distribution des sources de httpd et sont compils + automatiquement avec le serveur HTTP. Si vous voulez utiliser + des APU dj installs la place, vous devez indiquer + configure le chemin du script + apu-config. Vous pouvez spcifier le chemin absolu + et le nom ou le rpertoire d'installation des APU. + apu-config doit se trouver dans ce rpertoire ou + dans le sous-repertoire bin.
    + +
    --with-ssl=REP
    +
    Si mod_ssl a t activ, + configure recherche une installation d'OpenSSL. + Vous pouvez dfinir le rpertoire de la bote outils SSL/TLS + la place.
    + +
    --with-z=REP
    +
    configure recherche automatiquement une + bibliothque zlib installe si la configuration de + vos sources en ncessite une (par exemple lorsque + mod_deflate est activ). Vous pouvez dfinir le + rpertoire de la bibliothque de compression la place.
    +
    + +

    De nombreuses fonctionnalits du serveur HTTP Apache, y compris + les directives RewriteMap DBM de + mod_rewrite et mod_authn_dbm + utilisent une base de donnes simple + de la forme cl/valeur pour une recherche rapide d'informations. + SDBM, inclus dans les APU, est donc toujours disponible. Si vous + souhaitez utiliser d'autres types de bases de donnes, utilisez + les options suivantes afin de les activer :

    + +
    +
    --with-gdbm[=chemin]
    +
    Si aucun chemin n'est spcifi, + configure va rechercher les fichiers d'en-ttes et + les bibliothques d'une installation DBM GNU dans les chemins + standards. Avec un chemin explicite, + configure recherchera les fichiers concerns dans + chemin/lib et + chemin/include. En fait, + chemin permet de spcifier plusieurs chemins + d'en-ttes et bibliothques spcifiques en les sparant par des + caractres ':'.
    + +
    --with-ndbm[=chemin]
    +
    Identique --with-gdbm, mais recherche une + installation de New DBM.
    + +
    --with-berkeley-db[=chemin]
    +
    Identique --with-gdbm, mais recherche une + installation de Berkeley DB.
    +
    + +

    Note

    +

    Les options DBM sont fournies par les APU et passes en + paramtres son script de configuration. Elles sont inutiles + lorsqu'on utilise des APU dj installs dfinis par + --with-apr-util.

    +

    Vous pouvez utiliser plusieurs implmentations DBM avec votre + serveur HTTP. Le type DBM appropri sera choisi au cours de la + configuration de l'excution chaque dmarrage.

    +
    + + + +

    Options pour les programmes de + support

    +
    +
    --enable-static-support
    +
    Permet de compiler une version des binaires de support lis + statiquement. En d'autres termes, la compilation produira un + excutable indpendant comportant toutes les bibliothques + ncessaires. Sans cette option, les binaires de supports sont lis + dynamiquement.
    + +
    --enable-suexec
    +
    Utilisez cette option pour activer la programme + suexec, qui vous permet de dfinir un uid et un + gid pour les processus lancs. N'utilisez cette option que + si vous matrisez toutes les implications en matire de scurit + de l'excution d'un binaire suid sur votre serveur. + D'autres options permettent de configurer + suexec comme dcrit ci-dessous.
    +
    + +

    Il est possible de lier statiquement le binaire d'un programme + support particulier en utilisant les options suivantes :

    + +
    +
    --enable-static-ab
    +
    Compile une version lie statiquement du programme + ab.
    + + +
    --enable-static-checkgid
    +
    >Compile une version lie statiquement du programme + checkgid.
    + +
    --enable-static-htdbm
    +
    Compile une version lie statiquement du programme htdbm.
    + +
    --enable-static-htdigest
    +
    Compile une version lie statiquement du programme htdigest.
    + +
    --enable-static-htpasswd
    +
    Compile une version lie statiquement du programme htpasswd.
    + +
    --enable-static-logresolve
    +
    Compile une version lie statiquement du programme logresolve.
    + +
    --enable-static-rotatelogs
    +
    Compile une version lie statiquement du programme rotatelogs.
    +
    + +

    Options de configuration de suexec

    + +

    Les options suivantes permettent de dfinir avec prcision le + comportement du programme suexec. Voir Configurer et installer suEXEC + pour plus de dtails.

    + +
    +
    --with-suexec-bin
    +
    Dfinit le chemin du binaire suexec. La + valeur par dfaut est --sbindir (voir Dfinition prcise des rpertoires + d'installation).
    + +
    --with-suexec-caller
    +
    Dfinit l'utilisateur qui a l'autorisation d'appeler + suexec. Il est en gnral souhaitable que ce + soit le mme que celui sous lequel httpd + s'excute.
    + +
    --with-suexec-docroot
    +
    Dfinit l'arborescence des rpertoires dans laquelle le + lancement des excutables via suexec est + autoris. La valeur par dfaut est + --datadir/htdocs.
    + +
    --with-suexec-gidmin
    +
    Dfinit la valeur de GID la plus basse autorise comme + valeur cible pour suexec. La valeur par + dfaut est 100.
    + +
    --with-suexec-logfile
    +
    Dfinit le nom du fichier journal de + suexec. La valeur par dfaut est + --logfiledir/suexec_log.
    + +
    --with-suexec-safepath
    +
    Dfinit la valeur de la variable d'environnement + PATH pour les processus lancs par + suexec. La valeur par dfaut est + /usr/local/bin:/usr/bin:/bin.
    + +
    --with-suexec-userdir
    +
    Dfinit le sous-rpertoire du rpertoire utilisateur qui + contient tous les excutables pouvant tre lancs par + suexec. Cette option est ncessaire si vous + souhaitez utiliser suexec avec des + rpertoires utilisateurs (dfinis via + mod_userdir). La valeur par dfaut est + public_html.
    + +
    --with-suexec-uidmin
    +
    Dfinit la valeur d'UID la plus basse autorise comme + valeur cible pour suexec. La valeur par + dfaut est 100.
    + +
    --with-suexec-umask
    +
    Dfinit le masque de permissions umask pour les + processus lancs par suexec. Il correspond + par dfaut au masque dfini par la configuration de votre + systme.
    +
    + + +
    top
    +
    +

    Variables d'environnement

    +

    Certaines variables d'environnement permettent de modifier les + choix effectus par configure, ou d'aider ce dernier + trouver les bibliothques et programmes possdant des noms et chemins + non standards.

    + + +
    +
    CC
    +
    Dfinit la commande du compilateur C utiliser pour la + compilation.
    + +
    CFLAGS
    +
    Dfinit les paramtres du compilateur C que vous voulez utiliser + pour la compilation.
    + +
    CPP
    +
    Dfinit la commande du prprocesseur C utiliser.
    + +
    CPPFLAGS
    +
    Dfinit les paramtres du prprocesseur C/C++, par exemple + -Irpertoire-include, si certains de vos + fichiers d'en-ttes se trouvent dans le rpertoire non standard + rpertoire-include.
    + +
    LDFLAGS
    +
    Dfinit les paramtres de l'diteur de liens, par exemple + -Lrpertoire-lib, si certaines de vos + bibliothques se trouvent dans le rpertoire non standard + rpertoire-lib.
    +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/configure.html.ko.euc-kr b/docs/manual/programs/configure.html.ko.euc-kr index 99ac04841ec..e6c7a95b739 100644 --- a/docs/manual/programs/configure.html.ko.euc-kr +++ b/docs/manual/programs/configure.html.ko.euc-kr @@ -1,24 +1,30 @@ - -configure - ҽ Ʈ Ѵ - Apache HTTP Server +configure - ҽ Ʈ Ѵ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    configure - ҽ Ʈ Ѵ

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    configure - ҽ Ʈ Ѵ

    @@ -37,7 +43,7 @@ +

    top

    @@ -924,9 +930,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/configure.html.tr.utf8 b/docs/manual/programs/configure.html.tr.utf8 index 2c9ba92f173..16ab762874f 100644 --- a/docs/manual/programs/configure.html.tr.utf8 +++ b/docs/manual/programs/configure.html.tr.utf8 @@ -1,28 +1,33 @@ - -configure - kaynak ağacını yapılandırır - Apache HTTP Sunucusu +configure - kaynak ağacını yapılandırır - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    configure - kaynak ağacını yapılandırır

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    configure - kaynak ağacını yapılandırır

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    configure betiği, Apache HTTP Sunucusunun kaynak kodlarını belli bir platform için yapılandırmakta ve derlemekte kullanılır. @@ -37,7 +42,7 @@

    +

    Ayrıca bakınız:

    top

    Komut Satırı

    @@ -191,7 +196,7 @@
    Paylaşımlı modüller gibi program dosyaları dizin dizinine kurulur. Öntanımlı olarak libexecdir bu dizini - EPREFIX/libexec olarak tanımlar.
    + EPREFIX/modules olarak tanımlar.
    --localstatedir=dizin
    Düzenlenebilir tek makinelik veri dizin @@ -232,8 +237,8 @@
    httpd.conf, mime.types gibi tek makinelik salt okunur sunucu yapılandırma dosyaları dizin dizinine kurulur. Öntanımlı olarak - sysconfdir bu dizini PREFIX/etc - olarak tanımlar.
    + sysconfdir bu dizini + PREFIX/conf olarak tanımlar. @@ -284,11 +289,11 @@ yes (evet) öntanımlıdır.
    --enable-modül=shared
    -
    Belirtilen modül DSO modülü olarak derlenir.
    +
    Belirtilen modül DSO modülü olarak derlenir. Öntanımlı olarak + etkin modüller devingen ilintilenir.
    --enable-modül=static
    -
    Öntanımlı olarak etkin olan modüller durağan ilintilenir. Bunu bu - seçenekle alenen zorlayabilirsiniz.
    +
    Belirtilen modül durağan ilintilenir.

    Bilginize

    @@ -299,366 +304,88 @@
    - -

    Öntanımlı olarak etkin modüller

    -

    Bazı modüller öntanımlı olarak derlendiğinden iptal edilmek istenirse - bunun açıkça belirtilmesi gerekir. Aşağıdaki seçenekler bu tür - modüllerin diğerlerinden bağımsız olarak derlenmemesini sağlar.

    - -
    -
    --disable-actions
    -
    mod_actions modülü tarafından sağlanan ve - isteklerle tetiklenen eylemleri iptal eder.
    - -
    --disable-alias
    -
    mod_alias modülü tarafından sağlanan, isteklerin - farklı dosya sistemi bölümleriyle eşlenmesi iptal edilir.
    - -
    --disable-asis
    -
    mod_asis modülü tarafından sağlanan kendinden - HTTP başlıklı dosya türü desteğini iptal eder.
    - -
    --disable-auth
    -
    mod_authn_file modülü tarafından sağlanan kullanıcıya - dayalı erişim denetimi iptal edilir. Bu modül, kullanıcı isminin ve - parolasının salt metin dosyalarda saklandığı Temel HTTP Kimlik - Doğrulaması için kullanılır.
    - -
    --disable-autoindex
    -
    mod_autoindex modülü tarafından sağlanan dizin - içerik listelemesini iptal eder.
    - -
    --disable-access
    -
    mod_authz_host modülü tarafından sağlanan konağa - dayalı erişim denetimi iptal edilir.
    - -
    --disable-cgi
    -
    CGI betiklerine destek sağlayan mod_cgi, çok - evreli olmayan MPM kullanıldığında öntanımlı olarak etkin kılınır. - CGI desteğini iptal etmek için bu seçeneği kullanın.
    - -
    --disable-cgid
    -
    worker çok evreli MPM’i kullanılırken CGI - betikleri için desteği öntanımlı olarak mod_cgid - modülü sağlar. CGI desteğini iptal etmek için bu seçeneği - kullanın.
    - -
    --disable-charset-lite
    -
    mod_charset_lite modülü tarafından sağlanan - karakter kümesi dönüşümleri iptal edilir. Bu modül sadece EBCDIC - sistemlerinde öntanımlı olarak kurulur.
    - -
    --disable-dir
    -
    mod_dir modülü tarafından sağlanan dizin - isteklerine destek iptal edilir.
    - -
    --disable-env
    -
    mod_env modülü tarafından sağlanan ortam - değişkenlerine destek iptal edilir.
    - - -
    --disable-http
    -
    HTTP protokolüne destek iptal edilir. http modülü - en temel modüldür ve sunucunun bir HTTP sunucusu olarak çalışmasını - sağlar. Sadece, HTTP protokolü yerine başka bir protokol kullanmak - isterseniz bu seçeneği kullunın. Ne yaptığınızdan gerçekten - emin olamıyorsanız bu desteği asla iptal etmeyin. -
    - Dikkat: Bu modül ana kodla daima durağan ilintilidir.
    - -
    --disable-imagemap
    -
    mod_imagemap modülü tarafından sağlanan resim - eşlemlerine destek iptal edilir.
    - -
    --disable-include
    -
    mod_include modülü tarafından sağlanan SSI - sayfaları desteği iptal edilir.
    - -
    --disable-log-config
    -
    mod_log_config modülü tarafından sağlanan günlük - kayıtları yapılandırması iptal edilir. Bu modül olmaksızın sunucu - yapılan isteklerin günlük kayıtlarını tutamaz.
    - -
    --disable-mime
    -
    mod_mime modülü istenen dosyanın uzantısına - bakarak dosya içeriğinin (MIME - türü, dil, karakter kümesi ve kodlama) nasıl ele - alınacağını belirler. Bu modülün iptal edilmesi önerilmez.
    - -
    --disable-negotiation
    -
    mod_negotiation modülü tarafından sağlanan içerik - dili uzlaşımı iptal edilir.
    - -
    --disable-setenvif
    -
    mod_setenvif modülü tarafından sağlanan - başlıklarla ilgili ortam değişkenlerine dayalı destek iptal - edilir.
    - -
    --disable-status
    -
    mod_status modülü tarafından sağlanan süreç/evre - izleme iptal edilir.
    - -
    --disable-userdir
    -
    mod_userdir modülü tarafından sağlanan, - isteklerin kullanıcıya özel dizinlere eşlenmesi iptal edilir.
    -
    - - -

    Öntanımlı olarak etkin olmayan modüller

    - - -

    Bazı modüller öntanımlı olarak derlendiği halde açıkça istenmedikçe - veya most ya da all anahtar sözcükleri - kullanılmadıkça etkin kılınmazlar (bu konu, aşağıda --enable-mods-shared - seçeneğinde daha ayrıntılı ele alınmıştır). Bu modülleri - etkinleştirmek için aşağıdaki seçenekleri kullanabilirsiniz.

    - -
    -
    --enable-authn-anon
    -
    mod_authn_anon modülünün sağladığı anonim - kullanıcı erişimi etkin kılınır.
    - -
    --enable-authn-dbm
    -
    mod_authn_dbm modülü kullanıcı isimlerinin ve - parolalarının DBM türü veritabanı dosyalarında saklandığı HTTP Temel - Kimlik Kanıtlaması için destek sağlar. Bu seçeneği bu modülü etkin - kılmak için kullanabilirsiniz.
    - -
    --enable-authz-dbm
    -
    mod_authz_dbm modülü kullanıcı isimlerinin ve - gruplarının DBM türü veritabanı dosyalarında saklandığı HTTP Temel - Kimlik Kanıtlaması için destek sağlar. Bu seçeneği bu modülü etkin - kılmak için kullanabilirsiniz.
    - -
    --enable-auth-digest
    -
    mod_auth_digest modülü tarafından sağlanan - RFC2617 Özet Kimlik Kanıtlaması etkin kılınır. Bu modül delilleri - salt metin dosyalarda saklar.
    - -
    --enable-authnz-ldap
    -
    mod_authnz_ldap modülü tarafından sağlanan LDAP’a - Dayalı Kimlik Kanıtlaması etkin kılınır.
    - -
    --enable-cache
    -
    mod_cache modülü tarafından sağlanan devingen - dosya önbelleklemesi etkin kılınır. Bu deneysel modülün kullanımı, - aşırı yüklü sunucularda ya da önbellekli vekillerde ilginç sonuçlar - verebilir. Bunun yanında en azından bir saklama alanı yönetim modülü - (örn, mod_cache_disk) gerekebilir.
    - -
    --enable-cern-meta
    -
    mod_cern_meta modülü tarafından sağlanan CERN - türü temel veri dosyalarına destek etkin kılınır.
    - -
    --enable-charset-lite
    -
    mod_charset_lite modülü tarafından sağlanan - karakter kümesi dönüşümleri etkin kılınır. Bu modül sadece EBCDIC - sistemlerinde öntanımlı olarak etkindir. Diğer sistemlerde gerekirse - alenen etkin kılınması gerekir.
    - -
    --enable-dav
    -
    mod_dav modülü tarafından sağlanan WebDAV - protokolü desteği etkin kılınır. Dosya sistemi özkaynaklarına destek - için mod_dav_fs modülü de gerekir ve bu seçenekle o - da etkin kılınır.
    - Dikkat: mod_dav sadece http protokolü - modülü ile birlikte kullanılabilir.
    - -
    --enable-dav-fs
    -
    mod_dav_fs modülü tarafından sağlanan WebDAV - protokolünün dosya sistemi özkaynaklarına erişim desteği etkin - kılınır. Bu modül mod_dav modülü için destek - sağlar. Bu bakımdan, mod_dav modülünü de etkin - kılmak için --enable-dav seçeneğini de - kullanmalısınız.
    - -
    --enable-dav-lock
    -
    mod_dav_lock modülü tarafından sağlanan geri - destek modüllerine temel DAV kilitleme desteği etkin kılınır. Bu - modülün işlevsel olabilmesi için en azından mod_dav - modülünün etkin olması gerekir, dolayısıyla bu seçeneği - --enable-dav ile birlikte kullanmalısınız.
    - -
    --enable-deflate
    -
    mod_deflate modülü tarafından sağlanan - sıkıştırılmış aktarım kodlaması etkin kılınır.
    - -
    --enable-disk-cache
    -
    mod_cache_disk modülü tarafından sağlanan diskte - önbellekleme etkin kılınır.
    - -
    --enable-expires
    -
    mod_expires modülü tarafından sağlanan - Expires başlığıyla denetim etkin kılınır.
    - -
    --enable-ext-filter
    -
    mod_ext_filter modülü tarafından sağlanan harici - süzgeç desteği etkin kılınır.
    - -
    --enable-file-cache
    -
    mod_file_cache modülü tarafından sağlanan dosya - önbelleklemesi etkin kılınır.
    - -
    --enable-headers
    -
    mod_headers modülü tarafından sağlanan HTTP - başlıkları denetimi etkin kılınır.
    - -
    --enable-info
    -
    mod_info modülü tarafından sağlanan sunucu - bilgileri etkin kılınır.
    - -
    --enable-ldap
    -
    mod_ldap modülü tarafından sağlanan LDAP - önbelleklemesi ve bağlantı havuzu hizmetleri etkin kılınır.
    - -
    --enable-logio
    -
    mod_logio modülü tarafından sağlanan başlıklarda - bulunan girdi ve çıktı bayt sayılarının günlüklenmesi etkin - kılınır.
    - -
    --enable-mime-magic
    -
    mod_mime_magic modülü tarafından sağlanan - MIME türlerinin kendiliğinden - belirlenmesi desteği etkin kılınır.
    - -
    --enable-isapi
    -
    mod_isapi modülü tarafından sağlanan isapi - eklenti desteği etkin kılınır.
    - -
    --enable-proxy
    -
    mod_proxy modülü tarafından sağlanan - vekil/ağ-geçidi işlevselliği etkin kılınır. AJP13, - CONNECT, FTP, HTTP ve - dengeleyici vekil yetenekleri ayrı olarak - mod_proxy_ajp, mod_proxy_connect, - mod_proxy_ftp, mod_proxy_http ve - mod_proxy_balancer modülleri tarafından sağlanır. - Bu beş modül bu seçenekle kendiliğinden etkin olur.
    - -
    --enable-proxy-ajp
    -
    mod_proxy_ajp modülü tarafından sağlanan - AJP13 (Apache JServ Protokolü 1.3) için vekil desteği - etkin kılınır. Bu modül mod_proxy modülünün bir - eklentisidir, dolayısıyla bu seçeneği --enable-proxy - seçeneği ile birlikte kullanmalısınız.
    - -
    --enable-proxy-balancer
    -
    mod_proxy_balancer modülü tarafından sağlanan - AJP13, FTP ve HTTP - protokollerine yük dengeleme desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-proxy-connect
    -
    mod_proxy_connect modülü tarafından sağlanan - CONNECT isteklerine vekil desteği etkin kılınır. Bu - modül mod_proxy modülünün bir eklentisidir, - dolayısıyla bu seçeneği --enable-proxy seçeneği ile - birlikte kullanmalısınız.
    - -
    --enable-proxy-ftp
    -
    mod_proxy_ftp modülü tarafından sağlanan - FTP isteklerine vekil desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-proxy-http
    -
    mod_proxy_http modülü tarafından sağlanan - HTTP isteklerine vekil desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-rewrite
    -
    mod_rewrite modülü tarafından sağlanan kurallara - dayalı URL kurgulaması etkin kılınır.
    - -
    --enable-so
    -
    mod_so modülü tarafından sağlanan DSO yeteneği - etkin kılınır. --enable-mods-shared seçeneği bu - seçeneği de etkin kılar.
    - -
    --enable-speling
    -
    mod_speling modülü tarafından sağlanan URL - yanlışlarını düzeltme desteği etkin kılınır.
    - -
    --enable-ssl
    -
    mod_ssl modülü tarafından sağlanan SSL/TLS - şifreleme desteği etkin kılınır.
    - -
    --enable-unique-id
    -
    mod_unique_id modülü tarafından sağlanan her - isteğe bir eşsiz kimlik atama desteği etkin kılınır.
    - -
    --enable-usertrack
    -
    mod_usertrack modülü tarafından sağlanan - kullanıcı oturumunu izleme desteği etkin kılınır.
    - -
    --enable-vhost-alias
    -
    mod_vhost_alias modülü tarafından sağlanan - kitlesel sanal barındırma desteği etkin kılınır.
    -
    +

    Derlenecek modüllerin seçimi

    +

    Modüllerin çoğu öntanımlı olarak derlenir ve ya açıkça iptal edilmek + ya da few anahtar sözcüğü + kullanılarak kaldırılmak zorunda kalınır (ayrıntılar için + --enable-modules, --enable-mods-shared ve + --enable-mods-static seçeneklerine bakın). Bir grubu + tamamen kaldırmak için --enable-modules=none gerekir.

    + +

    Öntanımlı olarak derlenmeyenler ise ya açıkça etkin kılınmak ya da + all veya reallyall anahtar sözcükleriyle + kullanılabilir yapılmak zorunda kalınır.

    + +

    Hangi modüllerin öntanımlı olarak derlendiğini öğrenmek için + ./configure -h veya ./configure --help + komutunu çalıştırın ve çıktıdaki Optional Features + bölümüne bakın. Örnek olarak, mod_example1 ve + mod_example2 modülleriyle ilgilendiğinizi + varsayalım:

    + +
    Optional Features:
    +  ...
    +  --disable-example1     example module 1
    +  --enable-example2      example module 2
    +  ...
    + +

    Burada, mod_example1 öntanımlı olarak etkindir ve + derlenmemesini istiyorsanız --disable-example1 + seçeneğini kullanmalısınız. mod_example2 ise öntanımlı + olarak derlenmemektedir ve derlenmesini istiyorsanız + --enable-example2 seçeneğini kullanmalısınız.

    -

    Geliştiriciler için modüller

    - +

    Çok Süreçlilik Modülleri

    +

    Çok Süreçlilik Modülleri veya MPM'ler + sunucunun temel davranışını belirler. Sunucuya yüklenebilecek azami MPM + sayısı birdir. Kullanılabilecek modüller modül + dizininde listelenmiştir.

    -

    Aşağıdakiler geliştiricilerin yaptıklarını sınamalar için yararlı - modülleri etkinleştiren seçeneklerdir. Bu seçenekler öntanımlı olarak - etkin değildir. Bu modüllere ihtiyacınız olup olmadığı konusunda bir - fikriniz yoksa bu bölümü atlayabilirsiniz.

    +

    MPM'ler devingen yükleme için DSO olarak derlenebileceği gibi + sunucuyla duruk olarak da ilintilenebilir ve bunlar aşağıdaki + seçeneklerle etkin kılınır:

    - -
    --enable-bucketeer
    -
    mod_bucketeer modülü tarafından sağlanan veri - kümelerine müdahale süzgeci etkin kılınır.
    - - -
    --enable-case-filter
    -
    mod_case_filter modülünün sağladığı çıktıda büyük - harfe dönüşüm süzgeci örneği etkin kılınır.
    - - -
    --enable-case-filter-in
    -
    mod_case_filter_in modülünün sağladığı girdide büyük - harfe dönüşüm süzgeci örneği etkin kılınır.
    - -
    --enable-echo
    -
    mod_echo modülünün sağladığı ECHO sunucusu etkin - kılınır.
    +
    --with-mpm=MPM
    +
    +

    Sunucu için öntanımlı MPM'i seçer. MPM'ler DSO modülleri olarak + derleniyorsa (bak --enable-mpms-shared), bu seçenek + öntanımlı yapılandırma dosyasında yüklenecek MPM'i seçer. Aksi + takdirde, sunucuyla duruk olarak ilintilenecek, kullanılabilir tek + MPM'i seçer.

    + +

    Bu seçenek belirtilmezse, işletim sisteminiz için + öntanımlı olan MPM seçilir.

    +
    -
    --enable-example
    -
    Örnek ve demo modülü mod_example etkin - kılınır.
    +
    --enable-mpms-shared=MPM-LISTESİ
    +
    +

    MPM'leri devingen paylaşımlı modül olarak etkinleştirir. + LoadModule yönergesi + kullanılarak bu modüllerden biri devingen olarak yüklenmelidir.

    - -
    --enable-optional-fn-export
    -
    mod_optional_fn_export modülünün sağladığı seçimlik - işlev ihraç örneği etkin kılınır.
    +

    MPM-LISTESİ MPM'lerin aralarına boşluk bırakılarak ve + tamamı tek tırnaklarla sarmalanarak oluşturulmuş bir listesidir. + Örnek:

    - -
    --enable-optional-fn-import
    -
    mod_optional_fn_import modülünün sağladığı seçimlik - işlev ithal örneği etkin kılınır.
    +

    + --enable-mpms-shared='prefork worker' +

    - -
    --enable-optional-hook-export
    -
    mod_optional_hook_export modülünün sağladığı seçimlik - kanca işlev ihraç örneği etkin kılınır.
    +

    Ek olarak, kullandığınız platformda devingen yüklemeyi destekleyen + ve DSO modülü olarak derlenmiş tüm modülleri seçmek için + all anahtar sözcüğünü de kullanabilirsiniz. Örnek:

    - -
    --enable-optional-hook-import
    -
    mod_optional_hook_import modülünün sağladığı seçimlik - kanca işlev ithal örneği etkin kılınır.
    -
    +

    + --enable-mpms-shared=all +

    + + -

    MPM'ler ve üçüncü parti modüller

    -

    Gereken çok süreçlilik modüllerini ve üçüncü parti modülleri etkin - kılmak için şu seçenekler kullanılır:

    +

    Üçüncü parti modüller

    +

    Üçüncü parti modülleri etkin kılmak için şu seçenekler kullanılır:

    --with-module=modül-türü:modül-dosyası[,modül-türü:modül-dosyası]
    @@ -682,13 +409,6 @@ isterseniz apxs programını kullanınız.

    - -
    --with-mpm=MPM
    -
    Sunucu süreç modeli seçilir. Bu seçenekte çok süreçlilik modüllerinden sadece biri - belirtilebilir. Bu seçenek kullanılmadığı takdirde işletim - sisteminiz için öntanımlı MPM - etkin olur. Bu seçenekte belirtilebilecek MPM isimleri: - prefork ve worker.
    @@ -696,7 +416,7 @@
    --enable-maintainer-mode
    Hata ayıklama iletileri ve derleme sırasındaki uyarıların - gösterilmesi etkin kılınır.
    + gösterilmesi etkin kılınır ve derlenmiş tüm modüller yüklenir.
    --enable-mods-shared=modül-listesi
    @@ -712,38 +432,49 @@ --enable-mods-shared='headers rewrite dav'

    -

    modül-listesi yerine all ve - most anahtar sözcükleri de belirtilebilir. - Örneğin,

    +

    modül-listesi yerine + reallyall, all, most ve + few anahtar sözcükleri de belirtilebilir. Örneğin,

    --enable-mods-shared=most

    -

    seçeneği ile çoğu modül DSO modülü olarak derlenecektir.

    - -

    Yetersizlikler: - --enable-mods-shared=all aslında bütün modüllerin - derlenmesini sağlamaz. Tüm modülleri derlemek için şunu - yapabilirsiniz:

    +

    seçeneği ile çoğu modül DSO modülü olarak derlenir,

    - ./configure \
    - - --with-ldap \
    - --enable-mods-shared="all ssl ldap cache proxy authn_alias - file_cache authnz_ldap charset_lite dav_lock cache_disk" -
    + --enable-mods-shared=few

    - -
    --enable-modules=modül-listesi
    +

    seçeneği ile sadece en temel modüller derlenir.

    + +

    most öntanımlıdır.

    + +

    Seçilen modüller için LoadModule yönergeleri ana yapılandırma dosyasında + kendiliğinden üretilir. Öntanımlı olarak, --enable-foo + yapılandıma seçeneği ile açıkça seçilen modüller ve gerekli olanlar + dışında kalan LoadModule yönergeleri açıklama haline + getirilir. Yüklü modülleri httpd.conf dosyasındaki + LoadModule yönergelerini + etkin kılarak veya açıklama haline getirerek değiştirebilirsiniz. + LoadModule yönergelerine ek + olarak, derlenmiş tüm modüller + --enable-load-all-modules yapılandırma seçeneği ile de + etkinleştirilebilir.

    + +
    --enable-mods-static=modül-listesi
    Bu seçenek modülleri devingen değil de durağan ilintilemek dışında --enable-mods-shared seçeneğine benzer. Yani bu modüller httpd çalıştırılır çalıştırılmaz etkin olurlar. Yüklenmeleri için LoadModule yönergesine ihtiyaçları yoktur.
    +
    --enable-modules=MODULE-LIST
    +
    Bu seçenek --enable-mods-shared gibi davranır ve ek + olarak belirtilen modülleri devingen olarak ilintiler.Özel + none anahtar sözcüğü tüm modüllerin derlenmesini iptal + eder.
    +
    --enable-v4-mapped
    IPv6 soketlierinin IPv4 bağlantılar üzerinde kullanılması mümkün olur.
    @@ -1011,9 +742,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/configure.xml b/docs/manual/programs/configure.xml index a762516fdf7..f9821d7afae 100644 --- a/docs/manual/programs/configure.xml +++ b/docs/manual/programs/configure.xml @@ -189,7 +189,7 @@
    --libexecdir=DIR
    Install the program executables (i.e., shared modules) in DIR. By default libexecdir is set to - EPREFIX/libexec.
    + EPREFIX/modules.
    --localstatedir=DIR
    Install modifiable single-machine data in DIR. @@ -290,10 +290,10 @@
    Choosing modules to compile

    Most modules are compiled by default and have to be disabled - explicitly or by using the keywords few or - none (see --enable-modules, - --enable-mods-shared and --enable-mods-static - below for further explanation) to be removed.

    + explicitly or by using the keyword few + (see --enable-modules, --enable-mods-shared + and --enable-mods-static below for further explanation) + or --enable-modules=none to be removed as a group.

    Other modules are not compiled by default and have to be enabled explicitly or by using the keywords all or @@ -302,8 +302,8 @@

    To find out which modules are compiled by default, run ./configure -h or ./configure --help and look under Optional Features. Suppose you - are interested in mod_example1 and - mod_example2, and you + are interested in mod_example1 and + mod_example2, and you see this:

    Optional Features:
    @@ -388,7 +388,8 @@
         
    Cumulative and other options
    --enable-maintainer-mode
    -
    Turn on debugging and compile time warnings.
    +
    Turn on debugging and compile time warnings + and load all compiled modules.
    --enable-mods-shared=MODULE-LIST
    @@ -403,7 +404,7 @@ --enable-mods-shared='headers rewrite dav'

    Additionally you can use the special keywords reallyall, - all, most, few and none. + all, most and few. For example,

    --enable-mods-shared=most @@ -427,16 +428,6 @@ LoadModule directives for all built modules can be activated via the configure option --enable-load-all-modules.

    -

    Caveat: - --enable-mods-shared=all does not actually build all - modules. To build all modules then, one might use:

    - - ./configure \
    - - --with-ldap \
    - --enable-mods-shared="all ssl ldap cache proxy authn_alias file_cache authnz_ldap charset_lite dav_lock cache_disk" -
    -
    --enable-mods-static=MODULE-LIST
    diff --git a/docs/manual/programs/configure.xml.fr b/docs/manual/programs/configure.xml.fr new file mode 100644 index 00000000000..d27f20f8c08 --- /dev/null +++ b/docs/manual/programs/configure.xml.fr @@ -0,0 +1,777 @@ + + + + + + + + + + +Programmes + + configure - Configure l'arborescence des sources + + +

    Le script configure permet de configurer + l'arborescence des sources afin de compiler et installer le serveur + HTTP Apache sur votre plate-forme spécifique. De nombreuses options + vous permettent de compiler un serveur correspondant à vos propres + besoins.

    + +

    Ce script, situé dans le répertoire racine de la distribution des + sources, ne concerne que la compilation sur les systèmes Unix et + apparentés. Pour les autres plates-formes, voir la documentation spécifique de ces + dernières.

    +
    + +Compilation et installation + +
    Résumé +

    Vous devez appeler le script configure depuis le + répertoire racine de la distribution.

    + +

    ./configure [OPTION]... + [VARIABLE=VALEUR]...

    + +

    Pour définir des variables d'environnement (par exemple + CC,CFLAGS, etc...), utilisez la clause + VARIABLE=VALEUR. Voir ci-dessous pour la description de quelques variables + usuelles.

    +
    + +
    Options + + +
    Options de Configuration + +

    Les options suivantes affectent le comportement du script + configure.

    + +
    +
    -C
    +
    --config-cache
    +
    C'est un alias pour --cache-file=config.cache
    + +
    --cache-file=FICHIER
    +
    Les résultats des tests seront mis en cache dans le fichier + FICHIER. Cette option est désactivée par défaut.
    + +
    -h
    +
    --help [short|recursive]
    +
    Affichage de l'aide et sortie du script. Avec l'argument + short, seules les options spécifiques à ce paquet + seront affichées. L'argument recursive permet + d'afficher l'aide de tous les paquets inclus.
    + +
    -n
    +
    --no-create
    +
    Le script configure s'exécute normalement, mais + ne crée pas les fichiers résultants. Ceci permet de vérifier les + résultats des tests avant de générer les fichiers makefile pour la + compilation.
    + +
    -q
    +
    --quiet
    +
    Les messages checking ... ne sont pas affichés au + cours du processus de configuration.
    + +
    --srcdir=DIR
    +
    Définit le répertoire DIR comme répertoire des + fichiers sources. Par défaut, c'est le répertoire où se situe le + script configure, ou le répertoire parent.
    + +
    --silent
    +
    Identique à --quiet
    + +
    -V
    +
    --version
    +
    Affichage des informations de copyright et sortie du + script.
    +
    +
    + +
    Répertoires + d'installation + +

    Ces options permettent de spécifier le répertoire d'installation. + L'arborescence de l'installation dépend de l'organisation (layout) + sélectionnée.

    + +
    +
    --prefix=PREFIX
    +
    Installe les fichiers indépendants de l'architecture dans + PREFIX. Par défaut, le répertoire d'installation est + /usr/local/apache2.
    + +
    --exec-prefix=EPREFIX
    +
    Installe les fichiers dépendants de l'architecture dans + EPREFIX. La valeur par défaut de cette option + correspond à la valeur de la variable + PREFIX.
    +
    + +

    Par défaut, make install va installer tous les + fichiers dans /usr/local/apache2/bin, + /usr/local/apache2/lib, etc... Vous pouvez cependant + spécifier un préfixe d'installation autre que + /usr/local/apache2 en utilisant l'option + --prefix (par exemple --prefix=$HOME).

    + +
    Spécifier une organisation (layout) des + répertoires +
    +
    --enable-layout=LAYOUT
    +
    Configure le code source et les scripts de compilation de + façon à ce que l'arborescence d'installation adopte + l'organisation LAYOUT. Ceci vous permet de spécifier + des chemins séparés pour chaque type de fichier de + l'installation du serveur HTTP Apache. Le fichier + config.layout contient de nombreux exemples de + configurations, et vous pouvez créer vos propres configurations + personnalisées en vous basant sur ces exemples. Les différentes + organisations contenues dans ce fichier sont enregistrées sous + forme de sections <Layout + FOO>...</Layout> et référencées dans ce cas par + le nom FOO. L'organisation par défaut + est Apache.
    +
    +
    + +
    Configuration avancée des + répertoires d'installation + +

    Pour une définition plus précise des répertoires + d'installation, utilisez les options ci-dessous. Notez que les + répertoires par défaut sont définis par autoconf, et + que leurs valeurs sont écrasées par les valeurs correspondantes + définies lors du choix de l'organisation des répertoires + (layout).

    + +
    +
    --bindir=DIR
    +
    Installe les exécutables utilisateur dans DIR. + Les exécutables utilisateur sont des programmes support comme + htpasswd, dbmmanage, + etc..., et destinés aux administrateurs du site. Par défaut, + DIR est défini à + EPREFIX/bin.
    + +
    --datadir=DIR
    +
    Installe les données non modifiables indépendantes de + l'architecture dans DIR. Par défaut, + datadir est défini à + PREFIX/share. Cette option est fournie + par autoconf et actuellement inutilisée.
    + +
    --includedir=DIR
    +
    Installe les fichiers d'en-têtes C dans DIR. Par + défaut, includedir est défini à + EPREFIX/include.
    + +
    --infodir=DIR
    +
    Installe la documentation info dans DIR. Par + défaut, infodir est défini à + PREFIX/info. Cette option est + actuellement inutilisée.
    + +
    --libdir=DIR
    +
    Installe les fichiers objet des bibliothèques dans + DIR. Par défaut, libdir est défini à + EPREFIX/lib.
    + +
    --libexecdir=DIR
    +
    Installe les exécutables du programme (autrement dit les + modules partagés) dans DIR. Par défaut, + libexecdir est défini à + EPREFIX/modules.
    + +
    --localstatedir=DIR
    +
    Installe les données temporaires modifiables spécifiques à + la machine dans + DIR. Par défaut, localstatedir est + défini à PREFIX/var. Cette option est + fournie par autoconf et est actuellement + inutilisée.
    + +
    --mandir=DIR
    +
    Installe les pages de manuel dans DIR. Par + défaut, mandir est défini à + EPREFIX/man.
    + +
    --oldincludedir=DIR
    +
    Installe les fichiers d'en-têtes C pour les programmes + autres que gcc dans DIR. Par défaut, + oldincludedir est défini à + /usr/include. Cette option est fournie par + autoconf et est actuellement inutilisée.
    + +
    --sbindir=DIR
    +
    Installe les exécutables de l'administrateur système dans + DIR. Ce sont les programmes du serveur comme + httpd, apachectl, + suexec, etc..., qui sont nécessaires à + l'exécution du serveur HTTP Apache. Par défaut, + sbindir est défini à + EPREFIX/sbin.
    + +
    --sharedstatedir=DIR
    +
    Installe les données modifiables indépendantes de + l'architecture dans DIR. Par défaut, + sharedstatedir est défini à + PREFIX/com. Cette option est fournie par + autoconf et est actuellement inutilisée.
    + +
    --sysconfdir=DIR
    +
    Installe les données non modifiables spécifiques à la + machine comme les fichiers de configuration du serveur + httpd.conf, mime.types, etc... dans + DIR. Par défaut, sysconfdir est défini à + PREFIX/conf.
    +
    +
    +
    + +
    Types de systèmes + +

    Ces options sont utilisées pour la cross-compilation du serveur + HTTP Apache afin de pouvoir l'utiliser sur un autre système. Dans le + cas général où la compilation et l'exécution du serveur ont lieu sur + le même système, ces options ne sont pas utilisées.

    + +
    +
    --build=BUILD
    +
    Définit le type du système sur lequel les outils sont + compilés. Par défaut, il s'agit de la chaîne renvoyée par le + script config.guess.
    + +
    --host=HOST
    +
    Définit le type du système sur lequel le serveur s'exécutera. + Par défaut, HOST est identique à BUILD.
    + +
    --target=TARGET
    +
    Configure pour construire des compilateurs pour le type de + système TARGET. Par défaut, TARGET est + identique à HOST. Cette option est fournie par + autoconf et n'est pas requise par le serveur HTTP + Apache.
    +
    +
    + +
    Fonctionnalités + optionnelles + +

    Ces options vous permettent de configurer avec précision les + fonctionnalités de votre futur serveur HTTP.

    + +
    Syntaxe générale +

    D'une manière générale, vous pouvez utiliser la syntaxe + suivante pour activer ou désactiver une fonctionnalité :

    + +
    +
    --disable-FONCTIONNALITE
    +
    Désactive la fonctionnalité FONCTIONNALITE. + Identique à + --enable-FONCTIONNALITE=no.
    + +
    --enable-FONCTIONNALITE[=ARG]
    +
    Active la fonctionnalité FONCTIONNALITE. La + valeur par défaut de ARG est yes.
    + +
    --enable-MODULE=shared
    +
    Le module spécifié sera compilé en tant que module DSO. Par + défaut, les modules activés sont liés dynamiquement.
    + +
    --enable-MODULE=static
    +
    Le module correspondant sera lié statiquement.
    +
    + + Note + Si vous spécifiez --enable-foo, et si + foo n'existe pas, configure ne le + signalera pas ; vous devez donc prendre soin de taper les + options correctement. + +
    + +
    Choix des modules à compiler +

    La plupart des modules sont compilés par défaut et ils doivent être + désactivés de manière explicite ou via le mots-clé few (voir + ci-dessous --enable-modules, + --enable-mods-shared et --enable-mods-static + pour une explication plus détaillée), ou + --enable-modules=none pour les désactiver tous.

    + +

    Par défaut, les autres modules ne sont pas compilés et doivent + être activés explicitement, ou en utilisant les mots-clés + all ou reallyall pour être disponibles.

    + +

    Pour déterminer quels modules sont compilés par défaut, + exécutez la commande ./configure -h ou + ./configure --help, et consultez les Optional + Features. Par exemple, supposons que vous soyez intéressé + par les modules mod_example1 et + mod_example2, et que vous voyiez ceci :

    + +
    Optional Features:
    +  ...
    +  --disable-example1     example module 1
    +  --enable-example2      example module 2
    +  ...
    + +

    Le module mod_example1 est ici activé par + défaut, et vous devez spécifier --disable-example1 + si vous ne voulez pas le compiler. Par contre, le module + mod_example2 est désactivé par défaut, et vous + devez spécifier --enable-example2 si vous voulez le + compiler.

    + +
    + +
    Modules Multi-Processus +

    Les Modules Multi-Processus, ou MPMs, + constituent le coeur du serveur. Un seul MPM doit être actif pour + que le serveur puisse fonctionner. Vous trouverez la liste des + MPMs disponibles à module index page.

    + +

    Les MPMs peuvent être compilés en tant que modules DSO pour un + chargement dynamique, ou liés statiquement avec le serveur, et + sont activés via les options suivantes :

    + +
    +
    --with-mpm=MPM
    +
    +

    Sélectionne le MPM par défaut pour votre serveur. Si les + MPMs sont compilés en tant que modules DSO (voir + --enable-mpms-shared), cette option spécifie le + MPM qui sera chargé par défaut selon le fichier de + configuration. Dans le cas contraire, cette option spécifie le + seul MPM disponible qui sera lié statiquement avec le + serveur.

    +

    Si cette option est omise, c'est le MPM par défaut pour votre + système d'exploitation qui sera utilisé.

    +
    + +
    --enable-mpms-shared=Liste de MPM
    +
    +

    Définit une liste de MPMs à compiler en tant que modules + dynamiquement partagés (DSO). Un de ces modules doit être + chargé dynamiquement via la directive LoadModule.

    +

    Liste de MPM est une liste, entourée + d'apostrophes, de noms de MPM séparés par des espaces. Par + exemple :

    + + --enable-mpms-shared='prefork worker' + +

    Vous pouvez aussi utiliser le mot-clé all, ce + qui aura pour effet de spécifier tous les MPMs qui supportent + le chargement dynamique sur la plate-forme considérée, et de + les compiler en tant que modules DSO. Par exemple :

    + + --enable-mpms-shared=all + +
    +
    +
    + +
    Modules tiers +

    Pour ajouter des modules tiers, utilisez les options suivantes + :

    + +
    +
    --with-module=type-module:fichier-module[, + type-module:fichier-module]
    +

    Ajoute un ou plusieurs modules tiers à la liste des + modules liés statiquement. Le fichier source du module + fichier-module sera recherché dans le sous-répertoire + type-module de l'arborescence des sources de votre + serveur HTTP Apache. S'il ne l'y trouve pas, + configure considèrera fichier-module + comme un chemin de fichier absolu et essaiera de copier le + fichier source dans le sous-répertoire type-module. + Si ce sous-répertoire n'existe pas, il sera créé et un fichier + Makefile.in standard y sera enregistré.

    +

    Cette option est conçue pour ajouter de petits modules + externes ne comportant qu'un seul fichier source. Pour des + modules plus complexes, vous devrez lire la documentation du + fournisseur du module.

    + Note + Si vous voulez compiler un module DSO (lié de manière + dynamique au lieu de statique), utilisez le programme + apxs. +
    + +
    +
    + +
    Options cumulatives et autres + options +
    +
    --enable-maintainer-mode
    +
    Active les avertissements de débogage et de compilation et + charge tous les modules compilés.
    + +
    --enable-mods-shared=LISTE-MODULES
    +
    +

    Définit une liste de modules à activer et à compiler en + tant que modules dynamiques partagés. Cela signifie que ces + modules doivent être chargés dynamiquement en utilisant la + directive LoadModule.

    +

    LISTE-MODULES est une liste, entourée + d'apostrophes, de noms de modules + séparés par des espaces. Les noms + des modules sont spécifiés sans le préfixe mod_. + Par exemple :

    + + --enable-mods-shared='headers rewrite dav' + +

    Vous pouvez aussi utiliser les mots-clés reallyall, + all, most et few. Par + exemple,

    + + --enable-mods-shared=most + +

    va compiler la plupart des modules en tant que modules DSO,

    + + --enable-mods-shared=few + +

    ne compilera qu'un jeu de modules de base.

    +

    Le jeu par défaut correspond au mot-clé most.

    + +

    Les directives LoadModule correspondant aux + différents modules choisis sont automatiquement générées dans + le fichier de configuration principal. Par défaut, toutes ces + directives sont mises en commentaire, sauf pour les modules + requis ou ceux explicitement sélectionnés par un argument + --enable-nom-module du script configure. Vous + pouvez modifier le jeu de modules chargé en activant ou + désactivant les directives LoadModule dans le fichier + httpd.conf. En outre, les directives LoadModule peuvent être activées + pour tous les modules compilés via l'option + --enable-load-all-modules du script configure.

    + +
    + +
    --enable-mods-static=MODULE-LIST
    +
    Cette option produit le même effet que l'option + --enable-mods-shared, à l'exception que les modules + seront liés statiquement. Cela signifie que les modules + spécifiés seront toujours disponibles au cours du fonctionnement + de httpd. Ils n'ont pas besoin d'être chargés + via la directive LoadModule.
    + +
    --enable-modules=MODULE-LIST
    +
    Cette option se comporte comme + --enable-mods-shared, et va aussi lier les modules + concernés dynamiquement. Le mot-clé spécial none + désactive la compilation de tous les modules.
    + +
    --enable-v4-mapped
    +
    Permet aux sockets IPv6 de traiter les connexions IPv4.
    + +
    --with-port=PORT
    +
    Permet de définir le port que le programme + httpd va écouter. Ce numéro de port est + utilisé lors de la génération du fichier de configuration + httpd.conf. Sa valeur par défaut est 80.
    + +
    --with-program-name
    +
    Permet de définir un nom d'exécutable alternatif. Le nom par + défaut est httpd.
    +
    +
    +
    + +
    Paquets optionnels +

    Ces options permettent de définir des paquets optionnels.

    + +
    Syntaxe générale +

    D'une manière générale, vous pouvez utiliser la syntaxe + suivante pour définir un paquet optionnel :

    + +
    +
    --with-PAQUET[=ARG]
    +
    Utilise le paquet PAQUET. La valeur par défaut de + ARG est yes.
    + +
    --without-PAQUET
    +
    N'utilise pas le paquet PAQUET. Cette option est + identique à --with-PAQUET=no. Elle est + fournie par autoconf mais n'est pas très utile pour + le serveur HTTP Apache.
    +
    +
    + + + +
    Paquets spécifiques +
    +
    --with-apr=REP|FICHIER
    +
    La Bibliothèque pour la portabilité + d'Apache ou + Apache Portable Runtime (APR) fait partie de la + distribution des sources de httpd et est compilée + automatiquement avec le serveur HTTP. Si vous voulez utiliser + une APR déjà installée à la place, vous devez indiquer à + configure le chemin du script + apr-config. Vous pouvez spécifier le chemin absolu + et le nom ou le répertoire d'installation de l'APR. + apr-config doit se trouver dans ce répertoire ou + dans le sous-repertoire bin.
    + +
    --with-apr-util=REP|FICHIER
    +
    Les utilitaires pour la Bibliothèque pour la portabilité + d'Apache ou Apache Portable Runtime Utilities (APU) font partie de la + distribution des sources de httpd et sont compilés + automatiquement avec le serveur HTTP. Si vous voulez utiliser + des APU déjà installés à la place, vous devez indiquer à + configure le chemin du script + apu-config. Vous pouvez spécifier le chemin absolu + et le nom ou le répertoire d'installation des APU. + apu-config doit se trouver dans ce répertoire ou + dans le sous-repertoire bin.
    + +
    --with-ssl=REP
    +
    Si mod_ssl a été activé, + configure recherche une installation d'OpenSSL. + Vous pouvez définir le répertoire de la boîte à outils SSL/TLS à + la place.
    + +
    --with-z=REP
    +
    configure recherche automatiquement une + bibliothèque zlib installée si la configuration de + vos sources en nécessite une (par exemple lorsque + mod_deflate est activé). Vous pouvez définir le + répertoire de la bibliothèque de compression à la place.
    +
    + +

    De nombreuses fonctionnalités du serveur HTTP Apache, y compris + les directives RewriteMap DBM de + mod_rewrite et mod_authn_dbm + utilisent une base de données simple + de la forme clé/valeur pour une recherche rapide d'informations. + SDBM, inclus dans les APU, est donc toujours disponible. Si vous + souhaitez utiliser d'autres types de bases de données, utilisez + les options suivantes afin de les activer :

    + +
    +
    --with-gdbm[=chemin]
    +
    Si aucun chemin n'est spécifié, + configure va rechercher les fichiers d'en-têtes et + les bibliothèques d'une installation DBM GNU dans les chemins + standards. Avec un chemin explicite, + configure recherchera les fichiers concernés dans + chemin/lib et + chemin/include. En fait, + chemin permet de spécifier plusieurs chemins + d'en-têtes et bibliothèques spécifiques en les séparant par des + caractères ':'.
    + +
    --with-ndbm[=chemin]
    +
    Identique à --with-gdbm, mais recherche une + installation de New DBM.
    + +
    --with-berkeley-db[=chemin]
    +
    Identique à --with-gdbm, mais recherche une + installation de Berkeley DB.
    +
    + + Note +

    Les options DBM sont fournies par les APU et passées en + paramètres à son script de configuration. Elles sont inutiles + lorsqu'on utilise des APU déjà installés définis par + --with-apr-util.

    +

    Vous pouvez utiliser plusieurs implémentations DBM avec votre + serveur HTTP. Le type DBM approprié sera choisi au cours de la + configuration de l'exécution à chaque démarrage.

    +
    +
    +
    + +
    Options pour les programmes de + support +
    +
    --enable-static-support
    +
    Permet de compiler une version des binaires de support liés + statiquement. En d'autres termes, la compilation produira un + exécutable indépendant comportant toutes les bibliothèques + nécessaires. Sans cette option, les binaires de supports sont liés + dynamiquement.
    + +
    --enable-suexec
    +
    Utilisez cette option pour activer la programme + suexec, qui vous permet de définir un uid et un + gid pour les processus lancés. N'utilisez cette option que + si vous maîtrisez toutes les implications en matière de sécurité + de l'exécution d'un binaire suid sur votre serveur. + D'autres options permettent de configurer + suexec comme décrit ci-dessous.
    +
    + +

    Il est possible de lier statiquement le binaire d'un programme + support particulier en utilisant les options suivantes :

    + +
    +
    --enable-static-ab
    +
    Compile une version liée statiquement du programme + ab.
    + + +
    --enable-static-checkgid
    +
    >Compile une version liée statiquement du programme + checkgid.
    + +
    --enable-static-htdbm
    +
    Compile une version liée statiquement du programme + htdbm.
    + +
    --enable-static-htdigest
    +
    Compile une version liée statiquement du programme + htdigest.
    + +
    --enable-static-htpasswd
    +
    Compile une version liée statiquement du programme + htpasswd.
    + +
    --enable-static-logresolve
    +
    Compile une version liée statiquement du programme + logresolve.
    + +
    --enable-static-rotatelogs
    +
    Compile une version liée statiquement du programme + rotatelogs.
    +
    + +
    + Options de configuration de <code>suexec</code> +

    Les options suivantes permettent de définir avec précision le + comportement du programme suexec. Voir Configurer et installer suEXEC + pour plus de détails.

    + +
    +
    --with-suexec-bin
    +
    Définit le chemin du binaire suexec. La + valeur par défaut est --sbindir (voir Définition précise des répertoires + d'installation).
    + +
    --with-suexec-caller
    +
    Définit l'utilisateur qui a l'autorisation d'appeler + suexec. Il est en général souhaitable que ce + soit le même que celui sous lequel httpd + s'exécute.
    + +
    --with-suexec-docroot
    +
    Définit l'arborescence des répertoires dans laquelle le + lancement des exécutables via suexec est + autorisé. La valeur par défaut est + --datadir/htdocs.
    + +
    --with-suexec-gidmin
    +
    Définit la valeur de GID la plus basse autorisée comme + valeur cible pour suexec. La valeur par + défaut est 100.
    + +
    --with-suexec-logfile
    +
    Définit le nom du fichier journal de + suexec. La valeur par défaut est + --logfiledir/suexec_log.
    + +
    --with-suexec-safepath
    +
    Définit la valeur de la variable d'environnement + PATH pour les processus lancés par + suexec. La valeur par défaut est + /usr/local/bin:/usr/bin:/bin.
    + +
    --with-suexec-userdir
    +
    Définit le sous-répertoire du répertoire utilisateur qui + contient tous les exécutables pouvant être lancés par + suexec. Cette option est nécessaire si vous + souhaitez utiliser suexec avec des + répertoires utilisateurs (définis via + mod_userdir). La valeur par défaut est + public_html.
    + +
    --with-suexec-uidmin
    +
    Définit la valeur d'UID la plus basse autorisée comme + valeur cible pour suexec. La valeur par + défaut est 100.
    + +
    --with-suexec-umask
    +
    Définit le masque de permissions umask pour les + processus lancés par suexec. Il correspond + par défaut au masque défini par la configuration de votre + système.
    +
    +
    +
    +
    + +
    Variables d'environnement +

    Certaines variables d'environnement permettent de modifier les + choix effectués par configure, ou d'aider ce dernier à + trouver les bibliothèques et programmes possédant des noms et chemins + non standards.

    + + +
    +
    CC
    +
    Définit la commande du compilateur C à utiliser pour la + compilation.
    + +
    CFLAGS
    +
    Définit les paramètres du compilateur C que vous voulez utiliser + pour la compilation.
    + +
    CPP
    +
    Définit la commande du préprocesseur C à utiliser.
    + +
    CPPFLAGS
    +
    Définit les paramètres du préprocesseur C/C++, par exemple + -Irépertoire-include, si certains de vos + fichiers d'en-têtes se trouvent dans le répertoire non standard + répertoire-include.
    + +
    LDFLAGS
    +
    Définit les paramètres de l'éditeur de liens, par exemple + -Lrépertoire-lib, si certaines de vos + bibliothèques se trouvent dans le répertoire non standard + répertoire-lib.
    +
    +
    +
    diff --git a/docs/manual/programs/configure.xml.ko b/docs/manual/programs/configure.xml.ko index f46a45d58fa..3b20105bb5d 100644 --- a/docs/manual/programs/configure.xml.ko +++ b/docs/manual/programs/configure.xml.ko @@ -1,7 +1,7 @@ - + + -
    Öntanımlı olarak etkin modüller -

    Bazı modüller öntanımlı olarak derlendiğinden iptal edilmek istenirse - bunun açıkça belirtilmesi gerekir. Aşağıdaki seçenekler bu tür - modüllerin diğerlerinden bağımsız olarak derlenmemesini sağlar.

    - -
    -
    --disable-actions
    -
    mod_actions modülü tarafından sağlanan ve - isteklerle tetiklenen eylemleri iptal eder.
    - -
    --disable-alias
    -
    mod_alias modülü tarafından sağlanan, isteklerin - farklı dosya sistemi bölümleriyle eşlenmesi iptal edilir.
    - -
    --disable-asis
    -
    mod_asis modülü tarafından sağlanan kendinden - HTTP başlıklı dosya türü desteğini iptal eder.
    - -
    --disable-auth
    -
    mod_authn_file modülü tarafından sağlanan kullanıcıya - dayalı erişim denetimi iptal edilir. Bu modül, kullanıcı isminin ve - parolasının salt metin dosyalarda saklandığı Temel HTTP Kimlik - Doğrulaması için kullanılır.
    - -
    --disable-autoindex
    -
    mod_autoindex modülü tarafından sağlanan dizin - içerik listelemesini iptal eder.
    - -
    --disable-access
    -
    mod_authz_host modülü tarafından sağlanan konağa - dayalı erişim denetimi iptal edilir.
    - -
    --disable-cgi
    -
    CGI betiklerine destek sağlayan mod_cgi, çok - evreli olmayan MPM kullanıldığında öntanımlı olarak etkin kılınır. - CGI desteğini iptal etmek için bu seçeneği kullanın.
    - -
    --disable-cgid
    -
    worker çok evreli MPM’i kullanılırken CGI - betikleri için desteği öntanımlı olarak mod_cgid - modülü sağlar. CGI desteğini iptal etmek için bu seçeneği - kullanın.
    - -
    --disable-charset-lite
    -
    mod_charset_lite modülü tarafından sağlanan - karakter kümesi dönüşümleri iptal edilir. Bu modül sadece EBCDIC - sistemlerinde öntanımlı olarak kurulur.
    - -
    --disable-dir
    -
    mod_dir modülü tarafından sağlanan dizin - isteklerine destek iptal edilir.
    - -
    --disable-env
    -
    mod_env modülü tarafından sağlanan ortam - değişkenlerine destek iptal edilir.
    - - -
    --disable-http
    -
    HTTP protokolüne destek iptal edilir. http modülü - en temel modüldür ve sunucunun bir HTTP sunucusu olarak çalışmasını - sağlar. Sadece, HTTP protokolü yerine başka bir protokol kullanmak - isterseniz bu seçeneği kullunın. Ne yaptığınızdan gerçekten - emin olamıyorsanız bu desteği asla iptal etmeyin. -
    - Dikkat: Bu modül ana kodla daima durağan ilintilidir.
    - -
    --disable-imagemap
    -
    mod_imagemap modülü tarafından sağlanan resim - eşlemlerine destek iptal edilir.
    - -
    --disable-include
    -
    mod_include modülü tarafından sağlanan SSI - sayfaları desteği iptal edilir.
    - -
    --disable-log-config
    -
    mod_log_config modülü tarafından sağlanan günlük - kayıtları yapılandırması iptal edilir. Bu modül olmaksızın sunucu - yapılan isteklerin günlük kayıtlarını tutamaz.
    - -
    --disable-mime
    -
    mod_mime modülü istenen dosyanın uzantısına - bakarak dosya içeriğinin (MIME - türü, dil, karakter kümesi ve kodlama) nasıl ele - alınacağını belirler. Bu modülün iptal edilmesi önerilmez.
    - -
    --disable-negotiation
    -
    mod_negotiation modülü tarafından sağlanan içerik - dili uzlaşımı iptal edilir.
    - -
    --disable-setenvif
    -
    mod_setenvif modülü tarafından sağlanan - başlıklarla ilgili ortam değişkenlerine dayalı destek iptal - edilir.
    - -
    --disable-status
    -
    mod_status modülü tarafından sağlanan süreç/evre - izleme iptal edilir.
    - -
    --disable-userdir
    -
    mod_userdir modülü tarafından sağlanan, - isteklerin kullanıcıya özel dizinlere eşlenmesi iptal edilir.
    -
    +
    Derlenecek modüllerin seçimi +

    Modüllerin çoğu öntanımlı olarak derlenir ve ya açıkça iptal edilmek + ya da few anahtar sözcüğü + kullanılarak kaldırılmak zorunda kalınır (ayrıntılar için + --enable-modules, --enable-mods-shared ve + --enable-mods-static seçeneklerine bakın). Bir grubu + tamamen kaldırmak için --enable-modules=none gerekir.

    + +

    Öntanımlı olarak derlenmeyenler ise ya açıkça etkin kılınmak ya da + all veya reallyall anahtar sözcükleriyle + kullanılabilir yapılmak zorunda kalınır.

    + +

    Hangi modüllerin öntanımlı olarak derlendiğini öğrenmek için + ./configure -h veya ./configure --help + komutunu çalıştırın ve çıktıdaki Optional Features + bölümüne bakın. Örnek olarak, mod_example1 ve + mod_example2 modülleriyle ilgilendiğinizi + varsayalım:

    + +
    Optional Features:
    +  ...
    +  --disable-example1     example module 1
    +  --enable-example2      example module 2
    +  ...
    + +

    Burada, mod_example1 öntanımlı olarak etkindir ve + derlenmemesini istiyorsanız --disable-example1 + seçeneğini kullanmalısınız. mod_example2 ise öntanımlı + olarak derlenmemektedir ve derlenmesini istiyorsanız + --enable-example2 seçeneğini kullanmalısınız.

    -
    - Öntanımlı olarak etkin olmayan modüller +
    Çok Süreçlilik Modülleri +

    Çok Süreçlilik Modülleri veya MPM'ler + sunucunun temel davranışını belirler. Sunucuya yüklenebilecek azami MPM + sayısı birdir. Kullanılabilecek modüller modül + dizininde listelenmiştir.

    -

    Bazı modüller öntanımlı olarak derlendiği halde açıkça istenmedikçe - veya most ya da all anahtar sözcükleri - kullanılmadıkça etkin kılınmazlar (bu konu, aşağıda --enable-mods-shared - seçeneğinde daha ayrıntılı ele alınmıştır). Bu modülleri - etkinleştirmek için aşağıdaki seçenekleri kullanabilirsiniz.

    +

    MPM'ler devingen yükleme için DSO olarak derlenebileceği gibi + sunucuyla duruk olarak da ilintilenebilir ve bunlar aşağıdaki + seçeneklerle etkin kılınır:

    -
    --enable-authn-anon
    -
    mod_authn_anon modülünün sağladığı anonim - kullanıcı erişimi etkin kılınır.
    - -
    --enable-authn-dbm
    -
    mod_authn_dbm modülü kullanıcı isimlerinin ve - parolalarının DBM türü veritabanı dosyalarında saklandığı HTTP Temel - Kimlik Kanıtlaması için destek sağlar. Bu seçeneği bu modülü etkin - kılmak için kullanabilirsiniz.
    - -
    --enable-authz-dbm
    -
    mod_authz_dbm modülü kullanıcı isimlerinin ve - gruplarının DBM türü veritabanı dosyalarında saklandığı HTTP Temel - Kimlik Kanıtlaması için destek sağlar. Bu seçeneği bu modülü etkin - kılmak için kullanabilirsiniz.
    - -
    --enable-auth-digest
    -
    mod_auth_digest modülü tarafından sağlanan - RFC2617 Özet Kimlik Kanıtlaması etkin kılınır. Bu modül delilleri - salt metin dosyalarda saklar.
    - -
    --enable-authnz-ldap
    -
    mod_authnz_ldap modülü tarafından sağlanan LDAP’a - Dayalı Kimlik Kanıtlaması etkin kılınır.
    - -
    --enable-cache
    -
    mod_cache modülü tarafından sağlanan devingen - dosya önbelleklemesi etkin kılınır. Bu deneysel modülün kullanımı, - aşırı yüklü sunucularda ya da önbellekli vekillerde ilginç sonuçlar - verebilir. Bunun yanında en azından bir saklama alanı yönetim modülü - (örn, mod_cache_disk) gerekebilir.
    - -
    --enable-cern-meta
    -
    mod_cern_meta modülü tarafından sağlanan CERN - türü temel veri dosyalarına destek etkin kılınır.
    - -
    --enable-charset-lite
    -
    mod_charset_lite modülü tarafından sağlanan - karakter kümesi dönüşümleri etkin kılınır. Bu modül sadece EBCDIC - sistemlerinde öntanımlı olarak etkindir. Diğer sistemlerde gerekirse - alenen etkin kılınması gerekir.
    - -
    --enable-dav
    -
    mod_dav modülü tarafından sağlanan WebDAV - protokolü desteği etkin kılınır. Dosya sistemi özkaynaklarına destek - için mod_dav_fs modülü de gerekir ve bu seçenekle o - da etkin kılınır.
    - Dikkat: mod_dav sadece http protokolü - modülü ile birlikte kullanılabilir.
    - -
    --enable-dav-fs
    -
    mod_dav_fs modülü tarafından sağlanan WebDAV - protokolünün dosya sistemi özkaynaklarına erişim desteği etkin - kılınır. Bu modül mod_dav modülü için destek - sağlar. Bu bakımdan, mod_dav modülünü de etkin - kılmak için --enable-dav seçeneğini de - kullanmalısınız.
    - -
    --enable-dav-lock
    -
    mod_dav_lock modülü tarafından sağlanan geri - destek modüllerine temel DAV kilitleme desteği etkin kılınır. Bu - modülün işlevsel olabilmesi için en azından mod_dav - modülünün etkin olması gerekir, dolayısıyla bu seçeneği - --enable-dav ile birlikte kullanmalısınız.
    - -
    --enable-deflate
    -
    mod_deflate modülü tarafından sağlanan - sıkıştırılmış aktarım kodlaması etkin kılınır.
    - -
    --enable-disk-cache
    -
    mod_cache_disk modülü tarafından sağlanan diskte - önbellekleme etkin kılınır.
    - -
    --enable-expires
    -
    mod_expires modülü tarafından sağlanan - Expires başlığıyla denetim etkin kılınır.
    - -
    --enable-ext-filter
    -
    mod_ext_filter modülü tarafından sağlanan harici - süzgeç desteği etkin kılınır.
    - -
    --enable-file-cache
    -
    mod_file_cache modülü tarafından sağlanan dosya - önbelleklemesi etkin kılınır.
    - -
    --enable-headers
    -
    mod_headers modülü tarafından sağlanan HTTP - başlıkları denetimi etkin kılınır.
    - -
    --enable-info
    -
    mod_info modülü tarafından sağlanan sunucu - bilgileri etkin kılınır.
    - -
    --enable-ldap
    -
    mod_ldap modülü tarafından sağlanan LDAP - önbelleklemesi ve bağlantı havuzu hizmetleri etkin kılınır.
    - -
    --enable-logio
    -
    mod_logio modülü tarafından sağlanan başlıklarda - bulunan girdi ve çıktı bayt sayılarının günlüklenmesi etkin - kılınır.
    - -
    --enable-mime-magic
    -
    mod_mime_magic modülü tarafından sağlanan - MIME türlerinin kendiliğinden - belirlenmesi desteği etkin kılınır.
    - -
    --enable-isapi
    -
    mod_isapi modülü tarafından sağlanan isapi - eklenti desteği etkin kılınır.
    - -
    --enable-proxy
    -
    mod_proxy modülü tarafından sağlanan - vekil/ağ-geçidi işlevselliği etkin kılınır. AJP13, - CONNECT, FTP, HTTP ve - dengeleyici vekil yetenekleri ayrı olarak - mod_proxy_ajp, mod_proxy_connect, - mod_proxy_ftp, mod_proxy_http ve - mod_proxy_balancer modülleri tarafından sağlanır. - Bu beş modül bu seçenekle kendiliğinden etkin olur.
    - -
    --enable-proxy-ajp
    -
    mod_proxy_ajp modülü tarafından sağlanan - AJP13 (Apache JServ Protokolü 1.3) için vekil desteği - etkin kılınır. Bu modül mod_proxy modülünün bir - eklentisidir, dolayısıyla bu seçeneği --enable-proxy - seçeneği ile birlikte kullanmalısınız.
    - -
    --enable-proxy-balancer
    -
    mod_proxy_balancer modülü tarafından sağlanan - AJP13, FTP ve HTTP - protokollerine yük dengeleme desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-proxy-connect
    -
    mod_proxy_connect modülü tarafından sağlanan - CONNECT isteklerine vekil desteği etkin kılınır. Bu - modül mod_proxy modülünün bir eklentisidir, - dolayısıyla bu seçeneği --enable-proxy seçeneği ile - birlikte kullanmalısınız.
    - -
    --enable-proxy-ftp
    -
    mod_proxy_ftp modülü tarafından sağlanan - FTP isteklerine vekil desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-proxy-http
    -
    mod_proxy_http modülü tarafından sağlanan - HTTP isteklerine vekil desteği etkin kılınır. Bu modül - mod_proxy modülünün bir eklentisidir, dolayısıyla - bu seçeneği --enable-proxy seçeneği ile birlikte - kullanmalısınız.
    - -
    --enable-rewrite
    -
    mod_rewrite modülü tarafından sağlanan kurallara - dayalı URL kurgulaması etkin kılınır.
    - -
    --enable-so
    -
    mod_so modülü tarafından sağlanan DSO yeteneği - etkin kılınır. --enable-mods-shared seçeneği bu - seçeneği de etkin kılar.
    - -
    --enable-speling
    -
    mod_speling modülü tarafından sağlanan URL - yanlışlarını düzeltme desteği etkin kılınır.
    - -
    --enable-ssl
    -
    mod_ssl modülü tarafından sağlanan SSL/TLS - şifreleme desteği etkin kılınır.
    - -
    --enable-unique-id
    -
    mod_unique_id modülü tarafından sağlanan her - isteğe bir eşsiz kimlik atama desteği etkin kılınır.
    - -
    --enable-usertrack
    -
    mod_usertrack modülü tarafından sağlanan - kullanıcı oturumunu izleme desteği etkin kılınır.
    - -
    --enable-vhost-alias
    -
    mod_vhost_alias modülü tarafından sağlanan - kitlesel sanal barındırma desteği etkin kılınır.
    -
    -
    +
    --with-mpm=MPM
    +
    +

    Sunucu için öntanımlı MPM'i seçer. MPM'ler DSO modülleri olarak + derleniyorsa (bak --enable-mpms-shared), bu seçenek + öntanımlı yapılandırma dosyasında yüklenecek MPM'i seçer. Aksi + takdirde, sunucuyla duruk olarak ilintilenecek, kullanılabilir tek + MPM'i seçer.

    + +

    Bu seçenek belirtilmezse, işletim sisteminiz için + öntanımlı olan MPM seçilir.

    +
    -
    - Geliştiriciler için modüller +
    --enable-mpms-shared=MPM-LISTESİ
    +
    +

    MPM'leri devingen paylaşımlı modül olarak etkinleştirir. + LoadModule yönergesi + kullanılarak bu modüllerden biri devingen olarak yüklenmelidir.

    -

    Aşağıdakiler geliştiricilerin yaptıklarını sınamalar için yararlı - modülleri etkinleştiren seçeneklerdir. Bu seçenekler öntanımlı olarak - etkin değildir. Bu modüllere ihtiyacınız olup olmadığı konusunda bir - fikriniz yoksa bu bölümü atlayabilirsiniz.

    +

    MPM-LISTESİ MPM'lerin aralarına boşluk bırakılarak ve + tamamı tek tırnaklarla sarmalanarak oluşturulmuş bir listesidir. + Örnek:

    -
    - -
    --enable-bucketeer
    -
    mod_bucketeer modülü tarafından sağlanan veri - kümelerine müdahale süzgeci etkin kılınır.
    - - -
    --enable-case-filter
    -
    mod_case_filter modülünün sağladığı çıktıda büyük - harfe dönüşüm süzgeci örneği etkin kılınır.
    - - -
    --enable-case-filter-in
    -
    mod_case_filter_in modülünün sağladığı girdide büyük - harfe dönüşüm süzgeci örneği etkin kılınır.
    - -
    --enable-echo
    -
    mod_echo modülünün sağladığı ECHO sunucusu etkin - kılınır.
    - -
    --enable-example
    -
    Örnek ve demo modülü mod_example etkin - kılınır.
    - - -
    --enable-optional-fn-export
    -
    mod_optional_fn_export modülünün sağladığı seçimlik - işlev ihraç örneği etkin kılınır.
    - - -
    --enable-optional-fn-import
    -
    mod_optional_fn_import modülünün sağladığı seçimlik - işlev ithal örneği etkin kılınır.
    - - -
    --enable-optional-hook-export
    -
    mod_optional_hook_export modülünün sağladığı seçimlik - kanca işlev ihraç örneği etkin kılınır.
    - - -
    --enable-optional-hook-import
    -
    mod_optional_hook_import modülünün sağladığı seçimlik - kanca işlev ithal örneği etkin kılınır.
    -
    + + --enable-mpms-shared='prefork worker' + + +

    Ek olarak, kullandığınız platformda devingen yüklemeyi destekleyen + ve DSO modülü olarak derlenmiş tüm modülleri seçmek için + all anahtar sözcüğünü de kullanabilirsiniz. Örnek:

    + + + --enable-mpms-shared=all + +
    +
    -
    MPM'ler ve üçüncü parti modüller -

    Gereken çok süreçlilik modüllerini ve üçüncü parti modülleri etkin - kılmak için şu seçenekler kullanılır:

    +
    Üçüncü parti modüller +

    Üçüncü parti modülleri etkin kılmak için şu seçenekler kullanılır:

    --with-module=modül-türü:apxs programını kullanınız.

    - -
    --with-mpm=MPM
    -
    Sunucu süreç modeli seçilir. Bu seçenekte çok süreçlilik modüllerinden sadece biri - belirtilebilir. Bu seçenek kullanılmadığı takdirde işletim - sisteminiz için öntanımlı MPM - etkin olur. Bu seçenekte belirtilebilecek MPM isimleri: - prefork ve worker.
    @@ -706,7 +418,7 @@
    --enable-maintainer-mode
    Hata ayıklama iletileri ve derleme sırasındaki uyarıların - gösterilmesi etkin kılınır.
    + gösterilmesi etkin kılınır ve derlenmiş tüm modüller yüklenir.
    --enable-mods-shared=modül-listesi
    @@ -723,32 +435,38 @@ --enable-mods-shared='headers rewrite dav' -

    modül-listesi yerine all ve - most anahtar sözcükleri de belirtilebilir. - Örneğin,

    +

    modül-listesi yerine + reallyall, all, most ve + few anahtar sözcükleri de belirtilebilir. Örneğin,

    --enable-mods-shared=most -

    seçeneği ile çoğu modül DSO modülü olarak derlenecektir.

    - -

    Yetersizlikler: - --enable-mods-shared=all aslında bütün modüllerin - derlenmesini sağlamaz. Tüm modülleri derlemek için şunu - yapabilirsiniz:

    +

    seçeneği ile çoğu modül DSO modülü olarak derlenir,

    - ./configure \
    - - --with-ldap \
    - --enable-mods-shared="all ssl ldap cache proxy authn_alias - file_cache authnz_ldap charset_lite dav_lock cache_disk" -
    + --enable-mods-shared=few
    -
    -
    --enable-modules=modül-listesi
    +

    seçeneği ile sadece en temel modüller derlenir.

    + +

    most öntanımlıdır.

    + +

    Seçilen modüller için LoadModule yönergeleri ana yapılandırma dosyasında + kendiliğinden üretilir. Öntanımlı olarak, --enable-foo + yapılandıma seçeneği ile açıkça seçilen modüller ve gerekli olanlar + dışında kalan LoadModule yönergeleri açıklama haline + getirilir. Yüklü modülleri httpd.conf dosyasındaki + LoadModule yönergelerini + etkin kılarak veya açıklama haline getirerek değiştirebilirsiniz. + LoadModule yönergelerine ek + olarak, derlenmiş tüm modüller + --enable-load-all-modules yapılandırma seçeneği ile de + etkinleştirilebilir.

    + +
    --enable-mods-static=modül-listesi
    Bu seçenek modülleri devingen değil de durağan ilintilemek dışında --enable-mods-shared seçeneğine benzer. Yani bu modüller httpd çalıştırılır çalıştırılmaz etkin @@ -756,6 +474,12 @@ module="mod_so">LoadModule yönergesine ihtiyaçları yoktur.
    +
    --enable-modules=MODULE-LIST
    +
    Bu seçenek --enable-mods-shared gibi davranır ve ek + olarak belirtilen modülleri devingen olarak ilintiler.Özel + none anahtar sözcüğü tüm modüllerin derlenmesini iptal + eder.
    +
    --enable-v4-mapped
    IPv6 soketlierinin IPv4 bağlantılar üzerinde kullanılması mümkün olur.
    diff --git a/docs/manual/programs/dbmmanage.html b/docs/manual/programs/dbmmanage.html index dcbee7abdff..89c4dce3cff 100644 --- a/docs/manual/programs/dbmmanage.html +++ b/docs/manual/programs/dbmmanage.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: dbmmanage.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: dbmmanage.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/programs/dbmmanage.html.en b/docs/manual/programs/dbmmanage.html.en index 642499f4976..5bb24725cc0 100644 --- a/docs/manual/programs/dbmmanage.html.en +++ b/docs/manual/programs/dbmmanage.html.en @@ -1,24 +1,30 @@ - -dbmmanage - Manage user authentication files in DBM format - Apache HTTP Server +dbmmanage - Manage user authentication files in DBM format - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    dbmmanage - Manage user authentication files in DBM format

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    dbmmanage - Manage user authentication files in DBM format

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -31,6 +37,9 @@ program can only be used when the usernames are stored in a DBM file. To use a flat-file database see htpasswd.

    +

    Another tool to maintain a DBM password database is + htdbm.

    +

    This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in httpd see the httpd manual, which is part of @@ -39,7 +48,7 @@

    +

    See also

    top

    Synopsis

    @@ -185,9 +194,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/dbmmanage.html.fr b/docs/manual/programs/dbmmanage.html.fr new file mode 100644 index 00000000000..efe68ae0c7a --- /dev/null +++ b/docs/manual/programs/dbmmanage.html.fr @@ -0,0 +1,247 @@ + + + + + +dbmmanage - Gestion des fichiers d'authentification des +utilisateurs au format DBM - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    dbmmanage - Gestion des fichiers d'authentification des +utilisateurs au format DBM

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    dbmmanage permet de crer et de maintenir les + fichiers au format DBM o sont stocks les noms d'utilisateurs et + mots de passe des fins d'authentification de base des utilisateurs + HTTP via le module mod_authn_dbm. Il est possible + de restreindre l'accs aux ressources disponibles sur le serveur + HTTP Apache aux seuls utilisateurs spcifis dans les fichiers crs + par dbmmanage. Ce programme ne peut tre utilis + qu'avec des fichiers d'utilisateurs au format DBM. Pour + l'utilisation de fichiers textes, voir le programme + htpasswd.

    + +

    Le programme htdbm est aussi un utilitaire + permettant de maintenir une base de donnes de mots de passe DBM.

    + +

    Cette page de manuel ne dcrit que les arguments de la ligne de + commande. Pour plus de dtails propos des directives ncessaires + pour configurer l'authentification des utilisateurs dans + httpd, voir le manuel httpd qui est fourni avec + la distribution d'Apache, ou peut tre consult http://httpd.apache.org/.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    dbmmanage [ codage ] + nom-fichier add|adduser|check|delete|update + nom-utilisateur + [ mot-de-passe-chiffr + [ groupe[,groupe...] + [ commentaire ] ] ]

    + +

    dbmmanage nom-fichier + view [ nom-utilisateur ]

    + +

    dbmmanage nom-fichierimport

    +
    top
    +
    +

    Options

    +
    +
    nom-fichier
    +
    Le nom du fichier au format DBM, en gnral sans l'extension + .db, .pag, ou .dir.
    + +
    nom-utilisateur
    +
    L'utilisateur concern par l'opration effectue. Le + nom-utilisateur ne doit pas contenir de caractre + :.
    + +
    mot-de-passe-chiffr
    +
    C'est le mot de passe sous sa forme chiffre utiliser avec les + commandes update et add. Vous pouvez + utiliser un tiret (-) si vous voulez que le mot de + passe vous soit demand, mais remplissez les champs par la suite. En + outre, avec la commande update, un point + (.) permet de conserver le mot de passe original.
    + +
    groupe
    +
    Un groupe dont l'utilisateur est membre. Un nom de groupe ne + doit pas contenir de caractre (:). Vous pouvez + utiliser un tiret (-) si vous ne voulez pas associer + l'utilisateur un groupe, mais remplissez le champ commentaire. En + outre, avec la commande update, un point + (.) permet de conserver le groupe original.
    + +
    commentaire
    +
    C'est l'endroit o vous pouvez enregistrer diverses informations + propos de l'utilisateur telles que son nom rel, sont e-mail, + etc... Le serveur ignore ce champ.
    +
    + +

    Codages

    +
    +
    -d
    +
    chiffrement crypt (chiffrement par dfaut sauf sous Win32, + Netware)
    + +
    -m
    +
    chiffrement MD5 (chiffrement par dfaut sous Win32, + Netware)
    + +
    -s
    +
    chiffrement SHA1
    + +
    -p
    +
    en clair (dconseill)
    +
    + + +

    Commandes

    +
    +
    add
    +
    Ajoute une entre pour nom-utilisateur + nom-fichier en utilisant le mot de passe chiffr + mot-de-passe-chiffr. + +

    dbmmanage passwords.dat add rbowen foKntnEF3KSXA

    +
    + +
    adduser
    +
    Demande un mot de passe puis ajoute une entre pour + nom-utilisateur nom-fichier. + +

    dbmmanage passwords.dat adduser krietz

    +
    + +
    check
    +
    Demande un mot de passe puis vrifie si + nom-utilisateur est prsent dans nom-fichier + et si son mot de passe correspond au mot de passe fourni. + +

    dbmmanage passwords.dat check rbowen

    +
    + +
    delete
    +
    Supprime l'entre nom-utilisateur de + nom-fichier. + +

    dbmmanage passwords.dat delete rbowen

    +
    + +
    import
    +
    Lit les entres + nom-utilisateur:mot-de-passe + (une par ligne) depuis STDIN, et les ajoute + nom-fichier. Les mots de passe doivent tre dj + chiffrs.
    + +
    update
    +
    Identique la commande adduser, l'exception + que la prsence de nom-utilisateur dans + nom-fichier est vrifie. + +

    dbmmanage passwords.dat update rbowen

    +
    + +
    view
    +
    Affiche le contenu du fichier DBM. Si vous spcifiez un + nom-utilisateur, seule l'entre correspondante est + affiche. + +

    dbmmanage passwords.dat view

    +
    +
    + +
    top
    +
    +

    Bogues

    +

    Vous devez garder l'esprit qu'il existe de nombreux formats de + fichiers DBM diffrents, et que selon toute vraisemblance, des + bibliothques pour plus d'un format sont prsentes sur votre + systme. Les trois exemples de base sont SDBM, NDBM, le projet GNU + GDBM, et Berkeley DB 2. Malheureusement, toutes ces bibliothques + utilisent des formats de fichiers diffrents, et vous devez vous + assurer que le format de fichier utilis par nom-fichier + correspond au format attendu par dbmmanage. + Actuellement, dbmmanage n'a aucun moyen de savoir + quel type de fichier DBM il a faire. S'il est utilis avec un + format inappropri, il ne renverra rien, ou pourra crer un fichier + DBM diffrent avec un nom diffrent, ou au pire, va corrompre le + fichier DBM si vous avez tent de le modifier.

    + +

    dbmmanage possde une liste de prfrences en + matire de formats DBM, dfinies dans le tableau + @AnyDBM::ISA au dbut du programme. Comme nous + prfrons le format de fichier Berkeley DB 2, l'ordre dans lequel + dbmmanage va rechercher les bibliothques systme est + Berkeley DB 2, puis NDBM, GDBM et enfin SDBM. La premire + bibliothque trouve sera celle que dbmmanage tentera + d'utiliser pour toutes les oprations sur les fichiers DBM. Cette + ordre est sensiblement diffrent de l'ordre standard de Perl + @AnyDBM::ISA, et de l'ordre utilis par l'appel + dbmopen() de Perl ; si vous utilisez un autre + utilitaire pour grer vos fichiers DBM, il doit donc se conformer + l'ordre de prfrence indiqu prcdemment. Vous devez prter la + mme attention si vous utilisez des programmes crits dans d'autres + langages, comme C, pour accder ces fichiers.

    + +

    Vous pouvez utiliser le programme file fourni par la + plupart des systmes Unix pour dterminer le format d'un fichier + DBM.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/dbmmanage.html.ko.euc-kr b/docs/manual/programs/dbmmanage.html.ko.euc-kr index a94a907a0f4..92ab8284170 100644 --- a/docs/manual/programs/dbmmanage.html.ko.euc-kr +++ b/docs/manual/programs/dbmmanage.html.ko.euc-kr @@ -1,24 +1,30 @@ - -dbmmanage - DBM Ѵ - Apache HTTP Server +dbmmanage - DBM Ѵ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    @@ -166,9 +172,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/dbmmanage.html.tr.utf8 b/docs/manual/programs/dbmmanage.html.tr.utf8 index 38b9f499976..6d494501d81 100644 --- a/docs/manual/programs/dbmmanage.html.tr.utf8 +++ b/docs/manual/programs/dbmmanage.html.tr.utf8 @@ -1,28 +1,33 @@ - -dbmmanage - DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu +dbmmanage - DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    dbmmanage - DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    dbmmanage - DBM biçemli kullanıcı kimlik doğrulama dosyalarını yönetir

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    dbmmanage, mod_authn_dbm üzerinden HTTP kullanıcılarının temel @@ -35,6 +40,9 @@ yarar. Düz metin bir veritabanı kullanmak isterseniz htpasswd sayfasına bakınız.

    +

    DBM parola veritabanı sağlayan diğer bir araç da + htdbm'dir.

    +

    Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler. Kullanıcı kimlik doğrulamasını httpd'de yapılandırmak için gerekli @@ -45,7 +53,7 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -202,9 +210,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/dbmmanage.xml b/docs/manual/programs/dbmmanage.xml index f3d1d380639..b40fbe0d9f5 100644 --- a/docs/manual/programs/dbmmanage.xml +++ b/docs/manual/programs/dbmmanage.xml @@ -34,6 +34,9 @@ program can only be used when the usernames are stored in a DBM file. To use a flat-file database see htpasswd.

    +

    Another tool to maintain a DBM password database is + htdbm.

    +

    This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in httpd see the httpd manual, which is part of @@ -41,6 +44,7 @@ href="http://httpd.apache.org/">http://httpd.apache.org/.

    httpd +htdbm mod_authn_dbm mod_authz_dbm diff --git a/docs/manual/programs/dbmmanage.xml.fr b/docs/manual/programs/dbmmanage.xml.fr new file mode 100644 index 00000000000..a165ebeeb76 --- /dev/null +++ b/docs/manual/programs/dbmmanage.xml.fr @@ -0,0 +1,217 @@ + + + + + + + + + + +Programmes + +dbmmanage - Gestion des fichiers d'authentification des +utilisateurs au format DBM + + +

    dbmmanage permet de créer et de maintenir les + fichiers au format DBM où sont stockés les noms d'utilisateurs et + mots de passe à des fins d'authentification de base des utilisateurs + HTTP via le module mod_authn_dbm. Il est possible + de restreindre l'accès aux ressources disponibles sur le serveur + HTTP Apache aux seuls utilisateurs spécifiés dans les fichiers créés + par dbmmanage. Ce programme ne peut être utilisé + qu'avec des fichiers d'utilisateurs au format DBM. Pour + l'utilisation de fichiers textes, voir le programme + htpasswd.

    + +

    Le programme htdbm est aussi un utilitaire + permettant de maintenir une base de données de mots de passe DBM.

    + +

    Cette page de manuel ne décrit que les arguments de la ligne de + commande. Pour plus de détails à propos des directives nécessaires + pour configurer l'authentification des utilisateurs dans + httpd, voir le manuel httpd qui est fourni avec + la distribution d'Apache, ou peut être consulté à http://httpd.apache.org/.

    +
    +httpd +htdbm +mod_authn_dbm +mod_authz_dbm + +
    Syntaxe +

    dbmmanage [ codage ] + nom-fichier add|adduser|check|delete|update + nom-utilisateur + [ mot-de-passe-chiffré + [ groupe[,groupe...] + [ commentaire ] ] ]

    + +

    dbmmanage nom-fichier + view [ nom-utilisateur ]

    + +

    dbmmanage nom-fichierimport

    +
    + +
    Options +
    +
    nom-fichier
    +
    Le nom du fichier au format DBM, en général sans l'extension + .db, .pag, ou .dir.
    + +
    nom-utilisateur
    +
    L'utilisateur concerné par l'opération effectuée. Le + nom-utilisateur ne doit pas contenir de caractère + :.
    + +
    mot-de-passe-chiffré
    +
    C'est le mot de passe sous sa forme chiffrée à utiliser avec les + commandes update et add. Vous pouvez + utiliser un tiret (-) si vous voulez que le mot de + passe vous soit demandé, mais remplissez les champs par la suite. En + outre, avec la commande update, un point + (.) permet de conserver le mot de passe original.
    + +
    groupe
    +
    Un groupe dont l'utilisateur est membre. Un nom de groupe ne + doit pas contenir de caractère (:). Vous pouvez + utiliser un tiret (-) si vous ne voulez pas associer + l'utilisateur à un groupe, mais remplissez le champ commentaire. En + outre, avec la commande update, un point + (.) permet de conserver le groupe original.
    + +
    commentaire
    +
    C'est l'endroit où vous pouvez enregistrer diverses informations + à propos de l'utilisateur telles que son nom réel, sont e-mail, + etc... Le serveur ignore ce champ.
    +
    + +
    Codages +
    +
    -d
    +
    chiffrement crypt (chiffrement par défaut sauf sous Win32, + Netware)
    + +
    -m
    +
    chiffrement MD5 (chiffrement par défaut sous Win32, + Netware)
    + +
    -s
    +
    chiffrement SHA1
    + +
    -p
    +
    en clair (déconseillé)
    +
    +
    + +
    Commandes +
    +
    add
    +
    Ajoute une entrée pour nom-utilisateur à + nom-fichier en utilisant le mot de passe chiffré + mot-de-passe-chiffré. + + dbmmanage passwords.dat add rbowen foKntnEF3KSXA +
    + +
    adduser
    +
    Demande un mot de passe puis ajoute une entrée pour + nom-utilisateur à nom-fichier. + + dbmmanage passwords.dat adduser krietz +
    + +
    check
    +
    Demande un mot de passe puis vérifie si + nom-utilisateur est présent dans nom-fichier + et si son mot de passe correspond au mot de passe fourni. + + dbmmanage passwords.dat check rbowen +
    + +
    delete
    +
    Supprime l'entrée nom-utilisateur de + nom-fichier. + + dbmmanage passwords.dat delete rbowen +
    + +
    import
    +
    Lit les entrées + nom-utilisateur:mot-de-passe + (une par ligne) depuis STDIN, et les ajoute à + nom-fichier. Les mots de passe doivent être déjà + chiffrés.
    + +
    update
    +
    Identique à la commande adduser, à l'exception + que la présence de nom-utilisateur dans + nom-fichier est vérifiée. + + dbmmanage passwords.dat update rbowen +
    + +
    view
    +
    Affiche le contenu du fichier DBM. Si vous spécifiez un + nom-utilisateur, seule l'entrée correspondante est + affichée. + + dbmmanage passwords.dat view +
    +
    +
    +
    + +
    Bogues +

    Vous devez garder à l'esprit qu'il existe de nombreux formats de + fichiers DBM différents, et que selon toute vraisemblance, des + bibliothèques pour plus d'un format sont présentes sur votre + système. Les trois exemples de base sont SDBM, NDBM, le projet GNU + GDBM, et Berkeley DB 2. Malheureusement, toutes ces bibliothèques + utilisent des formats de fichiers différents, et vous devez vous + assurer que le format de fichier utilisé par nom-fichier + correspond au format attendu par dbmmanage. + Actuellement, dbmmanage n'a aucun moyen de savoir à + quel type de fichier DBM il a à faire. S'il est utilisé avec un + format inapproprié, il ne renverra rien, ou pourra créer un fichier + DBM différent avec un nom différent, ou au pire, va corrompre le + fichier DBM si vous avez tenté de le modifier.

    + +

    dbmmanage possède une liste de préférences en + matière de formats DBM, définies dans le tableau + @AnyDBM::ISA au début du programme. Comme nous + préférons le format de fichier Berkeley DB 2, l'ordre dans lequel + dbmmanage va rechercher les bibliothèques système est + Berkeley DB 2, puis NDBM, GDBM et enfin SDBM. La première + bibliothèque trouvée sera celle que dbmmanage tentera + d'utiliser pour toutes les opérations sur les fichiers DBM. Cette + ordre est sensiblement différent de l'ordre standard de Perl + @AnyDBM::ISA, et de l'ordre utilisé par l'appel + dbmopen() de Perl ; si vous utilisez un autre + utilitaire pour gérer vos fichiers DBM, il doit donc se conformer à + l'ordre de préférence indiqué précédemment. Vous devez prêter la + même attention si vous utilisez des programmes écrits dans d'autres + langages, comme C, pour accéder à ces fichiers.

    + +

    Vous pouvez utiliser le programme file fourni par la + plupart des systèmes Unix pour déterminer le format d'un fichier + DBM.

    +
    + +
    diff --git a/docs/manual/programs/dbmmanage.xml.ko b/docs/manual/programs/dbmmanage.xml.ko index ac171b2cb97..a0116bf1a33 100644 --- a/docs/manual/programs/dbmmanage.xml.ko +++ b/docs/manual/programs/dbmmanage.xml.ko @@ -1,7 +1,7 @@ - + + -fcgistarter - Start a FastCGI program - Apache HTTP Server +fcgistarter - Start a FastCGI program - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    fcgistarter - Start a FastCGI program

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    fcgistarter - Start a FastCGI program

    Available Languages:  en  | + fr  |  tr 

    -

    Note

    -

    Currently only works on Unix systems.

    -
    -
    top
    +

    Note

    +

    Currently only works on Unix systems.

    +
    top
    +

    Synopsis

    fcgistarter -c command @@ -47,10 +55,10 @@

    FastCGI program
    -p port
    -
    Port which the program will listens on
    +
    Port which the program will listen on
    -i interface
    -
    Interface which the program will listens on
    +
    Interface which the program will listen on
    -N num
    Number of instances of the program
    @@ -59,8 +67,30 @@

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/fcgistarter.html.fr b/docs/manual/programs/fcgistarter.html.fr new file mode 100644 index 00000000000..06480f08fb2 --- /dev/null +++ b/docs/manual/programs/fcgistarter.html.fr @@ -0,0 +1,96 @@ + + + + + +fcgistarter - Dmarrer un programme FastCGI - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    fcgistarter - Dmarrer un programme FastCGI

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    + +

    +

    + +
    top
    +
    +

    Note

    +

    Ne fonctionne actuellement que sur les systmes de type Unix.

    +
    top
    +
    +

    Syntaxe

    +

    fcgistarter + -c commande + -p port + [ -i interface ] + -N nombre +

    +
    top
    +
    +

    Options

    +
    +
    -c commande
    +
    Le programme FastCGI
    + +
    -p port
    +
    Port sur lequel le programme va se mettre en coute
    + +
    -i interface
    +
    Interface sur laquelle le programme va se mettre en coute
    + +
    -N nombre
    +
    Nombre d'instances du programme
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/fcgistarter.html.tr.utf8 b/docs/manual/programs/fcgistarter.html.tr.utf8 index 0ed38c9aa0e..5118d580669 100644 --- a/docs/manual/programs/fcgistarter.html.tr.utf8 +++ b/docs/manual/programs/fcgistarter.html.tr.utf8 @@ -1,37 +1,45 @@ - -fcgistarter - Bir FastCGI programını çalıştır - Apache HTTP Sunucusu +fcgistarter - Bir FastCGI programını çalıştır - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    fcgistarter - Bir FastCGI programını çalıştır

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    fcgistarter - Bir FastCGI programını çalıştır

    Mevcut Diller:  en  | + fr  |  tr 

    -

    Bilginize

    -

    Şimdilik sadece Unix sistemlerinde çalışmaktadır.

    -
    -

    Ayrıca bakınız:

    top
    +

    Bilginize

    +

    Şimdilik sadece Unix sistemlerinde çalışmaktadır.

    +
    top
    +

    Kullanım

    fcgistarter -c komut @@ -54,13 +62,34 @@

    -N sayı
    Program örneklerinin sayısı
    -

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/fcgistarter.xml b/docs/manual/programs/fcgistarter.xml index e197b08e0c4..e8a19680900 100644 --- a/docs/manual/programs/fcgistarter.xml +++ b/docs/manual/programs/fcgistarter.xml @@ -27,12 +27,14 @@

    - Note -

    Currently only works on Unix systems.

    -
    + mod_proxy_fcgi +
    Note +

    Currently only works on Unix systems.

    +
    +
    Synopsis

    fcgistarter -c command @@ -48,10 +50,10 @@

    FastCGI program
    -p port
    -
    Port which the program will listens on
    +
    Port which the program will listen on
    -i interface
    -
    Interface which the program will listens on
    +
    Interface which the program will listen on
    -N num
    Number of instances of the program
    diff --git a/docs/manual/programs/fcgistarter.xml.fr b/docs/manual/programs/fcgistarter.xml.fr new file mode 100644 index 00000000000..df573e3544b --- /dev/null +++ b/docs/manual/programs/fcgistarter.xml.fr @@ -0,0 +1,65 @@ + + + + + + + + + + +Programmes + +fcgistarter - Démarrer un programme FastCGI + + +

    +
    + +mod_proxy_fcgi + +
    Note +

    Ne fonctionne actuellement que sur les systèmes de type Unix.

    +
    + +
    Syntaxe +

    fcgistarter + -c commande + -p port + [ -i interface ] + -N nombre +

    +
    + +
    Options +
    +
    -c commande
    +
    Le programme FastCGI
    + +
    -p port
    +
    Port sur lequel le programme va se mettre en écoute
    + +
    -i interface
    +
    Interface sur laquelle le programme va se mettre en écoute
    + +
    -N nombre
    +
    Nombre d'instances du programme
    + +
    +
    +
    diff --git a/docs/manual/programs/fcgistarter.xml.meta b/docs/manual/programs/fcgistarter.xml.meta index 728df887da4..2aec6066d53 100644 --- a/docs/manual/programs/fcgistarter.xml.meta +++ b/docs/manual/programs/fcgistarter.xml.meta @@ -8,6 +8,7 @@ en + fr tr diff --git a/docs/manual/programs/fcgistarter.xml.tr b/docs/manual/programs/fcgistarter.xml.tr index 49856263721..a83297a24fc 100644 --- a/docs/manual/programs/fcgistarter.xml.tr +++ b/docs/manual/programs/fcgistarter.xml.tr @@ -1,10 +1,10 @@ - + -htcacheclean - Clean up the disk cache - Apache HTTP Server +htcacheclean - Clean up the disk cache - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htcacheclean - Clean up the disk cache

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htcacheclean - Clean up the disk cache

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -38,7 +44,7 @@
  • Deleting a specific URL
  • Listing URLs in the Cache
  • Exit Status
  • -

    See also

    +

    See also

    top

    Synopsis

    @@ -210,9 +216,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htcacheclean.html.fr b/docs/manual/programs/htcacheclean.html.fr new file mode 100644 index 00000000000..6dda8a038e4 --- /dev/null +++ b/docs/manual/programs/htcacheclean.html.fr @@ -0,0 +1,262 @@ + + + + + +htcacheclean - Nettoyage du cache sur disque - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    htcacheclean - Nettoyage du cache sur disque

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    htcacheclean permet de maintenir la taille de + l'espace de stockage rserv mod_disk_cache en + dessous d'une limite de taille donne ou d'inodes utiliss. Cet + utilitaire peut s'excuter + soit manuellement, soit en mode dmon. Lorsqu'il fonctionne en mode + dmon, il se met en attente en arrire-plan et recherche + intervalles rguliers dans le rpertoire du cache les contenus + supprimer. Pour arrter proprement le dmon, vous pouvez lui envoyer + un signal TERM ou INT. Lorsqu'il est lanc manuellement, une + recherche des contenus du cache qui peuvent tre supprims est + effectue une seule fois. Si une ou plusieurs URLs sont spcifies, + chacune d'entre elles sera supprime du cache, si elle est prsente.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    htcacheclean + [ -D ] + [ -v ] + [ -t ] + [ -r ] + [ -n ] + [ -Rarrondi ] + -pchemin + [-llimite| + -Llimite]

    + +

    htcacheclean + [ -n ] + [ -t ] + [ -i ] + [ -Pfichier-pid ] + [ -Rarrondi ] + -dintervalle + -pchemin + [-llimite| + -Llimite]

    + +

    htcacheclean + [ -v ] + [ -Rarrondi ] + -pchemin + [ -a ] + [ -A ]

    + +

    htcacheclean + [ -D ] + [ -v ] + [ -t ] + [ -Rarrondi ] + -pchemin + url

    +
    top
    +
    +

    Options

    +
    +
    -dintervalle
    +
    Configure en mode dmon et planifie le nettoyage du cache toutes + les intervalle minutes. Cette option et les options + -D, -v et -r s'excluent + mutuellement. Pour arrter le dmon proprement, il suffit de lui + envoyer un signal SIGTERM ou SIGINT.
    + +
    -D
    +
    Le programme s'excute mais ne supprime aucun contenu ("dry run"). Cette + option et l'option -d s'excluent mutuellement. Si ce mode + est combin avec la suppression des rpertoires avec + -t, les inodes signals comme supprims dans les + statistiques ne peuvent pas prendre en compte les rpertoires + supprims, et seront marqus en tant qu'estimation.
    + +
    -v
    +
    Excution verbeuse et affichage de statistiques. Cette + option et l'option -d s'excluent mutuellement.
    + +
    -r
    +
    Nettoyage en profondeur. Le serveur web Apache doit tre arrt + (dans le cas contraire, il risque de rester des dchets dans le + cache). Cette option implique l'option -t et s'exclue + mutuellement avec l'option -d.
    + +
    -n
    +
    Excution en retrait. L'excution du programme est ralentie en + faveur des autres processus. htcacheclean s'interrompt + de temps en temps de faon ce que a) les entres/sorties disque + soient retardes et b) que le noyau puisse mettre ce temps + processeur disposition des autres processus.
    + +
    -t
    +
    Supprime tous les rpertoires vides. Par dfaut, seuls les + fichiers sont supprims du cache ; avec certaines configurations, + cependant, un grand nombre de rpertoires sont crs et mritent que + l'on y prte attention. Si votre configuration ncessite un grand + nombre de rpertoires, au point que le remplissage de la table + d'inodes ou d'allocation de fichiers puisse poser problme, + l'utilisation de cette option est conseille.
    + +
    -pchemin
    +
    Dfinit chemin comme rpertoire racine du cache sur + disque. Cette valeur doit correspondre celle spcifie par la + directive CacheRoot.
    + +
    -Pfichier-pid
    +
    Permet de spcifier fichier-pid comme nom du fichier + dans le lequel sera enregistr l'identifiant du processus en mode + dmon.
    + +
    -Rround
    +
    Permet de spcifier le plus petit commun multiple de la taille + du cache, afin de tenir compte de la taille des blocs. Dfinir ce + paramtre la taille d'un bloc de la partition du cache.
    + +
    -llimite
    +
    Dfinit limite comme la taille maximale du cache sur + disque. La valeur s'exprime par dfaut en octets (ou en ajoutant le + suffixe B la valeur). Ajoutez le suffixe + K pour KOctets ou M pour MOctets.
    + +
    -Llimite
    +
    Spcifie limite comme la limite totale en inodes du + cache disque.
    + +
    -i
    +
    Excution intelligente. Le programme ne s'excute que lorsque le + cache sur disque a t modifi. Cette option ne peut s'utiliser + qu'avec l'option -d.
    + +
    -a
    +
    Affiche la liste des URLs actuellement stockes dans le cache. + Les variantes de la mme URL seront listes une seule fois par + variante.
    + +
    -A
    +
    Affiche la liste des URLs actuellement stockes dans le cache, + ainsi que leurs attributs dans l'ordre suivant : url, header size, + body size, status, entity version, date, expiry, request time, + response time, body present, head request.
    +
    +
    top
    +
    +

    Suppression d'une URL particulire

    +

    Si une ou plusieurs URLs sont passes en argument + htcacheclean, chacune d'entre elles sera supprime du + cache. S'il existe plusieurs variantes de ces URLs, elles seront + toutes supprimes.

    + +

    Lorsqu'une URL mandate en inverse doit tre supprime, l'URL + effective est construite partir de l'en-tte + Host, du port, du + chemin et de la requte. Notez que + le '?' doit toujours tre spcifi explicitement dans l'URL, qu'une + chane de paramtres soit prsente ou non. Par exemple, pour + supprimer le chemin / du serveur + localhost, l'URL devra tre spcifie comme suit : + http://localhost:80/?.

    + +
    top
    +
    +

    Affichage des URLs prsentes dans le cache

    +

    Les options -a ou -A permettent + d'afficher les URLs prsentes dans le cache telles qu'elles s'y + trouvent, une URL par ligne. L'option -A affiche + l'entre du cache complte pour chaque URL, avec ses diffrents + champs dans l'ordre suivant :

    + +
    +
    url
    L'URL de l'entre considre.
    +
    header size
    La taille de l'en-tte en octets.
    +
    body size
    La taille du corps en octets.
    +
    status
    Etat de la rponse en cache.
    +
    entity version
    Le nombre de fois que cette entre a + t revalide sans tre efface.
    +
    date
    Date de la rponse.
    +
    expiry
    Date d'expiration de la rponse.
    +
    request time
    Date du dbut de la requte.
    +
    response time
    Date de la fin de la requte.
    +
    body present
    Ce champ contient la valeur 0 si aucun + corps n'est stock avec cette requte, 1 dans le cas contraire.
    +
    head request
    Ce champ contient la valeur 1 si + l'entre comporte une requte HEAD en cache sans corps, 0 dans + le cas contraire.
    +
    + +
    top
    +
    +

    Valeur renvoye

    +

    htcacheclean renvoie zro ("true") si toutes les + oprations se sont droules normalement, et 1 dans le + cas contraire. Si une URL est spcifie, et si cette URL tait + prsente dans le cache et a t supprime avec succs, + htcacheclean renvoie 0, et 2 + dans le cas contraire. Si une erreur est survenue au cours de la + suppression de l'URL, htcacheclean renvoie + 1.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/htcacheclean.html.ko.euc-kr b/docs/manual/programs/htcacheclean.html.ko.euc-kr index 8c4878cdcd5..763b03f0e0f 100644 --- a/docs/manual/programs/htcacheclean.html.ko.euc-kr +++ b/docs/manual/programs/htcacheclean.html.ko.euc-kr @@ -1,24 +1,30 @@ - -htcacheclean - ũ ij ûѴ - Apache HTTP Server +htcacheclean - ũ ij ûѴ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htcacheclean - ũ ij ûѴ

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htcacheclean - ũ ij ûѴ

    @@ -35,7 +41,7 @@ +

    top

    @@ -107,9 +113,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htcacheclean.html.tr.utf8 b/docs/manual/programs/htcacheclean.html.tr.utf8 index 72d07e4e35e..f74e2263107 100644 --- a/docs/manual/programs/htcacheclean.html.tr.utf8 +++ b/docs/manual/programs/htcacheclean.html.tr.utf8 @@ -1,41 +1,52 @@ - -htcacheclean - Disk arabelleğini temizler - Apache HTTP Sunucusu +htcacheclean - Disk arabelleğini temizler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    htcacheclean - Disk arabelleğini temizler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    htcacheclean - Disk arabelleğini temizler

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    htcacheclean, mod_cache_disk deposunun boyutlarını belli sınırlar - içinde tutmak için kullanılır. Bu araç ya elle ya da bir artalan süreci + içinde veya kullanımdaki dosya düğümlerinin sınırları içinde tutmak için + kullanılır. Bu araç ya elle ya da bir artalan süreci olarak çalıştırılır. Artalan süreci olarak çalıştırıldığında, silinecek arabellek içeriğini tespit etmek için arabellek dizinlerine belli aralıklarla bakmak dışında uykuda olur. Artalan sürecini temiz olarak - durdurmak için TERM veya INT sinyali göndermeniz yeterlidir.

    + durdurmak için TERM veya INT sinyali göndermeniz yeterlidir. Elle + çalıştırıldığında, silinecek arabellek içeriğini tespit etmek için + arabellek dizinlerine bir kereliğine bakar. Bir veya daha fazla URL + belirtilmesi durumunda arabellekte olanlar arabellekten silinir.

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -45,19 +56,39 @@ [ -t ] [ -r ] [ -n ] + [ -Rboyut ] -pyol - -lsınır

    + [ -lsınır | + -Llimit ]

    htcacheclean [ -n ] [ -t ] [ -i ] + [ -Ppiddosyası ] + [ -Rboyut ] -dsüre -pyol - -lsınır

    + [ -lsınır | + -Llimit ]

    + +

    htcacheclean + [ -v ] + [ -Rboyut ] + -pyol + [ -a ] + [ -A ]

    + +

    htcacheclean + [ -D ] + [ -v ] + [ -t ] + [ -Rboyut ] + -pyol + url

    top
    -

    Options

    +

    Seçenekler

    -d süre
    Artalanda çalışarak süre dakikada bir @@ -69,7 +100,10 @@
    -D
    Kuru kuruya çalışıp, hiçbir şeyi silmez. - -d seçeneği ile birlikte kullanılamaz.
    + -d seçeneği ile birlikte kullanılamaz. Kuru + çalıştırma sırasında -t seçeneği ile dizinler + silinmek istenirse, statlarda silinmiş görünen dosya düğümleri silinmiş + dizinler olarak hesaba katılmaz ve tahmini olarak imlenir.
    -v
    Çıktı daha ayrıntılı olur. -d seçeneği @@ -99,29 +133,113 @@ belirtilir. CacheRoot yönergesinde belirtilen dizin olmalıdır.
    +
    -Ppiddosyası
    +
    Artalan süreci olarak çalışmada süreç kimliğinin yazılacağı dosyanın + adını belirtmek için kullanılır.
    + +
    -Rboyut
    +
    Disk bloklarının boyunu denkleştirmek için yuvarlanacak üst boyutu + belirtmekte kullanılır. Arabellek bölümünün blok boyutunu belirler.
    +
    -l sınır
    sınır, disk arabelleğinin toplam boyutu olarak belirtilir. Değerin öntanımlı olarak bayt cinsinden belirtileceği varsayılır. Değerin sonuna kilobayt için K, megabayt M, bayt için B harfi konulabilir.
    +
    -Llimit
    +
    Disk arabellek dosyası düğümü toplamının sınırını belirlemekte + kullanılır.
    +
    -i
    Akıllı olup sadece disk arabelleği değiştiği zaman çalışır. Bu seçenek -d seçeneği ile birlikte belirtilmek zorundadır.
    + +
    -a
    +
    O an arabellekte saklanmakta olan URL'leri listeler. Birden fazla aynı + URL varsa yalnız biri listelenir.
    + +
    -A
    +
    O an arabellekte saklanmakta olan URL'leri öznitelikleri ile listeler. + Öznitelikler şu sırayla verilir: url, header size, body size, status, + entity version, date, expiry, request time, response time, body present, + head request
    +
    +
    top
    +
    +

    Belli bir URL'nin silinmesi

    +

    htcacheclean tarafından aktarılan URL'ler + arabellekten silinir. Bir URL birden fazla mevcutsa hepsi silinir.

    + +

    Ters vekilli bir URL silinmişse, etkin URL Host başlığı + port, yol ve sorgu ile + oluşturulur. Bir sorgu dizgesi olsun olmasın, URL içinde '?' daima açıkça + belirtilmelidir. Örneğin, localhost sunucusundaki + / yolu silinmek istenirse silinecek URL + http://localhost:80/? olurdu.

    + +
    top
    +
    +

    Arabellekteki URL'lerin listelenmesi

    +

    htcacheclean'e + -a veya -A + seçeneğinin aktarılmasıyla, arabellekteki URL'ler bulundukça her satıra bir + URL gelecek biçemde listelenir. -A seçeneği + URL'nin ardından arabellek içeriğini tamamını şu sırayla dökümler:

    + +
    +
    url
    Öğenin URL'si.
    +
    header size
    Bayt cinsinden başlık uzunluğu.
    +
    body size
    Bayt cinsinden gövde uzunluğu.
    +
    status
    Arabellekteki yanıtın durumu.
    +
    entity version
    Öğenin silinmeksizin kaç kere + doğrulandığı.
    +
    date
    Yanıt tarihi.
    +
    expiry
    Yanıtın zaman aşımı tarihi.
    +
    request time
    İsteğin başlama zamanı.
    +
    response time
    İsteğin bitiş zamanı.
    +
    body present
    0 ise istekle birlikte gövde saklanmaz, 1 ise + saklanır.
    +
    head request
    1 ise, öğe, gövde olmaksızın arabellekli bir + HEAD isteği içerir, 0 ise içermez.
    top

    Çıkış Durumu

    htcacheclean, tüm işlemler başarıyla yerine getirildiğinde 0, aksi takdirde 1 - döndürür.

    + döndürür. Bir URL belirtildiğinde, bu URL arablleklenmi ve silinmişse + 0, aksi takdirde 2 döndürür. URL'nin silinmesi + sırasında bir hata oluşursa 1 döndürür.

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htcacheclean.xml.fr b/docs/manual/programs/htcacheclean.xml.fr new file mode 100644 index 00000000000..e179e6c8774 --- /dev/null +++ b/docs/manual/programs/htcacheclean.xml.fr @@ -0,0 +1,228 @@ + + + + + + + + + + +Programmes + +htcacheclean - Nettoyage du cache sur disque + + +

    htcacheclean permet de maintenir la taille de + l'espace de stockage réservé à mod_disk_cache en + dessous d'une limite de taille donnée ou d'inodes utilisés. Cet + utilitaire peut s'exécuter + soit manuellement, soit en mode démon. Lorsqu'il fonctionne en mode + démon, il se met en attente en arrière-plan et recherche à + intervalles réguliers dans le répertoire du cache les contenus à + supprimer. Pour arrêter proprement le démon, vous pouvez lui envoyer + un signal TERM ou INT. Lorsqu'il est lancé manuellement, une + recherche des contenus du cache qui peuvent être supprimés est + effectuée une seule fois. Si une ou plusieurs URLs sont spécifiées, + chacune d'entre elles sera supprimée du cache, si elle est présente.

    +
    +mod_disk_cache + +
    Syntaxe +

    htcacheclean + [ -D ] + [ -v ] + [ -t ] + [ -r ] + [ -n ] + [ -Rarrondi ] + -pchemin + [-llimite| + -Llimite]

    + +

    htcacheclean + [ -n ] + [ -t ] + [ -i ] + [ -Pfichier-pid ] + [ -Rarrondi ] + -dintervalle + -pchemin + [-llimite| + -Llimite]

    + +

    htcacheclean + [ -v ] + [ -Rarrondi ] + -pchemin + [ -a ] + [ -A ]

    + +

    htcacheclean + [ -D ] + [ -v ] + [ -t ] + [ -Rarrondi ] + -pchemin + url

    +
    + +
    Options +
    +
    -dintervalle
    +
    Configure en mode démon et planifie le nettoyage du cache toutes + les intervalle minutes. Cette option et les options + -D, -v et -r s'excluent + mutuellement. Pour arrêter le démon proprement, il suffit de lui + envoyer un signal SIGTERM ou SIGINT.
    + +
    -D
    +
    Le programme s'exécute mais ne supprime aucun contenu ("dry run"). Cette + option et l'option -d s'excluent mutuellement. Si ce mode + est combiné avec la suppression des répertoires avec + -t, les inodes signalés comme supprimés dans les + statistiques ne peuvent pas prendre en compte les répertoires + supprimés, et seront marqués en tant qu'estimation.
    + +
    -v
    +
    Exécution verbeuse et affichage de statistiques. Cette + option et l'option -d s'excluent mutuellement.
    + +
    -r
    +
    Nettoyage en profondeur. Le serveur web Apache doit être arrêté + (dans le cas contraire, il risque de rester des déchets dans le + cache). Cette option implique l'option -t et s'exclue + mutuellement avec l'option -d.
    + +
    -n
    +
    Exécution en retrait. L'exécution du programme est ralentie en + faveur des autres processus. htcacheclean s'interrompt + de temps en temps de façon à ce que a) les entrées/sorties disque + soient retardées et b) que le noyau puisse mettre ce temps + processeur à disposition des autres processus.
    + +
    -t
    +
    Supprime tous les répertoires vides. Par défaut, seuls les + fichiers sont supprimés du cache ; avec certaines configurations, + cependant, un grand nombre de répertoires sont créés et méritent que + l'on y prête attention. Si votre configuration nécessite un grand + nombre de répertoires, au point que le remplissage de la table + d'inodes ou d'allocation de fichiers puisse poser problème, + l'utilisation de cette option est conseillée.
    + +
    -pchemin
    +
    Définit chemin comme répertoire racine du cache sur + disque. Cette valeur doit correspondre à celle spécifiée par la + directive CacheRoot.
    + +
    -Pfichier-pid
    +
    Permet de spécifier fichier-pid comme nom du fichier + dans le lequel sera enregistré l'identifiant du processus en mode + démon.
    + +
    -Rround
    +
    Permet de spécifier le plus petit commun multiple de la taille + du cache, afin de tenir compte de la taille des blocs. Définir ce + paramètre à la taille d'un bloc de la partition du cache.
    + +
    -llimite
    +
    Définit limite comme la taille maximale du cache sur + disque. La valeur s'exprime par défaut en octets (ou en ajoutant le + suffixe B à la valeur). Ajoutez le suffixe + K pour KOctets ou M pour MOctets.
    + +
    -Llimite
    +
    Spécifie limite comme la limite totale en inodes du + cache disque.
    + +
    -i
    +
    Exécution intelligente. Le programme ne s'exécute que lorsque le + cache sur disque a été modifié. Cette option ne peut s'utiliser + qu'avec l'option -d.
    + +
    -a
    +
    Affiche la liste des URLs actuellement stockées dans le cache. + Les variantes de la même URL seront listées une seule fois par + variante.
    + +
    -A
    +
    Affiche la liste des URLs actuellement stockées dans le cache, + ainsi que leurs attributs dans l'ordre suivant : url, header size, + body size, status, entity version, date, expiry, request time, + response time, body present, head request.
    +
    +
    + +
    Suppression d'une URL particulière +

    Si une ou plusieurs URLs sont passées en argument à + htcacheclean, chacune d'entre elles sera supprimée du + cache. S'il existe plusieurs variantes de ces URLs, elles seront + toutes supprimées.

    + +

    Lorsqu'une URL mandatée en inverse doit être supprimée, l'URL + effective est construite à partir de l'en-tête + Host, du port, du + chemin et de la requête. Notez que + le '?' doit toujours être spécifié explicitement dans l'URL, qu'une + chaîne de paramètres soit présente ou non. Par exemple, pour + supprimer le chemin / du serveur + localhost, l'URL devra être spécifiée comme suit : + http://localhost:80/?.

    + +
    + +
    Affichage des URLs présentes dans le cache +

    Les options -a ou -A permettent + d'afficher les URLs présentes dans le cache telles qu'elles s'y + trouvent, une URL par ligne. L'option -A affiche + l'entrée du cache complète pour chaque URL, avec ses différents + champs dans l'ordre suivant :

    + +
    +
    url
    L'URL de l'entrée considérée.
    +
    header size
    La taille de l'en-tête en octets.
    +
    body size
    La taille du corps en octets.
    +
    status
    Etat de la réponse en cache.
    +
    entity version
    Le nombre de fois que cette entrée a + été revalidée sans être effacée.
    +
    date
    Date de la réponse.
    +
    expiry
    Date d'expiration de la réponse.
    +
    request time
    Date du début de la requête.
    +
    response time
    Date de la fin de la requête.
    +
    body present
    Ce champ contient la valeur 0 si aucun + corps n'est stocké avec cette requête, 1 dans le cas contraire.
    +
    head request
    Ce champ contient la valeur 1 si + l'entrée comporte une requête HEAD en cache sans corps, 0 dans + le cas contraire.
    +
    + +
    + +
    Valeur renvoyée +

    htcacheclean renvoie zéro ("true") si toutes les + opérations se sont déroulées normalement, et 1 dans le + cas contraire. Si une URL est spécifiée, et si cette URL était + présente dans le cache et a été supprimée avec succès, + htcacheclean renvoie 0, et 2 + dans le cas contraire. Si une erreur est survenue au cours de la + suppression de l'URL, htcacheclean renvoie + 1.

    +
    + +
    diff --git a/docs/manual/programs/htcacheclean.xml.meta b/docs/manual/programs/htcacheclean.xml.meta index 7c95a185b19..7f2146f77dd 100644 --- a/docs/manual/programs/htcacheclean.xml.meta +++ b/docs/manual/programs/htcacheclean.xml.meta @@ -8,7 +8,8 @@ en + fr ko - tr + tr diff --git a/docs/manual/programs/htcacheclean.xml.tr b/docs/manual/programs/htcacheclean.xml.tr index 8c69af1b517..29b30776132 100644 --- a/docs/manual/programs/htcacheclean.xml.tr +++ b/docs/manual/programs/htcacheclean.xml.tr @@ -1,7 +1,7 @@ - + -htdbm - Manipulate DBM password databases - Apache HTTP Server +htdbm - Manipulate DBM password databases - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htdbm - Manipulate DBM password databases

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htdbm - Manipulate DBM password databases

    Available Languages:  en  | + fr  |  tr 

    @@ -34,39 +40,46 @@
  • Examples
  • Security Considerations
  • Restrictions
  • -

    See also

    +

    See also

    top

    Synopsis

    htdbm [ -TDBTYPE ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] - [ -x ] filename username

    htdbm -b [ -TDBTYPE ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username password

    htdbm -n + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] username

    @@ -74,20 +87,25 @@

    htdbm -nb [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] username password

    htdbm -v [ -TDBTYPE ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username

    @@ -96,19 +114,17 @@ [ -TDBTYPE ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username password

    htdbm -x [ -TDBTYPE ] - [ -m | - -d | - -p | - -s ] filename username

    htdbm -l @@ -122,7 +138,10 @@

    Use batch mode; i.e., get the password from the command line rather than prompting for it. This option should be used with extreme care, since the password is clearly visible on the command - line.
    + line. For script use see the -i option. + +
    -i
    +
    Read the password from stdin without verification (for script usage).
    -c
    Create the passwdfile. If passwdfile already @@ -139,15 +158,26 @@
    Use MD5 encryption for passwords. On Windows and Netware, this is the default.
    +
    -B
    +
    Use bcrypt encryption for passwords. This is currently considered to + be very secure.
    + +
    -C
    +
    This flag is only allowed in combination with -B (bcrypt + encryption). It sets the computing time used for the bcrypt algorithm + (higher is more secure but slower, default: 5, valid: 4 to 31).
    +
    -d
    Use crypt() encryption for passwords. The default on all platforms but Windows and Netware. Though possibly supported by htdbm on all platforms, it is not supported by the - httpd server on Windows and Netware.
    + httpd server on Windows and Netware. + This algorithm is insecure by today's standards.
    -s
    Use SHA encryption for passwords. Facilitates migration from/to Netscape - servers using the LDAP Directory Interchange Format (ldif).
    + servers using the LDAP Directory Interchange Format (ldif). + This algorithm is insecure by today's standards.
    -p
    Use plaintext passwords. Though htdbm will support @@ -158,12 +188,6 @@
    Print each of the usernames and comments from the database on stdout.
    -
    -t
    -
    Interpret the final parameter as a comment. When this option is - specified, an additional string can be appended to the command line; this - string will be stored in the "Comment" field of the database, associated - with the specified username.
    -
    -v
    Verify the username and password. The program will print a message indicating whether the supplied password is valid. If the password is @@ -173,6 +197,12 @@
    Delete user. If the username exists in the specified DBM file, it will be deleted.
    +
    -t
    +
    Interpret the final parameter as a comment. When this option is + specified, an additional string can be appended to the command line; this + string will be stored in the "Comment" field of the database, associated + with the specified username.
    +
    filename
    The filename of the DBM format file. Usually without the extension .db, .pag, or .dir. If @@ -259,6 +289,18 @@

    The use of the -b option is discouraged, since when it is used the unencrypted password appears on the command line.

    + +

    When using the crypt() algorithm, note that only the first + 8 characters of the password are used to form the password. If the supplied + password is longer, the extra characters will be silently discarded.

    + +

    The SHA encryption format does not use salting: for a given password, + there is only one encrypted representation. The crypt() and + MD5 formats permute the representation by prepending a random salt string, + to make dictionary attacks against the passwords more difficult.

    + +

    The SHA and crypt() formats are insecure by today's + standards.

    top

    Restrictions

    @@ -276,8 +318,30 @@

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htdbm.html.fr b/docs/manual/programs/htdbm.html.fr new file mode 100644 index 00000000000..1d751f554e0 --- /dev/null +++ b/docs/manual/programs/htdbm.html.fr @@ -0,0 +1,384 @@ + + + + + +htdbm - Manipuler des bases de donnes DBM de mots de +passe - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    htdbm - Manipuler des bases de donnes DBM de mots de +passe

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    + +

    htdbm permet de manipuler des fichiers au format DBM + ou sont stocks des nom d'utilisateurs et mots de passe des fins + d'authentification de base des utilisateurs HTTP via le module + mod_authn_dbm. Voir la documentation de + dbmmanage pour plus de dtails propos de ces + fichiers DBM.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    htdbm + [ -TDBTYPE ] + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur

    + +

    htdbm -b + [ -TDBTYPE ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur mot-de-passe

    + +

    htdbm -n + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-utilisateur

    + +

    htdbm -nb + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-utilisateur mot-de-passe

    + +

    htdbm -v + [ -TDBTYPE ] + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur

    + +

    htdbm -vb + [ -TDBTYPE ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur mot-de-passe

    + +

    htdbm -x + [ -TDBTYPE ] + nom-fichier nom-utilisateur

    + +

    htdbm -l + [ -TDBTYPE ] +

    +
    top
    +
    +

    Options

    +
    +
    -b
    +
    Utilise le mode batch ; en d'autres termes, le mot de passe est + extrait de la ligne de commande au lieu d'tre demand + l'oprateur. Cette option doit tre utilise avec la plus grande + prudence, car le mot de passe est visible en clair + dans la ligne de commande. Pour utiliser un script, voir l'option + -i.
    + +
    -i
    +
    Lit le mot de passe depuis stdin sans vrification ( utiliser + dans le cadre d'un script).
    + +
    -c
    +
    Cre le fichier-mots-de-passe. Si + fichier-mots-de-passe existe dj, il est rcrit et + tronqu. Cette option ne peut pas tre combine avec l'option + -n.
    + +
    -n
    +
    Affiche les rsultats sur la sortie standard et ne met pas + jour la base de donnes. Cette option modifie la syntaxe de la ligne + de commande, car l'argument fichier-mots-de-passe (en + gnral le premier) est omis. Elle ne peut pas tre combine avec + l'option -c.
    + +
    -m
    +
    Utilise un chiffrement MD5 pour les mots de passe. Sous Windows + et Netware, c'est l'option par dfaut..
    + +
    -B
    +
    Utilise l'algorythme de chiffrement bcrypt pour les mots de + passe. C'est un algorythme actuellement considr comme sr.
    + +
    -C
    +
    Ce drapeau n'est autoris qu'en conjonction avec le drapeau + -B (chiffrement bcrypt). Il permet de dfinir la dure + de traitement pour l'algorythme de chiffrement bcrypt (plus elle est + longue, plus la scurit est leve, mais la rapidit est diminue + d'autant) ; la valeur par dfaut est 5, les valeurs valides vont de + 4 31.
    + + +
    -d
    +
    Utilise un chiffrement crypt() pour les mots de + passe. C'est l'option par dfaut sur toutes les plates-formes, sauf + Windows et Netware. Bien que htdbm supporte ce + chiffrement sur toutes les plates-formes, il n'est pas support par + le serveur httpd sous Windows et Netware. Cet + algorythme est considr comme non sr selon les + standards actuels.
    + +
    -s
    +
    Utilise le chiffrement SHA pour les mots de passe. Facilite la + migration vers/depuis les serveurs Netscape qui utilisent le format + LDAP Directory Interchange (ldif). Cet + algorythme est considr comme non sr selon les + standards actuels.
    + +
    -p
    +
    Utilise des mots de passe au format texte en clair. Bien que + htdbm supporte ce format sur toutes les plates-formes, + le dmon httpd n'accepte les mots de passe au + format texte en clair que sous Windows et Netware.
    + +
    -l
    +
    Affiche chaque nom d'utilisateur de la base de donnes + accompagn de son commentaire sur la sortie standard.
    + +
    -v
    +
    Vrifie une association nom d'utilisateur/mot de passe. Le + programme affichera un message indiquant si le mot de passe fourni + est valide. Si le mot de passe n'est pas valide, le programme + s'arrte et renvoie un code d'erreur 3.
    + +
    -x
    +
    Supprime l'utilisateur. Si le nom d'utilisateur existe dans le + fichier DBM spcifi, il sera supprim.
    + +
    -t
    +
    Interprte le dernier paramtre en tant que commentaire. Avec + cette option, il est possible d'ajouter une chane supplmentaire + la fin de la ligne de commande ; le contenu de cette chane sera + stock dans la base de donnes dans le champ "Comment" associ au + nom d'utilisateur spcifi.
    + +
    nom-fichier
    +
    Le nom du fichier au format DBM en gnral sans l'extension + .db, .pag, ou .dir. Avec + l'option -c, le fichier DBM est mis jour s'il existe + ou cr dans le cas contraire.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur crer ou mettre jour dans le + fichier-mots-de-passe. Si nom-utilisateur + n'existe pas dans ce fichier, une entre est ajoute. S'il existe, + son mot de passe est modifi.
    + +
    mot-de-passe
    +
    Le mot de passe en clair destin tre chiffr et stock dans + le fichier DBM. Ne s'utilise qu'avec l'option -b.
    + +
    -TDBTYPE
    +
    Type de fichier DBM (SDBM, GDBM, DB, ou "default").
    +
    +
    top
    +
    +

    Bugs

    +

    Vous devez garder l'esprit qu'il existe de nombreux formats de + fichiers DBM diffrents, et que selon toute vraisemblance, des + bibliothques pour plus d'un format sont prsentes sur votre + systme. Les trois exemples de base sont SDBM, NDBM, le projet GNU + GDBM, et Berkeley/Sleepycat DB 2/3/4. Malheureusement, toutes ces + bibliothques + utilisent des formats de fichiers diffrents, et vous devez vous + assurer que le format de fichier utilis par nom-fichier + correspond au format attendu par htdbm. + Actuellement, htdbm n'a aucun moyen de savoir + quel type de fichier DBM il a faire. S'il est utilis avec un + format inappropri, il ne renverra rien, ou pourra crer un fichier + DBM diffrent avec un nom diffrent, ou au pire, va corrompre le + fichier DBM si vous avez tent de le modifier.

    + +

    Vous pouvez utiliser le programme file fourni par la + plupart des systmes Unix pour dterminer le format d'un fichier + DBM.

    +
    top
    +
    +

    Valeur renvoye

    +

    htdbm renvoie 0 ("true") si les nom d'utilisateur et + mot de passe ont t crs ou mis jour avec succs dans le fichier + DBM. htdbm renvoie 1 s'il a rencontr un + problme d'accs aux fichiers, 2 si la ligne de + commande comportait une erreur de syntaxe, 3 si le mot + de passe a t fourni interactivement et s'il est invalide pour + l'entre considre, 4 si l'opration a t + interrompue, 5 si une valeur est trop longue (nom + utilisateur, nom fichier, mot de passe, ou l'enregistrement aprs + son laboration), 6 si le nom d'utilisateur contient + des caractres illgaux (voir la section Restrictions), et 7 si le + fichier n'est pas un fichier de mots de passe DBM valide.

    +
    top
    +
    +

    Exemples

    +

    + htdbm /usr/local/etc/apache/.utilisateurs-htdbm jsmith +

    + +

    Ajoute ou modifie le mot de passe de l'utilisateur + jsmith. Le mot de passe est demand l'oprateur. Sous + Windows, le mot de passe sera chiffr en utilisant l'algorithme MD5 + Apache modifi ; dans les autres cas, c'est la routine + crypt() du systme qui sera utilise. Si le fichier + n'existe pas, htdbm s'arrtera et renverra une + erreur.

    + +

    + htdbm -c /home/doe/public_html/.htdbm jane +

    + +

    Cre un nouveau fichier et y enregistre une entre pour + l'utilisateur jane. Le mot de passe est demand + l'oprateur. Si le fichier existe et ne peut pas tre lu, ou ne peut + pas tre crit, il ne sera pas modifi et + htdbm affichera un message et renverra un code + d'erreur.

    + +

    + htdbm -mb /usr/web/.htdbm-tous jones Pwd4Steve +

    + +

    Chiffre le mot de passe entr avec la ligne de commande + (Pwd4Steve) l'aide de l'algorithme MD5, et + l'enregistre dans le fichier spcifi.

    +
    top
    +
    +

    Considrations propos de scurit

    +

    Les fichiers de mots de passe Web tels que ceux que gre + htdbm ne doivent pas tre stocks dans + l'espace d'URI du serveur Web -- en d'autres termes, il ne doit pas + tre possible d'y accder l'aide d'un navigateur.

    + +

    L'utilisation de l'option -b est dconseille, car + lorsqu'il est utilis, le mot de passe apparat en clair dans la + ligne de commande.

    + +

    Notez que lorsque vous utilisez l'algorythme + crypt(), seuls les 8 premiers caractres du mot de + passe sont pris en compte. Si le mot de passe fourni est plus long, + les caractres supplmentaires seront ignors sans avertissement.

    + +

    L'algorythme SHA ne permet pas de spcifier une valeur + d'initialisation pour la gnration de nombres alatoires (salting) + : un mot de passe donn ne possde ainsi qu'une rprsentation + chiffre. Les algorythmes crypt() et MD5 permettent quant + eux des reprsentations chiffres multiples en acceptant comme + paramtre une chane d'initialisation (salt), rendant les attaques + base de dictionnaires contre les mots de passe plus difficiles.

    + +

    Les algorythmes SHA et crypt() sont considrs comme + non srs selon les standards actuels.

    +
    top
    +
    +

    Restrictions

    +

    Sur la plate-forme Windows, les mots de passe chiffrs avec + htdbm ont une taille limite 255 + caractres. Si le mot de passe fourni est plus long, il sera tronqu + 255 caractres.

    + +

    L'algorithme MD5 utilis par htdbm est spcifique + Apache ; les mots de passe chiffrs en utilisant cet algorithme + seront inutilisables sur d'autres serveurs Web.

    + +

    Les noms d'utilisateurs ont une taille limite 255 + octets et ne doivent pas contenir de caractre :.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/htdbm.html.tr.utf8 b/docs/manual/programs/htdbm.html.tr.utf8 index 9058163087f..a43b1028b1b 100644 --- a/docs/manual/programs/htdbm.html.tr.utf8 +++ b/docs/manual/programs/htdbm.html.tr.utf8 @@ -1,24 +1,30 @@ - -htdbm - DBM parola veritabanlarını yönetir - Apache HTTP Sunucusu +htdbm - DBM parola veritabanlarını yönetir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    htdbm - DBM parola veritabanlarını yönetir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    htdbm - DBM parola veritabanlarını yönetir

    Mevcut Diller:  en  | + fr  |  tr 

    @@ -36,39 +42,46 @@
  • Örnekler
  • Güvenlik Değerlendirmeleri
  • Kısıtlamalar
  • -

    Ayrıca bakınız:

    +

    Ayrıca bakınız:

    top

    Kullanım

    htdbm [ -TVTtürü ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] - [ -x ] parola-dosyası kullanıcı

    htdbm -b [ -TVTtürü ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] parola-dosyası kullanıcı parola

    htdbm -n + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] kullanıcı

    @@ -76,20 +89,25 @@

    htdbm -nb [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] kullanıcı parola

    htdbm -v [ -TVTtürü ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] parola-dosyası kullanıcı

    @@ -98,19 +116,17 @@ [ -TVTtürü ] [ -c ] [ -m | + -B -d | - -p | - -s ] + -s | + -p ] + [ -C bedel ] [ -t ] [ -v ] parola-dosyası kullanıcı parola

    htdbm -x [ -TVTtürü ] - [ -m | - -d | - -p | - -s ] parola-dosyası kullanıcı

    htdbm -l @@ -123,7 +139,12 @@

    -b
    Betik kipi; parola için istek yapmak yerine parola komut satırından verilir. Parola komut satırında görünür olacağından çok - dikkatli kullanmak gerekir.
    + dikkatli kullanmak gerekir. Betik kullanımı için + -i seçeneğine bakınız. + +
    -i
    +
    Parolayı doğrulamaksızın standart girdiden okur (betik kullanımı + için).
    -c
    parola-dosyası oluşturur. Dosya mevcutsa, @@ -140,17 +161,30 @@
    Parolalar için MD5 şifrelemesi kullanılır. Windows ve Netware için bu öntanımlıdır.
    +
    -B
    +
    Parolalar için bcrypt şifrelemesi kullanılır. Şu an için çok güvenli + kabul edilmektedir.
    + +
    -C bedel
    +
    Bu seçenek sadece -B (bcrypt şifrelemesi) + seçeneği ile birlikte kullanılabilir. Bcrypt algoritmasına hesaplama + süresini belirtir (daha yüksek değerler daha güvenlidir, öntanımlı 5, + geçerli değerler: 4 - 31).
    +
    -d
    Parolaları şifrelemek için crypt() kullanılır. Windows, ve Netware dışında öntanımlıdır. htdbm tarafından tüm platformlarda destekleniyor olsa da Windows ve Netware üzerinde - httpd sunucusu tarafından desteklenmez.
    + httpd sunucusu tarafından desteklenmez. Bu algoritma + günümüz standartlarında güvenilmez kabul + edilmektedir.
    -s
    Parolalar için SHA şifrelemesi kullanılır. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü - kolaylaştırır.
    + kolaylaştırır. Bu algoritma günümüz standartlarında + güvenilmez kabul edilmektedir.
    -p
    Düz metin parolalar kullanılır. htdbm @@ -162,12 +196,6 @@
    Veritabanındaki kullanıcıları açıklamalarıyla birlikte standart çıktıya gönderir.
    -
    -t
    -
    Son değiştirgenin bir açıklama olarak yorumlanmasını sağlar. Bu - seçenek kullanıldığında komut satırının sonuna fazladan bir dizge - eklenebilir. Bu dizge, veritabanında belirtilen kullanıcının "Comment" - alanında saklanır.
    -
    -v
    Kullanıcı adını ve parolasını doğrular. Program belirtilen parolanın geçerli olup olmadığını belirten bir ileti basar. Eğer parola geçersizse @@ -177,6 +205,12 @@
    Kullanıcıyı siler. Kullanıcı belirtilen DBM dosyasında mevcutsa silinir.
    +
    -t
    +
    Son değiştirgenin bir açıklama olarak yorumlanmasını sağlar. Bu + seçenek kullanıldığında komut satırının sonuna fazladan bir dizge + eklenebilir. Bu dizge, veritabanında belirtilen kullanıcının "Comment" + alanında saklanır.
    +
    parola-dosyası
    DBM dosyasının ismi. Genellikle, .db, .pag veya .dir eklentisi olmaksızın belirtilir. @@ -267,6 +301,19 @@

    Komut satırında parolanın şifrelenmemiş olarak görünmesi sebebiyle -b seçeneğinin kullanımından kaçınılmasını öneriyoruz.

    + +

    crypt() algoritması kullanılırken, parolayı + şekillendirmek için parolanın ilk 8 baytının kullanılacağına dikkat + ediniz. Eğer parola 8 bayttan uzunsa kalanlar bir uyarı verilmeksizin + iptal edilir.

    + +

    SHA şifreleme biçeminde tuz kullanılmaz; yani, bir parolanın + sadece bir şifreli gösterimi olabilir. crypt() ve + MD5 biçemleri parolanın önüne rasgele üretilmiş bir tuz dizgesi + eklediklerinden sözlük saldırılarına karşı daha dayanıklıdır.

    + +

    SHA ve crypt() biçimleri günümüz standartlarında + güvenilmez kabul edilmektedir.

    top

    Kısıtlamalar

    @@ -283,8 +330,30 @@

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htdbm.xml b/docs/manual/programs/htdbm.xml index 5cc2c313dee..79d08b6f842 100644 --- a/docs/manual/programs/htdbm.xml +++ b/docs/manual/programs/htdbm.xml @@ -38,33 +38,40 @@
    Synopsis

    htdbm [ -TDBTYPE ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] - [ -x ] filename username

    htdbm -b [ -TDBTYPE ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username password

    htdbm -n + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] username

    @@ -72,20 +79,25 @@

    htdbm -nb [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] username password

    htdbm -v [ -TDBTYPE ] + [ -i ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username

    @@ -94,19 +106,17 @@ [ -TDBTYPE ] [ -c ] [ -m | + -B | -d | - -p | - -s ] + -s | + -p ] + [ -C cost ] [ -t ] [ -v ] filename username password

    htdbm -x [ -TDBTYPE ] - [ -m | - -d | - -p | - -s ] filename username

    htdbm -l @@ -120,7 +130,10 @@

    Use batch mode; i.e., get the password from the command line rather than prompting for it. This option should be used with extreme care, since the password is clearly visible on the command - line.
    + line. For script use see the -i option. + +
    -i
    +
    Read the password from stdin without verification (for script usage).
    -c
    Create the passwdfile. If passwdfile already @@ -137,15 +150,26 @@
    Use MD5 encryption for passwords. On Windows and Netware, this is the default.
    +
    -B
    +
    Use bcrypt encryption for passwords. This is currently considered to + be very secure.
    + +
    -C
    +
    This flag is only allowed in combination with -B (bcrypt + encryption). It sets the computing time used for the bcrypt algorithm + (higher is more secure but slower, default: 5, valid: 4 to 31).
    +
    -d
    Use crypt() encryption for passwords. The default on all platforms but Windows and Netware. Though possibly supported by htdbm on all platforms, it is not supported by the - httpd server on Windows and Netware.
    + httpd server on Windows and Netware. + This algorithm is insecure by today's standards.
    -s
    Use SHA encryption for passwords. Facilitates migration from/to Netscape - servers using the LDAP Directory Interchange Format (ldif).
    + servers using the LDAP Directory Interchange Format (ldif). + This algorithm is insecure by today's standards.
    -p
    Use plaintext passwords. Though htdbm will support @@ -156,12 +180,6 @@
    Print each of the usernames and comments from the database on stdout.
    -
    -t
    -
    Interpret the final parameter as a comment. When this option is - specified, an additional string can be appended to the command line; this - string will be stored in the "Comment" field of the database, associated - with the specified username.
    -
    -v
    Verify the username and password. The program will print a message indicating whether the supplied password is valid. If the password is @@ -171,6 +189,12 @@
    Delete user. If the username exists in the specified DBM file, it will be deleted.
    +
    -t
    +
    Interpret the final parameter as a comment. When this option is + specified, an additional string can be appended to the command line; this + string will be stored in the "Comment" field of the database, associated + with the specified username.
    +
    filename
    The filename of the DBM format file. Usually without the extension .db, .pag, or .dir. If @@ -257,6 +281,18 @@

    The use of the -b option is discouraged, since when it is used the unencrypted password appears on the command line.

    + +

    When using the crypt() algorithm, note that only the first + 8 characters of the password are used to form the password. If the supplied + password is longer, the extra characters will be silently discarded.

    + +

    The SHA encryption format does not use salting: for a given password, + there is only one encrypted representation. The crypt() and + MD5 formats permute the representation by prepending a random salt string, + to make dictionary attacks against the passwords more difficult.

    + +

    The SHA and crypt() formats are insecure by today's + standards.

    Restrictions diff --git a/docs/manual/programs/htdbm.xml.fr b/docs/manual/programs/htdbm.xml.fr new file mode 100644 index 00000000000..2b683b73469 --- /dev/null +++ b/docs/manual/programs/htdbm.xml.fr @@ -0,0 +1,351 @@ + + + + + + + + + + +Programmes + +htdbm - Manipuler des bases de données DBM de mots de +passe + + +

    htdbm permet de manipuler des fichiers au format DBM + ou sont stockés des nom d'utilisateurs et mots de passe à des fins + d'authentification de base des utilisateurs HTTP via le module + mod_authn_dbm. Voir la documentation de + dbmmanage pour plus de détails à propos de ces + fichiers DBM.

    +
    +httpd +dbmmanage +mod_authn_dbm + +
    Syntaxe +

    htdbm + [ -TDBTYPE ] + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur

    + +

    htdbm -b + [ -TDBTYPE ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur mot-de-passe

    + +

    htdbm -n + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-utilisateur

    + +

    htdbm -nb + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-utilisateur mot-de-passe

    + +

    htdbm -v + [ -TDBTYPE ] + [ -i ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur

    + +

    htdbm -vb + [ -TDBTYPE ] + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -t ] + [ -v ] + nom-fichier nom-utilisateur mot-de-passe

    + +

    htdbm -x + [ -TDBTYPE ] + nom-fichier nom-utilisateur

    + +

    htdbm -l + [ -TDBTYPE ] +

    +
    + +
    Options +
    +
    -b
    +
    Utilise le mode batch ; en d'autres termes, le mot de passe est + extrait de la ligne de commande au lieu d'être demandé à + l'opérateur. Cette option doit être utilisée avec la plus grande + prudence, car le mot de passe est visible en clair + dans la ligne de commande. Pour utiliser un script, voir l'option + -i.
    + +
    -i
    +
    Lit le mot de passe depuis stdin sans vérification (à utiliser + dans le cadre d'un script).
    + +
    -c
    +
    Crée le fichier-mots-de-passe. Si + fichier-mots-de-passe existe déjà, il est réécrit et + tronqué. Cette option ne peut pas être combinée avec l'option + -n.
    + +
    -n
    +
    Affiche les résultats sur la sortie standard et ne met pas à + jour la base de données. Cette option modifie la syntaxe de la ligne + de commande, car l'argument fichier-mots-de-passe (en + général le premier) est omis. Elle ne peut pas être combinée avec + l'option -c.
    + +
    -m
    +
    Utilise un chiffrement MD5 pour les mots de passe. Sous Windows + et Netware, c'est l'option par défaut..
    + +
    -B
    +
    Utilise l'algorythme de chiffrement bcrypt pour les mots de + passe. C'est un algorythme actuellement considéré comme sûr.
    + +
    -C
    +
    Ce drapeau n'est autorisé qu'en conjonction avec le drapeau + -B (chiffrement bcrypt). Il permet de définir la durée + de traitement pour l'algorythme de chiffrement bcrypt (plus elle est + longue, plus la sécurité est élevée, mais la rapidité est diminuée + d'autant) ; la valeur par défaut est 5, les valeurs valides vont de + 4 à 31.
    + + +
    -d
    +
    Utilise un chiffrement crypt() pour les mots de + passe. C'est l'option par défaut sur toutes les plates-formes, sauf + Windows et Netware. Bien que htdbm supporte ce + chiffrement sur toutes les plates-formes, il n'est pas supporté par + le serveur httpd sous Windows et Netware. Cet + algorythme est considéré comme non sûr selon les + standards actuels.
    + +
    -s
    +
    Utilise le chiffrement SHA pour les mots de passe. Facilite la + migration vers/depuis les serveurs Netscape qui utilisent le format + LDAP Directory Interchange (ldif). Cet + algorythme est considéré comme non sûr selon les + standards actuels.
    + +
    -p
    +
    Utilise des mots de passe au format texte en clair. Bien que + htdbm supporte ce format sur toutes les plates-formes, + le démon httpd n'accepte les mots de passe au + format texte en clair que sous Windows et Netware.
    + +
    -l
    +
    Affiche chaque nom d'utilisateur de la base de données + accompagné de son commentaire sur la sortie standard.
    + +
    -v
    +
    Vérifie une association nom d'utilisateur/mot de passe. Le + programme affichera un message indiquant si le mot de passe fourni + est valide. Si le mot de passe n'est pas valide, le programme + s'arrête et renvoie un code d'erreur 3.
    + +
    -x
    +
    Supprime l'utilisateur. Si le nom d'utilisateur existe dans le + fichier DBM spécifié, il sera supprimé.
    + +
    -t
    +
    Interprète le dernier paramètre en tant que commentaire. Avec + cette option, il est possible d'ajouter une chaîne supplémentaire à + la fin de la ligne de commande ; le contenu de cette chaîne sera + stocké dans la base de données dans le champ "Comment" associé au + nom d'utilisateur spécifié.
    + +
    nom-fichier
    +
    Le nom du fichier au format DBM en général sans l'extension + .db, .pag, ou .dir. Avec + l'option -c, le fichier DBM est mis à jour s'il existe + ou créé dans le cas contraire.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur à créer ou mettre à jour dans le + fichier-mots-de-passe. Si nom-utilisateur + n'existe pas dans ce fichier, une entrée est ajoutée. S'il existe, + son mot de passe est modifié.
    + +
    mot-de-passe
    +
    Le mot de passe en clair destiné à être chiffré et stocké dans + le fichier DBM. Ne s'utilise qu'avec l'option -b.
    + +
    -TDBTYPE
    +
    Type de fichier DBM (SDBM, GDBM, DB, ou "default").
    +
    +
    + +
    Bugs +

    Vous devez garder à l'esprit qu'il existe de nombreux formats de + fichiers DBM différents, et que selon toute vraisemblance, des + bibliothèques pour plus d'un format sont présentes sur votre + système. Les trois exemples de base sont SDBM, NDBM, le projet GNU + GDBM, et Berkeley/Sleepycat DB 2/3/4. Malheureusement, toutes ces + bibliothèques + utilisent des formats de fichiers différents, et vous devez vous + assurer que le format de fichier utilisé par nom-fichier + correspond au format attendu par htdbm. + Actuellement, htdbm n'a aucun moyen de savoir à + quel type de fichier DBM il a à faire. S'il est utilisé avec un + format inapproprié, il ne renverra rien, ou pourra créer un fichier + DBM différent avec un nom différent, ou au pire, va corrompre le + fichier DBM si vous avez tenté de le modifier.

    + +

    Vous pouvez utiliser le programme file fourni par la + plupart des systèmes Unix pour déterminer le format d'un fichier + DBM.

    +
    + +
    Valeur renvoyée +

    htdbm renvoie 0 ("true") si les nom d'utilisateur et + mot de passe ont été créés ou mis à jour avec succès dans le fichier + DBM. htdbm renvoie 1 s'il a rencontré un + problème d'accès aux fichiers, 2 si la ligne de + commande comportait une erreur de syntaxe, 3 si le mot + de passe a été fourni interactivement et s'il est invalide pour + l'entrée considérée, 4 si l'opération a été + interrompue, 5 si une valeur est trop longue (nom + utilisateur, nom fichier, mot de passe, ou l'enregistrement après + son élaboration), 6 si le nom d'utilisateur contient + des caractères illégaux (voir la section Restrictions), et 7 si le + fichier n'est pas un fichier de mots de passe DBM valide.

    +
    + +
    Exemples + + htdbm /usr/local/etc/apache/.utilisateurs-htdbm jsmith + + +

    Ajoute ou modifie le mot de passe de l'utilisateur + jsmith. Le mot de passe est demandé à l'opérateur. Sous + Windows, le mot de passe sera chiffré en utilisant l'algorithme MD5 + Apache modifié ; dans les autres cas, c'est la routine + crypt() du système qui sera utilisée. Si le fichier + n'existe pas, htdbm s'arrêtera et renverra une + erreur.

    + + + htdbm -c /home/doe/public_html/.htdbm jane + + +

    Crée un nouveau fichier et y enregistre une entrée pour + l'utilisateur jane. Le mot de passe est demandé à + l'opérateur. Si le fichier existe et ne peut pas être lu, ou ne peut + pas être écrit, il ne sera pas modifié et + htdbm affichera un message et renverra un code + d'erreur.

    + + + htdbm -mb /usr/web/.htdbm-tous jones Pwd4Steve + + +

    Chiffre le mot de passe entré avec la ligne de commande + (Pwd4Steve) à l'aide de l'algorithme MD5, et + l'enregistre dans le fichier spécifié.

    +
    + +
    Considérations à propos de sécurité +

    Les fichiers de mots de passe Web tels que ceux que gère + htdbm ne doivent pas être stockés dans + l'espace d'URI du serveur Web -- en d'autres termes, il ne doit pas + être possible d'y accéder à l'aide d'un navigateur.

    + +

    L'utilisation de l'option -b est déconseillée, car + lorsqu'il est utilisé, le mot de passe apparaît en clair dans la + ligne de commande.

    + +

    Notez que lorsque vous utilisez l'algorythme + crypt(), seuls les 8 premiers caractères du mot de + passe sont pris en compte. Si le mot de passe fourni est plus long, + les caractères supplémentaires seront ignorés sans avertissement.

    + +

    L'algorythme SHA ne permet pas de spécifier une valeur + d'initialisation pour la génération de nombres aléatoires (salting) + : un mot de passe donné ne possède ainsi qu'une réprésentation + chiffrée. Les algorythmes crypt() et MD5 permettent quant à + eux des représentations chiffrées multiples en acceptant comme + paramètre une chaîne d'initialisation (salt), rendant les attaques à + base de dictionnaires contre les mots de passe plus difficiles.

    + +

    Les algorythmes SHA et crypt() sont considérés comme + non sûrs selon les standards actuels.

    +
    + +
    Restrictions +

    Sur la plate-forme Windows, les mots de passe chiffrés avec + htdbm ont une taille limitée à 255 + caractères. Si le mot de passe fourni est plus long, il sera tronqué + à 255 caractères.

    + +

    L'algorithme MD5 utilisé par htdbm est spécifique à + Apache ; les mots de passe chiffrés en utilisant cet algorithme + seront inutilisables sur d'autres serveurs Web.

    + +

    Les noms d'utilisateurs ont une taille limitée à 255 + octets et ne doivent pas contenir de caractère :.

    +
    + +
    diff --git a/docs/manual/programs/htdbm.xml.meta b/docs/manual/programs/htdbm.xml.meta index ff8aa002071..3e6cd174bcf 100644 --- a/docs/manual/programs/htdbm.xml.meta +++ b/docs/manual/programs/htdbm.xml.meta @@ -8,6 +8,7 @@ en + fr tr diff --git a/docs/manual/programs/htdbm.xml.tr b/docs/manual/programs/htdbm.xml.tr index 0ab7d162aa5..cae376a7cf8 100644 --- a/docs/manual/programs/htdbm.xml.tr +++ b/docs/manual/programs/htdbm.xml.tr @@ -1,10 +1,10 @@ - + -htdigest - manage user files for digest authentication - Apache HTTP Server +htdigest - manage user files for digest authentication - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htdigest - manage user files for digest authentication

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htdigest - manage user files for digest authentication

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -37,7 +43,7 @@ +

    See also

    top

    Synopsis

    @@ -57,7 +63,10 @@ exist, or deleted and recreated if it does exist.
    realm
    -
    The realm name to which the user name belongs.
    +
    The realm name to which the user name belongs. See + + http://tools.ietf.org/html/rfc2617#section-3.2.1 for more details. +
    username
    The user name to create or update in passwdfile. If @@ -72,9 +81,31 @@

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htdigest.html.fr b/docs/manual/programs/htdigest.html.fr new file mode 100644 index 00000000000..a15847ec70b --- /dev/null +++ b/docs/manual/programs/htdigest.html.fr @@ -0,0 +1,119 @@ + + + + + +htdigest - Gestion des fichiers d'utilisateurs pour +l'authentification base de condenss - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    htdigest - Gestion des fichiers d'utilisateurs pour +l'authentification base de condenss

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    htdigest permet de crer et maintenir les fichiers + textes dans lesquels sont stocks des noms d'utilisateurs, des + domaines de protection (realms) et des mots de passe pour + l'authentification base de condenss des utilisateurs HTTP. + L'accs aux ressources du serveur HTTP Apache peut tre limit aux + seuls utilisateurs enregistrs dans les fichiers crs par + htdigest.

    + +

    Cette page de manuel ne dcrit que les arguments de la ligne de + commande. Pour plus de dtails propos des directives ncessaires + la configuration de l'authentification base de condenss dans + httpd, voir le manuel Apache qui est fourni avec + la distribution et peut tre consult http://httpd.apache.org/.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    htdigest [ -c ] + fichier-mots-de-passe realm + nom-utilisateur

    +
    top
    +
    +

    options

    +
    +
    -c
    +
    Cre le fichier fichier-mots-de-passe. Si + fichier-mots-de-passe existe dj, il est tout d'abord + supprim.
    + +
    fichier-mots-de-passe
    +
    Nom du fichier contenant les noms utilisateurs, realms et mots + de passe. Si l'option -c est spcifie, le fichier est + cr s'il n'existe pas, ou supprim et recr s'il existe + dj.
    + +
    realm
    +
    Le nom du domaine de protection auquel le nom d'utilisateur + appartient. Voir http://tools.ietf.org/html/rfc2617#section-3.2.1 + pour plus de dtails.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur crer ou mettre jour dans le + fichier-mots-de-passe. Si nom-utilisateur est + absent de ce fichier, une nouvelle entre est ajoute. Si + l'utilisateur existe dj, le mot de passe est modifi.
    +
    +
    top
    +
    +

    Considrations propos de scurit

    +

    En tant qu'excutable setuid, ce programme n'est pas sr. En + consquence, vitez de lui attribuer des permissions setuid.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/htdigest.html.ko.euc-kr b/docs/manual/programs/htdigest.html.ko.euc-kr index 7ef560f2516..a5b575784a6 100644 --- a/docs/manual/programs/htdigest.html.ko.euc-kr +++ b/docs/manual/programs/htdigest.html.ko.euc-kr @@ -1,26 +1,32 @@ - htdigest - digest authentication -Ѵ - Apache HTTP Server +Ѵ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htdigest - digest authentication +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htdigest - digest authentication Ѵ

    @@ -39,7 +45,7 @@
    +

    top

    @@ -69,9 +75,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htdigest.html.tr.utf8 b/docs/manual/programs/htdigest.html.tr.utf8 index 100b8756ed3..28bc29f035f 100644 --- a/docs/manual/programs/htdigest.html.tr.utf8 +++ b/docs/manual/programs/htdigest.html.tr.utf8 @@ -1,24 +1,30 @@ - -htdigest - Özet kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu +htdigest - Özet kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    htdigest - Özet kimlik doğrulama dosyalarını yönetir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    htdigest - Özet kimlik doğrulama dosyalarını yönetir

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    @@ -40,7 +46,7 @@ +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -60,7 +66,9 @@ değilse oluşturulur, dosya mevcutsa silinip yeniden oluşturulur.
    bölge
    -
    Kullanıcının mensup olduğu bölge ismi.
    +
    Kullanıcının mensup olduğu bölge ismi. Daha fazla bilgi için: + + http://tools.ietf.org/html/rfc2617#section-3.2.1
    kullanıcı
    parola-dosyası'nda oluşturulacak veya @@ -76,9 +84,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htdigest.xml b/docs/manual/programs/htdigest.xml index fc9df711a6e..1459a8d446c 100644 --- a/docs/manual/programs/htdigest.xml +++ b/docs/manual/programs/htdigest.xml @@ -57,7 +57,10 @@ exist, or deleted and recreated if it does exist.
    realm
    -
    The realm name to which the user name belongs.
    +
    The realm name to which the user name belongs. See + + http://tools.ietf.org/html/rfc2617#section-3.2.1 for more details. +
    username
    The user name to create or update in passwdfile. If diff --git a/docs/manual/programs/htdigest.xml.fr b/docs/manual/programs/htdigest.xml.fr new file mode 100644 index 00000000000..b57c8fce25c --- /dev/null +++ b/docs/manual/programs/htdigest.xml.fr @@ -0,0 +1,88 @@ + + + + + + + + + + +Programmes + +htdigest - Gestion des fichiers d'utilisateurs pour +l'authentification à base de condensés + + +

    htdigest permet de créer et maintenir les fichiers + textes dans lesquels sont stockés des noms d'utilisateurs, des + domaines de protection (realms) et des mots de passe pour + l'authentification à base de condensés des utilisateurs HTTP. + L'accès aux ressources du serveur HTTP Apache peut être limité aux + seuls utilisateurs enregistrés dans les fichiers créés par + htdigest.

    + +

    Cette page de manuel ne décrit que les arguments de la ligne de + commande. Pour plus de détails à propos des directives nécessaires à + la configuration de l'authentification à base de condensés dans + httpd, voir le manuel Apache qui est fourni avec + la distribution et peut être consulté à http://httpd.apache.org/.

    +
    +httpd +mod_auth_digest + +
    Syntaxe +

    htdigest [ -c ] + fichier-mots-de-passe realm + nom-utilisateur

    +
    + +
    options +
    +
    -c
    +
    Crée le fichier fichier-mots-de-passe. Si + fichier-mots-de-passe existe déjà, il est tout d'abord + supprimé.
    + +
    fichier-mots-de-passe
    +
    Nom du fichier contenant les noms utilisateurs, realms et mots + de passe. Si l'option -c est spécifiée, le fichier est + créé s'il n'existe pas, ou supprimé et recréé s'il existe + déjà.
    + +
    realm
    +
    Le nom du domaine de protection auquel le nom d'utilisateur + appartient. Voir http://tools.ietf.org/html/rfc2617#section-3.2.1 + pour plus de détails.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur à créer ou mettre à jour dans le + fichier-mots-de-passe. Si nom-utilisateur est + absent de ce fichier, une nouvelle entrée est ajoutée. Si + l'utilisateur existe déjà, le mot de passe est modifié.
    +
    +
    + +
    Considérations à propos de sécurité +

    En tant qu'exécutable setuid, ce programme n'est pas sûr. En + conséquence, évitez de lui attribuer des permissions setuid.

    +
    + +
    diff --git a/docs/manual/programs/htdigest.xml.ko b/docs/manual/programs/htdigest.xml.ko index 00a234f3714..129d730ce0c 100644 --- a/docs/manual/programs/htdigest.xml.ko +++ b/docs/manual/programs/htdigest.xml.ko @@ -1,7 +1,7 @@ - + + -htpasswd - Manage user files for basic authentication - Apache HTTP Server +htpasswd - Manage user files for basic authentication - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htpasswd - Manage user files for basic authentication

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htpasswd - Manage user files for basic authentication

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -33,13 +39,16 @@ just the users listed in the files created by htpasswd. This program can only manage usernames and passwords stored in a flat-file. It can encrypt and display password information for use in other types of data - stores, though. To use a DBM database see dbmmanage.

    + stores, though. To use a DBM database see dbmmanage or + htdbm.

    -

    htpasswd encrypts passwords using either a version of MD5 - modified for Apache, or the system's crypt() routine. Files - managed by htpasswd may contain both types of passwords; some - user records may have MD5-encrypted passwords while others in the same file - may have passwords encrypted with crypt().

    +

    htpasswd encrypts passwords using either bcrypt, + a version of MD5 modified for Apache, SHA1, or the system's + crypt() routine. Files + managed by htpasswd may contain a mixture of different encoding + types of passwords; some + user records may have bcrypt or MD5-encrypted passwords while others in the + same file may have passwords encrypted with crypt().

    This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in @@ -52,36 +61,52 @@

  • Examples
  • Security Considerations
  • Restrictions
  • -

    See also

    • httpd
    • The scripts in support/SHA1 which come with the -distribution.
    +

    See also

    top

    Synopsis

    htpasswd [ -c ] - [ -m ] - [ -D ] passwdfile username

    + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] passwdfile username

    htpasswd -b [ -c ] [ -m | + -B | -d | - -p | - -s ] - [ -D ] passwdfile username + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] passwdfile username password

    htpasswd -n + [ -i ] [ -m | + -B | -d | -s | - -p ] username

    + -p ] + [ -C cost ] username

    htpasswd -nb [ -m | + -B | -d | -s | - -p ] username password

    + -p ] + [ -C cost ] username + password

    top

    Options

    @@ -90,7 +115,11 @@ distribution.
    Use batch mode; i.e., get the password from the command line rather than prompting for it. This option should be used with extreme care, since the password is clearly visible on the command - line.
    + line. For script use see the -i option. + Available in 2.4.4 and later. + +
    -i
    +
    Read the password from stdin without verification (for script usage).
    -c
    Create the passwdfile. If passwdfile already @@ -105,16 +134,29 @@ distribution. one) is omitted. It cannot be combined with the -c option.
    -m
    -
    Use MD5 encryption for passwords. This is the default.
    +
    Use MD5 encryption for passwords. This is the default (since version + 2.2.18).
    + +
    -B
    +
    Use bcrypt encryption for passwords. This is currently considered to + be very secure.
    + +
    -C
    +
    This flag is only allowed in combination with -B (bcrypt + encryption). It sets the computing time used for the bcrypt algorithm + (higher is more secure but slower, default: 5, valid: 4 to 31).
    -d
    Use crypt() encryption for passwords. This is not supported by the httpd server on Windows and - Netware.
    + Netware. This algorithm limits the password length to 8 characters. + This algorithm is insecure by today's standards. + It used to be the default algorithm until version 2.2.17.
    -s
    Use SHA encryption for passwords. Facilitates migration from/to Netscape - servers using the LDAP Directory Interchange Format (ldif).
    + servers using the LDAP Directory Interchange Format (ldif). + This algorithm is insecure by today's standards.
    -p
    Use plaintext passwords. Though htpasswd will support @@ -125,6 +167,11 @@ distribution.
    Delete user. If the username exists in the specified htpasswd file, it will be deleted.
    +
    -v
    +
    Verify password. Verify that the given password matches the password + of the user stored in the specified htpasswd file. + Available in 2.4.5 and later.
    +
    passwdfile
    Name of the file to contain the user name and password. If -c is given, this file is created if it does not already exist, @@ -202,6 +249,9 @@ distribution. there is only one encrypted representation. The crypt() and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult.

    + +

    The SHA and crypt() formats are insecure by today's + standards.

    top

    Restrictions

    @@ -219,9 +269,31 @@ distribution.

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htpasswd.html.fr b/docs/manual/programs/htpasswd.html.fr new file mode 100644 index 00000000000..a6e2f410980 --- /dev/null +++ b/docs/manual/programs/htpasswd.html.fr @@ -0,0 +1,338 @@ + + + + + +htpasswd - Gestion des fichiers d'utilisateurs pour +l'authentification de base - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    htpasswd - Gestion des fichiers d'utilisateurs pour +l'authentification de base

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    htpasswd permet de crer et de maintenir les + fichiers textes o sont stocks les noms d'utilisateurs et mots de + passe pour l'authentification de base des utilisateurs HTTP. Si + htpasswd rencontre un problme d'accs un fichier, + que ce soit pour crire dans le fichier de sortie, ou pour lire le + fichier d'entre dans le but de le mettre jour, il renvoie un code + d'erreur et n'effectue aucune modification.

    + +

    Il est possible de limiter l'accs aux ressources du serveur HTTP + Apache aux seuls utilisateurs prsents dans les fichiers crs par + htpasswd. Ce programme ne sait grer les noms + d'utilisateurs et mots de passe que s'ils sont stocks dans des + fichiers textes. Il peut cependant chiffrer et afficher les mots de + passe des fins d'utilisation dans d'autres types de bases de + donnes. Pour utiliser une base de donnes DBM, voir le programme + dbmmanage ou htdbm.

    + +

    htpasswd chiffre les mots de passe en utilisant soit + bcrypt, + une version de MD5 modifie pour Apache, soit SHA1, soit la routine + crypt() du systme. Les fichiers grs par + htpasswd peuvent contenir deux types de mots de passe ; + certaines entres peuvent contenir des mots de passe chiffrs en + MD5 ou bcrypt, alors que d'autres entres du mme fichier contiendront des + mots de passe chiffrs avec crypt().

    + +

    Cette page de manuel ne dcrit que les arguments de la ligne de + commande. Pour plus de dtails propos des directives ncessaires + la configuration de l'authentification des utilisateurs dans + httpd, voir le manuel Apache qui est fourni avec + la distribution ou peut tre consult http://httpd.apache.org/.

    +
    +

    Voir aussi

    +
    top
    +
    +

    Syntaxe

    +

    htpasswd + [ -c ] + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] fichier-mots-de-passe nom-utilisateur

    + +

    htpasswd -b + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] fichier-mots-de-passe nom-utilisateur + mot-de-passe

    + +

    htpasswd -n + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] nom-utilisateur

    + +

    htpasswd -nb + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] nom-utilisateur + mot-de-passe

    +
    top
    +
    +

    Options

    +
    +
    -b
    +
    Utilise le mode batch ; c'est dire, extrait le mot de passe de + la ligne de commande au lieu de le demander l'oprateur. Cette + option doit tre utilise avec la plus grande prudence, car + le mot de passe est visible en clair dans la ligne + de commande. Pour utiliser un script, voir l'option + -i. + Disponible partir de la version 2.4.4 du serveur HTTP Apache.
    + +
    -i
    +
    Lit le mot de passe depuis stdin sans vrification ( utiliser + dans les scripts).
    + +
    -c
    +
    Cre le fichier-mots-de-passe. Si + fichier-mots-de-passe existe dj, il est rcrit et + tronqu. Cette option ne peut pas tre combine avec l'option + -n.
    + +
    -n
    +
    Affiche le rsultat du traitement sur la sortie standard au lieu + de mettre jour le fichier. Ceci peut s'avrer utile pour gnrer + des enregistrements de mots de passe qu'Apache pourra utiliser des + fins d'inclusion dans des fichiers de donnes au format autre que + texte. Cette option modifie la syntaxe de la ligne de commande, car + l'argument fichier-mots-de-passe (en gnral le premier) + est omis. Elle ne peut pas tre combine avec l'option + -c option.
    + +
    -m
    +
    Utilise le chiffrement MD5 pour les mots de passe. C'est le + comportement par dfaut (depuis la version 2.2.18).
    + +
    -B
    +
    Utilise bcrypt pour chiffrer les mots de passe. c'est un + algorythme de chiffrement actuellement considr comme sr.
    + +
    -C
    +
    Ce drapeau n'est autoris qu'en conjonction avec le drapeau + -B (chiffrement bcrypt). Il permet de dfinir la dure + de traitement pour l'algorytme bcrypt (plus elle est longue, + meilleure sera la scurit, mais infrieure la rapidit). La valeur + par dfaut est 5 et les valeurs autorises vont de 4 31.
    + + +
    -d
    +
    Utilise le chiffrement crypt() pour les mots de + passe. Cette option n'est pas supporte par le + serveur httpd sous Windows ou Netware. Cet + algorithme limite la longueur des mots de passe 8 caractres ; il + est considr comme non sur du point de vue des + standards actuels. C'tait l'algorithme par dfaut jusqu' la + version 2.2.17.
    + +
    -s
    +
    Utilise le chiffrement SHA pour les mots de passe. Facilite la + migration vers/depuis les serveurs Netscape qui utilisent le format + LDAP Directory Interchange (ldif). Cet algorithme + est considr comme non sur du point de vue des + standards actuels.
    + +
    -p
    +
    Enregistre les mots de passe en clair. Bien que + htpasswd supporte la cration des mots de passe en + clair sur toutes les plates-formes, le dmon + httpd n'accepte les mots de passe en clair que + sous Windows et Netware.
    + +
    -D
    +
    Supprime un utilisateur, sous rserve qu'il existe dans le + fichier spcifi par htpasswd.
    + +
    -v
    +
    Vrifie si le mot de passe fourni correspond au mot de passe de + l'utilisateur enregistr dans le fichier de mots de passe spcifi. + Disponible partir de la version 2.4.5 du serveur HTTP Apache.
    + +
    fichier-mots-de-passe
    +
    Le nom du fichier contenant les noms d'utilisateurs et mots de + passe. Avec l'option -c, le fichier est cr s'il + n'existe pas, ou rcrit et tronqu s'il existe dj.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur crer ou mettre jour dans le + fichier-mots-de-passe. Si nom-utilisateur + n'existe pas, une nouvelle entre est ajoute. Dans le cas + contraire, le mot de passe est modifi.
    + +
    mot-de-passe
    +
    Le mot de passe en clair et destin tre chiffr puis stock + dans le fichier. Cet argument ne s'utilise qu'avec l'option + -b.
    +
    +
    top
    +
    +

    Valeur renvoye

    +

    htpasswd renvoie 0 ("true") si le nom d'utilisateur + et le mot de passe ont t enregistrs ou mis jour avec succs + dans le fichier-mots-de-passe. htpasswd + renvoie 1 s'il a rencontr un problme d'accs aux + fichiers, 2 si la ligne de commande comportait une + erreur de syntaxe, 3 si le mot de passe entr + interactivement ne correspondait pas au nom d'utilisateur, + 4 si l'opration a t interrompue, 5 si + une valeur tait trop longue (nom-utilisateur, nom-fichier, + mot-de-passe, ou l'enregistrement rsultant), 6 si le + nom d'utilisateur contenait des caractres illgaux (voir la section + Restrictions), et 7 si le + fichier spcifi n'tait pas un fichier de mots de passe + valide.

    +
    top
    +
    +

    Exemples

    +

    + htpasswd /usr/local/etc/apache/.utilisateurs-htpasswd jsmith +

    + +

    Ajoute ou modifie le mot de passe de l'utilisateur + jsmith. Le mot de passe est demand l'oprateur. Le + mot de passe sera chiffr en utilisant l'algorithme MD5 + modifi pour Apache. Si le fichier spcifi + n'existe pas, htpasswd renverra un code d'erreur.

    + +

    + htpasswd -c /home/doe/public_html/.htpasswd jane +

    + +

    Cre un nouveau fichier de mots de passe et y enregistre une + entre pour l'utilisateur jane. Le mot de passe est + demand l'oprateur. Si le fichier existe et ne peut tre ni lu ni + crit, il n'est pas modifi et htpasswd affichera un + message et renverra un code d'erreur.

    + +

    + htpasswd -db /usr/web/.htpasswd-tous jones Pwd4Steve +

    + +

    Chiffre le mot de passe spcifi dans la ligne de commande + (Pwd4Steve) en utilisant l'algorithme + crypt(), et le stocke dans le fichier spcifi.

    +
    top
    +
    +

    Considrations propos de scurit

    +

    Les fichiers de mots de passe Web comme ceux que gre + htpasswd ne doivent pas tre situs dans + l'espace d'URI du serveur Web -- en d'autres termes, il ne doit pas + tre possible d'y accder partir d'un navigateur.

    + +

    En tant qu'excutable setuid, ce programme n'est pas sr, et il + ne faut par consquent pas lui attribuer de permissions + setuid.

    + +

    L'utilisation de l'option -b est dconseille, car + avec elle, les mots de passe apparaissent en clair dans la ligne de + commande.

    + +

    Notez qu'avec l'algorithme crypt(), seuls les huit + premiers caractres du mot de passe spcifi sont pris en compte. Si + le mot de passe spcifi est plus long, les caractres + supplmentaires sont ignors.

    + +

    Le format de chiffrement SHA n'utilise pas d'amorage alatoire + (salting) : un mot de passe donn correspond une seule + reprsentation chiffre. Les formats crypt() et MD5 + permutent la reprsentation en la prfixant par une chane d'amorce + alatoire, afin de rendre les attaques de mots de passe base de + dictionnaires plus difficiles.

    + +

    Les algorithmes de chiffrement SHA et crypt() + sont considrs comme non surs du point de vue des + standards actuels.

    +
    top
    +
    +

    Restrictions

    +

    Sur les plates-formes Windows, la taille des mots de passe + chiffrs avec htpasswd est limite 255 + caractres. Les mots de passe dont la taille est suprieure seront + tronqus.

    + +

    L'algorithme MD5 utilis par htpasswd est spcifique + Apache ; les mots de passe chiffrs en utilisant cet algorithme + seront inutilisables sur d'autres serveurs Web.

    + +

    La taille des noms d'utilisateurs est limite 255 + octets et ceux-ci ne doivent pas contenir de caractre + :.

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/htpasswd.html.ko.euc-kr b/docs/manual/programs/htpasswd.html.ko.euc-kr index 72b107b58d8..59d674d84bd 100644 --- a/docs/manual/programs/htpasswd.html.ko.euc-kr +++ b/docs/manual/programs/htpasswd.html.ko.euc-kr @@ -1,26 +1,32 @@ - htpasswd - basic authentication - Ѵ - Apache HTTP Server + Ѵ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    htpasswd - basic authentication +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    htpasswd - basic authentication Ѵ

    @@ -55,7 +61,7 @@
  • Ȼ
  • -

    +

    top

    @@ -211,9 +217,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htpasswd.html.tr.utf8 b/docs/manual/programs/htpasswd.html.tr.utf8 index 5c671eb05e7..4e7ca1fedc0 100644 --- a/docs/manual/programs/htpasswd.html.tr.utf8 +++ b/docs/manual/programs/htpasswd.html.tr.utf8 @@ -1,28 +1,33 @@ - -htpasswd - Temel kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu +htpasswd - Temel kimlik doğrulama dosyalarını yönetir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    htpasswd - Temel kimlik doğrulama dosyalarını yönetir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    htpasswd - Temel kimlik doğrulama dosyalarını yönetir

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    htpasswd, HTTP kullanıcılarının temel kimlik doğrulaması için kullanıcı isimlerinin ve parolalarının @@ -37,15 +42,14 @@ htpasswd sadece düz metin dosyalarda saklanmış kullanıcı isimlerini ve parolalarını yönetirse de, diğer veri saklama türleri için parolayı şifreleyip gösterebilir. Bir DBM veritabanı - kullanmak isterseniz dbmmanage - sayfasına bakınız.

    + kullanmak isterseniz dbmmanage ve + htdbm sayfasına bakınız.

    -

    htpasswd, parolaları şifrelemek için ya - Apache'nin kendine özgü MD5 algoritmasını ya da sistemin - crypt() yordamını kullanır. Bazı kullanıcılar MD5 şifreli - parolalara, bazıları da crypt() ile şifrelenmiş parolalara - sahip olabileceğinden htpasswd tarafından - yönetilen dosyalar her iki tür parolayı da içerebilir.

    +

    htpasswd, parolaları şifrelemek için + bcrypt, Apache'nin kendine özgü MD5 algoritması, SHA1 ya da sistemin + crypt() yordamını kullanır. Bu bakımdan + htpasswd tarafından yönetilen dosyalar farklı + algoritmalarla şifrelenmiş parolalar içerebilir.

    Bu kılavuz sayfası sadece komut satırı değiştirgelerini listeler. Kullanıcı kimlik doğrulamasını @@ -60,35 +64,51 @@

  • Örnekler
  • Güvenlik Değerlendirmeleri
  • Kısıtlamalar
  • -

    Ayrıca bakınız:

    • httpd
    • Kaynak paketinin support/SHA1 dizinindeki betikler.
    +

    Ayrıca bakınız:

    top

    Kullanım

    htpasswd [ -c ] - [ -m ] - [ -D ] parola-dosyası kullanıcı

    + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C bedel ] + [ -D ] + [ -v ] parola-dosyası kullanıcı

    htpasswd -b [ -c ] [ -m | + -B | -d | - -p | - -s ] - [ -D ] parola-dosyası kullanıcı + -s | + -p ] + [ -C bedel ] + [ -D ] + [ -v ] parola-dosyası kullanıcı parola

    htpasswd -n + [ -i ] [ -m | + -B | -d | -s | - -p ] kullanıcı

    + -p ] + [ -C bedel ] kullanıcı

    htpasswd -nb [ -m | + -B | -d | -s | - -p ] kullanıcı parola

    + -p ] + [ -C bedel ] kullanıcı + parola

    top

    Seçenekler

    @@ -96,7 +116,13 @@
    -b
    Betik kipi; parola için istek yapmak yerine parola komut satırından verilir. Parola komut satırında görünür olacağından çok - dikkatli kullanmak gerekir.
    + dikkatli kullanmak gerekir. Betik kullanımı için + -i seçeneğine bakınız. + 2.4.4 ve sonraki sürümler içindir. + +
    -i
    +
    Parolayı doğrulamaksızın standart girdiden okur (betik kullanımı + için).
    -c
    parola-dosyası oluşturur. Dosya mevcutsa, @@ -113,19 +139,32 @@
    -m
    Parolalar için MD5 şifrelemesi kullanılır. - Bu öntanımlıdır.
    + Bu 2.2.18 sürümünden beri öntanımlıdır. + +
    -B
    +
    Parolalar için bcrypt şifrelemesi kullanılır. Şu an için çok güvenli + kabul edilmektedir.
    + +
    -C bedel
    +
    Bu seçenek sadece -B (bcrypt şifrelemesi) + seçeneği ile birlikte kullanılabilir. Bcrypt algoritmasına hesaplama + süresini belirtir (daha yüksek değerler daha güvenlidir, öntanımlı 5, + geçerli değerler: 4 - 31).
    -d
    -
    Parolaları şifrelemek için crypt() kullanılır. Windows, - ve Netware dışında öntanımlıdır. +
    Parolaları şifrelemek için crypt() kullanılır. htpasswd tarafından tüm platformlarda destekleniyor olsa da Windows, Netware ve TPF üzerinde - httpd sunucusu tarafından desteklenmez.
    + httpd sunucusu tarafından desteklenmez. Bu algoritma + günümüz standartlarında güvenilmez kabul + edilmektedir. 2.2.17 sürümüne kadar öntanımlı algoritma olarak + kullanılmıştı.
    -s
    Parolalar için SHA şifrelemesi kullanılır. LDAP Dizin değişim biçemini (ldif) kullanarak Netscape sunucularına/sunucularından göçü - kolaylaştırır.
    + kolaylaştırır.Bu algoritma günümüz standartlarında + güvenilmez kabul edilmektedir.
    -p
    Düz metin parolalar kullanılır. htpasswd @@ -137,6 +176,11 @@
    Kullanıcıyı siler. Kullanıcı belirtilen dosyada mevcutsa silinir.
    +
    -v
    +
    Parolayı doğrular. Verilen parolayı belitilen htpasswd dosyasında + saklanan kullanıcı parolası ile karşılaştırarak doğrulama yapar. + 2.4.5 ve sonraki sürümler içindir.
    +
    parola-dosyası
    Kullanıcı ismini ve parolasını içeren dosyanın ismi. -c seçeneği verilmişse ve dosya mevcut @@ -217,6 +261,9 @@ sadece bir şifreli gösterimi olabilir. crypt() ve MD5 biçemleri parolanın önüne rasgele üretilmiş bir tuz dizgesi eklediklerinden sözlük saldırılarına karşı daha dayanıklıdırlar.

    + +

    SHA ve crypt() biçimleri günümüz standartlarında + güvenilmez kabul edilmektedir.

    top

    Kısıtlamalar

    @@ -233,9 +280,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/htpasswd.xml b/docs/manual/programs/htpasswd.xml index f08caf37c7a..7f0f8350545 100644 --- a/docs/manual/programs/htpasswd.xml +++ b/docs/manual/programs/htpasswd.xml @@ -36,13 +36,16 @@ just the users listed in the files created by htpasswd. This program can only manage usernames and passwords stored in a flat-file. It can encrypt and display password information for use in other types of data - stores, though. To use a DBM database see dbmmanage.

    + stores, though. To use a DBM database see dbmmanage or + htdbm.

    -

    htpasswd encrypts passwords using either a version of MD5 - modified for Apache, or the system's crypt() routine. Files - managed by htpasswd may contain both types of passwords; some - user records may have MD5-encrypted passwords while others in the same file - may have passwords encrypted with crypt().

    +

    htpasswd encrypts passwords using either bcrypt, + a version of MD5 modified for Apache, SHA1, or the system's + crypt() routine. Files + managed by htpasswd may contain a mixture of different encoding + types of passwords; some + user records may have bcrypt or MD5-encrypted passwords while others in the + same file may have passwords encrypted with crypt().

    This manual page only lists the command line arguments. For details of the directives necessary to configure user authentication in @@ -51,35 +54,52 @@ >http://httpd.apache.org/.

    httpd +htdbm The scripts in support/SHA1 which come with the distribution.
    Synopsis

    htpasswd [ -c ] - [ -m ] - [ -D ] passwdfile username

    + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] passwdfile username

    htpasswd -b [ -c ] [ -m | + -B | -d | - -p | - -s ] - [ -D ] passwdfile username + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] passwdfile username password

    htpasswd -n + [ -i ] [ -m | + -B | -d | -s | - -p ] username

    + -p ] + [ -C cost ] username

    htpasswd -nb [ -m | + -B | -d | -s | - -p ] username password

    + -p ] + [ -C cost ] username + password

    Options @@ -88,7 +108,11 @@ distribution.
    Use batch mode; i.e., get the password from the command line rather than prompting for it. This option should be used with extreme care, since the password is clearly visible on the command - line.
    + line. For script use see the -i option. + Available in 2.4.4 and later.
    + +
    -i
    +
    Read the password from stdin without verification (for script usage).
    -c
    Create the passwdfile. If passwdfile already @@ -103,16 +127,29 @@ distribution. one) is omitted. It cannot be combined with the -c option.
    -m
    -
    Use MD5 encryption for passwords. This is the default.
    +
    Use MD5 encryption for passwords. This is the default (since version + 2.2.18).
    + +
    -B
    +
    Use bcrypt encryption for passwords. This is currently considered to + be very secure.
    + +
    -C
    +
    This flag is only allowed in combination with -B (bcrypt + encryption). It sets the computing time used for the bcrypt algorithm + (higher is more secure but slower, default: 5, valid: 4 to 31).
    -d
    Use crypt() encryption for passwords. This is not supported by the httpd server on Windows and - Netware.
    + Netware. This algorithm limits the password length to 8 characters. + This algorithm is insecure by today's standards. + It used to be the default algorithm until version 2.2.17.
    -s
    Use SHA encryption for passwords. Facilitates migration from/to Netscape - servers using the LDAP Directory Interchange Format (ldif).
    + servers using the LDAP Directory Interchange Format (ldif). + This algorithm is insecure by today's standards.
    -p
    Use plaintext passwords. Though htpasswd will support @@ -123,6 +160,11 @@ distribution.
    Delete user. If the username exists in the specified htpasswd file, it will be deleted.
    +
    -v
    +
    Verify password. Verify that the given password matches the password + of the user stored in the specified htpasswd file. + Available in 2.4.5 and later.
    +
    passwdfile
    Name of the file to contain the user name and password. If -c is given, this file is created if it does not already exist, @@ -200,6 +242,9 @@ distribution. there is only one encrypted representation. The crypt() and MD5 formats permute the representation by prepending a random salt string, to make dictionary attacks against the passwords more difficult.

    + +

    The SHA and crypt() formats are insecure by today's + standards.

    Restrictions diff --git a/docs/manual/programs/htpasswd.xml.fr b/docs/manual/programs/htpasswd.xml.fr new file mode 100644 index 00000000000..c933ee7a3fc --- /dev/null +++ b/docs/manual/programs/htpasswd.xml.fr @@ -0,0 +1,304 @@ + + + + + + + + + + +Programmes + +htpasswd - Gestion des fichiers d'utilisateurs pour +l'authentification de base + + +

    htpasswd permet de créer et de maintenir les + fichiers textes où sont stockés les noms d'utilisateurs et mots de + passe pour l'authentification de base des utilisateurs HTTP. Si + htpasswd rencontre un problème d'accès à un fichier, + que ce soit pour écrire dans le fichier de sortie, ou pour lire le + fichier d'entrée dans le but de le mettre à jour, il renvoie un code + d'erreur et n'effectue aucune modification.

    + +

    Il est possible de limiter l'accès aux ressources du serveur HTTP + Apache aux seuls utilisateurs présents dans les fichiers créés par + htpasswd. Ce programme ne sait gérer les noms + d'utilisateurs et mots de passe que s'ils sont stockés dans des + fichiers textes. Il peut cependant chiffrer et afficher les mots de + passe à des fins d'utilisation dans d'autres types de bases de + données. Pour utiliser une base de données DBM, voir le programme + dbmmanage ou htdbm.

    + +

    htpasswd chiffre les mots de passe en utilisant soit + bcrypt, + une version de MD5 modifiée pour Apache, soit SHA1, soit la routine + crypt() du système. Les fichiers gérés par + htpasswd peuvent contenir deux types de mots de passe ; + certaines entrées peuvent contenir des mots de passe chiffrés en + MD5 ou bcrypt, alors que d'autres entrées du même fichier contiendront des + mots de passe chiffrés avec crypt().

    + +

    Cette page de manuel ne décrit que les arguments de la ligne de + commande. Pour plus de détails à propos des directives nécessaires à + la configuration de l'authentification des utilisateurs dans + httpd, voir le manuel Apache qui est fourni avec + la distribution ou peut être consulté à http://httpd.apache.org/.

    +
    +httpd +htdbm +Les scripts fournis avec la distibution d'Apache et situés dans +support/SHA1. + +
    Syntaxe +

    htpasswd + [ -c ] + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] fichier-mots-de-passe nom-utilisateur

    + +

    htpasswd -b + [ -c ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] + [ -D ] + [ -v ] fichier-mots-de-passe nom-utilisateur + mot-de-passe

    + +

    htpasswd -n + [ -i ] + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] nom-utilisateur

    + +

    htpasswd -nb + [ -m | + -B | + -d | + -s | + -p ] + [ -C cost ] nom-utilisateur + mot-de-passe

    +
    + +
    Options +
    +
    -b
    +
    Utilise le mode batch ; c'est à dire, extrait le mot de passe de + la ligne de commande au lieu de le demander à l'opérateur. Cette + option doit être utilisée avec la plus grande prudence, car + le mot de passe est visible en clair dans la ligne + de commande. Pour utiliser un script, voir l'option + -i. + Disponible à partir de la version 2.4.4 du serveur HTTP Apache.
    + +
    -i
    +
    Lit le mot de passe depuis stdin sans vérification (à utiliser + dans les scripts).
    + +
    -c
    +
    Crée le fichier-mots-de-passe. Si + fichier-mots-de-passe existe déjà, il est réécrit et + tronqué. Cette option ne peut pas être combinée avec l'option + -n.
    + +
    -n
    +
    Affiche le résultat du traitement sur la sortie standard au lieu + de mettre à jour le fichier. Ceci peut s'avérer utile pour générer + des enregistrements de mots de passe qu'Apache pourra utiliser à des + fins d'inclusion dans des fichiers de données au format autre que + texte. Cette option modifie la syntaxe de la ligne de commande, car + l'argument fichier-mots-de-passe (en général le premier) + est omis. Elle ne peut pas être combinée avec l'option + -c option.
    + +
    -m
    +
    Utilise le chiffrement MD5 pour les mots de passe. C'est le + comportement par défaut (depuis la version 2.2.18).
    + +
    -B
    +
    Utilise bcrypt pour chiffrer les mots de passe. c'est un + algorythme de chiffrement actuellement considéré comme sûr.
    + +
    -C
    +
    Ce drapeau n'est autorisé qu'en conjonction avec le drapeau + -B (chiffrement bcrypt). Il permet de définir la durée + de traitement pour l'algorytme bcrypt (plus elle est longue, + meilleure sera la sécurité, mais inférieure la rapidité). La valeur + par défaut est 5 et les valeurs autorisées vont de 4 à 31.
    + + +
    -d
    +
    Utilise le chiffrement crypt() pour les mots de + passe. Cette option n'est pas supportée par le + serveur httpd sous Windows ou Netware. Cet + algorithme limite la longueur des mots de passe à 8 caractères ; il + est considéré comme non sur du point de vue des + standards actuels. C'était l'algorithme par défaut jusqu'à la + version 2.2.17.
    + +
    -s
    +
    Utilise le chiffrement SHA pour les mots de passe. Facilite la + migration vers/depuis les serveurs Netscape qui utilisent le format + LDAP Directory Interchange (ldif). Cet algorithme + est considéré comme non sur du point de vue des + standards actuels.
    + +
    -p
    +
    Enregistre les mots de passe en clair. Bien que + htpasswd supporte la création des mots de passe en + clair sur toutes les plates-formes, le démon + httpd n'accepte les mots de passe en clair que + sous Windows et Netware.
    + +
    -D
    +
    Supprime un utilisateur, sous réserve qu'il existe dans le + fichier spécifié par htpasswd.
    + +
    -v
    +
    Vérifie si le mot de passe fourni correspond au mot de passe de + l'utilisateur enregistré dans le fichier de mots de passe spécifié. + Disponible à partir de la version 2.4.5 du serveur HTTP Apache.
    + +
    fichier-mots-de-passe
    +
    Le nom du fichier contenant les noms d'utilisateurs et mots de + passe. Avec l'option -c, le fichier est créé s'il + n'existe pas, ou réécrit et tronqué s'il existe déjà.
    + +
    nom-utilisateur
    +
    Le nom d'utilisateur à créer ou mettre à jour dans le + fichier-mots-de-passe. Si nom-utilisateur + n'existe pas, une nouvelle entrée est ajoutée. Dans le cas + contraire, le mot de passe est modifié.
    + +
    mot-de-passe
    +
    Le mot de passe en clair et destiné à être chiffré puis stocké + dans le fichier. Cet argument ne s'utilise qu'avec l'option + -b.
    +
    +
    + +
    Valeur renvoyée +

    htpasswd renvoie 0 ("true") si le nom d'utilisateur + et le mot de passe ont été enregistrés ou mis à jour avec succès + dans le fichier-mots-de-passe. htpasswd + renvoie 1 s'il a rencontré un problème d'accès aux + fichiers, 2 si la ligne de commande comportait une + erreur de syntaxe, 3 si le mot de passe entré + interactivement ne correspondait pas au nom d'utilisateur, + 4 si l'opération a été interrompue, 5 si + une valeur était trop longue (nom-utilisateur, nom-fichier, + mot-de-passe, ou l'enregistrement résultant), 6 si le + nom d'utilisateur contenait des caractères illégaux (voir la section + Restrictions), et 7 si le + fichier spécifié n'était pas un fichier de mots de passe + valide.

    +
    + +
    Exemples + + htpasswd /usr/local/etc/apache/.utilisateurs-htpasswd jsmith + + +

    Ajoute ou modifie le mot de passe de l'utilisateur + jsmith. Le mot de passe est demandé à l'opérateur. Le + mot de passe sera chiffré en utilisant l'algorithme MD5 + modifié pour Apache. Si le fichier spécifié + n'existe pas, htpasswd renverra un code d'erreur.

    + + + htpasswd -c /home/doe/public_html/.htpasswd jane + + +

    Crée un nouveau fichier de mots de passe et y enregistre une + entrée pour l'utilisateur jane. Le mot de passe est + demandé à l'opérateur. Si le fichier existe et ne peut être ni lu ni + écrit, il n'est pas modifié et htpasswd affichera un + message et renverra un code d'erreur.

    + + + htpasswd -db /usr/web/.htpasswd-tous jones Pwd4Steve + + +

    Chiffre le mot de passe spécifié dans la ligne de commande + (Pwd4Steve) en utilisant l'algorithme + crypt(), et le stocke dans le fichier spécifié.

    +
    + +
    Considérations à propos de sécurité +

    Les fichiers de mots de passe Web comme ceux que gère + htpasswd ne doivent pas être situés dans + l'espace d'URI du serveur Web -- en d'autres termes, il ne doit pas + être possible d'y accéder à partir d'un navigateur.

    + +

    En tant qu'exécutable setuid, ce programme n'est pas sûr, et il + ne faut par conséquent pas lui attribuer de permissions + setuid.

    + +

    L'utilisation de l'option -b est déconseillée, car + avec elle, les mots de passe apparaissent en clair dans la ligne de + commande.

    + +

    Notez qu'avec l'algorithme crypt(), seuls les huit + premiers caractères du mot de passe spécifié sont pris en compte. Si + le mot de passe spécifié est plus long, les caractères + supplémentaires sont ignorés.

    + +

    Le format de chiffrement SHA n'utilise pas d'amorçage aléatoire + (salting) : à un mot de passe donné correspond une seule + représentation chiffrée. Les formats crypt() et MD5 + permutent la représentation en la préfixant par une chaîne d'amorce + aléatoire, afin de rendre les attaques de mots de passe à base de + dictionnaires plus difficiles.

    + +

    Les algorithmes de chiffrement SHA et crypt() + sont considérés comme non surs du point de vue des + standards actuels.

    +
    + +
    Restrictions +

    Sur les plates-formes Windows, la taille des mots de passe + chiffrés avec htpasswd est limitée à 255 + caractères. Les mots de passe dont la taille est supérieure seront + tronqués.

    + +

    L'algorithme MD5 utilisé par htpasswd est spécifique + à Apache ; les mots de passe chiffrés en utilisant cet algorithme + seront inutilisables sur d'autres serveurs Web.

    + +

    La taille des noms d'utilisateurs est limitée à 255 + octets et ceux-ci ne doivent pas contenir de caractère + :.

    +
    + +
    diff --git a/docs/manual/programs/htpasswd.xml.ko b/docs/manual/programs/htpasswd.xml.ko index c69d6708d7d..126f1883aa5 100644 --- a/docs/manual/programs/htpasswd.xml.ko +++ b/docs/manual/programs/htpasswd.xml.ko @@ -1,7 +1,7 @@ - + + -httpd - Apache Hypertext Transfer Protocol Server - Apache HTTP Server +httpd - Apache Hypertext Transfer Protocol Server - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    httpd - Apache Hypertext Transfer Protocol Server

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs
    top

    Synopsis

    @@ -79,7 +85,7 @@ path relative to the Stopping Apache for more information. +
    Signals httpd to start, restart, or stop. See Stopping Apache httpd for more information.
    -C directive
    @@ -137,7 +143,7 @@ places where the directive is valid. Directives provided by shared modules are n
    Show the settings as parsed from the config file (currently only shows the virtualhost settings).
    -
    -T (Availabe in 2.3.8 and later)
    +
    -T (Available in 2.3.8 and later)
    Skip document root check at startup/restart.
    @@ -172,12 +178,12 @@ server will not detach from the console.
    -k install|config|uninstall
    -
    Install Apache as a Windows NT service; change startup options for -the Apache service; and uninstall the Apache service.
    +
    Install Apache httpd as a Windows NT service; change startup options for +the Apache httpd service; and uninstall the Apache httpd service.
    -n name
    -
    The name of the Apache service to signal.
    +
    The name of the Apache httpd service to signal.
    -w
    @@ -189,9 +195,31 @@ be read.

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/httpd.html.fr b/docs/manual/programs/httpd.html.fr new file mode 100644 index 00000000000..2a8dbe32553 --- /dev/null +++ b/docs/manual/programs/httpd.html.fr @@ -0,0 +1,239 @@ + + + + + +httpd - Le serveur HTTP d'Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    httpd - Le serveur HTTP d'Apache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    httpd est le programme du serveur HTTP d'Apache. Il + a t conu pour fonctionner sous forme de processus dmon + indpendant. Lorsqu'il est utilis ainsi, il va crer un jeu de + processus enfants ou de threads qui traiteront les requtes.

    + +

    En gnral, httpd n'est pas invoqu directement, + mais plutt via apachectl sur les systmes de + style Unix ou en tant que service sous + Windows NT, 2000 et XP et comme application de + console sous Windows 9x et ME.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    httpd [ -d + racine-serveur ] [ -f config ] + [ -C directive ] [ -c + directive ] [ -D paramtre ] + [ -e niveau ] [ -E + fichier ] + [ -k start|restart|graceful|stop|graceful-stop ] + [ -R rpertoire ] [ -h ] + [ -l ] [ -L ] [ -S ] + [ -t ] [ -v ] [ -V ] + [ -X ] [ -M ] [ -T ] +

    + +

    Sur les systmes Windows, + les options additionnelles suivantes sont disponibles :

    + +

    httpd [ -k + install|config|uninstall ] [ -n nom ] + [ -w ]

    +
    top
    +
    +

    Options

    + +
    +
    -d racine-serveur
    + +
    Dfinit la valeur initiale de la directive ServerRoot racine-serveur. Cette +valeur peut tre crase par la directive ServerRoot du fichier de +configuration. La valeur par dfaut est +/usr/local/apache2.
    + +
    -f config
    + +
    Utilise les directives du fichier config au dmarrage. Si +config ne commence pas par un '/', il est considr comme +relatif au chemin dfini par la directive ServerRoot. La valeur par dfaut est +conf/httpd.conf.
    + +
    -k start|restart|graceful|stop|graceful-stop
    + +
    Permet de dmarrer, redmarrer ou arrter httpd. Voir Arrter Apache httpd pour plus d'informations.
    + +
    -C directive
    + +
    Excute la directive de configuration directive avant de +lire les fichiers de configurations.
    + +
    -c directive
    + +
    Excute la directive de configuration directive aprs +avoir lu les fichiers de configurations.
    + + +
    -D paramtre
    + +
    Dfinit un paramtre de configuration utiliser dans les +sections <IfDefine> +des fichiers de configuration, ces dernires permettant d'excuter ou +non des +commandes au dmarrage ou au redmarrage du serveur. Sert aussi +dfinir certains paramtres de dmarrage moins courants comme +-DNO_DETACH (empche le processus parent de lancer des +processus enfants) et -DFOREGROUND (empche le processus +parent d'appeler setsid() et autres).
    + +
    -e niveau
    + +
    Dfinit la directive LogLevel +niveau pendant le dmarrage du serveur. Ceci permet +d'augmenter temporairement la verbosit des messages d'erreur afin de +dterminer les problmes de dmarrage.
    + +
    -E fichier
    + +
    Envoie les messages d'erreur de dmarrage vers le fichier +fichier.
    + +
    -h
    + +
    Affiche un bref rsum des options de ligne de commande +disponibles.
    + +
    -l
    + +
    Affiche la liste des modules compils dans le le serveur. Ce +paramtre n'affiche pas les modules chargs +dynamiquement via la directive LoadModule.
    + +
    -L
    + +
    Affiche une liste des directives fournies par les modules statiques +avec les arguments associs, ainsi que les contextes dans lesquels elles +sont valides. Les directives fournies par les modules partags +(dynamiques) ne sont pas affiches).
    + +
    -M
    + +
    Affiche une liste des modules statiques et des modules chargs +dynamiquement.
    + +
    -S
    + +
    Affiche la configuration telle qu'elle est issue de l'interprtation +du fichier de configuration (actuellement, seule la configuration des +serveurs virtuels est affiche).
    + +
    -T (disponible depuis la version 2.3.8)
    + +
    Empche la vrification de la racine des documents (DocumentRoot) au +dmarrage/redmarrage.
    + +
    -t
    + +
    Excute une vrification de syntaxe pour les fichiers de +configuration seulement. Le programme se termine immdiatement aprs ces +tests de vrification de syntaxe avec soit un code de retour de 0 +(syntaxe OK), soit un code de retour diffrent de 0 (erreur de +syntaxe). Si -D DUMP_VHOSTS est dfini, les +dtails de la configuration des serveurs virtuels seront affichs. Si -D +DUMP_MODULES est dfini, tous les modules chargs +seront affichs.
    + +
    -v
    + +
    Print the version of httpd, and then exit.
    + +
    -V
    + +
    Le programme affiche la version et les paramtres de compilation de +httpd, puis se termine.
    + +
    -X
    + +
    Excute httpd en mode debug. Un seul processus sera dmarr, et le +serveur ne rendra pas la main la console.
    + +
    + +

    Les arguments suivants ne sont disponibles que sur la plate-forme Windows :

    + +
    + +
    -k install|config|uninstall
    + +
    Respectivement : installe Apache httpd en tant que service Windows NT ; +modifie les options de dmarrage du service Apache httpd ; dsinstalle le +service Apache httpd.
    + +
    -n nom
    + +
    Le nom du service Apache httpd actionner.
    + +
    -w
    + +
    Garde la console Windows ouverte en cas de problme de faon ce +que le message d'erreur puisse tre lu.
    + +
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/httpd.html.ko.euc-kr b/docs/manual/programs/httpd.html.ko.euc-kr index a0c675b17e6..c3ff79b0ce8 100644 --- a/docs/manual/programs/httpd.html.ko.euc-kr +++ b/docs/manual/programs/httpd.html.ko.euc-kr @@ -1,24 +1,30 @@ - -httpd - ġ ؽƮ - Apache HTTP Server +httpd - ġ ؽƮ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    httpd - ġ ؽƮ

    @@ -37,7 +43,7 @@
    +

    top

    @@ -182,9 +188,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/httpd.html.tr.utf8 b/docs/manual/programs/httpd.html.tr.utf8 index 91c7437b9bc..9053282fc71 100644 --- a/docs/manual/programs/httpd.html.tr.utf8 +++ b/docs/manual/programs/httpd.html.tr.utf8 @@ -1,28 +1,33 @@ - -httpd - Apache Hiper Metin Aktarım Protokolü Sunucusu - Apache HTTP Sunucusu +httpd - Apache Hiper Metin Aktarım Protokolü Sunucusu - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    httpd - Apache Hiper Metin Aktarım Protokolü Sunucusu

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    httpd - Apache Hiper Metin Aktarım Protokolü Sunucusu

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    httpd, Apache Hiper Metin Aktarım Protokolü (HTTP) sunucusu programıdır. Tek başına çalışan bir artalan @@ -38,7 +43,7 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -50,10 +55,11 @@ [ -e seviye ] [ -E dosya ] [ -k start | restart | graceful | stop | graceful-stop ] - [ -R dizin ] [ -h ] + [ -h ] [ -l ] [ -L ] [ -S ] [ -t ] [ -v ] [ -V ] - [ -X ] [ -M ]

    + [ -X ] [ -M ] [ -T ] +

    Windows sistemlerinde, ek olarak şunlar vardır:

    @@ -82,7 +88,7 @@
    -k start | restart | graceful | stop | graceful-stop
    httpd'yi başlatmak, durdurmak ve yeniden - başlatmak için sinyal gönderir. Daha ayrıntılı bilgi edinmek için Apache'nin Durdurulması belgesine + başlatmak için sinyal gönderir. Daha ayrıntılı bilgi edinmek için Apache httpd'nin Durdurulması belgesine bakınız.
    -C yönerge
    @@ -130,14 +136,15 @@
    -M
    Yüklü durağan ve paylaşımlı modülleri listeler.
    -
    -R dizin
    -
    Sunucu SHARED_CORE kullanılarak derlendiği takdirde bu - seçenek paylaşımlı nesne dosyaları için dizin belirtir.
    -
    -S
    Yapılandırma dosyasından çözümlenmiş haliyle ayarları gösterir (şu an sadece sanal konak ayarları gösterilmektedir).
    +
    -T (2.3.8 ve sonrasında + kullanılabilmektedir)
    +
    Başlatma ve yeniden başlatma sırasında belge kökü sınanmadan + geçilir.
    +
    -t
    Yapılandırma dosyasını sözdizimi hatalarına karşı denetler. Program sözdizimini denetledikten sonra sözdizimi geçerliyse 0 ile, değilse @@ -164,12 +171,12 @@
    -k install | config | uninstall
    -
    Parametreler bakımından sırasıyla: Apache bir Windows NT hizmeti - haline getirilir; başlatma seçenekleri Apache hizmeti için değiştirilir; - ve Apache hizmeti sistemden kaldırılır.
    +
    Parametreler bakımından sırasıyla: Apache httpd bir Windows NT hizmeti + haline getirilir; başlatma seçenekleri Apache httpd hizmeti için + değiştirilir; ve Apache httpd hizmeti sistemden kaldırılır.
    -n isim
    -
    Sinyal gönderilecek Apache hizmetinin ismi.
    +
    Sinyal gönderilecek Apache httpd hizmetinin ismi.
    -w
    Hata durumunda konsol penceresi açık tutularak hata iletilerinin @@ -179,9 +186,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/httpd.xml b/docs/manual/programs/httpd.xml index c20a027b994..d41333c189a 100644 --- a/docs/manual/programs/httpd.xml +++ b/docs/manual/programs/httpd.xml @@ -39,8 +39,8 @@ a console application on Windows 9x and ME.

    -Starting Apache -Stopping Apache +Starting Apache httpd +Stopping Apache httpd Configuration Files Platform-specific Documentation apachectl @@ -89,7 +89,7 @@ module="core">ServerRoot. The default is
    -k start|restart|graceful|stop|graceful-stop
    Signals httpd to start, restart, or stop. See Stopping Apache for more information.
    +href="../stopping.html">Stopping Apache httpd for more information.
    -C directive
    @@ -147,7 +147,7 @@ places where the directive is valid. Directives provided by shared modules are n
    Show the settings as parsed from the config file (currently only shows the virtualhost settings).
    -
    -T (Availabe in 2.3.8 and later)
    +
    -T (Available in 2.3.8 and later)
    Skip document root check at startup/restart.
    @@ -183,12 +183,12 @@ href="../platform/windows.html">Windows platform:

    -k install|config|uninstall
    -
    Install Apache as a Windows NT service; change startup options for -the Apache service; and uninstall the Apache service.
    +
    Install Apache httpd as a Windows NT service; change startup options for +the Apache httpd service; and uninstall the Apache httpd service.
    -n name
    -
    The name of the Apache service to signal.
    +
    The name of the Apache httpd service to signal.
    -w
    diff --git a/docs/manual/programs/httpd.xml.fr b/docs/manual/programs/httpd.xml.fr new file mode 100644 index 00000000000..faf73df41f5 --- /dev/null +++ b/docs/manual/programs/httpd.xml.fr @@ -0,0 +1,219 @@ + + + + + + + + + + +Programmes + + httpd - Le serveur HTTP d'Apache + + +

    httpd est le programme du serveur HTTP d'Apache. Il + a été conçu pour fonctionner sous forme de processus démon + indépendant. Lorsqu'il est utilisé ainsi, il va créer un jeu de + processus enfants ou de threads qui traiteront les requêtes.

    + +

    En général, httpd n'est pas invoqué directement, + mais plutôt via apachectl sur les systèmes de + style Unix ou en tant que service sous + Windows NT, 2000 et XP et comme application de + console sous Windows 9x et ME.

    +
    + +Démarrer Apache httpd +Arrêter Apache httpd +Fichiers de configuration +Documentations spécifiques aux +plates-formes +apachectl + +
    Syntaxe +

    httpd [ -d + racine-serveur ] [ -f config ] + [ -C directive ] [ -c + directive ] [ -D paramètre ] + [ -e niveau ] [ -E + fichier ] + [ -k start|restart|graceful|stop|graceful-stop ] + [ -R répertoire ] [ -h ] + [ -l ] [ -L ] [ -S ] + [ -t ] [ -v ] [ -V ] + [ -X ] [ -M ] [ -T ] +

    + +

    Sur les systèmes Windows, + les options additionnelles suivantes sont disponibles :

    + +

    httpd [ -k + install|config|uninstall ] [ -n nom ] + [ -w ]

    +
    + +
    Options + +
    +
    -d racine-serveur
    + +
    Définit la valeur initiale de la directive ServerRoot à racine-serveur. Cette +valeur peut être écrasée par la directive ServerRoot du fichier de +configuration. La valeur par défaut est +/usr/local/apache2.
    + +
    -f config
    + +
    Utilise les directives du fichier config au démarrage. Si +config ne commence pas par un '/', il est considéré comme +relatif au chemin défini par la directive ServerRoot. La valeur par défaut est +conf/httpd.conf.
    + +
    -k start|restart|graceful|stop|graceful-stop
    + +
    Permet de démarrer, redémarrer ou arrêter httpd. Voir Arrêter Apache httpd pour plus d'informations.
    + +
    -C directive
    + +
    Exécute la directive de configuration directive avant de +lire les fichiers de configurations.
    + +
    -c directive
    + +
    Exécute la directive de configuration directive après +avoir lu les fichiers de configurations.
    + + +
    -D paramètre
    + +
    Définit un paramètre de configuration à utiliser dans les +sections IfDefine +des fichiers de configuration, ces dernières permettant d'exécuter ou +non des +commandes au démarrage ou au redémarrage du serveur. Sert aussi à +définir certains paramètres de démarrage moins courants comme +-DNO_DETACH (empêche le processus parent de lancer des +processus enfants) et -DFOREGROUND (empêche le processus +parent d'appeler setsid() et autres).
    + +
    -e niveau
    + +
    Définit la directive LogLevel à +niveau pendant le démarrage du serveur. Ceci permet +d'augmenter temporairement la verbosité des messages d'erreur afin de +déterminer les problèmes de démarrage.
    + +
    -E fichier
    + +
    Envoie les messages d'erreur de démarrage vers le fichier +fichier.
    + +
    -h
    + +
    Affiche un bref résumé des options de ligne de commande +disponibles.
    + +
    -l
    + +
    Affiche la liste des modules compilés dans le le serveur. Ce +paramètre n'affiche pas les modules chargés +dynamiquement via la directive LoadModule.
    + +
    -L
    + +
    Affiche une liste des directives fournies par les modules statiques +avec les arguments associés, ainsi que les contextes dans lesquels elles +sont valides. Les directives fournies par les modules partagés +(dynamiques) ne sont pas affichées).
    + +
    -M
    + +
    Affiche une liste des modules statiques et des modules chargés +dynamiquement.
    + +
    -S
    + +
    Affiche la configuration telle qu'elle est issue de l'interprétation +du fichier de configuration (actuellement, seule la configuration des +serveurs virtuels est affichée).
    + +
    -T (disponible depuis la version 2.3.8)
    + +
    Empêche la vérification de la racine des documents (DocumentRoot) au +démarrage/redémarrage.
    + +
    -t
    + +
    Exécute une vérification de syntaxe pour les fichiers de +configuration seulement. Le programme se termine immédiatement après ces +tests de vérification de syntaxe avec soit un code de retour de 0 +(syntaxe OK), soit un code de retour différent de 0 (erreur de +syntaxe). Si -D DUMP_VHOSTS est défini, les +détails de la configuration des serveurs virtuels seront affichés. Si -D +DUMP_MODULES est défini, tous les modules chargés +seront affichés.
    + +
    -v
    + +
    Print the version of httpd, and then exit.
    + +
    -V
    + +
    Le programme affiche la version et les paramètres de compilation de +httpd, puis se termine.
    + +
    -X
    + +
    Exécute httpd en mode debug. Un seul processus sera démarré, et le +serveur ne rendra pas la main à la console.
    + +
    + +

    Les arguments suivants ne sont disponibles que sur la plate-forme Windows :

    + +
    + +
    -k install|config|uninstall
    + +
    Respectivement : installe Apache httpd en tant que service Windows NT ; +modifie les options de démarrage du service Apache httpd ; désinstalle le +service Apache httpd.
    + +
    -n nom
    + +
    Le nom du service Apache httpd à actionner.
    + +
    -w
    + +
    Garde la console Windows ouverte en cas de problème de façon à ce +que le message d'erreur puisse être lu.
    + +
    + +
    + +
    diff --git a/docs/manual/programs/httpd.xml.ko b/docs/manual/programs/httpd.xml.ko index 5c024b50ed0..97f696f3b90 100644 --- a/docs/manual/programs/httpd.xml.ko +++ b/docs/manual/programs/httpd.xml.ko @@ -1,7 +1,7 @@ - + + -httxt2dbm - Generate dbm files for use with RewriteMap - Apache HTTP Server +httxt2dbm - Generate dbm files for use with RewriteMap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    httxt2dbm - Generate dbm files for use with RewriteMap

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    httxt2dbm - Generate dbm files for use with RewriteMap

    Available Languages:  en  | + fr  |  tr 

    httxt2dbm is used to generate dbm files from text input, for use in RewriteMap with the - dbm map type. -

    + dbm map type.

    + +

    If the output file already exists, it will not be truncated. New keys will be + added and existing keys will be updated.

    +

    See also

    top

    Synopsis

    @@ -49,18 +57,17 @@
    -f DBM_TYPE
    Specify the DBM type to be used for the output. If not specified, will - use the APR Default. Available types are:
    - GDBM for GDBM files
    - SDBM for SDBM files
    - DB for berkeley DB files
    - NDBM for NDBM files
    - default for the default DBM type + use the APR Default. Available types are: + GDBM for GDBM files, + SDBM for SDBM files, + DB for berkeley DB files, + NDBM for NDBM files, + default for the default DBM type.
    -i SOURCE_TXT
    Input file from which the dbm is to be created. The file should be formated - with one record per line, of the form:
    - key value
    + with one record per line, of the form: key value. See the documentation for RewriteMap for further details of this file's format and meaning.
    @@ -78,8 +85,30 @@

    Available Languages:  en  | + fr  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/httxt2dbm.html.fr b/docs/manual/programs/httxt2dbm.html.fr new file mode 100644 index 00000000000..aa667bf3f3c --- /dev/null +++ b/docs/manual/programs/httxt2dbm.html.fr @@ -0,0 +1,122 @@ + + + + + +httxt2dbm - Gnre des fichiers dbm utiliser avec +RewriteMap - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    httxt2dbm - Gnre des fichiers dbm utiliser avec +RewriteMap

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    + +

    httxt2dbm permet, partir d'une entre au format + texte, de gnrer des fichiers dbm utiliser dans les directives + RewriteMap avec le type + de table dbm. +

    + +

    Si le fichier de sortie existe dj, il ne sera pas tronqu. Les + nouvelles cls seront ajoutes et les cls prexistantes mises + jour.

    +
    + +
    top
    +
    +

    Syntaxe

    +

    httxt2dbm + [ -v ] + [ -f TYPE_DBM ] + -i TEXTE_SOURCE + -o SORTIE_DBM +

    +
    top
    +
    +

    Options

    +
    +
    -v
    +
    Sortie plus verbeuse
    + +
    -f TYPE_DBM
    +
    Spcifie le type DBM utiliser pour le fichier de sortie. + S'il n'est pas spcifi, c'est la valeur par dfaut de + l'APR qui sera utilise. Les types disponibles + sont : + GDBM pour les fichiers GDBM, + SDBM pour les fichiers SDBM, + DB pour les fichiers DB, + NDBM pour les fichiers NDBM, + default pour le type DBM par dfaut +
    + +
    -i TEXTE_SOURCE
    +
    Le fichier d'entre partir duquel le fichier dbm sera cr. Le + fichier doit tre format de faon ne contenir qu'un seul + enregistrement par ligne, de la forme : cl valeur. + Voir la documentation de la directive RewriteMap pour plus de dtails + propos du format de ce fichier et de sa signification. +
    + +
    -o SORTIE_DBM
    +
    Nom du fichier dbm de sortie.
    +
    +
    top
    +
    +

    Exemples

    +

    + httxt2dbm -i rewritemap.txt -o rewritemap.dbm
    + httxt2dbm -f SDBM -i rewritemap.txt -o rewritemap.dbm
    +

    +
    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/httxt2dbm.html.tr.utf8 b/docs/manual/programs/httxt2dbm.html.tr.utf8 index 0bc2824abab..06bcc069435 100644 --- a/docs/manual/programs/httxt2dbm.html.tr.utf8 +++ b/docs/manual/programs/httxt2dbm.html.tr.utf8 @@ -1,35 +1,43 @@ - -httxt2dbm - RewriteMap ile kullanmak için DBM dosyaları üretir - Apache HTTP Sunucusu +httxt2dbm - RewriteMap ile kullanmak için DBM dosyaları üretir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    httxt2dbm - RewriteMap ile kullanmak için DBM dosyaları üretir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    httxt2dbm - RewriteMap ile kullanmak için DBM dosyaları üretir

    Mevcut Diller:  en  | + fr  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    httxt2dbm, RewriteMap ile kullanmak için düz metin dosyalardan DBM dosyaları üretir.

    + +

    Çıktı dosyası mevcutsa dosya kırpılmaz. Yeni anahtarlar eklenir, + mevcutlar da güncellenir.

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -49,19 +57,19 @@
    -f DBM_türü
    Çıktı için kullanılacak DBM türü belirtilir. Belirtilmediği takdirde APR öntanımlısı kullanılır. Belirtilebilecek DBM - türleri:
    - GDBM dosyalar için GDBM
    - SDBM dosyalar için SDBM
    - Berkeley DB dosyalar için DB
    - NDBM dosyalar için NDBM
    + türleri: + GDBM dosyalar için GDBM, + SDBM dosyalar için SDBM, + Berkeley DB dosyalar için DB, + NDBM dosyalar için NDBM, öntanımlı DBM türü için default
    -i kaynak_metin
    DBM dosyasının üretiminde kullanılacak girdi dosyası belirtilir. Bu dosya, her satırda bir kayıt bulunmak üzere her satırı şöyle biçemlenmiş - olmalıdır:
    - anahtar değer
    + olmalıdır: + anahtar değer. Bu dosyanın biçemi ve manası ile ilgili ayrıntılar için RewriteMap yönergesinin açıklamasına bakınız.
    @@ -79,8 +87,30 @@

    Mevcut Diller:  en  | + fr  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/httxt2dbm.xml b/docs/manual/programs/httxt2dbm.xml index f2eb0292630..195201e63d1 100644 --- a/docs/manual/programs/httxt2dbm.xml +++ b/docs/manual/programs/httxt2dbm.xml @@ -28,8 +28,10 @@

    httxt2dbm is used to generate dbm files from text input, for use in RewriteMap with the - dbm map type. -

    + dbm map type.

    + +

    If the output file already exists, it will not be truncated. New keys will be + added and existing keys will be updated.

    httpd mod_rewrite @@ -50,18 +52,17 @@
    -f DBM_TYPE
    Specify the DBM type to be used for the output. If not specified, will - use the APR Default. Available types are:
    - GDBM for GDBM files
    - SDBM for SDBM files
    - DB for berkeley DB files
    - NDBM for NDBM files
    - default for the default DBM type + use the APR Default. Available types are: + GDBM for GDBM files, + SDBM for SDBM files, + DB for berkeley DB files, + NDBM for NDBM files, + default for the default DBM type.
    -i SOURCE_TXT
    Input file from which the dbm is to be created. The file should be formated - with one record per line, of the form:
    - key value
    + with one record per line, of the form: key value. See the documentation for RewriteMap for further details of this file's format and meaning.
    diff --git a/docs/manual/programs/httxt2dbm.xml.fr b/docs/manual/programs/httxt2dbm.xml.fr new file mode 100644 index 00000000000..506066eb32b --- /dev/null +++ b/docs/manual/programs/httxt2dbm.xml.fr @@ -0,0 +1,92 @@ + + + + + + + + + + +Programmes + +httxt2dbm - Génère des fichiers dbm à utiliser avec +RewriteMap + + +

    httxt2dbm permet, à partir d'une entrée au format + texte, de générer des fichiers dbm à utiliser dans les directives + RewriteMap avec le type + de table dbm. +

    + +

    Si le fichier de sortie existe déjà, il ne sera pas tronqué. Les + nouvelles clés seront ajoutées et les clés préexistantes mises à + jour.

    +
    +httpd +mod_rewrite + +
    Syntaxe +

    httxt2dbm + [ -v ] + [ -f TYPE_DBM ] + -i TEXTE_SOURCE + -o SORTIE_DBM +

    +
    + +
    Options +
    +
    -v
    +
    Sortie plus verbeuse
    + +
    -f TYPE_DBM
    +
    Spécifie le type DBM à utiliser pour le fichier de sortie. + S'il n'est pas spécifié, c'est la valeur par défaut de + l'APR qui sera utilisée. Les types disponibles + sont : + GDBM pour les fichiers GDBM, + SDBM pour les fichiers SDBM, + DB pour les fichiers DB, + NDBM pour les fichiers NDBM, + default pour le type DBM par défaut +
    + +
    -i TEXTE_SOURCE
    +
    Le fichier d'entrée à partir duquel le fichier dbm sera créé. Le + fichier doit être formaté de façon à ne contenir qu'un seul + enregistrement par ligne, de la forme : clé valeur. + Voir la documentation de la directive RewriteMap pour plus de détails à + propos du format de ce fichier et de sa signification. +
    + +
    -o SORTIE_DBM
    +
    Nom du fichier dbm de sortie.
    +
    +
    + +
    Exemples + + httxt2dbm -i rewritemap.txt -o rewritemap.dbm
    + httxt2dbm -f SDBM -i rewritemap.txt -o rewritemap.dbm
    +
    +
    + +
    diff --git a/docs/manual/programs/httxt2dbm.xml.meta b/docs/manual/programs/httxt2dbm.xml.meta index c3d9815922d..047acda10dd 100644 --- a/docs/manual/programs/httxt2dbm.xml.meta +++ b/docs/manual/programs/httxt2dbm.xml.meta @@ -8,6 +8,7 @@ en - tr + fr + tr diff --git a/docs/manual/programs/httxt2dbm.xml.tr b/docs/manual/programs/httxt2dbm.xml.tr index e5b7f622667..4ea406c9548 100644 --- a/docs/manual/programs/httxt2dbm.xml.tr +++ b/docs/manual/programs/httxt2dbm.xml.tr @@ -1,10 +1,10 @@ - + -Server and Supporting Programs - Apache HTTP Server +Server and Supporting Programs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Server and Supporting Programs

    +Apache > HTTP Server > Documentation > Version 2.4

    Server and Supporting Programs

    Available Languages:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    @@ -89,7 +95,7 @@
    Resolve hostnames for IP-addresses in Apache logfiles
    -
    log_server_status
    +
    log_server_status
    Periodically log the server's status
    @@ -97,7 +103,7 @@
    Rotate Apache logs without having to kill the server
    -
    split-logfile
    +
    split-logfile
    Split a multi-vhost logfile into per-host logfiles
    @@ -110,10 +116,15 @@

    Available Languages:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/programs/index.html.es b/docs/manual/programs/index.html.es index eaea026c874..bae62e8bba7 100644 --- a/docs/manual/programs/index.html.es +++ b/docs/manual/programs/index.html.es @@ -1,33 +1,35 @@ - -El Servidor Apache y Programas de Soporte - Servidor HTTP Apache +El Servidor Apache y Programas de Soporte - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    El Servidor Apache y Programas de Soporte

    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    El Servidor Apache y Programas de Soporte

    Idiomas disponibles:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    -
    Esta traduccin podra estar - obsoleta. Consulte la versin en ingls de la - documentacin para comprobar si se han producido cambios - recientemente.

    Esta pgina contiene toda la documentacin sobre los programas ejecutables incluidos en el servidor Apache.

    @@ -37,68 +39,94 @@

    ndice

    -
    httpd
    +
    httpd
    Servidor Apache del Protocolo de Transmisin de Hipertexto (HTTP)
    -
    apachectl
    +
    apachectl
    Interfaz de control del servidor HTTP Apache
    -
    ab
    +
    ab
    Herramienta de benchmarking del Servidor HTTP Apache
    -
    apxs
    +
    apxs
    Herramienta de Extensin de Apache
    -
    configure
    +
    configure
    Configuracin de la estructura de directorios de Apache
    -
    dbmmanage
    +
    dbmmanage
    Crea y actualiza los archivos de autentificacin de usuarios en formato DBM para autentificacin bsica
    -
    htdigest
    +
    fcgistarter
    + +
    Ejecuta un programa FastCGI.
    + +
    htcacheclean
    + +
    Vaca la cach del disco.
    + +
    htdigest
    Crea y actualiza los ficheros de autentificacin de usuarios para autentificacin tipo digest
    -
    htpasswd
    +
    htdbm
    + +
    Manipula la base de datos DBM de contraseas.
    + +
    htpasswd
    Crea y actualiza los ficheros de autentificacin de usuarios - para autentificacin bsica
    + para autentificacin tipo bsica + +
    httxt2dbm
    + +
    Crea ficheros dbm para que se usen con RewriteMap
    -
    logresolve
    +
    logresolve
    -
    Resuelve los nombres de host para direcciones IP que estn +
    Resuelve los nombres de host para direcciones IP que estn en los ficheros log de Apache
    -
    rotatelogs
    +
    log_server_status
    + +
    Logea de forma peridica el estado del servidor.
    + +
    rotatelogs
    + +
    Renueva los logs de Apache sin tener que parar el servidor
    -
    Renueva los logs de Apache sin parar el servidor
    +
    split-logfile
    -
    suexec
    +
    Divide un archivo de registro multi-host virtual en + archivos de registro por host
    -
    Switch User For Exec. Programa para cambiar la identidad de - usuario con la que se ejecuta un CGI
    +
    suexec
    -
    Otros Programas
    -
    Herramientas de soporte sin seccin propia en la - documentacin.
    -
    +
    Programa para cambiar la identidad de + usuario con la que se ejecuta un CGI
    +

    Idiomas disponibles:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licencia bajo los trminos de Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/programs/index.html.fr b/docs/manual/programs/index.html.fr new file mode 100644 index 00000000000..f7315d392f8 --- /dev/null +++ b/docs/manual/programs/index.html.fr @@ -0,0 +1,132 @@ + + + + + +Le serveur et ses utilitaires - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Le serveur et ses utilitaires

    +
    +

    Langues Disponibles:  en  | + es  | + fr  | + ko  | + tr  | + zh-cn 

    +
    + +

    Cette page documente tous les utilitaires inclus + dans le serveur HTTP Apache.

    +
    +
    top
    +
    +

    Index

    + +
    +
    httpd
    + +
    Le serveur de protocole de transfert hypertexte Apache
    + +
    apachectl
    + +
    L'interface de contrle du serveur HTTP Apache
    + +
    ab
    + +
    L'outil de test de performances du serveur HTTP Apache
    + +
    apxs
    + +
    L'outil de gestion des extensions Apache
    + +
    configure
    + +
    Configuration de l'arborescence des sources
    + +
    dbmmanage
    + +
    Cre et met jour les fichiers d'authentification utilisateurs au + format DBM pour une authentification basique
    + +
    fcgistarter
    + +
    Lance un programme fastcgi
    + +
    htcacheclean
    + +
    Nettoie le cache sur disque
    + +
    htdigest
    + +
    Cre et met jour les fichiers d'authentification pour une + authentification sommaire
    + +
    htdbm
    + +
    Manipulation des bases de donnes DBM des mots de passe.
    + +
    htpasswd
    + +
    Cre et met jour les fichiers d'authentification pour une + authentification basique
    + +
    httxt2dbm
    + +
    Cre des fichiers dbm destins tre utiliss avec + RewriteMap
    + +
    logresolve
    + +
    Rsolution des noms d'htes en adresses IP dans les fichiers + de traces d'Apache
    + +
    log_server_status
    + +
    Journalisation priodique du statut du serveur
    + +
    rotatelogs
    + +
    Rotation des traces d'Apache sans devoir arrter le serveur
    + +
    split-logfile
    + +
    Divise un journal pour plusieurs htes virtuels en journaux + spcifiques chaque hte
    + +
    suexec
    + +
    Change d'utilisateur pour l'excution de certains programmes
    + +
    +
    +
    +

    Langues Disponibles:  en  | + es  | + fr  | + ko  | + tr  | + zh-cn 

    +
    + \ No newline at end of file diff --git a/docs/manual/programs/index.html.ko.euc-kr b/docs/manual/programs/index.html.ko.euc-kr index 4450bc0846e..ca37a471554 100644 --- a/docs/manual/programs/index.html.ko.euc-kr +++ b/docs/manual/programs/index.html.ko.euc-kr @@ -1,25 +1,31 @@ - - α׷ - Apache HTTP Server + α׷ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    α׷

    :  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    @@ -91,10 +97,15 @@ +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/programs/index.html.tr.utf8 b/docs/manual/programs/index.html.tr.utf8 index f0e751e3a1c..64575e17556 100644 --- a/docs/manual/programs/index.html.tr.utf8 +++ b/docs/manual/programs/index.html.tr.utf8 @@ -1,25 +1,31 @@ - -Sunucu ve Destek Programları - Apache HTTP Sunucusu +Sunucu ve Destek Programları - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Sunucu ve Destek Programları

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Sunucu ve Destek Programları

    Mevcut Diller:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    @@ -78,14 +84,14 @@
    Apache günlük dosyalarındaki IP adreslerini konak isimlerine dönüştürür.
    -
    log_server_status
    +
    log_server_status
    Sunucunun durumunu düzenli aralıklarla günlüğe kaydeder.
    rotatelogs
    Sunucuyu öldürmek gerekmeksizin günlük dosyalarının döndürülmesini sağlar.
    -
    split-logfile
    +
    split-logfile
    Bir çok konaklı günlük dosyasını konak başına bir günlük dosyası düşecek şekilde böler.
    suexec
    @@ -95,10 +101,15 @@

    Mevcut Diller:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    +
    \ No newline at end of file diff --git a/docs/manual/programs/index.html.zh-cn b/docs/manual/programs/index.html.zh-cn.utf8 similarity index 80% rename from docs/manual/programs/index.html.zh-cn rename to docs/manual/programs/index.html.zh-cn.utf8 index 62e0526642c..fe80dd671d9 100644 --- a/docs/manual/programs/index.html.zh-cn +++ b/docs/manual/programs/index.html.zh-cn.utf8 @@ -1,29 +1,36 @@ - -Apache HTTP 服务器与支持程序 - Apache HTTP 服务器 +Apache HTTP 服务器与支持程序 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache HTTP 服务器与支持程序

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache HTTP 服务器与支持程序

    可用语言:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    本页描述了 Apache HTTP 服务器包含的所有可执行程序。

    @@ -103,10 +110,15 @@

    可用语言:  en  |  es  | + fr  |  ko  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/programs/index.xml b/docs/manual/programs/index.xml index edd42b13e1f..5cffa9bea89 100644 --- a/docs/manual/programs/index.xml +++ b/docs/manual/programs/index.xml @@ -89,8 +89,7 @@
    Resolve hostnames for IP-addresses in Apache logfiles
    -
    log_server_status
    +
    log_server_status
    Periodically log the server's status
    @@ -98,7 +97,7 @@
    Rotate Apache logs without having to kill the server
    -
    split-logfile
    +
    split-logfile
    Split a multi-vhost logfile into per-host logfiles
    diff --git a/docs/manual/programs/index.xml.es b/docs/manual/programs/index.xml.es index 6e65b07bd12..c493b2e8a47 100644 --- a/docs/manual/programs/index.xml.es +++ b/docs/manual/programs/index.xml.es @@ -1,8 +1,9 @@ - - + + + + + + + + + + + + Le serveur et ses utilitaires + + +

    Cette page documente tous les utilitaires inclus + dans le serveur HTTP Apache.

    +
    + +
    Index + +
    +
    httpd
    + +
    Le serveur de protocole de transfert hypertexte Apache
    + +
    apachectl
    + +
    L'interface de contrôle du serveur HTTP Apache
    + +
    ab
    + +
    L'outil de test de performances du serveur HTTP Apache
    + +
    apxs
    + +
    L'outil de gestion des extensions Apache
    + +
    configure
    + +
    Configuration de l'arborescence des sources
    + +
    dbmmanage
    + +
    Crée et met à jour les fichiers d'authentification utilisateurs au + format DBM pour une authentification basique
    + +
    fcgistarter
    + +
    Lance un programme fastcgi
    + +
    htcacheclean
    + +
    Nettoie le cache sur disque
    + +
    htdigest
    + +
    Crée et met à jour les fichiers d'authentification pour une + authentification sommaire
    + +
    htdbm
    + +
    Manipulation des bases de données DBM des mots de passe.
    + +
    htpasswd
    + +
    Crée et met à jour les fichiers d'authentification pour une + authentification basique
    + +
    httxt2dbm
    + +
    Crée des fichiers dbm destinés à être utilisés avec + RewriteMap
    + +
    logresolve
    + +
    Résolution des noms d'hôtes en adresses IP dans les fichiers + de traces d'Apache
    + +
    log_server_status
    + +
    Journalisation périodique du statut du serveur
    + +
    rotatelogs
    + +
    Rotation des traces d'Apache sans devoir arrêter le serveur
    + +
    split-logfile
    + +
    Divise un journal pour plusieurs hôtes virtuels en journaux + spécifiques à chaque hôte
    + +
    suexec
    + +
    Change d'utilisateur pour l'exécution de certains programmes
    + +
    +
    + +
    diff --git a/docs/manual/programs/index.xml.ko b/docs/manual/programs/index.xml.ko index 0d1d0b87d16..f8ef302e77c 100644 --- a/docs/manual/programs/index.xml.ko +++ b/docs/manual/programs/index.xml.ko @@ -1,7 +1,7 @@ - + + + +log_server_status - Log periodic status summaries - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    log_server_status - Log periodic status summaries

    +
    +

    Available Languages:  en 

    +
    + +

    This perl script is designed to be run at a frequent interval by + something like cron. It connects to the server and downloads the status + information. It reformats the information to a single line and logs it to + a file. Adjust the variables at the top of the script to specify the + location of the resulting logfile. mod_status will + need to be loaded and configured in order for this script to do its + job.

    +
    +
    top
    +
    +

    Usage

    + +

    The script contains the following section.

    + +
    my $wherelog = "/usr/local/apache2/logs/";  # Logs will be like "/usr/local/apache2/logs/19960312"
    +my $server   = "localhost";        # Name of server, could be "www.foo.com"
    +my $port     = "80";               # Port on server
    +my $request = "/server-status/?auto";    # Request to send
    + + +

    You'll need to ensure that these variables have the correct values, +and you'll need to have the /server-status handler +configured at the location specified, and the specified log location +needs to be writable by the user which will run the script.

    + +

    Run the script periodically via cron to produce a daily log file, +which can then be used for statistical analysis.

    + +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/log_server_status.xml b/docs/manual/programs/log_server_status.xml new file mode 100644 index 00000000000..39feb98a0c6 --- /dev/null +++ b/docs/manual/programs/log_server_status.xml @@ -0,0 +1,59 @@ + + + + + + + + +Programs + +log_server_status - Log periodic status summaries + + +

    This perl script is designed to be run at a frequent interval by + something like cron. It connects to the server and downloads the status + information. It reformats the information to a single line and logs it to + a file. Adjust the variables at the top of the script to specify the + location of the resulting logfile. mod_status will + need to be loaded and configured in order for this script to do its + job.

    +
    + +
    Usage + +

    The script contains the following section.

    + + +my $wherelog = "/usr/local/apache2/logs/"; # Logs will be like "/usr/local/apache2/logs/19960312" +my $server = "localhost"; # Name of server, could be "www.foo.com" +my $port = "80"; # Port on server +my $request = "/server-status/?auto"; # Request to send + + +

    You'll need to ensure that these variables have the correct values, +and you'll need to have the /server-status handler +configured at the location specified, and the specified log location +needs to be writable by the user which will run the script.

    + +

    Run the script periodically via cron to produce a daily log file, +which can then be used for statistical analysis.

    + +
    + +
    diff --git a/docs/manual/programs/log_server_status.xml.meta b/docs/manual/programs/log_server_status.xml.meta new file mode 100644 index 00000000000..4ad2755872a --- /dev/null +++ b/docs/manual/programs/log_server_status.xml.meta @@ -0,0 +1,12 @@ + + + + + log_server_status + /programs/ + .. + + + en + + diff --git a/docs/manual/programs/logresolve.html b/docs/manual/programs/logresolve.html index a8958c831e9..0f81226e58f 100644 --- a/docs/manual/programs/logresolve.html +++ b/docs/manual/programs/logresolve.html @@ -4,6 +4,10 @@ Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: logresolve.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: logresolve.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/programs/logresolve.html.en b/docs/manual/programs/logresolve.html.en index 8f31cdef4bd..18dbe2b81b8 100644 --- a/docs/manual/programs/logresolve.html.en +++ b/docs/manual/programs/logresolve.html.en @@ -1,26 +1,32 @@ - logresolve - Resolve IP-addresses to hostnames in Apache - log files - Apache HTTP Server + log files - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    logresolve - Resolve IP-addresses to hostnames in Apache +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    logresolve - Resolve IP-addresses to hostnames in Apache log files

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -37,7 +43,7 @@
    +

    See also

    top

    Synopsis

    @@ -66,9 +72,31 @@ original address.

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/logresolve.html.fr b/docs/manual/programs/logresolve.html.fr new file mode 100644 index 00000000000..52fd4bdfabf --- /dev/null +++ b/docs/manual/programs/logresolve.html.fr @@ -0,0 +1,106 @@ + + + + + +logresolve - Rsoud les adresses IP en noms d'htes dans les + fichiers journaux d'Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    logresolve - Rsoud les adresses IP en noms d'htes dans les + fichiers journaux d'Apache

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    logresolve est un programme agissant aprs + traitement pour rsoudre les adresses IP dans les journaux d'accs + d'Apache. Pour minimiser la charge de votre serveur de noms, + logresolve possde son propre cache interne sous forme d'une table + de hashage. Cela implique que chaque numro IP ne fera l'objet + d'une requte DNS que la premire fois o il est rencontr dans le + fichier journal.

    + +

    Le programme reoit le fichier journal sur son entre standard. + Les adresses IP doivent se trouver en tte de chaque ligne et + doivent tre spares du reste de la ligne par un espace.

    +
    + +
    top
    +
    +

    Syntaxe

    + +

    logresolve [ -s + nom-fichier ] [ -c ] < + access_log > access_log.new

    +
    top
    +
    +

    Options

    + +
    + +
    -s nom-fichier
    + +
    Spcifie le nom du fichier o seront enregistres des +statistiques.
    + +
    -c
    + +
    Avec cette option, logresolve effectue certaines +vrifications DNS : aprs avoir trouv le nom d'hte correspondant une +adresse IP, logresolve effectue une recherche DNS sur ce +nom d'hte et vrifie si une des adresses IP trouves correspond +l'adresse originale.
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/logresolve.html.ko.euc-kr b/docs/manual/programs/logresolve.html.ko.euc-kr index 8e302cd47f2..599f6a13db7 100644 --- a/docs/manual/programs/logresolve.html.ko.euc-kr +++ b/docs/manual/programs/logresolve.html.ko.euc-kr @@ -1,26 +1,32 @@ - logresolve - ġ α IP-ּҸ ȣƮ - ȯѴ - Apache HTTP Server + ȯѴ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    logresolve - ġ α IP-ּҸ ȣƮ +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    logresolve - ġ α IP-ּҸ ȣƮ ȯѴ

    @@ -37,7 +43,7 @@
    +

    top

    @@ -65,9 +71,31 @@ IP
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/logresolve.html.tr.utf8 b/docs/manual/programs/logresolve.html.tr.utf8 index 71d1647f86d..ed5ec0fbf0e 100644 --- a/docs/manual/programs/logresolve.html.tr.utf8 +++ b/docs/manual/programs/logresolve.html.tr.utf8 @@ -1,30 +1,35 @@ - logresolve - Apache günlük dosyalarındaki IP adreslerini konak - isimlerine dönüştürür - Apache HTTP Sunucusu + isimlerine dönüştürür - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    logresolve - Apache günlük dosyalarındaki IP adreslerini konak +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    logresolve - Apache günlük dosyalarındaki IP adreslerini konak isimlerine dönüştürür

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    logresolve, Apache'nin erişim günlüklerindeki IP adreslerini çözümlemek için bir ardıl işlem @@ -38,7 +43,7 @@

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -64,9 +69,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/logresolve.xml.fr b/docs/manual/programs/logresolve.xml.fr new file mode 100644 index 00000000000..a79a55c32d4 --- /dev/null +++ b/docs/manual/programs/logresolve.xml.fr @@ -0,0 +1,74 @@ + + + + + + + + + + + +Programmes + + logresolve - Résoud les adresses IP en noms d'hôtes dans les + fichiers journaux d'Apache + + +

    logresolve est un programme agissant après + traitement pour résoudre les adresses IP dans les journaux d'accès + d'Apache. Pour minimiser la charge de votre serveur de noms, + logresolve possède son propre cache interne sous forme d'une table + de hashage. Cela implique que chaque numéro IP ne fera l'objet + d'une requête DNS que la première fois où il est rencontré dans le + fichier journal.

    + +

    Le programme reçoit le fichier journal sur son entrée standard. + Les adresses IP doivent se trouver en tête de chaque ligne et + doivent être séparées du reste de la ligne par un espace.

    +
    + +
    Syntaxe + +

    logresolve [ -s + nom-fichier ] [ -c ] < + access_log > access_log.new

    +
    + + +
    Options + +
    + +
    -s nom-fichier
    + +
    Spécifie le nom du fichier où seront enregistrées des +statistiques.
    + +
    -c
    + +
    Avec cette option, logresolve effectue certaines +vérifications DNS : après avoir trouvé le nom d'hôte correspondant à une +adresse IP, logresolve effectue une recherche DNS sur ce +nom d'hôte et vérifie si une des adresses IP trouvées correspond à +l'adresse originale.
    + +
    +
    + +
    diff --git a/docs/manual/programs/logresolve.xml.meta b/docs/manual/programs/logresolve.xml.meta index 8b415550e67..1a678ffd4f9 100644 --- a/docs/manual/programs/logresolve.xml.meta +++ b/docs/manual/programs/logresolve.xml.meta @@ -8,7 +8,8 @@ en + fr ko - tr + tr diff --git a/docs/manual/programs/logresolve.xml.tr b/docs/manual/programs/logresolve.xml.tr index ad6739b5396..6d786584e4c 100644 --- a/docs/manual/programs/logresolve.xml.tr +++ b/docs/manual/programs/logresolve.xml.tr @@ -1,7 +1,7 @@ - + -Other Programs - Apache HTTP Server +Other Programs - Apache HTTP Server Version 2.4 - + + + - +
    <-

    Other Programs

    Available Languages:  en  | + fr  |  ko  |  tr 

    -

    The following programs are simple support programs included with the - Apache HTTP Server which do not have their own manual pages. They are not - installed automatically. You can find them after the configuration process - in the support/ directory.

    -
    - -
    top
    -
    -

    log_server_status

    -

    This perl script is designed to be run at a frequent interval by - something like cron. It connects to the server and downloads the status - information. It reformats the information to a single line and logs it to - a file. Adjust the variables at the top of the script to specify the - location of the resulting logfile.

    -
    top
    -
    -

    split-logfile

    -

    This perl script will take a combined Web server access log file and - break its contents into separate files. It assumes that the first field of - each line is the virtual host identity, put there using the "%v" - variable in LogFormat. -

    - -

    - LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - combined_plus_vhost
    - CustomLog logs/access_log combined_plus_vhost -

    - -

    Log files will be created, in the directory where are running the - script, for each virtual host name that appears in the combined log file. - These logfiles will named after the hostname, with a - .log file extension.

    - -

    The combined log file is read from stdin. Records read will be appended - to any existing log files.

    +

    This page used to contain documentation for programs which now + have their own docs pages. Please update any links.

    -

    split-logfile < access_log

    - - -
    +

    log_server_status

    +

    split-logfile

    +
    +

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/other.html.fr b/docs/manual/programs/other.html.fr new file mode 100644 index 00000000000..f5db6c54a5b --- /dev/null +++ b/docs/manual/programs/other.html.fr @@ -0,0 +1,70 @@ + + + + + +Autres programmes - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Autres programmes

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + + +

    Cette page contenait la documentation de programmes qui possdent + maintenant leurs propres pages de documentation. Merci de bien + vouloir mettre jour vos liens.

    + +

    log_server_status

    +

    split-logfile

    +
    +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/other.html.ko.euc-kr b/docs/manual/programs/other.html.ko.euc-kr index 1dd673b1873..9e1f4515ee2 100644 --- a/docs/manual/programs/other.html.ko.euc-kr +++ b/docs/manual/programs/other.html.ko.euc-kr @@ -1,24 +1,30 @@ - -Other Programs - Apache HTTP Server +Other Programs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Other Programs

    @@ -32,7 +38,7 @@
    +

    top

    log_server_status

    @@ -53,9 +59,31 @@
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/other.html.tr.utf8 b/docs/manual/programs/other.html.tr.utf8 index 5b0dac6f6fc..3cb9ff126e9 100644 --- a/docs/manual/programs/other.html.tr.utf8 +++ b/docs/manual/programs/other.html.tr.utf8 @@ -1,78 +1,68 @@ - -Diğer Programlar - Apache HTTP Sunucusu +Diğer Programlar - Apache HTTP Sunucusu Sürüm 2.4 - + + + - +
    <-

    Diğer Programlar

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    - -

    Aşağıdaki programlar Apache HTTP Sunucusu ile gelen basit destek - programları olup kendilerine ait kılavuz sayfaları yoktur. Bunlar - özdevinimli olarak kurulmazlar. Derleme işleminden sonra bunları - support/ dizininde bulabilirsiniz.

    -
    - -
    top
    -
    -

    log_server_status

    -

    Bu perl betiği cron gibi bir şeyleri belli aralıklarla çalıştırmak için - tasarlanmıştır. Sunucuya bağlanıp durum bilgisini indirdikten sonra bunları - tek bir satır haline getirip bir günlük dosyasına kaydeder. Sonuçların - kaydedileceği günlük dosyasını betiğin başlangıcındaki değişkenlerde - değişiklik yaparak belirtebilirsiniz.

    -
    top
    -
    -

    split-logfile

    -

    Bu perl betiği sanal konaklı bir birleşik günlük dosyasını girdi olarak - alır ve içeriğini ayrı dosyalara böler. Günlük dosyasındaki her kaydın ilk - bileşeninin, LogFormat - yönergesinde "%v" belirteci ile ifade edilen sanal konak adı - olduğu varsayılır. -

    - -

    - LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - combined_plus_vhost
    - CustomLog logs/access_log combined_plus_vhost -

    - -

    Birleşik günlük dosyasında görünen her sanal konak için betiğin - çalıştırıldığı dizinde ayrı birer günlük dosyası açılır. Bu günlük - dosyalarının isimleri, .log uzantılı sanal konak - isimleridir.

    -

    Birleşik günlük dosyası standart girdiden okunur. Kayıtlar okundukça - her biri kendi günlük dosyasına kaydedilir.

    +

    Bu sayfada daha önce belgelenen programlar şimdi kendi belgelerine + sahiptir. Bu sayfaya verilmiş bağlantıları lütfen güncelleyin.

    -

    split-logfile < access_log

    - - -
    +

    log_server_status

    +

    split-logfile

    +
    +

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/other.xml b/docs/manual/programs/other.xml index 334dfd3a32c..890aca9b6f9 100644 --- a/docs/manual/programs/other.xml +++ b/docs/manual/programs/other.xml @@ -26,44 +26,11 @@ Other Programs -

    The following programs are simple support programs included with the - Apache HTTP Server which do not have their own manual pages. They are not - installed automatically. You can find them after the configuration process - in the support/ directory.

    -
    - -
    log_server_status -

    This perl script is designed to be run at a frequent interval by - something like cron. It connects to the server and downloads the status - information. It reformats the information to a single line and logs it to - a file. Adjust the variables at the top of the script to specify the - location of the resulting logfile.

    -
    - -
    split-logfile -

    This perl script will take a combined Web server access log file and - break its contents into separate files. It assumes that the first field of - each line is the virtual host identity, put there using the "%v" - variable in LogFormat. -

    - - - LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - combined_plus_vhost
    - CustomLog logs/access_log combined_plus_vhost -
    - -

    Log files will be created, in the directory where are running the - script, for each virtual host name that appears in the combined log file. - These logfiles will named after the hostname, with a - .log file extension.

    +

    This page used to contain documentation for programs which now + have their own docs pages. Please update any links.

    -

    The combined log file is read from stdin. Records read will be appended - to any existing log files.

    - - split-logfile < access_log - - -
    +

    log_server_status

    +

    split-logfile

    + diff --git a/docs/manual/programs/other.xml.fr b/docs/manual/programs/other.xml.fr new file mode 100644 index 00000000000..9764acb8d0c --- /dev/null +++ b/docs/manual/programs/other.xml.fr @@ -0,0 +1,40 @@ + + + + + + + + + + +Programmes + +Autres programmes + + + +

    Cette page contenait la documentation de programmes qui possèdent + maintenant leurs propres pages de documentation. Merci de bien + vouloir mettre à jour vos liens.

    + +

    log_server_status

    +

    split-logfile

    +
    + +
    diff --git a/docs/manual/programs/other.xml.ko b/docs/manual/programs/other.xml.ko index 2baddc366d2..0b2f74db7c5 100644 --- a/docs/manual/programs/other.xml.ko +++ b/docs/manual/programs/other.xml.ko @@ -1,7 +1,7 @@ - + + -rotatelogs - Piped logging program to rotate Apache logs - Apache HTTP Server +rotatelogs - Piped logging program to rotate Apache logs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    rotatelogs - Piped logging program to rotate Apache logs

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    rotatelogs - Piped logging program to rotate Apache logs

    Available Languages:  en  | + fr  |  ko  |  tr 

    @@ -31,7 +37,7 @@
  • Options
  • Examples
  • Portability
  • -
    +

    See also

    top

    Synopsis

    @@ -41,9 +47,11 @@ [ -L linkname ] [ -p program ] [ -f ] + [ -t ] [ -v ] [ -e ] [ -c ] + [ -n number-of-files ] logfile rotationtime|filesize(B|K|M|G) [ offset ]

    @@ -105,6 +113,12 @@ processed in real time by a further tool in the chain.
    -c
    Create log file for each interval, even if empty.
    +
    -n number-of-files
    +
    Use a circular list of filenames without timestamps. +With -n 3, the series of log files opened would be +"logfile", "logfile.1", "logfile.2", then overwriting "logfile". +Available in 2.4.5 and later.
    +
    logfile

    The path plus basename of the logfile. If logfile @@ -122,7 +136,7 @@ be sure the log file format has enough granularity to produce a different file name each time the logs are rotated. Otherwise rotation will overwrite the same file instead of starting a new one. For example, if logfile was -/var/logs/errorlog.%Y-%m-%d with log rotation at 5 +/var/log/errorlog.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file.

    @@ -162,32 +176,32 @@ an offset.

    Examples

    - CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs /var/log/logfile 86400" common

    -

    This creates the files /var/logs/logfile.nnnn where nnnn is +

    This creates the files /var/log/logfile.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time (here after 24 hours) a new log is started.

    - CustomLog "|bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common + CustomLog "|bin/rotatelogs -l /var/log/logfile.%Y.%m.%d 86400" common

    -

    This creates the files /var/logs/logfile.yyyy.mm.dd where +

    This creates the files /var/log/logfile.yyyy.mm.dd where yyyy is the year, mm is the month, and dd is the day of the month. Logging will switch to a new file every day at midnight, local time.

    - CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common + CustomLog "|bin/rotatelogs /var/log/logfile 5M" common

    This configuration will rotate the logfile whenever it reaches a size of 5 megabytes.

    - ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M" + ErrorLog "|bin/rotatelogs /var/log/errorlog.%Y-%m-%d-%H_%M_%S 5M"

    This configuration will rotate the error logfile whenever it reaches a size of 5 megabytes, and the suffix to the logfile name @@ -195,10 +209,10 @@ an offset. errorlog.YYYY-mm-dd-HH_MM_SS.

    - CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs -t /var/log/logfile 86400" common

    -

    This creates the file /var/logs/logfile, truncating the file at +

    This creates the file /var/log/logfile, truncating the file at startup and then truncating the file once per day. It is expected in this scenario that a separate process (such as tail) would process the file in real time.

    @@ -242,9 +256,31 @@ extensions.

    Available Languages:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/rotatelogs.html.fr b/docs/manual/programs/rotatelogs.html.fr new file mode 100644 index 00000000000..116efe1c943 --- /dev/null +++ b/docs/manual/programs/rotatelogs.html.fr @@ -0,0 +1,301 @@ + + + + + +rotatelogs - Rotation des journaux d'Apache par redirection de + ces derniers dans un "pipe" - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    rotatelogs - Rotation des journaux d'Apache par redirection de + ces derniers dans un "pipe"

    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    + +

    rotatelogs est un programme simple utiliser en + conjonction avec la fonctionnalit d'Apache de redirection dans un + "pipe" des fichiers journaux. Il supporte une rotation base sur un + intervalle de temps ou une taille maximale du journal.

    +
    + +
    top
    +
    +

    Syntaxe

    + +

    rotatelogs + [ -l ] + [ -L nom-lien ] + [ -p programme ] + [ -f ] + [ -t ] + [ -v ] + [ -e ] + [ -c ] + [ -n nombre-de-fichiers ] + fichier-journal + heure-de-rotation|taille-fichier(B|K|M|G) + [ dcalage ]

    +
    top
    +
    +

    Options

    + +
    + +
    -l
    +
    Utilise le temps local plutt que GMT comme base pour l'intervalle +de temps ou pour le formatage de strftime(3) avec une +rotation base sur la taille.
    + +
    -L nom-lien
    +
    Etablit un lien physique entre le fichier journal courant et le lien +spcifi. Cette option permet de consulter le journal de manire +continue malgr les rotations via une commande du style tail -F +nom-lien.
    + +
    -p programme
    +
    Avec cette option, rotatelogs excutera le programme +programme chaque fois qu'un nouveau fichier journal sera +ouvert. Le nom du fichier nouvellement ouvert est pass comme premier +argument au programme. Si l'excution se produit aprs une rotation, +l'ancien nom du fichier journal est pass au programme comme second +argument. rotatelogs +n'attend pas la fin du programme pour continuer son +excution, et cessera tout enregistrement de codes d'erreur lorsqu'il +aura termin son processus. Le programme utilise les mmes +canaux stdin, stdout, et stderr que rotatelogs, et hrite de son +environnement.
    + +
    -f
    +
    Ouvre le fichier journal immdiatement, ds que +rotatelogs dmarre, au lieu d'attendre la lecture de la +premire entre de journal (pour les sites peu chargs, il peut +s'couler un temps substantiel entre le dmarrage du serveur et le +traitement de la premire requte, temps pendant lequel le fichier +journal associ n'"existe" pas, ce qui peut causer des problmes +certains utilitaires de journalisation automatiques).
    + +
    -t
    +
    Provoque une troncature du fichier journal au lieu d'une rotation. +Cela peut s'avrer utile lorsqu'un journal est labor en temps rel par +une commande telle que tail, l'archivage des donnes n'tant ici pas +ncessaire. Si aucun suffixe n'est ajout au nom de fichier, les +chanes de format contenant des caractres '%' sont cependant +respectes. +
    + +
    -v
    +
    Affiche une sortie verbeuse sur STDERR. La sortie contient le +rsultat de l'interprtation de la configuration, ainsi que toutes les +oprations d'ouverture et de fermeture de fichiers.
    + +
    -c
    +
    Cre un fichier journal pour chaque intervalle, mme s'il est vide.
    + +
    -e
    +
    Envoie les messages de journalisation vers stdout. Ceci s'avre +utile lorsque les journaux doivent tre traits par un autre programme.
    + +
    -n nombre-de-fichiers
    +
    Utilise une liste circulaire de fichiers sans repres de temps. Avec +-n 3, la srie de fichiers conservs sera "logfile", +"logfile.1", "logfile.2" avec crasement de "logfile". +Disponible partir de la version 2.4.5 du serveur HTTP Apache.
    + +
    fichier-journal
    +

    Le chemin et le nom de base du fichier journal. Si +fichier-journal contient des caractres '%', il est considr +comme une chane de formatage pour strftime(3). Dans le cas +contraire, le suffixe .nnnnnnnnnn est automatiquement ajout +et correspond au temps en secondes (sauf si l'option -t est spcifie). +Les deux formats calculent le temps +de dmarrage depuis le dbut de la priode courante. Par exemple, si un +temps de rotation de 86400 est spcifi, les champs heure, minute et +seconde crs partir du format strftime(3) auront tous +pour valeur 0, en rfrence au dbut de la priode de 24 heures courante +(minuit).

    +

    Si vous utilisez le formatage de noms de fichiers +strftime(3), assurez-vous que le format du fichier journal +possde une granularit suffisamment importante pour gnrer un nom de +fichier diffrent chaque rotation des journaux. Si ce n'est pas le +cas, la rotation va craser le fichier existant au lieu d'en gnrer un +nouveau. Par exemple, si fichier-journal tait +/var/log/errorlog.%Y-%m-%d avec une rotation 5 +mgaoctets, et si la limite de 5 mgaoctets a t atteinte deux fois +dans la mme journe, le mme nom de fichier va tre gnr, et la +rotation va craser le fichier existant.

    +
    + +
    temps-rotation
    + +
    Le temps entre deux rotations des fichiers journaux en secondes. La +rotation intervient au dbut de cet intervalle. Par exemple, si le temps +de rotation est de 3600, la rotation des fichiers journaux s'effectuera +au dbut de chaque heure ; si le temps de rotation est de 86400, la +rotation des fichiers journaux s'effectuera chaque nuit minuit. (Si +aucune donne n'est enregistre au cours d'un intervalle, aucun fichier +ne sera cr).
    + +
    taille-fichier(B|K|M|G)
    + +
    La taille maximale du fichier suivie par une des lettres +B (Octets), K (KOctets), M (MOctets) +ou G (GOctets). +

    +Lorsque temps et taille sont spcifis, la taille doit l'tre aprs le +temps. La rotation interviendra alors aussitt que l'une des deux limites +(temps ou taille) sera atteinte. +

    +
    + +
    dcalage
    + +
    Le dcalage en minutes par rapport au temps UTC. Par dfaut, le +dcalage est considr comme nul et c'est le temps UTC qui est utilis. +Par exemple, pour utiliser le temps local de la zone UTC -5 heures, +spcifiez une valeur de -300 pour cette option. Dans la +plupart des cas, il vaut mieux utiliser l'option -l que +spcifier un dcalage.
    + +
    +
    top
    +
    +

    Exemples

    + +

    + CustomLog "|bin/rotatelogs /var/log/fichier-journal 86400" common +

    + +

    Cette directive cre les fichiers /var/log/fichier-journal.nnnn + o nnnn correspond au temps systme auquel la journalisation + dmarre effectivement (ce temps sera toujours un multiple du temps + de rotation, si bien que vous pouvez synchroniser les scripts cron + avec lui). A la fin de chaque temps de rotation (ici aprs 24 + heures), une nouvelle journalisation dmarre.

    + +

    + CustomLog "|bin/rotatelogs -l /var/log/fichier-journal.%Y.%m.%d 86400" common +

    + +

    Cette directive cre les fichiers + /var/log/fichier-journal.yyyy.mm.dd o yyyy correspond l'anne, + mm au mois et dd au jour du mois. La journalisation basculera vers + un nouveau fichier chaque jour minuit, temps local.

    + +

    + CustomLog "|bin/rotatelogs /var/log/fichier-journal 5M" common +

    + +

    Cette directive va effectuer une rotation du fichier journal + chaque fois que la taille de ce dernier atteindra 5 MOctets.

    + +

    + ErrorLog "|bin/rotatelogs /var/log/journal-erreurs.%Y-%m-%d-%H_%M_%S 5M" +

    +

    Cette directive va effectuer une rotation du fichier journal des + erreurs chaque fois que la taille de ce dernier atteindra 5 + MOctets, et le nom du fichier journal se prsentera sous + la forme journal-erreurs.YYYY-mm-dd-HH_MM_SS.

    + +

    + CustomLog "|bin/rotatelogs -t /var/log/journal 86400" common +

    + +

    Cet exemple cre le fichier /var/log/journal en le tronquant + au dmarrage, puis une fois par jour. Ce scnario implique qu'un + processus spar (tel que tail) traite le fichier en temps + rel.

    + +
    top
    +
    +

    Portabilit

    + +

    Les substitutions des chanes de format du fichier journal suivantes +doivent tre supportes par toutes les implmentations de +strftime(3) ; voir la page de manuel de +strftime(3) pour les extensions spcifiques une +bibliothque.

    + +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -137,8 +140,13 @@ proxy - + + + @@ -152,9 +160,6 @@ of user groups for authorization response hashes in digest authentication - - @@ -177,13 +182,13 @@ lower level modules - + - + @@ -194,9 +199,9 @@ authorization groups. - - @@ -219,12 +224,18 @@ authentication - + + + @@ -244,7 +255,9 @@ alias authentication succeeds but authorization fails - + + + @@ -286,36 +299,53 @@ authentication succeeds but authorization fails + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + - + + @@ -328,12 +358,17 @@ authentication succeeds but authorization fails ファイルに表示するアイコン - + - - - - + + + + + + + - + - - - - + - - - - + + + - - - + - - - - - - + + + + - - - - + + + - - - - + + + - - + - - - - - + + + + - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + + @@ -478,7 +543,9 @@ operations - + + + @@ -506,38 +573,51 @@ Certificate Authority or global client certificates - - + + - - + - + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + + + - @@ -564,7 +646,7 @@ using the specified magic file - + ... - + + @@ -602,48 +686,56 @@ malicious privileges-aware code. - + + + - - - - - + + + + - - + - - + + + - - - + + + - - - - - - - - + + + + + - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - + + + - - + - - - - - - + - - - - - + + + + - - - - + - - - - - - - - - - + + + + + + - - + - - - - + + - - - - - - - - - - + + + + + + + + + + + @@ -780,61 +874,66 @@ of a request or the last 63, assuming the request itself is greater than - - - - - + + + - - - - - + + + + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -842,7 +941,7 @@ proxy handshake - + @@ -858,6 +957,10 @@ HTTP request Cache + + + + @@ -878,6 +981,8 @@ Certificate verification + + - + + + @@ -919,24 +1027,47 @@ for a given virtual host 囲む - - + - - + - +
    sサーバ設定ファイル
    vバーチャルホスト
    dディレクトリ
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    認証と承認を、より低いレベルのモジュールに移行させるかを 設定します。
    AuthBasicProvider provider-name -[provider-name] ... file dhB
    この位置に対する認証プロバイダを設定します。
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhB
    この位置に対する認証プロバイダを設定します。
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    証認に使用するユーザグループの一覧が格納されている、 テキストファイルの名前を設定する
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    認証に使用するユーザとパスワードの一覧が格納されている、 テキストファイルの名前を設定する
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    HTTP User-Agent に基づいて環境変数を設定する
    svdhE
    The minimum size (in bytes) of the document to read and be cached before sending the data downstream
    svdhE
    The minimum time (in milliseconds) that should elapse while reading before data is sent downstream
    CacheRoot directorysvE
    キャッシュファイルが保管されるルートディレクトリ
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on svdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off svdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off svE
    no-store と指定されているレスポンスのキャッシュを試みる。
    CacheStorePrivate On|Off Off svE
    private と指定されているレスポンスのキャッシュを試みる。
    CGIMapExtension cgi-path .extensiondhC
    CGI スクリプトのインタープリタの位置を調べるための手法
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    大文字小文字の修正だけ行うようにする
    CheckSpelling on|off Off svdhE
    spelling モジュールを使用するようにする
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Content-MD5 HTTP 応答ヘッダの生成を有効にする
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Apache がコアダンプする前に移動を試みるディレクトリ +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-path .extensiondhC
    CGI スクリプトのインタープリタの位置を調べるための手法
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    大文字小文字の修正だけ行うようにする
    CheckSpelling on|off Off svdhE
    spelling モジュールを使用するようにする
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Content-MD5 HTTP 応答ヘッダの生成を有効にする
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Apache がコアダンプする前に移動を試みるディレクトリ
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname -[env=[!]environment-variable]svB
    ログファイルの名前と書式を設定する
    Dav On|Off|provider-name Off dE
    WebDAV HTTP メソッドを有効にします
    DavDepthInfinity on|off off svdE
    PROPFIND, Depth: Infinity リクエストを許可します
    DavGenericLockDB file-pathsvdE
    DAV ロックデータベースの場所
    DavLockDB file-pathsvE
    DAV ロックデータベースの位置
    DavMinTimeout seconds 0 svdE
    サーバが DAV リソースのロックを維持する最小時間です。 +[env=[!]environment-variable]svB
    ログファイルの名前と書式を設定する
    Dav On|Off|provider-name Off dE
    WebDAV HTTP メソッドを有効にします
    DavDepthInfinity on|off off svdE
    PROPFIND, Depth: Infinity リクエストを許可します
    DavGenericLockDB file-pathsvdE
    DAV ロックデータベースの場所
    DavLockDB file-pathsvE
    DAV ロックデータベースの位置
    DavMinTimeout seconds 0 svdE
    サーバが DAV リソースのロックを維持する最小時間です。
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage MIME-langsvdh
    あるスコープのすべてのファイルを指定された言語に 設定する
    DefaultType MIME-type|none text/plain svdhC
    サーバがコンテントタイプを決定できないときに +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType MIME-type|none text/plain svdhC
    サーバがコンテントタイプを決定できないときに 送られる MIME コンテントタイプ
    Define parameter-namesC
    変数の存在を宣言する
    DeflateBufferSize value 8096 svE
    zlib が一度に圧縮する塊の大きさ
    DeflateCompressionLevel valuesvE
    出力に対して行なう圧縮の程度
    DeflateFilterNote [type] notenamesvE
    ロギング用に圧縮比をメモに追加
    Define parameter-namesC
    変数の存在を宣言する
    DeflateBufferSize value 8096 svE
    zlib が一度に圧縮する塊の大きさ
    DeflateCompressionLevel valuesvE
    出力に対して行なう圧縮の程度
    DeflateFilterNote [type] notenamesvE
    ロギング用に圧縮比をメモに追加
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    zlib が圧縮に使うメモリのレベルを指定
    DeflateWindowSize value 15 svE
    Zlib の圧縮用ウィンドウの大きさ
    Deny from all|host|env=[!]env-variable @@ -341,102 +376,132 @@ authentication succeeds but authorization fails
    <Directory directory-path> ... </Directory>svC
    指定のファイルシステムのディレクトリとサブディレクトリとのみに 適用されるディレクティブを囲む
    DirectoryIndex - local-url [local-url] ... index.html svdhB
    クライアントがディレクトリをリクエストしたときに調べる +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + local-url [local-url] ... index.html svdhB
    クライアントがディレクトリをリクエストしたときに調べる リソースのリスト
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    正規表現にマッチするファイルシステムのディレクトリと +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    正規表現にマッチするファイルシステムのディレクトリと サブディレクトリとのみに適用されるディレクティブを囲む
    DirectorySlash On|Off On svdhB
    パス末尾のスラッシュでリダイレクトするかどうかのオンオフをトグルさせる
    DocumentRoot directory-path /usr/local/apache/h +svC
    ウェブから見えるメインのドキュメントツリーになる +
    DirectorySlash On|Off On svdhB
    パス末尾のスラッシュでリダイレクトするかどうかのオンオフをトグルさせる
    DocumentRoot directory-path /usr/local/apache/h +svC
    ウェブから見えるメインのドキュメントツリーになる ディレクトリ
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    エラーログにすべての入力データをダンプ
    DumpIOOutput On|Off Off sE
    エラーログにすべての出力データをダンプ
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    エラーログにすべての入力データをダンプ
    DumpIOOutput On|Off Off sE
    エラーログにすべての出力データをダンプ
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    クラッシュの後に例外ハンドラを実行するフックを有効にする
    EnableMMAP On|Off On svdhC
    配送中にファイルを読み込むためにメモリマッピングを +
    EnableExceptionHook On|Off Off sM
    クラッシュの後に例外ハンドラを実行するフックを有効にする
    EnableMMAP On|Off On svdhC
    配送中にファイルを読み込むためにメモリマッピングを 使うかどうか
    EnableSendfile On|Off On svdhC
    ファイルのクライアントへの配送時にカーネルの sendfile サポートを +
    EnableSendfile On|Off On svdhC
    ファイルのクライアントへの配送時にカーネルの sendfile サポートを 使うかどうか
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    エラーが発生したときにサーバがクライアントに送るもの
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    サーバがエラーをログ収集する場所
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module +
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    エラーが発生したときにサーバがクライアントに送るもの
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    サーバがエラーをログ収集する場所
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|OffsvdhE
    Expires ヘッダの生成を有効にする
    ExpiresByType MIME-type -<code>secondssvdhE
    MIME タイプによって設定される Expires ヘッダの値
    ExpiresDefault <code>secondssvdhE
    期限切れ期日を計算するデフォルトアルゴリズム
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ExpiresActive On|OffsvdhE
    Expires ヘッダの生成を有効にする
    ExpiresByType MIME-type +<code>secondssvdhE
    MIME タイプによって設定される Expires ヘッダの値
    ExpiresDefault <code>secondssvdhE
    期限切れ期日を計算するデフォルトアルゴリズム
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    外部フィルタを定義
    ExtFilterOptions option [option] ... DebugLevel=0 NoLogS +dE
    mod_ext_filter のオプションを設定
    svdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... INode MTime Size svdhC
    ETag HTTP 応答ヘッダを作成するために使用される +
    ExtFilterDefine filtername parameterssE
    外部フィルタを定義
    ExtFilterOptions option [option] ... DebugLevel=0 NoLogS +dE
    mod_ext_filter のオプションを設定
    svdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... INode MTime Size svdhC
    ETag HTTP 応答ヘッダを作成するために使用される ファイルの属性
    <Files filename> ... </Files>svdhC
    マッチするファイル名に適用されるディレクティブを囲む
    <FilesMatch regex> ... </FilesMatch>svdhC
    正規表現にマッチするファイル名に適用される +
    <Files filename> ... </Files>svdhC
    マッチするファイル名に適用されるディレクティブを囲む
    <FilesMatch regex> ... </FilesMatch>svdhC
    正規表現にマッチするファイル名に適用される ディレクティブを囲む
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    要求に合う単独のドキュメントが見つからなかったときに行なうことを指定 +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    要求に合う単独のドキュメントが見つからなかったときに行なうことを指定
    ForceType MIME-type|NonedhC
    すべてのマッチするファイルが指定の MIME コンテントタイプで +
    ForceType MIME-type|NonedhC
    すべてのマッチするファイルが指定の MIME コンテントタイプで 送られるようにする
    ForensicLog filename|pipesvE
    Forensic ログのファイル名を設定する
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    ForensicLog filename|pipesvE
    Forensic ログのファイル名を設定する
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    穏やかな停止をかけた後、終了するまで待つ時間
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] set|append|add|unset|echo -header [value] [early|env=[!]variable]svdhE
    HTTP 応答ヘッダの設定
    HeaderName filenamesvdhB
    +
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] set|append|add|unset|echo +header [value] [early|env=[!]variable]svdhE
    HTTP 応答ヘッダの設定
    HeaderName filenamesvdhB
    インデックス一覧の先頭に挿入されるファイルの名前
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    クライアントの IP アドレスの DNS ルックアップを 有効にする
    IdentityCheck On|Off Off svdE
    リモートユーザの RFC 1413 によるアイデンティティのロギングを +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    リモートユーザの RFC 1413 によるアイデンティティのロギングを 有効にする
    IdentityCheckTimeout seconds 30 svdE
    Ident リクエストがタイムアウトするまでの期間を決める
    <If expression> ... </If>svdhC
    実行時、リクエストが条件を満たした場合にのみ適用される +
    IdentityCheckTimeout seconds 30 svdE
    Ident リクエストがタイムアウトするまでの期間を決める
    <If expression> ... </If>svdhC
    実行時、リクエストが条件を満たした場合にのみ適用される ディレクティブを包含する
    <IfDefine [!]parameter-name> ... - </IfDefine>svdhC
    起動時にテストが真であるときのみに処理されるディレクティブを +
    <IfDefine [!]parameter-name> ... + </IfDefine>svdhC
    起動時にテストが真であるときのみに処理されるディレクティブを 囲む
    <IfModule [!]module-file|module-identifier> ... - </IfModule>svdhC
    モジュールの存在するかしないかに応じて処理される +
    <IfModule [!]module-file|module-identifier> ... + </IfModule>svdhC
    モジュールの存在するかしないかに応じて処理される ディレクティブを囲む
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    バージョン依存の設定を入れる
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    バージョン依存の設定を入れる
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action if no coordinates are given when calling an imagemap
    Include file-path|directory-pathsvdC
    サーバ設定ファイル中から他の設定ファイルを取り込む
    Include file-path|directory-pathsvdC
    サーバ設定ファイル中から他の設定ファイルを取り込む
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IndexHeadInsert "markup ..."svdhB
    インデックスページの HEAD セクションにテキストを挿入する
    IndexIgnore file [file] ...svdhB
    ディレクトリ一覧を行なう際に無視すべき ファイルリストに追加
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    LimitXMLRequestBody bytes 1000000 svdhC
    XML 形式のリクエストのボディのサイズを制限する
    Listen [IP-address:]portnumber [protocol]sM
    サーバが listen するIP アドレスとポート番号
    ListenBacklog backlogsM
    保留状態のコネクションのキューの最大長
    LoadFile filename [filename] ...sE
    指定されたオブジェクトファイルやライブラリをリンクする
    LoadModule module filenamesE
    オブジェクトファイルやライブラリをリンクし、使用モジュールの +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...svE
    指定されたオブジェクトファイルやライブラリをリンクする
    LoadModule module filenamesvE
    オブジェクトファイルやライブラリをリンクし、使用モジュールの リストに追加する
    <Location - URL-path|URL> ... </Location>svC
    囲んだディレクティブをマッチする URL のみに適用
    <LocationMatch - regex> ... </LocationMatch>svC
    囲んだディレクティブを正規表現にマッチする URL のみに +
    <Location + URL-path|URL> ... </Location>svC
    囲んだディレクティブをマッチする URL のみに適用
    <LocationMatch + regex> ... </LocationMatch>svC
    囲んだディレクティブを正規表現にマッチする URL のみに 適用
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    ログファイルで使用する書式を設定する
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    ログファイルで使用する書式を設定する
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel level warn svC
    ErrorLog の冗長性を制御する
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests number 100 svC
    持続的な接続上で許可されるリクエストの数
    MaxMemFree KBytes 0 sM
    free() が呼ばれない限り、 @@ -553,10 +633,12 @@ simultaneously
    MaxSpareServers number 10 sM
    アイドルな子サーバプロセスの最大個数
    MaxSpareThreads numbersM
    アイドルスレッドの最大数
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off svdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathsvE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads numbersM
    リクエストに応答することのできる アイドルスレッド数の最小数
    MMapFile file-path [file-path] ...sX
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off d
    path_info コンポーネントをファイル名の一部として扱うように mod_mime に通知する
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -585,10 +667,12 @@ or specified mutexes
    svdhB
    シェルからの環境変数を渡す
    PidFile filename logs/httpd.pid sM
    デーモンのプロセス ID をサーバが記録するためのファイル
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|Off Off svX
    エコーサーバの有効無効を設定します。
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    プロキシされるリソースに適用されるコンテナ
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    応答におかしなヘッダがある場合の扱い方を決める
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    内部データスループットバッファのサイズを決定する
    <ProxyMatch regex> ...</ProxyMatch>svE
    正規表現でのマッチによるプロキシリソース用のディレクティブコンテナ
    ProxyMaxForwards number 10 svE
    リクエストがフォワードされるプロキシの最大数
    ProxyPass [path] !|url [key=value key=value ...]]svdE
    リモートサーバをローカルサーバの URL 空間にマップする
    svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] urlsvdE
    リバースプロキシされたサーバから送られた HTTP 応答ヘッダの +
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] urlsvdE
    リバースプロキシされたサーバから送られた HTTP 応答ヘッダの URL を調整する
    ProxyPassReverseCookieDomain internal-domain public-domainsvdE
    リバースプロキシサーバからの Set-Cookie ヘッダの Domain 文字列を +
    ProxyPassReverseCookieDomain internal-domain public-domainsvdE
    リバースプロキシサーバからの Set-Cookie ヘッダの Domain 文字列を 調整する
    ProxyPassReverseCookiePath internal-path public-pathsvdE
    Reverse プロキシサーバからの Set-Cookie ヘッダの Path 文字列を +
    ProxyPassReverseCookiePath internal-path public-pathsvdE
    Reverse プロキシサーバからの Set-Cookie ヘッダの Path 文字列を 調整する
    ProxyPreserveHost On|Off Off svE
    プロキシリクエストに、受け付けた Host HTTP ヘッダを使う
    ProxyReceiveBufferSize bytes 0 svE
    プロキシされる HTTP と FTP 接続のためのネットワークバッファサイズ
    ProxyRemote match remote-serversvE
    特定のリクエストを扱う時に使われるリモートプロキシを指定する
    ProxyRemoteMatch regex remote-serversvE
    正規表現でのマッチによるリクエストを扱うリモートプロキシの指定
    ProxyRequests On|Off Off svE
    フォワード (標準の) プロキシリクエストを有効にする
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyPreserveHost On|Off Off svE
    プロキシリクエストに、受け付けた Host HTTP ヘッダを使う
    ProxyReceiveBufferSize bytes 0 svE
    プロキシされる HTTP と FTP 接続のためのネットワークバッファサイズ
    ProxyRemote match remote-serversvE
    特定のリクエストを扱う時に使われるリモートプロキシを指定する
    ProxyRemoteMatch regex remote-serversvE
    正規表現でのマッチによるリクエストを扱うリモートプロキシの指定
    ProxyRequests On|Off Off svE
    フォワード (標準の) プロキシリクエストを有効にする
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout seconds 300 svE
    プロキシされたリクエストのネットワークタイムアウト
    ProxyVia On|Off|Full|Block Off svE
    プロキシされたリクエストの Via HTTP 応答ヘッダ +
    dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout seconds 300 svE
    プロキシされたリクエストのネットワークタイムアウト
    ProxyVia On|Off|Full|Block Off svE
    プロキシされたリクエストの Via HTTP 応答ヘッダ により提供される情報
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    インデックス一覧の最後に挿入されるファイルの名前
    ReceiveBufferSize bytes 0 sM
    TCP 受信バッファサイズ
    Redirect [status] URL-path @@ -657,103 +749,105 @@ header
    RedirectTemp URL-path URLsvdhB
    クライアントが違う URL を取得するように外部への一時的な リダイレクトを送る
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdh
    ファイルの拡張子に関連付けられたすべての文字セット +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdh
    ファイルの拡張子に関連付けられたすべての文字セット を解除する
    RemoveEncoding extension [extension] -...vdh
    ファイルの拡張子に関連付けられたすべてのコンテントエンコーディング +
    RemoveEncoding extension [extension] +...vdh
    ファイルの拡張子に関連付けられたすべてのコンテントエンコーディング を解除する
    RemoveHandler extension [extension] -...vdh
    ファイルの拡張子に関連付けられたすべてのハンドラを +
    RemoveHandler extension [extension] +...vdh
    ファイルの拡張子に関連付けられたすべてのハンドラを 解除する
    RemoveInputFilter extension [extension] -...vdh
    ファイル拡張子に関連付けられた入力フィルタを解除する
    RemoveLanguage extension [extension] -...vdh
    ファイル拡張子に関連付けられた言語を解除する
    RemoveOutputFilter extension [extension] -...vdh
    ファイル拡張子に関連付けられた出力フィルタを解除する
    RemoveType extension [extension] -...vdh
    ファイルの拡張子と関連付けられたコンテントタイプを +
    RemoveInputFilter extension [extension] +...vdh
    ファイル拡張子に関連付けられた入力フィルタを解除する
    RemoveLanguage extension [extension] +...vdh
    ファイル拡張子に関連付けられた言語を解除する
    RemoveOutputFilter extension [extension] +...vdh
    ファイル拡張子に関連付けられた出力フィルタを解除する
    RemoveType extension [extension] +...vdh
    ファイルの拡張子と関連付けられたコンテントタイプを 解除する
    RequestHeader set|append|add|unset header -[value] [early|env=[!]variable]svdhE
    HTTP リクエストヘッダの設定
    RequestReadTimeout +
    RequestHeader set|append|add|unset header +[value] [early|env=[!]variable]svdhE
    HTTP リクエストヘッダの設定
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Apache の子プロセスから起動されたプロセスの CPU 消費量を +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Apache の子プロセスから起動されたプロセスの CPU 消費量を 制限する
    RLimitMEM bytes|max [bytes|max]svdhC
    Apache の子プロセスから起動されたプロセスのメモリ消費量を +
    RLimitMEM bytes|max [bytes|max]svdhC
    Apache の子プロセスから起動されたプロセスのメモリ消費量を 制限する
    RLimitNPROC number|max [number|max]svdhC
    Apache の子プロセスから起動されたプロセスが起動するプロセスの +
    RLimitNPROC number|max [number|max]svdhC
    Apache の子プロセスから起動されたプロセスが起動するプロセスの 数を制限する
    Satisfy Any|All All dhE
    ホストレベルのアクセス制御とユーザ認証との相互作用を指定
    ScoreBoardFile file-path logs/apache_status sM
    子プロセスと連携するためのデータを保存する +
    Satisfy Any|All All dhE
    ホストレベルのアクセス制御とユーザ認証との相互作用を指定
    ScoreBoardFile file-path logs/apache_status sM
    子プロセスと連携するためのデータを保存する ファイルの位置
    Script method cgi-scriptsvdB
    特定のリクエストメソッドに対して CGI スクリプトを +
    Script method cgi-scriptsvdB
    特定のリクエストメソッドに対して CGI スクリプトを 実行するように設定
    ScriptAlias URL-path -file-path|directory-pathsvB
    URL をファイルシステムの位置へマップし、マップ先を +
    ScriptAlias URL-path +file-path|directory-pathsvB
    URL をファイルシステムの位置へマップし、マップ先を CGI スクリプトに指定
    ScriptAliasMatch regex -file-path|directory-pathsvB
    URL を正規表現を使ってファイルシステムの位置へマップし、マップ先を +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    URL を正規表現を使ってファイルシステムの位置へマップし、マップ先を CGI スクリプトに指定
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    CGI スクリプトのインタープリタの位置を調べるための手法
    ScriptLog file-pathsvB
    CGI スクリプトのエラーログファイルの場所
    ScriptLogBuffer bytes 1024 svB
    スクリプトログに記録される PUT や POST リクエストの内容の上限
    ScriptLogLength bytes 10385760 svB
    CGI スクリプトのログファイルの大きさの上限
    ScriptSock file-path logs/cgisock sB
    CGI デーモンとの通信に使われるソケットのファイル名の接頭辞
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    CGI スクリプトのインタープリタの位置を調べるための手法
    ScriptLog file-pathsvB
    CGI スクリプトのエラーログファイルの場所
    ScriptLogBuffer bytes 1024 svB
    スクリプトログに記録される PUT や POST リクエストの内容の上限
    ScriptLogLength bytes 10385760 svB
    CGI スクリプトのログファイルの大きさの上限
    ScriptSock file-path logs/cgisock sB
    CGI デーモンとの通信に使われるソケットのファイル名の接頭辞
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize bytes 0 sM
    TCP バッファサイズ
    ServerAdmin email-address|URLsvC
    サーバがクライアントに送るエラーメッセージに含める電子メールの +
    SendBufferSize bytes 0 sM
    TCP バッファサイズ
    ServerAdmin email-address|URLsvC
    サーバがクライアントに送るエラーメッセージに含める電子メールの アドレス
    ServerAlias hostname [hostname] ...vC
    リクエストを名前ベースのバーチャルホストにマッチさせているときに +
    ServerAlias hostname [hostname] ...vC
    リクエストを名前ベースのバーチャルホストにマッチさせているときに 使用されるホストの別名
    ServerLimit numbersM
    設定可能なサーバプロセス数の上限
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    サーバが自分自身を示すときに使うホスト名とポート
    ServerPath URL-pathvC
    非互換のブラウザが名前ベースのバーチャルホストにアクセスしたときの +
    ServerLimit numbersM
    設定可能なサーバプロセス数の上限
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    サーバが自分自身を示すときに使うホスト名とポート
    ServerPath URL-pathvC
    非互換のブラウザが名前ベースのバーチャルホストにアクセスしたときの ための互換用 URL パス名
    ServerRoot directory-path /usr/local/apache sC
    インストールされたサーバのベースディレクトリ
    ServerSignature On|Off|EMail Off svdhC
    サーバが生成するドキュメントのフッタを設定
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Server HTTP 応答ヘッダを設定する
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    ServerRoot directory-path /usr/local/apache sC
    インストールされたサーバのベースディレクトリ
    ServerSignature On|Off|EMail Off svdhC
    サーバが生成するドキュメントのフッタを設定
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Server HTTP 応答ヘッダを設定する
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SetHandler handler-name|NonesvdhC
    マッチするファイルがハンドラで処理されるようにする
    SetInputFilter filter[;filter...]svdhC
    クライアントのリクエストや POST の入力を処理するフィルタを設定する
    SetOutputFilter filter[;filter...]svdhC
    サーバの応答を処理するフィルタを設定する
    SSIAccessEnable on|off off dhB
    条件分岐フローの制御で -A フラグが使えるようにする
    SSIEndTag tag "-->" svB
    include 要素を終了させる文字列
    SSIErrorMsg message "[an error occurred +svdhB
    SSI のエラーがあったときに表示されるエラーメッセージ
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIEndTag tag "-->" svB
    include 要素を終了させる文字列
    SSIErrorMsg message "[an error occurred +svdhB
    SSI のエラーがあったときに表示されるエラーメッセージ
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    include 要素を開始する文字列
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    日付けを現す文字列の書式を設定する
    SSIUndefinedEcho string "(none)" svdhB
    未定義の変数が echo されたときに表示される文字列
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    include 要素を開始する文字列
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    日付けを現す文字列の書式を設定する
    SSIUndefinedEcho string "(none)" svdhB
    未定義の変数が echo されたときに表示される文字列
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartServers numbersM
    起動時に生成される子サーバプロセスの数
    StartThreads numbersM
    起動時に生成されるスレッドの数
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    CGI プログラムのユーザパーミッション、グループパーミッション
    ThreadLimit numbersM
    設定可能な子プロセス毎のスレッド数の上限を @@ -892,8 +997,11 @@ Certificate verification
    TransferLog file|pipesvB
    ログファイルの位置を指定
    TypesConfig file-path conf/mime.types s
    mime.types ファイルの位置
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    環境から変数を取り除く
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    環境から変数を取り除く
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|Dns Off svdC
    サーバが自分自身の名前とポートを決定する方法を設定する
    UseCanonicalPhysicalPort On|Off Off svdC
    自分自身の名前とポート番号を解決する方法を設定する
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    実行ビットが設定されたファイルの SSI ディレクティブを +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    実行ビットが設定されたファイルの SSI ディレクティブを 解析する
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.ko.euc-kr b/docs/manual/mod/quickreference.html.ko.euc-kr index d39d83e2b04..ce7dd1a634f 100644 --- a/docs/manual/mod/quickreference.html.ko.euc-kr +++ b/docs/manual/mod/quickreference.html.ko.euc-kr @@ -1,28 +1,34 @@ - -þ - Apache HTTP Server +þ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 >

    þ

    :  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -42,7 +48,7 @@ ִ ҿ þ ¸ Ÿ.

    - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -133,8 +139,13 @@ be passed through - + + + @@ -148,8 +159,6 @@ be passed through hash ϴ ˰ Ѵ - - @@ -171,13 +180,13 @@ lower level modules - + - + @@ -188,9 +197,9 @@ authorization groups. - - @@ -213,12 +222,18 @@ authentication - + + + @@ -237,7 +252,9 @@ alias authentication succeeds but authorization fails - + + + + + + + + + - + - - - - - - - + + + + + + + + - - - - - - + + + + + - - - - - - - +[env=[!]environment-variable] + + + + + + + @@ -320,15 +354,20 @@ switch before dumping core - + - - - - + + + + + + + - - + + - - - + - - - - + + + - - - - - - + + + - - - - - - - + + + + + + - - - - + + + - - - - - - - + + + + - - - - - + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - + + - - + + @@ -458,7 +527,7 @@ requests on a persistent connection the specified maximum size, for potential use by filters such as mod_include. @@ -470,7 +539,9 @@ operations - + + + @@ -501,45 +572,58 @@ from the client - - + + - - - + + + - - - - - + + + + + + - - + + + - - - - - - + + + + + + + - @@ -552,6 +636,8 @@ simultaneously + + @@ -561,7 +647,7 @@ using the specified magic file - + ... - + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - + + + + + + + - - - - - - - - + - - - - - - + - - - - - + + + + - - - - - - - - - - - - - - + + + + + - - + - - - + - - - - + + - - - - - - - + + + + + + + + @@ -797,69 +895,74 @@ header [!]env-variable[=value] [[!]env-variable[=value]] ... - - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -867,7 +970,7 @@ proxy handshake - + @@ -883,6 +986,10 @@ HTTP request Cache + + + + @@ -903,6 +1010,8 @@ Certificate verification + + - + + + @@ -943,24 +1055,47 @@ for a given virtual host hostname or IP address - - + - - + - +
    sּ
    vȣƮ
    ddirectory
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    Ѻο ⿡ Ѱ Ѵ
    AuthBasicProvider On|Off|provider-name -[provider-name] ... On dhB
    ġ ڸ Ѵ
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider On|Off|provider-name +[provider-name] ... On dhB
    ġ ڸ Ѵ
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhX
    digest authentication ȣ ϴ URI
    AuthDigestNcCheck On|Off Off sX
    nonce-count ˻
    AuthDigestNonceFormat formatdhX
    nonce Ѵ
    AuthDigestNonceLifetime seconds 300 dhX
    nonce ȿ Ⱓ
    AuthDigestProvider On|Off|provider-name [provider-name] ... On dhX
    ġ ڸ Ѵ
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    ׷ ϴ ϸ Ѵ
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    ڸ ȣ ϴ ϸ Ѵ
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    HTTP User-Agent ȯ溯 Ѵ
    BrowserMatchNoCase regex [!]env-variable[=value] @@ -277,37 +294,54 @@ cached by proxy servers
    svdhX
    The minimum time (in milliseconds) that should elapse while reading before data is sent downstream
    CacheRoot directorysvX
    ij 丮 root
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    svdhX
    Serve stale content in place of 5xx responses.
    svdhX
    Attempt to cache responses that the server reports as expired
    svdhX
    Attempt to cache requests or responses that have been marked as no-store.
    svdhX
    Attempt to cache responses that the server has marked as private
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI scripts
    CharsetDefault charsetsvdhX
    ȯ
    CharsetOptions option [option] ... DebugLevel=0 NoImpl +svdhX
    ȯ
    CharsetSourceEnc charsetsvdhX
    svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Ѵ
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response +
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhX
    ȯ
    CharsetOptions option [option] ... DebugLevel=0 NoImpl +svdhX
    ȯ
    CharsetSourceEnc charsetsvdhX
    svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Ѵ
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response headers
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to +
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to switch before dumping core
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname -[env=[!]environment-variable]svB
    α ̸ Ѵ
    Dav On|Off|provider-name Off dE
    WebDAV HTTP ޽带 Ѵ
    DavDepthInfinity on|off off svdE
    PROPFIND Depth: Infinity û 㰡Ѵ
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    DAV ͺ̽ ġ
    DavMinTimeout seconds 0 svdE
    DAV ڿ ּҽð
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    svB
    α ̸ Ѵ
    Dav On|Off|provider-name Off dE
    WebDAV HTTP ޽带 Ѵ
    DavDepthInfinity on|off off svdE
    PROPFIND Depth: Infinity û 㰡Ѵ
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    DAV ͺ̽ ġ
    DavMinTimeout seconds 0 svdE
    DAV ڿ ּҽð
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage language-tagsvdhB
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings if the value is not none. In prior versions, DefaultType would specify a default media type to assign to response content for which no other media type configuration could be found.
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    zlib ѹ ũ
    DeflateCompressionLevel valuesvE
    ϴ°
    DeflateFilterNote [type] notenamesvE
    α׿ Ѵ
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    zlib ѹ ũ
    DeflateCompressionLevel valuesvE
    ϴ°
    DeflateFilterNote [type] notenamesvE
    α׿ Ѵ
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    zlib Ҷ ϴ ޸𸮷
    DeflateWindowSize value 15 svE
    Zlib window size
    Deny from all|host|env=[!]env-variable @@ -337,98 +376,128 @@ server
    <Directory directory-path> ... </Directory>svC
    Enclose a group of directives that apply only to the named file-system directory, sub-directories, and their contents.
    DirectoryIndex - local-url [local-url] ... index.html svdhB
    Ŭ̾Ʈ 丮 ûҶ ãƺ ڿ
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + local-url [local-url] ... index.html svdhB
    Ŭ̾Ʈ 丮 ûҶ ãƺ ڿ
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    Enclose directives that apply to +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Enclose directives that apply to the contents of file-system directories matching a regular expression.
    DirectorySlash On|Off On svdhB
    ̷ Ű
    DocumentRoot directory-path /usr/local/apache/h +svC
    Directory that forms the main document tree visible +
    DirectorySlash On|Off On svdhB
    ̷ Ű
    DocumentRoot directory-path "/usr/local/apache/ +svC
    Directory that forms the main document tree visible from the web
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers +
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers after a crash
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client +
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client in case of an error
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    ġ API ϱ þ
    ExpiresActive On|OffsvdhE
    Expires Ѵ
    ExpiresByType MIME-type -<code>secondssvdhE
    MIME type Expires Ѵ
    ExpiresDefault <code>secondssvdhE
    ð ϴ ⺻ ˰
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    ġ API ϱ þ
    ExpiresActive On|OffsvdhE
    Expires Ѵ
    ExpiresByType MIME-type +<code>secondssvdhE
    MIME type Expires Ѵ
    ExpiresDefault <code>secondssvdhE
    ð ϴ ⺻ ˰
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    ܺ ͸ Ѵ
    ExtFilterOptions option [option] ... DebugLevel=0 NoLogS +dE
    mod_ext_filter ɼ Ѵ
    svdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag +
    ExtFilterDefine filtername parameterssE
    ܺ ͸ Ѵ
    ExtFilterOptions option [option] ... DebugLevel=0 NoLogS +dE
    mod_ext_filter ɼ Ѵ
    svdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag HTTP response header for static files
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched +
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched filenames
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched +
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched filenames
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not found
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified +
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified media type in the HTTP Content-Type header field
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    Specify a timeout after which a gracefully shutdown server +
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutdownTimeout seconds 0 sM
    Specify a timeout after which a gracefully shutdown server will exit.
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] set|append|add|unset|echo -header [value] [early|env=[!]variable]svdhE
    HTTP Ѵ
    HeaderName filenamesvdhB
    ϸ ̸
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] set|append|add|unset|echo +header [value] [early|env=[!]variable]svdhE
    HTTP Ѵ
    HeaderName filenamesvdhB
    ϸ ̸
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    Enables DNS lookups on client IP addresses
    IdentityCheck On|Off Off svdE
    RFC 1413 ſ α׿ Ѵ
    IdentityCheckTimeout seconds 30 svdE
    ident û ð Ѵ
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    RFC 1413 ſ α׿ Ѵ
    IdentityCheckTimeout seconds 30 svdE
    ident û ð Ѵ
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime
    <IfDefine [!]parameter-name> ... - </IfDefine>svdhC
    Encloses directives that will be processed only +
    <IfDefine [!]parameter-name> ... + </IfDefine>svdhC
    Encloses directives that will be processed only if a test is true at startup
    <IfModule [!]module-file|module-identifier> ... - </IfModule>svdhC
    Encloses directives that are processed conditional on the +
    <IfModule [!]module-file|module-identifier> ... + </IfModule>svdhC
    Encloses directives that are processed conditional on the presence or absence of a specific module
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    ´
    ImapBase map|referer|URL http://servername/ svdhB
    ̹ Ͽ base
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    ̹ʿ ش ʴ ǥ +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    ´
    ImapBase map|referer|URL http://servername/ svdhB
    ̹ Ͽ base
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    ̹ʿ ش ʴ ǥ ⺻ ൿ
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    ǥ ̹ û ൿ
    Include [optional|strict] file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    ǥ ̹ û ൿ
    Include file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within the server configuration files
    svdhB
    Inserts text in the HEAD section of an index page.
    IndexIgnore file [file] ...svdhB
    丮 Ͽ ϸ ߰Ѵ
    LanguagePriority MIME-lang [MIME-lang] -...svdhB
    The precendence of language variants for cases where +...svdhB
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    Listen [IP-address:]portnumber [protocol]sM
    IP addresses and ports that the server listens to
    ListenBacklog backlogsM
    Maximum length of the queue of pending connections
    LoadFile filename [filename] ...sE
    ̳ ̺귯 оδ
    LoadModule module filenamesE
    ̳ ̺귯 о̰, 밡 +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...sE
    ̳ ̺귯 оδ
    LoadModule module filenamesE
    ̳ ̺귯 о̰, 밡 Ͽ ߰Ѵ
    <Location - URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching +
    <Location + URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching URLs
    <LocationMatch - regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression +
    <LocationMatch + regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression matching URLs
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    αϿ Ѵ
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    αϿ Ѵ
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel [module:]level [module:level] ... warn svdC
    Controls the verbosity of the ErrorLog
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests number 100 svC
    Number of requests allowed on a persistent connection
    MaxMemFree KBytes 0 sM
    Maximum amount of memory that the main allocator is allowed +
    MaxMemFree KBytes 2048 sM
    Maximum amount of memory that the main allocator is allowed to hold without calling free()
    MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdC
    Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource
    MaxSpareServers number 10 sM
    Maximum number of idle child server processes
    MaxSpareThreads numbersM
    Maximum number of idle threads
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    CERN Ÿ ã 丮 ̸
    MetaFiles on|off off svdhE
    CERN Ÿ óѴ
    MetaSuffix suffix .meta svdhE
    CERN Ÿ ϴ ̻
    MinSpareThreads numbersM
    Minimum number of idle threads available to handle request spikes
    MMapFile file-path [file-path] ...sX
    ۽ ޸𸮿 Ѵ
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dB
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -586,10 +672,12 @@ evaluated.
    svdhB
    ȯ溯 ´
    PidFile filename logs/httpd.pid sM
    File where the server records the process ID of the daemon
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|OffsvX
    echo Ű
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Determines how to handle bad header lines in a @@ -605,20 +693,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>svE
    Container for directives applied to regular-expression-matched @@ -626,37 +719,40 @@ proxied resources
    ProxyMaxForwards number -1 svE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    ϸ ̸
    ReceiveBufferSize bytes 0 sM
    TCP receive buffer size
    Redirect [status] URL-path @@ -670,110 +766,112 @@ header for proxied requests
    RedirectTemp URL-path URLsvdhB
    Ŭ̾Ʈ ٸ URL ϵ ûϴ ܺ ӽ ̷
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdhB
    Removes any character set associations for a set of file +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdhB
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...vdhB
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...vdhB
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...vdhB
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...vdhB
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...vdhB
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...vdhB
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...vdhB
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...vdhB
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...vdhB
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...vdhB
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...vdhB
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...vdhB
    Removes any content type associations for a set of file extensions
    RequestHeader set|append|add|unset header -[value] [early|env=[!]variable]svdhE
    HTTP û Ѵ
    RequestReadTimeout +
    RequestHeader set|append|add|unset header +[value] [early|env=[!]variable]svdhE
    HTTP û Ѵ
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched by Apache httpd children
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched +
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched by Apache httpd children
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by +
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by processes launched by Apache httpd children
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile file-path logs/apache_status sM
    Location of the file used to store coordination data for +
    ScoreBoardFile file-path logs/apache_runtime +sM
    Location of the file used to store coordination data for the child processes
    Script method cgi-scriptsvdB
    Ư û޼忡 CGI ũƮ +
    Script method cgi-scriptsvdB
    Ư û޼忡 CGI ũƮ Ѵ.
    ScriptAlias URL-path -file-path|directory-pathsvB
    URL Ư Ͻý ҷ ϰ CGI +
    ScriptAlias URL-path +file-path|directory-pathsvB
    URL Ư Ͻý ҷ ϰ CGI ũƮ ˸
    ScriptAliasMatch regex -file-path|directory-pathsvB
    ǥ Ͽ URL Ư Ͻý ҷ +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    ǥ Ͽ URL Ư Ͻý ҷ ϰ CGI ũƮ ˸
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI scripts
    ScriptLog file-pathsvB
    CGI ũƮ α ġ
    ScriptLogBuffer bytes 1024 svB
    ũƮ α׿ PUT Ȥ POST û ִ뷮
    ScriptLogLength bytes 10385760 svB
    CGI ũƮ α ũ
    ScriptSock file-path logs/cgisock svB
    cgi ̸
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    ScriptLog file-pathsvB
    CGI ũƮ α ġ
    ScriptLogBuffer bytes 1024 svB
    ũƮ α׿ PUT Ȥ POST û ִ뷮
    ScriptLogLength bytes 10385760 svB
    CGI ũƮ α ũ
    ScriptSock file-path logs/cgisock svB
    cgi ̸
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error +
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error messages sent to the client
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests +
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests to name-virtual hosts
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    Hostname and port that the server uses to identify +
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]domain-name|ip-address[:port]svC
    Hostname and port that the server uses to identify itself
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that +
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that is accessed by an incompatible browser
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response +
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response header
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    svdhB
    ҹڸ ʰ û ȯ溯 Ѵ
    SetHandler handler-name|NonesvdhC
    Forces all matching files to be processed by a +
    SetHandler handler-name|none|expressionsvdhC
    Forces all matching files to be processed by a handler
    SetInputFilter filter[;filter...]svdhC
    Sets the filters that will process client requests and POST input
    SetOutputFilter filter[;filter...]svdhC
    Sets the filters that will process responses from the server
    SSIAccessEnable on|off off dhB
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI error
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartServers numbersM
    Number of child server processes created at startup
    StartThreads numbersM
    Number of threads created on startup
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    CGI α׷ ڿ ׷
    ThreadLimit numbersM
    Sets the upper limit on the configurable number of threads @@ -916,8 +1025,11 @@ certain events before failing a request
    TransferLog file|pipesvB
    α ġ Ѵ
    TypesConfig file-path conf/mime.types sB
    The location of the mime.types file
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    ȯ溯 Ѵ
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    ȯ溯 Ѵ
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|DNS Off svdC
    Configures how the server determines its own name and port
    UseCanonicalPhysicalPort On|Off Off svdC
    Configures how the server determines its own port
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.tr.utf8 b/docs/manual/mod/quickreference.html.tr.utf8 index 5430b1c7a73..1e76b0c184e 100644 --- a/docs/manual/mod/quickreference.html.tr.utf8 +++ b/docs/manual/mod/quickreference.html.tr.utf8 @@ -1,42 +1,55 @@ - -Hızlı Yönerge Kılavuzu - Apache HTTP Sunucusu +Hızlı Yönerge Kılavuzu - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Hızlı Yönerge Kılavuzu

    Mevcut Diller:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -

    Bu hızlı yönerge kılavuzunda Apache yapılandırma yönergelerinin kullanımı, öntanımlı değerleri, durumu ve bağlamı gösterilmiştir. Bunların her biri hakkında ayrıntılı bilgi almak için Yönerge Sözlüğüne bakınız.

    +

    Bu hızlı yönerge kılavuzunda Apache yapılandırma yönergelerinin + kullanımı, öntanımlı değerleri, durumu ve bağlamı gösterilmiştir. Bunların + her biri hakkında ayrıntılı bilgi almak için Yönerge Sözlüğüne bakınız.

    -

    İlk sütunda yönergenin ismi ve kullanımı belirtilmiştir. İkinci sütunda yönergenin varsa öntanımlı değeri gösterilmiştir. Eğer öntanımlı değer sütuna sığmayacak kadar uzunsa sığmayan kısmın yerine “+” imi konmuştur.

    +

    İlk sütunda yönergenin ismi ve kullanımı belirtilmiştir. İkinci sütunda + yönergenin varsa öntanımlı değeri gösterilmiştir. Eğer öntanımlı değer + sütuna sığmayacak kadar uzunsa sığmayan kısmı kırpılıp yerine “+” imi + konmuştur.

    -

    Aşağıda sağdaki gösterge tablolarına uygun olarak, üçüncü sütunda yönergenin kullanımına izin verilen bağlamlar, dördüncü sütunda ise yönergenin durumu gösterilmiştir.

    +

    Aşağıda sağdaki gösterge tablolarına uygun olarak, üçüncü sütunda + yönergenin kullanımına izin verilen bağlamlar, dördüncü sütunda ise + yönergenin durumu gösterilmiştir.

    - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -104,10 +117,10 @@ responses from the server - - + - - + - + + + @@ -151,9 +168,6 @@ passwords for authentication response hashes in digest authentication - - @@ -176,13 +190,13 @@ lower level modules - + - + @@ -193,9 +207,9 @@ authorization groups. - - @@ -218,12 +232,18 @@ authentication - + + + @@ -243,7 +263,9 @@ alias authentication succeeds but authorization fails - + + + @@ -259,7 +281,7 @@ duyarsız eşleşmelerine bağlı olarak belirler. - @@ -292,40 +314,58 @@ cached by proxy servers before data is sent downstream + + + + + + - + - - - - - + + + + + + - - - - - - - - - + + + + + + - - - - - + + + + + - + + @@ -339,14 +379,19 @@ belirler. - + - - - - + + + + + + + server - - - - - - - - - - - + + + + + + + + + + + + - - - - + - - - + + - - - - - - - + + + + - - + - - - - - - + + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + - + - @@ -488,7 +557,7 @@ extensions istek gövdesi iptal edilmek yerine belirtilen azami boyutta tutulur. @@ -500,7 +569,9 @@ operations - + + + @@ -521,71 +592,88 @@ kullanılacak erişim sınırlayıcıları sarmalar. belirler. - - - - + - - - - - + + + - - - - - + + + + + + - - + + + - - - - - - + + + + + + + + - - - - - + + + + + + - @@ -593,21 +681,20 @@ using the specified magic file - + - - + + - - + + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - + - - - - - - - - - - - - - - + + + + + + + + + - - - - + - - - + + - - + - - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -821,78 +922,85 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. - + - + - - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - - + @@ -900,7 +1008,7 @@ proxy handshake - + @@ -916,6 +1024,10 @@ HTTP request Cache + + + + @@ -938,25 +1050,30 @@ Certificate verification - + + + + belirler. - - - + + + + - + - - + - +
    ssunucu geneli
    ksanal konak
    ddizin
    AddType media-type extension [extension] ...skdhT
    Maps the given filename extensions onto the specified content type
    Alias URL-yolu -dosya-yolu|dizin-yoluskT
    URL’leri dosya sistemi konumlarıyla eşler.
    AliasMatch düzenli-ifade -dosya-yolu|dizin-yoluskT
    URL’leri dosya sistemi konumlarıyla düzenli ifadeleri kullanarak +
    Alias [URL-yolu] dosya-yolu | +dizin-yoluskdT
    URL’leri dosya sistemi konumlarıyla eşler.
    AliasMatch "düzenli-ifade" +"dosya-yolu|dizin-yolu"skT
    URL’leri dosya sistemi konumlarıyla düzenli ifadeleri kullanarak eşler.
    Allow from all|host|env=[!]env-variable [host|env=[!]env-variable] ...dhE
    Controls which hosts can access an area of the @@ -115,16 +128,15 @@ server
    AllowCONNECT port[-port] [port[-port]] ... 443 563 skE
    Ports that are allowed to CONNECT through the proxy
    AllowEncodedSlashes On|Off Off skÇ
    Kodlanmış dosya yolu ayracı içeren URL’lere izin verilip +
    AllowEncodedSlashes On|Off|NoDecode Off skÇ
    Kodlanmış dosya yolu ayracı içeren URL’lere izin verilip verilmeyeceğini belirler.
    AllowMethods reset|HTTP-method [HTTP-method]... reset dD
    Restrict access to the listed HTTP methods
    AllowOverride All|None|yönerge-türü -[yönerge-türü] ... All dÇ
    .htaccess dosyalarında bulunmasına izin verilen +[yönerge-türü] ... None (2.3.9 ve sonr +dÇ
    .htaccess dosyalarında bulunmasına izin verilen yönerge türleri belirtilir.
    AllowOverrideList None|directive -[directive-type] ... None dÇ
    Individual directives that are allowed in -.htaccess files
    AllowOverrideList None|yönerge +[yönerge-türü] ... None dÇ
    .htaccess dosyalarında izin verilecek yönergeler tek tek belirtilir
    Anonymous user [user] ...dhE
    Specifies userIDs that are allowed access without password verification
    Anonymous_LogEmail On|Off On dhE
    Sets whether the password entered will be logged in the @@ -136,8 +148,13 @@ formatted email address
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhT
    Sets whether authorization and authentication are passed to lower level modules
    AuthBasicProvider provider-name -[provider-name] ... file dhT
    Sets the authentication provider(s) for this location
    AuthBasicFake off|username [password]dhT
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhT
    Sets the authentication provider(s) for this location
    AuthBasicUseDigestAlgorithm MD5|Off Off dhT
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhT
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdT
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedT
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedT
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedT
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhT
    Sets the name of a text file containing the list of user groups for authorization
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdT
    Specify a context string for use in the cache key
    AuthnCacheEnablesT
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhT
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesT
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sT
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhT
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sT
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhT
    Type of user authentication
    AuthUserFile file-pathdhT
    Sets the name of a text file containing the list of users and passwords for authentication
    BalancerGrowth # 5 skE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On skE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off skE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch düzifd [!]ort-değişkeni[=değer] [[!]ort-değişkeni[=değer]] ...skdhT
    Ortam değişkenlerini HTTP kullanıcı arayüzüne göre belirler.
    CacheDirLevels levels 2 skE
    The number of levels of subdirectories in the cache.
    CacheDisable url-string | onskdhE
    Disable caching of specified URLs
    CacheEnable cache_type [url-string]skdhE
    Enable caching of specified URLs using a specified storage +
    CacheEnable cache_type [url-string]skdE
    Enable caching of specified URLs using a specified storage manager
    CacheFile file-path [file-path] ...sD
    Cache a list of file handles at startup time
    CacheHeader on|off off skdhE
    Add an X-Cache header to the response.
    CacheRoot directoryskE
    The directory root under which cache files are stored
    CacheSocache type[:args]skE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 skdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 skdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 skdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 skdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 skdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on skdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off skdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off skdhE
    Attempt to cache requests or responses that have been marked as no-store.
    CacheStorePrivate On|Off Off skdhE
    Attempt to cache responses that the server has marked as private
    CGIMapExtension cgi-yolu .uzantıdhÇ
    CGI betik yorumlayıcısını saptama tekniğini belirler. +
    CGIDScriptTimeout time[s|ms]skdhT
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-yolu .uzantıdhÇ
    CGI betik yorumlayıcısını saptama tekniğini belirler.
    CharsetDefault charsetskdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd skdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetskdhE
    Source charset of files
    CheckCaseOnly on|off Off skdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off skdhE
    Enables the spelling +
    CGIPassAuth On|Off Off dhÇ
    HTTP yetkilendirme başlıklarının betiklere CGI değişkenleri +olarak aktarılmasını etkin kılar
    CGIVar değişken kuraldhÇ
    Bazı CGI değişkenlerinin nasıl atanacağını belirler
    CharsetDefault charsetskdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd skdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetskdhE
    Source charset of files
    CheckCaseOnly on|off Off skdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off skdhE
    Enables the spelling module
    ChrootDir /dizin/yolusT
    Sunucunun başlatıldıktan sonra chroot(8) yapacağı dizini +
    ChrootDir /dizin/yolusT
    Sunucunun başlatıldıktan sonra chroot(8) yapacağı dizini belirler.
    ContentDigest On|Off Off skdhÇ
    Content-MD5 HTTP yanıt başlıklarının üretimini +
    ContentDigest On|Off Off skdhÇ
    Content-MD5 HTTP yanıt başlıklarının üretimini etkin kılar.
    CookieDomain domainskdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodskdhE
    Expiry time for the tracking cookie
    CookieName token Apache skdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape skdhE
    Format of the cookie header field
    CookieTracking on|off off skdhE
    Enables tracking cookie
    CoreDumpDirectory dizinsM
    core dosyasını dökümlemek üzere Apache’nin geçmeye - çalışacağı dizin.
    CustomLog dosya|borulu-süreç +
    CookieDomain domainskdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodskdhE
    Expiry time for the tracking cookie
    CookieName token Apache skdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape skdhE
    Format of the cookie header field
    CookieTracking on|off off skdhE
    Enables tracking cookie
    CoreDumpDirectory dizinsM
    core dosyasını dökümlemek üzere Apache HTTP + Sunucusunun geçmeye çalışacağı dizin.
    CustomLog dosya|borulu-süreç biçem|takma-ad -[env=[!]ortam-değişkeni]skT
    Günlük dosyasın ismini ve girdi biçemini belirler.
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off skdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathskdE
    Location of the DAV lock database
    DavLockDB file-pathskE
    Location of the DAV lock database
    DavMinTimeout seconds 0 skdE
    Minimum amount of time the server holds a lock on +[env=[!]ortam-değişkeni]| +expr=ifade]skT
    Günlük dosyasın ismini ve girdi biçemini belirler.
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off skdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathskdE
    Location of the DAV lock database
    DavLockDB file-pathskE
    Location of the DAV lock database
    DavMinTimeout seconds 0 skdE
    Minimum amount of time the server holds a lock on a DAV resource
    DBDExptime time-in-seconds 300 skE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 skE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"skE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 skE
    Maximum sustained number of connections
    DBDMax number 10 skE
    Maximum number of connections
    DBDMin number 1 skE
    Minimum number of connections
    DefaultLanguage language-tagskdhT
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType ortam-türü|none none skdhÇ
    Değeri none olduğu takdirde, bu yönergenin bir +
    DefaultRuntimeDir dizin-yolu DEFAULT_REL_RUNTIME +sÇ
    Sunucunun çalışma anı dosyaları için temel dizin
    DefaultType ortam-türü|none none skdhÇ
    Değeri none olduğu takdirde, bu yönergenin bir uyarı vermekten başka bir etkisi yoktur. Önceki sürümlerde, bu yönerge, sunucunun ortam türünü saptayamadığı durumda göndereceği öntanımlı ortam türünü belirlerdi.
    Define değişken-ismisÇ
    Bir değişkenin mevcudiyetini betimler.
    DeflateBufferSize value 8096 skE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valueskE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenameskE
    Places the compression ratio in a note for logging
    Define değişken-ismi [değişken-değeri]skdÇ
    Bir değişken tanımlar
    DeflateBufferSize value 8096 skE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valueskE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenameskE
    Places the compression ratio in a note for logging
    DeflateInflateLimitRequestBodyvalueskdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valueskdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valueskdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 skE
    How much memory should be used by zlib for compression
    DeflateWindowSize value 15 skE
    Zlib compression window size
    Deny from all|host|env=[!]env-variable @@ -354,114 +399,138 @@ türünü belirlerdi.
    <Directory dizin-yolu> ... </Directory>skÇ
    Sadece ismi belirtilen dosya sistemi dizininde ve bunun - altdizinlerinde uygulanacak bir yönerge grubunu sarmalar.
    DirectoryIndex - disabled | yerel-url [yerel-url] ... index.html skdhT
    İstemci bir dizin istediğinde dizin içeriğini listeler. -
    DirectoryIndexRedirect on | off | permanent | temp | seeother | -3xx-code - off skdhT
    Configures an external redirect for directory indexes. -
    <DirectoryMatch düzifd> -... </DirectoryMatch>skÇ
    Bir düzenli ifade ile eşleşen dosya sistemi dizininde ve bunun - altdizinlerinde uygulanacak bir yönerge grubunu sarmalar.
    DirectorySlash On|Off On skdhT
    Bölü çizgisi ile biten yönlendirmeleri açar/kapar.
    DocumentRoot dizin-yolu /usr/local/apache/h +skÇ
    İstemciye görünür olan ana belge ağacının kök dizinini belirler.
    DTracePrivileges On|Off Off sD
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>skdhÇ
    Contains directives that apply only if the condition of a -previous <If> or -<ElseIf> section is not -satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>skdhÇ
    Contains directives that apply only if a condition is satisfied -by a request at runtime while the condition of a previous -<If> or -<ElseIf> section is not -satisfied
    EnableExceptionHook On|Off Off sM
    Bir çöküş sonrası olağandışılık eylemcilerini çalıştıracak + altdizinlerinde ve bunların içeriğinde uygulanacak bir yönerge grubunu + sarmalar.
    DirectoryCheckHandler On|Off Off skdhT
    Başka bir eylemci yapılandırılmışsa bu modülün nasıl yanıt + vereceğini belirler
    DirectoryIndex + disabled | yerel-url [yerel-url] ... index.html skdhT
    İstemci bir dizin istediğinde dizin içeriğini listeler. +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +3xx-kodu + off skdhT
    Dizin içerik listeleri için harici bir yönlendirme yapılandırır. +
    <DirectoryMatch düzifd> +... </DirectoryMatch>skÇ
    Bir düzenli ifade ile eşleşen dosya sistemi dizinlerinin içeriklerine uygulanacak bir yönerge grubunu sarmalar.
    DirectorySlash On|Off On skdhT
    Bölü çizgisi ile biten yönlendirmeleri açar/kapar.
    DocumentRoot dizin-yolu "/usr/local/apache/ +skÇ
    İstemciye görünür olan ana belge ağacının kök dizinini belirler.
    DTracePrivileges On|Off Off sD
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>skdhÇ
    Önceki bir <If> veya <ElseIf> bölümünün koşulu, çalışma anında bir istek tarafından yerine getirilmediği takdirde uygulanacak yönergeleri içerir
    <ElseIf ifade> ... </ElseIf>skdhÇ
    İçerdiği koşulun bir istek tarafınan sağlandığı ancak daha önceki bir <If> veya +<ElseIf> bölümlerininkilerin sağlanmadığı durumda kapsadığı yönergelerin uygulanmasını sağlar
    EnableExceptionHook On|Off Off sM
    Bir çöküş sonrası olağandışılık eylemcilerini çalıştıracak kancayı etkin kılar.
    EnableMMAP On|Off On skdhÇ
    Teslimat sırasında okunacak dosyalar için bellek eşlemeyi etkin +
    EnableMMAP On|Off On skdhÇ
    Teslimat sırasında okunacak dosyalar için bellek eşlemeyi etkin kılar.
    EnableSendfile On|Off On skdhÇ
    Dosyaların istemciye tesliminde çekirdeğin dosya gönderme +
    EnableSendfile On|Off Off skdhÇ
    Dosyaların istemciye tesliminde çekirdeğin dosya gönderme desteğinin kullanımını etkin kılar.
    Error messageskdhÇ
    Abort configuration parsing with a custom error message
    ErrorDocument hata-kodu belgeskdhÇ
    Bir hata durumunda sunucunun istemciye ne döndüreceğini +
    Error iletiskdhÇ
    Özel bir hata iletisiyle yapılandırma çözümlemesini durdurur
    ErrorDocument hata-kodu belgeskdhÇ
    Bir hata durumunda sunucunun istemciye ne döndüreceğini belirler.
    ErrorLog dosya-yolu|syslog[:oluşum] logs/error_log (Uni +skÇ
    Sunucunun hata günlüğünü tutacağı yeri belirler.
    ErrorLogFormat [connection|request] formatskÇ
    Format specification for error log entries
    ExampleskdhD
    Demonstration directive to illustrate the Apache module +
    ErrorLog dosya-yolu|syslog[:oluşum] logs/error_log (Uni +skÇ
    Sunucunun hata günlüğünü tutacağı yeri belirler.
    ErrorLogFormat [connection|request] biçemskÇ
    Hata günlüğü girdileri için biçem belirtimi
    ExampleskdhD
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|Off Off skdhE
    Enables generation of Expires +
    ExpiresActive On|Off Off skdhE
    Enables generation of Expires headers
    ExpiresByType MIME-type -<code>secondsskdhE
    Value of the Expires header configured +
    ExpiresByType MIME-type +<code>secondsskdhE
    Value of the Expires header configured by MIME type
    ExpiresDefault <code>secondsskdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sÇ
    Keep track of extended status information for each -request
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource yerel-urlskdhT
    Bir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar +
    ExpiresDefault <code>secondsskdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sÇ
    Her istekte ek durum bilgisinin izini sürer
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource disabled | yerel-urlskdhT
    Bir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar
    FileETag bileşen ... INode MTime Size skdhÇ
    ETag HTTP yanıt başlığını oluşturmakta kullanılacak - dosya özniteliklerini belirler.
    <Files dosya-adı> ... </Files>skdhÇ
    Dosya isimleriyle eşleşme halinde uygulanacak yönergeleri +
    FileETag bileşen ... MTime Size skdhÇ
    Duruk dosyalar için ETag HTTP yanıt başlığını oluşturmakta kullanılacak dosya özniteliklerini belirler.
    <Files dosya-adı> ... </Files>skdhÇ
    Dosya isimleriyle eşleşme halinde uygulanacak yönergeleri içerir.
    <FilesMatch düzifd> ... </FilesMatch>skdhÇ
    Düzenli ifadelerin dosya isimleriyle eşleşmesi halinde +
    <FilesMatch düzifd> ... </FilesMatch>skdhÇ
    Düzenli ifadelerin dosya isimleriyle eşleşmesi halinde uygulanacak yönergeleri içerir.
    FilterChain [+=-@!]filter-name ...skdhT
    Configure the filter chain
    FilterDeclare filter-name [type]skdhT
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagsskdhT
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionskdhT
    Register a content filter
    FilterTrace filter-name levelskdT
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...skdhT
    Configure the filter chain
    FilterDeclare filter-name [type]skdhT
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagsskdhT
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionskdhT
    Register a content filter
    FilterTrace filter-name levelskdT
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer skdhT
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer skdhT
    Action to take if a single acceptable document is not found
    ForceType ortam-türü|NonedhÇ
    Bütün dosyaların belirtilen ortam türüyle sunulmasına +
    ForceType ortam-türü|NonedhÇ
    Bütün dosyaların belirtilen ortam türüyle sunulmasına sebep olur.
    ForensicLog dosya-adı|borulu-süreçskE
    Adli günlük için dosya ismini belirler.
    GprofDir /tmp/gprof/|/tmp/gprof/%skÇ
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout saniyesM
    Sunucunun nazikçe kapatılmasının ardından ana süreç çıkana kadar +
    ForensicLog dosya-adı|borulu-süreçskE
    Adli günlük için dosya ismini belirler.
    GlobalLog dosya|boru|sağlayıcı +biçem|takma_ad +[env=[!]ortam_değişkeni| +expr=ifade]sT
    Günlük dosyasının ismini ve biçemini belirler
    GprofDir /tmp/gprof/|/tmp/gprof/%skÇ
    gmon.out ayrıntılı inceleme verisinin yazılacağı dizin
    GracefulShutdownTimeout saniye 0 sM
    Sunucunun nazikçe kapatılmasının ardından ana süreç çıkana kadar geçecek süre için bir zaman aşımı belirler.
    Group unix-grubu #-1 sT
    İsteklere yanıt verecek sunucunun ait olacağı grubu belirler.
    Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]skdhE
    Configure HTTP response headers
    HeaderName dosya-ismiskdhT
    Dizin listesinin tepesine yerleştirilecek dosyanın ismini +
    H2CopyFiles on|off off skdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +skE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off skE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 skE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on skE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on skE
    H2 Server Push Switch
    H2PushDiarySize n 256 skE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 skE
    H2 Server Push Priority
    H2PushResource [add] path [critical]skdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off skE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nskE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 skE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 skE
    -
    H2TLSWarmUpSize amount 1048576 skE
    -
    H2Upgrade on|off on for h2c, off for +skE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 skE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +skdhE
    Configure HTTP response headers
    HeaderName dosya-ismiskdhT
    Dizin listesinin tepesine yerleştirilecek dosyanın ismini belirler.
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsD
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsD
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sD
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sD
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sD
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off skdÇ
    İstemci IP adresleri üzerinde DNS sorgularını etkin kılar.
    IdentityCheck On|Off Off skdE
    Enables logging of the RFC 1413 identity of the remote +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +skÇ
    HTTP İstek İletilerindeki sınırlamalarda değişiklik yapar
    IdentityCheck On|Off Off skdE
    Enables logging of the RFC 1413 identity of the remote user
    IdentityCheckTimeout seconds 30 skdE
    Determines the timeout duration for ident requests
    <If ifade> ... </If>skdhÇ
    Çalışma anında bir koşul bir istek tarafından yerine getirildiği +
    IdentityCheckTimeout seconds 30 skdE
    Determines the timeout duration for ident requests
    <If ifade> ... </If>skdhÇ
    Çalışma anında bir koşul bir istek tarafından yerine getirildiği takdirde uygulanacak yönergeleri barındırır.
    <IfDefine [!]parametre-adı> ... - </IfDefine>skdhÇ
    Başlatma sırasında bir doğruluk sınamasından sonra işleme +
    <IfDefine [!]parametre-adı> ... + </IfDefine>skdhÇ
    Başlatma sırasında bir doğruluk sınamasından sonra işleme sokulacak yönergeleri sarmalar.
    <IfModule [!]modül-dosyası|modül-betimleyici> ... - </IfModule>skdhÇ
    Belli bir modülün varlığına veya yokluğuna göre işleme sokulacak +
    <IfModule [!]modül-dosyası|modül-betimleyici> ... + </IfModule>skdhÇ
    Belli bir modülün varlığına veya yokluğuna göre işleme sokulacak yönergeleri sarmalar.
    <IfVersion [[!]operator] version> ... -</IfVersion>skdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ skdhT
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent skdhT
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>skdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ skdhT
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent skdhT
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedskdhT
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted skdhT
    Action if no coordinates are given when calling an imagemap
    Include dosya-yolu|dizin-yoluskdÇ
    Sunucu yapılandırma dosyalarının başka dosyaları içermesini sağlar. +
    Include dosya-yolu|dizin-yolu|jokerskdÇ
    Sunucu yapılandırma dosyalarının başka dosyaları içermesini sağlar.
    IncludeOptional dosya-yolu|dizin-yolu|jokerskdÇ
    Diğer yapılandırma dosyalarının sunucu yapılandırma dosyasına dahil edilmesini sağlar
    IndexHeadInsert "imlenim ..."skdhT
    Bir dizin sayfasının HEAD bölümüne metin yerleştirir.
    IndexIgnore dosya [dosya] ...skdhT
    Dizin içerik listesinden gizlenecek dosyaların listesi belirtilir. +
    IndexIgnore dosya [dosya] ... "." skdhT
    Dizin içerik listesinden gizlenecek dosyaların listesi belirtilir. +
    IndexIgnoreReset ON|OFFskdhT
    Bir dizini listelerken gizlenecek dosyalar listesini boşaltır
    IndexIgnoreReset ON|OFFskdhT
    Empties the list of files to hide when listing -a directory
    IndexOptions [+|-]seçenek [[+|-]seçenek] ...skdhT
    Dizin içerik listesini yapılandıracak seçenekler belirtilir.
    LanguagePriority MIME-lang [MIME-lang] -...skdhT
    The precendence of language variants for cases where +...skdhT
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    LimitRequestBody bayt-sayısı 0 skdhÇ
    İstemci tarafından gönderilen HTTP istek gövdesinin toplam uzunluğunu sınırlar.
    LimitRequestFields sayı 100 sÇ
    İstemciden kabul edilecek HTTP isteği başlık alanlarının sayısını +
    LimitRequestFields sayı 100 skÇ
    İstemciden kabul edilecek HTTP isteği başlık alanlarının sayısını sınırlar.
    LimitRequestFieldSize bayt-sayısı 8190 sÇ
    İstemciden kabul edilecek HTTP isteği başlık uzunluğunu sınırlar. +
    LimitRequestFieldSize bayt-sayısı 8190 skÇ
    İstemciden kabul edilecek HTTP isteği başlık uzunluğunu sınırlar.
    LimitRequestLine bayt-sayısı 8190 sÇ
    İstemciden kabul edilecek HTTP istek satırının uzunluğunu sınırlar. +
    LimitRequestLine bayt-sayısı 8190 skÇ
    İstemciden kabul edilecek HTTP istek satırının uzunluğunu sınırlar.
    LimitXMLRequestBody bayt-sayısı 1000000 skdhÇ
    Bir XML temelli istek gövdesinin uzunluğunu sınırlar.
    Listen [IP-adresi:]port-numarası [protokol]sM
    Sunucunun dinleyeceği IP adresini ve portu belirler.
    ListenBacklog kuyruk-uzunluğusM
    Bekleyen bağlantılar kuyruğunun azami uzunluğunu belirler
    LoadFile dosya-ismi [dosya-ismi] ...sE
    Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler. +
    ListenCoresBucketsRatio oran 0 (iptal) sM
    İşlemci çekirdek sayısının dinleyenlerin buket sayısına oranı
    LoadFile dosya-ismi [dosya-ismi] ...skE
    Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler.
    LoadModule modül dosya-ismisE
    Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler +
    LoadModule modül dosya-ismiskE
    Belirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler ve etkin modül listesine ekler.
    <Location URL-yolu|URL> ... -</Location>skÇ
    İçerdiği yönergeler sadece eşleşen URL’lere uygulanır. +
    <Location URL-yolu|URL> ... +</Location>skÇ
    İçerdiği yönergeler sadece eşleşen URL’lere uygulanır.
    <LocationMatch - düzifade> ... </LocationMatch>skÇ
    İçerdiği yönergeler sadece düzenli ifadelerle eşleşen URL’lere +
    <LocationMatch + düzifade> ... </LocationMatch>skÇ
    İçerdiği yönergeler sadece düzenli ifadelerle eşleşen URL’lere uygulanır.
    LogFormat biçem|takma-ad -[takma-ad] "%h %l %u %t \"%r\" +skT
    Bir günlük dosyasında kullanılmak üzere girdi biçemi tanımlar. +
    LogFormat biçem|takma-ad +[takma-ad] "%h %l %u %t \"%r\" +skT
    Bir günlük dosyasında kullanılmak üzere girdi biçemi tanımlar.
    LogLevel seviye warn skÇ
    Hata günlüklerinin ayrıntı seviyesini belirler.
    LogIOTrackTTFB ON|OFF OFF skdhE
    İlk baytın yazılmasına kadar geçen süreyi izler
    LogLevel [modül:]seviye + [modül:seviye] ... + warn skdÇ
    Hata günlüklerinin ayrıntı seviyesini belirler.
    LogMessage message [hook=hook] [expr=expression] -dD
    Log userdefined message to error log +dD
    Log user-defined message to error log +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesD
    Plug an authorization provider function into mod_authz_core
    LuaCodeCache stat|forever|never stat skdhD
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the fixups phase of request +
    LuaCodeCache stat|forever|never stat skdhD
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]skdhD
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_nameskdhD
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]skdD
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]skD
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_nameskdhD
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first skdhD
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesD
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]skdhD
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soaskdhD
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luaskdhD
    Add a directory to lua's package.path
    skdhD
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directoryskdhD
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once skdhD
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server -will handle during its life
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesD
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soaskdhD
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luaskdhD
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_nameskD
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directoryskdhD
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once skdhD
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>skdT
    Define a configuration file macro
    MaxConnectionsPerChild sayı 0 sM
    Tek bir çocuk sürecin ömrü boyunca işleme sokabileceği istek + sayısını sınırlamakta kullanılır.
    MaxKeepAliveRequests sayı 100 skÇ
    Bir kalıcı bağlantıda izin verilen istek sayısı
    MaxMemFree kB-sayısı 0 sM
    free() çağrılmaksızın ana bellek ayırıcının +
    MaxMemFree kB-sayısı 2048 sM
    free() çağrılmaksızın ana bellek ayırıcının ayırmasına izin verilen azami bellek miktarını belirler.
    MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 skdÇ
    Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete - resource
    MaxRangeReversals default | unlimited | none | number-of-ranges 20 skdÇ
    Number of range reversals (eg: 100-200,50-70) allowed before returning the complete - resource
    MaxRanges default | unlimited | none | number-of-ranges 200 skdÇ
    Number of ranges allowed before returning the complete -resource
    MaxRequestWorkers numbersM
    Maximum number of connections that will be processed -simultaneously
    MaxRangeOverlaps default | unlimited | none | + aralık-sayısı 20 skdÇ
    Özkaynağın tamamını döndürmeden önce izin verilen üst üste binen + aralık sayısı (100-200,150-300 gibi)
    MaxRangeReversals default | unlimited | none | + aralık-sayısı 20 skdÇ
    Özkaynağın tamamını döndürmeden önce izin verilen ters sıralı + aralık sayısı (100-200,50-70 gibi)
    MaxRanges default | unlimited | none | + aralık-sayısı 200 skdÇ
    Özkaynağın tamamını döndürmeden önce izin verilen aralık sayısı
    MaxRequestWorkers sayısM
    Aynı anda işleme sokulacak azami bağlantı sayısı
    MaxSpareServers sayı 10 sM
    Boştaki çocuk süreçlerin azami sayısı
    MaxSpareThreads numbersM
    Boştaki azami evre sayısını belirler
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s skE
    Keepalive time for idle connections
    MergeTrailers [on|off] off skÇ
    Trailer alanlarının başlığa dahil edilip edilmeyeceğini belirler
    MetaDir directory .web skdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off skdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta skdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta skdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathskE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads sayısM
    İsteklerin ani artışında devreye girecek boştaki evrelerin asgari sayısını belirler.
    MMapFile file-path [file-path] ...sD
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92D
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dD
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dT
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers [Handlers|Filters] NegotiatedOnly skdhT
    The types of files that will be included when searching for a matching file with MultiViews
    Mutex mechanism [default|mutex-name] ... [OmitPID] default sÇ
    Configures mutex mechanism and lock file directory for all -or specified mutexes
    NameVirtualHost adres[:port]sÇ
    İsme dayalı sanal konaklar için IP adresi belirtir
    Mutex mekanizma [default|muteks-ismi] ... [OmitPID] default sÇ
    Muteks mekanizmasını ve kilit dosyası dizinini tüm muteksler veya belirtilenler için yapılandırır
    NameVirtualHost adres[:port]sÇ
    ÖNERİLMİYOR: İsme dayalı sanal konaklar için IP adresi belirtir
    NoProxy host [host] ...skE
    Hosts, domains, or networks that will be connected to directly
    NWSSLTrustedCerts filename [filename] ...sT
    List of additional client certificates
    NWSSLUpgradeable [IP-address:]portnumbersT
    Allows a connection to be upgraded to an SSL connection upon request
    Options - [+|-]seçenek [[+|-]seçenek] ... All skdhÇ
    Belli bir dizinde geçerli olacak özellikleri yapılandırır. + [+|-]seçenek [[+|-]seçenek] ... FollowSymlinks skdhÇ
    Belli bir dizinde geçerli olacak özellikleri yapılandırır.
    Order ordering Deny,Allow dhE
    Controls the default access state and the order in which Allow and Deny are @@ -616,10 +703,12 @@ evaluated.
    PassEnv ortam-değişkeni [ortam-değişkeni] ...skdhT
    Ortam değişkenlerini kabuktan aktarır.
    PidFile dosya logs/httpd.pid sM
    Ana sürecin süreç kimliğinin (PID) kaydedileceği dosyayı belirler.
    PrivilegesMode FAST|SECURE|SELECTIVEskdD
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST skdD
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolskÇ
    Protocol for a listening socket
    Protocol protokolskÇ
    Dinlenen bir soket için protokol
    ProtocolEcho On|Off Off skD
    Turn the echo server on or off
    Protocols protokol ... http/1.1 skÇ
    Sunucu/sanal konak için kullanılabilecek protokoller
    ProtocolsHonorOrder On|Off On skÇ
    Uzlaşma sırasında protokollerin öncelik sırasını belirler
    <Proxy wildcard-url> ...</Proxy>skE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On skdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError skE
    Determines how to handle bad header lines in a @@ -635,20 +724,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 skdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]skdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]skdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytesskdT
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}skE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>skE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>skE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytesskdT
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *skdT
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    skdT
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffskdT
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]skdT
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffskdT
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *skdT
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    skdT
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off skdT
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]skdT
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off skdT
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]skdT
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffskdT
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]skdT
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off skdT
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]skdT
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffskdT
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]skdT
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off skdT
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off skdT
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]skdT
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 skE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>skE
    Container for directives applied to regular-expression-matched @@ -656,41 +750,44 @@ proxied resources
    ProxyMaxForwards number -1 skE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]skdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off skdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]skdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]skdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]skdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On skE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off skdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]skdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]skdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]skdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]skdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]skdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]skdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off skdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off skdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 skE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 skE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serverskE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serverskE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serverskE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serverskE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off skE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On skdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off skE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On skdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off skdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off skdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addressskE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off skE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondsskE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off skE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addressskE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off skE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondsskE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off skE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF skdÇ
    REDIRECT_URL ortam değişkeninin tamamen nitelenmiş olup +olmayacağını denetler
    ReadmeName dosya-ismiskdhT
    Dizin listesinin sonuna yerleştirilecek dosyanın ismini belirler.
    ReceiveBufferSize bayt-sayısı 0 sM
    TCP alım tamponu boyu
    Redirect [durum] URL-yolu +
    Redirect [durum] [URL-yolu] URLskdhT
    İstemciyi, bir yönlendirme isteği döndürerek farklı bir URL’ye yönlendirir.
    RedirectMatch [durum] düzenli-ifade @@ -701,112 +798,116 @@ URL’ye yönlendirir.
    RedirectTemp URL-yolu URLskdhT
    İstemciyi, geçici bir yönlendirme isteği döndürerek farklı bir URL’ye yönlendirir.
    ReflectorHeader inputheader [outputheader]skdhT
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldskT
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...skT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenameskT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNameskT
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...skT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenameskT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...kdhT
    Removes any character set associations for a set of file +
    RegisterHttpMethod yöntem [yöntem [...]]sÇ
    Standart olamayan HTTP yöntemlerini belirler
    RemoteIPHeader header-fieldskT
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...skT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenameskT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNameskT
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...skT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenameskT
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...kdhT
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...kdhT
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...kdhT
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...kdhT
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...kdhT
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...kdhT
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...kdhT
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...kdhT
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...kdhT
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...kdhT
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...kdhT
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...kdhT
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...kdhT
    Removes any content type associations for a set of file extensions
    RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]skdhE
    Configure HTTP request headers
    RequestReadTimeout +
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +skdhE
    Configure HTTP request headers
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -skE
    Set timeout values for receiving request headers and body from client. +skE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhT
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhT
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhT
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhT
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhT
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhT
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhT
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhT
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternskdhE
    Defines a condition under which rewriting will take place -
    RewriteEngine on|off off skdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -skE
    Defines a mapping function for key-lookup
    RewriteOptions OptionsskdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]skdhE
    Defines rules for the rewriting engine
    RLimitCPU saniye|max [saniye|max]skdhÇ
    Apache alt süreçleri tarafından çalıştırılan süreçlerin işlemci -tüketimine sınırlama getirir.
    RLimitMEM bayt-sayısı|max [bayt-sayısı|max] -skdhÇ
    Apache alt süreçleri tarafından çalıştırılan süreçlerin bellek -tüketimine sınırlama getirir.
    RLimitNPROC sayı|max [sayı|max]skdhÇ
    Apache alt süreçleri tarafından çalıştırılabilecek süreç sayısına -sınırlama getirir.
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]skdhE
    Defines a condition under which rewriting will take place +
    RewriteEngine on|off off skdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +skE
    Defines a mapping function for key-lookup
    RewriteOptions OptionsskdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]skdhE
    Defines rules for the rewriting engine
    RLimitCPU saniye|max [saniye|max]skdhÇ
    Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + işlemci tüketimine sınırlama getirir.
    RLimitMEM bayt-sayısı|max [bayt-sayısı|max] +skdhÇ
    Apache httpd alt süreçleri tarafından çalıştırılan süreçlerin + bellek tüketimine sınırlama getirir.
    RLimitNPROC sayı|max [sayı|max]skdhÇ
    Apache httpd alt süreçleri tarafından çalıştırılabilecek süreç + sayısına sınırlama getirir.
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile dosya-yolu logs/apache_status sM
    Çocuk süreçler için eşgüdüm verisini saklamakta kullanılan +
    ScoreBoardFile dosya-yolu logs/apache_runtime +sM
    Çocuk süreçler için eşgüdüm verisini saklamakta kullanılan dosyanın yerini belirler.
    Script method cgi-scriptskdT
    Activates a CGI script for a particular request +
    Script method cgi-scriptskdT
    Activates a CGI script for a particular request method.
    ScriptAlias URL-yolu -dosya-yolu|dizin-yoluskT
    Bir URL’yi dosya sistemindeki bir yere eşler ve hedefi bir CGI betiği olarak çalıştırır.
    ScriptAliasMatch düzenli-ifade -dosya-yolu|dizin-yoluskT
    Bir URL’yi dosya sistemindeki bir yere düzenli ifade kullanarak +
    ScriptAlias [URL-yolu] +dosya-yolu|dizin-yoluskdT
    Bir URL’yi dosya sistemindeki bir yere eşler ve hedefi bir CGI betiği olarak çalıştırır.
    ScriptAliasMatch düzenli-ifade +dosya-yolu|dizin-yoluskT
    Bir URL’yi dosya sistemindeki bir yere düzenli ifade kullanarak eşler ve hedefi bir CGI betiği olarak çalıştırır.
    ScriptInterpreterSource Registry|Registry-Strict|Script Script skdhÇ
    CGI betikleri için yorumlayıcı belirleme tekniği
    ScriptLog file-pathskT
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 skT
    Maximum amount of PUT or POST requests that will be recorded +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script skdhÇ
    CGI betikleri için yorumlayıcı belirleme tekniği
    ScriptLog file-pathskT
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 skT
    Maximum amount of PUT or POST requests that will be recorded in the scriptlog
    ScriptLogLength bytes 10385760 skT
    Size limit of the CGI script logfile
    ScriptSock file-path logs/cgisock sT
    The filename prefix of the socket to use for communication with +
    ScriptLogLength bytes 10385760 skT
    Size limit of the CGI script logfile
    ScriptSock file-path cgisock sT
    The filename prefix of the socket to use for communication with the cgi daemon
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sT
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sÇ
    Determine if mod_status displays the first 63 characters -of a request or the last 63, assuming the request itself is greater than -63 chars.
    SendBufferSize bayt-sayısı 0 sM
    TCP tamponu boyu
    ServerAdmin eposta-adresi|URLskÇ
    Sunucunun hata iletilerinde istemciye göstereceği eposta adresi -
    ServerAlias konakadı [konakadı] ...kÇ
    İstekleri isme dayalı sanal konaklarla eşleştirilirken +
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sT
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sÇ
    İsteğin 63 karakterden büyük olduğu varsayımıyla, mod_status'un + ilk 63 karakteri mi yoksa son 63 karakteri mi göstereceğini + belirler.
    SendBufferSize bayt-sayısı 0 sM
    TCP tamponu boyu
    ServerAdmin eposta-adresi|URLskÇ
    Sunucunun hata iletilerinde istemciye göstereceği eposta adresi +
    ServerAlias konakadı [konakadı] ...kÇ
    İstekleri isme dayalı sanal konaklarla eşleştirilirken kullanılacak konak adları için başka isimler belirtebilmeyi sağlar.
    ServerLimit sayısM
    Ayarlanabilir süreç sayısının üst sınırını belirler.
    ServerName [şema://]tam-nitelenmiş-alan-adı[:port] -skÇ
    Sunucunun özdeşleşeceği konak ismi ve port.
    ServerPath URL-yolukÇ
    Uyumsuz bir tarayıcı tarafından erişilmesi için bir isme dayalı sanal konak için meşru URL yolu
    ServerRoot dizin-yolu /usr/local/apache sÇ
    Sunucu yapılandırması için kök dizin
    ServerSignature On|Off|EMail Off skdhÇ
    Sunucu tarafından üretilen belgelerin dipnotunu ayarlar. -
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sÇ
    Server HTTP yanıt başlığını yapılandırır. -
    Session On|Off Off skdhE
    Enables a session for the current directory or location
    SessionCookieName name attributesskdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributesskdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off skdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher nameskdhD
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sD
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] skdhD
    The key used to encrypt the session
    ServerLimit sayısM
    Ayarlanabilir süreç sayısının üst sınırını belirler.
    ServerName [şema://]alan-adı|ip-adresi[:port] +skÇ
    Sunucunun özdeşleşeceği konak ismi ve port.
    ServerPath URL-yolukÇ
    Uyumsuz bir tarayıcı tarafından erişilmesi için bir isme dayalı sanal konak için meşru URL yolu
    ServerRoot dizin-yolu /usr/local/apache sÇ
    Sunucu yapılandırması için kök dizin
    ServerSignature On|Off|EMail Off skdhÇ
    Sunucu tarafından üretilen belgelerin dipnotunu ayarlar. +
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sÇ
    Server HTTP yanıt başlığını yapılandırır. +
    Session On|Off Off skdhE
    Enables a session for the current directory or location
    SessionCookieName name attributesskdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributesskdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off skdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher nameskdhD
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sD
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] skdhD
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenameskdD
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributesskdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributesskdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On skdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SessionHeader headerskdhE
    Import session updates from a given HTTP response header
    SessionInclude pathskdhE
    Define URL prefixes for which a session is valid
    SessionMaxAge maxage 0 skdhE
    Define a maximum age in seconds for a session
    SetEnv ortam-değişkeni değerskdhT
    Ortam değişkenlerini tanımlar.
    SetEnv ortam-değişkeni [değer]skdhT
    Ortam değişkenlerini tanımlar.
    SetEnvIf öznitelik düzifd [!]ort-değişkeni[=değer] [[!]ort-değişkeni[=değer]] ...skdhT
    Ortam değişkenlerini isteğin özniteliklerine göre atar.
    skdhT
    Sets environment variables based on an ap_expr expression
    SetEnvIfExpr ifade + [!]ort-değişkeni[=değer] + [[!]ort-değişkeni[=değer]] ...skdhT
    Bir ap_expr ifadesine dayanarak ortam değişkenlerine değer atar
    SetEnvIfNoCase öznitelik düzifd [!]ort-değişkeni[=değer] [[!]ort-değişkeni[=değer]] ...skdhT
    Ortam değişkenlerini isteğin özniteliklerinde harf büyüklüğüne bağlı olmaksızın yapılmış tanımlara göre atar.
    SetHandler eylemci-ismi|NoneskdhÇ
    Eşleşen tüm dosyaların belli bir eylemci tarafından işlenmesine +
    SetHandler eylemci-ismi|none|ifadeskdhÇ
    Eşleşen tüm dosyaların belli bir eylemci tarafından işlenmesine sebep olur.
    SetInputFilter süzgeç[;süzgeç...]skdhÇ
    POST girdilerini ve istemci isteklerini işleyecek süzgeçleri belirler.
    SetOutputFilter süzgeç[;süzgeç...]skdhÇ
    Sunucunun yanıtlarını işleyecek süzgeçleri belirler.
    SSIAccessEnable on|off off dhT
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" skT
    String that ends an include element
    SSIErrorMsg message "[an error occurred +skdhT
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" skT
    String that ends an include element
    SSIErrorMsg message "[an error occurred +skdhT
    Error message displayed when there is an SSI error
    SSIETag on|off off dhT
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhT
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhT
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhT
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhT
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" skT
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +skdhT
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhT
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" skT
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +skdhT
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" skdhT
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathskE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" skdhT
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathskE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathskE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathskE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathskE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathskE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathskE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathskE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none skE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathskE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none skE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathskE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathskE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathskE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathskE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathskE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathskE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +skdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathskE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathskE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathskE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +skdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off skE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off skE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagskE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off skE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off skE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off skE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder uriskE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagskE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagskE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 skE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 skE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 skE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...skdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off skE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off skE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlskE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 skE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 skE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 skE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on skE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valueskE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...skdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all skE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathskE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +skE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathskE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathskE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathskE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none skE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathskE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none skE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathskE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathskE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathskE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on skE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on skE
    Whether to check the remote server certificate's CN field
    SSLProxyCheckPeerExpire on|off on skE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerExpire on|off on skE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on skE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +skdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all skE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +skE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none skE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 skE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 skE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathskE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on skE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringskE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathskE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 skE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on skE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartThreads sayısM
    Sunucunun başlatılması sırasında oluşturulan evrelerin sayısını belirler.
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    Suexec On|OffsT
    Enable or disable the suEXEC feature
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsT
    suEXEC özelliğini etkin veya etkisiz yapar
    SuexecUserGroup Kullanıcı GrupskE
    CGI betiklerini çalıştıracak kullanıcı ve grup belirtilir.
    ThreadLimit sayısM
    Çocuk süreç başına ayarlanabilir evre sayısının üst sınırını - belirler.
    ThreadsPerChild sayısM
    Her çocuk süreç tarafından oluşturulan evrelerin sayısını belirler.
    ThreadStackSize boyutsM
    İstemci bağlantılarını elde eden evreler tarafından kullanılan yığıtın bayt cinsinden uzunluğunu belirler.
    TimeOut saniye 60 skÇ
    Bir istek için başarısız olmadan önce belirli olayların gerçekleşmesi için sunucunun geçmesini bekleyeceği süre.
    TraceEnable [on|off|extended] on sÇ
    TRACE isteklerinde davranış şeklini belirler +
    TraceEnable [on|off|extended] on skÇ
    TRACE isteklerinde davranış şeklini belirler
    TransferLog dosya|borulu-süreç [takma-ad]skT
    Bir günlük dosyasının yerini belirtir.
    TypesConfig file-path conf/mime.types sT
    The location of the mime.types file
    UnDefine parameter-namesÇ
    Undefine the existence of a variable
    UnsetEnv ortam-değişkeni [ortam-değişkeni] -...skdhT
    Ortamdaki değişkenleri tanımsız hale getirir.
    UnDefine değişken-ismisÇ
    Bir değişkeni tanımsız yapar
    UndefMacro nameskdT
    Undefine a macro
    UnsetEnv ortam-değişkeni [ortam-değişkeni] +...skdhT
    Ortamdaki değişkenleri tanımsız hale getirir.
    Use name [value1 ... valueN] +skdT
    Use a macro
    UseCanonicalName On|Off|DNS Off skdÇ
    Sunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar
    UseCanonicalPhysicalPort On|Off Off skdÇ
    Sunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar @@ -984,22 +1101,45 @@ for the virtualhost.
    VirtualScriptAliasIP hesaplanan-dizin|none none skE
    Bir sanal konağın CGI dizinini devingen olarak yapılandırır.
    XBitHack on|off|full off skdhT
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sT
    Watchdog interval in seconds
    XBitHack on|off|full off skdhT
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sT
    Recognise Aliases for encoding values
    xml2EncDefault nameskdhT
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sT
    Recognise Aliases for encoding values
    xml2EncDefault nameskdhT
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]skdhT
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]skdhT
    Advise the parser to skip leading junk.

    Mevcut Diller:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.html.zh-cn b/docs/manual/mod/quickreference.html.zh-cn.utf8 similarity index 56% rename from docs/manual/mod/quickreference.html.zh-cn rename to docs/manual/mod/quickreference.html.zh-cn.utf8 index f3b71687782..cd64d8aec84 100644 --- a/docs/manual/mod/quickreference.html.zh-cn +++ b/docs/manual/mod/quickreference.html.zh-cn.utf8 @@ -1,33 +1,40 @@ - -指令快速索引 - Apache HTTP 服务器 +指令快速索引 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-
    +Apache > HTTP 服务器 > 文档 > 版本 2.4 > 模块

    指令快速索引

    可用语言:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    指令快速索引显示指令的用法,默认值,状态和上下文。要获得更多信息,请参见 描述指令的术语

    @@ -37,7 +44,7 @@

    第三列显示允许此指令的上下文,第四列显示指令的状态。

    - +
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  R  |  S  |  T  |  U  |  V  |  X 
     A  |  B  |  C  |  D  |  E  |  F  |  G  |  H  |  I  |  K  |  L  |  M  |  N  |  O  |  P  |  Q  |  R  |  S  |  T  |  U  |  V  |  W  |  X  @@ -101,8 +108,8 @@ responses from the server - + @@ -133,8 +140,13 @@ formatted email address - + + + @@ -148,9 +160,6 @@ passwords for authentication response hashes in digest authentication - - @@ -173,13 +182,13 @@ lower level modules - + - + @@ -190,9 +199,9 @@ authorization groups. - - @@ -215,12 +224,18 @@ authentication - + + + @@ -240,7 +255,9 @@ alias authentication succeeds but authorization fails - + + + @@ -255,7 +272,7 @@ respect to case - @@ -288,40 +305,57 @@ cached by proxy servers before data is sent downstream + + + + + + - + - - - - - + + + + + + - - + - - - - - - + + + + + - - - - - - + + + + + - + + @@ -335,15 +369,20 @@ configured - + - - - - + + + + + + + - + - - - - + - - - - + + + - - - - - - + + + - - - + + - - - - + - - - - + + + - - - - - - - + + + + - - - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - + - - + - - - - - + + - - + the specified maximum size, for potential use by filters such as mod_include. @@ -494,7 +565,9 @@ operations - + + + @@ -525,45 +598,58 @@ from the client - - + + - - - + + - - - - - + + + + + + + - - + + + - - - - - - + + + + + + + - @@ -576,10 +662,12 @@ simultaneously + + - @@ -587,7 +675,7 @@ using the specified magic file - + ... - + + - + + + - - - - - + + + + - - + - - + + + - - - + + + + - - - - - - + - - + - - - - - - + + + + + - - - - - - - - + + + + + + + - - - - - - - - + - - - - - - + - - - - - + + + + - - - - - - - - - - + - - + - - + - - + - - - + - - - - + + - - - - - - - + + + + + + + + @@ -817,7 +919,7 @@ header - + [!]env-variable[=value] [[!]env-variable[=value]] ... - - - - + - - + - - - + + - - + - - - - - + - - - - - + + + + - - + + - - - - - - - + + + + + + + + + - - + - - - + - - + - @@ -899,7 +1006,7 @@ proxy handshake - + @@ -915,6 +1022,10 @@ HTTP request Cache + + + + @@ -935,6 +1046,8 @@ Certificate verification + + - + + + @@ -976,24 +1092,47 @@ for a given virtual host hostname or IP address - - + - - + - +
    s服务器配置
    v虚拟主机
    d目录
    AddType media-type extension [extension] ...svdhB
    Maps the given filename extensions onto the specified content type
    Alias URL-path -file-path|directory-pathsvB
    Maps URLs to filesystem locations
    Alias [URL-path] +file-path|directory-pathsvdB
    Maps URLs to filesystem locations
    AliasMatch regex file-path|directory-pathsvB
    Maps URLs to filesystem locations using regular expressions
    AsyncRequestWorkerFactor factorsM
    Limit concurrent connections per process
    AuthBasicAuthoritative On|Off On dhB
    Sets whether authorization and authentication are passed to lower level modules
    AuthBasicProvider provider-name -[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicFake off|username [password]dhB
    Fake basic authentication using the given expressions for +username and password
    AuthBasicProvider provider-name +[provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthBasicUseDigestAlgorithm MD5|Off Off dhB
    Check passwords against the authentication providers as if +Digest Authentication was in force instead of Basic Authentication. +
    AuthDBDUserPWQuery querydE
    SQL query to look up a password for a user
    AuthDBDUserRealmQuery querydE
    SQL query to look up a password hash for a user and realm.
    AuthDigestDomain URI [URI] ...dhE
    URIs that are in the same protection space for digest authentication
    AuthDigestNcCheck On|Off Off sE
    Enables or disables checking of the nonce-count sent by the -server
    AuthDigestNonceFormat formatdhE
    Determines how the nonce is generated
    AuthDigestNonceLifetime seconds 300 dhE
    How long the server nonce is valid
    AuthDigestProvider provider-name [provider-name] ... file dhE
    Sets the authentication provider(s) for this location
    AuthFormProvider provider-name [provider-name] ... file dhB
    Sets the authentication provider(s) for this location
    AuthFormSitePassphrase secretdB
    Bypass authentication checks for high traffic sites
    AuthFormBody sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormSize sizedB
    The largest size of the form in bytes that will be parsed for the login details
    AuthFormUsername fieldnamedB
    The name of a form field carrying the login username
    AuthGroupFile file-pathdhB
    Sets the name of a text file containing the list of user groups for authorization
    AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhE
    Specifies the prefix for environment variables set during authorization
    AuthLDAPBindAuthoritativeoff|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindAuthoritative off|on on dhE
    Determines if other authentication providers are used when a user can be mapped to a DN but the server cannot successfully bind with the user's credentials.
    AuthLDAPBindDN distinguished-namedhE
    Optional DN to use in binding to the LDAP server
    AuthLDAPBindPassword passworddhE
    Password used in conjuction with the bind DN
    AuthLDAPCharsetConfig file-pathsE
    Language to charset conversion configuration file
    AuthLDAPGroupAttributeIsDN on|off on dhE
    Use the DN of the client username when checking for group membership
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' +
    AuthLDAPInitialBindAsUser off|on off dhE
    Determines if the server does the initial DN lookup using the basic authentication users' own username, instead of anonymously or with hard-coded credentials for the server
    AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server +
    AuthLDAPInitialBindPattern regex substitution (.*) $1 (remote use +dhE
    Specifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup
    AuthLDAPMaxSubGroupDepth Number 10 dhE
    Specifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued.
    AuthnCacheContext directory|server|custom-stringdB
    Specify a context string for use in the cache key
    AuthnCacheEnablesB
    Enable Authn caching configured anywhere
    AuthnCacheProvideFor authn-provider [...]dhB
    Specify which authn provider(s) to cache for
    AuthnCacheSOCache provider-namesB
    Select socache backend provider to use
    AuthnCacheSOCache provider-name[:provider-args]sB
    Select socache backend provider to use
    AuthnCacheTimeout timeout (seconds)dhB
    Set a timeout for cache entries
    <AuthnProviderAlias baseProvider Alias> ... </AuthnProviderAlias>sB
    Enclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias
    AuthnzFcgiCheckAuthnProvider provider-name|None +option ...dE
    Enables a FastCGI application to handle the check_authn +authentication hook.
    AuthnzFcgiDefineProvider type provider-name +backend-addresssE
    Defines a FastCGI application as a provider for +authentication and/or authorization
    AuthType None|Basic|Digest|FormdhB
    Type of user authentication
    AuthUserFile file-pathdhB
    Sets the name of a text file containing the list of users and passwords for authentication
    BalancerGrowth # 5 svE
    Number of additional Balancers that can be added Post-configuration
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerInherit On|Off On svE
    Inherit ProxyPassed Balancers/Workers from the main server
    BalancerMember [balancerurl] url [key=value [key=value ...]]dE
    Add a member to a load balancing group
    BalancerPersist On|Off Off svE
    Attempt to persist changes made by the Balancer Manager across restarts.
    BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables conditional on HTTP User-Agent
    CacheDirLevels levels 2 svE
    The number of levels of subdirectories in the cache.
    CacheDisable url-string | onsvdhE
    Disable caching of specified URLs
    CacheEnable cache_type [url-string]svdhE
    Enable caching of specified URLs using a specified storage +
    CacheEnable cache_type [url-string]svdE
    Enable caching of specified URLs using a specified storage manager
    CacheFile file-path [file-path] ...sX
    Cache a list of file handles at startup time
    CacheHeader on|off off svdhE
    Add an X-Cache header to the response.
    CacheRoot directorysvE
    The directory root under which cache files are stored
    CacheSocache type[:args]svE
    The shared object cache implementation to use
    CacheSocacheMaxSize bytes 102400 svdhE
    The maximum size (in bytes) of an entry to be placed in the +cache
    CacheSocacheMaxTime seconds 86400 svdhE
    The maximum time (in seconds) for a document to be placed in the +cache
    CacheSocacheMinTime seconds 600 svdhE
    The minimum time (in seconds) for a document to be placed in the +cache
    CacheSocacheReadSize bytes 0 svdhE
    The minimum size (in bytes) of the document to read and be cached + before sending the data downstream
    CacheSocacheReadTime milliseconds 0 svdhE
    The minimum time (in milliseconds) that should elapse while reading + before data is sent downstream
    CacheStaleOnError on|off on svdhE
    Serve stale content in place of 5xx responses.
    CacheStoreExpired On|Off Off svdhE
    Attempt to cache responses that the server reports as expired
    CacheStoreNoStore On|Off Off svdhE
    Attempt to cache requests or responses that have been marked as no-store.
    CacheStorePrivate On|Off Off svdhE
    Attempt to cache responses that the server has marked as private
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI +
    CGIDScriptTimeout time[s|ms]svdhB
    The length of time to wait for more output from the +CGI program
    CGIMapExtension cgi-path .extensiondhC
    Technique for locating the interpreter for CGI scripts
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling +
    CGIPassAuth On|Off Off dhC
    Enables passing HTTP authorization headers to scripts as CGI +variables
    CGIVar variable ruledhC
    Controls how some CGI variables are set
    CharsetDefault charsetsvdhE
    Charset to translate into
    CharsetOptions option [option] ... ImplicitAdd svdhE
    Configures charset translation behavior
    CharsetSourceEnc charsetsvdhE
    Source charset of files
    CheckCaseOnly on|off Off svdhE
    Limits the action of the speling module to case corrections
    CheckSpelling on|off Off svdhE
    Enables the spelling module
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response +
    ChrootDir /path/to/directorysB
    Directory for apache to run chroot(8) after startup.
    ContentDigest On|Off Off svdhC
    Enables the generation of Content-MD5 HTTP Response headers
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle - Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to +
    CookieDomain domainsvdhE
    The domain to which the tracking cookie applies
    CookieExpires expiry-periodsvdhE
    Expiry time for the tracking cookie
    CookieName token Apache svdhE
    Name of the tracking cookie
    CookieStyle + Netscape|Cookie|Cookie2|RFC2109|RFC2965 Netscape svdhE
    Format of the cookie header field
    CookieTracking on|off off svdhE
    Enables tracking cookie
    CoreDumpDirectory directorysM
    Directory where Apache HTTP Server attempts to switch before dumping core
    CustomLog file|pipe +
    CustomLog file|pipe format|nickname [env=[!]environment-variable| -expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on +expr=expression]svB
    Sets filename and format of log file
    Dav On|Off|provider-name Off dE
    Enable WebDAV HTTP methods
    DavDepthInfinity on|off off svdE
    Allow PROPFIND, Depth: Infinity requests
    DavGenericLockDB file-pathsvdE
    Location of the DAV lock database
    DavLockDB file-pathsvE
    Location of the DAV lock database
    DavMinTimeout seconds 0 svdE
    Minimum amount of time the server holds a lock on a DAV resource
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDExptime time-in-seconds 300 svE
    Keepalive time for idle connections
    DBDInitSQL "SQL statement"svE
    Execute an SQL statement after connecting to a database
    DBDKeep number 2 svE
    Maximum sustained number of connections
    DBDMax number 10 svE
    Maximum number of connections
    DBDMin number 1 svE
    Minimum number of connections
    DefaultLanguage language-tagsvdhB
    Defines a default language-tag to be sent in the Content-Language header field for all resources in the current context that have not been assigned a language-tag by some other means.
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings +
    DefaultRuntimeDir directory-path DEFAULT_REL_RUNTIME +sC
    Base directory for the server run-time files
    DefaultType media-type|none none svdhC
    This directive has no effect other than to emit warnings if the value is not none. In prior versions, DefaultType would specify a default media type to assign to response content for which no other media type configuration could be found.
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    Define parameter-name [parameter-value]svdC
    Define a variable
    DeflateBufferSize value 8096 svE
    Fragment size to be compressed at one time by zlib
    DeflateCompressionLevel valuesvE
    How much compression do we apply to the output
    DeflateFilterNote [type] notenamesvE
    Places the compression ratio in a note for logging
    DeflateInflateLimitRequestBodyvaluesvdhE
    Maximum size of inflated request bodies
    DeflateInflateRatioBurst valuesvdhE
    Maximum number of times the inflation ratio for request bodies + can be crossed
    DeflateInflateRatioLimit valuesvdhE
    Maximum inflation ratio for request bodies
    DeflateMemLevel value 9 svE
    How much memory should be used by zlib for compression
    DeflateWindowSize value 15 svE
    Zlib compression window size
    Deny from all|host|env=[!]env-variable @@ -352,105 +391,137 @@ server
    <Directory directory-path> ... </Directory>svC
    Enclose a group of directives that apply only to the named file-system directory, sub-directories, and their contents.
    DirectoryIndex - disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests +
    DirectoryCheckHandler On|Off Off svdhB
    Toggle how this module responds when another handler is configured
    DirectoryIndex + disabled | local-url [local-url] ... index.html svdhB
    List of resources to look for when the client requests a directory
    DirectoryIndexRedirect on | off | permanent | temp | seeother | +
    DirectoryIndexRedirect on | off | permanent | temp | seeother | 3xx-code - off svdhB
    Configures an external redirect for directory indexes. + off svdhB
    Configures an external redirect for directory indexes.
    <DirectoryMatch regex> -... </DirectoryMatch>svC
    Enclose directives that apply to +
    <DirectoryMatch regex> +... </DirectoryMatch>svC
    Enclose directives that apply to the contents of file-system directories matching a regular expression.
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path /usr/local/apache/h +svC
    Directory that forms the main document tree visible +
    DirectorySlash On|Off On svdhB
    Toggle trailing slash redirects on or off
    DocumentRoot directory-path "/usr/local/apache/ +svC
    Directory that forms the main document tree visible from the web
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a +
    DTracePrivileges On|Off Off sX
    Determines whether the privileges required by dtrace are enabled.
    DumpIOInput On|Off Off sE
    Dump all input data to the error log
    DumpIOOutput On|Off Off sE
    Dump all output data to the error log
    <Else> ... </Else>svdhC
    Contains directives that apply only if the condition of a previous <If> or <ElseIf> section is not satisfied by a request at runtime
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied +
    <ElseIf expression> ... </ElseIf>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime while the condition of a previous <If> or <ElseIf> section is not satisfied
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers +
    EnableExceptionHook On|Off Off sM
    Enables a hook that runs exception handlers after a crash
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client +
    EnableMMAP On|Off On svdhC
    Use memory-mapping to read files during delivery
    EnableSendfile On|Off Off svdhC
    Use the kernel sendfile support to deliver files to the client
    Error messagesvdhC
    Abort configuration parsing with a custom error message
    ErrorDocument error-code documentsvdhC
    What the server will return to the client in case of an error
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module +
    ErrorLog file-path|syslog[:facility] logs/error_log (Uni +svC
    Location where the server will log errors
    ErrorLogFormat [connection|request] formatsvC
    Format specification for error log entries
    ExamplesvdhX
    Demonstration directive to illustrate the Apache module API
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires +
    ExpiresActive On|Off Off svdhE
    Enables generation of Expires headers
    ExpiresByType MIME-type -<code>secondssvdhE
    Value of the Expires header configured +
    ExpiresByType MIME-type +<code>secondssvdhE
    Value of the Expires header configured by MIME type
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each +
    ExpiresDefault <code>secondssvdhE
    Default algorithm for calculating expiration time
    ExtendedStatus On|Off Off[*] sC
    Keep track of extended status information for each request
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag +
    ExtFilterDefine filtername parameterssE
    Define an external filter
    ExtFilterOptions option [option] ... NoLogStderr dE
    Configure mod_ext_filter options
    FallbackResource disabled | local-urlsvdhB
    Define a default URL for requests that don't map to a file
    FileETag component ... MTime Size svdhC
    File attributes used to create the ETag HTTP response header for static files
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched +
    <Files filename> ... </Files>svdhC
    Contains directives that apply to matched filenames
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched +
    <FilesMatch regex> ... </FilesMatch>svdhC
    Contains directives that apply to regular-expression matched filenames
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] - proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name - expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from +
    FilterChain [+=-@!]filter-name ...svdhB
    Configure the filter chain
    FilterDeclare filter-name [type]svdhB
    Declare a smart filter
    FilterProtocol filter-name [provider-name] + proto-flagssvdhB
    Deal with correct HTTP protocol handling
    FilterProvider filter-name provider-name + expressionsvdhB
    Register a content filter
    FilterTrace filter-name levelsvdB
    Get debug/diagnostic information from mod_filter
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not +
    ForceLanguagePriority None|Prefer|Fallback [Prefer|Fallback] Prefer svdhB
    Action to take if a single acceptable document is not found
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified +
    ForceType media-type|NonedhC
    Forces all matching files to be served with the specified media type in the HTTP Content-Type header field
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutDownTimeout secondssM
    Specify a timeout after which a gracefully shutdown server +
    ForensicLog filename|pipesvE
    Sets filename of the forensic log
    GlobalLogfile|pipe +format|nickname +[env=[!]environment-variable| +expr=expression]sB
    Sets filename and format of log file
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Directory to write gmon.out profiling data to.
    GracefulShutdownTimeout seconds 0 sM
    Specify a timeout after which a gracefully shutdown server will exit.
    Group unix-group #-1 sB
    Group under which the server will answer requests
    Header [condition] add|append|echo|edit|merge|set|unset -header [value] [early|env=[!]variable]svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top +
    H2CopyFiles on|off off svdhE
    Determine file handling in responses
    H2Direct on|off on for h2c, off for +svE
    H2 Direct Protocol Switch
    H2EarlyHints on|off off svE
    Determine sending of 103 status codes
    H2MaxSessionStreams n 100 svE
    Maximum number of active streams per HTTP/2 session.
    H2MaxWorkerIdleSeconds n 600 sE
    Maximum number of seconds h2 workers remain idle until shut down.
    H2MaxWorkers nsE
    Maximum number of worker threads to use per child process.
    H2MinWorkers nsE
    Minimal number of worker threads to use per child process.
    H2ModernTLSOnly on|off on svE
    Require HTTP/2 connections to be "modern TLS" only
    H2Push on|off on svE
    H2 Server Push Switch
    H2PushDiarySize n 256 svE
    H2 Server Push Diary Size
    H2PushPriority mime-type [after|before|interleaved] [weight] * After 16 svE
    H2 Server Push Priority
    H2PushResource [add] path [critical]svdhE
    Declares resources for early pushing to the client
    H2SerializeHeaders on|off off svE
    Serialize Request/Response Processing Switch
    H2SessionExtraFiles nsvE
    Number of Extra File Handles
    H2StreamMaxMemSize bytes 65536 svE
    Maximum amount of output data buffered per stream.
    H2TLSCoolDownSecs seconds 1 svE
    -
    H2TLSWarmUpSize amount 1048576 svE
    -
    H2Upgrade on|off on for h2c, off for +svE
    H2 Upgrade Protocol Switch
    H2WindowSize bytes 65535 svE
    Size of Stream Window for upstream data.
    Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP response headers
    HeaderName filenamesvdhB
    Name of the file that will be inserted at the top of the index listing
    sE
    Address to send heartbeat requests
    sE
    Address to listen for heartbeat requests
    HeartbeatStorage file-path logs/hb.dat sE
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sE
    Path to read heartbeat data
    HeartbeatAddress addr:portsX
    Multicast address for heartbeat packets
    HeartbeatListenaddr:portsX
    multicast address to listen for incoming heartbeat requests
    HeartbeatMaxServers number-of-servers 10 sX
    Specifies the maximum number of servers that will be sending +heartbeat requests to this server
    HeartbeatStorage file-path logs/hb.dat sX
    Path to store heartbeat data
    HeartbeatStorage file-path logs/hb.dat sX
    Path to read heartbeat data
    HostnameLookups On|Off|Double Off svdC
    Enables DNS lookups on client IP addresses
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote +
    HttpProtocolOptions [Strict|Unsafe] [RegisteredMethods|LenientMethods] + [Allow0.9|Require1.0] Strict LenientMetho +svC
    Modify restrictions on HTTP Request Messages
    IdentityCheck On|Off Off svdE
    Enables logging of the RFC 1413 identity of the remote user
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is +
    IdentityCheckTimeout seconds 30 svdE
    Determines the timeout duration for ident requests
    <If expression> ... </If>svdhC
    Contains directives that apply only if a condition is satisfied by a request at runtime
    <IfDefine [!]parameter-name> ... - </IfDefine>svdhC
    Encloses directives that will be processed only +
    <IfDefine [!]parameter-name> ... + </IfDefine>svdhC
    Encloses directives that will be processed only if a test is true at startup
    <IfModule [!]module-file|module-identifier> ... - </IfModule>svdhC
    Encloses directives that are processed conditional on the +
    <IfModule [!]module-file|module-identifier> ... + </IfModule>svdhC
    Encloses directives that are processed conditional on the presence or absence of a specific module
    <IfVersion [[!]operator] version> ... -</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates +
    <IfVersion [[!]operator] version> ... +</IfVersion>svdhE
    contains version dependent configuration
    ImapBase map|referer|URL http://servername/ svdhB
    Default base for imagemap files
    ImapDefault error|nocontent|map|referer|URL nocontent svdhB
    Default action when an imagemap is called with coordinates that are not explicitly mapped
    ImapMenu none|formatted|semiformatted|unformattedsvdhB
    Action if no coordinates are given when calling +
    ImapMenu none|formatted|semiformatted|unformatted formatted svdhB
    Action if no coordinates are given when calling an imagemap
    Include [optional|strict] file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +
    Include file-path|directory-path|wildcardsvdC
    Includes other configuration files from within +the server configuration files
    IncludeOptional file-path|directory-path|wildcardsvdC
    Includes other configuration files from within the server configuration files
    IndexHeadInsert "markup ..."svdhB
    Inserts text in the HEAD section of an index page.
    IndexIgnore file [file] ... "." svdhB
    Adds to the list of files to hide when listing @@ -482,7 +553,7 @@ requests on a persistent connection
    LanguagePriority MIME-lang [MIME-lang] -...svdhB
    The precendence of language variants for cases where +...svdhB
    The precedence of language variants for cases where the client does not express a preference
    LDAPCacheEntries number 1024 sE
    Maximum number of entries in the primary LDAP cache
    LDAPCacheTTL seconds 600 sE
    Time that cached items remain valid
    LDAPOpCacheTTL seconds 600 sE
    Time that entries in the operation cache remain valid
    LDAPReferralHopLimit numberdhE
    The maximum number of referral hops to chase before terminating an LDAP query.
    LDAPReferrals On|Off On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPReferrals On|Off|default On dhE
    Enable referral chasing during queries to the LDAP server.
    LDAPRetries number-of-retries 3 sE
    Configures the number of LDAP server retries.
    LDAPRetryDelay seconds 0 sE
    Configures the delay between LDAP server retries.
    LDAPSharedCacheFile directory-path/filenamesE
    Sets the shared memory cache file
    LDAPSharedCacheSize bytes 500000 sE
    Size in bytes of the shared-memory cache
    LDAPTimeout seconds 60 sE
    Specifies the timeout for LDAP search and bind operations, in seconds
    Listen [IP-address:]portnumber [protocol]sM
    IP addresses and ports that the server listens to
    ListenBacklog backlogsM
    Maximum length of the queue of pending connections
    LoadFile filename [filename] ...sE
    Link in the named object file or library
    LoadModule module filenamesE
    Links in the object file or library, and adds to the list +
    ListenCoresBucketsRatio ratio 0 (disabled) sM
    Ratio between the number of CPU cores (online) and the number of +listeners' buckets
    LoadFile filename [filename] ...svE
    Link in the named object file or library
    LoadModule module filenamesvE
    Links in the object file or library, and adds to the list of active modules
    <Location - URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching +
    <Location + URL-path|URL> ... </Location>svC
    Applies the enclosed directives only to matching URLs
    <LocationMatch - regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression +
    <LocationMatch + regex> ... </LocationMatch>svC
    Applies the enclosed directives only to regular-expression matching URLs
    LogFormat format|nickname -[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogFormat format|nickname +[nickname] "%h %l %u %t \"%r\" +svB
    Describes a format for use in a log file
    LogIOTrackTTFB ON|OFF OFF svdhE
    Enable tracking of time to first byte (TTFB)
    LogLevel [module:]level [module:level] ... warn svdC
    Controls the verbosity of the ErrorLog
    LogMessage message [hook=hook] [expr=expression] -dX
    Log userdefined message to error log +dX
    Log user-defined message to error log
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of request +
    LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesX
    Plug an authorization provider function into mod_authz_core +
    LuaCodeCache stat|forever|never stat svdhX
    Configure the compiled code cache.
    LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the access_checker phase of request processing
    LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the auth_checker phase of request processing
    LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhX
    Provide a hook for the check_user_id phase of request processing
    LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the fixups phase of a request +processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookLog /path/to/lua/script.lua log_function_namesvdhX
    Provide a hook for the access log phase of a request processing
    LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the insert_filter phase of request processing
    LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the map_to_storage phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svdX
    Provide a hook for the translate name phase of request processing
    LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svX
    Provide a hook for the translate name phase of request processing
    LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhX
    Provide a hook for the type_checker phase of request processing
    LuaInherit none|parent-first|parent-last parent-first svdhX
    Controls how parent configuration sections are merged into children
    LuaInputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content input filtering
    LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhX
    Map a path to a lua handler
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    svdhX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|server [max|min max] once svdhX
    One of once, request, conn, server -- default is once
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server +
    LuaOutputFilter filter_name /path/to/lua/script.lua function_namesX
    Provide a Lua function for content output filtering
    LuaPackageCPath /path/to/include/?.soasvdhX
    Add a directory to lua's package.cpath
    LuaPackagePath /path/to/include/?.luasvdhX
    Add a directory to lua's package.path
    LuaQuickHandler /path/to/script.lua hook_function_namesvX
    Provide a hook for the quick handler of request processing
    LuaRoot /path/to/a/directorysvdhX
    Specify the base path for resolving relative paths for mod_lua directives
    LuaScope once|request|conn|thread|server [min] [max] once svdhX
    One of once, request, conn, thread -- default is once
    +<Macro name [par1 .. parN]> +... </Macro>svdB
    Define a configuration file macro
    MaxConnectionsPerChild number 0 sM
    Limit on the number of connections that an individual child server will handle during its life
    MaxKeepAliveRequests number 100 svC
    Number of requests allowed on a persistent connection
    MaxMemFree KBytes 0 sM
    Maximum amount of memory that the main allocator is allowed +
    MaxMemFree KBytes 2048 sM
    Maximum amount of memory that the main allocator is allowed to hold without calling free()
    MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdC
    Number of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource
    MaxSpareServers number 10 sM
    Maximum number of idle child server processes
    MaxSpareThreads numbersM
    Maximum number of idle threads
    MaxThreads number 2048 sM
    Set the maximum number of worker threads
    MemcacheConnTTL num[units] 15s svE
    Keepalive time for idle connections
    MergeTrailers [on|off] off svC
    Determines whether trailers are merged into headers
    MetaDir directory .web svdhE
    Name of the directory to find CERN-style meta information files
    MetaFiles on|off off svdhE
    Activates CERN meta-file processing
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containg CERN-style +
    MetaSuffix suffix .meta svdhE
    File name suffix for the file containing CERN-style meta information
    MimeMagicFile file-pathsvE
    Enable MIME-type determination based on file contents using the specified magic file
    MinSpareThreads numbersM
    Minimum number of idle threads available to handle request spikes
    MMapFile file-path [file-path] ...sX
    Map a list of files into memory at startup time
    ModemStandard V.21|V.26bis|V.32|V.92X
    Modem standard to simulate
    ModemStandard V.21|V.26bis|V.32|V.34|V.92dX
    Modem standard to simulate
    ModMimeUsePathInfo On|Off Off dB
    Tells mod_mime to treat path_info components as part of the filename
    MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers @@ -612,10 +700,12 @@ evaluated.
    svdhB
    Passes environment variables from the shell
    PidFile filename logs/httpd.pid sM
    File where the server records the process ID of the daemon
    PrivilegesMode FAST|SECURE|SELECTIVEsvdX
    Trade off processing speed and efficiency vs security against +
    PrivilegesMode FAST|SECURE|SELECTIVE FAST svdX
    Trade off processing speed and efficiency vs security against malicious privileges-aware code.
    Protocol protocolsvC
    Protocol for a listening socket
    ProtocolEcho On|Off Off svX
    Turn the echo server on or off
    Protocols protocol ... http/1.1 svC
    Protocols available for a server/virtual host
    ProtocolsHonorOrder On|Off On svC
    Determines if order of Protocols determines precedence during negotiation
    <Proxy wildcard-url> ...</Proxy>svE
    Container for directives applied to proxied resources
    ProxyAddHeaders Off|On On svdE
    Add proxy information in X-Forwarded-* headers
    ProxyBadHeader IsError|Ignore|StartBody IsError svE
    Determines how to handle bad header lines in a @@ -631,20 +721,25 @@ proxied
    ProxyFtpDirCharset character set ISO-8859-1 svdE
    Define the character set for proxied FTP listings
    ProxyFtpEscapeWildcards [on|off]svdE
    Whether wildcards in requested filenames are escaped when sent to the FTP server
    ProxyFtpListOnWildcard [on|off]svdE
    Whether wildcards in requested filenames trigger a file listing
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and +
    ProxyHCExpr name {ap_expr expression}svE
    Creates a named condition expression to use to determine health of the backend based on its response.
    ProxyHCTemplate name parameter=setting <...>svE
    Creates a named template for setting various health check parameters
    ProxyHCTPsize <size>svE
    Sets the size of the threadpool used for the health check workers.
    ProxyHTMLBufSize bytessvdB
    Sets the buffer size increment for buffering inline scripts and stylesheets.
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|OffsvdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|OffsvdB
    Determines whether to fix links in inline scripts, stylesheets, +
    ProxyHTMLCharsetOut Charset | *svdB
    Specify a charset for mod_proxy_html output.
    ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdB
    Sets an HTML or XHTML document type declaration.
    ProxyHTMLEnable On|Off Off svdB
    Turns the proxy_html filter on or off.
    ProxyHTMLEvents attribute [attribute ...]svdB
    Specify attributes to treat as scripting events.
    ProxyHTMLExtended On|Off Off svdB
    Determines whether to fix links in inline scripts, stylesheets, and scripting events.
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|OffsvdB
    Enables per-request interpolation of +
    ProxyHTMLFixups [lowercase] [dospath] [reset]svdB
    Fixes for simple HTML errors.
    ProxyHTMLInterp On|Off Off svdB
    Enables per-request interpolation of ProxyHTMLURLMap rules.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLStripComments On|OffsvdB
    Determines whether to strip HTML comments.
    ProxyHTMLLinks element attribute [attribute2 ...]svdB
    Specify HTML elements that have URL attributes to be rewritten.
    ProxyHTMLMeta On|Off Off svdB
    Turns on or off extra pre-parsing of metadata in HTML +<head> sections.
    ProxyHTMLStripComments On|Off Off svdB
    Determines whether to strip HTML comments.
    ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdB
    Defines a rule to rewrite HTML links
    ProxyIOBufferSize bytes 8192 svE
    Determine size of internal data throughput buffer
    <ProxyMatch regex> ...</ProxyMatch>svE
    Container for directives applied to regular-expression-matched @@ -652,41 +747,44 @@ proxied resources
    ProxyMaxForwards number -1 svE
    Maximium number of proxies that a request can be forwarded through
    ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value - [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url -[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse + [key=value ...]] [nocanon] [interpolate] [noquery]svdE
    Maps remote servers into the local server URL-space
    ProxyPassInherit On|Off On svE
    Inherit ProxyPass directives defined from the main server
    ProxyPassInterpolateEnv On|Off Off svdE
    Enable Environment Variable interpolation in Reverse Proxy configurations
    ProxyPassMatch [regex] !|url [key=value + [key=value ...]]svdE
    Maps remote servers into the local server URL-space using regular expressions
    ProxyPassReverse [path] url +[interpolate]svdE
    Adjusts the URL in HTTP response headers sent from a reverse proxied server
    ProxyPassReverseCookieDomain internal-domain -public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookieDomain internal-domain +public-domain [interpolate]svdE
    Adjusts the Domain string in Set-Cookie headers from a reverse- proxied server
    ProxyPassReverseCookiePath internal-path -public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- +
    ProxyPassReverseCookiePath internal-path +public-path [interpolate]svdE
    Adjusts the Path string in Set-Cookie headers from a reverse- proxied server
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy +
    ProxyPreserveHost On|Off Off svdE
    Use incoming Host HTTP request header for proxy request
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP +
    ProxyReceiveBufferSize bytes 0 svE
    Network buffer size for proxied HTTP and FTP connections
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular +
    ProxyRemote match remote-serversvE
    Remote proxy used to handle certain requests
    ProxyRemoteMatch regex remote-serversvE
    Remote proxy used to handle requests matched by regular expressions
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off On svdE
    Enable or disable internal redirect responses from the +
    ProxyRequests On|Off Off svE
    Enables forward (standard) proxy requests
    ProxySCGIInternalRedirect On|Off|Headername On svdE
    Enable or disable internal redirect responses from the backend
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response +
    ProxySCGISendfile On|Off|Headername Off svdE
    Enable evaluation of X-Sendfile pseudo response header
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response +
    ProxySet url key=value [key=value ...]dE
    Set various Proxy balancer or member parameters
    ProxySourceAddress addresssvE
    Set local IP address for outgoing proxy connections
    ProxyStatus Off|On|Full Off svE
    Show Proxy LoadBalancer status in mod_status
    ProxyTimeout secondssvE
    Network timeout for proxied requests
    ProxyVia On|Off|Full|Block Off svE
    Information provided in the Via HTTP response header for proxied requests
    QualifyRedirectURL ON|OFF OFF svdC
    Controls whether the REDIRECT_URL environment variable is + fully qualified
    ReadmeName filenamesvdhB
    Name of the file that will be inserted at the end of the index listing
    ReceiveBufferSize bytes 0 sM
    TCP receive buffer size
    Redirect [status] URL-path +
    Redirect [status] [URL-path] URLsvdhB
    Sends an external redirect asking the client to fetch a different URL
    RedirectMatch [status] regex @@ -697,112 +795,116 @@ a different URL
    RedirectTemp URL-path URLsvdhB
    Sends an external temporary redirect asking the client to fetch a different URL
    ReflectorHeader inputheader [outputheader]svdhB
    Reflect an input header to the output headers
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for client IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] -...vdhB
    Removes any character set associations for a set of file +
    RegisterHttpMethod method [method [...]]sC
    Register non-standard HTTP methods
    RemoteIPHeader header-fieldsvB
    Declare the header field which should be parsed for useragent IP addresses
    RemoteIPInternalProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPInternalProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPProxiesHeader HeaderFieldNamesvB
    Declare the header field which will record all intermediate IP addresses
    RemoteIPTrustedProxy proxy-ip|proxy-ip/subnet|hostname ...svB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoteIPTrustedProxyList filenamesvB
    Declare client intranet IP addresses trusted to present the RemoteIPHeader value
    RemoveCharset extension [extension] +...vdhB
    Removes any character set associations for a set of file extensions
    RemoveEncoding extension [extension] -...vdhB
    Removes any content encoding associations for a set of file +
    RemoveEncoding extension [extension] +...vdhB
    Removes any content encoding associations for a set of file extensions
    RemoveHandler extension [extension] -...vdhB
    Removes any handler associations for a set of file +
    RemoveHandler extension [extension] +...vdhB
    Removes any handler associations for a set of file extensions
    RemoveInputFilter extension [extension] -...vdhB
    Removes any input filter associations for a set of file +
    RemoveInputFilter extension [extension] +...vdhB
    Removes any input filter associations for a set of file extensions
    RemoveLanguage extension [extension] -...vdhB
    Removes any language associations for a set of file +
    RemoveLanguage extension [extension] +...vdhB
    Removes any language associations for a set of file extensions
    RemoveOutputFilter extension [extension] -...vdhB
    Removes any output filter associations for a set of file +
    RemoveOutputFilter extension [extension] +...vdhB
    Removes any output filter associations for a set of file extensions
    RemoveType extension [extension] -...vdhB
    Removes any content type associations for a set of file +
    RemoveType extension [extension] +...vdhB
    Removes any content type associations for a set of file extensions
    RequestHeader add|append|edit|edit*|merge|set|unset header -[value] [replacement] [early|env=[!]variable]svdhE
    Configure HTTP request headers
    RequestReadTimeout +
    RequestHeader add|append|edit|edit*|merge|set|setifempty|unset +header [[expr=]value [replacement] +[early|env=[!]varname|expr=expression]] +svdhE
    Configure HTTP request headers
    RequestReadTimeout [header=timeout[-maxtimeout][,MinRate=rate] [body=timeout[-maxtimeout][,MinRate=rate] -svE
    Set timeout values for receiving request headers and body from client. +svE
    Set timeout values for receiving request headers and body from client.
    Require [not] entity-name - [entity-name] ...dhB
    Tests whether an authenticated user is authorized by +
    Require [not] entity-name + [entity-name] ...dhB
    Tests whether an authenticated user is authorized by an authorization provider.
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none +
    <RequireAll> ... </RequireAll>dhB
    Enclose a group of authorization directives of which none must fail and at least one must succeed for the enclosing directive to succeed.
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one +
    <RequireAny> ... </RequireAny>dhB
    Enclose a group of authorization directives of which one must succeed for the enclosing directive to succeed.
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none +
    <RequireNone> ... </RequireNone>dhB
    Enclose a group of authorization directives of which none must succeed for the enclosing directive to not fail.
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond - TestString CondPatternsvdhE
    Defines a condition under which rewriting will take place +
    RewriteBase URL-pathdhE
    Sets the base URL for per-directory rewrites
    RewriteCond + TestString CondPattern [flags]svdhE
    Defines a condition under which rewriting will take place
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource -svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule - Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched +
    RewriteEngine on|off off svdhE
    Enables or disables runtime rewriting engine
    RewriteMap MapName MapType:MapSource +svE
    Defines a mapping function for key-lookup
    RewriteOptions OptionssvdhE
    Sets some special options for the rewrite engine
    RewriteRule + Pattern Substitution [flags]svdhE
    Defines rules for the rewriting engine
    RLimitCPU seconds|max [seconds|max]svdhC
    Limits the CPU consumption of processes launched by Apache httpd children
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched +
    RLimitMEM bytes|max [bytes|max]svdhC
    Limits the memory consumption of processes launched by Apache httpd children
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by +
    RLimitNPROC number|max [number|max]svdhC
    Limits the number of processes that can be launched by processes launched by Apache httpd children
    Satisfy Any|All All dhE
    Interaction between host-level access control and +
    Satisfy Any|All All dhE
    Interaction between host-level access control and user authentication
    ScoreBoardFile file-path logs/apache_status sM
    Location of the file used to store coordination data for +
    ScoreBoardFile file-path logs/apache_runtime +sM
    Location of the file used to store coordination data for the child processes
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request +
    Script method cgi-scriptsvdB
    Activates a CGI script for a particular request method.
    ScriptAlias URL-path -file-path|directory-pathsvB
    Maps a URL to a filesystem location and designates the +
    ScriptAlias [URL-path] +file-path|directory-pathsvdB
    Maps a URL to a filesystem location and designates the target as a CGI script
    ScriptAliasMatch regex -file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression +
    ScriptAliasMatch regex +file-path|directory-pathsvB
    Maps a URL to a filesystem location using a regular expression and designates the target as a CGI script
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI +
    ScriptInterpreterSource Registry|Registry-Strict|Script Script svdhC
    Technique for locating the interpreter for CGI scripts
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded +
    ScriptLog file-pathsvB
    Location of the CGI script error logfile
    ScriptLogBuffer bytes 1024 svB
    Maximum amount of PUT or POST requests that will be recorded in the scriptlog
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path logs/cgisock sB
    The filename prefix of the socket to use for communication with +
    ScriptLogLength bytes 10385760 svB
    Size limit of the CGI script logfile
    ScriptSock file-path cgisock sB
    The filename prefix of the socket to use for communication with the cgi daemon
    SecureListen [IP-address:]portnumber -Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters +
    SecureListen [IP-address:]portnumber +Certificate-Name [MUTUAL]sB
    Enables SSL encryption for the specified port
    SeeRequestTail On|Off Off sC
    Determine if mod_status displays the first 63 characters of a request or the last 63, assuming the request itself is greater than 63 chars.
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error +
    SendBufferSize bytes 0 sM
    TCP buffer size
    ServerAdmin email-address|URLsvC
    Email address that the server includes in error messages sent to the client
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests +
    ServerAlias hostname [hostname] ...vC
    Alternate names for a host used when matching requests to name-virtual hosts
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]fully-qualified-domain-name[:port]svC
    Hostname and port that the server uses to identify +
    ServerLimit numbersM
    Upper limit on configurable number of processes
    ServerName [scheme://]domain-name|ip-address[:port]svC
    Hostname and port that the server uses to identify itself
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that +
    ServerPath URL-pathvC
    Legacy URL pathname for a name-based virtual host that is accessed by an incompatible browser
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response +
    ServerRoot directory-path /usr/local/apache sC
    Base directory for the server installation
    ServerSignature On|Off|EMail Off svdhC
    Configures the footer on server-generated documents
    ServerTokens Major|Minor|Min[imal]|Prod[uctOnly]|OS|Full Full sC
    Configures the Server HTTP response header
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    Session On|Off Off svdhE
    Enables a session for the current directory or location
    SessionCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session
    SessionCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session
    SessionCookieRemove On|Off Off svdhE
    Control for whether session cookies should be removed from incoming HTTP headers
    SessionCryptoCipher namesvdhX
    The crypto cipher to be used to encrypt the session
    SessionCryptoDriver name [param[=value]]sX
    The crypto driver to be used to encrypt the session
    SessionCryptoPassphrase secret [ secret ... ] svdhX
    The key used to encrypt the session
    SessionCryptoPassphraseFile filenamesvdX
    File containing keys used to encrypt the session
    SessionDBDCookieName name attributessvdhE
    Name and attributes for the RFC2109 cookie storing the session ID
    SessionDBDCookieName2 name attributessvdhE
    Name and attributes for the RFC2965 cookie storing the session ID
    SessionDBDCookieRemove On|Off On svdhE
    Control for whether session ID cookies should be removed from incoming HTTP headers
    SessionHeader headersvdhE
    Import session updates from a given HTTP response header
    SessionInclude pathsvdhE
    Define URL prefixes for which a session is valid
    SessionMaxAge maxage 0 svdhE
    Define a maximum age in seconds for a session
    SetEnv env-variable valuesvdhB
    Sets environment variables
    SetEnv env-variable [value]svdhB
    Sets environment variables
    SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...svdhB
    Sets environment variables based on attributes of the request @@ -829,69 +931,74 @@ header
    svdhB
    Sets environment variables based on attributes of the request without respect to case
    SetHandler handler-name|NonesvdhC
    Forces all matching files to be processed by a +
    SetHandler handler-name|none|expressionsvdhC
    Forces all matching files to be processed by a handler
    SetInputFilter filter[;filter...]svdhC
    Sets the filters that will process client requests and POST input
    SetOutputFilter filter[;filter...]svdhC
    Sets the filters that will process responses from the server
    SSIAccessEnable on|off off dhB
    Enable the -A flag in legacy conditional expressions.
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI +
    SSIEndTag tag "-->" svB
    String that ends an include element
    SSIErrorMsg message "[an error occurred +svdhB
    Error message displayed when there is an SSI error
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the +
    SSIETag on|off off dhB
    Controls whether ETags are generated by the server.
    SSILastModified on|off off dhB
    Controls whether Last-Modified headers are generated by the server.
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are +
    SSILegacyExprParser on|off off dhB
    Enable compatibility mode for conditional expressions.
    SSIStartTag tag "<!--#" svB
    String that starts an include element
    SSITimeFormat formatstring "%A, %d-%b-%Y %H:%M +svdhB
    Configures the format in which date strings are displayed
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSIUndefinedEcho string "(none)" svdhB
    String displayed when an unset variable is echoed
    SSLCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Client Auth
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Client Auth
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLCADNRequestFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for defining acceptable CA names
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLCADNRequestPath directory-pathsvE
    Directory of PEM-encoded CA Certificates for defining acceptable CA names
    SSLCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLCARevocationCheck chain|leaf|none flags none svE
    Enable CRL-based revocation checking
    SSLCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Client Auth
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Client Auth
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 Certificate file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded Private Key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL +
    SSLCertificateChainFile file-pathsvE
    File of PEM-encoded Server CA Certificates
    SSLCertificateFile file-pathsvE
    Server PEM-encoded X.509 certificate data file
    SSLCertificateKeyFile file-pathsvE
    Server PEM-encoded private key file
    SSLCipherSuite cipher-spec DEFAULT (depends on +svdhE
    Cipher Suite available for negotiation in SSL handshake
    SSLCompression on|off off svE
    Enable compression on the SSL level
    SSLCryptoDevice engine builtin sE
    Enable use of a cryptographic hardware accelerator
    SSLEngine on|off|optional off svE
    SSL Engine Operation Switch
    SSLFIPS on|off off sE
    SSL FIPS mode Switch
    SSLHonorCipherOrder flagsvE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation flag off svE
    Option to enable support for insecure renegotiation
    SSLHonorCipherOrder on|off off svE
    Option to prefer the server's cipher preference order
    SSLInsecureRenegotiation on|off off svE
    Option to enable support for insecure renegotiation
    SSLOCSDefaultResponder urisvE
    Set the default responder URI for OCSP validation
    SSLOCSPEnable flagsvE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder flagsvE
    Force use of the default responder URI for OCSP validation
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private +
    SSLOCSPEnable on|off off svE
    Enable OCSP validation of the client certificate chain
    SSLOCSPOverrideResponder on|off off svE
    Force use of the default responder URI for OCSP validation
    SSLOCSPProxyURL urlsvE
    Proxy URL to use for OCSP requests
    SSLOCSPResponderTimeout seconds 10 svE
    Timeout for OCSP queries
    SSLOCSPResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP responses
    SSLOCSPResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP response validation
    SSLOCSPUseRequestNonce on|off on svE
    Use a nonce within OCSP queries
    SSLOpenSSLConfCmd command-name command-valuesvE
    Configure OpenSSL parameters through its SSL_CONF API
    SSLOptions [+|-]option ...svdhE
    Configure various SSL engine run-time options
    SSLPassPhraseDialog type builtin sE
    Type of pass phrase dialog for encrypted private keys
    SSLProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates +
    SSLProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL/TLS protocol versions
    SSLProxyCACertificateFile file-pathsvE
    File of concatenated PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for +
    SSLProxyCACertificatePath directory-pathsvE
    Directory of PEM-encoded CA Certificates for Remote Server Auth
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for +
    SSLProxyCARevocationCheck chain|leaf|none none svE
    Enable CRL-based revocation checking for Remote Server Auth
    SSLProxyCARevocationFile file-pathsvE
    File of concatenated PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for +
    SSLProxyCARevocationPath directory-pathsvE
    Directory of PEM-encoded CA CRLs for Remote Server Auth
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificates CN field +
    SSLProxyCheckPeerCN on|off on svE
    Whether to check the remote server certificate's CN field +
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired
    SSLProxyCheckPeerExpire on|off on svE
    Whether to check if remote server certificate is expired +
    SSLProxyCheckPeerName on|off on svE
    Configure host name checking for remote server certificates
    SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhE
    Cipher Suite available for negotiation in SSL proxy handshake
    SSLProxyMachineCertificateChainFile filenamesE
    File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate
    SSLProxyMachineCertificateFile filenamesE
    File of concatenated PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyMachineCertificatePath directorysE
    Directory of PEM-encoded client certificates and keys to be used by the proxy
    SSLProxyProtocol [+|-]protocol ... all svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyProtocol [+|-]protocol ... all -SSLv3 (up to 2 +svE
    Configure usable SSL protocol flavors for proxy usage
    SSLProxyVerify level none svE
    Type of remote server Certificate verification
    SSLProxyVerifyDepth number 1 svE
    Maximum depth of CA Certificates in Remote Server Certificate verification
    SSLSessionCacheTimeout seconds 300 svE
    Number of seconds before an SSL session expires in the Session Cache
    SSLSessionTicketKeyFile file-pathsvE
    Persistent encryption/decryption key for TLS session tickets
    SSLSessionTickets on|off on svE
    Enable or disable use of TLS session tickets
    SSLSRPUnknownUserSeed secret-stringsvE
    SRP unknown user seed
    SSLSRPVerifierFile file-pathsvE
    Path to SRP verifier file
    SSLStaplingCache typesE
    Configures the OCSP stapling cache
    SSLStaplingErrorCacheTimeout seconds 600 svE
    Number of seconds before expiring invalid responses in the OCSP stapling cache
    SSLStaplingFakeTryLater on|off on svE
    Synthesize "tryLater" responses for failed OCSP stapling queries
    StartServers numbersM
    Number of child server processes created at startup
    StartThreads numbersM
    Number of threads created on startup
    Substitute s/pattern/substitution/[infq]dhE
    Pattern to filter the response content
    SubstituteInheritBefore on|off off dhE
    Change the merge order of inherited patterns
    SubstituteMaxLineLength bytes(b|B|k|K|m|M|g|G) 1m dhE
    Set the maximum line size
    Suexec On|OffsB
    Enable or disable the suEXEC feature
    SuexecUserGroup User GroupsvE
    User and group for CGI programs to run as
    ThreadLimit numbersM
    Sets the upper limit on the configurable number of threads @@ -948,8 +1061,11 @@ certain events before failing a request
    TransferLog file|pipesvB
    Specify location of a log file
    TypesConfig file-path conf/mime.types sB
    The location of the mime.types file
    UnDefine parameter-namesC
    Undefine the existence of a variable
    UnsetEnv env-variable [env-variable] -...svdhB
    Removes variables from the environment
    UndefMacro namesvdB
    Undefine a macro
    UnsetEnv env-variable [env-variable] +...svdhB
    Removes variables from the environment
    Use name [value1 ... valueN] +svdB
    Use a macro
    UseCanonicalName On|Off|DNS Off svdC
    Configures how the server determines its own name and port
    UseCanonicalPhysicalPort On|Off Off svdC
    Configures how the server determines its own port
    VirtualScriptAlias interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the cgi directory for +
    VirtualScriptAliasIP interpolated-directory|none none svE
    Dynamically configure the location of the CGI directory for a given virtual host
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit +
    WatchdogInterval number-of-seconds 1 sB
    Watchdog interval in seconds
    XBitHack on|off|full off svdhB
    Parse SSI directives in files with the execute bit set
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information +
    xml2EncAlias charset alias [alias ...]sB
    Recognise Aliases for encoding values
    xml2EncDefault namesvdhB
    Sets a default encoding to assume when absolutely no information can be automatically detected
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.
    xml2StartParse element [element ...]svdhB
    Advise the parser to skip leading junk.

    可用语言:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  |  zh-cn 

    -
    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/quickreference.xml.de b/docs/manual/mod/quickreference.xml.de index 7e86075186b..621b86f2cd0 100644 --- a/docs/manual/mod/quickreference.xml.de +++ b/docs/manual/mod/quickreference.xml.de @@ -1,7 +1,7 @@ - + + + + - Guía Rápida de Referencia de Directivas + Guía Rápida de Referencia de Directivas -

    La Guía Rápida de Referencia de Directivas muestra el uso, las +

    La Guía Rápida de Referencia de Directivas muestra el uso, las opciones por defecto, el estado y el contexto de cada directiva de - configuración de Apache. Para más información sobre cada + configuración de Apache. Para más información sobre cada directiva, consulte el Diccionario de Directivas.

    La primera columna muestra el nombre y el uso de la directiva. La segunda columna muestra el valor por defecto de la directiva, si existe ese valor por defecto. Si el valor por defecto es - demasiado largo para mostrarlo, el primer caracter va seguido de + demasiado largo para mostrarlo, el primer carácter va seguido de un signo "+".

    La tercera y la cuarta columna listan los contextos en los que la directiva puede funcionar y el estado de la directiva de - acuerdo con las notas que detallan más abajo.

    + acuerdo con las notas que detallan más abajo.

    diff --git a/docs/manual/mod/quickreference.xml.fr b/docs/manual/mod/quickreference.xml.fr new file mode 100644 index 00000000000..9fd77b292a5 --- /dev/null +++ b/docs/manual/mod/quickreference.xml.fr @@ -0,0 +1,44 @@ + + + + + + + + + + + Document de référence rapide des directives + +

    Le document de référence rapide des directives montre l'usage, + les valeurs par défaut, le statut, + et le contexte de chaque directive de configuration d'Apache. Pour plus + d'informations sur chacun de ces termes, voir le Dictionnaire des directives.

    + +

    La première colonne donne le nom de la directive et son usage. + Si la directive possède une valeur par défaut, elle est indiquée dans la + deuxième colonne. + Si la valeur par défaut est trop grande pour pouvoir être affichée, + elle sera tronquée et suivie d'un "+".

    + +

    La troisième colonne énumère les contextes dans + lesquels la directive est applicable, et la quatrième indique son statut en accord avec le + tableau des légendes ci-dessous.

    +
    +
    diff --git a/docs/manual/mod/quickreference.xml.ja b/docs/manual/mod/quickreference.xml.ja index d016d935e91..e93f89fa777 100644 --- a/docs/manual/mod/quickreference.xml.ja +++ b/docs/manual/mod/quickreference.xml.ja @@ -1,7 +1,7 @@ - + + + -worker - Apache HTTP Server +worker - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4 > Module

    Apache-MPM worker

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    @@ -50,7 +56,10 @@ maximale Gesamtzahl an Threads regelt, die gestartet werden knnen.

    -
    top

    Arbeitsweise

    @@ -165,9 +171,31 @@

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/worker.html.en b/docs/manual/mod/worker.html.en index bbad246eaf7..1250e998a13 100644 --- a/docs/manual/mod/worker.html.en +++ b/docs/manual/mod/worker.html.en @@ -1,28 +1,34 @@ - -worker - Apache HTTP Server +worker - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 > Modules

    Apache MPM worker

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    @@ -47,7 +53,10 @@ controls the maximum total number of threads that may be launched.

    -
    top

    How it Works

    @@ -90,7 +96,7 @@ idle server threads, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new threads or processes to be created before their requests can be - served. The number of processes that will initially launched is + served. The number of processes that will initially launch is set by the StartServers directive. During operation, the server assesses the total number of idle threads in all processes, and forks or kills processes to @@ -102,17 +108,17 @@ MaxRequestWorkers directive. The maximum number of active child processes is determined by the MaxRequestWorkers - directive divided by the + directive divided by the ThreadsPerChild directive.

    Two directives set hard limits on the number of active child processes and the number of server threads in a child process, and can only be changed by fully stopping the server and then - starting it again. ServerLimit + starting it again. ServerLimit is a hard limit on the number of active child processes, and must be greater than or equal to the MaxRequestWorkers - directive divided by the + directive divided by the ThreadsPerChild directive. ThreadLimit is a hard limit of the number of server threads, and must be greater than @@ -128,10 +134,10 @@ the following:

    @@ -139,14 +145,13 @@

    A typical configuration of the process-thread controls in the worker MPM could look as follows:

    -

    - ServerLimit 16
    - StartServers 2
    - MaxRequestWorkers 150
    - MinSpareThreads 25
    - MaxSpareThreads 75
    - ThreadsPerChild 25 -

    +
    ServerLimit         16
    +StartServers         2
    +MaxRequestWorkers  150
    +MinSpareThreads     25
    +MaxSpareThreads     75
    +ThreadsPerChild     25
    +

    While the parent process is usually started as root under Unix in order to bind to port 80, the child processes and threads @@ -173,9 +178,31 @@

    Available Languages:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/worker.html.fr b/docs/manual/mod/worker.html.fr new file mode 100644 index 00000000000..fe37c7130af --- /dev/null +++ b/docs/manual/mod/worker.html.fr @@ -0,0 +1,212 @@ + + + + + +worker - Serveur Apache HTTP Version 2.4 + + + + + + + + +
    <-
    + +
    +

    Apache MPM worker

    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    + + + +
    Description:Module multi-processus implmentant un serveur web hybride +multi-processus multi-thread
    Statut:MPM
    IdentificateurdeModule:mpm_worker_module
    FichierSource:worker.c
    +

    Sommaire

    + +

    Ce module multi-processus (MPM) implmente un serveur hybride + multi-processus multi-thread. En utilisant les threads pour servir + les requtes, il peut en traiter un grand nombre tout en consommant + moins de ressources qu'un serveur base de processus. Cependant, il + conserve une grande partie de la stabilit d'un serveur base de + processus en maintenant plusieurs processus disponibles, chacun de + ces derniers possdant de nombreux threads.

    + +

    Les directives les plus importantes qui permettent de contrler + ce MPM sont ThreadsPerChild, qui dfinit le + nombre de threads lancs par chaque processus enfant et MaxRequestWorkers, qui dfinit le nombre + global maximum de threads qui peuvent tre lancs.

    +
    + +
    top
    +
    +

    Comment a marche

    +

    Un processus de contrle unique (le parent) a pour tche de + lancer les processus enfants. Chaque processus enfant cre un nombre + fixe de threads serveurs selon la valeur de la directive ThreadsPerChild, ainsi + qu'un thread charg d'attendre les connexions et de les passer un + thread serveur pour traitement au fur et mesure de leur arrive.

    + +

    Le serveur HTTP Apache essaie toujours de maintenir un jeu de + threads serveurs + inactifs ou en rserve, qui se tiennent prts traiter + les requtes entrantes. De cette faon, les clients n'ont pas besoin + d'attendre la cration d'un nouveau thread ou d'un nouveau processus + pour que leurs requtes puissent tre traites. Le nombre de + processus lancs initialement est dfini par la directive StartServers. En cours de + fonctionnement, le serveur value le nombre total de threads inactifs + dans tous les processus, et en cre ou en arrte de faon + maintenir ce nombre l'intrieur des limites dfinies par les + directives MinSpareThreads et MaxSpareThreads. Comme ce module + s'auto-contrle de manire efficace, on peut en gnral conserver + les valeurs par dfaut. Le nombre maximum de clients pouvant tre + servis simultanment (c'est dire le nombre global maximum de + threads pour tous les processus) est dfini par la directive + MaxRequestWorkers. Le nombre + maximum de processus enfants actifs est dfini par la valeur de la + directive MaxRequestWorkers + divise par la valeur de la directive + ThreadsPerChild.

    + +

    Deux directives permettent de fixer des limites absolues pour le + nombre de processus enfants actifs et le nombre de threads serveurs + par processus enfant, et ne peuvent tre modifies qu'en + arrtant compltement le serveur et en le dmarrant nouveau. + La valeur de la directive ServerLimit constitue une limite + absolue pour le nombre de processus enfants actifs, et doit tre + suprieure ou gale la valeur de la directive MaxRequestWorkers divise par la valeur de + la directive + ThreadsPerChild. La valeur de la directive ThreadLimit constitue une limite + absolue pour le nombre de threads par processus enfant, et doit tre + suprieure ou gale la valeur de la directive ThreadsPerChild.

    + +

    En plus du jeu de processus enfants actifs, il peut exister + quelques processus enfants en cours d'arrt, mais dont au moins un + thread serveur est encore en train de traiter une connexion client + existante. Il peut subsister en thorie jusqu' MaxRequestWorkers processus en cours + d'arrt, bien qu'en ralit, ce nombre sera en gnral beaucoup plus + petit. Ce comportement peut tre vit en dsactivant l'arrt de + processus enfants individuels de la manire suivante :

    + + + +

    Voici un exemple typique de configuration du contrle + processus-thread pour le MPM worker :

    + +
    ServerLimit         16
    +StartServers         2
    +MaxRequestWorkers  150
    +MinSpareThreads     25
    +MaxSpareThreads     75
    +ThreadsPerChild     25
    + + +

    Alors que le processus parent est en gnral dmarr en tant que + root sous Unix afin de se mettre en coute du port 80, + les processus enfants et les threads sont lancs par le serveur sous un + utilisateur avec privilges restreints. On peut utiliser les + directives User et Group pour dfinir les privilges + des processus enfants. Les processus enfants doivent pouvoir tre en + mesure de lire tous les contenus destins tre servis, mais + doivent avoir des privilges aussi bas que possible. De plus, ces + directives dfinissent galement les privilges dont vont hriter les + scripts CGI (sauf si on utilise suexec).

    + +

    La directive MaxConnectionsPerChild permet de + dfinir la frquence laquelle le serveur recycle ses processus en + arrtant les plus anciens et en en lanant de nouveaux.

    + +

    Ce module MPM utilise le mutex mpm-accept pour + srialiser l'accs aux connexions entrantes lorsqu'un problme + d'afflux de requtes peut survenir (en gnral, lorsqu'il y a + plusieurs sockets en coute). Les diffrents aspects de + l'implmentation de ce mutex peuvent tre configurs via la + directive Mutex. Vous + trouverez des informations plus dtailles propos de ce mutex dans + la documentation sur les conseils en matire de + performances.

    + +
    +
    +
    +

    Langues Disponibles:  de  | + en  | + fr  | + ja  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/mod/worker.html.ja.utf8 b/docs/manual/mod/worker.html.ja.utf8 index 2f96b28af88..8fcc8ebcae2 100644 --- a/docs/manual/mod/worker.html.ja.utf8 +++ b/docs/manual/mod/worker.html.ja.utf8 @@ -1,34 +1,41 @@ - -worker - Apache HTTP サーバ +worker - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4 > モジュール

    Apache MPM worker

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +
    @@ -53,7 +60,10 @@ MaxClients は 起動されるスレッドの総数の最大値を制限します。

    -

    ディレクティブ

    +

    トピック

    +

    ディレクティブ

    -

    トピック

    -

    参照

    +

    Bugfix checklist

    参照

    +
  • コメント
  • top

    動作方法

    @@ -122,10 +129,10 @@

    活動中の子プロセスの数と子プロセス中のサーバスレッドの数の越えられない 上限を設定するディレクティブが二つあります。これらはサーバを 完全に停止して、再起動することでしか変更することはできません。 - ServerLimit + ServerLimit は活動中の子プロセスの越えられない上限を設定し、 MaxClients ディレクティブ - の値を + の値を ThreadsPerChild の値で割った値以上である 必要があります。ThreadLimit は サーバスレッドの越えられない上限で、ThreadsPerChild ディレクティブの @@ -139,10 +146,10 @@ これは以下の様にして実現できます。

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/worker.html.tr.utf8 b/docs/manual/mod/worker.html.tr.utf8 index 81fc1b8e8e9..2ca3ee4fdc0 100644 --- a/docs/manual/mod/worker.html.tr.utf8 +++ b/docs/manual/mod/worker.html.tr.utf8 @@ -1,32 +1,37 @@ - -worker - Apache HTTP Sunucusu +worker - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Modüller

    Apache MPM worker

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    説明:マルチスレッドとマルチプロセスのハイブリッド型 ウェブサーバを実装したマルチプロセッシングモジュール
    ステータス:MPM
    @@ -43,9 +48,12 @@ süreçlilik modülü.

    Bu MPM’i denetim altında tutmakta kullanılan en önemli yönergeler, her çocuk süreç için konuşlandırılacak evre sayısını belirleyen ThreadsPerChild yönergesi ile devreye - sokulacak toplam evre sayısının azamisini belirleyen MaxClients yönergesidir.

    + sokulacak toplam evre sayısının azamisini belirleyen MaxRequestWorkers yönergesidir.

    -
    top

    Nasıl çalışır?

    @@ -85,27 +90,28 @@ ayarlanması dinleyip gelenleri işlenmek üzere bu sunucu evrelerinden birine aktarır.

    -

    Apache daima, gelen isteklere hizmet sunmaya hazır yedek +

    Apache HTTP Sunucusu daima, gelen isteklere hizmet sunmaya hazır + yedek veya boştaki sunucu evrelerinden oluşan bir havuzu canlı tutmaya çalışır. Bu suretle, istemcilere isteklerinin sunulması için yeni çocuk süreçlerin çatallanmasını, dolayısıyla yeni evrelerin konuşlandırılmasını beklemek gerekmez. Başlangıçta çalıştırılacak çocuk süreçlerin sayısı StartServers yönergesinde belirtilir. - Apache, çalışma süresi boyunca MinSpareThreads ve MaxSpareThreads yönergeleri ile belirtilen sınırlar + Apache httpd, çalışma süresi boyunca MinSpareThreads ve MaxSpareThreads yönergeleri ile belirtilen sınırlar dahilinde kalmak üzere gerektiğinde süreçleri öldürerek gerektiğinde yenilerini devreye alarak tüm süreçlerdeki toplam evre sayısını sabit tutmaya çalışır. Bu işlem kendiliğinden çok iyi yürüdüğünden bu yönergelere öntanımlı değerlerinden farklı değerlerin atanması nadiren gerekli olur. Aynı anda hizmet sunulabilecek istemcilerin sayısı (yani, - tüm süreçlerin toplam evre sayısı) MaxClients yönergesi ile belirlenir. Etkin çocuk - süreçlerin sayısı ise MaxClients yönergesindeki değerin ThreadsPerChild yönergesindeki değere + tüm süreçlerin toplam evre sayısı) MaxRequestWorkers yönergesi ile belirlenir. Etkin çocuk + süreçlerin sayısı ise MaxRequestWorkers yönergesindeki değerin ThreadsPerChild yönergesindeki değere bölünmesi ile elde edilir.

    Bu iki yönerge aynı anda etkin olabilecek çocuk süreçlerin ve her çocuk süreçteki sunucu evreleri sayısının üst sınırını belirler ve bu sınır sadece ana sunucu tamamen durdurulup yeniden başlatılarak değiştirilebilir. ServerLimit yönergesinin değeri etkin çocuk süreç - sayısının üst sınırı olup MaxClients yönergesindeki değerin ThreadsPerChild yönergesindeki değere + sayısının üst sınırı olup MaxRequestWorkers yönergesindeki değerin ThreadsPerChild yönergesindeki değere bölünmesi ile elde değere eşit veya bundan küçük olması gerekir. ThreadLimit yönergesinin değeri ise sunucu evreleri sayısının üst sınırını belirler ve ThreadsPerChild yönergesindeki değerden @@ -114,54 +120,84 @@ ayarlanması

    Sonlandırma sırasında etkin çocuk süreçlere ek olarak mevcut istemci bağlantılarını işleme sokmaya çalışan tek bir sunucu evresinden başka fazladan bir çocuk süreç etkin kalabileceği gibi sonlandırılacak süreç - sayısının en fazla MaxClients olması gerekirse de gerçekte sayı bundan küçük - olabilir. Şöyle bir işlemle tek bir çocuk sürecin sonlandırılması + sayısının en fazla MaxRequestWorkers olması gerekirse de gerçekte sayı bundan + küçük olabilir. Şöyle bir işlemle tek bir çocuk sürecin sonlandırılması iptal edilerek bu gibi durumlara karşı önlem alınabilir:

    worker modülünün öntanımlı süreç-evre yapılandırması genelde şöyledir:

    -

    - ServerLimit 16
    - StartServers 2
    - MaxClients 150
    - MinSpareThreads 25
    - MaxSpareThreads 75
    - ThreadsPerChild 25 -

    +
    ServerLimit         16
    +StartServers         2
    +MaxRequestWorkers  150
    +MinSpareThreads     25
    +MaxSpareThreads     75
    +ThreadsPerChild     25
    +

    Unix altında 80. portu dinleyebilmek için ana sürecin root tarafından çalıştırılmış olması gerekirse de çocuk süreçler ve evreler Apache - tarafından daha az yetkili bir kullanıcının aidiyetinde - çalıştırılırlar. Apache’nin çocuk süreçlerinin kullanıcı ve gruplarını - ayarlamak için User ve - Group yönergeleri kullanılır. + httpd tarafından daha az yetkili bir kullanıcının aidiyetinde + çalıştırılırlar. Apache httpd’nin çocuk süreçlerinin kullanıcı ve + gruplarını ayarlamak için User + ve Group yönergeleri + kullanılır. Çocuk süreçlerin sunacakları içeriği okumaya yetkili olmaları gerekir, fakat bu yetkinin mümkün olduğunca kısıtlı tutulmasına çalışılmalıdır. Bundan başka, suexec kullanılmadığı takdirde, bu yönergeler CGI betikleri tarafından miras alınacak yetkili kullanıcı ve grubu da ayarlarlar.

    -

    MaxRequestsPerChild +

    MaxConnectionsPerChild yönergesi ana sunucunun eski süreçleri öldürüp yenilerini oluşturmayı ne kadar sıklıkla yapacağını denetler.

    + +

    Bu MPM, gürleyen sürü sorunu ortaya çıktığında (genelde çok sayıda + dinlenen soket varlığında) gelen bağlantılara erişimi dizgileştirmek için + mpm-accept muteksini kullanır. Bu muteksin gerçeklenimle + ilgili hususları Mutex yönergesi ile + yapılandırılabilir. Bu muteks hakkında ek bilgi için başarımın arttırılması + belgesine bakınız.

    +

    Mevcut Diller:  de  |  en  | + fr  |  ja  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mod/worker.xml b/docs/manual/mod/worker.xml index f95f4c21f7e..ceec2103445 100644 --- a/docs/manual/mod/worker.xml +++ b/docs/manual/mod/worker.xml @@ -57,7 +57,7 @@ idle server threads, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new threads or processes to be created before their requests can be - served. The number of processes that will initially launched is + served. The number of processes that will initially launch is set by the StartServers directive. During operation, the server assesses the total number of idle threads in all processes, and forks or kills processes to @@ -110,14 +110,14 @@

    A typical configuration of the process-thread controls in the worker MPM could look as follows:

    - - ServerLimit 16
    - StartServers 2
    - MaxRequestWorkers 150
    - MinSpareThreads 25
    - MaxSpareThreads 75
    - ThreadsPerChild 25 -
    + +ServerLimit 16 +StartServers 2 +MaxRequestWorkers 150 +MinSpareThreads 25 +MaxSpareThreads 75 +ThreadsPerChild 25 +

    While the parent process is usually started as root under Unix in order to bind to port 80, the child processes and threads diff --git a/docs/manual/mod/worker.xml.de b/docs/manual/mod/worker.xml.de index 2db305f6137..2bd28414810 100644 --- a/docs/manual/mod/worker.xml.de +++ b/docs/manual/mod/worker.xml.de @@ -1,7 +1,7 @@ - + + + + + + + +worker +Module multi-processus implémentant un serveur web hybride +multi-processus multi-thread +MPM +worker.c +mpm_worker_module + +

    +

    Ce module multi-processus (MPM) implémente un serveur hybride + multi-processus multi-thread. En utilisant les threads pour servir + les requêtes, il peut en traiter un grand nombre tout en consommant + moins de ressources qu'un serveur à base de processus. Cependant, il + conserve une grande partie de la stabilité d'un serveur à base de + processus en maintenant plusieurs processus disponibles, chacun de + ces derniers possédant de nombreux threads.

    + +

    Les directives les plus importantes qui permettent de contrôler + ce MPM sont ThreadsPerChild, qui définit le + nombre de threads lancés par chaque processus enfant et MaxRequestWorkers, qui définit le nombre + global maximum de threads qui peuvent être lancés.

    +
    +Définition des adresses et ports +qu'utilise le serveur HTTP Apache + +
    Comment ça marche +

    Un processus de contrôle unique (le parent) a pour tâche de + lancer les processus enfants. Chaque processus enfant crée un nombre + fixe de threads serveurs selon la valeur de la directive ThreadsPerChild, ainsi + qu'un thread chargé d'attendre les connexions et de les passer à un + thread serveur pour traitement au fur et à mesure de leur arrivée.

    + +

    Le serveur HTTP Apache essaie toujours de maintenir un jeu de + threads serveurs + inactifs ou en réserve, qui se tiennent prêts à traiter + les requêtes entrantes. De cette façon, les clients n'ont pas besoin + d'attendre la création d'un nouveau thread ou d'un nouveau processus + pour que leurs requêtes puissent être traitées. Le nombre de + processus lancés initialement est défini par la directive StartServers. En cours de + fonctionnement, le serveur évalue le nombre total de threads inactifs + dans tous les processus, et en crée ou en arrête de façon à + maintenir ce nombre à l'intérieur des limites définies par les + directives MinSpareThreads et MaxSpareThreads. Comme ce module + s'auto-contrôle de manière efficace, on peut en général conserver + les valeurs par défaut. Le nombre maximum de clients pouvant être + servis simultanément (c'est à dire le nombre global maximum de + threads pour tous les processus) est défini par la directive + MaxRequestWorkers. Le nombre + maximum de processus enfants actifs est défini par la valeur de la + directive MaxRequestWorkers + divisée par la valeur de la directive + ThreadsPerChild.

    + +

    Deux directives permettent de fixer des limites absolues pour le + nombre de processus enfants actifs et le nombre de threads serveurs + par processus enfant, et ne peuvent être modifiées qu'en + arrêtant complètement le serveur et en le démarrant à nouveau. + La valeur de la directive ServerLimit constitue une limite + absolue pour le nombre de processus enfants actifs, et doit être + supérieure ou égale à la valeur de la directive MaxRequestWorkers divisée par la valeur de + la directive + ThreadsPerChild. La valeur de la directive ThreadLimit constitue une limite + absolue pour le nombre de threads par processus enfant, et doit être + supérieure ou égale à la valeur de la directive ThreadsPerChild.

    + +

    En plus du jeu de processus enfants actifs, il peut exister + quelques processus enfants en cours d'arrêt, mais dont au moins un + thread serveur est encore en train de traiter une connexion client + existante. Il peut subsister en théorie jusqu'à MaxRequestWorkers processus en cours + d'arrêt, bien qu'en réalité, ce nombre sera en général beaucoup plus + petit. Ce comportement peut être évité en désactivant l'arrêt de + processus enfants individuels de la manière suivante :

    + +
      +
    • définir la valeur de + MaxConnectionsPerChild à zéro
    • + +
    • Définir la valeur de + MaxSpareThreads à la même valeur que MaxRequestWorkers
    • +
    + +

    Voici un exemple typique de configuration du contrôle + processus-thread pour le MPM worker :

    + + +ServerLimit 16 +StartServers 2 +MaxRequestWorkers 150 +MinSpareThreads 25 +MaxSpareThreads 75 +ThreadsPerChild 25 + + +

    Alors que le processus parent est en général démarré en tant que + root sous Unix afin de se mettre en écoute du port 80, + les processus enfants et les threads sont lancés par le serveur sous un + utilisateur avec privilèges restreints. On peut utiliser les + directives User et Group pour définir les privilèges + des processus enfants. Les processus enfants doivent pouvoir être en + mesure de lire tous les contenus destinés à être servis, mais + doivent avoir des privilèges aussi bas que possible. De plus, ces + directives définissent également les privilèges dont vont hériter les + scripts CGI (sauf si on utilise suexec).

    + +

    La directive MaxConnectionsPerChild permet de + définir la fréquence à laquelle le serveur recycle ses processus en + arrêtant les plus anciens et en en lançant de nouveaux.

    + +

    Ce module MPM utilise le mutex mpm-accept pour + sérialiser l'accès aux connexions entrantes lorsqu'un problème + d'afflux de requêtes peut survenir (en général, lorsqu'il y a + plusieurs sockets en écoute). Les différents aspects de + l'implémentation de ce mutex peuvent être configurés via la + directive Mutex. Vous + trouverez des informations plus détaillées à propos de ce mutex dans + la documentation sur les conseils en matière de + performances.

    + +
    + +CoreDumpDirectory + +EnableExceptionHook + +Group + +PidFile + +Listen + +ListenBacklog + +MaxRequestWorkers + +MaxMemFree + +MaxConnectionsPerChild + +MaxSpareThreads + +MinSpareThreads + +ScoreBoardFile + +ReceiveBufferSize + +SendBufferSize + +ServerLimit + +StartServers + +ThreadLimit + +ThreadsPerChild + +ThreadStackSize + +User + + + diff --git a/docs/manual/mod/worker.xml.ja b/docs/manual/mod/worker.xml.ja index e4ea5cd2e80..13623ef5115 100644 --- a/docs/manual/mod/worker.xml.ja +++ b/docs/manual/mod/worker.xml.ja @@ -1,7 +1,7 @@ - + + -Multi-Processing-Module (MPMs) - Apache HTTP Server +Multi-Processing-Module (MPMs) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Multi-Processing-Module (MPMs)

    +Apache > HTTP-Server > Dokumentation > Version 2.4

    Multi-Processing-Module (MPMs)

    Verfgbare Sprachen:  de  |  en  | @@ -37,7 +42,7 @@

    +

    Siehe auch

    top

    Einfhrung

    @@ -128,7 +133,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.en b/docs/manual/mpm.html.en index eb0cc8ddc97..84aa5843ce7 100644 --- a/docs/manual/mpm.html.en +++ b/docs/manual/mpm.html.en @@ -1,22 +1,27 @@ - -Multi-Processing Modules (MPMs) - Apache HTTP Server +Multi-Processing Modules (MPMs) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Multi-Processing Modules (MPMs)

    +Apache > HTTP Server > Documentation > Version 2.4

    Multi-Processing Modules (MPMs)

    Available Languages:  de  |  en  | @@ -35,7 +40,7 @@ how they are used by the Apache HTTP Server.

  • MPM Defaults
  • Building an MPM as a static module
  • Building an MPM as a DSO module
  • -
    +

    See also

    top

    Introduction

    @@ -96,6 +101,29 @@ choice at compile-time.

    event, depending on platform capabilities
    Açıklama:Çok evreli ve çok süreçli melez bir HTTP sunucusu oluşturan çok süreçlilik modülü.
    Durum:MPM
    Windowsmpm_winnt
    + +

    Here, 'Unix' is used to mean Unix-like operating systems, such as +Linux, BSD, Solaris, Mac OS X, etc.

    + +

    In the case of Unix, the decision as to which MPM is installed is +based on two questions:

    +

    1. Does the system support threads?

    +

    2. Does the system support thread-safe polling (Specifically, the +kqueue and epoll functions)?

    + +

    If the answer to both questions is 'yes', the default MPM is +event.

    + +

    If The answer to #1 is 'yes', but the answer to #2 is 'no', the +default will be worker.

    + +

    If the answer to both questions is 'no', then the default MPM will be +prefork.

    + +

    In practical terms, this means that the default will almost always be +event, as all modern operating systems support these +two features.

    +
    top

    Building an MPM as a static module

    @@ -123,6 +151,16 @@ choice at compile-time.

    updating the LoadModule directive for the MPM instead of by rebuilding the server.

    +
    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    + + +

    Attempting to LoadModule + more than one MPM will result in a startup failure with the + following error.

    + +

    AH00534: httpd: Configuration error: More than one MPM + loaded.

    +

    This feature is enabled using the --enable-mpms-shared option of the configure script. @@ -146,7 +184,28 @@ choice at compile-time.

     ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.es b/docs/manual/mpm.html.es index cbcb6a38d68..6f20e7980f5 100644 --- a/docs/manual/mpm.html.es +++ b/docs/manual/mpm.html.es @@ -1,22 +1,27 @@ - -Mdulos de MultiProcesamiento (MPMs) - Servidor HTTP Apache +Mdulos de MultiProcesamiento (MPMs) - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Mdulos de MultiProcesamiento (MPMs)

    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    Mdulos de MultiProcesamiento (MPMs)

    Idiomas disponibles:  de  |  en  | @@ -38,7 +43,7 @@ como los usa Apache.

    +

    Consulte tambin

    top

    Introduccin

    @@ -139,7 +144,28 @@ especifica lo contrario al compilar.

     ko  |  tr  |  zh-cn 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.fr b/docs/manual/mpm.html.fr index 6b7f8190692..ef0700d7f3f 100644 --- a/docs/manual/mpm.html.fr +++ b/docs/manual/mpm.html.fr @@ -1,22 +1,27 @@ - -Modules multi-processus (MPMs) - Serveur Apache HTTP +Modules multi-processus (MPMs) - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Modules multi-processus (MPMs)

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Modules multi-processus (MPMs)

    Langues Disponibles:  de  |  en  | @@ -37,7 +42,7 @@ que la mani statique

  • Compiler un module MPM en tant que module DSO (Dynamic Shared Object)
  • -
    +

    Voir aussi

    top

    Introduction

    @@ -104,6 +109,29 @@ vous n'en sp ou event, selon les possibilits de la plate-forme
    Windowsmpm_winnt
    + +

    Ici, 'Unix' sous-entend les systmes d'exploitation de type +Unix, comme Linux, BSD, Solaris, Mac OS X, etc...

    + +

    Dans le cas des systmes d'exploitation de type Unix, le choix du MPM + installer est orient par deux questions :

    +

    1. Est-ce que le systme supporte les threads ?

    +

    2. Est-ce que le systme supporte le polling thread-safe (et en +particulier les fonctions kqueue et epoll) ?

    + +

    Si la rponse aux deux questions est 'oui', le MPM par dfaut sera +event.

    + +

    Si la rponse la premire question est 'oui', et la rponse la +deuxime 'non', le MPM par dfaut sera worker.

    + +

    Si la rponse aux deux questions est 'non', le MPM par dfaut sera +prefork.

    + +

    En pratique, cela signifie que le MPM par dfaut sera presque +toujours event car tous les systmes d'exploitation +modernes satisfont aux deux conditions.

    +
    top

    Compiler un module MPM en tant que module @@ -138,6 +166,16 @@ DSO (Dynamic Shared Object)

    modifiant la directive LoadModule concerne, sans avoir recompiler le serveur.

    +
    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    + + +

    Toute tentative de charger plusieurs modules MPM via la directive + LoadModule empchera le + serveur de dmarrer et affichera l'erreur suivante :

    + +

    AH00534: httpd: Configuration error: More than one MPM + loaded.

    +

    Cette fonctionnalit est active via l'option --enable-mpms-shared du script configure. Si on ajoute l'argument @@ -162,7 +200,28 @@ DSO (Dynamic Shared Object)  ko  |  tr  |  zh-cn 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.ja.utf8 b/docs/manual/mpm.html.ja.utf8 index fd1e8961976..06a0ee69394 100644 --- a/docs/manual/mpm.html.ja.utf8 +++ b/docs/manual/mpm.html.ja.utf8 @@ -1,25 +1,29 @@ - -マルチプロセッシングモジュール (MPM) - Apache HTTP サーバ +マルチプロセッシングモジュール (MPM) - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    マルチプロセッシングモジュール (MPM)

    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    マルチプロセッシングモジュール (MPM)

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -28,8 +32,10 @@  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この文書ではマルチプロセッシングモジュールがどのようなもので、 Apache HTTP サーバでどのように使用されるかについて解説しています。

    @@ -37,7 +43,7 @@ Apache HTTP サーバでどのように使用されるかについて解説し +

    参照

    top

    はじめに

    @@ -125,7 +131,7 @@ Apache HTTP サーバでどのように使用されるかについて解説し
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -133,7 +139,28 @@ Apache HTTP サーバでどのように使用されるかについて解説し  ko  |  tr  |  zh-cn 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.ko.euc-kr b/docs/manual/mpm.html.ko.euc-kr index 91b80292fd4..1bd64d68d55 100644 --- a/docs/manual/mpm.html.ko.euc-kr +++ b/docs/manual/mpm.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ó (MPM) - Apache HTTP Server +ó (MPM) - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ó (MPM)

    :  de  |  en  | @@ -36,7 +41,7 @@

    +

    top

    Ұ

    @@ -122,7 +127,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.tr.utf8 b/docs/manual/mpm.html.tr.utf8 index 4876ab7c9a5..1c46135f2e4 100644 --- a/docs/manual/mpm.html.tr.utf8 +++ b/docs/manual/mpm.html.tr.utf8 @@ -1,22 +1,27 @@ - -Çok Süreçlilik Modülleri (MPM’ler) - Apache HTTP Sunucusu +Çok Süreçlilik Modülleri (MPM’ler) - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Çok Süreçlilik Modülleri (MPM’ler)

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Çok Süreçlilik Modülleri (MPM’ler)

    Mevcut Diller:  de  |  en  | @@ -27,15 +32,15 @@  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belgede Çok Süreçlilik Modülü denince ne anlaşıldığı ve bunların Apache HTTP Sunucusu tarafından nasıl kullanıldıkları açıklanmıştır.

    +
  • Bir MPM'i bir duruk modül olarak derlemek
  • +
  • Bir MPM'i bir DSO modülü olarak derlemek
  • +

    Ayrıca bakınız:

    top

    Giriş

    @@ -44,24 +49,26 @@ çalışabilen güçlü ve esnek bir HTTP sunucusu olarak tasarlanmıştır. Farklı platformlar ve farklı ortamlar çoğunlukla farklı özellikler veya aynı özelliğin en yüksek verimlilikle gerçeklenmesi için farklı yöntemler - gerektirir. Apache, geniş ortam çeşitliliğini daima modüler tasarımı - sayesinde uzlaştırmıştır. Bu tasarım, site yöneticilerine, sunucularında - bulunmasını istedikleri özellikleri derleme sırasında veya çalışma anında - gerekli modülleri yüklemek suretiyle seçebilme imkanı verir.

    + gerektirir. Apache httpd, geniş ortam çeşitliliğini daima modüler + tasarımı sayesinde uzlaştırmıştır. Bu tasarım, site yöneticilerine, + sunucularında bulunmasını istedikleri özellikleri derleme sırasında veya + çalışma anında gerekli modülleri yüklemek suretiyle seçebilme imkanı + verir.

    -

    Apache 2.0, bu modüler tasarımı sunucunun en temel işlevlerine kadar - indirmiştir. Sunucu, Çok Süreçlilik Modülleri adı verilen ve makine - üzerindeki ağ portlarının bağlanmasından, isteklerin kabul edilmesinden - ve bu istekleri yanıtlayacak çocuklara dağıtmaktan sorumlu olan - modüllerin seçimine imkan verecek bir yapılanma ile gelir.

    +

    Apache HTTP Sunucusu 2.0, bu modüler tasarımı sunucunun en temel + işlevlerine kadar indirmiştir. Sunucu, Çok Süreçlilik Modülleri adı + verilen ve makine üzerindeki ağ portlarının bağlanmasından, isteklerin + kabul edilmesinden ve bu istekleri yanıtlayacak çocuklara dağıtmaktan + sorumlu olan modüllerin seçimine imkan verecek bir yapılanma ile + gelir.

    Sunucunun modüler tasarımının bu seviyede genişletilmesi iki önemli yarar sağlar:

      -
    • Apache geniş çeşitlilikteki işletim sistemlerini daha temiz ve daha - verimli bir şekilde destekleyebilmektedir. Özellikle, - mpm_winnt modülü, Apache 1.3’te kullanılan POSIX +
    • Apache httpd geniş çeşitlilikteki işletim sistemlerini daha temiz ve + daha verimli bir şekilde destekleyebilmektedir. Özellikle, + mpm_winnt modülü, Apache httpd 1.3’te kullanılan POSIX katmanının yerine işletim sistemine özgü özellikleri kullanabildiğinden, Apache HTTP Sunucusunun Windows sürümü artık çok daha verimli bir duruma gelmiştir. Aynı fayda özelleştirilmiş MPM’lerle @@ -75,43 +82,97 @@ modüllerinden birini seçebilmektedir.
    -

    Kullanıcı açısından MPM’lerin diğer Apache modüllerinden görünüşte bir - farkı yoktur. Asıl fark sunucuya yüklenebilecek azami MPM modülü +

    Kullanıcı açısından MPM’lerin diğer Apache httpd modüllerinden görünüşte + bir farkı yoktur. Asıl fark sunucuya yüklenebilecek azami MPM modülü sayısının bir ve yalnız bir olarak sınırlanmış olmasıdır. Mevcut MPM - modülleri modül dizini sayfasında listelenmiştir..

    + modülleri modül dizini sayfasında listelenmiştir.

    top
    -

    MPM Seçimi

    +

    Öntanımlı MPM’ler

    + +

    Aşağıdaki tabloda çeşitli işletim sistemlerinde öntanımlı olan MPM’ler + listelenmiştir. Derleme sırasında başka bir seçim yapmadığınız takdirde + bu işletim sistemlerinde bu MPM’ler seçilmiş olacaktır.

    + + + + + +
    Netwarempm_netware
    OS/2mpmt_os2
    UnixPlatformun yapabildiklerine bağlı olarak, + prefork, worker veya + event
    Windowsmpm_winnt
    -

    MPM’ler paket yapılandırması sırasında seçilmeli ve sunucu içinde - derlenmelidir. Derleyiciler evrelerin kullanılacağını bildikleri - takdirde çoğu işlevi evreleri kullanacak şekilde - en iyileyebilmektedir.

    +

    'Unix' burada Unix benzeri işletim sistemleri anlamında + kullanılmıştır (örn, Linux, BSD, Solaris, Mac OS X, vb.

    -

    Kullanmak istediğiniz MPM’yi kendiniz seçmek istediğiniz takdirde - configure betiğini - --with-mpm=AD seçeneği ile kullanınız. Burada - AD istenen MPM’nin adıdır.

    +

    Unix durumunda, hangi MPM'nin kurulacağı kararı şu 2 soruya verilecek + yanıta bağlıdır:

    +

    1. Sistem evreleri destekliyor mu?

    +

    2. Sistem evreleri "thread-safe polling" anlamında destekliyor mu + (özellikle kqueue ve epoll işlevlerini)?

    + +

    Her iki soruya da verilen yanıt 'evet' ise, öntanımlı MPM'niz + event modülüdür.

    + +

    Birincinin yanıtı 'evet' ikincinin 'hayır' ise öntanımlı MPM'niz + worker modülüdür.

    + +

    Yanıtların her ikisi de 'hayır' ise öntanımlı MPM'niz + prefork modülüdür.

    + +

    Uygulamada, günümüzdeki işletim sistemlerinin tümü bu iki özelliği + desteklediğinden öntanımlı MPM'niz hemen hemen daima + event modülü olacaktır.

    -

    Sunucu derlendikten sonra hangi MPM’nin seçilmiş olduğunu ./httpd - -l komutuyla saptamak mümkündür. Bu komut, MPM de dahil omak - üzere sunucuyla birlikte derlenmiş tüm modülleri listeleyecektir.

    top
    -

    Öntanımlı MPM’ler

    +

    Bir MPM'i bir duruk modül olarak derlemek

    -

    Aşağıdaki tabloda çeşitli işletim sistemlerinde öntanımlı olan MPM’ler - listelenmiştir. Derleme sırasında başka bir seçim yapmadığınız takdirde - bu işletim sistemlerinde bu MPM’ler seçilmiş olacaktır.

    +

    MPM'ler tüm platformlarda duruk (static) modüller olarak derlenebilir. + Derleme sırasında tek bir modül seçilir ve sunucu ile ilintilenir. MPM + değiştirilmek istenirse sunucunun yeniden derlenmesi gerekir.

    + +

    Öntanımlı MPM seçimin değiştirmek için configure + betiğinin --with-mpm=AD seçeneği kullanılır. + Buradaki AD istenen MPM'in ismidir.

    + +

    Sunucu bir kere derlendi mi, hangi MPM'in seçilmiş olduğunu + ./httpd -l komutuyla öğrenebilirsiniz. Bu komut, içerilen + MPM dahil, sunucu içinde derlenmiş bütüm modülleri listeler.

    + +
    top
    +
    +

    Bir MPM'i bir DSO modülü olarak derlemek

    + +

    Unix ve benzeri platformlarda, MPM'ler DSO modülleri olarak derlenebilir + ve diğer DSO modülleri gibi sunucuya devingen olarak yüklenebilir. DSO + modülü olarak derlenen MPM'ler, sunucunun yeniden derlenmesini + gerektirmeden LoadModule yönergesi + güncellenerek değiştirilebilir.

    + +
    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
    + + +

    LoadModule yönergesini birden + fazla MPM için kullanmak sunucunun başlatılması sırasında aşağıdaki + hatanın oluşmasına sebep olur.

    + +

    AH00534: httpd: Configuration error: More than one MPM + loaded.

    + +

    Bu özellik configure betiğinin + --enable-mpms-shared seçeneği ile etkinleştirilebilir. + all değeri belirtilerek platform için + kullanılabilen tüm modüller kurulur. İstenirse, değer olarak bir MPM + listesi de belirtilebilir.

    + +

    Özdevinimli olarak seçilerek veya configure betiğine + --with-mpm seçeneğiyle belirtilerek seçilen öntanımlı MPM + üretilen sunucu yapılandırma dosyasıyla yüklenir. Farklı bir MPM seçmek + için MPM'i LoadModule yönergesinde + belirtin.

    - - - - - - -
    Netwarempm_netware
    OS/2mpmt_os2
    Unixprefork
    Windowsmpm_winnt

    Mevcut Diller:  de  | @@ -122,7 +183,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.html.zh-cn b/docs/manual/mpm.html.zh-cn.utf8 similarity index 75% rename from docs/manual/mpm.html.zh-cn rename to docs/manual/mpm.html.zh-cn.utf8 index d91af690525..f8fbef73818 100644 --- a/docs/manual/mpm.html.zh-cn +++ b/docs/manual/mpm.html.zh-cn.utf8 @@ -1,22 +1,27 @@ - -多处理模块(MPM) - Apache HTTP 服务器 +多处理模块(MPM) - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    多处理模块(MPM)

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    多处理模块(MPM)

    可用语言:  de  |  en  | @@ -27,6 +32,7 @@  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    本文档介绍了什么是多处理模块,以及 Apache HTTP 服务器如何使用它们。

    @@ -34,7 +40,7 @@
  • 默认 MPM
  • 构建 MPM 为静态模块
  • 构建 MPM 为动态模块
  • -
    +

    参见

    top

    介绍

    @@ -122,7 +128,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/mpm.xml b/docs/manual/mpm.xml index 21c0a186114..03d1395186b 100644 --- a/docs/manual/mpm.xml +++ b/docs/manual/mpm.xml @@ -89,6 +89,29 @@ choice at compile-time.

    event, depending on platform capabilities
    Windowsmpm_winnt
    + +

    Here, 'Unix' is used to mean Unix-like operating systems, such as +Linux, BSD, Solaris, Mac OS X, etc.

    + +

    In the case of Unix, the decision as to which MPM is installed is +based on two questions:

    +

    1. Does the system support threads?

    +

    2. Does the system support thread-safe polling (Specifically, the +kqueue and epoll functions)?

    + +

    If the answer to both questions is 'yes', the default MPM is +event.

    + +

    If The answer to #1 is 'yes', but the answer to #2 is 'no', the +default will be worker.

    + +

    If the answer to both questions is 'no', then the default MPM will be +prefork.

    + +

    In practical terms, this means that the default will almost always be +event, as all modern operating systems support these +two features.

    +
    Building an MPM as a static module @@ -116,6 +139,17 @@ choice at compile-time.

    updating the LoadModule directive for the MPM instead of by rebuilding the server.

    + + LoadModule mpm_prefork_module modules/mod_mpm_prefork.so + + +

    Attempting to LoadModule + more than one MPM will result in a startup failure with the + following error.

    + + AH00534: httpd: Configuration error: More than one MPM + loaded. +

    This feature is enabled using the --enable-mpms-shared option of the configure script. diff --git a/docs/manual/mpm.xml.de b/docs/manual/mpm.xml.de index 8d1c9fb053c..730ccdc825d 100644 --- a/docs/manual/mpm.xml.de +++ b/docs/manual/mpm.xml.de @@ -1,7 +1,7 @@ - + + - + + + + + -bersicht der neuen Funktionen in Apache 2.0 - Apache HTTP Server +bersicht der neuen Funktionen im Apache HTTP Server 2.0 - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-

    bersicht der neuen Funktionen in Apache 2.0

    +Apache > HTTP-Server > Dokumentation > Version 2.4

    bersicht der neuen Funktionen im Apache HTTP Server 2.0

    Verfgbare Sprachen:  de  |  en  | @@ -27,16 +32,13 @@  ru  |  tr 

    -
    Diese bersetzung ist mglicherweise - nicht mehr aktuell. Bitte prfen Sie die englische Version auf - die neuesten nderungen.

    Dieses Dokument beschreibt einige der wichtigsten nderungen des Apache HTTP Servers 2.0 gegenber der Version 1.3.

    +

    Siehe auch

    top

    Core-Erweiterungen

    @@ -45,37 +47,39 @@
    Unix-Threading
    -
    Auf Unix-Systemen mit Untersttzung fr POSIX-Threads, - kann Apache jetzt in einem Multi-Process, Multi-Threaded Hybrid-Mode - gestartet werden. Dies verbessert die Skalierfhigkeit fr - viele, jedoch nicht unbedingt alle Konfigurationen.
    +
    Auf Unix-Systemen mit Untersttzung fr + POSIX-Threads, kann der Apache httpd jetzt in einem Multi-Process, + Multi-Threaded Hybrid-Mode gestartet werden. Dies verbessert die + Skalierfhigkeit fr viele, jedoch nicht unbedingt alle + Konfigurationen.
    Neues Build-System
    Das Build-System wurde komplett auf der Basis von - autoconf und libtool neu geschrieben. Dadurch - wird das Apache-Konfigurationssystem dem vieler anderer Packages - hnlicher.
    + autoconf und libtool neu geschrieben. + Dadurch wird das Konfigurationssystem des Apache httpd dem vieler + anderer Packages hnlicher.
    Multi-Protokoll-Untersttzung
    -
    Apache stellt jetzt die notwendigen Grundfunktionalitten - bereit, um mehrere Protokolle untersttzen und verarbeiten zu - knnen. mod_echo wurde hierfr als - Beispiel geschrieben.
    +
    Der Apache HTTP Server stellt jetzt die notwendigen + Grundfunktionalitten bereit, um mehrere Protokolle + untersttzen und verarbeiten zu knnen. + mod_echo wurde hierfr als Beispiel + geschrieben.
    Bessere Untersttzung von Nicht-Unix-Plattformen
    -
    Apache 2.0 ist schneller und stabiler auf Nicht-Unix-Plattformen - wie BeOS, OS/2 und Windows. Mit der Einfhrung von - Plattform-spezifischen Multi-Processing Modulen - (MPMs) und der Apache Portable Runtime (APR), sind diese Plattformen - jetzt in ihrem nativen API implementiert, wodurch die Verwendung der - hufig fehlerbehafteten und schlecht funktionierenden +
    Der Apache HTTP Server 2.0 ist schneller und stabiler auf + Nicht-Unix-Plattformen wie BeOS, OS/2 und Windows. Mit der + Einfhrung von Plattform-spezifischen Multi-Processing Modulen (MPMs) und der Apache + Portable Runtime (APR), sind diese Plattformen jetzt in ihrem + nativen API implementiert, wodurch die Verwendung der hufig + fehlerbehafteten und schlecht funktionierenden POSIX-Emulation-Layer vermieden wird.
    -
    Neues Apache API
    +
    Neues Apache-httpd API
    Das API fr Module hat sich in 2.0 stark verndert. Die meisten der Sortierungs-/Priorittsprobleme von Modulen bei @@ -84,26 +88,26 @@ ber einen pre-hook vorgenommen, um mehr Flexibilitt zu bieten. Auerdem wurden neue API-Calls hinzugefgt, die zustzliche Modulfhigkeiten zur Verfgung stellen, - ohne den Apache-Kern anpassen zu mssen.
    + ohne den Kern des Apache HTTP Servers anpassen zu mssen.
    IPv6-Untersttzung
    Auf Systemen, bei denen die zugrundeliegende Apache Portable - Runtime-Bibliothek IPv6 untersttzt, bekommt Apache + Runtime-Bibliothek IPv6 untersttzt, bekommt der Apache httpd standarmig IPv6 Listening Sockets. Zustzlich untersttzen die Konfigurationsanweisungen Listen, NameVirtualHost und VirtualHost numerische IPv6-Adressangaben (z.B., "Listen [2001:db8::1]:8080").
    Filterung
    -
    Apache-Module knnen jetzt als Filter entwickelt und zur - Filterung des rein- und rausgehenden Datenstroms des Servers - eingesetzt werden. Hierdurch kann beispielsweise die Ausgabe von - CGI-Skripten durch den INCLUDES-Filter von - mod_include bearbeitet werden und so Server-Side - Include-Anweisungen ausgefhrt werden. Das Modul - mod_ext_filter erlaubt externen Programmen - als Filter zu agieren, in der gleichen Weise wie CGI-Programme als +
    Apache-httpd-Module knnen jetzt als Filter entwickelt + und zur Filterung des rein- und rausgehenden Datenstroms des + Servers eingesetzt werden. Hierdurch kann beispielsweise die + Ausgabe von CGI-Skripten durch den INCLUDES-Filter + von mod_include bearbeitet werden und so + Server-Side Include-Anweisungen ausgefhrt werden. Das Modul + mod_ext_filter erlaubt externen Programmen als + Filter zu agieren, in der gleichen Weise wie CGI-Programme als Eingabe dienen knnen.
    Mehrsprachige Fehlermeldungen
    @@ -127,18 +131,19 @@
    Native Windows NT Unicode-Untersttzung
    -
    Apache 2.0 auf Windows NT benutzt jetzt utf-8 fr alle - Dateinamen-Kodierungen. Diese werden direkt auf das zugrundeliegende - Unicode-Dateisystem abgebildet, wodurch Mehrsprach-Untersttzung - fr alle Windows NT-basierten Installationen, inklusive Windows - 2000 und Windows XP, zur Verfgung gestellt wird. - Diese Untersttzung ist nicht auf Windows 95, 98 oder ME - verfgbar. Hier wird weiterhin die jeweils lokale Codepage des - Rechners fr den Zugriff auf das Dateisystem verwendet.
    +
    Der Apache httpd 2.0 auf Windows NT benutzt jetzt utf-8 + fr alle Dateinamen-Kodierungen. Diese werden direkt auf das + zugrundeliegende Unicode-Dateisystem abgebildet, wodurch + Mehrsprach-Untersttzung fr alle Windows NT-basierten + Installationen, inklusive Windows 2000 und Windows XP, zur + Verfgung gestellt wird. Diese Untersttzung ist + nicht auf Windows 95, 98 oder ME verfgbar. Hier wird + weiterhin die jeweils lokale Codepage des Rechners fr den + Zugriff auf das Dateisystem verwendet.
    Bibliothek fr regulre Ausdrcke aktualisiert
    -
    Apache 2.0 enthlt die "Perl Compatible +
    Der Apache httpd 2.0 enthlt die "Perl Compatible Regular Expression Library" (PCRE). Bei der Auswertung aller regulren Ausdrcke wird nun die leistungsfhigere Syntax von Perl 5 verwendet.
    @@ -152,31 +157,31 @@
    mod_ssl
    -
    Neues Modul in Apache 2.0. Dieses Modul ist ein Interface - zu den von OpenSSL bereitgestellten SSL/TLS +
    Neues Modul in Apache httpd 2.0. Dieses Modul ist ein + Interface zu den von OpenSSL bereitgestellten SSL/TLS Verschlsselungs-Protokollen.
    mod_dav
    -
    Neues Modul in Apache 2.0. Dieses Modul implementiert die HTTP - Distributed Authoring and Versioning (DAV) Spezifikation zur - Erzeugung und Pflege von Web-Inhalten.
    +
    Neues Modul in Apache httpd 2.0. Dieses Modul implementiert + die HTTP Distributed Authoring and Versioning (DAV) Spezifikation + zur Erzeugung und Pflege von Web-Inhalten.
    mod_deflate
    -
    Neues Modul in Apache 2.0. Dieses Modul erlaubt es Browsern, die - dies untersttzen, eine Komprimierung des Inhaltes vor der - Auslieferung anzufordern, um so Netzwerk-Bandbreite zu sparen.
    +
    Neues Modul in Apache httpd 2.0. Dieses Modul erlaubt es + Browsern, die dies untersttzen, eine Komprimierung des + Inhaltes vor der Auslieferung anzufordern, um so + Netzwerk-Bandbreite zu sparen.
    -
    mod_auth_ldap
    +
    mod_auth_ldap
    -
    Neues Modul in Apache 2.0.41. Diese Modul ermglicht - die Verwendung einer LDAP-Datenbank zur Speicherung von - Berechtigungsdaten fr die HTTP-Basic-Authentication. - Ein Begleitmodul, mod_ldap, stellt einen - Verbindungs-Pool und die Pufferung von Abfrageergebnissen zur - Verfgung. -
    +
    Neues Modul in Apache httpd 2.0.41. Diese Modul + ermglicht die Verwendung einer LDAP-Datenbank zur + Speicherung von Berechtigungsdaten fr die + HTTP-Basic-Authentication. Ein Begleitmodul, + mod_ldap, stellt einen Verbindungs-Pool und die + Pufferung von Abfrageergebnissen zur Verfgung.
    mod_auth_digest
    @@ -186,22 +191,24 @@
    mod_charset_lite
    -
    Neues Modul in Apache 2.0. +
    Neues Modul in Apache httpd 2.0. Dieses experimentelle Modul erlaubt Zeichensatz-bersetzungen oder -Umschlsselung.
    mod_file_cache
    -
    Neues Modul in Apache 2.0. Dieses Modul beinhaltet die - Funktionalitt von mod_mmap_static aus Apache 1.3, - plus einige weitere Caching-Funktionen.
    +
    Neues Modul in Apache httpd 2.0. Dieses Modul beinhaltet die + Funktionalitt von mod_mmap_static aus Version + 1.3 des Apache HTTP Server zuzglich einiger weiterer + Caching-Funktionen.
    mod_headers
    -
    Dieses Modul ist in Apache 2.0 deutlich flexibler geworden. Es - kann jetzt die von mod_proxy genutzten Request-Header - manipulieren und es ist mglich Response-Header auf Basis von - definierten Bedingungen zu verndern.
    +
    Dieses Modul ist in Apache httpd 2.0 deutlich flexibler + geworden. Es kann jetzt die von mod_proxy + genutzten Request-Header manipulieren und es ist mglich + Response-Header auf Basis von definierten Bedingungen zu + verndern.
    mod_proxy
    @@ -247,10 +254,11 @@ ber die mod_include Variablen $0 bis $9 zugegriffen werden. -
    mod_auth_dbm
    +
    mod_auth_dbm
    DBM-hnliche Datenbanken werden jetzt durch die - Konfigurationsaweisung AuthDBMType untersttzt.
    + Konfigurationsaweisung AuthDBMType + untersttzt.
    @@ -262,7 +270,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.en b/docs/manual/new_features_2_0.html.en index 0d48466f525..fa26ddcbe17 100644 --- a/docs/manual/new_features_2_0.html.en +++ b/docs/manual/new_features_2_0.html.en @@ -1,22 +1,27 @@ - -Overview of new features in Apache HTTP Server 2.0 - Apache HTTP Server +Overview of new features in Apache HTTP Server 2.0 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Overview of new features in Apache HTTP Server 2.0

    +Apache > HTTP Server > Documentation > Version 2.4

    Overview of new features in Apache HTTP Server 2.0

    Available Languages:  de  |  en  | @@ -33,7 +38,7 @@

    +

    See also

    top

    Core Enhancements

    @@ -154,7 +159,7 @@ browsers to request that content be compressed before delivery, saving network bandwidth. -
    mod_auth_ldap
    +
    mod_auth_ldap
    New module in Apache httpd 2.0.41. This module allows an LDAP database to be used to store credentials for HTTP Basic @@ -222,11 +227,10 @@ using mod_include's variables $0 .. $9.
    -
    mod_auth_dbm
    +
    mod_auth_dbm
    Now supports multiple types of DBM-like databases using the - AuthDBMType - directive.
    + AuthDBMType directive.
    @@ -239,7 +243,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.fr b/docs/manual/new_features_2_0.html.fr index 0dd91489314..bdf415202d3 100644 --- a/docs/manual/new_features_2_0.html.fr +++ b/docs/manual/new_features_2_0.html.fr @@ -1,23 +1,28 @@ - Vue d'ensemble des nouvelles fonctionnalits de la - version 2.0 du serveur HTTP Apache - Serveur Apache HTTP + version 2.0 du serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Vue d'ensemble des nouvelles fonctionnalits de la +Apache > Serveur HTTP > Documentation > Version 2.4

    Vue d'ensemble des nouvelles fonctionnalits de la version 2.0 du serveur HTTP Apache

    Langues Disponibles:  de  | @@ -35,7 +40,7 @@

    +

    Voir aussi

    top

    Amliorations du Systme de Base

    @@ -164,7 +169,7 @@ le supportent de demander la compression des contenus envoys par le serveur. Cela a l'avantage de rduite l'occupation de la bande passante. -
    mod_auth_ldap
    +
    mod_auth_ldap
    Apparu dans Apache httpd 2.0.41, ce module permet aux administrateurs d'utiliser un arbre LDAP pour grer la base d'utilisateurs pour les @@ -191,7 +196,7 @@
    mod_headers
    -
    Ce module gagne beaucoup de flexibilit et peut aussi positionner; avec Apache +
    Ce module gagne beaucoup de flexibilit avec Apache httpd 2.0 : on peut dsormais l'utiliser pour modifier les en-ttes des requtes utiliss par mod_proxy, et pour positionner les @@ -239,10 +244,10 @@ rationnelles (qui grent prsent les regex Perl) sont recupres au moyen des variables $0 $9.
    -
    mod_auth_dbm
    +
    mod_auth_dbm
    Plusieurs bases de donnes DBM sont supportes, et slectionnables - au moyen de la directive AuthDBMType.
    + via la directive AuthDBMType.
    @@ -254,7 +259,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.ja.utf8 b/docs/manual/new_features_2_0.html.ja.utf8 index fd6fb6543bc..9f73508d31b 100644 --- a/docs/manual/new_features_2_0.html.ja.utf8 +++ b/docs/manual/new_features_2_0.html.ja.utf8 @@ -1,25 +1,29 @@ - -Apache 2.0 の新機能の概要 - Apache HTTP サーバ +Apache 2.0 の新機能の概要 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache 2.0 の新機能の概要

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  | @@ -28,15 +32,17 @@  ru  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    この文書では、Apache HTTP サーババージョン 1.3 と 2.0 の主な違いについて記述しています。

    +

    参照

    top

    コア機能の拡張

    @@ -244,7 +250,7 @@
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  fr  |  ja  | @@ -252,7 +258,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.ko.euc-kr b/docs/manual/new_features_2_0.html.ko.euc-kr index 653cd517d52..534f339d0ee 100644 --- a/docs/manual/new_features_2_0.html.ko.euc-kr +++ b/docs/manual/new_features_2_0.html.ko.euc-kr @@ -1,22 +1,27 @@ - -Apache 2.0 ο - Apache HTTP Server +Apache 2.0 ο - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache 2.0 ο

    :  de  |  en  | @@ -35,7 +40,7 @@

    +

    top

    ٽ κп

    @@ -231,7 +236,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.pt-br b/docs/manual/new_features_2_0.html.pt-br index d5c48cff411..50890d99c72 100644 --- a/docs/manual/new_features_2_0.html.pt-br +++ b/docs/manual/new_features_2_0.html.pt-br @@ -1,22 +1,27 @@ - -Descrio das novas funcionalidades do Apache 2.0 - Servidor HTTP Apache +Descrio das novas funcionalidades do Apache 2.0 - Servidor HTTP Apache Verso 2.4 - + + + + +

    Servidor HTTP Apache Verso 2.4

    +
    <-

    Descrio das novas funcionalidades do Apache 2.0

    +Apache > Servidor HTTP > Documentao > Verso 2.4

    Descrio das novas funcionalidades do Apache 2.0

    Lnguas Disponveis:  de  |  en  | @@ -35,7 +40,7 @@

    +

    Veja tambm

    top

    Principais Melhorias

    @@ -226,7 +231,8 @@
    mod_auth_dbm
    Agora suporta mltiplos tipos de banco de dados similares ao DBM, - usando a diretriz AuthDBMType + usando a diretriz + AuthDBMType .
    @@ -240,7 +246,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Comentrios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.ru.koi8-r b/docs/manual/new_features_2_0.html.ru.koi8-r index 714bc62c4f5..24974187693 100644 --- a/docs/manual/new_features_2_0.html.ru.koi8-r +++ b/docs/manual/new_features_2_0.html.ru.koi8-r @@ -1,22 +1,27 @@ - - Apache 2.0 - HTTP Apache + Apache 2.0 - HTTP Apache 2.4 - + + + + +

    HTTP Apache 2.4

    +
    <-

    Apache 2.0

    +Apache > HTTP > > 2.4

    Apache 2.0

    Available Languages:  de  |  en  | @@ -34,7 +39,7 @@

    +

    .

    top

    @@ -248,7 +253,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.html.tr.utf8 b/docs/manual/new_features_2_0.html.tr.utf8 index abd5e9d0346..5b3fa86ee67 100644 --- a/docs/manual/new_features_2_0.html.tr.utf8 +++ b/docs/manual/new_features_2_0.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache 2.0’da Yeni olan Özellikler - Apache HTTP Sunucusu +Apache HTTP Sunucusu 2.0’da Yeni olan Özellikler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache 2.0’da Yeni olan Özellikler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache HTTP Sunucusu 2.0’da Yeni olan Özellikler

    Mevcut Diller:  de  |  en  | @@ -27,14 +32,13 @@  ru  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belgede Apache HTTP Sunucusunun 1.3 ve 2.0 sürümleri arasındaki başlıca değişikliklerin bazılarına değinilmiştir.

    +

    Ayrıca bakınız:

    top

    Çekirdekteki Gelişmeler

    @@ -43,7 +47,7 @@
    Unix Evreleri
    -
    POSIX evreleri desteği olan Unix sistemlerinde Apache, çok evreli +
    POSIX evreleri desteği olan Unix sistemlerinde Apache httpd, çok evreli kipte çok süreçlilik şeklinde melez bir yapıda çalışır. Bu bir çok bakımdan ölçeklenebilirliği arttırsa da bütün yapılandırmalarda sağlanamaz.
    @@ -52,18 +56,18 @@
    Yeni kaynak paketi derleme sistemi autoconf ve libtool’a dayalı olarak sıfırdan, yeni baştan yazıldı. - Böylece Apache’nin paket yapılandırma sistemi diğer paketlerinkiyle + Böylece Apache httpd’nin paket yapılandırma sistemi diğer paketlerinkiyle benzerlik kazanmış oldu.
    Çok Sayıda Protokol Desteği
    -
    Apache artık çok sayıda protokol ile hizmet sunacak bir alt yapıya - sahiptir. Örneğin, mod_echo modülü bu amaçla - yazılmıştır.
    +
    Apache HTTP Sunucusu artık çok sayıda protokol ile hizmet sunacak bir + alt yapıya sahiptir. Örneğin, mod_echo modülü bu + amaçla yazılmıştır.
    Unix dışı platformalara daha iyi destek
    -
    Apache 2.0 sürümleri, BeOS, OS/2, Windows gibi Unix olmayan +
    Apache HTTP Sunucusu 2.0 sürümleri, BeOS, OS/2, Windows gibi Unix olmayan platformlarda daha hızlı ve daha kararlı çalışacak duruma getirilmiştir. Genelde iyi geliştirilmemiş olan dolayısıyla istenen başarımı sağlayamayan POSIX taklit katmanlarının kullanımından @@ -72,28 +76,28 @@ bu platformlar artık kendi doğal programlama arayüzleriyle gerçeklenir olmuştur.
    -
    Yeni Apache Programlama Arayüzü
    +
    Yeni Apache httpd Programlama Arayüzü
    Modüller için kullanılan programlama arayüzü 2.0 sürümüyle önemli değişikliklere uğramıştır. 1.3 sürümünde görülen modüllerle ilgili sıralama/öncelik sorunlarının çoğu giderilmiştir. 2.0 sürümü bu işlemleri daha bir özdevimli yapar olmuştur; daha fazla esneklik sağlamak için artık kancalı modül sıralaması kullanılabilmektedir. - Ayrıca, arayüze, Apache sunucu çekirdeğini yamamaya gerek kalmadan + Ayrıca, arayüze, Apache HTTP Sunucususu çekirdeğini yamamaya gerek kalmadan modüllerle sunucu yeteneklerinin arttırılabilmesini sağlayan yeni çağrılar eklenmiştir.
    IPv6 Desteği
    IPv6’nın Apache Taşınabilirlik Arayüzü kütüphanesi tarafından - desteklendiği sistemlerde Apache öntanımlı olarak IPv6 soketlerini + desteklendiği sistemlerde Apache httpd öntanımlı olarak IPv6 soketlerini dinler. Bundan başka, Listen, NameVirtualHost ve VirtualHost yönergelerinin IPv6 sayısal adres dizgelerini desteklemesi sağlanmıştır.
    Örnek: Listen [2001:db8::1]:8080
    Süzme
    -
    Apache modülleri, artık, sunucuya teslim edilen veya sunucudan +
    Apache httpd modülleri, artık, sunucuya teslim edilen veya sunucudan teslim alınan içerik akımları üzerinde süzgeç gibi davranacak şekilde yazılabilmektedir. Bu sayede, örneğin CGI betiklerinin çıktılarının mod_include modülünün INCLUDES süzgeci @@ -120,7 +124,7 @@
    Doğal Windows NT Unicode Desteği
    -
    Apache 2.0, Windows NT üzerinde artık tüm dosya sistemi +
    Apache httpd 2.0, Windows NT üzerinde artık tüm dosya sistemi kodlamalarında utf-8 kullanmaktadır. Bu destek, Windows 2000 ve Windows XP dahil tüm Windows NT temelli sistemlere çok dillilik desteğini sağlamak üzere mevcut Unicode dosya sistemine doğrudan @@ -130,7 +134,7 @@
    Düzenli İfade Kütüphanesi Güncellemesi
    -
    Apache 2.0’da Perl uyumlu düzenli +
    Apache httpd 2.0’da Perl uyumlu düzenli ifade kütüphanesi bulunur. Tüm düzenli ifadelerde artık çok daha güçlü olan Perl 5 sözdizimi kullanılmaktadır.
    @@ -143,25 +147,25 @@
    mod_ssl
    -
    Apache 2.0’da yeni olan bu modül, OpenSSL tarafından sağlanan +
    Apache httpd 2.0’da yeni olan bu modül, OpenSSL tarafından sağlanan SSL/TLS şifreleme protokollerine bir arayüzdür.
    mod_dav
    -
    Apache 2.0’da yeni olan bu modül, site içeriğinin destek ve bakımı +
    Apache httpd 2.0’da yeni olan bu modül, site içeriğinin destek ve bakımı için HTTP dağıtık yazım ve sürüm yönetimi (DAV - Distributed Authoring and Versioning) belirtimini gerçekler.
    mod_deflate
    -
    Apache 2.0’da yeni olan bu modül sayesinde ağ band genişliğinden +
    Apache httpd 2.0’da yeni olan bu modül sayesinde ağ band genişliğinden daha verimli yararlanabilmek için içeriğin sıkıştırılarak gönderilmesini talep eden tarayıcıların desteklenmesi mümkün olmuştur.
    -
    mod_auth_ldap
    +
    mod_auth_ldap
    -
    Apache 2.0.41’de yeni olan bu modül, HTTP temel kimlik +
    Apache httpd 2.0.41’de yeni olan bu modül, HTTP temel kimlik doğrulamasında kullanılan delillerin saklanması için LDAP veritabanının kullanılabilmesini mümkün kılar. Kardeş modülü olan mod_ldap ise bağlantı havuzlaması ve sonuçların @@ -174,18 +178,18 @@
    mod_charset_lite
    -
    Apache 2.0’da yeni olan bu deneysel modül, karakter kümesi +
    Apache httpd 2.0’da yeni olan bu deneysel modül, karakter kümesi dönüşümleri veya kaydı için destek sağlar.
    mod_file_cache
    -
    Apache 2.0’da yeni olan bu modül, Apache 1.3’teki +
    Apache httpd 2.0’da yeni olan bu modül, Apache HHP Sunucusu 1.3’teki mod_mmap_static modülünün işlevselliğini içermenin yanında buna önbellekleme yetenekleri de ekler.
    mod_headers
    -
    Bu modül Apache 2.0’da daha esnek hale getirilmiştir. Artık +
    Bu modül Apache httpd 2.0’da daha esnek hale getirilmiştir. Artık mod_proxy tarafından kullanılan istek başlıkları değiştirilebilmekte ve bunlar yanıt başlıklarına şartlı olarak atanabilmektedir.
    @@ -230,9 +234,9 @@ mod_include modülünün $0 .. $9 değişkenleri sayesinde kullanılabilmektedir. -
    mod_auth_dbm
    +
    mod_auth_dbm
    -
    AuthDBMType yönergesi +
    AuthDBMType yönergesi sayesinde artık çok sayıda DBM tarzı veritabanı türü desteklenmektedir.
    @@ -246,7 +250,28 @@  pt-br  |  ru  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_0.xml b/docs/manual/new_features_2_0.xml index b45d0c856c0..ca8032e560d 100644 --- a/docs/manual/new_features_2_0.xml +++ b/docs/manual/new_features_2_0.xml @@ -154,7 +154,7 @@ browsers to request that content be compressed before delivery, saving network bandwidth. -
    mod_auth_ldap
    +
    mod_auth_ldap
    New module in Apache httpd 2.0.41. This module allows an LDAP database to be used to store credentials for HTTP Basic @@ -223,11 +223,10 @@ using mod_include's variables $0 .. $9.
    -
    mod_auth_dbm
    +
    mod_auth_dbm
    Now supports multiple types of DBM-like databases using the - AuthDBMType - directive.
    + AuthDBMType directive. diff --git a/docs/manual/new_features_2_0.xml.de b/docs/manual/new_features_2_0.xml.de index 478f15e7c2c..c4f162bfa60 100644 --- a/docs/manual/new_features_2_0.xml.de +++ b/docs/manual/new_features_2_0.xml.de @@ -1,7 +1,7 @@ - + + - - + + + + + + -Overview of new features in Apache HTTP Server 2.2 - Apache HTTP Server +Overview of new features in Apache HTTP Server 2.2 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Overview of new features in Apache HTTP Server 2.2

    +Apache > HTTP Server > Documentation > Version 2.4

    Overview of new features in Apache HTTP Server 2.2

    Available Languages:  en  |  fr  | @@ -34,7 +39,7 @@

  • Module Enhancements
  • Program Enhancements
  • Module Developer Changes
  • -
    +

    See also

    top

    Core Enhancements

    @@ -78,7 +83,7 @@ load balancing services for mod_proxy. The new mod_proxy_ajp module adds support for the Apache JServ Protocol version 1.3 used by - Apache Tomcat. + Apache Tomcat.
    Regular Expression Library Updated
    Version 5.0 of the @@ -273,7 +278,28 @@  ko  |  pt-br  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_2.html.fr b/docs/manual/new_features_2_2.html.fr index d05c5a8aad3..2615e8e789e 100644 --- a/docs/manual/new_features_2_2.html.fr +++ b/docs/manual/new_features_2_2.html.fr @@ -1,23 +1,28 @@ - Aperu des nouvelles fonctionnalits de la version -2.2 du serveur HTTP Apache - Serveur Apache HTTP +2.2 du serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Aperu des nouvelles fonctionnalits de la version +Apache > Serveur HTTP > Documentation > Version 2.4

    Aperu des nouvelles fonctionnalits de la version 2.2 du serveur HTTP Apache

    +

    Voir aussi

    top

    Amliorations du systme de base

    @@ -90,7 +95,7 @@ Le nouveau module mod_proxy_ajp ajoute le support pour le Protocole JServ de Apache version 1.3 qu'utilise - Apache Tomcat. + Apache Tomcat.
    Mise jour de la bibliothque des expressions rationnelles
    La version 5.0 de la @@ -299,7 +304,28 @@  ko  |  pt-br  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_2.html.ko.euc-kr b/docs/manual/new_features_2_2.html.ko.euc-kr index 169c1370ece..d9ec117c5d0 100644 --- a/docs/manual/new_features_2_2.html.ko.euc-kr +++ b/docs/manual/new_features_2_2.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ġ 2.2 ο - Apache HTTP Server +ġ 2.2 ο - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    ġ 2.2 ο

    :  en  |  fr  | @@ -34,7 +39,7 @@

    +

    top

    ٽ κп

    @@ -50,7 +55,7 @@
    Ͻ
    ο mod_proxy_balancer mod_proxy Ϻл 񽺸 Ѵ. - ο mod_proxy_ajp ġ Ĺ + ο mod_proxy_ajp ġ Ĺ ϴ Apache JServ Protocol 1.3 Ѵ.
    @@ -124,7 +129,28 @@  ko  |  pt-br  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_2.html.pt-br b/docs/manual/new_features_2_2.html.pt-br index 1e79814adf9..3be5ada5240 100644 --- a/docs/manual/new_features_2_2.html.pt-br +++ b/docs/manual/new_features_2_2.html.pt-br @@ -1,22 +1,27 @@ - -Descrio das novas funcionalidades do Apache 2.2 - Servidor HTTP Apache +Descrio das novas funcionalidades do Apache 2.2 - Servidor HTTP Apache Verso 2.4 - + + + + +

    Servidor HTTP Apache Verso 2.4

    +
    <-

    Descrio das novas funcionalidades do Apache 2.2

    +Apache > Servidor HTTP > Documentao > Verso 2.4

    Descrio das novas funcionalidades do Apache 2.2

    top

    Principais Melhorias

    @@ -52,7 +57,7 @@
    Proxying
    O novo mdulo mod_proxy_balancer fornece servios de carregamento de balenceamento para mod_proxy. O novo mdulo mod_proxy_ajp oferece suporte para o Protocolo Apache JServ - verso 1.3, usado pelo Apache Tomcat.
    + verso 1.3, usado pelo Apache Tomcat.
    Filtragem Inteligente (Smart Filtering)
    O mod_filter introduz configurao dinmica para @@ -71,7 +76,7 @@
    Este mdulo uma migrao do mod_auth_ldap, da verso 2.0 para a estrutura 2.2 de Authn/Authz. As novas funcionalidades incluem o uso de atributos LDAP e - filtros de procura complexos na diretriz Require.
    + filtros de procura complexos na diretriz Require.
    mod_info
    Adicionado um novo argumento ?config que @@ -133,7 +138,28 @@  ko  |  pt-br  |  tr 

    -
    +
    top

    Comentrios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_2.html.tr.utf8 b/docs/manual/new_features_2_2.html.tr.utf8 index ff937a954c0..23db0297c87 100644 --- a/docs/manual/new_features_2_2.html.tr.utf8 +++ b/docs/manual/new_features_2_2.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache 2.2’de Yeni olan Özellikler - Apache HTTP Sunucusu +Apache HTTP Sunucusu 2.2’de Yeni olan Özellikler - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache 2.2’de Yeni olan Özellikler

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache HTTP Sunucusu 2.2’de Yeni olan Özellikler

    Mevcut Diller:  en  |  fr  | @@ -24,7 +29,6 @@  pt-br  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Bu belgede Apache HTTP Sunucusunun 2.0 ve 2.2 sürümleri arasındaki başlıca farklara değinilmiştir. 1.3 sürümüne göre yeni özellikler için Apache 2.0’da Yeni olan Özellikler @@ -34,7 +38,7 @@

  • Modüllerdeki Gelişmeler
  • Programlardaki Gelişmeler
  • Modül Geliştirici Değişiklikleri
  • -
    +

    Ayrıca bakınız:

    top

    Çekirdekteki Gelişmeler

    @@ -78,7 +82,7 @@
    Vekil Sunucu
    Yeni mod_proxy_balancer modülü ile mod_proxy için yük dengeleme hizmetleri sağlanmış, - yeni mod_proxy_ajp modülü ile Apache Tomcat tarafından + yeni mod_proxy_ajp modülü ile Apache Tomcat tarafından kullanılan Apache JServ Protokolünün 1.3 sürümü için destek eklenmiştir.
    @@ -274,7 +278,28 @@  ko  |  pt-br  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_2.xml b/docs/manual/new_features_2_2.xml index f89ffa72467..f7961ff9a32 100644 --- a/docs/manual/new_features_2_2.xml +++ b/docs/manual/new_features_2_2.xml @@ -73,7 +73,7 @@ load balancing services for mod_proxy. The new mod_proxy_ajp module adds support for the Apache JServ Protocol version 1.3 used by - Apache Tomcat. + Apache Tomcat.
    Regular Expression Library Updated
    Version 5.0 of the diff --git a/docs/manual/new_features_2_2.xml.fr b/docs/manual/new_features_2_2.xml.fr index 5b0c6f4fff6..1998997c966 100644 --- a/docs/manual/new_features_2_2.xml.fr +++ b/docs/manual/new_features_2_2.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -86,7 +86,7 @@ Le nouveau module mod_proxy_ajp ajoute le support pour le Protocole JServ de Apache version 1.3 qu'utilise - Apache Tomcat.
    + Apache Tomcat.
    Mise à jour de la bibliothèque des expressions rationnelles
    La version 5.0 de la diff --git a/docs/manual/new_features_2_2.xml.ko b/docs/manual/new_features_2_2.xml.ko index a932891b71c..eaa8024b3b5 100644 --- a/docs/manual/new_features_2_2.xml.ko +++ b/docs/manual/new_features_2_2.xml.ko @@ -1,7 +1,7 @@ - + + + -Overview of new features in Apache HTTP Server 2.4 - Apache HTTP Server +Overview of new features in Apache HTTP Server 2.4 - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Overview of new features in Apache HTTP Server 2.4

    +Apache > HTTP Server > Documentation > Version 2.4

    Overview of new features in Apache HTTP Server 2.4

    Available Languages:  en  | - fr 

    + fr  | + tr 

    This document describes some of the major changes between the @@ -31,20 +37,26 @@

  • New Modules
  • Module Enhancements
  • Program Enhancements
  • +
  • Documentation
  • Module Developer Changes
  • -
    +

    See also

    top

    Core Enhancements

    -
    KeepAliveTimeout in milliseconds
    -
    It is now possible to specify KeepAliveTimeout in milliseconds. -
    +
    Run-time Loadable MPMs
    +
    Multiple MPMs can now be built + as loadable modules at compile time. + The MPM of choice can be configured at run time via LoadModule directive.
    -
    Loadable MPMs
    -
    Multiple MPMs can now be built as loadable modules at compile time. - The MPM of choice can be configured at run time.
    +
    Event MPM
    +
    The Event MPM is no longer experimental + but is now fully supported.
    + +
    Asynchronous support
    +
    Better support for asynchronous read/write for supporting MPMs and + platforms.
    Per-module and per-directory LogLevel configuration
    The LogLevel can now be @@ -52,81 +64,134 @@ to trace8 have been added above the debug log level.
    -
    Event MPM
    -
    The Event MPM is no longer experimental but is now fully supported.
    - -
    Asynchronous support
    -
    Better support for asynchronous read/write for supporting MPMs and - platforms.
    -
    Per-request configuration sections
    -
    <If> sections can be used to - set the configuration based on per-request criteria
    +
    <If>, + <ElseIf>, + and <Else> + sections can be used to set the configuration based on per-request + criteria.
    + +
    General-purpose expression parser
    +
    A new expression parser allows to specify + complex conditions using a common syntax + in directives like + SetEnvIfExpr, + RewriteCond, + Header, + <If>, + and others. +
    + +
    KeepAliveTimeout in milliseconds
    +
    It is now possible to specify KeepAliveTimeout in milliseconds. +
    NameVirtualHost directive
    No longer needed and is now deprecated.
    +
    Override Configuration
    +
    The new AllowOverrideList + directive allows more fine grained control which directives are + allowed in .htaccess files.
    + +
    Config file variables
    +
    It is now possible to Define + variables in the configuration, allowing a clearer representation + if the same value is used at many places in the configuration. +
    + +
    Reduced memory usage
    +
    Despite many new features, 2.4.x tends to use less memory than + 2.2.x.
    +
    top

    New Modules

    -
    mod_allowmethods
    -
    New module to restrict certain HTTP methods without interfering with - authentication or authorization.
    - -
    mod_buffer
    -
    Provides for buffering the input and output filter stacks
    - -
    mod_data
    -
    Convert response body into an RFC2397 data URL
    - -
    mod_lua
    -
    Embeds the Lua language into httpd, - for configuration and small business logic functions.
    - -
    mod_proxy_express
    -
    Provides dynamically configured mass reverse proxies for mod_proxy
    -
    mod_proxy_fcgi
    FastCGI Protocol backend for mod_proxy
    mod_proxy_scgi
    SCGI Protocol backend for mod_proxy
    -
    mod_ratelimit
    -
    Provides Bandwidth Rate Limiting for Clients
    - -
    mod_reflector
    -
    Provides Reflection of a request body as a response via the output filter stack.
    +
    mod_proxy_express
    +
    Provides dynamically configured mass reverse proxies for + mod_proxy
    mod_remoteip
    Replaces the apparent client remote IP address and hostname for the request with the IP address list presented by a proxies or a load balancer via the request headers.
    -
    mod_reqtimeout
    -
    Set timeout and minimum data rate for receiving requests
    +
    mod_heartmonitor, + mod_lbmethod_heartbeat
    +
    Allow mod_proxy_balancer to base loadbalancing decisions + on the number of active connections on the backend servers.
    + +
    mod_proxy_html
    +
    Formerly a third-party module, this supports fixing of HTML + links in a reverse proxy situation, where the backend generates + URLs that are not valid for the proxy's clients.
    + +
    mod_sed
    +
    An advanced replacement of mod_substitute, allows + to edit the response body with the full power of sed.
    + +
    mod_auth_form
    +
    Enables form-based authentication.
    + +
    mod_session
    +
    Enables the use of session state for clients, using cookie or + database storage.
    + +
    mod_allowmethods
    +
    New module to restrict certain HTTP methods without interfering with + authentication or authorization.
    + +
    mod_lua
    +
    Embeds the Lua language into httpd, + for configuration and small business logic functions. (Experimental)
    + +
    mod_log_debug
    +
    Allows the addition of customizable debug logging at different phases of the + request processing.
    + +
    mod_buffer
    +
    Provides for buffering the input and output filter stacks
    + +
    mod_data
    +
    Convert response body into an RFC2397 data URL
    + +
    mod_ratelimit
    +
    Provides Bandwidth Rate Limiting for Clients
    mod_request
    Provides Filters to handle and make available HTTP request bodies
    +
    mod_reflector
    +
    Provides Reflection of a request body as a response via the output filter stack.
    +
    mod_slotmem_shm
    Provides a Slot-based shared memory provider (ala the scoreboard).
    -
    mod_log_debug
    -
    Allows to add customizable debug logging at different phases of the - request processing.
    -
    mod_xml2enc
    Formerly a third-party module, this supports internationalisation in libxml2-based (markup-aware) filter modules.
    -
    mod_proxy_html
    -
    Formerly a third-party module, this supports fixing of HTML - links in a reverse proxy situation, where the backend generates - URLs that are not valid for the proxy's clients.
    +
    mod_macro (available since 2.4.5)
    +
    Provide macros within configuration files.
    + +
    mod_proxy_wstunnel (available since 2.4.5)
    +
    Support web-socket tunnels.
    + +
    mod_authnz_fcgi (available since 2.4.10)
    +
    Enable FastCGI authorizer applications to authenticate and/or + authorize clients.
    + +
    mod_http2 (available since 2.4.17)
    +
    Support for the HTTP/2 transport layer.
    top
    @@ -149,6 +214,10 @@
    mod_ssl can now be configured to share SSL Session data between servers through memcached
    +
    EC keys are now supported in addition to RSA and DSA.
    + +
    Support for TLS-SRP (available in 2.4.4 and later).
    +
    mod_proxy
    The ProxyPass directive @@ -157,6 +226,9 @@ LocationMatch block, and offers a significant performance advantage over the traditional two-parameter syntax when present in large numbers.
    +
    The source address used for proxy requests is now configurable.
    +
    Support for Unix domain sockets to the backend (available in 2.4.7 + and later).
    mod_proxy_balancer
    @@ -169,10 +241,14 @@
    BalancerMembers can be set to 'Drain' so that they only respond to existing sticky sessions, allowing them to be taken gracefully offline.
    -
    Balancer settings can be persistant after restarts.
    +
    Balancer settings can be persistent after restarts.
    mod_cache
    +
    The mod_cache CACHE filter can be optionally inserted + at a given point in the filter chain to provide fine control over caching. +
    +
    mod_cache can now cache HEAD requests.
    Where possible, mod_cache directives can now be set @@ -209,24 +285,44 @@ and the related container directives, such as <RequireAll>.
    +
    mod_rewrite
    +
    mod_rewrite adds the [QSD] + (Query String Discard) and [END] flags for + RewriteRule to + simplify common rewriting scenarios.
    +
    Adds the possibility to use complex boolean expressions in RewriteCond.
    +
    Allows the use of SQL queries as RewriteMap functions.
    + +
    mod_ldap, mod_authnz_ldap
    +
    mod_authnz_ldap adds support for nested groups.
    +
    mod_ldap adds + LDAPConnectionPoolTTL, + LDAPTimeout, and + other improvements in the handling of timeouts. + This is especially useful for setups where a + stateful firewall drops idle connections to the LDAP server.
    +
    mod_ldap adds + LDAPLibraryDebug to log + debug information provided by the used LDAP toolkit.
    +
    mod_info
    mod_info can now dump the pre-parsed configuration to stdout during server startup.
    -
    mod_rewrite
    -
    mod_rewrite adds the [QSD] - (Query String Discard) and [END] flags for - RewriteRule to - simplify common rewriting scenarios.
    +
    mod_auth_basic
    +
    New generic mechanism to fake basic authentication (available in + 2.4.5 and later).
    +
    top

    Program Enhancements

    -
    fcgistarter
    -
    FastCGI deamon starter utility
    -
    htcacheclean
    +
    fcgistarter
    +
    New FastCGI daemon starter utility
    + +
    htcacheclean
    Current cached URLs can now be listed, with optional metadata included.
    Allow explicit deletion of individual cached URLs from the @@ -236,6 +332,41 @@
    Cache size can now be limited by the number of inodes, instead of or in addition to being limited by the size of the files on disk.
    + +
    rotatelogs
    +
    May now create a link to the current log file.
    +
    May now invoke a custom post-rotate script.
    + +
    htpasswd, htdbm
    +
    Support for the bcrypt algorithm (available in 2.4.4 and later). +
    +
    +
    top
    +
    +

    Documentation

    + +
    +
    mod_rewrite
    +
    The mod_rewrite documentation has been + rearranged and almost completely rewritten, with a focus on + examples and common usage, as well as on showing you when other + solutions are more appropriate. The Rewrite + Guide is now a top-level section with much more detail and + better organization.
    + +
    mod_ssl
    +
    The mod_ssl documentation has been greatly + enhanced, with more examples at the getting started level, in + addition to the previous focus on technical details.
    + +
    Caching Guide
    +
    The Caching Guide has been rewritten + to properly distinguish between the RFC2616 HTTP/1.1 caching + features provided by mod_cache, and the generic + key/value caching provided by the socache + interface, as well as to cover specialised caching provided by + mechanisms such as mod_file_cache.
    +
    top
    @@ -291,8 +422,30 @@

    Available Languages:  en  | - fr 

    -
    + fr  | + tr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_4.html.fr b/docs/manual/new_features_2_4.html.fr index 3addfc551ed..b27235ab71c 100644 --- a/docs/manual/new_features_2_4.html.fr +++ b/docs/manual/new_features_2_4.html.fr @@ -1,27 +1,33 @@ - Vue d'ensemble des nouvelles fonctionnalits de la version 2.4 du -serveur HTTP Apache - Serveur Apache HTTP +serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Vue d'ensemble des nouvelles fonctionnalits de la version 2.4 du +Apache > Serveur HTTP > Documentation > Version 2.4

    Vue d'ensemble des nouvelles fonctionnalits de la version 2.4 du serveur HTTP Apache

    Langues Disponibles:  en  | - fr 

    + fr  | + tr 

    Ce document dcrit les modifications majeures apportes par @@ -34,22 +40,26 @@ serveur HTTP Apache

  • Nouveau modules
  • Amliorations des modules
  • Amliorations des programmes
  • +
  • Documentation
  • Modifications concernant les dveloppeur de modules
  • -
    +

    Voir aussi

    top

    Amliorations du noyau

    -
    KeepAliveTimeout en millisecondes
    -
    La directive KeepAliveTimeout permet dornavant de - prciser une dure de vie en millisecondes. -
    +
    Modules multiprocessus (MPMs) chargeables l'excution
    +
    Plusieurs MPMs peuvent maintenant tre compils en tant que modules + chargeables. Le choix du MPM utiliser s'effectue + l'excution via la directive LoadModule.
    + +
    MPM Event
    +
    Le MPM Event n'en est plus au stade exprimental et est + maintenant pleinement support.
    -
    Modules multiprocessus (MPMs) chargeables
    -
    On peut maintenant compiler plusieurs MPMs en tant que modules - chargeables. Le choix du MPM utiliser s'effectue - l'excution.
    +
    Support du mode asynchrone
    +
    Le support des lectures/critures asynchrones pour les MPMs et + les plateformes qui l'implmentent a t amlior.
    Configuration du niveau de journalisation (LogLevel) par module et par rpertoire
    @@ -58,47 +68,51 @@ serveur HTTP Apache nouveaux niveaux trace1 trace8 ont t ajouts au dessus du niveau de journalisation debug. -
    MPM Event
    -
    Le MPM Event est sorti du stade exprimental et est - maintenant pleinement support.
    - -
    Support du mode asynchrone
    -
    Le support des lectures/critures asynchrones pour les MPMs et - les plateformes qui l'implmentent a t amlior.
    - -
    Sections de configuration au niveau de la requte
    -
    Les sections <If> +
    Sections de configuration au niveau requte
    +
    Les sections If, + <ElseIf> et + <Else> permettent de dfinir une configuration en fonction de critres lis la requte.
    -
    NameVirtualHost directive
    -
    Cette directive obsolte n'est plus utile.
    +
    Interprteur d'expressions usage gnral
    +
    Un nouvel interprteur d'expressions permet de spcifier des + conditions complexes via des directives + syntaxe commune comme SetEnvIfExpr, RewriteCond, Header, + <If>, etc... +
    + +
    KeepAliveTimeout en millisecondes
    +
    Il est maintenant possible de dfinir la directive KeepAliveTimeout en millisecondes. +
    + +
    Directive NameVirtualHost
    +
    Cette directive n'est plus ncessaire et est maintenant obsolte.
    + +
    Directives autorises dans les fichiers .htaccess
    +
    La nouvelle directive AllowOverrideList permet de contrler de + manire plus prcise la liste des directives autorises dans les + fichiers .htaccess.
    + +
    Variables dans les fichiers de configuration
    +
    La directive Define + permet de dfinir des variables dans les fichiers de + configuration, amliorant ainsi la claret de la prsentation si + la mme valeur est utilise en plusieurs points de la + configuration. +
    + +
    Diminution de la mmoire utilise
    +
    Bien qu'elle propose de nombreuses nouvelles fonctionnalits, + la version 2.4.x tend utiliser moins de mmoire que la version + 2.2.x.
    top

    Nouveau modules

    -
    -
    mod_allowmethods
    -
    Permet de restreindre l'utilisation de - certaines mthodes HTTP sans interfrer avec l'authentification et - l'autorisation.
    - -
    mod_buffer
    -
    Fournit un tampon pour les piles des filtres en entre et en - sortie.
    - -
    mod_data
    -
    Convertit un corps de rponse en URL de type donnes RFC2397.
    - -
    mod_lua
    -
    Embarque le langage Lua dans - httpd pour la configuration et les fonctions logiques courantes.
    - -
    mod_proxy_express
    -
    Ajoute mod_proxy la configuration dynamique - de mandataires inverses en masse.
    +
    mod_proxy_fcgi
    Mise disposition du protocole FastCGI pour @@ -108,13 +122,9 @@ serveur HTTP Apache
    Mise disposition du protocole SCGI pour mod_proxy.
    -
    mod_ratelimit
    -
    Permet de limiter la bande passante pour certains - clients.
    - -
    mod_reflector
    -
    Permet de renvoyer comme rponse le corps de la requte via la - pile du filtre de sortie.
    +
    mod_proxy_express
    +
    Ajoute mod_proxy la configuration dynamique + de mandataires inverses en masse.
    mod_remoteip
    Remplace l'adresse IP distante et le nom d'hte apparents du @@ -122,33 +132,85 @@ serveur HTTP Apache prsente par un mandataire ou un rpartiteur de charge via les en-ttes de la requte.
    -
    mod_reqtimeout
    -
    Dfinit la dure de vie et le taux de transfert de donnes minimum - pour la rception des requtes.
    +
    mod_heartmonitor, + mod_lbmethod_heartbeat
    +
    Permet mod_proxy_balancer de rpartir la + charge en fonction du nombre de connexions actives sur les + serveurs d'arrire-plan.
    + +
    mod_proxy_html
    +
    Anciennement module tiers, il supporte la correction des liens + HTML dans une situation de mandat inverse, o le serveur + d'arrire-plan gnre des URLs qui ne sont pas valides du point de + vue des clients du mandataire.
    + +
    mod_sed
    +
    Une amlioration de mod_substitute qui permet + d'diter le corps de la rponse avec toute la puissance de la + commande sed.
    + +
    mod_auth_form
    +
    Implmente une authentification base de formulaire.
    + +
    mod_session
    +
    Permet de conserver les donnes de sessions des clients sous + forme de cookies ou dans une base de donnes.
    + +
    mod_allowmethods
    +
    Permet de restreindre l'utilisation de + certaines mthodes HTTP sans interfrer avec l'authentification et + l'autorisation.
    + +
    mod_lua
    +
    Embarque le langage Lua dans + httpd pour la configuration et les fonctions logiques courantes + (Exprimental).
    + +
    mod_log_debug
    +
    Permet d'introduire une journalisation personnalise + diffrentes phases du traitement de la requte.
    + +
    mod_buffer
    +
    Fournit un tampon pour les piles des filtres en entre et en + sortie.
    + +
    mod_data
    +
    Convertit un corps de rponse en URL de type donnes RFC2397.
    + +
    mod_ratelimit
    +
    Permet de limiter la bande passante pour certains + clients.
    mod_request
    Fournit des filtres permettant de grer et de mettre disposition les corps des requtes HTTP.
    +
    mod_reflector
    +
    Permet de renvoyer comme rponse le corps de la requte via la + pile du filtre de sortie.
    +
    mod_slotmem_shm
    Met disposition un fournisseur de mmoire partage base de slots (du style tableau de bord).
    -
    mod_log_debug
    -
    Permet d'introduire une journalisation personnalise - diffrentes phases du traitement de la requte.
    -
    mod_xml2enc
    Anciennement module tiers, il supporte l'internationalisation dans les modules de filtrage bass sur libxml2 (support du markup)
    - -
    mod_proxy_html
    -
    Anciennement module tiers, il supporte la correction des liens - HTML dans une situation de mandat inverse, o le serveur - d'arrire-plan gnre des URLs qui ne sont pas valides du point de - vue des clients du mandataire.
    +
    mod_macro (disponible partir de la version 2.4.5)
    +
    Permet d'utiliser des macros au sein des fichiers de + configuration.
    + +
    mod_proxy_wstunnel (disponible partir de la version 2.4.5)
    +
    Support des tunnels web-socket.
    + +
    mod_authnz_fcgi (disponible partir de la version 2.4.10)
    +
    Permet aux applications d'autorisation FastCGI d'authentifier + et/ou autoriser les clients.
    + +
    mod_http2 (disponible partir de la version 2.4.17)
    +
    Support de la couche transport HTTP/2.
    top
    @@ -174,6 +236,11 @@ serveur HTTP Apache que celui-ci partage les donnes de session SSL entre les serveurs via memcached. +
    Le support des cls EC a t ajout celui des cls RSA et + DSA.
    + +
    Support de TLS-SRP (disponible partir de la version 2.4.4).
    +
    mod_proxy
    La directive ProxyPass est maintenant configure @@ -181,6 +248,12 @@ serveur HTTP Apache performances important par rapport la syntaxe traditionnelle deux paramtres lorsqu'elle est prsente en grand nombre.
    +
    Il est maintenant possible de configurer l'adresse source dans + les requtes mandates.
    + +
    Support des sockets de type Unix vers le serveur + d'arrire-plan (disponible partir de la version 2.4.7).
    +
    mod_proxy_balancer
    Le gestionnaire de rpartition de charge propose de nouvelles @@ -201,6 +274,11 @@ serveur HTTP Apache
    mod_cache
    +
    Le filtre CACHE du module mod_cache peut tre + insr un certain point de la chane de filtrage pour contrler + plus finement la mise en cache. +
    +
    mod_cache peut maintenant mettre en cache des requtes HEAD.
    @@ -236,22 +314,43 @@ serveur HTTP Apache clients anciens qui ncessitent de tels en-ttes (Ceci affecte tous les modules qui utilisent ces variables d'environnement). -
    mod_authz_coreConteneurs de logique d'autorisation
    +
    mod_authz_core Conteneurs de logique d'autorisation
    La directive Require et les directives de conteneurs associes, comme <RequireAll>, permettent de dfinir une logique d'autorisation avance.
    -
    mod_info
    -
    mod_info est maintenant capable d'afficher la - configuration printerprte sur stdout au cours du dmarrage du - serveur.
    +
    mod_rewrite
    La directive RewriteRule dispose maintenant des drapeaux [QSD] (Query String Discard) et [END] qui permettent de simplifier les scnarios de rcriture courants.
    +
    Possibilit d'utiliser des expressions boolennes complexes + dans la directive RewriteCond.
    +
    Possibilit d'utiliser des requtes SQL en tant que fonctions + dans la directive RewriteMap.
    + +
    mod_ldap, mod_authnz_ldap
    +
    mod_authnz_ldap ajoute le support des + groupes imbriqus.
    +
    mod_ldap apporte les directives LDAPConnectionPoolTTL et LDAPTimeout, ainsi que d'autres + amliorations dans le traitement des dlais. Ceci s'avre utile + pour les configurations o un pare-feu mmoire d'tat (stateful) + rejte les connexions inactives vers le serveur LDAP.
    +
    mod_ldap propose la directive LDAPLibraryDebug qui permet de + journaliser les informations de dbogage fournies par la bote + outils LDAP utilise.
    + +
    mod_info
    +
    mod_info est maintenant capable d'afficher la + configuration printerprte sur stdout au cours du dmarrage du + serveur.
    + +
    mod_auth_basic
    +
    Nouveau mcanisme gnrique permettant d'effectuer une + authentification basique (disponible partir de la version 2.4.5).
    top
    @@ -259,9 +358,10 @@ serveur HTTP Apache

    Amliorations des programmes

    -
    fcgistarter
    -
    Utilitaire pour le dmarrage des dmons FastCGI
    -
    htcacheclean
    +
    fcgistarter
    +
    Nouvel utilitaire pour le dmarrage des dmons + FastCGI.
    +
    htcacheclean
    Les URLs prsentes dans le cache peuvent maintenant tre affiches, accompagnes ventuellement de leurs mtadonnes.
    Possibilit de supprimer explicitement des URLs individuelles @@ -272,6 +372,46 @@ serveur HTTP Apache
    La taille du cache peut maintenant tre limite par le nombre d'inodes, en plus de la possibilit de limitation par la taille des fichiers.
    + +
    rotatelogs
    +
    Possibilit de crer un lien vers le fichier journal + courant.
    +
    Possibilit d'invoquer un script personnalis aprs la + rotation.
    + +
    htpasswd, htdbm
    +
    Support de l'algorithme bcrypt (disponible partir de la + version 2.4.4). +
    +
    +
    top
    +
    +

    Documentation

    + +
    +
    mod_rewrite
    +
    La documentation du module mod_rewrite a + t rorganise et presque entirement rcrite en mettant + l'accent sur les exemples et l'utilisation courante, ainsi que + sur l'incitation utiliser d'autres solutions lorsque cela + s'avre plus appropri. Le document Rewrite + Guide constitue maintenant une section de premier niveau ; + il est mieux organis et contient beaucoup plus de dtails.
    + +
    mod_ssl
    +
    La documentation du module mod_ssl a t + grandement amliore, avec plus d'exemples et un niveau "Bien + dmarrer" qui s'ajoutent aux dtails techniques dj prsents + dans la prcdente documentation.
    + +
    Caching Guide
    +
    Le Guide de la mise en cache a + t rcrit afin de bien faire la diffrence entre les + fonctionnalits de mise en cache de la RFC2616 HTTP/1.1 fournies + par le module mod_cache, et la mise en cache + gnrique de type cl/valeur fournie par l'interface socache, mais aussi pour couvrir la mise + en cache spcialise fournie par des mcanismes tels que ceux du + module mod_file_cache.
    top
    @@ -331,8 +471,30 @@ serveur HTTP Apache

    Langues Disponibles:  en  | - fr 

    -
    + fr  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/new_features_2_4.html.tr.utf8 b/docs/manual/new_features_2_4.html.tr.utf8 new file mode 100644 index 00000000000..daaa9838ca1 --- /dev/null +++ b/docs/manual/new_features_2_4.html.tr.utf8 @@ -0,0 +1,460 @@ + + + + + +Apache HTTP Sunucusu 2.4'te Yeni olan Özellikler - Apache HTTP Sunucusu Sürüm 2.4 + + + + + + + +
    <-
    +

    Apache HTTP Sunucusu 2.4'te Yeni olan Özellikler

    +
    +

    Mevcut Diller:  en  | + fr  | + tr 

    +
    + +

    Bu belgede Apache HTTP Sunucusunun 2.2 ve 2.4 sürümleri arasındaki + başlıca farklara değinilmiştir. 2.0 sürümüne göre yeni özellikler için Apache 2.2’de Yeni olan Özellikler + belgesine bakınız.

    +
    + +
    top
    +
    +

    Çekirdekteki Gelişmeler

    + +
    +
    Çalışma anında yüklenebilen MPM'ler
    +
    Çok sayıda MPM artık yüklenebilir + modül olarak derlenebilmektedir. Kullanılacak MPM'in seçimi + çalışma anında LoadModule + yönergesi üzerinden yapılabilmektedir.
    + +
    Event MPM
    +
    Event MPM artık deneysel değil, ancak + tam olarak desteklenmiyor.
    + +
    Eşzamansıza destek
    +
    MPM'leri ve platformları desteklemek için eşzamansız okuma/yazmaya + destek iyileştirildi.
    + +
    Modul bazında ve dizin bazına LogLevel yapılandırması
    +
    LogLevel artık her modül ve her + dizin için yapılandırılabilmektedir. debug log + seviyesinin üstüne trace1'den trace8'e + kadar yeni log seviyeleri eklendi.
    + +
    İstek bazında yapılandırma bölümleri
    +
    <If>, + <ElseIf>, + ve <Else> bölümleri + artık HTTP isteklerine dayalı olarak yapılandırılabilmektedir.
    + +
    Genel amaçlı ifade çözümleyici
    +
    Yeni ifade çözümleyici + SetEnvIfExpr, + RewriteCond, + Header, + <If> ve + benzeri yönergelerde ortak bir sözdizimi kullanarak karmaşık durumlar belirtmeyi mümkün kılmaktadır. +
    + +
    Milisaniye cinsinden KeepAliveTimeout
    +
    KeepAliveTimeout milisaniye + cinsinden belirtmek artık mümkündür.
    + +
    NameVirtualHost yönergesi
    +
    Artık gerekmemekte ve kullanımı önerilmemektedir.
    + +
    Yapılandırma geçersizleştirme
    +
    Yeni AllowOverrideList + yönergesi .htaccess dosyalarında kullanılabilen + yönergelerde daha ince ayarlara izin vermektedir.
    + +
    Yapılandırma dosyası değişkenleri
    +
    Yapılandırmada değişkenler Define yönergesi ile tanımlanabilmekte, böylece aynı + değer yapılandırmada bir çok yerde kullanılıyorsa daha temiz bir + görünüm elde edilebilmektedir.
    + +
    Azaltılmış bellek kullanımı
    +
    Bir çok yeni özelliğe karşın, 2.4.x'te 2.2.x'e nazaran bellek + kullanımı azaltılmıştır.
    +
    +
    top
    +
    +

    Yeni Modüller

    + +
    +
    mod_proxy_fcgi
    +
    mod_proxy için FastCGI Protokolü sağlayıcısı
    + +
    mod_proxy_scgi
    +
    mod_proxy için SCGI Protokolü sağlayıcısı
    + +
    mod_proxy_express
    +
    mod_proxy için devingen olarak yapılandırılmış tam + tersinir vekiller sağlar.
    + +
    mod_remoteip
    +
    İstek başlıklarında bir yük dengeleyici veya bir vekil tarafından + sunulan IP adres listeli bir istek için görünen istemci IP adresi ve + konak adını değiştirir.
    + +
    mod_heartmonitor, + mod_lbmethod_heartbeat
    +
    mod_proxy_balancer modülünün arka sunuculardaki + etkin bağlantı sayısı üzerindeki yük dengeleme kararlarına dayalı işlem + yapmasını sağlar.
    + +
    mod_proxy_html
    +
    Başta bir üçüncü parti modüldü. Arka plandaki sağlayıcının vekil + istemcileri için geçersiz URL'ler ürettiği tersinir vekil durumlarında + HTML bağlarının düzeltilmesini sağlar.
    + +
    mod_sed
    +
    mod_substitute modülünün geliştirilmiş hali olup + yanıt gövdesinin sed'in tüm gücü ile yeniden düzenlenebilmesini + sağlar.
    + +
    mod_auth_form
    +
    Formlara dayalı kimlik kanıtlamayı etkinleştirir.
    + +
    mod_session
    +
    Çerezleri ve veritabanı deposunu kullanarak istemciler için oturum + durumunun saklanmasını etkinleştirir.
    + +
    mod_allowmethods
    +
    Kimlik Doğrulama ve Yetkilendirme ile etkileşmeyen belli HTTP + yöntemlerine sınır koymak için yeni bir modül.
    + +
    mod_lua
    +
    Küçük iş mantıksal işlevleri ve yapılandırması için httpd içine Lua dilini gömer.
    + +
    mod_log_debug
    +
    İstek işlemlerinin farklı aşamalarına özelleştirilebilir hata + ayıklama günlüğü eklenmesini sağlar.
    + +
    mod_buffer
    +
    Girdi ve çıktı süzgeç yığıtlarına tampon bellek sağlar.
    + +
    mod_data
    +
    Yanıt gövdesini bir RFC2397 veri URL'sine dönüştürür.
    + +
    mod_ratelimit
    +
    İstemciler için band genişliği oranında sınırlama sağlar.
    + +
    mod_request
    +
    Kullanılabilir HTTP istek gövdelerini yapmak ve elde etmek için + Süzgeçleri sağlar.
    + +
    mod_reflector
    +
    Çıktı süzgeci yığıtı üzerinden bir yanıt olarak bir istek gövdesinin + yansısını sağlar.
    + +
    mod_slotmem_shm
    +
    Yuva temelli bir paylaşımlı bellek sağlayıcı sağlar (scoreboard + olarak da bilinir).
    + +
    mod_xml2enc
    +
    Başta bir üçüncü parti modüldü. libxml2 temelli süzgeç modüllerinde + i18n'i destekler.
    + +
    mod_macro (2.4.5'den itibaren kullanılabilir)
    +
    Yapılandırma dosyalarında makro kullanımını sağlar.
    + +
    mod_proxy_wstunnel (2.4.5'den itibaren kullanılabilir)
    +
    Web-socket tünelleri için destek.
    + +
    mod_authnz_fcgi (2.4.10'dan itibaren kullanılabilir)
    +
    Kimlik kanıtlama ve/veya istemcileri yetkilendirmek için FastCGI + yetkilendirme uygulamalarını etkinleştirir.
    + +
    mod_http2 (2.4.17'den itibaren kullanılabilir)
    +
    HTTP/2 aktarım katmanı desteği.
    +
    +
    top
    +
    +

    Modüllerdeki Gelişmeler

    + +
    +
    mod_ssl
    + +
    mod_ssl bir istemci sertifikasının doğrulama + durumunu sınamak için bir OCSP sunucusunu kullanmak üzere + yapılandırılabilir. Öntanımlı yanıtlayıcı, istemci sertifikasının + kendisinde tasarlanmış yanıtlayıcının tercih edilip edilmeyeceği + kararına bağlı olarak yapılandırılabilir.
    + +
    mod_ssl, ayrıca, sunucunun istemciyle anlaşma + sırasında kendi sertifikasının OCSP doğrulamasını umursamazca sağlayıp + aktardığı durumda OCSP zımbalamasını da destekler.
    + +
    mod_ssl, sunucular arasında SSL Oturumu verisini + memcached üzerinden paylaşmak üzere yapılandırılabilir.
    + +
    RSA ve DSA'ya ek olarak EC anahtarları da artık desteklenmektedir. +
    + +
    TLS-SRP için destek (2.4.4 itibariyle kullanılabilir).
    + +
    mod_proxy
    + +
    ProxyPass yönergesi bir + Location veya + LocationMatch bloku içinde en + verimli şekilde yapılandırılabilir ve büyük sayıların varlığı durumunda + geleneksel iki değiştirgeli sözdiziminin de üzerinde belirgin bir + başarım artışı sağlar.
    + +
    Vekil istekleri için kullanılan kaynak adresi artık + yapılandırılabilmektedir.
    + +
    Artalanda Unix alan soketleri için destek (2.4.7 itibariyle + kullanılabilir).
    + +
    mod_proxy_balancer
    + +
    Dengeleme yöneticisi üzerinden BalancerMembers için daha fazla + çalışma anı yapılandırması
    + +
    Çalışma anında dengeleme yöneticisi üzerinden başka BalancerMembers + eklenebilir.
    + +
    Çalışma anı yapılandırmasına yönelik dengeleyici değiştirgeleri
    + +
    BalancerMembers için 'Drain' değeri belirtilebilir; böylece sadece + mevcut yapışık oturumlara yanıt verirler ve bunların güzellikle hattan + alınması mümkün olur.
    + +
    Balancer ayarları sunucu yeniden başlatılssa bile kalıcı olabilir. +
    + +
    mod_cache
    + +
    mod_cache CACHE süzgeci, arabellekleme üzerinde daha + hassas denetim sağlamak için istenirse süzgeç zincirinin belli bir + noktasına yerleştirilebilmektedir.
    + +
    mod_cache artık HEAD isteklerini + arabellekleyebiliyor.
    + +
    Mümkün olduğunda, mod_cache yönergeleri sunucu + bazında değil, dizin bazında belirtilebiliyor.
    + +
    Arabellekli URL'lerin temel URL'si özelleştirilebiliyor; böylece + arabelleğin bir bölümü aynı uç URL önekini paylaşabiliyor.
    + +
    mod_cache, ardalanda bir sağlayıcının olmadığı + durumda (5xx hatası), arabelleklenmiş bayat içeriği sunabiliyor.
    + +
    mod_cache artık bir X-Cache başlığına bir + HIT/MISS/REVALIDATE yerleştirebiliyor.
    + +
    mod_include
    +
    Bir hata durumunda öntanımlı hata dizgisi yerine bir hata sayfası + sunmayı sağlayan 'onerror' özniteliği için 'include' elemanı içinde + destek.
    + +
    mod_cgi, mod_include, + mod_isapi, ...
    +
    Başlıkların ortam değişkenlerine dönüşümü, başlık zerki yoluyla bazı + olası karşı-site-betik saldırılarının hafifletilmesinden önce daha + hızlı ve doğru yapılmaktadır. Geçersiz karakterler (altçizgiler dahil) + içeren başlıklar artık sessizce bırakılmaktadır.Apache'deki Ortam değişkenleri, böyle başlıkları + gerektiren bozulmuş meşru istemcilerin çevresinden dolanabilen + göstericilere sahiptir. (Bu durum, bu değişkenleri kullanan tüm + modülleri etkiler.)
    + +
    mod_authz_core Yetkilendirme Kuralları + Taşıyıcıları
    + +
    Gelişkin yetkilendirme kuralları artık Require yönergesi ve <RequireAll> gibi + ilgili taşıyıcı yönergeler kullanılarak belirtilebilmektedir.
    + +
    mod_rewrite
    +
    mod_rewrite bildik yeniden yazma senaryolarını + basitleştirmek için RewriteRule yönergesine + [QSD] (Query String Discard=sorgu dizgisini iptal) ve + [END] seçeneklerini sağlamaktadır.
    +
    RewriteCond içinde + karmaşık mantıksal ifadeler kullanımını mümkün kılmaktadır.
    +
    SQL sorgularının RewriteMap işlevleri olarak + kullanılması sağlanmıştır.
    + +
    mod_ldap, mod_authnz_ldap
    +
    mod_authnz_ldap kümelenmiş gruplara destek sağlar. +
    +
    mod_ldap zaman aşımlarını işleme sokabilmek için + LDAPConnectionPoolTTL, + LDAPTimeout ve birtakım + başka geliştirmeler sahiptir. Özellikle, bir LDAP sunucusunun boşta + kalmış bağlantılarını bıraktıran bir durumsal güvenlik duvarı + varlığında gerekli ayarlamaları yapmak için kullanışlıdır.
    +
    mod_ldap, artık, LDAP araç kiti kullanarak sağlanan + hata ayıklama bilgisini günlüklemek için LDAPLibraryDebug yönergesini + içermektedir.
    + +
    mod_info
    +
    mod_info önceden çözümlenmiş yapılandırmayı artık + sunucunun başlatılması sırasında standart çıktıya + dökümleyebilmektedir.
    + +
    mod_auth_basic
    +
    Temel kimlik kanıtlamayı taklit eden yeni temel mekanizma + (2.4.5 itibariyle kullanılabilmektedir).
    +
    +
    top
    +
    +

    Programlardaki Gelişmeler

    + +
    +
    fcgistarter
    +
    Yeni FastCGI artalan sunucusu başlatma aracı
    + +
    htcacheclean
    +
    Arabellekli URL'ler, istenirse metadata'yı da dahil ederek + listelenebilmektedir.
    +
    Bazı URL'ler arabellekten tek tek silinebilmektedir.
    +
    Dosya boyutları belirtilen blok boyutuna yukarı doğru + yuvarlanabilmekte, böylece dosya boyutu sınırları diskteki gerçek + boyutlarla daha iyi eşlenebilmektedir.
    +
    Arabellek boyutu artık, diskteki dosyaların boyutuna göre bir + sınıra ek olarak veya bunun yerine dosya düğümü sayısı ile + sınırlanabilmektedir.
    + +
    rotatelogs
    +
    Artık geçerli günlük dosyasına bir bağ oluşturulabiliyor.
    +
    Artık özel bir döndürme sonrası betiği çalıştırılabiliyor.
    + +
    htpasswd, htdbm
    +
    Bcrypt algoritması için destek (2.4.4 itibariyle + kullanılabilmektedir).
    +
    +
    top
    +
    +

    Belgelendirme

    + +
    +
    mod_rewrite
    +
    mod_rewrite belgeleri, yeniden düzenlenerek, + genel kullanıma ve örneklere odaklı olarak ve diğer çözümlerin hangi + durumlarda daha uygun olduğu da gösterilerek hemen hemen tamamen + yeniden yazıldı. Yeniden Yazma Kılavuzu artık + bir sayfa olmaktan çıkıp, çok daha ayrıntılı ve daha iyi düzenlenmiş + bir bölüm haline geldi.
    + +
    mod_ssl
    +
    mod_ssl belgeleri, evvelki teknik ayrıntılara ek + olarak başlarken seviyesinde daha fazla örnekle büyük oranda + genişletildi.
    + +
    Önbellek Kullanım Kılavuzu
    +
    Önbellek Kullanım Kılavuzu + mod_cache tarafından sağlanan RFC2616 HTTP/1.1 + önbellekleme özellikleri arasıda daha iyi ayrım yapılabilmesi için ve + socache arayüzü ile sağlanan soysal + anahtar/değer önbelleklemesi yanında mod_file_cache + gibi mekanizmalarla sağlanan özelleştirilebilir arabelleklemeyi de + kapsamak üzere yeniden yazıldı.
    + +
    +
    top
    +
    +

    Modül Geliştirici Değişiklikleri

    + +
    +
    Yapılandırma Denetleme Kancası Eklendi
    + +
    Yeni bir kanca, check_config kancası, + pre_config ve open_logs kancaları arasında + çalışmak üzere eklendi. Ayrıca, httpd'ye + -t seçeneği verildiğinde test_config + kancasından önce çalışır. check_config kancası, modüllerin + karşılıklı bağımlı yapılandırma yönergesi değerlerini yeniden + yoklamasını ve iletiler konsola hala günlüklenebiliyorken bunların + ayarlanabilmesini sağlar. Temel open_logs kanca işlevi + konsol çıktısını hata günlüğüne yönlendirmeden önce hatalı yapılandırma + sorunlarına karşı kullanıcı uyarılabilir.
    + +
    İfade Çözümleyici Eklendi
    + +
    Artık genel amaçlı bir ifade çözümleyicimiz var. API + ap_expr.h içinde incelenebilir. Evvelce + mod_ssl içinde gerçeklenmiş olan ifade çözümleyiciden + esinlenildi.
    + +
    Yetkilendirme Kuralları Taşıyıcıları
    + +
    Yetkilendirme modülleri, <RequireAll> gibi gelişmiş yetkilendirme + kuralı taşıyıcılarını desteklemek için ap_register_auth_provider() + üzerinden artık bir sağlayıcı olarak çalıştırılabilmektedir.
    + +
    Küçük Nesne Arabellekleme Arayüzü
    + +
    ap_socache.h, evvelki mod_ssl oturum + arabelleği gerçeklenimine dayalı olarak küçük veri nesnelerini + arabelleklemek için sağlayıcı temelli bir arayüz ortaya koyar. + Paylaşımlı bellek çevrimsel tamponu kullanan sağlayıcılar, disk bazlı + dbm dosyaları ve memcache ile dağıtılan arabellekler şu an + desteklenmektedir.
    + +
    Arabellek Durum Kancası Eklendi
    + +
    mod_cache modülü artık, arabellekleme kararı bilinir + olduğunda çağrılan yeni bir cache_status kancası içeriyor. + Öntanımlı gerçeklenim, yanıta istemlik bir X-Cache ve + X-Cache-Detail ekleyebilmektedir.
    +
    + +

    Geliştirici belgeleri API + değişikliklerinin ayrıntılı bir listesini içermektedir.

    +
    +
    +

    Mevcut Diller:  en  | + fr  | + tr 

    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/new_features_2_4.xml b/docs/manual/new_features_2_4.xml index ac5d6aa22cc..3b15b99377f 100644 --- a/docs/manual/new_features_2_4.xml +++ b/docs/manual/new_features_2_4.xml @@ -34,14 +34,19 @@
    Core Enhancements
    -
    KeepAliveTimeout in milliseconds
    -
    It is now possible to specify KeepAliveTimeout in milliseconds. -
    +
    Run-time Loadable MPMs
    +
    Multiple MPMs can now be built + as loadable modules at compile time. + The MPM of choice can be configured at run time via LoadModule directive.
    -
    Loadable MPMs
    -
    Multiple MPMs can now be built as loadable modules at compile time. - The MPM of choice can be configured at run time.
    +
    Event MPM
    +
    The Event MPM is no longer experimental + but is now fully supported.
    + +
    Asynchronous support
    +
    Better support for asynchronous read/write for supporting MPMs and + platforms.
    Per-module and per-directory LogLevel configuration
    The LogLevel can now be @@ -49,81 +54,135 @@ to trace8 have been added above the debug log level.
    -
    Event MPM
    -
    The Event MPM is no longer experimental but is now fully supported.
    - -
    Asynchronous support
    -
    Better support for asynchronous read/write for supporting MPMs and - platforms.
    -
    Per-request configuration sections
    -
    <If> sections can be used to - set the configuration based on per-request criteria
    +
    If, + ElseIf, + and Else + sections can be used to set the configuration based on per-request + criteria.
    + +
    General-purpose expression parser
    +
    A new expression parser allows to specify + complex conditions using a common syntax + in directives like + SetEnvIfExpr, + RewriteCond, + Header, + If, + and others. +
    + +
    KeepAliveTimeout in milliseconds
    +
    It is now possible to specify KeepAliveTimeout in milliseconds. +
    NameVirtualHost directive
    No longer needed and is now deprecated.
    +
    Override Configuration
    +
    The new AllowOverrideList + directive allows more fine grained control which directives are + allowed in .htaccess files.
    + +
    Config file variables
    +
    It is now possible to Define + variables in the configuration, allowing a clearer representation + if the same value is used at many places in the configuration. +
    + +
    Reduced memory usage
    +
    Despite many new features, 2.4.x tends to use less memory than + 2.2.x.
    +
    New Modules
    -
    mod_allowmethods
    -
    New module to restrict certain HTTP methods without interfering with - authentication or authorization.
    - -
    mod_buffer
    -
    Provides for buffering the input and output filter stacks
    - -
    mod_data
    -
    Convert response body into an RFC2397 data URL
    - -
    mod_lua
    -
    Embeds the Lua language into httpd, - for configuration and small business logic functions.
    - -
    mod_proxy_express
    -
    Provides dynamically configured mass reverse proxies for mod_proxy
    -
    mod_proxy_fcgi
    FastCGI Protocol backend for mod_proxy
    mod_proxy_scgi
    SCGI Protocol backend for mod_proxy
    -
    mod_ratelimit
    -
    Provides Bandwidth Rate Limiting for Clients
    - -
    mod_reflector
    -
    Provides Reflection of a request body as a response via the output filter stack.
    +
    mod_proxy_express
    +
    Provides dynamically configured mass reverse proxies for + mod_proxy
    mod_remoteip
    Replaces the apparent client remote IP address and hostname for the request with the IP address list presented by a proxies or a load balancer via the request headers.
    -
    mod_reqtimeout
    -
    Set timeout and minimum data rate for receiving requests
    +
    mod_heartmonitor, + mod_lbmethod_heartbeat
    +
    Allow mod_proxy_balancer to base loadbalancing decisions + on the number of active connections on the backend servers.
    + +
    mod_proxy_html
    +
    Formerly a third-party module, this supports fixing of HTML + links in a reverse proxy situation, where the backend generates + URLs that are not valid for the proxy's clients.
    + +
    mod_sed
    +
    An advanced replacement of mod_substitute, allows + to edit the response body with the full power of sed.
    + +
    mod_auth_form
    +
    Enables form-based authentication.
    + +
    mod_session
    +
    Enables the use of session state for clients, using cookie or + database storage.
    + +
    mod_allowmethods
    +
    New module to restrict certain HTTP methods without interfering with + authentication or authorization.
    + +
    mod_lua
    +
    Embeds the Lua language into httpd, + for configuration and small business logic functions. (Experimental)
    + +
    mod_log_debug
    +
    Allows the addition of customizable debug logging at different phases of the + request processing.
    + +
    mod_buffer
    +
    Provides for buffering the input and output filter stacks
    + +
    mod_data
    +
    Convert response body into an RFC2397 data URL
    + +
    mod_ratelimit
    +
    Provides Bandwidth Rate Limiting for Clients
    mod_request
    Provides Filters to handle and make available HTTP request bodies
    +
    mod_reflector
    +
    Provides Reflection of a request body as a response via the output filter stack.
    +
    mod_slotmem_shm
    Provides a Slot-based shared memory provider (ala the scoreboard).
    -
    mod_log_debug
    -
    Allows to add customizable debug logging at different phases of the - request processing.
    -
    mod_xml2enc
    Formerly a third-party module, this supports internationalisation in libxml2-based (markup-aware) filter modules.
    -
    mod_proxy_html
    -
    Formerly a third-party module, this supports fixing of HTML - links in a reverse proxy situation, where the backend generates - URLs that are not valid for the proxy's clients.
    +
    mod_macro (available since 2.4.5)
    +
    Provide macros within configuration files.
    + +
    mod_proxy_wstunnel (available since 2.4.5)
    +
    Support web-socket tunnels.
    + +
    mod_authnz_fcgi (available since 2.4.10)
    +
    Enable FastCGI authorizer applications to authenticate and/or + authorize clients.
    + +
    mod_http2 (available since 2.4.17)
    +
    Support for the HTTP/2 transport layer.
    @@ -146,6 +205,10 @@
    mod_ssl can now be configured to share SSL Session data between servers through memcached
    +
    EC keys are now supported in addition to RSA and DSA.
    + +
    Support for TLS-SRP (available in 2.4.4 and later).
    +
    mod_proxy
    The ProxyPass directive @@ -154,6 +217,9 @@ LocationMatch block, and offers a significant performance advantage over the traditional two-parameter syntax when present in large numbers.
    +
    The source address used for proxy requests is now configurable.
    +
    Support for Unix domain sockets to the backend (available in 2.4.7 + and later).
    mod_proxy_balancer
    @@ -166,10 +232,14 @@
    BalancerMembers can be set to 'Drain' so that they only respond to existing sticky sessions, allowing them to be taken gracefully offline.
    -
    Balancer settings can be persistant after restarts.
    +
    Balancer settings can be persistent after restarts.
    mod_cache
    +
    The mod_cache CACHE filter can be optionally inserted + at a given point in the filter chain to provide fine control over caching. +
    +
    mod_cache can now cache HEAD requests.
    Where possible, mod_cache directives can now be set @@ -207,24 +277,46 @@ RequireAll.
    +
    mod_rewrite
    +
    mod_rewrite adds the [QSD] + (Query String Discard) and [END] flags for + RewriteRule to + simplify common rewriting scenarios.
    +
    Adds the possibility to use complex boolean expressions in RewriteCond.
    +
    Allows the use of SQL queries as RewriteMap functions.
    + +
    mod_ldap, mod_authnz_ldap
    +
    mod_authnz_ldap adds support for nested groups.
    +
    mod_ldap adds + LDAPConnectionPoolTTL, + LDAPTimeout, and + other improvements in the handling of timeouts. + This is especially useful for setups where a + stateful firewall drops idle connections to the LDAP server.
    +
    mod_ldap adds + LDAPLibraryDebug to log + debug information provided by the used LDAP toolkit.
    +
    mod_info
    mod_info can now dump the pre-parsed configuration to stdout during server startup.
    -
    mod_rewrite
    -
    mod_rewrite adds the [QSD] - (Query String Discard) and [END] flags for - RewriteRule to - simplify common rewriting scenarios.
    +
    mod_auth_basic
    +
    New generic mechanism to fake basic authentication (available in + 2.4.5 and later).
    +
    Program Enhancements
    -
    fcgistarter
    -
    FastCGI deamon starter utility
    -
    htcacheclean
    +
    fcgistarter
    +
    New FastCGI daemon starter utility
    + +
    htcacheclean
    Current cached URLs can now be listed, with optional metadata included.
    Allow explicit deletion of individual cached URLs from the @@ -234,6 +326,41 @@
    Cache size can now be limited by the number of inodes, instead of or in addition to being limited by the size of the files on disk.
    + +
    rotatelogs
    +
    May now create a link to the current log file.
    +
    May now invoke a custom post-rotate script.
    + +
    htpasswd, htdbm
    +
    Support for the bcrypt algorithm (available in 2.4.4 and later). +
    +
    +
    + +
    + Documentation +
    +
    mod_rewrite
    +
    The mod_rewrite documentation has been + rearranged and almost completely rewritten, with a focus on + examples and common usage, as well as on showing you when other + solutions are more appropriate. The Rewrite + Guide is now a top-level section with much more detail and + better organization.
    + +
    mod_ssl
    +
    The mod_ssl documentation has been greatly + enhanced, with more examples at the getting started level, in + addition to the previous focus on technical details.
    + +
    Caching Guide
    +
    The Caching Guide has been rewritten + to properly distinguish between the RFC2616 HTTP/1.1 caching + features provided by mod_cache, and the generic + key/value caching provided by the socache + interface, as well as to cover specialised caching provided by + mechanisms such as mod_file_cache.
    +
    diff --git a/docs/manual/new_features_2_4.xml.fr b/docs/manual/new_features_2_4.xml.fr index 1d05a78b0d8..23a5e9524b6 100644 --- a/docs/manual/new_features_2_4.xml.fr +++ b/docs/manual/new_features_2_4.xml.fr @@ -1,9 +1,9 @@ - + - + + + + + + + +Apache HTTP Sunucusu 2.4'te Yeni olan Özellikler + + +

    Bu belgede Apache HTTP Sunucusunun 2.2 ve 2.4 sürümleri arasındaki + başlıca farklara değinilmiştir. 2.0 sürümüne göre yeni özellikler için Apache 2.2’de Yeni olan Özellikler + belgesine bakınız.

    +
    + +
    + Çekirdekteki Gelişmeler +
    +
    Çalışma anında yüklenebilen MPM'ler
    +
    Çok sayıda MPM artık yüklenebilir + modül olarak derlenebilmektedir. Kullanılacak MPM'in seçimi + çalışma anında LoadModule + yönergesi üzerinden yapılabilmektedir.
    + +
    Event MPM
    +
    Event MPM artık deneysel değil, ancak + tam olarak desteklenmiyor.
    + +
    Eşzamansıza destek
    +
    MPM'leri ve platformları desteklemek için eşzamansız okuma/yazmaya + destek iyileştirildi.
    + +
    Modul bazında ve dizin bazına LogLevel yapılandırması
    +
    LogLevel artık her modül ve her + dizin için yapılandırılabilmektedir. debug log + seviyesinin üstüne trace1'den trace8'e + kadar yeni log seviyeleri eklendi.
    + +
    İstek bazında yapılandırma bölümleri
    +
    If, + ElseIf, + ve Else bölümleri + artık HTTP isteklerine dayalı olarak yapılandırılabilmektedir.
    + +
    Genel amaçlı ifade çözümleyici
    +
    Yeni ifade çözümleyici + SetEnvIfExpr, + RewriteCond, + Header, + If ve + benzeri yönergelerde ortak bir sözdizimi kullanarak karmaşık durumlar belirtmeyi mümkün kılmaktadır. +
    + +
    Milisaniye cinsinden KeepAliveTimeout
    +
    KeepAliveTimeout milisaniye + cinsinden belirtmek artık mümkündür.
    + +
    NameVirtualHost yönergesi
    +
    Artık gerekmemekte ve kullanımı önerilmemektedir.
    + +
    Yapılandırma geçersizleştirme
    +
    Yeni AllowOverrideList + yönergesi .htaccess dosyalarında kullanılabilen + yönergelerde daha ince ayarlara izin vermektedir.
    + +
    Yapılandırma dosyası değişkenleri
    +
    Yapılandırmada değişkenler Define yönergesi ile tanımlanabilmekte, böylece aynı + değer yapılandırmada bir çok yerde kullanılıyorsa daha temiz bir + görünüm elde edilebilmektedir.
    + +
    Azaltılmış bellek kullanımı
    +
    Bir çok yeni özelliğe karşın, 2.4.x'te 2.2.x'e nazaran bellek + kullanımı azaltılmıştır.
    +
    +
    + +
    + Yeni Modüller +
    +
    mod_proxy_fcgi
    +
    mod_proxy için FastCGI Protokolü sağlayıcısı
    + +
    mod_proxy_scgi
    +
    mod_proxy için SCGI Protokolü sağlayıcısı
    + +
    mod_proxy_express
    +
    mod_proxy için devingen olarak yapılandırılmış tam + tersinir vekiller sağlar.
    + +
    mod_remoteip
    +
    İstek başlıklarında bir yük dengeleyici veya bir vekil tarafından + sunulan IP adres listeli bir istek için görünen istemci IP adresi ve + konak adını değiştirir.
    + +
    mod_heartmonitor, + mod_lbmethod_heartbeat
    +
    mod_proxy_balancer modülünün arka sunuculardaki + etkin bağlantı sayısı üzerindeki yük dengeleme kararlarına dayalı işlem + yapmasını sağlar.
    + +
    mod_proxy_html
    +
    Başta bir üçüncü parti modüldü. Arka plandaki sağlayıcının vekil + istemcileri için geçersiz URL'ler ürettiği tersinir vekil durumlarında + HTML bağlarının düzeltilmesini sağlar.
    + +
    mod_sed
    +
    mod_substitute modülünün geliştirilmiş hali olup + yanıt gövdesinin sed'in tüm gücü ile yeniden düzenlenebilmesini + sağlar.
    + +
    mod_auth_form
    +
    Formlara dayalı kimlik kanıtlamayı etkinleştirir.
    + +
    mod_session
    +
    Çerezleri ve veritabanı deposunu kullanarak istemciler için oturum + durumunun saklanmasını etkinleştirir.
    + +
    mod_allowmethods
    +
    Kimlik Doğrulama ve Yetkilendirme ile etkileşmeyen belli HTTP + yöntemlerine sınır koymak için yeni bir modül.
    + +
    mod_lua
    +
    Küçük iş mantıksal işlevleri ve yapılandırması için httpd içine Lua dilini gömer.
    + +
    mod_log_debug
    +
    İstek işlemlerinin farklı aşamalarına özelleştirilebilir hata + ayıklama günlüğü eklenmesini sağlar.
    + +
    mod_buffer
    +
    Girdi ve çıktı süzgeç yığıtlarına tampon bellek sağlar.
    + +
    mod_data
    +
    Yanıt gövdesini bir RFC2397 veri URL'sine dönüştürür.
    + +
    mod_ratelimit
    +
    İstemciler için band genişliği oranında sınırlama sağlar.
    + +
    mod_request
    +
    Kullanılabilir HTTP istek gövdelerini yapmak ve elde etmek için + Süzgeçleri sağlar.
    + +
    mod_reflector
    +
    Çıktı süzgeci yığıtı üzerinden bir yanıt olarak bir istek gövdesinin + yansısını sağlar.
    + +
    mod_slotmem_shm
    +
    Yuva temelli bir paylaşımlı bellek sağlayıcı sağlar (scoreboard + olarak da bilinir).
    + +
    mod_xml2enc
    +
    Başta bir üçüncü parti modüldü. libxml2 temelli süzgeç modüllerinde + i18n'i destekler.
    + +
    mod_macro (2.4.5'den itibaren kullanılabilir)
    +
    Yapılandırma dosyalarında makro kullanımını sağlar.
    + +
    mod_proxy_wstunnel (2.4.5'den itibaren kullanılabilir)
    +
    Web-socket tünelleri için destek.
    + +
    mod_authnz_fcgi (2.4.10'dan itibaren kullanılabilir)
    +
    Kimlik kanıtlama ve/veya istemcileri yetkilendirmek için FastCGI + yetkilendirme uygulamalarını etkinleştirir.
    + +
    mod_http2 (2.4.17'den itibaren kullanılabilir)
    +
    HTTP/2 aktarım katmanı desteği.
    +
    +
    + +
    + Modüllerdeki Gelişmeler +
    +
    mod_ssl
    + +
    mod_ssl bir istemci sertifikasının doğrulama + durumunu sınamak için bir OCSP sunucusunu kullanmak üzere + yapılandırılabilir. Öntanımlı yanıtlayıcı, istemci sertifikasının + kendisinde tasarlanmış yanıtlayıcının tercih edilip edilmeyeceği + kararına bağlı olarak yapılandırılabilir.
    + +
    mod_ssl, ayrıca, sunucunun istemciyle anlaşma + sırasında kendi sertifikasının OCSP doğrulamasını umursamazca sağlayıp + aktardığı durumda OCSP zımbalamasını da destekler.
    + +
    mod_ssl, sunucular arasında SSL Oturumu verisini + memcached üzerinden paylaşmak üzere yapılandırılabilir.
    + +
    RSA ve DSA'ya ek olarak EC anahtarları da artık desteklenmektedir. +
    + +
    TLS-SRP için destek (2.4.4 itibariyle kullanılabilir).
    + +
    mod_proxy
    + +
    ProxyPass yönergesi bir + Location veya + LocationMatch bloku içinde en + verimli şekilde yapılandırılabilir ve büyük sayıların varlığı durumunda + geleneksel iki değiştirgeli sözdiziminin de üzerinde belirgin bir + başarım artışı sağlar.
    + +
    Vekil istekleri için kullanılan kaynak adresi artık + yapılandırılabilmektedir.
    + +
    Artalanda Unix alan soketleri için destek (2.4.7 itibariyle + kullanılabilir).
    + +
    mod_proxy_balancer
    + +
    Dengeleme yöneticisi üzerinden BalancerMembers için daha fazla + çalışma anı yapılandırması
    + +
    Çalışma anında dengeleme yöneticisi üzerinden başka BalancerMembers + eklenebilir.
    + +
    Çalışma anı yapılandırmasına yönelik dengeleyici değiştirgeleri
    + +
    BalancerMembers için 'Drain' değeri belirtilebilir; böylece sadece + mevcut yapışık oturumlara yanıt verirler ve bunların güzellikle hattan + alınması mümkün olur.
    + +
    Balancer ayarları sunucu yeniden başlatılssa bile kalıcı olabilir. +
    + +
    mod_cache
    + +
    mod_cache CACHE süzgeci, arabellekleme üzerinde daha + hassas denetim sağlamak için istenirse süzgeç zincirinin belli bir + noktasına yerleştirilebilmektedir.
    + +
    mod_cache artık HEAD isteklerini + arabellekleyebiliyor.
    + +
    Mümkün olduğunda, mod_cache yönergeleri sunucu + bazında değil, dizin bazında belirtilebiliyor.
    + +
    Arabellekli URL'lerin temel URL'si özelleştirilebiliyor; böylece + arabelleğin bir bölümü aynı uç URL önekini paylaşabiliyor.
    + +
    mod_cache, ardalanda bir sağlayıcının olmadığı + durumda (5xx hatası), arabelleklenmiş bayat içeriği sunabiliyor.
    + +
    mod_cache artık bir X-Cache başlığına bir + HIT/MISS/REVALIDATE yerleştirebiliyor.
    + +
    mod_include
    +
    Bir hata durumunda öntanımlı hata dizgisi yerine bir hata sayfası + sunmayı sağlayan 'onerror' özniteliği için 'include' elemanı içinde + destek.
    + +
    mod_cgi, mod_include, + mod_isapi, ...
    +
    Başlıkların ortam değişkenlerine dönüşümü, başlık zerki yoluyla bazı + olası karşı-site-betik saldırılarının hafifletilmesinden önce daha + hızlı ve doğru yapılmaktadır. Geçersiz karakterler (altçizgiler dahil) + içeren başlıklar artık sessizce bırakılmaktadır.Apache'deki Ortam değişkenleri, böyle başlıkları + gerektiren bozulmuş meşru istemcilerin çevresinden dolanabilen + göstericilere sahiptir. (Bu durum, bu değişkenleri kullanan tüm + modülleri etkiler.)
    + +
    mod_authz_core Yetkilendirme Kuralları + Taşıyıcıları
    + +
    Gelişkin yetkilendirme kuralları artık Require yönergesi ve RequireAll gibi + ilgili taşıyıcı yönergeler kullanılarak belirtilebilmektedir.
    + +
    mod_rewrite
    +
    mod_rewrite bildik yeniden yazma senaryolarını + basitleştirmek için RewriteRule yönergesine + [QSD] (Query String Discard=sorgu dizgisini iptal) ve + [END] seçeneklerini sağlamaktadır.
    +
    RewriteCond içinde + karmaşık mantıksal ifadeler kullanımını mümkün kılmaktadır.
    +
    SQL sorgularının RewriteMap işlevleri olarak + kullanılması sağlanmıştır.
    + +
    mod_ldap, mod_authnz_ldap
    +
    mod_authnz_ldap kümelenmiş gruplara destek sağlar. +
    +
    mod_ldap zaman aşımlarını işleme sokabilmek için + LDAPConnectionPoolTTL, + LDAPTimeout ve birtakım + başka geliştirmeler sahiptir. Özellikle, bir LDAP sunucusunun boşta + kalmış bağlantılarını bıraktıran bir durumsal güvenlik duvarı + varlığında gerekli ayarlamaları yapmak için kullanışlıdır.
    +
    mod_ldap, artık, LDAP araç kiti kullanarak sağlanan + hata ayıklama bilgisini günlüklemek için LDAPLibraryDebug yönergesini + içermektedir.
    + +
    mod_info
    +
    mod_info önceden çözümlenmiş yapılandırmayı artık + sunucunun başlatılması sırasında standart çıktıya + dökümleyebilmektedir.
    + +
    mod_auth_basic
    +
    Temel kimlik kanıtlamayı taklit eden yeni temel mekanizma + (2.4.5 itibariyle kullanılabilmektedir).
    +
    +
    + +
    + Programlardaki Gelişmeler +
    +
    fcgistarter
    +
    Yeni FastCGI artalan sunucusu başlatma aracı
    + +
    htcacheclean
    +
    Arabellekli URL'ler, istenirse metadata'yı da dahil ederek + listelenebilmektedir.
    +
    Bazı URL'ler arabellekten tek tek silinebilmektedir.
    +
    Dosya boyutları belirtilen blok boyutuna yukarı doğru + yuvarlanabilmekte, böylece dosya boyutu sınırları diskteki gerçek + boyutlarla daha iyi eşlenebilmektedir.
    +
    Arabellek boyutu artık, diskteki dosyaların boyutuna göre bir + sınıra ek olarak veya bunun yerine dosya düğümü sayısı ile + sınırlanabilmektedir.
    + +
    rotatelogs
    +
    Artık geçerli günlük dosyasına bir bağ oluşturulabiliyor.
    +
    Artık özel bir döndürme sonrası betiği çalıştırılabiliyor.
    + +
    htpasswd, htdbm
    +
    Bcrypt algoritması için destek (2.4.4 itibariyle + kullanılabilmektedir).
    +
    +
    + +
    + Belgelendirme +
    +
    mod_rewrite
    +
    mod_rewrite belgeleri, yeniden düzenlenerek, + genel kullanıma ve örneklere odaklı olarak ve diğer çözümlerin hangi + durumlarda daha uygun olduğu da gösterilerek hemen hemen tamamen + yeniden yazıldı. Yeniden Yazma Kılavuzu artık + bir sayfa olmaktan çıkıp, çok daha ayrıntılı ve daha iyi düzenlenmiş + bir bölüm haline geldi.
    + +
    mod_ssl
    +
    mod_ssl belgeleri, evvelki teknik ayrıntılara ek + olarak başlarken seviyesinde daha fazla örnekle büyük oranda + genişletildi.
    + +
    Önbellek Kullanım Kılavuzu
    +
    Önbellek Kullanım Kılavuzu + mod_cache tarafından sağlanan RFC2616 HTTP/1.1 + önbellekleme özellikleri arasıda daha iyi ayrım yapılabilmesi için ve + socache arayüzü ile sağlanan soysal + anahtar/değer önbelleklemesi yanında mod_file_cache + gibi mekanizmalarla sağlanan özelleştirilebilir arabelleklemeyi de + kapsamak üzere yeniden yazıldı.
    + +
    +
    + +
    + Modül Geliştirici Değişiklikleri +
    +
    Yapılandırma Denetleme Kancası Eklendi
    + +
    Yeni bir kanca, check_config kancası, + pre_config ve open_logs kancaları arasında + çalışmak üzere eklendi. Ayrıca, httpd'ye + -t seçeneği verildiğinde test_config + kancasından önce çalışır. check_config kancası, modüllerin + karşılıklı bağımlı yapılandırma yönergesi değerlerini yeniden + yoklamasını ve iletiler konsola hala günlüklenebiliyorken bunların + ayarlanabilmesini sağlar. Temel open_logs kanca işlevi + konsol çıktısını hata günlüğüne yönlendirmeden önce hatalı yapılandırma + sorunlarına karşı kullanıcı uyarılabilir.
    + +
    İfade Çözümleyici Eklendi
    + +
    Artık genel amaçlı bir ifade çözümleyicimiz var. API + ap_expr.h içinde incelenebilir. Evvelce + mod_ssl içinde gerçeklenmiş olan ifade çözümleyiciden + esinlenildi.
    + +
    Yetkilendirme Kuralları Taşıyıcıları
    + +
    Yetkilendirme modülleri, RequireAll gibi gelişmiş yetkilendirme + kuralı taşıyıcılarını desteklemek için ap_register_auth_provider() + üzerinden artık bir sağlayıcı olarak çalıştırılabilmektedir.
    + +
    Küçük Nesne Arabellekleme Arayüzü
    + +
    ap_socache.h, evvelki mod_ssl oturum + arabelleği gerçeklenimine dayalı olarak küçük veri nesnelerini + arabelleklemek için sağlayıcı temelli bir arayüz ortaya koyar. + Paylaşımlı bellek çevrimsel tamponu kullanan sağlayıcılar, disk bazlı + dbm dosyaları ve memcache ile dağıtılan arabellekler şu an + desteklenmektedir.
    + +
    Arabellek Durum Kancası Eklendi
    + +
    mod_cache modülü artık, arabellekleme kararı bilinir + olduğunda çağrılan yeni bir cache_status kancası içeriyor. + Öntanımlı gerçeklenim, yanıta istemlik bir X-Cache ve + X-Cache-Detail ekleyebilmektedir.
    +
    + +

    Geliştirici belgeleri API + değişikliklerinin ayrıntılı bir listesini içermektedir.

    +
    + +
    diff --git a/docs/manual/platform/ebcdic.html.en b/docs/manual/platform/ebcdic.html.en index d471c0271fd..4b22e8b3e97 100644 --- a/docs/manual/platform/ebcdic.html.en +++ b/docs/manual/platform/ebcdic.html.en @@ -1,22 +1,27 @@ - -The Apache EBCDIC Port - Apache HTTP Server +The Apache EBCDIC Port - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    The Apache EBCDIC Port

    +

    See also

    top
    mod_accessmod_access +
    mod_authmod_auth +
    mod_log_referermod_log_referer +
    mod_jserv + JK (Formerly mod_jserv) - JAVA still being ported.
    mod_jserv + JK (mod_jserv) - JAVA ̴.
    mod_accessmod_access +
    mod_authmod_auth +
    mod_log_referermod_log_referer +
    mod_jserv + JK (Formerly mod_jserv) - JAVA still being ported.
    + + + + + + + + + + + + + + + + + + + + + +
    %Anom du jour de la semaine en entier +(localis)
    %anom du jour de la semaine sur 3 +caractres (localis)
    %Bnom du mois en entier (localis)
    %bnom du mois sur 3 caractres (localis)
    %cdate et heure (localis)
    %djour du mois sur 2 chiffres
    %Hheure sur 2 chiffres (de 0 24h)
    %Iheure sur 2 chiffres (de 0 12h)
    %jjour de l'anne sur 3 chiffres
    %Mminutes sur 2 chiffres
    %mmois sur 2 chiffres
    %psuffixe am/pm pour l'heure de 0 12h +(localis)
    %Ssecondes sur 2 chiffres
    %Usemaine de l'anne sur 2 chiffres +(Dimanche est le premier jour de la semaine)
    %W semaine de l'anne sur 2 chiffres +(Lundi est le premier jour de la semaine)
    %wjour de la semaine sur 1 chiffre +(Dimanche est le premier jour de la semaine)
    %Xheure (localise)
    %xdate (localise)
    %Yanne sur 4 chiffres
    %yanne sur 2 chiffres
    %Znom de la zone de temps
    %%caractre littral `%'
    + +
    +
    +

    Langues Disponibles:  en  | + fr  | + ko  | + tr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/rotatelogs.html.ko.euc-kr b/docs/manual/programs/rotatelogs.html.ko.euc-kr index 89892b704c0..4a75dfb733a 100644 --- a/docs/manual/programs/rotatelogs.html.ko.euc-kr +++ b/docs/manual/programs/rotatelogs.html.ko.euc-kr @@ -1,26 +1,32 @@ - rotatelogs - ġ α׸ ȯϱ - α α׷ - Apache HTTP Server + α α׷ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    rotatelogs - ġ α׸ ȯϱ +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    rotatelogs - ġ α׸ ȯϱ α α׷

    @@ -57,7 +63,7 @@
    +

    top

    @@ -139,9 +145,31 @@ GMT
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/rotatelogs.html.tr.utf8 b/docs/manual/programs/rotatelogs.html.tr.utf8 index 25da08688e3..334ae2b5d15 100644 --- a/docs/manual/programs/rotatelogs.html.tr.utf8 +++ b/docs/manual/programs/rotatelogs.html.tr.utf8 @@ -1,30 +1,35 @@ - rotatelogs - Apache günlüklerini döndürmek için borulu günlük kayıt - programı - Apache HTTP Sunucusu + programı - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    rotatelogs - Apache günlüklerini döndürmek için borulu günlük kayıt +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    rotatelogs - Apache günlüklerini döndürmek için borulu günlük kayıt programı

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    rotatelogs, Apache'nin borulu günlük dosyaları özelliği ile birlikte kullanmak için tasarlanmış basit bir @@ -35,15 +40,21 @@

  • Seçenekler
  • Örnekler
  • Taşınabilirlik
  • -
    +

    Ayrıca bakınız:

    top

    Kullanım

    rotatelogs [ -l ] + [ -L isim ] + [ -p program ] [ -f ] + [ -t ] [ -v ] + [ -e ] + [ -c ] + [ -n dosya_sayısı ] dosyaismi süre|boyut(B|K|M|G) [ saat_farkı ]

    @@ -53,9 +64,24 @@
    -l
    -
    GMT yerine yerel zamanın kullanılmasını sağlar. Zaman dilimi değişik - olan ortamlarda (BST, DST gibi) bu seçeneğin kullanımı beklenmedik - sonuçlar verebilir!
    +
    GMT yerine yerel zamanın kullanılmasını sağlar.
    + +
    -L bagismi
    +
    Belirtilen bağ dosyası ismine geçerli günlük dosyasından kalıcı bir bağ + oluşturulur. tail -F bagismi gibi bir komut kullanılarak + günlüğün sürekli izlenmesi için kullanılabilir.
    + +
    -p program
    + +
    Belirtildiği takdirde, rotatelogs yeni + bir günlük dosyasının her açılışında belirtilen programı çalıştırır. Yeni + açılan dosyanın ismi programa ilk argüman olarak aktarılır. Bu işlem bir + döndürme sonrası yapılırsa eski günlük dosyası ikinci argüman olarak + aktarılır. rotatelogs işlemini sürdürmek için + belirtilen programın sonlanmasını beklemez, dolayısıyla sonlanma soucunda + döndürülen hata kodunu günlüğe kaydetmez. Çalıştırılan program + rotatelogs ile aynı stdin, stdout ve stderr'i + kullanır ve ortamı da miras alır.
    -f
    İlk günlük giridisinin okunmasını beklemeden @@ -65,21 +91,53 @@ özdevinimli işlemler yapan bazı günlükleme araçlarında sorunlara yol açabilir. Bu seçenek bu gibi durumlarda yararlıdır.
    +
    -t
    +
    Günlük dosyasının döndürülmek yerine tepeden kırpılmasına sebep olur. + Günlüğün tail gibi bir araç tarafından gerçek + zamanda işlendiği ve veriyi saklamanın gerekmediği durumda kullanışlıdır. + Dosya ismine bir sonek eklenmez, ancak biçem dizgesi '%' karakteri + içeriyorsa buna uyulur.
    +
    -v
    Standart hataya verilen çıktı daha ayrıntılı olur. Çıktı, yapılandırma çözümlemesinin sonuçlarını ve tüm dosya açma/kapama işlemlerini içerir.
    +
    -e
    +
    Günlüğü standart çıktıya basar. Günlüğün zincirdeki ilgili araç + tarafından gerçek zamanda işlenmesi gerektiğinde kullanışlıdır.
    + +
    -c
    +
    Create log file for each interval, even if empty.
    + +
    -n dosya_sayısı
    +
    Zaman damgalarına bakılmaksızın bir dosya serisi açılır. Örneğin -n3 + belirtilirse "logfile", "logfile.1", "logfile.2" serisi açılır ve + "logfile" üzerine yazılır. + 2.4.5 ve sonraki sürümler içindir.
    +
    dosyaismi
    -
    Günlük dosyasının ismi yoluyla birlikte belirtilir. - dosyaismi '%' karakterleri içeriyorsa bunlar - strftime(3) biçem belirteçleri olarak ele alınır. Aksi - takdirde, özdevinimli olarak .nnnnnnnnnn uzantısı üretilir. - Uzantı saniye cinsindendir ve her iki durumda da bu değer, mevcut döngü - diliminin başlangıcına göre hesaplanır. Örneğin, döndürmenin 86400 - saniyede bir yapılacağı belirtilmişse, strftime(3) biçeminde - oluşturulan saat, dakika ve saniye alanları, 24 saatlik sürenin - başlangıcını (geceyarısı) göstermek üzere sıfırlarla doldurulur.
    +

    Günlük dosyasının ismi yoluyla birlikte belirtilir. + dosyaismi '%' karakterleri içeriyorsa bunlar + strftime(3) biçem belirteçleri olarak ele alınır. Aksi + takdirde, özdevinimli olarak .nnnnnnnnnn uzantısı üretilir. + (-t seçeneği kullanılmadıkça) Uzantı saniye + cinsindendir ve her iki durumda da bu değer, mevcut döngü + diliminin başlangıcına göre hesaplanır. Örneğin, döndürmenin 86400 + saniyede bir yapılacağı belirtilmişse, strftime(3) biçeminde + oluşturulan saat, dakika ve saniye alanları, 24 saatlik sürenin + başlangıcını (geceyarısı) göstermek üzere sıfırlarla doldurulur.

    + +

    strftime(3) dosyaismi biçemlemesi kullanılırken, günlük + dosyası biçeminin günlük dosyası döndürülürken her zaman farklı bir dosya + ismi üretecek yeterlilikte parçacıklı yapıya sahip olduğundan emin + olmalısınız. Aks takdirde döndürme işlemi yeni bir dosya başlatmak yerine + hep aynı dosyanın üzerine yazar. Örneğin, logfile için + /var/log/errorlog.%Y-%m-%d belirtilmişse 5 mega baytta bir + yeni bir günlük dosyasına başlanacaktır. Fakat 5 megabayta gün içinde iki + kez ulaşılırsa aynı günlük dosyası üretilir ve günlük hep aynı dosyanın + üzerine yazılır.

    +
    süre
    Günlük dosyasının yenisinin kaç saniyede bir açılacağı belirtilir. @@ -102,44 +160,52 @@ öntanımlıdır. Örneğin, -5 saatlik bir zaman diliminde bulunuyorsanız bu değer -300 olmalıdır. Çoğu durumda, bunun yerine -l seçeneğini kullanmak gerekir.
    -
    +
    top

    Örnekler

    - CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs /var/log/logfile 86400" common

    nnnn, günlük kaydının başladığı sistem zamanı olmak üzere - /var/logs/logfile.nnnn dosyası oluşturulur. Bu zaman, daima döngü + /var/log/logfile.nnnn dosyası oluşturulur. Bu zaman, daima döngü süresinin katları olacağından bunu cron betiklerinizi eşzamanlamakta kullanabilirsiniz. Her döngü süresinin sonunda (burada 24 saat sonra) yeni bir günlük dosyası açılır.

    - CustomLog "|bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common + CustomLog "|bin/rotatelogs -l /var/log/logfile.%Y.%m.%d 86400" common

    yyyy, yıl; mm, ay; dd, ayın gününü belirtmek üzere - /var/logs/logfile.yyyy.mm.dd dosyası oluşturulur. Her gün yerel zamanla + /var/log/logfile.yyyy.mm.dd dosyası oluşturulur. Her gün yerel zamanla geceyarısı yeni bir günlük dosyasına geçilecektir.

    - CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common + CustomLog "|bin/rotatelogs /var/log/logfile 5M" common

    Günlük dosyası 5 megabaytlık olunca yenisinin oluşturulmasını sağlar.

    - ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M" + ErrorLog "|bin/rotatelogs /var/log/errorlog.%Y-%m-%d-%H_%M_%S 5M"

    Hata günlüğünün 5 megabaytta bir errorlog.YYYY-mm-dd-HH_MM_SS biçemli bir isimle oluşturulmasını sağlar.

    +

    + CustomLog "|bin/rotatelogs -t /var/log/logfile 86400" common +

    + +

    /var/log/logfile dosyasını oluşturur, sunucu başlatılırken ve günde + bir kere dosyanın tepesi kırpılır. Bu senaryoda ayrı bir sürecin (tail + gibi) dosyayı gerçek zamanlı işleyeceği umulur.

    +
    top

    Taşınabilirlik

    @@ -181,9 +247,31 @@

    Mevcut Diller:  en  | + fr  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/rotatelogs.xml b/docs/manual/programs/rotatelogs.xml index bae96f84355..79aa84eba37 100644 --- a/docs/manual/programs/rotatelogs.xml +++ b/docs/manual/programs/rotatelogs.xml @@ -38,9 +38,11 @@ [ -L linkname ] [ -p program ] [ -f ] + [ -t ] [ -v ] [ -e ] [ -c ] + [ -n number-of-files ] logfile rotationtime|filesize(B|K|M|G) [ offset ]

    @@ -102,6 +104,12 @@ processed in real time by a further tool in the chain.
    -c
    Create log file for each interval, even if empty.
    +
    -n number-of-files
    +
    Use a circular list of filenames without timestamps. +With -n 3, the series of log files opened would be +"logfile", "logfile.1", "logfile.2", then overwriting "logfile". +Available in 2.4.5 and later.
    +
    logfile

    The path plus basename of the logfile. If logfile @@ -119,7 +127,7 @@ be sure the log file format has enough granularity to produce a different file name each time the logs are rotated. Otherwise rotation will overwrite the same file instead of starting a new one. For example, if logfile was -/var/logs/errorlog.%Y-%m-%d with log rotation at 5 +/var/log/errorlog.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file.

    @@ -159,32 +167,32 @@ an offset.
    Examples - CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs /var/log/logfile 86400" common -

    This creates the files /var/logs/logfile.nnnn where nnnn is +

    This creates the files /var/log/logfile.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time (here after 24 hours) a new log is started.

    - CustomLog "|bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common + CustomLog "|bin/rotatelogs -l /var/log/logfile.%Y.%m.%d 86400" common -

    This creates the files /var/logs/logfile.yyyy.mm.dd where +

    This creates the files /var/log/logfile.yyyy.mm.dd where yyyy is the year, mm is the month, and dd is the day of the month. Logging will switch to a new file every day at midnight, local time.

    - CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common + CustomLog "|bin/rotatelogs /var/log/logfile 5M" common

    This configuration will rotate the logfile whenever it reaches a size of 5 megabytes.

    - ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M" + ErrorLog "|bin/rotatelogs /var/log/errorlog.%Y-%m-%d-%H_%M_%S 5M"

    This configuration will rotate the error logfile whenever it reaches a size of 5 megabytes, and the suffix to the logfile name @@ -192,10 +200,10 @@ an offset. errorlog.YYYY-mm-dd-HH_MM_SS.

    - CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common + CustomLog "|bin/rotatelogs -t /var/log/logfile 86400" common -

    This creates the file /var/logs/logfile, truncating the file at +

    This creates the file /var/log/logfile, truncating the file at startup and then truncating the file once per day. It is expected in this scenario that a separate process (such as tail) would process the file in real time.

    diff --git a/docs/manual/programs/rotatelogs.xml.fr b/docs/manual/programs/rotatelogs.xml.fr new file mode 100644 index 00000000000..b98bff35f21 --- /dev/null +++ b/docs/manual/programs/rotatelogs.xml.fr @@ -0,0 +1,265 @@ + + + + + + + + + + +Programmes + + rotatelogs - Rotation des journaux d'Apache par redirection de + ces derniers dans un "pipe" + + +

    rotatelogs est un programme simple à utiliser en + conjonction avec la fonctionnalité d'Apache de redirection dans un + "pipe" des fichiers journaux. Il supporte une rotation basée sur un + intervalle de temps ou une taille maximale du journal.

    +
    + +
    Syntaxe + +

    rotatelogs + [ -l ] + [ -L nom-lien ] + [ -p programme ] + [ -f ] + [ -t ] + [ -v ] + [ -e ] + [ -c ] + [ -n nombre-de-fichiers ] + fichier-journal + heure-de-rotation|taille-fichier(B|K|M|G) + [ décalage ]

    +
    + +
    Options + +
    + +
    -l
    +
    Utilise le temps local plutôt que GMT comme base pour l'intervalle +de temps ou pour le formatage de strftime(3) avec une +rotation basée sur la taille.
    + +
    -L nom-lien
    +
    Etablit un lien physique entre le fichier journal courant et le lien +spécifié. Cette option permet de consulter le journal de manière +continue malgré les rotations via une commande du style tail -F +nom-lien.
    + +
    -p programme
    +
    Avec cette option, rotatelogs exécutera le programme +programme chaque fois qu'un nouveau fichier journal sera +ouvert. Le nom du fichier nouvellement ouvert est passé comme premier +argument au programme. Si l'exécution se produit après une rotation, +l'ancien nom du fichier journal est passé au programme comme second +argument. rotatelogs +n'attend pas la fin du programme pour continuer son +exécution, et cessera tout enregistrement de codes d'erreur lorsqu'il +aura terminé son processus. Le programme utilise les mêmes +canaux stdin, stdout, et stderr que rotatelogs, et hérite de son +environnement.
    + +
    -f
    +
    Ouvre le fichier journal immédiatement, dès que +rotatelogs démarre, au lieu d'attendre la lecture de la +première entrée de journal (pour les sites peu chargés, il peut +s'écouler un temps substantiel entre le démarrage du serveur et le +traitement de la première requête, temps pendant lequel le fichier +journal associé n'"existe" pas, ce qui peut causer des problèmes à +certains utilitaires de journalisation automatiques).
    + +
    -t
    +
    Provoque une troncature du fichier journal au lieu d'une rotation. +Cela peut s'avérer utile lorsqu'un journal est élaboré en temps réel par +une commande telle que tail, l'archivage des données n'étant ici pas +nécessaire. Si aucun suffixe n'est ajouté au nom de fichier, les +chaînes de format contenant des caractères '%' sont cependant +respectées. +
    + +
    -v
    +
    Affiche une sortie verbeuse sur STDERR. La sortie contient le +résultat de l'interprétation de la configuration, ainsi que toutes les +opérations d'ouverture et de fermeture de fichiers.
    + +
    -c
    +
    Crée un fichier journal pour chaque intervalle, même s'il est vide.
    + +
    -e
    +
    Envoie les messages de journalisation vers stdout. Ceci s'avère +utile lorsque les journaux doivent être traités par un autre programme.
    + +
    -n nombre-de-fichiers
    +
    Utilise une liste circulaire de fichiers sans repères de temps. Avec +-n 3, la série de fichiers conservés sera "logfile", +"logfile.1", "logfile.2" avec écrasement de "logfile". +Disponible à partir de la version 2.4.5 du serveur HTTP Apache.
    + +
    fichier-journal
    +

    Le chemin et le nom de base du fichier journal. Si +fichier-journal contient des caractères '%', il est considéré +comme une chaîne de formatage pour strftime(3). Dans le cas +contraire, le suffixe .nnnnnnnnnn est automatiquement ajouté +et correspond au temps en secondes (sauf si l'option -t est spécifiée). +Les deux formats calculent le temps +de démarrage depuis le début de la période courante. Par exemple, si un +temps de rotation de 86400 est spécifié, les champs heure, minute et +seconde créés à partir du format strftime(3) auront tous +pour valeur 0, en référence au début de la période de 24 heures courante +(minuit).

    +

    Si vous utilisez le formatage de noms de fichiers +strftime(3), assurez-vous que le format du fichier journal +possède une granularité suffisamment importante pour générer un nom de +fichier différent à chaque rotation des journaux. Si ce n'est pas le +cas, la rotation va écraser le fichier existant au lieu d'en générer un +nouveau. Par exemple, si fichier-journal était +/var/log/errorlog.%Y-%m-%d avec une rotation à 5 +mégaoctets, et si la limite de 5 mégaoctets a été atteinte deux fois +dans la même journée, le même nom de fichier va être généré, et la +rotation va écraser le fichier existant.

    +
    + +
    temps-rotation
    + +
    Le temps entre deux rotations des fichiers journaux en secondes. La +rotation intervient au début de cet intervalle. Par exemple, si le temps +de rotation est de 3600, la rotation des fichiers journaux s'effectuera +au début de chaque heure ; si le temps de rotation est de 86400, la +rotation des fichiers journaux s'effectuera chaque nuit à minuit. (Si +aucune donnée n'est enregistrée au cours d'un intervalle, aucun fichier +ne sera créé).
    + +
    taille-fichier(B|K|M|G)
    + +
    La taille maximale du fichier suivie par une des lettres +B (Octets), K (KOctets), M (MOctets) +ou G (GOctets). +

    +Lorsque temps et taille sont spécifiés, la taille doit l'être après le +temps. La rotation interviendra alors aussitôt que l'une des deux limites +(temps ou taille) sera atteinte. +

    +
    + +
    décalage
    + +
    Le décalage en minutes par rapport au temps UTC. Par défaut, le +décalage est considéré comme nul et c'est le temps UTC qui est utilisé. +Par exemple, pour utiliser le temps local de la zone UTC -5 heures, +spécifiez une valeur de -300 pour cette option. Dans la +plupart des cas, il vaut mieux utiliser l'option -l que +spécifier un décalage.
    + +
    +
    + +
    Exemples + + + CustomLog "|bin/rotatelogs /var/log/fichier-journal 86400" common + + +

    Cette directive crée les fichiers /var/log/fichier-journal.nnnn + où nnnn correspond au temps système auquel la journalisation + démarre effectivement (ce temps sera toujours un multiple du temps + de rotation, si bien que vous pouvez synchroniser les scripts cron + avec lui). A la fin de chaque temps de rotation (ici après 24 + heures), une nouvelle journalisation démarre.

    + + + CustomLog "|bin/rotatelogs -l /var/log/fichier-journal.%Y.%m.%d 86400" common + + +

    Cette directive crée les fichiers + /var/log/fichier-journal.yyyy.mm.dd où yyyy correspond à l'année, + mm au mois et dd au jour du mois. La journalisation basculera vers + un nouveau fichier chaque jour à minuit, temps local.

    + + + CustomLog "|bin/rotatelogs /var/log/fichier-journal 5M" common + + +

    Cette directive va effectuer une rotation du fichier journal + chaque fois que la taille de ce dernier atteindra 5 MOctets.

    + + + ErrorLog "|bin/rotatelogs /var/log/journal-erreurs.%Y-%m-%d-%H_%M_%S 5M" + +

    Cette directive va effectuer une rotation du fichier journal des + erreurs chaque fois que la taille de ce dernier atteindra 5 + MOctets, et le nom du fichier journal se présentera sous + la forme journal-erreurs.YYYY-mm-dd-HH_MM_SS.

    + + + CustomLog "|bin/rotatelogs -t /var/log/journal 86400" common + + +

    Cet exemple crée le fichier /var/log/journal en le tronquant + au démarrage, puis une fois par jour. Ce scénario implique qu'un + processus séparé (tel que tail) traite le fichier en temps + réel.

    + +
    + +
    Portabilité + +

    Les substitutions des chaînes de format du fichier journal suivantes +doivent être supportées par toutes les implémentations de +strftime(3) ; voir la page de manuel de +strftime(3) pour les extensions spécifiques à une +bibliothèque.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    %Anom du jour de la semaine en entier +(localisé)
    %anom du jour de la semaine sur 3 +caractères (localisé)
    %Bnom du mois en entier (localisé)
    %bnom du mois sur 3 caractères (localisé)
    %cdate et heure (localisé)
    %djour du mois sur 2 chiffres
    %Hheure sur 2 chiffres (de 0 à 24h)
    %Iheure sur 2 chiffres (de 0 à 12h)
    %jjour de l'année sur 3 chiffres
    %Mminutes sur 2 chiffres
    %mmois sur 2 chiffres
    %psuffixe am/pm pour l'heure de 0 à 12h +(localisé)
    %Ssecondes sur 2 chiffres
    %Usemaine de l'année sur 2 chiffres +(Dimanche est le premier jour de la semaine)
    %W semaine de l'année sur 2 chiffres +(Lundi est le premier jour de la semaine)
    %wjour de la semaine sur 1 chiffre +(Dimanche est le premier jour de la semaine)
    %Xheure (localisée)
    %xdate (localisée)
    %Yannée sur 4 chiffres
    %yannée sur 2 chiffres
    %Znom de la zone de temps
    %%caractère littéral `%'
    + +
    +
    diff --git a/docs/manual/programs/rotatelogs.xml.ko b/docs/manual/programs/rotatelogs.xml.ko index 338d5d99c8f..a981d60ae20 100644 --- a/docs/manual/programs/rotatelogs.xml.ko +++ b/docs/manual/programs/rotatelogs.xml.ko @@ -1,7 +1,7 @@ - + + +split-logfile - Split up multi-vhost logfiles - Apache HTTP Server Version 2.4 + + + + + + + +
    <-
    +

    split-logfile - Split up multi-vhost logfiles

    +
    +

    Available Languages:  en 

    +
    + +

    This perl script will take a combined Web server access log file and + break its contents into separate files. It assumes that the first field of + each line is the virtual host identity, put there using the "%v" + variable in LogFormat. +

    +
    +
    top
    +
    +

    Usage

    + +

    Create a log file with virtual host information in it:

    + +
    LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost
    +CustomLog logs/access_log combined_plus_vhost
    + + +

    Log files will be created, in the directory where you run the + script, for each virtual host name that appears in the combined log file. + These logfiles will named after the hostname, with a + .log file extension.

    + +

    The combined log file is read from stdin. Records read will be appended + to any existing log files.

    + +

    split-logfile < access_log

    + + +
    +
    +

    Available Languages:  en 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/programs/split-logfile.xml b/docs/manual/programs/split-logfile.xml new file mode 100644 index 00000000000..63f8f8a43ed --- /dev/null +++ b/docs/manual/programs/split-logfile.xml @@ -0,0 +1,58 @@ + + + + + + + + +Programs + +split-logfile - Split up multi-vhost logfiles + + +

    This perl script will take a combined Web server access log file and + break its contents into separate files. It assumes that the first field of + each line is the virtual host identity, put there using the "%v" + variable in LogFormat. +

    +
    + +
    Usage + +

    Create a log file with virtual host information in it:

    + + +LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost +CustomLog logs/access_log combined_plus_vhost + + +

    Log files will be created, in the directory where you run the + script, for each virtual host name that appears in the combined log file. + These logfiles will named after the hostname, with a + .log file extension.

    + +

    The combined log file is read from stdin. Records read will be appended + to any existing log files.

    + + split-logfile < access_log + + +
    + +
    diff --git a/docs/manual/programs/split-logfile.xml.meta b/docs/manual/programs/split-logfile.xml.meta new file mode 100644 index 00000000000..21514060e7b --- /dev/null +++ b/docs/manual/programs/split-logfile.xml.meta @@ -0,0 +1,12 @@ + + + + + split-logfile + /programs/ + .. + + + en + + diff --git a/docs/manual/programs/suexec.html.en b/docs/manual/programs/suexec.html.en index 0cdc3151ffe..29d81873063 100644 --- a/docs/manual/programs/suexec.html.en +++ b/docs/manual/programs/suexec.html.en @@ -1,22 +1,27 @@ - -suexec - Switch user before executing external programs - Apache HTTP Server +suexec - Switch user before executing external programs - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    suexec - Switch user before executing external programs

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    suexec - Switch user before executing external programs

    Available Languages:  en  |  ko  | @@ -30,12 +35,12 @@ setuid bit set and must be owned by root. It should never be writable for any other person than root.

    -

    For further information about the concepts and and the security model - of suexec please refer to the suexec documentation (http://httpd.apache.org/docs/trunk/suexec.html).

    +

    For further information about the concepts and the security model + of suexec please refer to the suexec documentation (http://httpd.apache.org/docs/2.4/suexec.html).

    +

    See also

    top

    Synopsis

    @@ -57,7 +62,28 @@ changeable only at compile time.

    Available Languages:  en  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/suexec.html.ko.euc-kr b/docs/manual/programs/suexec.html.ko.euc-kr index 905d5f35ac1..ac6350e401a 100644 --- a/docs/manual/programs/suexec.html.ko.euc-kr +++ b/docs/manual/programs/suexec.html.ko.euc-kr @@ -1,22 +1,27 @@ - -suexec - ܺ α׷ ϱ ڸ Ѵ - Apache HTTP Server +suexec - ܺ α׷ ϱ ڸ Ѵ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    suexec - ܺ α׷ ϱ ڸ Ѵ

    +Apache > HTTP Server > Documentation > Version 2.4 > Programs

    suexec - ܺ α׷ ϱ ڸ Ѵ

    :  en  |  ko  | @@ -34,11 +39,11 @@ ٸ ڰ ȵȴ.

    suexec ȸ𵨿 suexec - (http://httpd.apache.org/docs/trunk/suexec.html) ϶.

    + (http://httpd.apache.org/docs/2.4/suexec.html) ϶.

    +

    top

    @@ -60,7 +65,28 @@

    :  en  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/suexec.html.tr.utf8 b/docs/manual/programs/suexec.html.tr.utf8 index d6fa344bbc2..dd5314770ad 100644 --- a/docs/manual/programs/suexec.html.tr.utf8 +++ b/docs/manual/programs/suexec.html.tr.utf8 @@ -1,22 +1,27 @@ - -suexec - harici programları çalıştırmadan önce kullanıcıyı değiştirir - Apache HTTP Sunucusu +suexec - harici programları çalıştırmadan önce kullanıcıyı değiştirir - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    suexec - harici programları çalıştırmadan önce kullanıcıyı değiştirir

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4 > Programlar

    suexec - harici programları çalıştırmadan önce kullanıcıyı değiştirir

    Mevcut Diller:  en  |  ko  | @@ -33,11 +38,11 @@ yazamamalıdır.

    suexec güvenlik modeli ve kavramlar - hakkında bilgi edinmek için suexec belgesine (http://httpd.apache.org/docs/trunk/suexec.html) bakınız.

    + hakkında bilgi edinmek için suexec belgesine (http://httpd.apache.org/docs/2.4/suexec.html) bakınız.

    +

    Ayrıca bakınız:

    top

    Kullanım

    @@ -57,7 +62,28 @@

    Mevcut Diller:  en  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/programs/suexec.xml b/docs/manual/programs/suexec.xml index 890f873890e..7ddf54e5458 100644 --- a/docs/manual/programs/suexec.xml +++ b/docs/manual/programs/suexec.xml @@ -33,7 +33,7 @@ setuid bit set and must be owned by root. It should never be writable for any other person than root.

    -

    For further information about the concepts and and the security model +

    For further information about the concepts and the security model of suexec please refer to the suexec documentation (http://httpd.apache.org/docs/&httpd.docs;/suexec.html).

    diff --git a/docs/manual/programs/suexec.xml.ko b/docs/manual/programs/suexec.xml.ko index c621960a622..eb7583af8a4 100644 --- a/docs/manual/programs/suexec.xml.ko +++ b/docs/manual/programs/suexec.xml.ko @@ -1,7 +1,7 @@ - + + -Using mod_rewrite to control access - Apache HTTP Server +Using mod_rewrite to control access - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Forbidding Image "Hotlinking"

    @@ -75,29 +81,26 @@ configuration.
    -

    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ - [F,NC] -

    +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$"    "-"   [F,NC]
    +

    In this second example, instead of failing the request, we display an alternate image instead.

    -

    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC] -

    +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$"    "/images/go-away.png"   [R,NC]
    +

    In the third example, we redirect the request to an image on some other site.

    -

    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] -

    +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$" "http://other.example.com/image.gif"   [R,NC]
    +

    Of these techniques, the last two tend to be the most effective in getting people to stop hotlinking your images, because they will @@ -112,14 +115,11 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif than redirecting that request elsewhere, this can be accomplished without the use of mod_rewrite:

    -

    - SetEnvIf Referer example\.com localreferer
    - <FilesMatch \.(jpg|png|gif)$>
    - Order deny,allow
    - Deny from all
    - Allow from env=localreferer
    - </FilesMatch> -

    +
    SetEnvIf Referer "example\.com" localreferer
    +<FilesMatch "\.(jpg|png|gif)$">
    +    Require env localreferer
    +</FilesMatch>
    + @@ -139,7 +139,7 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif

    The standard for robot exclusion defines a file, /robots.txt that specifies those portions of your - website where you which to exclude robots. However, some robots + website where you wish to exclude robots. However, some robots do not honor these files.

    @@ -162,11 +162,10 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif range, if you are trying to block that user agent only from the particular source.

    -

    -RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot
    -RewriteCond %{REMOTE_ADDR} =123\.45\.67\.[8-9]
    -RewriteRule ^/secret/files/ - [F] -

    +
    RewriteCond "%{HTTP_USER_AGENT}"   "^NameOfBadRobot"
    +RewriteCond "%{REMOTE_ADDR}"       "=123\.45\.67\.[8-9]"
    +RewriteRule "^/secret/files/"   "-"   [F]
    +
    Discussion:
    @@ -176,14 +175,14 @@ RewriteRule ^/secret/files/ - [F] Rather than using mod_rewrite for this, you can accomplish the same end using alternate means, as illustrated here:

    -

    - SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
    - <Location /secret/files>
    - Order allow,deny
    - Allow from all
    - Deny from env=goaway
    - </Location> -

    +
    SetEnvIfNoCase User-Agent "^NameOfBadRobot" goaway
    +<Location "/secret/files">
    +    <RequireAll>
    +        Require all granted
    +        Require not env goaway
    +    </RequireAll>
    +</Location>
    +

    As noted above, this technique is trivial to circumvent, by simply modifying the USER_AGENT request header. If you @@ -213,13 +212,12 @@ RewriteRule ^/secret/files/ - [F]

    Solution:
    -

    -RewriteEngine on
    -RewriteMap hosts-deny txt:/path/to/hosts.deny
    -RewriteCond ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
    -RewriteCond ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule ^ - [F] -

    +
    RewriteEngine on
    +RewriteMap    hosts-deny  "txt:/path/to/hosts.deny"
    +RewriteCond   "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR]
    +RewriteCond   "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND"
    +RewriteRule   "^"  "-"  [F]
    +

    ##
    @@ -267,39 +265,59 @@ bsdti1.sdm.de -

    The following ruleset uses a map file to associate each Referer with a redirection target.

    -

    -RewriteMap deflector txt:/path/to/deflector.map
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}} =-
    -RewriteRule ^ %{HTTP_REFERER} [R,L]
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L] -

    +
    RewriteMap  deflector "txt:/path/to/deflector.map"
    +
    +RewriteCond "%{HTTP_REFERER}" !=""
    +RewriteCond "${deflector:%{HTTP_REFERER}}" "=-"
    +RewriteRule "^" "%{HTTP_REFERER}" [R,L]
    +
    +RewriteCond "%{HTTP_REFERER}" !=""
    +RewriteCond "${deflector:%{HTTP_REFERER}|NOT-FOUND}" "!=NOT-FOUND"
    +RewriteRule "^" "${deflector:%{HTTP_REFERER}}" [R,L]
    +

    The map file lists redirection targets for each referer, or, if we just wish to redirect back to where they came from, a "-" is placed in the map:

    -

    -##
    -## deflector.map
    -##
    -
    -http://badguys.example.com/bad/index.html -
    -http://badguys.example.com/bad/index2.html -
    -http://badguys.example.com/bad/index3.html http://somewhere.example.com/ -

    +
    ##
    +##  deflector.map
    +##
    +
    +http://badguys.example.com/bad/index.html    -
    +http://badguys.example.com/bad/index2.html   -
    +http://badguys.example.com/bad/index3.html   http://somewhere.example.com/
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/access.html.fr b/docs/manual/rewrite/access.html.fr new file mode 100644 index 00000000000..2663202aa3a --- /dev/null +++ b/docs/manual/rewrite/access.html.fr @@ -0,0 +1,331 @@ + + + + + +Utiliser mod_rewrite pour le contrle d'accs - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Utiliser mod_rewrite pour le contrle d'accs

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment la documentation de rfrence de +mod_rewrite. Il explique comment utiliser +mod_rewrite pour contrler l'accs diverses +ressources, ainsi que d'autres techniques en rapport. Il contient de +nombreux exemples d'utilisation courante de mod_rewrite avec une +description dtaille de leur fonctionnement.

    + +
    Vous devez vous attacher comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre systme si vous vous contentez de les +copier/coller dans vos fichiers de configuration.
    + +
    + +
    top
    +
    +

    Blocage du rfrencement chaud (Hotlinking) d'images

    + + + +
    +
    Description :
    + +
    +

    Cette technique vous permet d'interdire d'autres sites + d'inclure directement vos images dans leurs pages. On fait + souvent rfrence cette pratique sous le nom de + rfrencement chaud (Hotlinking) qui entrane l'utilisation + de votre bande passante pour servir des contenus faisant + partie du site de quelqu'un d'autre.

    +
    + +
    Solution :
    + +
    +

    Cette technique repose sur la valeur de la variable + optionnelle HTTP_REFERER. Certaines personnes + pourront donc contourner cette limitation. Pour la plupart des + utilisateurs cependant, la requte chouera, en ce sens que + l'image ne sera pas affiche depuis le site tiers.

    +

    Il y a plusieurs manires de grer cette situation.

    + +

    Dans le premier exemple, nous rejetons tout simplement la + requte si elle ne provenait pas d'une page appartenant notre + site. Pour les besoins de cet exemple, nous supposons que le nom + de votre site est www.example.com.

    + + + +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$"    "-"   [F,NC]
    + + +

    Dans le second exemple, plutt que de rejeter la requte, + nous affichons une autre image la place.

    + +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$"    "/images/go-away.png"   [R,NC]
    + + +

    Dans le troisime exemple, nous redirigeons la requte vers + une image appartenant un autre site.

    + +
    RewriteCond "%{HTTP_REFERER}" "!^$"
    +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC]
    +RewriteRule "\.(gif|jpg|png)$" "http://other.example.com/image.gif"   [R,NC]
    + + +

    De tous ces exemples, les deux derniers semblent les plus + efficaces pour faire en sorte que les gens arrtent de + rfrencer vos images chaud, car il ne verront pas les images + qu'ils s'attendent voir.

    + +
    + +
    Discussion :
    + +
    +

    Si vous ne voulez pas rediriger la requte, mais + simplement interdire l'accs la ressource, vous pouvez y + parvenir sans utiliser mod_rewrite :

    + +
    SetEnvIf Referer "example\.com" localreferer
    +<FilesMatch "\.(jpg|png|gif)$">
    +    Require env localreferer
    +</FilesMatch>
    + +
    +
    + +
    top
    +
    +

    Blocage des robots

    + + + +
    +
    Description :
    + +
    +

    + Dans cet exemple, nous allons discuter d'une mthode permettant + de bloquer les requtes persistentes en provenance d'un robot + particulier, ou d'un navigateur.

    + +

    La mthode classique pour exclure un robot consiste dfinir + un fichier, /robots.txt qui spcifie les parties de + votre site web pour lesquelles vous voulez exclure les robots. + Malheureusement, certains robots ne tiennent pas compte de ces + fichiers. +

    + +

    Notez qu'il existe des mthodes d'exclusion qui n'utilisent + pas mod_rewrite. Notez aussi que toute technique qui repose sur + le contenu de la chane client USER_AGENT peut tre + contourne trs facilement car cette chane peut tre modifie.

    +
    + +
    Solution :
    + +
    +

    On utilise un jeu de rgles qui spcifie le rpertoire + protger, ainsi que la chane client USER_AGENT qui + identifie le robot malin ou envahissant.

    + +

    Dans cet exemple, nous bloquons un robot nomm + Vilain_Robot pour le rpertoire + /secret/fichiers. Si vous voulez bloquer ce client + seulement depuis une source particulire, vous pouvez aussi + spcifier un intervalle d'adresses IP.

    + +
    RewriteCond "%{HTTP_USER_AGENT}"   "^NameOfBadRobot"
    +RewriteCond "%{REMOTE_ADDR}"       "=123\.45\.67\.[8-9]"
    +RewriteRule "^/secret/files/"   "-"   [F]
    + +
    + +
    Discussion :
    + +
    +

    + Vous pouvez cependant parvenir au mme rsultat sans utiliser + mod_rewrite via la mthode alternative suivante : +

    +
    SetEnvIfNoCase User-Agent "^NameOfBadRobot" goaway
    +<Location "/secret/files">
    +    <RequireAll>
    +        Require all granted
    +        Require not env goaway
    +    </RequireAll>
    +</Location>
    + +

    + Comme indiqu plus haut, il est ais de contourner cette + technique, simplement en modifiant le contenu de l'en-tte + USER_AGENT. Si vous subissez une attaque en rgle, + vous allez devoir rflchir un blocage un niveau suprieur, + par exemple une rgle de filtrage de votre pare-feu. +

    + +
    + +
    + +
    top
    +
    +

    Rejet des clients contenus dans une liste noire

    + + + +
    +
    Description :
    + +
    +

    Nous voulons interdire l'accs notre serveur aux clients + contenus dans une liste noire similaire + hosts.deny.

    +
    + +
    Solution :
    + +
    +
    RewriteEngine on
    +RewriteMap    hosts-deny  "txt:/path/to/hosts.deny"
    +RewriteCond   "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR]
    +RewriteCond   "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND"
    +RewriteRule   "^"  "-"  [F]
    + + +

    +##
    +## hosts.deny
    +##
    +## ATTENTION! Ceci est une table de correspondances, non une liste,
    +## mme si elle est traite comme telle. mod_rewrite
    +## l'interprte comme une liste de paires cl/valeur, et
    +## chaque entre doit au moins possder une valeur par
    +## dfaut "-".
    +
    +193.102.180.41 -
    +bsdti1.sdm.de -
    +192.76.162.40 -
    +

    +
    + +
    Discussion :
    +
    +

    + La seconde condition RewriteCond prsuppose que HostNameLookups est + dfini On, de faon ce que les adresses IP des clients puissent + tre rsolues. Dans le cas contraire, vous devez supprimer la + seconde condition, ainsi que le drapeau [OR] de la + premire. +

    +
    +
    + +
    top
    +
    +

    Aiguillage bas sur l'en-tte Referer

    + + + +
    +
    Description :
    + +
    +

    Redirige les requtes en fonction du Referer de provenance de + la requte, avec des cibles diffrentes pour chaque Referer.

    +
    + +
    Solution :
    + +
    +

    Le jeu de rgles suivant utilise un fichier de correspondances pour + associer chaque Referer une cible de redirection.

    + +
    RewriteMap  deflector "txt:/path/to/deflector.map"
    +
    +RewriteCond "%{HTTP_REFERER}" !=""
    +RewriteCond "${deflector:%{HTTP_REFERER}}" "=-"
    +RewriteRule "^" "%{HTTP_REFERER}" [R,L]
    +
    +RewriteCond "%{HTTP_REFERER}" !=""
    +RewriteCond "${deflector:%{HTTP_REFERER}|NOT-FOUND}" "!=NOT-FOUND"
    +RewriteRule "^" "${deflector:%{HTTP_REFERER}}" [R,L]
    + + +

    Le fichier de correspondances contient les cibles de + redirection associes chaque Referer, ou, si nous voulons + simplement rediriger les requtes vers leur Referer, un "-" est + inscrit dans le fichier de correspondances :

    + +
    ##
    +##  deflector.map
    +##
    +
    +http://badguys.example.com/bad/index.html    -
    +http://badguys.example.com/bad/index2.html   -
    +http://badguys.example.com/bad/index3.html   http://somewhere.example.com/
    + + +
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/access.xml b/docs/manual/rewrite/access.xml index 08c2032eb26..fcd924d762b 100644 --- a/docs/manual/rewrite/access.xml +++ b/docs/manual/rewrite/access.xml @@ -83,29 +83,29 @@ configuration. - -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ - [F,NC] -
    + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "-" [F,NC] +

    In this second example, instead of failing the request, we display an alternate image instead.

    - -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC] -
    + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "/images/go-away.png" [R,NC] +

    In the third example, we redirect the request to an image on some other site.

    - -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] -
    + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "http://other.example.com/image.gif" [R,NC] +

    Of these techniques, the last two tend to be the most effective in getting people to stop hotlinking your images, because they will @@ -120,14 +120,12 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif than redirecting that request elsewhere, this can be accomplished without the use of mod_rewrite:

    - - SetEnvIf Referer example\.com localreferer
    - <FilesMatch \.(jpg|png|gif)$>
    - Order deny,allow
    - Deny from all
    - Allow from env=localreferer
    - </FilesMatch> -
    + +SetEnvIf Referer "example\.com" localreferer +<FilesMatch "\.(jpg|png|gif)$"> + Require env localreferer +</FilesMatch> + @@ -147,7 +145,7 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif

    The standard for robot exclusion defines a file, /robots.txt that specifies those portions of your - website where you which to exclude robots. However, some robots + website where you wish to exclude robots. However, some robots do not honor these files.

    @@ -170,11 +168,11 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif range, if you are trying to block that user agent only from the particular source.

    - -RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot
    -RewriteCond %{REMOTE_ADDR} =123\.45\.67\.[8-9]
    -RewriteRule ^/secret/files/ - [F] -
    + +RewriteCond "%{HTTP_USER_AGENT}" "^NameOfBadRobot" +RewriteCond "%{REMOTE_ADDR}" "=123\.45\.67\.[8-9]" +RewriteRule "^/secret/files/" "-" [F] +
    Discussion:
    @@ -184,14 +182,15 @@ RewriteRule ^/secret/files/ - [F] Rather than using mod_rewrite for this, you can accomplish the same end using alternate means, as illustrated here:

    - - SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
    - <Location /secret/files>
    - Order allow,deny
    - Allow from all
    - Deny from env=goaway
    - </Location> -
    + +SetEnvIfNoCase User-Agent "^NameOfBadRobot" goaway +<Location "/secret/files"> + <RequireAll> + Require all granted + Require not env goaway + </RequireAll> +</Location> +

    As noted above, this technique is trivial to circumvent, by simply modifying the USER_AGENT request header. If you @@ -221,13 +220,13 @@ RewriteRule ^/secret/files/ - [F]

    Solution:
    - -RewriteEngine on
    -RewriteMap hosts-deny txt:/path/to/hosts.deny
    -RewriteCond ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR]
    -RewriteCond ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule ^ - [F] -
    + +RewriteEngine on +RewriteMap hosts-deny "txt:/path/to/hosts.deny" +RewriteCond "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR] +RewriteCond "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND" +RewriteRule "^" "-" [F] + ##
    @@ -275,31 +274,31 @@ bsdti1.sdm.de -

    The following ruleset uses a map file to associate each Referer with a redirection target.

    - -RewriteMap deflector txt:/path/to/deflector.map
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}} =-
    -RewriteRule ^ %{HTTP_REFERER} [R,L]
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L] -
    + +RewriteMap deflector "txt:/path/to/deflector.map" + +RewriteCond "%{HTTP_REFERER}" !="" +RewriteCond "${deflector:%{HTTP_REFERER}}" "=-" +RewriteRule "^" "%{HTTP_REFERER}" [R,L] + +RewriteCond "%{HTTP_REFERER}" !="" +RewriteCond "${deflector:%{HTTP_REFERER}|NOT-FOUND}" "!=NOT-FOUND" +RewriteRule "^" "${deflector:%{HTTP_REFERER}}" [R,L] +

    The map file lists redirection targets for each referer, or, if we just wish to redirect back to where they came from, a "-" is placed in the map:

    - -##
    -## deflector.map
    -##
    -
    -http://badguys.example.com/bad/index.html -
    -http://badguys.example.com/bad/index2.html -
    + +## +## deflector.map +## + +http://badguys.example.com/bad/index.html - +http://badguys.example.com/bad/index2.html - http://badguys.example.com/bad/index3.html http://somewhere.example.com/ -
    +
    diff --git a/docs/manual/rewrite/access.xml.fr b/docs/manual/rewrite/access.xml.fr new file mode 100644 index 00000000000..82ceaca073d --- /dev/null +++ b/docs/manual/rewrite/access.xml.fr @@ -0,0 +1,321 @@ + + + + + + + + + + + + Rewrite + +Utiliser mod_rewrite pour le contrôle d'accès + + + +

    Ce document est un complément à la documentation de référence de +mod_rewrite. Il explique comment utiliser +mod_rewrite pour contrôler l'accès à diverses +ressources, ainsi que d'autres techniques en rapport. Il contient de +nombreux exemples d'utilisation courante de mod_rewrite avec une +description détaillée de leur fonctionnement.

    + +Vous devez vous attacher à comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre système si vous vous contentez de les +copier/coller dans vos fichiers de configuration. + +
    +Documentation du module mod_rewrite +Introduction à mod_rewrite +Redirection et remise en +correspondance + +Serveurs virtuels +Serveurs mandataires +Utilisation de RewriteMap +Techniques avancées +Quand ne pas utiliser mod_rewrite + +
    + + Blocage du référencement à chaud (Hotlinking) d'images + +
    +
    Description :
    + +
    +

    Cette technique vous permet d'interdire à d'autres sites + d'inclure directement vos images dans leurs pages. On fait + souvent référence à cette pratique sous le nom de + référencement à chaud (Hotlinking) qui entraîne l'utilisation + de votre bande passante pour servir des contenus faisant + partie du site de quelqu'un d'autre.

    +
    + +
    Solution :
    + +
    +

    Cette technique repose sur la valeur de la variable + optionnelle HTTP_REFERER. Certaines personnes + pourront donc contourner cette limitation. Pour la plupart des + utilisateurs cependant, la requête échouera, en ce sens que + l'image ne sera pas affichée depuis le site tiers.

    +

    Il y a plusieurs manières de gérer cette situation.

    + +

    Dans le premier exemple, nous rejetons tout simplement la + requête si elle ne provenait pas d'une page appartenant à notre + site. Pour les besoins de cet exemple, nous supposons que le nom + de votre site est www.example.com.

    + + + + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "-" [F,NC] + + +

    Dans le second exemple, plutôt que de rejeter la requête, + nous affichons une autre image à la place.

    + + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "/images/go-away.png" [R,NC] + + +

    Dans le troisième exemple, nous redirigeons la requête vers + une image appartenant à un autre site.

    + + +RewriteCond "%{HTTP_REFERER}" "!^$" +RewriteCond "%{HTTP_REFERER}" "!www.example.com" [NC] +RewriteRule "\.(gif|jpg|png)$" "http://other.example.com/image.gif" [R,NC] + + +

    De tous ces exemples, les deux derniers semblent les plus + efficaces pour faire en sorte que les gens arrêtent de + référencer vos images à chaud, car il ne verront pas les images + qu'ils s'attendent à voir.

    + +
    + +
    Discussion :
    + +
    +

    Si vous ne voulez pas rediriger la requête, mais + simplement interdire l'accès à la ressource, vous pouvez y + parvenir sans utiliser mod_rewrite :

    + + +SetEnvIf Referer "example\.com" localreferer +<FilesMatch "\.(jpg|png|gif)$"> + Require env localreferer +</FilesMatch> + +
    +
    + +
    + +
    + + Blocage des robots + +
    +
    Description :
    + +
    +

    + Dans cet exemple, nous allons discuter d'une méthode permettant + de bloquer les requêtes persistentes en provenance d'un robot + particulier, ou d'un navigateur.

    + +

    La méthode classique pour exclure un robot consiste à définir + un fichier, /robots.txt qui spécifie les parties de + votre site web pour lesquelles vous voulez exclure les robots. + Malheureusement, certains robots ne tiennent pas compte de ces + fichiers. +

    + +

    Notez qu'il existe des méthodes d'exclusion qui n'utilisent + pas mod_rewrite. Notez aussi que toute technique qui repose sur + le contenu de la chaîne client USER_AGENT peut être + contournée très facilement car cette chaîne peut être modifiée.

    +
    + +
    Solution :
    + +
    +

    On utilise un jeu de règles qui spécifie le répertoire à + protéger, ainsi que la chaîne client USER_AGENT qui + identifie le robot malin ou envahissant.

    + +

    Dans cet exemple, nous bloquons un robot nommé + Vilain_Robot pour le répertoire + /secret/fichiers. Si vous voulez bloquer ce client + seulement depuis une source particulière, vous pouvez aussi + spécifier un intervalle d'adresses IP.

    + + +RewriteCond "%{HTTP_USER_AGENT}" "^NameOfBadRobot" +RewriteCond "%{REMOTE_ADDR}" "=123\.45\.67\.[8-9]" +RewriteRule "^/secret/files/" "-" [F] + +
    + +
    Discussion :
    + +
    +

    + Vous pouvez cependant parvenir au même résultat sans utiliser + mod_rewrite via la méthode alternative suivante : +

    + +SetEnvIfNoCase User-Agent "^NameOfBadRobot" goaway +<Location "/secret/files"> + <RequireAll> + Require all granted + Require not env goaway + </RequireAll> +</Location> + +

    + Comme indiqué plus haut, il est aisé de contourner cette + technique, simplement en modifiant le contenu de l'en-tête + USER_AGENT. Si vous subissez une attaque en règle, + vous allez devoir réfléchir à un blocage à un niveau supérieur, + par exemple une règle de filtrage de votre pare-feu. +

    + +
    + +
    + +
    + +
    + + Rejet des clients contenus dans une liste noire + +
    +
    Description :
    + +
    +

    Nous voulons interdire l'accès à notre serveur aux clients + contenus dans une liste noire similaire à + hosts.deny.

    +
    + +
    Solution :
    + +
    + +RewriteEngine on +RewriteMap hosts-deny "txt:/path/to/hosts.deny" +RewriteCond "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR] +RewriteCond "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND" +RewriteRule "^" "-" [F] + + + +##
    +## hosts.deny
    +##
    +## ATTENTION! Ceci est une table de correspondances, non une liste,
    +## même si elle est traitée comme telle. mod_rewrite
    +## l'interprète comme une liste de paires clé/valeur, et
    +## chaque entrée doit au moins posséder une valeur par
    +## défaut "-".
    +
    +193.102.180.41 -
    +bsdti1.sdm.de -
    +192.76.162.40 -
    +
    +
    + +
    Discussion :
    +
    +

    + La seconde condition RewriteCond présuppose que HostNameLookups est + défini à On, de façon à ce que les adresses IP des clients puissent + être résolues. Dans le cas contraire, vous devez supprimer la + seconde condition, ainsi que le drapeau [OR] de la + première. +

    +
    +
    + +
    + +
    + + Aiguillage basé sur l'en-tête Referer + +
    +
    Description :
    + +
    +

    Redirige les requêtes en fonction du Referer de provenance de + la requête, avec des cibles différentes pour chaque Referer.

    +
    + +
    Solution :
    + +
    +

    Le jeu de règles suivant utilise un fichier de correspondances pour + associer chaque Referer à une cible de redirection.

    + + +RewriteMap deflector "txt:/path/to/deflector.map" + +RewriteCond "%{HTTP_REFERER}" !="" +RewriteCond "${deflector:%{HTTP_REFERER}}" "=-" +RewriteRule "^" "%{HTTP_REFERER}" [R,L] + +RewriteCond "%{HTTP_REFERER}" !="" +RewriteCond "${deflector:%{HTTP_REFERER}|NOT-FOUND}" "!=NOT-FOUND" +RewriteRule "^" "${deflector:%{HTTP_REFERER}}" [R,L] + + +

    Le fichier de correspondances contient les cibles de + redirection associées à chaque Referer, ou, si nous voulons + simplement rediriger les requêtes vers leur Referer, un "-" est + inscrit dans le fichier de correspondances :

    + + +## +## deflector.map +## + +http://badguys.example.com/bad/index.html - +http://badguys.example.com/bad/index2.html - +http://badguys.example.com/bad/index3.html http://somewhere.example.com/ + + +
    +
    + +
    + + +
    diff --git a/docs/manual/rewrite/access.xml.meta b/docs/manual/rewrite/access.xml.meta index aa67bf49f9f..cda0183580c 100644 --- a/docs/manual/rewrite/access.xml.meta +++ b/docs/manual/rewrite/access.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/advanced.html b/docs/manual/rewrite/advanced.html index 64d0639fcfe..c82f1dc0966 100644 --- a/docs/manual/rewrite/advanced.html +++ b/docs/manual/rewrite/advanced.html @@ -3,3 +3,7 @@ URI: advanced.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: advanced.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/advanced.html.en b/docs/manual/rewrite/advanced.html.en index a09dc0c350e..360aea5be77 100644 --- a/docs/manual/rewrite/advanced.html.en +++ b/docs/manual/rewrite/advanced.html.en @@ -1,24 +1,30 @@ - -Advanced Techniques with mod_rewrite - Apache HTTP Server +Advanced Techniques with mod_rewrite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Advanced Techniques with mod_rewrite

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite

    Advanced Techniques with mod_rewrite

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -32,18 +38,17 @@ them, rather than merely cutting and pasting the examples into your configuration.
    -
    top
    -

    URL-based sharding accross multiple backends

    +

    URL-based sharding across multiple backends

    @@ -88,13 +93,10 @@ http://physical_host_of_user1/u/user/anypath files assuming that server0 is a default server which will be used if a user has no entry in the map:

    -

    -RewriteEngine on
    -
    -RewriteMap users-to-hosts txt:/path/to/map.users-to-hosts
    -
    -RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hosts:$1|server0}/u/$1/$2 -

    +
    RewriteEngine on
    +RewriteMap      users-to-hosts   "txt:/path/to/map.users-to-hosts"
    +RewriteRule   "^/u/([^/]+)/?(.*)"   "http://${users-to-hosts:$1|server0}/u/$1/$2"
    + @@ -123,11 +125,10 @@ RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hos
    This is done via the following ruleset: -

    -# This example is valid in per-directory context only
    -RewriteCond %{REQUEST_URI} !-U
    -RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L] -

    +
    # This example is valid in per-directory context only
    +RewriteCond "%{REQUEST_URI}"   "!-U"
    +RewriteRule "^(.+)\.html$"          "/regenerate_page.cgi"   [PT,L]
    +

    The -U operator determines whether the test string (in this case, REQUEST_URI) is a valid URL. It does @@ -164,12 +165,10 @@ RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L]

    We'll use RewriteMap and a list of servers to accomplish this.

    -

    -RewriteEngine on
    -RewriteMap lb rnd:/path/to/serverlist.txt
    -
    -RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L] -

    +
    RewriteEngine on
    +RewriteMap lb "rnd:/path/to/serverlist.txt"
    +RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L]
    +

    serverlist.txt will contain a list of the servers:

    @@ -192,160 +191,6 @@ featureful than anything you can cobble together using mod_rewrite.

    -
    top
    -
    -

    Document With Autorefresh

    - - - - - -
    -
    Description:
    - -
    -

    Wouldn't it be nice, while creating a complex web page, if - the web browser would automatically refresh the page every - time we save a new version from within our editor? - Impossible?

    -
    - -
    Solution:
    - -
    -

    No! We just combine the MIME multipart feature, the - web server NPH feature, and the URL manipulation power of - mod_rewrite. First, we establish a new - URL feature: Adding just :refresh to any - URL causes the 'page' to be refreshed every time it is - updated on the filesystem.

    - -

    -RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1 -

    - -

    Now when we reference the URL

    - -

    -/u/foo/bar/page.html:refresh -

    - -

    this leads to the internal invocation of the URL

    - -

    -/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html -

    - -

    The only missing part is the NPH-CGI script. Although - one would usually say "left as an exercise to the reader" - ;-) I will provide this, too.

    - -
    -#!/sw/bin/perl
    -##
    -##  nph-refresh -- NPH/CGI script for auto refreshing pages
    -##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
    -##
    -$| = 1;
    -
    -#   split the QUERY_STRING variable
    -@pairs = split(/&/, $ENV{'QUERY_STRING'});
    -foreach $pair (@pairs) {
    -($name, $value) = split(/=/, $pair);
    -$name =~ tr/A-Z/a-z/;
    -$name = 'QS_' . $name;
    -$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    -eval "\$$name = \"$value\"";
    -}
    -$QS_s = 1 if ($QS_s eq '');
    -$QS_n = 3600 if ($QS_n eq '');
    -if ($QS_f eq '') {
    -print "HTTP/1.0 200 OK\n";
    -print "Content-type: text/html\n\n";
    -print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n";
    -exit(0);
    -}
    -if (! -f $QS_f) {
    -print "HTTP/1.0 200 OK\n";
    -print "Content-type: text/html\n\n";
    -print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n";
    -exit(0);
    -}
    -
    -sub print_http_headers_multipart_begin {
    -print "HTTP/1.0 200 OK\n";
    -$bound = "ThisRandomString12345";
    -print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
    -&print_http_headers_multipart_next;
    -}
    -
    -sub print_http_headers_multipart_next {
    -print "\n--$bound\n";
    -}
    -
    -sub print_http_headers_multipart_end {
    -print "\n--$bound--\n";
    -}
    -
    -sub displayhtml {
    -local($buffer) = @_;
    -$len = length($buffer);
    -print "Content-type: text/html\n";
    -print "Content-length: $len\n\n";
    -print $buffer;
    -}
    -
    -sub readfile {
    -local($file) = @_;
    -local(*FP, $size, $buffer, $bytes);
    -($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
    -$size = sprintf("%d", $size);
    -open(FP, "&lt;$file");
    -$bytes = sysread(FP, $buffer, $size);
    -close(FP);
    -return $buffer;
    -}
    -
    -$buffer = &readfile($QS_f);
    -&print_http_headers_multipart_begin;
    -&displayhtml($buffer);
    -
    -sub mystat {
    -local($file) = $_[0];
    -local($time);
    -
    -($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
    -return $mtime;
    -}
    -
    -$mtimeL = &mystat($QS_f);
    -$mtime = $mtime;
    -for ($n = 0; $n &lt; $QS_n; $n++) {
    -while (1) {
    -    $mtime = &mystat($QS_f);
    -    if ($mtime ne $mtimeL) {
    -        $mtimeL = $mtime;
    -        sleep(2);
    -        $buffer = &readfile($QS_f);
    -        &print_http_headers_multipart_next;
    -        &displayhtml($buffer);
    -        sleep(5);
    -        $mtimeL = &mystat($QS_f);
    -        last;
    -    }
    -    sleep($QS_s);
    -}
    -}
    -
    -&print_http_headers_multipart_end;
    -
    -exit(0);
    -
    -##EOF##
    -
    -
    -
    -
    top

    Structured Userdirs

    @@ -371,10 +216,9 @@ exit(0);

    We use the following ruleset to expand the tilde URLs into the above layout.

    -

    -RewriteEngine on
    -RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2/$1/public_html$3 -

    +
    RewriteEngine on
    +RewriteRule   "^/~(([a-z])[a-z0-9]+)(.*)"  "/home/$2/$1/public_html$3"
    + @@ -430,13 +274,12 @@ RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2>STRING
    and =STRING we can do time-dependent redirects:

    -

    -RewriteEngine on
    -RewriteCond %{TIME_HOUR}%{TIME_MIN} >0700
    -RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900
    -RewriteRule ^foo\.html$ foo.day.html [L]
    -RewriteRule ^foo\.html$ foo.night.html -

    +
    RewriteEngine on
    +RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" ">0700"
    +RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" "<1900"
    +RewriteRule   "^foo\.html$"             "foo.day.html" [L]
    +RewriteRule   "^foo\.html$"             "foo.night.html"
    +

    This provides the content of foo.day.html under the URL foo.html from @@ -475,17 +318,15 @@ RewriteRule ^foo\.html$ foo.night.html

    Use the [E] flag to set an environment variable.

    -

    -RewriteEngine on
    -RewriteRule ^/horse/(.*) /pony/$1 [E=rewritten:1] -

    +
    RewriteEngine on
    +RewriteRule   "^/horse/(.*)"   "/pony/$1" [E=rewritten:1]
    +

    Later in your ruleset you might check for this environment variable using a RewriteCond:

    -

    -RewriteCond %{ENV:rewritten} =1 -

    +
    RewriteCond "%{ENV:rewritten}" "=1"
    +

    Note that environment variables do not survive an external redirect. You might consider using the [CO] flag to set a @@ -496,8 +337,30 @@ RewriteCond %{ENV:rewritten} =1

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/advanced.html.fr b/docs/manual/rewrite/advanced.html.fr new file mode 100644 index 00000000000..3f630b4c432 --- /dev/null +++ b/docs/manual/rewrite/advanced.html.fr @@ -0,0 +1,383 @@ + + + + + +Advanced Techniques with mod_rewrite - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Advanced Techniques with mod_rewrite

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document complte la documentation de rfrence du + module mod_rewrite. Il prsente un certain nombre + de techniques avances quant + l'utilisation de mod_rewrite.

    + +
    Notez que la plupart des exemples ne fonctionneront +pas en l'tat dans la configuration particulire de votre serveur ; il +est donc important de bien comprendre leur fonctionnement, plutt que de +simplement les copier/coller dans votre configuration.
    + +
    + +
    top
    +
    +

    Distribution de la charge entre plusieurs serveurs + d'arrire-plan en fonction de l'adresse IP

    + + + +
    +
    Description :
    + +
    +

    La fragmentation ou "sharding" est une technique courante de + distribution de la charge du serveur ou de l'espace de stockage. + Quand on utilise cette mthode, un serveur frontal utilise l'URL + pour rpartir de manire approprie les utilisateurs et objets + entre diffrents serveurs d'arrire-plan.

    +
    + +
    Solution :
    + +
    +

    On maintient une table de correspondance entre utilisateurs et + serveurs cibles dans des fichiers externes. Ces derniers se + prsentent comme suit :

    + +

    +utilisateur1 serveur_physique_utilisateur1
    +utilisateur2 serveur_physique_utilisateur2
    +: : +

    + +

    Tout ceci est enregistr dans un fichier + correspondances-utilisateurs-serveurs. Le but est de + faire correspondre

    + +

    +/u/utilisateur1/chemin +

    + +

    avec

    + +

    +http://serveur_physique_utilisateur1/u/utilisateur/chemin +

    + +

    il n'est ainsi pas ncessaire que tous les chemins URL soient + valides sur tous les serveurs physiques d'arrire-plan. Le jeu de + rgles suivant fait tout ceci pour nous, en s'appuyant sur les + fichiers de correspondances, en supposant que serveur0 est un + serveur par dfaut qui sera utilis lorsqu'un utilisateur ne + possdera pas d'entre dans la table de correspondances :

    + +
    RewriteEngine on
    +RewriteMap      users-to-hosts   "txt:/path/to/map.users-to-hosts"
    +RewriteRule   "^/u/([^/]+)/?(.*)"   "http://${users-to-hosts:$1|server0}/u/$1/$2"
    + +
    +
    + +

    Voir la documentation de RewriteMap pour une description plus + approfondie de la syntaxe de cette directive.

    + +
    top
    +
    +

    Rgneration de contenu la vole

    + + + +
    +
    Description :
    + +
    +

    Nous voulons gnrer du contenu de manire dynamique, mais le + conserver de manire statique lorsqu'il a t gnr. La rgle + suivante vrifie l'existence du fichier statique, et le gnre + s'il est absent. Les fichiers statiques peuvent tre supprims + priodiquement si on le dsire (par exemple via cron), et seront + rgnrs la demande.

    +
    + +
    Solution :
    + +
    + A cet effet, on utilise le jeu de rgles suivant : + +
    # Cet exemple n'est valable que dans un contexte de rpertoire
    +RewriteCond "%{REQUEST_URI}"   "!-U"
    +RewriteRule "^(.+)\.html$"          "/regenerate_page.cgi"   [PT,L]
    + + +

    L'oprateur -U permet de dterminer si la chane + de test (dans ce cas REQUEST_URI) est une URL valide. + Pour ce faire, il utilise une sous-requte. Si cette sous-requte + choue, ou en d'autres termes, si la ressource demande n'existe pas, + cette rgle invoque le programme CGI + /regenerate_page.cgi qui gnre la ressource + demande et la sauvegarde dans le rpertoire des documents, de + faon ce qu'une copie statique puisse tre servie lors d'une + demande ultrieure.

    + +

    De cette faon, les documents qui ne sont pas mis jour + rgulirement peuvent tre servis sous une forme statique. Si ces + documents doivent tre ractualiss, on peut les supprimer du + rpertoire des documents, et ils seront ainsi rgnrs la + prochaine demande.

    +
    +
    + +
    top
    +
    +

    Rpartition de charge

    + + + +
    +
    Description :
    + +
    +

    Nous voulons rpartir la charge de manire alatoire entre + plusieurs serveurs en utilisant mod_rewrite.

    +
    + +
    Solution :
    + +
    +

    Pour y parvenir, nous allons utiliser la directive RewriteMap et une liste de + serveurs.

    + +
    RewriteEngine on
    +RewriteMap lb "rnd:/path/to/serverlist.txt"
    +RewriteRule "^/(.*)" "http://${lb:serveurs}/$1" [P,L]
    + + +

    liste-serveurs.txt contiendra la liste des serveurs :

    + +

    +## liste-serveurs.txt
    +
    +serveurs un.example.com|deux.example.com|trois.example.com
    +

    + +

    Si vous voulez qu'un serveur se voit confier d'avantage de charge que +les autres, faites le figurer plusieurs fois dans la liste.

    + +
    + +
    Discussion
    +
    +

    Apache possde un module de rpartition de charge - +mod_proxy_balancer - beaucoup plus souple et prsentant +plus de fonctionnalits dans ce domaine que mod_rewrite.

    +
    +
    + +
    top
    +
    +

    Rpertoires Home structurs

    + + + +
    +
    Description :
    + +
    +

    Certains sites avec des milliers d'utilisateurs organisent + les rpertoires utilisateurs de manire structure, c'est + dire que chaque rpertoire utilisateur se trouve dans un + sous-rpertoire dont le nom commence (par exemple) par le + premier caractre du nom de l'utilisateur. Ainsi, + /~larry/chemin correspond + /home/l/larry/public_html/chemin, alors + que /~waldo/chemin correspond + /home/w/waldo/public_html/chemin.

    +
    + +
    Solution :
    + +
    +

    On utilise le jeu de rgles suivant pour dvelopper les + URLs avec tilde selon l'organisation structure prcdente.

    + +
    RewriteEngine on
    +RewriteRule   "^/~(([a-z])[a-z0-9]+)(.*)"  "/home/$2/$1/public_html$3"
    + +
    +
    + +
    top
    +
    +

    Redirection des ancrages

    + + + +
    +
    Description :
    + +
    +

    Par dfaut, la redirection vers un ancrage HTML ne fonctionne + pas, car mod_rewrite chappe le caractre # en le + transformant en %23, ce qui rend la redirection + inoprante.

    +
    + +
    Solution :
    + +
    +

    On utilise le drapeau [NE] dans la rgle + RewriteRule. NE signifie "No Escape". +

    +
    + +
    Discussion :
    +
    Cette technique fonctionne bien entendu pour tout autre + caractre spcial que mod_rewrite, par dfaut, code pour insertion + dans une URL.
    +
    + +
    top
    +
    +

    Rcriture dpendant de l'heure

    + + + +
    +
    Description :
    + +
    +

    Nous voulons servir des contenus diffrents selon l'heure du + jour en utilisant mod_rewrite.

    +
    + +
    Solution :
    + +
    +

    Il existe de nombreuses variables nommes + TIME_xxx utilisables dans les conditions de + rcriture. Utilises en conjonction avec les modles de + comparaison lexicographique spciaux <STRING, + >STRING et =STRING, elles + permettent d'effectuer des redirections dpendant de + l'heure :

    + +
    RewriteEngine on
    +RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" ">0700"
    +RewriteCond   "%{TIME_HOUR}%{TIME_MIN}" "<1900"
    +RewriteRule   "^foo\.html$"             "foo.day.html" [L]
    +RewriteRule   "^foo\.html$"             "foo.night.html"
    + + +

    Avec cet exemple, l'URL foo.html renvoie + le contenu de foo.jour.html durant le + crneau horaire 07:01-18:59, et le contenu de + foo.nuit.html le reste du temps.

    + +
    mod_cache, les mandataires + intermdiaires et les navigateurs peuvent chacun mettre en cache + les rponses et ainsi afficher une des deux pages en dehors de + la fentre de temps configure. On peut utiliser + mod_expires pour contourner ce problme. Il est + cependant bien plus commode de servir un contenu dynamique, et + de le personnaliser en fonction de l'heure du jour.
    +
    + +
    top
    +
    +

    Dfinir des variables d'environnement en fonction de + certaines parties de l'URL

    + + + +
    +
    Description :
    + +
    +

    Ici, nous voulons conserver une certaine forme de statut + lorsqu'une rcriture a eu lieu. Par exemple, vous souhaitez + consigner le fait que cette rcriture a eu lieu, et vous servir + plus tard de cette information pour dterminer si une requte sera + concerne par cette rcriture. Pour y parvenir, on peut utiliser + une variable d'environnement.

    +
    + +
    Solution :
    + +
    +

    Utiliser le drapeau [E] pour dfinir une variable + d'environnement.

    + +
    RewriteEngine on
    +RewriteRule   "^/cheval/(.*)"   "/poney/$1" [E=rewritten:1]
    + + +

    Plus loin dans votre jeu de rgles, vous pouvez vrifier le + contenu de cette variable d'environnement via une directive + RewriteCond :

    + +
    RewriteCond "%{ENV:rewritten}" =1
    + + +
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/advanced.xml b/docs/manual/rewrite/advanced.xml index 8ddf03bc971..382a9a18ad3 100644 --- a/docs/manual/rewrite/advanced.xml +++ b/docs/manual/rewrite/advanced.xml @@ -20,7 +20,7 @@ limitations under the License. --> - + Rewrite Advanced Techniques with mod_rewrite @@ -49,7 +49,7 @@ configuration.
    - URL-based sharding accross multiple backends + URL-based sharding across multiple backends
    Description:
    @@ -92,13 +92,11 @@ http://physical_host_of_user1/u/user/anypath files assuming that server0 is a default server which will be used if a user has no entry in the map:

    - -RewriteEngine on
    -
    -RewriteMap users-to-hosts txt:/path/to/map.users-to-hosts
    -
    -RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hosts:$1|server0}/u/$1/$2 -
    + +RewriteEngine on +RewriteMap users-to-hosts "txt:/path/to/map.users-to-hosts" +RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2" +
    @@ -127,11 +125,11 @@ RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hos
    This is done via the following ruleset: - -# This example is valid in per-directory context only
    -RewriteCond %{REQUEST_URI} !-U
    -RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L] -
    + +# This example is valid in per-directory context only +RewriteCond "%{REQUEST_URI}" "!-U" +RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L] +

    The -U operator determines whether the test string (in this case, REQUEST_URI) is a valid URL. It does @@ -169,12 +167,11 @@ RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L] module="mod_rewrite">RewriteMap and a list of servers to accomplish this.

    - -RewriteEngine on
    -RewriteMap lb rnd:/path/to/serverlist.txt
    -
    -RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L] -
    + +RewriteEngine on +RewriteMap lb "rnd:/path/to/serverlist.txt" +RewriteRule "^/(.*)" "http://${lb:servers}/$1" [P,L] +

    serverlist.txt will contain a list of the servers:

    @@ -199,165 +196,6 @@ featureful than anything you can cobble together using mod_rewrite.

    -
    - - Document With Autorefresh - - - -
    -
    Description:
    - -
    -

    Wouldn't it be nice, while creating a complex web page, if - the web browser would automatically refresh the page every - time we save a new version from within our editor? - Impossible?

    -
    - -
    Solution:
    - -
    -

    No! We just combine the MIME multipart feature, the - web server NPH feature, and the URL manipulation power of - mod_rewrite. First, we establish a new - URL feature: Adding just :refresh to any - URL causes the 'page' to be refreshed every time it is - updated on the filesystem.

    - - -RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1 - - -

    Now when we reference the URL

    - - -/u/foo/bar/page.html:refresh - - -

    this leads to the internal invocation of the URL

    - - -/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html - - -

    The only missing part is the NPH-CGI script. Although - one would usually say "left as an exercise to the reader" - ;-) I will provide this, too.

    - -
    -#!/sw/bin/perl
    -##
    -##  nph-refresh -- NPH/CGI script for auto refreshing pages
    -##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
    -##
    -$| = 1;
    -
    -#   split the QUERY_STRING variable
    -@pairs = split(/&/, $ENV{'QUERY_STRING'});
    -foreach $pair (@pairs) {
    -($name, $value) = split(/=/, $pair);
    -$name =~ tr/A-Z/a-z/;
    -$name = 'QS_' . $name;
    -$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    -eval "\$$name = \"$value\"";
    -}
    -$QS_s = 1 if ($QS_s eq '');
    -$QS_n = 3600 if ($QS_n eq '');
    -if ($QS_f eq '') {
    -print "HTTP/1.0 200 OK\n";
    -print "Content-type: text/html\n\n";
    -print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n";
    -exit(0);
    -}
    -if (! -f $QS_f) {
    -print "HTTP/1.0 200 OK\n";
    -print "Content-type: text/html\n\n";
    -print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n";
    -exit(0);
    -}
    -
    -sub print_http_headers_multipart_begin {
    -print "HTTP/1.0 200 OK\n";
    -$bound = "ThisRandomString12345";
    -print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
    -&print_http_headers_multipart_next;
    -}
    -
    -sub print_http_headers_multipart_next {
    -print "\n--$bound\n";
    -}
    -
    -sub print_http_headers_multipart_end {
    -print "\n--$bound--\n";
    -}
    -
    -sub displayhtml {
    -local($buffer) = @_;
    -$len = length($buffer);
    -print "Content-type: text/html\n";
    -print "Content-length: $len\n\n";
    -print $buffer;
    -}
    -
    -sub readfile {
    -local($file) = @_;
    -local(*FP, $size, $buffer, $bytes);
    -($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
    -$size = sprintf("%d", $size);
    -open(FP, "&lt;$file");
    -$bytes = sysread(FP, $buffer, $size);
    -close(FP);
    -return $buffer;
    -}
    -
    -$buffer = &readfile($QS_f);
    -&print_http_headers_multipart_begin;
    -&displayhtml($buffer);
    -
    -sub mystat {
    -local($file) = $_[0];
    -local($time);
    -
    -($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
    -return $mtime;
    -}
    -
    -$mtimeL = &mystat($QS_f);
    -$mtime = $mtime;
    -for ($n = 0; $n &lt; $QS_n; $n++) {
    -while (1) {
    -    $mtime = &mystat($QS_f);
    -    if ($mtime ne $mtimeL) {
    -        $mtimeL = $mtime;
    -        sleep(2);
    -        $buffer = &readfile($QS_f);
    -        &print_http_headers_multipart_next;
    -        &displayhtml($buffer);
    -        sleep(5);
    -        $mtimeL = &mystat($QS_f);
    -        last;
    -    }
    -    sleep($QS_s);
    -}
    -}
    -
    -&print_http_headers_multipart_end;
    -
    -exit(0);
    -
    -##EOF##
    -
    -
    -
    - -
    -
    Structured Userdirs @@ -381,10 +219,10 @@ exit(0);

    We use the following ruleset to expand the tilde URLs into the above layout.

    - -RewriteEngine on
    -RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2/$1/public_html$3 -
    + +RewriteEngine on +RewriteRule "^/~(([a-z])[a-z0-9]+)(.*)" "/home/$2/$1/public_html$3" + @@ -440,13 +278,13 @@ RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2>STRING and =STRING we can do time-dependent redirects:

    - -RewriteEngine on
    -RewriteCond %{TIME_HOUR}%{TIME_MIN} >0700
    -RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900
    -RewriteRule ^foo\.html$ foo.day.html [L]
    -RewriteRule ^foo\.html$ foo.night.html -
    + +RewriteEngine on +RewriteCond "%{TIME_HOUR}%{TIME_MIN}" ">0700" +RewriteCond "%{TIME_HOUR}%{TIME_MIN}" "<1900" +RewriteRule "^foo\.html$" "foo.day.html" [L] +RewriteRule "^foo\.html$" "foo.night.html" +

    This provides the content of foo.day.html under the URL foo.html from @@ -485,17 +323,17 @@ RewriteRule ^foo\.html$ foo.night.html

    Use the [E] flag to set an environment variable.

    - -RewriteEngine on
    -RewriteRule ^/horse/(.*) /pony/$1 [E=rewritten:1] -
    + +RewriteEngine on +RewriteRule "^/horse/(.*)" "/pony/$1" [E=rewritten:1] +

    Later in your ruleset you might check for this environment variable using a RewriteCond:

    - -RewriteCond %{ENV:rewritten} =1 - + +RewriteCond "%{ENV:rewritten}" "=1" +

    Note that environment variables do not survive an external redirect. You might consider using the [CO] flag to set a diff --git a/docs/manual/rewrite/advanced.xml.fr b/docs/manual/rewrite/advanced.xml.fr new file mode 100644 index 00000000000..0f0a1e847e4 --- /dev/null +++ b/docs/manual/rewrite/advanced.xml.fr @@ -0,0 +1,366 @@ + + + + + + + + + + + Rewrite + +Advanced Techniques with mod_rewrite + +

    + +

    Ce document complète la documentation de référence du + module mod_rewrite. Il présente un certain nombre + de techniques avancées quant à + l'utilisation de mod_rewrite.

    + +Notez que la plupart des exemples ne fonctionneront +pas en l'état dans la configuration particulière de votre serveur ; il +est donc important de bien comprendre leur fonctionnement, plutôt que de +simplement les copier/coller dans votre configuration. + +
    +Documentation du module +Introduction à mod_rewrite +Redirection et remise en +correspondance +Contrôler l'accès +serveurs virtuels +serveurs mandataires +Utilisation de RewriteMap + +Quand ne pas utiliser mod_rewrite + +
    + + Distribution de la charge entre plusieurs serveurs + d'arrière-plan en fonction de l'adresse IP + +
    +
    Description :
    + +
    +

    La fragmentation ou "sharding" est une technique courante de + distribution de la charge du serveur ou de l'espace de stockage. + Quand on utilise cette méthode, un serveur frontal utilise l'URL + pour répartir de manière appropriée les utilisateurs et objets + entre différents serveurs d'arrière-plan.

    +
    + +
    Solution :
    + +
    +

    On maintient une table de correspondance entre utilisateurs et + serveurs cibles dans des fichiers externes. Ces derniers se + présentent comme suit :

    + + +utilisateur1 serveur_physique_utilisateur1
    +utilisateur2 serveur_physique_utilisateur2
    +: : +
    + +

    Tout ceci est enregistré dans un fichier + correspondances-utilisateurs-serveurs. Le but est de + faire correspondre

    + + +/u/utilisateur1/chemin + + +

    avec

    + + +http://serveur_physique_utilisateur1/u/utilisateur/chemin + + +

    il n'est ainsi pas nécessaire que tous les chemins URL soient + valides sur tous les serveurs physiques d'arrière-plan. Le jeu de + règles suivant fait tout ceci pour nous, en s'appuyant sur les + fichiers de correspondances, en supposant que serveur0 est un + serveur par défaut qui sera utilisé lorsqu'un utilisateur ne + possèdera pas d'entrée dans la table de correspondances :

    + + +RewriteEngine on +RewriteMap users-to-hosts "txt:/path/to/map.users-to-hosts" +RewriteRule "^/u/([^/]+)/?(.*)" "http://${users-to-hosts:$1|server0}/u/$1/$2" + +
    +
    + +

    Voir la documentation de RewriteMap pour une description plus + approfondie de la syntaxe de cette directive.

    + +
    + +
    + + Régéneration de contenu à la volée + +
    +
    Description :
    + +
    +

    Nous voulons générer du contenu de manière dynamique, mais le + conserver de manière statique lorsqu'il a été généré. La règle + suivante vérifie l'existence du fichier statique, et le génère + s'il est absent. Les fichiers statiques peuvent être supprimés + périodiquement si on le désire (par exemple via cron), et seront + régénérés à la demande.

    +
    + +
    Solution :
    + +
    + A cet effet, on utilise le jeu de règles suivant : + + +# Cet exemple n'est valable que dans un contexte de répertoire +RewriteCond "%{REQUEST_URI}" "!-U" +RewriteRule "^(.+)\.html$" "/regenerate_page.cgi" [PT,L] + + +

    L'opérateur -U permet de déterminer si la chaîne + de test (dans ce cas REQUEST_URI) est une URL valide. + Pour ce faire, il utilise une sous-requête. Si cette sous-requête + échoue, ou en d'autres termes, si la ressource demandée n'existe pas, + cette règle invoque le programme CGI + /regenerate_page.cgi qui génère la ressource + demandée et la sauvegarde dans le répertoire des documents, de + façon à ce qu'une copie statique puisse être servie lors d'une + demande ultérieure.

    + +

    De cette façon, les documents qui ne sont pas mis à jour + régulièrement peuvent être servis sous une forme statique. Si ces + documents doivent être réactualisés, on peut les supprimer du + répertoire des documents, et ils seront ainsi régénérés à la + prochaine demande.

    +
    +
    + +
    + +
    + + Répartition de charge + +
    +
    Description :
    + +
    +

    Nous voulons répartir la charge de manière aléatoire entre + plusieurs serveurs en utilisant mod_rewrite.

    +
    + +
    Solution :
    + +
    +

    Pour y parvenir, nous allons utiliser la directive RewriteMap et une liste de + serveurs.

    + + +RewriteEngine on +RewriteMap lb "rnd:/path/to/serverlist.txt" +RewriteRule "^/(.*)" "http://${lb:serveurs}/$1" [P,L] + + +

    liste-serveurs.txt contiendra la liste des serveurs :

    + + +## liste-serveurs.txt
    +
    +serveurs un.example.com|deux.example.com|trois.example.com
    +
    + +

    Si vous voulez qu'un serveur se voit confier d'avantage de charge que +les autres, faites le figurer plusieurs fois dans la liste.

    + +
    + +
    Discussion
    +
    +

    Apache possède un module de répartition de charge - +mod_proxy_balancer - beaucoup plus souple et présentant +plus de fonctionnalités dans ce domaine que mod_rewrite.

    +
    +
    + +
    + +
    + + Répertoires Home structurés + +
    +
    Description :
    + +
    +

    Certains sites avec des milliers d'utilisateurs organisent + les répertoires utilisateurs de manière structurée, c'est à + dire que chaque répertoire utilisateur se trouve dans un + sous-répertoire dont le nom commence (par exemple) par le + premier caractère du nom de l'utilisateur. Ainsi, + /~larry/chemin correspond à + /home/l/larry/public_html/chemin, alors + que /~waldo/chemin correspond à + /home/w/waldo/public_html/chemin.

    +
    + +
    Solution :
    + +
    +

    On utilise le jeu de règles suivant pour développer les + URLs avec tilde selon l'organisation structurée précédente.

    + + +RewriteEngine on +RewriteRule "^/~(([a-z])[a-z0-9]+)(.*)" "/home/$2/$1/public_html$3" + +
    +
    + +
    + +
    + + Redirection des ancrages + +
    +
    Description :
    + +
    +

    Par défaut, la redirection vers un ancrage HTML ne fonctionne + pas, car mod_rewrite échappe le caractère # en le + transformant en %23, ce qui rend la redirection + inopérante.

    +
    + +
    Solution :
    + +
    +

    On utilise le drapeau [NE] dans la règle + RewriteRule. NE signifie "No Escape". +

    +
    + +
    Discussion :
    +
    Cette technique fonctionne bien entendu pour tout autre + caractère spécial que mod_rewrite, par défaut, code pour insertion + dans une URL.
    +
    + +
    + +
    + + Réécriture dépendant de l'heure + +
    +
    Description :
    + +
    +

    Nous voulons servir des contenus différents selon l'heure du + jour en utilisant mod_rewrite.

    +
    + +
    Solution :
    + +
    +

    Il existe de nombreuses variables nommées + TIME_xxx utilisables dans les conditions de + réécriture. Utilisées en conjonction avec les modèles de + comparaison lexicographique spéciaux <STRING, + >STRING et =STRING, elles + permettent d'effectuer des redirections dépendant de + l'heure :

    + + +RewriteEngine on +RewriteCond "%{TIME_HOUR}%{TIME_MIN}" ">0700" +RewriteCond "%{TIME_HOUR}%{TIME_MIN}" "<1900" +RewriteRule "^foo\.html$" "foo.day.html" [L] +RewriteRule "^foo\.html$" "foo.night.html" + + +

    Avec cet exemple, l'URL foo.html renvoie + le contenu de foo.jour.html durant le + créneau horaire 07:01-18:59, et le contenu de + foo.nuit.html le reste du temps.

    + + mod_cache, les mandataires + intermédiaires et les navigateurs peuvent chacun mettre en cache + les réponses et ainsi afficher une des deux pages en dehors de + la fenêtre de temps configurée. On peut utiliser + mod_expires pour contourner ce problème. Il est + cependant bien plus commode de servir un contenu dynamique, et + de le personnaliser en fonction de l'heure du jour.
    +
    + +
    + +
    + + Définir des variables d'environnement en fonction de + certaines parties de l'URL + +
    +
    Description :
    + +
    +

    Ici, nous voulons conserver une certaine forme de statut + lorsqu'une réécriture a eu lieu. Par exemple, vous souhaitez + consigner le fait que cette réécriture a eu lieu, et vous servir + plus tard de cette information pour déterminer si une requête sera + concernée par cette réécriture. Pour y parvenir, on peut utiliser + une variable d'environnement.

    +
    + +
    Solution :
    + +
    +

    Utiliser le drapeau [E] pour définir une variable + d'environnement.

    + + +RewriteEngine on +RewriteRule "^/cheval/(.*)" "/poney/$1" [E=rewritten:1] + + +

    Plus loin dans votre jeu de règles, vous pouvez vérifier le + contenu de cette variable d'environnement via une directive + RewriteCond :

    + + +RewriteCond "%{ENV:rewritten}" =1 + + +
    +
    + +
    + + diff --git a/docs/manual/rewrite/advanced.xml.meta b/docs/manual/rewrite/advanced.xml.meta index dbee8d81a5b..98192e70187 100644 --- a/docs/manual/rewrite/advanced.xml.meta +++ b/docs/manual/rewrite/advanced.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/avoid.html b/docs/manual/rewrite/avoid.html index c45209be5b0..f61e85a37eb 100644 --- a/docs/manual/rewrite/avoid.html +++ b/docs/manual/rewrite/avoid.html @@ -3,3 +3,7 @@ URI: avoid.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: avoid.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/avoid.html.en b/docs/manual/rewrite/avoid.html.en index 7fe0a700e34..b0f9cc84f51 100644 --- a/docs/manual/rewrite/avoid.html.en +++ b/docs/manual/rewrite/avoid.html.en @@ -1,37 +1,43 @@ - -When not to use mod_rewrite - Apache HTTP Server +When not to use mod_rewrite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    When not to use mod_rewrite

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite

    When not to use mod_rewrite

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    This document supplements the mod_rewrite reference documentation. It describes -perhaps one of the most important concepts about mod_rewrite - namely, +perhaps one of the most important concepts about mod_rewrite - namely, when to avoid using it.

    -

    mod_rewrite should be considered a last resort, when other +

    mod_rewrite should be considered a last resort, when other alternatives are found wanting. Using it when there are simpler alternatives leads to configurations which are confusing, fragile, and hard to maintain. Understanding what other alternatives are available is -a very important step towards mod_rewrite mastery.

    +a very important step towards mod_rewrite mastery.

    Note that many of these examples won't work unchanged in your particular server configuration, so it's important that you understand @@ -52,7 +58,7 @@ files to work with, you may need to resort to

  • Virtual Hosting
  • Simple Proxying
  • Environment Variable Testing
  • -

    See also

    +

    See also

    top

    Simple Redirection

    @@ -80,25 +86,27 @@ and /one/three/four.html.

    To redirect URLs under /one to http://one.example.com, do the following:

    -

    -Redirect /one/ http://one.example.com/ -

    +
    Redirect "/one/" "http://one.example.com/"
    + + +

    To redirect one hostname to another, for example +example.com to www.example.com, see the +Canonical Hostnames +recipe.

    To redirect http URLs to https, do the following:

    -

    -<VirtualHost *:80> -ServerName www.example.com
    -Redirect / https://www.example.com/
    -</VirtualHost > -
    +

    <VirtualHost *:80>
    +    ServerName www.example.com
    +    Redirect "/" "https://www.example.com/"
    +</VirtualHost>
    +
     <VirtualHost *:443>
    -ServerName www.example.com
    -
    -# ... SSL configuration goes here
    -</VirtualHost > -

    + ServerName www.example.com + # ... SSL configuration goes here +</VirtualHost> +

    The use of RewriteRule to perform this task may be appropriate if there are other RewriteRule directives in @@ -118,16 +126,15 @@ task in a .htaccess file instead.

    The Alias directive provides mapping from a URI to a directory - usually a directory outside of your DocumentRoot. Although it -is possible to perform this mapping with mod_rewrite, -Alias is the preferred method, for reasons of simplicity -and performance.

    +is possible to perform this mapping with mod_rewrite, +Alias is the preferred method, for +reasons of simplicity and performance.

    -

    Using Alias

    -Alias /cats /var/www/virtualhosts/felines/htdocs -

    +

    Using Alias

    Alias "/cats" "/var/www/virtualhosts/felines/htdocs"
    +

    -The use of mod_rewrite to perform this mapping may be +The use of mod_rewrite to perform this mapping may be appropriate when you do not have access to the server configuration files. Alias may only be used in server or virtualhost context, and not in a .htaccess file. @@ -141,11 +148,12 @@ server.

    Virtual Hosting

    Although it is possible to handle virtual hosts with mod_rewrite, it is seldom the right way. Creating individual -<VirtualHost> blocks is almost always the right way to go. In the +<VirtualHost> blocks is +almost always the right way to go. In the event that you have an enormous number of virtual hosts, consider using mod_vhost_alias to create these hosts automatically.

    -

    Third-party modules such as mod_macro are +

    Modules such as mod_macro are also useful for creating a large number of virtual hosts dynamically.

    Using mod_rewrite for vitualhost creation may be @@ -161,28 +169,25 @@ seems like the right approach.

    Simple Proxying

    -

    RewriteRule provides the [P] flag to pass rewritten URIs through +

    RewriteRule provides the [P] flag to pass rewritten URIs through mod_proxy.

    -

    -RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P] -

    +
    RewriteRule "^/?images(.*)" "http://imageserver.local/images$1" [P]
    +

    However, in many cases, when there is no actual pattern matching -meeded, as in the example shown above, the ProxyPass directive is a better choice. +needed, as in the example shown above, the ProxyPass directive is a better choice. The example here could be rendered as:

    -

    -ProxyPass /images/ http://imageserver.local/images/ -

    +
    ProxyPass "/images/" "http://imageserver.local/images/"
    +

    Note that whether you use RewriteRule or ProxyPass, you'll still need to use the ProxyPassReverse directive to catch redirects issued from the back-end server:

    -

    -ProxyPassReverse /images/ http://imageserver.local/images/ -

    +
    ProxyPassReverse "/images/" "http://imageserver.local/images/"
    +

    You may need to use RewriteRule instead when there are other RewriteRules in effect in the same scope, as a @@ -195,7 +200,7 @@ accomplish.

    Environment Variable Testing

    mod_rewrite is frequently used to take a particular -action based on the presence or absense of a particular environment +action based on the presence or absence of a particular environment variable or request header. This can be done more efficiently using the <If>.

    @@ -204,11 +209,10 @@ variable or request header. This can be done more efficiently using the hostname, such as www.example.com instead of example.com. This can be done using the <If> directive, as shown here:

    -

    -<If "$req{Host} != 'www.example.com'">
    -RedirectMatch (.*) http://www.example.com$1
    -</If> -

    +
    <If "req('Host') != 'www.example.com'">
    +    Redirect "/" "http://www.example.com/"
    +</If>
    +

    This technique can be used to take actions based on any request header, response header, or environment variable, replacing @@ -216,12 +220,35 @@ header, response header, or environment variable, replacing

    See especially the expression evaluation documentation for a overview of what types of expressions you can -use in <If> sections, and in certain other directives.

    +use in <If> sections, +and in certain other directives.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/avoid.html.fr b/docs/manual/rewrite/avoid.html.fr new file mode 100644 index 00000000000..50bf33da511 --- /dev/null +++ b/docs/manual/rewrite/avoid.html.fr @@ -0,0 +1,271 @@ + + + + + +Quand ne pas utiliser mod_rewrite - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Quand ne pas utiliser mod_rewrite

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment la Documentation de rfrence de +mod_rewrite. Il dcrit peut-tre un des concepts les +plus importants propos de mod_rewrite - savoir, quand doit-on viter +de l'utiliser.

    + +

    mod_rewrite doit tre considr comme un dernier recours, +lorsqu'aucune alternative n'est possible. Utiliser mod_rewrite lorsqu'il +existe des alternatives plus simples conduit des configurations +confuses, fragiles, et difficiles maintenir. La comprhension des +autres alternatives disponibles est une tape trs importante sur le +chemin de la matrise de mod_rewrite.

    + +

    Vous devez vous attacher comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre systme si vous vous contentez de les +copier/coller dans vos fichiers de configuration.

    + +

    Le cas le plus courant dans lequel mod_rewrite est +l'outil appropri est la situation o la seule solution envisageable +ncessite l'accs aux fichiers de configuration du serveur, alors que +cet accs ne vous est pas accord. Certaines directives de configuration +ne sont disponibles que dans le fichier de configuration du serveur. Si +vous ne pouvez agir que sur les fichiers .htaccess, vous devrez donc +vous tourner vers mod_rewrite.

    + +
    + +
    top
    +
    +

    Redirection simple

    + + +

    mod_alias fournit les directives Redirect et RedirectMatch qui permettent de +rediriger une URL vers une autre. Plutt que d'utiliser la directive +RewriteRule pour ce genre de +redirection simple d'une URL ou d'une classe d'URLs vers une autre, on +prfrera l'utilisation de ces directives. En outre, avec +RedirectMatch, vous pouvez inclure une expression +rationnelle dans votre critre de redirection, ce qui vous permet de +bnficier de nombreux avantages de la directive +RewriteRule.

    + +

    Une utilisation courante de la directive RewriteRule est +la redirection de toute une classe d'URLs. Par exemple, toutes les URLs +faisant rfrence au rpertoire /un doivent tre +rediriges vers http://un.example.com/, ou toutes les +requtes http doivent tre rediriges vers +https.

    + +

    Pour ce faire, il est prfrable d'utiliser la directive +Redirect. Souvenez-vous que la directive +Redirect conserve les informations relatives au chemin. En +d'autres termes, la redirection d'une URL /un va aussi +rediriger toutes les URLs de niveaux infrieurs comme +/un/deux.html et /un/trois/quatre.html.

    + +

    Pour rediriger les URLs sous /un vers +http://un.example.com/, utilisez cette dfinition :

    + +
    Redirect /one/ http://one.example.com/
    + + +

    Pour rediriger un nom d'hte vers un autre nom d'hte, par exemple +example.com vers www.example.com, voir la +mthode Noms d'htes canoniques.

    + +

    Pour rediriger les URLs http vers https, +utilisez cette dfinition :

    + +
    <VirtualHost *:80>
    +ServerName www.example.com
    +Redirect "/" "https://www.example.com/"
    +</VirtualHost>
    +
    +<VirtualHost *:443>
    +ServerName www.example.com
    +#  ... insrer ici la configuration SSL
    +</VirtualHost>
    + + +

    L'utilisation de la directive RewriteRule pour accomplir +cette tche peut se justifier s'il existe d'autres directives +RewriteRule dans la mme porte. En effet, lorsque des +directives Redirect et RewriteRule se trouvent +dans la mme porte, les directives RewriteRule sont +excutes en premier, sans tenir compte de leur ordre d'apparition dans +le fichier de configuration.

    + +

    Dans le cas de la redirection http-vers-https, l'utilisation +de rgles RewriteRule se justifie si vous n'avez pas accs +au fichier de configuration principal, et devez donc accomplir cette +tche au sein d'un fichier .htaccess.

    + +
    top
    +
    +

    Alias d'URL

    +

    La directive Alias permet +de mettre en correspondance un URI avec un rpertoire, ce dernier tant +en gnral situ en dehors de l'arborescence dfinie par la directive +DocumentRoot. Bien qu'il soit +possible d'effectuer cette mise en correspondance avec +mod_rewrite, il est prfrable d'utiliser la directive +Alias pour des raisons de simplicit +et de performances.

    + +

    Utilisation de la directive Alias

    Alias "/cats" "/var/www/virtualhosts/felines/htdocs"
    +
    + +

    +Pour effectuer cette mise en correspondance, mod_rewrite +s'impose si vous n'avez pas accs aux fichiers de configuration du +serveur. En effet, la directive Alias ne peut pas tre utilise dans un +fichier .htaccess, mais seulement dans un contexte de +serveur principal ou de serveur virtuel. +

    + +

    En outre, vous pouvez arriver au mme rsultat avec les liens +symboliques, pourvu que Options FollowSymLinks soit activ +sur votre serveur.

    +
    top
    +
    +

    Hbergement virtuel

    +

    Bien qu'il soit possible de grer les serveurs +virtuels avec mod_rewrite, il s'agit rarement de la bonne mthode. +Il est pratiquement toujours prfrable de crer des blocs +<VirtualHost> individuels. +Dans l'ventualit o vous devez grer +un grand nombre de serveurs virtuels, vous devez vous tourner vers +mod_vhost_alias pour crer ces serveurs +automatiquement.

    + +

    Il est aussi possible d'utiliser des modules comme mod_macro pour +crer un grand nombre de serveurs virtuels dynamiquement.

    + +

    L'utilisation de mod_rewrite pour la cration de +serveurs virtuels peut se rvler approprie si votre service +d'hbergement ne vous permet pas d'accder aux fichiers de configuration +du serveur, et que vous soyez par consquent oblig de passer par les +fichiers .htaccess.

    + +

    Voir le document cration de serveurs virtuels +avec mod_rewrite pour plus de dtails sur la manire d'y parvenir si +cela semble tre tout de mme la meilleure approche.

    + +
    top
    +
    +

    Mandat simple

    + +

    La directive RewriteRule fournit +le drapeau [P] qui permet de faire passer les URIs +rcrits par mod_proxy.

    + +
    RewriteRule "^/?images(.*)" "http://serveur-images.local/images$1" [P]
    + + +

    Cependant, dans les nombreux cas o aucune correspondance au modle +n'est vraiment ncessaire, comme dans l'exemple ci-dessus, il est +prfrable d'utiliser la directive ProxyPass. L'exemple prcdent pourrait +tre remplac par :

    + +
    ProxyPass "/images/" "http://serveur-images.local/images/"
    + + +

    Que vous utilisiez RewriteRule ou ProxyPass, vous devrez dans tous les cas +utiliser aussi la directive ProxyPassReverse pour intercepter les +redirections en provenance du serveur d'arrire-plan :

    + +
    ProxyPassReverse "/images/" "http://serveur-images.local/images/"
    + + +

    Vous devrez cependant tout de mme utiliser RewriteRule +lorsque d'autres RewriteRules se trouvent dans la mme porte, +car elles agissent en gnral avant les directives +ProxyPass, et peuvent ainsi les court-circuiter.

    + +
    top
    +
    +

    Test de variables d'environnement

    + +

    mod_rewrite est souvent utilis pour effectuer une +action en fonction de la prsence ou de l'absence d'une variable +d'environnement particulire ou d'un en-tte de requte, ce qui peut +tre accompli de manire plus efficace via la directive <If>.

    + +

    Considrons par exemple le scnario courant o la directive +RewriteRule est utilise pour forcer un nom +d'hte canonique, tel que www.example.com au lieu de +example.com. Il est possible d'utiliser la place la +directive <If> comme +suit :

    + +
    <If "req('Host') != 'www.example.com'">
    +    Redirect "/" "http://www.example.com"
    +</If>
    + + +

    On peut utiliser cette technique dans de nombreux scnarios courant +pour remplacer mod_rewrite pour effectuer des actions +en fonction d'en-ttes de requtes ou de rponses, ou de variables +d'environnement.

    + +

    Voir en particulier la documentation sur +l'valuation des expressions pour une vue d'ensemble des types +d'expressions que vous pouvez utiliser dans les sections <If>, +ainsi que dans certaines directives.

    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/avoid.xml b/docs/manual/rewrite/avoid.xml index 71c284590e9..df7557973ce 100644 --- a/docs/manual/rewrite/avoid.xml +++ b/docs/manual/rewrite/avoid.xml @@ -29,14 +29,14 @@

    This document supplements the mod_rewrite reference documentation. It describes -perhaps one of the most important concepts about mod_rewrite - namely, +perhaps one of the most important concepts about mod_rewrite - namely, when to avoid using it.

    -

    mod_rewrite should be considered a last resort, when other +

    mod_rewrite should be considered a last resort, when other alternatives are found wanting. Using it when there are simpler alternatives leads to configurations which are confusing, fragile, and hard to maintain. Understanding what other alternatives are available is -a very important step towards mod_rewrite mastery.

    +a very important step towards mod_rewrite mastery.

    Note that many of these examples won't work unchanged in your particular server configuration, so it's important that you understand @@ -90,25 +90,29 @@ and /one/three/four.html.

    To redirect URLs under /one to http://one.example.com, do the following:

    - -Redirect /one/ http://one.example.com/ - + +Redirect "/one/" "http://one.example.com/" + + +

    To redirect one hostname to another, for example +example.com to www.example.com, see the +Canonical Hostnames +recipe.

    To redirect http URLs to https, do the following:

    - + <VirtualHost *:80> -ServerName www.example.com
    -Redirect / https://www.example.com/
    -</VirtualHost > -
    + ServerName www.example.com + Redirect "/" "https://www.example.com/" +</VirtualHost> + <VirtualHost *:443> -ServerName www.example.com
    -
    -# ... SSL configuration goes here
    -</VirtualHost > -
    + ServerName www.example.com + # ... SSL configuration goes here +</VirtualHost> +

    The use of RewriteRule to perform this task may be appropriate if there are other RewriteRule directives in @@ -128,16 +132,18 @@ task in a .htaccess file instead.

    The Alias directive provides mapping from a URI to a directory - usually a directory outside of your DocumentRoot. Although it -is possible to perform this mapping with mod_rewrite, -Alias is the preferred method, for reasons of simplicity -and performance.

    +is possible to perform this mapping with mod_rewrite, +Alias is the preferred method, for +reasons of simplicity and performance.

    Using Alias -Alias /cats /var/www/virtualhosts/felines/htdocs + +Alias "/cats" "/var/www/virtualhosts/felines/htdocs" +

    -The use of mod_rewrite to perform this mapping may be +The use of mod_rewrite to perform this mapping may be appropriate when you do not have access to the server configuration files. Alias may only be used in server or virtualhost context, and not in a .htaccess file. @@ -151,11 +157,12 @@ server.

    Virtual Hosting

    Although it is possible to handle virtual hosts with mod_rewrite, it is seldom the right way. Creating individual -<VirtualHost> blocks is almost always the right way to go. In the +VirtualHost blocks is +almost always the right way to go. In the event that you have an enormous number of virtual hosts, consider using mod_vhost_alias to create these hosts automatically.

    -

    Third-party modules such as mod_macro are +

    Modules such as mod_macro are also useful for creating a large number of virtual hosts dynamically.

    Using mod_rewrite for vitualhost creation may be @@ -171,22 +178,22 @@ seems like the right approach.

    Simple Proxying -

    RewriteRule provides the RewriteRule provides the [P] flag to pass rewritten URIs through mod_proxy.

    - -RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P] - + +RewriteRule "^/?images(.*)" "http://imageserver.local/images$1" [P] +

    However, in many cases, when there is no actual pattern matching -meeded, as in the example shown above, the ProxyPass directive is a better choice. The example here could be rendered as:

    - -ProxyPass /images/ http://imageserver.local/images/ - + +ProxyPass "/images/" "http://imageserver.local/images/" +

    Note that whether you use RewriteRule or ProxyPass, you'll still need to use the ProxyPassReverse directive to catch redirects issued from the back-end server:

    - -ProxyPassReverse /images/ http://imageserver.local/images/ - + +ProxyPassReverse "/images/" "http://imageserver.local/images/" +

    You may need to use RewriteRule instead when there are other RewriteRules in effect in the same scope, as a @@ -209,7 +216,7 @@ accomplish.

    Environment Variable Testing

    mod_rewrite is frequently used to take a particular -action based on the presence or absense of a particular environment +action based on the presence or absence of a particular environment variable or request header. This can be done more efficiently using the If.

    @@ -219,11 +226,11 @@ hostname, such as www.example.com instead of example.com. This can be done using the If directive, as shown here:

    - -<If "$req{Host} != 'www.example.com'">
    -RedirectMatch (.*) http://www.example.com$1
    + +<If "req('Host') != 'www.example.com'"> + Redirect "/" "http://www.example.com/" </If> -
    +

    This technique can be used to take actions based on any request header, response header, or environment variable, replacing @@ -231,7 +238,8 @@ header, response header, or environment variable, replacing

    See especially the expression evaluation documentation for a overview of what types of expressions you can -use in <If> sections, and in certain other directives.

    +use in If sections, +and in certain other directives.

    diff --git a/docs/manual/rewrite/avoid.xml.fr b/docs/manual/rewrite/avoid.xml.fr new file mode 100644 index 00000000000..7379c69cc55 --- /dev/null +++ b/docs/manual/rewrite/avoid.xml.fr @@ -0,0 +1,268 @@ + + + + + + + + + + + Rewrite + +Quand ne pas utiliser mod_rewrite + + + +

    Ce document est un complément à la Documentation de référence de +mod_rewrite. Il décrit peut-être un des concepts les +plus importants à propos de mod_rewrite - à savoir, quand doit-on éviter +de l'utiliser.

    + +

    mod_rewrite doit être considéré comme un dernier recours, +lorsqu'aucune alternative n'est possible. Utiliser mod_rewrite lorsqu'il +existe des alternatives plus simples conduit à des configurations +confuses, fragiles, et difficiles à maintenir. La compréhension des +autres alternatives disponibles est une étape très importante sur le +chemin de la maîtrise de mod_rewrite.

    + +

    Vous devez vous attacher à comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre système si vous vous contentez de les +copier/coller dans vos fichiers de configuration.

    + +

    Le cas le plus courant dans lequel mod_rewrite est +l'outil approprié est la situation où la seule solution envisageable +nécessite l'accès aux fichiers de configuration du serveur, alors que +cet accès ne vous est pas accordé. Certaines directives de configuration +ne sont disponibles que dans le fichier de configuration du serveur. Si +vous ne pouvez agir que sur les fichiers .htaccess, vous devrez donc +vous tourner vers mod_rewrite.

    + +
    +Documentation du module mod_rewrite +Introduction à mod_rewrite +Redirection et remise en +correspondance +Contrôle d'accès +Serveurs virtuels +Serveurs mandataires +Utilisation de RewriteMap +Techniques avancées + + +
    +Redirection simple + +

    mod_alias fournit les directives Redirect et RedirectMatch qui permettent de +rediriger une URL vers une autre. Plutôt que d'utiliser la directive +RewriteRule pour ce genre de +redirection simple d'une URL ou d'une classe d'URLs vers une autre, on +préfèrera l'utilisation de ces directives. En outre, avec +RedirectMatch, vous pouvez inclure une expression +rationnelle dans votre critère de redirection, ce qui vous permet de +bénéficier de nombreux avantages de la directive +RewriteRule.

    + +

    Une utilisation courante de la directive RewriteRule est +la redirection de toute une classe d'URLs. Par exemple, toutes les URLs +faisant référence au répertoire /un doivent être +redirigées vers http://un.example.com/, ou toutes les +requêtes http doivent être redirigées vers +https.

    + +

    Pour ce faire, il est préférable d'utiliser la directive +Redirect. Souvenez-vous que la directive +Redirect conserve les informations relatives au chemin. En +d'autres termes, la redirection d'une URL /un va aussi +rediriger toutes les URLs de niveaux inférieurs comme +/un/deux.html et /un/trois/quatre.html.

    + +

    Pour rediriger les URLs sous /un vers +http://un.example.com/, utilisez cette définition :

    + + +Redirect /one/ http://one.example.com/ + + +

    Pour rediriger un nom d'hôte vers un autre nom d'hôte, par exemple +example.com vers www.example.com, voir la +méthode Noms d'hôtes canoniques.

    + +

    Pour rediriger les URLs http vers https, +utilisez cette définition :

    + + +<VirtualHost *:80> +ServerName www.example.com +Redirect "/" "https://www.example.com/" +</VirtualHost> + +<VirtualHost *:443> +ServerName www.example.com +# ... insérer ici la configuration SSL +</VirtualHost> + + +

    L'utilisation de la directive RewriteRule pour accomplir +cette tâche peut se justifier s'il existe d'autres directives +RewriteRule dans la même portée. En effet, lorsque des +directives Redirect et RewriteRule se trouvent +dans la même portée, les directives RewriteRule sont +exécutées en premier, sans tenir compte de leur ordre d'apparition dans +le fichier de configuration.

    + +

    Dans le cas de la redirection http-vers-https, l'utilisation +de règles RewriteRule se justifie si vous n'avez pas accès +au fichier de configuration principal, et devez donc accomplir cette +tâche au sein d'un fichier .htaccess.

    + +
    + +
    Alias d'URL +

    La directive Alias permet +de mettre en correspondance un URI avec un répertoire, ce dernier étant +en général situé en dehors de l'arborescence définie par la directive +DocumentRoot. Bien qu'il soit +possible d'effectuer cette mise en correspondance avec +mod_rewrite, il est préférable d'utiliser la directive +Alias pour des raisons de simplicité +et de performances.

    + +Utilisation de la directive Alias + +Alias "/cats" "/var/www/virtualhosts/felines/htdocs" + + + +

    +Pour effectuer cette mise en correspondance, mod_rewrite +s'impose si vous n'avez pas accès aux fichiers de configuration du +serveur. En effet, la directive Alias ne peut pas être utilisée dans un +fichier .htaccess, mais seulement dans un contexte de +serveur principal ou de serveur virtuel. +

    + +

    En outre, vous pouvez arriver au même résultat avec les liens +symboliques, pourvu que Options FollowSymLinks soit activé +sur votre serveur.

    +
    + +
    Hébergement virtuel +

    Bien qu'il soit possible de gérer les serveurs +virtuels avec mod_rewrite, il s'agit rarement de la bonne méthode. +Il est pratiquement toujours préférable de créer des blocs +VirtualHost individuels. +Dans l'éventualité où vous devez gérer +un grand nombre de serveurs virtuels, vous devez vous tourner vers +mod_vhost_alias pour créer ces serveurs +automatiquement.

    + +

    Il est aussi possible d'utiliser des modules comme mod_macro pour +créer un grand nombre de serveurs virtuels dynamiquement.

    + +

    L'utilisation de mod_rewrite pour la création de +serveurs virtuels peut se révéler appropriée si votre service +d'hébergement ne vous permet pas d'accéder aux fichiers de configuration +du serveur, et que vous soyez par conséquent obligé de passer par les +fichiers .htaccess.

    + +

    Voir le document création de serveurs virtuels +avec mod_rewrite pour plus de détails sur la manière d'y parvenir si +cela semble être tout de même la meilleure approche.

    + +
    + +
    Mandat simple + +

    La directive RewriteRule fournit +le drapeau [P] qui permet de faire passer les URIs +réécrits par mod_proxy.

    + + +RewriteRule "^/?images(.*)" "http://serveur-images.local/images$1" [P] + + +

    Cependant, dans les nombreux cas où aucune correspondance au modèle +n'est vraiment nécessaire, comme dans l'exemple ci-dessus, il est +préférable d'utiliser la directive ProxyPass. L'exemple précédent pourrait +être remplacé par :

    + + +ProxyPass "/images/" "http://serveur-images.local/images/" + + +

    Que vous utilisiez RewriteRule ou ProxyPass, vous devrez dans tous les cas +utiliser aussi la directive ProxyPassReverse pour intercepter les +redirections en provenance du serveur d'arrière-plan :

    + + +ProxyPassReverse "/images/" "http://serveur-images.local/images/" + + +

    Vous devrez cependant tout de même utiliser RewriteRule +lorsque d'autres RewriteRules se trouvent dans la même portée, +car elles agissent en général avant les directives +ProxyPass, et peuvent ainsi les court-circuiter.

    + +
    + +
    Test de variables d'environnement + +

    mod_rewrite est souvent utilisé pour effectuer une +action en fonction de la présence ou de l'absence d'une variable +d'environnement particulière ou d'un en-tête de requête, ce qui peut +être accompli de manière plus efficace via la directive If.

    + +

    Considérons par exemple le scénario courant où la directive +RewriteRule est utilisée pour forcer un nom +d'hôte canonique, tel que www.example.com au lieu de +example.com. Il est possible d'utiliser à la place la +directive If comme +suit :

    + + +<If "req('Host') != 'www.example.com'"> + Redirect "/" "http://www.example.com" +</If> + + +

    On peut utiliser cette technique dans de nombreux scénarios courant +pour remplacer mod_rewrite pour effectuer des actions +en fonction d'en-têtes de requêtes ou de réponses, ou de variables +d'environnement.

    + +

    Voir en particulier la documentation sur +l'évaluation des expressions pour une vue d'ensemble des types +d'expressions que vous pouvez utiliser dans les sections If, +ainsi que dans certaines directives.

    + +
    + +
    + diff --git a/docs/manual/rewrite/avoid.xml.meta b/docs/manual/rewrite/avoid.xml.meta index c734d099c01..9d51904e7ba 100644 --- a/docs/manual/rewrite/avoid.xml.meta +++ b/docs/manual/rewrite/avoid.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index c3591bb5d67..2be45bf7f9a 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -1,22 +1,27 @@ - -RewriteRule Flags - Apache HTTP Server +RewriteRule Flags - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Introduction

    @@ -56,18 +62,15 @@ providing detailed explanations and examples.

    its behavior modified by one or more flags. Flags are included in square brackets at the end of the rule, and multiple flags are separated by commas.

    -

    -RewriteRule pattern target [Flag1,Flag2,Flag3] -

    +
    RewriteRule pattern target [Flag1,Flag2,Flag3]
    -

    The flags all have a short form, such as CO, as well as -a longer form, such as cookie. Some flags take one or more -arguments. Flags are not case sensitive.

    -

    Each flag (with a few exceptions) -has a long and short form. While it is most common to use +

    Each flag (with a few exceptions) has a short form, such as +CO, as well as a longer form, such as cookie. +While it is most common to use the short form, it is recommended that you familiarize yourself with the -long form, so that you remember what each flag is supposed to do.

    +long form, so that you remember what each flag is supposed to do. +Some flags take one or more arguments. Flags are not case sensitive.

    Flags that alter metadata associated with the request (T=, H=, E=) have no affect in per-directory and htaccess context, when a substitution @@ -84,13 +87,12 @@ characters before applying the transformation.

    mod_rewrite has to unescape URLs before mapping them, -so backreferences will be unescaped at the time they are applied. +so backreferences are unescaped at the time they are applied. Using the B flag, non-alphanumeric characters in backreferences will be escaped. For example, consider the rule:

    -

    -RewriteRule ^search/(.*)$ /search.php?term=$1 -

    +
    RewriteRule "^search/(.*)$" "/search.php?term=$1"
    +

    Given a search term of 'x & y/z', a browser will encode it as 'x%20%26%20y%2Fz', making the request 'search/x%20%26%20y%2Fz'. Without the B @@ -102,6 +104,9 @@ isn't a valid URL, and so would be encoded as before being passed on to the output URL, resulting in a correct mapping to /search.php?term=x%20%26%20y%2Fz.

    +
    RewriteRule "^search/(.*)$" "/search.php?term=$1" [B,PT]
    + +

    Note that you may also need to set AllowEncodedSlashes to On to get this particular example to work, as httpd does not allow encoded slashes in URLs, and returns a 404 if it sees one.

    @@ -115,7 +120,7 @@ when the backend may break if presented with an unescaped URL.

    The [C] or [chain] flag indicates that the RewriteRule is chained to the next rule. That is, if the rule matches, then it is processed as usual and control moves on to the next rule. However, if it does not match, then -the next rule, and any other rules that are chained together, will be +the next rule, and any other rules that are chained together, are skipped.

    top
    @@ -133,6 +138,15 @@ follows:

    [CO=NAME:VALUE:DOMAIN:lifetime:path:secure:httponly]

    +

    If a literal ':' character is needed in any of the cookie fields, an +alternate syntax is available. To opt-in to the alternate syntax, the cookie +"Name" should be preceded with a ';' character, and field separators should be +specified as ';'.

    + +

    +[CO=;NAME;VALUE:MOREVALUE;DOMAIN;lifetime;path;secure;httponly] +

    +

    You must declare a name, a value, and a domain for the cookie to be set.

    @@ -168,23 +182,22 @@ connections.
    httponly
    If set to HttpOnly, true, or 1, the cookie will have the HttpOnly flag set, -which means that the cookie will be inaccessible to JavaScript code on +which means that the cookie is inaccessible to JavaScript code on browsers that support this feature.
    -

    Several examples are offered here:

    +

    Consider this example:

    + +
    RewriteEngine On
    +RewriteRule "^/index\.html" "-" [CO=frontdoor:yes:.example.com:1440:/]
    -

    -RewriteEngine On
    -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/] -

    In the example give, the rule doesn't rewrite the request. The "-" rewrite target tells mod_rewrite to pass the request through unchanged. Instead, it sets a cookie called 'frontdoor' to a value of 'yes'. The cookie is valid for any host -in the .example.com domain. It will be set to expire in 1440 -minutes (24 hours) and will be returned for all URIs.

    +in the .example.com domain. It is set to expire in 1440 +minutes (24 hours) and is returned for all URIs.

    top
    @@ -227,13 +240,12 @@ variables work.

    The full syntax for this flag is:

    -

    -[E=VAR:VAL] -[E=!VAR] -

    +
    [E=VAR:VAL]
    +[E=!VAR]
    +

    VAL may contain backreferences ($N or -%N) which will be expanded.

    +%N) which are expanded.

    Using the short form

    @@ -262,17 +274,16 @@ value of '1' if the requested URI is an image file. Then, that environment variable is used to exclude those requests from the access log.

    -

    -RewriteRule \.(png|gif|jpg) - [E=image:1]
    -CustomLog logs/access_log combined env=!image -

    +
    RewriteRule "\.(png|gif|jpg)$" "-" [E=image:1]
    +CustomLog "logs/access_log" combined env=!image
    +

    Note that this same effect can be obtained using SetEnvIf. This technique is offered as an example, not as a recommendation.

    top

    END

    -

    Using the [END] flag terminates not only the current round ot rewrite +

    Using the [END] flag terminates not only the current round of rewrite processing (like [L]) but also prevents any subsequent rewrite processing from occurring in per-directory (htaccess) context.

    @@ -283,15 +294,14 @@ redirects.

    F|forbidden

    Using the [F] flag causes the server to return a 403 Forbidden status code to the client. While the same behavior can be accomplished using -the Deny directive, this +the Deny directive, this allows more flexibility in assigning a Forbidden status.

    The following rule will forbid .exe files from being downloaded from your server.

    -

    -RewriteRule \.exe - [F] -

    +
    RewriteRule "\.exe" "-" [F]
    +

    This example uses the "-" syntax for the rewrite target, which means that the requested URI is not modified. There's no reason to rewrite to @@ -310,11 +320,10 @@ longer available.

    As with the [F] flag, you will typically use the "-" syntax for the rewrite target when using the [G] flag:

    -

    -RewriteRule oldproduct - [G,NC] -

    +
    RewriteRule "oldproduct" "-" [G,NC]
    -

    When using [F], an [L] is implied - that is, the response is returned + +

    When using [G], an [L] is implied - that is, the response is returned immediately, and no further rules are evaluated.

    top
    @@ -324,9 +333,8 @@ immediately, and no further rules are evaluated.

    handler. For example, one might use this to force all files without a file extension to be parsed by the php handler:

    -

    -RewriteRule !\. - [H=application/x-httpd-php] -

    +
    RewriteRule "!\." "-" [H=application/x-httpd-php]
    +

    The regular expression above - !\. - will match any request @@ -338,9 +346,8 @@ For example, the following snippet used in per-server context allows .php files to be displayed by mod_php if they are requested with the .phps extension:

    -

    -RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] -

    +
    RewriteRule "^(/source/.+\.php)s$" "$1" [H=application/x-httpd-php-source]
    +

    The regular expression above - ^(/source/.+\.php)s$ - will match any request that starts with /source/ followed by 1 or @@ -378,7 +385,7 @@ rules, as shown below.

    An alternative flag, [END], can be used to terminate not only the current round of rewrite processing but prevent any subsequent -rewrite processing from occuring in per-directory (htaccess) +rewrite processing from occurring in per-directory (htaccess) context. This does not apply to new requests resulting from external redirects.

    @@ -387,11 +394,10 @@ redirects.

    argument to index.php, however, the RewriteCond ensures that if the request is already for index.php, the RewriteRule will be skipped.

    -

    -RewriteBase /
    -RewriteCond %{REQUEST_URI} !=/index.php
    -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -

    +
    RewriteBase "/"
    +RewriteCond "%{REQUEST_URI}" "!=/index.php"
    +RewriteRule "^(.*)" "/index.php?req=$1" [L,PT]
    +
    top

    N|next

    @@ -406,16 +412,22 @@ certain string or letter repeatedly in a request. The example shown here will replace A with B everywhere in a request, and will continue doing so until there are no more As to be replaced.

    - -

    -RewriteRule (.*)A(.*) $1B$2 [N] -

    +
    RewriteRule "(.*)A(.*)" "$1B$2" [N]

    You can think of this as a while loop: While this pattern still matches (i.e., while the URI still contains an A), perform this substitution (i.e., replace the A with a B).

    +

    In 2.4.8 and later, this module returns an error after 32,000 iterations to +protect against unintended looping. An alternative maximum number of +iterations can be specified by adding to the N flag.

    +
    # Be willing to replace 1 character in each pass of the loop
    +RewriteRule "(.+)[><;]$" "$1" [N=64000]
    +# ... or, give up if after 10 loops
    +RewriteRule "(.+)[><;]$" "$1" [N=10]
    + +
    top

    NC|nocase

    @@ -428,9 +440,8 @@ to your dedicated image server. The match is case-insensitive, so that .jpg and .JPG files are both acceptable, for example.

    -

    -RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] -

    +
    RewriteRule "(.*\.(jpg|gif|png))$" "http://images.example.com$1" [P,NC]
    +
    top

    NE|noescape

    @@ -439,9 +450,8 @@ RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] equivalent. Using the [NE] flag prevents that from happening.

    -

    -RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R] -

    +
    RewriteRule "^/anchor/(.+)" "/bigpage.html#$1" [NE,R]
    +

    The above example will redirect /anchor/xyz to @@ -482,9 +492,8 @@ requests. example, if you wanted all image requests to be handled by a back-end image server, you might do something like the following:

    -

    -RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P] -

    +
    RewriteRule "/(.*)\.(jpg|gif|png)$" "http://images.example.com/$1.$2" [P]
    +

    Use of the [P] flag implies [L] - that is, the request is immediately pushed through the proxy, and any following rules will not be @@ -507,6 +516,15 @@ and hostname part of the URL is either fixed, or does not allow the client undue influence.

    +
    +

    Performance warning

    +

    Using this flag triggers the use of mod_proxy, without handling of persistent connections. This +means the performance of your proxy will be better if you set it up with ProxyPass or +ProxyPassMatch

    +

    This is because this flag triggers the use of the default worker, which does not handle connection pooling.

    +

    Avoid using this flag and prefer those directives, whenever you can.

    +
    +

    Note: mod_proxy must be enabled in order to use this flag.

    @@ -519,7 +537,7 @@ The target (or substitution string) in a RewriteRule is assumed to be a file path, by default. The use of the [PT] flag causes it to be treated as a URI instead. That is to say, the use of the [PT] flag causes the result of the RewriteRule to be passed back through -URL mapping, so that location-based mappings, such as Alias, Redirect, or ScriptAlias, for example, might have a +URL mapping, so that location-based mappings, such as Alias, Redirect, or ScriptAlias, for example, might have a chance to take effect.

    @@ -531,10 +549,9 @@ use the [PT] flag to ensure that the Alias is evaluated.

    -

    -Alias /icons /usr/local/apache/icons
    -RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT] -

    +
    Alias "/icons" "/usr/local/apache/icons"
    +RewriteRule "/pics/(.+)\.jpg$" "/icons/$1.gif" [PT]
    +

    Omission of the [PT] flag in this case will cause the Alias to be @@ -563,9 +580,8 @@ Using the [QSA] flag causes the query strings to be combined.

    Consider the following rule:

    -

    -RewriteRule /pages/(.+) /page.php?page=$1 [QSA] -

    +
    RewriteRule "/pages/(.+)" "/page.php?page=$1" [QSA]
    +

    With the [QSA] flag, a request for /pages/123?one=two will be mapped to /page.php?page=123&one=two. Without the [QSA] @@ -596,6 +612,22 @@ replaced with the query string in the RewriteRule target URI.

    +
    top
    +
    +

    QSL|qslast

    +

    +By default, the first (left-most) question mark in the substitution +delimits the path from the query string. Using the [QSL] flag instructs +RewriteRule to instead split +the two components using the last (right-most) question mark.

    + +

    +This is useful when mapping to files that have literal question marks in +their filename. If no query string is used in the substitution, +a question mark can be appended to it in combination with this flag.

    + +

    This flag is available in version 2.4.19 and later.

    +
    top

    R|redirect

    @@ -611,10 +643,8 @@ will be used to generate the URL sent with the redirect. Any valid HTTP response status code may be specified, using the syntax [R=305], with a 302 status code being used by default if none is specified. The status code specified need not -necessarily be a redirect (3xx) status code. -

    - -

    If a status code is outside the redirect range (300-399) then the +necessarily be a redirect (3xx) status code. However, +if a status code is outside the redirect range (300-399) then the substitution string is dropped entirely, and rewriting is stopped as if the L were used.

    @@ -633,30 +663,51 @@ URI in request' warnings.
    top

    S|skip

    -

    The [S] flag is used to skip rules that you don't want to run. This -can be thought of as a goto statement in your rewrite -ruleset. In the following example, we only want to run the RewriteRule if the requested URI -doesn't correspond with an actual file.

    +

    The [S] flag is used to skip rules that you don't want to run. The +syntax of the skip flag is [S=N], where N signifies +the number of rules to skip (provided the +RewriteRule matches). This can be thought of as a goto +statement in your rewrite ruleset. In the following example, we only want +to run the RewriteRule if the +requested URI doesn't correspond with an actual file.

    + +
    # Is the request for a non-existent file?
    +RewriteCond "%{REQUEST_FILENAME}" "!-f"
    +RewriteCond "%{REQUEST_FILENAME}" "!-d"
    +# If so, skip these two RewriteRules
    +RewriteRule ".?" "-" [S=2]
    +
    +RewriteRule "(.*\.gif)" "images.php?$1"
    +RewriteRule "(.*\.html)" "docs.php?$1"
    -

    -# Is the request for a non-existent file?
    -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -# If so, skip these two RewriteRules
    -RewriteRule .? - [S=2]
    -
    -RewriteRule (.*\.gif) images.php?$1
    -RewriteRule (.*\.html) docs.php?$1 -

    This technique is useful because a RewriteCond only applies to the RewriteRule immediately following it. Thus, if you want to make a RewriteCond apply to several RewriteRules, one possible technique is to -negate those conditions and use a [Skip] flag. So, you can +negate those conditions and add a RewriteRule with a [Skip] flag. You can use this to make pseudo if-then-else constructs: The last rule of the then-clause becomes skip=N, where N is the -number of rules in the else-clause.

    +number of rules in the else-clause:

    +
    # Does the file exist?
    +RewriteCond "%{REQUEST_FILENAME}" "!-f"
    +RewriteCond "%{REQUEST_FILENAME}" "!-d"
    +# Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza.
    +RewriteRule ".?" "-" [S=3]
    +
    +# IF the file exists, then:
    +    RewriteRule "(.*\.gif)" "images.php?$1"
    +    RewriteRule "(.*\.html)" "docs.php?$1"
    +    # Skip past the "else" stanza.
    +    RewriteRule ".?" "-" [S=1]
    +# ELSE...
    +    RewriteRule "(.*)" "404.php?file=$1"
    +# END
    + + +

    It is probably easier to accomplish this kind of configuration using +the <If>, <ElseIf>, and <Else> directives instead.

    +
    top

    T|type

    @@ -666,19 +717,17 @@ sent. This has the same effect as the

    -# Serve .pl files as plain text
    -RewriteRule \.pl$ - [T=text/plain] -

    +
    # Serve .pl files as plain text
    +RewriteRule "\.pl$" "-" [T=text/plain]
    +

    Or, perhaps, if you have a camera that produces jpeg images without file extensions, you could force those images to be served with the correct MIME type by virtue of their file names:

    -

    -# Files with 'IMG' in the name are jpg images.
    -RewriteRule IMG - [T=image/jpg] -

    +
    # Files with 'IMG' in the name are jpg images.
    +RewriteRule "IMG" "-" [T=image/jpg]
    +

    Please note that this is a trivial example, and could be better done using <FilesMatch> @@ -698,7 +747,28 @@ The L flag can be useful in this context to end the

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/flags.html.fr b/docs/manual/rewrite/flags.html.fr index 4dbb3f995b5..7b9a6f63fdd 100644 --- a/docs/manual/rewrite/flags.html.fr +++ b/docs/manual/rewrite/flags.html.fr @@ -1,22 +1,27 @@ - -Les drapeaux de rcriture - Serveur Apache HTTP +Les drapeaux de rcriture - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Les drapeaux de rcriture

    +Apache > Serveur HTTP > Documentation > Version 2.4 > Rewrite
    top

    Introduction

    Le comportement d'une directive RewriteRule peut tre modifi par un ou plusieurs drapeaux. Les drapeaux sont situs en fin de rgle, entours de crochets, et spars le cas chant par des virgules.

    -

    -RewriteRule modle cible [drapeau1,drapeau2,drapeau3] -

    +
    RewriteRule pattern target [Flag1,Flag2,Flag3]
    -

    Les drapeaux ont tous une forme courte, comme CO, ainsi -qu'une forme longue, comme cookie. Certains drapeaux -peuvent avoir un ou plusieurs arguments. Les drapeaux sont insensibles -la casse.

    -

    Chaque drapeau ( quelques exceptions prs) possde une forme longue et une forme courte. Bien que +

    Chaque drapeau ( quelques exceptions prs) +possde une forme courte, comme CO, ainsi qu'une forme longue, +comme cookie. Bien que la forme courte soit la plus couramment utilise, nous vous recommandons de vous familiariser avec les drapeaux sous leur forme longue, afin de -bien mmoriser ce que chaque drapeau est suppos faire.

    +bien mmoriser ce que chaque drapeau est suppos faire. +Certains drapeaux acceptent un ou plusieurs arguments. Les drapeaux ne +sont pas sensibles la casse.

    Les drapeaux qui modifient les mtadonnes associes la requte (T=, H=, E=) n'ont aucun effet dans un contexte de rpertoire ou de @@ -92,9 +96,8 @@ ces derni non-alphanumriques des rfrences arrires seront chapps. Considrons par exemple cette rgle :

    -

    -RewriteRule ^search/(.*)$ /search.php?term=$1 -

    +
    RewriteRule "^search/(.*)$" "/search.php?term=$1"
    +

    Soit le terme de recherche 'x & y/z' ; un navigateur va le coder en 'x%20%26%20y%2Fz', transformant la requte en @@ -108,6 +111,9 @@ ce que l'on souhaitait.

    l'URL rsultante, ce qui fournit une rcriture correcte en /search.php?term=x%20%26%20y%2Fz.

    +
    RewriteRule "^search/(.*)$" "/search.php?term=$1" [B,PT]
    + +

    Notez que vous devrez peut-tre aussi dfinir la directive AllowEncodedSlashes On pour @@ -143,6 +149,15 @@ suivante :

    [CO=NAME:VALUE:DOMAIN:lifetime:path:secure:httponly]

    +

    Si un caractre littral ':' doit tre insrer dans un des champs du +cookie, une autre syntaxe est disponible. Pour utiliser cette syntaxe +alternative, le contenu du champ "Name" doit tre prcd du caractre +';', et les spateurs de champs deviendront des ';'.

    + +

    +[CO=;NAME;VALUE:MOREVALUE;DOMAIN;lifetime;path;secure;httponly] +

    +

    Vous devez dclarer un nom, une valeur et un domaine pour que le cookie puisse tre dfini.

    @@ -187,10 +202,9 @@ fonctionnalit

    Voici un exemple :

    -

    -RewriteEngine On
    -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.org:1440:/] -

    +
    RewriteEngine On
    +RewriteRule "^/index\.html" "-" [CO=frontdoor:yes:.example.org:1440:/]
    +

    Dans l'exemple ci-dessus, la rgle ne rcrit pas la requte. La cible de rcriture "-" @@ -244,9 +258,8 @@ fonctionnement des variables d'environnement.

    La syntaxe complte pour ce drapeau est :

    -

    -[E=!VAR] -

    +
    [E=!VAR]
    +

    VAL peut comporter des rfrences arrires ($N ou %N) qui seront dveloppes.

    @@ -278,8 +291,8 @@ image. Cette variable d'environnement est ensuite utilis une telle requte du journal des accs.

    -RewriteRule \.(png|gif|jpg) - [E=image:1]
    -CustomLog logs/access_log combined env=!image +RewriteRule "\.(png|gif|jpg)" "-" [E=image:1]
    +CustomLog "logs/access_log" combined env=!image

    Notez que le mme effet peut tre obtenu l'aide de la directive @@ -300,16 +313,15 @@ redirection externe.

    F|forbidden

    L'utilisation du drapeau [F] permet de faire envoyer par le serveur au client un code de statut "403 Forbidden". Le mme effet peut tre obtenu -l'aide de la directive Deny, +l'aide de la directive Deny, mais ce drapeau offre plus de souplesse dans l'attribution d'un statut Forbidden.

    La rgle suivante va interdire la tlchargement de fichiers .exe depuis votre serveur.

    -

    -RewriteRule \.exe - [F] -

    +
    RewriteRule "\.exe" "-" [F]
    +

    Cet exemple utilise la syntaxe "-" pour la cible de rcriture, ce qui signifie que l'URI de la requte n'est pas modifi. Il n'y a aucune @@ -329,11 +341,10 @@ disponible auparavant ne l'est plus actuellement.

    Comme dans le cas du drapeau [F], on utilise en gnral la syntaxe "-" pour la cible de rcriture lorsqu'on utilise le drapeau [G] :

    -

    -RewriteRule ancienne-ressource - [G,NC] -

    +
    RewriteRule "oldproduct" "-" [G,NC]
    -

    Lorsqu'on utilise [F], [L] est implicite - c'est dire que la + +

    Lorsqu'on utilise [G], [L] est implicite - c'est dire que la rponse est renvoye immdiatement, et aucune autre rgle n'est value.

    top
    @@ -344,9 +355,8 @@ sp l'interprtation de tous les fichiers sans extension par le gestionnaire php :

    -

    -RewriteRule !\. - [H=application/x-httpd-php] -

    +
    RewriteRule "!\." "-" [H=application/x-httpd-php]
    +

    L'expression rationnelle ci-dessus - !\. - correspond @@ -359,9 +369,8 @@ faire en sorte que les fichiers .php soient affichs par mod_php dans le cas o ils font l'objet d'une requte avec l'extension .phps :

    -

    -RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] -

    +
    RewriteRule "^(/source/.+\.php)s$" "$1" [H=application/x-httpd-php-source]
    +

    L'expression rationnelle ci-dessus - @@ -414,11 +423,10 @@ de requ directive RewriteCond permet de s'assurer que si la requte concerne dj index.php, la directive RewriteRule sera saute.

    -

    -RewriteBase /
    -RewriteCond %{REQUEST_URI} !=/index.php
    -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -

    +
    RewriteBase "/"
    +RewriteCond "%{REQUEST_URI}" "!=/index.php"
    +RewriteRule "^(.*)" "/index.php?req=$1" [L,PT]
    +
    top

    N|next

    @@ -435,9 +443,8 @@ suivant, chaque occurence de A sera remplac ceci jusqu'il n'y ait plus de A remplacer.

    -

    -RewriteRule (.*)A(.*) $1B$2 [N] -

    +
    RewriteRule "(.*)A(.*)" "$1B$2" [N]
    +

    Vous pouvez vous reprsenter ce traitement comme une boucle while : tant que le modle de la rgle correspond (c'est @@ -445,6 +452,15 @@ dire, tant que l'URI contient un A), effectuer la substitution (c'est dire, remplacer le A par un B).

    +

    A partir de la version 2.4.8, ce module renvoie une erreur aprs +32000 itrations afin d'viter les boucles infinies. Ce nombre maximum +d'itration peut tre modifi via le drapeau N.

    +
    # On veut remplacer 1 caractre  chaque itration de la boucle
    +RewriteRule "(.+)[><;]$" "$1" [N=64000]
    +# ... ou s'arrter aprs 10 itrations
    +RewriteRule "(.+)[><;]$" "$1" [N=10]
    + +
    top

    NC|nocase

    @@ -458,9 +474,8 @@ transmise par Apache insensible la casse, si bien que par exemple, .jpg aussi bien que .JPG seront accepts.

    -

    -RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] -

    +
    RewriteRule "(.*\.(jpg|gif|png))$" "http://images.example.com$1" [P,NC]
    +
    top

    NE|noescape

    @@ -469,9 +484,8 @@ RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] hexadcimal. Le drapeau [NE] permet d'viter cette conversion.

    -

    -RewriteRule ^/ancre/(.+) /grosse-page.html#$1 [NE,R] -

    +
    RewriteRule "^/anchor/(.+)" "/bigpage.html#$1" [NE,R]
    +

    Dans l'exemple ci-dessus, /anchor/xyz est rcrit en @@ -516,9 +530,8 @@ mandataire. Par exemple, si vous voulez que toutes les requ soient traites par un serveur d'images annexe, vous pouvez utiliser une rgle de ce style :

    -

    -RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P] -

    +
    RewriteRule "/(.*)\.(jpg|gif|png)$" "http://images.example.com/$1.$2" [P]
    +

    L'utilisation du drapeau [P] provoque aussi l'effet du drapeau [L] - autrement dit, la requte est immdiatement envoye au mandataire, et @@ -544,6 +557,16 @@ local.

    fixe, ou ne permette pas au client de l'influencer induement.

    +
    +

    Avertissement au sujet des performances

    +

    Utiliser ce drapeau fait intervenir mod_proxy sans la gestion des connexions + persistantes, ce qui signifie que vous obtiendrez des performances meilleurs si vous utilisez + ProxyPass ou ProxyPassMatch.

    +

    Ceci est du au fait que ce drapeau induit l'utilisation du worker par dfaut, qui + ne gre pas la mise en commun des connexions.

    +

    Partout o cela est possible, prfrez l'utilisation de ces directives.

    +
    +

    Note: mod_proxy doit tre activ pour pouvoir utiliser ce drapeau.

    @@ -558,7 +581,7 @@ par contre, elle est trait drapeau [PT], le rsultat de la rgle RewriteRule est pass nouveau au systme de mise en correspondance des URLs avec le systme de fichiers, de faon ce que les systmes de mise en correspondance bass sur les -chemins de fichiers, comme la directive Alias, Redirect, ou ScriptAlias, par exemple, puissent avoir une +chemins de fichiers, comme la directive Alias, Redirect, ou ScriptAlias, par exemple, puissent avoir une chance d'accomplir leur tche.

    @@ -567,10 +590,9 @@ Si par exemple, vous avez un Alias sera bien valu.

    -

    -Alias /icons /usr/local/apache/icons
    -RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT] -

    +
    Alias "/icons" "/usr/local/apache/icons"
    +RewriteRule "/pics/(.+)\.jpg$" "/icons/$1.gif" [PT]
    +

    Dans l'exemple prcdent, en l'absence du drapeau [PT], l'Alias aurait @@ -600,9 +622,8 @@ Avec le drapeau [QSA], les cha

    Considrons la rgle suivante :

    -

    -RewriteRule /pages/(.+) /page.php?page=$1 [QSA] -

    +
    RewriteRule "/pages/(.+)" "/page.php?page=$1" [QSA]
    +

    Avec le drapeau [QSA], une requte pour /pages/123?one=two sera rcrite en @@ -635,6 +656,24 @@ originale sera supprim l'URI cible.

    +
    top
    +
    +

    QSL|qslast

    +

    +Par dfaut, le premier (le plus gauche) point d'interrogation de la +substitution spare le chemin de la requte de sa chane de paramtres. Avec le +drapeau [QSL] au contraire, les deux composants seront spars en utilisant le +dernier (le plus droite) point d'interrogation.

    + +

    +Cela peut s'avrer utile lorsqu'on recherche un fichier dont le nom contient des +points d'interrogation. Si aucune chane de paramtre n'est prsente dans la +substitution, il est alors possible d'ajouter un point d'interrogation la fin +et d'utiliser ce drapeau.

    + +

    Ce drapeau est disponible partir de la version 2.4.19 du serveur HTTP +Apache.

    +
    top

    R|redirect

    @@ -650,10 +689,8 @@ navigateur. Si une URL pleinement qualifi

    Tout code de statut de rponse HTTP valide peut tre spcifi, en utilisant la syntaxe [R=305], le code de statut 302 tant utilis par dfaut si aucun code n'est spcifi. Le code de statut -spcifi n'est pas ncessairement un code de statut de redirection (3xx). -

    - -

    Si le code de statut est en dehors de la plage des codes de +spcifi n'est pas ncessairement un code de statut +de redirection (3xx). Cependant, si le code de statut est en dehors de la plage des codes de redirection (300-399), la chane de substitution est entirement supprime, et la rcriture s'arrte comme si le drapeau L tait utilis.

    @@ -675,31 +712,52 @@ avertissements 'Invalid URI in request'.

    S|skip

    Le drapeau [S] sert sauter des rgles que vous ne voulez pas voir -excuter. Ceci peut s'interprter comme une instruction +excuter. La syntaxe du drapeau [S] est [S=N], o +N correspond au nombre de rgles sauter (sous +rserve que la rgle RewriteRule corresponde). +Ceci peut s'interprter comme une instruction goto dans votre jeu de rgles de rcriture. Dans l'exemple suivant, nous ne voulons excuter la rgle RewriteRule que si l'URI demand ne correspond pas un fichier existant.

    +
    # La requte concerne-t-elle un fichier qui n'existe pas ?
    +RewriteCond "%{REQUEST_FILENAME}" "!-f"
    +RewriteCond "%{REQUEST_FILENAME}" "!-d"
    +# Si c'est la cas, on saute les deux rgles de rcriture suivantes
    +RewriteRule ".?" "-" [S=2]
    +
    +RewriteRule "(.*\.gif)" "images.php?$1"
    +RewriteRule "(.*\.html)" "docs.php?$1"
    + + -

    -# La requte concerne-t-elle un fichier qui n'existe pas ?
    -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -# Si c'est la cas, on saute les deux rgles de rcriture suivantes
    -RewriteRule .? - [S=2]
    -
    -RewriteRule (.*\.gif) images.php?$1
    -RewriteRule (.*\.html) docs.php?$1 -

    Cette technique trouve son utilit dans le fait qu'une directive RewriteCond ne s'applique qu' la rgle qui la suit immdiatement. Ainsi, si vous voulez qu'une directive RewriteCond s'applique plusieurs rgles RewriteRule, une technique possible consiste inverser ces -conditions et utiliser le drapeau [Skip]. Cette technique permet +conditions et ajouter une RewriteRule avec le drapeau [Skip]. Cette technique permet d'laborer des pseudo-constructions if-then-else : la dernire rgle du bloc then contiendra skip=N, o N est le nombre de rgles -contenues dans le bloc else.

    +contenues dans le bloc else :

    +
    # Est-ce que le fichier existe ?
    +RewriteCond "%{REQUEST_FILENAME}" "!-f"
    +RewriteCond "%{REQUEST_FILENAME}" "!-d"
    +# Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza.
    +RewriteRule ".?" "-" [S=3]
    +
    +# Si le fichier existe, alors :
    +RewriteRule "(.*\.gif)" "images.php?$1"
    +    RewriteRule "(.*\.html)" "docs.php?$1"
    +    # Skip past the "else" stanza.
    +    RewriteRule ".?" "-" [S=1]
    +# ELSE...
    +RewriteRule "(.*)" "404.php?file=$1
    +# END
    + + +

    Il est probablement plus ais de dfinir ce genre de configuration +via les directives <If>, <ElseIf>, et <Else>.

    top
    @@ -711,19 +769,17 @@ identique du code source Perl en tant que plein texte, s'il est requis d'une certaine manire :

    -

    -# Sert les fichier .pl en tant que plein texte
    -RewriteRule \.pl$ - [T=text/plain] -

    +
    # Sert les fichier .pl en tant que plein texte
    +RewriteRule "\.pl$" "-" [T=text/plain]
    +

    Ou encore, si vous possdez une camra qui produit des fichiers images jpeg sans extension, vous pouvez forcer le renvoi de ces images avec le type MIME correct en se basant sur le nom du fichier :

    -

    -# Les fichiers dont le nom contient 'IMG' sont des images jpg.
    -RewriteRule IMG - [T=image/jpg] -

    +
    # Les fichiers dont le nom contient 'IMG' sont des images jpg.
    +RewriteRule "IMG" "-" [T=image/jpg]
    +

    Notez cependant qu'il s'agit d'un exemple trivial, et que le problme aurait pu tre rsolu en utilisant la place la directive <FilesMatch>. Il faut toujours @@ -744,7 +800,28 @@ utiliser le drapeau L pour terminer la s

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/flags.xml b/docs/manual/rewrite/flags.xml index 946701de4e4..a7b6748e83d 100644 --- a/docs/manual/rewrite/flags.xml +++ b/docs/manual/rewrite/flags.xml @@ -46,18 +46,16 @@ providing detailed explanations and examples.

    its behavior modified by one or more flags. Flags are included in square brackets at the end of the rule, and multiple flags are separated by commas.

    - + RewriteRule pattern target [Flag1,Flag2,Flag3] - + -

    The flags all have a short form, such as CO, as well as -a longer form, such as cookie. Some flags take one or more -arguments. Flags are not case sensitive.

    - -

    Each flag (with a few exceptions) -has a long and short form. While it is most common to use +

    Each flag (with a few exceptions) has a short form, such as +CO, as well as a longer form, such as cookie. +While it is most common to use the short form, it is recommended that you familiarize yourself with the -long form, so that you remember what each flag is supposed to do.

    +long form, so that you remember what each flag is supposed to do. +Some flags take one or more arguments. Flags are not case sensitive.

    Flags that alter metadata associated with the request (T=, H=, E=) have no affect in per-directory and htaccess context, when a substitution @@ -75,13 +73,13 @@ characters before applying the transformation.

    mod_rewrite has to unescape URLs before mapping them, -so backreferences will be unescaped at the time they are applied. +so backreferences are unescaped at the time they are applied. Using the B flag, non-alphanumeric characters in backreferences will be escaped. For example, consider the rule:

    - -RewriteRule ^search/(.*)$ /search.php?term=$1 - + +RewriteRule "^search/(.*)$" "/search.php?term=$1" +

    Given a search term of 'x & y/z', a browser will encode it as 'x%20%26%20y%2Fz', making the request 'search/x%20%26%20y%2Fz'. Without the B @@ -93,6 +91,10 @@ isn't a valid URL, and so would be encoded as before being passed on to the output URL, resulting in a correct mapping to /search.php?term=x%20%26%20y%2Fz.

    + +RewriteRule "^search/(.*)$" "/search.php?term=$1" [B,PT] + +

    Note that you may also need to set AllowEncodedSlashes to On to get this particular example to work, as httpd does not allow encoded slashes in URLs, and @@ -108,7 +110,7 @@ when the backend may break if presented with an unescaped URL.

    module="mod_rewrite">RewriteRule is chained to the next rule. That is, if the rule matches, then it is processed as usual and control moves on to the next rule. However, if it does not match, then -the next rule, and any other rules that are chained together, will be +the next rule, and any other rules that are chained together, are skipped.

    @@ -126,6 +128,15 @@ follows:

    [CO=NAME:VALUE:DOMAIN:lifetime:path:secure:httponly] +

    If a literal ':' character is needed in any of the cookie fields, an +alternate syntax is available. To opt-in to the alternate syntax, the cookie +"Name" should be preceded with a ';' character, and field separators should be +specified as ';'.

    + + +[CO=;NAME;VALUE:MOREVALUE;DOMAIN;lifetime;path;secure;httponly] + +

    You must declare a name, a value, and a domain for the cookie to be set.

    @@ -161,23 +172,23 @@ connections.
    httponly
    If set to HttpOnly, true, or 1, the cookie will have the HttpOnly flag set, -which means that the cookie will be inaccessible to JavaScript code on +which means that the cookie is inaccessible to JavaScript code on browsers that support this feature.
    -

    Several examples are offered here:

    +

    Consider this example:

    - -RewriteEngine On
    -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/] -
    + +RewriteEngine On +RewriteRule "^/index\.html" "-" [CO=frontdoor:yes:.example.com:1440:/] +

    In the example give, the rule doesn't rewrite the request. The "-" rewrite target tells mod_rewrite to pass the request through unchanged. Instead, it sets a cookie called 'frontdoor' to a value of 'yes'. The cookie is valid for any host -in the .example.com domain. It will be set to expire in 1440 -minutes (24 hours) and will be returned for all URIs.

    +in the .example.com domain. It is set to expire in 1440 +minutes (24 hours) and is returned for all URIs.

    @@ -220,13 +231,13 @@ variables work.

    The full syntax for this flag is:

    - + [E=VAR:VAL] [E=!VAR] - +

    VAL may contain backreferences ($N or -%N) which will be expanded.

    +%N) which are expanded.

    Using the short form

    @@ -255,10 +266,10 @@ value of '1' if the requested URI is an image file. Then, that environment variable is used to exclude those requests from the access log.

    - -RewriteRule \.(png|gif|jpg) - [E=image:1]
    -CustomLog logs/access_log combined env=!image -
    + +RewriteRule "\.(png|gif|jpg)$" "-" [E=image:1] +CustomLog "logs/access_log" combined env=!image +

    Note that this same effect can be obtained using SetEnvIf. This technique is offered as @@ -266,7 +277,7 @@ an example, not as a recommendation.

    END -

    Using the [END] flag terminates not only the current round ot rewrite +

    Using the [END] flag terminates not only the current round of rewrite processing (like [L]) but also prevents any subsequent rewrite processing from occurring in per-directory (htaccess) context.

    @@ -277,15 +288,15 @@ redirects.

    F|forbidden

    Using the [F] flag causes the server to return a 403 Forbidden status code to the client. While the same behavior can be accomplished using -the Deny directive, this +the Deny directive, this allows more flexibility in assigning a Forbidden status.

    The following rule will forbid .exe files from being downloaded from your server.

    - -RewriteRule \.exe - [F] - + +RewriteRule "\.exe" "-" [F] +

    This example uses the "-" syntax for the rewrite target, which means that the requested URI is not modified. There's no reason to rewrite to @@ -304,11 +315,11 @@ longer available.

    As with the [F] flag, you will typically use the "-" syntax for the rewrite target when using the [G] flag:

    - -RewriteRule oldproduct - [G,NC] - + +RewriteRule "oldproduct" "-" [G,NC] + -

    When using [F], an [L] is implied - that is, the response is returned +

    When using [G], an [L] is implied - that is, the response is returned immediately, and no further rules are evaluated.

    @@ -318,9 +329,9 @@ immediately, and no further rules are evaluated.

    handler. For example, one might use this to force all files without a file extension to be parsed by the php handler:

    - -RewriteRule !\. - [H=application/x-httpd-php] - + +RewriteRule "!\." "-" [H=application/x-httpd-php] +

    The regular expression above - !\. - will match any request @@ -332,9 +343,9 @@ For example, the following snippet used in per-server context allows .php files to be displayed by mod_php if they are requested with the .phps extension:

    - -RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] - + +RewriteRule "^(/source/.+\.php)s$" "$1" [H=application/x-httpd-php-source] +

    The regular expression above - ^(/source/.+\.php)s$ - will match any request that starts with /source/ followed by 1 or @@ -374,7 +385,7 @@ rules, as shown below.

    An alternative flag, [END], can be used to terminate not only the current round of rewrite processing but prevent any subsequent -rewrite processing from occuring in per-directory (htaccess) +rewrite processing from occurring in per-directory (htaccess) context. This does not apply to new requests resulting from external redirects.

    @@ -385,11 +396,11 @@ module="mod_rewrite">RewriteCond ensures that if the request is already for index.php, the RewriteRule will be skipped.

    - -RewriteBase /
    -RewriteCond %{REQUEST_URI} !=/index.php
    -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -
    + +RewriteBase "/" +RewriteCond "%{REQUEST_URI}" "!=/index.php" +RewriteRule "^(.*)" "/index.php?req=$1" [L,PT] +
    N|next @@ -404,16 +415,24 @@ certain string or letter repeatedly in a request. The example shown here will replace A with B everywhere in a request, and will continue doing so until there are no more As to be replaced.

    - - -RewriteRule (.*)A(.*) $1B$2 [N] - - + +RewriteRule "(.*)A(.*)" "$1B$2" [N] +

    You can think of this as a while loop: While this pattern still matches (i.e., while the URI still contains an A), perform this substitution (i.e., replace the A with a B).

    +

    In 2.4.8 and later, this module returns an error after 32,000 iterations to +protect against unintended looping. An alternative maximum number of +iterations can be specified by adding to the N flag.

    + +# Be willing to replace 1 character in each pass of the loop +RewriteRule "(.+)[><;]$" "$1" [N=64000] +# ... or, give up if after 10 loops +RewriteRule "(.+)[><;]$" "$1" [N=10] + +
    NC|nocase @@ -427,9 +446,9 @@ to your dedicated image server. The match is case-insensitive, so that .jpg and .JPG files are both acceptable, for example.

    - -RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] - + +RewriteRule "(.*\.(jpg|gif|png))$" "http://images.example.com$1" [P,NC] +
    NE|noescape @@ -438,9 +457,9 @@ RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] equivalent. Using the [NE] flag prevents that from happening.

    - -RewriteRule ^/anchor/(.+) /bigpage.html#$1 [NE,R] - + +RewriteRule "^/anchor/(.+)" "/bigpage.html#$1" [NE,R] +

    The above example will redirect /anchor/xyz to @@ -481,9 +500,9 @@ requests. example, if you wanted all image requests to be handled by a back-end image server, you might do something like the following:

    - -RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P] - + +RewriteRule "/(.*)\.(jpg|gif|png)$" "http://images.example.com/$1.$2" [P] +

    Use of the [P] flag implies [L] - that is, the request is immediately pushed through the proxy, and any following rules will not be @@ -507,6 +526,15 @@ and hostname part of the URL is either fixed, or does not allow the client undue influence.

    + +Performance warning +

    Using this flag triggers the use of mod_proxy, without handling of persistent connections. This +means the performance of your proxy will be better if you set it up with ProxyPass or +ProxyPassMatch

    +

    This is because this flag triggers the use of the default worker, which does not handle connection pooling.

    +

    Avoid using this flag and prefer those directives, whenever you can.

    +
    +

    Note: mod_proxy must be enabled in order to use this flag.

    @@ -522,7 +550,7 @@ use of the [PT] flag causes the result of the RewriteRule to be passed back through URL mapping, so that location-based mappings, such as Alias, Redirect, or Redirect, or ScriptAlias, for example, might have a chance to take effect.

    @@ -536,10 +564,10 @@ use the [PT] flag to ensure that the Alias is evaluated.

    - -Alias /icons /usr/local/apache/icons
    -RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT] -
    + +Alias "/icons" "/usr/local/apache/icons" +RewriteRule "/pics/(.+)\.jpg$" "/icons/$1.gif" [PT] +

    Omission of the [PT] flag in this case will cause the Alias to be @@ -568,9 +596,9 @@ Using the [QSA] flag causes the query strings to be combined.

    Consider the following rule:

    - -RewriteRule /pages/(.+) /page.php?page=$1 [QSA] - + +RewriteRule "/pages/(.+)" "/page.php?page=$1" [QSA] +

    With the [QSA] flag, a request for /pages/123?one=two will be mapped to /page.php?page=123&one=two. Without the [QSA] @@ -604,6 +632,23 @@ URI.

    +
    QSL|qslast +

    +By default, the first (left-most) question mark in the substitution +delimits the path from the query string. Using the [QSL] flag instructs +RewriteRule to instead split +the two components using the last (right-most) question mark.

    + +

    +This is useful when mapping to files that have literal question marks in +their filename. If no query string is used in the substitution, +a question mark can be appended to it in combination with this flag.

    + +

    This flag is available in version 2.4.19 and later.

    + +
    + +
    R|redirect

    Use of the [R] flag causes a HTTP redirect to be issued to the browser. @@ -617,10 +662,8 @@ will be used to generate the URL sent with the redirect. Any valid HTTP response status code may be specified, using the syntax [R=305], with a 302 status code being used by default if none is specified. The status code specified need not -necessarily be a redirect (3xx) status code. -

    - -

    If a status code is outside the redirect range (300-399) then the +necessarily be a redirect (3xx) status code. However, +if a status code is outside the redirect range (300-399) then the substitution string is dropped entirely, and rewriting is stopped as if the L were used.

    @@ -639,32 +682,56 @@ URI in request' warnings.
    S|skip -

    The [S] flag is used to skip rules that you don't want to run. This -can be thought of as a goto statement in your rewrite -ruleset. In the following example, we only want to run the RewriteRule if the requested URI -doesn't correspond with an actual file.

    - - -# Is the request for a non-existent file?
    -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -# If so, skip these two RewriteRules
    -RewriteRule .? - [S=2]
    -
    -RewriteRule (.*\.gif) images.php?$1
    -RewriteRule (.*\.html) docs.php?$1 -
    +

    The [S] flag is used to skip rules that you don't want to run. The +syntax of the skip flag is [S=N], where N signifies +the number of rules to skip (provided the +RewriteRule matches). This can be thought of as a goto +statement in your rewrite ruleset. In the following example, we only want +to run the RewriteRule if the +requested URI doesn't correspond with an actual file.

    + + +# Is the request for a non-existent file? +RewriteCond "%{REQUEST_FILENAME}" "!-f" +RewriteCond "%{REQUEST_FILENAME}" "!-d" +# If so, skip these two RewriteRules +RewriteRule ".?" "-" [S=2] + +RewriteRule "(.*\.gif)" "images.php?$1" +RewriteRule "(.*\.html)" "docs.php?$1" +

    This technique is useful because a RewriteCond only applies to the RewriteRule immediately following it. Thus, if you want to make a RewriteCond apply to several RewriteRules, one possible technique is to -negate those conditions and use a [Skip] flag. So, you can +negate those conditions and add a RewriteRule with a [Skip] flag. You can use this to make pseudo if-then-else constructs: The last rule of the then-clause becomes skip=N, where N is the -number of rules in the else-clause.

    +number of rules in the else-clause:

    + +# Does the file exist? +RewriteCond "%{REQUEST_FILENAME}" "!-f" +RewriteCond "%{REQUEST_FILENAME}" "!-d" +# Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza. +RewriteRule ".?" "-" [S=3] + +# IF the file exists, then: + RewriteRule "(.*\.gif)" "images.php?$1" + RewriteRule "(.*\.html)" "docs.php?$1" + # Skip past the "else" stanza. + RewriteRule ".?" "-" [S=1] +# ELSE... + RewriteRule "(.*)" "404.php?file=$1" +# END + + +

    It is probably easier to accomplish this kind of configuration using +the If, ElseIf, and Else directives instead.

    +
    T|type @@ -675,19 +742,19 @@ module="mod_mime">AddType directive.

    For example, you might use the following technique to serve Perl source code as plain text, if requested in a particular way:

    - -# Serve .pl files as plain text
    -RewriteRule \.pl$ - [T=text/plain] -
    + +# Serve .pl files as plain text +RewriteRule "\.pl$" "-" [T=text/plain] +

    Or, perhaps, if you have a camera that produces jpeg images without file extensions, you could force those images to be served with the correct MIME type by virtue of their file names:

    - -# Files with 'IMG' in the name are jpg images.
    -RewriteRule IMG - [T=image/jpg] -
    + +# Files with 'IMG' in the name are jpg images. +RewriteRule "IMG" "-" [T=image/jpg] +

    Please note that this is a trivial example, and could be better done using FilesMatch diff --git a/docs/manual/rewrite/flags.xml.fr b/docs/manual/rewrite/flags.xml.fr index f2f12c99df5..20a59ea898b 100644 --- a/docs/manual/rewrite/flags.xml.fr +++ b/docs/manual/rewrite/flags.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -25,226 +25,234 @@ Rewrite - Les drapeaux de réécriture + Les drapeaux de réécriture

    -

    Ce document décrit les drapeaux disponibles dans la directive +

    Ce document décrit les drapeaux disponibles dans la directive RewriteRule, en fournissant -des explications détaillées et des exemples.

    +des explications détaillées et des exemples.

    Documentation du module -Introduction à mod_rewrite +Introduction à mod_rewrite Redirection and remise en correspondance -Contrôle d'accès +Contrôle d'accès Serveurs virtuels Mise en cache Utilisation de RewriteMap -Techniques avancées +Techniques avancées Quand ne pas utiliser mod_rewrite
    Introduction

    Le comportement d'une directive RewriteRule peut être modifié par un ou -plusieurs drapeaux. Les drapeaux sont situés en fin de règle, entourés -de crochets, et séparés le cas échéant par des virgules.

    - -RewriteRule modèle cible [drapeau1,drapeau2,drapeau3] - - -

    Les drapeaux ont tous une forme courte, comme CO, ainsi -qu'une forme longue, comme cookie. Certains drapeaux -peuvent avoir un ou plusieurs arguments. Les drapeaux sont insensibles à -la casse.

    - -

    Chaque drapeau (à quelques exceptions près) possède une forme longue et une forme courte. Bien que -la forme courte soit la plus couramment utilisée, nous vous recommandons +module="mod_rewrite">RewriteRule peut être modifié par un ou +plusieurs drapeaux. Les drapeaux sont situés en fin de règle, entourés +de crochets, et séparés le cas échéant par des virgules.

    +RewriteRule pattern target [Flag1,Flag2,Flag3] + +

    Chaque drapeau (à quelques exceptions près) +possède une forme courte, comme CO, ainsi qu'une forme longue, +comme cookie. Bien que +la forme courte soit la plus couramment utilisée, nous vous recommandons de vous familiariser avec les drapeaux sous leur forme longue, afin de -bien mémoriser ce que chaque drapeau est supposé faire.

    - -

    Les drapeaux qui modifient les métadonnées associées à la requête -(T=, H=, E=) n'ont aucun effet dans un contexte de répertoire ou de -fichier htaccess, lorsqu'une substitution (autre que '-') est effectuée -au cours de la même passe du processus de réécriture. +bien mémoriser ce que chaque drapeau est supposé faire. +Certains drapeaux acceptent un ou plusieurs arguments. Les drapeaux ne +sont pas sensibles à la casse.

    + +

    Les drapeaux qui modifient les métadonnées associées à la requête +(T=, H=, E=) n'ont aucun effet dans un contexte de répertoire ou de +fichier htaccess, lorsqu'une substitution (autre que '-') est effectuée +au cours de la même passe du processus de réécriture.

    -

    Chaque drapeau disponible est présenté ici, avec un exemple +

    Chaque drapeau disponible est présenté ici, avec un exemple d'utilisation.

    -
    B (échappement dans les références arrières) +
    B (échappement dans les références arrières)

    Avec le drapeau [B], la directive RewriteRule échappe les caractères -non-alphanumériques avant d'appliquer la transformation.

    +module="mod_rewrite">RewriteRule échappe les caractères +non-alphanumériques avant d'appliquer la transformation.

    -

    mod_rewrite doit supprimer les séquences d'échappement +

    mod_rewrite doit supprimer les séquences d'échappement des URLs avant leur -mise en correspondance avec le système de fichiers ; les séquences -d'échappement sont donc supprimées des références arrières au moment où -ces dernières sont appliquées. Avec le drapeau B, les caractères -non-alphanumériques des références arrières seront échappés. Considérons -par exemple cette règle :

    +mise en correspondance avec le système de fichiers ; les séquences +d'échappement sont donc supprimées des références arrières au moment où +ces dernières sont appliquées. Avec le drapeau B, les caractères +non-alphanumériques des références arrières seront échappés. Considérons +par exemple cette règle :

    - -RewriteRule ^search/(.*)$ /search.php?term=$1 - +RewriteRule "^search/(.*)$" "/search.php?term=$1"

    Soit le terme de recherche 'x & y/z' ; un navigateur va le coder -en 'x%20%26%20y%2Fz', transformant la requête en -'search/x%20%26%20y%2Fz'. Sans le drapeau B, cette règle de réécriture -va réécrire la requête en 'search.php?term=x & y/z', ce qui ne -correspond pas à une URL valide et cette dernière sera encodée en -search.php?term=x%20&y%2Fz=, ce qui ne correspond pas à +en 'x%20%26%20y%2Fz', transformant la requête en +'search/x%20%26%20y%2Fz'. Sans le drapeau B, cette règle de réécriture +va réécrire la requête en 'search.php?term=x & y/z', ce qui ne +correspond pas à une URL valide et cette dernière sera encodée en +search.php?term=x%20&y%2Fz=, ce qui ne correspond pas à ce que l'on souhaitait.

    -

    Avec le drapeau B, les paramètres sont réencodés avant d'être passés -à l'URL résultante, ce qui fournit une réécriture correcte en +

    Avec le drapeau B, les paramètres sont réencodés avant d'être passés +à l'URL résultante, ce qui fournit une réécriture correcte en /search.php?term=x%20%26%20y%2Fz.

    -

    Notez que vous devrez peut-être aussi définir la + +RewriteRule "^search/(.*)$" "/search.php?term=$1" [B,PT] + + +

    Notez que vous devrez peut-être aussi définir la directive AllowEncodedSlashesOn pour +à On pour que cet exemple particulier fonctionne, car httpd ne permet pas les -slashes encodés dans les URLs, et renvoie une erreur 404 s'il en +slashes encodés dans les URLs, et renvoie une erreur 404 s'il en rencontre un.

    -

    Ce processus d'échappement est en particulier nécessaire dans le -contexte d'un mandataire, où l'accès au serveur d'arrière-plan échouera -si on présente à ce dernier une URL non échappée.

    +

    Ce processus d'échappement est en particulier nécessaire dans le +contexte d'un mandataire, où l'accès au serveur d'arrière-plan échouera +si on présente à ce dernier une URL non échappée.

    C|chain -

    Le drapeau [C] ou [chain] indique que la règle RewriteRule est chaînée avec la -suivante. Autrement dit, si la règle s'applique, elle est traitée -normalement et passe le contrôle à la règle suivante. Par contre, si -elle ne s'applique pas, la règle suivante, ainsi que toutes les règles -chaînées qui suivent, seront sautées.

    +

    Le drapeau [C] ou [chain] indique que la règle RewriteRule est chaînée avec la +suivante. Autrement dit, si la règle s'applique, elle est traitée +normalement et passe le contrôle à la règle suivante. Par contre, si +elle ne s'applique pas, la règle suivante, ainsi que toutes les règles +chaînées qui suivent, seront sautées.

    CO|cookie -

    Le drapeau [CO], ou [cookie], vous permet de définir un cookie -lorsqu'une règle RewriteRule -s'applique. Il possède trois arguments obligatoires et +

    Le drapeau [CO], ou [cookie], vous permet de définir un cookie +lorsqu'une règle RewriteRule +s'applique. Il possède trois arguments obligatoires et quatre arguments optionnels.

    -

    La syntaxe complète de ce drapeau, avec tous ses attributs, est la +

    La syntaxe complète de ce drapeau, avec tous ses attributs, est la suivante :

    [CO=NAME:VALUE:DOMAIN:lifetime:path:secure:httponly] -

    Vous devez déclarer un nom, une valeur et un domaine pour que -le cookie puisse être défini.

    +

    Si un caractère littéral ':' doit être insérer dans un des champs du +cookie, une autre syntaxe est disponible. Pour utiliser cette syntaxe +alternative, le contenu du champ "Name" doit être précédé du caractère +';', et les sépateurs de champs deviendront des ';'.

    + + +[CO=;NAME;VALUE:MOREVALUE;DOMAIN;lifetime;path;secure;httponly] + + +

    Vous devez déclarer un nom, une valeur et un domaine pour que +le cookie puisse être défini.

    Domain
    Le domaine pour lequel vous souhaitez que le cookie soit valide. Ce -peut être un nom de serveur, comme www.example.com, ou un +peut être un nom de serveur, comme www.example.com, ou un domaine, comme .example.com. Il doit comporter au moins -deux parties séparées par un point. C'est à dire que vous ne pouvez pas +deux parties séparées par un point. C'est à dire que vous ne pouvez pas utiliser les valeurs .com ou .net. En effet, -ce style de cookie est interdit par le modèle de sécurité des cookies.
    +ce style de cookie est interdit par le modèle de sécurité des cookies.
    -

    Vous pouvez aussi définir les valeurs suivantes :

    +

    Vous pouvez aussi définir les valeurs suivantes :

    Lifetime
    -
    La durée de vie du cookie, en minutes.
    -
    Une valeur de 0 indique une durée de vie correspondant à la session -courante du navigateur. Il s'agit de la valeur par défaut.
    +
    La durée de vie du cookie, en minutes.
    +
    Une valeur de 0 indique une durée de vie correspondant à la session +courante du navigateur. Il s'agit de la valeur par défaut.
    Path
    -
    Le chemin, sur le site web concerné, pour lequel le cookie est +
    Le chemin, sur le site web concerné, pour lequel le cookie est valide, du style /clients/ or /fichiers/telechargement/.
    -
    La valeur par défaut est / - c'est à dire l'ensemble du +
    La valeur par défaut est / - c'est à dire l'ensemble du site web.
    Secure
    Si cet argument a pour valeur secure, -true, ou 1, le cookie ne pourra être transmis -que dans le cadre d'une connexion sécurisée (https).
    +true, ou 1, le cookie ne pourra être transmis +que dans le cadre d'une connexion sécurisée (https).
    httponly
    Si cet argument a pour valeur HttpOnly, true, ou 1, le cookie aura son drapeau -HttpOnly activé, ce qui signifie qu'il sera inaccessible au +HttpOnly activé, ce qui signifie qu'il sera inaccessible au code JavaScript pour les navigateurs qui supportent cette -fonctionnalité.
    +fonctionnalité.

    Voici un exemple :

    - -RewriteEngine On
    -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.org:1440:/] -
    + +RewriteEngine On +RewriteRule "^/index\.html" "-" [CO=frontdoor:yes:.example.org:1440:/] + -

    Dans l'exemple ci-dessus, la règle ne réécrit -pas la requête. La cible de réécriture "-" -indique à mod_rewrite de transmettre la requête sans +

    Dans l'exemple ci-dessus, la règle ne réécrit +pas la requête. La cible de réécriture "-" +indique à mod_rewrite de transmettre la requête sans modification. Par contre, il -définit un cookie nommé 'frontdoor' avec une valeur 'yes'. Le cookie est -valide pour tout hôte situé dans le domaine .example.org. Sa -durée de vie est limitée à 1440 minutes (24 heures), et il sera renvoyé +définit un cookie nommé 'frontdoor' avec une valeur 'yes'. Le cookie est +valide pour tout hôte situé dans le domaine .example.org. Sa +durée de vie est limitée à 1440 minutes (24 heures), et il sera renvoyé pour tous les URIs.

    DPI|discardpath

    Avec le drapeau DPI, la partie PATH_INFO de l'URI -réécrit est supprimée.

    -

    Ce drapeau est disponible dans les versions 2.2.12 et supérieures.

    -

    Dans un contexte de répertoire, l'URI mis en comparaison par chaque -règle RewriteRule est la concaténation des +réécrit est supprimée.

    +

    Ce drapeau est disponible dans les versions 2.2.12 et supérieures.

    +

    Dans un contexte de répertoire, l'URI mis en comparaison par chaque +règle RewriteRule est la concaténation des valeurs courantes de l'URI et de PATH_INFO.

    -

    L'URI courant peut être l'URI initial tel qu'il a été fourni par le -client, le résultat d'une passe précédente du processus de réécriture, -ou le résultat de la règle précédente dans le processus courant de -réécriture.

    +

    L'URI courant peut être l'URI initial tel qu'il a été fourni par le +client, le résultat d'une passe précédente du processus de réécriture, +ou le résultat de la règle précédente dans le processus courant de +réécriture.

    -

    Par contre, la partie PATH_INFO ajoutée à l'URI avant chaque règle ne -reflète que la valeur de PATH_INFO avant la passe courante du processus -de réécriture. En conséquence, si de larges portions de l'URI +

    Par contre, la partie PATH_INFO ajoutée à l'URI avant chaque règle ne +reflète que la valeur de PATH_INFO avant la passe courante du processus +de réécriture. En conséquence, si de larges portions de l'URI correspondent et sont traduites via plusieurs directives RewriteRule, sans prendre en compte quelles parties de l'URI provenaient du PATH_INFO courant, l'URI final pourra se voir ajouter plusieurs copies de PATH_INFO.

    -

    Utilisez ce drapeau pour toute substitution où la présence du PATH_INFO qui -résultait de la mise en correspondance précédente de cette requête avec -le système de fichier n'est pas nécessaire. Avec ce drapeau, le -PATH_INFO établi avant que cette passe du processus de réécriture ne -débute est oublié. PATH_INFO ne sera pas recalculé tant que la passe -courante du processus de réécriture ne sera pas achevée. Les règles -suivantes de cette passe ne verront que le résultat direct des -substitutions, sans aucun PATH_INFO ajouté.

    +

    Utilisez ce drapeau pour toute substitution où la présence du PATH_INFO qui +résultait de la mise en correspondance précédente de cette requête avec +le système de fichier n'est pas nécessaire. Avec ce drapeau, le +PATH_INFO établi avant que cette passe du processus de réécriture ne +débute est oublié. PATH_INFO ne sera pas recalculé tant que la passe +courante du processus de réécriture ne sera pas achevée. Les règles +suivantes de cette passe ne verront que le résultat direct des +substitutions, sans aucun PATH_INFO ajouté.

    E|env -

    Avec le drapeau [E], ou [env], vous pouvez définir la valeur d'une +

    Avec le drapeau [E], ou [env], vous pouvez définir la valeur d'une variable d'environnement. Notez que certaines variables d'environnement -peuvent être définies après le traitement de la règle, annulant par -la-même ce que vous avez défini. Voir le document -sur les variables d'environnement pour plus de détails sur le +peuvent être définies après le traitement de la règle, annulant par +la-même ce que vous avez défini. Voir le document +sur les variables d'environnement pour plus de détails sur le fonctionnement des variables d'environnement.

    -

    La syntaxe complète pour ce drapeau est :

    +

    La syntaxe complète pour ce drapeau est :

    - + [E=!VAR] - + -

    VAL peut comporter des références arrières -($N ou %N) qui seront développées.

    +

    VAL peut comporter des références arrières +($N ou %N) qui seront développées.

    En utilisant la version courte

    @@ -252,7 +260,7 @@ fonctionnement des variables d'environnement.

    [E=VAR] -

    vous pouvez définir la variable d'environnement nommée +

    vous pouvez définir la variable d'environnement nommée VAR avec une valeur vide.

    La forme

    @@ -261,292 +269,298 @@ fonctionnement des variables d'environnement.

    [E=!VAR] -

    permet d'annuler la définition de la variable VAR.

    +

    permet d'annuler la définition de la variable VAR.

    -

    Les variables d'environnement s'emploient dans différents contextes, +

    Les variables d'environnement s'emploient dans différents contextes, comme les programmes CGI, d'autres directives RewriteRule, ou des directives CustomLog.

    -

    L'exemple suivant définit une variable d'environnement nommée 'image' -avec une valeur de '1' si l'URI de la requête correspond à un fichier -image. Cette variable d'environnement est ensuite utilisée pour exclure -une telle requête du journal des accès.

    +

    L'exemple suivant définit une variable d'environnement nommée 'image' +avec une valeur de '1' si l'URI de la requête correspond à un fichier +image. Cette variable d'environnement est ensuite utilisée pour exclure +une telle requête du journal des accès.

    -RewriteRule \.(png|gif|jpg) - [E=image:1]
    -CustomLog logs/access_log combined env=!image +RewriteRule "\.(png|gif|jpg)" "-" [E=image:1]
    +CustomLog "logs/access_log" combined env=!image
    -

    Notez que le même effet peut être obtenu à l'aide de la directive +

    Notez que le même effet peut être obtenu à l'aide de la directive SetEnvIf. Cette technique -est présentée à titre d'exemple et non de recommandation.

    +est présentée à titre d'exemple et non de recommandation.

    END

    L'utilisation du drapeau [END] permet non seulement de terminer le -processus de réécriture en cours (comme [L]), mais aussi d'empêcher tout -processus de réécriture ultérieur dans un contexte de répertoire +processus de réécriture en cours (comme [L]), mais aussi d'empêcher tout +processus de réécriture ultérieur dans un contexte de répertoire (htaccess).

    -

    Ceci ne s'applique pas aux nouvelles requêtes résultant d'une +

    Ceci ne s'applique pas aux nouvelles requêtes résultant d'une redirection externe.

    F|forbidden

    L'utilisation du drapeau [F] permet de faire envoyer par le serveur au -client un code de statut "403 Forbidden". Le même effet peut être obtenu à -l'aide de la directive Deny, +client un code de statut "403 Forbidden". Le même effet peut être obtenu à +l'aide de la directive Deny, mais ce drapeau offre plus de souplesse dans l'attribution d'un statut Forbidden.

    -

    La règle suivante va interdire la téléchargement de fichiers +

    La règle suivante va interdire la téléchargement de fichiers .exe depuis votre serveur.

    - -RewriteRule \.exe - [F] - +RewriteRule "\.exe" "-" [F] -

    Cet exemple utilise la syntaxe "-" pour la cible de réécriture, ce -qui signifie que l'URI de la requête n'est pas modifié. Il n'y a aucune -raison de réécrire un URI, si vous avez l'intention d'interdire la -requête.

    +

    Cet exemple utilise la syntaxe "-" pour la cible de réécriture, ce +qui signifie que l'URI de la requête n'est pas modifié. Il n'y a aucune +raison de réécrire un URI, si vous avez l'intention d'interdire la +requête.

    -

    Lorsqu'on utilise [F], [L] est implicite - c'est à dire que la -réponse est renvoyée immédiatement, et aucune autre règle n'est évaluée.

    +

    Lorsqu'on utilise [F], [L] est implicite - c'est à dire que la +réponse est renvoyée immédiatement, et aucune autre règle n'est évaluée.

    G|gone

    Le drapeau [G] permet de faire envoyer par le serveur un code de statut -"410 Gone" avec la réponse. Ce code indique qu'une ressource qui était +"410 Gone" avec la réponse. Ce code indique qu'une ressource qui était disponible auparavant ne l'est plus actuellement.

    -

    Comme dans le cas du drapeau [F], on utilise en général la syntaxe -"-" pour la cible de réécriture lorsqu'on utilise le drapeau [G] :

    +

    Comme dans le cas du drapeau [F], on utilise en général la syntaxe +"-" pour la cible de réécriture lorsqu'on utilise le drapeau [G] :

    - -RewriteRule ancienne-ressource - [G,NC] - +RewriteRule "oldproduct" "-" [G,NC] -

    Lorsqu'on utilise [F], [L] est implicite - c'est à dire que la -réponse est renvoyée immédiatement, et aucune autre règle n'est évaluée.

    +

    Lorsqu'on utilise [G], [L] est implicite - c'est à dire que la +réponse est renvoyée immédiatement, et aucune autre règle n'est évaluée.

    H|handler -

    Force le traitement de la requête résultante par le gestionnaire -spécifié. Par exemple, on peut utiliser ce drapeau pour forcer -l'interprétation de tous les fichiers sans extension par le gestionnaire +

    Force le traitement de la requête résultante par le gestionnaire +spécifié. Par exemple, on peut utiliser ce drapeau pour forcer +l'interprétation de tous les fichiers sans extension par le gestionnaire php :

    - -RewriteRule !\. - [H=application/x-httpd-php] - +RewriteRule "!\." "-" [H=application/x-httpd-php]

    -L'expression rationnelle ci-dessus - !\. - correspond à -toute requête qui ne contient pas le caractère .. +L'expression rationnelle ci-dessus - !\. - correspond à +toute requête qui ne contient pas le caractère ..

    On peut aussi utiliser ce drapeau pour forcer l'utilisation d'un certain gestionnaire en fonction de certaines conditions. Par exemple, -l'extrait suivant utilisé dans un contexte de niveau serveur permet de +l'extrait suivant utilisé dans un contexte de niveau serveur permet de faire en sorte que les fichiers .php soient -affichés par mod_php dans le cas où ils font -l'objet d'une requête avec l'extension .phps :

    +affichés par mod_php dans le cas où ils font +l'objet d'une requête avec l'extension .phps :

    - -RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] - + +RewriteRule "^(/source/.+\.php)s$" "$1" [H=application/x-httpd-php-source] +

    L'expression rationnelle ci-dessus - -^(/source/.+\.php)s$ - va correspondre à toute requête qui -débutera par /source/, continuera par 1 ou n caractères -puis par .phps. La référence arrière $1 fait référence à la -correspondance capturée entre parenthèses de l'expression +^(/source/.+\.php)s$ - va correspondre à toute requête qui +débutera par /source/, continuera par 1 ou n caractères +puis par .phps. La référence arrière $1 fait référence à la +correspondance capturée entre parenthèses de l'expression rationnelle.

    L|last -

    Lorsque le drapeau [L] est présent, mod_rewrite -arrête le traitement du jeu de règles. Cela signifie dans la plupart des -situations que si la règle s'applique, aucune autre règle ne sera -traitée. Ce drapeau correspond à la commande Perl last, ou -à la commande break en C. Utilisez ce drapeau pour indiquer -que la règle courante doit être appliquée immédiatement, sans tenir -compte des règles ultérieures.

    - -

    Si vous utilisez des règles Lorsque le drapeau [L] est présent, mod_rewrite +arrête le traitement du jeu de règles. Cela signifie dans la plupart des +situations que si la règle s'applique, aucune autre règle ne sera +traitée. Ce drapeau correspond à la commande Perl last, ou +à la commande break en C. Utilisez ce drapeau pour indiquer +que la règle courante doit être appliquée immédiatement, sans tenir +compte des règles ultérieures.

    + +

    Si vous utilisez des règles RewriteRule dans des fichiers .htaccess ou des sections Directory, il est important d'avoir quelques -notions sur la manière dont les règles sont traitées. Pour simplifier, -une fois les règles traitées, la requête réécrite est passée à nouveau -au moteur d'interprétation des URLs afin que ce dernier puisse la -traiter. Il est possible qu'au cours du traitement de la requête -réécrite, le fichier .htaccess ou la section Directory soient à nouveau -rencontrés, entraînant un nouveau traitement du jeu de règles depuis le -début. Cette situation se présente le plus souvent lorsqu'une des règles -provoque une redirection - interne ou externe - ce qui réinitialise le -traitement de la requête.

    +notions sur la manière dont les règles sont traitées. Pour simplifier, +une fois les règles traitées, la requête réécrite est passée à nouveau +au moteur d'interprétation des URLs afin que ce dernier puisse la +traiter. Il est possible qu'au cours du traitement de la requête +réécrite, le fichier .htaccess ou la section Directory soient à nouveau +rencontrés, entraînant un nouveau traitement du jeu de règles depuis le +début. Cette situation se présente le plus souvent lorsqu'une des règles +provoque une redirection - interne ou externe - ce qui réinitialise le +traitement de la requête.

    Si vous utilisez des directives RewriteRule dans un de ces contextes, -il importe par conséquent de prévoir explicitement des étapes permettant -d'éviter un bouclage infini sur les règles, +il importe par conséquent de prévoir explicitement des étapes permettant +d'éviter un bouclage infini sur les règles, et de ne pas compter seulement sur -le drapeau [L] pour terminer l'exécution d'une série de règles, comme -décrit ci-dessous.

    +le drapeau [L] pour terminer l'exécution d'une série de règles, comme +décrit ci-dessous.

    Un autre drapeau, [END], permet non seulement d'interrompre le cycle -courant du processus de réécriture, mais aussi d'empêcher toute -réécriture ultérieure dans le contexte de répertoire (htaccess). Ceci ne -s'applique pas aux nouvelles requêtes résultant de redirections +courant du processus de réécriture, mais aussi d'empêcher toute +réécriture ultérieure dans le contexte de répertoire (htaccess). Ceci ne +s'applique pas aux nouvelles requêtes résultant de redirections externes.

    -

    Dans l'exemple donné ici, toute requête est réécrite en -index.php, la requête originale étant ajoutée comme chaîne -de requête en argument à index.php ; cependant, la +

    Dans l'exemple donné ici, toute requête est réécrite en +index.php, la requête originale étant ajoutée comme chaîne +de requête en argument à index.php ; cependant, la directive RewriteCond permet de s'assurer que si -la requête concerne déjà index.php, la directive RewriteRule sera sautée.

    - - -RewriteBase /
    -RewriteCond %{REQUEST_URI} !=/index.php
    -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -
    +la requête concerne déjà index.php, la directive RewriteRule sera sautée.

    + + +RewriteBase "/" +RewriteCond "%{REQUEST_URI}" "!=/index.php" +RewriteRule "^(.*)" "/index.php?req=$1" [L,PT] +
    N|next -

    Le drapeau [N] provoque un redémarrage du traitement des règles -depuis le début, en utilisant le résultat du jeu de règles, sous -réserve qu'il existe un point de démarrage ; à utiliser avec précautions +

    Le drapeau [N] provoque un redémarrage du traitement des règles +depuis le début, en utilisant le résultat du jeu de règles, sous +réserve qu'il existe un point de démarrage ; à utiliser avec précautions car il peut provoquer un bouclage infini.

    Le drapeau [Next] peut servir, par exemple, -à remplacer de manière répétitive -une chaîne de caractère ou une lettre dans une requête. Dans l'exemple -suivant, chaque occurence de A sera remplacée par B dans la requête, et -ceci jusqu'il n'y ait plus de A à remplacer. +à remplacer de manière répétitive +une chaîne de caractère ou une lettre dans une requête. Dans l'exemple +suivant, chaque occurence de A sera remplacée par B dans la requête, et +ceci jusqu'il n'y ait plus de A à remplacer.

    - -RewriteRule (.*)A(.*) $1B$2 [N] - +RewriteRule "(.*)A(.*)" "$1B$2" [N] -

    Vous pouvez vous représenter ce traitement comme une boucle -while : tant que le modèle de la règle correspond (c'est à +

    Vous pouvez vous représenter ce traitement comme une boucle +while : tant que le modèle de la règle correspond (c'est à dire, tant que l'URI contient un A), -effectuer la substitution (c'est à dire, remplacer le A par +effectuer la substitution (c'est à dire, remplacer le A par un B).

    +

    A partir de la version 2.4.8, ce module renvoie une erreur après +32000 itérations afin d'éviter les boucles infinies. Ce nombre maximum +d'itération peut être modifié via le drapeau N.

    + +# On veut remplacer 1 caractère à chaque itération de la boucle +RewriteRule "(.+)[><;]$" "$1" [N=64000] +# ... ou s'arrêter après 10 itérations +RewriteRule "(.+)[><;]$" "$1" [N=10] + +
    NC|nocase -

    Avec le drapeau [NC], le modèle de la règle RewriteRule est comparé à la requête de -manière insensible à la casse. C'est à dire que cette comparaison +

    Avec le drapeau [NC], le modèle de la règle RewriteRule est comparé à la requête de +manière insensible à la casse. C'est à dire que cette comparaison s'effectue sans tenir compte des majuscules/minuscules dans l'URI -comparé.

    +comparé.

    -

    Dans l'exemple suivant, toute requête pour un fichier image sera -transmise par Apache à votre serveur d'images dédié. La correspondance est -insensible à la casse, si bien que par exemple, .jpg aussi -bien que .JPG seront acceptés.

    +

    Dans l'exemple suivant, toute requête pour un fichier image sera +transmise par Apache à votre serveur d'images dédié. La correspondance est +insensible à la casse, si bien que par exemple, .jpg aussi +bien que .JPG seront acceptés.

    - -RewriteRule (.*\.(jpg|gif|png))$ http://images.example.com$1 [P,NC] - +RewriteRule "(.*\.(jpg|gif|png))$" "http://images.example.com$1" [P,NC]
    NE|noescape -

    Par défaut, les caractères spéciaux, comme & et -?, sont convertis en leur équivalent -hexadécimal. Le drapeau [NE] permet d'éviter cette conversion. +

    Par défaut, les caractères spéciaux, comme & et +?, sont convertis en leur équivalent +hexadécimal. Le drapeau [NE] permet d'éviter cette conversion.

    - -RewriteRule ^/ancre/(.+) /grosse-page.html#$1 [NE,R] - +RewriteRule "^/anchor/(.+)" "/bigpage.html#$1" [NE,R]

    -Dans l'exemple ci-dessus, /anchor/xyz est réécrit en +Dans l'exemple ci-dessus, /anchor/xyz est réécrit en /bigpage.html#xyz. En l'absence du drapeau [NE], le # -aurait été converti en son équivalent hexadécimal, %23, ce -qui aurait provoqué un code d'erreur "404 Not Found". +aurait été converti en son équivalent hexadécimal, %23, ce +qui aurait provoqué un code d'erreur "404 Not Found".

    NS|nosubreq -

    Le drapeau [NS] empêche la règle de s'appliquer aux sous-requêtes. +

    Le drapeau [NS] empêche la règle de s'appliquer aux sous-requêtes. Par exemple, une page incluse au moyen d'une SSI (Server -Side Include) est une sous-requête, et vous ne voudrez probablement pas que -la réécriture s'applique à ces sous-requêtes. Ainsi, lorsque -mod_dir recherche des informations à propos des -fichiers par défaut du répertoire (comme les fichiers -index.html), il s'agit d'une sous-requête interne, et vous -ne désirez en général pas que ces sous-requêtes soient réécrites. Cette -réécriture -n'est pas toujours utile pour les sous-requêtes, et peut même causer des -erreurs si l'ensemble du jeu de règles est appliqué. L'utilisation de -ce drapeau permet d'exclure les règles qui peuvent poser problème.

    - -

    Comment déterminer si vous devez utiliser cette règle ou non : si -vous préfixez les URLs avec des scripts CGI, afin de forcer leur -traitement par le script CGI, vous vous exposez à des problèmes (ou du -moins à une surcharge significative) avec les sous-requêtes. Dans ces +Side Include) est une sous-requête, et vous ne voudrez probablement pas que +la réécriture s'applique à ces sous-requêtes. Ainsi, lorsque +mod_dir recherche des informations à propos des +fichiers par défaut du répertoire (comme les fichiers +index.html), il s'agit d'une sous-requête interne, et vous +ne désirez en général pas que ces sous-requêtes soient réécrites. Cette +réécriture +n'est pas toujours utile pour les sous-requêtes, et peut même causer des +erreurs si l'ensemble du jeu de règles est appliqué. L'utilisation de +ce drapeau permet d'exclure les règles qui peuvent poser problème.

    + +

    Comment déterminer si vous devez utiliser cette règle ou non : si +vous préfixez les URLs avec des scripts CGI, afin de forcer leur +traitement par le script CGI, vous vous exposez à des problèmes (ou du +moins à une surcharge significative) avec les sous-requêtes. Dans ces cas, vous devez utiliser ce drapeau.

    -Les images, scripts java, ou fichiers css, chargés en tant que partie -d'une page html, ne sont pas des sous-requêtes - le navigateur les -appelle sous forme de requêtes HTTP à part entière. +Les images, scripts java, ou fichiers css, chargés en tant que partie +d'une page html, ne sont pas des sous-requêtes - le navigateur les +appelle sous forme de requêtes HTTP à part entière.

    P|proxy -

    L'utilisation du drapeau [P] entraîne le traitement de la requête par -le module mod_proxy, et ceci via une requête de -mandataire. Par exemple, si vous voulez que toutes les requêtes d'images -soient traitées par un serveur d'images annexe, vous pouvez utiliser -une règle de ce style :

    +

    L'utilisation du drapeau [P] entraîne le traitement de la requête par +le module mod_proxy, et ceci via une requête de +mandataire. Par exemple, si vous voulez que toutes les requêtes d'images +soient traitées par un serveur d'images annexe, vous pouvez utiliser +une règle de ce style :

    - -RewriteRule /(.*)\.(jpg|gif|png) http://images.example.com/$1.$2 [P] - +RewriteRule "/(.*)\.(jpg|gif|png)$" "http://images.example.com/$1.$2" [P]

    L'utilisation du drapeau [P] provoque aussi l'effet du drapeau [L] - -autrement dit, la requête est immédiatement envoyée au mandataire, et -toute règle ultérieure sera ignorée.

    +autrement dit, la requête est immédiatement envoyée au mandataire, et +toute règle ultérieure sera ignorée.

    -Vous devez vous assurer que la chaîne de substitution soit un URI valide -(commençant typiquement par http://nom-serveur) -qui puisse être traitée par le module mod_proxy. Dans +Vous devez vous assurer que la chaîne de substitution soit un URI valide +(commençant typiquement par http://nom-serveur) +qui puisse être traitée par le module mod_proxy. Dans le cas contraire, le module mandataire vous renverra une erreur. -L'utilisation de ce drapeau implémente de manière plus puissante la +L'utilisation de ce drapeau implémente de manière plus puissante la directive ProxyPass, pour -faire correspondre le contenu distant à l'espace de nommage du serveur +faire correspondre le contenu distant à l'espace de nommage du serveur local.

    - Avertissement à propos de la sécurité -

    Lors de la construction de l'URL cible de la règle, il convient - de prendre en compte l'impact en matière de sécurité qu'aura le + Avertissement à propos de la sécurité +

    Lors de la construction de l'URL cible de la règle, il convient + de prendre en compte l'impact en matière de sécurité qu'aura le fait de permettre au client d'influencer le jeu d'URLs pour lesquelles votre serveur agira en tant que mandataire. Assurez-vous que la partie protocole://nom-serveur de l'URL soit fixe, ou ne permette pas au client de l'influencer induement.

    -

    Note: mod_proxy doit être activé pour pouvoir + + Avertissement au sujet des performances +

    Utiliser ce drapeau fait intervenir mod_proxy sans la gestion des connexions + persistantes, ce qui signifie que vous obtiendrez des performances meilleurs si vous utilisez + ProxyPass ou ProxyPassMatch.

    +

    Ceci est du au fait que ce drapeau induit l'utilisation du worker par défaut, qui + ne gère pas la mise en commun des connexions.

    +

    Partout où cela est possible, préférez l'utilisation de ces directives.

    + + +

    Note: mod_proxy doit être activé pour pouvoir utiliser ce drapeau.

    @@ -554,206 +568,245 @@ utiliser ce drapeau.

    PT|passthrough

    -Par défaut, la cible (ou chaîne de substitution) d'une règle -RewriteRule est sensée être un chemin de fichier. Avec le drapeau [PT], -par contre, elle est traitée comme un URI. Autrement dit, avec le -drapeau [PT], le résultat de la règle RewriteRule est passé à nouveau au -système de mise en correspondance des URLs avec le système de fichiers, -de façon à ce que les systèmes de mise en correspondance basés sur les +Par défaut, la cible (ou chaîne de substitution) d'une règle +RewriteRule est sensée être un chemin de fichier. Avec le drapeau [PT], +par contre, elle est traitée comme un URI. Autrement dit, avec le +drapeau [PT], le résultat de la règle RewriteRule est passé à nouveau au +système de mise en correspondance des URLs avec le système de fichiers, +de façon à ce que les systèmes de mise en correspondance basés sur les chemins de fichiers, comme la directive Alias, Redirect, ou Redirect, ou ScriptAlias, par exemple, puissent avoir une -chance d'accomplir leur tâche. +chance d'accomplir leur tâche.

    Si par exemple, vous avez un Alias pour /icons, et une règle Alias pour /icons, et une règle RewriteRule qui renvoie vers /icons, -vous devez utiliser le drapeau [PT] pour être sûr que l'Alias sera bien évalué. +vous devez utiliser le drapeau [PT] pour être sûr que l'Alias sera bien évalué.

    - -Alias /icons /usr/local/apache/icons
    -RewriteRule /pics/(.+)\.jpg /icons/$1.gif [PT] -
    + +Alias "/icons" "/usr/local/apache/icons" +RewriteRule "/pics/(.+)\.jpg$" "/icons/$1.gif" [PT] +

    -Dans l'exemple précédent, en l'absence du drapeau [PT], l'Alias aurait -été ignoré, ce qui aurait provoqué une erreur 'File not found'. +Dans l'exemple précédent, en l'absence du drapeau [PT], l'Alias aurait +été ignoré, ce qui aurait provoqué une erreur 'File not found'.

    Avec le drapeau PT, le drapeau L est -implicite : la réécriture s'arrêtera afin de transmettre la requête à la +implicite : la réécriture s'arrêtera afin de transmettre la requête à la phase suivante du traitement.

    Notez que le drapeau PT est implicite dans des contextes -de répertoire comme les sections Directory ou les fichiers -.htaccess. Le seul moyen de contourner ceci consiste à -réécrire vers -.

    +.htaccess. Le seul moyen de contourner ceci consiste à +réécrire vers -.

    QSA|qsappend

    -Quand l'URI de remplacement contient une chaîne de requête, le -comportement par défaut de la règle RewriteRule est de supprimer la -query string (il s'agit des paramètres éventuellement passés dans l'URL après le -caractère ?, usuellement pour les formulaires traités par la -méthode HTTP GET) existante, et de la remplacer par celle nouvellement créée. -Avec le drapeau [QSA], les chaînes de requête peuvent être combinées. +query string (il s'agit des paramètres éventuellement passés dans l'URL après le +caractère ?, usuellement pour les formulaires traités par la +méthode HTTP GET) existante, et de la remplacer par celle nouvellement créée. +Avec le drapeau [QSA], les chaînes de requête peuvent être combinées.

    -

    Considérons la règle suivante :

    +

    Considérons la règle suivante :

    - -RewriteRule /pages/(.+) /page.php?page=$1 [QSA] - +RewriteRule "/pages/(.+)" "/page.php?page=$1" [QSA] -

    Avec le drapeau [QSA], une requête pour -/pages/123?one=two sera réécrite en +

    Avec le drapeau [QSA], une requête pour +/pages/123?one=two sera réécrite en /page.php?page=123&one=two. Sans le drapeau [QSA], la -même requête sera réécrite en /page.php?page=123 - -autrement dit, la chaîne de requête (query string) existante sera supprimée. +même requête sera réécrite en /page.php?page=123 - +autrement dit, la chaîne de requête (query string) existante sera supprimée.

    QSD|qsdiscard

    -Lorsque l'URI de la requête contient une chaîne de paramètres, et si -l'URI cible n'en contient pas, le comportement par défaut de la -directive RewriteRule consiste à copier cette -chaîne de paramètres dans l'URI cible. Avec le drapeau [QSD], la chaîne -de paramètres est supprimée. +Lorsque l'URI de la requête contient une chaîne de paramètres, et si +l'URI cible n'en contient pas, le comportement par défaut de la +directive RewriteRule consiste à copier cette +chaîne de paramètres dans l'URI cible. Avec le drapeau [QSD], la chaîne +de paramètres est supprimée.

    -

    Ce drapeau est disponible dans les versions 2.4.0 et supérieures.

    +

    Ce drapeau est disponible dans les versions 2.4.0 et supérieures.

    -Lorsque les drapeaux [QSD] et [QSA] sont utilisés ensemble, c'est le +Lorsque les drapeaux [QSD] et [QSA] sont utilisés ensemble, c'est le drapeau [QSD] qui l'emporte.

    -Si l'URI cible possède une chaîne de paramètres, le comportement par -défaut sera respecté - c'est à dire que la chaîne de paramètres -originale sera supprimée et remplacée par la chaîne de paramètres de +Si l'URI cible possède une chaîne de paramètres, le comportement par +défaut sera respecté - c'est à dire que la chaîne de paramètres +originale sera supprimée et remplacée par la chaîne de paramètres de l'URI cible.

    +
    QSL|qslast +

    +Par défaut, le premier (le plus à gauche) point d'interrogation de la +substitution sépare le chemin de la requête de sa chaîne de paramètres. Avec le +drapeau [QSL] au contraire, les deux composants seront séparés en utilisant le +dernier (le plus à droite) point d'interrogation.

    + +

    +Cela peut s'avérer utile lorsqu'on recherche un fichier dont le nom contient des +points d'interrogation. Si aucune chaîne de paramètre n'est présente dans la +substitution, il est alors possible d'ajouter un point d'interrogation à la fin +et d'utiliser ce drapeau.

    + +

    Ce drapeau est disponible à partir de la version 2.4.19 du serveur HTTP +Apache.

    + +
    R|redirect

    L'utilisation du drapeau [R] provoque l'envoi d'une redirection au -navigateur. Si une URL pleinement qualifiée (FQDN - fully qualified domain name) - est spécifiée (c'est à dire incluant http://nom-du-serveur/), - une redirection sera effectuée vers cette adresse. Dans le cas contraire, - le protocole courant, le nom du serveur et le numéro de port seront - utilisés pour générer l'URL envoyée avec la redirection. +navigateur. Si une URL pleinement qualifiée (FQDN - fully qualified domain name) + est spécifiée (c'est à dire incluant http://nom-du-serveur/), + une redirection sera effectuée vers cette adresse. Dans le cas contraire, + le protocole courant, le nom du serveur et le numéro de port seront + utilisés pour générer l'URL envoyée avec la redirection.

    -

    Tout code de statut de réponse HTTP valide peut être -spécifié, en utilisant la syntaxe [R=305], le code de statut 302 étant -utilisé par défaut si aucun code n'est spécifié. Le code de statut -spécifié n'est pas nécessairement un code de statut de redirection (3xx). -

    - -

    Si le code de statut est en dehors de la plage des codes de -redirection (300-399), la chaîne de substitution est entièrement -supprimée, et la réécriture s'arrête comme si le drapeau L -était utilisé.

    +

    Tout code de statut de réponse HTTP valide peut être +spécifié, en utilisant la syntaxe [R=305], le code de statut 302 étant +utilisé par défaut si aucun code n'est spécifié. Le code de statut +spécifié n'est pas nécessairement un code de statut +de redirection (3xx). Cependant, si le code de statut est en dehors de la plage des codes de +redirection (300-399), la chaîne de substitution est entièrement +supprimée, et la réécriture s'arrête comme si le drapeau L +était utilisé.

    -

    En plus des codes de statut de réponse, vous pouvez spécifier les +

    En plus des codes de statut de réponse, vous pouvez spécifier les codes de redirection en utilisant leurs noms symboliques : -temp (défaut), permanent, ou +temp (défaut), permanent, ou seeother.

    -Vous utiliserez presque toujours [R] en conjonction avec [L] (c'est à -dire [R,L]), car employé seul, le drapeau [R] préfixe l'URI avec -http://cet-hôte[:ce-port], mais passe ensuite cette adresse -à la règle suivante, ce qui provoquera le plus souvent des +Vous utiliserez presque toujours [R] en conjonction avec [L] (c'est à +dire [R,L]), car employé seul, le drapeau [R] préfixe l'URI avec +http://cet-hôte[:ce-port], mais passe ensuite cette adresse +à la règle suivante, ce qui provoquera le plus souvent des avertissements 'Invalid URI in request'.

    S|skip -

    Le drapeau [S] sert à sauter des règles que vous ne voulez pas voir -exécuter. Ceci peut s'interpréter comme une instruction -goto dans votre jeu de règles de réécriture. Dans -l'exemple suivant, nous ne voulons exécuter la règle RewriteRule que si l'URI demandé ne -correspond pas à un fichier existant.

    - - -# La requête concerne-t-elle un fichier qui n'existe pas ?
    -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -# Si c'est la cas, on saute les deux règles de réécriture suivantes
    -RewriteRule .? - [S=2]
    -
    -RewriteRule (.*\.gif) images.php?$1
    -RewriteRule (.*\.html) docs.php?$1 -
    - -

    Cette technique trouve son utilité dans le fait qu'une directive +

    Le drapeau [S] sert à sauter des règles que vous ne voulez pas voir +exécuter. La syntaxe du drapeau [S] est [S=N], où +N correspond au nombre de règles à sauter (sous +réserve que la règle RewriteRule corresponde). +Ceci peut s'interpréter comme une instruction +goto dans votre jeu de règles de réécriture. Dans +l'exemple suivant, nous ne voulons exécuter la règle RewriteRule que si l'URI demandé ne +correspond pas à un fichier existant.

    + +# La requête concerne-t-elle un fichier qui n'existe pas ? +RewriteCond "%{REQUEST_FILENAME}" "!-f" +RewriteCond "%{REQUEST_FILENAME}" "!-d" +# Si c'est la cas, on saute les deux règles de réécriture suivantes +RewriteRule ".?" "-" [S=2] + +RewriteRule "(.*\.gif)" "images.php?$1" +RewriteRule "(.*\.html)" "docs.php?$1" + + + + +

    Cette technique trouve son utilité dans le fait qu'une directive RewriteCond ne s'applique -qu'à la règle qui la suit immédiatement. Ainsi, si vous voulez -qu'une directive RewriteCond s'applique à plusieurs règles -RewriteRule, une technique possible consiste à inverser ces -conditions et à utiliser le drapeau [Skip]. Cette technique permet -d'élaborer des pseudo-constructions if-then-else : la dernière règle du -bloc then contiendra skip=N, où N est le nombre de règles -contenues dans le bloc else.

    +qu'à la règle qui la suit immédiatement. Ainsi, si vous voulez +qu'une directive RewriteCond s'applique à plusieurs règles +RewriteRule, une technique possible consiste à inverser ces +conditions et ajouter une RewriteRule avec le drapeau [Skip]. Cette technique permet +d'élaborer des pseudo-constructions if-then-else : la dernière règle du +bloc then contiendra skip=N, où N est le nombre de règles +contenues dans le bloc else :

    + +# Est-ce que le fichier existe ? +RewriteCond "%{REQUEST_FILENAME}" "!-f" +RewriteCond "%{REQUEST_FILENAME}" "!-d" +# Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza. +RewriteRule ".?" "-" [S=3] + +# Si le fichier existe, alors : +RewriteRule "(.*\.gif)" "images.php?$1" + RewriteRule "(.*\.html)" "docs.php?$1" + # Skip past the "else" stanza. + RewriteRule ".?" "-" [S=1] +# ELSE... +RewriteRule "(.*)" "404.php?file=$1 +# END + + +

    Il est probablement plus aisé de définir ce genre de configuration +via les directives If, ElseIf, et Else.

    T|type -

    Définit le type MIME de la réponse résultante renvoyée. L'effet est -identique à celui de la directive Définit le type MIME de la réponse résultante renvoyée. L'effet est +identique à celui de la directive AddType.

    Par exemple, vous pouvez utiliser la technique suivante pour servir du code source Perl en tant que plein texte, s'il est requis d'une -certaine manière :

    +certaine manière :

    - -# Sert les fichier .pl en tant que plein texte
    -RewriteRule \.pl$ - [T=text/plain] -
    + +# Sert les fichier .pl en tant que plein texte +RewriteRule "\.pl$" "-" [T=text/plain] + -

    Ou encore, si vous possédez une caméra qui produit des fichiers +

    Ou encore, si vous possédez une caméra qui produit des fichiers images jpeg sans extension, vous pouvez forcer le renvoi de ces images avec le type MIME correct en se basant sur le nom du fichier :

    - -# Les fichiers dont le nom contient 'IMG' sont des images jpg.
    -RewriteRule IMG - [T=image/jpg] -
    + +# Les fichiers dont le nom contient 'IMG' sont des images jpg. +RewriteRule "IMG" "-" [T=image/jpg] + -

    Notez cependant qu'il s'agit d'un exemple trivial, et que le problème -aurait pu être résolu en utilisant à la place la directive Notez cependant qu'il s'agit d'un exemple trivial, et que le problème +aurait pu être résolu en utilisant à la place la directive FilesMatch. Il faut toujours -envisager la possibilité d'une solution alternative à un problème avant -d'avoir recours à la réécriture, qui sera toujours moins efficace qu'une +envisager la possibilité d'une solution alternative à un problème avant +d'avoir recours à la réécriture, qui sera toujours moins efficace qu'une solution alternative.

    -Dans un contexte de niveau répertoire, n'utilisez que - -(tiret) comme substitution, dans toute la séquence de réécriture de -mod_rewrite, sinon le type MIME défini avec ce drapeau -sera perdu suite à un retraitement interne (y compris les séquences de -réécriture suivantes de mod_rewrite). Dans ce contexte, vous pouvez -utiliser le drapeau L pour terminer la séquence -courante de réécriture de mod_rewrite.

    +Dans un contexte de niveau répertoire, n'utilisez que - +(tiret) comme substitution, dans toute la séquence de réécriture de +mod_rewrite, sinon le type MIME défini avec ce drapeau +sera perdu suite à un retraitement interne (y compris les séquences de +réécriture suivantes de mod_rewrite). Dans ce contexte, vous pouvez +utiliser le drapeau L pour terminer la séquence +courante de réécriture de mod_rewrite.

    diff --git a/docs/manual/rewrite/htaccess.html b/docs/manual/rewrite/htaccess.html index 491a51c7abb..6f35b58bae7 100644 --- a/docs/manual/rewrite/htaccess.html +++ b/docs/manual/rewrite/htaccess.html @@ -3,3 +3,7 @@ URI: htaccess.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: htaccess.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/htaccess.html.en b/docs/manual/rewrite/htaccess.html.en index 37a69a85354..cd9a805669d 100644 --- a/docs/manual/rewrite/htaccess.html.en +++ b/docs/manual/rewrite/htaccess.html.en @@ -1,24 +1,30 @@ - -mod_rewrite and .htaccess files - Apache HTTP Server +mod_rewrite and .htaccess files - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    mod_rewrite and .htaccess files

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite

    mod_rewrite and .htaccess files

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -28,11 +34,33 @@ the way that the rules change when you use mod_rewrite in .htaccess files, and how to deal with these changes.

    - +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/htaccess.html.fr b/docs/manual/rewrite/htaccess.html.fr new file mode 100644 index 00000000000..ea72a62ccf2 --- /dev/null +++ b/docs/manual/rewrite/htaccess.html.fr @@ -0,0 +1,67 @@ + + + + + +mod_rewrite et les fichiers .htaccess - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    mod_rewrite et les fichiers .htaccess

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment de la documentation de rfrence du module +mod_rewrite. Il dcrit les changements apports aux rgles +lorsqu'on utilise mod_rewrite dans les fichiers .htaccess, et comment +travailler avec ces changements.

    + +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/htaccess.xml.fr b/docs/manual/rewrite/htaccess.xml.fr new file mode 100644 index 00000000000..c7678204f1b --- /dev/null +++ b/docs/manual/rewrite/htaccess.xml.fr @@ -0,0 +1,50 @@ + + + + + + + + + + + Rewrite + +mod_rewrite et les fichiers .htaccess + + + +

    Ce document est un complément de la documentation de référence du module +mod_rewrite. Il décrit les changements apportés aux règles +lorsqu'on utilise mod_rewrite dans les fichiers .htaccess, et comment +travailler avec ces changements.

    + +
    +Documentation du module mod_rewrite +Introduction à mod_rewrite +Redirection et remise en +correspondance + +Serveurs virtuels +Serveurs mandataires +Utilisation de RewriteMap +Techniques avancées +Quand ne pas utiliser mod_rewrite + +
    diff --git a/docs/manual/rewrite/htaccess.xml.meta b/docs/manual/rewrite/htaccess.xml.meta index dfb5bbd5501..00ee9a1c1e2 100644 --- a/docs/manual/rewrite/htaccess.xml.meta +++ b/docs/manual/rewrite/htaccess.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/index.html b/docs/manual/rewrite/index.html index 77d7eb5e927..a5c3a44835e 100644 --- a/docs/manual/rewrite/index.html +++ b/docs/manual/rewrite/index.html @@ -12,6 +12,6 @@ Content-Language: tr Content-type: text/html; charset=UTF-8 -URI: index.html.zh-cn +URI: index.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/rewrite/index.html.en b/docs/manual/rewrite/index.html.en index c7440a29b58..efc43d51398 100644 --- a/docs/manual/rewrite/index.html.en +++ b/docs/manual/rewrite/index.html.en @@ -1,22 +1,27 @@ - -Apache mod_rewrite - Apache HTTP Server +Apache mod_rewrite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache mod_rewrite

    +Apache > HTTP Server > Documentation > Version 2.4

    Apache mod_rewrite

    Available Languages:  en  |  fr  | @@ -51,7 +56,7 @@

    Since mod_rewrite is so powerful, it can indeed be rather complex. This document supplements the reference documentation, and attempts to allay some of that complexity, and provide highly - annoted examples of common scenarios that you may handle with + annotated examples of common scenarios that you may handle with mod_rewrite. But we also attempt to show you when you should not use mod_rewrite, and use other standard Apache features instead, thus avoiding this unnecessary complexity.

    @@ -82,6 +87,10 @@ wiki
  • Glossary
  •  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/index.html.fr b/docs/manual/rewrite/index.html.fr index 2f0205f7f7d..8ad89da9f1e 100644 --- a/docs/manual/rewrite/index.html.fr +++ b/docs/manual/rewrite/index.html.fr @@ -1,22 +1,27 @@ - -Le module Apache mod_rewrite - Serveur Apache HTTP +Le module Apache mod_rewrite - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Le module Apache mod_rewrite

    +Apache > Serveur HTTP > Documentation > Version 2.4
    \ No newline at end of file diff --git a/docs/manual/rewrite/index.html.tr.utf8 b/docs/manual/rewrite/index.html.tr.utf8 index 33d2a5111d4..ab21f4aca07 100644 --- a/docs/manual/rewrite/index.html.tr.utf8 +++ b/docs/manual/rewrite/index.html.tr.utf8 @@ -1,96 +1,91 @@ - -Apache mod_rewrite - Apache HTTP Sunucusu +Apache mod_rewrite - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache mod_rewrite

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache mod_rewrite

    Mevcut Diller:  en  |  fr  |  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    - -
    -

    ``mod_rewrite’ı harika yapan şey, Sendmail’ın tüm yapılandırma - kolaylığı ve esnekliğine sahip olmasıdır. mod_rewrite’ı kötü yapan - şey ise Sendmail’ın tüm yapılandırma kolaylığı ve esnekliğine sahip - olmasıdır.''

    - -

    -- Brian Behlendorf
    - Apache Group

    -
    -
    -

    ``Hakkında tonlarca örnek ve belge olmasına rağmen mod_rewrite kara - büyüdür. Müthiş güzel bir kara büyü ama yine de kara büyü.''

    +

    mod_rewrite modülü gelen URL isteklerinde değişiklik + yapabilmek için düzenli ifade kurallarına + dayalı, devingen bir yol sunar. Böylece, keyfi URL'leri dahili URL + yapınızla kolayca eşleyebilirsiniz.

    -

    -- Brian Moore
    - bem@news.cmc.net

    -
    +

    Gerçekten esnek ve güçlü bir URL kurgulama mekanizması oluşturmak için + sınısız sayıda kural ve her kural için de sınırsız sayıda koşul destekler. + URL değişiklikleri çeşitli sınamalara dayanır; sunucu değişkenleri, HTTP + başlıkları, ortam değişkenleri, zaman damgaları hatta çeşitli biçimlerde + harici veritabanı sorguları bile bu amaçla kullanılabilir.

    -

    URL kurgulamasının İsviçre Çakısı olan mod_rewrite - modülünün belgelerine hoşgeldiniz!

    - -

    Bu modül istenen URL’leri çalışma anında yeniden yazmak için (düzenli - ifade çözümleyiciden yararlanan) kurallara dayalı bir yeniden yazma - motoru kullanır. Gerçekten esnek ve güçlü bir URL kurgulama - mekanizması oluşturmak için sınısız sayıda kural ve her kural için de - sınırsız sayıda koşul destekler. URL değişiklikleri çeşitli sınamalara - dayanır; sunucu değişkenleri, HTTP başlıkları, ortam değişkenleri, - zaman damgaları hatta çeşitli biçimlerde harici veritabanı sorguları - bile bu amaçla kullanılabilir.

    - -

    Bu modül URL’lerin tamamında (path-info kısmı dahil) hem sunucu - bağlamında (httpd.conf) hem de dizin bağlamında +

    Yeniden yazma kuralları URL’lerin tamamında (path-info kısmı ve sorgu + dizgesi dahil) hem sunucu bağlamında (httpd.conf) hem sanal + konaklar bağlamında (<VirtualHost> bölümleri), hem de dizin bağlamında (.htaccess dosyaları ve <Directory> bölümleri) çalışır ve URL üzerinde sorgu dizgesi bölümleri bile - oluşturabilir. Yeniden yazılan URL sonuçta dahili işlemlerde, harici - yönlendirmelerde ve hatta dahili vekalet işlemlerinde - kullanılabilir.

    + oluşturabilir. Kurallara atadığınız seçeneklere + bağlı olarak, yeniden yazılan URL sonuçta dahili işlemlerde, harici + yönlendirmelerde ve vekalet işlemlerinde kullanılabilir.

    -

    Fakat tüm bu işlevsellik ve esnekliğin bir bedeli vardır: karmaşıklık. - Bu yüzden bu modülün yapabildiklerini bir günde anlayabilmeyi - beklemeyin.

    +

    mod_rewrite modülü çok güçlü olduğundan, gerçekten çok + karmaşık olabilir. Bu belge, başvuru + belgelerinin tamamlayıcısı olup karmaşıklığı biraz azaltmaya çalışır + ve mod_rewrite ile elde edilebilen ortak senaryoların + oldukça açıklamalı örneklerini sağlar. Fakat ayrıca, + mod_rewrite modülünü kullanmamanız, yerine standart + Apache özelliklerini kullanmanız gereken durumları da göstermeye, + böylece gereksiz karmaşıklıktan kurtulmanızı sağlamaya çalıştık.

    +
    - +

    Mevcut Diller:  en  |  fr  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    Apache License, Version 2.0 altında lisanslıdır.

    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/index.html.zh-cn b/docs/manual/rewrite/index.html.zh-cn.utf8 similarity index 80% rename from docs/manual/rewrite/index.html.zh-cn rename to docs/manual/rewrite/index.html.zh-cn.utf8 index 87e46a292b2..ce765edc8fc 100644 --- a/docs/manual/rewrite/index.html.zh-cn +++ b/docs/manual/rewrite/index.html.zh-cn.utf8 @@ -1,28 +1,34 @@ - -Apache mod_rewrite - Apache HTTP 服务器 +Apache mod_rewrite - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache mod_rewrite

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache mod_rewrite

    可用语言:  en  |  fr  |  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    mod_rewrite 提供了基于正则表达式规则动态修改传入的请求的 URL 的方法。 这允许你以自己喜欢的任意方法映射任意 URL 到你的内部 URL 结构。

    @@ -65,6 +71,10 @@ wiki
  • 术语
  •  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/index.xml b/docs/manual/rewrite/index.xml index a5b323a37e2..548d88cc1be 100644 --- a/docs/manual/rewrite/index.xml +++ b/docs/manual/rewrite/index.xml @@ -56,7 +56,7 @@ complex. This document supplements the reference documentation, and attempts to allay some of that complexity, and provide highly - annoted examples of common scenarios that you may handle with + annotated examples of common scenarios that you may handle with mod_rewrite. But we also attempt to show you when you should not use mod_rewrite, and use other standard Apache features instead, thus avoiding this unnecessary complexity.

    diff --git a/docs/manual/rewrite/index.xml.fr b/docs/manual/rewrite/index.xml.fr index d9cd2328892..1bd5af5c1d1 100644 --- a/docs/manual/rewrite/index.xml.fr +++ b/docs/manual/rewrite/index.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -79,7 +79,7 @@ référence de mod_rewrite
  • Introduction aux expressions rationnelles et à mod_rewrite
  • Utilisation de mod_rewrite pour la -redirection et la remise en corespondance avec le système de +redirection et la remise en correspondance avec le système de fichiers des URLs
  • Utilisation de mod_rewrite pour le contrôle d'accès
  • diff --git a/docs/manual/rewrite/index.xml.meta b/docs/manual/rewrite/index.xml.meta index e555e3f9465..abe6d6ca220 100644 --- a/docs/manual/rewrite/index.xml.meta +++ b/docs/manual/rewrite/index.xml.meta @@ -9,7 +9,7 @@ en fr - tr - zh-cn + tr + zh-cn diff --git a/docs/manual/rewrite/index.xml.tr b/docs/manual/rewrite/index.xml.tr index d9b2b6d051f..5375f40ce17 100644 --- a/docs/manual/rewrite/index.xml.tr +++ b/docs/manual/rewrite/index.xml.tr @@ -1,10 +1,10 @@ - + + -Apache mod_rewrite Introduction - Apache HTTP Server +Apache mod_rewrite Introduction - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache mod_rewrite Introduction

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite
    top

    Introduction

    @@ -138,14 +143,28 @@ the expression.

    CondPattern, back-references are internally created which can be used with the strings $N and %N (see below). These are available for creating - the strings Substitution and TestString. - Figure 1 shows to which locations the back-references are - transferred for expansion as well as illustrating the flow of the - RewriteRule, RewriteCond matching.

    + the Substitution parameter of a + RewriteRule or + the TestString parameter of a + RewriteCond.

    +

    Captures in the RewriteRule patterns are (counterintuitively) available to + all preceding + RewriteCond directives, + because the RewriteRule + expression is evaluated before the individual conditions.

    + +

    Figure 1 shows to which + locations the back-references are transferred for expansion as + well as illustrating the flow of the RewriteRule, RewriteCond + matching. In the next chapters, we will be exploring how to use + these back-references, so do not fret if it seems a bit alien + to you at first. +

    - Flow of RewriteRule and RewriteCond matching
    - Figure 1: The back-reference flow through a rule. + Flow of RewriteRule and RewriteCond matching
    + Figure 1: The back-reference flow through a rule.
    + In this example, a request for /test/1234 would be transformed into /admin.foo?page=test&id=1234&host=admin.example.com.

    @@ -160,10 +179,15 @@ of three arguments separated by spaces. The arguments are

  • [flags]: options affecting the rewritten request.
  • -

    The Pattern is always a regular -expression matched against the URL-Path of the incoming request -(the part after the hostname but before any question mark indicating -the beginning of a query string).

    +

    The Pattern is a regular expression. +It is initially (for the first rewrite rule or until a substitution occurs) +matched against the URL-path of the incoming request (the part after the +hostname but before any question mark indicating the beginning of a query +string) or, in per-directory context, against the request's path relative +to the directory for which the rule is defined. Once a substitution has +occurred, the rules that follow are matched against the substituted +value. +

    Syntax of the RewriteRule directive
    @@ -176,18 +200,16 @@ the beginning of a query string).

    A full filesystem path to a resource
    -

    -RewriteRule ^/games /usr/local/games/web -

    +
    RewriteRule "^/games" "/usr/local/games/web"
    +

    This maps a request to an arbitrary location on your filesystem, much like the Alias directive.

    A web-path to a resource
    -

    -RewriteRule ^/foo$ /bar -

    +
    RewriteRule "^/foo$" "/bar"
    +

    If DocumentRoot is set to /usr/local/apache2/htdocs, then this directive would map requests for http://example.com/foo to the @@ -196,9 +218,8 @@ path /usr/local/apache2/htdocs/bar.

    An absolute URL
    -

    -RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R] -

    +
    RewriteRule "^/product/view$" "http://site2.example.com/seeproduct.html" [R]
    +

    This tells the client to make a new request for the specified URL.

    @@ -206,9 +227,8 @@ RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]

    The Substitution can also contain back-references to parts of the incoming URL-path matched by the Pattern. Consider the following:

    -

    -RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1 -

    +
    RewriteRule "^/product/(.*)/view$" "/var/web/productdb/$1"
    +

    The variable $1 will be replaced with whatever text was matched by the expression inside the parenthesis in the Pattern. For example, a request @@ -229,9 +249,8 @@ application of one or more flags to the end of the rule. For example, the matching behavior of a rule can be made case-insensitive by the application of the [NC] flag:

    -

    -RewriteRule ^puppy.html smalldog.html [NC] -

    +
    RewriteRule "^puppy.html" "smalldog.html" [NC]
    +

    For more details on the available flags, their meanings, and examples, see the Rewrite Flags document.

    @@ -255,10 +274,9 @@ argument is a list of flags that modify how the match is evaluated.

    For example, to send all requests from a particular IP range to a different server, you could use:

    -

    -RewriteCond %{REMOTE_ADDR} ^10\.2\.
    -RewriteRule (.*) http://intranet.example.com$1 -

    +
    RewriteCond "%{REMOTE_ADDR}" "^10\.2\."
    +RewriteRule "(.*)" "http://intranet.example.com$1"
    +

    When more than one RewriteCond is @@ -267,11 +285,10 @@ the Rewrit applied. For example, to deny requests that contain the word "hack" in their query string, unless they also contain a cookie containing the word "go", you could use:

    -

    -RewriteCond %{QUERY_STRING} hack
    -RewriteCond %{HTTP_COOKIE} !go
    -RewriteRule . - [F] -

    +
    RewriteCond "%{QUERY_STRING}" "hack"
    +RewriteCond "%{HTTP_COOKIE}" "!go"
    +RewriteRule "." "-" [F]
    +

    Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".

    Matches in the regular expressions contained in @@ -281,10 +298,9 @@ the Rewrit variables %1, %2, etc. For example, this will direct the request to a different directory depending on the hostname used to access the site:

    -

    -RewriteCond %{HTTP_HOST} (.*)
    -RewriteRule ^/(.*) /sites/%1/$1 -

    +
    RewriteCond "%{HTTP_HOST}" "(.*)"
    +RewriteRule "^/(.*)" "/sites/%1/$1"
    +

    If the request was for http://example.com/foo/bar, then %1 would contain example.com and $1 would contain foo/bar.

    @@ -321,7 +337,28 @@ the
    Rewrit +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/intro.html.fr b/docs/manual/rewrite/intro.html.fr index f94be5e05f5..a247037588a 100644 --- a/docs/manual/rewrite/intro.html.fr +++ b/docs/manual/rewrite/intro.html.fr @@ -1,22 +1,27 @@ - -Introduction au module Apache mod_rewrite - Serveur Apache HTTP +Introduction au module Apache mod_rewrite - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Introduction au module Apache mod_rewrite

    +Apache > Serveur HTTP > Documentation > Version 2.4 > Rewrite
    top

    Introduction

    @@ -154,17 +159,31 @@ arri un des modles de conditions, des rfrences arrires sont cres en interne et peuvent tre rappeles via les chanes $N et %N (voir ci-dessous). Ces - rfrences sont disponibles lors de la cration des chanes de - Substitution et des Chanes de test. La - figure 1 - montre quels endroits les rfrences arrires sont suceptibles + rfrences sont disponibles lors de la cration + de la chane de substitution d'une directive + RewriteRule ou de la + chane de test d'une directive RewriteCond.

    +

    Les captures dans les modles de directives RewriteRule sont paradoxalement + disponibles dans toutes les directives RewriteCond qui prcdent, car + les expressions des directives RewriteRule sont values avant + les conditions individuelles.

    + + +

    La figure 1 montre quels endroits les + rfrences arrires sont suceptibles d'tre dveloppes, et illustre le flux des comparaisons - effectues par les rgles RewriteRule et RewriteCond.

    + effectues par les rgles RewriteRule et + RewriteCond. Dans les chapitres suivants, nous examinerons comment + utiliser ces rfrences arrires, donc ne vous affolez pas si + elles vous paraissent un peu exotiques au premier abord.

    - Flux des comparaisons effectues par les rgles RewriteRule       et RewriteCond
    + Flux des comparaisons effectues par les rgles RewriteRule       et RewriteCond
    Figure 1 : Le cheminement d'une rfrence arrire - travers une rgle. + travers une rgle.
    + Dans cet exemple, une requte pour /test/1234 serait + transforme en + /admin.foo?page=test&id=1234&host=admin.example.com.

    @@ -181,10 +200,17 @@ transform
  • [drapeaux]: options affectant la requte rcrite.
  • -

    Le Modle est toujours une expression -rationnelle compare au chemin de l'URL de la requte entrante (la +

    Le Modle est une expression +rationnelle. Au sein de la premire rgle de rcriture, ou jusqu' +ce qu'une substitution survienne, elle est compare au chemin de +l'URL de la requte entrante (la partie situe aprs le nom d'hte mais avant tout point d'interrogation -qui indique le dbut d'une chane de requte).

    +qui indique le dbut d'une chane de paramtres de +requte) ou, dans un contexte de rpertoire, au chemin de la +requte relativement au rpertoire pour lequel la +rgle est dfinie. Lorsqu'une substitution a eu lieu, les +rgles suivantes effectuent leurs comparaisons par rapport la valeur +substitue.

    Syntaxe de la directive RewriteRule
    @@ -197,18 +223,16 @@ trois types :

    Un chemin complet du systme de fichiers vers une ressource
    -

    -RewriteRule ^/jeux /usr/local/jeux/web -

    +
    RewriteRule "^/jeux" "/usr/local/jeux/web"
    +

    Ceci peut faire correspondre une requte toute localisation voulue de votre systme de fichiers, un peu comme la directive Alias.

    Un chemin web vers une ressource
    -

    -RewriteRule ^/foo$ /bar -

    +
    RewriteRule "^/foo$" "/bar"
    +

    Si la directive DocumentRoot a pour valeur /usr/local/apache2/htdocs, cette rgle va faire correspondre les requtes pour http://example.com/foo au @@ -217,9 +241,8 @@ chemin /usr/local/apache2/htdocs/bar.

    Une URL absolue
    -

    -RewriteRule ^/produits/vues$ http://site2.example.com/voirproduits.html [R] -

    +
    RewriteRule "^/produits/vues$" "http://site2.example.com/voirproduits.html" [R]
    +

    Ceci informe le client qu'il doit effectuer une nouvelle requte vers l'URL spcifie.

    @@ -228,9 +251,8 @@ l'URL sp

    La chane de Substitution peut aussi contenir des rfrences arrires vers des parties du chemin d'URL entrant correspondant au Modle. Considrons ce qui suit :

    -

    -RewriteRule ^/produits/(.*)/view$ /var/web/produitsdb/$1 -

    +
    RewriteRule "^/produits/(.*)/view$" "/var/web/produitsdb/$1"
    +

    La variable $1 sera remplace par tout texte correspondant l'expression situe entre les parenthses dans le Modle. Par exemple, une requte pour @@ -250,9 +272,8 @@ pr conditions de correspondance d'une rgle peuvent tre rendues insensibles la casse par la prsence du drapeau [NC] :

    -

    -RewriteRule ^puppy.html petitchien.html [NC] -

    +
    RewriteRule "^puppy.html" "petitchien.html" [NC]
    +

    Pour une liste des drapeaux disponibles, leurs significations, et des exemples, voir le document Drapeaux de @@ -278,21 +299,19 @@ correspondance est

    Par exemple, pour renvoyer toutes les requtes en provenance d'une certaine tranche d'adresses IP vers un autre serveur, vous pouvez utiliser :

    -

    -RewriteCond %{REMOTE_ADDR} ^10\.2\.
    -RewriteRule (.*) http://intranet.example.com$1 -

    +
    RewriteCond "%{REMOTE_ADDR}" "^10\.2\."
    +RewriteRule "(.*)" "http://intranet.example.com$1"
    +

    Si vous spcifiez plus d'une directive RewriteCond, ces directives doivent toutes tre satisfaites pour que la rgle RewriteRule suivante s'applique. Par exemple, pour interdire les requtes qui contiennent le mot "hack" dans la chane de requte, sauf si elles contiennent aussi un cookie contenant le mot "go", vous pouvez utiliser :

    -

    -RewriteCond %{QUERY_STRING} hack
    -RewriteCond %{HTTP_COOKIE} !go
    -RewriteRule . - [F] -

    +
    RewriteCond "%{QUERY_STRING}" "hack"
    +RewriteCond "%{HTTP_COOKIE}" "!go"
    +RewriteRule "." "-" [F]
    +

    Notez que le point d'exclamation indique une correspondance ngative ; ainsi, la rgle n'est applique que si le cookie ne contient pas "go"

    @@ -303,10 +322,9 @@ de la r les variables %1, %2, etc... Par exemple, ce qui suit va diriger la requte vers un rpertoire diffrent en fonction du nom d'hte utilis pour accder au site :

    -

    -RewriteCond %{HTTP_HOST} (.*)
    -RewriteRule ^/(.*) /sites/%1/$1 -

    +
    RewriteCond "%{HTTP_HOST}" "(.*)"
    +RewriteRule "^/(.*)" "/sites/%1/$1"
    +

    Si la requte concernait http://example.com/foo/bar, alors %1 contiendrait example.com et $1 contiendrait foo/bar.

    @@ -345,7 +363,28 @@ requ

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/intro.xml b/docs/manual/rewrite/intro.xml index e9d2c19696b..871e56e5da0 100644 --- a/docs/manual/rewrite/intro.xml +++ b/docs/manual/rewrite/intro.xml @@ -145,15 +145,30 @@ the expression.

    CondPattern, back-references are internally created which can be used with the strings $N and %N (see below). These are available for creating - the strings Substitution and TestString. - Figure 1 shows to which locations the back-references are - transferred for expansion as well as illustrating the flow of the - RewriteRule, RewriteCond matching.

    + the Substitution parameter of a + RewriteRule or + the TestString parameter of a + RewriteCond.

    +

    Captures in the RewriteRule patterns are (counterintuitively) available to + all preceding + RewriteCond directives, + because the RewriteRule + expression is evaluated before the individual conditions.

    + +

    Figure 1 shows to which + locations the back-references are transferred for expansion as + well as illustrating the flow of the RewriteRule, RewriteCond + matching. In the next chapters, we will be exploring how to use + these back-references, so do not fret if it seems a bit alien + to you at first. +

    - Flow of RewriteRule and RewriteCond matching
    - Figure 1: The back-reference flow through a rule. + Figure 1: The back-reference flow through a rule.
    + In this example, a request for /test/1234 would be transformed into /admin.foo?page=test&id=1234&host=admin.example.com.

    @@ -168,10 +183,15 @@ of three arguments separated by spaces. The arguments are

  • [flags]: options affecting the rewritten request.
  • -

    The Pattern is always a regular -expression matched against the URL-Path of the incoming request -(the part after the hostname but before any question mark indicating -the beginning of a query string).

    +

    The Pattern is a regular expression. +It is initially (for the first rewrite rule or until a substitution occurs) +matched against the URL-path of the incoming request (the part after the +hostname but before any question mark indicating the beginning of a query +string) or, in per-directory context, against the request's path relative +to the directory for which the rule is defined. Once a substitution has +occurred, the rules that follow are matched against the substituted +value. +

    A full filesystem path to a resource
    - -RewriteRule ^/games /usr/local/games/web - + +RewriteRule "^/games" "/usr/local/games/web" +

    This maps a request to an arbitrary location on your filesystem, much like the Alias directive.

    A web-path to a resource
    - -RewriteRule ^/foo$ /bar - + +RewriteRule "^/foo$" "/bar" +

    If DocumentRoot is set to /usr/local/apache2/htdocs, then this directive would map requests for http://example.com/foo to the @@ -205,9 +225,9 @@ path /usr/local/apache2/htdocs/bar.

    An absolute URL
    - -RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R] - + +RewriteRule "^/product/view$" "http://site2.example.com/seeproduct.html" [R] +

    This tells the client to make a new request for the specified URL.

    @@ -215,9 +235,9 @@ RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]

    The Substitution can also contain back-references to parts of the incoming URL-path matched by the Pattern. Consider the following:

    - -RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1 - + +RewriteRule "^/product/(.*)/view$" "/var/web/productdb/$1" +

    The variable $1 will be replaced with whatever text was matched by the expression inside the parenthesis in the Pattern. For example, a request @@ -239,9 +259,9 @@ application of one or more flags to the end of the rule. For example, the matching behavior of a rule can be made case-insensitive by the application of the [NC] flag:

    - -RewriteRule ^puppy.html smalldog.html [NC] - + +RewriteRule "^puppy.html" "smalldog.html" [NC] +

    For more details on the available flags, their meanings, and examples, see the Rewrite Flags document.

    @@ -267,10 +287,10 @@ argument is a list of flags that modify how the match is evaluated.

    For example, to send all requests from a particular IP range to a different server, you could use:

    - -RewriteCond %{REMOTE_ADDR} ^10\.2\.
    -RewriteRule (.*) http://intranet.example.com$1 -
    + +RewriteCond "%{REMOTE_ADDR}" "^10\.2\." +RewriteRule "(.*)" "http://intranet.example.com$1" +

    When more than one RewriteCond is @@ -279,11 +299,11 @@ the RewriteRule to be applied. For example, to deny requests that contain the word "hack" in their query string, unless they also contain a cookie containing the word "go", you could use:

    - -RewriteCond %{QUERY_STRING} hack
    -RewriteCond %{HTTP_COOKIE} !go
    -RewriteRule . - [F] -
    + +RewriteCond "%{QUERY_STRING}" "hack" +RewriteCond "%{HTTP_COOKIE}" "!go" +RewriteRule "." "-" [F] +

    Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".

    Matches in the regular expressions contained in @@ -293,10 +313,10 @@ the RewriteRule using the variables %1, %2, etc. For example, this will direct the request to a different directory depending on the hostname used to access the site:

    - -RewriteCond %{HTTP_HOST} (.*)
    -RewriteRule ^/(.*) /sites/%1/$1 -
    + +RewriteCond "%{HTTP_HOST}" "(.*)" +RewriteRule "^/(.*)" "/sites/%1/$1" +

    If the request was for http://example.com/foo/bar, then %1 would contain example.com and $1 would contain foo/bar.

    diff --git a/docs/manual/rewrite/intro.xml.fr b/docs/manual/rewrite/intro.xml.fr index 7f817a481bc..0a432e75b7a 100644 --- a/docs/manual/rewrite/intro.xml.fr +++ b/docs/manual/rewrite/intro.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -170,19 +170,37 @@ arrières dans les expressions rationnelles un des modèles de conditions, des références arrières sont créées en interne et peuvent être rappelées via les chaînes $N et %N (voir ci-dessous). Ces - références sont disponibles lors de la création des chaînes de - Substitution et des Chaînes de test. La - figure 1 - montre à quels endroits les références arrières sont suceptibles + références sont disponibles lors de la création + de la chaîne de substitution d'une directive + RewriteRule ou de la + chaîne de test d'une directive RewriteCond.

    +

    Les captures dans les modèles de directives RewriteRule sont paradoxalement + disponibles dans toutes les directives RewriteCond qui précèdent, car + les expressions des directives RewriteRule sont évaluées avant + les conditions individuelles.

    + + +

    La figure 1 montre à quels endroits les + références arrières sont suceptibles d'être développées, et illustre le flux des comparaisons - effectuées par les règles RewriteRule et RewriteCond.

    + effectuées par les règles RewriteRule et + RewriteCond. Dans les chapitres suivants, nous examinerons comment + utiliser ces références arrières, donc ne vous affolez pas si + elles vous paraissent un peu exotiques au premier abord.

    - Flux des comparaisons effectuées par les règles RewriteRule
       et RewriteCond
    Figure 1 : Le cheminement d'une référence arrière à - travers une règle. + travers une règle.
    + Dans cet exemple, une requête pour /test/1234 serait + transformée en + /admin.foo?page=test&id=1234&host=admin.example.com.

    @@ -200,10 +218,17 @@ transformée;
  • [drapeaux]: options affectant la requête réécrite.
  • -

    Le Modèle est toujours une expression -rationnelle comparée au chemin de l'URL de la requête entrante (la +

    Le Modèle est une expression +rationnelle. Au sein de la première règle de réécriture, ou jusqu'à +ce qu'une substitution survienne, elle est comparée au chemin de +l'URL de la requête entrante (la partie située après le nom d'hôte mais avant tout point d'interrogation -qui indique le début d'une chaîne de requête).

    +qui indique le début d'une chaîne de paramètres de +requête) ou, dans un contexte de répertoire, au chemin de la +requête relativement au répertoire pour lequel la +règle est définie. Lorsqu'une substitution a eu lieu, les +règles suivantes effectuent leurs comparaisons par rapport à la valeur +substituée.

    Un chemin complet du système de fichiers vers une ressource
    - -RewriteRule ^/jeux /usr/local/jeux/web - + +RewriteRule "^/jeux" "/usr/local/jeux/web" +

    Ceci peut faire correspondre une requête à toute localisation voulue de votre système de fichiers, un peu comme la directive Alias.

    @@ -227,9 +252,9 @@ module="mod_alias">Alias.

    Un chemin web vers une ressource
    - -RewriteRule ^/foo$ /bar - + +RewriteRule "^/foo$" "/bar" +

    Si la directive DocumentRoot a pour valeur /usr/local/apache2/htdocs, cette règle va faire correspondre les requêtes pour http://example.com/foo au @@ -238,9 +263,9 @@ chemin /usr/local/apache2/htdocs/bar.

    Une URL absolue
    - -RewriteRule ^/produits/vues$ http://site2.example.com/voirproduits.html [R] - + +RewriteRule "^/produits/vues$" "http://site2.example.com/voirproduits.html" [R] +

    Ceci informe le client qu'il doit effectuer une nouvelle requête vers l'URL spécifiée.

    @@ -249,9 +274,9 @@ l'URL spécifiée.

    La chaîne de Substitution peut aussi contenir des références arrières vers des parties du chemin d'URL entrant correspondant au Modèle. Considérons ce qui suit :

    - -RewriteRule ^/produits/(.*)/view$ /var/web/produitsdb/$1 - + +RewriteRule "^/produits/(.*)/view$" "/var/web/produitsdb/$1" +

    La variable $1 sera remplacée par tout texte correspondant à l'expression située entre les parenthèses dans le Modèle. Par exemple, une requête pour @@ -272,9 +297,9 @@ présence d'un ou plusieurs drapeaux en fin de règle. Par exemple, conditions de correspondance d'une règle peuvent être rendues insensibles à la casse par la présence du drapeau [NC] :

    - -RewriteRule ^puppy.html petitchien.html [NC] - + +RewriteRule "^puppy.html" "petitchien.html" [NC] +

    Pour une liste des drapeaux disponibles, leurs significations, et des exemples, voir le document Drapeaux de @@ -304,10 +329,10 @@ correspondance est évaluée.

    Par exemple, pour renvoyer toutes les requêtes en provenance d'une certaine tranche d'adresses IP vers un autre serveur, vous pouvez utiliser :

    - -RewriteCond %{REMOTE_ADDR} ^10\.2\.
    -RewriteRule (.*) http://intranet.example.com$1 -
    + +RewriteCond "%{REMOTE_ADDR}" "^10\.2\." +RewriteRule "(.*)" "http://intranet.example.com$1" +

    Si vous spécifiez plus d'une directive RewriteCond, ces directives @@ -316,11 +341,11 @@ module="mod_rewrite">RewriteRule suivante s'applique. Par exemple, pour interdire les requêtes qui contiennent le mot "hack" dans la chaîne de requête, sauf si elles contiennent aussi un cookie contenant le mot "go", vous pouvez utiliser :

    - -RewriteCond %{QUERY_STRING} hack
    -RewriteCond %{HTTP_COOKIE} !go
    -RewriteRule . - [F] -
    + +RewriteCond "%{QUERY_STRING}" "hack" +RewriteCond "%{HTTP_COOKIE}" "!go" +RewriteRule "." "-" [F] +

    Notez que le point d'exclamation indique une correspondance négative ; ainsi, la règle n'est appliquée que si le cookie ne contient pas "go"

    @@ -331,10 +356,10 @@ de la règle RewriteRule via les variables %1, %2, etc... Par exemple, ce qui suit va diriger la requête vers un répertoire différent en fonction du nom d'hôte utilisé pour accéder au site :

    - -RewriteCond %{HTTP_HOST} (.*)
    -RewriteRule ^/(.*) /sites/%1/$1 -
    + +RewriteCond "%{HTTP_HOST}" "(.*)" +RewriteRule "^/(.*)" "/sites/%1/$1" +

    Si la requête concernait http://example.com/foo/bar, alors %1 contiendrait example.com et $1 contiendrait foo/bar.

    diff --git a/docs/manual/rewrite/proxy.html b/docs/manual/rewrite/proxy.html index 94eceb093eb..13f8e5c31f1 100644 --- a/docs/manual/rewrite/proxy.html +++ b/docs/manual/rewrite/proxy.html @@ -3,3 +3,7 @@ URI: proxy.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: proxy.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/proxy.html.en b/docs/manual/rewrite/proxy.html.en index 6f5b4839551..c07b8c11614 100644 --- a/docs/manual/rewrite/proxy.html.en +++ b/docs/manual/rewrite/proxy.html.en @@ -1,24 +1,30 @@ - -Using mod_rewrite for Proxying - Apache HTTP Server +Using mod_rewrite for Proxying - Apache HTTP Server Version 2.4 - + + +
    + +

    Apache HTTP Server Version 2.4

    +
    <-

    Using mod_rewrite for Proxying

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite

    Using mod_rewrite for Proxying

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -28,7 +34,7 @@ how to use the RewriteRule's [P] flag to proxy content to another server. A number of recipes are provided that describe common scenarios.

    - +
    top

    Proxying Content with mod_rewrite

    @@ -53,24 +59,22 @@ A number of recipes are provided that describe common scenarios.

    To simply map a URL to another server, we use the [P] flag, as follows:

    -

    -RewriteEngine on
    -RewriteBase /products/
    -RewriteRule ^widget/(.*)$ http://product.example.com/widget/$1 [P]
    -ProxyPassReverse /products/widget/ http://product.example.com/widget/ -

    +
    RewriteEngine  on
    +RewriteBase    "/products/"
    +RewriteRule    "^widget/(.*)$"  "http://product.example.com/widget/$1"  [P]
    +ProxyPassReverse "/products/widget/" "http://product.example.com/widget/"
    +

    In the second example, we proxy the request only if we can't find the resource locally. This can be very useful when you're migrating from one server to another, and you're not sure if all the content has been migrated yet.

    -

    -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -RewriteRule ^/(.*) http://old.example.com/$1 [P]
    -ProxyPassReverse / http://old.example.com/ -

    +
    RewriteCond "%{REQUEST_FILENAME}"       !-f
    +RewriteCond "%{REQUEST_FILENAME}"       !-d
    +RewriteRule "^/(.*)" "http://old.example.com/$1" [P]
    +ProxyPassReverse "/" "http://old.example.com/"
    +
    Discussion:
    @@ -79,15 +83,37 @@ ProxyPassReverse / http://old.example.com/ that any redirects issued by the backend are correctly passed on to the client.

    -

    Consider using either ProxyPass or ProxyPassMatch whenever possible in +

    Consider using either ProxyPass or ProxyPassMatch whenever possible in preference to mod_rewrite.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/proxy.html.fr b/docs/manual/rewrite/proxy.html.fr new file mode 100644 index 00000000000..d055a021a6b --- /dev/null +++ b/docs/manual/rewrite/proxy.html.fr @@ -0,0 +1,124 @@ + + + + + +Utilisation de mod_rewrite comme mandataire - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Utilisation de mod_rewrite comme mandataire

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment de la documentation de rfrence du module +mod_rewrite. Il dcrit comment utiliser le drapeau [P] +de la directive RewriteRule pour mandater un contenu vers un autre +serveur. Plusieurs recettes dcrivant des scnarios courants sont +fournies.

    + +
    + +
    top
    +
    +

    Mandater du contenu avec mod_rewrite

    + + + +
    +
    Description :
    + +
    +

    + mod_rewrite implmente le drapeau [P] qui permet de passer des URLs, + via mod_proxy, un autre serveur. Deux exemples sont fournis ici. + Dans le premier, une URL est passe directement un autre serveur, + et servie comme si c'tait une URL locale. Dans le deuxime, nous + mandatons un contenu manquant vers un serveur d'arrire-plan.

    +
    + +
    Solution :
    + +
    +

    Pour passer une URL un autre serveur, on utilise le drapeau + [P] comme suit :

    + +
    RewriteEngine  on
    +RewriteBase    "/produits/"
    +RewriteRule    "^widget/(.*)$"  "http://produits.example.com/widget/$1"  [P]
    +ProxyPassReverse "/produits/objet/" "http://produits.example.com/objet/"
    + + +

    Dans le deuxime exemple, nous ne mandatons la requte que si nous + ne trouvons pas la ressource localement. Ceci peut s'avrer trs + utile lorsque vous effectuez une migration d'un serveur vers un + autre, et que vous n'tes pas certain que tout le contenu a dj t + migr.

    + +
    RewriteCond "%{REQUEST_FILENAME}"       !-f
    +RewriteCond "%{REQUEST_FILENAME}"       !-d
    +RewriteRule "^/(.*)" "http://ancien.exemple.com/$1" [P]
    +ProxyPassReverse "/" "http://ancien.exemple.com/"
    + +
    + +
    Discussion :
    + +

    Dans les deux cas, on ajoute une directive ProxyPassReverse afin de s'assurer + que toute redirection en provenance du serveur d'arrire-plan est + renvoye correctement au client.

    + +

    Chaque fois que cela est possible, prfrez l'utilisation de la + directive ProxyPass ou + ProxyPassMatch + mod_rewrite.

    +
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/proxy.xml b/docs/manual/rewrite/proxy.xml index c7a8663e6ac..72e0af96857 100644 --- a/docs/manual/rewrite/proxy.xml +++ b/docs/manual/rewrite/proxy.xml @@ -65,24 +65,24 @@ A number of recipes are provided that describe common scenarios.

    To simply map a URL to another server, we use the [P] flag, as follows:

    - -RewriteEngine on
    -RewriteBase /products/
    -RewriteRule ^widget/(.*)$ http://product.example.com/widget/$1 [P]
    -ProxyPassReverse /products/widget/ http://product.example.com/widget/ -
    + +RewriteEngine on +RewriteBase "/products/" +RewriteRule "^widget/(.*)$" "http://product.example.com/widget/$1" [P] +ProxyPassReverse "/products/widget/" "http://product.example.com/widget/" +

    In the second example, we proxy the request only if we can't find the resource locally. This can be very useful when you're migrating from one server to another, and you're not sure if all the content has been migrated yet.

    - -RewriteCond %{REQUEST_FILENAME} !-f
    -RewriteCond %{REQUEST_FILENAME} !-d
    -RewriteRule ^/(.*) http://old.example.com/$1 [P]
    -ProxyPassReverse / http://old.example.com/ -
    + +RewriteCond "%{REQUEST_FILENAME}" !-f +RewriteCond "%{REQUEST_FILENAME}" !-d +RewriteRule "^/(.*)" "http://old.example.com/$1" [P] +ProxyPassReverse "/" "http://old.example.com/" +
    Discussion:
    @@ -94,7 +94,7 @@ ProxyPassReverse / http://old.example.com/

    Consider using either ProxyPass or ProxyPassMatch whenever possible in + module="mod_proxy">ProxyPassMatch whenever possible in preference to mod_rewrite.

    diff --git a/docs/manual/rewrite/proxy.xml.fr b/docs/manual/rewrite/proxy.xml.fr new file mode 100644 index 00000000000..321e88a4c4b --- /dev/null +++ b/docs/manual/rewrite/proxy.xml.fr @@ -0,0 +1,110 @@ + + + + + + + + + + + Rewrite + +Utilisation de mod_rewrite comme mandataire + + + +

    Ce document est un complément de la documentation de référence du module +mod_rewrite. Il décrit comment utiliser le drapeau [P] +de la directive RewriteRule pour mandater un contenu vers un autre +serveur. Plusieurs recettes décrivant des scénarios courants sont +fournies.

    + +
    +Documentation du module +Introduction à mod_rewrite +Redirection et remise en +correspondance +Contrôle d'accès +Serveurs virtuels + +Utilisation de RewriteMap +Techniques avancées +Quand ne pas utiliser mod_rewrite + +
    + + Mandater du contenu avec mod_rewrite + +
    +
    Description :
    + +
    +

    + mod_rewrite implémente le drapeau [P] qui permet de passer des URLs, + via mod_proxy, à un autre serveur. Deux exemples sont fournis ici. + Dans le premier, une URL est passée directement à un autre serveur, + et servie comme si c'était une URL locale. Dans le deuxième, nous + mandatons un contenu manquant vers un serveur d'arrière-plan.

    +
    + +
    Solution :
    + +
    +

    Pour passer une URL à un autre serveur, on utilise le drapeau + [P] comme suit :

    + + +RewriteEngine on +RewriteBase "/produits/" +RewriteRule "^widget/(.*)$" "http://produits.example.com/widget/$1" [P] +ProxyPassReverse "/produits/objet/" "http://produits.example.com/objet/" + + +

    Dans le deuxième exemple, nous ne mandatons la requête que si nous + ne trouvons pas la ressource localement. Ceci peut s'avérer très + utile lorsque vous effectuez une migration d'un serveur vers un + autre, et que vous n'êtes pas certain que tout le contenu a déjà été + migré.

    + + +RewriteCond "%{REQUEST_FILENAME}" !-f +RewriteCond "%{REQUEST_FILENAME}" !-d +RewriteRule "^/(.*)" "http://ancien.exemple.com/$1" [P] +ProxyPassReverse "/" "http://ancien.exemple.com/" + +
    + +
    Discussion :
    + +

    Dans les deux cas, on ajoute une directive ProxyPassReverse afin de s'assurer + que toute redirection en provenance du serveur d'arrière-plan est + renvoyée correctement au client.

    + +

    Chaque fois que cela est possible, préférez l'utilisation de la + directive ProxyPass ou + ProxyPassMatch à + mod_rewrite.

    +
    +
    + +
    + +
    diff --git a/docs/manual/rewrite/proxy.xml.meta b/docs/manual/rewrite/proxy.xml.meta index 554a80c0966..07ad4e7e07a 100644 --- a/docs/manual/rewrite/proxy.xml.meta +++ b/docs/manual/rewrite/proxy.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/remapping.html b/docs/manual/rewrite/remapping.html index 5f04461b09a..9cc6b3bad0a 100644 --- a/docs/manual/rewrite/remapping.html +++ b/docs/manual/rewrite/remapping.html @@ -3,3 +3,7 @@ URI: remapping.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: remapping.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en index ab555fecf12..6900cd913b8 100644 --- a/docs/manual/rewrite/remapping.html.en +++ b/docs/manual/rewrite/remapping.html.en @@ -1,24 +1,30 @@ - -Redirecting and Remapping with mod_rewrite - Apache HTTP Server +Redirecting and Remapping with mod_rewrite - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    From Old to New (internal)

    @@ -71,10 +78,9 @@ configuration.

    We rewrite the old URL to the new one internally via the following rule:

    -

    -RewriteEngine on
    -RewriteRule ^/old\.html$ /new.html [PT] -

    +
    RewriteEngine  on
    +RewriteRule    "^/foo\.html$"  "/bar.html" [PT]
    + @@ -102,10 +108,9 @@ RewriteRule ^/old\.html$ /new.html [PT]

    We force a HTTP redirect to the new URL which leads to a change of the browsers and thus the users view:

    -

    -RewriteEngine on
    -RewriteRule ^/foo\.html$ bar.html [R] -

    +
    RewriteEngine  on
    +RewriteRule    "^/foo\.html$"  "bar.html"  [R]
    +
    Discussion
    @@ -115,9 +120,8 @@ RewriteRule ^/foo\.html$ bar.html [ -

    - Redirect /foo.html /bar.html -

    +
    Redirect "/foo.html" "/bar.html"
    + @@ -144,18 +148,18 @@ RewriteRule ^/foo\.html$ bar.html [ -

    With mod_rewrite

    -RewriteEngine on
    -RewriteRule ^/docs/(.+) http://new.example.com/docs/$1 [R,L] -

    +
    #With mod_rewrite
    +RewriteEngine on
    +RewriteRule   "^/docs/(.+)"  "http://new.example.com/docs/$1"  [R,L]
    -

    With RedirectMatch

    -RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1 -

    -

    With Redirect

    -Redirect /docs/ http://new.example.com/docs/ -

    +
    #With RedirectMatch
    +RedirectMatch "^/docs/(.*)" "http://new.example.com/docs/$1"
    + + +
    #With Redirect
    +Redirect "/docs/" "http://new.example.com/docs/"
    + @@ -185,11 +189,10 @@ Redirect /docs/ http://new.example.com/docs/ internally leads to the invocation of /~quux/foo.cgi.

    -

    -RewriteEngine on
    -RewriteBase /~quux/
    -RewriteRule ^foo\.html$ foo.cgi [H=cgi-script] -

    +
    RewriteEngine  on
    +RewriteBase    "/~quux/"
    +RewriteRule    "^foo\.html$"  "foo.cgi"  [H=cgi-script]
    + @@ -216,21 +219,18 @@ RewriteRule ^foo\.html$ foo.cgi [H= -

    -# backward compatibility ruleset for
    -# rewriting document.html to document.php
    -# when and only when document.php exists
    -<Directory /var/www/htdocs>
    - -RewriteEngine on
    -RewriteBase /var/www/htdocs
    -
    -RewriteCond $1.php -f
    -RewriteCond $1.html !-f
    -RewriteRule ^(.*).html$ $1.php
    -
    -</Directory> -

    +
    #   backward compatibility ruleset for
    +#   rewriting document.html to document.php
    +#   when and only when document.php exists
    +<Directory "/var/www/htdocs">
    +    RewriteEngine on
    +    RewriteBase "/var/www/htdocs"
    +
    +    RewriteCond "$1.php" -f
    +    RewriteCond "$1.html" !-f
    +    RewriteRule "^(.*).html$" "$1.php"
    +</Directory>
    +
    Discussion
    @@ -247,7 +247,7 @@ RewriteRule ^(.*).html$ $1.php

    This ruleset is designed to use in a per-directory context (In a <Directory> block or in a .htaccess file), so that the -f checks are looking at the correct directory path. - You may need to set a RewriteBase directive to specify the + You may need to set a RewriteBase directive to specify the directory base that you're working in.

    @@ -273,68 +273,55 @@ RewriteRule ^(.*).html$ $1.php

    The very best way to solve this doesn't involve mod_rewrite at all, -but rather uses the Redirect +but rather uses the Redirect directive placed in a virtual host for the non-canonical hostname(s).

    -

    -<VirtualHost *:80>
    - - ServerName undesired.example.com
    - ServerAlias example.com notthis.example.com
    -
    - Redirect / http://www.example.com/
    -
    -</VirtualHost>
    -
    -<VirtualHost *:80>
    - - ServerName www.example.com
    -
    +

    <VirtualHost *:80>
    +  ServerName undesired.example.com
    +  ServerAlias example.com notthis.example.com
    +
    +  Redirect "/" "http://www.example.com/"
     </VirtualHost>
    -

    + +<VirtualHost *:80> + ServerName www.example.com +</VirtualHost> +

    You can alternatively accomplish this using the <If> directive:

    -

    -<If "%{HTTP_HOST} != 'www.example.com'">
    - -Redirect / http://www.example.com/ - -</If> -

    +
    <If "%{HTTP_HOST} != 'www.example.com'">
    +	Redirect "/" "http://www.example.com/"
    +</If>
    +

    Or, for example, to redirect a portion of your site to HTTPS, you might do the following:

    -

    -<If "%{SERVER_PROTOCOL} != 'HTTPS'">
    - -Redirect /admin/ https://www.example.com/admin/ - -</If> -

    +
    <If "%{SERVER_PROTOCOL} != 'HTTPS'">
    +	Redirect "/admin/" "https://www.example.com/admin/"
    +</If>
    +

    If, for whatever reason, you still want to use mod_rewrite - if, for example, you need this to work with a larger set of RewriteRules - you might use one of the recipes below.

    For sites running on a port other than 80:

    -

    -RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteCond %{SERVER_PORT} !^80$
    -RewriteRule ^/?(.*) http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE] -

    +
    RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
    +RewriteCond "%{HTTP_HOST}"   "!^$"
    +RewriteCond "%{SERVER_PORT}" "!^80$"
    +RewriteRule "^/?(.*)         "http://www.example.com:%{SERVER_PORT}/$1" [L,R,NE]
    +

    And for a site running on port 80

    -

    -RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] -

    +
    RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
    +RewriteCond "%{HTTP_HOST}"   "!^$"
    +RewriteRule "^/?(.*)"        "http://www.example.com/$1" [L,R,NE]
    +

    If you wanted to do this generically for all domain names - that @@ -343,11 +330,10 @@ RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] example.com, you could use the following recipe:

    -

    -RewriteCond %{HTTP_HOST} !^www\. [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE] -

    +
    RewriteCond "%{HTTP_HOST}" "!^www\." [NC]
    +RewriteCond "%{HTTP_HOST}" "!^$"
    +RewriteRule "^/?(.*)"      "http://www.%{HTTP_HOST}/$1" [L,R,NE]
    +

    These rulesets will work either in your main server configuration file, or in a .htaccess file placed in the DocumentRoot of the server.

    @@ -377,23 +363,22 @@ RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE] resource, and, if not finding it in either place, will attempt to just serve it out of the location requested.

    -

    -RewriteEngine on
    -
    -# first try to find it in dir1/...
    -# ...and if found stop and be happy:
    -RewriteCond %{DOCUMENT_ROOT}/dir1/%{REQUEST_URI} -f
    -RewriteRule ^(.+) %{DOCUMENT_ROOT}/dir1/$1 [L]
    -
    -# second try to find it in dir2/...
    -# ...and if found stop and be happy:
    -RewriteCond %{DOCUMENT_ROOT}/dir2/%{REQUEST_URI} -f
    -RewriteRule ^(.+) %{DOCUMENT_ROOT}/dir2/$1 [L]
    -
    -# else go on for other Alias or ScriptAlias directives,
    -# etc.
    -RewriteRule ^ - [PT] -

    +
    RewriteEngine on
    +
    +#   first try to find it in dir1/...
    +#   ...and if found stop and be happy:
    +RewriteCond         "%{DOCUMENT_ROOT}/dir1/%{REQUEST_URI}"  -f
    +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir1/$1"  [L]
    +
    +#   second try to find it in dir2/...
    +#   ...and if found stop and be happy:
    +RewriteCond         "%{DOCUMENT_ROOT}/dir2/%{REQUEST_URI}"  -f
    +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir2/$1"  [L]
    +
    +#   else go on for other Alias or ScriptAlias directives,
    +#   etc.
    +RewriteRule   "^"  "-"  [PT]
    +
    @@ -421,13 +406,12 @@ RewriteRule ^ - [PT]

    We'll use a RewriteMap directive to build a list of servers that we wish to use.

    -

    -HostnameLookups on
    -RewriteEngine on
    -RewriteMap multiplex txt:/path/to/map.mirrors
    -RewriteCond %{REMOTE_HOST} ([a-z]+)$ [NC]
    -RewriteRule ^/(.*)$ ${multiplex:%1|http://www.example.com/}$1 [R,L] -

    +
    HostnameLookups on
    +RewriteEngine on
    +RewriteMap    multiplex         "txt:/path/to/map.mirrors"
    +RewriteCond   "%{REMOTE_HOST}"  "([a-z]+)$" [NC]
    +RewriteRule   "^/(.*)$"  "${multiplex:%1|http://www.example.com/}$1"  [R,L]
    +

    ## map.mirrors -- Multiplexing Map
    @@ -481,16 +465,15 @@ com http://www.example.com/
    All other browsers receive page foo.32.html. This is done with the following ruleset:

    -

    -RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.*
    -RewriteRule ^foo\.html$ foo.NS.html [L]
    -
    -RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]
    -RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12]
    -RewriteRule ^foo\.html$ foo.20.html [L]
    -
    -RewriteRule ^foo\.html$ foo.32.html [L] -

    +
    RewriteCond "%{HTTP_USER_AGENT}"  "^Mozilla/3.*"
    +RewriteRule "^foo\.html$"         "foo.NS.html"          [L]
    +
    +RewriteCond "%{HTTP_USER_AGENT}"  "^Lynx/" [OR]
    +RewriteCond "%{HTTP_USER_AGENT}"  "^Mozilla/[12]"
    +RewriteRule "^foo\.html$"         "foo.20.html"          [L]
    +
    +RewriteRule "^foo\.html$"         "foo.32.html"          [L]
    + @@ -521,9 +504,8 @@ RewriteRule ^foo\.html$ foo.32.html [L we replace /puppies and /canines by the canonical /dogs.

    -

    -RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] -

    +
    RewriteRule   "^/(puppies|canines)/(.*)"    "/dogs/$2"  [R]
    +
    Discussion:
    @@ -531,9 +513,8 @@ RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] This should really be accomplished with Redirect or RedirectMatch directives: -

    - RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2 -

    +
    RedirectMatch "^/(puppies|canines)/(.*)" "/dogs/$2"
    + @@ -562,16 +543,14 @@ using the following ruleset:

    /about/:

    -

    -RewriteEngine on
    -RewriteRule ^/$ /about/ [R] -

    +
    RewriteEngine on
    +RewriteRule   "^/$"  "/about/"  [R]
    +

    Note that this can also be handled using the RedirectMatch directive:

    -

    -RedirectMatch ^/$ http://example.com/about/ -

    +
    RedirectMatch "^/$" "http://example.com/about/"
    +

    Note also that the example rewrites only the root URL. That is, it rewrites a request for http://example.com/, but not a @@ -599,36 +578,29 @@ that should go to an existing resource such as an image, or a css file.

    As of version 2.2.16, you should use the FallbackResource directive for this:

    -

    -<Directory /var/www/my_blog>
    - - FallbackResource index.php
    -
    -</Directory> -

    +
    <Directory "/var/www/my_blog">
    +  FallbackResource "index.php"
    +</Directory>
    +

    However, in earlier versions of Apache, or if your needs are more complicated than this, you can use a variation of the following rewrite set to accomplish the same thing:

    -

    -<Directory /var/www/my_blog>
    - - RewriteBase /my_blog
    -
    - RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
    - RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
    - RewriteRule ^ index.php [PT]
    -
    -</Directory> -

    +
    <Directory "/var/www/my_blog">
    +  RewriteBase "/my_blog"
    +
    +  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-f
    +  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-d
    +  RewriteRule "^" "index.php" [PT]
    +</Directory>
    +

    If, on the other hand, you wish to pass the requested URI as a query string argument to index.php, you can replace that RewriteRule with:

    -

    - RewriteRule (.*) index.php?$1 [PT,QSA] -

    +
    RewriteRule "(.*)" "index.php?$1" [PT,QSA]
    +

    Note that these rulesets can be used in a .htaccess file, as well as in a <Directory> block.

    @@ -637,10 +609,89 @@ file, as well as in a <Directory> block.

    +
    top
    +
    +

    Rewrite query string

    + + +
    +
    Description:
    +
    You want to capture a particular value from a query string +and either replace it or incorporate it into another component +of the URL.
    + +
    Solutions:
    +
    +

    Many of the solutions in this section will all use the same condition, +which leaves the matched value in the %2 backreference. %1 is the beginining +of the query string (up to the key of intererest), and %3 is the remainder. This +condition is a bit complex for flexibility and to avoid double '&&' in the +substitutions.

    +
      +
    • This solution removes the matching key and value: + +
      # Remove mykey=???
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"
      +RewriteRule "(.*)" "$1?%1%3"
      + +
    • + +
    • This solution uses the captured value in the URL subsitution, + discarding the rest of the original query by appending a '?': + +
      # Copy from query string to PATH_INFO
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"
      +RewriteRule "(.*)" "$1/products/%2/?" [PT]
      + +
    • + +
    • This solution checks the captured value in a subsequent condition: + +
      # Capture the value of mykey in the query string
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"
      +RewriteCond "%2" !=not-so-secret-value 
      +RewriteRule "(.*)" - [F]
      + +
    • + +
    • This solution shows the reverse of the previous ones, copying + path components (perhaps PATH_INFO) from the URL into the query string. +
      # The desired URL might be /products/kitchen-sink, and the script expects 
      +# /path?products=kitchen-sink.
      +RewriteRule "^/?path/([^/]+)/([^/]+)" "/path?$1=$2" [PT]
      + +
    • +
    + +
    + +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/remapping.html.fr b/docs/manual/rewrite/remapping.html.fr new file mode 100644 index 00000000000..21c72d41ba6 --- /dev/null +++ b/docs/manual/rewrite/remapping.html.fr @@ -0,0 +1,717 @@ + + + + + +Redirection et remise en correspondance avec mod_rewrite - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Redirection et remise en correspondance avec mod_rewrite

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment la Documentation de rfrence de +mod_rewrite. Il montre comment utiliser +mod_rewrite pour rediriger et remettre en +correspondance une requte. Il contient de +nombreux exemples d'utilisation courante de mod_rewrite avec une +description dtaille de leur fonctionnement.

    + +
    Vous devez vous attacher comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre systme si vous vous contentez de les +copier/coller dans vos fichiers de configuration.
    + +
    + +
    top
    +
    +

    De l'ancienne la nouvelle URL (en interne)

    + + + +
    +
    Description :
    + +
    +

    Supposons que nous ayons rcemment renomm la page + foo.html en bar.html, et voulions + maintenant que l'ancienne URL soit toujours valide des fins + de compatibilit ascendante. En fait, on voudrait que le + changement de nom soit transparent aux utilisateurs de + l'ancienne URL.

    +
    + +
    Solution :
    + +
    +

    On rcrit l'ancienne URL en interne vers la nouvelle via + la rgle suivante :

    + +
    RewriteEngine  on
    +RewriteRule    "^/foo\.html$" "/bar.html" [PT]
    + +
    +
    + +
    top
    +
    +

    De l'ancien au nouveau (en externe)

    + + + +
    +
    Description :
    + +
    +

    Supposons toujours que nous ayons rcemment renomm la page + foo.html en bar.html, et voulions + maintenant que l'ancienne URL soit toujours valide des fins + de compatibilit ascendante. En revanche, nous voulons cette + fois que la nouvelle URL soit suggre aux utilisateurs de + l'ancienne URL, c'est dire que l'adresse vue depuis leur + navigateur doit galement tre modifie.

    +
    + +
    Solution :
    + +
    +

    On force une redirection HTTP vers la nouvelle URL, ce qui + entrane une modification de celle du navigateur et aussi de ce + que voit l'utilisateur :

    + +
    RewriteEngine  on
    +RewriteRule    "^foo\.html$"  "bar.html"  [R]
    + +
    + +
    Discussion
    + +
    +

    Dans l'exemple interne, on a utilis mod_rewrite afin + de dissimuler la redirection au client. Dans cet exemple, en + revanche, on aurait pu se contenter d'une directive Redirect :

    + +
    Redirect "/foo.html" "/bar.html"
    + + +
    +
    + +
    top
    +
    +

    Ressource dplace vers un autre serveur

    + + + +
    +
    Description :
    + +
    +

    Si une ressource a t dplace vers un autre serveur, vous + pouvez faire en sorte que les URLs de l'ancien serveur continuent + de fonctionner pendant un certain temps, afin de laisser au + utilisateurs le temps de modifier leurs favoris.

    +
    + +
    Solution :
    + +
    +

    Vous pouvez utiliser mod_rewrite pour + rediriger ces URLs vers le nouveau serveur, mais vous pouvez aussi + utiliser les directives Redirect ou RedirectMatch.

    + +
    #Avec mod_rewrite
    +RewriteEngine on
    +RewriteRule   "^/docs/(.+)"  "http://nouveau.example.com/docs/$1"  [R,L]
    + + +
    #Avec RedirectMatch
    +RedirectMatch "^/docs/(.*)" "http://nouveau.example.com/docs/$1"
    + + +
    #Avec Redirect
    +Redirect "/docs/" "http://nouveau.example.com/docs/"
    + +
    +
    + +
    top
    +
    +

    De statique dynamique

    + + + +
    +
    Description :
    + +
    +

    Comment transformer une page statique foo.html + en sa variante dynamique foo.cgi de manire + transparente, c'est dire sans en avertir le + navigateur/utilisateur.

    +
    + +
    Solution :
    + +
    +

    On rcrit simplement l'URL en script CGI et force le + gestionnaire de contenu cgi-script de faon + ce que le script s'excute en tant que programme CGI. + Ainsi, une requte vers /~quux/foo.html conduit + en interne l'invocation de + /~quux/foo.cgi.

    + +
    RewriteEngine  on
    +RewriteBase    "/~quux/"
    +RewriteRule    "^foo\.html$"  "foo.cgi"  [H=cgi-script]
    + +
    +
    + +
    top
    +
    +

    Compatibilit ascendante dans le cadre d'une modification + d'extension de nom de fichier

    + + + +
    +
    Description :
    + +
    +

    Comment confrer une compatibilit ascendante aux URLs + (existant encore virtuellement) aprs avoir migr + document.YYYY vers document.XXXX, + c'est dire aprs avoir par exemple traduit un lot de + fichiers .html en fichiers .php + ?

    +
    + +
    Solution :
    + +
    +

    On rcrit simplement le nom du fichier en son nom + de base et vrifie s'il existe aussi avec la nouvelle + extension. Si c'est le cas, on utilise ce nom, sinon on + rcrit l'URL sous sa forme originale.

    + + +
    #   jeu de rgles assurant une compatibilit ascendante en rcrivant
    +# document.html en document.php si et seulement si document.php
    +# existe +<Directory "/var/www/htdocs"> + RewriteEngine on + RewriteBase "/var/www/htdocs" + + RewriteCond "$1.php" -f + RewriteCond "$1.html" !-f + RewriteRule "^(.*).html$" "$1.php" +</Directory>
    + +
    + +
    Discussion
    +
    +

    Cet exemple utilise une fonctionnalit souvent mconnue de + mod_rewrite, en tirant avantage de l'ordre d'excution du jeu de + rgles. En particulier, mod_rewrite value la partie gauche des + rgles de rcriture avant d'valuer les directives RewriteCond. En + consquence, $1 est dj dfini au moment o les directives + RewriteCond sont values. Ceci nous permet de tester l'existence du + fichier original (document.html) et du fichier cible + (document.php) en utilisant le mme nom de base.

    + +

    Ce jeu de rgles est conu pour une utilisation dans un contexte + de rpertoire (au sein d'une section <Directory> ou d'un + fichier .htaccess), de faon ce que les vrifications + -f effectuent leurs recherches dans le bon rpertoire. + Vous serez peut-tre amen dfinir une directive RewriteBase pour spcifier le + rpertoire de base partir duquel vous travaillez.

    +
    +
    + +
    top
    +
    +

    Noms d'htes canoniques

    + + + +
    +
    Description :
    + +
    Le but de cette rgle est de prfrer l'utilisation d'un nom + d'hte particulier d'autres noms d'hte utilisables + pour atteindre le mme site. Par exemple, si vous voulez + utiliser www.example.com la place de + example.com, vous pouvez utiliser une solution + du style :
    + +
    Solution :
    + +
    + +

    Pour y parvenir, il vaut mieux se passer de mod_rewrite, et utiliser +plutt la directive Redirect dans +une section de serveur virtuel pour le/les noms d'hte non canoniques.

    + +
    <VirtualHost *:80>
    +  ServerName undesired.example.com
    +  ServerAlias example.com notthis.example.com
    +
    +  Redirect "/" "http://www.example.com/"
    +</VirtualHost>
    +
    +<VirtualHost *:80>
    +  ServerName www.example.com
    +</VirtualHost>
    + + +

    Vous pouvez aussi utiliser la directive <If> :

    + +
    <If "%{HTTP_HOST} != 'www.example.com'">
    +	Redirect "/" "http://www.example.com/"
    +</If>
    + + +

    Ou, par exemple, pour rediriger une portion de votre site vers HTTPS +:

    + +
    <If "%{SERVER_PROTOCOL} != 'HTTPS'">
    +	Redirect "/admin/" "https://www.example.com/admin/"
    +</If>
    + + +

    Si, pour une raison particulire, vous voulez tout de mme utiliser +mod_rewrite - dans le cas, par exemple, o vous avez besoin +d'un jeu plus important de rgles de rcritures - vous pouvez utiliser +la recette suivante :

    + +

    Pour les sites coutant sur un port autre que 80:

    +
    RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
    +RewriteCond "%{HTTP_HOST}"   "!^$"
    +RewriteCond "%{SERVER_PORT}" "!^80$"
    +RewriteRule "^/?(.*)"         "http://www.example.com:%{SERVER_PORT}/$1" [L,R,NE]
    + + +

    Et pour un site coutant sur le port 80

    +
    RewriteCond "%{HTTP_HOST}"   "!^www\.example\.com" [NC]
    +RewriteCond "%{HTTP_HOST}"   "!^$"
    +RewriteRule "^/?(.*)"         "http://www.example.com/$1" [L,R,NE]
    + +

    + Si vous souhaitez que cette rgle s'applique tous les noms de + domaine - en d'autres termes, si vous voulez rediriger + example.com vers + www.example.com pour toutes les valeurs + possibles de example.com, vous pouvez utiliser + le jeu de rgles suivants :

    + +
    RewriteCond "%{HTTP_HOST}" "!^www\." [NC]
    +RewriteCond "%{HTTP_HOST}" "!^$"
    +RewriteRule "^/?(.*)" "http://www.%{HTTP_HOST}/$1" [L,R,NE]
    + +

    + Vous pouvez utiliser ce jeu de rgles aussi bien dans le fichier + de configuration de votre serveur principal que dans un fichier + .htaccess plac dans le rpertoire dfini par la + directive DocumentRoot du serveur.

    +
    +
    + +
    top
    +
    +

    Recherche de pages dans plus d'un rpertoire

    + + + +
    +
    Description:
    + +
    +

    Une ressource peut exister dans plusieurs rpertoires, et nous + voulons rechercher cette ressource dans ces rpertoires + lorsqu'elle fait l'objet d'une requte. Il est possible que nous + ayons rcemment rorganis la structure de notre site en + rpartissant son contenu dans plusieurs rpertoires.

    +
    + +
    Solution :
    + +
    +

    Le jeu de rgles suivant recherche la ressource dans deux + rpertoires, et s'il ne la trouve dans aucun des deux, il tentera + simplement de la servir partir de l'adresse fournie dans la + requte.

    + +
    RewriteEngine on
    +
    +#   on cherche tout d'abord dans dir1/...
    +#   ... et si on trouve, on est content et on arrte :
    +RewriteCond         "%{DOCUMENT_ROOT}/dir1/%{REQUEST_URI}"  -f
    +RewriteRule  "^(.+)"  "%{DOCUMENT_ROOT}/dir1/$1"  [L]
    +
    +#   on cherche ensuite dans dir2/...
    +#   ... et si on trouve, on est content et on arrte :
    +RewriteCond         "%{DOCUMENT_ROOT}/dir2/%{REQUEST_URI}"  -f
    +RewriteRule  "^(.+)"  "%{DOCUMENT_ROOT}/dir2/$1"  [L]
    +
    +#   sinon, on continue la recherche avec d'autres directives Alias
    +#   ou ScriptAlias, etc...
    +RewriteRule   "^"  "-"  [PT]
    + +
    +
    + +
    top
    +
    +

    Redirection vers des serveurs gographiquement distribus

    + + + +
    +
    Description :
    + +
    +

    Notre site web possde de nombreux miroirs, et nous voulons + rediriger les utilisateurs vers celui qui se situe dans le pays o + ils se trouvent.

    +
    + +
    Solution :
    + +
    +

    En consultant le nom d'hte du client demandeur, on dtermine le + pays dans lequel il se trouve. S'il est impossible d'effectuer une + recherche sur leur adresse IP, on se rabat sur un serveur par + dfaut.

    +

    Nous allons utiliser une directive RewriteMap afin de construire une + liste des serveurs que nous voulons utiliser.

    + +
    HostnameLookups on
    +RewriteEngine on
    +RewriteMap    multiplex         "txt:/path/to/map.mirrors"
    +RewriteCond  "%{REMOTE_HOST}"     "([a-z]+)$ [NC]"
    +RewriteRule   "^/(.*)$"  "${multiplex:%1|http://www.example.com/}$1"  [R,L]
    + + +

    +## liste_miroirs -- Table de correspondance pays - serveurs
    +
    +de http://www.exemple.de/
    +uk http://www.exemple.uk/
    +com http://www.example.com/
    +##EOF## +

    +
    + +
    Discussion
    +
    +
    Ce jeu de rgles ncessite la dfinition + on de la directive HostNameLookups, ce qui peut induire une + baisse de performance significative.
    + +

    La directive RewriteCond extrait la dernire + partie du nom d'hte du client demandeur - le code du pays - et la + rgle de rcriture qui suit utilise cette valeur pour rechercher le + serveur miroir appropri dans le fichier de correspondances.

    +
    +
    + +
    top
    +
    +

    Contenu dpendant du navigateur

    + + + +
    +
    Description :
    + +
    +

    Nous voulons fournir des contenus diffrents en fonction du + navigateur (user-agent) qui effectue la requte.

    +
    + +
    Solution :
    + +
    +

    Nous devons dterminer quel contenu servir, en nous basant + sur l'en-tte HTTP "User-Agent". La + configuration suivante effectue ceci : si l'en-tte HTTP + "User-Agent" commence par "Mozilla/3", le nom de la page + foo.html est rcrit en foo.NS.html + et la rcriture s'arrte. Si le navigateur est "Lynx" ou + "Mozilla" version 1 ou 2, l'URL devient + foo.20.html. Tous les autres navigateurs + reoivent la page foo.32.html. Tout ceci est + effectu par le jeu de rgles suivant :

    +
    RewriteCond "%{HTTP_USER_AGENT}"  "^Mozilla/3.*"
    +RewriteRule "^foo\.html$"         "foo.NS.html"          [L]
    +
    +RewriteCond "%{HTTP_USER_AGENT}"  "^Lynx/" [OR]
    +RewriteCond "%{HTTP_USER_AGENT}"  "^Mozilla/[12]"
    +RewriteRule "^foo\.html$"         "foo.20.html"          [L]
    +
    +RewriteRule "^foo\.html$"         "foo.32.html"          [L]
    + +
    +
    + +
    top
    +
    +

    URLs canoniques

    + + + +
    +
    Description :
    + +
    +

    Sur certains serveurs, une ressource peut possder plusieurs + URLs. Il y a en gnral les URLs canoniques (celles qui sont + rellement distribues et utilises), et celles qui correspondent + des raccourcis, les URLs internes, etc... Quelle que soit l'adresse + que l'utilisateur fournit dans la requte, il devrait finalement + voir l'URL canonique dans la barre d'adresse de son navigateur.

    +
    + +
    Solution :
    + +
    +

    Nous effectuons une redirection HTTP externe pour toutes les + URLs non canoniques afin de les corriger dans la barre d'adresse + du navigateur, et ceci pour toutes les requtes futures. Dans le + jeu de rgles suivant, nous remplaons /matous et + /minettes par le canonique /chats.

    + +
    RewriteRule   "^/(matous|minettes)/(.*)"    "/chats/$2"  [R]
    + +
    + +
    Discussion :
    +
    On serait mieux inspir d'utiliser ici les directives Redirect ou + RedirectMatch : + +
    RedirectMatch "^/(matous|minettes)/(.*)" "/chats/$2"
    + +
    +
    + +
    top
    +
    +

    Dplacement du rpertoire DocumentRoot

    + + + +
    +
    Description :
    + +
    +

    En gnral, le rpertoire DocumentRoot du serveur web correspond l'URL +"/". Ce rpertoire ne contient cependant pas forcment des +ressources de premire importance pour l'utilisateur. Par exemple, vous +prfrerez peut-tre que le rpertoire d'accueil d'un visiteur accdant +pour la premire fois votre site soit un rpertoire particulier +/a-propos-de/. Pour y parvenir, utilisez le jeu de rgles +suivant :

    +
    + +
    Solution :
    + +
    +

    On redirige l'URL / vers + /a-propos-de/ : +

    + +
    RewriteEngine on
    +RewriteRule   "^/$"  "/a-propos-de/"  [R]
    + + +

    Notez que l'on peut aussi y parvenir en utilisant la directive +RedirectMatch :

    + +
    RedirectMatch "^/$" "http://example.com/a-propos-de/"
    + + +

    Notez aussi que cet exemple ne rcrit que l'URL racine. En d'autres +termes, il rcrit une requte pour http://example.com/, +mais pas pour une requte http://example.com/page.html. Si +vous avez effectivement modifi la racine de vos documents - c'est dire +si tous vos contenus se trouvent dans un +sous-rpertoire, il est largement prfrable de modifier simplement +votre directive DocumentRoot, ou de +dplacer l'ensemble du contenu vers le rpertoire suprieur, plutt que +de rcrire les URLs.

    +
    +
    + +
    top
    +
    +

    Ressource par dfaut

    + + +
    +
    Description :
    +
    Vous voulez qu'une seule ressource (disons un certain fichier tel +que index.php) soit servie pour toutes les requtes destination d'un +certain rpertoire, sauf pour celles qui concernent une ressource +existant effectivement comme une image, ou un fichier css.
    + +
    Solution :
    +
    +

    Depuis la version 2.2.16, vous pouvez y parvenir via la directive +FallbackResource :

    + +
    <Directory "/var/www/my_blog">
    +  FallbackResource "index.php"
    +</Directory>
    + + +

    Cependant, si vos besoins taient plus complexes, vous pouviez, dans +les versions plus anciennes d'Apache, utiliser un jeu de rgles du style +:

    + +
    <Directory "/var/www/my_blog">
    +  RewriteBase "/my_blog"
    +
    +  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-f
    +  RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-d
    +  RewriteRule "^" "index.php" [PT]
    +</Directory>
    + + +

    D'autre part, si vous voulez transmettre l'URI de la requte en tant +que chane de paramtres index.php, vous pouvez remplacer cette rgle +de rcriture par :

    + +
    RewriteRule "(.*)" "index.php?$1" [PT,QSA]
    + + +

    Notez que l'on peut utiliser ces jeux de rgles aussi bien dans un +fichier .htaccess que dans une section +<Directory>.

    + +
    + +
    + +
    top
    +
    +

    Rewrite query string

    + + +
    +
    Description :
    +
    Vous voulez extraire une valeur particulire d'une chane de +paramtres d'une URL, et soit la remplacer, soit l'incorporer dans un +autre composant de l'URL.
    + +
    Solutions :
    +
    +

    Dans la plupart des solutions de cette section, on utilise la mme +condition qui stocke la valeur recherche dans la rfrence arrire %2. +%1 est le dbut de la requte, et %3 ce qui reste. Cette condition est +un peu complexe car elle introduit de la flexibilit et vite les +doubles perluettes '&&' dans les substitutions.

    +
      +
    • Cette solution supprime le couple cl/valeur recherch : + +
      # Remove mykey=???
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"
      +RewriteRule "(.*)" "$1?%1%3"
      + +
    • + +
    • Cette solution remplace la partie de l'URL qui suit la valeur + recherche par un '?' : + +
      # Copy from query string to PATH_INFO
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"
      +RewriteRule "(.*)" "$1/products/%2/?" [PT]
      + +
    • + +
    • Cette solution utilise la valeur recherche dans une deuxime + condition :: + +
      # Capture the value of mykey in the query string
      +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$""
      +RewriteCond "%2" !=not-so-secret-value 
      +RewriteRule "(.*)" - [F]
      + +
    • + +
    • Cette solution produit l'effet inverse des prcdentes ; elle + copie des composantes du chemin (peut-tre PATH_INFO) depuis l'URL + vers sa chane de paramtres : +
      # The desired URL might be /products/kitchen-sink, and the script expects 
      +# /path?products=kitchen-sink.
      +RewriteRule "^/?path/([^/]+)/([^/]+)" "/path?$1=$2" [PT]
      + +
    • +
    + +
    + +
    +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/remapping.xml b/docs/manual/rewrite/remapping.xml index 974fb1030e4..a5f9a574ff5 100644 --- a/docs/manual/rewrite/remapping.xml +++ b/docs/manual/rewrite/remapping.xml @@ -71,10 +71,10 @@ configuration.

    We rewrite the old URL to the new one internally via the following rule:

    - -RewriteEngine on
    -RewriteRule ^/old\.html$ /new.html [PT] -
    + +RewriteEngine on +RewriteRule "^/foo\.html$" "/bar.html" [PT] + @@ -102,10 +102,10 @@ RewriteRule ^/old\.html$ /new.html [PT]

    We force a HTTP redirect to the new URL which leads to a change of the browsers and thus the users view:

    - -RewriteEngine on
    -RewriteRule ^/foo\.html$ bar.html [R] -
    + +RewriteEngine on +RewriteRule "^/foo\.html$" "bar.html" [R] +
    Discussion
    @@ -116,9 +116,9 @@ RewriteRule ^/foo\.html$ bar.html [ - - Redirect /foo.html /bar.html - + +Redirect "/foo.html" "/bar.html" + @@ -145,18 +145,21 @@ RewriteRule ^/foo\.html$ bar.html [ -With mod_rewrite -RewriteEngine on
    -RewriteRule ^/docs/(.+) http://new.example.com/docs/$1 [R,L] -
    - -With RedirectMatch -RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1 - - -With Redirect -Redirect /docs/ http://new.example.com/docs/ - + +#With mod_rewrite +RewriteEngine on +RewriteRule "^/docs/(.+)" "http://new.example.com/docs/$1" [R,L] + + + +#With RedirectMatch +RedirectMatch "^/docs/(.*)" "http://new.example.com/docs/$1" + + + +#With Redirect +Redirect "/docs/" "http://new.example.com/docs/" + @@ -186,11 +189,11 @@ Redirect /docs/ http://new.example.com/docs/ internally leads to the invocation of /~quux/foo.cgi.

    - -RewriteEngine on
    -RewriteBase /~quux/
    -RewriteRule ^foo\.html$ foo.cgi [H=cgi-script] -
    + +RewriteEngine on +RewriteBase "/~quux/" +RewriteRule "^foo\.html$" "foo.cgi"   [H=cgi-script] + @@ -217,21 +220,19 @@ RewriteRule ^foo\.html$ foo.cgi [H= - -# backward compatibility ruleset for
    -# rewriting document.html to document.php
    -# when and only when document.php exists
    -<Directory /var/www/htdocs>
    - -RewriteEngine on
    -RewriteBase /var/www/htdocs
    -
    -RewriteCond $1.php -f
    -RewriteCond $1.html !-f
    -RewriteRule ^(.*).html$ $1.php
    -
    + +# backward compatibility ruleset for +# rewriting document.html to document.php +# when and only when document.php exists +<Directory "/var/www/htdocs"> + RewriteEngine on + RewriteBase "/var/www/htdocs" + + RewriteCond "$1.php" -f + RewriteCond "$1.html" !-f + RewriteRule "^(.*).html$" "$1.php" </Directory> -
    +
    Discussion
    @@ -249,7 +250,7 @@ RewriteRule ^(.*).html$ $1.php
    <Directory> block or in a .htaccess file), so that the -f checks are looking at the correct directory path. You may need to set a RewriteBase directive to specify the + module="mod_rewrite">RewriteBase directive to specify the directory base that you're working in.

    @@ -275,68 +276,60 @@ RewriteRule ^(.*).html$ $1.php

    The very best way to solve this doesn't involve mod_rewrite at all, -but rather uses the Redirect +but rather uses the Redirect directive placed in a virtual host for the non-canonical hostname(s).

    - -<VirtualHost *:80>
    - - ServerName undesired.example.com
    - ServerAlias example.com notthis.example.com
    -
    - Redirect / http://www.example.com/
    -
    -</VirtualHost>
    -
    -<VirtualHost *:80>
    - - ServerName www.example.com
    -
    + +<VirtualHost *:80> + ServerName undesired.example.com + ServerAlias example.com notthis.example.com + + Redirect "/" "http://www.example.com/" </VirtualHost> -
    + +<VirtualHost *:80> + ServerName www.example.com +</VirtualHost> +

    You can alternatively accomplish this using the If directive:

    - -<If "%{HTTP_HOST} != 'www.example.com'">
    - -Redirect / http://www.example.com/ - + +<If "%{HTTP_HOST} != 'www.example.com'"> + Redirect "/" "http://www.example.com/" </If> -
    +

    Or, for example, to redirect a portion of your site to HTTPS, you might do the following:

    - -<If "%{SERVER_PROTOCOL} != 'HTTPS'">
    - -Redirect /admin/ https://www.example.com/admin/ - + +<If "%{SERVER_PROTOCOL} != 'HTTPS'"> + Redirect "/admin/" "https://www.example.com/admin/" </If> -
    +

    If, for whatever reason, you still want to use mod_rewrite - if, for example, you need this to work with a larger set of RewriteRules - you might use one of the recipes below.

    For sites running on a port other than 80:

    - -RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteCond %{SERVER_PORT} !^80$
    -RewriteRule ^/?(.*) http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE] -
    + +RewriteCond "%{HTTP_HOST}" "!^www\.example\.com" [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteCond "%{SERVER_PORT}" "!^80$" +RewriteRule "^/?(.*) "http://www.example.com:%{SERVER_PORT}/$1" [L,R,NE] +

    And for a site running on port 80

    - -RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] -
    + +RewriteCond "%{HTTP_HOST}" "!^www\.example\.com" [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteRule "^/?(.*)" "http://www.example.com/$1" [L,R,NE] +

    If you wanted to do this generically for all domain names - that @@ -345,11 +338,11 @@ RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] example.com, you could use the following recipe:

    - -RewriteCond %{HTTP_HOST} !^www\. [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE] -
    + +RewriteCond "%{HTTP_HOST}" "!^www\." [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteRule "^/?(.*)" "http://www.%{HTTP_HOST}/$1" [L,R,NE] +

    These rulesets will work either in your main server configuration file, or in a .htaccess file placed in the - -RewriteEngine on
    -
    -# first try to find it in dir1/...
    -# ...and if found stop and be happy:
    -RewriteCond %{DOCUMENT_ROOT}/dir1/%{REQUEST_URI} -f
    -RewriteRule ^(.+) %{DOCUMENT_ROOT}/dir1/$1 [L]
    -
    -# second try to find it in dir2/...
    -# ...and if found stop and be happy:
    -RewriteCond %{DOCUMENT_ROOT}/dir2/%{REQUEST_URI} -f
    -RewriteRule ^(.+) %{DOCUMENT_ROOT}/dir2/$1 [L]
    -
    -# else go on for other Alias or ScriptAlias directives,
    -# etc.
    -RewriteRule ^ - [PT] -
    + +RewriteEngine on + +# first try to find it in dir1/... +# ...and if found stop and be happy: +RewriteCond "%{DOCUMENT_ROOT}/dir1/%{REQUEST_URI}" -f +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir1/$1" [L] + +# second try to find it in dir2/... +# ...and if found stop and be happy: +RewriteCond "%{DOCUMENT_ROOT}/dir2/%{REQUEST_URI}" -f +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir2/$1" [L] + +# else go on for other Alias or ScriptAlias directives, +# etc. +RewriteRule "^" "-" [PT] +

    @@ -424,13 +417,13 @@ RewriteRule ^ - [PT]

    We'll use a RewriteMap directive to build a list of servers that we wish to use.

    - -HostnameLookups on
    -RewriteEngine on
    -RewriteMap multiplex txt:/path/to/map.mirrors
    -RewriteCond %{REMOTE_HOST} ([a-z]+)$ [NC]
    -RewriteRule ^/(.*)$ ${multiplex:%1|http://www.example.com/}$1 [R,L] -
    + +HostnameLookups on +RewriteEngine on +RewriteMap multiplex "txt:/path/to/map.mirrors" +RewriteCond "%{REMOTE_HOST}" "([a-z]+)$" [NC] +RewriteRule "^/(.*)$" "${multiplex:%1|http://www.example.com/}$1" [R,L] + ## map.mirrors -- Multiplexing Map
    @@ -484,16 +477,16 @@ com http://www.example.com/
    All other browsers receive page foo.32.html. This is done with the following ruleset:

    - -RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.*
    -RewriteRule ^foo\.html$ foo.NS.html [L]
    -
    -RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR]
    -RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12]
    -RewriteRule ^foo\.html$ foo.20.html [L]
    -
    -RewriteRule ^foo\.html$ foo.32.html [L] -
    + +RewriteCond "%{HTTP_USER_AGENT}" "^Mozilla/3.*" +RewriteRule "^foo\.html$" "foo.NS.html" [L] + +RewriteCond "%{HTTP_USER_AGENT}" "^Lynx/" [OR] +RewriteCond "%{HTTP_USER_AGENT}" "^Mozilla/[12]" +RewriteRule "^foo\.html$" "foo.20.html" [L] + +RewriteRule "^foo\.html$" "foo.32.html" [L] + @@ -524,9 +517,9 @@ RewriteRule ^foo\.html$ foo.32.html [L we replace /puppies and /canines by the canonical /dogs.

    - -RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] - + +RewriteRule "^/(puppies|canines)/(.*)" "/dogs/$2" [R] +
    Discussion:
    @@ -534,9 +527,9 @@ RewriteRule ^/(puppies|canines)/(.*) /dogs/$2 [R] This should really be accomplished with Redirect or RedirectMatch directives: - - RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2 - + +RedirectMatch "^/(puppies|canines)/(.*)" "/dogs/$2" + @@ -565,17 +558,17 @@ using the following ruleset:

    /about/:

    - -RewriteEngine on
    -RewriteRule ^/$ /about/ [R] -
    + +RewriteEngine on +RewriteRule "^/$" "/about/" [R] +

    Note that this can also be handled using the RedirectMatch directive:

    - -RedirectMatch ^/$ http://example.com/about/ - + +RedirectMatch "^/$" "http://example.com/about/" +

    Note also that the example rewrites only the root URL. That is, it rewrites a request for http://example.com/, but not a @@ -604,36 +597,32 @@ that should go to an existing resource such as an image, or a css file.

    As of version 2.2.16, you should use the FallbackResource directive for this:

    - -<Directory /var/www/my_blog>
    - - FallbackResource index.php
    -
    + +<Directory "/var/www/my_blog"> + FallbackResource "index.php" </Directory> -
    +

    However, in earlier versions of Apache, or if your needs are more complicated than this, you can use a variation of the following rewrite set to accomplish the same thing:

    - -<Directory /var/www/my_blog>
    - - RewriteBase /my_blog
    -
    - RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f
    - RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d
    - RewriteRule ^ index.php [PT]
    -
    + +<Directory "/var/www/my_blog"> + RewriteBase "/my_blog" + + RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-f + RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-d + RewriteRule "^" "index.php" [PT] </Directory> -
    +

    If, on the other hand, you wish to pass the requested URI as a query string argument to index.php, you can replace that RewriteRule with:

    - - RewriteRule (.*) index.php?$1 [PT,QSA] - + +RewriteRule "(.*)" "index.php?$1" [PT,QSA] +

    Note that these rulesets can be used in a .htaccess file, as well as in a <Directory> block.

    @@ -644,4 +633,66 @@ file, as well as in a <Directory> block.

    +
    +Rewrite query string + +
    +
    Description:
    +
    You want to capture a particular value from a query string +and either replace it or incorporate it into another component +of the URL.
    + +
    Solutions:
    +
    +

    Many of the solutions in this section will all use the same condition, +which leaves the matched value in the %2 backreference. %1 is the beginining +of the query string (up to the key of intererest), and %3 is the remainder. This +condition is a bit complex for flexibility and to avoid double '&&' in the +substitutions.

    +
      +
    • This solution removes the matching key and value: + + +# Remove mykey=??? +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$" +RewriteRule "(.*)" "$1?%1%3" + +
    • + +
    • This solution uses the captured value in the URL subsitution, + discarding the rest of the original query by appending a '?': + + +# Copy from query string to PATH_INFO +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$" +RewriteRule "(.*)" "$1/products/%2/?" [PT] + +
    • + +
    • This solution checks the captured value in a subsequent condition: + + +# Capture the value of mykey in the query string +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$" +RewriteCond "%2" !=not-so-secret-value +RewriteRule "(.*)" - [F] + +
    • + +
    • This solution shows the reverse of the previous ones, copying + path components (perhaps PATH_INFO) from the URL into the query string. + +# The desired URL might be /products/kitchen-sink, and the script expects +# /path?products=kitchen-sink. +RewriteRule "^/?path/([^/]+)/([^/]+)" "/path?$1=$2" [PT] + +
    • +
    + +
    + +
    +
    + + diff --git a/docs/manual/rewrite/remapping.xml.fr b/docs/manual/rewrite/remapping.xml.fr new file mode 100644 index 00000000000..68723e92f1b --- /dev/null +++ b/docs/manual/rewrite/remapping.xml.fr @@ -0,0 +1,712 @@ + + + + + + + + + + + Rewrite + +Redirection et remise en correspondance avec mod_rewrite + + + +

    Ce document est un complément à la Documentation de référence de +mod_rewrite. Il montre comment utiliser +mod_rewrite pour rediriger et remettre en +correspondance une requête. Il contient de +nombreux exemples d'utilisation courante de mod_rewrite avec une +description détaillée de leur fonctionnement.

    + +Vous devez vous attacher à comprendre le +fonctionnement des exemples, car la plupart d'entre eux ne +fonctionneront pas sur votre système si vous vous contentez de les +copier/coller dans vos fichiers de configuration. + +
    +Documentation du module mod_rewrite +Introduction à mod_rewrite + +Contrôler l'accès +Serveurs virtuels +Serveurs mandataires +Utilisation de RewriteMap +Techniques avancées +Quand ne pas utiliser mod_rewrite + +
    + + De l'ancienne à la nouvelle URL (en interne) + +
    +
    Description :
    + +
    +

    Supposons que nous ayons récemment renommé la page + foo.html en bar.html, et voulions + maintenant que l'ancienne URL soit toujours valide à des fins + de compatibilité ascendante. En fait, on voudrait que le + changement de nom soit transparent aux utilisateurs de + l'ancienne URL.

    +
    + +
    Solution :
    + +
    +

    On réécrit l'ancienne URL en interne vers la nouvelle via + la règle suivante :

    + + +RewriteEngine on +RewriteRule "^/foo\.html$" "/bar.html" [PT] + +
    +
    + +
    + +
    + + De l'ancien au nouveau (en externe) + +
    +
    Description :
    + +
    +

    Supposons toujours que nous ayons récemment renommé la page + foo.html en bar.html, et voulions + maintenant que l'ancienne URL soit toujours valide à des fins + de compatibilité ascendante. En revanche, nous voulons cette + fois que la nouvelle URL soit suggérée aux utilisateurs de + l'ancienne URL, c'est à dire que l'adresse vue depuis leur + navigateur doit également être modifiée.

    +
    + +
    Solution :
    + +
    +

    On force une redirection HTTP vers la nouvelle URL, ce qui + entraîne une modification de celle du navigateur et aussi de ce + que voit l'utilisateur :

    + + +RewriteEngine on +RewriteRule "^foo\.html$" "bar.html" [R] + +
    + +
    Discussion
    + +
    +

    Dans l'exemple interne, on a utilisé mod_rewrite afin + de dissimuler la redirection au client. Dans cet exemple, en + revanche, on aurait pu se contenter d'une directive Redirect :

    + + Redirect "/foo.html" "/bar.html" + +
    +
    + +
    + +
    + + Ressource déplacée vers un autre serveur + +
    +
    Description :
    + +
    +

    Si une ressource a été déplacée vers un autre serveur, vous + pouvez faire en sorte que les URLs de l'ancien serveur continuent + de fonctionner pendant un certain temps, afin de laisser au + utilisateurs le temps de modifier leurs favoris.

    +
    + +
    Solution :
    + +
    +

    Vous pouvez utiliser mod_rewrite pour + rediriger ces URLs vers le nouveau serveur, mais vous pouvez aussi + utiliser les directives Redirect ou RedirectMatch.

    + +#Avec mod_rewrite +RewriteEngine on +RewriteRule "^/docs/(.+)" "http://nouveau.example.com/docs/$1" [R,L] + + +#Avec RedirectMatch +RedirectMatch "^/docs/(.*)" "http://nouveau.example.com/docs/$1" + + +#Avec Redirect +Redirect "/docs/" "http://nouveau.example.com/docs/" + +
    +
    + +
    + + + +
    + + De statique à dynamique + +
    +
    Description :
    + +
    +

    Comment transformer une page statique foo.html + en sa variante dynamique foo.cgi de manière + transparente, c'est à dire sans en avertir le + navigateur/utilisateur.

    +
    + +
    Solution :
    + +
    +

    On réécrit simplement l'URL en script CGI et force le + gestionnaire de contenu à cgi-script de façon + à ce que le script s'exécute en tant que programme CGI. + Ainsi, une requête vers /~quux/foo.html conduit + en interne à l'invocation de + /~quux/foo.cgi.

    + + +RewriteEngine on +RewriteBase "/~quux/" +RewriteRule "^foo\.html$" "foo.cgi"   [H=cgi-script] + +
    +
    + +
    + +
    + + Compatibilité ascendante dans le cadre d'une modification + d'extension de nom de fichier + +
    +
    Description :
    + +
    +

    Comment conférer une compatibilité ascendante aux URLs + (existant encore virtuellement) après avoir migré + document.YYYY vers document.XXXX, + c'est à dire après avoir par exemple traduit un lot de + fichiers .html en fichiers .php + ?

    +
    + +
    Solution :
    + +
    +

    On réécrit simplement le nom du fichier en son nom + de base et vérifie s'il existe aussi avec la nouvelle + extension. Si c'est le cas, on utilise ce nom, sinon on + réécrit l'URL sous sa forme originale.

    + + + +# jeu de règles assurant une compatibilité ascendante en réécrivant
    +# document.html en document.php si et seulement si document.php
    +# existe +<Directory "/var/www/htdocs"> + RewriteEngine on + RewriteBase "/var/www/htdocs" + + RewriteCond "$1.php" -f + RewriteCond "$1.html" !-f + RewriteRule "^(.*).html$" "$1.php" +</Directory> +
    +
    + +
    Discussion
    +
    +

    Cet exemple utilise une fonctionnalité souvent méconnue de + mod_rewrite, en tirant avantage de l'ordre d'exécution du jeu de + règles. En particulier, mod_rewrite évalue la partie gauche des + règles de réécriture avant d'évaluer les directives RewriteCond. En + conséquence, $1 est déjà défini au moment où les directives + RewriteCond sont évaluées. Ceci nous permet de tester l'existence du + fichier original (document.html) et du fichier cible + (document.php) en utilisant le même nom de base.

    + +

    Ce jeu de règles est conçu pour une utilisation dans un contexte + de répertoire (au sein d'une section <Directory> ou d'un + fichier .htaccess), de façon à ce que les vérifications + -f effectuent leurs recherches dans le bon répertoire. + Vous serez peut-être amené à définir une directive RewriteBase pour spécifier le + répertoire de base à partir duquel vous travaillez.

    +
    +
    + +
    + +
    + +Noms d'hôtes canoniques + +
    +
    Description :
    + +
    Le but de cette règle est de préférer l'utilisation d'un nom + d'hôte particulier à d'autres noms d'hôte utilisables + pour atteindre le même site. Par exemple, si vous voulez + utiliser www.example.com à la place de + example.com, vous pouvez utiliser une solution + du style :
    + +
    Solution :
    + +
    + +

    Pour y parvenir, il vaut mieux se passer de mod_rewrite, et utiliser +plutôt la directive Redirect dans +une section de serveur virtuel pour le/les noms d'hôte non canoniques.

    + + +<VirtualHost *:80> + ServerName undesired.example.com + ServerAlias example.com notthis.example.com + + Redirect "/" "http://www.example.com/" +</VirtualHost> + +<VirtualHost *:80> + ServerName www.example.com +</VirtualHost> + + +

    Vous pouvez aussi utiliser la directive If :

    + + +<If "%{HTTP_HOST} != 'www.example.com'"> + Redirect "/" "http://www.example.com/" +</If> + + +

    Ou, par exemple, pour rediriger une portion de votre site vers HTTPS +:

    + + +<If "%{SERVER_PROTOCOL} != 'HTTPS'"> + Redirect "/admin/" "https://www.example.com/admin/" +</If> + + +

    Si, pour une raison particulière, vous voulez tout de même utiliser +mod_rewrite - dans le cas, par exemple, où vous avez besoin +d'un jeu plus important de règles de réécritures - vous pouvez utiliser +la recette suivante :

    + +

    Pour les sites écoutant sur un port autre que 80:

    + +RewriteCond "%{HTTP_HOST}" "!^www\.example\.com" [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteCond "%{SERVER_PORT}" "!^80$" +RewriteRule "^/?(.*)" "http://www.example.com:%{SERVER_PORT}/$1" [L,R,NE] + + +

    Et pour un site écoutant sur le port 80

    + +RewriteCond "%{HTTP_HOST}" "!^www\.example\.com" [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteRule "^/?(.*)" "http://www.example.com/$1" [L,R,NE] + +

    + Si vous souhaitez que cette règle s'applique à tous les noms de + domaine - en d'autres termes, si vous voulez rediriger + example.com vers + www.example.com pour toutes les valeurs + possibles de example.com, vous pouvez utiliser + le jeu de règles suivants :

    + + +RewriteCond "%{HTTP_HOST}" "!^www\." [NC] +RewriteCond "%{HTTP_HOST}" "!^$" +RewriteRule "^/?(.*)" "http://www.%{HTTP_HOST}/$1" [L,R,NE] + +

    + Vous pouvez utiliser ce jeu de règles aussi bien dans le fichier + de configuration de votre serveur principal que dans un fichier + .htaccess placé dans le répertoire défini par la + directive DocumentRoot du serveur.

    +
    +
    + +
    + +
    + + Recherche de pages dans plus d'un répertoire + +
    +
    Description:
    + +
    +

    Une ressource peut exister dans plusieurs répertoires, et nous + voulons rechercher cette ressource dans ces répertoires + lorsqu'elle fait l'objet d'une requête. Il est possible que nous + ayons récemment réorganisé la structure de notre site en + répartissant son contenu dans plusieurs répertoires.

    +
    + +
    Solution :
    + +
    +

    Le jeu de règles suivant recherche la ressource dans deux + répertoires, et s'il ne la trouve dans aucun des deux, il tentera + simplement de la servir à partir de l'adresse fournie dans la + requête.

    + + +RewriteEngine on + +# on cherche tout d'abord dans dir1/... +# ... et si on trouve, on est content et on arrête : +RewriteCond "%{DOCUMENT_ROOT}/dir1/%{REQUEST_URI}" -f +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir1/$1" [L] + +# on cherche ensuite dans dir2/... +# ... et si on trouve, on est content et on arrête : +RewriteCond "%{DOCUMENT_ROOT}/dir2/%{REQUEST_URI}" -f +RewriteRule "^(.+)" "%{DOCUMENT_ROOT}/dir2/$1" [L] + +# sinon, on continue la recherche avec d'autres directives Alias +# ou ScriptAlias, etc... +RewriteRule "^" "-" [PT] + +
    +
    + +
    + +
    + + Redirection vers des serveurs géographiquement distribués + +
    +
    Description :
    + +
    +

    Notre site web possède de nombreux miroirs, et nous voulons + rediriger les utilisateurs vers celui qui se situe dans le pays où + ils se trouvent.

    +
    + +
    Solution :
    + +
    +

    En consultant le nom d'hôte du client demandeur, on détermine le + pays dans lequel il se trouve. S'il est impossible d'effectuer une + recherche sur leur adresse IP, on se rabat sur un serveur par + défaut.

    +

    Nous allons utiliser une directive RewriteMap afin de construire une + liste des serveurs que nous voulons utiliser.

    + + +HostnameLookups on +RewriteEngine on +RewriteMap multiplex "txt:/path/to/map.mirrors" +RewriteCond "%{REMOTE_HOST}" "([a-z]+)$ [NC]" +RewriteRule "^/(.*)$" "${multiplex:%1|http://www.example.com/}$1" [R,L] + + + +## liste_miroirs -- Table de correspondance pays - serveurs
    +
    +de http://www.exemple.de/
    +uk http://www.exemple.uk/
    +com http://www.example.com/
    +##EOF## +
    +
    + +
    Discussion
    +
    + Ce jeu de règles nécessite la définition à + on de la directive HostNameLookups, ce qui peut induire une + baisse de performance significative. + +

    La directive RewriteCond extrait la dernière + partie du nom d'hôte du client demandeur - le code du pays - et la + règle de réécriture qui suit utilise cette valeur pour rechercher le + serveur miroir approprié dans le fichier de correspondances.

    +
    +
    + +
    + +
    + + Contenu dépendant du navigateur + +
    +
    Description :
    + +
    +

    Nous voulons fournir des contenus différents en fonction du + navigateur (user-agent) qui effectue la requête.

    +
    + +
    Solution :
    + +
    +

    Nous devons déterminer quel contenu servir, en nous basant + sur l'en-tête HTTP "User-Agent". La + configuration suivante effectue ceci : si l'en-tête HTTP + "User-Agent" commence par "Mozilla/3", le nom de la page + foo.html est réécrit en foo.NS.html + et la réécriture s'arrête. Si le navigateur est "Lynx" ou + "Mozilla" version 1 ou 2, l'URL devient + foo.20.html. Tous les autres navigateurs + reçoivent la page foo.32.html. Tout ceci est + effectué par le jeu de règles suivant :

    + +RewriteCond "%{HTTP_USER_AGENT}" "^Mozilla/3.*" +RewriteRule "^foo\.html$" "foo.NS.html" [L] + +RewriteCond "%{HTTP_USER_AGENT}" "^Lynx/" [OR] +RewriteCond "%{HTTP_USER_AGENT}" "^Mozilla/[12]" +RewriteRule "^foo\.html$" "foo.20.html" [L] + +RewriteRule "^foo\.html$" "foo.32.html" [L] + +
    +
    + +
    + +
    + +URLs canoniques + +
    +
    Description :
    + +
    +

    Sur certains serveurs, une ressource peut posséder plusieurs + URLs. Il y a en général les URLs canoniques (celles qui sont + réellement distribuées et utilisées), et celles qui correspondent à + des raccourcis, les URLs internes, etc... Quelle que soit l'adresse + que l'utilisateur fournit dans la requête, il devrait finalement + voir l'URL canonique dans la barre d'adresse de son navigateur.

    +
    + +
    Solution :
    + +
    +

    Nous effectuons une redirection HTTP externe pour toutes les + URLs non canoniques afin de les corriger dans la barre d'adresse + du navigateur, et ceci pour toutes les requêtes futures. Dans le + jeu de règles suivant, nous remplaçons /matous et + /minettes par le canonique /chats.

    + + RewriteRule "^/(matous|minettes)/(.*)" "/chats/$2" [R] +
    + +
    Discussion :
    +
    On serait mieux inspiré d'utiliser ici les directives Redirect ou + RedirectMatch : + + RedirectMatch "^/(matous|minettes)/(.*)" "/chats/$2" +
    +
    + +
    + +
    + + Déplacement du répertoire <code>DocumentRoot</code> + +
    +
    Description :
    + +
    +

    En général, le répertoire DocumentRoot du serveur web correspond à l'URL +"/". Ce répertoire ne contient cependant pas forcément des +ressources de première importance pour l'utilisateur. Par exemple, vous +préférerez peut-être que le répertoire d'accueil d'un visiteur accédant +pour la première fois à votre site soit un répertoire particulier +/a-propos-de/. Pour y parvenir, utilisez le jeu de règles +suivant :

    +
    + +
    Solution :
    + +
    +

    On redirige l'URL / vers + /a-propos-de/ : +

    + + +RewriteEngine on +RewriteRule "^/$" "/a-propos-de/" [R] + + +

    Notez que l'on peut aussi y parvenir en utilisant la directive +RedirectMatch :

    + +RedirectMatch "^/$" "http://example.com/a-propos-de/" + +

    Notez aussi que cet exemple ne réécrit que l'URL racine. En d'autres +termes, il réécrit une requête pour http://example.com/, +mais pas pour une requête http://example.com/page.html. Si +vous avez effectivement modifié la racine de vos documents - c'est à dire +si tous vos contenus se trouvent dans un +sous-répertoire, il est largement préférable de modifier simplement +votre directive DocumentRoot, ou de +déplacer l'ensemble du contenu vers le répertoire supérieur, plutôt que +de réécrire les URLs.

    +
    +
    + +
    + +
    +Ressource par défaut + +
    +
    Description :
    +
    Vous voulez qu'une seule ressource (disons un certain fichier tel +que index.php) soit servie pour toutes les requêtes à destination d'un +certain répertoire, sauf pour celles qui concernent une ressource +existant effectivement comme une image, ou un fichier css.
    + +
    Solution :
    +
    +

    Depuis la version 2.2.16, vous pouvez y parvenir via la directive +FallbackResource :

    + + +<Directory "/var/www/my_blog"> + FallbackResource "index.php" +</Directory> + + +

    Cependant, si vos besoins étaient plus complexes, vous pouviez, dans +les versions plus anciennes d'Apache, utiliser un jeu de règles du style +:

    + + +<Directory "/var/www/my_blog"> + RewriteBase "/my_blog" + + RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-f + RewriteCond "/var/www/my_blog/%{REQUEST_FILENAME}" !-d + RewriteRule "^" "index.php" [PT] +</Directory> + + +

    D'autre part, si vous voulez transmettre l'URI de la requête en tant +que chaîne de paramètres à index.php, vous pouvez remplacer cette règle +de réécriture par :

    + +RewriteRule "(.*)" "index.php?$1" [PT,QSA] + +

    Notez que l'on peut utiliser ces jeux de règles aussi bien dans un +fichier .htaccess que dans une section +<Directory>.

    + +
    + +
    + +
    + +
    +Rewrite query string + +
    +
    Description :
    +
    Vous voulez extraire une valeur particulière d'une chaîne de +paramètres d'une URL, et soit la remplacer, soit l'incorporer dans un +autre composant de l'URL.
    + +
    Solutions :
    +
    +

    Dans la plupart des solutions de cette section, on utilise la même +condition qui stocke la valeur recherchée dans la référence arrière %2. +%1 est le début de la requête, et %3 ce qui reste. Cette condition est +un peu complexe car elle introduit de la flexibilité et évite les +doubles perluettes '&&' dans les substitutions.

    +
      +
    • Cette solution supprime le couple clé/valeur recherché : + + +# Remove mykey=??? +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$" +RewriteRule "(.*)" "$1?%1%3" + +
    • + +
    • Cette solution remplace la partie de l'URL qui suit la valeur + recherchée par un '?' : + + +# Copy from query string to PATH_INFO +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$" +RewriteRule "(.*)" "$1/products/%2/?" [PT] + +
    • + +
    • Cette solution utilise la valeur recherchée dans une deuxième + condition :: + + +# Capture the value of mykey in the query string +RewriteCond "%{QUERY_STRING}" "(.*(?:^|&))mykey=([^&]*)&?(.*)&?$"" +RewriteCond "%2" !=not-so-secret-value +RewriteRule "(.*)" - [F] + +
    • + +
    • Cette solution produit l'effet inverse des précédentes ; elle + copie des composantes du chemin (peut-être PATH_INFO) depuis l'URL + vers sa chaîne de paramètres : + +# The desired URL might be /products/kitchen-sink, and the script expects +# /path?products=kitchen-sink. +RewriteRule "^/?path/([^/]+)/([^/]+)" "/path?$1=$2" [PT] + +
    • +
    + +
    + +
    +
    + +
    diff --git a/docs/manual/rewrite/remapping.xml.meta b/docs/manual/rewrite/remapping.xml.meta index ddeef59539b..fc4dfefebf2 100644 --- a/docs/manual/rewrite/remapping.xml.meta +++ b/docs/manual/rewrite/remapping.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/rewrite_guide.html.fr b/docs/manual/rewrite/rewrite_guide.html.fr deleted file mode 100644 index 6a483bf9ce5..00000000000 --- a/docs/manual/rewrite/rewrite_guide.html.fr +++ /dev/null @@ -1,870 +0,0 @@ - - - -Guide de rcriture des URLs - Serveur Apache HTTP - - - - - -
    <-
    -

    Guide de rcriture des URLs

    -
    -

    Langues Disponibles:

    -
    - - -

    Ce document complte la documentation de rfrence du - module mod_rewrite. Il dcrit de quelle manire on - peut utiliser le module Apache mod_rewrite pour - rsoudre les problmes typiques relatifs aux URLs auxquels les - webmasters sont souvent confronts. La rsolution de chaque problme - par la configuration des jeux de rgles de rcriture d'URLs fait - l'objet d'une description dtaille.

    - -
    ATTENTION : l'adaptation des exemples votre - situation en fonction de la configuration de votre serveur pourra - s'avrer ncessaire, par exemple l'ajout du drapeau - [PT] si vous utilisez les modules - mod_alias, mod_userdir, etc... Un - jeu de rgles dfini dans le contexte du serveur devra aussi tre - adapt pour tre utilis dans un contexte .htaccess. - Efforcez-vous toujours de bien comprendre l'effet produit par un jeu - de rgles avant de l'utiliser, ce qui pourra vous viter bien des - problmes.
    - -
    - -
    top
    -
    -

    URLs canoniques

    - - - -
    -
    Description :
    - -
    -

    Sur certains serveurs web, une ressource peut tre accessible - depuis plusieurs URLs. On trouve en gnral des URLs canoniques - (qui sont rellement utilisables et distribuables), mais aussi des - URLs usage interne, ou celles qui ne sont que des raccourcis, - etc... On souhaite que, quelle que soit l'URL que l'utilisateur - a fournie avec sa requte, il ne doit en voir en fin de compte - que la forme canonique.

    -
    - -
    Solution :
    - -
    -

    On effectue une redirection HTTP externe pour toutes les URLs - non canoniques afin de les rendre comprhensibles au navigateur - et ceci pour toutes les requtes sous-jacentes. Dans l'exemple de - jeux de rgles ci-dessous, /~user est remplac par - l'expression canonique /u/user, et une ventuelle - absence du slash la fin de /u/user est corrige.

    - -
    -RewriteRule   ^/~([^/]+)/?(.*)    /u/$1/$2  [R]
    -RewriteRule   ^/u/([^/]+)$  /$1/$2/   [R]
    -
    -
    -
    - -
    top
    -
    -

    Noms d'htes canoniques

    - -
    -
    Description :
    - -
    Le but de cette rgle est de prfrer l'utilisation d'un nom - d'hte particulier par rapport d'autres noms d'hte utilisables - pour atteindre le mme site. Par exemple, si vous voulez - utiliser www.example.com la place de - example.com, vous devez utiliser une solution - de ce style.
    - -
    Solution :
    - -
    -

    Pour les sites coutant sur un port autre que 80:

    -
    -RewriteCond %{HTTP_HOST}   !^www\.exemple\.com [NC]
    -RewriteCond %{HTTP_HOST}   !^$
    -RewriteCond %{SERVER_PORT} !^80$
    -RewriteRule ^/?(.*)         http://www.example.com:%{SERVER_PORT}/$1
    -[L,R,NE]
    -
    - -

    Et pour un site coutant sur le port 80

    -
    -RewriteCond %{HTTP_HOST}   !^www\.exemple\.com [NC]
    -RewriteCond %{HTTP_HOST}   !^$
    -RewriteRule ^/?(.*)         http://www.example.com/$1 [L,R,NE]
    -
    -

    - Si vous souhaitez que cette rgle s'applique tous les noms de - domaine - en d'autres termes, si vous voulez rediriger - example.com vers - www.example.com pour toutes les valeurs - possibles de example.com, vous pouvez utiliser - le jeu de rgles suivants :

    - -
    -RewriteCond %{HTTP_HOST} !^www\. [NC]
    -RewriteCond %{HTTP_HOST} !^$
    -RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE]
    -
    -

    - Vous pouvez utiliser ce jeu de rgles aussi bien dans le fichier - de configuration de votre serveur principal que dans un fichier - .htaccess plac dans le rpertoire dfini par la - directive DocumentRoot du serveur.

    -
    -
    - -
    top
    -
    -

    DocumentRootdplac

    - - - -
    -
    Description :
    - -
    -

    En gnral, la directive DocumentRoot correspond directement l'URL -"/" du serveur web. Mais souvent, les donnes qui s'y -trouvent ne sont pas de la premire priorit. Par exemple, il peut tre -intressant, pour les visiteurs qui entrent sur le site pour la premire -fois, d'tre redirigs vers un sous-rpertoire particulier -/a-propos-de/. Pour ce faire, on peut utiliser le jeu de -rgles suivant :

    -
    - -
    Solution :
    - -
    -

    On redirige l'URL / vers - /a-propos-de/: -

    - -
    -RewriteEngine on
    -RewriteRule   ^/$  /a-propos-de/  [R]
    -
    - -

    Notez que le mme effet peut tre obtenu l'aide de la directive - RedirectMatch :

    - -

    -RedirectMatch ^/$ http://example.com/apropos/ -

    -

    Notez aussi que cet exemple ne rcrit que l'URL racine. En d'autres -termes, il rcrit une requte pour http://example.com/, -mais ne rcrira pas une requte pour -http://example.com/page.html. En fait, si vous avez modifi -la racine de vos documents - c'est dire si tous vos contenus se -trouvent dans ce sous-rpertoire, il vaut mieux simplement modifier -votre directive DocumentRoot que de -procder une rcriture d'URLs.

    -
    -
    - -
    top
    -
    -

    Problme du slash de fin

    - - - -
    -
    Description :
    - -

    La plupart des problmes de "slash de fin" peuvent tre - rsolus grce aux techniques dcrites dans ce sujet - de la FAQ. Cependant, dans certaines situations o l'absence de slash de fin - peut rendre une URL inoprante, l'utilisation de - mod_rewrite s'avre ncessaire. Le cas peut se prsenter, par exemple, - aprs une srie complexe de rgles de rcriture.

    -
    - -
    Solution :
    - -
    -

    La solution ce problme subtil consiste laisser le - serveur ajouter le slash de fin automatiquement. Pour y - parvenir, il faut utiliser une redirection externe, afin que - le navigateur demande correctement les images sous-jacentes, - etc... Une rcriture en interne ne fonctionnerait que pour la - page du rpertoire, mais chouerait pour toute image incluse - dans cette page via des liens relatifs, car le navigateur - demanderait un objet insr. Par exemple, une requte pour - image.gif dans /~quux/foo/index.html - deviendrait /~quux/image.gif sans la redirection - externe !

    - -

    Pour y parvenir, on peut utiliser des rgles de ce style :

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^foo$  foo/  [R]
    -
    - -

    Vous pouvez aussi ajouter ce qui suit dans un fichier - .htaccess situ dans le rpertoire contenant la - ressource. Notez cependant que cela augmente la charge du processeur.

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteCond    %{REQUEST_FILENAME}  -d
    -RewriteRule    ^(.+[^/])$           $1/  [R]
    -
    -
    -
    - -
    top
    -
    -

    Dplacement des rpertoires home vers un autre serveur

    - - - -
    -
    Description :
    - -
    -

    De nombreux webmasters ont demand comment rsoudre le - problme suivant : ils voudraient tout simplement rediriger - les rpertoires home d'un serveur web vers un autre serveur - web. Cette situation se prsente en gnral lorsqu'on installe - un nouveau serveur web destin terme en remplacer un autre - plus ancien.

    -
    - -
    Solution :
    - -
    -

    Avec mod_rewrite, la solution est - vidente. Sur l'ancien serveur web, on redirige simplement - toutes les URLs du style /~user/chemin vers - http://nouveau-serveur/~user/chemin.

    - -
    -RewriteEngine on
    -RewriteRule   ^/~(.+)  http://nouveau-serveur/~$1  [R,L]
    -
    -
    -
    - -
    top
    -
    -

    Recherche de pages dans plus d'un rpertoire

    - - - -
    -
    Description :
    - -
    -

    Le serveur web doit parfois rechercher des pages dans plus - d'un rpertoire. Dans ce cas, les vues multiples ou autres - techniques similaires ne sont d'aucun secours.

    -
    - -
    Solution :
    - -
    -

    On dfinit explicitement un jeu de rgles qui recherche les - fichiers dans les rpertoires.

    - -
    -RewriteEngine on
    -
    -#   on cherche tout d'abord dans dir1/...
    -#   ... et si on trouve, on est content et on arrte :
    -RewriteCond         %{DOCUMENT_ROOT}/dir1/%{REQUEST_URI}  -f
    -RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/dir1/$1  [L]
    -
    -#   on cherche ensuite dans dir2/...
    -#   ... et si on trouve, on est content et on arrte :
    -RewriteCond         %{DOCUMENT_ROOT}/dir2/%{REQUEST_URI}  -f
    -RewriteRule  ^(.+)  %{DOCUMENT_ROOT}/dir2/$1  [L]
    -
    -#   sinon, on continue la recherche avec d'autres directives Alias
    -#   ou ScriptAlias, etc...
    -RewriteRule   ^(.+)  -  [PT]
    -
    -
    -
    - -
    top
    -
    -

    Dfinir des variables d'environnement en fonction de - certaines parties de l'URL

    - - - -
    -
    Description :
    - -
    -

    Comment conserver des informations - d'tat d'une requte l'autre et utiliser l'URL pour les - encoder, sans utiliser d'encapsulateur CGI - pour toutes les pages pour seulement supprimer ces - informations.

    -
    - -
    Solution :
    - -
    -

    On utilise une rgle de rcriture pour supprimer - l'information d'tat et l'enregistrer dans une variable - d'environnement dont on pourra plus tard extraire la valeur - dans XSSI ou CGI. De cette faon, une URL telle que - /foo/S=java/bar/ sera traduite en - /foo/bar/ et la variable d'environnement - STATUS aura pour valeur "java".

    - -
    -RewriteEngine on
    -RewriteRule   ^(.*)/S=([^/]+)/(.*)    $1/$3 [E=STATUS:$2]
    -
    -
    -
    - -
    top
    -
    -

    Htes virtuels bass sur l'utilisateur

    - - - -
    -
    Description :
    - -
    -

    Supposons que vous vouliez atteindre la page d'accueil des - utilisateurs sur une mme machine au moyen de l'URL - www.nom-utilisateur.hte.domaine.com, - en vous basant - seulement sur les enregistrements DNS de type A, et ceci sans qu'aucun - hte virtuel ne soit install sur cette machine.

    -
    - -
    Solution :
    - -
    -

    Dans le cas des requtes HTTP/1.0, il n'y a pas de solution - ; par contre, avec une requte HTTP/1.1 qui contient un - en-tte HTTP Host:, on peut utiliser le jeu de rgles suivant - pour rcrire en interne - http://www.nom-utilisateur.hte.com/chemin vers - /home/nom-utilisateur/chemin :

    - -
    -RewriteEngine on
    -RewriteCond   %{HTTP_HOST}                 ^www\.([^.]+)\.host\.com$
    -RewriteRule   ^(.*) /home/%1$1
    -
    -

    Les parenthses utilises dans une directive RewriteCond sont captures dans les -rfrences arrires %1, %2, etc..., alors que -les parenthses utilises dans une directive RewriteRule sont captures dans les -rfrences arrires $1, $2, etc...

    -
    -
    - -
    top
    -
    -

    Redirection des rpertoires d'accueil pour les trangers

    - - - -
    -
    Description :
    - -
    -

    On veut rediriger les URLs des rpertoires d'accueil vers - un autre serveur www.quelque-part.com lorsque - l'utilisateur demandeur n'appartient pas au domaine local - notre-domaine.com. On rencontre parfois cette - situation dans un contexte d'htes virtuels.

    -
    - -
    Solution :
    - -
    -

    Juste une condition de rcriture :

    - -
    -RewriteEngine on
    -RewriteCond   %{REMOTE_HOST}  !^.+\.notre-domaine\.com$
    -RewriteRule   ^(/~.+)         http://www.quelque-part.com/$1 [R,L]
    -
    -
    -
    - -
    top
    -
    -

    Redirection des ancrages

    - - - -
    -
    Description :
    - -
    -

    Par dfaut, la redirection vers un ancrage HTML ne fonctionne - pas, car mod_rewrite chappe le caractre # en le - transformant en %23, ce qui rend la redirection - inoprante.

    -
    - -
    Solution :
    - -
    -

    On utilise le drapeau [NE] dans la rgle - RewriteRule. NE signifie "No Escape". -

    -
    -
    - -
    top
    -
    -

    Rcriture dpendant de l'heure

    - - - -
    -
    Description :
    - -
    -

    Lorsqu'il s'agit de distribuer des contenus dont la nature - dpend de l'heure, de nombreux webmasters utilisent encore des - scripts CGI qui redirigent par exemple vers des pages - spcifiques. Comment peut-on y parvenir tenir compte de - l'heure l'aide de mod_rewrite ?

    -
    - -
    Solution :
    - -
    -

    Il existe de nombreuses variables nommes - TIME_xxx utilisables dans les conditions de - rcriture. Utilises en conjonction avec les modles de - comparaison lexicographique spciaux <STRING, - >STRING et =STRING, elles - permettent d'effectuer des redirections dpendant de - l'heure :

    - -
    -RewriteEngine on
    -RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
    -RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
    -RewriteRule   ^foo\.html$             foo.jour.html
    -RewriteRule   ^foo\.html$             foo.nuit.html
    -
    - -

    Avec cet exemple, l'URL foo.html renvoie - le contenu de foo.jour.html durant le - crneau horaire 07:00-19:00, et le contenu de - foo.nuit.html le reste du temps. Agrable - fonctionnalit pour une page d'accueil...

    -
    -
    - -
    top
    -
    -

    Compatibilit ascendante pour une migration de YYYY vers - XXXX

    - - - -
    -
    Description :
    - -
    -

    Comment confrer une compatibilit ascendante aux URLs - (existant encore virtuellement) aprs avoir migr - document.YYYY vers document.XXXX, - c'est dire aprs avoir par exemple traduit un lot de - fichiers .html en fichiers .phtml - ?

    -
    - -
    Solution :
    - -
    -

    On rcrit simplement le nom du fichier en son nom - de base et vrifie s'il existe aussi avec la nouvelle - extension. Si c'est le cas, on utilise ce nom, sinon on - rcrit l'URL sous sa forme originale.

    - - -
    -#   jeu de rgles assurant une compatibilit ascendante en rcrivant
    -#   document.html en document.phtml si et seulement si document.phtml
    -#   existe et document.html n'existe plus
    -RewriteEngine on
    -RewriteBase   /~quux/
    -#   rcriture du fichier en son nom de base,
    -#   mais garde en mmoire le fait qu'il s'agit
    -#   d'un fichier html
    -RewriteRule   ^(.*)\.html$              $1      [C,E=WasHTML:yes]
    -#   rcrit vers document.phtml s'il existe
    -#   Note : il s'agit d'un exemple de niveau rpertoire, si bien que
    -#   %{REQUEST_FILENAME} contient le chemin complet du systme de fichier
    -#   tel qu'il a t construit par le serveur.
    -RewriteCond   %{REQUEST_FILENAME}.phtml -f
    -RewriteRule   ^(.*)$ $1.phtml                   [S=1]
    -#   sinon, restauration du nom de fichier complet original
    -RewriteCond   %{ENV:WasHTML}            ^yes$
    -RewriteRule   ^(.*)$ $1.html
    -
    -
    -
    - -
    top
    -
    -

    De l'ancien au nouveau (en interne)

    - - - -
    -
    Description :
    - -
    -

    Supposons que nous ayons rcemment renomm la page - foo.html en bar.html, et voulions - maintenant que l'ancienne URL soit toujours valide des fins - de compatibilit ascendante. En fait, on voudrait que le - changement de nom soit transparent aux utilisateurs de - l'ancienne URL.

    -
    - -
    Solution :
    - -
    -

    On rcrit l'ancienne URL en interne vers la nouvelle via - la rgle suivante :

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^foo\.html$  bar.html
    -
    -
    -
    - -
    top
    -
    -

    De l'ancien au nouveau (en externe)

    - - - -
    -
    Description :
    - -
    -

    Supposons toujours que nous ayons rcemment renomm la page - foo.html en bar.html, et voulions - maintenant que l'ancienne URL soit toujours valide des fins - de compatibilit ascendante. Par contre, nous voulons cette - fois que les utilisateurs de l'ancienne URL soient redirigs - vers la nouvelle, c'est dire que l'adresse tape - dans leur navigateur doit aussi tre modifie.

    -
    - -
    Solution :
    - -
    -

    On force une redirection HTTP vers la nouvelle URL, ce qui - entrane une modification de celle du navigateur et aussi de ce - que voit l'utilisateur :

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^foo\.html$  bar.html  [R]
    -
    -
    -
    - -
    top
    -
    -

    De statique dynamique

    - - - -
    -
    Description :
    - -
    -

    Comment transformer une page statique foo.html - en sa variante dynamique foo.cgi de manire - transparente, c'est dire sans en avertir le - navigateur/utilisateur.

    -
    - -
    Solution :
    - -
    -

    On rcrit simplement l'URL en script CGI et force le - gestionnaire de contenu cgi-script de faon - ce que le script s'excute en tant que programme CGI. - Ainsi, une requte vers /~quux/foo.html conduit - en interne l'invocation de - /~quux/foo.cgi.

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^foo\.html$  foo.cgi  [H=cgi-script]
    -
    -
    -
    - -
    top
    -
    -

    Blocage des robots

    - - - -
    -
    Description :
    - -
    -

    Comment empcher un robot vraiment gnant de collecter les - pages d'une partie spcifique du site web ? Un fichier - /robots.txt comportant les entres du "Protocole - d'Exclusion des Robots" ne suffit gnralement pas en venir - bout.

    -
    - -
    Solution :
    - -
    -

    On utilise un jeu de rgles qui interdit les URLs de la - partie du site web concerne /~quux/foo/arc/ - (peut-tre une partie du serveur avec une arborescence trs - dveloppe travers laquelle le parcours du - robot induirait une charge importante pour le serveur). Nous - devons nous assurer de n'interdire l'accs qu' ce robot - particulier, c'est dire qu'il ne suffit pas d'interdire - l'accs l'hte sur lequel le robot fonctionne, ce qui - bloquerait aussi les utilisateurs de cet hte. Pour y - parvenir, on tient aussi compte des informations contenues - dans l'en-tte HTTP User-Agent.

    - -
    -RewriteCond %{HTTP_USER_AGENT}   ^NameOfBadRobot.*
    -RewriteCond %{REMOTE_ADDR}       ^123\.45\.67\.[8-9]$
    -RewriteRule ^/~quux/foo/arc/.+   -   [F]
    -
    -
    -
    - -
    top
    -
    -

    Blocage du rfrencement chaud (Hotlinking) d'images

    - - - -
    -
    Description :
    - -
    -

    Cette technique vous permet d'interdire d'autres sites - d'inclure directement vos images dans leurs pages. On fait - souvent rfrence cette pratique sous le nom de - rfrencement chaud (Hotlinking) qui entrane l'utilisation - de votre bande passante pour servir des contenus faisant - partie du site de quelqu'un d'autre.

    -
    - -
    Solution :
    - -
    -

    Cette technique repose sur la valeur de la variable - optionnelle HTTP_REFERER. Certaines personnes - pourront donc contourner cette limitation. Pour la plupart des - utilisateurs cependant, la requte chouera, en ce sens que - l'image ne sera pas affiche depuis le site tiers.

    -

    Il y a plusieurs manires de grer cette situation.

    - -

    Dans le premier exemple, nous rejetons tout simplement la - requte si elle ne provenait pas d'une page appartenant notre - site. Pour les besoins de cet exemple, nous supposons que le nom - de votre site est www.example.com.

    - -
    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$    -   [F,NC]
    -
    - -

    Dans le second exemple, plutt que de rejeter la requte, - nous affichons une autre image la place.

    - -
    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$    /images/go-away.png   [R,NC]
    -
    - -

    Dans le troisime exemple, nous redirigeons la requte vers - une image appartenant un site tiers.

    - - -
    -RewriteCond %{HTTP_REFERER} !^$
    -RewriteCond %{HTTP_REFERER} !www.example.com [NC]
    -RewriteRule \.(gif|jpg|png)$ http://other.site.com/image.gif   [R,NC]
    -
    -

    De tous ces exemples, les deux derniers semblent les plus - efficaces pour faire en sorte que les gens arrtent de - rfrencer vos images chaud, car il ne verront pas les images - qu'ils s'attendent voir.

    - -
    -
    - -
    top
    -
    -

    Interdiction du mandataire

    - - - -
    -
    Description :
    - -
    -

    Comment interdire l'utilisation du mandataire d'Apache un - certain hte, ou mme un utilisateur d'un certain hte ?

    -
    - -
    Solution :
    - -
    -

    Nous devons tout d'abord nous assurer que - mod_rewrite se situe en dessous (!) de - mod_proxy dans le fichier de configuration - lors de la compilation du serveur web Apache. De cette faon, - il est appel avant mod_proxy. Nous - pouvons alors utiliser la rgle suivante pour une interdiction - concernant un hte...

    - -
    -RewriteCond %{REMOTE_HOST} ^mauvais-hte\.mon-domaine\.com$
    -RewriteRule !^http://[^/.]\.mon-domaine.com.*  - [F]
    -
    - -

    ...et celle-ci pour une interdiction concernant un - utilisateur d'un certain hte :

    - -
    -RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}
    -^mauvais-sujet@mauvais-hte\.mon-domaine\.com$
    -RewriteRule !^http://[^/.]\.mon-domaine.com.*  - [F]
    -
    -
    -
    - -
    top
    -
    -

    Moteur de rcriture externe

    - - - -
    -
    Description :
    - -
    -

    Une question de la Faq : comment rsoudre le problme - FOO/BAR/QUUX/etc. ? mod_rewrite ne semble pas - devoir y apporter de solution...

    -
    - -
    Solution :
    - -
    -

    Utiliser une RewriteMap ou table de rcriture externe, c'est - dire un programme qui agit de la mme faon qu'une - RewriteMap. Il - doit tre lanc une fois au dmarrage d'Apache, recevoir les - URLs des requtes sur STDIN, et restituer l'URL - rsultante (en gnral rcrite) sur STDOUT (dans - cet ordre !).

    - -
    -RewriteEngine on
    -RewriteMap    quux-table       prg:/chemin/vers/table.quux.pl
    -RewriteRule   ^/~quux/(.*)$  /~quux/${quux-table:$1}
    -
    - -
    -#!/chemin/vers/perl
    -
    -#   dsactive la mise en tampon des entres/sorties, qui risque
    -#   de provoquer des bouclages infinis pour le serveur Apache
    -$| = 1;
    -
    -#   lit les URLs (une par ligne) depuis stdin et
    -#   gnre l'URL transforme sur stdout
    -
    -#   read URLs one per line from stdin and
    -#   generate substitution URL on stdout
    -while (<>) {
    -    s|^foo/|bar/|;
    -    print $_;
    -}
    -
    - -

    Ceci n'est qu'un exemple de dmonstration qui ne fait que - rcrire les URLs du style /~quux/foo/... vers - /~quux/bar/.... En fait, vous pouvez programmer - la substitution que vous voulez. Notez cependant que si de - tels programmes peuvent aussi tre utiliss - par un utilisateur standard, seul l'administrateur du systme - peut les crire.

    -
    -
    - -
    -
    -

    Langues Disponibles:

    -
    - \ No newline at end of file diff --git a/docs/manual/rewrite/rewrite_guide_advanced.html.fr b/docs/manual/rewrite/rewrite_guide_advanced.html.fr deleted file mode 100644 index eaff3aac91b..00000000000 --- a/docs/manual/rewrite/rewrite_guide_advanced.html.fr +++ /dev/null @@ -1,1377 +0,0 @@ - - - -Guide de rcriture des URLs - Sujets avancs - Serveur Apache HTTP - - - - - -
    <-
    -

    Guide de rcriture des URLs - Sujets avancs

    -
    -

    Langues Disponibles:

    -
    - - -

    Ce document complmente la - documentation de rfrence du - module mod_rewrite. Il dcrit les diffrentes - manires d'utiliser le module d'Apache mod_rewrite - pour rsoudre les problmes d'URLs typiques auxquels sont souvent - confronts les webmasters. Nous fournissons une description - dtaille de la rsolution de chaque problme par la configuration - d'un jeu de rgles de rcriture.

    - -
    ATTENTION: il pourra s'avrer ncessaire de - modifier les exemples en fonction de la - configuration de votre serveur, par exemple en ajoutant le drapeau - [PT] si les modules mod_alias et - mod_userdir sont utiliss, etc... Les jeux de - rgles devront galement tre adapts pour passer d'un contexte de - serveur un contexte de rpertoire (fichiers - .htaccess). Essayez de toujours bien comprendre ce que - fait un jeu de rgles avant de l'utiliser, ce qui pourra vous viter - bien des problmes.
    - -
    - -
    top
    -
    -

    Accs une grappe de serveurs via un espace d'adressage - compatible

    - - - -
    -
    Description :
    - -
    -

    Comment crer un espace d'adressage homogne et compatible - avec - tous les serveurs WWW d'une grappe de serveurs d'un intranet ? - C'est dire que toutes les URLs (par dfinition - locales un - serveur et dpendant donc de celui-ci) deviennent - vritablement indpendantes du serveur ! Nous voulons - disposer, pour accder l'espace de nommage WWW, d'un seul - espace d'adressage compatible : aucune URL ne - doit inclure d'information quelconque propos du serveur - cible physique. La grappe de serveurs doit elle-mme nous - diriger automatiquement vers le bon serveur cible physique, - selon les besoins, et ceci de manire transparente.

    -
    - -
    Solution :
    - -
    -

    Tout d'abord, la connaissance des serveurs cibles est issue - de tables de correspondances externes (distribues) qui - contiennent des informations sur la localisation de nos - utilisateurs, groupes et entits. Elles se prsentent sous la - forme :

    - -
    -utilisateur1  serveur_utilisateur1
    -utilisateur2  serveur_utilisateur2
    -:      :
    -
    - -

    On les enregistre sous forme de fichiers - map.xxx-vers-serveur. On doit ensuite faire - rediriger tous les serveurs les URLs de la forme :

    - -
    -/u/utilisateur/chemin
    -/g/groupe/chemin
    -/e/entit/chemin
    -
    - -

    vers

    - -
    -http://serveur-physique/u/utilisateur/chemin
    -http://serveur-physique/g/groupe/chemin
    -http://serveur-physique/e/entit/chemin
    -
    - -

    si il n'est pas ncessaire que chaque chemin d'URL tre valide sur chaque - serveur. Le jeu - de rgles suivant le fait pour nous l'aide des fichiers de - correspondance (en supposant que serveur0 soit un serveur par - dfaut qui sera choisi si l'utilisateur ne possde aucune - entre dans la table) :

    - -
    -RewriteEngine on
    -
    -RewriteMap      utilisateur-vers-serveur   txt:/chemin/vers/map.utilisateur-vers-serveur
    -RewriteMap     groupe-vers-serveur   txt:/chemin/vers/map.groupe-vers-serveur
    -RewriteMap    entit-vers-serveur   txt:/chemin/vers/map.entit-vers-serveur
    -
    -RewriteRule   ^/u/([^/]+)/?(.*)
    -http://${utilisateur-vers-serveur:$1|serveur0}/u/$1/$2
    -RewriteRule   ^/g/([^/]+)/?(.*)
    -http://${groupe-vers-serveur:$1|serveur0}/g/$1/$2
    -RewriteRule   ^/e/([^/]+)/?(.*)
    -http://${entit-vers-serveur:$1|serveur0}/e/$1/$2
    -
    -RewriteRule   ^/([uge])/([^/]+)/?$          /$1/$2/.www/
    -RewriteRule   ^/([uge])/([^/]+)/([^.]+.+)   /$1/$2/.www/$3\
    -
    -
    -
    - -
    top
    -
    -

    Rpertoires utilisateurs structurs

    - - - -
    -
    Description :
    - -
    -

    Certains sites possdant des milliers d'utilisateurs - organisent les rpertoires home de manire - structure, c'est dire que chaque rpertoire home - se situe dans un sous-rpertoire dont le nom commence (par - exemple) par le premier caractre du nom de l'utilisateur. - Ainsi, /~foo/chemin est dans - /home/f/foo/.www/chemin, tandis - que /~bar/chemin est dans - /home/b/bar/.www/chemin.

    -
    - -
    Solution :
    - -
    -

    Le jeu de rgles suivant permet de dvelopper les URLs avec - tilde selon la reprsentation ci-dessus.

    - -
    -RewriteEngine on
    -RewriteRule   ^/~(([a-z])[a-z0-9]+)(.*)  /home/$2/$1/.www$3
    -
    -
    -
    - -
    top
    -
    -

    Rorganisation du systme de fichiers

    - - - -
    -
    Description :
    - -
    -

    Voici un cas d'espce : une application trs efficace qui - fait un usage intensif de rgles RewriteRule - dans le contexte du rpertoire pour prsenter un aspect - comprhensible sur le Web sans modifier la structure des - donnes. - Les coulisses de l'affaire : net.sw - rassemble mes archives de paquetages de logiciels Unix - librement accessibles, que j'ai commenc collectionner en - 1992. Pour moi, c'est un passe-temps, mais aussi un travail, - car alors que j'tudie la science informatique, j'ai aussi - travaill depuis de nombreuses annes comme administrateur - systme et rseau mes heures perdues. Chaque semaine j'ai - besoin de tel ou tel logiciel, et j'ai donc cr une - arborescence trs ramifie de rpertoires o je stocke les - paquetages :

    - -
    -drwxrwxr-x   2 netsw  users    512 Aug  3 18:39 Audio/
    -drwxrwxr-x   2 netsw  users    512 Jul  9 14:37 Benchmark/
    -drwxrwxr-x  12 netsw  users    512 Jul  9 00:34 Crypto/
    -drwxrwxr-x   5 netsw  users    512 Jul  9 00:41 Database/
    -drwxrwxr-x   4 netsw  users    512 Jul 30 19:25 Dicts/
    -drwxrwxr-x  10 netsw  users    512 Jul  9 01:54 Graphic/
    -drwxrwxr-x   5 netsw  users    512 Jul  9 01:58 Hackers/
    -drwxrwxr-x   8 netsw  users    512 Jul  9 03:19 InfoSys/
    -drwxrwxr-x   3 netsw  users    512 Jul  9 03:21 Math/
    -drwxrwxr-x   3 netsw  users    512 Jul  9 03:24 Misc/
    -drwxrwxr-x   9 netsw  users    512 Aug  1 16:33 Network/
    -drwxrwxr-x   2 netsw  users    512 Jul  9 05:53 Office/
    -drwxrwxr-x   7 netsw  users    512 Jul  9 09:24 SoftEng/
    -drwxrwxr-x   7 netsw  users    512 Jul  9 12:17 System/
    -drwxrwxr-x  12 netsw  users    512 Aug  3 20:15 Typesetting/
    -drwxrwxr-x  10 netsw  users    512 Jul  9 14:08 X11/
    -
    - -

    J'ai dcid en 1996 de rendre cette archive disponible pour - le monde via une interface web agrable. "Agrable" signifie - que je voulais vous offrir une interface o vous pourriez - naviguer directement travers la hirarchie des archives. - Mais "agrable" signifie aussi que je ne voulais rien changer - dans cette hirarchie - mme pas en ajoutant queques scripts - CGI son sommet. Pourquoi ? Parceque j'avais prvu de rendre - ultrieurement la structure ci-dessus accessible aussi via - FTP, et je ne voulais pas voir de fichiers CGI ou Web ce - niveau.

    -
    - -
    Solution :
    - -
    -

    La solution comporte deux parties : la premire consiste en - un ensemble de scripts CGI qui crent toutes les pages tous - les niveaux de rpertoires la vole. Je les ai placs dans - /e/netsw/.www/ comme suit :

    - -
    --rw-r--r--   1 netsw  users    1318 Aug  1 18:10 .wwwacl
    -drwxr-xr-x  18 netsw  users     512 Aug  5 15:51 DATA/
    --rw-rw-rw-   1 netsw  users  372982 Aug  5 16:35 LOGFILE
    --rw-r--r--   1 netsw  users     659 Aug  4 09:27 TODO
    --rw-r--r--   1 netsw  users    5697 Aug  1 18:01 netsw-about.html
    --rwxr-xr-x   1 netsw  users     579 Aug  2 10:33 netsw-access.pl
    --rwxr-xr-x   1 netsw  users    1532 Aug  1 17:35 netsw-changes.cgi
    --rwxr-xr-x   1 netsw  users    2866 Aug  5 14:49 netsw-home.cgi
    -drwxr-xr-x   2 netsw  users     512 Jul  8 23:47 netsw-img/
    --rwxr-xr-x   1 netsw  users   24050 Aug  5 15:49 netsw-lsdir.cgi
    --rwxr-xr-x   1 netsw  users    1589 Aug  3 18:43 netsw-search.cgi
    --rwxr-xr-x   1 netsw  users    1885 Aug  1 17:41 netsw-tree.cgi
    --rw-r--r--   1 netsw  users     234 Jul 30 16:35 netsw-unlimit.lst
    -
    - -

    Le sous-rpertoire DATA/ contient la structure - de rpertoires proprement dite mentionne plus haut, c'est - dire les vritables ressources - net.sw et est mis jour - automatiquement via rdist intervalles de temps - rguliers. Reste la seconde partie du problme : comment - relier ces deux structures selon une arborescence d'URL - facile d'accs ? Il nous faut cacher le rpertoire - DATA/ l'utilisateur durant l'excution des - scripts CGI appropris aux diffrentes URLs. Voici comment : - tout d'abord, j'ajoute ces deux rgles dans le fichier de - configuration du rpertoire racine DocumentRoot du serveur afin de - rcrire le chemin d'URL public /net.sw/ vers le - chemin interne /e/netsw :

    - -
    -RewriteRule  ^net.sw$       net.sw/        [R]
    -RewriteRule  ^net.sw/(.*)$  e/netsw/$1
    -
    - -

    La premire rgle concerne les requtes qui ne comportent - pas de slash de fin ! C'est la seconde rgle qui fait le - vritable travail. Et maintenant vient la super configuration - qui se trouve dans le fichier de configuration de rpertoire - /e/netsw/.www/.wwwacl :

    - -
    -Options       ExecCGI FollowSymLinks Includes MultiViews
    -
    -RewriteEngine on
    -
    -#  l'accs s'effectue via le prfixe /net.sw/
    -RewriteBase   /net.sw/
    -
    -#  tout d'abord, on rcrit le rpertoire racine vers
    -#  le script CGI qui lui est associ
    -RewriteRule   ^$                       netsw-home.cgi     [L]
    -RewriteRule   ^index\.html$            netsw-home.cgi     [L]
    -
    -#  on supprime les sous-rpertoires lorsque
    -#  le navigateur nous atteint depuis des pages de rpertoire
    -RewriteRule   ^.+/(netsw-[^/]+/.+)$    $1                 [L]
    -
    -#  on stoppe maintenant la rcriture pour les fichiers locaux
    -RewriteRule   ^netsw-home\.cgi.*       -                  [L]
    -RewriteRule   ^netsw-changes\.cgi.*    -                  [L]
    -RewriteRule   ^netsw-search\.cgi.*     -                  [L]
    -RewriteRule   ^netsw-tree\.cgi$        -                  [L]
    -RewriteRule   ^netsw-about\.html$      -                  [L]
    -RewriteRule   ^netsw-img/.*$           -                  [L]
    -
    -#  ce qui reste est un sous-rpertoire qui peut tre trait
    -#  par un autre script CGI
    -RewriteRule   !^netsw-lsdir\.cgi.*     -                  [C]
    -RewriteRule   (.*)                     netsw-lsdir.cgi/$1
    -
    - -

    Quelques indices pour l'interprtation :

    - -
      -
    1. Remarquez le drapeau L (last) et l'absence - de chane de substitution ('-') dans la - quatrime partie.
    2. - -
    3. Remarquez le caractre ! (not) et le - drapeau C (chain) dans la premire rgle de la - dernire partie.
    4. - -
    5. Remarquez le modle qui correspond tout dans la - dernire rgle.
    6. -
    -
    -
    - -
    top
    -
    -

    Rediriger les URLs errones vers un autre serveur Web

    - - - -
    -
    Description :
    - -
    -

    Une question typique de la FAQ propos de la rcriture - revient souvent : comment rediriger vers un serveur B les - requtes qui chouent sur un serveur A ? On s'acquitte en - gnral de cette tche via des scripts CGI ErrorDocument en Perl, mais il - existe aussi une solution avec mod_rewrite. - Notez cependant que les performances sont moindres qu'avec - l'utilisation d'un script CGI ErrorDocument !

    -
    - -
    Solution :
    - -
    -

    La premire solution possde des performances suprieures - mais moins de souplesse, et est moins sure :

    - -
    -RewriteEngine on
    -RewriteCond  %{DOCUMENT_ROOT/%{REQUEST_URI}  !-f
    -RewriteRule   ^(.+)                             http://serveurB.dom/$1
    -
    - -

    Le problme rside dans le fait que seules les pages - situes dans la racine DocumentRoot seront rediriges. Mais - mme si vous pouvez ajouter des conditions supplmentaires (par - exemple pour traiter aussi les rpertoires home, etc...), il - existe une meilleure solution :

    - -
    -RewriteEngine on
    -RewriteCond   %{REQUEST_URI} !-U
    -RewriteRule   ^(.+)          http://serveurB.dom/$1
    -
    -reprendre ici -

    On utilise ici la fonctionnalit de prvision des URLs - futures de mod_rewrite. Et cette solution - fonctionne pour tous les types d'URLs et de manire sre. Par - contre, cette mthode a un impact sur les performances du - serveur web, car chaque requte entrane le traitement d'une - sous-requte interne supplmentaire. Par consquent, vous - pouvez l'utiliser si votre serveur web s'excute sur un CPU - puissant. Dans le cas d'une machine plus lente, utilisez la - premire approche, ou mieux, un script CGI ErrorDocument.

    -
    -
    - -
    top
    -
    -

    Multiplexeur d'accs aux archives

    - - - -
    -
    Description :
    - -
    -

    Connaissez-vous la grande archive CPAN (Comprehensive Perl Archive - Network) situe http://www.perl.com/CPAN ? - CPAN redirige automatiquement les navigateurs vers un des - nombreux serveurs FTP rpartis travers le monde - (gnralement un serveur assez proche du client) ; chaque - serveur hberge l'intgralit d'un miroir CPAN. Il s'agit ni - plus ni moins qu'un service d'accs FTP multiplex. Alors que - le fonctionnement de l'archive CPAN repose sur des scripts - CGI, comment implmenter une approche similaire avec - mod_rewrite ?

    -
    - -
    Solution :
    - -
    -

    Premirement, remarquons que depuis la version 3.0.0, - mod_rewrite accepte aussi le prfixe - "ftp:" dans les redirections. Et deuximement, - l'approximation de la localisation peut tre effectue par une - table de correspondances RewriteMap, en se basant sur - la racine du domaine du client. Un jeu de rgles chanes - astucieux nous permet d'utiliser cette racine du domaine comme - cl de recherche dans notre table de correspondances de - multiplexage.

    - -
    -RewriteEngine on
    -RewriteMap    multiplex                txt:/chemin/vers/map.cxan
    -RewriteRule   ^/CxAN/(.*)              %{REMOTE_HOST}::$1                 [C]
    -RewriteRule   ^.+\.([a-zA-Z]+)::(.*)$
    -${multiplex:$1|ftp.dfaut.dom}$2  [R,L]
    -
    - -
    -##
    -##  map.cxan -- Multiplexing Map for CxAN%{DOCUMENT_ROOT/%{REQUEST_URI}
    -##
    -
    -de        ftp://ftp.cxan.de/CxAN/
    -uk        ftp://ftp.cxan.uk/CxAN/
    -com       ftp://ftp.cxan.com/CxAN/
    - :
    -##EOF##
    -
    -
    -
    - -
    top
    -
    -

    Contenu dpendant du navigateur

    - - - -
    -
    Description :
    - -
    -

    Il est parfois ncessaire, au moins pour les pages - principales, de fournir un contenu optimum adapt chaque - type de navigateur, c'est dire que l'on doit - fournir une version pour les navigateurs courants, une version - diffrente pour les navigateurs en mode texte du style de - Lynx, et une autre pour les autres navigateurs.

    -
    - -
    Solution :
    - -
    -

    On ne peut pas utiliser la ngociation de contenu car les - navigateurs ne fournissent pas leur type dans cette forme. - Nous devons nous baser sur l'en-tte HTTP "User-Agent". La - configuration ci-dessous effectue les actions suivantes : si - l'en-tte HTTP "User-Agent" commence par "Mozilla/3", la page - foo.html est rcrite en foo.NS.html - et la rcriture s'arrte. Si le navigateur est "Lynx" ou - "Mozilla" version 1 ou 2, la page - foo.html est rcrite en - foo.20.html. Tous les autres navigateurs - reoivent la page foo.32.html. Voici le jeu de - rgles :

    - -
    -RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/3.*
    -RewriteRule ^foo\.html$         foo.NS.html          [L]
    -
    -RewriteCond %{HTTP_USER_AGENT}  ^Lynx/.*         [OR]
    -RewriteCond %{HTTP_USER_AGENT}  ^Mozilla/[12].*
    -RewriteRule ^foo\.html$         foo.20.html          [L]
    -
    -RewriteRule ^foo\.html$         foo.32.html          [L]
    -
    -
    -
    - -
    top
    -
    -

    Miroir dynamique

    - - - -
    -
    Description :
    - -
    -

    Supposons que nous voulions intgrer dans notre espace de - nommage de belles pages web situes sur un serveur distant. - Dans le cas d'un serveur FTP, nous aurions utilis le - programme mirror qui maintient vraiment une copie - des donnes distantes mise jour explicitement sur le serveur - local. Pour un serveur web, nous pourrions utiliser le - programme webcopy qui utilise le protocole HTTP. - Ces deux techniques prsentent cependant un - inconvnient majeur : la copie locale n'est vritablement - jour qu'au moment o nous avons lanc le programme. Plutt qu' - un miroir statique devant tre dfini explicitement, il serait - prfrable d'avoir un miroir dynamique dont le contenu serait - mis jour automatiquement, la demande, sur le(s) serveur(s) - distant(s).

    -
    - -
    Solution :
    - -
    -

    Pour y parvenir, on fait - correspondre la page web ou mme l'ensemble du - rpertoire web distants notre espace de nommage en utilisant - la fonctionnalit Mandataire (drapeau - [P] ou [proxy]) :

    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^page-convoite/(.*)$  http://www.tstimpreso.com/page-convoite/$1  [P]
    -
    - -
    -RewriteEngine  on
    -RewriteBase    /~quux/
    -RewriteRule    ^usa-news\.html$   http://www.quux-corp.com/news/index.html  [P]
    -
    -
    -
    - -
    top
    -
    -

    Miroir dynamique inverse

    - - - -
    -
    Description :
    - -
    ...
    - -
    Solution :
    - -
    -
    -RewriteEngine on
    -RewriteCond   /miroir/du/site-distant/$1           -U
    -RewriteRule   ^http://www\.site-distant\.com/(.*)$ /miroir/du/site-distant/$1
    -
    -
    -
    - -
    top
    -
    -

    Rcuprer des donnes manquantes depuis l'Intranet

    - - - -
    -
    Description :
    - -
    -

    C'est une mthode astucieuse permettant de faire - fonctionner virtuellement un serveur web d'entreprise - (www.quux-corp.dom) sur - l'Internet (extrieur l'entreprise), tout en maintenant et - conservant dans la ralit ses donnes sur un serveur web - (www2.quux-corp.dom) de l'Intranet (interne - l'entreprise) protg par un pare-feu. L'astuce consiste, sur - le serveur web externe, rcuprer la vole sur le serveur interne - les donnes demandes.

    -
    - -
    Solution :
    - -
    -

    Tout d'abord, nous devons nous assurer que notre pare-feu - protge bien le serveur web interne, et que seul le serveur - web externe est autoris y rcuprer des donnes. Dans le - cas d'un filtrage par paquets, nous pourrions par exemple - dfinir un jeu de rgles du pare-feu du style :

    - -
    -ALLOW serveur www.quux-corp.dom Port >1024 -->
    -serveur www2.quux-corp.dom Port 80
    -DENY  serveur *                 Port *     -->
    -serveur www2.quux-corp.dom Port 80
    -
    - -

    Il vous suffit d'adapter ces rgles la syntaxe de votre - pare-feu. Nous pouvons maintenant dfinir les rgles de - mod_rewrite qui serviront rcuprer les - donnes manquantes en arrire-plan via la fonctionnalit de - mandataire :

    - -
    -RewriteRule ^/~([^/]+)/?(.*)          /home/$1/.www/$2 [C]
    -# L'utilisation de REQUEST_FILENAME ci dessous est correcte dans cet
    -# exemple de contexte au niveau serveur car la rgle qui fait rfrence
    -#  REQUEST_FILENAME est chane  une rgle qui dfinit
    -# REQUEST_FILENAME.
    -RewriteCond %{REQUEST_FILENAME}       !-f
    -RewriteCond %{REQUEST_FILENAME}       !-d
    -RewriteRule ^/home/([^/]+)/.www/?(.*) http://www2.quux-corp.dom/~$1/pub/$2 [P]
    -
    -
    -
    - -
    top
    -
    -

    Rpartition de charge

    - - - -
    -
    Description :
    - -
    -

    Supposons que nous voulions rpartir la charge du trafic - vers www.example.com entre les serveurs - www[0-5].example.com (un total de 6 serveurs). - Comment y parvenir ?

    -
    - -
    Solution :
    - -
    -

    Il existe de nombreuses solutions ce problme. Nous - dcrirons tout d'abord une variante assez connue base sur - DNS, puis une autre base sur mod_rewrite - :

    - -
      -
    1. - Round-Robin (tourniquet) DNS - -

      La mthode de rpartition de charge la plus simple - consiste utiliser le "DNS round-robin" - (rotation d'adresses) de - BIND. Vous devez seulement enregistrer les - serveurs www[0-9].example.com de manire - habituelle dans votre DNS l'aide d'enregistrements de - type A (adresse), comme suit :

      - -
      -www0   IN  A       1.2.3.1
      -www1   IN  A       1.2.3.2
      -www2   IN  A       1.2.3.3
      -www3   IN  A       1.2.3.4
      -www4   IN  A       1.2.3.5
      -www5   IN  A       1.2.3.6
      -
      - -

      Puis vous ajoutez les entres suivantes :

      - -
      -www   IN  A       1.2.3.1
      -www   IN  A       1.2.3.2
      -www   IN  A       1.2.3.3
      -www   IN  A       1.2.3.4
      -www   IN  A       1.2.3.5
      -
      - -

      Maintenant, lors de la rsolution de - www.example.com, BIND renvoie - www0-www5 - mais selon une permutation - diffrente chaque fois. De cette faon, les clients sont - rpartis entre les diffrents serveurs. Notez cependant - que cette mthode de rpartition de charge n'est pas - parfaite, car les rsolutions DNS sont mises en cache par - les clients et les autres serveurs DNS du rseau, si - bien que lorsqu'un client s'est vu rsoudre - www.example.com en un des - wwwN.example.com, toutes ses requtes ultrieures - continueront d'aller vers la mme adresse IP (et donc le - mme serveur), au lieu d'tre rparties entre les autres - serveurs. Le rsultat est cependant globalement - satisfaisant car les requtes sont rparties - collectivement entre chacun des serveurs web.

      -
    2. - -
    3. - Rpartition de charge base sur DNS - -

      Une mthode de rpartition de charge sophistique base - sur DNS consiste utiliser le programme - lbnamed que l'on peut trouver - http://www.stanford.edu/~riepel/lbnamed/. - Associ des outils auxiliaires, il s'agit d'un programme - en Perl 5 qui permet d'effectuer une vritable rpartition - de charge base sur DNS.

      -
    4. - -
    5. - Round-Robin bas sur la fonctionnalit de - mandataire - -

      Dans cette variante, nous utilisons - mod_rewrite et sa fonctionnalit de - mandataire. Tout d'abord, nous dfinissons - www0.example.com comme un autre nom de - www.example.com en ajoutant l'entre

      - -
      -www    IN  CNAME   www0.example.com.
      -
      - -

      dans le DNS. Puis nous dfinissons - www0.example.com comme serveur mandataire - seulement, c'est dire que nous configurons cette machine - de telle sorte que toutes les URLs qui lui arrivent soient - simplement transmises, via le mandataire interne, vers un - des 5 autres serveurs (www1-www5). Pour y - parvenir, nous dfinissons tout d'abord un jeu de rgles - qui contacte un script de rpartition de charge - lb.pl pour toutes les URLs.

      - -
      -RewriteEngine on
      -RewriteMap    lb      prg:/chemin/vers/lb.pl
      -RewriteRule   ^/(.+)$ ${lb:$1}           [P,L]
      -
      - -

      Puis nous crivons lb.pl :

      - -
      -#!/chemin/vers/perl
      -##
      -##  lb.pl -- script de rpartition de charge
      -##
      -
      -$| = 1;
      -
      -$name   = "www";     # la base du nom du serveur
      -$first  = 1;         # le premier serveur (pas 0 ici, car 0 correspond 
      -		     # moi-mme)
      -$last   = 5;         # le dernier serveur du tourniquet
      -$domain = "foo.dom"; # le nom de domaine
      -
      -$cnt = 0;
      -while (<STDIN>) {
      -    $cnt = (($cnt+1) % ($last+1-$first));
      -    $server = sprintf("%s%d.%s", $name, $cnt+$first, $domain);
      -    print "http://$server/$_";
      -}
      -
      -##EOF##
      -
      - -
      Une dernire remarque : quoi cela sert-il ? - www0.example.com, quant lui, n'est-il pas - toujours surcharg ? La rponse est oui, il est surcharg, - mais seulement avec des requtes de mandataire ! Tous les - traitements SSI, CGI, ePerl, etc... sont entirement - effectus sur les autres machines. Ceci peut fonctionner - correctement pour un site complexe. Le plus grand risque - rside ici dans le fait que www0 est un passage oblig et - que s'il est hors service, les autres serveurs deviennent - inaccessibles.
      -
    6. - -
    7. - Rpartiteur de charge ddi - -

      Il existe aussi des solutions plus sophistiques. - Cisco, F5, et de nombreuses autres socits proposent - des rpartiteurs de charge matriels (utiliss en gnral - en mode doubl des fins de redondance), qui offrent une - rpartition de charge sophistique et des fonctionnalits - de passage automatique en mode de fonctionnement par dfaut - en cas de problme. Cependant, des solutions logicielles - offrent aussi des fonctionnalits similaires avec du - matriel standard. Si vos besoins correspondent et si vous - tes assez riche, vous pouvez envisager ces solutions. La - liste de diffusion lb-l - est un bon point de dpart pour vos recherches.

      -
    8. -
    -
    -
    - -
    top
    -
    -

    Nouveau type MIME, nouveau service

    - - - -
    -
    Description :
    - -
    -

    On trouve de nombreux programmes CGI attractifs sur le - rseau. Mais leur emploi est souvent rbarbatif, si bien que - de nombreux webmasters ne les utilisent pas. Mme la - fonctionnalit de gestionnaire Action d'Apache pour les types - MIME ne convient que lorsque les programmes CGI ne ncessitent - pas d'URLs spciales (rellement PATH_INFO et - QUERY_STRINGS) en entre. Tout d'abord, - dfinissons un nouveau type de fichier ayant pour extension - .scgi (pour CGI scuris) qui sera associ pour - traitement au programme populaire cgiwrap. Le - problme est le suivant : par exemple, si on utilise un style - d'URL bien dfini (voir ci-dessus), un fichier situ dans le - rpertoire home de l'utilisateur pourra correspondre l'URL - /u/user/foo/bar.scgi. Mais cgiwrap - ncessite des URLs de la forme - /~user/foo/bar.scgi/. La rgle suivante apporte - la solution :

    - -
    -RewriteRule ^/[uge]/([^/]+)/\.www/(.+)\.scgi(.*) ...
    -... /interne/cgi/utilisateur/cgiwrap/~$1/$2.scgi$3  [NS,T=application/x-http-cgi]
    -
    - -

    Ou considrons ces autres programmes attractifs : - wwwlog (qui affiche le journal des accs - access.log pour un sous rpertoire correspondant - une URL) et wwwidx (qui excute Glimpse sur un - sous rpertoire correspondant une URL). Nous devons fournir - l'URL correspondante ces programmes afin qu'ils sachent sur - quel rpertoire ils doivent agir. Mais c'est en gnral - compliqu, car ils peuvent tre appels nouveau - par la forme d'URL alternative, c'est dire que typiquement, - nous excuterions le programme swwidx depuis - /u/user/foo/ via un hyperlien vers

    - -
    -/internal/cgi/user/swwidx?i=/u/user/foo/
    -
    - -

    ce qui n'est pas satisfaisant, car nous devons expliciter - la fois la localisation du rpertoire - et la localisation du programme CGI dans - l'hyperlien. Si nous devons nous rorganiser, il nous faudra - beaucoup de temps pour modifier tous les hyperliens.

    -
    - -
    Solution :
    - -
    -

    La solution consiste ici fournir un nouveau format d'URL - qui redirige automatiquement vers la requte CGI approprie. - Pour cela, on dfinit les rgles suivantes :

    - -
    -RewriteRule   ^/([uge])/([^/]+)(/?.*)/\*  /interne/cgi/utilisateur/wwwidx?i=/$1/$2$3/
    -RewriteRule   ^/([uge])/([^/]+)(/?.*):log /interne/cgi/utilisateur/wwwlog?f=/$1/$2$3
    -
    - -

    Et maintenant l'hyperlien qui renvoie vers - /u/user/foo/ se rduit

    - -
    -HREF="*"
    -
    - -

    qui est automatiquement transform en interne en

    - -
    -/internal/cgi/user/wwwidx?i=/u/user/foo/
    -
    - -

    Une approche similaire permet d'invoquer le programme CGI - du journal des accs lorsque l'hyperlien :log est - utilis.

    -
    -
    - -
    top
    -
    -

    Rgneration de contenu la vole

    - - - -
    -
    Description :
    - -
    -

    Voici une fonctionnalit vraiment sotrique : des pages - gnres dynamiquement mais servies statiquement, c'est - dire que les pages doivent tre servies comme des pages - purement statiques (lues depuis le systme de fichiers et - servies en l'tat), mais doivent tre gnres dynamiquement - par le serveur web si elles sont absentes. Ainsi, vous pouvez - avoir des pages gnres par CGI qui sont servies statiquement - moins qu'un administrateur (ou une tche de - cron) ne supprime les - contenus statiques. Les contenus sont ensuite actualiss.

    -
    - -
    Solution :
    - -
    - A cet effet, on utilise le jeu de rgles suivant : - -
    -# Cet exemple n'est valable que dans un contexte de rpertoire
    -RewriteCond %{REQUEST_FILENAME}   !-s
    -RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]
    -
    - -

    Ainsi, une requte pour page.html entrane - l'excution interne de la page page.cgi - correspondante si page.html n'existe pas - ou possde une taille de fichier nulle. L'astuce rside ici - dans le fait que page.cgi est un script CGI - qui (en plus de STDOUT) crit sa sortie dans le - fichier page.html. Une fois le script excut, le - serveur sert la page page.html frachement - gnre. Si le webmaster - veut actualiser les contenus, il lui suffit de supprimer le - fichier page.html (le plus souvent via une tche - de cron).

    -
    -
    - -
    top
    -
    -

    Actualisation automatique d'un document

    - - - -
    -
    Description :
    - -
    -

    Lorsque nous crons une page web complexe, ne serait-il pas - souhaitable que le navigateur web actualise automatiquement la - page chaque fois que nous en sauvegardons une nouvelle version - partir de notre diteur ? Impossible ?

    -
    - -
    Solution :
    - -
    -

    Non ! Nous allons pour cela combiner la fonctionnalit MIME - multipart, la fonctionnalit NPH du serveur web et la - puissance de mod_rewrite pour la manipulation - d'URLs. Tout d'abord, nous dfinissons une nouvelle - fonctionnalit pour les URLs : l'ajout de - :refresh toute URL fait que la 'page' est - actualise chaque fois que la ressource est mise jour dans - le systme de fichiers.

    - -
    -RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /interne/cgi/apache/nph-refresh?f=$1
    -
    - -

    Nous appelons maintenant cette URL

    - -
    -/u/foo/bar/page.html:refresh
    -
    - -

    ce qui entrane en interne l'invocation de l'URL

    - -
    -/interne/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
    -
    - -

    Il ne reste plus qu' crire le script CGI. Bien que l'on - crive habituellement dans ces cas "laiss la charge du - lecteur titre d'exercice", ;-) je vous l'offre, aussi.

    - -
    -#!/sw/bin/perl
    -##
    -##  nph-refresh -- script NPH/CGI pour l'actualisation automatique de
    -##  pages
    -##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
    -##
    -$| = 1;
    -
    -#   clate la variable QUERY_STRING
    -@pairs = split(/&/, $ENV{'QUERY_STRING'});
    -foreach $pair (@pairs) {
    -    ($name, $value) = split(/=/, $pair);
    -    $name =~ tr/A-Z/a-z/;
    -    $name = 'QS_' . $name;
    -    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    -    eval "\$$name = \"$value\"";
    -}
    -$QS_s = 1 if ($QS_s eq '');
    -$QS_n = 3600 if ($QS_n eq '');
    -if ($QS_f eq '') {
    -    print "HTTP/1.0 200 OK\n";
    -    print "Content-type: text/html\n\n";
    -    print "&lt;b&gt;ERREUR&lt;/b&gt;: Aucun fichier fourni\n";
    -    exit(0);
    -}
    -if (! -f $QS_f) {
    -    print "HTTP/1.0 200 OK\n";
    -    print "Content-type: text/html\n\n";
    -    print "&lt;b&gt;ERREUR&lt;/b&gt;: Fichier $QS_f non trouv\n";
    -    exit(0);
    -}
    -
    -sub print_http_headers_multipart_begin {
    -    print "HTTP/1.0 200 OK\n";
    -    $bound = "ThisRandomString12345";
    -    print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
    -    &print_http_headers_multipart_next;
    -}
    -
    -sub print_http_headers_multipart_next {
    -    print "\n--$bound\n";
    -}
    -
    -sub print_http_headers_multipart_end {
    -    print "\n--$bound--\n";
    -}
    -
    -sub displayhtml {
    -    local($buffer) = @_;
    -    $len = length($buffer);
    -    print "Content-type: text/html\n";
    -    print "Content-length: $len\n\n";
    -    print $buffer;
    -}
    -
    -sub readfile {
    -    local($file) = @_;
    -    local(*FP, $size, $buffer, $bytes);
    -    ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
    -    $size = sprintf("%d", $size);
    -    open(FP, "&lt;$file");
    -    $bytes = sysread(FP, $buffer, $size);
    -    close(FP);
    -    return $buffer;
    -}
    -
    -$buffer = &readfile($QS_f);
    -&print_http_headers_multipart_begin;
    -&displayhtml($buffer);
    -
    -sub mystat {
    -    local($file) = $_[0];
    -    local($time);
    -
    -    ($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
    -    return $mtime;
    -}
    -
    -$mtimeL = &mystat($QS_f);
    -$mtime = $mtime;
    -for ($n = 0; $n &lt; $QS_n; $n++) {
    -    while (1) {
    -        $mtime = &mystat($QS_f);
    -        if ($mtime ne $mtimeL) {
    -            $mtimeL = $mtime;
    -            sleep(2);
    -            $buffer = &readfile($QS_f);
    -            &print_http_headers_multipart_next;
    -            &displayhtml($buffer);
    -            sleep(5);
    -            $mtimeL = &mystat($QS_f);
    -            last;
    -        }
    -        sleep($QS_s);
    -    }
    -}
    -
    -&print_http_headers_multipart_end;
    -
    -exit(0);
    -
    -##EOF##
    -
    -
    -
    - -
    top
    -
    -

    Hbergement virtuel de masse

    - - - -
    -
    Description :
    - -
    -

    La fonctionnalit <VirtualHost> d'Apache est intressante et - fonctionne de manire satisfaisante jusqu' quelques - douzaines de serveurs virtuels. Par contre, si vous tes un - FAI et devez hberger des centaines de serveurs virtuels, - cette mthode n'est pas optimale.

    -
    - -
    Solution :
    - -
    -

    Pour fournir cette fonctionnalit avec - mod_rewrite, on fait correspondre notre espace de - nommage la page web ou mme le rpertoire complet distants en - utilisant la fonctionnalit Mandataire - (drapeau [P]) :

    - -
    -##
    -##  vhost.map
    -##
    -www.vhost1.dom:80  /chemin/vers/racine-doc/vhost1
    -www.vhost2.dom:80  /chemin/vers/racine-doc/vhost2
    -     :
    -www.vhostN.dom:80  /chemin/vers/racine-doc/vhostN
    -
    - -
    -##
    -##  httpd.conf
    -##
    -    :
    -#   utilisation du nom d'hte canonique pour les redirections, etc...
    -UseCanonicalName on
    -
    -    :
    -#   ajout du serveur virtuel en tte du format CLF
    -CustomLog  /chemin/vers/access_log  "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
    -    :
    -
    -#   activation du moteur de rcriture pour le serveur principal
    -RewriteEngine on
    -
    -#   dfinition de deux tables de correspondances : une premire pour
    -#   corriger les URLs et une seconde qui associe les serveurs virtuels
    -#   disponibles avec leurs racines des documents correspondantes.
    -RewriteMap    lowercase    int:tolower
    -RewriteMap    vhost        txt:/chemin/vers/vhost.map
    -
    -#   et enfin slection proprement dite du serveur virtuel appropri via
    -#   une seule rgle longue et complexe :
    -#
    -#   1. on s'assure de ne pas slectionner un hte virtuel pour les
    -#   adresses communes
    -
    -RewriteCond   %{REQUEST_URI}  !^/adresse-commune1/.*
    -RewriteCond   %{REQUEST_URI}  !^/adresse-commune2/.*
    -    :
    -RewriteCond   %{REQUEST_URI}  !^/adresse-communeN/.*
    -#
    -#   2. on vrifie que l'on dispose bien d'un en-tte Host, car
    -#   actuellement, cette mthode ne peut faire de l'hbergement virtuel
    -#   qu'avec cet en-tte
    -RewriteCond   %{HTTP_HOST}  !^$
    -#
    -#   3. mise en minuscules du nom d'hte
    -RewriteCond   ${lowercase:%{HTTP_HOST}|NONE}  ^(.+)$
    -#
    -#   4. recherche ce ce nom d'hte dans vhost.map et
    -#      enregistrement de celui-ci seulement s'il s'agit d'un chemin
    -#      (et non "NONE" en provenance de la condition prcdente)
    -RewriteCond   ${vhost:%1}  ^(/.*)$
    -#
    -#   5. nous pouvons enfin faire correspondre l'URL avec la racine des
    -#   documents correspondant au serveur virtuel appropri et enregistrer
    -#   ce dernier  des fins de journalisation
    -RewriteRule   ^/(.*)$   %1/$1  [E=VHOST:${lowercase:%{HTTP_HOST}}]
    -    :
    -
    -
    -
    - -
    top
    -
    -

    Interdiction d'htes

    - - - -
    -
    Description :
    - -
    -

    Comment interdire l'accs notre serveur une liste - d'htes ?

    -
    - -
    Solution :
    - -
    -

    Pour Apache >= 1.3b6 :

    - -
    -RewriteEngine on
    -RewriteMap    htes-interdits  txt:/chemin/vers/htes-interdits
    -RewriteCond   ${htes-interdits:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
    -RewriteCond   ${htes-interdits:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule   ^/.*  -  [F]
    -
    - -

    Pour Apache <= 1.3b6 :

    - -
    -RewriteEngine on
    -RewriteMap    htes-interdits  txt:/chemin/vers/htes-interdits
    -RewriteRule   ^/(.*)$ ${htes-interdits:%{REMOTE_HOST}|NOT-FOUND}/$1
    -RewriteRule   !^NOT-FOUND/.* - [F]
    -RewriteRule   ^NOT-FOUND/(.*)$ ${htes-interdits:%{REMOTE_ADDR}|NOT-FOUND}/$1
    -RewriteRule   !^NOT-FOUND/.* - [F]
    -RewriteRule   ^NOT-FOUND/(.*)$ /$1
    -
    - -
    -##
    -##  hosts.deny
    -##
    -##  ATTENTION! Ceci est une table de correspondances, pas une liste,
    -##  mme si on l'utilise en tant que telle. mod_rewrite l'interprte
    -##  comme un ensemble de paires cl/valeur ; chaque entre doit donc
    -##  au moins possder une valeur fictive "-".
    -##
    -
    -193.102.180.41 -
    -bsdti1.sdm.de  -
    -192.76.162.40  -
    -
    -
    -
    - -
    top
    -
    -

    Interdiction du mandataire

    - - - -
    -
    Description :
    - -
    -

    Comment interdire l'utilisation du mandataire d'Apache pour - un certain hte, ou mme seulement pour un utilisateur - de cet hte ?

    -
    - -
    Solution :
    - -
    -

    Nous devons tout d'abord nous assurer que - mod_rewrite arrive aprs(!) - mod_proxy dans le fichier de configuration - lors de la compilation du serveur web Apache. De cette faon, - il est appel avant mod_proxy. Nous - pouvons ensuite dfinir cette rgle pour une interdiction - dpendant de l'hte :

    - -
    -RewriteCond %{REMOTE_HOST} ^hte--rejeter\.mon-domaine\.com$
    -RewriteRule !^http://[^/.]\.mon-domaine.com.*  - [F]
    -
    - -

    ...et celle-ci pour une interdiction dpendant de - utilisateur@hte :

    - -
    -RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}  ^utilisateur--
    -rejeter@hte--rejeter\.mon-domaine\.com$
    -RewriteRule !^http://[^/.]\.mon-domaine.com.*  - [F]
    -
    -
    -
    - -
    top
    -
    -

    Variante particulire d'authentification

    - - - -
    -
    Description :
    - -
    -

    On a parfois besoin d'une authentification trs - particulire, par exemple une authentification qui vrifie la - prsence d'un utilisateur dans une liste explicitement - dfinie. Seuls ceux qui sont prsents dans la liste se voient - accorder un accs, et ceci sans avoir - s'identifier/authentifier (comme c'est le cas avec une - authentification de base via mod_auth).

    -
    - -
    Solution :
    - -
    -

    On dfinit une liste de conditions de rcriture pour - interdire l'accs tout le monde, sauf aux utilisateurs - autoriss :

    - -
    -RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^ami1@client1.quux-corp\.com$
    -RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^ami2@client2.quux-corp\.com$
    -RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} !^ami3@client3.quux-corp\.com$
    -RewriteRule ^/~quux/seulement-pour-les-amis/      -                                 [F]
    -
    -
    -
    - -
    top
    -
    -

    Redirection base sur le rfrent

    - - - -
    -
    Description :
    - -
    -

    Comment crire un programme souple qui redirige certaines - URLs en se basant sur l'en-tte HTTP "Referer", et peut tre - configur avec autant de pages de rfrence - que l'on veut ?

    -
    - -
    Solution :
    - -
    -

    On utilise le jeu de rgles vraiment astucieux suivant :

    - -
    -RewriteMap  deflector txt:/chemin/vers/deflector.map
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
    -RewriteRule ^.* %{HTTP_REFERER} [R,L]
    -
    -RewriteCond %{HTTP_REFERER} !=""
    -RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
    -RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
    -
    - -

    ... en association avec la table de rcriture - correspondante :

    - -
    -##
    -##  deflector.map
    -##
    -
    -http://www.mauvais-sujets.com/mauvais/index.html    -
    -http://www.mauvais-sujets.com/mauvais/index2.html   -
    -http://www.mauvais-sujets.com/mauvais/index3.html   http://quelque-part.com/
    -
    - -

    Les requtes sont rediriges vers la page de rfrence - (lorsque la valeur correspondant la cl extraite de la table - de correspondances est gale "-"), ou vers une - URL spcifique (lorsqu'une URL est dfinie dans la table de - correspondances comme second argument).

    -
    -
    - -
    -
    -

    Langues Disponibles:

    -
    - \ No newline at end of file diff --git a/docs/manual/rewrite/rewritemap.html b/docs/manual/rewrite/rewritemap.html index 1894835795c..e1e4738cf94 100644 --- a/docs/manual/rewrite/rewritemap.html +++ b/docs/manual/rewrite/rewritemap.html @@ -3,3 +3,7 @@ URI: rewritemap.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: rewritemap.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/rewritemap.html.en b/docs/manual/rewrite/rewritemap.html.en index 390a29a3322..6281dbdae2c 100644 --- a/docs/manual/rewrite/rewritemap.html.en +++ b/docs/manual/rewrite/rewritemap.html.en @@ -1,31 +1,37 @@ - -Using RewriteMap - Apache HTTP Server +Using RewriteMap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Using RewriteMap

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    This document supplements the mod_rewrite reference documentation. It describes the use of the RewriteMap directive, -and provides examples of each of the various RewriteMap types.

    +and provides examples of each of the various RewriteMap types.

    Note that many of these examples won't work unchanged in your particular server configuration, so it's important that you understand @@ -34,14 +40,14 @@ configuration.
    +

    See also

    top

    Introduction

    @@ -58,12 +64,12 @@ configuration.
    the RewriteMap reference documentation.

    -

    The syntax of the RewriteMap directive is as - follows:

    +

    The syntax of the RewriteMap + directive is as follows:

    + +
    RewriteMap MapName MapType:MapSource
    +
    -

    -RewriteMap MapName MapType:MapSource -

    The MapName is an arbitray name that you assign to the map, and which you will use in @@ -85,68 +91,108 @@ RewriteMap MapName MapType:MapSource substituted by DefaultValue or by the empty string if no DefaultValue was specified.

    -

    For example, you might define a - RewriteMap as:

    -

    - RewriteMap examplemap txt:/path/to/file/map.txt -

    +

    For example, you can define a + RewriteMap as:

    +
    RewriteMap examplemap "txt:/path/to/file/map.txt"
    +

    You would then be able to use this map in a - RewriteRule as follows:

    -

    - RewriteRule ^/ex/(.*) ${examplemap:$1} -

    + RewriteRule as follows:

    +
    RewriteRule "^/ex/(.*)" "${examplemap:$1}"
    +

    A default value can be specified in the event that nothing is found in the map:

    -

    -RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html} -

    +
    RewriteRule "^/ex/(.*)" "${examplemap:$1|/not_found.html}"
    +

    Per-directory and .htaccess context

    -The RewriteMap directive may not be used in -<Directory> sections or .htaccess files. You must +The RewriteMap directive may not be +used in <Directory> sections or +.htaccess files. You must declare the map in server or virtualhost context. You may use the map, -once created, in your RewriteRule and -RewriteCond directives in those scopes. You just can't -declare it in those scopes. -

    +once created, in your RewriteRule and +RewriteCond directives in those +scopes. You just can't declare it in those scopes.

    The sections that follow describe the various MapTypes that may be used, and give examples of each.

    top
    +

    int: Internal Function

    + + +

    When a MapType of int is used, the MapSource is one + of the available internal RewriteMap + functions. Module authors can provide + additional internal functions by registering them with the + ap_register_rewrite_mapfunc API. + The functions that are provided by default are: +

    + +
      +
    • toupper:
      + Converts the key to all upper case.
    • +
    • tolower:
      + Converts the key to all lower case.
    • +
    • escape:
      + Translates special characters in the key to + hex-encodings.
    • +
    • unescape:
      + Translates hex-encodings in the key back to + special characters.
    • +
    + +

    + To use one of these functions, create a RewriteMap referencing + the int function, and then use that in your RewriteRule: +

    + +

    Redirect a URI to an all-lowercase version of itself

    +
    RewriteMap lc int:tolower
    +RewriteRule "(.*)" "${lc:$1}" [R]
    + + +
    +

    Please note that the example offered here is for + illustration purposes only, and is not a recommendation. If you want + to make URLs case-insensitive, consider using + mod_speling instead. +

    +
    + +
    top
    +

    txt: Plain text maps

    When a MapType of txt is used, the MapSource is a filesystem path to a - plain-text mapping file, containing space-separated key/value pair - per line. Optionally, a line may be contain a comment, starting with + plain-text mapping file, containing one space-separated key/value pair + per line. Optionally, a line may contain a comment, starting with a '#' character.

    -

    For example, the following might be valid entries in a map - file.

    +

    A valid text rewrite map file will have the following syntax:

    -

    +

    # Comment line
    MatchingKey SubstValue
    MatchingKey SubstValue # comment
    -

    +

    -

    When the RewriteMap is invoked the argument is looked for in the +

    When the RewriteMap is invoked + the argument is looked for in the first argument of a line, and, if found, the substitution value is returned.

    -

    For example, we might use a mapfile to translate product names to +

    For example, we can use a mapfile to translate product names to product IDs for easier-to-remember URLs, using the following recipe:

    +

    Product to ID configuration

    +
    RewriteMap product2id "txt:/etc/apache2/productmap.txt"
    +RewriteRule "^/product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
    -

    Product to ID configuration

    - RewriteMap product2id txt:/etc/apache2/productmap.txt
    - RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] -

    We assume here that the prods.php script knows what to do when it received an argument of id=NOTFOUND when @@ -168,7 +214,8 @@ telephone 328

    Thus, when http://example.com/product/television is - requested, the RewriteRule is applied, and the request + requested, the RewriteRule is + applied, and the request is internally mapped to /prods.php?id=993.

    Note: .htaccess files

    @@ -176,9 +223,8 @@ telephone 328 scope. If you're planning to use this in a .htaccess file, you'll need to remove the leading slash from the rewrite pattern in order for it to match anything: -

    - RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] -

    +
    RewriteRule "^product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
    +

    Cached lookups

    @@ -201,9 +247,9 @@ telephone 328 One of these values will be chosen at random if the key is matched.

    -

    For example, you might use the following map +

    For example, you can use the following map file and directives to provide a random load balancing between - several back-end server, via a reverse-proxy. Images are sent + several back-end servers, via a reverse-proxy. Images are sent to one of the servers in the 'static' pool, while everything else is sent to one of the 'dynamic' pool.

    @@ -215,19 +261,18 @@ telephone 328 static www1|www2|www3|www4
    dynamic www5|www6

    +

    Configuration directives

    +
    RewriteMap servers "rnd:/path/to/file/map.txt"
    +
    +RewriteRule "^/(.*\.(png|gif|jpg))" "http://${servers:static}/$1"  [NC,P,L]
    +RewriteRule "^/(.*)"                "http://${servers:dynamic}/$1" [P,L]
    -

    Configuration directives

    - RewriteMap servers rnd:/path/to/file/map.txt
    -
    - RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 [NC,P,L]
    - RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L] -

    So, when an image is requested and the first of these rules is - matched, RewriteMap looks up the string + matched, RewriteMap looks up the string static in the map file, which returns one of the specified hostnames at random, which is then used in the - RewriteRule target.

    + RewriteRule target.

    If you wanted to have one of the servers more likely to be chosen (for example, if one of the server has more memory than the others, @@ -252,11 +297,11 @@ static www1|www1|www2|www3|www4

    You may optionally specify a particular dbm type:

    -

    - RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm -

    +
    RewriteMap examplemap "dbm=sdbm:/etc/apache/mapfile.dbm"
    -

    The type can be sdbm, gdbm, ndbm or db. + +

    The type can be sdbm, gdbm, ndbm + or db. However, it is recommended that you just use the httxt2dbm utility that is provided with Apache HTTP Server, as it will use the correct DBM library, matching the one that was used when httpd itself was built.

    @@ -270,18 +315,17 @@ $ httxt2dbm -i mapfile.txt -o mapfile.map

    You can then reference the resulting file in your -RewriteMap directive:

    +RewriteMap directive:

    + +
    RewriteMap mapname "dbm:/etc/apache/mapfile.map"
    -

    -RewriteMap mapname dbm:/etc/apache/mapfile.map -

    Note that with some dbm types, more than one file is generated, with a common base name. For example, you may have two files named mapfile.map.dir and mapfiile.map.pag. This is normal, and you need only use the base name mapfile.map in -your RewriteMap directive.

    +your RewriteMap directive.

    Cached lookups

    @@ -295,49 +339,6 @@ by many requests.
    top
    -

    int: Internal Function

    - - -

    When a MapType of int is used, the MapSource is one - of the available internal RewriteMap functions. Module authors can provide - additional internal functions by registering them with the - ap_register_rewrite_mapfunc API. - The functions that are provided by default are: -

    - -
      -
    • toupper:
      - Converts the key to all upper case.
    • -
    • tolower:
      - Converts the key to all lower case.
    • -
    • escape:
      - Translates special characters in the key to - hex-encodings.
    • -
    • unescape:
      - Translates hex-encodings in the key back to - special characters.
    • -
    - -

    - To use one of these functions, create a RewriteMap referencing - the int function, and then use that in your RewriteRule: -

    - -

    Redirect a URI to an all-lowercase version of itself

    - RewriteMap lc int:tolower
    - RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R] -

    - -
    -

    Please note that the example offered here is for - illustration purposes only, and is not a recommendation. If you want - to make URLs case-insensitive, consider using - mod_speling instead. -

    -
    - -
    top
    -

    prg: External Rewriting Program

    When a MapType of prg is used, the MapSource is a @@ -366,21 +367,19 @@ by many requests.

    A simple example is shown here which will replace all dashes with underscores in a request URI.

    -

    Rewrite configuration

    - RewriteMap d2u prg:/www/bin/dash2under.pl
    - RewriteRule - ${d2u:%{REQUEST_URI}} -

    +

    Rewrite configuration

    +
    RewriteMap d2u "prg:/www/bin/dash2under.pl"
    +RewriteRule "-" "${d2u:%{REQUEST_URI}}"
    + + +

    dash2under.pl

    +
    #!/usr/bin/perl
    +$| = 1; # Turn off I/O buffering
    +while (<STDIN>) {
    +    s/-/_/g; # Replace dashes with underscores
    +    print $_;
    +}
    -

    dash2under.pl

    - #!/usr/bin/perl
    - $| = 1; # Turn off I/O buffering
    - while (<STDIN>) {
    - - s/-/_/g; # Replace dashes with underscores
    - print $_;
    -
    - }
    -

    Caution!

      @@ -420,31 +419,52 @@ this process, or if the script itself is very slow. restarted.

      If a query returns more than one row, a random row from -the result set is used.

      + the result set is used.

      -

      Example

      -RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s" -

      +

      Example

      RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s"
      +
    top

    Summary

    -

    The RewriteMap directive can occur more than - once. For each mapping-function use one - RewriteMap directive to declare its rewriting - mapfile.

    +

    The RewriteMap directive can + occur more than once. For each mapping-function use one + RewriteMap directive to declare + its rewriting mapfile.

    While you cannot declare a map in per-directory context (.htaccess files or - <Directory> blocks) it is possible to - use this map in per-directory context.

    + <Directory> blocks) it is + possible to use this map in per-directory context.

    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/rewritemap.html.fr b/docs/manual/rewrite/rewritemap.html.fr new file mode 100644 index 00000000000..91e9ffa0c00 --- /dev/null +++ b/docs/manual/rewrite/rewritemap.html.fr @@ -0,0 +1,500 @@ + + + + + +Utilisation de RewriteMap - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Utilisation de RewriteMap

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment la documentation de rfrence du + module mod_rewrite. Il dcrit l'utilisation de la + directive RewriteMap, et + fournit des exemples pour chacun des diffrents types de + RewriteMap.

    + +
    Notez que la plupart de ces exemples ne + fonctionneront pas en l'tat dans le contexte de votre configuration + particulire ; vous devez donc vous attacher les + comprendre, plutt que de simplement les insrer dans votre + configuration par copier/coller.
    + +
    + +
    top
    +
    +

    Introduction

    + + +

    + La directive RewriteMap + dfinit une fonction externe qui peut tre appele depuis une + directive RewriteRule ou + RewriteCond pour + accomplir une rcriture trop complique, ou trop spcialise pour + tre effectue partir d'expressions rationnelles. Vous trouverez + ci-dessous les diffrents types disponibles pour la source de + donnes, ceux-ci tant par ailleurs numrs dans la documentation de + rfrence de RewriteMap.

    + +

    La syntaxe de la directive RewriteMap est la suivante + :

    + +
    RewriteMap MapName MapType:MapSource
    + + +

    L'argument MapName + est un nom arbitraire que vous associez la table de + correspondances, et que vous + pourrez utilisez par la suite dans les directives de rcriture. Les + recherches dans la table de correspondance s'effectuent en + respectant cette syntaxe :

    + +

    + + ${ nom-map : + cl-recherche + }
    ${ nom-map : + cl-recherche | DefaultValue } +
    +

    + +

    Lorsque cette syntaxe est employe, la table de correspondances + nom-map est consulte et la cl cl-recherche + recherche. Si la cl est trouve, la fonction de recherche dans la + table de correspondance est remplace par SubstValue, ou + par DefaultValue dans le cas contraire, ou par la chane + vide si aucune DefaultValue n'a t spcifie.

    + +

    Par exemple, vous pouvez dfinir une directive + RewriteMap comme suit :

    +
    RewriteMap examplemap "txt:/path/to/file/map.txt"
    + +

    Vous pourrez par la suite utiliser cette table de correspondances + dans une directive RewriteRule comme suit :

    +
    RewriteRule "^/ex/(.*)" "${examplemap:$1}"
    + + +

    Il est possible de spcifier une valeur par dfaut qui sera utilise +si la recherche dans la table de correspondances est infructueuse :

    + +
    RewriteRule "^/ex/(.*)" "${examplemap:$1|/not_found.html}"
    + + +

    Contexte de rpertoire et fichiers.htaccess

    +

    +Vous ne pouvez utiliser la directive RewriteMap ni dans +les sections <Directory>, ni dans les fichiers +.htaccess. Vous devez dclarer la table de correspondances +au niveau du serveur principal ou dans un contexte de serveur virtuel. +En revanche, si vous ne pouvez pas dclarer la table dans une section +<Directory> ou dans un fichier .htaccess, vous +pourrez y faire rfrence dans ces contextes, une fois cette table +cre. +

    +
    + +

    Les sections suivantes dcrivent les diffrents types de tables de +correspondances type-map disponibles, et fournissent des +exemples pour chacun d'entre eux.

    +
    top
    +
    +

    int: Fonction interne

    + + +

    Lorsque le type-map int est spcifi, la source est + une des fonctions RewriteMap internes disponibles. Les dveloppeurs + de modules peuvent fournir des fonctions internes supplmentaires en + les enregistrant via l'API ap_register_rewrite_mapfunc. + Les fonctions fournies par dfaut sont : +

    + +
      +
    • toupper:
      + Met tous les caractres de la cl en majuscules.
    • +
    • tolower:
      + Met tous les caractres de la cl en minuscules.
    • +
    • escape:
      + Protge les caractres spciaux de la cl en les + transformant en leur code hexadcimal.
    • +
    • unescape:
      + Retraduit les codes hexadcimaux de la cl en caractres + spciaux.
    • +
    + +

    + Pour utiliser une de ces fonctions, crez une + RewriteMap faisant rfrence cette fonction int, et + utilisez-la dans votre rgle RewriteRule : +

    + +

    Redirige un URI vers son quivalent en minuscules

    +
    RewriteMap lc int:tolower
    +RewriteRule "(.*)" "${lc:$1}" [R]
    + + +
    +

    Notez que cet exemple n'est fourni qu' titre d'illustration, + et ne constitue en aucun cas une recommandation. Si vous voulez + rendre des URLs insensibles la casse, vous devez plutt vous + tourner vers mod_speling. +

    +
    + +
    top
    +
    +

    txt: tables de correspondances au format texte

    + + +

    Lorsqu'un type-map txt est utilis, la source-map + est un chemin du systme de fichiers vers un fichier de + correspondances au format texte, contenant sur chaque ligne une + paire cl/valeur spares par un espace. Il est possible d'insrer + des commentaires sous la forme de chanes commenant par le caractre + '#'.

    + +

    Voici un exemple d'entres valides dans un fichier de + correspondances :

    + +

    + # Ligne de commentaires
    + cl valeur-substitution
    + cl valeur-substitution # commentaire
    +

    + +

    Lorsque la table de correspondance fait l'objet d'une recherche, + la valeur spcifie est recherche dans le premier champ, et si elle + est trouve, la valeur de substitution est renvoye.

    + +

    Par exemple, nous pourrions utiliser un fichier de + correspondances pour traduire des noms de produits en identifiants + produits pour obtenir des URLs plus simples mmoriser, en + utilisant la recette suivante :

    + +

    Product to ID configuration

    +
    RewriteMap product2id "txt:/etc/apache2/productmap.txt"
    +RewriteRule "^/product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
    + + +

    Nous supposons ici que le script prods.php sait quoi + faire lorsqu'il reoit un argument id=NOTFOUND, dans + le cas o le produit ne se trouve pas dans la table de + correspondances.

    + +

    Le fichier /etc/apache2/map-produit.txt contient ce + qui suit :

    + +

    Fichier de correspondances Produit - Identifiant

    +##
    +## map-produit.txt - Fichier de correspondances Produit - Identifiant
    +##
    +
    +TELEVISION 993
    +STEREO 198
    +CANNE-A-PECHE 043
    +BALLON-BASKET 418
    +TELEPHONE 328 +

    + +

    Ainsi, lorsqu'une requte pour + http://example.com/produit/TELEVISION arrive, la directive + RewriteRule s'applique, et la + requte est transforme en interne en /prods.php?id=993.

    + +

    Note: fichiers .htaccess

    + L'exemple donn est conu pour tre utilis dans un contexte de + serveur principal ou de serveur virtuel. Si vous voulez l'utiliser + dans un fichier .htaccess, vous devrez supprimer le + slash de dbut dans le modle de rcriture afin que ce dernier + puisse correspondre toute URL : +
    RewriteRule "^product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT]
    + +
    + +

    Recherches mises en cache

    +

    + Les cls de recherche sont mises en cache par httpd jusqu' ce que + le mtime (date de modification) du fichier de + correspondances soit modifi, ou que le serveur httpd soit + redmarr, ce qui amliore les performances pour les tables de + correspondances consultes par de nombreuses requtes. +

    +
    + +
    top
    +
    +

    rnd: Fichier texte valeurs de substitution multiples + choisies de manire alatoire

    + + +

    Lorsque le type-map spcifi est rnd, la source est + un chemin du systme de fichiers vers un fichier de correspondances + au format texte dont chaque ligne contient une cl, et une ou + plusieurs valeurs spares par le caractre |. Si une + cl convient, une des valeurs correspondantes sera choisie de + manire alatoire.

    + +

    Par exemple, vous pouvez utiliser le fichier de correspondances + et les directives suivants pour implmenter une rpartition de + charge alatoire entre plusieurs serveurs d'arrire-plan, par + l'intermdiaire d'un mandataire inverse. Les images sont envoyes + vers un des serveurs de l'ensemble 'statique', tandis que tout le + reste est envoy vers un des serveurs de l'ensemble 'dynamique'.

    + +

    Fichier de correspondances

    +##
    +## map.txt -- table de rcriture
    +##
    +
    +statique www1|www2|www3|www4
    +dynamique www5|www6 +

    +

    Directives de configuration

    +
    RewriteMap servers "rnd:/path/to/file/map.txt"
    +
    +RewriteRule "^/(.*\.(png|gif|jpg))" "http://${servers:static}/$1" [NC,P,L]
    +RewriteRule "^/(.*)"                "http://${servers:dynamic}/$1" [P,L]
    + + + +

    Ainsi, lorsqu'une image est demande et que la premire rgle + convient, RewriteMap recherche la chane + statique dans le fichier de correspondances qui + renvoie un des noms de serveurs spcifis de manire alatoire, + ce dernier tant utilis dans la cible de la rgle + RewriteRule.

    + +

    Si vous voulez qu'un des serveurs soit plus souvent sollicit que + les autres (par exemple s'il possde plus de mmoire, et peut donc + traiter d'avantage de requtes), spcifiez-le plusieurs fois dans la + liste des serveurs.

    + +

    +statique www1|www1|www2|www3|www4 +

    + +
    top
    +
    +

    dbm: Fichier condens DBM

    + + +

    Lorsque le type-map dbm est utilis, la source est + un chemin du systme de fichiers vers un fichier de donnes DBM + contenant des paires cl/valeur permettant d'effectuer la + correspondance. Le fonctionnement est identique celui du type-map + txt, mais beaucoup plus rapide car un fichier DBM est + index, alors qu'un fichier texte ne l'est pas. L'accs la cl + recherche est donc plus rapide.

    + +

    Vous pouvez ventuellement spcifier un type dbm particulier :

    + +
    RewriteMap examplemap "dbm=sdbm:/etc/apache/mapfile.dbm"
    + + +

    Ce type peut tre choisi parmi sdbm, gdbm, + ndbm ou db. Il est + cependant recommand d'utiliser l'utilitaire httxt2dbm fourni avec le + serveur HTTP Apache, car il utilise la bibliothque DBM approprie, + savoir celle qui a t utilise lors de la compilation de httpd.

    + +

    Pour crer un fichier dbm, crez tout d'abord un fichier de + correspondances au format texte comme dcrit dans la section txt. Traitez ensuite ce fichier avec + httxt2dbm :

    + +

    +$ httxt2dbm -i fichier-map.txt -o fichier-map.map +

    + +

    Vous pouvez alors faire rfrence au fichier obtenu dans votre +directive RewriteMap :

    +
    RewriteMap mapname "dbm:/etc/apache/mapfile.map"
    + + +
    +

    Notez qu'avec certains types dbm, plusieurs fichiers possdant le +mme nom de base sont crs. Par exemple, vous pouvez obtenir deux +fichiers nomms fichier-map.map.dir et +fichier-map.map.pag. Ceci est tout fait normal, et vous +ne devez utiliser que le nom de base fichier-map.map dans votre +directive RewriteMap.

    +
    + +

    Mise en cache des recherches

    +

    + Les cls de recherche sont mises en cache par httpd jusqu' ce que + le mtime (date de modification) du fichier de + correspondances soit modifi, ou que le serveur httpd soit + redmarr, ce qui amliore les performances pour les tables de + correspondances consultes par de nombreuses requtes. +

    +
    + +
    top
    +
    +

    prg: Programme de rcriture externe

    + +

    Lorque le type-map prg est spcifi, la source est + un chemin du systme de fichiers vers un programme excutable + destin effectuer la mise en correspondance. Il peut s'agir d'un + fichier binaire compil, ou d'un programme en langage interprt + comme Perl ou Python.

    + +

    Ce programme est lanc une fois au dmarrage du serveur HTTP + Apache, puis communique avec le moteur de rcriture via + STDIN et STDOUT. En d'autres termes, pour + chaque recherche de correspondance, il reoit un argument via + STDIN, et doit renvoyer en guise de rponse une chane + termine par un caractre nouvelle-ligne sur STDOUT. Si + la recherche de correspondance est infructueuse, le programme doit + l'indiquer en retournant la chane de quatre caractres + "NULL".

    + +

    Les programmes de rcriture externes ne sont pas lancs s'il + n'ont pas t dfinis dans un contexte o la directive RewriteEngine est dfinie + on.

    + +

    Cette fonctionnalit utilise le mutex rewrite-map + ncessaire la fiabilit des communications avec le programme. Le + mcanisme de mutex et le fichier verrou peuvent tre dfinis via la + directive Mutex.

    + +

    Voici un exemple simple qui remplace tous les tirets par des + caractres de soulignement dans l'URI de la requte.

    + +

    Configuration de la rcriture

    +
    RewriteMap d2u "prg:/www/bin/dash2under.pl"
    +RewriteRule "-" "${d2u:%{REQUEST_URI}}"
    + + +

    dash2under.pl

    +
        #!/usr/bin/perl
    +    $| = 1; # Turn off I/O buffering
    +    while (<STDIN>) {
    +        s/-/_/g; # Remplace tous les tirets par des caractres de soulignement
    +        print $_;
    +    }
    + + +

    Mises en garde !

    +
      +
    • Votre programme doit tre le plus +simple possible. Si le programme se bloque, httpd va attendre +indfiniment une rponse de sa part, et par consquent ne rpondra plus +aux requtes.
    • +
    • Assurez-vous de bien dsactiver la mise en tampon dans votre +programme. En Perl, ceci est effectu la seconde ligne du script de +l'exemple - $| = 1; - La syntaxe sera bien entendu +diffrente dans +d'autres langages. Si les entres/sorties sont mises en tampon, httpd va +attendre une sortie, et va par consquent se bloquer.
    • +
    • Rappelez-vous qu'il n'existe qu'une copie du programme lanc au +dmarrage du serveur, et que toutes les requtes vont devoir passer par +ce goulot d'tranglement. Ceci peut provoquer des ralentissements +significatifs si de nombreuses requtes doivent tre traites, ou si le +script lui-mme est trs lent.
    • +
    +
    + +
    top
    +
    +

    dbd ou fastdbd: requte SQL

    + + +

    Lorsque le type-map dbd ou fastdbd est + spcifi, la source est une requte SQL SELECT qui reoit un + argument et renvoie une seule valeur.

    + +

    Pour que cette requte puisse tre excute, + mod_dbd doit tre configur pour attaquer la base + de donnes concerne.

    + +

    Ce type-map existe sous deux formes. Avec le type-map + dbd, la requte est excute chaque demande, tandis + qu'avec le type-map fastdbd, les recherches dans la + base de donnes sont mises en cache en interne. fastdbd + est donc plus efficace et donc plus rapide ; par contre, il ne + tiendra pas compte des modifications apportes la base de donnes + jusqu' ce que le serveur soit redmarr.

    + +

    Si une requte renvoie plusieurs enregistrements, un de ceux-ci + sera slectionn alatoirement.

    + +

    Exemple

    RewriteMap ma-requete "fastdbd:SELECT destination FROM rewrite WHERE source = %s"
    +
    + +
    top
    +
    +

    Rsum

    + + +

    La directive RewriteMap peut apparatre + plusieurs fois. Utilisez une directive + RewriteMap pour chaque fonction de mise en + correspondance pour dclarer son fichier de correspondances.

    + +

    Bien que l'on ne puisse pas dclarer de fonction + de mise en correspondance dans un contexte de rpertoire (fichier + .htaccess ou section <Directory>), il est + possible d'utiliser cette fonction dans un tel contexte.

    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/rewritemap.xml b/docs/manual/rewrite/rewritemap.xml index 42ddcbf9b89..69ec9f6c874 100644 --- a/docs/manual/rewrite/rewritemap.xml +++ b/docs/manual/rewrite/rewritemap.xml @@ -26,7 +26,8 @@

    This document supplements the mod_rewrite reference documentation. It describes the use of the RewriteMap directive, -and provides examples of each of the various RewriteMap types.

    +and provides examples of each of the various RewriteMap types.

    Note that many of these examples won't work unchanged in your particular server configuration, so it's important that you understand @@ -57,12 +58,12 @@ configuration. the RewriteMap reference documentation.

    -

    The syntax of the RewriteMap directive is as - follows:

    +

    The syntax of the RewriteMap + directive is as follows:

    - + RewriteMap MapName MapType:MapSource - +

    The MapName is an arbitray name that you assign to the map, and which you will use in @@ -84,68 +85,116 @@ RewriteMap MapName MapType:MapSource substituted by DefaultValue or by the empty string if no DefaultValue was specified.

    -

    For example, you might define a - RewriteMap as:

    - - RewriteMap examplemap txt:/path/to/file/map.txt - +

    For example, you can define a + RewriteMap as:

    + +RewriteMap examplemap "txt:/path/to/file/map.txt" +

    You would then be able to use this map in a - RewriteRule as follows:

    - - RewriteRule ^/ex/(.*) ${examplemap:$1} - + RewriteRule as follows:

    + +RewriteRule "^/ex/(.*)" "${examplemap:$1}" +

    A default value can be specified in the event that nothing is found in the map:

    - -RewriteRule ^/ex/(.*) ${examplemap:$1|/not_found.html} - + +RewriteRule "^/ex/(.*)" "${examplemap:$1|/not_found.html}" + Per-directory and .htaccess context

    -The RewriteMap directive may not be used in -<Directory> sections or .htaccess files. You must +The RewriteMap directive may not be +used in Directory sections or +.htaccess files. You must declare the map in server or virtualhost context. You may use the map, -once created, in your RewriteRule and -RewriteCond directives in those scopes. You just can't -declare it in those scopes. -

    +once created, in your RewriteRule and +RewriteCond directives in those +scopes. You just can't declare it in those scopes.

    The sections that follow describe the various MapTypes that may be used, and give examples of each.

    +
    + int: Internal Function + +

    When a MapType of int is used, the MapSource is one + of the available internal RewriteMap + functions. Module authors can provide + additional internal functions by registering them with the + ap_register_rewrite_mapfunc API. + The functions that are provided by default are: +

    + +
      +
    • toupper:
      + Converts the key to all upper case.
    • +
    • tolower:
      + Converts the key to all lower case.
    • +
    • escape:
      + Translates special characters in the key to + hex-encodings.
    • +
    • unescape:
      + Translates hex-encodings in the key back to + special characters.
    • +
    + +

    + To use one of these functions, create a RewriteMap referencing + the int function, and then use that in your RewriteRule: +

    + +

    Redirect a URI to an all-lowercase version of itself

    + + +RewriteMap lc int:tolower +RewriteRule "(.*)" "${lc:$1}" [R] + + + +

    Please note that the example offered here is for + illustration purposes only, and is not a recommendation. If you want + to make URLs case-insensitive, consider using + mod_speling instead. +

    +
    + +
    +
    txt: Plain text maps

    When a MapType of txt is used, the MapSource is a filesystem path to a - plain-text mapping file, containing space-separated key/value pair - per line. Optionally, a line may be contain a comment, starting with + plain-text mapping file, containing one space-separated key/value pair + per line. Optionally, a line may contain a comment, starting with a '#' character.

    -

    For example, the following might be valid entries in a map - file.

    +

    A valid text rewrite map file will have the following syntax:

    -

    + # Comment line
    MatchingKey SubstValue
    MatchingKey SubstValue # comment
    -

    + -

    When the RewriteMap is invoked the argument is looked for in the +

    When the RewriteMap is invoked + the argument is looked for in the first argument of a line, and, if found, the substitution value is returned.

    -

    For example, we might use a mapfile to translate product names to +

    For example, we can use a mapfile to translate product names to product IDs for easier-to-remember URLs, using the following recipe:

    - - Product to ID configuration - RewriteMap product2id txt:/etc/apache2/productmap.txt
    - RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] -
    +

    Product to ID configuration

    + +RewriteMap product2id "txt:/etc/apache2/productmap.txt" +RewriteRule "^/product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT] +

    We assume here that the prods.php script knows what to do when it received an argument of id=NOTFOUND when @@ -167,7 +216,8 @@ telephone 328

    Thus, when http://example.com/product/television is - requested, the RewriteRule is applied, and the request + requested, the RewriteRule is + applied, and the request is internally mapped to /prods.php?id=993.

    Note: .htaccess files @@ -175,9 +225,9 @@ telephone 328 scope. If you're planning to use this in a .htaccess file, you'll need to remove the leading slash from the rewrite pattern in order for it to match anything: - - RewriteRule ^product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] - + +RewriteRule "^product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT] + Cached lookups @@ -199,9 +249,9 @@ telephone 328 One of these values will be chosen at random if the key is matched.

    -

    For example, you might use the following map +

    For example, you can use the following map file and directives to provide a random load balancing between - several back-end server, via a reverse-proxy. Images are sent + several back-end servers, via a reverse-proxy. Images are sent to one of the servers in the 'static' pool, while everything else is sent to one of the 'dynamic' pool.

    @@ -213,19 +263,19 @@ telephone 328 static www1|www2|www3|www4
    dynamic www5|www6 +

    Configuration directives

    + +RewriteMap servers "rnd:/path/to/file/map.txt" - Configuration directives - RewriteMap servers rnd:/path/to/file/map.txt
    -
    - RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 [NC,P,L]
    - RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L] -
    +RewriteRule "^/(.*\.(png|gif|jpg))" "http://${servers:static}/$1" [NC,P,L] +RewriteRule "^/(.*)" "http://${servers:dynamic}/$1" [P,L] +

    So, when an image is requested and the first of these rules is - matched, RewriteMap looks up the string + matched, RewriteMap looks up the string static in the map file, which returns one of the specified hostnames at random, which is then used in the - RewriteRule target.

    + RewriteRule target.

    If you wanted to have one of the servers more likely to be chosen (for example, if one of the server has more memory than the others, @@ -250,11 +300,12 @@ static www1|www1|www2|www3|www4

    You may optionally specify a particular dbm type:

    - - RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm - + +RewriteMap examplemap "dbm=sdbm:/etc/apache/mapfile.dbm" + -

    The type can be sdbm, gdbm, ndbm or db. +

    The type can be sdbm, gdbm, ndbm + or db. However, it is recommended that you just use the httxt2dbm utility that is provided with Apache HTTP Server, as it will use the correct DBM library, @@ -269,18 +320,18 @@ $ httxt2dbm -i mapfile.txt -o mapfile.map

    You can then reference the resulting file in your -RewriteMap directive:

    +RewriteMap directive:

    - -RewriteMap mapname dbm:/etc/apache/mapfile.map - + +RewriteMap mapname "dbm:/etc/apache/mapfile.map" +

    Note that with some dbm types, more than one file is generated, with a common base name. For example, you may have two files named mapfile.map.dir and mapfiile.map.pag. This is normal, and you need only use the base name mapfile.map in -your RewriteMap directive.

    +your RewriteMap directive.

    Cached lookups @@ -294,49 +345,6 @@ by many requests.
    -
    - int: Internal Function - -

    When a MapType of int is used, the MapSource is one - of the available internal RewriteMap functions. Module authors can provide - additional internal functions by registering them with the - ap_register_rewrite_mapfunc API. - The functions that are provided by default are: -

    - -
      -
    • toupper:
      - Converts the key to all upper case.
    • -
    • tolower:
      - Converts the key to all lower case.
    • -
    • escape:
      - Translates special characters in the key to - hex-encodings.
    • -
    • unescape:
      - Translates hex-encodings in the key back to - special characters.
    • -
    - -

    - To use one of these functions, create a RewriteMap referencing - the int function, and then use that in your RewriteRule: -

    - - Redirect a URI to an all-lowercase version of itself - RewriteMap lc int:tolower
    - RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R] -
    - - -

    Please note that the example offered here is for - illustration purposes only, and is not a recommendation. If you want - to make URLs case-insensitive, consider using - mod_speling instead. -

    -
    - -
    -
    prg: External Rewriting Program

    When a MapType of prg is used, the MapSource is a @@ -366,21 +374,21 @@ by many requests.

    A simple example is shown here which will replace all dashes with underscores in a request URI.

    - Rewrite configuration - RewriteMap d2u prg:/www/bin/dash2under.pl
    - RewriteRule - ${d2u:%{REQUEST_URI}} -
    - - dash2under.pl - #!/usr/bin/perl
    - $| = 1; # Turn off I/O buffering
    - while (<STDIN>) {
    - - s/-/_/g; # Replace dashes with underscores
    - print $_;
    -
    - }
    -
    +

    Rewrite configuration

    + +RewriteMap d2u "prg:/www/bin/dash2under.pl" +RewriteRule "-" "${d2u:%{REQUEST_URI}}" + + +

    dash2under.pl

    + +#!/usr/bin/perl +$| = 1; # Turn off I/O buffering +while (<STDIN>) { + s/-/_/g; # Replace dashes with underscores + print $_; +} + Caution!
      @@ -421,25 +429,27 @@ this process, or if the script itself is very slow. restarted.

      If a query returns more than one row, a random row from -the result set is used.

      + the result set is used.

      Example + RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s" +
    Summary -

    The RewriteMap directive can occur more than - once. For each mapping-function use one - RewriteMap directive to declare its rewriting - mapfile.

    +

    The RewriteMap directive can + occur more than once. For each mapping-function use one + RewriteMap directive to declare + its rewriting mapfile.

    While you cannot declare a map in per-directory context (.htaccess files or - <Directory> blocks) it is possible to - use this map in per-directory context.

    + Directory blocks) it is + possible to use this map in per-directory context.

    diff --git a/docs/manual/rewrite/rewritemap.xml.fr b/docs/manual/rewrite/rewritemap.xml.fr new file mode 100644 index 00000000000..936197b67e8 --- /dev/null +++ b/docs/manual/rewrite/rewritemap.xml.fr @@ -0,0 +1,478 @@ + + + + + + + + + Rewrite + Utilisation de RewriteMap + + +

    Ce document est un complément à la documentation de référence du + module mod_rewrite. Il décrit l'utilisation de la + directive RewriteMap, et + fournit des exemples pour chacun des différents types de + RewriteMap.

    + + Notez que la plupart de ces exemples ne + fonctionneront pas en l'état dans le contexte de votre configuration + particulière ; vous devez donc vous attacher à les + comprendre, plutôt que de simplement les insérer dans votre + configuration par copier/coller. + +
    + Documentation du module + mod_rewrite + Introduction à mod_rewrite + Redirection et remise en + correspondance + Contrôle d'accès + Serveurs virtuels + Mise en cache + Techniques avancées + Quand ne pas utiliser mod_rewrite + +
    + Introduction + +

    + La directive RewriteMap + définit une fonction externe qui peut être appelée depuis une + directive RewriteRule ou + RewriteCond pour + accomplir une réécriture trop compliquée, ou trop spécialisée pour + être effectuée à partir d'expressions rationnelles. Vous trouverez + ci-dessous les différents types disponibles pour la source de + données, ceux-ci étant par ailleurs énumérés dans la documentation de + référence de RewriteMap.

    + +

    La syntaxe de la directive RewriteMap est la suivante + :

    + +RewriteMap MapName MapType:MapSource + +

    L'argument MapName + est un nom arbitraire que vous associez à la table de + correspondances, et que vous + pourrez utilisez par la suite dans les directives de réécriture. Les + recherches dans la table de correspondance s'effectuent en + respectant cette syntaxe :

    + +

    + + ${ nom-map : + clé-recherche + }
    ${ nom-map : + clé-recherche | DefaultValue } +
    +

    + +

    Lorsque cette syntaxe est employée, la table de correspondances + nom-map est consultée et la clé clé-recherche + recherchée. Si la clé est trouvée, la fonction de recherche dans la + table de correspondance est remplacée par SubstValue, ou + par DefaultValue dans le cas contraire, ou par la chaîne + vide si aucune DefaultValue n'a été spécifiée.

    + +

    Par exemple, vous pouvez définir une directive + RewriteMap comme suit :

    + RewriteMap examplemap "txt:/path/to/file/map.txt" +

    Vous pourrez par la suite utiliser cette table de correspondances + dans une directive RewriteRule comme suit :

    +RewriteRule "^/ex/(.*)" "${examplemap:$1}" + +

    Il est possible de spécifier une valeur par défaut qui sera utilisée +si la recherche dans la table de correspondances est infructueuse :

    + +RewriteRule "^/ex/(.*)" "${examplemap:$1|/not_found.html}" + +Contexte de répertoire et fichiers.htaccess +

    +Vous ne pouvez utiliser la directive RewriteMap ni dans +les sections Directory, ni dans les fichiers +.htaccess. Vous devez déclarer la table de correspondances +au niveau du serveur principal ou dans un contexte de serveur virtuel. +En revanche, si vous ne pouvez pas déclarer la table dans une section +<Directory> ou dans un fichier .htaccess, vous +pourrez y faire référence dans ces contextes, une fois cette table +créée. +

    +
    + +

    Les sections suivantes décrivent les différents types de tables de +correspondances type-map disponibles, et fournissent des +exemples pour chacun d'entre eux.

    +
    + +
    + int: Fonction interne + +

    Lorsque le type-map int est spécifié, la source est + une des fonctions RewriteMap internes disponibles. Les développeurs + de modules peuvent fournir des fonctions internes supplémentaires en + les enregistrant via l'API ap_register_rewrite_mapfunc. + Les fonctions fournies par défaut sont : +

    + +
      +
    • toupper:
      + Met tous les caractères de la clé en majuscules.
    • +
    • tolower:
      + Met tous les caractères de la clé en minuscules.
    • +
    • escape:
      + Protège les caractères spéciaux de la clé en les + transformant en leur code hexadécimal.
    • +
    • unescape:
      + Retraduit les codes hexadécimaux de la clé en caractères + spéciaux.
    • +
    + +

    + Pour utiliser une de ces fonctions, créez une + RewriteMap faisant référence à cette fonction int, et + utilisez-la dans votre règle RewriteRule : +

    + +

    Redirige un URI vers son équivalent en minuscules

    + + +RewriteMap lc int:tolower +RewriteRule "(.*)" "${lc:$1}" [R] + + + +

    Notez que cet exemple n'est fourni qu'à titre d'illustration, + et ne constitue en aucun cas une recommandation. Si vous voulez + rendre des URLs insensibles à la casse, vous devez plutôt vous + tourner vers mod_speling. +

    +
    + +
    + +
    + txt: tables de correspondances au format texte + +

    Lorsqu'un type-map txt est utilisé, la source-map + est un chemin du système de fichiers vers un fichier de + correspondances au format texte, contenant sur chaque ligne une + paire clé/valeur séparées par un espace. Il est possible d'insérer + des commentaires sous la forme de chaînes commençant par le caractère + '#'.

    + +

    Voici un exemple d'entrées valides dans un fichier de + correspondances :

    + + + # Ligne de commentaires
    + clé valeur-substitution
    + clé valeur-substitution # commentaire
    +
    + +

    Lorsque la table de correspondance fait l'objet d'une recherche, + la valeur spécifiée est recherchée dans le premier champ, et si elle + est trouvée, la valeur de substitution est renvoyée.

    + +

    Par exemple, nous pourrions utiliser un fichier de + correspondances pour traduire des noms de produits en identifiants + produits pour obtenir des URLs plus simples à mémoriser, en + utilisant la recette suivante :

    + +

    Product to ID configuration

    + +RewriteMap product2id "txt:/etc/apache2/productmap.txt" +RewriteRule "^/product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT] + + +

    Nous supposons ici que le script prods.php sait quoi + faire lorsqu'il reçoit un argument id=NOTFOUND, dans + le cas où le produit ne se trouve pas dans la table de + correspondances.

    + +

    Le fichier /etc/apache2/map-produit.txt contient ce + qui suit :

    + + Fichier de correspondances Produit - Identifiant +##
    +## map-produit.txt - Fichier de correspondances Produit - Identifiant
    +##
    +
    +TELEVISION 993
    +STEREO 198
    +CANNE-A-PECHE 043
    +BALLON-BASKET 418
    +TELEPHONE 328 +
    + +

    Ainsi, lorsqu'une requête pour + http://example.com/produit/TELEVISION arrive, la directive + RewriteRule s'applique, et la + requête est transformée en interne en /prods.php?id=993.

    + + Note: fichiers .htaccess + L'exemple donné est conçu pour être utilisé dans un contexte de + serveur principal ou de serveur virtuel. Si vous voulez l'utiliser + dans un fichier .htaccess, vous devrez supprimer le + slash de début dans le modèle de réécriture afin que ce dernier + puisse correspondre à toute URL : + RewriteRule "^product/(.*)" "/prods.php?id=${product2id:$1|NOTFOUND}" [PT] + + + Recherches mises en cache +

    + Les clés de recherche sont mises en cache par httpd jusqu'à ce que + le mtime (date de modification) du fichier de + correspondances soit modifié, ou que le serveur httpd soit + redémarré, ce qui améliore les performances pour les tables de + correspondances consultées par de nombreuses requêtes. +

    +
    + +
    +
    + rnd: Fichier texte à valeurs de substitution multiples + choisies de manière aléatoire + +

    Lorsque le type-map spécifié est rnd, la source est + un chemin du système de fichiers vers un fichier de correspondances + au format texte dont chaque ligne contient une clé, et une ou + plusieurs valeurs séparées par le caractère |. Si une + clé convient, une des valeurs correspondantes sera choisie de + manière aléatoire.

    + +

    Par exemple, vous pouvez utiliser le fichier de correspondances + et les directives suivants pour implémenter une répartition de + charge aléatoire entre plusieurs serveurs d'arrière-plan, par + l'intermédiaire d'un mandataire inverse. Les images sont envoyées + vers un des serveurs de l'ensemble 'statique', tandis que tout le + reste est envoyé vers un des serveurs de l'ensemble 'dynamique'.

    + + Fichier de correspondances +##
    +## map.txt -- table de réécriture
    +##
    +
    +statique www1|www2|www3|www4
    +dynamique www5|www6 +
    +

    Directives de configuration

    + +RewriteMap servers "rnd:/path/to/file/map.txt" + +RewriteRule "^/(.*\.(png|gif|jpg))" "http://${servers:static}/$1" [NC,P,L] +RewriteRule "^/(.*)" "http://${servers:dynamic}/$1" [P,L] + + + +

    Ainsi, lorsqu'une image est demandée et que la première règle + convient, RewriteMap recherche la chaîne + statique dans le fichier de correspondances qui + renvoie un des noms de serveurs spécifiés de manière aléatoire, + ce dernier étant utilisé dans la cible de la règle + RewriteRule.

    + +

    Si vous voulez qu'un des serveurs soit plus souvent sollicité que + les autres (par exemple s'il possède plus de mémoire, et peut donc + traiter d'avantage de requêtes), spécifiez-le plusieurs fois dans la + liste des serveurs.

    + + +statique www1|www1|www2|www3|www4 + + +
    + +
    + dbm: Fichier condensé DBM + +

    Lorsque le type-map dbm est utilisé, la source est + un chemin du système de fichiers vers un fichier de données DBM + contenant des paires clé/valeur permettant d'effectuer la + correspondance. Le fonctionnement est identique à celui du type-map + txt, mais beaucoup plus rapide car un fichier DBM est + indexé, alors qu'un fichier texte ne l'est pas. L'accès à la clé + recherchée est donc plus rapide.

    + +

    Vous pouvez éventuellement spécifier un type dbm particulier :

    + + +RewriteMap examplemap "dbm=sdbm:/etc/apache/mapfile.dbm" + + +

    Ce type peut être choisi parmi sdbm, gdbm, + ndbm ou db. Il est + cependant recommandé d'utiliser l'utilitaire httxt2dbm fourni avec le + serveur HTTP Apache, car il utilise la bibliothèque DBM appropriée, + à savoir celle qui a été utilisée lors de la compilation de httpd.

    + +

    Pour créer un fichier dbm, créez tout d'abord un fichier de + correspondances au format texte comme décrit dans la section txt. Traitez ensuite ce fichier avec + httxt2dbm :

    + + +$ httxt2dbm -i fichier-map.txt -o fichier-map.map + + +

    Vous pouvez alors faire référence au fichier obtenu dans votre +directive RewriteMap :

    + +RewriteMap mapname "dbm:/etc/apache/mapfile.map" + + + +

    Notez qu'avec certains types dbm, plusieurs fichiers possédant le +même nom de base sont créés. Par exemple, vous pouvez obtenir deux +fichiers nommés fichier-map.map.dir et +fichier-map.map.pag. Ceci est tout à fait normal, et vous +ne devez utiliser que le nom de base fichier-map.map dans votre +directive RewriteMap.

    +
    + +Mise en cache des recherches +

    + Les clés de recherche sont mises en cache par httpd jusqu'à ce que + le mtime (date de modification) du fichier de + correspondances soit modifié, ou que le serveur httpd soit + redémarré, ce qui améliore les performances pour les tables de + correspondances consultées par de nombreuses requêtes. +

    +
    + +
    + +
    prg: Programme de réécriture externe + +

    Lorque le type-map prg est spécifié, la source est + un chemin du système de fichiers vers un programme exécutable + destiné à effectuer la mise en correspondance. Il peut s'agir d'un + fichier binaire compilé, ou d'un programme en langage interprété + comme Perl ou Python.

    + +

    Ce programme est lancé une fois au démarrage du serveur HTTP + Apache, puis communique avec le moteur de réécriture via + STDIN et STDOUT. En d'autres termes, pour + chaque recherche de correspondance, il reçoit un argument via + STDIN, et doit renvoyer en guise de réponse une chaîne + terminée par un caractère nouvelle-ligne sur STDOUT. Si + la recherche de correspondance est infructueuse, le programme doit + l'indiquer en retournant la chaîne de quatre caractères + "NULL".

    + +

    Les programmes de réécriture externes ne sont pas lancés s'il + n'ont pas été définis dans un contexte où la directive RewriteEngine est définie à + on.

    + +

    Cette fonctionnalité utilise le mutex rewrite-map + nécessaire à la fiabilité des communications avec le programme. Le + mécanisme de mutex et le fichier verrou peuvent être définis via la + directive Mutex.

    + +

    Voici un exemple simple qui remplace tous les tirets par des + caractères de soulignement dans l'URI de la requête.

    + +

    Configuration de la réécriture

    + + +RewriteMap d2u "prg:/www/bin/dash2under.pl" +RewriteRule "-" "${d2u:%{REQUEST_URI}}" + + +

    dash2under.pl

    + + #!/usr/bin/perl + $| = 1; # Turn off I/O buffering + while (<STDIN>) { + s/-/_/g; # Remplace tous les tirets par des caractères de soulignement + print $_; + } + + +Mises en garde ! +
      +
    • Votre programme doit être le plus +simple possible. Si le programme se bloque, httpd va attendre +indéfiniment une réponse de sa part, et par conséquent ne répondra plus +aux requêtes.
    • +
    • Assurez-vous de bien désactiver la mise en tampon dans votre +programme. En Perl, ceci est effectué à la seconde ligne du script de +l'exemple - $| = 1; - La syntaxe sera bien entendu +différente dans +d'autres langages. Si les entrées/sorties sont mises en tampon, httpd va +attendre une sortie, et va par conséquent se bloquer.
    • +
    • Rappelez-vous qu'il n'existe qu'une copie du programme lancé au +démarrage du serveur, et que toutes les requêtes vont devoir passer par +ce goulot d'étranglement. Ceci peut provoquer des ralentissements +significatifs si de nombreuses requêtes doivent être traitées, ou si le +script lui-même est très lent.
    • +
    +
    + +
    + + +
    + dbd ou fastdbd: requête SQL + +

    Lorsque le type-map dbd ou fastdbd est + spécifié, la source est une requête SQL SELECT qui reçoit un + argument et renvoie une seule valeur.

    + +

    Pour que cette requête puisse être exécutée, + mod_dbd doit être configuré pour attaquer la base + de données concernée.

    + +

    Ce type-map existe sous deux formes. Avec le type-map + dbd, la requête est exécutée à chaque demande, tandis + qu'avec le type-map fastdbd, les recherches dans la + base de données sont mises en cache en interne. fastdbd + est donc plus efficace et donc plus rapide ; par contre, il ne + tiendra pas compte des modifications apportées à la base de données + jusqu'à ce que le serveur soit redémarré.

    + +

    Si une requête renvoie plusieurs enregistrements, un de ceux-ci + sera sélectionné aléatoirement.

    + + Exemple + +RewriteMap ma-requete "fastdbd:SELECT destination FROM rewrite WHERE source = %s" + + + +
    +
    + Résumé + +

    La directive RewriteMap peut apparaître + plusieurs fois. Utilisez une directive + RewriteMap pour chaque fonction de mise en + correspondance pour déclarer son fichier de correspondances.

    + +

    Bien que l'on ne puisse pas déclarer de fonction + de mise en correspondance dans un contexte de répertoire (fichier + .htaccess ou section Directory), il est + possible d'utiliser cette fonction dans un tel contexte.

    + +
    +
    diff --git a/docs/manual/rewrite/rewritemap.xml.meta b/docs/manual/rewrite/rewritemap.xml.meta index ac494a6c5c3..b77e9e61685 100644 --- a/docs/manual/rewrite/rewritemap.xml.meta +++ b/docs/manual/rewrite/rewritemap.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/rewrite/tech.html.en b/docs/manual/rewrite/tech.html.en index 007d6565b9e..13363ad868a 100644 --- a/docs/manual/rewrite/tech.html.en +++ b/docs/manual/rewrite/tech.html.en @@ -1,22 +1,27 @@ - -Apache mod_rewrite Technical Details - Apache HTTP Server +Apache mod_rewrite Technical Details - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache mod_rewrite Technical Details

    +Apache > HTTP Server > Documentation > Version 2.4 > Rewrite
    top

    API Phases

    @@ -66,14 +71,23 @@ and URL matching.

    In per-directory context (i.e., within .htaccess files and Directory blocks), these rules are being applied after a URL has already been translated to a filename. Because of - this, mod_rewrite temporarily translates the filename back into a URL, - by stripping off directory path before appling the rules. (See the - RewriteBase directive to - see how you can further manipulate how this is handled.) Then, a new - internal subrequest is issued with the new URL. This restarts - processing of the request phases. (Be careful to avoid rules that - can cause looping. See RewriteLooping - for further discussion of this problem.

    + this, the URL-path that mod_rewrite initially compares RewriteRule directives against + is the full filesystem path to the translated filename with the current + directories path (including a trailing slash) removed from the front.

    + +

    To illustrate: If rules are in /var/www/foo/.htaccess and a request + for /foo/bar/baz is being processed, an expression like ^bar/baz$ would + match.

    + +

    If a substitution is made in per-directory context, a new internal + subrequest is issued with the new URL, which restarts processing of the + request phases. If the substitution is a relative path, the RewriteBase directive + determines the URL-path prefix prepended to the substitution. + In per-directory context, care must be taken to + create rules which will eventually (in some future "round" of per-directory + rewrite processing) not perform a substitution to avoid looping. + (See RewriteLooping + for further discussion of this problem.)

    Because of this further manipulation of the URL in per-directory context, you'll need to take care to craft your rewrite rules @@ -91,17 +105,17 @@ and URL matching.

    VirtualHost sectionRewriteRule ^/images/(.+)\.jpg /images/$1.gifRewriteRule "^/images/(.+)\.jpg" "/images/$1.gif"
    .htaccess file in document rootRewriteRule ^images/(.+)\.jpg images/$1.gifRewriteRule "^images/(.+)\.jpg" "images/$1.gif"
    .htaccess file in images directoryRewriteRule ^(.+)\.jpg $1.gifRewriteRule "^(.+)\.jpg" "$1.gif"
    @@ -135,7 +149,7 @@ and URL matching.

    first, and so the control flow is a little bit long-winded. See Figure 1 for more details.

    - Flow of RewriteRule and RewriteCond matching
    + Flow of RewriteRule and RewriteCond matching
    Figure 1:The control flow through the rewriting ruleset

    First the URL is matched against the @@ -164,7 +178,28 @@ and URL matching.

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/tech.html.fr b/docs/manual/rewrite/tech.html.fr index bd9d9720d5f..3c30d462017 100644 --- a/docs/manual/rewrite/tech.html.fr +++ b/docs/manual/rewrite/tech.html.fr @@ -1,22 +1,27 @@ - -Dtails techniques sur le module Apache mod_rewrite - Serveur Apache HTTP +Dtails techniques sur le module Apache mod_rewrite - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Dtails techniques sur le module Apache mod_rewrite

    +Apache > Serveur HTTP > Documentation > Version 2.4 > Rewrite

    Dtails techniques sur le module Apache mod_rewrite

    top

    Phases de l'API

    @@ -73,14 +78,27 @@ correspondance
  • Contr

    Dans un contexte de niveau rpertoire (autrement dit dans les fichiers .htaccess et les sections Directory), les rgles de rcriture s'appliquent aprs - la traduction de l'URL en nom de fichier. C'est pourquoi mod_rewrite - retraduit temporairement le nom de fichier en URL en supprimant le - chemin de rpertoire avant d'appliquer les rgles (Reportez-vous - la directive RewriteBase - pour voir comment vous pourrez par la suite personnaliser la manire - dont tout ceci est trait). Ensuite, une nouvelle sous-requte - interne est initie avec la nouvelle URL, ce qui redmarre le - traitement des phases de l'API.

    + la traduction de l'URL en nom de fichier. C'est pourquoi le chemin + URL auquel mod_rewrite compare initialement les directives + RewriteRule est le + chemin complet vers le nom de fichier traduit amput de la partie + rpertoires (y compris le dernier slash).

    + +

    Un exemple : si les rgles se trouvent dans + /var/www/foo/.htaccess et si une requte pour /foo/bar/baz est + trait, une expression comme ^bar/baz$ correspondra.

    + +

    Si une substitution intervient dans un contexte de rpertoire, + une nouvelle sous-requte interne est gnre avec la nouvelle URL, + ce qui relance le traitement des phases de la requte. Si la + substitution est un chemin relatif, la directive RewriteBase dtermine le chemin URL + devant prfixer cette substitution. Dans un contexte de rpertoire, + il faut s'assurer de crer des rgles qui + n'effectueront pas de substitution au + cours d'une passe ultrieure du processus de rcriture au niveau + rpertoire afin d'viter les bouclages . Voir Bouclage dans le + processus de rcriture pour une discussion plus dtaille + propos de ce problme.

    En consquence de cette manipulation de l'URL , vous devrez pensez confectionner diffremment vos rgles de rcriture dans un @@ -98,17 +116,17 @@ correspondance

  • Contr
  • Section VirtualHostRewriteRule ^/images/(.+)\.jpg /images/$1.gifRewriteRule "^/images/(.+)\.jpg" "/images/$1.gif"
    Fichier .htaccess la racine des documentsRewriteRule ^images/(.+)\.jpg images/$1.gifRewriteRule "^images/(.+)\.jpg" "images/$1.gif"
    Fichier .htaccess dans le rpertoire imagesRewriteRule ^(.+)\.jpg $1.gifRewriteRule "^(.+)\.jpg" "$1.gif"
    @@ -145,17 +163,19 @@ correspondance
  • Contr contrle est un peu compliqu. Voir la figure 1 pour plus de dtails.

    - Flux des comparaisons des directives RewriteRule et RewriteCond
    + Flux des comparaisons des directives RewriteRule et RewriteCond
    Figure 1:Droulement du contrle travers le jeu de rgles de rcriture

    -

    Comme vous pouvez le voir, l'URL est tout d'abord compare au +

    L'URL est tout d'abord compare au Modle de chaque rgle. Lorsqu'une rgle ne s'applique pas, mod_rewrite stoppe immdiatement le traitement de cette rgle et passe la rgle suivante. Si l'URL correspond au Modle, mod_rewrite recherche la prsence de conditions - correspondantes. S'il n'y en a pas, mod_rewrite remplace - simplement l'URL par une chane labore partir de la chane de + correspondantes (les directives Rewritecond apparaissant dans la + configuration juste + avant les rgles de rcriture). S'il n'y en a pas, mod_rewrite remplace + l'URL par une chane labore partir de la chane de Substitution, puis passe la rgle suivante. Si des conditions sont prsentes, mod_rewrite lance un bouclage secondaire afin de les traiter selon l'ordre dans lequel elles @@ -176,7 +196,28 @@ correspondance

  • Contr +
  • top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/tech.xml b/docs/manual/rewrite/tech.xml index d30f8748a54..180a65770ed 100644 --- a/docs/manual/rewrite/tech.xml +++ b/docs/manual/rewrite/tech.xml @@ -76,14 +76,25 @@ and URL matching.

    In per-directory context (i.e., within .htaccess files and Directory blocks), these rules are being applied after a URL has already been translated to a filename. Because of - this, mod_rewrite temporarily translates the filename back into a URL, - by stripping off directory path before appling the rules. (See the - RewriteBase directive to - see how you can further manipulate how this is handled.) Then, a new - internal subrequest is issued with the new URL. This restarts - processing of the request phases. (Be careful to avoid rules that - can cause looping. See RewriteLooping - for further discussion of this problem.

    + this, the URL-path that mod_rewrite initially compares RewriteRule directives against + is the full filesystem path to the translated filename with the current + directories path (including a trailing slash) removed from the front.

    + +

    To illustrate: If rules are in /var/www/foo/.htaccess and a request + for /foo/bar/baz is being processed, an expression like ^bar/baz$ would + match.

    + +

    If a substitution is made in per-directory context, a new internal + subrequest is issued with the new URL, which restarts processing of the + request phases. If the substitution is a relative path, the RewriteBase directive + determines the URL-path prefix prepended to the substitution. + In per-directory context, care must be taken to + create rules which will eventually (in some future "round" of per-directory + rewrite processing) not perform a substitution to avoid looping. + (See RewriteLooping + for further discussion of this problem.)

    Because of this further manipulation of the URL in per-directory context, you'll need to take care to craft your rewrite rules @@ -101,17 +112,17 @@ and URL matching.

    VirtualHost section - RewriteRule ^/images/(.+)\.jpg /images/$1.gif + RewriteRule "^/images/(.+)\.jpg" "/images/$1.gif" .htaccess file in document root - RewriteRule ^images/(.+)\.jpg images/$1.gif + RewriteRule "^images/(.+)\.jpg" "images/$1.gif" .htaccess file in images directory - RewriteRule ^(.+)\.jpg $1.gif + RewriteRule "^(.+)\.jpg" "$1.gif" @@ -147,7 +158,7 @@ and URL matching.

    first, and so the control flow is a little bit long-winded. See Figure 1 for more details.

    - Flow of RewriteRule and RewriteCond matching
    Figure 1:The control flow through the rewriting ruleset

    diff --git a/docs/manual/rewrite/tech.xml.fr b/docs/manual/rewrite/tech.xml.fr index 6c5b87e184e..9905d8a00db 100644 --- a/docs/manual/rewrite/tech.xml.fr +++ b/docs/manual/rewrite/tech.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -85,14 +85,29 @@ correspondance

    Dans un contexte de niveau répertoire (autrement dit dans les fichiers .htaccess et les sections Directory), les règles de réécriture s'appliquent après - la traduction de l'URL en nom de fichier. C'est pourquoi mod_rewrite - retraduit temporairement le nom de fichier en URL en supprimant le - chemin de répertoire avant d'appliquer les règles (Reportez-vous à - la directive RewriteBase - pour voir comment vous pourrez par la suite personnaliser la manière - dont tout ceci est traité). Ensuite, une nouvelle sous-requête - interne est initiée avec la nouvelle URL, ce qui redémarre le - traitement des phases de l'API.

    + la traduction de l'URL en nom de fichier. C'est pourquoi le chemin + URL auquel mod_rewrite compare initialement les directives + RewriteRule est le + chemin complet vers le nom de fichier traduit amputé de la partie + répertoires (y compris le dernier slash).

    + +

    Un exemple : si les règles se trouvent dans + /var/www/foo/.htaccess et si une requête pour /foo/bar/baz est + traité, une expression comme ^bar/baz$ correspondra.

    + +

    Si une substitution intervient dans un contexte de répertoire, + une nouvelle sous-requête interne est générée avec la nouvelle URL, + ce qui relance le traitement des phases de la requête. Si la + substitution est un chemin relatif, la directive RewriteBase détermine le chemin URL + devant préfixer cette substitution. Dans un contexte de répertoire, + il faut s'assurer de créer des règles qui + n'effectueront pas de substitution au + cours d'une passe ultérieure du processus de réécriture au niveau + répertoire afin d'éviter les bouclages . Voir Bouclage dans le + processus de réécriture pour une discussion plus détaillée à + propos de ce problème.

    En conséquence de cette manipulation de l'URL , vous devrez pensez à confectionner différemment vos règles de réécriture dans un @@ -110,17 +125,17 @@ correspondance Section VirtualHost - RewriteRule ^/images/(.+)\.jpg /images/$1.gif + RewriteRule "^/images/(.+)\.jpg" "/images/$1.gif" Fichier .htaccess à la racine des documents - RewriteRule ^images/(.+)\.jpg images/$1.gif + RewriteRule "^images/(.+)\.jpg" "images/$1.gif" Fichier .htaccess dans le répertoire images - RewriteRule ^(.+)\.jpg $1.gif + RewriteRule "^(.+)\.jpg" "$1.gif" @@ -158,18 +173,20 @@ correspondance contrôle est un peu compliqué. Voir la figure 1 pour plus de détails.

    - Flux des comparaisons des directives RewriteRule et RewriteCond
    Figure 1:Déroulement du contrôle à travers le jeu de règles de réécriture

    -

    Comme vous pouvez le voir, l'URL est tout d'abord comparée au +

    L'URL est tout d'abord comparée au Modèle de chaque règle. Lorsqu'une règle ne s'applique pas, mod_rewrite stoppe immédiatement le traitement de cette règle et passe à la règle suivante. Si l'URL correspond au Modèle, mod_rewrite recherche la présence de conditions - correspondantes. S'il n'y en a pas, mod_rewrite remplace - simplement l'URL par une chaîne élaborée à partir de la chaîne de + correspondantes (les directives Rewritecond apparaissant dans la + configuration juste + avant les règles de réécriture). S'il n'y en a pas, mod_rewrite remplace + l'URL par une chaîne élaborée à partir de la chaîne de Substitution, puis passe à la règle suivante. Si des conditions sont présentes, mod_rewrite lance un bouclage secondaire afin de les traiter selon l'ordre dans lequel elles diff --git a/docs/manual/rewrite/vhosts.html b/docs/manual/rewrite/vhosts.html index b99209bdf60..7c0322f2ca8 100644 --- a/docs/manual/rewrite/vhosts.html +++ b/docs/manual/rewrite/vhosts.html @@ -3,3 +3,7 @@ URI: vhosts.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: vhosts.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/rewrite/vhosts.html.en b/docs/manual/rewrite/vhosts.html.en index 77d809881ad..eae9303316e 100644 --- a/docs/manual/rewrite/vhosts.html.en +++ b/docs/manual/rewrite/vhosts.html.en @@ -1,24 +1,30 @@ - -Dynamic mass virtual hosts with mod_rewrite - Apache HTTP Server +Dynamic mass virtual hosts with mod_rewrite - Apache HTTP Server Version 2.4 - + + +

    + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Virtual Hosts For Arbitrary Hostnames

    @@ -62,14 +68,13 @@ mod_rewrite document.
    -

    -RewriteEngine on
    -
    -RewriteMap lowercase int:tolower
    -
    -RewriteCond %{lowercase:%{HTTP_HOST}} ^www\.([^.]+)\.example\.com$
    -RewriteRule ^(.*) /home/%1/www$1 -

    +
    RewriteEngine on
    +
    +RewriteMap    lowercase int:tolower
    +
    +RewriteCond   "${lowercase:%{HTTP_HOST}}"   "^www\.([^.]+)\.example\.com$"
    +RewriteRule   "^(.*)" "/home/%1/www$1"
    +
    Discussion
    @@ -106,7 +111,7 @@ dynamic content, and Alias resolution. Virtual Hosts Using mod_rewrite

    This extract from httpd.conf does the same - thing as the first example. The first + thing as the first example. The first half is very similar to the corresponding part above, except for some changes, required for backward compatibility and to make the mod_rewrite part work properly; the second half @@ -119,39 +124,36 @@ dynamic content, and Alias resolution. any ScriptAlias directives, we must have mod_rewrite explicitly enact those mappings.

    -

    -# get the server name from the Host: header
    -UseCanonicalName Off
    -
    -# splittable logs
    -LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    -CustomLog logs/access_log vcommon
    -
    -<Directory /www/hosts>
    - - # ExecCGI is needed here because we can't force
    - # CGI execution in the way that ScriptAlias does
    - Options FollowSymLinks ExecCGI
    -
    -</Directory>
    -
    -RewriteEngine On
    -
    -# a ServerName derived from a Host: header may be any case at all
    -RewriteMap lowercase int:tolower
    -
    -## deal with normal documents first:
    -# allow Alias /icons/ to work - repeat for other aliases
    -RewriteCond %{REQUEST_URI} !^/icons/
    -# allow CGIs to work
    -RewriteCond %{REQUEST_URI} !^/cgi-bin/
    -# do the magic
    -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
    -
    -## and now deal with CGIs - we have to force a handler
    -RewriteCond %{REQUEST_URI} ^/cgi-bin/
    -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [H=cgi-script]
    -

    +
    # get the server name from the Host: header
    +UseCanonicalName Off
    +
    +# splittable logs
    +LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    +CustomLog "logs/access_log" vcommon
    +
    +<Directory "/www/hosts">
    +    # ExecCGI is needed here because we can't force
    +    # CGI execution in the way that ScriptAlias does
    +    Options FollowSymLinks ExecCGI
    +</Directory>
    +
    +RewriteEngine On
    +
    +# a ServerName derived from a Host: header may be any case at all
    +RewriteMap  lowercase  int:tolower
    +
    +## deal with normal documents first:
    +# allow Alias "/icons/" to work - repeat for other aliases
    +RewriteCond  "%{REQUEST_URI}"  "!^/icons/"
    +# allow CGIs to work
    +RewriteCond  "%{REQUEST_URI}"  "!^/cgi-bin/"
    +# do the magic
    +RewriteRule  "^/(.*)$"  "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1"
    +
    +## and now deal with CGIs - we have to force a handler
    +RewriteCond  "%{REQUEST_URI}"  "^/cgi-bin/"
    +RewriteRule  "^/(.*)$"  "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1"  [H=cgi-script]
    +
    top
    @@ -174,32 +176,53 @@ customer-N.example.com /www/customers/N

    The httpd.conf should contain the following:

    -

    -RewriteEngine on
    -
    -RewriteMap lowercase int:tolower
    -
    -# define the map file
    -RewriteMap vhost txt:/www/conf/vhost.map
    -
    -# deal with aliases as above
    -RewriteCond %{REQUEST_URI} !^/icons/
    -RewriteCond %{REQUEST_URI} !^/cgi-bin/
    -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    -# this does the file-based remap
    -RewriteCond ${vhost:%1} ^(/.*)$
    -RewriteRule ^/(.*)$ %1/docs/$1
    -
    -RewriteCond %{REQUEST_URI} ^/cgi-bin/
    -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    -RewriteCond ${vhost:%1} ^(/.*)$
    -RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script] -

    +
    RewriteEngine on
    +
    +RewriteMap   lowercase  int:tolower
    +
    +# define the map file
    +RewriteMap   vhost      "txt:/www/conf/vhost.map"
    +
    +# deal with aliases as above
    +RewriteCond  "%{REQUEST_URI}"               "!^/icons/"
    +RewriteCond  "%{REQUEST_URI}"               "!^/cgi-bin/"
    +RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
    +# this does the file-based remap
    +RewriteCond  "${vhost:%1}"                  "^(/.*)$"
    +RewriteRule  "^/(.*)$"                      "%1/docs/$1"
    +
    +RewriteCond  "%{REQUEST_URI}"               "^/cgi-bin/"
    +RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
    +RewriteCond  "${vhost:%1}"                  "^(/.*)$"
    +RewriteRule  "^/cgi-bin/(.*)$"                      "%1/cgi-bin/$1" [H=cgi-script]
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/rewrite/vhosts.html.fr b/docs/manual/rewrite/vhosts.html.fr new file mode 100644 index 00000000000..36a276908bc --- /dev/null +++ b/docs/manual/rewrite/vhosts.html.fr @@ -0,0 +1,238 @@ + + + + + +Hbergement virtuel de masse avec mod_rewrite - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Hbergement virtuel de masse avec mod_rewrite

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + +

    Ce document est un complment la documentation de rfrence du module +mod_rewrite. Il dcrit comment crer des serveurs +virtuels dynamiquement configurs en utilisant +mod_rewrite.

    + +
    L'utilisation de mod_rewrite n'est pas la meilleure +mthode pour configurer des serveurs virtuels. Vous devez dans un +premier temps tenter de rsoudre votre problme via ces d'autres mthodes avant d'avoir +recours mod_rewrite. Voir aussi le document Comment viter l'utilisation de +mod_rewrite.
    + + +
    + +
    top
    +
    +

    Serveurs virtuels pour des noms d'htes arbitraires

    + + + +
    +
    Description :
    + +
    +

    Nous voulons crer automatiquement un serveur virtuel pour tout + nom d'hte qui peut tre rsolu dans notre domaine, sans avoir + crer de nouvelle section VirtualHost.

    + +

    Dans cet exemple, nous supposons que nous utilisons le nom d'hte + www.SITE.example.com pour chaque + utilisateur, et que nous servons leur contenu depuis + /home/SITE/www.

    +
    + +
    Solution :
    + +
    + +
    RewriteEngine on
    +
    +RewriteMap    lowercase int:tolower
    +
    +RewriteCond   "${lowercase:%{HTTP_HOST}}" "^www\.([^.]+)\.example\.com$"
    +RewriteRule   "^(.*)" "/home/%1/www$1"
    +
    + +
    Discussion
    +
    + +
    Vous devez vrifier le bon fonctionnement de la + rsolution DNS - Apache ne gre pas la rsolution de nom. Vous + devrez crer soit des enregistrements CNAME pour chaque nom d'hte, + soit un enregistrement DNS avec caractres gnriques. La cration + des enregistrements DNS est en dehors du sujet de ce document.
    + +

    La directive RewriteMap interne tolower permet de +s'assurer que les noms d'htes utiliss seront tous en minuscules, de +faon viter toute ambiguit dans la structure des rpertoires qui +doit tre cre.

    + +

    Les contenus des parenthses utilises dans une directive RewriteCond sont enregistrs dans les +rfrences arrires %1, %2, etc..., alors que +les contenus des parenthses utilises dans une directive RewriteRule le sont dans les +rfrences arrires $1, $2, etc...

    + +

    +Comme c'est le cas pour de nombreuses techniques discutes dans ce +document, mod_rewrite n'est vraiment pas la meilleure mthode pour +accomplir cette tche. Vous devez plutt vous tourner vers +mod_vhost_alias, car ce dernier sera bien plus mme +de grer tout ce qui est au del du domaine des fichiers statiques, +comme les contenus dynamiques et la rsolution des alias. +

    +
    +
    + +
    top
    +
    +

    Configuration dynamique de serveurs +virtuels via mod_rewrite

    + +

    Cet extrait du fichier httpd.conf permet d'obtenir + le mme rsultat que le premier exemple. + La premire moiti est trs similaire la partie correspondante + ci-dessus, except quelques modifications requises des fins de + compatibilit ascendante et pour faire en sorte que la partie + mod_rewrite fonctionne correctement ; la seconde moiti + configure mod_rewrite pour effectuer le travail + proprement dit.

    + +

    Comme mod_rewrite s'excute avant tout autre module + de traduction d'URI (comme mod_alias), il faut lui + ordonner explicitement d'ignorer toute URL susceptible d'tre + traite par ces autres modules. Et comme ces rgles auraient sinon + court-circuit toute directive ScriptAlias, nous devons + faire en sorte que mod_rewrite dclare explicitement + ces correspondances.

    + +
    # extrait le nom de serveur de l'en-tte Host:
    +UseCanonicalName Off
    +
    +# journaux dissociables
    +LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    +CustomLog "logs/access_log" vcommon
    +
    +<Directory "/www/hosts">
    +    # ExecCGI est ncessaire ici car on ne peut pas forcer l'excution
    +    # des CGI  la manire de ScriptAlias
    +    Options FollowSymLinks ExecCGI
    +</Directory>
    +
    +RewriteEngine On
    +
    +# un nom de serveur extrait d'un en-tte Host: peut tre dans n'importe
    +# quelle casse
    +
    +## on s'occupe tout d'abord des documents normaux :
    +# permet Alias "/icons/" de fonctionner - rpter pour les autres +RewriteCond "%{REQUEST_URI}" "!^/icons/" +# permet aux CGIs de fonctionner +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +# le coeur du traitement +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1" + +## on s'occupe maintenant des CGIs - on doit forcer l'utilisation d'un +# gestionnaire +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1" [H=cgi-script]
    + + +
    top
    +
    +

    Utilisation d'un fichier de configuration +du serveur virtuel spar

    + +

    Cette construction utilise des fonctionnalits plus avances de + mod_rewrite pour effectuer la traduction depuis le + serveur virtuel vers la racine des documents, partir d'un fichier + de configuration spar. Elle est plus souple mais ncessite une + configuration plus complique.

    + +

    Le fichier vhost.map devrait ressembler ceci :

    + +

    +www.client-1.example.com /www/clients/1
    +www.client-2.example.com /www/clients/2
    +# ...
    +www.client-N.example.com /www/clients/N
    +

    + +

    On doit ajouter httpd.conf :

    + +
    RewriteEngine on
    +
    +RewriteMap   lowercase  int:tolower
    +
    +# dfinit le fichier de correspondances
    +RewriteMap   vhost      "txt:/www/conf/vhost.map"
    +
    +# on s'occupe des alias comme ci-dessus
    +RewriteCond  "%{REQUEST_URI}"               "!^/icons/"
    +RewriteCond  "%{REQUEST_URI}"               "!^/cgi-bin/"
    +RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
    +# on effectue ici la remise en correspondance  base de fichier
    +RewriteCond  "${vhost:%1}"                  "^(/.*)$"
    +RewriteRule  "^/(.*)$"                      "%1/docs/$1"
    +
    +RewriteCond  "%{REQUEST_URI}"               "^/cgi-bin/"
    +RewriteCond  "${lowercase:%{SERVER_NAME}}"  "^(.+)$"
    +RewriteCond  "${vhost:%1}"                  "^(/.*)$"
    +RewriteRule  "^/cgi-bin/(.*)$"              "%1/cgi-bin/$1" [H=cgi-script]
    + + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/rewrite/vhosts.xml b/docs/manual/rewrite/vhosts.xml index 7a463dd8318..0d2c4309e87 100644 --- a/docs/manual/rewrite/vhosts.xml +++ b/docs/manual/rewrite/vhosts.xml @@ -71,14 +71,14 @@ mod_rewrite document.
    - -RewriteEngine on
    -
    -RewriteMap lowercase int:tolower
    -
    -RewriteCond %{lowercase:%{HTTP_HOST}} ^www\.([^.]+)\.example\.com$
    -RewriteRule ^(.*) /home/%1/www$1 -
    + +RewriteEngine on + +RewriteMap lowercase int:tolower + +RewriteCond "${lowercase:%{HTTP_HOST}}" "^www\.([^.]+)\.example\.com$" +RewriteRule "^(.*)" "/home/%1/www$1" +
    Discussion
    @@ -116,7 +116,7 @@ dynamic content, and Alias resolution. Virtual Hosts Using mod_rewrite

    This extract from httpd.conf does the same - thing as the first example. The first + thing as the first example. The first half is very similar to the corresponding part above, except for some changes, required for backward compatibility and to make the mod_rewrite part work properly; the second half @@ -129,39 +129,37 @@ dynamic content, and Alias resolution. any ScriptAlias directives, we must have mod_rewrite explicitly enact those mappings.

    - -# get the server name from the Host: header
    -UseCanonicalName Off
    -
    -# splittable logs
    -LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
    -CustomLog logs/access_log vcommon
    -
    -<Directory /www/hosts>
    - - # ExecCGI is needed here because we can't force
    - # CGI execution in the way that ScriptAlias does
    - Options FollowSymLinks ExecCGI
    -
    -</Directory>
    -
    -RewriteEngine On
    -
    -# a ServerName derived from a Host: header may be any case at all
    -RewriteMap lowercase int:tolower
    -
    -## deal with normal documents first:
    -# allow Alias /icons/ to work - repeat for other aliases
    -RewriteCond %{REQUEST_URI} !^/icons/
    -# allow CGIs to work
    -RewriteCond %{REQUEST_URI} !^/cgi-bin/
    -# do the magic
    -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1
    -
    -## and now deal with CGIs - we have to force a handler
    -RewriteCond %{REQUEST_URI} ^/cgi-bin/
    -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [H=cgi-script]
    -
    + +# get the server name from the Host: header +UseCanonicalName Off + +# splittable logs +LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon +CustomLog "logs/access_log" vcommon + +<Directory "/www/hosts"> + # ExecCGI is needed here because we can't force + # CGI execution in the way that ScriptAlias does + Options FollowSymLinks ExecCGI +</Directory> + +RewriteEngine On + +# a ServerName derived from a Host: header may be any case at all +RewriteMap lowercase int:tolower + +## deal with normal documents first: +# allow Alias "/icons/" to work - repeat for other aliases +RewriteCond "%{REQUEST_URI}" "!^/icons/" +# allow CGIs to work +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +# do the magic +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1" + +## and now deal with CGIs - we have to force a handler +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1" [H=cgi-script] + @@ -184,27 +182,27 @@ customer-N.example.com /www/customers/N

    The httpd.conf should contain the following:

    - -RewriteEngine on
    -
    -RewriteMap lowercase int:tolower
    -
    -# define the map file
    -RewriteMap vhost txt:/www/conf/vhost.map
    -
    -# deal with aliases as above
    -RewriteCond %{REQUEST_URI} !^/icons/
    -RewriteCond %{REQUEST_URI} !^/cgi-bin/
    -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    -# this does the file-based remap
    -RewriteCond ${vhost:%1} ^(/.*)$
    -RewriteRule ^/(.*)$ %1/docs/$1
    -
    -RewriteCond %{REQUEST_URI} ^/cgi-bin/
    -RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$
    -RewriteCond ${vhost:%1} ^(/.*)$
    -RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script] -
    + +RewriteEngine on + +RewriteMap lowercase int:tolower + +# define the map file +RewriteMap vhost "txt:/www/conf/vhost.map" + +# deal with aliases as above +RewriteCond "%{REQUEST_URI}" "!^/icons/" +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" +# this does the file-based remap +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/(.*)$" "%1/docs/$1" + +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/cgi-bin/(.*)$" "%1/cgi-bin/$1" [H=cgi-script] + diff --git a/docs/manual/rewrite/vhosts.xml.fr b/docs/manual/rewrite/vhosts.xml.fr new file mode 100644 index 00000000000..b2ef0223b64 --- /dev/null +++ b/docs/manual/rewrite/vhosts.xml.fr @@ -0,0 +1,223 @@ + + + + + + + + + + + Rewrite + +Hébergement virtuel de masse avec mod_rewrite + + + +

    Ce document est un complément à la documentation de référence du module +mod_rewrite. Il décrit comment créer des serveurs +virtuels dynamiquement configurés en utilisant +mod_rewrite.

    + +L'utilisation de mod_rewrite n'est pas la meilleure +méthode pour configurer des serveurs virtuels. Vous devez dans un +premier temps tenter de résoudre votre problème via ces d'autres méthodes avant d'avoir +recours à mod_rewrite. Voir aussi le document Comment éviter l'utilisation de +mod_rewrite. + + +
    +Documentation du module +Introduction à mod_rewrite +Redirection et remise en +correspondance +Contrôle d'accès + +Serveurs mandataires +Utilisation de RewriteMap +Techniques avancées +Quand ne pas utiliser mod_rewrite + +
    + + Serveurs virtuels pour des noms d'hôtes arbitraires + +
    +
    Description :
    + +
    +

    Nous voulons créer automatiquement un serveur virtuel pour tout + nom d'hôte qui peut être résolu dans notre domaine, sans avoir à + créer de nouvelle section VirtualHost.

    + +

    Dans cet exemple, nous supposons que nous utilisons le nom d'hôte + www.SITE.example.com pour chaque + utilisateur, et que nous servons leur contenu depuis + /home/SITE/www.

    +
    + +
    Solution :
    + +
    + + +RewriteEngine on + +RewriteMap lowercase int:tolower + +RewriteCond "${lowercase:%{HTTP_HOST}}" "^www\.([^.]+)\.example\.com$" +RewriteRule "^(.*)" "/home/%1/www$1" +
    + +
    Discussion
    +
    + + Vous devez vérifier le bon fonctionnement de la + résolution DNS - Apache ne gère pas la résolution de nom. Vous + devrez créer soit des enregistrements CNAME pour chaque nom d'hôte, + soit un enregistrement DNS avec caractères génériques. La création + des enregistrements DNS est en dehors du sujet de ce document. + +

    La directive RewriteMap interne tolower permet de +s'assurer que les noms d'hôtes utilisés seront tous en minuscules, de +façon à éviter toute ambiguité dans la structure des répertoires qui +doit être créée.

    + +

    Les contenus des parenthèses utilisées dans une directive RewriteCond sont enregistrés dans les +références arrières %1, %2, etc..., alors que +les contenus des parenthèses utilisées dans une directive RewriteRule le sont dans les +références arrières $1, $2, etc...

    + +

    +Comme c'est le cas pour de nombreuses techniques discutées dans ce +document, mod_rewrite n'est vraiment pas la meilleure méthode pour +accomplir cette tâche. Vous devez plutôt vous tourner vers +mod_vhost_alias, car ce dernier sera bien plus à même +de gérer tout ce qui est au delà du domaine des fichiers statiques, +comme les contenus dynamiques et la résolution des alias. +

    +
    +
    + +
    + +
    Configuration dynamique de serveurs +virtuels via <module>mod_rewrite</module> + +

    Cet extrait du fichier httpd.conf permet d'obtenir + le même résultat que le premier exemple. + La première moitié est très similaire à la partie correspondante + ci-dessus, excepté quelques modifications requises à des fins de + compatibilité ascendante et pour faire en sorte que la partie + mod_rewrite fonctionne correctement ; la seconde moitié + configure mod_rewrite pour effectuer le travail + proprement dit.

    + +

    Comme mod_rewrite s'exécute avant tout autre module + de traduction d'URI (comme mod_alias), il faut lui + ordonner explicitement d'ignorer toute URL susceptible d'être + traitée par ces autres modules. Et comme ces règles auraient sinon + court-circuité toute directive ScriptAlias, nous devons + faire en sorte que mod_rewrite déclare explicitement + ces correspondances.

    + + +# extrait le nom de serveur de l'en-tête Host: +UseCanonicalName Off + +# journaux dissociables +LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon +CustomLog "logs/access_log" vcommon + +<Directory "/www/hosts"> + # ExecCGI est nécessaire ici car on ne peut pas forcer l'exécution + # des CGI à la manière de ScriptAlias + Options FollowSymLinks ExecCGI +</Directory> + +RewriteEngine On + +# un nom de serveur extrait d'un en-tête Host: peut être dans n'importe +# quelle casse + +## on s'occupe tout d'abord des documents normaux :
    +# permet à Alias "/icons/" de fonctionner - répéter pour les autres +RewriteCond "%{REQUEST_URI}" "!^/icons/" +# permet aux CGIs de fonctionner +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +# le coeur du traitement +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1" + +## on s'occupe maintenant des CGIs - on doit forcer l'utilisation d'un +# gestionnaire +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteRule "^/(.*)$" "/www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1" [H=cgi-script] +
    + +
    + +
    Utilisation d'un fichier de configuration +du serveur virtuel séparé + +

    Cette construction utilise des fonctionnalités plus avancées de + mod_rewrite pour effectuer la traduction depuis le + serveur virtuel vers la racine des documents, à partir d'un fichier + de configuration séparé. Elle est plus souple mais nécessite une + configuration plus compliquée.

    + +

    Le fichier vhost.map devrait ressembler à ceci :

    + + +www.client-1.example.com /www/clients/1
    +www.client-2.example.com /www/clients/2
    +# ...
    +www.client-N.example.com /www/clients/N
    +
    + +

    On doit ajouter à httpd.conf :

    + + +RewriteEngine on + +RewriteMap lowercase int:tolower + +# définit le fichier de correspondances +RewriteMap vhost "txt:/www/conf/vhost.map" + +# on s'occupe des alias comme ci-dessus +RewriteCond "%{REQUEST_URI}" "!^/icons/" +RewriteCond "%{REQUEST_URI}" "!^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" +# on effectue ici la remise en correspondance à base de fichier +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/(.*)$" "%1/docs/$1" + +RewriteCond "%{REQUEST_URI}" "^/cgi-bin/" +RewriteCond "${lowercase:%{SERVER_NAME}}" "^(.+)$" +RewriteCond "${vhost:%1}" "^(/.*)$" +RewriteRule "^/cgi-bin/(.*)$" "%1/cgi-bin/$1" [H=cgi-script] + + +
    + +
    diff --git a/docs/manual/rewrite/vhosts.xml.meta b/docs/manual/rewrite/vhosts.xml.meta index 831c934db24..02e019991d3 100644 --- a/docs/manual/rewrite/vhosts.xml.meta +++ b/docs/manual/rewrite/vhosts.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/sections.html.en b/docs/manual/sections.html.en index 67a77960d85..8d5b3edfbb7 100644 --- a/docs/manual/sections.html.en +++ b/docs/manual/sections.html.en @@ -1,22 +1,27 @@ - -Configuration Sections - Apache HTTP Server +Configuration Sections - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Configuration Sections

    +Apache > HTTP Server > Documentation > Version 2.4

    Configuration Sections

    Available Languages:  en  |  fr  | @@ -35,8 +40,8 @@ to change the scope of other configuration directives.

  • Virtual Hosts
  • Proxy
  • What Directives are Allowed?
  • -
  • How the sections are merged
  • -
    +
  • How the sections are merged
  • +

    See also

    top

    Types of Configuration Section Containers

    @@ -59,11 +64,10 @@ with the following configuration, all requests will be redirected to another site only if the server is started using httpd -DClosedForNow:

    -

    -<IfDefine ClosedForNow>
    -Redirect / http://otherserver.example.com/
    -</IfDefine> -

    +
    <IfDefine ClosedForNow>
    +    Redirect "/" "http://otherserver.example.com/"
    +</IfDefine>
    +

    The <IfModule> directive is very similar, except it encloses directives that will @@ -76,14 +80,13 @@ installed. It should not be used to enclose directives that you want to work all the time, because it can suppress useful error messages about missing modules.

    -

    In the following example, the MimeMagicFiles directive will be +

    In the following example, the MimeMagicFile directive will be applied only if mod_mime_magic is available.

    -

    -<IfModule mod_mime_magic.c>
    -MimeMagicFile conf/magic
    -</IfModule> -

    +
    <IfModule mod_mime_magic.c>
    +    MimeMagicFile "conf/magic"
    +</IfModule>
    +

    The <IfVersion> directive is very similar to <IfDefine> and <IfModule>, except it encloses directives that will @@ -91,14 +94,11 @@ only be applied if a particular version of the server is executing. This module is designed for the use in test suites and large networks which have to deal with different httpd versions and different configurations.

    -

    - <IfVersion >= 2.1>
    - - # this happens only in versions greater or
    - # equal 2.1.0.
    -
    - </IfVersion> -

    +
    <IfVersion >= 2.4>
    +    # this happens only in versions greater or
    +    # equal 2.4.0.
    +</IfVersion>
    +

    <IfDefine>, <IfModule>, and the @@ -140,11 +140,10 @@ The same effect can be obtained using .htaccess fi following configuration, directory indexes will be enabled for the /var/web/dir1 directory and all subdirectories.

    -

    -<Directory /var/web/dir1>
    -Options +Indexes
    -</Directory> -

    +
    <Directory "/var/web/dir1">
    +    Options +Indexes
    +</Directory>
    +

    Directives enclosed in a <Files> section apply to any file with the specified name, regardless of what directory it lies in. @@ -153,12 +152,10 @@ when placed in the main section of the configuration file, deny access to any file named private.html regardless of where it is found.

    -

    -<Files private.html>
    -Order allow,deny
    -Deny from all
    -</Files> -

    +
    <Files "private.html">
    +    Require all denied
    +</Files>
    +

    To address files found in a particular part of the filesystem, the <Files> and @@ -170,14 +167,12 @@ access to /var/web/dir1/private.html, of private.html found under the /var/web/dir1/ directory.

    -

    -<Directory /var/web/dir1>
    -<Files private.html>
    -Order allow,deny
    -Deny from all
    -</Files>
    -</Directory> -

    +
    <Directory "/var/web/dir1">
    +    <Files "private.html">
    +        Require all denied
    +    </Files>
    +</Directory>
    +

    Webspace Containers

    @@ -193,12 +188,10 @@ In particular, it will apply to requests for http://yoursite.example.com/private/dir/file.html as well as any other requests starting with the /private string.

    -

    -<LocationMatch ^/private>
    -Order Allow,Deny
    -Deny from all
    -</Location> -

    +
    <LocationMatch "^/private">
    +    Require all denied
    +</LocationMatch>
    +

    The <Location> directive need not have anything to do with the filesystem. @@ -207,35 +200,31 @@ URL to an internal Apache HTTP Server handler provided by < No file called server-status needs to exist in the filesystem.

    -

    -<Location /server-status>
    -SetHandler server-status
    -</Location> -

    +
    <Location "/server-status">
    +    SetHandler server-status
    +</Location>
    +

    Overlapping Webspace

    In order to have two overlapping URLs one has to consider the order in which certain sections or directives are evaluated. For <Location> this would be:

    -

    -<Location /foo>
    -</Location>
    -<Location /foo/bar>
    +

    <Location "/foo">
     </Location>
    -

    -

    <Alias>es on the other hand, +<Location "/foo/bar"> +</Location> + +

    <Alias>es on the other hand, are mapped vice-versa:

    -

    -Alias /foo/bar /srv/www/uncommon/bar
    -Alias /foo /srv/www/common/foo
    -

    +
    Alias "/foo/bar" "/srv/www/uncommon/bar"
    +Alias "/foo" "/srv/www/common/foo"
    +

    The same is true for the ProxyPass directives:

    -

    -ProxyPass /special-area http://special.example.com smax=5 max=10
    -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On -

    +
    ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
    +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
    +

    Wildcards and Regular Expressions

    @@ -261,20 +250,28 @@ how directives are applied.

    A non-regex wildcard section that changes the configuration of all user directories could look as follows:

    -

    -<Directory /home/*/public_html>
    -Options Indexes
    -</Directory> -

    +
    <Directory "/home/*/public_html">
    +    Options Indexes
    +</Directory>
    +

    Using regex sections, we can deny access to many types of image files at once:

    -

    -<FilesMatch \.(?i:gif|jpe?g|png)$>
    -Order allow,deny
    -Deny from all
    -</FilesMatch> -

    +
    <FilesMatch "\.(?i:gif|jpe?g|png)$">
    +    Require all denied
    +</FilesMatch>
    + + +

    Regular expressions containing named groups and +backreferences are added to the environment with the +corresponding name in uppercase. This allows elements of filename paths +and URLs to be referenced from within expressions +and modules like mod_rewrite.

    + +
    <DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)">
    +    require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example"
    +</DirectoryMatch>
    + @@ -284,11 +281,10 @@ directive change the configuration depending on a condition which can be expressed by a boolean expression. For example, the following configuration denies access if the HTTP Referer header does not start with "http://www.example.com/".

    -

    -<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    -Require all denied
    -</If> -

    +
    <If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    +    Require all denied
    +</If>
    + @@ -306,12 +302,10 @@ different webspace locations (URLs) could map to the same filesystem location, allowing your restrictions to be circumvented. For example, consider the following configuration:

    -

    -<Location /dir/>
    -Order allow,deny
    -Deny from all
    -</Location> -

    +
    <Location "/dir/">
    +    Require all denied
    +</Location>
    +

    This works fine if the request is for http://yoursite.example.com/dir/. But what if you are on @@ -332,14 +326,14 @@ many other ways to map multiple webspace locations to the same filesystem location. Therefore you should always use the filesystem containers when you can. There is, however, one exception to this rule. Putting configuration restrictions in a <Location -/> section is perfectly safe because this section will apply +"/"> section is perfectly safe because this section will apply to all requests regardless of the specific URL.

    Nesting of sections

    -

    Some section types can be nested inside other section types. One the one -hand, <File> can be used +

    Some section types can be nested inside other section types. On the one +hand, <Files> can be used inside <Directory>. On the other hand, <If> can be used inside <Directory>, @@ -367,16 +361,14 @@ see the Virtual Host Documentation.

    and <ProxyMatch> containers apply enclosed configuration directives only to sites accessed through mod_proxy's proxy server -that match the specified URL. For example, the following configuration -will prevent the proxy server from being used to access the -www.example.com website.

    - -

    -<Proxy http://www.example.com/*>
    -Order allow,deny
    -Deny from all
    -</Proxy> -

    +that match the specified URL. For example, the following configuration +will allow only a subset of clients to access the +www.example.com website using the proxy server:

    + +
    <Proxy "http://www.example.com/*">
    +    Require host yournetwork.example.com
    +</Proxy>
    +
    top

    What Directives are Allowed?

    @@ -411,7 +403,7 @@ sections.
    top
    -

    How the sections are merged

    +

    How the sections are merged

    The configuration sections are applied in a very particular order. Since this can have important effects on how configuration directives @@ -426,7 +418,7 @@ are interpreted, it is important to understand how this works.

    <Directory>)
  • <DirectoryMatch> - (and <Directory ~>)
  • + (and <Directory "~">)
  • <Files> and <FilesMatch> done simultaneously
  • @@ -442,9 +434,9 @@ are interpreted, it is important to understand how this works.

    Apart from <Directory>, each group is processed in the order that they appear in the configuration files. <Directory> (group 1 above) is processed in the order shortest directory component to longest. - So for example, <Directory /var/web/dir> will + So for example, <Directory "/var/web/dir"> will be processed before <Directory - /var/web/dir/subdir>. If multiple <Directory> sections apply + "/var/web/dir/subdir">. If multiple <Directory> sections apply to the same directory they are processed in the configuration file order. Configurations included via the Include directive will be treated as if they were inside the including file at the location of the @@ -460,9 +452,7 @@ are interpreted, it is important to understand how this works.

    container takes the place of the <Directory> container in the processing order.

    -

    Later sections override earlier ones.

    - -

    Technical Note

    +

    Technical Note

    There is actually a <Location>/<LocationMatch> sequence performed just before the name translation phase @@ -470,58 +460,97 @@ are interpreted, it is important to understand how this works.

    are used to map URLs to filenames). The results of this sequence are completely thrown away after the translation has completed. -
    +
    + +

    Relationship between modules and configuration sections

    +

    One question that often arises after reading how configuration sections are + merged is related to how and when directives of specific modules like mod_rewrite + are processed. The answer is not trivial and needs a bit of background. + Each httpd module manages its own configuration, and each of its directives in httpd.conf specify one piece + of configuration in a particular context. httpd does not execute a command as it is read.

    +

    At runtime, the core of httpd iterates over the defined configuration sections in the order + described above to determine which ones apply to the current request. When the first section matches, + it is considered the current configuration for this request. If a subsequent section matches too, + then each module with a directive in either of the sections is given a chance to merge its configuration between the two sections. The result is a third configuration, and the process goes on until all the configuration sections + are evaluated.

    +

    After the above step, the "real" processing of the HTTP request begins: each module has a chance to run + and perform whatever tasks they like. They can retrieve their own final merged configuration from the core + of the httpd to determine how they should act.

    +

    An example can help to visualize the whole process. The following configuration uses the + Header directive of mod_headers to set + a specific HTTP header. What value will httpd set in the CustomHeaderName header for a request to + /example/index.html ? +

    +
    <Directory "/">
    +    Header set CustomHeaderName one
    +    <FilesMatch ".*">
    +        Header set CustomHeaderName three
    +    </FilesMatch>
    +</Directory>
    +
    +<Directory "/example">
    +    Header set CustomHeaderName two
    +</Directory>
    + +
      +
    • Directory "/" matches and an initial configuration to set the CustomHeaderName header with the value one is created.
    • +
    • Directory "/example" matches, and since mod_headers specifies in its code to override in case of a merge, a new configuration is created to set the CustomHeaderName header with the value two.
    • +
    • FilesMatch ".*" matches and another merge opportunity arises, causing the CustomHeaderName header to be set with the value three.
    • +
    • Eventually during the next steps of the HTTP request processing mod_headers will be called and it will receive the configuration to set the CustomHeaderName header with the value three. mod_headers normally uses this configuration to perfom its job, namely setting the foo header. This does not mean that a module can't perform a more complex action like discarding directives because not needed or deprecated, etc..
    • +
    + +

    This is true for .htaccess too since they have the same priority as Directory in the merge order. The important concept to understand is that configuration sections like Directory and FilesMatch are not comparable to module specific directives like Header or RewriteRule because they operate on different levels. +

    -

    Some Examples

    + +

    Some useful examples

    Below is an artificial example to show the order of merging. Assuming they all apply to the request, the directives in this example will be applied in the order A > B > C > D > E.

    -

    -<Location />
    -E
    -</Location>
    -
    -<Files f.html>
    -D
    -</Files>
    -
    -<VirtualHost *>
    -<Directory /a/b>
    -B
    -</Directory>
    -</VirtualHost>
    -
    -<DirectoryMatch "^.*b$">
    -C
    -</DirectoryMatch>
    -
    -<Directory /a/b>
    -A
    -</Directory>
    -
    -

    +
    <Location "/">
    +    E
    +</Location>
    +
    +<Files "f.html">
    +    D
    +</Files>
    +
    +<VirtualHost *>
    +<Directory "/a/b">
    +    B
    +</Directory>
    +</VirtualHost>
    +
    +<DirectoryMatch "^.*b$">
    +    C
    +</DirectoryMatch>
    +
    +<Directory "/a/b">
    +    A
    +</Directory>
    + +

    For a more concrete example, consider the following. Regardless of any access restrictions placed in <Directory> sections, the <Location> section will be evaluated last and will allow unrestricted access to the server. In other words, order of merging is important, so be careful!

    -

    -<Location />
    -Order deny,allow
    -Allow from all
    -</Location>
    -
    -# Woops! This <Directory> section will have no effect
    -<Directory />
    -Order allow,deny
    -Allow from all
    -Deny from badguy.example.com
    -</Directory> -

    +
    <Location "/">
    +    Require all granted
    +</Location>
    +
    +# Whoops!  This <Directory> section will have no effect
    +<Directory "/">
    +    <RequireAll>
    +        Require all granted
    +        Require not host badguy.example.com
    +    </RequireAll>
    +</Directory>
    + @@ -532,7 +561,28 @@ Deny from badguy.example.com
     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sections.html.fr b/docs/manual/sections.html.fr index d3bc8908891..18a6dc8b81a 100644 --- a/docs/manual/sections.html.fr +++ b/docs/manual/sections.html.fr @@ -1,22 +1,27 @@ - -Sections de configuration - Serveur Apache HTTP +Sections de configuration - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Sections de configuration

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Sections de configuration

    Langues Disponibles:  en  |  fr  | @@ -37,8 +42,8 @@ arborescence du site web et expressions bool

  • Htes virtuels
  • Mandataire
  • Quelles sont les directives autorises ?
  • -
  • Comment les sections sont combines entre elles
  • -
    +
  • Comment les sections sont combines entre elles
  • +

    Voir aussi

    top

    Types de conteneurs de sections de @@ -65,11 +70,10 @@ avec la configuration suivante, toutes les requ un autre site si le serveur est dmarr en utilisant la ligne de commande : httpd -DClosedForNow:

    -

    -<IfDefine ClosedForNow>
    -Redirect / http://otherserver.example.com/
    -</IfDefine> -

    +
    <IfDefine ClosedForNow>
    +    Redirect "/" "http://otherserver.example.com/"
    +</IfDefine>
    +

    Le conteneur <IfModule> est similaire; les directives qu'il contient ne s'appliqueront que si @@ -83,14 +87,13 @@ Il ne doit pas contenir de directives que vous souhaitez voir s'appliquer systmatiquement, car vous pouvez perdre ainsi de prcieux messages d'erreur propos de modules manquants.

    -

    Dans l'exemple suivant, la directive MimeMagicFiles ne s'appliquera que si le +

    Dans l'exemple suivant, la directive MimeMagicFile ne s'appliquera que si le module mod_mime_magic est disponible.

    -

    -<IfModule mod_mime_magic.c>
    -MimeMagicFile conf/magic
    -</IfModule> -

    +
    <IfModule mod_mime_magic.c>
    +    MimeMagicFile "conf/magic"
    +</IfModule>
    +

    Le conteneur <IfVersion> @@ -100,14 +103,11 @@ conteneur a et les grands rseaux qui doivent prendre en compte diffrentes versions et configurations de httpd.

    -

    - <IfVersion >= 2.1>
    - +

    <IfVersion >= 2.4>
         # les directives situes ici ne s'appliquent que si la version 
    - # est suprieure ou gale 2.1.0.
    - - </IfVersion> -

    + # est suprieure ou gale 2.4.0. +</IfVersion> +

    <IfDefine>, <IfModule>, et @@ -156,11 +156,10 @@ Le m configuration suivante, l'indexation sera active pour le rpertoire /var/web/dir1 et tous ses sous-rpertoires.

    -

    -<Directory /var/web/dir1>
    -Options +Indexes
    -</Directory> -

    +
    <Directory "/var/web/dir1">
    +    Options +Indexes
    +</Directory>
    +

    Les directives contenues dans une section <Files> s'appliquent tout fichier avec le nom spcifi, quel que soit le rpertoire dans lequel il se trouve. @@ -169,12 +168,10 @@ plac l'accs tout fichier nomm private.html quel que soit l'endroit o il se trouve.

    -

    -<Files private.html>
    -Order allow,deny
    -Deny from all
    -</Files> -

    +
    <Files "private.html">
    +    Require all denied
    +</Files>
    +

    Pour faire rfrence des fichiers qui se trouvent en des points particuliers du systme de fichiers, les sections @@ -187,14 +184,12 @@ l'acc private.html qui se trouve dans l'arborescence /var/web/dir1/.

    -

    -<Directory /var/web/dir1>
    -<Files private.html>
    -Order allow,deny
    -Deny from all
    -</Files>
    -</Directory> -

    +
    <Directory "/var/web/dir1">
    +    <Files "private.html">
    +        Require all denied
    +    </Files>
    +</Directory>
    +

    Conteneurs de l'arborescence du site web

    @@ -211,12 +206,10 @@ En particulier, l'interdiction s'appliquera aux requ http://yoursite.example.com/private/dir/file.html ainsi qu' toute requte commenant par la chane de caractres /private.

    -

    -<LocationMatch ^/private>
    -Order Allow,Deny
    -Deny from all
    -</Location> -

    +
    <LocationMatch "^/private">
    +    Require all denied
    +</LocationMatch>
    +

    Le conteneur <Location> n'a pas besoin de faire rfrence un lment du systme de fichiers. @@ -226,11 +219,10 @@ particuli Il n'est pas ncessaire de trouver un fichier nomm server-status dans le systme de fichiers.

    -

    -<Location /server-status>
    -SetHandler server-status
    -</Location> -

    +
    <Location "/server-status">
    +    SetHandler server-status
    +</Location>
    +

    Espace web imbriqu

    @@ -238,22 +230,19 @@ SetHandler server-status
    dans lequel certaines sections ou directives sont values. Pour <Location>, on doit avoir :

    -

    -<Location /foo>
    -</Location>
    -<Location /foo/bar>
    +

    <Location "/foo">
     </Location>
    -

    -

    Les directives <Alias>, quant elles, sont values vice-versa :

    -

    -Alias /foo/bar /srv/www/uncommon/bar
    -Alias /foo /srv/www/common/foo
    -

    +<Location "/foo/bar"> +</Location> + +

    Les directives <Alias>, quant elles, sont values vice-versa :

    +
    Alias "/foo/bar" "/srv/www/uncommon/bar"
    +Alias "/foo" "/srv/www/common/foo"
    +

    Ceci est aussi vrai pour les directives ProxyPass :

    -

    -ProxyPass /special-area http://special.example.com smax=5 max=10
    -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On -

    +
    ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
    +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
    + @@ -288,21 +277,29 @@ r mais sans utiliser les expressions rationnelles pourrait ressembler ceci :

    -

    -<Directory /home/*/public_html>
    -Options Indexes
    -</Directory> -

    +
    <Directory "/home/*/public_html">
    +    Options Indexes
    +</Directory>
    +

    Avec les conteneurs utilisant les expressions rationnelles, on peut interdire l'accs de nombreux types de fichiers d'images simultanment :

    -

    -<FilesMatch \.(?i:gif|jpe?g|png)$>
    -Order allow,deny
    -Deny from all
    -</FilesMatch> -

    +
    +<FilesMatch "\.(?i:gif|jpe?g|png)$">
    +    Require all denied
    +</FilesMatch>
    + + +

    Les expressions rationnelles contenant des groupes nomms et +des rfrences arrires sont ajoutes l'environnement avec +leur nom en majuscules. Ceci permet de rfrencer des lments de +chemins de fichiers et d'URLs depuis une expression et au sein de modules comme +mod_rewrite.

    + +
    <DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)">
    +    require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example"
    +</DirectoryMatch>
    + @@ -312,11 +309,10 @@ permet de modifier la configuration en fonction d'une condition qui peut tre dfinie sous la forme d'une expression boolenne. Dans l'exemple suivant, l'accs est interdit si l'en-tte HTTP Referer ne commence pas par "http://www.example.com/".

    -

    -<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    -Require all denied
    -</If> -

    +
    <If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    +    Require all denied
    +</If>
    + @@ -335,12 +331,10 @@ l'arborescence du site web (URLs) peuvent correspondre du systme de fichier, ce qui peut permettre de contourner vos restrictions. Par exemple, imaginez la configuration suivante :

    -

    -<Location /dir/>
    -Order allow,deny
    -Deny from all
    -</Location> -

    +
    <Location "/dir/">
    +    Require all denied
    +</Location>
    +

    Elle fonctionne correctement si la requte appelle http://yoursite.example.com/dir/. Mais que va-t-il se passer si @@ -367,14 +361,14 @@ localisation du syst possible toujours utiliser les conteneurs de systme de fichiers. Il y a cependant une exception cette rgle. Placer des restrictions de configuration dans un conteneur <Location -/> est tout fait sans rique car ce conteneur va s'appliquer +"/"> est tout fait sans rique car ce conteneur va s'appliquer toutes les requtes sans tenir compte de l'URL spcifique.

    Imbrication des sections

    Certains types de sections peuvent tre imbriqus : d'une part, on -peut utiliser les sections <File> l'intrieur des sections <Directory>, d'autre part, on +peut utiliser les sections <Files> l'intrieur des sections <Directory>, d'autre part, on peut utiliser les directives <If> l'intrieur des sections <Directory>, <Location> et <Files>. Les valeurs des expressions @@ -406,16 +400,14 @@ et <ProxyMa appliquent les directives de configuration qu'ils contiennent uniquement aux sites qui correspondent l'URL spcifie et auxquels on a accd via le serveur mandataire du module mod_proxy. -Par exemple, la configuration suivante -va interdire l'utilisation du serveur proxy pour accder au site -www.example.com.

    - -

    -<Proxy http://www.example.com/*>
    -Order allow,deny
    -Deny from all
    -</Proxy> -

    +Par exemple, la configuration suivante n'autorisera qu'un sous-ensemble de +clients accder au site www.example.com en passant par le serveur +mandataire :

    + +
    <Proxy "http://www.example.com/*">
    +    Require host yournetwork.example.com
    +</Proxy>
    +
    top
    top
    -

    Comment les sections sont combines entre elles

    +

    Comment les sections sont combines entre elles

    Les sections de configuration sont appliques dans un ordre trs particulier. Il est important de savoir comment cet ordre est dfini car il peut avoir @@ -470,7 +462,7 @@ sont interpr

  • Les sections <DirectoryMatch> - (et <Directory ~>)
  • + (et <Directory "~">)
  • Les sections <Files> et <FilesMatch> sont appliques simultanment
  • @@ -488,9 +480,9 @@ sont interpr l'ordre dans lequel il apparat dans les fichiers de configuration. Les sections <Directory> (groupe 1 ci-dessus) sont traites dans l'ordre du rpertoire le plus court vers le plus long. - Par exemple, <Directory /var/web/dir> sera + Par exemple, <Directory "/var/web/dir"> sera trait avant <Directory - /var/web/dir/subdir>. Si plusieurs sections <Directory> s'appliquent au mme + "/var/web/dir/subdir">
    . Si plusieurs sections <Directory> s'appliquent au mme rpertoire, elles sont traites selon l'ordre dans lequel elles apparaissent dans le fichier de configuration. Les sections de configuration incluses via la directive Include sont traites comme si elles se @@ -506,51 +498,118 @@ sont interpr

    Quand la requte est servie par le module mod_proxy, le conteneur <Proxy> prend la place du conteneur <Directory> dans l'ordre de traitement.

    - -

    Les sections situes plus loin dans le fichier de configuration prvalent - sur celles qui les prcdent.

    - -

    Note technique

    - Une squence - <Location>/<LocationMatch> + +

    Note technique

    + Une squence <Location>/<LocationMatch> est rellement traite juste avant la phase de traduction du nom (o Aliases et DocumentRoots sont utiliss pour faire correspondre les URLs aux noms de fichiers). Les effets de cette squence disparaissent totalement lorsque la traduction est termine. -
    +
    + +

    Interactions entre +modules et sections de configuration

    +

    Une question se pose souvent aprs avoir lu comment les sections de + configuration sont fusionnes : comment et quand les directives de modules + particuliers comme mod_rewrite sont-elles interprtes ? La + rponse n'est pas triviale et ncessite un approfondissement. Chaque module + httpd gre sa propre configuration, et chacune de ses directives dans + httpd.conf dfinit un lment de configuration dans un contexte particulier. + httpd n'excute pas un commande au moment o elle est lue.

    +

    A l'excution, le noyau de httpd parcours les sections de configuration + dans l'ordre dcrit ci-dessus afin de dterminer lesquelles s'appliquent + la requte courante. Lorsqu'une premire section s'applique, elle est + considre comme la configuration courante pour cette requte. Si une + section suivante s'applique aussi, chaque module qui possde des directives + dans chacune de ces sections a la possibilit de fusionner sa configuration + entre ces deux sections. Il en rsulte une troisime configuration et le + processus de fusion se poursuit jusqu' ce que toutes les sections de + configuration aient t values.

    +

    Aprs l'tape prcdente, le traitement proprement dit de la requte HTTP + peut commencer : chaque module peut effectuer toute tche qui lui incombe, + et pour dterminer de quelle manire dont il doit agir, il peut s'appuyer + sur le noyau de httpd pour retrouver sa configuration globale issue de la + fusion prcdente.

    +

    Un exemple permet de mieux visualiser l'ensemble du processus. la + configuration suivante utilise la directive Header du module + mod_headers pour dfinir un en-tte HTTP spcifique. Quelle + valeur httpd va-t-il affecter l'en-tte CustomHeaderName pour + une requte vers /example/index.html ? +

    +
    <Directory "/">
    +    Header set CustomHeaderName one
    +    <FilesMatch ".*">
    +        Header set CustomHeaderName three
    +    </FilesMatch>
    +</Directory>
     
    -

    Quelques exemples

    +<Directory "/example"> + Header set CustomHeaderName two +</Directory>
    + +
      +
    • Directory "/" s'applique, et une configuration + initiale est cre qui dfinit l'en-tte CustomHeaderName + avec la valeur one.
    • +
    • Directory "/example" s'applique, et comme + mod_headers spcifie dans son code que + la valeur d'un en-tte doit tre crase si ce dernier est dfini + nouveau, une nouvelle configuration est cre qui dfinit l'en-tte + CustomHeaderName avec la valeur two.
    • +
    • FilesMatch ".*" s'applique, une nouvelle + opportunit de fusion surgit, et l'en-tte CustomHeaderName + est dfini la valeur three.
    • +
    • Finalement, au cours des tapes suivantes du traitement de la + requte HTTP, mod_headers sera sollicit, et il se + basera sur la configuration qui a dfini l'en-tte + CustomHeaderName la valeur three. + mod_headers utilise normalement cette configuration pour + accomplir sa tche, savoir dfinir des en-ttes HTTP. Cela ne veut + cependant pas dire qu'un module ne peut pas effectuer des actions plus + complexes comme dsactiver des directives car elle ne sont pas + ncessaires ou obsoltes, etc...
    • +
    + +

    Ceci est aussi vrai pour les fichiers .htaccess car ils possdent la mme + priorit que les sections Directory dans l'ordre de + fusion. Il faut bien comprendre que les sections de configuration comme + Directory et FilesMatch ne + sont pas comparables avec les directives spcifiques de modules comme + Header ou RewriteRule car elles agissent des + niveaux diffrents. +

    + + +

    Quelques exemples utiles

    Voici un exemple imaginaire qui montre l'ordre de combinaison des sections. En supposant qu'elles s'appliquent toutes la requte, les directives de cet exemple seront appliques dans l'ordre suivant : A > B > C > D > E.

    -

    -<Location />
    -E
    -</Location>
    -
    -<Files f.html>
    -D
    -</Files>
    -
    -<VirtualHost *>
    -<Directory /a/b>
    -B
    -</Directory>
    -</VirtualHost>
    -
    -<DirectoryMatch "^.*b$">
    -C
    -</DirectoryMatch>
    -
    -<Directory /a/b>
    -A
    -</Directory>
    -
    -

    +
    <Location "/">
    +    E
    +</Location>
    +
    +<Files "f.html">
    +    D
    +</Files>
    +
    +<VirtualHost *>
    +<Directory "/a/b">
    +    B
    +</Directory>
    +</VirtualHost>
    +
    +<DirectoryMatch "^.*b$">
    +    C
    +</DirectoryMatch>
    +
    +<Directory "/a/b">
    +    A
    +</Directory>
    +

    Pour un exemple plus concret, considrez ce qui suit. Sans tenir compte de toute restriction d'accs place dans les sections <Directory>, la section <Location> sera @@ -558,20 +617,18 @@ de toute restriction d'acc En d'autres termes, l'ordre de la combinaison des sections est important, soyez donc prudent !

    -

    -<Location />
    -Order deny,allow
    -Allow from all
    -</Location>
    -
    :if expand("%") == ""|browse confirm w|else|confirm w|endif - -# Arrghs! Cette section <Directory> n'aura aucun effet
    -<Directory />
    -Order allow,deny
    -Allow from all
    -Deny from badguy.example.com
    -</Directory> -

    +
    <Location "/">
    +    Require all granted
    +</Location>
    +
    +# Arrghs!  Cette section <Directory> n'aura aucun effet
    +<Directory "/">
    +    <RequireAll>
    +        Require all granted
    +        Require not host badguy.example.com
    +    </RequireAll>
    +</Directory>
    + @@ -582,7 +639,28 @@ Deny from badguy.example.com
     ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sections.html.ja.utf8 b/docs/manual/sections.html.ja.utf8 index 9ada1179610..e81afbd95c9 100644 --- a/docs/manual/sections.html.ja.utf8 +++ b/docs/manual/sections.html.ja.utf8 @@ -1,32 +1,38 @@ - -セクションの設定 - Apache HTTP サーバ +セクションの設定 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    セクションの設定

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    設定ファイル中のディレクティブは サーバ全体に適用されたり、特定のディレクトリやファイル、ホスト、URL にのみ 適用されるように制限したりすることができます。この文書は設定用のセクションの @@ -39,7 +45,7 @@

  • プロクシ
  • どのディレクティブが使えるの?
  • セクションのマージ方法
  • -
    +

    参照

    top

    設定用セクションコンテナの種類

    @@ -485,12 +491,33 @@ Deny from badguy.example.com
    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sections.html.ko.euc-kr b/docs/manual/sections.html.ko.euc-kr index 737d9026dd1..c974a3d3adb 100644 --- a/docs/manual/sections.html.ko.euc-kr +++ b/docs/manual/sections.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  en  |  fr  | @@ -39,7 +44,7 @@ URL

  • ȿ  þ ֳ?
  • ǵ ϴ
  • -
    +

    top

    @@ -420,7 +425,28 @@ Deny from badguy.example.com
     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sections.html.tr.utf8 b/docs/manual/sections.html.tr.utf8 index 4e8a3dc6b87..44ec24b569f 100644 --- a/docs/manual/sections.html.tr.utf8 +++ b/docs/manual/sections.html.tr.utf8 @@ -1,22 +1,27 @@ - -Yapılandırma Bölümleri - Apache HTTP Sunucusu +Yapılandırma Bölümleri - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Yapılandırma Bölümleri

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Yapılandırma Bölümleri

    Mevcut Diller:  en  |  fr  | @@ -24,474 +29,572 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Yapılandırma dosyalarındaki -yönergeler sunucunun tamamına uygulanacağı gibi sadece belli dizinler, -dosyalar, konaklar veya URL’lere uygulanmakla sınırlanabilir. Bu belgede, -yapılandırma bölümü taşıyıcılarınının veya .htaccess dosyalarının, -yapılandırma dosyalarındaki diğer yönergelerin etki alanlarını değiştirtirmek -için nasıl kullanılacağı açıklanmıştır.

    + +

    Yapılandırma dosyalarındaki + yönergeler sunucunun tamamına uygulanacağı gibi sadece belli dizinler, + dosyalar, konaklar veya URL’lere uygulanmakla sınırlanabilir. Bu + belgede, yapılandırma bölümü taşıyıcılarınının veya + .htaccess dosyalarının, yapılandırma dosyalarındaki diğer + yönergelerin etki alanlarını değiştirtirmek için nasıl kullanılacağı + açıklanmıştır.

    +
  • Bölümler Nasıl Katıştırılır?
  • +

    Ayrıca bakınız:

    top

    Yapılandırma Bölümü Taşıyıcılarının Türleri

    - - -

    İki temel taşıyıcı türü vardır. Taşıyıcıların çoğu her istek için -değerlendirmeye alınır. Taşıyıcılardaki yönergeler ise sadece bu -taşıyıcılarla eşleşen istekler için uygulanır. Diğer yandan, -<IfDefine>, -<IfModule> ve -<IfVersion> -taşıyıcıları sadece sunucu başlatılırken veya yeniden başlatılırken -değerlendirmeye alınır. Başlatma sırasında gerektirdikleri koşullar -sağlanıyorsa içerdikleri yönergeler tüm isteklere uygulanır. Aksi -takdirde, içerdikleri yönergeler yok sayılır.

    - -

    <IfDefine> yönergesi -sadece httpd komut satırında uygun parametreler -tanımlanmışsa uygulanabilecek yönergeleri içerir. Örneğin, aşağıdaki -yapılandırma ile tüm isteklerin diğer siteye yönlendirilebilmesi sadece -sunucu httpd -DClosedForNow komut satırı ile başlatıldığı -takdirde mümkün olur:

    - -

    -<IfDefine ClosedForNow>
    - - Redirect / http://otherserver.example.com/
    -
    -</IfDefine> -

    - -

    <IfModule> yönergesi -sadece belli bir modülün sunucuda kullanılabilir durumda olması halinde -uygulanabilecek yönergeleri içerir. Modülün ya sunucuyla birlikte durağan -olarak derlenmiş olması ya da devingen olarak derlenmiş ve yapılandırma -dosyasında yönergeden önce o modüle ilişkin bir LoadModule satırının bulunması gerekir. Bu yönergeyi sadece -belli bir modülün varlığının veya yokluğunun yapılandırma dosyanızın -çalışmasını etkilememesini istediğiniz durumlarda kullanmalısınız. -Eksik modüllerle ilgili hata iletilerini engellediğinden, taşıyıcı içine, -her zaman çalışması istenen yönergeler konulmamalıdır.

    - -

    Aşağıdaki örnekte, MimeMagicFiles yönergesi sadece mod_mime_magic -modülü mevcutsa uygulanacaktır.

    - -

    -<IfModule mod_mime_magic.c>
    - - MimeMagicFile conf/magic
    -
    -</IfModule> -

    - -

    <IfVersion> -yönergesi sunucunun belli bir sürümünün çalıştırılması halinde -uygulanabilecek yönergeleri içerebilmesi dışında <IfDefine> ve <IfModule> yönergeleri gibidir. -mod_version modülü farklı httpd sürümleri ve farklı -yapılandırmalarla büyük ağlarda çalışmayı mümkün kılmak veya sürüm -denemeleri yapabilmek amacıyla tasarlanmıştır.

    - -

    -<IfVersion >= 2.1>
    - - # burası sadece 2.1.0 veya daha üstü sürümlerde
    - # iş görür.
    -
    -</IfVersion> -

    - -

    <IfDefine>, -<IfModule> ve -<IfVersion> -yönergelerinin önüne "!" konularak olumsuz koşullar için uygulanabilir. -Ayrıca, bu bölümler daha karmaşık sınırlamalar elde etmek amacıyla bir -diğerinin içinde kullanılabilirler.

    + + +

    İki temel taşıyıcı türü vardır. Taşıyıcıların çoğu her istek için + değerlendirmeye alınır. Taşıyıcılardaki yönergeler ise sadece bu + taşıyıcılarla eşleşen istekler için uygulanır. Diğer yandan, + <IfDefine>, + <IfModule> ve + <IfVersion> + taşıyıcıları sadece sunucu başlatılırken veya yeniden başlatılırken + değerlendirmeye alınır. Başlatma sırasında gerektirdikleri koşullar + sağlanıyorsa içerdikleri yönergeler tüm isteklere uygulanır. Aksi + takdirde, içerdikleri yönergeler yok sayılır.

    + +

    <IfDefine> yönergesi + sadece httpd komut satırında uygun parametreler + tanımlanmışsa uygulanabilecek yönergeleri içerir. Örneğin, aşağıdaki + yapılandırma ile tüm isteklerin diğer siteye yönlendirilebilmesi sadece + sunucu httpd -DClosedForNow komut satırı ile başlatıldığı + takdirde mümkün olur:

    + +
    <IfDefine ClosedForNow>
    +  Redirect "/" "http://otherserver.example.com/"
    +</IfDefine>
    + + +

    <IfModule> yönergesi + sadece belli bir modülün sunucuda kullanılabilir durumda olması halinde + uygulanabilecek yönergeleri içerir. Modülün ya sunucuyla birlikte durağan + olarak derlenmiş olması ya da devingen olarak derlenmiş ve yapılandırma + dosyasında yönergeden önce o modüle ilişkin bir LoadModule satırının bulunması gerekir. Bu + yönergeyi sadece belli bir modülün varlığının veya yokluğunun + yapılandırma dosyanızın çalışmasını etkilememesini istediğiniz durumlarda + kullanmalısınız. Eksik modüllerle ilgili hata iletilerini + engellediğinden, taşıyıcı içine, her zaman çalışması istenen yönergeler + konulmamalıdır.

    + +

    Aşağıdaki örnekte, MimeMagicFile yönergesi sadece + mod_mime_magic modülü mevcutsa uygulanacaktır.

    + +
    <IfModule mod_mime_magic.c>
    +  MimeMagicFile "conf/magic"
    +</IfModule>
    + + +

    <IfVersion> + yönergesi sunucunun belli bir sürümünün çalıştırılması halinde + uygulanabilecek yönergeleri içerebilmesi dışında <IfDefine> ve <IfModule> yönergeleri gibidir. + mod_version modülü farklı httpd sürümleri ve farklı + yapılandırmalarla büyük ağlarda çalışmayı mümkün kılmak veya sürüm + denemeleri yapabilmek amacıyla tasarlanmıştır.

    + +
    <IfVersion >= 2.4>
    +  # burası sadece 2.4.0 veya daha üstü sürümlerde
    +  # iş görür.
    +</IfVersion>
    + + +

    <IfDefine>, + <IfModule> ve + <IfVersion> + yönergelerinin önüne "!" konularak olumsuz koşullar için uygulanabilir. + Ayrıca, bu bölümler daha karmaşık sınırlamalar elde etmek amacıyla bir + diğerinin içinde kullanılabilirler.

    top
    -

    Dosya Sistemi ve Site Alanı

    - -

    En sık kullanılan yapılandırma bölümü taşıyıcıları dosya sistemindeki -veya site alanındaki belli yerlerin yapılandırmalarını değiştirmekte -kullanılanlardır. Öncelikle, bu ikisi arasındaki farkları bilmek önemlidir. -Dosya sistemi disklerinizin işletim sistemi tarafından size gösterilen -halidir. Örneğin, öntanımlı kurulumda Apache, Unix sistemlerinde -/usr/local/apache2 altındayken Windows sistemlerinde -"c:/Program Files/Apache Group/Apache2" altındadır. -(Bilgi: Windows için bile, Apache’de dosya yolu belirtilirken -tersbölü değil normal bölü karakterleri kullanılır.) Site alanı -ise sunucu tarafından istemciye sunulan dizin ağacıdır. Yani, site -alanı içindeki /dir/ dizini, Apache’nin Unix üzerinde -dosya sistemine öntanımlı olarak kurulduğu yer göz önüne alınarak, -dosya sistemindeki /usr/local/apache2/htdocs/dir/ -dizinine karşılıktır. Site sayfaları veritabanlarından veya başka yerlerden -devingen olarak üretilebildiğinden site alanlarının doğrudan dosya -sistemine eşlenmesi gerekli değildir.

    - -

    Dosya Sistemi Taşıyıcıları

    - -

    <Directory> -ve <Files> taşıyıcıları, -düzenli ifade karşılıkları ile beraber, -yönergeleri dosya sisteminin parçalarına uygularlar. Bir <Directory> bölümü içindeki -yönergeler belli bir dosya sistemi dizinine ve onun alt dizinlerine -uygulanır. Aynı etki .htaccess dosyaları -kullanılarak da sağlanabilir. Örneğin aşağıdaki yapılandırmada, -/var/web/dir1 dizini ve alt dizinlerinde dizin içeriğinin -listelenmesi etkin kılınmaktadır.

    - -

    -<Directory /var/web/dir1>
    - - Options +Indexes
    -
    -</Directory> -

    - -

    Bir <Files> bölümü -içindeki yönergeler, hangi dizinde bulunduğuna bakılmaksızın ismi belirtilen -dosyalara uygulanır. Örneğin, aşağıdaki yapılandırma yönergeleri yapılandırma -dosyasının ana bölümüne yerleştirildiği takdirde gizli.html -isimli dosyalara nerede bulunursa bulunsun erişime izin vermeyecektir.

    - -

    -<Files gizli.html>
    - -Order allow,deny
    -Deny from all
    -
    -</Files> -

    - -

    Dosya sisteminin belli bir yerindeki belli dosyalarla ilgili yaptırımlar -için <Files> ve -<Directory> bölümleri -birlikte kullanılabilir. Örneğin, aşağıdaki yapılandırma -/var/web/dir1/gizli.html, -/var/web/dir1/subdir2/gizli.html, -/var/web/dir1/subdir3/gizli.html ve -/var/web/dir1/ altında bulunabilecek diğer tüm -gizli.html dosyalarına erişimi yasaklar.

    - -

    -<Directory /var/web/dir1>
    - -<Files gizli.html>
    - -Order allow,deny
    -Deny from all
    -
    -</Files>
    -
    -</Directory> -

    - - -

    Site Alanı Taşıyıcıları

    - -

    <Location> yönergesi -ve yönergenin düzenli ifade karşılığı -site alanındaki içerik için yapılandırmayı değiştirir. Örneğin aşağıdaki -yapılandırma, /gizli ile başlayan URL yollarına erişimi engeller. -Özellikle, http://siteniz.mesela.dom/gizli, -http://siteniz.mesela.dom/gizli123 ve -http://siteniz.mesela.dom/gizli/dir/dosya.html -istekleri yanında /gizli ile başlayan diğer isteklere de -uygulanır.

    - -

    -<Location /gizli>
    - -Order Allow,Deny
    -Deny from all
    -
    -</Location> -

    - -

    Dosya sistemi ile etkileşime girmeyen herşey için -<Location> -yönergesi gerekir. Aşağıdaki örnekte, belli bir URL’nin -mod_status modülü tarafından sağlanan bir dahili -Apache eylemcisine nasıl eşlenebileceği gösterilmiştir. Bu örnek -için dosya sisteminde server-status adında bir dosya -veya dizin bulunması gerekli değildir.

    - -

    -<Location /server-status>
    - -SetHandler server-status
    -
    -</Location> -

    - - -

    Dosya Adı Şablonları ve Düzenli İfadeler

    - -

    <Directory>, -<Files> ve -<Location> yönergelerinde, -Standart C kütüphanesindeki fnmatch işlevindeki gibi kabuk tarzı -dosya ismi kalıpları kullanılabilir. "*" karakteri herhangi bir karakter dizisi -ile eşleşirken "?" karakteri tek tek karakterlerle ve "[seq]" kalıbı -ise seq içindeki her karakterle eşleşir. "/" karakteri her hangi bir -kalıp karakteri ile eşleşmez; açıkça belirtilmesi gerekir.

    - -

    Daha esnek bir eşleşmenin gerekli olduğu durumlar için her taşıyıcının bir -düzenli ifade karşılığı vardır. <DirectoryMatch>, <FilesMatch> ve <LocationMatch> yönergelerinde gerekli eşleşmeleri seçmek için -perl uyumlu düzenli ifadelerin kullanımına -izin verilir. Ayrıca, yönergelerin uygulanışının düzenli ifade bölümleri -kullanılarak nasıl değiştirileceğini öğrenmek için, aşağıda, yapılandırmanın -katıştırılmasıyla ilgili bölüme de bakınız.

    - -

    Tüm kullanıcı dizinlerine ilişkin yapılandırmayı değiştirmek için dosya -ismi kalıpları şöyle kullanılabilirdi:

    - -

    -<Directory /home/*/public_html>
    - -Options Indexes
    -
    -</Directory> -

    - -

    Düzenli ifade bölümleri kullanarak çeşitli türlerdeki resim dosyalarına -erişimi bir defada yasaklayabiliriz:

    -

    -<FilesMatch \.(?i:gif|jpe?g|png)$>
    - -Order allow,deny
    -Deny from all
    -
    -</FilesMatch> -

    - - - -

    Ne, Ne Zaman Kullanılır?

    - -

    Dosya sistemi taşıyıcıları ile site alanı taşıyıcıları arasında seçim -yapmak aslında oldukça kolaydır. Dosya sisteminde bulunan nesnelere -uygulanacak yönergeler için daima <Directory> veya <Files> kullanılır. Dosya sisteminde bulunmayan nesnelere -(bir sayfanın bir veritabanı tarafından üretilmesi gibi) uygulanacak -yönergeler için ise <Location> kullanılır.

    - -

    Dosya sistemindeki nesnelere erişimi kısıtlarken asla -<Location> -kullanmamak önemlidir. Bunun sebebi farklı site alanı konumlarının -(URL’ler) aynı dosya sistemi konumuna eşlenebilmesi dolayısıyla -kısıtlamalarınızın etrafından dolaşılabilmesine izin vermesidir. -Örneğin, aşağıdaki yapılandırmayı ele alalım:

    - -

    -<Location /dir/>
    - -Order allow,deny
    -Deny from all
    -
    +

    Dosya Sistemi, Site Alanı ve Mantıksal İfadeler

    + + +

    En sık kullanılan yapılandırma bölümü taşıyıcıları dosya sistemindeki + veya site alanındaki belli yerlerin yapılandırmalarını değiştirmekte + kullanılanlardır. Öncelikle, bu ikisi arasındaki farkları bilmek + önemlidir. Dosya sistemi disklerinizin işletim sistemi tarafından size + gösterilen halidir. Örneğin, öntanımlı kurulumda Apache httpd, Unix + sistemlerinde /usr/local/apache2 altındayken Windows + sistemlerinde "c:/Program Files/Apache Group/Apache2" + altındadır. (Bilgi: Windows için bile, Apache httpd yapılandırma + dosyalarında dosya yolu belirtilirken tersbölü değil normal bölü + karakterleri kullanılır.) Site alanı ise sunucu tarafından istemciye + sunulan dizin ağacıdır. Yani, site alanı içindeki /dir/ + dizini, Apache httpd’nin Unix üzerinde dosya sistemine öntanımlı olarak + kurulduğu yer göz önüne alınarak, dosya sistemindeki + /usr/local/apache2/htdocs/dir/ dizinine karşılıktır. Site + sayfaları veritabanlarından veya başka yerlerden devingen olarak + üretilebildiğinden site alanlarının doğrudan dosya sistemine eşlenmesi + gerekli değildir.

    + +

    Dosya Sistemi Taşıyıcıları

    + +

    <Directory> + ve <Files> + taşıyıcıları, düzenli ifade karşılıkları + ile beraber, yönergeleri dosya sisteminin parçalarına uygularlar. Bir + <Directory> bölümü + içindeki yönergeler belli bir dosya sistemi dizinine ve onun alt + dizinlerine uygulanır. Aynı etki .htaccess + dosyaları kullanılarak da sağlanabilir. Örneğin aşağıdaki + yapılandırmada, /var/web/dir1 dizini ve alt dizinlerinde + dizin içeriğinin listelenmesi etkin kılınmaktadır.

    + +
    <Directory "/var/web/dir1">
    +  Options +Indexes
    +</Directory>
    + + +

    Bir <Files> bölümü + içindeki yönergeler, hangi dizinde bulunduğuna bakılmaksızın ismi + belirtilen dosyalara uygulanır. Örneğin, aşağıdaki yapılandırma + yönergeleri yapılandırma dosyasının ana bölümüne yerleştirildiği takdirde + gizli.html isimli dosyalara nerede bulunursa bulunsun + erişime izin vermeyecektir.

    + +
    <Files "gizli.html">
    +  Require all denied
    +</Files>
    + + +

    Dosya sisteminin belli bir yerindeki belli dosyalarla ilgili yaptırımlar + için <Files> ve + <Directory> bölümleri + birlikte kullanılabilir. Örneğin, aşağıdaki yapılandırma + /var/web/dir1/gizli.html, + /var/web/dir1/subdir2/gizli.html, + /var/web/dir1/subdir3/gizli.html ve + /var/web/dir1/ altında bulunabilecek diğer tüm + gizli.html dosyalarına erişimi yasaklar.

    + +
    <Directory "/var/web/dir1">
    + <Files "gizli.html">
    + Require all denied + </Files>
    +</Directory>
    + + + +

    Site Alanı Taşıyıcıları

    + +

    <Location> yönergesi + ve yönergenin düzenli ifade karşılığı + site alanındaki içerik için yapılandırmayı değiştirir. Örneğin aşağıdaki + yapılandırma, /gizli ile başlayan URL yollarına erişimi + engeller. Özellikle, http://siteniz.mesela.dom/gizli, + http://siteniz.mesela.dom/gizli123 ve + http://siteniz.mesela.dom/gizli/dir/dosya.html + istekleri yanında /gizli ile başlayan diğer isteklere de + uygulanır.

    + +
    <LocationMatch "^/gizli">
    +    Require all denied
    +</LocationMatch>
    + + +

    Dosya sistemi ile etkileşime girmeyen herşey için + <Location> + yönergesi gerekir. Aşağıdaki örnekte, belli bir URL’nin + mod_status modülü tarafından sağlanan bir dahili + Apache eylemcisine nasıl eşlenebileceği gösterilmiştir. Bu örnek + için dosya sisteminde server-status adında bir dosya + veya dizin bulunması gerekli değildir.

    + +
    <Location "/server-status">
    +    SetHandler server-status
    +</Location>
    + + + +

    Site Alanında Çakışma

    +

    Belli bölümler ve yönergeler değerlendirilirken çakışan iki URL bir URL + olarak dikkate alınır. <Location> yönergesi için bu şöyle olurdu:

    + +
    <Location "/foo">
     </Location>
    -

    - -

    http://siteniz.mesela.dom/dir/ için bir istek yapılmışsa -bu doğru çalışacaktır. Fakat dosya sistemi harf büyüklüğüne duyarsızsa -ne olacak? Kısıtlamanız, istek http://siteniz.mesela.dom/DIR/ -şeklinde yapılarak kolayca geçersiz kılınabilir. Halbuki <Directory> yönergesi isteğin -nasıl yapıldığına bakılmaksızın bu konumdan sunulan her türlü içeriğe -uygulanacaktı. (Dosya sistemi bağlarıyla bu da aşılabilir. Sembolik -bağlar kullanılarak aynı dizin dosya sisteminin bir çok yerine -yerleştirilebilir. <Directory> yönergesi dosya yolunu sıfırlamaksızın sembolik -bağları izleyecektir. Bu bakımdan, en yüksek seviyede güvenlik için uygun -Options yönergesi ile sembolik bağların -izlenmesi devredışı bırakılabilir.)

    - -

    Belki de siz sırf harf büyüklüğüne duyarlı bir dosya sistemi kullanıyorsunuz -diye böyle uygulamalara ihtiyacınız olmadığını düşünüyor olabilirsiniz, fakat -aynı site alanını çok sayıda dosya sistemi konumuna eşleyecek daha bir sürü -yol bulunduğunu unutmayınız. Bu bakımdan dosya sisteminde yapacağınız -kısıtlamalarda daima dosya sistemi taşıyıcılarını kullanmalısınız. -Bununla birlikte bu kuralın da bir istisnası vardır. Yapılandırma -kısıtlamalarının bir <Location/> bölümü içine koyulması, -bu bölüme konan yönergelerin etki alanının belli bir URL ile sınırlı -olmaması nedeniyle mükemmelen güvenlidir.

    +<Location "/foo/bar"> +</Location> + + +

    Diğer yandan <Takma + adlar> tam tersi eşlenir:

    + +
    Alias "/foo/bar" "/srv/www/uncommon/bar"
    +Alias "/foo" "/srv/www/common/foo"
    +

    Aynısı ProxyPass + yönergeleri için de geçerlidir:

    + +
    ProxyPass "/special-area" "http://special.example.com" smax=5 max=10
    +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On
    + + + +

    Dosya Adı Şablonları ve Düzenli İfadeler

    + + +

    <Directory>, + <Files> ve + <Location> + yönergelerinde, Standart C kütüphanesindeki fnmatch + işlevindeki gibi kabuk tarzı dosya ismi kalıpları kullanılabilir. "*" + karakteri herhangi bir karakter dizisi ile eşleşirken "?" karakteri tek + tek karakterlerle ve "[seq]" kalıbı ise seq içindeki + her karakterle eşleşir. "/" karakteri her hangi bir kalıp karakteri ile + eşleşmez; açıkça belirtilmesi gerekir.

    + +

    Daha esnek bir eşleşmenin gerekli olduğu durumlar için her taşıyıcının + bir düzenli ifade karşılığı vardır. <DirectoryMatch>, <FilesMatch> ve <LocationMatch> yönergelerinde gerekli + eşleşmeleri seçmek için perl uyumlu düzenli + ifadelerin kullanımına izin verilir. Ayrıca, yönergelerin + uygulanışının düzenli ifade bölümleri kullanılarak nasıl + değiştirileceğini öğrenmek için, aşağıda, yapılandırmanın + katıştırılmasıyla ilgili bölüme de bakınız.

    + +

    Tüm kullanıcı dizinlerine ilişkin yapılandırmayı değiştirmek için dosya + ismi kalıpları şöyle kullanılabilirdi:

    + +
    <Directory "/home/*/public_html">
    +    Options Indexes
    +</Directory>
    + + +

    Düzenli ifade bölümleri kullanarak çeşitli türlerdeki resim dosyalarına + erişimi bir defada yasaklayabiliriz:

    + +
    <FilesMatch "\.(?i:gif|jpe?g|png)$">
    +    Require all denied
    +</FilesMatch>
    + + +

    İsimli gruplar ve geriye başvurular içeren düzenli + ifadeler ortama eklenirken ilgili isimler büyük harfli yapılır. Böylece, + URL'lere ve dosya yolları elemanlarına ifadelerin + içinden ve mod_rewrite gibi modüllerden başvurmak + mümkün olur.

    + +
    <DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)">
    +    require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example"
    +</DirectoryMatch>
    + + + +

    Mantıksal İfadeler

    +

    <If> yönergesi bir + mantıksal ifade olarak belirtilebilen bir kurala bağlı olarak + yapılandırmayı değiştirebilir. Örneğin, aşağıdaki yapılandırmada, + HTTP Referer başlığı "http://www.example.com/" ile + başlamıyorsa erişimi yasaklar.

    + +
    <If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    +    Require all denied
    +</If>
    + + + +

    Ne, Ne Zaman Kullanılır?

    +

    Dosya sistemi taşıyıcıları ile site alanı taşıyıcıları arasında seçim + yapmak aslında oldukça kolaydır. Dosya sisteminde bulunan nesnelere + uygulanacak yönergeler için daima <Directory> veya <Files> kullanılır. Dosya sisteminde bulunmayan nesnelere + (bir sayfanın bir veritabanı tarafından üretilmesi gibi) uygulanacak + yönergeler için ise <Location> kullanılır.

    + +

    Dosya sistemindeki nesnelere erişimi kısıtlarken asla + <Location> + kullanmamak önemlidir. Bunun sebebi farklı site alanı konumlarının + (URL’ler) aynı dosya sistemi konumuna eşlenebilmesi dolayısıyla + kısıtlamalarınızın etrafından dolaşılabilmesine izin vermesidir. + Örneğin, aşağıdaki yapılandırmayı ele alalım:

    + +
    <Location "/dir/">
    +    Require all denied
    +</Location>
    + + +

    http://siteniz.mesela.dom/dir/ için bir istek yapılmışsa + bu doğru çalışacaktır. Fakat dosya sistemi harf büyüklüğüne duyarsızsa + ne olacak? Kısıtlamanız, istek + http://siteniz.mesela.dom/DIR/ + şeklinde yapılarak kolayca geçersiz kılınabilir. Halbuki <Directory> yönergesi isteğin + nasıl yapıldığına bakılmaksızın bu konumdan sunulan her türlü içeriğe + uygulanacaktı. (Dosya sistemi bağlarıyla bu da aşılabilir. Sembolik + bağlar kullanılarak aynı dizin dosya sisteminin bir çok yerine + yerleştirilebilir. <Directory> yönergesi dosya yolunu sıfırlamaksızın sembolik + bağları izleyecektir. Bu bakımdan, en yüksek seviyede güvenlik için uygun + Options yönergesi ile sembolik + bağların izlenmesi devredışı bırakılabilir.)

    + +

    Belki de siz sırf harf büyüklüğüne duyarlı bir dosya sistemi + kullanıyorsunuz diye böyle uygulamalara ihtiyacınız olmadığını düşünüyor + olabilirsiniz, fakat aynı site alanını çok sayıda dosya sistemi konumuna + eşleyecek daha bir sürü yol bulunduğunu unutmayınız. Bu bakımdan dosya + sisteminde yapacağınız kısıtlamalarda daima dosya sistemi taşıyıcılarını + kullanmalısınız. Bununla birlikte bu kuralın da bir istisnası vardır. + Yapılandırma kısıtlamalarının bir <Location "/"> bölümü + içine koyulması, bu bölüme konan yönergelerin etki alanının belli bir URL + ile sınırlı olmaması nedeniyle mükemmelen güvenlidir.

    + + +

    Bölüm iç içeliği

    +

    Bazı bölüm türleri başka bölüm türlerinin içinde olabilir. Bir yandan, + <Files> bölümü + <Directory> bölümünün + içinde bulunabilirken diğer yandan bir <If> bölümü <Directory>, <Location> ve <Files> bölümlerinde bulunabilir. + Bu bölümlerin düzenli ifadeli türevleri de benzer tarzda davranır.

    + +

    İç içe bölümler, aynı türdeki iç içe olmayan bölümlerin sonrasına + yerleştirilir.

    + +
    top

    Sanal Konaklar

    -

    <VirtualHost> -taşıyıcısının içinde belli bir konağa uygulanan yönergeler bulunur. -Aynı makinede çok sayıda konağı farklı yapılandırmalarla sunuyorsanız -bu taşıyıcı çok işinize yarar. Daha fazla bilgi için -Sanal Konak Belgeleri bölümüne bakınız.

    +

    <VirtualHost> + taşıyıcısının içinde belli bir konağa uygulanan yönergeler bulunur. + Aynı makinede çok sayıda konağı farklı yapılandırmalarla sunuyorsanız + bu taşıyıcı çok işinize yarar. Daha fazla bilgi için + Sanal Konak Belgeleri bölümüne bakınız.

    top

    Vekil

    +

    <Proxy> + ve <ProxyMatch> + taşıyıcıları, sadece belli bir URL ile eşleşen mod_proxy + vekil sunucusu üzerinden erişilen sitelere uygulanan yapılandırma + yönergelerini bulundururlar. Örneğin aşağıdaki yapılandırma + example.com sitesine erişim için vekil sunucunun + sadece ağdaki bazı kullanıcılar tarafından kullanılabilmesini sağlayacaktır.

    + +
    <Proxy "http://www.example.com/*">
    +    Require host bizimki.example.com
    +</Proxy>
    -

    <Proxy> -ve <ProxyMatch> -taşıyıcıları, sadece belli bir URL ile eşleşen mod_proxy -vekil sunucusu üzerinden erişilen sitelere uygulanan yapılandırma yönergelerini -bulundururlar. Örneğin aşağıdaki yapılandırma cnn.com sitesine -erişim için vekil sunucunun kullanılmasını engelleyecektir.

    - -

    -<Proxy http://cnn.com/*>
    - -Order allow,deny
    -Deny from all
    -
    -</Proxy> -

    top

    Hangi Yönergelere İzin Veriliyor?

    - -

    Hangi yönergelere hangi yapılandırma bölümlerinde izin verildiğini -öğrenmek için yönerge bağlamına bakınız. -<Directory> bölümlerinde -izin verilen herşeye sözdizimsel olarak ayrıca -<DirectoryMatch>, -<Files>, -<FilesMatch>, -<Location>, -<LocationMatch>, -<Proxy> -ve <ProxyMatch> -bölümlerinde de izin verilir. Yine de bazı istisnai durumlar mevcuttur:

    - - +

    Hangi yönergelere hangi yapılandırma bölümlerinde izin verildiğini + öğrenmek için yönerge bağlamına bakınız. <Directory> bölümlerinde + izin verilen herşeye sözdizimsel olarak ayrıca + <DirectoryMatch>, + <Files>, + <FilesMatch>, + <Location>, + <LocationMatch>, + <Proxy> + ve <ProxyMatch> + bölümlerinde de izin verilir. Yine de bazı istisnai durumlar + mevcuttur:

    + +
    top
    -

    Bölümler Nasıl Katıştırılır?

    +

    Bölümler Nasıl Katıştırılır?

    -

    Yapılandırma bölümleri belli bir sıra ile uygulanır. Yapılandırma -yönergelerinin yorumlanışı üzerinde önemli etkilere sahip olabilmesi -nedeniyle neyin ne zaman çalıştığını anlamak çok önemlidir.

    +

    Yapılandırma bölümleri belli bir sıra ile uygulanır. Yapılandırma + yönergelerinin yorumlanışı üzerinde önemli etkilere sahip olabilmesi + nedeniyle neyin ne zaman çalıştığını anlamak çok önemlidir.

    Yapılandırma bölümlerinin katıştırılma sırası şöyledir:

    1. <Directory> (düzenli ifadeler hariç) - ve .htaccess aynı anda işleme sokulur - (.htaccess ile eğer izin verilmişse <Directory> içindeki bazı + ve .htaccess aynı anda işleme sokulur + (.htaccess ile eğer izin verilmişse <Directory> içindeki bazı yönergeler geçersiz kılınabileceği için).
    2. <DirectoryMatch> - (ve <Directory ~>).
    3. + (ve <Directory "~">). -
    4. <Files> ve <FilesMatch> aynı anda işleme sokulur.
    5. +
    6. <Files> ve + <FilesMatch> aynı anda + işleme sokulur.
    7. <Location> - ve <LocationMatch> + ve <LocationMatch> aynı anda işleme sokulur.
    8. + +
    9. <If> +
    -

    <Directory> - bölümündekiler hariç, her grup, yapılandırma dosyasında bulundukları - sıraya göre işleme sokulurlar. Yukarıda 1. grup olan <Directory> bölümü en kısa dizin - elemanından en uzun dizin elemanına doğru işleme sokulur. Yani, örneğin, - <Directory /var/web/dir> bölümü <Directory - /var/web/dir/subdir> bölümünden önce işleme sokulacaktır. Eğer - aynı uzunlukta çok sayıda dizin varsa <Directory> bölümleri yapılandırma dosyasında - bulundukları sıraya göre işleme sokulurlar. Include yönergeleri ile yapılandırmaya dahil - edilen dosyaların içerikleri Include - yönergesinin bulunduğu yere konulduktan sonra işleme sokulurlar.

    - -

    <VirtualHost> - bölümlerinin içindeki bölümler, sanal konak tanımı dışındaki karşılıklarından - sonra uygulanırlar.

    - -

    İstek mod_proxy tarafından sunulduğu takdirde, - <Proxy> taşıyıcısı - işlem sırasında <Directory> - taşıyıcısının yerini alır.

    - -

    Sonraki bölümler öncekileri geçersiz kılmak üzere işleme alınırlar.

    - -

    Bazı Teknik Bilgiler

    - Aslında, isim dönüşüm aşamasından (Aliases ve - DocumentRoots, URL’leri dosya isimlerine eşlemek için - kullanılırken) hemen önce uygulanan bir - <Location>/<LocationMatch> dizisi - vardır. Bu dizinin sonuçları isim dönüşüm aşaması tamamlandıktan sonra - tamamen elden çıkarılır. -
    +

    <Directory> + bölümündekiler hariç, her grup, yapılandırma dosyasında bulundukları + sıraya göre işleme sokulurlar. Yukarıda 1. grup olan <Directory> bölümü en kısa dizin + elemanından en uzun dizin elemanına doğru işleme sokulur. Yani, örneğin, + <Directory "/var/web/dir"> bölümü <Directory + "/var/web/dir/subdir"> bölümünden önce işleme sokulacaktır. Eğer + aynı uzunlukta çok sayıda dizin varsa <Directory> bölümleri yapılandırma dosyasında + bulundukları sıraya göre işleme sokulurlar. Include yönergeleri ile yapılandırmaya dahil + edilen dosyaların içerikleri Include + yönergesinin bulunduğu yere konulduktan sonra işleme sokulurlar.

    + +

    <VirtualHost> + bölümlerinin içindeki bölümler, sanal konak tanımı dışındaki + karşılıklarından sonra uygulanırlar.

    + +

    İstek mod_proxy tarafından sunulduğu takdirde, + <Proxy> taşıyıcısı + işlem sırasında <Directory> taşıyıcısının yerini alır.

    + +

    Bazı Teknik Bilgiler

    + Aslında, isim dönüşüm aşamasından (Aliases ve + DocumentRoots, URL’leri dosya isimlerine eşlemek için + kullanılırken) hemen önce uygulanan bir + <Location>/<LocationMatch> dizisi + vardır. Bu dizinin sonuçları isim dönüşüm aşaması tamamlandıktan sonra + tamamen elden çıkarılır. +
    + +

    Modüllerle + yapılandırma bölümleri arasındaki ilişki

    + +

    Yapılandırma bölümlerini okurken örneğin mod_rewrite + gibi belli modüllerin yönergelerinin bu bölümlere nasıl katılacağı ve + ne zaman nasıl işleneceği gibi sorular sıkça aklımızdan geçer. Bunun + belli bir yanıtı yoktur ve biraz temel bilgi gerektirir. Her httpd + modülü yapılandırmasını kendi yönetir ve httpd.conf içindeki + yönergelerinin her biri belli bir bağlamdaki bir yapılandırmayı + belirtir. httpd bir komutu okunduğu sırada çalıştırmaz.

    + +

    Çalışma anında, httpd çekirdeği geçerli isteğe hangilerinin + uygulanacağını belirlemek için yukarıda açıklanan sırada tanımlı + yapılandırma bölümlerini tekrar tekrar okur. Eşleşen ilk bölümün bu + istek için geçerli yapılandırmayı içerdiği varsayılır. Eğer alt + bölümlerden biri de eşleşmişse bu bölümlerde yönergeleri bulunan her + modüle yapılandırmasını iki bölüm arasında katıştırma şansı verilir. + Sonuç üçüncü bir yapılandırma olup işlem bütün yapılandırma bölümleri + değerlendirilene kadar sürer.

    + +

    Yukarıdaki adımların ardından HTTP isteğiyle ilgili "asıl" işlem + başlar: her modül ondan istenen görevleri gerçekleştirme şansına sahip + olur. Nasıl davranacaklarını belirlemek için kendilerinin katıştırılmış + son yapılandırmalarını http çekirdeğinden alabilirler.

    + +

    Sürecin tamamı bir örnekle görselleştirilebilir. Aşağıdaki örnekte + belli bir HTTP başlığını ayarlamak için mod_headers + modülünün Header yönergesi + kullanılmıştır. /example/index.html isteği için httpd + CustomHeaderName başlığına hangi değeri atayacaktır? +

    +
    <Directory "/">
    +    Header set CustomHeaderName bir
    +    <FilesMatch ".*">
    +        Header set CustomHeaderName yedi
    +    </FilesMatch>
    +</Directory>
    +
    +<Directory "/example">
    +    Header set CustomHeaderName iki
    +</Directory>
    + +
      +
    • Directory "/" eşleşir ve ilk yapılandırma + olarak CustomHeaderName başlığı bir + değeriyle oluşturulur.
    • + +
    • Directory "/example" eşleşir ve + mod_headers modülünün koduna göre bir katıştırma + durumundan yeni değer eskiyi geçersiz kılacağından yeni bir + yapılandırma ile CustomHeaderName başlığının değeri + iki yapılır.
    • + +
    • FilesMatch ".*" eşleşir ve başka bir + katıştırma fırsatı doğar: CustomHeaderName başlığının + değeri yedi yapılır.
    • + +
    • Neticede HHP isteğinin sonraki adımlarında + mod_headers çağrılıp yedi değeri + atanmış CustomHeaderName başlığını işleme sokması + istenecektir. mod_headers normalde işini yapmak + için bu yapılandırmayı kullanacaktır. Fakat bundan, bir yönergenin + gerekli olmaması veya kullanımdan kaldırılması ve benzeri nedenlerle + yapılandırmada iptal edilmesi gibi daha karmaşık bir eylemi bir + modülün gerçekleştiremeyeceği anlamı çıkarılmamalıdır.
    • +
    + +

    Directory ile aynı katıştırma sırasından dolayı + bu durum .htaccess için de geçerlidir. Burada anlaşılması gereken husus, + Directory ve FilesMatch + gibi yapılandırma bölümlerinin Header veya RewriteRule gibi modüle özgü + yönergelerle karşılaştırılmamasıdır, çünkü bunlar farklı seviyelerde + işlem görür. +

    + + +

    Bazı Örnekler

    + +

    Aşağıdaki yapay örnekte katıştırma sırası gösterilmiştir. Hepsinin aynı + isteğe uygulandığı varsayımıyla, bu örnekteki yönergeler A > B > C + > D > E sırasıyla uygulanacaktır.

    + +
    <Location "/">
    +    E
    +</Location>
    +
    +<Files "f.html">
    +    D
    +</Files>
     
    -

    Bazı Örnekler

    - -

    Aşağıdaki yapay örnekte katıştırma sırası gösterilmiştir. Hepsinin aynı -isteğe uygulandığı varsayımıyla, bu örnekteki yönergeler A > B > C > D > -E sırasıyla uygulanacaktır.

    - -

    -<Location />
    -E
    -</Location>
    -
    -<Files f.html>
    -D
    -</Files>
    -
    -<VirtualHost *>
    -<Directory /a/b>
    -B
    -</Directory>
    -</VirtualHost>
    -
    -<DirectoryMatch "^.*b$">
    -C
    -</DirectoryMatch>
    -
    -<Directory /a/b>
    -A
    -</Directory>
    -
    -

    - -

    Daha somut bir örnek olarak aşağıdakini ele alalım. <Directory> bölümlerindeki erişim sınırlamaları ne -olursa olsun <Location> -bölümü son olarak değerlendirmeye alınacak ve sunucuya sınırsız erişim verecektir. -Başka bir deyişle, katıştırma sırası önemlidir, bu nedenle dikkatli olmalısınız!

    - -

    -<Location />
    - - Order deny,allow
    - Allow from all
    -
    -</Location>
    -
    -# Alooo! Bu <Directory> bölümünün hiçbir hükmü yok.
    -<Directory />
    - - Order allow,deny
    - Allow from all
    - Deny from kkadam.mesela.dom
    -
    +<VirtualHost *> +<Directory "/a/b"> + B </Directory> -

    +</VirtualHost> + +<DirectoryMatch "^.*b$"> + C +</DirectoryMatch> + +<Directory "/a/b"> + A +</Directory>
    + + +

    Daha somut bir örnek olarak aşağıdakini ele alalım. + <Directory> + bölümlerindeki erişim sınırlamaları ne olursa olsun <Location> bölümü son olarak + değerlendirmeye alınacak ve sunucuya sınırsız erişim verecektir. + Başka bir deyişle, katıştırma sırası önemlidir, bu nedenle dikkatli + olmalısınız!

    + +
    <Location "/">
    +    Require all granted
    +</Location>
    +
    +# Alooo!  Bu <Directory> bölümünün hiçbir hükmü yok.
    +<Directory "/">
    +    <RequireAll>
    +        Require all granted
    +        Require not host kkadam.example.com
    +    </RequireAll>
    +</Directory>
    +
    @@ -500,7 +603,28 @@ Başka bir deyişle, katıştırma sırası önemlidir, bu nedenle dikkatli olma  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sections.xml b/docs/manual/sections.xml index 33de9b9bbbe..679d5843337 100644 --- a/docs/manual/sections.xml +++ b/docs/manual/sections.xml @@ -75,11 +75,11 @@ with the following configuration, all requests will be redirected to another site only if the server is started using httpd -DClosedForNow:

    - -<IfDefine ClosedForNow>
    -Redirect / http://otherserver.example.com/
    + +<IfDefine ClosedForNow> + Redirect "/" "http://otherserver.example.com/" </IfDefine> -
    +

    The IfModule directive is very similar, except it encloses directives that will @@ -94,14 +94,14 @@ to work all the time, because it can suppress useful error messages about missing modules.

    In the following example, the MimeMagicFiles directive will be +module="mod_mime_magic">MimeMagicFile directive will be applied only if mod_mime_magic is available.

    - -<IfModule mod_mime_magic.c>
    -MimeMagicFile conf/magic
    + +<IfModule mod_mime_magic.c> + MimeMagicFile "conf/magic" </IfModule> -
    +

    The IfVersion directive is very similar to - - <IfVersion >= 2.1>
    - - # this happens only in versions greater or
    - # equal 2.1.0.
    -
    - </IfVersion> -
    + +<IfVersion >= 2.4> + # this happens only in versions greater or + # equal 2.4.0. +</IfVersion> +

    IfDefine, IfModule, and the @@ -162,11 +160,11 @@ href="howto/htaccess.html">.htaccess files. For example, in the following configuration, directory indexes will be enabled for the /var/web/dir1 directory and all subdirectories.

    - -<Directory /var/web/dir1>
    -Options +Indexes
    + +<Directory "/var/web/dir1"> + Options +Indexes </Directory> -
    +

    Directives enclosed in a Files section apply to any file with @@ -176,12 +174,11 @@ when placed in the main section of the configuration file, deny access to any file named private.html regardless of where it is found.

    - -<Files private.html>
    -Order allow,deny
    -Deny from all
    + +<Files "private.html"> + Require all denied </Files> -
    +

    To address files found in a particular part of the filesystem, the Files and @@ -193,14 +190,13 @@ access to /var/web/dir1/private.html, of private.html found under the /var/web/dir1/ directory.

    - -<Directory /var/web/dir1>
    -<Files private.html>
    -Order allow,deny
    -Deny from all
    -</Files>
    + +<Directory "/var/web/dir1"> + <Files "private.html"> + Require all denied + </Files> </Directory> -
    +
    Webspace Containers @@ -216,12 +212,11 @@ In particular, it will apply to requests for http://yoursite.example.com/private/dir/file.html as well as any other requests starting with the /private string.

    - -<LocationMatch ^/private>
    -Order Allow,Deny
    -Deny from all
    -</Location> -
    + +<LocationMatch "^/private"> + Require all denied +</LocationMatch> +

    The Location directive need not have anything to do with the filesystem. @@ -230,35 +225,35 @@ URL to an internal Apache HTTP Server handler provided by mod_statusserver-status needs to exist in the filesystem.

    - -<Location /server-status>
    -SetHandler server-status
    + +<Location "/server-status"> + SetHandler server-status </Location> -
    +
    Overlapping Webspace

    In order to have two overlapping URLs one has to consider the order in which certain sections or directives are evaluated. For Location this would be:

    - -<Location /foo>
    -</Location>
    -<Location /foo/bar>
    + +<Location "/foo"> +</Location> +<Location "/foo/bar"> </Location> -
    -

    Aliases on the other hand, + +

    Aliases on the other hand, are mapped vice-versa:

    - -Alias /foo/bar /srv/www/uncommon/bar
    -Alias /foo /srv/www/common/foo
    -
    + +Alias "/foo/bar" "/srv/www/uncommon/bar" +Alias "/foo" "/srv/www/common/foo" +

    The same is true for the ProxyPass directives:

    - -ProxyPass /special-area http://special.example.com smax=5 max=10
    -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On -
    + +ProxyPass "/special-area" "http://special.example.com" smax=5 max=10 +ProxyPass "/" "balancer://mycluster/" stickysession=JSESSIONID|jsessionid nofailover=On +
    Wildcards and Regular Expressions @@ -287,20 +282,31 @@ how directives are applied.

    A non-regex wildcard section that changes the configuration of all user directories could look as follows:

    - -<Directory /home/*/public_html>
    -Options Indexes
    + +<Directory "/home/*/public_html"> + Options Indexes </Directory> -
    +

    Using regex sections, we can deny access to many types of image files at once:

    - -<FilesMatch \.(?i:gif|jpe?g|png)$>
    -Order allow,deny
    -Deny from all
    + +<FilesMatch "\.(?i:gif|jpe?g|png)$"> + Require all denied </FilesMatch> -
    + + +

    Regular expressions containing named groups and +backreferences are added to the environment with the +corresponding name in uppercase. This allows elements of filename paths +and URLs to be referenced from within expressions +and modules like mod_rewrite.

    + + +<DirectoryMatch "^/var/www/combined/(?<SITENAME>[^/]+)"> + require ldap-group "cn=%{env:MATCH_SITENAME},ou=combined,o=Example" +</DirectoryMatch> +
    @@ -310,11 +316,11 @@ directive change the configuration depending on a condition which can be expressed by a boolean expression. For example, the following configuration denies access if the HTTP Referer header does not start with "http://www.example.com/".

    - -<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')">
    -Require all denied
    + +<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"> + Require all denied </If> -
    + @@ -336,12 +342,11 @@ different webspace locations (URLs) could map to the same filesystem location, allowing your restrictions to be circumvented. For example, consider the following configuration:

    - -<Location /dir/>
    -Order allow,deny
    -Deny from all
    + +<Location "/dir/"> + Require all denied </Location> -
    +

    This works fine if the request is for http://yoursite.example.com/dir/. But what if you are on @@ -364,14 +369,14 @@ many other ways to map multiple webspace locations to the same filesystem location. Therefore you should always use the filesystem containers when you can. There is, however, one exception to this rule. Putting configuration restrictions in a <Location -/> section is perfectly safe because this section will apply +"/"> section is perfectly safe because this section will apply to all requests regardless of the specific URL.

    Nesting of sections -

    Some section types can be nested inside other section types. One the one -hand, File can be used +

    Some section types can be nested inside other section types. On the one +hand, Files can be used inside Directory. On the other hand, If can be used inside Directory, @@ -400,16 +405,15 @@ see the Virtual Host Documentation.

    and ProxyMatch containers apply enclosed configuration directives only to sites accessed through mod_proxy's proxy server -that match the specified URL. For example, the following configuration -will prevent the proxy server from being used to access the -www.example.com website.

    - - -<Proxy http://www.example.com/*>
    -Order allow,deny
    -Deny from all
    +that match the specified URL. For example, the following configuration +will allow only a subset of clients to access the +www.example.com website using the proxy server:

    + + +<Proxy "http://www.example.com/*"> + Require host yournetwork.example.com </Proxy> -
    +
    What Directives are Allowed? @@ -447,7 +451,7 @@ sections.
    -
    How the sections are merged +
    How the sections are merged

    The configuration sections are applied in a very particular order. Since this can have important effects on how configuration directives @@ -463,7 +467,7 @@ are interpreted, it is important to understand how this works.

    Directory)
  • DirectoryMatch - (and <Directory ~>)
  • + (and <Directory "~">)
  • Files and the order that they appear in the configuration files. Directory (group 1 above) is processed in the order shortest directory component to longest. - So for example, <Directory /var/web/dir> will + So for example, <Directory "/var/web/dir"> will be processed before <Directory - /var/web/dir/subdir>. If multiple . If multiple Directory sections apply to the same directory they are processed in the configuration file order. Configurations included via the type="section">Directory container in the processing order.

    -

    Later sections override earlier ones.

    - -Technical Note + Technical Note There is actually a <Location>/<LocationMatch> sequence performed just before the name translation phase @@ -516,39 +518,84 @@ are interpreted, it is important to understand how this works.

    are used to map URLs to filenames). The results of this sequence are completely thrown away after the translation has completed. -
    +
    + +
    Relationship between modules and configuration sections +

    One question that often arises after reading how configuration sections are + merged is related to how and when directives of specific modules like mod_rewrite + are processed. The answer is not trivial and needs a bit of background. + Each httpd module manages its own configuration, and each of its directives in httpd.conf specify one piece + of configuration in a particular context. httpd does not execute a command as it is read.

    +

    At runtime, the core of httpd iterates over the defined configuration sections in the order + described above to determine which ones apply to the current request. When the first section matches, + it is considered the current configuration for this request. If a subsequent section matches too, + then each module with a directive in either of the sections is given a chance to merge its configuration between the two sections. The result is a third configuration, and the process goes on until all the configuration sections + are evaluated.

    +

    After the above step, the "real" processing of the HTTP request begins: each module has a chance to run + and perform whatever tasks they like. They can retrieve their own final merged configuration from the core + of the httpd to determine how they should act.

    +

    An example can help to visualize the whole process. The following configuration uses the + Header directive of mod_headers to set + a specific HTTP header. What value will httpd set in the CustomHeaderName header for a request to + /example/index.html ? +

    + + +<Directory "/"> + Header set CustomHeaderName one + <FilesMatch ".*"> + Header set CustomHeaderName three + </FilesMatch> +</Directory> -
    Some Examples +<Directory "/example"> + Header set CustomHeaderName two +</Directory> + + +
      +
    • Directory "/" matches and an initial configuration to set the CustomHeaderName header with the value one is created.
    • +
    • Directory "/example" matches, and since mod_headers specifies in its code to override in case of a merge, a new configuration is created to set the CustomHeaderName header with the value two.
    • +
    • FilesMatch ".*" matches and another merge opportunity arises, causing the CustomHeaderName header to be set with the value three.
    • +
    • Eventually during the next steps of the HTTP request processing mod_headers will be called and it will receive the configuration to set the CustomHeaderName header with the value three. mod_headers normally uses this configuration to perfom its job, namely setting the foo header. This does not mean that a module can't perform a more complex action like discarding directives because not needed or deprecated, etc..
    • +
    + +

    This is true for .htaccess too since they have the same priority as Directory in the merge order. The important concept to understand is that configuration sections like Directory and FilesMatch are not comparable to module specific directives like Header or RewriteRule because they operate on different levels. +

    +
    + +
    Some useful examples

    Below is an artificial example to show the order of merging. Assuming they all apply to the request, the directives in this example will be applied in the order A > B > C > D > E.

    - -<Location />
    -E
    -</Location>
    -
    -<Files f.html>
    -D
    -</Files>
    -
    -<VirtualHost *>
    -<Directory /a/b>
    -B
    -</Directory>
    -</VirtualHost>
    -
    -<DirectoryMatch "^.*b$">
    -C
    -</DirectoryMatch>
    -
    -<Directory /a/b>
    -A
    -</Directory>
    -
    -
    + +<Location "/"> + E +</Location> + +<Files "f.html"> + D +</Files> + +<VirtualHost *> +<Directory "/a/b"> + B +</Directory> +</VirtualHost> + +<DirectoryMatch "^.*b$"> + C +</DirectoryMatch> + +<Directory "/a/b"> + A +</Directory> + + +

    For a more concrete example, consider the following. Regardless of any access restrictions placed in Location section will be evaluated last and will allow unrestricted access to the server. In other words, order of merging is important, so be careful!

    - -<Location />
    -Order deny,allow
    -Allow from all
    -</Location>
    -
    -# Woops! This <Directory> section will have no effect
    -<Directory />
    -Order allow,deny
    -Allow from all
    -Deny from badguy.example.com
    + +<Location "/"> + Require all granted +</Location> + +# Whoops! This <Directory> section will have no effect +<Directory "/"> + <RequireAll> + Require all granted + Require not host badguy.example.com + </RequireAll> </Directory> -
    +
    diff --git a/docs/manual/sections.xml.fr b/docs/manual/sections.xml.fr index 73416a1ef7d..43ac3b14eb9 100644 --- a/docs/manual/sections.xml.fr +++ b/docs/manual/sections.xml.fr @@ -1,9 +1,9 @@ - + - + + + + -Server-Wide Configuration - Apache HTTP Server +Server-Wide Configuration - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Server-Wide Configuration

    +Apache > HTTP Server > Documentation > Version 2.4

    Server-Wide Configuration

    Available Languages:  en  |  fr  | @@ -33,7 +38,7 @@ the basic operations of the server.

  • File Locations
  • Limiting Resource Usage
  • Implementation Choices
  • -
    +

    See also

    top

    Server Identification

    @@ -110,7 +115,28 @@ the basic operations of the server.

     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/server-wide.html.fr b/docs/manual/server-wide.html.fr index c7d0a38ef8f..7268015ee0e 100644 --- a/docs/manual/server-wide.html.fr +++ b/docs/manual/server-wide.html.fr @@ -1,22 +1,27 @@ - -Configuration l'chelle du serveur - Serveur Apache HTTP +Configuration l'chelle du serveur - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Configuration l'chelle du serveur

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Configuration l'chelle du serveur

    +

    Voir aussi

    top

    Identification du serveur

    @@ -112,7 +117,28 @@ serveur.

     ja  |  ko  |  tr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/server-wide.html.ja.utf8 b/docs/manual/server-wide.html.ja.utf8 index c18f7d14c97..fefd27fd558 100644 --- a/docs/manual/server-wide.html.ja.utf8 +++ b/docs/manual/server-wide.html.ja.utf8 @@ -1,32 +1,38 @@ - -サーバ全体の設定 - Apache HTTP サーバ +サーバ全体の設定 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    サーバ全体の設定

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    このドキュメントではcore サーバのディレクティブの中で、 @@ -35,7 +41,7 @@

    +

    参照

    top

    サーバ ID

    @@ -96,12 +102,33 @@ でのみ、スタックの大きさを制御するために使われます。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/server-wide.html.ko.euc-kr b/docs/manual/server-wide.html.ko.euc-kr index 6ed55412fdf..f95071165e0 100644 --- a/docs/manual/server-wide.html.ko.euc-kr +++ b/docs/manual/server-wide.html.ko.euc-kr @@ -1,22 +1,27 @@ - - - Apache HTTP Server + - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    :  en  |  fr  | @@ -33,7 +38,7 @@

    +

    top

    ĺ

    @@ -93,7 +98,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/server-wide.html.tr.utf8 b/docs/manual/server-wide.html.tr.utf8 index d6214307696..83faf358ba7 100644 --- a/docs/manual/server-wide.html.tr.utf8 +++ b/docs/manual/server-wide.html.tr.utf8 @@ -1,22 +1,27 @@ - -Sunucu Genelinde Yapılandırma - Apache HTTP Sunucusu +Sunucu Genelinde Yapılandırma - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Sunucu Genelinde Yapılandırma

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Sunucu Genelinde Yapılandırma

    Mevcut Diller:  en  |  fr  | @@ -24,15 +29,16 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Bu belgede core modülü ile sağlanan ve sunucunun temel -işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanmıştır.

    +

    Bu belgede core modülü ile sağlanan ve sunucunun temel + işlemlerini yapılandırmakta kullanılan yönergelerden bazıları + açıklanmıştır.

    +
  • Gerçeklenimle ilgili Seçimler
  • +

    Ayrıca bakınız:

    top

    Sunucu Kimliği

    @@ -51,7 +57,7 @@ işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanm yönergeleri, sunucu tarafından, özüne yönelik URL’leri nasıl oluşturacağını saptamak için kullanılır. Örneğin bir istemci bir dizin isteğinde bulunurken URL’nin sonuna bölü çizgisi eklemese bile - Apache’nin istemciyi bölü çizgisi ile bitirilmiş URL yoluna + Apache httpd’nin istemciyi bölü çizgisi ile bitirilmiş URL yoluna yönlendirmesi gerekir; böylece istemci belge içindeki göreli bağlantıları doğru şekilde çözümleyebilir.

    top
    @@ -59,10 +65,10 @@ işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanm

    Dosyaların Yerleri

    - + -

    Bu yönergeler Apache’nin doğru işlem yapması için gereksinim duyduğu - çeşitli dosyaların yerlerini belirlerler. Bölü çizgisi (/) ile +

    Bu yönergeler Apache httpd’nin doğru işlem yapması için gereksinim + duyduğu çeşitli dosyaların yerlerini belirlerler. Bölü çizgisi (/) ile başlamayan dosya yolları kullanıldığında bu dosyaların yerlerinin ServerRoot yönergesinde belirtilen dizine göre belirtildiği varsayılır; root olmayan kullanıcılar @@ -76,12 +82,12 @@ işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanm -

    LimitRequest* yönergeleri, Apache’nin istemcilerden gelen - istekleri okumak için kullanacağı özkaynakların miktarları ile ilgili - sınırlamalar koymak için kullanılırlar. Bu değerleri sınırlamak +

    LimitRequest* yönergeleri, Apache httpd’nin istemcilerden + gelen istekleri okumak için kullanacağı özkaynakların miktarları ile + ilgili sınırlamalar koymak için kullanılırlar. Bu değerleri sınırlamak suretiyle bazı hizmet reddi saldırılarının etkileri azaltılabilir.

    -

    RLimit* yönergeleri ise Apache’nin çocuk süreçleri +

    RLimit* yönergeleri ise Apache httpd’nin çocuk süreçleri tarafından çatallanabilen özkaynakların miktarlarını sınırlamakta kullanılırlar. Özellikle de CGI betikleri ve SSI çalıştırma komutları tarafından kullanılan özkaynakları denetlemekte kullanılırlar.

    @@ -89,6 +95,17 @@ işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanm

    ThreadStackSize yönergesi bazı platformlarda yığıt boyutunu denetim altında tutmak için kullanılır.

    +
    top
    +
    +

    Gerçeklenimle ilgili Seçimler

    + + + + +

    Mutex yönergesi, APR'nin + öntanımlı seçimi ile ilgili işlevsel ve başarımsal sorunlarına çare + bulmada ilgili gerçeklenimi mutex'ler için değiştirmekte + kullanılabilir.

    Mevcut Diller:  en  | @@ -96,7 +113,28 @@ işlemlerini yapılandırmakta kullanılan yönergelerden bazıları açıklanm  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/server-wide.xml.fr b/docs/manual/server-wide.xml.fr index 3e63206d512..bb9dd621a68 100644 --- a/docs/manual/server-wide.xml.fr +++ b/docs/manual/server-wide.xml.fr @@ -1,4 +1,4 @@ - + diff --git a/docs/manual/server-wide.xml.meta b/docs/manual/server-wide.xml.meta index 7833e99a13d..2b620bbbf81 100644 --- a/docs/manual/server-wide.xml.meta +++ b/docs/manual/server-wide.xml.meta @@ -11,6 +11,6 @@ fr ja ko - tr + tr diff --git a/docs/manual/server-wide.xml.tr b/docs/manual/server-wide.xml.tr index b015515f522..c635d6c513a 100644 --- a/docs/manual/server-wide.xml.tr +++ b/docs/manual/server-wide.xml.tr @@ -1,7 +1,7 @@ - + -Seitenindex - Apache HTTP Server +Seitenindex - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP-Server > Dokumentation > Version 2.4

    Seitenindex

    Verfgbare Sprachen:  de  | @@ -35,7 +40,7 @@

    Diese Seite verzeichnet die zur Zeit verfgbaren Dokumente der Dokumentation zum Apache HTTP Server Version -2.3.

    +2.4.

    top
    top

    SSL/TLS-Verschlsselung des Apache

    @@ -122,7 +130,8 @@ durchf
    top
    top
    top

    Apache-Module

    @@ -189,6 +206,7 @@ HPUX betreiben
  • Apache-Modul mod_authn_dbm
  • Apache-Modul mod_authn_file
  • Apache-Modul mod_authn_socache
  • +
  • Apache-Modul mod_authnz_fcgi
  • Apache-Modul mod_authnz_ldap
  • Apache-Modul mod_authz_core
  • Apache-Modul mod_authz_dbd
  • @@ -201,6 +219,7 @@ HPUX betreiben
  • Apache-Modul mod_buffer
  • Apache-Modul mod_cache
  • Apache-Modul mod_cache_disk
  • +
  • Apache-Modul mod_cache_socache
  • Apache-Modul mod_cern_meta
  • Apache-Modul mod_cgi
  • Apache-Modul mod_cgid
  • @@ -216,7 +235,7 @@ HPUX betreiben
  • Apache-Modul mod_dumpio
  • Apache-Modul mod_echo
  • Apache-Modul mod_env
  • -
  • Apache-Modul mod_example
  • +
  • Apache-Modul mod_example_hooks
  • Apache-Modul mod_expires
  • Apache-Modul mod_ext_filter
  • Apache-Modul mod_file_cache
  • @@ -224,6 +243,7 @@ HPUX betreiben
  • Apache-Modul mod_headers
  • Apache-Modul mod_heartbeat
  • Apache-Modul mod_heartmonitor
  • +
  • Apache-Modul mod_http2
  • Apache-Modul mod_ident
  • Apache-Modul mod_imagemap
  • Apache-Modul mod_include
  • @@ -239,6 +259,7 @@ HPUX betreiben
  • Apache-Modul mod_log_forensic
  • Apache-Modul mod_logio
  • Apache-Modul mod_lua
  • +
  • Apache-Modul mod_macro
  • Apache-Modul mod_mime
  • Apache-Modul mod_mime_magic
  • Apache-Modul mod_negotiation
  • @@ -252,9 +273,12 @@ HPUX betreiben
  • Apache-Modul mod_proxy_fcgi
  • Apache-Modul mod_proxy_fdpass
  • Apache-Modul mod_proxy_ftp
  • +
  • Apache-Modul mod_proxy_hcheck
  • Apache-Modul mod_proxy_html
  • Apache-Modul mod_proxy_http
  • +
  • Apache-Modul mod_proxy_http2
  • Apache-Modul mod_proxy_scgi
  • +
  • Apache-Modul mod_proxy_wstunnel
  • Apache-Modul mod_ratelimit
  • Apache-Modul mod_reflector
  • Apache-Modul mod_remoteip
  • @@ -270,6 +294,10 @@ HPUX betreiben
  • Apache-Modul mod_slotmem_plain
  • Apache-Modul mod_slotmem_shm
  • Apache-Modul mod_so
  • +
  • Apache-Modul mod_socache_dbm
  • +
  • Apache-Modul mod_socache_dc
  • +
  • Apache-Modul mod_socache_memcache
  • +
  • Apache-Modul mod_socache_shmcb
  • Apache-Modul mod_speling
  • Apache-Modul mod_ssl
  • Apache-Modul mod_status
  • @@ -281,6 +309,7 @@ HPUX betreiben
  • Apache-Modul mod_usertrack
  • Apache-Modul mod_version
  • Apache-Modul mod_vhost_alias
  • +
  • Apache-Modul mod_watchdog
  • Apache-Modul mod_xml2enc
  • top
    @@ -289,15 +318,14 @@ HPUX betreiben
  • Anmerkungen zur Apache-API
  • API-nderungen im Apache HTTPD 2.4
  • -
  • Debuggen der Speicher-Belegung in der -APR
  • -
  • Apache 2.x dokumentieren
  • +
  • Module fr Apache HTTPD 2.4 entwickeln
  • +
  • Apache HTTPD dokumentieren
  • Hook-Funktionen des Apache 2.x
  • -
  • Module von Apache 1.3 nach Apache 2.x -konvertieren
  • -
  • Verarbeitung der Anfragen im Apache -2.x
  • -
  • Wie Filter im Apache 2.x arbeiten
  • +
  • Module von 1.3 nach 2.x konvertieren
  • +
  • Verarbeitung der Anfragen in Version 2.x
  • +
  • Wie Filter in Version 2.x funktionieren
  • +
  • Richtlinien fr Ausgangsfilter in Version 2.x
  • +
  • Thread-Sicherheit in Version 2.x
  • top

    Glossar und Index

    @@ -316,7 +344,28 @@ konvertieren  ko  |  tr  |  zh-cn 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.en b/docs/manual/sitemap.html.en index a56a7dfc562..d9ecbf2bb98 100644 --- a/docs/manual/sitemap.html.en +++ b/docs/manual/sitemap.html.en @@ -1,23 +1,28 @@ - -Sitemap - Apache HTTP Server +Sitemap - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4
    top
    top

    Apache SSL/TLS Encryption

    @@ -117,11 +126,13 @@ documentation
    top
    top
    top
    top

    Apache modules

    @@ -184,6 +204,7 @@ Server on HPUX
  • Apache Module mod_authn_dbm
  • Apache Module mod_authn_file
  • Apache Module mod_authn_socache
  • +
  • Apache Module mod_authnz_fcgi
  • Apache Module mod_authnz_ldap
  • Apache Module mod_authz_core
  • Apache Module mod_authz_dbd
  • @@ -196,6 +217,7 @@ Server on HPUX
  • Apache Module mod_buffer
  • Apache Module mod_cache
  • Apache Module mod_cache_disk
  • +
  • Apache Module mod_cache_socache
  • Apache Module mod_cern_meta
  • Apache Module mod_cgi
  • Apache Module mod_cgid
  • @@ -211,7 +233,7 @@ Server on HPUX
  • Apache Module mod_dumpio
  • Apache Module mod_echo
  • Apache Module mod_env
  • -
  • Apache Module mod_example
  • +
  • Apache Module mod_example_hooks
  • Apache Module mod_expires
  • Apache Module mod_ext_filter
  • Apache Module mod_file_cache
  • @@ -219,6 +241,7 @@ Server on HPUX
  • Apache Module mod_headers
  • Apache Module mod_heartbeat
  • Apache Module mod_heartmonitor
  • +
  • Apache Module mod_http2
  • Apache Module mod_ident
  • Apache Module mod_imagemap
  • Apache Module mod_include
  • @@ -234,6 +257,7 @@ Server on HPUX
  • Apache Module mod_log_forensic
  • Apache Module mod_logio
  • Apache Module mod_lua
  • +
  • Apache Module mod_macro
  • Apache Module mod_mime
  • Apache Module mod_mime_magic
  • Apache Module mod_negotiation
  • @@ -247,9 +271,12 @@ Server on HPUX
  • Apache Module mod_proxy_fcgi
  • Apache Module mod_proxy_fdpass
  • Apache Module mod_proxy_ftp
  • +
  • Apache Module mod_proxy_hcheck
  • Apache Module mod_proxy_html
  • Apache Module mod_proxy_http
  • +
  • Apache Module mod_proxy_http2
  • Apache Module mod_proxy_scgi
  • +
  • Apache Module mod_proxy_wstunnel
  • Apache Module mod_ratelimit
  • Apache Module mod_reflector
  • Apache Module mod_remoteip
  • @@ -265,6 +292,10 @@ Server on HPUX
  • Apache Module mod_slotmem_plain
  • Apache Module mod_slotmem_shm
  • Apache Module mod_so
  • +
  • Apache Module mod_socache_dbm
  • +
  • Apache Module mod_socache_dc
  • +
  • Apache Module mod_socache_memcache
  • +
  • Apache Module mod_socache_shmcb
  • Apache Module mod_speling
  • Apache Module mod_ssl
  • Apache Module mod_status
  • @@ -276,6 +307,7 @@ Server on HPUX
  • Apache Module mod_usertrack
  • Apache Module mod_version
  • Apache Module mod_vhost_alias
  • +
  • Apache Module mod_watchdog
  • Apache Module mod_xml2enc
  • top
    @@ -283,12 +315,14 @@ Server on HPUX
    top

    Glossary and Index

    @@ -307,7 +341,28 @@ Server on HPUX  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.es b/docs/manual/sitemap.html.es index 275b04486bd..86c64ec546e 100644 --- a/docs/manual/sitemap.html.es +++ b/docs/manual/sitemap.html.es @@ -1,23 +1,28 @@ - -Mapa de este sitio web - Servidor HTTP Apache +Mapa de este sitio web - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-
    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    Mapa de este sitio web

    Idiomas disponibles:  de  | @@ -35,7 +40,7 @@ recientemente.

    Esta pgina contiene la lista con los documentos actualmente -disponibles de la Versin 2.3 de la +disponibles de la Versin 2.4 de la Documentacin del Servidor HTTP Apache.

    top
    @@ -303,7 +320,28 @@ Referencia de Directivas  ko  |  tr  |  zh-cn 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.fr b/docs/manual/sitemap.html.fr index c6b2474b14c..9835a6c39ac 100644 --- a/docs/manual/sitemap.html.fr +++ b/docs/manual/sitemap.html.fr @@ -1,23 +1,28 @@ - -Plan du site - Serveur Apache HTTP +Plan du site - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-
    +Apache > Serveur HTTP > Documentation > Version 2.4
    top
    top

    Chiffrement SSL/TLS avec Apache

    @@ -125,13 +134,16 @@ Compatibilit
    top
    top
    top
    top
    top

    Modules Apache

    @@ -197,6 +220,7 @@ pour d
  • Module Apache mod_authn_dbm
  • Module Apache mod_authn_file
  • Module Apache mod_authn_socache
  • +
  • Module Apache mod_authnz_fcgi
  • Module Apache mod_authnz_ldap
  • Module Apache mod_authz_core
  • Module Apache mod_authz_dbd
  • @@ -209,6 +233,7 @@ pour d
  • Module Apache mod_buffer
  • Module Apache mod_cache
  • Module Apache mod_cache_disk
  • +
  • Module Apache mod_cache_socache
  • Module Apache mod_cern_meta
  • Module Apache mod_cgi
  • Module Apache mod_cgid
  • @@ -224,7 +249,7 @@ pour d
  • Module Apache mod_dumpio
  • Module Apache mod_echo
  • Module Apache mod_env
  • -
  • Module Apache mod_example
  • +
  • Module Apache mod_example_hooks
  • Module Apache mod_expires
  • Module Apache mod_ext_filter
  • Module Apache mod_file_cache
  • @@ -232,6 +257,7 @@ pour d
  • Module Apache mod_headers
  • Module Apache mod_heartbeat
  • Module Apache mod_heartmonitor
  • +
  • Module Apache mod_http2
  • Module Apache mod_ident
  • Module Apache mod_imagemap
  • Module Apache mod_include
  • @@ -247,6 +273,7 @@ pour d
  • Module Apache mod_log_forensic
  • Module Apache mod_logio
  • Module Apache mod_lua
  • +
  • Module Apache mod_macro
  • Module Apache mod_mime
  • Module Apache mod_mime_magic
  • Module Apache mod_negotiation
  • @@ -260,9 +287,12 @@ pour d
  • Module Apache mod_proxy_fcgi
  • Module Apache mod_proxy_fdpass
  • Module Apache mod_proxy_ftp
  • +
  • Module Apache mod_proxy_hcheck
  • Module Apache mod_proxy_html
  • Module Apache mod_proxy_http
  • +
  • Module Apache mod_proxy_http2
  • Module Apache mod_proxy_scgi
  • +
  • Module Apache mod_proxy_wstunnel
  • Module Apache mod_ratelimit
  • Module Apache mod_reflector
  • Module Apache mod_remoteip
  • @@ -278,6 +308,10 @@ pour d
  • Module Apache mod_slotmem_plain
  • Module Apache mod_slotmem_shm
  • Module Apache mod_so
  • +
  • Module Apache mod_socache_dbm
  • +
  • Module Apache mod_socache_dc
  • +
  • Module Apache mod_socache_memcache
  • +
  • Module Apache mod_socache_shmcb
  • Module Apache mod_speling
  • Module Apache mod_ssl
  • Module Apache mod_status
  • @@ -289,6 +323,7 @@ pour d
  • Module Apache mod_usertrack
  • Module Apache mod_version
  • Module Apache mod_vhost_alias
  • +
  • Module Apache mod_watchdog
  • Module Apache mod_xml2enc
  • top
    @@ -296,17 +331,20 @@ pour d
    top

    Glossaire et Index

    @@ -325,7 +363,28 @@ Apache 2.x  ko  |  tr  |  zh-cn 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.ja.utf8 b/docs/manual/sitemap.html.ja.utf8 index b8bfc97a103..36fa0bf5fd2 100644 --- a/docs/manual/sitemap.html.ja.utf8 +++ b/docs/manual/sitemap.html.ja.utf8 @@ -1,27 +1,31 @@ - -Site Map - Apache HTTP サーバ +Site Map - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-
    +Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    Site Map

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -30,11 +34,13 @@  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    このページは現時点で利用可能な -Apache HTTP サーババージョン 2.3 のドキュメンテーション +Apache HTTP サーババージョン 2.4 のドキュメンテーション の一覧です。

    top
    @@ -294,7 +312,7 @@
    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -302,7 +320,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.ko.euc-kr b/docs/manual/sitemap.html.ko.euc-kr index 939b6035ae5..9f74deefeba 100644 --- a/docs/manual/sitemap.html.ko.euc-kr +++ b/docs/manual/sitemap.html.ko.euc-kr @@ -1,23 +1,28 @@ - -Ʈ - Apache HTTP Server +Ʈ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    +Apache > HTTP Server > Documentation > Version 2.4 +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.tr.utf8 b/docs/manual/sitemap.html.tr.utf8 index 06f565547f8..febb4417844 100644 --- a/docs/manual/sitemap.html.tr.utf8 +++ b/docs/manual/sitemap.html.tr.utf8 @@ -1,23 +1,28 @@ - -Site Haritası - Apache HTTP Sunucusu +Site Haritası - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-
    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Site Haritası

    Mevcut Diller:  de  | @@ -29,9 +34,8 @@  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Bu sayfada Apache HTTP Sunucusu Sürüm 2.3 +

    Bu sayfada Apache HTTP Sunucusu Sürüm 2.4 Belgelerinin tamamı listelenmiştir.

    top
    top
    top

    Apache SSL/TLS Şifrelemesi

    @@ -114,11 +124,13 @@ yararlı örnekler
    top
    top
    top
    top

    Apache Modülleri

    @@ -179,6 +199,7 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_authn_dbm
  • Apache Modülü mod_authn_file
  • Apache Modülü mod_authn_socache
  • +
  • Apache Modülü mod_authnz_fcgi
  • Apache Modülü mod_authnz_ldap
  • Apache Modülü mod_authz_core
  • Apache Modülü mod_authz_dbd
  • @@ -191,6 +212,7 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_buffer
  • Apache Modülü mod_cache
  • Apache Modülü mod_cache_disk
  • +
  • Apache Modülü mod_cache_socache
  • Apache Modülü mod_cern_meta
  • Apache Modülü mod_cgi
  • Apache Modülü mod_cgid
  • @@ -206,7 +228,7 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_dumpio
  • Apache Modülü mod_echo
  • Apache Modülü mod_env
  • -
  • Apache Modülü mod_example
  • +
  • Apache Modülü mod_example_hooks
  • Apache Modülü mod_expires
  • Apache Modülü mod_ext_filter
  • Apache Modülü mod_file_cache
  • @@ -214,6 +236,7 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_headers
  • Apache Modülü mod_heartbeat
  • Apache Modülü mod_heartmonitor
  • +
  • Apache Modülü mod_http2
  • Apache Modülü mod_ident
  • Apache Modülü mod_imagemap
  • Apache Modülü mod_include
  • @@ -229,6 +252,7 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_log_forensic
  • Apache Modülü mod_logio
  • Apache Modülü mod_lua
  • +
  • Apache Modülü mod_macro
  • Apache Modülü mod_mime
  • Apache Modülü mod_mime_magic
  • Apache Modülü mod_negotiation
  • @@ -242,9 +266,12 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_proxy_fcgi
  • Apache Modülü mod_proxy_fdpass
  • Apache Modülü mod_proxy_ftp
  • +
  • Apache Modülü mod_proxy_hcheck
  • Apache Modülü mod_proxy_html
  • Apache Modülü mod_proxy_http
  • +
  • Apache Modülü mod_proxy_http2
  • Apache Modülü mod_proxy_scgi
  • +
  • Apache Modülü mod_proxy_wstunnel
  • Apache Modülü mod_ratelimit
  • Apache Modülü mod_reflector
  • Apache Modülü mod_remoteip
  • @@ -260,6 +287,10 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_slotmem_plain
  • Apache Modülü mod_slotmem_shm
  • Apache Modülü mod_so
  • +
  • Apache Modülü mod_socache_dbm
  • +
  • Apache Modülü mod_socache_dc
  • +
  • Apache Modülü mod_socache_memcache
  • +
  • Apache Modülü mod_socache_shmcb
  • Apache Modülü mod_speling
  • Apache Modülü mod_ssl
  • Apache Modülü mod_status
  • @@ -271,18 +302,22 @@ Windows ile Apache Kullanımı
  • Apache Modülü mod_usertrack
  • Apache Modülü mod_version
  • Apache Modülü mod_vhost_alias
  • +
  • Apache Modülü mod_watchdog
  • Apache Modülü mod_xml2enc
  • top
    top

    Terimler ve Dizin

    @@ -301,7 +336,28 @@ Windows ile Apache Kullanımı  ko  |  tr  |  zh-cn 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.html.zh-cn b/docs/manual/sitemap.html.zh-cn.utf8 similarity index 84% rename from docs/manual/sitemap.html.zh-cn rename to docs/manual/sitemap.html.zh-cn.utf8 index 905855d82c6..0b4ae9b8938 100644 --- a/docs/manual/sitemap.html.zh-cn +++ b/docs/manual/sitemap.html.zh-cn.utf8 @@ -1,23 +1,28 @@ - -站点导航 - Apache HTTP 服务器 +站点导航 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-
    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    站点导航

    可用语言:  de  | @@ -29,9 +34,10 @@  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    本页列出了 -Apache HTTP 服务器 2.3 +Apache HTTP 服务器 2.4 的全部文档

    top
    @@ -300,7 +318,28 @@  ko  |  tr  |  zh-cn 

    -
    +
    top

    评论

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/sitemap.xml b/docs/manual/sitemap.xml index 05b169a4f46..af337c99ab9 100644 --- a/docs/manual/sitemap.xml +++ b/docs/manual/sitemap.xml @@ -50,7 +50,6 @@ Documentation.

    Server-Wide Configuration Log Files Mapping URLs to Filesystem Locations -Security Tips Dynamic Shared Object (DSO) support Content Negotiation Custom error responses @@ -62,7 +61,7 @@ Documentation.

    Filters Shared Object Cache Support suEXEC Support -Performance Hints +Issues Regarding DNS and Apache Frequently Asked Questions @@ -75,7 +74,6 @@ Documentation.

    VirtualHost Examples An In-Depth Discussion of Virtual Host Matching File descriptor limitations -Issues Regarding DNS and Apache @@ -83,12 +81,18 @@ Documentation.

    Overview mod_rewrite reference documentation -Introduction -Flags -Technical details -Remapping URLs -Access control +Introduction to regular expressions and +mod_rewrite +Using mod_rewrite for redirection and +remapping of URLs +Using mod_rewrite to control access +Dynamic virtual hosts with mod_rewrite +Dynamic proxying with mod_rewrite +Using RewriteMap Advanced techniques +When NOT to use mod_rewrite +RewriteRule Flags +Technical details
    @@ -103,11 +107,13 @@ documentation Guides, Tutorials, and HowTos Overview -Authentication +Authentication and Authorization +Access Control Dynamic Content with CGI Introduction to Server Side Includes .htaccess files Per-user web directories +Reverse proxy setup guide @@ -117,6 +123,7 @@ documentation Windows Compiling Apache for Microsoft Windows +Using Apache With RPM Based Systems Using Apache with Novell NetWare Running a High-Performance Web Server on HPUX @@ -132,12 +139,17 @@ Server on HPUX Manual Page: apxs Manual Page: configure Manual Page: dbmmanage +Manual Page: fcgistarter Manual Page: htcacheclean Manual Page: htdbm Manual Page: htdigest Manual Page: htpasswd +Manual Page: httxt2dbm Manual Page: logresolve +Manual Page: +log_server_status Manual Page: rotatelogs +Manual Page: split-logfile Manual Page: suexec Other Programs @@ -145,7 +157,10 @@ Server on HPUX Apache Miscellaneous Documentation Overview +Performance Notes - Apache Tuning +Security Tips Relevant Standards +Password Encryption Formats @@ -159,12 +174,14 @@ Server on HPUX Overview Apache API notes API updates in Apache HTTPD 2.4 -Debugging Memory Allocation in APR -Documenting Apache 2.x +Developing modules for Apache HTTPD 2.4 +Documenting Apache HTTPD Apache 2.x Hook Functions -Converting Modules from Apache 1.3 to Apache 2.x -Request Processing in Apache 2.x -How Filters Work in Apache 2.x +Converting Modules from 1.3 to 2.x +Request Processing in 2.x +How Filters Work in 2.x +Guidelines for output filters in 2.x +Thread Safety Issues in 2.x diff --git a/docs/manual/sitemap.xml.de b/docs/manual/sitemap.xml.de index a94aa16bc65..24ce810fdf1 100644 --- a/docs/manual/sitemap.xml.de +++ b/docs/manual/sitemap.xml.de @@ -1,7 +1,7 @@ - + + + @@ -27,164 +27,188 @@ Plan du site -

    Cette page contient la liste des éléments actuellement disponibles de +

    Cette page contient la liste des éléments actuellement disponibles de la Documentation du serveur HTTP Apache Version &httpd.major;.&httpd.minor;.

    Notes de version -Mise à jour vers 2.4 depuis 2.2 -Nouvelles fonctionnalités d'Apache 2.3/2.4 -Nouvelles fonctionnalités d'Apache 2.1/2.2 -Nouvelles fonctionnalités d'Apache 2.0 +Mise à jour vers 2.4 depuis 2.2 +Nouvelles fonctionnalités d'Apache 2.3/2.4 +Nouvelles fonctionnalités d'Apache 2.1/2.2 +Nouvelles fonctionnalités d'Apache 2.0 License Apache Utilisation du serveur HTTP Apache Compilation et installation -Démarrage -Arrêt ou redémarrage +Démarrage +Arrêt ou redémarrage Fichiers de configuration Comment fonctionnent les sections Directory, Location et Files Mise en cache du contenu Configuration niveau serveur Fichiers de traces -Mise en correspondance des URLs avec le système de fichiers -Conseils sur la sécurité -Objets Dynamiques Partagés (DSO) -Négociation sur le contenu -Messages d'erreur personnalisés -Définition des adresses et ports qu'utilise +Mise en correspondance des URLs avec le système de fichiers +Objets Dynamiques Partagés (DSO) +Négociation sur le contenu +Messages d'erreur personnalisés +Définition des adresses et ports qu'utilise Apache Modules multi-processus (MPMs) Les variables d'environnement d'Apache -L'interprétation des expressions dans Apache +L'interprétation des expressions dans Apache Utilisation des gestionnaires d'Apache Filtres -Support du cache des objets partagés +Support du cache des objets partagés Support de suEXEC -Optimisation des performances +Considérations à propos de DNS et Apache Foire aux Questions Documentation des serveurs virtuels Apache -Aperçu -Serveurs virtuels basés sur le nom -Support des serveurs virtuels basés +Aperçu +Serveurs virtuels basés sur le nom +Support des serveurs virtuels basés sur l'adresse IP -Configuration dynamique de l'hébergement +Configuration dynamique de l'hébergement virtuel de masse Exemples de serveurs virtuels -Discussion approfondie à propos de la -sélection d'un serveur virtuel -Limitations inhérentes aux +Discussion approfondie à propos de la +sélection d'un serveur virtuel +Limitations inhérentes aux descripteurs de fichiers -Problèmes avec DNS et Apache -Guide de réécriture d'URLs +Guide de réécriture d'URLs Survol -Documentation de référence de mod_rewrite -Introduction -Drapeaux -Détails techniques -Remise en correspondance des URLs -Contrôle d'accès -Guide de réécriture avancée - -autres exemples utiles +Documentation de référence de mod_rewrite +Introduction à l'utilisation des expressions +rationnelles avec mod_rewrite +Utilisation de mod_rewrite pour les +redirections et la traduction des URLs +Utilisation de mod_rewrite pour le contrôle d'accès +Les serveurs virtuels dynamique avec mod_rewrite +Le mandat dynamique avec mod_rewrite +Utilisation d'une table de +réécriture +Techniques avancées +Quand ne pas utiliser mod_rewrite +Drapeaux de réécriture +Détails techniques + + + Chiffrement SSL/TLS avec Apache -Aperçu +Aperçu Chiffrement SSL/TLS : Introduction Chiffrement SSL/TLS : -Compatibilité +Compatibilité Chiffrement SSL/TLS : Recettes Chiffrement SSL/TLS : FAQ Guides, Tutoriels, and Recettes -Aperçu -Authentification +Aperçu +Authentification et autorisation +Contrôle d'accès Contenu dynamique avec CGI -Introduction aux Inclusions côté serveur +Introduction aux Inclusions côté serveur (Server Side Includes - SSI) Fichiers .htaccess -Répertoires web des +Répertoires web des utilisateurs +Guide de configuration des mandataires +inverses -Notes spécifiques à certains systèmes -Aperçu +Notes spécifiques à certains systèmes +Aperçu Utiliser Apache avec Microsoft Windows Compiler Apache pour Microsoft Windows +Utilisation d'Apache avec les systèmes à +base de paquets RPM Utiliser Apache avec Novell NetWare Mise en oeuvre d'un serveur web hautes performances sous HPUX -Le portage EBCDIC d'Apache +Le portage d'Apache sous EBCDIC -Le serveur HTTP Apache et ses programmes associés -Aperçu +Le serveur HTTP Apache et ses programmes associés +Aperçu Page de manuel : httpd Page de manuel : ab Page de manuel : apachectl Page de manuel : apxs Page de manuel : configure Page de manuel : dbmmanage +Page de manuel : fcgistarter Page de manuel : htcacheclean Page de manuel : htdbm Page de manuel : htdigest Page de manuel : htpasswd +Page de manuel : httxt2dbm Page de manuel : logresolve +Page de manuel : log_server_status Page de manuel : rotatelogs +Page de manuel : split-logfile Page de manuel : suexec Autres programmes Documentations diverses sur Apache -Aperçu -Standards concernés +Aperçu +Considérations à propos des +performances - Configuration fine d'Apache +Conseils en matière de sécurité +Standards concernés +Formats de chiffrement des +mots de passe Modules Apache -Définitions des termes utilisés pour -décrire les modules Apache -Définitions des termes utilisés -pour décrire les directives Apache +Définitions des termes utilisés pour +décrire les modules Apache +Définitions des termes utilisés +pour décrire les directives Apache -Documentation du développeur -Aperçu +Documentation du développeur +Aperçu Notes sur l'API Apache -Mises à jour de l'API dans Apache HTTPD 2.4 -Débogage de l'allocation mémoire -dans APR -Documenter Apache 2.x +Mises à jour de l'API dans Apache HTTPD 2.4 +Développement de modules pour Apache HTTPD 2.4 +Documentation d'Apache HTTPD Fonctions d'accroche (Hook Functions) d'Apache 2.x -Convertir un module depuis Apache -1.3 vers Apache 2.x -Traitement des requêtes avec Apache -2.x -Fonctionnement des filtres dans -Apache 2.x +Convertir un module depuis la +version 1.3 vers la version 2.x +Traitement des requêtes avec +la version 2.x +Fonctionnement des filtres dans la +version 2.x +Guide des filtres en sortie +dans la version 2.x +Sécurité des +threads dans la version 2.x @@ -192,7 +216,7 @@ Apache 2.x Glossaire Index des modules Index des directives -Référence rapide des directives +Référence rapide des directives diff --git a/docs/manual/sitemap.xml.ja b/docs/manual/sitemap.xml.ja index 40efbfdd5e9..56b87da71aa 100644 --- a/docs/manual/sitemap.xml.ja +++ b/docs/manual/sitemap.xml.ja @@ -1,7 +1,7 @@ - + + + + -Shared Object Cache in Apache HTTP Server - Apache HTTP Server +Shared Object Cache in Apache HTTP Server - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Shared Object Cache in Apache HTTP Server

    +Apache > HTTP Server > Documentation > Version 2.4

    Shared Object Cache in Apache HTTP Server

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    The Shared Object Cache provides a means to share simple data @@ -36,30 +42,104 @@ must be present, and configured.

    The only configuration required is to select which cache provider to use. This is the responsibility of modules using the cache, and - they enable selecton using directives such as - AuthnCacheSOCache, - SSLSessionCache, and - SSLStaplingCache.

    + they enable selection using directives such as + CacheSocache, + AuthnCacheSOCache, + SSLSessionCache, and + SSLStaplingCache.

    Currently available providers are:

    -
    "dbm" (mod_socache_dbm)
    +
    "dbm" (mod_socache_dbm)
    This makes use of a DBM hash file. - The choice of underlying DBM configuration may be configurable + The choice of underlying DBM used may be configurable if the installed APR version supports multiple DBM implementations.
    -
    "dc" (mod_socache_dc)
    -
    This makes use of the distcache +
    "dc" (mod_socache_dc)
    +
    This makes use of the distcache distributed session caching libraries.
    -
    "mc" (mod_socache_memcache)
    +
    "memcache" (mod_socache_memcache)
    This makes use of the memcached high-performance, distributed memory object caching system.
    -
    "shmcb" (mod_socache_shmcb)
    +
    "shmcb" (mod_socache_shmcb)
    This makes use of a high-performance cyclic buffer inside a shared memory segment.
    + +

    The API provides the following functions:

    + +
    +
    const char *create(ap_socache_instance_t **instance, const char *arg, + apr_pool_t *tmp, apr_pool_t *p);
    +
    Create a session cache based on the given configuration string. + The instance pointer returned in the instance paramater will be + passed as the first argument to subsequent invocations.
    + +
    apr_status_t init(ap_socache_instance_t *instance, const char *cname, + const struct ap_socache_hints *hints, + server_rec *s, apr_pool_t *pool)
    +
    Initialize the cache. The cname must be of maximum length 16 + characters, and uniquely identifies the consumer of the cache + within the server; using the module name is recommended, e.g. + "mod_ssl-sess". This string may be used within a filesystem + path so use of only alphanumeric [a-z0-9_-] characters is + recommended. If hints is non-NULL, it gives a set of hints for + the provider. Return APR error code.
    + +
    void destroy(ap_socache_instance_t *instance, server_rec *s)
    +
    Destroy a given cache instance object.
    + +
    apr_status_t store(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_time_t expiry, + unsigned char *data, unsigned int datalen, + apr_pool_t *pool)
    +
    Store an object in a cache instance.
    + +
    apr_status_t retrieve(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + unsigned char *data, unsigned int *datalen, + apr_pool_t *pool)
    +
    Retrieve a cached object.
    + +
    apr_status_t remove(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_pool_t *pool)
    +
    Remove an object from the cache.
    + +
    void status(ap_socache_instance_t *instance, request_rec *r, int flags)
    +
    Dump the status of a cache instance for mod_status.
    + +
    apr_status_t iterate(ap_socache_instance_t *instance, server_rec *s, + void *userctx, ap_socache_iterator_t *iterator, + apr_pool_t *pool)
    +
    Dump all cached objects through an iterator callback.
    +
    +
    -

    Available Languages:  en 

    -
    +

    Available Languages:  en  | + fr 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/socache.html.fr b/docs/manual/socache.html.fr new file mode 100644 index 00000000000..032b933d908 --- /dev/null +++ b/docs/manual/socache.html.fr @@ -0,0 +1,149 @@ + + + + + +Le cache des objets partags du serveur HTTP Apache - Serveur Apache HTTP Version 2.4 + + + + + + + +
    <-
    +

    Le cache des objets partags du serveur HTTP Apache

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + +

    Le cache des objets partags est un concept de partage de donnes + de base entre tous les processus d'un serveur, sans se proccuper du + modle de threads et de processus. On + l'utilise lorsque les avantages apports par le partage de donnes + entre processus contrebalance la perte de performances conscutive + la communication interprocessus.

    +
    +
    top
    +
    +

    Fournisseurs du cache d'objets partags

    + +

    Le cache d'objets partags en tant que tel est une abstraction. + Il est implment par quatre modules diffrents. Pour pouvoir + utiliser le cache, un ou plusieurs de ces modules doivent tre + prsents et configurs.

    +

    Le seul lment de configuration consiste dfinir le + fournisseur de cache utiliser. Ceci est de la responsabilit des + modules qui utilisent le cache, et pour cela, ils activent la + slection via des directives telles que CacheSocache, AuthnCacheSOCache, SSLSessionCache, et SSLStaplingCache.

    +

    Les fournisseurs actuellement disponibles sont :

    +
    +
    "dbm" (mod_socache_dbm)
    +
    Celui-ci utilise un fichier de hashage DBM. Le choix de la + DBM sous-jacente peut tre configurable si la version + d'APR installe supporte de multiples implmentations de DBM.
    +
    "dc" (mod_socache_dc)
    +
    Celui-ci utilise les bibliothques de mise en cache de sessions + distribues distcache.
    +
    "memcache" (mod_socache_memcache)
    +
    Celui-ci utilise le systme hautes performances de mise en + cache d'objets de mmoire distribue memcached.
    +
    "shmcb" (mod_socache_shmcb)
    +
    Celui-ci utilise un tampon cyclique hautes performances au + sein d'un segment de mmoire partage.
    +
    + +

    L'API fournit les fonctions suivantes :

    + +
    +
    const char *create(ap_socache_instance_t **instance, const char *arg, + apr_pool_t *tmp, apr_pool_t *p);
    +
    Cette fonction permet de crer un cache de session bas sur + la chane de configuration spcifie. Le pointeur d'instance + renvoy dans le paramtre instance sera pass comme premier + argument des invocations subsquentes.
    + +
    apr_status_t init(ap_socache_instance_t *instance, const char *cname, + const struct ap_socache_hints *hints, + server_rec *s, apr_pool_t *pool)
    +
    Cette fonction permet d'initialiser le cache. L'argument cname + doit avoir une longueur maximale de 16 caractres et permet + d'identifier de manire unique l'utilisateur du cache au sein du + serveur ; il est recommand d'utiliser le nom du module, par + exemple "mod_ssl-sess". Comme cette chane peut tre utilise au + sein d'un systme de fichiers, il est conseill de n'utiliser que + des caractres alphanumriques [a-z0-9_-]. Si l'argument hints + n'est pas gal NULL, il fournit un ensemble d'indications au + fournisseur. La valeur retourne est le code d'erreur APR.
    + +
    void destroy(ap_socache_instance_t *instance, server_rec *s)
    +
    Cette fonction permet de dtruire l'instance de cache + spcifie.
    + +
    apr_status_t store(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_time_t expiry, + unsigned char *data, unsigned int datalen, + apr_pool_t *pool)
    +
    Cette fonction permet de stocker un objet dans une instance de + cache.
    + +
    apr_status_t retrieve(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + unsigned char *data, unsigned int *datalen, + apr_pool_t *pool)
    +
    Cette fonction permet d'extraire un objet du cache.
    + +
    apr_status_t remove(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_pool_t *pool)
    +
    Supprime un objet du cache.
    + +
    void status(ap_socache_instance_t *instance, request_rec *r, int flags)
    +
    Renvoie le statut d'une instance de cache destination de mod_status.
    + +
    apr_status_t iterate(ap_socache_instance_t *instance, server_rec *s, + void *userctx, ap_socache_iterator_t *iterator, + apr_pool_t *pool)
    +
    Envoie tous les objets gards en cache une fonction pour traitement itratif.
    +
    + +
    +
    +

    Langues Disponibles:  en  | + fr 

    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    + \ No newline at end of file diff --git a/docs/manual/socache.xml b/docs/manual/socache.xml index 7914d31f319..d0338b8c8e5 100644 --- a/docs/manual/socache.xml +++ b/docs/manual/socache.xml @@ -39,26 +39,78 @@ must be present, and configured.

    The only configuration required is to select which cache provider to use. This is the responsibility of modules using the cache, and - they enable selecton using directives such as - AuthnCacheSOCache, - SSLSessionCache, and - SSLStaplingCache.

    + they enable selection using directives such as + CacheSocache, + AuthnCacheSOCache, + SSLSessionCache, and + SSLStaplingCache.

    Currently available providers are:

    -
    "dbm" (mod_socache_dbm)
    +
    "dbm" (mod_socache_dbm)
    This makes use of a DBM hash file. - The choice of underlying DBM configuration may be configurable + The choice of underlying DBM used may be configurable if the installed APR version supports multiple DBM implementations.
    -
    "dc" (mod_socache_dc)
    -
    This makes use of the distcache +
    "dc" (mod_socache_dc)
    +
    This makes use of the distcache distributed session caching libraries.
    -
    "mc" (mod_socache_memcache)
    +
    "memcache" (mod_socache_memcache)
    This makes use of the memcached high-performance, distributed memory object caching system.
    -
    "shmcb" (mod_socache_shmcb)
    +
    "shmcb" (mod_socache_shmcb)
    This makes use of a high-performance cyclic buffer inside a shared memory segment.
    + +

    The API provides the following functions:

    + +
    +
    const char *create(ap_socache_instance_t **instance, const char *arg, + apr_pool_t *tmp, apr_pool_t *p);
    +
    Create a session cache based on the given configuration string. + The instance pointer returned in the instance paramater will be + passed as the first argument to subsequent invocations.
    + +
    apr_status_t init(ap_socache_instance_t *instance, const char *cname, + const struct ap_socache_hints *hints, + server_rec *s, apr_pool_t *pool)
    +
    Initialize the cache. The cname must be of maximum length 16 + characters, and uniquely identifies the consumer of the cache + within the server; using the module name is recommended, e.g. + "mod_ssl-sess". This string may be used within a filesystem + path so use of only alphanumeric [a-z0-9_-] characters is + recommended. If hints is non-NULL, it gives a set of hints for + the provider. Return APR error code.
    + +
    void destroy(ap_socache_instance_t *instance, server_rec *s)
    +
    Destroy a given cache instance object.
    + +
    apr_status_t store(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_time_t expiry, + unsigned char *data, unsigned int datalen, + apr_pool_t *pool)
    +
    Store an object in a cache instance.
    + +
    apr_status_t retrieve(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + unsigned char *data, unsigned int *datalen, + apr_pool_t *pool)
    +
    Retrieve a cached object.
    + +
    apr_status_t remove(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_pool_t *pool)
    +
    Remove an object from the cache.
    + +
    void status(ap_socache_instance_t *instance, request_rec *r, int flags)
    +
    Dump the status of a cache instance for mod_status.
    + +
    apr_status_t iterate(ap_socache_instance_t *instance, server_rec *s, + void *userctx, ap_socache_iterator_t *iterator, + apr_pool_t *pool)
    +
    Dump all cached objects through an iterator callback.
    +
    +
    diff --git a/docs/manual/socache.xml.fr b/docs/manual/socache.xml.fr new file mode 100644 index 00000000000..841add1a035 --- /dev/null +++ b/docs/manual/socache.xml.fr @@ -0,0 +1,127 @@ + + + + + + + + + + + + Le cache des objets partagés du serveur HTTP Apache + + +

    Le cache des objets partagés est un concept de partage de données + de base entre tous les processus d'un serveur, sans se préoccuper du + modèle de threads et de processus. On + l'utilise lorsque les avantages apportés par le partage de données + entre processus contrebalance la perte de performances consécutive à + la communication interprocessus.

    +
    + +
    + Fournisseurs du cache d'objets partagés +

    Le cache d'objets partagés en tant que tel est une abstraction. + Il est implémenté par quatre modules différents. Pour pouvoir + utiliser le cache, un ou plusieurs de ces modules doivent être + présents et configurés.

    +

    Le seul élément de configuration consiste à définir le + fournisseur de cache à utiliser. Ceci est de la responsabilité des + modules qui utilisent le cache, et pour cela, ils activent la + sélection via des directives telles que CacheSocache, AuthnCacheSOCache, SSLSessionCache, et SSLStaplingCache.

    +

    Les fournisseurs actuellement disponibles sont :

    +
    +
    "dbm" (mod_socache_dbm)
    +
    Celui-ci utilise un fichier de hashage DBM. Le choix de la + DBM sous-jacente peut être configurable si la version + d'APR installée supporte de multiples implémentations de DBM.
    +
    "dc" (mod_socache_dc)
    +
    Celui-ci utilise les bibliothèques de mise en cache de sessions + distribuées distcache.
    +
    "memcache" (mod_socache_memcache)
    +
    Celui-ci utilise le système à hautes performances de mise en + cache d'objets de mémoire distribuée memcached.
    +
    "shmcb" (mod_socache_shmcb)
    +
    Celui-ci utilise un tampon cyclique à hautes performances au + sein d'un segment de mémoire partagée.
    +
    + +

    L'API fournit les fonctions suivantes :

    + +
    +
    const char *create(ap_socache_instance_t **instance, const char *arg, + apr_pool_t *tmp, apr_pool_t *p);
    +
    Cette fonction permet de créer un cache de session basé sur + la chaîne de configuration spécifiée. Le pointeur d'instance + renvoyé dans le paramètre instance sera passé comme premier + argument des invocations subséquentes.
    + +
    apr_status_t init(ap_socache_instance_t *instance, const char *cname, + const struct ap_socache_hints *hints, + server_rec *s, apr_pool_t *pool)
    +
    Cette fonction permet d'initialiser le cache. L'argument cname + doit avoir une longueur maximale de 16 caractères et permet + d'identifier de manière unique l'utilisateur du cache au sein du + serveur ; il est recommandé d'utiliser le nom du module, par + exemple "mod_ssl-sess". Comme cette chaîne peut être utilisée au + sein d'un système de fichiers, il est conseillé de n'utiliser que + des caractères alphanumériques [a-z0-9_-]. Si l'argument hints + n'est pas égal à NULL, il fournit un ensemble d'indications au + fournisseur. La valeur retournée est le code d'erreur APR.
    + +
    void destroy(ap_socache_instance_t *instance, server_rec *s)
    +
    Cette fonction permet de détruire l'instance de cache + spécifiée.
    + +
    apr_status_t store(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_time_t expiry, + unsigned char *data, unsigned int datalen, + apr_pool_t *pool)
    +
    Cette fonction permet de stocker un objet dans une instance de + cache.
    + +
    apr_status_t retrieve(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + unsigned char *data, unsigned int *datalen, + apr_pool_t *pool)
    +
    Cette fonction permet d'extraire un objet du cache.
    + +
    apr_status_t remove(ap_socache_instance_t *instance, server_rec *s, + const unsigned char *id, unsigned int idlen, + apr_pool_t *pool)
    +
    Supprime un objet du cache.
    + +
    void status(ap_socache_instance_t *instance, request_rec *r, int flags)
    +
    Renvoie le statut d'une instance de cache à destination de mod_status.
    + +
    apr_status_t iterate(ap_socache_instance_t *instance, server_rec *s, + void *userctx, ap_socache_iterator_t *iterator, + apr_pool_t *pool)
    +
    Envoie tous les objets gardés en cache à une fonction pour traitement itératif.
    +
    + +
    + +
    diff --git a/docs/manual/socache.xml.meta b/docs/manual/socache.xml.meta index a81dae4f6b7..886fb69e839 100644 --- a/docs/manual/socache.xml.meta +++ b/docs/manual/socache.xml.meta @@ -8,5 +8,6 @@ en + fr diff --git a/docs/manual/ssl/index.html b/docs/manual/ssl/index.html index e0787e4bdff..11c9bb592be 100644 --- a/docs/manual/ssl/index.html +++ b/docs/manual/ssl/index.html @@ -16,6 +16,6 @@ Content-Language: tr Content-type: text/html; charset=UTF-8 -URI: index.html.zh-cn +URI: index.html.zh-cn.utf8 Content-Language: zh-cn Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/ssl/index.html.en b/docs/manual/ssl/index.html.en index da8182dfd48..c10f0674c6d 100644 --- a/docs/manual/ssl/index.html.en +++ b/docs/manual/ssl/index.html.en @@ -1,22 +1,27 @@ - -Apache SSL/TLS Encryption - Apache HTTP Server +Apache SSL/TLS Encryption - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Apache SSL/TLS Encryption

    +Apache > HTTP Server > Documentation > Version 2.4

    Apache SSL/TLS Encryption

    Available Languages:  en  |  fr  | @@ -28,8 +33,7 @@

    The Apache HTTP Server module mod_ssl provides an interface to the OpenSSL library, which provides Strong Encryption using the Secure Sockets Layer and Transport Layer -Security protocols. The module and this documentation are based on -Ralf S. Engelschall's mod_ssl project.

    +Security protocols.

    +

    Copyright 2016 The Apache Software Foundation.
    Licensed under the Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/ssl/index.html.fr b/docs/manual/ssl/index.html.fr index 0127daaf45d..959657b53a9 100644 --- a/docs/manual/ssl/index.html.fr +++ b/docs/manual/ssl/index.html.fr @@ -1,22 +1,27 @@ - -Apache et le Chiffrement SSL/TLS - Serveur Apache HTTP +Apache et le Chiffrement SSL/TLS - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Apache et le Chiffrement SSL/TLS

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Apache et le Chiffrement SSL/TLS

    Langues Disponibles:  en  |  fr  | @@ -29,8 +34,7 @@ interface avec la bibliothque OpenSSL, qui permet d'effectuer un chiffrement fort en s'appuyant sur les protocoles "Couche Points d'accs Scuriss" (Secure Sockets Layer - SSL) et "Scurit de la Couche Transport" -(Transport Layer Security - TLS). Le module et cette documentation sont bass -sur le projet mod_ssl de Ralf S. Engelschall.

    +(Transport Layer Security - TLS).

    +

    Copyright 2016 The Apache Software Foundation.
    Autoris sous Apache License, Version 2.0.

    +
    \ No newline at end of file diff --git a/docs/manual/ssl/index.html.ja.utf8 b/docs/manual/ssl/index.html.ja.utf8 index 80a92732362..3dbdb34e689 100644 --- a/docs/manual/ssl/index.html.ja.utf8 +++ b/docs/manual/ssl/index.html.ja.utf8 @@ -1,40 +1,40 @@ - -Apache の SSL/TLS 暗号化 - Apache HTTP サーバ +Apache の SSL/TLS 暗号化 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache の SSL/TLS 暗号化

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  tr  |  zh-cn 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。

    Apache HTTP サーバモジュール mod_sslOpenSSL ライブラリへのインターフェースを提供していますが、これは Secure Sockts Layer と Transport Layer Security -プロトコルを用いた強力な暗号化を提供します。 -このモジュールやこの文書は Ralf S. Engelschall の mod_ssl -プロジェクトに基づいています。

    +プロトコルを用いた強力な暗号化を提供します。

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja  |  tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    この文書は Apache License, Version 2.0 のライセンスで提供されています。.

    +
    \ No newline at end of file diff --git a/docs/manual/ssl/index.html.tr.utf8 b/docs/manual/ssl/index.html.tr.utf8 index 92c2b27f602..4c1a87705bb 100644 --- a/docs/manual/ssl/index.html.tr.utf8 +++ b/docs/manual/ssl/index.html.tr.utf8 @@ -1,22 +1,27 @@ - -Apache SSL/TLS Şifrelemesi - Apache HTTP Sunucusu +Apache SSL/TLS Şifrelemesi - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Apache SSL/TLS Şifrelemesi

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache SSL/TLS Şifrelemesi

    Mevcut Diller:  en  |  fr  | @@ -24,13 +29,11 @@  tr  |  zh-cn 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.

    Apache HTTP Sunucusunun mod_ssl modülü, Güvenli Soketler Katmanı (SSL) ve Aktarım Katmanı Güvenliği (TLS) protokollerinin kullanıldığı Sağlam Şifreleme desteğini sağlayan OpenSSL kütüphanesine bir arayüz - içerir. Bu modül ve belgeler Ralf S. Engelschall’ın mod_ssl projesine - dayanmaktadır.

    + içerir.

    \ No newline at end of file diff --git a/docs/manual/ssl/index.html.zh-cn b/docs/manual/ssl/index.html.zh-cn.utf8 similarity index 75% rename from docs/manual/ssl/index.html.zh-cn rename to docs/manual/ssl/index.html.zh-cn.utf8 index 209c5efafb1..6e38f1c1793 100644 --- a/docs/manual/ssl/index.html.zh-cn +++ b/docs/manual/ssl/index.html.zh-cn.utf8 @@ -1,22 +1,27 @@ - -Apache SSL/TLS 加密 - Apache HTTP 服务器 +Apache SSL/TLS 加密 - Apache HTTP 服务器 版本 2.4 - + + + + +

    Apache HTTP 服务器版本 2.4

    +
    <-

    Apache SSL/TLS 加密

    +Apache > HTTP 服务器 > 文档 > 版本 2.4

    Apache SSL/TLS 加密

    可用语言:  en  |  fr  | @@ -24,6 +29,7 @@  tr  |  zh-cn 

    +
    此翻译可能过期。要了解最近的更改,请阅读英文版。

    Apache HTTP 服务器模块 mod_ssl 提供了与 OpenSSL @@ -57,6 +63,10 @@ Ralf S. Engelschall 的 mod_ssl 项目。

     tr  |  zh-cn 

    +

    Copyright 2016 The Apache Software Foundation.
    基于 Apache License, Version 2.0 许可证.

    +
    \ No newline at end of file diff --git a/docs/manual/ssl/index.xml b/docs/manual/ssl/index.xml index 2f0497fbdc5..b23d05404a1 100644 --- a/docs/manual/ssl/index.xml +++ b/docs/manual/ssl/index.xml @@ -30,8 +30,7 @@ provides an interface to the OpenSSL library, which provides Strong Encryption using the Secure Sockets Layer and Transport Layer -Security protocols. The module and this documentation are based on -Ralf S. Engelschall's mod_ssl project.

    +Security protocols.

    Documentation diff --git a/docs/manual/ssl/index.xml.fr b/docs/manual/ssl/index.xml.fr index c02f2eb8f89..bb12a424e8e 100644 --- a/docs/manual/ssl/index.xml.fr +++ b/docs/manual/ssl/index.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -33,8 +33,7 @@ interface avec la bibliothèque OpenSSL, qui permet d'effectuer un chiffrement fort en s'appuyant sur les protocoles "Couche Points d'accès Sécurisés" (Secure Sockets Layer - SSL) et "Sécurité de la Couche Transport" -(Transport Layer Security - TLS). Le module et cette documentation sont basés -sur le projet mod_ssl de Ralf S. Engelschall.

    +(Transport Layer Security - TLS).

    Documentation diff --git a/docs/manual/ssl/index.xml.ja b/docs/manual/ssl/index.xml.ja index eb337021a69..7e3e2f02c55 100644 --- a/docs/manual/ssl/index.xml.ja +++ b/docs/manual/ssl/index.xml.ja @@ -1,7 +1,7 @@ - + + + -SSL/TLS Strong Encryption: Compatibility - Apache HTTP Server +SSL/TLS Strong Encryption: Compatibility - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    SSL/TLS Strong Encryption: Compatibility

    +Apache > HTTP Server > Documentation > Version 2.4 > SSL/TLS

    SSL/TLS Strong Encryption: Compatibility

    Available Languages:  en  |  fr 

    @@ -44,7 +49,7 @@ mapping tables are included here to give the equivalents used by mod_ssl.

    +

    See also

    top

    Configuration Directives

    @@ -216,7 +221,28 @@ are listed in Table 3.

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_compat.html.fr b/docs/manual/ssl/ssl_compat.html.fr index fe6e269b16a..524159b0640 100644 --- a/docs/manual/ssl/ssl_compat.html.fr +++ b/docs/manual/ssl/ssl_compat.html.fr @@ -1,40 +1,40 @@ - -Chiffrement fort SSL/TLS : Compatibilit - Serveur Apache HTTP +Chiffrement fort SSL/TLS : Compatibilit - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Chiffrement fort SSL/TLS : Compatibilit

    +Apache > Serveur HTTP > Documentation > Version 2.4 > SSL/TLS

    Chiffrement fort SSL/TLS : Compatibilit

    Langues Disponibles:  en  |  fr 

    -
    -

    Tous les PCs sont compatibles. Mais certains sont plus compatibles que -d'autres.

    -

    -- Inconnu

    -

    Ce document couvre la compatibilit ascendante entre mod_ssl et d'autres solutions SSL. mod_ssl n'est pas la seule solution SSL pour Apache ; quatre autres produits sont (ou ont t) galement disponibles : Apache-SSL, le produit libre de -Ben Laurie (d'o mod_ssl est issu l'origine en 1998), Secure -Web Server, un produit commercial de Red Hat (bas sur mod_ssl), -Raven SSL Module, un produit commercial +Ben Laurie (d'o mod_ssl est issu l'origine en 1998), Secure +Web Server, un produit commercial de Red Hat (bas sur mod_ssl), +Raven SSL Module, un produit commercial de Covalent (bas lui aussi sur mod_ssl), et enfin Stronghold, produit commercial de C2Net et maintenant de Red Hat, (bas sur une branche d'volution diffrente appele Sioux jusqu' Stronghold 2.x et bas sur @@ -51,7 +51,7 @@ de termes utilis

    +

    Voir aussi

    top

    Directives de configuration

    @@ -68,7 +68,9 @@ support Compatibilit entre Apache-SSL 1.x et mod_ssl 2.0.x : SSLEnableSSLEngine onplus compacte SSLDisableSSLEngine offplus compacte -SSLLogFile fileSSLLog fileplus compacte +SSLLogFile +fileUtilisez plutt la directive +de niveau module LogLevel. SSLRequiredCiphers specSSLCipherSuite specrenomme SSLRequireCipher c1 ...SSLRequire %{SSL_CIPHER} in {"c1", ...}plus gnrale @@ -85,7 +87,9 @@ support SSL_KeyFile fileSSLCertificateKeyFile filerenomme SSL_CipherSuite argSSLCipherSuite argrenomme SSL_X509VerifyDir argSSLCACertificatePath argrenomme -SSL_Log fileSSLLogFile filerenomme +SSL_Log +file-Utilisez plutt la directive +de niveau module LogLevel SSL_Connect flagSSLEngine flagrenomme SSL_ClientAuth argSSLVerifyClient argrenomme SSL_X509VerifyDepth argSSLVerifyDepth argrenomme @@ -226,7 +230,28 @@ actuellement impl

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_compat.xml.fr b/docs/manual/ssl/ssl_compat.xml.fr index 3384cba0758..62afb781052 100644 --- a/docs/manual/ssl/ssl_compat.xml.fr +++ b/docs/manual/ssl/ssl_compat.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -28,20 +28,14 @@ Chiffrement fort SSL/TLS : Compatibilité -
    -

    Tous les PCs sont compatibles. Mais certains sont plus compatibles que -d'autres.

    -

    -- Inconnu

    -

    Ce document couvre la compatibilité ascendante entre mod_ssl et d'autres solutions SSL. mod_ssl n'est pas la seule solution SSL pour Apache ; quatre autres produits sont (ou ont été) également disponibles : Apache-SSL, le produit libre de -Ben Laurie (d'où mod_ssl est issu à l'origine en 1998), Secure -Web Server, un produit commercial de Red Hat (basé sur mod_ssl), -Raven SSL Module, un produit commercial +Ben Laurie (d'où mod_ssl est issu à l'origine en 1998), Secure +Web Server, un produit commercial de Red Hat (basé sur mod_ssl), +Raven SSL Module, un produit commercial de Covalent (basé lui aussi sur mod_ssl), et enfin Stronghold, produit commercial de C2Net et maintenant de Red Hat, (basé sur une branche @@ -75,7 +69,9 @@ supportées par mod_ssl.

    Compatibilité entre Apache-SSL 1.x et mod_ssl 2.0.x : SSLEnableSSLEngine onplus compacte SSLDisableSSLEngine offplus compacte -SSLLogFile fileSSLLog fileplus compacte +SSLLogFile +fileUtilisez plutôt la directive +de niveau module LogLevel. SSLRequiredCiphers specSSLCipherSuite specrenommée SSLRequireCipher c1 ...SSLRequire %{SSL_CIPHER} in {"c1", @@ -97,7 +93,9 @@ supportées par mod_ssl.

    SSL_CipherSuite argSSLCipherSuite argrenommée SSL_X509VerifyDir argSSLCACertificatePath argrenommée -SSL_Log fileSSLLogFile filerenommée +SSL_Log +file-Utilisez plutôt la directive +de niveau module LogLevel SSL_Connect flagSSLEngine flagrenommée SSL_ClientAuth argSSLVerifyClient argrenommée diff --git a/docs/manual/ssl/ssl_faq.html.en b/docs/manual/ssl/ssl_faq.html.en index 58ac1d7c6b4..32eb78c50aa 100644 --- a/docs/manual/ssl/ssl_faq.html.en +++ b/docs/manual/ssl/ssl_faq.html.en @@ -1,22 +1,27 @@ - -SSL/TLS Strong Encryption: FAQ - Apache HTTP Server +SSL/TLS Strong Encryption: FAQ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    SSL/TLS Strong Encryption: FAQ

    +Apache > HTTP Server > Documentation > Version 2.4 > SSL/TLS

    SSL/TLS Strong Encryption: FAQ

    Available Languages:  en  |  fr 

    @@ -34,7 +39,7 @@ he poses the right questions.

  • Certificates
  • The SSL Protocol
  • mod_ssl Support
  • -
    +

    See also

    top

    Installation

    @@ -54,7 +59,7 @@ generate temporary 512 bit RSA private key" when I start Apache? Make sure that all parent directories (here /opt, /opt/apache and /opt/apache/logs) have the x-bit set for, at minimum, the UID under which Apache's children are running (see - the User directive).

    + the User directive).

    Why does mod_ssl stop with the error @@ -173,11 +178,10 @@ relative hyperlinks? fully-qualified hyperlinks (because you have to change the URL scheme). Using mod_rewrite however, you can manipulate relative hyperlinks, to achieve the same effect.

    -

    - RewriteEngine on
    - RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L]
    - RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] -

    +
    RewriteEngine on
    +RewriteRule   "^/(.*)_SSL$"   "https://%{SERVER_NAME}/$1" [R,L]
    +RewriteRule   "^/(.*)_NOSSL$" "http://%{SERVER_NAME}/$1"  [R,L]
    +

    This rewrite ruleset lets you use hyperlinks of the form <a href="document.html_SSL">, to switch to HTTPS @@ -202,8 +206,6 @@ key file? dialog at Apache startup time?

  • How do I verify that a private key matches its Certificate?
  • -
  • Why do connections fail with an "alert bad -certificate" error?
  • How can I convert a certificate from PEM to DER format?
  • Why do browsers complain that they cannot @@ -255,10 +257,9 @@ Certificate for testing purposes?
  • -keyout server.key

    These can be used as follows in your httpd.conf file: -
    -             SSLCertificateFile    /path/to/this/server.crt
    -             SSLCertificateKeyFile /path/to/this/server.key
    -        
    +
    SSLCertificateFile    "/path/to/this/server.crt"
    +SSLCertificateKeyFile "/path/to/this/server.key"
    +
  • It is important that you are aware that this server.key does not have any passphrase. @@ -335,10 +336,9 @@ Certificate for testing purposes?
  • You should now have two files: server.key and server.crt. These can be used as follows in your httpd.conf file: -
    -       SSLCertificateFile    /path/to/this/server.crt
    -       SSLCertificateKeyFile /path/to/this/server.key
    -       
    +
    SSLCertificateFile    "/path/to/this/server.crt"
    +SSLCertificateKeyFile "/path/to/this/server.key"
    + The server.csr file is no longer needed.
  • @@ -349,7 +349,7 @@ Certificate for testing purposes?

    The short answer is to use the CA.sh or CA.pl script provided by OpenSSL. Unless you have a good reason not to, you should use these for preference. If you cannot, you can create a - self-signed Certificate as follows:

    + self-signed certificate as follows:

    1. Create a RSA private key for your server @@ -357,10 +357,11 @@ Certificate for testing purposes?
      $ openssl genrsa -des3 -out server.key 2048

      - Please backup this host.key file and the + Please backup this server.key file and the pass-phrase you entered in a secure location. You can see the details of this RSA private key by using the command:
      +
      $ openssl rsa -noout -text -in server.key

      If necessary, you can also create a decrypted PEM version (not @@ -369,11 +370,11 @@ Certificate for testing purposes? $ openssl rsa -in server.key -out server.key.unsecure

    2. -
    3. Create a self-signed Certificate (X509 structure) +
    4. Create a self-signed certificate (X509 structure) with the RSA key you just created (output will be PEM formatted):

      $ openssl req -new -x509 -nodes -sha1 -days 365 - -key server.key -out server.crt
      + -key server.key -out server.crt -extensions usr_cert


      This signs the server CSR and results in a server.crt file.
      You can see the details of this Certificate using:
      @@ -520,6 +521,8 @@ Does this mean the username/password is being sent unencrypted?
    5. Why do I get I/O errors when connecting via HTTPS to an Apache+mod_ssl server with Microsoft Internet Explorer (MSIE)?
    6. +
    7. How do I enable TLS-SRP?
    8. +
    9. Why do I get handshake failures with Java-based clients when using a certificate with more than 1024 bits?
    10. Why do I get lots of random SSL protocol @@ -605,6 +608,11 @@ error when connecting to my newly installed server?

      handshake is finished, but the information is needed in order to complete the SSL handshake phase. See the next question for how to circumvent this issue.

      + +

      Note that if you have a wildcard SSL certificate, or a + certificate that has multiple hostnames on it using subjectAltName + fields, you can use SSL on name-based virtual hosts without further + workarounds.

      Is it possible to use Name-Based @@ -620,6 +628,11 @@ Virtual Hosting to identify different SSL virtual hosts?

      feature that only the most recent revisions of the SSL specification added, called Server Name Indication (SNI).

      +

      Note that if you have a wildcard SSL certificate, or a + certificate that has multiple hostnames on it using subjectAltName + fields, you can use SSL on name-based virtual hosts without further + workarounds.

      +

      The reason is that the SSL protocol is a separate layer which encapsulates the HTTP protocol. So the SSL session is a separate transaction, that takes place before the HTTP session has begun. @@ -640,9 +653,8 @@ Virtual Hosting to identify different SSL virtual hosts? you must make sure to put the non-SSL port number on the NameVirtualHost directive, e.g.

      -

      - NameVirtualHost 192.168.1.1:80 -

      +
      NameVirtualHost 192.168.1.1:80
      +

      Other workaround solutions include:

      @@ -658,7 +670,7 @@ a negotiable standard compression method.

      OpenSSL 0.9.8 started to support this by default when compiled with the zlib option. If both the client and the server support compression, it will be used. However, most clients still try to initially connect with an -SSLv2 Hello. As SSLv2 did not include an array of prefered compression algorithms +SSLv2 Hello. As SSLv2 did not include an array of preferred compression algorithms in its handshake, compression cannot be negotiated with these clients. If the client disables support for SSLv2, either an SSLv3 or TLS Hello may be sent, depending on which SSL library is used, and compression may @@ -692,11 +704,10 @@ Explorer (MSIE)? keep-alive connections or send the SSL close notify messages to MSIE clients. This can be done by using the following directive in your SSL-aware virtual host section:

      -

      - SetEnvIf User-Agent "MSIE [2-5]" \
      - nokeepalive ssl-unclean-shutdown \
      - downgrade-1.0 force-response-1.0 -

      +
      SetEnvIf User-Agent "MSIE [2-5]" \
      +         nokeepalive ssl-unclean-shutdown \
      +         downgrade-1.0 force-response-1.0
      +

      Further, some MSIE versions have problems with particular ciphers. Unfortunately, it is not possible to implement a MSIE-specific workaround for this, because the ciphers are needed as early as the @@ -709,6 +720,60 @@ Explorer (MSIE)? or otherwise.

      +

      How do I enable TLS-SRP?

      +

      TLS-SRP (Secure Remote Password key exchange for TLS, specified in RFC 5054) + can supplement or replace certificates in authenticating an SSL connection. + To use TLS-SRP, set the + SSLSRPVerifierFile directive to + point to an OpenSSL SRP verifier file. To create the verifier file, use the + openssl tool:

      +

      + openssl srp -srpvfile passwd.srpv -add username +

      +

      After creating this file, specify it in the SSL server configuration:

      +

      + SSLSRPVerifierFile /path/to/passwd.srpv +

      +

      To force clients to use non-certificate TLS-SRP cipher suites, use the + following directive:

      +

      + SSLCipherSuite "!DSS:!aRSA:SRP" +

      + + +

      Why do I get handshake failures with Java-based clients when using a certificate with more than 1024 bits?

      +

      Beginning with version 2.4.7, + mod_ssl will use DH parameters which include primes + with lengths of more than 1024 bits. Java 7 and earlier limit their + support for DH prime sizes to a maximum of 1024 bits, however.

      + +

      If your Java-based client aborts with exceptions such as + java.lang.RuntimeException: Could not generate DH keypair and + java.security.InvalidAlgorithmParameterException: Prime size must be + multiple of 64, and can only range from 512 to 1024 (inclusive), + and httpd logs tlsv1 alert internal error (SSL alert number 80) + (at LogLevel info + or higher), you can either rearrange mod_ssl's cipher list with + SSLCipherSuite + (possibly in conjunction with SSLHonorCipherOrder), + or you can use custom DH parameters with a 1024-bit prime, which + will always have precedence over any of the built-in DH parameters.

      + +

      To generate custom DH parameters, use the openssl dhparam 1024 + command. Alternatively, you can use the following standard 1024-bit DH + parameters from RFC 2409, + section 6.2:

      +
      -----BEGIN DH PARAMETERS-----
      +MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR
      +Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL
      +/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC
      +-----END DH PARAMETERS-----
      +

      Add the custom parameters including the "BEGIN DH PARAMETERS" and + "END DH PARAMETERS" lines to the end of the first certificate file + you have configured using the + SSLCertificateFile directive.

      + +
    top

    mod_ssl Support

    @@ -730,8 +795,8 @@ for my core dump?
    Answers in the User Manual's F.A.Q. List (this)
    -
    - http://httpd.apache.org/docs/trunk/ssl/ssl_faq.html
    +
    + http://httpd.apache.org/docs/2.4/ssl/ssl_faq.html
    First check the F.A.Q. (this text). If your problem is a common one, it may have been answered several times before, and been included in this doc. @@ -843,7 +908,28 @@ the reason for my core dump?

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_faq.html.fr b/docs/manual/ssl/ssl_faq.html.fr index 27762b70804..70676d318e6 100644 --- a/docs/manual/ssl/ssl_faq.html.fr +++ b/docs/manual/ssl/ssl_faq.html.fr @@ -1,22 +1,27 @@ - -Chiffrement SSL/TLS fort: foire aux questions - Serveur Apache HTTP +Chiffrement SSL/TLS fort: foire aux questions - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Chiffrement SSL/TLS fort: foire aux questions

    +Apache > Serveur HTTP > Documentation > Version 2.4 > SSL/TLS

    Chiffrement SSL/TLS fort: foire aux questions

    Langues Disponibles:  en  |  fr 

    @@ -33,7 +38,7 @@
  • Certificats
  • Le protocole SSL
  • Support de mod_ssl
  • -
    +

    Voir aussi

    top

    Installation

    @@ -55,7 +60,7 @@ erreurs de permission en rapport avec SSLMutex ? parents (ici /opt, /opt/apache et /opt/apache/logs) ont le bit x positionn au moins pour l'UID sous lequel les processus enfants d'Apache s'excutent (voir la - directive User).

    + directive User).

    Pourquoi mod_ssl s'arrte-t-il avec l'erreur @@ -184,11 +189,10 @@ HTTPS dans les hyperliens relatifs ?

    hyperliens pleinement qualifis (car vous devez modifier le schma de l'URL). Cependant, l'aide du module mod_rewrite, vous pouvez manipuler des hyperliens relatifs, pour obtenir le mme effet.

    -

    - RewriteEngine on
    - RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L]
    - RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] -

    +
    RewriteEngine on
    +RewriteRule   "^/(.*)_SSL$"   "https://%{SERVER_NAME}/$1" [R,L]
    +RewriteRule   "^/(.*)_NOSSL$" "http://%{SERVER_NAME}/$1"  [R,L]
    +

    Ce jeu de rgles rewrite vous permet d'utiliser des hyperliens de la forme <a href="document.html_SSL"> pour passer en HTTPS @@ -213,8 +217,6 @@ de ma cl mot de passe ?

  • Comment vrifier si une cl prive correspond bien son certificat ?
  • -
  • Pour quelle raison une connexion choue-t-elle avec -l'erreur "alert bad certificate" ?
  • Comment convertir un certificat du format PEM au format DER ?
  • Pourquoi les navigateurs se plaignent-ils de ne pas pouvoir @@ -269,10 +271,9 @@ fins de test ? -keyout server.key
    Ces fichiers seront utiliss comme suit dans votre httpd.conf : -
    -             SSLCertificateFile    /chemin/vers/server.crt
    -             SSLCertificateKeyFile /chemin/vers/server.key
    -	
    +
    SSLCertificateFile    "/path/to/this/server.crt"
    +SSLCertificateKeyFile "/path/to/this/server.key"
    +
  • Il est important de savoir que le fichier server.key n'a pas de mot de passe. Pour ajouter un mot de passe la cl, vous @@ -352,10 +353,9 @@ fins de test ?
  • Vous devez maintenant disposer de deux fichiers : server.key et server.crt. Ils sont prciss dans votre fichier httpd.conf comme suit : -
    -       SSLCertificateFile    /chemin/vers/server.crt
    -       SSLCertificateKeyFile /chemin vers/server.key
    -       
    +
    SSLCertificateFile    "/path/to/this/server.crt"
    +SSLCertificateKeyFile "/path/to/this/server.key"
    + Le fichier server.csr n'est plus ncessaire.
  • @@ -376,10 +376,11 @@ certification (CA) ?
    $ openssl genrsa -des3 -out server.key 2048

    - Sauvegardez le fichier host.key et le mot de passe + Sauvegardez le fichier server.key et le mot de passe ventuellement dfini en lieu sr. Vous pouvez afficher les dtails de cette cl prive RSA l'aide de la commande :
    +
    $ openssl rsa -noout -text -in server.key

    Si ncessaire, vous pouvez aussi crer une version PEM non chiffre @@ -392,7 +393,7 @@ certification (CA) ? que vous venez de gnrer (la sortie sera au format PEM) :

    $ openssl req -new -x509 -nodes -sha1 -days 365 - -key server.key -out server.crt
    + -key server.key -out server.crt -extensions usr_cert

    Cette commande signe le certificat du serveur et produit un fichier server.crt. Vous pouvez afficher les dtails de ce @@ -557,6 +558,10 @@ et mot de passe sont envoy
  • Pourquoi des erreurs d'entre/sortie apparaissent-elles lorsqu'on se connecte un serveur Apache+mod_ssl avec Microsoft Internet Explorer (MSIE) ?
  • +
  • Comment activer TLS-SRP ?
  • +
  • Pourquoi des erreurs de ngociation apparaissent +avec les clients bass sur Java lorsqu'on utilise un certificat de plus +de 1024 bits ?
  • Pourquoi de nombreuses et alatoires erreurs de @@ -642,7 +647,7 @@ l'oeuf ou de la poule. La couche du protocole SSL se trouve en dessous de la couche de protocole HTTP qu'elle encapsule. Lors de l'tablissement d'une connexion SSL (HTTPS), Apache/mod_ssl doit ngocier les paramtres du protocole SSL avec le client. Pour cela, mod_ssl doit consulter la -configuration du serveur virtuel (par exemple, il doit accder la la suite +configuration du serveur virtuel (par exemple, il doit accder la suite d'algorithmes de chiffrement, au certificat du serveur, etc...). Mais afin de slectionner le bon serveur virtuel, Apache doit connatre le contenu du champ d'en-tte HTTP Host. Pour cela, il doit lire l'en-tte de la @@ -651,6 +656,11 @@ termin dans l'en-tte de la requte. Voir la question suivante pour contourner ce problme.

    +

    Notez que si votre certificat comporte un nom de serveur avec + caractres gnriques, ou des noms de serveurs multiples dans le + champ subjectAltName, vous pouvez utiliser SSL avec les serveurs + virtuels base de noms sans avoir contourner ce problme.

    +

    Est-il possible d'utiliser l'hbergement virtuel bas sur le nom d'hte @@ -671,6 +681,11 @@ pour diff seules les rvisions les plus rcentes de la spcification SSL supportent.

    +

    Notez que si votre certificat comporte un nom de serveur avec + caractres gnriques, ou des noms de serveurs multiples dans le + champ subjectAltName, vous pouvez utiliser SSL avec les serveurs + virtuels base de noms sans avoir contourner ce problme.

    +

    La raison en est que le protocole SSL constitue une couche spare qui encapsule le protocole HTTP. Aini, la session SSL ncessite une transaction spare qui prend place avant que la session HTTP n'ait dbut. @@ -693,9 +708,8 @@ pour diff (sur le port 443). Mais dans ce cas, vous devez dfinir le numro de port non-SSL l'aide de la directive NameVirtualHost dans ce style :

    -

    - NameVirtualHost 192.168.1.1:80 -

    +
    NameVirtualHost 192.168.1.1:80
    +

    il existe d'autres solutions alternatives comme :

    @@ -752,11 +766,10 @@ versions de MSIE. Vous pouvez contourner ces probl ou l'envoi de messages de notification de fermeture de session SSL aux clients MSIE. Pour cela, vous pouvez utiliser la directive suivante dans votre section d'hte virtuel avec support SSL :

    -

    - SetEnvIf User-Agent "MSIE [2-5]" \
    - nokeepalive ssl-unclean-shutdown \
    - downgrade-1.0 force-response-1.0 -

    +
    SetEnvIf User-Agent "MSIE [2-5]" \
    +         nokeepalive ssl-unclean-shutdown \
    +         downgrade-1.0 force-response-1.0
    +

    En outre, certaines versions de MSIE ont des problmes avec des algorithmes de chiffrement particuliers. Hlas, il n'est pas possible d'apporter une solution spcifique MSIE pour ces @@ -772,6 +785,67 @@ dans votre section d'h +

    Comment activer TLS-SRP ?

    +

    Le protocole TLS-SRP (Echange de cls scuris par mot de passe + pour TLS comme spcifi dans la RFC 5054) peut complter ou mme + remplacer les certificats lors du processus d'authentification des + connexions SSL. Pour utiliser TLS-SRP, spcifiez un fichier de + vrification SRP OpenSSL via la directive SSLSRPVerifierFile. Vous pouvez crer + le fichier de vrification via l'utilitaire openssl :

    +

    + openssl srp -srpvfile passwd.srpv -add username +

    +

    Une fois ce fichier cr, vous devez le rfrencer dans la + configuration du serveur SSL :

    +

    + SSLSRPVerifierFile /path/to/passwd.srpv +

    +

    Pour forcer les clients utiliser des algorithmes de chiffrement + bass sur TLS-SRP et s'affranchissant des certificats, utilisez la + directive suivante :

    +

    + SSLCipherSuite "!DSS:!aRSA:SRP" +

    + + +

    Pourquoi des erreurs de ngociation apparaissent +avec les clients bass sur Java lorsqu'on utilise un certificat de plus +de 1024 bits ?

    +

    Depuis la version 2.4.7, + mod_ssl utilise des paramtres DH qui comportent + des nombres premiers de plus de 1024 bits. Cependant, java 7 et ses versions + antrieures ne supportent que les nombres premiers DH d'une longueur + maximale de 1024 bits.

    + +

    Si votre client bas sur Java s'arrte avec une exception telle + que java.lang.RuntimeException: Could not generate DH + keypair et + java.security.InvalidAlgorithmParameterException: Prime size + must be multiple of 64, and can only range from 512 to 1024 + (inclusive), et si httpd enregistre le message tlsv1 + alert internal error (SSL alert number 80) dans son journal + des erreurs (avec un LogLevel + info ou suprieur), vous pouvez soit rarranger la + liste d'algorithmes de mod_ssl via la directive SSLCipherSuite (ventuellement en + conjonction avec la directive SSLHonorCipherOrder), soit utiliser des + paramtres DH personnaliss avec un nombre + premier de 1024 bits, paramtres qui seront toujours prioritaires + par rapport tout autre paramtre DH par dfaut.

    + +

    Pour gnrer des paramtres DH personnaliss, utilisez la + commande openssl dhparam 1024. Vous pouvez aussi + utiliser les + paramtres DH standards issus de la RFC 2409, section 6.2 :

    +
    -----BEGIN DH PARAMETERS-----
    +MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR
    +Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL
    +/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC
    +-----END DH PARAMETERS-----
    +

    Ajoute les paramtres personnaliss incluant les lignes "BEGIN DH + PARAMETERS" et "END DH PARAMETERS" la fin du premier fichier de + certificat dfini via la directive SSLCertificateFile.

    + +

    top

    Support de mod_ssl

    @@ -797,8 +871,8 @@ ici en cas de probl
    Vous trouverez des rponses dans la Foire Aux Questions du manuel utilisateur (ce document)
    -
    - http://httpd.apache.org/docs/trunk/ssl/ssl_faq.html
    +
    + http://httpd.apache.org/docs/2.4/ssl/ssl_faq.html
    Cherchez tout d'abord dans la foire aux questions (ce document). Si votre question est courante, on a dj d y rpondre de nombreuses fois, et elle fait probablement partie @@ -935,7 +1009,28 @@ d'obtenir une journalisation des

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_faq.xml b/docs/manual/ssl/ssl_faq.xml index 8fa2ce3bbec..0b6d8d82aa6 100644 --- a/docs/manual/ssl/ssl_faq.xml +++ b/docs/manual/ssl/ssl_faq.xml @@ -51,7 +51,7 @@ generate temporary 512 bit RSA private key" when I start Apache? Make sure that all parent directories (here /opt, /opt/apache and /opt/apache/logs) have the x-bit set for, at minimum, the UID under which Apache's children are running (see - the User directive).

    + the User directive).

    Why does mod_ssl stop with the error @@ -172,11 +172,11 @@ relative hyperlinks?</a></li> fully-qualified hyperlinks (because you have to change the URL scheme). Using <module>mod_rewrite</module> however, you can manipulate relative hyperlinks, to achieve the same effect.</p> - <example> - RewriteEngine on<br /> - RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L]<br /> - RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] - </example> + <highlight language="config"> +RewriteEngine on +RewriteRule "^/(.*)_SSL$" "https://%{SERVER_NAME}/$1" [R,L] +RewriteRule "^/(.*)_NOSSL$" "http://%{SERVER_NAME}/$1" [R,L] + </highlight> <p>This rewrite ruleset lets you use hyperlinks of the form <code><a href="document.html_SSL"></code>, to switch to HTTPS @@ -202,8 +202,6 @@ key file?</a></li> dialog at Apache startup time?</a></li> <li><a href="#verify">How do I verify that a private key matches its Certificate?</a></li> -<li><a href="#badcert">Why do connections fail with an "alert bad -certificate" error?</a></li> <li><a href="#pemder">How can I convert a certificate from PEM to DER format?</a></li> <li><a href="#gid">Why do browsers complain that they cannot @@ -255,10 +253,10 @@ Certificate for testing purposes? -keyout server.key
    These can be used as follows in your httpd.conf file: -
    -             SSLCertificateFile    /path/to/this/server.crt
    -             SSLCertificateKeyFile /path/to/this/server.key
    -        
    + +SSLCertificateFile "/path/to/this/server.crt" +SSLCertificateKeyFile "/path/to/this/server.key" +
  • It is important that you are aware that this server.key does not have any passphrase. @@ -335,10 +333,10 @@ Certificate for testing purposes?
  • You should now have two files: server.key and server.crt. These can be used as follows in your httpd.conf file: -
    -       SSLCertificateFile    /path/to/this/server.crt
    -       SSLCertificateKeyFile /path/to/this/server.key
    -       
    + +SSLCertificateFile "/path/to/this/server.crt" +SSLCertificateKeyFile "/path/to/this/server.key" + The server.csr file is no longer needed.
  • @@ -349,7 +347,7 @@ Certificate for testing purposes?

    The short answer is to use the CA.sh or CA.pl script provided by OpenSSL. Unless you have a good reason not to, you should use these for preference. If you cannot, you can create a - self-signed Certificate as follows:

    + self-signed certificate as follows:

    1. Create a RSA private key for your server @@ -357,10 +355,11 @@ Certificate for testing purposes?
      $ openssl genrsa -des3 -out server.key 2048

      - Please backup this host.key file and the + Please backup this server.key file and the pass-phrase you entered in a secure location. You can see the details of this RSA private key by using the command:
      +
      $ openssl rsa -noout -text -in server.key

      If necessary, you can also create a decrypted PEM version (not @@ -369,11 +368,11 @@ Certificate for testing purposes? $ openssl rsa -in server.key -out server.key.unsecure

    2. -
    3. Create a self-signed Certificate (X509 structure) +
    4. Create a self-signed certificate (X509 structure) with the RSA key you just created (output will be PEM formatted):

      $ openssl req -new -x509 -nodes -sha1 -days 365 - -key server.key -out server.crt
      + -key server.key -out server.crt -extensions usr_cert

      This signs the server CSR and results in a server.crt file.
      You can see the details of this Certificate using:
      @@ -521,6 +520,8 @@ Does this mean the username/password is being sent unencrypted?
    5. Why do I get I/O errors when connecting via HTTPS to an Apache+mod_ssl server with Microsoft Internet Explorer (MSIE)?
    6. +
    7. How do I enable TLS-SRP?
    8. +
    9. Why do I get handshake failures with Java-based clients when using a certificate with more than 1024 bits?
    10. Why do I get lots of random SSL protocol @@ -607,6 +608,11 @@ error when connecting to my newly installed server? handshake is finished, but the information is needed in order to complete the SSL handshake phase. See the next question for how to circumvent this issue.

      + +

      Note that if you have a wildcard SSL certificate, or a + certificate that has multiple hostnames on it using subjectAltName + fields, you can use SSL on name-based virtual hosts without further + workarounds.

      Is it possible to use Name-Based @@ -622,6 +628,11 @@ Virtual Hosting to identify different SSL virtual hosts? feature that only the most recent revisions of the SSL specification added, called Server Name Indication (SNI).

      +

      Note that if you have a wildcard SSL certificate, or a + certificate that has multiple hostnames on it using subjectAltName + fields, you can use SSL on name-based virtual hosts without further + workarounds.

      +

      The reason is that the SSL protocol is a separate layer which encapsulates the HTTP protocol. So the SSL session is a separate transaction, that takes place before the HTTP session has begun. @@ -642,9 +653,9 @@ Virtual Hosting to identify different SSL virtual hosts? you must make sure to put the non-SSL port number on the NameVirtualHost directive, e.g.

      - + NameVirtualHost 192.168.1.1:80 - +

      Other workaround solutions include:

      @@ -660,7 +671,7 @@ a negotiable standard compression method.

      OpenSSL 0.9.8 started to support this by default when compiled with the zlib option. If both the client and the server support compression, it will be used. However, most clients still try to initially connect with an -SSLv2 Hello. As SSLv2 did not include an array of prefered compression algorithms +SSLv2 Hello. As SSLv2 did not include an array of preferred compression algorithms in its handshake, compression cannot be negotiated with these clients. If the client disables support for SSLv2, either an SSLv3 or TLS Hello may be sent, depending on which SSL library is used, and compression may @@ -694,11 +705,11 @@ Explorer (MSIE)? keep-alive connections or send the SSL close notify messages to MSIE clients. This can be done by using the following directive in your SSL-aware virtual host section:

      - - SetEnvIf User-Agent "MSIE [2-5]" \
      - nokeepalive ssl-unclean-shutdown \
      - downgrade-1.0 force-response-1.0 -
      + +SetEnvIf User-Agent "MSIE [2-5]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 +

      Further, some MSIE versions have problems with particular ciphers. Unfortunately, it is not possible to implement a MSIE-specific workaround for this, because the ciphers are needed as early as the @@ -711,6 +722,60 @@ Explorer (MSIE)? or otherwise.

      +
      How do I enable TLS-SRP? +

      TLS-SRP (Secure Remote Password key exchange for TLS, specified in RFC 5054) + can supplement or replace certificates in authenticating an SSL connection. + To use TLS-SRP, set the + SSLSRPVerifierFile directive to + point to an OpenSSL SRP verifier file. To create the verifier file, use the + openssl tool:

      + + openssl srp -srpvfile passwd.srpv -add username + +

      After creating this file, specify it in the SSL server configuration:

      + + SSLSRPVerifierFile /path/to/passwd.srpv + +

      To force clients to use non-certificate TLS-SRP cipher suites, use the + following directive:

      + + SSLCipherSuite "!DSS:!aRSA:SRP" + +
      + +
      Why do I get handshake failures with Java-based clients when using a certificate with more than 1024 bits? +

      Beginning with version 2.4.7, + mod_ssl will use DH parameters which include primes + with lengths of more than 1024 bits. Java 7 and earlier limit their + support for DH prime sizes to a maximum of 1024 bits, however.

      + +

      If your Java-based client aborts with exceptions such as + java.lang.RuntimeException: Could not generate DH keypair and + java.security.InvalidAlgorithmParameterException: Prime size must be + multiple of 64, and can only range from 512 to 1024 (inclusive), + and httpd logs tlsv1 alert internal error (SSL alert number 80) + (at LogLevel info + or higher), you can either rearrange mod_ssl's cipher list with + SSLCipherSuite + (possibly in conjunction with SSLHonorCipherOrder), + or you can use custom DH parameters with a 1024-bit prime, which + will always have precedence over any of the built-in DH parameters.

      + +

      To generate custom DH parameters, use the openssl dhparam 1024 + command. Alternatively, you can use the following standard 1024-bit DH + parameters from RFC 2409, + section 6.2:

      +
      -----BEGIN DH PARAMETERS-----
      +MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR
      +Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL
      +/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC
      +-----END DH PARAMETERS-----
      +

      Add the custom parameters including the "BEGIN DH PARAMETERS" and + "END DH PARAMETERS" lines to the end of the first certificate file + you have configured using the + SSLCertificateFile directive.

      +
      +
    diff --git a/docs/manual/ssl/ssl_faq.xml.fr b/docs/manual/ssl/ssl_faq.xml.fr index c6cca1a371f..31c58eaba44 100644 --- a/docs/manual/ssl/ssl_faq.xml.fr +++ b/docs/manual/ssl/ssl_faq.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -54,7 +54,7 @@ erreurs de permission en rapport avec SSLMutex ? parents (ici /opt, /opt/apache et /opt/apache/logs) ont le bit x positionné au moins pour l'UID sous lequel les processus enfants d'Apache s'exécutent (voir la - directive User).

    + directive User).

    Pourquoi mod_ssl s'arrête-t-il avec l'erreur @@ -185,11 +185,11 @@ HTTPS dans les hyperliens relatifs ? hyperliens pleinement qualifiés (car vous devez modifier le schéma de l'URL). Cependant, à l'aide du module mod_rewrite, vous pouvez manipuler des hyperliens relatifs, pour obtenir le même effet.

    - - RewriteEngine on
    - RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L]
    - RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] -
    + +RewriteEngine on +RewriteRule "^/(.*)_SSL$" "https://%{SERVER_NAME}/$1" [R,L] +RewriteRule "^/(.*)_NOSSL$" "http://%{SERVER_NAME}/$1" [R,L] +

    Ce jeu de règles rewrite vous permet d'utiliser des hyperliens de la forme <a href="document.html_SSL"> pour passer en HTTPS @@ -215,8 +215,6 @@ de ma clé privée ? mot de passe ?

  • Comment vérifier si une clé privée correspond bien à son certificat ?
  • -
  • Pour quelle raison une connexion échoue-t-elle avec -l'erreur "alert bad certificate" ?
  • Comment convertir un certificat du format PEM au format DER ?
  • Pourquoi les navigateurs se plaignent-ils de ne pas pouvoir @@ -271,10 +269,10 @@ fins de test ? -keyout server.key
    Ces fichiers seront utilisés comme suit dans votre httpd.conf : -
    -             SSLCertificateFile    /chemin/vers/server.crt
    -             SSLCertificateKeyFile /chemin/vers/server.key
    -	
    + +SSLCertificateFile "/path/to/this/server.crt" +SSLCertificateKeyFile "/path/to/this/server.key" +
  • Il est important de savoir que le fichier server.key n'a pas de mot de passe. Pour ajouter un mot de passe à la clé, vous @@ -354,10 +352,10 @@ fins de test ?
  • Vous devez maintenant disposer de deux fichiers : server.key et server.crt. Ils sont précisés dans votre fichier httpd.conf comme suit : -
    -       SSLCertificateFile    /chemin/vers/server.crt
    -       SSLCertificateKeyFile /chemin vers/server.key
    -       
    + +SSLCertificateFile "/path/to/this/server.crt" +SSLCertificateKeyFile "/path/to/this/server.key" + Le fichier server.csr n'est plus nécessaire.
  • @@ -378,10 +376,11 @@ certification (CA) ?
    $ openssl genrsa -des3 -out server.key 2048

    - Sauvegardez le fichier host.key et le mot de passe + Sauvegardez le fichier server.key et le mot de passe éventuellement défini en lieu sûr. Vous pouvez afficher les détails de cette clé privée RSA à l'aide de la commande :
    +
    $ openssl rsa -noout -text -in server.key

    Si nécessaire, vous pouvez aussi créer une version PEM non chiffrée @@ -394,7 +393,7 @@ certification (CA) ? que vous venez de générer (la sortie sera au format PEM) :

    $ openssl req -new -x509 -nodes -sha1 -days 365 - -key server.key -out server.crt
    + -key server.key -out server.crt -extensions usr_cert

    Cette commande signe le certificat du serveur et produit un fichier server.crt. Vous pouvez afficher les détails de ce @@ -561,6 +560,10 @@ et mot de passe sont envoyés en clair ?
  • Pourquoi des erreurs d'entrée/sortie apparaissent-elles lorsqu'on se connecte à un serveur Apache+mod_ssl avec Microsoft Internet Explorer (MSIE) ?
  • +
  • Comment activer TLS-SRP ?
  • +
  • Pourquoi des erreurs de négociation apparaissent +avec les clients basés sur Java lorsqu'on utilise un certificat de plus +de 1024 bits ?
  • Pourquoi de nombreuses et aléatoires erreurs de @@ -646,7 +649,7 @@ l'oeuf ou de la poule. La couche du protocole SSL se trouve en dessous de la couche de protocole HTTP qu'elle encapsule. Lors de l'établissement d'une connexion SSL (HTTPS), Apache/mod_ssl doit négocier les paramètres du protocole SSL avec le client. Pour cela, mod_ssl doit consulter la -configuration du serveur virtuel (par exemple, il doit accéder à la la suite +configuration du serveur virtuel (par exemple, il doit accéder à la suite d'algorithmes de chiffrement, au certificat du serveur, etc...). Mais afin de sélectionner le bon serveur virtuel, Apache doit connaître le contenu du champ d'en-tête HTTP <code>Host</code>. Pour cela, il doit lire l'en-tête de la @@ -654,6 +657,11 @@ requête HTTP. Mais il ne peut le faire tant que la négociation SSL terminée, or, la phase de négociation SSL a besoin du nom d'hôte contenu dans l'en-tête de la requête. Voir la question suivante pour contourner ce problème.</p> + + <p>Notez que si votre certificat comporte un nom de serveur avec + caractères génériques, ou des noms de serveurs multiples dans le + champ subjectAltName, vous pouvez utiliser SSL avec les serveurs + virtuels à base de noms sans avoir à contourner ce problème.</p> </section> <section id="vhosts2"><title>Est-il possible d'utiliser @@ -675,6 +683,11 @@ pour différencier plusieurs hôtes virtuels ? seules les révisions les plus récentes de la spécification SSL supportent.

    +

    Notez que si votre certificat comporte un nom de serveur avec + caractères génériques, ou des noms de serveurs multiples dans le + champ subjectAltName, vous pouvez utiliser SSL avec les serveurs + virtuels à base de noms sans avoir à contourner ce problème.

    +

    La raison en est que le protocole SSL constitue une couche séparée qui encapsule le protocole HTTP. Aini, la session SSL nécessite une transaction séparée qui prend place avant que la session HTTP n'ait débuté. @@ -697,9 +710,9 @@ pour différencier plusieurs hôtes virtuels ? (sur le port 443). Mais dans ce cas, vous devez définir le numéro de port non-SSL à l'aide de la directive NameVirtualHost dans ce style :

    - + NameVirtualHost 192.168.1.1:80 - +

    il existe d'autres solutions alternatives comme :

    @@ -756,11 +769,11 @@ versions de MSIE. Vous pouvez contourner ces problèmes en interdisant ou l'envoi de messages de notification de fermeture de session SSL aux clients MSIE. Pour cela, vous pouvez utiliser la directive suivante dans votre section d'hôte virtuel avec support SSL :

    - - SetEnvIf User-Agent "MSIE [2-5]" \
    - nokeepalive ssl-unclean-shutdown \
    - downgrade-1.0 force-response-1.0 -
    + +SetEnvIf User-Agent "MSIE [2-5]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 +

    En outre, certaines versions de MSIE ont des problèmes avec des algorithmes de chiffrement particuliers. Hélas, il n'est pas possible d'apporter une solution spécifique à MSIE pour ces @@ -776,6 +789,72 @@ dans votre section d'hôte virtuel avec support SSL :

    +
    Comment activer TLS-SRP ? +

    Le protocole TLS-SRP (Echange de clés sécurisé par mot de passe + pour TLS comme spécifié dans la RFC 5054) peut compléter ou même + remplacer les certificats lors du processus d'authentification des + connexions SSL. Pour utiliser TLS-SRP, spécifiez un fichier de + vérification SRP OpenSSL via la directive SSLSRPVerifierFile. Vous pouvez créer + le fichier de vérification via l'utilitaire openssl :

    + + openssl srp -srpvfile passwd.srpv -add username + +

    Une fois ce fichier créé, vous devez le référencer dans la + configuration du serveur SSL :

    + + SSLSRPVerifierFile /path/to/passwd.srpv + +

    Pour forcer les clients à utiliser des algorithmes de chiffrement + basés sur TLS-SRP et s'affranchissant des certificats, utilisez la + directive suivante :

    + + SSLCipherSuite "!DSS:!aRSA:SRP" + +
    + +
    Pourquoi des erreurs de négociation apparaissent +avec les clients basés sur Java lorsqu'on utilise un certificat de plus +de 1024 bits ? +

    Depuis la version 2.4.7, + mod_ssl utilise des paramètres DH qui comportent + des nombres premiers de plus de 1024 bits. Cependant, java 7 et ses versions + antérieures ne supportent que les nombres premiers DH d'une longueur + maximale de 1024 bits.

    + +

    Si votre client basé sur Java s'arrête avec une exception telle + que java.lang.RuntimeException: Could not generate DH + keypair et + java.security.InvalidAlgorithmParameterException: Prime size + must be multiple of 64, and can only range from 512 to 1024 + (inclusive), et si httpd enregistre le message tlsv1 + alert internal error (SSL alert number 80) dans son journal + des erreurs (avec un LogLevel + info ou supérieur), vous pouvez soit réarranger la + liste d'algorithmes de mod_ssl via la directive SSLCipherSuite (éventuellement en + conjonction avec la directive SSLHonorCipherOrder), soit utiliser des + paramètres DH personnalisés avec un nombre + premier de 1024 bits, paramètres qui seront toujours prioritaires + par rapport à tout autre paramètre DH par défaut.

    + +

    Pour générer des paramètres DH personnalisés, utilisez la + commande openssl dhparam 1024. Vous pouvez aussi + utiliser les + paramètres DH standards issus de la RFC 2409, section 6.2 :

    +
    -----BEGIN DH PARAMETERS-----
    +MIGHAoGBAP//////////yQ/aoiFowjTExmKLgNwc0SkCTgiKZ8x0Agu+pjsTmyJR
    +Sgh5jjQE3e+VGbPNOkMbMCsKbfJfFDdP4TVtbVHCReSFtXZiXn7G9ExC6aY37WsL
    +/1y29Aa37e44a/taiZ+lrp8kEXxLH+ZJKGZR7OZTgf//////////AgEC
    +-----END DH PARAMETERS-----
    +

    Ajoute les paramètres personnalisés incluant les lignes "BEGIN DH + PARAMETERS" et "END DH PARAMETERS" à la fin du premier fichier de + certificat défini via la directive SSLCertificateFile.

    +
    +
    diff --git a/docs/manual/ssl/ssl_howto.html.en b/docs/manual/ssl/ssl_howto.html.en index 32c891ed346..aa8bb6a4c4b 100644 --- a/docs/manual/ssl/ssl_howto.html.en +++ b/docs/manual/ssl/ssl_howto.html.en @@ -1,57 +1,62 @@ - -SSL/TLS Strong Encryption: How-To - Apache HTTP Server +SSL/TLS Strong Encryption: How-To - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    SSL/TLS Strong Encryption: How-To

    +Apache > HTTP Server > Documentation > Version 2.4 > SSL/TLS

    SSL/TLS Strong Encryption: How-To

    Available Languages:  en  |  fr 

    -

    This documented is intended to get you started, and get a few things +

    This document is intended to get you started, and get a few things working. You are strongly encouraged to read the rest of the SSL documentation, and arrive at a deeper understanding of the material, before progressing to the advanced techniques.

    +

    See also

    top

    Basic Configuration Example

    -

    Your SSL configuration will need to contain, at a minumum, the +

    Your SSL configuration will need to contain, at minimum, the following directives.

    -

    - Listen 443
    - <VirtualHost *:443>
    - - ServerName www.example.com
    - SSLEngine on
    - SSLCertificateFile /path/to/www.example.com.cert
    - SSLCertificateKeyFile /path/to/www.example.com.key
    -
    - </VirtualHost> -

    +
    LoadModule ssl_module modules/mod_ssl.so
    +
    +Listen 443
    +<VirtualHost *:443>
    +    ServerName www.example.com
    +    SSLEngine on
    +    SSLCertificateFile "/path/to/www.example.com.cert"
    +    SSLCertificateKeyFile "/path/to/www.example.com.key"
    +</VirtualHost>
    +
    top
    @@ -67,21 +72,16 @@ requires a strong cipher for access to a particular URL? only?

    The following enables only the strongest ciphers:

    -

    httpd.conf

    - SSLProtocol all -SSLv2
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    -

    +
    SSLCipherSuite HIGH:!aNULL:!MD5
    + -

    While with the following configuration you enable two ciphers - which are resonably secure, and fast:

    +

    While with the following configuration you specify a preference + for specific speed-optimized ciphers (which will be selected by + mod_ssl, provided that they are supported by the client):

    -

    httpd.conf

    - SSLProtocol all -SSLv2
    - SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!EXP:!MD5:!NULL
    - SSLHonorCipherOrder on -

    +
    SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5
    +SSLHonorCipherOrder on
    -

    This strongly reflects the default value of SSLCipherSuite and is the recommanded way to configure it.

    How can I create an SSL server which accepts all types of ciphers @@ -94,16 +94,157 @@ URL?

    blocks, to give a per-directory solution, and can automatically force a renegotiation of the SSL parameters to meet the new configuration. This can be done as follows:

    -

    - # be liberal in general
    - SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    -
    - <Location /strong/area>
    - # but https://hostname/strong/area/ and below
    - # requires strong ciphers
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    - </Location> -

    +
    # be liberal in general
    +SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL
    +
    +<Location "/strong/area">
    +# but https://hostname/strong/area/ and below
    +# requires strong ciphers
    +SSLCipherSuite HIGH:!aNULL:!MD5
    +</Location>
    + + +
    top
    +
    +

    OCSP Stapling

    + + +

    The Online Certificate Status Protocol (OCSP) is a mechanism for +determining whether or not a server certificate has been revoked, and OCSP +Stapling is a special form of this in which the server, such as httpd and +mod_ssl, maintains current OCSP responses for its certificates and sends +them to clients which communicate with the server. Most certificates +contain the address of an OCSP responder maintained by the issuing +Certificate Authority, and mod_ssl can communicate with that responder to +obtain a signed response that can be sent to clients communicating with +the server.

    + +

    Because the client can obtain the certificate revocation status from +the server, without requiring an extra connection from the client to the +Certificate Authority, OCSP Stapling is the preferred way for the +revocation status to be obtained. Other benefits of eliminating the +communication between clients and the Certificate Authority are that the +client browsing history is not exposed to the Certificate Authority and +obtaining status is more reliable by not depending on potentially heavily +loaded Certificate Authority servers.

    + +

    Because the response obtained by the server can be reused for all clients +using the same certificate during the time that the response is valid, the +overhead for the server is minimal.

    + +

    Once general SSL support has been configured properly, enabling OCSP +Stapling generally requires only very minor modifications to the httpd +configuration — the addition of these two directives:

    + +
    SSLUseStapling On
    +SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
    + + +

    These directives are placed at global scope (i.e., not within a virtual +host definition) wherever other global SSL configuration directives are +placed, such as in conf/extra/httpd-ssl.conf for normal +open source builds of httpd, /etc/apache2/mods-enabled/ssl.conf +for the Ubuntu or Debian-bundled httpd, etc.

    + +

    The path on the SSLStaplingCache directive +(e.g., logs/) should match the one on the +SSLSessionCache directive. This path is relative +to ServerRoot.

    + +

    This particular SSLStaplingCache directive requires +mod_socache_shmcb (from the shmcb prefix on the +directive's argument). This module is usually enabled already for +SSLSessionCache or on behalf of some module other than +mod_ssl. If you enabled an SSL session cache using a +mechanism other than mod_socache_shmcb, use that alternative +mechanism for SSLStaplingCache as well. For example:

    + +
    SSLSessionCache "dbm:logs/ssl_scache"
    +SSLStaplingCache "dbm:logs/ssl_stapling"
    + + +

    You can use the openssl command-line program to verify that an OCSP response +is sent by your server:

    + +
    $ openssl s_client -connect www.example.com:443 -status -servername www.example.com
    +...
    +OCSP response: 
    +======================================
    +OCSP Response Data:
    +    OCSP Response Status: successful (0x0)
    +    Response Type: Basic OCSP Response
    +...
    +    Cert Status: Good
    +...
    + +

    The following sections highlight the most common situations which require +further modification to the configuration. Refer also to the +mod_ssl reference manual.

    + +

    If more than a few SSL certificates are used for the server

    + +

    OCSP responses are stored in the SSL stapling cache. While the responses +are typically a few hundred to a few thousand bytes in size, mod_ssl +supports OCSP responses up to around 10K bytes in size. With more than a +few certificates, the stapling cache size (32768 bytes in the example above) +may need to be increased. Error message AH01929 will be logged in case of +an error storing a response.

    + + +

    If the certificate does not point to an OCSP responder, or if a +different address must be used

    + +

    Refer to the +SSLStaplingForceURL directive.

    + +

    You can confirm that a server certificate points to an OCSP responder +using the openssl command-line program, as follows:

    + +
    $ openssl x509 -in ./www.example.com.crt -text | grep 'OCSP.*http'
    +OCSP - URI:http://ocsp.example.com
    + +

    If the OCSP URI is provided and the web server can communicate to it +directly without using a proxy, no configuration is required. Note that +firewall rules that control outbound connections from the web server may +need to be adjusted.

    + +

    If no OCSP URI is provided, contact your Certificate Authority to +determine if one is available; if so, configure it with +SSLStaplingForceURL in the virtual +host that uses the certificate.

    + + +

    If multiple SSL-enabled virtual hosts are configured and OCSP +Stapling should be disabled for some

    + + +

    Add SSLUseStapling Off to the virtual hosts for which OCSP +Stapling should be disabled.

    + + +

    If the OCSP responder is slow or unreliable

    + +

    Several directives are available to handle timeouts and errors. Refer +to the documentation for the +SSLStaplingFakeTryLater, +SSLStaplingResponderTimeout, and +SSLStaplingReturnResponderErrors +directives.

    + + +

    If mod_ssl logs error AH02217

    + +
    AH02217: ssl_stapling_init_cert: Can't retrieve issuer certificate!
    +

    In order to support OCSP Stapling when a particular server certificate is +used, the certificate chain for that certificate must be configured. If it +was not configured as part of enabling SSL, the AH02217 error will be issued +when stapling is enabled, and an OCSP response will not be provided for clients +using the certificate.

    + +

    Refer to the SSLCertificateChainFile +and SSLCertificateFile for instructions +for configuring the certificate chain.

    +
    top
    @@ -128,13 +269,12 @@ Intranet website, for clients coming from the Internet? need to do is to create client certificates signed by your own CA certificate (ca.crt) and then verify the clients against this certificate.

    -

    httpd.conf

    - # require a client certificate which has to be directly
    - # signed by our CA certificate in ca.crt
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - SSLCACertificateFile conf/ssl.crt/ca.crt -

    +
    # require a client certificate which has to be directly
    +# signed by our CA certificate in ca.crt
    +SSLVerifyClient require
    +SSLVerifyDepth 1
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +

    How can I force clients to authenticate using certificates for a @@ -145,15 +285,14 @@ Intranet website, for clients coming from the Internet? you can use the per-directory reconfiguration features of mod_ssl:

    -

    httpd.conf

    - SSLVerifyClient none
    - SSLCACertificateFile conf/ssl.crt/ca.crt
    -
    - <Location /secure/area>
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - </Location>
    -

    +
    SSLVerifyClient none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +
    +<Location "/secure/area">
    +SSLVerifyClient require
    +SSLVerifyDepth 1
    +</Location>
    +

    How can I allow only clients who have certificates to access a @@ -172,29 +311,28 @@ Intranet website, for clients coming from the Internet? you should establish a password database containing all clients allowed, as follows:

    -

    httpd.conf

    -SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    -
    -SSLVerifyClient      require
    -SSLVerifyDepth       5
    -SSLCACertificateFile conf/ssl.crt/ca.crt
    -SSLCACertificatePath conf/ssl.crt
    -SSLOptions           +FakeBasicAuth
    -SSLRequireSSL
    -AuthName             "Snake Oil Authentication"
    -AuthType             Basic
    -AuthBasicProvider    file
    -AuthUserFile         /usr/local/apache2/conf/httpd.passwd
    -Require              valid-user
    -</Directory>
    +
    SSLVerifyClient      none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
    +
    +<Directory "/usr/local/apache2/htdocs/secure/area">
    +    SSLVerifyClient      require
    +    SSLVerifyDepth       5
    +    SSLOptions           +FakeBasicAuth
    +    SSLRequireSSL
    +    AuthName             "Snake Oil Authentication"
    +    AuthType             Basic
    +    AuthBasicProvider    file
    +    AuthUserFile         "/usr/local/apache2/conf/httpd.passwd"
    +    Require              valid-user
    +</Directory>
    +

    The password used in this example is the DES encrypted string "password". See the SSLOptions docs for more information.

    -

    httpd.passwd

    -/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA
    +    

    httpd.passwd

    /C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA
     /C=US/L=S.F./O=Snake Oil, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA
     /C=US/L=L.A./O=Snake Oil, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVA
    @@ -202,19 +340,19 @@ Require valid-user into the DN, you can match them more easily using SSLRequire, as follows:

    -

    httpd.conf

    -SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +    
    SSLVerifyClient      none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
       SSLVerifyClient      require
       SSLVerifyDepth       5
    -  SSLCACertificateFile conf/ssl.crt/ca.crt
    -  SSLCACertificatePath conf/ssl.crt
       SSLOptions           +FakeBasicAuth
       SSLRequireSSL
       SSLRequire       %{SSL_CLIENT_S_DN_O}  eq "Snake Oil, Ltd." \
                    and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}
    -</Directory>
    +</Directory>
    +

    How can I require HTTPS with strong ciphers, and either basic @@ -229,49 +367,45 @@ plain HTTP access for clients on the Intranet.

    This configuration should remain outside of your HTTPS virtual host, so that it applies to both HTTPS and HTTP.

    -

    httpd.conf

    -SSLCACertificateFile conf/ssl.crt/company-ca.crt
    +    
    SSLCACertificateFile "conf/ssl.crt/company-ca.crt"
     
    -<Directory /usr/local/apache2/htdocs>
    -#   Outside the subarea only Intranet access is granted
    -Order                deny,allow
    -Deny                 from all
    -Allow                from 192.168.1.0/24
    +<Directory "/usr/local/apache2/htdocs">
    +    #   Outside the subarea only Intranet access is granted
    +    Require              ip 192.168.1.0/24
     </Directory>
     
    -<Directory /usr/local/apache2/htdocs/subarea>
    -#   Inside the subarea any Intranet access is allowed
    -#   but from the Internet only HTTPS + Strong-Cipher + Password
    -#   or the alternative HTTPS + Strong-Cipher + Client-Certificate
    -
    -#   If HTTPS is used, make sure a strong cipher is used.
    -#   Additionally allow client certs as alternative to basic auth.
    -SSLVerifyClient      optional
    -SSLVerifyDepth       1
    -SSLOptions           +FakeBasicAuth +StrictRequire
    -SSLRequire           %{SSL_CIPHER_USEKEYSIZE} >= 128
    -
    -#   Force clients from the Internet to use HTTPS
    -RewriteEngine        on
    -RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
    -RewriteCond          %{HTTPS} !=on
    -RewriteRule          . - [F]
    -
    -#   Allow Network Access and/or Basic Auth
    -Satisfy              any
    -
    -#   Network Access Control
    -Order                deny,allow
    -Deny                 from all
    -Allow                192.168.1.0/24
    -
    -#   HTTP Basic Authentication
    -AuthType             basic
    -AuthName             "Protected Intranet Area"
    -AuthBasicProvider    file
    -AuthUserFile         conf/protected.passwd
    -Require              valid-user
    -</Directory>
    +<Directory "/usr/local/apache2/htdocs/subarea"> + # Inside the subarea any Intranet access is allowed + # but from the Internet only HTTPS + Strong-Cipher + Password + # or the alternative HTTPS + Strong-Cipher + Client-Certificate + + # If HTTPS is used, make sure a strong cipher is used. + # Additionally allow client certs as alternative to basic auth. + SSLVerifyClient optional + SSLVerifyDepth 1 + SSLOptions +FakeBasicAuth +StrictRequire + SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128 + + # Force clients from the Internet to use HTTPS + RewriteEngine on + RewriteCond "%{REMOTE_ADDR}" "!^192\.168\.1\.[0-9]+$" + RewriteCond "%{HTTPS}" "!=on" + RewriteRule "." "-" [F] + + # Allow Network Access and/or Basic Auth + Satisfy any + + # Network Access Control + Require ip 192.168.1.0/24 + + # HTTP Basic Authentication + AuthType basic + AuthName "Protected Intranet Area" + AuthBasicProvider file + AuthUserFile "conf/protected.passwd" + Require valid-user +</Directory> +
    top
    @@ -288,7 +422,28 @@ Require valid-user

    Available Languages:  en  |  fr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_howto.html.fr b/docs/manual/ssl/ssl_howto.html.fr index 6b17a0b3c1f..863efe774b9 100644 --- a/docs/manual/ssl/ssl_howto.html.fr +++ b/docs/manual/ssl/ssl_howto.html.fr @@ -1,22 +1,27 @@ - -Chiffrement fort SSL/TLS : Mode d'emploi - Serveur Apache HTTP +Chiffrement fort SSL/TLS : Mode d'emploi - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +

    <-

    Chiffrement fort SSL/TLS : Mode d'emploi

    +Apache > Serveur HTTP > Documentation > Version 2.4 > SSL/TLS

    Chiffrement fort SSL/TLS : Mode d'emploi

    top

    Exemple de configuration basique

    @@ -46,17 +49,16 @@ acc

    Votre configuration SSL doit comporter au moins les directives suivantes :

    -

    - Listen 443 - <VirtualHost *:443>
    - - ServerName www.example.com
    - SSLEngine on
    - SSLCertificateFile /chemin/vers/www.example.com.cert
    - SSLCertificateKeyFile /chemin/vers/www.example.com.key
    -
    - </VirtualHost> -

    +
    LoadModule ssl_module modules/mod_ssl.so
    +
    +Listen 443
    +<VirtualHost *:443>
    +    ServerName www.example.com
    +    SSLEngine on
    +    SSLCertificateFile "/path/to/www.example.com.cert"
    +    SSLCertificateKeyFile "/path/to/www.example.com.key"
    +</VirtualHost>
    +
    top
    @@ -77,28 +79,22 @@ que le chiffrement fort ?

    Les directives suivantes ne permettent que les chiffrements de plus haut niveau :

    -

    httpd.conf

    - SSLProtocol all -SSLv2
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    -

    +
    SSLCipherSuite HIGH:!aNULL:!MD5
    +

    Avec la configuration qui suit, vous indiquez une prfrence pour + des algorityhmes de chiffrement spcifiques optimiss en matire de + rapidit (le choix final sera opr par mod_ssl, dans la mesure ou le + client les supporte) :

    -

    Avec la configuration qui suit, vous pouvez activer deux mthodes de chiffrement relativement scurises, et rapides :

    +
    SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5
    +SSLHonorCipherOrder on
    -

    httpd.conf

    - SSLProtocol all -SSLv2
    - SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!EXP:!MD5:!NULL
    - SSLHonorCipherOrder on -
    -

    -

    Ceci correspond largement la valeur par dfaut de la directive SSLCipherSuite, - et reprsente la pratique conseiller.

    -
    top
    -
    -

    Comment crer un serveur qui accepte tous les types de + + +

    Comment crer un serveur qui accepte tous les types de chiffrement en gnral, mais exige un chiffrement fort pour pouvoir -accder une URL particulire ?

    +accder une URL particulire ?

    Dans ce cas bien videmment, une directive SSLCipherSuite au niveau du serveur principal qui restreint le choix des suites de chiffrement aux versions les plus @@ -108,16 +104,165 @@ acc mod_ssl peut alors forcer automatiquement une rengociation des paramtres SSL pour parvenir au but recherch. Cette configuration peut se prsenter comme suit :

    -

    - # soyons trs tolrant a priori
    - SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    -
    - <Location /strong/area>
    - # sauf pour https://hostname/strong/area/ et ses sous-rpertoires
    - # qui exigent des chiffrements forts
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    - </Location> -

    +
    # soyons trs tolrant a priori
    +SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL
    +
    +<Location "/strong/area">
    +# sauf pour https://hostname/strong/area/ et ses sous-rpertoires
    +# qui exigent des chiffrements forts
    +SSLCipherSuite HIGH:!aNULL:!MD5
    +</Location>
    + + +
    top
    +
    +

    Agrafage OCSP

    + + +

    Le protocole de contrle du statut des certificats en ligne (Online +Certificate Status Protocol - OCSP) est un mcanisme permettant de +dterminer si un certificat a t rvoqu ou non, et l'agrafage OCSP en +est une fonctionnalit particulire par laquelle le serveur, par exemple +httpd et mod_ssl, maintient une liste des rponses OCSP actuelles pour +ses certificats et l'envoie aux clients qui communiquent avec lui. La +plupart des certificats contiennent l'adresse d'un rpondeur OCSP maintenu +par l'Autorit de Certification (CA) spcifie, et mod_ssl peut requrir +ce rpondeur pour obtenir une rponse signe qui peut tre envoye aux +clients qui communiquent avec le serveur.

    + +

    L'agrafage OCSP est la mthode la plus performante pour obtenir le +statut d'un certificat car il est disponible au niveau du serveur, et le +client n'a donc pas besoin d'ouvrir une nouvelle connexion vers +l'autorit de certification. Autres avantages de l'absence de +communication entre le client et l'autorit de certification : +l'autorit de certification n'a pas accs l'historique de navigation +du client, et l'obtention du statut du certificat est plus efficace car +elle n'est plus assujettie une surcharge ventuelle des serveurs de +l'autorit de certification.

    + +

    La charge du serveur est moindre car la rponse qu'il a obtenu du +rpondeur OCSP peut tre rutilise par tous les clients qui utilisent +le mme certificat dans la limite du temps de validit de la rponse.

    + +

    Une fois le support gnral SSL correctement configur, l'activation +de l'agrafage OCSP ne requiert que des modifications mineures + la configuration de httpd et il suffit en gnral de l'ajout de ces +deux directives :

    + +
    SSLUseStapling On
    +SSLStaplingCache "shmcb:ssl_stapling(32768)"
    + + +

    Ces directives sont places de faon ce qu'elles aient une porte +globale (et particulirement en dehors de toute section VirtualHost), le +plus souvent o sont places les autres directives de configuration +globales SSL, comme conf/extra/httpd-ssl.conf pour les +installations de httpd partir des sources, ou +/etc/apache2/mods-enabled/ssl.conf pour Ubuntu ou Debian, +etc...

    + +

    Le chemin spcifi par la directive +SSLStaplingCache (par exemple logs/) +doit tre le mme que celui spcifi par la directive +SSLSessionCache. Ce chemin est relatif au chemin +spcifi par la directive ServerRoot.

    + +

    Cette directive SSLStaplingCache particulire +ncessite le chargement du module mod_socache_shmcb ( +cause du prfixe shmcb de son argument). Ce module est en +gnral dj activ pour la directive +SSLSessionCache, ou pour des modules autres que +mod_ssl. Si vous activez un cache de session SSL +utilisant un mcanisme autre que mod_socache_shmcb, +utilisez aussi ce mcanisme alternatif pour la directive +SSLStaplingCache. Par exemple :

    + +
    SSLSessionCache "dbm:ssl_scache"
    +SSLStaplingCache "dbm:ssl_stapling"
    + + +

    Vous pouvez utiliser la commande openssl pour vrifier que votre +serveur envoie bien une rponse OCSP :

    + +
    $ openssl s_client -connect www.example.com:443 -status -servername www.example.com
    +...
    +OCSP response: 
    +======================================
    +OCSP Response Data:
    +    OCSP Response Status: successful (0x0)
    +    Response Type: Basic OCSP Response
    +...
    +    Cert Status: Good
    +...
    + +

    Les sections suivantes explicitent les situations courantes qui +requirent des modifications supplmentaires de la configuration. Vous +pouvez aussi vous rfrer au manuel de rfrence de +mod_ssl.

    + +

    Si l'on utilise plus que quelques certificats SSL pour le serveur

    + +

    Les rponses OCSP sont stockes dans le cache d'agrafage SSL. Alors +que les rponses ont une taille de quelques centaines quelques +milliers d'octets, mod_ssl supporte des rponses d'une taille jusqu' +environ 10 ko. Dans notre cas, le nombre de certificats est consquent +et la taille du cache (32768 octets dans l'exemple ci-dessus) doit tre +augmente. En cas d'erreur lors du stockage d'une rponse, le +message AH01929 sera enregistr dans le journal.

    + + +

    Si le certificat ne spcifie pas de rpondeur OCSP, ou si une +adresse diffrente doit tre utilise

    + +

    Veuillez vous rfrer la documentation de la directive SSLStaplingForceURL.

    + +

    Vous pouvez vrifier si un certificat spcifie un rpondeur OCSP en +utilisant la commande openssl comme suit :

    + +
    $ openssl x509 -in ./www.example.com.crt -text | grep 'OCSP.*http'
    +OCSP - URI:http://ocsp.example.com
    + +

    Si un URI OCSP est fourni et si le serveur web peut communiquer +directement avec lui sans passer par un mandataire, aucune modification +supplmentaire de la configuration n'est requise. Notez que les rgles +du pare-feu qui contrlent les connexions sortantes en provenance du +serveur web devront peut-tre subir quelques ajustements.

    + +

    Si aucun URI OCSP n'est fourni, contactez votre autorit de +certification pour savoir s'il en existe une ; si c'est le +cas, utilisez la directive SSLStaplingForceURL pour la spcifier dans +la configuration du serveur virtuel qui utilise le certificat.

    + + +

    Si plusieurs serveurs virtuels sont configurs pour utiliser SSL +et si l'agrafage OCSP doit tre dsactiv pour certains d'entre eux

    + + +

    Ajoutez la directive SSLUseStapling Off la +configuration des serveurs virtuels pour lesquels l'agrafage OCSP doit +tre dsactiv.

    + + +

    Si le rpondeur OCSP est lent ou instable

    + +

    De nombreuses directives permettent de grer les temps de rponse et +les erreurs. Rfrez-vous la documentation de SSLStaplingFakeTryLater, SSLStaplingResponderTimeout, et SSLStaplingReturnResponderErrors.

    + + +

    Si mod_ssl enregistre l'erreur AH02217 dans le journal

    + +
    AH02217: ssl_stapling_init_cert: Can't retrieve issuer certificate!
    +

    Afin de pouvoir supporter l'agrafage OCSP lorsqu'un certificat de +serveur particulier est utilis, une chane de certification pour ce +certificat doit tre spcifie. Si cela n'a pas t fait lors de +l'activation de SSL, l'erreur AH02217 sera enregistre lorsque +l'agrafage OCSP sera activ, et les clients qui utilisent le certificat +considr ne recevront pas de rponse OCSP.

    + +

    Veuillez vous rfrer la documentation des directives SSLCertificateChainFile et SSLCertificateFile pour spcifier une +chane de certification.

    + +
    top

    Authentification du client et contrle d'accs

    @@ -150,13 +295,12 @@ provenance de l'Internet ? le certificat de votre propre autorit de certification (ca.crt), et d'authentifier les clients l'aide de ces certificats.

    -

    httpd.conf

    - # exige un certificat client sign par le certificat de votre CA
    - # contenu dans ca.crt
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - SSLCACertificateFile conf/ssl.crt/ca.crt -

    +
    # exige un certificat client sign par le certificat de votre CA
    +# contenu dans ca.crt
    +SSLVerifyClient require
    +SSLVerifyDepth 1
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +

    Comment forcer les clients @@ -169,15 +313,14 @@ mais autoriser quand-m URL particulire, vous pouvez utiliser les fonctionnalits de reconfiguration de mod_ssl en fonction du rpertoire :

    -

    httpd.conf

    - SSLVerifyClient none
    - SSLCACertificateFile conf/ssl.crt/ca.crt
    -
    - <Location /secure/area>
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - </Location>
    -

    +
    SSLVerifyClient none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +
    +<Location "/secure/area">
    +SSLVerifyClient require
    +SSLVerifyDepth 1
    +</Location>
    +

    Comment n'autoriser l'accs une URL @@ -199,30 +342,30 @@ l'acc de donnes de mots de passe contenant tous les clients autoriss, comme suit :

    -

    httpd.conf

    -SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +    
    SSLVerifyClient      none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
     SSLVerifyClient      require
    -SSLVerifyDepth       5
    -SSLCACertificateFile conf/ssl.crt/ca.crt
    -SSLCACertificatePath conf/ssl.crt
    -SSLOptions           +FakeBasicAuth
    -SSLRequireSSL
    -AuthName             "Snake Oil Authentication"
    -AuthType             Basic
    -AuthBasicProvider    file
    -AuthUserFile         /usr/local/apache2/conf/httpd.passwd
    -Require              valid-user
    -</Directory>
    + SSLVerifyDepth 5 + SSLOptions +FakeBasicAuth + SSLRequireSSL + AuthName "Snake Oil Authentication" + AuthType Basic + AuthBasicProvider file + AuthUserFile "/usr/local/apache2/conf/httpd.passwd" + Require valid-user +</Directory> + +

    Le mot de passe utilis dans cet exemple correspond la chane de caractres "password" chiffre en DES. Voir la documentation de la directive SSLOptions pour plus de dtails.

    -

    httpd.passwd

    -/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA
    +    

    httpd.passwd

    /C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA
     /C=US/L=S.F./O=Snake Oil, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA
     /C=US/L=L.A./O=Snake Oil, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVA
    @@ -231,19 +374,19 @@ Require valid-user utilisant la directive SSLRequire, comme suit :

    -

    httpd.conf

    -SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +    
    SSLVerifyClient      none
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
       SSLVerifyClient      require
       SSLVerifyDepth       5
    -  SSLCACertificateFile conf/ssl.crt/ca.crt
    -  SSLCACertificatePath conf/ssl.crt
       SSLOptions           +FakeBasicAuth
       SSLRequireSSL
       SSLRequire       %{SSL_CLIENT_S_DN_O}  eq "Snake Oil, Ltd." \
                    and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}
    -</Directory>
    +</Directory>
    +

    Comment imposer HTTPS avec chiffrements forts, @@ -260,51 +403,47 @@ aux clients de l'intranet.

    doivent se trouver en dehors de votre hte virtuel HTTPS, afin qu'elles s'appliquent la fois HTTP et HTTPS.

    -

    httpd.conf

    -SSLCACertificateFile conf/ssl.crt/company-ca.crt
    +    
    SSLCACertificateFile "conf/ssl.crt/company-ca.crt"
     
    -<Directory /usr/local/apache2/htdocs>
    -#   En dehors de subarea, seul l'accs depuis l'intranet est autoris
    -Order                deny,allow
    -Deny                 from all
    -Allow                from 192.168.1.0/24
    +<Directory "/usr/local/apache2/htdocs">
    +#   En dehors de subarea, seul l'accs depuis l'intranet est
    +#   autoris
    +    Require              ip 192.168.1.0/24
     </Directory>
     
    -<Directory /usr/local/apache2/htdocs/subarea>
    +<Directory "/usr/local/apache2/htdocs/subarea">
     #   Dans subarea, tout accs depuis l'intranet est autoris
    -#   mais depuis l'Internet, seul l'accs par HTTPS + chiffrement fort
    - + Mot de passe
    +#   mais depuis l'Internet, seul l'accs par HTTPS + chiffrement fort + Mot de passe
     #   ou HTTPS + chiffrement fort + certificat client n'est autoris.
     
     #   Si HTTPS est utilis, on s'assure que le niveau de chiffrement est fort.
     #   Autorise en plus les certificats clients comme une alternative 
     #   l'authentification basique.
    -SSLVerifyClient      optional
    -SSLVerifyDepth       1
    -SSLOptions           +FakeBasicAuth +StrictRequire
    -SSLRequire           %{SSL_CIPHER_USEKEYSIZE} >= 128
    -
    -#   ON oblige les clients venant d'Internet  utiliser HTTPS
    -RewriteEngine        on
    -RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
    -RewriteCond          %{HTTPS} !=on
    -RewriteRule          . - [F]
    -
    -#   On permet l'accs soit sur les critres rseaux, soit par authentification Basique
    -Satisfy              any
    -
    -#   Contrle d'accs rseau
    -Order                deny,allow
    -Deny                 from all
    -Allow                192.168.1.0/24
    -
    -#   Configuration de l'authentification HTTP Basique
    -AuthType             basic
    -AuthName             "Protected Intranet Area"
    -AuthBasicProvider    file
    -AuthUserFile         conf/protected.passwd
    -Require              valid-user
    -</Directory>
    + SSLVerifyClient optional + SSLVerifyDepth 1 + SSLOptions +FakeBasicAuth +StrictRequire + SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128 + + # ON oblige les clients venant d'Internet utiliser HTTPS + RewriteEngine on + RewriteCond "%{REMOTE_ADDR}" "!^192\.168\.1\.[0-9]+$" + RewriteCond "%{HTTPS}" "!=on" + RewriteRule "." "-" [F] + + # On permet l'accs soit sur les critres rseaux, soit par authentification Basique + Satisfy any + + # Contrle d'accs rseau + Require ip 192.168.1.0/24 + + # Configuration de l'authentification HTTP Basique + AuthType basic + AuthName "Protected Intranet Area" + AuthBasicProvider file + AuthUserFile "conf/protected.passwd" + Require valid-user +</Directory> +
    top
    @@ -323,7 +462,28 @@ Require valid-user

    Langues Disponibles:  en  |  fr 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_howto.xml b/docs/manual/ssl/ssl_howto.xml index 6ac014641c5..f19e3ec2eda 100644 --- a/docs/manual/ssl/ssl_howto.xml +++ b/docs/manual/ssl/ssl_howto.xml @@ -27,7 +27,7 @@ -

    This documented is intended to get you started, and get a few things +

    This document is intended to get you started, and get a few things working. You are strongly encouraged to read the rest of the SSL documentation, and arrive at a deeper understanding of the material, before progressing to the advanced techniques.

    @@ -36,20 +36,20 @@ before progressing to the advanced techniques.

    Basic Configuration Example -

    Your SSL configuration will need to contain, at a minumum, the +

    Your SSL configuration will need to contain, at minimum, the following directives.

    - - Listen 443
    - <VirtualHost *:443>
    - - ServerName www.example.com
    - SSLEngine on
    - SSLCertificateFile /path/to/www.example.com.cert
    - SSLCertificateKeyFile /path/to/www.example.com.key
    -
    - </VirtualHost> -
    + +LoadModule ssl_module modules/mod_ssl.so + +Listen 443 +<VirtualHost *:443> + ServerName www.example.com + SSLEngine on + SSLCertificateFile "/path/to/www.example.com.cert" + SSLCertificateKeyFile "/path/to/www.example.com.key" +</VirtualHost> +
    @@ -65,22 +65,18 @@ requires a strong cipher for access to a particular URL? How can I create an SSL server which accepts strong encryption only?

    The following enables only the strongest ciphers:

    - httpd.conf - SSLProtocol all -SSLv2
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    -
    - -

    While with the following configuration you enable two ciphers - which are resonably secure, and fast:

    - - httpd.conf - SSLProtocol all -SSLv2
    - SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!EXP:!MD5:!NULL
    - SSLHonorCipherOrder on -
    - -

    This strongly reflects the default value of SSLCipherSuite and is the recommanded way to configure it.

    + + SSLCipherSuite HIGH:!aNULL:!MD5 + + +

    While with the following configuration you specify a preference + for specific speed-optimized ciphers (which will be selected by + mod_ssl, provided that they are supported by the client):

    + + +SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 +SSLHonorCipherOrder on +
    @@ -94,20 +90,171 @@ URL? blocks, to give a per-directory solution, and can automatically force a renegotiation of the SSL parameters to meet the new configuration. This can be done as follows:

    - - # be liberal in general
    - SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    -
    - <Location /strong/area>
    - # but https://hostname/strong/area/ and below
    - # requires strong ciphers
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    - </Location> -
    + +# be liberal in general +SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL + +<Location "/strong/area"> +# but https://hostname/strong/area/ and below +# requires strong ciphers +SSLCipherSuite HIGH:!aNULL:!MD5 +</Location> +
    +
    +OCSP Stapling + +

    The Online Certificate Status Protocol (OCSP) is a mechanism for +determining whether or not a server certificate has been revoked, and OCSP +Stapling is a special form of this in which the server, such as httpd and +mod_ssl, maintains current OCSP responses for its certificates and sends +them to clients which communicate with the server. Most certificates +contain the address of an OCSP responder maintained by the issuing +Certificate Authority, and mod_ssl can communicate with that responder to +obtain a signed response that can be sent to clients communicating with +the server.

    + +

    Because the client can obtain the certificate revocation status from +the server, without requiring an extra connection from the client to the +Certificate Authority, OCSP Stapling is the preferred way for the +revocation status to be obtained. Other benefits of eliminating the +communication between clients and the Certificate Authority are that the +client browsing history is not exposed to the Certificate Authority and +obtaining status is more reliable by not depending on potentially heavily +loaded Certificate Authority servers.

    + +

    Because the response obtained by the server can be reused for all clients +using the same certificate during the time that the response is valid, the +overhead for the server is minimal.

    + +

    Once general SSL support has been configured properly, enabling OCSP +Stapling generally requires only very minor modifications to the httpd +configuration — the addition of these two directives:

    + + +SSLUseStapling On +SSLStaplingCache "shmcb:logs/ssl_stapling(32768)" + + +

    These directives are placed at global scope (i.e., not within a virtual +host definition) wherever other global SSL configuration directives are +placed, such as in conf/extra/httpd-ssl.conf for normal +open source builds of httpd, /etc/apache2/mods-enabled/ssl.conf +for the Ubuntu or Debian-bundled httpd, etc.

    + +

    The path on the SSLStaplingCache directive +(e.g., logs/) should match the one on the +SSLSessionCache directive. This path is relative +to ServerRoot.

    + +

    This particular SSLStaplingCache directive requires +mod_socache_shmcb (from the shmcb prefix on the +directive's argument). This module is usually enabled already for +SSLSessionCache or on behalf of some module other than +mod_ssl. If you enabled an SSL session cache using a +mechanism other than mod_socache_shmcb, use that alternative +mechanism for SSLStaplingCache as well. For example:

    + + +SSLSessionCache "dbm:logs/ssl_scache" +SSLStaplingCache "dbm:logs/ssl_stapling" + + +

    You can use the openssl command-line program to verify that an OCSP response +is sent by your server:

    + +
    +$ openssl s_client -connect www.example.com:443 -status -servername www.example.com
    +...
    +OCSP response: 
    +======================================
    +OCSP Response Data:
    +    OCSP Response Status: successful (0x0)
    +    Response Type: Basic OCSP Response
    +...
    +    Cert Status: Good
    +...
    +
    + +

    The following sections highlight the most common situations which require +further modification to the configuration. Refer also to the +mod_ssl reference manual.

    + +
    +If more than a few SSL certificates are used for the server +

    OCSP responses are stored in the SSL stapling cache. While the responses +are typically a few hundred to a few thousand bytes in size, mod_ssl +supports OCSP responses up to around 10K bytes in size. With more than a +few certificates, the stapling cache size (32768 bytes in the example above) +may need to be increased. Error message AH01929 will be logged in case of +an error storing a response.

    +
    + +
    +If the certificate does not point to an OCSP responder, or if a +different address must be used +

    Refer to the +SSLStaplingForceURL directive.

    + +

    You can confirm that a server certificate points to an OCSP responder +using the openssl command-line program, as follows:

    + +
    +$ openssl x509 -in ./www.example.com.crt -text | grep 'OCSP.*http'
    +OCSP - URI:http://ocsp.example.com
    +
    + +

    If the OCSP URI is provided and the web server can communicate to it +directly without using a proxy, no configuration is required. Note that +firewall rules that control outbound connections from the web server may +need to be adjusted.

    + +

    If no OCSP URI is provided, contact your Certificate Authority to +determine if one is available; if so, configure it with +SSLStaplingForceURL in the virtual +host that uses the certificate.

    +
    + +
    +If multiple SSL-enabled virtual hosts are configured and OCSP +Stapling should be disabled for some + +

    Add SSLUseStapling Off to the virtual hosts for which OCSP +Stapling should be disabled.

    +
    + +
    +If the OCSP responder is slow or unreliable +

    Several directives are available to handle timeouts and errors. Refer +to the documentation for the +SSLStaplingFakeTryLater, +SSLStaplingResponderTimeout, and +SSLStaplingReturnResponderErrors +directives.

    +
    + +
    +If mod_ssl logs error AH02217 +
    +AH02217: ssl_stapling_init_cert: Can't retrieve issuer certificate!
    +
    +

    In order to support OCSP Stapling when a particular server certificate is +used, the certificate chain for that certificate must be configured. If it +was not configured as part of enabling SSL, the AH02217 error will be issued +when stapling is enabled, and an OCSP response will not be provided for clients +using the certificate.

    + +

    Refer to the SSLCertificateChainFile +and SSLCertificateFile for instructions +for configuring the certificate chain.

    +
    + +
    + +
    Client Authentication and Access Control
      @@ -129,13 +276,13 @@ Intranet website, for clients coming from the Internet? need to do is to create client certificates signed by your own CA certificate (ca.crt) and then verify the clients against this certificate.

      - httpd.conf - # require a client certificate which has to be directly
      - # signed by our CA certificate in ca.crt
      - SSLVerifyClient require
      - SSLVerifyDepth 1
      - SSLCACertificateFile conf/ssl.crt/ca.crt -
      + +# require a client certificate which has to be directly +# signed by our CA certificate in ca.crt +SSLVerifyClient require +SSLVerifyDepth 1 +SSLCACertificateFile "conf/ssl.crt/ca.crt" +
    @@ -146,15 +293,15 @@ Intranet website, for clients coming from the Internet? you can use the per-directory reconfiguration features of mod_ssl:

    - httpd.conf - SSLVerifyClient none
    - SSLCACertificateFile conf/ssl.crt/ca.crt
    -
    - <Location /secure/area>
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - </Location>
    -
    + +SSLVerifyClient none +SSLCACertificateFile "conf/ssl.crt/ca.crt" + +<Location "/secure/area"> +SSLVerifyClient require +SSLVerifyDepth 1 +</Location> +
    @@ -173,23 +320,23 @@ Intranet website, for clients coming from the Internet? you should establish a password database containing all clients allowed, as follows:

    - httpd.conf
    +    
     SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    -
    -SSLVerifyClient      require
    -SSLVerifyDepth       5
    -SSLCACertificateFile conf/ssl.crt/ca.crt
    -SSLCACertificatePath conf/ssl.crt
    -SSLOptions           +FakeBasicAuth
    -SSLRequireSSL
    -AuthName             "Snake Oil Authentication"
    -AuthType             Basic
    -AuthBasicProvider    file
    -AuthUserFile         /usr/local/apache2/conf/httpd.passwd
    -Require              valid-user
    -</Directory>
    -
    +SSLCACertificateFile "conf/ssl.crt/ca.crt" +SSLCACertificatePath "conf/ssl.crt" + +<Directory "/usr/local/apache2/htdocs/secure/area"> + SSLVerifyClient require + SSLVerifyDepth 5 + SSLOptions +FakeBasicAuth + SSLRequireSSL + AuthName "Snake Oil Authentication" + AuthType Basic + AuthBasicProvider file + AuthUserFile "/usr/local/apache2/conf/httpd.passwd" + Require valid-user +</Directory> +

    The password used in this example is the DES encrypted string "password". See the SSLOptions docs for more @@ -206,20 +353,20 @@ Require valid-user >SSLRequire, as follows:

    - httpd.conf
    +    
     SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
       SSLVerifyClient      require
       SSLVerifyDepth       5
    -  SSLCACertificateFile conf/ssl.crt/ca.crt
    -  SSLCACertificatePath conf/ssl.crt
       SSLOptions           +FakeBasicAuth
       SSLRequireSSL
       SSLRequire       %{SSL_CLIENT_S_DN_O}  eq "Snake Oil, Ltd." \
                    and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}
    -</Directory>
    -
    +</Directory> +
    @@ -234,50 +381,46 @@ plain HTTP access for clients on the Intranet. This configuration should remain outside of your HTTPS virtual host, so that it applies to both HTTPS and HTTP.

    - httpd.conf
    -SSLCACertificateFile conf/ssl.crt/company-ca.crt
    +    
    +SSLCACertificateFile "conf/ssl.crt/company-ca.crt"
     
    -<Directory /usr/local/apache2/htdocs>
    -#   Outside the subarea only Intranet access is granted
    -Order                deny,allow
    -Deny                 from all
    -Allow                from 192.168.1.0/24
    +<Directory "/usr/local/apache2/htdocs">
    +    #   Outside the subarea only Intranet access is granted
    +    Require              ip 192.168.1.0/24
     </Directory>
     
    -<Directory /usr/local/apache2/htdocs/subarea>
    -#   Inside the subarea any Intranet access is allowed
    -#   but from the Internet only HTTPS + Strong-Cipher + Password
    -#   or the alternative HTTPS + Strong-Cipher + Client-Certificate
    -
    -#   If HTTPS is used, make sure a strong cipher is used.
    -#   Additionally allow client certs as alternative to basic auth.
    -SSLVerifyClient      optional
    -SSLVerifyDepth       1
    -SSLOptions           +FakeBasicAuth +StrictRequire
    -SSLRequire           %{SSL_CIPHER_USEKEYSIZE} >= 128
    -
    -#   Force clients from the Internet to use HTTPS
    -RewriteEngine        on
    -RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
    -RewriteCond          %{HTTPS} !=on
    -RewriteRule          . - [F]
    -
    -#   Allow Network Access and/or Basic Auth
    -Satisfy              any
    -
    -#   Network Access Control
    -Order                deny,allow
    -Deny                 from all
    -Allow                192.168.1.0/24
    -
    -#   HTTP Basic Authentication
    -AuthType             basic
    -AuthName             "Protected Intranet Area"
    -AuthBasicProvider    file
    -AuthUserFile         conf/protected.passwd
    -Require              valid-user
    -</Directory>
    -
    +<Directory "/usr/local/apache2/htdocs/subarea"> + # Inside the subarea any Intranet access is allowed + # but from the Internet only HTTPS + Strong-Cipher + Password + # or the alternative HTTPS + Strong-Cipher + Client-Certificate + + # If HTTPS is used, make sure a strong cipher is used. + # Additionally allow client certs as alternative to basic auth. + SSLVerifyClient optional + SSLVerifyDepth 1 + SSLOptions +FakeBasicAuth +StrictRequire + SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128 + + # Force clients from the Internet to use HTTPS + RewriteEngine on + RewriteCond "%{REMOTE_ADDR}" "!^192\.168\.1\.[0-9]+$" + RewriteCond "%{HTTPS}" "!=on" + RewriteRule "." "-" [F] + + # Allow Network Access and/or Basic Auth + Satisfy any + + # Network Access Control + Require ip 192.168.1.0/24 + + # HTTP Basic Authentication + AuthType basic + AuthName "Protected Intranet Area" + AuthBasicProvider file + AuthUserFile "conf/protected.passwd" + Require valid-user +</Directory> +
    diff --git a/docs/manual/ssl/ssl_howto.xml.fr b/docs/manual/ssl/ssl_howto.xml.fr index d8bd23e71a9..eaf5ce655b3 100644 --- a/docs/manual/ssl/ssl_howto.xml.fr +++ b/docs/manual/ssl/ssl_howto.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -42,17 +42,17 @@ manière plus approfondie.

    Votre configuration SSL doit comporter au moins les directives suivantes :

    - - Listen 443 - <VirtualHost *:443>
    - - ServerName www.example.com
    - SSLEngine on
    - SSLCertificateFile /chemin/vers/www.example.com.cert
    - SSLCertificateKeyFile /chemin/vers/www.example.com.key
    -
    - </VirtualHost> -
    + +LoadModule ssl_module modules/mod_ssl.so + +Listen 443 +<VirtualHost *:443> + ServerName www.example.com + SSLEngine on + SSLCertificateFile "/path/to/www.example.com.cert" + SSLCertificateKeyFile "/path/to/www.example.com.key" +</VirtualHost> + @@ -73,23 +73,19 @@ accéder à une URL particulière ? que le chiffrement fort ?

    Les directives suivantes ne permettent que les chiffrements de plus haut niveau :

    - httpd.conf - SSLProtocol all -SSLv2
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    -
    - - - -

    Avec la configuration qui suit, vous pouvez activer deux méthodes de chiffrement relativement sécurisées, et rapides :

    - - httpd.conf - SSLProtocol all -SSLv2
    - SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!EXP:!MD5:!NULL
    - SSLHonorCipherOrder on -
    -
    -

    Ceci correspond largement à la valeur par défaut de la directive SSLCipherSuite, - et représente la pratique à conseiller.

    + + SSLCipherSuite HIGH:!aNULL:!MD5 + + +

    Avec la configuration qui suit, vous indiquez une préférence pour + des algorityhmes de chiffrement spécifiques optimisés en matière de + rapidité (le choix final sera opéré par mod_ssl, dans la mesure ou le + client les supporte) :

    + + +SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 +SSLHonorCipherOrder on +
    @@ -105,19 +101,185 @@ accéder à une URL particulière ? mod_ssl peut alors forcer automatiquement une renégociation des paramètres SSL pour parvenir au but recherché. Cette configuration peut se présenter comme suit :

    - - # soyons très tolérant a priori
    - SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    -
    - <Location /strong/area>
    - # sauf pour https://hostname/strong/area/ et ses sous-répertoires
    - # qui exigent des chiffrements forts
    - SSLCipherSuite HIGH:!aNULL:!EXP:!MD5:!NULL
    - </Location> -
    + +# soyons très tolérant a priori +SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL + +<Location "/strong/area"> +# sauf pour https://hostname/strong/area/ et ses sous-répertoires +# qui exigent des chiffrements forts +SSLCipherSuite HIGH:!aNULL:!MD5 +</Location> + +
    +
    +Agrafage OCSP + +

    Le protocole de contrôle du statut des certificats en ligne (Online +Certificate Status Protocol - OCSP) est un mécanisme permettant de +déterminer si un certificat a été révoqué ou non, et l'agrafage OCSP en +est une fonctionnalité particulière par laquelle le serveur, par exemple +httpd et mod_ssl, maintient une liste des réponses OCSP actuelles pour +ses certificats et l'envoie aux clients qui communiquent avec lui. La +plupart des certificats contiennent l'adresse d'un répondeur OCSP maintenu +par l'Autorité de Certification (CA) spécifiée, et mod_ssl peut requérir +ce répondeur pour obtenir une réponse signée qui peut être envoyée aux +clients qui communiquent avec le serveur.

    + +

    L'agrafage OCSP est la méthode la plus performante pour obtenir le +statut d'un certificat car il est disponible au niveau du serveur, et le +client n'a donc pas besoin d'ouvrir une nouvelle connexion vers +l'autorité de certification. Autres avantages de l'absence de +communication entre le client et l'autorité de certification : +l'autorité de certification n'a pas accès à l'historique de navigation +du client, et l'obtention du statut du certificat est plus efficace car +elle n'est plus assujettie à une surcharge éventuelle des serveurs de +l'autorité de certification.

    + +

    La charge du serveur est moindre car la réponse qu'il a obtenu du +répondeur OCSP peut être réutilisée par tous les clients qui utilisent +le même certificat dans la limite du temps de validité de la réponse.

    + +

    Une fois le support général SSL correctement configuré, l'activation +de l'agrafage OCSP ne requiert que des modifications mineures +à la configuration de httpd et il suffit en général de l'ajout de ces +deux directives :

    + + +SSLUseStapling On +SSLStaplingCache "shmcb:ssl_stapling(32768)" + + +

    Ces directives sont placées de façon à ce qu'elles aient une portée +globale (et particulièrement en dehors de toute section VirtualHost), le +plus souvent où sont placées les autres directives de configuration +globales SSL, comme conf/extra/httpd-ssl.conf pour les +installations de httpd à partir des sources, ou +/etc/apache2/mods-enabled/ssl.conf pour Ubuntu ou Debian, +etc...

    + +

    Le chemin spécifié par la directive +SSLStaplingCache (par exemple logs/) +doit être le même que celui spécifié par la directive +SSLSessionCache. Ce chemin est relatif au chemin +spécifié par la directive ServerRoot.

    + +

    Cette directive SSLStaplingCache particulière +nécessite le chargement du module mod_socache_shmcb (à +cause du préfixe shmcb de son argument). Ce module est en +général déjà activé pour la directive +SSLSessionCache, ou pour des modules autres que +mod_ssl. Si vous activez un cache de session SSL +utilisant un mécanisme autre que mod_socache_shmcb, +utilisez aussi ce mécanisme alternatif pour la directive +SSLStaplingCache. Par exemple :

    + + +SSLSessionCache "dbm:ssl_scache" +SSLStaplingCache "dbm:ssl_stapling" + + +

    Vous pouvez utiliser la commande openssl pour vérifier que votre +serveur envoie bien une réponse OCSP :

    + +
    +$ openssl s_client -connect www.example.com:443 -status -servername www.example.com
    +...
    +OCSP response: 
    +======================================
    +OCSP Response Data:
    +    OCSP Response Status: successful (0x0)
    +    Response Type: Basic OCSP Response
    +...
    +    Cert Status: Good
    +...
    +
    + +

    Les sections suivantes explicitent les situations courantes qui +requièrent des modifications supplémentaires de la configuration. Vous +pouvez aussi vous référer au manuel de référence de +mod_ssl.

    + +
    +Si l'on utilise plus que quelques certificats SSL pour le serveur +

    Les réponses OCSP sont stockées dans le cache d'agrafage SSL. Alors +que les réponses ont une taille de quelques centaines à quelques +milliers d'octets, mod_ssl supporte des réponses d'une taille jusqu'à +environ 10 ko. Dans notre cas, le nombre de certificats est conséquent +et la taille du cache (32768 octets dans l'exemple ci-dessus) doit être +augmentée. En cas d'erreur lors du stockage d'une réponse, le +message AH01929 sera enregistré dans le journal.

    +
    + +
    +Si le certificat ne spécifie pas de répondeur OCSP, ou si une +adresse différente doit être utilisée +

    Veuillez vous référer à la documentation de la directive SSLStaplingForceURL.

    + +

    Vous pouvez vérifier si un certificat spécifie un répondeur OCSP en +utilisant la commande openssl comme suit :

    + +
    +$ openssl x509 -in ./www.example.com.crt -text | grep 'OCSP.*http'
    +OCSP - URI:http://ocsp.example.com
    +
    + +

    Si un URI OCSP est fourni et si le serveur web peut communiquer +directement avec lui sans passer par un mandataire, aucune modification +supplémentaire de la configuration n'est requise. Notez que les règles +du pare-feu qui contrôlent les connexions sortantes en provenance du +serveur web devront peut-être subir quelques ajustements.

    + +

    Si aucun URI OCSP n'est fourni, contactez votre autorité de +certification pour savoir s'il en existe une ; si c'est le +cas, utilisez la directive SSLStaplingForceURL pour la spécifier dans +la configuration du serveur virtuel qui utilise le certificat.

    +
    + +
    +Si plusieurs serveurs virtuels sont configurés pour utiliser SSL +et si l'agrafage OCSP doit être désactivé pour certains d'entre eux + +

    Ajoutez la directive SSLUseStapling Off à la +configuration des serveurs virtuels pour lesquels l'agrafage OCSP doit +être désactivé.

    +
    + +
    +Si le répondeur OCSP est lent ou instable +

    De nombreuses directives permettent de gérer les temps de réponse et +les erreurs. Référez-vous à la documentation de SSLStaplingFakeTryLater, SSLStaplingResponderTimeout, et SSLStaplingReturnResponderErrors.

    +
    + +
    +Si mod_ssl enregistre l'erreur AH02217 dans le journal +
    +AH02217: ssl_stapling_init_cert: Can't retrieve issuer certificate!
    +
    +

    Afin de pouvoir supporter l'agrafage OCSP lorsqu'un certificat de +serveur particulier est utilisé, une chaîne de certification pour ce +certificat doit être spécifiée. Si cela n'a pas été fait lors de +l'activation de SSL, l'erreur AH02217 sera enregistrée lorsque +l'agrafage OCSP sera activé, et les clients qui utilisent le certificat +considéré ne recevront pas de réponse OCSP.

    + +

    Veuillez vous référer à la documentation des directives SSLCertificateChainFile et SSLCertificateFile pour spécifier une +chaîne de certification.

    +
    + +
    + +
    Authentification du client et contrôle d'accès
      @@ -148,13 +310,13 @@ provenance de l'Internet ? le certificat de votre propre autorité de certification (ca.crt), et d'authentifier les clients à l'aide de ces certificats.

      - httpd.conf - # exige un certificat client signé par le certificat de votre CA
      - # contenu dans ca.crt
      - SSLVerifyClient require
      - SSLVerifyDepth 1
      - SSLCACertificateFile conf/ssl.crt/ca.crt -
      + +# exige un certificat client signé par le certificat de votre CA +# contenu dans ca.crt +SSLVerifyClient require +SSLVerifyDepth 1 +SSLCACertificateFile "conf/ssl.crt/ca.crt" +
    @@ -167,15 +329,15 @@ mais autoriser quand-même tout client anonyme URL particulière, vous pouvez utiliser les fonctionnalités de reconfiguration de mod_ssl en fonction du répertoire :

    - httpd.conf - SSLVerifyClient none
    - SSLCACertificateFile conf/ssl.crt/ca.crt
    -
    - <Location /secure/area>
    - SSLVerifyClient require
    - SSLVerifyDepth 1
    - </Location>
    -
    + +SSLVerifyClient none +SSLCACertificateFile "conf/ssl.crt/ca.crt" + +<Location "/secure/area"> +SSLVerifyClient require +SSLVerifyDepth 1 +</Location> +
    @@ -197,23 +359,24 @@ l'accès au reste du serveur à tous les clients ? de données de mots de passe contenant tous les clients autorisés, comme suit :

    - httpd.conf
    +    
     SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
     SSLVerifyClient      require
    -SSLVerifyDepth       5
    -SSLCACertificateFile conf/ssl.crt/ca.crt
    -SSLCACertificatePath conf/ssl.crt
    -SSLOptions           +FakeBasicAuth
    -SSLRequireSSL
    -AuthName             "Snake Oil Authentication"
    -AuthType             Basic
    -AuthBasicProvider    file
    -AuthUserFile         /usr/local/apache2/conf/httpd.passwd
    -Require              valid-user
    -</Directory>
    -
    + SSLVerifyDepth 5 + SSLOptions +FakeBasicAuth + SSLRequireSSL + AuthName "Snake Oil Authentication" + AuthType Basic + AuthBasicProvider file + AuthUserFile "/usr/local/apache2/conf/httpd.passwd" + Require valid-user +</Directory> + +

    Le mot de passe utilisé dans cet exemple correspond à la chaîne de caractères "password" chiffrée en DES. Voir la documentation de la @@ -232,20 +395,20 @@ Require valid-user >SSLRequire, comme suit :

    - httpd.conf
    +    
     SSLVerifyClient      none
    -<Directory /usr/local/apache2/htdocs/secure/area>
    +SSLCACertificateFile "conf/ssl.crt/ca.crt"
    +SSLCACertificatePath "conf/ssl.crt"
     
    +<Directory "/usr/local/apache2/htdocs/secure/area">
       SSLVerifyClient      require
       SSLVerifyDepth       5
    -  SSLCACertificateFile conf/ssl.crt/ca.crt
    -  SSLCACertificatePath conf/ssl.crt
       SSLOptions           +FakeBasicAuth
       SSLRequireSSL
       SSLRequire       %{SSL_CLIENT_S_DN_O}  eq "Snake Oil, Ltd." \
                    and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}
    -</Directory>
    -
    +</Directory> +
    @@ -262,52 +425,48 @@ aux clients de l'intranet. doivent se trouver en dehors de votre hôte virtuel HTTPS, afin qu'elles s'appliquent à la fois à HTTP et HTTPS.

    - httpd.conf
    -SSLCACertificateFile conf/ssl.crt/company-ca.crt
    +    
    +SSLCACertificateFile "conf/ssl.crt/company-ca.crt"
     
    -<Directory /usr/local/apache2/htdocs>
    -#   En dehors de subarea, seul l'accès depuis l'intranet est autorisé
    -Order                deny,allow
    -Deny                 from all
    -Allow                from 192.168.1.0/24
    +<Directory "/usr/local/apache2/htdocs">
    +#   En dehors de subarea, seul l'accès depuis l'intranet est
    +#   autorisé
    +    Require              ip 192.168.1.0/24
     </Directory>
     
    -<Directory /usr/local/apache2/htdocs/subarea>
    +<Directory "/usr/local/apache2/htdocs/subarea">
     #   Dans subarea, tout accès depuis l'intranet est autorisé
    -#   mais depuis l'Internet, seul l'accès par HTTPS + chiffrement fort
    - + Mot de passe
    +#   mais depuis l'Internet, seul l'accès par HTTPS + chiffrement fort + Mot de passe
     #   ou HTTPS + chiffrement fort + certificat client n'est autorisé.
     
     #   Si HTTPS est utilisé, on s'assure que le niveau de chiffrement est fort.
     #   Autorise en plus les certificats clients comme une alternative à
     #   l'authentification basique.
    -SSLVerifyClient      optional
    -SSLVerifyDepth       1
    -SSLOptions           +FakeBasicAuth +StrictRequire
    -SSLRequire           %{SSL_CIPHER_USEKEYSIZE} >= 128
    -
    -#   ON oblige les clients venant d'Internet à utiliser HTTPS
    -RewriteEngine        on
    -RewriteCond          %{REMOTE_ADDR} !^192\.168\.1\.[0-9]+$
    -RewriteCond          %{HTTPS} !=on
    -RewriteRule          . - [F]
    -
    -#   On permet l'accès soit sur les critères réseaux, soit par authentification Basique
    -Satisfy              any
    -
    -#   Contrôle d'accès réseau
    -Order                deny,allow
    -Deny                 from all
    -Allow                192.168.1.0/24
    -
    -#   Configuration de l'authentification HTTP Basique
    -AuthType             basic
    -AuthName             "Protected Intranet Area"
    -AuthBasicProvider    file
    -AuthUserFile         conf/protected.passwd
    -Require              valid-user
    -</Directory>
    -
    + SSLVerifyClient optional + SSLVerifyDepth 1 + SSLOptions +FakeBasicAuth +StrictRequire + SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128 + + # ON oblige les clients venant d'Internet à utiliser HTTPS + RewriteEngine on + RewriteCond "%{REMOTE_ADDR}" "!^192\.168\.1\.[0-9]+$" + RewriteCond "%{HTTPS}" "!=on" + RewriteRule "." "-" [F] + + # On permet l'accès soit sur les critères réseaux, soit par authentification Basique + Satisfy any + + # Contrôle d'accès réseau + Require ip 192.168.1.0/24 + + # Configuration de l'authentification HTTP Basique + AuthType basic + AuthName "Protected Intranet Area" + AuthBasicProvider file + AuthUserFile "conf/protected.passwd" + Require valid-user +</Directory> +
    diff --git a/docs/manual/ssl/ssl_intro.html.en b/docs/manual/ssl/ssl_intro.html.en index 65bd701aaa4..61361d0c50b 100644 --- a/docs/manual/ssl/ssl_intro.html.en +++ b/docs/manual/ssl/ssl_intro.html.en @@ -1,36 +1,33 @@ - -SSL/TLS Strong Encryption: An Introduction - Apache HTTP Server +SSL/TLS Strong Encryption: An Introduction - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +

    <-

    SSL/TLS Strong Encryption: An Introduction

    +Apache > HTTP Server > Documentation > Version 2.4 > SSL/TLS

    SSL/TLS Strong Encryption: An Introduction

    Available Languages:  en  |  fr  |  ja 

    -
    -

    The nice thing about standards is that there are so many to choose -from. And if you really don't like all the standards you just have to -wait another year until the one arises you are looking for.

    - -

    -- A. Tanenbaum, "Introduction to -Computer Networks"

    -

    As an introduction this chapter is aimed at readers who are familiar with the Web, HTTP, and Apache, but are not security experts. It is not @@ -39,21 +36,12 @@ specific techniques for managing certificates in an organization, or the important legal issues of patents and import and export restrictions. Rather, it is intended to provide a common background to mod_ssl users by pulling together various concepts, definitions, and examples as a starting point for further exploration.

    - -

    The presented content is mainly derived, with the author's permission, -from the article Introducing -SSL and Certificates using SSLeay by Frederick J. Hirsch, of The -Open Group Research Institute, which was published in Web Security: A Matter of -Trust, World Wide Web Journal, Volume 2, Issue 3, Summer 1997. -Please send any positive feedback to Frederick Hirsch (the original -article author) and all negative feedback to Ralf S. Engelschall (the -mod_ssl author).

    +

    See also

    top

    Cryptographic Techniques

    @@ -255,7 +243,7 @@ certificates are used for authentication.

    as *.snakeoil.com.

    The binary format of a certificate is defined using the ASN.1 - notation [X208] [PKCS]. This + notation [ASN1] [PKCS]. This notation defines how to specify the contents and encoding rules define how this information is translated into binary form. The binary encoding of the certificate is defined using Distinguished Encoding @@ -394,26 +382,32 @@ establishing a protocol session.

    Version Source Description - Browser Support + SSL v2.0 - Vendor Standard (from Netscape Corp.) [SSL2] + Vendor Standard (from Netscape Corp.) First SSL protocol for which implementations exist - - NS Navigator 1.x/2.x
    - - MS IE 3.x
    - - Lynx/2.8+OpenSSL + SSL v3.0 Expired Internet Draft (from Netscape Corp.) [SSL3] Revisions to prevent specific security attacks, add non-RSA ciphers and support for certificate chains - - NS Navigator 2.x/3.x/4.x
    - - MS IE 3.x/4.x
    - - Lynx/2.8+OpenSSL + TLS v1.0 Proposed Internet Standard (from IETF) [TLS1] Revision of SSL 3.0 to update the MAC layer to HMAC, add block padding for block ciphers, message order standardization and more alert messages. - - Lynx/2.8+OpenSSL + + TLS v1.1 + Proposed Internet Standard (from IETF) [TLS11] + Update of TLS 1.0 to add protection against Cipher block chaining + (CBC) attacks. + + TLS v1.2 + Proposed Internet Standard (from IETF) [TLS12] + Update of TLS 1.1 deprecating MD5 as hash, and adding incompatibility + to SSL so it will never negotiate the use of SSLv2. + @@ -444,7 +438,7 @@ the Internet Engineering Task Force (IETF).

    to start a session. To do this, the server assigns each SSL session a unique session identifier which is cached in the server and which the client can use in future connections to reduce the handshake time - (until the session identifer expires from the cache of the server).

    + (until the session identifier expires from the cache of the server).

    @@ -611,14 +605,14 @@ the Internet Engineering Task Force (IETF).

    1996. See http://www.counterpane.com/ for various other materials by Bruce Schneier. -
    [X208]
    +
    [ASN1]
    ITU-T Recommendation X.208, Specification of Abstract Syntax Notation -One (ASN.1), 1988. See for instance http://www.itu.int/rec/recommendation.asp?type=items&lang=e&parent=T-REC-X.208-198811-I. +One (ASN.1), last updated 2008. See http://www.itu.int/ITU-T/asn1/.
    [X509]
    ITU-T Recommendation X.509, The Directory - Authentication -Framework. See for instance http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&parent=T-REC-X.509. +Framework. For references, see http://en.wikipedia.org/wiki/X.509.
    [PKCS]
    @@ -628,10 +622,7 @@ RSA Laboratories Technical Notes, See [MIME]
    N. Freed, N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, RFC2045. -See for instance http://ietf.org/rfc/rfc2045.txt.
    - -
    [SSL2]
    -
    Kipp E.B. Hickman, The SSL Protocol, 1995. See http://www.netscape.com/eng/security/SSL_2.html.
    +See for instance http://tools.ietf.org/html/rfc2045.
    [SSL3]
    Alan O. Freier, Philip Karlton, Paul C. Kocher, The SSL Protocol @@ -640,13 +631,42 @@ Version 3.0, 1996. See [TLS1]
    Tim Dierks, Christopher Allen, The TLS Protocol Version 1.0, 1999. See http://ietf.org/rfc/rfc2246.txt.
    + +
    [TLS11]
    +
    The TLS Protocol Version 1.1, +2006. See http://tools.ietf.org/html/rfc4346.
    + +
    [TLS12]
    +
    The TLS Protocol Version 1.2, +2008. See http://tools.ietf.org/html/rfc5246.

    Available Languages:  en  |  fr  |  ja 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_intro.html.fr b/docs/manual/ssl/ssl_intro.html.fr index 968fa25201f..6d6bb9b4fe8 100644 --- a/docs/manual/ssl/ssl_intro.html.fr +++ b/docs/manual/ssl/ssl_intro.html.fr @@ -1,36 +1,33 @@ - -Chiffrement SSL/TLS fort : Introduction - Serveur Apache HTTP +Chiffrement SSL/TLS fort : Introduction - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Chiffrement SSL/TLS fort : Introduction

    +Apache > Serveur HTTP > Documentation > Version 2.4 > SSL/TLS

    Chiffrement SSL/TLS fort : Introduction

    Langues Disponibles:  en  |  fr  |  ja 

    -
    -

    Ce qui est agrable avec les standards est d'avoir l'embarras du choix. Et -si certains standards ne vous conviennent pas vraiment, il vous suffit -d'attendre un an pour voir apparatre celui qui rpondra vos attentes.

    - -

    -- A. Tanenbaum, "Introduction to -Computer Networks"

    -

    Ce chapitre en guise d'introduction est destin aux lecteurs pour lesquels le Web, HTTP et Apache sont familiers, mais ne sont pas des experts en matire @@ -42,20 +39,12 @@ une base de travail pour les utilisateurs de Introducing -SSL and Certificates using SSLeay de Frederick J. Hirsch, de -l'Open Group Research Institute, publi dans Web Security: A Matter of -Trust, World Wide Web Journal, Volume 2, Issue 3, Summer 1997. Vous -pouvez envoyer toute remarque positive Frederick Hirsch (l'auteur de l'article -original) et toute remarque ngative Ralf S. Engelschall (l'auteur du module -mod_ssl).

    +

    Voir aussi

    top

    Techniques de chiffrement

    @@ -273,7 +262,7 @@ on utilise les certificats *.snakeoil.com.

    Le format binaire d'un certificat est dfini en utilisant la - notation ASN.1 [X208] [PKCS]. + notation ASN.1 [ASN1] [PKCS]. Cette notation definit la manire de spcifier les contenus, et les rgles d'encodage dfinissent la manire dont ces information sont converties au format binaire. L'encodage binaire du certificat est dfini par les Rgles @@ -422,27 +411,34 @@ l' Version Source Description - Navigateurs supports + SSL v2.0 - Standard du fournisseur (de Netscape Corp.) [SSL2] + Standard du fournisseur (de Netscape Corp.) Premier protocole SSL pour lequel il existe des implmentations - - NS Navigator 1.x/2.x
    - - MS IE 3.x
    - - Lynx/2.8+OpenSSL + SSL v3.0 Projet Internet arriv expiration (de Netscape Corp.) [SSL3] Comporte des rvisions permettant de prvenir certaines attaques de scurit spcifiques, ajout de chiffrements non RSA, et support des chanes de certification - - NS Navigator 2.x/3.x/4.x
    - - MS IE 3.x/4.x
    - - Lynx/2.8+OpenSSL + TLS v1.0 Standard propos pour l'Internet (de l'IETF) [TLS1] Rvision de SSL 3.0 pour mettre jour la couche MAC vers HMAC, ajout du bourrage de bloc pour le chiffrement de bloc, standardisation de l'ordonnancement des messages et plus de messages d'alerte. - - Lynx/2.8+OpenSSL + + TLS v1.1 + Standard propos pour l'Internet (de l'IETF) [TLS11] + Mise jour de TLS 1.0 pour la protection contre les + attaques de type Cipher block chaining (CBC). + + TLS v1.2 + Standard propos pour l'Internet (de l'IETF) [TLS12] + Mise jour de TLS 1.2 rendant les condenss MD5 obsoltes, + et introduisant une incompatibilit avec SSL ce qui interdit toute + ngociation en vue d'une utilisation de SSLv2. + @@ -664,14 +660,14 @@ l'Internet Engineering Task Force (IETF).

    1996. Voir http://www.counterpane.com/ pour diverses autres productions de Bruce Schneier. -
    [X208]
    +
    [ASN1]
    ITU-T Recommendation X.208, Specification of Abstract Syntax Notation -One (ASN.1), 1988. Voir par exemple http://www.itu.int/rec/recommendation.asp?type=items&lang=e&parent=T-REC-X.208-198811-I. +One (ASN.1), dernire mise jour en 2008. Voir http://www.itu.int/ITU-T/asn1/.
    [X509]
    ITU-T Recommendation X.509, The Directory - Authentication -Framework. Voir par exemple http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&parent=T-REC-X.509. +Framework. A titre de rfrence, voir http://en.wikipedia.org/wiki/X.509.
    [PKCS]
    @@ -681,10 +677,7 @@ RSA Laboratories Technical Notes, Voir [MIME]
    N. Freed, N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, RFC2045. -Voir par exemple http://ietf.org/rfc/rfc2045.txt.
    - -
    [SSL2]
    -
    Kipp E.B. Hickman, The SSL Protocol, 1995. See http://www.netscape.com/eng/security/SSL_2.html.
    +Voir par exemple http://tools.ietf.org/html/rfc2045.
    [SSL3]
    Alan O. Freier, Philip Karlton, Paul C. Kocher, The SSL Protocol @@ -693,13 +686,42 @@ Version 3.0, 1996. Voir [TLS1]
    Tim Dierks, Christopher Allen, The TLS Protocol Version 1.0, 1999. Voir http://ietf.org/rfc/rfc2246.txt.
    + +
    [TLS11]
    +
    Le protocole TLS Version 1.1, +2006. Voir http://tools.ietf.org/html/rfc4346.
    + +
    [TLS12]
    +
    Le protocole TLS Version 1.2, +2008. Voir http://tools.ietf.org/html/rfc5246.

    Langues Disponibles:  en  |  fr  |  ja 

    -
    +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_intro.html.ja.utf8 b/docs/manual/ssl/ssl_intro.html.ja.utf8 index a72607f4030..bfb4aa09d27 100644 --- a/docs/manual/ssl/ssl_intro.html.ja.utf8 +++ b/docs/manual/ssl/ssl_intro.html.ja.utf8 @@ -1,30 +1,36 @@ - -SSL/TLS 暗号化: はじめに - Apache HTTP サーバ +SSL/TLS 暗号化: はじめに - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    SSL/TLS 暗号化: はじめに

    -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。
    +
    この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 +

    標準規格の良い所は、たくさんの規格から選べるということだ。 @@ -62,7 +68,7 @@ Apache ドキュメント翻訳プロジェクト

  • 証明書
  • Secure Sockets Layer (SSL)
  • 参考文献
  • -
    +

    参照

    top

    暗号化技術

    @@ -694,10 +700,31 @@ Version 3.0, 1996. See -

    言語:  en  | +

    翻訳済み言語:  en  |  fr  |  ja 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/ssl/ssl_intro.xml b/docs/manual/ssl/ssl_intro.xml index 9e779cf1eb1..ecd6bddfe18 100644 --- a/docs/manual/ssl/ssl_intro.xml +++ b/docs/manual/ssl/ssl_intro.xml @@ -26,14 +26,6 @@ SSL/TLS Strong Encryption: An Introduction -
    -

    The nice thing about standards is that there are so many to choose -from. And if you really don't like all the standards you just have to -wait another year until the one arises you are looking for.

    - -

    -- A. Tanenbaum, "Introduction to -Computer Networks"

    -

    As an introduction this chapter is aimed at readers who are familiar with the Web, HTTP, and Apache, but are not security experts. It is not @@ -43,20 +35,6 @@ important legal issues of patents and import and export restrictions. Rather, it is intended to provide a common background to mod_ssl users by pulling together various concepts, definitions, and examples as a starting point for further exploration.

    - -

    The presented content is mainly derived, with the author's permission, -from the article Introducing -SSL and Certificates using SSLeay by Frederick J. Hirsch, of The -Open Group Research Institute, which was published in Web Security: A Matter of -Trust, World Wide Web Journal, Volume 2, Issue 3, Summer 1997. -Please send any positive feedback to Frederick Hirsch (the original -article author) and all negative feedback to Ralf S. Engelschall (the -mod_ssl author).

    @@ -262,7 +240,7 @@ certificates are used for authentication.

    as *.snakeoil.com.

    The binary format of a certificate is defined using the ASN.1 - notation [X208] [PKCS]. This + notation [ASN1] [PKCS]. This notation defines how to specify the contents and encoding rules define how this information is translated into binary form. The binary encoding of the certificate is defined using Distinguished Encoding @@ -407,29 +385,36 @@ establishing a protocol session.

    Version Source Description - Browser Support + SSL v2.0 - Vendor Standard (from Netscape Corp.) [SSL2] + Vendor Standard (from Netscape Corp.) First SSL protocol for which implementations exist - - NS Navigator 1.x/2.x
    - - MS IE 3.x
    - - Lynx/2.8+OpenSSL + SSL v3.0 Expired Internet Draft (from Netscape Corp.) [SSL3] Revisions to prevent specific security attacks, add non-RSA ciphers and support for certificate chains - - NS Navigator 2.x/3.x/4.x
    - - MS IE 3.x/4.x
    - - Lynx/2.8+OpenSSL + TLS v1.0 Proposed Internet Standard (from IETF) [TLS1] Revision of SSL 3.0 to update the MAC layer to HMAC, add block padding for block ciphers, message order standardization and more alert messages. - - Lynx/2.8+OpenSSL + + TLS v1.1 + Proposed Internet Standard (from IETF) [TLS11] + Update of TLS 1.0 to add protection against Cipher block chaining + (CBC) attacks. + + TLS v1.2 + Proposed Internet Standard (from IETF) [TLS12] + Update of TLS 1.1 deprecating MD5 as hash, and adding incompatibility + to SSL so it will never negotiate the use of SSLv2. +
    @@ -461,7 +446,7 @@ the Internet Engineering Task Force (IETF).

    to start a session. To do this, the server assigns each SSL session a unique session identifier which is cached in the server and which the client can use in future connections to reduce the handshake time - (until the session identifer expires from the cache of the server).

    + (until the session identifier expires from the cache of the server).

    @@ -635,18 +620,17 @@ the Internet Engineering Task Force (IETF).

    >http://www.counterpane.com/ for various other materials by Bruce Schneier. -
    [X208]
    +
    [ASN1]
    ITU-T Recommendation X.208, Specification of Abstract Syntax Notation -One (ASN.1), 1988. See for instance http://www.itu.int/rec/recommendation.asp?type=items&lang=e&parent=T-REC-X.208-198811-I. +One (ASN.1), last updated 2008. See http://www.itu.int/ITU-T/asn1/.
    [X509]
    ITU-T Recommendation X.509, The Directory - Authentication -Framework. See for instance http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&parent=T-REC-X.509. +Framework. For references, see http://en.wikipedia.org/wiki/X.509.
    [PKCS]
    @@ -658,13 +642,8 @@ href="http://www.rsasecurity.com/rsalabs/pkcs/"
    [MIME]
    N. Freed, N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, RFC2045. -See for instance http://ietf.org/rfc/rfc2045.txt.
    - -
    [SSL2]
    -
    Kipp E.B. Hickman, The SSL Protocol, 1995. See http://www.netscape.com/eng/security/SSL_2.html.
    +See for instance http://tools.ietf.org/html/rfc2045.
    [SSL3]
    Alan O. Freier, Philip Karlton, Paul C. Kocher, The SSL Protocol @@ -676,6 +655,16 @@ href="http://www.netscape.com/eng/ssl3/draft302.txt"
    Tim Dierks, Christopher Allen, The TLS Protocol Version 1.0, 1999. See http://ietf.org/rfc/rfc2246.txt.
    + +
    [TLS11]
    +
    The TLS Protocol Version 1.1, +2006. See http://tools.ietf.org/html/rfc4346.
    + +
    [TLS12]
    +
    The TLS Protocol Version 1.2, +2008. See http://tools.ietf.org/html/rfc5246.
    diff --git a/docs/manual/ssl/ssl_intro.xml.fr b/docs/manual/ssl/ssl_intro.xml.fr index 9e7476a12f0..ea0fa82d0d5 100644 --- a/docs/manual/ssl/ssl_intro.xml.fr +++ b/docs/manual/ssl/ssl_intro.xml.fr @@ -1,7 +1,7 @@ - + - + @@ -28,14 +28,6 @@ Chiffrement SSL/TLS fort : Introduction -
    -

    Ce qui est agréable avec les standards est d'avoir l'embarras du choix. Et -si certains standards ne vous conviennent pas vraiment, il vous suffit -d'attendre un an pour voir apparaître celui qui répondra à vos attentes.

    - -

    -- A. Tanenbaum, "Introduction to -Computer Networks"

    -

    Ce chapitre en guise d'introduction est destiné aux lecteurs pour lesquels le Web, HTTP et Apache sont familiers, mais ne sont pas des experts en matière @@ -47,19 +39,6 @@ une base de travail pour les utilisateurs de mod_ssl en rassemblant différents concepts, définitions et exemples comme point de départ pour une exploration plus détaillée.

    -

    Le contenu s'inspire en grande partie, avec la permission de l'auteur, -de l'article Introducing -SSL and Certificates using SSLeay de Frederick J. Hirsch, de -l'Open Group Research Institute, publié dans Web Security: A Matter of -Trust, World Wide Web Journal, Volume 2, Issue 3, Summer 1997. Vous -pouvez envoyer toute remarque positive à Frederick Hirsch (l'auteur de l'article -original) et toute remarque négative à Ralf S. Engelschall (l'auteur du module -mod_ssl).

    @@ -280,7 +259,7 @@ on utilise les certificats à des fins d'authentification.

    *.snakeoil.com.

    Le format binaire d'un certificat est défini en utilisant la - notation ASN.1 [X208] [PKCS]. + notation ASN.1 [ASN1] [PKCS]. Cette notation definit la manière de spécifier les contenus, et les règles d'encodage définissent la manière dont ces information sont converties au format binaire. L'encodage binaire du certificat est défini par les Règles @@ -435,30 +414,38 @@ l'établissement de la session protocolaire.

    Version Source Description - Navigateurs supportés + SSL v2.0 - Standard du fournisseur (de Netscape Corp.) [SSL2] + Standard du fournisseur (de Netscape Corp.) Premier protocole SSL pour lequel il existe des implémentations - - NS Navigator 1.x/2.x
    - - MS IE 3.x
    - - Lynx/2.8+OpenSSL + SSL v3.0 Projet Internet arrivé à expiration (de Netscape Corp.) [SSL3] Comporte des révisions permettant de prévenir certaines attaques de sécurité spécifiques, ajout de chiffrements non RSA, et support des chaînes de certification - - NS Navigator 2.x/3.x/4.x
    - - MS IE 3.x/4.x
    - - Lynx/2.8+OpenSSL + TLS v1.0 Standard proposé pour l'Internet (de l'IETF) [TLS1] Révision de SSL 3.0 pour mettre à jour la couche MAC vers HMAC, ajout du bourrage de bloc pour le chiffrement de bloc, standardisation de l'ordonnancement des messages et plus de messages d'alerte. - - Lynx/2.8+OpenSSL + + TLS v1.1 + Standard proposé pour l'Internet (de l'IETF) [TLS11] + Mise à jour de TLS 1.0 pour la protection contre les + attaques de type Cipher block chaining (CBC). + + TLS v1.2 + Standard proposé pour l'Internet (de l'IETF) [TLS12] + Mise à jour de TLS 1.2 rendant les condensés MD5 obsolètes, + et introduisant une incompatibilité avec SSL ce qui interdit toute + négociation en vue d'une utilisation de SSLv2. +
    @@ -685,18 +672,16 @@ l'Internet Engineering Task Force (IETF).

    >http://www.counterpane.com/ pour diverses autres productions de Bruce Schneier. -
    [X208]
    +
    [ASN1]
    ITU-T Recommendation X.208, Specification of Abstract Syntax Notation -One (ASN.1), 1988. Voir par exemple http://www.itu.int/rec/recommendation.asp?type=items&lang=e&parent=T-REC-X.208-198811-I. +One (ASN.1), dernière mise à jour en 2008. Voir http://www.itu.int/ITU-T/asn1/.
    [X509]
    ITU-T Recommendation X.509, The Directory - Authentication -Framework. Voir par exemple http://www.itu.int/rec/recommendation.asp?type=folders&lang=e&parent=T-REC-X.509. +Framework. A titre de référence, voir http://en.wikipedia.org/wiki/X.509.
    [PKCS]
    @@ -708,13 +693,8 @@ href="http://www.rsasecurity.com/rsalabs/pkcs/"
    [MIME]
    N. Freed, N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies, RFC2045. -Voir par exemple http://ietf.org/rfc/rfc2045.txt.
    - -
    [SSL2]
    -
    Kipp E.B. Hickman, The SSL Protocol, 1995. See http://www.netscape.com/eng/security/SSL_2.html.
    +Voir par exemple http://tools.ietf.org/html/rfc2045.
    [SSL3]
    Alan O. Freier, Philip Karlton, Paul C. Kocher, The SSL Protocol @@ -726,6 +706,16 @@ href="http://www.netscape.com/eng/ssl3/draft302.txt"
    Tim Dierks, Christopher Allen, The TLS Protocol Version 1.0, 1999. Voir http://ietf.org/rfc/rfc2246.txt.
    + +
    [TLS11]
    +
    Le protocole TLS Version 1.1, +2006. Voir http://tools.ietf.org/html/rfc4346.
    + +
    [TLS12]
    +
    Le protocole TLS Version 1.2, +2008. Voir http://tools.ietf.org/html/rfc5246.
    diff --git a/docs/manual/ssl/ssl_intro.xml.ja b/docs/manual/ssl/ssl_intro.xml.ja index fd6d1756e50..3ea9154d80c 100644 --- a/docs/manual/ssl/ssl_intro.xml.ja +++ b/docs/manual/ssl/ssl_intro.xml.ja @@ -1,7 +1,7 @@ - + -Beenden und Neustarten - Apache HTTP Server +Beenden und Neustarten - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Beenden und Neustarten

    +Apache > HTTP-Server > Dokumentation > Version 2.4

    Beenden und Neustarten

    +

    Siehe auch

    top

    Einleitung

    @@ -256,7 +261,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Kommentare

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.en b/docs/manual/stopping.html.en index 898455ca7be..4531e03cc7e 100644 --- a/docs/manual/stopping.html.en +++ b/docs/manual/stopping.html.en @@ -1,22 +1,27 @@ - -Stopping and Restarting Apache HTTP Server - Apache HTTP Server +Stopping and Restarting Apache HTTP Server - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-

    Stopping and Restarting Apache HTTP Server

    +Apache > HTTP Server > Documentation > Version 2.4

    Stopping and Restarting Apache HTTP Server

    Available Languages:  de  |  en  | @@ -39,7 +44,7 @@

  • Graceful Restart
  • Restart Now
  • Graceful Stop
  • -

    See also

    +

    See also

    top

    Introduction

    @@ -232,7 +237,28 @@ syntax error(s).
     ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.es b/docs/manual/stopping.html.es index 24d5d05450b..3baaef2a818 100644 --- a/docs/manual/stopping.html.es +++ b/docs/manual/stopping.html.es @@ -1,22 +1,27 @@ - -Iniciar y Parar el servidor Apache - Servidor HTTP Apache +Iniciar y Parar el servidor Apache - Servidor Apache HTTP Versin 2.4 - + + + + +

    Versin 2.4 del Servidor HTTP Apache

    +
    <-

    Iniciar y Parar el servidor Apache

    +Apache > Servidor HTTP > Documentacin > Versin 2.4

    Iniciar y Parar el servidor Apache

    Idiomas disponibles:  de  |  en  | @@ -43,7 +48,7 @@

  • Reinicio Graceful
  • Reiniciar Apache
  • Apndice: seales y race conditions
  • -

    Consulte tambin

    +

    Consulte tambin

    top

    Introduccin

    @@ -265,7 +270,28 @@ m  ja  |  ko  |  tr 

    -
    +
    top

    Comentarios

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.fr b/docs/manual/stopping.html.fr index 0f852e75373..a49b91e71d9 100644 --- a/docs/manual/stopping.html.fr +++ b/docs/manual/stopping.html.fr @@ -1,22 +1,27 @@ - -Arrt et redmarrage du serveur HTTP Apache - Serveur Apache HTTP +Arrt et redmarrage du serveur HTTP Apache - Serveur Apache HTTP Version 2.4 - + + + + +

    Serveur Apache HTTP Version 2.4

    +
    <-

    Arrt et redmarrage du serveur HTTP Apache

    +Apache > Serveur HTTP > Documentation > Version 2.4

    Arrt et redmarrage du serveur HTTP Apache

    Langues Disponibles:  de  |  en  | @@ -42,28 +47,29 @@

  • Redmarrage en douceur
  • Redmarrer immdiatement
  • Arrt en douceur
  • -

    Voir aussi

    +

    Voir aussi

    top

    Introduction

    Afin d'arrter ou redmarrer le serveur HTTP Apache, vous devez envoyer un signal aux processus httpd en cours d'excution. Les signaux - peuvent tre envoys de deux manires. Tout d'abord, vous pouvez + peuvent tre envoys de deux manires. La + premire mthode consiste utiliser la commande unix kill pour envoyer directement des signaux aux processus. Vous pouvez remarquer que plusieurs processus httpd s'excutent sur votre systme, mais il vous suffit d'envoyer les signaux au processus parent, dont le PID est enregistr dans le fichier prcis par la directive - PidFile. C'est dire que vous - n'aurez jamais besoin d'envoyer des signaux aucun de ces processus, - sauf au processus parent. Trois types de signaux peuvent tre envoys - au processus parent : + PidFile. Autrement dit, vous + n'aurez jamais besoin d'envoyer des signaux aucun des + processus enfants, mais seulement au processus parent. Quatre types + de signaux peuvent tre envoys au processus parent : TERM, USR1, HUP, et WINCH, qui - sera dcrit plus loin.

    + seront dcrit plus loin.

    Pour envoyer un signal au processus parent, vous devez entrer une commande du style :

    @@ -72,10 +78,10 @@

    La seconde mthode permettant d'envoyer des signaux aux processus httpd - consiste utiliser les options de ligne de commande -k : - stop, - restart, graceful et graceful-stop, - comme dcrit ci-dessous. Ce sont des arguments du binaire + consiste utiliser les options stop, + restart, graceful et + graceful-stop du commutateur -k de la ligne + de commande comme dcrit ci-dessous. Ce sont des arguments du binaire httpd, mais il est recommand de les utiliser avec le script de contrle apachectl, qui se chargera de les passer httpd.

    @@ -96,8 +102,8 @@
    apachectl -k stop
    -

    L'envoi du signal TERM ou stop au - processus parent induit chez celui-ci une tentative immdiate +

    A la rception du signal TERM ou stop, + le processus parent tente immdiatement de tuer tous ses processus enfants. Cela peut durer plusieurs secondes. Aprs cela, le processus parent lui-mme se termine. Toutes les requtes en cours sont termines, et plus aucune autre n'est traite.

    @@ -109,8 +115,9 @@
    apachectl -k graceful
    -

    L'envoi du signal USR1 ou graceful au - processus parent lui fait envoyer aux processus enfants +

    A la rception du signal USR1 ou + graceful, le + processus parent envoie aux processus enfants l'ordre de se terminer une fois leur requte courante traite (ou de se terminer immdiatement s'ils n'ont plus rien traiter). Le processus parent relit ses fichiers de configuration et @@ -131,7 +138,7 @@ enfants n'ont pas t crs, un nombre suffisant de processus supplmentaires est cr pour combler le manque. Ainsi le code tente de maintenir la fois le nombre appropri de processus enfants - en fonction de la charge du serveur, et vos souhaits dfinis par la + en fonction de la charge du serveur, et le nombre de processus dfini par la directive StartServers.

    Les utilisateurs du module mod_status @@ -141,11 +148,12 @@ serveur ne peut pas traiter de nouvelles requtes (elle sont mises en file d'attente par le systme d'exploitation, et ne sont ainsi jamais perdues) et pour respecter vos paramtres de personnalisation. - Afin d'accomplir ceci, il doit conserver le + Pour y parvenir, il doit conserver le tableau utilis pour garder la trace de tous les processus enfants au cours des diffrentes gnrations.

    -

    Le module status utilise aussi un G afin d'indiquer +

    Dans son tat des processus, + le module status utilise aussi un caractre G afin d'indiquer quels processus enfants ont encore des traitements de requtes en cours dbuts avant que l'ordre graceful restart ne soit donn.

    @@ -175,7 +183,7 @@ correctement. Pour vrifier la smantique des fichiers de configuration en plus de leur syntaxe, vous pouvez essayer de dmarrer httpd sous un utilisateur non root. - S'il n'y a pas d'erreurs, il tentera d'ouvrir ses sockets et ses fichiers + S'il n'y a pas d'erreur, il tentera d'ouvrir ses sockets et ses fichiers de log et chouera car il n'a pas les privilges root (ou parce que l'instance actuelle de httpd est dj associe ces ports). S'il choue @@ -190,8 +198,9 @@
    apachectl -k restart
    -

    L'envoi du signal HUP ou restart au - processus parent lui fait tuer ses processus enfants comme pour le signal +

    A la rception du signal HUP ou + restart, le + processus parent tue ses processus enfants comme pour le signal TERM, mais le processus parent ne se termine pas. Il relit ses fichiers de configuration, et rouvre ses fichiers de log. Puis il donne naissance un nouveau jeu de processus enfants @@ -214,8 +223,9 @@ vous recevrez un message concernant ces erreurs.

    apachectl -k graceful-stop
    -

    L'envoi du signal WINCH ou graceful-stop - au processus parent lui fait aviser les processus enfants +

    A la rception du signal WINCH ou + graceful-stop, le + processus parent ordonne ses processus enfants de s'arrter aprs le traitement de leur requte en cours (ou de s'arrter immdiatement s'ils n'ont plus de requte traiter). Le processus parent va alors supprimer son fichier @@ -254,9 +264,9 @@ vous recevrez un message concernant ces erreurs.

    n'crase pas les fichiers des autres instances.

    Vous devez aussi prendre garde aux autres situations de comptition, - comme l'utilisation de l'enregistrement des logs avec un transfert de ceux-ci - dans le style rotation des logs. Plusieurs instances - du programme de rotation des logs qui tentent d'effectuer + comme l'enregistrement des logs avec un transfert de ceux-ci + via un pipe vers le programme rotatelogs. Plusieurs instances + du programme rotatelogs qui tentent d'effectuer une rotation des mmes fichiers de log en mme temps peuvent dtruire mutuellement leurs propres fichiers de log.

    @@ -268,7 +278,28 @@ vous recevrez un message concernant ces erreurs.  ja  |  ko  |  tr 

    - +
    top

    Commentaires

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.ja.utf8 b/docs/manual/stopping.html.ja.utf8 index c8ac937841b..a35df80fb7e 100644 --- a/docs/manual/stopping.html.ja.utf8 +++ b/docs/manual/stopping.html.ja.utf8 @@ -1,25 +1,29 @@ - -停止と再起動 - Apache HTTP サーバ +Apache HTTP Server の停止と再起動 - Apache HTTP サーバ バージョン 2.4 - + + + + +

    Apache HTTP サーバ バージョン 2.4

    +
    <-

    Apache HTTP Server の停止と再起動

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  | @@ -27,14 +31,12 @@  ko  |  tr 

    -
    この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。

    この文書では Unix に類似したシステムでの - Apache の停止と再起動について扱っています。 + Apache HTTP Serverの停止と再起動について扱っています。 Windows NT, 2000, XP ユーザはサービスとして - Apache を実行するで、Windows 9x, MEユーザはコンソールアプリケーションとして - Apache を実行するで、 + httpd を実行するで、Windows 9x, MEユーザはコンソールアプリケーションとして + httpd を実行するで、 これらのプラットホームでの使用方法をご覧下さい。

    +

    参照

    top

    イントロダクション

    -

    Apache を停止したり再起動したりするためには、実行されている +

    Apache HTTP Server を停止したり再起動したりするためには、実行されている httpd プロセスにシグナルを送る必要があります。 シグナルを送るには二つの方法があります。 一つ目はプロセスに直接シグナルを送る unix の kill @@ -221,14 +223,14 @@

    graceful-stop を使うとまったく同一に設定された 複数の httpd を同時に実行することができます。 - Apache を緩やかにアップグレードするのにはとても便利ですが、 + httpd を緩やかにアップグレードするのにはとても便利ですが、 設定ファイルによってはデッドロックやレースコンディションを 引き起こすこともあります。

    -

    ディスク上のファイルを使うもの、たとえば - Lockfile や - ScriptSock - のファイルなどはサーバの PID を含めて管理されていて、 +

    ディスク上のファイルを使うもの、たとえばロックファイル + (Mutex) や Unix ソケットファイル + (ScriptSock) + などはサーバの PID を含めて管理されていて、 共存できるよう注意が払われています。 しかしその他設定ディレクティブやサードパーティ製のモジュール、 CGI ユーティリティのパーシステント層などで @@ -243,14 +245,35 @@

    -

    言語:  de  | +

    翻訳済み言語:  de  |  en  |  es  |  fr  |  ja  |  ko  |  tr 

    -
    +
    top

    コメント

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.ko.euc-kr b/docs/manual/stopping.html.ko.euc-kr index 16c6d54f22d..a4c4de02549 100644 --- a/docs/manual/stopping.html.ko.euc-kr +++ b/docs/manual/stopping.html.ko.euc-kr @@ -1,22 +1,27 @@ - -ߴܰ - Apache HTTP Server +ߴܰ - Apache HTTP Server Version 2.4 - + + + + +

    Apache HTTP Server Version 2.4

    +
    <-
    top

    Ұ

    @@ -203,7 +208,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.html.tr.utf8 b/docs/manual/stopping.html.tr.utf8 index b143d6222a5..a3a305bb6b1 100644 --- a/docs/manual/stopping.html.tr.utf8 +++ b/docs/manual/stopping.html.tr.utf8 @@ -1,22 +1,27 @@ - -Durdurma ve Yeniden Başlatma - Apache HTTP Sunucusu +Apache HTTP Sunucusunun Durdurulması ve Yeniden Başlatılması - Apache HTTP Sunucusu Sürüm 2.4 - + + + + +

    Apache HTTP Sunucusu Sürüm 2.4

    +
    <-

    Durdurma ve Yeniden Başlatma

    +Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Apache HTTP Sunucusunun Durdurulması ve Yeniden Başlatılması

    Mevcut Diller:  de  |  en  | @@ -26,15 +31,13 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -

    Bu belge Apache HTTPd’nin Unix benzeri sistemlerde durdurulması ve - yeniden başlatılması konularını kapsar. Windows NT, 2000 ve XP +

    Bu belge Apache HTTP Sunucusunun Unix benzeri sistemlerde durdurulması + ve yeniden başlatılması konularını kapsar. Windows NT, 2000 ve XP kullanıcıları Apache HTTPd’yi bu platformlarda nasıl denetimlerine - alacaklarını öğrenmek için Apache - HTTPd’nin Bir Hizmet Olarak Çalıştırılması sayfasına, Windows 9x ve - ME kullanıcıları ise Apache - HTTPd’nin Bir Konsol Uygulaması Olarak Çalıştırılması sayfasına + alacaklarını öğrenmek için httpd’nin Bir Hizmet Olarak Çalıştırılması sayfasına, Windows 9x ve + ME kullanıcıları ise httpd’nin + Bir Konsol Uygulaması Olarak Çalıştırılması sayfasına bakabilirler.

    +

    Ayrıca bakınız:

    top

    Giriş

    -

    Apache HTTPd’yi durdurmak ve yeniden başlatmak için çalışan +

    Apache HTTP Sunucusunu durdurmak ve yeniden başlatmak için çalışan httpd süreçlerine bir sinyal göndermeniz gerekir. Sinyal göndermek için iki yol vardır. İlki, süreçlere doğrudan sinyal göndermek için unix kill komutunun kullanımıdır. Bu @@ -219,13 +222,14 @@ haline gelmekteyse de, bazı yapılandırmalarda yarış koşullarının oluşmasına ve kısır çekişmelere (deadlock) sebep olabilir.

    -

    Sunucunun süreç kimliğini içeren Lockfile ve ScriptSock gibi dosyaların disk üzerindeki - mevcudiyetlerinin sorunsuz olarak devam ettiğinden emin olunmaya - çalışılmalıdır. Ayrıca, bir yapılandırma yönergesi, üçüncü parti bir - modül veya kalıcı CGI uygulamalarına ait disk kilit veya durum dosyaları - olabilir; httpd’nin birden fazla kopyasının çalışması - nedeniyle bu dosyaların da üzerine yazılmadığından emin olunmaya - çalışılmalıdır.

    +

    Sunucunun süreç kimliğini içeren kilit dosyaları (Mutex) ve Unix soket dosyaları + (ScriptSock) gibi dosyaların + disk üzerindeki mevcudiyetlerinin sorunsuz olarak devam ettiğinden emin + olunmaya çalışılmalıdır. Ayrıca, bir yapılandırma yönergesi, üçüncü + parti bir modül veya kalıcı CGI uygulamalarına ait disk kilit veya durum + dosyaları olabilir; httpd’nin birden fazla kopyasının + çalışması nedeniyle bu dosyaların da üzerine yazılmadığından emin + olunmaya çalışılmalıdır.

    rotatelogs tarzı borulu günlükleme kullanımı gibi durumlarda yarış koşullarının oluşması olasılığına karşı uyanık @@ -242,7 +246,28 @@  ja  |  ko  |  tr 

    -
    +
    top

    Yorum

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    +
    \ No newline at end of file diff --git a/docs/manual/stopping.xml.fr b/docs/manual/stopping.xml.fr index 66040424f9a..88e4a1024c1 100644 --- a/docs/manual/stopping.xml.fr +++ b/docs/manual/stopping.xml.fr @@ -1,4 +1,4 @@ - + @@ -46,21 +46,22 @@

    Afin d'arrêter ou redémarrer le serveur HTTP Apache, vous devez envoyer un signal aux processus httpd en cours d'exécution. Les signaux - peuvent être envoyés de deux manières. Tout d'abord, vous pouvez + peuvent être envoyés de deux manières. La + première méthode consiste à utiliser la commande unix kill pour envoyer directement des signaux aux processus. Vous pouvez remarquer que plusieurs processus httpd s'exécutent sur votre système, mais il vous suffit d'envoyer les signaux au processus parent, dont le PID est enregistré dans le fichier précisé par la directive - PidFile. C'est à dire que vous - n'aurez jamais besoin d'envoyer des signaux à aucun de ces processus, - sauf au processus parent. Trois types de signaux peuvent être envoyés - au processus parent : + PidFile. Autrement dit, vous + n'aurez jamais besoin d'envoyer des signaux à aucun des + processus enfants, mais seulement au processus parent. Quatre types + de signaux peuvent être envoyés au processus parent : TERM, USR1, HUP, et WINCH, qui - sera décrit plus loin.

    + seront décrit plus loin.

    Pour envoyer un signal au processus parent, vous devez entrer une commande du style :

    @@ -69,10 +70,10 @@

    La seconde méthode permettant d'envoyer des signaux aux processus httpd - consiste à utiliser les options de ligne de commande -k : - stop, - restart, graceful et graceful-stop, - comme décrit ci-dessous. Ce sont des arguments du binaire + consiste à utiliser les options stop, + restart, graceful et + graceful-stop du commutateur -k de la ligne + de commande comme décrit ci-dessous. Ce sont des arguments du binaire httpd, mais il est recommandé de les utiliser avec le script de contrôle apachectl, qui se chargera de les passer à httpd.

    @@ -93,8 +94,8 @@
    apachectl -k stop
    -

    L'envoi du signal TERM ou stop au - processus parent induit chez celui-ci une tentative immédiate +

    A la réception du signal TERM ou stop, + le processus parent tente immédiatement de tuer tous ses processus enfants. Cela peut durer plusieurs secondes. Après cela, le processus parent lui-même se termine. Toutes les requêtes en cours sont terminées, et plus aucune autre n'est traitée.

    @@ -106,8 +107,9 @@
    apachectl -k graceful
    -

    L'envoi du signal USR1 ou graceful au - processus parent lui fait envoyer aux processus enfants +

    A la réception du signal USR1 ou + graceful, le + processus parent envoie aux processus enfants l'ordre de se terminer une fois leur requête courante traitée (ou de se terminer immédiatement s'ils n'ont plus rien à traiter). Le processus parent relit ses fichiers de configuration et @@ -129,7 +131,7 @@ enfants n'ont pas été créés, un nombre suffisant de processus supplémentaires est créé pour combler le manque. Ainsi le code tente de maintenir à la fois le nombre approprié de processus enfants - en fonction de la charge du serveur, et vos souhaits définis par la + en fonction de la charge du serveur, et le nombre de processus défini par la directive StartServers.

    Les utilisateurs du module mod_status @@ -139,11 +141,12 @@ serveur ne peut pas traiter de nouvelles requêtes (elle sont mises en file d'attente par le système d'exploitation, et ne sont ainsi jamais perdues) et pour respecter vos paramètres de personnalisation. - Afin d'accomplir ceci, il doit conserver le + Pour y parvenir, il doit conserver le tableau utilisé pour garder la trace de tous les processus enfants au cours des différentes générations.

    -

    Le module status utilise aussi un G afin d'indiquer +

    Dans son état des processus, + le module status utilise aussi un caractère G afin d'indiquer quels processus enfants ont encore des traitements de requêtes en cours débutés avant que l'ordre graceful restart ne soit donné.

    @@ -173,7 +176,7 @@ correctement. Pour vérifier la sémantique des fichiers de configuration en plus de leur syntaxe, vous pouvez essayer de démarrer httpd sous un utilisateur non root. - S'il n'y a pas d'erreurs, il tentera d'ouvrir ses sockets et ses fichiers + S'il n'y a pas d'erreur, il tentera d'ouvrir ses sockets et ses fichiers de log et échouera car il n'a pas les privilèges root (ou parce que l'instance actuelle de httpd est déjà associée à ces ports). S'il échoue @@ -188,8 +191,9 @@
    apachectl -k restart
    -

    L'envoi du signal HUP ou restart au - processus parent lui fait tuer ses processus enfants comme pour le signal +

    A la réception du signal HUP ou + restart, le + processus parent tue ses processus enfants comme pour le signal TERM, mais le processus parent ne se termine pas. Il relit ses fichiers de configuration, et réouvre ses fichiers de log. Puis il donne naissance à un nouveau jeu de processus enfants @@ -212,8 +216,9 @@ vous recevrez un message concernant ces erreurs.

    apachectl -k graceful-stop
    -

    L'envoi du signal WINCH ou graceful-stop - au processus parent lui fait aviser les processus enfants +

    A la réception du signal WINCH ou + graceful-stop, le + processus parent ordonne à ses processus enfants de s'arrêter après le traitement de leur requête en cours (ou de s'arrêter immédiatement s'ils n'ont plus de requête à traiter). Le processus parent va alors supprimer son fichier @@ -254,9 +259,9 @@ vous recevrez un message concernant ces erreurs. n'écrase pas les fichiers des autres instances.

    Vous devez aussi prendre garde aux autres situations de compétition, - comme l'utilisation de l'enregistrement des logs avec un transfert de ceux-ci - dans le style rotation des logs. Plusieurs instances - du programme de rotation des logs qui tentent d'effectuer + comme l'enregistrement des logs avec un transfert de ceux-ci + via un pipe vers le programme rotatelogs. Plusieurs instances + du programme rotatelogs qui tentent d'effectuer une rotation des mêmes fichiers de log en même temps peuvent détruire mutuellement leurs propres fichiers de log.

    diff --git a/docs/manual/stopping.xml.ja b/docs/manual/stopping.xml.ja index 17f64bb59be..d03b1dd01a9 100644 --- a/docs/manual/stopping.xml.ja +++ b/docs/manual/stopping.xml.ja @@ -1,7 +1,7 @@ - + + + status CDATA #IMPLIED + name CDATA #IMPLIED > @@ -165,6 +168,9 @@ program | img | cite | q | dfn | var | transnote | glossary | phonetic"> + + + - @@ -264,7 +263,7 @@ - + diff --git a/docs/manual/style/lang/da.xml b/docs/manual/style/lang/da.xml index 8f00f1bbf4e..c7be52ae55e 100644 --- a/docs/manual/style/lang/da.xml +++ b/docs/manual/style/lang/da.xml @@ -25,12 +25,14 @@ .xml.da .html.da + ISO-8859-1 @@ -70,6 +72,10 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ NAVN + Bugfix checklist + httpd changelog + Known issues + Report a bug Syntaks @@ -99,6 +105,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Direktiv Dette modul har ingen direktiver. @@ -116,6 +125,7 @@ Google Sgning Indeks Hjem + Kommentarer Apache @@ -140,6 +150,15 @@ The documentation for this directive has not been translated yet. Please have a look at the English version. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/de.xml b/docs/manual/style/lang/de.xml index dea4e44d019..653f3db0dc8 100644 --- a/docs/manual/style/lang/de.xml +++ b/docs/manual/style/lang/de.xml @@ -67,6 +67,10 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ NAME + Bugfix checklist + httpd changelog + Known issues + Report a bug Syntax @@ -96,6 +100,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Direktive Dieses Modul enthält keine Direktiven. @@ -117,6 +124,7 @@ Google-Suche Index Startseite + Kommentare Apache @@ -143,5 +151,14 @@ Die Dokumentation zu dieser Direktive wurde noch nicht übersetzt. Bitte schauen Sie in die englische Version. + + + Bitte beachten! + +

    Dieses Dokument bezieht sich auf Version 2.0 des Apache httpd, die nicht mehr gepflegt wird. Bitte aktualisieren Sie die Software und verwenden Sie stattdessen eine aktuelle Version des httpd, die an folgender Stelle dokumentiert ist:

    +
    + Dokumentation des Apache HTTP Server für die zuletzt erschienene Version + Sie knnen diesem Link folgen, um zur aktuellen Version dieses Dokuments zu gelangen. + diff --git a/docs/manual/style/lang/en.xml b/docs/manual/style/lang/en.xml index 7596458b9a6..46715152975 100644 --- a/docs/manual/style/lang/en.xml +++ b/docs/manual/style/lang/en.xml @@ -71,6 +71,10 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ NAME + Bugfix checklist + httpd changelog + Known issues + Report a bug Syntax @@ -100,6 +104,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Directive This module provides no directives. @@ -118,6 +125,7 @@ Google Search Index Home + Comments Apache @@ -143,5 +151,14 @@ The documentation for this directive has not been translated yet. Please have a look at the English version. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/es.xml b/docs/manual/style/lang/es.xml index dabc66ff791..8b9f7bd1bfc 100644 --- a/docs/manual/style/lang/es.xml +++ b/docs/manual/style/lang/es.xml @@ -1,7 +1,8 @@ - + - - + + + - Español + Español - Funcionalidad Básica y Módulos - de MultiProcesamiento - Otros Módulos - Módulos Obsoletos + Funcionalidad Básica y Módulos + de Multi-Procesamiento + Otros Módulos + Módulos Obsoletos - Módulos Obsoletos de + Módulos Obsoletos de Apache - Módulo Apache - Funcionalidad Básica de Apache + Módulo Apache + Funcionalidad Básica de Apache Directivas Comunes de los MPM de Apache MPM de Apache - Descripción - Consulte también + Descripción + Consulte también Temas Estado - Identificador de Módulos - Fichero de Código Fuente + Identificador de Módulos + Ficheros de Código Fuente Compatibilidad - Módulos Relacionados + Módulos Relacionados Directivas Relacionadas abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ - NAME - + NOMBRE + Cesura + Lista de Bugs + lista de cambios en httpd + Problemas conocidos + Reportar un bug Sintaxis @@ -76,20 +81,20 @@ Contexto Prevalece sobre Estado - Módulo + Módulo Base MPM Core - Extensión + Extensión Experimental - External + Externo server config virtual host - directory + directorio .htaccess @@ -98,8 +103,11 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Directiva - Este módulo no suministra ninguna + Este módulo no suministra ninguna directiva. @@ -109,39 +117,50 @@ ver glosario - - Servidor HTTP Apache - Versión &httpd.major;.&httpd.minor; + - Servidor Apache HTTP + Versión &httpd.major;.&httpd.minor; del Servidor HTTP Apache - [APACHE DOCUMENTATION] + [DOCUMENTACIÓN DE APACHE] Buscar en Google - Índice - Página Inicial + Índice + Página Principal + Comentarios Apache Servidor HTTP - Documentación - Versión &httpd.major;.&httpd.minor; + Documentación + Versión &httpd.major;.&httpd.minor; - Módulos + Módulos Preguntas Frecuentes Glosario - Mapa de este sitio web + Mapa del sitio web - Licencia bajo los términos de la + Licencia bajo los términos de Idiomas disponibles - Esta traducción podría estar - obsoleta. Consulte la versión en inglés de la - documentación para comprobar si se han producido cambios + Esta traducción podría estar + obsoleta. Consulte la versión en inglés de la + documentación para comprobar si se han producido cambios recientemente. - The documentation for this directive has - not been translated yet. Please have a look at the English - version. + La Documentación para esta directiva + no ha sido traducida aún. Por favor use la versión en inglés + mientras tanto. + + + + Por favor Nota + +

    Esta documentación hace referencia a la versión 2.0 de Apache httpd, que ya no tiene soporte ni es mantenida. Actualice,y consulte la versión actual de httpd en su lugar, documentado en:

    +
    + Versión actual de la documentación de Apache HTTP Server + Usted puede seguir este enlace para ir a la versión actual de este documento. +
    diff --git a/docs/manual/style/lang/fr.xml b/docs/manual/style/lang/fr.xml index 1a8ada058ae..55c8eabf3e7 100644 --- a/docs/manual/style/lang/fr.xml +++ b/docs/manual/style/lang/fr.xml @@ -1,6 +1,6 @@ - + Syntaxe @@ -102,7 +104,10 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> - Directive + + Directive Ce module ne fournit aucune directive. @@ -119,6 +124,7 @@ Recherche Google Index Accueil + Commentaires Apache @@ -144,5 +150,14 @@ La documentation de cette directive n'a pas encore été traduite. Veuillez vous reporter à la version en langue anglaise. + + + A savoir + +

    Ce document concerne la version 2.0 du serveur HTTP Apache et celle-ci n'est plus maintenue. Si vous utilisez cette version, il est fortement recommandé de mettre à jour votre serveur vers la version actuelle (2.4), et de consulter la documentation correspondante ici :

    +
    + Version actuelle de la documentation du serveur HTTP Apache + Pour consulter la version actuelle de ce document, vous pouvez suivre ce lien. + diff --git a/docs/manual/style/lang/ja.xml b/docs/manual/style/lang/ja.xml index 100f03ad0e5..060bf2d5a24 100644 --- a/docs/manual/style/lang/ja.xml +++ b/docs/manual/style/lang/ja.xml @@ -1,6 +1,6 @@ - + 構文 @@ -95,6 +99,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + ディレクティブ このモジュールにディレクティブはありません。 @@ -115,13 +122,13 @@ Google 検索 索引 ホーム + コメント Apache HTTP サーバ ドキュメンテーション - バージョン - &httpd.major;.&httpd.minor; + バージョン &httpd.major;.&httpd.minor; モジュール @@ -130,16 +137,27 @@ サイトマップ - Licensed under the - - 言語 + この文書は + のライセンスで提供されています。 + 翻訳済み言語 - この日本語訳はすでに古くなっている可能性があります。 - 更新された内容を見るには英語版をご覧下さい。 + この日本語訳はすでに古くなっている + 可能性があります。 + 最近更新された内容を見るには英語版をご覧下さい。 + - The documentation for this directive has - not been translated yet. Please have a look at the English - version. + このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 + + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/ko.xml b/docs/manual/style/lang/ko.xml index ad2862dc5d1..b219246ffb7 100644 --- a/docs/manual/style/lang/ko.xml +++ b/docs/manual/style/lang/ko.xml @@ -72,6 +72,10 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ NAME + Bugfix checklist + httpd changelog + Known issues + Report a bug @@ -101,6 +105,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + þ ⿡ þ ϴ. @@ -121,6 +128,7 @@ Google ˻ Index Home + Comments Apache @@ -146,5 +154,14 @@ The documentation for this directive has not been translated yet. Please have a look at the English version. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/pt-br.xml b/docs/manual/style/lang/pt-br.xml index ec98a1406fc..d2e4ad54862 100644 --- a/docs/manual/style/lang/pt-br.xml +++ b/docs/manual/style/lang/pt-br.xml @@ -70,6 +70,10 @@ Módulos Relacionados Diretrizes Relacionadas + Bugfix checklist + httpd changelog + Known issues + Report a bug Sintaxe @@ -99,6 +103,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Diretrizes Esse módulo não fornece nenhuma diretriz. @@ -116,6 +123,7 @@ Busca Google Índice Início + Comentrios Apache @@ -141,5 +149,14 @@ The documentation for this directive has not been translated yet. Please have a look at the English version. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/ru.xml b/docs/manual/style/lang/ru.xml index 0f83540a596..0a7d3df89cd 100644 --- a/docs/manual/style/lang/ru.xml +++ b/docs/manual/style/lang/ru.xml @@ -70,6 +70,10 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ NAME + Bugfix checklist + httpd changelog + Known issues + Report a bug @@ -95,6 +99,13 @@ + + . @@ -113,6 +124,7 @@ Google Search + Comments Apache @@ -138,5 +150,14 @@ The documentation for this directive has not been translated yet. Please have a look at the English version. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/tr.xml b/docs/manual/style/lang/tr.xml index 9e6743e25fc..68d05bec1a8 100644 --- a/docs/manual/style/lang/tr.xml +++ b/docs/manual/style/lang/tr.xml @@ -30,7 +30,7 @@ 0x41f Turkish - ,8,0 + ,8,162 windows-1254 Turkish @@ -73,6 +73,10 @@ ABCÇDEFGĞHIİJKLMNOÖPQRSŞTUÜVWXYZ İSİM .nh + Bugfix checklist + httpd changelog + Known issues + Report a bug Sözdizimi @@ -102,6 +106,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + Yönergesi Bu modül yönerge içermez. @@ -119,6 +126,7 @@ Google’de Ara Dizin Baş Sayfa + Yorum Apache @@ -142,5 +150,14 @@ Bu yönergenin belgesi henüz Türkçeye çevrilmedi. Lütfen İngilizce sürümüne bakınız. + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/lang/zh-cn.xml b/docs/manual/style/lang/zh-cn.xml index 9da858308bd..04b7f851d4a 100644 --- a/docs/manual/style/lang/zh-cn.xml +++ b/docs/manual/style/lang/zh-cn.xml @@ -1,6 +1,5 @@ - 语法 @@ -98,6 +101,9 @@ if present, the space between and 'Directive' in directivesynopsis headings will be replaced by the given string. (see de.xml for an example) --> + 指令 此模块没有提供指令。 @@ -115,6 +121,7 @@ Google 搜索 索引 主页 + 评论 Apache @@ -137,5 +144,14 @@ 此翻译可能过期。要了解最近的更改,请阅读英文版。 此指令的文档还没有被翻译。请阅读英文版。 + + + Please note + +

    This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:

    +
    + Current release version of Apache HTTP Server documentation + You may follow this link to go to the current version of this document. + diff --git a/docs/manual/style/latex/common.xsl b/docs/manual/style/latex/common.xsl index a0f10cbb87c..15c8946f8d9 100644 --- a/docs/manual/style/latex/common.xsl +++ b/docs/manual/style/latex/common.xsl @@ -78,14 +78,14 @@ select="$metafile/basename"/> \par\smallskip\begin{center} -\fbox{ +\fbox{ \begin{minipage}{.8\textwidth}\begin{flushleft} {\ttfamily\small \noindent } \end{flushleft}\end{minipage} -} +} \end{center}\par\smallskip @@ -142,17 +142,64 @@ select="$metafile/basename"/> \textsc{ - \textless{} - \hyperlink{/mod/ - - : - - }{ - - } - \textgreater{} +\textless{} + + + \hyperlink{/mod/ + + : + + + + + + + + + }{ + + } + + + + + +\textgreater{} +} + + + +\textsc{ +\textless{} + + + \hyperlink{/mod/ + + : + + + + + + + + + }{ + + } + + + + + +\textgreater{} } + @@ -160,12 +207,39 @@ select="$metafile/basename"/> -\textsc{\hyperlink{/mod/ - - }{ + + + \textsc{ } -} + + + \textsc{\hyperlink{/mod/ + + }{ + + } + } + + + + + + + + \textsc{ + + } + + + \textsc{\hyperlink{/mod/ + + }{ + + } + } + + diff --git a/docs/manual/style/latex/directiveindex.xsl b/docs/manual/style/latex/directiveindex.xsl index b97c346a436..e0981ceb193 100644 --- a/docs/manual/style/latex/directiveindex.xsl +++ b/docs/manual/style/latex/directiveindex.xsl @@ -23,39 +23,10 @@ - + - + - - - - - - - - - - \begin{itemize} - - - - - -\item - - (p.\ \pageref{/mod/ - : - - }) - - - \end{itemize} - - diff --git a/docs/manual/style/latex/html.xsl b/docs/manual/style/latex/html.xsl index c77f1ec3a92..e610fad6db1 100644 --- a/docs/manual/style/latex/html.xsl +++ b/docs/manual/style/latex/html.xsl @@ -1,4 +1,7 @@ + +]> + + -\begin{itemize} - +\begin{itemize}&lf; -\end{itemize} - +\end{itemize}&lf; -\begin{enumerate} - +\begin{enumerate}&lf; -\end{enumerate} - +\end{enumerate}&lf; \item - - +&lf; -\begin{description} - +\begin{description}&lf; -\end{description} - +\end{description}&lf; @@ -66,10 +65,24 @@ + + + + + + + + + + + + - + + + \smallskip @@ -82,7 +95,8 @@ - \\ + + @@ -90,7 +104,8 @@ - \\ + + @@ -98,45 +113,69 @@ -\par - +\par&lf; - + \texttt{ } + +\texttt{ + +} + + \textbf{ } - + +\textbf{ + +} + + + \textit{ - + } + - -\begin{verbatim} - - -\end{verbatim} - + +\begin{verbatim} + + + + + + + + + + + + + + + + + +\end{verbatim}&lf; -\begin{quotation} - +\begin{quotation}&lf; -\end{quotation} - +\end{quotation}&lf; @@ -169,13 +208,11 @@ interpreted in pre --> -|}\hline - +|}\hline&lf; \hline\end{ -} - +}&lf; @@ -184,8 +221,7 @@ interpreted in pre --> \hline - - + &lf; @@ -244,31 +280,62 @@ interpreted in pre --> 3. It is also necessary to deal with the fact that index pages get references as "/". --> + + + + + + + + + + + + + + + + + + + - - + + - + - + \footnote{ \href{ - - - + + + + + + + + + + + + + + + }{ @@ -310,6 +377,14 @@ interpreted in pre --> + + + + + + + + \includegraphics{ diff --git a/docs/manual/style/latex/latex.xsl b/docs/manual/style/latex/latex.xsl index 7eb44a0241b..d9be4d7fa17 100644 --- a/docs/manual/style/latex/latex.xsl +++ b/docs/manual/style/latex/latex.xsl @@ -1,5 +1,6 @@ %HTTPD-VERSION; ]> @@ -74,6 +75,11 @@ \setlength{\parindent}{0ex} \addtolength{\parskip}{1.2ex} +% Make space in TOC between section numbers and section title (large numbers!) +\makeatletter +\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{3.6em}} +\makeatother + % Shrink the inter-item spaces \AfterBegin{itemize}{\setlength{\itemsep}{0em}} @@ -142,27 +148,34 @@ Server Documentation Project. More information is available at } - + + \include{mod/module-dict}&lf; + \include{mod/directive-dict}&lf; + + \include{mod/index}&lf; + \include{mod/quickreference}&lf; + \end{document} -\include{ - - - - - - - - -} - + + \include{ + + + + + + + + + }&lf; + @@ -178,8 +191,7 @@ Server Documentation Project. More information is available at \include{mod/ -} - +}&lf; @@ -211,6 +223,12 @@ Server Documentation Project. More information is available at + + + + + + @@ -330,7 +348,10 @@ Server Documentation Project. More information is available at - + + + + @@ -378,6 +399,8 @@ Server Documentation Project. More information is available at + + diff --git a/docs/manual/style/latex/quickreference.xsl b/docs/manual/style/latex/quickreference.xsl index e69d78f9d2e..fc9c2bd8283 100644 --- a/docs/manual/style/latex/quickreference.xsl +++ b/docs/manual/style/latex/quickreference.xsl @@ -1,4 +1,7 @@ + +]> - \end{longtable} -\normalsize + \end{longtable}&lf; + \normalsize diff --git a/docs/manual/style/latex/synopsis.xsl b/docs/manual/style/latex/synopsis.xsl index dd1ddddb7fe..5ba989bdc25 100644 --- a/docs/manual/style/latex/synopsis.xsl +++ b/docs/manual/style/latex/synopsis.xsl @@ -173,7 +173,11 @@ \subsection*{ - + + + + + @@ -183,7 +187,25 @@ - + + + + + + + + + + + + + + + + + + + }\label{ }\hypertarget{ @@ -208,7 +230,7 @@ : & {\ttfamily - + }\\ diff --git a/docs/manual/style/manual.da.xsl b/docs/manual/style/manual.da.xsl index 6b687ea4eaf..9d1d93d0252 100644 --- a/docs/manual/style/manual.da.xsl +++ b/docs/manual/style/manual.da.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.de.xsl b/docs/manual/style/manual.de.xsl index 0b1667ad276..bae43d81a80 100644 --- a/docs/manual/style/manual.de.xsl +++ b/docs/manual/style/manual.de.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.en.xsl b/docs/manual/style/manual.en.xsl index c3d88747520..ea9fde85ac2 100644 --- a/docs/manual/style/manual.en.xsl +++ b/docs/manual/style/manual.en.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.es.xsl b/docs/manual/style/manual.es.xsl index e25c97035db..50f61f8dce7 100644 --- a/docs/manual/style/manual.es.xsl +++ b/docs/manual/style/manual.es.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.fr.xsl b/docs/manual/style/manual.fr.xsl index 0a6444153e8..9bd43d8e232 100644 --- a/docs/manual/style/manual.fr.xsl +++ b/docs/manual/style/manual.fr.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.ja.xsl b/docs/manual/style/manual.ja.xsl index 1c675867194..ca5db3851fd 100644 --- a/docs/manual/style/manual.ja.xsl +++ b/docs/manual/style/manual.ja.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.ko.xsl b/docs/manual/style/manual.ko.xsl index b4e69d92191..25353d3e5b1 100644 --- a/docs/manual/style/manual.ko.xsl +++ b/docs/manual/style/manual.ko.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.pt-br.xsl b/docs/manual/style/manual.pt-br.xsl index a6be5add420..24c86e7ddc2 100644 --- a/docs/manual/style/manual.pt-br.xsl +++ b/docs/manual/style/manual.pt-br.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.ru.xsl b/docs/manual/style/manual.ru.xsl index 53adbad960c..5e2f208be45 100644 --- a/docs/manual/style/manual.ru.xsl +++ b/docs/manual/style/manual.ru.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.tr.xsl b/docs/manual/style/manual.tr.xsl index 2fc297c969a..3f8d878f941 100644 --- a/docs/manual/style/manual.tr.xsl +++ b/docs/manual/style/manual.tr.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manual.zh-cn.xsl b/docs/manual/style/manual.zh-cn.xsl index 613165337c9..5c0e7e91253 100644 --- a/docs/manual/style/manual.zh-cn.xsl +++ b/docs/manual/style/manual.zh-cn.xsl @@ -1,5 +1,4 @@ - diff --git a/docs/manual/style/manualpage.dtd b/docs/manual/style/manualpage.dtd index 17742548fb0..e9c22a044b3 100644 --- a/docs/manual/style/manualpage.dtd +++ b/docs/manual/style/manualpage.dtd @@ -24,4 +24,6 @@ - + diff --git a/docs/manual/style/modulesynopsis.dtd b/docs/manual/style/modulesynopsis.dtd index 50841cadf76..4dac5efc411 100644 --- a/docs/manual/style/modulesynopsis.dtd +++ b/docs/manual/style/modulesynopsis.dtd @@ -24,7 +24,8 @@ identifier? , compatibility? , summary? , seealso* , section*, directivesynopsis*)> - + prettify.min.js + +# needs python and rjsmin installed diff --git a/docs/manual/style/scripts/prettify.js b/docs/manual/style/scripts/prettify.js new file mode 100644 index 00000000000..2fa959a0d89 --- /dev/null +++ b/docs/manual/style/scripts/prettify.js @@ -0,0 +1,1622 @@ +// Copyright (C) 2006 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +/** + * @fileoverview + * some functions for browser-side pretty printing of code contained in html. + * + *

    + * For a fairly comprehensive set of languages see the + * README + * file that came with this source. At a minimum, the lexer should work on a + * number of languages including C and friends, Java, Python, Bash, SQL, HTML, + * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk + * and a subset of Perl, but, because of commenting conventions, doesn't work on + * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. + *

    + * Usage:

      + *
    1. include this source file in an html page via + * {@code } + *
    2. define style rules. See the example page for examples. + *
    3. mark the {@code
      } and {@code } tags in your source with
      + *    {@code class=prettyprint.}
      + *    You can also use the (html deprecated) {@code } tag, but the pretty
      + *    printer needs to do more substantial DOM manipulations to support that, so
      + *    some css styles may not be preserved.
      + * </ol>
      + * That's it.  I wanted to keep the API as simple as possible, so there's no
      + * need to specify which language the code is in, but if you wish, you can add
      + * another class to the {@code <pre>} or {@code <code>} element to specify the
      + * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
      + * starts with "lang-" followed by a file extension, specifies the file type.
      + * See the "lang-*.js" files in this directory for code that implements
      + * per-language file handlers.
      + * <p>
      + * Change log:<br>
      + * cbeust, 2006/08/22
      + * <blockquote>
      + *   Java annotations (start with "@") are now captured as literals ("lit")
      + * </blockquote>
      + * @requires console
      + */
      +
      +// JSLint declarations
      +/*global console, document, navigator, setTimeout, window, define */
      +
      +/**
      + * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
      + * UI events.
      + * If set to {@code false}, {@code prettyPrint()} is synchronous.
      + */
      +window['PR_SHOULD_USE_CONTINUATION'] = true;
      +
      +/**
      + * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
      + * {@code class=prettyprint} and prettify them.
      + *
      + * @param {Function?} opt_whenDone if specified, called when the last entry
      + *     has been finished.
      + */
      +var prettyPrintOne;
      +/**
      + * Pretty print a chunk of code.
      + *
      + * @param {string} sourceCodeHtml code as html
      + * @return {string} code as html, but prettier
      + */
      +var prettyPrint;
      +
      +
      +(function () {
      +  var win = window;
      +  // Keyword lists for various languages.
      +  // We use things that coerce to strings to make them compact when minified
      +  // and to defeat aggressive optimizers that fold large string constants.
      +  var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
      +  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," + 
      +      "double,enum,extern,float,goto,int,long,register,short,signed,sizeof,module," +
      +      "static,struct,switch,typedef,union,unsigned,void,volatile"];
      +  var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
      +      "new,operator,private,protected,public,this,throw,true,try,typeof"];
      +  var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
      +      "concept,concept_map,const_cast,constexpr,decltype," +
      +      "dynamic_cast,explicit,export,friend,inline,late_check," +
      +      "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
      +      "template,typeid,typename,using,virtual,where,request_req"];
      +  var JAVA_KEYWORDS = [COMMON_KEYWORDS,
      +      "abstract,boolean,byte,extends,final,finally,implements,import," +
      +      "instanceof,null,native,package,strictfp,super,synchronized,throws," +
      +      "transient"];
      +  var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
      +      "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
      +      "fixed,foreach,from,group,implicit,in,interface,internal,into,is,let," +
      +      "lock,object,out,override,orderby,params,partial,readonly,ref,sbyte," +
      +      "sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort," +
      +      "var,virtual,where"];
      +  var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
      +      "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
      +      "throw,true,try,unless,until,when,while,yes";
      +  var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
      +      "debugger,eval,export,function,get,null,set,undefined,var,with," +
      +      "Infinity,NaN"];
      +  var PERL_KEYWORDS = "caller,delete,die,do,dump,else,elsif,eval,exit,foreach,for," +
      +      "goto,if,import,last,local,my,next,no,our,print,printf,package,redo,require," +
      +      "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
      +  var PHP_KEYWORDS = "abstract,and,array,as,break,case,catch,cfunction,class," +
      +      "clone,const,continue,declare,default,do,else,elseif,enddeclare,endfor," + 
      +      "endforeach,endif,endswitch,endwhile,extends,final,for,foreach,function," +
      +      "global,goto,if,implements,interface,instanceof,namespace,new,old_function," +
      +      "or,private,protected,public,static,switch,throw,try,use,var,while,xor," + 
      +      "die,echo,empty,exit,eval,include,include_once,isset,list,require," + 
      +      "require_once,return,print,unset";
      +  var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
      +      "elif,except,exec,finally,from,global,import,in,is,lambda," +
      +      "nonlocal,not,or,pass,print,raise,try,with,yield," +
      +      "False,True,None"];
      +  var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
      +      "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
      +      "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
      +      "BEGIN,END"];
      +  var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
      +      "function,in,local,set,then,until,echo"];
      +  var CONFIG_ENVS = ["User-Agent,HTTP_USER_AGENT,HTTP_REFERER,HTTP_COOKIE,HTTP_FORWARDED,HTTP_HOST,HTTP_PROXY_CONNECTION,HTTP_ACCEPT,REMOTE_ADDR,REMOTE_HOST,REMOTE_PORT,REMOTE_USER,REMOTE_IDENT,REQUEST_METHOD,SCRIPT_FILENAME,PATH_INFO,QUERY_STRING,AUTH_TYPE,DOCUMENT_ROOT,SERVER_ADMIN,SERVER_NAME,SERVER_ADDR,SERVER_PORT,SERVER_PROTOCOL,SERVER_SOFTWARE,TIME_YEAR,TIME_MON,TIME_DAY,TIME_HOUR,TIME_MIN,TIME_SEC,TIME_WDAY,TIME,API_VERSION,THE_REQUEST,REQUEST_URI,REQUEST_FILENAME,IS_SUBREQ,HTTPS,REQUEST_SCHEME"];
      +  var CONFIG_KEYWORDS = ["Macro,UndefMacro,Use,AuthLDAPURL,AcceptFilter,AcceptPathInfo,AccessFileName,Action,AddAlt,AddAltByEncoding,AddAltByType,AddCharset,AddDefaultCharset,AddDescription,AddEncoding,AddHandler,AddIcon,AddIconByEncoding,AddIconByType,AddInputFilter,AddLanguage,AddModuleInfo,AddOutputFilter,AddOutputFilterByType,AddType,Alias,AliasMatch,Allow,AllowCONNECT,AllowEncodedSlashes,AllowMethods,AllowOverride,AllowOverrideList,Anonymous,Anonymous_LogEmail,Anonymous_MustGiveEmail,Anonymous_NoUserID,Anonymous_VerifyEmail,AsyncRequestWorkerFactor,AuthBasicAuthoritative,AuthBasicProvider,AuthDBDUserPWQuery,AuthDBDUserRealmQuery,AuthDBMGroupFile,AuthDBMType,AuthDBMUserFile,AuthDigestAlgorithm,AuthDigestDomain,AuthDigestNcCheck,AuthDigestNonceFormat,AuthDigestNonceLifetime,AuthDigestProvider,AuthDigestQop,AuthDigestShmemSize,AuthFormAuthoritative,AuthFormBody,AuthFormDisableNoStore,AuthFormFakeBasicAuth,AuthFormLocation,AuthFormLoginRequiredLocation,AuthFormLoginSuccessLocation,AuthFormLogoutLocation,AuthFormMethod,AuthFormMimetype,AuthFormPassword,AuthFormProvider,AuthFormSitePassphrase,AuthFormSize,AuthFormUsername,AuthGroupFile,AuthLDAPAuthorizePrefix,AuthLDAPBindAuthoritative,AuthLDAPBindDN,AuthLDAPBindPassword,AuthLDAPCharsetConfig,AuthLDAPCompareAsUser,AuthLDAPCompareDNOnServer,AuthLDAPDereferenceAliases,AuthLDAPGroupAttribute,AuthLDAPGroupAttributeIsDN,AuthLDAPInitialBindAsUser,AuthLDAPInitialBindPattern,AuthLDAPMaxSubGroupDepth,AuthLDAPRemoteUserAttribute,AuthLDAPRemoteUserIsDN,AuthLDAPSearchAsUser,AuthLDAPSubGroupAttribute,AuthLDAPSubGroupClass,AuthLDAPUrl,AuthMerging,AuthName,AuthnCacheContext,AuthnCacheEnable,AuthnCacheProvideFor,AuthnCacheSOCache,AuthnCacheTimeout,<AuthnProviderAlias>,AuthType,AuthUserFile,AuthzDBDLoginToReferer,AuthzDBDQuery,AuthzDBDRedirectQuery,AuthzDBMType,<AuthzProviderAlias>,AuthzSendForbiddenOnFailure,BalancerGrowth,BalancerMember,BrowserMatch,BrowserMatchNoCase,BufferedLogs,BufferSize,CacheDefaultExpire,CacheDetailHeader,CacheDirLength,CacheDirLevels,CacheDisable,CacheEnable,CacheFile,CacheHeader,CacheIgnoreCacheControl,CacheIgnoreHeaders,CacheIgnoreNoLastMod,CacheIgnoreQueryString,CacheIgnoreURLSessionIdentifiers,CacheKeyBaseURL,CacheLastModifiedFactor,CacheLock,CacheLockMaxAge,CacheLockPath,CacheMaxExpire,CacheMaxFileSize,CacheMinExpire,CacheMinFileSize,CacheNegotiatedDocs,CacheQuickHandler,CacheReadSize,CacheReadTime,CacheRoot,CacheStaleOnError,CacheStoreExpired,CacheStoreNoStore,CacheStorePrivate,CGIMapExtension,CharsetDefault,CharsetOptions,CharsetSourceEnc,CheckCaseOnly,CheckSpelling,ChrootDir,ContentDigest,CookieDomain,CookieExpires,CookieName,CookieStyle,CookieTracking,CoreDumpDirectory,CustomLog,Dav,DavDepthInfinity,DavGenericLockDB,DavLockDB,DavMinTimeout,DBDExptime,DBDInitSQL,DBDKeep,DBDMax,DBDMin,DBDParams,DBDPersist,DBDPrepareSQL,DBDriver,DefaultIcon,DefaultLanguage,DefaultRuntimeDir,DefaultType,Define,DeflateBufferSize,DeflateCompressionLevel,DeflateFilterNote,DeflateMemLevel,DeflateWindowSize,Deny,<Directory>,DirectoryIndex,DirectoryIndexRedirect,<DirectoryMatch>,DirectorySlash,DocumentRoot,DTracePrivileges,DumpIOInput,DumpIOOutput,<Else>,<ElseIf>,EnableExceptionHook,EnableMMAP,EnableSendfile,Error,ErrorDocument,ErrorLog,ErrorLogFormat,Example,ExpiresActive,ExpiresByType,ExpiresDefault,ExtendedStatus,ExtFilterDefine,ExtFilterOptions,FallbackResource,FileETag,<Files>,<FilesMatch>,FilterChain,FilterDeclare,FilterProtocol,FilterProvider,FilterTrace,ForceLanguagePriority,ForceType,ForensicLog,GprofDir,GracefulShutdownTimeout,Group,Header,HeaderName,HeartbeatAddress,HeartbeatListen,HeartbeatMaxServers,HeartbeatStorage,HeartbeatStorage,HostnameLookups,IdentityCheck,IdentityCheckTimeout,<If>,<IfDefine>,<IfModule>,<IfVersion>,ImapBase,ImapDefault,ImapMenu,Include,IncludeOptional,IndexHeadInsert,IndexIgnore,IndexIgnoreReset,IndexOptions,IndexOrderDefault,IndexStyleSheet,InputSed,ISAPIAppendLogToErrors,ISAPIAppendLogToQuery,ISAPICacheFile,ISAPIFakeAsync,ISAPILogNotSupported,ISAPIReadAheadBuffer,KeepAlive,KeepAliveTimeout,KeptBodySize,LanguagePriority,LDAPCacheEntries,LDAPCacheTTL,LDAPConnectionPoolTTL,LDAPConnectionTimeout,LDAPLibraryDebug,LDAPOpCacheEntries,LDAPOpCacheTTL,LDAPReferralHopLimit,LDAPReferrals,LDAPRetries,LDAPRetryDelay,LDAPSharedCacheFile,LDAPSharedCacheSize,LDAPTimeout,LDAPTrustedClientCert,LDAPTrustedGlobalCert,LDAPTrustedMode,LDAPVerifyServerCert,<Limit>,<LimitExcept>,LimitInternalRecursion,LimitRequestBody,LimitRequestFields,LimitRequestFieldSize,LimitRequestLine,LimitXMLRequestBody,Listen,ListenBackLog,LoadFile,LoadModule,<Location>,<LocationMatch>,LogFormat,LogLevel,LogMessage,LuaCodeCache,LuaHookAccessChecker,LuaHookAuthChecker,LuaAuthzProvider,LuaHookCheckUserID,LuaHookFixups,LuaHookInsertFilter,LuaHookMapToStorage,LuaHookTranslateName,LuaHookTypeChecker,LuaInherit,LuaInputFilter,LuaMapHandler,LuaOutputFilter,LuaPackageCPath,LuaPackagePath,LuaQuickHandler,LuaRoot,LuaScope,MaxConnectionsPerChild,MaxKeepAliveRequests,MaxMemFree,MaxRangeOverlaps,MaxRangeReversals,MaxRanges,MaxRequestWorkers,MaxSpareServers,MaxSpareThreads,MaxThreads,MetaDir,MetaFiles,MetaSuffix,MimeMagicFile,MinSpareServers,MinSpareThreads,MMapFile,ModemStandard,ModMimeUsePathInfo,MultiviewsMatch,Mutex,NameVirtualHost,NoProxy,NWSSLTrustedCerts,NWSSLUpgradeable,Options,Order,OutputSed,PassEnv,PidFile,PrivilegesMode,Protocol,ProtocolEcho,<Proxy>,ProxyAddHeaders,ProxyBadHeader,ProxyBlock,ProxyDomain,ProxyErrorOverride,ProxyExpressDBMFile,ProxyExpressDBMType,ProxyExpressEnable,ProxyFtpDirCharset,ProxyFtpEscapeWildcards,ProxyFtpListOnWildcard,ProxyHTMLBufSize,ProxyHTMLCharsetOut,ProxyHTMLDocType,ProxyHTMLEnable,ProxyHTMLEvents,ProxyHTMLExtended,ProxyHTMLFixups,ProxyHTMLInterp,ProxyHTMLLinks,ProxyHTMLStripComments,ProxyHTMLURLMap,ProxyIOBufferSize,<ProxyMatch>,ProxyMaxForwards,ProxyPass,ProxyPassInterpolateEnv,ProxyPassMatch,ProxyPassReverse,ProxyPassReverseCookieDomain,ProxyPassReverseCookiePath,ProxyPreserveHost,ProxyReceiveBufferSize,ProxyRemote,ProxyRemoteMatch,ProxyRequests,ProxySCGIInternalRedirect,ProxySCGISendfile,ProxySet,ProxySourceAddress,ProxyStatus,ProxyTimeout,ProxyVia,ReadmeName,ReceiveBufferSize,Redirect,RedirectMatch,RedirectPermanent,RedirectTemp,ReflectorHeader,RemoteIPHeader,RemoteIPInternalProxy,RemoteIPInternalProxyList,RemoteIPProxiesHeader,RemoteIPTrustedProxy,RemoteIPTrustedProxyList,RemoveCharset,RemoveEncoding,RemoveHandler,RemoveInputFilter,RemoveLanguage,RemoveOutputFilter,RemoveType,RequestHeader,RequestReadTimeout,Require,<RequireAll>,<RequireAny>,<RequireNone>,RewriteBase,RewriteCond,RewriteEngine,RewriteMap,RewriteOptions,RewriteRule,RLimitCPU,RLimitMEM,RLimitNPROC,Satisfy,ScoreBoardFile,Script,ScriptAlias,ScriptAliasMatch,ScriptInterpreterSource,ScriptLog,ScriptLogBuffer,ScriptLogLength,ScriptSock,SecureListen,SeeRequestTail,SendBufferSize,ServerAdmin,ServerAlias,ServerLimit,ServerName,ServerPath,ServerRoot,ServerSignature,ServerTokens,Session,SessionCookieName,SessionCookieName2,SessionCookieRemove,SessionCryptoCipher,SessionCryptoDriver,SessionCryptoPassphrase,SessionCryptoPassphraseFile,SessionDBDCookieName,SessionDBDCookieName2,SessionDBDCookieRemove,SessionDBDDeleteLabel,SessionDBDInsertLabel,SessionDBDPerUser,SessionDBDSelectLabel,SessionDBDUpdateLabel,SessionEnv,SessionExclude,SessionHeader,SessionInclude,SessionMaxAge,SetEnv,SetEnvIf,SetEnvIfExpr,SetEnvIfNoCase,SetHandler,SetInputFilter,SetOutputFilter,SSIEndTag,SSIErrorMsg,SSIETag,SSILastModified,SSILegacyExprParser,SSIStartTag,SSITimeFormat,SSIUndefinedEcho,SSLCACertificateFile,SSLCACertificatePath,SSLCADNRequestFile,SSLCADNRequestPath,SSLCARevocationCheck,SSLCARevocationFile,SSLCARevocationPath,SSLCertificateChainFile,SSLCertificateFile,SSLCertificateKeyFile,SSLCipherSuite,SSLCryptoDevice,SSLEngine,SSLFIPS,SSLHonorCipherOrder,SSLInsecureRenegotiation,SSLOCSPDefaultResponder,SSLOCSPEnable,SSLOCSPOverrideResponder,SSLOCSPResponderTimeout,SSLOCSPResponseMaxAge,SSLOCSPResponseTimeSkew,SSLOptions,SSLPassPhraseDialog,SSLProtocol,SSLProxyCACertificateFile,SSLProxyCACertificatePath,SSLProxyCARevocationCheck,SSLProxyCARevocationFile,SSLProxyCARevocationPath,SSLProxyCheckPeerCN,SSLProxyCheckPeerExpire,SSLProxyCipherSuite,SSLProxyEngine,SSLProxyMachineCertificateChainFile,SSLProxyMachineCertificateFile,SSLProxyMachineCertificatePath,SSLProxyProtocol,SSLProxyVerify,SSLProxyVerifyDepth,SSLRandomSeed,SSLRenegBufferSize,SSLRequire,SSLRequireSSL,SSLSessionCache,SSLSessionCacheTimeout,SSLSessionTicketKeyFile,SSLStaplingCache,SSLStaplingErrorCacheTimeout,SSLStaplingFakeTryLater,SSLStaplingForceURL,SSLStaplingResponderTimeout,SSLStaplingResponseMaxAge,SSLStaplingResponseTimeSkew,SSLStaplingReturnResponderErrors,SSLStaplingStandardCacheTimeout,SSLStrictSNIVHostCheck,SSLUserName,SSLUseStapling,SSLVerifyClient,SSLVerifyDepth,StartServers,StartThreads,Substitute,Suexec,SuexecUserGroup,ThreadLimit,ThreadsPerChild,ThreadStackSize,TimeOut,TraceEnable,TransferLog,TypesConfig,UnDefine,UnsetEnv,UseCanonicalName,UseCanonicalPhysicalPort,User,UserDir,VHostCGIMode,VHostCGIPrivs,VHostGroup,VHostPrivs,VHostSecure,VHostUser,VirtualDocumentRoot,VirtualDocumentRootIP,<VirtualHost>,VirtualScriptAlias,VirtualScriptAliasIP,WatchdogInterval,XBitHack,xml2EncAlias,xml2EncDefault,xml2StartParse,RewriteLog,RewriteLogLevel"];
      +  var CONFIG_OPTIONS = /^[\\+\\-]?(AuthConfig|IncludesNOEXEC|ExecCGI|FollowSymLinks|MultiViews|Includes|Indexes|SymLinksIfOwnerMatch)\b/i;
      +  var ALL_KEYWORDS = [
      +      CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
      +      PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS, CONFIG_KEYWORDS, PHP_KEYWORDS];
      +  var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float|char|void|const|static|struct)\d*(_t)?\b)|[a-z_]+_rec|cmd_parms\b/;
      +
      +  // token style names.  correspond to css classes
      +  /**
      +   * token style for a string literal
      +   * @const
      +   */
      +  var PR_STRING = 'str';
      +  /**
      +   * token style for a keyword
      +   * @const
      +   */
      +  var PR_KEYWORD = 'kwd';
      +  /**
      +   * token style for a comment
      +   * @const
      +   */
      +  var PR_COMMENT = 'com';
      +  /**
      +   * token style for a type
      +   * @const
      +   */
      +  var PR_TYPE = 'typ';
      +  /**
      +   * token style for a literal value.  e.g. 1, null, true.
      +   * @const
      +   */
      +  var PR_LITERAL = 'lit';
      +  /**
      +   * token style for a punctuation string.
      +   * @const
      +   */
      +  var PR_PUNCTUATION = 'pun';
      +  /**
      +   * token style for plain text.
      +   * @const
      +   */
      +  var PR_PLAIN = 'pln';
      +
      +  /**
      +   * token style for an sgml tag.
      +   * @const
      +   */
      +  var PR_TAG = 'tag';
      +  /**
      +   * token style for a markup declaration such as a DOCTYPE.
      +   * @const
      +   */
      +  var PR_DECLARATION = 'dec';
      +  /**
      +   * token style for embedded source.
      +   * @const
      +   */
      +  var PR_SOURCE = 'src';
      +  /**
      +   * token style for an sgml attribute name.
      +   * @const
      +   */
      +  var PR_ATTRIB_NAME = 'atn';
      +  /**
      +   * token style for an sgml attribute value.
      +   * @const
      +   */
      +  var PR_ATTRIB_VALUE = 'atv';
      +
      +  /**
      +   * A class that indicates a section of markup that is not code, e.g. to allow
      +   * embedding of line numbers within code listings.
      +   * @const
      +   */
      +  var PR_NOCODE = 'nocode';
      +
      +
      +
      +/**
      + * A set of tokens that can precede a regular expression literal in
      + * javascript
      + * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
      + * has the full list, but I've removed ones that might be problematic when
      + * seen in languages that don't support regular expression literals.
      + *
      + * <p>Specifically, I've removed any keywords that can't precede a regexp
      + * literal in a syntactically legal javascript program, and I've removed the
      + * "in" keyword since it's not a keyword in many languages, and might be used
      + * as a count of inches.
      + *
      + * <p>The link above does not accurately describe EcmaScript rules since
      + * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
      + * very well in practice.
      + *
      + * @private
      + * @const
      + */
      +var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
      +
      +// CAVEAT: this does not properly handle the case where a regular
      +// expression immediately follows another since a regular expression may
      +// have flags for case-sensitivity and the like.  Having regexp tokens
      +// adjacent is not valid in any language I'm aware of, so I'm punting.
      +// TODO: maybe style special characters inside a regexp as punctuation.
      +
      +
      +  /**
      +   * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
      +   * matches the union of the sets of strings matched by the input RegExp.
      +   * Since it matches globally, if the input strings have a start-of-input
      +   * anchor (/^.../), it is ignored for the purposes of unioning.
      +   * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
      +   * @return {RegExp} a global regex.
      +   */
      +  function combinePrefixPatterns(regexs) {
      +    var capturedGroupIndex = 0;
      +  
      +    var needToFoldCase = false;
      +    var ignoreCase = false;
      +    for (var i = 0, n = regexs.length; i < n; ++i) {
      +      var regex = regexs[i];
      +      if (regex.ignoreCase) {
      +        ignoreCase = true;
      +      } else if (/[a-z]/i.test(regex.source.replace(
      +                     /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
      +        needToFoldCase = true;
      +        ignoreCase = false;
      +        break;
      +      }
      +    }
      +  
      +    var escapeCharToCodeUnit = {
      +      'b': 8,
      +      't': 9,
      +      'n': 0xa,
      +      'v': 0xb,
      +      'f': 0xc,
      +      'r': 0xd
      +    };
      +  
      +    function decodeEscape(charsetPart) {
      +      var cc0 = charsetPart.charCodeAt(0);
      +      if (cc0 !== 92 /* \\ */) {
      +        return cc0;
      +      }
      +      var c1 = charsetPart.charAt(1);
      +      cc0 = escapeCharToCodeUnit[c1];
      +      if (cc0) {
      +        return cc0;
      +      } else if ('0' <= c1 && c1 <= '7') {
      +        return parseInt(charsetPart.substring(1), 8);
      +      } else if (c1 === 'u' || c1 === 'x') {
      +        return parseInt(charsetPart.substring(2), 16);
      +      } else {
      +        return charsetPart.charCodeAt(1);
      +      }
      +    }
      +  
      +    function encodeEscape(charCode) {
      +      if (charCode < 0x20) {
      +        return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
      +      }
      +      var ch = String.fromCharCode(charCode);
      +      return (ch === '\\' || ch === '-' || ch === ']' || ch === '^')
      +          ? "\\" + ch : ch;
      +    }
      +  
      +    function caseFoldCharset(charSet) {
      +      var charsetParts = charSet.substring(1, charSet.length - 1).match(
      +          new RegExp(
      +              '\\\\u[0-9A-Fa-f]{4}'
      +              + '|\\\\x[0-9A-Fa-f]{2}'
      +              + '|\\\\[0-3][0-7]{0,2}'
      +              + '|\\\\[0-7]{1,2}'
      +              + '|\\\\[\\s\\S]'
      +              + '|-'
      +              + '|[^-\\\\]',
      +              'g'));
      +      var ranges = [];
      +      var inverse = charsetParts[0] === '^';
      +  
      +      var out = ['['];
      +      if (inverse) { out.push('^'); }
      +  
      +      for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
      +        var p = charsetParts[i];
      +        if (/\\[bdsw]/i.test(p)) {  // Don't muck with named groups.
      +          out.push(p);
      +        } else {
      +          var start = decodeEscape(p);
      +          var end;
      +          if (i + 2 < n && '-' === charsetParts[i + 1]) {
      +            end = decodeEscape(charsetParts[i + 2]);
      +            i += 2;
      +          } else {
      +            end = start;
      +          }
      +          ranges.push([start, end]);
      +          // If the range might intersect letters, then expand it.
      +          // This case handling is too simplistic.
      +          // It does not deal with non-latin case folding.
      +          // It works for latin source code identifiers though.
      +          if (!(end < 65 || start > 122)) {
      +            if (!(end < 65 || start > 90)) {
      +              ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
      +            }
      +            if (!(end < 97 || start > 122)) {
      +              ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
      +            }
      +          }
      +        }
      +      }
      +  
      +      // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
      +      // -> [[1, 12], [14, 14], [16, 17]]
      +      ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
      +      var consolidatedRanges = [];
      +      var lastRange = [];
      +      for (var i = 0; i < ranges.length; ++i) {
      +        var range = ranges[i];
      +        if (range[0] <= lastRange[1] + 1) {
      +          lastRange[1] = Math.max(lastRange[1], range[1]);
      +        } else {
      +          consolidatedRanges.push(lastRange = range);
      +        }
      +      }
      +  
      +      for (var i = 0; i < consolidatedRanges.length; ++i) {
      +        var range = consolidatedRanges[i];
      +        out.push(encodeEscape(range[0]));
      +        if (range[1] > range[0]) {
      +          if (range[1] + 1 > range[0]) { out.push('-'); }
      +          out.push(encodeEscape(range[1]));
      +        }
      +      }
      +      out.push(']');
      +      return out.join('');
      +    }
      +  
      +    function allowAnywhereFoldCaseAndRenumberGroups(regex) {
      +      // Split into character sets, escape sequences, punctuation strings
      +      // like ('(', '(?:', ')', '^'), and runs of characters that do not
      +      // include any of the above.
      +      var parts = regex.source.match(
      +          new RegExp(
      +              '(?:'
      +              + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
      +              + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
      +              + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
      +              + '|\\\\[0-9]+'  // a back-reference or octal escape
      +              + '|\\\\[^ux0-9]'  // other escape sequence
      +              + '|\\(\\?[:!=]'  // start of a non-capturing group
      +              + '|[\\(\\)\\^]'  // start/end of a group, or line start
      +              + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
      +              + ')',
      +              'g'));
      +      var n = parts.length;
      +  
      +      // Maps captured group numbers to the number they will occupy in
      +      // the output or to -1 if that has not been determined, or to
      +      // undefined if they need not be capturing in the output.
      +      var capturedGroups = [];
      +  
      +      // Walk over and identify back references to build the capturedGroups
      +      // mapping.
      +      for (var i = 0, groupIndex = 0; i < n; ++i) {
      +        var p = parts[i];
      +        if (p === '(') {
      +          // groups are 1-indexed, so max group index is count of '('
      +          ++groupIndex;
      +        } else if ('\\' === p.charAt(0)) {
      +          var decimalValue = +p.substring(1);
      +          if (decimalValue) {
      +            if (decimalValue <= groupIndex) {
      +              capturedGroups[decimalValue] = -1;
      +            } else {
      +              // Replace with an unambiguous escape sequence so that
      +              // an octal escape sequence does not turn into a backreference
      +              // to a capturing group from an earlier regex.
      +              parts[i] = encodeEscape(decimalValue);
      +            }
      +          }
      +        }
      +      }
      +  
      +      // Renumber groups and reduce capturing groups to non-capturing groups
      +      // where possible.
      +      for (var i = 1; i < capturedGroups.length; ++i) {
      +        if (-1 === capturedGroups[i]) {
      +          capturedGroups[i] = ++capturedGroupIndex;
      +        }
      +      }
      +      for (var i = 0, groupIndex = 0; i < n; ++i) {
      +        var p = parts[i];
      +        if (p === '(') {
      +          ++groupIndex;
      +          if (!capturedGroups[groupIndex]) {
      +            parts[i] = '(?:';
      +          }
      +        } else if ('\\' === p.charAt(0)) {
      +          var decimalValue = +p.substring(1);
      +          if (decimalValue && decimalValue <= groupIndex) {
      +            parts[i] = '\\' + capturedGroups[decimalValue];
      +          }
      +        }
      +      }
      +  
      +      // Remove any prefix anchors so that the output will match anywhere.
      +      // ^^ really does mean an anchored match though.
      +      for (var i = 0; i < n; ++i) {
      +        if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
      +      }
      +  
      +      // Expand letters to groups to handle mixing of case-sensitive and
      +      // case-insensitive patterns if necessary.
      +      if (regex.ignoreCase && needToFoldCase) {
      +        for (var i = 0; i < n; ++i) {
      +          var p = parts[i];
      +          var ch0 = p.charAt(0);
      +          if (p.length >= 2 && ch0 === '[') {
      +            parts[i] = caseFoldCharset(p);
      +          } else if (ch0 !== '\\') {
      +            // TODO: handle letters in numeric escapes.
      +            parts[i] = p.replace(
      +                /[a-zA-Z]/g,
      +                function (ch) {
      +                  var cc = ch.charCodeAt(0);
      +                  return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
      +                });
      +          }
      +        }
      +      }
      +  
      +      return parts.join('');
      +    }
      +  
      +    var rewritten = [];
      +    for (var i = 0, n = regexs.length; i < n; ++i) {
      +      var regex = regexs[i];
      +      if (regex.global || regex.multiline) { throw new Error('' + regex); }
      +      rewritten.push(
      +          '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
      +    }
      +  
      +    return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
      +  }
      +
      +
      +  /**
      +   * Split markup into a string of source code and an array mapping ranges in
      +   * that string to the text nodes in which they appear.
      +   *
      +   * <p>
      +   * The HTML DOM structure:</p>
      +   * <pre>
      +   * (Element   "p"
      +   *   (Element "b"
      +   *     (Text  "print "))       ; #1
      +   *   (Text    "'Hello '")      ; #2
      +   *   (Element "br")            ; #3
      +   *   (Text    "  + 'World';")) ; #4
      +   * </pre>
      +   * <p>
      +   * corresponds to the HTML
      +   * {@code <p><b>print </b>'Hello '<br>  + 'World';</p>}.</p>
      +   *
      +   * <p>
      +   * It will produce the output:</p>
      +   * <pre>
      +   * {
      +   *   sourceCode: "print 'Hello '\n  + 'World';",
      +   *   //                     1          2
      +   *   //           012345678901234 5678901234567
      +   *   spans: [0, #1, 6, #2, 14, #3, 15, #4]
      +   * }
      +   * </pre>
      +   * <p>
      +   * where #1 is a reference to the {@code "print "} text node above, and so
      +   * on for the other text nodes.
      +   * </p>
      +   *
      +   * <p>
      +   * The {@code} spans array is an array of pairs.  Even elements are the start
      +   * indices of substrings, and odd elements are the text nodes (or BR elements)
      +   * that contain the text for those substrings.
      +   * Substrings continue until the next index or the end of the source.
      +   * </p>
      +   *
      +   * @param {Node} node an HTML DOM subtree containing source-code.
      +   * @param {boolean} isPreformatted true if white-space in text nodes should
      +   *    be considered significant.
      +   * @return {Object} source code and the text nodes in which they occur.
      +   */
      +  function extractSourceSpans(node, isPreformatted) {
      +    var nocode = /(?:^|\s)nocode(?:\s|$)/;
      +  
      +    var chunks = [];
      +    var length = 0;
      +    var spans = [];
      +    var k = 0;
      +  
      +    function walk(node) {
      +      switch (node.nodeType) {
      +        case 1:  // Element
      +          if (nocode.test(node.className)) { return; }
      +          for (var child = node.firstChild; child; child = child.nextSibling) {
      +            walk(child);
      +          }
      +          var nodeName = node.nodeName.toLowerCase();
      +          if ('br' === nodeName || 'li' === nodeName) {
      +            chunks[k] = '\n';
      +            spans[k << 1] = length++;
      +            spans[(k++ << 1) | 1] = node;
      +          }
      +          break;
      +        case 3: case 4:  // Text
      +          var text = node.nodeValue;
      +          if (text.length) {
      +            if (!isPreformatted) {
      +              text = text.replace(/[ \t\r\n]+/g, ' ');
      +            } else {
      +              text = text.replace(/\r\n?/g, '\n');  // Normalize newlines.
      +              text = text.replace(/^(\r?\n\s*)+/g, '');  // Remove leading newlines
      +              text = text.replace(/^\s*/g, '');  // Remove leading spaces due to indented formatting
      +              text = text.replace(/(\r?\n\s*)+$/g, '');  // Remove ending newlines
      +              
      +            }
      +            // TODO: handle tabs here?
      +            chunks[k] = text;
      +            spans[k << 1] = length;
      +            length += text.length;
      +            spans[(k++ << 1) | 1] = node;
      +          }
      +          break;
      +      }
      +    }
      +  
      +    walk(node);
      +  
      +    return {
      +      sourceCode: chunks.join('').replace(/\n$/, ''),
      +      spans: spans
      +    };
      +  }
      +
      +
      +  /**
      +   * Apply the given language handler to sourceCode and add the resulting
      +   * decorations to out.
      +   * @param {number} basePos the index of sourceCode within the chunk of source
      +   *    whose decorations are already present on out.
      +   */
      +  function appendDecorations(basePos, sourceCode, langHandler, out) {
      +    if (!sourceCode) { return; }
      +    var job = {
      +      sourceCode: sourceCode,
      +      basePos: basePos
      +    };
      +    langHandler(job);
      +    out.push.apply(out, job.decorations);
      +  }
      +
      +  var notWs = /\S/;
      +
      +  /**
      +   * Given an element, if it contains only one child element and any text nodes
      +   * it contains contain only space characters, return the sole child element.
      +   * Otherwise returns undefined.
      +   * <p>
      +   * This is meant to return the CODE element in {@code <pre><code ...>} when
      +   * there is a single child element that contains all the non-space textual
      +   * content, but not to return anything where there are multiple child elements
      +   * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
      +   * is textual content.
      +   */
      +  function childContentWrapper(element) {
      +    var wrapper = undefined;
      +    for (var c = element.firstChild; c; c = c.nextSibling) {
      +      var type = c.nodeType;
      +      wrapper = (type === 1)  // Element Node
      +          ? (wrapper ? element : c)
      +          : (type === 3)  // Text Node
      +          ? (notWs.test(c.nodeValue) ? element : wrapper)
      +          : wrapper;
      +    }
      +    return wrapper === element ? undefined : wrapper;
      +  }
      +
      +  /** Given triples of [style, pattern, context] returns a lexing function,
      +    * The lexing function interprets the patterns to find token boundaries and
      +    * returns a decoration list of the form
      +    * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
      +    * where index_n is an index into the sourceCode, and style_n is a style
      +    * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
      +    * all characters in sourceCode[index_n-1:index_n].
      +    *
      +    * The stylePatterns is a list whose elements have the form
      +    * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
      +    *
      +    * Style is a style constant like PR_PLAIN, or can be a string of the
      +    * form 'lang-FOO', where FOO is a language extension describing the
      +    * language of the portion of the token in $1 after pattern executes.
      +    * E.g., if style is 'lang-lisp', and group 1 contains the text
      +    * '(hello (world))', then that portion of the token will be passed to the
      +    * registered lisp handler for formatting.
      +    * The text before and after group 1 will be restyled using this decorator
      +    * so decorators should take care that this doesn't result in infinite
      +    * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
      +    * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
      +    * '<script>foo()<\/script>', which would cause the current decorator to
      +    * be called with '<script>' which would not match the same rule since
      +    * group 1 must not be empty, so it would be instead styled as PR_TAG by
      +    * the generic tag rule.  The handler registered for the 'js' extension would
      +    * then be called with 'foo()', and finally, the current decorator would
      +    * be called with '<\/script>' which would not match the original rule and
      +    * so the generic tag rule would identify it as a tag.
      +    *
      +    * Pattern must only match prefixes, and if it matches a prefix, then that
      +    * match is considered a token with the same style.
      +    *
      +    * Context is applied to the last non-whitespace, non-comment token
      +    * recognized.
      +    *
      +    * Shortcut is an optional string of characters, any of which, if the first
      +    * character, gurantee that this pattern and only this pattern matches.
      +    *
      +    * @param {Array} shortcutStylePatterns patterns that always start with
      +    *   a known character.  Must have a shortcut string.
      +    * @param {Array} fallthroughStylePatterns patterns that will be tried in
      +    *   order if the shortcut ones fail.  May have shortcuts.
      +    *
      +    * @return {function (Object)} a
      +    *   function that takes source code and returns a list of decorations.
      +    */
      +  function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
      +    var shortcuts = {};
      +    var tokenizer;
      +    (function () {
      +      var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
      +      var allRegexs = [];
      +      var regexKeys = {};
      +      for (var i = 0, n = allPatterns.length; i < n; ++i) {
      +        var patternParts = allPatterns[i];
      +        var shortcutChars = patternParts[3];
      +        if (shortcutChars) {
      +          for (var c = shortcutChars.length; --c >= 0;) {
      +            shortcuts[shortcutChars.charAt(c)] = patternParts;
      +          }
      +        }
      +        var regex = patternParts[1];
      +        var k = '' + regex;
      +        if (!regexKeys.hasOwnProperty(k)) {
      +          allRegexs.push(regex);
      +          regexKeys[k] = null;
      +        }
      +      }
      +      allRegexs.push(/[\0-\uffff]/);
      +      tokenizer = combinePrefixPatterns(allRegexs);
      +    })();
      +
      +    var nPatterns = fallthroughStylePatterns.length;
      +
      +    /**
      +     * Lexes job.sourceCode and produces an output array job.decorations of
      +     * style classes preceded by the position at which they start in
      +     * job.sourceCode in order.
      +     *
      +     * @param {Object} job an object like <pre>{
      +     *    sourceCode: {string} sourceText plain text,
      +     *    basePos: {int} position of job.sourceCode in the larger chunk of
      +     *        sourceCode.
      +     * }</pre>
      +     */
      +    var decorate = function (job) {
      +      var sourceCode = job.sourceCode, basePos = job.basePos;
      +      /** Even entries are positions in source in ascending order.  Odd enties
      +        * are style markers (e.g., PR_COMMENT) that run from that position until
      +        * the end.
      +        * @type {Array.<number|string>}
      +        */
      +      var decorations = [basePos, PR_PLAIN];
      +      var pos = 0;  // index into sourceCode
      +      var tokens = sourceCode.match(tokenizer) || [];
      +      var styleCache = {};
      +
      +      for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
      +        var token = tokens[ti];
      +        var style = styleCache[token];
      +        var match = void 0;
      +
      +        var isEmbedded;
      +        if (typeof style === 'string') {
      +          isEmbedded = false;
      +        } else {
      +          var patternParts = shortcuts[token.charAt(0)];
      +          if (patternParts) {
      +            match = token.match(patternParts[1]);
      +            style = patternParts[0];
      +          } else {
      +            for (var i = 0; i < nPatterns; ++i) {
      +              patternParts = fallthroughStylePatterns[i];
      +              match = token.match(patternParts[1]);
      +              if (match) {
      +                style = patternParts[0];
      +                break;
      +              }
      +            }
      +
      +            if (!match) {  // make sure that we make progress
      +              style = PR_PLAIN;
      +            }
      +          }
      +
      +          isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
      +          if (isEmbedded && !(match && typeof match[1] === 'string')) {
      +            isEmbedded = false;
      +            style = PR_SOURCE;
      +          }
      +
      +          if (!isEmbedded) { styleCache[token] = style; }
      +        }
      +
      +        var tokenStart = pos;
      +        pos += token.length;
      +
      +        if (!isEmbedded) {
      +          decorations.push(basePos + tokenStart, style);
      +        } else {  // Treat group 1 as an embedded block of source code.
      +          var embeddedSource = match[1];
      +          var embeddedSourceStart = token.indexOf(embeddedSource);
      +          var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
      +          if (match[2]) {
      +            // If embeddedSource can be blank, then it would match at the
      +            // beginning which would cause us to infinitely recurse on the
      +            // entire token, so we catch the right context in match[2].
      +            embeddedSourceEnd = token.length - match[2].length;
      +            embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
      +          }
      +          var lang = style.substring(5);
      +          // Decorate the left of the embedded source
      +          appendDecorations(
      +              basePos + tokenStart,
      +              token.substring(0, embeddedSourceStart),
      +              decorate, decorations);
      +          // Decorate the embedded source
      +          appendDecorations(
      +              basePos + tokenStart + embeddedSourceStart,
      +              embeddedSource,
      +              langHandlerForExtension(lang, embeddedSource),
      +              decorations);
      +          // Decorate the right of the embedded section
      +          appendDecorations(
      +              basePos + tokenStart + embeddedSourceEnd,
      +              token.substring(embeddedSourceEnd),
      +              decorate, decorations);
      +        }
      +      }
      +      job.decorations = decorations;
      +    };
      +    return decorate;
      +  }
      +
      +  /** returns a function that produces a list of decorations from source text.
      +    *
      +    * This code treats ", ', and ` as string delimiters, and \ as a string
      +    * escape.  It does not recognize perl's qq() style strings.
      +    * It has no special handling for double delimiter escapes as in basic, or
      +    * the tripled delimiters used in python, but should work on those regardless
      +    * although in those cases a single string literal may be broken up into
      +    * multiple adjacent string literals.
      +    *
      +    * It recognizes C, C++, and shell style comments.
      +    *
      +    * @param {Object} options a set of optional parameters.
      +    * @return {function (Object)} a function that examines the source code
      +    *     in the input job and builds the decoration list.
      +    */
      +  function sourceDecorator(options) {
      +    var shortcutStylePatterns = [], fallthroughStylePatterns = [];
      +    if (options['tripleQuotedStrings']) {
      +      // '''multi-line-string''', 'single-line-string', and double-quoted
      +      shortcutStylePatterns.push(
      +          [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
      +           null, '\'"']);
      +    } else if (options['multiLineStrings']) {
      +      // 'multi-line-string', "multi-line-string"
      +      shortcutStylePatterns.push(
      +          [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
      +           null, '\'"`']);
      +    } else {
      +      // 'single-line-string', "single-line-string"
      +      shortcutStylePatterns.push(
      +          [PR_STRING,
      +           /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
      +           null, '"\'']);
      +    }
      +    if (options['verbatimStrings']) {
      +      // verbatim-string-literal production from the C# grammar.  See issue 93.
      +      fallthroughStylePatterns.push(
      +          [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
      +    }
      +    var hc = options['hashComments'];
      +    if (hc) {
      +      if (options['cStyleComments']) {
      +        if (hc > 1) {  // multiline hash comments
      +          shortcutStylePatterns.push(
      +              [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
      +        } else {
      +          // Stop C preprocessor declarations at an unclosed open comment
      +          shortcutStylePatterns.push(
      +              [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
      +               null, '#']);
      +        }
      +        // #include <stdio.h>
      +        fallthroughStylePatterns.push(
      +            [PR_STRING,
      +             /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
      +             null]);
      +      } else {
      +        shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
      +      }
      +    }
      +    if (options['cStyleComments']) {
      +      fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
      +      fallthroughStylePatterns.push(
      +          [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
      +    }
      +    if (options['regexLiterals']) {
      +      /**
      +       * @const
      +       */
      +      var REGEX_LITERAL = (
      +          // A regular expression literal starts with a slash that is
      +          // not followed by * or / so that it is not confused with
      +          // comments.
      +          '/(?=[^/*])'
      +          // and then contains any number of raw characters,
      +          + '(?:[^/\\x5B\\x5C]'
      +          // escape sequences (\x5C),
      +          +    '|\\x5C[\\s\\S]'
      +          // or non-nesting character sets (\x5B\x5D);
      +          +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
      +          // finally closed by a /.
      +          + '/');
      +      fallthroughStylePatterns.push(
      +          ['lang-regex',
      +           new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
      +           ]);
      +    }
      +
      +    var types = options['types'];
      +    if (types) {
      +      fallthroughStylePatterns.push([PR_TYPE, types]);
      +    }
      +
      +    if (options['strings']) {
      +        var strings = ("" + options['strings']).replace(/^ | $/g, '').replace(/-/g, '\\-');
      +        fallthroughStylePatterns.push(
      +            [PR_STRING,
      +            new RegExp('(?:' + strings.replace(/[\s,]+/g, '|') + ')'),
      +            , null]
      +        );
      +    }
      +    
      +    var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
      +    if (keywords.length) {
      +      fallthroughStylePatterns.push(
      +          [PR_KEYWORD,
      +           new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
      +           null]);
      +    }
      +
      +    shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
      +    if (options['httpdComments']) {
      +        fallthroughStylePatterns.push(
      +            [PR_PLAIN,     /^.*\S.*#/i, null]
      +        );
      +    }
      +    
      +    fallthroughStylePatterns.push(
      +        // TODO(mikesamuel): recognize non-latin letters and numerals in idents
      +        [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*|\bNULL\b/i, null],
      +        [PR_LITERAL,     CONFIG_OPTIONS, null],
      +        //[PR_STRING,     CONFIG_ENVS, null],
      +        [PR_TAG,     /^\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy\b|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion)\b/, null],
      +        [PR_TYPE,        /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req|module)\b)/, null],
      +        [PR_TAG,     /^apr_[a-z_0-9]+|ap_[a-z_0-9]+/i, null],
      +        [PR_PLAIN,       /^[a-z_$][a-z_$@0-9\-]*/i, null],
      +        [PR_LITERAL,
      +         new RegExp(
      +             '^(?:'
      +             // A hex number
      +             + '0x[a-f0-9]+'
      +             // An IPv6 Address
      +             + '|[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+'
      +             // or an octal or decimal number,
      +             + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
      +             // possibly in scientific notation
      +             + '(?:e[+\\-]?\\d+)?'
      +             + ')'
      +             // with an optional modifier like UL for unsigned long
      +             + '[a-z]*', 'i'),
      +         null, '0123456789'],
      +        // Don't treat escaped quotes in bash as starting strings.  See issue 144.
      +        [PR_PLAIN,       /^\\[\s\S]?/, null],
      +        [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
      +
      +    return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
      +  }
      +
      +  var decorateSource = sourceDecorator({
      +        'keywords': ALL_KEYWORDS,
      +        'hashComments': true,
      +        'cStyleComments': true,
      +        'multiLineStrings': true,
      +        'regexLiterals': true
      +      });
      +
      +  /**
      +   * Given a DOM subtree, wraps it in a list, and puts each line into its own
      +   * list item.
      +   *
      +   * @param {Node} node modified in place.  Its content is pulled into an
      +   *     HTMLOListElement, and each line is moved into a separate list item.
      +   *     This requires cloning elements, so the input might not have unique
      +   *     IDs after numbering.
      +   * @param {boolean} isPreformatted true iff white-space in text nodes should
      +   *     be treated as significant.
      +   */
      +  function numberLines(node, opt_startLineNum, isPreformatted) {
      +    var nocode = /(?:^|\s)nocode(?:\s|$)/;
      +    var lineBreak = /\r\n?|\n/;
      +  
      +    var document = node.ownerDocument;
      +  
      +    var li = document.createElement('li');
      +    while (node.firstChild) {
      +      li.appendChild(node.firstChild);
      +    }
      +    // An array of lines.  We split below, so this is initialized to one
      +    // un-split line.
      +    var listItems = [li];
      +  
      +    function walk(node) {
      +      switch (node.nodeType) {
      +        case 1:  // Element
      +          if (nocode.test(node.className)) { break; }
      +          if ('br' === node.nodeName) {
      +            breakAfter(node);
      +            // Discard the <BR> since it is now flush against a </LI>.
      +            if (node.parentNode) {
      +              node.parentNode.removeChild(node);
      +            }
      +          } else {
      +            for (var child = node.firstChild; child; child = child.nextSibling) {
      +              walk(child);
      +            }
      +          }
      +          break;
      +        case 3: case 4:  // Text
      +          if (isPreformatted) {
      +            var text = node.nodeValue;
      +            var match = text.match(lineBreak);
      +            if (match) {
      +              var firstLine = text.substring(0, match.index);
      +              node.nodeValue = firstLine;
      +              var tail = text.substring(match.index + match[0].length);
      +              if (tail) {
      +                var parent = node.parentNode;
      +                parent.insertBefore(
      +                    document.createTextNode(tail), node.nextSibling);
      +              }
      +              breakAfter(node);
      +              if (!firstLine) {
      +                // Don't leave blank text nodes in the DOM.
      +                node.parentNode.removeChild(node);
      +              }
      +            }
      +          }
      +          break;
      +      }
      +    }
      +  
      +    // Split a line after the given node.
      +    function breakAfter(lineEndNode) {
      +      // If there's nothing to the right, then we can skip ending the line
      +      // here, and move root-wards since splitting just before an end-tag
      +      // would require us to create a bunch of empty copies.
      +      while (!lineEndNode.nextSibling) {
      +        lineEndNode = lineEndNode.parentNode;
      +        if (!lineEndNode) { return; }
      +      }
      +  
      +      function breakLeftOf(limit, copy) {
      +        // Clone shallowly if this node needs to be on both sides of the break.
      +        var rightSide = copy ? limit.cloneNode(false) : limit;
      +        var parent = limit.parentNode;
      +        if (parent) {
      +          // We clone the parent chain.
      +          // This helps us resurrect important styling elements that cross lines.
      +          // E.g. in <i>Foo<br>Bar</i>
      +          // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
      +          var parentClone = breakLeftOf(parent, 1);
      +          // Move the clone and everything to the right of the original
      +          // onto the cloned parent.
      +          var next = limit.nextSibling;
      +          parentClone.appendChild(rightSide);
      +          for (var sibling = next; sibling; sibling = next) {
      +            next = sibling.nextSibling;
      +            parentClone.appendChild(sibling);
      +          }
      +        }
      +        return rightSide;
      +      }
      +  
      +      var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
      +  
      +      // Walk the parent chain until we reach an unattached LI.
      +      for (var parent;
      +           // Check nodeType since IE invents document fragments.
      +           (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
      +        copiedListItem = parent;
      +      }
      +      // Put it on the list of lines for later processing.
      +      listItems.push(copiedListItem);
      +    }
      +  
      +    // Split lines while there are lines left to split.
      +    for (var i = 0;  // Number of lines that have been split so far.
      +         i < listItems.length;  // length updated by breakAfter calls.
      +         ++i) {
      +      walk(listItems[i]);
      +    }
      +  
      +    // Make sure numeric indices show correctly.
      +    if (opt_startLineNum === (opt_startLineNum|0)) {
      +      listItems[0].setAttribute('value', opt_startLineNum);
      +    }
      +  
      +    var ol = document.createElement('ol');
      +    ol.className = 'linenums';
      +    var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
      +    for (var i = 0, n = listItems.length; i < n; ++i) {
      +      li = listItems[i];
      +      // Stick a class on the LIs so that stylesheets can
      +      // color odd/even rows, or any other row pattern that
      +      // is co-prime with 10.
      +      li.className = 'L' + ((i + offset) % 1);
      +      if (!li.firstChild) {
      +        li.appendChild(document.createTextNode('\xA0'));
      +      }
      +      ol.appendChild(li);
      +    }
      +  
      +    node.appendChild(ol);
      +  }
      +
      +  /**
      +   * Breaks {@code job.sourceCode} around style boundaries in
      +   * {@code job.decorations} and modifies {@code job.sourceNode} in place.
      +   * @param {Object} job like <pre>{
      +   *    sourceCode: {string} source as plain text,
      +   *    spans: {Array.<number|Node>} alternating span start indices into source
      +   *       and the text node or element (e.g. {@code <BR>}) corresponding to that
      +   *       span.
      +   *    decorations: {Array.<number|string} an array of style classes preceded
      +   *       by the position at which they start in job.sourceCode in order
      +   * }</pre>
      +   * @private
      +   */
      +  function recombineTagsAndDecorations(job) {
      +    var isIE8OrEarlier = /\bMSIE\s(\d+)/.exec(navigator.userAgent);
      +    isIE8OrEarlier = isIE8OrEarlier && +isIE8OrEarlier[1] <= 8;
      +    var newlineRe = /\n/g;
      +  
      +    var source = job.sourceCode;
      +    var sourceLength = source.length;
      +    // Index into source after the last code-unit recombined.
      +    var sourceIndex = 0;
      +  
      +    var spans = job.spans;
      +    var nSpans = spans.length;
      +    // Index into spans after the last span which ends at or before sourceIndex.
      +    var spanIndex = 0;
      +  
      +    var decorations = job.decorations;
      +    var nDecorations = decorations.length;
      +    // Index into decorations after the last decoration which ends at or before
      +    // sourceIndex.
      +    var decorationIndex = 0;
      +  
      +    // Remove all zero-length decorations.
      +    decorations[nDecorations] = sourceLength;
      +    var decPos, i;
      +    for (i = decPos = 0; i < nDecorations;) {
      +      if (decorations[i] !== decorations[i + 2]) {
      +        decorations[decPos++] = decorations[i++];
      +        decorations[decPos++] = decorations[i++];
      +      } else {
      +        i += 2;
      +      }
      +    }
      +    nDecorations = decPos;
      +  
      +    // Simplify decorations.
      +    for (i = decPos = 0; i < nDecorations;) {
      +      var startPos = decorations[i];
      +      // Conflate all adjacent decorations that use the same style.
      +      var startDec = decorations[i + 1];
      +      var end = i + 2;
      +      while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
      +        end += 2;
      +      }
      +      decorations[decPos++] = startPos;
      +      decorations[decPos++] = startDec;
      +      i = end;
      +    }
      +  
      +    nDecorations = decorations.length = decPos;
      +  
      +    var sourceNode = job.sourceNode;
      +    var oldDisplay;
      +    if (sourceNode) {
      +      oldDisplay = sourceNode.style.display;
      +      sourceNode.style.display = 'none';
      +    }
      +    try {
      +      var decoration = null;
      +      var X = 0;
      +      while (spanIndex < nSpans) {
      +        X = X + 1;
      +        if (X > 5000) { break; }
      +        var spanStart = spans[spanIndex];
      +        var spanEnd = spans[spanIndex + 2] || sourceLength;
      +  
      +        var decEnd = decorations[decorationIndex + 2] || sourceLength;
      +  
      +        var end = Math.min(spanEnd, decEnd);
      +  
      +        var textNode = spans[spanIndex + 1];
      +        var styledText;
      +        if (textNode.nodeType !== 1  // Don't muck with <BR>s or <LI>s
      +            // Don't introduce spans around empty text nodes.
      +            && (styledText = source.substring(sourceIndex, end))) {
      +          // This may seem bizarre, and it is.  Emitting LF on IE causes the
      +          // code to display with spaces instead of line breaks.
      +          // Emitting Windows standard issue linebreaks (CRLF) causes a blank
      +          // space to appear at the beginning of every line but the first.
      +          // Emitting an old Mac OS 9 line separator makes everything spiffy.
      +          if (isIE8OrEarlier) {
      +            styledText = styledText.replace(newlineRe, '\r');
      +          }
      +          textNode.nodeValue = styledText;
      +          var document = textNode.ownerDocument;
      +          var span = document.createElement('span');
      +          span.className = decorations[decorationIndex + 1];
      +          var parentNode = textNode.parentNode;
      +          parentNode.replaceChild(span, textNode);
      +          span.appendChild(textNode);
      +          if (sourceIndex < spanEnd) {  // Split off a text node.
      +            spans[spanIndex + 1] = textNode
      +                // TODO: Possibly optimize by using '' if there's no flicker.
      +                = document.createTextNode(source.substring(end, spanEnd));
      +            parentNode.insertBefore(textNode, span.nextSibling);
      +          }
      +        }
      +  
      +        sourceIndex = end;
      +  
      +        if (sourceIndex >= spanEnd) {
      +          spanIndex += 2;
      +        }
      +        if (sourceIndex >= decEnd) {
      +          decorationIndex += 2;
      +        }
      +      }
      +    } finally {
      +      if (sourceNode) {
      +        sourceNode.style.display = oldDisplay;
      +      }
      +    }
      +  }
      +
      +
      +  /** Maps language-specific file extensions to handlers. */
      +  var langHandlerRegistry = {};
      +  /** Register a language handler for the given file extensions.
      +    * @param {function (Object)} handler a function from source code to a list
      +    *      of decorations.  Takes a single argument job which describes the
      +    *      state of the computation.   The single parameter has the form
      +    *      {@code {
      +    *        sourceCode: {string} as plain text.
      +    *        decorations: {Array.<number|string>} an array of style classes
      +    *                     preceded by the position at which they start in
      +    *                     job.sourceCode in order.
      +    *                     The language handler should assigned this field.
      +    *        basePos: {int} the position of source in the larger source chunk.
      +    *                 All positions in the output decorations array are relative
      +    *                 to the larger source chunk.
      +    *      } }
      +    * @param {Array.<string>} fileExtensions
      +    */
      +  function registerLangHandler(handler, fileExtensions) {
      +    for (var i = fileExtensions.length; --i >= 0;) {
      +      var ext = fileExtensions[i];
      +      if (!langHandlerRegistry.hasOwnProperty(ext)) {
      +        langHandlerRegistry[ext] = handler;
      +      } else if (win['console']) {
      +        console['warn']('cannot override language handler %s', ext);
      +      }
      +    }
      +  }
      +  function langHandlerForExtension(extension, source) {
      +    if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
      +      // Treat it as markup if the first non whitespace character is a < and
      +      // the last non-whitespace character is a >.
      +      extension = /^\s*</.test(source)
      +          ? 'default-markup'
      +          : 'default-code';
      +    }
      +    return langHandlerRegistry[extension];
      +  }
      +  registerLangHandler(decorateSource, ['default-code']);
      +  registerLangHandler(
      +      createSimpleLexer(
      +          [],
      +          [
      +           [PR_PLAIN,       /^[^<?]+/],
      +           [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
      +           [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
      +           // Unescaped content in an unknown language
      +           ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
      +           ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
      +           [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
      +           ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
      +           // Unescaped content in javascript.  (Or possibly vbscript).
      +           ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
      +           // Contains unescaped stylesheet content
      +           ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
      +           ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
      +          ]),
      +      ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
      +  registerLangHandler(
      +      createSimpleLexer(
      +          [
      +           [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
      +           [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
      +           ],
      +          [
      +           [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
      +           [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
      +           ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
      +           [PR_PUNCTUATION,  /^[=<>\/]+/],
      +           ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
      +           ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
      +           ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
      +           ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
      +           ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
      +           ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
      +           ]),
      +      ['in.tag']);
      +  registerLangHandler(
      +      createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': CPP_KEYWORDS,
      +          'hashComments': true,
      +          'cStyleComments': true,
      +          'types': C_TYPES
      +        }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': PHP_KEYWORDS,
      +          'hashComments': false,
      +          'cStyleComments': true,
      +          'multiLineStrings': true,
      +          'regexLiterals': true
      +//          'types': C_TYPES,
      +        }), ['php', 'phtml', 'inc']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': 'null,true,false'
      +        }), ['json']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': CSHARP_KEYWORDS,
      +          'hashComments': true,
      +          'cStyleComments': true,
      +          'verbatimStrings': true,
      +          'types': C_TYPES
      +        }), ['cs']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': JAVA_KEYWORDS,
      +          'cStyleComments': true
      +        }), ['java']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': SH_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true
      +        }), ['bsh', 'csh', 'sh']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': PYTHON_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'tripleQuotedStrings': true
      +        }), ['cv', 'py']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': PERL_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'regexLiterals': true
      +        }), ['perl', 'pl', 'pm']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': RUBY_KEYWORDS,
      +          'hashComments': true,
      +          'multiLineStrings': true,
      +          'regexLiterals': true
      +        }), ['rb']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': JSCRIPT_KEYWORDS,
      +          'cStyleComments': true,
      +          'regexLiterals': true
      +        }), ['js']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': COFFEE_KEYWORDS,
      +          'hashComments': 3,  // ### style block comments
      +          'cStyleComments': true,
      +          'multilineStrings': true,
      +          'tripleQuotedStrings': true,
      +          'regexLiterals': true
      +        }), ['coffee']);
      +  registerLangHandler(
      +      createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
      +  registerLangHandler(sourceDecorator({
      +          'keywords': CONFIG_KEYWORDS,
      +          'literals': CONFIG_OPTIONS,
      +          'strings': CONFIG_ENVS,
      +          'hashComments': true,
      +          'cStyleComments': false,
      +          'multiLineStrings': false,
      +          'regexLiterals': false,
      +          'httpdComments': true
      +        }), ['config']);
      +
      +  function applyDecorator(job) {
      +    var opt_langExtension = job.langExtension;
      +
      +    try {
      +      // Extract tags, and convert the source code to plain text.
      +      var sourceAndSpans = extractSourceSpans(job.sourceNode, job.pre);
      +      /** Plain text. @type {string} */
      +      var source = sourceAndSpans.sourceCode;
      +      job.sourceCode = source;
      +      job.spans = sourceAndSpans.spans;
      +      job.basePos = 0;
      +
      +      // Apply the appropriate language handler
      +      langHandlerForExtension(opt_langExtension, source)(job);
      +
      +      // Integrate the decorations and tags back into the source code,
      +      // modifying the sourceNode in place.
      +      recombineTagsAndDecorations(job);
      +    } catch (e) {
      +      if (win['console']) {
      +        console['log'](e && e['stack'] ? e['stack'] : e);
      +      }
      +    }
      +  }
      +
      +  /**
      +   * @param sourceCodeHtml {string} The HTML to pretty print.
      +   * @param opt_langExtension {string} The language name to use.
      +   *     Typically, a filename extension like 'cpp' or 'java'.
      +   * @param opt_numberLines {number|boolean} True to number lines,
      +   *     or the 1-indexed number of the first line in sourceCodeHtml.
      +   */
      +  function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
      +    var container = document.createElement('pre');
      +    // This could cause images to load and onload listeners to fire.
      +    // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
      +    // We assume that the inner HTML is from a trusted source.
      +    container.innerHTML = sourceCodeHtml;
      +    if (opt_numberLines) {
      +      numberLines(container, opt_numberLines, true);
      +    }
      +
      +    var job = {
      +      langExtension: opt_langExtension,
      +      numberLines: opt_numberLines,
      +      sourceNode: container,
      +      pre: 1
      +    };
      +    applyDecorator(job);
      +    return container.innerHTML;
      +  }
      +
      +  function prettyPrint(opt_whenDone) {
      +    function byTagName(tn) { return document.getElementsByTagName(tn); }
      +    // fetch a list of nodes to rewrite
      +    var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
      +    var elements = [];
      +    for (var i = 0; i < codeSegments.length; ++i) {
      +      for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
      +        elements.push(codeSegments[i][j]);
      +      }
      +    }
      +    codeSegments = null;
      +
      +    var clock = Date;
      +    if (!clock['now']) {
      +      clock = { 'now': function () { return +(new Date); } };
      +    }
      +
      +    // The loop is broken into a series of continuations to make sure that we
      +    // don't make the browser unresponsive when rewriting a large page.
      +    var k = 0;
      +    var prettyPrintingJob;
      +
      +    var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
      +    var prettyPrintRe = /\bprettyprint\b/;
      +    var prettyPrintedRe = /\bprettyprinted\b/;
      +    var preformattedTagNameRe = /pre|xmp/i;
      +    var codeRe = /^code$/i;
      +    var preCodeXmpRe = /^(?:pre|code|xmp)$/i;
      +
      +    function doWork() {
      +      var endTime = (win['PR_SHOULD_USE_CONTINUATION'] ?
      +                     clock['now']() + 250 /* ms */ :
      +                     Infinity);
      +      for (; k < elements.length && clock['now']() < endTime; k++) {
      +        var cs = elements[k];
      +        var className = cs.className;
      +        if (prettyPrintRe.test(className)
      +            // Don't redo this if we've already done it.
      +            // This allows recalling pretty print to just prettyprint elements
      +            // that have been added to the page since last call.
      +            && !prettyPrintedRe.test(className)) {
      +
      +          // make sure this is not nested in an already prettified element
      +          var nested = false;
      +          for (var p = cs.parentNode; p; p = p.parentNode) {
      +            var tn = p.tagName;
      +            if (preCodeXmpRe.test(tn)
      +                && p.className && prettyPrintRe.test(p.className)) {
      +              nested = true;
      +              break;
      +            }
      +          }
      +          if (!nested) {
      +            // Mark done.  If we fail to prettyprint for whatever reason,
      +            // we shouldn't try again.
      +            cs.className += ' prettyprinted';
      +
      +            // If the classes includes a language extensions, use it.
      +            // Language extensions can be specified like
      +            //     <pre class="prettyprint lang-cpp">
      +            // the language extension "cpp" is used to find a language handler
      +            // as passed to PR.registerLangHandler.
      +            // HTML5 recommends that a language be specified using "language-"
      +            // as the prefix instead.  Google Code Prettify supports both.
      +            // http://dev.w3.org/html5/spec-author-view/the-code-element.html
      +            var langExtension = className.match(langExtensionRe);
      +            // Support <pre class="prettyprint"><code class="language-c">
      +            var wrapper;
      +            if (!langExtension && (wrapper = childContentWrapper(cs))
      +                && codeRe.test(wrapper.tagName)) {
      +              langExtension = wrapper.className.match(langExtensionRe);
      +            }
      +
      +            if (langExtension) { langExtension = langExtension[1]; }
      +
      +            var preformatted;
      +            if (preformattedTagNameRe.test(cs.tagName)) {
      +              preformatted = 1;
      +            } else {
      +              var currentStyle = cs['currentStyle'];
      +              var whitespace = (
      +                  currentStyle
      +                  ? currentStyle['whiteSpace']
      +                  : (document.defaultView
      +                     && document.defaultView.getComputedStyle)
      +                  ? document.defaultView.getComputedStyle(cs, null)
      +                  .getPropertyValue('white-space')
      +                  : 0);
      +              preformatted = whitespace
      +                  && 'pre' === whitespace.substring(0, 3);
      +            }
      +
      +            // Look for a class like linenums or linenums:<n> where <n> is the
      +            // 1-indexed number of the first line.
      +            var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
      +            lineNums = lineNums
      +                ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
      +                : false;
      +            if (lineNums) { numberLines(cs, lineNums, preformatted); }
      +
      +            // do the pretty printing
      +            prettyPrintingJob = {
      +              langExtension: langExtension,
      +              sourceNode: cs,
      +              numberLines: lineNums,
      +              pre: preformatted
      +            };
      +            applyDecorator(prettyPrintingJob);
      +          }
      +        }
      +      }
      +      if (k < elements.length) {
      +        // finish up in a continuation
      +        setTimeout(doWork, 250);
      +      } else if (opt_whenDone) {
      +        opt_whenDone();
      +      }
      +    }
      +
      +    doWork();
      +  }
      +
      +  /**
      +   * Contains functions for creating and registering new language handlers.
      +   * @type {Object}
      +   */
      +  var PR = win['PR'] = {
      +        'createSimpleLexer': createSimpleLexer,
      +        'registerLangHandler': registerLangHandler,
      +        'sourceDecorator': sourceDecorator,
      +        'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
      +        'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
      +        'PR_COMMENT': PR_COMMENT,
      +        'PR_DECLARATION': PR_DECLARATION,
      +        'PR_KEYWORD': PR_KEYWORD,
      +        'PR_LITERAL': PR_LITERAL,
      +        'PR_NOCODE': PR_NOCODE,
      +        'PR_PLAIN': PR_PLAIN,
      +        'PR_PUNCTUATION': PR_PUNCTUATION,
      +        'PR_SOURCE': PR_SOURCE,
      +        'PR_STRING': PR_STRING,
      +        'PR_TAG': PR_TAG,
      +        'PR_TYPE': PR_TYPE,
      +        'prettyPrintOne': win['prettyPrintOne'] = prettyPrintOne,
      +        'prettyPrint': win['prettyPrint'] = prettyPrint
      +      };
      +   
      +
      +/* Register Lua syntaxes */   
      +   PR['registerLangHandler'](
      +    PR['createSimpleLexer'](
      +        [
      +         // Whitespace
      +         [PR['PR_PLAIN'],       /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
      +         // A double or single quoted, possibly multi-line, string.
      +         [PR['PR_STRING'],      /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/, null, '"\'']
      +        ],
      +        [
      +         // A comment is either a line comment that starts with two dashes, or
      +         // two dashes preceding a long bracketed block.
      +         [PR['PR_COMMENT'], /^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],
      +         [PR['PR_TYPE'], /^nil|false|true/],
      +         // A long bracketed block not preceded by -- is a string.
      +         [PR['PR_STRING'],  /^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],
      +         [PR['PR_KEYWORD'], /^(?:and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|require|return|then|until|while)\b/, null],
      +         // A number is a hex integer literal, a decimal real literal, or in
      +         // scientific notation.
      +         [PR['PR_LITERAL'],
      +          /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
      +         // An identifier
      +         [PR['PR_PLAIN'], /^[a-z_]\w*/i],
      +         // A run of punctuation
      +         [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]
      +        ]),
      +    ['lua']);
      +
      +
      +  // Make PR available via the Asynchronous Module Definition (AMD) API.
      +  // Per https://github.com/amdjs/amdjs-api/wiki/AMD:
      +  // The Asynchronous Module Definition (AMD) API specifies a
      +  // mechanism for defining modules such that the module and its
      +  // dependencies can be asynchronously loaded.
      +  // ...
      +  // To allow a clear indicator that a global define function (as
      +  // needed for script src browser loading) conforms to the AMD API,
      +  // any global define function SHOULD have a property called "amd"
      +  // whose value is an object. This helps avoid conflict with any
      +  // other existing JavaScript code that could have defined a define()
      +  // function that does not conform to the AMD API.
      +  if (typeof define === "function" && define['amd']) {
      +    define("google-code-prettify", [], function () {
      +      return PR; 
      +    });
      +  }
      +})();
      diff --git a/docs/manual/style/scripts/prettify.min.js b/docs/manual/style/scripts/prettify.min.js
      new file mode 100644
      index 00000000000..4f0f9f52daf
      --- /dev/null
      +++ b/docs/manual/style/scripts/prettify.min.js
      @@ -0,0 +1,123 @@
      +// see prettify.js for copyright, license and expanded version
      +window['PR_SHOULD_USE_CONTINUATION']=true;var prettyPrintOne;var prettyPrint;(function(){var win=window;var FLOW_CONTROL_KEYWORDS=["break,continue,do,else,for,if,return,while"];var C_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default,"+"double,enum,extern,float,goto,int,long,register,short,signed,sizeof,module,"+"static,struct,switch,typedef,union,unsigned,void,volatile"];var COMMON_KEYWORDS=[C_KEYWORDS,"catch,class,delete,false,import,"+"new,operator,private,protected,public,this,throw,true,try,typeof"];var CPP_KEYWORDS=[COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool,"+"concept,concept_map,const_cast,constexpr,decltype,"+"dynamic_cast,explicit,export,friend,inline,late_check,"+"mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,"+"template,typeid,typename,using,virtual,where,request_req"];var JAVA_KEYWORDS=[COMMON_KEYWORDS,"abstract,boolean,byte,extends,final,finally,implements,import,"+"instanceof,null,native,package,strictfp,super,synchronized,throws,"+"transient"];var CSHARP_KEYWORDS=[JAVA_KEYWORDS,"as,base,by,checked,decimal,delegate,descending,dynamic,event,"+"fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,"+"lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,"+"sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,"+"var,virtual,where"];var COFFEE_KEYWORDS="all,and,by,catch,class,else,extends,false,finally,"+"for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,"+"throw,true,try,unless,until,when,while,yes";var JSCRIPT_KEYWORDS=[COMMON_KEYWORDS,"debugger,eval,export,function,get,null,set,undefined,var,with,"+"Infinity,NaN"];var PERL_KEYWORDS="caller,delete,die,do,dump,else,elsif,eval,exit,foreach,for,"+"goto,if,import,last,local,my,next,no,our,print,printf,package,redo,require,"+"sub,undef,unless,until,use,wantarray,while,BEGIN,END";var PHP_KEYWORDS="abstract,and,array,as,break,case,catch,cfunction,class,"+"clone,const,continue,declare,default,do,else,elseif,enddeclare,endfor,"+"endforeach,endif,endswitch,endwhile,extends,final,for,foreach,function,"+"global,goto,if,implements,interface,instanceof,namespace,new,old_function,"+"or,private,protected,public,static,switch,throw,try,use,var,while,xor,"+"die,echo,empty,exit,eval,include,include_once,isset,list,require,"+"require_once,return,print,unset";var PYTHON_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"and,as,assert,class,def,del,"+"elif,except,exec,finally,from,global,import,in,is,lambda,"+"nonlocal,not,or,pass,print,raise,try,with,yield,"+"False,True,None"];var RUBY_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"alias,and,begin,case,class,"+"def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,"+"rescue,retry,self,super,then,true,undef,unless,until,when,yield,"+"BEGIN,END"];var SH_KEYWORDS=[FLOW_CONTROL_KEYWORDS,"case,done,elif,esac,eval,fi,"+"function,in,local,set,then,until,echo"];var CONFIG_ENVS=["User-Agent,HTTP_USER_AGENT,HTTP_REFERER,HTTP_COOKIE,HTTP_FORWARDED,HTTP_HOST,HTTP_PROXY_CONNECTION,HTTP_ACCEPT,REMOTE_ADDR,REMOTE_HOST,REMOTE_PORT,REMOTE_USER,REMOTE_IDENT,REQUEST_METHOD,SCRIPT_FILENAME,PATH_INFO,QUERY_STRING,AUTH_TYPE,DOCUMENT_ROOT,SERVER_ADMIN,SERVER_NAME,SERVER_ADDR,SERVER_PORT,SERVER_PROTOCOL,SERVER_SOFTWARE,TIME_YEAR,TIME_MON,TIME_DAY,TIME_HOUR,TIME_MIN,TIME_SEC,TIME_WDAY,TIME,API_VERSION,THE_REQUEST,REQUEST_URI,REQUEST_FILENAME,IS_SUBREQ,HTTPS,REQUEST_SCHEME"];var CONFIG_KEYWORDS=["Macro,UndefMacro,Use,AuthLDAPURL,AcceptFilter,AcceptPathInfo,AccessFileName,Action,AddAlt,AddAltByEncoding,AddAltByType,AddCharset,AddDefaultCharset,AddDescription,AddEncoding,AddHandler,AddIcon,AddIconByEncoding,AddIconByType,AddInputFilter,AddLanguage,AddModuleInfo,AddOutputFilter,AddOutputFilterByType,AddType,Alias,AliasMatch,Allow,AllowCONNECT,AllowEncodedSlashes,AllowMethods,AllowOverride,AllowOverrideList,Anonymous,Anonymous_LogEmail,Anonymous_MustGiveEmail,Anonymous_NoUserID,Anonymous_VerifyEmail,AsyncRequestWorkerFactor,AuthBasicAuthoritative,AuthBasicProvider,AuthDBDUserPWQuery,AuthDBDUserRealmQuery,AuthDBMGroupFile,AuthDBMType,AuthDBMUserFile,AuthDigestAlgorithm,AuthDigestDomain,AuthDigestNcCheck,AuthDigestNonceFormat,AuthDigestNonceLifetime,AuthDigestProvider,AuthDigestQop,AuthDigestShmemSize,AuthFormAuthoritative,AuthFormBody,AuthFormDisableNoStore,AuthFormFakeBasicAuth,AuthFormLocation,AuthFormLoginRequiredLocation,AuthFormLoginSuccessLocation,AuthFormLogoutLocation,AuthFormMethod,AuthFormMimetype,AuthFormPassword,AuthFormProvider,AuthFormSitePassphrase,AuthFormSize,AuthFormUsername,AuthGroupFile,AuthLDAPAuthorizePrefix,AuthLDAPBindAuthoritative,AuthLDAPBindDN,AuthLDAPBindPassword,AuthLDAPCharsetConfig,AuthLDAPCompareAsUser,AuthLDAPCompareDNOnServer,AuthLDAPDereferenceAliases,AuthLDAPGroupAttribute,AuthLDAPGroupAttributeIsDN,AuthLDAPInitialBindAsUser,AuthLDAPInitialBindPattern,AuthLDAPMaxSubGroupDepth,AuthLDAPRemoteUserAttribute,AuthLDAPRemoteUserIsDN,AuthLDAPSearchAsUser,AuthLDAPSubGroupAttribute,AuthLDAPSubGroupClass,AuthLDAPUrl,AuthMerging,AuthName,AuthnCacheContext,AuthnCacheEnable,AuthnCacheProvideFor,AuthnCacheSOCache,AuthnCacheTimeout,<AuthnProviderAlias>,AuthType,AuthUserFile,AuthzDBDLoginToReferer,AuthzDBDQuery,AuthzDBDRedirectQuery,AuthzDBMType,<AuthzProviderAlias>,AuthzSendForbiddenOnFailure,BalancerGrowth,BalancerMember,BrowserMatch,BrowserMatchNoCase,BufferedLogs,BufferSize,CacheDefaultExpire,CacheDetailHeader,CacheDirLength,CacheDirLevels,CacheDisable,CacheEnable,CacheFile,CacheHeader,CacheIgnoreCacheControl,CacheIgnoreHeaders,CacheIgnoreNoLastMod,CacheIgnoreQueryString,CacheIgnoreURLSessionIdentifiers,CacheKeyBaseURL,CacheLastModifiedFactor,CacheLock,CacheLockMaxAge,CacheLockPath,CacheMaxExpire,CacheMaxFileSize,CacheMinExpire,CacheMinFileSize,CacheNegotiatedDocs,CacheQuickHandler,CacheReadSize,CacheReadTime,CacheRoot,CacheStaleOnError,CacheStoreExpired,CacheStoreNoStore,CacheStorePrivate,CGIMapExtension,CharsetDefault,CharsetOptions,CharsetSourceEnc,CheckCaseOnly,CheckSpelling,ChrootDir,ContentDigest,CookieDomain,CookieExpires,CookieName,CookieStyle,CookieTracking,CoreDumpDirectory,CustomLog,Dav,DavDepthInfinity,DavGenericLockDB,DavLockDB,DavMinTimeout,DBDExptime,DBDInitSQL,DBDKeep,DBDMax,DBDMin,DBDParams,DBDPersist,DBDPrepareSQL,DBDriver,DefaultIcon,DefaultLanguage,DefaultRuntimeDir,DefaultType,Define,DeflateBufferSize,DeflateCompressionLevel,DeflateFilterNote,DeflateMemLevel,DeflateWindowSize,Deny,<Directory>,DirectoryIndex,DirectoryIndexRedirect,<DirectoryMatch>,DirectorySlash,DocumentRoot,DTracePrivileges,DumpIOInput,DumpIOOutput,<Else>,<ElseIf>,EnableExceptionHook,EnableMMAP,EnableSendfile,Error,ErrorDocument,ErrorLog,ErrorLogFormat,Example,ExpiresActive,ExpiresByType,ExpiresDefault,ExtendedStatus,ExtFilterDefine,ExtFilterOptions,FallbackResource,FileETag,<Files>,<FilesMatch>,FilterChain,FilterDeclare,FilterProtocol,FilterProvider,FilterTrace,ForceLanguagePriority,ForceType,ForensicLog,GprofDir,GracefulShutdownTimeout,Group,Header,HeaderName,HeartbeatAddress,HeartbeatListen,HeartbeatMaxServers,HeartbeatStorage,HeartbeatStorage,HostnameLookups,IdentityCheck,IdentityCheckTimeout,<If>,<IfDefine>,<IfModule>,<IfVersion>,ImapBase,ImapDefault,ImapMenu,Include,IncludeOptional,IndexHeadInsert,IndexIgnore,IndexIgnoreReset,IndexOptions,IndexOrderDefault,IndexStyleSheet,InputSed,ISAPIAppendLogToErrors,ISAPIAppendLogToQuery,ISAPICacheFile,ISAPIFakeAsync,ISAPILogNotSupported,ISAPIReadAheadBuffer,KeepAlive,KeepAliveTimeout,KeptBodySize,LanguagePriority,LDAPCacheEntries,LDAPCacheTTL,LDAPConnectionPoolTTL,LDAPConnectionTimeout,LDAPLibraryDebug,LDAPOpCacheEntries,LDAPOpCacheTTL,LDAPReferralHopLimit,LDAPReferrals,LDAPRetries,LDAPRetryDelay,LDAPSharedCacheFile,LDAPSharedCacheSize,LDAPTimeout,LDAPTrustedClientCert,LDAPTrustedGlobalCert,LDAPTrustedMode,LDAPVerifyServerCert,<Limit>,<LimitExcept>,LimitInternalRecursion,LimitRequestBody,LimitRequestFields,LimitRequestFieldSize,LimitRequestLine,LimitXMLRequestBody,Listen,ListenBackLog,LoadFile,LoadModule,<Location>,<LocationMatch>,LogFormat,LogLevel,LogMessage,LuaCodeCache,LuaHookAccessChecker,LuaHookAuthChecker,LuaAuthzProvider,LuaHookCheckUserID,LuaHookFixups,LuaHookInsertFilter,LuaHookMapToStorage,LuaHookTranslateName,LuaHookTypeChecker,LuaInherit,LuaInputFilter,LuaMapHandler,LuaOutputFilter,LuaPackageCPath,LuaPackagePath,LuaQuickHandler,LuaRoot,LuaScope,MaxConnectionsPerChild,MaxKeepAliveRequests,MaxMemFree,MaxRangeOverlaps,MaxRangeReversals,MaxRanges,MaxRequestWorkers,MaxSpareServers,MaxSpareThreads,MaxThreads,MetaDir,MetaFiles,MetaSuffix,MimeMagicFile,MinSpareServers,MinSpareThreads,MMapFile,ModemStandard,ModMimeUsePathInfo,MultiviewsMatch,Mutex,NameVirtualHost,NoProxy,NWSSLTrustedCerts,NWSSLUpgradeable,Options,Order,OutputSed,PassEnv,PidFile,PrivilegesMode,Protocol,ProtocolEcho,<Proxy>,ProxyAddHeaders,ProxyBadHeader,ProxyBlock,ProxyDomain,ProxyErrorOverride,ProxyExpressDBMFile,ProxyExpressDBMType,ProxyExpressEnable,ProxyFtpDirCharset,ProxyFtpEscapeWildcards,ProxyFtpListOnWildcard,ProxyHTMLBufSize,ProxyHTMLCharsetOut,ProxyHTMLDocType,ProxyHTMLEnable,ProxyHTMLEvents,ProxyHTMLExtended,ProxyHTMLFixups,ProxyHTMLInterp,ProxyHTMLLinks,ProxyHTMLStripComments,ProxyHTMLURLMap,ProxyIOBufferSize,<ProxyMatch>,ProxyMaxForwards,ProxyPass,ProxyPassInterpolateEnv,ProxyPassMatch,ProxyPassReverse,ProxyPassReverseCookieDomain,ProxyPassReverseCookiePath,ProxyPreserveHost,ProxyReceiveBufferSize,ProxyRemote,ProxyRemoteMatch,ProxyRequests,ProxySCGIInternalRedirect,ProxySCGISendfile,ProxySet,ProxySourceAddress,ProxyStatus,ProxyTimeout,ProxyVia,ReadmeName,ReceiveBufferSize,Redirect,RedirectMatch,RedirectPermanent,RedirectTemp,ReflectorHeader,RemoteIPHeader,RemoteIPInternalProxy,RemoteIPInternalProxyList,RemoteIPProxiesHeader,RemoteIPTrustedProxy,RemoteIPTrustedProxyList,RemoveCharset,RemoveEncoding,RemoveHandler,RemoveInputFilter,RemoveLanguage,RemoveOutputFilter,RemoveType,RequestHeader,RequestReadTimeout,Require,<RequireAll>,<RequireAny>,<RequireNone>,RewriteBase,RewriteCond,RewriteEngine,RewriteMap,RewriteOptions,RewriteRule,RLimitCPU,RLimitMEM,RLimitNPROC,Satisfy,ScoreBoardFile,Script,ScriptAlias,ScriptAliasMatch,ScriptInterpreterSource,ScriptLog,ScriptLogBuffer,ScriptLogLength,ScriptSock,SecureListen,SeeRequestTail,SendBufferSize,ServerAdmin,ServerAlias,ServerLimit,ServerName,ServerPath,ServerRoot,ServerSignature,ServerTokens,Session,SessionCookieName,SessionCookieName2,SessionCookieRemove,SessionCryptoCipher,SessionCryptoDriver,SessionCryptoPassphrase,SessionCryptoPassphraseFile,SessionDBDCookieName,SessionDBDCookieName2,SessionDBDCookieRemove,SessionDBDDeleteLabel,SessionDBDInsertLabel,SessionDBDPerUser,SessionDBDSelectLabel,SessionDBDUpdateLabel,SessionEnv,SessionExclude,SessionHeader,SessionInclude,SessionMaxAge,SetEnv,SetEnvIf,SetEnvIfExpr,SetEnvIfNoCase,SetHandler,SetInputFilter,SetOutputFilter,SSIEndTag,SSIErrorMsg,SSIETag,SSILastModified,SSILegacyExprParser,SSIStartTag,SSITimeFormat,SSIUndefinedEcho,SSLCACertificateFile,SSLCACertificatePath,SSLCADNRequestFile,SSLCADNRequestPath,SSLCARevocationCheck,SSLCARevocationFile,SSLCARevocationPath,SSLCertificateChainFile,SSLCertificateFile,SSLCertificateKeyFile,SSLCipherSuite,SSLCryptoDevice,SSLEngine,SSLFIPS,SSLHonorCipherOrder,SSLInsecureRenegotiation,SSLOCSPDefaultResponder,SSLOCSPEnable,SSLOCSPOverrideResponder,SSLOCSPResponderTimeout,SSLOCSPResponseMaxAge,SSLOCSPResponseTimeSkew,SSLOptions,SSLPassPhraseDialog,SSLProtocol,SSLProxyCACertificateFile,SSLProxyCACertificatePath,SSLProxyCARevocationCheck,SSLProxyCARevocationFile,SSLProxyCARevocationPath,SSLProxyCheckPeerCN,SSLProxyCheckPeerExpire,SSLProxyCipherSuite,SSLProxyEngine,SSLProxyMachineCertificateChainFile,SSLProxyMachineCertificateFile,SSLProxyMachineCertificatePath,SSLProxyProtocol,SSLProxyVerify,SSLProxyVerifyDepth,SSLRandomSeed,SSLRenegBufferSize,SSLRequire,SSLRequireSSL,SSLSessionCache,SSLSessionCacheTimeout,SSLSessionTicketKeyFile,SSLStaplingCache,SSLStaplingErrorCacheTimeout,SSLStaplingFakeTryLater,SSLStaplingForceURL,SSLStaplingResponderTimeout,SSLStaplingResponseMaxAge,SSLStaplingResponseTimeSkew,SSLStaplingReturnResponderErrors,SSLStaplingStandardCacheTimeout,SSLStrictSNIVHostCheck,SSLUserName,SSLUseStapling,SSLVerifyClient,SSLVerifyDepth,StartServers,StartThreads,Substitute,Suexec,SuexecUserGroup,ThreadLimit,ThreadsPerChild,ThreadStackSize,TimeOut,TraceEnable,TransferLog,TypesConfig,UnDefine,UnsetEnv,UseCanonicalName,UseCanonicalPhysicalPort,User,UserDir,VHostCGIMode,VHostCGIPrivs,VHostGroup,VHostPrivs,VHostSecure,VHostUser,VirtualDocumentRoot,VirtualDocumentRootIP,<VirtualHost>,VirtualScriptAlias,VirtualScriptAliasIP,WatchdogInterval,XBitHack,xml2EncAlias,xml2EncDefault,xml2StartParse,RewriteLog,RewriteLogLevel"];var CONFIG_OPTIONS=/^[\\+\\-]?(AuthConfig|IncludesNOEXEC|ExecCGI|FollowSymLinks|MultiViews|Includes|Indexes|SymLinksIfOwnerMatch)\b/i;var ALL_KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS+
      +PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS,CONFIG_KEYWORDS,PHP_KEYWORDS];var C_TYPES=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float|char|void|const|static|struct)\d*(_t)?\b)|[a-z_]+_rec|cmd_parms\b/;var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_NOCODE='nocode';var REGEXP_PRECEDER_PATTERN='(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';function combinePrefixPatterns(regexs){var capturedGroupIndex=0;var needToFoldCase=false;var ignoreCase=false;for(var i=0,n=regexs.length;i<n;++i){var regex=regexs[i];if(regex.ignoreCase){ignoreCase=true;}else if(/[a-z]/i.test(regex.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,''))){needToFoldCase=true;ignoreCase=false;break;}}
      +var escapeCharToCodeUnit={'b':8,'t':9,'n':0xa,'v':0xb,'f':0xc,'r':0xd};function decodeEscape(charsetPart){var cc0=charsetPart.charCodeAt(0);if(cc0!==92){return cc0;}
      +var c1=charsetPart.charAt(1);cc0=escapeCharToCodeUnit[c1];if(cc0){return cc0;}else if('0'<=c1&&c1<='7'){return parseInt(charsetPart.substring(1),8);}else if(c1==='u'||c1==='x'){return parseInt(charsetPart.substring(2),16);}else{return charsetPart.charCodeAt(1);}}
      +function encodeEscape(charCode){if(charCode<0x20){return(charCode<0x10?'\\x0':'\\x')+charCode.toString(16);}
      +var ch=String.fromCharCode(charCode);return(ch==='\\'||ch==='-'||ch===']'||ch==='^')?"\\"+ch:ch;}
      +function caseFoldCharset(charSet){var charsetParts=charSet.substring(1,charSet.length-1).match(new RegExp('\\\\u[0-9A-Fa-f]{4}'
      ++'|\\\\x[0-9A-Fa-f]{2}'
      ++'|\\\\[0-3][0-7]{0,2}'
      ++'|\\\\[0-7]{1,2}'
      ++'|\\\\[\\s\\S]'
      ++'|-'
      ++'|[^-\\\\]','g'));var ranges=[];var inverse=charsetParts[0]==='^';var out=['['];if(inverse){out.push('^');}
      +for(var i=inverse?1:0,n=charsetParts.length;i<n;++i){var p=charsetParts[i];if(/\\[bdsw]/i.test(p)){out.push(p);}else{var start=decodeEscape(p);var end;if(i+2<n&&'-'===charsetParts[i+1]){end=decodeEscape(charsetParts[i+2]);i+=2;}else{end=start;}
      +ranges.push([start,end]);if(!(end<65||start>122)){if(!(end<65||start>90)){ranges.push([Math.max(65,start)|32,Math.min(end,90)|32]);}
      +if(!(end<97||start>122)){ranges.push([Math.max(97,start)&~32,Math.min(end,122)&~32]);}}}}
      +ranges.sort(function(a,b){return(a[0]-b[0])||(b[1]-a[1]);});var consolidatedRanges=[];var lastRange=[];for(var i=0;i<ranges.length;++i){var range=ranges[i];if(range[0]<=lastRange[1]+1){lastRange[1]=Math.max(lastRange[1],range[1]);}else{consolidatedRanges.push(lastRange=range);}}
      +for(var i=0;i<consolidatedRanges.length;++i){var range=consolidatedRanges[i];out.push(encodeEscape(range[0]));if(range[1]>range[0]){if(range[1]+1>range[0]){out.push('-');}
      +out.push(encodeEscape(range[1]));}}
      +out.push(']');return out.join('');}
      +function allowAnywhereFoldCaseAndRenumberGroups(regex){var parts=regex.source.match(new RegExp('(?:'
      ++'\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'
      ++'|\\\\u[A-Fa-f0-9]{4}'
      ++'|\\\\x[A-Fa-f0-9]{2}'
      ++'|\\\\[0-9]+'
      ++'|\\\\[^ux0-9]'
      ++'|\\(\\?[:!=]'
      ++'|[\\(\\)\\^]'
      ++'|[^\\x5B\\x5C\\(\\)\\^]+'
      ++')','g'));var n=parts.length;var capturedGroups=[];for(var i=0,groupIndex=0;i<n;++i){var p=parts[i];if(p==='('){++groupIndex;}else if('\\'===p.charAt(0)){var decimalValue=+p.substring(1);if(decimalValue){if(decimalValue<=groupIndex){capturedGroups[decimalValue]=-1;}else{parts[i]=encodeEscape(decimalValue);}}}}
      +for(var i=1;i<capturedGroups.length;++i){if(-1===capturedGroups[i]){capturedGroups[i]=++capturedGroupIndex;}}
      +for(var i=0,groupIndex=0;i<n;++i){var p=parts[i];if(p==='('){++groupIndex;if(!capturedGroups[groupIndex]){parts[i]='(?:';}}else if('\\'===p.charAt(0)){var decimalValue=+p.substring(1);if(decimalValue&&decimalValue<=groupIndex){parts[i]='\\'+capturedGroups[decimalValue];}}}
      +for(var i=0;i<n;++i){if('^'===parts[i]&&'^'!==parts[i+1]){parts[i]='';}}
      +if(regex.ignoreCase&&needToFoldCase){for(var i=0;i<n;++i){var p=parts[i];var ch0=p.charAt(0);if(p.length>=2&&ch0==='['){parts[i]=caseFoldCharset(p);}else if(ch0!=='\\'){parts[i]=p.replace(/[a-zA-Z]/g,function(ch){var cc=ch.charCodeAt(0);return'['+String.fromCharCode(cc&~32,cc|32)+']';});}}}
      +return parts.join('');}
      +var rewritten=[];for(var i=0,n=regexs.length;i<n;++i){var regex=regexs[i];if(regex.global||regex.multiline){throw new Error(''+regex);}
      +rewritten.push('(?:'+allowAnywhereFoldCaseAndRenumberGroups(regex)+')');}
      +return new RegExp(rewritten.join('|'),ignoreCase?'gi':'g');}
      +function extractSourceSpans(node,isPreformatted){var nocode=/(?:^|\s)nocode(?:\s|$)/;var chunks=[];var length=0;var spans=[];var k=0;function walk(node){switch(node.nodeType){case 1:if(nocode.test(node.className)){return;}
      +for(var child=node.firstChild;child;child=child.nextSibling){walk(child);}
      +var nodeName=node.nodeName.toLowerCase();if('br'===nodeName||'li'===nodeName){chunks[k]='\n';spans[k<<1]=length++;spans[(k++<<1)|1]=node;}
      +break;case 3:case 4:var text=node.nodeValue;if(text.length){if(!isPreformatted){text=text.replace(/[ \t\r\n]+/g,' ');}else{text=text.replace(/\r\n?/g,'\n');text=text.replace(/^(\r?\n\s*)+/g,'');text=text.replace(/^\s*/g,'');text=text.replace(/(\r?\n\s*)+$/g,'');}
      +chunks[k]=text;spans[k<<1]=length;length+=text.length;spans[(k++<<1)|1]=node;}
      +break;}}
      +walk(node);return{sourceCode:chunks.join('').replace(/\n$/,''),spans:spans};}
      +function appendDecorations(basePos,sourceCode,langHandler,out){if(!sourceCode){return;}
      +var job={sourceCode:sourceCode,basePos:basePos};langHandler(job);out.push.apply(out,job.decorations);}
      +var notWs=/\S/;function childContentWrapper(element){var wrapper=undefined;for(var c=element.firstChild;c;c=c.nextSibling){var type=c.nodeType;wrapper=(type===1)?(wrapper?element:c):(type===3)?(notWs.test(c.nodeValue)?element:wrapper):wrapper;}
      +return wrapper===element?undefined:wrapper;}
      +function createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};var tokenizer;(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);var allRegexs=[];var regexKeys={};for(var i=0,n=allPatterns.length;i<n;++i){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}
      +var regex=patternParts[1];var k=''+regex;if(!regexKeys.hasOwnProperty(k)){allRegexs.push(regex);regexKeys[k]=null;}}
      +allRegexs.push(/[\0-\uffff]/);tokenizer=combinePrefixPatterns(allRegexs);})();var nPatterns=fallthroughStylePatterns.length;var decorate=function(job){var sourceCode=job.sourceCode,basePos=job.basePos;var decorations=[basePos,PR_PLAIN];var pos=0;var tokens=sourceCode.match(tokenizer)||[];var styleCache={};for(var ti=0,nTokens=tokens.length;ti<nTokens;++ti){var token=tokens[ti];var style=styleCache[token];var match=void 0;var isEmbedded;if(typeof style==='string'){isEmbedded=false;}else{var patternParts=shortcuts[token.charAt(0)];if(patternParts){match=token.match(patternParts[1]);style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];match=token.match(patternParts[1]);if(match){style=patternParts[0];break;}}
      +if(!match){style=PR_PLAIN;}}
      +isEmbedded=style.length>=5&&'lang-'===style.substring(0,5);if(isEmbedded&&!(match&&typeof match[1]==='string')){isEmbedded=false;style=PR_SOURCE;}
      +if(!isEmbedded){styleCache[token]=style;}}
      +var tokenStart=pos;pos+=token.length;if(!isEmbedded){decorations.push(basePos+tokenStart,style);}else{var embeddedSource=match[1];var embeddedSourceStart=token.indexOf(embeddedSource);var embeddedSourceEnd=embeddedSourceStart+embeddedSource.length;if(match[2]){embeddedSourceEnd=token.length-match[2].length;embeddedSourceStart=embeddedSourceEnd-embeddedSource.length;}
      +var lang=style.substring(5);appendDecorations(basePos+tokenStart,token.substring(0,embeddedSourceStart),decorate,decorations);appendDecorations(basePos+tokenStart+embeddedSourceStart,embeddedSource,langHandlerForExtension(lang,embeddedSource),decorations);appendDecorations(basePos+tokenStart+embeddedSourceEnd,token.substring(embeddedSourceEnd),decorate,decorations);}}
      +job.decorations=decorations;};return decorate;}
      +function sourceDecorator(options){var shortcutStylePatterns=[],fallthroughStylePatterns=[];if(options['tripleQuotedStrings']){shortcutStylePatterns.push([PR_STRING,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,'\'"']);}else if(options['multiLineStrings']){shortcutStylePatterns.push([PR_STRING,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,'\'"`']);}else{shortcutStylePatterns.push([PR_STRING,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,'"\'']);}
      +if(options['verbatimStrings']){fallthroughStylePatterns.push([PR_STRING,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);}
      +var hc=options['hashComments'];if(hc){if(options['cStyleComments']){if(hc>1){shortcutStylePatterns.push([PR_COMMENT,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,'#']);}else{shortcutStylePatterns.push([PR_COMMENT,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,'#']);}
      +fallthroughStylePatterns.push([PR_STRING,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null]);}else{shortcutStylePatterns.push([PR_COMMENT,/^#[^\r\n]*/,null,'#']);}}
      +if(options['cStyleComments']){fallthroughStylePatterns.push([PR_COMMENT,/^\/\/[^\r\n]*/,null]);fallthroughStylePatterns.push([PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]);}
      +if(options['regexLiterals']){var REGEX_LITERAL=('/(?=[^/*])'
      ++'(?:[^/\\x5B\\x5C]'
      ++'|\\x5C[\\s\\S]'
      ++'|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
      ++'/');fallthroughStylePatterns.push(['lang-regex',new RegExp('^'+REGEXP_PRECEDER_PATTERN+'('+REGEX_LITERAL+')')]);}
      +var types=options['types'];if(types){fallthroughStylePatterns.push([PR_TYPE,types]);}
      +if(options['strings']){var strings=(""+options['strings']).replace(/^ | $/g,'').replace(/-/g,'\\-');fallthroughStylePatterns.push([PR_STRING,new RegExp('(?:'+strings.replace(/[\s,]+/g,'|')+')'),,null]);}
      +var keywords=(""+options['keywords']).replace(/^ | $/g,'');if(keywords.length){fallthroughStylePatterns.push([PR_KEYWORD,new RegExp('^(?:'+keywords.replace(/[\s,]+/g,'|')+')\\b'),null]);}
      +shortcutStylePatterns.push([PR_PLAIN,/^\s+/,null,' \r\n\t\xA0']);if(options['httpdComments']){fallthroughStylePatterns.push([PR_PLAIN,/^.*\S.*#/i,null]);}
      +fallthroughStylePatterns.push([PR_LITERAL,/^@[a-z_$][a-z_$@0-9]*|\bNULL\b/i,null],[PR_LITERAL,CONFIG_OPTIONS,null],[PR_TAG,/^\b(AuthzProviderAlias|AuthnProviderAlias|RequireAny|RequireAll|RequireNone|Directory|DirectoryMatch|Location|LocationMatch|VirtualHost|If|Else|ElseIf|Proxy\b|LoadBalancer|Files|FilesMatch|Limit|LimitExcept|IfDefine|IfModule|IfVersion)\b/,null],[PR_TYPE,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_(t|req|module)\b)/,null],[PR_TAG,/^apr_[a-z_0-9]+|ap_[a-z_0-9]+/i,null],[PR_PLAIN,/^[a-z_$][a-z_$@0-9\-]*/i,null],[PR_LITERAL,new RegExp('^(?:'
      ++'0x[a-f0-9]+'
      ++'|[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+:[a-f0-9:]+'
      ++'|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
      ++'(?:e[+\\-]?\\d+)?'
      ++')'
      ++'[a-z]*','i'),null,'0123456789'],[PR_PLAIN,/^\\[\s\S]?/,null],[PR_PUNCTUATION,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns);}
      +var decorateSource=sourceDecorator({'keywords':ALL_KEYWORDS,'hashComments':true,'cStyleComments':true,'multiLineStrings':true,'regexLiterals':true});function numberLines(node,opt_startLineNum,isPreformatted){var nocode=/(?:^|\s)nocode(?:\s|$)/;var lineBreak=/\r\n?|\n/;var document=node.ownerDocument;var li=document.createElement('li');while(node.firstChild){li.appendChild(node.firstChild);}
      +var listItems=[li];function walk(node){switch(node.nodeType){case 1:if(nocode.test(node.className)){break;}
      +if('br'===node.nodeName){breakAfter(node);if(node.parentNode){node.parentNode.removeChild(node);}}else{for(var child=node.firstChild;child;child=child.nextSibling){walk(child);}}
      +break;case 3:case 4:if(isPreformatted){var text=node.nodeValue;var match=text.match(lineBreak);if(match){var firstLine=text.substring(0,match.index);node.nodeValue=firstLine;var tail=text.substring(match.index+match[0].length);if(tail){var parent=node.parentNode;parent.insertBefore(document.createTextNode(tail),node.nextSibling);}
      +breakAfter(node);if(!firstLine){node.parentNode.removeChild(node);}}}
      +break;}}
      +function breakAfter(lineEndNode){while(!lineEndNode.nextSibling){lineEndNode=lineEndNode.parentNode;if(!lineEndNode){return;}}
      +function breakLeftOf(limit,copy){var rightSide=copy?limit.cloneNode(false):limit;var parent=limit.parentNode;if(parent){var parentClone=breakLeftOf(parent,1);var next=limit.nextSibling;parentClone.appendChild(rightSide);for(var sibling=next;sibling;sibling=next){next=sibling.nextSibling;parentClone.appendChild(sibling);}}
      +return rightSide;}
      +var copiedListItem=breakLeftOf(lineEndNode.nextSibling,0);for(var parent;(parent=copiedListItem.parentNode)&&parent.nodeType===1;){copiedListItem=parent;}
      +listItems.push(copiedListItem);}
      +for(var i=0;i<listItems.length;++i){walk(listItems[i]);}
      +if(opt_startLineNum===(opt_startLineNum|0)){listItems[0].setAttribute('value',opt_startLineNum);}
      +var ol=document.createElement('ol');ol.className='linenums';var offset=Math.max(0,((opt_startLineNum-1))|0)||0;for(var i=0,n=listItems.length;i<n;++i){li=listItems[i];li.className='L'+((i+offset)%1);if(!li.firstChild){li.appendChild(document.createTextNode('\xA0'));}
      +ol.appendChild(li);}
      +node.appendChild(ol);}
      +function recombineTagsAndDecorations(job){var isIE8OrEarlier=/\bMSIE\s(\d+)/.exec(navigator.userAgent);isIE8OrEarlier=isIE8OrEarlier&&+isIE8OrEarlier[1]<=8;var newlineRe=/\n/g;var source=job.sourceCode;var sourceLength=source.length;var sourceIndex=0;var spans=job.spans;var nSpans=spans.length;var spanIndex=0;var decorations=job.decorations;var nDecorations=decorations.length;var decorationIndex=0;decorations[nDecorations]=sourceLength;var decPos,i;for(i=decPos=0;i<nDecorations;){if(decorations[i]!==decorations[i+2]){decorations[decPos++]=decorations[i++];decorations[decPos++]=decorations[i++];}else{i+=2;}}
      +nDecorations=decPos;for(i=decPos=0;i<nDecorations;){var startPos=decorations[i];var startDec=decorations[i+1];var end=i+2;while(end+2<=nDecorations&&decorations[end+1]===startDec){end+=2;}
      +decorations[decPos++]=startPos;decorations[decPos++]=startDec;i=end;}
      +nDecorations=decorations.length=decPos;var sourceNode=job.sourceNode;var oldDisplay;if(sourceNode){oldDisplay=sourceNode.style.display;sourceNode.style.display='none';}
      +try{var decoration=null;var X=0;while(spanIndex<nSpans){X=X+1;if(X>5000){break;}
      +var spanStart=spans[spanIndex];var spanEnd=spans[spanIndex+2]||sourceLength;var decEnd=decorations[decorationIndex+2]||sourceLength;var end=Math.min(spanEnd,decEnd);var textNode=spans[spanIndex+1];var styledText;if(textNode.nodeType!==1&&(styledText=source.substring(sourceIndex,end))){if(isIE8OrEarlier){styledText=styledText.replace(newlineRe,'\r');}
      +textNode.nodeValue=styledText;var document=textNode.ownerDocument;var span=document.createElement('span');span.className=decorations[decorationIndex+1];var parentNode=textNode.parentNode;parentNode.replaceChild(span,textNode);span.appendChild(textNode);if(sourceIndex<spanEnd){spans[spanIndex+1]=textNode=document.createTextNode(source.substring(end,spanEnd));parentNode.insertBefore(textNode,span.nextSibling);}}
      +sourceIndex=end;if(sourceIndex>=spanEnd){spanIndex+=2;}
      +if(sourceIndex>=decEnd){decorationIndex+=2;}}}finally{if(sourceNode){sourceNode.style.display=oldDisplay;}}}
      +var langHandlerRegistry={};function registerLangHandler(handler,fileExtensions){for(var i=fileExtensions.length;--i>=0;){var ext=fileExtensions[i];if(!langHandlerRegistry.hasOwnProperty(ext)){langHandlerRegistry[ext]=handler;}else if(win['console']){console['warn']('cannot override language handler %s',ext);}}}
      +function langHandlerForExtension(extension,source){if(!(extension&&langHandlerRegistry.hasOwnProperty(extension))){extension=/^\s*</.test(source)?'default-markup':'default-code';}
      +return langHandlerRegistry[extension];}
      +registerLangHandler(decorateSource,['default-code']);registerLangHandler(createSimpleLexer([],[[PR_PLAIN,/^[^<?]+/],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],['lang-',/^<\?([\s\S]+?)(?:\?>|$)/],['lang-',/^<%([\s\S]+?)(?:%>|$)/],[PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],['lang-',/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],['lang-js',/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],['lang-css',/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],['lang-in.tag',/^(<\/?[a-z][^<>]*>)/i]]),['default-markup','htm','html','mxml','xhtml','xml','xsl']);registerLangHandler(createSimpleLexer([[PR_PLAIN,/^[\s]+/,null,' \t\r\n'],[PR_ATTRIB_VALUE,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,'\"\'']],[[PR_TAG,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[PR_ATTRIB_NAME,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],['lang-uq.val',/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[PR_PUNCTUATION,/^[=<>\/]+/],['lang-js',/^on\w+\s*=\s*\"([^\"]+)\"/i],['lang-js',/^on\w+\s*=\s*\'([^\']+)\'/i],['lang-js',/^on\w+\s*=\s*([^\"\'>\s]+)/i],['lang-css',/^style\s*=\s*\"([^\"]+)\"/i],['lang-css',/^style\s*=\s*\'([^\']+)\'/i],['lang-css',/^style\s*=\s*([^\"\'>\s]+)/i]]),['in.tag']);registerLangHandler(createSimpleLexer([],[[PR_ATTRIB_VALUE,/^[\s\S]+/]]),['uq.val']);registerLangHandler(sourceDecorator({'keywords':CPP_KEYWORDS,'hashComments':true,'cStyleComments':true,'types':C_TYPES}),['c','cc','cpp','cxx','cyc','m']);registerLangHandler(sourceDecorator({'keywords':PHP_KEYWORDS,'hashComments':false,'cStyleComments':true,'multiLineStrings':true,'regexLiterals':true}),['php','phtml','inc']);registerLangHandler(sourceDecorator({'keywords':'null,true,false'}),['json']);registerLangHandler(sourceDecorator({'keywords':CSHARP_KEYWORDS,'hashComments':true,'cStyleComments':true,'verbatimStrings':true,'types':C_TYPES}),['cs']);registerLangHandler(sourceDecorator({'keywords':JAVA_KEYWORDS,'cStyleComments':true}),['java']);registerLangHandler(sourceDecorator({'keywords':SH_KEYWORDS,'hashComments':true,'multiLineStrings':true}),['bsh','csh','sh']);registerLangHandler(sourceDecorator({'keywords':PYTHON_KEYWORDS,'hashComments':true,'multiLineStrings':true,'tripleQuotedStrings':true}),['cv','py']);registerLangHandler(sourceDecorator({'keywords':PERL_KEYWORDS,'hashComments':true,'multiLineStrings':true,'regexLiterals':true}),['perl','pl','pm']);registerLangHandler(sourceDecorator({'keywords':RUBY_KEYWORDS,'hashComments':true,'multiLineStrings':true,'regexLiterals':true}),['rb']);registerLangHandler(sourceDecorator({'keywords':JSCRIPT_KEYWORDS,'cStyleComments':true,'regexLiterals':true}),['js']);registerLangHandler(sourceDecorator({'keywords':COFFEE_KEYWORDS,'hashComments':3,'cStyleComments':true,'multilineStrings':true,'tripleQuotedStrings':true,'regexLiterals':true}),['coffee']);registerLangHandler(createSimpleLexer([],[[PR_STRING,/^[\s\S]+/]]),['regex']);registerLangHandler(sourceDecorator({'keywords':CONFIG_KEYWORDS,'literals':CONFIG_OPTIONS,'strings':CONFIG_ENVS,'hashComments':true,'cStyleComments':false,'multiLineStrings':false,'regexLiterals':false,'httpdComments':true}),['config']);function applyDecorator(job){var opt_langExtension=job.langExtension;try{var sourceAndSpans=extractSourceSpans(job.sourceNode,job.pre);var source=sourceAndSpans.sourceCode;job.sourceCode=source;job.spans=sourceAndSpans.spans;job.basePos=0;langHandlerForExtension(opt_langExtension,source)(job);recombineTagsAndDecorations(job);}catch(e){if(win['console']){console['log'](e&&e['stack']?e['stack']:e);}}}
      +function prettyPrintOne(sourceCodeHtml,opt_langExtension,opt_numberLines){var container=document.createElement('pre');container.innerHTML=sourceCodeHtml;if(opt_numberLines){numberLines(container,opt_numberLines,true);}
      +var job={langExtension:opt_langExtension,numberLines:opt_numberLines,sourceNode:container,pre:1};applyDecorator(job);return container.innerHTML;}
      +function prettyPrint(opt_whenDone){function byTagName(tn){return document.getElementsByTagName(tn);}
      +var codeSegments=[byTagName('pre'),byTagName('code'),byTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0,n=codeSegments[i].length;j<n;++j){elements.push(codeSegments[i][j]);}}
      +codeSegments=null;var clock=Date;if(!clock['now']){clock={'now':function(){return+(new Date);}};}
      +var k=0;var prettyPrintingJob;var langExtensionRe=/\blang(?:uage)?-([\w.]+)(?!\S)/;var prettyPrintRe=/\bprettyprint\b/;var prettyPrintedRe=/\bprettyprinted\b/;var preformattedTagNameRe=/pre|xmp/i;var codeRe=/^code$/i;var preCodeXmpRe=/^(?:pre|code|xmp)$/i;function doWork(){var endTime=(win['PR_SHOULD_USE_CONTINUATION']?clock['now']()+250:Infinity);for(;k<elements.length&&clock['now']()<endTime;k++){var cs=elements[k];var className=cs.className;if(prettyPrintRe.test(className)&&!prettyPrintedRe.test(className)){var nested=false;for(var p=cs.parentNode;p;p=p.parentNode){var tn=p.tagName;if(preCodeXmpRe.test(tn)&&p.className&&prettyPrintRe.test(p.className)){nested=true;break;}}
      +if(!nested){cs.className+=' prettyprinted';var langExtension=className.match(langExtensionRe);var wrapper;if(!langExtension&&(wrapper=childContentWrapper(cs))&&codeRe.test(wrapper.tagName)){langExtension=wrapper.className.match(langExtensionRe);}
      +if(langExtension){langExtension=langExtension[1];}
      +var preformatted;if(preformattedTagNameRe.test(cs.tagName)){preformatted=1;}else{var currentStyle=cs['currentStyle'];var whitespace=(currentStyle?currentStyle['whiteSpace']:(document.defaultView&&document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(cs,null).getPropertyValue('white-space'):0);preformatted=whitespace&&'pre'===whitespace.substring(0,3);}
      +var lineNums=cs.className.match(/\blinenums\b(?::(\d+))?/);lineNums=lineNums?lineNums[1]&&lineNums[1].length?+lineNums[1]:true:false;if(lineNums){numberLines(cs,lineNums,preformatted);}
      +prettyPrintingJob={langExtension:langExtension,sourceNode:cs,numberLines:lineNums,pre:preformatted};applyDecorator(prettyPrintingJob);}}}
      +if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}
      +doWork();}
      +var PR=win['PR']={'createSimpleLexer':createSimpleLexer,'registerLangHandler':registerLangHandler,'sourceDecorator':sourceDecorator,'PR_ATTRIB_NAME':PR_ATTRIB_NAME,'PR_ATTRIB_VALUE':PR_ATTRIB_VALUE,'PR_COMMENT':PR_COMMENT,'PR_DECLARATION':PR_DECLARATION,'PR_KEYWORD':PR_KEYWORD,'PR_LITERAL':PR_LITERAL,'PR_NOCODE':PR_NOCODE,'PR_PLAIN':PR_PLAIN,'PR_PUNCTUATION':PR_PUNCTUATION,'PR_SOURCE':PR_SOURCE,'PR_STRING':PR_STRING,'PR_TAG':PR_TAG,'PR_TYPE':PR_TYPE,'prettyPrintOne':win['prettyPrintOne']=prettyPrintOne,'prettyPrint':win['prettyPrint']=prettyPrint};PR['registerLangHandler'](PR['createSimpleLexer']([[PR['PR_PLAIN'],/^[\t\n\r \xA0]+/,null,'\t\n\r \xA0'],[PR['PR_STRING'],/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,'"\'']],[[PR['PR_COMMENT'],/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],[PR['PR_TYPE'],/^nil|false|true/],[PR['PR_STRING'],/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],[PR['PR_KEYWORD'],/^(?:and|break|do|else|elseif|end|for|function|if|in|local|not|or|repeat|require|return|then|until|while)\b/,null],[PR['PR_LITERAL'],/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],[PR['PR_PLAIN'],/^[a-z_]\w*/i],[PR['PR_PUNCTUATION'],/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),['lua']);if(typeof define==="function"&&define['amd']){define("google-code-prettify",[],function(){return PR;});}})();
      \ No newline at end of file
      diff --git a/docs/manual/style/sitemap.dtd b/docs/manual/style/sitemap.dtd
      index e47e8a9db13..829f326017e 100644
      --- a/docs/manual/style/sitemap.dtd
      +++ b/docs/manual/style/sitemap.dtd
      @@ -23,12 +23,16 @@
       <!-- <sitemap> is the root element -->
       <!ELEMENT sitemap (title, summary?, seealso*, category*)>
       
      -<!ATTLIST sitemap metafile CDATA  #REQUIRED>
      +<!ATTLIST sitemap metafile CDATA  #REQUIRED
      +                  upgrade  CDATA  #IMPLIED
      +>
       
       <!-- <indexpage> is another root element -->
       <!ELEMENT indexpage (parentdocument, title, category*)>
       
      -<!ATTLIST indexpage metafile CDATA  #REQUIRED>
      +<!ATTLIST indexpage metafile CDATA  #REQUIRED
      +                    upgrade  CDATA  #IMPLIED
      +>
       
       <!ELEMENT category (title, page*)>
       <!ATTLIST category id ID #IMPLIED>
      diff --git a/docs/manual/style/version.ent b/docs/manual/style/version.ent
      index eaf37017895..b527680139c 100644
      --- a/docs/manual/style/version.ent
      +++ b/docs/manual/style/version.ent
      @@ -18,7 +18,7 @@
       -->
       
       <!ENTITY httpd.major "2">
      -<!ENTITY httpd.minor "3">
      -<!ENTITY httpd.patch "16">
      +<!ENTITY httpd.minor "4">
      +<!ENTITY httpd.patch "26">
       
      -<!ENTITY httpd.docs "trunk">
      +<!ENTITY httpd.docs "2.4">
      diff --git a/docs/manual/style/xsl/common.xsl b/docs/manual/style/xsl/common.xsl
      index bc5cd47ffea..24a1f102c43 100644
      --- a/docs/manual/style/xsl/common.xsl
      +++ b/docs/manual/style/xsl/common.xsl
      @@ -20,6 +20,8 @@
       <!DOCTYPE xsl:stylesheet [
           <!ENTITY nbsp SYSTEM "util/nbsp.xml">
           <!ENTITY lf SYSTEM "util/lf.xml">
      +    <!ENTITY % HTTPD-VERSION SYSTEM "../version.ent">
      +    %HTTPD-VERSION;
       ]>
       <xsl:stylesheet version="1.0"
                     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      @@ -31,6 +33,7 @@
       <!--                                                                      -->
       
       <!-- Injected variables:                                                  -->
      +<!--   $is-retired      - (boolean) Is this httpd version retired?        -->
       <!--   $is-chm          - (boolean) target is for CHM generation or not   -->
       <!--   $is-zip          - (boolean) target is for ZIP generation or not   -->
       <!--   $message         - (node-set) localized common text snippets       -->
      @@ -45,7 +48,7 @@
       <!-- space separated list of blockelements defined in common.dtd -->
       <!--    used for inline content catching in <example>s           -->
       <xsl:variable name="blockelements">
      -    p  example  note  table  ul  ol  dl  pre  img  blockquote
      +    p  example  note  table  ul  ol  dl  pre  highlight img  blockquote
       </xsl:variable>
       
       <!-- relative path to /manual/ -->
      @@ -64,10 +67,12 @@
       
       <!-- load utility snippets -->
       <xsl:include href="util/modtrans.xsl" />
      +<xsl:include href="util/pretrim.xsl" />
       
       <!-- make sure, we set relative anchors only, if we're actually -->
       <!-- transforming a modulefile (see <directive> template)       -->
       <xsl:variable name="in-modulesynopsis" select="boolean(/modulesynopsis)" />
      +<xsl:variable name="upgrade" select="boolean(/*/@upgrade)" />
       
       <!-- when referencing to a directory, we may need to complete the path -->
       <!-- with the index file (for offline applications like *.chm files)   -->
      @@ -98,13 +103,10 @@
       <!-- ==================================================================== -->
       <xsl:template name="head">
       <head>
      -    <!-- the meta element is necessary for offline handling like CHM -->
      -    <xsl:choose>
      -    <xsl:when test="$is-chm or $is-zip">
      -        <meta http-equiv="Content-Type"
      -                 content="text/html; charset={$output-encoding}" />
      -    </xsl:when>
      -    <xsl:otherwise>
      +    &lf;
      +    <meta http-equiv="Content-Type"
      +          content="text/html; charset={$output-encoding}" />&lf;
      +    <xsl:if test="not($is-chm or $is-zip)">
               <xsl:comment>
                   &lf;
                   <xsl:text>        </xsl:text>
      @@ -120,9 +122,8 @@
                   <xsl:text>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</xsl:text>
                   &lf;
                   <xsl:text>      </xsl:text>
      -        </xsl:comment>
      -    </xsl:otherwise>
      -    </xsl:choose>&lf;
      +        </xsl:comment>&lf;
      +    </xsl:if>
       
           <title>
               <xsl:choose>
      @@ -137,6 +138,8 @@
       
               <xsl:text> </xsl:text>
               <xsl:value-of select="normalize-space($message[@id='apachetitle'])"/>
      +        <xsl:text> </xsl:text>
      +        <xsl:value-of select="normalize-space($message[@id='version'])"/> 
           </title>&lf;
       
           <!-- chm files get a slightly different stylesheet -->
      @@ -161,16 +164,30 @@
               <link title="No Sidebar - Default font size" type="text/css" media="all"
                      rel="alternate stylesheet"
                      href="{$path}/style/css/manual-loose-100pc.css"/>
      +        
           </xsl:otherwise>
           </xsl:choose>&lf;
       
           <link type="text/css" media="print"
                  rel="stylesheet"
                  href="{$path}/style/css/manual-print.css"/>
      -
      +    <link href="{$path}/style/css/prettify.css" type="text/css" rel="stylesheet" />&lf;
      +    <script type="text/javascript" src="{$path}/style/scripts/prettify.min.js">&lf;</script>&lf;
           <!-- chm files do not need a favicon -->
           <xsl:if test="not($is-chm or $is-zip)">&lf;
               <link rel="shortcut icon" href="{$path}/images/favicon.ico" />
      +        <xsl:if test="$is-retired">
      +            <xsl:choose>
      +            <xsl:when test="$upgrade">
      +                <xsl:if test="not(/*/@upgrade = '')">
      +                    <link rel="canonical" href="http://httpd.apache.org/docs/current{concat($metafile/path, /*/@upgrade, '.html')}"/>
      +                </xsl:if>
      +            </xsl:when>
      +            <xsl:otherwise>
      +                <link rel="canonical" href="http://httpd.apache.org/docs/current{concat($metafile/path, $metafile/basename, '.html')}"/>
      +            </xsl:otherwise>
      +            </xsl:choose>
      +        </xsl:if>
           </xsl:if>
       </head>
       </xsl:template>
      @@ -189,7 +206,7 @@
                                                     [@id='apachehttpserver'])"/>
           </p>&lf;
       
      -    <img src="{$path}/images/feather.gif" alt="" />
      +    <img src="{$path}/images/feather.png" alt="" />
       </div>&lf; <!-- /page-header -->
       
       <div class="up">
      @@ -265,6 +282,92 @@
       <!-- /top -->
       
       
      +<!-- ==================================================================== -->
      +<!-- retired                                                              -->
      +<!-- ==================================================================== -->
      +<xsl:template name="retired">
      +<xsl:if test="$is-retired">
      +    <xsl:variable name="base">
      +        <xsl:choose>
      +        <xsl:when test="$upgrade">
      +            <xsl:if test="not(/*/@upgrade = '')">
      +                <xsl:value-of select="/*/@upgrade" />
      +            </xsl:if>
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:value-of
      +                select="$metafile/basename" />
      +        </xsl:otherwise>
      +        </xsl:choose>
      +    </xsl:variable>
      +    <xsl:variable name="future">
      +        <xsl:choose>
      +        <xsl:when test="$base = 'index'">
      +            <xsl:value-of select="$metafile/path" />
      +        </xsl:when>
      +        <xsl:when test="$base = ''">
      +            <!-- nothing -->
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:value-of select="concat($metafile/path, $base, '.html')" />
      +        </xsl:otherwise>
      +        </xsl:choose>
      +    </xsl:variable>
      +
      +    <div class="retired">
      +        <h4><xsl:value-of select="$message[@id='retired.headline']" /></h4>
      +        <xsl:apply-templates select="$message[@id='retired.description']" />
      +        <ul>
      +            <li><a href="http://httpd.apache.org/docs/current/">
      +                <xsl:value-of select="$message[@id='retired.current']" /></a>
      +            </li>
      +        </ul>
      +        <xsl:if test="not($future = '')">
      +            <p><xsl:apply-templates select="$message[@id='retired.document']" mode="retired" /></p>
      +        </xsl:if>
      +    </div>
      +</xsl:if>
      +</xsl:template>
      +<!-- /retired -->
      +
      +<xsl:template match="message">
      +    <xsl:apply-templates />
      +</xsl:template>
      +
      +<xsl:template match="link" mode="retired">
      +<xsl:variable name="base">
      +    <xsl:choose>
      +    <xsl:when test="$upgrade">
      +        <xsl:if test="not(/*/@upgrade = '')">
      +            <xsl:value-of select="/*/@upgrade" />
      +        </xsl:if>
      +    </xsl:when>
      +    <xsl:otherwise>
      +        <xsl:value-of
      +            select="$metafile/basename" />
      +    </xsl:otherwise>
      +    </xsl:choose>
      +</xsl:variable>
      +<xsl:variable name="future">
      +    <xsl:choose>
      +    <xsl:when test="$base = 'index'">
      +        <xsl:value-of select="$metafile/path" />
      +    </xsl:when>
      +    <xsl:when test="$base = ''">
      +        <!-- nothing -->
      +    </xsl:when>
      +    <xsl:otherwise>
      +        <xsl:value-of select="concat($metafile/path, $base, '.html')" />
      +    </xsl:otherwise>
      +    </xsl:choose>
      +</xsl:variable>
      +
      +<a href="http://httpd.apache.org/docs/current{$future}">
      +    <xsl:apply-templates />
      +</a>
      +</xsl:template>
      +
      +
       <!-- ==================================================================== -->
       <!-- out of date                                                          -->
       <!-- ==================================================================== -->
      @@ -285,10 +388,36 @@
       <xsl:call-template name="langavail">
           <xsl:with-param name="position" select="'bottom'" />
       </xsl:call-template>
      -
      +<xsl:choose>
      +<xsl:when test="not($is-chm or $is-zip or $metafile/basename = 'index')">
      +<div class="top"><a href="#page-header"><img alt="top" src="{$path}/images/up.gif" /></a></div>
      +<div class="section">
      +<h2><a name="comments_section" id="comments_section"><xsl:value-of select="$message[@id='comments']" /></a></h2>
      +<div class="warning"><strong>Notice:</strong><br/>This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>&lf;
      +<script type="text/javascript">
      +<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/]]></xsl:text>&httpd.docs;<xsl:value-of select="concat($metafile/path, $metafile/basename, '.html')" disable-output-escaping="yes" /><xsl:text disable-output-escaping="yes"><![CDATA[';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]]]>></xsl:text></script>
      +</div>
      +</xsl:when>
      +</xsl:choose>
       <div id="footer">&lf;
           <p class="apache">
      -        <xsl:text>Copyright 2011 The Apache Software Foundation.</xsl:text><br />
      +        <xsl:text>Copyright 2016 The Apache Software Foundation.</xsl:text><br />
               <xsl:if test="normalize-space($message[@id='before-license'])">
                   <xsl:value-of select="$message[@id='before-license']"/>
                   <xsl:text> </xsl:text>
      @@ -307,10 +436,16 @@
       
               <xsl:text>.</xsl:text>
           </p>&lf;
      -
           <xsl:call-template name="super-menu"/>
       
       </div> <!-- /footer -->
      +
      +<script type="text/javascript">
      +<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]]]>></xsl:text></script>
       </xsl:template>
       <!-- /bottom -->
       
      @@ -468,6 +603,90 @@
       <!-- /section/section/section/section -->
       
       
      +
      +<!-- ==================================================================== -->
      +<!-- Render trimmed pre/highlight-text                                    -->
      +<!-- ==================================================================== -->
      +<xsl:template name="pre">
      +<xsl:choose>
      +<!-- Simple case: only one text node -->
      +<xsl:when test="node()[position() = 1 and self::text()] and count(node()) = 1">
      +    <xsl:call-template name="pre-ltrim-one">
      +        <xsl:with-param name="string">
      +            <xsl:call-template name="pre-rtrim">
      +                <xsl:with-param name="string">
      +                    <xsl:call-template name="pre-ltrim">
      +                        <xsl:with-param name="string"
      +                            select="node()[position() = 1 and self::text()]" />
      +                    </xsl:call-template>
      +                </xsl:with-param>
      +            </xsl:call-template>
      +        </xsl:with-param>
      +    </xsl:call-template>
      +</xsl:when>
      +
      +<!-- multiple nodes -->
      +<xsl:otherwise>
      +    <xsl:variable name="from">
      +        <xsl:choose>
      +        <xsl:when test="node()[position() = 1 and self::text()]">
      +            <xsl:value-of select="2" />
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:value-of select="1" />
      +        </xsl:otherwise>
      +        </xsl:choose>
      +    </xsl:variable>
      +    <xsl:variable name="to">
      +        <xsl:choose>
      +        <xsl:when test="node()[position() = last() and self::text()]">
      +            <xsl:value-of select="count(node()) - 1" />
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:value-of select="count(node())" />
      +        </xsl:otherwise>
      +        </xsl:choose>
      +    </xsl:variable>
      +
      +    <xsl:if test="$from = 2">
      +        <xsl:choose>
      +        <xsl:when test="text()[contains(., '&#x0a;')]">
      +            <xsl:call-template name="pre-ltrim">
      +                <xsl:with-param name="string"
      +                    select="node()[position() = 1 and self::text()]" />
      +            </xsl:call-template>
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:variable name="tmp" select="node()[position() = 1 and self::text()]" />
      +            <xsl:value-of select="substring($tmp, string-length(substring-before($tmp, substring(normalize-space($tmp), 1, 1))) + 1, string-length($tmp))" />
      +        </xsl:otherwise>
      +        </xsl:choose>
      +    </xsl:if>
      +
      +    <xsl:apply-templates select="node()[position() &gt;= $from and position() &lt;= $to]" />
      +
      +    <xsl:if test="$to &lt; count(node())">
      +        <xsl:call-template name="pre-rtrim">
      +            <xsl:with-param name="string"
      +                select="node()[position() = last() and self::text()]" />
      +        </xsl:call-template>
      +    </xsl:if>
      +</xsl:otherwise>
      +</xsl:choose>
      +</xsl:template>
      +
      +
      +<!-- ==================================================================== -->
      +<!-- Process source code highlighting                                     -->
      +<!-- ==================================================================== -->
      +<xsl:template match="highlight">
      +<pre class="prettyprint lang-{@language}">
      +    <xsl:call-template name="pre" />
      +</pre>&lf; <!-- /.highlight -->
      +</xsl:template>
      +<!-- /higlight -->
      +
      +
       <!-- ==================================================================== -->
       <!-- (sub)section titles                                                  -->
       <!-- ==================================================================== -->
      @@ -517,7 +736,7 @@
       
           <xsl:text> | </xsl:text>
       
      -    <a href="{$path}/faq/{$index-file}">
      +    <a href="http://wiki.apache.org/httpd/FAQ">
               <xsl:value-of select="$message[@id='faq']" />
           </a>
       
      @@ -664,11 +883,21 @@
       <code class="directive">
           <xsl:choose>
           <xsl:when test="@module">
      -        <xsl:variable name="lowerdirective"
      -            select="translate(., $uppercase, $lowercase)" />
      +        <xsl:variable name="lowerdirective">
      +            <xsl:choose>
      +            <xsl:when test="@name">
      +                <xsl:value-of select="normalize-space(translate(@name,
      +                                        $uppercase, $lowercase))" />
      +            </xsl:when>
      +            <xsl:otherwise>
      +                <xsl:value-of select="normalize-space(translate(.,
      +                                        $uppercase, $lowercase))" />
      +            </xsl:otherwise>
      +            </xsl:choose>
      +        </xsl:variable>
       
               <xsl:choose>
      -        <xsl:when test="$in-modulesynopsis and @module = /modulesynopsis/name">
      +        <xsl:when test="$in-modulesynopsis and normalize-space(@module) = /modulesynopsis/name">
                   <a href="#{$lowerdirective}">
                       <xsl:if test="@type='section'">&lt;</xsl:if>
                       <xsl:value-of select="."/>
      @@ -676,7 +905,7 @@
                   </a>
               </xsl:when>
               <xsl:otherwise>
      -            <a href="{$path}/mod/{@module}.html#{$lowerdirective}">
      +            <a href="{$path}/mod/{normalize-space(@module)}.html#{$lowerdirective}">
                       <xsl:if test="@type='section'">&lt;</xsl:if>
                       <xsl:value-of select="."/>
                       <xsl:if test="@type='section'">&gt;</xsl:if>
      @@ -702,9 +931,16 @@
       <!-- ==================================================================== -->
       <xsl:template match="module" name="module">
       <code class="module">
      -    <a href="{$path}/mod/{.}.html">
      +    <xsl:choose>
      +    <xsl:when test="@outdated = 'true'">
               <xsl:value-of select="."/>
      -    </a>
      +    </xsl:when>
      +    <xsl:otherwise>
      +        <a href="{$path}/mod/{normalize-space(.)}.html">
      +            <xsl:value-of select="."/>
      +        </a>
      +    </xsl:otherwise>
      +    </xsl:choose>
       </code>
       </xsl:template>
       <!-- /module -->
      @@ -1038,7 +1274,7 @@
       <xsl:template match="dd"><dd><xsl:apply-templates select="*|@*|text()" /></dd></xsl:template>
       <xsl:template match="em"><em><xsl:apply-templates select="*|@*|text()" /></em></xsl:template>
       <xsl:template match="strong"><strong><xsl:apply-templates select="*|@*|text()" /></strong></xsl:template>
      -<xsl:template match="pre"><pre><xsl:apply-templates select="*|@*|text()" /></pre></xsl:template>
      +<xsl:template match="pre"><pre><xsl:call-template name="pre" /></pre></xsl:template>
       <xsl:template match="code"><code><xsl:apply-templates select="*|@*|text()" /></code></xsl:template>
       <xsl:template match="var"><var><xsl:apply-templates select="*|@*|text()" /></var></xsl:template>
       <xsl:template match="dfn"><dfn><xsl:apply-templates select="*|@*|text()" /></dfn></xsl:template>
      diff --git a/docs/manual/style/xsl/directiveindex.xsl b/docs/manual/style/xsl/directiveindex.xsl
      index 062ad388015..0216e1a4a65 100644
      --- a/docs/manual/style/xsl/directiveindex.xsl
      +++ b/docs/manual/style/xsl/directiveindex.xsl
      @@ -52,6 +52,8 @@
                   </xsl:call-template>
               </xsl:variable>
       
      +        <xsl:call-template name="retired" />
      +
               <div id="preamble">
                   <h1>
                       <xsl:value-of select="title" />
      @@ -102,6 +104,8 @@
                       [$letter = translate(substring(normalize-space(name), 1, 1),
                                            $lowercase, $uppercase)]">
       <xsl:sort select="name" />
      +<xsl:sort select="../name" /> <!-- in case of duplicate directives -->
      +
           <li>
               <a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
                   <xsl:if test="position() = 1">
      diff --git a/docs/manual/style/xsl/faq.xsl b/docs/manual/style/xsl/faq.xsl
      index 2cd3d3bb551..344bdb61ed8 100644
      --- a/docs/manual/style/xsl/faq.xsl
      +++ b/docs/manual/style/xsl/faq.xsl
      @@ -43,6 +43,8 @@
               <xsl:call-template name="top" />          
       
               <div id="page-content">
      +            <xsl:call-template name="retired" />
      +
                   <div id="preamble">        
                       <h1>
                           <xsl:value-of select="title" />
      diff --git a/docs/manual/style/xsl/hhc.xsl b/docs/manual/style/xsl/hhc.xsl
      index c9fde79837a..34b8aae9441 100644
      --- a/docs/manual/style/xsl/hhc.xsl
      +++ b/docs/manual/style/xsl/hhc.xsl
      @@ -134,6 +134,7 @@
       <!-- category/page                                                        -->
       <!-- ==================================================================== -->
       <xsl:template match="category/page">
      +<xsl:if test="not(starts-with(@href,'http:') or starts-with(@href, 'https:'))">
       &li.start;
       
       <!-- document entry, if not href attribute, assume it means "sitemap" -->
      @@ -168,6 +169,7 @@
       <xsl:apply-templates select="self::page" mode="index" />
       
       &li.end; &lf;&tab;
      +</xsl:if>
       </xsl:template>
       <!-- /category/page -->
       
      diff --git a/docs/manual/style/xsl/hhp.xsl b/docs/manual/style/xsl/hhp.xsl
      index 369377e8515..d8e12eed6ed 100644
      --- a/docs/manual/style/xsl/hhp.xsl
      +++ b/docs/manual/style/xsl/hhp.xsl
      @@ -159,6 +159,7 @@
       <!-- files referenced in sitemap                                          -->
       <!-- ==================================================================== -->
       <xsl:template match="category/page">
      +<xsl:if test="not(starts-with(@href,'http:') or starts-with(@href, 'https:'))">
       <xsl:variable name="filename">
           <xsl:choose>
           <xsl:when test="contains(@href, '#') and substring(@href,
      @@ -177,6 +178,7 @@
       </xsl:variable>
       
       <xsl:value-of select="translate($filename, '/', '\')" />&lf;
      +</xsl:if>
       </xsl:template>
       <!-- /page[@href] -->
       
      diff --git a/docs/manual/style/xsl/indexpage.xsl b/docs/manual/style/xsl/indexpage.xsl
      index d62814bfc1c..789f0df22ff 100644
      --- a/docs/manual/style/xsl/indexpage.xsl
      +++ b/docs/manual/style/xsl/indexpage.xsl
      @@ -55,6 +55,8 @@
               <xsl:call-template name="top"/>&lf;
       
               <div id="page-content">
      +            <xsl:call-template name="retired" />
      +
                   <h1>
                       <xsl:value-of select="title"/>
                   </h1>&lf;
      diff --git a/docs/manual/style/xsl/language.xsl b/docs/manual/style/xsl/language.xsl
      index 946714a29b3..1e1a76a971e 100644
      --- a/docs/manual/style/xsl/language.xsl
      +++ b/docs/manual/style/xsl/language.xsl
      @@ -34,6 +34,7 @@
       
       <xsl:param name="type" />
       <xsl:param name="langs" />
      +<xsl:param name="retired" />
       
       <!-- ==================================================================== -->
       <!-- /                                                                    -->
      @@ -365,7 +366,7 @@ Some targets have additional requirements:
         - the HTML Help compiler in PATH (or modify this build file). The
           compiler (hhc.exe) is part of the HTML Help Workshop which is freely
           available and can be downloaded from
      -    http://msdn.microsoft.com/library/en-us/htmlhelp/html/hwMicrosoftHTMLHelpDownloads.asp
      +    http://msdn.microsoft.com/en-us/library/windows/desktop/ms669985%28v=vs.85%29.aspx
         - The appropriate locale (e.g. Japanese) before invoking hhc.exe. Otherwise
           the compiler is not able to build the fulltext search index correctly and
           the TOC may be garbled, too. In particular:
      @@ -556,6 +557,21 @@ Some targets have additional requirements:
                       </xsl:choose>
                   </xsl:attribute>
               </xsl:element>
      +        &lf;
      +
      +        <xsl:element name="xsl:variable">
      +            <xsl:attribute name="name">is-retired</xsl:attribute>
      +            <xsl:attribute name="select">
      +                <xsl:choose>
      +                <xsl:when test="$retired = 'yes'">
      +                    <xsl:text>true()</xsl:text>
      +                </xsl:when>
      +                <xsl:otherwise>
      +                    <xsl:text>false()</xsl:text>
      +                </xsl:otherwise>
      +                </xsl:choose>
      +            </xsl:attribute>
      +        </xsl:element>
               &lf;&lf;
           </xsl:if>
       
      diff --git a/docs/manual/style/xsl/manualpage.xsl b/docs/manual/style/xsl/manualpage.xsl
      index 30cc9d100e7..d78c4ea9698 100644
      --- a/docs/manual/style/xsl/manualpage.xsl
      +++ b/docs/manual/style/xsl/manualpage.xsl
      @@ -38,10 +38,12 @@
                 <xsl:attribute name="class">no-sidebar</xsl:attribute>
               </xsl:if>
       
      -        <xsl:call-template name="top"/>          
      +        <xsl:call-template name="top"/>
       
               <div id="page-content">
      -            <div id="preamble">        
      +            <xsl:call-template name="retired" />
      +
      +            <div id="preamble">
                       <h1>
                           <xsl:value-of select="title"/>
                       </h1>&lf;
      @@ -50,7 +52,7 @@
       
                       <xsl:apply-templates select="summary" />
                   </div>&lf; <!-- /#preamble -->
      -          
      +
                   <xsl:if test="(not($is-chm) and count(section) > 1) or seealso">
                       <div id="quickview">
                           <xsl:if test="not($is-chm) and count(section) > 1">
      @@ -59,7 +61,10 @@
                               </ul>
                           </xsl:if>
       
      -                    <xsl:if test="seealso">
      +                    <!-- The seealso section shows links to related documents
      +                         explicitly set in .xml docs or simply the comments. -->
      +                    <xsl:if test="seealso or not($is-chm or $is-zip or
      +                                                $metafile/basename = 'index')">
                               <h3>
                                   <xsl:value-of
                                       select="$message[@id='seealso']" />
      @@ -70,6 +75,11 @@
                                       <xsl:apply-templates />
                                   </li>
                               </xsl:for-each>
      +                        <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
      +                            <li><a href="#comments_section"><xsl:value-of
      +                                        select="$message[@id='comments']" /></a>
      +                            </li>
      +                        </xsl:if>
                               </ul>
                           </xsl:if>
                       </div>&lf; <!-- /#quickview -->
      diff --git a/docs/manual/style/xsl/moduleindex.xsl b/docs/manual/style/xsl/moduleindex.xsl
      index e3651a4588d..ad54441326c 100644
      --- a/docs/manual/style/xsl/moduleindex.xsl
      +++ b/docs/manual/style/xsl/moduleindex.xsl
      @@ -36,6 +36,8 @@
               <xsl:call-template name="top"/>  
       
               <div id="page-content">
      +            <xsl:call-template name="retired" />
      +
                   <div id="preamble">
                       <h1>
                           <xsl:value-of select="title" />
      diff --git a/docs/manual/style/xsl/nroff.xsl b/docs/manual/style/xsl/nroff.xsl
      index 5aadc418b23..46d574f04d7 100644
      --- a/docs/manual/style/xsl/nroff.xsl
      +++ b/docs/manual/style/xsl/nroff.xsl
      @@ -373,7 +373,7 @@ FATAL: only tables with two (2) columns are supported.
       <!-- ==================================================================== -->
       <!-- pass through content                                                 -->
       <!-- ==================================================================== -->
      -<xsl:template match="a|code|module|table|program">
      +<xsl:template match="a|code|module|table|program|glossary">
       <xsl:apply-templates />
       </xsl:template>
       
      diff --git a/docs/manual/style/xsl/quickreference.xsl b/docs/manual/style/xsl/quickreference.xsl
      index d59769e7eb1..dcaa590fdc3 100644
      --- a/docs/manual/style/xsl/quickreference.xsl
      +++ b/docs/manual/style/xsl/quickreference.xsl
      @@ -35,6 +35,8 @@
           <body id="directive-index">&lf;
               <xsl:call-template name="top"/>&lf;
       
      +        <xsl:call-template name="retired" />
      +
               <div id="preamble">
                   <h1>
                       <xsl:value-of select="title" />
      @@ -217,6 +219,7 @@
           select="$directives[$letter=translate(substring(normalize-space(name), 1,1),
                                                 $lowercase,$uppercase)]">
       <xsl:sort select="name" />
      +<xsl:sort select="../name" /> <!-- in case of duplicate directives -->
       
           <xsl:choose>
           <xsl:when test="$modules[name=current()/../name]
      @@ -286,28 +289,36 @@
                       <xsl:apply-templates select="$directive/syntax" />
                   </a>
               </td>
      -        <td>
      -            <!-- if the default value contains (at least) one <br />, -->
      -            <!-- this probably means that a short explanation follows -->
      -            <!-- the actual default value. We cut off the string      -->
      -            <!-- after the <br /> so it will not be shown here.       -->
      -            <!-- (add the + character instead)                        -->
      -            <xsl:variable name="default">
      -                <xsl:choose>
      -                <xsl:when test="count($directive/default[count(br) &gt; 0])
      -                                &gt; 0">
      -                    <xsl:value-of
      -                        select="$directive/default/child::node()
      -                                [count(preceding-sibling::*) = 0]" />
      -                </xsl:when>
      -                <xsl:otherwise>
      -                    <xsl:value-of select="$directive/default"/>
      -                </xsl:otherwise>
      -                </xsl:choose>
      -            </xsl:variable>
       
      +        <!-- if the default value contains (at least) one <br />, -->
      +        <!-- this probably means that a short explanation follows -->
      +        <!-- the actual default value. We cut off the string      -->
      +        <!-- after the <br /> so it will not be shown here.       -->
      +        <!-- (add the + character instead)                        -->
      +        <xsl:variable name="default">
      +            <xsl:choose>
      +            <xsl:when test="count($directive/default[count(br) &gt; 0])
      +                            &gt; 0">
      +                <xsl:value-of
      +                    select="$directive/default/child::node()
      +                            [count(preceding-sibling::*) = 0]" />
      +            </xsl:when>
      +            <xsl:otherwise>
      +                <xsl:value-of select="$directive/default"/>
      +            </xsl:otherwise>
      +            </xsl:choose>
      +        </xsl:variable>
      +
      +        <!-- Now. If the default output is empty, the xslt processor emits -->
      +        <!-- <td />. In order to avoid this, we simply emit <td></td>      -->
      +        <!-- by ourselves. Crap.                                           -->
      +        <xsl:choose>
      +        <xsl:when test="not(substring(substring-after(
      +                            concat($default, ' '), name),1,20) = '')">
      +        <td>
                   <xsl:value-of select="substring(substring-after(concat($default,
                                         ' '), name),1,20)" />
      +
                   <xsl:if test="string-length(substring-after(concat($default, ' '),
                                     name)) &gt; 20
                                 or count($directive/default[count(br) &gt; 0])
      @@ -315,6 +326,12 @@
                       <xsl:text> +</xsl:text>
                   </xsl:if>
               </td>
      +        </xsl:when>
      +        <xsl:otherwise>
      +            <xsl:text disable-output-escaping="yes">&lt;td>&lt;/td></xsl:text>
      +        </xsl:otherwise>
      +        </xsl:choose>
      +
               <td>
                   <xsl:if test="$directive/contextlist/context
                                 [normalize-space(.)='server config']">
      diff --git a/docs/manual/style/xsl/sitemap.xsl b/docs/manual/style/xsl/sitemap.xsl
      index eaa2c413c67..f72dafcbf88 100644
      --- a/docs/manual/style/xsl/sitemap.xsl
      +++ b/docs/manual/style/xsl/sitemap.xsl
      @@ -36,6 +36,8 @@
               <xsl:call-template name="top" />&lf;
       
               <div id="page-content">
      +            <xsl:call-template name="retired" />
      +
                   <div id="preamble">        
                       <h1>
                           <xsl:value-of select="title" />
      diff --git a/docs/manual/style/xsl/synopsis.xsl b/docs/manual/style/xsl/synopsis.xsl
      index 77e67a80a71..88e03174cac 100644
      --- a/docs/manual/style/xsl/synopsis.xsl
      +++ b/docs/manual/style/xsl/synopsis.xsl
      @@ -36,6 +36,8 @@
               <xsl:call-template name="top" />&lf;
       
               <div id="page-content">&lf;
      +            <xsl:call-template name="retired" />
      +
                   <div id="preamble">
                       <h1>
                           <xsl:choose>
      @@ -166,6 +168,18 @@
                   <xsl:if test="not($is-chm) or seealso">
                       <div id="quickview">
                           <xsl:if test="not($is-chm)">
      +                        <xsl:if test="section">
      +                            <h3>
      +                                <xsl:value-of select="$message
      +                                                      [@id='topics']" />
      +                            </h3>&lf;
      +
      +                            <ul id="topics">&lf;
      +                            <xsl:apply-templates
      +                                select="section" mode="index" />
      +                            </ul>
      +                        </xsl:if>
      +
                               <h3 class="directives">
                                   <xsl:value-of select="$message
                                                         [@id='directives']" />
      @@ -228,21 +242,74 @@
                                   </p>&lf;
                               </xsl:otherwise>
                               </xsl:choose>
      +                    </xsl:if> <!-- /!is-chm -->
       
      -                        <xsl:if test="section">
      -                            <h3>
      -                                <xsl:value-of select="$message
      -                                                      [@id='topics']" />
      -                            </h3>&lf;
      +                    <h3>
      +                       <xsl:value-of select="$message[@id='foundabug']" />
      +                    </h3>
      +                    <ul class="seealso">
      +                        <!-- Bugzilla mpm components are prefixed with
      +                            'mpm_', meanwhile the page name in the docs do
      +                            not contain it. For example, Bugzilla has
      +                            the 'mpm_event' component and the doc has the
      +                            'event' page. This creates an inconsistency
      +                            in the URL generation, fixed by the following
      +                            check. -->
      +                        <xsl:variable name="bugzilla_prefix">
      +                            <xsl:choose>
      +                                <xsl:when test="name='worker' or name='event'
      +                                                or name='prefork'">
      +                                    <xsl:value-of select="string('mpm_')"/>
      +                                </xsl:when>
      +                            </xsl:choose>
      +                        </xsl:variable>
      +                        <li>
      +                            <!-- The link below is not dynamic and points only
      +                                 to the 2.4 release since it makes sense to keep
      +                                 it as reference even for trunk. -->
      +                            <a href="https://www.apache.org/dist/httpd/CHANGES_2.4">
      +                                <xsl:value-of
      +                                    select="$message[@id='httpdchangelog']" />
      +                            </a>
      +                        </li>
      +                        <li>
      +                            <!-- Bugzilla mpm components are prefixed with
      +                                'mpm_', meanwhile the page name in the docs do
      +                                not contain it. For example, Bugzilla has
      +                                the 'mpm_event' component and the doc has the
      +                                'event' page. This creates a inconsistency
      +                                in the URL generation, fixed by the following
      +                                check. -->
      +                            <xsl:variable name="bugzilla_prefix">
      +                                <xsl:choose>
      +                                    <xsl:when test="name='worker' or name='event'
      +                                                    or name='prefork'">
      +                                        <xsl:value-of select="string('mpm_')"/>
      +                                    </xsl:when>
      +                                </xsl:choose>
      +                            </xsl:variable>
       
      -                            <ul id="topics">&lf;
      -                            <xsl:apply-templates
      -                                select="section" mode="index" />
      -                            </ul>
      -                        </xsl:if>
      -                    </xsl:if> <!-- /!is-chm -->
      +                            <!-- The line below is not splitted in multiple
      +                                 lines to avoid rendering a broken URL. -->
      +                            <a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&amp;list_id=144532&amp;product=Apache%20httpd-2&amp;query_format=specific&amp;order=changeddate%20DESC%2Cpriority%2Cbug_severity&amp;component={$bugzilla_prefix}{name}">
       
      -                    <xsl:if test="seealso">
      +                                <xsl:value-of
      +                                    select="$message[@id='httpdknownissues']" />
      +                            </a>
      +                        </li>
      +                        <li>
      +                            <!-- The line below is not splitted in multiple
      +                                 lines to avoid rendering a broken URL. -->
      +                            <a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&amp;component={$bugzilla_prefix}{name}">
      +                                <xsl:value-of
      +                                    select="$message[@id='httpdreportabug']" />
      +                            </a>
      +                        </li>
      +                    </ul>
      +                    <!-- The seealso section shows links to related documents
      +                         explicitly set in .xml docs or simply the comments. -->
      +                    <xsl:if test="seealso or not($is-chm or $is-zip or
      +                                                $metafile/basename = 'index')">
       	                    <h3>
                                   <xsl:value-of select="$message
                                                         [@id='seealso']" />
      @@ -254,6 +321,11 @@
                                       <xsl:apply-templates />
                                   </li>&lf;
                               </xsl:for-each>
      +                        <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
      +                            <li><a href="#comments_section"><xsl:value-of
      +                                    select="$message[@id='comments']" /></a>
      +                            </li>
      +                        </xsl:if>
                               </ul>
                           </xsl:if>
                       </div> <!-- /#quickview -->
      @@ -304,26 +376,54 @@
               <!-- Directive heading gets both mixed case and lowercase      -->
               <!-- anchors, and includes lt/gt only for "section" directives -->
               <h2>
      -            <a id="{name}" name="{name}">
      -                <xsl:if test="@type='section'">&lt;</xsl:if>
      -                <xsl:value-of select="name" />
      -                <xsl:if test="@type='section'">&gt;</xsl:if>
      -            </a>
      -
                   <xsl:choose>
                   <xsl:when test="$message
      -                            [@id='directive']/@replace-space-with">
      -                <xsl:value-of select="$message
      -                                      [@id='directive']/@replace-space-with"/>
      +                            [@id='directive']/@before-name = 'yes'">
      +                <a id="{$lowername}" name="{$lowername}">
      +                    <xsl:value-of select="$message[@id='directive']" />
      +                </a>
      +
      +                <xsl:choose>
      +                <xsl:when test="$message
      +                                [@id='directive']/@replace-space-with">
      +                    <xsl:value-of select="$message
      +                                         [@id='directive']/@replace-space-with"/>
      +                </xsl:when>
      +                <xsl:otherwise>
      +                    <xsl:text> </xsl:text>
      +                </xsl:otherwise>
      +                </xsl:choose>
      +
      +                <a id="{name}" name="{name}">
      +                    <xsl:if test="@type='section'">&lt;</xsl:if>
      +                    <xsl:value-of select="name" />
      +                    <xsl:if test="@type='section'">&gt;</xsl:if>
      +                </a>
                   </xsl:when>
      +
                   <xsl:otherwise>
      -                <xsl:text> </xsl:text>
      +                <a id="{name}" name="{name}">
      +                    <xsl:if test="@type='section'">&lt;</xsl:if>
      +                    <xsl:value-of select="name" />
      +                    <xsl:if test="@type='section'">&gt;</xsl:if>
      +                </a>
      +
      +                <xsl:choose>
      +                <xsl:when test="$message
      +                                [@id='directive']/@replace-space-with">
      +                    <xsl:value-of select="$message
      +                                         [@id='directive']/@replace-space-with"/>
      +                </xsl:when>
      +                <xsl:otherwise>
      +                    <xsl:text> </xsl:text>
      +                </xsl:otherwise>
      +                </xsl:choose>
      +
      +                <a id="{$lowername}" name="{$lowername}">
      +                    <xsl:value-of select="$message[@id='directive']" />
      +                </a>
                   </xsl:otherwise>
                   </xsl:choose>
      -
      -            <a id="{$lowername}" name="{$lowername}">
      -                <xsl:value-of select="$message[@id='directive']" />
      -            </a>
               </h2>&lf;
       
               <!-- Directive header -->
      diff --git a/docs/manual/style/xsl/util/allmodules.xml b/docs/manual/style/xsl/util/allmodules.xml
      index 918bf650fa0..234d464dfbb 100644
      --- a/docs/manual/style/xsl/util/allmodules.xml
      +++ b/docs/manual/style/xsl/util/allmodules.xml
      @@ -1,5 +1,4 @@
      -<?xml version="1.0" encoding="utf-8"?>
      -<items>
      +<?xml version="1.0" encoding="utf-8"?><items>
       <item lang="da">../../../mod/allmodules.xml.da</item>
       <item lang="de">../../../mod/allmodules.xml.de</item>
       <item lang="en">../../../mod/allmodules.xml</item>
      diff --git a/docs/manual/style/xsl/util/designations.xml b/docs/manual/style/xsl/util/designations.xml
      index 0091213564d..592e953bef0 100644
      --- a/docs/manual/style/xsl/util/designations.xml
      +++ b/docs/manual/style/xsl/util/designations.xml
      @@ -1,5 +1,4 @@
      -<?xml version="1.0" encoding="utf-8"?>
      -<items>
      +<?xml version="1.0" encoding="utf-8"?><items>
       <item charset="ISO-8859-1" lang="da">.html.da</item>
       <item charset="ISO-8859-1" lang="de">.html.de</item>
       <item charset="ISO-8859-1" lang="en">.html.en</item>
      @@ -10,5 +9,5 @@
       <item charset="ISO-8859-1" lang="pt-br">.html.pt-br</item>
       <item charset="KOI8-R" lang="ru">.html.ru.koi8-r</item>
       <item charset="UTF-8" lang="tr">.html.tr.utf8</item>
      -<item charset="UTF-8" lang="zh-cn">.html.zh-cn</item>
      +<item charset="UTF-8" lang="zh-cn">.html.zh-cn.utf8</item>
       </items>
      diff --git a/docs/manual/style/xsl/util/pretrim.xsl b/docs/manual/style/xsl/util/pretrim.xsl
      new file mode 100644
      index 00000000000..4c8f3337339
      --- /dev/null
      +++ b/docs/manual/style/xsl/util/pretrim.xsl
      @@ -0,0 +1,89 @@
      +<?xml version="1.0"?>
      +
      +<!--
      + Licensed to the Apache Software Foundation (ASF) under one or more
      + contributor license agreements.  See the NOTICE file distributed with
      + this work for additional information regarding copyright ownership.
      + The ASF licenses this file to You under the Apache License, Version 2.0
      + (the "License"); you may not use this file except in compliance with
      + the License.  You may obtain a copy of the License at
      +
      +     http://www.apache.org/licenses/LICENSE-2.0
      +
      + Unless required by applicable law or agreed to in writing, software
      + distributed under the License is distributed on an "AS IS" BASIS,
      + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + See the License for the specific language governing permissions and
      + limitations under the License.
      +-->
      +
      +<xsl:stylesheet version="1.0"
      +              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      +
      +<!-- load utility snippets -->
      +<xsl:include href="string-reverse.xsl" />
      +
      +
      +<!-- strip whitespace at the beginning if one-liner -->
      +<xsl:template name="pre-ltrim-one">
      +<xsl:param name="string" />
      +
      +<xsl:choose>
      +<xsl:when test="contains($string, '&#x0a;')">
      +  <xsl:value-of select="$string" />
      +</xsl:when>
      +<xsl:otherwise>
      +    <xsl:value-of select="substring($string, string-length(substring-before($string, substring(normalize-space($string), 1, 1))) + 1, string-length($string))" />
      +</xsl:otherwise>
      +</xsl:choose>
      +</xsl:template>
      +
      +
      +<!-- strip empty lines at the beginning -->
      +<xsl:template name="pre-ltrim">
      +<xsl:param name="string" />
      +
      +<xsl:variable name="lspace">
      +    <xsl:call-template name="string-reverse">
      +        <xsl:with-param name="string" select="substring-before($string, substring(normalize-space($string), 1, 1))" />
      +    </xsl:call-template>
      +</xsl:variable>
      +
      +<xsl:choose>
      +<xsl:when test="contains($lspace, '&#x0a;')">
      +    <xsl:value-of select="substring(
      +        $string,
      +        1 + string-length($lspace)
      +            - string-length(substring-before($lspace, '&#x0a;')),
      +        string-length($string)
      +    )" />
      +</xsl:when>
      +<xsl:otherwise>
      +    <xsl:value-of select="$string" />
      +</xsl:otherwise>
      +</xsl:choose>
      +</xsl:template>
      +
      +<!-- strip whitespace at the end -->
      +<xsl:template name="pre-rtrim">
      +<xsl:param name="string" />
      +
      +<xsl:variable name="rev">
      +    <xsl:call-template name="string-reverse">
      +        <xsl:with-param name="string" select="$string" />
      +    </xsl:call-template>
      +</xsl:variable>
      +
      +<xsl:call-template name="string-reverse">
      +    <xsl:with-param name="string" select="substring(
      +        $rev,
      +        1 + string-length(substring-before(
      +            $rev, substring(normalize-space($rev), 1, 1)
      +        )),
      +        string-length($rev)
      +    )" />
      +</xsl:call-template>
      +</xsl:template>
      +
      +
      +</xsl:stylesheet>
      diff --git a/docs/manual/style/xsl/util/string-reverse.xsl b/docs/manual/style/xsl/util/string-reverse.xsl
      new file mode 100644
      index 00000000000..4d560ad2932
      --- /dev/null
      +++ b/docs/manual/style/xsl/util/string-reverse.xsl
      @@ -0,0 +1,49 @@
      +<?xml version="1.0"?>
      +
      +<!--
      + Licensed to the Apache Software Foundation (ASF) under one or more
      + contributor license agreements.  See the NOTICE file distributed with
      + this work for additional information regarding copyright ownership.
      + The ASF licenses this file to You under the Apache License, Version 2.0
      + (the "License"); you may not use this file except in compliance with
      + the License.  You may obtain a copy of the License at
      +
      +     http://www.apache.org/licenses/LICENSE-2.0
      +
      + Unless required by applicable law or agreed to in writing, software
      + distributed under the License is distributed on an "AS IS" BASIS,
      + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + See the License for the specific language governing permissions and
      + limitations under the License.
      +-->
      +
      +<xsl:stylesheet version="1.0"
      +              xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      +
      +<!-- O(log(n)) (stack usage!) string reverter -->
      +<xsl:template name="string-reverse">
      +<xsl:param name="string"/>
      +<xsl:variable name="length" select="string-length($string)"/>
      +
      +<xsl:choose>
      +<xsl:when test="$length &lt; 2">
      +  <xsl:value-of select="$string"/>
      +</xsl:when>
      +<xsl:when test="$length = 2">
      +  <xsl:value-of select="concat(substring($string, 2, 1), substring($string, 1, 1))"/>
      +</xsl:when>
      +<xsl:otherwise>
      +  <xsl:variable name="middle" select="floor($length div 2)"/>
      +
      +  <xsl:call-template name="string-reverse">
      +    <xsl:with-param name="string" select="substring($string, $middle + 1, $middle + 1)"/>
      +  </xsl:call-template>
      +  <xsl:call-template name="string-reverse">
      +    <xsl:with-param name="string" select="substring($string, 1, $middle)"/>
      +  </xsl:call-template>
      +</xsl:otherwise>
      +</xsl:choose>
      +</xsl:template>
      +<!-- /string-reverse -->
      +
      +</xsl:stylesheet>
      diff --git a/docs/manual/suexec.html.en b/docs/manual/suexec.html.en
      index 0981506ace3..b156b57f1c6 100644
      --- a/docs/manual/suexec.html.en
      +++ b/docs/manual/suexec.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>suEXEC Support - Apache HTTP Server</title>
      +<title>suEXEC Support - Apache HTTP Server Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>suEXEC Support</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>suEXEC Support</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="./en/suexec.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -51,7 +56,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#debug">Debugging suEXEC</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">Beware the Jabberwock:
           Warnings &amp; Examples</a></li>
      -</ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="before" id="before">Before we begin</a></h2>
      @@ -251,7 +256,7 @@
       
               <p class="indent">
                 If it doesn't exist, it can't very well contain files. If we
      -          can't change directory to it, it might aswell not exist.
      +          can't change directory to it, it might as well not exist.
               </p>
             </li>
       
      @@ -473,10 +478,9 @@
       
             <p>If for example, your web server is configured to run as:</p>
       
      -      <div class="example"><p><code>
      -          User www<br />
      -          Group webgroup<br />
      -      </code></p></div>
      +      <pre class="prettyprint lang-config">User www
      +Group webgroup</pre>
      +
       
             <p>and <code class="program"><a href="./programs/suexec.html">suexec</a></code> is installed at
             "/usr/local/apache2/bin/suexec", you should run:</p>
      @@ -557,7 +561,7 @@
       
           <p><strong>NOTE!</strong> This section may not be
           complete. For the latest revision of this section of the
      -    documentation, see the <a href="http://httpd.apache.org/docs/trunk/suexec.html">Online
      +    documentation, see the <a href="http://httpd.apache.org/docs/2.4/suexec.html">Online
           Documentation</a> version.</p>
       
           <p>There are a few points of interest regarding
      @@ -612,7 +616,28 @@
       <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/suexec.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/suexec.html.fr b/docs/manual/suexec.html.fr
      index 27331981cd2..e4d47dec41e 100644
      --- a/docs/manual/suexec.html.fr
      +++ b/docs/manual/suexec.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Support suEXEC - Serveur Apache HTTP</title>
      +<title>Support suEXEC - Serveur Apache HTTP Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Support suEXEC</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Support suEXEC</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -53,7 +58,7 @@ de suEXEC</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#debug">Dbogage de suEXEC</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">Avis  la population !
           Avertissements et exemples</a></li>
      -</ul></div>
      +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="before" id="before">Avant de commencer</a></h2>
      @@ -506,10 +511,9 @@ de suEXEC</a></li>
           <p>Si, par exemple, votre serveur web est configur pour
           s'excuter en tant que :</p>
       
      -<div class="example"><p><code>
      -    User www<br />
      -    Group webgroup<br />
      -</code></p></div>
      +<pre class="prettyprint lang-config">User www
      +Group webgroup</pre>
      +
       
           <p>et <code class="program"><a href="./programs/suexec.html">suexec</a></code> se trouve 
           "/usr/local/apache2/bin/suexec", vous devez excuter les
      @@ -599,7 +603,7 @@ de suEXEC</a></h2>
           Avertissements et exemples</a></h2>
       
           <p><strong>NOTE !</strong> Cette section est peut-tre incomplte.
      -    Pour en consulter la dernire rvision, voir la version de la <a href="http://httpd.apache.org/docs/trunk/suexec.html">Documentation en ligne</a>.</p>
      +    Pour en consulter la dernire rvision, voir la version de la <a href="http://httpd.apache.org/docs/2.4/suexec.html">Documentation en ligne</a>.</p>
       
           <p>Quelques points importants du conteneur peuvent
           imposer des contraintes du point de vue de la configuration du
      @@ -658,7 +662,28 @@ de suEXEC</a></h2>
       <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/suexec.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/suexec.html.ja.utf8 b/docs/manual/suexec.html.ja.utf8
      index 799fece1cf2..3e8300fcdff 100644
      --- a/docs/manual/suexec.html.ja.utf8
      +++ b/docs/manual/suexec.html.ja.utf8
      @@ -1,32 +1,38 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>suEXEC サポート - Apache HTTP サーバ</title>
      +<title>suEXEC サポート - Apache HTTP サーバ バージョン 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="./">バージョン
      -            2.3</a></div><div id="page-content"><div id="preamble"><h1>suEXEC サポート</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="./">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>suEXEC サポート</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="./ja/suexec.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
           <p><strong>suEXEC</strong>
           機能により、Apache ユーザは Web サーバを実行しているユーザ ID とは
      @@ -53,7 +59,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#usage">suEXEC の使用</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#debug">suEXEC のデバッグ</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">とかげに注意: 警告と事例</a></li>
      -</ul></div>
      +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="before" id="before">始める前に</a></h2>
      @@ -555,7 +561,7 @@
       
           <p><strong>注意!</strong>
           この章は完全ではありません。この章の最新改訂版については、
      -    Apache グループの<a href="http://httpd.apache.org/docs/trunk/suexec.html">
      +    Apache グループの<a href="http://httpd.apache.org/docs/2.4/suexec.html">
           オンラインドキュメント</a>版を参照してください。
           </p>
       
      @@ -605,12 +611,33 @@
           </ul>
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="./ja/suexec.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/suexec.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/suexec.html.ko.euc-kr b/docs/manual/suexec.html.ko.euc-kr
      index 5d51ccea4b4..46639b7f4b0 100644
      --- a/docs/manual/suexec.html.ko.euc-kr
      +++ b/docs/manual/suexec.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>suEXEC  - Apache HTTP Server</title>
      +<title>suEXEC  - Apache HTTP Server Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>suEXEC </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>suEXEC </h1>
       <div class="toplang">
       <p><span> : </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -46,7 +51,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#usage">suEXEC ϱ</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#debug">suEXEC ϱ</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">ٽ ѹ ϶:  </a></li>
      -</ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="before" id="before">ϱ </a></h2>
      @@ -480,7 +485,7 @@
       <h2><a name="jabberwock" id="jabberwock">ٽ ѹ ϶:  </a></h2>
       
           <p><strong>!</strong>      ִ.
      -    ġ׷ <a href="http://httpd.apache.org/docs/trunk/suexec.html">¶
      +    ġ׷ <a href="http://httpd.apache.org/docs/2.4/suexec.html">¶
           </a>   ֽ ϶.</p>
       
           <p>wrapper   ϴ  ̷ο  ִ.
      @@ -532,7 +537,28 @@
       <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/suexec.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/suexec.html.tr.utf8 b/docs/manual/suexec.html.tr.utf8
      index ac6fc152773..4cbe7143ea0 100644
      --- a/docs/manual/suexec.html.tr.utf8
      +++ b/docs/manual/suexec.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>SuEXEC Desteği - Apache HTTP Sunucusu</title>
      +<title>SuEXEC Desteği - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="./faq/">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="./">Sürüm 2.3</a></div><div id="page-content"><div id="preamble"><h1>SuEXEC Desteği</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="./">Sürüm 2.4</a></div><div id="page-content"><div id="preamble"><h1>SuEXEC Desteği</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="./en/suexec.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/suexec.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
      @@ -24,9 +29,8 @@
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
      -    <p><strong>SuEXEC</strong> özelliği, Apache kullanıcılarına
      +    <p><strong>SuEXEC</strong> özelliği, Apache HTTP Sunucusu kullanıcılarına
             <strong>CGI</strong> ve <strong>SSI</strong> programlarını sunucunun
             aidiyetinde çalıştığı kullanıcıdan farklı bir kullanıcının aidiyetinde
             çalıştırma olanağı verir. Normalde, <strong>CGI</strong> ve
      @@ -51,13 +55,14 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#usage">SuEXEC’in kullanımı</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#debug">SuEXEC ve hata ayıklama</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#jabberwock">Uyarılar ve Örnekler</a></li>
      -</ul></div>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="before" id="before">Başlamadan önce</a></h2>
       
      -    <p>Belgeye balıklama dalmadan önce, Apache Grubu ve bu belge ile ilgili
      -      kabuller hakkında bilgi sahibi olmalısınız.</p>
      +    <p>Belgeye balıklama dalmadan önce, suexec'i kullanacağınız ortam ve
      +      kendiniz hakkında yapılmış çeşitli kabuller hakkında bilgi sahibi
      +      olmalısınız.</p>
       
           <p>Öncelikle, üzerinde <strong>setuid</strong> va <strong>setgid</strong>
             işlemlerinin yapılabildiği Unix türevi bir işletim sistemi
      @@ -79,19 +84,20 @@
             yeni güvenlik risklerine yol açabilir. Özellikle güvenlikle ilgili
             programlarda deneyimli değilseniz suEXEC kodunda kesinlikle bir
             değişiklik yapmamalısınız. Değişiklik yaparsanız kodlarınızı gözden
      -      geçirmek ve tartışmak üzere Apache Grubu ile paylaşmanızı öneririz.</p>
      -
      -    <p>Dördüncü ve son olarak, Apache Grubunun suEXEC’i öntanımlı Apache
      -      kurulumunun bir parçası yapmama kararından bahsetmek gerekir. Bunun
      -      sonucu olarak, suEXEC yapılandırması sistem yöneticisinin ayrıntılı bir
      -      incelemesini gerektirir. Gerekli incelemeden sonra yönetici tarafından
      -      suEXEC yapılandırma seçeneklerine karar verilip, normal yollardan
      -      sisteme kurulumu yapılır. Bu seçeneklerin belirlenmesi, suEXEC
      -      işlevselliğinin kullanımı sırasında sistem güvenliğini gerektiği gibi
      -      sağlamak için yönetici tarafından dikkatle saptanmayı gerektirir. Bu
      -      sürecin ayrıntılarının yöneticiye bırakılma sebebi, Apache Grubunun
      -      suEXEC kurulumunu, suEXEC’i dikkatle kullanacak yeterliliğe sahip
      -      olanlarla sınırlama beklentisidir.</p>
      +      geçirmek ve tartışmak üzere Apache HTTP Sunucusu geliştirme ekibi ile
      +      paylaşmanızı öneririz.</p>
      +
      +    <p>Dördüncü ve son olarak, Apache HTTP Sunucusu geliştirme ekibinin
      +      suEXEC’i öntanımlı httpd kurulumunun bir parçası yapmama kararından
      +      bahsetmek gerekir. Bunun sonucu olarak, suEXEC yapılandırması sistem
      +      yöneticisinin ayrıntılı bir incelemesini gerektirir. Gerekli incelemeden
      +      sonra yönetici tarafından suEXEC yapılandırma seçeneklerine karar
      +      verilip, normal yollardan sisteme kurulumu yapılır. Bu seçeneklerin
      +      belirlenmesi, suEXEC işlevselliğinin kullanımı sırasında sistem
      +      güvenliğini gerektiği gibi sağlamak için yönetici tarafından dikkatle
      +      saptanmayı gerektirir. Bu sürecin ayrıntılarının yöneticiye bırakılma
      +      sebebi, suEXEC kurulumunu, suEXEC’i dikkatle kullanacak yeterliliğe sahip
      +      olanlarla sınırlama  beklentimizdir.</p>
       
           <p>Hala bizimle misiniz? Evet mi? Pekala, o halde devam!</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -108,7 +114,7 @@
             Bu program, bir CGI veya SSI betiğine bir HTTP isteği yapıldığı zaman,
             bu betiği, yöneticinin ana sunucunun aidiyetinde çalıştığı kullanıcıdan
             farklı olarak seçtiği bir kullanıcının aidiyetinde çalıştırmak için
      -      çağrılır. Böyle bir istek geldiğinde, Apache artalandaki setuid
      +      çağrılır. Böyle bir istek geldiğinde, Apache httpd artalandaki setuid
             programına, HTTP isteği yapılan programın ismiyle beraber aidiyetinde
             çalışacağı kullanıcı ve grup kimliklerini de aktarır.</p>
       
      @@ -131,11 +137,11 @@
               <strong>Setuid program yeterli sayıda argümanla çağrılmış mı?
               </strong>
       
      -        <p class="indent">Apache’nin artalanda çağırdığı setuid program
      -          ancak yeterli sayıda argüman sağlandığı takdirde çalışacaktır.
      -          Argümanların sayısını ve sırasını Apache HTTP sunucusu bilir. Eğer
      -          setuid program yeterli sayıda argümanla çağrılmamışsa ya
      -          kendisinde bir değişiklik yapılmıştır ya da kurulu Apache
      +        <p class="indent">Apache HTTP Sunucusunun artalanda çağırdığı
      +          setuid program ancak yeterli sayıda argüman sağlandığı takdirde
      +          çalışacaktır. Argümanların sayısını ve sırasını Apache HTTP sunucusu
      +          bilir. Eğer setuid program yeterli sayıda argümanla çağrılmamışsa
      +          ya kendisinde bir değişiklik yapılmıştır ya da kurulu Apache httpd
                 çalıştırılabilirinin suEXEC ile ilgili kısmında yanlış giden bir
                 şeyler vardır.</p>
             </li>
      @@ -192,7 +198,7 @@
             <li>
               <strong>Hedef grup <code>root</code>  değil, değil mi?</strong>
       
      -        <p class="indent">Mevcut durumda, <code>root</code> grubunun CGI/SSI
      +        <p class="indent"><code>root</code> grubunun CGI/SSI
                 programlarını çalıştırmasına izin verilmemektedir.</p>
             </li>
       
      @@ -328,8 +334,8 @@
       
             <dt><code>--with-suexec-caller=<em>KULLANICI</em></code></dt>
       
      -      <dd>Normalde Apache’nin aidiyetinde çalıştığı <a href="mod/mpm_common.html#user">kullanıcı</a>dır. Bu, bu programı
      -        çalıştırmasına izin verilen tek kullanıcıdır.</dd>
      +      <dd>Normalde httpd’nin aidiyetinde çalıştığı <a href="mod/mpm_common.html#user">kullanıcı</a>dır. Bu, suEXEC
      +        çalıştırıcısını çalıştırmasına izin verilen tek kullanıcıdır.</dd>
       
             <dt><code>--with-suexec-userdir=<em>DİZİN</em></code></dt>
       
      @@ -351,7 +357,7 @@
       
             <dt><code>--with-suexec-docroot=<em>DİZİN</em></code></dt>
       
      -      <dd>Apache için belge kök dizinini belirler. Bu, (<code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code>’lardan başka) suEXEC için
      +      <dd>httpd için belge kök dizinini belirler. Bu, (<code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code>’lardan başka) suEXEC için
               kullanılacak tek hiyerarşi olacaktır. Öntanımlı dizin sonuna
               "<code>/htdocs</code>" eklenmiş <code>--datadir</code> dizinidir.
               Yani, seçeneği "<code>--datadir=/home/apache</code>" olarak
      @@ -389,7 +395,7 @@
             
       
             <p>SuEXEC özelliğini <code>--enable-suexec</code> seçeneği ile
      -        etkinleştirdiyseniz <code>make</code> komutunu verdiğinizde Apache
      +        etkinleştirdiyseniz <code>make</code> komutunu verdiğinizde httpd
               ile birlikte <code>suexec</code> çalıştırılabilir dosyası da
               derlenecektir.</p>
       
      @@ -416,16 +422,15 @@
               olup olmadığına bakacaksa da, bu sınamanın da bir sistem veya
               kütüphane çağrısı ile istismar edilmiş olma ihtimali gözardı
               edilmemelidir. Bunun meydana gelmesini önlemek için ve genelde
      -        yapıldığı gibi dosyanın izinlerini suEXEC çalıştırıcısı sadece Apache
      -        sunucusunun aidiyetinde çalıştığı kullanıcı tarafından çalıştırılacak
      +        yapıldığı gibi dosyanın izinlerini suEXEC çalıştırıcısı sadece
      +        httpd'nin aidiyetinde çalıştığı grup tarafından çalıştırılacak
               şekilde ayarlayınız.</p>
       
             <p>Örneğin, sunucunuz şöyle yapılandırılmışsa:</p>
       
      -      <div class="example"><p><code>
      -          User apache<br />
      -          Group apache-grup<br />
      -      </code></p></div>
      +      <pre class="prettyprint lang-config">User www
      +Group webgroup</pre>
      +
       
             <p>Ve <code class="program"><a href="./programs/suexec.html">suexec</a></code> çalıştırılabilir de
               <code>/usr/local/apache2/bin/</code> dizinine kurulmuşsa şu komutları
      @@ -436,7 +441,7 @@
                 chmod 4750 /usr/local/apache2/bin/suexec<br />
             </code></p></div>
       
      -      <p>Böylece suEXEC çalıştırıcısını Apache’yi çalıştıran grubun
      +      <p>Böylece suEXEC çalıştırıcısını httpd’yi çalıştıran grubun
               üyelerinden başkasının çalıştıramayacağından emin olabilirsiniz.</p>
           
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -444,11 +449,10 @@
       <h2><a name="enable" id="enable">suEXEC’in etkin kılınması ve iptal edilmesi</a></h2>
           
       
      -    <p>Apache başlatıldığı sırada <code class="program"><a href="./programs/suexec.html">suexec</a></code> çalıştırıcısı
      -      için <code>--sbindir</code> seçeneği ile tanımlanan dizine bakar
      -      (seçeneğin öntanımlı değeri
      -      <code>/usr/local/apache/sbin/suexec</code>’tir). Apache düzgün
      -      yapılandırılmış bir suEXEC çalıştırıcısı bulduğu takdirde hata
      +    <p>httpd başlatıldığı sırada <code class="program"><a href="./programs/suexec.html">suexec</a></code> çalıştırıcısı için
      +      <code>--sbindir</code> seçeneği ile tanımlanan dizine bakar (seçeneğin
      +      öntanımlı değeri <code>/usr/local/apache/sbin/suexec</code>’tir). httpd
      +      düzgün yapılandırılmış bir suEXEC çalıştırıcısı bulduğu takdirde hata
             günlüğüne şöyle bir ileti yazacaktır:</p>
       
       <div class="example"><p><code>
      @@ -465,8 +469,7 @@
             sağlamak yeterli olmayacaktır.</p>
       
            <p>SuEXEC mekanizmasını iptal etmek için ise <code class="program"><a href="./programs/suexec.html">suexec</a></code>
      -      dosyasını sildikten sonra Apache sunucusunu öldürüp yeniden
      -      başlamalısınız.</p>
      +      dosyasını sildikten sonra httpd'yi öldürüp yeniden başlamalısınız.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="usage" id="usage">SuEXEC’in kullanımı</a></h2>
      @@ -508,7 +511,7 @@
           
       
           <p><strong>UYARI!</strong> Bu bölüm henüz bitmedi. Bu bölümün son hali
      -      için <a href="http://httpd.apache.org/docs/trunk/suexec.html">çevrimiçi
      +      için <a href="http://httpd.apache.org/docs/2.4/suexec.html">çevrimiçi
             belgelere</a> bakınız.</p>
       
           <p>SuEXEC çalıştırıcısından dolayı sunucu ayarlarına bazı sınırlamalar
      @@ -553,7 +556,28 @@
       <a href="./ja/suexec.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/suexec.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/suexec.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="./faq/">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/suexec.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/suexec.xml b/docs/manual/suexec.xml
      index 737e18f56ed..f78f598f3c6 100644
      --- a/docs/manual/suexec.xml
      +++ b/docs/manual/suexec.xml
      @@ -239,7 +239,7 @@
       
               <p class="indent">
                 If it doesn't exist, it can't very well contain files. If we
      -          can't change directory to it, it might aswell not exist.
      +          can't change directory to it, it might as well not exist.
               </p>
             </li>
       
      @@ -466,10 +466,10 @@
       
             <p>If for example, your web server is configured to run as:</p>
       
      -      <example>
      -          User www<br />
      -          Group webgroup<br />
      -      </example>
      +      <highlight language="config">
      +User www
      +Group webgroup
      +      </highlight>
       
             <p>and <program>suexec</program> is installed at
             "/usr/local/apache2/bin/suexec", you should run:</p>
      diff --git a/docs/manual/suexec.xml.fr b/docs/manual/suexec.xml.fr
      index ba6d6ee285e..c67a2151807 100644
      --- a/docs/manual/suexec.xml.fr
      +++ b/docs/manual/suexec.xml.fr
      @@ -1,9 +1,9 @@
      -<?xml version="1.0" encoding="ISO-8859-1" ?>
      +<?xml version="1.0" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.fr.xsl"?>
       <!-- French translation : Lucien GENTIS -->
       <!-- Reviewed by : Vincent Deffontaines -->
      -<!-- English Revision: 1038591 -->
      +<!-- English Revision: 1334033 -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      @@ -501,10 +501,10 @@
           <p>Si, par exemple, votre serveur web est configur&eacute; pour
           s'ex&eacute;cuter en tant que :</p>
       
      -<example>
      -    User www<br />
      -    Group webgroup<br />
      -</example>
      +<highlight language="config">
      +User www
      +Group webgroup
      +      </highlight>
       
           <p>et <program>suexec</program> se trouve &agrave;
           "/usr/local/apache2/bin/suexec", vous devez ex&eacute;cuter les
      diff --git a/docs/manual/suexec.xml.ja b/docs/manual/suexec.xml.ja
      index 90bfaa3d3a1..e93de8c789e 100644
      --- a/docs/manual/suexec.xml.ja
      +++ b/docs/manual/suexec.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.ja.xsl"?>
      -<!-- English Revision: 655869:1038591 (outdated) -->
      +<!-- English Revision: 655869:1334033 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/suexec.xml.ko b/docs/manual/suexec.xml.ko
      index 36ad1b7f32b..f46cebeb8b8 100644
      --- a/docs/manual/suexec.xml.ko
      +++ b/docs/manual/suexec.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="EUC-KR" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
      -<!-- English Revision: 105989:1038591 (outdated) -->
      +<!-- English Revision: 105989:1334033 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/suexec.xml.meta b/docs/manual/suexec.xml.meta
      index 3b7b1e8915d..f347f945f01 100644
      --- a/docs/manual/suexec.xml.meta
      +++ b/docs/manual/suexec.xml.meta
      @@ -11,6 +11,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/suexec.xml.tr b/docs/manual/suexec.xml.tr
      index a84ebb0fe61..caf11ea09fe 100644
      --- a/docs/manual/suexec.xml.tr
      +++ b/docs/manual/suexec.xml.tr
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.tr.xsl"?>
      -<!-- English Revision: 698389:1038591 (outdated) -->
      +<!-- English Revision: 1334033 -->
       <!-- =====================================================
        Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
          Reviewed by: Orhan Berent <berent belgeler.org>
      @@ -29,7 +29,7 @@
         <title>SuEXEC Desteği</title>
       
         <summary>
      -    <p><strong>SuEXEC</strong> özelliği, Apache kullanıcılarına
      +    <p><strong>SuEXEC</strong> özelliği, Apache HTTP Sunucusu kullanıcılarına
             <strong>CGI</strong> ve <strong>SSI</strong> programlarını sunucunun
             aidiyetinde çalıştığı kullanıcıdan farklı bir kullanıcının aidiyetinde
             çalıştırma olanağı verir. Normalde, <strong>CGI</strong> ve
      @@ -50,8 +50,9 @@
       
       <section id="before"><title>Başlamadan önce</title>
       
      -    <p>Belgeye balıklama dalmadan önce, Apache Grubu ve bu belge ile ilgili
      -      kabuller hakkında bilgi sahibi olmalısınız.</p>
      +    <p>Belgeye balıklama dalmadan önce, suexec'i kullanacağınız ortam ve
      +      kendiniz hakkında yapılmış çeşitli kabuller hakkında bilgi sahibi
      +      olmalısınız.</p>
       
           <p>Öncelikle, üzerinde <strong>setuid</strong> va <strong>setgid</strong>
             işlemlerinin yapılabildiği Unix türevi bir işletim sistemi
      @@ -73,19 +74,20 @@
             yeni güvenlik risklerine yol açabilir. Özellikle güvenlikle ilgili
             programlarda deneyimli değilseniz suEXEC kodunda kesinlikle bir
             değişiklik yapmamalısınız. Değişiklik yaparsanız kodlarınızı gözden
      -      geçirmek ve tartışmak üzere Apache Grubu ile paylaşmanızı öneririz.</p>
      -
      -    <p>Dördüncü ve son olarak, Apache Grubunun suEXEC’i öntanımlı Apache
      -      kurulumunun bir parçası yapmama kararından bahsetmek gerekir. Bunun
      -      sonucu olarak, suEXEC yapılandırması sistem yöneticisinin ayrıntılı bir
      -      incelemesini gerektirir. Gerekli incelemeden sonra yönetici tarafından
      -      suEXEC yapılandırma seçeneklerine karar verilip, normal yollardan
      -      sisteme kurulumu yapılır. Bu seçeneklerin belirlenmesi, suEXEC
      -      işlevselliğinin kullanımı sırasında sistem güvenliğini gerektiği gibi
      -      sağlamak için yönetici tarafından dikkatle saptanmayı gerektirir. Bu
      -      sürecin ayrıntılarının yöneticiye bırakılma sebebi, Apache Grubunun
      -      suEXEC kurulumunu, suEXEC’i dikkatle kullanacak yeterliliğe sahip
      -      olanlarla sınırlama beklentisidir.</p>
      +      geçirmek ve tartışmak üzere Apache HTTP Sunucusu geliştirme ekibi ile
      +      paylaşmanızı öneririz.</p>
      +
      +    <p>Dördüncü ve son olarak, Apache HTTP Sunucusu geliştirme ekibinin
      +      suEXEC’i öntanımlı httpd kurulumunun bir parçası yapmama kararından
      +      bahsetmek gerekir. Bunun sonucu olarak, suEXEC yapılandırması sistem
      +      yöneticisinin ayrıntılı bir incelemesini gerektirir. Gerekli incelemeden
      +      sonra yönetici tarafından suEXEC yapılandırma seçeneklerine karar
      +      verilip, normal yollardan sisteme kurulumu yapılır. Bu seçeneklerin
      +      belirlenmesi, suEXEC işlevselliğinin kullanımı sırasında sistem
      +      güvenliğini gerektiği gibi sağlamak için yönetici tarafından dikkatle
      +      saptanmayı gerektirir. Bu sürecin ayrıntılarının yöneticiye bırakılma
      +      sebebi, suEXEC kurulumunu, suEXEC’i dikkatle kullanacak yeterliliğe sahip
      +      olanlarla sınırlama  beklentimizdir.</p>
       
           <p>Hala bizimle misiniz? Evet mi? Pekala, o halde devam!</p>
       </section>
      @@ -102,7 +104,7 @@
             Bu program, bir CGI veya SSI betiğine bir HTTP isteği yapıldığı zaman,
             bu betiği, yöneticinin ana sunucunun aidiyetinde çalıştığı kullanıcıdan
             farklı olarak seçtiği bir kullanıcının aidiyetinde çalıştırmak için
      -      çağrılır. Böyle bir istek geldiğinde, Apache artalandaki setuid
      +      çağrılır. Böyle bir istek geldiğinde, Apache httpd artalandaki setuid
             programına, HTTP isteği yapılan programın ismiyle beraber aidiyetinde
             çalışacağı kullanıcı ve grup kimliklerini de aktarır.</p>
       
      @@ -125,11 +127,11 @@
               <strong>Setuid program yeterli sayıda argümanla çağrılmış mı?
               </strong>
       
      -        <p class="indent">Apache’nin artalanda çağırdığı setuid program
      -          ancak yeterli sayıda argüman sağlandığı takdirde çalışacaktır.
      -          Argümanların sayısını ve sırasını Apache HTTP sunucusu bilir. Eğer
      -          setuid program yeterli sayıda argümanla çağrılmamışsa ya
      -          kendisinde bir değişiklik yapılmıştır ya da kurulu Apache
      +        <p class="indent">Apache HTTP Sunucusunun artalanda çağırdığı
      +          setuid program ancak yeterli sayıda argüman sağlandığı takdirde
      +          çalışacaktır. Argümanların sayısını ve sırasını Apache HTTP sunucusu
      +          bilir. Eğer setuid program yeterli sayıda argümanla çağrılmamışsa
      +          ya kendisinde bir değişiklik yapılmıştır ya da kurulu Apache httpd
                 çalıştırılabilirinin suEXEC ile ilgili kısmında yanlış giden bir
                 şeyler vardır.</p>
             </li>
      @@ -186,7 +188,7 @@
             <li>
               <strong>Hedef grup <code>root</code>  değil, değil mi?</strong>
       
      -        <p class="indent">Mevcut durumda, <code>root</code> grubunun CGI/SSI
      +        <p class="indent"><code>root</code> grubunun CGI/SSI
                 programlarını çalıştırmasına izin verilmemektedir.</p>
             </li>
       
      @@ -325,9 +327,9 @@
       
             <dt><code>--with-suexec-caller=<em>KULLANICI</em></code></dt>
       
      -      <dd>Normalde Apache’nin aidiyetinde çalıştığı <a
      -        href="mod/mpm_common.html#user">kullanıcı</a>dır. Bu, bu programı
      -        çalıştırmasına izin verilen tek kullanıcıdır.</dd>
      +      <dd>Normalde httpd’nin aidiyetinde çalıştığı <a
      +        href="mod/mpm_common.html#user">kullanıcı</a>dır. Bu, suEXEC
      +        çalıştırıcısını çalıştırmasına izin verilen tek kullanıcıdır.</dd>
       
             <dt><code>--with-suexec-userdir=<em>DİZİN</em></code></dt>
       
      @@ -351,7 +353,7 @@
       
             <dt><code>--with-suexec-docroot=<em>DİZİN</em></code></dt>
       
      -      <dd>Apache için belge kök dizinini belirler. Bu, (<directive
      +      <dd>httpd için belge kök dizinini belirler. Bu, (<directive
               module="mod_userdir" >UserDir</directive>’lardan başka) suEXEC için
               kullanılacak tek hiyerarşi olacaktır. Öntanımlı dizin sonuna
               "<code>/htdocs</code>" eklenmiş <code>--datadir</code> dizinidir.
      @@ -390,7 +392,7 @@
             <title>SuEXEC çalıştırıcısının derlenmesi ve kurulumu</title>
       
             <p>SuEXEC özelliğini <code>--enable-suexec</code> seçeneği ile
      -        etkinleştirdiyseniz <code>make</code> komutunu verdiğinizde Apache
      +        etkinleştirdiyseniz <code>make</code> komutunu verdiğinizde httpd
               ile birlikte <code>suexec</code> çalıştırılabilir dosyası da
               derlenecektir.</p>
       
      @@ -417,16 +419,16 @@
               olup olmadığına bakacaksa da, bu sınamanın da bir sistem veya
               kütüphane çağrısı ile istismar edilmiş olma ihtimali gözardı
               edilmemelidir. Bunun meydana gelmesini önlemek için ve genelde
      -        yapıldığı gibi dosyanın izinlerini suEXEC çalıştırıcısı sadece Apache
      -        sunucusunun aidiyetinde çalıştığı kullanıcı tarafından çalıştırılacak
      +        yapıldığı gibi dosyanın izinlerini suEXEC çalıştırıcısı sadece
      +        httpd'nin aidiyetinde çalıştığı grup tarafından çalıştırılacak
               şekilde ayarlayınız.</p>
       
             <p>Örneğin, sunucunuz şöyle yapılandırılmışsa:</p>
       
      -      <example>
      -          User apache<br />
      -          Group apache-grup<br />
      -      </example>
      +      <highlight language="config">
      +User www
      +Group webgroup
      +      </highlight>
       
             <p>Ve <program>suexec</program> çalıştırılabilir de
               <code>/usr/local/apache2/bin/</code> dizinine kurulmuşsa şu komutları
      @@ -437,7 +439,7 @@
                 chmod 4750 /usr/local/apache2/bin/suexec<br />
             </example>
       
      -      <p>Böylece suEXEC çalıştırıcısını Apache’yi çalıştıran grubun
      +      <p>Böylece suEXEC çalıştırıcısını httpd’yi çalıştıran grubun
               üyelerinden başkasının çalıştıramayacağından emin olabilirsiniz.</p>
           </section>
       </section>
      @@ -445,11 +447,10 @@
       <section id="enable">
           <title>suEXEC’in etkin kılınması ve iptal edilmesi</title>
       
      -    <p>Apache başlatıldığı sırada <program>suexec</program> çalıştırıcısı
      -      için <code>--sbindir</code> seçeneği ile tanımlanan dizine bakar
      -      (seçeneğin öntanımlı değeri
      -      <code>/usr/local/apache/sbin/suexec</code>’tir). Apache düzgün
      -      yapılandırılmış bir suEXEC çalıştırıcısı bulduğu takdirde hata
      +    <p>httpd başlatıldığı sırada <program>suexec</program> çalıştırıcısı için
      +      <code>--sbindir</code> seçeneği ile tanımlanan dizine bakar (seçeneğin
      +      öntanımlı değeri <code>/usr/local/apache/sbin/suexec</code>’tir). httpd
      +      düzgün yapılandırılmış bir suEXEC çalıştırıcısı bulduğu takdirde hata
             günlüğüne şöyle bir ileti yazacaktır:</p>
       
       <example>
      @@ -466,8 +467,7 @@
             sağlamak yeterli olmayacaktır.</p>
       
            <p>SuEXEC mekanizmasını iptal etmek için ise <program>suexec</program>
      -      dosyasını sildikten sonra Apache sunucusunu öldürüp yeniden
      -      başlamalısınız.</p>
      +      dosyasını sildikten sonra httpd'yi öldürüp yeniden başlamalısınız.</p>
       </section>
       
       <section id="usage"><title>SuEXEC’in kullanımı</title>
      diff --git a/docs/manual/upgrading.html.en b/docs/manual/upgrading.html.en
      index b5dff364efb..c4a9f40c75f 100644
      --- a/docs/manual/upgrading.html.en
      +++ b/docs/manual/upgrading.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Upgrading to 2.4 from 2.2 - Apache HTTP Server</title>
      +<title>Upgrading to 2.4 from 2.2 - Apache HTTP Server Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Upgrading to 2.4 from 2.2</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Upgrading to 2.4 from 2.2</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="./en/upgrading.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/upgrading.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a></p>
      @@ -46,7 +51,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#third-party">Third Party Modules</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#commonproblems">Common problems when upgrading</a></li>
       </ul><h3>See also</h3><ul class="seealso"><li><a href="new_features_2_4.html">Overview of new features in
      -  Apache HTTP Server 2.4</a></li></ul></div>
      +  Apache HTTP Server 2.4</a></li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="compile-time" id="compile-time">Compile-Time Configuration Changes</a></h2>
      @@ -76,12 +81,13 @@
       
             <li>configure: dynamic modules (DSO) are built by default</li>
       
      -      <li>configure: By default, only load those modules that are either required
      -      or explicitly selected by a configure <code>--enable-foo</code> argument.</li>
      +      <li>configure: By default, only a basic set of modules is loaded. The
      +      other <code class="directive">LoadModule</code> directives are commented
      +      out in the configuration file.</li>
       
             <li>configure: the "most" module set gets built by default</li>
       
      -      <li>configure: the "realyall" module set adds developer modules
      +      <li>configure: the "reallyall" module set adds developer modules
             to the "all" set</li>
           </ul>
       
      @@ -105,6 +111,19 @@
           which explains the new mechanisms for controlling the order in
           which the authorization directives are applied.</p>
       
      +    <p>Directives that control how authorization modules respond when they don't match
      +    the authenticated user have been removed: This includes 
      +    AuthzLDAPAuthoritative, AuthzDBDAuthoritative, AuthzDBMAuthoritative, 
      +    AuthzGroupFileAuthoritative, AuthzUserAuthoritative,
      +    and AuthzOwnerAuthoritative.   These directives have been replaced by the
      +    more expressive <code class="directive"><a href="./mod/mod_authz_core.html#requireany">RequireAny</a></code>, 
      +    <code class="directive"><a href="./mod/mod_authz_core.html#requirenone">RequireNone</a></code>, and
      +    <code class="directive"><a href="./mod/mod_authz_core.html#requireall">RequireAll</a></code>.</p>
      +
      +    <p>If you use <code class="module"><a href="./mod/mod_authz_dbm.html">mod_authz_dbm</a></code>, you must port your 
      +    configuration to use <code>Require dbm-group ...</code> in place
      +    of <code>Require group ...</code>.</p>
      +
           <h4><a name="access" id="access">Access control</a></h4>
             
       
      @@ -119,46 +138,148 @@
             although for compatibility with old configurations, the new
             module <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> is provided.</p>
       
      +      <div class="note"><h3>Mixing old and new directives</h3>
      +      <p>Mixing old directives like <code class="directive"><a href="./mod/mod_access_compat.html#order">Order</a></code>, <code class="directive"><a href="./mod/mod_access_compat.html#allow">Allow</a></code> or <code class="directive"><a href="./mod/mod_access_compat.html#deny">Deny</a></code> with new ones like
      +      <code class="directive"><a href="./mod/mod_authz_core.html#require">Require</a></code> is technically possible 
      +      but discouraged. <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> was created to support 
      +      configurations containing only old directives to facilitate the 2.4 upgrade. 
      +      Please check the examples below to get a better idea about issues that might arise.
      +      </p>
      +      </div>
      +
             <p>Here are some examples of old and new ways to do the same
             access control.</p>
       
      -      <p>In this example, all requests are denied.</p>
      -      <div class="example"><h3>2.2 configuration:</h3><p><code>
      -        
      -        Order deny,allow<br />
      -        Deny from all
      -      </code></p></div>
      -      <div class="example"><h3>2.4 configuration:</h3><p><code>
      -        
      -        Require all denied
      -      </code></p></div>
      -
      -      <p>In this example, all requests are allowed.</p>
      -      <div class="example"><h3>2.2 configuration:</h3><p><code>
      -        
      -        Order allow,deny<br />
      -        Allow from all
      -      </code></p></div>
      -      <div class="example"><h3>2.4 configuration:</h3><p><code>
      -        
      -        Require all granted
      -      </code></p></div>
      -
      -      <p>In the following example, all hosts in the example.org domain
      +      <p>In this example, there is no authentication and all requests are denied.</p>
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order deny,allow
      +Deny from all</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config">Require all denied</pre>
      +</div>
      +
      +      <p>In this example, there is no authentication and all requests are allowed.</p>
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order allow,deny
      +Allow from all</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config">Require all granted</pre>
      +</div>
      +
      +      <p>In the following example, there is no authentication and all hosts in the example.org domain
             are allowed access; all other hosts are denied access.</p>
       
      -      <div class="example"><h3>2.2 configuration:</h3><p><code>
      -        
      -        Order Deny,Allow<br />
      -        Deny from all<br />
      -        Allow from example.org
      -      </code></p></div>
      -      <div class="example"><h3>2.4 configuration:</h3><p><code>
      -        
      -        Require host example.org
      -      </code></p></div>
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order Deny,Allow
      +Deny from all
      +Allow from example.org</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config">Require host example.org</pre>
      +</div>
      +
      +      <p>In the following example, mixing old and new directives leads to 
      +      unexpected results.</p>
      + 
      +      <div class="example"><h3>Mixing old and new directives: NOT WORKING AS EXPECTED</h3><pre class="prettyprint lang-config">DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Order deny,allow
      +    Deny from all
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Require 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 403 127.0.0.1
      +error.log - AH01797: client denied by server configuration: /var/www/html/server-status</pre>
      +</div>
      +      <p>Why httpd denies access to servers-status even if the configuration seems to allow it?
      +        Because <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> directives take precedence
      +        over the <code class="module"><a href="./mod/mod_authz_host.html">mod_authz_host</a></code> one in this configuration 
      +        <a href="sections.html#merging">merge</a> scenario.</p>
      +
      +      <p>This example conversely works as expected:</p>
      +
      +      <div class="example"><h3>Mixing old and new directives: WORKING AS EXPECTED</h3><pre class="prettyprint lang-config">DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Require all denied
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Order deny,allow
      +    Deny from all
      +    Allow From 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 200 127.0.0.1</pre>
      +</div> 
      +      <p>So even if mixing configuration is still
      +        possible, please try to avoid it when upgrading: either keep old directives and then migrate
      +        to the new ones on a later stage or just migrate everything in bulk.  
      +      </p>
           
       
      +     <p>In many configurations with authentication, where the value of the
      +     <code class="directive">Satisfy</code> was the default of <em>ALL</em>, snippets
      +     that simply disabled host-based access control are omitted:</p>
      +
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order Deny,Allow
      +Deny from all
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config"># No replacement needed
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user</pre>
      +</div>
      +
      +     <p>In configurations where both authentication and access control were meaningfully combined, the 
      +        access control directives should be migrated. This example allows requests meeting <em>both</em> criteria:</p>
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order allow,deny
      +Deny from all
      +# Satisfy ALL is the default
      +Satisfy ALL
      +Allow from 127.0.0.1
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config">AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +&lt;RequireAll&gt;
      +  Require valid-user
      +  Require ip 127.0.0.1
      +&lt;/RequireAll&gt;</pre>
      +</div>
      +
      +     <p>In configurations where both authentication and access control were meaningfully combined, the 
      +        access control directives should be migrated. This example allows requests meeting <em>either</em> criteria:</p>
      +      <div class="example"><h3>2.2 configuration:</h3><pre class="prettyprint lang-config">Order allow,deny
      +Deny from all
      +Satisfy any
      +Allow from 127.0.0.1
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user</pre>
      +</div>
      +      <div class="example"><h3>2.4 configuration:</h3><pre class="prettyprint lang-config">AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +# Implicitly &lt;RequireAny&gt;
      +Require valid-user
      +Require ip 127.0.0.1</pre>
      +</div>
      +
           
       
           <h3><a name="config" id="config">Other configuration changes</a></h3>
      @@ -187,16 +308,15 @@
               settings to replace it in 2.4.
               </li>
       
      +        <li><code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> now
      +        defaults to <code>None</code>.</li>
      +
               <li><code class="directive"><a href="./mod/core.html#enablesendfile">EnableSendfile</a></code> now
               defaults to Off.</li>
       
               <li><code class="directive"><a href="./mod/core.html#fileetag">FileETag</a></code> now
               defaults to "MTime Size" (without INode).</li>
       
      -        <li><code class="module"><a href="./mod/mod_log_config.html">mod_log_config</a></code>: <a href="modules/mod_log_config.html#formats">${cookie}C</a>
      -        matches whole cookie names.  Previously any substring would
      -        match.</li>
      -
               <li><code class="module"><a href="./mod/mod_dav_fs.html">mod_dav_fs</a></code>: The format of the <code class="directive"><a href="./mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code> file has changed for
               systems with inodes.  The old <code class="directive"><a href="./mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code> file must be deleted on
               upgrade.
      @@ -223,6 +343,12 @@
               <code>jsessionid</code>.
               </li>
       
      +        <li><code class="module"><a href="./mod/mod_cache.html">mod_cache</a></code>: The second parameter to 
      +        <code class="directive"><a href="./mod/mod_cache.html#cacheenable">CacheEnable</a></code> only
      +        matches forward proxy content if it begins with the correct
      +        protocol. In 2.2 and earlier, a parameter of '/' matched all
      +        content.</li>
      +
               <li><code class="module"><a href="./mod/mod_ldap.html">mod_ldap</a></code>: <code class="directive"><a href="./mod/mod_ldap.html#ldaptrustedclientcert">LDAPTrustedClientCert</a></code> is now
               consistently a per-directory setting only.  If you use this
               directive, review your configuration to make sure it is
      @@ -247,10 +373,17 @@
               option has been removed in favour of per-module <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> configuration.
               </li>
       
      -        <li><code class="module"><a href="./mod/mod_ext-filter.html">mod_ext-filter</a></code>: The <code>DebugLevel</code>
      +        <li><code class="module"><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code>: The <code>DebugLevel</code>
               option has been removed in favour of per-module <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> configuration.
               </li>
       
      +        <li><code class="module"><a href="./mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>: The default setting for
      +        <code>PATH_INFO</code> has changed from httpd 2.2, and
      +        some web applications will no longer operate properly with
      +        the new <code>PATH_INFO</code> setting.  The previous setting
      +        can be restored by configuring the <code>proxy-scgi-pathinfo</code>
      +        variable.</li>
      +
               <li><code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>: CRL based revocation checking
               now needs to be explicitly configured through <code class="directive"><a href="./mod/mod_ssl.html#sslcarevocationcheck">SSLCARevocationCheck</a></code>.
               </li>
      @@ -262,6 +395,17 @@
               <li><code class="module"><a href="./mod/mod_reqtimeout.html">mod_reqtimeout</a></code>: If the module is loaded, it
               will now set some default timeouts.</li>
       
      +        <li><code class="module"><a href="./mod/mod_dumpio.html">mod_dumpio</a></code>: <code class="directive">DumpIOLogLevel</code>
      +        is no longer supported.  Data is always logged at <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> <code>trace7</code>.</li>
      +
      +        <li>On Unix platforms, piped logging commands configured using
      +        either <code class="directive"><a href="./mod/core.html#errorlog">ErrorLog</a></code> or
      +        <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code> were invoked using
      +        <code>/bin/sh -c</code> in 2.2 and earlier.  In 2.4 and later,
      +        piped logging commands are executed directly.  To restore the
      +        old behaviour, see the <a href="logs.html#piped">piped logging
      +        documentation</a>.</li>
      +
             </ul>
           
         </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -276,7 +420,12 @@
       
             <li><code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>: The default format of the <code>*_DN</code>
             variables has changed. The old format can still be used with the new
      -      <code>LegacyDNStringFormat</code> argument to <code class="directive"><a href="./mod/mod_ssl.html#ssloptions">SSLOptions</a></code>.</li>
      +      <code>LegacyDNStringFormat</code> argument to <code class="directive"><a href="./mod/mod_ssl.html#ssloptions">SSLOptions</a></code>. The SSLv2 protocol is
      +      no longer supported. <code class="directive"><a href="./mod/mod_ssl.html#sslproxycheckpeercn">SSLProxyCheckPeerCN
      +	  </a></code> and <code class="directive"><a href="./mod/mod_ssl.html#sslproxycheckpeerexpire">SSLProxyCheckPeerExpire
      +	  </a></code> now default to On, causing proxy requests to HTTPS hosts
      +	  with bad or outdated certificates to fail with a 502 status code (Bad 
      +	  gateway)</li>
       
             <li><code class="program"><a href="./programs/htpasswd.html">htpasswd</a></code> now uses MD5 hash by default on
             all platforms.</li>
      @@ -299,6 +448,18 @@
             enabled for the directory containing the error documents.
             </li>
       
      +      <li>The functionality provided by <code>mod_authn_alias</code>
      +      in previous versions (i.e., the <code class="directive"><a href="./mod/mod_authn_core.html#authnprovideralias">AuthnProviderAlias</a></code> directive)
      +      has been moved into <code class="module"><a href="./mod/mod_authn_core.html">mod_authn_core</a></code>.  
      +      </li>
      +
      +      <li>The RewriteLog and RewriteLogLevel directives have been removed.
      +      This functionality is now provided by configuring the appropriate
      +      level of logging for the <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> module using
      +      the <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> directive.
      +      See also the <a href="mod/mod_rewrite.html#logging">mod_rewrite logging</a>
      +      section.</li>
      +
           </ul>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -323,11 +484,18 @@
        - load module <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code>, or update configuration to 2.4 authorization directives.</li>
             <li><code>Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf</code> - remove <code class="directive"><a href="./mod/core.html#defaulttype">DefaultType</a></code>
             and replace with other configuration settings.</li>
      +      <li><code>Invalid command 'AddOutputFilterByType', perhaps misspelled 
      +      or defined by a module not included in the server configuration
      +      </code> - <code class="directive"><a href="./mod/mod_filter.html#addoutputfilterbytype">AddOutputFilterByType</a></code> 
      +      has moved from the core to mod_filter, which must be loaded.</li>
           </ul></li>
           <li>Errors serving requests:
           <ul>
             <li><code>configuration error:  couldn't check user: /path</code> -
             load module <code class="module"><a href="./mod/mod_authn_core.html">mod_authn_core</a></code>.</li>
      +      <li><code>.htaccess</code> files aren't being processed - Check for an
      +      appropriate <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> directive;
      +      the default changed to <code>None</code> in 2.4.</li>
           </ul>
           </li>
       </ul>
      @@ -335,7 +503,28 @@
       <div class="bottomlang">
       <p><span>Available Languages: </span><a href="./en/upgrading.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/upgrading.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/upgrading.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/upgrading.html.fr b/docs/manual/upgrading.html.fr
      index c767927c515..8c86ea585ac 100644
      --- a/docs/manual/upgrading.html.fr
      +++ b/docs/manual/upgrading.html.fr
      @@ -1,26 +1,33 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Mise  jour de la version 2.2 vers la version 2.4 - Serveur Apache HTTP</title>
      +<title>Mise  jour de la version 2.2 vers la version 2.4 - Serveur Apache HTTP Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Mise  jour de la version 2.2 vers la version 2.4</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Mise  jour de la version 2.2 vers la version 2.4</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="./en/upgrading.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/upgrading.html" title="Franais">&nbsp;fr&nbsp;</a></p>
       </div>
      +<div class="outofdate">Cette traduction peut tre prime. Vrifiez la version
      +            anglaise pour les changements rcents.</div>
       
         <p>Afin d'assister les utilisateurs lors de leurs oprations de mise 
         jour, nous maintenons un document
      @@ -34,8 +41,8 @@
         l'API</a>.</p>
       
         <p>Ce document prsente les changements de comportement du serveur qui
      -  peuvent ncessiter une modification de la configuration, et la manire
      -  d'utiliser la version 2.4 du serveur en parallle avec la
      +  peuvent ncessiter une modification de la configuration, et une
      +  mthode pour utiliser la version 2.4 du serveur en parallle avec la
         version 2.2. Pour tirer parti des nouvelles fonctionnalits de la
         version 2.4, reportez-vous au document "Nouvelles fonctionnalits".</p>
       
      @@ -52,7 +59,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#third-party">Modules tiers</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#commonproblems">Problmes de mise  jour courants</a></li>
       </ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="new_features_2_4.html">Vue d'ensemble des nouvelles
      -fonctionnalits du serveur HTTP Apache 2.4</a></li></ul></div>
      +fonctionnalits du serveur HTTP Apache 2.4</a></li><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="compile-time" id="compile-time">Modifications des paramtres de compilation</a></h2>
      @@ -83,7 +90,14 @@ fonctionnalit
             <li>configure: les modules dynamiques (DSO) sont compils par
             dfaut</li>
       
      +      <li>configure: par dfaut, seul un jeu de modules de base est
      +      charg. Les autres directives <code class="directive">LoadModule</code>
      +      sont mises en commentaires dans le fichier de configuration.</li>
      +
             <li>configure: le jeu de modules "most" est compil par dfaut</li>
      +
      +      <li>configure: le jeu de modules "reallyall" ajoute les modules de
      +      dveloppeur au jeu "all".</li>
           </ul>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -102,11 +116,24 @@ n
             probablement tre mis  jour.</p>
       
           <p>Vous devez vous reporter au document <a href="howto/auth.html">Authentification, autorisation et contrle
      -    d'accs</a>, et plus particulirement  la section <a href="howto/auth.html#beyond">Plus loin qu'une simple
      +    d'accs</a>, et plus particulirement  la section <a href="howto/auth.html#beyond">Pour aller plus loin qu'une simple
           autorisation</a> qui explique les nouveaux mcanismes permettant de
           contrler l'ordre dans lequel les directives d'autorisation sont
           appliques.</p>
       
      +    <p>Les directives qui contrlent la manire dont les modules
      +    d'autorisation ragissent lorsqu'ils ne reconnaissent pas
      +    l'utilisateur authentifi ont t supprimes : elles comprennent les
      +    directives AuthzLDAPAuthoritative, AuthzDBDAuthoritative,
      +    AuthzDBMAuthoritative, AuthzGroupFileAuthoritative,
      +    AuthzUserAuthoritative et AuthzOwnerAuthoritative. Ces directives
      +    ont t remplaces par les directives plus explicites <code class="directive"><a href="./mod/mod_authz_core.html#requireany">RequireAny</a></code>, <code class="directive"><a href="./mod/mod_authz_core.html#requirenone">RequireNone</a></code>, et <code class="directive"><a href="./mod/mod_authz_core.html#requireall">RequireAll</a></code>.</p>
      +
      +    <p>Si vous utilisez <code class="module"><a href="./mod/mod_authz_dbm.html">mod_authz_dbm</a></code>, vous devez
      +    mettre  jour votre configuration en remplaant les directives du
      +    style <code>Require group ...</code> par des directives du style
      +    <code>Require dbm-group ...</code>.</p>
      +
           <h4><a name="access" id="access">Contrle d'accs</a></h4>
             
       
      @@ -115,51 +142,110 @@ n
             requte tait assur via les directives <code class="directive"><a href="./mod/mod_access_compat.html#order">Order</a></code>, <code class="directive"><a href="./mod/mod_access_compat.html#allow">Allow</a></code>, <code class="directive"><a href="./mod/mod_access_compat.html#deny">Deny</a></code>, et <code class="directive"><a href="./mod/mod_access_compat.html#satisfy">Satisfy</a></code>.</p>
       
             <p>Dans la version 2.4, ce contrle d'accs est assur, comme tout
      -      contrle d'autorisation, via le nouveau module
      +      contrle d'autorisation, par le nouveau module
             <code class="module"><a href="./mod/mod_authz_host.html">mod_authz_host</a></code>. Bien que le module
             <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> soit fourni  des fins de
             compatibilit avec les anciennes configurations, les anciennes
             directives de contrle d'accs devront tre remplaces par les
             nouveaux mcanismes d'authentification.</p>
       
      +      <div class="note"><h3>Mlanger anciennes et nouvelles directives</h3>
      +      <p>Mlanger d'anciennes directives comme <code class="directive"><a href="./mod/mod_access_compat.html#order">Order</a></code>, <code class="directive"><a href="./mod/mod_access_compat.html#allow">Allow</a></code> ou <code class="directive"><a href="./mod/mod_access_compat.html#deny">Deny</a></code> avec des nouvelles comme
      +      <code class="directive"><a href="./mod/mod_authz_core.html#require">Require</a></code> est techniquement
      +      possible mais dconseill. En effet, <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> a
      +      t conu pour supporter des configurations ne contenant que des anciennes
      +      directives afin de faciliter le passage  la version 2.4. Les
      +      exemples ci-dessous vous permettront de vous faire une meilleure ide des
      +      problmes qui peuvent survenir.
      +      </p>
      +      </div>
      +
             <p>Voici quelques exemples de contrle d'accs avec l'ancienne et
             la nouvelle mthode :</p>
       
             <p>Dans cet exemple, toutes les requtes sont rejetes :</p>
      -      <div class="example"><h3>version 2.2 :</h3><p><code>
      -        
      -        Order deny,allow<br />
      -        Deny from all
      -      </code></p></div>
      -      <div class="example"><h3>version 2.4 :</h3><p><code>
      -        
      -        Require all denied
      -      </code></p></div>
      +      <div class="example"><h3>version 2.2 :</h3><pre class="prettyprint lang-config">Order deny,allow
      +Deny from all</pre>
      +</div>
      +      <div class="example"><h3>version 2.4 :</h3><pre class="prettyprint lang-config">Require all denied</pre>
      +</div>
       
             <p>Dans cet exemple, toutes les requtes sont acceptes :</p>
      -      <div class="example"><h3>version 2.2 :</h3><p><code>
      -        
      -        Order allow,deny<br />
      -        Allow from all
      -      </code></p></div>
      -      <div class="example"><h3>version 2.4 :</h3><p><code>
      -        
      -        Require all granted
      -      </code></p></div>
      +      <div class="example"><h3>version 2.2 :</h3><pre class="prettyprint lang-config">Order allow,deny
      +Allow from all</pre>
      +</div>
      +      <div class="example"><h3>version 2.4 :</h3><pre class="prettyprint lang-config">Require all granted</pre>
      +</div>
       
             <p>Dans l'exemple suivant, tous les htes du domaine example.org
             ont l'autorisation d'accs, tous les autres sont rejets :</p>
       
      -      <div class="example"><h3>version 2.2 :</h3><p><code>
      -        
      -        Order Deny,Allow<br />
      -        Deny from all<br />
      -        Allow from example.org
      -      </code></p></div>
      -      <div class="example"><h3>version 2.4 :</h3><p><code>
      -        
      -        Require host example.org
      -      </code></p></div>
      +      <div class="example"><h3>version 2.2 :</h3><pre class="prettyprint lang-config">Order Deny,Allow
      +Deny from all
      +Allow from example.org</pre>
      +</div>
      +      <div class="example"><h3>version 2.4 :</h3><pre class="prettyprint lang-config">Require host example.org</pre>
      +</div>
      +    <p>Dans l'exemple suivant, tous les htes du domaine example.org
      +      ont l'autorisation d'accs, tous les autres sont rejets :</p>
      +
      +      <div class="example"><h3>version 2.2 :</h3><pre class="prettyprint lang-config">Order Deny,Allow
      +Deny from all
      +Allow from example.org</pre>
      +</div>
      +      <div class="example"><h3>version 2.4 :</h3><pre class="prettyprint lang-config">Require host example.org</pre>
      +</div>
      +
      +      <p>Dans l'exemple suivant, le mlange d'anciennes et de nouvelles
      +      directives produit des rsultats inattendus.</p>
      + 
      +      <div class="example"><h3>Mlange d'anciennes et de nouvelles directives : RESULTAT
      +	INATTENDU</h3><pre class="prettyprint lang-config">DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Order deny,allow
      +    Deny from all
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Require 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 403 127.0.0.1
      +error.log - AH01797: client denied by server configuration: /var/www/html/server-status</pre>
      +</div>
      +      <p>Pourquoi httpd interdit l'accs  server-status alors que la
      +      configuration semble l'autoriser ? Parce que dans ce scnario de <a href="sections.html#merging">fusion</a> de configuration, les
      +      directives de <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code> sont prioritaires par
      +      rapport  celles de <code class="module"><a href="./mod/mod_authz_host.html">mod_authz_host</a></code>.</p>
      +
      +      <p>L'exemple suivant quant  lui produit un rsultat conforme :</p>
      +
      +      <div class="example"><h3>Mlange d'anciennes et de nouvelles directives : RESULTAT
      +	CONFORME</h3><pre class="prettyprint lang-config">DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Require all denied
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Order deny,allow
      +    Deny from all
      +    Allow From 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 200 127.0.0.1</pre>
      +</div> 
      +      <p>En conclusion, mme si une configuration hybride peut fonctionner,
      +      essayez de l'viter lors de la mise  jour : soit conservez les anciennes
      +      directives, puis migrez-les vers les nouvelles ultrieurement, soit
      +      effectuez une migration immdiate de toutes les anciennes directives vers
      +      les nouvelles.  
      +      </p>      
           
       
           
      @@ -171,7 +257,7 @@ n
             certaines configurations particulires, comme dcrit ci-dessous.</p>
       
             <ul>
      -        <li><code class="directive">MaxRequestsPerChild</code> a t renomme en
      +        <li>La directive <code class="directive">MaxRequestsPerChild</code> a t renomme en
       	<code class="directive"><a href="./mod/mpm_common.html#maxconnectionsperchild">MaxConnectionsPerChild</a></code>;
       	ce nouveau nom reflte mieux l'usage de cette directive.
       	L'ancien nom est encore support.</li>
      @@ -189,11 +275,13 @@ n
       	directives de configuration la remplacent dans la version 2.4.
               </li>
       
      +	<li>La valeur par dfaut de la directive <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> est maintenant
      +	<code>None</code>.</li>
      +
       	<li>La valeur par dfaut de la directive <code class="directive"><a href="./mod/core.html#enablesendfile">EnableSendfile</a></code> est maintenant Off.</li>
       
      -        <li><code class="module"><a href="./mod/mod_log_config.html">mod_log_config</a></code>: <a href="modules/mod_log_config.html#formats">${cookie}C</a>
      -        correspond au nom du cookie dans son ensemble, alors qu'avant,
      -	toute sous-chane pouvait correspondre.</li>
      +	<li>La valeur par dfaut de la directive <code class="directive"><a href="./mod/core.html#fileetag">FileETag</a></code> est maintenant "MTime Size"
      +	(sans INode).</li>
       
               <li><code class="module"><a href="./mod/mod_dav_fs.html">mod_dav_fs</a></code>: le format du fichier <code class="directive"><a href="./mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code> a chang pour les systmes
       	avec inodes. L'ancien fichier <code class="directive"><a href="./mod/mod_dav_fs.html#davlockdb">DavLockDB</a></code> doit tre supprim dans le
      @@ -223,6 +311,12 @@ n
       	complte <code>jsessionid</code>.
               </li>
       
      +	<li><code class="module"><a href="./mod/mod_cache.html">mod_cache</a></code>: le second paramtre de la
      +	directive <code class="directive"><a href="./mod/mod_cache.html#cacheenable">CacheEnable</a></code>
      +	ne concerne les contenus en mandat direct que s'ils dbutent par
      +	le protocole appropri. Dans les versions 2.2 et antrieures, un
      +	paramtre tel que '/' concernait tous les contenus.</li>
      +
               <li><code class="module"><a href="./mod/mod_ldap.html">mod_ldap</a></code>: la directive <code class="directive"><a href="./mod/mod_ldap.html#ldaptrustedclientcert">LDAPTrustedClientCert</a></code> s'utilise
       	maintenant exclusivement au sein d'une configuration de niveau
       	rpertoire. Si vous utilisez cette directive, passez en revue
      @@ -254,11 +348,44 @@ n
       	configuration de la directive <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> au niveau rpertoire.
               </li>
       
      -        <li><code class="module"><a href="./mod/mod_ext-filter.html">mod_ext-filter</a></code> : l'option
      +        <li><code class="module"><a href="./mod/mod_ext_filter.html">mod_ext_filter</a></code> : l'option
       	<code>DebugLevel</code> a t supprime en faveur d'une
       	configuration de la directive <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> au niveau rpertoire.
               </li>
       
      +	<li><code class="module"><a href="./mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>: certaines applications web
      +	ne fonctionneront plus correctement avec la nouvelle
      +	configuration de <code>PATH_INFO</code> qui est diffrente de
      +	celle de la version 2.2. La configuration
      +	prcdente peut tre
      +	restaure en dfinissant la variable
      +	<code>proxy-scgi-pathinfo</code>.</li>
      +
      +	<li><code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code>: le contrle de rvocation des
      +	certificats bas sur les CRL doit tre maintenant explicitement
      +	configur via la directive <code class="directive"><a href="./mod/mod_ssl.html#sslcarevocationcheck">SSLCARevocationCheck</a></code>.
      +        </li>
      +
      +        <li><code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>: la taille maximale d'une
      +	ligne est maintenant 1Mo.
      +        </li>
      +
      +        <li><code class="module"><a href="./mod/mod_reqtimeout.html">mod_reqtimeout</a></code>: si ce module est charg, il
      +	dfinit maintenant certains temps d'attente par dfaut.</li>
      +
      +	<li><code class="module"><a href="./mod/mod_dumpio.html">mod_dumpio</a></code>: la directive
      +	<code class="directive">DumpIOLogLevel</code> n'est plus supporte. Les
      +	donnes sont toujours enregistres au niveau <code>trace7</code>
      +	de <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code></li>
      +
      +        <li>Jusqu' la version 2.2, sur les plateformes de style Unix, 
      +	les commandes de redirection des logs dfinies via <code class="directive"><a href="./mod/core.html#errorlog">ErrorLog</a></code> ou <code class="directive"><a href="./mod/mod_log_config.html#customlog">CustomLog</a></code> taient invoques
      +	en utilisant <code>/bin/sh -c</code>. A
      +	partir de la version 2.4, les commandes de redirection des logs
      +	sont excutes directement. Pour retrouver l'ancien
      +	comportement, voir la <a href="logs.html#piped">documentation
      +	sur la redirection des logs</a></li>
      +
           </ul>
           
         </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -274,7 +401,12 @@ n
             <li><code class="module"><a href="./mod/mod_ssl.html">mod_ssl</a></code> : le format par dfaut des variables
             <code>*_DN</code> a chang. Il est cependant encore possible
             d'utiliser l'ancien format via la nouvelle option
      -      <code>LegacyDNStringFormat</code> de la directive <code class="directive"><a href="./mod/mod_ssl.html#ssloptions">SSLOptions</a></code>.</li>
      +      <code>LegacyDNStringFormat</code> de la directive <code class="directive"><a href="./mod/mod_ssl.html#ssloptions">SSLOptions</a></code>. Le protocole SSLv2 n'est
      +      plus support. Les directives <code class="directive"><a href="./mod/mod_ssl.html#sslproxycheckpeercn">SSLProxyCheckPeerCN</a></code> et
      +      <code class="directive"><a href="./mod/mod_ssl.html#sslproxycheckpeerexpire">SSLProxyCheckPeerExpire</a></code>
      +      sont maintenant dfinies par dfaut  On, et les requtes mandates
      +      vers des serveurs HTTPS possdant des certificats non conformes ou
      +      prims choueront donc avec un code d'erreur 502 (Bad gateway).</li>
       
             <li><code class="program"><a href="./programs/htpasswd.html">htpasswd</a></code> utilise maintenant par dfaut les
             condenss MD5 sur toutes les plates-formes.</li>
      @@ -297,6 +429,20 @@ n
             <code class="directive"><a href="./mod/mod_include.html#ssilegacyexprparser">SSILegacyExprParser</a></code> a
             t active pour le rpertoire contenant les pages d'erreur.
             </li>
      +
      +      <li>La fonctionnalit fournie par <code>mod_authn_alias</code>
      +      dans les prcdentes versions (en fait la directive
      +      <code class="directive"><a href="./mod/mod_authn_core.html#authnprovideralias">AuthnProviderAlias</a></code>)
      +      est maintenant fournie par <code class="module"><a href="./mod/mod_authn_core.html">mod_authn_core</a></code>.  
      +      </li>
      +
      +      <li>Les directives RewriteLog et RewriteLogLevel ont t
      +      supprimes. Leur fonctions sont maintenant assures par la
      +      directive <code class="directive"><a href="./mod/core.html#loglevel">LogLevel</a></code> qui permet de dfinir
      +      un niveau de journalisation appropri pour le module
      +      <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code>. Voir aussi la section <a href="mod/mod_rewrite.html#logging">journalisation de
      +      mod_rewrite</a>.</li>
      +
           </ul>
       
           </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -309,7 +455,7 @@ n
       
           <p>De nombreux modules tiers conus pour la version 2.2
           fonctionneront sans changement avec le serveur HTTP Apache
      -    version 2.4. Certains ncessiterons cependant des modifications ; se
      +    version 2.4. Certains ncessiteront cependant des modifications ; se
           reporter  la vue d'ensemble <a href="developer/new_api_2_4.html">Mise  jour de l'API</a>.</p>
         </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
      @@ -327,29 +473,25 @@ n
             module not included in the server configuration</code> - chargez
             le module <code class="module"><a href="./mod/mod_access_compat.html">mod_access_compat</a></code>, ou mettez  jour
             vers la version 2.4 les directives d'autorisation.</li>
      -      <li><code>mixing * ports and non-* ports with a NameVirtualHost address is not supported</code>, <code>Either NameVirtualHost w.x.y.z:n has no VirtualHosts, or there is more than one identical NameVirtualHost line, or your VirtualHost declarations do not match the NameVirtualHost line</code> - ces messages ne sont pas nouveaux, mais ils bloquent dsormais le dmarrage en gnrant une erreur</li>
      -
      -      <li><code>_default_ is not allowed in NameVirtualHost directive</code> - ceci a toujours t le cas, mais  prsent cette erreur bloque le dmarrage du serveur.</li>
       
             <li><code>Ignoring deprecated use of DefaultType in line NN of
             /path/to/httpd.conf</code> - supprimez la directive <code class="directive"><a href="./mod/core.html#defaulttype">DefaultType</a></code> et remplacez-la par les
             directives de configuration appropries.</li>
      -      <li><code>mixing * ports and non-* ports with a NameVirtualHost
      -      address is not supported</code>, <code>Either NameVirtualHost
      -      w.x.y.z:n has no VirtualHosts, or there is more than one identical
      -      NameVirtualHost line, or your VirtualHost declarations do not
      -      match the NameVirtualHost line</code> -
      -      ce ne sont pas des nouveaux messages, mais ils empchent
      -      maintenant le serveur de dmarrer</li>
      -      <li><code>_default_ is not allowed in NameVirtualHost
      -      directive</code> - l'explication est dans le message ; cette
      -      dfinition n'a jamais t valide, mais elle empche maintenant le
      -      serveur de dmarrer.</li>
      +
      +      <li><code>Invalid command 'AddOutputFilterByType', perhaps misspelled 
      +      or defined by a module not included in the server configuration
      +      </code> - la directive <code class="directive"><a href="./mod/mod_filter.html#addoutputfilterbytype">AddOutputFilterByType</a></code> qui tait
      +      jusqu'alors implmente par le module core, l'est maintenant par
      +      le module mod_filter, qui doit donc tre charg.</li>
      +
           </ul></li>
           <li>Erreurs de traitement des requtes :
           <ul>
             <li><code>configuration error:  couldn't check user: /path</code> -
             chargez le module <code class="module"><a href="./mod/mod_authn_core.html">mod_authn_core</a></code>.</li>
      +      <li>Les fichiers <code>.htaccess</code> ne sont pas traits -
      +      Vrifiez la prsence d'une directive <code class="directive"><a href="./mod/core.html#allowoverride">AllowOverride</a></code> approprie ; sa valeur par
      +      dfaut est maintenant <code>None</code>.</li>
           </ul>
           </li>
       </ul>
      @@ -358,7 +500,28 @@ n
       <div class="bottomlang">
       <p><span>Langues Disponibles: </span><a href="./en/upgrading.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/upgrading.html" title="Franais">&nbsp;fr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/upgrading.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/upgrading.xml b/docs/manual/upgrading.xml
      index 2de2c1a71ca..39df654e682 100644
      --- a/docs/manual/upgrading.xml
      +++ b/docs/manual/upgrading.xml
      @@ -76,12 +76,13 @@
       
             <li>configure: dynamic modules (DSO) are built by default</li>
       
      -      <li>configure: By default, only load those modules that are either required
      -      or explicitly selected by a configure <code>--enable-foo</code> argument.</li>
      +      <li>configure: By default, only a basic set of modules is loaded. The
      +      other <directive>LoadModule</directive> directives are commented
      +      out in the configuration file.</li>
       
             <li>configure: the "most" module set gets built by default</li>
       
      -      <li>configure: the "realyall" module set adds developer modules
      +      <li>configure: the "reallyall" module set adds developer modules
             to the "all" set</li>
           </ul>
       
      @@ -105,6 +106,19 @@
           which explains the new mechanisms for controlling the order in
           which the authorization directives are applied.</p>
       
      +    <p>Directives that control how authorization modules respond when they don't match
      +    the authenticated user have been removed: This includes 
      +    AuthzLDAPAuthoritative, AuthzDBDAuthoritative, AuthzDBMAuthoritative, 
      +    AuthzGroupFileAuthoritative, AuthzUserAuthoritative,
      +    and AuthzOwnerAuthoritative.   These directives have been replaced by the
      +    more expressive <directive module="mod_authz_core">RequireAny</directive>, 
      +    <directive module="mod_authz_core">RequireNone</directive>, and
      +    <directive module="mod_authz_core">RequireAll</directive>.</p>
      +
      +    <p>If you use <module>mod_authz_dbm</module>, you must port your 
      +    configuration to use <code>Require dbm-group ...</code> in place
      +    of <code>Require group ...</code>.</p>
      +
           <section id="access">
             <title>Access control</title>
       
      @@ -123,46 +137,208 @@
             although for compatibility with old configurations, the new
             module <module>mod_access_compat</module> is provided.</p>
       
      +      <note><title>Mixing old and new directives</title>
      +      <p>Mixing old directives like <directive
      +      module="mod_access_compat">Order</directive>, <directive
      +      module="mod_access_compat">Allow</directive> or <directive
      +      module="mod_access_compat">Deny</directive> with new ones like
      +      <directive
      +      module="mod_authz_core">Require</directive> is technically possible 
      +      but discouraged. <module>mod_access_compat</module> was created to support 
      +      configurations containing only old directives to facilitate the 2.4 upgrade. 
      +      Please check the examples below to get a better idea about issues that might arise.
      +      </p>
      +      </note>
      +
             <p>Here are some examples of old and new ways to do the same
             access control.</p>
       
      -      <p>In this example, all requests are denied.</p>
      +      <p>In this example, there is no authentication and all requests are denied.</p>
             <example>
               <title>2.2 configuration:</title>
      -        Order deny,allow<br />
      -        Deny from all
      +        <highlight language="config">
      +Order deny,allow
      +Deny from all
      +        </highlight>
             </example>
             <example>
               <title>2.4 configuration:</title>
      +        <highlight language="config">
               Require all denied
      +        </highlight>
             </example>
       
      -      <p>In this example, all requests are allowed.</p>
      +      <p>In this example, there is no authentication and all requests are allowed.</p>
             <example>
               <title>2.2 configuration:</title>
      -        Order allow,deny<br />
      -        Allow from all
      +        <highlight language="config">
      +Order allow,deny
      +Allow from all
      +        </highlight>
             </example>
             <example>
               <title>2.4 configuration:</title>
      +        <highlight language="config">
               Require all granted
      +        </highlight>
             </example>
       
      -      <p>In the following example, all hosts in the example.org domain
      +      <p>In the following example, there is no authentication and all hosts in the example.org domain
             are allowed access; all other hosts are denied access.</p>
       
             <example>
               <title>2.2 configuration:</title>
      -        Order Deny,Allow<br />
      -        Deny from all<br />
      -        Allow from example.org
      +        <highlight language="config">
      +Order Deny,Allow
      +Deny from all
      +Allow from example.org
      +        </highlight>
             </example>
             <example>
               <title>2.4 configuration:</title>
      +        <highlight language="config">
               Require host example.org
      +        </highlight>
             </example>
      +
      +      <p>In the following example, mixing old and new directives leads to 
      +      unexpected results.</p>
      + 
      +      <example>
      +        <title>Mixing old and new directives: NOT WORKING AS EXPECTED</title>
      +          <highlight language="config">
      +DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Order deny,allow
      +    Deny from all
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Require 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 403 127.0.0.1
      +error.log - AH01797: client denied by server configuration: /var/www/html/server-status
      +          </highlight>
      +      </example>
      +      <p>Why httpd denies access to servers-status even if the configuration seems to allow it?
      +        Because <module>mod_access_compat</module> directives take precedence
      +        over the <module>mod_authz_host</module> one in this configuration 
      +        <a href="sections.html#merging">merge</a> scenario.</p>
      +
      +      <p>This example conversely works as expected:</p>
      +
      +      <example>
      +        <title>Mixing old and new directives: WORKING AS EXPECTED</title>
      +        <highlight language="config">
      +DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Require all denied
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Order deny,allow
      +    Deny from all
      +    Allow From 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 200 127.0.0.1
      +        </highlight>
      +      </example> 
      +      <p>So even if mixing configuration is still
      +        possible, please try to avoid it when upgrading: either keep old directives and then migrate
      +        to the new ones on a later stage or just migrate everything in bulk.  
      +      </p>
           </section>
       
      +     <p>In many configurations with authentication, where the value of the
      +     <directive>Satisfy</directive> was the default of <em>ALL</em>, snippets
      +     that simply disabled host-based access control are omitted:</p>
      +
      +      <example>
      +        <title>2.2 configuration:</title>
      +        <highlight language="config">
      +Order Deny,Allow
      +Deny from all
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user
      +        </highlight>
      +      </example>
      +      <example>
      +        <title>2.4 configuration:</title>
      +        <highlight language="config">
      +# No replacement needed
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user
      +        </highlight>
      +      </example>
      +
      +     <p>In configurations where both authentication and access control were meaningfully combined, the 
      +        access control directives should be migrated. This example allows requests meeting <em>both</em> criteria:</p>
      +      <example>
      +        <title>2.2 configuration:</title>
      +        <highlight language="config">
      +Order allow,deny
      +Deny from all
      +# Satisfy ALL is the default
      +Satisfy ALL
      +Allow from 127.0.0.1
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user
      +        </highlight>
      +      </example>
      +      <example>
      +        <title>2.4 configuration:</title>
      +        <highlight language="config">
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +&lt;RequireAll&gt;
      +  Require valid-user
      +  Require ip 127.0.0.1
      +&lt;/RequireAll&gt;
      +        </highlight>
      +      </example>
      +
      +     <p>In configurations where both authentication and access control were meaningfully combined, the 
      +        access control directives should be migrated. This example allows requests meeting <em>either</em> criteria:</p>
      +      <example>
      +        <title>2.2 configuration:</title>
      +        <highlight language="config">
      +Order allow,deny
      +Deny from all
      +Satisfy any
      +Allow from 127.0.0.1
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +Require valid-user
      +        </highlight>
      +      </example>
      +      <example>
      +        <title>2.4 configuration:</title>
      +        <highlight language="config">
      +AuthBasicProvider File
      +AuthUserFile /example.com/conf/users.passwd
      +AuthName secure
      +# Implicitly &lt;RequireAny&gt;
      +Require valid-user
      +Require ip 127.0.0.1
      +        </highlight>
      +      </example>
      +
           </section>
       
           <section id="config">
      @@ -191,17 +367,15 @@
               settings to replace it in 2.4.
               </li>
       
      +        <li><directive module="core">AllowOverride</directive> now
      +        defaults to <code>None</code>.</li>
      +
               <li><directive module="core">EnableSendfile</directive> now
               defaults to Off.</li>
       
               <li><directive module="core">FileETag</directive> now
               defaults to "MTime Size" (without INode).</li>
       
      -        <li><module>mod_log_config</module>: <a
      -        href="modules/mod_log_config.html#formats">${cookie}C</a>
      -        matches whole cookie names.  Previously any substring would
      -        match.</li>
      -
               <li><module>mod_dav_fs</module>: The format of the <directive
               module="mod_dav_fs">DavLockDB</directive> file has changed for
               systems with inodes.  The old <directive
      @@ -232,6 +406,12 @@
               <code>jsessionid</code>.
               </li>
       
      +        <li><module>mod_cache</module>: The second parameter to 
      +        <directive module="mod_cache">CacheEnable</directive> only
      +        matches forward proxy content if it begins with the correct
      +        protocol. In 2.2 and earlier, a parameter of '/' matched all
      +        content.</li>
      +
               <li><module>mod_ldap</module>: <directive
               module="mod_ldap">LDAPTrustedClientCert</directive> is now
               consistently a per-directory setting only.  If you use this
      @@ -261,11 +441,18 @@
               module="core">LogLevel</directive> configuration.
               </li>
       
      -        <li><module>mod_ext-filter</module>: The <code>DebugLevel</code>
      +        <li><module>mod_ext_filter</module>: The <code>DebugLevel</code>
               option has been removed in favour of per-module <directive
               module="core">LogLevel</directive> configuration.
               </li>
       
      +        <li><module>mod_proxy_scgi</module>: The default setting for
      +        <code>PATH_INFO</code> has changed from httpd 2.2, and
      +        some web applications will no longer operate properly with
      +        the new <code>PATH_INFO</code> setting.  The previous setting
      +        can be restored by configuring the <code>proxy-scgi-pathinfo</code>
      +        variable.</li>
      +
               <li><module>mod_ssl</module>: CRL based revocation checking
               now needs to be explicitly configured through <directive
               module="mod_ssl">SSLCARevocationCheck</directive>.
      @@ -278,6 +465,18 @@
               <li><module>mod_reqtimeout</module>: If the module is loaded, it
               will now set some default timeouts.</li>
       
      +        <li><module>mod_dumpio</module>: <directive>DumpIOLogLevel</directive>
      +        is no longer supported.  Data is always logged at <directive
      +        module="core">LogLevel</directive> <code>trace7</code>.</li>
      +
      +        <li>On Unix platforms, piped logging commands configured using
      +        either <directive module="core">ErrorLog</directive> or
      +        <directive module="mod_log_config">CustomLog</directive> were invoked using
      +        <code>/bin/sh -c</code> in 2.2 and earlier.  In 2.4 and later,
      +        piped logging commands are executed directly.  To restore the
      +        old behaviour, see the <a href="logs.html#piped">piped logging
      +        documentation</a>.</li>
      +
             </ul>
           </section>
         </section>
      @@ -293,7 +492,12 @@
             <li><module>mod_ssl</module>: The default format of the <code>*_DN</code>
             variables has changed. The old format can still be used with the new
             <code>LegacyDNStringFormat</code> argument to <directive
      -      module="mod_ssl">SSLOptions</directive>.</li>
      +      module="mod_ssl">SSLOptions</directive>. The SSLv2 protocol is
      +      no longer supported. <directive module="mod_ssl">SSLProxyCheckPeerCN
      +	  </directive> and <directive module="mod_ssl">SSLProxyCheckPeerExpire
      +	  </directive> now default to On, causing proxy requests to HTTPS hosts
      +	  with bad or outdated certificates to fail with a 502 status code (Bad 
      +	  gateway)</li>
       
             <li><program>htpasswd</program> now uses MD5 hash by default on
             all platforms.</li>
      @@ -316,6 +520,19 @@
             enabled for the directory containing the error documents.
             </li>
       
      +      <li>The functionality provided by <code>mod_authn_alias</code>
      +      in previous versions (i.e., the <directive 
      +      module="mod_authn_core">AuthnProviderAlias</directive> directive)
      +      has been moved into <module>mod_authn_core</module>.  
      +      </li>
      +
      +      <li>The RewriteLog and RewriteLogLevel directives have been removed.
      +      This functionality is now provided by configuring the appropriate
      +      level of logging for the <module>mod_rewrite</module> module using
      +      the <directive module="core">LogLevel</directive> directive.
      +      See also the <a href="mod/mod_rewrite.html#logging">mod_rewrite logging</a>
      +      section.</li>
      +
           </ul>
       
         </section>
      @@ -340,11 +557,18 @@
        - load module <module>mod_access_compat</module>, or update configuration to 2.4 authorization directives.</li>
             <li><code>Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf</code> - remove <directive module="core">DefaultType</directive>
             and replace with other configuration settings.</li>
      +      <li><code>Invalid command 'AddOutputFilterByType', perhaps misspelled 
      +      or defined by a module not included in the server configuration
      +      </code> - <directive module="mod_filter">AddOutputFilterByType</directive> 
      +      has moved from the core to mod_filter, which must be loaded.</li>
           </ul></li>
           <li>Errors serving requests:
           <ul>
             <li><code>configuration error:  couldn't check user: /path</code> -
             load module <module>mod_authn_core</module>.</li>
      +      <li><code>.htaccess</code> files aren't being processed - Check for an
      +      appropriate <directive module="core">AllowOverride</directive> directive;
      +      the default changed to <code>None</code> in 2.4.</li>
           </ul>
           </li>
       </ul>
      diff --git a/docs/manual/upgrading.xml.fr b/docs/manual/upgrading.xml.fr
      index d8c29359613..5d645d4c2fc 100644
      --- a/docs/manual/upgrading.xml.fr
      +++ b/docs/manual/upgrading.xml.fr
      @@ -1,9 +1,9 @@
      -<?xml version="1.0" encoding="ISO-8859-1" ?>
      +<?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.fr.xsl"?>
       <!-- French translation : Lucien GENTIS -->
       <!-- Reviewed by : Vincent Deffontaines -->
      -<!-- English Revision : 1181242 -->
      +<!-- English Revision: 1738542:1772764 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      @@ -24,148 +24,274 @@
       
       <manualpage metafile="upgrading.xml.meta">
       
      -<title>Mise &agrave; jour de la version 2.2 vers la version 2.4</title>
      +<title>Mise à jour de la version 2.2 vers la version 2.4</title>
       
       <summary>
      -  <p>Afin d'assister les utilisateurs lors de leurs op&eacute;rations de mise &agrave;
      +  <p>Afin d'assister les utilisateurs lors de leurs opérations de mise à
         jour, nous maintenons un document
      -  qui comporte des informations critiques &agrave; l'attention des personnes qui
      -  utilisent d&eacute;j&agrave; le serveur HTTP Apache. Ces informations
      -  ne sont que de br&egrave;ves notes, et vous
      +  qui comporte des informations critiques à l'attention des personnes qui
      +  utilisent déjà le serveur HTTP Apache. Ces informations
      +  ne sont que de brèves notes, et vous
         trouverez plus d'informations dans le document <a
      -  href="new_features_2_4.html">Nouvelles fonctionnalit&eacute;s</a>, ou dans
      -  le fichier <code>src/CHANGES</code>. Les d&eacute;veloppeurs d'applications
      -  et de modules trouveront un r&eacute;sum&eacute; des modifications de l'API dans la
      -  vue d'ensemble <a href="developer/new_api_2_4.html">Mises &agrave; jour de
      +  href="new_features_2_4.html">Nouvelles fonctionnalités</a>, ou dans
      +  le fichier <code>src/CHANGES</code>. Les développeurs d'applications
      +  et de modules trouveront un résumé des modifications de l'API dans la
      +  vue d'ensemble <a href="developer/new_api_2_4.html">Mises à jour de
         l'API</a>.</p>
       
      -  <p>Ce document pr&eacute;sente les changements de comportement du serveur qui
      -  peuvent n&eacute;cessiter une modification de la configuration, et la mani&egrave;re
      -  d'utiliser la version 2.4 du serveur en parall&egrave;le avec la
      -  version 2.2. Pour tirer parti des nouvelles fonctionnalit&eacute;s de la
      -  version 2.4, reportez-vous au document "Nouvelles fonctionnalit&eacute;s".</p>
      +  <p>Ce document présente les changements de comportement du serveur qui
      +  peuvent nécessiter une modification de la configuration, et une
      +  méthode pour utiliser la version 2.4 du serveur en parallèle avec la
      +  version 2.2. Pour tirer parti des nouvelles fonctionnalités de la
      +  version 2.4, reportez-vous au document "Nouvelles fonctionnalités".</p>
       
      -  <p>Ce document ne d&eacute;crit que les modifications intervenues entre les versions
      -  2.2 et 2.4. Si vous effectuez une mise &agrave; jour depuis la version 2.0, vous
      +  <p>Ce document ne décrit que les modifications intervenues entre les versions
      +  2.2 et 2.4. Si vous effectuez une mise à jour depuis la version 2.0, vous
         devez aussi consulter le
         <a href="http://httpd.apache.org/docs/2.2/upgrading.html">document de mise
      -  &agrave; jour de 2.0 vers 2.2.</a></p>
      +  à jour de 2.0 vers 2.2.</a></p>
       
       </summary>
       <seealso><a href="new_features_2_4.html">Vue d'ensemble des nouvelles
      -fonctionnalit&eacute;s du serveur HTTP Apache 2.4</a></seealso>
      +fonctionnalités du serveur HTTP Apache 2.4</a></seealso>
       
         <section id="compile-time">
      -    <title>Modifications des param&egrave;tres de compilation</title>
      -     <p>Le processus de compilation est tr&egrave;s similaire &agrave; celui de la
      +    <title>Modifications des paramètres de compilation</title>
      +     <p>Le processus de compilation est très similaire à celui de la
            version 2.2. Dans la plupart des cas, vous pourrez utiliser votre
            ancienne ligne de commande <code>configure</code> (telle qu'elle
      -     est enregistr&eacute;e dans le fichier <code>build/config.nice</code>
      -     situ&eacute; dans le r&eacute;pertoire de compilation du serveur). Voici certains
      -     changements intervenus dans la configuration par d&eacute;faut :</p>
      +     est enregistrée dans le fichier <code>build/config.nice</code>
      +     situé dans le répertoire de compilation du serveur). Voici certains
      +     changements intervenus dans la configuration par défaut :</p>
       
           <ul>
      -      <li>Les modules suivants ont &eacute;t&eacute; supprim&eacute;s : mod_authn_default,
      +      <li>Les modules suivants ont été supprimés : mod_authn_default,
             mod_authz_default et mod_mem_cache. Si vous utilisiez
             mod_mem_cache sous la version 2.2, vous devez maintenant utiliser
             <module>mod_cache_disk</module> dans la version 2.4.</li>
       
      -      <li>Toutes les impl&eacute;mentations de r&eacute;partition de charge ont &eacute;t&eacute;
      -      d&eacute;plac&eacute;es vers des sous-modules sp&eacute;cifiques de mod_proxy, comme
      +      <li>Toutes les implémentations de répartition de charge ont été
      +      déplacées vers des sous-modules spécifiques de mod_proxy, comme
             <module>mod_lbmethod_bybusyness</module>. Vous devrez compiler et
      -      charg&eacute;s tous les modules correspondants que votre configuration
      +      chargés tous les modules correspondants que votre configuration
             utilise.</li>
       
             <li>Le support de BeOS, TPF, et des anciennes plates-formes telles
      -      que A/UX, Next, et Tandem a &eacute;t&eacute; supprim&eacute;, car
      -      elles ne sont plus consid&eacute;r&eacute;es comme maintenues.</li>
      +      que A/UX, Next, et Tandem a été supprimé, car
      +      elles ne sont plus considérées comme maintenues.</li>
       
      -      <li>configure: les modules dynamiques (DSO) sont compil&eacute;s par
      -      d&eacute;faut</li>
      +      <li>configure: les modules dynamiques (DSO) sont compilés par
      +      défaut</li>
       
      -      <li>configure: le jeu de modules "most" est compil&eacute; par d&eacute;faut</li>
      +      <li>configure: par défaut, seul un jeu de modules de base est
      +      chargé. Les autres directives <directive>LoadModule</directive>
      +      sont mises en commentaires dans le fichier de configuration.</li>
      +
      +      <li>configure: le jeu de modules "most" est compilé par défaut</li>
      +
      +      <li>configure: le jeu de modules "reallyall" ajoute les modules de
      +      développeur au jeu "all".</li>
           </ul>
       
         </section>
       
         <section id="run-time">
      -    <title>Modifications de la configuration &agrave; l'ex&eacute;cution</title>
      +    <title>Modifications de la configuration à l'exécution</title>
       <p>Des changements significatifs dans la configuration de
       l'autorisation, ainsi que quelques changements mineurs, peuvent
      -n&eacute;cessiter une mise &agrave; jour des fichiers de configuration de la version
      +nécessiter une mise à jour des fichiers de configuration de la version
       2.2 avant de les utiliser sous la version 2.4.</p>
       
           <section id="authz">
             <title>Autorisation</title>
       
      -      <p>Tout fichier de configuration qui g&egrave;re des autorisations devra
      -      probablement &ecirc;tre mis &agrave; jour.</p>
      +      <p>Tout fichier de configuration qui gère des autorisations devra
      +      probablement être mis à jour.</p>
       
           <p>Vous devez vous reporter au document <a
      -    href="howto/auth.html">Authentification, autorisation et contr&ocirc;le
      -    d'acc&egrave;s</a>, et plus particuli&egrave;rement &agrave; la section <a
      -    href="howto/auth.html#beyond">Plus loin qu'une simple
      -    autorisation</a> qui explique les nouveaux m&eacute;canismes permettant de
      -    contr&ocirc;ler l'ordre dans lequel les directives d'autorisation sont
      -    appliqu&eacute;es.</p>
      +    href="howto/auth.html">Authentification, autorisation et contrôle
      +    d'accès</a>, et plus particulièrement à la section <a
      +    href="howto/auth.html#beyond">Pour aller plus loin qu'une simple
      +    autorisation</a> qui explique les nouveaux mécanismes permettant de
      +    contrôler l'ordre dans lequel les directives d'autorisation sont
      +    appliquées.</p>
      +
      +    <p>Les directives qui contrôlent la manière dont les modules
      +    d'autorisation réagissent lorsqu'ils ne reconnaissent pas
      +    l'utilisateur authentifié ont été supprimées : elles comprennent les
      +    directives AuthzLDAPAuthoritative, AuthzDBDAuthoritative,
      +    AuthzDBMAuthoritative, AuthzGroupFileAuthoritative,
      +    AuthzUserAuthoritative et AuthzOwnerAuthoritative. Ces directives
      +    ont été remplacées par les directives plus explicites <directive
      +    module="mod_authz_core">RequireAny</directive>, <directive
      +    module="mod_authz_core">RequireNone</directive>, et <directive
      +    module="mod_authz_core">RequireAll</directive>.</p>
      +
      +    <p>Si vous utilisez <module>mod_authz_dbm</module>, vous devez
      +    mettre à jour votre configuration en remplaçant les directives du
      +    style <code>Require group ...</code> par des directives du style
      +    <code>Require dbm-group ...</code>.</p>
       
           <section id="access">
      -      <title>Contr&ocirc;le d'acc&egrave;s</title>
      +      <title>Contrôle d'accès</title>
       
      -      <p>Dans la version 2.2, le contr&ocirc;le d'acc&egrave;s bas&eacute; sur le nom d'h&ocirc;te
      -      du client, son adresse IP, ou d'autres caract&eacute;ristiques de la
      -      requ&ecirc;te &eacute;tait assur&eacute; via les directives <directive
      +      <p>Dans la version 2.2, le contrôle d'accès basé sur le nom d'hôte
      +      du client, son adresse IP, ou d'autres caractéristiques de la
      +      requête était assuré via les directives <directive
             module="mod_access_compat">Order</directive>, <directive
             module="mod_access_compat">Allow</directive>, <directive
             module="mod_access_compat">Deny</directive>, et <directive
             module="mod_access_compat">Satisfy</directive>.</p>
       
      -      <p>Dans la version 2.4, ce contr&ocirc;le d'acc&egrave;s est assur&eacute;, comme tout
      -      contr&ocirc;le d'autorisation, via le nouveau module
      +      <p>Dans la version 2.4, ce contrôle d'accès est assuré, comme tout
      +      contrôle d'autorisation, par le nouveau module
             <module>mod_authz_host</module>. Bien que le module
      -      <module>mod_access_compat</module> soit fourni &agrave; des fins de
      -      compatibilit&eacute; avec les anciennes configurations, les anciennes
      -      directives de contr&ocirc;le d'acc&egrave;s devront &ecirc;tre remplac&eacute;es par les
      -      nouveaux m&eacute;canismes d'authentification.</p>
      -
      -      <p>Voici quelques exemples de contr&ocirc;le d'acc&egrave;s avec l'ancienne et
      -      la nouvelle m&eacute;thode :</p>
      +      <module>mod_access_compat</module> soit fourni à des fins de
      +      compatibilité avec les anciennes configurations, les anciennes
      +      directives de contrôle d'accès devront être remplacées par les
      +      nouveaux mécanismes d'authentification.</p>
       
      -      <p>Dans cet exemple, toutes les requ&ecirc;tes sont rejet&eacute;es :</p>
      +      <note><title>Mélanger anciennes et nouvelles directives</title>
      +      <p>Mélanger d'anciennes directives comme <directive
      +      module="mod_access_compat">Order</directive>, <directive
      +      module="mod_access_compat">Allow</directive> ou <directive
      +      module="mod_access_compat">Deny</directive> avec des nouvelles comme
      +      <directive module="mod_authz_core">Require</directive> est techniquement
      +      possible mais déconseillé. En effet, <module>mod_access_compat</module> a
      +      été conçu pour supporter des configurations ne contenant que des anciennes
      +      directives afin de faciliter le passage à la version 2.4. Les
      +      exemples ci-dessous vous permettront de vous faire une meilleure idée des
      +      problèmes qui peuvent survenir.
      +      </p>
      +      </note>
      +
      +      <p>Voici quelques exemples de contrôle d'accès avec l'ancienne et
      +      la nouvelle méthode :</p>
      +
      +      <p>Dans cet exemple, toutes les requêtes sont rejetées :</p>
             <example>
               <title>version 2.2 :</title>
      -        Order deny,allow<br />
      -        Deny from all
      +        <highlight language="config">
      +Order deny,allow
      +Deny from all
      +        </highlight>
             </example>
             <example>
               <title>version 2.4 :</title>
      +	<highlight language="config">
               Require all denied
      +	</highlight>
             </example>
       
      -      <p>Dans cet exemple, toutes les requ&ecirc;tes sont accept&eacute;es :</p>
      +      <p>Dans cet exemple, toutes les requêtes sont acceptées :</p>
             <example>
               <title>version 2.2 :</title>
      -        Order allow,deny<br />
      -        Allow from all
      +        <highlight language="config">
      +Order allow,deny
      +Allow from all
      +        </highlight>
             </example>
             <example>
               <title>version 2.4 :</title>
      +	<highlight language="config">
               Require all granted
      +	</highlight>
             </example>
       
      -      <p>Dans l'exemple suivant, tous les h&ocirc;tes du domaine example.org
      -      ont l'autorisation d'acc&egrave;s, tous les autres sont rejet&eacute;s :</p>
      +      <p>Dans l'exemple suivant, tous les hôtes du domaine example.org
      +      ont l'autorisation d'accès, tous les autres sont rejetés :</p>
       
             <example>
               <title>version 2.2 :</title>
      -        Order Deny,Allow<br />
      -        Deny from all<br />
      -        Allow from example.org
      +        <highlight language="config">
      +Order Deny,Allow
      +Deny from all
      +Allow from example.org
      +        </highlight>
             </example>
             <example>
               <title>version 2.4 :</title>
      +	<highlight language="config">
               Require host example.org
      +	</highlight>
             </example>
      +    <p>Dans l'exemple suivant, tous les hôtes du domaine example.org
      +      ont l'autorisation d'accès, tous les autres sont rejetés :</p>
      +
      +      <example>
      +        <title>version 2.2 :</title>
      +        <highlight language="config">
      +Order Deny,Allow
      +Deny from all
      +Allow from example.org
      +        </highlight>
      +      </example>
      +      <example>
      +        <title>version 2.4 :</title>
      +	<highlight language="config">
      +        Require host example.org
      +	</highlight>
      +      </example>
      +
      +      <p>Dans l'exemple suivant, le mélange d'anciennes et de nouvelles
      +      directives produit des résultats inattendus.</p>
      + 
      +      <example>
      +        <title>Mélange d'anciennes et de nouvelles directives : RESULTAT
      +	INATTENDU</title>
      +          <highlight language="config">
      +DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Order deny,allow
      +    Deny from all
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Require 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 403 127.0.0.1
      +error.log - AH01797: client denied by server configuration: /var/www/html/server-status
      +          </highlight>
      +      </example>
      +      <p>Pourquoi httpd interdit l'accès à server-status alors que la
      +      configuration semble l'autoriser ? Parce que dans ce scénario de <a
      +      href="sections.html#merging">fusion</a> de configuration, les
      +      directives de <module>mod_access_compat</module> sont prioritaires par
      +      rapport à celles de <module>mod_authz_host</module>.</p>
      +
      +      <p>L'exemple suivant quant à lui produit un résultat conforme :</p>
      +
      +      <example>
      +        <title>Mélange d'anciennes et de nouvelles directives : RESULTAT
      +	CONFORME</title>
      +        <highlight language="config">
      +DocumentRoot "/var/www/html"
      +
      +&lt;Directory "/"&gt;
      +    AllowOverride None
      +    Require all denied
      +&lt;/Directory&gt;
      +
      +&lt;Location "/server-status"&gt;
      +    SetHandler server-status
      +    Order deny,allow
      +    Deny from all
      +    Allow From 127.0.0.1
      +&lt;/Location&gt;
      +
      +access.log - GET /server-status 200 127.0.0.1
      +        </highlight>
      +      </example> 
      +      <p>En conclusion, même si une configuration hybride peut fonctionner,
      +      essayez de l'éviter lors de la mise à jour : soit conservez les anciennes
      +      directives, puis migrez-les vers les nouvelles ultérieurement, soit
      +      effectuez une migration immédiate de toutes les anciennes directives vers
      +      les nouvelles.  
      +      </p>      
           </section>
       
           </section>
      @@ -173,110 +299,155 @@ n&eacute;cessiter une mise &agrave; jour des fichiers de configuration de la ver
           <section id="config">
             <title>Autres changements dans la configuration</title>
       
      -      <p>D'autres ajustements mineurs peuvent s'av&eacute;rer n&eacute;cessaires pour
      -      certaines configurations particuli&egrave;res, comme d&eacute;crit ci-dessous.</p>
      +      <p>D'autres ajustements mineurs peuvent s'avérer nécessaires pour
      +      certaines configurations particulières, comme décrit ci-dessous.</p>
       
             <ul>
      -        <li><directive>MaxRequestsPerChild</directive> a &eacute;t&eacute; renomm&eacute;e en
      +        <li>La directive <directive>MaxRequestsPerChild</directive> a été renommée en
       	<directive module="mpm_common">MaxConnectionsPerChild</directive>;
      -	ce nouveau nom refl&egrave;te mieux l'usage de cette directive.
      -	L'ancien nom est encore support&eacute;.</li>
      +	ce nouveau nom reflète mieux l'usage de cette directive.
      +	L'ancien nom est encore supporté.</li>
       
       	<li>La directive <directive>MaxClients</directive> a
      -	&eacute;t&eacute; renomm&eacute;e en <directive
      +	été renommée en <directive
       	module="mpm_common">MaxRequestWorkers</directive>; ce nouveau
      -	nom refl&egrave;te mieux l'usage de cette directive. Pour les
      +	nom reflète mieux l'usage de cette directive. Pour les
       	modules multiprocessus asynchrones, comme <module>event</module>, le nombre
      -	maximal de clients n'est pas &eacute;quivalent au nombre de threads du
      -	worker. L'ancien nom est encore support&eacute;.</li>
      +	maximal de clients n'est pas équivalent au nombre de threads du
      +	worker. L'ancien nom est encore supporté.</li>
       
               <li>La directive <directive
       	module="core">DefaultType</directive> ne produit plus aucun
      -	effet, si ce n'est d'&eacute;mettre un avertissement si elle est
      -	d&eacute;finie &agrave; une valeur autre que <code>none</code>. D'autres
      +	effet, si ce n'est d'émettre un avertissement si elle est
      +	définie à une valeur autre que <code>none</code>. D'autres
       	directives de configuration la remplacent dans la version 2.4.
               </li>
       
      -	<li>La valeur par d&eacute;faut de la directive <directive
      +	<li>La valeur par défaut de la directive <directive
      +	module="core">AllowOverride</directive> est maintenant
      +	<code>None</code>.</li>
      +
      +	<li>La valeur par défaut de la directive <directive
       	module="core">EnableSendfile</directive> est maintenant Off.</li>
       
      -        <li><module>mod_log_config</module>: <a
      -        href="modules/mod_log_config.html#formats">${cookie}C</a>
      -        correspond au nom du cookie dans son ensemble, alors qu'avant,
      -	toute sous-cha&icirc;ne pouvait correspondre.</li>
      +	<li>La valeur par défaut de la directive <directive
      +	module="core">FileETag</directive> est maintenant "MTime Size"
      +	(sans INode).</li>
       
               <li><module>mod_dav_fs</module>: le format du fichier <directive
      -	module="mod_dav_fs">DavLockDB</directive> a chang&eacute; pour les syst&egrave;mes
      +	module="mod_dav_fs">DavLockDB</directive> a changé pour les systèmes
       	avec inodes. L'ancien fichier <directive
      -	module="mod_dav_fs">DavLockDB</directive> doit &ecirc;tre supprim&eacute; dans le
      -	cadre de la mise &agrave; jour.
      +	module="mod_dav_fs">DavLockDB</directive> doit être supprimé dans le
      +	cadre de la mise à jour.
               </li>
       
               <li>La directive <directive module="core">KeepAlive</directive>
       	n'accepte que les valeurs <code>On</code> ou <code>Off</code>.
      -	Avant, toute valeur autre que "Off" ou "0" &eacute;tait trait&eacute;e comme
      +	Avant, toute valeur autre que "Off" ou "0" était traitée comme
       	"On".</li>
       
               <li>Les directives AcceptMutex, LockFile, RewriteLock, SSLMutex,
      -	SSLStaplingMutex et WatchdogMutexPath ont &eacute;t&eacute; remplac&eacute;es par la
      +	SSLStaplingMutex et WatchdogMutexPath ont été remplacées par la
       	directive unique <directive module="core">Mutex</directive>.
      -	Vous devez &eacute;valuer l'impact de ces directives obsol&egrave;tes dans
      -	votre configuration version 2.2 afin de d&eacute;terminer si elles
      -	peuvent &ecirc;tre simplement supprim&eacute;es, ou si elles doivent &ecirc;tre
      -	remplac&eacute;es par la directive <directive
      +	Vous devez évaluer l'impact de ces directives obsolètes dans
      +	votre configuration version 2.2 afin de déterminer si elles
      +	peuvent être simplement supprimées, ou si elles doivent être
      +	remplacées par la directive <directive
       	module="core">Mutex</directive>.</li>
       
               <li><module>mod_cache</module>: la directive <directive
       	module="mod_cache">CacheIgnoreURLSessionIdentifiers</directive>
      -	effectue maintenant une correspondance exacte dans la cha&icirc;ne de
      -	param&egrave;tres au lieu d'une correspondance partielle. Si votre
      -	configuration mettait en jeu des sous-cha&icirc;nes comme
      -	<code>sessionid</code> pour correspondre &agrave;
      +	effectue maintenant une correspondance exacte dans la chaîne de
      +	paramètres au lieu d'une correspondance partielle. Si votre
      +	configuration mettait en jeu des sous-chaînes comme
      +	<code>sessionid</code> pour correspondre à
       	<code>/une-application/image.gif;jsessionid=123456789</code>,
      -	vous devez maintenant utiliser la cha&icirc;ne de correspondance
      -	compl&egrave;te <code>jsessionid</code>.
      +	vous devez maintenant utiliser la chaîne de correspondance
      +	complète <code>jsessionid</code>.
               </li>
       
      +	<li><module>mod_cache</module>: le second paramètre de la
      +	directive <directive module="mod_cache">CacheEnable</directive>
      +	ne concerne les contenus en mandat direct que s'ils débutent par
      +	le protocole approprié. Dans les versions 2.2 et antérieures, un
      +	paramètre tel que '/' concernait tous les contenus.</li>
      +
               <li><module>mod_ldap</module>: la directive <directive
       	module="mod_ldap">LDAPTrustedClientCert</directive> s'utilise
       	maintenant exclusivement au sein d'une configuration de niveau
      -	r&eacute;pertoire. Si vous utilisez cette directive, passez en revue
      -	votre configuration pour vous assurer qu'elle est bien pr&eacute;sente
      -	dans tous les contextes de r&eacute;pertoire n&eacute;cessaires.</li>
      +	répertoire. Si vous utilisez cette directive, passez en revue
      +	votre configuration pour vous assurer qu'elle est bien présente
      +	dans tous les contextes de répertoire nécessaires.</li>
       
       	<li><module>mod_filter</module>: la syntaxe de la directive
       	<directive module="mod_filter">FilterProvider</directive> utilise
      -	maintenant une expression bool&eacute;enne pour d&eacute;terminer si un filtre
      +	maintenant une expression booléenne pour déterminer si un filtre
       	s'applique.
               </li>
       
       	<li><module>mod_include</module>:
                   <ul>
      -            <li>L'&eacute;l&eacute;ment <code>#if expr</code> utilise maintenant le
      -	    nouvel <a href="expr.html">interpr&eacute;teur d'expressions</a>.
      -	    L'ancienne syntaxe peut &ecirc;tre r&eacute;activ&eacute;e via la directive
      +            <li>L'élément <code>#if expr</code> utilise maintenant le
      +	    nouvel <a href="expr.html">interpréteur d'expressions</a>.
      +	    L'ancienne syntaxe peut être réactivée via la directive
       	    <directive
       	    module="mod_include">SSILegacyExprParser</directive>.
                   </li>
      -            <li>Dans la port&eacute;e du r&eacute;pertoire, une directive de
      -	    configuration SSI* ne provoque plus la r&eacute;initialisation &agrave;
      -	    leur valeur par d&eacute;faut de toutes les directives SSI* de
      -	    niveau r&eacute;pertoire.</li>
      +            <li>Dans la portée du répertoire, une directive de
      +	    configuration SSI* ne provoque plus la réinitialisation à
      +	    leur valeur par défaut de toutes les directives SSI* de
      +	    niveau répertoire.</li>
                   </ul>
               </li>
       
               <li><module>mod_charset_lite</module> : l'option
      -	<code>DebugLevel</code> a &eacute;t&eacute; supprim&eacute;e en faveur d'une
      +	<code>DebugLevel</code> a été supprimée en faveur d'une
       	configuration de la directive <directive
      -	module="core">LogLevel</directive> au niveau r&eacute;pertoire.
      +	module="core">LogLevel</directive> au niveau répertoire.
               </li>
       
      -        <li><module>mod_ext-filter</module> : l'option
      -	<code>DebugLevel</code> a &eacute;t&eacute; supprim&eacute;e en faveur d'une
      +        <li><module>mod_ext_filter</module> : l'option
      +	<code>DebugLevel</code> a été supprimée en faveur d'une
       	configuration de la directive <directive
      -	module="core">LogLevel</directive> au niveau r&eacute;pertoire.
      +	module="core">LogLevel</directive> au niveau répertoire.
      +        </li>
      +
      +	<li><module>mod_proxy_scgi</module>: certaines applications web
      +	ne fonctionneront plus correctement avec la nouvelle
      +	configuration de <code>PATH_INFO</code> qui est différente de
      +	celle de la version 2.2. La configuration
      +	précédente peut être
      +	restaurée en définissant la variable
      +	<code>proxy-scgi-pathinfo</code>.</li>
      +
      +	<li><module>mod_ssl</module>: le contrôle de révocation des
      +	certificats basé sur les CRL doit être maintenant explicitement
      +	configuré via la directive <directive
      +        module="mod_ssl">SSLCARevocationCheck</directive>.
               </li>
       
      +        <li><module>mod_substitute</module>: la taille maximale d'une
      +	ligne est maintenant 1Mo.
      +        </li>
      +
      +        <li><module>mod_reqtimeout</module>: si ce module est chargé, il
      +	définit maintenant certains temps d'attente par défaut.</li>
      +
      +	<li><module>mod_dumpio</module>: la directive
      +	<directive>DumpIOLogLevel</directive> n'est plus supportée. Les
      +	données sont toujours enregistrées au niveau <code>trace7</code>
      +	de <directive module="core">LogLevel</directive></li>
      +
      +        <li>Jusqu'à la version 2.2, sur les plateformes de style Unix, 
      +	les commandes de redirection des logs définies via <directive
      +	module="core">ErrorLog</directive> ou <directive
      +	module="mod_log_config">CustomLog</directive> étaient invoquées
      +	en utilisant <code>/bin/sh -c</code>. A
      +	partir de la version 2.4, les commandes de redirection des logs
      +	sont exécutées directement. Pour retrouver l'ancien
      +	comportement, voir la <a href="logs.html#piped">documentation
      +	sur la redirection des logs</a></li>
      +
           </ul>
           </section>
         </section>
      @@ -286,37 +457,59 @@ n&eacute;cessiter une mise &agrave; jour des fichiers de configuration de la ver
       
           <ul>
             <li><module>mod_auto_index</module>: extrait maintenant les titres
      -      et affiche la description pour les fichiers .xhtml qui &eacute;taient
      -      jusqu'alors ignor&eacute;s.</li>
      +      et affiche la description pour les fichiers .xhtml qui étaient
      +      jusqu'alors ignorés.</li>
       
      -      <li><module>mod_ssl</module> : le format par d&eacute;faut des variables
      -      <code>*_DN</code> a chang&eacute;. Il est cependant encore possible
      +      <li><module>mod_ssl</module> : le format par défaut des variables
      +      <code>*_DN</code> a changé. Il est cependant encore possible
             d'utiliser l'ancien format via la nouvelle option
             <code>LegacyDNStringFormat</code> de la directive <directive
      -      module="mod_ssl">SSLOptions</directive>.</li>
      +      module="mod_ssl">SSLOptions</directive>. Le protocole SSLv2 n'est
      +      plus supporté. Les directives <directive
      +      module="mod_ssl">SSLProxyCheckPeerCN</directive> et
      +      <directive module="mod_ssl">SSLProxyCheckPeerExpire</directive>
      +      sont maintenant définies par défaut à On, et les requêtes mandatées
      +      vers des serveurs HTTPS possèdant des certificats non conformes ou
      +      périmés échoueront donc avec un code d'erreur 502 (Bad gateway).</li>
       
      -      <li><program>htpasswd</program> utilise maintenant par d&eacute;faut les
      -      condens&eacute;s MD5 sur toutes les plates-formes.</li>
      +      <li><program>htpasswd</program> utilise maintenant par défaut les
      +      condensés MD5 sur toutes les plates-formes.</li>
       
             <li>La directive <directive
             module="core">NameVirtualHost</directive> n'a plus aucun effet, si
      -      ce n'est l'&eacute;mission d'un avertissement. Toute combinaison
      +      ce n'est l'émission d'un avertissement. Toute combinaison
             adresse/port apparaissant dans plusieurs serveurs virtuels est
      -      trait&eacute;e implicitement comme un serveur virtuel bas&eacute; sur le nom.
      +      traitée implicitement comme un serveur virtuel basé sur le nom.
             </li>
       
             <li><module>mod_deflate</module> n'effectue plus de compression
      -      s'il s'aper&ccedil;oit que la quantit&eacute; de donn&eacute;es ajout&eacute;e par la
      -      compression est sup&eacute;rieure &agrave; la quantit&eacute; de donn&eacute;es &agrave; compresser.
      +      s'il s'aperçoit que la quantité de données ajoutée par la
      +      compression est supérieure à la quantité de données à compresser.
             </li>
       
             <li>Les pages d'erreur multilingues de la version 2.2.x ne
      -      fonctionneront qu'apr&egrave;s avoir &eacute;t&eacute; corrig&eacute;es pour
      -      respecter la nouvelle syntaxe de l'&eacute;l&eacute;ment <code>#if expr=</code>
      +      fonctionneront qu'après avoir été corrigées pour
      +      respecter la nouvelle syntaxe de l'élément <code>#if expr=</code>
             du module <module>mod_include</module>, ou si la directive
             <directive module="mod_include">SSILegacyExprParser</directive> a
      -      &eacute;t&eacute; activ&eacute;e pour le r&eacute;pertoire contenant les pages d'erreur.
      +      été activée pour le répertoire contenant les pages d'erreur.
      +      </li>
      +
      +      <li>La fonctionnalité fournie par <code>mod_authn_alias</code>
      +      dans les précédentes versions (en fait la directive
      +      <directive module="mod_authn_core">AuthnProviderAlias</directive>)
      +      est maintenant fournie par <module>mod_authn_core</module>.  
             </li>
      +
      +      <li>Les directives RewriteLog et RewriteLogLevel ont été
      +      supprimées. Leur fonctions sont maintenant assurées par la
      +      directive <directive
      +      module="core">LogLevel</directive> qui permet de définir
      +      un niveau de journalisation approprié pour le module
      +      <module>mod_rewrite</module>. Voir aussi la section <a
      +      href="mod/mod_rewrite.html#logging">journalisation de
      +      mod_rewrite</a>.</li>
      +
           </ul>
       
           </section>
      @@ -324,18 +517,18 @@ n&eacute;cessiter une mise &agrave; jour des fichiers de configuration de la ver
         <section id="third-party">
           <title>Modules tiers</title>
       
      -	<p>Tous les modules tiers doivent &ecirc;tre recompil&eacute;s pour la
      -	version 2.4 avant d'&ecirc;tre charg&eacute;s.</p>
      +	<p>Tous les modules tiers doivent être recompilés pour la
      +	version 2.4 avant d'être chargés.</p>
       
      -    <p>De nombreux modules tiers con&ccedil;us pour la version 2.2
      +    <p>De nombreux modules tiers conçus pour la version 2.2
           fonctionneront sans changement avec le serveur HTTP Apache
      -    version 2.4. Certains n&eacute;cessiterons cependant des modifications ; se
      -    reporter &agrave; la vue d'ensemble <a
      -    href="developer/new_api_2_4.html">Mise &agrave; jour de l'API</a>.</p>
      +    version 2.4. Certains nécessiteront cependant des modifications ; se
      +    reporter à la vue d'ensemble <a
      +    href="developer/new_api_2_4.html">Mise à jour de l'API</a>.</p>
         </section>
       <section id="commonproblems">
      -    <title>Probl&egrave;mes de mise &agrave; jour courants</title>
      -    <ul><li>Erreurs au d&eacute;marrage :
      +    <title>Problèmes de mise à jour courants</title>
      +    <ul><li>Erreurs au démarrage :
           <ul>
             <li><code>Invalid command 'User', perhaps misspelled or defined by
             a module not included in the server configuration</code> - chargez
      @@ -345,32 +538,30 @@ n&eacute;cessiter une mise &agrave; jour des fichiers de configuration de la ver
             by a module not included in the server configuration</code>, ou
             <code>Invalid command 'Order', perhaps misspelled or defined by a
             module not included in the server configuration</code> - chargez
      -      le module <module>mod_access_compat</module>, ou mettez &agrave; jour
      +      le module <module>mod_access_compat</module>, ou mettez à jour
             vers la version 2.4 les directives d'autorisation.</li>
      -      <li><code>mixing * ports and non-* ports with a NameVirtualHost address is not supported</code>, <code>Either NameVirtualHost w.x.y.z:n has no VirtualHosts, or there is more than one identical NameVirtualHost line, or your VirtualHost declarations do not match the NameVirtualHost line</code> - ces messages ne sont pas nouveaux, mais ils bloquent d&eacute;sormais le d&eacute;marrage en g&eacute;n&eacute;rant une erreur</li>
      -
      -      <li><code>_default_ is not allowed in NameVirtualHost directive</code> - ceci a toujours &eacute;t&eacute; le cas, mais &agrave; pr&eacute;sent cette erreur bloque le d&eacute;marrage du serveur.</li>
       
             <li><code>Ignoring deprecated use of DefaultType in line NN of
             /path/to/httpd.conf</code> - supprimez la directive <directive
             module="core">DefaultType</directive> et remplacez-la par les
      -      directives de configuration appropri&eacute;es.</li>
      -      <li><code>mixing * ports and non-* ports with a NameVirtualHost
      -      address is not supported</code>, <code>Either NameVirtualHost
      -      w.x.y.z:n has no VirtualHosts, or there is more than one identical
      -      NameVirtualHost line, or your VirtualHost declarations do not
      -      match the NameVirtualHost line</code> -
      -      ce ne sont pas des nouveaux messages, mais ils emp&ecirc;chent
      -      maintenant le serveur de d&eacute;marrer</li>
      -      <li><code>_default_ is not allowed in NameVirtualHost
      -      directive</code> - l'explication est dans le message ; cette
      -      d&eacute;finition n'a jamais &eacute;t&eacute; valide, mais elle emp&ecirc;che maintenant le
      -      serveur de d&eacute;marrer.</li>
      +      directives de configuration appropriées.</li>
      +
      +      <li><code>Invalid command 'AddOutputFilterByType', perhaps misspelled 
      +      or defined by a module not included in the server configuration
      +      </code> - la directive <directive
      +      module="mod_filter">AddOutputFilterByType</directive> qui était
      +      jusqu'alors implémentée par le module core, l'est maintenant par
      +      le module mod_filter, qui doit donc être chargé.</li>
      +
           </ul></li>
      -    <li>Erreurs de traitement des requ&ecirc;tes :
      +    <li>Erreurs de traitement des requêtes :
           <ul>
             <li><code>configuration error:  couldn't check user: /path</code> -
             chargez le module <module>mod_authn_core</module>.</li>
      +      <li>Les fichiers <code>.htaccess</code> ne sont pas traités -
      +      Vérifiez la présence d'une directive <directive
      +      module="core">AllowOverride</directive> appropriée ; sa valeur par
      +      défaut est maintenant <code>None</code>.</li>
           </ul>
           </li>
       </ul>
      diff --git a/docs/manual/upgrading.xml.meta b/docs/manual/upgrading.xml.meta
      index aba29996bbd..1d2a68a225a 100644
      --- a/docs/manual/upgrading.xml.meta
      +++ b/docs/manual/upgrading.xml.meta
      @@ -8,6 +8,6 @@
       
         <variants>
           <variant>en</variant>
      -    <variant>fr</variant>
      +    <variant outdated="yes">fr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en
      index ce96c3de461..083830a309a 100644
      --- a/docs/manual/urlmapping.html.en
      +++ b/docs/manual/urlmapping.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Mapping URLs to Filesystem Locations - Apache HTTP Server</title>
      +<title>Mapping URLs to Filesystem Locations - Apache HTTP Server Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Mapping URLs to Filesystem Locations</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Mapping URLs to Filesystem Locations</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="./en/urlmapping.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -38,12 +43,12 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#rewrite">Rewriting Engine</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#other">Other URL Mapping Modules</a></li>
      -</ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="related" id="related">Related Modules and Directives</a></h2>
       
      -<table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
      +<table class="related"><tr><th>Related Modules</th><th>Related Directives</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="documentroot" id="documentroot">DocumentRoot</a></h2>
      @@ -63,6 +68,25 @@
           in the file <code>/var/www/html/fish/guppies.html</code> being
           served to the requesting client.</p>
       
      +    <p>If a directory is requested (i.e. a path ending with
      +    <code>/</code>), the file served from that directory is defined by
      +    the <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> directive.
      +    For example, if <code>DocumentRoot</code> were set as above, and 
      +    you were to set:</p>
      +
      +    <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div>
      +
      +    <p>Then a request for <code>http://www.example.com/fish/</code> will
      +    cause httpd to attempt to serve the file
      +    <code>/var/www/html/fish/index.html</code>. In the event that
      +    that file does not exist, it will next attempt to serve the file
      +    <code>/var/www/html/fish/index.php</code>.</p>
      +
      +    <p>If neither of these files existed, the next step is to
      +    attempt to provide a directory index, if
      +    <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> is loaded and configured to permit
      +    that.</p>
      +
           <p>httpd is also capable of <a href="vhosts/">Virtual
           Hosting</a>, where the server receives requests for more than one
           host. In this case, a different <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> can be specified for each
      @@ -91,7 +115,8 @@
           <p>Alternatively, the <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> directive will map any part
           of the filesystem into the web space. For example, with</p>
       
      -<div class="example"><p><code>Alias /docs /var/web</code></p></div>
      +<pre class="prettyprint lang-config">Alias "/docs" "/var/web"</pre>
      +
       
           <p>the URL <code>http://www.example.com/docs/dir/file.html</code>
           will be served from <code>/var/web/dir/file.html</code>. The
      @@ -106,8 +131,8 @@
           expression</a> based matching and substitution. For
           example,</p>
       
      -<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</code></p></div>
      +    <pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)"   "/home/$1/cgi-bin/$2"</pre>
      +
       
           <p>will map a request to
           <code>http://example.com/~user/cgi-bin/script.cgi</code> to the
      @@ -153,8 +178,8 @@
           <code>/home/user/public_html/file.html</code>, use the following
           <code>AliasMatch</code> directive:</p>
       
      -<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
      -      /home/$1/public_html/$3</code></p></div>
      +    <pre class="prettyprint lang-config">AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="redirect" id="redirect">URL Redirection</a></h2>
      @@ -171,8 +196,8 @@
           to the new directory <code>/bar/</code>, you can instruct clients
           to request the content at the new location as follows:</p>
       
      -<div class="example"><p><code>Redirect permanent /foo/
      -      http://www.example.com/bar/</code></p></div>
      +    <pre class="prettyprint lang-config">Redirect permanent "/foo/"   "http://www.example.com/bar/"</pre>
      +
       
           <p>This will redirect any URL-Path starting in
           <code>/foo/</code> to the same URL path on the
      @@ -185,14 +210,14 @@
           for the site home page to a different site, but leave all other
           requests alone, use the following configuration:</p>
       
      -<div class="example"><p><code>RedirectMatch permanent ^/$
      -      http://www.example.com/startpage.html</code></p></div>
      +    <pre class="prettyprint lang-config">RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"</pre>
      +
       
           <p>Alternatively, to temporarily redirect all pages on one site
           to a particular page on another site, use the following:</p>
       
      -<div class="example"><p><code>RedirectMatch temp .*
      -      http://othersite.example.com/startpage.html</code></p></div>
      +    <pre class="prettyprint lang-config">RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="proxy" id="proxy">Reverse Proxy</a></h2>
      @@ -210,12 +235,11 @@ the <code>/bar/</code> directory on <code>internal.example.com</code>
       and returns them to the client as if they were from the local
       server.</p>
       
      -<div class="example"><p><code>
      -ProxyPass /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
      -ProxyPassReverseCookiePath /foo/ /bar/
      -</code></p></div>
      +<pre class="prettyprint lang-config">ProxyPass "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverseCookieDomain internal.example.com public.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre>
      +
       
       <p>The <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> configures
       the server to fetch the appropriate documents, while the
      @@ -234,13 +258,13 @@ breaking out of the proxy server and requesting directly from
       content) in a page as it is being served to the client using
       <code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>.</p>
       
      -<div class="example"><p><code>
      -Substitute s/internal\.example\.com/www.example.com/i
      -</code></p></div>
      +<pre class="prettyprint lang-config">Substitute "s/internal\.example\.com/www.example.com/i"</pre>
      +
       
      -<p>Additionally, a third-party module,
      -<a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>,
      -is available to rewrite links in HTML and XHTML.</p>
      +<p>For more sophisticated rewriting of links in HTML and XHTML, the 
      +<code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> module is also available. It allows you
      +to create maps of URLs that need to be rewritten, so that complex
      +proxying scenarios can be handled.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="rewrite" id="rewrite">Rewriting Engine</a></h2>
      @@ -291,8 +315,8 @@ is available to rewrite links in HTML and XHTML.</p>
       
           <p><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> provides <code class="directive"><a href="./mod/mod_dir.html#fallbackresource">FallbackResource</a></code>, which can be used to map virtual
           URIs to a real resource, which then serves them. This is a very
      -    useful replace to <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> when implementing
      -    a 'front controler'</p>
      +    useful replacement for <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> when implementing
      +    a 'front controller'</p>
       
           <p>If all attempts to locate the content fail, httpd returns
           an error page with HTTP status code 404 (file not found). The
      @@ -328,7 +352,28 @@ is available to rewrite links in HTML and XHTML.</p>
       <a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossary</a> | <a href="./sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/urlmapping.html.fr b/docs/manual/urlmapping.html.fr
      index e9473928af1..163e72ed4ef 100644
      --- a/docs/manual/urlmapping.html.fr
      +++ b/docs/manual/urlmapping.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title> Mise en correspondance des URLs avec le systme de fichiers - Serveur Apache HTTP</title>
      +<title> Mise en correspondance des URLs avec le systme de fichiers - Serveur Apache HTTP Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1> Mise en correspondance des URLs avec le systme de fichiers</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1> Mise en correspondance des URLs avec le systme de fichiers</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -40,12 +45,12 @@ l'arborescence DocumentRoot</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#notfound">Fichier non trouv (File Not Found)</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#other">Autres modules de mise en correspondance des
       URLs</a></li>
      -</ul></div>
      +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="related" id="related">Modules et directives concerns</a></h2>
       
      -<table class="related"><tr><th>Modules Apparents</th><th>Directives Apparentes</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
      +<table class="related"><tr><th>Modules Apparents</th><th>Directives Apparentes</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="documentroot" id="documentroot">Racine des documents (DocumentRoot)</a></h2>
      @@ -67,6 +72,27 @@ URLs</a></li>
           <code>http://www.example.com/fish/guppies.html</code> retournera le
           fichier <code>/var/www/html/fish/guppies.html</code> au client.</p>
       
      +    <p>Si la requte concerne un rpertoire (autrement dit un chemin se
      +    terminant par un slash <code>/</code>), le nom du fichier qui sera
      +    recherch et servi depuis ce rpertoire est dfini via la directive
      +    <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code>. Par exemple,
      +    supposons que <code>DocumentRoot</code> ait t dfinie comme
      +    prcdemment, et que vous ayez dfini <code>DirectoryIndex</code>
      +    comme suit :</p>
      +
      +    <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div>
      +
      +    <p>Si httpd reoit alors une requte pour
      +    <code>http://www.example.com/fish/</code>, il tentera de servir le
      +    fichier <code>/var/www/html/fish/index.html</code>. Si ce fichier
      +    n'existe pas, il tentera de servir le fichier
      +    <code>/var/www/html/fish/index.php</code>.</p>
      +
      +    <p>Si aucun de ces fichiers existe, httpd tentera de gnrer et
      +    d'afficher un index du rpertoire,  condition que
      +    <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> ait t charg et configur pour le
      +    permettre.</p>
      +
           <p>httpd supporte aussi les <a href="vhosts/">Htes virtuels</a>,
           ce qui lui permet de traiter des requtes pour plusieurs htes.
           Dans ce cas, un <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code>
      @@ -98,7 +124,8 @@ l'arborescence DocumentRoot</a></h2>
           <p>Une autre mthode consiste  utiliser la directive <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code> pour rattacher toute portion
           du systme de fichiers  l'arborescence du site web. Par exemple, avec</p>
       
      -<div class="example"><p><code>Alias /docs /var/web</code></p></div>
      +<pre class="prettyprint lang-config">Alias "/docs" "/var/web"</pre>
      +
       
           <p>l'URL <code>http://www.example.com/docs/dir/file.html</code>
           correspondra au fichier <code>/var/web/dir/file.html</code>. La
      @@ -114,8 +141,8 @@ l'arborescence DocumentRoot</a></h2>
           sur les <a class="glossarylink" href="./glossary.html#regex" title="voir glossaire">expressions rationnelles</a>.
           Par exemple,</p>
       
      -<div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</code></p></div>
      +<pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"</pre>
      +
       
           <p>fera correspondre une requte du style
           <code>http://example.com/~user/cgi-bin/script.cgi</code> au chemin
      @@ -163,8 +190,8 @@ l'arborescence DocumentRoot</a></h2>
           <code>/home/user/public_html/file.html</code>, utilisez la directive
           <code>AliasMatch</code> suivante :</p>
       
      -<div class="example"><p><code>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
      -      /home/$1/public_html/$3</code></p></div>
      +<pre class="prettyprint lang-config">AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="redirect" id="redirect">Redirection d'URL</a></h2>
      @@ -183,7 +210,8 @@ l'arborescence DocumentRoot</a></h2>
           nouveau rpertoire <code>/bar/</code>, vous pouvez demander aux clients
           de le requrir  sa nouvelle localisation comme suit :</p>
       
      -<div class="example"><p><code>Redirect permanent /foo/ http://www.example.com/bar/</code></p></div>
      +<pre class="prettyprint lang-config">Redirect permanent "/foo/"   "http://www.example.com/bar/"</pre>
      +
       
           <p>Ceci aura pour effet de rediriger tout chemin d'URL commenant par
           <code>/foo/</code> vers le mme chemin d'URL sur le serveur
      @@ -197,14 +225,14 @@ l'arborescence DocumentRoot</a></h2>
           laisser toutes les autres requtes inchanges, utilisez la
           configuration suivante :</p>
       
      -<div class="example"><p><code>RedirectMatch permanent ^/$
      -      http://www.example.com/startpage.html</code></p></div>
      +<pre class="prettyprint lang-config">RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"</pre>
      +
       
           <p>De mme, pour rediriger temporairement toutes les pages d'un site
           vers une page particulire d'un autre site, utilisez ce qui suit :</p>
       
      -<div class="example"><p><code>RedirectMatch temp .*
      -      http://othersite.example.com/startpage.html</code></p></div>
      +<pre class="prettyprint lang-config">RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="proxy" id="proxy">Mandataire inverse (Reverse Proxy)</a></h2>
      @@ -223,12 +251,11 @@ dans le r
       <code>/bar/</code> sur <code>internal.example.com</code>
       et les renvoie au client comme s'ils appartenaient au serveur local.</p>
       
      -<div class="example"><p><code>
      -ProxyPass /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
      -ProxyPassReverseCookiePath /foo/ /bar/
      -</code></p></div>
      +<pre class="prettyprint lang-config">ProxyPass "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverseCookieDomain internal.example.com public.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre>
      +
       
       <p>La directive <code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> configure
       le serveur pour rapatrier les documents appropris, alors que la directive
      @@ -247,13 +274,13 @@ du serveur mandataire et effectuer sa requ
       d'utres contenus) situs dans la page au moment o elle est envoye au
       client en utilisant le module <code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code>.</p>
       
      -<div class="example"><p><code>
      -Substitute s/internal\.example\.com/www.example.com/i
      -</code></p></div>
      +<pre class="prettyprint lang-config">Substitute "s/internal\.example\.com/www.example.com/i"</pre>
      +
       
      -<p>En outre, un module tiers
      -<a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>
      -permet de rcrire les liens dans les documents HTML et XHTML.</p>
      +<p>Le module <code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> rend possible une rcriture plus
      +labore des liens en HTML et XHTML. Il permet de crer des listes
      +d'URLs et de leurs rcritures, de faon  pouvoir grer des scnarios
      +de rcriture complexes.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="rewrite" id="rewrite">Moteur de rcriture</a></h2>
      @@ -348,7 +375,28 @@ URLs</a></h2>
       <a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/">Modules</a> | <a href="./mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">Glossaire</a> | <a href="./sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/urlmapping.html.ja.utf8 b/docs/manual/urlmapping.html.ja.utf8
      index 59d6d6eaddc..2001b915c76 100644
      --- a/docs/manual/urlmapping.html.ja.utf8
      +++ b/docs/manual/urlmapping.html.ja.utf8
      @@ -1,32 +1,38 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>URL からファイルシステム上の位置へのマップ - Apache HTTP サーバ</title>
      +<title>URL からファイルシステム上の位置へのマップ - Apache HTTP サーバ バージョン 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="./">バージョン
      -            2.3</a></div><div id="page-content"><div id="preamble"><h1>URL からファイルシステム上の位置へのマップ</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="./">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>URL からファイルシステム上の位置へのマップ</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="./ja/urlmapping.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
           <p>この文書は Apache がリクエストの URL から送信するファイルの
           ファイルシステム上の位置を決定する方法を説明します。</p>
      @@ -39,7 +45,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#proxy">リバースプロキシ</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#rewrite">リライトエンジン</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li>
      -</ul></div>
      +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="related" id="related">関連するモジュールとディレクティブ</a></h2>
      @@ -280,12 +286,33 @@ ProxyPassReverseCookiePath /foo/ /bar/
           説明されているように、柔軟な設定を行なうことができます。</p>
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="./ja/urlmapping.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="./mod/">モジュール</a> | <a href="./mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html">用語</a> | <a href="./sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/urlmapping.html.ko.euc-kr b/docs/manual/urlmapping.html.ko.euc-kr
      index c8c338e9516..4bff829e27a 100644
      --- a/docs/manual/urlmapping.html.ko.euc-kr
      +++ b/docs/manual/urlmapping.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>URL Ͻý ġ ϱ - Apache HTTP Server</title>
      +<title>URL Ͻý ġ ϱ - Apache HTTP Server Version 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>URL Ͻý ġ ϱ</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="./">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>URL Ͻý ġ ϱ</h1>
       <div class="toplang">
       <p><span> : </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -38,7 +43,7 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#proxy">Ͻ(Reverse Proxy)</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#rewrite">ۼ  (Rewriting Engine)</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#notfound">File Not Found</a></li>
      -</ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="related" id="related">õ  þ</a></h2>
      @@ -245,7 +250,28 @@ ProxyPassReverse /foo/ http://internal.example.com/bar/
       <a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="./faq/">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="./mod/"></a> | <a href="./mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="./glossary.html"></a> | <a href="./sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/urlmapping.html.tr.utf8 b/docs/manual/urlmapping.html.tr.utf8
      index ae7fde4629d..f46e3875d24 100644
      --- a/docs/manual/urlmapping.html.tr.utf8
      +++ b/docs/manual/urlmapping.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>URL’lerin Dosya Sistemi ile Eşleştirilmesi - Apache HTTP Sunucusu</title>
      +<title>URL’lerin Dosya Sistemi ile Eşleştirilmesi - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="./style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="./style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="./style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
      +<script src="./style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="./images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="./faq/">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="./images/feather.gif" /></div>
      +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="./images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="./images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="./">Sürüm 2.3</a></div><div id="page-content"><div id="preamble"><h1>URL’lerin Dosya Sistemi ile Eşleştirilmesi</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="./">Sürüm 2.4</a></div><div id="page-content"><div id="preamble"><h1>URL’lerin Dosya Sistemi ile Eşleştirilmesi</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="./fr/urlmapping.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
      @@ -24,11 +29,10 @@
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
           <p>Bu belgede, bir istekte belirtilen URL’nin sunulacak dosyanın dosya
      -      sistemindeki yerini bulmak için Apache tarafından nasıl kullanıldığı
      -      açıklanmaktadır.</p>
      +      sistemindeki yerini bulmak için Apache HTTP Sunucusu tarafından nasıl
      +      kullanıldığı açıklanmaktadır.</p>
         </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#related">İlgili Modüller ve Yönergeler</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#documentroot"><code>DocumentRoot</code></a></li>
      @@ -38,18 +42,19 @@
       <li><img alt="" src="./images/down.gif" /> <a href="#proxy">Karşı Vekil</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#rewrite">Yeniden Yazma Motoru</a></li>
       <li><img alt="" src="./images/down.gif" /> <a href="#notfound">Dosya orada yok</a></li>
      -</ul></div>
      +<li><img alt="" src="./images/down.gif" /> <a href="#other">Diğer URL Eşleme Modülleri</a></li>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="related" id="related">İlgili Modüller ve Yönergeler</a></h2>
       
      -<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
      +<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code></li><li><code class="module"><a href="./mod/mod_alias.html">mod_alias</a></code></li><li><code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code></li><li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code></li><li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code></li><li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code></li><li><code class="module"><a href="./mod/mod_proxy.html">mod_proxy</a></code></li><li><code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code></li><li><code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code></li><li><code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code></li><li><code class="module"><a href="./mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_speling.html#checkspelling">CheckSpelling</a></code></li><li><code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code></li><li><code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code></li><li><code class="directive"><a href="./mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code></li><li><code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirect">Redirect</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewritecond">RewriteCond</a></code></li><li><code class="directive"><a href="./mod/mod_rewrite.html#rewriterule">RewriteRule</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li><li><code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code></li><li><code class="directive"><a href="./mod/mod_userdir.html#userdir">UserDir</a></code></li></ul></td></tr></table>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="documentroot" id="documentroot"><code>DocumentRoot</code></a></h2>
       
           <p>Yapılan bir isteğe hangi dosyanın sunulacağına karar verirken
      -      Apache’nin öntanımlı davranışı istek için URL yolunu (URL’den konak ismi
      +      httpd’nin öntanımlı davranışı istek için URL yolunu (URL’den konak ismi
             ve port ayrıldıktan sonra kalan kısım) alıp bunu yapılandırma dosyasında
             <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> yönergesi ile
             belirtilen dizinin sonuna eklemektir. Bu nedenle, <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altındaki dizinler ve dosyalar
      @@ -57,11 +62,27 @@
       
           <p>Örneğin, <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> yönergesine
             <code>/var/http/html</code> atanmış olsun.
      -      <code>http://mesela.dom/balıklar/zargana.html</code> şeklindeki bir
      +      <code>http://example.com/balıklar/zargana.html</code> şeklindeki bir
             istek için istemciye <code>/var/http/html/balıklar/zargana.html</code>
             dosyası sunulur.</p>
       
      -    <p>Apache ayrıca, sunucunun birden fazla konak için istek kabul etmesini
      +    <p>Bir dizin istenirse (<code>/</code> ile biten bir yol belirtilmesi
      +      durumu), sunulacak dosya <code class="directive"><a href="./mod/mod_dir.html#directoryindex">DirectoryIndex</a></code> yönergesinde belirtilen dosya olacaktır.
      +      Örneğin, <code>DocumentRoot</code> yukarıdaki gibi belirtimiş ve siz de
      +      şunu belirtmişseniz:</p>
      +
      +    <div class="example"><p><code>DirectoryIndex index.html index.php</code></p></div>
      +
      +    <p><code>http://www.example.com/fish/</code> isteği, httpd'nin
      +      <code>/var/www/html/fish/index.html</code> dosyasını sunmaya, bu dosya
      +      bulunmuyorsa <code>/var/www/html/fish/index.php</code> dosyasını sunmaya
      +      çalışmasına sebep olacaktır.</p>
      +
      +    <p>Bu dosyaların ikisi de bulunmuyorsa sonraki adım,
      +      <code class="module"><a href="./mod/mod_autoindex.html">mod_autoindex</a></code> yüklü ve uygun şekilde yapılandırılmışsa
      +      bir dizin içeriği dosyası sağlamaya çalışmak olacaktır.</p>
      +
      +    <p>httpd ayrıca, sunucunun birden fazla konak için istek kabul etmesini
             sağlayan <a href="vhosts/">sanal barındırmaya</a> da muktedirdir. Bu
             durumda her sanal konak için ayrı bir <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> belirtilebileceği gibi sunulacak içeriğin
             istekte bulunulan IP adresi veya konak ismine dayanarak devingen olarak
      @@ -77,22 +98,23 @@
       <h2><a name="outside" id="outside">Belge Kök Dizini Dışındaki Dosyalar</a></h2>
       
           <p>Bazen dosya sisteminde doğrudan <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altında bulunmayan dosyalara da erişim izni
      -      vermek gerekir. Apache’de bunu sağlamanın çeşitli yolları vardır. Unix
      +      vermek gerekir. httpd’de bunu sağlamanın çeşitli yolları vardır. Unix
             sistemlerinde sembolik bağlar sayesinde dosya sisteminin farklı
             yerlerindeki dosyaları ve dizinleri <code class="directive"><a href="./mod/core.html#documentroot">DocumentRoot</a></code> altındaymış gibi göstermek mümkündür.
             <code class="directive"><a href="./mod/core.html#options">Options</a></code> yönergesine değer olarak
             <code>FollowSymLinks</code> veya <code>SymLinksIfOwnerMatch</code>
      -      atanmadıkça Apache olası güvenlik açıklarına karşı öntanımlı olarak
      +      atanmadıkça httpd olası güvenlik açıklarına karşı öntanımlı olarak
             sembolik bağları izlemez.</p>
       
           <p>Bundan başka, dosya sisteminin farklı parçalarını belge kök dizini
             altında göstermek için <code class="directive"><a href="./mod/mod_alias.html#alias">Alias</a></code>
             yönergesi de kullanılabilir. Örneğin,</p>
       
      -    <div class="example"><p><code>Alias /belgeler /var/http</code></p></div>
      +    <pre class="prettyprint lang-config">Alias "/belgeler" "/var/http"</pre>
      +
       
           <p>yapılandırması ile
      -      <code>http://mesela.dom/belgeler/dizin/dosya.html</code> URL’si için
      +      <code>http://example.com/belgeler/dizin/dosya.html</code> URL’si için
             dosya sistemindeki <code>/var/http/dizin/dosya.html</code> dosyası
             sunulacaktır. Hedef dizindeki dosyaları birer <a class="glossarylink" href="./glossary.html#cgi" title="sözlüğe bakınız">CGI</a> betiği olarak imlemesi dışında <code class="directive"><a href="./mod/mod_alias.html#scriptalias">ScriptAlias</a></code> yönergesi de aynı şekilde
             çalışır.</p>
      @@ -101,10 +123,10 @@
             üzere <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> ve <code class="directive"><a href="./mod/mod_alias.html#scriptaliasmatch">ScriptAliasMatch</a></code> yönergelerinin gücünden
             yararlanılabilir. Örneğin,</p>
       
      -    <div class="example"><p><code>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</code></p></div>
      +    <pre class="prettyprint lang-config">ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"</pre>
      +
       
      -    <p>satırı sayesinde <code>http://mesela.dom/~user/cgi-bin/betik.cgi</code>
      +    <p>satırı sayesinde <code>http://example.com/~user/cgi-bin/betik.cgi</code>
             URL’si <code>/home/user/cgi-bin/betik.cgi</code> dosyası ile
             eşleştirilir ve dosya bir CGI betiği olarak çalıştırılırdı.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      @@ -117,7 +139,7 @@
             üzerinden kullanıcıların ev dizinlerindeki dosyaları kişisel sayfalar
             olarak sunmalarını sağlamak üzere kullanır. Örnek:</p>
       
      -    <div class="example"><p><code>http://mesela.dom/~birisi/dosya.html</code></p></div>
      +    <div class="example"><p><code>http://example.com/~birisi/dosya.html</code></p></div>
       
           <p>Güvenlik sebebiyle kullanıcıların ev dizinlerine doğrudan HTTP erişimi
             vermek uygun olmaz. Bu bakımdan, kullanıcının ev dizini altında HTTP
      @@ -138,18 +160,18 @@
             edebilirler. Bu işlevsellik <code class="module"><a href="./mod/mod_userdir.html">mod_userdir</a></code> tarafından
             desteklenmemektedir. Ancak, kullanıcı dizinleri düzgün şekilde
             yapılandırılmışsa istenen etki <code class="directive"><a href="./mod/mod_alias.html#aliasmatch">AliasMatch</a></code> yönergesi ile sağlanabilir.
      -      Örneğin, <code>http://mesela.dom/sayfalar/birisi/dosya.html</code>
      +      Örneğin, <code>http://example.com/sayfalar/birisi/dosya.html</code>
             URL’si ile <code>/home/birisi/public_html/dosya.html</code> dosyasını
             eşlemek için <code>AliasMatch</code> yönergesi şöyle
             kullanılabilirdi:</p>
       
      -    <div class="example"><p><code>AliasMatch ^/sayfalar/([a-zA-Z0-9]+)/?(.*)
      -          /home/$1/public_html/$2</code></p></div>
      +    <pre class="prettyprint lang-config">AliasMatch "^/sayfalar/([a-zA-Z0-9]+)(/(.*))?$" "/home/$1/public_html/$3"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="redirect" id="redirect">URL Yönlendirme</a></h2>
       
      -    <p>Yukarıdaki bölümlerde açıklanan yapılandırma yönergeleri Apache’ye
      +    <p>Yukarıdaki bölümlerde açıklanan yapılandırma yönergeleri httpd’ye
             içeriği dosya sisteminin belli bir yerinden alıp istemciye göndermesini
             söyler. Bazen istemciye, istediği içeriğe farklı bir URL ile
             erişebileceğini ve bu URL için ayrı bir istek yapması gerektiğini
      @@ -160,34 +182,34 @@
             adında yeni bir dizine taşınması halinde istemciye yeni konumun
             bildirilmesi şöyle sağlanabilirdi:</p>
       
      -    <div class="example"><p><code>Redirect permanent /foo/
      -      http://mesela.dom/bar/</code></p></div>
      +    <pre class="prettyprint lang-config">Redirect permanent "/foo/" "http://example.com/bar/"</pre>
      +
       
           <p>Bu atama sayesinde <code>/foo/</code> ile başlayan URL yolları
      -      <code>mesela.dom</code> sunucundaki <code>/bar/</code> dizini altındaki
      +      <code>example.com</code> sunucundaki <code>/bar/</code> dizini altındaki
             içeriğe yönlendirilmektedir. Yönlendirmeyi aynı sunucu üzerinde yapmak
             zorunda değilsiniz, bu yönerge ile başka bir sunucuya da yönlendirme
             yapabilirsiniz.</p>
       
      -    <p>Apache ayrıca, yeniden yazma ile ilgili daha karmaşık sorunlara çözüm
      +    <p>httpd ayrıca, yeniden yazma ile ilgili daha karmaşık sorunlara çözüm
             olarak <code class="directive"><a href="./mod/mod_alias.html#redirectmatch">RedirectMatch</a></code> diye bir
             yönerge daha sağlar. Örneğin bir sitenin baş sayfasını diğer isteklerden
             ayrı olarak farklı bir siteye yönlendirmek için yönergeyi şöyle
             kullanabilirsiniz:</p>
       
      -    <div class="example"><p><code>RedirectMatch permanent ^/$
      -      http://misal.dom/ilksayfa.html</code></p></div>
      +    <pre class="prettyprint lang-config">RedirectMatch permanent "^/$" "http://example.com/ilksayfa.html"</pre>
      +
       
           <p>Bundan başka, bir sitedeki tüm sayfalara yapılan istekleri başka bir
             siteye geçici olarak yönlendirmek için şöyle bir şey yapabilirsiniz:</p>
       
      -    <div class="example"><p><code>RedirectMatch temp .*
      -      http://mesela.misal.dom/ilksayfa.html</code></p></div>
      +    <pre class="prettyprint lang-config">RedirectMatch temp ".*" "http://mesela.example.com/ilksayfa.html"</pre>
      +
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="proxy" id="proxy">Karşı Vekil</a></h2>
       
      -    <p>Apache ayrıca, uzak sunuculardaki belgelerin yerel sunucunun URL
      +    <p>httpd ayrıca, uzak sunuculardaki belgelerin yerel sunucunun URL
             alanına getirilmesini de mümkün kılar. Bu tekniğe HTTP sunucunun
             belgeleri uzak bir sunucudan alıp istemciye sunmasını sağlayarak bir
             vekil sunucu gibi davranması nedeniyle <em>ters vekalet</em> adı
      @@ -196,19 +218,18 @@
             gibi sunulması nedeniyle bu işlem normal vekaletten farklıdır.</p>
       
           <p>Aşağıdaki örnekte, istemci <code>/foo/</code> dizini altından bir belge
      -      istemekte, sunucu ise bu belgeyi <code>dahili.mesela.dom</code>
      +      istemekte, sunucu ise bu belgeyi <code>dahili.example.com</code>
             üzerindeki <code>/bar/</code> dizininden alıp istemciye yerel sunucudan
             geliyormuş gibi sunmaktadır:</p>
       
      -    <div class="example"><p><code>
      -      ProxyPass /foo/ http://dahili.mesela.dom/bar/<br />
      -      ProxyPassReverse /foo/ http://dahili.mesela.dom/bar/<br />
      -      ProxyPassReverseCookieDomain dahili.mesela.dom harici.mesela.dom<br />
      -      ProxyPassReverseCookiePath /foo/ /bar/
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">ProxyPass "/foo/" "http://dahili.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://dahili.example.com/bar/"
      +ProxyPassReverseCookieDomain dahili.example.com harici.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"</pre>
      +
       
           <p><code class="directive"><a href="./mod/mod_proxy.html#proxypass">ProxyPass</a></code> sunucuyu uygun
      -      belgeleri alması için yapılandırırken <code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> yönergesi <code>dahili.mesela.dom</code>
      +      belgeleri alması için yapılandırırken <code class="directive"><a href="./mod/mod_proxy.html#proxypassreverse">ProxyPassReverse</a></code> yönergesi <code>dahili.example.com</code>
             sunucusundan kaynaklanan yönlendirmeleri yeniden yazar, böylece bunların
             yerel sunucudaki yerleri belirlenmiş olur. Benzer şekilde,  <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiedomain">ProxyPassReverseCookieDomain</a></code> ve
             <code class="directive"><a href="./mod/mod_proxy.html#proxypassreversecookiepath">ProxyPassReverseCookiePath</a></code>
      @@ -216,11 +237,19 @@
       
           <p>Yalnız, belgelerin içindeki hiperbağların yeniden yazılmayacağına
             dikkat ediniz. Dolayısıyla, belge içinde
      -      <code>dahili.mesela.dom</code>’u ismiyle hedef alan mutlak hiperbağlar
      +      <code>dahili.example.com</code>’u ismiyle hedef alan mutlak hiperbağlar
             varsa bunlar istemci tarafından vekil sunucudan değil doğrudan
      -      <code>dahili.mesela.dom</code>’dan istenecektir. Üçüncü parti modüller
      -      arasında HTML ve XHTML’de hiperbağları yeniden yazabilen <a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>
      -      adında bir modül vardır.</p>
      +      <code>dahili.example.com</code>’dan istenecektir. Bir sayfanın içindeki bu
      +      bağları (ve diğer içeriği) <code class="module"><a href="./mod/mod_substitute.html">mod_substitute</a></code> modülü
      +      kullanılarak istemciye sunuluyormuşçasına değiştirebilirsiniz.</p>
      +
      +    <pre class="prettyprint lang-config">Substitute "s/dahili\.example\.com/harici.example.com/i"</pre>
      +
      +
      +     <p>HTML ve XHTML’de hiperbağları daha bilgece yeniden yazabilen
      +      <code class="module"><a href="./mod/mod_proxy_html.html">mod_proxy_html</a></code> modülü de kullanılabilir. Yeniden
      +      yazılması gereken URL eşlemlerini oluşturmanızı sağlar, böylece karmaşık
      +      vekil senaryoları oluşturulabilir.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="rewrite" id="rewrite">Yeniden Yazma Motoru</a></h2>
      @@ -252,8 +281,8 @@
           <p>"Dosya orada yok" ("File Not Found") hatalarının diğer bir bildik
             sebebi de URL’lerin hiperbağlarda veya doğrudan tarayıcıda kasıtlı ya da
             kasıtsız, yanlış yazılmasıdır. Bu tür sorunlarda yardımcı olması için
      -      Apache <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> (sic) adında bir modülle gelir. Bu
      -      modül etkin kılındığında Apache, "Dosya orada yok" ("File Not Found")
      +      httpd <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code> (sic) adında bir modülle gelir. Bu
      +      modül etkin kılındığında htpd, "Dosya orada yok" ("File Not Found")
             hatalarının önünü kesip başka bir yerde benzer isimde bir dosya var mı
             diye bakar. Böyle bir dosya varsa, <code class="module"><a href="./mod/mod_speling.html">mod_speling</a></code>
             istemciye dosyanın doğru yerini bildiren bir HTTP yönlendirmesi yollar.
      @@ -269,11 +298,39 @@
             yönlendirmesine konu olmasına sebep olarak sunucunun yükünü
             arttırabilir.</p>
       
      +    <p><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> modülü sanal URI'leri, onları sunan gerçek
      +      kaynağa eşlemekte kullanılan <code class="directive"><a href="./mod/mod_dir.html#fallbackresource">FallbackResource</a></code> yönergesini içerir. Bir 'ön denetleyici'
      +      gerçeklerken <code class="module"><a href="./mod/mod_rewrite.html">mod_rewrite</a></code> modülünün kullanılmasını
      +      sağlamak için çok kullanışlıdır.</p>
      +
           <p>Yerinde bulunmayan içeriğin bulunması çabalarının tümü Apache’nin 404
             (Dosya orada yok) HTTP durum kodlu bir hata sayfası döndürmesine yol
             açar. Bu sayfanın içeriği <code class="directive"><a href="./mod/core.html#errordocument">ErrorDocument</a></code> yönergesi ile denetlenebilir ve <a href="custom-error.html">Hata Yanıtlarının Kişiselleştirilmesi</a>
             bölümünde anlatıldığı gibi oldukça esnek bir şekilde
             kişiselleştirilebilir.</p>
      +</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
      +<div class="section">
      +<h2><a name="other" id="other">Diğer URL Eşleme Modülleri</a></h2>
      +
      +
      +
      +    <p>URL eşlemede kullanılabilecek diğer modüller:</p>
      +
      +    <ul>
      +    <li><code class="module"><a href="./mod/mod_actions.html">mod_actions</a></code> - Bir isteği, özkaynağın MIME türüne veya
      +      istek yöntemine bakarak bir CGI betiğine eşler.</li>
      +
      +    <li><code class="module"><a href="./mod/mod_dir.html">mod_dir</a></code> - URL'yi sonlandıran bölü çizgisini
      +      <code>index.html</code> bir dosyaya eşler.</li>
      +
      +    <li><code class="module"><a href="./mod/mod_imagemap.html">mod_imagemap</a></code> - Bir isteği, bir HTML belge içindeki
      +      bir resme yapılan kullanıcı tıklamalarına dayanarak bir URL'ye
      +      eşler.</li>
      +
      +    <li><code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> - Dil veya içerik sıkıştırması gibi
      +      kullanıcı tercihlerine dayanarak uygun bir belgeyi seçer.</li>
      +    </ul>
      +
       </div></div>
       <div class="bottomlang">
       <p><span>Mevcut Diller: </span><a href="./en/urlmapping.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -281,7 +338,28 @@
       <a href="./ja/urlmapping.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="./ko/urlmapping.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="./tr/urlmapping.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="./faq/">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="./images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/urlmapping.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="./mod/">Modüller</a> | <a href="./mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="./glossary.html">Terimler</a> | <a href="./sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/urlmapping.xml b/docs/manual/urlmapping.xml
      index b061ef5f1d6..8e46df39110 100644
      --- a/docs/manual/urlmapping.xml
      +++ b/docs/manual/urlmapping.xml
      @@ -36,6 +36,7 @@
       <modulelist>
       <module>mod_actions</module>
       <module>mod_alias</module>
      +<module>mod_autoindex</module>
       <module>mod_dir</module>
       <module>mod_imagemap</module>
       <module>mod_negotiation</module>
      @@ -49,6 +50,7 @@
       <directive module="mod_alias">Alias</directive>
       <directive module="mod_alias">AliasMatch</directive>
       <directive module="mod_speling">CheckSpelling</directive>
      +<directive module="mod_dir">DirectoryIndex</directive>
       <directive module="core">DocumentRoot</directive>
       <directive module="core">ErrorDocument</directive>
       <directive module="core">Options</directive>
      @@ -84,6 +86,25 @@
           in the file <code>/var/www/html/fish/guppies.html</code> being
           served to the requesting client.</p>
       
      +    <p>If a directory is requested (i.e. a path ending with
      +    <code>/</code>), the file served from that directory is defined by
      +    the <directive module="mod_dir">DirectoryIndex</directive> directive.
      +    For example, if <code>DocumentRoot</code> were set as above, and 
      +    you were to set:</p>
      +
      +    <example>DirectoryIndex index.html index.php</example>
      +
      +    <p>Then a request for <code>http://www.example.com/fish/</code> will
      +    cause httpd to attempt to serve the file
      +    <code>/var/www/html/fish/index.html</code>. In the event that
      +    that file does not exist, it will next attempt to serve the file
      +    <code>/var/www/html/fish/index.php</code>.</p>
      +
      +    <p>If neither of these files existed, the next step is to
      +    attempt to provide a directory index, if
      +    <module>mod_autoindex</module> is loaded and configured to permit
      +    that.</p>
      +
           <p>httpd is also capable of <a href="vhosts/">Virtual
           Hosting</a>, where the server receives requests for more than one
           host. In this case, a different <directive
      @@ -118,7 +139,9 @@
           module="mod_alias">Alias</directive> directive will map any part
           of the filesystem into the web space. For example, with</p>
       
      -<example>Alias /docs /var/web</example>
      +<highlight language="config">
      +Alias "/docs" "/var/web"
      +</highlight>
       
           <p>the URL <code>http://www.example.com/docs/dir/file.html</code>
           will be served from <code>/var/web/dir/file.html</code>. The
      @@ -134,8 +157,9 @@
           expression</glossary> based matching and substitution. For
           example,</p>
       
      -<example>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</example>
      +    <highlight language="config">
      +    ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)"   "/home/$1/cgi-bin/$2"
      +    </highlight>
       
           <p>will map a request to
           <code>http://example.com/~user/cgi-bin/script.cgi</code> to the
      @@ -181,8 +205,9 @@
           <code>/home/user/public_html/file.html</code>, use the following
           <code>AliasMatch</code> directive:</p>
       
      -<example>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
      -      /home/$1/public_html/$3</example>
      +    <highlight language="config">
      +    AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"
      +    </highlight>
       </section>
       
       <section id="redirect"><title>URL Redirection</title>
      @@ -200,8 +225,9 @@
           to the new directory <code>/bar/</code>, you can instruct clients
           to request the content at the new location as follows:</p>
       
      -<example>Redirect permanent /foo/
      -      http://www.example.com/bar/</example>
      +    <highlight language="config">
      +    Redirect permanent "/foo/"   "http://www.example.com/bar/"
      +    </highlight>
       
           <p>This will redirect any URL-Path starting in
           <code>/foo/</code> to the same URL path on the
      @@ -215,14 +241,16 @@
           for the site home page to a different site, but leave all other
           requests alone, use the following configuration:</p>
       
      -<example>RedirectMatch permanent ^/$
      -      http://www.example.com/startpage.html</example>
      +    <highlight language="config">
      +    RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"
      +    </highlight>
       
           <p>Alternatively, to temporarily redirect all pages on one site
           to a particular page on another site, use the following:</p>
       
      -<example>RedirectMatch temp .*
      -      http://othersite.example.com/startpage.html</example>
      +    <highlight language="config">
      +    RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"
      +    </highlight>
       </section>
       
       <section id="proxy"><title>Reverse Proxy</title>
      @@ -240,12 +268,12 @@ the <code>/bar/</code> directory on <code>internal.example.com</code>
       and returns them to the client as if they were from the local
       server.</p>
       
      -<example>
      -ProxyPass /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
      -ProxyPassReverseCookiePath /foo/ /bar/
      -</example>
      +<highlight language="config">
      +ProxyPass "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverseCookieDomain internal.example.com public.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"
      +</highlight>
       
       <p>The <directive module="mod_proxy">ProxyPass</directive> configures
       the server to fetch the appropriate documents, while the
      @@ -264,13 +292,14 @@ breaking out of the proxy server and requesting directly from
       content) in a page as it is being served to the client using
       <module>mod_substitute</module>.</p>
       
      -<example>
      -Substitute s/internal\.example\.com/www.example.com/i
      -</example>
      +<highlight language="config">
      +Substitute "s/internal\.example\.com/www.example.com/i"
      +</highlight>
       
      -<p>Additionally, a third-party module,
      -<a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>,
      -is available to rewrite links in HTML and XHTML.</p>
      +<p>For more sophisticated rewriting of links in HTML and XHTML, the 
      +<module>mod_proxy_html</module> module is also available. It allows you
      +to create maps of URLs that need to be rewritten, so that complex
      +proxying scenarios can be handled.</p>
       </section>
       
       <section id="rewrite"><title>Rewriting Engine</title>
      @@ -322,8 +351,8 @@ is available to rewrite links in HTML and XHTML.</p>
           <p><module>mod_dir</module> provides <directive module="mod_dir"
           >FallbackResource</directive>, which can be used to map virtual
           URIs to a real resource, which then serves them. This is a very
      -    useful replace to <module>mod_rewrite</module> when implementing
      -    a 'front controler'</p>
      +    useful replacement for <module>mod_rewrite</module> when implementing
      +    a 'front controller'</p>
       
           <p>If all attempts to locate the content fail, httpd returns
           an error page with HTTP status code 404 (file not found). The
      diff --git a/docs/manual/urlmapping.xml.fr b/docs/manual/urlmapping.xml.fr
      index 8be962215d7..849d5a77d31 100644
      --- a/docs/manual/urlmapping.xml.fr
      +++ b/docs/manual/urlmapping.xml.fr
      @@ -1,9 +1,9 @@
      -<?xml version="1.0" encoding="ISO-8859-1" ?>
      +<?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.fr.xsl"?>
       <!-- French translation : Lucien GENTIS -->
       <!-- Reviewed by : Vincent Deffontaines -->
      -<!-- English Revision: 1041851 -->
      +<!-- English Revision: 1741864 -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      @@ -24,20 +24,21 @@
       
       <manualpage metafile="urlmapping.xml.meta">
       
      -  <title> Mise en correspondance des URLs avec le syst&egrave;me de fichiers</title>
      +  <title> Mise en correspondance des URLs avec le système de fichiers</title>
       
         <summary>
           <p>Ce document explique comment le serveur HTTP Apache utilise l'URL contenue dans une
      -    requ&ecirc;te pour d&eacute;terminer le noeud du syst&egrave;me de fichier &agrave; partir duquel le
      -    fichier devra &ecirc;tre servi.</p>
      +    requête pour déterminer le noeud du système de fichier à partir duquel le
      +    fichier devra être servi.</p>
         </summary>
       
      -<section id="related"><title>Modules et directives concern&eacute;s</title>
      +<section id="related"><title>Modules et directives concernés</title>
       
       <related>
       <modulelist>
       <module>mod_actions</module>
       <module>mod_alias</module>
      +<module>mod_autoindex</module>
       <module>mod_dir</module>
       <module>mod_imagemap</module>
       <module>mod_negotiation</module>
      @@ -51,6 +52,7 @@
       <directive module="mod_alias">Alias</directive>
       <directive module="mod_alias">AliasMatch</directive>
       <directive module="mod_speling">CheckSpelling</directive>
      +<directive module="mod_dir">DirectoryIndex</directive>
       <directive module="core">DocumentRoot</directive>
       <directive module="core">ErrorDocument</directive>
       <directive module="core">Options</directive>
      @@ -71,280 +73,308 @@
       
       <section id="documentroot"><title>Racine des documents (DocumentRoot)</title>
       
      -    <p>La m&eacute;thode par d&eacute;faut de httpd pour d&eacute;terminer quel fichier servir pour
      -    une requ&ecirc;te donn&eacute;e, consiste &agrave; extraire le chemin du fichier de la requ&ecirc;te
      -    (la partie de l'URL qui suit le nom d'h&ocirc;te et le port), puis de l'ajouter
      -    &agrave; la fin de la valeur de la directive
      -    <directive module="core">DocumentRoot</directive> d&eacute;finie dans vos fichiers
      +    <p>La méthode par défaut de httpd pour déterminer quel fichier servir pour
      +    une requête donnée, consiste à extraire le chemin du fichier de la requête
      +    (la partie de l'URL qui suit le nom d'hôte et le port), puis de l'ajouter
      +    à la fin de la valeur de la directive
      +    <directive module="core">DocumentRoot</directive> définie dans vos fichiers
           de configuration.
      -    Ainsi, les fichiers et r&eacute;pertoires
      -    situ&eacute;s en dessous de <directive module="core">DocumentRoot</directive>
      +    Ainsi, les fichiers et répertoires
      +    situés en dessous de <directive module="core">DocumentRoot</directive>
           constituent l'arborescence de base des documents qui seront visibles
           depuis le web.</p>
       
           <p>Par exemple, si la directive
           <directive module="core">DocumentRoot</directive> contient
      -    <code>/var/www/html</code>, une requ&ecirc;te pour
      +    <code>/var/www/html</code>, une requête pour
           <code>http://www.example.com/fish/guppies.html</code> retournera le
           fichier <code>/var/www/html/fish/guppies.html</code> au client.</p>
       
      -    <p>httpd supporte aussi les <a href="vhosts/">H&ocirc;tes virtuels</a>,
      -    ce qui lui permet de traiter des requ&ecirc;tes pour plusieurs h&ocirc;tes.
      +    <p>Si la requête concerne un répertoire (autrement dit un chemin se
      +    terminant par un slash <code>/</code>), le nom du fichier qui sera
      +    recherché et servi depuis ce répertoire est défini via la directive
      +    <directive module="mod_dir">DirectoryIndex</directive>. Par exemple,
      +    supposons que <code>DocumentRoot</code> ait été définie comme
      +    précédemment, et que vous ayez défini <code>DirectoryIndex</code>
      +    comme suit :</p>
      +
      +    <example>DirectoryIndex index.html index.php</example>
      +
      +    <p>Si httpd reçoit alors une requête pour
      +    <code>http://www.example.com/fish/</code>, il tentera de servir le
      +    fichier <code>/var/www/html/fish/index.html</code>. Si ce fichier
      +    n'existe pas, il tentera de servir le fichier
      +    <code>/var/www/html/fish/index.php</code>.</p>
      +
      +    <p>Si aucun de ces fichiers existe, httpd tentera de générer et
      +    d'afficher un index du répertoire, à condition que
      +    <module>mod_autoindex</module> ait été chargé et configuré pour le
      +    permettre.</p>
      +
      +    <p>httpd supporte aussi les <a href="vhosts/">Hôtes virtuels</a>,
      +    ce qui lui permet de traiter des requêtes pour plusieurs hôtes.
           Dans ce cas, un <directive module="core">DocumentRoot</directive>
      -    diff&eacute;rent peut &ecirc;tre d&eacute;fini pour chaque h&ocirc;te virtuel;
      +    différent peut être défini pour chaque hôte virtuel;
           les directives fournies par le module
      -    <module>mod_vhost_alias</module> peuvent aussi &ecirc;tre utilis&eacute;es afin de
      -    d&eacute;terminer dynamiquement le noeud appropri&eacute; du syst&egrave;me de fichiers
      -    &agrave; partir duquel servir un contenu en fonction de l'adresse IP
      -    ou du nom d'h&ocirc;te.</p>
      +    <module>mod_vhost_alias</module> peuvent aussi être utilisées afin de
      +    déterminer dynamiquement le noeud approprié du système de fichiers
      +    à partir duquel servir un contenu en fonction de l'adresse IP
      +    ou du nom d'hôte.</p>
       
           <p>La directive <directive module="core">DocumentRoot</directive>  est
      -    d&eacute;finie dans le fichier de configuration de votre serveur principal
      -    (<code>httpd.conf</code>), mais peut aussi &ecirc;tre red&eacute;finie pour chaque
      -    <a href="vhosts/">H&ocirc;te virtuel</a> suppl&eacute;mentaire que vous avez cr&eacute;&eacute;.</p>
      +    définie dans le fichier de configuration de votre serveur principal
      +    (<code>httpd.conf</code>), mais peut aussi être redéfinie pour chaque
      +    <a href="vhosts/">Hôte virtuel</a> supplémentaire que vous avez créé.</p>
       </section>
       
      -<section id="outside"><title>Fichiers situ&eacute;s en dehors de
      +<section id="outside"><title>Fichiers situés en dehors de
       l'arborescence DocumentRoot</title>
       
      -    <p>Il existe de nombreuses circonstances pour lesquelles il est n&eacute;cessaire
      -    d'autoriser l'acc&egrave;s web &agrave; des portions du syst&egrave;me de fichiers qui ne se
      +    <p>Il existe de nombreuses circonstances pour lesquelles il est nécessaire
      +    d'autoriser l'accès web à des portions du système de fichiers qui ne se
           trouvent pas dans l'arborescence <directive
           module="core">DocumentRoot</directive>.  httpd propose de nombreuses
      -    solutions pour r&eacute;aliser cela. Sur les syst&egrave;mes Unix, les liens
      -    symboliques permettent de rattacher d'autres portions du syst&egrave;me de
      +    solutions pour réaliser cela. Sur les systèmes Unix, les liens
      +    symboliques permettent de rattacher d'autres portions du système de
           fichiers au <directive
      -    module="core">DocumentRoot</directive>. Pour des raisons de s&eacute;curit&eacute;,
      +    module="core">DocumentRoot</directive>. Pour des raisons de sécurité,
           httpd ne suivra les liens symboliques que si les <directive
      -    module="core">Options</directive> pour le r&eacute;pertoire concern&eacute; contiennent
      +    module="core">Options</directive> pour le répertoire concerné contiennent
           <code>FollowSymLinks</code> ou <code>SymLinksIfOwnerMatch</code>.</p>
       
      -    <p>Une autre m&eacute;thode consiste &agrave; utiliser la directive <directive
      +    <p>Une autre méthode consiste à utiliser la directive <directive
           module="mod_alias">Alias</directive> pour rattacher toute portion
      -    du syst&egrave;me de fichiers &agrave; l'arborescence du site web. Par exemple, avec</p>
      +    du système de fichiers à l'arborescence du site web. Par exemple, avec</p>
       
      -<example>Alias /docs /var/web</example>
      +<highlight language="config">Alias "/docs" "/var/web"</highlight>
       
           <p>l'URL <code>http://www.example.com/docs/dir/file.html</code>
           correspondra au fichier <code>/var/web/dir/file.html</code>. La
           directive
           <directive module="mod_alias">ScriptAlias</directive>
      -    fonctionne de la m&ecirc;me mani&egrave;re, except&eacute; que tout contenu localis&eacute; dans le
      -    chemin cible sera trait&eacute; comme un script <glossary ref="cgi"
      +    fonctionne de la même manière, excepté que tout contenu localisé dans le
      +    chemin cible sera traité comme un script <glossary ref="cgi"
           >CGI</glossary>.</p>
       
      -    <p>Pour les situations qui n&eacute;cessitent plus de flexibilit&eacute;, vous disposez
      +    <p>Pour les situations qui nécessitent plus de flexibilité, vous disposez
           des directives <directive module="mod_alias">AliasMatch</directive>
           et <directive module="mod_alias">ScriptAliasMatch</directive>
      -    qui permettent des substitutions et comparaisons puissantes bas&eacute;es
      +    qui permettent des substitutions et comparaisons puissantes basées
           sur les <glossary ref="regex">expressions rationnelles</glossary>.
           Par exemple,</p>
       
      -<example>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</example>
      +<highlight language="config">
      +    ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"
      +    </highlight>
       
      -    <p>fera correspondre une requ&ecirc;te du style
      +    <p>fera correspondre une requête du style
           <code>http://example.com/~user/cgi-bin/script.cgi</code> au chemin
      -    <code>/home/user/cgi-bin/script.cgi</code>, et traitera le fichier r&eacute;sultant
      +    <code>/home/user/cgi-bin/script.cgi</code>, et traitera le fichier résultant
           comme un script CGI.</p>
       </section>
       
      -<section id="user"><title>R&eacute;pertoires des utilisateurs</title>
      +<section id="user"><title>Répertoires des utilisateurs</title>
       
      -    <p>Sur les syst&egrave;mes Unix, on peut traditionnellement faire r&eacute;f&eacute;rence
      -    au r&eacute;pertoire personnel d'un <em>utilisateur</em> particulier &agrave; l'aide de
      +    <p>Sur les systèmes Unix, on peut traditionnellement faire référence
      +    au répertoire personnel d'un <em>utilisateur</em> particulier à l'aide de
           l'expression <code>~user/</code>.
           Le module <module>mod_userdir</module>
      -    &eacute;tend cette id&eacute;e au web en autorisant l'acc&egrave;s aux fichiers situ&eacute;s dans les
      -    r&eacute;pertoires home des utilisateurs &agrave; l'aide d'URLs
      +    étend cette idée au web en autorisant l'accès aux fichiers situés dans les
      +    répertoires home des utilisateurs à l'aide d'URLs
           comme dans ce qui suit :</p>
       
       <example>http://www.example.com/~user/file.html</example>
       
      -    <p>Pour des raisons de s&eacute;curit&eacute;, il est d&eacute;conseill&eacute; de permettre un acc&egrave;s
      -    direct &agrave; un r&eacute;pertoire home d'utilisateur depuis le web. A cet effet, la
      +    <p>Pour des raisons de sécurité, il est déconseillé de permettre un accès
      +    direct à un répertoire home d'utilisateur depuis le web. A cet effet, la
           directive <directive module="mod_userdir">UserDir</directive>
      -    sp&eacute;cifie un r&eacute;pertoire o&ugrave; sont situ&eacute;s les fichiers accessibles depuis le web
      -    dans le r&eacute;pertoire home de l'utilisateur.
      -    Avec la configuration par d&eacute;faut
      -    <code>Userdir public_html</code>, l'URL ci-dessus correspondra &agrave; un fichier
      +    spécifie un répertoire où sont situés les fichiers accessibles depuis le web
      +    dans le répertoire home de l'utilisateur.
      +    Avec la configuration par défaut
      +    <code>Userdir public_html</code>, l'URL ci-dessus correspondra à un fichier
           dont le chemin sera du style
      -    <code>/home/user/public_html/file.html</code> o&ugrave;
      -    <code>/home/user/</code> est le r&eacute;pertoire home de l'utilisateur tel qu'il
      -    est d&eacute;fini dans <code>/etc/passwd</code>.</p>
      +    <code>/home/user/public_html/file.html</code> où
      +    <code>/home/user/</code> est le répertoire home de l'utilisateur tel qu'il
      +    est défini dans <code>/etc/passwd</code>.</p>
       
      -    <p>La directive <code>Userdir</code> met &agrave; votre disposition de nombreuses
      -    formes diff&eacute;rentes pour les syst&egrave;mes o&ugrave; <code>/etc/passwd</code> ne
      -    sp&eacute;cifie pas la localisation du r&eacute;pertoire home.</p>
      +    <p>La directive <code>Userdir</code> met à votre disposition de nombreuses
      +    formes différentes pour les systèmes où <code>/etc/passwd</code> ne
      +    spécifie pas la localisation du répertoire home.</p>
       
           <p>Certains jugent le symbole "~" (dont le code sur le web est souvent
      -    <code>%7e</code>) inappropri&eacute; et pr&eacute;f&egrave;rent utiliser une cha&icirc;ne de
      -    caract&egrave;res diff&eacute;rente pour repr&eacute;senter les r&eacute;pertoires utilisateurs.
      -    mod_userdir ne supporte pas cette fonctionnalit&eacute;. Cependant, si les
      -    r&eacute;pertoires home des utilisateurs sont structur&eacute;s de mani&egrave;re rationnelle,
      +    <code>%7e</code>) inapproprié et préfèrent utiliser une chaîne de
      +    caractères différente pour représenter les répertoires utilisateurs.
      +    mod_userdir ne supporte pas cette fonctionnalité. Cependant, si les
      +    répertoires home des utilisateurs sont structurés de manière rationnelle,
           il est possible d'utiliser la directive
           <directive module="mod_alias">AliasMatch</directive>
      -    pour obtenir l'effet d&eacute;sir&eacute;. Par exemple, pour faire correspondre
      -    <code>http://www.example.com/upages/user/file.html</code> &agrave;
      +    pour obtenir l'effet désiré. Par exemple, pour faire correspondre
      +    <code>http://www.example.com/upages/user/file.html</code> à
           <code>/home/user/public_html/file.html</code>, utilisez la directive
           <code>AliasMatch</code> suivante :</p>
       
      -<example>AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$
      -      /home/$1/public_html/$3</example>
      +<highlight language="config">
      +    AliasMatch "^/upages/([a-zA-Z0-9]+)(/(.*))?$"   "/home/$1/public_html/$3"
      +    </highlight>
       </section>
       
       <section id="redirect"><title>Redirection d'URL</title>
       
      -    <p>Les directives de configuration d&eacute;crites dans les sections pr&eacute;c&eacute;dentes
      -    demandent &agrave; httpd d'extraire un contenu depuis un emplacement sp&eacute;cifique
      -    du syst&egrave;me de fichiers
      +    <p>Les directives de configuration décrites dans les sections précédentes
      +    demandent à httpd d'extraire un contenu depuis un emplacement spécifique
      +    du système de fichiers
           et de la retourner au client. Il est cependant parfois
           souhaitable d'informer le
      -    client que le contenu demand&eacute; est localis&eacute; &agrave; une URL diff&eacute;rente, et de
      -    demander au client d'&eacute;laborer une nouvelle requ&ecirc;te avec la nouvelle URL.
      -    Ce processus se nomme <em>redirection</em> et est impl&eacute;ment&eacute; par la
      +    client que le contenu demandé est localisé à une URL différente, et de
      +    demander au client d'élaborer une nouvelle requête avec la nouvelle URL.
      +    Ce processus se nomme <em>redirection</em> et est implémenté par la
           directive <directive module="mod_alias">Redirect</directive>.
      -    Par exemple, si le contenu du r&eacute;pertoire <code>/foo/</code> sous
      -    <directive module="core">DocumentRoot</directive> est d&eacute;plac&eacute; vers le
      -    nouveau r&eacute;pertoire <code>/bar/</code>, vous pouvez demander aux clients
      -    de le requ&eacute;rir &agrave; sa nouvelle localisation comme suit :</p>
      -
      -<example>Redirect permanent /foo/ http://www.example.com/bar/</example>
      -
      -    <p>Ceci aura pour effet de rediriger tout chemin d'URL commen&ccedil;ant par
      -    <code>/foo/</code> vers le m&ecirc;me chemin d'URL sur le serveur
      -    <code>www.example.com</code> en rempla&ccedil;ant <code>/foo/</code> par
      +    Par exemple, si le contenu du répertoire <code>/foo/</code> sous
      +    <directive module="core">DocumentRoot</directive> est déplacé vers le
      +    nouveau répertoire <code>/bar/</code>, vous pouvez demander aux clients
      +    de le requérir à sa nouvelle localisation comme suit :</p>
      +
      +<highlight language="config">
      +    Redirect permanent "/foo/"   "http://www.example.com/bar/"
      +    </highlight>
      +
      +    <p>Ceci aura pour effet de rediriger tout chemin d'URL commençant par
      +    <code>/foo/</code> vers le même chemin d'URL sur le serveur
      +    <code>www.example.com</code> en remplaçant <code>/foo/</code> par
           <code>/bar/</code>. Vous pouvez rediriger les clients non seulement sur le
           serveur d'origine, mais aussi vers n'importe quel autre serveur.</p>
       
           <p>httpd propose aussi la directive <directive
      -    module="mod_alias">RedirectMatch</directive> pour traiter les probl&egrave;mes
      -    de r&eacute;&eacute;criture d'une plus grande complexit&eacute;. Par exemple, afin de rediriger
      -    les requ&ecirc;tes pour la page d'accueil du site vers un site diff&eacute;rent, mais
      -    laisser toutes les autres requ&ecirc;tes inchang&eacute;es, utilisez la
      +    module="mod_alias">RedirectMatch</directive> pour traiter les problèmes
      +    de réécriture d'une plus grande complexité. Par exemple, afin de rediriger
      +    les requêtes pour la page d'accueil du site vers un site différent, mais
      +    laisser toutes les autres requêtes inchangées, utilisez la
           configuration suivante :</p>
       
      -<example>RedirectMatch permanent ^/$
      -      http://www.example.com/startpage.html</example>
      +<highlight language="config">
      +   RedirectMatch permanent "^/$"    "http://www.example.com/startpage.html"
      +    </highlight>
       
      -    <p>De m&ecirc;me, pour rediriger temporairement toutes les pages d'un site
      -    vers une page particuli&egrave;re d'un autre site, utilisez ce qui suit :</p>
      +    <p>De même, pour rediriger temporairement toutes les pages d'un site
      +    vers une page particulière d'un autre site, utilisez ce qui suit :</p>
       
      -<example>RedirectMatch temp .*
      -      http://othersite.example.com/startpage.html</example>
      +<highlight language="config">
      +    RedirectMatch temp ".*"  "http://othersite.example.com/startpage.html"
      +    </highlight>
       </section>
       
       <section id="proxy"><title>Mandataire inverse (Reverse Proxy)</title>
       
       <p>httpd vous permet aussi de rapatrier des documents distants
       dans l'espace des URL du serveur local.
      -Cette technique est appel&eacute;e <em>mandataire inverse ou reverse
      +Cette technique est appelée <em>mandataire inverse ou reverse
       proxying</em> car le serveur web agit comme un serveur mandataire en
       rapatriant les documents depuis un serveur distant puis les renvoyant
      -au client. Ceci diff&egrave;re d'un service de mandataire usuel (direct) car, pour le client,
      +au client. Ceci diffère d'un service de mandataire usuel (direct) car, pour le client,
       les documents semblent appartenir au serveur mandataire inverse.</p>
       
      -<p>Dans l'exemple suivant, quand les clients demandent des documents situ&eacute;s
      -dans le r&eacute;pertoire
      -<code>/foo/</code>, le serveur rapatrie ces documents depuis le r&eacute;pertoire
      +<p>Dans l'exemple suivant, quand les clients demandent des documents situés
      +dans le répertoire
      +<code>/foo/</code>, le serveur rapatrie ces documents depuis le répertoire
       <code>/bar/</code> sur <code>internal.example.com</code>
       et les renvoie au client comme s'ils appartenaient au serveur local.</p>
       
      -<example>
      -ProxyPass /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverse /foo/ http://internal.example.com/bar/<br />
      -ProxyPassReverseCookieDomain internal.example.com public.example.com<br />
      -ProxyPassReverseCookiePath /foo/ /bar/
      -</example>
      +<highlight language="config">
      +ProxyPass "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://internal.example.com/bar/"
      +ProxyPassReverseCookieDomain internal.example.com public.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"
      +</highlight>
       
       <p>La directive <directive module="mod_proxy">ProxyPass</directive> configure
      -le serveur pour rapatrier les documents appropri&eacute;s, alors que la directive
      +le serveur pour rapatrier les documents appropriés, alors que la directive
       <directive module="mod_proxy">ProxyPassReverse</directive>
      -r&eacute;&eacute;crit les redirections provenant de
      -<code>internal.example.com</code> de telle mani&egrave;re qu'elles ciblent le
      -r&eacute;pertoire appropri&eacute; sur le serveur local. De mani&egrave;re similaire, les directives
      +réécrit les redirections provenant de
      +<code>internal.example.com</code> de telle manière qu'elles ciblent le
      +répertoire approprié sur le serveur local. De manière similaire, les directives
       <directive module="mod_proxy">ProxyPassReverseCookieDomain</directive>
       et <directive module="mod_proxy">ProxyPassReverseCookiePath</directive>
      -r&eacute;&eacute;crivent les cookies &eacute;labor&eacute;s par le serveur d'arri&egrave;re-plan.</p>
      -<p>Il est important de noter cependant, que les liens situ&eacute;s dans les documents
      -ne seront pas r&eacute;&eacute;crits.  Ainsi, tout lien absolu sur
      -<code>internal.example.com</code> fera d&eacute;crocher le client
      -du serveur mandataire et effectuer sa requ&ecirc;te directement sur
      +réécrivent les cookies élaborés par le serveur d'arrière-plan.</p>
      +<p>Il est important de noter cependant, que les liens situés dans les documents
      +ne seront pas réécrits.  Ainsi, tout lien absolu sur
      +<code>internal.example.com</code> fera décrocher le client
      +du serveur mandataire et effectuer sa requête directement sur
       <code>internal.example.com</code>. Vous pouvez modifier ces liens (et
      -d'utres contenus) situ&eacute;s dans la page au moment o&ugrave; elle est envoy&eacute;e au
      +d'utres contenus) situés dans la page au moment où elle est envoyée au
       client en utilisant le module <module>mod_substitute</module>.</p>
       
      -<example>
      -Substitute s/internal\.example\.com/www.example.com/i
      -</example>
      +<highlight language="config">
      +Substitute "s/internal\.example\.com/www.example.com/i"
      +</highlight>
       
      -<p>En outre, un module tiers
      -<a href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>
      -permet de r&eacute;&eacute;crire les liens dans les documents HTML et XHTML.</p>
      +<p>Le module <module>mod_proxy_html</module> rend possible une réécriture plus
      +élaborée des liens en HTML et XHTML. Il permet de créer des listes
      +d'URLs et de leurs réécritures, de façon à pouvoir gérer des scénarios
      +de réécriture complexes.</p>
       </section>
       
      -<section id="rewrite"><title>Moteur de r&eacute;&eacute;criture</title>
      +<section id="rewrite"><title>Moteur de réécriture</title>
       
      -    <p>Le moteur de r&eacute;&eacute;criture <module>mod_rewrite</module> peut s'av&eacute;rer
      -    utile lorsqu'une substitution plus puissante est n&eacute;cessaire.
      -    Les directives fournies par ce module peuvent utiliser des caract&eacute;ristiques de la
      -    requ&ecirc;te comme le type de navigateur ou l'adresse IP source afin de d&eacute;cider
      -    depuis o&ugrave; servir le contenu. En outre, mod_rewrite peut utiliser des
      -    fichiers ou programmes de bases de donn&eacute;es externes pour d&eacute;terminer comment
      -    traiter une requ&ecirc;te. Le moteur de r&eacute;&eacute;criture peut effectuer les trois types
      -    de mise en correspondance discut&eacute;s plus haut :
      +    <p>Le moteur de réécriture <module>mod_rewrite</module> peut s'avérer
      +    utile lorsqu'une substitution plus puissante est nécessaire.
      +    Les directives fournies par ce module peuvent utiliser des caractéristiques de la
      +    requête comme le type de navigateur ou l'adresse IP source afin de décider
      +    depuis où servir le contenu. En outre, mod_rewrite peut utiliser des
      +    fichiers ou programmes de bases de données externes pour déterminer comment
      +    traiter une requête. Le moteur de réécriture peut effectuer les trois types
      +    de mise en correspondance discutés plus haut :
           redirections internes (aliases), redirections externes, et services mandataires.
      -    De nombreux exemples pratiques utilisant mod_rewrite sont discut&eacute;s dans la
      -    <a href="rewrite/">documentation d&eacute;taill&eacute;e de mod_rewrite</a>.</p>
      +    De nombreux exemples pratiques utilisant mod_rewrite sont discutés dans la
      +    <a href="rewrite/">documentation détaillée de mod_rewrite</a>.</p>
       </section>
       
      -<section id="notfound"><title>Fichier non trouv&eacute; (File Not Found)</title>
      +<section id="notfound"><title>Fichier non trouvé (File Not Found)</title>
       
      -    <p>In&eacute;vitablement, appara&icirc;tront des URLs qui ne correspondront &agrave; aucun
      -    fichier du syst&egrave;me de fichiers.
      +    <p>Inévitablement, apparaîtront des URLs qui ne correspondront à aucun
      +    fichier du système de fichiers.
           Ceci peut arriver pour de nombreuses raisons.
      -    Il peut s'agir du d&eacute;placement de documents d'une
      +    Il peut s'agir du déplacement de documents d'une
           localisation vers une autre. Dans ce cas, le mieux est d'utiliser la
           <a href="#redirect">redirection d'URL</a> pour informer les clients de la
      -    nouvelle localisation de la ressource. De cette fa&ccedil;on, vous &ecirc;tes sur que
      -    les anciens signets et liens continueront de fonctionner, m&ecirc;me si la
      -    ressource est d&eacute;plac&eacute;e.</p>
      +    nouvelle localisation de la ressource. De cette façon, vous êtes sur que
      +    les anciens signets et liens continueront de fonctionner, même si la
      +    ressource est déplacée.</p>
       
      -    <p>Une autre cause fr&eacute;quente d'erreurs "File Not Found" est l'erreur de
      +    <p>Une autre cause fréquente d'erreurs "File Not Found" est l'erreur de
           frappe accidentelle dans les URLs, soit directement dans le navigateur,
           soit dans les liens HTML. httpd propose le module
      -    <module>mod_speling</module> (sic) pour tenter de r&eacute;soudre ce probl&egrave;me.
      -    Lorsque ce module est activ&eacute;, il intercepte les erreurs
      -    "File Not Found" et recherche une ressource poss&eacute;dant un nom de fichier
      -    similaire. Si un tel fichier est trouv&eacute;, mod_speling va envoyer une
      +    <module>mod_speling</module> (sic) pour tenter de résoudre ce problème.
      +    Lorsque ce module est activé, il intercepte les erreurs
      +    "File Not Found" et recherche une ressource possédant un nom de fichier
      +    similaire. Si un tel fichier est trouvé, mod_speling va envoyer une
           redirection HTTP au client pour lui communiquer l'URL correcte.
      -    Si plusieurs fichiers proches sont trouv&eacute;s, une liste des alternatives
      -    possibles sera pr&eacute;sent&eacute;e au client.</p>
      +    Si plusieurs fichiers proches sont trouvés, une liste des alternatives
      +    possibles sera présentée au client.</p>
       
      -    <p>mod_speling poss&egrave;de une fonctionnalit&eacute; particuli&egrave;rement utile :
      +    <p>mod_speling possède une fonctionnalité particulièrement utile :
           il compare les noms de fichiers sans tenir compte de la casse.
      -    Ceci peut aider les syst&egrave;mes o&ugrave; les utilisateurs ne connaissent pas la
      -    sensibilit&eacute; des URLs &agrave; la casse et bien s&ucirc;r les syst&egrave;mes de fichiers unix.
      +    Ceci peut aider les systèmes où les utilisateurs ne connaissent pas la
      +    sensibilité des URLs à la casse et bien sûr les systèmes de fichiers unix.
           Mais l'utilisation de mod_speling pour toute autre chose que la correction
           occasionnelle d'URLs peut augmenter la charge du serveur, car chaque
      -    requ&ecirc;te "incorrecte" entra&icirc;ne une redirection d'URL et une nouvelle requ&ecirc;te
      +    requête "incorrecte" entraîne une redirection d'URL et une nouvelle requête
           de la part du client.</p>
       
           <p><module>mod_dir</module> fournit la directive <directive
           module="mod_dir">FallbackResource</directive> qui permet d'associer
      -    des URIs virtuels &agrave; une ressource r&eacute;elle qui peut ainsi les servir.
      +    des URIs virtuels à une ressource réelle qui peut ainsi les servir.
           Cette directive remplace avantageusement
      -    <module>mod_rewrite</module> lors de l'impl&eacute;mentation d'un
      -    "contr&ocirc;leur frontal".</p>
      +    <module>mod_rewrite</module> lors de l'implémentation d'un
      +    "contrôleur frontal".</p>
       
           <p>Si toutes les tentatives pour localiser le contenu
      -    &eacute;chouent, httpd
      +    échouent, httpd
           retourne une page d'erreur avec le code de statut HTTP 404
      -    (file not found). L'apparence de cette page est contr&ocirc;l&eacute;e &agrave; l'aide de la
      +    (file not found). L'apparence de cette page est contrôlée à l'aide de la
           directive <directive module="core">ErrorDocument</directive>
      -    et peut &ecirc;tre personnalis&eacute;e de mani&egrave;re tr&egrave;s flexible comme discut&eacute; dans le
      +    et peut être personnalisée de manière très flexible comme discuté dans le
           document
      -    <a href="custom-error.html">R&eacute;ponses personnalis&eacute;es aux erreurs</a>.</p>
      +    <a href="custom-error.html">Réponses personnalisées aux erreurs</a>.</p>
       </section>
       
       <section id="other"><title>Autres modules de mise en correspondance des
      @@ -356,16 +386,16 @@ URLs</title>
           URLs sont :</p>
           <ul>
           <li><module>mod_actions</module> - Met une URL en correspondance
      -    avec un script CGI en fonction de la m&eacute;thode de la requ&ecirc;te, ou du
      +    avec un script CGI en fonction de la méthode de la requête, ou du
           type MIME de la ressource.</li>
           <li><module>mod_dir</module> - Permet une mise en correspondance
           basique d'un slash terminal dans un fichier index comme
           <code>index.html</code>.</li>
           <li><module>mod_imagemap</module> - Met en correspondance une
      -    requ&ecirc;te avec une URL en fonction de la zone d'une image int&eacute;gr&eacute;e &agrave;
      +    requête avec une URL en fonction de la zone d'une image intégrée à
           un document HTML dans laquelle un utilisateur clique.</li>
      -    <li><module>mod_negotiation</module> - S&eacute;lectionne le document
      -    appropri&eacute; en fonction de pr&eacute;f&eacute;rences du client telles que la langue
      +    <li><module>mod_negotiation</module> - Sélectionne le document
      +    approprié en fonction de préférences du client telles que la langue
           ou la compression du contenu.</li>
           </ul>
           
      diff --git a/docs/manual/urlmapping.xml.ja b/docs/manual/urlmapping.xml.ja
      index 374e4892adc..ea844309779 100644
      --- a/docs/manual/urlmapping.xml.ja
      +++ b/docs/manual/urlmapping.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.ja.xsl"?>
      -<!-- English Revision: 151408:1041851 (outdated) -->
      +<!-- English Revision: 151408:1741864 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/urlmapping.xml.ko b/docs/manual/urlmapping.xml.ko
      index d99ad9f76c9..ec8daa286b7 100644
      --- a/docs/manual/urlmapping.xml.ko
      +++ b/docs/manual/urlmapping.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="EUC-KR" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
      -<!-- English Revision: 151408:1041851 (outdated) -->
      +<!-- English Revision: 151408:1741864 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/urlmapping.xml.meta b/docs/manual/urlmapping.xml.meta
      index 9fd5f4bb52a..35880bdad4d 100644
      --- a/docs/manual/urlmapping.xml.meta
      +++ b/docs/manual/urlmapping.xml.meta
      @@ -11,6 +11,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/urlmapping.xml.tr b/docs/manual/urlmapping.xml.tr
      index 4be25f881f1..36f2fcc1e25 100644
      --- a/docs/manual/urlmapping.xml.tr
      +++ b/docs/manual/urlmapping.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="./style/manual.tr.xsl"?>
      -<!-- English Revision: 732819:1041851 (outdated) -->
      +<!-- English Revision: 1741864 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -30,25 +30,31 @@
       
         <summary>
           <p>Bu belgede, bir istekte belirtilen URL’nin sunulacak dosyanın dosya
      -      sistemindeki yerini bulmak için Apache tarafından nasıl kullanıldığı
      -      açıklanmaktadır.</p>
      +      sistemindeki yerini bulmak için Apache HTTP Sunucusu tarafından nasıl
      +      kullanıldığı açıklanmaktadır.</p>
         </summary>
       
       <section id="related"><title>İlgili Modüller ve Yönergeler</title>
       
       <related>
       <modulelist>
      +<module>mod_actions</module>
       <module>mod_alias</module>
      +<module>mod_autoindex</module>
      +<module>mod_dir</module>
      +<module>mod_imagemap</module>
      +<module>mod_negotiation</module>
       <module>mod_proxy</module>
       <module>mod_rewrite</module>
      -<module>mod_userdir</module>
       <module>mod_speling</module>
      +<module>mod_userdir</module>
       <module>mod_vhost_alias</module>
       </modulelist>
       <directivelist>
       <directive module="mod_alias">Alias</directive>
       <directive module="mod_alias">AliasMatch</directive>
       <directive module="mod_speling">CheckSpelling</directive>
      +<directive module="mod_dir">DirectoryIndex</directive>
       <directive module="core">DocumentRoot</directive>
       <directive module="core">ErrorDocument</directive>
       <directive module="core">Options</directive>
      @@ -70,7 +76,7 @@
       <section id="documentroot"><title><code>DocumentRoot</code></title>
       
           <p>Yapılan bir isteğe hangi dosyanın sunulacağına karar verirken
      -      Apache’nin öntanımlı davranışı istek için URL yolunu (URL’den konak ismi
      +      httpd’nin öntanımlı davranışı istek için URL yolunu (URL’den konak ismi
             ve port ayrıldıktan sonra kalan kısım) alıp bunu yapılandırma dosyasında
             <directive module="core">DocumentRoot</directive> yönergesi ile
             belirtilen dizinin sonuna eklemektir. Bu nedenle, <directive
      @@ -79,11 +85,28 @@
       
           <p>Örneğin, <directive module="core">DocumentRoot</directive> yönergesine
             <code>/var/http/html</code> atanmış olsun.
      -      <code>http://mesela.dom/balıklar/zargana.html</code> şeklindeki bir
      +      <code>http://example.com/balıklar/zargana.html</code> şeklindeki bir
             istek için istemciye <code>/var/http/html/balıklar/zargana.html</code>
             dosyası sunulur.</p>
       
      -    <p>Apache ayrıca, sunucunun birden fazla konak için istek kabul etmesini
      +    <p>Bir dizin istenirse (<code>/</code> ile biten bir yol belirtilmesi
      +      durumu), sunulacak dosya <directive module="mod_dir"
      +      >DirectoryIndex</directive> yönergesinde belirtilen dosya olacaktır.
      +      Örneğin, <code>DocumentRoot</code> yukarıdaki gibi belirtimiş ve siz de
      +      şunu belirtmişseniz:</p>
      +
      +    <example>DirectoryIndex index.html index.php</example>
      +
      +    <p><code>http://www.example.com/fish/</code> isteği, httpd'nin
      +      <code>/var/www/html/fish/index.html</code> dosyasını sunmaya, bu dosya
      +      bulunmuyorsa <code>/var/www/html/fish/index.php</code> dosyasını sunmaya
      +      çalışmasına sebep olacaktır.</p>
      +
      +    <p>Bu dosyaların ikisi de bulunmuyorsa sonraki adım,
      +      <module>mod_autoindex</module> yüklü ve uygun şekilde yapılandırılmışsa
      +      bir dizin içeriği dosyası sağlamaya çalışmak olacaktır.</p>
      +
      +    <p>httpd ayrıca, sunucunun birden fazla konak için istek kabul etmesini
             sağlayan <a href="vhosts/">sanal barındırmaya</a> da muktedirdir. Bu
             durumda her sanal konak için ayrı bir <directive module="core"
             >DocumentRoot</directive> belirtilebileceği gibi sunulacak içeriğin
      @@ -101,23 +124,23 @@
       
           <p>Bazen dosya sisteminde doğrudan <directive module="core"
             >DocumentRoot</directive> altında bulunmayan dosyalara da erişim izni
      -      vermek gerekir. Apache’de bunu sağlamanın çeşitli yolları vardır. Unix
      +      vermek gerekir. httpd’de bunu sağlamanın çeşitli yolları vardır. Unix
             sistemlerinde sembolik bağlar sayesinde dosya sisteminin farklı
             yerlerindeki dosyaları ve dizinleri <directive module="core"
             >DocumentRoot</directive> altındaymış gibi göstermek mümkündür.
             <directive module="core">Options</directive> yönergesine değer olarak
             <code>FollowSymLinks</code> veya <code>SymLinksIfOwnerMatch</code>
      -      atanmadıkça Apache olası güvenlik açıklarına karşı öntanımlı olarak
      +      atanmadıkça httpd olası güvenlik açıklarına karşı öntanımlı olarak
             sembolik bağları izlemez.</p>
       
           <p>Bundan başka, dosya sisteminin farklı parçalarını belge kök dizini
             altında göstermek için <directive module="mod_alias">Alias</directive>
             yönergesi de kullanılabilir. Örneğin,</p>
       
      -    <example>Alias /belgeler /var/http</example>
      +    <highlight language="config">Alias "/belgeler" "/var/http"</highlight>
       
           <p>yapılandırması ile
      -      <code>http://mesela.dom/belgeler/dizin/dosya.html</code> URL’si için
      +      <code>http://example.com/belgeler/dizin/dosya.html</code> URL’si için
             dosya sistemindeki <code>/var/http/dizin/dosya.html</code> dosyası
             sunulacaktır. Hedef dizindeki dosyaları birer <glossary ref="cgi"
             >CGI</glossary> betiği olarak imlemesi dışında <directive
      @@ -130,10 +153,11 @@
             module="mod_alias" >ScriptAliasMatch</directive> yönergelerinin gücünden
             yararlanılabilir. Örneğin,</p>
       
      -    <example>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
      -      /home/$1/cgi-bin/$2</example>
      +    <highlight language="config">
      +ScriptAliasMatch "^/~([a-zA-Z0-9]+)/cgi-bin/(.+)" "/home/$1/cgi-bin/$2"
      +    </highlight>
       
      -    <p>satırı sayesinde <code>http://mesela.dom/~user/cgi-bin/betik.cgi</code>
      +    <p>satırı sayesinde <code>http://example.com/~user/cgi-bin/betik.cgi</code>
             URL’si <code>/home/user/cgi-bin/betik.cgi</code> dosyası ile
             eşleştirilir ve dosya bir CGI betiği olarak çalıştırılırdı.</p>
       </section>
      @@ -146,7 +170,7 @@
             üzerinden kullanıcıların ev dizinlerindeki dosyaları kişisel sayfalar
             olarak sunmalarını sağlamak üzere kullanır. Örnek:</p>
       
      -    <example>http://mesela.dom/~birisi/dosya.html</example>
      +    <example>http://example.com/~birisi/dosya.html</example>
       
           <p>Güvenlik sebebiyle kullanıcıların ev dizinlerine doğrudan HTTP erişimi
             vermek uygun olmaz. Bu bakımdan, kullanıcının ev dizini altında HTTP
      @@ -169,18 +193,19 @@
             desteklenmemektedir. Ancak, kullanıcı dizinleri düzgün şekilde
             yapılandırılmışsa istenen etki <directive
             module="mod_alias">AliasMatch</directive> yönergesi ile sağlanabilir.
      -      Örneğin, <code>http://mesela.dom/sayfalar/birisi/dosya.html</code>
      +      Örneğin, <code>http://example.com/sayfalar/birisi/dosya.html</code>
             URL’si ile <code>/home/birisi/public_html/dosya.html</code> dosyasını
             eşlemek için <code>AliasMatch</code> yönergesi şöyle
             kullanılabilirdi:</p>
       
      -    <example>AliasMatch ^/sayfalar/([a-zA-Z0-9]+)/?(.*)
      -          /home/$1/public_html/$2</example>
      +    <highlight language="config">
      +AliasMatch "^/sayfalar/([a-zA-Z0-9]+)(/(.*))?$" "/home/$1/public_html/$3"
      +    </highlight>
       </section>
       
       <section id="redirect"><title>URL Yönlendirme</title>
       
      -    <p>Yukarıdaki bölümlerde açıklanan yapılandırma yönergeleri Apache’ye
      +    <p>Yukarıdaki bölümlerde açıklanan yapılandırma yönergeleri httpd’ye
             içeriği dosya sisteminin belli bir yerinden alıp istemciye göndermesini
             söyler. Bazen istemciye, istediği içeriğe farklı bir URL ile
             erişebileceğini ve bu URL için ayrı bir istek yapması gerektiğini
      @@ -191,34 +216,37 @@
             adında yeni bir dizine taşınması halinde istemciye yeni konumun
             bildirilmesi şöyle sağlanabilirdi:</p>
       
      -    <example>Redirect permanent /foo/
      -      http://mesela.dom/bar/</example>
      +    <highlight language="config">
      +Redirect permanent "/foo/" "http://example.com/bar/"
      +    </highlight>
       
           <p>Bu atama sayesinde <code>/foo/</code> ile başlayan URL yolları
      -      <code>mesela.dom</code> sunucundaki <code>/bar/</code> dizini altındaki
      +      <code>example.com</code> sunucundaki <code>/bar/</code> dizini altındaki
             içeriğe yönlendirilmektedir. Yönlendirmeyi aynı sunucu üzerinde yapmak
             zorunda değilsiniz, bu yönerge ile başka bir sunucuya da yönlendirme
             yapabilirsiniz.</p>
       
      -    <p>Apache ayrıca, yeniden yazma ile ilgili daha karmaşık sorunlara çözüm
      +    <p>httpd ayrıca, yeniden yazma ile ilgili daha karmaşık sorunlara çözüm
             olarak <directive module="mod_alias">RedirectMatch</directive> diye bir
             yönerge daha sağlar. Örneğin bir sitenin baş sayfasını diğer isteklerden
             ayrı olarak farklı bir siteye yönlendirmek için yönergeyi şöyle
             kullanabilirsiniz:</p>
       
      -    <example>RedirectMatch permanent ^/$
      -      http://misal.dom/ilksayfa.html</example>
      +    <highlight language="config">
      +RedirectMatch permanent "^/$" "http://example.com/ilksayfa.html"
      +    </highlight>
       
           <p>Bundan başka, bir sitedeki tüm sayfalara yapılan istekleri başka bir
             siteye geçici olarak yönlendirmek için şöyle bir şey yapabilirsiniz:</p>
       
      -    <example>RedirectMatch temp .*
      -      http://mesela.misal.dom/ilksayfa.html</example>
      +    <highlight language="config">
      +RedirectMatch temp ".*" "http://mesela.example.com/ilksayfa.html"
      +    </highlight>
       </section>
       
       <section id="proxy"><title>Karşı Vekil</title>
       
      -    <p>Apache ayrıca, uzak sunuculardaki belgelerin yerel sunucunun URL
      +    <p>httpd ayrıca, uzak sunuculardaki belgelerin yerel sunucunun URL
             alanına getirilmesini de mümkün kılar. Bu tekniğe HTTP sunucunun
             belgeleri uzak bir sunucudan alıp istemciye sunmasını sağlayarak bir
             vekil sunucu gibi davranması nedeniyle <em>ters vekalet</em> adı
      @@ -227,20 +255,20 @@
             gibi sunulması nedeniyle bu işlem normal vekaletten farklıdır.</p>
       
           <p>Aşağıdaki örnekte, istemci <code>/foo/</code> dizini altından bir belge
      -      istemekte, sunucu ise bu belgeyi <code>dahili.mesela.dom</code>
      +      istemekte, sunucu ise bu belgeyi <code>dahili.example.com</code>
             üzerindeki <code>/bar/</code> dizininden alıp istemciye yerel sunucudan
             geliyormuş gibi sunmaktadır:</p>
       
      -    <example>
      -      ProxyPass /foo/ http://dahili.mesela.dom/bar/<br />
      -      ProxyPassReverse /foo/ http://dahili.mesela.dom/bar/<br />
      -      ProxyPassReverseCookieDomain dahili.mesela.dom harici.mesela.dom<br />
      -      ProxyPassReverseCookiePath /foo/ /bar/
      -    </example>
      +    <highlight language="config">
      +ProxyPass "/foo/" "http://dahili.example.com/bar/"
      +ProxyPassReverse "/foo/" "http://dahili.example.com/bar/"
      +ProxyPassReverseCookieDomain dahili.example.com harici.example.com
      +ProxyPassReverseCookiePath "/foo/" "/bar/"
      +    </highlight>
       
           <p><directive module="mod_proxy">ProxyPass</directive> sunucuyu uygun
             belgeleri alması için yapılandırırken <directive module="mod_proxy"
      -      >ProxyPassReverse</directive> yönergesi <code>dahili.mesela.dom</code>
      +      >ProxyPassReverse</directive> yönergesi <code>dahili.example.com</code>
             sunucusundan kaynaklanan yönlendirmeleri yeniden yazar, böylece bunların
             yerel sunucudaki yerleri belirlenmiş olur. Benzer şekilde,  <directive
             module="mod_proxy">ProxyPassReverseCookieDomain</directive> ve
      @@ -249,12 +277,20 @@
       
           <p>Yalnız, belgelerin içindeki hiperbağların yeniden yazılmayacağına
             dikkat ediniz. Dolayısıyla, belge içinde
      -      <code>dahili.mesela.dom</code>’u ismiyle hedef alan mutlak hiperbağlar
      +      <code>dahili.example.com</code>’u ismiyle hedef alan mutlak hiperbağlar
             varsa bunlar istemci tarafından vekil sunucudan değil doğrudan
      -      <code>dahili.mesela.dom</code>’dan istenecektir. Üçüncü parti modüller
      -      arasında HTML ve XHTML’de hiperbağları yeniden yazabilen <a
      -      href="http://apache.webthing.com/mod_proxy_html/" >mod_proxy_html</a>
      -      adında bir modül vardır.</p>
      +      <code>dahili.example.com</code>’dan istenecektir. Bir sayfanın içindeki bu
      +      bağları (ve diğer içeriği) <module>mod_substitute</module> modülü
      +      kullanılarak istemciye sunuluyormuşçasına değiştirebilirsiniz.</p>
      +
      +    <highlight language="config">
      +Substitute "s/dahili\.example\.com/harici.example.com/i"
      +    </highlight>
      +
      +     <p>HTML ve XHTML’de hiperbağları daha bilgece yeniden yazabilen
      +      <module>mod_proxy_html</module> modülü de kullanılabilir. Yeniden
      +      yazılması gereken URL eşlemlerini oluşturmanızı sağlar, böylece karmaşık
      +      vekil senaryoları oluşturulabilir.</p>
       </section>
       
       <section id="rewrite"><title>Yeniden Yazma Motoru</title>
      @@ -286,8 +322,8 @@
           <p>"Dosya orada yok" ("File Not Found") hatalarının diğer bir bildik
             sebebi de URL’lerin hiperbağlarda veya doğrudan tarayıcıda kasıtlı ya da
             kasıtsız, yanlış yazılmasıdır. Bu tür sorunlarda yardımcı olması için
      -      Apache <module>mod_speling</module> (sic) adında bir modülle gelir. Bu
      -      modül etkin kılındığında Apache, "Dosya orada yok" ("File Not Found")
      +      httpd <module>mod_speling</module> (sic) adında bir modülle gelir. Bu
      +      modül etkin kılındığında htpd, "Dosya orada yok" ("File Not Found")
             hatalarının önünü kesip başka bir yerde benzer isimde bir dosya var mı
             diye bakar. Böyle bir dosya varsa, <module>mod_speling</module>
             istemciye dosyanın doğru yerini bildiren bir HTTP yönlendirmesi yollar.
      @@ -303,6 +339,12 @@
             yönlendirmesine konu olmasına sebep olarak sunucunun yükünü
             arttırabilir.</p>
       
      +    <p><module>mod_dir</module> modülü sanal URI'leri, onları sunan gerçek
      +      kaynağa eşlemekte kullanılan <directive module="mod_dir"
      +      >FallbackResource</directive> yönergesini içerir. Bir 'ön denetleyici'
      +      gerçeklerken <module>mod_rewrite</module> modülünün kullanılmasını
      +      sağlamak için çok kullanışlıdır.</p>
      +
           <p>Yerinde bulunmayan içeriğin bulunması çabalarının tümü Apache’nin 404
             (Dosya orada yok) HTTP durum kodlu bir hata sayfası döndürmesine yol
             açar. Bu sayfanın içeriği <directive module="core"
      @@ -312,4 +354,27 @@
             kişiselleştirilebilir.</p>
       </section>
       
      +<section id="other"><title>Diğer URL Eşleme Modülleri</title>
      +
      +<!-- TODO Flesh out each of the items in the list below. -->
      +
      +    <p>URL eşlemede kullanılabilecek diğer modüller:</p>
      +
      +    <ul>
      +    <li><module>mod_actions</module> - Bir isteği, özkaynağın MIME türüne veya
      +      istek yöntemine bakarak bir CGI betiğine eşler.</li>
      +
      +    <li><module>mod_dir</module> - URL'yi sonlandıran bölü çizgisini
      +      <code>index.html</code> bir dosyaya eşler.</li>
      +
      +    <li><module>mod_imagemap</module> - Bir isteği, bir HTML belge içindeki
      +      bir resme yapılan kullanıcı tıklamalarına dayanarak bir URL'ye
      +      eşler.</li>
      +
      +    <li><module>mod_negotiation</module> - Dil veya içerik sıkıştırması gibi
      +      kullanıcı tercihlerine dayanarak uygun bir belgeyi seçer.</li>
      +    </ul>
      +
      +</section>
      +
       </manualpage>
      diff --git a/docs/manual/vhosts/details.html.en b/docs/manual/vhosts/details.html.en
      index 07f3cf507da..9d33f61a605 100644
      --- a/docs/manual/vhosts/details.html.en
      +++ b/docs/manual/vhosts/details.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>An In-Depth Discussion of Virtual Host Matching - Apache HTTP Server</title>
      +<title>An In-Depth Discussion of Virtual Host Matching - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>An In-Depth Discussion of Virtual Host Matching</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>An In-Depth Discussion of Virtual Host Matching</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../en/vhosts/details.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -42,7 +47,7 @@
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing">Configuration File</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#hostmatching">Virtual Host Matching</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#tips">Tips</a></li>
      -</ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="name-based.html">Name-based Virtual Hosts Support</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li></ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="name-based.html">Name-based Virtual Hosts Support</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="configparsing" id="configparsing">Configuration File</a></h2>
      @@ -78,7 +83,7 @@
           <p>(Port numbers specified in the <code>VirtualHost</code> directive do
           not influence what port numbers Apache will listen on, they only control
           which <code>VirtualHost</code> will be selected to handle a request.
      -    Use the <code class="directive"><a href="../mod/core.html#listen">Listen</a></code> directive to
      +    Use the <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> directive to
           control the addresses and ports on which the server listens.)
           </p>
       
      @@ -106,19 +111,21 @@
           ServerAlias.  It is also used for all SSL connections if the
           server does not support <a class="glossarylink" href="../glossary.html#servernameindication" title="see glossary">Server Name Indication</a>.</p>
       
      +    <p>The complete list of names in the <code>VirtualHost</code>
      +    directive are treated just like a (non wildcard) <code>ServerAlias</code> 
      +    (but are not overridden by any <code>ServerAlias</code> statement).</p>
      +
           <p>For every vhost various default values are set. In
           particular:</p>
       
           <ol>
             <li>If a vhost has no <code class="directive"><a href="../mod/core.html#serveradmin">ServerAdmin</a></code>,
      -      <code class="directive"><a href="../mod/core.html#resourceconfig">ResourceConfig</a></code>,
      -      <code class="directive"><a href="../mod/core.html#accessconfig">AccessConfig</a></code>,
             <code class="directive"><a href="../mod/core.html#timeout">Timeout</a></code>,
             <code class="directive"><a href="../mod/core.html#keepalivetimeout">KeepAliveTimeout</a></code>,
             <code class="directive"><a href="../mod/core.html#keepalive">KeepAlive</a></code>,
             <code class="directive"><a href="../mod/core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></code>,
      -      <code class="directive"><a href="../mod/core.html#receivebuffersize">ReceiveBufferSize</a></code>,
      -      or <code class="directive"><a href="../mod/core.html#sendbuffersize">SendBufferSize</a></code>
      +      <code class="directive"><a href="../mod/mpm_common.html#receivebuffersize">ReceiveBufferSize</a></code>,
      +      or <code class="directive"><a href="../mod/mpm_common.html#sendbuffersize">SendBufferSize</a></code>
             directive then the respective value is inherited from the
             main server. (That is, inherited from whatever the final
             setting of that value is in the main server.)</li>
      @@ -314,7 +321,28 @@
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/details.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/details.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/details.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/details.html.fr b/docs/manual/vhosts/details.html.fr
      index 1aee3d9d888..95df0fafe27 100644
      --- a/docs/manual/vhosts/details.html.fr
      +++ b/docs/manual/vhosts/details.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Dtails sur le fonctionnement des serveurs virtuels - Serveur Apache HTTP</title>
      +<title>Dtails sur le fonctionnement des serveurs virtuels - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Dtails sur le fonctionnement des serveurs virtuels</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Dtails sur le fonctionnement des serveurs virtuels</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../en/vhosts/details.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/details.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -46,7 +51,7 @@
       d'adresse IP</a></li><li><a href="name-based.html">Support des serveurs virtuels  base
       de nom</a></li><li><a href="examples.html">Exemples de serveurs virtuels pour une
       configuration courante</a></li><li><a href="mass.html">Hbergement virtuel de masse configur
      -dynamiquement</a></li></ul></div>
      +dynamiquement</a></li><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="configparsing" id="configparsing">Fichier de configuration</a></h2>
      @@ -54,7 +59,7 @@ dynamiquement</a></li></ul></div>
           <p>Un <em>serveur  principal (main_server)</em> contient toutes
           les dfinitions qui apparaissent en dehors des sections
           <code>&lt;VirtualHost&gt;</code>.</p>
      -    
      +
           <p>Les serveurs virtuels, aussi
           appels <em>vhosts</em> (pour virtual hosts), sont dfinis par les
           sections <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
      @@ -84,7 +89,7 @@ dynamiquement</a></li></ul></div>
           <code>VirtualHost</code> ; ces derniers ne servent qu' dfinir le
           <code>serveur virtuel</code> qui sera slectionn pour traiter la
           requte. Pour dfinir les ports sur lesquels Apache est en coute,
      -    utilisez la directive <code class="directive"><a href="../mod/core.html#listen">Listen</a></code>).
      +    utilisez la directive <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>).
           </p>
       
           <p>L'ensemble des adresses (y compris les rsultats multiples
      @@ -111,20 +116,23 @@ dynamiquement</a></li></ul></div>
           correspondant. Il sera aussi utilis pour toutes les connexions SSL
           si le serveur ne supporte pas l'<a class="glossarylink" href="../glossary.html#servernameindication" title="voir glossaire">Indication du nom du serveur</a>.</p>
       
      +    <p>Tous les noms spcifis au sein d'une section
      +    <code>VirtualHost</code> sont traits comme un
      +    <code>ServerAlias</code> (sans caractres gnriques), mais ne sont
      +    crass par aucune directive <code>ServerAlias</code>.</p>
      +
           <p>Pour chaque serveur virtuel, diverses valeurs sont initialises
           par dfaut. En particulier&nbsp;:</p>
       
           <ol>
             <li>Dans le cas o un serveur virtuel ne contient pas de directives
             <code class="directive"><a href="../mod/core.html#serveradmin">ServerAdmin</a></code>,
      -      <code class="directive"><a href="../mod/core.html#resourceconfig">ResourceConfig</a></code>,
      -      <code class="directive"><a href="../mod/core.html#accessconfig">AccessConfig</a></code>,
             <code class="directive"><a href="../mod/core.html#timeout">Timeout</a></code>,
             <code class="directive"><a href="../mod/core.html#keepalivetimeout">KeepAliveTimeout</a></code>,
             <code class="directive"><a href="../mod/core.html#keepalive">KeepAlive</a></code>,
             <code class="directive"><a href="../mod/core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></code>,
      -      <code class="directive"><a href="../mod/core.html#receivebuffersize">ReceiveBufferSize</a></code>,
      -      ou <code class="directive"><a href="../mod/core.html#sendbuffersize">SendBufferSize</a></code>,
      +      <code class="directive"><a href="../mod/mpm_common.html#receivebuffersize">ReceiveBufferSize</a></code>,
      +      ou <code class="directive"><a href="../mod/mpm_common.html#sendbuffersize">SendBufferSize</a></code>,
             alors la valeur de chacun de ces paramtres est hrite de celle du
             serveur principal. (C'est  dire, hrite de la valeur finale aprs
             lecture de la configuration du serveur principal.)</li>
      @@ -185,7 +193,7 @@ dynamiquement</a></li></ul></div>
           <p>S'il existe des dfinitions <code>VirtualHost</code> pour
           l'adresse IP, l'tape suivante consiste  dterminer si nous avons 
           faire  un serveur virtuel  base de nom ou d'adresse IP.</p>
      -    
      +
           
       
           <h3><a name="ipbased" id="ipbased">Serveur virtuel par IP</a></h3>
      @@ -334,7 +342,28 @@ dynamiquement</a></li></ul></div>
       <a href="../fr/vhosts/details.html" title="Franais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/details.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/details.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/details.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/details.html.ko.euc-kr b/docs/manual/vhosts/details.html.ko.euc-kr
      index ab7c0452f97..697d7c9cfac 100644
      --- a/docs/manual/vhosts/details.html.ko.euc-kr
      +++ b/docs/manual/vhosts/details.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ȣƮ ã⿡  ڼ  - Apache HTTP Server</title>
      +<title>ȣƮ ã⿡  ڼ  - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ȣƮ ã⿡  ڼ </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ȣƮ ã⿡  ڼ </h1>
       <div class="toplang">
       <p><span> : </span><a href="../en/vhosts/details.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -39,7 +44,7 @@
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing"> б</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#hostmatching">ȣƮ ã</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#tips"></a></li>
      -</ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="configparsing" id="configparsing"> б</a></h2>
      @@ -380,7 +385,28 @@
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/details.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/details.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/details.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/details.html.tr.utf8 b/docs/manual/vhosts/details.html.tr.utf8
      index e810a2ef5f4..c77edc7edc0 100644
      --- a/docs/manual/vhosts/details.html.tr.utf8
      +++ b/docs/manual/vhosts/details.html.tr.utf8
      @@ -1,177 +1,106 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Sanal Konak Eşlemenin Derinliğine İncelenmesi - Apache HTTP Sunucusu</title>
      +<title>Sanal Konak Eşlemenin Derinliğine İncelenmesi - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Sanal Konak Eşlemenin Derinliğine İncelenmesi</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Sanal Konak Eşlemenin Derinliğine İncelenmesi</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/details.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/details.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/details.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
       
      -    <p>Sanal konak kodu <strong>Apache 1.3</strong> sürümünde baştan yeniden
      -      yazıldı. Bu belgede, bir istek aldığında Apache’nin hangi sanal konak
      -      ile hizmet sunacağına nasıl karar verdiği açıklanmaya çalışılmıştır.
      -      <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesi sayesinde
      -      sanal konak yapılandırması 1.3 sürümünün öncesine göre daha kolay ve
      -      daha güvenilir hale gelmiştir.</p>
      +    <p>Bu belgede, bir istek aldığında Apache’nin hangi sanal konak
      +      ile hizmet sunacağına nasıl karar verdiği açıklanmaya çalışılmıştır.</p>
      +
      +    <p>Çoğu kullanıcı hangi türü kullanacağına karar vermek için önce <a href="name-based.html#namevip">İsme dayalı ve IP’ye dayalı Sanal
      +      Konak</a> bölümünü, sonra <a href="name-based.html">İsme Dayalı Sanal
      +      Konak Desteği</a> veya <a href="ip-based.html">IP’ye Dayalı Sanal Konak
      +      Desteği</a> belgesini okumalı ve <a href="examples.html">bazı
      +      örneklere</a> göz atmalıdır.</p>
       
      -    <p>Sanal konakların nasıl çalıştığını öğrenmeden sadece çalıştırmak
      -      isterseniz doğrudan <a href="examples.html">örneklerin bulunduğu
      -      sayfaya</a> bakabilirsiniz.</p>
      +    <p>Bunlardan sonra tüm ayrıntıları anlamak isterseniz tekrar bu sayfaya
      +      gelebilirsiniz.</p>
       
       </div>
      -<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing">Yapılandırma Dosyasının Çözümlenmesi</a></li>
      +<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#configparsing">Yapılandırma Dosyası</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#hostmatching">Sanal Konağın Belirlenmesi</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#tips">İpuçları</a></li>
      -</ul></div>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="ip-based.html">IP’ye Dayalı Sanal Konak Desteği</a></li><li><a href="name-based.html">İsme Dayalı Sanal Konak Desteği</a></li><li><a href="examples.html">Çok Kullanılan Sanal Konak Örnekleri</a></li><li><a href="mass.html">Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma</a></li><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      -<h2><a name="configparsing" id="configparsing">Yapılandırma Dosyasının Çözümlenmesi</a></h2>
      +<h2><a name="configparsing" id="configparsing">Yapılandırma Dosyası</a></h2>
       
           <p>Bu belgede <code>&lt;VirtualHost&gt;</code> bölümleri dışında kalan
      -      tanımlardan bahsederken <em>ana_sunucu</em>, <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümlerindeki tanımlamalardan
      -      bahsederken <em>sankonlar</em> diyeceğiz.</p>
      -
      -    <p><code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>,
      -      <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>,
      -      <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> ve
      -      <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergeleri bir sunucu
      -      yapılandırmasının her yerinde karşımıza çıkabilir. Bununla birlikte,
      -      sunucu dahilinde son göründükleri yerlerde önceki eşdeğerlerini geçersiz
      -      kılarlar.</p>
      -
      -    <p><code>Listen</code> yönergesinin ana_sunucu için öntanımlı değeri
      -      80’dir. <code>ServerPath</code> ve <code>ServerAlias</code>
      -      yönergelerinin ana_sunucu için öntanımlı değerleri yoktur. Öntanımlı
      -      <code>ServerName</code> değeri ise sunucunun IP adresinden elde
      -      edilir.</p>
      -
      -    <p>Ana_sunucu <code>Listen</code> yönergesinin iki işlevi vardır. Biri
      -      Apache’nin dinleyeceği öntanımlı ağ portunu belirlemek, diğeri ise
      -      yönlendirmeler sırasında mutlak URI’lerde kullanılan port numarasını
      -      belirlemektir.</p>
      -
      -    <p>Ana_sunucunun aksine sankonların portları Apache‘nin dinleyeceği
      -      portlar üzerinde etkili değildir.</p>
      +      tanımlardan bahsederken <em>ana_sunucu</em> diyeceğiz.</p>
      +
      +    <p><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      +      bölümlerindeki tanımlamalardan bahsederken <em>sankonlar</em>
      +      diyeceğiz.</p>
      +
      +    <p>Her <code>VirtualHost</code> bölümü en az bir adres ve isteğe bağlı
      +      portlar içerir.</p>
      +
      +    <p>Sanal konak tanımlarının içindeki IP adreslerinin yerine konak isimleri
      +      kullanılabilir, fakat bunlar başlatma sırasında çözümleneceklerinden
      +      çözümlemedeki bir başarısızlık bu sanal konak tanımlarının yoksayılması
      +      ile sonuçlanacaktır. Bu bakımdan önerilmez.</p>
       
           <p><code>VirtualHost</code> yönergesinde görünen her adresin seçimlik bir
      -      portu olabilir. Eğer bir port belirtilmemişse öntanımlı olarak
      -      ana_sunucunun son <code>Listen</code> yönergesinin değeri kullanılır.
      -      Port olarak <code>*</code> belirtildiği takdirde bütün portlar dinlenir.
      -      Adreslerin tamamını (DNS sorgularındaki çoklu A kayıtları dahil) içeren
      -      kümeye sankonların <em>adres kümesi</em> denir.</p>
      -
      -    <p><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesi ilk
      -      sankonun IP adresi için kullanılmadığı takdirde bu IP adresine sahip ilk
      -      sankon IP’ye dayalı sankon olarak ele alınır. IP adresi olarak
      -      <code>*</code> belirtmek de mümkündür.</p>
      -
      -    <p>Eğer isme dayalı sankonlar kullanılacaksa <code>NameVirtualHost</code>
      -      yönergesinin bu isme dayalı sankonların IP adresi kümesini içermesi
      -      <em>gerekir</em>. Başka bir deyişle, yapılandırma dosyanızın
      -      <code>NameVirtualHost</code> yönergesine sankonların sunucu isimlerinin
      -      karşı düştüğü IP adresini yazmalısınız.</p>
      -
      -    <p>Çok sayıda <code>NameVirtualHost</code> yönergesi belirtebilirse de her
      -      IP:port çifti için birden fazla <code>NameVirtualHost</code> yönergesi
      -      belirtilmemelidir.</p>
      -
      -    <p>Aşağıdaki iki örneğin eşdeğer olması için <code>NameVirtualHost</code>
      -      ve <code>VirtualHost</code> yönergelerinin sıralamasının bir önemi
      -      yoktur. (Sadece <em>tek</em> adreslik küme içindeki
      -      <code>VirtualHost</code> yönergelerinin sırası önemlidir; aşağıya
      -      bakınız:)</p>
      -
      -<table><tr>
      -<td><div class="example"><p><code>
      -  NameVirtualHost 111.22.33.44<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu A<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu B<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  <br />
      -  NameVirtualHost 111.22.33.55<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu C<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu D<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;
      -</code></p></div></td>
      -<td><div class="example"><p><code>
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu A<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu C<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu B<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu D<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  <br />
      -  NameVirtualHost 111.22.33.44<br />
      -  NameVirtualHost 111.22.33.55<br />
      -  <br />
      -</code></p></div></td>
      -</tr></table>
      -
      -
      -    <p>(Okuma kolaylığı bakımından soldaki sürümü tercih etmenizi öneririz.)
      -    </p>
      -
      -    <p><code>VirtualHost</code> yönergesi çözümlendikten sonra sankon
      -      sunucusuna yönergedeki ilk isme atanmış portun öntanımlı olduğu bir
      -      <code>Listen</code> verilir.</p>
      -
      -    <p>Eğer tüm <code>VirtualHost</code> isimlerinin listesi aynı adres
      -      kümesine çözümleniyorsa bu isimler birer <code>ServerAlias</code> gibi
      -      ele alınırlar (bir <code>ServerAlias</code> yönergesi ile geçersiz
      -      kılınmadıkça). Bir sankon tanımından sonra gelen <code>Listen</code>
      -      satırlarının o sankonun adres kümesine atanmış portlara bir etkisinin
      -      olmayacağına dikkat ediniz.</p>
      -
      -    <p>İsim listeleri IP adreslerine göre gruplanır ve bir çiftler tablosuna
      -      kaydedilir. Eğer IP adresi bir <code>NameVirtualHost</code> yönergesinde
      -      kullanılmışsa, liste bu IP adresi için tanımlanmış tüm sankonları
      -      içerir. Eğer bu IP adresinin tanımlandığı bir sankon yoksa o
      -      <code>NameVirtualHost</code> yönergesi yoksayılır ve günlüğe bir hata
      -      kaydı düşülür. IP’ye dayalı sankonlar için çiftler listesinde isim
      -      alanları boştur.</p>
      -
      -    <p>Çiftler listesini işleyen işlevin hızı nedeniyle bir istek sırasında IP
      -      adresine göre gruplama yaparken kaynak harcaması en düşük düzeyde olur
      -      hatta neredeyse hiç olmaz. Ek olarak, tablo, IP adresinin son
      -      sekizlisindeki değişikliklere göre de en iyilenir.</p>
      +      portu olabilir. Eğer bir port belirtilmemişse, port olarak <code>*</code>
      +      belirtilmiş gibi bütün portlar dinlenir.</p>
      +
      +    <p>(<code>VirtualHost</code> yönergesinde belirtilen port numaraları Apache
      +      httpd'nin dinleyeceği port numaraları olarak yorumlanmaz, sadece bir
      +      isteği işleme sokarken hangi <code>VirtualHost</code> bölümünün
      +      seçileceğini belirlerler. Sunucunun dinleyeceği adresleri ve portları
      +      belirtmek için <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
      +      yönergesini kullanın.)</p>
      +
      +    <p>Adreslerin tamamını (DNS sorgularındaki çoklu sonuçlar dahil) içeren
      +      kümeye <em>sankonların adres kümesi</em> denir.</p>
      +
      +    <p>Apache httpd, bir IP adresi ve port birleşimi için en belirgin
      +      eşleşmelerin listelendiği çok sayıdaki sanal konak arasında ayırdedici
      +      olarak istemci tarafından sağlanan HTTP <code>Host</code> başlığını
      +      kullanır.</p>
      +
      +    <p><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesi sunucu
      +      tanımının içinde herhangi bir yerde görünebilirse de her göründüğü yerde
      +      bir öncekini iptal eder. Hiç <code>ServerName</code> belirtilmemişse,
      +      Apache httpd, sunucu ismini sunucunun IP adresinden saptamaya
      +      çalışır.</p>
      +
      +    <p>Belli bir IP adresi ve port çifti için yapılandırma dosyasındaki ilk
      +      isme dayalı sankon önemlidir, çünkü başka hiçbir sankonun ServerName veya
      +      ServerAlias yönergesi ile eşleşmeyen bu adres ve port çifti için alınmış
      +      tüm isteklerde bu sankon kullanılır. Ayrıca, sunucunun <a class="glossarylink" href="../glossary.html#servernameindication" title="sözlüğe bakınız">Sunucu İsmi Belirtimi</a>ni
      +      desteklemediği durumlarda tüm SSL bağlantıları için bu sankon
      +      kullanılır.</p>
      +
      +    <p><code>VirtualHost</code> içindeki isimlerin sırası (jokersiz) bir
      +      <code>ServerAlias</code> gibi ele alınır (fakat hiçbir
      +      <code>ServerAlias</code> yönergesi ile geçersiz kılınmaz).</p>
       
           <p>Her sankon için bazı değerler öntanımlı olarak atanır. Bunların
             başlıcaları:</p>
      @@ -179,14 +108,12 @@
           <ol>
             <li>Sankon bir <code class="directive"><a href="../mod/core.html#serveradmin">ServerAdmin</a></code>
               yönergesi içermiyorsa,
      -        <code class="directive"><a href="../mod/core.html#resourceconfig">ResourceConfig</a></code>,
      -        <code class="directive"><a href="../mod/core.html#accessconfig">AccessConfig</a></code>,
               <code class="directive"><a href="../mod/core.html#timeout">Timeout</a></code>,
               <code class="directive"><a href="../mod/core.html#keepalivetimeout">KeepAliveTimeout</a></code>,
               <code class="directive"><a href="../mod/core.html#keepalive">KeepAlive</a></code>,
               <code class="directive"><a href="../mod/core.html#maxkeepaliverequests">MaxKeepAliveRequests</a></code>,
      -        <code class="directive"><a href="../mod/core.html#receivebuffersize">ReceiveBufferSize</a></code> ve
      -        <code class="directive"><a href="../mod/core.html#sendbuffersize">SendBufferSize</a></code> yönergeleri için
      +        <code class="directive"><a href="../mod/mpm_common.html#receivebuffersize">ReceiveBufferSize</a></code> ve
      +        <code class="directive"><a href="../mod/mpm_common.html#sendbuffersize">SendBufferSize</a></code> yönergeleri için
               öntanımlı değerler ana_sunucudaki eşdeğerlerinden miras alınır. (Yani,
               bu yönergeler için ana_sunucudaki son değerler miras alınır.)</li>
       
      @@ -226,70 +153,66 @@
           <p>Sunucu bir istek durumunda hangi sankonun kullanılacağını şöyle
             belirler:</p>
       
      -    <h3><a name="hashtable" id="hashtable">Değer çiftleri tablosu aranır</a></h3>
      +    <h3><a name="hashtable" id="hashtable">IP adresi aranır</a></h3>
       
      -    <p>Bir istemci tarafından bağlantı ilk yapıldığında önce IP-isim çiftleri
      -      tablosunda istemcinin bağlandığı IP adresi için bir arama yapılır.</p>
      +    <p>Bir adres ve port için bağlantı ilk alındığında Apache httpd tüm
      +      <code>VirtualHost</code> tanımlarında bu çifti arar.</p>
       
      -    <p>Arama başarısız olursa (IP adresi yoksa) hizmet, istekte belirtilen
      -      port için bir <code>_default_</code> sankon varsa, o sankondan, yoksa
      -      ana_sunucudan sunulur.</p>
      +    <p>Arama başarısız olursa <code>*</code> (herşey) eşleşmelerine
      +      bakılır.</p>
       
      -    <p>Eğer çiftler tablosunda IP adresi yoksa port numarası ile eşleştirme
      -      çabası ayrıca, diğer isme dayalı sanal konaklardaki gibi ard arda ele
      -      alınmayı gerektiren <code>NameVirtualHost *</code> durumundaki bir
      -      girdiyle sonuçlanabilir.</p>
      +    <p>Bir eşleşme bulunamazsa hizmet ana sunucudan sunulur.</p>
       
      -    <p>Arama sonucunda tabloda IP adresi bulunursa sonraki adım hizmetin bir
      -      IP’ye dayalı sankondan mı yoksa isme dayalı bir sankondan mı
      -      sunulacağına karar vermektir.</p>
      +    <p>Arama sonucunda bu IP adresi için bulunmuş <code>VirtualHost</code>
      +      tanımları varsa sonraki adım hizmetin bir IP’ye dayalı sankondan mı yoksa
      +      isme dayalı bir sankondan mı sunulacağına karar vermektir.</p>
       
           
       
           <h3><a name="ipbased" id="ipbased">IP’ye dayalı sankon</a></h3>
       
      -    <p>Eğer tabloda bulduğumuz girdinin isim alanları boşsa bir IP’ye dayalı
      -      sanal konak bulmuşuz demektir. Artık karar vermek için başka bir şey
      -      yapmaya gerek yoktur ve istek bu sankondan sunulur.</p>
      +    <p>Eğer en iyi eşleşme olarak saptanmış IP adresi ve port çiftini içeren
      +      sadece bir <code>VirtualHost</code> yönergesi varsa artık karar vermek
      +      için başka bir şey yapmaya gerek yoktur ve istek bu sankondan
      +      sunulur.</p>
       
           
       
           <h3><a name="namebased" id="namebased">İsme dayalı sankon</a></h3>
       
      -    <p>Tabloda bulduğumuz girdi için bir isim listesi varsa bir isme dayalı
      -      sankon sözkonusudur. Bu isim listesi, sankonları, ilgili
      -      <code>VirtualHost</code> bölümlerinin yapılandırma dosyasında yer alış
      -      sırasına göre içerir.</p>
      -
      -    <p>Bu listedeki ilk sankon (yapılandırma dosyasında belirtilen IP adresine
      -      sahip ilk sankon) en yüksek önceliğe sahiptir ve sunucu ismi
      -      belirtilmeyen veya <code>Host:</code> başlık alanı olmayan istekleri bu
      -      sankon karşılar.</p>
      -
      -    <p>Eğer istemci bir <code>Host:</code> başlık alanı ile istek yapmışsa
      -      liste bu sankon için aranır ve hizmet <code>ServerName</code> veya
      -      <code>ServerAlias</code> ile ilk eşleşmenin sağlandığı sankondan
      -      sunulur. <code>Host:</code> alanında bir port belirtilebilirse de Apache
      -      daima istemcinin isteği gönderdiği portu gerçek port kabul eder.</p>
      -
      -    <p>Eğer istemci <code>Host:</code> başlık alanı bulunmayan bir HTTP/1.0
      -      isteği yapmışsa istemcinin hangi sankona bağlanmayı denediğini bilemeyiz
      -      ve istekteki URI ile mevcut <code>ServerPath</code> değerini
      -      eşleştirmeye çalışırız. Listedekilerden ilk eşleşen yola sahip sankondan
      -      hizmeti sunarız.</p>
      -
      -    <p>İstekle eşleşen bir sankon bulunamazsa IP listesinde istemcinin
      -      bağlandığı portla eşleşen ilk sankondan hizmeti sunarız.</p>
      +    <p>Eğer en iyi eşleşme olarak saptanmış IP adresi ve port çiftini içeren
      +      birden fazla <code>VirtualHost</code> yönergesi varsa, sonraki
      +      adımlardaki "liste" eşleşen sankonların listesi olup sankonlar listede
      +      yapılandırma dosyasındaki yerlerine göre sıralanırlar.</p>
      +
      +    <p>Bağlantı SSL kullanıyorsa, sunucunun <a class="glossarylink" href="../glossary.html#servernameindication" title="sözlüğe bakınız">Sunucu İsmi Belirtimi</a>ni
      +      desteklediği durumlarda SSL istemci uzlaşımı, istenen konak ismiyle
      +      birlikte TLS eklentisini de içeriyorsa, konak ismi, SSL olmayan
      +      bağlantılardaki <code>Host:</code> başlığı kullanımına benzer şekilde
      +      aşağıdaki gibi kullanılır. Aksi takdirde, SSL bağlantıları için adresin
      +      eşleştiği ilk isme dayalı sankon kullanılır. Sunucunun bağlantı için
      +      hangi sertifikayı kullanacağını sankon belirlediği için bu önemlidir.</p>
      +
      +    <p>İstek bir <code>Host:</code> başlık alanı içeriyorsa, listede
      +      <code>ServerName</code> veya <code>ServerAlias</code> alanı başlık alanı
      +      ile eşleşen ilk sankona bakılır. <code>Host:</code> alanı bir port
      +      içerebilirse de Apache httpd bunu yoksayarak daima istemcinin isteği
      +      gönderdiği portu gerçek port kabul eder.</p>
      +
      +    <p>Yapılandırma dosyasındaki belirtilen IP adresiyle eşleşen ilk sankon en
      +      yüksek önceliğe sahiptir ve sunucu ismi bilinmeyen ve (bir HTTP/1.0
      +      isteği gibi) <code>Host:</code> başlık alanı içermeyen istekleri de
      +      yakalar.</p>
       
           
       
           <h3><a name="persistent" id="persistent">Kalıcı bağlantılar</a></h3>
       
      -    <p>Yukarıda açıklanan IP araması belli bir TCP/IP oturumunda bir defaya
      -      mahsus yapıldığı halde bir kalıcı/KeepAlive bağlantı sırasında her istek
      -      için ayrı bir arama yapılır. Başka bir deyişle, bir istemci tek bir
      -      kalıcı bağlantı üzerinde farklı isme dayalı sankonlardan sayfa talebinde
      -      bulunabilir.</p>
      +    <p>Yukarıda açıklanan <em>IP araması</em> belli bir TCP/IP oturumunda
      +      <em>bir</em> defaya mahsus yapıldığı halde bir kalıcı/KeepAlive bağlantı
      +      sırasında <em>her</em> istek için ayrı bir <em>arama</em> yapılır. Başka
      +      bir deyişle, bir istemci tek bir kalıcı bağlantı üzerinde farklı isme
      +      dayalı sankonlardan sayfa talebinde bulunabilir.</p>
       
           
       
      @@ -305,60 +228,35 @@
       <h3><a name="observations" id="observations">İzlenimler</a></h3>
       
           <ul>
      -      <li>Bir isme dayalı sankon asla bir IP’ye dayalı sankon ile (veya tersi)
      -        etkileşime girmez. IP’ye dayalı sankonlara sadece kendi adres
      -        kümesindeki bir IP adresi üzerinden erişilebilir, asla başka bir
      -        adresten erişilemez. Aynısı isme dayalı sankonlara da uygulanır;
      -        onlara sadece bir <code>NameVirtualHost</code> yönergesi ile
      -        tanımlanmış adres kümesindeki bir IP adresi üzerinden
      -        erişilebilir.</li>
      +      <li>İsme dayalı sanal konak işlemleri, sunucunun en iyi eşleşen IP'ye
      +        dayalı sanal konağı seçmesinin ardından uygulanır.</li>
      +
      +      <li>İstemcinin hangi IP adresine bağlandığını umursamıyorsanız, sanal
      +        konaklarınızda adres olarak "*" kullanın, böylece yapılandırılmış
      +        sankonların hepsine isme dayalı sanal konak işlemleri uygulanır.</li>
       
             <li>Bir IP’ye dayalı sankon için asla <code>ServerAlias</code> ve
               <code>ServerPath</code> değerine bakılmaz.</li>
       
      -      <li>Yapılandırma dosyası içinde isme/IP’ye dayalı ve
      -        <code>_default_</code> sankonlar ile <code>NameVirtualHost</code>
      -        yönergelerinin yer alış sırasının birbirlerine göre bir önemi yoktur.
      -        Sıralama sadece aynı IP adresine sahip isme dayalı sankonlar arasında
      +      <li>Sıralama sadece aynı IP adresine sahip isme dayalı sankonlar arasında
               önemlidir. Aynı adres kümesine mensup isme dayalı sankonlardan
               yapılandırma dosyasında ilk sırada yer alanı en yüksek önceliğe
               sahiptir.</li>
       
      -      <li>Güvenlik saikiyle, eşleştirme işlemi sırasında <code>Host:</code>
      -        başlık alanında belirtilen port asla kullanılmaz. Apache daima
      -        istemcinin bağlantı kurduğu gerçek portu kullanır.</li>
      -
      -      <li>Değeri başka bir <code>ServerPath</code> yönergesinin değeri için
      -        önek olan bir <code>ServerPath</code> yönergesi yapılandırma
      -        dosyasında daha önce yer alıyorsa sonrakiyle eşleşme asla
      -        gerçekleşmez. (Bu belirsizliği giderecek bir <code>Host:</code> başlık
      -        alanının mümkün olmadığı varsayılır.)</li>
      -
      -      <li>Eğer tek bir IP adresine sahip IP’ye dayalı iki sankon varsa eşleşme
      -        daima yapılandırma dosyasında ilk yer alanla gerçekleşir. Böyle bir
      -        şey kasten yapılmaz. Sunucu böyle bir durumu saptadığında hata
      -        günlüğünde bir uyarı verecektir.</li>
      -
      -      <li>Bir <code>_default_</code> sankon sadece istekle eşleşen bir IP
      -        adresi bulunamadığında port numarası eşleştiği takdirde isteğe hizmet
      -        sunabilir. Port düzeyinde eşleşmenin olabilmesi için isteğin geldiği
      -        port ile sankon için belirtilen port eşleşmelidir. Olası tüm portlarla
      -        eşleşmeyi sağlamak üzere yıldız imi (<code>_default_:*</code>
      -        şeklinde) kullanılabilir. Aynı şey <code>NameVirtualHost *</code>
      -        sankonlarına da uygulanır.</li>
      +      <li>Eşleştirme işlemi sırasında <code>Host:</code>
      +        başlık alanında belirtilen port asla kullanılmaz. Apache httpd daima
      +        istemcinin isteği gönderdiği gerçek portu kullanır.</li>
      +
      +      <li>Eğer aynı IP adresine sahip IP’ye dayalı iki sankon varsa, bunlara
      +        örtük olarak isme dayalı sanal konak işlemleri uygulanır. 2.3.11
      +        sürümünden beri yeni davranış şekli budur.</li>
       
             <li>Ana_sunucunun bir isteğe hizmet sunabilmesi için istemcinin
               bağlandığı IP adresi ve port hiçbir yerde belirtilmemiş ve
      -        <code>_default_</code> dahil hiçbir sankon ile eşleşme sağlanamamış
      -        olmalıdır. Başka bir deyişle, istemcinin bağlandığı port ile eşleşen
      -        bir <code>_default_</code> sankon olmadıkça adres ve port belirtmeyen
      -        bir isteğe ana_sunucu yanıt verecektir.</li>
      -
      -      <li><code>Host:</code> başlık alanı içermeyen veya hedefi bilinmeyen bir
      -        istek geldiği takdirde, eğer bu istemcinin bağlandığı adres ve port
      -        için (örneğin, <code>NameVirtualHost</code> ile) tanımlanmış bir isme
      -        dayalı sankon varsa bu isteğe ne ana_sunucu ne de bir
      -        <code>_default_</code> sankon hizmet sunabilir.</li>
      +        hiçbir sankon ile eşleşme sağlanamamış olmalıdır. Başka bir deyişle,
      +        istemcinin bağlandığı port ile eşleşen bir <code>_default_</code>
      +        sankon olmadıkça adres ve port belirtmeyen bir isteğe ana_sunucu yanıt
      +        verecektir.</li>
       
             <li><code>VirtualHost</code> yönergelerinde asla DNS isimleri
               belirtmemelisiniz. Aksi takdirde sunucuyu başlatma sırasında DNS
      @@ -380,21 +278,12 @@
             ipuçlarına ilaveten burada da bazı ipuçları bulacaksınız:</p>
       
           <ul>
      -      <li>Ana_sunucu tanımlarının hepsini <code>VirtualHost</code>
      +      <li>Ana sunucu tanımlarının hepsini <code>VirtualHost</code>
               tanımlarının öncesinde bitirin. Bu ayrıca yapılandırmanızın
               okunabilirliğini de arttırır; <code>VirtualHost</code> tanımlarının
               sonrasına sarkan yapılandırmaların katıştırılması işlemi tüm sanal
               konakları etkileyebilen tanımlar bakımından bir
               karışıklığa/belirsizliğe sebep olabilir.)</li>
      -
      -      <li>Birbirleriyle ilgili <code>NameVirtualHost</code> ve
      -        <code>VirtualHost</code> tanımlarını okunabilirliği arttırmak için
      -        gruplayın.</li>
      -
      -      <li>Değeri başka bir <code>ServerPath</code> için önek olan tanımlamalar
      -        yapmaktan kaçının. Bundan kaçınamıyorsanız, yolu uzun olanı yolu kısa
      -        olanın öncesine yerleştirin. Örneğin, "ServerPath /abc/def" önce
      -        "ServerPath /abc" sonra yer alsın.</li>
           </ul>
       
       </div></div>
      @@ -403,7 +292,28 @@
       <a href="../fr/vhosts/details.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/details.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/details.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/details.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/details.xml b/docs/manual/vhosts/details.xml
      index c84f4aba313..3a1c6c1541e 100644
      --- a/docs/manual/vhosts/details.xml
      +++ b/docs/manual/vhosts/details.xml
      @@ -80,7 +80,7 @@
           <p>(Port numbers specified in the <code>VirtualHost</code> directive do
           not influence what port numbers Apache will listen on, they only control
           which <code>VirtualHost</code> will be selected to handle a request.
      -    Use the <directive module="core">Listen</directive> directive to
      +    Use the <directive module="mpm_common">Listen</directive> directive to
           control the addresses and ports on which the server listens.)
           </p>
       
      @@ -109,19 +109,21 @@
           server does not support <glossary
           ref="servernameindication">Server Name Indication</glossary>.</p>
       
      +    <p>The complete list of names in the <code>VirtualHost</code>
      +    directive are treated just like a (non wildcard) <code>ServerAlias</code> 
      +    (but are not overridden by any <code>ServerAlias</code> statement).</p>
      +
           <p>For every vhost various default values are set. In
           particular:</p>
       
           <ol>
             <li>If a vhost has no <directive module="core">ServerAdmin</directive>,
      -      <directive module="core">ResourceConfig</directive>,
      -      <directive module="core">AccessConfig</directive>,
             <directive module="core">Timeout</directive>,
             <directive module="core">KeepAliveTimeout</directive>,
             <directive module="core">KeepAlive</directive>,
             <directive module="core">MaxKeepAliveRequests</directive>,
      -      <directive module="core">ReceiveBufferSize</directive>,
      -      or <directive module="core">SendBufferSize</directive>
      +      <directive module="mpm_common">ReceiveBufferSize</directive>,
      +      or <directive module="mpm_common">SendBufferSize</directive>
             directive then the respective value is inherited from the
             main server. (That is, inherited from whatever the final
             setting of that value is in the main server.)</li>
      diff --git a/docs/manual/vhosts/details.xml.fr b/docs/manual/vhosts/details.xml.fr
      index 950f4b7f4b0..6d6c445ae45 100644
      --- a/docs/manual/vhosts/details.xml.fr
      +++ b/docs/manual/vhosts/details.xml.fr
      @@ -1,7 +1,7 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision: 1174747 -->
      +<!-- English Revision : 1344668 -->
       <!-- French translation by Vincent Deffontaines, review by alain B -->
       <!-- Updated by Lucien Gentis -->
       
      @@ -24,295 +24,298 @@
       
       <manualpage metafile="details.xml.meta">
       <parentdocument href="./">Serveurs virtuels</parentdocument>
      -   <title>Dtails sur le fonctionnement des serveurs virtuels</title>
      +   <title>Détails sur le fonctionnement des serveurs virtuels</title>
       
       <summary>
       
      -    <p>Ce document vise  expliquer dans le dtail comment le serveur
      -    HTTP Apache procde lors du choix de l'utilisation
      -    d'un serveur virtuel en fonction d'une requte reue.</p>
      +    <p>Ce document vise à expliquer dans le détail comment le serveur
      +    HTTP Apache procède lors du choix de l'utilisation
      +    d'un serveur virtuel en fonction d'une requête reçue.</p>
       
      -    <p>Il est recommand de lire la documentation<a href="name-based.html#namevip">
      -    Serveurs virtuels  base de nom et serveurs virtuels  base
      -    d'adresse IP</a> pour dterminer quel type de serveur virtuel nous
      +    <p>Il est recommandé de lire la documentation<a href="name-based.html#namevip">
      +    Serveurs virtuels à base de nom et serveurs virtuels à base
      +    d'adresse IP</a> pour déterminer quel type de serveur virtuel nous
           convient le mieux, puis de lire les documentations <a
      -    href="name-based.html">serveurs virtuels  base de nom</a> ou <a
      -    href="ip-based.html">serveurs virtuels  base d'adresse IP</a>, et enfin
      -    d'tudier <a href="examples.html">quelques exemples</a>.</p>
      +    href="name-based.html">serveurs virtuels à base de nom</a> ou <a
      +    href="ip-based.html">serveurs virtuels à base d'adresse IP</a>, et enfin
      +    d'étudier <a href="examples.html">quelques exemples</a>.</p>
       
      -    <p>Si vous voulez entrer dans les dtails, vous pouvez revenir vers
      +    <p>Si vous voulez entrer dans les détails, vous pouvez revenir vers
           cette page.</p>
       
       </summary>
       
      -<seealso><a href="ip-based.html">Support des serveurs virtuels  base
      +<seealso><a href="ip-based.html">Support des serveurs virtuels à base
       d'adresse IP</a></seealso>
      -<seealso><a href="name-based.html">Support des serveurs virtuels  base
      +<seealso><a href="name-based.html">Support des serveurs virtuels à base
       de nom</a></seealso>
       <seealso><a href="examples.html">Exemples de serveurs virtuels pour une
       configuration courante</a></seealso>
      -<seealso><a href="mass.html">Hbergement virtuel de masse configur
      +<seealso><a href="mass.html">Hébergement virtuel de masse configuré
       dynamiquement</a></seealso>
       
       
       <section id="configparsing"><title>Fichier de configuration</title>
       
           <p>Un <em>serveur  principal (main_server)</em> contient toutes
      -    les dfinitions qui apparaissent en dehors des sections
      +    les définitions qui apparaissent en dehors des sections
           <code>&lt;VirtualHost&gt;</code>.</p>
      -    
      +
           <p>Les serveurs virtuels, aussi
      -    appels <em>vhosts</em> (pour virtual hosts), sont dfinis par les
      +    appelés <em>vhosts</em> (pour virtual hosts), sont définis par les
           sections <directive type="section" module="core">VirtualHost</directive>.</p>
       
           <p>Chaque directive <code>VirtualHost</code> comporte une ou
           plusieurs adresses et des ports optionnels.</p>
       
      -    <p>Il est possible d'utiliser des noms d'htes dans la dfinition
      -    d'un serveur virtuel, mais ils seront rsolus en adresses IP au
      -    dmarrage du serveur, et si une rsolution de nom choue, cette
      -    dfinition de serveur virtuel sera ignore. Cette mthode est par
      -    consquent dconseille.</p>
      +    <p>Il est possible d'utiliser des noms d'hôtes dans la définition
      +    d'un serveur virtuel, mais ils seront résolus en adresses IP au
      +    démarrage du serveur, et si une résolution de nom échoue, cette
      +    définition de serveur virtuel sera ignorée. Cette méthode est par
      +    conséquent déconseillée.</p>
       
           <p>L'adresse peut
      -    tre spcifie sous la forme <code>*</code>, ce qui conviendra  la
      -    requte si aucun autre serveur virtuel ne possde l'adresse IP
      -    explicite correspondant  celle de la requte.</p>
      -
      -    <p>L'adresse qui apparat dans la directive <code>VirtualHost</code>
      -    peut tre associe  un port optionnel. Si aucun port n'est
      -    spcifi, il s'agit d'un port gnrique qui peut aussi tre spcifi
      -    comme <code>*</code>. Le port gnrique correspond  toutes les
      +    être spécifiée sous la forme <code>*</code>, ce qui conviendra à la
      +    requête si aucun autre serveur virtuel ne possède l'adresse IP
      +    explicite correspondant à celle de la requête.</p>
      +
      +    <p>L'adresse qui apparaît dans la directive <code>VirtualHost</code>
      +    peut être associée à un port optionnel. Si aucun port n'est
      +    spécifié, il s'agit d'un port générique qui peut aussi être spécifié
      +    comme <code>*</code>. Le port générique correspond à toutes les
           valeurs de port.</p>
       
      -    <p>(Il ne faut pas confondre les numros de port sur lesquels Apache
      -    est en coute avec les numros de port spcifis dans la directive
      -    <code>VirtualHost</code> ; ces derniers ne servent qu' dfinir le
      -    <code>serveur virtuel</code> qui sera slectionn pour traiter la
      -    requte. Pour dfinir les ports sur lesquels Apache est en coute,
      -    utilisez la directive <directive module="core">Listen</directive>).
      +    <p>(Il ne faut pas confondre les numéros de port sur lesquels Apache
      +    est en écoute avec les numéros de port spécifiés dans la directive
      +    <code>VirtualHost</code> ; ces derniers ne servent qu'à définir le
      +    <code>serveur virtuel</code> qui sera sélectionné pour traiter la
      +    requête. Pour définir les ports sur lesquels Apache est en écoute,
      +    utilisez la directive <directive module="mpm_common">Listen</directive>).
           </p>
       
      -    <p>L'ensemble des adresses (y compris les rsultats multiples
      -    <code>A</code> issus des requtes DNS) est appel <em>jeu
      +    <p>L'ensemble des adresses (y compris les résultats multiples
      +    <code>A</code> issus des requêtes DNS) est appelé <em>jeu
           d'adresses</em> du serveur virtuel.</p>
       
      -    <p>Apache fait automatiquement sa slection  partir de l'en-tte
      +    <p>Apache fait automatiquement sa sélection à partir de l'en-tête
           HTTP <code>Host</code> fourni par le client, lorsque la
           correspondance la plus exacte du point de vue adresse IP/port a lieu
           pour plusieurs serveurs virtuels.</p>
       
           <p>La directive <directive module="core">ServerName</directive> peut
      -    apparatre en quelque endroit de la dfinition d'un serveur.
      -    Cependant, chaque occurrence crase la prcdente (pour ce serveur).
      -    Si aucune directive <code>ServerName</code> n'est spcifie, le
      -    serveur tente de dterminer le nom du serveur  partir de l'adresse
      +    apparaître en quelque endroit de la définition d'un serveur.
      +    Cependant, chaque occurrence écrase la précédente (pour ce serveur).
      +    Si aucune directive <code>ServerName</code> n'est spécifiée, le
      +    serveur tente de déterminer le nom du serveur à partir de l'adresse
           IP.</p>
       
      -    <p>Le premier serveur virtuel  base de nom apparaissant dans le
      -    fichier de configuration pour une paire IP:port donne est
      -    significatif car c'est lui qui sera utilis pour toutes les requtes
      -    reues sur cette adresse IP/port et pour laquelle aucun autre
      -    serveur virtuel ne possde un ServerName ou un ServerAlias
      -    correspondant. Il sera aussi utilis pour toutes les connexions SSL
      +    <p>Le premier serveur virtuel à base de nom apparaissant dans le
      +    fichier de configuration pour une paire IP:port donnée est
      +    significatif car c'est lui qui sera utilisé pour toutes les requêtes
      +    reçues sur cette adresse IP/port et pour laquelle aucun autre
      +    serveur virtuel ne possède un ServerName ou un ServerAlias
      +    correspondant. Il sera aussi utilisé pour toutes les connexions SSL
           si le serveur ne supporte pas l'<glossary
           ref="servernameindication">Indication du nom du serveur</glossary>.</p>
       
      -    <p>Pour chaque serveur virtuel, diverses valeurs sont initialises
      -    par dfaut. En particulier&nbsp;:</p>
      +    <p>Tous les noms spécifiés au sein d'une section
      +    <code>VirtualHost</code> sont traités comme un
      +    <code>ServerAlias</code> (sans caractères génériques), mais ne sont
      +    écrasés par aucune directive <code>ServerAlias</code>.</p>
      +
      +    <p>Pour chaque serveur virtuel, diverses valeurs sont initialisées
      +    par défaut. En particulier&nbsp;:</p>
       
           <ol>
      -      <li>Dans le cas o un serveur virtuel ne contient pas de directives
      +      <li>Dans le cas où un serveur virtuel ne contient pas de directives
             <directive module="core">ServerAdmin</directive>,
      -      <directive module="core">ResourceConfig</directive>,
      -      <directive module="core">AccessConfig</directive>,
             <directive module="core">Timeout</directive>,
             <directive module="core">KeepAliveTimeout</directive>,
             <directive module="core">KeepAlive</directive>,
             <directive module="core">MaxKeepAliveRequests</directive>,
      -      <directive module="core">ReceiveBufferSize</directive>,
      -      ou <directive module="core">SendBufferSize</directive>,
      -      alors la valeur de chacun de ces paramtres est hrite de celle du
      -      serveur principal. (C'est  dire, hrite de la valeur finale aprs
      +      <directive module="mpm_common">ReceiveBufferSize</directive>,
      +      ou <directive module="mpm_common">SendBufferSize</directive>,
      +      alors la valeur de chacun de ces paramètres est héritée de celle du
      +      serveur principal. (C'est à dire, héritée de la valeur finale après
             lecture de la configuration du serveur principal.)</li>
       
      -      <li>Les permissions par dfaut sur les rpertoires de chaque
      -      serveur virtuel sont assembles avec celles du serveur principal.
      -      Elles concernent galement toutes les informations de configuration
      -      par rpertoire pour tous les modules.</li>
      +      <li>Les permissions par défaut sur les répertoires de chaque
      +      serveur virtuel sont assemblées avec celles du serveur principal.
      +      Elles concernent également toutes les informations de configuration
      +      par répertoire pour tous les modules.</li>
       
      -      <li>Les configurations par serveur pour chaque module sont assembles
      -       partir de celles du serveur principal.</li>
      +      <li>Les configurations par serveur pour chaque module sont assemblées
      +      à partir de celles du serveur principal.</li>
           </ol>
       
           <p>L'essentiel des valeurs de configuration des serveurs virtuels
      -    provient de valeurs par dfaut issues du serveur principal.
      +    provient de valeurs par défaut issues du serveur principal.
           Mais la position dans le fichier de configuration des directives
           du serveur principal n'a pas d'importance -- l'ensemble de la
           configuration du serveur principal est lu avant que ces valeurs par
      -    dfaut soient appliques aux serveur virtuels. Ainsi, mme si la
      -    dfinition d'une valeur apparat aprs celle d'un serveur virtuel,
      +    défaut soient appliquées aux serveur virtuels. Ainsi, même si la
      +    définition d'une valeur apparaît après celle d'un serveur virtuel,
           cette valeur peut affecter la definition du serveur virtuel.</p>
       
      -    <p>Dans le cas o le serveur principal n'a pas de <code>ServerName</code>
      -     ce stade, le nom de la machine sur laquelle tourne le programme
      -    <program>httpd</program> est utilis  sa place. Nous appellerons
      +    <p>Dans le cas où le serveur principal n'a pas de <code>ServerName</code>
      +    à ce stade, le nom de la machine sur laquelle tourne le programme
      +    <program>httpd</program> est utilisé à sa place. Nous appellerons
           <em>jeu d'adresses du serveur principal</em> les adresses IP
      -    renvoyes par une rsolution DNS sur le <code>ServerName</code>
      +    renvoyées par une résolution DNS sur le <code>ServerName</code>
           du serveur principal.</p>
       
      -    <p>Pour tous les champs <code>ServerName</code> non dfinis, dans
      +    <p>Pour tous les champs <code>ServerName</code> non définis, dans
           le cas d'une configuration en serveur virtuel par nom, la valeur
      -    adopte par dfaut est la premire adresse donne dans la section
      -    <code>VirtualHost</code> qui dfinit le serveur virtuel.</p>
      +    adoptée par défaut est la première adresse donnée dans la section
      +    <code>VirtualHost</code> qui définit le serveur virtuel.</p>
       
           <p>Si un serveur virtuel contient la valeur magique
      -    <code>_default_</code>, il fonctionne sur le mme <code>ServerName</code>
      +    <code>_default_</code>, il fonctionne sur le même <code>ServerName</code>
           que le serveur principal.</p>
       
       </section>
       
       <section id="hostmatching"><title>Choix du serveur virtuel</title>
       
      -    <p> la rception d'une requte, le serveur procde comme suit pour
      -    dterminer quel serveur virtuel utiliser&nbsp;:</p>
      +    <p>À la réception d'une requête, le serveur procède comme suit pour
      +    déterminer quel serveur virtuel utiliser&nbsp;:</p>
       
           <section id="hashtable"><title>Recherche de l'adresse IP</title>
       
      -    <p>Lors d'une premire connexion sur une adresse/port, le serveur
      +    <p>Lors d'une première connexion sur une adresse/port, le serveur
           recherche toutes les directives <code>VirtualHost</code> qui
      -    possdent la mme adresse IP/port.</p>
      +    possèdent la même adresse IP/port.</p>
       
           <p>S'il n'y a aucune correspondance exacte pour cette adresse/port,
      -    la recherche s'effectue sur la valeur gnrique (<code>*</code>).</p>
      +    la recherche s'effectue sur la valeur générique (<code>*</code>).</p>
       
      -    <p>Si aucune correspondance n'est enfin trouve, la requte sera
      +    <p>Si aucune correspondance n'est enfin trouvée, la requête sera
           servie par le serveur principal.</p>
       
      -    <p>S'il existe des dfinitions <code>VirtualHost</code> pour
      -    l'adresse IP, l'tape suivante consiste  dterminer si nous avons 
      -    faire  un serveur virtuel  base de nom ou d'adresse IP.</p>
      -    
      +    <p>S'il existe des définitions <code>VirtualHost</code> pour
      +    l'adresse IP, l'étape suivante consiste à déterminer si nous avons à
      +    faire à un serveur virtuel à base de nom ou d'adresse IP.</p>
      +
           </section>
       
           <section id="ipbased"><title>Serveur virtuel par IP</title>
       
      -    <p>Si une seule section <code>VirtualHost</code> prsente la
      +    <p>Si une seule section <code>VirtualHost</code> présente la
           meilleure correspondance avec la paire adresse IP/port, aucune
      -    action n'est entreprise et la requte est
      -    traite par le serveur virtuel qui correspond.</p>
      +    action n'est entreprise et la requête est
      +    traitée par le serveur virtuel qui correspond.</p>
       
           </section>
       
           <section id="namebased"><title>Serveur virtuel par nom</title>
       
      -    <p>Si plusieurs sections <code>VirtualHost</code> prsentent la
      +    <p>Si plusieurs sections <code>VirtualHost</code> présentent la
           meilleure correspondance avec la paire adresse IP/port, le terme
      -    "liste" dans les tapes suivantes fait rfrence  la liste des
      +    "liste" dans les étapes suivantes fait référence à la liste des
           serveurs virtuels qui correspondent, selon l'ordre dans lequel ils
           apparaissent dans le fichier de configuration.</p>
       
           <p>Si la connexion utilise SSL, si le serveur supporte l'<glossary
           ref="servernameindication">Indication de nom de serveur</glossary>,
      -    et si la ngociation du client SSL inclut l'extension TLS dans le
      -    nom d'hte requis, alors ce nom d'hte sera utilis par la suite, tout
      -    comme un en-tte <code>Host:</code> aurait t utilis dans le cas
      -    d'une connexion non-SSL. Si ces conditions ne sont pas runies, le
      -    premier serveur virtuel  base de nom dont l'adresse correspond sera
      -    utilis pour les connexions SSL. Ceci est important car c'est le
      -    serveur virtuel qui dtermine quel certificat le serveur va utiliser
      +    et si la négociation du client SSL inclut l'extension TLS dans le
      +    nom d'hôte requis, alors ce nom d'hôte sera utilisé par la suite, tout
      +    comme un en-tête <code>Host:</code> aurait été utilisé dans le cas
      +    d'une connexion non-SSL. Si ces conditions ne sont pas réunies, le
      +    premier serveur virtuel à base de nom dont l'adresse correspond sera
      +    utilisé pour les connexions SSL. Ceci est important car c'est le
      +    serveur virtuel qui détermine quel certificat le serveur va utiliser
           pour la connexion.</p>
       
      -    <p>Si la requte contient un en-tte <code>Host:</code>, on
      +    <p>Si la requête contient un en-tête <code>Host:</code>, on
           recherche dans la liste le premier serveur virtuel dont le
           <code>ServerName</code> ou le <code>ServerAlias</code> correspond,
      -    et c'est celui-ci qui va traiter la requte. Un en-tte
      -    <code>Host:</code> peut comporter un numro de port mais Apache
      -    l'ignore systmatiquement et utilise toujours le
      -    port sur lequel il a effectivement reu la requte.</p>
      +    et c'est celui-ci qui va traiter la requête. Un en-tête
      +    <code>Host:</code> peut comporter un numéro de port mais Apache
      +    l'ignore systématiquement et utilise toujours le
      +    port sur lequel il a effectivement reçu la requête.</p>
       
           <p>Le premier serveur virtuel du fichier de configuration qui
      -    possde l'adresse spcifie est prioritaire et intercepte toutes les
      -    requtes  destination d'un nom de serveur inconnu, ou toute requte
      -    sans en-tte <code>Host:</code> (comme les requtes HTTP/1.0).</p>
      +    possède l'adresse spécifiée est prioritaire et intercepte toutes les
      +    requêtes à destination d'un nom de serveur inconnu, ou toute requête
      +    sans en-tête <code>Host:</code> (comme les requêtes HTTP/1.0).</p>
       
           </section>
       
           <section id="persistent"><title>Connexions persistantes</title>
       
      -    <p>La <em>recherche par adresse IP</em> dcrite ci-avant n'est faite
      +    <p>La <em>recherche par adresse IP</em> décrite ci-avant n'est faite
           qu'<em>une fois</em> pour chaque session TCP/IP, alors que la
      -    <em>recherche par nom</em> est ralise pour <em>chaque</em> requte au
      +    <em>recherche par nom</em> est réalisée pour <em>chaque</em> requête au
           cours d'une connexion persistante (KeepAlive). En d'autres termes,
      -    il est possible pour un client de faire des requtes sur
      -    diffrents serveurs virtuels par nom, au cours d'une unique
      +    il est possible pour un client de faire des requêtes sur
      +    différents serveurs virtuels par nom, au cours d'une unique
           connexion persistante.</p>
       
           </section>
       
           <section id="absoluteURI"><title>URI absolu</title>
       
      -    <p>Au cas o l'URI de la requte est absolu, et que son nom de
      +    <p>Au cas où l'URI de la requête est absolu, et que son nom de
           serveur et son port correspondent au serveur principal (ou l'un
      -    des serveurs virtuels configurs), <em>et</em> qu'ils correspondent
      -     l'adresse et au port de la requte, alors l'URI est amput
      -    de son prfixe protocole/nom de serveur/port et trait par le
      +    des serveurs virtuels configurés), <em>et</em> qu'ils correspondent
      +    à l'adresse et au port de la requête, alors l'URI est amputé
      +    de son préfixe protocole/nom de serveur/port et traité par le
           serveur correspondant (principal ou virtuel). Si cette correspondance
      -    n'existe pas, l'URI reste inchang et la requte est considre
      -    comme une requte d'un serveur mandataire (proxy).</p>
      +    n'existe pas, l'URI reste inchangé et la requête est considérée
      +    comme une requête d'un serveur mandataire (proxy).</p>
       </section>
       
       <section id="observations"><title>Observations</title>
       
           <ul>
      -      <li>La slection d'un serveur virtuel en fonction de son nom est
      -      un processus qui intervient aprs la slection par le serveur du
      +      <li>La sélection d'un serveur virtuel en fonction de son nom est
      +      un processus qui intervient après la sélection par le serveur du
             serveur virtuel qui correspond le mieux du point de vue adresse
             IP/port.</li>
       
      -      <li>Si vous ne tenez pas compte de l'adresse IP  laquelle le
      -      client s'est connect, indiquez un caractre "*" comme adresse
      -      pour tous les serveurs virtuels, et la slection du serveur
      -      virtuel en fonction du nom s'appliquera alors  tous les serveurs
      -      virtuels dfinis.</li>
      +      <li>Si vous ne tenez pas compte de l'adresse IP à laquelle le
      +      client s'est connecté, indiquez un caractère "*" comme adresse
      +      pour tous les serveurs virtuels, et la sélection du serveur
      +      virtuel en fonction du nom s'appliquera alors à tous les serveurs
      +      virtuels définis.</li>
       
      -      <li>Les vrifications sur <code>ServerName</code> et
      +      <li>Les vérifications sur <code>ServerName</code> et
             <code>ServerAlias</code> ne sont jamais
      -      ralises pour les serveurs virtuels par IP.</li>
      +      réalisées pour les serveurs virtuels par IP.</li>
       
             <li>Seul l'ordre des serveurs virtuels par nom
      -      pour une adresse donne a une importance. Le serveur virtuel
      -      par nom qui est prsent en premier dans la configuration se
      -      voit attribu la priorit la plus haute pour les requtes
      +      pour une adresse donnée a une importance. Le serveur virtuel
      +      par nom qui est présent en premier dans la configuration se
      +      voit attribué la priorité la plus haute pour les requêtes
             arrivant sur son jeu d'adresses IP.</li>
       
      -      <li>Le numro de port contenu dans l'en-tte <code>Host:</code> n'est jamais utilis
      +      <li>Le numéro de port contenu dans l'en-tête <code>Host:</code> n'est jamais utilisé
             pour les tests de correspondances. Apache ne prend en compte
      -      que le numro de port sur lequel le client a envoy la requte.</li>
      +      que le numéro de port sur lequel le client a envoyé la requête.</li>
       
      -      <li>Si deux serveurs virtuels partagent la mme adresse, la
      -      slection se fera implicitement sur le nom. Il s'agit d'une
      -      nouvelle fonctionnalit de la version 2.3.11.</li>
      +      <li>Si deux serveurs virtuels partagent la même adresse, la
      +      sélection se fera implicitement sur le nom. Il s'agit d'une
      +      nouvelle fonctionnalité de la version 2.3.11.</li>
       
      -      <li>Le serveur principal ne sert les requtes que
      -      lorsque l'adresse IP et le port demands par le client ne
      -      correspondent  aucun serveur virtuel (y compris un serveur
      +      <li>Le serveur principal ne sert les requêtes que
      +      lorsque l'adresse IP et le port demandés par le client ne
      +      correspondent à aucun serveur virtuel (y compris un serveur
             virtuel <code>*</code>). En d'autres termes, le serveur
             principal n'est utile que pour les combinaisons adresse/port
      -      non spcifies (sauf quand un serveur virtuel <code>_default_</code>
      +      non spécifiées (sauf quand un serveur virtuel <code>_default_</code>
             correspond au port).</li>
       
             <li>Il ne faut jamais employer de noms DNS dans des directives
             <code>VirtualHost</code>, car cela oblige le serveur a s'appuyer
      -      sur le DNS au moment du dmarrage. De plus, vous vous exposez
      -       des problmes de scurit si vous n'avez pas la matrise du
      -      DNS pour la totalit de vos domaines. Voir la documentation
      +      sur le DNS au moment du démarrage. De plus, vous vous exposez
      +      à des problèmes de sécurité si vous n'avez pas la maîtrise du
      +      DNS pour la totalité de vos domaines. Voir la documentation
             <a href="../dns-caveats.html">disponible ici</a>, ainsi que
      -      les deux points prciss ci-aprs.</li>
      +      les deux points précisés ci-après.</li>
       
             <li>Un nom de serveur <code>ServerName</code> devrait toujours
      -      tre indiqu pour chaque serveur virtuel. Sans cela, une
      -      rsolution DNS est ncessaire pour chaque serveur virtuel.</li>
      +      être indiqué pour chaque serveur virtuel. Sans cela, une
      +      résolution DNS est nécessaire pour chaque serveur virtuel.</li>
             </ul>
             </section>
       
      @@ -320,17 +323,17 @@ dynamiquement</a></seealso>
       
       <section id="tips"><title>Trucs et astuces</title>
       
      -    <p>En plus des points voqus sur la page des
      -    <a href="../dns-caveats.html#tips">problmes lis au DNS</a>,
      -    voici quelques points intressants&nbsp;:</p>
      +    <p>En plus des points évoqués sur la page des
      +    <a href="../dns-caveats.html#tips">problèmes liés au DNS</a>,
      +    voici quelques points intéressants&nbsp;:</p>
       
           <ul>
      -      <li>Toujours positionner les dfinitions relatives au serveur
      -      principal avant toute dfinition <code>VirtualHost</code>.
      -      (Ceci amliore grandement la lisibilit de la configuration
      -      -- la manire dont la configuration est interprte aprs la
      -      lecture des fichiers ne met pas en vidence le fait que les
      -      dfinitions positionnes avant et surtout aprs les serveurs
      +      <li>Toujours positionner les définitions relatives au serveur
      +      principal avant toute définition <code>VirtualHost</code>.
      +      (Ceci améliore grandement la lisibilité de la configuration
      +      -- la manière dont la configuration est interprétée après la
      +      lecture des fichiers ne met pas en évidence le fait que les
      +      définitions positionnées avant et surtout après les serveurs
             virtuels peuvent impacter le fonctionnement de tous les
             serveurs virtuels.)</li>
       
      diff --git a/docs/manual/vhosts/details.xml.ko b/docs/manual/vhosts/details.xml.ko
      index a788a04184d..582c1c1673e 100644
      --- a/docs/manual/vhosts/details.xml.ko
      +++ b/docs/manual/vhosts/details.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 105989:1174747 (outdated) -->
      +<!-- English Revision: 105989:1344668 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/details.xml.meta b/docs/manual/vhosts/details.xml.meta
      index 5cd5c305f72..218242a6f0a 100644
      --- a/docs/manual/vhosts/details.xml.meta
      +++ b/docs/manual/vhosts/details.xml.meta
      @@ -10,6 +10,6 @@
           <variant>en</variant>
           <variant>fr</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/details.xml.tr b/docs/manual/vhosts/details.xml.tr
      index 09110ec86d3..a593cf5b901 100644
      --- a/docs/manual/vhosts/details.xml.tr
      +++ b/docs/manual/vhosts/details.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 420990:1174747 (outdated) -->
      +<!-- English Revision: 1344668 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -30,148 +30,79 @@
       
       <summary>
       
      -    <p>Sanal konak kodu <strong>Apache 1.3</strong> sürümünde baştan yeniden
      -      yazıldı. Bu belgede, bir istek aldığında Apache’nin hangi sanal konak
      -      ile hizmet sunacağına nasıl karar verdiği açıklanmaya çalışılmıştır.
      -      <directive module="core">NameVirtualHost</directive> yönergesi sayesinde
      -      sanal konak yapılandırması 1.3 sürümünün öncesine göre daha kolay ve
      -      daha güvenilir hale gelmiştir.</p>
      +    <p>Bu belgede, bir istek aldığında Apache’nin hangi sanal konak
      +      ile hizmet sunacağına nasıl karar verdiği açıklanmaya çalışılmıştır.</p>
       
      -    <p>Sanal konakların nasıl çalıştığını öğrenmeden sadece çalıştırmak
      -      isterseniz doğrudan <a href="examples.html">örneklerin bulunduğu
      -      sayfaya</a> bakabilirsiniz.</p>
      +    <p>Çoğu kullanıcı hangi türü kullanacağına karar vermek için önce <a
      +      href="name-based.html#namevip">İsme dayalı ve IP’ye dayalı Sanal
      +      Konak</a> bölümünü, sonra <a href="name-based.html">İsme Dayalı Sanal
      +      Konak Desteği</a> veya <a href="ip-based.html">IP’ye Dayalı Sanal Konak
      +      Desteği</a> belgesini okumalı ve <a href="examples.html">bazı
      +      örneklere</a> göz atmalıdır.</p>
      +
      +    <p>Bunlardan sonra tüm ayrıntıları anlamak isterseniz tekrar bu sayfaya
      +      gelebilirsiniz.</p>
       
       </summary>
       
      -<section id="configparsing"><title>Yapılandırma Dosyasının Çözümlenmesi</title>
      +<seealso><a href="ip-based.html">IP’ye Dayalı Sanal Konak Desteği</a></seealso>
      +<seealso><a href="name-based.html">İsme Dayalı Sanal Konak Desteği</a></seealso>
      +<seealso><a href="examples.html">Çok Kullanılan Sanal Konak Örnekleri</a></seealso>
      +<seealso><a href="mass.html">Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma</a></seealso>
      +
      +<section id="configparsing"><title>Yapılandırma Dosyası</title>
       
           <p>Bu belgede <code>&lt;VirtualHost&gt;</code> bölümleri dışında kalan
      -      tanımlardan bahsederken <em>ana_sunucu</em>, <directive type="section"
      -      module="core">VirtualHost</directive> bölümlerindeki tanımlamalardan
      -      bahsederken <em>sankonlar</em> diyeceğiz.</p>
      -
      -    <p><directive module="mpm_common">Listen</directive>,
      -      <directive module="core">ServerName</directive>,
      -      <directive module="core">ServerPath</directive> ve
      -      <directive module="core">ServerAlias</directive> yönergeleri bir sunucu
      -      yapılandırmasının her yerinde karşımıza çıkabilir. Bununla birlikte,
      -      sunucu dahilinde son göründükleri yerlerde önceki eşdeğerlerini geçersiz
      -      kılarlar.</p>
      -
      -    <p><code>Listen</code> yönergesinin ana_sunucu için öntanımlı değeri
      -      80’dir. <code>ServerPath</code> ve <code>ServerAlias</code>
      -      yönergelerinin ana_sunucu için öntanımlı değerleri yoktur. Öntanımlı
      -      <code>ServerName</code> değeri ise sunucunun IP adresinden elde
      -      edilir.</p>
      -
      -    <p>Ana_sunucu <code>Listen</code> yönergesinin iki işlevi vardır. Biri
      -      Apache’nin dinleyeceği öntanımlı ağ portunu belirlemek, diğeri ise
      -      yönlendirmeler sırasında mutlak URI’lerde kullanılan port numarasını
      -      belirlemektir.</p>
      -
      -    <p>Ana_sunucunun aksine sankonların portları Apache‘nin dinleyeceği
      -      portlar üzerinde etkili değildir.</p>
      +      tanımlardan bahsederken <em>ana_sunucu</em> diyeceğiz.</p>
      +
      +    <p><directive type="section" module="core">VirtualHost</directive>
      +      bölümlerindeki tanımlamalardan bahsederken <em>sankonlar</em>
      +      diyeceğiz.</p>
      +
      +    <p>Her <code>VirtualHost</code> bölümü en az bir adres ve isteğe bağlı
      +      portlar içerir.</p>
      +
      +    <p>Sanal konak tanımlarının içindeki IP adreslerinin yerine konak isimleri
      +      kullanılabilir, fakat bunlar başlatma sırasında çözümleneceklerinden
      +      çözümlemedeki bir başarısızlık bu sanal konak tanımlarının yoksayılması
      +      ile sonuçlanacaktır. Bu bakımdan önerilmez.</p>
       
           <p><code>VirtualHost</code> yönergesinde görünen her adresin seçimlik bir
      -      portu olabilir. Eğer bir port belirtilmemişse öntanımlı olarak
      -      ana_sunucunun son <code>Listen</code> yönergesinin değeri kullanılır.
      -      Port olarak <code>*</code> belirtildiği takdirde bütün portlar dinlenir.
      -      Adreslerin tamamını (DNS sorgularındaki çoklu A kayıtları dahil) içeren
      -      kümeye sankonların <em>adres kümesi</em> denir.</p>
      -
      -    <p><directive module="core">NameVirtualHost</directive> yönergesi ilk
      -      sankonun IP adresi için kullanılmadığı takdirde bu IP adresine sahip ilk
      -      sankon IP’ye dayalı sankon olarak ele alınır. IP adresi olarak
      -      <code>*</code> belirtmek de mümkündür.</p>
      -
      -    <p>Eğer isme dayalı sankonlar kullanılacaksa <code>NameVirtualHost</code>
      -      yönergesinin bu isme dayalı sankonların IP adresi kümesini içermesi
      -      <em>gerekir</em>. Başka bir deyişle, yapılandırma dosyanızın
      -      <code>NameVirtualHost</code> yönergesine sankonların sunucu isimlerinin
      -      karşı düştüğü IP adresini yazmalısınız.</p>
      -
      -    <p>Çok sayıda <code>NameVirtualHost</code> yönergesi belirtebilirse de her
      -      IP:port çifti için birden fazla <code>NameVirtualHost</code> yönergesi
      -      belirtilmemelidir.</p>
      -
      -    <p>Aşağıdaki iki örneğin eşdeğer olması için <code>NameVirtualHost</code>
      -      ve <code>VirtualHost</code> yönergelerinin sıralamasının bir önemi
      -      yoktur. (Sadece <em>tek</em> adreslik küme içindeki
      -      <code>VirtualHost</code> yönergelerinin sırası önemlidir; aşağıya
      -      bakınız:)</p>
      -
      -<table><tr>
      -<td><example>
      -  NameVirtualHost 111.22.33.44<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu A<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu B<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  <br />
      -  NameVirtualHost 111.22.33.55<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu C<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu D<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;
      -</example></td>
      -<td><example>
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu A<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu C<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.44&gt;<br />
      -  # sunucu B<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  &lt;VirtualHost 111.22.33.55&gt;<br />
      -  # sunucu D<br />
      -  ...<br />
      -  &lt;/VirtualHost&gt;<br />
      -  <br />
      -  NameVirtualHost 111.22.33.44<br />
      -  NameVirtualHost 111.22.33.55<br />
      -  <br />
      -</example></td>
      -</tr></table>
      -
      -
      -    <p>(Okuma kolaylığı bakımından soldaki sürümü tercih etmenizi öneririz.)
      -    </p>
      -
      -    <p><code>VirtualHost</code> yönergesi çözümlendikten sonra sankon
      -      sunucusuna yönergedeki ilk isme atanmış portun öntanımlı olduğu bir
      -      <code>Listen</code> verilir.</p>
      -
      -    <p>Eğer tüm <code>VirtualHost</code> isimlerinin listesi aynı adres
      -      kümesine çözümleniyorsa bu isimler birer <code>ServerAlias</code> gibi
      -      ele alınırlar (bir <code>ServerAlias</code> yönergesi ile geçersiz
      -      kılınmadıkça). Bir sankon tanımından sonra gelen <code>Listen</code>
      -      satırlarının o sankonun adres kümesine atanmış portlara bir etkisinin
      -      olmayacağına dikkat ediniz.</p>
      -
      -    <p>İsim listeleri IP adreslerine göre gruplanır ve bir çiftler tablosuna
      -      kaydedilir. Eğer IP adresi bir <code>NameVirtualHost</code> yönergesinde
      -      kullanılmışsa, liste bu IP adresi için tanımlanmış tüm sankonları
      -      içerir. Eğer bu IP adresinin tanımlandığı bir sankon yoksa o
      -      <code>NameVirtualHost</code> yönergesi yoksayılır ve günlüğe bir hata
      -      kaydı düşülür. IP’ye dayalı sankonlar için çiftler listesinde isim
      -      alanları boştur.</p>
      -
      -    <p>Çiftler listesini işleyen işlevin hızı nedeniyle bir istek sırasında IP
      -      adresine göre gruplama yaparken kaynak harcaması en düşük düzeyde olur
      -      hatta neredeyse hiç olmaz. Ek olarak, tablo, IP adresinin son
      -      sekizlisindeki değişikliklere göre de en iyilenir.</p>
      +      portu olabilir. Eğer bir port belirtilmemişse, port olarak <code>*</code>
      +      belirtilmiş gibi bütün portlar dinlenir.</p>
      +
      +    <p>(<code>VirtualHost</code> yönergesinde belirtilen port numaraları Apache
      +      httpd'nin dinleyeceği port numaraları olarak yorumlanmaz, sadece bir
      +      isteği işleme sokarken hangi <code>VirtualHost</code> bölümünün
      +      seçileceğini belirlerler. Sunucunun dinleyeceği adresleri ve portları
      +      belirtmek için <directive module="mpm_common">Listen</directive>
      +      yönergesini kullanın.)</p>
      +
      +    <p>Adreslerin tamamını (DNS sorgularındaki çoklu sonuçlar dahil) içeren
      +      kümeye <em>sankonların adres kümesi</em> denir.</p>
      +
      +    <p>Apache httpd, bir IP adresi ve port birleşimi için en belirgin
      +      eşleşmelerin listelendiği çok sayıdaki sanal konak arasında ayırdedici
      +      olarak istemci tarafından sağlanan HTTP <code>Host</code> başlığını
      +      kullanır.</p>
      +
      +    <p><directive module="core">ServerName</directive> yönergesi sunucu
      +      tanımının içinde herhangi bir yerde görünebilirse de her göründüğü yerde
      +      bir öncekini iptal eder. Hiç <code>ServerName</code> belirtilmemişse,
      +      Apache httpd, sunucu ismini sunucunun IP adresinden saptamaya
      +      çalışır.</p>
      +
      +    <p>Belli bir IP adresi ve port çifti için yapılandırma dosyasındaki ilk
      +      isme dayalı sankon önemlidir, çünkü başka hiçbir sankonun ServerName veya
      +      ServerAlias yönergesi ile eşleşmeyen bu adres ve port çifti için alınmış
      +      tüm isteklerde bu sankon kullanılır. Ayrıca, sunucunun <glossary
      +      ref="servernameindication">Sunucu İsmi Belirtimi</glossary>ni
      +      desteklemediği durumlarda tüm SSL bağlantıları için bu sankon
      +      kullanılır.</p>
      +
      +    <p><code>VirtualHost</code> içindeki isimlerin sırası (jokersiz) bir
      +      <code>ServerAlias</code> gibi ele alınır (fakat hiçbir
      +      <code>ServerAlias</code> yönergesi ile geçersiz kılınmaz).</p>
       
           <p>Her sankon için bazı değerler öntanımlı olarak atanır. Bunların
             başlıcaları:</p>
      @@ -179,14 +110,12 @@
           <ol>
             <li>Sankon bir <directive module="core">ServerAdmin</directive>
               yönergesi içermiyorsa,
      -        <directive module="core">ResourceConfig</directive>,
      -        <directive module="core">AccessConfig</directive>,
               <directive module="core">Timeout</directive>,
               <directive module="core">KeepAliveTimeout</directive>,
               <directive module="core">KeepAlive</directive>,
               <directive module="core">MaxKeepAliveRequests</directive>,
      -        <directive module="core">ReceiveBufferSize</directive> ve
      -        <directive module="core">SendBufferSize</directive> yönergeleri için
      +        <directive module="mpm_common">ReceiveBufferSize</directive> ve
      +        <directive module="mpm_common">SendBufferSize</directive> yönergeleri için
               öntanımlı değerler ana_sunucudaki eşdeğerlerinden miras alınır. (Yani,
               bu yönergeler için ana_sunucudaki son değerler miras alınır.)</li>
       
      @@ -226,70 +155,67 @@
           <p>Sunucu bir istek durumunda hangi sankonun kullanılacağını şöyle
             belirler:</p>
       
      -    <section id="hashtable"><title>Değer çiftleri tablosu aranır</title>
      +    <section id="hashtable"><title>IP adresi aranır</title>
       
      -    <p>Bir istemci tarafından bağlantı ilk yapıldığında önce IP-isim çiftleri
      -      tablosunda istemcinin bağlandığı IP adresi için bir arama yapılır.</p>
      +    <p>Bir adres ve port için bağlantı ilk alındığında Apache httpd tüm
      +      <code>VirtualHost</code> tanımlarında bu çifti arar.</p>
       
      -    <p>Arama başarısız olursa (IP adresi yoksa) hizmet, istekte belirtilen
      -      port için bir <code>_default_</code> sankon varsa, o sankondan, yoksa
      -      ana_sunucudan sunulur.</p>
      +    <p>Arama başarısız olursa <code>*</code> (herşey) eşleşmelerine
      +      bakılır.</p>
       
      -    <p>Eğer çiftler tablosunda IP adresi yoksa port numarası ile eşleştirme
      -      çabası ayrıca, diğer isme dayalı sanal konaklardaki gibi ard arda ele
      -      alınmayı gerektiren <code>NameVirtualHost *</code> durumundaki bir
      -      girdiyle sonuçlanabilir.</p>
      +    <p>Bir eşleşme bulunamazsa hizmet ana sunucudan sunulur.</p>
       
      -    <p>Arama sonucunda tabloda IP adresi bulunursa sonraki adım hizmetin bir
      -      IP’ye dayalı sankondan mı yoksa isme dayalı bir sankondan mı
      -      sunulacağına karar vermektir.</p>
      +    <p>Arama sonucunda bu IP adresi için bulunmuş <code>VirtualHost</code>
      +      tanımları varsa sonraki adım hizmetin bir IP’ye dayalı sankondan mı yoksa
      +      isme dayalı bir sankondan mı sunulacağına karar vermektir.</p>
       
           </section>
       
           <section id="ipbased"><title>IP’ye dayalı sankon</title>
       
      -    <p>Eğer tabloda bulduğumuz girdinin isim alanları boşsa bir IP’ye dayalı
      -      sanal konak bulmuşuz demektir. Artık karar vermek için başka bir şey
      -      yapmaya gerek yoktur ve istek bu sankondan sunulur.</p>
      +    <p>Eğer en iyi eşleşme olarak saptanmış IP adresi ve port çiftini içeren
      +      sadece bir <code>VirtualHost</code> yönergesi varsa artık karar vermek
      +      için başka bir şey yapmaya gerek yoktur ve istek bu sankondan
      +      sunulur.</p>
       
           </section>
       
           <section id="namebased"><title>İsme dayalı sankon</title>
       
      -    <p>Tabloda bulduğumuz girdi için bir isim listesi varsa bir isme dayalı
      -      sankon sözkonusudur. Bu isim listesi, sankonları, ilgili
      -      <code>VirtualHost</code> bölümlerinin yapılandırma dosyasında yer alış
      -      sırasına göre içerir.</p>
      -
      -    <p>Bu listedeki ilk sankon (yapılandırma dosyasında belirtilen IP adresine
      -      sahip ilk sankon) en yüksek önceliğe sahiptir ve sunucu ismi
      -      belirtilmeyen veya <code>Host:</code> başlık alanı olmayan istekleri bu
      -      sankon karşılar.</p>
      -
      -    <p>Eğer istemci bir <code>Host:</code> başlık alanı ile istek yapmışsa
      -      liste bu sankon için aranır ve hizmet <code>ServerName</code> veya
      -      <code>ServerAlias</code> ile ilk eşleşmenin sağlandığı sankondan
      -      sunulur. <code>Host:</code> alanında bir port belirtilebilirse de Apache
      -      daima istemcinin isteği gönderdiği portu gerçek port kabul eder.</p>
      -
      -    <p>Eğer istemci <code>Host:</code> başlık alanı bulunmayan bir HTTP/1.0
      -      isteği yapmışsa istemcinin hangi sankona bağlanmayı denediğini bilemeyiz
      -      ve istekteki URI ile mevcut <code>ServerPath</code> değerini
      -      eşleştirmeye çalışırız. Listedekilerden ilk eşleşen yola sahip sankondan
      -      hizmeti sunarız.</p>
      -
      -    <p>İstekle eşleşen bir sankon bulunamazsa IP listesinde istemcinin
      -      bağlandığı portla eşleşen ilk sankondan hizmeti sunarız.</p>
      +    <p>Eğer en iyi eşleşme olarak saptanmış IP adresi ve port çiftini içeren
      +      birden fazla <code>VirtualHost</code> yönergesi varsa, sonraki
      +      adımlardaki "liste" eşleşen sankonların listesi olup sankonlar listede
      +      yapılandırma dosyasındaki yerlerine göre sıralanırlar.</p>
      +
      +    <p>Bağlantı SSL kullanıyorsa, sunucunun <glossary
      +      ref="servernameindication">Sunucu İsmi Belirtimi</glossary>ni
      +      desteklediği durumlarda SSL istemci uzlaşımı, istenen konak ismiyle
      +      birlikte TLS eklentisini de içeriyorsa, konak ismi, SSL olmayan
      +      bağlantılardaki <code>Host:</code> başlığı kullanımına benzer şekilde
      +      aşağıdaki gibi kullanılır. Aksi takdirde, SSL bağlantıları için adresin
      +      eşleştiği ilk isme dayalı sankon kullanılır. Sunucunun bağlantı için
      +      hangi sertifikayı kullanacağını sankon belirlediği için bu önemlidir.</p>
      +
      +    <p>İstek bir <code>Host:</code> başlık alanı içeriyorsa, listede
      +      <code>ServerName</code> veya <code>ServerAlias</code> alanı başlık alanı
      +      ile eşleşen ilk sankona bakılır. <code>Host:</code> alanı bir port
      +      içerebilirse de Apache httpd bunu yoksayarak daima istemcinin isteği
      +      gönderdiği portu gerçek port kabul eder.</p>
      +
      +    <p>Yapılandırma dosyasındaki belirtilen IP adresiyle eşleşen ilk sankon en
      +      yüksek önceliğe sahiptir ve sunucu ismi bilinmeyen ve (bir HTTP/1.0
      +      isteği gibi) <code>Host:</code> başlık alanı içermeyen istekleri de
      +      yakalar.</p>
       
           </section>
       
           <section id="persistent"><title>Kalıcı bağlantılar</title>
       
      -    <p>Yukarıda açıklanan IP araması belli bir TCP/IP oturumunda bir defaya
      -      mahsus yapıldığı halde bir kalıcı/KeepAlive bağlantı sırasında her istek
      -      için ayrı bir arama yapılır. Başka bir deyişle, bir istemci tek bir
      -      kalıcı bağlantı üzerinde farklı isme dayalı sankonlardan sayfa talebinde
      -      bulunabilir.</p>
      +    <p>Yukarıda açıklanan <em>IP araması</em> belli bir TCP/IP oturumunda
      +      <em>bir</em> defaya mahsus yapıldığı halde bir kalıcı/KeepAlive bağlantı
      +      sırasında <em>her</em> istek için ayrı bir <em>arama</em> yapılır. Başka
      +      bir deyişle, bir istemci tek bir kalıcı bağlantı üzerinde farklı isme
      +      dayalı sankonlardan sayfa talebinde bulunabilir.</p>
       
           </section>
       
      @@ -305,60 +231,35 @@
       <section id="observations"><title>İzlenimler</title>
       
           <ul>
      -      <li>Bir isme dayalı sankon asla bir IP’ye dayalı sankon ile (veya tersi)
      -        etkileşime girmez. IP’ye dayalı sankonlara sadece kendi adres
      -        kümesindeki bir IP adresi üzerinden erişilebilir, asla başka bir
      -        adresten erişilemez. Aynısı isme dayalı sankonlara da uygulanır;
      -        onlara sadece bir <code>NameVirtualHost</code> yönergesi ile
      -        tanımlanmış adres kümesindeki bir IP adresi üzerinden
      -        erişilebilir.</li>
      +      <li>İsme dayalı sanal konak işlemleri, sunucunun en iyi eşleşen IP'ye
      +        dayalı sanal konağı seçmesinin ardından uygulanır.</li>
      +
      +      <li>İstemcinin hangi IP adresine bağlandığını umursamıyorsanız, sanal
      +        konaklarınızda adres olarak "*" kullanın, böylece yapılandırılmış
      +        sankonların hepsine isme dayalı sanal konak işlemleri uygulanır.</li>
       
             <li>Bir IP’ye dayalı sankon için asla <code>ServerAlias</code> ve
               <code>ServerPath</code> değerine bakılmaz.</li>
       
      -      <li>Yapılandırma dosyası içinde isme/IP’ye dayalı ve
      -        <code>_default_</code> sankonlar ile <code>NameVirtualHost</code>
      -        yönergelerinin yer alış sırasının birbirlerine göre bir önemi yoktur.
      -        Sıralama sadece aynı IP adresine sahip isme dayalı sankonlar arasında
      +      <li>Sıralama sadece aynı IP adresine sahip isme dayalı sankonlar arasında
               önemlidir. Aynı adres kümesine mensup isme dayalı sankonlardan
               yapılandırma dosyasında ilk sırada yer alanı en yüksek önceliğe
               sahiptir.</li>
       
      -      <li>Güvenlik saikiyle, eşleştirme işlemi sırasında <code>Host:</code>
      -        başlık alanında belirtilen port asla kullanılmaz. Apache daima
      -        istemcinin bağlantı kurduğu gerçek portu kullanır.</li>
      -
      -      <li>Değeri başka bir <code>ServerPath</code> yönergesinin değeri için
      -        önek olan bir <code>ServerPath</code> yönergesi yapılandırma
      -        dosyasında daha önce yer alıyorsa sonrakiyle eşleşme asla
      -        gerçekleşmez. (Bu belirsizliği giderecek bir <code>Host:</code> başlık
      -        alanının mümkün olmadığı varsayılır.)</li>
      -
      -      <li>Eğer tek bir IP adresine sahip IP’ye dayalı iki sankon varsa eşleşme
      -        daima yapılandırma dosyasında ilk yer alanla gerçekleşir. Böyle bir
      -        şey kasten yapılmaz. Sunucu böyle bir durumu saptadığında hata
      -        günlüğünde bir uyarı verecektir.</li>
      -
      -      <li>Bir <code>_default_</code> sankon sadece istekle eşleşen bir IP
      -        adresi bulunamadığında port numarası eşleştiği takdirde isteğe hizmet
      -        sunabilir. Port düzeyinde eşleşmenin olabilmesi için isteğin geldiği
      -        port ile sankon için belirtilen port eşleşmelidir. Olası tüm portlarla
      -        eşleşmeyi sağlamak üzere yıldız imi (<code>_default_:*</code>
      -        şeklinde) kullanılabilir. Aynı şey <code>NameVirtualHost *</code>
      -        sankonlarına da uygulanır.</li>
      +      <li>Eşleştirme işlemi sırasında <code>Host:</code>
      +        başlık alanında belirtilen port asla kullanılmaz. Apache httpd daima
      +        istemcinin isteği gönderdiği gerçek portu kullanır.</li>
      +
      +      <li>Eğer aynı IP adresine sahip IP’ye dayalı iki sankon varsa, bunlara
      +        örtük olarak isme dayalı sanal konak işlemleri uygulanır. 2.3.11
      +        sürümünden beri yeni davranış şekli budur.</li>
       
             <li>Ana_sunucunun bir isteğe hizmet sunabilmesi için istemcinin
               bağlandığı IP adresi ve port hiçbir yerde belirtilmemiş ve
      -        <code>_default_</code> dahil hiçbir sankon ile eşleşme sağlanamamış
      -        olmalıdır. Başka bir deyişle, istemcinin bağlandığı port ile eşleşen
      -        bir <code>_default_</code> sankon olmadıkça adres ve port belirtmeyen
      -        bir isteğe ana_sunucu yanıt verecektir.</li>
      -
      -      <li><code>Host:</code> başlık alanı içermeyen veya hedefi bilinmeyen bir
      -        istek geldiği takdirde, eğer bu istemcinin bağlandığı adres ve port
      -        için (örneğin, <code>NameVirtualHost</code> ile) tanımlanmış bir isme
      -        dayalı sankon varsa bu isteğe ne ana_sunucu ne de bir
      -        <code>_default_</code> sankon hizmet sunabilir.</li>
      +        hiçbir sankon ile eşleşme sağlanamamış olmalıdır. Başka bir deyişle,
      +        istemcinin bağlandığı port ile eşleşen bir <code>_default_</code>
      +        sankon olmadıkça adres ve port belirtmeyen bir isteğe ana_sunucu yanıt
      +        verecektir.</li>
       
             <li><code>VirtualHost</code> yönergelerinde asla DNS isimleri
               belirtmemelisiniz. Aksi takdirde sunucuyu başlatma sırasında DNS
      @@ -381,23 +282,15 @@
             ipuçlarına ilaveten burada da bazı ipuçları bulacaksınız:</p>
       
           <ul>
      -      <li>Ana_sunucu tanımlarının hepsini <code>VirtualHost</code>
      +      <li>Ana sunucu tanımlarının hepsini <code>VirtualHost</code>
               tanımlarının öncesinde bitirin. Bu ayrıca yapılandırmanızın
               okunabilirliğini de arttırır; <code>VirtualHost</code> tanımlarının
               sonrasına sarkan yapılandırmaların katıştırılması işlemi tüm sanal
               konakları etkileyebilen tanımlar bakımından bir
               karışıklığa/belirsizliğe sebep olabilir.)</li>
      -
      -      <li>Birbirleriyle ilgili <code>NameVirtualHost</code> ve
      -        <code>VirtualHost</code> tanımlarını okunabilirliği arttırmak için
      -        gruplayın.</li>
      -
      -      <li>Değeri başka bir <code>ServerPath</code> için önek olan tanımlamalar
      -        yapmaktan kaçının. Bundan kaçınamıyorsanız, yolu uzun olanı yolu kısa
      -        olanın öncesine yerleştirin. Örneğin, "ServerPath /abc/def" önce
      -        "ServerPath /abc" sonra yer alsın.</li>
           </ul>
       
       </section>
      +
       </manualpage>
       
      diff --git a/docs/manual/vhosts/examples.html.en b/docs/manual/vhosts/examples.html.en
      index 9515f36ffce..55fe1d5fd85 100644
      --- a/docs/manual/vhosts/examples.html.en
      +++ b/docs/manual/vhosts/examples.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>VirtualHost Examples - Apache HTTP Server</title>
      +<title>VirtualHost Examples - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>VirtualHost Examples</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>VirtualHost Examples</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../en/vhosts/examples.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -54,16 +59,15 @@
           IP-based vhost</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">Using the <code>ServerPath</code>
         directive</a></li>
      -</ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="purename" id="purename">Running several name-based web
           sites on a single IP address.</a></h2>
       
      -    <p>Your server has a single IP address, and multiple aliases (CNAMES)
      -    point to this machine in DNS. You want to run a web server for
      -    <code>www.example.com</code> and <code>www.example.org</code> on this
      -    machine.</p>
      +    <p>Your server has multiple hostnames that resolve to a single address,
      +    and you want to respond differently for <code>www.example.com</code>
      +    and <code>www.example.org</code>.</p>
       
           <div class="note"><h3>Note</h3><p>Creating virtual
                 host configurations on your Apache server does not magically
      @@ -75,33 +79,22 @@
                 <code>hosts</code> entries.</p>
           </div>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config"># Ensure that Apache listens on port 80
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +
      +    # Other directives here
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +
      +    # Other directives here
      +&lt;/VirtualHost&gt;</pre>
       
      -    # Ensure that Apache listens on port 80<br />
      -    Listen 80<br />
      -    <br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /www/example1<br />
      -      ServerName www.example.com<br />
      -      <br />
      -      # Other directives here<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /www/example2<br />
      -      ServerName www.example.org<br />
      -      <br />
      -      # Other directives here<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>The asterisks match all addresses, so the main server serves no
           requests. Due to the fact that the virtual host with
      @@ -109,15 +102,21 @@
           in the configuration file, it has the highest priority and can be seen
           as the <cite>default</cite> or <cite>primary</cite> server. That means
           that if a request is received that does not match one of the specified
      -    <code>ServerName</code> directives, it will be served by this first
      -    <code>VirtualHost</code>.</p>
      +    <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directives, it will be served by this first
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
      +
      +    <p>The above configuration is what you will want to use in almost
      +    all name-based virtual hosting situations. The only thing that this
      +    configuration will not work for, in fact, is when you are serving
      +    different content based on differing IP addresses or ports.</p>
       
           <div class="note">
                   <h3>Note</h3>
       
      -           <p>You can, if you wish, replace <code>*</code> with the actual
      -           IP address of the system, when you don't care to discriminate based
      -           on the IP address or port.</p>
      +           <p>You may replace <code>*</code> with a specific IP address
      +           on the system.  Such virtual hosts will only be used for
      +           HTTP requests received on connection to the specified IP
      +           address.</p>
       
                  <p>However, it is additionally useful to use <code>*</code>
                  on systems where the IP address is not predictable - for
      @@ -127,12 +126,6 @@
                  would work without changes whenever your IP address
                  changes.</p>
           </div>
      -
      -    <p>The above configuration is what you will want to use in almost
      -    all name-based virtual hosting situations. The only thing that this
      -    configuration will not work for, in fact, is when you are serving
      -    different content based on differing IP addresses or ports.</p>
      -
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="twoips" id="twoips">Name-based hosts on more than one
      @@ -148,35 +141,26 @@
           will serve the "main" server, <code>server.example.com</code> and on the
           other (<code>172.20.30.50</code>), we will serve two or more virtual hosts.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +# This is the "main" server running on 172.20.30.40
      +ServerName server.example.com
      +DocumentRoot "/www/mainserver"
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +
      +    # Other directives here ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +
      +    # Other directives here ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    <br />
      -    # This is the "main" server running on 172.20.30.40<br />
      -    ServerName server.example.com<br />
      -    DocumentRoot /www/mainserver<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -        <br />
      -        # Other directives here ...<br />
      -        <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -        <br />
      -        # Other directives here ...<br />
      -        <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Any request to an address other than <code>172.20.30.50</code> will be
           served from the main server. A request to <code>172.20.30.50</code> with an
      @@ -198,24 +182,17 @@
           (<code>192.168.1.1</code>).</p>
       
           <p>The server can be made to respond to internal and external requests
      -    with the same content, with just one <code>VirtualHost</code>
      -    section.</p>
      +    with the same content, with just one <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> section.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/www/server1"
      +    ServerName server.example.com
      +    ServerAlias server
      +&lt;/VirtualHost&gt;</pre>
       
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/server1<br />
      -        ServerName server.example.com<br />
      -        ServerAlias server<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Now requests from both networks will be served from the same
      -    <code>VirtualHost</code>.</p>
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
       
           <div class="note">
                 <h3>Note:</h3><p>On the internal
      @@ -238,40 +215,29 @@
           takes place after the best matching IP address and port combination
           is determined.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-8080"
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    Listen 8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -282,25 +248,18 @@
           <code>www.example.com</code> and <code>www.example.org</code>
           respectively.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Requests for any address not specified in one of the
           <code>&lt;VirtualHost&gt;</code> directives (such as
      @@ -318,42 +277,31 @@
           respectively. In each case, we want to run hosts on ports 80 and
           8080.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/www/example1-80"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/www/example1-8080"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/www/example2-80"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/www/example2-8080"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1-80<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1-8080<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2-80<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2-8080<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -363,46 +311,33 @@
           <p>Any address mentioned in the argument to a virtualhost that never
           appears in another virtual host is a strictly IP-based virtual host.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP-based
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example4"
      +    ServerName www.example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/www/example5"
      +    ServerName www.example.gov
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    # IP-based<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example4<br />
      -        ServerName www.example.edu<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example5<br />
      -        ServerName www.example.gov<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -412,18 +347,18 @@
           <p>The following example allows a front-end machine to proxy a
           virtual host through to a server running on another machine. In the
           example, a virtual host of the same name is configured on a machine
      -    at <code>192.168.111.2</code>. The <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost on">ProxyPreserveHost On</a></code> directive is
      -    used so that the desired hostname is passed through, in case we are
      -    proxying multiple hostnames to a single machine.</p>
      -
      -    <div class="example"><p><code>
      -    &lt;VirtualHost *:*&gt;<br />
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2/<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName hostname.example.com<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    at <code>192.168.111.2</code>. The <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost">ProxyPreserveHost
      +    On</a></code> directive is used so that the desired hostname is
      +    passed through, in case we are proxying multiple hostnames to a
      +    single machine.</p>
      +
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName hostname.example.com
      +&lt;/VirtualHost&gt;</pre>
      +
       
           </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -437,15 +372,10 @@
           port, <em>i.e.</em>, an address/port combination that is not used for
           any other virtual host.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Using such a default vhost with a wildcard port effectively prevents
           any request going to the main server.</p>
      @@ -467,23 +397,16 @@
           <p>Same as setup 1, but the server listens on several ports and we want
           to use a second <code>_default_</code> vhost for port 80.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default80<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>The default vhost for port 80 (which <em>must</em> appear before any
           default vhost with a wildcard port) catches all requests that were sent
      @@ -497,14 +420,11 @@
           <p>We want to have a default vhost for port 80, but no other default
           vhosts.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default"
      +...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /www/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>A request to an unspecified address on port 80 is served from the
           default vhost. Any other request to an unspecified address and port is
      @@ -531,30 +451,23 @@
           (<code>172.20.30.50</code>) to the <code>VirtualHost</code>
           directive.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +ServerName www.example.com
      +DocumentRoot "/www/example1"
      +
      +&lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    ServerName www.example.com<br />
      -    DocumentRoot /www/example1<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -        ServerAlias *.example.net<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>The vhost can now be accessed through the new address (as an
           IP-based vhost) and through the old address (as a name-based
      @@ -574,41 +487,32 @@
           containing links with an URL prefix to the name-based virtual
           hosts.</p>
       
      -    <div class="example"><h3>Server configuration</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 172.20.30.40&gt;
      +    # primary vhost
      +    DocumentRoot "/www/subdomain"
      +    RewriteEngine On
      +    RewriteRule "." "/www/subdomain/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub1"
      +    ServerName www.sub1.domain.tld
      +    ServerPath "/sub1/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub1/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub2"
      +    ServerName www.sub2.domain.tld
      +    ServerPath "/sub2/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        # primary vhost<br />
      -        DocumentRoot /www/subdomain<br />
      -        RewriteEngine On<br />
      -        RewriteRule . /www/subdomain/index.html<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /www/subdomain/sub1<br />
      -    <span class="indent">
      -        ServerName www.sub1.domain.tld<br />
      -        ServerPath /sub1/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/subdomain/sub2<br />
      -        ServerName www.sub2.domain.tld<br />
      -        ServerPath /sub2/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Due to the <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>
           directive a request to the URL
      @@ -635,7 +539,28 @@
       <a href="../ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/examples.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/examples.html.fr b/docs/manual/vhosts/examples.html.fr
      index bda4e5bb5cc..16f7c943780 100644
      --- a/docs/manual/vhosts/examples.html.fr
      +++ b/docs/manual/vhosts/examples.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Exemples d'utilisations de VirtualHost - Serveur Apache HTTP</title>
      +<title>Exemples d'utilisations de VirtualHost - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Exemples d'utilisations de VirtualHost</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Exemples d'utilisations de VirtualHost</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -56,16 +61,15 @@
       	par nom en un serveur virtuel par IP</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#serverpath">Utilisation de la directive 
           <code>ServerPath</code></a></li>
      -</ul></div>
      +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="purename" id="purename">Fonctionnement de plusieurs serveurs 
         virtuels par nom sur une seule adresse IP.</a></h2>
       
      -    <p>Votre serveur ne dispose que d'une seule adresse IP, et de 
      -    nombreux alias (CNAMES) pointent vers cette adresse dans le DNS. 
      -    Pour l'exemple, <code>www.example.com</code> et 
      -    <code>www.example.org</code> doivent tourner sur cette machine.</p>
      +    <p>Votre serveur possde plusieurs noms d'hte qui correspondent  une seule
      +    adresse IP, et vous souhaitez des rponses diffrentes si on demande
      +    <code>www.example.com</code> ou <code>www.example.org</code>.</p>
       
           <div class="note"><h3>Note&nbsp;:</h3><p>La configuration de serveurs virtuels 
           sous Apache ne provoque pas leur apparition magique dans la 
      @@ -77,33 +81,23 @@
           que sur la machine possdant ces entres.</p>
           </div>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config"># Apache doit couter sur le port 80
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +  
      +    # Autres directives ici
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
       
      -    # Apache doit couter sur le port 80<br />
      -    Listen 80<br />
      -    <br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /www/example.com<br />
      -      ServerName www.example1.com<br />
      -      <br />
      -      # Autres directives ici<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /www/example.org<br />
      -      ServerName www.example2.org<br />
      -      <br />
      -      # Autres directives ici<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    # Autres directives ici
      +&lt;/VirtualHost&gt;</pre>
      +
      +   
       
           <p>Les astrisques correspondent  toutes les adresses, si bien que 
           le serveur principal ne rpondra jamais  aucune requte. Comme le
      @@ -112,16 +106,21 @@
           de configuration, il a la plus grande priorit et peut tre vu 
           comme serveur <cite>par dfaut</cite> ou <cite>primaire</cite>&nbsp;; 
           ce qui signifie que toute requte reue ne correspondant  aucune 
      -    des directives <code>ServerName</code> sera servie par ce premier 
      -    <code>VirtualHost</code>.</p>
      +    des directives <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> sera servie par ce premier 
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
      +
      +    <p>La configuration ci-dessus correspond  ce que l'on souhaite pour
      +    la plupart des serveurs virtuels  base de nom. Il faudra cependant
      +    utiliser une configuration diffrente si vous souhaitez servir un
      +    contenu diffrent en fonction de l'adresse IP ou du port.</p>
       
           <div class="note">
                   <h3>Note&nbsp;:</h3>
       
                   <p>Vous pouvez remplacer <code>*</code> 
      -            par l'adresse IP du systme si vous ne souhaitez pas faire
      -	    oprer la slection du serveur virtuel en fonction de la
      -	    paire adresse IP/port.</p>
      +            par une adresse IP du systme. Le serveur virtuel concern
      +	    ne sera alors slectionn que pour les requtes HTTP vers
      +	    cette adresse IP.</p>
       
                  <p>En gnral, il est commode d'utiliser <code>*</code> sur 
                  les systmes dont l'adresse IP n'est pas constante - par 
      @@ -133,12 +132,6 @@
                  systme est modifie.</p>
           </div>
       
      -    <p>La configuration ci-dessus est en pratique utilise dans la 
      -    plupart des cas pour les serveurs virtuels par nom. En fait, le 
      -    seul cas o cette configuration ne fonctionne pas est lorsque 
      -    diffrents contenus doivent tre servis en fonction de l'adresse IP 
      -    et du port contacts par le client.</p>
      -
           </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="twoips" id="twoips">Serveurs virtuels par nom sur plus 
      @@ -155,35 +148,26 @@
           (<code>172.20.30.50</code>), deux serveurs virtuels (ou plus) 
           rpondront.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +# Serveur "principal" sur 172.20.30.40
      +ServerName server.example.com
      +DocumentRoot "/www/mainserver"
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +    
      +    # D'autres directives ici ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
           
      +    # D'autres directives ici ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -        <br />
      -    # Serveur "principal" sur 172.20.30.40<br />
      -    ServerName server.example.com<br />
      -    DocumentRoot /www/mainserver<br />
      -        <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.com<br />
      -        ServerName www.example.com<br />
      -   	        <br />
      -        # D'autres directives ici ...<br />
      -                   <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -        <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example.org<br />
      -                <br />
      -        # D'autres directives ici ...<br />
      -                <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Toute requte arrivant sur une autre adresse que 
           <code>172.20.30.50</code> sera servie par le serveur principal. 
      @@ -207,23 +191,17 @@
       
           <p>Le serveur peut tre configur pour rpondre de la mme manire 
           aux requtes internes et externes, au moyen d'une seule section 
      -    <code>VirtualHost</code>.</p>
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/www/server1"
      +    ServerName server.example.com
      +    ServerAlias server
      +&lt;/VirtualHost&gt;</pre>
       
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/server1<br />
      -        ServerName server.example.com<br />
      -        ServerAlias server<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Ainsi, les requtes en provenance de chacun des deux rseaux 
      -    seront servies par le mme <code>VirtualHost</code>.</p>
      +    seront servies par le mme <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.</p>
       
           <div class="note">
                 <h3>Note&nbsp;:</h3><p>Sur le rseau interne, il est possible 
      @@ -247,40 +225,29 @@
           la slection de la meilleure correspondance du point de vue adresse
           IP/port.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-8080"
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    Listen 8080<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
       	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -290,25 +257,18 @@
           et <code>172.20.30.50</code>) correspondant respectivement aux noms 
           <code>www.example.com</code> et <code>www.example.org</code>.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.com<br />
      -        ServerName www.example1.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example2.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Les requtes provenant d'adresses non spcifies dans l'une des 
           directives <code>&lt;VirtualHost&gt;</code> (comme pour 
      @@ -326,42 +286,31 @@
           Pour chacun d'eux, nous voulons un hbergement sur les ports 80 
           et 8080.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/www/example1-80"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/www/example1-8080"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/www/example2-80"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/www/example2-8080"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.com-80<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.com-8080<br />
      -        ServerName www.example.com<br />
      -		</span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.org-80<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.org-8080<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
       	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -373,46 +322,33 @@
           section un serveur virtuel slectionnable uniquement en fonction de
           son adresse IP.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP-based
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example4"
      +    ServerName www.example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/www/example5"
      +    ServerName www.example.gov
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    # "par-IP"<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example4<br />
      -        ServerName www.example.edu<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example5<br />
      -        ServerName www.example.gov<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
       	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -423,19 +359,18 @@
           un serveur virtuel fonctionnant sur le serveur d'une autre machine. 
           Dans cet exemple, un serveur virtuel de mme nom est configur sur 
           une machine  l'adresse <code>192.168.111.2</code>. La directive 
      -    <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost on">ProxyPreserveHost On</a></code> est 
      +    <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost">ProxyPreserveHost On</a></code> est
           employe pour permette au nom de domaine d'tre prserv lors du 
           transfert, au cas o plusieurs noms de domaines cohabitent sur 
           une mme machine.</p>
       
      -    <div class="example"><p><code>
      -    &lt;VirtualHost *:*&gt;<br />
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName hostname.example.com<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName hostname.example.com
      +&lt;/VirtualHost&gt;</pre>
      +
       
           </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -449,15 +384,10 @@
           d'adresses IP ou de ports non connus, <em>c'est--dire</em>, d'un 
           couple adresse/port non trait par aucun autre serveur virtuel.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>L'utilisation d'un tel serveur virtuel avec un joker pour le 
           port empche de manire efficace qu'une requte n'atteigne le 
      @@ -485,23 +415,16 @@
           le serveur coute sur plusieurs ports et un second serveur virtuel 
           <code>_default_</code> pour le port 80 est ajout.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default80<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/default<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Le serveur virtuel par dfaut dfini pour le port 80 (il doit 
           imprativement tre plac avant un autre serveur virtuel par 
      @@ -516,14 +439,11 @@
           <p>Nous voulons crer un serveur virtuel par dfaut seulement 
           pour le port 80.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default"
      +...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /www/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Une requte vers une adresse non spcifie sur le port 80 
           sera servie par le serveur virtuel par dfaut, et toute autre 
      @@ -550,30 +470,23 @@
           adresse IP (<code>172.20.30.50</code>) dans la directive 
           <code>VirtualHost</code>.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +ServerName www.example.com
      +DocumentRoot "/www/example1"
      +
      +&lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    ServerName www.example.com<br />
      -    DocumentRoot /www/example.com<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example.org<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/example.net<br />
      -        ServerName www.example.net<br />
      -        ServerAlias *.example.net<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Le serveur virtuel peut maintenant tre joint par la nouvelle 
           adresse (comme un serveur virtuel par IP) et par l'ancienne 
      @@ -595,41 +508,32 @@
           des liens dont les URLs auront un prfixe identifiant les serveurs 
           virtuels par nom.</p>
       
      -    <div class="example"><h3>Configuration du serveur</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 172.20.30.40&gt;
      +    # serveur virtuel primaire
      +    DocumentRoot "/www/subdomain"
      +    RewriteEngine On
      +    RewriteRule "." "/www/subdomain/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub1"
      +    ServerName www.sub1.domain.tld
      +    ServerPath "/sub1/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub1/.*)" "/www/subdomain$1
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub2"
      +    ServerName www.sub2.domain.tld
      +    ServerPath "/sub2/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        # Serveur virtuel primaire<br />
      -        DocumentRoot /www/subdomain<br />
      -        RewriteEngine On<br />
      -        RewriteRule . /www/subdomain/index.html<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /www/subdomain/sub1<br />
      -    <span class="indent">
      -        ServerName www.sub1.domain.tld<br />
      -        ServerPath /sub1/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /www/subdomain/sub2<br />
      -        ServerName www.sub2.domain.tld<br />
      -        ServerPath /sub2/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p> cause de la directive 
           <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>, une requte sur 
      @@ -655,7 +559,28 @@
       <a href="../ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/examples.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/examples.html.ja.utf8 b/docs/manual/vhosts/examples.html.ja.utf8
      index ba67ab3b402..de73c1b7c7a 100644
      --- a/docs/manual/vhosts/examples.html.ja.utf8
      +++ b/docs/manual/vhosts/examples.html.ja.utf8
      @@ -1,32 +1,38 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>バーチャルホストの例 - Apache HTTP サーバ</title>
      +<title>バーチャルホストの例 - Apache HTTP サーバ バージョン 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン
      -            2.3</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>バーチャルホストの例</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>バーチャルホストの例</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/examples.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
       
           <p>この文書は、バーチャルホストの設定の際に
      @@ -55,7 +61,7 @@
           バーチャルホストに移行する</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#serverpath"><code>ServerPath</code> ディレクティブを
           使う</a></li>
      -</ul></div>
      +</ul><h3>参照</h3><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="purename" id="purename">一つの IP アドレスでいくつかの名前ベースの
      @@ -642,12 +648,33 @@
           使われています。</p>
         </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/examples.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/examples.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/examples.html.ko.euc-kr b/docs/manual/vhosts/examples.html.ko.euc-kr
      index dd55fdb28cb..8dabe695eae 100644
      --- a/docs/manual/vhosts/examples.html.ko.euc-kr
      +++ b/docs/manual/vhosts/examples.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ȣƮ  - Apache HTTP Server</title>
      +<title>ȣƮ  - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ȣƮ </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ȣƮ </h1>
       <div class="toplang">
       <p><span> : </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -54,7 +59,7 @@
           ȣƮ ű</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#serverpath"><code>ServerPath</code>
       	þ ϱ</a></li>
      -</ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="purename" id="purename">IP ּ Ѱ  ̸
      @@ -625,7 +630,28 @@
       <a href="../ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/examples.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/examples.html.tr.utf8 b/docs/manual/vhosts/examples.html.tr.utf8
      index 84ac987b8a5..46fa82343f3 100644
      --- a/docs/manual/vhosts/examples.html.tr.utf8
      +++ b/docs/manual/vhosts/examples.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Sanal Konak Örnekleri - Apache HTTP Sunucusu</title>
      +<title>Sanal Konak Örnekleri - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Sanal Konak Örnekleri</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Sanal Konak Örnekleri</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
      @@ -24,13 +29,12 @@
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
       
      -    <p>Bu belgede sanal konaklarla ile ilgili olarak karşılaşılması olası tüm
      -      senaryolara yer verilmeye çalışılmıştır. Buradaki senaryolar, tek bir
      -      sunucu üzerinde  <a href="name-based.html">isme dayalı</a> veya <a href="ip-based.html">IP’ye dayalı</a> sanal konaklar aracılığıyla çok
      -      sayıda sitenin sunumu ile ilgilidir.
      +    <p>Bu belgede <a href="index.html">sanal konaklarla</a> ile ilgili olarak
      +      karşılaşılması olası tüm  senaryolara yer verilmeye çalışılmıştır.
      +      Buradaki senaryolar, tek bir  sunucu üzerinde  <a href="name-       based.html">isme dayalı</a> veya <a href="ip-based.html">IP’ye dayalı</a>
      +      sanal konaklar aracılığıyla çok sayıda sitenin sunumu ile ilgilidir.
           </p>
       
       </div>
      @@ -48,17 +52,17 @@
       <li><img alt="" src="../images/down.gif" /> <a href="#migrate">Bir isme dayalı sanal konağı bir IP’ye dayalı
           sanal konakla yansılamak</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#serverpath"><code>ServerPath</code> yönergesinin kullanımı</a></li>
      -</ul></div>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="purename" id="purename">Tek bir IP ile çok sayıda isme dayalı site</a></h2>
           
       
      -    <p>Bu örnekte, makinenizin tek bir IP adresine sahip olduğunu ve bu
      -      makineye <code>mesela.dom</code> ve <code>faraza.dom</code> şeklinde
      -      (DNS A kayıtları sayesinde) farklı isimlerle erişilebildiğini
      -      varsayalım.</p>
      -
      +    <p>Bu örnekte, makinenizin tek bir IP adresine çözümlenen çok sayıda konak 
      +      adına sahip olduğunu, <code>example.com</code> ve 
      +      <code>example.org</code> gibi farklı isimlere farklı yanıtlar vermek 
      +      istediğinizi varsayalım.</p>
      +    
           <div class="note"><h3>Bilginize</h3><p>Apache sunucusu üzerinde sanal konakları
             yapılandırmakla bu konak isimleri için sihirli bir şekilde DNS
             kayıtlarının da oluşturulmasını sağlamış olmazsınız. Bu isimler için
      @@ -71,55 +75,49 @@
             gelecek ziyaretçileriniz için DNS kayıtlarınızın olması şarttır.</p>
           </div>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    # Apache’nin 80. portu dinlediğinden emin olalım<br />
      -    Listen 80<br />
      -    <br />
      -    # Sanal konak istekleri için bütün IP adresleri dinlensin.<br />
      -    NameVirtualHost *:80<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /siteler/mesela<br />
      -      ServerName mesela.dom<br />
      -      <br />
      -      # Diğer yönergeler, burada ...<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <span class="indent">
      -      DocumentRoot /siteler/faraza<br />
      -      ServerName faraza.dom<br />
      -      <br />
      -      # Diğer yönergeler, burada ...<br />
      -      <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config"># Apache’nin 80. portu dinlediğinden emin olalım
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +  DocumentRoot "/siteler/ecom"
      +  ServerName example.com
      +
      +  # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +  DocumentRoot "/siteler/eorg"
      +  ServerName example.org
      +
      +  # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>Yıldız imleri tüm adreslerle eşleşmeyi sağladığından ana sunucu
             (yapılandırma dosyası genelindeki yapılandırma - sunucu geneli)
      -      erişilebilir olmayacaktır. <code>mesela.dom</code> yapılandırma
      -      dosyasındaki ilk sanal konak olduğundan en yüksek önceliğe sahiptir ve
      +      erişilebilir olmayacaktır. Yapılandırma
      +      dosyasındaki <code>ServerName example.com</code> yönergeli konak, ilk
      +      sanal konak olduğundan en yüksek önceliğe sahiptir ve
             <cite>öntanımlı</cite> veya <cite>baskın</cite> site olarak davranır.
      -      Yani, hiçbir <code>ServerName</code> yönergesi ile eşleşmeyen bir istek
      -      alındığında bu istek ilk <code>VirtualHost</code> yapılandırması ile
      +      Yani, hiçbir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesi 
      +      ile eşleşmeyen bir istek alındığında bu istek ilk <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> yapılandırması ile
             karşılanır.</p>
      +    
      +    <p>Yukarıdaki yapılandırmayı hemen hemen tüm isme dayalı sanal konaklar
      +      için kullanabilirsiniz. Bu yapılandırmanın çalışmayacağı tek durum,
      +      farklı içerikleri farklı IP adres veya portlardan sunma gereğiyle
      +      karşılaşmaktır.</p>
       
           <div class="note"><h3>Bilginize</h3>
      -      <p>İsterseniz, <code>*</code> yerine kendi IP adresinizi yazabilirsiniz.
      -        Ancak bu durumda bunu hem <code>VirtualHost</code> hem de
      -        <code>NameVirtualHost</code> için yapmalısınız:</p>
      +      <p><code>*</code> yerine sisteminizdeki belli bir IP adresini 
      +        yazabilirsiniz. Böyle sanal konaklar sadece, HTTP isteklerinin sadece 
      +        belirtilen IP adreslerinden alınması için kullanilabilir.</p>
      +
      +      <pre class="prettyprint lang-config">NameVirtualHost 192.168.1.22
      +
      +&lt;VirtualHost 192.168.1.22&gt;
      +  # vs. ...
      +&lt;/VirtualHost&gt;</pre>
       
      -      <div class="example"><p><code>
      -      NameVirtualHost 192.168.1.22<br />
      -      <br />
      -      &lt;VirtualHost 192.168.1.22&gt;<br />
      -        # vs. ...
      -      </code></p></div>
       
             <p>Bununla birlikte, IP adresinin önceden kestirilebilir olmadığı
               sistemlerde, örneğin, hizmet sağlayıcınıza çevirmeli ağ ile bağlanıyor
      @@ -130,11 +128,6 @@
               kullanabilirsiniz.</p>
           </div>
       
      -    <p>Yukarıdaki yapılandırmayı hemen hemen tüm isme dayalı sanal konaklar
      -      için kullanabilirsiniz. Bu yapılandırmanın çalışmayacağı tek durum,
      -      farklı içerikleri farklı IP adreslerinden sunma gereğiyle
      -      karşılaşmaktır.</p>
      -
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="twoips" id="twoips">IP adresleri farklı çok sayıda isme dayalı site</a></h2>
      @@ -146,46 +139,35 @@
           </div>
       
           <p>Sunucunun iki IP adresi olsun. Birinden "ana sunucu"
      -      (<code>192.168.1.2</code>) diğerinden <code>mesela.dom</code>
      +      (<code>192.168.1.2</code>) diğerinden <code>example.com</code>
             <code>192.168.2.2</code> hizmet versin. Bu arada başka sanal konakları
             da sunabilelim istiyoruz.</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    Listen 80<br />
      -    <br />
      -    # Bu, 192.168.1.2 adresindeki "ana sunucu" olsun<br />
      -    ServerName sunucu.faraza.dom<br />
      -    DocumentRoot /siteler/anasunucu<br />
      -    <br />
      -    # Burası da diğer adres için<br />
      -    NameVirtualHost 192.168.2.2<br />
      -    <br />
      -    &lt;VirtualHost 192.168.2.2&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -        <br />
      -        # Diğer yönergeler, burada ...<br />
      -        <br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.2.2&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -        <br />
      -        # Diğer yönergeler, burada ...<br />
      -        <br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      -
      -    <p><code>192.168.2.2</code> adresinden gelmeyen tüm isteklere ana sunucu
      -      (<code>sunucu.faraza.dom</code>), <code>192.168.2.2</code> adresinden
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +# Bu, 192.168.1.2 adresindeki "ana sunucu" olsun
      +ServerName sunucu.example.com
      +DocumentRoot "/siteler/anasunucu"
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +
      +    # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +
      +    # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;</pre>
      +
      +
      +    <p><code>192.168.1.20</code> adresinden gelmeyen tüm isteklere ana sunucu
      +      (<code>sunucu.example.com</code>), <code>192.168.1.20</code> adresinden
             gelen sunucu ismi belirtmeyenler ile <code>Host:</code> başlığı
      -      belirtmeyenlere ise  <code>mesela.dom</code> hizmet verecektir.</p>
      +      belirtmeyenlere ise  <code>example.com</code> hizmet verecektir.</p>
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -194,33 +176,26 @@
       
           <p>Sunucu makine iki IP adresine sahip olsun. Biri iç ağa
             (<code>192.168.1.1</code>) diğeri dış ağa (<code>172.20.30.40</code>)
      -      bakıyor olsun. <code>sunucu.mesela.dom</code> ismi dış ağda dış ağa
      +      bakıyor olsun. <code>sunucu.example.com</code> ismi dış ağda dış ağa
             bakan IP’ye, iç ağda ise iç ağa bakan IP’ye çözümleniyor olsun.</p>
       
           <p>Bu durumda, sunucu hem iç hem de dış ağdan gelen isteklere aynı içerik,
      -      dolayısıyla aynı <code>VirtualHost</code> bölümü ile hizmet
      -      verebilir.</p>
      -
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    NameVirtualHost 192.168.1.1<br />
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/sunucu<br />
      -        ServerName sunucu.mesela.dom<br />
      -        ServerAlias sunucu<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +      dolayısıyla aynı <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü ile hizmet verebilir.</p>
      +
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/siteler/sunucu"
      +    ServerName sunucu.example.com
      +    ServerAlias sunucu
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>Artık, hem iç hem de dış ağdan gelen isteklere aynı
      -      <code>VirtualHost</code> bölümünden hizmet sunulacaktır.</p>
      +      <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> 
      +      bölümünden hizmet sunulacaktır.</p>
       
           <div class="note"><h3>Bilginize:</h3>
             <p>İç ağdan istek yapan biri, tam nitelenmiş konak ismi
      -        <code>sunucu.mesela.dom</code> yerine makine ismini
      +        <code>sunucu.example.com</code> yerine makine ismini
               (<code>sunucu</code>) kullanabilir (<code>ServerAlias sunucu</code>
               satırına dikkat).</p>
       
      @@ -235,76 +210,53 @@
       
           <p>Aynı IP adresine sahip çok sayıda konak ismine sahip olduğunuzu ve
             bunların bazılarının farklı portları kullanmasını istediğinizi
      -      varsayalım. <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>
      -      yönergesi ile port tanımlamak suretiyle bunu mümkün kılabilirsiniz.
      -      <code>NameVirtualHost&nbsp;<em>isim:port</em></code> tanımı yapmadan
      -      veya bunun yerine <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
      -      kullanarak <code>VirtualHost&nbsp;<em>isim:port</em></code> kullanmaya
      -      kalkışırsanız, yapılandırmanız çalışmayacaktır.</p>
      -
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    Listen 80<br />
      -    Listen 8080<br />
      -    <br />
      -    NameVirtualHost 172.20.30.40:80<br />
      -    NameVirtualHost 172.20.30.40:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName mesela.dom<br />
      -        DocumentRoot /siteler/mesela-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName mesela.dom<br />
      -        DocumentRoot /siteler/mesela-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        ServerName faraza.dom<br />
      -        DocumentRoot /siteler/faraza-80<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        ServerName faraza.dom<br />
      -        DocumentRoot /siteler/faraza-8080<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +      varsayalım. Aşağıdaki örnekte, isim eşleşmesinin, en iyi eşleşen IP
      +      adresi ve port çifti saptandıktan sonra yer alması gösterilmiştir. </p>
      +
      +    <pre class="prettyprint lang-config">Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName example.com
      +    DocumentRoot "/siteler/ecom-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName example.com
      +    DocumentRoot "/siteler/ecom-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName example.org
      +    DocumentRoot "/siteler/eorg-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName example.org
      +    DocumentRoot "/siteler/eorg-8080"
      +&lt;/VirtualHost&gt;</pre>
      +
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="ip" id="ip">IP’ye dayalı sanal konaklar</a></h2>
       
      -    <p>Sunucu makinenin, biri <code>mesela.dom</code> adından çözümlenen
      -      <code>172.20.30.40</code>, diğeri <code>faraza.dom</code> adından
      +    <p>Sunucu makinenin, biri <code>example.com</code> adından çözümlenen
      +      <code>172.20.30.40</code>, diğeri <code>example.org</code> adından
             çözümlenen <code>172.20.30.50</code> diye iki IP adresi olsun.</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    Listen 80<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p><code>&lt;VirtualHost&gt;</code> yönergelerinde belirtilmeyen
             adreslerle yapılan isteklere (örneğin, <code>localhost</code>) sunucu
      @@ -314,97 +266,74 @@
       <h2><a name="ipport" id="ipport">Hem IP’ye hem de porta dayalı sanal konaklar</a></h2>
           
       
      -    <p>Sunucu makinenin, biri <code>mesela.dom</code> adından çözümlenen
      -      <code>172.20.30.40</code>, diğeri <code>faraza.dom</code> adından
      +    <p>Sunucu makinenin, biri <code>example.com</code> adından çözümlenen
      +      <code>172.20.30.40</code>, diğeri <code>example.org</code> adından
             çözümlenen <code>172.20.30.50</code> diye iki IP adresi olsun ve iki
             konak da hem 80 hem de 8080 portlarında çalışsınlar istiyoruz.</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/mesela-80<br />
      -        ServerName mesela.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/mesela-8080<br />
      -        ServerName mesela.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/faraza-80<br />
      -        ServerName faraza.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/faraza-8080<br />
      -        ServerName faraza.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/siteler/ecom-80"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/siteler/ecom-8080"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/siteler/eorg-80"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/siteler/eorg-8080"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;</pre>
      +
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="mixed" id="mixed">Hem isme hem de IP‘ye dayalı sanal konaklar</a></h2>
           
       
      -    <p>Bazı adreslerde isme dayalı, bazılarında da IP’ye dayalı sanal konaklar
      -      çalışsın istersek...</p>
      -
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -
      -    Listen 80<br />
      -    <br />
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    # IP-based<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/filanca<br />
      -        ServerName filanca.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/fesmekan<br />
      -        ServerName fesmekan.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <p>Bir <code>VirtualHost</code> yönergesinde belirtilen bir IP adresi başka
      +      bir sanal konakta görünmüyorsa bu sankon kesinlikle IP'ye dayalı bir
      +      sanal konaktır.</p>
      +
      +    <pre class="prettyprint lang-config">Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/enet"
      +    ServerName example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP'ye dayalı
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/siteler/eedu"
      +    ServerName example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/siteler/egov"
      +    ServerName example.gov
      +&lt;/VirtualHost&gt;</pre>
      +
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -416,19 +345,16 @@
             çalıştırmak istediğimizi varsayıyoruz. <code>192.168.111.2</code> IP
             adresli bir makinede aynı isimde bir sanal konak yapılandırılmış olsun.
             Çok sayıda konak ismi için vekil olarak tek bir makine kullandığımızdan
      -      ve konak isminin de aktarılmasını arzuladığımızdan <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost on">ProxyPreserveHost On</a></code> yönergesini
      -      kullandık.</p>
      -
      -    <div class="example"><p><code>
      -    &lt;VirtualHost *:*&gt;<br />
      -    <span class="indent">
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2/<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName konak.mesela.dom<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +      ve konak isminin de aktarılmasını arzuladığımızdan <code class="directive"><a href="../mod/mod_proxy.html#proxypreservehost">ProxyPreserveHost
      +      On</a></code> yönergesini kullandık.</p>
      +
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName konak.example.com
      +&lt;/VirtualHost&gt;</pre>
      +
       
           </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -440,15 +366,10 @@
           <p>Bir IP adresi ve port belirtilmeyen veya hiçbir sanal konağın hiçbir
             adresi/portu ile eşleşmeyen istekleri yakalamak istersek...</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/siteler/default"
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/default<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Bütün portlarla eşleşen böyle bir öntanımlı sanal konağın kullanımı
             hiçbir isteğin ana sunucuya gitmemesi sonucunu doğurur.</p>
      @@ -471,23 +392,16 @@
           <p>Önceki yapılandırmaya ek olarak 80. portta ayrı bir
             <code>_default_</code> sanal konağı kullanmak istersek...</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/siteler/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/siteler/default"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/default80<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/default<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>80. porttan hizmet sunan <code>_default_</code> sanal konağı IP adresi
             belirtilmeyen tüm istekleri yakalar, bunu yapabilmesi için yapılandırma
      @@ -501,19 +415,19 @@
           <p><code>_default_</code> sanal konağının sadece 80. porttan hizmet
             sunmasını istersek...</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/siteler/default"
      +    ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /siteler/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>80. porttan gelen IP adresi belirtilmemiş isteklere
             <code>_default_</code> sanal konağı, diğer portlardan gelen adres
             belirtilmemiş isteklere ise ana sunucu hizmet verecektir.</p>
      -    
      +
      +    <p>Bir sanal konak bildiriminde <code>*</code> kullanımı
      +      <code>_default_</code> kullanımından daha yüksek öncelik sağlar.</p>
      +   
       
         </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -521,41 +435,33 @@
           sanal konakla yansılamak</a></h2>
       
           <p>İsme dayalı sanal konak örneklerinin <a href="#twoips">2. sinde</a> adı
      -      geçen <code>falanca.dom</code> bu örnekte kendi IP adresinden hizmet
      +      geçen <code>example.org</code> bu örnekte kendi IP adresinden hizmet
             veriyor olsun. İsme dayalı sanal konağı eski IP adresiyle kaydetmiş
             vekiller ve isim sunucularından kaynaklanacak olası sorunlardan kaçınmak
             için yansılama sırasında sanal konağı hem eski hem de yeni IP adresiyle
             sunmamız lazım.</p>
       
           <p>Çözüm kolay, çünkü yapacağımız sadece <code>VirtualHost</code>
      -      yönergesine yeni IP adresini (<code>192.168.2.2</code>) eklemek olacak.</p>
      +      yönergesine yeni IP adresini (<code>192.168.1.2</code>) eklemek
      +      olacak.</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">Listen 80
      +ServerName example.com
      +DocumentRoot "/siteler/ecom"
      +
      +&lt;VirtualHost 192.168.1.20 192.168.1.2&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/enet"
      +    ServerName example.enet
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    Listen 80<br />
      -    ServerName mesela.dom<br />
      -    DocumentRoot /siteler/mesela<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2 192.168.2.2&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -        ServerAlias *.faraza.dom<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p>Böylece sanal konağa hem yeni (bir IP’ye dayalı sanal konak olarak)
             hem de eski adresinden (bir isme dayalı sanal konak olarak)
      @@ -575,43 +481,32 @@
             bağlantısı içeren bir bilgilendirme sayfası sunmak üzere yeni bir sanal
             konak oluşturabiliriz.</p>
       
      -    <div class="example"><h3>Sunucu yapılandırması</h3><p><code>
      -    
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 172.20.30.40&gt;
      +    # ilk sanal konak
      +    DocumentRoot "/siteler/baska"
      +    RewriteEngine On
      +    RewriteRule "." "/siteler/baska/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot /siteler/baska/bir
      +    ServerName "bir.baska.tld"
      +    ServerPath "/bir/"
      +    RewriteEngine On
      +    RewriteRule "^(/bir/.*) /siteler/baska$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/baska/iki"
      +    ServerName iki.baska.tld
      +    ServerPath "/iki/"
      +    RewriteEngine On
      +    RewriteRule "^(/iki/.*)" "/siteler/baska$1"
      +    # ...
      +&lt;/VirtualHost&gt;</pre>
       
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        # ilk sanal konak<br />
      -        DocumentRoot /siteler/baska<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^/.* /siteler/baska/index.html<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /siteler/baska/bir<br />
      -    <span class="indent">
      -        ServerName bir.baska.tld<br />
      -        ServerPath /bir/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/bir/.*) /siteler/baska$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <span class="indent">
      -        DocumentRoot /siteler/baska/iki<br />
      -        ServerName iki.baska.tld<br />
      -        ServerPath /iki/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/iki/.*) /siteler/baska$1<br />
      -        # ...<br />
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
       
           <p><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> yönergesinden dolayı
             <code>http://bir.baska.tld/bir/</code> şeklinde yapılan isteklere
      @@ -640,7 +535,28 @@
       <a href="../ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/examples.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/examples.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/examples.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/examples.xml b/docs/manual/vhosts/examples.xml
      index 0d96e98454a..6a87b7842e5 100644
      --- a/docs/manual/vhosts/examples.xml
      +++ b/docs/manual/vhosts/examples.xml
      @@ -38,10 +38,9 @@
         <section id="purename"><title>Running several name-based web
           sites on a single IP address.</title>
       
      -    <p>Your server has a single IP address, and multiple aliases (CNAMES)
      -    point to this machine in DNS. You want to run a web server for
      -    <code>www.example.com</code> and <code>www.example.org</code> on this
      -    machine.</p>
      +    <p>Your server has multiple hostnames that resolve to a single address,
      +    and you want to respond differently for <code>www.example.com</code>
      +    and <code>www.example.org</code>.</p>
       
           <note><title>Note</title><p>Creating virtual
                 host configurations on your Apache server does not magically
      @@ -53,33 +52,23 @@
                 <code>hosts</code> entries.</p>
           </note>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    # Ensure that Apache listens on port 80<br />
      -    Listen 80<br />
      -    <br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /www/example1<br />
      -      ServerName www.example.com<br />
      -      <br />
      -      # Other directives here<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /www/example2<br />
      -      ServerName www.example.org<br />
      -      <br />
      -      # Other directives here<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +# Ensure that Apache listens on port 80
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +
      +    # Other directives here
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +
      +    # Other directives here
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>The asterisks match all addresses, so the main server serves no
           requests. Due to the fact that the virtual host with
      @@ -87,15 +76,21 @@
           in the configuration file, it has the highest priority and can be seen
           as the <cite>default</cite> or <cite>primary</cite> server. That means
           that if a request is received that does not match one of the specified
      -    <code>ServerName</code> directives, it will be served by this first
      -    <code>VirtualHost</code>.</p>
      +    <directive module="core">ServerName</directive> directives, it will be served by this first
      +    <directive type="section" module="core">VirtualHost</directive>.</p>
      +
      +    <p>The above configuration is what you will want to use in almost
      +    all name-based virtual hosting situations. The only thing that this
      +    configuration will not work for, in fact, is when you are serving
      +    different content based on differing IP addresses or ports.</p>
       
           <note>
                   <title>Note</title>
       
      -           <p>You can, if you wish, replace <code>*</code> with the actual
      -           IP address of the system, when you don't care to discriminate based
      -           on the IP address or port.</p>
      +           <p>You may replace <code>*</code> with a specific IP address
      +           on the system.  Such virtual hosts will only be used for
      +           HTTP requests received on connection to the specified IP
      +           address.</p>
       
                  <p>However, it is additionally useful to use <code>*</code>
                  on systems where the IP address is not predictable - for
      @@ -105,12 +100,6 @@
                  would work without changes whenever your IP address
                  changes.</p>
           </note>
      -
      -    <p>The above configuration is what you will want to use in almost
      -    all name-based virtual hosting situations. The only thing that this
      -    configuration will not work for, in fact, is when you are serving
      -    different content based on differing IP addresses or ports.</p>
      -
         </section>
       
         <section id="twoips"><title>Name-based hosts on more than one
      @@ -126,35 +115,27 @@
           will serve the "main" server, <code>server.example.com</code> and on the
           other (<code>172.20.30.50</code>), we will serve two or more virtual hosts.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 80<br />
      -    <br />
      -    # This is the "main" server running on 172.20.30.40<br />
      -    ServerName server.example.com<br />
      -    DocumentRoot /www/mainserver<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -        <br />
      -        # Other directives here ...<br />
      -        <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -        <br />
      -        # Other directives here ...<br />
      -        <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +
      +# This is the "main" server running on 172.20.30.40
      +ServerName server.example.com
      +DocumentRoot "/www/mainserver"
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +
      +    # Other directives here ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +
      +    # Other directives here ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Any request to an address other than <code>172.20.30.50</code> will be
           served from the main server. A request to <code>172.20.30.50</code> with an
      @@ -176,24 +157,19 @@
           (<code>192.168.1.1</code>).</p>
       
           <p>The server can be made to respond to internal and external requests
      -    with the same content, with just one <code>VirtualHost</code>
      -    section.</p>
      -
      -    <example>
      -    <title>Server configuration</title>
      -
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/server1<br />
      -        ServerName server.example.com<br />
      -        ServerAlias server<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    with the same content, with just one <directive type="section" module="core"
      +    >VirtualHost</directive> section.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/www/server1"
      +    ServerName server.example.com
      +    ServerAlias server
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Now requests from both networks will be served from the same
      -    <code>VirtualHost</code>.</p>
      +    <directive type="section" module="core">VirtualHost</directive>.</p>
       
           <note>
                 <title>Note:</title><p>On the internal
      @@ -216,40 +192,30 @@
           takes place after the best matching IP address and port combination
           is determined.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 80<br />
      -    Listen 8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-8080"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
      @@ -260,25 +226,19 @@
           <code>www.example.com</code> and <code>www.example.org</code>
           respectively.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 80<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Requests for any address not specified in one of the
           <code>&lt;VirtualHost&gt;</code> directives (such as
      @@ -296,42 +256,32 @@
           respectively. In each case, we want to run hosts on ports 80 and
           8080.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1-80<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1-8080<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2-80<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2-8080<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/www/example1-80"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/www/example1-8080"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/www/example2-80"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/www/example2-8080"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
      @@ -341,46 +291,34 @@
           <p>Any address mentioned in the argument to a virtualhost that never
           appears in another virtual host is a strictly IP-based virtual host.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 80<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    # IP-based<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example4<br />
      -        ServerName www.example.edu<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example5<br />
      -        ServerName www.example.gov<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP-based
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example4"
      +    ServerName www.example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/www/example5"
      +    ServerName www.example.gov
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
      @@ -391,18 +329,19 @@
           virtual host through to a server running on another machine. In the
           example, a virtual host of the same name is configured on a machine
           at <code>192.168.111.2</code>. The <directive
      -    module="mod_proxy">ProxyPreserveHost On</directive> directive is
      -    used so that the desired hostname is passed through, in case we are
      -    proxying multiple hostnames to a single machine.</p>
      -
      -    <example>
      -    &lt;VirtualHost *:*&gt;<br />
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2/<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName hostname.example.com<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    module="mod_proxy" name="ProxyPreserveHost">ProxyPreserveHost
      +    On</directive> directive is used so that the desired hostname is
      +    passed through, in case we are proxying multiple hostnames to a
      +    single machine.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName hostname.example.com
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           </section>
       
      @@ -416,15 +355,11 @@
           port, <em>i.e.</em>, an address/port combination that is not used for
           any other virtual host.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Using such a default vhost with a wildcard port effectively prevents
           any request going to the main server.</p>
      @@ -446,23 +381,17 @@
           <p>Same as setup 1, but the server listens on several ports and we want
           to use a second <code>_default_</code> vhost for port 80.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default80<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>The default vhost for port 80 (which <em>must</em> appear before any
           default vhost with a wildcard port) catches all requests that were sent
      @@ -476,14 +405,12 @@
           <p>We want to have a default vhost for port 80, but no other default
           vhosts.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /www/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default"
      +...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>A request to an unspecified address on port 80 is served from the
           default vhost. Any other request to an unspecified address and port is
      @@ -511,30 +438,24 @@
           (<code>172.20.30.50</code>) to the <code>VirtualHost</code>
           directive.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    Listen 80<br />
      -    ServerName www.example.com<br />
      -    DocumentRoot /www/example1<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -        ServerAlias *.example.net<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +ServerName www.example.com
      +DocumentRoot "/www/example1"
      +
      +&lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>The vhost can now be accessed through the new address (as an
           IP-based vhost) and through the old address (as a name-based
      @@ -554,41 +475,33 @@
           containing links with an URL prefix to the name-based virtual
           hosts.</p>
       
      -    <example>
      -    <title>Server configuration</title>
      -
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        # primary vhost<br />
      -        DocumentRoot /www/subdomain<br />
      -        RewriteEngine On<br />
      -        RewriteRule . /www/subdomain/index.html<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /www/subdomain/sub1<br />
      -    <indent>
      -        ServerName www.sub1.domain.tld<br />
      -        ServerPath /sub1/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/subdomain/sub2<br />
      -        ServerName www.sub2.domain.tld<br />
      -        ServerPath /sub2/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost 172.20.30.40&gt;
      +    # primary vhost
      +    DocumentRoot "/www/subdomain"
      +    RewriteEngine On
      +    RewriteRule "." "/www/subdomain/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub1"
      +    ServerName www.sub1.domain.tld
      +    ServerPath "/sub1/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub1/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub2"
      +    ServerName www.sub2.domain.tld
      +    ServerPath "/sub2/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Due to the <directive module="core">ServerPath</directive>
           directive a request to the URL
      diff --git a/docs/manual/vhosts/examples.xml.fr b/docs/manual/vhosts/examples.xml.fr
      index 487101e0a36..ee31d5bf019 100644
      --- a/docs/manual/vhosts/examples.xml.fr
      +++ b/docs/manual/vhosts/examples.xml.fr
      @@ -1,9 +1,9 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision: 1132802 -->
      -<!-- French translation by Vincent Deffontaines, Alain B., review by  -->
      -<!-- updated by Lucien Gentis -->
      +<!-- English Revision: 1746871 -->
      +<!-- French translation by Vincent Deffontaines, Alain B.  -->
      +<!-- reviewed by Lucien Gentis -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      @@ -28,10 +28,10 @@
       
       <summary>
       
      -    <p>Le but de ce document est d'essayer de rpondre aux questions 
      -    les plus rpandues sur la configuration des <a href="index.html">serveurs virtuels</a>. 
      -    Les scnarios prsents ici se rencontrent quand plusieurs 
      -    serveurs Webs doivent tourner sur une seule et mme machine au 
      +    <p>Le but de ce document est d'essayer de répondre aux questions 
      +    les plus répandues sur la configuration des <a href="index.html">serveurs virtuels</a>. 
      +    Les scénarios présentés ici se rencontrent quand plusieurs 
      +    serveurs Webs doivent tourner sur une seule et même machine au 
           moyen de serveurs virtuels <a href="name-based.html">par nom</a> 
           ou <a href="ip-based.html">par IP</a>.</p>
       
      @@ -40,380 +40,320 @@
         <section id="purename"><title>Fonctionnement de plusieurs serveurs 
         virtuels par nom sur une seule adresse IP.</title>
       
      -    <p>Votre serveur ne dispose que d'une seule adresse IP, et de 
      -    nombreux alias (CNAMES) pointent vers cette adresse dans le DNS. 
      -    Pour l'exemple, <code>www.example.com</code> et 
      -    <code>www.example.org</code> doivent tourner sur cette machine.</p>
      +    <p>Votre serveur possède plusieurs noms d'hôte qui correspondent à une seule
      +    adresse IP, et vous souhaitez des réponses différentes si on demande
      +    <code>www.example.com</code> ou <code>www.example.org</code>.</p>
       
           <note><title>Note&nbsp;:</title><p>La configuration de serveurs virtuels 
           sous Apache ne provoque pas leur apparition magique dans la 
           configuration du DNS. Il <em>faut</em> que leurs noms soient 
      -    dfinis dans le DNS, et qu'ils y soient rsolus sur l'adresse IP 
      +    définis dans le DNS, et qu'ils y soient résolus sur l'adresse IP 
           du serveur, faute de quoi personne ne pourra visiter votre site Web. 
      -    Il est possible d'ajouter des entres dans le fichier 
      +    Il est possible d'ajouter des entrées dans le fichier 
           <code>hosts</code> pour tests locaux, mais qui ne fonctionneront 
      -    que sur la machine possdant ces entres.</p>
      +    que sur la machine possédant ces entrées.</p>
           </note>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    # Apache doit couter sur le port 80<br />
      -    Listen 80<br />
      -    <br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /www/example.com<br />
      -      ServerName www.example1.com<br />
      -      <br />
      -      # Autres directives ici<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /www/example.org<br />
      -      ServerName www.example2.org<br />
      -      <br />
      -      # Autres directives ici<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Les astrisques correspondent  toutes les adresses, si bien que 
      -    le serveur principal ne rpondra jamais  aucune requte. Comme le
      +    <highlight language="config">
      +# Apache doit écouter sur le port 80
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +  
      +    # Autres directives ici
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +
      +    # Autres directives ici
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +   
      +
      +    <p>Les astérisques correspondent à toutes les adresses, si bien que 
      +    le serveur principal ne répondra jamais à aucune requête. Comme le
           serveur virtuel
           <code>ServerName www.example.com</code> se trouve en premier dans le fichier 
      -    de configuration, il a la plus grande priorit et peut tre vu 
      -    comme serveur <cite>par dfaut</cite> ou <cite>primaire</cite>&nbsp;; 
      -    ce qui signifie que toute requte reue ne correspondant  aucune 
      -    des directives <code>ServerName</code> sera servie par ce premier 
      -    <code>VirtualHost</code>.</p>
      +    de configuration, il a la plus grande priorité et peut être vu 
      +    comme serveur <cite>par défaut</cite> ou <cite>primaire</cite>&nbsp;; 
      +    ce qui signifie que toute requête reçue ne correspondant à aucune 
      +    des directives <directive module="core">ServerName</directive> sera servie par ce premier 
      +    <directive type="section" module="core">VirtualHost</directive>.</p>
      +
      +    <p>La configuration ci-dessus correspond à ce que l'on souhaite pour
      +    la plupart des serveurs virtuels à base de nom. Il faudra cependant
      +    utiliser une configuration différente si vous souhaitez servir un
      +    contenu différent en fonction de l'adresse IP ou du port.</p>
       
           <note>
                   <title>Note&nbsp;:</title>
       
                   <p>Vous pouvez remplacer <code>*</code> 
      -            par l'adresse IP du systme si vous ne souhaitez pas faire
      -	    oprer la slection du serveur virtuel en fonction de la
      -	    paire adresse IP/port.</p>
      -
      -           <p>En gnral, il est commode d'utiliser <code>*</code> sur 
      -           les systmes dont l'adresse IP n'est pas constante - par 
      -           exemple, pour des serveurs dont l'adresse IP est attribue 
      -           dynamiquement par le FAI, et o le DNS est gr au moyen 
      +            par une adresse IP du système. Le serveur virtuel concerné
      +	    ne sera alors sélectionné que pour les requêtes HTTP vers
      +	    cette adresse IP.</p>
      +
      +           <p>En général, il est commode d'utiliser <code>*</code> sur 
      +           les systèmes dont l'adresse IP n'est pas constante - par 
      +           exemple, pour des serveurs dont l'adresse IP est attribuée 
      +           dynamiquement par le FAI, et où le DNS est géré au moyen 
                  d'un DNS dynamique quelconque. Comme <code>*</code> signifie 
                  <cite>n'importe quelle adresse</cite>, cette configuration 
      -           fonctionne sans devoir tre modifie quand l'adresse IP du 
      -           systme est modifie.</p>
      +           fonctionne sans devoir être modifiée quand l'adresse IP du 
      +           système est modifiée.</p>
           </note>
       
      -    <p>La configuration ci-dessus est en pratique utilise dans la 
      -    plupart des cas pour les serveurs virtuels par nom. En fait, le 
      -    seul cas o cette configuration ne fonctionne pas est lorsque 
      -    diffrents contenus doivent tre servis en fonction de l'adresse IP 
      -    et du port contacts par le client.</p>
      -
           </section>
       
           <section id="twoips"><title>Serveurs virtuels par nom sur plus 
           d'une seule adresse IP.</title>
       
         	<note>
      -          <title>Note&nbsp;:</title><p>Toutes les techniques prsentes ici 
      -          peuvent tre tendues  un plus grand nombre d'adresses IP.</p>
      +          <title>Note&nbsp;:</title><p>Toutes les techniques présentées ici 
      +          peuvent être étendues à un plus grand nombre d'adresses IP.</p>
           </note>
       
           <p>Le serveur a deux adresses IP. Sur l'une 
           (<code>172.20.30.40</code>), le serveur "principal" 
      -    <code>server.example.com</code> doit rpondre, et sur l'autre 
      +    <code>server.example.com</code> doit répondre, et sur l'autre 
           (<code>172.20.30.50</code>), deux serveurs virtuels (ou plus) 
      -    rpondront.</p>
      -
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 80<br />
      -        <br />
      -    # Serveur "principal" sur 172.20.30.40<br />
      -    ServerName server.example.com<br />
      -    DocumentRoot /www/mainserver<br />
      -        <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.com<br />
      -        ServerName www.example.com<br />
      -   	        <br />
      -        # D'autres directives ici ...<br />
      -                   <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -        <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example.org<br />
      -                <br />
      -        # D'autres directives ici ...<br />
      -                <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Toute requte arrivant sur une autre adresse que 
      +    répondront.</p>
      +
      +    <highlight language="config">
      +Listen 80
      +
      +# Serveur "principal" sur 172.20.30.40
      +ServerName server.example.com
      +DocumentRoot "/www/mainserver"
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +    
      +    # D'autres directives ici ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +    
      +    # D'autres directives ici ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Toute requête arrivant sur une autre adresse que 
           <code>172.20.30.50</code> sera servie par le serveur principal. 
      -    Les requtes vers <code>172.20.30.50</code> avec un nom de serveur 
      -    inconnu, ou sans en-tte <code>Host:</code>, seront servies par 
      +    Les requêtes vers <code>172.20.30.50</code> avec un nom de serveur 
      +    inconnu, ou sans en-tête <code>Host:</code>, seront servies par 
           <code>www.example.com</code>.</p>
       
           </section>
       
      -    <section id="intraextra"><title>Servir le mme contenu sur des 
      -    adresses IP diffrentes (telle qu'une adresse interne et une 
      +    <section id="intraextra"><title>Servir le même contenu sur des 
      +    adresses IP différentes (telle qu'une adresse interne et une 
           externe).</title>
       
           <p>La machine serveur dispose de deux adresses IP 
           (<code>192.168.1.1</code> et <code>172.20.30.40</code>). Cette 
      -    machine est place  la fois sur le rseau interne (l'Intranet) 
      -    et le rseau externe (Internet). Sur Internet, le nom 
      +    machine est placée à la fois sur le réseau interne (l'Intranet) 
      +    et le réseau externe (Internet). Sur Internet, le nom 
           <code>server.example.com</code> pointe vers l'adresse externe 
      -    (<code>172.20.30.40</code>), mais sur le rseau interne, ce mme 
      +    (<code>172.20.30.40</code>), mais sur le réseau interne, ce même 
           nom pointe vers l'adresse interne (<code>192.168.1.1</code>).</p>
       
      -    <p>Le serveur peut tre configur pour rpondre de la mme manire 
      -    aux requtes internes et externes, au moyen d'une seule section 
      -    <code>VirtualHost</code>.</p>
      +    <p>Le serveur peut être configuré pour répondre de la même manière 
      +    aux requêtes internes et externes, au moyen d'une seule section 
      +    <directive type="section" module="core">VirtualHost</directive>.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      +    <highlight language="config">
      +&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/www/server1"
      +    ServerName server.example.com
      +    ServerAlias server
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/server1<br />
      -        ServerName server.example.com<br />
      -        ServerAlias server<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Ainsi, les requtes en provenance de chacun des deux rseaux 
      -    seront servies par le mme <code>VirtualHost</code>.</p>
      +    <p>Ainsi, les requêtes en provenance de chacun des deux réseaux 
      +    seront servies par le même <directive type="section"
      +    module="core">VirtualHost</directive>.</p>
       
           <note>
      -          <title>Note&nbsp;:</title><p>Sur le rseau interne, il est possible 
      +          <title>Note&nbsp;:</title><p>Sur le réseau interne, il est possible 
                 d'utiliser le nom raccourci <code>server</code> au lieu du nom 
                 complet <code>server.example.com</code>.</p>
       
      -          <p>Notez galement que dans l'exemple prcdent, vous pouvez 
      +          <p>Notez également que dans l'exemple précédent, vous pouvez 
                 remplacer la liste des adresses IP par des <code>*</code> afin 
      -          que le serveur rponde de la mme manire sur toutes ses 
      +          que le serveur réponde de la même manière sur toutes ses 
                 adresses.</p>
           </note>
       
           </section>
       
      -    <section id="port"><title>Servir diffrents sites sur diffrents 
      +    <section id="port"><title>Servir différents sites sur différents 
           ports.</title>
       
      -    <p>Vous disposez de plusieurs domaines pointant sur la mme adresse 
      -    IP et vous voulez galement servir de multiples ports. L'exemple
      -    suivant montre que la slection en fonction du nom intervient aprs
      -    la slection de la meilleure correspondance du point de vue adresse
      +    <p>Vous disposez de plusieurs domaines pointant sur la même adresse 
      +    IP et vous voulez également servir de multiples ports. L'exemple
      +    suivant montre que la sélection en fonction du nom intervient après
      +    la sélection de la meilleure correspondance du point de vue adresse
           IP/port.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 80<br />
      -    Listen 8080<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName www.example.com<br />
      -        DocumentRoot /www/domain-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName www.example.org<br />
      -        DocumentRoot /www/otherdomain-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.com
      +    DocumentRoot "/www/domain-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName www.example.org
      +    DocumentRoot "/www/otherdomain-8080"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
       	</section>
       
      -    <section id="ip"><title>Hbergement virtuel bas sur IP</title>
      +    <section id="ip"><title>Hébergement virtuel basé sur IP</title>
       
           <p>Le serveur dispose de deux adresses IP (<code>172.20.30.40</code> 
           et <code>172.20.30.50</code>) correspondant respectivement aux noms 
           <code>www.example.com</code> et <code>www.example.org</code>.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 80<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.com<br />
      -        ServerName www.example1.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example2.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Les requtes provenant d'adresses non spcifies dans l'une des 
      +    <highlight language="config">
      +Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Les requêtes provenant d'adresses non spécifiées dans l'une des 
           directives <code>&lt;VirtualHost&gt;</code> (comme pour 
      -    <code>localhost</code> par exemple) seront diriges vers le serveur 
      +    <code>localhost</code> par exemple) seront dirigées vers le serveur 
           principal, s'il en existe un.</p>
       
       	</section>
       
      -    <section id="ipport"><title>Hbergements virtuels mixtes bass sur 
      +    <section id="ipport"><title>Hébergements virtuels mixtes basés sur 
           les ports et sur les IP</title>
       
           <p>Le serveur dispose de deux adresses IP (<code>172.20.30.40</code> 
           et <code>172.20.30.50</code>) correspondant respectivement aux noms 
           <code>www.example.com</code> et <code>www.example.org</code>. 
      -    Pour chacun d'eux, nous voulons un hbergement sur les ports 80 
      +    Pour chacun d'eux, nous voulons un hébergement sur les ports 80 
           et 8080.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.com-80<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.com-8080<br />
      -        ServerName www.example.com<br />
      -		</indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.org-80<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.org-8080<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/www/example1-80"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/www/example1-8080"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/www/example2-80"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/www/example2-8080"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
       	</section>
       
      -    <section id="mixed"><title>Hbergements virtuels mixtes bas sur 
      +    <section id="mixed"><title>Hébergements virtuels mixtes basé sur 
           les noms et sur IP</title>
       
      -    <p>Toute adresse indique comme argument d'une section VirtualHost
      +    <p>Toute adresse indiquée comme argument d'une section VirtualHost
           et n'apparaissant dans aucun autre serveur virtuel, fait de cette
      -    section un serveur virtuel slectionnable uniquement en fonction de
      +    section un serveur virtuel sélectionnable uniquement en fonction de
           son adresse IP.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 80<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example1<br />
      -        ServerName www.example.com<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example2<br />
      -        ServerName www.example.org<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example3<br />
      -        ServerName www.example.net<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    # "par-IP"<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example4<br />
      -        ServerName www.example.edu<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example5<br />
      -        ServerName www.example.gov<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example1"
      +    ServerName www.example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP-based
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/www/example4"
      +    ServerName www.example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/www/example5"
      +    ServerName www.example.gov
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
       	</section>
       
      -    <section id="proxy"><title>Utilisation simultane de 
      +    <section id="proxy"><title>Utilisation simultanée de 
           <code>Virtual_host</code> et de mod_proxy</title>
       
           <p>L'exemple suivant montre comment une machine peut mandater 
           un serveur virtuel fonctionnant sur le serveur d'une autre machine. 
      -    Dans cet exemple, un serveur virtuel de mme nom est configur sur 
      -    une machine  l'adresse <code>192.168.111.2</code>. La directive 
      -    <directive module="mod_proxy">ProxyPreserveHost On</directive> est 
      -    employe pour permette au nom de domaine d'tre prserv lors du 
      -    transfert, au cas o plusieurs noms de domaines cohabitent sur 
      -    une mme machine.</p>
      -
      -    <example>
      -    &lt;VirtualHost *:*&gt;<br />
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName hostname.example.com<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    Dans cet exemple, un serveur virtuel de même nom est configuré sur 
      +    une machine à l'adresse <code>192.168.111.2</code>. La directive 
      +    <directive module="mod_proxy"
      +    name="ProxyPreserveHost">ProxyPreserveHost On</directive> est
      +    employée pour permette au nom de domaine d'être préservé lors du 
      +    transfert, au cas où plusieurs noms de domaines cohabitent sur 
      +    une même machine.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName hostname.example.com
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           </section>
       
      @@ -423,93 +363,81 @@
           <section id="defaultallports"><title>Serveurs virtuels 
           <code>_default_</code> pour tous les ports</title>
       
      -    <p>Exemple de capture de <em>toutes</em> les requtes manant 
      -    d'adresses IP ou de ports non connus, <em>c'est--dire</em>, d'un 
      -    couple adresse/port non trait par aucun autre serveur virtuel.</p>
      -
      -    <example>
      -    <title>Configuration du serveur</title>
      +    <p>Exemple de capture de <em>toutes</em> les requêtes émanant 
      +    d'adresses IP ou de ports non connus, <em>c'est-à-dire</em>, d'un 
      +    couple adresse/port non traité par aucun autre serveur virtuel.</p>
       
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>L'utilisation d'un tel serveur virtuel avec un joker pour le 
      -    port empche de manire efficace qu'une requte n'atteigne le 
      +    port empêche de manière efficace qu'une requête n'atteigne le 
           serveur principal.</p>
       
      -    <p>Un serveur virtuel par dfaut ne servira jamais une requte 
      -    qui est envoye vers un couple adresse/port utilise par un 
      -    serveur virtuel par nom. Si la requte contient un en-tte 
      +    <p>Un serveur virtuel par défaut ne servira jamais une requête 
      +    qui est envoyée vers un couple adresse/port utilisée par un 
      +    serveur virtuel par nom. Si la requête contient un en-tête 
           <code>Host:</code> inconnu, ou si celui-ci est absent, elle 
           sera toujours servie par le serveur virtuel primaire par nom 
      -    (celui correspondant  ce couple adresse/port trouv en premier 
      +    (celui correspondant à ce couple adresse/port trouvé en premier 
           dans le fichier de configuration).</p>
       
           <p>Vous pouvez utiliser une directive 
           <directive module="mod_alias">AliasMatch</directive> ou 
           <directive module="mod_rewrite">RewriteRule</directive> afin de 
      -    rcrire une requte pour une unique page d'information (ou pour 
      +    réécrire une requête pour une unique page d'information (ou pour 
           un script).</p>
           </section>
       
           <section id="defaultdifferentports"><title>Serveurs virtuels 
      -    <code>_default_</code> pour des ports diffrents</title>
      -
      -    <p>La configuration est similaire  l'exemple prcdent, mais 
      -    le serveur coute sur plusieurs ports et un second serveur virtuel 
      -    <code>_default_</code> pour le port 80 est ajout.</p>
      -
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default80<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /www/default<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Le serveur virtuel par dfaut dfini pour le port 80 (il doit 
      -    imprativement tre plac avant un autre serveur virtuel par 
      -    dfaut traitant tous les ports grce au joker *) capture toutes 
      -    les requtes envoyes sur une adresse IP non spcifie. Le 
      -    serveur principal n'est jamais utilis pour servir une requte.</p>
      +    <code>_default_</code> pour des ports différents</title>
      +
      +    <p>La configuration est similaire à l'exemple précédent, mais 
      +    le serveur écoute sur plusieurs ports et un second serveur virtuel 
      +    <code>_default_</code> pour le port 80 est ajouté.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/www/default"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Le serveur virtuel par défaut défini pour le port 80 (il doit 
      +    impérativement être placé avant un autre serveur virtuel par 
      +    défaut traitant tous les ports grâce au joker *) capture toutes 
      +    les requêtes envoyées sur une adresse IP non spécifiée. Le 
      +    serveur principal n'est jamais utilisé pour servir une requête.</p>
           </section>
       
           <section id="defaultoneport"><title>Serveurs virtuels 
           <code>_default_</code> pour un seul port</title>
       
      -    <p>Nous voulons crer un serveur virtuel par dfaut seulement 
      +    <p>Nous voulons créer un serveur virtuel par défaut seulement 
           pour le port 80.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /www/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/www/default"
      +...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
      -    <p>Une requte vers une adresse non spcifie sur le port 80 
      -    sera servie par le serveur virtuel par dfaut, et toute autre 
      -    requte vers une adresse et un port non spcifis sera servie 
      +    <p>Une requête vers une adresse non spécifiée sur le port 80 
      +    sera servie par le serveur virtuel par défaut, et toute autre 
      +    requête vers une adresse et un port non spécifiés sera servie 
           par le serveur principal.</p>
       
      -    <p>L'utilisation du caractre gnrique <code>*</code> dans la
      -    dclaration d'un serveur virtuel l'emporte sur
      +    <p>L'utilisation du caractère générique <code>*</code> dans la
      +    déclaration d'un serveur virtuel l'emporte sur
           <code>_default_</code>.</p>
           </section>
       
      @@ -521,39 +449,33 @@
           <p>Le serveur virtuel par nom avec le nom de domaine 
           <code>www.example.org</code> (de notre <a href="#name">exemple 
           par nom</a>) devrait obtenir sa propre adresse IP. Pendant la 
      -    phase de migration, il est possible d'viter les problmes avec 
      -    les noms de serveurs et autres serveurs mandataires qui mmorisent 
      +    phase de migration, il est possible d'éviter les problèmes avec 
      +    les noms de serveurs et autres serveurs mandataires qui mémorisent 
           les vielles adresses IP pour les serveurs virtuels par nom.<br />
           La solution est simple, car il suffit d'ajouter la nouvelle 
           adresse IP (<code>172.20.30.50</code>) dans la directive 
           <code>VirtualHost</code>.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    Listen 80<br />
      -    ServerName www.example.com<br />
      -    DocumentRoot /www/example.com<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.org<br />
      -        ServerName www.example.org<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/example.net<br />
      -        ServerName www.example.net<br />
      -        ServerAlias *.example.net<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Le serveur virtuel peut maintenant tre joint par la nouvelle 
      +    <highlight language="config">
      +Listen 80
      +ServerName www.example.com
      +DocumentRoot "/www/example1"
      +
      +&lt;VirtualHost 172.20.30.40 172.20.30.50&gt;
      +    DocumentRoot "/www/example2"
      +    ServerName www.example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/example3"
      +    ServerName www.example.net
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Le serveur virtuel peut maintenant être joint par la nouvelle 
           adresse (comme un serveur virtuel par IP) et par l'ancienne 
           adresse (comme un serveur virtuel par nom).</p>
       
      @@ -562,69 +484,61 @@
           <section id="serverpath"><title>Utilisation de la directive 
           <code>ServerPath</code></title>
       
      -    <p>Dans le cas o vous disposez de deux serveurs virtuels par nom, 
      -    le client doit transmettre un en-tte <code>Host:</code> correct 
      -    pour dterminer le serveur concern. Les vieux clients HTTP/1.0 
      -    n'envoient pas un tel en-tte et Apache n'a aucun indice pour 
      -    connatre le serveur virtuel devant tre joint (il sert la 
      -    requte  partir d'un serveur virtuel primaire). Dans un soucis 
      -    de prserver la compatibilit descendante, il suffit de crer 
      -    un serveur virtuel primaire charg de retourner une page contenant 
      -    des liens dont les URLs auront un prfixe identifiant les serveurs 
      +    <p>Dans le cas où vous disposez de deux serveurs virtuels par nom, 
      +    le client doit transmettre un en-tête <code>Host:</code> correct 
      +    pour déterminer le serveur concerné. Les vieux clients HTTP/1.0 
      +    n'envoient pas un tel en-tête et Apache n'a aucun indice pour 
      +    connaître le serveur virtuel devant être joint (il sert la 
      +    requête à partir d'un serveur virtuel primaire). Dans un soucis 
      +    de préserver la compatibilité descendante, il suffit de créer 
      +    un serveur virtuel primaire chargé de retourner une page contenant 
      +    des liens dont les URLs auront un préfixe identifiant les serveurs 
           virtuels par nom.</p>
       
      -    <example>
      -    <title>Configuration du serveur</title>
      -
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        # Serveur virtuel primaire<br />
      -        DocumentRoot /www/subdomain<br />
      -        RewriteEngine On<br />
      -        RewriteRule . /www/subdomain/index.html<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /www/subdomain/sub1<br />
      -    <indent>
      -        ServerName www.sub1.domain.tld<br />
      -        ServerPath /sub1/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -		<br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /www/subdomain/sub2<br />
      -        ServerName www.sub2.domain.tld<br />
      -        ServerPath /sub2/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p> cause de la directive 
      -    <directive module="core">ServerPath</directive>, une requte sur 
      +    <highlight language="config">
      +&lt;VirtualHost 172.20.30.40&gt;
      +    # serveur virtuel primaire
      +    DocumentRoot "/www/subdomain"
      +    RewriteEngine On
      +    RewriteRule "." "/www/subdomain/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub1"
      +    ServerName www.sub1.domain.tld
      +    ServerPath "/sub1/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub1/.*)" "/www/subdomain$1
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/www/subdomain/sub2"
      +    ServerName www.sub2.domain.tld
      +    ServerPath "/sub2/"
      +    RewriteEngine On
      +    RewriteRule "^(/sub2/.*)" "/www/subdomain$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>À cause de la directive 
      +    <directive module="core">ServerPath</directive>, une requête sur 
           une URL <code>http://www.sub1.domain.tld/sub1/</code> est 
           <em>toujours</em> servie par le serveur sub1-vhost.<br />
      -    Une requte sur une URL <code>http://www.sub1.domain.tld/</code> n'est 
      -    servie par le serveur sub1-vhost que si le client envoie un en-tte 
      -    <code>Host:</code> correct. Si aucun en-tte <code>Host:</code> 
      -    n'est transmis, le serveur primaire sera utilis.</p>
      -    <p>Notez qu'il y a une singularit&nbsp;: une requte sur 
      -    <code>http://www.sub2.domain.tld/sub1/</code> est galement servie 
      -    par le serveur sub1-vhost si le client n'envoie pas d'en-tte 
      +    Une requête sur une URL <code>http://www.sub1.domain.tld/</code> n'est 
      +    servie par le serveur sub1-vhost que si le client envoie un en-tête 
      +    <code>Host:</code> correct. Si aucun en-tête <code>Host:</code> 
      +    n'est transmis, le serveur primaire sera utilisé.</p>
      +    <p>Notez qu'il y a une singularité&nbsp;: une requête sur 
      +    <code>http://www.sub2.domain.tld/sub1/</code> est également servie 
      +    par le serveur sub1-vhost si le client n'envoie pas d'en-tête 
           <code>Host:</code>.</p>
           <p>Les directives <directive module="mod_rewrite">RewriteRule</directive> 
      -    sont employes pour s'assurer que le client qui envoie un en-tte 
      +    sont employées pour s'assurer que le client qui envoie un en-tête 
           <code>Host:</code> correct puisse utiliser d'autres variantes d'URLs, 
      -    <em>c'est--dire</em> avec ou sans prfixe d'URL.</p>
      +    <em>c'est-à-dire</em> avec ou sans préfixe d'URL.</p>
       
       	</section>
       
      diff --git a/docs/manual/vhosts/examples.xml.ja b/docs/manual/vhosts/examples.xml.ja
      index 0da43c657e1..56b6c108552 100644
      --- a/docs/manual/vhosts/examples.xml.ja
      +++ b/docs/manual/vhosts/examples.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
      -<!-- English Revision: 659902:1132802 (outdated) -->
      +<!-- English Revision: 659902:1746871 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/examples.xml.ko b/docs/manual/vhosts/examples.xml.ko
      index 5cf77df66d3..8d79a149d62 100644
      --- a/docs/manual/vhosts/examples.xml.ko
      +++ b/docs/manual/vhosts/examples.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 105989:1132802 (outdated) -->
      +<!-- English Revision: 105989:1746871 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/examples.xml.meta b/docs/manual/vhosts/examples.xml.meta
      index c15857860f3..4bd55405bf1 100644
      --- a/docs/manual/vhosts/examples.xml.meta
      +++ b/docs/manual/vhosts/examples.xml.meta
      @@ -11,6 +11,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/examples.xml.tr b/docs/manual/vhosts/examples.xml.tr
      index 82c1a5266d9..f7a819ec159 100644
      --- a/docs/manual/vhosts/examples.xml.tr
      +++ b/docs/manual/vhosts/examples.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 659902:1132802 (outdated) -->
      +<!-- English Revision: 1746871 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by:  Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by:  Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -30,11 +30,11 @@
       
       <summary>
       
      -    <p>Bu belgede sanal konaklarla ile ilgili olarak karşılaşılması olası tüm
      -      senaryolara yer verilmeye çalışılmıştır. Buradaki senaryolar, tek bir
      -      sunucu üzerinde  <a href="name-based.html">isme dayalı</a> veya <a
      -      href="ip-based.html">IP’ye dayalı</a> sanal konaklar aracılığıyla çok
      -      sayıda sitenin sunumu ile ilgilidir.
      +    <p>Bu belgede <a href="index.html">sanal konaklarla</a> ile ilgili olarak
      +      karşılaşılması olası tüm  senaryolara yer verilmeye çalışılmıştır.
      +      Buradaki senaryolar, tek bir  sunucu üzerinde  <a href="name-
      +      based.html">isme dayalı</a> veya <a href="ip-based.html">IP’ye dayalı</a>
      +      sanal konaklar aracılığıyla çok sayıda sitenin sunumu ile ilgilidir.
           </p>
       
       </summary>
      @@ -42,11 +42,11 @@
         <section id="purename">
           <title>Tek bir IP ile çok sayıda isme dayalı site</title>
       
      -    <p>Bu örnekte, makinenizin tek bir IP adresine sahip olduğunu ve bu
      -      makineye <code>mesela.dom</code> ve <code>faraza.dom</code> şeklinde
      -      (DNS A kayıtları sayesinde) farklı isimlerle erişilebildiğini
      -      varsayalım.</p>
      -
      +    <p>Bu örnekte, makinenizin tek bir IP adresine çözümlenen çok sayıda konak 
      +      adına sahip olduğunu, <code>example.com</code> ve 
      +      <code>example.org</code> gibi farklı isimlere farklı yanıtlar vermek 
      +      istediğinizi varsayalım.</p>
      +    
           <note><title>Bilginize</title><p>Apache sunucusu üzerinde sanal konakları
             yapılandırmakla bu konak isimleri için sihirli bir şekilde DNS
             kayıtlarının da oluşturulmasını sağlamış olmazsınız. Bu isimler için
      @@ -59,55 +59,52 @@
             gelecek ziyaretçileriniz için DNS kayıtlarınızın olması şarttır.</p>
           </note>
       
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    # Apache’nin 80. portu dinlediğinden emin olalım<br />
      -    Listen 80<br />
      -    <br />
      -    # Sanal konak istekleri için bütün IP adresleri dinlensin.<br />
      -    NameVirtualHost *:80<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /siteler/mesela<br />
      -      ServerName mesela.dom<br />
      -      <br />
      -      # Diğer yönergeler, burada ...<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost *:80&gt;<br />
      -    <indent>
      -      DocumentRoot /siteler/faraza<br />
      -      ServerName faraza.dom<br />
      -      <br />
      -      # Diğer yönergeler, burada ...<br />
      -      <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +# Apache’nin 80. portu dinlediğinden emin olalım
      +Listen 80
      +&lt;VirtualHost *:80&gt;
      +  DocumentRoot "/siteler/ecom"
      +  ServerName example.com
      +
      +  # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +  DocumentRoot "/siteler/eorg"
      +  ServerName example.org
      +
      +  # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Yıldız imleri tüm adreslerle eşleşmeyi sağladığından ana sunucu
             (yapılandırma dosyası genelindeki yapılandırma - sunucu geneli)
      -      erişilebilir olmayacaktır. <code>mesela.dom</code> yapılandırma
      -      dosyasındaki ilk sanal konak olduğundan en yüksek önceliğe sahiptir ve
      +      erişilebilir olmayacaktır. Yapılandırma
      +      dosyasındaki <code>ServerName example.com</code> yönergeli konak, ilk
      +      sanal konak olduğundan en yüksek önceliğe sahiptir ve
             <cite>öntanımlı</cite> veya <cite>baskın</cite> site olarak davranır.
      -      Yani, hiçbir <code>ServerName</code> yönergesi ile eşleşmeyen bir istek
      -      alındığında bu istek ilk <code>VirtualHost</code> yapılandırması ile
      +      Yani, hiçbir <directive module="core">ServerName</directive> yönergesi 
      +      ile eşleşmeyen bir istek alındığında bu istek ilk <directive 
      +      type="section" module="core">VirtualHost</directive> yapılandırması ile
             karşılanır.</p>
      +    
      +    <p>Yukarıdaki yapılandırmayı hemen hemen tüm isme dayalı sanal konaklar
      +      için kullanabilirsiniz. Bu yapılandırmanın çalışmayacağı tek durum,
      +      farklı içerikleri farklı IP adres veya portlardan sunma gereğiyle
      +      karşılaşmaktır.</p>
       
           <note><title>Bilginize</title>
      -      <p>İsterseniz, <code>*</code> yerine kendi IP adresinizi yazabilirsiniz.
      -        Ancak bu durumda bunu hem <code>VirtualHost</code> hem de
      -        <code>NameVirtualHost</code> için yapmalısınız:</p>
      +      <p><code>*</code> yerine sisteminizdeki belli bir IP adresini 
      +        yazabilirsiniz. Böyle sanal konaklar sadece, HTTP isteklerinin sadece 
      +        belirtilen IP adreslerinden alınması için kullanilabilir.</p>
      +
      +      <highlight language="config">
      +NameVirtualHost 192.168.1.22
       
      -      <example>
      -      NameVirtualHost 192.168.1.22<br />
      -      <br />
      -      &lt;VirtualHost 192.168.1.22&gt;<br />
      -        # vs. ...
      -      </example>
      +&lt;VirtualHost 192.168.1.22&gt;
      +  # vs. ...
      +&lt;/VirtualHost&gt;
      +      </highlight>
       
             <p>Bununla birlikte, IP adresinin önceden kestirilebilir olmadığı
               sistemlerde, örneğin, hizmet sağlayıcınıza çevirmeli ağ ile bağlanıyor
      @@ -118,11 +115,6 @@
               kullanabilirsiniz.</p>
           </note>
       
      -    <p>Yukarıdaki yapılandırmayı hemen hemen tüm isme dayalı sanal konaklar
      -      için kullanabilirsiniz. Bu yapılandırmanın çalışmayacağı tek durum,
      -      farklı içerikleri farklı IP adreslerinden sunma gereğiyle
      -      karşılaşmaktır.</p>
      -
         </section>
       
         <section id="twoips">
      @@ -134,46 +126,36 @@
           </note>
       
           <p>Sunucunun iki IP adresi olsun. Birinden "ana sunucu"
      -      (<code>192.168.1.2</code>) diğerinden <code>mesela.dom</code>
      +      (<code>192.168.1.2</code>) diğerinden <code>example.com</code>
             <code>192.168.2.2</code> hizmet versin. Bu arada başka sanal konakları
             da sunabilelim istiyoruz.</p>
       
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    Listen 80<br />
      -    <br />
      -    # Bu, 192.168.1.2 adresindeki "ana sunucu" olsun<br />
      -    ServerName sunucu.faraza.dom<br />
      -    DocumentRoot /siteler/anasunucu<br />
      -    <br />
      -    # Burası da diğer adres için<br />
      -    NameVirtualHost 192.168.2.2<br />
      -    <br />
      -    &lt;VirtualHost 192.168.2.2&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -        <br />
      -        # Diğer yönergeler, burada ...<br />
      -        <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.2.2&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -        <br />
      -        # Diğer yönergeler, burada ...<br />
      -        <br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p><code>192.168.2.2</code> adresinden gelmeyen tüm isteklere ana sunucu
      -      (<code>sunucu.faraza.dom</code>), <code>192.168.2.2</code> adresinden
      +    <highlight language="config">
      +Listen 80
      +
      +# Bu, 192.168.1.2 adresindeki "ana sunucu" olsun
      +ServerName sunucu.example.com
      +DocumentRoot "/siteler/anasunucu"
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +
      +    # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +
      +    # Diğer yönergeler, burada ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p><code>192.168.1.20</code> adresinden gelmeyen tüm isteklere ana sunucu
      +      (<code>sunucu.example.com</code>), <code>192.168.1.20</code> adresinden
             gelen sunucu ismi belirtmeyenler ile <code>Host:</code> başlığı
      -      belirtmeyenlere ise  <code>mesela.dom</code> hizmet verecektir.</p>
      +      belirtmeyenlere ise  <code>example.com</code> hizmet verecektir.</p>
       
         </section>
       
      @@ -182,33 +164,28 @@
       
           <p>Sunucu makine iki IP adresine sahip olsun. Biri iç ağa
             (<code>192.168.1.1</code>) diğeri dış ağa (<code>172.20.30.40</code>)
      -      bakıyor olsun. <code>sunucu.mesela.dom</code> ismi dış ağda dış ağa
      +      bakıyor olsun. <code>sunucu.example.com</code> ismi dış ağda dış ağa
             bakan IP’ye, iç ağda ise iç ağa bakan IP’ye çözümleniyor olsun.</p>
       
           <p>Bu durumda, sunucu hem iç hem de dış ağdan gelen isteklere aynı içerik,
      -      dolayısıyla aynı <code>VirtualHost</code> bölümü ile hizmet
      -      verebilir.</p>
      -
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    NameVirtualHost 192.168.1.1<br />
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/sunucu<br />
      -        ServerName sunucu.mesela.dom<br />
      -        ServerAlias sunucu<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +      dolayısıyla aynı <directive type="section" module="core"
      +      >VirtualHost</directive> bölümü ile hizmet verebilir.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost 192.168.1.1 172.20.30.40&gt;
      +    DocumentRoot "/siteler/sunucu"
      +    ServerName sunucu.example.com
      +    ServerAlias sunucu
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Artık, hem iç hem de dış ağdan gelen isteklere aynı
      -      <code>VirtualHost</code> bölümünden hizmet sunulacaktır.</p>
      +      <directive type="section" module="core">VirtualHost</directive> 
      +      bölümünden hizmet sunulacaktır.</p>
       
           <note><title>Bilginize:</title>
             <p>İç ağdan istek yapan biri, tam nitelenmiş konak ismi
      -        <code>sunucu.mesela.dom</code> yerine makine ismini
      +        <code>sunucu.example.com</code> yerine makine ismini
               (<code>sunucu</code>) kullanabilir (<code>ServerAlias sunucu</code>
               satırına dikkat).</p>
       
      @@ -223,76 +200,55 @@
       
           <p>Aynı IP adresine sahip çok sayıda konak ismine sahip olduğunuzu ve
             bunların bazılarının farklı portları kullanmasını istediğinizi
      -      varsayalım. <directive module="core">NameVirtualHost</directive>
      -      yönergesi ile port tanımlamak suretiyle bunu mümkün kılabilirsiniz.
      -      <code>NameVirtualHost&nbsp;<em>isim:port</em></code> tanımı yapmadan
      -      veya bunun yerine <directive module="mpm_common">Listen</directive>
      -      kullanarak <code>VirtualHost&nbsp;<em>isim:port</em></code> kullanmaya
      -      kalkışırsanız, yapılandırmanız çalışmayacaktır.</p>
      -
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    Listen 80<br />
      -    Listen 8080<br />
      -    <br />
      -    NameVirtualHost 172.20.30.40:80<br />
      -    NameVirtualHost 172.20.30.40:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName mesela.dom<br />
      -        DocumentRoot /siteler/mesela-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName mesela.dom<br />
      -        DocumentRoot /siteler/mesela-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        ServerName faraza.dom<br />
      -        DocumentRoot /siteler/faraza-80<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        ServerName faraza.dom<br />
      -        DocumentRoot /siteler/faraza-8080<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +      varsayalım. Aşağıdaki örnekte, isim eşleşmesinin, en iyi eşleşen IP
      +      adresi ve port çifti saptandıktan sonra yer alması gösterilmiştir. </p>
      +
      +    <highlight language="config">
      +Listen 80
      +Listen 8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName example.com
      +    DocumentRoot "/siteler/ecom-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName example.com
      +    DocumentRoot "/siteler/ecom-8080"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerName example.org
      +    DocumentRoot "/siteler/eorg-80"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    ServerName example.org
      +    DocumentRoot "/siteler/eorg-8080"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
         <section id="ip"><title>IP’ye dayalı sanal konaklar</title>
       
      -    <p>Sunucu makinenin, biri <code>mesela.dom</code> adından çözümlenen
      -      <code>172.20.30.40</code>, diğeri <code>faraza.dom</code> adından
      +    <p>Sunucu makinenin, biri <code>example.com</code> adından çözümlenen
      +      <code>172.20.30.40</code>, diğeri <code>example.org</code> adından
             çözümlenen <code>172.20.30.50</code> diye iki IP adresi olsun.</p>
       
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    Listen 80<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p><code>&lt;VirtualHost&gt;</code> yönergelerinde belirtilmeyen
             adreslerle yapılan isteklere (örneğin, <code>localhost</code>) sunucu
      @@ -302,97 +258,76 @@
         <section id="ipport">
           <title>Hem IP’ye hem de porta dayalı sanal konaklar</title>
       
      -    <p>Sunucu makinenin, biri <code>mesela.dom</code> adından çözümlenen
      -      <code>172.20.30.40</code>, diğeri <code>faraza.dom</code> adından
      +    <p>Sunucu makinenin, biri <code>example.com</code> adından çözümlenen
      +      <code>172.20.30.40</code>, diğeri <code>example.org</code> adından
             çözümlenen <code>172.20.30.50</code> diye iki IP adresi olsun ve iki
             konak da hem 80 hem de 8080 portlarında çalışsınlar istiyoruz.</p>
       
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    Listen 172.20.30.40:80<br />
      -    Listen 172.20.30.40:8080<br />
      -    Listen 172.20.30.50:80<br />
      -    Listen 172.20.30.50:8080<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/mesela-80<br />
      -        ServerName mesela.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/mesela-8080<br />
      -        ServerName mesela.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/faraza-80<br />
      -        ServerName faraza.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/faraza-8080<br />
      -        ServerName faraza.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +Listen 172.20.30.40:80
      +Listen 172.20.30.40:8080
      +Listen 172.20.30.50:80
      +Listen 172.20.30.50:8080
      +
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    DocumentRoot "/siteler/ecom-80"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40:8080&gt;
      +    DocumentRoot "/siteler/ecom-8080"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    DocumentRoot "/siteler/eorg-80"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:8080&gt;
      +    DocumentRoot "/siteler/eorg-8080"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
         <section id="mixed">
           <title>Hem isme hem de IP‘ye dayalı sanal konaklar</title>
       
      -    <p>Bazı adreslerde isme dayalı, bazılarında da IP’ye dayalı sanal konaklar
      -      çalışsın istersek...</p>
      -
      -    <example><title>Sunucu yapılandırması</title>
      -
      -    Listen 80<br />
      -    <br />
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/mesela<br />
      -        ServerName mesela.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    # IP-based<br />
      -    &lt;VirtualHost 172.20.30.50&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/filanca<br />
      -        ServerName filanca.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.60&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/fesmekan<br />
      -        ServerName fesmekan.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <p>Bir <code>VirtualHost</code> yönergesinde belirtilen bir IP adresi başka
      +      bir sanal konakta görünmüyorsa bu sankon kesinlikle IP'ye dayalı bir
      +      sanal konaktır.</p>
      +
      +    <highlight language="config">
      +Listen 80
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/ecom"
      +    ServerName example.com
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/enet"
      +    ServerName example.net
      +&lt;/VirtualHost&gt;
      +
      +# IP'ye dayalı
      +&lt;VirtualHost 172.20.30.50&gt;
      +    DocumentRoot "/siteler/eedu"
      +    ServerName example.edu
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.60&gt;
      +    DocumentRoot "/siteler/egov"
      +    ServerName example.gov
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
         </section>
       
      @@ -405,19 +340,17 @@
             adresli bir makinede aynı isimde bir sanal konak yapılandırılmış olsun.
             Çok sayıda konak ismi için vekil olarak tek bir makine kullandığımızdan
             ve konak isminin de aktarılmasını arzuladığımızdan <directive
      -      module="mod_proxy">ProxyPreserveHost On</directive> yönergesini
      -      kullandık.</p>
      -
      -    <example>
      -    &lt;VirtualHost *:*&gt;<br />
      -    <indent>
      -        ProxyPreserveHost On<br />
      -        ProxyPass / http://192.168.111.2/<br />
      -        ProxyPassReverse / http://192.168.111.2/<br />
      -        ServerName konak.mesela.dom<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +      module="mod_proxy" name="ProxyPreserveHost">ProxyPreserveHost
      +      On</directive> yönergesini kullandık.</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost *:*&gt;
      +    ProxyPreserveHost On
      +    ProxyPass        "/" "http://192.168.111.2/"
      +    ProxyPassReverse "/" "http://192.168.111.2/"
      +    ServerName konak.example.com
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           </section>
       
      @@ -429,15 +362,11 @@
           <p>Bir IP adresi ve port belirtilmeyen veya hiçbir sanal konağın hiçbir
             adresi/portu ile eşleşmeyen istekleri yakalamak istersek...</p>
       
      -    <example>
      -    <title>Sunucu yapılandırması</title>
      -
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/default<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/siteler/default"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Bütün portlarla eşleşen böyle bir öntanımlı sanal konağın kullanımı
             hiçbir isteğin ana sunucuya gitmemesi sonucunu doğurur.</p>
      @@ -460,23 +389,17 @@
           <p>Önceki yapılandırmaya ek olarak 80. portta ayrı bir
             <code>_default_</code> sanal konağı kullanmak istersek...</p>
       
      -    <example>
      -    <title>Sunucu yapılandırması</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/default80<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost _default_:*&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/default<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/siteler/default80"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost _default_:*&gt;
      +    DocumentRoot "/siteler/default"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>80. porttan hizmet sunan <code>_default_</code> sanal konağı IP adresi
             belirtilmeyen tüm istekleri yakalar, bunu yapabilmesi için yapılandırma
      @@ -490,19 +413,20 @@
           <p><code>_default_</code> sanal konağının sadece 80. porttan hizmet
             sunmasını istersek...</p>
       
      -    <example>
      -    <title>Sunucu yapılandırması</title>
      -
      -    &lt;VirtualHost _default_:80&gt;<br />
      -    DocumentRoot /siteler/default<br />
      -    ...<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost _default_:80&gt;
      +    DocumentRoot "/siteler/default"
      +    ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>80. porttan gelen IP adresi belirtilmemiş isteklere
             <code>_default_</code> sanal konağı, diğer portlardan gelen adres
             belirtilmemiş isteklere ise ana sunucu hizmet verecektir.</p>
      -    </section>
      +
      +    <p>Bir sanal konak bildiriminde <code>*</code> kullanımı
      +      <code>_default_</code> kullanımından daha yüksek öncelik sağlar.</p>
      +   </section>
       
         </section>
       
      @@ -510,41 +434,34 @@
           sanal konakla yansılamak</title>
       
           <p>İsme dayalı sanal konak örneklerinin <a href="#twoips">2. sinde</a> adı
      -      geçen <code>falanca.dom</code> bu örnekte kendi IP adresinden hizmet
      +      geçen <code>example.org</code> bu örnekte kendi IP adresinden hizmet
             veriyor olsun. İsme dayalı sanal konağı eski IP adresiyle kaydetmiş
             vekiller ve isim sunucularından kaynaklanacak olası sorunlardan kaçınmak
             için yansılama sırasında sanal konağı hem eski hem de yeni IP adresiyle
             sunmamız lazım.</p>
       
           <p>Çözüm kolay, çünkü yapacağımız sadece <code>VirtualHost</code>
      -      yönergesine yeni IP adresini (<code>192.168.2.2</code>) eklemek olacak.</p>
      -
      -    <example>
      -    <title>Sunucu yapılandırması</title>
      -
      -    Listen 80<br />
      -    ServerName mesela.dom<br />
      -    DocumentRoot /siteler/mesela<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2 192.168.2.2&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/falanca<br />
      -        ServerName falanca.dom<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.2&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/faraza<br />
      -        ServerName faraza.dom<br />
      -        ServerAlias *.faraza.dom<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +      yönergesine yeni IP adresini (<code>192.168.1.2</code>) eklemek
      +      olacak.</p>
      +
      +    <highlight language="config">
      +Listen 80
      +ServerName example.com
      +DocumentRoot "/siteler/ecom"
      +
      +&lt;VirtualHost 192.168.1.20 192.168.1.2&gt;
      +    DocumentRoot "/siteler/eorg"
      +    ServerName example.org
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20&gt;
      +    DocumentRoot "/siteler/enet"
      +    ServerName example.enet
      +    ServerAlias *.example.net
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>Böylece sanal konağa hem yeni (bir IP’ye dayalı sanal konak olarak)
             hem de eski adresinden (bir isme dayalı sanal konak olarak)
      @@ -564,43 +481,33 @@
             bağlantısı içeren bir bilgilendirme sayfası sunmak üzere yeni bir sanal
             konak oluşturabiliriz.</p>
       
      -    <example>
      -    <title>Sunucu yapılandırması</title>
      -
      -    NameVirtualHost 172.20.30.40<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        # ilk sanal konak<br />
      -        DocumentRoot /siteler/baska<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^/.* /siteler/baska/index.html<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    DocumentRoot /siteler/baska/bir<br />
      -    <indent>
      -        ServerName bir.baska.tld<br />
      -        ServerPath /bir/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/bir/.*) /siteler/baska$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.40&gt;<br />
      -    <indent>
      -        DocumentRoot /siteler/baska/iki<br />
      -        ServerName iki.baska.tld<br />
      -        ServerPath /iki/<br />
      -        RewriteEngine On<br />
      -        RewriteRule ^(/iki/.*) /siteler/baska$1<br />
      -        # ...<br />
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost 172.20.30.40&gt;
      +    # ilk sanal konak
      +    DocumentRoot "/siteler/baska"
      +    RewriteEngine On
      +    RewriteRule "." "/siteler/baska/index.html"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot /siteler/baska/bir
      +    ServerName "bir.baska.tld"
      +    ServerPath "/bir/"
      +    RewriteEngine On
      +    RewriteRule "^(/bir/.*) /siteler/baska$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.40&gt;
      +    DocumentRoot "/siteler/baska/iki"
      +    ServerName iki.baska.tld
      +    ServerPath "/iki/"
      +    RewriteEngine On
      +    RewriteRule "^(/iki/.*)" "/siteler/baska$1"
      +    # ...
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p><directive module="core">ServerPath</directive> yönergesinden dolayı
             <code>http://bir.baska.tld/bir/</code> şeklinde yapılan isteklere
      diff --git a/docs/manual/vhosts/fd-limits.html.en b/docs/manual/vhosts/fd-limits.html.en
      index d799f5e408f..90c00cbd76d 100644
      --- a/docs/manual/vhosts/fd-limits.html.en
      +++ b/docs/manual/vhosts/fd-limits.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>File Descriptor Limits - Apache HTTP Server</title>
      +<title>File Descriptor Limits - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page" class="no-sidebar"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>File Descriptor Limits</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>File Descriptor Limits</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../en/vhosts/fd-limits.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -86,20 +91,19 @@ statistical analysis of the various virtual hosts. This can be
       accomplished in the following manner.</p>
       
       <p>First, you will need to add the virtual host information to the log
      -entries. This can be done using the <code class="directive"><a href="../mod/mod_log_config.html#&#10;logformat">
      +entries. This can be done using the <code class="directive"><a href="../mod/mod_log_config.html#logformat">
       LogFormat</a></code>
       directive, and the <code>%v</code> variable. Add this to the beginning
       of your log format string:</p>
       
      -<div class="example"><p><code>
      -LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      -CustomLog logs/multiple_vhost_log vhost
      -</code></p></div>
      +<pre class="prettyprint lang-config">LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
      +CustomLog logs/multiple_vhost_log vhost</pre>
      +
       
       <p>This will create a log file in the common log format, but with the
       canonical virtual host (whatever appears in the
       <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> directive) prepended to
      -each line. (See <code class="directive"><a href="../mod/mod_log_config.html#custom log formats">Custom Log Formats</a></code> for
      +each line. (See <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> for
       more about customizing your log files.)</p>
       
       <p>When you wish to split your log file into its component parts (one
      @@ -124,7 +128,28 @@ Each file will be called <code>hostname.log</code>.</p>
       <a href="../ja/vhosts/fd-limits.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/fd-limits.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/fd-limits.html.fr b/docs/manual/vhosts/fd-limits.html.fr
      index 83a38870af5..4713f86c1ef 100644
      --- a/docs/manual/vhosts/fd-limits.html.fr
      +++ b/docs/manual/vhosts/fd-limits.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Limites des descripteurs de fichiers - Serveur Apache HTTP</title>
      +<title>Limites des descripteurs de fichiers - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page" class="no-sidebar"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Serveurs Virtuels</a></div><div id="page-content"><div id="preamble"><h1>Limites des descripteurs de fichiers</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Serveurs Virtuels</a></div><div id="page-content"><div id="preamble"><h1>Limites des descripteurs de fichiers</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -96,21 +101,19 @@ de la mani
       
       <p>Tout d'abord, vous devez ajouter le nom du serveur virtuel  chaque
       entre du journal. Ceci se paramtre au moyen de la directive
      -<code class="directive"><a href="../mod/mod_log_config.html# logformat"> LogFormat</a></code> et de la
      +<code class="directive"><a href="../mod/mod_log_config.html#logformat"> LogFormat</a></code> et de la
       variable <code>%v</code>. Ajoutez cette variable au dbut de la chane
       de dfinition du format de journalisations&nbsp;:</p>
       
      -<div class="example"><p><code>
      -LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      -CustomLog logs/multiple_vhost_log vhost
      -</code></p></div>
      +<pre class="prettyprint lang-config">LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
      +CustomLog logs/multiple_vhost_log vhost</pre>
      +
       
       <p>Cette configuration va provoquer la cration d'un fichier de
       journalisation au format standard (CLF&nbsp;: 'Common Log Format'), mais dont
       chaque ligne dbutera par le nom canonique du serveur virtuel (spcifi
       par la directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>).
      -(Voir <code class="directive"><a href="../mod/mod_log_config.html#formats de journalisation&#10;personnaliss">Formats de journalisation
      -personnaliss</a></code> pour d'autres informations sur la
      +(Voir <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> pour d'autres informations sur la
       personnalisation des fichiers journaux.)</p>
       
       <p>Au moment de sparer les informations du fichier journal en un fichier
      @@ -137,7 +140,28 @@ nomm
       <a href="../ja/vhosts/fd-limits.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/fd-limits.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/fd-limits.html.ja.utf8 b/docs/manual/vhosts/fd-limits.html.ja.utf8
      index 4c9f42ac029..42083545f4d 100644
      --- a/docs/manual/vhosts/fd-limits.html.ja.utf8
      +++ b/docs/manual/vhosts/fd-limits.html.ja.utf8
      @@ -1,32 +1,38 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ファイル記述子の限界 - Apache HTTP サーバ</title>
      +<title>ファイル記述子の限界 - Apache HTTP サーバ バージョン 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page" class="no-sidebar"><div id="page-header">
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン
      -            2.3</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>ファイル記述子の限界</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>ファイル記述子の限界</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/fd-limits.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
       
           <p>たくさんのバーチャルホストを運用する場合、もし、
      @@ -119,12 +125,33 @@ split-logfile &lt; /logs/multiple_vhost_log
       
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/fd-limits.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/fd-limits.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/fd-limits.html.ko.euc-kr b/docs/manual/vhosts/fd-limits.html.ko.euc-kr
      index a48bbaaba80..e4c45dd632a 100644
      --- a/docs/manual/vhosts/fd-limits.html.ko.euc-kr
      +++ b/docs/manual/vhosts/fd-limits.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ϱ(file descriptor) Ѱ - Apache HTTP Server</title>
      +<title>ϱ(file descriptor) Ѱ - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page" class="no-sidebar"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ϱ(file descriptor) Ѱ</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ϱ(file descriptor) Ѱ</h1>
       <div class="toplang">
       <p><span> : </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -120,7 +125,28 @@ split-logfile &lt; /logs/multiple_vhost_log
       <a href="../ja/vhosts/fd-limits.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/fd-limits.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/fd-limits.html.tr.utf8 b/docs/manual/vhosts/fd-limits.html.tr.utf8
      index 5c1e4e5130e..58a2914c4e0 100644
      --- a/docs/manual/vhosts/fd-limits.html.tr.utf8
      +++ b/docs/manual/vhosts/fd-limits.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Dosya Tanıtıcı Sınırları - Apache HTTP Sunucusu</title>
      +<title>Dosya Tanıtıcı Sınırları - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page" class="no-sidebar"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Dosya Tanıtıcı Sınırları</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Dosya Tanıtıcı Sınırları</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/fd-limits.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/fd-limits.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
      @@ -24,7 +29,6 @@
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
       
           <p>Çok büyük sayıda sanal konak kullanıyorsanız ve bunların her biri için
      @@ -87,16 +91,14 @@
             <code>%v</code> biçem değişkeni ile yapılabilir. Günlük girdisi biçem
             dizgesinin başına bunu ekleyiniz:</p>
       
      -    <div class="example"><p><code>
      -    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      -    CustomLog logs/multiple_vhost_log vhost
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
      +CustomLog logs/multiple_vhost_log vhost</pre>
      +
       
           <p>Bu yapılandırma ile her günlük kaydının başında sanal konağın
             <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesine belirtilen
             ismi eklenir. (Günlük dosyalarınızın kişiselleştirilmesi ile ilgili daha
      -      fazla bilgi için <a href="../mod/mod_log_config.html#formats">Günlük
      -      Girdilerinin Kişiselleştirilmesi</a> konusuna bakınız.)</p>
      +      fazla bilgi için <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code> belgesine bakınız.)</p>
       
           <p>Günlük dosyanızdaki kayıtları bileşenlere göre gruplamak isterseniz
             <code><a href="../programs/other.html">split-logfile</a></code>
      @@ -121,7 +123,28 @@
       <a href="../ja/vhosts/fd-limits.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/fd-limits.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/fd-limits.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/fd-limits.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/fd-limits.xml b/docs/manual/vhosts/fd-limits.xml
      index 2c08d079563..56c78c24b70 100644
      --- a/docs/manual/vhosts/fd-limits.xml
      +++ b/docs/manual/vhosts/fd-limits.xml
      @@ -91,16 +91,15 @@ LogFormat</directive>
       directive, and the <code>%v</code> variable. Add this to the beginning
       of your log format string:</p>
       
      -<example>
      -LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      +<highlight language="config">
      +LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
       CustomLog logs/multiple_vhost_log vhost
      -</example>
      +</highlight>
       
       <p>This will create a log file in the common log format, but with the
       canonical virtual host (whatever appears in the
       <directive module="core">ServerName</directive> directive) prepended to
      -each line. (See <directive
      -module="mod_log_config">Custom Log Formats</directive> for
      +each line. (See <module>mod_log_config</module> for
       more about customizing your log files.)</p>
       
       <p>When you wish to split your log file into its component parts (one
      diff --git a/docs/manual/vhosts/fd-limits.xml.fr b/docs/manual/vhosts/fd-limits.xml.fr
      index 963cd6f53fc..eac340ae189 100644
      --- a/docs/manual/vhosts/fd-limits.xml.fr
      +++ b/docs/manual/vhosts/fd-limits.xml.fr
      @@ -1,8 +1,9 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision : 1174747 -->
      +<!-- English Revision: 1562488 -->
       <!-- French translation by Vincent Deffontaines, review by alain B -->
      +<!-- Updated by Lucien Gentis -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      @@ -27,51 +28,51 @@
       
       <summary>
       
      -    <p>Quand de nombreux serveurs virtuels sont crs, Apache peut
      -    dpasser les limites en descripteurs de fichiers ('file descriptors',
      -    galement appels <cite>gestionnaires de fichiers</cite>) si chacun
      +    <p>Quand de nombreux serveurs virtuels sont créés, Apache peut
      +    dépasser les limites en descripteurs de fichiers ('file descriptors',
      +    également appelés <cite>gestionnaires de fichiers</cite>) si chacun
           des serveurs virtuels utilise ses propres fichiers journaux. Le
      -    nombre total de descripteurs de fichiers utiliss par Apache est
      +    nombre total de descripteurs de fichiers utilisés par Apache est
           d'un par fichier journal, un pour chacune des autres directives
           de fichiers journaux, plus un nombre constant compris entre 10 et 20
      -    pour son fonctionnement interne. Les systmes d'exploitation Unix
      +    pour son fonctionnement interne. Les systèmes d'exploitation Unix
           limitent le nombre de descripteurs de fichiers utilisables par
           processus&nbsp;; une valeur courante pour cette limite est de 64, et
      -    cette valeur peut le plus souvent tre augmente.</p>
      +    cette valeur peut le plus souvent être augmentée.</p>
       
      -    <p>Apache tente d'accrotre cette valeur limite si ncessaire, mais
      +    <p>Apache tente d'accroître cette valeur limite si nécessaire, mais
           sans y parvenir dans les cas suivants&nbsp;:</p>
       
           <ol>
      -      <li>Le systme d'exploitation ne permet pas l'utilisation d'appels
      -      systmes <code>setrlimit()</code>.</li>
      +      <li>Le système d'exploitation ne permet pas l'utilisation d'appels
      +      systèmes <code>setrlimit()</code>.</li>
       
             <li>L'appel <code>setrlimit(RLIMIT_NOFILE)</code> ne fonctionne pas
      -      sur votre systme d'exploitation (c'est le cas sous Solaris 2.3).</li>
      +      sur votre système d'exploitation (c'est le cas sous Solaris 2.3).</li>
       
      -      <li>Le nombre de descripteurs de fichiers ncessaires  Apache
      -      dpasse la limite physique du matriel.</li>
      +      <li>Le nombre de descripteurs de fichiers nécessaires à Apache
      +      dépasse la limite physique du matériel.</li>
       
      -      <li>Le systme impose d'autres limites sur l'utilisation des
      +      <li>Le système impose d'autres limites sur l'utilisation des
             descripteurs de fichiers, comme par exemple une limite sur les
             flux stdio, utilisables uniquement sur les descripteurs de
      -      fichiers infrieurs  256. (sous Solaris 2).</li>
      +      fichiers inférieurs à 256. (sous Solaris 2).</li>
           </ol>
       
      -    <p>En cas de problme, Vous pouvez&nbsp;:</p>
      +    <p>En cas de problème, Vous pouvez&nbsp;:</p>
       
           <ul>
      -      <li>Rduire le nombre de fichiers journaux, en ne spcifiant
      +      <li>Réduire le nombre de fichiers journaux, en ne spécifiant
             aucun fichier journal dans les sections
             <directive type="section" module="core">VirtualHost</directive>,
             en donc en envoyant les informations aux fichiers journaux du
      -      serveur principal (Voir <a href="#splitlogs">clatement des
      +      serveur principal (Voir <a href="#splitlogs">Éclatement des
             fichiers journaux</a> ci-dessous pour plus d'informations sur
      -      cette possibilit).</li>
      +      cette possibilité).</li>
       
             <li>
      -        Dans les cas 1 ou 2 (voqus ci-dessus), augmentez la limite sur
      -        les descripteurs de fichiers avant le dmarrage d'Apache, au
      +        Dans les cas 1 ou 2 (évoqués ci-dessus), augmentez la limite sur
      +        les descripteurs de fichiers avant le démarrage d'Apache, au
               moyen d'un script comme
       
               <example>
      @@ -85,56 +86,55 @@
       <!-- the document misc/descriptors.xml does not exist yet in 2.1
           <p>Veuillez noter que le document
           <a href="../misc/descriptors.html">Descripteurs et Apache</a>
      -    contient plus de dtails concernant les problmes de descripteurs
      -    de fichiers et comment les rsoudre en fonction de votre systme
      +    contient plus de détails concernant les problèmes de descripteurs
      +    de fichiers et comment les résoudre en fonction de votre système
           d'exploitation.</p>
       -->
       
       </summary>
       
      -<section id="splitlogs"><title>clatement des fichiers journaux</title>
      +<section id="splitlogs"><title>Éclatement des fichiers journaux</title>
       
      -<p>Lorsque vous choisissez d'enregistrer les informations manant de
      -plusieurs serveurs virtuels dans un mme fichier journal, vous voudrez
      -ensuite pouvoir scinder ces informations  des fins de statistiques, par
      -exemple, sur les diffrents serveurs virtuels. Il est possible de procder
      -de la manire suivante&nbsp;:</p>
      +<p>Lorsque vous choisissez d'enregistrer les informations émanant de
      +plusieurs serveurs virtuels dans un même fichier journal, vous voudrez
      +ensuite pouvoir scinder ces informations à des fins de statistiques, par
      +exemple, sur les différents serveurs virtuels. Il est possible de procéder
      +de la manière suivante&nbsp;:</p>
       
      -<p>Tout d'abord, vous devez ajouter le nom du serveur virtuel  chaque
      -entre du journal. Ceci se paramtre au moyen de la directive
      +<p>Tout d'abord, vous devez ajouter le nom du serveur virtuel à chaque
      +entrée du journal. Ceci se paramètre au moyen de la directive
       <directive module="mod_log_config"> LogFormat</directive> et de la
      -variable <code>%v</code>. Ajoutez cette variable au dbut de la chane
      -de dfinition du format de journalisations&nbsp;:</p>
      +variable <code>%v</code>. Ajoutez cette variable au début de la chaîne
      +de définition du format de journalisations&nbsp;:</p>
       
      -<example>
      -LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      +<highlight language="config">
      +LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
       CustomLog logs/multiple_vhost_log vhost
      -</example>
      +</highlight>
       
      -<p>Cette configuration va provoquer la cration d'un fichier de
      +<p>Cette configuration va provoquer la création d'un fichier de
       journalisation au format standard (CLF&nbsp;: 'Common Log Format'), mais dont
      -chaque ligne dbutera par le nom canonique du serveur virtuel (spcifi
      +chaque ligne débutera par le nom canonique du serveur virtuel (spécifié
       par la directive <directive module="core">ServerName</directive>).
      -(Voir <directive module="mod_log_config">Formats de journalisation
      -personnaliss</directive> pour d'autres informations sur la
      +(Voir <module>mod_log_config</module> pour d'autres informations sur la
       personnalisation des fichiers journaux.)</p>
       
      -<p>Au moment de sparer les informations du fichier journal en un fichier
      +<p>Au moment de séparer les informations du fichier journal en un fichier
       par serveur virtuel, le programme <code>
      -<a href="../programs/other.html">split-logfile</a></code> peut tre
      -utilis. Ce programme peut tre trouv dans le rpertoire
      +<a href="../programs/other.html">split-logfile</a></code> peut être
      +utilisé. Ce programme peut être trouvé dans le répertoire
       <code>support</code> de la distribution d'Apache.</p>
       
      -<p>Excutez ce programme au moyen de la commande&nbsp;:</p>
      +<p>Exécutez ce programme au moyen de la commande&nbsp;:</p>
       
       <example>
       split-logfile &lt; /logs/multiple_vhost_log
       </example>
       
      -<p>Une fois excut avec le nom du fichier contenant tous les journaux,
      -ce programme va gnrer un fichier pour chacun des serveurs virtuels
      -qui apparat dans le fichier d'entre. Chaque fichier en sortie est
      -nomm <code>nomduserveur.log</code>.</p>
      +<p>Une fois exécuté avec le nom du fichier contenant tous les journaux,
      +ce programme va générer un fichier pour chacun des serveurs virtuels
      +qui apparaît dans le fichier d'entrée. Chaque fichier en sortie est
      +nommé <code>nomduserveur.log</code>.</p>
       
       </section>
       </manualpage>
      diff --git a/docs/manual/vhosts/fd-limits.xml.ja b/docs/manual/vhosts/fd-limits.xml.ja
      index 1e5c2a013d1..c5208597864 100644
      --- a/docs/manual/vhosts/fd-limits.xml.ja
      +++ b/docs/manual/vhosts/fd-limits.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 659902:1562488 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/fd-limits.xml.ko b/docs/manual/vhosts/fd-limits.xml.ko
      index d3eca37f64a..415b6df855b 100644
      --- a/docs/manual/vhosts/fd-limits.xml.ko
      +++ b/docs/manual/vhosts/fd-limits.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 659902:1562488 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/fd-limits.xml.meta b/docs/manual/vhosts/fd-limits.xml.meta
      index 4203342ef47..2993e90a589 100644
      --- a/docs/manual/vhosts/fd-limits.xml.meta
      +++ b/docs/manual/vhosts/fd-limits.xml.meta
      @@ -11,6 +11,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/fd-limits.xml.tr b/docs/manual/vhosts/fd-limits.xml.tr
      index ead579c7e5c..32b14b2ff9d 100644
      --- a/docs/manual/vhosts/fd-limits.xml.tr
      +++ b/docs/manual/vhosts/fd-limits.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 1562488 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -91,16 +91,15 @@
             <code>%v</code> biçem değişkeni ile yapılabilir. Günlük girdisi biçem
             dizgesinin başına bunu ekleyiniz:</p>
       
      -    <example>
      -    LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost<br />
      -    CustomLog logs/multiple_vhost_log vhost
      -    </example>
      +    <highlight language="config">
      +LogFormat "%v %h %l %u %t \"%r\" %&gt;s %b" vhost
      +CustomLog logs/multiple_vhost_log vhost
      +    </highlight>
       
           <p>Bu yapılandırma ile her günlük kaydının başında sanal konağın
             <directive module="core">ServerName</directive> yönergesine belirtilen
             ismi eklenir. (Günlük dosyalarınızın kişiselleştirilmesi ile ilgili daha
      -      fazla bilgi için <a href="../mod/mod_log_config.html#formats">Günlük
      -      Girdilerinin Kişiselleştirilmesi</a> konusuna bakınız.)</p>
      +      fazla bilgi için <module>mod_log_config</module> belgesine bakınız.)</p>
       
           <p>Günlük dosyanızdaki kayıtları bileşenlere göre gruplamak isterseniz
             <code><a href="../programs/other.html">split-logfile</a></code>
      diff --git a/docs/manual/vhosts/index.html b/docs/manual/vhosts/index.html
      index 88e17c2f1d6..f1002f15995 100644
      --- a/docs/manual/vhosts/index.html
      +++ b/docs/manual/vhosts/index.html
      @@ -24,6 +24,6 @@
       Content-Language: tr
       Content-type: text/html; charset=UTF-8
       
      -URI: index.html.zh-cn
      +URI: index.html.zh-cn.utf8
       Content-Language: zh-cn
       Content-type: text/html; charset=UTF-8
      diff --git a/docs/manual/vhosts/index.html.de b/docs/manual/vhosts/index.html.de
      index 638cf156055..2552a37625a 100644
      --- a/docs/manual/vhosts/index.html.de
      +++ b/docs/manual/vhosts/index.html.de
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache-Dokumentation zu virtuellen Hosts - Apache HTTP Server</title>
      +<title>Apache-Dokumentation zu virtuellen Hosts - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP-Server</a> &gt; <a href="http://httpd.apache.org/docs/">Dokumentation</a> &gt; <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache-Dokumentation zu virtuellen Hosts</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP-Server</a> &gt; <a href="http://httpd.apache.org/docs/">Dokumentation</a> &gt; <a href="../">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache-Dokumentation zu virtuellen Hosts</h1>
       <div class="toplang">
       <p><span>Verfgbare Sprachen: </span><a href="../de/vhosts/" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -110,6 +115,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.en b/docs/manual/vhosts/index.html.en
      index 225b18f14ef..be1ca85426d 100644
      --- a/docs/manual/vhosts/index.html.en
      +++ b/docs/manual/vhosts/index.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache Virtual Host documentation - Apache HTTP Server</title>
      +<title>Apache Virtual Host documentation - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache Virtual Host documentation</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" title="English">&nbsp;en&nbsp;</a> |
      @@ -82,13 +87,20 @@ hosts</a></li><li><a href="ip-based.html">IP-based virtual hosts</a></li><li><a
           </ul>
       
           <p>If you are trying to debug your virtual host configuration, you
      -    may find the Apache <code>-S</code> command line switch
      -    useful. That is, type the following command:</p>
      +    may find the <code>-S</code> command line switch
      +    useful.</p>
      +
      +    <div class="example"><h3>Unix example</h3><p><code>
      +    
      +    apachectl -S
      +    </code></p></div>
       
      -    <div class="example"><p><code>
      -    /usr/local/apache2/bin/httpd -S
      +    <div class="example"><h3>Windows example</h3><p><code>
      +    
      +    httpd.exe -S
           </code></p></div>
       
      +
           <p>This command will dump out a description of how Apache parsed
           the configuration file. Careful examination of the IP addresses and
           server names may help uncover configuration mistakes. (See
      @@ -105,6 +117,10 @@ hosts</a></li><li><a href="ip-based.html">IP-based virtual hosts</a></li><li><a
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.fr b/docs/manual/vhosts/index.html.fr
      index 7d3a51deb11..19edf26fb47 100644
      --- a/docs/manual/vhosts/index.html.fr
      +++ b/docs/manual/vhosts/index.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Documentation sur les serveurs virtuels Apache - Serveur Apache HTTP</title>
      +<title>Documentation sur les serveurs virtuels Apache - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>Documentation sur les serveurs virtuels Apache</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>Documentation sur les serveurs virtuels Apache</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -84,10 +89,16 @@
       
           <p>Pour vrifier et analyser la configuration de vos serveurs 
           virtuels, vous pouvez utiliser l'argument <code>-S</code> sur 
      -    la ligne de commande lanant le programme Apache comme ceci&nbsp;:</p>
      +    la ligne de commande.</p>
      +
      +    <div class="example"><h3>Exemple Unix</h3><p><code>
      +    
      +    apachectl -S
      +    </code></p></div>
       
      -    <div class="example"><p><code>
      -    /usr/local/apache2/bin/httpd -S
      +    <div class="example"><h3>Exemple Windows</h3><p><code>
      +    
      +    httpd.exe -S
           </code></p></div>
       
           <p>Cette commande affichera dans le dtail comment Apache a 
      @@ -107,6 +118,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.ja.utf8 b/docs/manual/vhosts/index.html.ja.utf8
      index d8fee100d93..ad9c5fa7a47 100644
      --- a/docs/manual/vhosts/index.html.ja.utf8
      +++ b/docs/manual/vhosts/index.html.ja.utf8
      @@ -1,25 +1,29 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache バーチャルホスト説明書 - Apache HTTP サーバ</title>
      +<title>Apache バーチャルホスト説明書 - Apache HTTP サーバ バージョン 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン
      -            2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache バーチャルホスト説明書</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache バーチャルホスト説明書</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/" title="Japanese">&nbsp;ja&nbsp;</a> |
      @@ -27,8 +31,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
       
           <p><cite>バーチャルホスト</cite>という用語は、1 台のマシン上で
      @@ -97,7 +103,7 @@
       
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/" title="Japanese">&nbsp;ja&nbsp;</a> |
      @@ -105,6 +111,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.ko.euc-kr b/docs/manual/vhosts/index.html.ko.euc-kr
      index 4d53be3d931..1891633a12a 100644
      --- a/docs/manual/vhosts/index.html.ko.euc-kr
      +++ b/docs/manual/vhosts/index.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ġ ȣƮ  - Apache HTTP Server</title>
      +<title>ġ ȣƮ  - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a></div><div id="page-content"><div id="preamble"><h1>ġ ȣƮ </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a></div><div id="page-content"><div id="preamble"><h1>ġ ȣƮ </h1>
       <div class="toplang">
       <p><span> : </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -105,6 +110,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.tr.utf8 b/docs/manual/vhosts/index.html.tr.utf8
      index d9ce15d2db3..693833f32a8 100644
      --- a/docs/manual/vhosts/index.html.tr.utf8
      +++ b/docs/manual/vhosts/index.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache Sanal Konak Belgeleri - Apache HTTP Sunucusu</title>
      +<title>Apache Sanal Konak Belgeleri - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache Sanal Konak Belgeleri</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache Sanal Konak Belgeleri</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -26,13 +31,13 @@
       <a href="../tr/vhosts/" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
       
           <p><cite>Sanal Konak</cite> (Virtual Host) terimi tek bir makine üzerinde
      -      birden fazla sitenin (www.sirket1.dom, www.sirket2.dom gibi) barındırılma
      -      uygulamasını betimler. Sanal konaklar, "<a href="ip-based.html">IP’ye
      -      dayalı</a>" veya "<a href="name-based.html">isme dayalı</a>" olabilir;
      +      birden fazla sitenin (sirket1.example.com, sirket2.example.com gibi)
      +      barındırılma uygulamasını betimler. Sanal konaklar,
      +      "<a href="ip-based.html">IP’ye dayalı</a>" veya
      +      "<a href="name-based.html">isme dayalı</a>" olabilir;
             birincisinde, her site ayrı bir IP adresinden sunulurken, ikincisinde her
             IP adresinde birden fazla site sunulur. Olayda aynı fiziksel sunucu
             kullanıldığı halde bu sunucu son kullanıcıya görünür değildir.</p>
      @@ -43,13 +48,14 @@
             konaklara bazen <em>konağa dayalı</em> sanal konaklar veya <em>IP’ye
             dayanmayan</em> sanal konaklar da denmektedir.</p>
       
      -    <p>Aşağıda, Apache’nin 1.3 sürümü ve sonrası için sanal konak desteğini bütün
      +    <p>Aşağıda, Apache HTTP Suncusundaki sanal konak desteğini bütün
             ayrıntıları ile açıklayan belgeler listelenmiştir.</p>
       
       </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#support">Sanal Konak Desteği</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#directives">Yapılandırma Yönergeleri</a></li>
      -</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li><li><a href="name-based.html">İsme Dayalı Sanal Konaklar</a></li><li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a></li><li><a href="examples.html">Sanal Konak Örnekleri</a></li><li><a href="fd-limits.html">Dosya Tanıtıcı Sınırları</a></li><li><a href="mass.html">Kütlesel Sanal Konaklık</a></li><li><a href="details.html">Ayrıntılı olarak Konak Eşleme</a></li></ul></div>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code></li><li><a href="name-based.html">İsme Dayalı Sanal Konaklar</a></li><li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a>
      +</li><li><a href="examples.html">Sanal Konak Örnekleri</a></li><li><a href="fd-limits.html">Dosya Tanıtıcı Sınırları</a></li><li><a href="mass.html">Kütlesel Sanal Konaklık</a></li><li><a href="details.html">Ayrıntılı olarak Konak Eşleme</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="support" id="support">Sanal Konak Desteği</a></h2>
      @@ -57,15 +63,16 @@
           <ul>
             <li><a href="name-based.html">İsme Dayalı Sanal Konaklar</a> (Her IP
               adresinde birden fazla site)</li>
      -      <li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a> (Her site
      -        için ayrı IP adresi)</li>
      +      <li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a> (Her
      +        site için ayrı IP adresi)</li>
             <li><a href="examples.html">Çok kullanılan sanal konak yapılandırma
               örnekleri</a></li>
             <li><a href="fd-limits.html">Dosya Tanıtıcı Sınırları</a> (veya,
             <em>çok fazla günlük dosyası</em>)</li>
             <li><a href="mass.html">Devingen olarak Yapılandırılan Kütlesel Sanal
               Barındırma</a></li>
      -      <li><a href="details.html">Konak Eşlemenin Derinliğine İncelenmesi</a></li>
      +      <li><a href="details.html">Konak Eşlemenin Derinliğine
      +        İncelenmesi</a></li>
           </ul>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      @@ -74,20 +81,23 @@
       
           <ul>
             <li><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li>
      -      <li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li>
             <li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li>
             <li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li>
             <li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li>
           </ul>
       
           <p>Sanal konak yapılandırmanız üzerinde hata ayıklamaya çalışıyorsanız
      -      Apache’nin <code>-S</code> komut satırı seçeneği şu şekilde çok işinize
      +      <code>-S</code> komut satırı seçeneği şu şekilde çok işinize
             yarayabilir:</p>
       
      -    <div class="example"><p><code>
      -    /usr/local/apache2/bin/httpd -S
      +    <div class="example"><h3>Unix örneği</h3><p><code>
      +    apachectl -S
           </code></p></div>
       
      +    <div class="example"><h3>Windows örneği</h3><p><code>
      +    httpd.exe -S
      +    </code></p></div>
      +    
           <p>Bu komut, yapılandırma dosyasının Apache yorumunu dökümler. IP
             adreslerinin ve sunucu isimlerinin dikkatli bir incelemesi, yapılandırma
             yanlışlarınızı keşfetmenize yardımcı olabilir. (Diğer komut satırı
      @@ -104,6 +114,10 @@
       <a href="../tr/vhosts/" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" hreflang="zh-cn" rel="alternate" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.html.zh-cn b/docs/manual/vhosts/index.html.zh-cn.utf8
      similarity index 84%
      rename from docs/manual/vhosts/index.html.zh-cn
      rename to docs/manual/vhosts/index.html.zh-cn.utf8
      index cd46708b7de..7b5667e23b6 100644
      --- a/docs/manual/vhosts/index.html.zh-cn
      +++ b/docs/manual/vhosts/index.html.zh-cn.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn" xml:lang="zh-cn"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn" xml:lang="zh-cn"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache 虚拟主机文档 - Apache HTTP 服务器</title>
      +<title>Apache 虚拟主机文档 - Apache HTTP 服务器 版本 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">模块</a> | <a href="../mod/directives.html">指令</a> | <a href="../faq/">常见问题</a> | <a href="../glossary.html">术语</a> | <a href="../sitemap.html">网站导航</a></p>
      -<p class="apache">Apache HTTP 服务器版本 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">模块</a> | <a href="../mod/directives.html">指令</a> | <a href="http://wiki.apache.org/httpd/FAQ">常见问题</a> | <a href="../glossary.html">术语</a> | <a href="../sitemap.html">网站导航</a></p>
      +<p class="apache">Apache HTTP 服务器版本 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="../"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP 服务器</a> &gt; <a href="http://httpd.apache.org/docs/">文档</a> &gt; <a href="../">版本 2.3</a></div><div id="page-content"><div id="preamble"><h1>Apache 虚拟主机文档</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP 服务器</a> &gt; <a href="http://httpd.apache.org/docs/">文档</a> &gt; <a href="../">版本 2.4</a></div><div id="page-content"><div id="preamble"><h1>Apache 虚拟主机文档</h1>
       <div class="toplang">
       <p><span>可用语言: </span><a href="../de/vhosts/" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -26,6 +31,7 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div>
      +<div class="outofdate">此翻译可能过期。要了解最近的更改,请阅读英文版。</div>
       
       
           <p>术语<cite>虚拟主机</cite>指的是在单一机器上运行多个网站
      @@ -90,6 +96,10 @@
       <a href="../tr/vhosts/" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a> |
       <a href="../zh-cn/vhosts/" title="Simplified Chinese">&nbsp;zh-cn&nbsp;</a></p>
       </div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />基于 <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> 许可证.</p>
      -<p class="menu"><a href="../mod/">模块</a> | <a href="../mod/directives.html">指令</a> | <a href="../faq/">常见问题</a> | <a href="../glossary.html">术语</a> | <a href="../sitemap.html">网站导航</a></p></div>
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />基于 <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> 许可证.</p>
      +<p class="menu"><a href="../mod/">模块</a> | <a href="../mod/directives.html">指令</a> | <a href="http://wiki.apache.org/httpd/FAQ">常见问题</a> | <a href="../glossary.html">术语</a> | <a href="../sitemap.html">网站导航</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/index.xml b/docs/manual/vhosts/index.xml
      index 055a404fa40..2bc1c2b336d 100644
      --- a/docs/manual/vhosts/index.xml
      +++ b/docs/manual/vhosts/index.xml
      @@ -88,13 +88,20 @@ hosts</a></seealso>
           </ul>
       
           <p>If you are trying to debug your virtual host configuration, you
      -    may find the Apache <code>-S</code> command line switch
      -    useful. That is, type the following command:</p>
      +    may find the <code>-S</code> command line switch
      +    useful.</p>
       
           <example>
      -    /usr/local/apache2/bin/httpd -S
      +    <title>Unix example</title>
      +    apachectl -S
           </example>
       
      +    <example>
      +    <title>Windows example</title>
      +    httpd.exe -S
      +    </example>
      +
      +
           <p>This command will dump out a description of how Apache parsed
           the configuration file. Careful examination of the IP addresses and
           server names may help uncover configuration mistakes. (See
      diff --git a/docs/manual/vhosts/index.xml.de b/docs/manual/vhosts/index.xml.de
      index 5dab7cb1bfc..8368c806e14 100644
      --- a/docs/manual/vhosts/index.xml.de
      +++ b/docs/manual/vhosts/index.xml.de
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
      -<!-- English Revision: 420990:1053231 (outdated) -->
      +<!-- English Revision: 420990:1753873 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/index.xml.fr b/docs/manual/vhosts/index.xml.fr
      index f57a35bfd49..6c0b0a0f8be 100644
      --- a/docs/manual/vhosts/index.xml.fr
      +++ b/docs/manual/vhosts/index.xml.fr
      @@ -1,7 +1,7 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision: 1053231 -->
      +<!-- English Revision: 1753873 -->
       <!-- french translation by alain B, review by Vincent Deffontaines -->
       <!-- Updated by Lucien Gentis -->
       
      @@ -29,25 +29,25 @@
       
       <summary>
       
      -    <p>Le principe des <cite>Serveurs Virtuels</cite> consiste  
      +    <p>Le principe des <cite>Serveurs Virtuels</cite> consiste à 
           faire fonctionner un ou plusieurs serveurs Web (comme 
           <code>www.company1.example.com</code> et <code>www.company2.example.com</code>) 
      -    sur une mme machine. Les serveurs virtuels peuvent tre soit 
      -    "<a href="ip-based.html">par-IP</a>" o une adresse IP est 
      -    attribue pour chaque serveur Web, soit "<a href="name-based.html"
      -    >par-nom</a>" o plusieurs noms de domaine se ctoient sur 
      -    des mmes adresses IP. L'utilisateur final ne peroit pas 
      -    qu'en fait il s'agit d'un mme serveur physique.</p>
      -
      -    <p>Apache a t le prcurseur des serveurs proposant cette 
      -    mthode de serveurs virtuels bass sur les adresses IP. Ses 
      +    sur une même machine. Les serveurs virtuels peuvent être soit 
      +    "<a href="ip-based.html">par-IP</a>" où une adresse IP est 
      +    attribuée pour chaque serveur Web, soit "<a href="name-based.html"
      +    >par-nom</a>" où plusieurs noms de domaine se côtoient sur 
      +    des mêmes adresses IP. L'utilisateur final ne perçoit pas 
      +    qu'en fait il s'agit d'un même serveur physique.</p>
      +
      +    <p>Apache a été le précurseur des serveurs proposant cette 
      +    méthode de serveurs virtuels basés sur les adresses IP. Ses 
           versions 1.1 et suivantes proposent les deux 
      -    mthodes de serveurs virtuels : par-IP et par-nom. Cette 
      -    deuxime mthode est parfois galement appele <em>host-based</em> 
      +    méthodes de serveurs virtuels : par-IP et par-nom. Cette 
      +    deuxième méthode est parfois également appelée <em>host-based</em> 
           ou <em>serveur virtuel non-IP</em>.</p>
       
           <p>Vous trouverez ci-dessous une liste documentaire qui vous 
      -    expliquera en dtails le fonctionnement du support des serveurs
      +    expliquera en détails le fonctionnement du support des serveurs
           virtuels par le serveur HTTP Apache.</p>
       
       </summary>
      @@ -57,8 +57,8 @@
       <seealso><a href="ip-based.html">Serveurs virtuels par-IP</a></seealso>
       <seealso><a href="examples.html">Exemples de serveurs virtuels</a></seealso>
       <seealso><a href="fd-limits.html">Limites des descripteurs de fichiers</a></seealso>
      -<seealso><a href="mass.html">Hbergement virtuel en masse</a></seealso>
      -<seealso><a href="details.html">Dtails sur les critres de choix du serveur</a></seealso>
      +<seealso><a href="mass.html">Hébergement virtuel en masse</a></seealso>
      +<seealso><a href="details.html">Détails sur les critères de choix du serveur</a></seealso>
       
       <section id="support"><title>Support des serveurs virtuels</title>
       
      @@ -73,8 +73,8 @@
             (ou, <em>trop de fichiers journaux</em>)</li>
             <li><a href="mass.html">Configuration dynamique en masse de 
             Serveurs Virtuels</a></li>
      -      <li><a href="details.html">Explication approfondie des critres 
      -      de slection d'un Serveur Virtuel</a></li>
      +      <li><a href="details.html">Explication approfondie des critères 
      +      de sélection d'un Serveur Virtuel</a></li>
           </ul>
       
       </section>
      @@ -89,17 +89,23 @@
             <li><directive module="core">ServerPath</directive></li>
           </ul>
       
      -    <p>Pour vrifier et analyser la configuration de vos serveurs 
      +    <p>Pour vérifier et analyser la configuration de vos serveurs 
           virtuels, vous pouvez utiliser l'argument <code>-S</code> sur 
      -    la ligne de commande lanant le programme Apache comme ceci&nbsp;:</p>
      +    la ligne de commande.</p>
       
           <example>
      -    /usr/local/apache2/bin/httpd -S
      +    <title>Exemple Unix</title>
      +    apachectl -S
           </example>
       
      -    <p>Cette commande affichera dans le dtail comment Apache a 
      -    trait son fichier de configuration. Les erreurs de configuration 
      -    peuvent tre corriges par l'examen attentif des adresses IP et 
      +    <example>
      +    <title>Exemple Windows</title>
      +    httpd.exe -S
      +    </example>
      +
      +    <p>Cette commande affichera dans le détail comment Apache a 
      +    traité son fichier de configuration. Les erreurs de configuration 
      +    peuvent être corrigées par l'examen attentif des adresses IP et 
           des noms de serveurs. (Consultez la documentation du programme 
           <program>httpd</program> pour les autres arguments de la ligne de 
           commande)</p>
      diff --git a/docs/manual/vhosts/index.xml.ja b/docs/manual/vhosts/index.xml.ja
      index 4c1367c9517..58be50bfe21 100644
      --- a/docs/manual/vhosts/index.xml.ja
      +++ b/docs/manual/vhosts/index.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
      -<!-- English Revision: 420990:1053231 (outdated) -->
      +<!-- English Revision: 420990:1753873 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/index.xml.ko b/docs/manual/vhosts/index.xml.ko
      index e3f8b3e3149..ad3d6acd2e6 100644
      --- a/docs/manual/vhosts/index.xml.ko
      +++ b/docs/manual/vhosts/index.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 105989:1053231 (outdated) -->
      +<!-- English Revision: 105989:1753873 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/index.xml.meta b/docs/manual/vhosts/index.xml.meta
      index cb60dcce602..a072f57ac71 100644
      --- a/docs/manual/vhosts/index.xml.meta
      +++ b/docs/manual/vhosts/index.xml.meta
      @@ -12,7 +12,7 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      -    <variant>zh-cn</variant>
      +    <variant>tr</variant>
      +    <variant outdated="yes">zh-cn</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/index.xml.tr b/docs/manual/vhosts/index.xml.tr
      index dccb000cfc7..878eefae29c 100644
      --- a/docs/manual/vhosts/index.xml.tr
      +++ b/docs/manual/vhosts/index.xml.tr
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 420990:1053231 (outdated) -->
      +<!-- English Revision: 1753873 -->
       <!-- =====================================================
        Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
          Reviewed by: Orhan Berent <berent belgeler.org>
      @@ -32,9 +32,10 @@
       <summary>
       
           <p><cite>Sanal Konak</cite> (Virtual Host) terimi tek bir makine üzerinde
      -      birden fazla sitenin (www.sirket1.dom, www.sirket2.dom gibi) barındırılma
      -      uygulamasını betimler. Sanal konaklar, "<a href="ip-based.html">IP’ye
      -      dayalı</a>" veya "<a href="name-based.html">isme dayalı</a>" olabilir;
      +      birden fazla sitenin (sirket1.example.com, sirket2.example.com gibi)
      +      barındırılma uygulamasını betimler. Sanal konaklar,
      +      "<a href="ip-based.html">IP’ye dayalı</a>" veya
      +      "<a href="name-based.html">isme dayalı</a>" olabilir;
             birincisinde, her site ayrı bir IP adresinden sunulurken, ikincisinde her
             IP adresinde birden fazla site sunulur. Olayda aynı fiziksel sunucu
             kullanıldığı halde bu sunucu son kullanıcıya görünür değildir.</p>
      @@ -45,14 +46,15 @@
             konaklara bazen <em>konağa dayalı</em> sanal konaklar veya <em>IP’ye
             dayanmayan</em> sanal konaklar da denmektedir.</p>
       
      -    <p>Aşağıda, Apache’nin 1.3 sürümü ve sonrası için sanal konak desteğini bütün
      +    <p>Aşağıda, Apache HTTP Suncusundaki sanal konak desteğini bütün
             ayrıntıları ile açıklayan belgeler listelenmiştir.</p>
       
       </summary>
       
       <seealso><module>mod_vhost_alias</module></seealso>
       <seealso><a href="name-based.html">İsme Dayalı Sanal Konaklar</a></seealso>
      -<seealso><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a></seealso>
      +<seealso><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a>
      +</seealso>
       <seealso><a href="examples.html">Sanal Konak Örnekleri</a></seealso>
       <seealso><a href="fd-limits.html">Dosya Tanıtıcı Sınırları</a></seealso>
       <seealso><a href="mass.html">Kütlesel Sanal Konaklık</a></seealso>
      @@ -63,15 +65,16 @@
           <ul>
             <li><a href="name-based.html">İsme Dayalı Sanal Konaklar</a> (Her IP
               adresinde birden fazla site)</li>
      -      <li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a> (Her site
      -        için ayrı IP adresi)</li>
      +      <li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a> (Her
      +        site için ayrı IP adresi)</li>
             <li><a href="examples.html">Çok kullanılan sanal konak yapılandırma
               örnekleri</a></li>
             <li><a href="fd-limits.html">Dosya Tanıtıcı Sınırları</a> (veya,
             <em>çok fazla günlük dosyası</em>)</li>
             <li><a href="mass.html">Devingen olarak Yapılandırılan Kütlesel Sanal
               Barındırma</a></li>
      -      <li><a href="details.html">Konak Eşlemenin Derinliğine İncelenmesi</a></li>
      +      <li><a href="details.html">Konak Eşlemenin Derinliğine
      +        İncelenmesi</a></li>
           </ul>
       
       </section>
      @@ -81,20 +84,23 @@
           <ul>
             <li><directive type="section"
                  module="core">VirtualHost</directive></li>
      -      <li><directive module="core">NameVirtualHost</directive></li>
             <li><directive module="core">ServerName</directive></li>
             <li><directive module="core">ServerAlias</directive></li>
             <li><directive module="core">ServerPath</directive></li>
           </ul>
       
           <p>Sanal konak yapılandırmanız üzerinde hata ayıklamaya çalışıyorsanız
      -      Apache’nin <code>-S</code> komut satırı seçeneği şu şekilde çok işinize
      +      <code>-S</code> komut satırı seçeneği şu şekilde çok işinize
             yarayabilir:</p>
       
      -    <example>
      -    /usr/local/apache2/bin/httpd -S
      +    <example><title>Unix örneği</title>
      +    apachectl -S
           </example>
       
      +    <example><title>Windows örneği</title>
      +    httpd.exe -S
      +    </example>
      +    
           <p>Bu komut, yapılandırma dosyasının Apache yorumunu dökümler. IP
             adreslerinin ve sunucu isimlerinin dikkatli bir incelemesi, yapılandırma
             yanlışlarınızı keşfetmenize yardımcı olabilir. (Diğer komut satırı
      diff --git a/docs/manual/vhosts/index.xml.zh-cn b/docs/manual/vhosts/index.xml.zh-cn
      index 98e8291a012..032ea198090 100644
      --- a/docs/manual/vhosts/index.xml.zh-cn
      +++ b/docs/manual/vhosts/index.xml.zh-cn
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.zh-cn.xsl"?>
      -<!-- English revision : 1053231 -->
      +<!-- English Revision: 1053231:1753873 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/ip-based.html.en b/docs/manual/vhosts/ip-based.html.en
      index 55f352b9139..9c5e4284a0a 100644
      --- a/docs/manual/vhosts/ip-based.html.en
      +++ b/docs/manual/vhosts/ip-based.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache IP-based Virtual Host Support - Apache HTTP Server</title>
      +<title>Apache IP-based Virtual Host Support - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Apache IP-based Virtual Host Support</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Apache IP-based Virtual Host Support</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../en/vhosts/ip-based.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -33,7 +38,7 @@
         with virtual hosts</a></li>
       </ul><h3>See also</h3><ul class="seealso"><li>
       <a href="name-based.html">Name-based Virtual Hosts Support</a>
      -</li></ul></div>
      +</li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="explanation" id="explanation">What is IP-based virtual hosting</a></h2>
      @@ -78,7 +83,7 @@ Virtual Hosts</a> to help you decide.  </p>
             <li>There are security partitioning issues, such as company1
             does not want anyone at company2 to be able to read their
             data except via the web. In this case you would need two
      -      daemons, each running with different <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code>, <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code>, <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>, and <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> settings.</li>
      +      daemons, each running with different <code class="directive"><a href="../mod/mod_unixd.html#user">User</a></code>, <code class="directive"><a href="../mod/mod_unixd.html#group">Group</a></code>, <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>, and <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> settings.</li>
       
             <li>You can afford the memory and file descriptor
             requirements of listening to every IP alias on the
      @@ -110,9 +115,8 @@ Virtual Hosts</a> to help you decide.  </p>
           configuration file to select which IP address (or virtual host)
           that daemon services. e.g.</p>
       
      -    <div class="example"><p><code>
      -    Listen 192.0.2.100:80
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">Listen 192.0.2.100:80</pre>
      +
       
           <p>It is recommended that you use an IP address instead of a
           hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
      @@ -129,23 +133,22 @@ Virtual Hosts</a> to help you decide.  </p>
           configuration directives to different values for each virtual
           host. e.g.</p>
       
      -    <div class="example"><p><code>
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    ServerAdmin webmaster@www1.example.com<br />
      -    DocumentRoot /www/vhosts/www1<br />
      -    ServerName www1.example.com<br />
      -    ErrorLog /www/logs/www1/error_log<br />
      -    CustomLog /www/logs/www1/access_log combined<br />
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    ServerAdmin webmaster@www2.example.org<br />
      -    DocumentRoot /www/vhosts/www2<br />
      -    ServerName www2.example.org<br />
      -    ErrorLog /www/logs/www2/error_log<br />
      -    CustomLog /www/logs/www2/access_log combined<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerAdmin webmaster@www1.example.com
      +    DocumentRoot "/www/vhosts/www1"
      +    ServerName www1.example.com
      +    ErrorLog "/www/logs/www1/error_log"
      +    CustomLog "/www/logs/www1/access_log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    ServerAdmin webmaster@www2.example.org
      +    DocumentRoot "/www/vhosts/www2"
      +    ServerName www2.example.org
      +    ErrorLog "/www/logs/www2/error_log"
      +    CustomLog "/www/logs/www2/access_log" combined
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>It is recommended that you use an IP address instead of a
           hostname in the &lt;VirtualHost&gt; directive
      @@ -180,7 +183,28 @@ Virtual Hosts</a> to help you decide.  </p>
       <a href="../ja/vhosts/ip-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/ip-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/ip-based.html.fr b/docs/manual/vhosts/ip-based.html.fr
      index efa1c89273f..140c6c6626a 100644
      --- a/docs/manual/vhosts/ip-based.html.fr
      +++ b/docs/manual/vhosts/ip-based.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Support Apache des serveurs virtuels par IP - Serveur Apache HTTP</title>
      +<title>Support Apache des serveurs virtuels par IP - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Support Apache des serveurs virtuels par IP</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Support Apache des serveurs virtuels par IP</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -32,7 +37,7 @@
       rsident pour des serveurs virtuels</a></li>
       </ul><h3>Voir aussi</h3><ul class="seealso"><li>
       <a href="name-based.html">Support Apache des serveurs virtuels par nom</a>
      -</li></ul></div>
      +</li><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="requirements" id="requirements">Systme requis</a></h2>
      @@ -67,8 +72,8 @@ r
             qu'une entreprise1 ne souhaite que personne d'une entreprise2
             ne puisse lire ses donnes except via le Web. Dans ce cas,
             vous aurez besoin de deux processus rsidents, chacun fonctionnant
      -      avec des paramtres <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code>,
      -      <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code>,
      +      avec des paramtres <code class="directive"><a href="../mod/mod_unixd.html#user">User</a></code>,
      +      <code class="directive"><a href="../mod/mod_unixd.html#group">Group</a></code>,
             <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>, et
             <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> diffrents.</li>
       
      @@ -107,9 +112,8 @@ r
           de configuration pour dfinir l'adresse IP (ou serveur virtuel)
           que le processus rsident doit grer. Par exemple&nbsp;:</p>
       
      -    <div class="example"><p><code>
      -    Listen 192.0.2.100:80
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">Listen 192.0.2.100:80</pre>
      +
       
           <p>Il est recommand d'utiliser une adresse IP plutt qu'un nom
           de domaine (consultez <a href="../dns-caveats.html">Problmes DNS
      @@ -133,23 +137,22 @@ r
           <code class="directive"><a href="../mod/mod_log_config.html#customlog">CustomLog</a></code> avec des
           valeurs diffrentes pour chaque serveur virtuel. Par exemple&nbsp;:</p>
       
      -    <div class="example"><p><code>
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    ServerAdmin webmaster@www1.example.com<br />
      -    DocumentRoot /www/vhosts/www1<br />
      -    ServerName www1.example.com<br />
      -    ErrorLog /www/logs/www1/error_log<br />
      -    CustomLog /www/logs/www1/access_log combined<br />
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    ServerAdmin webmaster@www2.example.org<br />
      -    DocumentRoot /www/vhosts/www2<br />
      -    ServerName www2.example.org<br />
      -    ErrorLog /www/logs/www2/error_log<br />
      -    CustomLog /www/logs/www2/access_log combined<br />
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerAdmin webmaster@www1.example.com
      +    DocumentRoot "/www/vhosts/www1"
      +    ServerName www1.example.com
      +    ErrorLog "/www/logs/www1/error_log"
      +    CustomLog "/www/logs/www1/access_log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    ServerAdmin webmaster@www2.example.org
      +    DocumentRoot "/www/vhosts/www2"
      +    ServerName www2.example.org
      +    ErrorLog "/www/logs/www2/error_log"
      +    CustomLog "/www/logs/www2/access_log" combined
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>Il est recommand d'utiliser une adresse IP plutt qu'un nom
           de domaine comme argument  la directive &lt;VirtualHost&gt;
      @@ -183,7 +186,28 @@ r
       <a href="../ja/vhosts/ip-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/ip-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/ip-based.html.ja.utf8 b/docs/manual/vhosts/ip-based.html.ja.utf8
      index 2b24881fe35..2f11196f4dc 100644
      --- a/docs/manual/vhosts/ip-based.html.ja.utf8
      +++ b/docs/manual/vhosts/ip-based.html.ja.utf8
      @@ -1,32 +1,38 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache の IP ベースのバーチャルホストサポート - Apache HTTP サーバ</title>
      +<title>Apache の IP ベースのバーチャルホストサポート - Apache HTTP サーバ バージョン 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン
      -            2.3</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>Apache の IP ベースのバーチャルホストサポート</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>Apache の IP ベースのバーチャルホストサポート</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/ip-based.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#requirements">システム要件</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#howto">Apache の設定方法</a></li>
      @@ -35,7 +41,7 @@
       デーモンを一つ設定する</a></li>
       </ul><h3>参照</h3><ul class="seealso"><li>
       <a href="name-based.html">名前ベースのバーチャルホストサポート</a>
      -</li></ul></div>
      +</li><li><a href="#comments_section">コメント</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="requirements" id="requirements">システム要件</a></h2>
      @@ -152,12 +158,33 @@
       
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/ip-based.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/ip-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/ip-based.html.ko.euc-kr b/docs/manual/vhosts/ip-based.html.ko.euc-kr
      index 4684dc2f5d4..82e00c0b8c7 100644
      --- a/docs/manual/vhosts/ip-based.html.ko.euc-kr
      +++ b/docs/manual/vhosts/ip-based.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>ġ IP ȣƮ  - Apache HTTP Server</title>
      +<title>ġ IP ȣƮ  - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ġ IP ȣƮ </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>ġ IP ȣƮ </h1>
       <div class="toplang">
       <p><span> : </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -33,7 +38,7 @@
       <li><img alt="" src="../images/down.gif" /> <a href="#single"> ϳ ȣƮ ϱ</a></li>
       </ul><h3></h3><ul class="seealso"><li>
       <a href="name-based.html"≯ ȣƮ </a>
      -</li></ul></div>
      +</li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="requirements" id="requirements">ý 䱸</a></h2>
      @@ -148,7 +153,28 @@
       <a href="../ja/vhosts/ip-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/ip-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/ip-based.html.tr.utf8 b/docs/manual/vhosts/ip-based.html.tr.utf8
      index 8d4ec321888..6f049def94d 100644
      --- a/docs/manual/vhosts/ip-based.html.tr.utf8
      +++ b/docs/manual/vhosts/ip-based.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Apache’de IP’ye Dayalı Sanal Konak Desteği - Apache HTTP Sunucusu</title>
      +<title>IP’ye Dayalı Sanal Konak Desteği - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Apache’de IP’ye Dayalı Sanal Konak Desteği</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>IP’ye Dayalı Sanal Konak Desteği</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/ip-based.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
      @@ -24,28 +29,44 @@
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       </div>
      -<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#requirements">Sistem gereksinimleri</a></li>
      +<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#explanation">IP'ye dayalı sanal konak desteği nedir</a></li>
      +<li><img alt="" src="../images/down.gif" /> <a href="#requirements">Sistem gereksinimleri</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#howto">Apache nasıl ayarlanır?</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#multiple">Çok sayıda sürecin yapılandırılması</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#single">Sanal konaklar tek bir sürecin yapılandırılması</a></li>
       </ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li>
       <a href="name-based.html">İsme Dayalı Sanal Konak Desteği</a>
      -</li></ul></div>
      +</li><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      +<h2><a name="explanation" id="explanation">IP'ye dayalı sanal konak desteği nedir</a></h2>
      +    <p>IP'ye dayalı sanal konak desteği, bir isteğin alındığı IP adresi ve
      +      porta bağlı olarak farklı yönergeleri uygulamak için bir yoldur. Özetle,
      +      farklı siteleri farklı portlardan ve arayüzlerden sunmakta
      +      kullanılır.</p>
      +
      +     <p>Çoğu durumda, <a href="name-based.html">isme dayalı sanal konaklar</a>
      +       birçok sanal konağın tek bir IP adresi/port çiftini paylaşmasını
      +       sağladığından daha kullanışlıdır. Neyi kullanacağınıza karar vermek için
      +       <a href="name-based.html#namevip">İsme dayalı ve IP’ye dayalı Sanal
      +       Konaklar</a> bölümüne bakınız.</p>
      +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      +<div class="section">
       <h2><a name="requirements" id="requirements">Sistem gereksinimleri</a></h2>
       
           <p><cite>IP’ye dayalı</cite> deyince, sunucunun <strong>her IP’ye dayalı
      -      sanal konak için ayrı bir IP adresi</strong>ne sahip olduğunu anlıyoruz.
      -      Bunun olması için, makine ya çok sayıda ağ bağlantısına sahiptir ya da
      -      makinede, günümüzde çoğu işletim sistemi tarafından desteklenen sanal
      -      arabirimler kullanılıyordur. (Sanal arabirimlerle ilgili ayrıntılar için
      -      sistem belgelerinize bakınız; bu konu genellikle IP rumuzları (ip aliases)
      -      olarak geçer ve ayarlamak için genellikle "ifconfig" komutu
      -      kullanılır.)</p>
      -
      +      sanal konak için ayrı bir IP adresi/port çifti</strong>ne sahip olduğunu
      +      anlıyoruz. Bunun olması için, makine ya çok sayıda ağ bağlantısına
      +      sahiptir ya da makinede, günümüzde çoğu işletim sistemi tarafından
      +      desteklenen sanal arabirimler ve/veya çok sayıda port kullanılıyordur.
      +      (Sanal arabirimlerle ilgili ayrıntılar için sistem belgelerinize bakınız;
      +      bu konu genellikle IP rumuzları (ip aliases) olarak geçer ve ayarlamak
      +      için genellikle "ifconfig" komutu kullanılır.)</p>
      +
      +    <p>Apache HTTP Sunucusu terminolojisinde, tek bir IP adresinin çok sayıda
      +      TCP portuyla kullanımı IP'ye dayalı sanal konak desteği olarak
      +      bilinir.</p>
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="howto" id="howto">Apache nasıl ayarlanır?</a></h2>
      @@ -61,8 +82,8 @@
             <li>Güvenli bölgeler oluşturmanız gerekiyordur. Örneğin, şirket2’deki hiç
               kimse dosya sistemi üzerinden şirket1’e ait verileri okuyamasın, sadece
               herkes gibi tarayıcı kullanarak okuyabilsin istenebilir.  Bu durumda,
      -        <code class="directive"><a href="../mod/mpm_common.html#user">User</a></code>,
      -        <code class="directive"><a href="../mod/mpm_common.html#group">Group</a></code>,
      +        <code class="directive"><a href="../mod/mod_unixd.html#user">User</a></code>,
      +        <code class="directive"><a href="../mod/mod_unixd.html#group">Group</a></code>,
               <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code> ve
               <code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code> yönergeleri farklı
               değerlerle yapılandırılmış iki ayrı süreç çalıştırmanız gerekir.</li>
      @@ -96,9 +117,8 @@
             (veya sanal konak) için <code class="directive"><a href="../mod/mpm_common.html#listen">Listen</a></code>
             yönergesi kullanılır. Örnek:</p>
       
      -    <div class="example"><p><code>
      -    Listen www.birkobi.dom:80
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">Listen 192.0.2.100:80</pre>
      +
       
           <p>Burada konak ismi yerine IP adresi kullanmanız önerilir (ayrıntılar için
             <a href="../dns-caveats.html">DNS ile ilgili konular</a> belgesine
      @@ -115,37 +135,37 @@
             içeren ayrı birer <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümü
             oluşturulur. Örnek:</p>
       
      -    <div class="example"><p><code>
      -    &lt;VirtualHost 192.168.1.10:80&gt;
      -    <span class="indent">
      -      ServerAdmin bilgi@posta.birkobi.dom<br />
      -      DocumentRoot /gruplar/birkobi/belgeler<br />
      -      ServerName www.birkobi.dom<br />
      -      ErrorLog /gruplar/birkobi/günlükler/hatalar.log<br />
      -      TransferLog /gruplar/birkobi/günlükler/erisim.log
      -    </span>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.20:80&gt;
      -    <span class="indent">
      -      ServerAdmin bilgi@posta.digerkobi.dom<br />
      -      DocumentRoot /gruplar/digerkobi/belgeler<br />
      -      ServerName www.digerkobi.dom<br />
      -      ErrorLog /gruplar/digerkobi/günlükler/hatalar.log<br />
      -      TransferLog /gruplar/digerkobi/günlükler/erisim.log
      -    </span>
      -    &lt;/VirtualHost&gt;
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost 192.168.1.10:80&gt;
      +    ServerAdmin bilgi@example.com
      +    DocumentRoot "/siteler/belgeler/ecom"
      +    ServerName example.com
      +    ErrorLog "/siteler/gunlukler/ecom/hatalar.log"
      +    CustomLog "/siteler/gunlukler/ecom/erisim.log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20:80&gt;
      +    ServerAdmin bilgi@example.org
      +    DocumentRoot "/siteler/belgeler/eorg"
      +    ServerName example.org
      +    ErrorLog "/siteler/gunlukler/eorg/hatalar.log"
      +    CustomLog "/siteler/gunlukler/eorg/erisim.log" combined
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>&lt;VirtualHost&gt; yönergesinde konak ismi yerine
              IP adresi kullanmanız önerilir (ayrıntılar için
              <a href="../dns-caveats.html">DNS ile ilgili konular</a>
              belgesine bakınız).</p>
       
      +    <p>Belli bir IP adresi veya port kullanımı bunların joker eşdeğerlerine
      +      göre daha yüksek öncelik sağlar ve eşleşen bir sanal konak da genel
      +      sunucuya göre öncelik alır.</p>
      +
           <p>Süreç oluşturmayı denetleyen yönergeler ve bir kaç başka yönerge dışında
      -      hemen hemen tüm yapılandırma yönergeleri <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümleri içinde kullanılabilir. Bir
      -      yönergenin <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümlerinde
      -      kullanılıp kullanılmayacağını öğrenmek için <a href="../mod/directives.html">yönerge dizinini</a> kullanarak yönergenin <a href="../mod/directive-dict.html#Context">Bağlam</a>’ına bakınız.</p>
      +      hemen hemen tüm yapılandırma yönergeleri <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümleri içinde kullanılabilir.
      +      Bir yönergenin <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code>
      +      bölümlerinde kullanılıp kullanılmayacağını öğrenmek için <a href="../mod/directives.html">yönerge dizinini</a> kullanarak yönergenin
      +      <a href="../mod/directive-dict.html#Context">Bağlam</a>’ına bakınız.</p>
       
           <p><a href="../suexec.html">suEXEC sarmalayıcısı</a> kullanıldığı takdirde
             <code class="directive"><a href="../mod/mod_suexec.html#suexecusergroup">SuexecUserGroup</a></code> yönergesi de
      @@ -154,9 +174,9 @@
       
           <p><em>GÜVENLİK:</em>Günlük dosyalarının yazılacağı yeri belirlerken,
             Apache’yi başlatan kullanıcıdan başka kimsenin yazamayacağı bir yerin
      -      seçilmesi bazı güvenlik risklerini ortadan kaldırmak bakımından önemlidir.
      -      Ayrıntılar için <a href="../misc/security_tips.html">güvenlik ipuçları</a>
      -      belgesine bakınız.</p>
      +      seçilmesi bazı güvenlik risklerini ortadan kaldırmak bakımından
      +      önemlidir. Ayrıntılar için <a href="../misc/security_tips.html">güvenlik
      +      ipuçları</a> belgesine bakınız.</p>
       </div></div>
       <div class="bottomlang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/ip-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -164,7 +184,28 @@
       <a href="../ja/vhosts/ip-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/ip-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/ip-based.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/ip-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/ip-based.xml b/docs/manual/vhosts/ip-based.xml
      index 5a5571a8d41..c792cab868a 100644
      --- a/docs/manual/vhosts/ip-based.xml
      +++ b/docs/manual/vhosts/ip-based.xml
      @@ -71,8 +71,8 @@ Virtual Hosts</a> to help you decide.  </p>
             does not want anyone at company2 to be able to read their
             data except via the web. In this case you would need two
             daemons, each running with different <directive
      -      module="mpm_common">User</directive>, <directive
      -      module="mpm_common">Group</directive>, <directive
      +      module="mod_unixd">User</directive>, <directive
      +      module="mod_unixd">Group</directive>, <directive
             module="mpm_common">Listen</directive>, and <directive
             module="core">ServerRoot</directive> settings.</li>
       
      @@ -108,9 +108,9 @@ Virtual Hosts</a> to help you decide.  </p>
           configuration file to select which IP address (or virtual host)
           that daemon services. e.g.</p>
       
      -    <example>
      +    <highlight language="config">
           Listen 192.0.2.100:80
      -    </example>
      +    </highlight>
       
           <p>It is recommended that you use an IP address instead of a
           hostname (see <a href="../dns-caveats.html">DNS caveats</a>).</p>
      @@ -133,23 +133,23 @@ Virtual Hosts</a> to help you decide.  </p>
           configuration directives to different values for each virtual
           host. e.g.</p>
       
      -    <example>
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    ServerAdmin webmaster@www1.example.com<br />
      -    DocumentRoot /www/vhosts/www1<br />
      -    ServerName www1.example.com<br />
      -    ErrorLog /www/logs/www1/error_log<br />
      -    CustomLog /www/logs/www1/access_log combined<br />
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    ServerAdmin webmaster@www2.example.org<br />
      -    DocumentRoot /www/vhosts/www2<br />
      -    ServerName www2.example.org<br />
      -    ErrorLog /www/logs/www2/error_log<br />
      -    CustomLog /www/logs/www2/access_log combined<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerAdmin webmaster@www1.example.com
      +    DocumentRoot "/www/vhosts/www1"
      +    ServerName www1.example.com
      +    ErrorLog "/www/logs/www1/error_log"
      +    CustomLog "/www/logs/www1/access_log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    ServerAdmin webmaster@www2.example.org
      +    DocumentRoot "/www/vhosts/www2"
      +    ServerName www2.example.org
      +    ErrorLog "/www/logs/www2/error_log"
      +    CustomLog "/www/logs/www2/access_log" combined
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>It is recommended that you use an IP address instead of a
           hostname in the &lt;VirtualHost&gt; directive
      diff --git a/docs/manual/vhosts/ip-based.xml.fr b/docs/manual/vhosts/ip-based.xml.fr
      index 0d77fc24c67..578989aaca0 100644
      --- a/docs/manual/vhosts/ip-based.xml.fr
      +++ b/docs/manual/vhosts/ip-based.xml.fr
      @@ -1,7 +1,7 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
      -<!-- English Revision: 1174747 -->
      +<!-- English Revision: 1673563 -->
       <!-- French translation by alain B, review by Vincent Deffontaines -->
       <!-- Updated by Lucien Gentis -->
       
      @@ -30,64 +30,64 @@
       <a href="name-based.html">Support Apache des serveurs virtuels par nom</a>
       </seealso>
       
      -<section id="requirements"><title>Systme requis</title>
      +<section id="requirements"><title>Système requis</title>
       
           <p>Comme l'indique le terme <cite>par IP</cite>, le serveur
      -    <strong>doit disposer de diffrentes paires adresses IP/port pour chaque
      -    serveur virtuel par IP</strong>. La machine peut possder
      -    plusieurs connexions physiques au rseau, ou utiliser des
      -    interfaces virtuelles qui sont supportes par la plupart des
      -    systmes d'exploitation modernes (Consultez la documentation des
      -    systmes d'exploitation pour plus de dtails, notamment les "alias
      +    <strong>doit disposer de différentes paires adresses IP/port pour chaque
      +    serveur virtuel par IP</strong>. La machine peut posséder
      +    plusieurs connexions physiques au réseau, ou utiliser des
      +    interfaces virtuelles qui sont supportées par la plupart des
      +    systèmes d'exploitation modernes (Consultez la documentation des
      +    systèmes d'exploitation pour plus de détails, notamment les "alias
           IP" et la commande "ifconfig" pour les activer), et/ou utiliser
      -    plusieurs numros de port.</p>
      +    plusieurs numéros de port.</p>
       
           <p>Selon la terminologie du serveur HTTP Apache, l'utilisation d'une
      -    seule adresse IP avec plusieurs ports TCP s'apparente aussi  de
      -    l'hbergement virtuel bas sur IP.</p>
      +    seule adresse IP avec plusieurs ports TCP s'apparente aussi à de
      +    l'hébergement virtuel basé sur IP.</p>
       </section>
       
       <section id="howto"><title>Comment configurer Apache</title>
       
      -    <p>Il y a deux manires de configurer Apache pour le support de
      +    <p>Il y a deux manières de configurer Apache pour le support de
           multiples serveurs virtuels. Il suffit soit de faire tourner un
      -    processus rsident <program>httpd</program> pour chaque nom de
      -    domaine, soit de faire tourner un unique processus rsident qui
      -    gre tous les serveurs virtuels.</p>
      +    processus résident <program>httpd</program> pour chaque nom de
      +    domaine, soit de faire tourner un unique processus résident qui
      +    gère tous les serveurs virtuels.</p>
       
      -    <p>Utilisez des processus rsidents multiples lorsque&nbsp;:</p>
      +    <p>Utilisez des processus résidents multiples lorsque&nbsp;:</p>
       
           <ul>
      -      <li>il y a des problmes de rpartition de scurit, tels
      +      <li>il y a des problèmes de répartition de sécurité, tels
             qu'une entreprise1 ne souhaite que personne d'une entreprise2
      -      ne puisse lire ses donnes except via le Web. Dans ce cas,
      -      vous aurez besoin de deux processus rsidents, chacun fonctionnant
      -      avec des paramtres <directive module="mpm_common">User</directive>,
      -      <directive module="mpm_common">Group</directive>,
      +      ne puisse lire ses données excepté via le Web. Dans ce cas,
      +      vous aurez besoin de deux processus résidents, chacun fonctionnant
      +      avec des paramètres <directive module="mod_unixd">User</directive>,
      +      <directive module="mod_unixd">Group</directive>,
             <directive module="mpm_common">Listen</directive>, et
      -      <directive module="core">ServerRoot</directive> diffrents.</li>
      +      <directive module="core">ServerRoot</directive> différents.</li>
       
      -      <li>vous disposez suffisamment de mmoire et de
      +      <li>vous disposez suffisamment de mémoire et de
             <a href="../misc/descriptors.html">descripteurs de fichiers</a>
      -      pour l'coute de chaque alias IP de la machine. Il est seulement
      +      pour l'écoute de chaque alias IP de la machine. Il est seulement
             possible d'appliquer la directive
             <directive module="mpm_common">Listen</directive>, soit sur toutes
             les adresses avec le joker "*", soit uniquement sur des adresses
      -      spcifiques. Donc, si vous avez besoin d'couter une adresse
      +      spécifiques. Donc, si vous avez besoin d'écouter une adresse
             en particulier, vous devrez le faire pour l'ensemble des
             autres adresses (Bien qu'il soit plus simple de lancer un
      -      processus <program>httpd</program> pour couter N-1 adresses,
      +      processus <program>httpd</program> pour écouter N-1 adresses,
             et un autre pour l'adresse restante).</li>
           </ul>
       
      -    <p>Utilisez un unique processus rsident lorsque&nbsp;:</p>
      +    <p>Utilisez un unique processus résident lorsque&nbsp;:</p>
       
           <ul>
             <li>le partage de la configuration httpd entre les serveurs
             virtuels est acceptable.</li>
       
      -      <li>la machine assume dj une grande quantit de requtes, et
      -      que l'ajout de processus rsidents supplmentaires en affecterait
      +      <li>la machine assume déjà une grande quantité de requêtes, et
      +      que l'ajout de processus résidents supplémentaires en affecterait
             les performances.</li>
           </ul>
       
      @@ -95,88 +95,88 @@
       
       <section id="multiple"><title>Configuration de processus multiples</title>
       
      -    <p>Crez une installation indpendante du programme
      +    <p>Créez une installation indépendante du programme
           <program>httpd</program> pour chaque serveur virtuel. Pour
           chacune d'elle, utilisez la directive
           <directive module="mpm_common">Listen</directive> dans le fichier
      -    de configuration pour dfinir l'adresse IP (ou serveur virtuel)
      -    que le processus rsident doit grer. Par exemple&nbsp;:</p>
      +    de configuration pour définir l'adresse IP (ou serveur virtuel)
      +    que le processus résident doit gérer. Par exemple&nbsp;:</p>
       
      -    <example>
      +    <highlight language="config">
           Listen 192.0.2.100:80
      -    </example>
      +    </highlight>
       
      -    <p>Il est recommand d'utiliser une adresse IP plutt qu'un nom
      -    de domaine (consultez <a href="../dns-caveats.html">Problmes DNS
      +    <p>Il est recommandé d'utiliser une adresse IP plutôt qu'un nom
      +    de domaine (consultez <a href="../dns-caveats.html">Problèmes DNS
           avec Apache</a>).</p>
       
       </section>
       
       <section id="single"><title>Configuration d'un unique processus
      -rsident pour des serveurs virtuels</title>
      +résident pour des serveurs virtuels</title>
       
      -    <p>Dans ce cas, un unique processus httpd va grer les requtes
      +    <p>Dans ce cas, un unique processus httpd va gérer les requêtes
           pour le serveur principal et tous les serveurs virtuels. Dans le
           fichier de configuration, la directive
      -    <directive module="core">VirtualHost</directive> va servir 
      -    dfinir les autres directives
      +    <directive module="core">VirtualHost</directive> va servir à
      +    définir les autres directives
           <directive module="core">ServerAdmin</directive>,
           <directive module="core">ServerName</directive>,
           <directive module="core">DocumentRoot</directive>,
           <directive module="core">ErrorLog</directive> et
           <directive module="mod_log_config">TransferLog</directive> ou
           <directive module="mod_log_config">CustomLog</directive> avec des
      -    valeurs diffrentes pour chaque serveur virtuel. Par exemple&nbsp;:</p>
      -
      -    <example>
      -    &lt;VirtualHost 172.20.30.40:80&gt;<br />
      -    ServerAdmin webmaster@www1.example.com<br />
      -    DocumentRoot /www/vhosts/www1<br />
      -    ServerName www1.example.com<br />
      -    ErrorLog /www/logs/www1/error_log<br />
      -    CustomLog /www/logs/www1/access_log combined<br />
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 172.20.30.50:80&gt;<br />
      -    ServerAdmin webmaster@www2.example.org<br />
      -    DocumentRoot /www/vhosts/www2<br />
      -    ServerName www2.example.org<br />
      -    ErrorLog /www/logs/www2/error_log<br />
      -    CustomLog /www/logs/www2/access_log combined<br />
      -    &lt;/VirtualHost&gt;
      -    </example>
      -
      -    <p>Il est recommand d'utiliser une adresse IP plutt qu'un nom
      -    de domaine comme argument  la directive &lt;VirtualHost&gt;
      -     (consultez <a href="../dns-caveats.html">Problmes DNS
      +    valeurs différentes pour chaque serveur virtuel. Par exemple&nbsp;:</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost 172.20.30.40:80&gt;
      +    ServerAdmin webmaster@www1.example.com
      +    DocumentRoot "/www/vhosts/www1"
      +    ServerName www1.example.com
      +    ErrorLog "/www/logs/www1/error_log"
      +    CustomLog "/www/logs/www1/access_log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 172.20.30.50:80&gt;
      +    ServerAdmin webmaster@www2.example.org
      +    DocumentRoot "/www/vhosts/www2"
      +    ServerName www2.example.org
      +    ErrorLog "/www/logs/www2/error_log"
      +    CustomLog "/www/logs/www2/access_log" combined
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Il est recommandé d'utiliser une adresse IP plutôt qu'un nom
      +    de domaine comme argument à la directive &lt;VirtualHost&gt;
      +     (consultez <a href="../dns-caveats.html">Problèmes DNS
           avec Apache</a>).</p>
       
           <p>Presque <strong>toutes</strong> les directives de configuration
      -    peuvent tre employes dans une directive VirtualHost,  l'exception
      -    des directives qui contrlent la cration du processus et de
      -    quelques autres. Pour connatre celles utilisables dans une
      -    directive VirtualHost, vrifiez leur
      +    peuvent être employées dans une directive VirtualHost, à l'exception
      +    des directives qui contrôlent la création du processus et de
      +    quelques autres. Pour connaître celles utilisables dans une
      +    directive VirtualHost, vérifiez leur
           <a href="../mod/directive-dict.html#Context">Contexte</a> en utilisant
           l'<a href="../mod/directives.html">Index des directives</a>.</p>
       
       <!--
           <p>Les directives <directive module="mpm_common">User</directive> et
      -    <directive module="mpm_common">Group</directive> NE doivent PLUS tre
      -    utilises  l'intrieur d'une directive VirtualHost lors d'une
      -    <a href="../suexec.html">excution sous suEXEC</a>. Voir la directive
      -    <a href="../mod/mod_suexec.html/#suexecusergroup">SuexecUserGroup</a> dfinie
      +    <directive module="mpm_common">Group</directive> NE doivent PLUS être
      +    utilisées à l'intérieur d'une directive VirtualHost lors d'une
      +    <a href="../suexec.html">exécution sous suEXEC</a>. Voir la directive
      +    <a href="../mod/mod_suexec.html/#suexecusergroup">SuexecUserGroup</a> définie
           en remplacement depuis la version 2.0.</p>
        -->
      -    <p><directive module="mod_suexec">SuexecUserGroup</directive> peut tre
      -    utilises  l'intrieur d'une directive VirtualHost si l'excution se fait
      +    <p><directive module="mod_suexec">SuexecUserGroup</directive> peut être
      +    utilisées à l'intérieur d'une directive VirtualHost si l'exécution se fait
           sous suEXEC. (Voir <a href="../suexec.html">suEXEC</a>).</p>
       
      -    <p><em>SCURIT&nbsp;:</em> lorsque vous spcifiez o crire les
      +    <p><em>SÉCURITÉ&nbsp;:</em> lorsque vous spécifiez où écrire les
           fichiers journaux, soyez attentif aux risques si quelqu'un d'autre
      -    que celui qui a dmarr Apache dispose des droits d'criture
      +    que celui qui a démarré Apache dispose des droits d'écriture
           sur l'emplacement de ces fichiers. Consultez les
      -    <a href="../misc/security_tips.html">Conseils sur la scurit</a>
      -    pour plus de dtails.</p>
      +    <a href="../misc/security_tips.html">Conseils sur la sécurité</a>
      +    pour plus de détails.</p>
       
       </section>
       </manualpage>
      diff --git a/docs/manual/vhosts/ip-based.xml.ja b/docs/manual/vhosts/ip-based.xml.ja
      index 705f07c1cb5..10b70ffe805 100644
      --- a/docs/manual/vhosts/ip-based.xml.ja
      +++ b/docs/manual/vhosts/ip-based.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 659902:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/ip-based.xml.ko b/docs/manual/vhosts/ip-based.xml.ko
      index c7c2818a0ec..2b006c637de 100644
      --- a/docs/manual/vhosts/ip-based.xml.ko
      +++ b/docs/manual/vhosts/ip-based.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 105989:1174747 (outdated) -->
      +<!-- English Revision: 105989:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/ip-based.xml.meta b/docs/manual/vhosts/ip-based.xml.meta
      index 1d24a40e098..bcb6ed04a01 100644
      --- a/docs/manual/vhosts/ip-based.xml.meta
      +++ b/docs/manual/vhosts/ip-based.xml.meta
      @@ -11,6 +11,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/ip-based.xml.tr b/docs/manual/vhosts/ip-based.xml.tr
      index cc1d83972da..4849a9df817 100644
      --- a/docs/manual/vhosts/ip-based.xml.tr
      +++ b/docs/manual/vhosts/ip-based.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 752951:1174747 (outdated) -->
      +<!-- English Revision: 1673563 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -26,23 +26,39 @@
       
       <manualpage metafile="ip-based.xml.meta">
       <parentdocument href="./">Sanal Konaklar</parentdocument>
      -   <title>Apache’de IP’ye Dayalı Sanal Konak Desteği</title>
      +   <title>IP’ye Dayalı Sanal Konak Desteği</title>
       
       <seealso>
       <a href="name-based.html">İsme Dayalı Sanal Konak Desteği</a>
       </seealso>
       
      +<section id="explanation"><title>IP'ye dayalı sanal konak desteği nedir</title>
      +    <p>IP'ye dayalı sanal konak desteği, bir isteğin alındığı IP adresi ve
      +      porta bağlı olarak farklı yönergeleri uygulamak için bir yoldur. Özetle,
      +      farklı siteleri farklı portlardan ve arayüzlerden sunmakta
      +      kullanılır.</p>
      +
      +     <p>Çoğu durumda, <a href="name-based.html">isme dayalı sanal konaklar</a>
      +       birçok sanal konağın tek bir IP adresi/port çiftini paylaşmasını
      +       sağladığından daha kullanışlıdır. Neyi kullanacağınıza karar vermek için
      +       <a href="name-based.html#namevip">İsme dayalı ve IP’ye dayalı Sanal
      +       Konaklar</a> bölümüne bakınız.</p>
      +</section>
      +
       <section id="requirements"><title>Sistem gereksinimleri</title>
       
           <p><cite>IP’ye dayalı</cite> deyince, sunucunun <strong>her IP’ye dayalı
      -      sanal konak için ayrı bir IP adresi</strong>ne sahip olduğunu anlıyoruz.
      -      Bunun olması için, makine ya çok sayıda ağ bağlantısına sahiptir ya da
      -      makinede, günümüzde çoğu işletim sistemi tarafından desteklenen sanal
      -      arabirimler kullanılıyordur. (Sanal arabirimlerle ilgili ayrıntılar için
      -      sistem belgelerinize bakınız; bu konu genellikle IP rumuzları (ip aliases)
      -      olarak geçer ve ayarlamak için genellikle "ifconfig" komutu
      -      kullanılır.)</p>
      -
      +      sanal konak için ayrı bir IP adresi/port çifti</strong>ne sahip olduğunu
      +      anlıyoruz. Bunun olması için, makine ya çok sayıda ağ bağlantısına
      +      sahiptir ya da makinede, günümüzde çoğu işletim sistemi tarafından
      +      desteklenen sanal arabirimler ve/veya çok sayıda port kullanılıyordur.
      +      (Sanal arabirimlerle ilgili ayrıntılar için sistem belgelerinize bakınız;
      +      bu konu genellikle IP rumuzları (ip aliases) olarak geçer ve ayarlamak
      +      için genellikle "ifconfig" komutu kullanılır.)</p>
      +
      +    <p>Apache HTTP Sunucusu terminolojisinde, tek bir IP adresinin çok sayıda
      +      TCP portuyla kullanımı IP'ye dayalı sanal konak desteği olarak
      +      bilinir.</p>
       </section>
       
       <section id="howto"><title>Apache nasıl ayarlanır?</title>
      @@ -58,8 +74,8 @@
             <li>Güvenli bölgeler oluşturmanız gerekiyordur. Örneğin, şirket2’deki hiç
               kimse dosya sistemi üzerinden şirket1’e ait verileri okuyamasın, sadece
               herkes gibi tarayıcı kullanarak okuyabilsin istenebilir.  Bu durumda,
      -        <directive module="mpm_common">User</directive>,
      -        <directive module="mpm_common">Group</directive>,
      +        <directive module="mod_unixd">User</directive>,
      +        <directive module="mod_unixd">Group</directive>,
               <directive module="mpm_common">Listen</directive> ve
               <directive module="core">ServerRoot</directive> yönergeleri farklı
               değerlerle yapılandırılmış iki ayrı süreç çalıştırmanız gerekir.</li>
      @@ -93,9 +109,9 @@
             (veya sanal konak) için <directive module="mpm_common">Listen</directive>
             yönergesi kullanılır. Örnek:</p>
       
      -    <example>
      -    Listen www.birkobi.dom:80
      -    </example>
      +    <highlight language="config">
      +Listen 192.0.2.100:80
      +    </highlight>
       
           <p>Burada konak ismi yerine IP adresi kullanmanız önerilir (ayrıntılar için
             <a href="../dns-caveats.html">DNS ile ilgili konular</a> belgesine
      @@ -117,40 +133,40 @@
             içeren ayrı birer <directive module="core">VirtualHost</directive> bölümü
             oluşturulur. Örnek:</p>
       
      -    <example>
      -    &lt;VirtualHost 192.168.1.10:80&gt;
      -    <indent>
      -      ServerAdmin bilgi@posta.birkobi.dom<br />
      -      DocumentRoot /gruplar/birkobi/belgeler<br />
      -      ServerName www.birkobi.dom<br />
      -      ErrorLog /gruplar/birkobi/günlükler/hatalar.log<br />
      -      TransferLog /gruplar/birkobi/günlükler/erisim.log
      -    </indent>
      -    &lt;/VirtualHost&gt;<br />
      -    <br />
      -    &lt;VirtualHost 192.168.1.20:80&gt;
      -    <indent>
      -      ServerAdmin bilgi@posta.digerkobi.dom<br />
      -      DocumentRoot /gruplar/digerkobi/belgeler<br />
      -      ServerName www.digerkobi.dom<br />
      -      ErrorLog /gruplar/digerkobi/günlükler/hatalar.log<br />
      -      TransferLog /gruplar/digerkobi/günlükler/erisim.log
      -    </indent>
      -    &lt;/VirtualHost&gt;
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost 192.168.1.10:80&gt;
      +    ServerAdmin bilgi@example.com
      +    DocumentRoot "/siteler/belgeler/ecom"
      +    ServerName example.com
      +    ErrorLog "/siteler/gunlukler/ecom/hatalar.log"
      +    CustomLog "/siteler/gunlukler/ecom/erisim.log" combined
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 192.168.1.20:80&gt;
      +    ServerAdmin bilgi@example.org
      +    DocumentRoot "/siteler/belgeler/eorg"
      +    ServerName example.org
      +    ErrorLog "/siteler/gunlukler/eorg/hatalar.log"
      +    CustomLog "/siteler/gunlukler/eorg/erisim.log" combined
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>&lt;VirtualHost&gt; yönergesinde konak ismi yerine
              IP adresi kullanmanız önerilir (ayrıntılar için
              <a href="../dns-caveats.html">DNS ile ilgili konular</a>
              belgesine bakınız).</p>
       
      +    <p>Belli bir IP adresi veya port kullanımı bunların joker eşdeğerlerine
      +      göre daha yüksek öncelik sağlar ve eşleşen bir sanal konak da genel
      +      sunucuya göre öncelik alır.</p>
      +
           <p>Süreç oluşturmayı denetleyen yönergeler ve bir kaç başka yönerge dışında
             hemen hemen tüm yapılandırma yönergeleri <directive
      -      module="core">VirtualHost</directive> bölümleri içinde kullanılabilir. Bir
      -      yönergenin <directive module="core">VirtualHost</directive> bölümlerinde
      -      kullanılıp kullanılmayacağını öğrenmek için <a
      -      href="../mod/directives.html">yönerge dizinini</a> kullanarak yönergenin <a
      -      href="../mod/directive-dict.html#Context">Bağlam</a>’ına bakınız.</p>
      +      module="core">VirtualHost</directive> bölümleri içinde kullanılabilir.
      +      Bir yönergenin <directive module="core">VirtualHost</directive>
      +      bölümlerinde kullanılıp kullanılmayacağını öğrenmek için <a
      +      href="../mod/directives.html">yönerge dizinini</a> kullanarak yönergenin
      +      <a href="../mod/directive-dict.html#Context">Bağlam</a>’ına bakınız.</p>
       
           <p><a href="../suexec.html">suEXEC sarmalayıcısı</a> kullanıldığı takdirde
             <directive module="mod_suexec">SuexecUserGroup</directive> yönergesi de
      @@ -159,8 +175,8 @@
       
           <p><em>GÜVENLİK:</em>Günlük dosyalarının yazılacağı yeri belirlerken,
             Apache’yi başlatan kullanıcıdan başka kimsenin yazamayacağı bir yerin
      -      seçilmesi bazı güvenlik risklerini ortadan kaldırmak bakımından önemlidir.
      -      Ayrıntılar için <a href="../misc/security_tips.html">güvenlik ipuçları</a>
      -      belgesine bakınız.</p>
      +      seçilmesi bazı güvenlik risklerini ortadan kaldırmak bakımından
      +      önemlidir. Ayrıntılar için <a href="../misc/security_tips.html">güvenlik
      +      ipuçları</a> belgesine bakınız.</p>
       </section>
       </manualpage>
      diff --git a/docs/manual/vhosts/mass.html.en b/docs/manual/vhosts/mass.html.en
      index 59c30469d7f..127226d55f0 100644
      --- a/docs/manual/vhosts/mass.html.en
      +++ b/docs/manual/vhosts/mass.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Dynamically Configured Mass Virtual Hosting - Apache HTTP Server</title>
      +<title>Dynamically Configured Mass Virtual Hosting - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Dynamically Configured Mass Virtual Hosting</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Dynamically Configured Mass Virtual Hosting</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../en/vhosts/mass.html" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -42,7 +47,7 @@ mod_vhost_alias</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#ipbased">More Efficient IP-Based Virtual Hosting</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#rewrite">Mass virtual hosts with
       mod_rewrite</a></li>
      -</ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="motivation" id="motivation">Motivation</a></h2>
      @@ -52,25 +57,24 @@ mod_rewrite</a></li>
           <code>&lt;VirtualHost&gt;</code> sections that are
           substantially the same, for example:</p>
       
      -<div class="example"><pre>
      -&lt;VirtualHost 111.22.33.44&gt;
      +<pre class="prettyprint lang-config">&lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-1.example.com
      -    DocumentRoot        /www/hosts/customer-1.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-1.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-1.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-1.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-2.example.com
      -    DocumentRoot        /www/hosts/customer-2.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-2.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-2.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-2.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-N.example.com
      -    DocumentRoot        /www/hosts/customer-N.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
      -&lt;/VirtualHost&gt;
      -</pre></div>
      +    DocumentRoot        "/www/hosts/customer-N.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-N.example.com/cgi-bin"
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>We wish to replace these multiple
           <code>&lt;VirtualHost&gt;</code> blocks with a mechanism
      @@ -154,19 +158,18 @@ mod_vhost_alias</a></h2>
           virtual host arrangement outlined in the <a href="#motivation">Motivation</a> section above
           using <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code>.</p>
       
      -<div class="example"><p><code>
      -# get the server name from the Host: header<br />
      -UseCanonicalName Off<br />
      -<br />
      -# this log format can be split per-virtual-host based on the first field<br />
      -# using the split-logfile utility.<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include the server name in the filenames used to satisfy requests<br />
      -VirtualDocumentRoot /www/hosts/%0/docs<br />
      -VirtualScriptAlias  /www/hosts/%0/cgi-bin
      -</code></p></div>
      +<pre class="prettyprint lang-config"># get the server name from the Host: header
      +UseCanonicalName Off
      +
      +# this log format can be split per-virtual-host based on the first field
      +# using the split-logfile utility.
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# include the server name in the filenames used to satisfy requests
      +VirtualDocumentRoot "/www/hosts/%0/docs"
      +VirtualScriptAlias  "/www/hosts/%0/cgi-bin"</pre>
      +
       
           <p>This configuration can be changed into an IP-based virtual
           hosting solution by just turning <code>UseCanonicalName
      @@ -191,18 +194,17 @@ examples.</p>
           <code>/home/user/www</code>. It uses a single <code>cgi-bin</code>
           directory instead of one per virtual host.</p>
       
      -<div class="example"><p><code>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include part of the server name in the filenames<br />
      -VirtualDocumentRoot /home/%2/www<br />
      -<br />
      -# single cgi-bin directory<br />
      -ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
      -</code></p></div>
      +<pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
      +
      +# include part of the server name in the filenames
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# single cgi-bin directory
      +ScriptAlias  "/cgi-bin/"  "/www/std-cgi/"</pre>
      +
       
           <p>There are examples of more complicated
           <code>VirtualDocumentRoot</code> settings in the
      @@ -222,47 +224,38 @@ ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
           <code>&lt;VirtualHost&gt;</code> configuration sections, as shown
           below.</p>
       
      -<div class="example"><p><code>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /www/commercial&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /www/homepages&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName www.commercial.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.commercial vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/commercial/%0/docs<br />
      -    VirtualScriptAlias  /www/commercial/%0/cgi-bin<br />
      -</span>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<span class="indent">
      -    ServerName www.homepages.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.homepages vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/homepages/%0/docs<br />
      -    ScriptAlias         /cgi-bin/ /www/std-cgi/<br />
      -</span>
      +<pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/www/commercial"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/www/homepages"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName www.commercial.example.com
      +    
      +    CustomLog "logs/access_log.commercial" vcommon
      +    
      +    VirtualDocumentRoot "/www/commercial/%0/docs"
      +    VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
       &lt;/VirtualHost&gt;
      -</code></p></div>
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName www.homepages.example.com
      +    
      +    CustomLog "logs/access_log.homepages" vcommon
      +    
      +    VirtualDocumentRoot "/www/homepages/%0/docs"
      +    ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
      +&lt;/VirtualHost&gt;</pre>
      +
       
       <div class="note">
           <h3>Note</h3>
      @@ -287,18 +280,17 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
           negating the need for a DNS lookup. Logging will also have to be adjusted
           to fit this system.</p>
       
      -<div class="example"><p><code>
      -# get the server name from the reverse DNS of the IP address<br />
      -UseCanonicalName DNS<br />
      -<br />
      -# include the IP address in the logs so they may be split<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include the IP address in the filenames<br />
      -VirtualDocumentRootIP /www/hosts/%0/docs<br />
      -VirtualScriptAliasIP  /www/hosts/%0/cgi-bin<br />
      -</code></p></div>
      +<pre class="prettyprint lang-config"># get the server name from the reverse DNS of the IP address
      +UseCanonicalName DNS
      +
      +# include the IP address in the logs so they may be split
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# include the IP address in the filenames
      +VirtualDocumentRootIP "/www/hosts/%0/docs"
      +VirtualScriptAliasIP  "/www/hosts/%0/cgi-bin"</pre>
      +
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -318,7 +310,28 @@ documentation</a>.</p>
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Franais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/mass.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/mass.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/mass.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/mass.html.fr b/docs/manual/vhosts/mass.html.fr
      index 70ec1cbe5a6..187c42525a3 100644
      --- a/docs/manual/vhosts/mass.html.fr
      +++ b/docs/manual/vhosts/mass.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Hbergement virtuel de masse configur dynamiquement - Serveur Apache HTTP</title>
      +<title>Hbergement virtuel de masse configur dynamiquement - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Hbergement virtuel</a></div><div id="page-content"><div id="preamble"><h1>Hbergement virtuel de masse configur dynamiquement</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Hbergement virtuel</a></div><div id="page-content"><div id="preamble"><h1>Hbergement virtuel de masse configur dynamiquement</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../en/vhosts/mass.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/mass.html" title="Franais">&nbsp;fr&nbsp;</a> |
      @@ -44,7 +49,7 @@ d'h
       efficace</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#rewrite">Hbergement virtuel de masse avec
       mod_rewrite</a></li>
      -</ul></div>
      +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="motivation" id="motivation">A qui ce document est-il destin ?</a></h2>
      @@ -54,25 +59,24 @@ mod_rewrite</a></li>
           <code>&lt;VirtualHost&gt;</code> trs semblables,
           dans le style :</p>
       
      -<div class="example"><pre>
      -&lt;VirtualHost 111.22.33.44&gt;
      +<pre class="prettyprint lang-config">&lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-1.example.com
      -    DocumentRoot        /www/hosts/customer-1.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-1.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-1.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-1.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-2.example.com
      -    DocumentRoot        /www/hosts/customer-2.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-2.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-2.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-2.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-N.example.com
      -    DocumentRoot        /www/hosts/customer-N.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
      -&lt;/VirtualHost&gt;
      -</pre></div>
      +    DocumentRoot        "/www/hosts/customer-N.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-N.example.com/cgi-bin"
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>Nous voulons remplacer toutes les configurations
           <code>&lt;VirtualHost&gt;</code> par un mcanisme qui les gnre
      @@ -161,20 +165,19 @@ dynamique avec mod_vhost_alias</a></h2>
           l'hbergement virtuel dcrit dans la section <a href="#motivation"> qui ce document est-il destin ?</a> ci-dessus
           en utilisant <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code>.</p>
       
      -<div class="example"><p><code>
      -# extrait le nom du serveur de l'en-tte Host:<br />
      -UseCanonicalName Off<br />
      -<br />
      +<pre class="prettyprint lang-config"># extrait le nom du serveur de l'en-tte Host:
      +UseCanonicalName Off
      +
       # ce format de journal peut tre clat en journaux par serveur virtuel
      -#  l'aide du premier champ via l'utilitaire split-logfile<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      +#  l'aide du premier champ via l'utilitaire split-logfile
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
       # inclut le nom du serveur dans les noms de fichiers ressources
      -# ncessaires aux traitements des requtes<br />
      -VirtualDocumentRoot /www/hosts/%0/docs<br />
      -VirtualScriptAlias  /www/hosts/%0/cgi-bin
      -</code></p></div>
      +# ncessaires aux traitements des requtes
      +VirtualDocumentRoot "/www/hosts/%0/docs"
      +VirtualScriptAlias  "/www/hosts/%0/cgi-bin"</pre>
      +
       
           <p>Pour changer cette configuration en solution de serveur virtuel
           par IP, il suffit de remplacer <code>UseCanonicalName
      @@ -201,18 +204,17 @@ simplifi
           <code>cgi-bin</code> suffit pour l'ensemble des
           serveurs virtuels.</p>
       
      -<div class="example"><p><code>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# insertion d'une partie du nom du serveur dans les noms de fichiers<br />
      -VirtualDocumentRoot /home/%2/www<br />
      -<br />
      -# rpertoire cgi-bin unique<br />
      -ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
      -</code></p></div>
      +<pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
      +
      +# insertion d'une partie du nom du serveur dans les noms de fichiers
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# rpertoire cgi-bin unique
      +ScriptAlias  "/cgi-bin/"  "/www/std-cgi/"</pre>
      +
       
           <p>Vous trouverez des exemples plus labors d'utilisation de la
           directive <code>VirtualDocumentRoot</code> dans la documentation du
      @@ -233,47 +235,38 @@ d'h
           <code>&lt;VirtualHost&gt;</code> conventionnelles, comme indiqu
           plus loin.</p>
       
      -<div class="example"><p><code>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /www/commercial&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /www/homepages&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName www.commercial.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.commercial vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/commercial/%0/docs<br />
      -    VirtualScriptAlias  /www/commercial/%0/cgi-bin<br />
      -</span>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<span class="indent">
      -    ServerName www.homepages.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.homepages vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/homepages/%0/docs<br />
      -    ScriptAlias         /cgi-bin/ /www/std-cgi/<br />
      -</span>
      +<pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/www/commercial"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/www/homepages"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName www.commercial.example.com
      +    
      +    CustomLog "logs/access_log.commercial" vcommon
      +    
      +    VirtualDocumentRoot "/www/commercial/%0/docs"
      +    VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
       &lt;/VirtualHost&gt;
      -</code></p></div>
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName www.homepages.example.com
      +    
      +    CustomLog "logs/access_log.homepages" vcommon
      +    
      +    VirtualDocumentRoot "/www/homepages/%0/docs"
      +    ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
      +&lt;/VirtualHost&gt;</pre>
      +
       
       <div class="note">
       	<h3>Note</h3>
      @@ -299,26 +292,25 @@ efficace</a></h2>
           la-mme la ncessit d'une recherche DNS. La journalisation doit
           aussi tre adapte pour fonctionner sur un tel systme.</p>
       
      -<div class="example"><p><code>
      -# obtention du nom du serveur par recherche DNS inverse
      -# sur l'adresse IP<br />
      -UseCanonicalName DNS<br />
      -<br />
      +<pre class="prettyprint lang-config"># obtention du nom du serveur par recherche DNS inverse
      +# sur l'adresse IP
      +UseCanonicalName DNS
      +
       # insertion de l'adresse IP dans les journaux afin de pouvoir les
      -# clater<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# insertion de l'adresse IP dans les noms de fichiers<br />
      -VirtualDocumentRootIP /www/hosts/%0/docs<br />
      -VirtualScriptAliasIP  /www/hosts/%0/cgi-bin<br />
      -</code></p></div>
      +# clater
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# insertion de l'adresse IP dans les noms de fichiers
      +VirtualDocumentRootIP "/www/hosts/%0/docs"
      +VirtualScriptAliasIP  "/www/hosts/%0/cgi-bin"</pre>
      +
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="rewrite" id="rewrite">Hbergement virtuel de masse avec
       mod_rewrite</a></h2>
      - 
      +
       <p>
       L'hbergement virtuel de masse peut aussi tre effectu en utilisant
       <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>, soit  l'aide de simples directives <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>, soit en utilisant des
      @@ -333,7 +325,28 @@ techniques sont d
       <a href="../fr/vhosts/mass.html" title="Franais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/mass.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/mass.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/mass.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/mass.html.ko.euc-kr b/docs/manual/vhosts/mass.html.ko.euc-kr
      index 2cf034d19ab..2519d952ead 100644
      --- a/docs/manual/vhosts/mass.html.ko.euc-kr
      +++ b/docs/manual/vhosts/mass.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>뷮 ȣƮ  ϱ - Apache HTTP Server</title>
      +<title>뷮 ȣƮ  ϱ - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>뷮 ȣƮ  ϱ</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1>뷮 ȣƮ  ϱ</h1>
       <div class="toplang">
       <p><span> : </span><a href="../en/vhosts/mass.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
      @@ -46,7 +51,7 @@
            Ȩ ý</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#xtra-conf"> ȣƮ 
           ϱ</a></li>
      -</ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="motivation" id="motivation"></a></h2>
      @@ -421,7 +426,28 @@ RewriteRule  ^/(.*)$                      %1/cgi-bin/$1
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Fran&#231;ais">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/mass.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/mass.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/mass.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/mass.html.tr.utf8 b/docs/manual/vhosts/mass.html.tr.utf8
      index 1d838825f70..327dfa4d489 100644
      --- a/docs/manual/vhosts/mass.html.tr.utf8
      +++ b/docs/manual/vhosts/mass.html.tr.utf8
      @@ -1,46 +1,51 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma - Apache HTTP Sunucusu</title>
      +<title>Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>Devingen olarak Yapılandırılan Kitlesel Sanal Barındırma</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../en/vhosts/mass.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/mass.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/mass.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
       
           <p>Bu belgede sanal konakların sonu belirsiz bir şekilde artışı karşısında
      -      Apache httpd sunucusunun nasıl daha verimli kullanılacağı açıklanmıştır.
      +      Apache HTTP Sunucusunun nasıl daha verimli kullanılacağı açıklanmıştır.
      +      Devingen kitlesel konakları oluşturmak için <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>
      +      modülünün kullanımını açıklayan <a href="../rewrite/vhosts.html">ayrı bir
      +      belge</a> de mevcuttur.
           </p>
       
       </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#motivation">Amaç</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#overview">Genel Bakış</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#simple">Basit Devingen Sanal Konaklar</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#homepages">Sanal Kişisel Sayfalar Sistemi</a></li>
      +<li><img alt="" src="../images/down.gif" /> <a href="#simple">mod_vhost_alias ile Kitlesel Sanal Konaklar</a></li>
      +<li><img alt="" src="../images/down.gif" /> <a href="#homepages">Basitleştirilmiş Kitlesel Sanal Konaklar</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#combinations">Aynı Sunucuda Kişisel ve Kurumsal Sanal Konaklar</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#ipbased">IP’ye dayalı sanal konakları daha verimli kılmak</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#simple.rewrite"><code>mod_rewrite</code> ile Kurumsal Müşteriler Sistemi</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#homepages.rewrite"><code>mod_rewrite</code> ile Kişisel Sayfalar Sistemi</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#xtra-conf">Sanal konaklar için ayrı bir yapılandırma dosyası kullanmak</a></li>
      -</ul></div>
      +<li><img alt="" src="../images/down.gif" /> <a href="#simple.rewrite"><code>mod_rewrite</code> ile Kitlesel Sanal Konaklar</a></li>
      +</ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="motivation" id="motivation">Amaç</a></h2>
      @@ -50,40 +55,34 @@
             <code>&lt;VirtualHost&gt;</code> bölümü içereceği zaman yapılacaklar ile
             ilgilidir.</p>
       
      -<div class="example"><p><code>
      -NameVirtualHost 111.22.33.44<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName                 musteri-1.dom<br />
      -    DocumentRoot        /siteler/musteri-1.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-1.dom/cgi-bin<br />
      -</span>
      -&lt;/VirtualHost&gt;<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName                 musteri-2.dom<br />
      -    DocumentRoot        /siteler/musteri-2.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-2.dom/cgi-bin<br />
      -</span>
      -&lt;/VirtualHost&gt;<br />
      -# blah blah blah<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName                 musteri-N.dom<br />
      -    DocumentRoot        /siteler/musteri-N.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-N.dom/cgi-bin<br />
      -</span>
      +<pre class="prettyprint lang-config">&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-1.example.com
      +    DocumentRoot        "/siteler/musteri-1/belgeler"
      +    ScriptAlias  "/cgi-bin/"  "/siteler/musteri-1/cgi-bin"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-2.example.com
      +    DocumentRoot        "/siteler/musteri-2/belgeler"
      +    ScriptAlias   "/cgi-bin/"   "/siteler/musteri-2/cgi-bin"
       &lt;/VirtualHost&gt;
      -</code></p></div>
       
      -    <p>Ana fikir, tüm durağan <code>&lt;VirtualHost&gt;</code>
      -      yapılandırmalarını devingen olarak çalışan tek bir
      -      <code>&lt;VirtualHost&gt;</code> bölümüyle değiştirmektir. Bunun elbette
      -      bazı getirileri olacaktır:</p>
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-N.example.com
      +    DocumentRoot          "/siteler/musteri-N/belgeler"
      +    ScriptAlias   "/cgi-bin/"  "/siteler/musteri-N/cgi-bin"
      +&lt;/VirtualHost&gt;</pre>
      +
      +
      +    <p>İsteğimiz çok sayıda <code>&lt;VirtualHost&gt;</code> bölümünü devingen
      +      olarak çalışan tek bir <code>&lt;VirtualHost&gt;</code> bölümüyle
      +      değiştirmektir. Bunun elbette bazı getirileri olacaktır:</p>
       
           <ol>
             <li>Yapılandırma dosyanız küçüleceği için Apache daha çabuk
      -        başlatılabilecek ve daha az bellek harcayacaktır.</li>
      +        başlatılabilecek ve daha az bellek harcayacaktır. Muhtemelen daha da
      +        önemlisi, küçülmüş bir yapılandırmanın bakımı da kolaylaşacağı için
      +        hatalar da azalacaktır.</li>
       
             <li>Yeni sanal konakların eklenmesi, DNS’de yeni girdiler oluşturmak ve
               dosya sisteminde bununla ilgili dizinleri açmak dışında biraz daha
      @@ -92,11 +91,12 @@ NameVirtualHost 111.22.33.44<br />
           </ol>
       
           <p>Ana götürüsü ise her sanal konak için ayrı birer günlük dosyasına sahip
      -      olamayacak olmanızdır. Öte yandan, dosya tanıtıcılarının sınırlı olması
      -      nedeniyle bunu yapmayı zaten istemezsiniz. Günlük kayıtları için bir
      -      fifo veya bir boru hattı oluşturmak ve diğer uçta çalışan bir süreç
      -      vasıtasıyla günlükleri müşterilere paylaştırmak daha iyidir (ayrıca, bu,
      -      istatistikleri toplamanızı da kolaylaştırır).</p>
      +      olamayacak olmanızdır. Öte yandan, <a href="fd-limits.html">dosya
      +      tanıtıcılarının sınırlı olması</a>  nedeniyle bunu yapmayı zaten
      +      istemezsiniz. Günlük kayıtları için bir <a href="../logs.html#piped">fifo
      +      veya bir boru hattı</a> oluşturmak ve diğer uçta çalışan bir süreç
      +      vasıtasıyla günlükleri müşterilere paylaştırmak daha iyidir. Böyle bir
      +      işlemle ilgili bir örneği <a href="../programs/other.html#split-logfile">split-logfile</a> aracının belgesinde bulabilirsiniz.</p>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -105,16 +105,18 @@ NameVirtualHost 111.22.33.44<br />
           <p>Bir sanal konak iki bilgiye bakarak belirlenir: IP adresi ve HTTP
             isteğindeki <code>Host:</code> başlığının içeriği. Devingen sanal
             barındırma tekniği, isteği yerine getirmek için kullanılacak dosya
      -      yoluna bu bilgiyi kendiliğinden girmek esasına dayanır. Bu, Apache 2.0
      -      ile <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> kullanarak oldukça kolay
      -      yapılabileceği gibi <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> da kullanılabilir. Bu
      -      modüllerin her ikisi de öntanımlı olarak devre dışıdır. Bu tekniği
      -      kullanmak isterseniz  Apache’yi yeniden yapılandırıp derleyerek bu iki
      -      modülü etkin duruma getirmeniz gerekir.</p>
      -
      -    <p>Devingen sanal konağı normal bir sanal konak gibi göstermek için bazı
      -      şeyleri ’göstermelik’ olarak yapmak gerekir. Bunlardan en önemlisi,
      -      Apache tarafından göreli URL’lerden normal URL’leri ve benzerlerini
      +      yoluna bu bilgiyi kendiliğinden girmek esasına dayanır. Bu, Apache httpd
      +      ile <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> modülünü kullanarak oldukça kolay
      +      yapılabileceği gibi <a href="../rewrite/vhosts.html">mod_rewrite modülü
      +      de kullanılabilir</a>.</p>
      +
      +    <p>Bu modüllerin her ikisi de öntanımlı olarak devre dışıdır. Bu tekniği
      +      kullanmak isterseniz  Apache httpd'yi yeniden yapılandırıp derleyerek bu
      +      iki modülü etkin duruma getirmeniz gerekir.</p>
      +
      +    <p>Devingen sanal konağı normal bir sanal konak gibi göstermek için
      +      bazı bilgileri istekten saptamak gerekir. Bunlardan en önemlisi,
      +      httpd tarafından göreli URL’lerden normal URL’leri ve benzerlerini
             üretmek için kullanılan sunucu ismidir. Sunucu ismi
             <code>ServerName</code> yönergesi ile yapılandırılır ve CGI’ler
             tarafından <code>SERVER_NAME</code> ortam değişkeni üzerinden
      @@ -124,70 +126,77 @@ NameVirtualHost 111.22.33.44<br />
             DNS</code> belirtilmişse, sunucu ismi, sanal konağın IP adresinden
             tersine DNS sorgusu yapılarak elde edilir. Birincisi isme dayalı sanal
             konaklar tarafından ikincisi ise IP’ye dayalı sanal konaklar tarafından
      -      kullanılır. Eğer Apache, istekte <code>Host:</code> başlığının olmayışı
      +      kullanılır. Eğer httpd, istekte <code>Host:</code> başlığının olmayışı
             veya DNS sorgusunun başarısız olması sebebiyle sunucu ismini elde
             edemezse son çare olarak <code>ServerName</code> yönergesinde yazılı
             değeri kullanır.</p>
       
      -    <p>‘Göstermelik’ yapılan şeylerden biri de <code>DocumentRoot</code>
      +    <p>Saptanan bilgilerden biri de <code>DocumentRoot</code>
             yönergesi ile yapılandırılan belge kök dizini olup CGI’ler tarafından
             <code>DOCUMENT_ROOT</code> ortam değişkeni üzerinden kullanılır. Normal
             yapılandırmada <code class="module"><a href="../mod/core.html">core</a></code> modülü tarafından dosya isimlerini
             URI’lere eşlerken kullanılır. Fakat sunucu devingen sanal konakları
             kullanmak üzere yapılandırıldığında, eşleştirmeyi farklı yollardan yapan
      -      başka bir modül devreye girer (<code>mod_vhost_alias</code> veya
      -      <code>mod_rewrite</code>). <code>DOCUMENT_ROOT</code> ortam değişkenine
      -      değerini atamaktan sorumlu olan bu iki modülden biri kullanılmazsa CGI
      -      veya SSI belgeleri yanlış değerlerle üretilirler.</p>
      +      başka bir modül devreye girer (<code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> veya
      +      <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>). <code>DOCUMENT_ROOT</code> ortam
      +      değişkenine değerini atamaktan sorumlu olan bu iki modülden biri
      +      kullanılmazsa CGI veya SSI belgeleri yanlış değerlerle üretilirler.</p>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      -<h2><a name="simple" id="simple">Basit Devingen Sanal Konaklar</a></h2>
      +<h2><a name="simple" id="simple">mod_vhost_alias ile Kitlesel Sanal Konaklar</a></h2>
       
           <p>Yukarıda <a href="#motivation">Amaç</a> bölümünde özetlenen sanal konak
      -      düzenlemesinin <code>mod_vhost_alias</code> kullanarak daha soysal bir
      -      tarzda gerçekleştirilmiş halini içeren <code>httpd.conf</code> bölümü
      -      aşağıdadır.</p>
      -
      -<div class="example"><p><code>
      -# sunucu ismini Host: başlığından elde edelim<br />
      -UseCanonicalName Off<br />
      -<br />
      -# Bu günlükleme biçiminde ilk alana bakarak<br />
      -# sanal konak günlükleri ayrıştırılabilir<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# istekleri yerine getirmek için kullanılacak<br />
      -# dosya isimlerine sunucu ismini ekleyelim<br />
      -VirtualDocumentRoot /siteler/%0/belgeler<br />
      -VirtualScriptAlias  /siteler/%0/cgi-bin
      -</code></p></div>
      +      düzenlemesinin <code>mod_vhost_alias</code> kullanarak gerçekleştirilmiş
      +      halini içeren <code>httpd.conf</code> bölümü aşağıdadır.</p>
      +
      +<pre class="prettyprint lang-config"># sunucu ismini Host: başlığından elde edelim
      +UseCanonicalName Off
      +
      +# Bu günlükleme biçiminde split-logfile aracı kullanılarak
      +# sanal konak günlükleri ilk alana göre ayrıştırılabilir
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log vcommon"
      +
      +# istekleri yerine getirmek için kullanılacak
      +# dosya isimlerine sunucu ismini ekleyelim
      +VirtualDocumentRoot "/siteler/%0/belgeler"
      +VirtualScriptAlias  "/siteler/%0/cgi-bin"</pre>
      +
       
           <p>Bu yapılandırmayı IP’ye dayalı sanal konaklar için kullanmak isterseniz
             <code>UseCanonicalName Off</code> yerine <code>UseCanonicalName
             DNS</code> yazmanız yeterlidir. Böylece dosya ismine eklenecek konak
      -      ismi sanal konağın IP adresinden türetilir.</p>
      +      ismi sanal konağın IP adresinden türetilir. <code>%0</code> değişkeni,
      +      <code>Host:</code> başlığı ile belirlenen istekteki sunucu isminin
      +      ifadesidir.</p>
      +
      +    <p>Kullanım örnekleri için <code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code>modülünün
      +      belgesine bakınız.</p>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      -<h2><a name="homepages" id="homepages">Sanal Kişisel Sayfalar Sistemi</a></h2>
      -
      -    <p>Bu sistem, yukarıdaki yapılandırmanın bir ISS’nin kişisel sayfalar
      -      sunucusuna uyarlanmasından başka bir şey değildir. Biraz daha karmaşık
      -      bir yapılandırma ile dosya isimlerine <code>/home/kullanıcı/</code>
      -      dizinlerini ekleyebiliriz. Farklı olarak her sanal konak için bir tane
      -      değil hepsi için bir tane <code>cgi-bin</code> olacaktır.</p>
      -
      -<div class="example"><p><code>
      -# Son bölüm hariç yukarıdaki yapılandırma, burada...<br />
      -<br />
      -# sunucu ismine eklenecek dosya isimlerini oluşturalım<br />
      -VirtualDocumentRoot /siteler/%2/belgeler<br />
      -<br />
      -# ortak cgi-bin dizini<br />
      -ScriptAlias  /cgi-bin/  /siteler/std-cgi/<br />
      -</code></p></div>
      +<h2><a name="homepages" id="homepages">Basitleştirilmiş Kitlesel Sanal Konaklar</a></h2>
      +
      +    <p>Bu sistem, yukarıdaki yapılandırmanın bir ISS’nin sunucusuna
      +      uyarlanmasından başka bir şey değildir. <code>%2</code> değişkenini
      +      kullanarak, dosya isminde kullanmak üzere sunucu isminin alt dizgelerini
      +      seçebiliriz, böylece, örneğin <code>www.user.example.com</code> belgeleri
      +      <code>/home/user/www</code> dizininde bulunabilir. Farklı olarak her
      +      sanal konak için bir tane değil hepsi için bir tane <code>cgi-bin</code>
      +      olacaktır.</p>
      +
      +    <pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
      +
      +# sunucu ismini içerecek dosya isimlerini oluşturalım
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# ortak cgi-bin dizini
      +ScriptAlias  "/cgi-bin/"  "/siteler/std-cgi/"</pre>
      +
       
           <p><code class="module"><a href="../mod/mod_vhost_alias.html">mod_vhost_alias</a></code> belgesinde daha karmaşık
             <code>VirtualDocumentRoot</code> örnekleri vardır.</p>
      @@ -196,66 +205,58 @@ ScriptAlias  /cgi-bin/  /siteler/std-cgi/<br />
       <div class="section">
       <h2><a name="combinations" id="combinations">Aynı Sunucuda Kişisel ve Kurumsal Sanal Konaklar</a></h2>
       
      -    <p>Daha karmaşık ayarlamalar yaparak Apache’inin normal
      +    <p>Daha karmaşık ayarlamalar yaparak httpd’nin normal
             <code>&lt;VirtualHost&gt;</code> bölümlerini farklı kitlesel sanal konak
             yapılandırmaları için kullanabilirsiniz. Örneğin, bireysel
             müşterileriniz için bir IP adresiniz, kurumsal müşterileriniz için de
             başka bir IP adresiniz olsun. Her biri için ayrı ayrı sanal konaklar
             ayarlamak yerine aşağıdaki gibi bir yapılandırma kullanabilirsiniz:</p>
       
      -<div class="example"><p><code>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /siteler/kurumsal&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /siteler/bireysel&gt;<br />
      -<span class="indent">
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<span class="indent">
      -    ServerName kurumsal.iss.dom<br />
      -    <br />
      -    CustomLog logs/access_log.kurumsal vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /siteler/kurumsal/%0/belgeler<br />
      -    VirtualScriptAlias  /siteler/kurumsal/%0/cgi-bin<br />
      -</span>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<span class="indent">
      -    ServerName bireysel.iss.dom<br />
      -    <br />
      -    CustomLog logs/access_log.bireysel vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /siteler/bireysel/%0/belgeler<br />
      -    ScriptAlias         /cgi-bin/ /siteler/std-cgi/<br />
      -</span>
      +<pre class="prettyprint lang-config">UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/siteler/kurumsal"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/siteler/bireysel"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName kurumsal.example.com
      +
      +    CustomLog "logs/access_log.kurumsal" vcommon
      +
      +    VirtualDocumentRoot "/siteler/kurumsal/%0/belgeler"
      +    VirtualScriptAlias  "/siteler/kurumsal/%0/cgi-bin"
       &lt;/VirtualHost&gt;
      -</code></p></div>
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName bireysel.example.com
      +
      +    CustomLog "logs/access_log.bireysel" vcommon
      +
      +    VirtualDocumentRoot "/siteler/bireysel/%0/belgeler"
      +    ScriptAlias         "/cgi-bin/" "/siteler/std-cgi/"
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <div class="note"><h3>Bilginize</h3>
             <p>Eğer ilk <code>&lt;VirtualHost&gt;</code> bölümü bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesi içermezse ilgili IP
               için ters DNS sorgusu yapılır. Eğer sorgudan elde edilen isim
               sunucunun ismi değilse bu istenmeyen duruma bir çözüm olarak bir
      -        bilgilendirme bölümü (<code>ServerName isimsiz.iss.dom</code>)
      +        bilgilendirme bölümü (örn, <code>ServerName bilgi.example.com</code>)
               eklenebilir.</p>
           </div>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="ipbased" id="ipbased">IP’ye dayalı sanal konakları daha verimli kılmak</a></h2>
      +    
       
           <p><a href="#simple">İlk örnekte</a> IP’ye dayalı sanal konaklar için
             kullanılmak istenirse yapılandırmada neyin nasıl değiştirileceği
      @@ -265,146 +266,30 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
             adreslerine göre düzenlenebilir. Günlük kayıtları da IP adreslerine göre
             ayrıştırılacak şekilde ayarlanabilir.</p>
       
      -<div class="example"><p><code>
      -# Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim<br />
      -UseCanonicalName DNS<br />
      -<br />
      -# Günlük kayıtları IP adreslerine göre ayrıştırılabilsin<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# dosya isimleri IP adreslerini içersin<br />
      -VirtualDocumentRootIP /siteler/%0/belgeler<br />
      -VirtualScriptAliasIP  /siteler/%0/cgi-bin<br />
      -</code></p></div>
      +<pre class="prettyprint lang-config"># Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim
      +UseCanonicalName DNS
       
      -</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      -<div class="section">
      -<h2><a name="simple.rewrite" id="simple.rewrite"><code>mod_rewrite</code> ile Kurumsal Müşteriler Sistemi</a></h2>
      -
      -    <p>Buradaki <code>httpd.conf</code> bölümü de <a href="#simple">ilk
      -      örnekteki</a> gibi elde edilmiştir. İlk yarı, bazı değişiklikler dışında
      -      yukarıdaki örneğe çok benzer. Bu değişiklikler yapılandırmanın
      -      <code>mod_rewrite</code> bölümünün düzgün çalışması ve geriye doğru
      -      uyumluluk için gereklidir. İkinci yarı, asıl işi yapan
      -      <code>mod_rewrite</code> yapılandırmasını içerir.</p>
      -
      -    <p>Biraz uzmanlık gerektiren bazı kısımlar var: Öntanımlı olarak
      -      <code>mod_rewrite</code> diğer (<code>mod_alias</code>, vs. gibi) URI
      -      dönüşüm modüllerinden önce çalışır. Dolayısıyla bu modülleri kullanmak
      -      isterseniz, <code>mod_rewrite</code>’ı bunlara izin verecek şekilde
      -      yapılandırmalısınız. Ayrıca her devingen sanal konağa eşdeğer bir
      -      <code>ScriptAlias</code> yapmak için de biraz büyü yapmak gerekir.</p>
      -
      -<div class="example"><p><code>
      -# Sunucu ismini Host: başlığınıdan alalım.<br />
      -UseCanonicalName Off<br />
      -<br />
      -# Günlük dosyasından bilgileri ayıklayabilelim.<br />
      -LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -&lt;Directory /siteler/hosts&gt;<br />
      -<span class="indent">
      -    # ScriptAlias için yaptıklarımızla CGI betiklerini<br />
      -    # çalışmaya zorlayamayacağımızdan ExecCGI burada gerekli.<br />
      -    Options FollowSymLinks ExecCGI<br />
      -</span>
      -&lt;/Directory&gt;<br />
      -<br />
      -# İşin zor yanına geldik.<br />
      -<br />
      -RewriteEngine On<br />
      -<br />
      -# Host: başlığından elde edilen sunucu isminde harf<br />
      -# büyüklükleri çeşitli olabilir. Hepsini küçük harf yapalım.<br />
      -RewriteMap  lowercase  int:tolower<br />
      -<br />
      -## önce normal belgelerle anlaşalım:<br />
      -# Alias /icons/ çalışsın - diğer rumuzlar için yineleyelim<br />
      -RewriteCond  %{REQUEST_URI}  !^/icons/<br />
      -# CGI’ler de çalışsın.<br />
      -RewriteCond  %{REQUEST_URI}  !^/cgi-bin/<br />
      -# Biraz da büyü yapalım.<br />
      -RewriteRule  ^/(.*)$  /siteler/${lowercase:%{SERVER_NAME}}/belgeler/$1<br />
      -<br />
      -## Artık CGI’lerle anlaşabiliriz. - Bir eylemci isteyelim.<br />
      -RewriteCond  %{REQUEST_URI}  ^/cgi-bin/<br />
      -RewriteRule  ^/(.*)$  /siteler/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [H=cgi-script]<br />
      -<br />
      -# Bu kadar!
      -</code></p></div>
      +# Günlük kayıtları IP adreslerine göre ayrıştırılabilsin
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# dosya isimleri IP adreslerini içersin
      +VirtualDocumentRootIP "/siteler/%0/belgeler"
      +VirtualScriptAliasIP  "/siteler/%0/cgi-bin"</pre>
       
      -</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      -<div class="section">
      -<h2><a name="homepages.rewrite" id="homepages.rewrite"><code>mod_rewrite</code> ile Kişisel Sayfalar Sistemi</a></h2>
      -
      -    <p>Burada da <a href="#homepages">ikinci örnekte</a> yaptıklarımızı
      -      yapıyoruz.</p>
      -
      -<div class="example"><p><code>
      -RewriteEngine on<br />
      -<br />
      -RewriteMap   lowercase  int:tolower<br />
      -<br />
      -# CGI’ler çalışsın.<br />
      -RewriteCond  %{REQUEST_URI}  !^/cgi-bin/<br />
      -<br />
      -# konak ismi doğru mu bakalım yoksa RewriteRule çalışmaz.<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^www\.[a-z-]+\.isp\.dom$<br />
      -<br />
      -# URI’nin başına sanal konak ismini ekleyelim.<br />
      -# [C], bunu bitirdikten sonra, sonraki rewrite ile devam et demek.<br />
      -RewriteRule  ^(.+)  ${lowercase:%{SERVER_NAME}}$1  [C]<br />
      -<br />
      -# Artık asıl dosya ismini oluşturabiliriz.<br />
      -RewriteRule  ^www\.([a-z-]+)\.isp\.dom/(.*) /home/$1/$2<br />
      -<br />
      -# Ortak CGI dizinini tanımlayalım.<br />
      -ScriptAlias  /cgi-bin/  /siteler/std-cgi/
      -</code></p></div>
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      -<h2><a name="xtra-conf" id="xtra-conf">Sanal konaklar için ayrı bir yapılandırma dosyası kullanmak</a></h2>
      -
      -    <p>Burada, sanal konak isimlerinden belge kök dizini elde ederken
      -      <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> modülünün daha gelişkin özelliklerinden
      -      yararlanarak isimleri ayrı bir dosyadan okutacağız. Bu, esnekliği
      -      artırır ama daha karmaşık bir yapılandırma gerekir.</p>
      -
      -    <p>Aşağıdaki içeriğe sahip bir <code>vhost.map</code>dosyamız olsun:</p>
      -
      -<div class="example"><p><code>
      -musteri-1.dom  /siteler/kurumsal/1<br />
      -musteri-2.dom  /siteler/kurumsal/2<br />
      -# ...<br />
      -musteri-N.dom  /siteler/kurumsal/N<br />
      -</code></p></div>
      -
      -    <p><code>httpd.conf</code> dosyamız da şunları içerecektir:</p>
      -
      -<div class="example"><p><code>
      -RewriteEngine on<br />
      -<br />
      -RewriteMap   lowercase  int:tolower<br />
      -<br />
      -# Eşlem dosyasını tanımlayalım<br />
      -RewriteMap   vhost      txt:/siteler/conf/vhost.map<br />
      -<br />
      -# Rumuzları yukarıdaki gibi halledelim.<br />
      -RewriteCond  %{REQUEST_URI}               !^/icons/<br />
      -RewriteCond  %{REQUEST_URI}               !^/cgi-bin/<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
      -# Eşlemeyi dosyalar için de yapalım.<br />
      -RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
      -RewriteRule  ^/(.*)$                      %1/belgeler/$1<br />
      -<br />
      -RewriteCond  %{REQUEST_URI}               ^/cgi-bin/<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
      -RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
      -RewriteRule  ^/(.*)$                      %1/cgi-bin/$1 [H=cgi-script]
      -</code></p></div>
      +<h2><a name="simple.rewrite" id="simple.rewrite"><code>mod_rewrite</code> ile Kitlesel Sanal Konaklar</a></h2>
      +    
      +
      +    <p>Kitlesel sanal barındırma <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> modülü kullanarak
      +      da gerçeklenebilir. Ya basitçe <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> yönergelerini kullanırsınız ya da daha karmaşık
      +      olarak sanal konak tanımlarınızı harici bir yerde tutar ve bunlara
      +      <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> yönergesini
      +      kullanarak erişirsiniz. Bu teknikler ayrıntılı olarak
      +      <a href="../rewrite/vhosts.html">rewrite belgelerinde</a>
      +      açıklanmıştır.</p>
       
       </div></div>
       <div class="bottomlang">
      @@ -412,7 +297,28 @@ RewriteRule  ^/(.*)$                      %1/cgi-bin/$1 [H=cgi-script]
       <a href="../fr/vhosts/mass.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ko/vhosts/mass.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/mass.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/mass.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/mass.xml b/docs/manual/vhosts/mass.xml
      index 3df4e2531c3..bf5e6fad196 100644
      --- a/docs/manual/vhosts/mass.xml
      +++ b/docs/manual/vhosts/mass.xml
      @@ -41,27 +41,25 @@
           <code>&lt;VirtualHost&gt;</code> sections that are
           substantially the same, for example:</p>
       
      -<example>
      -<pre>
      +<highlight language="config">
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-1.example.com
      -    DocumentRoot        /www/hosts/customer-1.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-1.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-1.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-1.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-2.example.com
      -    DocumentRoot        /www/hosts/customer-2.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-2.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-2.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-2.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-N.example.com
      -    DocumentRoot        /www/hosts/customer-N.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-N.example.com/docs"
      +    ScriptAlias  "/cgi-bin/"  "/www/hosts/customer-N.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
      -</pre>
      -</example>
      +</highlight>
       
           <p>We wish to replace these multiple
           <code>&lt;VirtualHost&gt;</code> blocks with a mechanism
      @@ -149,19 +147,19 @@ mod_vhost_alias</title>
           href="#motivation">Motivation</a> section above
           using <module>mod_vhost_alias</module>.</p>
       
      -<example>
      -# get the server name from the Host: header<br />
      -UseCanonicalName Off<br />
      -<br />
      -# this log format can be split per-virtual-host based on the first field<br />
      -# using the split-logfile utility.<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include the server name in the filenames used to satisfy requests<br />
      -VirtualDocumentRoot /www/hosts/%0/docs<br />
      -VirtualScriptAlias  /www/hosts/%0/cgi-bin
      -</example>
      +<highlight language="config">
      +# get the server name from the Host: header
      +UseCanonicalName Off
      +
      +# this log format can be split per-virtual-host based on the first field
      +# using the split-logfile utility.
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# include the server name in the filenames used to satisfy requests
      +VirtualDocumentRoot "/www/hosts/%0/docs"
      +VirtualScriptAlias  "/www/hosts/%0/cgi-bin"
      +</highlight>
       
           <p>This configuration can be changed into an IP-based virtual
           hosting solution by just turning <code>UseCanonicalName
      @@ -186,18 +184,18 @@ examples.</p>
           <code>/home/user/www</code>. It uses a single <code>cgi-bin</code>
           directory instead of one per virtual host.</p>
       
      -<example>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include part of the server name in the filenames<br />
      -VirtualDocumentRoot /home/%2/www<br />
      -<br />
      -# single cgi-bin directory<br />
      -ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
      -</example>
      +<highlight language="config">
      +UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
      +
      +# include part of the server name in the filenames
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# single cgi-bin directory
      +ScriptAlias  "/cgi-bin/"  "/www/std-cgi/"
      +</highlight>
       
           <p>There are examples of more complicated
           <code>VirtualDocumentRoot</code> settings in the
      @@ -217,47 +215,39 @@ ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
           <code>&lt;VirtualHost&gt;</code> configuration sections, as shown
           below.</p>
       
      -<example>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /www/commercial&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /www/homepages&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName www.commercial.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.commercial vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/commercial/%0/docs<br />
      -    VirtualScriptAlias  /www/commercial/%0/cgi-bin<br />
      -</indent>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<indent>
      -    ServerName www.homepages.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.homepages vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/homepages/%0/docs<br />
      -    ScriptAlias         /cgi-bin/ /www/std-cgi/<br />
      -</indent>
      +<highlight language="config">
      +UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/www/commercial"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/www/homepages"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName www.commercial.example.com
      +    
      +    CustomLog "logs/access_log.commercial" vcommon
      +    
      +    VirtualDocumentRoot "/www/commercial/%0/docs"
      +    VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
       &lt;/VirtualHost&gt;
      -</example>
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName www.homepages.example.com
      +    
      +    CustomLog "logs/access_log.homepages" vcommon
      +    
      +    VirtualDocumentRoot "/www/homepages/%0/docs"
      +    ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
      +&lt;/VirtualHost&gt;
      +</highlight>
       
       <note>
           <title>Note</title>
      @@ -282,18 +272,18 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
           negating the need for a DNS lookup. Logging will also have to be adjusted
           to fit this system.</p>
       
      -<example>
      -# get the server name from the reverse DNS of the IP address<br />
      -UseCanonicalName DNS<br />
      -<br />
      -# include the IP address in the logs so they may be split<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# include the IP address in the filenames<br />
      -VirtualDocumentRootIP /www/hosts/%0/docs<br />
      -VirtualScriptAliasIP  /www/hosts/%0/cgi-bin<br />
      -</example>
      +<highlight language="config">
      +# get the server name from the reverse DNS of the IP address
      +UseCanonicalName DNS
      +
      +# include the IP address in the logs so they may be split
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# include the IP address in the filenames
      +VirtualDocumentRootIP "/www/hosts/%0/docs"
      +VirtualScriptAliasIP  "/www/hosts/%0/cgi-bin"
      +</highlight>
       
       </section>
       
      diff --git a/docs/manual/vhosts/mass.xml.fr b/docs/manual/vhosts/mass.xml.fr
      index b06ed48a0f9..08c476cc859 100644
      --- a/docs/manual/vhosts/mass.xml.fr
      +++ b/docs/manual/vhosts/mass.xml.fr
      @@ -1,7 +1,7 @@
      -<?xml version="1.0" encoding="ISO-8859-1" ?>
      +<?xml version="1.0" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision : 1138405 -->
      +<!-- English Revision: 1673563 -->
       <!-- French translation : Lucien GENTIS -->
       
       <!--
      @@ -43,27 +43,25 @@
           <code>&lt;VirtualHost&gt;</code> tr&egrave;s semblables,
           dans le style :</p>
       
      -<example>
      -<pre>
      +<highlight language="config">
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-1.example.com
      -    DocumentRoot        /www/hosts/customer-1.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-1.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-1.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-1.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-2.example.com
      -    DocumentRoot        /www/hosts/customer-2.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-2.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-2.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-2.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
       
       &lt;VirtualHost 111.22.33.44&gt;
           ServerName                 customer-N.example.com
      -    DocumentRoot        /www/hosts/customer-N.example.com/docs
      -    ScriptAlias  /cgi-bin/  /www/hosts/customer-N.example.com/cgi-bin
      +    DocumentRoot        "/www/hosts/customer-N.example.com/docs"
      +    ScriptAlias  "/cgi-bin/" "/www/hosts/customer-N.example.com/cgi-bin"
       &lt;/VirtualHost&gt;
      -</pre>
      -</example>
      +</highlight>
       
           <p>Nous voulons remplacer toutes les configurations
           <code>&lt;VirtualHost&gt;</code> par un m&eacute;canisme qui les g&eacute;n&egrave;re
      @@ -156,20 +154,20 @@ dynamique avec mod_vhost_alias</title>
           href="#motivation">&Agrave; qui ce document est-il destin&eacute; ?</a> ci-dessus
           en utilisant <module>mod_vhost_alias</module>.</p>
       
      -<example>
      -# extrait le nom du serveur de l'en-t&ecirc;te Host:<br />
      -UseCanonicalName Off<br />
      -<br />
      +<highlight language="config">
      +# extrait le nom du serveur de l'en-t&ecirc;te Host:
      +UseCanonicalName Off
      +
       # ce format de journal peut &ecirc;tre &eacute;clat&eacute; en journaux par serveur virtuel
      -# &agrave; l'aide du premier champ via l'utilitaire split-logfile<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      +# &agrave; l'aide du premier champ via l'utilitaire split-logfile
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
       # inclut le nom du serveur dans les noms de fichiers ressources
      -# n&eacute;cessaires aux traitements des requ&ecirc;tes<br />
      -VirtualDocumentRoot /www/hosts/%0/docs<br />
      -VirtualScriptAlias  /www/hosts/%0/cgi-bin
      -</example>
      +# n&eacute;cessaires aux traitements des requ&ecirc;tes
      +VirtualDocumentRoot "/www/hosts/%0/docs"
      +VirtualScriptAlias  "/www/hosts/%0/cgi-bin"
      +</highlight>
       
           <p>Pour changer cette configuration en solution de serveur virtuel
           par IP, il suffit de remplacer <code>UseCanonicalName
      @@ -196,18 +194,18 @@ simplifi&eacute;</title>
           <code>cgi-bin</code> suffit pour l'ensemble des
           serveurs virtuels.</p>
       
      -<example>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# insertion d'une partie du nom du serveur dans les noms de fichiers<br />
      -VirtualDocumentRoot /home/%2/www<br />
      -<br />
      -# r&eacute;pertoire cgi-bin unique<br />
      -ScriptAlias  /cgi-bin/  /www/std-cgi/<br />
      -</example>
      +<highlight language="config">
      +UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
      +
      +# insertion d'une partie du nom du serveur dans les noms de fichiers
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# r&eacute;pertoire cgi-bin unique
      +ScriptAlias  "/cgi-bin/"  "/www/std-cgi/"
      +</highlight>
       
           <p>Vous trouverez des exemples plus &eacute;labor&eacute;s d'utilisation de la
           directive <code>VirtualDocumentRoot</code> dans la documentation du
      @@ -228,47 +226,39 @@ d'h&eacute;bergement virtuel sur le m&ecirc;me serveur</title>
           <code>&lt;VirtualHost&gt;</code> conventionnelles, comme indiqu&eacute;
           plus loin.</p>
       
      -<example>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /www/commercial&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /www/homepages&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName www.commercial.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.commercial vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/commercial/%0/docs<br />
      -    VirtualScriptAlias  /www/commercial/%0/cgi-bin<br />
      -</indent>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<indent>
      -    ServerName www.homepages.example.com<br />
      -    <br />
      -    CustomLog logs/access_log.homepages vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /www/homepages/%0/docs<br />
      -    ScriptAlias         /cgi-bin/ /www/std-cgi/<br />
      -</indent>
      +<highlight language="config">
      +UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/www/commercial"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/www/homepages"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName www.commercial.example.com
      +    
      +    CustomLog "logs/access_log.commercial" vcommon
      +    
      +    VirtualDocumentRoot "/www/commercial/%0/docs"
      +    VirtualScriptAlias  "/www/commercial/%0/cgi-bin"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName www.homepages.example.com
      +    
      +    CustomLog "logs/access_log.homepages" vcommon
      +    
      +    VirtualDocumentRoot "/www/homepages/%0/docs"
      +    ScriptAlias         "/cgi-bin/" "/www/std-cgi/"
       &lt;/VirtualHost&gt;
      -</example>
      +</highlight>
       
       <note>
       	<title>Note</title>
      @@ -295,26 +285,26 @@ efficace</title>
           la-m&ecirc;me la n&eacute;cessit&eacute; d'une recherche DNS. La journalisation doit
           aussi &ecirc;tre adapt&eacute;e pour fonctionner sur un tel syst&egrave;me.</p>
       
      -<example>
      +<highlight language="config">
       # obtention du nom du serveur par recherche DNS inverse
      -# sur l'adresse IP<br />
      -UseCanonicalName DNS<br />
      -<br />
      +# sur l'adresse IP
      +UseCanonicalName DNS
      +
       # insertion de l'adresse IP dans les journaux afin de pouvoir les
      -# &eacute;clater<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# insertion de l'adresse IP dans les noms de fichiers<br />
      -VirtualDocumentRootIP /www/hosts/%0/docs<br />
      -VirtualScriptAliasIP  /www/hosts/%0/cgi-bin<br />
      -</example>
      +# &eacute;clater
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
      +
      +# insertion de l'adresse IP dans les noms de fichiers
      +VirtualDocumentRootIP "/www/hosts/%0/docs"
      +VirtualScriptAliasIP  "/www/hosts/%0/cgi-bin"
      +</highlight>
       
       </section>
       
       <section id="rewrite"><title>H&eacute;bergement virtuel de masse avec
       mod_rewrite</title>
      - 
      +
       <p>
       L'h&eacute;bergement virtuel de masse peut aussi &ecirc;tre effectu&eacute; en utilisant
       <module>mod_rewrite</module>, soit &agrave; l'aide de simples directives <directive
      diff --git a/docs/manual/vhosts/mass.xml.ko b/docs/manual/vhosts/mass.xml.ko
      index 293eb40d19d..719c836a984 100644
      --- a/docs/manual/vhosts/mass.xml.ko
      +++ b/docs/manual/vhosts/mass.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 151408:1174747 (outdated) -->
      +<!-- English Revision: 151408:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/mass.xml.meta b/docs/manual/vhosts/mass.xml.meta
      index 2d2457571bc..103a576eb1a 100644
      --- a/docs/manual/vhosts/mass.xml.meta
      +++ b/docs/manual/vhosts/mass.xml.meta
      @@ -10,6 +10,6 @@
           <variant>en</variant>
           <variant>fr</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/mass.xml.tr b/docs/manual/vhosts/mass.xml.tr
      index 6cea9a8c0e7..f3787e447ba 100644
      --- a/docs/manual/vhosts/mass.xml.tr
      +++ b/docs/manual/vhosts/mass.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 1673563 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -31,7 +31,10 @@
       <summary>
       
           <p>Bu belgede sanal konakların sonu belirsiz bir şekilde artışı karşısında
      -      Apache httpd sunucusunun nasıl daha verimli kullanılacağı açıklanmıştır.
      +      Apache HTTP Sunucusunun nasıl daha verimli kullanılacağı açıklanmıştır.
      +      Devingen kitlesel konakları oluşturmak için <module>mod_rewrite</module>
      +      modülünün kullanımını açıklayan <a href="../rewrite/vhosts.html">ayrı bir
      +      belge</a> de mevcuttur.
           </p>
       
       </summary>
      @@ -43,40 +46,35 @@
             <code>&lt;VirtualHost&gt;</code> bölümü içereceği zaman yapılacaklar ile
             ilgilidir.</p>
       
      -<example>
      -NameVirtualHost 111.22.33.44<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName                 musteri-1.dom<br />
      -    DocumentRoot        /siteler/musteri-1.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-1.dom/cgi-bin<br />
      -</indent>
      -&lt;/VirtualHost&gt;<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName                 musteri-2.dom<br />
      -    DocumentRoot        /siteler/musteri-2.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-2.dom/cgi-bin<br />
      -</indent>
      -&lt;/VirtualHost&gt;<br />
      -# blah blah blah<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName                 musteri-N.dom<br />
      -    DocumentRoot        /siteler/musteri-N.dom/belgeler<br />
      -    ScriptAlias  /cgi-bin/  /siteler/musteri-N.dom/cgi-bin<br />
      -</indent>
      +<highlight language="config">
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-1.example.com
      +    DocumentRoot        "/siteler/musteri-1/belgeler"
      +    ScriptAlias  "/cgi-bin/"  "/siteler/musteri-1/cgi-bin"
       &lt;/VirtualHost&gt;
      -</example>
       
      -    <p>Ana fikir, tüm durağan <code>&lt;VirtualHost&gt;</code>
      -      yapılandırmalarını devingen olarak çalışan tek bir
      -      <code>&lt;VirtualHost&gt;</code> bölümüyle değiştirmektir. Bunun elbette
      -      bazı getirileri olacaktır:</p>
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-2.example.com
      +    DocumentRoot        "/siteler/musteri-2/belgeler"
      +    ScriptAlias   "/cgi-bin/"   "/siteler/musteri-2/cgi-bin"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName                 musteri-N.example.com
      +    DocumentRoot          "/siteler/musteri-N/belgeler"
      +    ScriptAlias   "/cgi-bin/"  "/siteler/musteri-N/cgi-bin"
      +&lt;/VirtualHost&gt;
      +</highlight>
      +
      +    <p>İsteğimiz çok sayıda <code>&lt;VirtualHost&gt;</code> bölümünü devingen
      +      olarak çalışan tek bir <code>&lt;VirtualHost&gt;</code> bölümüyle
      +      değiştirmektir. Bunun elbette bazı getirileri olacaktır:</p>
       
           <ol>
             <li>Yapılandırma dosyanız küçüleceği için Apache daha çabuk
      -        başlatılabilecek ve daha az bellek harcayacaktır.</li>
      +        başlatılabilecek ve daha az bellek harcayacaktır. Muhtemelen daha da
      +        önemlisi, küçülmüş bir yapılandırmanın bakımı da kolaylaşacağı için
      +        hatalar da azalacaktır.</li>
       
             <li>Yeni sanal konakların eklenmesi, DNS’de yeni girdiler oluşturmak ve
               dosya sisteminde bununla ilgili dizinleri açmak dışında biraz daha
      @@ -85,11 +83,13 @@ NameVirtualHost 111.22.33.44<br />
           </ol>
       
           <p>Ana götürüsü ise her sanal konak için ayrı birer günlük dosyasına sahip
      -      olamayacak olmanızdır. Öte yandan, dosya tanıtıcılarının sınırlı olması
      -      nedeniyle bunu yapmayı zaten istemezsiniz. Günlük kayıtları için bir
      -      fifo veya bir boru hattı oluşturmak ve diğer uçta çalışan bir süreç
      -      vasıtasıyla günlükleri müşterilere paylaştırmak daha iyidir (ayrıca, bu,
      -      istatistikleri toplamanızı da kolaylaştırır).</p>
      +      olamayacak olmanızdır. Öte yandan, <a href="fd-limits.html">dosya
      +      tanıtıcılarının sınırlı olması</a>  nedeniyle bunu yapmayı zaten
      +      istemezsiniz. Günlük kayıtları için bir <a href="../logs.html#piped">fifo
      +      veya bir boru hattı</a> oluşturmak ve diğer uçta çalışan bir süreç
      +      vasıtasıyla günlükleri müşterilere paylaştırmak daha iyidir. Böyle bir
      +      işlemle ilgili bir örneği <a href="../programs/other.html#split-logfile"
      +      >split-logfile</a> aracının belgesinde bulabilirsiniz.</p>
       
       </section>
       
      @@ -98,16 +98,18 @@ NameVirtualHost 111.22.33.44<br />
           <p>Bir sanal konak iki bilgiye bakarak belirlenir: IP adresi ve HTTP
             isteğindeki <code>Host:</code> başlığının içeriği. Devingen sanal
             barındırma tekniği, isteği yerine getirmek için kullanılacak dosya
      -      yoluna bu bilgiyi kendiliğinden girmek esasına dayanır. Bu, Apache 2.0
      -      ile <module>mod_vhost_alias</module> kullanarak oldukça kolay
      -      yapılabileceği gibi <module>mod_rewrite</module> da kullanılabilir. Bu
      -      modüllerin her ikisi de öntanımlı olarak devre dışıdır. Bu tekniği
      -      kullanmak isterseniz  Apache’yi yeniden yapılandırıp derleyerek bu iki
      -      modülü etkin duruma getirmeniz gerekir.</p>
      -
      -    <p>Devingen sanal konağı normal bir sanal konak gibi göstermek için bazı
      -      şeyleri ’göstermelik’ olarak yapmak gerekir. Bunlardan en önemlisi,
      -      Apache tarafından göreli URL’lerden normal URL’leri ve benzerlerini
      +      yoluna bu bilgiyi kendiliğinden girmek esasına dayanır. Bu, Apache httpd
      +      ile <module>mod_vhost_alias</module> modülünü kullanarak oldukça kolay
      +      yapılabileceği gibi <a href="../rewrite/vhosts.html">mod_rewrite modülü
      +      de kullanılabilir</a>.</p>
      +
      +    <p>Bu modüllerin her ikisi de öntanımlı olarak devre dışıdır. Bu tekniği
      +      kullanmak isterseniz  Apache httpd'yi yeniden yapılandırıp derleyerek bu
      +      iki modülü etkin duruma getirmeniz gerekir.</p>
      +
      +    <p>Devingen sanal konağı normal bir sanal konak gibi göstermek için
      +      bazı bilgileri istekten saptamak gerekir. Bunlardan en önemlisi,
      +      httpd tarafından göreli URL’lerden normal URL’leri ve benzerlerini
             üretmek için kullanılan sunucu ismidir. Sunucu ismi
             <code>ServerName</code> yönergesi ile yapılandırılır ve CGI’ler
             tarafından <code>SERVER_NAME</code> ortam değişkeni üzerinden
      @@ -118,70 +120,79 @@ NameVirtualHost 111.22.33.44<br />
             DNS</code> belirtilmişse, sunucu ismi, sanal konağın IP adresinden
             tersine DNS sorgusu yapılarak elde edilir. Birincisi isme dayalı sanal
             konaklar tarafından ikincisi ise IP’ye dayalı sanal konaklar tarafından
      -      kullanılır. Eğer Apache, istekte <code>Host:</code> başlığının olmayışı
      +      kullanılır. Eğer httpd, istekte <code>Host:</code> başlığının olmayışı
             veya DNS sorgusunun başarısız olması sebebiyle sunucu ismini elde
             edemezse son çare olarak <code>ServerName</code> yönergesinde yazılı
             değeri kullanır.</p>
       
      -    <p>‘Göstermelik’ yapılan şeylerden biri de <code>DocumentRoot</code>
      +    <p>Saptanan bilgilerden biri de <code>DocumentRoot</code>
             yönergesi ile yapılandırılan belge kök dizini olup CGI’ler tarafından
             <code>DOCUMENT_ROOT</code> ortam değişkeni üzerinden kullanılır. Normal
             yapılandırmada <module>core</module> modülü tarafından dosya isimlerini
             URI’lere eşlerken kullanılır. Fakat sunucu devingen sanal konakları
             kullanmak üzere yapılandırıldığında, eşleştirmeyi farklı yollardan yapan
      -      başka bir modül devreye girer (<code>mod_vhost_alias</code> veya
      -      <code>mod_rewrite</code>). <code>DOCUMENT_ROOT</code> ortam değişkenine
      -      değerini atamaktan sorumlu olan bu iki modülden biri kullanılmazsa CGI
      -      veya SSI belgeleri yanlış değerlerle üretilirler.</p>
      +      başka bir modül devreye girer (<module>mod_vhost_alias</module> veya
      +      <module>mod_rewrite</module>). <code>DOCUMENT_ROOT</code> ortam
      +      değişkenine değerini atamaktan sorumlu olan bu iki modülden biri
      +      kullanılmazsa CGI veya SSI belgeleri yanlış değerlerle üretilirler.</p>
       
       </section>
       
      -<section id="simple"><title>Basit Devingen Sanal Konaklar</title>
      +<section id="simple"><title>mod_vhost_alias ile Kitlesel Sanal Konaklar</title>
       
           <p>Yukarıda <a href="#motivation">Amaç</a> bölümünde özetlenen sanal konak
      -      düzenlemesinin <code>mod_vhost_alias</code> kullanarak daha soysal bir
      -      tarzda gerçekleştirilmiş halini içeren <code>httpd.conf</code> bölümü
      -      aşağıdadır.</p>
      -
      -<example>
      -# sunucu ismini Host: başlığından elde edelim<br />
      -UseCanonicalName Off<br />
      -<br />
      -# Bu günlükleme biçiminde ilk alana bakarak<br />
      -# sanal konak günlükleri ayrıştırılabilir<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# istekleri yerine getirmek için kullanılacak<br />
      -# dosya isimlerine sunucu ismini ekleyelim<br />
      -VirtualDocumentRoot /siteler/%0/belgeler<br />
      -VirtualScriptAlias  /siteler/%0/cgi-bin
      -</example>
      +      düzenlemesinin <code>mod_vhost_alias</code> kullanarak gerçekleştirilmiş
      +      halini içeren <code>httpd.conf</code> bölümü aşağıdadır.</p>
      +
      +<highlight language="config">
      +# sunucu ismini Host: başlığından elde edelim
      +UseCanonicalName Off
      +
      +# Bu günlükleme biçiminde split-logfile aracı kullanılarak
      +# sanal konak günlükleri ilk alana göre ayrıştırılabilir
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log vcommon"
      +
      +# istekleri yerine getirmek için kullanılacak
      +# dosya isimlerine sunucu ismini ekleyelim
      +VirtualDocumentRoot "/siteler/%0/belgeler"
      +VirtualScriptAlias  "/siteler/%0/cgi-bin"
      +</highlight>
       
           <p>Bu yapılandırmayı IP’ye dayalı sanal konaklar için kullanmak isterseniz
             <code>UseCanonicalName Off</code> yerine <code>UseCanonicalName
             DNS</code> yazmanız yeterlidir. Böylece dosya ismine eklenecek konak
      -      ismi sanal konağın IP adresinden türetilir.</p>
      +      ismi sanal konağın IP adresinden türetilir. <code>%0</code> değişkeni,
      +      <code>Host:</code> başlığı ile belirlenen istekteki sunucu isminin
      +      ifadesidir.</p>
      +
      +    <p>Kullanım örnekleri için <module>mod_vhost_alias</module>modülünün
      +      belgesine bakınız.</p>
       
       </section>
       
      -<section id="homepages"><title>Sanal Kişisel Sayfalar Sistemi</title>
      +<section id="homepages"><title>Basitleştirilmiş Kitlesel Sanal Konaklar</title>
      +
      +    <p>Bu sistem, yukarıdaki yapılandırmanın bir ISS’nin sunucusuna
      +      uyarlanmasından başka bir şey değildir. <code>%2</code> değişkenini
      +      kullanarak, dosya isminde kullanmak üzere sunucu isminin alt dizgelerini
      +      seçebiliriz, böylece, örneğin <code>www.user.example.com</code> belgeleri
      +      <code>/home/user/www</code> dizininde bulunabilir. Farklı olarak her
      +      sanal konak için bir tane değil hepsi için bir tane <code>cgi-bin</code>
      +      olacaktır.</p>
      +
      +    <highlight language="config">
      +UseCanonicalName Off
       
      -    <p>Bu sistem, yukarıdaki yapılandırmanın bir ISS’nin kişisel sayfalar
      -      sunucusuna uyarlanmasından başka bir şey değildir. Biraz daha karmaşık
      -      bir yapılandırma ile dosya isimlerine <code>/home/kullanıcı/</code>
      -      dizinlerini ekleyebiliriz. Farklı olarak her sanal konak için bir tane
      -      değil hepsi için bir tane <code>cgi-bin</code> olacaktır.</p>
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog logs/access_log vcommon
       
      -<example>
      -# Son bölüm hariç yukarıdaki yapılandırma, burada...<br />
      -<br />
      -# sunucu ismine eklenecek dosya isimlerini oluşturalım<br />
      -VirtualDocumentRoot /siteler/%2/belgeler<br />
      -<br />
      -# ortak cgi-bin dizini<br />
      -ScriptAlias  /cgi-bin/  /siteler/std-cgi/<br />
      -</example>
      +# sunucu ismini içerecek dosya isimlerini oluşturalım
      +VirtualDocumentRoot "/home/%2/www"
      +
      +# ortak cgi-bin dizini
      +ScriptAlias  "/cgi-bin/"  "/siteler/std-cgi/"
      +    </highlight>
       
           <p><module>mod_vhost_alias</module> belgesinde daha karmaşık
             <code>VirtualDocumentRoot</code> örnekleri vardır.</p>
      @@ -190,67 +201,60 @@ ScriptAlias  /cgi-bin/  /siteler/std-cgi/<br />
       
       <section id="combinations"><title>Aynı Sunucuda Kişisel ve Kurumsal Sanal Konaklar</title>
       
      -    <p>Daha karmaşık ayarlamalar yaparak Apache’inin normal
      +    <p>Daha karmaşık ayarlamalar yaparak httpd’nin normal
             <code>&lt;VirtualHost&gt;</code> bölümlerini farklı kitlesel sanal konak
             yapılandırmaları için kullanabilirsiniz. Örneğin, bireysel
             müşterileriniz için bir IP adresiniz, kurumsal müşterileriniz için de
             başka bir IP adresiniz olsun. Her biri için ayrı ayrı sanal konaklar
             ayarlamak yerine aşağıdaki gibi bir yapılandırma kullanabilirsiniz:</p>
       
      -<example>
      -UseCanonicalName Off<br />
      -<br />
      -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
      -<br />
      -&lt;Directory /siteler/kurumsal&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride All<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;Directory /siteler/bireysel&gt;<br />
      -<indent>
      -    Options FollowSymLinks<br />
      -    AllowOverride None<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.44&gt;<br />
      -<indent>
      -    ServerName kurumsal.iss.dom<br />
      -    <br />
      -    CustomLog logs/access_log.kurumsal vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /siteler/kurumsal/%0/belgeler<br />
      -    VirtualScriptAlias  /siteler/kurumsal/%0/cgi-bin<br />
      -</indent>
      -&lt;/VirtualHost&gt;<br />
      -<br />
      -&lt;VirtualHost 111.22.33.45&gt;<br />
      -<indent>
      -    ServerName bireysel.iss.dom<br />
      -    <br />
      -    CustomLog logs/access_log.bireysel vcommon<br />
      -    <br />
      -    VirtualDocumentRoot /siteler/bireysel/%0/belgeler<br />
      -    ScriptAlias         /cgi-bin/ /siteler/std-cgi/<br />
      -</indent>
      +<highlight language="config">
      +UseCanonicalName Off
      +
      +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
      +
      +&lt;Directory "/siteler/kurumsal"&gt;
      +    Options FollowSymLinks
      +    AllowOverride All
      +&lt;/Directory&gt;
      +
      +&lt;Directory "/siteler/bireysel"&gt;
      +    Options FollowSymLinks
      +    AllowOverride None
      +&lt;/Directory&gt;
      +
      +&lt;VirtualHost 111.22.33.44&gt;
      +    ServerName kurumsal.example.com
      +
      +    CustomLog "logs/access_log.kurumsal" vcommon
      +
      +    VirtualDocumentRoot "/siteler/kurumsal/%0/belgeler"
      +    VirtualScriptAlias  "/siteler/kurumsal/%0/cgi-bin"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost 111.22.33.45&gt;
      +    ServerName bireysel.example.com
      +
      +    CustomLog "logs/access_log.bireysel" vcommon
      +
      +    VirtualDocumentRoot "/siteler/bireysel/%0/belgeler"
      +    ScriptAlias         "/cgi-bin/" "/siteler/std-cgi/"
       &lt;/VirtualHost&gt;
      -</example>
      +</highlight>
       
           <note><title>Bilginize</title>
             <p>Eğer ilk <code>&lt;VirtualHost&gt;</code> bölümü bir <directive
               module="core">ServerName</directive> yönergesi içermezse ilgili IP
               için ters DNS sorgusu yapılır. Eğer sorgudan elde edilen isim
               sunucunun ismi değilse bu istenmeyen duruma bir çözüm olarak bir
      -        bilgilendirme bölümü (<code>ServerName isimsiz.iss.dom</code>)
      +        bilgilendirme bölümü (örn, <code>ServerName bilgi.example.com</code>)
               eklenebilir.</p>
           </note>
       
       </section>
       
      -<section id="ipbased"><title>IP’ye dayalı sanal konakları daha verimli kılmak</title>
      +<section id="ipbased">
      +    <title>IP’ye dayalı sanal konakları daha verimli kılmak</title>
       
           <p><a href="#simple">İlk örnekte</a> IP’ye dayalı sanal konaklar için
             kullanılmak istenirse yapılandırmada neyin nasıl değiştirileceği
      @@ -260,146 +264,33 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon<br />
             adreslerine göre düzenlenebilir. Günlük kayıtları da IP adreslerine göre
             ayrıştırılacak şekilde ayarlanabilir.</p>
       
      -<example>
      -# Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim<br />
      -UseCanonicalName DNS<br />
      -<br />
      -# Günlük kayıtları IP adreslerine göre ayrıştırılabilsin<br />
      -LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -# dosya isimleri IP adreslerini içersin<br />
      -VirtualDocumentRootIP /siteler/%0/belgeler<br />
      -VirtualScriptAliasIP  /siteler/%0/cgi-bin<br />
      -</example>
      +<highlight language="config">
      +# Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim
      +UseCanonicalName DNS
       
      -</section>
      +# Günlük kayıtları IP adreslerine göre ayrıştırılabilsin
      +LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
      +CustomLog "logs/access_log" vcommon
       
      -<section id="simple.rewrite"><title><code>mod_rewrite</code> ile Kurumsal Müşteriler Sistemi</title>
      -
      -    <p>Buradaki <code>httpd.conf</code> bölümü de <a href="#simple">ilk
      -      örnekteki</a> gibi elde edilmiştir. İlk yarı, bazı değişiklikler dışında
      -      yukarıdaki örneğe çok benzer. Bu değişiklikler yapılandırmanın
      -      <code>mod_rewrite</code> bölümünün düzgün çalışması ve geriye doğru
      -      uyumluluk için gereklidir. İkinci yarı, asıl işi yapan
      -      <code>mod_rewrite</code> yapılandırmasını içerir.</p>
      -
      -    <p>Biraz uzmanlık gerektiren bazı kısımlar var: Öntanımlı olarak
      -      <code>mod_rewrite</code> diğer (<code>mod_alias</code>, vs. gibi) URI
      -      dönüşüm modüllerinden önce çalışır. Dolayısıyla bu modülleri kullanmak
      -      isterseniz, <code>mod_rewrite</code>’ı bunlara izin verecek şekilde
      -      yapılandırmalısınız. Ayrıca her devingen sanal konağa eşdeğer bir
      -      <code>ScriptAlias</code> yapmak için de biraz büyü yapmak gerekir.</p>
      -
      -<example>
      -# Sunucu ismini Host: başlığınıdan alalım.<br />
      -UseCanonicalName Off<br />
      -<br />
      -# Günlük dosyasından bilgileri ayıklayabilelim.<br />
      -LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon<br />
      -CustomLog logs/access_log vcommon<br />
      -<br />
      -&lt;Directory /siteler/hosts&gt;<br />
      -<indent>
      -    # ScriptAlias için yaptıklarımızla CGI betiklerini<br />
      -    # çalışmaya zorlayamayacağımızdan ExecCGI burada gerekli.<br />
      -    Options FollowSymLinks ExecCGI<br />
      -</indent>
      -&lt;/Directory&gt;<br />
      -<br />
      -# İşin zor yanına geldik.<br />
      -<br />
      -RewriteEngine On<br />
      -<br />
      -# Host: başlığından elde edilen sunucu isminde harf<br />
      -# büyüklükleri çeşitli olabilir. Hepsini küçük harf yapalım.<br />
      -RewriteMap  lowercase  int:tolower<br />
      -<br />
      -## önce normal belgelerle anlaşalım:<br />
      -# Alias /icons/ çalışsın - diğer rumuzlar için yineleyelim<br />
      -RewriteCond  %{REQUEST_URI}  !^/icons/<br />
      -# CGI’ler de çalışsın.<br />
      -RewriteCond  %{REQUEST_URI}  !^/cgi-bin/<br />
      -# Biraz da büyü yapalım.<br />
      -RewriteRule  ^/(.*)$  /siteler/${lowercase:%{SERVER_NAME}}/belgeler/$1<br />
      -<br />
      -## Artık CGI’lerle anlaşabiliriz. - Bir eylemci isteyelim.<br />
      -RewriteCond  %{REQUEST_URI}  ^/cgi-bin/<br />
      -RewriteRule  ^/(.*)$  /siteler/${lowercase:%{SERVER_NAME}}/cgi-bin/$1  [H=cgi-script]<br />
      -<br />
      -# Bu kadar!
      -</example>
      +# dosya isimleri IP adreslerini içersin
      +VirtualDocumentRootIP "/siteler/%0/belgeler"
      +VirtualScriptAliasIP  "/siteler/%0/cgi-bin"
      +</highlight>
       
       </section>
       
      -<section id="homepages.rewrite"><title><code>mod_rewrite</code> ile Kişisel Sayfalar Sistemi</title>
      -
      -    <p>Burada da <a href="#homepages">ikinci örnekte</a> yaptıklarımızı
      -      yapıyoruz.</p>
      -
      -<example>
      -RewriteEngine on<br />
      -<br />
      -RewriteMap   lowercase  int:tolower<br />
      -<br />
      -# CGI’ler çalışsın.<br />
      -RewriteCond  %{REQUEST_URI}  !^/cgi-bin/<br />
      -<br />
      -# konak ismi doğru mu bakalım yoksa RewriteRule çalışmaz.<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^www\.[a-z-]+\.isp\.dom$<br />
      -<br />
      -# URI’nin başına sanal konak ismini ekleyelim.<br />
      -# [C], bunu bitirdikten sonra, sonraki rewrite ile devam et demek.<br />
      -RewriteRule  ^(.+)  ${lowercase:%{SERVER_NAME}}$1  [C]<br />
      -<br />
      -# Artık asıl dosya ismini oluşturabiliriz.<br />
      -RewriteRule  ^www\.([a-z-]+)\.isp\.dom/(.*) /home/$1/$2<br />
      -<br />
      -# Ortak CGI dizinini tanımlayalım.<br />
      -ScriptAlias  /cgi-bin/  /siteler/std-cgi/
      -</example>
      +<section id="simple.rewrite">
      +    <title><code>mod_rewrite</code> ile Kitlesel Sanal Konaklar</title>
       
      -</section>
      -
      -<section id="xtra-conf"><title>Sanal konaklar için ayrı bir yapılandırma dosyası kullanmak</title>
      -
      -    <p>Burada, sanal konak isimlerinden belge kök dizini elde ederken
      -      <module>mod_rewrite</module> modülünün daha gelişkin özelliklerinden
      -      yararlanarak isimleri ayrı bir dosyadan okutacağız. Bu, esnekliği
      -      artırır ama daha karmaşık bir yapılandırma gerekir.</p>
      -
      -    <p>Aşağıdaki içeriğe sahip bir <code>vhost.map</code>dosyamız olsun:</p>
      -
      -<example>
      -musteri-1.dom  /siteler/kurumsal/1<br />
      -musteri-2.dom  /siteler/kurumsal/2<br />
      -# ...<br />
      -musteri-N.dom  /siteler/kurumsal/N<br />
      -</example>
      -
      -    <p><code>httpd.conf</code> dosyamız da şunları içerecektir:</p>
      -
      -<example>
      -RewriteEngine on<br />
      -<br />
      -RewriteMap   lowercase  int:tolower<br />
      -<br />
      -# Eşlem dosyasını tanımlayalım<br />
      -RewriteMap   vhost      txt:/siteler/conf/vhost.map<br />
      -<br />
      -# Rumuzları yukarıdaki gibi halledelim.<br />
      -RewriteCond  %{REQUEST_URI}               !^/icons/<br />
      -RewriteCond  %{REQUEST_URI}               !^/cgi-bin/<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
      -# Eşlemeyi dosyalar için de yapalım.<br />
      -RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
      -RewriteRule  ^/(.*)$                      %1/belgeler/$1<br />
      -<br />
      -RewriteCond  %{REQUEST_URI}               ^/cgi-bin/<br />
      -RewriteCond  ${lowercase:%{SERVER_NAME}}  ^(.+)$<br />
      -RewriteCond  ${vhost:%1}                  ^(/.*)$<br />
      -RewriteRule  ^/(.*)$                      %1/cgi-bin/$1 [H=cgi-script]
      -</example>
      +    <p>Kitlesel sanal barındırma <module>mod_rewrite</module> modülü kullanarak
      +      da gerçeklenebilir. Ya basitçe <directive module="mod_rewrite"
      +      >RewriteRule</directive> yönergelerini kullanırsınız ya da daha karmaşık
      +      olarak sanal konak tanımlarınızı harici bir yerde tutar ve bunlara
      +      <directive module="mod_rewrite">RewriteMap</directive> yönergesini
      +      kullanarak erişirsiniz. Bu teknikler ayrıntılı olarak
      +      <a href="../rewrite/vhosts.html">rewrite belgelerinde</a>
      +      açıklanmıştır.</p>
       
       </section>
      +
       </manualpage>
      diff --git a/docs/manual/vhosts/name-based.html.de b/docs/manual/vhosts/name-based.html.de
      index ba8a840ef90..252aa5be5a3 100644
      --- a/docs/manual/vhosts/name-based.html.de
      +++ b/docs/manual/vhosts/name-based.html.de
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Untersttzung namensbasierter virtueller Hosts - Apache HTTP Server</title>
      +<title>Untersttzung namensbasierter virtueller Hosts - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP-Server</a> &gt; <a href="http://httpd.apache.org/docs/">Dokumentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Untersttzung namensbasierter virtueller Hosts</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP-Server</a> &gt; <a href="http://httpd.apache.org/docs/">Dokumentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Untersttzung namensbasierter virtueller Hosts</h1>
       <div class="toplang">
       <p><span>Verfgbare Sprachen: </span><a href="../de/vhosts/name-based.html" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -40,7 +45,7 @@
           Hosts</a></li><li><a href="details.html">Tiefergehende Errterung der Zuweisung
           virtueller Hosts</a></li><li><a href="mass.html">Dynamisch konfiguriertes
           Massen-Virtual-Hosting</a></li><li><a href="examples.html">Beispiele fr virtuelle Hosts in typischen
      -    Installationen</a></li><li><a href="examples.html#serverpath">ServerPath-Beispielkonfiguration</a></li></ul></div>
      +    Installationen</a></li><li><a href="examples.html#serverpath">ServerPath-Beispielkonfiguration</a></li><li><a href="#comments_section">Kommentare</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip">Namensbasierte gegenber IP-basierten
      @@ -267,7 +272,28 @@
       <a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Kommentare</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Lizenziert unter der <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Module</a> | <a href="../mod/directives.html">Direktiven</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossar</a> | <a href="../sitemap.html">Seitenindex</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en
      index 59dc814b9bc..6f5232c3895 100644
      --- a/docs/manual/vhosts/name-based.html.en
      +++ b/docs/manual/vhosts/name-based.html.en
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Name-based Virtual Host Support - Apache HTTP Server</title>
      +<title>Name-based Virtual Host Support - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Name-based Virtual Host Support</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Virtual Hosts</a></div><div id="page-content"><div id="preamble"><h1>Name-based Virtual Host Support</h1>
       <div class="toplang">
       <p><span>Available Languages: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" title="English">&nbsp;en&nbsp;</a> |
      @@ -31,7 +36,7 @@
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Name-based vs. IP-based Virtual Hosts</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#alg">How the server selects the proper name-based virtual host</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#using">Using Name-based Virtual Hosts</a></li>
      -</ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="details.html">An In-Depth Discussion of Virtual Host Matching</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li></ul></div>
      +</ul><h3>See also</h3><ul class="seealso"><li><a href="ip-based.html">IP-based Virtual Host Support</a></li><li><a href="details.html">An In-Depth Discussion of Virtual Host Matching</a></li><li><a href="mass.html">Dynamically configured mass virtual hosting</a></li><li><a href="examples.html">Virtual Host examples for common setups</a></li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip">Name-based vs. IP-based Virtual Hosts</a></h2>
      @@ -72,10 +77,16 @@
           <p>When a request arrives, the server will find the best (most specific) matching
           <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> argument based on
           the IP address and port used by the request.  If there is more than one virtual host
      -    containing this best-match address and port combination,  Apache will further
      -    compare the <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>  directives to the server name
      +    containing this best-match address and port combination, Apache will further
      +    compare the <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> and <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> directives to the server name
           present in the request.</p>
       
      +    <p>If you omit the <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> 
      +    directive from any name-based virtual host, the server will default
      +    to a fully qualified domain name (FQDN) derived from the system hostname.
      +    This implicitly set server name can lead to counter-intuitive virtual host
      +    matching and is discouraged.</p>
      + 
           <h3><a name="defaultvhost" id="defaultvhost">The default name-based vhost for an IP and port combination </a></h3>
           <p> If no matching ServerName or ServerAlias is found in the set of
           virtual hosts containing the most specific matching IP address and port
      @@ -108,27 +119,35 @@
               virtual hosts.</p>
           </div>
       
      +    <div class="note"><h3>ServerName inheritance</h3>
      +       <p> It is best to always explicitly list a  <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> in every name-based virtual host.</p>
      +       <p>If a <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> doesn't specify 
      +       a <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>, a server name will be 
      +       inherited from the base server configuration.  If no server name was 
      +       specified globally, one is detected at startup through reverse DNS resolution
      +       of the first listening address.  In either case, this inherited server name
      +       will influence name-based virtual host resolution, so it is best to always
      +       explicitly list a  <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> in every
      +       name-based virtual host.</p>
      +    </div>
      +
           <p>For example, suppose that you are serving the domain
           <code>www.example.com</code> and you wish to add the virtual host
           <code>other.example.com</code>, which points at the same IP address.
           Then you simply add the following to <code>httpd.conf</code>:</p>
       
      -    <div class="example"><p><code>
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">
      -            # This first-listed virtual host is also the default for *:80
      -            ServerName www.example.com<br />
      -            ServerAlias example.com *.example.com<br />
      -            DocumentRoot /www/domain<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">ServerName other.example.com<br />
      -            DocumentRoot /www/otherdomain<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:80&gt;
      +    # This first-listed virtual host is also the default for *:80
      +    ServerName www.example.com
      +    ServerAlias example.com 
      +    DocumentRoot "/www/domain"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName other.example.com
      +    DocumentRoot "/www/otherdomain"
      +&lt;/VirtualHost&gt;</pre>
      +
       
           <p>You can alternatively specify an explicit IP address in place of the
           <code>*</code> in <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> directives. For example, you might want to do this
      @@ -142,9 +161,8 @@
           the listed names are other names which people can use to see that same
           web site:</p>
       
      -    <div class="example"><p><code>
      -        ServerAlias example.com *.example.com
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre>
      +
       
           <p>then requests for all hosts in the <code>example.com</code> domain will
           be served by the <code>www.example.com</code> virtual host. The wildcard
      @@ -153,6 +171,14 @@
           first have your DNS server properly configured to map those names to an IP
           address associated with your server.</p>
       
      +    <p>Name-based virtual hosts for the best-matching set of  <code class="directive"><a href="../mod/core.html#virtualhost">&lt;virtualhost&gt;</a></code>s are processed 
      +    in the order they appear in the configuration.  The first matching <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> or <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> is used, with no different precedence for wildcards
      +    (nor for ServerName vs. ServerAlias).  </p>
      +
      +    <p>The complete list of names in the <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code>
      +    directive are treated just like a (non wildcard) 
      +    <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>.</p>
      +
           <p>Finally, you can fine-tune the configuration of the virtual hosts
           by placing other directives inside the <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> containers. Most directives can be
           placed in these containers and will then change the configuration only of
      @@ -171,7 +197,28 @@
       <a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.html.fr b/docs/manual/vhosts/name-based.html.fr
      index 58bcf76d7c1..0ed51e6325d 100644
      --- a/docs/manual/vhosts/name-based.html.fr
      +++ b/docs/manual/vhosts/name-based.html.fr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="ISO-8859-1"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"><head>
      +<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>Support Apache des serveurs virtuels par nom - Serveur Apache HTTP</title>
      +<title>Support Apache des serveurs virtuels par nom - Serveur Apache HTTP Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      -<p class="apache">Serveur Apache HTTP Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p>
      +<p class="apache">Serveur Apache HTTP Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Support Apache des serveurs virtuels par nom</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">Serveur HTTP</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">Serveurs virtuels</a></div><div id="page-content"><div id="preamble"><h1>Support Apache des serveurs virtuels par nom</h1>
       <div class="toplang">
       <p><span>Langues Disponibles: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -26,35 +31,35 @@
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
       </div>
       
      -    <p>Ce document dcrit quand et comment utiliser des serveurs 
      +    <p>Ce document dcrit quand et comment utiliser des serveurs
           virtuels par nom.</p>
       </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">Serveurs virtuels par nom vs. par IP</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#alg">Comment le serveur slectionne-t-il le serveur
       virtuel bas sur le nom appropri</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#using">Utilisation de serveurs virtuels par nom</a></li>
      -</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="ip-based.html">Support Apache des serveurs virtuels par IP</a></li><li><a href="details.html">Dtails sur le fonctionnement des serveurs virtuels</a></li><li><a href="mass.html">Configuration dynamique des hbergements virtuels de masse</a></li><li><a href="examples.html">Exemples d'utilisations de VirtualHost</a></li></ul></div>
      +</ul><h3>Voir aussi</h3><ul class="seealso"><li><a href="ip-based.html">Support Apache des serveurs virtuels par IP</a></li><li><a href="details.html">Dtails sur le fonctionnement des serveurs virtuels</a></li><li><a href="mass.html">Configuration dynamique des hbergements virtuels de masse</a></li><li><a href="examples.html">Exemples d'utilisations de VirtualHost</a></li><li><a href="#comments_section">Commentaires</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip">Serveurs virtuels par nom vs. par IP</a></h2>
       
      -    <p>Les <a href="ip-based.html">serveurs virtuels</a> par IP utilisent l'adresse IP 
      -    de la connexion afin de dterminer quel serveur virtuel doit 
      -    rpondre. Par consquent, vous devez disposer d'adresses IP 
      +    <p>Les <a href="ip-based.html">serveurs virtuels</a> par IP utilisent l'adresse IP
      +    de la connexion afin de dterminer quel serveur virtuel doit
      +    rpondre. Par consquent, vous devez disposer d'adresses IP
           diffrentes pour chaque serveur.</p>
       
      -    <p>Avec un hbergement 
      -    virtuel par nom, le serveur s'appuie sur les informations 
      -    transmises par le client dans les en-ttes HTTP de ses requtes. 
      -    La technique prsente ici vous permet de disposer de serveurs 
      +    <p>Avec un hbergement
      +    virtuel par nom, le serveur s'appuie sur les informations
      +    transmises par le client dans les en-ttes HTTP de ses requtes.
      +    La technique prsente ici vous permet de disposer de serveurs
           virtuels diffrents partags sur une mme adresse IP.</p>
       
      -    <p>L'hbergement virtuel par nom est habituellement plus simple, 
      -    car il vous suffit de configurer votre serveur DNS pour que 
      -    chaque domaine pointe sur l'adresse IP dont vous disposez, et de 
      -    configurer votre serveur Apache HTTP afin qu'il reconnaisse 
      -    ces domaines. Il rduit aussi la pnurie en adresses IP. Par 
      -    consquent, vous devriez utiliser l'hbergement virtuel par 
      +    <p>L'hbergement virtuel par nom est habituellement plus simple,
      +    car il vous suffit de configurer votre serveur DNS pour que
      +    chaque domaine pointe sur l'adresse IP dont vous disposez, et de
      +    configurer votre serveur Apache HTTP afin qu'il reconnaisse
      +    ces domaines. Il rduit aussi la pnurie en adresses IP. Par
      +    consquent, vous devriez utiliser l'hbergement virtuel par
           nom, sauf dans le cas o vous utiliseriez des quipements qui
           ncessitent un hbergement bas sur IP. Les raisons historiques de
           l'hbergement bas sur IP dans un but de support de certains clients ne
      @@ -80,7 +85,7 @@ virtuel bas
           La rsolution base sur IP est sans objet si l'on
           utilise un caractre gnrique (*) pour l'adresse IP dans
           toutes les directives VirtualHost.</p>
      -    
      +
           <p>A l'arrive d'une requte, le serveur va rechercher l'argument de
           section <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> prsentant la meilleure
           (la plus exacte) correspondance avec la paire adresse IP/port
      @@ -89,13 +94,19 @@ virtuel bas
           valeurs des directives <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> et <code class="directive">module="core"&gt;ServerAlias</code> avec le nom de serveur
           prsent dans la requte.</p>
       
      +    <p>Si vous ne dfinissez pas de directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour un serveur virtuel  base
      +    de nom, le serveur utilisera par dfaut le nom de domaine
      +    entirement qualifi (FQDN) dduit du nom d'hte systme. Cette
      +    configuration sans nom de serveur explicite peut conduire  des
      +    erreurs de choix du serveur virtuel  utiliser et est dconseille.</p>
      +
           <h3><a name="defaultvhost" id="defaultvhost">Le serveur virtuel  base de nom
           par dfaut pour une paire adresse IP/port</a></h3>
           <p>Si aucune directive ServerName ou ServerAlias ne correspond dans
           la liste de serveurs virtuels prsentant la meilleure correspondance
           du point de vue adresse IP/port, c'est <strong>le premier serveur
           virtuel de cette liste</strong> qui sera utilis.</p>
      -        
      +
       
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
      @@ -103,15 +114,15 @@ virtuel bas
       
       <table class="related"><tr><th>Modules Apparents</th><th>Directives Apparentes</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li></ul></td></tr></table>
       
      -    
      -    <p>La premire tape consiste  crer une section 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> 
      -    pour chacun des serveurs  dfinir. Dans chaque section 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>, 
      -    vous devez dfinir au minimum une directive 
      -    <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour dsigner 
      -    le serveur concern et une directive 
      -    <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> pour prciser 
      +
      +    <p>La premire tape consiste  crer une section
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      +    pour chacun des serveurs  dfinir. Dans chaque section
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>,
      +    vous devez dfinir au minimum une directive
      +    <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour dsigner
      +    le serveur concern et une directive
      +    <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> pour prciser
           l'emplacement sur le systme de fichiers du contenu de ce serveur.</p>
       
           <div class="note"><h3>Le serveur principal disparat</h3>
      @@ -132,73 +143,93 @@ virtuel bas
       	spcifiques (et non par dfaut).</p>
           </div>
       
      -    <p>Par exemple, supposez que vous hbergez le domaine 
      -    <code>www.example.com</code> et que vous souhaitez ajouter le 
      -    serveur virtuel <code>other.example.com</code> qui pointe sur 
      -    la mme adresse IP. Il vous suffit d'ajouter la configuration 
      +    <div class="note"><h3>Hritage du nom de serveur</h3>
      +       <p>Il est toujours prfrable de dfinir une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> au niveau de chaque serveur
      +       virtuel  base de nom. Si un serveur virtuel ne dfinit pas
      +       de directive  <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>, le
      +       nom de ce serveur virtuel sera hrit du serveur principal. Si
      +       aucun nom de serveur n'a t explicitement dfini au niveau du
      +       serveur principal, le serveur tentera de dterminer son nom via
      +       une rsolution de nom DNS inverse sur la premire adresse
      +       d'coute. Dans tous les cas, ce nom de serveur hrit influencera
      +       la slection du serveur virtuel  base de nom, c'est pourquoi il
      +       est toujours prfrable de dfinir une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> pour chaque serveur virtuel
      +        base de nom.</p>
      +    </div>
      +
      +    <p>Par exemple, supposez que vous hbergez le domaine
      +    <code>www.example.com</code> et que vous souhaitez ajouter le
      +    serveur virtuel <code>other.example.com</code> qui pointe sur
      +    la mme adresse IP. Il vous suffit d'ajouter la configuration
           suivante  <code>httpd.conf</code>&nbsp;:</p>
       
      -    <div class="example"><p><code>
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">
      -            # Le premier serveur virtuel de la liste est aussi le
      -	    # serveur par dfaut pour *:80
      -            ServerName www.example.com<br />
      -            ServerAlias example.com *.example.com<br />
      -            DocumentRoot /www/domain<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">ServerName other.example.com<br />
      -            DocumentRoot /www/otherdomain<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -    </code></p></div>
      -
      -    <p>Autrement, vous pouvez spcifiez une adresse IP explicite 
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:80&gt;
      +    # Le premier serveur virtuel de la liste est aussi le
      +    # serveur par dfaut pour *:80
      +    ServerName www.example.com
      +    ServerAlias example.com
      +    DocumentRoot "/www/domain"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName other.example.com
      +    DocumentRoot "/www/otherdomain"
      +&lt;/VirtualHost&gt;</pre>
      +
      +
      +    <p>Autrement, vous pouvez spcifiez une adresse IP explicite
            la place de <code>*</code> dans la directive
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>. 
      -    Par exemple, cette mthode est utile si vous souhaitez faire 
      -    tourner quelques serveurs virtuels par nom sur une mme adresse 
      -    IP, et d'autres, soit par IP, soit bass sur un autre jeu de 
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.
      +    Par exemple, cette mthode est utile si vous souhaitez faire
      +    tourner quelques serveurs virtuels par nom sur une mme adresse
      +    IP, et d'autres, soit par IP, soit bass sur un autre jeu de
           serveurs virtuels par nom sur une autre adresse IP.</p>
       
      -    <p>Plusieurs serveurs sont accessibles par plus d'un nom. Il 
      -    suffit de placer la directive 
      -    <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> dans une section 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>. 
      -    Par exemple, dans la premire section 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> 
      -    ci-dessus, la directive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> 
      -    indique aux utilisateurs les autres noms permis pour accder au 
      +    <p>Plusieurs serveurs sont accessibles par plus d'un nom. Il
      +    suffit de placer la directive
      +    <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> dans une section
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.
      +    Par exemple, dans la premire section
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      +    ci-dessus, la directive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code>
      +    indique aux utilisateurs les autres noms permis pour accder au
           mme site Web&nbsp;:</p>
       
      -    <div class="example"><p><code>
      -        ServerAlias example.com *.example.com
      -    </code></p></div>
      -
      -    <p>ainsi, toutes les requtes portant sur un domaine 
      -    <code>example.com</code> seront servies par le serveur virtuel 
      -    <code>www.example.com</code>. Les caractres joker <code>*</code> 
      -    et <code>?</code> peuvent tre utiliss pour les correspondances. 
      -    Bien entendu, vous ne pouvez pas inventer des noms et les placer 
      -    dans une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> 
      -    ou <code>ServerAlias</code>. Tout d'abord, votre serveur DNS 
      -    doit tre correctement configur pour lier ces noms  une 
      +    <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre>
      +
      +
      +    <p>ainsi, toutes les requtes portant sur un domaine
      +    <code>example.com</code> seront servies par le serveur virtuel
      +    <code>www.example.com</code>. Les caractres joker <code>*</code>
      +    et <code>?</code> peuvent tre utiliss pour les correspondances.
      +    Bien entendu, vous ne pouvez pas inventer des noms et les placer
      +    dans une directive <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>
      +    ou <code>ServerAlias</code>. Tout d'abord, votre serveur DNS
      +    doit tre correctement configur pour lier ces noms  une
           adresse IP associe avec votre serveur.</p>
       
      -    <p>Finalement, vous pouvez affiner la configuration des serveurs 
      -    virtuels en plaant d'autres directives  l'intrieur des sections 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>. 
      -    La plupart des directives peut tre place dans ces sections en 
      -    y changeant seulement la configuration du serveur virtuel associ. 
      -    Pour dterminer si une directive particulire est permise, 
      +    <p>La recherche du serveur virtuel  base de nom qui correspond au
      +    plus prs  la requte s'effectue parmi les <code class="directive"><a href="../mod/core.html#virtualhost">&lt;virtualhost&gt;</a></code> selon leur
      +    ordre d'apparition dans le fichier de configuration. Le premier
      +    serveur virtuel dont le <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ou le <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> correspond est utilis, sans
      +    priorit particulire en cas de prsence de caractres gnriques
      +    (que ce soit pour le ServerName ou le ServerAlias).</p>
      +
      +    <p>La liste complte des noms dans la section <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> sont traits comme une
      +    directive <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> sans
      +    caractres gnriques.</p>
      +
      +    <p>Finalement, vous pouvez affiner la configuration des serveurs
      +    virtuels en plaant d'autres directives  l'intrieur des sections
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>.
      +    La plupart des directives peut tre place dans ces sections en
      +    y changeant seulement la configuration du serveur virtuel associ.
      +    Pour dterminer si une directive particulire est permise,
           consultez le <a href="../mod/directive-dict.html#Context">contexte</a> de la
      -    directive. Le jeu de directives configures dans le contexte 
      -    du <em>serveur principal</em> (en dehors de toutes sections 
      -    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>) 
      -    sera utilis seulement s'il n'y a pas de configuration contraire 
      +    directive. Le jeu de directives configures dans le contexte
      +    du <em>serveur principal</em> (en dehors de toutes sections
      +    <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>)
      +    sera utilis seulement s'il n'y a pas de configuration contraire
           par un serveur virtuel.</p>
       
       </div></div>
      @@ -209,7 +240,28 @@ virtuel bas
       <a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Trke">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Commentaires</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Autoris sous <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossaire</a> | <a href="../sitemap.html">Plan du site</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.html.ja.utf8 b/docs/manual/vhosts/name-based.html.ja.utf8
      index e47e333e95d..5bf6ea41272 100644
      --- a/docs/manual/vhosts/name-based.html.ja.utf8
      +++ b/docs/manual/vhosts/name-based.html.ja.utf8
      @@ -1,33 +1,39 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>名前ベースのバーチャルホスト - Apache HTTP サーバ</title>
      +<title>名前ベースのバーチャルホスト - Apache HTTP サーバ バージョン 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      -<p class="apache">Apache HTTP サーバ バージョン 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
      +<p class="apache">Apache HTTP サーバ バージョン 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン
      -            2.3</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>名前ベースのバーチャルホスト</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">バーチャルホスト</a></div><div id="page-content"><div id="preamble"><h1>名前ベースのバーチャルホスト</h1>
       <div class="toplang">
      -<p><span>言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/name-based.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">この日本語訳はすでに古くなっている可能性があります。
      -          更新された内容を見るには英語版をご覧下さい。</div>
      +<div class="outofdate">この日本語訳はすでに古くなっている
      +            可能性があります。
      +            最近更新された内容を見るには英語版をご覧下さい。
      +        </div>
       
           <p>この文書では名前ベースのバーチャルホストをどんなとき、
           どうやって使うかを説明します。</p>
      @@ -35,7 +41,7 @@
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">名前ベースと IP ベースのバーチャルホストの比較</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#using">名前ベースのバーチャルホストを利用する</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#compat">古いブラウザとの互換性</a></li>
      -</ul><h3>参照</h3><ul class="seealso"><li><a href="ip-based.html">ネームベースのバーチャルホスト</a></li><li><a href="details.html">バーチャルホストのマッチングについての詳細</a></li><li><a href="mass.html">大量のバーチャルホストの動的な設定</a></li><li><a href="examples.html">バーチャルホストの一般的な設定例</a></li><li><a href="examples.html#serverpath">ServerPath 設定例</a></li></ul></div>
      +</ul><h3>参照</h3><ul class="seealso"><li><a href="ip-based.html">ネームベースのバーチャルホスト</a></li><li><a href="details.html">バーチャルホストのマッチングについての詳細</a></li><li><a href="mass.html">大量のバーチャルホストの動的な設定</a></li><li><a href="examples.html">バーチャルホストの一般的な設定例</a></li><li><a href="examples.html#serverpath">ServerPath 設定例</a></li><li><a href="#comments_section">コメント</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip">名前ベースと IP ベースのバーチャルホストの比較</a></h2>
      @@ -264,13 +270,34 @@
       
       </div></div>
       <div class="bottomlang">
      -<p><span>言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
      +<p><span>翻訳済み言語: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
       <a href="../fr/vhosts/name-based.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
       <a href="../ja/vhosts/name-based.html" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
      +<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.html.ko.euc-kr b/docs/manual/vhosts/name-based.html.ko.euc-kr
      index 10e1202e289..61ff25ae234 100644
      --- a/docs/manual/vhosts/name-based.html.ko.euc-kr
      +++ b/docs/manual/vhosts/name-based.html.ko.euc-kr
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="EUC-KR"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head>
      +<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title≯ ȣƮ  - Apache HTTP Server</title>
      +<title≯ ȣƮ  - Apache HTTP Server Version 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      -<p class="apache">Apache HTTP Server Version 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p>
      +<p class="apache">Apache HTTP Server Version 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1≯ ȣƮ </h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.4</a> &gt; <a href="./">ȣƮ</a></div><div id="page-content"><div id="preamble"><h1≯ ȣƮ </h1>
       <div class="toplang">
       <p><span> : </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -34,7 +39,7 @@
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip"≯  IP ȣƮ</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#using"≯ ȣƮ ϱ</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#compat">  ȣȯ</a></li>
      -</ul><h3></h3><ul class="seealso"><li><a href="ip-based.html">IP ȣƮ </a></li><li><a href="details.html">ȣƮ ã⿡  ڼ </a></li><li><a href="mass.html">뷮 ȣƮ  ϱ</a></li><li><a href="examples.html">Ϲ ȣƮ </a></li><li><a href="examples.html#serverpath">ServerPath  </a></li></ul></div>
      +</ul><h3></h3><ul class="seealso"><li><a href="ip-based.html">IP ȣƮ </a></li><li><a href="details.html">ȣƮ ã⿡  ڼ </a></li><li><a href="mass.html">뷮 ȣƮ  ϱ</a></li><li><a href="examples.html">Ϲ ȣƮ </a></li><li><a href="examples.html#serverpath">ServerPath  </a></li><li><a href="#comments_section">Comments</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip"≯  IP ȣƮ</a></h2>
      @@ -234,7 +239,28 @@
       <a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      -<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
      +<p class="menu"><a href="../mod/"></a> | <a href="../mod/directives.html">þ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html"></a> | <a href="../sitemap.html">Ʈ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.html.tr.utf8 b/docs/manual/vhosts/name-based.html.tr.utf8
      index a84f179e561..3744bdd5424 100644
      --- a/docs/manual/vhosts/name-based.html.tr.utf8
      +++ b/docs/manual/vhosts/name-based.html.tr.utf8
      @@ -1,22 +1,27 @@
       <?xml version="1.0" encoding="UTF-8"?>
       <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      -<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head><!--
      +<html xmlns="http://www.w3.org/1999/xhtml" lang="tr" xml:lang="tr"><head>
      +<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
      +<!--
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                     This file is generated from xml source: DO NOT EDIT
               XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
             -->
      -<title>İsme Dayalı Sanal Konaklar - Apache HTTP Sunucusu</title>
      +<title>İsme Dayalı Sanal Konaklar - Apache HTTP Sunucusu Sürüm 2.4</title>
       <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
       <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
      -<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
      +<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
      +<script src="../style/scripts/prettify.min.js" type="text/javascript">
      +</script>
      +
       <link href="../images/favicon.ico" rel="shortcut icon" /></head>
       <body id="manual-page"><div id="page-header">
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      -<p class="apache">Apache HTTP Sunucusu Sürüm 2.3</p>
      -<img alt="" src="../images/feather.gif" /></div>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p>
      +<p class="apache">Apache HTTP Sunucusu Sürüm 2.4</p>
      +<img alt="" src="../images/feather.png" /></div>
       <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
       <div id="path">
      -<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.3</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>İsme Dayalı Sanal Konaklar</h1>
      +<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Sunucusu</a> &gt; <a href="http://httpd.apache.org/docs/">Belgeleme</a> &gt; <a href="../">Sürüm 2.4</a> &gt; <a href="./">Sanal Konaklar</a></div><div id="page-content"><div id="preamble"><h1>İsme Dayalı Sanal Konaklar</h1>
       <div class="toplang">
       <p><span>Mevcut Diller: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
       <a href="../en/vhosts/name-based.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
      @@ -25,124 +30,140 @@
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
       </div>
      -<div class="outofdate">Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.</div>
       
           <p>Bu belgede isme dayalı sanal konakların ne zaman, nasıl kullanılacakları
             açıklanmıştır.</p>
       </div>
       <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#namevip">İsme dayalı ve IP’ye dayalı Sanal Konaklar</a></li>
      +<li><img alt="" src="../images/down.gif" /> <a href="#alg">Sunucu isme dayalı sanal konaklardan uygun olanını nasıl seçer</a></li>
       <li><img alt="" src="../images/down.gif" /> <a href="#using">İsme Dayalı Sanal Konakların Kullanımı</a></li>
      -<li><img alt="" src="../images/down.gif" /> <a href="#compat">Artık Tarihe Karışmış Tarayıcılarla Uyumluluk</a></li>
       </ul><h3>Ayrıca bakınız:</h3><ul class="seealso"><li><a href="ip-based.html">IP Adresine Dayalı Sanal Konaklar</a></li><li><a href="details.html">Konak Eşlemenin Derinliğine İncelenmesi</a>
       </li><li><a href="mass.html">Devingen olarak Yapılandırılan Kütlesel Sanal
       Barındırma</a></li><li><a href="examples.html">Çok kullanılan sanal konak yapılandırma
      -örnekleri</a></li><li><a href="examples.html#serverpath">ServerPath yapılandırma örneği</a>
      -</li></ul></div>
      +örnekleri</a></li><li><a href="#comments_section">Yorum</a></li></ul></div>
       <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="namevip" id="namevip">İsme dayalı ve IP’ye dayalı Sanal Konaklar</a></h2>
       
      -    <p>IP’ye dayalı sanal konaklarda sunulacak sanal konağı doğru tespit
      -      edebilmek için bağlantının yapıldığı IP adresine bakılır. Bu bakımdan her
      -      konak için ayrı bir IP adresine gereksinim vardır. İsme dayalı sanal
      -      konaklarda ise sunucu, istemcinin HTTP başlığının bir parçası olarak
      -      gönderdiği konak adını kullanır. Bu teknikte aynı IP adresini çok sayıda
      -      farklı konak kullanabilir.</p>
      +    <p><a href="ip-based.html">IP’ye dayalı sanal konaklar</a>da sunulacak
      +      sanal konağı doğru tespit edebilmek için bağlantının yapıldığı IP
      +      adresine bakılır. Bu bakımdan her konak için ayrı bir IP adresine
      +      gereksinim vardır.</p>
      +
      +    <p>İsme dayalı sanal konaklarda ise sunucu, istemcinin HTTP başlığının bir
      +      parçası olarak gönderdiği konak adını kullanır. Bu teknikte aynı IP
      +      adresini çok sayıda farklı konak kullanabilir.</p>
       
           <p>İsme dayalı sanal barındırma nispeten daha kolaydır, çünkü her konak
             ismini doğru IP adresiyle eşlemek için DNS sunucunuzu yapılandırdıktan
             sonra Apache HTTP sunucusunu farklı konak isimlerini tanıyacak şekilde
             yapılandırmanız yeterli olur. İsme dayalı sanal barındırma ayrıca zaten
             kıt olan IP adreslerine talebi de azaltır. Bu nedenle, IP’ye dayalı sanal
      -      konakları kullanmanızı gerektirecek çok özel bir sebep olmadıkça isme
      -      dayalı sanal konaklar kullanmalısınız. IP’ye dayalı sanal konakların
      -      kullanımını gerektirebilecek bazı durumlar:</p>
      -
      -    <ul>
      -        <li>Bazı tarihi istemciler isme dayalı sanal konaklarla uyumlu değildir.
      -          İsme dayalı sanal konakların çalışması için istemcinin HTTP Host
      -          başlığı göndermesi gerekir. Bu da HTTP/1.1 desteği gerektirir.
      -          Günümüzdeki HTTP/1.0 istemcileri bir eklenti olarak HTTP/1.1’i de
      -          desteklemektedir. Tarihi eser haline gelmiş HTTP/1.1 desteği
      -          bulurmayan eski istemcileri hala isme dayalı sanal konaklarla
      -          desteklemek isterseniz bu belgenin sonunda bunu mümkün kılabilecek bir
      -          tekniğe yer verilmiştir.</li>
      -
      -        <li>İsme dayalı sanal konaklar SSL portokolünün doğası gereğince SSL’li
      -          güvenli sunucular için kullanılamazlar.</li>
      +      konakları kullanmanızı gerektiren donanım kullanmadıkça isme  dayalı
      +      sanal konaklar kullanmalısınız. İstemci uyumuna bağlı IP’ye dayalı
      +      sanal barındırma için eskiden varolan sebepler genel amaçlı bir HTTP
      +      sunucusu için artık uygulanabilir değildir.</p>
       
      -        <li>Bazı işletim sistemlerinin ve ağ donanımlarının gerçekleştirdiği
      -          band genişliği yönetim teknikleri IP adresleri farklı olmadığı sürece
      -          konaklar arasında ayrım yapamazlar.</li>
      -    </ul>
      +    <p>İsme dayalı sanal barındırma, IP'ye dayalı sanal barındırma seçim
      +      algoritmasını kullanmaz, yani uygun sunucu ismini arama işlemi sadece en
      +      iyi IP'ye dayalı adrese sahip sanal konaklar arasında gerçekleşir.</p>
       
      +</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      +<div class="section">
      +<h2><a name="alg" id="alg">Sunucu isme dayalı sanal konaklardan uygun olanını nasıl seçer</a></h2>
      +  
      +
      +    <p>İsme dayalı sanal konak çözümlemesinin ilk adımının IP'ye dayalı
      +      çözümleme olduğunun anlaşılması çok önemlidir. İsme dayalı sanal konak
      +      çözümlemesi en uygun isme dayalı sanal konağı seçerken önce en iyi IP'ye
      +      dayalı eşleşme adaylarının sayısını azaltır, sonra bunlar arasından en
      +      uygununu seçer. Tüm <code>VirtualHost</code> yönergelerinde IP adresi
      +      yerine joker kullanımı bu IP'ye dayalı eşlemeyi yersiz kılar.</p>
      +
      +    <p>Bir istek geldiğinde, sunucu, istekte kullanılan IP adresi ve portu ile
      +      en iyi eşleşen <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bileşenini bulur. Bu IP adresi ve port çifti ile
      +      eşleşen birden fazla sanal konak varsa, Apache httpd istekte kullanılan
      +      sunucu ismini <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve
      +      <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergelerindeki
      +      isimlerle karşılaştırır.</p>
      +
      +    <p>Herhangi bir isme dayalı sanal konakta <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesini kullanmazsanız, sunucu
      +      bu yönergeye sistem konak adından türetilmiş tam nitelenmiş alan adının
      +      (FQDN) tanımlandığını varsayacaktır. Bu örtük atama sezgiselliğin
      +      istenmediği bir sanal konak eşleşmesi ile sonuçlanabilir ve bu
      +      önerilmez.</p>
      +
      +  <h3><a name="defaultvhost" id="defaultvhost">Bir IP adresi ve port çifti için öntanımlı isme dayalı sankon</a></h3>
      +   
      +    <p><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve
      +      <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergelerinde bir
      +      eşleşme bulunamazsa, Apache httpd bu çift ile eşleşen <strong>sanal
      +      konaklar listesindeki ilk sanal konağı</strong> kullanır.</p>
      +  
       </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
       <div class="section">
       <h2><a name="using" id="using">İsme Dayalı Sanal Konakların Kullanımı</a></h2>
       
      -<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li></ul></td></tr></table>
      +<table class="related"><tr><th>İlgili Modüller</th><th>İlgili Yönergeler</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code></li><li><code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code></li><li><code class="directive"><a href="../mod/core.html#servername">ServerName</a></code></li><li><code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code></li></ul></td></tr></table>
       
      -    <p>İsme dayalı sanal konakları kullanmak için, bu konaklar için istekleri
      -      kabul edecek sunucuya IP adresini (ve muhtemelen portu da)
      -      belirtmelisiniz. Bu işlem <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesiyle yapılır. Normal
      -      şartlar altında sunucu üzerinde bütün IP adreslerinin kullanılması
      -      gerekir; bunun için <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code>
      -      yönergesine argüman olarak <code>*</code> belirtebilirsiniz. Çok sayıda
      -      port kullanmayı planlıyorsanız (SSL çalıştırmak gibi), argümana
      -      <code>*:80</code> şeklinde port ekleyebilirsiniz. Yalnız, <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesinde bir IP adresi
      -      belirtmiş olmakla sunucunun kendiliğinden o IP adresini dinlemeyeceğine
      -      dikkat ediniz. Bu konuda ayrıntılı bilgi edinmek için <a href="../bind.html">Apache’nin kullanacağı adreslerin ve portların
      -      ayarlanması</a> belgesine bakınız. Ayrıca, sunucuda, burada belirttiğiniz
      -      IP adresine sahip bir ağ arabirimi olmalıdır.</p>
      -
      -    <p>Sonraki adım sunacağınız her konak için ayrı bir <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü oluşturmaktır.
      -      <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      -      yönergesinin argümanı ile eşleşen bir <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> yönergesi tanımlanmış olmalıdır
      -      (değer normalde "*:80" olacaktır). Her <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü içinde sunulan konağı
      -      belirtmek üzere en azından bir adet <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesine ve konak içeriğinin dosya
      -      sisteminde bulunduğu yeri gösteren bir <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergesine
      -      ihtiyacınız olacaktır.</p>
      +    <p>İlk adım sunacağınız her konak için ayrı bir <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü oluşturmaktır. Her
      +      <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü
      +      içinde sunulan konağı belirtmek üzere en azından bir adet <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesine ve konak içeriğinin
      +      dosya sisteminde bulunduğu yeri gösteren bir <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergesine ihtiyacınız
      +      olacaktır.</p>
       
           <div class="note"><h3>Ana konağı unutmayın</h3>
      -        <p>Mevcut sitenize sanal konaklar eklerseniz, mevcut siteniz için de bir
      -          <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü
      -          oluşturmalısınız. Bu sanal konak bölümü içinde kullanacağınız
      -          <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> ve <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> yönergelerinin argümanları, bu
      -          yönergelerin  sunucu geneli için belirttiğiniz değerlerini
      -          içermelidir. Bu sanal konağı yapılandırma dosyanızdaki ilk sanal konak
      -          yapın ki, öntanımlı konak olsun.</p>
      +      <p>Mevcut <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      +        yönergelerinin hiçbiriyle eşleşmeyen bir istek için, sunucu veya konak
      +        ismine bakılmaksızın genel sunucu yapılandırmanız kullanılır.</p>
      +
      +      <p>Mevcut sitenize isme dayalı bir sanal konak eklerseniz ve bu sanal
      +        konak ana sunucunun IP adresi ve portuna sahipse, ana sunucuya yapılan
      +        istekler için bu sanal konak kullanılır. Bu bakımdan, <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> yönergesi ana sunucununki ile aynı
      +        olan bir <a href="#defaultvhost">öntanımlı sanal konak</a> oluşturmak
      +        akıllıca olacaktır. Aynı arayüz ve portu kullanan fakat farklı
      +        yapılandırmalara sahip diğer alan isimlerinin sanal konakları (yani
      +        öntanımlı olmayanlar) bu öntanımlı sanal konağın sonrasına
      +        yerleştirilmelidir.</p>
           </div>
       
      -    <p>Örnek olarak, <code>www.biralan.tld</code> adresinden sitenizi sunmakta
      -      olduğunuzu ve bunun yanına aynı IP adresini kullanan
      -      <code>www.digeralan.tld</code> sanal konağını eklemek istediğinizi
      +    <div class="note"><h3>ServerName miras alma</h3>
      +       <p>İsme dayalı her sanal konak için daima bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> belirtmek en iyisidir.</p>
      +
      +       <p>Eğer bir <code class="directive"><a href="../mod/core.html#virtualhost">VirtualHost</a></code> bölümü
      +       içinde bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>
      +       belirtilmezse, sunucu ismi olarak ana sunucu yapılandırmasındaki isim
      +       kullanılır. Orada da bir sunucu ismi belirtilmemişse, başlatma sırasında
      +       dinlenen ilk IP adresinden ters DNS araması ile elde edilen isim
      +       kullanılır. Her iki durumda da miras alınan isim gereksiz yere isme
      +       dayalı sanal konak ismi haline gelecektir; bu bakımdan isme dayalı her
      +       sanal konak için daima bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> belirtmek en iyisidir.</p>
      +    </div>
      +
      +    <p>Örnek olarak, <code>site1.example.com</code> adresinden sitenizi
      +      sunmakta olduğunuzu ve bunun yanına aynı IP adresini kullanan
      +      <code>site2.example.com</code> sanal konağını eklemek istediğinizi
             varsayalım. Bunun için <code>httpd.conf</code> dosyanıza basitçe şu
             satırları ekleyebilirsiniz:</p>
       
      -    <div class="example"><p><code>
      -        NameVirtualHost *:80<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">
      -            ServerName www.biralan.tld<br />
      -            ServerAlias biralan.tld *.biralan.tld<br />
      -            DocumentRoot /siteler/biralan<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <span class="indent">ServerName www.digeralan.tld<br />
      -            DocumentRoot /siteler/digeralan<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">&lt;VirtualHost *:80&gt;
      +    #İlk sanal konak aynı zamanda *:80 için de öntanımlıdır.
      +    ServerName site1.example.com
      +    ServerAlias example.com
      +    DocumentRoot "/siteler/site1"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName site2.example.com
      +    DocumentRoot "/siteler/site2"
      +&lt;/VirtualHost&gt;</pre>
      +
       
      -    <p>İsterseniz, <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> ve
      -      <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code>
      -      yönergelerinde argüman olarak <code>*</code> yerine doğrudan bir IP adresi
      -      belirtebilirsiniz. Hatta, daha sonra, isme dayalı sanal konakları bir IP
      -      adresinden ve IP’ye dayalı olanları veya isme dayalı diğer bir sanal konak
      -      grubunu diğer IP adreslerinden sunmak isteyebilirsiniz.</p>
      +    <p>İsterseniz, <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> yönergesinde argüman olarak <code>*</code>
      +      yerine doğrudan bir IP adresi belirtebilirsiniz. Hatta, daha sonra, isme
      +      dayalı sanal konakları bir IP adresinden ve IP’ye dayalı olanları veya
      +      isme dayalı diğer bir sanal konak grubunu diğer IP adreslerinden sunmak
      +      isteyebilirsiniz.</p>
       
           <p>Çoğu sunucunun birden fazla isim ile erişilebilir olması istenir. Bu,
             <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümü
      @@ -151,20 +172,28 @@ Barındırma</a></li><li><a href="examples.html">Çok kullanılan sanal konak ya
             kullanıcıların aynı siteye farklı isimlerle erişmelerini mümkün kılmak
             için bölüm içine şu satırı ekleyebilirsiniz:</p>
       
      -    <div class="example"><p><code>
      -        ServerAlias biralan.tld *.biralan.tld
      -    </code></p></div>
      +    <pre class="prettyprint lang-config">ServerAlias example.com *.example.com</pre>
       
      -    <p>Böylece <code>biralan.tld</code> alanındaki tüm konaklar için gelen
      -      isteklere <code>www.biralan.tld</code> sanal konağından hizmet sunulmuş
      +
      +    <p>Böylece <code>example.com</code> alanındaki tüm konaklar için gelen
      +      isteklere <code>www.example.com</code> sanal konağından hizmet sunulmuş
             olur. Konak isimleriyle eşleşmek üzere dosya ismi kalıp karakterleri
      -      <code>*</code> ve <code>?</code> kullanılabilir. Şüphesiz bu isimleri sırf
      -      <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya
      +      <code>*</code> ve <code>?</code> kullanılabilir. Şüphesiz bu isimleri
      +      sırf <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya
             <code>ServerAlias</code> yönergesinde belirtmiş olmakla bu isimleri
             erişilebilir kılamazsınız. Öncelikle, bu isimleri sunucunuzdaki IP
             adresleriyle eşlemek üzere yapılandıracağınız bir DNS sunucunuz
             olmalıdır.</p>
       
      +    <p>İsme dayalı sanal konaklardan en iyi eşleşme kümesinde olanlar
      +      yapılandırmada göründükleri sıraya göre işleme sokulur. Joker
      +      kullanımları arasında fark gözetilmeksizin <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya <code class="directive"><a href="../mod/core.html#serveralias">ServerAlias</a></code> yönergesi eşleşen ilk sanal konak
      +      kullanılır.</p>
      +
      +    <p><code>VirtualHost</code> içindeki isimlerin sırası (jokersiz) bir
      +      <code>ServerAlias</code> gibi ele alınır (fakat hiçbir
      +      <code>ServerAlias</code> yönergesi ile geçersiz kılınmaz).</p>
      +
           <p>Son olarak, sanal konak yapılandırmanıza, <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümlerinin içine başka yönergeler
             yerleştirerek ince ayar çekebilirsiniz. Çoğu yönerge bu bölümlere
             yerleştirilebilir ve sadece o sanal konakla ilgili yapılandırmayı
      @@ -174,75 +203,6 @@ Barındırma</a></li><li><a href="examples.html">Çok kullanılan sanal konak ya
             yapılandırma yönergelerinden sadece sanal konak bölümlerinde geçersiz
             kılınmamış olanlar kullanılacaktır.</p>
       
      -    <p>Sunucuya bir istek geldiğinde, sunucu önce IP adresiyle eşleşmesi olası
      -      <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> bölümleri var mı diye
      -      bakar. Varsa, IP adresini eşleştirmek için <code class="directive"><a href="../mod/core.html#namevirtualhost">NameVirtualHost</a></code> bölümlerine tek tek bakar ve
      -      istenen konak ismi ile eşleşen bir <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code> veya <code>ServerAlias</code> yönergesi bulmaya
      -      çalışır. Bir tane bulduğunda, sunucu için onun yapılandırmasını kullanır.
      -      İsimle eşleşen bir sanal konak bulamazsa IP adresiyle eşleşen <strong>ilk
      -      sanal konağın</strong> yapılandırmasını kullanır.</p>
      -
      -    <p>Bir önkabul olarak yapılandırma dosyasında rastlanan ilk sanal konak
      -      <em>öntanımlı</em> sanal konaktır. IP adresi bir sanal konakla eşleştiği
      -      takdirde <em>ana sunucunun</em> <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> değeri <strong>asla</strong> kullanılmayacaktır.
      -      Sanal konaklardan hiçbiriyle eşleşmeyen istekler için özel bir
      -      yapılandırmanız olsun isterseniz, bu yapılandırmayı yapılandırma
      -      dosyanızdaki ilk <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> bölümüne yerleştirmeniz
      -      yetecektir.</p>
      -
      -</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
      -<div class="section">
      -<h2><a name="compat" id="compat">Artık Tarihe Karışmış Tarayıcılarla Uyumluluk</a></h2>
      -
      -    <p>Evvelce de bahsedildiği gibi, isme dayalı sanal konakların gerektiği gibi
      -      çalışması için gerekli veriyi göndermeyen bazı istemciler vardır. Bu
      -      istemcilere daima o IP adresinin yapılandırma dosyasındaki ilk sanal
      -      konağının (isme dayalı <cite>başat</cite> sanal konak) sayfaları
      -      gönderilir.</p>
      -
      -    <div class="note"><h3>Ne kadar eski?</h3>
      -    <p>Lütfen dikkat edin, eski deyince gerçekten de antika demek istiyoruz.
      -      Günümüzde bu tür tarayıcılara rastlamanız neredeyse imkansızdır. Günümüz
      -      tarayıcılarının hepsi isme dayalı sanal konakların gerektirdiği
      -      <code>Host</code> başlığını gönderirler.</p>
      -    </div>
      -
      -    <p>Olayı fazla germeden <code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code>
      -      yönergesini kullanarak sorunun çevresinden dolanmak mümkündür:</p>
      -
      -    <p>Örnek yapılandırma:</p>
      -
      -    <div class="example"><p><code>
      -        NameVirtualHost 111.22.33.44<br />
      -        <br />
      -        &lt;VirtualHost 111.22.33.44&gt;<br />
      -        <span class="indent">
      -            ServerName www.biralan.tld<br />
      -            ServerPath /biralan<br />
      -            DocumentRoot /siteler/biralan<br />
      -        </span>
      -        &lt;/VirtualHost&gt;<br />
      -    </code></p></div>
      -
      -    <p>Bu ne anlama geliyor? Anlamı, "<code>/biralan</code>" ile başlayan her
      -      URI isteği <code>www.biralan.tld</code> sanal konağı tarafından sunulacak,
      -      demektir. Yani, tüm istemcilerin
      -      <code>http://www.biralan.tld/biralan/</code> olarak eriştiği yere
      -      <code>Host:</code> başlığı gönderen istemciler
      -      <code>http://www.biralan.tld/</code> olarak erişirler.</p>
      -
      -    <p>Bunu gerçekleştirebilmek için başat sanal konağın baş sayfasına
      -      <code>http://www.biralan.tld/biralan/</code> için bir bağ koyduktan sonra
      -      sanal konağın sayfalarında ya tamamen göreli bağlar
      -      ("<code>dosya.html</code>", "<code>../simgeler/resim.png</code>" gibi)
      -      veya <code>/biralan/</code> ile öncelenmiş bağlar
      -      ("<code>http://www.biralan.tld/biralan/muht/dosya.html</code>" veya
      -      "<code>/biralan/muht/dosya.html</code>" gibi) kullanın.</p>
      -
      -    <p>Bu işlem biraz disiplin gerektirse de bu yazılanlara sıkı sıkıya bağlı
      -      kalarak hem eski hem de yeni tarayıcıların sayfalarınızı doğru
      -      görüntülemesini sağlamış olursunuz.</p>
      -
       </div></div>
       <div class="bottomlang">
       <p><span>Mevcut Diller: </span><a href="../de/vhosts/name-based.html" hreflang="de" rel="alternate" title="Deutsch">&nbsp;de&nbsp;</a> |
      @@ -251,7 +211,28 @@ Barındırma</a></li><li><a href="examples.html">Çok kullanılan sanal konak ya
       <a href="../ja/vhosts/name-based.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
       <a href="../ko/vhosts/name-based.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
       <a href="../tr/vhosts/name-based.html" title="Türkçe">&nbsp;tr&nbsp;</a></p>
      -</div><div id="footer">
      -<p class="apache">Copyright 2011 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      -<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="../faq/">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div>
      +</div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Yorum</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
      +<script type="text/javascript"><!--//--><![CDATA[//><!--
      +var comments_shortname = 'httpd';
      +var comments_identifier = 'http://httpd.apache.org/docs/2.4/vhosts/name-based.html';
      +(function(w, d) {
      +    if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
      +        d.write('<div id="comments_thread"><\/div>');
      +        var s = d.createElement('script');
      +        s.type = 'text/javascript';
      +        s.async = true;
      +        s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
      +        (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
      +    }
      +    else { 
      +        d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
      +    }
      +})(window, document);
      +//--><!]]></script></div><div id="footer">
      +<p class="apache">Copyright 2016 The Apache Software Foundation.<br /><a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> altında lisanslıdır.</p>
      +<p class="menu"><a href="../mod/">Modüller</a> | <a href="../mod/directives.html">Yönergeler</a> | <a href="http://wiki.apache.org/httpd/FAQ">SSS</a> | <a href="../glossary.html">Terimler</a> | <a href="../sitemap.html">Site Haritası</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
      +if (typeof(prettyPrint) !== 'undefined') {
      +    prettyPrint();
      +}
      +//--><!]]></script>
       </body></html>
      \ No newline at end of file
      diff --git a/docs/manual/vhosts/name-based.xml b/docs/manual/vhosts/name-based.xml
      index da8598e2481..91e2b5ed114 100644
      --- a/docs/manual/vhosts/name-based.xml
      +++ b/docs/manual/vhosts/name-based.xml
      @@ -71,11 +71,17 @@
           <p>When a request arrives, the server will find the best (most specific) matching
           <directive type="section" module="core">VirtualHost</directive> argument based on
           the IP address and port used by the request.  If there is more than one virtual host
      -    containing this best-match address and port combination,  Apache will further
      +    containing this best-match address and port combination, Apache will further
           compare the <directive module="core" >ServerName</directive> and <directive
      -    module="core">ServerAlias</directive>  directives to the server name
      +    module="core">ServerAlias</directive> directives to the server name
           present in the request.</p>
       
      +    <p>If you omit the <directive module="core">ServerName</directive> 
      +    directive from any name-based virtual host, the server will default
      +    to a fully qualified domain name (FQDN) derived from the system hostname.
      +    This implicitly set server name can lead to counter-intuitive virtual host
      +    matching and is discouraged.</p>
      + 
           <section id="defaultvhost"><title>The default name-based vhost for an IP and port combination </title>
           <p> If no matching ServerName or ServerAlias is found in the set of
           virtual hosts containing the most specific matching IP address and port
      @@ -122,27 +128,37 @@
               virtual hosts.</p>
           </note>
       
      +    <note><title>ServerName inheritance</title>
      +       <p> It is best to always explicitly list a  <directive module="core"
      +       >ServerName</directive> in every name-based virtual host.</p>
      +       <p>If a <directive module="core">VirtualHost</directive> doesn't specify 
      +       a <directive module="core">ServerName</directive>, a server name will be 
      +       inherited from the base server configuration.  If no server name was 
      +       specified globally, one is detected at startup through reverse DNS resolution
      +       of the first listening address.  In either case, this inherited server name
      +       will influence name-based virtual host resolution, so it is best to always
      +       explicitly list a  <directive module="core">ServerName</directive> in every
      +       name-based virtual host.</p>
      +    </note>
      +
           <p>For example, suppose that you are serving the domain
           <code>www.example.com</code> and you wish to add the virtual host
           <code>other.example.com</code>, which points at the same IP address.
           Then you simply add the following to <code>httpd.conf</code>:</p>
       
      -    <example>
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>
      -            # This first-listed virtual host is also the default for *:80
      -            ServerName www.example.com<br />
      -            ServerAlias example.com *.example.com<br />
      -            DocumentRoot /www/domain<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>ServerName other.example.com<br />
      -            DocumentRoot /www/otherdomain<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -    </example>
      +    <highlight language="config">
      +&lt;VirtualHost *:80&gt;
      +    # This first-listed virtual host is also the default for *:80
      +    ServerName www.example.com
      +    ServerAlias example.com 
      +    DocumentRoot "/www/domain"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName other.example.com
      +    DocumentRoot "/www/otherdomain"
      +&lt;/VirtualHost&gt;
      +    </highlight>
       
           <p>You can alternatively specify an explicit IP address in place of the
           <code>*</code> in <directive type="section" module="core"
      @@ -159,9 +175,9 @@
           the listed names are other names which people can use to see that same
           web site:</p>
       
      -    <example>
      +    <highlight language="config">
               ServerAlias example.com *.example.com
      -    </example>
      +    </highlight>
       
           <p>then requests for all hosts in the <code>example.com</code> domain will
           be served by the <code>www.example.com</code> virtual host. The wildcard
      @@ -171,6 +187,18 @@
           first have your DNS server properly configured to map those names to an IP
           address associated with your server.</p>
       
      +    <p>Name-based virtual hosts for the best-matching set of  <directive
      +    type="section" module="core">virtualhost</directive>s are processed 
      +    in the order they appear in the configuration.  The first matching <directive
      +    module="core">ServerName</directive> or <directive module="core"
      +    >ServerAlias</directive> is used, with no different precedence for wildcards
      +    (nor for ServerName vs. ServerAlias).  </p>
      +
      +    <p>The complete list of names in the <directive module="core"
      +    >VirtualHost</directive>
      +    directive are treated just like a (non wildcard) 
      +    <directive module="core">ServerAlias</directive>.</p>
      +
           <p>Finally, you can fine-tune the configuration of the virtual hosts
           by placing other directives inside the <directive type="section"
           module="core">VirtualHost</directive> containers. Most directives can be
      diff --git a/docs/manual/vhosts/name-based.xml.de b/docs/manual/vhosts/name-based.xml.de
      index f53578fa50e..0bb32825da5 100644
      --- a/docs/manual/vhosts/name-based.xml.de
      +++ b/docs/manual/vhosts/name-based.xml.de
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.de.xsl"?>
      -<!-- English Revision: 420990:1174747 (outdated) -->
      +<!-- English Revision: 420990:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/name-based.xml.fr b/docs/manual/vhosts/name-based.xml.fr
      index bce771c88ca..15a7b270daf 100644
      --- a/docs/manual/vhosts/name-based.xml.fr
      +++ b/docs/manual/vhosts/name-based.xml.fr
      @@ -1,8 +1,8 @@
      -<?xml version='1.0' encoding='ISO-8859-1' ?>
      +<?xml version='1.0' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.fr.xsl"?>
      -<!-- English Revision: 1174747 -->
      -<!-- French translation by alain B, review by Vincent Deffontaines 
      +<!-- English Revision: 1673563 -->
      +<!-- French translation by alain B, review by Vincent Deffontaines
       	updated by Lucien GENTIS -->
       
       <!--
      @@ -27,41 +27,41 @@
       <title>Support Apache des serveurs virtuels par nom</title>
       
       <summary>
      -    <p>Ce document dcrit quand et comment utiliser des serveurs 
      +    <p>Ce document décrit quand et comment utiliser des serveurs
           virtuels par nom.</p>
       </summary>
       
       <seealso><a href="ip-based.html">Support Apache des serveurs virtuels par IP</a></seealso>
      -<seealso><a href="details.html">Dtails sur le fonctionnement des serveurs virtuels</a></seealso>
      -<seealso><a href="mass.html">Configuration dynamique des hbergements virtuels de masse</a></seealso>
      +<seealso><a href="details.html">Détails sur le fonctionnement des serveurs virtuels</a></seealso>
      +<seealso><a href="mass.html">Configuration dynamique des hébergements virtuels de masse</a></seealso>
       <seealso><a href="examples.html">Exemples d'utilisations de VirtualHost</a></seealso>
       
       <section id="namevip"><title>Serveurs virtuels par nom vs. par IP</title>
       
      -    <p>Les <a href="ip-based.html">serveurs virtuels</a> par IP utilisent l'adresse IP 
      -    de la connexion afin de dterminer quel serveur virtuel doit 
      -    rpondre. Par consquent, vous devez disposer d'adresses IP 
      -    diffrentes pour chaque serveur.</p>
      -
      -    <p>Avec un hbergement 
      -    virtuel par nom, le serveur s'appuie sur les informations 
      -    transmises par le client dans les en-ttes HTTP de ses requtes. 
      -    La technique prsente ici vous permet de disposer de serveurs 
      -    virtuels diffrents partags sur une mme adresse IP.</p>
      -
      -    <p>L'hbergement virtuel par nom est habituellement plus simple, 
      -    car il vous suffit de configurer votre serveur DNS pour que 
      -    chaque domaine pointe sur l'adresse IP dont vous disposez, et de 
      -    configurer votre serveur Apache HTTP afin qu'il reconnaisse 
      -    ces domaines. Il rduit aussi la pnurie en adresses IP. Par 
      -    consquent, vous devriez utiliser l'hbergement virtuel par 
      -    nom, sauf dans le cas o vous utiliseriez des quipements qui
      -    ncessitent un hbergement bas sur IP. Les raisons historiques de
      -    l'hbergement bas sur IP dans un but de support de certains clients ne
      -    s'appliquent plus  un serveur web d'usage gnral.</p>
      -
      -    <p>La slection du serveur virtuel en fonction du nom s'opre en
      -    dehors de l'algorithme de slection du serveur virtuel en fonction
      +    <p>Les <a href="ip-based.html">serveurs virtuels</a> par IP utilisent l'adresse IP
      +    de la connexion afin de déterminer quel serveur virtuel doit
      +    répondre. Par conséquent, vous devez disposer d'adresses IP
      +    différentes pour chaque serveur.</p>
      +
      +    <p>Avec un hébergement
      +    virtuel par nom, le serveur s'appuie sur les informations
      +    transmises par le client dans les en-têtes HTTP de ses requêtes.
      +    La technique présentée ici vous permet de disposer de serveurs
      +    virtuels différents partagés sur une même adresse IP.</p>
      +
      +    <p>L'hébergement virtuel par nom est habituellement plus simple,
      +    car il vous suffit de configurer votre serveur DNS pour que
      +    chaque domaine pointe sur l'adresse IP dont vous disposez, et de
      +    configurer votre serveur Apache HTTP afin qu'il reconnaisse
      +    ces domaines. Il réduit aussi la pénurie en adresses IP. Par
      +    conséquent, vous devriez utiliser l'hébergement virtuel par
      +    nom, sauf dans le cas où vous utiliseriez des équipements qui
      +    nécessitent un hébergement basé sur IP. Les raisons historiques de
      +    l'hébergement basé sur IP dans un but de support de certains clients ne
      +    s'appliquent plus à un serveur web d'usage général.</p>
      +
      +    <p>La sélection du serveur virtuel en fonction du nom s'opère en
      +    dehors de l'algorithme de sélection du serveur virtuel en fonction
           de l'adresse IP, ce qui signifie que les recherches du point de vue
           du nom du serveur ne s'effectuent que parmi le jeu de serveurs
           virtuels pour lesquels la correspondance avec la paire adresse
      @@ -69,36 +69,43 @@
       
       </section>
       
      -<section id="alg"><title>Comment le serveur slectionne-t-il le serveur
      -virtuel bas sur le nom appropri</title>
      +<section id="alg"><title>Comment le serveur sélectionne-t-il le serveur
      +virtuel basé sur le nom approprié</title>
       
      -    <p>Il est important de savoir que la premire tape de la rsolution
      -    de serveur virtuel base sur le nom est une rsolution base sur IP.
      -    La rsolution de serveur virtuel base sur le nom ne fait que
      -    choisir le serveur virtuel bas sur le nom le plus appropri, en se
      +    <p>Il est important de savoir que la première étape de la résolution
      +    de serveur virtuel basée sur le nom est une résolution basée sur IP.
      +    La résolution de serveur virtuel basée sur le nom ne fait que
      +    choisir le serveur virtuel basé sur le nom le plus approprié, en se
           limitant aux candidats qui conviennent le mieux du point de vue IP.
      -    La rsolution base sur IP est sans objet si l'on
      -    utilise un caractre gnrique (*) pour l'adresse IP dans
      +    La résolution basée sur IP est sans objet si l'on
      +    utilise un caractère générique (*) pour l'adresse IP dans
           toutes les directives VirtualHost.</p>
      -    
      -    <p>A l'arrive d'une requte, le serveur va rechercher l'argument de
      +
      +    <p>A l'arrivée d'une requête, le serveur va rechercher l'argument de
           section <directive type="section"
      -    module="core">VirtualHost</directive> prsentant la meilleure
      +    module="core">VirtualHost</directive> présentant la meilleure
           (la plus exacte) correspondance avec la paire adresse IP/port
      -    utilise dans la requte. Si plusieurs serveurs virtuels possdent
      -    cette mme paire adresse IP/port, Apache va ensuite comparer les
      +    utilisée dans la requête. Si plusieurs serveurs virtuels possèdent
      +    cette même paire adresse IP/port, Apache va ensuite comparer les
           valeurs des directives <directive module="core"
           >ServerName</directive> et <directive
           >module="core">ServerAlias</directive> avec le nom de serveur
      -    prsent dans la requte.</p>
      +    présent dans la requête.</p>
      +
      +    <p>Si vous ne définissez pas de directive <directive
      +    module="core">ServerName</directive> pour un serveur virtuel à base
      +    de nom, le serveur utilisera par défaut le nom de domaine
      +    entièrement qualifié (FQDN) déduit du nom d'hôte système. Cette
      +    configuration sans nom de serveur explicite peut conduire à des
      +    erreurs de choix du serveur virtuel à utiliser et est déconseillée.</p>
       
      -    <section id="defaultvhost"><title>Le serveur virtuel  base de nom
      -    par dfaut pour une paire adresse IP/port</title>
      +    <section id="defaultvhost"><title>Le serveur virtuel à base de nom
      +    par défaut pour une paire adresse IP/port</title>
           <p>Si aucune directive ServerName ou ServerAlias ne correspond dans
      -    la liste de serveurs virtuels prsentant la meilleure correspondance
      +    la liste de serveurs virtuels présentant la meilleure correspondance
           du point de vue adresse IP/port, c'est <strong>le premier serveur
      -    virtuel de cette liste</strong> qui sera utilis.</p></section>
      -        
      +    virtuel de cette liste</strong> qui sera utilisé.</p></section>
      +
       
       </section>
       
      @@ -117,105 +124,133 @@ virtuel bas
           </directivelist>
       </related>
       
      -    
      -    <p>La premire tape consiste  crer une section 
      -    <directive type="section" module="core">VirtualHost</directive> 
      -    pour chacun des serveurs  dfinir. Dans chaque section 
      -    <directive type="section" module="core">VirtualHost</directive>, 
      -    vous devez dfinir au minimum une directive 
      -    <directive module="core">ServerName</directive> pour dsigner 
      -    le serveur concern et une directive 
      -    <directive module="core">DocumentRoot</directive> pour prciser 
      -    l'emplacement sur le systme de fichiers du contenu de ce serveur.</p>
      -
      -    <note><title>Le serveur principal disparat</title>
      -        <p>Toute requte qui ne correspond  aucune section <directive
      +
      +    <p>La première étape consiste à créer une section
      +    <directive type="section" module="core">VirtualHost</directive>
      +    pour chacun des serveurs à définir. Dans chaque section
      +    <directive type="section" module="core">VirtualHost</directive>,
      +    vous devez définir au minimum une directive
      +    <directive module="core">ServerName</directive> pour désigner
      +    le serveur concerné et une directive
      +    <directive module="core">DocumentRoot</directive> pour préciser
      +    l'emplacement sur le système de fichiers du contenu de ce serveur.</p>
      +
      +    <note><title>Le serveur principal disparaît</title>
      +        <p>Toute requête qui ne correspond à aucune section <directive
       	type="section" module="core">VirtualHost</directive> existante
      -	est traite avec la configuration du serveur principal, sans
      -	tenir compte du nom d'hte ou de la directive ServerName.</p>
      -
      -        <p>Lorsque vous ajoutez un serveur virtuel bas sur le nom  un
      -	serveur existant, et si les caractristiques de ce serveur
      -	virtuel correspondent  des combinaisons IP/port prexistantes,
      -	les requtes seront alors traites par un serveur virtuel
      -	explicite. Dans ce cas, il est en gnral judicieux de crer un
      -	<a href="#defaultvhost">serveur virtuel par dfaut</a>
      +	est traitée avec la configuration du serveur principal, sans
      +	tenir compte du nom d'hôte ou de la directive ServerName.</p>
      +
      +        <p>Lorsque vous ajoutez un serveur virtuel basé sur le nom à un
      +	serveur existant, et si les caractéristiques de ce serveur
      +	virtuel correspondent à des combinaisons IP/port préexistantes,
      +	les requêtes seront alors traitées par un serveur virtuel
      +	explicite. Dans ce cas, il est en général judicieux de créer un
      +	<a href="#defaultvhost">serveur virtuel par défaut</a>
       	comportant une directive <directive
       	module="core">ServerName</directive> correspondant au nom du
      -	serveur principal. De nouveaux domaines sur les mmes interface
      -	et port, mais ncessitant des configurations distinctes,
      -	pourront alors tre ajouts en tant que serveurs virtuels
      -	spcifiques (et non par dfaut).</p>
      +	serveur principal. De nouveaux domaines sur les mêmes interface
      +	et port, mais nécessitant des configurations distinctes,
      +	pourront alors être ajoutés en tant que serveurs virtuels
      +	spécifiques (et non par défaut).</p>
           </note>
       
      -    <p>Par exemple, supposez que vous hbergez le domaine 
      -    <code>www.example.com</code> et que vous souhaitez ajouter le 
      -    serveur virtuel <code>other.example.com</code> qui pointe sur 
      -    la mme adresse IP. Il vous suffit d'ajouter la configuration 
      -    suivante  <code>httpd.conf</code>&nbsp;:</p>
      -
      -    <example>
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>
      -            # Le premier serveur virtuel de la liste est aussi le
      -	    # serveur par dfaut pour *:80
      -            ServerName www.example.com<br />
      -            ServerAlias example.com *.example.com<br />
      -            DocumentRoot /www/domain<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>ServerName other.example.com<br />
      -            DocumentRoot /www/otherdomain<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -    </example>
      -
      -    <p>Autrement, vous pouvez spcifiez une adresse IP explicite 
      -     la place de <code>*</code> dans la directive
      -    <directive type="section" module="core" >VirtualHost</directive>. 
      -    Par exemple, cette mthode est utile si vous souhaitez faire 
      -    tourner quelques serveurs virtuels par nom sur une mme adresse 
      -    IP, et d'autres, soit par IP, soit bass sur un autre jeu de 
      +    <note><title>Héritage du nom de serveur</title>
      +       <p>Il est toujours préférable de définir une directive <directive
      +       module="core">ServerName</directive> au niveau de chaque serveur
      +       virtuel à base de nom. Si un serveur virtuel ne définit pas
      +       de directive  <directive module="core">ServerName</directive>, le
      +       nom de ce serveur virtuel sera hérité du serveur principal. Si
      +       aucun nom de serveur n'a été explicitement défini au niveau du
      +       serveur principal, le serveur tentera de déterminer son nom via
      +       une résolution de nom DNS inverse sur la première adresse
      +       d'écoute. Dans tous les cas, ce nom de serveur hérité influencera
      +       la sélection du serveur virtuel à base de nom, c'est pourquoi il
      +       est toujours préférable de définir une directive <directive
      +       module="core">ServerName</directive> pour chaque serveur virtuel
      +       à base de nom.</p>
      +    </note>
      +
      +    <p>Par exemple, supposez que vous hébergez le domaine
      +    <code>www.example.com</code> et que vous souhaitez ajouter le
      +    serveur virtuel <code>other.example.com</code> qui pointe sur
      +    la même adresse IP. Il vous suffit d'ajouter la configuration
      +    suivante à <code>httpd.conf</code>&nbsp;:</p>
      +
      +    <highlight language="config">
      +&lt;VirtualHost *:80&gt;
      +    # Le premier serveur virtuel de la liste est aussi le
      +    # serveur par défaut pour *:80
      +    ServerName www.example.com
      +    ServerAlias example.com
      +    DocumentRoot "/www/domain"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName other.example.com
      +    DocumentRoot "/www/otherdomain"
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>Autrement, vous pouvez spécifiez une adresse IP explicite
      +    à la place de <code>*</code> dans la directive
      +    <directive type="section" module="core" >VirtualHost</directive>.
      +    Par exemple, cette méthode est utile si vous souhaitez faire
      +    tourner quelques serveurs virtuels par nom sur une même adresse
      +    IP, et d'autres, soit par IP, soit basés sur un autre jeu de
           serveurs virtuels par nom sur une autre adresse IP.</p>
       
      -    <p>Plusieurs serveurs sont accessibles par plus d'un nom. Il 
      -    suffit de placer la directive 
      -    <directive module="core">ServerAlias</directive> dans une section 
      -    <directive type="section" module="core">VirtualHost</directive>. 
      -    Par exemple, dans la premire section 
      -    <directive type="section" module="core">VirtualHost</directive> 
      -    ci-dessus, la directive <directive module="core">ServerAlias</directive> 
      -    indique aux utilisateurs les autres noms permis pour accder au 
      -    mme site Web&nbsp;:</p>
      -
      -    <example>
      +    <p>Plusieurs serveurs sont accessibles par plus d'un nom. Il
      +    suffit de placer la directive
      +    <directive module="core">ServerAlias</directive> dans une section
      +    <directive type="section" module="core">VirtualHost</directive>.
      +    Par exemple, dans la première section
      +    <directive type="section" module="core">VirtualHost</directive>
      +    ci-dessus, la directive <directive module="core">ServerAlias</directive>
      +    indique aux utilisateurs les autres noms permis pour accéder au
      +    même site Web&nbsp;:</p>
      +
      +    <highlight language="config">
               ServerAlias example.com *.example.com
      -    </example>
      -
      -    <p>ainsi, toutes les requtes portant sur un domaine 
      -    <code>example.com</code> seront servies par le serveur virtuel 
      -    <code>www.example.com</code>. Les caractres joker <code>*</code> 
      -    et <code>?</code> peuvent tre utiliss pour les correspondances. 
      -    Bien entendu, vous ne pouvez pas inventer des noms et les placer 
      -    dans une directive <directive module="core">ServerName</directive> 
      -    ou <code>ServerAlias</code>. Tout d'abord, votre serveur DNS 
      -    doit tre correctement configur pour lier ces noms  une 
      -    adresse IP associe avec votre serveur.</p>
      -
      -    <p>Finalement, vous pouvez affiner la configuration des serveurs 
      -    virtuels en plaant d'autres directives  l'intrieur des sections 
      -    <directive type="section" module="core">VirtualHost</directive>. 
      -    La plupart des directives peut tre place dans ces sections en 
      -    y changeant seulement la configuration du serveur virtuel associ. 
      -    Pour dterminer si une directive particulire est permise, 
      +    </highlight>
      +
      +    <p>ainsi, toutes les requêtes portant sur un domaine
      +    <code>example.com</code> seront servies par le serveur virtuel
      +    <code>www.example.com</code>. Les caractères joker <code>*</code>
      +    et <code>?</code> peuvent être utilisés pour les correspondances.
      +    Bien entendu, vous ne pouvez pas inventer des noms et les placer
      +    dans une directive <directive module="core">ServerName</directive>
      +    ou <code>ServerAlias</code>. Tout d'abord, votre serveur DNS
      +    doit être correctement configuré pour lier ces noms à une
      +    adresse IP associée avec votre serveur.</p>
      +
      +    <p>La recherche du serveur virtuel à base de nom qui correspond au
      +    plus près à la requête s'effectue parmi les <directive
      +    type="section" module="core">virtualhost</directive> selon leur
      +    ordre d'apparition dans le fichier de configuration. Le premier
      +    serveur virtuel dont le <directive
      +    module="core">ServerName</directive> ou le <directive
      +    module="core">ServerAlias</directive> correspond est utilisé, sans
      +    priorité particulière en cas de présence de caractères génériques
      +    (que ce soit pour le ServerName ou le ServerAlias).</p>
      +
      +    <p>La liste complète des noms dans la section <directive
      +    module="core">VirtualHost</directive> sont traités comme une
      +    directive <directive module="core">ServerAlias</directive> sans
      +    caractères génériques.</p>
      +
      +    <p>Finalement, vous pouvez affiner la configuration des serveurs
      +    virtuels en plaçant d'autres directives à l'intérieur des sections
      +    <directive type="section" module="core">VirtualHost</directive>.
      +    La plupart des directives peut être placée dans ces sections en
      +    y changeant seulement la configuration du serveur virtuel associé.
      +    Pour déterminer si une directive particulière est permise,
           consultez le <a
           href="../mod/directive-dict.html#Context">contexte</a> de la
      -    directive. Le jeu de directives configures dans le contexte 
      -    du <em>serveur principal</em> (en dehors de toutes sections 
      -    <directive type="section" module="core">VirtualHost</directive>) 
      -    sera utilis seulement s'il n'y a pas de configuration contraire 
      +    directive. Le jeu de directives configurées dans le contexte
      +    du <em>serveur principal</em> (en dehors de toutes sections
      +    <directive type="section" module="core">VirtualHost</directive>)
      +    sera utilisé seulement s'il n'y a pas de configuration contraire
           par un serveur virtuel.</p>
       
       </section>
      diff --git a/docs/manual/vhosts/name-based.xml.ja b/docs/manual/vhosts/name-based.xml.ja
      index 74539ab46e7..9921227a957 100644
      --- a/docs/manual/vhosts/name-based.xml.ja
      +++ b/docs/manual/vhosts/name-based.xml.ja
      @@ -1,7 +1,7 @@
       <?xml version="1.0" encoding="UTF-8" ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
      -<!-- English Revision: 420990:1174747 (outdated) -->
      +<!-- English Revision: 420990:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/name-based.xml.ko b/docs/manual/vhosts/name-based.xml.ko
      index ab2107275b0..b22ed3caec2 100644
      --- a/docs/manual/vhosts/name-based.xml.ko
      +++ b/docs/manual/vhosts/name-based.xml.ko
      @@ -1,7 +1,7 @@
       <?xml version='1.0' encoding='EUC-KR' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
      -<!-- English Revision: 420990:1174747 (outdated) -->
      +<!-- English Revision: 420990:1673563 (outdated) -->
       
       <!--
        Licensed to the Apache Software Foundation (ASF) under one or more
      diff --git a/docs/manual/vhosts/name-based.xml.meta b/docs/manual/vhosts/name-based.xml.meta
      index c87cdc59f24..02dd49e4b06 100644
      --- a/docs/manual/vhosts/name-based.xml.meta
      +++ b/docs/manual/vhosts/name-based.xml.meta
      @@ -12,6 +12,6 @@
           <variant>fr</variant>
           <variant outdated="yes">ja</variant>
           <variant outdated="yes">ko</variant>
      -    <variant outdated="yes">tr</variant>
      +    <variant>tr</variant>
         </variants>
       </metafile>
      diff --git a/docs/manual/vhosts/name-based.xml.tr b/docs/manual/vhosts/name-based.xml.tr
      index 9e98212816a..2de3b0f787b 100644
      --- a/docs/manual/vhosts/name-based.xml.tr
      +++ b/docs/manual/vhosts/name-based.xml.tr
      @@ -1,10 +1,10 @@
       <?xml version='1.0' encoding='UTF-8' ?>
       <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
       <?xml-stylesheet type="text/xsl" href="../style/manual.tr.xsl"?>
      -<!-- English Revision: 659902:1174747 (outdated) -->
      +<!-- English Revision: 1673563 -->
       <!-- =====================================================
      - Translated by: Nilgün Belma Bugüner <nilgun belgeler.org>
      -   Reviewed by: Orhan Berent <berent belgeler.org>
      + Translated by: Nilgün Belma Bugüner <nilgun belgeler.gen.tr>
      +   Reviewed by: Orhan Berent <berent belgeler.gen.tr>
       ========================================================== -->
       
       <!--
      @@ -40,45 +40,66 @@
       Barındırma</a></seealso>
       <seealso><a href="examples.html">Çok kullanılan sanal konak yapılandırma
       örnekleri</a></seealso>
      -<seealso><a href="examples.html#serverpath">ServerPath yapılandırma örneği</a>
      -</seealso>
       
       <section id="namevip"><title>İsme dayalı ve IP’ye dayalı Sanal Konaklar</title>
       
      -    <p>IP’ye dayalı sanal konaklarda sunulacak sanal konağı doğru tespit
      -      edebilmek için bağlantının yapıldığı IP adresine bakılır. Bu bakımdan her
      -      konak için ayrı bir IP adresine gereksinim vardır. İsme dayalı sanal
      -      konaklarda ise sunucu, istemcinin HTTP başlığının bir parçası olarak
      -      gönderdiği konak adını kullanır. Bu teknikte aynı IP adresini çok sayıda
      -      farklı konak kullanabilir.</p>
      +    <p><a href="ip-based.html">IP’ye dayalı sanal konaklar</a>da sunulacak
      +      sanal konağı doğru tespit edebilmek için bağlantının yapıldığı IP
      +      adresine bakılır. Bu bakımdan her konak için ayrı bir IP adresine
      +      gereksinim vardır.</p>
      +
      +    <p>İsme dayalı sanal konaklarda ise sunucu, istemcinin HTTP başlığının bir
      +      parçası olarak gönderdiği konak adını kullanır. Bu teknikte aynı IP
      +      adresini çok sayıda farklı konak kullanabilir.</p>
       
           <p>İsme dayalı sanal barındırma nispeten daha kolaydır, çünkü her konak
             ismini doğru IP adresiyle eşlemek için DNS sunucunuzu yapılandırdıktan
             sonra Apache HTTP sunucusunu farklı konak isimlerini tanıyacak şekilde
             yapılandırmanız yeterli olur. İsme dayalı sanal barındırma ayrıca zaten
             kıt olan IP adreslerine talebi de azaltır. Bu nedenle, IP’ye dayalı sanal
      -      konakları kullanmanızı gerektirecek çok özel bir sebep olmadıkça isme
      -      dayalı sanal konaklar kullanmalısınız. IP’ye dayalı sanal konakların
      -      kullanımını gerektirebilecek bazı durumlar:</p>
      -
      -    <ul>
      -        <li>Bazı tarihi istemciler isme dayalı sanal konaklarla uyumlu değildir.
      -          İsme dayalı sanal konakların çalışması için istemcinin HTTP Host
      -          başlığı göndermesi gerekir. Bu da HTTP/1.1 desteği gerektirir.
      -          Günümüzdeki HTTP/1.0 istemcileri bir eklenti olarak HTTP/1.1’i de
      -          desteklemektedir. Tarihi eser haline gelmiş HTTP/1.1 desteği
      -          bulurmayan eski istemcileri hala isme dayalı sanal konaklarla
      -          desteklemek isterseniz bu belgenin sonunda bunu mümkün kılabilecek bir
      -          tekniğe yer verilmiştir.</li>
      -
      -        <li>İsme dayalı sanal konaklar SSL portokolünün doğası gereğince SSL’li
      -          güvenli sunucular için kullanılamazlar.</li>
      -
      -        <li>Bazı işletim sistemlerinin ve ağ donanımlarının gerçekleştirdiği
      -          band genişliği yönetim teknikleri IP adresleri farklı olmadığı sürece
      -          konaklar arasında ayrım yapamazlar.</li>
      -    </ul>
      +      konakları kullanmanızı gerektiren donanım kullanmadıkça isme  dayalı
      +      sanal konaklar kullanmalısınız. İstemci uyumuna bağlı IP’ye dayalı
      +      sanal barındırma için eskiden varolan sebepler genel amaçlı bir HTTP
      +      sunucusu için artık uygulanabilir değildir.</p>
      +
      +    <p>İsme dayalı sanal barındırma, IP'ye dayalı sanal barındırma seçim
      +      algoritmasını kullanmaz, yani uygun sunucu ismini arama işlemi sadece en
      +      iyi IP'ye dayalı adrese sahip sanal konaklar arasında gerçekleşir.</p>
      +
      +</section>
       
      +<section id="alg">
      +  <title>Sunucu isme dayalı sanal konaklardan uygun olanını nasıl seçer</title>
      +
      +    <p>İsme dayalı sanal konak çözümlemesinin ilk adımının IP'ye dayalı
      +      çözümleme olduğunun anlaşılması çok önemlidir. İsme dayalı sanal konak
      +      çözümlemesi en uygun isme dayalı sanal konağı seçerken önce en iyi IP'ye
      +      dayalı eşleşme adaylarının sayısını azaltır, sonra bunlar arasından en
      +      uygununu seçer. Tüm <code>VirtualHost</code> yönergelerinde IP adresi
      +      yerine joker kullanımı bu IP'ye dayalı eşlemeyi yersiz kılar.</p>
      +
      +    <p>Bir istek geldiğinde, sunucu, istekte kullanılan IP adresi ve portu ile
      +      en iyi eşleşen <directive type="section" module="core"
      +      >VirtualHost</directive> bileşenini bulur. Bu IP adresi ve port çifti ile
      +      eşleşen birden fazla sanal konak varsa, Apache httpd istekte kullanılan
      +      sunucu ismini <directive module="core" >ServerName</directive> ve
      +      <directive module="core">ServerAlias</directive> yönergelerindeki
      +      isimlerle karşılaştırır.</p>
      +
      +    <p>Herhangi bir isme dayalı sanal konakta <directive
      +      module="core">ServerName</directive> yönergesini kullanmazsanız, sunucu
      +      bu yönergeye sistem konak adından türetilmiş tam nitelenmiş alan adının
      +      (FQDN) tanımlandığını varsayacaktır. Bu örtük atama sezgiselliğin
      +      istenmediği bir sanal konak eşleşmesi ile sonuçlanabilir ve bu
      +      önerilmez.</p>
      +
      +  <section id="defaultvhost">
      +   <title>Bir IP adresi ve port çifti için öntanımlı isme dayalı sankon</title>
      +    <p><directive module="core" >ServerName</directive> ve
      +      <directive module="core">ServerAlias</directive> yönergelerinde bir
      +      eşleşme bulunamazsa, Apache httpd bu çift ile eşleşen <strong>sanal
      +      konaklar listesindeki ilk sanal konağı</strong> kullanır.</p>
      +  </section>
       </section>
       
       <section id="using"><title>İsme Dayalı Sanal Konakların Kullanımı</title>
      @@ -89,85 +110,79 @@ Barındırma</a></seealso>
           </modulelist>
       
           <directivelist>
      -	<directive module="core">DocumentRoot</directive>
      -	<directive module="core">NameVirtualHost</directive>
      -	<directive module="core">ServerAlias</directive>
      -	<directive module="core">ServerName</directive>
      -	<directive module="core">ServerPath</directive>
      -	<directive module="core" type="section">VirtualHost</directive>
      +      <directive module="core">DocumentRoot</directive>
      +      <directive module="core">ServerAlias</directive>
      +      <directive module="core">ServerName</directive>
      +      <directive module="core" type="section">VirtualHost</directive>
           </directivelist>
       </related>
       
      -    <p>İsme dayalı sanal konakları kullanmak için, bu konaklar için istekleri
      -      kabul edecek sunucuya IP adresini (ve muhtemelen portu da)
      -      belirtmelisiniz. Bu işlem <directive
      -      module="core">NameVirtualHost</directive> yönergesiyle yapılır. Normal
      -      şartlar altında sunucu üzerinde bütün IP adreslerinin kullanılması
      -      gerekir; bunun için <directive module="core">NameVirtualHost</directive>
      -      yönergesine argüman olarak <code>*</code> belirtebilirsiniz. Çok sayıda
      -      port kullanmayı planlıyorsanız (SSL çalıştırmak gibi), argümana
      -      <code>*:80</code> şeklinde port ekleyebilirsiniz. Yalnız, <directive
      -      module="core">NameVirtualHost</directive> yönergesinde bir IP adresi
      -      belirtmiş olmakla sunucunun kendiliğinden o IP adresini dinlemeyeceğine
      -      dikkat ediniz. Bu konuda ayrıntılı bilgi edinmek için <a
      -      href="../bind.html">Apache’nin kullanacağı adreslerin ve portların
      -      ayarlanması</a> belgesine bakınız. Ayrıca, sunucuda, burada belirttiğiniz
      -      IP adresine sahip bir ağ arabirimi olmalıdır.</p>
      -
      -    <p>Sonraki adım sunacağınız her konak için ayrı bir <directive
      -      type="section" module="core">VirtualHost</directive> bölümü oluşturmaktır.
      -      <directive type="section" module="core">VirtualHost</directive>
      -      yönergesinin argümanı ile eşleşen bir <directive
      -      module="core">NameVirtualHost</directive> yönergesi tanımlanmış olmalıdır
      -      (değer normalde "*:80" olacaktır). Her <directive type="section"
      -      module="core">VirtualHost</directive> bölümü içinde sunulan konağı
      -      belirtmek üzere en azından bir adet <directive
      -      module="core">ServerName</directive> yönergesine ve konak içeriğinin dosya
      -      sisteminde bulunduğu yeri gösteren bir <directive
      -      module="core">DocumentRoot</directive> yönergesine
      -      ihtiyacınız olacaktır.</p>
      +    <p>İlk adım sunacağınız her konak için ayrı bir <directive type="section"
      +      module="core">VirtualHost</directive> bölümü oluşturmaktır. Her
      +      <directive type="section" module="core" >VirtualHost</directive> bölümü
      +      içinde sunulan konağı belirtmek üzere en azından bir adet <directive
      +      module="core">ServerName</directive> yönergesine ve konak içeriğinin
      +      dosya sisteminde bulunduğu yeri gösteren bir <directive
      +      module="core">DocumentRoot</directive> yönergesine ihtiyacınız
      +      olacaktır.</p>
       
           <note><title>Ana konağı unutmayın</title>
      -        <p>Mevcut sitenize sanal konaklar eklerseniz, mevcut siteniz için de bir
      -          <directive type="section" module="core">VirtualHost</directive> bölümü
      -          oluşturmalısınız. Bu sanal konak bölümü içinde kullanacağınız
      -          <directive module="core">ServerName</directive> ve <directive
      -          module="core">DocumentRoot</directive> yönergelerinin argümanları, bu
      -          yönergelerin  sunucu geneli için belirttiğiniz değerlerini
      -          içermelidir. Bu sanal konağı yapılandırma dosyanızdaki ilk sanal konak
      -          yapın ki, öntanımlı konak olsun.</p>
      +      <p>Mevcut <directive type="section" module="core">VirtualHost</directive>
      +        yönergelerinin hiçbiriyle eşleşmeyen bir istek için, sunucu veya konak
      +        ismine bakılmaksızın genel sunucu yapılandırmanız kullanılır.</p>
      +
      +      <p>Mevcut sitenize isme dayalı bir sanal konak eklerseniz ve bu sanal
      +        konak ana sunucunun IP adresi ve portuna sahipse, ana sunucuya yapılan
      +        istekler için bu sanal konak kullanılır. Bu bakımdan, <directive
      +        module="core">ServerName</directive> yönergesi ana sunucununki ile aynı
      +        olan bir <a href="#defaultvhost">öntanımlı sanal konak</a> oluşturmak
      +        akıllıca olacaktır. Aynı arayüz ve portu kullanan fakat farklı
      +        yapılandırmalara sahip diğer alan isimlerinin sanal konakları (yani
      +        öntanımlı olmayanlar) bu öntanımlı sanal konağın sonrasına
      +        yerleştirilmelidir.</p>
      +    </note>
      +
      +    <note><title>ServerName miras alma</title>
      +       <p>İsme dayalı her sanal konak için daima bir <directive module="core"
      +       >ServerName</directive> belirtmek en iyisidir.</p>
      +
      +       <p>Eğer bir <directive module="core">VirtualHost</directive> bölümü
      +       içinde bir <directive module="core">ServerName</directive>
      +       belirtilmezse, sunucu ismi olarak ana sunucu yapılandırmasındaki isim
      +       kullanılır. Orada da bir sunucu ismi belirtilmemişse, başlatma sırasında
      +       dinlenen ilk IP adresinden ters DNS araması ile elde edilen isim
      +       kullanılır. Her iki durumda da miras alınan isim gereksiz yere isme
      +       dayalı sanal konak ismi haline gelecektir; bu bakımdan isme dayalı her
      +       sanal konak için daima bir <directive module="core"
      +       >ServerName</directive> belirtmek en iyisidir.</p>
           </note>
       
      -    <p>Örnek olarak, <code>www.biralan.tld</code> adresinden sitenizi sunmakta
      -      olduğunuzu ve bunun yanına aynı IP adresini kullanan
      -      <code>www.digeralan.tld</code> sanal konağını eklemek istediğinizi
      +    <p>Örnek olarak, <code>site1.example.com</code> adresinden sitenizi
      +      sunmakta olduğunuzu ve bunun yanına aynı IP adresini kullanan
      +      <code>site2.example.com</code> sanal konağını eklemek istediğinizi
             varsayalım. Bunun için <code>httpd.conf</code> dosyanıza basitçe şu
             satırları ekleyebilirsiniz:</p>
       
      -    <example>
      -        NameVirtualHost *:80<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>
      -            ServerName www.biralan.tld<br />
      -            ServerAlias biralan.tld *.biralan.tld<br />
      -            DocumentRoot /siteler/biralan<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -        <br />
      -        &lt;VirtualHost *:80&gt;<br />
      -        <indent>ServerName www.digeralan.tld<br />
      -            DocumentRoot /siteler/digeralan<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -    </example>
      -
      -    <p>İsterseniz, <directive module="core">NameVirtualHost</directive> ve
      -      <directive type="section" module="core">VirtualHost</directive>
      -      yönergelerinde argüman olarak <code>*</code> yerine doğrudan bir IP adresi
      -      belirtebilirsiniz. Hatta, daha sonra, isme dayalı sanal konakları bir IP
      -      adresinden ve IP’ye dayalı olanları veya isme dayalı diğer bir sanal konak
      -      grubunu diğer IP adreslerinden sunmak isteyebilirsiniz.</p>
      +    <highlight language="config">
      +&lt;VirtualHost *:80&gt;
      +    #İlk sanal konak aynı zamanda *:80 için de öntanımlıdır.
      +    ServerName site1.example.com
      +    ServerAlias example.com
      +    DocumentRoot "/siteler/site1"
      +&lt;/VirtualHost&gt;
      +
      +&lt;VirtualHost *:80&gt;
      +    ServerName site2.example.com
      +    DocumentRoot "/siteler/site2"
      +&lt;/VirtualHost&gt;
      +    </highlight>
      +
      +    <p>İsterseniz, <directive type="section" module="core"
      +      >VirtualHost</directive> yönergesinde argüman olarak <code>*</code>
      +      yerine doğrudan bir IP adresi belirtebilirsiniz. Hatta, daha sonra, isme
      +      dayalı sanal konakları bir IP adresinden ve IP’ye dayalı olanları veya
      +      isme dayalı diğer bir sanal konak grubunu diğer IP adreslerinden sunmak
      +      isteyebilirsiniz.</p>
       
           <p>Çoğu sunucunun birden fazla isim ile erişilebilir olması istenir. Bu,
             <directive type="section" module="core">VirtualHost</directive> bölümü
      @@ -176,20 +191,31 @@ Barındırma</a></seealso>
             kullanıcıların aynı siteye farklı isimlerle erişmelerini mümkün kılmak
             için bölüm içine şu satırı ekleyebilirsiniz:</p>
       
      -    <example>
      -        ServerAlias biralan.tld *.biralan.tld
      -    </example>
      +    <highlight language="config">
      +ServerAlias example.com *.example.com
      +    </highlight>
       
      -    <p>Böylece <code>biralan.tld</code> alanındaki tüm konaklar için gelen
      -      isteklere <code>www.biralan.tld</code> sanal konağından hizmet sunulmuş
      +    <p>Böylece <code>example.com</code> alanındaki tüm konaklar için gelen
      +      isteklere <code>www.example.com</code> sanal konağından hizmet sunulmuş
             olur. Konak isimleriyle eşleşmek üzere dosya ismi kalıp karakterleri
      -      <code>*</code> ve <code>?</code> kullanılabilir. Şüphesiz bu isimleri sırf
      -      <directive module="core">ServerName</directive> veya
      +      <code>*</code> ve <code>?</code> kullanılabilir. Şüphesiz bu isimleri
      +      sırf <directive module="core">ServerName</directive> veya
             <code>ServerAlias</code> yönergesinde belirtmiş olmakla bu isimleri
             erişilebilir kılamazsınız. Öncelikle, bu isimleri sunucunuzdaki IP
             adresleriyle eşlemek üzere yapılandıracağınız bir DNS sunucunuz
             olmalıdır.</p>
       
      +    <p>İsme dayalı sanal konaklardan en iyi eşleşme kümesinde olanlar
      +      yapılandırmada göründükleri sıraya göre işleme sokulur. Joker
      +      kullanımları arasında fark gözetilmeksizin <directive module="core"
      +      >ServerName</directive> veya <directive module="core"
      +      >ServerAlias</directive> yönergesi eşleşen ilk sanal konak
      +      kullanılır.</p>
      +
      +    <p><code>VirtualHost</code> içindeki isimlerin sırası (jokersiz) bir
      +      <code>ServerAlias</code> gibi ele alınır (fakat hiçbir
      +      <code>ServerAlias</code> yönergesi ile geçersiz kılınmaz).</p>
      +
           <p>Son olarak, sanal konak yapılandırmanıza, <directive type="section"
             module="core">VirtualHost</directive> bölümlerinin içine başka yönergeler
             yerleştirerek ince ayar çekebilirsiniz. Çoğu yönerge bu bölümlere
      @@ -202,78 +228,6 @@ Barındırma</a></seealso>
             yapılandırma yönergelerinden sadece sanal konak bölümlerinde geçersiz
             kılınmamış olanlar kullanılacaktır.</p>
       
      -    <p>Sunucuya bir istek geldiğinde, sunucu önce IP adresiyle eşleşmesi olası
      -      <directive module="core">NameVirtualHost</directive> bölümleri var mı diye
      -      bakar. Varsa, IP adresini eşleştirmek için <directive
      -      module="core">NameVirtualHost</directive> bölümlerine tek tek bakar ve
      -      istenen konak ismi ile eşleşen bir <directive module="core"
      -      >ServerName</directive> veya <code>ServerAlias</code> yönergesi bulmaya
      -      çalışır. Bir tane bulduğunda, sunucu için onun yapılandırmasını kullanır.
      -      İsimle eşleşen bir sanal konak bulamazsa IP adresiyle eşleşen <strong>ilk
      -      sanal konağın</strong> yapılandırmasını kullanır.</p>
      -
      -    <p>Bir önkabul olarak yapılandırma dosyasında rastlanan ilk sanal konak
      -      <em>öntanımlı</em> sanal konaktır. IP adresi bir sanal konakla eşleştiği
      -      takdirde <em>ana sunucunun</em> <directive module="core"
      -      >DocumentRoot</directive> değeri <strong>asla</strong> kullanılmayacaktır.
      -      Sanal konaklardan hiçbiriyle eşleşmeyen istekler için özel bir
      -      yapılandırmanız olsun isterseniz, bu yapılandırmayı yapılandırma
      -      dosyanızdaki ilk <directive type="section"
      -      module="core">VirtualHost</directive> bölümüne yerleştirmeniz
      -      yetecektir.</p>
      -
       </section>
       
      -<section id="compat"><title>Artık Tarihe Karışmış Tarayıcılarla Uyumluluk</title>
      -
      -    <p>Evvelce de bahsedildiği gibi, isme dayalı sanal konakların gerektiği gibi
      -      çalışması için gerekli veriyi göndermeyen bazı istemciler vardır. Bu
      -      istemcilere daima o IP adresinin yapılandırma dosyasındaki ilk sanal
      -      konağının (isme dayalı <cite>başat</cite> sanal konak) sayfaları
      -      gönderilir.</p>
      -
      -    <note><title>Ne kadar eski?</title>
      -    <p>Lütfen dikkat edin, eski deyince gerçekten de antika demek istiyoruz.
      -      Günümüzde bu tür tarayıcılara rastlamanız neredeyse imkansızdır. Günümüz
      -      tarayıcılarının hepsi isme dayalı sanal konakların gerektirdiği
      -      <code>Host</code> başlığını gönderirler.</p>
      -    </note>
      -
      -    <p>Olayı fazla germeden <directive module="core">ServerPath</directive>
      -      yönergesini kullanarak sorunun çevresinden dolanmak mümkündür:</p>
      -
      -    <p>Örnek yapılandırma:</p>
      -
      -    <example>
      -        NameVirtualHost 111.22.33.44<br />
      -        <br />
      -        &lt;VirtualHost 111.22.33.44&gt;<br />
      -        <indent>
      -            ServerName www.biralan.tld<br />
      -            ServerPath /biralan<br />
      -            DocumentRoot /siteler/biralan<br />
      -        </indent>
      -        &lt;/VirtualHost&gt;<br />
      -    </example>
      -
      -    <p>Bu ne anlama geliyor? Anlamı, "<code>/biralan</code>" ile başlayan her
      -      URI isteği <code>www.biralan.tld</code> sanal konağı tarafından sunulacak,
      -      demektir. Yani, tüm istemcilerin
      -      <code>http://www.biralan.tld/biralan/</code> olarak eriştiği yere
      -      <code>Host:</code> başlığı gönderen istemciler
      -      <code>http://www.biralan.tld/</code> olarak erişirler.</p>
      -
      -    <p>Bunu gerçekleştirebilmek için başat sanal konağın baş sayfasına
      -      <code>http://www.biralan.tld/biralan/</code> için bir bağ koyduktan sonra
      -      sanal konağın sayfalarında ya tamamen göreli bağlar
      -      ("<code>dosya.html</code>", "<code>../simgeler/resim.png</code>" gibi)
      -      veya <code>/biralan/</code> ile öncelenmiş bağlar
      -      ("<code>http://www.biralan.tld/biralan/muht/dosya.html</code>" veya
      -      "<code>/biralan/muht/dosya.html</code>" gibi) kullanın.</p>
      -
      -    <p>Bu işlem biraz disiplin gerektirse de bu yazılanlara sıkı sıkıya bağlı
      -      kalarak hem eski hem de yeni tarayıcıların sayfalarınızı doğru
      -      görüntülemesini sağlamış olursunuz.</p>
      -
      -</section>
       </manualpage>
      diff --git a/httpd.dep b/httpd.dep
      new file mode 100644
      index 00000000000..8c977d85946
      --- /dev/null
      +++ b/httpd.dep
      @@ -0,0 +1,68 @@
      +# Microsoft Developer Studio Generated Dependency File, included by httpd.mak
      +
      +.\build\win32\httpd.rc : \
      +	".\include\ap_release.h"\
      +	
      +
      +.\server\main.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_md5.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr-util\include\apu_version.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_version.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/httpd.mak b/httpd.mak
      new file mode 100644
      index 00000000000..6ac1cbd98a8
      --- /dev/null
      +++ b/httpd.mak
      @@ -0,0 +1,344 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on httpd.dsp
      +!IF "$(CFG)" == ""
      +CFG=httpd - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to httpd - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "httpd - Win32 Release" && "$(CFG)" != "httpd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "httpd.mak" CFG="httpd - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "httpd - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "httpd - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "httpd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\httpd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\httpd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.idb"
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\main.obj"
      +	-@erase "$(OUTDIR)\httpd.exe"
      +	-@erase "$(OUTDIR)\httpd.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\httpd" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "./include" /i "./srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="httpd.exe" /d LONG_NAME="Apache HTTP Server" /d ICON_FILE="apache.ico" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\httpd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /stack:0x40000 /subsystem:console /incremental:no /pdb:"$(OUTDIR)\httpd.pdb" /debug /out:"$(OUTDIR)\httpd.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\main.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	".\srclib\apr\Release\libapr-1.lib" \
      +	".\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"$(OUTDIR)\libhttpd.lib"
      +
      +"$(OUTDIR)\httpd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\httpd.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\httpd.exe"
      +   if exist .\Release\httpd.exe.manifest mt.exe -manifest .\Release\httpd.exe.manifest -outputresource:.\Release\httpd.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "httpd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\httpd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\httpd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.idb"
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\main.obj"
      +	-@erase "$(OUTDIR)\httpd.exe"
      +	-@erase "$(OUTDIR)\httpd.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\httpd" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "./include" /i "./srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="httpd.exe" /d LONG_NAME="Apache HTTP Server" /d ICON_FILE="apache.ico" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\httpd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /stack:0x40000 /subsystem:console /incremental:no /pdb:"$(OUTDIR)\httpd.pdb" /debug /out:"$(OUTDIR)\httpd.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\main.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	".\srclib\apr\Debug\libapr-1.lib" \
      +	".\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"$(OUTDIR)\libhttpd.lib"
      +
      +"$(OUTDIR)\httpd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\httpd.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\httpd.exe"
      +   if exist .\Debug\httpd.exe.manifest mt.exe -manifest .\Debug\httpd.exe.manifest -outputresource:.\Debug\httpd.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("httpd.dep")
      +!INCLUDE "httpd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "httpd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "httpd - Win32 Release" || "$(CFG)" == "httpd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "httpd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\.."
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "httpd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\.."
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "httpd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\.."
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "httpd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\.."
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "httpd - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd "."
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "httpd - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd "."
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=.\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "httpd - Win32 Release"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "./include" /i "./srclib/apr/include" /i "build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="httpd.exe" /d LONG_NAME="Apache HTTP Server" /d ICON_FILE="apache.ico" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "httpd - Win32 Debug"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "./include" /i "./srclib/apr/include" /i "build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="httpd.exe" /d LONG_NAME="Apache HTTP Server" /d ICON_FILE="apache.ico" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\server\main.c
      +
      +"$(INTDIR)\main.obj" : $(SOURCE) "$(INTDIR)"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/include/ap_config.h b/include/ap_config.h
      index 1a22329bf9d..944b16afe9a 100644
      --- a/include/ap_config.h
      +++ b/include/ap_config.h
      @@ -148,7 +148,7 @@
       #define AP_NONBLOCK_WHEN_MULTI_LISTEN 1
       #endif
       
      -#if AP_ENABLE_DTRACE && HAVE_SYS_SDT_H
      +#if defined(AP_ENABLE_DTRACE) && HAVE_SYS_SDT_H
       #include <sys/sdt.h>
       #else
       #undef _DTRACE_VERSION
      @@ -165,11 +165,14 @@
       #define AP_HAVE_RELIABLE_PIPED_LOGS TRUE
       #endif
       
      +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
      +#define AP_HAVE_C99
      +#endif
      +
       /* Presume that the compiler supports C99-style designated
        * initializers if using GCC (but not G++), or for any other compiler
        * which claims C99 support. */
      -#if (defined(__GNUC__) && !defined(__cplusplus))                \
      -     || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
      +#if (defined(__GNUC__) && !defined(__cplusplus)) || defined(AP_HAVE_C99)
       #define AP_HAVE_DESIGNATED_INITIALIZER
       #endif
       
      @@ -177,17 +180,27 @@
       #define __has_attribute(x) 0
       #endif
       #if (defined(__GNUC__) && __GNUC__ >= 4) || __has_attribute(sentinel)
      -#define ap_func_attr_sentinel __attribute__((sentinel))
      +#define AP_FN_ATTR_SENTINEL __attribute__((sentinel))
       #else
      -#define ap_func_attr_sentinel
      +#define AP_FN_ATTR_SENTINEL
       #endif
       
       #if ( defined(__GNUC__) &&                                        \
             (__GNUC__ >= 4 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 4))) \
           || __has_attribute(warn_unused_result)
      -#define ap_func_attr_warn_unused_result   __attribute__((warn_unused_result))
      +#define AP_FN_ATTR_WARN_UNUSED_RESULT   __attribute__((warn_unused_result))
      +#else
      +#define AP_FN_ATTR_WARN_UNUSED_RESULT
      +#endif
      +
      +#if ( defined(__GNUC__) &&                                        \
      +      (__GNUC__ >= 4 && __GNUC_MINOR__ >= 3))                     \
      +    || __has_attribute(alloc_size)
      +#define AP_FN_ATTR_ALLOC_SIZE(x)     __attribute__((alloc_size(x)))
      +#define AP_FN_ATTR_ALLOC_SIZE2(x,y)  __attribute__((alloc_size(x,y)))
       #else
      -#define ap_func_attr_warn_unused_result
      +#define AP_FN_ATTR_ALLOC_SIZE(x)
      +#define AP_FN_ATTR_ALLOC_SIZE2(x,y)
       #endif
       
       #endif /* AP_CONFIG_H */
      diff --git a/include/ap_expr.h b/include/ap_expr.h
      index 409c7acd4ce..55fff36317b 100644
      --- a/include/ap_expr.h
      +++ b/include/ap_expr.h
      @@ -18,7 +18,7 @@
        * @file ap_expr.h
        * @brief Expression parser
        *
      - * @defgroup AP_EXPR ap_expr
      + * @defgroup AP_EXPR Expression parser
        * @ingroup  APACHE_CORE
        * @{
        */
      @@ -107,7 +107,7 @@ typedef struct {
           request_rec *r;
           /** the current connection */
           conn_rec *c;
      -    /** the current connection */
      +    /** the current virtual host */
           server_rec *s;
           /** the pool to use */
           apr_pool_t *p;
      @@ -130,6 +130,8 @@ typedef struct {
           const char **result_string;
           /** Arbitrary context data provided by the caller for custom functions */
           void *data;
      +    /** The current recursion level */
      +    int reclvl;
       } ap_expr_eval_ctx_t;
       
       /**
      diff --git a/include/ap_listen.h b/include/ap_listen.h
      index 21101cd8d3f..58c2574ff40 100644
      --- a/include/ap_listen.h
      +++ b/include/ap_listen.h
      @@ -77,6 +77,8 @@ struct ap_listen_rec {
        * The global list of ap_listen_rec structures
        */
       AP_DECLARE_DATA extern ap_listen_rec *ap_listeners;
      +AP_DECLARE_DATA extern int ap_num_listen_buckets;
      +AP_DECLARE_DATA extern int ap_have_so_reuseport;
       
       /**
        * Setup all of the defaults for the listener list
      @@ -91,11 +93,34 @@ AP_DECLARE(void) ap_listen_pre_config(void);
        */
       AP_DECLARE(int) ap_setup_listeners(server_rec *s);
       
      +/**
      + * This function duplicates ap_listeners into multiple buckets when configured
      + * to (see ListenCoresBucketsRatio) and the platform supports it (eg. number of
      + * online CPU cores and SO_REUSEPORT available).
      + * @param p The config pool
      + * @param s The global server_rec
      + * @param buckets The array of listeners buckets.
      + * @param num_buckets The total number of listeners buckets (array size).
      + * @remark If the given *num_buckets is 0 (input), it will be computed
      + *         according to the platform capacities, otherwise (positive) it
      + *         will be preserved. The number of listeners duplicated will
      + *         always match *num_buckets, be it computed or given.
      + */
      +AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s,
      +                                                ap_listen_rec ***buckets,
      +                                                int *num_buckets);
      +
       /**
        * Loop through the global ap_listen_rec list and close each of the sockets.
        */
       AP_DECLARE_NONSTD(void) ap_close_listeners(void);
       
      +/**
      + * Loop through the given ap_listen_rec list and close each of the sockets.
      + * @param listeners The listener to close.
      + */
      +AP_DECLARE_NONSTD(void) ap_close_listeners_ex(ap_listen_rec *listeners);
      +
       /**
        * FIXMEDOC
        */
      @@ -109,6 +134,7 @@ AP_DECLARE_NONSTD(int) ap_close_selected_listeners(ap_slave_t *);
        * called.
        */
       AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg);
      +AP_DECLARE_NONSTD(const char *) ap_set_listencbratio(cmd_parms *cmd, void *dummy, const char *arg);
       AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
                                                       int argc, char *const argv[]);
       AP_DECLARE_NONSTD(const char *) ap_set_send_buffer_size(cmd_parms *cmd, void *dummy,
      @@ -120,6 +146,8 @@ AP_DECLARE_NONSTD(const char *) ap_set_receive_buffer_size(cmd_parms *cmd,
       #define LISTEN_COMMANDS \
       AP_INIT_TAKE1("ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, \
         "Maximum length of the queue of pending connections, as used by listen(2)"), \
      +AP_INIT_TAKE1("ListenCoresBucketsRatio", ap_set_listencbratio, NULL, RSRC_CONF, \
      +  "Ratio between the number of CPU cores (online) and the number of listeners buckets"), \
       AP_INIT_TAKE_ARGV("Listen", ap_set_listener, NULL, RSRC_CONF, \
         "A port number or a numeric IP address and a port number, and an optional protocol"), \
       AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
      diff --git a/include/ap_mmn.h b/include/ap_mmn.h
      index dac9c1f5117..124057ca7d6 100644
      --- a/include/ap_mmn.h
      +++ b/include/ap_mmn.h
      @@ -365,14 +365,143 @@
        * 20111025.1 (2.3.15-dev) Add ap_escape_urlencoded(), ap_escape_urlencoded_buffer()
        *                         and ap_unescape_urlencoded().
        * 20111025.2 (2.3.15-dev) Add ap_lua_ssl_val to mod_lua
      + * 20111025.3 (2.4.0-dev)  Add reclvl to ap_expr_eval_ctx_t
      + * 20111122.0 (2.4.0-dev)  Remove parts of conn_state_t that are private to the MPM
      + * 20111123.0 (2.4.0-dev)  Pass ap_errorlog_info struct to error_log hook,
      + *                         add pool to ap_errorlog_info.
      + * 20111130.0 (2.4.0-dev)  c->remote_ip becomes c->peer_ip and r->client_ip,
      + *                         c->remote_addr becomes c->peer_addr and r->client_addr
      + * 20111201.0 (2.4.0-dev)  Add invalidate_entity() to the cache provider.
      + * 20111202.0 (2.4.0-dev)  Use apr_status_t across mod_session API.
      + * 20111202.1 (2.4.0-dev)  add APLOGNO()
      + * 20111203.0 (2.4.0-dev)  Optional ap_proxy_retry_worker(), remove
      + *                         ap_proxy_string_read(), ap_cache_liststr(),
      + *                         ap_proxy_buckets_lifetime_transform(),
      + *                         ap_proxy_date_canon(), ap_proxy_is_ipaddr(),
      + *                         ap_proxy_is_domainname(), ap_proxy_is_hostname(),
      + *                         ap_proxy_is_word(), ap_proxy_hex2sec(),
      + *                         ap_proxy_sec2hex(), ap_proxy_make_fake_req(),
      + *                         ap_proxy_strmatch_path, ap_proxy_strmatch_domain,
      + *                         ap_proxy_table_unmerge(), proxy_lb_workers.
      + * 20120109.0 (2.4.1-dev)  Changes sizeof(overrides_t) in core config.
      + * 20120109.1 (2.4.1-dev)  remove sb_type in global_score.
      + * 20120109.2 (2.4.1-dev)  Make core_output_filter_ctx_t and core_ctx_t
      + *                         private;
      + *                         move core_net rec definition to http_core.h;
      + *                         add insert_network_bucket hook, AP_DECLINED
      + * 20120211.0 (2.4.1-dev)  Change re_nsub in ap_regex_t from apr_size_t to int.
      + * 20120211.1 (2.4.2-dev)  Add AP_HAVE_C99
      + * 20120211.2 (2.4.2-dev)  Add ap_runtime_dir_relative
      + * 20120211.3 (2.4.2-dev)  Add forcerecovery to proxy_balancer_shared struct
      + * 20120211.4 (2.4.3-dev)  Add ap_list_provider_groups()
      + * 20120211.5 (2.4.3-dev)  Add missing HTTP status codes registered with IANA.
      + * 20120211.6 (2.4.3-dev)  Add ap_proxy_checkproxyblock2.
      + * 20120211.7 (2.4.3-dev)  Add ap_get_loadavg()
      + * 20120211.8 (2.4.3-dev)  Add sticky_separator to proxy_balancer_shared struct.
      + * 20120211.9 (2.4.4-dev)  Add fgrab() to ap_slotmem_provider_t.
      + * 20120211.10 (2.4.4-dev) Add in bal_persist field to proxy_server_conf
      + * 20120211.11 (2.4.4-dev) Add ap_bin2hex()
      + * 20120211.12 (2.4.5-dev) Add ap_remove_input|output_filter_byhandle()
      + * 20120211.13 (2.4.5-dev) Add ap_get_exec_line
      + * 20120211.14 (2.4.5-dev) Add ppinherit and inherit to proxy_server_conf
      + * 20120211.15 (2.4.5-dev) Add dav_join_error()
      + * 20120211.16 (2.4.5-dev) Add cache_control_t.invalidated
      + * 20120211.17 (2.4.5-dev) Add ap_find_etag_weak(), ap_find_etag_strong()
      + * 20120211.18 (2.4.5-dev) Add ap_condition_e, ap_condition_if_match(),
      + *                         ap_condition_if_unmodified_since(),
      + *                         ap_condition_if_none_match(),
      + *                         ap_condition_if_modified_since(),
      + *                         ap_condition_if_range()
      + * 20120211.19 (2.4.5-dev) Add post_perdir_config hook.
      + * 20120211.20 (2.4.5-dev) Add dirwalk_stat hook.
      + * 20120211.21 (2.4.5-dev) Add in ap_proxy_create_hdrbrgd() and
      + *                         ap_proxy_pass_brigade()
      + * 20120211.22 (2.4.5-dev) No longer prevent usage of strtoul()
      + * 20120211.23 (2.4.5-dev) Add ap_proxy_clear_connection()
      + * 20120211.24 (2.4.7-dev) add open_htaccess hook.
      + * 20120211.25 (2.4.7-dev) Add conn_sense_e
      + * 20120211.26 (2.4.7-dev) Add util_fcgi.h, FastCGI protocol support
      + * 20120211.27 (2.4.7-dev) Add ap_podx_restart_t and ap_mpm_podx_*
      + * 20120211.28 (2.4.7-dev) Add ap_regname
      + * 20120211.29 (2.4.7-dev) Add uds_path to proxy_conn_rec and proxy_worker_shared.
      + *                         The change to proxy_worker_shared is an
      + *                         unintended API break, especially for balancer
      + *                         lbmethod modules.
      + * 20120211.30 (2.4.7-dev) REWRITE_REDIRECT_HANDLER_NAME in mod_rewrite.h
      + * 20120211.31 (2.4.7-dev) Add ap_proxy_port_of_scheme()
      + * 20120211.32 (2.4.10-dev) Add SSL reusable SNI to mod_proxy.h's proxy_conn_rec
      + * 20120211.33 (2.4.10-dev) Add suspend_connection and resume_connection hooks
      + * 20120211.34 (2.4.10-dev) AP_DEFAULT_HANDLER_NAME/AP_IS_DEFAULT_HANDLER_NAME
      + * 20120211.35 (2.4.10-dev) Add "r", "must_rebind", and last_backend_conn
      +                            to util_ldap_connection_t
      + * 20120211.36 (2.4.10-dev) Add ap_copy_scoreboard_worker()
      + * 20120211.37 (2.4.11-dev) Add r->trailers_{in,out}
      + * 20120211.38 (2.4.11-dev) Added ap_shutdown_conn().
      + * 20120211.39 (2.4.11-dev) Add ap_proxy_connect_uds().
      + * 20120211.40 (2.4.11-dev) Add ap_log_data(), ap_log_rdata(), etc.
      + * 20120211.41 (2.4.11-dev) Add ap_proxy_de_socketfy to mod_proxy.h
      + * 20120211.42 (2.4.13-dev) Add response_code_exprs to http_core.h
      + * 20120211.43 (2.4.13-dev) Add keep_alive_timeout_set to server_rec
      + * 20120211.44 (2.4.13-dev) Add cgi_pass_auth and AP_CGI_PASS_AUTH_* to
      + *                          core_dir_config
      + * 20120211.45 (2.4.13-dev) Add ap_proxy_connection_reusable()
      + * 20120211.46 (2.4.13-dev) Add ap_map_http_request_error()
      + * 20120211.47 (2.4.13-dev) Add ap_some_authn_required, ap_force_authn hook.
      + *                          Deprecate broken ap_some_auth_required.
      + * 20120211.48 (2.4.17-dev) Added ap_log_mpm_common().
      + * 20120211.49 (2.4.17-dev) Add listener bucket in scoreboard.h's process_score.
      + * 20120211.50 (2.4.17-dev) Add ap_set_listencbratio(), ap_close_listeners_ex(),
      + *                          ap_duplicate_listeners(), ap_num_listen_buckets and
      + *                          ap_have_so_reuseport to ap_listen.h.
      + * 20120211.51 (2.4.17-dev) Add protocols and protocols_honor_order to
      + *                          core_server_config. Add hooks protocol_propose
      + *                          protocol_switch and protocol_get. Add
      + *                          ap_select_protocol(), ap_switch_protocol(),
      + *                          ap_get_protocol(). Add HTTP_MISDIRECTED_REQUEST.
      + *                          Added ap_parse_token_list_strict() to httpd.h
      + * 20120211.52 (2.4.17-dev) Add master conn_rec* member in conn_rec.
      + * 20120211.53 (2.4.19-dev) Add expr_handler to core_dir_config.
      + * 20120211.54 (2.4.19-dev) Add ap_proxy_buckets_lifetime_transform and
      + *                          ap_proxy_transfer_between_connections to
      + *                          mod_proxy.h
      + * 20120211.55 (2.4.19-dev) Add new ap_update_child_status...() methods,
      + *                          add protocol to worker_score in scoreboard.h,
      + *                          Add pre_close connection hook and
      + *                          ap_prep_lingering_close().
      + * 20120211.56 (2.4.19-dev) Split useragent_host from the conn_rec into
      + *                          the request_rec, with ap_get_useragent_host()
      + * 20120211.57 (2.4.19-dev) Add mod_ssl_openssl.h and OpenSSL-specific hooks
      + * 20120211.58 (2.4.21-dev) Add cgi_var_rules to core_dir_config.
      + * 20120211.59 (2.4.21-dev) Add ap_getword_conf2[_nc](),
      + *                          ap_proxy_is_socket_connected() and
      + *                          extended proxy_worker_shared.
      + * 20120211.60 (2.4.21-dev) Add dav_get_provider_name.
      + * 20120211.61 (2.4.21-dev) Add ap_cstr_casecmp[n]() - placeholder of apr_ fns
      + * 20120211.62 (2.4.24-dev) Add childtags to dav_error.
      + * 20120211.63 (2.4.24-dev) Add dav_begin_multistatus, dav_send_one_response,
      + *                          dav_finish_multistatus, dav_send_multistatus,
      + *                          dav_handle_err, dav_failed_proppatch,
      + *                          dav_success_proppatch.
      + * 20120211.64 (2.4.24-dev) Add ap_proxy_check_backend(), and tmp_bb to struct
      + *                          proxy_conn_rec.
      + * 20120211.65 (2.4.24-dev) Add ap_check_pipeline().
      + * 20120211.66 (2.4.24-dev) Rename ap_proxy_check_backend() to
      + *                          ap_proxy_check_connection().
      + * 20120211.67 (2.4.24-dev) Add http09_enable, http_conformance, and
      + *                          http_methods to core_server_config
      + *                          Add ap_scan_http_field_token(),
      + *                          ap_scan_http_field_content(),
      + *                          and ap_scan_vchar_obstext()
      + *                          Replaced fold boolean with with multiple bit flags
      + *                          to ap_[r]getline()
        */
       
       #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
       
       #ifndef MODULE_MAGIC_NUMBER_MAJOR
      -#define MODULE_MAGIC_NUMBER_MAJOR 20111025
      +#define MODULE_MAGIC_NUMBER_MAJOR 20120211
       #endif
      -#define MODULE_MAGIC_NUMBER_MINOR 2                   /* 0...n */
      +#define MODULE_MAGIC_NUMBER_MINOR 67                   /* 0...n */
       
       /**
        * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
      diff --git a/include/ap_mpm.h b/include/ap_mpm.h
      index b061c0a23b8..71f8f47caa2 100644
      --- a/include/ap_mpm.h
      +++ b/include/ap_mpm.h
      @@ -218,7 +218,7 @@ extern void moncontrol(int);
       #define AP_MONCONTROL(x)
       #endif
       
      -#if AP_ENABLE_EXCEPTION_HOOK
      +#ifdef AP_ENABLE_EXCEPTION_HOOK
       typedef struct ap_exception_info_t {
           int sig;
           pid_t pid;
      diff --git a/include/ap_provider.h b/include/ap_provider.h
      index adfc69cad69..0a6c10cf564 100644
      --- a/include/ap_provider.h
      +++ b/include/ap_provider.h
      @@ -36,6 +36,10 @@ typedef struct {
           const char *provider_name;
       } ap_list_provider_names_t;
       
      +typedef struct {
      +    const char *provider_group;
      +    const char *provider_version;
      +} ap_list_provider_groups_t;
       
       /**
        * This function is used to register a provider with the global
      @@ -78,6 +82,16 @@ AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool,
                                                     const char *provider_group,
                                                     const char *provider_version);
       
      +/**
      + * This function is used to retrieve a list (array) of provider groups and versions
      + * @param pool The pool to create any storage from
      + * @return pointer to array of ap_list_provider_groups_t of provider groups
      + *         and versions (could be empty)
      + */
      +
      +AP_DECLARE(apr_array_header_t *) ap_list_provider_groups(apr_pool_t *pool);
      +
      +
       #ifdef __cplusplus
       }
       #endif
      diff --git a/include/ap_regex.h b/include/ap_regex.h
      index 787dc599a9a..be41226beef 100644
      --- a/include/ap_regex.h
      +++ b/include/ap_regex.h
      @@ -77,6 +77,8 @@ extern "C" {
       #define AP_REG_NOMEM 0x20    /* nomem in our code */
       #define AP_REG_DOTALL 0x40   /* perl's /s flag */
       
      +#define AP_REG_MATCH "MATCH_" /** suggested prefix for ap_regname */
      +
       /* Error values: */
       enum {
         AP_REG_ASSERT = 1,  /** internal error ? */
      @@ -88,7 +90,7 @@ enum {
       /* The structure representing a compiled regular expression. */
       typedef struct {
           void *re_pcre;
      -    apr_size_t re_nsub;
      +    int re_nsub;
           apr_size_t re_erroffset;
       } ap_regex_t;
       
      @@ -149,6 +151,16 @@ AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
       AP_DECLARE(apr_size_t) ap_regerror(int errcode, const ap_regex_t *preg,
                                          char *errbuf, apr_size_t errbuf_size);
       
      +/**
      + * Return an array of named regex backreferences
      + * @param preg The precompiled regex
      + * @param names The array to which the names will be added
      + * @param upper If non zero, uppercase the names
      + */
      +AP_DECLARE(int) ap_regname(const ap_regex_t *preg,
      +                           apr_array_header_t *names, const char *prefix,
      +                           int upper);
      +
       /** Destroy a pre-compiled regex.
        * @param preg The pre-compiled regex to free.
        */
      diff --git a/include/ap_release.h b/include/ap_release.h
      index e267443f012..a8d8bfe8631 100644
      --- a/include/ap_release.h
      +++ b/include/ap_release.h
      @@ -22,10 +22,8 @@
       #ifndef AP_RELEASE_H
       #define AP_RELEASE_H
       
      -#include "apr_general.h" /* stringify */
      -
       #define AP_SERVER_COPYRIGHT \
      -  "Copyright 2011 The Apache Software Foundation."
      +  "Copyright 2016 The Apache Software Foundation."
       
       /*
        * The below defines the base string of the Server: header. Additional
      @@ -44,16 +42,26 @@
       #define AP_SERVER_BASEPRODUCT "Apache"
       
       #define AP_SERVER_MAJORVERSION_NUMBER 2
      -#define AP_SERVER_MINORVERSION_NUMBER 3
      -#define AP_SERVER_PATCHLEVEL_NUMBER   16
      +#define AP_SERVER_MINORVERSION_NUMBER 4
      +#define AP_SERVER_PATCHLEVEL_NUMBER   26
       #define AP_SERVER_DEVBUILD_BOOLEAN    1
       
       /* Synchronize the above with docs/manual/style/version.ent */
       
      -#if AP_SERVER_DEVBUILD_BOOLEAN
      -#define AP_SERVER_ADD_STRING          "-dev"
      -#else
      +#if !AP_SERVER_DEVBUILD_BOOLEAN
       #define AP_SERVER_ADD_STRING          ""
      +#else
      +#ifndef AP_SERVER_ADD_STRING
      +#define AP_SERVER_ADD_STRING          "-dev"
      +#endif
      +#endif
      +
      +/* APR_STRINGIFY is defined here, and also in apr_general.h, so wrap it */
      +#ifndef APR_STRINGIFY
      +/** Properly quote a value as a string in the C preprocessor */
      +#define APR_STRINGIFY(n) APR_STRINGIFY_HELPER(n)
      +/** Helper macro for APR_STRINGIFY */
      +#define APR_STRINGIFY_HELPER(n) #n
       #endif
       
       /* keep old macros as well */
      diff --git a/include/ap_slotmem.h b/include/ap_slotmem.h
      index 6d69bdd3036..e1615e91e8a 100644
      --- a/include/ap_slotmem.h
      +++ b/include/ap_slotmem.h
      @@ -39,6 +39,7 @@
       #include "apr_shm.h"
       #include "apr_global_mutex.h"
       #include "apr_file_io.h"
      +#include "apr_md5.h"
       
       #if APR_HAVE_UNISTD_H
       #include <unistd.h>         /* for getpid() */
      @@ -62,15 +63,19 @@ typedef unsigned int ap_slotmem_type_t;
        * AP_SLOTMEM_TYPE_NOTMPSAFE:
        *
        * AP_SLOTMEM_TYPE_PREALLOC: Access to slots require they be grabbed 1st
      + *
      + * AP_SLOTMEM_TYPE_CLEARINUSE: If persisting, clear 'inuse' array before
      + *    storing
        */
      -#define AP_SLOTMEM_TYPE_PERSIST   (1 << 0)
      -#define AP_SLOTMEM_TYPE_NOTMPSAFE (1 << 1)
      -#define AP_SLOTMEM_TYPE_PREGRAB   (1 << 2)
      +#define AP_SLOTMEM_TYPE_PERSIST      (1 << 0)
      +#define AP_SLOTMEM_TYPE_NOTMPSAFE    (1 << 1)
      +#define AP_SLOTMEM_TYPE_PREGRAB      (1 << 2)
      +#define AP_SLOTMEM_TYPE_CLEARINUSE   (1 << 3)
       
       typedef struct ap_slotmem_instance_t ap_slotmem_instance_t;
       
       /**
      - * callback function used for slotmem.
      + * callback function used for slotmem doall.
        * @param mem is the memory associated with a worker.
        * @param data is what is passed to slotmem.
        * @param pool is pool used
      @@ -95,24 +100,26 @@ struct ap_slotmem_provider_t {
           /**
            * create a new slotmem with each item size is item_size.
            * This would create shared memory, basically.
      -     * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
      +     * @param inst where to store pointer to slotmem
      +     * @param name a key used for debugging and in mod_status output or allow another process to share this space.
            * @param item_size size of each item
            * @param item_num number of item to create.
            * @param type type of slotmem.
            * @param pool is pool used
            * @return APR_SUCCESS if all went well
            */
      -    apr_status_t (* create)(ap_slotmem_instance_t **new, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool);
      +    apr_status_t (* create)(ap_slotmem_instance_t **inst, const char *name, apr_size_t item_size, unsigned int item_num, ap_slotmem_type_t type, apr_pool_t *pool);
           /**
            * attach to an existing slotmem.
            * This would attach to  shared memory, basically.
      -     * @param name is a key used for debugging and in mod_status output or allow another process to share this space.
      +     * @param inst where to store pointer to slotmem
      +     * @param name a key used for debugging and in mod_status output or allow another process to share this space.
            * @param item_size size of each item
            * @param item_num max number of item.
            * @param pool is pool to memory allocate.
            * @return APR_SUCCESS if all went well
            */
      -    apr_status_t (* attach)(ap_slotmem_instance_t **new, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool);
      +    apr_status_t (* attach)(ap_slotmem_instance_t **inst, const char *name, apr_size_t *item_size, unsigned int *item_num, apr_pool_t *pool);
           /**
            * get the memory ptr associated with this worker slot.
            * @param s ap_slotmem_instance_t to use.
      @@ -173,6 +180,13 @@ struct ap_slotmem_provider_t {
            * @return APR_SUCCESS if all went well
            */
           apr_status_t (* release)(ap_slotmem_instance_t *s, unsigned int item_id);
      +    /**
      +     * forced grab (or alloc) a slot associated with this item_id
      +     * @param s ap_slotmem_instance_t to use.
      +     * @param item_id to the specified slot id and marked as in-use
      +     * @return APR_SUCCESS if all went well
      +     */
      +    apr_status_t (* fgrab)(ap_slotmem_instance_t *s, unsigned int item_id);
       };
       
       typedef struct ap_slotmem_provider_t ap_slotmem_provider_t;
      diff --git a/include/ap_socache.h b/include/ap_socache.h
      index c258dc56759..e404d2d4631 100644
      --- a/include/ap_socache.h
      +++ b/include/ap_socache.h
      @@ -87,19 +87,19 @@ typedef apr_status_t (ap_socache_iterator_t)(ap_socache_instance_t *instance,
        * with the ap_provider.h interface using the AP_SOCACHE_PROVIDER_*
        * constants. */
       typedef struct ap_socache_provider_t {
      -    /** Canonical provider name: */
      +    /** Canonical provider name. */
           const char *name;
       
      -    /** Bitmask of AP_SOCACHE_FLAG_* flags: */
      +    /** Bitmask of AP_SOCACHE_FLAG_* flags. */
           unsigned int flags;
       
           /**
            * Create a session cache based on the given configuration string.
      -     * The instance pointer returned in the instance paramater will be
      +     * The instance pointer returned in the instance parameter will be
            * passed as the first argument to subsequent invocations.
            *
            * @param instance Output parameter to which instance object is written.
      -     * @param arg Used-specified configuration string.  May be NULL to
      +     * @param arg User-specified configuration string.  May be NULL to
            *        force use of defaults.
            * @param tmp Pool to be used for any temporary allocations
            * @param p Pool to be use for any allocations lasting as long as
      @@ -109,13 +109,14 @@ typedef struct ap_socache_provider_t {
           const char *(*create)(ap_socache_instance_t **instance, const char *arg,
                                 apr_pool_t *tmp, apr_pool_t *p);
       
      -    /* Initialize the cache.  The cname must be of maximum length 16
      +    /**
      +     * Initialize the cache.  The cname must be of maximum length 16
            * characters, and uniquely identifies the consumer of the cache
            * within the server; using the module name is recommended, e.g.
            * "mod_ssl-sess".  This string may be used within a filesystem
            * path so use of only alphanumeric [a-z0-9_-] characters is
            * recommended.  If hints is non-NULL, it gives a set of hints for
      -     * the provider.  Return APR error code.
      +     * the provider.  Returns APR error code.
            *
            * @param instance The cache instance
            * @param cname A unique string identifying the consumer of this API
      @@ -155,6 +156,7 @@ typedef struct ap_socache_provider_t {
       
           /**
            * Retrieve a cached object.
      +     * 
            * @param instance The cache instance
            * @param s Associated server structure (for logging purposes)
            * @param id Unique ID for the object; binary blob
      @@ -171,7 +173,9 @@ typedef struct ap_socache_provider_t {
                                    unsigned char *data, unsigned int *datalen,
                                    apr_pool_t *pool);
       
      -    /* Remove an object from the cache
      +    /**
      +     * Remove an object from the cache
      +     *
            * @param instance The cache instance
            * @param s Associated server structure (for logging purposes)
            * @param id Unique ID for the object; binary blob
      @@ -182,7 +186,8 @@ typedef struct ap_socache_provider_t {
                                  const unsigned char *id, unsigned int idlen,
                                  apr_pool_t *pool);
       
      -    /** Dump the status of a cache instance for mod_status.  Will use
      +    /** 
      +     * Dump the status of a cache instance for mod_status.  Will use
            * the ap_r* interfaces to produce appropriate status output.
            * XXX: ap_r* are deprecated, bad dogfood
            *
      diff --git a/include/heartbeat.h b/include/heartbeat.h
      index 7f9ed385216..40f98c3a34a 100644
      --- a/include/heartbeat.h
      +++ b/include/heartbeat.h
      @@ -14,18 +14,18 @@
        * limitations under the License.
        */
       
      -#ifndef HEARTBEAT_H
      -#define HEARTBEAT_H
      -
       /**
        * @file  heartbeat.h
      - * @brief commun structures for mod_heartmonitor.c  and mod_lbmethod_heartbeat.c
      + * @brief commun structures for mod_heartmonitor.c and mod_lbmethod_heartbeat.c
        *
      - * @defgroup HEARTBEAT mem
      + * @defgroup HEARTBEAT heartbeat
        * @ingroup  APACHE_MODS
        * @{
        */
       
      +#ifndef HEARTBEAT_H
      +#define HEARTBEAT_H
      +
       #include "apr.h"
       #include "apr_time.h"
       
      @@ -47,9 +47,14 @@ typedef struct hm_slot_server_t
           int id;
       } hm_slot_server_t;
       
      +/* default name of heartbeat data file, created in the configured
      + * runtime directory when mod_slotmem_shm is not available
      + */
      +#define DEFAULT_HEARTBEAT_STORAGE "hb.dat"
      +
       #ifdef __cplusplus
       }
       #endif
       
      -#endif
      +#endif /* HEARTBEAT_H */
       /** @} */
      diff --git a/include/http_config.h b/include/http_config.h
      index 649f4f6baf6..66c5b3192fb 100644
      --- a/include/http_config.h
      +++ b/include/http_config.h
      @@ -50,7 +50,7 @@ enum cmd_how {
           RAW_ARGS,           /**< cmd_func parses command line itself */
           TAKE1,              /**< one argument only */
           TAKE2,              /**< two arguments only */
      -    ITERATE,            /**< one argument, occuring multiple times
      +    ITERATE,            /**< one argument, occurring multiple times
                                * (e.g., IndexIgnore)
                                */
           ITERATE2,           /**< two arguments, 2nd occurs multiple times
      @@ -197,7 +197,7 @@ typedef const char *(*cmd_func) ();
       #endif /* AP_HAVE_DESIGNATED_INITIALIZER */
       
       /**
      - * The command record structure.  Each modules can define a table of these
      + * The command record structure.  Modules can define a table of these
        * to define the directives it will implement.
        */
       typedef struct command_struct command_rec;
      @@ -242,6 +242,13 @@ struct command_struct {
       #define EXEC_ON_READ 256     /**< force directive to execute a command
                       which would modify the configuration (like including another
                       file, or IFModule */
      +/* Flags to determine whether syntax errors in .htaccess should be
      + * treated as nonfatal (log and ignore errors)
      + */
      +#define NONFATAL_OVERRIDE 512    /* Violation of AllowOverride rule */
      +#define NONFATAL_UNKNOWN 1024    /* Unrecognised directive */
      +#define NONFATAL_ALL (NONFATAL_OVERRIDE|NONFATAL_UNKNOWN)
      +
       /** this directive can be placed anywhere */
       #define OR_ALL (OR_LIMIT|OR_OPTIONS|OR_FILEINFO|OR_AUTHCFG|OR_INDEXES)
       
      @@ -260,7 +267,7 @@ struct ap_configfile_t {
           /**< an apr_file_getc()-like function */
           apr_status_t (*getch) (char *ch, void *param);
           /**< an apr_file_gets()-like function */
      -    apr_status_t (*getstr) (void *buf, size_t bufsiz, void *param);
      +    apr_status_t (*getstr) (void *buf, apr_size_t bufsiz, void *param);
           /**< a close handler function */
           apr_status_t (*close) (void *param);
           /**< the argument passed to getch/getstr/close */
      @@ -402,6 +409,23 @@ struct module_struct {
           void (*register_hooks) (apr_pool_t *p);
       };
       
      +/**
      + * The AP_MAYBE_UNUSED macro is used for variable declarations that
      + * might potentially exhibit "unused var" warnings on some compilers if
      + * left untreated.
      + * Since static intializers are not part of the C language (C89), making
      + * (void) usage is not possible. However many compiler have proprietary 
      + * mechanism to suppress those warnings.  
      + */
      +#ifdef AP_MAYBE_UNUSED
      +#elif defined(__GNUC__)
      +# define AP_MAYBE_UNUSED(x) x __attribute__((unused)) 
      +#elif defined(__LCLINT__)
      +# define AP_MAYBE_UNUSED(x) /*@unused@*/ x  
      +#else
      +# define AP_MAYBE_UNUSED(x) x
      +#endif
      +    
       /**
        * The APLOG_USE_MODULE macro is used choose which module a file belongs to.
        * This is necessary to allow per-module loglevel configuration.
      @@ -417,7 +441,7 @@ struct module_struct {
        */
       #define APLOG_USE_MODULE(foo) \
           extern module AP_MODULE_DECLARE_DATA foo##_module;                  \
      -    static int * const aplog_module_index = &(foo##_module.module_index)
      +    AP_MAYBE_UNUSED(static int * const aplog_module_index) = &(foo##_module.module_index)
       
       /**
        * AP_DECLARE_MODULE is a convenience macro that combines a call of
      @@ -485,7 +509,7 @@ AP_DECLARE(void *) ap_get_module_config(const ap_conf_vector_t *cv,
                                               const module *m);
       
       /**
      - * Generic accessors for other modules to set at their own module-specific
      + * Generic accessors for other modules to set their own module-specific
        * data
        * @param cv The vector in which the modules configuration is stored.
        *        usually r->per_dir_config or s->module_config
      @@ -699,6 +723,14 @@ AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd,
        */
       AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *fname);
       
      +/**
      + * Compute the name of a run-time file (e.g., shared memory "file") relative
      + * to the appropriate run-time directory.  Absolute paths are returned as-is.
      + * The run-time directory is configured via the DefaultRuntimeDir directive or
      + * at build time.
      + */
      +AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *fname);
      +
       /* Finally, the hook for dynamically loading modules in... */
       
       /**
      @@ -773,7 +805,7 @@ AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p,
           const char *descr,
           void *param,
           apr_status_t (*getc_func) (char *ch, void *param),
      -    apr_status_t (*gets_func) (void *buf, size_t bufsiz, void *param),
      +    apr_status_t (*gets_func) (void *buf, apr_size_t bufsiz, void *param),
           apr_status_t (*close_func) (void *param));
       
       /**
      @@ -784,7 +816,7 @@ AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p,
        * @param cfp File to read from
        * @return error status, APR_ENOSPC if bufsize is too small for the line
        */
      -AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp);
      +AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, apr_size_t bufsize, ap_configfile_t *cfp);
       
       /**
        * Read one char from open configfile_t, increase line number upon LF
      @@ -797,7 +829,7 @@ AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp);
       /**
        * Detach from open ap_configfile_t, calling the close handler
        * @param cfp The file to close
      - * @return 1 on sucess, 0 on failure
      + * @return 1 on success, 0 on failure
        */
       AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp);
       
      @@ -818,6 +850,8 @@ AP_DECLARE(const char *) ap_pcfg_strerror(apr_pool_t *p, ap_configfile_t *cfp,
        * @param cmd The cmd_parms to pass to the directives inside the container
        * @param directive The directive name to read until
        * @return Error string on failure, NULL on success
      + * @note If cmd->pool == cmd->temp_pool, ap_soak_end_container() will assume
      + *       .htaccess context and use a lower maximum line length.
        */
       AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
       
      @@ -831,6 +865,8 @@ AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive);
        * @param curr_parent The current parent node
        * @param orig_directive The directive to read until hit.
        * @return Error string on failure, NULL on success
      + * @note If p == temp_pool, ap_build_cont_config() will assume .htaccess
      + *       context and use a lower maximum line length.
       */
       AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
                                                     apr_pool_t *temp_pool,
      @@ -846,6 +882,8 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
        * @param temp_pool The temporary pool
        * @param conftree Place to store the root node of the config tree
        * @return Error string on erro, NULL otherwise
      + * @note If conf_pool == temp_pool, ap_build_config() will assume .htaccess
      + *       context and use a lower maximum line length.
        */
       AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
                                                apr_pool_t *conf_pool,
      @@ -880,11 +918,11 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd,
       #define  NOT_IN_LIMIT           0x02 /**< Forbidden in &lt;Limit&gt; */
       #define  NOT_IN_DIRECTORY       0x04 /**< Forbidden in &lt;Directory&gt; */
       #define  NOT_IN_LOCATION        0x08 /**< Forbidden in &lt;Location&gt; */
      -#define  NOT_IN_FILES           0x10 /**< Forbidden in &lt;Files&gt; */
      +#define  NOT_IN_FILES           0x10 /**< Forbidden in &lt;Files&gt; or &lt;If&gt;*/
       #define  NOT_IN_HTACCESS        0x20 /**< Forbidden in .htaccess files */
      -/** Forbidden in &lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt;*/
      +/** Forbidden in &lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt;&lt;If&gt;*/
       #define  NOT_IN_DIR_LOC_FILE    (NOT_IN_DIRECTORY|NOT_IN_LOCATION|NOT_IN_FILES)
      -/** Forbidden in &lt;VirtualHost&gt;/&lt;Limit&gt;/&lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt; */
      +/** Forbidden in &lt;VirtualHost&gt;/&lt;Limit&gt;/&lt;Directory&gt;/&lt;Location&gt;/&lt;Files&gt;/&lt;If&gt; */
       #define  GLOBAL_ONLY            (NOT_IN_VIRTUALHOST|NOT_IN_LIMIT|NOT_IN_DIR_LOC_FILE)
       
       /** @} */
      @@ -1300,6 +1338,31 @@ AP_DECLARE_HOOK(int,quick_handler,(request_rec *r, int lookup_uri))
        */
       AP_DECLARE_HOOK(void,optional_fn_retrieve,(void))
       
      +/**
      + * Allow modules to open htaccess files or perform operations before doing so
      + * @param r The current request
      + * @param dir_name The directory for which the htaccess file should be opened
      + * @param access_name The filename  for which the htaccess file should be opened
      + * @param conffile Where the pointer to the opened ap_configfile_t must be
      + *        stored
      + * @param full_name Where the full file name of the htaccess file must be
      + *        stored.
      + * @return APR_SUCCESS on success,
      + *         APR_ENOENT or APR_ENOTDIR if no htaccess file exists,
      + *         AP_DECLINED to let later modules do the opening,
      + *         any other error code on error.
      + */
      +AP_DECLARE_HOOK(apr_status_t,open_htaccess,
      +                (request_rec *r, const char *dir_name, const char *access_name,
      +                 ap_configfile_t **conffile, const char **full_name))
      +
      +/**
      + * Core internal function, use ap_run_open_htaccess() instead.
      + */
      +apr_status_t ap_open_htaccess(request_rec *r, const char *dir_name,
      +        const char *access_name, ap_configfile_t **conffile,
      +        const char **full_name);
      +
       /**
        * A generic pool cleanup that will reset a pointer to NULL. For use with
        * apr_pool_cleanup_register.
      diff --git a/include/http_connection.h b/include/http_connection.h
      index 2192507d937..8bc009da3b7 100644
      --- a/include/http_connection.h
      +++ b/include/http_connection.h
      @@ -32,10 +32,6 @@
       #ifdef __cplusplus
       extern "C" {
       #endif
      -/**
      - * @file  http_connection.h
      - * @brief Apache connection library
      - */
       
       /**
        * This is the protocol module driver.  This calls all of the
      @@ -47,9 +43,18 @@ extern "C" {
        */
       AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd);
       
      +/**
      + * Shutdown the connection for writing.
      + * @param c The connection to shutdown
      + * @param flush Whether or not to flush pending data before
      + * @return APR_SUCCESS or the underlying error
      + */
      +AP_CORE_DECLARE(apr_status_t) ap_shutdown_conn(conn_rec *c, int flush);
      +
       /**
        * Flushes all remain data in the client send buffer
        * @param c The connection to flush
      + * @remark calls ap_shutdown_conn(c, 1)
        */
       AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c);
       
      @@ -57,10 +62,10 @@ AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c);
        * This function is responsible for the following cases:
        * <pre>
        * we now proceed to read from the client until we get EOF, or until
      - * MAX_SECS_TO_LINGER has passed.  the reasons for doing this are
      + * MAX_SECS_TO_LINGER has passed.  The reasons for doing this are
        * documented in a draft:
        *
      - * http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-connection-00.txt
      + * http://tools.ietf.org/html/draft-ietf-http-connection-00.txt
        *
        * in a nutshell -- if we don't make this effort we risk causing
        * TCP RST packets to be sent which can tear down a connection before
      @@ -70,6 +75,8 @@ AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c);
        */
       AP_DECLARE(void) ap_lingering_close(conn_rec *c);
       
      +AP_DECLARE(int) ap_prep_lingering_close(conn_rec *c);
      +
       AP_DECLARE(int) ap_start_lingering_close(conn_rec *c);
       
       /* Hooks */
      @@ -116,6 +123,18 @@ AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
        */
       AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
       
      +/**
      + * This hook implements different protocols.  Before a connection is closed,
      + * protocols might have to perform some housekeeping actions, such as 
      + * sending one last goodbye packet. The connection is, unless some other
      + * error already happened before, still open and operational.
      + * All pre-close-connection hooks are run until one returns something 
      + * other than ok or decline
      + * @param c The connection on which the request has been received.
      + * @return OK or DECLINED
      + */
      +AP_DECLARE_HOOK(int,pre_close_connection,(conn_rec *c))
      +
       /** End Of Connection (EOC) bucket */
       AP_DECLARE_DATA extern const apr_bucket_type_t ap_bucket_type_eoc;
       
      @@ -145,5 +164,5 @@ AP_DECLARE(apr_bucket *) ap_bucket_eoc_create(apr_bucket_alloc_t *list);
       }
       #endif
       
      -#endif  /* !APACHE_HTTP_REQUEST_H */
      +#endif  /* !APACHE_HTTP_CONNECTION_H */
       /** @} */
      diff --git a/include/http_core.h b/include/http_core.h
      index a6be6fb883f..35df5dc9601 100644
      --- a/include/http_core.h
      +++ b/include/http_core.h
      @@ -158,6 +158,32 @@ AP_DECLARE(int) ap_allow_overrides(request_rec *r);
        */
       AP_DECLARE(const char *) ap_document_root(request_rec *r);
       
      +/**
      + * Lookup the remote user agent's DNS name or IP address
      + * @ingroup get_remote_hostname
      + * @param req The current request
      + * @param type The type of lookup to perform.  One of:
      + * <pre>
      + *     REMOTE_HOST returns the hostname, or NULL if the hostname
      + *                 lookup fails.  It will force a DNS lookup according to the
      + *                 HostnameLookups setting.
      + *     REMOTE_NAME returns the hostname, or the dotted quad if the
      + *                 hostname lookup fails.  It will force a DNS lookup according
      + *                 to the HostnameLookups setting.
      + *     REMOTE_NOLOOKUP is like REMOTE_NAME except that a DNS lookup is
      + *                     never forced.
      + *     REMOTE_DOUBLE_REV will always force a DNS lookup, and also force
      + *                   a double reverse lookup, regardless of the HostnameLookups
      + *                   setting.  The result is the (double reverse checked)
      + *                   hostname, or NULL if any of the lookups fail.
      + * </pre>
      + * @param str_is_ip unless NULL is passed, this will be set to non-zero on
      + *        output when an IP address string is returned
      + * @return The remote hostname (based on the request useragent_ip)
      + */
      +AP_DECLARE(const char *) ap_get_useragent_host(request_rec *req, int type,
      +                                               int *str_is_ip);
      +
       /**
        * Lookup the remote client's DNS name or IP address
        * @ingroup get_remote_host
      @@ -180,7 +206,7 @@ AP_DECLARE(const char *) ap_document_root(request_rec *r);
        * </pre>
        * @param str_is_ip unless NULL is passed, this will be set to non-zero on output when an IP address
        *        string is returned
      - * @return The remote hostname
      + * @return The remote hostname (based on the connection client_ip)
        */
       AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
       
      @@ -239,7 +265,7 @@ AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r);
        * @param r The current request
        * @return the maximum number of bytes in XML request msg body
        */
      -AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r);
      +AP_DECLARE(apr_size_t) ap_get_limit_xml_body(const request_rec *r);
       
       /**
        * Install a custom response handler for a given status
      @@ -446,7 +472,7 @@ AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num);
       
       
       typedef unsigned char allow_options_t;
      -typedef unsigned char overrides_t;
      +typedef unsigned int overrides_t;
       
       /*
        * Bits of info that go into making an ETag for a file
      @@ -465,6 +491,17 @@ typedef unsigned long etag_components_t;
       /* This is the default value used */
       #define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
       
      +/* Generic ON/OFF/UNSET for unsigned int foo :2 */
      +#define AP_CORE_CONFIG_OFF   (0)
      +#define AP_CORE_CONFIG_ON    (1)
      +#define AP_CORE_CONFIG_UNSET (2)
      +
      +/* Generic merge of flag */
      +#define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
      +               over->field != AP_CORE_CONFIG_UNSET            \
      +               ? over->field                                  \
      +               : base->field                                   
      +
       /**
        * @brief Server Signature Enumeration
        */
      @@ -497,12 +534,7 @@ typedef struct {
           overrides_t override;
           allow_options_t override_opts;
       
      -    /* Custom response config. These can contain text or a URL to redirect to.
      -     * if response_code_strings is NULL then there are none in the config,
      -     * if it's not null then it's allocated to sizeof(char*)*RESPONSE_CODES.
      -     * This lets us do quick merges in merge_core_dir_configs().
      -     */
      -
      +    /* Used to be the custom response config. No longer used. */
           char **response_code_strings; /* from ErrorDocument, not from
                                          * ap_custom_response() */
       
      @@ -559,7 +591,7 @@ typedef struct {
           ap_regex_t *r;
       
           const char *mime_type;       /* forced with ForceType  */
      -    const char *handler;         /* forced with SetHandler */
      +    const char *handler;         /* forced by something other than SetHandler */
           const char *output_filters;  /* forced with SetOutputFilters */
           const char *input_filters;   /* forced with SetInputFilters */
           int accept_path_info;        /* forced with AcceptPathInfo */
      @@ -617,6 +649,29 @@ typedef struct {
           /** Max number of Range reversals (eg: 200-300, 100-125) allowed **/
           int max_reversals;
       
      +    /** Named back references */
      +    apr_array_header_t *refs;
      +
      +    /** Custom response config with expression support. The hash table
      +     * contains compiled expressions keyed against the custom response
      +     * code.
      +     */
      +    apr_hash_t *response_code_exprs;
      +
      +#define AP_CGI_PASS_AUTH_OFF     (0)
      +#define AP_CGI_PASS_AUTH_ON      (1)
      +#define AP_CGI_PASS_AUTH_UNSET   (2)
      +    /** CGIPassAuth: Whether HTTP authorization headers will be passed to
      +     * scripts as CGI variables; affects all modules calling
      +     * ap_add_common_vars(), as well as any others using this field as 
      +     * advice
      +     */
      +    unsigned int cgi_pass_auth : 2;
      +    unsigned int qualify_redirect_url :2;
      +    ap_expr_info_t  *expr_handler;         /* forced with SetHandler */
      +
      +    /** Table of rules for building CGI variables, NULL if none configured */
      +    apr_hash_t *cgi_var_rules;
       } core_dir_config;
       
       /* macro to implement off by default behaviour */
      @@ -663,6 +718,28 @@ typedef struct {
       #define AP_TRACE_ENABLE    1
       #define AP_TRACE_EXTENDED  2
           int trace_enable;
      +#define AP_MERGE_TRAILERS_UNSET    0
      +#define AP_MERGE_TRAILERS_ENABLE   1
      +#define AP_MERGE_TRAILERS_DISABLE  2
      +    int merge_trailers;
      +
      +    apr_array_header_t *protocols;
      +    int protocols_honor_order;
      +
      +#define AP_HTTP09_UNSET   0
      +#define AP_HTTP09_ENABLE  1
      +#define AP_HTTP09_DISABLE 2
      +    char http09_enable;
      +
      +#define AP_HTTP_CONFORMANCE_UNSET     0
      +#define AP_HTTP_CONFORMANCE_UNSAFE    1
      +#define AP_HTTP_CONFORMANCE_STRICT    2
      +    char http_conformance;
      +
      +#define AP_HTTP_METHODS_UNSET         0
      +#define AP_HTTP_METHODS_LENIENT       1
      +#define AP_HTTP_METHODS_REGISTERED    2
      +    char http_methods;
       
       } core_server_config;
       
      @@ -680,15 +757,42 @@ AP_CORE_DECLARE(const char *) ap_add_if_conf(apr_pool_t *p, core_dir_config *con
       AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
       
       /* Core filters; not exported. */
      -int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
      -                         ap_input_mode_t mode, apr_read_type_e block,
      -                         apr_off_t readbytes);
      +apr_status_t ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
      +                                  ap_input_mode_t mode, apr_read_type_e block,
      +                                  apr_off_t readbytes);
       apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b);
       
       
       AP_DECLARE(const char*) ap_get_server_protocol(server_rec* s);
       AP_DECLARE(void) ap_set_server_protocol(server_rec* s, const char* proto);
       
      +typedef struct core_output_filter_ctx core_output_filter_ctx_t;
      +typedef struct core_filter_ctx        core_ctx_t;
      +
      +typedef struct core_net_rec {
      +    /** Connection to the client */
      +    apr_socket_t *client_socket;
      +
      +    /** connection record */
      +    conn_rec *c;
      +
      +    core_output_filter_ctx_t *out_ctx;
      +    core_ctx_t *in_ctx;
      +} core_net_rec;
      +
      +/**
      + * Insert the network bucket into the core input filter's input brigade.
      + * This hook is intended for MPMs or protocol modules that need to do special
      + * socket setup.
      + * @param c The connection
      + * @param bb The brigade to insert the bucket into
      + * @param socket The socket to put into a bucket
      + * @return AP_DECLINED if the current function does not handle this connection,
      + *         APR_SUCCESS or an error otherwise.
      + */
      +AP_DECLARE_HOOK(apr_status_t, insert_network_bucket,
      +                (conn_rec *c, apr_bucket_brigade *bb, apr_socket_t *socket))
      +
       /* ----------------------------------------------------------------------
        *
        * Runtime status/management
      @@ -714,10 +818,10 @@ typedef struct {
       } ap_mgmt_item_t;
       
       /* Handles for core filters */
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_subreq_core_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_output_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_content_length_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_subreq_core_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_core_output_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_content_length_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_core_input_filter_handle;
       
       /**
        * This hook provdes a way for modules to provide metrics/statistics about
      @@ -767,7 +871,7 @@ typedef struct ap_errorlog_info {
           const server_rec *s;
       
           /** current conn_rec.
      -     *  Should be preferred over r->connecction
      +     *  Should be preferred over r->connection
            */
           const conn_rec *c;
       
      @@ -776,14 +880,17 @@ typedef struct ap_errorlog_info {
           /** r->main if r is a subrequest, otherwise equal to r */
           const request_rec *rmain;
       
      -    /** name of source file where the log message was produced. */
      +    /** pool passed to ap_log_perror, NULL otherwise */
      +    apr_pool_t *pool;
      +
      +    /** name of source file where the log message was produced, NULL if N/A. */
           const char *file;
           /** line number in the source file, 0 if N/A */
           int line;
       
           /** module index of module that produced the log message, APLOG_NO_MODULE if N/A. */
           int module_index;
      -    /** log level of error message, -1 if N/A */
      +    /** log level of error message (flags like APLOG_STARTUP have been removed), -1 if N/A */
           int level;
       
           /** apr error status related to the log message, 0 if no error */
      @@ -844,6 +951,19 @@ typedef struct {
           unsigned int min_loglevel;
       } ap_errorlog_format_item;
       
      +/**
      + * hook method to log error messages
      + * @ingroup hooks
      + * @param info pointer to ap_errorlog_info struct which contains all
      + *        the details
      + * @param errstr the (unformatted) message to log
      + * @warning Allocating from the usual pools (pool, info->c->pool, info->p->pool)
      + *          must be avoided because it can cause memory leaks.
      + *          Use a subpool if necessary.
      + */
      +AP_DECLARE_HOOK(void, error_log, (const ap_errorlog_info *info,
      +                                  const char *errstr))
      +
       AP_CORE_DECLARE(void) ap_register_log_hooks(apr_pool_t *p);
       AP_CORE_DECLARE(void) ap_register_config_hooks(apr_pool_t *p);
       
      diff --git a/include/http_log.h b/include/http_log.h
      index 6a1717bb379..2b61a110bfd 100644
      --- a/include/http_log.h
      +++ b/include/http_log.h
      @@ -108,6 +108,14 @@ extern "C" {
       #define DEFAULT_LOGLEVEL        APLOG_WARNING
       #endif
       
      +/**
      + * APLOGNO() should be used at the start of the format string passed
      + * to ap_log_error() and friends. The argument must be a 5 digit decimal
      + * number. It creates a tag of the form "AH02182: "
      + * See docs/log-message-tags/README for details.
      + */
      +#define APLOGNO(n)              "AH" #n ": "
      +
       /**
        * APLOG_NO_MODULE may be passed as module_index to ap_log_error() and related
        * functions if the module causing the log message is not known. Normally this
      @@ -133,7 +141,7 @@ extern "C" {
        * Constant to store module_index for the current file.
        * Objects with static storage duration are set to NULL if not
        * initialized explicitly. This means that if aplog_module_index
      - * is not initalized using the ::APLOG_USE_MODULE or the
      + * is not initialized using the ::APLOG_USE_MODULE or the
        * ::AP_DECLARE_MODULE macro, we can safely fall back to
        * use ::APLOG_NO_MODULE. This variable will usually be optimized away.
        */
      @@ -255,7 +263,7 @@ static int * const aplog_module_index;
       #define APLOGctrace7(c)             APLOG_C_IS_LEVEL(c,APLOG_TRACE7)
       #define APLOGctrace8(c)             APLOG_C_IS_LEVEL(c,APLOG_TRACE8)
       
      -extern int AP_DECLARE_DATA ap_default_loglevel;
      +AP_DECLARE_DATA extern int ap_default_loglevel;
       
       /**
        * APLOG_MARK is a convenience macro for use as the first three parameters in
      @@ -350,13 +358,13 @@ AP_DECLARE(void) ap_log_error(const char *file, int line, int module_index,
                                     int level, apr_status_t status,
                                     const server_rec *s, const char *fmt, ...);
       #else
      -#if __STDC_VERSION__ >= 199901L
      +#ifdef AP_HAVE_C99
       /* need additional step to expand APLOG_MARK first */
       #define ap_log_error(...) ap_log_error__(__VA_ARGS__)
       /* need server_rec *sr = ... for the case if s is verbatim NULL */
       #define ap_log_error__(file, line, mi, level, status, s, ...)           \
      -    do { const server_rec *sr = s; if (APLOG_MODULE_IS_LEVEL(sr, mi, level))      \
      -             ap_log_error_(file, line, mi, level, status, sr, __VA_ARGS__); \
      +    do { const server_rec *sr__ = s; if (APLOG_MODULE_IS_LEVEL(sr__, mi, level)) \
      +             ap_log_error_(file, line, mi, level, status, sr__, __VA_ARGS__);    \
           } while(0)
       #else
       #define ap_log_error ap_log_error_
      @@ -393,7 +401,7 @@ AP_DECLARE(void) ap_log_perror(const char *file, int line, int module_index,
                                      int level, apr_status_t status, apr_pool_t *p,
                                      const char *fmt, ...);
       #else
      -#if __STDC_VERSION__ >= 199901L && defined(APLOG_MAX_LOGLEVEL)
      +#if defined(AP_HAVE_C99) && defined(APLOG_MAX_LOGLEVEL)
       /* need additional step to expand APLOG_MARK first */
       #define ap_log_perror(...) ap_log_perror__(__VA_ARGS__)
       #define ap_log_perror__(file, line, mi, level, status, p, ...)            \
      @@ -435,7 +443,7 @@ AP_DECLARE(void) ap_log_rerror(const char *file, int line, int module_index,
                                      int level, apr_status_t status,
                                      const request_rec *r, const char *fmt, ...);
       #else
      -#if __STDC_VERSION__ >= 199901L
      +#ifdef AP_HAVE_C99
       /* need additional step to expand APLOG_MARK first */
       #define ap_log_rerror(...) ap_log_rerror__(__VA_ARGS__)
       #define ap_log_rerror__(file, line, mi, level, status, r, ...)              \
      @@ -479,7 +487,7 @@ AP_DECLARE(void) ap_log_cerror(const char *file, int line, int module_index,
                                      int level, apr_status_t status,
                                      const conn_rec *c, const char *fmt, ...);
       #else
      -#if __STDC_VERSION__ >= 199901L
      +#ifdef AP_HAVE_C99
       /* need additional step to expand APLOG_MARK first */
       #define ap_log_cerror(...) ap_log_cerror__(__VA_ARGS__)
       #define ap_log_cerror__(file, line, mi, level, status, c, ...)              \
      @@ -526,7 +534,7 @@ AP_DECLARE(void) ap_log_cserror(const char *file, int line, int module_index,
                                       const conn_rec *c, const server_rec *s,
                                       const char *fmt, ...);
       #else
      -#if __STDC_VERSION__ >= 199901L
      +#ifdef AP_HAVE_C99
       /* need additional step to expand APLOG_MARK first */
       #define ap_log_cserror(...) ap_log_cserror__(__VA_ARGS__)
       #define ap_log_cserror__(file, line, mi, level, status, c, s, ...)  \
      @@ -544,6 +552,180 @@ AP_DECLARE(void) ap_log_cserror_(const char *file, int line, int module_index,
                                    __attribute__((format(printf,8,9)));
       #endif
       
      +/*
      + * The buffer logging functions, ap_log_data, ap_log_rdata, ap_log_cdata,
      + * and ap_log_csdata log a buffer in printable and hex format.  The exact
      + * format is controlled by processing flags, described next.
      + */
      +
      +/**
      + * Processing flags for ap_log_data() et al
      + *
      + * AP_LOG_DATA_DEFAULT - default formatting, with printable chars and hex
      + * AP_LOG_DATA_SHOW_OFFSET - prefix each line with hex offset from the start
      + * of the buffer
      + */
      +#define AP_LOG_DATA_DEFAULT       0
      +#define AP_LOG_DATA_SHOW_OFFSET   1
      +
      +/**
      + * ap_log_data() - log buffers which are not related to a particular request
      + * or connection.
      + * @param file The file in which this function is called
      + * @param line The line number on which this function is called
      + * @param module_index The module_index of the module logging this buffer
      + * @param level The log level
      + * @param s The server on which we are logging
      + * @param label A label for the buffer, to be logged preceding the buffer
      + * @param data The buffer to be logged
      + * @param len The length of the buffer
      + * @param flags Special processing flags like AP_LOG_DATA_SHOW_OFFSET
      + * @note ap_log_data is implemented as a macro.
      + * @note Use APLOG_MARK to fill out file, line, and module_index
      + * @note If a request_rec is available, use that with ap_log_rdata()
      + * in preference to calling this function.  Otherwise, if a conn_rec is
      + * available, use that with ap_log_cdata() in preference to calling
      + * this function.
      + */
      +#ifdef DOXYGEN
      +AP_DECLARE(void) ap_log_data(const char *file, int line, int module_index,
      +                             int level, const server_rec *s, const char *label,
      +                             const void *data, apr_size_t len, unsigned int flags);
      +#else
      +#ifdef AP_HAVE_C99
      +/* need additional step to expand APLOG_MARK first */
      +#define ap_log_data(...) ap_log_data__(__VA_ARGS__)
      +/* need server_rec *sr = ... for the case if s is verbatim NULL */
      +#define ap_log_data__(file, line, mi, level, s, ...)           \
      +    do { const server_rec *sr__ = s; if (APLOG_MODULE_IS_LEVEL(sr__, mi, level)) \
      +             ap_log_data_(file, line, mi, level, sr__, __VA_ARGS__);    \
      +    } while(0)
      +#else
      +#define ap_log_data ap_log_data_
      +#endif
      +AP_DECLARE(void) ap_log_data_(const char *file, int line, int module_index,
      +                              int level, const server_rec *s, const char *label,
      +                              const void *data, apr_size_t len, unsigned int flags);
      +#endif
      +
      +/**
      + * ap_log_rdata() - log buffers which are related to a particular request.
      + * @param file The file in which this function is called
      + * @param line The line number on which this function is called
      + * @param module_index The module_index of the module logging this buffer
      + * @param level The log level
      + * @param r The request which we are logging for
      + * @param label A label for the buffer, to be logged preceding the buffer
      + * @param data The buffer to be logged
      + * @param len The length of the buffer
      + * @param flags Special processing flags like AP_LOG_DATA_SHOW_OFFSET
      + * @note ap_log_rdata is implemented as a macro.
      + * @note Use APLOG_MARK to fill out file, line, and module_index
      + * @note If a request_rec is available, use that with ap_log_rerror()
      + * in preference to calling this function.  Otherwise, if a conn_rec is
      + * available, use that with ap_log_cerror() in preference to calling
      + * this function.
      + */
      +#ifdef DOXYGEN
      +AP_DECLARE(void) ap_log_rdata(const char *file, int line, int module_index,
      +                              int level, const request_rec *r, const char *label,
      +                              const void *data, apr_size_t len, unsigned int flags);
      +#else
      +#ifdef AP_HAVE_C99
      +/* need additional step to expand APLOG_MARK first */
      +#define ap_log_rdata(...) ap_log_rdata__(__VA_ARGS__)
      +#define ap_log_rdata__(file, line, mi, level, r, ...)           \
      +    do { if (APLOG_R_MODULE_IS_LEVEL(r, mi, level)) \
      +             ap_log_rdata_(file, line, mi, level, r, __VA_ARGS__);    \
      +    } while(0)
      +#else
      +#define ap_log_rdata ap_log_rdata_
      +#endif
      +AP_DECLARE(void) ap_log_rdata_(const char *file, int line, int module_index,
      +                               int level, const request_rec *r, const char *label,
      +                               const void *data, apr_size_t len, unsigned int flags);
      +#endif
      +
      +/**
      + * ap_log_cdata() - log buffers which are related to a particular connection.
      + * @param file The file in which this function is called
      + * @param line The line number on which this function is called
      + * @param module_index The module_index of the module logging this buffer
      + * @param level The log level
      + * @param c The connection which we are logging for
      + * @param label A label for the buffer, to be logged preceding the buffer
      + * @param data The buffer to be logged
      + * @param len The length of the buffer
      + * @param flags Special processing flags like AP_LOG_DATA_SHOW_OFFSET
      + * @note ap_log_cdata is implemented as a macro
      + * @note Use APLOG_MARK to fill out file, line, and module_index
      + * @note If a request_rec is available, use that with ap_log_rerror()
      + * in preference to calling this function.  Otherwise, if a conn_rec is
      + * available, use that with ap_log_cerror() in preference to calling
      + * this function.
      + */
      +#ifdef DOXYGEN
      +AP_DECLARE(void) ap_log_cdata(const char *file, int line, int module_index,
      +                              int level, const conn_rec *c, const char *label,
      +                              const void *data, apr_size_t len, unsigned int flags);
      +#else
      +#ifdef AP_HAVE_C99
      +/* need additional step to expand APLOG_MARK first */
      +#define ap_log_cdata(...) ap_log_cdata__(__VA_ARGS__)
      +#define ap_log_cdata__(file, line, mi, level, c, ...)           \
      +    do { if (APLOG_C_MODULE_IS_LEVEL(c, mi, level)) \
      +             ap_log_cdata_(file, line, mi, level, c, __VA_ARGS__);    \
      +    } while(0)
      +#else
      +#define ap_log_cdata ap_log_cdata_
      +#endif
      +AP_DECLARE(void) ap_log_cdata_(const char *file, int line, int module_index,
      +                               int level, const conn_rec *c, const char *label,
      +                               const void *data, apr_size_t len, unsigned int flags);
      +#endif
      +
      +/**
      + * ap_log_csdata() - log buffers which are related to a particular connection
      + * and to a vhost other than c->base_server.
      + * @param file The file in which this function is called
      + * @param line The line number on which this function is called
      + * @param module_index The module_index of the module logging this buffer
      + * @param level The log level
      + * @param c The connection which we are logging for
      + * @param s The server which we are logging for
      + * @param label A label for the buffer, to be logged preceding the buffer
      + * @param data The buffer to be logged
      + * @param len The length of the buffer
      + * @param flags Special processing flags like AP_LOG_DATA_SHOW_OFFSET
      + * @note ap_log_csdata is implemented as a macro
      + * @note Use APLOG_MARK to fill out file, line, and module_index
      + * @note If a request_rec is available, use that with ap_log_rerror()
      + * in preference to calling this function.  Otherwise, if a conn_rec is
      + * available, use that with ap_log_cerror() in preference to calling
      + * this function.
      + */
      +#ifdef DOXYGEN
      +AP_DECLARE(void) ap_log_csdata(const char *file, int line, int module_index,
      +                               int level, const conn_rec *c, const server_rec *s,
      +                               const char *label, const void *data,
      +                               apr_size_t len, unsigned int flags);
      +#else
      +#ifdef AP_HAVE_C99
      +/* need additional step to expand APLOG_MARK first */
      +#define ap_log_csdata(...) ap_log_csdata__(__VA_ARGS__)
      +#define ap_log_csdata__(file, line, mi, level, c, s, ...)              \
      +    do { if (APLOG_CS_MODULE_IS_LEVEL(c, s, mi, level))                \
      +             ap_log_csdata_(file, line, mi, level, c, s, __VA_ARGS__); \
      +    } while(0)
      +#else
      +#define ap_log_cdata ap_log_cdata_
      +#endif
      +AP_DECLARE(void) ap_log_csdata_(const char *file, int line, int module_index,
      +                                int level, const conn_rec *c, const server_rec *s,
      +                                const char *label, const void *data,
      +                                apr_size_t len, unsigned int flags);
      +#endif
      +
       /**
        * Convert stderr to the error log
        * @param s The current server
      @@ -558,24 +740,34 @@ AP_DECLARE(void) ap_error_log2stderr(server_rec *s);
        */
       AP_DECLARE(void) ap_log_command_line(apr_pool_t *p, server_rec *s);
       
      +/**
      + * Log common (various) MPM shared data at startup.
      + * @param s The server_rec of the error log we want to log to.
      + * Misc commonly logged data is logged to that server's error log.
      + */
      +AP_DECLARE(void) ap_log_mpm_common(server_rec *s);
      +
       /**
        * Log the current pid of the parent process
        * @param p The pool to use for processing
      - * @param fname The name of the file to log to
      + * @param fname The name of the file to log to.  If the filename is not
      + * absolute then it is assumed to be relative to ServerRoot.
        */
       AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *fname);
       
       /**
        * Remove the pidfile.
        * @param p The pool to use for processing
      - * @param fname The name of the pid file to remove
      + * @param fname The name of the pid file to remove.  If the filename is not
      + * absolute then it is assumed to be relative to ServerRoot.
        */
       AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *fname);
       
       /**
        * Retrieve the pid from a pidfile.
        * @param p The pool to use for processing
      - * @param filename The name of the file containing the pid
      + * @param filename The name of the file containing the pid.  If the filename is not
      + * absolute then it is assumed to be relative to ServerRoot.
        * @param mypid Pointer to pid_t (valid only if return APR_SUCCESS)
        */
       AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename, pid_t *mypid);
      @@ -624,25 +816,6 @@ AP_DECLARE(apr_file_t *) ap_piped_log_read_fd(piped_log *pl);
        */
       AP_DECLARE(apr_file_t *) ap_piped_log_write_fd(piped_log *pl);
       
      -/**
      - * hook method to log error messages
      - * @ingroup hooks
      - * @param file The file in which this function is called
      - * @param line The line number on which this function is called
      - * @param module_index The module_index of the module generating this message
      - * @param level The level of this error message
      - * @param status The status code from the previous command
      - * @param s The server which we are logging for
      - * @param r The request which we are logging for
      - * @param pool Memory pool to allocate from
      - * @param errstr message to log
      - */
      -AP_DECLARE_HOOK(void, error_log, (const char *file, int line,
      -                       int module_index, int level,
      -                       apr_status_t status, const server_rec *s,
      -                       const request_rec *r, apr_pool_t *pool,
      -                       const char *errstr))
      -
       /**
        * hook method to generate unique id for connection or request
        * @ingroup hooks
      diff --git a/include/http_main.h b/include/http_main.h
      index 22192db30f0..fa1ce85216d 100644
      --- a/include/http_main.h
      +++ b/include/http_main.h
      @@ -43,6 +43,11 @@ extern "C" {
       AP_DECLARE_DATA extern const char *ap_server_argv0;
       /** The global server's ServerRoot */
       AP_DECLARE_DATA extern const char *ap_server_root;
      +/** The global server's DefaultRuntimeDir
      + * This is not usable directly in the general case; use
      + * ap_runtime_dir_relative() instead.
      + */
      +AP_DECLARE_DATA extern const char *ap_runtime_dir;
       /** The global server's server_rec */
       AP_DECLARE_DATA extern server_rec *ap_server_conf;
       /** global pool, for access prior to creation of server_rec */
      diff --git a/include/http_protocol.h b/include/http_protocol.h
      index 77493de5866..a9e09904bdc 100644
      --- a/include/http_protocol.h
      +++ b/include/http_protocol.h
      @@ -167,6 +167,72 @@ AP_DECLARE(void) ap_set_etag(request_rec *r);
        */
       AP_DECLARE(void) ap_set_last_modified(request_rec *r);
       
      +typedef enum {
      +    AP_CONDITION_NONE,
      +    AP_CONDITION_NOMATCH,
      +    AP_CONDITION_WEAK,
      +    AP_CONDITION_STRONG
      +} ap_condition_e;
      +
      +/**
      + * Tests conditional request rules for the If-Match header.
      + * @param r The current request
      + * @param headers The response headers to check against
      + * @return AP_CONDITION_NONE if the header is missing, AP_CONDITION_NOMATCH
      + *         if the header does not match, AP_CONDITION_STRONG for a strong
      + *         match. Weak matches are not permitted for the If-Match header.
      + */
      +AP_DECLARE(ap_condition_e) ap_condition_if_match(request_rec *r,
      +        apr_table_t *headers);
      +
      +/**
      + * Tests conditional request rules for the If-Unmodified-Since header.
      + * @param r The current request
      + * @param headers The response headers to check against
      + * @return AP_CONDITION_NONE if the header is missing, AP_CONDITION_NOMATCH
      + *         if the header does not match, AP_CONDITION_WEAK if a weak match
      + *         was present and allowed by RFC2616, AP_CONDITION_STRONG for a
      + *         strong match.
      + */
      +AP_DECLARE(ap_condition_e) ap_condition_if_unmodified_since(request_rec *r,
      +        apr_table_t *headers);
      +
      +/**
      + * Tests conditional request rules for the If-None-Match header.
      + * @param r The current request
      + * @param headers The response headers to check against
      + * @return AP_CONDITION_NONE if the header is missing, AP_CONDITION_NOMATCH
      + *         if the header does not match, AP_CONDITION_WEAK if a weak match
      + *         was present and allowed by RFC2616, AP_CONDITION_STRONG for a
      + *         strong match.
      + */
      +AP_DECLARE(ap_condition_e) ap_condition_if_none_match(request_rec *r,
      +        apr_table_t *headers);
      +
      +/**
      + * Tests conditional request rules for the If-Modified-Since header.
      + * @param r The current request
      + * @param headers The response headers to check against
      + * @return AP_CONDITION_NONE if the header is missing, AP_CONDITION_NOMATCH
      + *         if the header does not match, AP_CONDITION_WEAK if a weak match
      + *         was present and allowed by RFC2616, AP_CONDITION_STRONG for a
      + *         strong match.
      + */
      +AP_DECLARE(ap_condition_e) ap_condition_if_modified_since(request_rec *r,
      +        apr_table_t *headers);
      +
      +/**
      + * Tests conditional request rules for the If-Range header.
      + * @param r The current request
      + * @param headers The response headers to check against
      + * @return AP_CONDITION_NONE if either the If-Range or Range header is
      + *         missing, AP_CONDITION_NOMATCH if the header does not match,
      + *         AP_CONDITION_STRONG for a strong match. Weak matches are not
      + *         permitted for the If-Range header.
      + */
      +AP_DECLARE(ap_condition_e) ap_condition_if_range(request_rec *r,
      +        apr_table_t *headers);
      +
       /**
        * Implements condition GET rules for HTTP/1.1 specification.  This function
        * inspects the client headers and determines if the response fulfills
      @@ -209,8 +275,10 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r, apr_off_t of
        * @param length The amount of data to send
        * @return The number of bytes sent
        */
      -AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
      -                             size_t length);
      +AP_DECLARE(apr_size_t) ap_send_mmap(apr_mmap_t *mm,
      +                                    request_rec *r,
      +                                    apr_size_t offset,
      +                                    apr_size_t length);
       #endif
       
       
      @@ -220,7 +288,7 @@ AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
        *
        * @param p        The pool to create registered method numbers from.
        * @param methname The name of the new method to register.
      - * @return         Ab int value representing an offset into a bitmask.
      + * @return         An int value representing an offset into a bitmask.
        */
       AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname);
       
      @@ -343,7 +411,7 @@ AP_DECLARE(int) ap_rwrite(const void *buf, int nbyte, request_rec *r);
        */
       static APR_INLINE int ap_rputs(const char *str, request_rec *r)
       {
      -    return ap_rwrite(str, strlen(str), r);
      +    return ap_rwrite(str, (int)strlen(str), r);
       }
       
       /**
      @@ -353,7 +421,7 @@ static APR_INLINE int ap_rputs(const char *str, request_rec *r)
        * @return The number of bytes sent
        */
       AP_DECLARE_NONSTD(int) ap_rvputs(request_rec *r,...)
      -                       ap_func_attr_sentinel;
      +                       AP_FN_ATTR_SENTINEL;
       
       /**
        * Output data to the client in a printf format
      @@ -377,7 +445,7 @@ AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt,...)
       /**
        * Flush all of the data for the current request to the client
        * @param r The current request
      - * @return The number of bytes sent
      + * @return 0 on success, -1 if an error occurred
        */
       AP_DECLARE(int) ap_rflush(request_rec *r);
       
      @@ -434,6 +502,23 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r);
        */
       AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer, apr_size_t bufsiz);
       
      +/**
      + * Map specific APR codes returned by the filter stack to HTTP error
      + * codes, or the default status code provided. Use it as follows:
      + *
      + * return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
      + *
      + * If the filter has already handled the error, AP_FILTER_ERROR will
      + * be returned, which is cleanly passed through.
      + *
      + * These mappings imply that the filter stack is reading from the
      + * downstream client, the proxy will map these codes differently.
      + * @param rv APR status code
      + * @param status Default HTTP code should the APR code not be recognised
      + * @return Mapped HTTP status code
      + */
      +AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status);
      +
       /**
        * In HTTP/1.1, any method can have a body.  However, most GET handlers
        * wouldn't know what to do with a request body if they received one.
      @@ -497,17 +582,22 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw);
        */
       AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
       
      +#define AP_GETLINE_FOLD 1 /* Whether to merge continuation lines */
      +#define AP_GETLINE_CRLF 2 /*Whether line ends must be in the form CR LF */
      +
       /**
        * Get the next line of input for the request
        * @param s The buffer into which to read the line
        * @param n The size of the buffer
        * @param r The request
      - * @param fold Whether to merge continuation lines
      + * @param flags Bit flag of multiple parsing options
      + *              AP_GETLINE_FOLD Whether to merge continuation lines
      + *              AP_GETLINE_CRLF Whether line ends must be in the form CR LF
        * @return The length of the line, if successful
        *         n, if the line is too big to fit in the buffer
        *         -1 for miscellaneous errors
        */
      -AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
      +AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int flags);
       
       /**
        * Get the next line of input for the request
      @@ -525,7 +615,9 @@ AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
        * @param n The size of the buffer
        * @param read The length of the line.
        * @param r The request
      - * @param fold Whether to merge continuation lines
      + * @param flags Bit flag of multiple parsing options
      + *              AP_GETLINE_FOLD Whether to merge continuation lines
      + *              AP_GETLINE_CRLF Whether line ends must be in the form CR LF
        * @param bb Working brigade to use when reading buckets
        * @return APR_SUCCESS, if successful
        *         APR_ENOSPC, if the line is too big to fit in the buffer
      @@ -534,7 +626,7 @@ AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
       #if APR_CHARSET_EBCDIC
       AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
                                            apr_size_t *read,
      -                                     request_rec *r, int fold,
      +                                     request_rec *r, int flags,
                                            apr_bucket_brigade *bb);
       #else /* ASCII box */
       #define ap_rgetline(s, n, read, r, fold, bb) \
      @@ -544,7 +636,7 @@ AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
       /** @see ap_rgetline */
       AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
                                                 apr_size_t *read,
      -                                          request_rec *r, int fold,
      +                                          request_rec *r, int flags,
                                                 apr_bucket_brigade *bb);
       
       /**
      @@ -615,6 +707,208 @@ AP_DECLARE_HOOK(const char *,http_scheme,(const request_rec *r))
        */
       AP_DECLARE_HOOK(apr_port_t,default_port,(const request_rec *r))
       
      +
      +#define AP_PROTOCOL_HTTP1		"http/1.1"
      +
      +/**
      + * Determine the list of protocols available for a connection/request. This may
      + * be collected with or without any request sent, in which case the request is 
      + * NULL. Or it may be triggered by the request received, e.g. through the 
      + * "Upgrade" header.
      + *
      + * This hook will be run whenever protocols are being negotiated (ALPN as
      + * one example). It may also be invoked at other times, e.g. when the server
      + * wants to advertise protocols it is capable of switching to.
      + * 
      + * The identifiers for protocols are taken from the TLS extension type ALPN:
      + * https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xml
      + *
      + * If no protocols are added to the proposals, the server not perform any
      + * switch. If the protocol selected from the proposals is the protocol
      + * already in place, also no protocol switch will be invoked.
      + *
      + * The client may already have announced the protocols it is willing to
      + * accept. These will then be listed as offers. This parameter may also
      + * be NULL, indicating that offers from the client are not known and
      + * the hooks should propose all protocols that are valid for the
      + * current connection/request.
      + *
      + * All hooks are run, unless one returns an error. Proposals may contain
      + * duplicates. The order in which proposals are added is usually ignored.
      + * 
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected
      + * @param offers A list of protocol identifiers offered by the client or
      + *               NULL to indicated that the hooks are free to propose 
      + * @param proposals The list of protocol identifiers proposed by the hooks
      + * @return OK or DECLINED
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE_HOOK(int,protocol_propose,(conn_rec *c, request_rec *r,
      +                                      server_rec *s,
      +                                      const apr_array_header_t *offers,
      +                                      apr_array_header_t *proposals))
      +
      +/**
      + * Perform a protocol switch on the connection. The exact requirements for
      + * that depend on the protocol in place and the one switched to. The first 
      + * protocol module to handle the switch is the last module run.
      + * 
      + * For a connection level switch (r == NULL), the handler must on return
      + * leave the conn_rec in a state suitable for processing the switched
      + * protocol, e.g. correct filters in place.
      + *
      + * For a request triggered switch (r != NULL), the protocol switch is done
      + * before the response is sent out. When switching from "http/1.1" via Upgrade
      + * header, the 101 intermediate response will have been sent. The
      + * hook needs then to process the connection until it can be closed. Which
      + * the server will enforce on hook return.
      + * Any error the hook might encounter must already be sent by the hook itself
      + * to the client in whatever form the new protocol requires.
      + *
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected
      + * @param choices A list of protocol identifiers, normally the clients whishes
      + * @param proposals the list of protocol identifiers proposed by the hooks
      + * @return OK or DECLINED
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE_HOOK(int,protocol_switch,(conn_rec *c, request_rec *r,
      +                                     server_rec *s,
      +                                     const char *protocol))
      +
      +/**
      + * Return the protocol used on the connection. Modules implementing
      + * protocol switching must register here and return the correct protocol
      + * identifier for connections they switched.
      + *
      + * To find out the protocol for the current connection, better call
      + * @see ap_get_protocol which internally uses this hook.
      + *
      + * @param c The current connection
      + * @return The identifier of the protocol in place or NULL
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE_HOOK(const char *,protocol_get,(const conn_rec *c))
      +
      +/**
      + * Get the protocols that the connection and optional request may
      + * upgrade to - besides the protocol currently active on the connection. These
      + * values may be used to announce to a client what choices it has.
      + *
      + * If report_all == 0, only protocols more preferable than the one currently
      + * being used, are reported. Otherwise, all available protocols beside the
      + * current one are being reported.
      + *
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected or NULL
      + * @param report_all include also protocols less preferred than the current one
      + * @param pupgrades on return, possible protocols to upgrade to in descending order 
      + *                 of preference. Maybe NULL if none are available.    
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE(apr_status_t) ap_get_protocol_upgrades(conn_rec *c, request_rec *r, 
      +                                                  server_rec *s, int report_all, 
      +                                                  const apr_array_header_t **pupgrades);
      +                                                  
      +/**
      + * Select a protocol for the given connection and optional request. Will return
      + * the protocol identifier selected which may be the protocol already in place
      + * on the connection. The selected protocol will be NULL if non of the given
      + * choices could be agreed upon (e.g. no proposal as made).
      + *
      + * A special case is where the choices itself is NULL (instead of empty). In
      + * this case there are no restrictions imposed on protocol selection.
      + *
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected
      + * @param choices A list of protocol identifiers, normally the clients whishes
      + * @return The selected protocol or NULL if no protocol could be agreed upon
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE(const char *) ap_select_protocol(conn_rec *c, request_rec *r, 
      +                                            server_rec *s,
      +                                            const apr_array_header_t *choices);
      +
      +/**
      + * Perform the actual protocol switch. The protocol given must have been
      + * selected before on the very same connection and request pair.
      + *
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected
      + * @param protocol the protocol to switch to
      + * @return APR_SUCCESS, if caller may continue processing as usual
      + *         APR_EOF,     if caller needs to stop processing the connection
      + *         APR_EINVAL,  if the protocol is already in place
      + *         APR_NOTIMPL, if no module performed the switch
      + *         Other errors where appropriate
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE(apr_status_t) ap_switch_protocol(conn_rec *c, request_rec *r, 
      +                                            server_rec *s,
      +                                            const char *protocol);
      +
      +/**
      + * Call the protocol_get hook to determine the protocol currently in use
      + * for the given connection.
      + *
      + * Unless another protocol has been switch to, will default to
      + * @see AP_PROTOCOL_HTTP1 and modules implementing a  new protocol must
      + * report a switched connection via the protocol_get hook.
      + *
      + * @param c The connection to determine the protocol for
      + * @return the protocol in use, never NULL
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE(const char *) ap_get_protocol(conn_rec *c);
      +
      +/**
      + * Check if the given protocol is an allowed choice on the given
      + * combination of connection, request and server. 
      + *
      + * When server is NULL, it is taken from request_rec, unless
      + * request_rec is NULL. Then it is taken from the connection base
      + * server.
      + *
      + * @param c The current connection
      + * @param r The current request or NULL
      + * @param s The server/virtual host selected or NULL
      + * @param protocol the protocol to switch to
      + * @return != 0 iff protocol is allowed
      + * @bug This API or implementation and order of operations should be considered
      + * experimental and will continue to evolve in future 2.4 releases, with
      + * a corresponding minor module magic number (MMN) bump to indicate the
      + * API revision level.
      + */
      +AP_DECLARE(int) ap_is_allowed_protocol(conn_rec *c, request_rec *r,
      +                                       server_rec *s, const char *protocol);
      +
       /** @see ap_bucket_type_error */
       typedef struct ap_bucket_error ap_bucket_error;
       
      diff --git a/include/http_request.h b/include/http_request.h
      index e2e4e6ebf2b..0013d39fa66 100644
      --- a/include/http_request.h
      +++ b/include/http_request.h
      @@ -185,6 +185,8 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *sub_req, request_rec *r)
        * is required for the current request
        * @param r The current request
        * @return 1 if authentication is required, 0 otherwise
      + * @bug Behavior changed in 2.4.x refactoring, API no longer usable
      + * @deprecated @see ap_some_authn_required()
        */
       AP_DECLARE(int) ap_some_auth_required(request_rec *r);
       
      @@ -216,7 +218,7 @@ AP_DECLARE(void) ap_clear_auth_internal(void);
        * Determine whether access control hooks will be run for all internal
        * requests with URIs distinct from that of the initial request, or only
        * those for which different configurations apply than those which applied
      - * to the initial request.  To accomodate legacy external modules which
      + * to the initial request.  To accommodate legacy external modules which
        * may expect access control hooks to be run for all internal requests
        * with distinct URIs, this is the default behaviour unless all access
        * control hooks and authentication and authorization providers are
      @@ -285,7 +287,7 @@ AP_DECLARE(void) ap_update_mtime(request_rec *r, apr_time_t dependency_mtime);
        * @return  None.
        */
       AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...)
      -                 ap_func_attr_sentinel;
      +                 AP_FN_ATTR_SENTINEL;
       
       /**
        * Add one or more methods to the list permitted to access the resource.
      @@ -313,7 +315,7 @@ AP_DECLARE(void) ap_allow_standard_methods(request_rec *r, int reset, ...);
        * the response to the client
        * @param r The current request
        */
      -void ap_process_request(request_rec *r);
      +AP_DECLARE(void) ap_process_request(request_rec *r);
       
       /* For post-processing after a handler has finished with a request.
        * (Commonly used after it was suspended)
      @@ -335,6 +337,21 @@ void ap_process_async_request(request_rec *r);
        */
       AP_DECLARE(void) ap_die(int type, request_rec *r);
       
      +/**
      + * Check whether a connection is still established and has data available,
      + * optionnaly consuming blank lines ([CR]LF).
      + * @param c The current connection
      + * @param bb The brigade to filter
      + * @param max_blank_lines Max number of blank lines to consume, or zero
      + *                        to consider them as data (single read).
      + * @return APR_SUCCESS: connection established with data available,
      + *         APR_EAGAIN: connection established and empty,
      + *         APR_NOTFOUND: too much blank lines,
      + *         APR_E*: connection/general error.
      + */
      +AP_DECLARE(apr_status_t) ap_check_pipeline(conn_rec *c, apr_bucket_brigade *bb,
      +                                           unsigned int max_blank_lines);
      +
       /* Hooks */
       
       /**
      @@ -528,6 +545,37 @@ AP_DECLARE(void) ap_hook_check_authz(ap_HOOK_auth_checker_t *pf,
        */
       AP_DECLARE_HOOK(void,insert_filter,(request_rec *r))
       
      +/**
      + * This hook allows modules to affect the request immediately after the
      + * per-directory configuration for the request has been generated.
      + * @param r The current request
      + * @return OK (allow acces), DECLINED (let later modules decide),
      + *         or HTTP_... (deny access)
      + * @ingroup hooks
      + */
      +AP_DECLARE_HOOK(int,post_perdir_config,(request_rec *r))
      +
      +/**
      + * This hook allows a module to force authn to be required when
      + * processing a request.
      + * This hook should be registered with ap_hook_force_authn().
      + * @param r The current request
      + * @return OK (force authn), DECLINED (let later modules decide)
      + * @ingroup hooks
      + */
      +AP_DECLARE_HOOK(int,force_authn,(request_rec *r))
      +
      +/**
      + * This hook allows modules to handle/emulate the apr_stat() calls
      + * needed for directory walk.
      + * @param finfo where to put the stat data
      + * @param r The current request
      + * @param wanted APR_FINFO_* flags to pass to apr_stat()
      + * @return apr_status_t or AP_DECLINED (let later modules decide)
      + * @ingroup hooks
      + */
      +AP_DECLARE_HOOK(apr_status_t,dirwalk_stat,(apr_finfo_t *finfo, request_rec *r, apr_int32_t wanted))
      +
       AP_DECLARE(int) ap_location_walk(request_rec *r);
       AP_DECLARE(int) ap_directory_walk(request_rec *r);
       AP_DECLARE(int) ap_file_walk(request_rec *r);
      @@ -563,6 +611,17 @@ AP_DECLARE(apr_bucket *) ap_bucket_eor_make(apr_bucket *b, request_rec *r);
       AP_DECLARE(apr_bucket *) ap_bucket_eor_create(apr_bucket_alloc_t *list,
                                                     request_rec *r);
       
      +/**
      + * Can be used within any handler to determine if any authentication
      + * is required for the current request.  Note that if used with an
      + * access_checker hook, an access_checker_ex hook or an authz provider; the
      + * caller should take steps to avoid a loop since this function is
      + * implemented by calling these hooks.
      + * @param r The current request
      + * @return TRUE if authentication is required, FALSE otherwise
      + */
      +AP_DECLARE(int) ap_some_authn_required(request_rec *r);
      +
       #ifdef __cplusplus
       }
       #endif
      diff --git a/include/httpd.h b/include/httpd.h
      index 464f4a12866..61ab2e6ed62 100644
      --- a/include/httpd.h
      +++ b/include/httpd.h
      @@ -18,15 +18,16 @@
        * @file httpd.h
        * @brief HTTP Daemon routines
        *
      - * @defgroup APACHE Apache
      + * @defgroup APACHE Apache HTTP Server
        *
        * Top level group of which all other groups are a member
        * @{
        *
      - * @defgroup APACHE_MODS Apache Modules
      - *           Top level group for Apache Modules
      + * @defgroup APACHE_MODS Loadable modules
      + *           Top level group for modules
        * @defgroup APACHE_OS Operating System Specific
      - * @defgroup APACHE_CORE Apache Core
      + * @defgroup APACHE_INTERNAL Internal interfaces
      + * @defgroup APACHE_CORE Core routines
        * @{
        * @defgroup APACHE_CORE_DAEMON HTTP Daemon Routine
        * @{
      @@ -199,6 +200,10 @@ extern "C" {
       #ifndef DEFAULT_LIMIT_REQUEST_FIELDS
       #define DEFAULT_LIMIT_REQUEST_FIELDS 100
       #endif
      +/** default/hard limit on number of leading/trailing empty lines */
      +#ifndef DEFAULT_LIMIT_BLANK_LINES
      +#define DEFAULT_LIMIT_BLANK_LINES 10
      +#endif
       
       /**
        * The default default character set name to add if AddDefaultCharset is
      @@ -304,16 +309,16 @@ extern "C" {
       
       /**
        * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into
      - * mutiple buckets, no greater than MAX(apr_size_t), and more granular
      + * multiple buckets, no greater than MAX(apr_size_t), and more granular
        * than that in case the brigade code/filters attempt to read it directly.
        * ### 16mb is an invention, no idea if it is reasonable.
        */
       #define AP_MAX_SENDFILE 16777216  /* 2^24 */
       
       /**
      - * Special Apache error codes. These are basically used
      - *  in http_main.c so we can keep track of various errors.
      - *
      + * MPM child process exit status values
      + * The MPM parent process may check the status to see if special
      + * error handling is required.
        */
       /** a normal exit */
       #define APEXIT_OK               0x0
      @@ -349,7 +354,7 @@ extern "C" {
        * use by modules.  The difference between #AP_DECLARE and
        * #AP_DECLARE_NONSTD is that the latter is required for any functions
        * which use varargs or are used via indirect function call.  This
      - * is to accomodate the two calling conventions in windows dlls.
      + * is to accommodate the two calling conventions in windows dlls.
        */
       # define AP_DECLARE_NONSTD(type)    type
       #endif
      @@ -384,6 +389,18 @@ extern "C" {
       # define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD
       #endif
       
      +/**
      + * @defgroup APACHE_APR_STATUS_T HTTPD specific values of apr_status_t
      + * @{
      + */
      +#define AP_START_USERERR            (APR_OS_START_USERERR + 2000)
      +#define AP_USERERR_LEN              1000
      +
      +/** The function declines to handle the request */
      +#define AP_DECLINED                 (AP_START_USERERR + 0)
      +
      +/** @} */
      +
       /**
        * @brief The numeric version information is broken out into fields within this
        * structure.
      @@ -459,61 +476,72 @@ AP_DECLARE(const char *) ap_get_server_built(void);
        * @{
        */
       /**
      - * The size of the static array in http_protocol.c for storing
      - * all of the potential response status-lines (a sparse table).
      + * The size of the static status_lines array in http_protocol.c for
      + * storing all of the potential response status-lines (a sparse table).
      + * When adding a new code here add it to status_lines as well.
        * A future version should dynamically generate the apr_table_t at startup.
        */
      -#define RESPONSE_CODES 57
      -
      -#define HTTP_CONTINUE                      100
      -#define HTTP_SWITCHING_PROTOCOLS           101
      -#define HTTP_PROCESSING                    102
      -#define HTTP_OK                            200
      -#define HTTP_CREATED                       201
      -#define HTTP_ACCEPTED                      202
      -#define HTTP_NON_AUTHORITATIVE             203
      -#define HTTP_NO_CONTENT                    204
      -#define HTTP_RESET_CONTENT                 205
      -#define HTTP_PARTIAL_CONTENT               206
      -#define HTTP_MULTI_STATUS                  207
      -#define HTTP_MULTIPLE_CHOICES              300
      -#define HTTP_MOVED_PERMANENTLY             301
      -#define HTTP_MOVED_TEMPORARILY             302
      -#define HTTP_SEE_OTHER                     303
      -#define HTTP_NOT_MODIFIED                  304
      -#define HTTP_USE_PROXY                     305
      -#define HTTP_TEMPORARY_REDIRECT            307
      -#define HTTP_BAD_REQUEST                   400
      -#define HTTP_UNAUTHORIZED                  401
      -#define HTTP_PAYMENT_REQUIRED              402
      -#define HTTP_FORBIDDEN                     403
      -#define HTTP_NOT_FOUND                     404
      -#define HTTP_METHOD_NOT_ALLOWED            405
      -#define HTTP_NOT_ACCEPTABLE                406
      -#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
      -#define HTTP_REQUEST_TIME_OUT              408
      -#define HTTP_CONFLICT                      409
      -#define HTTP_GONE                          410
      -#define HTTP_LENGTH_REQUIRED               411
      -#define HTTP_PRECONDITION_FAILED           412
      -#define HTTP_REQUEST_ENTITY_TOO_LARGE      413
      -#define HTTP_REQUEST_URI_TOO_LARGE         414
      -#define HTTP_UNSUPPORTED_MEDIA_TYPE        415
      -#define HTTP_RANGE_NOT_SATISFIABLE         416
      -#define HTTP_EXPECTATION_FAILED            417
      -#define HTTP_UNPROCESSABLE_ENTITY          422
      -#define HTTP_LOCKED                        423
      -#define HTTP_FAILED_DEPENDENCY             424
      -#define HTTP_UPGRADE_REQUIRED              426
      -#define HTTP_INTERNAL_SERVER_ERROR         500
      -#define HTTP_NOT_IMPLEMENTED               501
      -#define HTTP_BAD_GATEWAY                   502
      -#define HTTP_SERVICE_UNAVAILABLE           503
      -#define HTTP_GATEWAY_TIME_OUT              504
      -#define HTTP_VERSION_NOT_SUPPORTED         505
      -#define HTTP_VARIANT_ALSO_VARIES           506
      -#define HTTP_INSUFFICIENT_STORAGE          507
      -#define HTTP_NOT_EXTENDED                  510
      +#define RESPONSE_CODES 103
      +
      +#define HTTP_CONTINUE                        100
      +#define HTTP_SWITCHING_PROTOCOLS             101
      +#define HTTP_PROCESSING                      102
      +#define HTTP_OK                              200
      +#define HTTP_CREATED                         201
      +#define HTTP_ACCEPTED                        202
      +#define HTTP_NON_AUTHORITATIVE               203
      +#define HTTP_NO_CONTENT                      204
      +#define HTTP_RESET_CONTENT                   205
      +#define HTTP_PARTIAL_CONTENT                 206
      +#define HTTP_MULTI_STATUS                    207
      +#define HTTP_ALREADY_REPORTED                208
      +#define HTTP_IM_USED                         226
      +#define HTTP_MULTIPLE_CHOICES                300
      +#define HTTP_MOVED_PERMANENTLY               301
      +#define HTTP_MOVED_TEMPORARILY               302
      +#define HTTP_SEE_OTHER                       303
      +#define HTTP_NOT_MODIFIED                    304
      +#define HTTP_USE_PROXY                       305
      +#define HTTP_TEMPORARY_REDIRECT              307
      +#define HTTP_PERMANENT_REDIRECT              308
      +#define HTTP_BAD_REQUEST                     400
      +#define HTTP_UNAUTHORIZED                    401
      +#define HTTP_PAYMENT_REQUIRED                402
      +#define HTTP_FORBIDDEN                       403
      +#define HTTP_NOT_FOUND                       404
      +#define HTTP_METHOD_NOT_ALLOWED              405
      +#define HTTP_NOT_ACCEPTABLE                  406
      +#define HTTP_PROXY_AUTHENTICATION_REQUIRED   407
      +#define HTTP_REQUEST_TIME_OUT                408
      +#define HTTP_CONFLICT                        409
      +#define HTTP_GONE                            410
      +#define HTTP_LENGTH_REQUIRED                 411
      +#define HTTP_PRECONDITION_FAILED             412
      +#define HTTP_REQUEST_ENTITY_TOO_LARGE        413
      +#define HTTP_REQUEST_URI_TOO_LARGE           414
      +#define HTTP_UNSUPPORTED_MEDIA_TYPE          415
      +#define HTTP_RANGE_NOT_SATISFIABLE           416
      +#define HTTP_EXPECTATION_FAILED              417
      +#define HTTP_MISDIRECTED_REQUEST             421
      +#define HTTP_UNPROCESSABLE_ENTITY            422
      +#define HTTP_LOCKED                          423
      +#define HTTP_FAILED_DEPENDENCY               424
      +#define HTTP_UPGRADE_REQUIRED                426
      +#define HTTP_PRECONDITION_REQUIRED           428
      +#define HTTP_TOO_MANY_REQUESTS               429
      +#define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
      +#define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS   451
      +#define HTTP_INTERNAL_SERVER_ERROR           500
      +#define HTTP_NOT_IMPLEMENTED                 501
      +#define HTTP_BAD_GATEWAY                     502
      +#define HTTP_SERVICE_UNAVAILABLE             503
      +#define HTTP_GATEWAY_TIME_OUT                504
      +#define HTTP_VERSION_NOT_SUPPORTED           505
      +#define HTTP_VARIANT_ALSO_VARIES             506
      +#define HTTP_INSUFFICIENT_STORAGE            507
      +#define HTTP_LOOP_DETECTED                   508
      +#define HTTP_NOT_EXTENDED                    510
      +#define HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
       
       /** is the status code informational */
       #define ap_is_HTTP_INFO(x)         (((x) >= 100)&&((x) < 200))
      @@ -582,7 +610,7 @@ AP_DECLARE(const char *) ap_get_server_built(void);
       #define M_MKACTIVITY            23
       #define M_BASELINE_CONTROL      24
       #define M_MERGE                 25
      -#define M_INVALID               26      /** RFC 3253: WebDAV Versioning */
      +#define M_INVALID               26      /** no valid method */
       
       /**
        * METHODS needs to be equal to the number of bits
      @@ -626,6 +654,9 @@ struct ap_method_list_t {
       #define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3"
       /** Magic for mod_dir */
       #define DIR_MAGIC_TYPE "httpd/unix-directory"
      +/** Default for r->handler if no content-type set by type_checker */
      +#define AP_DEFAULT_HANDLER_NAME ""
      +#define AP_IS_DEFAULT_HANDLER_NAME(x) (*x == '\0')
       
       /** @} */
       /* Just in case your linefeed isn't the one the other end is expecting. */
      @@ -928,8 +959,9 @@ struct request_rec {
           char *uri;
           /** The filename on disk corresponding to this response */
           char *filename;
      -    /* XXX: What does this mean? Please define "canonicalize" -aaron */
      -    /** The true filename, we canonicalize r->filename if these don't match */
      +    /** The true filename stored in the filesystem, as in the true alpha case
      +     *  and alias correction, e.g. "Image.jpeg" not "IMAGE$1.JPE" on Windows.
      +     *  The core map_to_storage canonicalizes r->filename when they mismatch */
           char *canonical_filename;
           /** The PATH_INFO extracted from this request */
           char *path_info;
      @@ -1003,6 +1035,27 @@ struct request_rec {
           apr_uri_t parsed_uri;
           /**  finfo.protection (st_mode) set to zero if no such file */
           apr_finfo_t finfo;
      +
      +    /** remote address information from conn_rec, can be overridden if
      +     * necessary by a module.
      +     * This is the address that originated the request.
      +     */
      +    apr_sockaddr_t *useragent_addr;
      +    char *useragent_ip;
      +
      +    /** MIME trailer environment from the request */
      +    apr_table_t *trailers_in;
      +    /** MIME trailer environment from the response */
      +    apr_table_t *trailers_out;
      +
      +    /** Originator's DNS name, if known.  NULL if DNS hasn't been checked,
      +     *  "" if it has and no address was found.  N.B. Only access this though
      +     *  ap_get_useragent_host() */
      +    char *useragent_host;
      +    /** have we done double-reverse DNS? -1 yes/failure, 0 not yet,
      +     *  1 yes/success
      +     */
      +    int double_reverse;
       };
       
       /**
      @@ -1045,11 +1098,15 @@ struct conn_rec {
           /* Information about the connection itself */
           /** local address */
           apr_sockaddr_t *local_addr;
      -    /** remote address */
      -    apr_sockaddr_t *remote_addr;
      +    /** remote address; this is the end-point of the next hop, for the address
      +     *  of the request creator, see useragent_addr in request_rec
      +     */
      +    apr_sockaddr_t *client_addr;
       
      -    /** Client's IP address */
      -    char *remote_ip;
      +    /** Client's IP address; this is the end-point of the next hop, for the
      +     *  IP of the request creator, see useragent_ip in request_rec
      +     */
      +    char *client_ip;
           /** Client's DNS name, if known.  NULL if DNS hasn't been checked,
            *  "" if it has and no address was found.  N.B. Only access this though
            * get_remote_host() */
      @@ -1080,7 +1137,7 @@ struct conn_rec {
           void *sbh;
           /** The bucket allocator to use for all bucket/brigade creations */
           struct apr_bucket_alloc_t *bucket_alloc;
      -    /** The current state of this connection */
      +    /** The current state of this connection; may be NULL if not used by MPM */
           conn_state_t *cs;
           /** Is there data pending in the input filters? */
           int data_in_input_filters;
      @@ -1118,16 +1175,21 @@ struct conn_rec {
       
           /** This points to the current thread being used to process this request,
            * over the lifetime of a request, the value may change. Users of the connection
      -     * record should not rely upon it staying the same between calls that invole
      +     * record should not rely upon it staying the same between calls that involve
            * the MPM.
            */
       #if APR_HAS_THREADS
           apr_thread_t *current_thread;
       #endif
      +
      +    /** The "real" master connection. NULL if I am the master. */
      +    conn_rec *master;
       };
       
       /**
        * Enumeration of connection states
      + * The two states CONN_STATE_LINGER_NORMAL and CONN_STATE_LINGER_SHORT may
      + * only be set by the MPM. Use CONN_STATE_LINGER outside of the MPM.
        */
       typedef enum  {
           CONN_STATE_CHECK_REQUEST_LINE_READABLE,
      @@ -1135,29 +1197,25 @@ typedef enum  {
           CONN_STATE_HANDLER,
           CONN_STATE_WRITE_COMPLETION,
           CONN_STATE_SUSPENDED,
      -    CONN_STATE_LINGER,
      -    CONN_STATE_LINGER_NORMAL,
      -    CONN_STATE_LINGER_SHORT
      +    CONN_STATE_LINGER,          /* connection may be closed with lingering */
      +    CONN_STATE_LINGER_NORMAL,   /* MPM has started lingering close with normal timeout */
      +    CONN_STATE_LINGER_SHORT     /* MPM has started lingering close with short timeout */
       } conn_state_e;
       
      +typedef enum  {
      +    CONN_SENSE_DEFAULT,
      +    CONN_SENSE_WANT_READ,       /* next event must be read */
      +    CONN_SENSE_WANT_WRITE       /* next event must be write */
      +} conn_sense_e;
      +
       /**
        * @brief A structure to contain connection state information
        */
       struct conn_state_t {
      -    /** APR_RING of expiration timeouts */
      -    APR_RING_ENTRY(conn_state_t) timeout_list;
      -    /** the expiration time of the next keepalive timeout */
      -    apr_time_t expiration_time;
      -    /** connection record this struct refers to */
      -    conn_rec *c;
      -    /** memory pool to allocate from */
      -    apr_pool_t *p;
      -    /** bucket allocator */
      -    apr_bucket_alloc_t *bucket_alloc;
      -    /** poll file descriptor information */
      -    apr_pollfd_t pfd;
           /** Current state of the connection */
           conn_state_e state;
      +    /** Whether to read instead of write, or write instead of read */
      +    conn_sense_e sense;
       };
       
       /* Per-vhost config... */
      @@ -1270,34 +1328,44 @@ struct server_rec {
           /** limit on number of request header fields  */
           int limit_req_fields;
       
      -
           /** Opaque storage location */
           void *context;
      -};
      -
      -typedef struct core_output_filter_ctx {
      -    apr_bucket_brigade *buffered_bb;
      -    apr_bucket_brigade *tmp_flush_bb;
      -    apr_pool_t *deferred_write_pool;
      -    apr_size_t bytes_in;
      -    apr_size_t bytes_written;
      -} core_output_filter_ctx_t;
      -
      -typedef struct core_filter_ctx {
      -    apr_bucket_brigade *b;
      -    apr_bucket_brigade *tmpbb;
      -} core_ctx_t;
       
      -typedef struct core_net_rec {
      -    /** Connection to the client */
      -    apr_socket_t *client_socket;
      +    /** Whether the keepalive timeout is explicit (1) or
      +     *  inherited (0) from the base server (either first
      +     *  server on the same IP:port or main server) */
      +    unsigned int keep_alive_timeout_set:1;
      +};
       
      -    /** connection record */
      -    conn_rec *c;
      +/**
      + * @struct ap_sload_t
      + * @brief  A structure to hold server load params
      + */
      +typedef struct ap_sload_t ap_sload_t;
      +struct ap_sload_t {
      +    /* percentage of process/threads ready/idle (0->100)*/
      +    int idle;
      +    /* percentage of process/threads busy (0->100) */
      +    int busy;
      +    /* total bytes served */
      +    apr_off_t bytes_served;
      +    /* total access count */
      +    unsigned long access_count;
      +};
       
      -    core_output_filter_ctx_t *out_ctx;
      -    core_ctx_t *in_ctx;
      -} core_net_rec;
      +/**
      + * @struct ap_loadavg_t
      + * @brief  A structure to hold various server loadavg
      + */
      +typedef struct ap_loadavg_t ap_loadavg_t;
      +struct ap_loadavg_t {
      +    /* current loadavg, ala getloadavg() */
      +    float loadavg;
      +    /* 5 min loadavg */
      +    float loadavg5;
      +    /* 15 min loadavg */
      +    float loadavg15;
      +};
       
       /**
        * Get the context_document_root for a request. This is a generalization of
      @@ -1359,7 +1427,7 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int
          char **) */
       
       /**
      - * Get the characters until the first occurance of a specified character
      + * Get the characters until the first occurrence of a specified character
        * @param p The pool to allocate memory from
        * @param line The string to get the characters from
        * @param stop The character to stop at
      @@ -1368,7 +1436,7 @@ AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int
       AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop);
       
       /**
      - * Get the characters until the first occurance of a specified character
      + * Get the characters until the first occurrence of a specified character
        * @param p The pool to allocate memory from
        * @param line The string to get the characters from
        * @param stop The character to stop at
      @@ -1397,22 +1465,22 @@ AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line);
       AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
       
       /**
      - * Get all characters from the first occurance of @a stop to the first "\0"
      + * Get all characters from the first occurrence of @a stop to the first "\0"
        * @param p The pool to allocate memory from
        * @param line The line to traverse
        * @param stop The character to start at
      - * @return A copy of all caracters after the first occurance of the specified
      + * @return A copy of all characters after the first occurrence of the specified
        *         character
        */
       AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line,
                                           char stop);
       
       /**
      - * Get all characters from the first occurance of @a stop to the first "\0"
      + * Get all characters from the first occurrence of @a stop to the first "\0"
        * @param p The pool to allocate memory from
        * @param line The line to traverse
        * @param stop The character to start at
      - * @return A copy of all caracters after the first occurance of the specified
      + * @return A copy of all characters after the first occurrence of the specified
        *         character
        * @note The same as ap_getword_nulls(), except it doesn't use const char **.
        */
      @@ -1435,6 +1503,25 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line);
        */
       AP_DECLARE(char *) ap_getword_conf_nc(apr_pool_t *p, char **line);
       
      +/**
      + * Get the second word in the string paying attention to quoting,
      + * with {...} supported as well as "..." and '...'
      + * @param p The pool to allocate from
      + * @param line The line to traverse
      + * @return A copy of the string
      + */
      +AP_DECLARE(char *) ap_getword_conf2(apr_pool_t *p, const char **line);
      +
      +/**
      + * Get the second word in the string paying attention to quoting,
      + * with {...} supported as well as "..." and '...'
      + * @param p The pool to allocate from
      + * @param line The line to traverse
      + * @return A copy of the string
      + * @note The same as ap_getword_conf2(), except it doesn't use const char **.
      + */
      +AP_DECLARE(char *) ap_getword_conf2_nc(apr_pool_t *p, char **line);
      +
       /**
        * Check a string for any config define or environment variable construct
        * and replace each of them by the value of that variable, if it exists.
      @@ -1480,6 +1567,63 @@ AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
        */
       AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok);
       
      +/**
      + * Do a weak ETag comparison within an HTTP field value list.
      + * @param p The pool to allocate from
      + * @param line The field value list to search
      + * @param tok The token to search for
      + * @return 1 if found, 0 if not found.
      + */
      +AP_DECLARE(int) ap_find_etag_weak(apr_pool_t *p, const char *line, const char *tok);
      +
      +/**
      + * Do a strong ETag comparison within an HTTP field value list.
      + * @param p The pool to allocate from
      + * @param line The field value list to search
      + * @param tok The token to search for
      + * @return 1 if found, 0 if not found.
      + */
      +AP_DECLARE(int) ap_find_etag_strong(apr_pool_t *p, const char *line, const char *tok);
      +
      +/* Scan a string for field content chars, as defined by RFC7230 section 3.2
      + * including VCHAR/obs-text, as well as HT and SP
      + * @param ptr The string to scan
      + * @return A pointer to the first (non-HT) ASCII ctrl character.
      + * @note lws and trailing whitespace are scanned, the caller is responsible
      + * for trimming leading and trailing whitespace
      + */
      +AP_DECLARE(const char *) ap_scan_http_field_content(const char *ptr);
      +
      +/* Scan a string for token characters, as defined by RFC7230 section 3.2.6 
      + * @param ptr The string to scan
      + * @return A pointer to the first non-token character.
      + */
      +AP_DECLARE(const char *) ap_scan_http_token(const char *ptr);
      +
      +/* Scan a string for visible ASCII (0x21-0x7E) or obstext (0x80+)
      + * and return a pointer to the first SP/CTL/NUL character encountered.
      + * @param ptr The string to scan
      + * @return A pointer to the first SP/CTL character.
      + */
      +AP_DECLARE(const char *) ap_scan_vchar_obstext(const char *ptr);
      +
      +/**
      + * Retrieve an array of tokens in the format "1#token" defined in RFC2616. Only
      + * accepts ',' as a delimiter, does not accept quoted strings, and errors on
      + * any separator.
      + * @param p The pool to allocate from
      + * @param tok The line to read tokens from
      + * @param tokens Pointer to an array of tokens. If not NULL, must be an array
      + *    of char*, otherwise it will be allocated on @a p when a token is found
      + * @param skip_invalid If true, when an invalid separator is encountered, it
      + *    will be ignored.
      + * @return NULL on success, an error string otherwise.
      + * @remark *tokens may be NULL on output if NULL in input and no token is found
      + */
      +AP_DECLARE(const char *) ap_parse_token_list_strict(apr_pool_t *p, const char *tok,
      +                                                    apr_array_header_t **tokens,
      +                                                    int skip_invalid);
      +
       /**
        * Retrieve a token, spacing over it and adjusting the pointer to
        * the first non-white byte afterwards.  Note that these tokens
      @@ -1576,7 +1720,7 @@ AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s);
       AP_DECLARE(char *) ap_escape_path_segment_buffer(char *c, const char *s);
       
       /**
      - * convert an OS path to a URL in an OS dependant way.
      + * convert an OS path to a URL in an OS dependent way.
        * @param p The pool to allocate from
        * @param path The path to convert
        * @param partial if set, assume that the path will be appended to something
      @@ -1688,7 +1832,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s);
       
       /**
        * Given a directory and filename, create a single path from them.  This
      - * function is smart enough to ensure that there is a sinlge '/' between the
      + * function is smart enough to ensure that there is a single '/' between the
        * directory and file names
        * @param a The pool to allocate from
        * @param dir The directory name
      @@ -1701,7 +1845,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s);
       AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f);
       
       /**
      - * Test if the given path has an an absolute path.
      + * Test if the given path has an absolute path.
        * @param p The pool to allocate from
        * @param dir The directory name
        * @note The converse is not necessarily true, some OS's (Win32/OS2/Netware) have
      @@ -1720,19 +1864,19 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir);
       AP_DECLARE(int) ap_is_matchexp(const char *str);
       
       /**
      - * Determine if a string matches a patterm containing the wildcards '?' or '*'
      + * Determine if a string matches a pattern containing the wildcards '?' or '*'
        * @param str The string to check
        * @param expected The pattern to match against
      - * @return 1 if the two strings match, 0 otherwise
      + * @return 0 if the two strings match, 1 otherwise
        */
       AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected);
       
       /**
      - * Determine if a string matches a patterm containing the wildcards '?' or '*',
      + * Determine if a string matches a pattern containing the wildcards '?' or '*',
        * ignoring case
        * @param str The string to check
        * @param expected The pattern to match against
      - * @return 1 if the two strings match, 0 otherwise
      + * @return 0 if the two strings match, 1 otherwise
        */
       AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *expected);
       
      @@ -1808,8 +1952,9 @@ AP_DECLARE(void) ap_pregfree(apr_pool_t *p, ap_regex_t *reg);
        * @param pmatch the pmatch array returned from ap_pregex
        * @return The substituted string, or NULL on error
        */
      -AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *source,
      -                              size_t nmatch, ap_regmatch_t pmatch[]);
      +AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
      +                              const char *source, apr_size_t nmatch,
      +                              ap_regmatch_t pmatch[]);
       
       /**
        * After performing a successful regex match, you may use this function to
      @@ -1823,11 +1968,12 @@ AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, const char *sour
        * @param nmatch the nmatch returned from ap_pregex
        * @param pmatch the pmatch array returned from ap_pregex
        * @param maxlen the maximum string length to return, 0 for unlimited
      - * @return The substituted string, or NULL on error
      + * @return APR_SUCCESS if successful, APR_ENOMEM or other error code otherwise.
        */
       AP_DECLARE(apr_status_t) ap_pregsub_ex(apr_pool_t *p, char **result,
                                              const char *input, const char *source,
      -                                       size_t nmatch, ap_regmatch_t pmatch[],
      +                                       apr_size_t nmatch,
      +                                       ap_regmatch_t pmatch[],
                                              apr_size_t maxlen);
       
       /**
      @@ -2062,12 +2208,6 @@ extern int raise_sigstop_flags;
        */
       AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r);
       
      -/** strtoul does not exist on sunos4. */
      -#ifdef strtoul
      -#undef strtoul
      -#endif
      -#define strtoul strtoul_is_not_a_portable_function_use_strtol_instead
      -
         /* The C library has functions that allow const to be silently dropped ...
            these macros detect the drop in maintainer mode, but use the native
            methods for normal builds
      @@ -2140,7 +2280,9 @@ AP_DECLARE(void) ap_abort_on_oom(void) __attribute__((noreturn));
        * @return pointer to the allocated memory
        * @note ap_malloc may be implemented as a macro
        */
      -AP_DECLARE(void *) ap_malloc(size_t size) __attribute__((malloc));
      +AP_DECLARE(void *) ap_malloc(size_t size)
      +                    __attribute__((malloc))
      +                    AP_FN_ATTR_ALLOC_SIZE(1);
       
       /**
        * Wrapper for calloc() that calls ap_abort_on_oom() if out of memory
      @@ -2149,7 +2291,9 @@ AP_DECLARE(void *) ap_malloc(size_t size) __attribute__((malloc));
        * @return pointer to the allocated memory
        * @note ap_calloc may be implemented as a macro
        */
      -AP_DECLARE(void *) ap_calloc(size_t nelem, size_t size) __attribute__((malloc));
      +AP_DECLARE(void *) ap_calloc(size_t nelem, size_t size)
      +                   __attribute__((malloc))
      +                   AP_FN_ATTR_ALLOC_SIZE2(1,2);
       
       /**
        * Wrapper for realloc() that calls ap_abort_on_oom() if out of memory
      @@ -2159,11 +2303,94 @@ AP_DECLARE(void *) ap_calloc(size_t nelem, size_t size) __attribute__((malloc));
        * @note ap_realloc may be implemented as a macro
        */
       AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
      -                   ap_func_attr_warn_unused_result;
      +                   AP_FN_ATTR_WARN_UNUSED_RESULT
      +                   AP_FN_ATTR_ALLOC_SIZE(2);
       
      +/**
      + * Get server load params
      + * @param ld struct to populate: -1 in fields means error
      + */
      +AP_DECLARE(void) ap_get_sload(ap_sload_t *ld);
      +
      +/**
      + * Get server load averages (ala getloadavg)
      + * @param ld struct to populate: -1 in fields means error
      + */
      +AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld);
      +
      +/**
      + * Convert binary data into a hex string
      + * @param src pointer to the data
      + * @param srclen length of the data
      + * @param dest pointer to buffer of length (2 * srclen + 1). The resulting
      + *        string will be NUL-terminated.
      + */
      +AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest);
      +
      +/**
      + * Short function to execute a command and return the first line of
      + * output minus \r \n. Useful for "obscuring" passwords via exec calls
      + * @param p the pool to allocate from
      + * @param cmd the command to execute
      + * @param argv the arguments to pass to the cmd
      + * @return ptr to characters or NULL on any error
      + */
      +AP_DECLARE(char *) ap_get_exec_line(apr_pool_t *p,
      +                                    const char *cmd,
      +                                    const char * const *argv);
       
       #define AP_NORESTART APR_OS_START_USEERR + 1
       
      +/**
      + * Get the first index of the string in the array or -1 if not found. Start
      + * searching a start. 
      + * @param array The array the check
      + * @param s The string to find
      + * @param start Start index for search. If start is out of bounds (negative or  
      +                equal to array length or greater), -1 will be returned.
      + * @return index of string in array or -1
      + */
      +AP_DECLARE(int) ap_array_str_index(const apr_array_header_t *array, 
      +                                   const char *s,
      +                                   int start);
      +
      +/**
      + * Check if the string is member of the given array by strcmp.
      + * @param array The array the check
      + * @param s The string to find
      + * @return !=0 iff string is member of array (via strcmp)
      + */
      +AP_DECLARE(int) ap_array_str_contains(const apr_array_header_t *array, 
      +                                      const char *s);
      +
      +/**
      + * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
      + * treating upper and lower case values of the 26 standard C/POSIX alphabetic
      + * characters as equivalent. Extended latin characters outside of this set
      + * are treated as unique octets, irrespective of the current locale.
      + *
      + * Returns in integer greater than, equal to, or less than 0,
      + * according to whether @a str1 is considered greater than, equal to,
      + * or less than @a str2.
      + *
      + * @note Same code as apr_cstr_casecmp, which arrives in APR 1.6
      + */
      +AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2);
      +
      +/**
      + * Perform a case-insensitive comparison of two strings @a atr1 and @a atr2,
      + * treating upper and lower case values of the 26 standard C/POSIX alphabetic
      + * characters as equivalent. Extended latin characters outside of this set
      + * are treated as unique octets, irrespective of the current locale.
      + *
      + * Returns in integer greater than, equal to, or less than 0,
      + * according to whether @a str1 is considered greater than, equal to,
      + * or less than @a str2.
      + *
      + * @note Same code as apr_cstr_casecmpn, which arrives in APR 1.6
      + */
      +AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n);
      +
       #ifdef __cplusplus
       }
       #endif
      diff --git a/include/mod_core.h b/include/mod_core.h
      index 5d8b83c14cc..8eab3e12c46 100644
      --- a/include/mod_core.h
      +++ b/include/mod_core.h
      @@ -39,11 +39,11 @@ extern "C" {
       #endif
       
       /* Handles for core filters */
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_input_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_header_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_chunk_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_outerror_filter_handle;
      -extern AP_DECLARE_DATA ap_filter_rec_t *ap_byterange_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_input_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_header_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_chunk_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_http_outerror_filter_handle;
      +AP_DECLARE_DATA extern ap_filter_rec_t *ap_byterange_filter_handle;
       
       /*
        * These (input) filters are internal to the mod_core operation.
      @@ -88,7 +88,7 @@ AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r);
       AP_DECLARE(int) ap_send_http_options(request_rec *r);
       
       /* Used for multipart/byteranges boundary string */
      -extern AP_DECLARE_DATA const char *ap_multipart_boundary;
      +AP_DECLARE_DATA extern const char *ap_multipart_boundary;
       
       /* Init RNG at startup */
       AP_CORE_DECLARE(void) ap_init_rng(apr_pool_t *p);
      diff --git a/include/mpm_common.h b/include/mpm_common.h
      index e6700264ec4..69afef8c944 100644
      --- a/include/mpm_common.h
      +++ b/include/mpm_common.h
      @@ -89,29 +89,34 @@ extern "C" {
       typedef void ap_reclaim_callback_fn_t(int childnum, pid_t pid,
                                             ap_generation_t gen);
       
      +#if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
       /**
        * Make sure all child processes that have been spawned by the parent process
        * have died.  This includes process registered as "other_children".
      + *
        * @param terminate Either 1 or 0.  If 1, send the child processes SIGTERM
        *        each time through the loop.  If 0, give the process time to die
        *        on its own before signalling it.
      + * @param mpm_callback Callback invoked for each dead child process
        *
        * @note The MPM child processes which are reclaimed are those listed
        * in the scoreboard as well as those currently registered via
        * ap_register_extra_mpm_process().
        */
      -void ap_reclaim_child_processes(int terminate,
      -                                ap_reclaim_callback_fn_t *mpm_callback);
      +AP_DECLARE(void) ap_reclaim_child_processes(int terminate,
      +                                            ap_reclaim_callback_fn_t *mpm_callback);
       
       /**
        * Catch any child processes that have been spawned by the parent process
        * which have exited. This includes processes registered as "other_children".
        *
      + * @param mpm_callback Callback invoked for each dead child process
      +
        * @note The MPM child processes which are relieved are those listed
        * in the scoreboard as well as those currently registered via
        * ap_register_extra_mpm_process().
        */
      -void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback);
      +AP_DECLARE(void) ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback);
       
       /**
        * Tell ap_reclaim_child_processes() and ap_relieve_child_processes() about
      @@ -124,7 +129,7 @@ void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback);
        * ap_reclaim_child_processes(), remove it from the list of such processes
        * by calling ap_unregister_extra_mpm_process().
        */
      -void ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen);
      +AP_DECLARE(void) ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen);
       
       /**
        * Unregister an MPM child process which was previously registered by a
      @@ -134,12 +139,7 @@ void ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen);
        * @param old_gen Set to the server generation of the process, if found.
        * @return 1 if the process was found and removed, 0 otherwise
        */
      -int ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *old_gen);
      -
      -/**
      - * Pool cleanup for end-generation hook implementation
      - */
      -apr_status_t ap_mpm_end_gen_helper(void *unused);
      +AP_DECLARE(int) ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *old_gen);
       
       /**
        * Safely signal an MPM child process, if the process is in the
      @@ -150,7 +150,28 @@ apr_status_t ap_mpm_end_gen_helper(void *unused);
        * APR_EINVAL is returned if passed either an invalid (< 1) pid, or if
        * the pid is not in the current process group
        */
      -apr_status_t ap_mpm_safe_kill(pid_t pid, int sig);
      +AP_DECLARE(apr_status_t) ap_mpm_safe_kill(pid_t pid, int sig);
      +
      +/**
      + * Log why a child died to the error log, if the child died without the
      + * parent signalling it.
      + * @param pid The child that has died
      + * @param why The return code of the child process
      + * @param status The status returned from ap_wait_or_timeout
      + * @return 0 on success, APEXIT_CHILDFATAL if MPM should terminate
      + */
      +AP_DECLARE(int) ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status);
      +
      +AP_DECLARE(apr_status_t) ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf);
      +AP_DECLARE(apr_status_t) ap_fatal_signal_child_setup(server_rec *s);
      +
      +#endif /* (!WIN32 && !NETWARE) || DOXYGEN */
      +
      +/**
      + * Pool cleanup for end-generation hook implementation
      + * (core httpd function)
      + */
      +apr_status_t ap_mpm_end_gen_helper(void *unused);
       
       /**
        * Run the monitor hook (once every ten calls), determine if any child
      @@ -162,18 +183,9 @@ apr_status_t ap_mpm_safe_kill(pid_t pid, int sig);
        * @param p The pool to allocate out of
        * @param s The server_rec to pass
        */
      -void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
      -                        apr_pool_t *p, server_rec *s);
      -
      -/**
      - * Log why a child died to the error log, if the child died without the
      - * parent signalling it.
      - * @param pid The child that has died
      - * @param why The return code of the child process
      - * @param status The status returned from ap_wait_or_timeout
      - * @return 0 on success, APEXIT_CHILDFATAL if MPM should terminate
      - */
      -int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status);
      +AP_DECLARE(void) ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode,
      +                                    apr_proc_t *ret, apr_pool_t *p, 
      +                                    server_rec *s);
       
       #if defined(TCP_NODELAY)
       /**
      @@ -221,7 +233,7 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name);
       int initgroups(const char *name, gid_t basegid);
       #endif
       
      -#if !defined(WIN32) || defined(DOXYGEN)
      +#if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
       
       typedef struct ap_pod_t ap_pod_t;
       
      @@ -266,7 +278,50 @@ AP_DECLARE(apr_status_t) ap_mpm_pod_signal(ap_pod_t *pod);
        */
       AP_DECLARE(void) ap_mpm_pod_killpg(ap_pod_t *pod, int num);
       
      -#endif /* !WIN32 || DOXYGEN */
      +#define AP_MPM_PODX_RESTART_CHAR '$'
      +#define AP_MPM_PODX_GRACEFUL_CHAR '!'
      +
      +typedef enum { AP_MPM_PODX_NORESTART, AP_MPM_PODX_RESTART, AP_MPM_PODX_GRACEFUL } ap_podx_restart_t;
      +
      +/**
      + * Open the extended pipe-of-death.
      + * @param p The pool to use for allocating the pipe
      + * @param pod The pipe-of-death that is created.
      + */
      +AP_DECLARE(apr_status_t) ap_mpm_podx_open(apr_pool_t *p, ap_pod_t **pod);
      +
      +/**
      + * Check the extended pipe to determine if the process has been signalled to die.
      + */
      +AP_DECLARE(int) ap_mpm_podx_check(ap_pod_t *pod);
      +
      +/**
      + * Close the pipe-of-death
      + *
      + * @param pod The pipe-of-death to close.
      + */
      +AP_DECLARE(apr_status_t) ap_mpm_podx_close(ap_pod_t *pod);
      +
      +/**
      + * Write data to the extended pipe-of-death, signalling that one child process
      + * should die.
      + * @param pod the pipe-of-death to write to.
      + * @param graceful restart-type
      + */
      +AP_DECLARE(apr_status_t) ap_mpm_podx_signal(ap_pod_t *pod,
      +                                            ap_podx_restart_t graceful);
      +
      +/**
      + * Write data to the extended pipe-of-death, signalling that all child process
      + * should die.
      + * @param pod The pipe-of-death to write to.
      + * @param num The number of child processes to kill
      + * @param graceful restart-type
      + */
      +AP_DECLARE(void) ap_mpm_podx_killpg(ap_pod_t *pod, int num,
      +                                    ap_podx_restart_t graceful);
      +
      +#endif /* (!WIN32 && !NETWARE) || DOXYGEN */
       
       /**
        * Check that exactly one MPM is loaded
      @@ -285,14 +340,14 @@ AP_DECLARE(const char *) ap_check_mpm(void);
        * The maximum number of requests each child thread or
        * process handles before dying off
        */
      -extern int ap_max_requests_per_child;
      +AP_DECLARE_DATA extern int ap_max_requests_per_child;
       const char *ap_mpm_set_max_requests(cmd_parms *cmd, void *dummy,
                                           const char *arg);
       
       /**
        * The filename used to store the process id.
        */
      -extern const char *ap_pid_fname;
      +AP_DECLARE_DATA extern const char *ap_pid_fname;
       const char *ap_mpm_set_pidfile(cmd_parms *cmd, void *dummy,
                                      const char *arg);
       void ap_mpm_dump_pidfile(apr_pool_t *p, apr_file_t *out);
      @@ -300,16 +355,16 @@ void ap_mpm_dump_pidfile(apr_pool_t *p, apr_file_t *out);
       /*
        * The directory that the server changes directory to dump core.
        */
      -extern char ap_coredump_dir[MAX_STRING_LEN];
      -extern int ap_coredumpdir_configured;
      +AP_DECLARE_DATA extern char ap_coredump_dir[MAX_STRING_LEN];
      +AP_DECLARE_DATA extern int ap_coredumpdir_configured;
       const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
                                          const char *arg);
       
       /**
        * Set the timeout period for a graceful shutdown.
        */
      -extern int ap_graceful_shutdown_timeout;
      -const char *ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy,
      +AP_DECLARE_DATA extern int ap_graceful_shutdown_timeout;
      +AP_DECLARE(const char *)ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy,
                                                const char *arg);
       #define AP_GRACEFUL_SHUTDOWN_TIMEOUT_COMMAND \
       AP_INIT_TAKE1("GracefulShutdownTimeout", ap_mpm_set_graceful_shutdown, NULL, \
      @@ -320,17 +375,14 @@ AP_INIT_TAKE1("GracefulShutdownTimeout", ap_mpm_set_graceful_shutdown, NULL, \
       int ap_signal_server(int *, apr_pool_t *);
       void ap_mpm_rewrite_args(process_rec *);
       
      -extern AP_DECLARE_DATA apr_uint32_t ap_max_mem_free;
      +AP_DECLARE_DATA extern apr_uint32_t ap_max_mem_free;
       extern const char *ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy,
                                                  const char *arg);
       
      -extern apr_size_t ap_thread_stacksize;
      +AP_DECLARE_DATA extern apr_size_t ap_thread_stacksize;
       extern const char *ap_mpm_set_thread_stacksize(cmd_parms *cmd, void *dummy,
                                                      const char *arg);
       
      -extern apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *pconf);
      -extern apr_status_t ap_fatal_signal_child_setup(server_rec *s);
      -
       /* core's implementation of child_status hook */
       extern void ap_core_child_status(server_rec *s, pid_t pid, ap_generation_t gen,
                                        int slot, mpm_child_status status);
      @@ -359,6 +411,47 @@ AP_DECLARE_HOOK(apr_status_t, mpm_register_timed_callback,
       /* get MPM name (e.g., "prefork" or "event") */
       AP_DECLARE_HOOK(const char *,mpm_get_name,(void))
       
      +/**
      + * Notification that connection handling is suspending (disassociating from the
      + * current thread)
      + * @param c The current connection
      + * @param r The current request, or NULL if there is no active request
      + * @ingroup hooks
      + * @see ap_hook_resume_connection
      + * @note This hook is not implemented by MPMs like Prefork and Worker which 
      + * handle all processing of a particular connection on the same thread.
      + * @note This hook will be called on the thread that was previously
      + * processing the connection.
      + * @note This hook is not called at the end of connection processing.  This
      + * hook only notifies a module when processing of an active connection is
      + * suspended.
      + * @note Resumption and subsequent suspension of a connection solely to perform
      + * I/O by the MPM, with no execution of non-MPM code, may not necessarily result
      + * in a call to this hook.
      + */
      +AP_DECLARE_HOOK(void, suspend_connection,
      +                (conn_rec *c, request_rec *r))
      +
      +/**
      + * Notification that connection handling is resuming (associating with a thread)
      + * @param c The current connection
      + * @param r The current request, or NULL if there is no active request
      + * @ingroup hooks
      + * @see ap_hook_suspend_connection
      + * @note This hook is not implemented by MPMs like Prefork and Worker which 
      + * handle all processing of a particular connection on the same thread.
      + * @note This hook will be called on the thread that will resume processing
      + * the connection.
      + * @note This hook is not called at the beginning of connection processing.
      + * This hook only notifies a module when processing resumes for a
      + * previously-suspended connection.
      + * @note Resumption and subsequent suspension of a connection solely to perform
      + * I/O by the MPM, with no execution of non-MPM code, may not necessarily result
      + * in a call to this hook.
      + */
      +AP_DECLARE_HOOK(void, resume_connection,
      +                (conn_rec *c, request_rec *r))
      +
       /* mutex type string for accept mutex, if any; MPMs should use the
        * same mutex type for ease of configuration
        */
      diff --git a/include/scoreboard.h b/include/scoreboard.h
      index 8165d57ed3e..1378128943e 100644
      --- a/include/scoreboard.h
      +++ b/include/scoreboard.h
      @@ -26,7 +26,7 @@
       extern "C" {
       #endif
       
      -#ifdef HAVE_SYS_TIMES_H
      +#if APR_HAVE_SYS_TIME_H
       #include <sys/time.h>
       #include <sys/times.h>
       #endif
      @@ -115,12 +115,12 @@ struct worker_score {
           char client[32];            /* Keep 'em small... */
           char request[64];           /* We just want an idea... */
           char vhost[32];             /* What virtual host is being accessed? */
      +    char protocol[16];          /* What protocol is used on the connection? */
       };
       
       typedef struct {
           int             server_limit;
           int             thread_limit;
      -    ap_scoreboard_e sb_type;
           ap_generation_t running_generation; /* the generation of children which
                                                * should still be serving requests.
                                                */
      @@ -143,6 +143,7 @@ struct process_score {
           apr_uint32_t lingering_close;   /* async connections in lingering close */
           apr_uint32_t keep_alive;        /* async connections in keep alive */
           apr_uint32_t suspended;         /* connections suspended by some module */
      +    int bucket;             /* Listener bucket used by this child */
       };
       
       /* Scoreboard is now in 'local' memory, since it isn't updated once created,
      @@ -157,14 +158,21 @@ typedef struct {
       
       typedef struct ap_sb_handle_t ap_sb_handle_t;
       
      +/*
      + * Creation and deletion (internal)
      + */
      +int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
      +apr_status_t ap_cleanup_scoreboard(void *d);
      +
      +/*
      + * APIs for MPMs and other modules
      + */
       AP_DECLARE(int) ap_exists_scoreboard_image(void);
       AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r);
       
      -int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
      -apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
      -void ap_init_scoreboard(void *shared_score);
      +AP_DECLARE(apr_status_t) ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
      +AP_DECLARE(void) ap_init_scoreboard(void *shared_score);
       AP_DECLARE(int) ap_calc_scoreboard_size(void);
      -apr_status_t ap_cleanup_scoreboard(void *d);
       
       AP_DECLARE(void) ap_create_sb_handle(ap_sb_handle_t **new_sbh, apr_pool_t *p,
                                            int child_num, int thread_num);
      @@ -174,11 +182,32 @@ AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status, request_
       AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num, int thread_num,
                                                           int status, request_rec *r);
       AP_DECLARE(int) ap_update_child_status_from_conn(ap_sb_handle_t *sbh, int status, conn_rec *c);
      +AP_DECLARE(int) ap_update_child_status_from_server(ap_sb_handle_t *sbh, int status, 
      +                                                   conn_rec *c, server_rec *s);
      +AP_DECLARE(int) ap_update_child_status_descr(ap_sb_handle_t *sbh, int status, const char *descr);
      +
       AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status);
       
       AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh);
      +
      +/** Return a pointer to the worker_score for a given child, thread pair.
      + * @param child_num The child number.
      + * @param thread_num The thread number.
      + * @return A pointer to the worker_score structure.
      + * @deprecated This function is deprecated, use ap_copy_scoreboard_worker instead. */
       AP_DECLARE(worker_score *) ap_get_scoreboard_worker_from_indexes(int child_num,
                                                                       int thread_num);
      +
      +/** Copy the contents of a worker scoreboard entry.  The contents of
      + * the worker_score structure are copied verbatim into the dest
      + * structure.
      + * @param dest Output parameter.
      + * @param child_num The child number.
      + * @param thread_num The thread number.
      + */
      +AP_DECLARE(void) ap_copy_scoreboard_worker(worker_score *dest,
      +                                           int child_num, int thread_num);
      +
       AP_DECLARE(process_score *) ap_get_scoreboard_process(int x);
       AP_DECLARE(global_score *) ap_get_scoreboard_global(void);
       
      diff --git a/include/util_charset.h b/include/util_charset.h
      index 0deb68f3977..9df000d7952 100644
      --- a/include/util_charset.h
      +++ b/include/util_charset.h
      @@ -20,6 +20,16 @@
        *
        * @defgroup APACHE_CORE_CHARSET Charset Conversion
        * @ingroup  APACHE_CORE
      + * 
      + * These are the translation handles used to translate between the network
      + * format of protocol headers and the local machine format.
      + *
      + * For an EBCDIC machine, these are valid handles which are set up at
      + * initialization to translate between ISO-8859-1 and the code page of
      + * the source code.\n
      + * For an ASCII machine, they are undefined.
      + * 
      + * @see ap_init_ebcdic()
        * @{
        */
       
      @@ -32,17 +42,24 @@ extern "C" {
       
       #include "apr.h"
       
      -#if APR_CHARSET_EBCDIC
      +#if APR_CHARSET_EBCDIC || defined(DOXYGEN)
       
       #include "apr_xlate.h"
       
      -/** On EBCDIC machine this is a translation handle used to translate the
      - *  headers from the local machine format to ASCII for network transmission.
      - *  On an ASCII machine this is NULL */
      +/**
      + * On EBCDIC machine this is a translation handle used to translate the
      + * headers from the local machine format to ASCII for network transmission.
      + * @note On ASCII system, this variable does <b>not</b> exist.
      + * So, its use should be guarded by \#if APR_CHARSET_EBCDIC.
      + */
       extern apr_xlate_t *ap_hdrs_to_ascii;
      -/** On EBCDIC machine this is a translation handle used to translate the
      - *  headers from ASCII to the local machine format after network transmission.
      - *  On an ASCII machine this is NULL */
      +
      +/**
      + * On EBCDIC machine this is a translation handle used to translate the
      + * headers from ASCII to the local machine format after network transmission.
      + * @note On ASCII system, this variable does <b>not</b> exist.
      + * So, its use should be guarded by \#if APR_CHARSET_EBCDIC.
      + */
       extern apr_xlate_t *ap_hdrs_from_ascii;
       
       #endif  /* APR_CHARSET_EBCDIC */
      diff --git a/include/util_cookies.h b/include/util_cookies.h
      index c424dc045d9..51f8facbc70 100644
      --- a/include/util_cookies.h
      +++ b/include/util_cookies.h
      @@ -68,7 +68,7 @@ typedef struct {
       AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name,
                                                const char *val, const char *attrs,
                                                long maxage, ...)
      -                         ap_func_attr_sentinel;
      +                         AP_FN_ATTR_SENTINEL;
       
       /**
        * Write an RFC2965 compliant cookie.
      @@ -85,7 +85,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name,
       AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2,
                                                 const char *val, const char *attrs2,
                                                 long maxage, ...)
      -                         ap_func_attr_sentinel;
      +                         AP_FN_ATTR_SENTINEL;
       
       /**
        * Remove an RFC2109 compliant cookie.
      @@ -99,7 +99,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2,
        */
       AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name,
                                                 const char *attrs, ...)
      -                         ap_func_attr_sentinel;
      +                         AP_FN_ATTR_SENTINEL;
       
       /**
        * Remove an RFC2965 compliant cookie.
      @@ -113,7 +113,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name,
        */
       AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2,
                                                  const char *attrs2, ...)
      -                         ap_func_attr_sentinel;
      +                         AP_FN_ATTR_SENTINEL;
       
       /**
        * Read a cookie called name, placing its value in val.
      diff --git a/include/util_ebcdic.h b/include/util_ebcdic.h
      index fe35e418ad7..14576056771 100644
      --- a/include/util_ebcdic.h
      +++ b/include/util_ebcdic.h
      @@ -35,35 +35,43 @@ extern "C" {
       #include "httpd.h"
       #include "util_charset.h"
       
      -#if APR_CHARSET_EBCDIC
      +#if APR_CHARSET_EBCDIC || defined(DOXYGEN)
       
       /**
      - * Setup all of the global translation handlers
      - * @param pool pool to allocate out of
      + * Setup all of the global translation handlers.
      + * @param   pool    The pool to allocate out of.
      + * @note On non-EBCDIC system, this function does <b>not</b> exist.
      + * So, its use should be guarded by \#if APR_CHARSET_EBCDIC.
        */
       apr_status_t ap_init_ebcdic(apr_pool_t *pool);
       
       /**
        * Convert protocol data from the implementation character
        * set to ASCII.
      - * @param buffer buffer to translate
      - * @param len number of bytes to translate
      + * @param   buffer  Buffer to translate.
      + * @param   len     Number of bytes to translate.
      + * @note On non-EBCDIC system, this function is replaced by an 
      + * empty macro.
        */
       void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len);
       
       /**
        * Convert protocol data to the implementation character
        * set from ASCII.
      - * @param buffer buffer to translate
      - * @param len number of bytes to translate
      + * @param   buffer  Buffer to translate.
      + * @param   len     Number of bytes to translate.
      + * @note On non-EBCDIC system, this function is replaced by an 
      + * empty macro.
        */
       void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len);
       
       /**
      - * Convert protocol data from the implementation charater
      + * Convert protocol data from the implementation character
        * set to ASCII, then send it.
      - * @param r   the current request
      - * @param ... the strings to write, followed by a NULL pointer
      + * @param   r       The current request.
      + * @param   ...     The strings to write, followed by a NULL pointer.
      + * @note On non-EBCDIC system, this function is replaced by a call to
      + * #ap_rvputs.
        */
       int ap_rvputs_proto_in_ascii(request_rec *r, ...);
       
      diff --git a/include/util_fcgi.h b/include/util_fcgi.h
      new file mode 100644
      index 00000000000..849fdee9c3d
      --- /dev/null
      +++ b/include/util_fcgi.h
      @@ -0,0 +1,280 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +/**
      + * @file  util_fcgi.h
      + * @brief FastCGI protocol defitions and support routines
      + *
      + * @defgroup APACHE_CORE_FASTCGI FastCGI Tools
      + * @ingroup  APACHE_CORE
      + * @{
      + */
      +
      +#ifndef APACHE_UTIL_FCGI_H
      +#define APACHE_UTIL_FCGI_H
      +
      +#ifdef __cplusplus
      +extern "C" {
      +#endif
      +
      +#include "httpd.h"
      +
      +/**
      + * @brief A structure that represents the fixed header fields
      + * at the beginning of a "FastCGI record" (i.e., the data prior
      + * to content data and padding).
      + */
      +typedef struct {
      +    /** See values for version, below */
      +    unsigned char version;
      +    /** See values for type, below */
      +    unsigned char type;
      +    /** request id, in two parts */
      +    unsigned char requestIdB1;
      +    unsigned char requestIdB0;
      +    /** content length, in two parts */
      +    unsigned char contentLengthB1;
      +    unsigned char contentLengthB0;
      +    /** padding length */
      +    unsigned char paddingLength;
      +    /** 8-bit reserved field */
      +    unsigned char reserved;
      +} ap_fcgi_header;
      +
      +/*
      + * Number of bytes in the header portion of a FastCGI record
      + * (i.e., ap_fcgi_header structure).  Future versions of the
      + * protocol may increase the size.
      + */
      +#define AP_FCGI_HEADER_LEN  8
      +
      +/*
      + * Maximum number of bytes in the content portion of a FastCGI record.
      + */
      +#define AP_FCGI_MAX_CONTENT_LEN 65535
      +
      +/**
      + * Possible values for the version field of ap_fcgi_header
      + */
      +#define AP_FCGI_VERSION_1 1
      +
      +/**
      + * Possible values for the type field of ap_fcgi_header
      + */
      +#define AP_FCGI_BEGIN_REQUEST       1
      +#define AP_FCGI_ABORT_REQUEST       2
      +#define AP_FCGI_END_REQUEST         3
      +#define AP_FCGI_PARAMS              4
      +#define AP_FCGI_STDIN               5
      +#define AP_FCGI_STDOUT              6
      +#define AP_FCGI_STDERR              7
      +#define AP_FCGI_DATA                8
      +#define AP_FCGI_GET_VALUES          9
      +#define AP_FCGI_GET_VALUES_RESULT  10
      +#define AP_FCGI_UNKNOWN_TYPE       11
      +#define AP_FCGI_MAXTYPE (AP_FCGI_UNKNOWN_TYPE)
      +
      +/**
      + * Offsets of the various fields of ap_fcgi_header
      + */
      +#define AP_FCGI_HDR_VERSION_OFFSET         0
      +#define AP_FCGI_HDR_TYPE_OFFSET            1
      +#define AP_FCGI_HDR_REQUEST_ID_B1_OFFSET   2
      +#define AP_FCGI_HDR_REQUEST_ID_B0_OFFSET   3
      +#define AP_FCGI_HDR_CONTENT_LEN_B1_OFFSET  4
      +#define AP_FCGI_HDR_CONTENT_LEN_B0_OFFSET  5
      +#define AP_FCGI_HDR_PADDING_LEN_OFFSET     6
      +#define AP_FCGI_HDR_RESERVED_OFFSET        7
      +
      +/**
      + * @brief This represents the content data of the FastCGI record when
      + * the type is AP_FCGI_BEGIN_REQUEST.
      + */
      +typedef struct {
      +    /**
      +     * role, in two parts
      +     * See values for role, below
      +     */
      +    unsigned char roleB1;
      +    unsigned char roleB0;
      +    /**
      +     * flags
      +     * See values for flags bits, below
      +     */
      +    unsigned char flags;
      +    /** reserved */
      +    unsigned char reserved[5];
      +} ap_fcgi_begin_request_body;
      +
      +/*
      + * Values for role component of ap_fcgi_begin_request_body
      + */
      +#define AP_FCGI_RESPONDER  1
      +#define AP_FCGI_AUTHORIZER 2
      +#define AP_FCGI_FILTER     3
      +
      +/*
      + * Values for flags bits of ap_fcgi_begin_request_body
      + */
      +#define AP_FCGI_KEEP_CONN  1  /* otherwise the application closes */
      +
      +/**
      + * Offsets of the various fields of ap_fcgi_begin_request_body
      + */
      +#define AP_FCGI_BRB_ROLEB1_OFFSET       0
      +#define AP_FCGI_BRB_ROLEB0_OFFSET       1
      +#define AP_FCGI_BRB_FLAGS_OFFSET        2
      +#define AP_FCGI_BRB_RESERVED0_OFFSET    3
      +#define AP_FCGI_BRB_RESERVED1_OFFSET    4
      +#define AP_FCGI_BRB_RESERVED2_OFFSET    5
      +#define AP_FCGI_BRB_RESERVED3_OFFSET    6
      +#define AP_FCGI_BRB_RESERVED4_OFFSET    7
      +
      +/**
      + * Pack ap_fcgi_header
      + * @param h The header to read from
      + * @param a The array to write to, of size AP_FCGI_HEADER_LEN
      + */
      +AP_DECLARE(void) ap_fcgi_header_to_array(ap_fcgi_header *h,
      +                                         unsigned char a[]);
      +
      +/**
      + * Unpack header of FastCGI record into ap_fcgi_header
      + * @param h The header to write to
      + * @param a The array to read from, of size AP_FCGI_HEADER_LEN
      + */
      +AP_DECLARE(void) ap_fcgi_header_from_array(ap_fcgi_header *h,
      +                                           unsigned char a[]);
      +
      +/**
      + * Unpack header of FastCGI record into individual fields
      + * @param version The version, on output
      + * @param type The type, on output
      + * @param request_id The request id, on output
      + * @param content_len The content length, on output
      + * @param padding_len The amount of padding following the content, on output
      + * @param a The array to read from, of size AP_FCGI_HEADER_LEN
      + */
      +AP_DECLARE(void) ap_fcgi_header_fields_from_array(unsigned char *version,
      +                                                  unsigned char *type,
      +                                                  apr_uint16_t *request_id,
      +                                                  apr_uint16_t *content_len,
      +                                                  unsigned char *padding_len,
      +                                                  unsigned char a[]);
      +
      +/**
      + * Pack ap_fcgi_begin_request_body
      + * @param h The begin-request body to read from
      + * @param a The array to write to, of size AP_FCGI_HEADER_LEN
      + */
      +AP_DECLARE(void) ap_fcgi_begin_request_body_to_array(ap_fcgi_begin_request_body *h,
      +                                                     unsigned char a[]);
      +
      +/**
      + * Fill in a FastCGI request header with the required field values.
      + * @param header The header to fill in
      + * @param type The type of record
      + * @param request_id The request id
      + * @param content_len The amount of content which follows the header
      + * @param padding_len The amount of padding which follows the content
      + *
      + * The header array must be at least AP_FCGI_HEADER_LEN bytes long.
      + */
      +AP_DECLARE(void) ap_fcgi_fill_in_header(ap_fcgi_header *header,
      +                                        unsigned char type,
      +                                        apr_uint16_t request_id,
      +                                        apr_uint16_t content_len,
      +                                        unsigned char padding_len);
      +
      +/**
      + * Fill in a FastCGI begin request body with the required field values.
      + * @param brb The begin-request-body to fill in
      + * @param role AP_FCGI_RESPONDER or other roles
      + * @param flags 0 or a combination of flags like AP_FCGI_KEEP_CONN
      + */
      +AP_DECLARE(void) ap_fcgi_fill_in_request_body(ap_fcgi_begin_request_body *brb,
      +                                              int role,
      +                                              unsigned char flags);
      +
      +/**
      + * Compute the buffer size needed to encode the next portion of
      + * the provided environment table.
      + * @param env The environment table
      + * @param maxlen The maximum buffer size allowable, capped at 
      + * AP_FCGI_MAX_CONTENT_LEN.
      + * @param starting_elem On input, the next element of the table array
      + * to process in this FastCGI record.  On output, the next element to
      + * process on the *next* FastCGI record.
      + * @return Size of buffer needed to encode the next part, or 0
      + * if no more can be encoded.  When 0 is returned: If starting_elem
      + * has reached the end of the table array, all has been encoded;
      + * otherwise, the next envvar can't be encoded within the specified
      + * limit.
      + * @note If an envvar can't be encoded within the specified limit,
      + * the caller can log a warning and increment starting_elem and try 
      + * again or increase the limit or fail, as appropriate for the module.
      + */
      +AP_DECLARE(apr_size_t) ap_fcgi_encoded_env_len(apr_table_t *env,
      +                                               apr_size_t maxlen,
      +                                               int *starting_elem);
      +
      +/**
      + * Encode the next portion of the provided environment table using
      + * a buffer previously allocated.
      + * @param r The request, for logging
      + * @param env The environment table
      + * @param buffer A buffer to contain the encoded environment table
      + * @param buflen The length of the buffer, previously computed by
      + * ap_fcgi_encoded_env_len().
      + * @param starting_elem On input, the next element of the table array
      + * to process in this FastCGI record.  On output, the next element to
      + * process on the *next* FastCGI record.
      + * @return APR_SUCCESS if a section could be encoded or APR_ENOSPC
      + * otherwise.
      + * @note The output starting_elem from ap_fcgi_encoded_env_len
      + * shouldn't be used as input to ap_fcgi_encode_env when building the
      + * same FastCGI record.
      + */
      +AP_DECLARE(apr_status_t) ap_fcgi_encode_env(request_rec *r,
      +                                            apr_table_t *env,
      +                                            void *buffer,
      +                                            apr_size_t buflen,
      +                                            int *starting_elem);
      +
      +/**
      + * String forms for the value of the FCGI_ROLE envvar
      + */
      +#define AP_FCGI_RESPONDER_STR   "RESPONDER"
      +#define AP_FCGI_AUTHORIZER_STR  "AUTHORIZER"
      +#define AP_FCGI_FILTER_STR      "FILTER"
      +
      +/**
      + * FastCGI implementations that implement the AUTHORIZER role
      + * for Apache httpd and allow the application to participate in
      + * any of the Apache httpd AAA phases typically set the variable
      + * FCGI_APACHE_ROLE to one of these strings to indicate the
      + * specific AAA phase.
      + */
      +#define AP_FCGI_APACHE_ROLE_AUTHENTICATOR_STR  "AUTHENTICATOR"
      +#define AP_FCGI_APACHE_ROLE_AUTHORIZER_STR     "AUTHORIZER"
      +#define AP_FCGI_APACHE_ROLE_ACCESS_CHECKER_STR "ACCESS_CHECKER"
      +
      +#ifdef __cplusplus
      +}
      +#endif
      +
      +#endif  /* !APACHE_UTIL_FCGI_H */
      +/** @} */
      diff --git a/include/util_filter.h b/include/util_filter.h
      index a09c5325764..5a966074ff8 100644
      --- a/include/util_filter.h
      +++ b/include/util_filter.h
      @@ -314,6 +314,27 @@ AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter,
       AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *filter,
                                                apr_bucket_brigade *bucket);
       
      +/**
      + * Pass the current bucket brigade down to the next filter on the filter
      + * stack checking for filter errors.  The filter returns an apr_status_t value.
      + * Returns ::OK if the brigade is successfully passed
      + *         ::AP_FILTER_ERROR on a filter error
      + *         ::HTTP_INTERNAL_SERVER_ERROR on all other errors
      + * @param r      The request rec
      + * @param bucket The current bucket brigade
      + * @param fmt The format string. If NULL defaults to "ap_pass_brigade returned"
      + * @param ... The arguments to use to fill out the format string
      + * @remark Ownership of the brigade is retained by the caller. On return,
      + *         the contents of the brigade are UNDEFINED, and the caller must
      + *         either call apr_brigade_cleanup or apr_brigade_destroy on
      + *         the brigade.
      + */
      +AP_DECLARE(apr_status_t) ap_pass_brigade_fchk(request_rec *r,
      +                                              apr_bucket_brigade *bucket,
      +                                              const char *fmt,
      +                                              ...)
      +                                              __attribute__((format(printf,3,4)));
      +
       /**
        * This function is used to register an input filter with the system.
        * After this registration is performed, then a filter may be added
      @@ -465,6 +486,25 @@ AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f);
       
       AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f);
       
      +/**
      + * Remove an input filter from either the request or connection stack
      + * it is associated with.
      + * @param next   The filter stack to search
      + * @param handle The filter handle (name) to remove
      + * @return APR_SUCCESS on removal or error
      + */
      +AP_DECLARE(apr_status_t) ap_remove_input_filter_byhandle(ap_filter_t *next,
      +                                                         const char *handle);
      +/**
      + * Remove an output filter from either the request or connection stack
      + * it is associated with.
      + * @param next   The filter stack to search
      + * @param handle The filter handle (name) to remove
      + * @return APR_SUCCESS on removal or error
      + */
      +AP_DECLARE(apr_status_t) ap_remove_output_filter_byhandle(ap_filter_t *next,
      +                                                          const char *handle);
      +
       /* The next two filters are for abstraction purposes only.  They could be
        * done away with, but that would require that we break modules if we ever
        * want to change our filter registration method.  The basic idea, is that
      @@ -527,7 +567,7 @@ AP_DECLARE(apr_status_t) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb);
        * @param str The string to write
        */
       #define ap_fputs(f, bb, str) \
      -        apr_brigade_puts(bb, ap_filter_flush, f, str)
      +        apr_brigade_write(bb, ap_filter_flush, f, str, strlen(str))
       
       /**
        * Write a character for the current filter, buffering if possible.
      @@ -547,14 +587,14 @@ AP_DECLARE(apr_status_t) ap_fflush(ap_filter_t *f, apr_bucket_brigade *bb);
       AP_DECLARE_NONSTD(apr_status_t) ap_fputstrs(ap_filter_t *f,
                                                   apr_bucket_brigade *bb,
                                                   ...)
      -                                ap_func_attr_sentinel;
      +                                AP_FN_ATTR_SENTINEL;
       
       /**
        * Output data to the filter in printf format
        * @param f the filter we are writing to
        * @param bb The brigade to buffer into
        * @param fmt The format string
      - * @param ... The argumets to use to fill out the format string
      + * @param ... The arguments to use to fill out the format string
        */
       AP_DECLARE_NONSTD(apr_status_t) ap_fprintf(ap_filter_t *f,
                                                  apr_bucket_brigade *bb,
      diff --git a/include/util_ldap.h b/include/util_ldap.h
      index fd60ba9bcd4..f7cd736177a 100644
      --- a/include/util_ldap.h
      +++ b/include/util_ldap.h
      @@ -45,7 +45,7 @@
       /* this whole thing disappears if LDAP is not enabled */
       #if APR_HAS_LDAP
       
      -#if APR_HAS_MICROSOFT_LDAPSDK
      +#if defined(LDAP_UNAVAILABLE) || APR_HAS_MICROSOFT_LDAPSDK
       #define AP_LDAP_IS_SERVER_DOWN(s)                ((s) == LDAP_SERVER_DOWN \
                       ||(s) == LDAP_UNAVAILABLE)
       #else
      @@ -83,6 +83,10 @@
       #define LDAP_DECLARE_DATA             __declspec(dllimport)
       #endif
       
      +#if APR_HAS_MICROSOFT_LDAPSDK
      +#define timeval l_timeval
      +#endif
      +
       #ifdef __cplusplus
       extern "C" {
       #endif
      @@ -129,6 +133,9 @@ typedef struct util_ldap_connection_t {
           int ReferralHopLimit;               /* # of referral hops to follow (default = AP_LDAP_DEFAULT_HOPLIMIT) */
           apr_time_t freed;                   /* the time this conn was placed back in the pool */
           apr_pool_t *rebind_pool;            /* frequently cleared pool for rebind data */
      +    int must_rebind;                    /* The connection was last bound with other then binddn/bindpw */
      +    request_rec *r;                     /* request_rec used to find this util_ldap_connection_t */
      +    apr_time_t last_backend_conn;       /* the approximate time of the last backend LDAP requst */
       } util_ldap_connection_t;
       
       typedef struct util_ldap_config_t {
      @@ -247,7 +254,7 @@ APR_DECLARE_OPTIONAL_FN(util_ldap_connection_t *,uldap_connection_find,(request_
        * @param dn The first DN to compare.
        * @param reqdn The DN to compare the first DN to.
        * @param compare_dn_on_server Flag to determine whether the DNs should be checked using
      - *                             LDAP calls or with a direct string comparision. A direct
      + *                             LDAP calls or with a direct string comparison. A direct
        *                             string comparison is faster, but not as accurate - false
        *                             negative comparisons are possible.
        * @tip Two DNs can be equal and still fail a string comparison. Eg "dc=example,dc=com"
      diff --git a/include/util_md5.h b/include/util_md5.h
      index 4b5edd6b199..0287ef9f030 100644
      --- a/include/util_md5.h
      +++ b/include/util_md5.h
      @@ -33,38 +33,34 @@ extern "C" {
       #include "apr_md5.h"
       
       /**
      - * Create an MD5 checksum of a given string
      - * @param a Pool to allocate out of
      - * @param string String to get the checksum of
      + * Create an MD5 checksum of a given string.
      + * @param   a       Pool to allocate out of
      + * @param   string  String to get the checksum of
        * @return The checksum
      - * @fn char *ap_md5(apr_pool_t *a, const unsigned char *string)
        */
       AP_DECLARE(char *) ap_md5(apr_pool_t *a, const unsigned char *string);
       
       /**
      - * Create an MD5 checksum of a string of binary data
      - * @param a Pool to allocate out of
      - * @param buf Buffer to generate checksum for
      - * @param len The length of the buffer
      + * Create an MD5 checksum of a string of binary data.
      + * @param   a       Pool to allocate out of
      + * @param   buf     Buffer to generate checksum for
      + * @param   len     The length of the buffer
        * @return The checksum
      - * @fn char *ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len)
        */
       AP_DECLARE(char *) ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len);
       
       /**
      - * Convert an MD5 checksum into a base64 encoding
      - * @param p The pool to allocate out of
      - * @param context The context to convert
      + * Convert an MD5 checksum into a base64 encoding.
      + * @param   p       The pool to allocate out of
      + * @param   context The context to convert
        * @return The converted encoding
      - * @fn char *ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context)
        */
       AP_DECLARE(char *) ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context);
       
       /**
      - * Create an MD5 Digest for a given file
      - * @param p The pool to allocate out of
      - * @param infile The file to create the digest for
      - * @fn char *ap_md5digest(apr_pool_t *p, apr_file_t *infile)
      + * Create an MD5 Digest for a given file.
      + * @param   p       The pool to allocate out of
      + * @param   infile  The file to create the digest for
        */
       AP_DECLARE(char *) ap_md5digest(apr_pool_t *p, apr_file_t *infile);
       
      diff --git a/include/util_script.h b/include/util_script.h
      index 9643657c948..3566bd38253 100644
      --- a/include/util_script.h
      +++ b/include/util_script.h
      @@ -155,7 +155,7 @@ AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs(request_rec *r,
                                                             char *buffer,
                                                             const char **termch,
                                                             int *termarg, ...)
      -                       ap_func_attr_sentinel;
      +                       AP_FN_ATTR_SENTINEL;
       
       /**
        * Read headers strings from a script, ensuring that the output is valid.  If
      @@ -178,7 +178,7 @@ AP_DECLARE_NONSTD(int) ap_scan_script_header_err_strs_ex(request_rec *r,
                                                                int module_index,
                                                                const char **termch,
                                                                int *termarg, ...)
      -                       ap_func_attr_sentinel;
      +                       AP_FN_ATTR_SENTINEL;
       
       
       /**
      diff --git a/include/util_varbuf.h b/include/util_varbuf.h
      index 28fb8672030..8e45578e04f 100644
      --- a/include/util_varbuf.h
      +++ b/include/util_varbuf.h
      @@ -17,6 +17,15 @@
       /**
        * @file util_varbuf.h
        * @brief Apache resizable variable length buffer library
      + *
      + * @defgroup APACHE_CORE_VARBUF Variable length buffer library
      + * @ingroup APACHE_CORE
      + *
      + * This set of functions provides resizable buffers. While the primary
      + * usage is with NUL-terminated strings, most functions also work with
      + * arbitrary binary data.
      + * 
      + * @{
        */
       
       #ifndef AP_VARBUF_H
      @@ -34,85 +43,98 @@ extern "C" {
       #define AP_VARBUF_UNKNOWN APR_SIZE_MAX
       struct ap_varbuf_info;
       
      -/** A resizable buffer */
      +/** A resizable buffer. */
       struct ap_varbuf {
      -    /** the actual buffer; will point to a const '\0' if avail == 0 */
      +    /** The actual buffer; will point to a const '\\0' if avail == 0 and
      +     *  to memory of the same lifetime as the pool otherwise. */
           char *buf;
       
      -    /** allocated size of the buffer (minus one for the final \0);
      -     *  must only be changed using ap_varbuf_grow() */
      +    /** Allocated size of the buffer (minus one for the final \\0);
      +     *  must only be changed using ap_varbuf_grow(). */
           apr_size_t avail;
       
      -    /** length of string in buffer, or AP_VARBUF_UNKNOWN. This determines how
      +    /** Length of string in buffer, or AP_VARBUF_UNKNOWN. This determines how
            *  much memory is copied by ap_varbuf_grow() and where
            *  ap_varbuf_strmemcat() will append to the buffer. */
           apr_size_t strlen;
       
      -    /** the pool for memory allocations and for registering the cleanup;
      -     *  the buffer memory will be released when this pool is destroyed */
      +    /** The pool for memory allocations and for registering the cleanup;
      +     *  the buffer memory will be released when this pool is cleared. */
           apr_pool_t *pool;
       
      -    /** opaque info for memory allocation */
      +    /** Opaque info for memory allocation. */
           struct ap_varbuf_info *info;
       };
       
      -/** initialize a resizable buffer. It is safe to re-initialize a prevously
      - *  used ap_varbuf. The old buffer will be released when the corresponding
      - *  pool is destroyed.
      - * @param pool the pool to allocate small buffers from and to register the
      - *        cleanup with
      - * @param vb pointer to the ap_varbuf struct
      - * @init_size the initial size of the buffer (see ap_varbuf_grow() for details)
      +/**
      + * Initialize a resizable buffer. It is safe to re-initialize a previously
      + * used ap_varbuf. The old buffer will be released when the corresponding
      + * pool is cleared. The buffer remains usable until the pool is cleared,
      + * even if the ap_varbuf was located on the stack and has gone out of scope.
      + * @param   pool        The pool to allocate small buffers from and to register
      + *                      the cleanup with
      + * @param   vb          Pointer to the ap_varbuf struct
      + * @param   init_size   The initial size of the buffer (see ap_varbuf_grow() for
      + *                      details)
        */
       AP_DECLARE(void) ap_varbuf_init(apr_pool_t *pool, struct ap_varbuf *vb,
                                       apr_size_t init_size);
       
      -/** grow a resizable buffer. If the vb->buf cannot be grown in place, it will
      - *  be reallocated and up to vb->strlen + 1 bytes of memory will be copied to
      - *  the new location. If vb->strlen == AP_VARBUF_UNKNOWN, the whole buffer
      - *  is copied.
      - * @param vb pointer to the ap_varbuf struct
      - * @param new_size the minimum new size of the buffer
      +/**
      + * Grow a resizable buffer. If the vb->buf cannot be grown in place, it will
      + * be reallocated and the first vb->strlen + 1 bytes of memory will be copied
      + * to the new location. If vb->strlen == AP_VARBUF_UNKNOWN, the whole buffer
      + * is copied.
      + * @param   vb          Pointer to the ap_varbuf struct
      + * @param   new_size    The minimum new size of the buffer
        * @note ap_varbuf_grow() will usually at least double vb->buf's size with
      - *       every invocation in order to reduce reallications.
      + *       every invocation in order to reduce reallocations.
        * @note ap_varbuf_grow() will use pool memory for small and allocator
        *       mem nodes for larger allocations.
        * @note ap_varbuf_grow() will call vb->pool's abort function if out of memory.
        */
       AP_DECLARE(void) ap_varbuf_grow(struct ap_varbuf *vb, apr_size_t new_size);
       
      -/** Release memory from a ap_varbuf immediately, if possible.
      - *  This allows to free large buffers before the corresponding pool is
      - *  destroyed. Only larger allocations using mem nodes will be freed.
      - * @param vb pointer to the ap_varbuf struct
      +/**
      + * Release memory from a ap_varbuf immediately, if possible.
      + * This allows to free large buffers before the corresponding pool is
      + * cleared. Only larger allocations using mem nodes will be freed.
      + * @param   vb          Pointer to the ap_varbuf struct
        * @note After ap_varbuf_free(), vb must not be used unless ap_varbuf_init()
        *       is called again.
        */
       AP_DECLARE(void) ap_varbuf_free(struct ap_varbuf *vb);
       
      -/** Concatenate a string to an ap_varbuf
      - * @param vb pointer to the ap_varbuf struct
      - * @param str the string to append; must be at least len bytes long
      - * @param len the number of characters of *str to concatenate to the buf
      +/**
      + * Concatenate a string to an ap_varbuf. vb->strlen determines where
      + * the string is appended in the buffer. If vb->strlen == AP_VARBUF_UNKNOWN,
      + * the string will be appended at the first NUL byte in the buffer.
      + * If len == 0, ap_varbuf_strmemcat() does nothing.
      + * @param   vb      Pointer to the ap_varbuf struct
      + * @param   str     The string to append; must be at least len bytes long
      + * @param   len     The number of characters of *str to concatenate to the buf
        * @note vb->strlen will be set to the length of the new string
      - * @note vb->buf will be null-terminated
      + * @note if len != 0, vb->buf will always be NUL-terminated
        */
       AP_DECLARE(void) ap_varbuf_strmemcat(struct ap_varbuf *vb, const char *str,
                                            int len);
       
      -/** Duplicate an ap_varbuf's content into pool memory
      - * @param p the pool to allocate from
      - * @param vb the ap_varbuf to copy from
      - * @param prepend an optional buffer to prepend (may be NULL)
      - * @param prepend_len length of prepend
      - * @param append an optional buffer to append (may be NULL)
      - * @param append_len length of append
      - * @param new_len where to store the length of the resulting string
      - *        (may be NULL)
      - * @return the new string
      +/**
      + * Duplicate an ap_varbuf's content into pool memory.
      + * @param   p           The pool to allocate from
      + * @param   vb          The ap_varbuf to copy from
      + * @param   prepend     An optional buffer to prepend (may be NULL)
      + * @param   prepend_len Length of prepend
      + * @param   append      An optional buffer to append (may be NULL)
      + * @param   append_len  Length of append
      + * @param   new_len     Where to store the length of the resulting string
      + *                      (may be NULL)
      + * @return The new string
        * @note ap_varbuf_pdup() uses vb->strlen to determine how much memory to
        *       copy. It works even if 0-bytes are embedded in vb->buf, prepend, or
      - *       append
      + *       append.
      + * @note If vb->strlen equals AP_VARBUF_UNKNOWN, it will be set to
      + *       strlen(vb->buf).
        */
       AP_DECLARE(char *) ap_varbuf_pdup(apr_pool_t *p, struct ap_varbuf *vb,
                                         const char *prepend, apr_size_t prepend_len,
      @@ -120,41 +142,48 @@ AP_DECLARE(char *) ap_varbuf_pdup(apr_pool_t *p, struct ap_varbuf *vb,
                                         apr_size_t *new_len);
       
       
      -/** Concatenate a string to an ap_varbuf
      - * @param vb pointer to the ap_varbuf struct
      - * @param str the string to append
      +/**
      + * Concatenate a string to an ap_varbuf.
      + * @param   vb      Pointer to the ap_varbuf struct
      + * @param   str     The string to append
        * @note vb->strlen will be set to the length of the new string
        */
       #define ap_varbuf_strcat(vb, str) ap_varbuf_strmemcat(vb, str, strlen(str))
       
      -/** Perform string substitutions based on regexp match, using an ap_varbuf.
      +/**
      + * Perform string substitutions based on regexp match, using an ap_varbuf.
        * This function behaves like ap_pregsub(), but appends to an ap_varbuf
        * instead of allocating the result from a pool.
      - * @param input An arbitrary string containing $1 through $9.  These are
      - *              replaced with the corresponding matched sub-expressions
      - * @param source The string that was originally matched to the regex
      - * @param nmatch the nmatch returned from ap_pregex
      - * @param pmatch the pmatch array returned from ap_pregex
      - * @param maxlen the maximum string length to append to vb, 0 for unlimited
      + * @param   vb      The ap_varbuf to which the string will be appended
      + * @param   input   An arbitrary string containing $1 through $9. These are
      + *                  replaced with the corresponding matched sub-expressions
      + * @param   source  The string that was originally matched to the regex
      + * @param   nmatch  The nmatch returned from ap_pregex
      + * @param   pmatch  The pmatch array returned from ap_pregex
      + * @param   maxlen  The maximum string length to append to vb, 0 for unlimited
        * @return APR_SUCCESS if successful
        * @note Just like ap_pregsub(), this function does not copy the part of
        *       *source before the matching part (i.e. the first pmatch[0].rm_so
        *       characters).
      + * @note If vb->strlen equals AP_VARBUF_UNKNOWN, it will be set to
      + *       strlen(vb->buf) first.
        */
       AP_DECLARE(apr_status_t) ap_varbuf_regsub(struct ap_varbuf *vb,
                                                 const char *input,
      -                                          const char *source, size_t nmatch,
      +                                          const char *source,
      +                                          apr_size_t nmatch,
                                                 ap_regmatch_t pmatch[],
                                                 apr_size_t maxlen);
       
      -/** Read a line from an ap_configfile_t into an ap_varbuf.
      - * @param vb pointer to the ap_varbuf struct
      - * @param cfg pointer to the ap_configfile_t
      - * @param max_len (soft) limit for the size of the buffer
      - * @return see ap_cfg_getline()
      - * @note The buffer will not be grown once it has reached at least max_len
      - *       bytes. This means that the returned line can be longer than max_len.
      +/**
      + * Read a line from an ap_configfile_t and append it to an ap_varbuf.
      + * @param   vb      Pointer to the ap_varbuf struct
      + * @param   cfp     Pointer to the ap_configfile_t
      + * @param   max_len Maximum line length, including leading/trailing whitespace
      + * @return See ap_cfg_getline()
        * @note vb->strlen will be set to the length of the line
      + * @note If vb->strlen equals AP_VARBUF_UNKNOWN, it will be set to
      + *       strlen(vb->buf) first.
        */
       AP_DECLARE(apr_status_t) ap_varbuf_cfg_getline(struct ap_varbuf *vb,
                                                      ap_configfile_t *cfp,
      @@ -165,3 +194,4 @@ AP_DECLARE(apr_status_t) ap_varbuf_cfg_getline(struct ap_varbuf *vb,
       #endif
       
       #endif  /* !AP_VARBUF_H */
      +/** @} */
      diff --git a/include/util_xml.h b/include/util_xml.h
      index e60d348bbbb..9faaed15c6c 100644
      --- a/include/util_xml.h
      +++ b/include/util_xml.h
      @@ -35,11 +35,10 @@ extern "C" {
       #endif
       
       /**
      - * Get XML post data and parse it
      - * @param r The current request
      - * @param pdoc The XML post data
      + * Get XML post data and parse it.
      + * @param   r       The current request
      + * @param   pdoc    The XML post data
        * @return HTTP status code
      - * @fn int ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc)
        */
       AP_DECLARE(int) ap_xml_parse_input(request_rec *r, apr_xml_doc **pdoc);
       
      diff --git a/libhttpd.dep b/libhttpd.dep
      new file mode 100644
      index 00000000000..1805b3a4aa5
      --- /dev/null
      +++ b/libhttpd.dep
      @@ -0,0 +1,2421 @@
      +# Microsoft Developer Studio Generated Dependency File, included by libhttpd.mak
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +.\modules\http\byterange_filter.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_date.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\chunk_filter.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\config.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_varbuf.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\connection.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\core.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_provider.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\ap_slotmem.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\mod_proxy.h"\
      +	".\include\mod_so.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_md5.h"\
      +	".\include\util_mutex.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_date.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_md5.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_reslist.h"\
      +	".\srclib\apr-util\include\apr_strmatch.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_uuid.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_random.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\core_filters.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\mod_so.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_md5.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_md5.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\http_core.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\http_etag.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\http_filters.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_date.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\http_protocol.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_date.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\http\http_request.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\log.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_base64.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\protocol.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_strmatch.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\request.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_provider.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_auth.h"\
      +	".\include\mod_core.h"\
      +	".\include\mod_request.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_script.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\vhost.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\core\mod_so.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\modules\core\mod_so.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\modules\arch\win32\mod_win32.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_regkey.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_cgi.h"\
      +	".\include\mod_core.h"\
      +	".\include\mod_include.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_script.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\os\win32\modules.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\eoc_bucket.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_connection.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\eor_bucket.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\error_bucket.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_protocol.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_varbuf.h"\
      +	".\server\test_char.h"\
      +	".\srclib\apr-util\include\apr_base64.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_cfgtree.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_cookies.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_cookies.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_expr_eval.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_provider.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_md5.h"\
      +	".\server\util_expr_private.h"\
      +	".\srclib\apr-util\include\apr_base64.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_md5.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_sha1.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_fnmatch.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_expr_parse.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\server\util_expr_private.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_expr_scan.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\server\util_expr_parse.h"\
      +	".\server\util_expr_private.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_fcgi.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_fcgi.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_filter.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_md5.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_md5.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_md5.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_mutex.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_mutex.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_pcre.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_regex.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_script.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\http_request.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_ebcdic.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_script.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_date.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\util_time.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_time.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\os\win32\util_win32.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	".\srclib\apr\include\arch\apr_private_common.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_file_io.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_misc.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_utf8.h"\
      +	".\srclib\apr\include\arch\win32\apr_private.h"\
      +	
      +
      +.\server\util_xml.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_protocol.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_charset.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_xml.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apr_xlate.h"\
      +	".\srclib\apr-util\include\apr_xml.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\os\win32\ap_regkey.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_regkey.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\os.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	".\srclib\apr\include\arch\apr_private_common.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_file_io.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_misc.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_utf8.h"\
      +	".\srclib\apr\include\arch\win32\apr_private.h"\
      +	
      +
      +.\server\mpm\winnt\child.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_vhost.h"\
      +	".\include\httpd.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\server\mpm\winnt\mpm_default.h"\
      +	".\server\mpm\winnt\mpm_winnt.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_atomic.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\listen.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\httpd.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\mpm_common.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\httpd.h"\
      +	".\include\mod_core.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\include\util_mutex.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_signal.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\mpm\winnt\mpm_winnt.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_connection.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\httpd.h"\
      +	".\include\mpm_common.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\server\mpm\winnt\mpm_default.h"\
      +	".\server\mpm\winnt\mpm_winnt.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_atomic.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\mpm\winnt\nt_eventlog.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_regkey.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\server\mpm\winnt\mpm_winnt.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\provider.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_provider.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\os.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\scoreboard.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_expr.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_mpm.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_core.h"\
      +	".\include\http_log.h"\
      +	".\include\http_main.h"\
      +	".\include\http_protocol.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\scoreboard.h"\
      +	".\include\util_cfgtree.h"\
      +	".\include\util_filter.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_hash.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	
      +
      +.\server\mpm\winnt\service.c : \
      +	".\include\ap_config.h"\
      +	".\include\ap_config_layout.h"\
      +	".\include\ap_hooks.h"\
      +	".\include\ap_listen.h"\
      +	".\include\ap_mmn.h"\
      +	".\include\ap_regex.h"\
      +	".\include\ap_regkey.h"\
      +	".\include\ap_release.h"\
      +	".\include\apache_noprobes.h"\
      +	".\include\http_config.h"\
      +	".\include\http_log.h"\
      +	".\include\httpd.h"\
      +	".\include\os.h"\
      +	".\include\util_cfgtree.h"\
      +	".\server\mpm\winnt\mpm_winnt.h"\
      +	".\srclib\apr-util\include\apr_buckets.h"\
      +	".\srclib\apr-util\include\apr_hooks.h"\
      +	".\srclib\apr-util\include\apr_optional_hooks.h"\
      +	".\srclib\apr-util\include\apr_uri.h"\
      +	".\srclib\apr-util\include\apu.h"\
      +	".\srclib\apr\include\apr.h"\
      +	".\srclib\apr\include\apr_allocator.h"\
      +	".\srclib\apr\include\apr_dso.h"\
      +	".\srclib\apr\include\apr_errno.h"\
      +	".\srclib\apr\include\apr_file_info.h"\
      +	".\srclib\apr\include\apr_file_io.h"\
      +	".\srclib\apr\include\apr_general.h"\
      +	".\srclib\apr\include\apr_getopt.h"\
      +	".\srclib\apr\include\apr_global_mutex.h"\
      +	".\srclib\apr\include\apr_inherit.h"\
      +	".\srclib\apr\include\apr_lib.h"\
      +	".\srclib\apr\include\apr_mmap.h"\
      +	".\srclib\apr\include\apr_network_io.h"\
      +	".\srclib\apr\include\apr_poll.h"\
      +	".\srclib\apr\include\apr_pools.h"\
      +	".\srclib\apr\include\apr_portable.h"\
      +	".\srclib\apr\include\apr_proc_mutex.h"\
      +	".\srclib\apr\include\apr_ring.h"\
      +	".\srclib\apr\include\apr_shm.h"\
      +	".\srclib\apr\include\apr_strings.h"\
      +	".\srclib\apr\include\apr_tables.h"\
      +	".\srclib\apr\include\apr_thread_mutex.h"\
      +	".\srclib\apr\include\apr_thread_proc.h"\
      +	".\srclib\apr\include\apr_time.h"\
      +	".\srclib\apr\include\apr_user.h"\
      +	".\srclib\apr\include\apr_want.h"\
      +	".\srclib\apr\include\arch\apr_private_common.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_misc.h"\
      +	".\srclib\apr\include\arch\win32\apr_arch_utf8.h"\
      +	".\srclib\apr\include\arch\win32\apr_private.h"\
      +	
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +.\build\win32\httpd.rc : \
      +	".\include\ap_release.h"\
      +	
      diff --git a/libhttpd.dsp b/libhttpd.dsp
      index d7ff1a2687e..ae4b17bedeb 100644
      --- a/libhttpd.dsp
      +++ b/libhttpd.dsp
      @@ -19,6 +19,7 @@ CFG=libhttpd - Win32 Release
       !MESSAGE 
       !MESSAGE "libhttpd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
       !MESSAGE "libhttpd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "libhttpd - Win32 Lexical" (based on "Win32 (x86) Dynamic-Link Library")
       !MESSAGE 
       
       # Begin Project
      @@ -138,6 +139,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       
       # Name "libhttpd - Win32 Release"
       # Name "libhttpd - Win32 Debug"
      +# Name "libhttpd - Win32 Lexical"
       # Begin Group "headers"
       
       # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
      @@ -567,6 +569,14 @@ SOURCE=.\server\util_expr_parse.c
       # End Source File
       # Begin Source File
       
      +SOURCE=.\server\util_fcgi.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=.\include\util_fcgi.h
      +# End Source File
      +# Begin Source File
      +
       SOURCE=.\server\util_filter.c
       # End Source File
       # Begin Source File
      @@ -595,6 +605,10 @@ SOURCE=.\server\util_pcre.c
       # End Source File
       # Begin Source File
       
      +SOURCE=.\server\util_regex.c
      +# End Source File
      +# Begin Source File
      +
       SOURCE=.\server\util_script.c
       # End Source File
       # Begin Source File
      diff --git a/libhttpd.mak b/libhttpd.mak
      new file mode 100644
      index 00000000000..0975ec1f0d0
      --- /dev/null
      +++ b/libhttpd.mak
      @@ -0,0 +1,1325 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on libhttpd.dsp
      +!IF "$(CFG)" == ""
      +CFG=libhttpd - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to libhttpd - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "libhttpd - Win32 Release" && "$(CFG)" != "libhttpd - Win32 Debug" && "$(CFG)" != "libhttpd - Win32 Lexical"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "libhttpd.mak" CFG="libhttpd - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "libhttpd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "libhttpd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "libhttpd - Win32 Lexical" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : ".\include\mod_dav.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "gen_test_char - Win32 Release" "libaprutil - Win32 Release" "libapriconv - Win32 Release" "libapr - Win32 Release" ".\include\mod_dav.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libapriconv - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "gen_test_char - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ap_regkey.obj"
      +	-@erase "$(INTDIR)\byterange_filter.obj"
      +	-@erase "$(INTDIR)\child.obj"
      +	-@erase "$(INTDIR)\chunk_filter.obj"
      +	-@erase "$(INTDIR)\config.obj"
      +	-@erase "$(INTDIR)\connection.obj"
      +	-@erase "$(INTDIR)\core.obj"
      +	-@erase "$(INTDIR)\core_filters.obj"
      +	-@erase "$(INTDIR)\eoc_bucket.obj"
      +	-@erase "$(INTDIR)\eor_bucket.obj"
      +	-@erase "$(INTDIR)\error_bucket.obj"
      +	-@erase "$(INTDIR)\http_core.obj"
      +	-@erase "$(INTDIR)\http_etag.obj"
      +	-@erase "$(INTDIR)\http_filters.obj"
      +	-@erase "$(INTDIR)\http_protocol.obj"
      +	-@erase "$(INTDIR)\http_request.obj"
      +	-@erase "$(INTDIR)\libhttpd.res"
      +	-@erase "$(INTDIR)\libhttpd_cl.idb"
      +	-@erase "$(INTDIR)\libhttpd_cl.pdb"
      +	-@erase "$(INTDIR)\listen.obj"
      +	-@erase "$(INTDIR)\log.obj"
      +	-@erase "$(INTDIR)\mod_so.obj"
      +	-@erase "$(INTDIR)\mod_win32.obj"
      +	-@erase "$(INTDIR)\modules.obj"
      +	-@erase "$(INTDIR)\mpm_common.obj"
      +	-@erase "$(INTDIR)\mpm_winnt.obj"
      +	-@erase "$(INTDIR)\nt_eventlog.obj"
      +	-@erase "$(INTDIR)\protocol.obj"
      +	-@erase "$(INTDIR)\provider.obj"
      +	-@erase "$(INTDIR)\request.obj"
      +	-@erase "$(INTDIR)\scoreboard.obj"
      +	-@erase "$(INTDIR)\service.obj"
      +	-@erase "$(INTDIR)\util.obj"
      +	-@erase "$(INTDIR)\util_cfgtree.obj"
      +	-@erase "$(INTDIR)\util_cookies.obj"
      +	-@erase "$(INTDIR)\util_expr_eval.obj"
      +	-@erase "$(INTDIR)\util_expr_parse.obj"
      +	-@erase "$(INTDIR)\util_expr_scan.obj"
      +	-@erase "$(INTDIR)\util_fcgi.obj"
      +	-@erase "$(INTDIR)\util_filter.obj"
      +	-@erase "$(INTDIR)\util_md5.obj"
      +	-@erase "$(INTDIR)\util_mutex.obj"
      +	-@erase "$(INTDIR)\util_pcre.obj"
      +	-@erase "$(INTDIR)\util_regex.obj"
      +	-@erase "$(INTDIR)\util_script.obj"
      +	-@erase "$(INTDIR)\util_time.obj"
      +	-@erase "$(INTDIR)\util_win32.obj"
      +	-@erase "$(INTDIR)\util_xml.obj"
      +	-@erase "$(INTDIR)\vhost.obj"
      +	-@erase "$(OUTDIR)\libhttpd.dll"
      +	-@erase "$(OUTDIR)\libhttpd.exp"
      +	-@erase "$(OUTDIR)\libhttpd.lib"
      +	-@erase "$(OUTDIR)\libhttpd.pdb"
      +	-@erase ".\include\mod_dav.h"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libhttpd_cl" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /d "NDEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libhttpd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=pcre.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib "Release\buildmark.obj" /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libhttpd.pdb" /debug /out:"$(OUTDIR)\libhttpd.dll" /implib:"$(OUTDIR)\libhttpd.lib" /libpath:"./srclib/pcre" /base:@"os\win32\BaseAddr.ref",libhttpd.dll /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\byterange_filter.obj" \
      +	"$(INTDIR)\chunk_filter.obj" \
      +	"$(INTDIR)\config.obj" \
      +	"$(INTDIR)\connection.obj" \
      +	"$(INTDIR)\core.obj" \
      +	"$(INTDIR)\core_filters.obj" \
      +	"$(INTDIR)\http_core.obj" \
      +	"$(INTDIR)\http_etag.obj" \
      +	"$(INTDIR)\http_filters.obj" \
      +	"$(INTDIR)\http_protocol.obj" \
      +	"$(INTDIR)\http_request.obj" \
      +	"$(INTDIR)\log.obj" \
      +	"$(INTDIR)\protocol.obj" \
      +	"$(INTDIR)\request.obj" \
      +	"$(INTDIR)\vhost.obj" \
      +	"$(INTDIR)\mod_so.obj" \
      +	"$(INTDIR)\mod_win32.obj" \
      +	"$(INTDIR)\modules.obj" \
      +	"$(INTDIR)\eoc_bucket.obj" \
      +	"$(INTDIR)\eor_bucket.obj" \
      +	"$(INTDIR)\error_bucket.obj" \
      +	"$(INTDIR)\util.obj" \
      +	"$(INTDIR)\util_cfgtree.obj" \
      +	"$(INTDIR)\util_cookies.obj" \
      +	"$(INTDIR)\util_expr_eval.obj" \
      +	"$(INTDIR)\util_expr_scan.obj" \
      +	"$(INTDIR)\util_expr_parse.obj" \
      +	"$(INTDIR)\util_fcgi.obj" \
      +	"$(INTDIR)\util_filter.obj" \
      +	"$(INTDIR)\util_md5.obj" \
      +	"$(INTDIR)\util_mutex.obj" \
      +	"$(INTDIR)\util_pcre.obj" \
      +	"$(INTDIR)\util_regex.obj" \
      +	"$(INTDIR)\util_script.obj" \
      +	"$(INTDIR)\util_time.obj" \
      +	"$(INTDIR)\util_win32.obj" \
      +	"$(INTDIR)\util_xml.obj" \
      +	"$(INTDIR)\ap_regkey.obj" \
      +	"$(INTDIR)\child.obj" \
      +	"$(INTDIR)\listen.obj" \
      +	"$(INTDIR)\mpm_common.obj" \
      +	"$(INTDIR)\mpm_winnt.obj" \
      +	"$(INTDIR)\nt_eventlog.obj" \
      +	"$(INTDIR)\provider.obj" \
      +	"$(INTDIR)\scoreboard.obj" \
      +	"$(INTDIR)\service.obj" \
      +	"$(INTDIR)\libhttpd.res" \
      +	".\srclib\apr\Release\libapr-1.lib" \
      +	".\srclib\apr-iconv\Release\libapriconv-1.lib" \
      +	".\srclib\apr-util\Release\libaprutil-1.lib"
      +
      +"$(OUTDIR)\libhttpd.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +   cl.exe /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fd"Release\libhttpd" /FD /c server\buildmark.c /Fo"Release\buildmark.obj"
      +	 $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\libhttpd.dll
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libhttpd.dll"
      +   if exist .\Release\libhttpd.dll.manifest mt.exe -manifest .\Release\libhttpd.dll.manifest -outputresource:.\Release\libhttpd.dll;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : ".\server\test_char.h" ".\include\mod_so.h" ".\include\mod_proxy.h" ".\include\mod_include.h" ".\include\mod_dav.h" ".\include\mod_cgi.h" ".\include\ap_config_layout.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "gen_test_char - Win32 Debug" "libaprutil - Win32 Debug" "libapriconv - Win32 Debug" "libapr - Win32 Debug" ".\server\test_char.h" ".\include\mod_so.h" ".\include\mod_proxy.h" ".\include\mod_include.h" ".\include\mod_dav.h" ".\include\mod_cgi.h" ".\include\ap_config_layout.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libapriconv - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "gen_test_char - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ap_regkey.obj"
      +	-@erase "$(INTDIR)\byterange_filter.obj"
      +	-@erase "$(INTDIR)\child.obj"
      +	-@erase "$(INTDIR)\chunk_filter.obj"
      +	-@erase "$(INTDIR)\config.obj"
      +	-@erase "$(INTDIR)\connection.obj"
      +	-@erase "$(INTDIR)\core.obj"
      +	-@erase "$(INTDIR)\core_filters.obj"
      +	-@erase "$(INTDIR)\eoc_bucket.obj"
      +	-@erase "$(INTDIR)\eor_bucket.obj"
      +	-@erase "$(INTDIR)\error_bucket.obj"
      +	-@erase "$(INTDIR)\http_core.obj"
      +	-@erase "$(INTDIR)\http_etag.obj"
      +	-@erase "$(INTDIR)\http_filters.obj"
      +	-@erase "$(INTDIR)\http_protocol.obj"
      +	-@erase "$(INTDIR)\http_request.obj"
      +	-@erase "$(INTDIR)\libhttpd.res"
      +	-@erase "$(INTDIR)\libhttpd_cl.idb"
      +	-@erase "$(INTDIR)\libhttpd_cl.pdb"
      +	-@erase "$(INTDIR)\listen.obj"
      +	-@erase "$(INTDIR)\log.obj"
      +	-@erase "$(INTDIR)\mod_so.obj"
      +	-@erase "$(INTDIR)\mod_win32.obj"
      +	-@erase "$(INTDIR)\modules.obj"
      +	-@erase "$(INTDIR)\mpm_common.obj"
      +	-@erase "$(INTDIR)\mpm_winnt.obj"
      +	-@erase "$(INTDIR)\nt_eventlog.obj"
      +	-@erase "$(INTDIR)\protocol.obj"
      +	-@erase "$(INTDIR)\provider.obj"
      +	-@erase "$(INTDIR)\request.obj"
      +	-@erase "$(INTDIR)\scoreboard.obj"
      +	-@erase "$(INTDIR)\service.obj"
      +	-@erase "$(INTDIR)\util.obj"
      +	-@erase "$(INTDIR)\util_cfgtree.obj"
      +	-@erase "$(INTDIR)\util_cookies.obj"
      +	-@erase "$(INTDIR)\util_expr_eval.obj"
      +	-@erase "$(INTDIR)\util_expr_parse.obj"
      +	-@erase "$(INTDIR)\util_expr_scan.obj"
      +	-@erase "$(INTDIR)\util_fcgi.obj"
      +	-@erase "$(INTDIR)\util_filter.obj"
      +	-@erase "$(INTDIR)\util_md5.obj"
      +	-@erase "$(INTDIR)\util_mutex.obj"
      +	-@erase "$(INTDIR)\util_pcre.obj"
      +	-@erase "$(INTDIR)\util_regex.obj"
      +	-@erase "$(INTDIR)\util_script.obj"
      +	-@erase "$(INTDIR)\util_time.obj"
      +	-@erase "$(INTDIR)\util_win32.obj"
      +	-@erase "$(INTDIR)\util_xml.obj"
      +	-@erase "$(INTDIR)\vhost.obj"
      +	-@erase "$(OUTDIR)\libhttpd.dll"
      +	-@erase "$(OUTDIR)\libhttpd.exp"
      +	-@erase "$(OUTDIR)\libhttpd.lib"
      +	-@erase "$(OUTDIR)\libhttpd.pdb"
      +	-@erase ".\include\ap_config_layout.h"
      +	-@erase ".\include\mod_cgi.h"
      +	-@erase ".\include\mod_dav.h"
      +	-@erase ".\include\mod_include.h"
      +	-@erase ".\include\mod_proxy.h"
      +	-@erase ".\include\mod_so.h"
      +	-@erase ".\server\test_char.h"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libhttpd_cl" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /d "_DEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libhttpd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=pcred.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib "Debug\buildmark.obj" /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libhttpd.pdb" /debug /out:"$(OUTDIR)\libhttpd.dll" /implib:"$(OUTDIR)\libhttpd.lib" /libpath:"./srclib/pcre" /base:@"os\win32\BaseAddr.ref",libhttpd.dll 
      +LINK32_OBJS= \
      +	"$(INTDIR)\byterange_filter.obj" \
      +	"$(INTDIR)\chunk_filter.obj" \
      +	"$(INTDIR)\config.obj" \
      +	"$(INTDIR)\connection.obj" \
      +	"$(INTDIR)\core.obj" \
      +	"$(INTDIR)\core_filters.obj" \
      +	"$(INTDIR)\http_core.obj" \
      +	"$(INTDIR)\http_etag.obj" \
      +	"$(INTDIR)\http_filters.obj" \
      +	"$(INTDIR)\http_protocol.obj" \
      +	"$(INTDIR)\http_request.obj" \
      +	"$(INTDIR)\log.obj" \
      +	"$(INTDIR)\protocol.obj" \
      +	"$(INTDIR)\request.obj" \
      +	"$(INTDIR)\vhost.obj" \
      +	"$(INTDIR)\mod_so.obj" \
      +	"$(INTDIR)\mod_win32.obj" \
      +	"$(INTDIR)\modules.obj" \
      +	"$(INTDIR)\eoc_bucket.obj" \
      +	"$(INTDIR)\eor_bucket.obj" \
      +	"$(INTDIR)\error_bucket.obj" \
      +	"$(INTDIR)\util.obj" \
      +	"$(INTDIR)\util_cfgtree.obj" \
      +	"$(INTDIR)\util_cookies.obj" \
      +	"$(INTDIR)\util_expr_eval.obj" \
      +	"$(INTDIR)\util_expr_scan.obj" \
      +	"$(INTDIR)\util_expr_parse.obj" \
      +	"$(INTDIR)\util_fcgi.obj" \
      +	"$(INTDIR)\util_filter.obj" \
      +	"$(INTDIR)\util_md5.obj" \
      +	"$(INTDIR)\util_mutex.obj" \
      +	"$(INTDIR)\util_pcre.obj" \
      +	"$(INTDIR)\util_regex.obj" \
      +	"$(INTDIR)\util_script.obj" \
      +	"$(INTDIR)\util_time.obj" \
      +	"$(INTDIR)\util_win32.obj" \
      +	"$(INTDIR)\util_xml.obj" \
      +	"$(INTDIR)\ap_regkey.obj" \
      +	"$(INTDIR)\child.obj" \
      +	"$(INTDIR)\listen.obj" \
      +	"$(INTDIR)\mpm_common.obj" \
      +	"$(INTDIR)\mpm_winnt.obj" \
      +	"$(INTDIR)\nt_eventlog.obj" \
      +	"$(INTDIR)\provider.obj" \
      +	"$(INTDIR)\scoreboard.obj" \
      +	"$(INTDIR)\service.obj" \
      +	"$(INTDIR)\libhttpd.res" \
      +	".\srclib\apr\Debug\libapr-1.lib" \
      +	".\srclib\apr-iconv\Debug\libapriconv-1.lib" \
      +	".\srclib\apr-util\Debug\libaprutil-1.lib"
      +
      +"$(OUTDIR)\libhttpd.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +   cl.exe /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fd"Debug\libhttpd" /FD /c server\buildmark.c /Fo"Debug\buildmark.obj"
      +	 $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\libhttpd.dll
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libhttpd.dll"
      +   if exist .\Debug\libhttpd.dll.manifest mt.exe -manifest .\Debug\libhttpd.dll.manifest -outputresource:.\Debug\libhttpd.dll;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : ".\server\util_expr_parse.h" ".\server\util_expr_parse.c" ".\server\test_char.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : ".\server\util_expr_parse.h" ".\server\util_expr_parse.c" ".\server\test_char.h" "$(OUTDIR)\libhttpd.dll" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ap_regkey.obj"
      +	-@erase "$(INTDIR)\byterange_filter.obj"
      +	-@erase "$(INTDIR)\child.obj"
      +	-@erase "$(INTDIR)\chunk_filter.obj"
      +	-@erase "$(INTDIR)\config.obj"
      +	-@erase "$(INTDIR)\connection.obj"
      +	-@erase "$(INTDIR)\core.obj"
      +	-@erase "$(INTDIR)\core_filters.obj"
      +	-@erase "$(INTDIR)\eoc_bucket.obj"
      +	-@erase "$(INTDIR)\eor_bucket.obj"
      +	-@erase "$(INTDIR)\error_bucket.obj"
      +	-@erase "$(INTDIR)\http_core.obj"
      +	-@erase "$(INTDIR)\http_etag.obj"
      +	-@erase "$(INTDIR)\http_filters.obj"
      +	-@erase "$(INTDIR)\http_protocol.obj"
      +	-@erase "$(INTDIR)\http_request.obj"
      +	-@erase "$(INTDIR)\libhttpd.res"
      +	-@erase "$(INTDIR)\libhttpd_cl.idb"
      +	-@erase "$(INTDIR)\libhttpd_cl.pdb"
      +	-@erase "$(INTDIR)\listen.obj"
      +	-@erase "$(INTDIR)\log.obj"
      +	-@erase "$(INTDIR)\mod_so.obj"
      +	-@erase "$(INTDIR)\mod_win32.obj"
      +	-@erase "$(INTDIR)\modules.obj"
      +	-@erase "$(INTDIR)\mpm_common.obj"
      +	-@erase "$(INTDIR)\mpm_winnt.obj"
      +	-@erase "$(INTDIR)\nt_eventlog.obj"
      +	-@erase "$(INTDIR)\protocol.obj"
      +	-@erase "$(INTDIR)\provider.obj"
      +	-@erase "$(INTDIR)\request.obj"
      +	-@erase "$(INTDIR)\scoreboard.obj"
      +	-@erase "$(INTDIR)\service.obj"
      +	-@erase "$(INTDIR)\util.obj"
      +	-@erase "$(INTDIR)\util_cfgtree.obj"
      +	-@erase "$(INTDIR)\util_cookies.obj"
      +	-@erase "$(INTDIR)\util_expr_eval.obj"
      +	-@erase "$(INTDIR)\util_expr_parse.obj"
      +	-@erase "$(INTDIR)\util_expr_scan.obj"
      +	-@erase "$(INTDIR)\util_fcgi.obj"
      +	-@erase "$(INTDIR)\util_filter.obj"
      +	-@erase "$(INTDIR)\util_md5.obj"
      +	-@erase "$(INTDIR)\util_mutex.obj"
      +	-@erase "$(INTDIR)\util_pcre.obj"
      +	-@erase "$(INTDIR)\util_regex.obj"
      +	-@erase "$(INTDIR)\util_script.obj"
      +	-@erase "$(INTDIR)\util_time.obj"
      +	-@erase "$(INTDIR)\util_win32.obj"
      +	-@erase "$(INTDIR)\util_xml.obj"
      +	-@erase "$(INTDIR)\vhost.obj"
      +	-@erase "$(OUTDIR)\libhttpd.dll"
      +	-@erase "$(OUTDIR)\libhttpd.exp"
      +	-@erase "$(OUTDIR)\libhttpd.lib"
      +	-@erase "$(OUTDIR)\libhttpd.pdb"
      +	-@erase ".\server\test_char.h"
      +	-@erase ".\server\util_expr_parse.c"
      +	-@erase ".\server\util_expr_parse.h"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\libhttpd_cl" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /d "NDEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\libhttpd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=pcre.lib kernel32.lib user32.lib advapi32.lib ws2_32.lib mswsock.lib "Release\buildmark.obj" /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\libhttpd.pdb" /debug /out:"$(OUTDIR)\libhttpd.dll" /implib:"$(OUTDIR)\libhttpd.lib" /libpath:"./srclib/pcre" /base:@"os\win32\BaseAddr.ref",libhttpd.dll /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\byterange_filter.obj" \
      +	"$(INTDIR)\chunk_filter.obj" \
      +	"$(INTDIR)\config.obj" \
      +	"$(INTDIR)\connection.obj" \
      +	"$(INTDIR)\core.obj" \
      +	"$(INTDIR)\core_filters.obj" \
      +	"$(INTDIR)\http_core.obj" \
      +	"$(INTDIR)\http_etag.obj" \
      +	"$(INTDIR)\http_filters.obj" \
      +	"$(INTDIR)\http_protocol.obj" \
      +	"$(INTDIR)\http_request.obj" \
      +	"$(INTDIR)\log.obj" \
      +	"$(INTDIR)\protocol.obj" \
      +	"$(INTDIR)\request.obj" \
      +	"$(INTDIR)\vhost.obj" \
      +	"$(INTDIR)\mod_so.obj" \
      +	"$(INTDIR)\mod_win32.obj" \
      +	"$(INTDIR)\modules.obj" \
      +	"$(INTDIR)\eoc_bucket.obj" \
      +	"$(INTDIR)\eor_bucket.obj" \
      +	"$(INTDIR)\error_bucket.obj" \
      +	"$(INTDIR)\util.obj" \
      +	"$(INTDIR)\util_cfgtree.obj" \
      +	"$(INTDIR)\util_cookies.obj" \
      +	"$(INTDIR)\util_expr_eval.obj" \
      +	"$(INTDIR)\util_expr_scan.obj" \
      +	"$(INTDIR)\util_expr_parse.obj" \
      +	"$(INTDIR)\util_fcgi.obj" \
      +	"$(INTDIR)\util_filter.obj" \
      +	"$(INTDIR)\util_md5.obj" \
      +	"$(INTDIR)\util_mutex.obj" \
      +	"$(INTDIR)\util_pcre.obj" \
      +	"$(INTDIR)\util_regex.obj" \
      +	"$(INTDIR)\util_script.obj" \
      +	"$(INTDIR)\util_time.obj" \
      +	"$(INTDIR)\util_win32.obj" \
      +	"$(INTDIR)\util_xml.obj" \
      +	"$(INTDIR)\ap_regkey.obj" \
      +	"$(INTDIR)\child.obj" \
      +	"$(INTDIR)\listen.obj" \
      +	"$(INTDIR)\mpm_common.obj" \
      +	"$(INTDIR)\mpm_winnt.obj" \
      +	"$(INTDIR)\nt_eventlog.obj" \
      +	"$(INTDIR)\provider.obj" \
      +	"$(INTDIR)\scoreboard.obj" \
      +	"$(INTDIR)\service.obj" \
      +	"$(INTDIR)\libhttpd.res"
      +
      +"$(OUTDIR)\libhttpd.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +   cl.exe /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./srclib/apr/include" /I "./srclib/apr-util/include" /I "./srclib/pcre" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_DECLARE_EXPORT" /Fd"Release\libhttpd" /FD /c server\buildmark.c /Fo"Release\buildmark.obj"
      +	 $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\libhttpd.dll
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\libhttpd.dll"
      +   if exist .\Release\libhttpd.dll.manifest mt.exe -manifest .\Release\libhttpd.dll.manifest -outputresource:.\Release\libhttpd.dll;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("libhttpd.dep")
      +!INCLUDE "libhttpd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "libhttpd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "libhttpd - Win32 Release" || "$(CFG)" == "libhttpd - Win32 Debug" || "$(CFG)" == "libhttpd - Win32 Lexical"
      +SOURCE=.\modules\generators\mod_cgi.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\modules\generators\mod_cgi.h
      +
      +".\include\mod_cgi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\generators\mod_cgi.h > .\include\mod_cgi.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\modules\generators\mod_cgi.h
      +
      +".\include\mod_cgi.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\generators\mod_cgi.h > .\include\mod_cgi.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\modules\dav\main\mod_dav.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\modules\dav\main\mod_dav.h
      +
      +".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\dav\main\mod_dav.h > .\include\mod_dav.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\modules\dav\main\mod_dav.h
      +
      +".\include\mod_dav.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\dav\main\mod_dav.h > .\include\mod_dav.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\modules\filters\mod_include.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\modules\filters\mod_include.h
      +
      +".\include\mod_include.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\filters\mod_include.h > .\include\mod_include.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\modules\filters\mod_include.h
      +
      +".\include\mod_include.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\filters\mod_include.h > .\include\mod_include.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\modules\proxy\mod_proxy.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\modules\proxy\mod_proxy.h
      +
      +".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\proxy\mod_proxy.h > .\include\mod_proxy.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\modules\proxy\mod_proxy.h
      +
      +".\include\mod_proxy.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\proxy\mod_proxy.h > .\include\mod_proxy.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\modules\core\mod_so.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\modules\core\mod_so.h
      +
      +".\include\mod_so.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\core\mod_so.h > .\include\mod_so.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\modules\core\mod_so.h
      +
      +".\include\mod_so.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\modules\core\mod_so.h > .\include\mod_so.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\os\win32\os.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\os\win32\os.h
      +
      +".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\os\win32\os.h > .\include\os.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\os\win32\os.h
      +
      +".\include\os.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\os\win32\os.h > .\include\os.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\os\win32\win32_config_layout.h
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\os\win32\win32_config_layout.h
      +
      +".\include\ap_config_layout.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\os\win32\win32_config_layout.h > .\include\ap_config_layout.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\os\win32\win32_config_layout.h
      +
      +".\include\ap_config_layout.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	type .\os\win32\win32_config_layout.h > .\include\ap_config_layout.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\server\buildmark.c
      +SOURCE=.\modules\http\byterange_filter.c
      +
      +"$(INTDIR)\byterange_filter.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\chunk_filter.c
      +
      +"$(INTDIR)\chunk_filter.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\config.c
      +
      +"$(INTDIR)\config.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\connection.c
      +
      +"$(INTDIR)\connection.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\core.c
      +
      +"$(INTDIR)\core.obj" : $(SOURCE) "$(INTDIR)" ".\include\mod_proxy.h" ".\include\mod_so.h" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\core_filters.c
      +
      +"$(INTDIR)\core_filters.obj" : $(SOURCE) "$(INTDIR)" ".\include\mod_so.h" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\http_core.c
      +
      +"$(INTDIR)\http_core.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\http_etag.c
      +
      +"$(INTDIR)\http_etag.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\http_filters.c
      +
      +"$(INTDIR)\http_filters.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\http_protocol.c
      +
      +"$(INTDIR)\http_protocol.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\http\http_request.c
      +
      +"$(INTDIR)\http_request.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\log.c
      +
      +"$(INTDIR)\log.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\protocol.c
      +
      +"$(INTDIR)\protocol.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\request.c
      +
      +"$(INTDIR)\request.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\vhost.c
      +
      +"$(INTDIR)\vhost.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\core\mod_so.c
      +
      +"$(INTDIR)\mod_so.obj" : $(SOURCE) "$(INTDIR)" ".\modules\core\mod_so.h" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\modules\arch\win32\mod_win32.c
      +
      +"$(INTDIR)\mod_win32.obj" : $(SOURCE) "$(INTDIR)" ".\include\mod_cgi.h" ".\include\os.h" ".\include\ap_config_layout.h" ".\include\mod_include.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\os\win32\modules.c
      +
      +"$(INTDIR)\modules.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\eoc_bucket.c
      +
      +"$(INTDIR)\eoc_bucket.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\eor_bucket.c
      +
      +"$(INTDIR)\eor_bucket.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\error_bucket.c
      +
      +"$(INTDIR)\error_bucket.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util.c
      +
      +"$(INTDIR)\util.obj" : $(SOURCE) "$(INTDIR)" ".\server\test_char.h" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_cfgtree.c
      +
      +"$(INTDIR)\util_cfgtree.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_cookies.c
      +
      +"$(INTDIR)\util_cookies.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_expr_eval.c
      +
      +"$(INTDIR)\util_expr_eval.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_expr_parse.c
      +
      +"$(INTDIR)\util_expr_parse.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_expr_scan.c
      +
      +"$(INTDIR)\util_expr_scan.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_fcgi.c
      +
      +"$(INTDIR)\util_fcgi.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_filter.c
      +
      +"$(INTDIR)\util_filter.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_md5.c
      +
      +"$(INTDIR)\util_md5.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_mutex.c
      +
      +"$(INTDIR)\util_mutex.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_pcre.c
      +
      +"$(INTDIR)\util_pcre.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_regex.c
      +
      +"$(INTDIR)\util_regex.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_script.c
      +
      +"$(INTDIR)\util_script.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_time.c
      +
      +"$(INTDIR)\util_time.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\os\win32\util_win32.c
      +
      +"$(INTDIR)\util_win32.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_xml.c
      +
      +"$(INTDIR)\util_xml.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\os\win32\ap_regkey.c
      +
      +"$(INTDIR)\ap_regkey.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\mpm\winnt\child.c
      +
      +"$(INTDIR)\child.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\listen.c
      +
      +"$(INTDIR)\listen.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\mpm_common.c
      +
      +"$(INTDIR)\mpm_common.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\mpm\winnt\mpm_winnt.c
      +
      +"$(INTDIR)\mpm_winnt.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\mpm\winnt\nt_eventlog.c
      +
      +"$(INTDIR)\nt_eventlog.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\provider.c
      +
      +"$(INTDIR)\provider.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\scoreboard.c
      +
      +"$(INTDIR)\scoreboard.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\mpm\winnt\service.c
      +
      +"$(INTDIR)\service.obj" : $(SOURCE) "$(INTDIR)" ".\include\os.h" ".\include\ap_config_layout.h"
      +	$(CPP) $(CPP_PROJ) $(SOURCE)
      +
      +
      +SOURCE=.\server\util_expr_parse.y
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +InputPath=.\server\util_expr_parse.y
      +
      +".\server\util_expr_parse.c"	".\server\util_expr_parse.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	bison -pap_expr_yy --defines=.\server\util_expr_parse.h -o .\server\util_expr_parse.c .\server\util_expr_parse.y
      +<< 
      +	
      +
      +!ENDIF 
      +
      +SOURCE=.\server\util_expr_scan.l
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +InputPath=.\server\util_expr_scan.l
      +
      +".\server\util_expr_scan.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
      +	<<tempfile.bat 
      +	@echo off 
      +	flex -Pap_expr_yy -o .\server\util_expr_scan.c .\server\util_expr_scan.l
      +<< 
      +	
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\.."
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\.."
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +"libapriconv - Win32 Release" : 
      +   cd ".\srclib\apr-iconv"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Release" 
      +   cd "..\.."
      +
      +"libapriconv - Win32 ReleaseCLEAN" : 
      +   cd ".\srclib\apr-iconv"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +"libapriconv - Win32 Debug" : 
      +   cd ".\srclib\apr-iconv"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Debug" 
      +   cd "..\.."
      +
      +"libapriconv - Win32 DebugCLEAN" : 
      +   cd ".\srclib\apr-iconv"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapriconv.mak" CFG="libapriconv - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\.."
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\.."
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\.."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +"gen_test_char - Win32 Release" : 
      +   cd ".\server"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\gen_test_char.mak" CFG="gen_test_char - Win32 Release" 
      +   cd ".."
      +
      +"gen_test_char - Win32 ReleaseCLEAN" : 
      +   cd ".\server"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\gen_test_char.mak" CFG="gen_test_char - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +"gen_test_char - Win32 Debug" : 
      +   cd ".\server"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\gen_test_char.mak" CFG="gen_test_char - Win32 Debug" 
      +   cd ".."
      +
      +"gen_test_char - Win32 DebugCLEAN" : 
      +   cd ".\server"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\gen_test_char.mak" CFG="gen_test_char - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".."
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +!ENDIF 
      +
      +SOURCE=.\server\gen_test_char.exe
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +InputPath=.\server\gen_test_char.exe
      +USERDEP__GEN_T=".\include\os.h"	
      +
      +".\server\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(USERDEP__GEN_T)
      +	<<tempfile.bat 
      +	@echo off 
      +	.\server\gen_test_char.exe >.\server\test_char.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +InputPath=.\server\gen_test_char.exe
      +USERDEP__GEN_T=".\include\os.h"	
      +
      +".\server\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(USERDEP__GEN_T)
      +	<<tempfile.bat 
      +	@echo off 
      +	.\server\gen_test_char.exe >.\server\test_char.h
      +<< 
      +	
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +InputPath=.\server\gen_test_char.exe
      +USERDEP__GEN_T=".\include\os.h"	
      +
      +".\server\test_char.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" $(USERDEP__GEN_T)
      +	<<tempfile.bat 
      +	@echo off 
      +	.\server\gen_test_char.exe >.\server\test_char.h
      +<< 
      +	
      +
      +!ENDIF 
      +
      +SOURCE=.\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "libhttpd - Win32 Release"
      +
      +
      +"$(INTDIR)\libhttpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /i "build\win32" /d "NDEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Debug"
      +
      +
      +"$(INTDIR)\libhttpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /i "build\win32" /d "_DEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "libhttpd - Win32 Lexical"
      +
      +
      +"$(INTDIR)\libhttpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\libhttpd.res" /i "./include" /i "./srclib/apr/include" /i "build\win32" /d "NDEBUG" /d BIN_NAME="libhttpd.dll" /d LONG_NAME="Apache HTTP Server Core" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/NWGNUmakefile b/modules/NWGNUmakefile
      index b929d01a541..ac8ee3e0351 100644
      --- a/modules/NWGNUmakefile
      +++ b/modules/NWGNUmakefile
      @@ -5,7 +5,8 @@
       #  variable WITH_SSL=1
       # To build with the mod_lua module set the environment
       #  variable WITH_LUA=1
      -
      +# To build with the mod_http2 module set the environment
      +#  variable WITH_HTTP2=1
       #
       # Check if LDAP is enabled in APR-UTIL
       #
      @@ -13,10 +14,15 @@ include $(AP_WORK)/build/NWGNUenvironment.inc
       ifeq "$(wildcard $(APRUTIL)/include/apr_ldap.h)" "$(APRUTIL)/include/apr_ldap.h"
       WITH_LDAP = $(shell $(AWK) '/^\#define APR_HAS_LDAP /{print $$3}' $(APRUTIL)/include/apr_ldap.h)
       else
      +WITH_LDAP = 1
      +ifneq "$(MAKECMDGOALS)" "clean"
      +ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
       WITH_LDAP = 0
       endif
      +endif
      +endif
       
      -# If USE_STDSOCKETS is defined we allways build mod_ssl
      +# If USE_STDSOCKETS is defined we always build mod_ssl
       ifdef USE_STDSOCKETS
       WITH_SSL = 1
       endif
      @@ -29,6 +35,7 @@ SUBDIRS = \
       	aaa \
       	cache \
       	cluster \
      +	core \
       	dav/main \
       	dav/fs \
       	dav/lock \
      @@ -66,6 +73,13 @@ SUBDIRS += lua
       endif
       endif
       
      +# Allow the mod_http2 module to be built if WITH_HTTP2 is defined
      +ifeq "$(WITH_HTTP2)" "1"
      +ifneq "$(NGH2SRC)" ""
      +SUBDIRS += http2
      +endif
      +endif
      +
       # Allow the experimental modules to be built if WITH_EXPERIMENTAL is defined
       ifeq "$(WITH_EXPERIMENTAL)" "1"
       SUBDIRS += experimental
      diff --git a/modules/README b/modules/README
      index f11ad42f216..2dee0795664 100644
      --- a/modules/README
      +++ b/modules/README
      @@ -41,6 +41,9 @@ generators/
       http/
         This directory houses modules that basic HTTP protocol implementation.
       
      +http2/
      +  This directory houses modules that provide HTTP/2 protocol implementation.
      +
       loggers/
         This directory houses modules that handle logging functions.
       
      diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4
      index aa324ccb0d5..b443761d2b5 100644
      --- a/modules/aaa/config.m4
      +++ b/modules/aaa/config.m4
      @@ -55,6 +55,10 @@ APACHE_MODULE(authnz_ldap, LDAP based authentication, , , most, [
         fi
       ])
       
      +dnl FastCGI authorizer interface, supporting authn and authz.
      +APACHE_MODULE(authnz_fcgi,
      +              FastCGI authorizer-based authentication and authorization, , , no)
      +
       dnl - host access control compatibility modules. Implements Order, Allow,
       dnl Deny, Satisfy for backward compatibility.  These directives have been
       dnl deprecated in 2.4.
      @@ -63,7 +67,7 @@ APACHE_MODULE(access_compat, mod_access compatibility, , , yes)
       dnl these are the front-end authentication modules
       
       APACHE_MODULE(auth_basic, basic authentication, , , yes)
      -APACHE_MODULE(auth_form, form authentication, , , yes)
      +APACHE_MODULE(auth_form, form authentication, , , most)
       APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most, [
         APR_CHECK_APR_DEFINE(APR_HAS_RANDOM)
         if test $ac_cv_define_APR_HAS_RANDOM = "no"; then
      @@ -73,7 +77,7 @@ APACHE_MODULE(auth_digest, RFC2617 Digest authentication, , , most, [
         fi
       ])
       
      -APACHE_MODULE(allowmethods, restrict allowed HTTP methods, , , yes)
      +APACHE_MODULE(allowmethods, restrict allowed HTTP methods, , , most)
       
       APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
       
      diff --git a/modules/aaa/mod_access_compat.c b/modules/aaa/mod_access_compat.c
      index 3d5d535f44c..30238033c99 100644
      --- a/modules/aaa/mod_access_compat.c
      +++ b/modules/aaa/mod_access_compat.c
      @@ -147,7 +147,6 @@ static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
           allowdeny *a;
           char *where = apr_pstrdup(cmd->pool, where_c);
           char *s;
      -    char msgbuf[120];
           apr_status_t rv;
       
           if (strcasecmp(from, "from"))
      @@ -178,17 +177,14 @@ static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
                   return "An IP address was expected";
               }
               else if (rv != APR_SUCCESS) {
      -            apr_strerror(rv, msgbuf, sizeof msgbuf);
      -            return apr_pstrdup(cmd->pool, msgbuf);
      +            return apr_psprintf(cmd->pool, "%pm", &rv);
               }
               a->type = T_IP;
           }
           else if (!APR_STATUS_IS_EINVAL(rv = apr_ipsubnet_create(&a->x.ip, where,
                                                                   NULL, cmd->pool))) {
      -        if (rv != APR_SUCCESS) {
      -            apr_strerror(rv, msgbuf, sizeof msgbuf);
      -            return apr_pstrdup(cmd->pool, msgbuf);
      -        }
      +        if (rv != APR_SUCCESS)
      +            return apr_psprintf(cmd->pool, "%pm", &rv);
               a->type = T_IP;
           }
           else { /* no slash, didn't look like an IP address => must be a host */
      @@ -271,7 +267,7 @@ static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method)
                   return 1;
       
               case T_IP:
      -            if (apr_ipsubnet_test(ap[i].x.ip, r->connection->remote_addr)) {
      +            if (apr_ipsubnet_test(ap[i].x.ip, r->useragent_addr)) {
                       return 1;
                   }
                   break;
      @@ -280,10 +276,8 @@ static int find_allowdeny(request_rec *r, apr_array_header_t *a, int method)
                   if (!gothost) {
                       int remotehost_is_ip;
       
      -                remotehost = ap_get_remote_host(r->connection,
      -                                                r->per_dir_config,
      -                                                REMOTE_DOUBLE_REV,
      -                                                &remotehost_is_ip);
      +                remotehost = ap_get_useragent_host(r, REMOTE_DOUBLE_REV,
      +                                                   &remotehost_is_ip);
       
                       if ((remotehost == NULL) || remotehost_is_ip) {
                           gothost = 1;
      @@ -350,7 +344,7 @@ static int check_dir_access(request_rec *r)
           }
       
           if (ret == HTTP_FORBIDDEN) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01797)
                             "client denied by server configuration: %s%s",
                             r->filename ? "" : "uri ",
                             r->filename ? r->filename : r->uri);
      diff --git a/modules/aaa/mod_access_compat.dep b/modules/aaa/mod_access_compat.dep
      new file mode 100644
      index 00000000000..e3f5e975bcc
      --- /dev/null
      +++ b/modules/aaa/mod_access_compat.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_access_compat.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_access_compat.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_access_compat.dsp b/modules/aaa/mod_access_compat.dsp
      index 9156fb15b06..c0cef15c5e5 100644
      --- a/modules/aaa/mod_access_compat.dsp
      +++ b/modules/aaa/mod_access_compat.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="auth_basic_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="auth_basic_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/aaa/mod_access_compat.mak b/modules/aaa/mod_access_compat.mak
      new file mode 100644
      index 00000000000..4d807046462
      --- /dev/null
      +++ b/modules/aaa/mod_access_compat.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_access_compat.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_access_compat - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_access_compat - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_access_compat - Win32 Release" && "$(CFG)" != "mod_access_compat - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_access_compat.mak" CFG="mod_access_compat - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_access_compat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_access_compat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_access_compat - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_access_compat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_access_compat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_access_compat.obj"
      +	-@erase "$(INTDIR)\mod_access_compat.res"
      +	-@erase "$(INTDIR)\mod_access_compat_src.idb"
      +	-@erase "$(INTDIR)\mod_access_compat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_access_compat.exp"
      +	-@erase "$(OUTDIR)\mod_access_compat.lib"
      +	-@erase "$(OUTDIR)\mod_access_compat.pdb"
      +	-@erase "$(OUTDIR)\mod_access_compat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_access_compat_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_access_compat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_access_compat.pdb" /debug /out:"$(OUTDIR)\mod_access_compat.so" /implib:"$(OUTDIR)\mod_access_compat.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_access_compat.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_access_compat.obj" \
      +	"$(INTDIR)\mod_access_compat.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_access_compat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_access_compat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_access_compat.so"
      +   if exist .\Release\mod_access_compat.so.manifest mt.exe -manifest .\Release\mod_access_compat.so.manifest -outputresource:.\Release\mod_access_compat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_access_compat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_access_compat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_access_compat.obj"
      +	-@erase "$(INTDIR)\mod_access_compat.res"
      +	-@erase "$(INTDIR)\mod_access_compat_src.idb"
      +	-@erase "$(INTDIR)\mod_access_compat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_access_compat.exp"
      +	-@erase "$(OUTDIR)\mod_access_compat.lib"
      +	-@erase "$(OUTDIR)\mod_access_compat.pdb"
      +	-@erase "$(OUTDIR)\mod_access_compat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_access_compat_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_access_compat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_access_compat.pdb" /debug /out:"$(OUTDIR)\mod_access_compat.so" /implib:"$(OUTDIR)\mod_access_compat.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_access_compat.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_access_compat.obj" \
      +	"$(INTDIR)\mod_access_compat.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_access_compat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_access_compat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_access_compat.so"
      +   if exist .\Debug\mod_access_compat.so.manifest mt.exe -manifest .\Debug\mod_access_compat.so.manifest -outputresource:.\Debug\mod_access_compat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_access_compat.dep")
      +!INCLUDE "mod_access_compat.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_access_compat.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_access_compat - Win32 Release" || "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_access_compat - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_access_compat - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_access_compat - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_access_compat - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_access_compat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_access_compat - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_access_compat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_access_compat.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_access_compat.so" /d LONG_NAME="access_compat_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_access_compat.c
      +
      +"$(INTDIR)\mod_access_compat.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_allowmethods.c b/modules/aaa/mod_allowmethods.c
      index e586a1c2bac..dd411969e00 100644
      --- a/modules/aaa/mod_allowmethods.c
      +++ b/modules/aaa/mod_allowmethods.c
      @@ -26,7 +26,7 @@
        * This module makes it easy to restrict what HTTP methods can be ran against
        * a server.
        *
      - * It provides one comand:
      + * It provides one command:
        *    AllowMethods
        * This command takes a list of HTTP methods to allow.
        *
      @@ -44,110 +44,115 @@
        */
       
       typedef struct am_conf_t {
      -  int allowed_set;
      -  apr_int64_t allowed;
      +    int allowed_set;
      +    apr_int64_t allowed;
       } am_conf_t;
       
       module AP_MODULE_DECLARE_DATA allowmethods_module;
       
       static int am_check_access(request_rec *r)
       {
      -  int method = r->method_number;
      -  am_conf_t *conf;
      +    int method = r->method_number;
      +    am_conf_t *conf;
       
      -  conf = (am_conf_t *) ap_get_module_config(r->per_dir_config,
      -                                            &allowmethods_module);
      -  if (!conf || conf->allowed == 0) {
      -    return DECLINED;
      -  }
      +    conf = (am_conf_t *) ap_get_module_config(r->per_dir_config,
      +                                              &allowmethods_module);
      +    if (!conf || conf->allowed == 0) {
      +        return DECLINED;
      +    }
       
      -  r->allowed = conf->allowed;
      +    r->allowed = conf->allowed;
       
      -  if (conf->allowed & (AP_METHOD_BIT << method)) {
      -    return DECLINED;
      -  }
      +    if (conf->allowed & (AP_METHOD_BIT << method)) {
      +        return DECLINED;
      +    }
       
      -  ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01623)
                         "client method denied by server configuration: '%s' to %s%s",
                         r->method,
                         r->filename ? "" : "uri ",
                         r->filename ? r->filename : r->uri);
       
      -  return HTTP_METHOD_NOT_ALLOWED;
      +    return HTTP_METHOD_NOT_ALLOWED;
       }
       
      -static void *am_create_conf(apr_pool_t * p, char *dummy)
      +static void *am_create_conf(apr_pool_t *p, char *dummy)
       {
      -  am_conf_t *conf = apr_pcalloc(p, sizeof(am_conf_t));
      +    am_conf_t *conf = apr_pcalloc(p, sizeof(am_conf_t));
       
      -  conf->allowed = 0;
      -  conf->allowed_set = 0;
      -  return conf;
      +    conf->allowed = 0;
      +    conf->allowed_set = 0;
      +    return conf;
       }
       
      -static void* am_merge_conf(apr_pool_t* pool, void* a, void* b) {
      -  am_conf_t* base = (am_conf_t*) a;
      -  am_conf_t* add = (am_conf_t*) b;
      -  am_conf_t* conf = apr_palloc(pool, sizeof(am_conf_t));
      +static void *am_merge_conf(apr_pool_t *pool, void *a, void *b)
      +{
      +    am_conf_t *base = (am_conf_t *)a;
      +    am_conf_t *add = (am_conf_t *)b;
      +    am_conf_t *conf = apr_palloc(pool, sizeof(am_conf_t));
       
      -  if (add->allowed_set) {
      -      conf->allowed = add->allowed;
      -      conf->allowed_set = add->allowed_set;
      -  } else {
      -      conf->allowed = base->allowed;
      -      conf->allowed_set = base->allowed_set;
      -  }
      +    if (add->allowed_set) {
      +        conf->allowed = add->allowed;
      +        conf->allowed_set = add->allowed_set;
      +    }
      +    else {
      +        conf->allowed = base->allowed;
      +        conf->allowed_set = base->allowed_set;
      +    }
       
      -  return conf;
      +    return conf;
       }
       
      -static const char *am_allowmethods(cmd_parms *cmd, void *d, int argc, char *const argv[])
      +static const char *am_allowmethods(cmd_parms *cmd, void *d, int argc,
      +                                   char *const argv[])
       {
      -  int i;
      -  am_conf_t* conf = (am_conf_t*) d;
      -  if (argc == 0) {
      -      return "AllowMethods: No method or 'reset' keyword given";
      -  }
      -  if (argc == 1) {
      -    if (strcasecmp("reset", argv[0]) == 0) {
      -      conf->allowed = 0;
      -      conf->allowed_set = 1;
      -      return NULL;
      -    }
      -  }
      +    int i;
      +    am_conf_t *conf = (am_conf_t *)d;
       
      -  for (i = 0; i < argc; i++) {
      -    int m = 0;
      -    m = ap_method_number_of(argv[i]);
      -    if (m == M_INVALID) {
      -      return apr_pstrcat(cmd->pool, "AllowMethods: Invalid Method '", argv[i], "'", NULL);
      +    if (argc == 0) {
      +        return "AllowMethods: No method or 'reset' keyword given";
           }
      +    if (argc == 1) {
      +        if (strcasecmp("reset", argv[0]) == 0) {
      +            conf->allowed = 0;
      +            conf->allowed_set = 1;
      +            return NULL;
      +        }
      +    }
      +
      +    for (i = 0; i < argc; i++) {
      +        int m;
      +
      +        m = ap_method_number_of(argv[i]);
      +        if (m == M_INVALID) {
      +            return apr_pstrcat(cmd->pool, "AllowMethods: Invalid Method '",
      +                               argv[i], "'", NULL);
      +        }
       
      -    conf->allowed |= (AP_METHOD_BIT << m);
      -  }
      -  conf->allowed_set = 1;
      -  return NULL;
      +        conf->allowed |= (AP_METHOD_BIT << m);
      +    }
      +    conf->allowed_set = 1;
      +    return NULL;
       }
       
       static void am_register_hooks(apr_pool_t * p)
       {
      -  ap_hook_access_checker(am_check_access, NULL, NULL, APR_HOOK_REALLY_FIRST);
      +    ap_hook_access_checker(am_check_access, NULL, NULL, APR_HOOK_REALLY_FIRST);
       }
       
       static const command_rec am_cmds[] = {
      -  AP_INIT_TAKE_ARGV("AllowMethods", am_allowmethods, NULL,
      -              ACCESS_CONF,
      -              "only allow specific methods"),
      -  {NULL}
      +    AP_INIT_TAKE_ARGV("AllowMethods", am_allowmethods, NULL,
      +                      ACCESS_CONF,
      +                      "only allow specific methods"),
      +    {NULL}
       };
       
       AP_DECLARE_MODULE(allowmethods) = {
      -  STANDARD20_MODULE_STUFF,
      -  am_create_conf,
      -  am_merge_conf,
      -  NULL,
      -  NULL,
      -  am_cmds,
      -  am_register_hooks,
      +    STANDARD20_MODULE_STUFF,
      +    am_create_conf,
      +    am_merge_conf,
      +    NULL,
      +    NULL,
      +    am_cmds,
      +    am_register_hooks,
       };
      -
      diff --git a/modules/aaa/mod_allowmethods.dep b/modules/aaa/mod_allowmethods.dep
      new file mode 100644
      index 00000000000..04db4458a20
      --- /dev/null
      +++ b/modules/aaa/mod_allowmethods.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_allowmethods.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_allowmethods.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_allowmethods.mak b/modules/aaa/mod_allowmethods.mak
      new file mode 100644
      index 00000000000..10495150587
      --- /dev/null
      +++ b/modules/aaa/mod_allowmethods.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_allowmethods.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_allowmethods - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_allowmethods - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_allowmethods - Win32 Release" && "$(CFG)" != "mod_allowmethods - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_allowmethods.mak" CFG="mod_allowmethods - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_allowmethods - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_allowmethods - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_allowmethods - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_allowmethods.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_allowmethods.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_allowmethods.obj"
      +	-@erase "$(INTDIR)\mod_allowmethods.res"
      +	-@erase "$(INTDIR)\mod_allowmethods_src.idb"
      +	-@erase "$(INTDIR)\mod_allowmethods_src.pdb"
      +	-@erase "$(OUTDIR)\mod_allowmethods.exp"
      +	-@erase "$(OUTDIR)\mod_allowmethods.lib"
      +	-@erase "$(OUTDIR)\mod_allowmethods.pdb"
      +	-@erase "$(OUTDIR)\mod_allowmethods.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_allowmethods_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_allowmethods.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_allowmethods.so" /d LONG_NAME="allowmethods_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_allowmethods.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_allowmethods.pdb" /debug /out:"$(OUTDIR)\mod_allowmethods.so" /implib:"$(OUTDIR)\mod_allowmethods.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_allowmethods.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_allowmethods.obj" \
      +	"$(INTDIR)\mod_allowmethods.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_allowmethods.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_allowmethods.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_allowmethods.so"
      +   if exist .\Release\mod_allowmethods.so.manifest mt.exe -manifest .\Release\mod_allowmethods.so.manifest -outputresource:.\Release\mod_allowmethods.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_allowmethods.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_allowmethods.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_allowmethods.obj"
      +	-@erase "$(INTDIR)\mod_allowmethods.res"
      +	-@erase "$(INTDIR)\mod_allowmethods_src.idb"
      +	-@erase "$(INTDIR)\mod_allowmethods_src.pdb"
      +	-@erase "$(OUTDIR)\mod_allowmethods.exp"
      +	-@erase "$(OUTDIR)\mod_allowmethods.lib"
      +	-@erase "$(OUTDIR)\mod_allowmethods.pdb"
      +	-@erase "$(OUTDIR)\mod_allowmethods.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_allowmethods_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_allowmethods.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_allowmethods.so" /d LONG_NAME="allowmethods_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_allowmethods.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_allowmethods.pdb" /debug /out:"$(OUTDIR)\mod_allowmethods.so" /implib:"$(OUTDIR)\mod_allowmethods.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_allowmethods.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_allowmethods.obj" \
      +	"$(INTDIR)\mod_allowmethods.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_allowmethods.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_allowmethods.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_allowmethods.so"
      +   if exist .\Debug\mod_allowmethods.so.manifest mt.exe -manifest .\Debug\mod_allowmethods.so.manifest -outputresource:.\Debug\mod_allowmethods.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_allowmethods.dep")
      +!INCLUDE "mod_allowmethods.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_allowmethods.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_allowmethods - Win32 Release" || "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_allowmethods - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_allowmethods - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_allowmethods - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_allowmethods - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_allowmethods.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_allowmethods.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_allowmethods.so" /d LONG_NAME="allowmethods_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_allowmethods - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_allowmethods.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_allowmethods.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_allowmethods.so" /d LONG_NAME="allowmethods_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_allowmethods.c
      +
      +"$(INTDIR)\mod_allowmethods.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c
      index ae7537847fa..62d7f0c678c 100644
      --- a/modules/aaa/mod_auth_basic.c
      +++ b/modules/aaa/mod_auth_basic.c
      @@ -15,7 +15,6 @@
        */
       
       #include "apr_strings.h"
      -#include "apr_md5.h"            /* for apr_password_validate */
       #include "apr_lib.h"            /* for apr_isspace */
       #include "apr_base64.h"         /* for apr_base64_decode et al */
       #define APR_WANT_STRFUNC        /* for strcasecmp */
      @@ -28,27 +27,63 @@
       #include "http_log.h"
       #include "http_protocol.h"
       #include "http_request.h"
      +#include "util_md5.h"
       #include "ap_provider.h"
      +#include "ap_expr.h"
       
       #include "mod_auth.h"
       
       typedef struct {
           authn_provider_list *providers;
      -    char *dir;
      +    char *dir; /* unused variable */
           int authoritative;
      +    ap_expr_info_t *fakeuser;
      +    ap_expr_info_t *fakepass;
      +    const char *use_digest_algorithm;
      +    int fake_set:1;
      +    int use_digest_algorithm_set:1;
      +    int authoritative_set:1;
       } auth_basic_config_rec;
       
       static void *create_auth_basic_dir_config(apr_pool_t *p, char *d)
       {
           auth_basic_config_rec *conf = apr_pcalloc(p, sizeof(*conf));
       
      -    conf->dir = d;
           /* Any failures are fatal. */
           conf->authoritative = 1;
       
           return conf;
       }
       
      +static void *merge_auth_basic_dir_config(apr_pool_t *p, void *basev, void *overridesv)
      +{
      +    auth_basic_config_rec *newconf = apr_pcalloc(p, sizeof(*newconf));
      +    auth_basic_config_rec *base = basev;
      +    auth_basic_config_rec *overrides = overridesv;
      +
      +    newconf->authoritative =
      +            overrides->authoritative_set ? overrides->authoritative :
      +                    base->authoritative;
      +    newconf->authoritative_set = overrides->authoritative_set
      +            || base->authoritative_set;
      +
      +    newconf->fakeuser =
      +            overrides->fake_set ? overrides->fakeuser : base->fakeuser;
      +    newconf->fakepass =
      +            overrides->fake_set ? overrides->fakepass : base->fakepass;
      +    newconf->fake_set = overrides->fake_set || base->fake_set;
      +
      +    newconf->use_digest_algorithm =
      +        overrides->use_digest_algorithm_set ? overrides->use_digest_algorithm
      +                                            : base->use_digest_algorithm;
      +    newconf->use_digest_algorithm_set =
      +        overrides->use_digest_algorithm_set || base->use_digest_algorithm_set;
      +
      +    newconf->providers = overrides->providers ? overrides->providers : base->providers;
      +
      +    return newconf;
      +}
      +
       static const char *add_authn_provider(cmd_parms *cmd, void *config,
                                             const char *arg)
       {
      @@ -94,15 +129,93 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config,
           return NULL;
       }
       
      +static const char *set_authoritative(cmd_parms * cmd, void *config, int flag)
      +{
      +    auth_basic_config_rec *conf = (auth_basic_config_rec *) config;
      +
      +    conf->authoritative = flag;
      +    conf->authoritative_set = 1;
      +
      +    return NULL;
      +}
      +
      +static const char *add_basic_fake(cmd_parms * cmd, void *config,
      +        const char *user, const char *pass)
      +{
      +    auth_basic_config_rec *conf = (auth_basic_config_rec *) config;
      +    const char *err;
      +
      +    if (!strcasecmp(user, "off")) {
      +
      +        conf->fakeuser = NULL;
      +        conf->fakepass = NULL;
      +        conf->fake_set = 1;
      +
      +    }
      +    else {
      +
      +        /* if password is unspecified, set it to the fixed string "password" to
      +         * be compatible with the behaviour of mod_ssl.
      +         */
      +        if (!pass) {
      +            pass = "password";
      +        }
      +
      +        conf->fakeuser =
      +                ap_expr_parse_cmd(cmd, user, AP_EXPR_FLAG_STRING_RESULT,
      +                        &err, NULL);
      +        if (err) {
      +            return apr_psprintf(cmd->pool,
      +                    "Could not parse fake username expression '%s': %s", user,
      +                    err);
      +        }
      +        conf->fakepass =
      +                ap_expr_parse_cmd(cmd, pass, AP_EXPR_FLAG_STRING_RESULT,
      +                        &err, NULL);
      +        if (err) {
      +            return apr_psprintf(cmd->pool,
      +                    "Could not parse fake password expression '%s': %s", user,
      +                    err);
      +        }
      +        conf->fake_set = 1;
      +
      +    }
      +
      +    return NULL;
      +}
      +
      +static const char *set_use_digest_algorithm(cmd_parms *cmd, void *config,
      +                                            const char *alg)
      +{
      +    auth_basic_config_rec *conf = (auth_basic_config_rec *)config;
      +
      +    if (strcasecmp(alg, "Off") && strcasecmp(alg, "MD5")) {
      +        return apr_pstrcat(cmd->pool,
      +                           "Invalid algorithm in "
      +                           "AuthBasicUseDigestAlgorithm: ", alg, NULL);
      +    }
      +
      +    conf->use_digest_algorithm = alg;
      +    conf->use_digest_algorithm_set = 1;
      +
      +    return NULL;
      +}
      +
       static const command_rec auth_basic_cmds[] =
       {
           AP_INIT_ITERATE("AuthBasicProvider", add_authn_provider, NULL, OR_AUTHCFG,
                           "specify the auth providers for a directory or location"),
      -    AP_INIT_FLAG("AuthBasicAuthoritative", ap_set_flag_slot,
      -                 (void *)APR_OFFSETOF(auth_basic_config_rec, authoritative),
      -                 OR_AUTHCFG,
      +    AP_INIT_FLAG("AuthBasicAuthoritative", set_authoritative, NULL, OR_AUTHCFG,
                        "Set to 'Off' to allow access control to be passed along to "
                        "lower modules if the UserID is not known to this module"),
      +    AP_INIT_TAKE12("AuthBasicFake", add_basic_fake, NULL, OR_AUTHCFG,
      +                  "Fake basic authentication using the given expressions for "
      +                  "username and password, 'off' to disable. Password defaults "
      +                  "to 'password' if missing."),
      +    AP_INIT_TAKE1("AuthBasicUseDigestAlgorithm", set_use_digest_algorithm,
      +                  NULL, OR_AUTHCFG,
      +                  "Set to 'MD5' to use the auth provider's authentication "
      +                  "check for digest auth, using a hash of 'user:realm:pass'"),
           {NULL}
       };
       
      @@ -141,7 +254,6 @@ static int get_basic_auth(request_rec *r, const char **user,
       {
           const char *auth_line;
           char *decoded_line;
      -    int length;
       
           /* Get the appropriate header */
           auth_line = apr_table_get(r->headers_in, (PROXYREQ_PROXY == r->proxyreq)
      @@ -155,7 +267,7 @@ static int get_basic_auth(request_rec *r, const char **user,
       
           if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
               /* Client tried to authenticate using wrong auth scheme */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01614)
                             "client used wrong authentication scheme: %s", r->uri);
               note_basic_auth_failure(r);
               return HTTP_UNAUTHORIZED;
      @@ -166,10 +278,7 @@ static int get_basic_auth(request_rec *r, const char **user,
               auth_line++;
           }
       
      -    decoded_line = apr_palloc(r->pool, apr_base64_decode_len(auth_line) + 1);
      -    length = apr_base64_decode(decoded_line, auth_line);
      -    /* Null-terminate the string. */
      -    decoded_line[length] = '\0';
      +    decoded_line = ap_pbase64decode(r->pool, auth_line);
       
           *user = ap_getword_nulls(r->pool, (const char**)&decoded_line, ':');
           *pw = decoded_line;
      @@ -188,6 +297,8 @@ static int authenticate_basic_user(request_rec *r)
           auth_basic_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                              &auth_basic_module);
           const char *sent_user, *sent_pw, *current_auth;
      +    const char *realm = NULL;
      +    const char *digest = NULL;
           int res;
           authn_status auth_result;
           authn_provider_list *current_provider;
      @@ -200,8 +311,8 @@ static int authenticate_basic_user(request_rec *r)
       
           /* We need an authentication realm. */
           if (!ap_auth_name(r)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                      0, r, "need AuthName: %s", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01615)
      +                      "need AuthName: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -212,6 +323,15 @@ static int authenticate_basic_user(request_rec *r)
               return res;
           }
       
      +    if (conf->use_digest_algorithm
      +        && !strcasecmp(conf->use_digest_algorithm, "MD5")) {
      +        realm = ap_auth_name(r);
      +        digest = ap_md5(r->pool,
      +                        (unsigned char *)apr_pstrcat(r->pool, sent_user, ":",
      +                                                     realm, ":",
      +                                                     sent_pw, NULL));
      +    }
      +
           current_provider = conf->providers;
           do {
               const authn_provider *provider;
      @@ -225,7 +345,7 @@ static int authenticate_basic_user(request_rec *r)
                                                 AUTHN_PROVIDER_VERSION);
       
                   if (!provider || !provider->check_password) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01616)
                                     "No Authn provider configured");
                       auth_result = AUTH_GENERAL_ERROR;
                       break;
      @@ -237,12 +357,31 @@ static int authenticate_basic_user(request_rec *r)
                   apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
               }
       
      +        if (digest) {
      +            char *password;
       
      -        auth_result = provider->check_password(r, sent_user, sent_pw);
      +            if (!provider->get_realm_hash) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02493)
      +                              "Authn provider does not support "
      +                              "AuthBasicUseDigestAlgorithm");
      +                auth_result = AUTH_GENERAL_ERROR;
      +                break;
      +            }
      +            /* We expect the password to be hash of user:realm:password */
      +            auth_result = provider->get_realm_hash(r, sent_user, realm,
      +                                                   &password);
      +            if (auth_result == AUTH_USER_FOUND) {
      +                auth_result = strcmp(digest, password) ? AUTH_DENIED
      +                                                       : AUTH_GRANTED;
      +            }
      +        }
      +        else {
      +            auth_result = provider->check_password(r, sent_user, sent_pw);
      +        }
       
               apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE);
       
      -        /* Something occured. Stop checking. */
      +        /* Something occurred. Stop checking. */
               if (auth_result != AUTH_USER_NOT_FOUND) {
                   break;
               }
      @@ -265,14 +404,14 @@ static int authenticate_basic_user(request_rec *r)
       
               switch (auth_result) {
               case AUTH_DENIED:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01617)
                             "user %s: authentication failure for \"%s\": "
                             "Password Mismatch",
                             sent_user, r->uri);
                   return_code = HTTP_UNAUTHORIZED;
                   break;
               case AUTH_USER_NOT_FOUND:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01618)
                             "user %s not found: %s", sent_user, r->uri);
                   return_code = HTTP_UNAUTHORIZED;
                   break;
      @@ -285,7 +424,7 @@ static int authenticate_basic_user(request_rec *r)
                   break;
               }
       
      -        /* If we're returning 403, tell them to try again. */
      +        /* If we're returning 401, tell them to try again. */
               if (return_code == HTTP_UNAUTHORIZED) {
                   note_basic_auth_failure(r);
               }
      @@ -295,10 +434,68 @@ static int authenticate_basic_user(request_rec *r)
           return OK;
       }
       
      +/* If requested, create a fake basic authentication header for the benefit
      + * of a proxy or application running behind this server.
      + */
      +static int authenticate_basic_fake(request_rec *r)
      +{
      +    const char *auth_line, *user, *pass, *err;
      +    auth_basic_config_rec *conf = ap_get_module_config(r->per_dir_config,
      +                                                       &auth_basic_module);
      +
      +    if (!conf->fakeuser) {
      +        return DECLINED;
      +    }
      +
      +    user = ap_expr_str_exec(r, conf->fakeuser, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02455)
      +                      "AuthBasicFake: could not evaluate user expression for URI '%s': %s", r->uri, err);
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +    if (!user || !*user) {
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02458)
      +                      "AuthBasicFake: empty username expression for URI '%s', ignoring", r->uri);
      +
      +        apr_table_unset(r->headers_in, "Authorization");
      +
      +        return DECLINED;
      +    }
      +
      +    pass = ap_expr_str_exec(r, conf->fakepass, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02456)
      +                      "AuthBasicFake: could not evaluate password expression for URI '%s': %s", r->uri, err);
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +    if (!pass || !*pass) {
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02459)
      +                      "AuthBasicFake: empty password expression for URI '%s', ignoring", r->uri);
      +
      +        apr_table_unset(r->headers_in, "Authorization");
      +
      +        return DECLINED;
      +    }
      +
      +    auth_line = apr_pstrcat(r->pool, "Basic ",
      +                            ap_pbase64encode(r->pool,
      +                                             apr_pstrcat(r->pool, user,
      +                                                         ":", pass, NULL)),
      +                            NULL);
      +    apr_table_setn(r->headers_in, "Authorization", auth_line);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02457)
      +                  "AuthBasicFake: \"Authorization: %s\"",
      +                  auth_line);
      +
      +    return OK;
      +}
      +
       static void register_hooks(apr_pool_t *p)
       {
           ap_hook_check_authn(authenticate_basic_user, NULL, NULL, APR_HOOK_MIDDLE,
                               AP_AUTH_INTERNAL_PER_CONF);
      +    ap_hook_fixups(authenticate_basic_fake, NULL, NULL, APR_HOOK_LAST);
           ap_hook_note_auth_failure(hook_note_basic_auth_failure, NULL, NULL,
                                     APR_HOOK_MIDDLE);
       }
      @@ -307,7 +504,7 @@ AP_DECLARE_MODULE(auth_basic) =
       {
           STANDARD20_MODULE_STUFF,
           create_auth_basic_dir_config,  /* dir config creater */
      -    NULL,                          /* dir merger --- default is to override */
      +    merge_auth_basic_dir_config,   /* dir merger --- default is to override */
           NULL,                          /* server config */
           NULL,                          /* merge server config */
           auth_basic_cmds,               /* command apr_table_t */
      diff --git a/modules/aaa/mod_auth_basic.dep b/modules/aaa/mod_auth_basic.dep
      new file mode 100644
      index 00000000000..6c1291c9695
      --- /dev/null
      +++ b/modules/aaa/mod_auth_basic.dep
      @@ -0,0 +1,63 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_auth_basic.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_auth_basic.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_auth_basic.mak b/modules/aaa/mod_auth_basic.mak
      new file mode 100644
      index 00000000000..ddd5198d27e
      --- /dev/null
      +++ b/modules/aaa/mod_auth_basic.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_auth_basic.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_auth_basic - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_auth_basic - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_auth_basic - Win32 Release" && "$(CFG)" != "mod_auth_basic - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_auth_basic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_auth_basic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_basic - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_basic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_auth_basic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_basic.obj"
      +	-@erase "$(INTDIR)\mod_auth_basic.res"
      +	-@erase "$(INTDIR)\mod_auth_basic_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_basic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_basic.exp"
      +	-@erase "$(OUTDIR)\mod_auth_basic.lib"
      +	-@erase "$(OUTDIR)\mod_auth_basic.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_basic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_basic_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_basic.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_auth_basic.so" /d LONG_NAME="auth_basic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_basic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_basic.pdb" /debug /out:"$(OUTDIR)\mod_auth_basic.so" /implib:"$(OUTDIR)\mod_auth_basic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_basic.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_basic.obj" \
      +	"$(INTDIR)\mod_auth_basic.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_basic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_auth_basic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_basic.so"
      +   if exist .\Release\mod_auth_basic.so.manifest mt.exe -manifest .\Release\mod_auth_basic.so.manifest -outputresource:.\Release\mod_auth_basic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_basic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_auth_basic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_basic.obj"
      +	-@erase "$(INTDIR)\mod_auth_basic.res"
      +	-@erase "$(INTDIR)\mod_auth_basic_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_basic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_basic.exp"
      +	-@erase "$(OUTDIR)\mod_auth_basic.lib"
      +	-@erase "$(OUTDIR)\mod_auth_basic.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_basic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_basic_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_basic.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_auth_basic.so" /d LONG_NAME="auth_basic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_basic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_basic.pdb" /debug /out:"$(OUTDIR)\mod_auth_basic.so" /implib:"$(OUTDIR)\mod_auth_basic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_basic.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_basic.obj" \
      +	"$(INTDIR)\mod_auth_basic.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_basic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_auth_basic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_basic.so"
      +   if exist .\Debug\mod_auth_basic.so.manifest mt.exe -manifest .\Debug\mod_auth_basic.so.manifest -outputresource:.\Debug\mod_auth_basic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_auth_basic.dep")
      +!INCLUDE "mod_auth_basic.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_auth_basic.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_auth_basic - Win32 Release" || "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_auth_basic - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_basic - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_basic - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_auth_basic - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_auth_basic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_basic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_auth_basic.so" /d LONG_NAME="auth_basic_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_basic - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_auth_basic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_basic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_auth_basic.so" /d LONG_NAME="auth_basic_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_auth_basic.c
      +
      +"$(INTDIR)\mod_auth_basic.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
      index ad338e8a39d..6a50ba7591a 100644
      --- a/modules/aaa/mod_auth_digest.c
      +++ b/modules/aaa/mod_auth_digest.c
      @@ -91,7 +91,7 @@ typedef struct digest_config_struct {
           const char  *dir_name;
           authn_provider_list *providers;
           const char  *realm;
      -    char **qop_list;
      +    apr_array_header_t *qop_list;
           apr_sha1_ctx_t  nonce_ctx;
           apr_time_t    nonce_lifetime;
           const char  *nonce_format;
      @@ -200,8 +200,8 @@ module AP_MODULE_DECLARE_DATA auth_digest_module;
       
       static apr_status_t cleanup_tables(void *not_used)
       {
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      -                  "Digest: cleaning up shared memory");
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(01756)
      +                  "cleaning up shared memory");
       
           if (client_rmm) {
               apr_rmm_destroy(client_rmm);
      @@ -223,6 +223,8 @@ static apr_status_t cleanup_tables(void *not_used)
               opaque_lock = NULL;
           }
       
      +    client_list = NULL;
      +
           return APR_SUCCESS;
       }
       
      @@ -230,8 +232,8 @@ static apr_status_t initialize_secret(server_rec *s)
       {
           apr_status_t status;
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      -                 "Digest: generating secret for digest authentication ...");
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01757)
      +                 "generating secret for digest authentication ...");
       
       #if APR_HAS_RANDOM
           status = apr_generate_random_bytes(secret, sizeof(secret));
      @@ -240,59 +242,68 @@ static apr_status_t initialize_secret(server_rec *s)
       #endif
       
           if (status != APR_SUCCESS) {
      -        char buf[120];
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, status, s,
      -                     "Digest: error generating secret: %s",
      -                     apr_strerror(status, buf, sizeof(buf)));
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, status, s, APLOGNO(01758)
      +                     "error generating secret");
               return status;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Digest: done");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01759) "done");
       
           return APR_SUCCESS;
       }
       
       static void log_error_and_cleanup(char *msg, apr_status_t sts, server_rec *s)
       {
      -    ap_log_error(APLOG_MARK, APLOG_ERR, sts, s,
      -                 "Digest: %s - all nonce-count checking, one-time nonces, and "
      +    ap_log_error(APLOG_MARK, APLOG_ERR, sts, s, APLOGNO(01760)
      +                 "%s - all nonce-count checking, one-time nonces, and "
                        "MD5-sess algorithm disabled", msg);
       
           cleanup_tables(NULL);
       }
       
      +/* RMM helper functions that behave like single-step malloc/free. */
      +
      +static void *rmm_malloc(apr_rmm_t *rmm, apr_size_t size)
      +{
      +    apr_rmm_off_t offset = apr_rmm_malloc(rmm, size);
      +
      +    if (!offset) {
      +        return NULL;
      +    }
      +
      +    return apr_rmm_addr_get(rmm, offset);
      +}
      +
      +static apr_status_t rmm_free(apr_rmm_t *rmm, void *alloc)
      +{
      +    apr_rmm_off_t offset = apr_rmm_offset_get(rmm, alloc);
      +
      +    return apr_rmm_free(rmm, offset);
      +}
      +
       #if APR_HAS_SHARED_MEMORY
       
       static int initialize_tables(server_rec *s, apr_pool_t *ctx)
       {
           unsigned long idx;
           apr_status_t   sts;
      -    const char *tempdir;
       
           /* set up client list */
       
      -    sts = apr_temp_dir_get(&tempdir, ctx);
      -    if (APR_SUCCESS != sts) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, sts, s,
      -                     "Failed to find temporary directory");
      -        log_error_and_cleanup("failed to find temp dir", sts, s);
      -        return HTTP_INTERNAL_SERVER_ERROR;
      -    }
      -
           /* Create the shared memory segment */
       
           /*
            * Create a unique filename using our pid. This information is
            * stashed in the global variable so the children inherit it.
            */
      -    client_shm_filename = apr_psprintf(ctx, "%s/authdigest_shm.%"APR_PID_T_FMT, tempdir,
      -                                       getpid());
      +    client_shm_filename = ap_runtime_dir_relative(ctx, "authdigest_shm");
      +    client_shm_filename = ap_append_pid(ctx, client_shm_filename, ".");
       
           /* Now create that segment */
           sts = apr_shm_create(&client_shm, shmem_size,
                               client_shm_filename, ctx);
           if (APR_SUCCESS != sts) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, sts, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, sts, s, APLOGNO(01762)
                            "Failed to create shared memory segment on file %s",
                            client_shm_filename);
               log_error_and_cleanup("failed to initialize shm", sts, s);
      @@ -308,8 +319,8 @@ static int initialize_tables(server_rec *s, apr_pool_t *ctx)
               return !OK;
           }
       
      -    client_list = apr_rmm_addr_get(client_rmm, apr_rmm_malloc(client_rmm, sizeof(*client_list) +
      -                                                          sizeof(client_entry*)*num_buckets));
      +    client_list = rmm_malloc(client_rmm, sizeof(*client_list) +
      +                                         sizeof(client_entry *) * num_buckets);
           if (!client_list) {
               log_error_and_cleanup("failed to allocate shared memory", -1, s);
               return !OK;
      @@ -331,7 +342,7 @@ static int initialize_tables(server_rec *s, apr_pool_t *ctx)
       
           /* setup opaque */
       
      -    opaque_cntr = apr_rmm_addr_get(client_rmm, apr_rmm_malloc(client_rmm, sizeof(*opaque_cntr)));
      +    opaque_cntr = rmm_malloc(client_rmm, sizeof(*opaque_cntr));
           if (opaque_cntr == NULL) {
               log_error_and_cleanup("failed to allocate shared memory", -1, s);
               return !OK;
      @@ -348,7 +359,7 @@ static int initialize_tables(server_rec *s, apr_pool_t *ctx)
       
           /* setup one-time-nonce counter */
       
      -    otn_counter = apr_rmm_addr_get(client_rmm, apr_rmm_malloc(client_rmm, sizeof(*otn_counter)));
      +    otn_counter = rmm_malloc(client_rmm, sizeof(*otn_counter));
           if (otn_counter == NULL) {
               log_error_and_cleanup("failed to allocate shared memory", -1, s);
               return !OK;
      @@ -460,8 +471,7 @@ static void *create_digest_dir_config(apr_pool_t *p, char *dir)
       
           conf = (digest_config_rec *) apr_pcalloc(p, sizeof(digest_config_rec));
           if (conf) {
      -        conf->qop_list       = apr_palloc(p, sizeof(char*));
      -        conf->qop_list[0]    = NULL;
      +        conf->qop_list       = apr_array_make(p, 2, sizeof(char *));
               conf->nonce_lifetime = DFLT_NONCE_LIFE;
               conf->dir_name       = apr_pstrdup(p, dir);
               conf->algorithm      = DFLT_ALGORITHM;
      @@ -541,15 +551,10 @@ static const char *add_authn_provider(cmd_parms *cmd, void *config,
       static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
       {
           digest_config_rec *conf = (digest_config_rec *) config;
      -    char **tmp;
      -    int cnt;
       
           if (!strcasecmp(op, "none")) {
      -        if (conf->qop_list[0] == NULL) {
      -            conf->qop_list = apr_palloc(cmd->pool, 2 * sizeof(char*));
      -            conf->qop_list[1] = NULL;
      -        }
      -        conf->qop_list[0] = "none";
      +        apr_array_clear(conf->qop_list);
      +        *(const char **)apr_array_push(conf->qop_list) = "none";
               return NULL;
           }
       
      @@ -560,14 +565,7 @@ static const char *set_qop(cmd_parms *cmd, void *config, const char *op)
               return apr_pstrcat(cmd->pool, "Unrecognized qop: ", op, NULL);
           }
       
      -    for (cnt = 0; conf->qop_list[cnt] != NULL; cnt++)
      -        ;
      -
      -    tmp = apr_palloc(cmd->pool, (cnt + 2) * sizeof(char*));
      -    memcpy(tmp, conf->qop_list, cnt*sizeof(char*));
      -    tmp[cnt]   = apr_pstrdup(cmd->pool, op);
      -    tmp[cnt+1] = NULL;
      -    conf->qop_list = tmp;
      +    *(const char **)apr_array_push(conf->qop_list) = op;
       
           return NULL;
       }
      @@ -671,8 +669,8 @@ static const char *set_shmem_size(cmd_parms *cmd, void *config,
           if (num_buckets == 0) {
               num_buckets = 1;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      -                 "Digest: Set shmem-size: %" APR_SIZE_T_FMT ", num-buckets: %ld",
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01763)
      +                 "Set shmem-size: %" APR_SIZE_T_FMT ", num-buckets: %ld",
                        shmem_size, num_buckets);
       
           return NULL;
      @@ -785,11 +783,11 @@ static client_entry *get_client(unsigned long key, const request_rec *r)
           apr_global_mutex_unlock(client_lock);
       
           if (entry) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01764)
                             "get_client(): client %lu found", key);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01765)
                             "get_client(): client %lu not found", key);
           }
       
      @@ -801,7 +799,7 @@ static client_entry *get_client(unsigned long key, const request_rec *r)
        * last entry in each bucket and updates the counters. Returns the
        * number of removed entries.
        */
      -static long gc(void)
      +static long gc(server_rec *s)
       {
           client_entry *entry, *prev;
           unsigned long num_removed = 0, idx;
      @@ -811,6 +809,12 @@ static long gc(void)
           for (idx = 0; idx < client_list->tbl_len; idx++) {
               entry = client_list->table[idx];
               prev  = NULL;
      +
      +        if (!entry) {
      +            /* This bucket is empty. */
      +            continue;
      +        }
      +
               while (entry->next) {   /* find last entry */
                   prev  = entry;
                   entry = entry->next;
      @@ -822,8 +826,16 @@ static long gc(void)
                   client_list->table[idx] = NULL;
               }
               if (entry) {                    /* remove entry */
      -            apr_rmm_free(client_rmm, apr_rmm_offset_get(client_rmm, entry));
      +            apr_status_t err;
      +
      +            err = rmm_free(client_rmm, entry);
                   num_removed++;
      +
      +            if (err) {
      +                /* Nothing we can really do but log... */
      +                ap_log_error(APLOG_MARK, APLOG_ERR, err, s, APLOGNO()
      +                             "Failed to free auth_digest client allocation");
      +            }
               }
           }
       
      @@ -857,18 +869,18 @@ static client_entry *add_client(unsigned long key, client_entry *info,
       
           /* try to allocate a new entry */
       
      -    entry = apr_rmm_addr_get(client_rmm, apr_rmm_malloc(client_rmm, sizeof(client_entry)));
      +    entry = rmm_malloc(client_rmm, sizeof(client_entry));
           if (!entry) {
      -        long num_removed = gc();
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "Digest: gc'd %ld client entries. Total new clients: "
      +        long num_removed = gc(s);
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01766)
      +                     "gc'd %ld client entries. Total new clients: "
                            "%ld; Total removed clients: %ld; Total renewed clients: "
                            "%ld", num_removed,
                            client_list->num_created - client_list->num_renewed,
                            client_list->num_removed, client_list->num_renewed);
      -        entry = apr_rmm_addr_get(client_rmm, apr_rmm_malloc(client_rmm, sizeof(client_entry)));
      +        entry = rmm_malloc(client_rmm, sizeof(client_entry));
               if (!entry) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01767)
                                "unable to allocate new auth_digest client");
                   apr_global_mutex_unlock(client_lock);
                   return NULL;       /* give up */
      @@ -886,7 +898,7 @@ static client_entry *add_client(unsigned long key, client_entry *info,
       
           apr_global_mutex_unlock(client_lock);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01768)
                        "allocated new client %lu", key);
       
           return entry;
      @@ -1065,10 +1077,8 @@ static void gen_nonce_hash(char *hash, const char *timestr, const char *opaque,
                                  const server_rec *server,
                                  const digest_config_rec *conf)
       {
      -    const char *hex = "0123456789abcdef";
           unsigned char sha1[APR_SHA1_DIGESTSIZE];
           apr_sha1_ctx_t ctx;
      -    int idx;
       
           memcpy(&ctx, &conf->nonce_ctx, sizeof(ctx));
           /*
      @@ -1084,12 +1094,7 @@ static void gen_nonce_hash(char *hash, const char *timestr, const char *opaque,
           }
           apr_sha1_final(sha1, &ctx);
       
      -    for (idx=0; idx<APR_SHA1_DIGESTSIZE; idx++) {
      -        *hash++ = hex[sha1[idx] >> 4];
      -        *hash++ = hex[sha1[idx] & 0xF];
      -    }
      -
      -    *hash++ = '\0';
      +    ap_bin2hex(sha1, APR_SHA1_DIGESTSIZE, hash);
       }
       
       
      @@ -1144,9 +1149,8 @@ static client_entry *gen_client(const request_rec *r)
           apr_global_mutex_unlock(opaque_lock);
       
           if (!(entry = add_client(op, &new_entry, r->server))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: failed to allocate client entry - ignoring "
      -                      "client");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01769)
      +                      "failed to allocate client entry - ignoring client");
               return NULL;
           }
       
      @@ -1261,19 +1265,17 @@ static void note_digest_auth_failure(request_rec *r,
           const char   *qop, *opaque, *opaque_param, *domain, *nonce;
       
           /* Setup qop */
      -    if (conf->qop_list[0] == NULL) {
      +    if (apr_is_empty_array(conf->qop_list)) {
               qop = ", qop=\"auth\"";
           }
      -    else if (!strcasecmp(conf->qop_list[0], "none")) {
      +    else if (!strcasecmp(*(const char **)(conf->qop_list->elts), "none")) {
               qop = "";
           }
           else {
      -        int cnt;
      -        qop = apr_pstrcat(r->pool, ", qop=\"", conf->qop_list[0], NULL);
      -        for (cnt = 1; conf->qop_list[cnt] != NULL; cnt++) {
      -            qop = apr_pstrcat(r->pool, qop, ",", conf->qop_list[cnt], NULL);
      -        }
      -        qop = apr_pstrcat(r->pool, qop, "\"", NULL);
      +        qop = apr_pstrcat(r->pool, ", qop=\"",
      +                                   apr_array_pstrcat(r->pool, conf->qop_list, ','),
      +                                   "\"",
      +                                   NULL);
           }
       
           /* Setup opaque */
      @@ -1417,7 +1419,7 @@ static authn_status get_hash(request_rec *r, const char *user,
                                                 AUTHN_PROVIDER_VERSION);
       
                   if (!provider || !provider->get_realm_hash) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01770)
                                     "No Authn provider configured");
                       auth_result = AUTH_GENERAL_ERROR;
                       break;
      @@ -1436,7 +1438,7 @@ static authn_status get_hash(request_rec *r, const char *user,
       
               apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE);
       
      -        /* Something occured.  Stop checking. */
      +        /* Something occurred.  Stop checking. */
               if (auth_result != AUTH_USER_NOT_FOUND) {
                   break;
               }
      @@ -1465,8 +1467,8 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp,
       
           if (conf->check_nc && !client_shm) {
               /* Shouldn't happen, but just in case... */
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                      "Digest: cannot check nonce count without shared memory");
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01771)
      +                      "cannot check nonce count without shared memory");
               return OK;
           }
       
      @@ -1474,13 +1476,12 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp,
               return OK;
           }
       
      -    if ((conf->qop_list != NULL)
      -        &&(conf->qop_list[0] != NULL)
      -        &&!strcasecmp(conf->qop_list[0], "none")) {
      +    if (!apr_is_empty_array(conf->qop_list) &&
      +        !strcasecmp(*(const char **)(conf->qop_list->elts), "none")) {
               /* qop is none, client must not send a nonce count */
               if (snc != NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: invalid nc %s received - no nonce count allowed when qop=none",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01772)
      +                          "invalid nc %s received - no nonce count allowed when qop=none",
                                 snc);
                   return !OK;
               }
      @@ -1490,8 +1491,8 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp,
       
           nc = strtol(snc, &endptr, 16);
           if (endptr < (snc+strlen(snc)) && !apr_isspace(*endptr)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: invalid nc %s received - not a number", snc);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01773)
      +                      "invalid nc %s received - not a number", snc);
               return !OK;
           }
       
      @@ -1500,8 +1501,8 @@ static int check_nc(const request_rec *r, const digest_header_rec *resp,
           }
       
           if (nc != resp->client->nonce_count) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: Warning, possible replay attack: nonce-count "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01774)
      +                      "Warning, possible replay attack: nonce-count "
                             "check failed: %lu != %lu", nc,
                             resp->client->nonce_count);
               return !OK;
      @@ -1518,8 +1519,8 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
           char tmp, hash[NONCE_HASH_LEN+1];
       
           if (strlen(resp->nonce) != NONCE_LEN) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: invalid nonce %s received - length is not %d",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01775)
      +                      "invalid nonce %s received - length is not %d",
                             resp->nonce, NONCE_LEN);
               note_digest_auth_failure(r, conf, resp, 1);
               return HTTP_UNAUTHORIZED;
      @@ -1533,8 +1534,8 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
           resp->nonce_time = nonce_time.time;
       
           if (strcmp(hash, resp->nonce+NONCE_TIME_LEN)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: invalid nonce %s received - hash is not %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01776)
      +                      "invalid nonce %s received - hash is not %s",
                             resp->nonce, hash);
               note_digest_auth_failure(r, conf, resp, 1);
               return HTTP_UNAUTHORIZED;
      @@ -1542,8 +1543,8 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
       
           dt = r->request_time - nonce_time.time;
           if (conf->nonce_lifetime > 0 && dt < 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: invalid nonce %s received - user attempted "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01777)
      +                      "invalid nonce %s received - user attempted "
                             "time travel", resp->nonce);
               note_digest_auth_failure(r, conf, resp, 1);
               return HTTP_UNAUTHORIZED;
      @@ -1551,8 +1552,8 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
       
           if (conf->nonce_lifetime > 0) {
               if (dt > conf->nonce_lifetime) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,r,
      -                          "Digest: user %s: nonce expired (%.2f seconds old "
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0,r, APLOGNO(01778)
      +                          "user %s: nonce expired (%.2f seconds old "
                                 "- max lifetime %.2f) - sending new nonce",
                                 r->user, (double)apr_time_sec(dt),
                                 (double)apr_time_sec(conf->nonce_lifetime));
      @@ -1562,8 +1563,8 @@ static int check_nonce(request_rec *r, digest_header_rec *resp,
           }
           else if (conf->nonce_lifetime == 0 && resp->client) {
               if (memcmp(resp->client->last_nonce, resp->nonce, NONCE_LEN)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                          "Digest: user %s: one-time-nonce mismatch - sending "
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01779)
      +                          "user %s: one-time-nonce mismatch - sending "
                                 "new nonce", r->user);
                   note_digest_auth_failure(r, conf, resp, 1);
                   return HTTP_UNAUTHORIZED;
      @@ -1698,8 +1699,8 @@ static int authenticate_digest_user(request_rec *r)
           }
       
           if (!ap_auth_name(r)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: need AuthName: %s", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01780)
      +                      "need AuthName: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -1728,13 +1729,13 @@ static int authenticate_digest_user(request_rec *r)
       
           if (resp->auth_hdr_sts != VALID) {
               if (resp->auth_hdr_sts == NOT_DIGEST) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: client used wrong authentication scheme "
      -                          "`%s': %s", resp->scheme, r->uri);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01781)
      +                          "client used wrong authentication scheme `%s': %s",
      +                          resp->scheme, r->uri);
               }
               else if (resp->auth_hdr_sts == INVALID) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: missing user, realm, nonce, uri, digest, "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01782)
      +                          "missing user, realm, nonce, uri, digest, "
                                 "cnonce, or nonce_count in authorization header: %s",
                                 r->uri);
               }
      @@ -1756,8 +1757,8 @@ static int authenticate_digest_user(request_rec *r)
       
               copy_uri_components(&r_uri, resp->psd_request_uri, r);
               if (apr_uri_parse(r->pool, resp->uri, &d_uri) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: invalid uri <%s> in Authorization header",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01783)
      +                          "invalid uri <%s> in Authorization header",
                                 resp->uri);
                   return HTTP_BAD_REQUEST;
               }
      @@ -1779,7 +1780,7 @@ static int authenticate_digest_user(request_rec *r)
                    * works out ok, since we can hash the header and get the same
                    * result.  however, the uri from the request line won't match
                    * the uri Authorization component since the header lacks the
      -             * query string, leaving us incompatable with a (broken) MSIE.
      +             * query string, leaving us incompatible with a (broken) MSIE.
                    *
                    * the workaround is to fake a query string match if in the proper
                    * environment - BrowserMatch MSIE, for example.  the cool thing
      @@ -1791,7 +1792,7 @@ static int authenticate_digest_user(request_rec *r)
                   if (apr_table_get(r->subprocess_env,
                                     "AuthDigestEnableQueryStringHack")) {
       
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Digest: "
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01784)
                                     "applying AuthDigestEnableQueryStringHack "
                                     "to uri <%s>", resp->raw_request_uri);
       
      @@ -1801,8 +1802,8 @@ static int authenticate_digest_user(request_rec *r)
       
               if (r->method_number == M_CONNECT) {
                   if (!r_uri.hostinfo || strcmp(resp->uri, r_uri.hostinfo)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Digest: uri mismatch - <%s> does not match "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01785)
      +                              "uri mismatch - <%s> does not match "
                                     "request-uri <%s>", resp->uri, r_uri.hostinfo);
                       return HTTP_BAD_REQUEST;
                   }
      @@ -1829,24 +1830,32 @@ static int authenticate_digest_user(request_rec *r)
                       && (!d_uri.query || !r_uri.query
                           || strcmp(d_uri.query, r_uri.query)))
                   ) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: uri mismatch - <%s> does not match "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01786)
      +                          "uri mismatch - <%s> does not match "
                                 "request-uri <%s>", resp->uri, resp->raw_request_uri);
                   return HTTP_BAD_REQUEST;
               }
           }
       
           if (resp->opaque && resp->opaque_num == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: received invalid opaque - got `%s'",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01787)
      +                      "received invalid opaque - got `%s'",
                             resp->opaque);
               note_digest_auth_failure(r, conf, resp, 0);
               return HTTP_UNAUTHORIZED;
           }
       
      -    if (strcmp(resp->realm, conf->realm)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: realm mismatch - got `%s' but expected `%s'",
      +    if (!conf->realm) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02533)
      +                      "realm mismatch - got `%s' but no realm specified",
      +                      resp->realm);
      +        note_digest_auth_failure(r, conf, resp, 0);
      +        return HTTP_UNAUTHORIZED;
      +    }
      +
      +    if (!resp->realm || strcmp(resp->realm, conf->realm)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01788)
      +                      "realm mismatch - got `%s' but expected `%s'",
                             resp->realm, conf->realm);
               note_digest_auth_failure(r, conf, resp, 0);
               return HTTP_UNAUTHORIZED;
      @@ -1855,8 +1864,8 @@ static int authenticate_digest_user(request_rec *r)
           if (resp->algorithm != NULL
               && strcasecmp(resp->algorithm, "MD5")
               && strcasecmp(resp->algorithm, "MD5-sess")) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: unknown algorithm `%s' received: %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01789)
      +                      "unknown algorithm `%s' received: %s",
                             resp->algorithm, r->uri);
               note_digest_auth_failure(r, conf, resp, 0);
               return HTTP_UNAUTHORIZED;
      @@ -1865,8 +1874,8 @@ static int authenticate_digest_user(request_rec *r)
           return_code = get_hash(r, r->user, conf);
       
           if (return_code == AUTH_USER_NOT_FOUND) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: user `%s' in realm `%s' not found: %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01790)
      +                      "user `%s' in realm `%s' not found: %s",
                             r->user, conf->realm, r->uri);
               note_digest_auth_failure(r, conf, resp, 0);
               return HTTP_UNAUTHORIZED;
      @@ -1876,8 +1885,8 @@ static int authenticate_digest_user(request_rec *r)
           }
           else if (return_code == AUTH_DENIED) {
               /* authentication denied in the provider before attempting a match */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "Digest: user `%s' in realm `%s' denied by provider: %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01791)
      +                      "user `%s' in realm `%s' denied by provider: %s",
                             r->user, conf->realm, r->uri);
               note_digest_auth_failure(r, conf, resp, 0);
               return HTTP_UNAUTHORIZED;
      @@ -1893,8 +1902,8 @@ static int authenticate_digest_user(request_rec *r)
           if (resp->message_qop == NULL) {
               /* old (rfc-2069) style digest */
               if (strcmp(resp->digest, old_digest(r, resp, conf->ha1))) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: user %s: password mismatch: %s", r->user,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01792)
      +                          "user %s: password mismatch: %s", r->user,
                                 r->uri);
                   note_digest_auth_failure(r, conf, resp, 0);
                   return HTTP_UNAUTHORIZED;
      @@ -1903,18 +1912,20 @@ static int authenticate_digest_user(request_rec *r)
           else {
               const char *exp_digest;
               int match = 0, idx;
      -        for (idx = 0; conf->qop_list[idx] != NULL; idx++) {
      -            if (!strcasecmp(conf->qop_list[idx], resp->message_qop)) {
      +        const char **tmp = (const char **)(conf->qop_list->elts);
      +        for (idx = 0; idx < conf->qop_list->nelts; idx++) {
      +            if (!strcasecmp(*tmp, resp->message_qop)) {
                       match = 1;
                       break;
                   }
      +            ++tmp;
               }
       
               if (!match
      -            && !(conf->qop_list[0] == NULL
      +            && !(apr_is_empty_array(conf->qop_list)
                        && !strcasecmp(resp->message_qop, "auth"))) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: invalid qop `%s' received: %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01793)
      +                          "invalid qop `%s' received: %s",
                                 resp->message_qop, r->uri);
                   note_digest_auth_failure(r, conf, resp, 0);
                   return HTTP_UNAUTHORIZED;
      @@ -1926,8 +1937,8 @@ static int authenticate_digest_user(request_rec *r)
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               if (strcmp(resp->digest, exp_digest)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Digest: user %s: password mismatch: %s", r->user,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01794)
      +                          "user %s: password mismatch: %s", r->user,
                                 r->uri);
                   note_digest_auth_failure(r, conf, resp, 0);
                   return HTTP_UNAUTHORIZED;
      @@ -1993,7 +2004,8 @@ static int add_auth_info(request_rec *r)
       
           /* do rfc-2069 digest
            */
      -    if (conf->qop_list[0] && !strcasecmp(conf->qop_list[0], "none")
      +    if (!apr_is_empty_array(conf->qop_list) &&
      +        !strcasecmp(*(const char **)(conf->qop_list->elts), "none")
               && resp->message_qop == NULL) {
               /* use only RFC-2069 format */
               ai = nextnonce;
      @@ -2006,8 +2018,8 @@ static int add_auth_info(request_rec *r)
               if (resp->algorithm && !strcasecmp(resp->algorithm, "MD5-sess")) {
                   ha1 = get_session_HA1(r, resp, conf, 0);
                   if (!ha1) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Digest: internal error: couldn't find session "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01795)
      +                              "internal error: couldn't find session "
                                     "info for user %s", resp->username);
                       return !OK;
                   }
      diff --git a/modules/aaa/mod_auth_digest.dep b/modules/aaa/mod_auth_digest.dep
      new file mode 100644
      index 00000000000..81451de13d7
      --- /dev/null
      +++ b/modules/aaa/mod_auth_digest.dep
      @@ -0,0 +1,68 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_auth_digest.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_auth_digest.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_rmm.h"\
      +	"..\..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_auth_digest.mak b/modules/aaa/mod_auth_digest.mak
      new file mode 100644
      index 00000000000..4b543756e05
      --- /dev/null
      +++ b/modules/aaa/mod_auth_digest.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_auth_digest.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_auth_digest - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_auth_digest - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_auth_digest - Win32 Release" && "$(CFG)" != "mod_auth_digest - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_auth_digest.mak" CFG="mod_auth_digest - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_auth_digest - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_auth_digest - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_digest - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_digest.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_auth_digest.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_digest.obj"
      +	-@erase "$(INTDIR)\mod_auth_digest.res"
      +	-@erase "$(INTDIR)\mod_auth_digest_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_digest_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_digest.exp"
      +	-@erase "$(OUTDIR)\mod_auth_digest.lib"
      +	-@erase "$(OUTDIR)\mod_auth_digest.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_digest.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_digest_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_digest.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_auth_digest.so" /d LONG_NAME="auth_digest_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_digest.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_digest.pdb" /debug /out:"$(OUTDIR)\mod_auth_digest.so" /implib:"$(OUTDIR)\mod_auth_digest.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_digest.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_digest.obj" \
      +	"$(INTDIR)\mod_auth_digest.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_digest.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_auth_digest.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_digest.so"
      +   if exist .\Release\mod_auth_digest.so.manifest mt.exe -manifest .\Release\mod_auth_digest.so.manifest -outputresource:.\Release\mod_auth_digest.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_digest.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_auth_digest.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_digest.obj"
      +	-@erase "$(INTDIR)\mod_auth_digest.res"
      +	-@erase "$(INTDIR)\mod_auth_digest_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_digest_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_digest.exp"
      +	-@erase "$(OUTDIR)\mod_auth_digest.lib"
      +	-@erase "$(OUTDIR)\mod_auth_digest.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_digest.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_digest_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_digest.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_auth_digest.so" /d LONG_NAME="auth_digest_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_digest.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_digest.pdb" /debug /out:"$(OUTDIR)\mod_auth_digest.so" /implib:"$(OUTDIR)\mod_auth_digest.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_digest.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_digest.obj" \
      +	"$(INTDIR)\mod_auth_digest.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_digest.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_auth_digest.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_digest.so"
      +   if exist .\Debug\mod_auth_digest.so.manifest mt.exe -manifest .\Debug\mod_auth_digest.so.manifest -outputresource:.\Debug\mod_auth_digest.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_auth_digest.dep")
      +!INCLUDE "mod_auth_digest.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_auth_digest.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_auth_digest - Win32 Release" || "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_auth_digest - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_digest - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_digest - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_auth_digest - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_auth_digest.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_digest.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_auth_digest.so" /d LONG_NAME="auth_digest_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_digest - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_auth_digest.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_digest.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_auth_digest.so" /d LONG_NAME="auth_digest_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_auth_digest.c
      +
      +"$(INTDIR)\mod_auth_digest.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_auth_form.c b/modules/aaa/mod_auth_form.c
      index 1a60e2a5a1b..5cf6fb0b380 100644
      --- a/modules/aaa/mod_auth_form.c
      +++ b/modules/aaa/mod_auth_form.c
      @@ -15,7 +15,6 @@
        */
       
       #include "apr_strings.h"
      -#include "apr_md5.h"                /* for apr_password_validate */
       #include "apr_lib.h"                /* for apr_isspace */
       #include "apr_base64.h"             /* for apr_base64_decode et al */
       #define APR_WANT_STRFUNC            /* for strcasecmp */
      @@ -30,22 +29,22 @@
       #include "http_request.h"
       #include "ap_provider.h"
       #include "util_md5.h"
      +#include "ap_expr.h"
       
       #include "mod_auth.h"
       #include "mod_session.h"
       #include "mod_request.h"
       
      -#define LOG_PREFIX "mod_auth_form: "
       #define FORM_LOGIN_HANDLER "form-login-handler"
       #define FORM_LOGOUT_HANDLER "form-logout-handler"
       #define FORM_REDIRECT_HANDLER "form-redirect-handler"
       #define MOD_AUTH_FORM_HASH "site"
       
       static int (*ap_session_load_fn) (request_rec * r, session_rec ** z) = NULL;
      -static void (*ap_session_get_fn) (request_rec * r, session_rec * z,
      -                                  const char *key, const char **value) = NULL;
      -static void (*ap_session_set_fn) (request_rec * r, session_rec * z,
      -                                  const char *key, const char *value) = NULL;
      +static apr_status_t (*ap_session_get_fn)(request_rec * r, session_rec * z,
      +        const char *key, const char **value) = NULL;
      +static apr_status_t (*ap_session_set_fn)(request_rec * r, session_rec * z,
      +        const char *key, const char *value) = NULL;
       static void (*ap_request_insert_filter_fn) (request_rec * r) = NULL;
       static void (*ap_request_remove_filter_fn) (request_rec * r) = NULL;
       
      @@ -74,11 +73,11 @@ typedef struct {
           int body_set;
           int disable_no_store;
           int disable_no_store_set;
      -    const char *loginsuccess;
      +    ap_expr_info_t *loginsuccess;
           int loginsuccess_set;
      -    const char *loginrequired;
      +    ap_expr_info_t *loginrequired;
           int loginrequired_set;
      -    const char *logout;
      +    ap_expr_info_t *logout;
           int logout_set;
       } auth_form_config_rec;
       
      @@ -150,7 +149,7 @@ static const char *add_authn_provider(cmd_parms * cmd, void *config,
           authn_provider_list *newp;
       
           newp = apr_pcalloc(cmd->pool, sizeof(authn_provider_list));
      -    newp->provider_name = apr_pstrdup(cmd->pool, arg);
      +    newp->provider_name = arg;
       
           /* lookup and cache the actual provider now */
           newp->provider = ap_lookup_provider(AUTHN_PROVIDER_GROUP,
      @@ -174,25 +173,6 @@ static const char *add_authn_provider(cmd_parms * cmd, void *config,
                                   "Form Authentication", newp->provider_name);
           }
       
      -    if (!ap_session_load_fn || !ap_session_get_fn || !ap_session_set_fn) {
      -        ap_session_load_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_load);
      -        ap_session_get_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_get);
      -        ap_session_set_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_set);
      -        if (!ap_session_load_fn || !ap_session_get_fn || !ap_session_set_fn) {
      -            return "You must load mod_session to enable the mod_auth_form "
      -                   "functions";
      -        }
      -    }
      -
      -    if (!ap_request_insert_filter_fn || !ap_request_remove_filter_fn) {
      -        ap_request_insert_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_insert_filter);
      -        ap_request_remove_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_remove_filter);
      -        if (!ap_request_insert_filter_fn || !ap_request_remove_filter_fn) {
      -            return "You must load mod_request to enable the mod_auth_form "
      -                   "functions";
      -        }
      -    }
      -
           /* Add it to the list now. */
           if (!conf->providers) {
               conf->providers = newp;
      @@ -290,24 +270,51 @@ static const char *set_cookie_form_size(cmd_parms * cmd, void *config,
       static const char *set_login_required_location(cmd_parms * cmd, void *config, const char *loginrequired)
       {
           auth_form_config_rec *conf = (auth_form_config_rec *) config;
      -    conf->loginrequired = loginrequired;
      +    const char *err;
      +
      +    conf->loginrequired = ap_expr_parse_cmd(cmd, loginrequired, AP_EXPR_FLAG_STRING_RESULT,
      +                                        &err, NULL);
      +    if (err) {
      +        return apr_psprintf(cmd->pool,
      +                            "Could not parse login required expression '%s': %s",
      +                            loginrequired, err);
      +    }
           conf->loginrequired_set = 1;
      +
           return NULL;
       }
       
       static const char *set_login_success_location(cmd_parms * cmd, void *config, const char *loginsuccess)
       {
           auth_form_config_rec *conf = (auth_form_config_rec *) config;
      -    conf->loginsuccess = loginsuccess;
      +    const char *err;
      +
      +    conf->loginsuccess = ap_expr_parse_cmd(cmd, loginsuccess, AP_EXPR_FLAG_STRING_RESULT,
      +                                        &err, NULL);
      +    if (err) {
      +        return apr_psprintf(cmd->pool,
      +                            "Could not parse login success expression '%s': %s",
      +                            loginsuccess, err);
      +    }
           conf->loginsuccess_set = 1;
      +
           return NULL;
       }
       
       static const char *set_logout_location(cmd_parms * cmd, void *config, const char *logout)
       {
           auth_form_config_rec *conf = (auth_form_config_rec *) config;
      -    conf->logout = logout;
      +    const char *err;
      +
      +    conf->logout = ap_expr_parse_cmd(cmd, logout, AP_EXPR_FLAG_STRING_RESULT,
      +                                        &err, NULL);
      +    if (err) {
      +        return apr_psprintf(cmd->pool,
      +                            "Could not parse logout required expression '%s': %s",
      +                            logout, err);
      +    }
           conf->logout_set = 1;
      +
           return NULL;
       }
       
      @@ -462,37 +469,43 @@ static void set_notes_auth(request_rec * r,
        * Get the auth username and password from the main request
        * notes table, if present.
        */
      -static void get_notes_auth(request_rec * r,
      +static void get_notes_auth(request_rec *r,
                                  const char **user, const char **pw,
                                  const char **method, const char **mimetype)
       {
           const char *authname;
      +    request_rec *m = r;
       
           /* find the main request */
      -    while (r->main) {
      -        r = r->main;
      +    while (m->main) {
      +        m = m->main;
           }
           /* find the first redirect */
      -    while (r->prev) {
      -        r = r->prev;
      +    while (m->prev) {
      +        m = m->prev;
           }
       
           /* have we isolated the user and pw before? */
      -    authname = ap_auth_name(r);
      +    authname = ap_auth_name(m);
           if (user) {
      -        *user = (char *) apr_table_get(r->notes, apr_pstrcat(r->pool, authname, "-user", NULL));
      +        *user = (char *) apr_table_get(m->notes, apr_pstrcat(m->pool, authname, "-user", NULL));
           }
           if (pw) {
      -        *pw = (char *) apr_table_get(r->notes, apr_pstrcat(r->pool, authname, "-pw", NULL));
      +        *pw = (char *) apr_table_get(m->notes, apr_pstrcat(m->pool, authname, "-pw", NULL));
           }
           if (method) {
      -        *method = (char *) apr_table_get(r->notes, apr_pstrcat(r->pool, authname, "-method", NULL));
      +        *method = (char *) apr_table_get(m->notes, apr_pstrcat(m->pool, authname, "-method", NULL));
           }
           if (mimetype) {
      -        *mimetype = (char *) apr_table_get(r->notes, apr_pstrcat(r->pool, authname, "-mimetype", NULL));
      +        *mimetype = (char *) apr_table_get(m->notes, apr_pstrcat(m->pool, authname, "-mimetype", NULL));
      +    }
      +
      +    /* set the user, even though the user is unauthenticated at this point */
      +    if (user && *user) {
      +        r->user = (char *) *user;
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_TRACE6, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
                         "from notes: user: %s, pw: %s, method: %s, mimetype: %s",
                         user ? *user : "<null>", pw ? *pw : "<null>",
                         method ? *method : "<null>", mimetype ? *mimetype : "<null>");
      @@ -535,6 +548,7 @@ static apr_status_t get_session_auth(request_rec * r,
       {
           const char *authname = ap_auth_name(r);
           session_rec *z = NULL;
      +
           ap_session_load_fn(r, &z);
       
           if (user) {
      @@ -552,7 +566,7 @@ static apr_status_t get_session_auth(request_rec * r,
               r->user = (char *) *user;
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
                         "from session: " MOD_SESSION_USER ": %s, " MOD_SESSION_PW
                         ": %s, " MOD_AUTH_FORM_HASH ": %s",
                         user ? *user : "<null>", pw ? *pw : "<null>",
      @@ -654,13 +668,33 @@ static int get_form_auth(request_rec * r,
               }
           }
       
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  "from form: user: %s, pw: %s, method: %s, mimetype: %s, location: %s",
      +                  sent_user ? *sent_user : "<null>", sent_pw ? *sent_pw : "<null>",
      +                  sent_method ? *sent_method : "<null>",
      +                  sent_mimetype ? *sent_mimetype : "<null>",
      +                  sent_loc ? *sent_loc : "<null>");
      +
           /* set the user, even though the user is unauthenticated at this point */
      -    if (*sent_user) {
      +    if (sent_user && *sent_user) {
               r->user = (char *) *sent_user;
           }
       
           /* a missing username or missing password means auth denied */
      -    if (!sent_user || !*sent_user || !sent_pw || !*sent_pw) {
      +    if (!sent_user || !*sent_user) {
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02982)
      +                      "form parsed, but username field '%s' was missing or empty, unauthorized",
      +                      username);
      +
      +        return HTTP_UNAUTHORIZED;
      +    }
      +    if (!sent_pw || !*sent_pw) {
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02983)
      +                      "form parsed, but password field '%s' was missing or empty, unauthorized",
      +                      password);
      +
               return HTTP_UNAUTHORIZED;
           }
       
      @@ -743,7 +777,7 @@ static int check_authn(request_rec * r, const char *sent_user, const char *sent_
                                                 AUTHN_PROVIDER_VERSION);
       
                   if (!provider || !provider->check_password) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01806)
                                     "no authn provider configured");
                       auth_result = AUTH_GENERAL_ERROR;
                       break;
      @@ -764,7 +798,7 @@ static int check_authn(request_rec * r, const char *sent_user, const char *sent_
       
               apr_table_unset(r->notes, AUTHN_PROVIDER_NAME_NOTE);
       
      -        /* Something occured. Stop checking. */
      +        /* Something occurred. Stop checking. */
               if (auth_result != AUTH_USER_NOT_FOUND) {
                   break;
               }
      @@ -787,14 +821,14 @@ static int check_authn(request_rec * r, const char *sent_user, const char *sent_
       
               switch (auth_result) {
               case AUTH_DENIED:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01807)
                                 "user '%s': authentication failure for \"%s\": "
                                 "password Mismatch",
                                 sent_user, r->uri);
                   return_code = HTTP_UNAUTHORIZED;
                   break;
               case AUTH_USER_NOT_FOUND:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01808)
                                 "user '%s' not found: %s", sent_user, r->uri);
                   return_code = HTTP_UNAUTHORIZED;
                   break;
      @@ -852,6 +886,7 @@ static int authenticate_form_authn(request_rec * r)
           const char *sent_user = NULL, *sent_pw = NULL, *sent_hash = NULL;
           const char *sent_loc = NULL, *sent_method = "GET", *sent_mimetype = NULL;
           const char *current_auth = NULL;
      +    const char *err;
           apr_status_t res;
           int rv = HTTP_UNAUTHORIZED;
       
      @@ -868,16 +903,16 @@ static int authenticate_form_authn(request_rec * r)
            * never be secure. Abort the auth attempt in this case.
            */
           if (PROXYREQ_PROXY == r->proxyreq) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                      0, r, LOG_PREFIX "form auth cannot be used for proxy "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01809)
      +                      "form auth cannot be used for proxy "
                             "requests due to XSS risk, access denied: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           /* We need an authentication realm. */
           if (!ap_auth_name(r)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                      0, r, LOG_PREFIX "need AuthName: %s", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01810)
      +                      "need AuthName: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -1002,8 +1037,17 @@ static int authenticate_form_authn(request_rec * r)
                           return HTTP_MOVED_TEMPORARILY;
                       }
                       if (conf->loginsuccess) {
      -                    apr_table_set(r->headers_out, "Location", conf->loginsuccess);
      -                    return HTTP_MOVED_TEMPORARILY;
      +                    const char *loginsuccess = ap_expr_str_exec(r,
      +                            conf->loginsuccess, &err);
      +                    if (!err) {
      +                        apr_table_set(r->headers_out, "Location", loginsuccess);
      +                        return HTTP_MOVED_TEMPORARILY;
      +                    }
      +                    else {
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02339)
      +                                      "Can't evaluate login success expression: %s", err);
      +                        return HTTP_INTERNAL_SERVER_ERROR;
      +                    }
                       }
                   }
               }
      @@ -1015,8 +1059,17 @@ static int authenticate_form_authn(request_rec * r)
            * instead?
            */
           if (HTTP_UNAUTHORIZED == rv && conf->loginrequired) {
      -        apr_table_set(r->headers_out, "Location", conf->loginrequired);
      -        return HTTP_MOVED_TEMPORARILY;
      +        const char *loginrequired = ap_expr_str_exec(r,
      +                conf->loginrequired, &err);
      +        if (!err) {
      +            apr_table_set(r->headers_out, "Location", loginrequired);
      +            return HTTP_MOVED_TEMPORARILY;
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02340)
      +                          "Can't evaluate login required expression: %s", err);
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
           }
       
           /* did the user ask to be redirected on login success? */
      @@ -1060,6 +1113,7 @@ static int authenticate_form_authn(request_rec * r)
       static int authenticate_form_login_handler(request_rec * r)
       {
           auth_form_config_rec *conf;
      +    const char *err;
       
           const char *sent_user = NULL, *sent_pw = NULL, *sent_loc = NULL;
           int rv;
      @@ -1069,7 +1123,7 @@ static int authenticate_form_login_handler(request_rec * r)
           }
       
           if (r->method_number != M_POST) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01811)
                 "the " FORM_LOGIN_HANDLER " only supports the POST method for %s",
                             r->uri);
               return HTTP_METHOD_NOT_ALLOWED;
      @@ -1090,8 +1144,17 @@ static int authenticate_form_login_handler(request_rec * r)
                       return HTTP_MOVED_TEMPORARILY;
                   }
                   if (conf->loginsuccess) {
      -                apr_table_set(r->headers_out, "Location", conf->loginsuccess);
      -                return HTTP_MOVED_TEMPORARILY;
      +                const char *loginsuccess = ap_expr_str_exec(r,
      +                        conf->loginsuccess, &err);
      +                if (!err) {
      +                    apr_table_set(r->headers_out, "Location", loginsuccess);
      +                    return HTTP_MOVED_TEMPORARILY;
      +                }
      +                else {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02341)
      +                                  "Can't evaluate login success expression: %s", err);
      +                    return HTTP_INTERNAL_SERVER_ERROR;
      +                }
                   }
                   return HTTP_OK;
               }
      @@ -1099,8 +1162,17 @@ static int authenticate_form_login_handler(request_rec * r)
       
           /* did we prefer to be redirected to the login page on failure instead? */
           if (HTTP_UNAUTHORIZED == rv && conf->loginrequired) {
      -        apr_table_set(r->headers_out, "Location", conf->loginrequired);
      -        return HTTP_MOVED_TEMPORARILY;
      +        const char *loginrequired = ap_expr_str_exec(r,
      +                conf->loginrequired, &err);
      +        if (!err) {
      +            apr_table_set(r->headers_out, "Location", loginrequired);
      +            return HTTP_MOVED_TEMPORARILY;
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02342)
      +                          "Can't evaluate login required expression: %s", err);
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
           }
       
           return rv;
      @@ -1121,6 +1193,7 @@ static int authenticate_form_login_handler(request_rec * r)
       static int authenticate_form_logout_handler(request_rec * r)
       {
           auth_form_config_rec *conf;
      +    const char *err;
       
           if (strcmp(r->handler, FORM_LOGOUT_HANDLER)) {
               return DECLINED;
      @@ -1140,8 +1213,17 @@ static int authenticate_form_logout_handler(request_rec * r)
       
           /* if set, internal redirect to the logout page */
           if (conf->logout) {
      -        apr_table_addn(r->headers_out, "Location", conf->logout);
      -        return HTTP_TEMPORARY_REDIRECT;
      +        const char *logout = ap_expr_str_exec(r,
      +                conf->logout, &err);
      +        if (!err) {
      +            apr_table_addn(r->headers_out, "Location", logout);
      +            return HTTP_TEMPORARY_REDIRECT;
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02343)
      +                          "Can't evaluate logout expression: %s", err);
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
           }
       
           return HTTP_OK;
      @@ -1171,7 +1253,7 @@ static int authenticate_form_redirect_handler(request_rec * r)
       
           if (r->kept_body && sent_method && sent_mimetype) {
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01812)
                 "internal redirect to method '%s' and body mimetype '%s' for the "
                             "uri: %s", sent_method, sent_mimetype, r->uri);
       
      @@ -1180,7 +1262,7 @@ static int authenticate_form_redirect_handler(request_rec * r)
       
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01813)
               "internal redirect requested but one or all of method, mimetype or "
                             "body are NULL: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1191,8 +1273,40 @@ static int authenticate_form_redirect_handler(request_rec * r)
       
       }
       
      +static int authenticate_form_post_config(apr_pool_t *pconf, apr_pool_t *plog,
      +        apr_pool_t *ptemp, server_rec *s)
      +{
      +
      +    if (!ap_session_load_fn || !ap_session_get_fn || !ap_session_set_fn) {
      +        ap_session_load_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_load);
      +        ap_session_get_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_get);
      +        ap_session_set_fn = APR_RETRIEVE_OPTIONAL_FN(ap_session_set);
      +        if (!ap_session_load_fn || !ap_session_get_fn || !ap_session_set_fn) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(02617)
      +                    "You must load mod_session to enable the mod_auth_form "
      +                                       "functions");
      +            return !OK;
      +        }
      +    }
      +
      +    if (!ap_request_insert_filter_fn || !ap_request_remove_filter_fn) {
      +        ap_request_insert_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_insert_filter);
      +        ap_request_remove_filter_fn = APR_RETRIEVE_OPTIONAL_FN(ap_request_remove_filter);
      +        if (!ap_request_insert_filter_fn || !ap_request_remove_filter_fn) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(02618)
      +                    "You must load mod_request to enable the mod_auth_form "
      +                                       "functions");
      +            return !OK;
      +        }
      +    }
      +
      +    return OK;
      +}
      +
       static void register_hooks(apr_pool_t * p)
       {
      +    ap_hook_post_config(authenticate_form_post_config,NULL,NULL,APR_HOOK_MIDDLE);
      +
       #if AP_MODULE_MAGIC_AT_LEAST(20080403,1)
           ap_hook_check_authn(authenticate_form_authn, NULL, NULL, APR_HOOK_MIDDLE,
                               AP_AUTH_INTERNAL_PER_CONF);
      diff --git a/modules/aaa/mod_auth_form.dep b/modules/aaa/mod_auth_form.dep
      new file mode 100644
      index 00000000000..190b2db911d
      --- /dev/null
      +++ b/modules/aaa/mod_auth_form.dep
      @@ -0,0 +1,66 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_auth_form.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_auth_form.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\mod_request.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\session\mod_session.h"\
      +	
      diff --git a/modules/aaa/mod_auth_form.mak b/modules/aaa/mod_auth_form.mak
      new file mode 100644
      index 00000000000..3c6c67a28f4
      --- /dev/null
      +++ b/modules/aaa/mod_auth_form.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_auth_form.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_auth_form - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_auth_form - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_auth_form - Win32 Release" && "$(CFG)" != "mod_auth_form - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_auth_form.mak" CFG="mod_auth_form - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_auth_form - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_auth_form - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_form - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_form.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_auth_form.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_form.obj"
      +	-@erase "$(INTDIR)\mod_auth_form.res"
      +	-@erase "$(INTDIR)\mod_auth_form_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_form_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_form.exp"
      +	-@erase "$(OUTDIR)\mod_auth_form.lib"
      +	-@erase "$(OUTDIR)\mod_auth_form.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_form.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../session" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_form_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_form.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_auth_form.so" /d LONG_NAME="auth_form_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_form.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_form.pdb" /debug /out:"$(OUTDIR)\mod_auth_form.so" /implib:"$(OUTDIR)\mod_auth_form.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_form.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_form.obj" \
      +	"$(INTDIR)\mod_auth_form.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_form.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_auth_form.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_form.so"
      +   if exist .\Release\mod_auth_form.so.manifest mt.exe -manifest .\Release\mod_auth_form.so.manifest -outputresource:.\Release\mod_auth_form.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_auth_form.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_auth_form.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_auth_form.obj"
      +	-@erase "$(INTDIR)\mod_auth_form.res"
      +	-@erase "$(INTDIR)\mod_auth_form_src.idb"
      +	-@erase "$(INTDIR)\mod_auth_form_src.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_form.exp"
      +	-@erase "$(OUTDIR)\mod_auth_form.lib"
      +	-@erase "$(OUTDIR)\mod_auth_form.pdb"
      +	-@erase "$(OUTDIR)\mod_auth_form.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../session" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AAA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_auth_form_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_auth_form.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_auth_form.so" /d LONG_NAME="auth_form_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_auth_form.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_auth_form.pdb" /debug /out:"$(OUTDIR)\mod_auth_form.so" /implib:"$(OUTDIR)\mod_auth_form.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_auth_form.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_auth_form.obj" \
      +	"$(INTDIR)\mod_auth_form.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_auth_form.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_auth_form.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_auth_form.so"
      +   if exist .\Debug\mod_auth_form.so.manifest mt.exe -manifest .\Debug\mod_auth_form.so.manifest -outputresource:.\Debug\mod_auth_form.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_auth_form.dep")
      +!INCLUDE "mod_auth_form.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_auth_form.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_auth_form - Win32 Release" || "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_auth_form - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_form - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_auth_form - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_auth_form - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_auth_form.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_form.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_auth_form.so" /d LONG_NAME="auth_form_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_auth_form - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_auth_form.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_auth_form.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_auth_form.so" /d LONG_NAME="auth_form_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_auth_form.c
      +
      +"$(INTDIR)\mod_auth_form.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_anon.c b/modules/aaa/mod_authn_anon.c
      index fc47619430b..82559bcc75e 100644
      --- a/modules/aaa/mod_authn_anon.c
      +++ b/modules/aaa/mod_authn_anon.c
      @@ -57,7 +57,7 @@
       #include "mod_auth.h"
       
       typedef struct anon_auth_user {
      -    char *user;
      +    const char *user;
           struct anon_auth_user *next;
       } anon_auth_user;
       
      @@ -103,7 +103,7 @@ static const char *anon_set_string_slots(cmd_parms *cmd,
               else {
                   first = conf->users;
                   conf->users = apr_palloc(cmd->pool, sizeof(*conf->users));
      -            conf->users->user = apr_pstrdup(cmd->pool, arg);
      +            conf->users->user = arg;
                   conf->users->next = first;
               }
           }
      @@ -179,7 +179,7 @@ static authn_status check_anonymous(request_rec *r, const char *user,
                   || (ap_strchr_c(sent_pw, '@') && ap_strchr_c(sent_pw, '.'))))
           {
               if (conf->logemail && ap_is_initial_req(r)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS, r, APLOGNO(01672)
                                 "Anonymous: Passwd <%s> Accepted",
                                 sent_pw ? sent_pw : "\'none\'");
               }
      diff --git a/modules/aaa/mod_authn_anon.dep b/modules/aaa/mod_authn_anon.dep
      new file mode 100644
      index 00000000000..30bb436e904
      --- /dev/null
      +++ b/modules/aaa/mod_authn_anon.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_anon.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_anon.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_anon.mak b/modules/aaa/mod_authn_anon.mak
      new file mode 100644
      index 00000000000..6ff9972842f
      --- /dev/null
      +++ b/modules/aaa/mod_authn_anon.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_anon.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_anon - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_anon - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_anon - Win32 Release" && "$(CFG)" != "mod_authn_anon - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_anon.mak" CFG="mod_authn_anon - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_anon - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_anon - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_anon.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_anon.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_anon.obj"
      +	-@erase "$(INTDIR)\mod_authn_anon.res"
      +	-@erase "$(INTDIR)\mod_authn_anon_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_anon_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_anon.exp"
      +	-@erase "$(OUTDIR)\mod_authn_anon.lib"
      +	-@erase "$(OUTDIR)\mod_authn_anon.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_anon.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_anon_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_anon.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_anon.so" /d LONG_NAME="authn_anon_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_anon.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_anon.pdb" /debug /out:"$(OUTDIR)\mod_authn_anon.so" /implib:"$(OUTDIR)\mod_authn_anon.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_anon.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_anon.obj" \
      +	"$(INTDIR)\mod_authn_anon.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_anon.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_anon.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_anon.so"
      +   if exist .\Release\mod_authn_anon.so.manifest mt.exe -manifest .\Release\mod_authn_anon.so.manifest -outputresource:.\Release\mod_authn_anon.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_anon.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_anon.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_anon.obj"
      +	-@erase "$(INTDIR)\mod_authn_anon.res"
      +	-@erase "$(INTDIR)\mod_authn_anon_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_anon_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_anon.exp"
      +	-@erase "$(OUTDIR)\mod_authn_anon.lib"
      +	-@erase "$(OUTDIR)\mod_authn_anon.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_anon.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_anon_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_anon.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_anon.so" /d LONG_NAME="authn_anon_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_anon.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_anon.pdb" /debug /out:"$(OUTDIR)\mod_authn_anon.so" /implib:"$(OUTDIR)\mod_authn_anon.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_anon.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_anon.obj" \
      +	"$(INTDIR)\mod_authn_anon.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_anon.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_anon.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_anon.so"
      +   if exist .\Debug\mod_authn_anon.so.manifest mt.exe -manifest .\Debug\mod_authn_anon.so.manifest -outputresource:.\Debug\mod_authn_anon.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_anon.dep")
      +!INCLUDE "mod_authn_anon.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_anon.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_anon - Win32 Release" || "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_anon - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_anon.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_anon.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_anon.so" /d LONG_NAME="authn_anon_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_anon - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_anon.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_anon.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_anon.so" /d LONG_NAME="authn_anon_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_anon.c
      +
      +"$(INTDIR)\mod_authn_anon.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_core.c b/modules/aaa/mod_authn_core.c
      index f8b41654eff..7af12655872 100644
      --- a/modules/aaa/mod_authn_core.c
      +++ b/modules/aaa/mod_authn_core.c
      @@ -108,7 +108,7 @@ static authn_status authn_alias_check_password(request_rec *r, const char *user,
                                                     const char *password)
       {
           /* Look up the provider alias in the alias list */
      -    /* Get the the dir_config and call ap_Merge_per_dir_configs() */
      +    /* Get the dir_config and call ap_Merge_per_dir_configs() */
           /* Call the real provider->check_password() function */
           /* return the result of the above function call */
       
      @@ -140,7 +140,7 @@ static authn_status authn_alias_get_realm_hash(request_rec *r, const char *user,
                                                      const char *realm, char **rethash)
       {
           /* Look up the provider alias in the alias list */
      -    /* Get the the dir_config and call ap_Merge_per_dir_configs() */
      +    /* Get the dir_config and call ap_Merge_per_dir_configs() */
           /* Call the real provider->get_realm_hash() function */
           /* return the result of the above function call */
       
      @@ -179,6 +179,12 @@ static void *create_authn_alias_svr_config(apr_pool_t *p, server_rec *s)
           return (void *) authcfg;
       }
       
      +/* Only per-server directive we have is GLOBAL_ONLY */
      +static void *merge_authn_alias_svr_config(apr_pool_t *p, void *basev, void *overridesv)
      +{
      +    return basev;
      +}
      +
       static const authn_provider authn_alias_provider =
       {
           &authn_alias_check_password,
      @@ -351,7 +357,7 @@ static int authenticate_no_user(request_rec *r)
           /* there's an AuthType configured, but no authentication module
            * loaded to support it
            */
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01796)
                         "AuthType %s configured without corresponding module",
                         ap_auth_type(r));
       
      @@ -373,7 +379,7 @@ AP_DECLARE_MODULE(authn_core) =
           create_authn_core_dir_config,   /* dir config creater */
           merge_authn_core_dir_config,    /* dir merger --- default is to override */
           create_authn_alias_svr_config,  /* server config */
      -    NULL,                           /* merge server config */
      +    merge_authn_alias_svr_config,   /* merge server config */
           authn_cmds,
           register_hooks                  /* register hooks */
       };
      diff --git a/modules/aaa/mod_authn_core.dep b/modules/aaa/mod_authn_core.dep
      new file mode 100644
      index 00000000000..18003b3ebf3
      --- /dev/null
      +++ b/modules/aaa/mod_authn_core.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_core.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_core.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_core.dsp b/modules/aaa/mod_authn_core.dsp
      index 787ffd24e17..506c96e007a 100644
      --- a/modules/aaa/mod_authn_core.dsp
      +++ b/modules/aaa/mod_authn_core.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authz_default_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authz_default_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/aaa/mod_authn_core.mak b/modules/aaa/mod_authn_core.mak
      new file mode 100644
      index 00000000000..ec88b2ddd2f
      --- /dev/null
      +++ b/modules/aaa/mod_authn_core.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_core.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_core - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_core - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_core - Win32 Release" && "$(CFG)" != "mod_authn_core - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_core.mak" CFG="mod_authn_core - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_core - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_core - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_core.obj"
      +	-@erase "$(INTDIR)\mod_authn_core.res"
      +	-@erase "$(INTDIR)\mod_authn_core_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_core_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_core.exp"
      +	-@erase "$(OUTDIR)\mod_authn_core.lib"
      +	-@erase "$(OUTDIR)\mod_authn_core.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_core.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_core_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_core.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_core.pdb" /debug /out:"$(OUTDIR)\mod_authn_core.so" /implib:"$(OUTDIR)\mod_authn_core.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_core.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_core.obj" \
      +	"$(INTDIR)\mod_authn_core.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_core.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_core.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_core.so"
      +   if exist .\Release\mod_authn_core.so.manifest mt.exe -manifest .\Release\mod_authn_core.so.manifest -outputresource:.\Release\mod_authn_core.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_core.obj"
      +	-@erase "$(INTDIR)\mod_authn_core.res"
      +	-@erase "$(INTDIR)\mod_authn_core_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_core_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_core.exp"
      +	-@erase "$(OUTDIR)\mod_authn_core.lib"
      +	-@erase "$(OUTDIR)\mod_authn_core.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_core.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_core_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_core.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_core.pdb" /debug /out:"$(OUTDIR)\mod_authn_core.so" /implib:"$(OUTDIR)\mod_authn_core.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_core.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_core.obj" \
      +	"$(INTDIR)\mod_authn_core.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_core.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_core.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_core.so"
      +   if exist .\Debug\mod_authn_core.so.manifest mt.exe -manifest .\Debug\mod_authn_core.so.manifest -outputresource:.\Debug\mod_authn_core.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_core.dep")
      +!INCLUDE "mod_authn_core.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_core.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_core - Win32 Release" || "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_core - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_core.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_core - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_core.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_core.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_core.so" /d LONG_NAME="authn_core_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_core.c
      +
      +"$(INTDIR)\mod_authn_core.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_dbd.c b/modules/aaa/mod_authn_dbd.c
      index 75db852700e..57090d27615 100644
      --- a/modules/aaa/mod_authn_dbd.c
      +++ b/modules/aaa/mod_authn_dbd.c
      @@ -33,10 +33,6 @@ typedef struct {
           const char *user;
           const char *realm;
       } authn_dbd_conf;
      -typedef struct {
      -    const char *label;
      -    const char *query;
      -} authn_dbd_rec;
       
       /* optional function - look it up once in post_config */
       static ap_dbd_t *(*authn_dbd_acquire_fn)(request_rec*) = NULL;
      @@ -51,6 +47,7 @@ static void *authn_dbd_cr_conf(apr_pool_t *pool, char *dummy)
           authn_dbd_conf *ret = apr_pcalloc(pool, sizeof(authn_dbd_conf));
           return ret;
       }
      +
       static void *authn_dbd_merge_conf(apr_pool_t *pool, void *BASE, void *ADD)
       {
           authn_dbd_conf *add = ADD;
      @@ -60,6 +57,7 @@ static void *authn_dbd_merge_conf(apr_pool_t *pool, void *BASE, void *ADD)
           ret->realm = (add->realm == NULL) ? base->realm : add->realm;
           return ret;
       }
      +
       static const char *authn_dbd_prepare(cmd_parms *cmd, void *cfg, const char *query)
       {
           static unsigned int label_num = 0;
      @@ -82,6 +80,7 @@ static const char *authn_dbd_prepare(cmd_parms *cmd, void *cfg, const char *quer
           /* save the label here for our own use */
           return ap_set_string_slot(cmd, cfg, label);
       }
      +
       static const command_rec authn_dbd_cmds[] =
       {
           AP_INIT_TAKE1("AuthDBDUserPWQuery", authn_dbd_prepare,
      @@ -92,6 +91,7 @@ static const command_rec authn_dbd_cmds[] =
                         "Query used to fetch password for user+realm"),
           {NULL}
       };
      +
       static authn_status authn_dbd_password(request_rec *r, const char *user,
                                              const char *password)
       {
      @@ -100,42 +100,44 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
           apr_dbd_prepared_t *statement;
           apr_dbd_results_t *res = NULL;
           apr_dbd_row_t *row = NULL;
      +    int ret;
       
           authn_dbd_conf *conf = ap_get_module_config(r->per_dir_config,
                                                       &authn_dbd_module);
           ap_dbd_t *dbd = authn_dbd_acquire_fn(r);
           if (dbd == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01653)
                             "Failed to acquire database connection to look up "
                             "user '%s'", user);
               return AUTH_GENERAL_ERROR;
           }
       
           if (conf->user == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01654)
                             "No AuthDBDUserPWQuery has been specified");
               return AUTH_GENERAL_ERROR;
           }
       
           statement = apr_hash_get(dbd->prepared, conf->user, APR_HASH_KEY_STRING);
           if (statement == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01655)
                             "A prepared statement could not be found for "
                             "AuthDBDUserPWQuery with the key '%s'", conf->user);
               return AUTH_GENERAL_ERROR;
           }
      -    if (apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res, statement,
      -                              0, user, NULL) != 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    if ((ret = apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res,
      +                                statement, 0, user, NULL)) != 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01656)
                             "Query execution error looking up '%s' "
      -                      "in database", user);
      +                      "in database [%s]",
      +                      user, apr_dbd_error(dbd->driver, dbd->handle, ret));
               return AUTH_GENERAL_ERROR;
           }
           for (rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1);
                rv != -1;
                rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
               if (rv != 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01657)
                                 "Error retrieving results while looking up '%s' "
                                 "in database", user);
                   return AUTH_GENERAL_ERROR;
      @@ -167,7 +169,8 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
                       i++;
                   }
       #endif
      -            dbd_password = apr_dbd_get_entry(dbd->driver, row, 0);
      +            dbd_password = apr_pstrdup(r->pool,
      +                                       apr_dbd_get_entry(dbd->driver, row, 0));
               }
               /* we can't break out here or row won't get cleaned up */
           }
      @@ -185,6 +188,7 @@ static authn_status authn_dbd_password(request_rec *r, const char *user,
       
           return AUTH_GRANTED;
       }
      +
       static authn_status authn_dbd_realm(request_rec *r, const char *user,
                                           const char *realm, char **rethash)
       {
      @@ -193,40 +197,43 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
           apr_dbd_prepared_t *statement;
           apr_dbd_results_t *res = NULL;
           apr_dbd_row_t *row = NULL;
      +    int ret;
       
           authn_dbd_conf *conf = ap_get_module_config(r->per_dir_config,
                                                       &authn_dbd_module);
           ap_dbd_t *dbd = authn_dbd_acquire_fn(r);
           if (dbd == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01658)
                             "Failed to acquire database connection to look up "
                             "user '%s:%s'", user, realm);
               return AUTH_GENERAL_ERROR;
           }
           if (conf->realm == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01659)
                             "No AuthDBDUserRealmQuery has been specified");
               return AUTH_GENERAL_ERROR;
           }
           statement = apr_hash_get(dbd->prepared, conf->realm, APR_HASH_KEY_STRING);
           if (statement == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01660)
                             "A prepared statement could not be found for "
                             "AuthDBDUserRealmQuery with the key '%s'", conf->realm);
               return AUTH_GENERAL_ERROR;
           }
      -    if (apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res, statement,
      -                              0, user, realm, NULL) != 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    if ((ret = apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res,
      +                                statement, 0, user, realm, NULL)) != 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01661)
                             "Query execution error looking up '%s:%s' "
      -                      "in database", user, realm);
      +                      "in database [%s]",
      +                      user, realm,
      +                      apr_dbd_error(dbd->driver, dbd->handle, ret));
               return AUTH_GENERAL_ERROR;
           }
           for (rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1);
                rv != -1;
                rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
               if (rv != 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01662)
                                 "Error retrieving results while looking up '%s:%s' "
                                 "in database", user, realm);
                   return AUTH_GENERAL_ERROR;
      @@ -258,7 +265,8 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
                       i++;
                   }
       #endif
      -            dbd_hash = apr_dbd_get_entry(dbd->driver, row, 0);
      +            dbd_hash = apr_pstrdup(r->pool,
      +                                   apr_dbd_get_entry(dbd->driver, row, 0));
               }
               /* we can't break out here or row won't get cleaned up */
           }
      @@ -270,10 +278,12 @@ static authn_status authn_dbd_realm(request_rec *r, const char *user,
           *rethash = apr_pstrdup(r->pool, dbd_hash);
           return AUTH_USER_FOUND;
       }
      +
       static void opt_retr(void)
       {
           authn_cache_store = APR_RETRIEVE_OPTIONAL_FN(ap_authn_cache_store);
       }
      +
       static void authn_dbd_hooks(apr_pool_t *p)
       {
           static const authn_provider authn_dbd_provider = {
      @@ -286,6 +296,7 @@ static void authn_dbd_hooks(apr_pool_t *p)
                                     &authn_dbd_provider, AP_AUTH_INTERNAL_PER_CONF);
           ap_hook_optional_fn_retrieve(opt_retr, NULL, NULL, APR_HOOK_MIDDLE);
       }
      +
       AP_DECLARE_MODULE(authn_dbd) =
       {
           STANDARD20_MODULE_STUFF,
      diff --git a/modules/aaa/mod_authn_dbd.dep b/modules/aaa/mod_authn_dbd.dep
      new file mode 100644
      index 00000000000..257ee49fd3c
      --- /dev/null
      +++ b/modules/aaa/mod_authn_dbd.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_dbd.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_dbd.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_dbd.mak b/modules/aaa/mod_authn_dbd.mak
      new file mode 100644
      index 00000000000..9c983dcdfb7
      --- /dev/null
      +++ b/modules/aaa/mod_authn_dbd.mak
      @@ -0,0 +1,409 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_dbd.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_dbd - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_dbd - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_dbd - Win32 Release" && "$(CFG)" != "mod_authn_dbd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_dbd.mak" CFG="mod_authn_dbd - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dbd - Win32 Release" "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" "mod_dbd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_dbd.obj"
      +	-@erase "$(INTDIR)\mod_authn_dbd.res"
      +	-@erase "$(INTDIR)\mod_authn_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "DBD_DECLARE_EXPORT" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_dbd_src" /FD /I ../database /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_dbd.so" /d LONG_NAME="authn_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_dbd.pdb" /debug /out:"$(OUTDIR)\mod_authn_dbd.so" /implib:"$(OUTDIR)\mod_authn_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_dbd.obj" \
      +	"$(INTDIR)\mod_authn_dbd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib" \
      +	"..\database\Release\mod_dbd.lib"
      +
      +"$(OUTDIR)\mod_authn_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_dbd.so"
      +   if exist .\Release\mod_authn_dbd.so.manifest mt.exe -manifest .\Release\mod_authn_dbd.so.manifest -outputresource:.\Release\mod_authn_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dbd - Win32 Debug" "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" "mod_dbd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_dbd.obj"
      +	-@erase "$(INTDIR)\mod_authn_dbd.res"
      +	-@erase "$(INTDIR)\mod_authn_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "DBD_DECLARE_EXPORT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_dbd_src" /FD /EHsc /I ../database /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_dbd.so" /d LONG_NAME="authn_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_dbd.pdb" /debug /out:"$(OUTDIR)\mod_authn_dbd.so" /implib:"$(OUTDIR)\mod_authn_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbd.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_dbd.obj" \
      +	"$(INTDIR)\mod_authn_dbd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib" \
      +	"..\database\Debug\mod_dbd.lib"
      +
      +"$(OUTDIR)\mod_authn_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_dbd.so"
      +   if exist .\Debug\mod_authn_dbd.so.manifest mt.exe -manifest .\Debug\mod_authn_dbd.so.manifest -outputresource:.\Debug\mod_authn_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_dbd.dep")
      +!INCLUDE "mod_authn_dbd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_dbd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_dbd - Win32 Release" || "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +"mod_dbd - Win32 Release" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" 
      +   cd "..\aaa"
      +
      +"mod_dbd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +"mod_dbd - Win32 Debug" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" 
      +   cd "..\aaa"
      +
      +"mod_dbd - Win32 DebugCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_dbd - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_dbd.so" /d LONG_NAME="authn_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbd - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_dbd.so" /d LONG_NAME="authn_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_dbd.c
      +
      +"$(INTDIR)\mod_authn_dbd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_dbm.c b/modules/aaa/mod_authn_dbm.c
      index f1e1dbecad8..f4fb73672ee 100644
      --- a/modules/aaa/mod_authn_dbm.c
      +++ b/modules/aaa/mod_authn_dbm.c
      @@ -59,23 +59,13 @@ static void *create_authn_dbm_dir_config(apr_pool_t *p, char *d)
           return conf;
       }
       
      -static const char *set_dbm_type(cmd_parms *cmd,
      -                                void *dir_config,
      -                                const char *arg)
      -{
      -    authn_dbm_config_rec *conf = dir_config;
      -
      -    conf->dbmtype = apr_pstrdup(cmd->pool, arg);
      -    return NULL;
      -}
      -
       static const command_rec authn_dbm_cmds[] =
       {
           AP_INIT_TAKE1("AuthDBMUserFile", ap_set_file_slot,
            (void *)APR_OFFSETOF(authn_dbm_config_rec, pwfile),
            OR_AUTHCFG, "dbm database file containing user IDs and passwords"),
      -    AP_INIT_TAKE1("AuthDBMType", set_dbm_type,
      -     NULL,
      +    AP_INIT_TAKE1("AuthDBMType", ap_set_string_slot,
      +     (void *)APR_OFFSETOF(authn_dbm_config_rec, dbmtype),
            OR_AUTHCFG, "what type of DBM file the user file is"),
           {NULL}
       };
      @@ -128,7 +118,7 @@ static authn_status check_dbm_pw(request_rec *r, const char *user,
                                r->pool);
       
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01754)
                             "could not open dbm (type %s) auth file: %s",
                             conf->dbmtype, conf->pwfile);
               return AUTH_GENERAL_ERROR;
      @@ -167,7 +157,7 @@ static authn_status get_dbm_realm_hash(request_rec *r, const char *user,
                                &dbm_hash, r->pool);
       
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01755)
                             "Could not open dbm (type %s) hash file: %s",
                             conf->dbmtype, conf->pwfile);
               return AUTH_GENERAL_ERROR;
      diff --git a/modules/aaa/mod_authn_dbm.dep b/modules/aaa/mod_authn_dbm.dep
      new file mode 100644
      index 00000000000..2239b12dbc6
      --- /dev/null
      +++ b/modules/aaa/mod_authn_dbm.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_dbm.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_dbm.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_dbm.mak b/modules/aaa/mod_authn_dbm.mak
      new file mode 100644
      index 00000000000..e15242a7919
      --- /dev/null
      +++ b/modules/aaa/mod_authn_dbm.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_dbm.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_dbm - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_dbm - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_dbm - Win32 Release" && "$(CFG)" != "mod_authn_dbm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_dbm.mak" CFG="mod_authn_dbm - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_dbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_dbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_dbm.obj"
      +	-@erase "$(INTDIR)\mod_authn_dbm.res"
      +	-@erase "$(INTDIR)\mod_authn_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_dbm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_dbm.so" /d LONG_NAME="authn_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_dbm.pdb" /debug /out:"$(OUTDIR)\mod_authn_dbm.so" /implib:"$(OUTDIR)\mod_authn_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbm.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_dbm.obj" \
      +	"$(INTDIR)\mod_authn_dbm.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_dbm.so"
      +   if exist .\Release\mod_authn_dbm.so.manifest mt.exe -manifest .\Release\mod_authn_dbm.so.manifest -outputresource:.\Release\mod_authn_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_dbm.obj"
      +	-@erase "$(INTDIR)\mod_authn_dbm.res"
      +	-@erase "$(INTDIR)\mod_authn_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_dbm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_dbm.so" /d LONG_NAME="authn_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_dbm.pdb" /debug /out:"$(OUTDIR)\mod_authn_dbm.so" /implib:"$(OUTDIR)\mod_authn_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_dbm.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_dbm.obj" \
      +	"$(INTDIR)\mod_authn_dbm.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_dbm.so"
      +   if exist .\Debug\mod_authn_dbm.so.manifest mt.exe -manifest .\Debug\mod_authn_dbm.so.manifest -outputresource:.\Debug\mod_authn_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_dbm.dep")
      +!INCLUDE "mod_authn_dbm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_dbm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_dbm - Win32 Release" || "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_dbm - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_dbm.so" /d LONG_NAME="authn_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_dbm - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_dbm.so" /d LONG_NAME="authn_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_dbm.c
      +
      +"$(INTDIR)\mod_authn_dbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_file.c b/modules/aaa/mod_authn_file.c
      index 90c5d263672..9909e44391f 100644
      --- a/modules/aaa/mod_authn_file.c
      +++ b/modules/aaa/mod_authn_file.c
      @@ -45,21 +45,11 @@ static void *create_authn_file_dir_config(apr_pool_t *p, char *d)
           return conf;
       }
       
      -static const char *set_authn_file_slot(cmd_parms *cmd, void *offset,
      -                                       const char *f, const char *t)
      -{
      -    if (t && strcmp(t, "standard")) {
      -        return apr_pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
      -    }
      -
      -    return ap_set_file_slot(cmd, offset, f);
      -}
      -
       static const command_rec authn_file_cmds[] =
       {
      -    AP_INIT_TAKE12("AuthUserFile", set_authn_file_slot,
      -                   (void *)APR_OFFSETOF(authn_file_config_rec, pwfile),
      -                   OR_AUTHCFG, "text file containing user IDs and passwords"),
      +    AP_INIT_TAKE1("AuthUserFile", ap_set_file_slot,
      +                  (void *)APR_OFFSETOF(authn_file_config_rec, pwfile),
      +                  OR_AUTHCFG, "text file containing user IDs and passwords"),
           {NULL}
       };
       
      @@ -76,7 +66,7 @@ static authn_status check_password(request_rec *r, const char *user,
           char *file_password = NULL;
       
           if (!conf->pwfile) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01619)
                             "AuthUserFile not specified in the configuration");
               return AUTH_GENERAL_ERROR;
           }
      @@ -84,7 +74,7 @@ static authn_status check_password(request_rec *r, const char *user,
           status = ap_pcfg_openfile(&f, r->pool, conf->pwfile);
       
           if (status != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01620)
                             "Could not open password file: %s", conf->pwfile);
               return AUTH_GENERAL_ERROR;
           }
      @@ -131,7 +121,7 @@ static authn_status get_realm_hash(request_rec *r, const char *user,
           char *file_hash = NULL;
       
           if (!conf->pwfile) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01621)
                             "AuthUserFile not specified in the configuration");
               return AUTH_GENERAL_ERROR;
           }
      @@ -139,7 +129,7 @@ static authn_status get_realm_hash(request_rec *r, const char *user,
           status = ap_pcfg_openfile(&f, r->pool, conf->pwfile);
       
           if (status != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01622)
                             "Could not open password file: %s", conf->pwfile);
               return AUTH_GENERAL_ERROR;
           }
      diff --git a/modules/aaa/mod_authn_file.dep b/modules/aaa/mod_authn_file.dep
      new file mode 100644
      index 00000000000..a841fa661fc
      --- /dev/null
      +++ b/modules/aaa/mod_authn_file.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_file.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_file.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_file.mak b/modules/aaa/mod_authn_file.mak
      new file mode 100644
      index 00000000000..3d98ce2081b
      --- /dev/null
      +++ b/modules/aaa/mod_authn_file.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_file.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_file - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_file - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_file - Win32 Release" && "$(CFG)" != "mod_authn_file - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_file.mak" CFG="mod_authn_file - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_file - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_file - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_file.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_file.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_file.obj"
      +	-@erase "$(INTDIR)\mod_authn_file.res"
      +	-@erase "$(INTDIR)\mod_authn_file_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_file_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_file.exp"
      +	-@erase "$(OUTDIR)\mod_authn_file.lib"
      +	-@erase "$(OUTDIR)\mod_authn_file.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_file.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_file_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_file.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_file.so" /d LONG_NAME="authn_file_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_file.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_file.pdb" /debug /out:"$(OUTDIR)\mod_authn_file.so" /implib:"$(OUTDIR)\mod_authn_file.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_file.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_file.obj" \
      +	"$(INTDIR)\mod_authn_file.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_file.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_file.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_file.so"
      +   if exist .\Release\mod_authn_file.so.manifest mt.exe -manifest .\Release\mod_authn_file.so.manifest -outputresource:.\Release\mod_authn_file.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_file.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_file.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_file.obj"
      +	-@erase "$(INTDIR)\mod_authn_file.res"
      +	-@erase "$(INTDIR)\mod_authn_file_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_file_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_file.exp"
      +	-@erase "$(OUTDIR)\mod_authn_file.lib"
      +	-@erase "$(OUTDIR)\mod_authn_file.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_file.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_file_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_file.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_file.so" /d LONG_NAME="authn_file_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_file.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_file.pdb" /debug /out:"$(OUTDIR)\mod_authn_file.so" /implib:"$(OUTDIR)\mod_authn_file.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_file.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_file.obj" \
      +	"$(INTDIR)\mod_authn_file.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authn_file.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_file.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_file.so"
      +   if exist .\Debug\mod_authn_file.so.manifest mt.exe -manifest .\Debug\mod_authn_file.so.manifest -outputresource:.\Debug\mod_authn_file.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_file.dep")
      +!INCLUDE "mod_authn_file.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_file.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_file - Win32 Release" || "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_file - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_file.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_file.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_file.so" /d LONG_NAME="authn_file_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_file - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_file.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_file.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_file.so" /d LONG_NAME="authn_file_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_file.c
      +
      +"$(INTDIR)\mod_authn_file.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authn_socache.c b/modules/aaa/mod_authn_socache.c
      index 317ce9f7bd3..550bc6619d2 100644
      --- a/modules/aaa/mod_authn_socache.c
      +++ b/modules/aaa/mod_authn_socache.c
      @@ -40,7 +40,7 @@ typedef struct authn_cache_dircfg {
           const char *context;
       } authn_cache_dircfg;
       
      -/* FIXME: figure out usage of socache create vs init
      +/* FIXME:
        * I think the cache and mutex should be global
        */
       static apr_global_mutex_t *authn_cache_mutex = NULL;
      @@ -57,6 +57,7 @@ static apr_status_t remove_lock(void *data)
           }
           return APR_SUCCESS;
       }
      +
       static apr_status_t destroy_cache(void *data)
       {
           if (socache_instance) {
      @@ -66,13 +67,12 @@ static apr_status_t destroy_cache(void *data)
           return APR_SUCCESS;
       }
       
      -
       static int authn_cache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp)
       {
           apr_status_t rv = ap_mutex_register(pconf, authn_cache_id,
                                               NULL, APR_LOCK_DEFAULT, 0);
           if (rv != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(01673)
                             "failed to register %s mutex", authn_cache_id);
               return 500; /* An HTTP status would be a misnomer! */
           }
      @@ -82,48 +82,59 @@ static int authn_cache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *p
           configured = 0;
           return OK;
       }
      +
       static int authn_cache_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                          apr_pool_t *ptmp, server_rec *s)
       {
           apr_status_t rv;
      -    const char *errmsg;
           static struct ap_socache_hints authn_cache_hints = {64, 32, 60000000};
      +    const char *errmsg;
       
           if (!configured) {
               return OK;    /* don't waste the overhead of creating mutex & cache */
           }
           if (socache_provider == NULL) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, plog,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, plog, APLOGNO(01674)
                             "Please select a socache provider with AuthnCacheSOCache "
      -                      "(no default found on this platform)");
      +                      "(no default found on this platform). Maybe you need to "
      +                      "load mod_socache_shmcb or another socache module first");
               return 500; /* An HTTP status would be a misnomer! */
           }
       
      +    /* We have socache_provider, but do not have socache_instance. This should
      +     * happen only when using "default" socache_provider, so create default
      +     * socache_instance in this case. */
      +    if (socache_instance == NULL) {
      +        errmsg = socache_provider->create(&socache_instance, NULL,
      +                                          ptmp, pconf);
      +        if (errmsg) {
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, plog, APLOGNO(02612)
      +                        "failed to create mod_socache_shmcb socache "
      +                        "instance: %s", errmsg);
      +            return 500;
      +        }
      +    }
      +
           rv = ap_global_mutex_create(&authn_cache_mutex, NULL,
                                       authn_cache_id, NULL, s, pconf, 0);
           if (rv != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(01675)
                             "failed to create %s mutex", authn_cache_id);
               return 500; /* An HTTP status would be a misnomer! */
           }
           apr_pool_cleanup_register(pconf, NULL, remove_lock, apr_pool_cleanup_null);
       
      -    errmsg = socache_provider->create(&socache_instance, NULL, ptmp, pconf);
      -    if (errmsg) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, "%s", errmsg);
      -        return 500; /* An HTTP status would be a misnomer! */
      -    }
      -
           rv = socache_provider->init(socache_instance, authn_cache_id,
                                       &authn_cache_hints, s, pconf);
           if (rv != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(01677)
                             "failed to initialise %s cache", authn_cache_id);
               return 500; /* An HTTP status would be a misnomer! */
           }
           apr_pool_cleanup_register(pconf, (void*)s, destroy_cache, apr_pool_cleanup_null);
           return OK;
       }
      +
       static void authn_cache_child_init(apr_pool_t *p, server_rec *s)
       {
           const char *lock;
      @@ -134,7 +145,7 @@ static void authn_cache_child_init(apr_pool_t *p, server_rec *s)
           lock = apr_global_mutex_lockfile(authn_cache_mutex);
           rv = apr_global_mutex_child_init(&authn_cache_mutex, lock, p);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01678)
                            "failed to initialise mutex in child_init");
           }
       }
      @@ -143,10 +154,36 @@ static const char *authn_cache_socache(cmd_parms *cmd, void *CFG,
                                              const char *arg)
       {
           const char *errmsg = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -    socache_provider = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP, arg,
      +    const char *sep, *name;
      +
      +    if (errmsg)
      +        return errmsg;
      +
      +    /* Argument is of form 'name:args' or just 'name'. */
      +    sep = ap_strchr_c(arg, ':');
      +    if (sep) {
      +        name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
      +        sep++;
      +    }
      +    else {
      +        name = arg;
      +    }
      +
      +    socache_provider = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP, name,
                                                 AP_SOCACHE_PROVIDER_VERSION);
           if (socache_provider == NULL) {
      -        errmsg = "Unknown socache provider";
      +        errmsg = apr_psprintf(cmd->pool,
      +                              "Unknown socache provider '%s'. Maybe you need "
      +                              "to load the appropriate socache module "
      +                              "(mod_socache_%s?)", arg, arg);
      +    }
      +    else {
      +        errmsg = socache_provider->create(&socache_instance, sep,
      +                                          cmd->temp_pool, cmd->pool);
      +    }
      +
      +    if (errmsg) {
      +        errmsg = apr_psprintf(cmd->pool, "AuthnCacheSOCache: %s", errmsg);
           }
           return errmsg;
       }
      @@ -167,6 +204,7 @@ static void* authn_cache_dircfg_create(apr_pool_t *pool, char *s)
           ret->context = directory;
           return ret;
       }
      +
       /* not sure we want this.  Might be safer to document use-all-or-none */
       static void* authn_cache_dircfg_merge(apr_pool_t *pool, void *BASE, void *ADD)
       {
      @@ -229,7 +267,7 @@ static const char *construct_key(request_rec *r, const char *context,
                                        const char *user, const char *realm)
       {
           /* handle "special" context values */
      -    if (!strcmp(context, "directory")) {
      +    if (!strcmp(context, directory)) {
               /* FIXME: are we at risk of this blowing up? */
               char *new_context;
               char *slash = strrchr(r->uri, '/');
      @@ -251,6 +289,7 @@ static const char *construct_key(request_rec *r, const char *context,
               return apr_pstrcat(r->pool, context, ":", user, ":", realm, NULL);
           }
       }
      +
       static void ap_authn_cache_store(request_rec *r, const char *module,
                                        const char *user, const char *realm,
                                        const char* data)
      @@ -259,21 +298,13 @@ static void ap_authn_cache_store(request_rec *r, const char *module,
           authn_cache_dircfg *dcfg;
           const char *key;
           apr_time_t expiry;
      -    int i;
      -    int use_cache = 0;
       
           /* first check whether we're cacheing for this module */
           dcfg = ap_get_module_config(r->per_dir_config, &authn_socache_module);
           if (!configured || !dcfg->providers) {
               return;
           }
      -    for (i = 0; i < dcfg->providers->nelts; ++i) {
      -        if (!strcmp(module, APR_ARRAY_IDX(dcfg->providers, i, const char*))) {
      -            use_cache = 1;
      -            break;
      -        }
      -    }
      -    if (!use_cache) {
      +    if (!ap_array_str_contains(dcfg->providers, module)) {
               return;
           }
       
      @@ -281,12 +312,12 @@ static void ap_authn_cache_store(request_rec *r, const char *module,
           rv = apr_global_mutex_trylock(authn_cache_mutex);
           if (APR_STATUS_IS_EBUSY(rv)) {
               /* don't wait around; just abandon it */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(01679)
                             "authn credentials for %s not cached (mutex busy)", user);
               return;
           }
           else if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01680)
                             "Failed to cache authn credentials for %s in %s",
                             module, dcfg->context);
               return;
      @@ -302,12 +333,12 @@ static void ap_authn_cache_store(request_rec *r, const char *module,
                                        (unsigned char*)key, strlen(key), expiry,
                                        (unsigned char*)data, strlen(data), r->pool);
           if (rv == APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01681)
                             "Cached authn credentials for %s in %s",
                             user, dcfg->context);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01682)
                             "Failed to cache authn credentials for %s in %s",
                             module, dcfg->context);
           }
      @@ -315,16 +346,14 @@ static void ap_authn_cache_store(request_rec *r, const char *module,
           /* We're done with the mutex */
           rv = apr_global_mutex_unlock(authn_cache_mutex);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "Failed to release mutex!");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01683) "Failed to release mutex!");
           }
      -    return;
       }
       
       #define MAX_VAL_LEN 100
       static authn_status check_password(request_rec *r, const char *user,
                                          const char *password)
       {
      -
           /* construct key
            * look it up
            * if found, test password
      @@ -351,20 +380,20 @@ static authn_status check_password(request_rec *r, const char *user,
       
           if (APR_STATUS_IS_NOTFOUND(rv)) {
               /* not found - just return */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01684)
                             "Authn cache: no credentials found for %s", user);
               return AUTH_USER_NOT_FOUND;
           }
           else if (rv == APR_SUCCESS) {
               /* OK, we got a value */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01685)
                             "Authn cache: found credentials for %s", user);
               val[vallen] = 0;
           }
           else {
               /* error: give up and pass the buck */
               /* FIXME: getting this for NOTFOUND - prolly a bug in mod_socache */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01686)
                             "Error accessing authentication cache");
               return AUTH_USER_NOT_FOUND;
           }
      @@ -396,19 +425,19 @@ static authn_status get_realm_hash(request_rec *r, const char *user,
       
           if (APR_STATUS_IS_NOTFOUND(rv)) {
               /* not found - just return */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01687)
                             "Authn cache: no credentials found for %s", user);
               return AUTH_USER_NOT_FOUND;
           }
           else if (rv == APR_SUCCESS) {
               /* OK, we got a value */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01688)
                             "Authn cache: found credentials for %s", user);
           }
           else {
               /* error: give up and pass the buck */
               /* FIXME: getting this for NOTFOUND - prolly a bug in mod_socache */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01689)
                             "Error accessing authentication cache");
               return AUTH_USER_NOT_FOUND;
           }
      @@ -422,6 +451,7 @@ static const authn_provider authn_cache_provider =
           &check_password,
           &get_realm_hash,
       };
      +
       static void register_hooks(apr_pool_t *p)
       {
           ap_register_auth_provider(p, AUTHN_PROVIDER_GROUP, "socache",
      diff --git a/modules/aaa/mod_authn_socache.dep b/modules/aaa/mod_authn_socache.dep
      new file mode 100644
      index 00000000000..c8b3d286d1b
      --- /dev/null
      +++ b/modules/aaa/mod_authn_socache.dep
      @@ -0,0 +1,62 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authn_socache.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authn_socache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authn_socache.dsp b/modules/aaa/mod_authn_socache.dsp
      index be5e976013d..c0cad1cbbd1 100644
      --- a/modules/aaa/mod_authn_socache.dsp
      +++ b/modules/aaa/mod_authn_socache.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_file_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_file_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/aaa/mod_authn_socache.mak b/modules/aaa/mod_authn_socache.mak
      new file mode 100644
      index 00000000000..7d434731706
      --- /dev/null
      +++ b/modules/aaa/mod_authn_socache.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authn_socache.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authn_socache - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authn_socache - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authn_socache - Win32 Release" && "$(CFG)" != "mod_authn_socache - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authn_socache.mak" CFG="mod_authn_socache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authn_socache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authn_socache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_socache - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authn_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_socache.obj"
      +	-@erase "$(INTDIR)\mod_authn_socache.res"
      +	-@erase "$(INTDIR)\mod_authn_socache_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_socache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_socache.exp"
      +	-@erase "$(OUTDIR)\mod_authn_socache.lib"
      +	-@erase "$(OUTDIR)\mod_authn_socache.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_socache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_socache_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_socache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_socache.pdb" /debug /out:"$(OUTDIR)\mod_authn_socache.so" /implib:"$(OUTDIR)\mod_authn_socache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_socache.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_socache.obj" \
      +	"$(INTDIR)\mod_authn_socache.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_authn_socache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authn_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_socache.so"
      +   if exist .\Release\mod_authn_socache.so.manifest mt.exe -manifest .\Release\mod_authn_socache.so.manifest -outputresource:.\Release\mod_authn_socache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authn_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authn_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authn_socache.obj"
      +	-@erase "$(INTDIR)\mod_authn_socache.res"
      +	-@erase "$(INTDIR)\mod_authn_socache_src.idb"
      +	-@erase "$(INTDIR)\mod_authn_socache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_socache.exp"
      +	-@erase "$(OUTDIR)\mod_authn_socache.lib"
      +	-@erase "$(OUTDIR)\mod_authn_socache.pdb"
      +	-@erase "$(OUTDIR)\mod_authn_socache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authn_socache_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authn_socache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authn_socache.pdb" /debug /out:"$(OUTDIR)\mod_authn_socache.so" /implib:"$(OUTDIR)\mod_authn_socache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authn_socache.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authn_socache.obj" \
      +	"$(INTDIR)\mod_authn_socache.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_authn_socache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authn_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authn_socache.so"
      +   if exist .\Debug\mod_authn_socache.so.manifest mt.exe -manifest .\Debug\mod_authn_socache.so.manifest -outputresource:.\Debug\mod_authn_socache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authn_socache.dep")
      +!INCLUDE "mod_authn_socache.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authn_socache.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authn_socache - Win32 Release" || "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authn_socache - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_socache - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authn_socache - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authn_socache - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authn_socache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authn_socache - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authn_socache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authn_socache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authn_socache.so" /d LONG_NAME="authn_socache_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authn_socache.c
      +
      +"$(INTDIR)\mod_authn_socache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authnz_fcgi.c b/modules/aaa/mod_authnz_fcgi.c
      new file mode 100644
      index 00000000000..d99f3918fa3
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_fcgi.c
      @@ -0,0 +1,1363 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "apr_hash.h"
      +#include "apr_lib.h"
      +#include "apr_strings.h"
      +
      +#include "ap_provider.h"
      +#include "httpd.h"
      +#include "http_config.h"
      +#include "http_core.h"
      +#include "http_protocol.h"
      +#include "http_request.h"
      +#include "http_log.h"
      +#include "util_script.h"
      +#include "ap_provider.h"
      +#include "mod_auth.h"
      +#include "util_fcgi.h"
      +#include "ap_mmn.h"
      +
      +module AP_MODULE_DECLARE_DATA authnz_fcgi_module;
      +
      +typedef struct {
      +    const char *name; /* provider name */
      +    const char *backend; /* backend address, as configured */
      +    const char *host;
      +    apr_port_t port;
      +    apr_sockaddr_t *backend_addrs;
      +    int is_authn;
      +    int is_authz;
      +} fcgi_provider_conf;
      +
      +typedef struct {
      +    const char *name; /* provider name */
      +    const char *default_user; /* this is user if authorizer returns
      +                               * success and a user expression yields
      +                               * empty string
      +                               */
      +    ap_expr_info_t *user_expr; /* expr to evaluate to set r->user */
      +    char authoritative; /* fail request if user is rejected? */
      +    char require_basic_auth; /* fail if client didn't send credentials? */
      +} fcgi_dir_conf;
      +
      +typedef struct {
      +    /* If an "authnz" provider successfully authenticates, record
      +     * the provider name here for checking during authz.
      +     */
      +    const char *successful_authnz_provider;
      +} fcgi_request_notes;
      +
      +static apr_hash_t *fcgi_authn_providers, *fcgi_authz_providers;
      +
      +#define FCGI_IO_TIMEOUT apr_time_from_sec(30)
      +
      +#ifndef NON200_RESPONSE_BUF_LEN
      +#define NON200_RESPONSE_BUF_LEN 8192
      +#endif
      +
      +/* fcgi://{hostname|IPv4|IPv6}:port[/] */
      +#define FCGI_BACKEND_REGEX_STR "m%^fcgi://(.*):(\\d{1,5})/?$%"
      +
      +/*
      + * utility function to connect to a peer; generally useful, but 
      + * wait for AF_UNIX support in this mod before thinking about how
      + * to make it available to other modules
      + */
      +static apr_status_t connect_to_peer(apr_socket_t **newsock,
      +                                    request_rec *r,
      +                                    apr_sockaddr_t *backend_addrs,
      +                                    const char *backend_name,
      +                                    apr_interval_time_t timeout)
      +{
      +    apr_status_t rv = APR_EINVAL; /* returned if no backend addr was provided
      +                                   */
      +    int connected = 0;
      +    apr_sockaddr_t *addr = backend_addrs;
      +
      +    while (addr && !connected) {
      +        int loglevel = addr->next ? APLOG_DEBUG : APLOG_ERR;
      +        rv = apr_socket_create(newsock, addr->family,
      +                               SOCK_STREAM, 0, r->pool);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, loglevel, rv, r,
      +                          APLOGNO(02494) "error creating family %d socket "
      +                          "for target %s",
      +                          addr->family, backend_name);
      +            addr = addr->next;
      +            continue;
      +        }
      +
      +        apr_socket_opt_set(*newsock, APR_TCP_NODELAY, 1);
      +        apr_socket_timeout_set(*newsock,
      +                               timeout ? timeout : r->server->timeout);
      +
      +        rv = apr_socket_connect(*newsock, addr);
      +        if (rv != APR_SUCCESS) {
      +            apr_socket_close(*newsock);
      +            ap_log_rerror(APLOG_MARK, loglevel, rv, r,
      +                          APLOGNO(02495) "attempt to connect to %pI (%s) "
      +                          "failed", addr, backend_name);
      +            addr = addr->next;
      +            continue;
      +        }
      +
      +        connected = 1;
      +    }
      +
      +    return rv;
      +#undef FN_LOG_MARK
      +}
      +
      +static void log_provider_info(const fcgi_provider_conf *conf, request_rec *r)
      +{
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                  APLOGNO(02496) "name %s, backend %s, host %s, port %d, "
      +                  "first address %pI, %c%c",
      +                  conf->name,
      +                  conf->backend,
      +                  conf->host,
      +                  (int)conf->port,
      +                  conf->backend_addrs,
      +                  conf->is_authn ? 'N' : '_',
      +                  conf->is_authz ? 'Z' : '_');
      +}
      +
      +static void setupenv(request_rec *r, const char *password, const char *apache_role)
      +{
      +    ap_add_common_vars(r);
      +    ap_add_cgi_vars(r);
      +    apr_table_setn(r->subprocess_env, "FCGI_ROLE", AP_FCGI_AUTHORIZER_STR);
      +    if (apache_role) {
      +        apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", apache_role);
      +    }
      +    if (password) {
      +        apr_table_setn(r->subprocess_env, "REMOTE_PASSWD", password);
      +    }
      +    /* Drop the variables CONTENT_LENGTH, PATH_INFO, PATH_TRANSLATED,
      +     * SCRIPT_NAME and most Hop-By-Hop headers - EXCEPT we will pass
      +     * PROXY_AUTH to allow CGI to perform proxy auth for httpd
      +     */
      +    apr_table_unset(r->subprocess_env, "CONTENT_LENGTH");
      +    apr_table_unset(r->subprocess_env, "PATH_INFO");
      +    apr_table_unset(r->subprocess_env, "PATH_TRANSLATED");
      +    apr_table_unset(r->subprocess_env, "SCRIPT_NAME");
      +    apr_table_unset(r->subprocess_env, "HTTP_KEEP_ALIVE");
      +    apr_table_unset(r->subprocess_env, "HTTP_TE");
      +    apr_table_unset(r->subprocess_env, "HTTP_TRAILER");
      +    apr_table_unset(r->subprocess_env, "HTTP_TRANSFER_ENCODING");
      +    apr_table_unset(r->subprocess_env, "HTTP_UPGRADE");
      +
      +    /* Connection hop-by-hop header to prevent the CGI from hanging */
      +    apr_table_setn(r->subprocess_env, "HTTP_CONNECTION", "close");
      +}
      +
      +static apr_status_t recv_data(const fcgi_provider_conf *conf,
      +                              request_rec *r,
      +                              apr_socket_t *s,
      +                              char *buf,
      +                              apr_size_t *buflen)
      +{
      +    apr_status_t rv;
      +
      +    rv = apr_socket_recv(s, buf, buflen);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                      APLOGNO(02497) "Couldn't read from backend %s",
      +                      conf->backend);
      +        return rv;
      +    }
      +
      +#if AP_MODULE_MAGIC_AT_LEAST(20130702,2) 
      +    ap_log_rdata(APLOG_MARK, APLOG_TRACE5, r, "FastCGI data received",
      +                 buf, *buflen, AP_LOG_DATA_SHOW_OFFSET);
      +#endif
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t recv_data_full(const fcgi_provider_conf *conf,
      +                                   request_rec *r,
      +                                   apr_socket_t *s,
      +                                   char *buf,
      +                                   apr_size_t buflen)
      +{
      +    apr_size_t readlen;
      +    apr_size_t cumulative_len = 0;
      +    apr_status_t rv;
      +
      +    do {
      +        readlen = buflen - cumulative_len;
      +        rv = recv_data(conf, r, s, buf + cumulative_len, &readlen);
      +        if (rv != APR_SUCCESS) {
      +            return rv;
      +        }
      +        cumulative_len += readlen;
      +    } while (cumulative_len < buflen);
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t sendv_data(const fcgi_provider_conf *conf,
      +                               request_rec *r,
      +                               apr_socket_t *s,
      +                               struct iovec *vec,
      +                               int nvec,
      +                               apr_size_t *len)
      +{
      +    apr_size_t to_write = 0, written = 0;
      +    apr_status_t rv = APR_SUCCESS;
      +    int i, offset;
      +
      +    for (i = 0; i < nvec; i++) {
      +        to_write += vec[i].iov_len;
      +#if AP_MODULE_MAGIC_AT_LEAST(20130702,2) 
      +        ap_log_rdata(APLOG_MARK, APLOG_TRACE5, r, "FastCGI data sent",
      +                     vec[i].iov_base, vec[i].iov_len, AP_LOG_DATA_SHOW_OFFSET);
      +#endif
      +    }
      +
      +    offset = 0;
      +    while (to_write) {
      +        apr_size_t n = 0;
      +        rv = apr_socket_sendv(s, vec + offset, nvec - offset, &n);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                          APLOGNO(02498) "Sending data to %s failed",
      +                          conf->backend);
      +            break;
      +        }
      +        if (n > 0) {
      +            written += n;
      +            if (written >= to_write)
      +                break;                 /* short circuit out */
      +            for (i = offset; i < nvec; ) {
      +                if (n >= vec[i].iov_len) {
      +                    offset++;
      +                    n -= vec[i++].iov_len;
      +                } else {
      +                    vec[i].iov_len -= n;
      +                    vec[i].iov_base = (char *) vec[i].iov_base + n;
      +                    break;
      +                }
      +            }
      +        }
      +    }
      +
      +    *len = written;
      +
      +    return rv;
      +}
      +
      +static apr_status_t send_begin_request(request_rec *r,
      +                                       const fcgi_provider_conf *conf,
      +                                       apr_socket_t *s, int role,
      +                                       apr_uint16_t request_id)
      +{
      +    struct iovec vec[2];
      +    ap_fcgi_header header;
      +    unsigned char farray[AP_FCGI_HEADER_LEN];
      +    ap_fcgi_begin_request_body brb;
      +    unsigned char abrb[AP_FCGI_HEADER_LEN];
      +    apr_size_t len;
      +
      +    ap_fcgi_fill_in_header(&header, AP_FCGI_BEGIN_REQUEST, request_id,
      +                           sizeof(abrb), 0);
      +    ap_fcgi_fill_in_request_body(&brb, role, 0 /* *NOT* AP_FCGI_KEEP_CONN */);
      +
      +    ap_fcgi_header_to_array(&header, farray);
      +    ap_fcgi_begin_request_body_to_array(&brb, abrb);
      +
      +    vec[0].iov_base = (void *)farray;
      +    vec[0].iov_len = sizeof(farray);
      +    vec[1].iov_base = (void *)abrb;
      +    vec[1].iov_len = sizeof(abrb);
      +
      +    return sendv_data(conf, r, s, vec, 2, &len);
      +}
      +
      +static apr_status_t send_environment(apr_socket_t *s,
      +                                     const fcgi_provider_conf *conf,
      +                                     request_rec *r, apr_uint16_t request_id,
      +                                     apr_pool_t *temp_pool)
      +{
      +    const char *fn = "send_environment";
      +    const apr_array_header_t *envarr;
      +    const apr_table_entry_t *elts;
      +    struct iovec vec[2];
      +    ap_fcgi_header header;
      +    unsigned char farray[AP_FCGI_HEADER_LEN];
      +    char *body;
      +    apr_status_t rv;
      +    apr_size_t avail_len, len, required_len;
      +    int i, next_elem, starting_elem;
      +
      +    envarr = apr_table_elts(r->subprocess_env);
      +    elts = (const apr_table_entry_t *) envarr->elts;
      +
      +    if (APLOG_R_IS_LEVEL(r, APLOG_TRACE2)) {
      +
      +        for (i = 0; i < envarr->nelts; ++i) {
      +            if (!elts[i].key) {
      +                continue;
      +            }
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                          "%s: '%s': '%s'",
      +                          fn, elts[i].key, 
      +                          !strcmp(elts[i].key, "REMOTE_PASSWD") ?
      +                              "XXXXXXXX" : elts[i].val);
      +        }
      +    }
      +
      +    /* Send envvars over in as many FastCGI records as it takes, */
      +    next_elem = 0; /* starting with the first one */
      +
      +    avail_len = 16 * 1024; /* our limit per record, which could have been up
      +                            * to AP_FCGI_MAX_CONTENT_LEN
      +                            */
      +
      +    while (next_elem < envarr->nelts) {
      +        starting_elem = next_elem;
      +        required_len = ap_fcgi_encoded_env_len(r->subprocess_env,
      +                                               avail_len,
      +                                               &next_elem);
      +
      +        if (!required_len) {
      +            if (next_elem < envarr->nelts) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                              APLOGNO(02499) "couldn't encode envvar '%s' in %"
      +                              APR_SIZE_T_FMT " bytes",
      +                              elts[next_elem].key, avail_len);
      +                /* skip this envvar and continue */
      +                ++next_elem;
      +                continue;
      +            }
      +            /* only an unused element at the end of the array */
      +            break;
      +        }
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                      APLOGNO(02500) "required len for encoding envvars: %"
      +                      APR_SIZE_T_FMT ", %d/%d elems processed so far",
      +                      required_len, next_elem, envarr->nelts);
      +
      +        body = apr_palloc(temp_pool, required_len);
      +        rv = ap_fcgi_encode_env(r, r->subprocess_env, body, required_len,
      +                                &starting_elem);
      +        /* we pre-compute, so we can't run out of space */
      +        ap_assert(rv == APR_SUCCESS);
      +        /* compute and encode must be in sync */
      +        ap_assert(starting_elem == next_elem);
      +
      +        ap_fcgi_fill_in_header(&header, AP_FCGI_PARAMS, request_id,
      +                               (apr_uint16_t)required_len, 0);
      +        ap_fcgi_header_to_array(&header, farray);
      +
      +        vec[0].iov_base = (void *)farray;
      +        vec[0].iov_len = sizeof(farray);
      +        vec[1].iov_base = body;
      +        vec[1].iov_len = required_len;
      +
      +        rv = sendv_data(conf, r, s, vec, 2, &len);
      +        apr_pool_clear(temp_pool);
      +
      +        if (rv) {
      +            return rv;
      +        }
      +    }
      +
      +    /* Envvars sent, so say we're done */
      +    ap_fcgi_fill_in_header(&header, AP_FCGI_PARAMS, request_id, 0, 0);
      +    ap_fcgi_header_to_array(&header, farray);
      +
      +    vec[0].iov_base = (void *)farray;
      +    vec[0].iov_len = sizeof(farray);
      +
      +    return sendv_data(conf, r, s, vec, 1, &len);
      +}
      +
      +/*
      + * This header-state logic is from mod_proxy_fcgi.
      + */
      +enum {
      +  HDR_STATE_READING_HEADERS,
      +  HDR_STATE_GOT_CR,
      +  HDR_STATE_GOT_CRLF,
      +  HDR_STATE_GOT_CRLFCR,
      +  HDR_STATE_GOT_LF,
      +  HDR_STATE_DONE_WITH_HEADERS
      +};
      +
      +/* Try to find the end of the script headers in the response from the back
      + * end fastcgi server. STATE holds the current header parsing state for this
      + * request.
      + *
      + * Returns 0 if it can't find the end of the headers, and 1 if it found the
      + * end of the headers. */
      +static int handle_headers(request_rec *r, int *state,
      +                          const char *readbuf, apr_size_t readlen)
      +{
      +    const char *itr = readbuf;
      +
      +    while (readlen--) {
      +        if (*itr == '\r') {
      +            switch (*state) {
      +                case HDR_STATE_GOT_CRLF:
      +                    *state = HDR_STATE_GOT_CRLFCR;
      +                    break;
      +
      +                default:
      +                    *state = HDR_STATE_GOT_CR;
      +                    break;
      +            }
      +        }
      +        else if (*itr == '\n') {
      +            switch (*state) {
      +                 case HDR_STATE_GOT_LF:
      +                     *state = HDR_STATE_DONE_WITH_HEADERS;
      +                     break;
      +
      +                 case HDR_STATE_GOT_CR:
      +                     *state = HDR_STATE_GOT_CRLF;
      +                     break;
      +
      +                 case HDR_STATE_GOT_CRLFCR:
      +                     *state = HDR_STATE_DONE_WITH_HEADERS;
      +                     break;
      +
      +                 default:
      +                     *state = HDR_STATE_GOT_LF;
      +                     break;
      +            }
      +        }
      +        else {
      +            *state = HDR_STATE_READING_HEADERS;
      +        }
      +
      +        if (*state == HDR_STATE_DONE_WITH_HEADERS)
      +            break;
      +
      +        ++itr;
      +    }
      +
      +    if (*state == HDR_STATE_DONE_WITH_HEADERS) {
      +        return 1;
      +    }
      +
      +    return 0;
      +}
      +
      +/*
      + * handle_response() is based on mod_proxy_fcgi's dispatch()
      + */
      +static apr_status_t handle_response(const fcgi_provider_conf *conf,
      +                                    request_rec *r, apr_socket_t *s,
      +                                    apr_pool_t *temp_pool,
      +                                    apr_uint16_t request_id,
      +                                    char *rspbuf,
      +                                    apr_size_t *rspbuflen)
      +{
      +    apr_bucket *b;
      +    apr_bucket_brigade *ob;
      +    apr_size_t orspbuflen = 0;
      +    apr_status_t rv = APR_SUCCESS;
      +    const char *fn = "handle_response";
      +    int header_state = HDR_STATE_READING_HEADERS;
      +    int seen_end_of_headers = 0, done = 0;
      +
      +    if (rspbuflen) {
      +        orspbuflen = *rspbuflen;
      +        *rspbuflen = 0; /* unless we actually read something */
      +    }
      +
      +    ob = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      +
      +    while (!done && rv == APR_SUCCESS) { /* Keep reading FastCGI records until
      +                                          * we get AP_FCGI_END_REQUEST (done)
      +                                          * or an error occurs.
      +                                          */
      +        apr_size_t readbuflen;
      +        apr_uint16_t clen;
      +        apr_uint16_t rid;
      +        char readbuf[AP_IOBUFSIZE + 1];
      +        unsigned char farray[AP_FCGI_HEADER_LEN];
      +        unsigned char plen;
      +        unsigned char type;
      +        unsigned char version;
      +
      +        rv = recv_data_full(conf, r, s, (char *)farray, AP_FCGI_HEADER_LEN);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                          APLOGNO(02501) "%s: Error occurred before reading "
      +                          "entire header", fn);
      +            break;
      +        }
      +
      +        ap_fcgi_header_fields_from_array(&version, &type, &rid, &clen, &plen,
      +                                         farray);
      +
      +        if (version != AP_FCGI_VERSION_1) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                          APLOGNO(02502) "%s: Got bogus FastCGI header "
      +                          "version %d", fn, (int)version);
      +            rv = APR_EINVAL;
      +            break;
      +        }
      +
      +        if (rid != request_id) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                          APLOGNO(02503) "%s: Got bogus FastCGI header "
      +                          "request id %d, expected %d",
      +                          fn, rid, request_id);
      +            rv = APR_EINVAL;
      +            break;
      +        }
      +
      +    recv_again: /* if we need to keep reading more of a record's content */
      +
      +        if (clen > sizeof(readbuf) - 1) {
      +            readbuflen = sizeof(readbuf) - 1;
      +        } else {
      +            readbuflen = clen;
      +        }
      +
      +        /*
      +         * Now get the actual content of the record.
      +         */
      +        if (readbuflen != 0) {
      +            rv = recv_data(conf, r, s, readbuf, &readbuflen);
      +            if (rv != APR_SUCCESS) {
      +                break;
      +            }
      +            readbuf[readbuflen] = '\0';
      +        }
      +
      +        switch (type) {
      +        case AP_FCGI_STDOUT: /* Response headers and optional body */
      +            if (clen != 0) {
      +                b = apr_bucket_transient_create(readbuf,
      +                                                readbuflen,
      +                                                r->connection->bucket_alloc);
      +
      +                APR_BRIGADE_INSERT_TAIL(ob, b);
      +
      +                if (!seen_end_of_headers) {
      +                    int st = handle_headers(r, &header_state,
      +                                            readbuf, readbuflen);
      +
      +                    if (st == 1) {
      +                        int status;
      +
      +                        seen_end_of_headers = 1;
      +
      +                        status =
      +                            ap_scan_script_header_err_brigade_ex(r, ob,
      +                                                                 NULL, 
      +                                                                 APLOG_MODULE_INDEX);
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                                      APLOGNO(02504) "%s: script header "
      +                                      "parsing -> %d/%d",
      +                                      fn, status, r->status);
      +
      +                        if (rspbuf) { /* caller wants to see response body,
      +                                       * if any
      +                                       */
      +                            apr_status_t tmprv;
      +
      +                            if (rspbuflen) {
      +                                *rspbuflen = orspbuflen;
      +                            }
      +                            tmprv = apr_brigade_flatten(ob, rspbuf, rspbuflen);
      +                            if (tmprv != APR_SUCCESS) {
      +                                /* should not occur for these bucket types;
      +                                 * does not indicate overflow
      +                                 */
      +                                ap_log_rerror(APLOG_MARK, APLOG_ERR, tmprv, r,
      +                                              APLOGNO(02505) "%s: error "
      +                                              "flattening response body",
      +                                              fn);
      +                            }
      +                        }
      +
      +                        if (status != OK) {
      +                            r->status = status;
      +                            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                                          APLOGNO(02506) "%s: Error parsing "
      +                                          "script headers from %s",
      +                                          fn, conf->backend);
      +                            rv = APR_EINVAL;
      +                            break;
      +                        }
      +                        apr_pool_clear(temp_pool);
      +                    }
      +                    else {
      +                        /* We're still looking for the end of the
      +                         * headers, so this part of the data will need
      +                         * to persist. */
      +                        apr_bucket_setaside(b, temp_pool);
      +                    }
      +                }
      +
      +                /* If we didn't read all the data go back and get the
      +                 * rest of it. */
      +                if (clen > readbuflen) {
      +                    clen -= readbuflen;
      +                    goto recv_again;
      +                }
      +            }
      +            break;
      +
      +        case AP_FCGI_STDERR: /* Text to log */
      +            if (clen) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                              APLOGNO(02507) "%s: Logged from %s: '%s'",
      +                              fn, conf->backend, readbuf);
      +            }
      +
      +            if (clen > readbuflen) {
      +                clen -= readbuflen;
      +                goto recv_again; /* continue reading this record */
      +            }
      +            break;
      +
      +        case AP_FCGI_END_REQUEST:
      +            done = 1;
      +            break;
      +
      +        default:
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                          APLOGNO(02508) "%s: Got bogus FastCGI record type "
      +                          "%d", fn, type);
      +            break;
      +        }
      +        /* Leave on above switch's inner error. */
      +        if (rv != APR_SUCCESS) {
      +            break;
      +        }
      +
      +        /*
      +         * Read/discard any trailing padding.
      +         */
      +        if (plen) {
      +            rv = recv_data_full(conf, r, s, readbuf, plen);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                              APLOGNO(02509) "%s: Error occurred reading "
      +                              "padding",
      +                              fn);
      +                break;
      +            }
      +        }
      +    }
      +
      +    apr_brigade_cleanup(ob);
      +
      +    if (rv == APR_SUCCESS && !seen_end_of_headers) {
      +        rv = APR_EINVAL;
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                      APLOGNO(02510) "%s: Never reached end of script headers",
      +                      fn);
      +    }
      +
      +    return rv;
      +}
      +
      +/* almost from mod_fcgid */
      +static int mod_fcgid_modify_auth_header(void *vars,
      +                                        const char *key, const char *val)
      +{
      +    /* When the application gives a 200 response, the server ignores response
      +       headers whose names aren't prefixed with Variable- prefix, and ignores
      +       any response content */
      +    if (strncasecmp(key, "Variable-", 9) == 0)
      +        apr_table_setn(vars, key, val);
      +    return 1;
      +}
      +
      +static int fix_auth_header(void *vr, const char *key, const char *val)
      +{
      +    request_rec *r = vr;
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "moving %s->%s", key, val);
      +    apr_table_unset(r->err_headers_out, key);
      +    apr_table_setn(r->subprocess_env, key + 9, val);
      +    return 1;
      +}
      +
      +static void req_rsp(request_rec *r, const fcgi_provider_conf *conf,
      +                    const char *password, const char *apache_role,
      +                    char *rspbuf, apr_size_t *rspbuflen)
      +{
      +    const char *fn = "req_rsp";
      +    apr_pool_t *temp_pool;
      +    apr_size_t orspbuflen = 0;
      +    apr_socket_t *s;
      +    apr_status_t rv;
      +    apr_table_t *saved_subprocess_env = 
      +      apr_table_copy(r->pool, r->subprocess_env);
      +
      +    if (rspbuflen) {
      +        orspbuflen = *rspbuflen;
      +        *rspbuflen = 0; /* unless we actually read something */
      +    }
      +
      +    apr_pool_create(&temp_pool, r->pool);
      +
      +    setupenv(r, password, apache_role);
      +
      +    rv = connect_to_peer(&s, r, conf->backend_addrs,
      +                         conf->backend, FCGI_IO_TIMEOUT);
      +    if (rv == APR_SUCCESS) {
      +        apr_uint16_t request_id = 1;
      +
      +        rv = send_begin_request(r, conf, s, AP_FCGI_AUTHORIZER, request_id);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                          APLOGNO(02511) "%s: Failed writing request to %s",
      +                          fn, conf->backend);
      +        }
      +
      +        if (rv == APR_SUCCESS) {
      +            rv = send_environment(s, conf, r, request_id, temp_pool);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                              APLOGNO(02512) "%s: Failed writing environment "
      +                              "to %s", fn, conf->backend);
      +            }
      +        }
      +
      +        /* The responder owns the request body, not the authorizer.
      +         * Don't even send an empty AP_FCGI_STDIN block.  libfcgi doesn't care,
      +         * but it wasn't sent to authorizers by mod_fastcgi or mod_fcgi and
      +         * may be unhandled by the app.  Additionally, the FastCGI spec does
      +         * not mention FCGI_STDIN in the Authorizer description, though it
      +         * does describe FCGI_STDIN elsewhere in more general terms than
      +         * simply a wrapper for the client's request body.
      +         */
      +
      +        if (rv == APR_SUCCESS) {
      +            if (rspbuflen) {
      +                *rspbuflen = orspbuflen;
      +            }
      +            rv = handle_response(conf, r, s, temp_pool, request_id, rspbuf,
      +                                 rspbuflen);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                              APLOGNO(02514) "%s: Failed handling response "
      +                              "from %s", fn, conf->backend);
      +            }
      +        }
      +
      +        apr_socket_close(s);
      +    }
      +
      +    if (rv != APR_SUCCESS) {
      +        /* some sort of mechanical problem */
      +        r->status = HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +    else {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                      APLOGNO(02515) "%s: Received HTTP status %d",
      +                      fn, r->status);
      +    }
      +
      +    r->subprocess_env = saved_subprocess_env;
      +
      +    if (r->status == HTTP_OK) {
      +        /* An Authorizer application's 200 response may include headers
      +         * whose names are prefixed with Variable-, and they should be
      +         * available to subsequent phases via subprocess_env (and yanked
      +         * from the client response).
      +         */
      +        apr_table_t *vars = apr_table_make(temp_pool, /* not used to allocate
      +                                                       * any values that end up
      +                                                       * in r->(anything)
      +                                                       */
      +                                           10);
      +        apr_table_do(mod_fcgid_modify_auth_header, vars,
      +                     r->err_headers_out, NULL);
      +        apr_table_do(fix_auth_header, r, vars, NULL);
      +    }
      +
      +    apr_pool_destroy(temp_pool);
      +}
      +
      +static int fcgi_check_authn(request_rec *r)
      +{
      +    const char *fn = "fcgi_check_authn";
      +    fcgi_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
      +                                                &authnz_fcgi_module);
      +    const char *password = NULL;
      +    const fcgi_provider_conf *conf;
      +    const char *prov;
      +    const char *auth_type;
      +    char rspbuf[NON200_RESPONSE_BUF_LEN + 1]; /* extra byte for '\0' */
      +    apr_size_t rspbuflen = sizeof rspbuf - 1;
      +    int res;
      +
      +    prov = dconf && dconf->name ? dconf->name : NULL;
      +
      +    if (!prov || !strcasecmp(prov, "None")) {
      +        return DECLINED;
      +    }
      +
      +    auth_type = ap_auth_type(r);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                  APLOGNO(02516) "%s, prov %s, authoritative %s, "
      +                  "require-basic %s, user expr? %s type %s",
      +                  fn, prov,
      +                  dconf->authoritative ? "yes" : "no",
      +                  dconf->require_basic_auth ? "yes" : "no",
      +                  dconf->user_expr ? "yes" : "no",
      +                  auth_type);
      +
      +    if (auth_type && !strcasecmp(auth_type, "Basic")) {
      +        if ((res = ap_get_basic_auth_pw(r, &password))) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                          APLOGNO(02517) "%s: couldn't retrieve basic auth "
      +                          "password", fn);
      +            if (dconf->require_basic_auth) {
      +                return res;
      +            }
      +            password = NULL;
      +        }
      +    }
      +
      +    conf = apr_hash_get(fcgi_authn_providers, prov, APR_HASH_KEY_STRING);
      +    if (!conf) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                      APLOGNO(02518) "%s: can't find config for provider %s",
      +                      fn, prov);
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +
      +    if (APLOGrdebug(r)) {
      +        log_provider_info(conf, r);
      +    }
      +
      +    req_rsp(r, conf, password, AP_FCGI_APACHE_ROLE_AUTHENTICATOR_STR,
      +            rspbuf, &rspbuflen);
      +
      +    if (r->status == HTTP_OK) {
      +        if (dconf->user_expr) {
      +            const char *err;
      +            const char *user = ap_expr_str_exec(r, dconf->user_expr,
      +                                                &err);
      +            if (user && strlen(user)) {
      +                r->user = apr_pstrdup(r->pool, user);
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                              APLOGNO(02519) "%s: Setting user to '%s'",
      +                              fn, r->user);
      +            }
      +            else if (user && dconf->default_user) {
      +                r->user = apr_pstrdup(r->pool, dconf->default_user);
      +            }
      +            else if (user) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                              APLOGNO(02520) "%s: Failure extracting user "
      +                              "after calling authorizer: user expression "
      +                              "yielded empty string (variable not set?)",
      +                              fn);
      +                r->status = HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +            else {
      +                /* unexpected error, not even an empty string was returned */
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                              APLOGNO(02521) "%s: Failure extracting user "
      +                              "after calling authorizer: %s",
      +                              fn, err);
      +                r->status = HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +        }
      +        if (conf->is_authz) {
      +            /* combined authn/authz phase, so app won't be invoked for authz
      +             *
      +             * Remember that the request was successfully authorized by this
      +             * provider.
      +             */
      +            fcgi_request_notes *rnotes = apr_palloc(r->pool, sizeof(*rnotes));
      +            rnotes->successful_authnz_provider = conf->name;
      +            ap_set_module_config(r->request_config, &authnz_fcgi_module,
      +                                 rnotes);
      +        }
      +    }
      +    else {
      +        /* From the spec:
      +         *   For Authorizer response status values other than "200" (OK), the 
      +         *   Web server denies access and sends the response status, headers,
      +         *   and content back to the HTTP client.
      +         * But:
      +         *   This only makes sense if this authorizer is authoritative.
      +         */
      +        if (rspbuflen > 0 && !dconf->authoritative) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                          APLOGNO(02522) "%s: Ignoring response body from non-"
      +                          "authoritative authorizer", fn);
      +        }
      +        else if (rspbuflen > 0) {
      +            if (rspbuflen == sizeof rspbuf - 1) {
      +                /* apr_brigade_flatten() interface :( */
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                              APLOGNO(02523) "%s: possible overflow handling "
      +                              "response body", fn);
      +            }
      +            rspbuf[rspbuflen] = '\0'; /* we reserved an extra byte for '\0' */
      +            ap_custom_response(r, r->status, rspbuf); /* API makes a copy */
      +        }
      +    }
      +
      +    return r->status == HTTP_OK ? 
      +        OK : dconf->authoritative ? r->status : DECLINED;
      +}
      +
      +static authn_status fcgi_check_password(request_rec *r, const char *user,
      +                                        const char *password)
      +{
      +    const char *fn = "fcgi_check_password";
      +    const char *prov = apr_table_get(r->notes, AUTHN_PROVIDER_NAME_NOTE);
      +    const fcgi_provider_conf *conf;
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                  APLOGNO(02524) "%s(%s, XXX): provider %s",
      +                  fn, user, prov);
      +
      +    if (!prov) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                      APLOGNO(02525) "%s: provider note isn't set", fn);
      +        return AUTH_GENERAL_ERROR;
      +    }
      +
      +    conf = apr_hash_get(fcgi_authn_providers, prov, APR_HASH_KEY_STRING);
      +    if (!conf) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                      APLOGNO(02526) "%s: can't find config for provider %s",
      +                      fn, prov);
      +        return AUTH_GENERAL_ERROR;
      +    }
      +
      +    if (APLOGrdebug(r)) {
      +        log_provider_info(conf, r);
      +    }
      +
      +    req_rsp(r, conf, password, 
      +            /* combined authn and authz: FCGI_APACHE_ROLE not set */
      +            conf->is_authz ? NULL : AP_FCGI_APACHE_ROLE_AUTHENTICATOR_STR,
      +            NULL, NULL);
      +
      +    if (r->status == HTTP_OK) {
      +        if (conf->is_authz) {
      +            /* combined authn/authz phase, so app won't be invoked for authz
      +             *
      +             * Remember that the request was successfully authorized by this
      +             * provider.
      +             */
      +            fcgi_request_notes *rnotes = apr_palloc(r->pool, sizeof(*rnotes));
      +            rnotes->successful_authnz_provider = conf->name;
      +            ap_set_module_config(r->request_config, &authnz_fcgi_module,
      +                                 rnotes);
      +        }
      +        return AUTH_GRANTED;
      +    }
      +    else if (r->status == HTTP_INTERNAL_SERVER_ERROR) {
      +        return AUTH_GENERAL_ERROR;
      +    }
      +    else {
      +        return AUTH_DENIED;
      +    }
      +}
      +
      +static const authn_provider fcgi_authn_provider = {
      +    &fcgi_check_password,
      +    NULL /* get-realm-hash not supported */
      +};
      +
      +static authz_status fcgi_authz_check(request_rec *r,
      +                                     const char *require_line,
      +                                     const void *parsed_require_line)
      +{
      +    const char *fn = "fcgi_authz_check";
      +    const char *prov = apr_table_get(r->notes, AUTHZ_PROVIDER_NAME_NOTE);
      +    const fcgi_provider_conf *conf;
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                  APLOGNO(02527) "%s(%s)", fn, require_line);
      +
      +    if (!prov) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                      APLOGNO(02528) "%s: provider note isn't set", fn);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +
      +    conf = apr_hash_get(fcgi_authz_providers, prov, APR_HASH_KEY_STRING);
      +    if (!conf) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                      APLOGNO(02529) "%s: can't find config for provider %s",
      +                      fn, prov);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +
      +    if (APLOGrdebug(r)) {
      +        log_provider_info(conf, r);
      +    }
      +
      +    if (!r->user) {
      +        return AUTHZ_DENIED_NO_USER;
      +    }
      +
      +    if (conf->is_authn) {
      +        /* combined authn/authz phase, so app won't be invoked for authz
      +         *
      +         * If the provider already successfully authorized this request, 
      +         * success.
      +         */
      +        fcgi_request_notes *rnotes = ap_get_module_config(r->request_config,
      +                                                        &authnz_fcgi_module);
      +        if (rnotes
      +            && rnotes->successful_authnz_provider
      +            && !strcmp(rnotes->successful_authnz_provider, conf->name)) {
      +            return AUTHZ_GRANTED;
      +        }
      +        else {
      +            return AUTHZ_DENIED;
      +        }
      +    }
      +    else {
      +        req_rsp(r, conf, NULL, AP_FCGI_APACHE_ROLE_AUTHORIZER_STR, NULL, NULL);
      +
      +        if (r->status == HTTP_OK) {
      +            return AUTHZ_GRANTED;
      +        }
      +        else if (r->status == HTTP_INTERNAL_SERVER_ERROR) {
      +            return AUTHZ_GENERAL_ERROR;
      +        }
      +        else {
      +            return AUTHZ_DENIED;
      +        }
      +    }
      +}
      +
      +static const char *fcgi_authz_parse(cmd_parms *cmd, const char *require_line,
      +                                    const void **parsed_require_line)
      +{
      +    /* Allowed form: Require [not] registered-provider-name<EOS>
      +     */
      +    if (strcmp(require_line, "")) {
      +        return "mod_authnz_fcgi doesn't support restrictions on providers "
      +               "(i.e., multiple require args)";
      +    }
      +
      +    return NULL;
      +}
      +
      +static const authz_provider fcgi_authz_provider = {
      +    &fcgi_authz_check,
      +    &fcgi_authz_parse,
      +};
      +
      +static const char *fcgi_check_authn_provider(cmd_parms *cmd,
      +                                        void *d,
      +                                        int argc,
      +                                        char *const argv[])
      +{
      +    const char *dname = "AuthnzFcgiCheckAuthnProvider";
      +    fcgi_dir_conf *dc = d;
      +    int ca = 0;
      +
      +    if (ca >= argc) {
      +        return apr_pstrcat(cmd->pool, dname, ": No provider given", NULL);
      +    }
      +
      +    dc->name = argv[ca];
      +    ca++;
      +
      +    if (!strcasecmp(dc->name, "None")) {
      +        if (ca < argc) {
      +            return "Options aren't supported with \"None\"";
      +        }
      +    }
      +
      +    while (ca < argc) {
      +        const char *var = argv[ca], *val;
      +        int badarg = 0;
      +
      +        ca++;
      +
      +        /* at present, everything needs an argument */
      +        if (ca >= argc) {
      +            return apr_pstrcat(cmd->pool, dname, ": ", var,
      +                               "needs an argument", NULL);
      +        }
      +
      +        val = argv[ca];
      +        ca++;
      +
      +        if (!strcasecmp(var, "Authoritative")) {
      +            if (!strcasecmp(val, "On")) {
      +                dc->authoritative = 1;
      +            }
      +            else if (!strcasecmp(val, "Off")) {
      +                dc->authoritative = 0;
      +            }
      +            else {
      +                badarg = 1;
      +            }
      +        }
      +        else if (!strcasecmp(var, "DefaultUser")) {
      +            dc->default_user = val;
      +        }
      +        else if (!strcasecmp(var, "RequireBasicAuth")) {
      +            if (!strcasecmp(val, "On")) {
      +                dc->require_basic_auth = 1;
      +            }
      +            else if (!strcasecmp(val, "Off")) {
      +                dc->require_basic_auth = 0;
      +            }
      +            else {
      +                badarg = 1;
      +            }
      +        }
      +        else if (!strcasecmp(var, "UserExpr")) {
      +            const char *err;
      +            int flags = AP_EXPR_FLAG_DONT_VARY | AP_EXPR_FLAG_RESTRICTED
      +                | AP_EXPR_FLAG_STRING_RESULT;
      +
      +            dc->user_expr = ap_expr_parse_cmd(cmd, val,
      +                                              flags, &err, NULL);
      +            if (err) {
      +                return apr_psprintf(cmd->pool, "%s: Error parsing '%s': '%s'",
      +                                    dname, val, err);
      +            }
      +        }
      +        else {
      +            return apr_pstrcat(cmd->pool, dname, ": Unexpected option '",
      +                               var, "'", NULL);
      +        }
      +        if (badarg) {
      +            return apr_pstrcat(cmd->pool, dname, ": Bad argument '",
      +                               val, "' to option '", var, "'", NULL);
      +        }
      +    }
      +
      +    return NULL;
      +}
      +
      +/* AuthnzFcgiAuthDefineProvider {authn|authz|authnz} provider-name \
      + *   fcgi://backendhost:backendport/
      + */
      +static const char *fcgi_define_provider(cmd_parms *cmd,
      +                                        void *d,
      +                                        int argc,
      +                                        char *const argv[])
      +{
      +    const char *dname = "AuthnzFcgiDefineProvider";
      +    ap_rxplus_t *fcgi_backend_regex;
      +    apr_status_t rv;
      +    char *host;
      +    const char *err, *stype;
      +    fcgi_provider_conf *conf = apr_pcalloc(cmd->pool, sizeof(*conf));
      +    int ca = 0, rc, port;
      +
      +    fcgi_backend_regex = ap_rxplus_compile(cmd->pool, FCGI_BACKEND_REGEX_STR);
      +    if (!fcgi_backend_regex) {
      +        return apr_psprintf(cmd->pool,
      +                            "%s: failed to compile regexec '%s'",
      +                            dname, FCGI_BACKEND_REGEX_STR);
      +    }
      +
      +    err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +    if (err)
      +        return err;
      +
      +    if (ca >= argc) {
      +        return apr_pstrcat(cmd->pool, dname, ": No type given", NULL);
      +    }
      +
      +    stype = argv[ca];
      +    ca++;
      +
      +    if (!strcasecmp(stype, "authn")) {
      +        conf->is_authn = 1;
      +    }
      +    else if (!strcasecmp(stype, "authz")) {
      +        conf->is_authz = 1;
      +    }
      +    else if (!strcasecmp(stype, "authnz")) {
      +        conf->is_authn = conf->is_authz = 1;
      +    }
      +    else {
      +        return apr_pstrcat(cmd->pool,
      +                           dname,
      +                           ": Invalid provider type ",
      +                           stype,
      +                           NULL);
      +    }
      +
      +    if (ca >= argc) {
      +        return apr_pstrcat(cmd->pool, dname, ": No provider name given", NULL);
      +    }
      +    conf->name = argv[ca];
      +    ca++;
      +
      +    if (ca >= argc) {
      +        return apr_pstrcat(cmd->pool, dname, ": No backend-address given",
      +                           NULL);
      +    }
      +
      +    rc = ap_rxplus_exec(cmd->pool, fcgi_backend_regex, argv[ca], NULL);
      +    if (!rc || ap_rxplus_nmatch(fcgi_backend_regex) != 3) {
      +        return apr_pstrcat(cmd->pool,
      +                           dname, ": backend-address '",
      +                           argv[ca],
      +                           "' has invalid form",
      +                           NULL);
      +    }
      +
      +    host = ap_rxplus_pmatch(cmd->pool, fcgi_backend_regex, 1);
      +    if (host[0] == '[' && host[strlen(host) - 1] == ']') {
      +        host += 1;
      +        host[strlen(host) - 1] = '\0';
      +    }
      +
      +    port = atoi(ap_rxplus_pmatch(cmd->pool, fcgi_backend_regex, 2));
      +    if (port > 65535) {
      +        return apr_pstrcat(cmd->pool,
      +                           dname, ": backend-address '",
      +                           argv[ca],
      +                           "' has invalid port",
      +                           NULL);
      +    }
      +
      +    conf->backend = argv[ca];
      +    conf->host = host;
      +    conf->port = port;
      +    ca++;
      +
      +    rv = apr_sockaddr_info_get(&conf->backend_addrs, conf->host,
      +                               APR_UNSPEC, conf->port, 0, cmd->pool);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, rv, NULL,
      +                     APLOGNO(02530) "Address %s could not be resolved",
      +                     conf->backend);
      +        return apr_pstrcat(cmd->pool,
      +                           dname,
      +                           ": Error resolving backend address",
      +                           NULL);
      +    }
      +
      +    if (ca != argc) {
      +        return apr_pstrcat(cmd->pool,
      +                           dname,
      +                           ": Unexpected parameter ",
      +                           argv[ca],
      +                           NULL);
      +    }
      +
      +    if (conf->is_authn) {
      +        apr_hash_set(fcgi_authn_providers, conf->name, APR_HASH_KEY_STRING,
      +                     conf);
      +        ap_register_auth_provider(cmd->pool, AUTHN_PROVIDER_GROUP,
      +                                  conf->name,
      +                                  AUTHN_PROVIDER_VERSION,
      +                                  &fcgi_authn_provider,
      +                                  AP_AUTH_INTERNAL_PER_CONF);
      +    }
      +
      +    if (conf->is_authz) {
      +        apr_hash_set(fcgi_authz_providers, conf->name, APR_HASH_KEY_STRING,
      +                     conf);
      +        ap_register_auth_provider(cmd->pool, AUTHZ_PROVIDER_GROUP,
      +                                  conf->name,
      +                                  AUTHZ_PROVIDER_VERSION,
      +                                  &fcgi_authz_provider,
      +                                  AP_AUTH_INTERNAL_PER_CONF);
      +    }
      +
      +    return NULL;
      +}
      +
      +static const command_rec fcgi_cmds[] = {
      +    AP_INIT_TAKE_ARGV("AuthnzFcgiDefineProvider", 
      +                      fcgi_define_provider,
      +                      NULL,
      +                      RSRC_CONF,
      +                      "Define a FastCGI authn and/or authz provider"),
      +
      +    AP_INIT_TAKE_ARGV("AuthnzFcgiCheckAuthnProvider",
      +                      fcgi_check_authn_provider,
      +                      NULL,
      +                      OR_FILEINFO,
      +                      "Enable/disable a FastCGI authorizer to handle "
      +                      "check_authn phase"),
      +
      +    {NULL}
      +};
      +
      +static int fcgi_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
      +                           apr_pool_t *ptemp)
      +{
      +    fcgi_authn_providers = apr_hash_make(pconf);
      +    fcgi_authz_providers = apr_hash_make(pconf);
      +
      +    return OK;
      +}
      +
      +static void fcgi_register_hooks(apr_pool_t *p)
      +{
      +    static const char * const auth_basic_runs_after_me[] = 
      +        {"mod_auth_basic.c", NULL}; /* to allow for custom response */
      +
      +    ap_hook_pre_config(fcgi_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_check_authn(fcgi_check_authn, NULL, auth_basic_runs_after_me,
      +                        APR_HOOK_MIDDLE, AP_AUTH_INTERNAL_PER_CONF);
      +}
      +
      +static void *create_dir_conf(apr_pool_t *p, char *dummy)
      +{
      +    fcgi_dir_conf *dconf = apr_pcalloc(p, sizeof(fcgi_dir_conf));
      +
      +    dconf->authoritative = 1;
      +    return dconf;
      +}
      +
      +static void *merge_dir_conf(apr_pool_t *p, void *basev, void *overridesv)
      +{
      +    fcgi_dir_conf *a = (fcgi_dir_conf *)apr_pcalloc(p, sizeof(*a));
      +    fcgi_dir_conf *base = (fcgi_dir_conf *)basev, 
      +        *over = (fcgi_dir_conf *)overridesv;
      +
      +    /* currently we just have a single directive applicable to a 
      +     * directory, so if it is set then grab all fields from fcgi_dir_conf
      +     */
      +    if (over->name) {
      +        memcpy(a, over, sizeof(*a));
      +    }
      +    else {
      +        memcpy(a, base, sizeof(*a));
      +    }
      +    
      +    return a;
      +}
      +
      +AP_DECLARE_MODULE(authnz_fcgi) =
      +{
      +    STANDARD20_MODULE_STUFF,
      +    create_dir_conf,                 /* dir config creater */
      +    merge_dir_conf,                  /* dir merger */
      +    NULL,                            /* server config */
      +    NULL,                            /* merge server config */
      +    fcgi_cmds,                       /* command apr_table_t */
      +    fcgi_register_hooks              /* register hooks */
      +};
      diff --git a/modules/aaa/mod_authnz_fcgi.dep b/modules/aaa/mod_authnz_fcgi.dep
      new file mode 100644
      index 00000000000..7424929206b
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_fcgi.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authnz_fcgi.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authnz_fcgi.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_fcgi.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authnz_fcgi.dsp b/modules/aaa/mod_authnz_fcgi.dsp
      new file mode 100644
      index 00000000000..a731e4f4daf
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_fcgi.dsp
      @@ -0,0 +1,119 @@
      +# Microsoft Developer Studio Project File - Name="mod_authnz_fcgi" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_authnz_fcgi - Win32 Debug
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authnz_fcgi.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authnz_fcgi.mak" CFG="mod_authnz_fcgi - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authnz_fcgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authnz_fcgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "authnz_fcgi_DECLARE_EXPORT" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_authnz_fcgi_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_authnz_fcgi.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_authnz_fcgi.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_authnz_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "authnz_fcgi_DECLARE_EXPORT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_authnz_fcgi_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_authnz_fcgi.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_authnz_fcgi.so" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_authnz_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_authnz_fcgi - Win32 Release"
      +# Name "mod_authnz_fcgi - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=.\mod_authnz_fcgi.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\include\mod_auth.h
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\include\util_fcgi.h
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/aaa/mod_authnz_fcgi.mak b/modules/aaa/mod_authnz_fcgi.mak
      new file mode 100644
      index 00000000000..772cae2f304
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_fcgi.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authnz_fcgi.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authnz_fcgi - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authnz_fcgi - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authnz_fcgi - Win32 Release" && "$(CFG)" != "mod_authnz_fcgi - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authnz_fcgi.mak" CFG="mod_authnz_fcgi - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authnz_fcgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authnz_fcgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authnz_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authnz_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authnz_fcgi.obj"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi.res"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi_src.idb"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.exp"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.lib"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "authnz_fcgi_DECLARE_EXPORT" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authnz_fcgi_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authnz_fcgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authnz_fcgi.pdb" /debug /out:"$(OUTDIR)\mod_authnz_fcgi.so" /implib:"$(OUTDIR)\mod_authnz_fcgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authnz_fcgi.obj" \
      +	"$(INTDIR)\mod_authnz_fcgi.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_authnz_fcgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authnz_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authnz_fcgi.so"
      +   if exist .\Release\mod_authnz_fcgi.so.manifest mt.exe -manifest .\Release\mod_authnz_fcgi.so.manifest -outputresource:.\Release\mod_authnz_fcgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authnz_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authnz_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authnz_fcgi.obj"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi.res"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi_src.idb"
      +	-@erase "$(INTDIR)\mod_authnz_fcgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.exp"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.lib"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_fcgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "authnz_fcgi_DECLARE_EXPORT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authnz_fcgi_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authnz_fcgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authnz_fcgi.pdb" /debug /out:"$(OUTDIR)\mod_authnz_fcgi.so" /implib:"$(OUTDIR)\mod_authnz_fcgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_fcgi.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authnz_fcgi.obj" \
      +	"$(INTDIR)\mod_authnz_fcgi.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_authnz_fcgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authnz_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authnz_fcgi.so"
      +   if exist .\Debug\mod_authnz_fcgi.so.manifest mt.exe -manifest .\Debug\mod_authnz_fcgi.so.manifest -outputresource:.\Debug\mod_authnz_fcgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authnz_fcgi.dep")
      +!INCLUDE "mod_authnz_fcgi.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authnz_fcgi.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authnz_fcgi - Win32 Release" || "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authnz_fcgi - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authnz_fcgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_fcgi - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authnz_fcgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authnz_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authnz_fcgi.so" /d LONG_NAME="authnz_fcgi_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authnz_fcgi.c
      +
      +"$(INTDIR)\mod_authnz_fcgi.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c
      index 8cada8f98d6..2f987d8c5a2 100644
      --- a/modules/aaa/mod_authnz_ldap.c
      +++ b/modules/aaa/mod_authnz_ldap.c
      @@ -61,8 +61,8 @@ typedef struct {
           char *bindpw;                   /* Password to bind to server (can be NULL) */
           int bind_authoritative;         /* If true, will return errors when bind fails */
       
      -    int user_is_dn;                 /* If true, connection->user is DN instead of userid */
      -    char *remote_user_attribute;    /* If set, connection->user is this attribute instead of userid */
      +    int user_is_dn;                 /* If true, r->user is replaced by DN during authn */
      +    char *remote_user_attribute;    /* If set, r->user is replaced by this attribute during authn */
           int compare_dn_on_server;       /* If true, will use server to do DN compare */
       
           int have_ldap_url;              /* Set if we have found an LDAP url */
      @@ -217,6 +217,7 @@ static void authn_ldap_build_filter(char *filtbuf,
           apr_size_t inbytes;
           apr_size_t outbytes;
           char *outbuf;
      +    int nofilter = 0;
       
           if (sent_user != NULL) {
               user = apr_pstrdup (r->pool, sent_user);
      @@ -249,7 +250,13 @@ static void authn_ldap_build_filter(char *filtbuf,
            * Create the first part of the filter, which consists of the
            * config-supplied portions.
            */
      -    apr_snprintf(filtbuf, FILTER_LENGTH, "(&(%s)(%s=", filter, sec->attribute);
      +
      +    if ((nofilter = (filter && !strcasecmp(filter, "none")))) { 
      +        apr_snprintf(filtbuf, FILTER_LENGTH, "(%s=", sec->attribute);
      +    }
      +    else { 
      +        apr_snprintf(filtbuf, FILTER_LENGTH, "(&(%s)(%s=", filter, sec->attribute);
      +    }
       
           /*
            * Now add the client-supplied username to the filter, ensuring that any
      @@ -303,8 +310,16 @@ static void authn_ldap_build_filter(char *filtbuf,
            * Append the closing parens of the filter, unless doing so would
            * overrun the buffer.
            */
      -    if (q + 2 <= filtbuf_end)
      -        strcat(filtbuf, "))");
      +
      +    if (nofilter) { 
      +        if (q + 1 <= filtbuf_end)
      +            strcat(filtbuf, ")");
      +    } 
      +    else { 
      +        if (q + 2 <= filtbuf_end)
      +            strcat(filtbuf, "))");
      +    }
      +
       }
       
       static void *create_authnz_ldap_dir_config(apr_pool_t *p, char *d)
      @@ -492,24 +507,24 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
                                              sec->deref, sec->secure);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01690)
                             "auth_ldap authenticate: no sec->host - weird...?");
               return AUTH_GENERAL_ERROR;
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01691)
                         "auth_ldap authenticate: using URL %s", sec->url);
       
           /* Get the password that the client sent */
           if (password == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01692)
                             "auth_ldap authenticate: no password specified");
               util_ldap_connection_close(ldc);
               return AUTH_GENERAL_ERROR;
           }
       
           if (user == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01693)
                             "auth_ldap authenticate: no user specified");
               util_ldap_connection_close(ldc);
               return AUTH_GENERAL_ERROR;
      @@ -533,18 +548,23 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
           /* handle bind failure */
           if (result != LDAP_SUCCESS) {
               if (!sec->bind_authoritative) {
      -           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01694)
                             "auth_ldap authenticate: user %s authentication failed; "
                             "URI %s [%s][%s] (not authoritative)",
                             user, r->uri, ldc->reason, ldap_err2string(result));
                  return AUTH_USER_NOT_FOUND;
               }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01695)
                             "auth_ldap authenticate: "
                             "user %s authentication failed; URI %s [%s][%s]",
                             user, r->uri, ldc->reason, ldap_err2string(result));
       
      +        /* talking to a primitive LDAP server (like RACF-over-LDAP) that doesn't return specific errors */
      +        if (!strcasecmp(sec->filter, "none") && LDAP_OTHER == result) { 
      +            return AUTH_USER_NOT_FOUND;
      +        }
      +
               return (LDAP_NO_SUCH_OBJECT == result) ? AUTH_USER_NOT_FOUND
       #ifdef LDAP_SECURITY_ERROR
                        : (LDAP_SECURITY_ERROR(result)) ? AUTH_DENIED
      @@ -580,7 +600,7 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
       
           /* sanity check */
           if (sec->remote_user_attribute && !remote_user_attribute_set) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01696)
                         "auth_ldap authenticate: "
                         "REMOTE_USER was to be set with attribute '%s', "
                         "but this attribute was not requested for in the "
      @@ -589,7 +609,7 @@ static authn_status authn_ldap_check_password(request_rec *r, const char *user,
                         sec->remote_user_attribute);
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01697)
                         "auth_ldap authenticate: accepting %s", user);
       
           return AUTH_GRANTED;
      @@ -607,6 +627,10 @@ static authz_status ldapuser_check_authorization(request_rec *r,
       
           util_ldap_connection_t *ldc = NULL;
       
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
           char *w;
       
      @@ -628,7 +652,7 @@ static authz_status ldapuser_check_authorization(request_rec *r,
                                         apr_pool_cleanup_null);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01698)
                             "auth_ldap authorize: no sec->host - weird...?");
               return AUTHZ_DENIED;
           }
      @@ -641,13 +665,13 @@ static authz_status ldapuser_check_authorization(request_rec *r,
       
       
           if (!strlen(r->user)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01699)
                   "ldap authorize: Userid is blank, AuthType=%s",
                   r->ap_auth_type);
           }
       
           if(!req) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01700)
                   "ldap authorize: Creating LDAP req structure");
       
               req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
      @@ -662,7 +686,7 @@ static authz_status ldapuser_check_authorization(request_rec *r,
       
               /* Search failed, log error and return failure */
               if(result != LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01701)
                       "auth_ldap authorise: User DN not found, %s", ldc->reason);
                   return AUTHZ_DENIED;
               }
      @@ -674,27 +698,35 @@ static authz_status ldapuser_check_authorization(request_rec *r,
           }
       
           if (req->dn == NULL || strlen(req->dn) == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01702)
                             "auth_ldap authorize: require user: user's DN has not "
                             "been defined; failing authorization");
               return AUTHZ_DENIED;
           }
       
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02585)
      +                      "auth_ldap authorize: require user: Can't evaluate expression: %s",
      +                      err);
      +        return AUTHZ_DENIED;
      +    }
      +
           /*
            * First do a whole-line compare, in case it's something like
            *   require user Babs Jensen
            */
      -    result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, sec->attribute, require_args);
      +    result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, sec->attribute, require);
           switch(result) {
               case LDAP_COMPARE_TRUE: {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01703)
                                 "auth_ldap authorize: require user: authorization "
                                 "successful");
                   set_request_vars(r, LDAP_AUTHZ);
                   return AUTHZ_GRANTED;
               }
               default: {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01704)
                                 "auth_ldap authorize: require user: "
                                 "authorization failed [%s][%s]",
                                 ldc->reason, ldap_err2string(result));
      @@ -704,19 +736,19 @@ static authz_status ldapuser_check_authorization(request_rec *r,
           /*
            * Now break apart the line and compare each word on it
            */
      -    t = require_args;
      +    t = require;
           while ((w = ap_getword_conf(r->pool, &t)) && w[0]) {
               result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, sec->attribute, w);
               switch(result) {
                   case LDAP_COMPARE_TRUE: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01705)
                                     "auth_ldap authorize: "
                                     "require user: authorization successful");
                       set_request_vars(r, LDAP_AUTHZ);
                       return AUTHZ_GRANTED;
                   }
                   default: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01706)
                                     "auth_ldap authorize: "
                                     "require user: authorization failed [%s][%s]",
                                     ldc->reason, ldap_err2string(result));
      @@ -724,7 +756,7 @@ static authz_status ldapuser_check_authorization(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01707)
                         "auth_ldap authorize user: authorization denied for "
                         "user %s to %s",
                         r->user, r->uri);
      @@ -744,6 +776,10 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
       
           util_ldap_connection_t *ldc = NULL;
       
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
       
           char filtbuf[FILTER_LENGTH];
      @@ -766,7 +802,7 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
                                         apr_pool_cleanup_null);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01708)
                             "auth_ldap authorize: no sec->host - weird...?");
               return AUTHZ_DENIED;
           }
      @@ -814,13 +850,13 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
            */
       
           if (!strlen(r->user)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01709)
                   "ldap authorize: Userid is blank, AuthType=%s",
                   r->ap_auth_type);
           }
       
           if(!req) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01710)
                   "ldap authorize: Creating LDAP req structure");
       
               req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
      @@ -834,7 +870,7 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
       
               /* Search failed, log error and return failure */
               if(result != LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01711)
                       "auth_ldap authorise: User DN not found, %s", ldc->reason);
                   return AUTHZ_DENIED;
               }
      @@ -848,7 +884,7 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
       
           if (sec->group_attrib_is_dn) {
               if (req->dn == NULL || strlen(req->dn) == 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01712)
                                 "auth_ldap authorize: require group: user's DN has "
                                 "not been defined; failing authorization for user %s",
                                 r->user);
      @@ -863,15 +899,24 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
               }
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02586)
      +                      "auth_ldap authorize: require group: Can't evaluate expression: %s",
      +                      err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01713)
                         "auth_ldap authorize: require group: testing for group "
                         "membership in \"%s\"",
                         t);
       
      +    /* PR52464 exhaust attrs in base group before checking subgroups */
           for (i = 0; i < sec->groupattr->nelts; i++) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01714)
                             "auth_ldap authorize: require group: testing for %s: "
                             "%s (%s)",
                             ent[i].name,
      @@ -879,68 +924,66 @@ static authz_status ldapgroup_check_authorization(request_rec *r,
       
               result = util_ldap_cache_compare(r, ldc, sec->url, t, ent[i].name,
                                    sec->group_attrib_is_dn ? req->dn : req->user);
      -        switch(result) {
      -            case LDAP_COMPARE_TRUE: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                              "auth_ldap authorize: require group: "
      -                              "authorization successful (attribute %s) "
      -                              "[%s][%d - %s]",
      -                              ent[i].name, ldc->reason, result,
      -                              ldap_err2string(result));
      -                set_request_vars(r, LDAP_AUTHZ);
      -                return AUTHZ_GRANTED;
      -            }
      -            case LDAP_NO_SUCH_ATTRIBUTE:
      -            case LDAP_COMPARE_FALSE: {
      -                /* nested groups need searches and compares, so grab a new handle */
      -                authnz_ldap_cleanup_connection_close(ldc);
      -                apr_pool_cleanup_kill(r->pool, ldc,authnz_ldap_cleanup_connection_close);
      -
      -                ldc = get_connection_for_authz(r, LDAP_COMPARE_AND_SEARCH);
      -                apr_pool_cleanup_register(r->pool, ldc,
      -                                          authnz_ldap_cleanup_connection_close,
      -                                          apr_pool_cleanup_null);
      -
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                               "auth_ldap authorise: require group \"%s\": "
      -                               "failed [%s][%d - %s], checking sub-groups",
      -                               t, ldc->reason, result, ldap_err2string(result));
      -
      -                result = util_ldap_cache_check_subgroups(r, ldc, sec->url, t, ent[i].name,
      -                                                         sec->group_attrib_is_dn ? req->dn : req->user,
      -                                                         sec->sgAttributes[0] ? sec->sgAttributes : default_attributes,
      -                                                         sec->subgroupclasses,
      -                                                         0, sec->maxNestingDepth);
      -                if(result == LDAP_COMPARE_TRUE) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                  "auth_ldap authorise: require group "
      -                                  "(sub-group): authorisation successful "
      -                                  "(attribute %s) [%s][%d - %s]",
      -                                  ent[i].name, ldc->reason, result,
      -                                  ldap_err2string(result));
      -                    set_request_vars(r, LDAP_AUTHZ);
      -                    return AUTHZ_GRANTED;
      -                }
      -                else {
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                  "auth_ldap authorise: require group "
      -                                  "(sub-group) \"%s\": authorisation failed "
      -                                  "[%s][%d - %s]",
      -                                  t, ldc->reason, result,
      -                                  ldap_err2string(result));
      -                }
      -                break;
      -            }
      -            default: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        if (result == LDAP_COMPARE_TRUE) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01715)
      +                          "auth_ldap authorize: require group: "
      +                          "authorization successful (attribute %s) "
      +                          "[%s][%d - %s]",
      +                          ent[i].name, ldc->reason, result,
      +                          ldap_err2string(result));
      +            set_request_vars(r, LDAP_AUTHZ);
      +            return AUTHZ_GRANTED;
      +        }
      +        else { 
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01719)
                                     "auth_ldap authorize: require group \"%s\": "
      -                              "authorization failed [%s][%d - %s]",
      -                              t, ldc->reason, result, ldap_err2string(result));
      -            }
      +                              "didn't match with attr %s [%s][%d - %s]",
      +                              t, ent[i].name, ldc->reason, result, 
      +                              ldap_err2string(result));
               }
           }
      +    
      +    for (i = 0; i < sec->groupattr->nelts; i++) {
      +        /* nested groups need searches and compares, so grab a new handle */
      +        authnz_ldap_cleanup_connection_close(ldc);
      +        apr_pool_cleanup_kill(r->pool, ldc,authnz_ldap_cleanup_connection_close);
      +
      +        ldc = get_connection_for_authz(r, LDAP_COMPARE_AND_SEARCH);
      +        apr_pool_cleanup_register(r->pool, ldc,
      +                                  authnz_ldap_cleanup_connection_close,
      +                                  apr_pool_cleanup_null);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01716)
      +                       "auth_ldap authorise: require group \"%s\": "
      +                       "failed [%s][%d - %s], checking sub-groups",
      +                       t, ldc->reason, result, ldap_err2string(result));
      +
      +        result = util_ldap_cache_check_subgroups(r, ldc, sec->url, t, ent[i].name,
      +                                                 sec->group_attrib_is_dn ? req->dn : req->user,
      +                                                 sec->sgAttributes[0] ? sec->sgAttributes : default_attributes,
      +                                                 sec->subgroupclasses,
      +                                                 0, sec->maxNestingDepth);
      +        if (result == LDAP_COMPARE_TRUE) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01717)
      +                          "auth_ldap authorise: require group "
      +                          "(sub-group): authorisation successful "
      +                          "(attribute %s) [%s][%d - %s]",
      +                          ent[i].name, ldc->reason, result,
      +                          ldap_err2string(result));
      +            set_request_vars(r, LDAP_AUTHZ);
      +            return AUTHZ_GRANTED;
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01718)
      +                          "auth_ldap authorise: require group "
      +                          "(sub-group) \"%s\": didn't match with attr %s "
      +                          "[%s][%d - %s]",
      +                          t, ldc->reason, ent[i].name, result, 
      +                          ldap_err2string(result));
      +        }
      +    }
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01720)
                         "auth_ldap authorize group: authorization denied for "
                         "user %s to %s",
                         r->user, r->uri);
      @@ -960,6 +1003,10 @@ static authz_status ldapdn_check_authorization(request_rec *r,
       
           util_ldap_connection_t *ldc = NULL;
       
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
       
           char filtbuf[FILTER_LENGTH];
      @@ -980,7 +1027,7 @@ static authz_status ldapdn_check_authorization(request_rec *r,
                                         apr_pool_cleanup_null);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01721)
                             "auth_ldap authorize: no sec->host - weird...?");
               return AUTHZ_DENIED;
           }
      @@ -992,13 +1039,13 @@ static authz_status ldapdn_check_authorization(request_rec *r,
            */
       
           if (!strlen(r->user)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01722)
                   "ldap authorize: Userid is blank, AuthType=%s",
                   r->ap_auth_type);
           }
       
           if(!req) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01723)
                   "ldap authorize: Creating LDAP req structure");
       
               req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
      @@ -1012,7 +1059,7 @@ static authz_status ldapdn_check_authorization(request_rec *r,
       
               /* Search failed, log error and return failure */
               if(result != LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01724)
                       "auth_ldap authorise: User DN not found with filter %s: %s", filtbuf, ldc->reason);
                   return AUTHZ_DENIED;
               }
      @@ -1022,10 +1069,18 @@ static authz_status ldapdn_check_authorization(request_rec *r,
               req->user = r->user;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02587)
      +                      "auth_ldap authorize: require dn: Can't evaluate expression: %s",
      +                      err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
       
           if (req->dn == NULL || strlen(req->dn) == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01725)
                             "auth_ldap authorize: require dn: user's DN has not "
                             "been defined; failing authorization");
               return AUTHZ_DENIED;
      @@ -1034,14 +1089,14 @@ static authz_status ldapdn_check_authorization(request_rec *r,
           result = util_ldap_cache_comparedn(r, ldc, sec->url, req->dn, t, sec->compare_dn_on_server);
           switch(result) {
               case LDAP_COMPARE_TRUE: {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01726)
                                 "auth_ldap authorize: "
                                 "require dn: authorization successful");
                   set_request_vars(r, LDAP_AUTHZ);
                   return AUTHZ_GRANTED;
               }
               default: {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01727)
                                 "auth_ldap authorize: "
                                 "require dn \"%s\": LDAP error [%s][%s]",
                                 t, ldc->reason, ldap_err2string(result));
      @@ -1049,7 +1104,7 @@ static authz_status ldapdn_check_authorization(request_rec *r,
           }
       
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01728)
                         "auth_ldap authorize dn: authorization denied for "
                         "user %s to %s",
                         r->user, r->uri);
      @@ -1069,6 +1124,10 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
       
           util_ldap_connection_t *ldc = NULL;
       
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
           char *w, *value;
       
      @@ -1090,7 +1149,7 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
                                         apr_pool_cleanup_null);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01729)
                             "auth_ldap authorize: no sec->host - weird...?");
               return AUTHZ_DENIED;
           }
      @@ -1102,13 +1161,13 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
            */
       
           if (!strlen(r->user)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01730)
                   "ldap authorize: Userid is blank, AuthType=%s",
                   r->ap_auth_type);
           }
       
           if(!req) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01731)
                   "ldap authorize: Creating LDAP req structure");
       
               req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
      @@ -1122,7 +1181,7 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
       
               /* Search failed, log error and return failure */
               if(result != LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01732)
                       "auth_ldap authorise: User DN not found with filter %s: %s", filtbuf, ldc->reason);
                   return AUTHZ_DENIED;
               }
      @@ -1133,31 +1192,40 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
           }
       
           if (req->dn == NULL || strlen(req->dn) == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01733)
                             "auth_ldap authorize: require ldap-attribute: user's DN "
                             "has not been defined; failing authorization");
               return AUTHZ_DENIED;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02588)
      +                      "auth_ldap authorize: require ldap-attribute: Can't "
      +                      "evaluate expression: %s", err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
      +
           while (t[0]) {
               w = ap_getword(r->pool, &t, '=');
               value = ap_getword_conf(r->pool, &t);
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01734)
                             "auth_ldap authorize: checking attribute %s has value %s",
                             w, value);
               result = util_ldap_cache_compare(r, ldc, sec->url, req->dn, w, value);
               switch(result) {
                   case LDAP_COMPARE_TRUE: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01735)
                                     "auth_ldap authorize: "
                                     "require attribute: authorization successful");
                       set_request_vars(r, LDAP_AUTHZ);
                       return AUTHZ_GRANTED;
                   }
                   default: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01736)
                                     "auth_ldap authorize: require attribute: "
                                     "authorization failed [%s][%s]",
                                     ldc->reason, ldap_err2string(result));
      @@ -1165,7 +1233,7 @@ static authz_status ldapattribute_check_authorization(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01737)
                         "auth_ldap authorize attribute: authorization denied for "
                         "user %s to %s",
                         r->user, r->uri);
      @@ -1184,6 +1252,11 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
               (authn_ldap_config_t *)ap_get_module_config(r->per_dir_config, &authnz_ldap_module);
       
           util_ldap_connection_t *ldc = NULL;
      +
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
       
           char filtbuf[FILTER_LENGTH];
      @@ -1204,7 +1277,7 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
                                         apr_pool_cleanup_null);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01738)
                             "auth_ldap authorize: no sec->host - weird...?");
               return AUTHZ_DENIED;
           }
      @@ -1216,13 +1289,13 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
            */
       
           if (!strlen(r->user)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01739)
                   "ldap authorize: Userid is blank, AuthType=%s",
                   r->ap_auth_type);
           }
       
           if(!req) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01740)
                   "ldap authorize: Creating LDAP req structure");
       
               req = (authn_ldap_request_t *)apr_pcalloc(r->pool,
      @@ -1236,7 +1309,7 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
       
               /* Search failed, log error and return failure */
               if(result != LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01741)
                       "auth_ldap authorise: User DN not found with filter %s: %s", filtbuf, ldc->reason);
                   return AUTHZ_DENIED;
               }
      @@ -1247,16 +1320,24 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
           }
       
           if (req->dn == NULL || strlen(req->dn) == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01742)
                             "auth_ldap authorize: require ldap-filter: user's DN "
                             "has not been defined; failing authorization");
               return AUTHZ_DENIED;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02589)
      +                      "auth_ldap authorize: require ldap-filter: Can't "
      +                      "evaluate require expression: %s", err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
       
           if (t[0]) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01743)
                             "auth_ldap authorize: checking filter %s", t);
       
               /* Build the username filter */
      @@ -1268,7 +1349,7 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
       
               /* Make sure that the filtered search returned the correct user dn */
               if (result == LDAP_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01744)
                                 "auth_ldap authorize: checking dn match %s", dn);
                   if (sec->compare_as_user) {
                       /* ldap-filter is the only authz that requires a search and a compare */
      @@ -1282,21 +1363,21 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
       
               switch(result) {
                   case LDAP_COMPARE_TRUE: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01745)
                                     "auth_ldap authorize: require ldap-filter: "
                                     "authorization successful");
                       set_request_vars(r, LDAP_AUTHZ);
                       return AUTHZ_GRANTED;
                   }
                   case LDAP_FILTER_ERROR: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01746)
                                     "auth_ldap authorize: require ldap-filter: "
                                     "%s authorization failed [%s][%s]",
                                     filtbuf, ldc->reason, ldap_err2string(result));
                       break;
                   }
                   default: {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01747)
                                     "auth_ldap authorize: require ldap-filter: "
                                     "authorization failed [%s][%s]",
                                     ldc->reason, ldap_err2string(result));
      @@ -1304,7 +1385,7 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01748)
                         "auth_ldap authorize filter: authorization denied for "
                         "user %s to %s",
                         r->user, r->uri);
      @@ -1312,6 +1393,25 @@ static authz_status ldapfilter_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      +static const char *ldap_parse_config(cmd_parms *cmd, const char *require_line,
      +                                     const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +            &expr_err, NULL);
      +
      +    if (expr_err)
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       
       /*
        * Use the ldap url parsing routines to break up the ldap url into
      @@ -1444,7 +1544,7 @@ static const char *mod_auth_ldap_set_deref(cmd_parms *cmd, void *config, const c
               sec->deref = always;
           }
           else {
      -        return "Unrecognized value for AuthLDAPAliasDereference directive";
      +        return "Unrecognized value for AuthLDAPDereferenceAliases directive";
           }
           return NULL;
       }
      @@ -1527,7 +1627,44 @@ static const char *set_bind_pattern(cmd_parms *cmd, void *_cfg, const char *exp,
           }
       
           sec->bind_regex = regexp;
      -    sec->bind_subst = apr_pstrdup(cmd->pool, subst);
      +    sec->bind_subst = subst;
      +
      +    return NULL;
      +}
      +
      +static const char *set_bind_password(cmd_parms *cmd, void *_cfg, const char *arg)
      +{
      +    authn_ldap_config_t *sec = _cfg;
      +    int arglen = strlen(arg);
      +    char **argv;
      +    char *result;
      +
      +    if ((arglen > 5) && strncmp(arg, "exec:", 5) == 0) {
      +        if (apr_tokenize_to_argv(arg+5, &argv, cmd->temp_pool) != APR_SUCCESS) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Unable to parse exec arguments from ",
      +                               arg+5, NULL);
      +        }
      +        argv[0] = ap_server_root_relative(cmd->temp_pool, argv[0]);
      +
      +        if (!argv[0]) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Invalid AuthLDAPBindPassword exec location:",
      +                               arg+5, NULL);
      +        }
      +        result = ap_get_exec_line(cmd->pool,
      +                                  (const char*)argv[0], (const char * const *)argv);
      +
      +        if (!result) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Unable to get bind password from exec of ",
      +                               arg+5, NULL);
      +        }
      +        sec->bindpw = result;
      +    }
      +    else {
      +        sec->bindpw = (char *)arg;
      +    }
       
           return NULL;
       }
      @@ -1562,8 +1699,7 @@ static const command_rec authnz_ldap_cmds[] =
                         (void *)APR_OFFSETOF(authn_ldap_config_t, binddn), OR_AUTHCFG,
                         "DN to use to bind to LDAP server. If not provided, will do an anonymous bind."),
       
      -    AP_INIT_TAKE1("AuthLDAPBindPassword", ap_set_string_slot,
      -                  (void *)APR_OFFSETOF(authn_ldap_config_t, bindpw), OR_AUTHCFG,
      +    AP_INIT_TAKE1("AuthLDAPBindPassword", set_bind_password, NULL, OR_AUTHCFG,
                         "Password to use to bind to LDAP server. If not provided, will do an anonymous bind."),
       
           AP_INIT_FLAG("AuthLDAPBindAuthoritative", ap_set_flag_slot,
      @@ -1660,8 +1796,8 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
           {
               if (!util_ldap_ssl_supported(s))
               {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "LDAP: SSL connections (ldaps://) not supported by utilLDAP");
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(03159)
      +                         "LDAP: SSL connections (ldaps://) not supported by utilLDAP");
                   return(!OK);
               }
           }
      @@ -1669,7 +1805,7 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
       
           /* make sure that mod_ldap (util_ldap) is loaded */
           if (ap_find_linked_module("util_ldap.c") == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01749)
                            "Module mod_ldap missing. Mod_ldap (aka. util_ldap) "
                            "must be loaded in order for mod_authnz_ldap to function properly");
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1682,7 +1818,7 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
       
           charset_confname = ap_server_root_relative(p, charset_confname);
           if (!charset_confname) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, APLOGNO(01750)
                            "Invalid charset conversion config path %s",
                            (const char *)ap_get_module_config(s->module_config,
                                                               &authnz_ldap_module));
      @@ -1690,7 +1826,7 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
           }
           if ((status = ap_pcfg_openfile(&f, ptemp, charset_confname))
                       != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, s, APLOGNO(01751)
                            "could not open charset conversion config file %s.",
                            charset_confname);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1717,7 +1853,7 @@ static int authnz_ldap_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *
       
           to_charset = derive_codepage_from_lang (p, "utf-8");
           if (to_charset == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, s, APLOGNO(01752)
                            "could not find the UTF-8 charset in the file %s.",
                            charset_confname);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1734,30 +1870,30 @@ static const authn_provider authn_ldap_provider =
       static const authz_provider authz_ldapuser_provider =
       {
           &ldapuser_check_authorization,
      -    NULL,
      +    &ldap_parse_config,
       };
       static const authz_provider authz_ldapgroup_provider =
       {
           &ldapgroup_check_authorization,
      -    NULL,
      +    &ldap_parse_config,
       };
       
       static const authz_provider authz_ldapdn_provider =
       {
           &ldapdn_check_authorization,
      -    NULL,
      +    &ldap_parse_config,
       };
       
       static const authz_provider authz_ldapattribute_provider =
       {
           &ldapattribute_check_authorization,
      -    NULL,
      +    &ldap_parse_config,
       };
       
       static const authz_provider authz_ldapfilter_provider =
       {
           &ldapfilter_check_authorization,
      -    NULL,
      +    &ldap_parse_config,
       };
       
       static void ImportULDAPOptFn(void)
      diff --git a/modules/aaa/mod_authnz_ldap.dep b/modules/aaa/mod_authnz_ldap.dep
      new file mode 100644
      index 00000000000..906e060472e
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_ldap.dep
      @@ -0,0 +1,70 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authnz_ldap.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authnz_ldap.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_init.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_option.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_rebind.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_url.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_rmm.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authnz_ldap.mak b/modules/aaa/mod_authnz_ldap.mak
      new file mode 100644
      index 00000000000..96cc0448afd
      --- /dev/null
      +++ b/modules/aaa/mod_authnz_ldap.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authnz_ldap.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authnz_ldap - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_authnz_ldap - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authnz_ldap - Win32 Release" && "$(CFG)" != "mod_authnz_ldap - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authnz_ldap.mak" CFG="mod_authnz_ldap - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authnz_ldap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authnz_ldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authnz_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_ldap - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authnz_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_ldap - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authnz_ldap.obj"
      +	-@erase "$(INTDIR)\mod_authnz_ldap.res"
      +	-@erase "$(INTDIR)\mod_authnz_ldap_src.idb"
      +	-@erase "$(INTDIR)\mod_authnz_ldap_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.exp"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.lib"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../ldap" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "LDAP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authnz_ldap_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authnz_ldap.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authnz_ldap.so" /d LONG_NAME="authnz_ldap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authnz_ldap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authnz_ldap.pdb" /debug /out:"$(OUTDIR)\mod_authnz_ldap.so" /implib:"$(OUTDIR)\mod_authnz_ldap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_ldap.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authnz_ldap.obj" \
      +	"$(INTDIR)\mod_authnz_ldap.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"..\ldap\Release\mod_ldap.lib"
      +
      +"$(OUTDIR)\mod_authnz_ldap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authnz_ldap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authnz_ldap.so"
      +   if exist .\Release\mod_authnz_ldap.so.manifest mt.exe -manifest .\Release\mod_authnz_ldap.so.manifest -outputresource:.\Release\mod_authnz_ldap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authnz_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_ldap - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authnz_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_ldap - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authnz_ldap.obj"
      +	-@erase "$(INTDIR)\mod_authnz_ldap.res"
      +	-@erase "$(INTDIR)\mod_authnz_ldap_src.idb"
      +	-@erase "$(INTDIR)\mod_authnz_ldap_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.exp"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.lib"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.pdb"
      +	-@erase "$(OUTDIR)\mod_authnz_ldap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../ldap" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "LDAP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authnz_ldap_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authnz_ldap.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authnz_ldap.so" /d LONG_NAME="authnz_ldap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authnz_ldap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authnz_ldap.pdb" /debug /out:"$(OUTDIR)\mod_authnz_ldap.so" /implib:"$(OUTDIR)\mod_authnz_ldap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authnz_ldap.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authnz_ldap.obj" \
      +	"$(INTDIR)\mod_authnz_ldap.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"..\ldap\Debug\mod_ldap.lib"
      +
      +"$(OUTDIR)\mod_authnz_ldap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authnz_ldap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authnz_ldap.so"
      +   if exist .\Debug\mod_authnz_ldap.so.manifest mt.exe -manifest .\Debug\mod_authnz_ldap.so.manifest -outputresource:.\Debug\mod_authnz_ldap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authnz_ldap.dep")
      +!INCLUDE "mod_authnz_ldap.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authnz_ldap.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authnz_ldap - Win32 Release" || "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +"mod_ldap - Win32 Release" : 
      +   cd ".\..\ldap"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_ldap.mak" CFG="mod_ldap - Win32 Release" 
      +   cd "..\aaa"
      +
      +"mod_ldap - Win32 ReleaseCLEAN" : 
      +   cd ".\..\ldap"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_ldap.mak" CFG="mod_ldap - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +"mod_ldap - Win32 Debug" : 
      +   cd ".\..\ldap"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_ldap.mak" CFG="mod_ldap - Win32 Debug" 
      +   cd "..\aaa"
      +
      +"mod_ldap - Win32 DebugCLEAN" : 
      +   cd ".\..\ldap"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_ldap.mak" CFG="mod_ldap - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authnz_ldap - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authnz_ldap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authnz_ldap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authnz_ldap.so" /d LONG_NAME="authnz_ldap_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authnz_ldap - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authnz_ldap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authnz_ldap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authnz_ldap.so" /d LONG_NAME="authnz_ldap_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authnz_ldap.c
      +
      +"$(INTDIR)\mod_authnz_ldap.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_core.c b/modules/aaa/mod_authz_core.c
      index 65039718060..c5e5969182a 100644
      --- a/modules/aaa/mod_authz_core.c
      +++ b/modules/aaa/mod_authz_core.c
      @@ -168,6 +168,13 @@ static void *merge_authz_core_dir_config(apr_pool_t *p,
           return (void*)conf;
       }
       
      +/* Only per-server directive we have is GLOBAL_ONLY */
      +static void *merge_authz_core_svr_config(apr_pool_t *p,
      +                                         void *basev, void *newv)
      +{
      +    return basev;
      +}
      +
       static void *create_authz_core_svr_config(apr_pool_t *p, server_rec *s)
       {
           authz_core_srv_conf *authcfg;
      @@ -189,7 +196,7 @@ static authz_status authz_alias_check_authorization(request_rec *r,
           authz_status ret = AUTHZ_DENIED;
       
           /* Look up the provider alias in the alias list.
      -     * Get the the dir_config and call ap_Merge_per_dir_configs()
      +     * Get the dir_config and call ap_Merge_per_dir_configs()
            * Call the real provider->check_authorization() function
            * return the result of the above function call
            */
      @@ -221,6 +228,14 @@ static authz_status authz_alias_check_authorization(request_rec *r,
       
                   r->per_dir_config = orig_dir_config;
               }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02305)
      +                          "no alias provider found for '%s' (BUG?)",
      +                          provider_name);
      +        }
      +    }
      +    else {
      +        ap_assert(provider_name != NULL);
           }
       
           return ret;
      @@ -305,6 +320,14 @@ static const char *authz_require_alias_section(cmd_parms *cmd, void *mconfig,
                                       "Unknown Authz provider: %s",
                                       provider_name);
               }
      +        if (prvdraliasrec->provider->parse_require_line) {
      +            err = prvdraliasrec->provider->parse_require_line(cmd,
      +                         provider_args, &prvdraliasrec->provider_parsed_args);
      +            if (err)
      +                return apr_psprintf(cmd->pool,
      +                                    "Can't parse 'Require %s %s': %s",
      +                                    provider_name, provider_args, err);
      +        }
       
               authcfg = ap_get_module_config(cmd->server->module_config,
                                              &authz_core_module);
      @@ -397,8 +420,14 @@ static const char *add_authz_provider(cmd_parms *cmd, void *config,
           section->limited = cmd->limited;
       
           if (section->provider->parse_require_line) {
      -        const char *err = section->provider->parse_require_line(cmd, args,
      -                                                                &section->provider_parsed_args);
      +        const char *err;
      +        apr_pool_userdata_setn(section->provider_name,
      +                               AUTHZ_PROVIDER_NAME_NOTE,
      +                               apr_pool_cleanup_null,
      +                               cmd->temp_pool);
      +        err = section->provider->parse_require_line(cmd, args,
      +                                              &section->provider_parsed_args);
      +
               if (err)
                   return err;
           }
      @@ -606,13 +635,10 @@ static int authz_core_check_section(apr_pool_t *p, server_rec *s,
           }
       
           if (ret != OK) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, APR_SUCCESS, s,
      -                     "%s",
      -                     apr_pstrcat(p, (is_conf
      -                                     ? "<Directory>, <Location>, or similar"
      -                                     : format_authz_command(p, section)),
      -                                 " directive contains only negative "
      -                                 "authorization directives", NULL));
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, APR_SUCCESS, s, APLOGNO(01624)
      +                     "%s directive contains only negative authorization directives",
      +                     is_conf ? "<Directory>, <Location>, or similar"
      +                             : format_authz_command(p, section));
           }
       
           return ret;
      @@ -695,7 +721,7 @@ static authz_status apply_authz_sections(request_rec *r,
               auth_result =
                   (parent_op == AUTHZ_LOGIC_AND) ? AUTHZ_GRANTED : AUTHZ_NEUTRAL;
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(01625)
                             "authorization result of %s: %s "
                             "(directive limited to other methods)",
                             format_authz_command(r->pool, section),
      @@ -777,7 +803,7 @@ static authz_status apply_authz_sections(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(01626)
                         "authorization result of %s: %s",
                         format_authz_command(r->pool, section),
                         format_authz_result(auth_result));
      @@ -798,14 +824,14 @@ static int authorize_user_core(request_rec *r, int after_authn)
                    * directives applied to support it
                    */
       
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01627)
                                 "AuthType configured with no corresponding "
                                 "authorization directives");
       
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(01628)
                             "authorization result: granted (no directives)");
       
               return OK;
      @@ -818,7 +844,7 @@ static int authorize_user_core(request_rec *r, int after_authn)
           }
           else if (auth_result == AUTHZ_DENIED_NO_USER) {
               if (after_authn) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01629)
                                 "authorization failure (no authenticated user): %s",
                                 r->uri);
                   /*
      @@ -841,7 +867,7 @@ static int authorize_user_core(request_rec *r, int after_authn)
           }
           else if (auth_result == AUTHZ_DENIED || auth_result == AUTHZ_NEUTRAL) {
               if (!after_authn || ap_auth_type(r) == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01630)
                                 "client denied by server configuration: %s%s",
                                 r->filename ? "" : "uri ",
                                 r->filename ? r->filename : r->uri);
      @@ -849,7 +875,7 @@ static int authorize_user_core(request_rec *r, int after_authn)
                   return HTTP_FORBIDDEN;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r, APLOGNO(01631)
                                 "user %s: authorization failure for \"%s\": ",
                                 r->user, r->uri);
       
      @@ -950,7 +976,7 @@ static const char *all_parse_config(cmd_parms *cmd, const char *require_line,
           /*
            * If the argument to the 'all' provider is 'granted' then just let
            * everybody in. This would be equivalent to the previous syntax of
      -     * 'allow from all'. If the argument is 'denied' we reject everbody,
      +     * 'allow from all'. If the argument is 'denied' we reject everybody,
            * which is equivalent to 'deny from all'.
            */
           if (strcasecmp(require_line, "granted") == 0) {
      @@ -1015,36 +1041,84 @@ static const authz_provider authz_method_provider =
           &method_parse_config,
       };
       
      -static authz_status expr_check_authorization(request_rec *r,
      -                                             const char *require_line,
      -                                             const void *parsed_require_line)
      -{
      -    const char *err = NULL;
      -    const ap_expr_info_t *expr = parsed_require_line;
      -    int rc = ap_expr_exec(r, expr, &err);
      +/*
      + * expr authz provider
      + */
       
      -    if (rc <= 0)
      -        /* XXX: real error handling? */
      -        return AUTHZ_DENIED;
      -    else
      -        return AUTHZ_GRANTED;
      +#define REQUIRE_EXPR_NOTE "Require_expr_info"
      +struct require_expr_info {
      +    ap_expr_info_t *expr;
      +    int want_user;
      +};
      +
      +static int expr_lookup_fn(ap_expr_lookup_parms *parms)
      +{
      +    if (parms->type == AP_EXPR_FUNC_VAR
      +        && strcasecmp(parms->name, "REMOTE_USER") == 0) {
      +        struct require_expr_info *info;
      +        apr_pool_userdata_get((void**)&info, REQUIRE_EXPR_NOTE, parms->ptemp);
      +        AP_DEBUG_ASSERT(info != NULL);
      +        info->want_user = 1;
      +    }
      +    return ap_expr_lookup_default(parms);
       }
       
       static const char *expr_parse_config(cmd_parms *cmd, const char *require_line,
                                            const void **parsed_require_line)
       {
           const char *expr_err = NULL;
      -    ap_expr_info_t *expr = ap_expr_parse_cmd(cmd, require_line, 0, &expr_err,
      -                                             NULL);
      +    struct require_expr_info *info = apr_pcalloc(cmd->pool, sizeof(*info));
      +
      +    /* if the expression happens to be surrounded by quotes, skip them */
      +    if (require_line[0] == '"') {
      +        apr_size_t len = strlen(require_line);
      +
      +        if (require_line[len-1] == '"')
      +            require_line = apr_pstrndup(cmd->temp_pool,
      +                                        require_line + 1,
      +                                        len - 2);
      +    }
      +
      +    apr_pool_userdata_setn(info, REQUIRE_EXPR_NOTE, apr_pool_cleanup_null,
      +                          cmd->temp_pool);
      +    info->expr = ap_expr_parse_cmd(cmd, require_line, 0, &expr_err,
      +                                   expr_lookup_fn);
       
           if (expr_err)
      -        return "Cannot parse expression in require line";
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
       
      -    *parsed_require_line = expr;
      +    *parsed_require_line = info;
       
           return NULL;
       }
       
      +static authz_status expr_check_authorization(request_rec *r,
      +                                             const char *require_line,
      +                                             const void *parsed_require_line)
      +{
      +    const char *err = NULL;
      +    const struct require_expr_info *info = parsed_require_line;
      +    int rc = ap_expr_exec(r, info->expr, &err);
      +
      +    if (rc < 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02320)
      +                      "Error evaluating expression in 'Require expr': %s",
      +                      err);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +    else if (rc == 0) {
      +        if (info->want_user)
      +            return AUTHZ_DENIED_NO_USER;
      +        else
      +            return AUTHZ_DENIED;
      +    }
      +    else {
      +        return AUTHZ_GRANTED;
      +    }
      +}
      +
       static const authz_provider authz_expr_provider =
       {
           &expr_check_authorization,
      @@ -1083,7 +1157,7 @@ AP_DECLARE_MODULE(authz_core) =
           create_authz_core_dir_config,   /* dir config creater */
           merge_authz_core_dir_config,    /* dir merger */
           create_authz_core_svr_config,   /* server config */
      -    NULL,                           /* merge server config */
      +    merge_authz_core_svr_config ,   /* merge server config */
           authz_cmds,
           register_hooks                  /* register hooks */
       };
      diff --git a/modules/aaa/mod_authz_core.dep b/modules/aaa/mod_authz_core.dep
      new file mode 100644
      index 00000000000..04300cc9d81
      --- /dev/null
      +++ b/modules/aaa/mod_authz_core.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_core.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_core.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authz_core.dsp b/modules/aaa/mod_authz_core.dsp
      index e5f60ff9e85..8e9f1248cca 100644
      --- a/modules/aaa/mod_authz_core.dsp
      +++ b/modules/aaa/mod_authz_core.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_default_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_default_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/aaa/mod_authz_core.mak b/modules/aaa/mod_authz_core.mak
      new file mode 100644
      index 00000000000..7351f674ae3
      --- /dev/null
      +++ b/modules/aaa/mod_authz_core.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_core.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_core - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_core - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_core - Win32 Release" && "$(CFG)" != "mod_authz_core - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_core.mak" CFG="mod_authz_core - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_core - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_core - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_core.obj"
      +	-@erase "$(INTDIR)\mod_authz_core.res"
      +	-@erase "$(INTDIR)\mod_authz_core_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_core_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_core.exp"
      +	-@erase "$(OUTDIR)\mod_authz_core.lib"
      +	-@erase "$(OUTDIR)\mod_authz_core.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_core.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_core_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_core.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_core.pdb" /debug /out:"$(OUTDIR)\mod_authz_core.so" /implib:"$(OUTDIR)\mod_authz_core.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_core.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_core.obj" \
      +	"$(INTDIR)\mod_authz_core.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_core.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_core.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_core.so"
      +   if exist .\Release\mod_authz_core.so.manifest mt.exe -manifest .\Release\mod_authz_core.so.manifest -outputresource:.\Release\mod_authz_core.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_core.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_core.obj"
      +	-@erase "$(INTDIR)\mod_authz_core.res"
      +	-@erase "$(INTDIR)\mod_authz_core_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_core_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_core.exp"
      +	-@erase "$(OUTDIR)\mod_authz_core.lib"
      +	-@erase "$(OUTDIR)\mod_authz_core.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_core.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_core_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_core.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_core.pdb" /debug /out:"$(OUTDIR)\mod_authz_core.so" /implib:"$(OUTDIR)\mod_authz_core.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_core.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_core.obj" \
      +	"$(INTDIR)\mod_authz_core.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_core.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_core.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_core.so"
      +   if exist .\Debug\mod_authz_core.so.manifest mt.exe -manifest .\Debug\mod_authz_core.so.manifest -outputresource:.\Debug\mod_authz_core.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_core.dep")
      +!INCLUDE "mod_authz_core.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_core.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_core - Win32 Release" || "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_core - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_core.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_core - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_core.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_core.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_core.so" /d LONG_NAME="authz_core_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_core.c
      +
      +"$(INTDIR)\mod_authz_core.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_dbd.c b/modules/aaa/mod_authz_dbd.c
      index e9a67ae1e72..52aab3809a2 100644
      --- a/modules/aaa/mod_authz_dbd.c
      +++ b/modules/aaa/mod_authz_dbd.c
      @@ -61,6 +61,7 @@ static void *authz_dbd_cr_cfg(apr_pool_t *pool, char *dummy)
           ret->redirect = -1;
           return ret;
       }
      +
       static void *authz_dbd_merge_cfg(apr_pool_t *pool, void *BASE, void *ADD)
       {
           authz_dbd_cfg *base = BASE;
      @@ -73,6 +74,7 @@ static void *authz_dbd_merge_cfg(apr_pool_t *pool, void *BASE, void *ADD)
           ret->redirect = (add->redirect == -1) ? base->redirect : add->redirect;
           return ret;
       }
      +
       static const char *authz_dbd_prepare(cmd_parms *cmd, void *cfg,
                                            const char *query)
       {
      @@ -96,6 +98,7 @@ static const char *authz_dbd_prepare(cmd_parms *cmd, void *cfg,
           /* save the label here for our own use */
           return ap_set_string_slot(cmd, cfg, label);
       }
      +
       static const command_rec authz_dbd_cmds[] = {
           AP_INIT_FLAG("AuthzDBDLoginToReferer", ap_set_flag_slot,
                        (void*)APR_OFFSETOF(authz_dbd_cfg, redirect), ACCESS_CONF,
      @@ -122,13 +125,20 @@ static int authz_dbd_login(request_rec *r, authz_dbd_cfg *cfg,
           apr_dbd_row_t *row = NULL;
       
           if (cfg->query == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01642)
                             "No query configured for %s!", action);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      +    if (dbd == NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02902)
      +                      "No db handle available for %s! "
      +                      "Check your database access",
      +                      action);
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
           query = apr_hash_get(dbd->prepared, cfg->query, APR_HASH_KEY_STRING);
           if (query == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01643)
                             "Error retrieving Query for %s!", action);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -137,14 +147,14 @@ static int authz_dbd_login(request_rec *r, authz_dbd_cfg *cfg,
                                query, r->user, NULL);
           if (rv == 0) {
               if (nrows != 1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01644)
                                 "authz_dbd: %s of user %s updated %d rows",
                                 action, r->user, nrows);
               }
           }
           else {
               message = apr_dbd_error(dbd->driver, dbd->handle, rv);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01645)
                             "authz_dbd: query for %s failed; user %s [%s]",
                             action, r->user, message?message:noerror);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -158,30 +168,32 @@ static int authz_dbd_login(request_rec *r, authz_dbd_cfg *cfg,
               query = apr_hash_get(dbd->prepared, cfg->redir_query,
                                    APR_HASH_KEY_STRING);
               if (query == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01646)
                                 "authz_dbd: no redirect query!");
                   /* OK, this is non-critical; we can just not-redirect */
               }
      -        else if (apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle, &res,
      -                                  query, 0, r->user, NULL) == 0) {
      +        else if ((rv = apr_dbd_pvselect(dbd->driver, r->pool, dbd->handle,
      +                                        &res, query, 0, r->user, NULL)) == 0) {
                   for (rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1);
                        rv != -1;
                        rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
                       if (rv != 0) {
                           message = apr_dbd_error(dbd->driver, dbd->handle, rv);
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01647)
                                 "authz_dbd in get_row; action=%s user=%s [%s]",
                                 action, r->user, message?message:noerror);
                       }
                       else if (newuri == NULL) {
      -                    newuri = apr_dbd_get_entry(dbd->driver, row, 0);
      +                    newuri =
      +                        apr_pstrdup(r->pool,
      +                                    apr_dbd_get_entry(dbd->driver, row, 0));
                       }
                       /* we can't break out here or row won't get cleaned up */
                   }
               }
               else {
                   message = apr_dbd_error(dbd->driver, dbd->handle, rv);
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01648)
                                 "authz_dbd/redirect for %s of %s [%s]",
                                 action, r->user, message?message:noerror);
               }
      @@ -204,16 +216,21 @@ static int authz_dbd_group_query(request_rec *r, authz_dbd_cfg *cfg,
           apr_dbd_prepared_t *query;
           apr_dbd_results_t *res = NULL;
           apr_dbd_row_t *row = NULL;
      -    const char **group;
       
           if (cfg->query == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01649)
                             "No query configured for dbd-group!");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      +    if (dbd == NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02903)
      +                      "No db handle available for dbd-query! "
      +                      "Check your database access");
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
           query = apr_hash_get(dbd->prepared, cfg->query, APR_HASH_KEY_STRING);
           if (query == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01650)
                             "Error retrieving query for dbd-group!");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -224,12 +241,13 @@ static int authz_dbd_group_query(request_rec *r, authz_dbd_cfg *cfg,
                    rv != -1;
                    rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
                   if (rv == 0) {
      -                group = apr_array_push(groups);
      -                *group = apr_dbd_get_entry(dbd->driver, row, 0);
      +                APR_ARRAY_PUSH(groups, const char *) =
      +                    apr_pstrdup(r->pool,
      +                                apr_dbd_get_entry(dbd->driver, row, 0));
                   }
                   else {
                       message = apr_dbd_error(dbd->driver, dbd->handle, rv);
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01651)
                               "authz_dbd in get_row; group query for user=%s [%s]",
                               r->user, message?message:noerror);
                       return HTTP_INTERNAL_SERVER_ERROR;
      @@ -238,7 +256,7 @@ static int authz_dbd_group_query(request_rec *r, authz_dbd_cfg *cfg,
           }
           else {
               message = apr_dbd_error(dbd->driver, dbd->handle, rv);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01652)
                             "authz_dbd, in groups query for %s [%s]",
                             r->user, message?message:noerror);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -250,9 +268,14 @@ static authz_status dbdgroup_check_authorization(request_rec *r,
                                                        const char *require_args,
                                                        const void *parsed_require_args)
       {
      -    int i, rv;
      +    int rv;
           const char *w;
      -    apr_array_header_t *groups = NULL;
      +    apr_array_header_t *groups;
      +
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
           authz_dbd_cfg *cfg = ap_get_module_config(r->per_dir_config,
                                                     &authz_dbd_module);
      @@ -261,21 +284,25 @@ static authz_status dbdgroup_check_authorization(request_rec *r,
               return AUTHZ_DENIED_NO_USER;
           }
       
      -    if (groups == NULL) {
      -        groups = apr_array_make(r->pool, 4, sizeof(const char*));
      -        rv = authz_dbd_group_query(r, cfg, groups);
      -        if (rv != OK) {
      -            return AUTHZ_GENERAL_ERROR;
      -        }
      +    groups = apr_array_make(r->pool, 4, sizeof(const char*));
      +    rv = authz_dbd_group_query(r, cfg, groups);
      +    if (rv != OK) {
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02590)
      +                      "authz_dbd authorize: require dbd-group: Can't "
      +                      "evaluate require expression: %s", err);
      +        return AUTHZ_DENIED;
           }
       
      -    t = require_args;
      +    t = require;
           while (t[0]) {
               w = ap_getword_white(r->pool, &t);
      -        for (i=0; i < groups->nelts; ++i) {
      -            if (!strcmp(w, ((const char**)groups->elts)[i])) {
      -                return AUTHZ_GRANTED;
      -            }
      +        if (ap_array_str_contains(groups, w)) {
      +            return AUTHZ_GRANTED;
               }
           }
       
      @@ -310,10 +337,30 @@ static authz_status dbdlogout_check_authorization(request_rec *r,
           return (authz_dbd_login(r, cfg, "logout") == OK ? AUTHZ_GRANTED : AUTHZ_DENIED);
       }
       
      +static const char *dbd_parse_config(cmd_parms *cmd, const char *require_line,
      +                                    const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +                             &expr_err, NULL);
      +
      +    if (expr_err) {
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +    }
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       static const authz_provider authz_dbdgroup_provider =
       {
           &dbdgroup_check_authorization,
      -    NULL,
      +    &dbd_parse_config,
       };
       
       static const authz_provider authz_dbdlogin_provider =
      @@ -322,7 +369,6 @@ static const authz_provider authz_dbdlogin_provider =
           NULL,
       };
       
      -
       static const authz_provider authz_dbdlogout_provider =
       {
           &dbdlogout_check_authorization,
      @@ -355,4 +401,3 @@ AP_DECLARE_MODULE(authz_dbd) =
           authz_dbd_cmds,
           authz_dbd_hooks
       };
      -
      diff --git a/modules/aaa/mod_authz_dbd.dep b/modules/aaa/mod_authz_dbd.dep
      new file mode 100644
      index 00000000000..6f0138b2e37
      --- /dev/null
      +++ b/modules/aaa/mod_authz_dbd.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_dbd.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_dbd.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\database\mod_dbd.h"\
      +	".\mod_authz_dbd.h"\
      +	
      diff --git a/modules/aaa/mod_authz_dbd.mak b/modules/aaa/mod_authz_dbd.mak
      new file mode 100644
      index 00000000000..da7a4533501
      --- /dev/null
      +++ b/modules/aaa/mod_authz_dbd.mak
      @@ -0,0 +1,409 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_dbd.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_dbd - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_dbd - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_dbd - Win32 Release" && "$(CFG)" != "mod_authz_dbd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_dbd.mak" CFG="mod_authz_dbd - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dbd - Win32 Release" "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" "mod_dbd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_dbd.obj"
      +	-@erase "$(INTDIR)\mod_authz_dbd.res"
      +	-@erase "$(INTDIR)\mod_authz_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "AUTHZ_DBD_DECLARE_EXPORT" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_dbd_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_dbd.so" /d LONG_NAME="authz_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_dbd.pdb" /debug /out:"$(OUTDIR)\mod_authz_dbd.so" /implib:"$(OUTDIR)\mod_authz_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_dbd.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_dbd.obj" \
      +	"$(INTDIR)\mod_authz_dbd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib" \
      +	"..\database\Release\mod_dbd.lib"
      +
      +"$(OUTDIR)\mod_authz_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_dbd.so"
      +   if exist .\Release\mod_authz_dbd.so.manifest mt.exe -manifest .\Release\mod_authz_dbd.so.manifest -outputresource:.\Release\mod_authz_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dbd - Win32 Debug" "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" "mod_dbd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_dbd.obj"
      +	-@erase "$(INTDIR)\mod_authz_dbd.res"
      +	-@erase "$(INTDIR)\mod_authz_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../database" /D "AUTHZ_DBD_DECLARE_EXPORT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_dbd_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_dbd.so" /d LONG_NAME="authz_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_dbd.pdb" /debug /out:"$(OUTDIR)\mod_authz_dbd.so" /implib:"$(OUTDIR)\mod_authz_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_dbd.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_dbd.obj" \
      +	"$(INTDIR)\mod_authz_dbd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib" \
      +	"..\database\Debug\mod_dbd.lib"
      +
      +"$(OUTDIR)\mod_authz_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_dbd.so"
      +   if exist .\Debug\mod_authz_dbd.so.manifest mt.exe -manifest .\Debug\mod_authz_dbd.so.manifest -outputresource:.\Debug\mod_authz_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_dbd.dep")
      +!INCLUDE "mod_authz_dbd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_dbd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_dbd - Win32 Release" || "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +"mod_dbd - Win32 Release" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" 
      +   cd "..\aaa"
      +
      +"mod_dbd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +"mod_dbd - Win32 Debug" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" 
      +   cd "..\aaa"
      +
      +"mod_dbd - Win32 DebugCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\aaa"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_dbd - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_dbd.so" /d LONG_NAME="authz_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbd - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_dbd.so" /d LONG_NAME="authz_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_dbd.c
      +
      +"$(INTDIR)\mod_authz_dbd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_dbm.c b/modules/aaa/mod_authz_dbm.c
      index 9fadb82a20b..843d9a8e43f 100644
      --- a/modules/aaa/mod_authz_dbm.c
      +++ b/modules/aaa/mod_authz_dbm.c
      @@ -29,14 +29,13 @@
       #include "http_request.h"   /* for ap_hook_(check_user_id | auth_checker)*/
       
       #include "mod_auth.h"
      +#include "mod_authz_owner.h"
       
       typedef struct {
           const char *grpfile;
           const char *dbmtype;
       } authz_dbm_config_rec;
       
      -APR_DECLARE_OPTIONAL_FN(char*, authz_owner_get_file_group, (request_rec *r));
      -
       
       /* This should go into APR; perhaps with some nice
        * caching/locking/flocking of the open dbm file.
      @@ -137,6 +136,11 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
           authz_dbm_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                             &authz_dbm_module);
           char *user = r->user;
      +
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t;
           char *w;
           const char *orig_groups = NULL;
      @@ -149,7 +153,7 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
           }
       
           if (!conf->grpfile) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01798)
                               "No group file was specified in the configuration");
               return AUTHZ_DENIED;
           }
      @@ -162,7 +166,7 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
                                    user, conf->grpfile, conf->dbmtype, &groups);
       
               if (status != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01799)
                                 "could not open dbm (type %s) group access "
                                 "file: %s", conf->dbmtype, conf->grpfile);
                   return AUTHZ_GENERAL_ERROR;
      @@ -170,7 +174,7 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
       
               if (groups == NULL) {
                   /* no groups available, so exit immediately */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01800)
                                 "Authorization of user %s to access %s failed, reason: "
                                 "user doesn't appear in DBM group file (%s).",
                                 r->user, r->uri, conf->grpfile);
      @@ -180,7 +184,15 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
               orig_groups = groups;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02591)
      +                      "authz_dbm authorize: require dbm-group: Can't "
      +                      "evaluate require expression: %s", err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
           while ((w = ap_getword_white(r->pool, &t)) && w[0]) {
               groups = orig_groups;
               while (groups[0]) {
      @@ -191,7 +203,7 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01801)
                         "Authorization of user %s to access %s failed, reason: "
                         "user is not part of the 'require'ed group(s).",
                         r->user, r->uri);
      @@ -199,7 +211,7 @@ static authz_status dbmgroup_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      -APR_OPTIONAL_FN_TYPE(authz_owner_get_file_group) *authz_owner_get_file_group;
      +static APR_OPTIONAL_FN_TYPE(authz_owner_get_file_group) *authz_owner_get_file_group;
       
       static authz_status dbmfilegroup_check_authorization(request_rec *r,
                                                            const char *require_args,
      @@ -210,7 +222,6 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
           char *user = r->user;
           const char *realm = ap_auth_name(r);
           const char *filegroup = NULL;
      -    const char *orig_groups = NULL;
           apr_status_t status;
           const char *groups;
           char *v;
      @@ -220,7 +231,7 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
           }
       
           if (!conf->grpfile) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01802)
                               "No group file was specified in the configuration");
               return AUTHZ_DENIED;
           }
      @@ -230,7 +241,7 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
                                user, conf->grpfile, conf->dbmtype, &groups);
       
           if (status != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01803)
                             "could not open dbm (type %s) group access "
                             "file: %s", conf->dbmtype, conf->grpfile);
               return AUTHZ_DENIED;
      @@ -238,19 +249,16 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
       
           if (groups == NULL) {
               /* no groups available, so exit immediately */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01804)
                             "Authorization of user %s to access %s failed, reason: "
                             "user doesn't appear in DBM group file (%s).",
                             r->user, r->uri, conf->grpfile);
               return AUTHZ_DENIED;
           }
       
      -    orig_groups = groups;
      -
           filegroup = authz_owner_get_file_group(r);
       
           if (filegroup) {
      -        groups = orig_groups;
               while (groups[0]) {
                   v = ap_getword(r->pool, &groups, ',');
                   if (!strcmp(v, filegroup)) {
      @@ -259,7 +267,7 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01805)
                         "Authorization of user %s to access %s failed, reason: "
                         "user is not part of the 'require'ed group(s).",
                         r->user, r->uri);
      @@ -267,10 +275,29 @@ static authz_status dbmfilegroup_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      +static const char *dbm_parse_config(cmd_parms *cmd, const char *require_line,
      +                                     const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +            &expr_err, NULL);
      +
      +    if (expr_err)
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       static const authz_provider authz_dbmgroup_provider =
       {
           &dbmgroup_check_authorization,
      -    NULL,
      +    &dbm_parse_config,
       };
       
       static const authz_provider authz_dbmfilegroup_provider =
      @@ -279,11 +306,13 @@ static const authz_provider authz_dbmfilegroup_provider =
           NULL,
       };
       
      -
      -static void register_hooks(apr_pool_t *p)
      +static void authz_dbm_getfns(void)
       {
           authz_owner_get_file_group = APR_RETRIEVE_OPTIONAL_FN(authz_owner_get_file_group);
      +}
       
      +static void register_hooks(apr_pool_t *p)
      +{
           ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "dbm-group",
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_dbmgroup_provider,
      @@ -292,6 +321,7 @@ static void register_hooks(apr_pool_t *p)
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_dbmfilegroup_provider,
                                     AP_AUTH_INTERNAL_PER_CONF);
      +    ap_hook_optional_fn_retrieve(authz_dbm_getfns, NULL, NULL, APR_HOOK_MIDDLE);
       }
       
       AP_DECLARE_MODULE(authz_dbm) =
      diff --git a/modules/aaa/mod_authz_dbm.dep b/modules/aaa/mod_authz_dbm.dep
      new file mode 100644
      index 00000000000..1b4bf3a6297
      --- /dev/null
      +++ b/modules/aaa/mod_authz_dbm.dep
      @@ -0,0 +1,62 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_dbm.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_dbm.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_authz_owner.h"\
      +	
      diff --git a/modules/aaa/mod_authz_dbm.mak b/modules/aaa/mod_authz_dbm.mak
      new file mode 100644
      index 00000000000..4be17d5bdf7
      --- /dev/null
      +++ b/modules/aaa/mod_authz_dbm.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_dbm.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_dbm - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_dbm - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_dbm - Win32 Release" && "$(CFG)" != "mod_authz_dbm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_dbm.mak" CFG="mod_authz_dbm - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_dbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_dbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_dbm.obj"
      +	-@erase "$(INTDIR)\mod_authz_dbm.res"
      +	-@erase "$(INTDIR)\mod_authz_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_dbm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_dbm.so" /d LONG_NAME="authz_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_dbm.pdb" /debug /out:"$(OUTDIR)\mod_authz_dbm.so" /implib:"$(OUTDIR)\mod_authz_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_dbm.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_dbm.obj" \
      +	"$(INTDIR)\mod_authz_dbm.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_dbm.so"
      +   if exist .\Release\mod_authz_dbm.so.manifest mt.exe -manifest .\Release\mod_authz_dbm.so.manifest -outputresource:.\Release\mod_authz_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_dbm.obj"
      +	-@erase "$(INTDIR)\mod_authz_dbm.res"
      +	-@erase "$(INTDIR)\mod_authz_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_dbm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_dbm.so" /d LONG_NAME="authz_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_dbm.pdb" /debug /out:"$(OUTDIR)\mod_authz_dbm.so" /implib:"$(OUTDIR)\mod_authz_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_dbm.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_dbm.obj" \
      +	"$(INTDIR)\mod_authz_dbm.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_dbm.so"
      +   if exist .\Debug\mod_authz_dbm.so.manifest mt.exe -manifest .\Debug\mod_authz_dbm.so.manifest -outputresource:.\Debug\mod_authz_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_dbm.dep")
      +!INCLUDE "mod_authz_dbm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_dbm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_dbm - Win32 Release" || "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_dbm - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_dbm.so" /d LONG_NAME="authz_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_dbm - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_dbm.so" /d LONG_NAME="authz_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_dbm.c
      +
      +"$(INTDIR)\mod_authz_dbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_groupfile.c b/modules/aaa/mod_authz_groupfile.c
      index 94128f19bc3..76957f71afa 100644
      --- a/modules/aaa/mod_authz_groupfile.c
      +++ b/modules/aaa/mod_authz_groupfile.c
      @@ -18,7 +18,7 @@
        *
        *          AuthGroupFile standard /path/to/file
        *
      - * and the presense of a
      + * and the presence of a
        *
        *         require group <list-of-groups>
        *
      @@ -55,13 +55,12 @@
       #include "util_varbuf.h"
       
       #include "mod_auth.h"
      +#include "mod_authz_owner.h"
       
       typedef struct {
           char *groupfile;
       } authz_groupfile_config_rec;
       
      -APR_DECLARE_OPTIONAL_FN(char*, authz_owner_get_file_group, (request_rec *r));
      -
       static void *create_authz_groupfile_dir_config(apr_pool_t *p, char *d)
       {
           authz_groupfile_config_rec *conf = apr_palloc(p, sizeof(*conf));
      @@ -70,22 +69,12 @@ static void *create_authz_groupfile_dir_config(apr_pool_t *p, char *d)
           return conf;
       }
       
      -static const char *set_authz_groupfile_slot(cmd_parms *cmd, void *offset, const char *f,
      -                                 const char *t)
      -{
      -    if (t && strcmp(t, "standard")) {
      -        return apr_pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL);
      -    }
      -
      -    return ap_set_file_slot(cmd, offset, f);
      -}
      -
       static const command_rec authz_groupfile_cmds[] =
       {
      -    AP_INIT_TAKE12("AuthGroupFile", set_authz_groupfile_slot,
      -                   (void *)APR_OFFSETOF(authz_groupfile_config_rec, groupfile),
      -                   OR_AUTHCFG,
      -                   "text file containing group names and member user IDs"),
      +    AP_INIT_TAKE1("AuthGroupFile", ap_set_file_slot,
      +                  (void *)APR_OFFSETOF(authz_groupfile_config_rec, groupfile),
      +                  OR_AUTHCFG,
      +                  "text file containing group names and member user IDs"),
           {NULL}
       };
       
      @@ -149,6 +138,11 @@ static authz_status group_check_authorization(request_rec *r,
           authz_groupfile_config_rec *conf = ap_get_module_config(r->per_dir_config,
                   &authz_groupfile_module);
           char *user = r->user;
      +
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t, *w;
           apr_table_t *grpstatus = NULL;
           apr_status_t status;
      @@ -161,7 +155,7 @@ static authz_status group_check_authorization(request_rec *r,
            * configured. So decline.
            */
           if (!(conf->groupfile)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01664)
                               "No group file was specified in the configuration");
               return AUTHZ_DENIED;
           }
      @@ -170,29 +164,37 @@ static authz_status group_check_authorization(request_rec *r,
                                       &grpstatus);
       
           if (status != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01665)
                               "Could not open group file: %s",
                               conf->groupfile);
               return AUTHZ_DENIED;
           }
       
      -    if (apr_table_elts(grpstatus)->nelts == 0) {
      +    if (apr_is_empty_table(grpstatus)) {
               /* no groups available, so exit immediately */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01666)
                             "Authorization of user %s to access %s failed, reason: "
                             "user doesn't appear in group file (%s).",
                             r->user, r->uri, conf->groupfile);
               return AUTHZ_DENIED;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02592)
      +                      "authz_groupfile authorize: require group: Can't "
      +                      "evaluate require expression: %s", err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
           while ((w = ap_getword_conf(r->pool, &t)) && w[0]) {
               if (apr_table_get(grpstatus, w)) {
                   return AUTHZ_GRANTED;
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01667)
                           "Authorization of user %s to access %s failed, reason: "
                           "user is not part of the 'require'ed group(s).",
                           r->user, r->uri);
      @@ -200,7 +202,7 @@ static authz_status group_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      -APR_OPTIONAL_FN_TYPE(authz_owner_get_file_group) *authz_owner_get_file_group;
      +static APR_OPTIONAL_FN_TYPE(authz_owner_get_file_group) *authz_owner_get_file_group;
       
       static authz_status filegroup_check_authorization(request_rec *r,
                                                         const char *require_args,
      @@ -221,7 +223,7 @@ static authz_status filegroup_check_authorization(request_rec *r,
            * configured. So decline.
            */
           if (!(conf->groupfile)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01668)
                               "No group file was specified in the configuration");
               return AUTHZ_DENIED;
           }
      @@ -229,15 +231,15 @@ static authz_status filegroup_check_authorization(request_rec *r,
           status = groups_for_user(r->pool, user, conf->groupfile,
                                    &grpstatus);
           if (status != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01669)
                             "Could not open group file: %s",
                             conf->groupfile);
               return AUTHZ_DENIED;
           }
       
      -    if (apr_table_elts(grpstatus)->nelts == 0) {
      +    if (apr_is_empty_table(grpstatus)) {
               /* no groups available, so exit immediately */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01670)
                               "Authorization of user %s to access %s failed, reason: "
                               "user doesn't appear in group file (%s).",
                               r->user, r->uri, conf->groupfile);
      @@ -259,7 +261,7 @@ static authz_status filegroup_check_authorization(request_rec *r,
               return AUTHZ_DENIED;
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01671)
                         "Authorization of user %s to access %s failed, reason: "
                         "user is not part of the 'require'ed file group.",
                         r->user, r->uri);
      @@ -267,10 +269,29 @@ static authz_status filegroup_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      +static const char *groupfile_parse_config(cmd_parms *cmd, const char *require_line,
      +                                          const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +            &expr_err, NULL);
      +
      +    if (expr_err)
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       static const authz_provider authz_group_provider =
       {
           &group_check_authorization,
      -    NULL,
      +    &groupfile_parse_config,
       };
       
       static const authz_provider authz_filegroup_provider =
      @@ -279,10 +300,14 @@ static const authz_provider authz_filegroup_provider =
           NULL,
       };
       
      -static void register_hooks(apr_pool_t *p)
      +
      +static void authz_groupfile_getfns(void)
       {
           authz_owner_get_file_group = APR_RETRIEVE_OPTIONAL_FN(authz_owner_get_file_group);
      +}
       
      +static void register_hooks(apr_pool_t *p)
      +{
           ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "group",
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_group_provider,
      @@ -291,6 +316,7 @@ static void register_hooks(apr_pool_t *p)
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_filegroup_provider,
                                     AP_AUTH_INTERNAL_PER_CONF);
      +    ap_hook_optional_fn_retrieve(authz_groupfile_getfns, NULL, NULL, APR_HOOK_MIDDLE);
       }
       
       AP_DECLARE_MODULE(authz_groupfile) =
      diff --git a/modules/aaa/mod_authz_groupfile.dep b/modules/aaa/mod_authz_groupfile.dep
      new file mode 100644
      index 00000000000..cb09628d181
      --- /dev/null
      +++ b/modules/aaa/mod_authz_groupfile.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_groupfile.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_groupfile.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_authz_owner.h"\
      +	
      diff --git a/modules/aaa/mod_authz_groupfile.mak b/modules/aaa/mod_authz_groupfile.mak
      new file mode 100644
      index 00000000000..37d729cc77f
      --- /dev/null
      +++ b/modules/aaa/mod_authz_groupfile.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_groupfile.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_groupfile - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_groupfile - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_groupfile - Win32 Release" && "$(CFG)" != "mod_authz_groupfile - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_groupfile.mak" CFG="mod_authz_groupfile - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_groupfile - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_groupfile - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_groupfile.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_groupfile.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_groupfile.obj"
      +	-@erase "$(INTDIR)\mod_authz_groupfile.res"
      +	-@erase "$(INTDIR)\mod_authz_groupfile_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_groupfile_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.exp"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.lib"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_groupfile_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_groupfile.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_groupfile.so" /d LONG_NAME="authz_groupfile_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_groupfile.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_groupfile.pdb" /debug /out:"$(OUTDIR)\mod_authz_groupfile.so" /implib:"$(OUTDIR)\mod_authz_groupfile.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_groupfile.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_groupfile.obj" \
      +	"$(INTDIR)\mod_authz_groupfile.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_groupfile.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_groupfile.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_groupfile.so"
      +   if exist .\Release\mod_authz_groupfile.so.manifest mt.exe -manifest .\Release\mod_authz_groupfile.so.manifest -outputresource:.\Release\mod_authz_groupfile.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_groupfile.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_groupfile.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_groupfile.obj"
      +	-@erase "$(INTDIR)\mod_authz_groupfile.res"
      +	-@erase "$(INTDIR)\mod_authz_groupfile_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_groupfile_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.exp"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.lib"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_groupfile.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_groupfile_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_groupfile.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_groupfile.so" /d LONG_NAME="authz_groupfile_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_groupfile.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_groupfile.pdb" /debug /out:"$(OUTDIR)\mod_authz_groupfile.so" /implib:"$(OUTDIR)\mod_authz_groupfile.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_groupfile.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_groupfile.obj" \
      +	"$(INTDIR)\mod_authz_groupfile.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_groupfile.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_groupfile.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_groupfile.so"
      +   if exist .\Debug\mod_authz_groupfile.so.manifest mt.exe -manifest .\Debug\mod_authz_groupfile.so.manifest -outputresource:.\Debug\mod_authz_groupfile.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_groupfile.dep")
      +!INCLUDE "mod_authz_groupfile.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_groupfile.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_groupfile - Win32 Release" || "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_groupfile - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_groupfile.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_groupfile.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_groupfile.so" /d LONG_NAME="authz_groupfile_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_groupfile - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_groupfile.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_groupfile.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_groupfile.so" /d LONG_NAME="authz_groupfile_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_groupfile.c
      +
      +"$(INTDIR)\mod_authz_groupfile.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_host.c b/modules/aaa/mod_authz_host.c
      index 2bc7f20e87d..76f95b8460f 100644
      --- a/modules/aaa/mod_authz_host.c
      +++ b/modules/aaa/mod_authz_host.c
      @@ -131,10 +131,8 @@ static const char *ip_parse_config(cmd_parms *cmd,
                   return apr_psprintf(p, "ip address '%s' appears to be invalid", w);
               }
               else if (rv != APR_SUCCESS) {
      -            char msgbuf[120];
      -            apr_strerror(rv, msgbuf, sizeof msgbuf);
      -            return apr_psprintf(p, "ip address '%s' appears to be invalid: %s",
      -                                w, msgbuf);
      +            return apr_psprintf(p, "ip address '%s' appears to be invalid: %pm",
      +                                w, &rv);
               }
       
               if (parsed_subnets)
      @@ -153,7 +151,7 @@ static authz_status ip_check_authorization(request_rec *r,
           apr_ipsubnet_t **ip = (apr_ipsubnet_t **)parsed_require_line;
       
           while (*ip) {
      -        if (apr_ipsubnet_test(*ip, r->connection->remote_addr))
      +        if (apr_ipsubnet_test(*ip, r->useragent_addr))
                   return AUTHZ_GRANTED;
               ip++;
           }
      @@ -170,21 +168,30 @@ static authz_status host_check_authorization(request_rec *r,
           const char *remotehost = NULL;
           int remotehost_is_ip;
       
      -    remotehost = ap_get_remote_host(r->connection,
      -                                    r->per_dir_config,
      -                                    REMOTE_DOUBLE_REV,
      -                                    &remotehost_is_ip);
      +    remotehost = ap_get_useragent_host(r, REMOTE_DOUBLE_REV, &remotehost_is_ip);
       
           if ((remotehost == NULL) || remotehost_is_ip) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01753)
                             "access check of '%s' to %s failed, reason: unable to get the "
                             "remote host name", require_line, r->uri);
           }
           else {
      +        const char *err = NULL;
      +        const ap_expr_info_t *expr = parsed_require_line;
      +        const char *require;
      +
      +        require = ap_expr_str_exec(r, expr, &err);
      +        if (err) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02593)
      +                          "authz_host authorize: require host: Can't "
      +                          "evaluate require expression: %s", err);
      +            return AUTHZ_DENIED;
      +        }
      +
               /* The 'host' provider will allow the configuration to specify a list of
                   host names to check rather than a single name.  This is different
                   from the previous host based syntax. */
      -        t = require_line;
      +        t = require;
               while ((w = ap_getword_conf(r->pool, &t)) && w[0]) {
                   if (in_domain(w, remotehost)) {
                       return AUTHZ_GRANTED;
      @@ -196,15 +203,81 @@ static authz_status host_check_authorization(request_rec *r,
           return AUTHZ_DENIED;
       }
       
      +static authz_status
      +forward_dns_check_authorization(request_rec *r,
      +                                const char *require_line,
      +                                const void *parsed_require_line)
      +{
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_line;
      +    const char *require, *t;
      +    char *w;
      +
      +    /* the require line is an expression, which is evaluated now. */
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +      ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03354)
      +                    "authz_host authorize: require forward-dns: "
      +                    "Can't evaluate require expression: %s", err);
      +      return AUTHZ_DENIED;
      +    }
      +
      +    /* tokenize expected list of names */
      +    t = require;
      +    while ((w = ap_getword_conf(r->pool, &t)) && w[0]) {
      +
      +        apr_sockaddr_t *sa;
      +        apr_status_t rv;
      +        char *hash_ptr;
      +
      +        /* stop on apache configuration file comments */
      +        if ((hash_ptr = ap_strchr(w, '#'))) {
      +            if (hash_ptr == w) {
      +                break;
      +            }
      +            *hash_ptr = '\0';
      +        }
      +
      +        /* does the client ip match one of the names? */
      +        rv = apr_sockaddr_info_get(&sa, w, APR_UNSPEC, 0, 0, r->pool);
      +        if (rv == APR_SUCCESS) {
      +
      +            while (sa) {
      +                int match = apr_sockaddr_equal(sa, r->useragent_addr);
      +
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03355)
      +                              "access check for %s as '%s': %s",
      +                              r->useragent_ip, w, match? "yes": "no");
      +                if (match) {
      +                    return AUTHZ_GRANTED;
      +                }
      +
      +                sa = sa->next;
      +            }
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(03356)
      +                          "No sockaddr info for \"%s\"", w);
      +        }
      +
      +        /* stop processing, we are in a comment */
      +        if (hash_ptr) {
      +            break;
      +        }
      +    }
      +
      +    return AUTHZ_DENIED;
      +}
      +
       static authz_status local_check_authorization(request_rec *r,
                                                     const char *require_line,
                                                     const void *parsed_require_line)
       {
            if (   apr_sockaddr_equal(r->connection->local_addr,
      -                               r->connection->remote_addr)
      -         || apr_ipsubnet_test(localhost_v4, r->connection->remote_addr)
      +                               r->useragent_addr)
      +         || apr_ipsubnet_test(localhost_v4, r->useragent_addr)
       #if APR_HAVE_IPV6
      -         || apr_ipsubnet_test(localhost_v6, r->connection->remote_addr)
      +         || apr_ipsubnet_test(localhost_v6, r->useragent_addr)
       #endif
               )
            {
      @@ -214,6 +287,25 @@ static authz_status local_check_authorization(request_rec *r,
            return AUTHZ_DENIED;
       }
       
      +static const char *host_parse_config(cmd_parms *cmd, const char *require_line,
      +                                     const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +            &expr_err, NULL);
      +
      +    if (expr_err)
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       static const authz_provider authz_ip_provider =
       {
           &ip_check_authorization,
      @@ -223,7 +315,13 @@ static const authz_provider authz_ip_provider =
       static const authz_provider authz_host_provider =
       {
           &host_check_authorization,
      -    NULL,
      +    &host_parse_config,
      +};
      +
      +static const authz_provider authz_forward_dns_provider =
      +{
      +    &forward_dns_check_authorization,
      +    &host_parse_config,
       };
       
       static const authz_provider authz_local_provider =
      @@ -270,6 +368,10 @@ static void register_hooks(apr_pool_t *p)
           ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "host",
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_host_provider, AP_AUTH_INTERNAL_PER_CONF);
      +    ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "forward-dns",
      +                              AUTHZ_PROVIDER_VERSION,
      +                              &authz_forward_dns_provider,
      +                              AP_AUTH_INTERNAL_PER_CONF);
           ap_register_auth_provider(p, AUTHZ_PROVIDER_GROUP, "local",
                                     AUTHZ_PROVIDER_VERSION,
                                     &authz_local_provider, AP_AUTH_INTERNAL_PER_CONF);
      diff --git a/modules/aaa/mod_authz_host.dep b/modules/aaa/mod_authz_host.dep
      new file mode 100644
      index 00000000000..fe5ce099c25
      --- /dev/null
      +++ b/modules/aaa/mod_authz_host.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_host.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_host.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authz_host.mak b/modules/aaa/mod_authz_host.mak
      new file mode 100644
      index 00000000000..1ad9e852251
      --- /dev/null
      +++ b/modules/aaa/mod_authz_host.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_host.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_host - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_host - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_host - Win32 Release" && "$(CFG)" != "mod_authz_host - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_host.mak" CFG="mod_authz_host - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_host - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_host - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_host.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_host.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_host.obj"
      +	-@erase "$(INTDIR)\mod_authz_host.res"
      +	-@erase "$(INTDIR)\mod_authz_host_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_host_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_host.exp"
      +	-@erase "$(OUTDIR)\mod_authz_host.lib"
      +	-@erase "$(OUTDIR)\mod_authz_host.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_host.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_host_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_host.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_host.so" /d LONG_NAME="authz_host_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_host.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_host.pdb" /debug /out:"$(OUTDIR)\mod_authz_host.so" /implib:"$(OUTDIR)\mod_authz_host.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_host.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_host.obj" \
      +	"$(INTDIR)\mod_authz_host.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_host.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_host.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_host.so"
      +   if exist .\Release\mod_authz_host.so.manifest mt.exe -manifest .\Release\mod_authz_host.so.manifest -outputresource:.\Release\mod_authz_host.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_host.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_host.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_host.obj"
      +	-@erase "$(INTDIR)\mod_authz_host.res"
      +	-@erase "$(INTDIR)\mod_authz_host_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_host_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_host.exp"
      +	-@erase "$(OUTDIR)\mod_authz_host.lib"
      +	-@erase "$(OUTDIR)\mod_authz_host.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_host.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_host_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_host.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_host.so" /d LONG_NAME="authz_host_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_host.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_host.pdb" /debug /out:"$(OUTDIR)\mod_authz_host.so" /implib:"$(OUTDIR)\mod_authz_host.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_host.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_host.obj" \
      +	"$(INTDIR)\mod_authz_host.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_host.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_host.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_host.so"
      +   if exist .\Debug\mod_authz_host.so.manifest mt.exe -manifest .\Debug\mod_authz_host.so.manifest -outputresource:.\Debug\mod_authz_host.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_host.dep")
      +!INCLUDE "mod_authz_host.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_host.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_host - Win32 Release" || "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_host - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_host.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_host.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_host.so" /d LONG_NAME="authz_host_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_host - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_host.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_host.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_host.so" /d LONG_NAME="authz_host_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_host.c
      +
      +"$(INTDIR)\mod_authz_host.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_owner.c b/modules/aaa/mod_authz_owner.c
      index 4cd3cdcd90c..4fd0b2a015d 100644
      --- a/modules/aaa/mod_authz_owner.c
      +++ b/modules/aaa/mod_authz_owner.c
      @@ -28,8 +28,7 @@
       #include "http_request.h"
       
       #include "mod_auth.h"
      -
      -APR_DECLARE_OPTIONAL_FN(char*, authz_owner_get_file_group, (request_rec *r));
      +#include "mod_authz_owner.h"
       
       static const command_rec authz_owner_cmds[] =
       {
      @@ -47,7 +46,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
       
       #if !APR_HAS_USER
           reason = "'Require file-owner' is not supported on this platform.";
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01632)
                         "Authorization of user %s to access %s failed, reason: %s",
                         r->user, r->uri, reason ? reason : "unknown");
           return AUTHZ_DENIED;
      @@ -61,7 +60,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
       
           if (!r->filename) {
               reason = "no filename available";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01633)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return AUTHZ_DENIED;
      @@ -71,7 +70,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
           if (status != APR_SUCCESS) {
               reason = apr_pstrcat(r->pool, "could not stat file ",
                                       r->filename, NULL);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01634)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return AUTHZ_DENIED;
      @@ -79,7 +78,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
       
           if (!(finfo.valid & APR_FINFO_USER)) {
               reason = "no file owner information available";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01635)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return AUTHZ_DENIED;
      @@ -88,7 +87,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
           status = apr_uid_name_get(&owner, finfo.user, r->pool);
           if (status != APR_SUCCESS || !owner) {
               reason = "could not get name of file owner";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01636)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return AUTHZ_DENIED;
      @@ -97,7 +96,7 @@ static authz_status fileowner_check_authorization(request_rec *r,
           if (strcmp(owner, r->user)) {
               reason = apr_psprintf(r->pool, "file owner %s does not match.",
                                       owner);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01637)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return AUTHZ_DENIED;
      @@ -110,8 +109,6 @@ static authz_status fileowner_check_authorization(request_rec *r,
       
       static char *authz_owner_get_file_group(request_rec *r)
       {
      -    char *reason = NULL;
      -
           /* file-group only figures out the file's group and lets
           * other modules do the actual authorization (against a group file/db).
           * Thus, these modules have to hook themselves after
      @@ -120,13 +117,14 @@ static char *authz_owner_get_file_group(request_rec *r)
       #if !APR_HAS_USER
           return NULL;
       #else  /* APR_HAS_USER */
      +    char *reason = NULL;
           char *group = NULL;
           apr_finfo_t finfo;
           apr_status_t status = 0;
       
           if (!r->filename) {
               reason = "no filename available";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01638)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return NULL;
      @@ -136,7 +134,7 @@ static char *authz_owner_get_file_group(request_rec *r)
           if (status != APR_SUCCESS) {
               reason = apr_pstrcat(r->pool, "could not stat file ",
                                       r->filename, NULL);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01639)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return NULL;
      @@ -144,7 +142,7 @@ static char *authz_owner_get_file_group(request_rec *r)
       
           if (!(finfo.valid & APR_FINFO_GROUP)) {
               reason = "no file group information available";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01640)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return NULL;
      @@ -153,7 +151,7 @@ static char *authz_owner_get_file_group(request_rec *r)
           status = apr_gid_name_get(&group, finfo.group, r->pool);
           if (status != APR_SUCCESS || !group) {
               reason = "could not get name of file group";
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01641)
                             "Authorization of user %s to access %s failed, reason: %s",
                             r->user, r->uri, reason ? reason : "unknown");
               return NULL;
      diff --git a/modules/aaa/mod_authz_owner.dep b/modules/aaa/mod_authz_owner.dep
      new file mode 100644
      index 00000000000..42a1056e64e
      --- /dev/null
      +++ b/modules/aaa/mod_authz_owner.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_owner.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_owner.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_authz_owner.h"\
      +	
      diff --git a/server/mpm/simple/simple_run.h b/modules/aaa/mod_authz_owner.h
      similarity index 69%
      rename from server/mpm/simple/simple_run.h
      rename to modules/aaa/mod_authz_owner.h
      index fa917e7a881..799f3361ab0 100644
      --- a/server/mpm/simple/simple_run.h
      +++ b/modules/aaa/mod_authz_owner.h
      @@ -14,16 +14,14 @@
        * limitations under the License.
        */
       
      -#include "simple_types.h"
      +#ifndef MOD_AUTHZ_OWNER_H
      +#define MOD_AUTHZ_OWNER_H
       
      -#ifndef APACHE_MPM_SIMPLE_RUN_H
      -#define APACHE_MPM_SIMPLE_RUN_H
      +#include "http_request.h"
       
      -void simple_single_process_hack(simple_core_t * sc);
      +/* mod_authz_owner exports an optional function which retrieves the
      + * group name of the file identified by r->filename, if available, or
      + * else returns NULL. */
      +APR_DECLARE_OPTIONAL_FN(char*, authz_owner_get_file_group, (request_rec *r));
       
      -int simple_child_loop(simple_core_t * sc);
      -
      -int simple_main_loop(simple_core_t * sc);
      -
      -
      -#endif
      +#endif /* MOD_AUTHZ_OWNER_H */
      diff --git a/modules/aaa/mod_authz_owner.mak b/modules/aaa/mod_authz_owner.mak
      new file mode 100644
      index 00000000000..850a1f76375
      --- /dev/null
      +++ b/modules/aaa/mod_authz_owner.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_owner.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_owner - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_owner - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_owner - Win32 Release" && "$(CFG)" != "mod_authz_owner - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_owner.mak" CFG="mod_authz_owner - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_owner - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_owner - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_owner.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_owner.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_owner.obj"
      +	-@erase "$(INTDIR)\mod_authz_owner.res"
      +	-@erase "$(INTDIR)\mod_authz_owner_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_owner_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_owner.exp"
      +	-@erase "$(OUTDIR)\mod_authz_owner.lib"
      +	-@erase "$(OUTDIR)\mod_authz_owner.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_owner.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_owner_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_owner.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_owner.so" /d LONG_NAME="authz_owner_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_owner.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_owner.pdb" /debug /out:"$(OUTDIR)\mod_authz_owner.so" /implib:"$(OUTDIR)\mod_authz_owner.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_owner.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_owner.obj" \
      +	"$(INTDIR)\mod_authz_owner.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_owner.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_owner.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_owner.so"
      +   if exist .\Release\mod_authz_owner.so.manifest mt.exe -manifest .\Release\mod_authz_owner.so.manifest -outputresource:.\Release\mod_authz_owner.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_owner.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_owner.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_owner.obj"
      +	-@erase "$(INTDIR)\mod_authz_owner.res"
      +	-@erase "$(INTDIR)\mod_authz_owner_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_owner_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_owner.exp"
      +	-@erase "$(OUTDIR)\mod_authz_owner.lib"
      +	-@erase "$(OUTDIR)\mod_authz_owner.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_owner.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_owner_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_owner.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_owner.so" /d LONG_NAME="authz_owner_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_owner.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_owner.pdb" /debug /out:"$(OUTDIR)\mod_authz_owner.so" /implib:"$(OUTDIR)\mod_authz_owner.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_owner.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_owner.obj" \
      +	"$(INTDIR)\mod_authz_owner.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_owner.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_owner.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_owner.so"
      +   if exist .\Debug\mod_authz_owner.so.manifest mt.exe -manifest .\Debug\mod_authz_owner.so.manifest -outputresource:.\Debug\mod_authz_owner.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_owner.dep")
      +!INCLUDE "mod_authz_owner.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_owner.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_owner - Win32 Release" || "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_owner - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_owner.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_owner.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_owner.so" /d LONG_NAME="authz_owner_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_owner - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_owner.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_owner.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_owner.so" /d LONG_NAME="authz_owner_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_owner.c
      +
      +"$(INTDIR)\mod_authz_owner.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/aaa/mod_authz_user.c b/modules/aaa/mod_authz_user.c
      index 2d16a3c72d2..881f77f1109 100644
      --- a/modules/aaa/mod_authz_user.c
      +++ b/modules/aaa/mod_authz_user.c
      @@ -49,20 +49,32 @@ static authz_status user_check_authorization(request_rec *r,
                                                    const char *require_args,
                                                    const void *parsed_require_args)
       {
      +    const char *err = NULL;
      +    const ap_expr_info_t *expr = parsed_require_args;
      +    const char *require;
      +
           const char *t, *w;
       
           if (!r->user) {
               return AUTHZ_DENIED_NO_USER;
           }
       
      -    t = require_args;
      +    require = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02594)
      +                      "authz_user authorize: require user: Can't "
      +                      "evaluate require expression: %s", err);
      +        return AUTHZ_DENIED;
      +    }
      +
      +    t = require;
           while ((w = ap_getword_conf(r->pool, &t)) && w[0]) {
               if (!strcmp(r->user, w)) {
                   return AUTHZ_GRANTED;
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01663)
                         "access to %s failed, reason: user '%s' does not meet "
                         "'require'ments for user to be allowed access",
                         r->uri, r->user);
      @@ -81,10 +93,29 @@ static authz_status validuser_check_authorization(request_rec *r,
           return AUTHZ_GRANTED;
       }
       
      +static const char *user_parse_config(cmd_parms *cmd, const char *require_line,
      +                                     const void **parsed_require_line)
      +{
      +    const char *expr_err = NULL;
      +    ap_expr_info_t *expr;
      +
      +    expr = ap_expr_parse_cmd(cmd, require_line, AP_EXPR_FLAG_STRING_RESULT,
      +            &expr_err, NULL);
      +
      +    if (expr_err)
      +        return apr_pstrcat(cmd->temp_pool,
      +                           "Cannot parse expression in require line: ",
      +                           expr_err, NULL);
      +
      +    *parsed_require_line = expr;
      +
      +    return NULL;
      +}
      +
       static const authz_provider authz_user_provider =
       {
           &user_check_authorization,
      -    NULL,
      +    &user_parse_config,
       };
       static const authz_provider authz_validuser_provider =
       {
      diff --git a/modules/aaa/mod_authz_user.dep b/modules/aaa/mod_authz_user.dep
      new file mode 100644
      index 00000000000..648fa020757
      --- /dev/null
      +++ b/modules/aaa/mod_authz_user.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_authz_user.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_authz_user.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/aaa/mod_authz_user.mak b/modules/aaa/mod_authz_user.mak
      new file mode 100644
      index 00000000000..0989f6e5b5e
      --- /dev/null
      +++ b/modules/aaa/mod_authz_user.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_authz_user.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_authz_user - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_authz_user - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_authz_user - Win32 Release" && "$(CFG)" != "mod_authz_user - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_authz_user.mak" CFG="mod_authz_user - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_authz_user - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_authz_user - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_user.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_authz_user.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_auth_basic - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_user.obj"
      +	-@erase "$(INTDIR)\mod_authz_user.res"
      +	-@erase "$(INTDIR)\mod_authz_user_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_user_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_user.exp"
      +	-@erase "$(OUTDIR)\mod_authz_user.lib"
      +	-@erase "$(OUTDIR)\mod_authz_user.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_user.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_user_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_user.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_authz_user.so" /d LONG_NAME="authz_user_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_user.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_user.pdb" /debug /out:"$(OUTDIR)\mod_authz_user.so" /implib:"$(OUTDIR)\mod_authz_user.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_user.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_user.obj" \
      +	"$(INTDIR)\mod_authz_user.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_user.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_authz_user.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_user.so"
      +   if exist .\Release\mod_authz_user.so.manifest mt.exe -manifest .\Release\mod_authz_user.so.manifest -outputresource:.\Release\mod_authz_user.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_authz_user.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_auth_basic - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_authz_user.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_auth_basic - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_authz_user.obj"
      +	-@erase "$(INTDIR)\mod_authz_user.res"
      +	-@erase "$(INTDIR)\mod_authz_user_src.idb"
      +	-@erase "$(INTDIR)\mod_authz_user_src.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_user.exp"
      +	-@erase "$(OUTDIR)\mod_authz_user.lib"
      +	-@erase "$(OUTDIR)\mod_authz_user.pdb"
      +	-@erase "$(OUTDIR)\mod_authz_user.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_authz_user_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_authz_user.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_authz_user.so" /d LONG_NAME="authz_user_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_authz_user.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_authz_user.pdb" /debug /out:"$(OUTDIR)\mod_authz_user.so" /implib:"$(OUTDIR)\mod_authz_user.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_authz_user.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_authz_user.obj" \
      +	"$(INTDIR)\mod_authz_user.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_auth_basic.lib"
      +
      +"$(OUTDIR)\mod_authz_user.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_authz_user.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_authz_user.so"
      +   if exist .\Debug\mod_authz_user.so.manifest mt.exe -manifest .\Debug\mod_authz_user.so.manifest -outputresource:.\Debug\mod_authz_user.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_authz_user.dep")
      +!INCLUDE "mod_authz_user.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_authz_user.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_authz_user - Win32 Release" || "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\aaa"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\aaa"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\aaa"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +"mod_auth_basic - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +"mod_auth_basic - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" 
      +   cd "."
      +
      +"mod_auth_basic - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_auth_basic.mak" CFG="mod_auth_basic - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_authz_user - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_authz_user.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_user.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_authz_user.so" /d LONG_NAME="authz_user_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_authz_user - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_authz_user.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_authz_user.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_authz_user.so" /d LONG_NAME="authz_user_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_authz_user.c
      +
      +"$(INTDIR)\mod_authz_user.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c
      index bfb1e87ae01..f873827ecae 100644
      --- a/modules/arch/netware/mod_netware.c
      +++ b/modules/arch/netware/mod_netware.c
      @@ -128,7 +128,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
           for (ptr = cmd_only; *ptr && (*ptr != ' '); ptr++);
           *ptr = '\0';
       
      -    /* Figure out what the extension is so that we can matche it. */
      +    /* Figure out what the extension is so that we can match it. */
           ext = strrchr(apr_filepath_name_get(cmd_only), '.');
       
           /* If there isn't an extension then give it an empty string */
      @@ -137,14 +137,15 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
           }
       
           /* eliminate the '.' if there is one */
      -    if (*ext == '.')
      +    if (*ext == '.') {
               ++ext;
      +    }
       
           /* check if we have a registered command for the extension*/
           new_cmd = apr_table_get(d->file_type_handlers, ext);
           e_info->detached = 1;
           if (new_cmd == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02135)
                         "Could not find a command associated with the %s extension", ext);
               return APR_EBADF;
           }
      @@ -154,8 +155,9 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
               *cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
       
               /* Run in its own address space if specified */
      -        if(apr_table_get(d->file_handler_mode, ext))
      +        if (apr_table_get(d->file_handler_mode, ext)) {
                   e_info->addrspace = 1;
      +        }
           }
       
           /* Tokenize the full command string into its arguments */
      diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c
      index 7b64ebfa2fc..298554a6e5f 100644
      --- a/modules/arch/netware/mod_nw_ssl.c
      +++ b/modules/arch/netware/mod_nw_ssl.c
      @@ -15,7 +15,7 @@
        */
       
       /*
      - * mod_tls.c - Apache SSL/TLS module for NetWare by Mike Gardiner.
      + * based on mod_tls.c - Apache SSL/TLS module for NetWare by Mike Gardiner.
        *
        * This module gives Apache the ability to do SSL/TLS with a minimum amount
        * of effort.  All of the SSL/TLS logic is already on NetWare versions 5 and
      @@ -31,6 +31,17 @@
        *
        *          SecureListen 443 "SSL CertificateIP"
        *          SecureListen 123.45.67.89:443 mycert
      + *
      + * The module also supports RFC 2817 / TLS Upgrade for HTTP 1.1.
      + * For this add a "NWSSLUpgradeable" with two arguments.  The first
      + * argument is an address and/or port.  The second argument is the key pair
      + * name as created in ConsoleOne.
      + *
      + *  Examples:
      + *
      + *          NWSSLUpgradeable 8080 "SSL CertificateIP"
      + *          NWSSLUpgradeable 123.45.67.89:8080 mycert
      + *  
        */
       
       #define WS_SSL
      @@ -115,7 +126,7 @@ struct seclistenup_rec {
       struct NWSSLSrvConfigRec {
           apr_table_t *sltable;
           apr_table_t *slutable;
      -        apr_pool_t *pPool;
      +    apr_pool_t *pPool;
       };
       
       struct secsocket_data {
      @@ -163,8 +174,8 @@ static unsigned long parse_addr(const char *w, unsigned short *ports)
           p = strchr(w, ':');
           if (ports != NULL) {
               *ports = 0;
      -    if (p != NULL && strcmp(p + 1, "*") != 0)
      -        *ports = atoi(p + 1);
      +        if (p != NULL && strcmp(p + 1, "*") != 0)
      +            *ports = atoi(p + 1);
           }
       
           if (p != NULL)
      @@ -224,14 +235,16 @@ static char *get_port_key(conn_rec *c)
       
           for (sl = ap_seclistenersup; sl; sl = sl->next) {
               if ((sl->port == (c->local_addr)->port) &&
      -            ((strcmp(sl->addr, "0.0.0.0") == 0) || (strcmp(sl->addr, c->local_ip) == 0))) {
      +            ((strcmp(sl->addr, "0.0.0.0") == 0) ||
      +            (strcmp(sl->addr, c->local_ip) == 0))) {
                   return sl->key;
               }
           }
           return NULL;
       }
       
      -static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *server,
      +static int make_secure_socket(apr_pool_t *pconf,
      +                              const struct sockaddr_in *server,
                                     char* key, int mutual, server_rec *sconf)
       {
           int s;
      @@ -255,10 +268,11 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
           SecureProtoInfo.iSecurityScheme = SECURITY_PROTOCOL_SSL;
       
           s = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP,
      -            (LPWSAPROTOCOL_INFO)&SecureProtoInfo, 0, 0);
      +                  (LPWSAPROTOCOL_INFO)&SecureProtoInfo, 0, 0);
       
           if (s == INVALID_SOCKET) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
      +                     APLOGNO(02120)
                            "make_secure_socket: failed to get a socket for %s",
                            addr);
               return -1;
      @@ -270,6 +284,7 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
               if (WSAIoctl(s, SO_SSL_SET_FLAGS, (char *)&optParam,
                   sizeof(optParam), NULL, 0, NULL, NULL, NULL)) {
                   ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
      +                         APLOGNO(02121)
                                "make_secure_socket: for %s, WSAIoctl: "
                                "(SO_SSL_SET_FLAGS)", addr);
                   return -1;
      @@ -283,8 +298,9 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
           opts.siddir = NULL;
       
           if (WSAIoctl(s, SO_SSL_SET_SERVER, (char *)&opts, sizeof(opts),
      -        NULL, 0, NULL, NULL, NULL) != 0) {
      +                 NULL, 0, NULL, NULL, NULL) != 0) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
      +                     APLOGNO(02122)
                            "make_secure_socket: for %s, WSAIoctl: "
                            "(SO_SSL_SET_SERVER)", addr);
               return -1;
      @@ -293,9 +309,10 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
           if (mutual) {
               optParam = 0x07;  /* SO_SSL_AUTH_CLIENT */
       
      -        if(WSAIoctl(s, SO_SSL_SET_FLAGS, (char*)&optParam,
      -            sizeof(optParam), NULL, 0, NULL, NULL, NULL)) {
      +        if (WSAIoctl(s, SO_SSL_SET_FLAGS, (char*)&optParam, sizeof(optParam),
      +                     NULL, 0, NULL, NULL, NULL)) {
                   ap_log_error(APLOG_MARK, APLOG_CRIT, WSAGetLastError(), sconf,
      +                         APLOGNO(02123)
                                "make_secure_socket: for %s, WSAIoctl: "
                                "(SO_SSL_SET_FLAGS)", addr);
                   return -1;
      @@ -311,10 +328,10 @@ static int make_secure_socket(apr_pool_t *pconf, const struct sockaddr_in *serve
       
       static int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
       {
      -        int rcode;
      -        struct tlsclientopts sWS2Opts;
      -        struct nwtlsopts sNWTLSOpts;
      -        struct sslserveropts opts;
      +    int rcode;
      +    struct tlsclientopts sWS2Opts;
      +    struct nwtlsopts sNWTLSOpts;
      +    struct sslserveropts opts;
           unsigned long ulFlags;
           SOCKET sock;
           unicode_t keyFileName[60];
      @@ -322,23 +339,23 @@ static int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
           apr_os_sock_get(&sock, csd);
       
           /* zero out buffers */
      -        memset((char *)&sWS2Opts, 0, sizeof(struct tlsclientopts));
      -        memset((char *)&sNWTLSOpts, 0, sizeof(struct nwtlsopts));
      +    memset((char *)&sWS2Opts, 0, sizeof(struct tlsclientopts));
      +    memset((char *)&sNWTLSOpts, 0, sizeof(struct nwtlsopts));
       
           /* turn on ssl for the socket */
      -        ulFlags = (numcerts ? SO_TLS_ENABLE : SO_TLS_ENABLE | SO_TLS_BLIND_ACCEPT);
      -        rcode = WSAIoctl(sock, SO_TLS_SET_FLAGS, &ulFlags, sizeof(unsigned long),
      +    ulFlags = (numcerts ? SO_TLS_ENABLE : SO_TLS_ENABLE | SO_TLS_BLIND_ACCEPT);
      +    rcode = WSAIoctl(sock, SO_TLS_SET_FLAGS, &ulFlags, sizeof(unsigned long),
                            NULL, 0, NULL, NULL, NULL);
      -        if (SOCKET_ERROR == rcode)
      -        {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
      -                     "Error: %d with ioctlsocket(flag SO_TLS_ENABLE)", WSAGetLastError());
      -                return rcode;
      -        }
      +    if (SOCKET_ERROR == rcode) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server, APLOGNO(02124)
      +                     "Error: %d with WSAIoctl(flag SO_TLS_ENABLE)",
      +                     WSAGetLastError());
      +        return rcode;
      +    }
       
           ulFlags = SO_TLS_UNCLEAN_SHUTDOWN;
      -        WSAIoctl(sock, SO_TLS_SET_FLAGS, &ulFlags, sizeof(unsigned long),
      -                     NULL, 0, NULL, NULL, NULL);
      +    WSAIoctl(sock, SO_TLS_SET_FLAGS, &ulFlags, sizeof(unsigned long),
      +             NULL, 0, NULL, NULL, NULL);
       
           /* setup the socket for SSL */
           memset (&sWS2Opts, 0, sizeof(sWS2Opts));
      @@ -365,11 +382,12 @@ static int convert_secure_socket(conn_rec *c, apr_socket_t *csd)
                            NULL, NULL);
       
           /* make sure that it was successful */
      -        if(SOCKET_ERROR == rcode ){
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server,
      -                     "Error: %d with ioctl (SO_TLS_SET_CLIENT)", WSAGetLastError());
      -        }
      -        return rcode;
      +    if (SOCKET_ERROR == rcode ) {
      +    ap_log_error(APLOG_MARK, APLOG_ERR, 0, c->base_server, APLOGNO(02125)
      +                 "Error: %d with WSAIoctl(SO_TLS_SET_CLIENT)",
      +                 WSAGetLastError());
      +    }
      +    return rcode;
       }
       
       static int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
      @@ -383,24 +401,25 @@ static int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
           memset((char *)&sWS2Opts, 0, sizeof(struct tlsserveropts));
           memset((char *)&sNWTLSOpts, 0, sizeof(struct nwtlsopts));
       
      -
           ulFlag = SO_TLS_ENABLE;
      -    rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag, sizeof(unsigned long), NULL, 0, NULL, NULL, NULL);
      -    if(rcode)
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_ENABLE)", WSAGetLastError());
      +    rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag,
      +                     sizeof(unsigned long), NULL, 0, NULL, NULL, NULL);
      +    if (rcode) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02126)
      +                     "Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_ENABLE)",
      +                     WSAGetLastError());
               goto ERR;
           }
       
       
           ulFlag = SO_TLS_SERVER;
      -    rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag, sizeof(unsigned long),NULL, 0, NULL, NULL, NULL);
      +    rcode = WSAIoctl(socketHnd, SO_TLS_SET_FLAGS, &ulFlag,
      +                     sizeof(unsigned long),NULL, 0, NULL, NULL, NULL);
       
      -    if(rcode)
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_SERVER)", WSAGetLastError());
      +    if (rcode) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02127)
      +                     "Error: %d with WSAIoctl(SO_TLS_SET_FLAGS, SO_TLS_SERVER)",
      +                     WSAGetLastError());
               goto ERR;
           }
       
      @@ -426,7 +445,6 @@ static int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
           sNWTLSOpts.reserved2                    = NULL;
           sNWTLSOpts.reserved3                    = NULL;
       
      -
           rcode = WSAIoctl(socketHnd,
                            SO_TLS_SET_SERVER,
                            &sWS2Opts,
      @@ -436,8 +454,8 @@ static int SSLize_Socket(SOCKET socketHnd, char *key, request_rec *r)
                            NULL,
                            NULL,
                            NULL);
      -    if(SOCKET_ERROR == rcode) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +    if (SOCKET_ERROR == rcode) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02128)
                            "Error: %d with WSAIoctl(SO_TLS_SET_SERVER)", WSAGetLastError());
               goto ERR;
           }
      @@ -617,7 +635,7 @@ static const char *set_trusted_certs(cmd_parms *cmd, void *dummy, char *arg)
       {
           char **ptr = (char **)apr_array_push(certlist);
       
      -    *ptr = apr_pstrdup(cmd->pool, arg);
      +    *ptr = arg;
           return NULL;
       }
       
      @@ -630,9 +648,9 @@ static int nwssl_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
           apr_sockaddr_t *sa;
           int found;
       
      -  /* Pull all of the listeners that were created by mod_nw_ssl out of the
      -     ap_listeners list so that the normal listen socket processing does
      -     automatically close them */
      +    /* Pull all of the listeners that were created by mod_nw_ssl out of the
      +       ap_listeners list so that the normal listen socket processing does
      +       automatically close them */
           nw_old_listeners = NULL;
           ap_old_seclisteners = NULL;
       
      @@ -760,7 +778,7 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
       
           for (sl = ap_seclisteners; sl != NULL; sl = sl->next) {
               /* If we find a pre-existing listen socket and it has already been
      -           created, then no neeed to go any further, just reuse it. */
      +           created, then no need to go any further, just reuse it. */
               if (((sl->fd = find_secure_listener(sl)) >= 0) && (sl->used)) {
                   continue;
               }
      @@ -785,7 +803,7 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                       lr->sd = sd;
                       if ((status = apr_sockaddr_info_get(&lr->bind_addr, sl->addr, APR_UNSPEC, sl->port, 0,
                                                     s->process->pool)) != APR_SUCCESS) {
      -                    ap_log_perror(APLOG_MARK, APLOG_CRIT, status, pconf,
      +                    ap_log_perror(APLOG_MARK, APLOG_CRIT, status, pconf, APLOGNO(02129)
                                        "alloc_listener: failed to set up sockaddr for %s:%d", sl->addr, sl->port);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
      @@ -808,7 +826,7 @@ static int nwssl_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                   }
               }
               if (!found) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, plog,
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, plog, APLOGNO(02130)
                                "No Listen directive found for upgradeable listener %s:%d", slu->addr, slu->port);
               }
           }
      @@ -851,8 +869,7 @@ static int isSecureConnEx (const server_rec *s, const conn_rec *c, const apr_tab
           char port[8];
       
           itoa((c->local_addr)->port, port, 10);
      -    if (!apr_table_do(compare_ipports, (void*)c, t, port, NULL))
      -    {
      +    if (!apr_table_do(compare_ipports, (void*)c, t, port, NULL)) {
               return 1;
           }
       
      @@ -875,19 +892,19 @@ static int isSecureConnUpgradeable (const server_rec *s, const conn_rec *c)
       
       static int isSecure (const request_rec *r)
       {
      -        return isSecureConn (r->server, r->connection);
      +    return isSecureConn (r->server, r->connection);
       }
       
       static int isSecureUpgradeable (const request_rec *r)
       {
      -        return isSecureConnUpgradeable (r->server, r->connection);
      +    return isSecureConnUpgradeable (r->server, r->connection);
       }
       
       static int isSecureUpgraded (const request_rec *r)
       {
           secsocket_data *csd_data = (secsocket_data*)ap_get_module_config(r->connection->conn_config, &nwssl_module);
       
      -        return csd_data->is_secure;
      +    return csd_data->is_secure;
       }
       
       static int nwssl_hook_Fixup(request_rec *r)
      @@ -1000,9 +1017,10 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
                       result = r->uri;
                   else if (strcEQ(var, "REQUEST_FILENAME"))
                       result = r->filename;
      +            else if (strcEQ(var, "REMOTE_ADDR"))
      +                result = r->useragent_ip;
                   else if (strcEQ(var, "REMOTE_HOST"))
      -                result = ap_get_remote_host(r->connection, r->per_dir_config,
      -                                            REMOTE_NAME, NULL);
      +                result = ap_get_useragent_host(r, REMOTE_NAME, NULL);
                   else if (strcEQ(var, "REMOTE_IDENT"))
                       result = ap_get_remote_logname(r);
                   else if (strcEQ(var, "REMOTE_USER"))
      @@ -1046,17 +1064,14 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
            * Connection stuff
            */
           if (result == NULL && c != NULL) {
      -
      -                /* XXX-Can't get specific SSL info from NetWare */
      +        /* XXX-Can't get specific SSL info from NetWare */
               /* SSLConnRec *sslconn = myConnConfig(c);
               if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
                   && sslconn && sslconn->ssl)
                   result = ssl_var_lookup_ssl(p, c, var+4);*/
       
      -                if (strlen(var) > 4 && strcEQn(var, "SSL_", 4))
      -                        result = NULL;
      -        else if (strcEQ(var, "REMOTE_ADDR"))
      -            result = c->remote_ip;
      +        if (strlen(var) > 4 && strcEQn(var, "SSL_", 4))
      +            result = NULL;
           }
       
           /*
      @@ -1064,13 +1079,13 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
            */
           if (result == NULL) {
               if (strlen(var) > 12 && strcEQn(var, "SSL_VERSION_", 12))
      -                        result = NULL;
      +            result = NULL;
                   /* XXX-Can't get specific SSL info from NetWare */
                   /*result = ssl_var_lookup_ssl_version(p, var+12);*/
               else if (strcEQ(var, "SERVER_SOFTWARE"))
                   result = ap_get_server_banner();
               else if (strcEQ(var, "API_VERSION")) {
      -            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
      +            result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
                   resdup = FALSE;
               }
               else if (strcEQ(var, "TIME_YEAR")) {
      @@ -1131,7 +1146,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
       #define CONNECTION_HEADER "Connection: Upgrade"
       
       static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
      -                                         apr_bucket_brigade *bb)
      +                                          apr_bucket_brigade *bb)
       
       {
           const char *upgrade;
      @@ -1149,6 +1164,14 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
            */
           ap_remove_output_filter(f);
       
      +    if (!r) {
      +        /*
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02131)
      +                     "Unable to get upgradeable socket handle");
      +        */
      +        return ap_pass_brigade(f->next, bb);
      +    }
      +
           /* No need to ensure that this is a server with optional SSL, the filter
            * is only inserted if that is true.
            */
      @@ -1162,29 +1185,21 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
       
           apr_table_unset(r->headers_out, "Upgrade");
       
      -    if (r) {
      -        csd_data = (secsocket_data*)ap_get_module_config(r->connection->conn_config, &nwssl_module);
      -        csd = csd_data->csd;
      -    }
      -    else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "Unable to get upgradeable socket handle");
      -        return ap_pass_brigade(f->next, bb);
      -    }
      -
      +    csd_data = (secsocket_data*)ap_get_module_config(r->connection->conn_config, &nwssl_module);
      +    csd = csd_data->csd;
       
           /* Send the interim 101 response. */
           upgradebb = apr_brigade_create(r->pool, f->c->bucket_alloc);
       
      -    ap_fputstrs(f->next, upgradebb, SWITCH_STATUS_LINE, CRLF,
      -                UPGRADE_HEADER, CRLF, CONNECTION_HEADER, CRLF, CRLF, NULL);
      +    ap_fputs(f->next, upgradebb, SWITCH_STATUS_LINE CRLF
      +             UPGRADE_HEADER CRLF CONNECTION_HEADER CRLF CRLF);
       
           b = apr_bucket_flush_create(f->c->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(upgradebb, b);
       
           rv = ap_pass_brigade(f->next, upgradebb);
           if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02132)
                             "could not send interim 101 Upgrade response");
               return AP_FILTER_ERROR;
           }
      @@ -1202,12 +1217,12 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
               }
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02133)
                            "Upgradeable socket handle not found");
               return AP_FILTER_ERROR;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server, APLOGNO(02134)
                        "Awaiting re-negotiation handshake");
       
           /* Now that we have initialized the ssl connection which added the ssl_io_filter,
      diff --git a/modules/arch/unix/config5.m4 b/modules/arch/unix/config5.m4
      index 01c6e6938ec..77027a8584d 100644
      --- a/modules/arch/unix/config5.m4
      +++ b/modules/arch/unix/config5.m4
      @@ -1,8 +1,7 @@
       
       APACHE_MODPATH_INIT(arch/unix)
       
      -if ap_mpm_is_enabled "simple" \
      -   || ap_mpm_is_enabled "worker" \
      +if ap_mpm_is_enabled "worker" \
          || ap_mpm_is_enabled "event" \
          || ap_mpm_is_enabled "prefork"; then
           unixd_mods_enable=yes
      diff --git a/modules/arch/unix/mod_privileges.c b/modules/arch/unix/mod_privileges.c
      index a04a2c598c7..fede3d86568 100644
      --- a/modules/arch/unix/mod_privileges.c
      +++ b/modules/arch/unix/mod_privileges.c
      @@ -34,8 +34,8 @@
           apr_strerror(errno, msgbuf, sizeof(msgbuf)); \
           return apr_pstrdup(cmd->pool, msgbuf); \
       }
      -#define CR_CHECK(x) if (x == -1) \
      -    ap_log_error(APLOG_MARK, APLOG_CRIT, errno, 0, \
      +#define CR_CHECK(x, y) if (x == -1) \
      +    ap_log_error(APLOG_MARK, APLOG_CRIT, errno, 0, y \
                        "Failed to initialise privileges")
       
       module AP_MODULE_DECLARE_DATA privileges_module;
      @@ -84,20 +84,20 @@ static void *privileges_create_cfg(apr_pool_t *pool, server_rec *s)
           cfg->priv = priv_str_to_set("basic", ",", NULL);
           cfg->child_priv = priv_str_to_set("basic", ",", NULL);
       
      -    /* By default, run in secure mode.
      +    /* By default, run in secure vhost mode.
            * That means dropping basic privileges we don't usually need.
            */
      -    CR_CHECK(priv_delset(cfg->priv, PRIV_FILE_LINK_ANY));
      -    CR_CHECK(priv_delset(cfg->priv, PRIV_PROC_INFO));
      -    CR_CHECK(priv_delset(cfg->priv, PRIV_PROC_SESSION));
      +    CR_CHECK(priv_delset(cfg->priv, PRIV_FILE_LINK_ANY), APLOGNO(03160));
      +    CR_CHECK(priv_delset(cfg->priv, PRIV_PROC_INFO), APLOGNO(03161));
      +    CR_CHECK(priv_delset(cfg->priv, PRIV_PROC_SESSION), APLOGNO(03162));
       
       /* Hmmm, should CGI default to secure too ? */
       /*
      -    CR_CHECK(priv_delset(cfg->child_priv, PRIV_FILE_LINK_ANY));
      -    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_INFO));
      -    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_SESSION));
      -    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_FORK));
      -    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_EXEC));
      +    CR_CHECK(priv_delset(cfg->child_priv, PRIV_FILE_LINK_ANY), APLOGNO(03163));
      +    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_INFO), APLOGNO(03164));
      +    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_SESSION), APLOGNO(03165));
      +    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_FORK), APLOGNO(03166));
      +    CR_CHECK(priv_delset(cfg->child_priv, PRIV_PROC_EXEC), APLOGNO(03167));
       */
       
           /* we´ll use 0 for unset */
      @@ -150,22 +150,22 @@ static apr_status_t privileges_end_req(void *data)
           /* if either user or group are not the default, restore them */
           if (cfg->uid || cfg->gid) {
               if (setppriv(PRIV_ON, PRIV_EFFECTIVE, priv_setid) == -1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02136)
                                 "PRIV_ON failed restoring default user/group");
               }
               if (cfg->uid && (setuid(ap_unixd_config.user_id) == -1)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02137)
                                 "Error restoring default userid");
               }
               if (cfg->gid && (setgid(ap_unixd_config.group_id) == -1)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02138)
                                 "Error restoring default group");
               }
           }
       
           /* restore default privileges */
           if (setppriv(PRIV_SET, PRIV_EFFECTIVE, priv_default) == -1) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, APLOGNO(02139)
                             "Error restoring default privileges");
           }
           return APR_SUCCESS;
      @@ -216,14 +216,14 @@ static int privileges_req(request_rec *r)
              rv = apr_proc_fork(&proc, r->pool);
               switch (rv) {
               case APR_INPARENT:
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02140)
                                 "parent waiting for child");
                   /* FIXME - does the child need to run synchronously?
                    * esp. if we enable mod_privileges with threaded MPMs?
                    * We do need at least to ensure r outlives the child.
                    */
                   rv = apr_proc_wait(&proc, &exitcode, &exitwhy, APR_WAIT);
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "parent: child %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02141) "parent: child %s",
                                 (rv == APR_CHILD_DONE) ? "done" : "notdone");
       
                   /* The child has taken responsibility for reading all input
      @@ -239,10 +239,10 @@ static int privileges_req(request_rec *r)
                    */
                   return DONE;
               case APR_INCHILD:
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "In child!");
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02142) "In child!");
                   break;  /* now we'll drop privileges in the child */
               default:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02143)
                                 "Failed to fork secure child process!");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
      @@ -256,38 +256,38 @@ static int privileges_req(request_rec *r)
           /* set user and group if configured */
           if (cfg->uid || cfg->gid) {
               if (setppriv(PRIV_ON, PRIV_EFFECTIVE, priv_setid) == -1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02144)
                                 "No privilege to set user/group");
               }
               /* if we should be able to set these but can't, it could be
                * a serious security issue.  Bail out rather than risk it!
                */
               if (cfg->uid && (setuid(cfg->uid) == -1)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02145)
                                 "Error setting userid");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               if (cfg->gid && (setgid(cfg->gid) == -1)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02146)
                                 "Error setting group");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
           }
           /* set vhost's privileges */
           if (setppriv(PRIV_SET, PRIV_EFFECTIVE, cfg->priv) == -1) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, APLOGNO(02147)
                             "Error setting effective privileges");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           /* ... including those of any subprocesses */
           if (setppriv(PRIV_SET, PRIV_INHERITABLE, cfg->child_priv) == -1) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, APLOGNO(02148)
                             "Error setting inheritable privileges");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
           if (setppriv(PRIV_SET, PRIV_LIMIT, cfg->child_priv) == -1) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, APLOGNO(02149)
                             "Error setting limit privileges");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -295,7 +295,7 @@ static int privileges_req(request_rec *r)
           /* If we're in a child process, drop down PPERM too */
           if (fork_req) {
               if (setppriv(PRIV_SET, PRIV_PERMITTED, cfg->priv) == -1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r, APLOGNO(02150)
                                 "Error setting permitted privileges");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
      @@ -304,7 +304,7 @@ static int privileges_req(request_rec *r)
           return OK;
       }
       #define PDROP_CHECK(x) if (x == -1) { \
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s, \
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s, APLOGNO(02151) \
                            "Error dropping privileges"); \
               return !OK; \
           }
      @@ -362,16 +362,16 @@ static int privileges_postconf(apr_pool_t *pconf, apr_pool_t *plog,
           if (dtrace_enabled) {
               for (sp = s; sp != NULL; sp = sp->next) {
                   cfg = ap_get_module_config(sp->module_config, &privileges_module);
      -            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_KERNEL));
      -            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_PROC));
      -            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_USER));
      -            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_KERNEL));
      -            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_PROC));
      -            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_USER));
      +            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_KERNEL), APLOGNO(03168));
      +            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_PROC), APLOGNO(03169));
      +            CR_CHECK(priv_addset(cfg->priv, PRIV_DTRACE_USER), APLOGNO(03170));
      +            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_KERNEL), APLOGNO(03171));
      +            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_PROC), APLOGNO(03172));
      +            CR_CHECK(priv_addset(cfg->child_priv, PRIV_DTRACE_USER), APLOGNO(03173));
               }
      -        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_KERNEL));
      -        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_PROC));
      -        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_USER));
      +        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_KERNEL), APLOGNO(03174));
      +        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_PROC), APLOGNO(03175));
      +        CR_CHECK(priv_addset(priv_default, PRIV_DTRACE_USER), APLOGNO(03176));
           }
       
           /* set up priv_setid for per-request use */
      @@ -380,7 +380,7 @@ static int privileges_postconf(apr_pool_t *pconf, apr_pool_t *plog,
                                     apr_pool_cleanup_null);
           priv_emptyset(priv_setid);
           if (priv_addset(priv_setid, PRIV_PROC_SETID) == -1) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, errno, ptemp,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, errno, ptemp, APLOGNO(02152)
                             "priv_addset");
               return !OK;
           }
      @@ -393,13 +393,13 @@ static int privileges_init(apr_pool_t *pconf, apr_pool_t *plog,
           int threaded;
           int rv = ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded);
           if (rv != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_NOTICE, rv, ptemp,
      +        ap_log_perror(APLOG_MARK, APLOG_NOTICE, rv, ptemp, APLOGNO(02153)
                             "mod_privileges: unable to determine MPM characteristics."
                             "  Please ensure you are using a non-threaded MPM "
                             "with this module.");
           }
           if (threaded) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, ptemp,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, ptemp, APLOGNO(02154)
                             "mod_privileges is not compatible with a threaded MPM.");
               return !OK;
           }
      diff --git a/modules/arch/unix/mod_unixd.c b/modules/arch/unix/mod_unixd.c
      index d30ac4f1abc..f6e95007361 100644
      --- a/modules/arch/unix/mod_unixd.c
      +++ b/modules/arch/unix/mod_unixd.c
      @@ -96,7 +96,7 @@ static int set_group_privs(void)
                   uid_t uid = atol(&ap_unixd_config.user_name[1]);
       
                   if ((ent = getpwuid(uid)) == NULL) {
      -                ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02155)
                                "getpwuid: couldn't determine user name from uid %ld, "
                                "you probably need to modify the User directive",
                                (long)uid);
      @@ -115,7 +115,7 @@ static int set_group_privs(void)
                * setgid() is known to zap the group list.
                */
               if (setgid(ap_unixd_config.group_id) == -1) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02156)
                               "setgid: unable to set group id to Group %ld",
                               (long)ap_unixd_config.group_id);
                   return -1;
      @@ -124,7 +124,7 @@ static int set_group_privs(void)
               /* Reset `groups' attributes. */
       
               if (initgroups(name, ap_unixd_config.group_id) == -1) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02157)
                               "initgroups: unable to set groups for User %s "
                               "and Group %ld", name, (long)ap_unixd_config.group_id);
                   return -1;
      @@ -147,28 +147,28 @@ unixd_drop_privileges(apr_pool_t *pool, server_rec *s)
           if (NULL != ap_unixd_config.chroot_dir) {
               if (geteuid()) {
                   rv = errno;
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02158)
                                "Cannot chroot when not started as root");
                   return rv;
               }
       
               if (chdir(ap_unixd_config.chroot_dir) != 0) {
                   rv = errno;
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02159)
                                "Can't chdir to %s", ap_unixd_config.chroot_dir);
                   return rv;
               }
       
               if (chroot(ap_unixd_config.chroot_dir) != 0) {
                   rv = errno;
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02160)
                                "Can't chroot to %s", ap_unixd_config.chroot_dir);
                   return rv;
               }
       
               if (chdir("/") != 0) {
                   rv = errno;
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02161)
                                "Can't chdir to new root");
                   return rv;
               }
      @@ -181,7 +181,7 @@ unixd_drop_privileges(apr_pool_t *pool, server_rec *s)
       #endif
               setuid(ap_unixd_config.user_id) == -1)) {
               rv = errno;
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02162)
                           "setuid: unable to change to uid: %ld",
                           (long) ap_unixd_config.user_id);
               return rv;
      @@ -191,7 +191,7 @@ unixd_drop_privileges(apr_pool_t *pool, server_rec *s)
           if (ap_coredumpdir_configured) {
               if (prctl(PR_SET_DUMPABLE, 1)) {
                   rv = errno;
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02163)
                                "set dumpable failed - this child will not coredump"
                                " after software errors");
                   return rv;
      @@ -327,22 +327,22 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
       
           if (NULL != ap_unixd_config.chroot_dir) {
               if (geteuid()) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02164)
                                "Cannot chroot when not started as root");
                   return -1;
               }
               if (chdir(ap_unixd_config.chroot_dir) != 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02165)
                                "Can't chdir to %s", ap_unixd_config.chroot_dir);
                   return -1;
               }
               if (chroot(ap_unixd_config.chroot_dir) != 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02166)
                                "Can't chroot to %s", ap_unixd_config.chroot_dir);
                   return -1;
               }
               if (chdir("/") != 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02167)
                                "Can't chdir to new root");
                   return -1;
               }
      @@ -354,7 +354,7 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
               os_init_job_environment(NULL, ap_unixd_config.user_name, ap_exists_config_define("DEBUG")) != 0 ||
       #endif
               setuid(ap_unixd_config.user_id) == -1)) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02168)
                           "setuid: unable to change to uid: %ld",
                           (long) ap_unixd_config.user_id);
               return -1;
      @@ -363,7 +363,7 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
           /* this applies to Linux 2.4+ */
           if (ap_coredumpdir_configured) {
               if (prctl(PR_SET_DUMPABLE, 1)) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, APLOGNO(02169)
                                "set dumpable failed - this child will not coredump"
                                " after software errors");
               }
      diff --git a/modules/arch/win32/mod_isapi.c b/modules/arch/win32/mod_isapi.c
      index 4a370c36408..2e51d51538f 100644
      --- a/modules/arch/win32/mod_isapi.c
      +++ b/modules/arch/win32/mod_isapi.c
      @@ -27,7 +27,7 @@
        * It is a complete implementation of the ISAPI 2.0 specification,
        * except for "Microsoft extensions" to the API which provide
        * asynchronous I/O.  It is further extended to include additional
      - * "Microsoft extentions" through IIS 5.0, with some deficiencies
      + * "Microsoft extensions" through IIS 5.0, with some deficiencies
        * where one-to-one mappings don't exist.
        *
        * Refer to /manual/mod/mod_isapi.html for additional details on
      @@ -136,27 +136,27 @@ static const char *isapi_cmd_cachefile(cmd_parms *cmd, void *dummy,
            */
           fspec = ap_server_root_relative(cmd->pool, filename);
           if (!fspec) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, APR_EBADPATH, cmd->server,
      -                     "ISAPI: invalid module path, skipping %s", filename);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, APR_EBADPATH, cmd->server, APLOGNO(02103)
      +                     "invalid module path, skipping %s", filename);
               return NULL;
           }
           if ((rv = apr_stat(&tmp, fspec, APR_FINFO_TYPE,
                             cmd->temp_pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server,
      -            "ISAPI: unable to stat, skipping %s", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server, APLOGNO(02104)
      +                     "unable to stat, skipping %s", fspec);
               return NULL;
           }
           if (tmp.filetype != APR_REG) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -            "ISAPI: not a regular file, skipping %s", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(02105)
      +                     "not a regular file, skipping %s", fspec);
               return NULL;
           }
       
      -    /* Load the extention as cached (with null request_rec) */
      +    /* Load the extension as cached (with null request_rec) */
           rv = isapi_lookup(cmd->pool, cmd->server, NULL, fspec, &isa);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server,
      -                     "ISAPI: unable to cache, skipping %s", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, cmd->server, APLOGNO(02106)
      +                     "unable to cache, skipping %s", fspec);
               return NULL;
           }
       
      @@ -271,8 +271,8 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
           rv = apr_dso_load(&isa->handle, isa->filename, p);
           if (rv)
           {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "ISAPI: failed to load %s", isa->filename);
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02107)
      +                     "failed to load %s", isa->filename);
               isa->handle = NULL;
               return rv;
           }
      @@ -281,8 +281,8 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
                            "GetExtensionVersion");
           if (rv)
           {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "ISAPI: missing GetExtensionVersion() in %s",
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02108)
      +                     "missing GetExtensionVersion() in %s",
                            isa->filename);
               apr_dso_unload(isa->handle);
               isa->handle = NULL;
      @@ -293,8 +293,8 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
                            "HttpExtensionProc");
           if (rv)
           {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "ISAPI: missing HttpExtensionProc() in %s",
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02109)
      +                     "missing HttpExtensionProc() in %s",
                            isa->filename);
               apr_dso_unload(isa->handle);
               isa->handle = NULL;
      @@ -309,8 +309,8 @@ static apr_status_t isapi_load(apr_pool_t *p, server_rec *s, isapi_loaded *isa)
           /* Run GetExtensionVersion() */
           if (!(isa->GetExtensionVersion)(isa->isapi_version)) {
               apr_status_t rv = apr_get_os_error();
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "ISAPI: failed call to GetExtensionVersion() in %s",
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02110)
      +                     "failed call to GetExtensionVersion() in %s",
                            isa->filename);
               apr_dso_unload(isa->handle);
               isa->handle = NULL;
      @@ -753,7 +753,7 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
               /* Well... either there is no dwHttpStatusCode or it's HTTP_OK.
                * In any case, we don't have a good status to return yet...
                * Perhaps the one we came in with will be better. Let's use it,
      -         * if we were given one (note this is a pendantic case, it would
      +         * if we were given one (note this is a pedantic case, it would
                * normally be covered above unless the scan script code unset
                * the r->status). Should there be a check here as to whether
                * we are setting a valid response code?
      @@ -771,8 +771,8 @@ static apr_ssize_t send_response_header(isapi_cid *cid,
               cid->r->status = HTTP_OK;
               cid->r->status_line = ap_get_status_line(cid->r->status);
               cid->ecb->dwHttpStatusCode = cid->r->status;
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, cid->r,
      -                "ISAPI: Could not determine HTTP response code; using %d",
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, cid->r, APLOGNO(02111)
      +                "Could not determine HTTP response code; using %d",
                       cid->r->status);
           }
       
      @@ -842,9 +842,9 @@ static int APR_THREAD_FUNC regfnWriteClient(isapi_cid    *cid,
               rv = ap_pass_brigade(r->output_filters, bb);
               cid->response_sent = 1;
               if (rv != APR_SUCCESS)
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "ISAPI: WriteClient ap_pass_brigade "
      -                          "failed: %s", r->filename);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02984)
      +                          "WriteClient ap_pass_brigade failed: %s",
      +                          r->filename);
           }
       
           if ((flags & HSE_IO_ASYNC) && cid->completion) {
      @@ -877,8 +877,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
               /* Set the status to be returned when the HttpExtensionProc()
                * is done.
                * WARNING: Microsoft now advertises HSE_REQ_SEND_URL_REDIRECT_RESP
      -         *          and HSE_REQ_SEND_URL as equivalant per the Jan 2000 SDK.
      -         *          They most definately are not, even in their own samples.
      +         *          and HSE_REQ_SEND_URL as equivalent per the Jan 2000 SDK.
      +         *          They most definitely are not, even in their own samples.
                */
               apr_table_set (r->headers_out, "Location", buf_data);
               cid->r->status = cid->ecb->dwHttpStatusCode = HTTP_MOVED_TEMPORARILY;
      @@ -894,7 +894,7 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
               }
       
               /* Reset the method to GET */
      -        r->method = apr_pstrdup(r->pool, "GET");
      +        r->method = "GET";
               r->method_number = M_GET;
       
               /* Don't let anyone think there's still data */
      @@ -933,8 +933,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
                   rv = ap_pass_brigade(cid->r->output_filters, bb);
                   cid->response_sent = 1;
                   if (rv != APR_SUCCESS)
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                              "ISAPI: ServerSupport function "
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(03177)
      +                              "ServerSupportFunction "
                                     "HSE_REQ_SEND_RESPONSE_HEADER "
                                     "ap_pass_brigade failed: %s", r->filename);
                   return (rv == APR_SUCCESS);
      @@ -955,8 +955,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
                   return 1;
               }
               else if (cid->dconf.log_unsupported) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02671)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_DONE_WITH_SESSION is not supported: %s",
                                 r->filename);
               }
      @@ -1000,8 +1000,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           case HSE_REQ_GET_SSPI_INFO:
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                           "ISAPI: ServerSupportFunction HSE_REQ_GET_SSPI_INFO "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02672)
      +                           "ServerSupportFunction HSE_REQ_GET_SSPI_INFO "
                                  "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
               return 0;
      @@ -1017,8 +1017,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
                       r->args = apr_pstrdup(r->pool, (char*) buf_data);
               }
               if (cid->dconf.log_to_errlog)
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                          "ISAPI: %s: %s", cid->r->filename,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02985)
      +                          "%s: %s", cid->r->filename,
                                 (char*) buf_data);
               return 1;
       
      @@ -1035,8 +1035,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
                   return 1;
               }
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                      "ISAPI: ServerSupportFunction HSE_REQ_IO_COMPLETION "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02673)
      +                      "ServerSupportFunction HSE_REQ_IO_COMPLETION "
                             "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
               return 0;
      @@ -1055,8 +1055,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
               if (!cid->dconf.fake_async && (tf->dwFlags & HSE_IO_ASYNC)) {
                   if (cid->dconf.log_unsupported)
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                         "ISAPI: ServerSupportFunction HSE_REQ_TRANSMIT_FILE "
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02674)
      +                         "ServerSupportFunction HSE_REQ_TRANSMIT_FILE "
                                "as HSE_IO_ASYNC is not supported: %s", r->filename);
                   apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
                   return 0;
      @@ -1135,8 +1135,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
               rv = ap_pass_brigade(r->output_filters, bb);
               cid->response_sent = 1;
               if (rv != APR_SUCCESS)
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "ISAPI: ServerSupport function "
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(03178)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_TRANSMIT_FILE "
                                 "ap_pass_brigade failed: %s", r->filename);
       
      @@ -1170,8 +1170,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           case HSE_REQ_REFRESH_ISAPI_ACL:
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02675)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_REFRESH_ISAPI_ACL "
                                 "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
      @@ -1187,9 +1187,9 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
               int res = 0;
               if (!cid->dconf.fake_async) {
                   if (cid->dconf.log_unsupported)
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                            "ISAPI: asynchronous I/O not supported: %s",
      -                            r->filename);
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02986)
      +                              "asynchronous I/O not supported: %s",
      +                              r->filename);
                   apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
                   return 0;
               }
      @@ -1227,8 +1227,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           case HSE_REQ_GET_IMPERSONATION_TOKEN:  /* Added in ISAPI 4.0 */
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02676)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_GET_IMPERSONATION_TOKEN "
                                 "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
      @@ -1306,16 +1306,16 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           case HSE_REQ_ABORTIVE_CLOSE:
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction HSE_REQ_ABORTIVE_CLOSE"
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02677)
      +                          "ServerSupportFunction HSE_REQ_ABORTIVE_CLOSE"
                                 " is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
               return 0;
       
           case HSE_REQ_GET_CERT_INFO_EX:  /* Added in ISAPI 4.0 */
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02678)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_GET_CERT_INFO_EX "
                                 "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
      @@ -1348,8 +1348,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
                   rv = ap_pass_brigade(cid->r->output_filters, bb);
                   cid->response_sent = 1;
                   if (rv != APR_SUCCESS)
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                              "ISAPI: ServerSupport function "
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(03179)
      +                              "ServerSupportFunction "
                                     "HSE_REQ_SEND_RESPONSE_HEADER_EX "
                                     "ap_pass_brigade failed: %s", r->filename);
                   return (rv == APR_SUCCESS);
      @@ -1363,8 +1363,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           case HSE_REQ_CLOSE_CONNECTION:  /* Added after ISAPI 4.0 */
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02679)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_CLOSE_CONNECTION "
                                 "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
      @@ -1381,8 +1381,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
               /*  Undocumented - defined by the Microsoft Jan '00 Platform SDK
                */
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02680)
      +                          "ServerSupportFunction "
                                 "HSE_REQ_EXTENSION_TRIGGER "
                                 "is not supported: %s", r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
      @@ -1390,8 +1390,8 @@ static int APR_THREAD_FUNC regfnServerSupportFunction(isapi_cid    *cid,
       
           default:
               if (cid->dconf.log_unsupported)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: ServerSupportFunction (%d) not supported: "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02681)
      +                          "ServerSupportFunction (%d) not supported: "
                                 "%s", HSE_code, r->filename);
               apr_set_os_error(APR_FROM_OS_ERROR(ERROR_INVALID_PARAMETER));
               return 0;
      @@ -1415,7 +1415,7 @@ static apr_status_t isapi_handler (request_rec *r)
           apr_uint32_t read;
           int res;
       
      -    if(strcmp(r->handler, "isapi-isa")
      +    if (strcmp(r->handler, "isapi-isa")
               && strcmp(r->handler, "isapi-handler")) {
               /* Hang on to the isapi-isa for compatibility with older docs
                * (wtf did '-isa' mean in the first place?) but introduce
      @@ -1572,8 +1572,8 @@ static apr_status_t isapi_handler (request_rec *r)
               }
       
               if (!cid->completed || (rv != APR_SUCCESS)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "ISAPI: Failed to create completion mutex");
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02112)
      +                          "Failed to create completion mutex");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
           }
      @@ -1582,9 +1582,10 @@ static apr_status_t isapi_handler (request_rec *r)
           rv = (*isa->HttpExtensionProc)(cid->ecb);
       
           /* Check for a log message - and log it */
      -    if (cid->ecb->lpszLogData && *cid->ecb->lpszLogData)
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                      "ISAPI: %s: %s", r->filename, cid->ecb->lpszLogData);
      +    if (*cid->ecb->lpszLogData) {
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02113)
      +                      "%s: %s", r->filename, cid->ecb->lpszLogData);
      +    }
       
           switch(rv) {
               case 0:  /* Strange, but MS isapi accepts this as success */
      @@ -1614,8 +1615,8 @@ static apr_status_t isapi_handler (request_rec *r)
                       break;
                   }
                   else if (cid->dconf.log_unsupported) {
      -                 ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                               "ISAPI: asynch I/O result HSE_STATUS_PENDING "
      +                 ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02114)
      +                               "asynch I/O result HSE_STATUS_PENDING "
                                      "from HttpExtensionProc() is not supported: %s",
                                      r->filename);
                        r->status = HTTP_INTERNAL_SERVER_ERROR;
      @@ -1625,15 +1626,15 @@ static apr_status_t isapi_handler (request_rec *r)
               case HSE_STATUS_ERROR:
                   /* end response if we have yet to do so.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, apr_get_os_error(), r,
      -                          "ISAPI: HSE_STATUS_ERROR result from "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, apr_get_os_error(), r, APLOGNO(02115)
      +                          "HSE_STATUS_ERROR result from "
                                 "HttpExtensionProc(): %s", r->filename);
                   r->status = HTTP_INTERNAL_SERVER_ERROR;
                   break;
       
               default:
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, apr_get_os_error(), r,
      -                          "ISAPI: unrecognized result code %d "
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, apr_get_os_error(), r, APLOGNO(02116)
      +                          "unrecognized result code %d "
                                 "from HttpExtensionProc(): %s ",
                                 rv, r->filename);
                   r->status = HTTP_INTERNAL_SERVER_ERROR;
      @@ -1654,8 +1655,8 @@ static apr_status_t isapi_handler (request_rec *r)
               cid->response_sent = 1;
       
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "ISAPI: ap_pass_brigade failed to "
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02117)
      +                          "ap_pass_brigade failed to "
                                 "complete the response: %s ", r->filename);
               }
       
      @@ -1687,23 +1688,23 @@ static int isapi_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
       
           apr_pool_create_ex(&loaded.pool, pconf, NULL, NULL);
           if (!loaded.pool) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, NULL,
      -                     "ISAPI: could not create the isapi cache pool");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, NULL, APLOGNO(02118)
      +                     "could not create the isapi cache pool");
               return APR_EGENERAL;
           }
       
           loaded.hash = apr_hash_make(loaded.pool);
           if (!loaded.hash) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      -                     "ISAPI: Failed to create module cache");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(02119)
      +                     "Failed to create module cache");
               return APR_EGENERAL;
           }
       
           rv = apr_thread_mutex_create(&loaded.lock, APR_THREAD_MUTEX_DEFAULT,
                                        loaded.pool);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, rv, 0, NULL,
      -                     "ISAPI: Failed to create module cache lock");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(02682)
      +                     "Failed to create module cache lock");
               return rv;
           }
           return OK;
      diff --git a/modules/arch/win32/mod_isapi.dep b/modules/arch/win32/mod_isapi.dep
      new file mode 100644
      index 00000000000..b36dbcf7044
      --- /dev/null
      +++ b/modules/arch/win32/mod_isapi.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_isapi.mak
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      +
      +.\mod_isapi.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_core.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_script.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_isapi.h"\
      +	
      diff --git a/modules/arch/win32/mod_isapi.h b/modules/arch/win32/mod_isapi.h
      index 9f8bc93e3b0..6afa27b3cfc 100644
      --- a/modules/arch/win32/mod_isapi.h
      +++ b/modules/arch/win32/mod_isapi.h
      @@ -136,7 +136,7 @@ typedef struct HSE_SEND_HEADER_EX_INFO {
       #define HSE_IO_NODELAY 4096
       
       /* The Completion function prototype.  This callback may be fixed with
      - * the HSE_REQ_IO_COMPLETION ServerSupportFunction call, or overriden
      + * the HSE_REQ_IO_COMPLETION ServerSupportFunction call, or overridden
        * for the HSE_REQ_TRANSMIT_FILE call.
        */
       typedef void (APR_THREAD_FUNC *PFN_HSE_IO_COMPLETION)
      @@ -245,7 +245,7 @@ typedef apr_uint32_t (APR_THREAD_FUNC
       #define HSE_TERM_MUST_UNLOAD      1
       #define HSE_TERM_ADVISORY_UNLOAD  2
       
      -/* The shutdown entry point ptionally exported by an ISAPI handler, passed
      +/* The shutdown entry point optionally exported by an ISAPI handler, passed
        * HSE_TERM_MUST_UNLOAD or HSE_TERM_ADVISORY_UNLOAD.  The module may return
        * if passed HSE_TERM_ADVISORY_UNLOAD, and the module will remain loaded.
        * If the module returns 1 to HSE_TERM_ADVISORY_UNLOAD it is immediately
      diff --git a/modules/arch/win32/mod_isapi.mak b/modules/arch/win32/mod_isapi.mak
      new file mode 100644
      index 00000000000..cee9047471a
      --- /dev/null
      +++ b/modules/arch/win32/mod_isapi.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_isapi.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_isapi - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_isapi - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_isapi - Win32 Release" && "$(CFG)" != "mod_isapi - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_isapi.mak" CFG="mod_isapi - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_isapi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_isapi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_isapi - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_isapi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_isapi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_isapi.obj"
      +	-@erase "$(INTDIR)\mod_isapi.res"
      +	-@erase "$(INTDIR)\mod_isapi_src.idb"
      +	-@erase "$(INTDIR)\mod_isapi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_isapi.exp"
      +	-@erase "$(OUTDIR)\mod_isapi.lib"
      +	-@erase "$(OUTDIR)\mod_isapi.pdb"
      +	-@erase "$(OUTDIR)\mod_isapi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_isapi_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_isapi.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_isapi.so" /d LONG_NAME="isapi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_isapi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_isapi.pdb" /debug /out:"$(OUTDIR)\mod_isapi.so" /implib:"$(OUTDIR)\mod_isapi.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_isapi.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_isapi.obj" \
      +	"$(INTDIR)\mod_isapi.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_isapi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_isapi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_isapi.so"
      +   if exist .\Release\mod_isapi.so.manifest mt.exe -manifest .\Release\mod_isapi.so.manifest -outputresource:.\Release\mod_isapi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_isapi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_isapi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_isapi.obj"
      +	-@erase "$(INTDIR)\mod_isapi.res"
      +	-@erase "$(INTDIR)\mod_isapi_src.idb"
      +	-@erase "$(INTDIR)\mod_isapi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_isapi.exp"
      +	-@erase "$(OUTDIR)\mod_isapi.lib"
      +	-@erase "$(OUTDIR)\mod_isapi.pdb"
      +	-@erase "$(OUTDIR)\mod_isapi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_isapi_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_isapi.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_isapi.so" /d LONG_NAME="isapi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_isapi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_isapi.pdb" /debug /out:"$(OUTDIR)\mod_isapi.so" /implib:"$(OUTDIR)\mod_isapi.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_isapi.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_isapi.obj" \
      +	"$(INTDIR)\mod_isapi.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_isapi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_isapi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_isapi.so"
      +   if exist .\Debug\mod_isapi.so.manifest mt.exe -manifest .\Debug\mod_isapi.so.manifest -outputresource:.\Debug\mod_isapi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_isapi.dep")
      +!INCLUDE "mod_isapi.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_isapi.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_isapi - Win32 Release" || "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_isapi - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\arch\win32"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\arch\win32"
      +
      +!ELSEIF  "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\arch\win32"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\arch\win32"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_isapi - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\arch\win32"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\arch\win32"
      +
      +!ELSEIF  "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\arch\win32"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\arch\win32"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_isapi - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\arch\win32"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\arch\win32"
      +
      +!ELSEIF  "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\arch\win32"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\arch\win32"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_isapi - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_isapi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_isapi.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_isapi.so" /d LONG_NAME="isapi_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_isapi - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_isapi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_isapi.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_isapi.so" /d LONG_NAME="isapi_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_isapi.c
      +
      +"$(INTDIR)\mod_isapi.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/arch/win32/mod_win32.c b/modules/arch/win32/mod_win32.c
      index ec6809bca4c..bddc60d9f9d 100644
      --- a/modules/arch/win32/mod_win32.c
      +++ b/modules/arch/win32/mod_win32.c
      @@ -423,8 +423,8 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
               }
               else {
                   ap_log_error(APLOG_MARK, APLOG_INFO, 0, r->server,
      -                 strict ? "No ExecCGI verb found for files of type '%s'."
      -                        : "No ExecCGI or Open verb found for files of type '%s'.",
      +                 strict ? APLOGNO(03180) "No ExecCGI verb found for files of type '%s'."
      +                        : APLOGNO(03181) "No ExecCGI or Open verb found for files of type '%s'.",
                        ext);
               }
           }
      @@ -439,12 +439,12 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
                */
               if ((rv = apr_file_open(&fh, *cmd, APR_READ | APR_BUFFERED,
                                        APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02100)
                                 "Failed to open cgi file %s for testing", *cmd);
                   return rv;
               }
               if ((rv = apr_file_read(fh, buffer, &bytes)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02101)
                                 "Failed to read cgi file %s for testing", *cmd);
                   return rv;
               }
      @@ -505,7 +505,7 @@ static apr_status_t ap_cgi_build_command(const char **cmd, const char ***argv,
               }
           }
           if (!interpreter) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02102)
                             "%s is not executable; ensure interpreted scripts have "
                             "\"#!\" or \"'!\" first line", *cmd);
               return APR_EBADF;
      diff --git a/modules/cache/NWGNUcach_dsk b/modules/cache/NWGNUcach_dsk
      index be925da171e..1c45f344f0a 100644
      --- a/modules/cache/NWGNUcach_dsk
      +++ b/modules/cache/NWGNUcach_dsk
      @@ -99,7 +99,7 @@ endif
       # This is used by the link 'name' directive to name the nlm.  If left blank
       # TARGET_nlm (see below) will be used.
       #
      -NLM_NAME	= dsk_cach
      +NLM_NAME	= cach_dsk
       
       #
       # This is used by the link '-desc ' directive.
      @@ -111,7 +111,7 @@ NLM_DESCRIPTION	= Apache $(VERSION_STR) Memory Cache Sub-Module
       # This is used by the '-threadname' directive.  If left blank,
       # NLM_NAME Thread will be used.
       #
      -NLM_THREAD_NAME	= dsk_cach
      +NLM_THREAD_NAME	= $(NLM_NAME)
       
       #
       # If this is specified, it will override VERSION value in
      @@ -160,7 +160,7 @@ XDCDATA		=
       # If there is an NLM target, put it here
       #
       TARGET_nlm = \
      -	$(OBJDIR)/dsk_cach.nlm \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
       	$(EOLIST)
       
       #
      diff --git a/modules/cache/NWGNUcach_socache b/modules/cache/NWGNUcach_socache
      new file mode 100644
      index 00000000000..68b3cd9fe39
      --- /dev/null
      +++ b/modules/cache/NWGNUcach_socache
      @@ -0,0 +1,263 @@
      +#
      +# Declare the sub-directories to be built here
      +#
      +
      +SUBDIRS = \
      +	$(EOLIST)
      +
      +#
      +# Get the 'head' of the build environment.  This includes default targets and
      +# paths to tools
      +#
      +
      +include $(AP_WORK)/build/NWGNUhead.inc
      +
      +#
      +# build this level's files
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(APR)/include \
      +			$(APRUTIL)/include \
      +			$(SRC)/include \
      +			$(STDMOD)/generators \
      +			$(SERVER)/mpm/netware \
      +			$(NWOS) \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	= cach_socache
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Cache Socache Module
      +
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	= cach_socache
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	= 65536
      +
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# Declare all target files (you must add your files here)
      +#
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
      +	$(EOLIST)
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(OBJDIR)/mod_cache_socache.o \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(PRELUDE) \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	Apache2 \
      +	Libc \
      +	mod_cach \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	@libc.imp \
      +	@aprlib.imp \
      +	@httpd.imp \
      +	@mod_cache.imp \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	cache_socache_module \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs = \
      +	$(EOLIST)
      +
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(TARGET_lib)
      +
      +nlms :: libs $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +
      +#
      +# Any specialized rules here
      +#
      +
      +#
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/cache/NWGNUmakefile b/modules/cache/NWGNUmakefile
      index bc0c58fe9fa..e544df62c04 100644
      --- a/modules/cache/NWGNUmakefile
      +++ b/modules/cache/NWGNUmakefile
      @@ -154,6 +154,7 @@ XDCDATA		=
       TARGET_nlm = \
       	$(OBJDIR)/mod_cach.nlm \
       	$(OBJDIR)/cach_dsk.nlm \
      +	$(OBJDIR)/cach_socache.nlm \
       	$(OBJDIR)/socachdbm.nlm \
       	$(OBJDIR)/socachmem.nlm \
       	$(OBJDIR)/socachshmcb.nlm \
      diff --git a/modules/cache/NWGNUsocachdbm b/modules/cache/NWGNUsocachdbm
      index dc06af7df91..f67392429f3 100644
      --- a/modules/cache/NWGNUsocachdbm
      +++ b/modules/cache/NWGNUsocachdbm
      @@ -28,6 +28,7 @@ XINCDIRS	+= \
       			$(AP_WORK)/include \
       			$(AP_WORK)/server/mpm/netware \
       			$(NWOS) \
      +			$(STDMOD)/generators \
       			$(EOLIST)
       
       #
      diff --git a/modules/cache/NWGNUsocachmem b/modules/cache/NWGNUsocachmem
      index d8d10d8a345..cfbf815ec78 100644
      --- a/modules/cache/NWGNUsocachmem
      +++ b/modules/cache/NWGNUsocachmem
      @@ -26,6 +26,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(STDMOD)/generators \
       			$(AP_WORK)/server/mpm/netware \
       			$(NWOS) \
       			$(EOLIST)
      diff --git a/modules/cache/NWGNUsocachshmcb b/modules/cache/NWGNUsocachshmcb
      index 8f11c4b648d..bc1850ed7b1 100644
      --- a/modules/cache/NWGNUsocachshmcb
      +++ b/modules/cache/NWGNUsocachshmcb
      @@ -28,6 +28,7 @@ XINCDIRS	+= \
       			$(AP_WORK)/include \
       			$(AP_WORK)/server/mpm/netware \
       			$(NWOS) \
      +			$(STDMOD)/generators \
       			$(EOLIST)
       
       #
      diff --git a/modules/cache/cache_cache.c b/modules/cache/cache_cache.c
      deleted file mode 100644
      index b0dd5971230..00000000000
      --- a/modules/cache/cache_cache.c
      +++ /dev/null
      @@ -1,166 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr_general.h"
      -
      -#include "mod_cache.h"
      -#include "cache_hash.h"
      -#include "cache_pqueue.h"
      -#include "cache_cache.h"
      -
      -#if APR_HAVE_STDLIB_H
      -#include <stdlib.h>
      -#endif
      -#if APR_HAVE_STRING_H
      -#include <string.h>
      -#endif
      -
      -APLOG_USE_MODULE(cache);
      -
      -struct cache_cache_t  {
      -    int             max_entries;
      -    apr_size_t      max_size;
      -    apr_size_t      current_size;
      -    int             total_purges;
      -    long            queue_clock;
      -    cache_hash_t   *ht;
      -    cache_pqueue_t *pq;
      -    cache_pqueue_set_priority set_pri;
      -    cache_pqueue_get_priority get_pri;
      -    cache_cache_inc_frequency *inc_entry;
      -    cache_cache_get_size *size_entry;
      -    cache_cache_get_key *key_entry;
      -    cache_cache_free *free_entry;
      -};
      -
      -cache_cache_t* cache_init(int max_entries,
      -                                         apr_size_t max_size,
      -                                         cache_pqueue_get_priority get_pri,
      -                                         cache_pqueue_set_priority set_pri,
      -                                         cache_pqueue_getpos get_pos,
      -                                         cache_pqueue_setpos set_pos,
      -                                         cache_cache_inc_frequency *inc_entry,
      -                                         cache_cache_get_size *size_entry,
      -                                         cache_cache_get_key* key_entry,
      -                                         cache_cache_free *free_entry)
      -{
      -    cache_cache_t *tmp;
      -    tmp = ap_malloc(sizeof(cache_cache_t));
      -    tmp->max_entries = max_entries;
      -    tmp->max_size = max_size;
      -    tmp->current_size = 0;
      -    tmp->total_purges = 0;
      -    tmp->queue_clock = 0;
      -    tmp->get_pri = get_pri;
      -    tmp->set_pri = set_pri;
      -    tmp->inc_entry = inc_entry;
      -    tmp->size_entry = size_entry;
      -    tmp->key_entry = key_entry;
      -    tmp->free_entry = free_entry;
      -
      -    tmp->ht = cache_hash_make(max_entries);
      -    tmp->pq = cache_pq_init(max_entries, get_pri, get_pos, set_pos);
      -
      -    return tmp;
      -}
      -
      -void cache_free(cache_cache_t *c)
      -{
      -    cache_pq_free(c->pq);
      -    cache_hash_free(c->ht);
      -    free(c);
      -}
      -
      -
      -void* cache_find(cache_cache_t* c, const char *key)
      -{
      -    return cache_hash_get(c->ht, key, CACHE_HASH_KEY_STRING);
      -}
      -
      -void cache_update(cache_cache_t* c, void *entry)
      -{
      -    long old_priority;
      -    long new_priority;
      -
      -    old_priority = c->set_pri(c->queue_clock, entry);
      -    c->inc_entry(entry);
      -    new_priority = c->set_pri(c->queue_clock, entry);
      -    cache_pq_change_priority(c->pq, old_priority, new_priority, entry);
      -}
      -
      -void cache_insert(cache_cache_t* c, void *entry)
      -{
      -    void *ejected = NULL;
      -    long priority;
      -
      -    c->set_pri(c->queue_clock, entry);
      -    /* FIX: check if priority of bottom item is greater than inserted one */
      -    while ((cache_pq_size(c->pq) >= c->max_entries) ||
      -            ((c->current_size + c->size_entry(entry)) > c->max_size)) {
      -
      -        ejected = cache_pq_pop(c->pq);
      -        /* FIX: If ejected is NULL, we'll segfault here */
      -        priority = c->get_pri(ejected);
      -
      -        if (c->queue_clock > priority)
      -            c->queue_clock = priority;
      -
      -        cache_hash_set(c->ht,
      -                       c->key_entry(ejected),
      -                       CACHE_HASH_KEY_STRING,
      -                       NULL);
      -
      -        c->current_size -= c->size_entry(ejected);
      -        c->free_entry(ejected);
      -        c->total_purges++;
      -    }
      -    c->current_size += c->size_entry(entry);
      -
      -    cache_pq_insert(c->pq, entry);
      -    cache_hash_set(c->ht, c->key_entry(entry), CACHE_HASH_KEY_STRING, entry);
      -}
      -
      -void* cache_pop(cache_cache_t *c)
      -{
      -    void *entry;
      -
      -    if (!c)
      -        return NULL;
      -
      -    entry = cache_pq_pop(c->pq);
      -
      -    if (!entry)
      -        return NULL;
      -
      -    c->current_size -= c->size_entry(entry);
      -    cache_hash_set(c->ht, c->key_entry(entry), CACHE_HASH_KEY_STRING, NULL);
      -
      -    return entry;
      -}
      -
      -apr_status_t cache_remove(cache_cache_t *c, void *entry)
      -{
      -    apr_size_t entry_size = c->size_entry(entry);
      -    apr_status_t rc;
      -    rc = cache_pq_remove(c->pq, entry);
      -    if (rc != APR_SUCCESS)
      -        return rc;
      -
      -    cache_hash_set(c->ht, c->key_entry(entry), CACHE_HASH_KEY_STRING, NULL);
      -    c->current_size -= entry_size;
      -
      -    return APR_SUCCESS;
      -}
      diff --git a/modules/cache/cache_cache.h b/modules/cache/cache_cache.h
      deleted file mode 100644
      index 9532a98d3ef..00000000000
      --- a/modules/cache/cache_cache.h
      +++ /dev/null
      @@ -1,111 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file cache_cache.h
      - * @brief Cache Cache Functions
      - *
      - * @defgroup Cache_cache  Cache Functions
      - * @ingroup  MOD_CACHE
      - * @{
      - */
      -
      -#ifndef CACHE_CACHE_H
      -#define CACHE_CACHE_H
      -
      -#ifdef __cplusplus
      -extern "C" {
      -#endif
      -
      -#include "mod_cache.h"
      -
      -/** ADT for the cache */
      -typedef struct cache_cache_t cache_cache_t;
      -
      -/** callback to increment the frequency of a item */
      -typedef void cache_cache_inc_frequency(void*a);
      -/** callback to get the size of a item */
      -typedef apr_size_t cache_cache_get_size(void*a);
      -/** callback to get the key of a item */
      -typedef const char* cache_cache_get_key(void *a);
      -/** callback to free an entry */
      -typedef void cache_cache_free(void *a);
      -
      -/**
      - * initialize the cache ADT
      - * @param max_entries the number of entries in the cache
      - * @param max_size    the size of the cache
      - * @param get_pri     callback to get a priority of a entry
      - * @param set_pri     callback to set a priority of a entry
      - * @param get_pos     callback to get the position of a entry in the cache
      - * @param set_pos     callback to set the position of a entry in the cache
      - * @param inc_entry   callback to increment the frequency of a entry
      - * @param size_entry  callback to get the size of a entry
      - * @param key_entry   callback to get the key of a entry
      - * @param free_entry  callback to free an entry
      - */
      -cache_cache_t* cache_init(int max_entries,
      -                                         apr_size_t max_size,
      -                                         cache_pqueue_get_priority get_pri,
      -                                         cache_pqueue_set_priority set_pri,
      -                                         cache_pqueue_getpos get_pos,
      -                                         cache_pqueue_setpos set_pos,
      -                                         cache_cache_inc_frequency *inc_entry,
      -                                         cache_cache_get_size *size_entry,
      -                                         cache_cache_get_key *key_entry,
      -                                         cache_cache_free *free_entry);
      -
      -/**
      - * free up the cache
      - * @param c the cache
      - */
      -void cache_free(cache_cache_t *c);
      -/**
      - * find a entry in the cache, incrementing the frequency if found
      - * @param c the cache
      - * @param key the key
      - */
      -void* cache_find(cache_cache_t* c, const char *key);
      -/**
      - * insert a entry into the cache
      - * @param c the cache
      - * @param entry the entry
      - */
      -void cache_update(cache_cache_t* c, void *entry);
      -/**
      - * insert a entry into the cache
      - * @param c the cache
      - * @param entry the entry
      - */
      -void cache_insert(cache_cache_t* c, void *entry);
      -/**
      - * pop the lowest priority item off
      - * @param c the cache
      - * @returns the entry or NULL
      - */
      -void* cache_pop(cache_cache_t* c);
      -/**
      - * remove an item from the cache
      - * @param c the cache
      - * @param entry the actual entry (from a find)
      - */
      -apr_status_t cache_remove(cache_cache_t* c, void *entry);
      -#ifdef __cplusplus
      -}
      -#endif
      -
      -#endif /* !CACHE_CACHE_H */
      -/** @} */
      diff --git a/modules/cache/cache_common.h b/modules/cache/cache_common.h
      index cedce0767d2..9d56d28b66b 100644
      --- a/modules/cache/cache_common.h
      +++ b/modules/cache/cache_common.h
      @@ -45,6 +45,7 @@ typedef struct cache_control {
           unsigned int must_revalidate:1;
           unsigned int proxy_revalidate:1;
           unsigned int s_maxage:1;
      +    unsigned int invalidated:1; /* has this entity been invalidated? */
           apr_int64_t max_age_value; /* if positive, then set */
           apr_int64_t max_stale_value; /* if positive, then set */
           apr_int64_t min_fresh_value; /* if positive, then set */
      diff --git a/modules/cache/cache_hash.c b/modules/cache/cache_hash.c
      deleted file mode 100644
      index 57f7db17ca8..00000000000
      --- a/modules/cache/cache_hash.c
      +++ /dev/null
      @@ -1,279 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr_general.h"
      -
      -#include "mod_cache.h"
      -#include "cache_hash.h"
      -
      -#if APR_HAVE_STDLIB_H
      -#include <stdlib.h>
      -#endif
      -#if APR_HAVE_STRING_H
      -#include <string.h>
      -#endif
      -
      -
      -/*
      - * The internal form of a hash table.
      - *
      - * The table is an array indexed by the hash of the key; collisions
      - * are resolved by hanging a linked list of hash entries off each
      - * element of the array. Although this is a really simple design it
      - * isn't too bad given that pools have a low allocation overhead.
      - */
      -
      -typedef struct cache_hash_entry_t cache_hash_entry_t;
      -
      -struct cache_hash_entry_t {
      -    cache_hash_entry_t   *next;
      -    unsigned int         hash;
      -    const void           *key;
      -    apr_ssize_t          klen;
      -    const void           *val;
      -};
      -
      -/*
      - * Data structure for iterating through a hash table.
      - *
      - * We keep a pointer to the next hash entry here to allow the current
      - * hash entry to be freed or otherwise mangled between calls to
      - * cache_hash_next().
      - */
      -struct cache_hash_index_t {
      -    cache_hash_t         *ht;
      -    cache_hash_entry_t   *this, *next;
      -    int                  index;
      -};
      -
      -/*
      - * The size of the array is always a power of two. We use the maximum
      - * index rather than the size so that we can use bitwise-AND for
      - * modular arithmetic.
      - * The count of hash entries may be greater depending on the chosen
      - * collision rate.
      - */
      -struct cache_hash_t {
      -    cache_hash_entry_t   **array;
      -    cache_hash_index_t     iterator;  /* For cache_hash_first(NULL, ...) */
      -    int                  count, max;
      -};
      -
      -/*
      - * Hash creation functions.
      - */
      -static cache_hash_entry_t **alloc_array(cache_hash_t *ht, int max)
      -{
      -   return ap_calloc(1, sizeof(*ht->array) * (max + 1));
      -}
      -
      -cache_hash_t* cache_hash_make(apr_size_t size)
      -{
      -    cache_hash_t *ht;
      -    ht = ap_malloc(sizeof(cache_hash_t));
      -    ht->count = 0;
      -    ht->max = size;
      -    ht->array = alloc_array(ht, ht->max);
      -    return ht;
      -}
      -
      -void cache_hash_free(cache_hash_t *ht)
      -{
      -    if (ht) {
      -        if (ht->array) {
      -            free (ht->array);
      -        }
      -        free (ht);
      -    }
      -}
      -/*
      - * Hash iteration functions.
      - */
      -
      -cache_hash_index_t* cache_hash_next(cache_hash_index_t *hi)
      -{
      -    hi->this = hi->next;
      -    while (!hi->this) {
      -        if (hi->index > hi->ht->max)
      -            return NULL;
      -        hi->this = hi->ht->array[hi->index++];
      -    }
      -    hi->next = hi->this->next;
      -    return hi;
      -}
      -
      -cache_hash_index_t* cache_hash_first(cache_hash_t *ht)
      -{
      -    cache_hash_index_t *hi;
      -
      -    hi = &ht->iterator;
      -    hi->ht = ht;
      -    hi->index = 0;
      -    hi->this = NULL;
      -    hi->next = NULL;
      -    return cache_hash_next(hi);
      -}
      -
      -void cache_hash_this(cache_hash_index_t *hi,
      -                                  const void **key,
      -                                  apr_ssize_t *klen,
      -                                  void **val)
      -{
      -    if (key)  *key  = hi->this->key;
      -    if (klen) *klen = hi->this->klen;
      -    if (val)  *val  = (void *)hi->this->val;
      -}
      -
      -
      -/*
      - * This is where we keep the details of the hash function and control
      - * the maximum collision rate.
      - *
      - * If val is non-NULL it creates and initializes a new hash entry if
      - * there isn't already one there; it returns an updatable pointer so
      - * that hash entries can be removed.
      - */
      -
      -static cache_hash_entry_t **find_entry(cache_hash_t *ht,
      -                                       const void *key,
      -                                       apr_ssize_t klen,
      -                                       const void *val)
      -{
      -    cache_hash_entry_t **hep, *he;
      -    const unsigned char *p;
      -    unsigned int hash;
      -    apr_ssize_t i;
      -
      -    /*
      -     * This is the popular `times 33' hash algorithm which is used by
      -     * perl and also appears in Berkeley DB. This is one of the best
      -     * known hash functions for strings because it is both computed
      -     * very fast and distributes very well.
      -     *
      -     * The originator may be Dan Bernstein but the code in Berkeley DB
      -     * cites Chris Torek as the source. The best citation I have found
      -     * is "Chris Torek, Hash function for text in C, Usenet message
      -     * <27038@mimsy.umd.edu> in comp.lang.c , October, 1990." in Rich
      -     * Salz's USENIX 1992 paper about INN which can be found at
      -     * <http://citeseer.nj.nec.com/salz92internetnews.html>.
      -     *
      -     * The magic of number 33, i.e. why it works better than many other
      -     * constants, prime or not, has never been adequately explained by
      -     * anyone. So I try an explanation: if one experimentally tests all
      -     * multipliers between 1 and 256 (as I did while writing a low-level
      -     * data structure library some time ago) one detects that even
      -     * numbers are not useable at all. The remaining 128 odd numbers
      -     * (except for the number 1) work more or less all equally well.
      -     * They all distribute in an acceptable way and this way fill a hash
      -     * table with an average percent of approx. 86%.
      -     *
      -     * If one compares the chi^2 values of the variants (see
      -     * Bob Jenkins ``Hashing Frequently Asked Questions'' at
      -     * http://burtleburtle.net/bob/hash/hashfaq.html for a description
      -     * of chi^2), the number 33 not even has the best value. But the
      -     * number 33 and a few other equally good numbers like 17, 31, 63,
      -     * 127 and 129 have nevertheless a great advantage to the remaining
      -     * numbers in the large set of possible multipliers: their multiply
      -     * operation can be replaced by a faster operation based on just one
      -     * shift plus either a single addition or subtraction operation. And
      -     * because a hash function has to both distribute good _and_ has to
      -     * be very fast to compute, those few numbers should be preferred.
      -     *
      -     *                  -- Ralf S. Engelschall <rse@engelschall.com>
      -     */
      -    hash = 0;
      -    if (klen == CACHE_HASH_KEY_STRING) {
      -        for (p = key; *p; p++) {
      -            hash = hash * 33 + *p;
      -        }
      -        klen = p - (const unsigned char *)key;
      -    }
      -    else {
      -        for (p = key, i = klen; i; i--, p++) {
      -            hash = hash * 33 + *p;
      -        }
      -    }
      -
      -    /* scan linked list */
      -    for (hep = &ht->array[hash % ht->max], he = *hep;
      -         he;
      -         hep = &he->next, he = *hep) {
      -        if (he->hash == hash &&
      -            he->klen == klen &&
      -            memcmp(he->key, key, klen) == 0)
      -            break;
      -    }
      -    if (he || !val)
      -        return hep;
      -    /* add a new entry for non-NULL values */
      -    he = ap_malloc(sizeof(*he));
      -    he->next = NULL;
      -    he->hash = hash;
      -    he->key  = key;
      -    he->klen = klen;
      -    he->val  = val;
      -    *hep = he;
      -    ht->count++;
      -    return hep;
      -}
      -
      -void* cache_hash_get(cache_hash_t *ht,
      -                                   const void *key,
      -                                   apr_ssize_t klen)
      -{
      -    cache_hash_entry_t *he;
      -    he = *find_entry(ht, key, klen, NULL);
      -    if (he)
      -        return (void *)he->val;
      -    else
      -        return NULL;
      -}
      -
      -void* cache_hash_set(cache_hash_t *ht,
      -                                     const void *key,
      -                                     apr_ssize_t klen,
      -                                     const void *val)
      -{
      -    cache_hash_entry_t **hep, *tmp;
      -    const void *tval;
      -    hep = find_entry(ht, key, klen, val);
      -    if (*hep) {
      -        if (!val) {
      -            /* delete entry */
      -            tval = (*hep)->val;
      -            tmp = *hep;
      -            *hep = (*hep)->next;
      -            free(tmp);
      -            --ht->count;
      -        }
      -        else {
      -            /* replace entry */
      -            tval = (*hep)->val;
      -            (*hep)->val = val;
      -        }
      -        /* Return the object just removed from the cache to let the
      -         * caller clean it up. Cast the constness away upon return.
      -         */
      -        return (void *) tval;
      -    }
      -    /* else key not present and val==NULL */
      -    return NULL;
      -}
      -
      -int cache_hash_count(cache_hash_t *ht)
      -{
      -    return ht->count;
      -}
      diff --git a/modules/cache/cache_hash.h b/modules/cache/cache_hash.h
      deleted file mode 100644
      index 3ae98617703..00000000000
      --- a/modules/cache/cache_hash.h
      +++ /dev/null
      @@ -1,157 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file cache_hash.h
      - * @brief Cache Hash Tables
      - *
      - * @defgroup Cache_Hash  Hash Tables
      - * @ingroup  MOD_CACHE
      - * @{
      - */
      -
      -#ifndef CACHE_HASH_H
      -#define CACHE_HASH_H
      -
      -#ifdef __cplusplus
      -extern "C" {
      -#endif
      -
      -#include "mod_cache.h"
      -
      -/**
      - * When passing a key to cache_hash_set or cache_hash_get, this value can be
      - * passed to indicate a string-valued key, and have cache_hash compute the
      - * length automatically.
      - *
      - * @remark cache_hash will use strlen(key) for the length. The null-terminator
      - *         is not included in the hash value (why throw a constant in?).
      - *         Since the hash table merely references the provided key (rather
      - *         than copying it), cache_hash_this() will return the null-term'd key.
      - */
      -#define CACHE_HASH_KEY_STRING     (-1)
      -
      -/**
      - * Abstract type for hash tables.
      - */
      -typedef struct cache_hash_t cache_hash_t;
      -
      -/**
      - * Abstract type for scanning hash tables.
      - */
      -typedef struct cache_hash_index_t cache_hash_index_t;
      -
      -/**
      - * Create a hash table.
      - * @param size
      - * @return The hash table just created
      -  */
      -cache_hash_t* cache_hash_make(apr_size_t size);
      -
      -/**
      - * Create a hash table.
      - * @param *ht Pointer to the hash table to be freed.
      - * @return void
      - * @remark The caller should ensure that all objects have been removed
      - *         from the cache prior to calling cache_hash_free(). Objects
      - *         not removed from the cache prior to calling cache_hash_free()
      - *         will be unaccessable.
      - */
      -void cache_hash_free(cache_hash_t *ht);
      -
      -
      -/**
      - * Associate a value with a key in a hash table.
      - * @param ht The hash table
      - * @param key Pointer to the key
      - * @param klen Length of the key. Can be CACHE_HASH_KEY_STRING to use the string length.
      - * @param val Value to associate with the key
      - * @remark If the value is NULL the hash entry is deleted.
      - * @return The value of the deleted cache entry (so the caller can clean it up).
      - */
      -void* cache_hash_set(cache_hash_t *ht, const void *key,
      -                                     apr_ssize_t klen, const void *val);
      -
      -/**
      - * Look up the value associated with a key in a hash table.
      - * @param ht The hash table
      - * @param key Pointer to the key
      - * @param klen Length of the key. Can be CACHE_HASH_KEY_STRING to use the string length.
      - * @return Returns NULL if the key is not present.
      - */
      -void* cache_hash_get(cache_hash_t *ht, const void *key,
      -                                   apr_ssize_t klen);
      -
      -/**
      - * Start iterating over the entries in a hash table.
      - * @param ht The hash table
      - *
      - * Here is an example of using this:
      - * @code
      - *     int sum_values(cache_hash_t *ht)
      - *     {
      - *         cache_hash_index_t *hi;
      - *         void *val;
      - *         int sum = 0;
      - *         for (hi = cache_hash_first(ht); hi; hi = cache_hash_next(hi)) {
      - *             cache_hash_this(hi, NULL, NULL, &val);
      - *             sum += *(int *)val;
      - *         }
      - *         return sum;
      - *     }
      - * @endcode
      - *
      - * There is no restriction on adding or deleting hash entries during an
      - * iteration (although the results may be unpredictable unless all you do
      - * is delete the current entry) and multiple iterations can be in
      - * progress at the same time.
      -  */
      -cache_hash_index_t* cache_hash_first(cache_hash_t *ht);
      -
      -/**
      - * Continue iterating over the entries in a hash table.
      - * @param hi The iteration state
      - * @return a pointer to the updated iteration state.  NULL if there are no more
      - *         entries.
      - */
      -cache_hash_index_t* cache_hash_next(cache_hash_index_t *hi);
      -
      -/**
      - * Get the current entry's details from the iteration state.
      - * @param hi The iteration state
      - * @param key Return pointer for the pointer to the key.
      - * @param klen Return pointer for the key length.
      - * @param val Return pointer for the associated value.
      - * @remark The return pointers should point to a variable that will be set to the
      - *         corresponding data, or they may be NULL if the data isn't interesting.
      - */
      -void cache_hash_this(cache_hash_index_t *hi, const void **key,
      -                                  apr_ssize_t *klen, void **val);
      -
      -/**
      - * Get the number of key/value pairs in the hash table.
      - * @param ht The hash table
      - * @return The number of key/value pairs in the hash table.
      - */
      -int cache_hash_count(cache_hash_t *ht);
      -
      -
      -/** @} */
      -#ifdef __cplusplus
      -}
      -#endif
      -
      -#endif  /* !CACHE_HASH_H */
      diff --git a/modules/cache/cache_pqueue.c b/modules/cache/cache_pqueue.c
      deleted file mode 100644
      index 164bb9d26a3..00000000000
      --- a/modules/cache/cache_pqueue.c
      +++ /dev/null
      @@ -1,282 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr_general.h"
      -
      -#if APR_HAVE_STDLIB_H
      -#include <stdlib.h>
      -#endif
      -#if APR_HAVE_STDIO_H
      -#include <stdio.h>
      -#endif
      -
      -#if APR_HAVE_STRING_H
      -#include <string.h>
      -#endif
      -
      -#include "cache_pqueue.h"
      -#define left(i) (2*(i))
      -#define right(i) ((2*(i))+1)
      -#define parent(i) ((i)/2)
      -/*
      - *  Priority queue structure
      - */
      -struct cache_pqueue_t
      -{
      -    apr_ssize_t size;
      -    apr_ssize_t avail;
      -    apr_ssize_t step;
      -    cache_pqueue_get_priority pri;
      -    cache_pqueue_getpos get;
      -    cache_pqueue_setpos set;
      -    void **d;
      -};
      -
      -cache_pqueue_t *cache_pq_init(apr_ssize_t n,
      -                              cache_pqueue_get_priority pri,
      -                              cache_pqueue_getpos get,
      -                              cache_pqueue_setpos set)
      -{
      -    cache_pqueue_t *q = ap_malloc(sizeof(cache_pqueue_t));
      -    /* Need to allocate n+1 elements since element 0 isn't used. */
      -    q->d = ap_malloc(sizeof(void*) * (n+1));
      -    q->avail = q->step = (n+1);  /* see comment above about n+1 */
      -    q->pri = pri;
      -    q->size = 1;
      -    q->get = get;
      -    q->set = set;
      -    return q;
      -}
      -/*
      - * cleanup
      - */
      -void cache_pq_free(cache_pqueue_t *q)
      -{
      -    free(q->d);
      -    free(q);
      -}
      -/*
      - * pqsize: size of the queue.
      - */
      -apr_ssize_t cache_pq_size(cache_pqueue_t *q)
      -{
      -    /* queue element 0 exists but doesn't count since it isn't used. */
      -    return (q->size - 1);
      -}
      -
      -static void cache_pq_bubble_up(cache_pqueue_t *q, apr_ssize_t i)
      -{
      -    apr_ssize_t parent_node;
      -    void *moving_node = q->d[i];
      -    long moving_pri = q->pri(moving_node);
      -
      -    for (parent_node = parent(i);
      -         ((i > 1) && (q->pri(q->d[parent_node]) < moving_pri));
      -         i = parent_node, parent_node = parent(i))
      -    {
      -        q->d[i] = q->d[parent_node];
      -        q->set(q->d[i], i);
      -    }
      -
      -    q->d[i] = moving_node;
      -    q->set(moving_node, i);
      -}
      -
      -static apr_ssize_t maxchild(cache_pqueue_t *q, apr_ssize_t i)
      -{
      -    apr_ssize_t child_node = left(i);
      -
      -    if (child_node >= q->size)
      -        return 0;
      -
      -    if ((child_node+1 < q->size) &&
      -        (q->pri(q->d[child_node+1]) > q->pri(q->d[child_node])))
      -    {
      -        child_node++; /* use right child instead of left */
      -    }
      -
      -    return child_node;
      -}
      -
      -static void cache_pq_percolate_down(cache_pqueue_t *q, apr_ssize_t i)
      -{
      -    apr_ssize_t child_node;
      -    void *moving_node = q->d[i];
      -    long moving_pri = q->pri(moving_node);
      -
      -    while ((child_node = maxchild(q, i)) &&
      -           (moving_pri < q->pri(q->d[child_node])))
      -    {
      -        q->d[i] = q->d[child_node];
      -        q->set(q->d[i], i);
      -        i = child_node;
      -    }
      -
      -    q->d[i] = moving_node;
      -    q->set(moving_node, i);
      -}
      -
      -apr_status_t cache_pq_insert(cache_pqueue_t *q, void *d)
      -{
      -    void *tmp;
      -    apr_ssize_t i;
      -    apr_ssize_t newsize;
      -
      -    if (!q) return APR_EGENERAL;
      -
      -    /* allocate more memory if necessary */
      -    if (q->size >= q->avail) {
      -        newsize = q->size + q->step;
      -        if (!(tmp = ap_realloc(q->d, sizeof(void*) * newsize))) {
      -            return APR_EGENERAL;
      -        };
      -        q->d = tmp;
      -        q->avail = newsize;
      -    }
      -
      -    /* insert item */
      -    i = q->size++;
      -    q->d[i] = d;
      -    cache_pq_bubble_up(q, i);
      -    return APR_SUCCESS;
      -}
      -
      -/*
      - * move a existing entry to a new priority
      - */
      -void cache_pq_change_priority(cache_pqueue_t *q,
      -                              long old_priority,
      -                              long new_priority,
      -                              void *d)
      -{
      -    apr_ssize_t posn;
      -
      -    posn = q->get(d);
      -    if (new_priority > old_priority)
      -        cache_pq_bubble_up(q, posn);
      -    else
      -        cache_pq_percolate_down(q, posn);
      -}
      -
      -apr_status_t cache_pq_remove(cache_pqueue_t *q, void *d)
      -{
      -    apr_ssize_t posn = q->get(d);
      -    q->d[posn] = q->d[--q->size];
      -    if (q->pri(q->d[posn]) > q->pri(d))
      -        cache_pq_bubble_up(q, posn);
      -    else
      -        cache_pq_percolate_down(q, posn);
      -
      -    return APR_SUCCESS;
      -}
      -
      -void *cache_pq_pop(cache_pqueue_t *q)
      -{
      -    void *head;
      -
      -    if (!q || q->size == 1)
      -        return NULL;
      -
      -    head = q->d[1];
      -    q->d[1] = q->d[--q->size];
      -    cache_pq_percolate_down(q, 1);
      -
      -    return head;
      -}
      -
      -void *cache_pq_peek(cache_pqueue_t *q)
      -{
      -    void *d;
      -    if (!q || q->size == 1)
      -        return NULL;
      -    d = q->d[1];
      -    return d;
      -}
      -
      -static void cache_pq_set_null( void*d, apr_ssize_t val)
      -{
      -    /* do nothing */
      -}
      -
      -/*
      - * this is a debug function.. so it's EASY not fast
      - */
      -void cache_pq_dump(cache_pqueue_t *q,
      -                   FILE*out,
      -                   cache_pqueue_print_entry print)
      -{
      -    int i;
      -
      -    fprintf(stdout,"posn\tleft\tright\tparent\tmaxchild\t...\n");
      -    for (i = 1; i < q->size ;i++) {
      -        fprintf(stdout,
      -                "%d\t%d\t%d\t%d\t%" APR_SSIZE_T_FMT "\t",
      -                i,
      -                left(i), right(i), parent(i),
      -                maxchild(q, i));
      -        print(out, q->d[i]);
      -    }
      -}
      -
      -/*
      - * this is a debug function.. so it's EASY not fast
      - */
      -void cache_pq_print(cache_pqueue_t *q,
      -                    FILE*out,
      -                    cache_pqueue_print_entry print)
      -{
      -    cache_pqueue_t *dup;
      -    dup = cache_pq_init(q->size, q->pri, q->get, cache_pq_set_null);
      -    dup->size = q->size;
      -    dup->avail = q->avail;
      -    dup->step = q->step;
      -
      -    memcpy(dup->d, q->d, q->size*sizeof(void*));
      -
      -    while (cache_pq_size(dup) > 1) {
      -        void *e = NULL;
      -        e = cache_pq_pop(dup);
      -        if (e)
      -            print(out, e);
      -        else
      -            break;
      -    }
      -    cache_pq_free(dup);
      -}
      -
      -static int cache_pq_subtree_is_valid(cache_pqueue_t *q, int pos)
      -{
      -    if (left(pos) < q->size) {
      -        /* has a left child */
      -        if (q->pri(q->d[pos]) < q->pri(q->d[left(pos)]))
      -            return 0;
      -        if (!cache_pq_subtree_is_valid(q, left(pos)))
      -            return 0;
      -    }
      -    if (right(pos) < q->size) {
      -        /* has a right child */
      -        if (q->pri(q->d[pos]) < q->pri(q->d[right(pos)]))
      -            return 0;
      -        if (!cache_pq_subtree_is_valid(q, right(pos)))
      -            return 0;
      -    }
      -    return 1;
      -}
      -
      -int cache_pq_is_valid(cache_pqueue_t *q)
      -{
      -    return cache_pq_subtree_is_valid(q, 1);
      -}
      diff --git a/modules/cache/cache_pqueue.h b/modules/cache/cache_pqueue.h
      deleted file mode 100644
      index 9b73690517e..00000000000
      --- a/modules/cache/cache_pqueue.h
      +++ /dev/null
      @@ -1,168 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file  cache_pqueue.h
      - * @brief Cache Priority Queue function declarations
      - *
      - * @defgroup MOD_CACHE_QUEUE Priority Queue
      - * @ingroup  MOD_CACHE
      - * @{
      - */
      -
      -#ifndef CACHE_PQUEUE_H
      -#define CACHE_PQUEUE_H
      -
      -#include <apr.h>
      -#include <apr_errno.h>
      -
      -#if APR_HAVE_STDIO_H
      -#include <stdio.h>
      -#endif
      -
      -#ifdef __cplusplus
      -extern "C" {
      -#endif
      -
      -/** the cache priority queue handle */
      -typedef struct cache_pqueue_t cache_pqueue_t;
      -
      -/**
      - * callback function to assign a priority for a element
      - * @param a the element
      - * @return  the score (the lower the score the longer it is kept int the queue)
      - */
      -typedef long (*cache_pqueue_set_priority)(long queue_clock, void *a);
      -typedef long (*cache_pqueue_get_priority)(void *a);
      -
      -/** callback function to get a position of a element */
      -typedef apr_ssize_t (*cache_pqueue_getpos)(void *a);
      -
      -/**
      - * callback function to set a position of a element
      - * @param a   the element
      - * @param pos the position to set it to
      - */
      -typedef void (*cache_pqueue_setpos)(void *a, apr_ssize_t pos);
      -
      -/** debug callback function to print a entry */
      -typedef void (*cache_pqueue_print_entry)(FILE *out, void *a);
      -
      -/**
      - * initialize the queue
      - *
      - * @param n the initial estimate of the number of queue items for which memory
      - *          should be preallocated
      - * @param pri the callback function to run to assign a score to a element
      - * @param get the callback function to get the current element's position
      - * @param set the callback function to set the current element's position
      - *
      - * @return the handle or NULL for insufficent memory
      - */
      -cache_pqueue_t *cache_pq_init(apr_ssize_t n,
      -                              cache_pqueue_get_priority pri,
      -                              cache_pqueue_getpos get,
      -                              cache_pqueue_setpos set);
      -/**
      - * free all memory used by the queue
      - * @param q the queue
      - */
      -void cache_pq_free(cache_pqueue_t *q);
      -/**
      - * return the size of the queue.
      - * @param q the queue
      - */
      -apr_ssize_t cache_pq_size(cache_pqueue_t *q);
      -
      -/**
      - * insert an item into the queue.
      - * @param q the queue
      - * @param d the item
      - * @return APR_SUCCESS on success
      - */
      -apr_status_t cache_pq_insert(cache_pqueue_t *q, void *d);
      -
      -/*
      - * move a existing entry to a different priority
      - * @param q the queue
      - * @param old the old priority
      - * @param d the entry
      - */
      -void cache_pq_change_priority(cache_pqueue_t *q,
      -                              long old_priority,
      -                              long new_priority,
      -                              void *d);
      -
      -/**
      - * pop the highest-ranking item from the queue.
      - * @param q the queue
      - * @return NULL on error, otherwise the entry
      - */
      -void *cache_pq_pop(cache_pqueue_t *q);
      -
      -/**
      - * remove an item from the queue.
      - * @param q the queue
      - * @param d the entry
      - * @return APR_SUCCESS on success
      - */
      -apr_status_t cache_pq_remove(cache_pqueue_t *q, void *d);
      -
      -/**
      - * access highest-ranking item without removing it.
      - * @param q the queue
      - * @return NULL on error, otherwise the entry
      - */
      -void *cache_pq_peek(cache_pqueue_t *q);
      -
      -/**
      - * print the queue
      - * @internal
      - * DEBUG function only
      - * @param q the queue
      - * @param out the output handle
      - * @param print the callback function to print the entry
      - */
      -void cache_pq_print(cache_pqueue_t *q,
      -                    FILE *out,
      -                    cache_pqueue_print_entry print);
      -
      -/**
      - * dump the queue and its internal structure
      - * @internal
      - * debug function only
      - * @param q the queue
      - * @param out the output handle
      - * @param print the callback function to print the entry
      - */
      -void cache_pq_dump(cache_pqueue_t *q,
      -                   FILE *out,
      -                   cache_pqueue_print_entry print);
      -
      -/**
      - * checks that the pq is in the right order, etc
      - * @internal
      - * debug function only
      - * @param q the queue
      - */
      -int cache_pq_is_valid(cache_pqueue_t *q);
      -
      -#ifdef __cplusplus
      -}
      -#endif
      -
      -#endif /* !CACHE_PQUEUE_H */
      -/** @} */
      diff --git a/modules/cache/cache_socache_common.h b/modules/cache/cache_socache_common.h
      new file mode 100644
      index 00000000000..3ee3d0da347
      --- /dev/null
      +++ b/modules/cache/cache_socache_common.h
      @@ -0,0 +1,57 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +/**
      + * @file cache_socache_common.h
      + * @brief Common Shared Object Cache vars/structs
      + *
      + * @defgroup Cache_cache  Cache Functions
      + * @ingroup  MOD_SOCACHE_CACHE
      + * @{
      + */
      +
      +#ifndef CACHE_SOCACHE_COMMON_H
      +#define CACHE_SOCACHE_COMMON_H
      +
      +#include "apr_time.h"
      +
      +#include "cache_common.h"
      +
      +#define CACHE_SOCACHE_VARY_FORMAT_VERSION 1
      +#define CACHE_SOCACHE_DISK_FORMAT_VERSION 2
      +
      +typedef struct {
      +    /* Indicates the format of the header struct stored on-disk. */
      +    apr_uint32_t format;
      +    /* The HTTP status code returned for this response.  */
      +    int status;
      +    /* The size of the entity name that follows. */
      +    apr_size_t name_len;
      +    /* The number of times we've cached this entity. */
      +    apr_size_t entity_version;
      +    /* Miscellaneous time values. */
      +    apr_time_t date;
      +    apr_time_t expire;
      +    apr_time_t request_time;
      +    apr_time_t response_time;
      +    /* Does this cached request have a body? */
      +    unsigned int header_only:1;
      +    /* The parsed cache control header */
      +    cache_control_t control;
      +} cache_socache_info_t;
      +
      +#endif /* CACHE_SOCACHE_COMMON_H */
      +/** @} */
      diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c
      index dd0433e1d3b..1a75cc1d814 100644
      --- a/modules/cache/cache_storage.c
      +++ b/modules/cache/cache_storage.c
      @@ -46,11 +46,11 @@ int cache_remove_url(cache_request_rec *cache, request_rec *r)
           if (!h) {
              return OK;
           }
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00691)
                        "cache: Removing url %s from the cache", h->cache_obj->key);
       
           /* for each specified cache type, delete the URL */
      -    while(list) {
      +    while (list) {
               list->provider->remove_url(h, r);
               list = list->next;
           }
      @@ -78,7 +78,7 @@ int cache_create_entity(cache_request_rec *cache, request_rec *r,
       
           if (!cache) {
               /* This should never happen */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, APLOGNO(00692)
                       "cache: No cache request information available for key"
                       " generation");
               return APR_EGENERAL;
      @@ -113,26 +113,69 @@ int cache_create_entity(cache_request_rec *cache, request_rec *r,
           return DECLINED;
       }
       
      -static int set_cookie_doo_doo(void *v, const char *key, const char *val)
      +static int filter_header_do(void *v, const char *key, const char *val)
      +{
      +    if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")
      +            && *val == '1') {
      +        /* any stored Warning headers with warn-code 1xx (see section
      +         * 14.46) MUST be deleted from the cache entry and the forwarded
      +         * response.
      +         */
      +    }
      +    else {
      +        apr_table_addn(v, key, val);
      +    }
      +    return 1;
      +}
      +static int remove_header_do(void *v, const char *key, const char *val)
      +{
      +    if ((*key == 'W' || *key == 'w') && !ap_cstr_casecmp(key, "Warning")) {
      +        /* any stored Warning headers with warn-code 2xx MUST be retained
      +         * in the cache entry and the forwarded response.
      +         */
      +    }
      +    else {
      +        apr_table_unset(v, key);
      +    }
      +    return 1;
      +}
      +static int add_header_do(void *v, const char *key, const char *val)
       {
           apr_table_addn(v, key, val);
           return 1;
       }
       
       /**
      - * Take headers from the cache, and overlap them over the existing response
      - * headers.
      + * Take two sets of headers, sandwich them together, and apply the result to
      + * r->headers_out.
      + *
      + * To complicate this, a header may be duplicated in either table. Should a
      + * header exist in the top table, all matching headers will be removed from
      + * the bottom table before the headers are combined. The Warning headers are
      + * handled specially. Warnings are added rather than being replaced, while
      + * in the case of revalidation 1xx Warnings are stripped.
      + *
      + * The Content-Type and Last-Modified headers are then re-parsed and inserted
      + * into the request.
        */
      -void cache_accept_headers(cache_handle_t *h, request_rec *r,
      -        int preserve_orig)
      +void cache_accept_headers(cache_handle_t *h, request_rec *r, apr_table_t *top,
      +        apr_table_t *bottom, int revalidation)
       {
      -    apr_table_t *cookie_table, *hdr_copy;
           const char *v;
       
      -    v = apr_table_get(h->resp_hdrs, "Content-Type");
      +    if (revalidation) {
      +        r->headers_out = apr_table_make(r->pool, 10);
      +        apr_table_do(filter_header_do, r->headers_out, bottom, NULL);
      +    }
      +    else if (r->headers_out != bottom) {
      +        r->headers_out = apr_table_copy(r->pool, bottom);
      +    }
      +    apr_table_do(remove_header_do, r->headers_out, top, NULL);
      +    apr_table_do(add_header_do, r->headers_out, top, NULL);
      +
      +    v = apr_table_get(r->headers_out, "Content-Type");
           if (v) {
               ap_set_content_type(r, v);
      -        apr_table_unset(h->resp_hdrs, "Content-Type");
               /*
                * Also unset possible Content-Type headers in r->headers_out and
                * r->err_headers_out as they may be different to what we have received
      @@ -149,39 +192,12 @@ void cache_accept_headers(cache_handle_t *h, request_rec *r,
           /* If the cache gave us a Last-Modified header, we can't just
            * pass it on blindly because of restrictions on future values.
            */
      -    v = apr_table_get(h->resp_hdrs, "Last-Modified");
      +    v = apr_table_get(r->headers_out, "Last-Modified");
           if (v) {
               ap_update_mtime(r, apr_date_parse_http(v));
               ap_set_last_modified(r);
      -        apr_table_unset(h->resp_hdrs, "Last-Modified");
           }
       
      -    /* The HTTP specification says that it is legal to merge duplicate
      -     * headers into one.  Some browsers that support Cookies don't like
      -     * merged headers and prefer that each Set-Cookie header is sent
      -     * separately.  Lets humour those browsers by not merging.
      -     * Oh what a pain it is.
      -     */
      -    cookie_table = apr_table_make(r->pool, 2);
      -    apr_table_do(set_cookie_doo_doo, cookie_table, r->err_headers_out,
      -                 "Set-Cookie", NULL);
      -    apr_table_do(set_cookie_doo_doo, cookie_table, h->resp_hdrs,
      -                 "Set-Cookie", NULL);
      -    apr_table_unset(r->err_headers_out, "Set-Cookie");
      -    apr_table_unset(h->resp_hdrs, "Set-Cookie");
      -
      -    if (preserve_orig) {
      -        hdr_copy = apr_table_copy(r->pool, h->resp_hdrs);
      -        apr_table_overlap(hdr_copy, r->headers_out, APR_OVERLAP_TABLES_SET);
      -        r->headers_out = hdr_copy;
      -    }
      -    else {
      -        apr_table_overlap(r->headers_out, h->resp_hdrs, APR_OVERLAP_TABLES_SET);
      -    }
      -    if (!apr_is_empty_table(cookie_table)) {
      -        r->err_headers_out = apr_table_overlay(r->pool, r->err_headers_out,
      -                                               cookie_table);
      -    }
       }
       
       /*
      @@ -203,12 +219,19 @@ int cache_select(cache_request_rec *cache, request_rec *r)
       
           if (!cache) {
               /* This should never happen */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, APLOGNO(00693)
                       "cache: No cache request information available for key"
                       " generation");
               return DECLINED;
           }
       
      +    /* if no-cache, we can't serve from the cache, but we may store to the
      +     * cache.
      +     */
      +    if (!ap_cache_check_no_cache(cache, r)) {
      +        return DECLINED;
      +    }
      +
           if (!cache->key) {
               rv = cache_generate_key(r, r->pool, &cache->key);
               if (rv != APR_SUCCESS) {
      @@ -216,10 +239,6 @@ int cache_select(cache_request_rec *cache, request_rec *r)
               }
           }
       
      -    if (!ap_cache_check_allowed(cache, r)) {
      -        return DECLINED;
      -    }
      -
           /* go through the cache types till we get a match */
           h = apr_palloc(r->pool, sizeof(cache_handle_t));
       
      @@ -229,7 +248,8 @@ int cache_select(cache_request_rec *cache, request_rec *r)
               switch ((rv = list->provider->open_entity(h, r, cache->key))) {
               case OK: {
                   char *vary = NULL;
      -            int fresh, mismatch = 0;
      +            int mismatch = 0;
      +            char *last = NULL;
       
                   if (list->provider->recall_headers(h, r) != APR_SUCCESS) {
                       /* try again with next cache type */
      @@ -255,25 +275,19 @@ int cache_select(cache_request_rec *cache, request_rec *r)
                    *
                    * RFC2616 13.6 and 14.44 describe the Vary mechanism.
                    */
      -            vary = apr_pstrdup(r->pool, apr_table_get(h->resp_hdrs, "Vary"));
      -            while (vary && *vary) {
      -                char *name = vary;
      +            vary = cache_strqtok(
      +                    apr_pstrdup(r->pool,
      +                            cache_table_getm(r->pool, h->resp_hdrs, "Vary")),
      +                    CACHE_SEPARATOR, &last);
      +            while (vary) {
                       const char *h1, *h2;
       
      -                /* isolate header name */
      -                while (*vary && !apr_isspace(*vary) && (*vary != ','))
      -                    ++vary;
      -                while (*vary && (apr_isspace(*vary) || (*vary == ','))) {
      -                    *vary = '\0';
      -                    ++vary;
      -                }
      -
                       /*
                        * is this header in the request and the header in the cached
                        * request identical? If not, we give up and do a straight get
                        */
      -                h1 = apr_table_get(r->headers_in, name);
      -                h2 = apr_table_get(h->req_hdrs, name);
      +                h1 = cache_table_getm(r->pool, r->headers_in, vary);
      +                h2 = cache_table_getm(r->pool, h->req_hdrs, vary);
                       if (h1 == h2) {
                           /* both headers NULL, so a match - do nothing */
                       }
      @@ -283,9 +297,11 @@ int cache_select(cache_request_rec *cache, request_rec *r)
                       else {
                           /* headers do not match, so Vary failed */
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                            r, "cache_select_url(): Vary header mismatch.");
      +                            r, APLOGNO(00694) "cache_select(): Vary header mismatch.");
                           mismatch = 1;
      +                    break;
                       }
      +                vary = cache_strqtok(NULL, CACHE_SEPARATOR, &last);
                   }
       
                   /* no vary match, try next provider */
      @@ -298,9 +314,27 @@ int cache_select(cache_request_rec *cache, request_rec *r)
                   cache->provider = list->provider;
                   cache->provider_name = list->provider_name;
       
      +            /*
      +             * RFC2616 13.3.4 Rules for When to Use Entity Tags and Last-Modified
      +             * Dates: An HTTP/1.1 caching proxy, upon receiving a conditional request
      +             * that includes both a Last-Modified date and one or more entity tags as
      +             * cache validators, MUST NOT return a locally cached response to the
      +             * client unless that cached response is consistent with all of the
      +             * conditional header fields in the request.
      +             */
      +            if (ap_condition_if_match(r, h->resp_hdrs) == AP_CONDITION_NOMATCH
      +                    || ap_condition_if_unmodified_since(r, h->resp_hdrs)
      +                            == AP_CONDITION_NOMATCH
      +                    || ap_condition_if_none_match(r, h->resp_hdrs)
      +                            == AP_CONDITION_NOMATCH
      +                    || ap_condition_if_modified_since(r, h->resp_hdrs)
      +                            == AP_CONDITION_NOMATCH
      +                    || ap_condition_if_range(r, h->resp_hdrs) == AP_CONDITION_NOMATCH) {
      +                mismatch = 1;
      +            }
      +
                   /* Is our cached response fresh enough? */
      -            fresh = cache_check_freshness(h, cache, r);
      -            if (!fresh) {
      +            if (mismatch || !cache_check_freshness(h, cache, r)) {
                       const char *etag, *lastmod;
       
                       /* Cache-Control: only-if-cached and revalidation required, try
      @@ -317,42 +351,45 @@ int cache_select(cache_request_rec *cache, request_rec *r)
                               r->headers_in);
                       cache->stale_handle = h;
       
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      -                        "Cached response for %s isn't fresh.  Adding/replacing "
      -                        "conditional request headers.", r->uri);
      +                /* if no existing conditionals, use conditionals of our own */
      +                if (!mismatch) {
       
      -                /* We can only revalidate with our own conditionals: remove the
      -                 * conditions from the original request.
      -                 */
      -                apr_table_unset(r->headers_in, "If-Match");
      -                apr_table_unset(r->headers_in, "If-Modified-Since");
      -                apr_table_unset(r->headers_in, "If-None-Match");
      -                apr_table_unset(r->headers_in, "If-Range");
      -                apr_table_unset(r->headers_in, "If-Unmodified-Since");
      -
      -                etag = apr_table_get(h->resp_hdrs, "ETag");
      -                lastmod = apr_table_get(h->resp_hdrs, "Last-Modified");
      -
      -                if (etag || lastmod) {
      -                    /* If we have a cached etag and/or Last-Modified add in
      -                     * our own conditionals.
      -                     */
      +                    ap_log_rerror(
      +                            APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00695) "Cached response for %s isn't fresh. Adding "
      +                            "conditional request headers.", r->uri);
       
      -                    if (etag) {
      -                        apr_table_set(r->headers_in, "If-None-Match", etag);
      -                    }
      +                    /* Remove existing conditionals that might conflict with ours */
      +                    apr_table_unset(r->headers_in, "If-Match");
      +                    apr_table_unset(r->headers_in, "If-Modified-Since");
      +                    apr_table_unset(r->headers_in, "If-None-Match");
      +                    apr_table_unset(r->headers_in, "If-Range");
      +                    apr_table_unset(r->headers_in, "If-Unmodified-Since");
       
      -                    if (lastmod) {
      -                        apr_table_set(r->headers_in, "If-Modified-Since",
      -                                lastmod);
      -                    }
      +                    etag = apr_table_get(h->resp_hdrs, "ETag");
      +                    lastmod = apr_table_get(h->resp_hdrs, "Last-Modified");
       
      -                    /*
      -                     * Do not do Range requests with our own conditionals: If
      -                     * we get 304 the Range does not matter and otherwise the
      -                     * entity changed and we want to have the complete entity
      -                     */
      -                    apr_table_unset(r->headers_in, "Range");
      +                    if (etag || lastmod) {
      +                        /* If we have a cached etag and/or Last-Modified add in
      +                         * our own conditionals.
      +                         */
      +
      +                        if (etag) {
      +                            apr_table_set(r->headers_in, "If-None-Match", etag);
      +                        }
      +
      +                        if (lastmod) {
      +                            apr_table_set(r->headers_in, "If-Modified-Since",
      +                                    lastmod);
      +                        }
      +
      +                        /*
      +                         * Do not do Range requests with our own conditionals: If
      +                         * we get 304 the Range does not matter and otherwise the
      +                         * entity changed and we want to have the complete entity
      +                         */
      +                        apr_table_unset(r->headers_in, "Range");
      +
      +                    }
       
                       }
       
      @@ -361,7 +398,7 @@ int cache_select(cache_request_rec *cache, request_rec *r)
                   }
       
                   /* Okay, this response looks okay.  Merge in our stuff and go. */
      -            cache_accept_headers(h, r, 0);
      +            cache_accept_headers(h, r, h->resp_hdrs, r->headers_out, 0);
       
                   cache->handle = h;
                   return OK;
      @@ -380,7 +417,7 @@ int cache_select(cache_request_rec *cache, request_rec *r)
       
           /* if Cache-Control: only-if-cached, and not cached, return 504 */
           if (cache->control_in.only_if_cached) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00696)
                       "cache: 'only-if-cached' requested and no cached entity, "
                       "returning 504 Gateway Timeout for: %s", r->uri);
               return HTTP_GATEWAY_TIME_OUT;
      @@ -389,61 +426,17 @@ int cache_select(cache_request_rec *cache, request_rec *r)
           return DECLINED;
       }
       
      -/*
      - * invalidate a specific URL entity in all caches
      - *
      - * All cached entities for this URL are removed, usually in
      - * response to a POST/PUT or DELETE.
      - *
      - * This function returns OK if at least one entity was found and
      - * removed, and DECLINED if no cached entities were removed.
      - */
      -int cache_invalidate(cache_request_rec *cache, request_rec *r)
      -{
      -    cache_provider_list *list;
      -    apr_status_t rv, status = DECLINED;
      -    cache_handle_t *h;
      -
      -    if (!cache) {
      -        /* This should never happen */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r,
      -                "cache: No cache request information available for key"
      -                " generation");
      -        return DECLINED;
      -    }
      -
      -    if (!cache->key) {
      -        rv = cache_generate_key(r, r->pool, &cache->key);
      -        if (rv != APR_SUCCESS) {
      -            return DECLINED;
      -        }
      -    }
      -
      -    /* go through the cache types */
      -    h = apr_palloc(r->pool, sizeof(cache_handle_t));
      -
      -    list = cache->providers;
      -
      -    while (list) {
      -        rv = list->provider->open_entity(h, r, cache->key);
      -        if (OK == rv) {
      -            list->provider->remove_url(h, r);
      -            status = OK;
      -        }
      -        list = list->next;
      -    }
      -
      -    return status;
      -}
      -
      -apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
      -        const char **key)
      +static apr_status_t cache_canonicalise_key(request_rec *r, apr_pool_t* p,
      +                                           const char *uri, const char *query,
      +                                           apr_uri_t *parsed_uri,
      +                                           const char **key)
       {
           cache_server_conf *conf;
           char *port_str, *hn, *lcs;
           const char *hostname, *scheme;
           int i;
      -    char *path, *querystring;
      +    const char *path;
      +    char *querystring;
       
           if (*key) {
               /*
      @@ -457,7 +450,7 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
            * option below.
            */
           conf = (cache_server_conf *) ap_get_module_config(r->server->module_config,
      -                                                      &cache_module);
      +            &cache_module);
       
           /*
            * Use the canonical name to improve cache hit rate, but only if this is
      @@ -483,15 +476,15 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
               }
               else {
                   /* Use _default_ as the hostname if none present, as in mod_vhost */
      -            hostname =  ap_get_server_name(r);
      +            hostname = ap_get_server_name(r);
                   if (!hostname) {
                       hostname = "_default_";
                   }
               }
           }
      -    else if(r->parsed_uri.hostname) {
      +    else if (parsed_uri->hostname) {
               /* Copy the parsed uri hostname */
      -        hn = apr_pstrdup(p, r->parsed_uri.hostname);
      +        hn = apr_pstrdup(p, parsed_uri->hostname);
               ap_str_tolower(hn);
               /* const work-around */
               hostname = hn;
      @@ -510,9 +503,9 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
            * "no proxy request" and "reverse proxy request" are handled in the same
            * manner (see above why this is needed).
            */
      -    if (r->proxyreq && r->parsed_uri.scheme) {
      +    if (r->proxyreq && parsed_uri->scheme) {
               /* Copy the scheme and lower-case it */
      -        lcs = apr_pstrdup(p, r->parsed_uri.scheme);
      +        lcs = apr_pstrdup(p, parsed_uri->scheme);
               ap_str_tolower(lcs);
               /* const work-around */
               scheme = lcs;
      @@ -535,11 +528,11 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
            * server.
            */
           if (r->proxyreq && (r->proxyreq != PROXYREQ_REVERSE)) {
      -        if (r->parsed_uri.port_str) {
      -            port_str = apr_pcalloc(p, strlen(r->parsed_uri.port_str) + 2);
      +        if (parsed_uri->port_str) {
      +            port_str = apr_pcalloc(p, strlen(parsed_uri->port_str) + 2);
                   port_str[0] = ':';
      -            for (i = 0; r->parsed_uri.port_str[i]; i++) {
      -                port_str[i + 1] = apr_tolower(r->parsed_uri.port_str[i]);
      +            for (i = 0; parsed_uri->port_str[i]; i++) {
      +                port_str[i + 1] = apr_tolower(parsed_uri->port_str[i]);
                   }
               }
               else if (apr_uri_port_of_scheme(scheme)) {
      @@ -571,39 +564,39 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
            * Check if we need to ignore session identifiers in the URL and do so
            * if needed.
            */
      -    path = r->uri;
      -    querystring = r->parsed_uri.query;
      +    path = uri;
      +    querystring = apr_pstrdup(p, query ? query : parsed_uri->query);
           if (conf->ignore_session_id->nelts) {
               int i;
               char **identifier;
       
      -        identifier = (char **)conf->ignore_session_id->elts;
      +        identifier = (char **) conf->ignore_session_id->elts;
               for (i = 0; i < conf->ignore_session_id->nelts; i++, identifier++) {
                   int len;
      -            char *param;
      +            const char *param;
       
                   len = strlen(*identifier);
                   /*
                    * Check that we have a parameter separator in the last segment
                    * of the path and that the parameter matches our identifier
                    */
      -            if ((param = strrchr(path, ';'))
      -                && !strncmp(param + 1, *identifier, len)
      -                && (*(param + len + 1) == '=')
      -                && !strchr(param + len + 2, '/')) {
      -                path = apr_pstrndup(p, path, param - path);
      +            if ((param = ap_strrchr_c(path, ';'))
      +                    && !strncmp(param + 1, *identifier, len)
      +                    && (*(param + len + 1) == '=')
      +                    && !ap_strchr_c(param + len + 2, '/')) {
      +                path = apr_pstrmemdup(p, path, param - path);
                       continue;
                   }
                   /*
                    * Check if the identifier is in the querystring and cut it out.
                    */
      -            if (querystring) {
      +            if (querystring && *querystring) {
                       /*
                        * First check if the identifier is at the beginning of the
                        * querystring and followed by a '='
                        */
                       if (!strncmp(querystring, *identifier, len)
      -                    && (*(querystring + len) == '=')) {
      +                        && (*(querystring + len) == '=')) {
                           param = querystring;
                       }
                       else {
      @@ -614,25 +607,26 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
                            * identifier with a '&' and append a '='
                            */
                           complete = apr_pstrcat(p, "&", *identifier, "=", NULL);
      -                    param = strstr(querystring, complete);
      +                    param = ap_strstr_c(querystring, complete);
                           /* If we found something we are sitting on the '&' */
                           if (param) {
                               param++;
                           }
                       }
                       if (param) {
      -                    char *amp;
      +                    const char *amp;
       
                           if (querystring != param) {
                               querystring = apr_pstrndup(p, querystring,
      -                                               param - querystring);
      +                                param - querystring);
                           }
                           else {
                               querystring = "";
                           }
       
      -                    if ((amp = strchr(param + len + 1, '&'))) {
      -                        querystring = apr_pstrcat(p, querystring, amp + 1, NULL);
      +                    if ((amp = ap_strchr_c(param + len + 1, '&'))) {
      +                        querystring = apr_pstrcat(p, querystring, amp + 1,
      +                                NULL);
                           }
                           else {
                               /*
      @@ -652,12 +646,12 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
       
           /* Key format is a URI, optionally without the query-string */
           if (conf->ignorequerystring) {
      -        *key = apr_pstrcat(p, scheme, "://", hostname, port_str,
      -                           path, "?", NULL);
      +        *key = apr_pstrcat(p, scheme, "://", hostname, port_str, path, "?",
      +                NULL);
           }
           else {
      -        *key = apr_pstrcat(p, scheme, "://", hostname, port_str,
      -                           path, "?", querystring, NULL);
      +        *key = apr_pstrcat(p, scheme, "://", hostname, port_str, path, "?",
      +                querystring, NULL);
           }
       
           /*
      @@ -668,9 +662,127 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
            * resource in the cache under a key where it is never found by the quick
            * handler during following requests.
            */
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      -            "cache: Key for entity %s?%s is %s", r->uri,
      -            r->parsed_uri.query, *key);
      +    ap_log_rerror(
      +            APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00698) "cache: Key for entity %s?%s is %s", uri, parsed_uri->query, *key);
       
           return APR_SUCCESS;
       }
      +
      +apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
      +        const char **key)
      +{
      +    /* We want the actual query-string, which may differ from
      +     * r->parsed_uri.query (immutable), so use "" (not NULL).
      +     */
      +    const char *args = r->args ? r->args : "";
      +    return cache_canonicalise_key(r, p, r->uri, args, &r->parsed_uri, key);
      +}
      +
      +/*
      + * Invalidate a specific URL entity in all caches
      + *
      + * All cached entities for this URL are removed, usually in
      + * response to a POST/PUT or DELETE.
      + *
      + * This function returns OK if at least one entity was found and
      + * removed, and DECLINED if no cached entities were removed.
      + */
      +int cache_invalidate(cache_request_rec *cache, request_rec *r)
      +{
      +    cache_provider_list *list;
      +    apr_status_t rv, status = DECLINED;
      +    cache_handle_t *h;
      +    apr_uri_t location_uri;
      +    apr_uri_t content_location_uri;
      +
      +    const char *location, *location_key = NULL;
      +    const char *content_location, *content_location_key = NULL;
      +
      +    if (!cache) {
      +        /* This should never happen */
      +        ap_log_rerror(
      +                APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, APLOGNO(00697) "cache: No cache request information available for key"
      +                " generation");
      +        return DECLINED;
      +    }
      +
      +    if (!cache->key) {
      +        rv = cache_generate_key(r, r->pool, &cache->key);
      +        if (rv != APR_SUCCESS) {
      +            return DECLINED;
      +        }
      +    }
      +
      +    location = apr_table_get(r->headers_out, "Location");
      +    if (location) {
      +        if (apr_uri_parse(r->pool, location, &location_uri)
      +                || cache_canonicalise_key(r, r->pool,
      +                                          location, NULL,
      +                                          &location_uri, &location_key)
      +                || !(r->parsed_uri.hostname
      +                     && location_uri.hostname
      +                     && !strcmp(r->parsed_uri.hostname,
      +                                location_uri.hostname))) {
      +            location_key = NULL;
      +        }
      +    }
      +
      +    content_location = apr_table_get(r->headers_out, "Content-Location");
      +    if (content_location) {
      +        if (apr_uri_parse(r->pool, content_location,
      +                          &content_location_uri)
      +                || cache_canonicalise_key(r, r->pool,
      +                                          content_location, NULL,
      +                                          &content_location_uri,
      +                                          &content_location_key)
      +                || !(r->parsed_uri.hostname
      +                     && content_location_uri.hostname
      +                     && !strcmp(r->parsed_uri.hostname,
      +                                content_location_uri.hostname))) {
      +            content_location_key = NULL;
      +        }
      +    }
      +
      +    /* go through the cache types */
      +    h = apr_palloc(r->pool, sizeof(cache_handle_t));
      +
      +    list = cache->providers;
      +
      +    while (list) {
      +
      +        /* invalidate the request uri */
      +        rv = list->provider->open_entity(h, r, cache->key);
      +        if (OK == rv) {
      +            rv = list->provider->invalidate_entity(h, r);
      +            status = OK;
      +        }
      +        ap_log_rerror(
      +                APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02468) "cache: Attempted to invalidate cached entity with key: %s", cache->key);
      +
      +        /* invalidate the Location */
      +        if (location_key) {
      +            rv = list->provider->open_entity(h, r, location_key);
      +            if (OK == rv) {
      +                rv = list->provider->invalidate_entity(h, r);
      +                status = OK;
      +            }
      +            ap_log_rerror(
      +                    APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02469) "cache: Attempted to invalidate cached entity with key: %s", location_key);
      +        }
      +
      +        /* invalidate the Content-Location */
      +        if (content_location_key) {
      +            rv = list->provider->open_entity(h, r, content_location_key);
      +            if (OK == rv) {
      +                rv = list->provider->invalidate_entity(h, r);
      +                status = OK;
      +            }
      +            ap_log_rerror(
      +                    APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02470) "cache: Attempted to invalidate cached entity with key: %s", content_location_key);
      +        }
      +
      +        list = list->next;
      +    }
      +
      +    return status;
      +}
      diff --git a/modules/cache/cache_storage.h b/modules/cache/cache_storage.h
      index c40041f01ee..83f2946f5a2 100644
      --- a/modules/cache/cache_storage.h
      +++ b/modules/cache/cache_storage.h
      @@ -61,11 +61,12 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
        * Merge in cached headers into the response
        * @param h cache_handle_t
        * @param r request_rec
      - * @param preserve_orig If 1, the values in r->headers_out are preserved.
      - *        Otherwise, they are overwritten by the cached value.
      + * @param top headers to be applied
      + * @param bottom headers to be overwritten
      + * @param revalidation true if revalidation is taking place
        */
      -void cache_accept_headers(cache_handle_t *h, request_rec *r,
      -        int preserve_orig);
      +void cache_accept_headers(cache_handle_t *h, request_rec *r, apr_table_t *top,
      +        apr_table_t *bottom, int revalidation);
       
       #ifdef __cplusplus
       }
      diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c
      index a735cef274d..096058308e0 100644
      --- a/modules/cache/cache_util.c
      +++ b/modules/cache/cache_util.c
      @@ -27,14 +27,13 @@ extern APR_OPTIONAL_FN_TYPE(ap_cache_generate_key) *cache_generate_key;
       
       extern module AP_MODULE_DECLARE_DATA cache_module;
       
      -#define CACHE_SEPARATOR ",   "
      -
       /* Determine if "url" matches the hostname, scheme and port and path
        * in "filter". All but the path comparisons are case-insensitive.
        */
       static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
      -                                const apr_uri_t *url)
      +                                request_rec *r)
       {
      +    const apr_uri_t *url = &r->parsed_uri;
       
           /* Scheme, hostname port and local part. The filter URI and the
            * URI we test may have the following shapes:
      @@ -57,7 +56,7 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
           }
           else {
               /* The URI scheme must be present and identical except for case. */
      -        if (!url->scheme || strcasecmp(filter->scheme, url->scheme)) {
      +        if (!url->scheme || ap_cstr_casecmp(filter->scheme, url->scheme)) {
                   return 0;
               }
       
      @@ -72,8 +71,10 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
                       const size_t fhostlen = strlen(filter->hostname);
                       const size_t uhostlen = url->hostname ? strlen(url->hostname) : 0;
       
      -                if (fhostlen > uhostlen || strcasecmp(filter->hostname,
      -                        url->hostname + uhostlen - fhostlen)) {
      +                if (fhostlen > uhostlen
      +                    || (url->hostname
      +                        && strcasecmp(filter->hostname,
      +                                      url->hostname + uhostlen - fhostlen))) {
                           return 0;
                       }
                   }
      @@ -81,8 +82,10 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
                       const size_t fhostlen = strlen(filter->hostname + 1);
                       const size_t uhostlen = url->hostname ? strlen(url->hostname) : 0;
       
      -                if (fhostlen > uhostlen || strcasecmp(filter->hostname + 1,
      -                        url->hostname + uhostlen - fhostlen)) {
      +                if (fhostlen > uhostlen
      +                    || (url->hostname
      +                        && strcasecmp(filter->hostname + 1,
      +                                      url->hostname + uhostlen - fhostlen))) {
                           return 0;
                       }
                   }
      @@ -111,7 +114,7 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
           /* For HTTP caching purposes, an empty (NULL) path is equivalent to
            * a single "/" path. RFCs 3986/2396
            */
      -    if (!url->path) {
      +    if (!r->uri) {
               if (*filter->path == '/' && pathlen == 1) {
                   return 1;
               }
      @@ -123,7 +126,7 @@ static int uri_meets_conditions(const apr_uri_t *filter, const int pathlen,
           /* Url has met all of the filter conditions so far, determine
            * if the paths match.
            */
      -    return !strncmp(filter->path, url->path, pathlen);
      +    return !strncmp(filter->path, r->uri, pathlen);
       }
       
       static cache_provider_list *get_provider(request_rec *r, struct cache_enable *ent,
      @@ -165,10 +168,9 @@ static cache_provider_list *get_provider(request_rec *r, struct cache_enable *en
       }
       
       cache_provider_list *cache_get_providers(request_rec *r,
      -        cache_server_conf *conf,
      -        apr_uri_t uri)
      +                                         cache_server_conf *conf)
       {
      -    cache_dir_conf *dconf = dconf = ap_get_module_config(r->per_dir_config, &cache_module);
      +    cache_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &cache_module);
           cache_provider_list *providers = NULL;
           int i;
       
      @@ -181,7 +183,7 @@ cache_provider_list *cache_get_providers(request_rec *r,
           for (i = 0; i < conf->cachedisable->nelts; i++) {
               struct cache_disable *ent =
                                      (struct cache_disable *)conf->cachedisable->elts;
      -        if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, &uri)) {
      +        if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, r)) {
                   /* Stop searching now. */
                   return NULL;
               }
      @@ -198,7 +200,7 @@ cache_provider_list *cache_get_providers(request_rec *r,
           for (i = 0; i < conf->cacheenable->nelts; i++) {
               struct cache_enable *ent =
                                       (struct cache_enable *)conf->cacheenable->elts;
      -        if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, &uri)) {
      +        if (uri_meets_conditions(&ent[i].url, ent[i].pathlen, r)) {
                   providers = get_provider(r, &ent[i], providers);
               }
           }
      @@ -238,7 +240,7 @@ CACHE_DECLARE(apr_int64_t) ap_cache_current_age(cache_info *info,
        * Try obtain a cache wide lock on the given cache key.
        *
        * If we return APR_SUCCESS, we obtained the lock, and we are clear to
      - * proceed to the backend. If we return APR_EEXISTS, then the lock is
      + * proceed to the backend. If we return APR_EEXIST, then the lock is
        * already locked, someone else has gone to refresh the backend data
        * already, so we must return stale data with a warning in the mean
        * time. If we return anything else, then something has gone pear
      @@ -282,7 +284,25 @@ apr_status_t cache_try_lock(cache_server_conf *conf, cache_request_rec *cache,
       
           /* create the key if it doesn't exist */
           if (!cache->key) {
      -        cache_generate_key(r, r->pool, &cache->key);
      +        cache_handle_t *h;
      +        /*
      +         * Try to use the key of a possible open but stale cache
      +         * entry if we have one.
      +         */
      +        if (cache->handle != NULL) {
      +            h = cache->handle;
      +        }
      +        else {
      +            h = cache->stale_handle;
      +        }
      +        if ((h != NULL) &&
      +            (h->cache_obj != NULL) &&
      +            (h->cache_obj->key != NULL)) {
      +            cache->key = apr_pstrdup(r->pool, h->cache_obj->key);
      +        }
      +        else {
      +            cache_generate_key(r, r->pool, &cache->key);
      +        }
           }
       
           /* create a hashed filename from the key, and save it for later */
      @@ -301,7 +321,7 @@ apr_status_t cache_try_lock(cache_server_conf *conf, cache_request_rec *cache,
           path = apr_pstrcat(r->pool, conf->lockpath, dir, NULL);
           if (APR_SUCCESS != (status = apr_dir_make_recursive(path,
                   APR_UREAD|APR_UWRITE|APR_UEXECUTE, r->pool))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00778)
                       "Could not create a cache lock directory: %s",
                       path);
               return status;
      @@ -313,14 +333,14 @@ apr_status_t cache_try_lock(cache_server_conf *conf, cache_request_rec *cache,
           status = apr_stat(&finfo, lockname,
                       APR_FINFO_MTIME | APR_FINFO_NLINK, r->pool);
           if (!(APR_STATUS_IS_ENOENT(status)) && APR_SUCCESS != status) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EEXIST, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00779)
                       "Could not stat a cache lock file: %s",
                       lockname);
               return status;
           }
           if ((status == APR_SUCCESS) && (((now - finfo.mtime) > conf->lockmaxage)
                                         || (now < finfo.mtime))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r, APLOGNO(00780)
                       "Cache lock file for '%s' too old, removing: %s",
                       r->uri, lockname);
               apr_file_remove(lockname, r->pool);
      @@ -408,9 +428,9 @@ apr_status_t cache_remove_lock(cache_server_conf *conf,
           return apr_file_remove(lockname, r->pool);
       }
       
      -CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec *r) {
      -    const char *cc_req;
      -    const char *pragma;
      +int ap_cache_check_no_cache(cache_request_rec *cache, request_rec *r)
      +{
      +
           cache_server_conf *conf =
             (cache_server_conf *)ap_get_module_config(r->server->module_config,
                                                       &cache_module);
      @@ -425,16 +445,15 @@ CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec
            * - RFC2616 14.9.4 End to end reload, Cache-Control: no-cache, or Pragma:
            * no-cache. The server MUST NOT use a cached copy when responding to such
            * a request.
      -     *
      -     * - RFC2616 14.9.2 What May be Stored by Caches. If Cache-Control:
      -     * no-store arrives, do not serve from the cache.
            */
       
           /* This value comes from the client's initial request. */
      -    cc_req = apr_table_get(r->headers_in, "Cache-Control");
      -    pragma = apr_table_get(r->headers_in, "Pragma");
      -
      -    ap_cache_control(r, &cache->control_in, cc_req, pragma, r->headers_in);
      +    if (!cache->control_in.parsed) {
      +        const char *cc_req = cache_table_getm(r->pool, r->headers_in,
      +                "Cache-Control");
      +        const char *pragma = cache_table_getm(r->pool, r->headers_in, "Pragma");
      +        ap_cache_control(r, &cache->control_in, cc_req, pragma, r->headers_in);
      +    }
       
           if (cache->control_in.no_cache) {
       
      @@ -442,13 +461,39 @@ CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec
                   return 0;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02657)
                           "Incoming request is asking for an uncached version of "
                           "%s, but we have been configured to ignore it and serve "
                           "cached content anyway", r->unparsed_uri);
               }
           }
       
      +    return 1;
      +}
      +
      +int ap_cache_check_no_store(cache_request_rec *cache, request_rec *r)
      +{
      +
      +    cache_server_conf *conf =
      +      (cache_server_conf *)ap_get_module_config(r->server->module_config,
      +                                                &cache_module);
      +
      +    /*
      +     * At this point, we may have data cached, but the request may have
      +     * specified that cached data may not be used in a response.
      +     *
      +     * - RFC2616 14.9.2 What May be Stored by Caches. If Cache-Control:
      +     * no-store arrives, do not serve from or store to the cache.
      +     */
      +
      +    /* This value comes from the client's initial request. */
      +    if (!cache->control_in.parsed) {
      +        const char *cc_req = cache_table_getm(r->pool, r->headers_in,
      +                "Cache-Control");
      +        const char *pragma = cache_table_getm(r->pool, r->headers_in, "Pragma");
      +        ap_cache_control(r, &cache->control_in, cc_req, pragma, r->headers_in);
      +    }
      +
           if (cache->control_in.no_store) {
       
               if (!conf->ignorecachecontrol) {
      @@ -456,7 +501,7 @@ CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec
                   return 0;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02658)
                           "Incoming request is asking for a no-store version of "
                           "%s, but we have been configured to ignore it and serve "
                           "cached content anyway", r->unparsed_uri);
      @@ -466,7 +511,6 @@ CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec
           return 1;
       }
       
      -
       int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
               request_rec *r)
       {
      @@ -530,7 +574,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
                   return 0;
               }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00781)
                       "Incoming request is asking for a uncached version of "
                       "%s, but we have been configured to ignore it and "
                       "serve a cached response anyway",
      @@ -539,18 +583,23 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
       
           /* These come from the cached entity. */
           if (h->cache_obj->info.control.no_cache
      -            || h->cache_obj->info.control.no_cache_header
      -            || h->cache_obj->info.control.private_header) {
      +            || h->cache_obj->info.control.invalidated) {
               /*
                * The cached entity contained Cache-Control: no-cache, or a
                * no-cache with a header present, or a private with a header
      -         * present, so treat as stale causing revalidation.
      +         * present, or the cached entity has been invalidated in the
      +         * past, so treat as stale causing revalidation.
                */
               return 0;
           }
       
           if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) {
      -        age_c = apr_atoi64(agestr);
      +        char *endp;
      +        apr_off_t offt;
      +        if (!apr_strtoff(&offt, agestr, &endp, 10)
      +                && endp > agestr && !*endp) {
      +            age_c = offt;
      +        }
           }
       
           /* calculate age of object */
      @@ -703,15 +752,15 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
           status = cache_try_lock(conf, cache, r);
           if (APR_SUCCESS == status) {
               /* we obtained a lock, follow the stale path */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00782)
                       "Cache lock obtained for stale cached URL, "
                       "revalidating entry: %s",
                       r->unparsed_uri);
               return 0;
           }
      -    else if (APR_EEXIST == status) {
      +    else if (APR_STATUS_IS_EEXIST(status)) {
               /* lock already exists, return stale data anyway, with a warning */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00783)
                       "Cache already locked for stale cached URL, "
                       "pretend it is fresh: %s",
                       r->unparsed_uri);
      @@ -728,7 +777,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
           }
           else {
               /* some other error occurred, just treat the object as stale */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00784)
                       "Attempt to obtain a cache lock for stale "
                       "cached URL failed, revalidating entry anyway: %s",
                       r->unparsed_uri);
      @@ -737,109 +786,6 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
       
       }
       
      -/*
      - * list is a comma-separated list of case-insensitive tokens, with
      - * optional whitespace around the tokens.
      - * The return returns 1 if the token val is found in the list, or 0
      - * otherwise.
      - */
      -CACHE_DECLARE(int) ap_cache_liststr(apr_pool_t *p, const char *list,
      -                                    const char *key, char **val)
      -{
      -    apr_size_t key_len;
      -    const char *next;
      -
      -    if (!list) {
      -        return 0;
      -    }
      -
      -    key_len = strlen(key);
      -    next = list;
      -
      -    for (;;) {
      -
      -        /* skip whitespace and commas to find the start of the next key */
      -        while (*next && (apr_isspace(*next) || (*next == ','))) {
      -            next++;
      -        }
      -
      -        if (!*next) {
      -            return 0;
      -        }
      -
      -        if (!strncasecmp(next, key, key_len)) {
      -            /* this field matches the key (though it might just be
      -             * a prefix match, so make sure the match is followed
      -             * by either a space or an equals sign)
      -             */
      -            next += key_len;
      -            if (!*next || (*next == '=') || apr_isspace(*next) ||
      -                (*next == ',')) {
      -                /* valid match */
      -                if (val) {
      -                    while (*next && (*next != '=') && (*next != ',')) {
      -                        next++;
      -                    }
      -                    if (*next == '=') {
      -                        next++;
      -                        while (*next && apr_isspace(*next )) {
      -                            next++;
      -                        }
      -                        if (!*next) {
      -                            *val = NULL;
      -                        }
      -                        else {
      -                            const char *val_start = next;
      -                            while (*next && !apr_isspace(*next) &&
      -                                   (*next != ',')) {
      -                                /* EAT QUOTED STRING */
      -                                if (*next == '"' || *next == '\'') {
      -                                    char delim = *next;
      -                                    while (*++next != delim) {
      -                                        if (!*next) {
      -                                            return 0;
      -                                        }
      -                                        else if (*next == '\\') {
      -                                            ++next;
      -                                        }
      -                                    }
      -                                }
      -                                next++;
      -                            }
      -                            *val = apr_pstrmemdup(p, val_start,
      -                                                  next - val_start);
      -                        }
      -                    }
      -                    else {
      -                        *val = NULL;
      -                    }
      -                }
      -                return 1;
      -            }
      -        }
      -
      -        /* skip to the next field */
      -        do {
      -            /* EAT QUOTED STRING */
      -            if (*next == '"' || *next == '\'') {
      -                char delim = *next;
      -                while (*++next != delim) {
      -                    if (!*next) {
      -                        return 0;
      -                    }
      -                    else if (*next == '\\') {
      -                        ++next;
      -                    }
      -                }
      -            }
      -            next++;
      -            if (!*next) {
      -                return 0;
      -            }
      -        } while (*next != ',');
      -    }
      -}
      -
       /* return each comma separated token, one at a time */
       CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list,
                                                  const char **str)
      @@ -957,100 +903,11 @@ CACHE_DECLARE(char *)ap_cache_generate_name(apr_pool_t *p, int dirlevels,
           return apr_pstrdup(p, hashfile);
       }
       
      -/*
      - * Create a new table consisting of those elements from an
      - * headers table that are allowed to be stored in a cache.
      - */
      -CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers(apr_pool_t *pool,
      -                                                        apr_table_t *t,
      -                                                        server_rec *s)
      -{
      -    cache_server_conf *conf;
      -    char **header;
      -    int i;
      -    apr_table_t *headers_out;
      -
      -    /* Short circuit the common case that there are not
      -     * (yet) any headers populated.
      -     */
      -    if (t == NULL) {
      -        return apr_table_make(pool, 10);
      -    };
      -
      -    /* Make a copy of the headers, and remove from
      -     * the copy any hop-by-hop headers, as defined in Section
      -     * 13.5.1 of RFC 2616
      -     */
      -    headers_out = apr_table_copy(pool, t);
      -
      -    apr_table_unset(headers_out, "Connection");
      -    apr_table_unset(headers_out, "Keep-Alive");
      -    apr_table_unset(headers_out, "Proxy-Authenticate");
      -    apr_table_unset(headers_out, "Proxy-Authorization");
      -    apr_table_unset(headers_out, "TE");
      -    apr_table_unset(headers_out, "Trailers");
      -    apr_table_unset(headers_out, "Transfer-Encoding");
      -    apr_table_unset(headers_out, "Upgrade");
      -
      -    conf = (cache_server_conf *)ap_get_module_config(s->module_config,
      -                                                     &cache_module);
      -
      -    /* Remove the user defined headers set with CacheIgnoreHeaders.
      -     * This may break RFC 2616 compliance on behalf of the administrator.
      -     */
      -    header = (char **)conf->ignore_headers->elts;
      -    for (i = 0; i < conf->ignore_headers->nelts; i++) {
      -        apr_table_unset(headers_out, header[i]);
      -    }
      -    return headers_out;
      -}
      -
      -/*
      - * Create a new table consisting of those elements from an input
      - * headers table that are allowed to be stored in a cache.
      - */
      -CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers_in(request_rec *r)
      -{
      -    return ap_cache_cacheable_headers(r->pool, r->headers_in, r->server);
      -}
      -
      -/*
      - * Create a new table consisting of those elements from an output
      - * headers table that are allowed to be stored in a cache;
      - * ensure there is a content type and capture any errors.
      - */
      -CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers_out(request_rec *r)
      -{
      -    apr_table_t *headers_out;
      -
      -    headers_out = apr_table_overlay(r->pool, r->headers_out,
      -                                        r->err_headers_out);
      -
      -    apr_table_clear(r->err_headers_out);
      -
      -    headers_out = ap_cache_cacheable_headers(r->pool, headers_out,
      -                                                  r->server);
      -
      -    if (!apr_table_get(headers_out, "Content-Type")
      -        && r->content_type) {
      -        apr_table_setn(headers_out, "Content-Type",
      -                       ap_make_content_type(r, r->content_type));
      -    }
      -
      -    if (!apr_table_get(headers_out, "Content-Encoding")
      -        && r->content_encoding) {
      -        apr_table_setn(headers_out, "Content-Encoding",
      -                       r->content_encoding);
      -    }
      -
      -    return headers_out;
      -}
      -
       /**
        * String tokenizer that ignores separator characters within quoted strings
        * and escaped characters, as per RFC2616 section 2.2.
        */
      -static char *cache_strqtok(char *str, const char *sep, char **last)
      +char *cache_strqtok(char *str, const char *sep, char **last)
       {
           char *token;
           int quoted = 0;
      @@ -1059,6 +916,10 @@ static char *cache_strqtok(char *str, const char *sep, char **last)
               str = *last;    /* start where we left off */
           }
       
      +    if (!str) {         /* no more tokens */
      +        return NULL;
      +    }
      +
           /* skip characters in sep (will terminate at '\0') */
           while (*str && ap_strchr_c(sep, *str)) {
               ++str;
      @@ -1078,7 +939,7 @@ static char *cache_strqtok(char *str, const char *sep, char **last)
           *last = token;
           while (**last) {
               if (!quoted) {
      -            if (**last == '\"') {
      +            if (**last == '\"' && !ap_strchr_c(sep, '\"')) {
                       quoted = 1;
                       ++*last;
                   }
      @@ -1138,12 +999,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
               char *header = apr_pstrdup(r->pool, pragma_header);
               const char *token = cache_strqtok(header, CACHE_SEPARATOR, &last);
               while (token) {
      -            /* handle most common quickest case... */
      -            if (!strcmp(token, "no-cache")) {
      -                cc->no_cache = 1;
      -            }
      -            /* ...then try slowest case */
      -            else if (!strcasecmp(token, "no-cache")) {
      +            if (!ap_cstr_casecmp(token, "no-cache")) {
                       cc->no_cache = 1;
                   }
                   token = cache_strqtok(NULL, CACHE_SEPARATOR, &last);
      @@ -1152,121 +1008,99 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
           }
       
           if (cc_header) {
      +        char *endp;
      +        apr_off_t offt;
               char *header = apr_pstrdup(r->pool, cc_header);
               const char *token = cache_strqtok(header, CACHE_SEPARATOR, &last);
               while (token) {
                   switch (token[0]) {
                   case 'n':
                   case 'N': {
      -                /* handle most common quickest cases... */
      -                if (!strcmp(token, "no-cache")) {
      -                    cc->no_cache = 1;
      -                }
      -                else if (!strcmp(token, "no-store")) {
      -                    cc->no_store = 1;
      -                }
      -                /* ...then try slowest cases */
      -                else if (!strncasecmp(token, "no-cache", 8)) {
      +                if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
                           if (token[8] == '=') {
      -                        if (apr_table_get(headers, token + 9)) {
      -                            cc->no_cache_header = 1;
      -                        }
      +                        cc->no_cache_header = 1;
                           }
                           else if (!token[8]) {
                               cc->no_cache = 1;
                           }
      -                    break;
                       }
      -                else if (!strcasecmp(token, "no-store")) {
      +                else if (!ap_cstr_casecmp(token, "no-store")) {
                           cc->no_store = 1;
                       }
      -                else if (!strcasecmp(token, "no-transform")) {
      +                else if (!ap_cstr_casecmp(token, "no-transform")) {
                           cc->no_transform = 1;
                       }
                       break;
                   }
                   case 'm':
                   case 'M': {
      -                /* handle most common quickest cases... */
      -                if (!strcmp(token, "max-age=0")) {
      -                    cc->max_age = 1;
      -                    cc->max_age_value = 0;
      -                }
      -                else if (!strcmp(token, "must-revalidate")) {
      -                    cc->must_revalidate = 1;
      -                }
      -                /* ...then try slowest cases */
      -                else if (!strncasecmp(token, "max-age", 7)) {
      -                    if (token[7] == '=') {
      +                if (!ap_cstr_casecmpn(token, "max-age", 7)) {
      +                    if (token[7] == '='
      +                            && !apr_strtoff(&offt, token + 8, &endp, 10)
      +                            && endp > token + 8 && !*endp) {
                               cc->max_age = 1;
      -                        cc->max_age_value = apr_atoi64(token + 8);
      +                        cc->max_age_value = offt;
                           }
      -                    break;
                       }
      -                else if (!strncasecmp(token, "max-stale", 9)) {
      -                    if (token[9] == '=') {
      +                else if (!ap_cstr_casecmp(token, "must-revalidate")) {
      +                    cc->must_revalidate = 1;
      +                }
      +                else if (!ap_cstr_casecmpn(token, "max-stale", 9)) {
      +                    if (token[9] == '='
      +                            && !apr_strtoff(&offt, token + 10, &endp, 10)
      +                            && endp > token + 10 && !*endp) {
                               cc->max_stale = 1;
      -                        cc->max_stale_value = apr_atoi64(token + 10);
      +                        cc->max_stale_value = offt;
                           }
      -                    else if (!token[10]) {
      +                    else if (!token[9]) {
                               cc->max_stale = 1;
                               cc->max_stale_value = -1;
                           }
      -                    break;
                       }
      -                else if (!strncasecmp(token, "min-fresh", 9)) {
      -                    if (token[9] == '=') {
      +                else if (!ap_cstr_casecmpn(token, "min-fresh", 9)) {
      +                    if (token[9] == '='
      +                            && !apr_strtoff(&offt, token + 10, &endp, 10)
      +                            && endp > token + 10 && !*endp) {
                               cc->min_fresh = 1;
      -                        cc->min_fresh_value = apr_atoi64(token + 10);
      +                        cc->min_fresh_value = offt;
                           }
      -                    break;
      -                }
      -                else if (!strcasecmp(token, "must-revalidate")) {
      -                    cc->must_revalidate = 1;
                       }
                       break;
                   }
                   case 'o':
                   case 'O': {
      -                if (!strcasecmp(token, "only-if-cached")) {
      +                if (!ap_cstr_casecmp(token, "only-if-cached")) {
                           cc->only_if_cached = 1;
                       }
                       break;
                   }
                   case 'p':
                   case 'P': {
      -                /* handle most common quickest cases... */
      -                if (!strcmp(token, "private")) {
      -                    cc->private = 1;
      -                }
      -                /* ...then try slowest cases */
      -                else if (!strcasecmp(token, "public")) {
      +                if (!ap_cstr_casecmp(token, "public")) {
                           cc->public = 1;
                       }
      -                else if (!strncasecmp(token, "private", 7)) {
      +                else if (!ap_cstr_casecmpn(token, "private", 7)) {
                           if (token[7] == '=') {
      -                        if (apr_table_get(headers, token + 8)) {
      -                            cc->private_header = 1;
      -                        }
      +                        cc->private_header = 1;
                           }
                           else if (!token[7]) {
                               cc->private = 1;
                           }
      -                    break;
                       }
      -                else if (!strcasecmp(token, "proxy-revalidate")) {
      +                else if (!ap_cstr_casecmp(token, "proxy-revalidate")) {
                           cc->proxy_revalidate = 1;
                       }
                       break;
                   }
                   case 's':
                   case 'S': {
      -                if (!strncasecmp(token, "s-maxage", 8)) {
      -                    if (token[8] == '=') {
      +                if (!ap_cstr_casecmpn(token, "s-maxage", 8)) {
      +                    if (token[8] == '='
      +                            && !apr_strtoff(&offt, token + 9, &endp, 10)
      +                            && endp > token + 9 && !*endp) {
                               cc->s_maxage = 1;
      -                        cc->s_maxage_value = apr_atoi64(token + 9);
      +                        cc->s_maxage_value = offt;
                           }
      -                    break;
                       }
                       break;
                   }
      @@ -1278,3 +1112,215 @@ int ap_cache_control(request_rec *r, cache_control_t *cc,
       
           return (cc_header != NULL || pragma_header != NULL);
       }
      +
      +/**
      + * Parse the Cache-Control, identifying and removing headers that
      + * exist as tokens after the no-cache and private tokens.
      + */
      +static int cache_control_remove(request_rec *r, const char *cc_header,
      +        apr_table_t *headers)
      +{
      +    char *last, *slast;
      +    int found = 0;
      +
      +    if (cc_header) {
      +        char *header = apr_pstrdup(r->pool, cc_header);
      +        char *token = cache_strqtok(header, CACHE_SEPARATOR, &last);
      +        while (token) {
      +            switch (token[0]) {
      +            case 'n':
      +            case 'N': {
      +                if (!ap_cstr_casecmpn(token, "no-cache", 8)) {
      +                    if (token[8] == '=') {
      +                        const char *header = cache_strqtok(token + 9,
      +                                CACHE_SEPARATOR "\"", &slast);
      +                        while (header) {
      +                            apr_table_unset(headers, header);
      +                            header = cache_strqtok(NULL, CACHE_SEPARATOR "\"",
      +                                    &slast);
      +                        }
      +                        found = 1;
      +                    }
      +                    break;
      +                }
      +                break;
      +            }
      +            case 'p':
      +            case 'P': {
      +                if (!ap_cstr_casecmpn(token, "private", 7)) {
      +                    if (token[7] == '=') {
      +                        const char *header = cache_strqtok(token + 8,
      +                                CACHE_SEPARATOR "\"", &slast);
      +                        while (header) {
      +                            apr_table_unset(headers, header);
      +                            header = cache_strqtok(NULL, CACHE_SEPARATOR "\"",
      +                                    &slast);
      +                        }
      +                        found = 1;
      +                    }
      +                }
      +                break;
      +            }
      +            }
      +            token = cache_strqtok(NULL, CACHE_SEPARATOR, &last);
      +        }
      +    }
      +
      +    return found;
      +}
      +
      +/*
      + * Create a new table consisting of those elements from an
      + * headers table that are allowed to be stored in a cache.
      + */
      +CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers(apr_pool_t *pool,
      +                                                        apr_table_t *t,
      +                                                        server_rec *s)
      +{
      +    cache_server_conf *conf;
      +    char **header;
      +    int i;
      +    apr_table_t *headers_out;
      +
      +    /* Short circuit the common case that there are not
      +     * (yet) any headers populated.
      +     */
      +    if (t == NULL) {
      +        return apr_table_make(pool, 10);
      +    };
      +
      +    /* Make a copy of the headers, and remove from
      +     * the copy any hop-by-hop headers, as defined in Section
      +     * 13.5.1 of RFC 2616
      +     */
      +    headers_out = apr_table_copy(pool, t);
      +
      +    apr_table_unset(headers_out, "Connection");
      +    apr_table_unset(headers_out, "Keep-Alive");
      +    apr_table_unset(headers_out, "Proxy-Authenticate");
      +    apr_table_unset(headers_out, "Proxy-Authorization");
      +    apr_table_unset(headers_out, "TE");
      +    apr_table_unset(headers_out, "Trailers");
      +    apr_table_unset(headers_out, "Transfer-Encoding");
      +    apr_table_unset(headers_out, "Upgrade");
      +
      +    conf = (cache_server_conf *)ap_get_module_config(s->module_config,
      +                                                     &cache_module);
      +
      +    /* Remove the user defined headers set with CacheIgnoreHeaders.
      +     * This may break RFC 2616 compliance on behalf of the administrator.
      +     */
      +    header = (char **)conf->ignore_headers->elts;
      +    for (i = 0; i < conf->ignore_headers->nelts; i++) {
      +        apr_table_unset(headers_out, header[i]);
      +    }
      +    return headers_out;
      +}
      +
      +/*
      + * Create a new table consisting of those elements from an input
      + * headers table that are allowed to be stored in a cache.
      + */
      +CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers_in(request_rec *r)
      +{
      +    return ap_cache_cacheable_headers(r->pool, r->headers_in, r->server);
      +}
      +
      +/*
      + * Create a new table consisting of those elements from an output
      + * headers table that are allowed to be stored in a cache;
      + * ensure there is a content type and capture any errors.
      + */
      +CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_headers_out(request_rec *r)
      +{
      +    apr_table_t *headers_out;
      +
      +    headers_out = ap_cache_cacheable_headers(r->pool,
      +                                             cache_merge_headers_out(r),
      +                                             r->server);
      +
      +    cache_control_remove(r,
      +            cache_table_getm(r->pool, headers_out, "Cache-Control"),
      +            headers_out);
      +
      +    return headers_out;
      +}
      +
      +apr_table_t *cache_merge_headers_out(request_rec *r)
      +{
      +    apr_table_t *headers_out;
      +
      +    headers_out = apr_table_overlay(r->pool, r->headers_out,
      +                                    r->err_headers_out);
      +
      +    if (r->content_type
      +            && !apr_table_get(headers_out, "Content-Type")) {
      +        const char *ctype = ap_make_content_type(r, r->content_type);
      +        if (ctype) {
      +            apr_table_setn(headers_out, "Content-Type", ctype);
      +        }
      +    }
      +
      +    if (r->content_encoding
      +            && !apr_table_get(headers_out, "Content-Encoding")) {
      +        apr_table_setn(headers_out, "Content-Encoding",
      +                       r->content_encoding);
      +    }
      +
      +    return headers_out;
      +}
      +
      +typedef struct
      +{
      +    apr_pool_t *p;
      +    const char *first;
      +    apr_array_header_t *merged;
      +} cache_table_getm_t;
      +
      +static int cache_table_getm_do(void *v, const char *key, const char *val)
      +{
      +    cache_table_getm_t *state = (cache_table_getm_t *) v;
      +
      +    if (!state->first) {
      +        /**
      +         * The most common case is a single header, and this is covered by
      +         * a fast path that doesn't allocate any memory. On the second and
      +         * subsequent header, an array is created and the array concatenated
      +         * together to form the final value.
      +         */
      +        state->first = val;
      +    }
      +    else {
      +        const char **elt;
      +        if (!state->merged) {
      +            state->merged = apr_array_make(state->p, 10, sizeof(const char *));
      +            elt = apr_array_push(state->merged);
      +            *elt = state->first;
      +        }
      +        elt = apr_array_push(state->merged);
      +        *elt = val;
      +    }
      +    return 1;
      +}
      +
      +const char *cache_table_getm(apr_pool_t *p, const apr_table_t *t,
      +        const char *key)
      +{
      +    cache_table_getm_t state;
      +
      +    state.p = p;
      +    state.first = NULL;
      +    state.merged = NULL;
      +
      +    apr_table_do(cache_table_getm_do, &state, t, key, NULL);
      +
      +    if (!state.first) {
      +        return NULL;
      +    }
      +    else if (!state.merged) {
      +        return state.first;
      +    }
      +    else {
      +        return apr_array_pstrcat(p, state.merged, ',');
      +    }
      +}
      diff --git a/modules/cache/cache_util.h b/modules/cache/cache_util.h
      index eec38f3a6a3..6b0174c7bde 100644
      --- a/modules/cache/cache_util.h
      +++ b/modules/cache/cache_util.h
      @@ -99,6 +99,7 @@ extern "C" {
       #define CACHE_LOCKNAME_KEY "mod_cache-lockname"
       #define CACHE_LOCKFILE_KEY "mod_cache-lockfile"
       #define CACHE_CTX_KEY "mod_cache-ctx"
      +#define CACHE_SEPARATOR ", \t"
       
       /**
        * cache_util.c
      @@ -238,7 +239,16 @@ typedef struct {
        * @param r request_rec
        * @return 0 ==> cache object may not be served, 1 ==> cache object may be served
        */
      -CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec *r);
      +int ap_cache_check_no_cache(cache_request_rec *cache, request_rec *r);
      +
      +/**
      + * Check the whether the request allows a cached object to be stored as per RFC2616
      + * section 14.9.2 (What May be Stored by Caches)
      + * @param cache cache_request_rec
      + * @param r request_rec
      + * @return 0 ==> cache object may not be served, 1 ==> cache object may be served
      + */
      +int ap_cache_check_no_store(cache_request_rec *cache, request_rec *r);
       
       /**
        * Check the freshness of the cache object per RFC2616 section 13.2 (Expiration Model)
      @@ -254,7 +264,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
        * Try obtain a cache wide lock on the given cache key.
        *
        * If we return APR_SUCCESS, we obtained the lock, and we are clear to
      - * proceed to the backend. If we return APR_EEXISTS, the the lock is
      + * proceed to the backend. If we return APR_EEXISTS, then the lock is
        * already locked, someone else has gone to refresh the backend data
        * already, so we must return stale data with a warning in the mean
        * time. If we return anything else, then something has gone pear
      @@ -290,7 +300,32 @@ apr_status_t cache_remove_lock(cache_server_conf *conf,
               cache_request_rec *cache, request_rec *r, apr_bucket_brigade *bb);
       
       cache_provider_list *cache_get_providers(request_rec *r,
      -        cache_server_conf *conf, apr_uri_t uri);
      +                                         cache_server_conf *conf);
      +
      +/**
      + * Get a value from a table, where the table may contain multiple
      + * values for a given key.
      + *
      + * When the table contains a single value, that value is returned
      + * unchanged.
      + *
      + * When the table contains two or more values for a key, all values
      + * for the key are returned, separated by commas.
      + */
      +const char *cache_table_getm(apr_pool_t *p, const apr_table_t *t,
      +        const char *key);
      +
      +/**
      + * String tokenizer that ignores separator characters within quoted strings
      + * and escaped characters, as per RFC2616 section 2.2.
      + */
      +char *cache_strqtok(char *str, const char *sep, char **last);
      +
      +/**
      + * Merge err_headers_out into headers_out and add request's Content-Type and
      + * Content-Encoding if available.
      + */
      +apr_table_t *cache_merge_headers_out(request_rec *r);
       
       #ifdef __cplusplus
       }
      diff --git a/modules/cache/config.m4 b/modules/cache/config.m4
      index e0470fafda1..8115094dade 100644
      --- a/modules/cache/config.m4
      +++ b/modules/cache/config.m4
      @@ -13,17 +13,20 @@ cache_storage.lo dnl
       cache_util.lo dnl
       "
       cache_disk_objs="mod_cache_disk.lo"
      +cache_socache_objs="mod_cache_socache.lo"
       
       case "$host" in
         *os2*)
           # OS/2 DLLs must resolve all symbols at build time
           # and we need some from main cache module
           cache_disk_objs="$cache_disk_objs mod_cache.la"
      +    cache_socache_objs="$cache_socache_objs mod_cache.la"
           ;;
       esac
       
       APACHE_MODULE(cache, dynamic file caching.  At least one storage management module (e.g. mod_cache_disk) is also necessary., $cache_objs, , most)
      -APACHE_MODULE(cache_disk, disk caching module, $cache_disk_objs, , most)
      +APACHE_MODULE(cache_disk, disk caching module, $cache_disk_objs, , most, , cache)
      +APACHE_MODULE(cache_socache, shared object caching module, $cache_socache_objs, , most)
       
       dnl
       dnl APACHE_CHECK_DISTCACHE
      @@ -31,7 +34,7 @@ dnl
       dnl Configure for the detected distcache installation, giving
       dnl preference to "--with-distcache=<path>" if it was specified.
       dnl
      -AC_DEFUN(APACHE_CHECK_DISTCACHE,[
      +AC_DEFUN([APACHE_CHECK_DISTCACHE],[
       if test "x$ap_distcache_configured" = "x"; then
         dnl initialise the variables we use
         ap_distcache_found=""
      @@ -42,7 +45,7 @@ if test "x$ap_distcache_configured" = "x"; then
       
         dnl Determine the distcache base directory, if any
         AC_MSG_CHECKING([for user-provided distcache base])
      -  AC_ARG_WITH(distcache, APACHE_HELP_STRING(--with-distcache=DIR, Distcache installation directory), [
      +  AC_ARG_WITH(distcache, APACHE_HELP_STRING(--with-distcache=PATH, Distcache installation directory), [
           dnl If --with-distcache specifies a directory, we use that directory or fail
           if test "x$withval" != "xyes" -a "x$withval" != "x"; then
             dnl This ensures $withval is actually a directory and that it is absolute
      @@ -63,7 +66,7 @@ if test "x$ap_distcache_configured" = "x"; then
       
         if test "x$ap_distcache_base" != "x"; then
           APR_ADDTO(CPPFLAGS, [-I$ap_distcache_base/include])
      -    APR_ADDTO(INCLUDES, [-I$ap_distcache_base/include])
      +    APR_ADDTO(MOD_INCLUDES, [-I$ap_distcache_base/include])
           APR_ADDTO(LDFLAGS, [-L$ap_distcache_base/lib])
           APR_ADDTO(ap_distcache_ldflags, [-L$ap_distcache_base/lib])
           if test "x$ap_platform_runtime_link_flag" != "x"; then
      diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c
      index b97a21c285b..b857e2ea095 100644
      --- a/modules/cache/mod_cache.c
      +++ b/modules/cache/mod_cache.c
      @@ -34,6 +34,23 @@ static ap_filter_rec_t *cache_save_subreq_filter_handle;
       static ap_filter_rec_t *cache_out_filter_handle;
       static ap_filter_rec_t *cache_out_subreq_filter_handle;
       static ap_filter_rec_t *cache_remove_url_filter_handle;
      +static ap_filter_rec_t *cache_invalidate_filter_handle;
      +
      +/**
      + * Entity headers' names
      + */
      +static const char *MOD_CACHE_ENTITY_HEADERS[] = {
      +    "Allow",
      +    "Content-Encoding",
      +    "Content-Language",
      +    "Content-Length",
      +    "Content-Location",
      +    "Content-MD5",
      +    "Content-Range",
      +    "Content-Type",
      +    "Last-Modified",
      +    NULL
      +};
       
       /*
        * CACHE handler
      @@ -86,7 +103,7 @@ static int cache_quick_handler(request_rec *r, int lookup)
           /*
            * Which cache module (if any) should handle this request?
            */
      -    if (!(providers = cache_get_providers(r, conf, r->parsed_uri))) {
      +    if (!(providers = cache_get_providers(r, conf))) {
               return DECLINED;
           }
       
      @@ -101,6 +118,9 @@ static int cache_quick_handler(request_rec *r, int lookup)
           /*
            * Are we allowed to serve cached info at all?
            */
      +    if (!ap_cache_check_no_store(cache, r)) {
      +        return DECLINED;
      +    }
       
           /* find certain cache controlling headers */
           auth = apr_table_get(r->headers_in, "Authorization");
      @@ -112,24 +132,39 @@ static int cache_quick_handler(request_rec *r, int lookup)
               return DECLINED;
           }
       
      -    /* Are we something other than GET or HEAD? If so, invalidate
      -     * the cached entities.
      +    /* Are we PUT/POST/DELETE? If so, prepare to invalidate the cached entities.
            */
      -    if (r->method_number != M_GET) {
      +    switch (r->method_number) {
      +    case M_PUT:
      +    case M_POST:
      +    case M_DELETE:
      +    {
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02461)
      +                "PUT/POST/DELETE: Adding CACHE_INVALIDATE filter for %s",
      +                r->uri);
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      -                "Invalidating all cached entities in response to '%s' request for %s",
      -                r->method, r->uri);
      +        /* Add cache_invalidate filter to this request to force a
      +         * cache entry to be invalidated if the response is
      +         * ultimately successful (2xx).
      +         */
      +        ap_add_output_filter_handle(
      +                cache_invalidate_filter_handle, cache, r,
      +                r->connection);
       
      -        cache_invalidate(cache, r);
      +        return DECLINED;
      +    }
      +    case M_GET: {
      +        break;
      +    }
      +    default : {
       
      -        /* we've got a cache invalidate! tell everyone who cares */
      -        cache_run_cache_status(cache->handle, r, r->headers_out,
      -                AP_CACHE_INVALIDATE, apr_psprintf(r->pool,
      -                        "cache invalidated by %s", r->method));
      +        ap_log_rerror(
      +                APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02462) "cache: Method '%s' not cacheable by mod_cache, ignoring: %s", r->method, r->uri);
       
               return DECLINED;
           }
      +    }
       
           /*
            * Try to serve this request from the cache.
      @@ -163,7 +198,7 @@ static int cache_quick_handler(request_rec *r, int lookup)
                            */
                           if (r->main) {
                               ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                                r, "Adding CACHE_SAVE_SUBREQ filter for %s",
      +                                r, APLOGNO(00749) "Adding CACHE_SAVE_SUBREQ filter for %s",
                                       r->uri);
                               cache->save_filter = ap_add_output_filter_handle(
                                       cache_save_subreq_filter_handle, cache, r,
      @@ -171,7 +206,7 @@ static int cache_quick_handler(request_rec *r, int lookup)
                           }
                           else {
                               ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                                r, "Adding CACHE_SAVE filter for %s",
      +                                r, APLOGNO(00750) "Adding CACHE_SAVE filter for %s",
                                       r->uri);
                               cache->save_filter = ap_add_output_filter_handle(
                                       cache_save_filter_handle, cache, r,
      @@ -180,7 +215,7 @@ static int cache_quick_handler(request_rec *r, int lookup)
       
                           apr_pool_userdata_setn(cache, CACHE_CTX_KEY, NULL, r->pool);
       
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00751)
                                   "Adding CACHE_REMOVE_URL filter for %s",
                                   r->uri);
       
      @@ -197,14 +232,19 @@ static int cache_quick_handler(request_rec *r, int lookup)
                       }
                       else {
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv,
      -                            r, "Cache locked for url, not caching "
      +                            r, APLOGNO(00752) "Cache locked for url, not caching "
                                   "response: %s", r->uri);
      +                    /* cache_select() may have added conditional headers */
      +                    if (cache->stale_headers) {
      +                        r->headers_in = cache->stale_headers;
      +                    }
      +
                       }
                   }
                   else {
                       if (cache->stale_headers) {
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                            r, "Restoring request headers for %s",
      +                            r, APLOGNO(00753) "Restoring request headers for %s",
                                   r->uri);
       
                           r->headers_in = cache->stale_headers;
      @@ -226,7 +266,7 @@ static int cache_quick_handler(request_rec *r, int lookup)
            * the headers. */
           if (lookup) {
               if (cache->stale_headers) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00754)
                           "Restoring request headers.");
                   r->headers_in = cache->stale_headers;
               }
      @@ -292,19 +332,10 @@ static int cache_quick_handler(request_rec *r, int lookup)
           out = apr_brigade_create(r->pool, r->connection->bucket_alloc);
           e = apr_bucket_eos_create(out->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(out, e);
      -    rv = ap_pass_brigade(r->output_filters, out);
      -    if (rv != APR_SUCCESS) {
      -        if (rv != AP_FILTER_ERROR) {
      -            /* no way to know what type of error occurred */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "cache_quick_handler(%s): ap_pass_brigade returned %i",
      -                          cache->provider_name, rv);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -        return rv;
      -    }
       
      -    return OK;
      +    return ap_pass_brigade_fchk(r, out,
      +                                "cache_quick_handler(%s): ap_pass_brigade returned",
      +                                cache->provider_name);
       }
       
       /**
      @@ -382,7 +413,7 @@ static int cache_handler(request_rec *r)
           /*
            * Which cache module (if any) should handle this request?
            */
      -    if (!(providers = cache_get_providers(r, conf, r->parsed_uri))) {
      +    if (!(providers = cache_get_providers(r, conf))) {
               return DECLINED;
           }
       
      @@ -394,24 +425,45 @@ static int cache_handler(request_rec *r)
           /* save away the possible providers */
           cache->providers = providers;
       
      -    /* Are we something other than GET or HEAD? If so, invalidate
      -     * the cached entities.
      +    /*
      +     * Are we allowed to serve cached info at all?
            */
      -    if (r->method_number != M_GET) {
      +    if (!ap_cache_check_no_store(cache, r)) {
      +        return DECLINED;
      +    }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      -                "Invalidating all cached entities in response to '%s' request for %s",
      -                r->method, r->uri);
      +    /* Are we PUT/POST/DELETE? If so, prepare to invalidate the cached entities.
      +     */
      +    switch (r->method_number) {
      +    case M_PUT:
      +    case M_POST:
      +    case M_DELETE:
      +    {
       
      -        cache_invalidate(cache, r);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02463)
      +                "PUT/POST/DELETE: Adding CACHE_INVALIDATE filter for %s",
      +                r->uri);
       
      -        /* we've got a cache invalidate! tell everyone who cares */
      -        cache_run_cache_status(cache->handle, r, r->headers_out,
      -                AP_CACHE_INVALIDATE, apr_psprintf(r->pool,
      -                        "cache invalidated by %s", r->method));
      +        /* Add cache_invalidate filter to this request to force a
      +         * cache entry to be invalidated if the response is
      +         * ultimately successful (2xx).
      +         */
      +        ap_add_output_filter_handle(
      +                cache_invalidate_filter_handle, cache, r,
      +                r->connection);
       
               return DECLINED;
      +    }
      +    case M_GET: {
      +        break;
      +    }
      +    default : {
       
      +        ap_log_rerror(
      +                APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02464) "cache: Method '%s' not cacheable by mod_cache, ignoring: %s", r->method, r->uri);
      +
      +        return DECLINED;
      +    }
           }
       
           /*
      @@ -445,13 +497,13 @@ static int cache_handler(request_rec *r)
                        */
                       if (r->main) {
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                            r, "Adding CACHE_SAVE_SUBREQ filter for %s",
      +                            r, APLOGNO(00756) "Adding CACHE_SAVE_SUBREQ filter for %s",
                                   r->uri);
                           cache_save_handle = cache_save_subreq_filter_handle;
                       }
                       else {
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                            r, "Adding CACHE_SAVE filter for %s",
      +                            r, APLOGNO(00757) "Adding CACHE_SAVE filter for %s",
                                   r->uri);
                           cache_save_handle = cache_save_filter_handle;
                       }
      @@ -474,7 +526,7 @@ static int cache_handler(request_rec *r)
                               cache_filter_handle, cache_save_handle,
                               ap_get_input_filter_handle("SUBREQ_CORE"))) {
                           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                            r, "Replacing CACHE with CACHE_SAVE "
      +                            r, APLOGNO(00758) "Replacing CACHE with CACHE_SAVE "
                                   "filter for %s", r->uri);
                       }
       
      @@ -484,7 +536,7 @@ static int cache_handler(request_rec *r)
       
                       apr_pool_userdata_setn(cache, CACHE_CTX_KEY, NULL, r->pool);
       
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00759)
                               "Adding CACHE_REMOVE_URL filter for %s",
                               r->uri);
       
      @@ -502,7 +554,7 @@ static int cache_handler(request_rec *r)
                   }
                   else {
                       ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv,
      -                        r, "Cache locked for url, not caching "
      +                        r, APLOGNO(00760) "Cache locked for url, not caching "
                               "response: %s", r->uri);
                   }
               }
      @@ -550,7 +602,7 @@ static int cache_handler(request_rec *r)
           if (cache_replace_filter(r->output_filters, cache_filter_handle,
                   cache_out_handle, ap_get_input_filter_handle("SUBREQ_CORE"))) {
               ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS,
      -                r, "Replacing CACHE with CACHE_OUT filter for %s",
      +                r, APLOGNO(00761) "Replacing CACHE with CACHE_OUT filter for %s",
                       r->uri);
           }
       
      @@ -576,19 +628,8 @@ static int cache_handler(request_rec *r)
           out = apr_brigade_create(r->pool, r->connection->bucket_alloc);
           e = apr_bucket_eos_create(out->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(out, e);
      -    rv = ap_pass_brigade(r->output_filters, out);
      -    if (rv != APR_SUCCESS) {
      -        if (rv != AP_FILTER_ERROR) {
      -            /* no way to know what type of error occurred */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "cache_handler(%s): ap_pass_brigade returned %i",
      -                          cache->provider_name, rv);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -        return rv;
      -    }
      -
      -    return OK;
      +    return ap_pass_brigade_fchk(r, out, "cache(%s): ap_pass_brigade returned",
      +                                cache->provider_name);
       }
       
       /*
      @@ -597,33 +638,37 @@ static int cache_handler(request_rec *r)
        *
        * Deliver cached content (headers and body) up the stack.
        */
      -static int cache_out_filter(ap_filter_t *f, apr_bucket_brigade *in)
      +static apr_status_t cache_out_filter(ap_filter_t *f, apr_bucket_brigade *in)
       {
           request_rec *r = f->r;
      -    apr_bucket *e;
           cache_request_rec *cache = (cache_request_rec *)f->ctx;
       
           if (!cache) {
               /* user likely configured CACHE_OUT manually; they should use mod_cache
                * configuration to do that */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00762)
                       "CACHE/CACHE_OUT filter enabled while caching is disabled, ignoring");
               ap_remove_output_filter(f);
               return ap_pass_brigade(f->next, in);
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00763)
                   "cache: running CACHE_OUT filter");
       
           /* clean out any previous response up to EOS, if any */
      -    for (e = APR_BRIGADE_FIRST(in);
      -         e != APR_BRIGADE_SENTINEL(in);
      -         e = APR_BUCKET_NEXT(e))
      -    {
      +    while (!APR_BRIGADE_EMPTY(in)) {
      +        apr_bucket *e = APR_BRIGADE_FIRST(in);
               if (APR_BUCKET_IS_EOS(e)) {
                   apr_bucket_brigade *bb = apr_brigade_create(r->pool,
                           r->connection->bucket_alloc);
       
      +            /* restore content type of cached response if available */
      +            /* Needed especially when stale content gets served. */
      +            const char *ct = apr_table_get(cache->handle->resp_hdrs, "Content-Type");
      +            if (ct) {
      +                ap_set_content_type(r, ct);
      +            }
      +
                   /* restore status of cached response */
                   r->status = cache->handle->cache_obj->info.status;
       
      @@ -634,7 +679,7 @@ static int cache_out_filter(ap_filter_t *f, apr_bucket_brigade *in)
                   /* This filter is done once it has served up its content */
                   ap_remove_output_filter(f);
       
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00764)
                           "cache: serving %s", r->uri);
                   return ap_pass_brigade(f->next, in);
       
      @@ -669,8 +714,8 @@ static int cache_save_store(ap_filter_t *f, apr_bucket_brigade *in,
       
               rv = cache->provider->store_body(cache->handle, f->r, in, cache->out);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r,
      -                    "cache: Cache provider's store_body failed!");
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r, APLOGNO(00765)
      +                    "cache: Cache provider's store_body failed for URI %s", f->r->uri);
                   ap_remove_output_filter(f);
       
                   /* give someone else the chance to cache the file */
      @@ -707,9 +752,9 @@ static int cache_save_store(ap_filter_t *f, apr_bucket_brigade *in,
                       /* oops, no data out, but not all data read in either, be
                        * safe and stand down to prevent a spin.
                        */
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, f->r, APLOGNO(00766)
                               "cache: Cache provider's store_body returned an "
      -                        "empty brigade, but didn't consume all of the"
      +                        "empty brigade, but didn't consume all of the "
                               "input brigade, standing down to prevent a spin");
                       ap_remove_output_filter(f);
       
      @@ -726,6 +771,21 @@ static int cache_save_store(ap_filter_t *f, apr_bucket_brigade *in,
           return rv;
       }
       
      +/**
      + * Sanity check for 304 Not Modified responses, as per RFC2616 Section 10.3.5.
      + */
      +static int cache_header_cmp(apr_pool_t *pool, apr_table_t *left,
      +        apr_table_t *right, const char *key)
      +{
      +    const char *h1, *h2;
      +
      +    if ((h1 = cache_table_getm(pool, left, key))
      +            && (h2 = cache_table_getm(pool, right, key)) && (strcmp(h1, h2))) {
      +        return 1;
      +    }
      +    return 0;
      +}
      +
       /*
        * CACHE_SAVE filter
        * ---------------
      @@ -746,7 +806,7 @@ static int cache_save_store(ap_filter_t *f, apr_bucket_brigade *in,
        * waiting for a potentially slow client to acknowledge the failure.
        */
       
      -static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
      +static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
       {
           int rv = !OK;
           request_rec *r = f->r;
      @@ -759,7 +819,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
           apr_time_t exp, date, lastmod, now;
           apr_off_t size = -1;
           cache_info *info = NULL;
      -    char *reason;
      +    const char *reason, **eh;
           apr_pool_t *p;
           apr_bucket *e;
           apr_table_t *headers;
      @@ -772,7 +832,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               /* user likely configured CACHE_SAVE manually; they should really use
                * mod_cache configuration to do that
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00767)
                       "CACHE/CACHE_SAVE filter enabled while caching is disabled, ignoring");
               ap_remove_output_filter(f);
               return ap_pass_brigade(f->next, in);
      @@ -901,22 +961,32 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
           if (etag == NULL) {
               etag = apr_table_get(r->headers_out, "Etag");
           }
      -    cc_out = apr_table_get(r->err_headers_out, "Cache-Control");
      -    pragma = apr_table_get(r->err_headers_out, "Pragma");
      +    cc_out = cache_table_getm(r->pool, r->err_headers_out, "Cache-Control");
      +    pragma = cache_table_getm(r->pool, r->err_headers_out, "Pragma");
           headers = r->err_headers_out;
           if (!cc_out && !pragma) {
      -        cc_out = apr_table_get(r->headers_out, "Cache-Control");
      -        pragma = apr_table_get(r->headers_out, "Pragma");
      +        cc_out = cache_table_getm(r->pool, r->headers_out, "Cache-Control");
      +        pragma = cache_table_getm(r->pool, r->headers_out, "Pragma");
               headers = r->headers_out;
           }
       
           /* Have we received a 304 response without any headers at all? Fall back to
            * the original headers in the original cached request.
            */
      -    if (r->status == HTTP_NOT_MODIFIED && cache->stale_handle && !cc_out
      -            && !pragma) {
      -        cc_out = apr_table_get(cache->stale_handle->resp_hdrs, "Cache-Control");
      -        pragma = apr_table_get(cache->stale_handle->resp_hdrs, "Pragma");
      +    if (r->status == HTTP_NOT_MODIFIED && cache->stale_handle) {
      +        if (!cc_out && !pragma) {
      +            cc_out = cache_table_getm(r->pool, cache->stale_handle->resp_hdrs,
      +                    "Cache-Control");
      +            pragma = cache_table_getm(r->pool, cache->stale_handle->resp_hdrs,
      +                    "Pragma");
      +        }
      +
      +        /* 304 does not contain Content-Type and mod_mime regenerates the
      +         * Content-Type based on the r->filename. This would lead to original
      +         * Content-Type to be lost (overwriten by whatever mod_mime generates).
      +         * We preserves the original Content-Type here. */
      +        ap_set_content_type(r, apr_table_get(
      +                cache->stale_handle->resp_hdrs, "Content-Type"));
           }
       
           /* Parse the cache control header */
      @@ -955,6 +1025,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                    * include the following: an Expires header (section 14.21); a
                    * "max-age", "s-maxage",  "must-revalidate", "proxy-revalidate",
                    * "public" or "private" cache-control directive (section 14.9).
      +             *
      +             * FIXME: Wrong if cc_out has just an extension we don't know about 
                    */
               }
               else {
      @@ -969,9 +1041,12 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               /* if a broken Expires header is present, don't cache it */
               reason = apr_pstrcat(p, "Broken expires header: ", exps, NULL);
           }
      -    else if (!dconf->store_expired && exp != APR_DATE_BAD
      +    else if (!control.s_maxage && !control.max_age
      +            && !dconf->store_expired && exp != APR_DATE_BAD
                   && exp < r->request_time) {
      -        /* if a Expires header is in the past, don't cache it */
      +        /* if a Expires header is in the past, don't cache it 
      +         * Unless CC: s-maxage or max-age is present
      +         */
               reason = "Expires header already expired; not cacheable";
           }
           else if (!dconf->store_expired && (control.must_revalidate
      @@ -1034,9 +1109,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                */
               reason = "Authorization required";
           }
      -    else if (ap_cache_liststr(NULL,
      -                              apr_table_get(r->headers_out, "Vary"),
      -                              "*", NULL)) {
      +    else if (ap_find_token(NULL, apr_table_get(r->headers_out, "Vary"), "*")) {
               reason = "Vary header contains '*'";
           }
           else if (apr_table_get(r->subprocess_env, "no-cache") != NULL) {
      @@ -1046,70 +1119,114 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               /* or we've been asked not to cache it above */
               reason = "r->no_cache present";
           }
      +    else if (cache->stale_handle
      +            && APR_DATE_BAD
      +                    != (date = apr_date_parse_http(
      +                            apr_table_get(r->headers_out, "Date")))
      +            && date < cache->stale_handle->cache_obj->info.date) {
       
      -    /* Hold the phone. Some servers might allow us to cache a 2xx, but
      -     * then make their 304 responses non cacheable. This leaves us in a
      -     * sticky position. If the 304 is in answer to our own conditional
      -     * request, we cannot send this 304 back to the client because the
      -     * client isn't expecting it. Instead, our only option is to respect
      -     * the answer to the question we asked (has it changed, answer was
      -     * no) and return the cached item to the client, and then respect
      -     * the uncacheable nature of this 304 by allowing the remove_url
      -     * filter to kick in and remove the cached entity.
      -     */
      -    if (reason && r->status == HTTP_NOT_MODIFIED &&
      -             cache->stale_handle) {
      -        apr_bucket_brigade *bb;
      -        apr_bucket *bkt;
      -        int status;
      -
      -        cache->handle = cache->stale_handle;
      -        info = &cache->handle->cache_obj->info;
      -
      -        /* Load in the saved status and clear the status line. */
      -        r->status = info->status;
      -        r->status_line = NULL;
      -
      -        bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      +        /**
      +         * 13.12 Cache Replacement:
      +         *
      +         * Note: a new response that has an older Date header value than
      +         * existing cached responses is not cacheable.
      +         */
      +        reason = "updated entity is older than cached entity";
       
      -        r->headers_in = cache->stale_headers;
      -        status = ap_meets_conditions(r);
      -        if (status != OK) {
      -            r->status = status;
      +        /* while this response is not cacheable, the previous response still is */
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02474)
      +                "cache: Removing CACHE_REMOVE_URL filter.");
      +        ap_remove_output_filter(cache->remove_url_filter);
      +    }
      +    else if (r->status == HTTP_NOT_MODIFIED && cache->stale_handle) {
      +        apr_table_t *left = cache->stale_handle->resp_hdrs;
      +        apr_table_t *right = r->headers_out;
      +        const char *ehs = NULL;
       
      -            bkt = apr_bucket_flush_create(bb->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(bb, bkt);
      +        /* and lastly, contradiction checks for revalidated responses
      +         * as per RFC2616 Section 10.3.5
      +         */
      +        if (cache_header_cmp(r->pool, left, right, "ETag")) {
      +            ehs = "ETag";
               }
      -        else {
      -            cache->provider->recall_body(cache->handle, r->pool, bb);
      +        for (eh = MOD_CACHE_ENTITY_HEADERS; *eh; ++eh) {
      +            if (cache_header_cmp(r->pool, left, right, *eh)) {
      +                ehs = (ehs) ? apr_pstrcat(r->pool, ehs, ", ", *eh, NULL) : *eh;
      +            }
      +        }
      +        if (ehs) {
      +            reason = apr_pstrcat(r->pool, "contradiction: 304 Not Modified; "
      +                                 "but ", ehs, " modified", NULL);
      +        }
      +    }
       
      -            bkt = apr_bucket_eos_create(bb->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(bb, bkt);
      +    /**
      +     * Enforce RFC2616 Section 10.3.5, just in case. We caught any
      +     * inconsistencies above.
      +     *
      +     * If the conditional GET used a strong cache validator (see section
      +     * 13.3.3), the response SHOULD NOT include other entity-headers.
      +     * Otherwise (i.e., the conditional GET used a weak validator), the
      +     * response MUST NOT include other entity-headers; this prevents
      +     * inconsistencies between cached entity-bodies and updated headers.
      +     */
      +    if (r->status == HTTP_NOT_MODIFIED) {
      +        for (eh = MOD_CACHE_ENTITY_HEADERS; *eh; ++eh) {
      +            apr_table_unset(r->headers_out, *eh);
               }
      +    }
       
      -        cache->block_response = 1;
      +    /* Hold the phone. Some servers might allow us to cache a 2xx, but
      +     * then make their 304 responses non cacheable. RFC2616 says this:
      +     *
      +     * If a 304 response indicates an entity not currently cached, then
      +     * the cache MUST disregard the response and repeat the request
      +     * without the conditional.
      +     *
      +     * A 304 response with contradictory headers is technically a
      +     * different entity, to be safe, we remove the entity from the cache.
      +     */
      +    if (reason && r->status == HTTP_NOT_MODIFIED && cache->stale_handle) {
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02473) 
      +                "cache: %s responded with an uncacheable 304, " 
      +                "retrying the request %s. Reason: %s", 
      +                cache->key, r->unparsed_uri, reason);
       
      -        /* we've got a cache conditional hit! tell anyone who cares */
      -        cache_run_cache_status(
      -                cache->handle,
      -                r,
      -                r->headers_out,
      -                AP_CACHE_REVALIDATE,
      -                apr_psprintf(
      -                        r->pool,
      -                        "conditional cache hit: 304 was uncacheable though (%s); entity removed",
      +        /* we've got a cache conditional miss! tell anyone who cares */
      +        cache_run_cache_status(cache->handle, r, r->headers_out, AP_CACHE_MISS,
      +                apr_psprintf(r->pool,
      +                        "conditional cache miss: 304 was uncacheable, entity removed: %s",
                               reason));
       
      +        /* remove the cached entity immediately, we might cache it again */
      +        ap_remove_output_filter(cache->remove_url_filter);
      +        cache_remove_url(cache, r);
      +
               /* let someone else attempt to cache */
               cache_remove_lock(conf, cache, r, NULL);
       
      -        return ap_pass_brigade(f->next, bb);
      +        /* remove this filter from the chain */
      +        ap_remove_output_filter(f);
      +
      +        /* retry without the conditionals */
      +        apr_table_unset(r->headers_in, "If-Match");
      +        apr_table_unset(r->headers_in, "If-Modified-Since");
      +        apr_table_unset(r->headers_in, "If-None-Match");
      +        apr_table_unset(r->headers_in, "If-Range");
      +        apr_table_unset(r->headers_in, "If-Unmodified-Since");
      +
      +        /* Currently HTTP_NOT_MODIFIED, and after the redirect, handlers won't think to set status to HTTP_OK */
      +        r->status = HTTP_OK; 
      +        ap_internal_redirect(r->unparsed_uri, r);
      +
      +        return APR_SUCCESS;
           }
       
           if (reason) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache: %s not cached. Reason: %s", r->unparsed_uri,
      -                reason);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00768)
      +                "cache: %s not cached for request %s. Reason: %s",
      +                cache->key, r->unparsed_uri, reason);
       
               /* we've got a cache miss! tell anyone who cares */
               cache_run_cache_status(cache->handle, r, r->headers_out, AP_CACHE_MISS,
      @@ -1173,7 +1290,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
       
           /* It's safe to cache the response.
            *
      -     * There are two possiblities at this point:
      +     * There are two possibilities at this point:
            * - cache->handle == NULL. In this case there is no previously
            * cached entity anywhere on the system. We must create a brand
            * new entity and store the response in it.
      @@ -1218,7 +1335,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
           if (rv != OK) {
               /* we've got a cache miss! tell anyone who cares */
               cache_run_cache_status(cache->handle, r, r->headers_out, AP_CACHE_MISS,
      -                "cache miss: create_entity failed");
      +                "cache miss: cache unwilling to store response");
       
               /* Caching layer declined the opportunity to cache the response */
               ap_remove_output_filter(f);
      @@ -1226,13 +1343,14 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               return ap_pass_brigade(f->next, in);
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -            "cache: Caching url: %s", r->unparsed_uri);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00769)
      +            "cache: Caching url %s for request %s",
      +            cache->key, r->unparsed_uri);
       
           /* We are actually caching this response. So it does not
            * make sense to remove this entity any more.
            */
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00770)
                   "cache: Removing CACHE_REMOVE_URL filter.");
           ap_remove_output_filter(cache->remove_url_filter);
       
      @@ -1278,13 +1396,31 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
           if (lastmod != APR_DATE_BAD && lastmod > date) {
               /* if it's in the future, then replace by date */
               lastmod = date;
      -        lastmods = dates;
               ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0,
      -                r, "cache: Last modified is in the future, "
      +                r, APLOGNO(00771) "cache: Last modified is in the future, "
                       "replacing with now");
           }
       
      +
      +    /* CC has priority over Expires.  */
      +    if (control.s_maxage || control.max_age) {
      +        apr_int64_t x;
      +
      +        x = control.s_maxage ? control.s_maxage_value : control.max_age_value;
      +        x = x * MSEC_ONE_SEC;
      +
      +        if (x < dconf->minex) {
      +            x = dconf->minex;
      +        }
      +        if (x > dconf->maxex) {
      +            x = dconf->maxex;
      +        }
      +        exp = date + x;
      +    }
      +
           /* if no expiry date then
      +     *   if Cache-Control: s-maxage
      +     *      expiry date = date + smaxage
            *   if Cache-Control: max-age
            *      expiry date = date + max-age
            *   else if lastmod
      @@ -1292,28 +1428,9 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
            *   else
            *      expire date = date + defaultexpire
            */
      -    if (exp == APR_DATE_BAD) {
       
      -        if (control.max_age) {
      -            apr_int64_t x;
      -
      -            errno = 0;
      -            x = control.max_age_value;
      -            if (errno) {
      -                x = dconf->defex;
      -            }
      -            else {
      -                x = x * MSEC_ONE_SEC;
      -            }
      -            if (x < dconf->minex) {
      -                x = dconf->minex;
      -            }
      -            if (x > dconf->maxex) {
      -                x = dconf->maxex;
      -            }
      -            exp = date + x;
      -        }
      -        else if ((lastmod != APR_DATE_BAD) && (lastmod < date)) {
      +    if (exp == APR_DATE_BAD) {
      +        if ((lastmod != APR_DATE_BAD) && (lastmod < date)) {
                   /* if lastmod == date then you get 0*conf->factor which results in
                    * an expiration time of now. This causes some problems with
                    * freshness calculations, so we choose the else path...
      @@ -1336,9 +1453,6 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
       
           /* We found a stale entry which wasn't really stale. */
           if (cache->stale_handle) {
      -        /* Load in the saved status and clear the status line. */
      -        r->status = info->status;
      -        r->status_line = NULL;
       
               /* RFC 2616 10.3.5 states that entity headers are not supposed
                * to be in the 304 response.  Therefore, we need to combine the
      @@ -1346,13 +1460,18 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                * the cached headers.
                *
                * However, before doing that, we need to first merge in
      -         * err_headers_out and we also need to strip any hop-by-hop
      -         * headers that might have snuck in.
      +         * err_headers_out (note that store_headers() below already selects
      +         * the cacheable only headers using ap_cache_cacheable_headers_out(),
      +         * here we want to keep the original headers in r->headers_out and
      +         * forward all of them to the client, including non-cacheable ones).
                */
      -        r->headers_out = ap_cache_cacheable_headers_out(r);
      +        r->headers_out = cache_merge_headers_out(r);
      +        apr_table_clear(r->err_headers_out);
       
               /* Merge in our cached headers.  However, keep any updated values. */
      -        cache_accept_headers(cache->handle, r, 1);
      +        /* take output, overlay on top of cached */
      +        cache_accept_headers(cache->handle, r, r->headers_out,
      +                cache->handle->resp_hdrs, 1);
           }
       
           /* Write away header information to cache. It is possible that we are
      @@ -1375,6 +1494,10 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               apr_bucket *bkt;
               int status;
       
      +        /* Load in the saved status and clear the status line. */
      +        r->status = info->status;
      +        r->status_line = NULL;
      +
               /* We're just saving response headers, so we are done. Commit
                * the response at this point, unless there was a previous error.
                */
      @@ -1393,6 +1516,13 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               if (status != OK) {
                   r->status = status;
       
      +            /* Strip the entity headers merged from the cached headers before
      +             * updating the entry (see cache_accept_headers() above).
      +             */
      +            for (eh = MOD_CACHE_ENTITY_HEADERS; *eh; ++eh) {
      +                apr_table_unset(r->headers_out, *eh);
      +            }
      +
                   bkt = apr_bucket_flush_create(bb->bucket_alloc);
                   APR_BRIGADE_INSERT_TAIL(bb, bkt);
               }
      @@ -1411,7 +1541,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                * the body it is safe to try and remove the url from the cache.
                */
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(00772)
                           "cache: updating headers with store_headers failed. "
                           "Removing cached url.");
       
      @@ -1420,7 +1550,7 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
                       /* Probably a mod_cache_disk cache area has been (re)mounted
                        * read-only, or that there is a permissions problem.
                        */
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(00773)
                               "cache: attempt to remove url from cache unsuccessful.");
                   }
       
      @@ -1442,11 +1572,14 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
               /* let someone else attempt to cache */
               cache_remove_lock(conf, cache, r, NULL);
       
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02971)
      +                    "cache: serving %s (revalidated)", r->uri);
      +
               return ap_pass_brigade(f->next, bb);
           }
       
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(00774)
                       "cache: store_headers failed");
       
               /* we've got a cache miss! tell anyone who cares */
      @@ -1486,7 +1619,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
        * Therefore, if this filter is left in, it must mean we need to toss any
        * existing files.
        */
      -static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in)
      +static apr_status_t cache_remove_url_filter(ap_filter_t *f,
      +                                            apr_bucket_brigade *in)
       {
           request_rec *r = f->r;
           cache_request_rec *cache;
      @@ -1500,7 +1634,7 @@ static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in)
                * 1. Remove ourselves
                * 2. Do nothing and bail out
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00775)
                       "cache: CACHE_REMOVE_URL enabled unexpectedly");
               ap_remove_output_filter(f);
               return ap_pass_brigade(f->next, in);
      @@ -1514,6 +1648,70 @@ static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in)
           return ap_pass_brigade(f->next, in);
       }
       
      +/*
      + * CACHE_INVALIDATE filter
      + * -----------------------
      + *
      + * This filter gets added in the quick handler should a PUT, POST or DELETE
      + * method be detected. If the response is successful, we must invalidate any
      + * cached entity as per RFC2616 section 13.10.
      + *
      + * CACHE_INVALIDATE has to be a protocol filter to ensure that is run even if
      + * the response is a canned error message, which removes the content filters
      + * from the chain.
      + *
      + * CACHE_INVALIDATE expects cache request rec within its context because the
      + * request this filter runs on can be different from the one whose cache entry
      + * should be removed, due to internal redirects.
      + */
      +static apr_status_t cache_invalidate_filter(ap_filter_t *f,
      +                                            apr_bucket_brigade *in)
      +{
      +    request_rec *r = f->r;
      +    cache_request_rec *cache;
      +
      +    /* Setup cache_request_rec */
      +    cache = (cache_request_rec *) f->ctx;
      +
      +    if (!cache) {
      +        /* user likely configured CACHE_INVALIDATE manually; they should really
      +         * use mod_cache configuration to do that. So:
      +         * 1. Remove ourselves
      +         * 2. Do nothing and bail out
      +         */
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02465)
      +                "cache: CACHE_INVALIDATE enabled unexpectedly: %s", r->uri);
      +    }
      +    else {
      +
      +        if (r->status > 299) {
      +
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02466)
      +                    "cache: response status to '%s' method is %d (>299), not invalidating cached entity: %s", r->method, r->status, r->uri);
      +
      +        }
      +        else {
      +
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02467)
      +                    "cache: Invalidating all cached entities in response to '%s' request for %s",
      +                    r->method, r->uri);
      +
      +            cache_invalidate(cache, r);
      +
      +            /* we've got a cache invalidate! tell everyone who cares */
      +            cache_run_cache_status(cache->handle, r, r->headers_out,
      +                    AP_CACHE_INVALIDATE, apr_psprintf(r->pool,
      +                            "cache invalidated by %s", r->method));
      +
      +        }
      +
      +    }
      +
      +    /* remove ourselves */
      +    ap_remove_output_filter(f);
      +    return ap_pass_brigade(f->next, in);
      +}
      +
       /*
        * CACHE filter
        * ------------
      @@ -1531,7 +1729,7 @@ static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in)
        * INCLUDES filter, or to a filter that might perform transformations unique
        * to the specific request and that would otherwise be non-cacheable.
        */
      -static int cache_filter(ap_filter_t *f, apr_bucket_brigade *in)
      +static apr_status_t cache_filter(ap_filter_t *f, apr_bucket_brigade *in)
       {
       
           cache_server_conf
      @@ -1541,13 +1739,13 @@ static int cache_filter(ap_filter_t *f, apr_bucket_brigade *in)
       
           /* was the quick handler enabled */
           if (conf->quick) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r, APLOGNO(00776)
                       "cache: CACHE filter was added in quick handler mode and "
                       "will be ignored: %s", f->r->unparsed_uri);
           }
           /* otherwise we may have been bypassed, nothing to see here */
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(00777)
                       "cache: CACHE filter was added twice, or was added where "
                       "the cache has been bypassed and will be ignored: %s",
                       f->r->unparsed_uri);
      @@ -1672,7 +1870,8 @@ static void cache_insert_error_filter(request_rec *r)
       
               if (cache->stale_handle && cache->save_filter
                       && !cache->stale_handle->cache_obj->info.control.must_revalidate
      -                && !cache->stale_handle->cache_obj->info.control.proxy_revalidate) {
      +                && !cache->stale_handle->cache_obj->info.control.proxy_revalidate
      +                && !cache->stale_handle->cache_obj->info.control.s_maxage) {
                   const char *warn_head;
                   cache_server_conf
                           *conf =
      @@ -1805,7 +2004,7 @@ static void *merge_dir_config(apr_pool_t *p, void *basev, void *addv) {
       
       static void * create_cache_config(apr_pool_t *p, server_rec *s)
       {
      -    const char *tmppath;
      +    const char *tmppath = NULL;
           cache_server_conf *ps = apr_pcalloc(p, sizeof(cache_server_conf));
       
           /* array of URL prefixes for which caching is enabled */
      @@ -1906,8 +2105,7 @@ static const char *set_cache_quick_handler(cmd_parms *parms, void *dummy,
           cache_server_conf *conf;
       
           conf =
      -        (cache_server_conf *)ap_get_module_config(parms->server->module_config
      -,
      +        (cache_server_conf *)ap_get_module_config(parms->server->module_config,
                                                         &cache_module);
           conf->quick = flag;
           conf->quick_set = 1;
      @@ -2100,7 +2298,7 @@ static const char *add_cache_disable(cmd_parms *parms, void *dummy,
                                                         &cache_module);
       
           if (parms->path) {
      -        if (!strcmp(url, "on")) {
      +        if (!strcasecmp(url, "on")) {
                   dconf->disable = 1;
                   dconf->disable_set = 1;
                   return NULL;
      @@ -2486,6 +2684,11 @@ static void register_hooks(apr_pool_t *p)
                                         cache_remove_url_filter,
                                         NULL,
                                         AP_FTYPE_PROTOCOL);
      +    cache_invalidate_filter_handle =
      +        ap_register_output_filter("CACHE_INVALIDATE",
      +                                  cache_invalidate_filter,
      +                                  NULL,
      +                                  AP_FTYPE_PROTOCOL);
           ap_hook_post_config(cache_post_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
       }
       
      diff --git a/modules/cache/mod_cache.dep b/modules/cache/mod_cache.dep
      new file mode 100644
      index 00000000000..79094ac3033
      --- /dev/null
      +++ b/modules/cache/mod_cache.dep
      @@ -0,0 +1,194 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_cache.mak
      +
      +.\cache_storage.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\cache_common.h"\
      +	".\cache_storage.h"\
      +	".\cache_util.h"\
      +	".\mod_cache.h"\
      +	
      +
      +.\cache_util.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\cache_common.h"\
      +	".\cache_util.h"\
      +	".\mod_cache.h"\
      +	
      +
      +.\mod_cache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\cache_common.h"\
      +	".\cache_storage.h"\
      +	".\cache_util.h"\
      +	".\mod_cache.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/cache/mod_cache.h b/modules/cache/mod_cache.h
      index 70c4bc43ccd..53e80c039da 100644
      --- a/modules/cache/mod_cache.h
      +++ b/modules/cache/mod_cache.h
      @@ -109,6 +109,7 @@ typedef struct {
                                  const char *urlkey);
           int (*remove_url) (cache_handle_t *h, request_rec *r);
           apr_status_t (*commit_entity)(cache_handle_t *h, request_rec *r);
      +    apr_status_t (*invalidate_entity)(cache_handle_t *h, request_rec *r);
       } cache_provider;
       
       typedef enum {
      @@ -135,8 +136,6 @@ CACHE_DECLARE(void) ap_cache_usec2hex(apr_time_t j, char *y);
       CACHE_DECLARE(char *) ap_cache_generate_name(apr_pool_t *p, int dirlevels,
                                                    int dirlength,
                                                    const char *name);
      -CACHE_DECLARE(int) ap_cache_liststr(apr_pool_t *p, const char *list,
      -                                    const char *key, char **val);
       CACHE_DECLARE(const char *)ap_cache_tokstr(apr_pool_t *p, const char *list, const char **str);
       
       /* Create a new table consisting of those elements from an
      diff --git a/modules/cache/mod_cache.imp b/modules/cache/mod_cache.imp
      deleted file mode 100644
      index 71a285c2f05..00000000000
      --- a/modules/cache/mod_cache.imp
      +++ /dev/null
      @@ -1,12 +0,0 @@
      - (MODCACHE)
      - ap_cache_check_allowed,
      - ap_cache_current_age,
      - ap_cache_liststr,
      - ap_cache_tokstr,
      - ap_cache_hex2usec,
      - ap_cache_usec2hex,
      - ap_cache_generate_name,
      - ap_cache_cacheable_headers,
      - ap_cache_cacheable_headers_in,
      - ap_cache_cacheable_headers_out
      -
      diff --git a/modules/cache/mod_cache.mak b/modules/cache/mod_cache.mak
      new file mode 100644
      index 00000000000..a89b1bc9425
      --- /dev/null
      +++ b/modules/cache/mod_cache.mak
      @@ -0,0 +1,370 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_cache.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_cache - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_cache - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_cache - Win32 Release" && "$(CFG)" != "mod_cache - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cache.mak" CFG="mod_cache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\cache_storage.obj"
      +	-@erase "$(INTDIR)\cache_util.obj"
      +	-@erase "$(INTDIR)\mod_cache.obj"
      +	-@erase "$(INTDIR)\mod_cache.res"
      +	-@erase "$(INTDIR)\mod_cache_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache.exp"
      +	-@erase "$(OUTDIR)\mod_cache.lib"
      +	-@erase "$(OUTDIR)\mod_cache.pdb"
      +	-@erase "$(OUTDIR)\mod_cache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "CACHE_DECLARE_EXPORT" /D "MOD_CACHE_EXPORTS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cache.so" /d LONG_NAME="cache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache.pdb" /debug /out:"$(OUTDIR)\mod_cache.so" /implib:"$(OUTDIR)\mod_cache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\cache_storage.obj" \
      +	"$(INTDIR)\cache_util.obj" \
      +	"$(INTDIR)\mod_cache.obj" \
      +	"$(INTDIR)\mod_cache.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_cache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache.so"
      +   if exist .\Release\mod_cache.so.manifest mt.exe -manifest .\Release\mod_cache.so.manifest -outputresource:.\Release\mod_cache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\cache_storage.obj"
      +	-@erase "$(INTDIR)\cache_util.obj"
      +	-@erase "$(INTDIR)\mod_cache.obj"
      +	-@erase "$(INTDIR)\mod_cache.res"
      +	-@erase "$(INTDIR)\mod_cache_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache.exp"
      +	-@erase "$(OUTDIR)\mod_cache.lib"
      +	-@erase "$(OUTDIR)\mod_cache.pdb"
      +	-@erase "$(OUTDIR)\mod_cache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "CACHE_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cache.so" /d LONG_NAME="cache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache.pdb" /debug /out:"$(OUTDIR)\mod_cache.so" /implib:"$(OUTDIR)\mod_cache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\cache_storage.obj" \
      +	"$(INTDIR)\cache_util.obj" \
      +	"$(INTDIR)\mod_cache.obj" \
      +	"$(INTDIR)\mod_cache.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_cache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache.so"
      +   if exist .\Debug\mod_cache.so.manifest mt.exe -manifest .\Debug\mod_cache.so.manifest -outputresource:.\Debug\mod_cache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_cache.dep")
      +!INCLUDE "mod_cache.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_cache.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_cache - Win32 Release" || "$(CFG)" == "mod_cache - Win32 Debug"
      +SOURCE=.\cache_storage.c
      +
      +"$(INTDIR)\cache_storage.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\cache_util.c
      +
      +"$(INTDIR)\cache_util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\mod_cache.c
      +
      +"$(INTDIR)\mod_cache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_cache - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_cache - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_cache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_cache.so" /d LONG_NAME="cache_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_cache - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_cache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_cache.so" /d LONG_NAME="cache_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_cache_disk.c b/modules/cache/mod_cache_disk.c
      index 1ceb962bea1..52d5dba0b12 100644
      --- a/modules/cache/mod_cache_disk.c
      +++ b/modules/cache/mod_cache_disk.c
      @@ -80,7 +80,7 @@ static char *header_file(apr_pool_t *p, disk_cache_conf *conf,
           }
       
           if (dobj->prefix) {
      -        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
      +        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX "/",
                                  dobj->hashfile, CACHE_HEADER_SUFFIX, NULL);
            }
            else {
      @@ -98,7 +98,7 @@ static char *data_file(apr_pool_t *p, disk_cache_conf *conf,
           }
       
           if (dobj->prefix) {
      -        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX, "/",
      +        return apr_pstrcat(p, dobj->prefix, CACHE_VDIR_SUFFIX "/",
                                  dobj->hashfile, CACHE_DATA_SUFFIX, NULL);
            }
            else {
      @@ -173,8 +173,8 @@ static apr_status_t file_cache_el_final(disk_cache_conf *conf, disk_cache_file_t
       
               rv = safe_file_rename(conf, file->tempfile, file->file, file->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                    "cache_disk: rename tempfile to file failed:"
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00699)
      +                    "rename tempfile to file failed:"
                           " %s -> %s", file->tempfile, file->file);
                   apr_file_remove(file->tempfile, file->pool);
               }
      @@ -185,7 +185,8 @@ static apr_status_t file_cache_el_final(disk_cache_conf *conf, disk_cache_file_t
           return rv;
       }
       
      -static apr_status_t file_cache_temp_cleanup(void *dummy) {
      +static apr_status_t file_cache_temp_cleanup(void *dummy)
      +{
           disk_cache_file_t *file = (disk_cache_file_t *)dummy;
       
           /* clean up the temporary file */
      @@ -293,7 +294,7 @@ static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
            *     quoted-string expectation-extensions.
            */
       
      -    for(i=0, k=0; i < varray->nelts; i++) {
      +    for (i=0, k=0; i < varray->nelts; i++) {
               header = apr_table_get(headers, elts[i]);
               if (!header) {
                   header = "";
      @@ -350,23 +351,23 @@ static int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr
       
           /* we don't support caching of range requests (yet) */
           if (r->status == HTTP_PARTIAL_CONTENT) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: URL %s partial content response not cached",
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00700)
      +                "URL %s partial content response not cached",
                       key);
               return DECLINED;
           }
       
           /* Note, len is -1 if unknown so don't trust it too hard */
           if (len > dconf->maxfs) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: URL %s failed the size check "
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00701)
      +                "URL %s failed the size check "
                       "(%" APR_OFF_T_FMT " > %" APR_OFF_T_FMT ")",
                       key, len, dconf->maxfs);
               return DECLINED;
           }
           if (len >= 0 && len < dconf->minfs) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: URL %s failed the size check "
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00702)
      +                "URL %s failed the size check "
                       "(%" APR_OFF_T_FMT " < %" APR_OFF_T_FMT ")",
                       key, len, dconf->minfs);
               return DECLINED;
      @@ -381,10 +382,11 @@ static int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr
           dobj->name = obj->key;
           dobj->prefix = NULL;
           /* Save the cache root */
      -    dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
      +    dobj->root = apr_pstrmemdup(r->pool, conf->cache_root, conf->cache_root_len);
           dobj->root_len = conf->cache_root_len;
       
           apr_pool_create(&pool, r->pool);
      +    apr_pool_tag(pool, "mod_cache (create_entity)");
       
           file_cache_create(conf, &dobj->hdrs, pool);
           file_cache_create(conf, &dobj->vary, pool);
      @@ -424,8 +426,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
           if (conf->cache_root == NULL) {
               if (!error_logged) {
                   error_logged = 1;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                    "cache_disk: Cannot cache files to disk without a CacheRoot specified.");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00703)
      +                    "Cannot cache files to disk without a CacheRoot specified.");
               }
               return DECLINED;
           }
      @@ -440,7 +442,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
           dobj->prefix = NULL;
       
           /* Save the cache root */
      -    dobj->root = apr_pstrndup(r->pool, conf->cache_root, conf->cache_root_len);
      +    dobj->root = apr_pstrmemdup(r->pool, conf->cache_root, conf->cache_root_len);
           dobj->root_len = conf->cache_root_len;
       
           dobj->vary.file = header_file(r->pool, conf, dobj, key);
      @@ -464,8 +466,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
               varray = apr_array_make(r->pool, 5, sizeof(char*));
               rc = read_array(r, varray, dobj->vary.fd);
               if (rc != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                    "cache_disk: Cannot parse vary header file: %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(00704)
      +                    "Cannot parse vary header file: %s",
                           dobj->vary.file);
                   apr_file_close(dobj->vary.fd);
                   return DECLINED;
      @@ -485,8 +487,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
               }
           }
           else if (format != DISK_FORMAT_VERSION) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                "cache_disk: File '%s' has a version mismatch. File had version: %d.",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00705)
      +                "File '%s' has a version mismatch. File had version: %d.",
                       dobj->vary.file, format);
               apr_file_close(dobj->vary.fd);
               return DECLINED;
      @@ -511,6 +513,7 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
           dobj->name = key;
       
           apr_pool_create(&pool, r->pool);
      +    apr_pool_tag(pool, "mod_cache (open_entity)");
       
           file_cache_create(conf, &dobj->hdrs, pool);
           file_cache_create(conf, &dobj->vary, pool);
      @@ -521,19 +524,19 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
           /* Read the bytes to setup the cache_info fields */
           rc = file_cache_recall_mydata(dobj->hdrs.fd, info, dobj, r);
           if (rc != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                "cache_disk: Cannot read header file %s", dobj->hdrs.file);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(00706)
      +                "Cannot read header file %s", dobj->hdrs.file);
               apr_file_close(dobj->hdrs.fd);
               return DECLINED;
           }
       
      -    apr_file_close(dobj->hdrs.fd);
       
           /* Is this a cached HEAD request? */
           if (dobj->disk_info.header_only && !r->header_only) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r,
      -                "cache_disk: HEAD request cached, non-HEAD requested, ignoring: %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(00707)
      +                "HEAD request cached, non-HEAD requested, ignoring: %s",
                       dobj->hdrs.file);
      +        apr_file_close(dobj->hdrs.fd);
               return DECLINED;
           }
       
      @@ -549,8 +552,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
       #endif
               rc = apr_file_open(&dobj->data.fd, dobj->data.file, flags, 0, r->pool);
               if (rc != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                    "cache_disk: Cannot open data file %s", dobj->data.file);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(00708)
      +                    "Cannot open data file %s", dobj->data.file);
                   apr_file_close(dobj->hdrs.fd);
                   return DECLINED;
               }
      @@ -566,8 +569,8 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
                       dobj->disk_info.device == finfo.device) {
       
                   /* Initialize the cache_handle callback functions */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                    "cache_disk: Recalled cached URL info header %s", dobj->name);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00709)
      +                    "Recalled cached URL info header %s", dobj->name);
       
                   /* make the configuration stick */
                   h->cache_obj = obj;
      @@ -587,15 +590,34 @@ static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
           }
       
           /* Oh dear, no luck matching header to the body */
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -            "cache_disk: Cached URL info header '%s' didn't match body, ignoring this entry",
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00710)
      +            "Cached URL info header '%s' didn't match body, ignoring this entry",
                   dobj->name);
       
      +    apr_file_close(dobj->hdrs.fd);
           return DECLINED;
       }
       
      +static void close_disk_cache_fd(disk_cache_file_t *file)
      +{
      +   if (file->fd != NULL) {
      +       apr_file_close(file->fd);
      +       file->fd = NULL;
      +   }
      +   if (file->tempfd != NULL) {
      +       apr_file_close(file->tempfd);
      +       file->tempfd = NULL;
      +   }
      +}
      +
       static int remove_entity(cache_handle_t *h)
       {
      +    disk_cache_object_t *dobj = (disk_cache_object_t *) h->cache_obj->vobj;
      +
      +    close_disk_cache_fd(&(dobj->hdrs));
      +    close_disk_cache_fd(&(dobj->vary));
      +    close_disk_cache_fd(&(dobj->data));
      +
           /* Null out the cache object pointer so next time we start from scratch  */
           h->cache_obj = NULL;
           return OK;
      @@ -614,16 +636,16 @@ static int remove_url(cache_handle_t *h, request_rec *r)
       
           /* Delete headers file */
           if (dobj->hdrs.file) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: Deleting %s from cache.", dobj->hdrs.file);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00711)
      +                "Deleting %s from cache.", dobj->hdrs.file);
       
               rc = apr_file_remove(dobj->hdrs.file, r->pool);
               if ((rc != APR_SUCCESS) && !APR_STATUS_IS_ENOENT(rc)) {
                   /* Will only result in an output if httpd is started with -e debug.
                    * For reason see log_error_core for the case s == NULL.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r,
      -                    "cache_disk: Failed to delete headers file %s from cache.",
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(00712)
      +                    "Failed to delete headers file %s from cache.",
                           dobj->hdrs.file);
                   return DECLINED;
               }
      @@ -631,16 +653,16 @@ static int remove_url(cache_handle_t *h, request_rec *r)
       
           /* Delete data file */
           if (dobj->data.file) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: Deleting %s from cache.", dobj->data.file);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00713)
      +                "Deleting %s from cache.", dobj->data.file);
       
               rc = apr_file_remove(dobj->data.file, r->pool);
               if ((rc != APR_SUCCESS) && !APR_STATUS_IS_ENOENT(rc)) {
                   /* Will only result in an output if httpd is started with -e debug.
                    * For reason see log_error_core for the case s == NULL.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r,
      -                    "cache_disk: Failed to delete data file %s from cache.",
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(00714)
      +                    "Failed to delete data file %s from cache.",
                           dobj->data.file);
                   return DECLINED;
               }
      @@ -671,9 +693,8 @@ static int remove_url(cache_handle_t *h, request_rec *r)
                    * we won't either delete or go above our cache root.
                    */
                   for (q = dir + dobj->root_len; *q ; ) {
      -                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                        "cache_disk: Deleting directory %s from cache",
      -                        dir);
      +                 ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00715)
      +                        "Deleting directory %s from cache", dir);
       
                        rc = apr_dir_remove(dir, r->pool);
                        if (rc != APR_SUCCESS && !APR_STATUS_IS_ENOENT(rc)) {
      @@ -698,7 +719,7 @@ static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
           while (1) {
               rv = apr_file_gets(w, MAX_STRING_LEN - 1, file);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00716)
                                 "Premature end of vary array.");
                   return rv;
               }
      @@ -718,7 +739,7 @@ static apr_status_t read_array(request_rec *r, apr_array_header_t* arr,
                   break;
               }
       
      -       *((const char **) apr_array_push(arr)) = apr_pstrdup(r->pool, w);
      +        *((const char **) apr_array_push(arr)) = apr_pstrdup(r->pool, w);
           }
       
           return APR_SUCCESS;
      @@ -740,8 +761,7 @@ static apr_status_t store_array(apr_file_t *fd, apr_array_header_t* arr)
               iov[1].iov_base = CRLF;
               iov[1].iov_len = sizeof(CRLF) - 1;
       
      -        rv = apr_file_writev(fd, (const struct iovec *) &iov, 2,
      -                             &amt);
      +        rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 2, &amt);
               if (rv != APR_SUCCESS) {
                   return rv;
               }
      @@ -750,8 +770,7 @@ static apr_status_t store_array(apr_file_t *fd, apr_array_header_t* arr)
           iov[0].iov_base = CRLF;
           iov[0].iov_len = sizeof(CRLF) - 1;
       
      -    return apr_file_writev(fd, (const struct iovec *) &iov, 1,
      -                         &amt);
      +    return apr_file_writev_full(fd, (const struct iovec *) &iov, 1, &amt);
       }
       
       static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
      @@ -767,7 +786,7 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
               /* ### What about APR_EOF? */
               rv = apr_file_gets(w, MAX_STRING_LEN - 1, file);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00717)
                                 "Premature end of cache headers.");
                   return rv;
               }
      @@ -810,7 +829,7 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
                           ++maybeASCII;
                   }
                   if (maybeASCII > maybeEBCDIC) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00718)
                               "CGI Interface Error: Script headers apparently ASCII: (CGI = %s)",
                               r->filename);
                       inbytes_left = outbytes_left = cp - w;
      @@ -826,7 +845,7 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
               }
       
               *l++ = '\0';
      -        while (*l && apr_isspace(*l)) {
      +        while (apr_isspace(*l)) {
                   ++l;
               }
       
      @@ -846,11 +865,12 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
       static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
       {
           disk_cache_object_t *dobj = (disk_cache_object_t *) h->cache_obj->vobj;
      +    apr_status_t rv;
       
           /* This case should not happen... */
           if (!dobj->hdrs.fd) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                "cache_disk: recalling headers; but no header fd for %s", dobj->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00719)
      +                "recalling headers; but no header fd for %s", dobj->name);
               return APR_NOTFOUND;
           }
       
      @@ -858,13 +878,23 @@ static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
           h->resp_hdrs = apr_table_make(r->pool, 20);
       
           /* Call routine to read the header lines/status line */
      -    read_table(h, r, h->resp_hdrs, dobj->hdrs.fd);
      -    read_table(h, r, h->req_hdrs, dobj->hdrs.fd);
      +    rv = read_table(h, r, h->resp_hdrs, dobj->hdrs.fd);
      +    if (rv != APR_SUCCESS) { 
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02987) 
      +                      "Error reading response headers from %s for %s",
      +                      dobj->hdrs.file, dobj->name);
      +    }
      +    rv = read_table(h, r, h->req_hdrs, dobj->hdrs.fd);
      +    if (rv != APR_SUCCESS) { 
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02988) 
      +                      "Error reading request headers from %s for %s",
      +                      dobj->hdrs.file, dobj->name);
      +    }
       
           apr_file_close(dobj->hdrs.fd);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -            "cache_disk: Recalled headers for URL %s", dobj->name);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00720)
      +            "Recalled headers for URL %s", dobj->name);
           return APR_SUCCESS;
       }
       
      @@ -899,8 +929,7 @@ static apr_status_t store_table(apr_file_t *fd, apr_table_t *table)
                   iov[3].iov_base = CRLF;
                   iov[3].iov_len = sizeof(CRLF) - 1;
       
      -            rv = apr_file_writev(fd, (const struct iovec *) &iov, 4,
      -                                 &amt);
      +            rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 4, &amt);
                   if (rv != APR_SUCCESS) {
                       return rv;
                   }
      @@ -908,8 +937,7 @@ static apr_status_t store_table(apr_file_t *fd, apr_table_t *table)
           }
           iov[0].iov_base = CRLF;
           iov[0].iov_len = sizeof(CRLF) - 1;
      -    rv = apr_file_writev(fd, (const struct iovec *) &iov, 1,
      -                         &amt);
      +    rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 1, &amt);
           return rv;
       }
       
      @@ -927,6 +955,10 @@ static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info
               dobj->headers_in = ap_cache_cacheable_headers_in(r);
           }
       
      +    if (r->header_only && r->status != HTTP_NOT_MODIFIED) {
      +        dobj->disk_info.header_only = 1;
      +    }
      +
           return APR_SUCCESS;
       }
       
      @@ -968,24 +1000,48 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
                                        dobj->vary.pool);
       
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                        "cache_disk: could not create temp file %s",
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00721)
      +                        "could not create vary file %s",
                               dobj->vary.tempfile);
                       return rv;
                   }
       
                   amt = sizeof(format);
      -            apr_file_write(dobj->vary.tempfd, &format, &amt);
      +            rv = apr_file_write_full(dobj->vary.tempfd, &format, amt, NULL);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00722)
      +                        "could not write to vary file %s",
      +                        dobj->vary.tempfile);
      +                apr_file_close(dobj->vary.tempfd);
      +                apr_pool_destroy(dobj->vary.pool);
      +                return rv;
      +            }
       
                   amt = sizeof(h->cache_obj->info.expire);
      -            apr_file_write(dobj->vary.tempfd, &h->cache_obj->info.expire, &amt);
      +            rv = apr_file_write_full(dobj->vary.tempfd,
      +                                     &h->cache_obj->info.expire, amt, NULL);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00723)
      +                        "could not write to vary file %s",
      +                        dobj->vary.tempfile);
      +                apr_file_close(dobj->vary.tempfd);
      +                apr_pool_destroy(dobj->vary.pool);
      +                return rv;
      +            }
       
                   varray = apr_array_make(r->pool, 6, sizeof(char*));
                   tokens_to_array(r->pool, tmp, varray);
       
                   store_array(dobj->vary.tempfd, varray);
       
      -            apr_file_close(dobj->vary.tempfd);
      +            rv = apr_file_close(dobj->vary.tempfd);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00724)
      +                        "could not close vary file %s",
      +                        dobj->vary.tempfile);
      +                apr_pool_destroy(dobj->vary.pool);
      +                return rv;
      +            }
       
                   tmp = regen_key(r->pool, dobj->headers_in, varray, dobj->name);
                   dobj->prefix = dobj->hdrs.file;
      @@ -1001,8 +1057,8 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
                                APR_BUFFERED | APR_EXCL, dobj->hdrs.pool);
       
           if (rv != APR_SUCCESS) {
      -       ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                "cache_disk: could not create temp file %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00725)
      +                "could not create header file %s",
                       dobj->hdrs.tempfile);
               return rv;
           }
      @@ -1028,22 +1084,25 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
           iov[1].iov_base = (void*)dobj->name;
           iov[1].iov_len = disk_info.name_len;
       
      -    rv = apr_file_writev(dobj->hdrs.tempfd, (const struct iovec *) &iov, 2, &amt);
      +    rv = apr_file_writev_full(dobj->hdrs.tempfd, (const struct iovec *) &iov,
      +                              2, &amt);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                "cache_disk: could not write info to header file %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00726)
      +                "could not write info to header file %s",
                       dobj->hdrs.tempfile);
               apr_file_close(dobj->hdrs.tempfd);
      +        apr_pool_destroy(dobj->hdrs.pool);
               return rv;
           }
       
           if (dobj->headers_out) {
               rv = store_table(dobj->hdrs.tempfd, dobj->headers_out);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                    "cache_disk: could not write out-headers to header file %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00727)
      +                    "could not write out-headers to header file %s",
                           dobj->hdrs.tempfile);
                   apr_file_close(dobj->hdrs.tempfd);
      +            apr_pool_destroy(dobj->hdrs.pool);
                   return rv;
               }
           }
      @@ -1053,15 +1112,23 @@ static apr_status_t write_headers(cache_handle_t *h, request_rec *r)
           if (dobj->headers_in) {
               rv = store_table(dobj->hdrs.tempfd, dobj->headers_in);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r,
      -                    "cache_disk: could not write in-headers to header file %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00728)
      +                    "could not write in-headers to header file %s",
                           dobj->hdrs.tempfile);
                   apr_file_close(dobj->hdrs.tempfd);
      +            apr_pool_destroy(dobj->hdrs.pool);
                   return rv;
               }
           }
       
      -    apr_file_close(dobj->hdrs.tempfd); /* flush and close */
      +    rv = apr_file_close(dobj->hdrs.tempfd); /* flush and close */
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00729)
      +                "could not close header file %s",
      +                dobj->hdrs.tempfile);
      +        apr_pool_destroy(dobj->hdrs.pool);
      +        return rv;
      +    }
       
           return APR_SUCCESS;
       }
      @@ -1075,9 +1142,6 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
           disk_cache_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &cache_disk_module);
           int seen_eos = 0;
       
      -    if (!dobj->bb) {
      -        dobj->bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      -    }
           if (!dobj->offset) {
               dobj->offset = dconf->readsize;
           }
      @@ -1107,7 +1171,6 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
                   seen_eos = 1;
                   dobj->done = 1;
                   APR_BUCKET_REMOVE(e);
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
                   APR_BRIGADE_INSERT_TAIL(out, e);
                   break;
               }
      @@ -1115,7 +1178,6 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
               /* honour flush buckets, we'll get called again */
               if (APR_BUCKET_IS_FLUSH(e)) {
                   APR_BUCKET_REMOVE(e);
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
                   APR_BRIGADE_INSERT_TAIL(out, e);
                   break;
               }
      @@ -1123,21 +1185,20 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
               /* metadata buckets are preserved as is */
               if (APR_BUCKET_IS_METADATA(e)) {
                   APR_BUCKET_REMOVE(e);
      -            APR_BRIGADE_INSERT_TAIL(dobj->bb, e);
      +            APR_BRIGADE_INSERT_TAIL(out, e);
                   continue;
               }
       
               /* read the bucket, write to the cache */
               rv = apr_bucket_read(e, &str, &length, APR_BLOCK_READ);
               APR_BUCKET_REMOVE(e);
      -        APR_BRIGADE_INSERT_TAIL(dobj->bb, e);
      +        APR_BRIGADE_INSERT_TAIL(out, e);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                    "cache_disk: Error when reading bucket for URL %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00730)
      +                    "Error when reading bucket for URL %s",
                           h->cache_obj->key);
                   /* Remove the intermediate cache file and return non-APR_SUCCESS */
                   apr_pool_destroy(dobj->data.pool);
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
                   return rv;
               }
       
      @@ -1146,53 +1207,51 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
                   continue;
               }
       
      -        /* Attempt to create the data file at the last possible moment, if
      -         * the body is empty, we don't write a file at all, and save an inode.
      -         */
      -        if (!dobj->data.tempfd) {
      -            apr_finfo_t finfo;
      -            rv = apr_file_mktemp(&dobj->data.tempfd, dobj->data.tempfile,
      -                                 APR_CREATE | APR_WRITE | APR_BINARY |
      -                                 APR_BUFFERED | APR_EXCL, dobj->data.pool);
      +        if (!dobj->disk_info.header_only) {
      +
      +            /* Attempt to create the data file at the last possible moment, if
      +             * the body is empty, we don't write a file at all, and save an inode.
      +             */
      +            if (!dobj->data.tempfd) {
      +                apr_finfo_t finfo;
      +                rv = apr_file_mktemp(&dobj->data.tempfd, dobj->data.tempfile,
      +                        APR_CREATE | APR_WRITE | APR_BINARY | APR_BUFFERED
      +                                | APR_EXCL, dobj->data.pool);
      +                if (rv != APR_SUCCESS) {
      +                    apr_pool_destroy(dobj->data.pool);
      +                    return rv;
      +                }
      +                dobj->file_size = 0;
      +                rv = apr_file_info_get(&finfo, APR_FINFO_IDENT,
      +                        dobj->data.tempfd);
      +                if (rv != APR_SUCCESS) {
      +                    apr_pool_destroy(dobj->data.pool);
      +                    return rv;
      +                }
      +                dobj->disk_info.device = finfo.device;
      +                dobj->disk_info.inode = finfo.inode;
      +                dobj->disk_info.has_body = 1;
      +            }
      +
      +            /* write to the cache, leave if we fail */
      +            rv = apr_file_write_full(dobj->data.tempfd, str, length, &written);
                   if (rv != APR_SUCCESS) {
      +                ap_log_rerror(
      +                        APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00731) "Error when writing cache file for URL %s", h->cache_obj->key);
      +                /* Remove the intermediate cache file and return non-APR_SUCCESS */
                       apr_pool_destroy(dobj->data.pool);
      -                APR_BRIGADE_CONCAT(out, dobj->bb);
                       return rv;
                   }
      -            dobj->file_size = 0;
      -            rv = apr_file_info_get(&finfo, APR_FINFO_IDENT,
      -                    dobj->data.tempfd);
      -            if (rv != APR_SUCCESS) {
      +            dobj->file_size += written;
      +            if (dobj->file_size > dconf->maxfs) {
      +                ap_log_rerror(
      +                        APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00732) "URL %s failed the size check "
      +                        "(%" APR_OFF_T_FMT ">%" APR_OFF_T_FMT ")", h->cache_obj->key, dobj->file_size, dconf->maxfs);
      +                /* Remove the intermediate cache file and return non-APR_SUCCESS */
                       apr_pool_destroy(dobj->data.pool);
      -                APR_BRIGADE_CONCAT(out, dobj->bb);
      -                return rv;
      +                return APR_EGENERAL;
                   }
      -            dobj->disk_info.device = finfo.device;
      -            dobj->disk_info.inode = finfo.inode;
      -            dobj->disk_info.has_body = 1;
      -        }
       
      -        /* write to the cache, leave if we fail */
      -        rv = apr_file_write_full(dobj->data.tempfd, str, length, &written);
      -        if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                    "cache_disk: Error when writing cache file for URL %s",
      -                    h->cache_obj->key);
      -            /* Remove the intermediate cache file and return non-APR_SUCCESS */
      -            apr_pool_destroy(dobj->data.pool);
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
      -            return rv;
      -        }
      -        dobj->file_size += written;
      -        if (dobj->file_size > dconf->maxfs) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                    "cache_disk: URL %s failed the size check "
      -                    "(%" APR_OFF_T_FMT ">%" APR_OFF_T_FMT ")",
      -                    h->cache_obj->key, dobj->file_size, dconf->maxfs);
      -            /* Remove the intermediate cache file and return non-APR_SUCCESS */
      -            apr_pool_destroy(dobj->data.pool);
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
      -            return APR_EGENERAL;
               }
       
               /* have we reached the limit of how much we're prepared to write in one
      @@ -1203,12 +1262,10 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
               dobj->offset -= length;
               if (dobj->offset <= 0) {
                   dobj->offset = 0;
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
                   break;
               }
               if ((dconf->readtime && apr_time_now() > dobj->timeout)) {
                   dobj->timeout = 0;
      -            APR_BRIGADE_CONCAT(out, dobj->bb);
                   break;
               }
       
      @@ -1220,38 +1277,44 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
           if (seen_eos) {
               const char *cl_header = apr_table_get(r->headers_out, "Content-Length");
       
      -        if (dobj->data.tempfd) {
      -            apr_file_close(dobj->data.tempfd);
      -        }
      +        if (!dobj->disk_info.header_only) {
       
      -        if (r->connection->aborted || r->no_cache) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                    "cache_disk: Discarding body for URL %s "
      -                    "because connection has been aborted.",
      -                    h->cache_obj->key);
      -            /* Remove the intermediate cache file and return non-APR_SUCCESS */
      -            apr_pool_destroy(dobj->data.pool);
      -            return APR_EGENERAL;
      -        }
      -        if (dobj->file_size < dconf->minfs) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                    "cache_disk: URL %s failed the size check "
      -                    "(%" APR_OFF_T_FMT "<%" APR_OFF_T_FMT ")",
      -                    h->cache_obj->key, dobj->file_size, dconf->minfs);
      -            /* Remove the intermediate cache file and return non-APR_SUCCESS */
      -            apr_pool_destroy(dobj->data.pool);
      -            return APR_EGENERAL;
      -        }
      -        if (cl_header) {
      -            apr_int64_t cl = apr_atoi64(cl_header);
      -            if ((errno == 0) && (dobj->file_size != cl)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                        "cache_disk: URL %s didn't receive complete response, not caching",
      -                        h->cache_obj->key);
      +            if (dobj->data.tempfd) {
      +                rv = apr_file_close(dobj->data.tempfd);
      +                if (rv != APR_SUCCESS) {
      +                    /* Buffered write failed, abandon attempt to write */
      +                    apr_pool_destroy(dobj->data.pool);
      +                    return rv;
      +                }
      +            }
      +
      +            if (r->connection->aborted || r->no_cache) {
      +                ap_log_rerror(
      +                        APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00733) "Discarding body for URL %s "
      +                        "because connection has been aborted.", h->cache_obj->key);
      +                /* Remove the intermediate cache file and return non-APR_SUCCESS */
      +                apr_pool_destroy(dobj->data.pool);
      +                return APR_EGENERAL;
      +            }
      +            if (dobj->file_size < dconf->minfs) {
      +                ap_log_rerror(
      +                        APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00734) "URL %s failed the size check "
      +                        "(%" APR_OFF_T_FMT "<%" APR_OFF_T_FMT ")", h->cache_obj->key, dobj->file_size, dconf->minfs);
                       /* Remove the intermediate cache file and return non-APR_SUCCESS */
                       apr_pool_destroy(dobj->data.pool);
                       return APR_EGENERAL;
                   }
      +            if (cl_header) {
      +                apr_int64_t cl = apr_atoi64(cl_header);
      +                if ((errno == 0) && (dobj->file_size != cl)) {
      +                    ap_log_rerror(
      +                            APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00735) "URL %s didn't receive complete response, not caching", h->cache_obj->key);
      +                    /* Remove the intermediate cache file and return non-APR_SUCCESS */
      +                    apr_pool_destroy(dobj->data.pool);
      +                    return APR_EGENERAL;
      +                }
      +            }
      +
               }
       
               /* All checks were fine, we're good to go when the commit comes */
      @@ -1278,19 +1341,24 @@ static apr_status_t commit_entity(cache_handle_t *h, request_rec *r)
               rv = file_cache_el_final(conf, &dobj->vary, r);
           }
           if (APR_SUCCESS == rv) {
      -        rv = file_cache_el_final(conf, &dobj->data, r);
      +        if (!dobj->disk_info.header_only) {
      +            rv = file_cache_el_final(conf, &dobj->data, r);
      +        }
      +        else if (dobj->data.file) {
      +            rv = apr_file_remove(dobj->data.file, dobj->data.pool);
      +        }
           }
       
           /* remove the cached items completely on any failure */
           if (APR_SUCCESS != rv) {
               remove_url(h, r);
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: commit_entity: URL '%s' not cached due to earlier disk error.",
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00736)
      +                "commit_entity: URL '%s' not cached due to earlier disk error.",
                       dobj->name);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                "cache_disk: commit_entity: Headers and body for URL %s cached.",
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00737)
      +                "commit_entity: Headers and body for URL %s cached.",
                       dobj->name);
           }
       
      @@ -1299,6 +1367,21 @@ static apr_status_t commit_entity(cache_handle_t *h, request_rec *r)
           return APR_SUCCESS;
       }
       
      +static apr_status_t invalidate_entity(cache_handle_t *h, request_rec *r)
      +{
      +    apr_status_t rv;
      +
      +    rv = recall_headers(h, r);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    /* mark the entity as invalidated */
      +    h->cache_obj->info.control.invalidated = 1;
      +
      +    return commit_entity(h, r);
      +}
      +
       static void *create_dir_config(apr_pool_t *p, char *dummy)
       {
           disk_cache_dir_conf *dconf = apr_pcalloc(p, sizeof(disk_cache_dir_conf));
      @@ -1311,7 +1394,8 @@ static void *create_dir_config(apr_pool_t *p, char *dummy)
           return dconf;
       }
       
      -static void *merge_dir_config(apr_pool_t *p, void *basev, void *addv) {
      +static void *merge_dir_config(apr_pool_t *p, void *basev, void *addv)
      +{
           disk_cache_dir_conf *new = (disk_cache_dir_conf *) apr_pcalloc(p, sizeof(disk_cache_dir_conf));
           disk_cache_dir_conf *add = (disk_cache_dir_conf *) addv;
           disk_cache_dir_conf *base = (disk_cache_dir_conf *) basev;
      @@ -1401,6 +1485,7 @@ static const char
           {
               return "CacheMinFileSize argument must be a non-negative integer representing the min size of a file to cache in bytes.";
           }
      +    dconf->minfs_set = 1;
           return NULL;
       }
       
      @@ -1414,6 +1499,7 @@ static const char
           {
               return "CacheMaxFileSize argument must be a non-negative integer representing the max size of a file to cache in bytes.";
           }
      +    dconf->maxfs_set = 1;
           return NULL;
       }
       
      @@ -1476,7 +1562,8 @@ static const cache_provider cache_disk_provider =
           &create_entity,
           &open_entity,
           &remove_url,
      -    &commit_entity
      +    &commit_entity,
      +    &invalidate_entity
       };
       
       static void disk_cache_register_hook(apr_pool_t *p)
      diff --git a/modules/cache/mod_cache_disk.dep b/modules/cache/mod_cache_disk.dep
      new file mode 100644
      index 00000000000..c757a8d2046
      --- /dev/null
      +++ b/modules/cache/mod_cache_disk.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_cache_disk.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_cache_disk.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\cache_common.h"\
      +	".\cache_disk_common.h"\
      +	".\mod_cache.h"\
      +	".\mod_cache_disk.h"\
      +	
      diff --git a/modules/cache/mod_cache_disk.h b/modules/cache/mod_cache_disk.h
      index 809115a0e00..561ee3b6e00 100644
      --- a/modules/cache/mod_cache_disk.h
      +++ b/modules/cache/mod_cache_disk.h
      @@ -49,7 +49,6 @@ typedef struct disk_cache_object {
           const char *key;             /* On-disk prefix; URI with Vary bits (if present) */
           apr_off_t file_size;         /*  File size of the cached data file  */
           disk_cache_info_t disk_info; /* Header information. */
      -    apr_bucket_brigade *bb;      /* Set aside brigade */
           apr_table_t *headers_in;     /* Input headers to save */
           apr_table_t *headers_out;    /* Output headers to save */
           apr_off_t offset;            /* Max size to set aside */
      diff --git a/modules/cache/mod_cache_disk.mak b/modules/cache/mod_cache_disk.mak
      new file mode 100644
      index 00000000000..5b4dd7aa260
      --- /dev/null
      +++ b/modules/cache/mod_cache_disk.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_cache_disk.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_cache_disk - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_cache_disk - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_cache_disk - Win32 Release" && "$(CFG)" != "mod_cache_disk - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cache_disk.mak" CFG="mod_cache_disk - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cache_disk - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cache_disk - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache_disk.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_cache - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_cache_disk.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_cache - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cache_disk.obj"
      +	-@erase "$(INTDIR)\mod_cache_disk.res"
      +	-@erase "$(INTDIR)\mod_cache_disk_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_disk_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_disk.exp"
      +	-@erase "$(OUTDIR)\mod_cache_disk.lib"
      +	-@erase "$(OUTDIR)\mod_cache_disk.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_disk.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_disk_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache_disk.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cache_disk.so" /d LONG_NAME="cache_disk_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache_disk.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache_disk.pdb" /debug /out:"$(OUTDIR)\mod_cache_disk.so" /implib:"$(OUTDIR)\mod_cache_disk.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_disk.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cache_disk.obj" \
      +	"$(INTDIR)\mod_cache_disk.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_cache.lib"
      +
      +"$(OUTDIR)\mod_cache_disk.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_cache_disk.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache_disk.so"
      +   if exist .\Release\mod_cache_disk.so.manifest mt.exe -manifest .\Release\mod_cache_disk.so.manifest -outputresource:.\Release\mod_cache_disk.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache_disk.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_cache - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_cache_disk.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_cache - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cache_disk.obj"
      +	-@erase "$(INTDIR)\mod_cache_disk.res"
      +	-@erase "$(INTDIR)\mod_cache_disk_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_disk_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_disk.exp"
      +	-@erase "$(OUTDIR)\mod_cache_disk.lib"
      +	-@erase "$(OUTDIR)\mod_cache_disk.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_disk.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_disk_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache_disk.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cache_disk.so" /d LONG_NAME="cache_disk_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache_disk.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache_disk.pdb" /debug /out:"$(OUTDIR)\mod_cache_disk.so" /implib:"$(OUTDIR)\mod_cache_disk.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_disk.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cache_disk.obj" \
      +	"$(INTDIR)\mod_cache_disk.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_cache.lib"
      +
      +"$(OUTDIR)\mod_cache_disk.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_cache_disk.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache_disk.so"
      +   if exist .\Debug\mod_cache_disk.so.manifest mt.exe -manifest .\Debug\mod_cache_disk.so.manifest -outputresource:.\Debug\mod_cache_disk.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_cache_disk.dep")
      +!INCLUDE "mod_cache_disk.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_cache_disk.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_cache_disk - Win32 Release" || "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +"mod_cache - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Release" 
      +   cd "."
      +
      +"mod_cache - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +"mod_cache - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Debug" 
      +   cd "."
      +
      +"mod_cache - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_cache_disk - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_cache_disk.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache_disk.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_cache_disk.so" /d LONG_NAME="cache_disk_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_disk - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_cache_disk.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache_disk.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_cache_disk.so" /d LONG_NAME="cache_disk_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_cache_disk.c
      +
      +"$(INTDIR)\mod_cache_disk.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c
      new file mode 100644
      index 00000000000..09b78236618
      --- /dev/null
      +++ b/modules/cache/mod_cache_socache.c
      @@ -0,0 +1,1541 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "apr_lib.h"
      +#include "apr_file_io.h"
      +#include "apr_strings.h"
      +#include "apr_buckets.h"
      +#include "httpd.h"
      +#include "http_config.h"
      +#include "http_log.h"
      +#include "http_core.h"
      +#include "http_protocol.h"
      +#include "ap_provider.h"
      +#include "ap_socache.h"
      +#include "util_filter.h"
      +#include "util_script.h"
      +#include "util_charset.h"
      +#include "util_mutex.h"
      +
      +#include "mod_cache.h"
      +#include "mod_status.h"
      +
      +#include "cache_socache_common.h"
      +
      +/*
      + * mod_cache_socache: Shared Object Cache Based HTTP 1.1 Cache.
      + *
      + * Flow to Find the entry:
      + *   Incoming client requests URI /foo/bar/baz
      + *   Fetch URI key (may contain Format #1 or Format #2)
      + *   If format #1 (Contains a list of Vary Headers):
      + *      Use each header name (from .header) with our request values (headers_in) to
      + *      regenerate key using HeaderName+HeaderValue+.../foo/bar/baz
      + *      re-read in key (must be format #2)
      + *
      + * Format #1:
      + *   apr_uint32_t format;
      + *   apr_time_t expire;
      + *   apr_array_t vary_headers (delimited by CRLF)
      + *
      + * Format #2:
      + *   cache_socache_info_t (first sizeof(apr_uint32_t) bytes is the format)
      + *   entity name (sobj->name) [length is in cache_socache_info_t->name_len]
      + *   r->headers_out (delimited by CRLF)
      + *   CRLF
      + *   r->headers_in (delimited by CRLF)
      + *   CRLF
      + */
      +
      +module AP_MODULE_DECLARE_DATA cache_socache_module;
      +
      +/*
      + * cache_socache_object_t
      + * Pointed to by cache_object_t::vobj
      + */
      +typedef struct cache_socache_object_t
      +{
      +    apr_pool_t *pool; /* pool */
      +    unsigned char *buffer; /* the cache buffer */
      +    apr_size_t buffer_len; /* size of the buffer */
      +    apr_bucket_brigade *body; /* brigade containing the body, if any */
      +    apr_table_t *headers_in; /* Input headers to save */
      +    apr_table_t *headers_out; /* Output headers to save */
      +    cache_socache_info_t socache_info; /* Header information. */
      +    apr_size_t body_offset; /* offset to the start of the body */
      +    apr_off_t body_length; /* length of the cached entity body */
      +    unsigned int newbody :1; /* whether a new body is present */
      +    apr_time_t expire; /* when to expire the entry */
      +
      +    const char *name; /* Requested URI without vary bits - suitable for mortals. */
      +    const char *key; /* On-disk prefix; URI with Vary bits (if present) */
      +    apr_off_t offset; /* Max size to set aside */
      +    apr_time_t timeout; /* Max time to set aside */
      +    unsigned int done :1; /* Is the attempt to cache complete? */
      +} cache_socache_object_t;
      +
      +/*
      + * mod_cache_socache configuration
      + */
      +#define DEFAULT_MAX_FILE_SIZE 100*1024
      +#define DEFAULT_MAXTIME 86400
      +#define DEFAULT_MINTIME 600
      +#define DEFAULT_READSIZE 0
      +#define DEFAULT_READTIME 0
      +
      +typedef struct cache_socache_provider_conf
      +{
      +    const char *args;
      +    ap_socache_provider_t *socache_provider;
      +    ap_socache_instance_t *socache_instance;
      +} cache_socache_provider_conf;
      +
      +typedef struct cache_socache_conf
      +{
      +    cache_socache_provider_conf *provider;
      +} cache_socache_conf;
      +
      +typedef struct cache_socache_dir_conf
      +{
      +    apr_off_t max; /* maximum file size for cached files */
      +    apr_time_t maxtime; /* maximum expiry time */
      +    apr_time_t mintime; /* minimum expiry time */
      +    apr_off_t readsize; /* maximum data to attempt to cache in one go */
      +    apr_time_t readtime; /* maximum time taken to cache in one go */
      +    unsigned int max_set :1;
      +    unsigned int maxtime_set :1;
      +    unsigned int mintime_set :1;
      +    unsigned int readsize_set :1;
      +    unsigned int readtime_set :1;
      +} cache_socache_dir_conf;
      +
      +/* Shared object cache and mutex */
      +static const char * const cache_socache_id = "cache-socache";
      +static apr_global_mutex_t *socache_mutex = NULL;
      +
      +/*
      + * Local static functions
      + */
      +
      +static apr_status_t read_array(request_rec *r, apr_array_header_t *arr,
      +        unsigned char *buffer, apr_size_t buffer_len, apr_size_t *slider)
      +{
      +    apr_size_t val = *slider;
      +
      +    while (*slider < buffer_len) {
      +        if (buffer[*slider] == '\r') {
      +            if (val == *slider) {
      +                (*slider)++;
      +                return APR_SUCCESS;
      +            }
      +            *((const char **) apr_array_push(arr)) = apr_pstrndup(r->pool,
      +                    (const char *) buffer + val, *slider - val);
      +            (*slider)++;
      +            if (buffer[*slider] == '\n') {
      +                (*slider)++;
      +            }
      +            val = *slider;
      +        }
      +        else if (buffer[*slider] == '\0') {
      +            (*slider)++;
      +            return APR_SUCCESS;
      +        }
      +        else {
      +            (*slider)++;
      +        }
      +    }
      +
      +    return APR_EOF;
      +}
      +
      +static apr_status_t store_array(apr_array_header_t *arr, unsigned char *buffer,
      +        apr_size_t buffer_len, apr_size_t *slider)
      +{
      +    int i, len;
      +    const char **elts;
      +
      +    elts = (const char **) arr->elts;
      +
      +    for (i = 0; i < arr->nelts; i++) {
      +        apr_size_t e_len = strlen(elts[i]);
      +        if (e_len + 3 >= buffer_len - *slider) {
      +            return APR_EOF;
      +        }
      +        len = apr_snprintf(buffer ? (char *) buffer + *slider : NULL,
      +                buffer ? buffer_len - *slider : 0, "%s" CRLF, elts[i]);
      +        *slider += len;
      +    }
      +    if (buffer) {
      +        memcpy(buffer + *slider, CRLF, sizeof(CRLF) - 1);
      +    }
      +    *slider += sizeof(CRLF) - 1;
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
      +        apr_table_t *table, unsigned char *buffer, apr_size_t buffer_len,
      +        apr_size_t *slider)
      +{
      +    apr_size_t key = *slider, colon = 0, len = 0;
      +
      +    while (*slider < buffer_len) {
      +        if (buffer[*slider] == ':') {
      +            if (!colon) {
      +                colon = *slider;
      +            }
      +            (*slider)++;
      +        }
      +        else if (buffer[*slider] == '\r') {
      +            len = colon;
      +            if (key == *slider) {
      +                (*slider)++;
      +                if (buffer[*slider] == '\n') {
      +                    (*slider)++;
      +                }
      +                return APR_SUCCESS;
      +            }
      +            if (!colon || buffer[colon++] != ':') {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02344)
      +                        "Premature end of cache headers.");
      +                return APR_EGENERAL;
      +            }
      +            while (apr_isspace(buffer[colon])) {
      +                colon++;
      +            }
      +            apr_table_addn(table, apr_pstrndup(r->pool, (const char *) buffer
      +                    + key, len - key), apr_pstrndup(r->pool,
      +                    (const char *) buffer + colon, *slider - colon));
      +            (*slider)++;
      +            if (buffer[*slider] == '\n') {
      +                (*slider)++;
      +            }
      +            key = *slider;
      +            colon = 0;
      +        }
      +        else if (buffer[*slider] == '\0') {
      +            (*slider)++;
      +            return APR_SUCCESS;
      +        }
      +        else {
      +            (*slider)++;
      +        }
      +    }
      +
      +    return APR_EOF;
      +}
      +
      +static apr_status_t store_table(apr_table_t *table, unsigned char *buffer,
      +        apr_size_t buffer_len, apr_size_t *slider)
      +{
      +    int i, len;
      +    apr_table_entry_t *elts;
      +
      +    elts = (apr_table_entry_t *) apr_table_elts(table)->elts;
      +    for (i = 0; i < apr_table_elts(table)->nelts; ++i) {
      +        if (elts[i].key != NULL) {
      +            apr_size_t key_len = strlen(elts[i].key);
      +            apr_size_t val_len = strlen(elts[i].val);
      +            if (key_len + val_len + 5 >= buffer_len - *slider) {
      +                return APR_EOF;
      +            }
      +            len = apr_snprintf(buffer ? (char *) buffer + *slider : NULL,
      +                    buffer ? buffer_len - *slider : 0, "%s: %s" CRLF,
      +                    elts[i].key, elts[i].val);
      +            *slider += len;
      +        }
      +    }
      +    if (3 >= buffer_len - *slider) {
      +        return APR_EOF;
      +    }
      +    if (buffer) {
      +        memcpy(buffer + *slider, CRLF, sizeof(CRLF) - 1);
      +    }
      +    *slider += sizeof(CRLF) - 1;
      +
      +    return APR_SUCCESS;
      +}
      +
      +static const char* regen_key(apr_pool_t *p, apr_table_t *headers,
      +        apr_array_header_t *varray, const char *oldkey)
      +{
      +    struct iovec *iov;
      +    int i, k;
      +    int nvec;
      +    const char *header;
      +    const char **elts;
      +
      +    nvec = (varray->nelts * 2) + 1;
      +    iov = apr_palloc(p, sizeof(struct iovec) * nvec);
      +    elts = (const char **) varray->elts;
      +
      +    /* TODO:
      +     *    - Handle multiple-value headers better. (sort them?)
      +     *    - Handle Case in-sensitive Values better.
      +     *        This isn't the end of the world, since it just lowers the cache
      +     *        hit rate, but it would be nice to fix.
      +     *
      +     * The majority are case insenstive if they are values (encoding etc).
      +     * Most of rfc2616 is case insensitive on header contents.
      +     *
      +     * So the better solution may be to identify headers which should be
      +     * treated case-sensitive?
      +     *  HTTP URI's (3.2.3) [host and scheme are insensitive]
      +     *  HTTP method (5.1.1)
      +     *  HTTP-date values (3.3.1)
      +     *  3.7 Media Types [exerpt]
      +     *     The type, subtype, and parameter attribute names are case-
      +     *     insensitive. Parameter values might or might not be case-sensitive,
      +     *     depending on the semantics of the parameter name.
      +     *  4.20 Except [exerpt]
      +     *     Comparison of expectation values is case-insensitive for unquoted
      +     *     tokens (including the 100-continue token), and is case-sensitive for
      +     *     quoted-string expectation-extensions.
      +     */
      +
      +    for (i = 0, k = 0; i < varray->nelts; i++) {
      +        header = apr_table_get(headers, elts[i]);
      +        if (!header) {
      +            header = "";
      +        }
      +        iov[k].iov_base = (char*) elts[i];
      +        iov[k].iov_len = strlen(elts[i]);
      +        k++;
      +        iov[k].iov_base = (char*) header;
      +        iov[k].iov_len = strlen(header);
      +        k++;
      +    }
      +    iov[k].iov_base = (char*) oldkey;
      +    iov[k].iov_len = strlen(oldkey);
      +    k++;
      +
      +    return apr_pstrcatv(p, iov, k, NULL);
      +}
      +
      +static int array_alphasort(const void *fn1, const void *fn2)
      +{
      +    return strcmp(*(char**) fn1, *(char**) fn2);
      +}
      +
      +static void tokens_to_array(apr_pool_t *p, const char *data,
      +        apr_array_header_t *arr)
      +{
      +    char *token;
      +
      +    while ((token = ap_get_list_item(p, &data)) != NULL) {
      +        *((const char **) apr_array_push(arr)) = token;
      +    }
      +
      +    /* Sort it so that "Vary: A, B" and "Vary: B, A" are stored the same. */
      +    qsort((void *) arr->elts, arr->nelts, sizeof(char *), array_alphasort);
      +}
      +
      +/*
      + * Hook and mod_cache callback functions
      + */
      +static int create_entity(cache_handle_t *h, request_rec *r, const char *key,
      +        apr_off_t len, apr_bucket_brigade *bb)
      +{
      +    cache_socache_dir_conf *dconf =
      +            ap_get_module_config(r->per_dir_config, &cache_socache_module);
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +            &cache_socache_module);
      +    cache_object_t *obj;
      +    cache_socache_object_t *sobj;
      +    apr_size_t total;
      +
      +    if (conf->provider == NULL) {
      +        return DECLINED;
      +    }
      +
      +    /* we don't support caching of range requests (yet) */
      +    /* TODO: but we could */
      +    if (r->status == HTTP_PARTIAL_CONTENT) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02345)
      +                "URL %s partial content response not cached",
      +                key);
      +        return DECLINED;
      +    }
      +
      +    /*
      +     * We have a chicken and egg problem. We don't know until we
      +     * attempt to store_headers just how big the response will be
      +     * and whether it will fit in the cache limits set. But we
      +     * need to make a decision now as to whether we plan to try.
      +     * If we make the wrong decision, we could prevent another
      +     * cache implementation, such as cache_disk, from getting the
      +     * opportunity to cache, and that would be unfortunate.
      +     *
      +     * In a series of tests, from cheapest to most expensive,
      +     * decide whether or not to ignore this attempt to cache,
      +     * with a small margin just to be sure.
      +     */
      +    if (len < 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02346)
      +                "URL '%s' had no explicit size, ignoring", key);
      +        return DECLINED;
      +    }
      +    if (len > dconf->max) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02347)
      +                "URL '%s' body larger than limit, ignoring "
      +                "(%" APR_OFF_T_FMT " > %" APR_OFF_T_FMT ")",
      +                key, len, dconf->max);
      +        return DECLINED;
      +    }
      +
      +    /* estimate the total cached size, given current headers */
      +    total = len + sizeof(cache_socache_info_t) + strlen(key);
      +    if (APR_SUCCESS != store_table(r->headers_out, NULL, dconf->max, &total)
      +            || APR_SUCCESS != store_table(r->headers_in, NULL, dconf->max,
      +                    &total)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02348)
      +                "URL '%s' estimated headers size larger than limit, ignoring "
      +                "(%" APR_SIZE_T_FMT " > %" APR_OFF_T_FMT ")",
      +                key, total, dconf->max);
      +        return DECLINED;
      +    }
      +
      +    if (total >= dconf->max) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02349)
      +                "URL '%s' body and headers larger than limit, ignoring "
      +                "(%" APR_OFF_T_FMT " > %" APR_OFF_T_FMT ")",
      +                key, len, dconf->max);
      +        return DECLINED;
      +    }
      +
      +    /* Allocate and initialize cache_object_t and cache_socache_object_t */
      +    h->cache_obj = obj = apr_pcalloc(r->pool, sizeof(*obj));
      +    obj->vobj = sobj = apr_pcalloc(r->pool, sizeof(*sobj));
      +
      +    obj->key = apr_pstrdup(r->pool, key);
      +    sobj->key = obj->key;
      +    sobj->name = obj->key;
      +
      +    return OK;
      +}
      +
      +static int open_entity(cache_handle_t *h, request_rec *r, const char *key)
      +{
      +    cache_socache_dir_conf *dconf =
      +            ap_get_module_config(r->per_dir_config, &cache_socache_module);
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +            &cache_socache_module);
      +    apr_uint32_t format;
      +    apr_size_t slider;
      +    unsigned int buffer_len;
      +    const char *nkey;
      +    apr_status_t rc;
      +    cache_object_t *obj;
      +    cache_info *info;
      +    cache_socache_object_t *sobj;
      +    apr_size_t len;
      +
      +    nkey = NULL;
      +    h->cache_obj = NULL;
      +
      +    if (!conf->provider || !conf->provider->socache_instance) {
      +        return DECLINED;
      +    }
      +
      +    /* Create and init the cache object */
      +    obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
      +    sobj = apr_pcalloc(r->pool, sizeof(cache_socache_object_t));
      +
      +    info = &(obj->info);
      +
      +    /* Create a temporary pool for the buffer, and destroy it if something
      +     * goes wrong so we don't have large buffers of unused memory hanging
      +     * about for the lifetime of the response.
      +     */
      +    apr_pool_create(&sobj->pool, r->pool);
      +
      +    sobj->buffer = apr_palloc(sobj->pool, dconf->max);
      +    sobj->buffer_len = dconf->max;
      +
      +    /* attempt to retrieve the cached entry */
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02350)
      +                    "could not acquire lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +    }
      +    buffer_len = sobj->buffer_len;
      +    rc = conf->provider->socache_provider->retrieve(
      +            conf->provider->socache_instance, r->server, (unsigned char *) key,
      +            strlen(key), sobj->buffer, &buffer_len, r->pool);
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02351)
      +                    "could not release lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +    }
      +    if (rc != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(02352)
      +                "Key not found in cache: %s", key);
      +        apr_pool_destroy(sobj->pool);
      +        sobj->pool = NULL;
      +        return DECLINED;
      +    }
      +    if (buffer_len >= sobj->buffer_len) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(02353)
      +                "Key found in cache but too big, ignoring: %s", key);
      +        apr_pool_destroy(sobj->pool);
      +        sobj->pool = NULL;
      +        return DECLINED;
      +    }
      +
      +    /* read the format from the cache file */
      +    memcpy(&format, sobj->buffer, sizeof(format));
      +    slider = sizeof(format);
      +
      +    if (format == CACHE_SOCACHE_VARY_FORMAT_VERSION) {
      +        apr_array_header_t* varray;
      +        apr_time_t expire;
      +
      +        memcpy(&expire, sobj->buffer + slider, sizeof(expire));
      +        slider += sizeof(expire);
      +
      +        varray = apr_array_make(r->pool, 5, sizeof(char*));
      +        rc = read_array(r, varray, sobj->buffer, buffer_len, &slider);
      +        if (rc != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02354)
      +                    "Cannot parse vary entry for key: %s", key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +
      +        nkey = regen_key(r->pool, r->headers_in, varray, key);
      +
      +        /* attempt to retrieve the cached entry */
      +        if (socache_mutex) {
      +            apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +            if (status != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02355)
      +                        "could not acquire lock, ignoring: %s", obj->key);
      +                apr_pool_destroy(sobj->pool);
      +                sobj->pool = NULL;
      +                return DECLINED;
      +            }
      +        }
      +        buffer_len = sobj->buffer_len;
      +        rc = conf->provider->socache_provider->retrieve(
      +                conf->provider->socache_instance, r->server,
      +                (unsigned char *) nkey, strlen(nkey), sobj->buffer,
      +                &buffer_len, r->pool);
      +        if (socache_mutex) {
      +            apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +            if (status != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02356)
      +                        "could not release lock, ignoring: %s", obj->key);
      +                apr_pool_destroy(sobj->pool);
      +                sobj->pool = NULL;
      +                return DECLINED;
      +            }
      +        }
      +        if (rc != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(02357)
      +                    "Key not found in cache: %s", key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +        if (buffer_len >= sobj->buffer_len) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rc, r, APLOGNO(02358)
      +                    "Key found in cache but too big, ignoring: %s", key);
      +            goto fail;
      +        }
      +
      +    }
      +    else if (format != CACHE_SOCACHE_DISK_FORMAT_VERSION) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02359)
      +                "Key '%s' found in cache has version %d, expected %d, ignoring",
      +                key, format, CACHE_SOCACHE_DISK_FORMAT_VERSION);
      +        goto fail;
      +    }
      +    else {
      +        nkey = key;
      +    }
      +
      +    obj->key = nkey;
      +    sobj->key = nkey;
      +    sobj->name = key;
      +
      +    if (buffer_len >= sizeof(cache_socache_info_t)) {
      +        memcpy(&sobj->socache_info, sobj->buffer, sizeof(cache_socache_info_t));
      +    }
      +    else {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02360)
      +                "Cache entry for key '%s' too short, removing", nkey);
      +        goto fail;
      +    }
      +    slider = sizeof(cache_socache_info_t);
      +
      +    /* Store it away so we can get it later. */
      +    info->status = sobj->socache_info.status;
      +    info->date = sobj->socache_info.date;
      +    info->expire = sobj->socache_info.expire;
      +    info->request_time = sobj->socache_info.request_time;
      +    info->response_time = sobj->socache_info.response_time;
      +
      +    memcpy(&info->control, &sobj->socache_info.control, sizeof(cache_control_t));
      +
      +    if (sobj->socache_info.name_len <= buffer_len - slider) {
      +        if (strncmp((const char *) sobj->buffer + slider, sobj->name,
      +                sobj->socache_info.name_len)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02361)
      +                    "Cache entry for key '%s' URL mismatch, ignoring", nkey);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +        slider += sobj->socache_info.name_len;
      +    }
      +    else {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02362)
      +                "Cache entry for key '%s' too short, removing", nkey);
      +        goto fail;
      +    }
      +
      +    /* Is this a cached HEAD request? */
      +    if (sobj->socache_info.header_only && !r->header_only) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02363)
      +                "HEAD request cached, non-HEAD requested, ignoring: %s",
      +                sobj->key);
      +        apr_pool_destroy(sobj->pool);
      +        sobj->pool = NULL;
      +        return DECLINED;
      +    }
      +
      +    h->req_hdrs = apr_table_make(r->pool, 20);
      +    h->resp_hdrs = apr_table_make(r->pool, 20);
      +
      +    /* Call routine to read the header lines/status line */
      +    if (APR_SUCCESS != read_table(h, r, h->resp_hdrs, sobj->buffer, buffer_len,
      +            &slider)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02364)
      +                "Cache entry for key '%s' response headers unreadable, removing", nkey);
      +        goto fail;
      +    }
      +    if (APR_SUCCESS != read_table(h, r, h->req_hdrs, sobj->buffer, buffer_len,
      +            &slider)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(02365)
      +                "Cache entry for key '%s' request headers unreadable, removing", nkey);
      +        goto fail;
      +    }
      +
      +    /* Retrieve the body if we have one */
      +    sobj->body = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      +    len = buffer_len - slider;
      +
      +    /*
      +     *  Optimisation: if the body is small, we want to make a
      +     *  copy of the body and free the temporary pool, as we
      +     *  don't want large blocks of unused memory hanging around
      +     *  to the end of the response. In contrast, if the body is
      +     *  large, we would rather leave the body where it is in the
      +     *  temporary pool, and save ourselves the copy.
      +     */
      +    if (len * 2 > dconf->max) {
      +        apr_bucket *e;
      +
      +        /* large - use the brigade as is, we're done */
      +        e = apr_bucket_immortal_create((const char *) sobj->buffer + slider,
      +                len, r->connection->bucket_alloc);
      +
      +        APR_BRIGADE_INSERT_TAIL(sobj->body, e);
      +    }
      +    else {
      +
      +        /* small - make a copy of the data... */
      +        apr_brigade_write(sobj->body, NULL, NULL, (const char *) sobj->buffer
      +                + slider, len);
      +
      +        /* ...and get rid of the large memory buffer */
      +        apr_pool_destroy(sobj->pool);
      +        sobj->pool = NULL;
      +    }
      +
      +    /* make the configuration stick */
      +    h->cache_obj = obj;
      +    obj->vobj = sobj;
      +
      +    return OK;
      +
      +fail:
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02366)
      +                    "could not acquire lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +    }
      +    conf->provider->socache_provider->remove(
      +            conf->provider->socache_instance, r->server,
      +            (unsigned char *) nkey, strlen(nkey), r->pool);
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02367)
      +                    "could not release lock, ignoring: %s", obj->key);
      +        }
      +    }
      +    apr_pool_destroy(sobj->pool);
      +    sobj->pool = NULL;
      +    return DECLINED;
      +}
      +
      +static int remove_entity(cache_handle_t *h)
      +{
      +    /* Null out the cache object pointer so next time we start from scratch  */
      +    h->cache_obj = NULL;
      +    return OK;
      +}
      +
      +static int remove_url(cache_handle_t *h, request_rec *r)
      +{
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +            &cache_socache_module);
      +    cache_socache_object_t *sobj;
      +
      +    sobj = (cache_socache_object_t *) h->cache_obj->vobj;
      +    if (!sobj) {
      +        return DECLINED;
      +    }
      +
      +    /* Remove the key from the cache */
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02368)
      +                    "could not acquire lock, ignoring: %s", sobj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +    }
      +    conf->provider->socache_provider->remove(conf->provider->socache_instance,
      +            r->server, (unsigned char *) sobj->key, strlen(sobj->key), r->pool);
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02369)
      +                    "could not release lock, ignoring: %s", sobj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return DECLINED;
      +        }
      +    }
      +
      +    return OK;
      +}
      +
      +static apr_status_t recall_headers(cache_handle_t *h, request_rec *r)
      +{
      +    /* we recalled the headers during open_entity, so do nothing */
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t recall_body(cache_handle_t *h, apr_pool_t *p,
      +        apr_bucket_brigade *bb)
      +{
      +    cache_socache_object_t *sobj = (cache_socache_object_t*) h->cache_obj->vobj;
      +    apr_bucket *e;
      +
      +    e = APR_BRIGADE_FIRST(sobj->body);
      +
      +    if (e != APR_BRIGADE_SENTINEL(sobj->body)) {
      +        APR_BUCKET_REMOVE(e);
      +        APR_BRIGADE_INSERT_TAIL(bb, e);
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t store_headers(cache_handle_t *h, request_rec *r,
      +        cache_info *info)
      +{
      +    cache_socache_dir_conf *dconf =
      +            ap_get_module_config(r->per_dir_config, &cache_socache_module);
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +            &cache_socache_module);
      +    apr_size_t slider;
      +    apr_status_t rv;
      +    cache_object_t *obj = h->cache_obj;
      +    cache_socache_object_t *sobj = (cache_socache_object_t*) obj->vobj;
      +    cache_socache_info_t *socache_info;
      +
      +    memcpy(&h->cache_obj->info, info, sizeof(cache_info));
      +
      +    if (r->headers_out) {
      +        sobj->headers_out = ap_cache_cacheable_headers_out(r);
      +    }
      +
      +    if (r->headers_in) {
      +        sobj->headers_in = ap_cache_cacheable_headers_in(r);
      +    }
      +
      +    sobj->expire
      +            = obj->info.expire > r->request_time + dconf->maxtime ? r->request_time
      +                    + dconf->maxtime
      +                    : obj->info.expire + dconf->mintime;
      +
      +    apr_pool_create(&sobj->pool, r->pool);
      +
      +    sobj->buffer = apr_palloc(sobj->pool, dconf->max);
      +    sobj->buffer_len = dconf->max;
      +    socache_info = (cache_socache_info_t *) sobj->buffer;
      +
      +    if (sobj->headers_out) {
      +        const char *vary;
      +
      +        vary = apr_table_get(sobj->headers_out, "Vary");
      +
      +        if (vary) {
      +            apr_array_header_t* varray;
      +            apr_uint32_t format = CACHE_SOCACHE_VARY_FORMAT_VERSION;
      +
      +            memcpy(sobj->buffer, &format, sizeof(format));
      +            slider = sizeof(format);
      +
      +            memcpy(sobj->buffer + slider, &obj->info.expire,
      +                    sizeof(obj->info.expire));
      +            slider += sizeof(obj->info.expire);
      +
      +            varray = apr_array_make(r->pool, 6, sizeof(char*));
      +            tokens_to_array(r->pool, vary, varray);
      +
      +            if (APR_SUCCESS != (rv = store_array(varray, sobj->buffer,
      +                    sobj->buffer_len, &slider))) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02370)
      +                        "buffer too small for Vary array, caching aborted: %s",
      +                        obj->key);
      +                apr_pool_destroy(sobj->pool);
      +                sobj->pool = NULL;
      +                return rv;
      +            }
      +            if (socache_mutex) {
      +                apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +                if (status != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02371)
      +                            "could not acquire lock, ignoring: %s", obj->key);
      +                    apr_pool_destroy(sobj->pool);
      +                    sobj->pool = NULL;
      +                    return status;
      +                }
      +            }
      +            rv = conf->provider->socache_provider->store(
      +                    conf->provider->socache_instance, r->server,
      +                    (unsigned char *) obj->key, strlen(obj->key), sobj->expire,
      +                    (unsigned char *) sobj->buffer, (unsigned int) slider,
      +                    sobj->pool);
      +            if (socache_mutex) {
      +                apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +                if (status != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02372)
      +                            "could not release lock, ignoring: %s", obj->key);
      +                }
      +            }
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(02373)
      +                        "Vary not written to cache, ignoring: %s", obj->key);
      +                apr_pool_destroy(sobj->pool);
      +                sobj->pool = NULL;
      +                return rv;
      +            }
      +
      +            obj->key = sobj->key = regen_key(r->pool, sobj->headers_in, varray,
      +                    sobj->name);
      +        }
      +    }
      +
      +    socache_info->format = CACHE_SOCACHE_DISK_FORMAT_VERSION;
      +    socache_info->date = obj->info.date;
      +    socache_info->expire = obj->info.expire;
      +    socache_info->entity_version = sobj->socache_info.entity_version++;
      +    socache_info->request_time = obj->info.request_time;
      +    socache_info->response_time = obj->info.response_time;
      +    socache_info->status = obj->info.status;
      +
      +    if (r->header_only && r->status != HTTP_NOT_MODIFIED) {
      +        socache_info->header_only = 1;
      +    }
      +    else {
      +        socache_info->header_only = sobj->socache_info.header_only;
      +    }
      +
      +    socache_info->name_len = strlen(sobj->name);
      +
      +    memcpy(&socache_info->control, &obj->info.control, sizeof(cache_control_t));
      +    slider = sizeof(cache_socache_info_t);
      +
      +    if (slider + socache_info->name_len >= sobj->buffer_len) {
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02374)
      +                "cache buffer too small for name: %s",
      +                sobj->name);
      +        apr_pool_destroy(sobj->pool);
      +        sobj->pool = NULL;
      +        return APR_EGENERAL;
      +    }
      +    memcpy(sobj->buffer + slider, sobj->name, socache_info->name_len);
      +    slider += socache_info->name_len;
      +
      +    if (sobj->headers_out) {
      +        if (APR_SUCCESS != store_table(sobj->headers_out, sobj->buffer,
      +                sobj->buffer_len, &slider)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02375)
      +                    "out-headers didn't fit in buffer: %s", sobj->name);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return APR_EGENERAL;
      +        }
      +    }
      +
      +    /* Parse the vary header and dump those fields from the headers_in. */
      +    /* TODO: Make call to the same thing cache_select calls to crack Vary. */
      +    if (sobj->headers_in) {
      +        if (APR_SUCCESS != store_table(sobj->headers_in, sobj->buffer,
      +                sobj->buffer_len, &slider)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02376)
      +                    "in-headers didn't fit in buffer %s",
      +                    sobj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return APR_EGENERAL;
      +        }
      +    }
      +
      +    sobj->body_offset = slider;
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t store_body(cache_handle_t *h, request_rec *r,
      +        apr_bucket_brigade *in, apr_bucket_brigade *out)
      +{
      +    apr_bucket *e;
      +    apr_status_t rv = APR_SUCCESS;
      +    cache_socache_object_t *sobj =
      +            (cache_socache_object_t *) h->cache_obj->vobj;
      +    cache_socache_dir_conf *dconf =
      +            ap_get_module_config(r->per_dir_config, &cache_socache_module);
      +    int seen_eos = 0;
      +
      +    if (!sobj->offset) {
      +        sobj->offset = dconf->readsize;
      +    }
      +    if (!sobj->timeout && dconf->readtime) {
      +        sobj->timeout = apr_time_now() + dconf->readtime;
      +    }
      +
      +    if (!sobj->newbody) {
      +        sobj->body_length = 0;
      +        sobj->newbody = 1;
      +    }
      +    if (sobj->offset) {
      +        apr_brigade_partition(in, sobj->offset, &e);
      +    }
      +
      +    while (APR_SUCCESS == rv && !APR_BRIGADE_EMPTY(in)) {
      +        const char *str;
      +        apr_size_t length;
      +
      +        e = APR_BRIGADE_FIRST(in);
      +
      +        /* are we done completely? if so, pass any trailing buckets right through */
      +        if (sobj->done || !sobj->pool) {
      +            APR_BUCKET_REMOVE(e);
      +            APR_BRIGADE_INSERT_TAIL(out, e);
      +            continue;
      +        }
      +
      +        /* have we seen eos yet? */
      +        if (APR_BUCKET_IS_EOS(e)) {
      +            seen_eos = 1;
      +            sobj->done = 1;
      +            APR_BUCKET_REMOVE(e);
      +            APR_BRIGADE_INSERT_TAIL(out, e);
      +            break;
      +        }
      +
      +        /* honour flush buckets, we'll get called again */
      +        if (APR_BUCKET_IS_FLUSH(e)) {
      +            APR_BUCKET_REMOVE(e);
      +            APR_BRIGADE_INSERT_TAIL(out, e);
      +            break;
      +        }
      +
      +        /* metadata buckets are preserved as is */
      +        if (APR_BUCKET_IS_METADATA(e)) {
      +            APR_BUCKET_REMOVE(e);
      +            APR_BRIGADE_INSERT_TAIL(out, e);
      +            continue;
      +        }
      +
      +        /* read the bucket, write to the cache */
      +        rv = apr_bucket_read(e, &str, &length, APR_BLOCK_READ);
      +        APR_BUCKET_REMOVE(e);
      +        APR_BRIGADE_INSERT_TAIL(out, e);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02377)
      +                    "Error when reading bucket for URL %s",
      +                    h->cache_obj->key);
      +            /* Remove the intermediate cache file and return non-APR_SUCCESS */
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return rv;
      +        }
      +
      +        /* don't write empty buckets to the cache */
      +        if (!length) {
      +            continue;
      +        }
      +
      +        sobj->body_length += length;
      +        if (sobj->body_length >= sobj->buffer_len - sobj->body_offset) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02378)
      +                    "URL %s failed the buffer size check "
      +                    "(%" APR_OFF_T_FMT ">=%" APR_SIZE_T_FMT ")",
      +                    h->cache_obj->key, sobj->body_length,
      +                    sobj->buffer_len - sobj->body_offset);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return APR_EGENERAL;
      +        }
      +        memcpy(sobj->buffer + sobj->body_offset + sobj->body_length - length,
      +               str, length);
      +
      +        /* have we reached the limit of how much we're prepared to write in one
      +         * go? If so, leave, we'll get called again. This prevents us from trying
      +         * to swallow too much data at once, or taking so long to write the data
      +         * the client times out.
      +         */
      +        sobj->offset -= length;
      +        if (sobj->offset <= 0) {
      +            sobj->offset = 0;
      +            break;
      +        }
      +        if ((dconf->readtime && apr_time_now() > sobj->timeout)) {
      +            sobj->timeout = 0;
      +            break;
      +        }
      +
      +    }
      +
      +    /* Was this the final bucket? If yes, perform sanity checks.
      +     */
      +    if (seen_eos) {
      +        const char *cl_header = apr_table_get(r->headers_out, "Content-Length");
      +
      +        if (r->connection->aborted || r->no_cache) {
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02380)
      +                    "Discarding body for URL %s "
      +                    "because connection has been aborted.",
      +                    h->cache_obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return APR_EGENERAL;
      +        }
      +        if (cl_header) {
      +            apr_off_t cl;
      +            char *cl_endp;
      +            if (apr_strtoff(&cl, cl_header, &cl_endp, 10) != APR_SUCCESS
      +                    || *cl_endp != '\0' || cl != sobj->body_length) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02381)
      +                        "URL %s didn't receive complete response, not caching",
      +                        h->cache_obj->key);
      +                apr_pool_destroy(sobj->pool);
      +                sobj->pool = NULL;
      +                return APR_EGENERAL;
      +            }
      +        }
      +
      +        /* All checks were fine, we're good to go when the commit comes */
      +
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t commit_entity(cache_handle_t *h, request_rec *r)
      +{
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +            &cache_socache_module);
      +    cache_object_t *obj = h->cache_obj;
      +    cache_socache_object_t *sobj = (cache_socache_object_t *) obj->vobj;
      +    apr_status_t rv;
      +
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02384)
      +                    "could not acquire lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return status;
      +        }
      +    }
      +    rv = conf->provider->socache_provider->store(
      +            conf->provider->socache_instance, r->server,
      +            (unsigned char *) sobj->key, strlen(sobj->key), sobj->expire,
      +            sobj->buffer, sobj->body_offset + sobj->body_length, sobj->pool);
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02385)
      +                    "could not release lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return status;
      +        }
      +    }
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(02386)
      +                "could not write to cache, ignoring: %s", sobj->key);
      +        goto fail;
      +    }
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02387)
      +            "commit_entity: Headers and body for URL %s cached for maximum of %d seconds.",
      +            sobj->name, (apr_uint32_t)apr_time_sec(sobj->expire - r->request_time));
      +
      +    apr_pool_destroy(sobj->pool);
      +    sobj->pool = NULL;
      +
      +    return APR_SUCCESS;
      +
      +fail:
      +    /* For safety, remove any existing entry on failure, just in case it could not
      +     * be revalidated successfully.
      +     */
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02388)
      +                    "could not acquire lock, ignoring: %s", obj->key);
      +            apr_pool_destroy(sobj->pool);
      +            sobj->pool = NULL;
      +            return rv;
      +        }
      +    }
      +    conf->provider->socache_provider->remove(conf->provider->socache_instance,
      +            r->server, (unsigned char *) sobj->key, strlen(sobj->key), r->pool);
      +    if (socache_mutex) {
      +        apr_status_t status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02389)
      +                    "could not release lock, ignoring: %s", obj->key);
      +        }
      +    }
      +
      +    apr_pool_destroy(sobj->pool);
      +    sobj->pool = NULL;
      +    return rv;
      +}
      +
      +static apr_status_t invalidate_entity(cache_handle_t *h, request_rec *r)
      +{
      +    /* mark the entity as invalidated */
      +    h->cache_obj->info.control.invalidated = 1;
      +
      +    return commit_entity(h, r);
      +}
      +
      +static void *create_dir_config(apr_pool_t *p, char *dummy)
      +{
      +    cache_socache_dir_conf *dconf =
      +            apr_pcalloc(p, sizeof(cache_socache_dir_conf));
      +
      +    dconf->max = DEFAULT_MAX_FILE_SIZE;
      +    dconf->maxtime = apr_time_from_sec(DEFAULT_MAXTIME);
      +    dconf->mintime = apr_time_from_sec(DEFAULT_MINTIME);
      +    dconf->readsize = DEFAULT_READSIZE;
      +    dconf->readtime = DEFAULT_READTIME;
      +
      +    return dconf;
      +}
      +
      +static void *merge_dir_config(apr_pool_t *p, void *basev, void *addv)
      +{
      +    cache_socache_dir_conf
      +            *new =
      +                    (cache_socache_dir_conf *) apr_pcalloc(p, sizeof(cache_socache_dir_conf));
      +    cache_socache_dir_conf *add = (cache_socache_dir_conf *) addv;
      +    cache_socache_dir_conf *base = (cache_socache_dir_conf *) basev;
      +
      +    new->max = (add->max_set == 0) ? base->max : add->max;
      +    new->max_set = add->max_set || base->max_set;
      +    new->maxtime = (add->maxtime_set == 0) ? base->maxtime : add->maxtime;
      +    new->maxtime_set = add->maxtime_set || base->maxtime_set;
      +    new->mintime = (add->mintime_set == 0) ? base->mintime : add->mintime;
      +    new->mintime_set = add->mintime_set || base->mintime_set;
      +    new->readsize = (add->readsize_set == 0) ? base->readsize : add->readsize;
      +    new->readsize_set = add->readsize_set || base->readsize_set;
      +    new->readtime = (add->readtime_set == 0) ? base->readtime : add->readtime;
      +    new->readtime_set = add->readtime_set || base->readtime_set;
      +
      +    return new;
      +}
      +
      +static void *create_config(apr_pool_t *p, server_rec *s)
      +{
      +    cache_socache_conf *conf = apr_pcalloc(p, sizeof(cache_socache_conf));
      +
      +    return conf;
      +}
      +
      +static void *merge_config(apr_pool_t *p, void *basev, void *overridesv)
      +{
      +    cache_socache_conf *ps;
      +    cache_socache_conf *base = (cache_socache_conf *) basev;
      +    cache_socache_conf *overrides = (cache_socache_conf *) overridesv;
      +
      +    /* socache server config only has one field */
      +    ps = overrides ? overrides : base;
      +
      +    return ps;
      +}
      +
      +/*
      + * mod_cache_socache configuration directives handlers.
      + */
      +static const char *set_cache_socache(cmd_parms *cmd, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_conf *conf = ap_get_module_config(cmd->server->module_config,
      +            &cache_socache_module);
      +    cache_socache_provider_conf *provider = conf->provider
      +            = apr_pcalloc(cmd->pool, sizeof(cache_socache_provider_conf));
      +
      +    const char *err = NULL, *sep, *name;
      +
      +    /* Argument is of form 'name:args' or just 'name'. */
      +    sep = ap_strchr_c(arg, ':');
      +    if (sep) {
      +        name = apr_pstrmemdup(cmd->pool, arg, sep - arg);
      +        sep++;
      +        provider->args = sep;
      +    }
      +    else {
      +        name = arg;
      +    }
      +
      +    provider->socache_provider = ap_lookup_provider(AP_SOCACHE_PROVIDER_GROUP,
      +            name, AP_SOCACHE_PROVIDER_VERSION);
      +    if (provider->socache_provider == NULL) {
      +        err = apr_psprintf(cmd->pool,
      +                "Unknown socache provider '%s'. Maybe you need "
      +                    "to load the appropriate socache module "
      +                    "(mod_socache_%s?)", name, name);
      +    }
      +    return err;
      +}
      +
      +static const char *set_cache_max(cmd_parms *parms, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_dir_conf *dconf = (cache_socache_dir_conf *) in_struct_ptr;
      +
      +    if (apr_strtoff(&dconf->max, arg, NULL, 10) != APR_SUCCESS
      +            || dconf->max < 1024 || dconf->max > APR_UINT32_MAX) {
      +        return "CacheSocacheMaxSize argument must be a integer representing "
      +               "the max size of a cached entry (headers and body), at least 1024 "
      +               "and at most " APR_STRINGIFY(APR_UINT32_MAX);
      +    }
      +    dconf->max_set = 1;
      +    return NULL;
      +}
      +
      +static const char *set_cache_maxtime(cmd_parms *parms, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_dir_conf *dconf = (cache_socache_dir_conf *) in_struct_ptr;
      +    apr_off_t seconds;
      +
      +    if (apr_strtoff(&seconds, arg, NULL, 10) != APR_SUCCESS || seconds < 0) {
      +        return "CacheSocacheMaxTime argument must be the maximum amount of time in seconds to cache an entry.";
      +    }
      +    dconf->maxtime = apr_time_from_sec(seconds);
      +    dconf->maxtime_set = 1;
      +    return NULL;
      +}
      +
      +static const char *set_cache_mintime(cmd_parms *parms, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_dir_conf *dconf = (cache_socache_dir_conf *) in_struct_ptr;
      +    apr_off_t seconds;
      +
      +    if (apr_strtoff(&seconds, arg, NULL, 10) != APR_SUCCESS || seconds < 0) {
      +        return "CacheSocacheMinTime argument must be the minimum amount of time in seconds to cache an entry.";
      +    }
      +    dconf->mintime = apr_time_from_sec(seconds);
      +    dconf->mintime_set = 1;
      +    return NULL;
      +}
      +
      +static const char *set_cache_readsize(cmd_parms *parms, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_dir_conf *dconf = (cache_socache_dir_conf *) in_struct_ptr;
      +
      +    if (apr_strtoff(&dconf->readsize, arg, NULL, 10) != APR_SUCCESS
      +            || dconf->readsize < 0) {
      +        return "CacheSocacheReadSize argument must be a non-negative integer representing the max amount of data to cache in go.";
      +    }
      +    dconf->readsize_set = 1;
      +    return NULL;
      +}
      +
      +static const char *set_cache_readtime(cmd_parms *parms, void *in_struct_ptr,
      +        const char *arg)
      +{
      +    cache_socache_dir_conf *dconf = (cache_socache_dir_conf *) in_struct_ptr;
      +    apr_off_t milliseconds;
      +
      +    if (apr_strtoff(&milliseconds, arg, NULL, 10) != APR_SUCCESS
      +            || milliseconds < 0) {
      +        return "CacheSocacheReadTime argument must be a non-negative integer representing the max amount of time taken to cache in go.";
      +    }
      +    dconf->readtime = apr_time_from_msec(milliseconds);
      +    dconf->readtime_set = 1;
      +    return NULL;
      +}
      +
      +static apr_status_t remove_lock(void *data)
      +{
      +    if (socache_mutex) {
      +        apr_global_mutex_destroy(socache_mutex);
      +        socache_mutex = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t destroy_cache(void *data)
      +{
      +    server_rec *s = data;
      +    cache_socache_conf *conf =
      +            ap_get_module_config(s->module_config, &cache_socache_module);
      +    if (conf->provider && conf->provider->socache_instance) {
      +        conf->provider->socache_provider->destroy(
      +                conf->provider->socache_instance, s);
      +        conf->provider->socache_instance = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static int socache_status_hook(request_rec *r, int flags)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    cache_socache_conf *conf = ap_get_module_config(r->server->module_config,
      +                                                    &cache_socache_module);
      +    if (!conf->provider || !conf->provider->socache_provider ||
      +        !conf->provider->socache_instance) {
      +        return DECLINED;
      +    }
      +
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rputs("<hr>\n"
      +                 "<table cellspacing=0 cellpadding=0>\n"
      +                 "<tr><td bgcolor=\"#000000\">\n"
      +                 "<b><font color=\"#ffffff\" face=\"Arial,Helvetica\">"
      +                 "mod_cache_socache Status:</font></b>\n"
      +                 "</td></tr>\n"
      +                 "<tr><td bgcolor=\"#ffffff\">\n", r);
      +    }
      +    else {
      +        ap_rputs("ModCacheSocacheStatus\n", r);
      +    }
      +
      +    if (socache_mutex) {
      +        status = apr_global_mutex_lock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02816)
      +                    "could not acquire lock for cache status");
      +        }
      +    }
      +
      +    if (status != APR_SUCCESS) {
      +        if (!(flags & AP_STATUS_SHORT)) {
      +            ap_rputs("No cache status data available\n", r);
      +        }
      +        else {
      +            ap_rputs("NotAvailable\n", r);
      +        }
      +    } else {
      +        conf->provider->socache_provider->status(conf->provider->socache_instance,
      +                                                 r, flags);
      +    }
      +
      +    if (socache_mutex && status == APR_SUCCESS) {
      +        status = apr_global_mutex_unlock(socache_mutex);
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02817)
      +                    "could not release lock for cache status");
      +        }
      +    }
      +
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rputs("</td></tr>\n</table>\n", r);
      +    }
      +    return OK;
      +}
      +
      +static void socache_status_register(apr_pool_t *p)
      +{
      +    APR_OPTIONAL_HOOK(ap, status_hook, socache_status_hook, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +static int socache_precfg(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptmp)
      +{
      +    apr_status_t rv = ap_mutex_register(pconf, cache_socache_id, NULL,
      +            APR_LOCK_DEFAULT, 0);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02390)
      +        "failed to register %s mutex", cache_socache_id);
      +        return 500; /* An HTTP status would be a misnomer! */
      +    }
      +
      +    /* Register to handle mod_status status page generation */
      +    socache_status_register(pconf);
      +
      +    return OK;
      +}
      +
      +static int socache_post_config(apr_pool_t *pconf, apr_pool_t *plog,
      +        apr_pool_t *ptmp, server_rec *base_server)
      +{
      +    server_rec *s;
      +    apr_status_t rv;
      +    const char *errmsg;
      +    static struct ap_socache_hints socache_hints =
      +    { 64, 2048, 60000000 };
      +
      +    for (s = base_server; s; s = s->next) {
      +        cache_socache_conf *conf =
      +                ap_get_module_config(s->module_config, &cache_socache_module);
      +
      +        if (!conf->provider) {
      +            continue;
      +        }
      +
      +        if (!socache_mutex && conf->provider->socache_provider->flags
      +                & AP_SOCACHE_FLAG_NOTMPSAFE) {
      +
      +            rv = ap_global_mutex_create(&socache_mutex, NULL, cache_socache_id,
      +                    NULL, s, pconf, 0);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02391)
      +                "failed to create %s mutex", cache_socache_id);
      +                return 500; /* An HTTP status would be a misnomer! */
      +            }
      +            apr_pool_cleanup_register(pconf, NULL, remove_lock,
      +                    apr_pool_cleanup_null);
      +        }
      +
      +        errmsg = conf->provider->socache_provider->create(
      +                &conf->provider->socache_instance, conf->provider->args, ptmp,
      +                pconf);
      +        if (errmsg) {
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, plog,
      +                    APLOGNO(02392) "%s", errmsg);
      +            return 500; /* An HTTP status would be a misnomer! */
      +        }
      +
      +        rv = conf->provider->socache_provider->init(
      +                conf->provider->socache_instance, cache_socache_id,
      +                &socache_hints, s, pconf);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02393)
      +            "failed to initialise %s cache", cache_socache_id);
      +            return 500; /* An HTTP status would be a misnomer! */
      +        }
      +        apr_pool_cleanup_register(pconf, (void *) s, destroy_cache,
      +                apr_pool_cleanup_null);
      +
      +    }
      +
      +    return OK;
      +}
      +
      +static void socache_child_init(apr_pool_t *p, server_rec *s)
      +{
      +    const char *lock;
      +    apr_status_t rv;
      +    if (!socache_mutex) {
      +        return; /* don't waste the overhead of creating mutex & cache */
      +    }
      +    lock = apr_global_mutex_lockfile(socache_mutex);
      +    rv = apr_global_mutex_child_init(&socache_mutex, lock, p);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(02394)
      +                "failed to initialise mutex in child_init");
      +    }
      +}
      +
      +static const command_rec cache_socache_cmds[] =
      +{
      +    AP_INIT_TAKE1("CacheSocache", set_cache_socache, NULL, RSRC_CONF,
      +            "The shared object cache to store cache files"),
      +    AP_INIT_TAKE1("CacheSocacheMaxTime", set_cache_maxtime, NULL, RSRC_CONF | ACCESS_CONF,
      +            "The maximum cache expiry age to cache a document in seconds"),
      +    AP_INIT_TAKE1("CacheSocacheMinTime", set_cache_mintime, NULL, RSRC_CONF | ACCESS_CONF,
      +            "The minimum cache expiry age to cache a document in seconds"),
      +    AP_INIT_TAKE1("CacheSocacheMaxSize", set_cache_max, NULL, RSRC_CONF | ACCESS_CONF,
      +            "The maximum cache entry size (headers and body) to cache a document"),
      +    AP_INIT_TAKE1("CacheSocacheReadSize", set_cache_readsize, NULL, RSRC_CONF | ACCESS_CONF,
      +            "The maximum quantity of data to attempt to read and cache in one go"),
      +    AP_INIT_TAKE1("CacheSocacheReadTime", set_cache_readtime, NULL, RSRC_CONF | ACCESS_CONF,
      +            "The maximum time taken to attempt to read and cache in go"),
      +    { NULL }
      +};
      +
      +static const cache_provider cache_socache_provider =
      +{
      +    &remove_entity, &store_headers, &store_body, &recall_headers, &recall_body,
      +    &create_entity, &open_entity, &remove_url, &commit_entity,
      +    &invalidate_entity
      +};
      +
      +static void cache_socache_register_hook(apr_pool_t *p)
      +{
      +    /* cache initializer */
      +    ap_register_provider(p, CACHE_PROVIDER_GROUP, "socache", "0",
      +            &cache_socache_provider);
      +    ap_hook_pre_config(socache_precfg, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_post_config(socache_post_config, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_child_init(socache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +AP_DECLARE_MODULE(cache_socache) = { STANDARD20_MODULE_STUFF,
      +    create_dir_config,  /* create per-directory config structure */
      +    merge_dir_config, /* merge per-directory config structures */
      +    create_config, /* create per-server config structure */
      +    merge_config, /* merge per-server config structures */
      +    cache_socache_cmds, /* command apr_table_t */
      +    cache_socache_register_hook /* register hooks */
      +};
      diff --git a/modules/cache/mod_cache_socache.dep b/modules/cache/mod_cache_socache.dep
      new file mode 100644
      index 00000000000..d202b405bd0
      --- /dev/null
      +++ b/modules/cache/mod_cache_socache.dep
      @@ -0,0 +1,67 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_cache_socache.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_cache_socache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\generators\mod_status.h"\
      +	".\cache_common.h"\
      +	".\cache_socache_common.h"\
      +	".\mod_cache.h"\
      +	
      diff --git a/modules/cache/mod_cache_socache.dsp b/modules/cache/mod_cache_socache.dsp
      new file mode 100644
      index 00000000000..1dd82145b78
      --- /dev/null
      +++ b/modules/cache/mod_cache_socache.dsp
      @@ -0,0 +1,115 @@
      +# Microsoft Developer Studio Project File - Name="mod_cache_socache" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_cache_socache - Win32 Debug
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cache_socache.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cache_socache.mak" CFG="mod_cache_socache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cache_socache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cache_socache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fd"Release\mod_cache_socache_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_cache_socache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_socache.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_cache_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fd"Debug\mod_cache_socache_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_cache_socache.so" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_socache.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_cache_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_cache_socache - Win32 Release"
      +# Name "mod_cache_socache - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=.\mod_cache.h
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=.\mod_cache_socache.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/cache/mod_cache_socache.mak b/modules/cache/mod_cache_socache.mak
      new file mode 100644
      index 00000000000..7857e7ff485
      --- /dev/null
      +++ b/modules/cache/mod_cache_socache.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_cache_socache.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_cache_socache - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_cache_socache - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_cache_socache - Win32 Release" && "$(CFG)" != "mod_cache_socache - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cache_socache.mak" CFG="mod_cache_socache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cache_socache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cache_socache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_cache - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_cache_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_cache - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cache_socache.obj"
      +	-@erase "$(INTDIR)\mod_cache_socache.res"
      +	-@erase "$(INTDIR)\mod_cache_socache_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_socache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_socache.exp"
      +	-@erase "$(OUTDIR)\mod_cache_socache.lib"
      +	-@erase "$(OUTDIR)\mod_cache_socache.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_socache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_socache_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache_socache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache_socache.pdb" /debug /out:"$(OUTDIR)\mod_cache_socache.so" /implib:"$(OUTDIR)\mod_cache_socache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_socache.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cache_socache.obj" \
      +	"$(INTDIR)\mod_cache_socache.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_cache.lib"
      +
      +"$(OUTDIR)\mod_cache_socache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_cache_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache_socache.so"
      +   if exist .\Release\mod_cache_socache.so.manifest mt.exe -manifest .\Release\mod_cache_socache.so.manifest -outputresource:.\Release\mod_cache_socache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cache_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_cache - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_cache_socache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_cache - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cache_socache.obj"
      +	-@erase "$(INTDIR)\mod_cache_socache.res"
      +	-@erase "$(INTDIR)\mod_cache_socache_src.idb"
      +	-@erase "$(INTDIR)\mod_cache_socache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_socache.exp"
      +	-@erase "$(OUTDIR)\mod_cache_socache.lib"
      +	-@erase "$(OUTDIR)\mod_cache_socache.pdb"
      +	-@erase "$(OUTDIR)\mod_cache_socache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cache_socache_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cache_socache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cache_socache.pdb" /debug /out:"$(OUTDIR)\mod_cache_socache.so" /implib:"$(OUTDIR)\mod_cache_socache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cache_socache.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cache_socache.obj" \
      +	"$(INTDIR)\mod_cache_socache.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_cache.lib"
      +
      +"$(OUTDIR)\mod_cache_socache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_cache_socache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cache_socache.so"
      +   if exist .\Debug\mod_cache_socache.so.manifest mt.exe -manifest .\Debug\mod_cache_socache.so.manifest -outputresource:.\Debug\mod_cache_socache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_cache_socache.dep")
      +!INCLUDE "mod_cache_socache.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_cache_socache.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_cache_socache - Win32 Release" || "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +"mod_cache - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Release" 
      +   cd "."
      +
      +"mod_cache - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +"mod_cache - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Debug" 
      +   cd "."
      +
      +"mod_cache - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_cache.mak" CFG="mod_cache - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_cache_socache - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_cache_socache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_cache_socache - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_cache_socache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cache_socache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_cache_socache.so" /d LONG_NAME="cache_socache_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_cache_socache.c
      +
      +"$(INTDIR)\mod_cache_socache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_file_cache.c b/modules/cache/mod_file_cache.c
      index 42f58441e1d..41993618614 100644
      --- a/modules/cache/mod_file_cache.c
      +++ b/modules/cache/mod_file_cache.c
      @@ -133,33 +133,33 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
       
           fspec = ap_server_root_relative(cmd->pool, filename);
           if (!fspec) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, APR_EBADPATH, cmd->server,
      -                     "mod_file_cache: invalid file path "
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, APR_EBADPATH, cmd->server, APLOGNO(00794)
      +                     "invalid file path "
                            "%s, skipping", filename);
               return;
           }
           if ((rc = apr_stat(&tmp.finfo, fspec, APR_FINFO_MIN,
                                        cmd->temp_pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
      -            "mod_file_cache: unable to stat(%s), skipping", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, APLOGNO(00795)
      +                     "unable to stat(%s), skipping", fspec);
               return;
           }
           if (tmp.finfo.filetype != APR_REG) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -            "mod_file_cache: %s isn't a regular file, skipping", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00796)
      +                     "%s isn't a regular file, skipping", fspec);
               return;
           }
           if (tmp.finfo.size > AP_MAX_SENDFILE) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -            "mod_file_cache: %s is too large to cache, skipping", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00797)
      +                     "%s is too large to cache, skipping", fspec);
               return;
           }
       
           rc = apr_file_open(&fd, fspec, APR_READ | APR_BINARY | APR_XTHREAD,
                              APR_OS_DEFAULT, cmd->pool);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
      -                     "mod_file_cache: unable to open(%s, O_RDONLY), skipping", fspec);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, APLOGNO(00798)
      +                     "unable to open(%s, O_RDONLY), skipping", fspec);
               return;
           }
           apr_file_inherit_set(fd);
      @@ -178,8 +178,8 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap)
                                         (apr_size_t)new_file->finfo.size,
                                         APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) {
                   apr_file_close(fd);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server,
      -                         "mod_file_cache: unable to mmap %s, skipping", filename);
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, APLOGNO(00799)
      +                         "unable to mmap %s, skipping", filename);
                   return;
               }
               apr_file_close(fd);
      @@ -209,8 +209,8 @@ static const char *cachefilehandle(cmd_parms *cmd, void *dummy, const char *file
           cache_the_file(cmd, filename, 0);
       #else
           /* Sendfile not supported by this OS */
      -    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -                 "mod_file_cache: unable to cache file: %s. Sendfile is not supported on this OS", filename);
      +    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00800)
      +                 "unable to cache file: %s. Sendfile is not supported on this OS", filename);
       #endif
           return NULL;
       }
      @@ -220,8 +220,8 @@ static const char *cachefilemmap(cmd_parms *cmd, void *dummy, const char *filena
           cache_the_file(cmd, filename, 1);
       #else
           /* MMAP not supported by this OS */
      -    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -                 "mod_file_cache: unable to cache file: %s. MMAP is not supported by this OS", filename);
      +    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00801)
      +                 "unable to cache file: %s. MMAP is not supported by this OS", filename);
       #endif
           return NULL;
       }
      @@ -283,7 +283,7 @@ static int mmap_handler(request_rec *r, a_file *file)
           APR_BRIGADE_INSERT_TAIL(bb, b);
       
           if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS)
      -        return HTTP_INTERNAL_SERVER_ERROR;
      +        return AP_FILTER_ERROR;
       #endif
           return OK;
       }
      @@ -301,7 +301,7 @@ static int sendfile_handler(request_rec *r, a_file *file)
           APR_BRIGADE_INSERT_TAIL(bb, b);
       
           if (ap_pass_brigade(r->output_filters, bb) != APR_SUCCESS)
      -        return HTTP_INTERNAL_SERVER_ERROR;
      +        return AP_FILTER_ERROR;
       #endif
           return OK;
       }
      @@ -312,10 +312,10 @@ static int file_cache_handler(request_rec *r)
           int errstatus;
           int rc = OK;
       
      -    /* XXX: not sure if this is right yet
      -     * see comment in http_core.c:default_handler
      +    /* Bail out if r->handler isn't the default value, and doesn't look like a Content-Type
      +     * XXX: Even though we made the user explicitly list each path to cache?
            */
      -    if (ap_strcmp_match(r->handler, "*/*")) {
      +    if (ap_strcmp_match(r->handler, "*/*") && !AP_IS_DEFAULT_HANDLER_NAME(r->handler)) {
               return DECLINED;
           }
       
      diff --git a/modules/cache/mod_file_cache.dep b/modules/cache/mod_file_cache.dep
      new file mode 100644
      index 00000000000..3d47099aa3a
      --- /dev/null
      +++ b/modules/cache/mod_file_cache.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_file_cache.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_file_cache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/cache/mod_file_cache.mak b/modules/cache/mod_file_cache.mak
      new file mode 100644
      index 00000000000..0f54dc23c87
      --- /dev/null
      +++ b/modules/cache/mod_file_cache.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_file_cache.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_file_cache - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_file_cache - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_file_cache - Win32 Release" && "$(CFG)" != "mod_file_cache - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_file_cache.mak" CFG="mod_file_cache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_file_cache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_file_cache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_file_cache - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_file_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_file_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_file_cache.obj"
      +	-@erase "$(INTDIR)\mod_file_cache.res"
      +	-@erase "$(INTDIR)\mod_file_cache_src.idb"
      +	-@erase "$(INTDIR)\mod_file_cache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_file_cache.exp"
      +	-@erase "$(OUTDIR)\mod_file_cache.lib"
      +	-@erase "$(OUTDIR)\mod_file_cache.pdb"
      +	-@erase "$(OUTDIR)\mod_file_cache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_file_cache_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_file_cache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_file_cache.so" /d LONG_NAME="file_cache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_file_cache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=/nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_file_cache.pdb" /debug /out:"$(OUTDIR)\mod_file_cache.so" /implib:"$(OUTDIR)\mod_file_cache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_file_cache.obj" \
      +	"$(INTDIR)\mod_file_cache.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_file_cache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_file_cache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_file_cache.so"
      +   if exist .\Release\mod_file_cache.so.manifest mt.exe -manifest .\Release\mod_file_cache.so.manifest -outputresource:.\Release\mod_file_cache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_file_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_file_cache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_file_cache.obj"
      +	-@erase "$(INTDIR)\mod_file_cache.res"
      +	-@erase "$(INTDIR)\mod_file_cache_src.idb"
      +	-@erase "$(INTDIR)\mod_file_cache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_file_cache.exp"
      +	-@erase "$(OUTDIR)\mod_file_cache.lib"
      +	-@erase "$(OUTDIR)\mod_file_cache.pdb"
      +	-@erase "$(OUTDIR)\mod_file_cache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_file_cache_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_file_cache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_file_cache.so" /d LONG_NAME="file_cache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_file_cache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=/nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_file_cache.pdb" /debug /out:"$(OUTDIR)\mod_file_cache.so" /implib:"$(OUTDIR)\mod_file_cache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_file_cache.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_file_cache.obj" \
      +	"$(INTDIR)\mod_file_cache.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_file_cache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_file_cache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_file_cache.so"
      +   if exist .\Debug\mod_file_cache.so.manifest mt.exe -manifest .\Debug\mod_file_cache.so.manifest -outputresource:.\Debug\mod_file_cache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_file_cache.dep")
      +!INCLUDE "mod_file_cache.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_file_cache.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_file_cache - Win32 Release" || "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_file_cache - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_file_cache - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_file_cache - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_file_cache - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_file_cache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_file_cache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_file_cache.so" /d LONG_NAME="file_cache_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_file_cache - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_file_cache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_file_cache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_file_cache.so" /d LONG_NAME="file_cache_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_file_cache.c
      +
      +"$(INTDIR)\mod_file_cache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c
      index 132a50806ac..579d2ffecdf 100644
      --- a/modules/cache/mod_socache_dbm.c
      +++ b/modules/cache/mod_socache_dbm.c
      @@ -20,6 +20,7 @@
       #include "http_protocol.h"
       #include "http_config.h"
       #include "mpm_common.h"
      +#include "mod_status.h"
       
       #include "apr.h"
       #include "apr_strings.h"
      @@ -53,7 +54,7 @@ struct ap_socache_instance_t {
        */
       #define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD )
       
      -#define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
      +#define DEFAULT_DBM_PREFIX "socache-dbm-"
       
       /* ### this should use apr_dbm_usednames. */
       #if !defined(DBM_FILE_SUFFIX_DIR) && !defined(DBM_FILE_SUFFIX_PAG)
      @@ -95,6 +96,25 @@ static const char *socache_dbm_create(ap_socache_instance_t **context,
           return NULL;
       }
       
      +#if AP_NEED_SET_MUTEX_PERMS
      +static int try_chown(apr_pool_t *p, server_rec *s,
      +                     const char *name, const char *suffix)
      +{
      +    if (suffix)
      +        name = apr_pstrcat(p, name, suffix, NULL);
      +    if (-1 == chown(name, ap_unixd_config.user_id,
      +                    (gid_t)-1 /* no gid change */ ))
      +    {
      +        if (errno != ENOENT)
      +            ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(errno), s, APLOGNO(00802)
      +                         "Can't change owner of %s", name);
      +        return -1;
      +    }
      +    return 0;
      +}
      +#endif
      +
      +
       static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
                                            const char *namespace,
                                            const struct ap_socache_hints *hints,
      @@ -108,10 +128,10 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
               const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
                                              NULL);
       
      -        ctx->data_file = ap_server_root_relative(p, path);
      +        ctx->data_file = ap_runtime_dir_relative(p, path);
       
               if (ctx->data_file == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00803)
                                "could not use default path '%s' for DBM socache",
                                path);
                   return APR_EINVAL;
      @@ -123,7 +143,7 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
       
           if ((rv = apr_dbm_open(&dbm, ctx->data_file,
                   APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00804)
                            "Cannot create socache DBM file `%s'",
                            ctx->data_file);
               return rv;
      @@ -140,21 +160,13 @@ static apr_status_t socache_dbm_init(ap_socache_instance_t *ctx,
            * cannot exactly determine the suffixes we try all possibilities.
            */
           if (geteuid() == 0 /* is superuser */) {
      -        chown(ctx->data_file, ap_unixd_config.user_id, -1 /* no gid change */);
      -        if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_DIR, NULL),
      -                  ap_unixd_config.user_id, -1) == -1) {
      -            if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
      -                      ap_unixd_config.user_id, -1) == -1)
      -                chown(apr_pstrcat(p, ctx->data_file, ".dir", NULL),
      -                      ap_unixd_config.user_id, -1);
      -        }
      -        if (chown(apr_pstrcat(p, ctx->data_file, DBM_FILE_SUFFIX_PAG, NULL),
      -                  ap_unixd_config.user_id, -1) == -1) {
      -            if (chown(apr_pstrcat(p, ctx->data_file, ".db", NULL),
      -                      ap_unixd_config.user_id, -1) == -1)
      -                chown(apr_pstrcat(p, ctx->data_file, ".pag", NULL),
      -                      ap_unixd_config.user_id, -1);
      -        }
      +        try_chown(p, s, ctx->data_file, NULL);
      +        if (try_chown(p, s, ctx->data_file, DBM_FILE_SUFFIX_DIR))
      +            if (try_chown(p, s, ctx->data_file, ".db"))
      +                try_chown(p, s, ctx->data_file, ".dir");
      +        if (try_chown(p, s, ctx->data_file, DBM_FILE_SUFFIX_PAG))
      +            if (try_chown(p, s, ctx->data_file, ".db"))
      +                try_chown(p, s, ctx->data_file, ".pag");
           }
       #endif
           socache_dbm_expire(ctx, s);
      @@ -172,8 +184,6 @@ static void socache_dbm_destroy(ap_socache_instance_t *ctx, server_rec *s)
           unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".pag", NULL));
           unlink(apr_pstrcat(ctx->pool, ctx->data_file, ".db", NULL));
           unlink(ctx->data_file);
      -
      -    return;
       }
       
       static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
      @@ -190,14 +200,14 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
           /* be careful: do not try to store too much bytes in a DBM file! */
       #ifdef PAIRMAX
           if ((idlen + nData) >= PAIRMAX) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00805)
                        "data size too large for DBM socache: %d >= %d",
                        (idlen + nData), PAIRMAX);
               return APR_ENOSPC;
           }
       #else
           if ((idlen + nData) >= 950 /* at least less than approx. 1KB */) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00806)
                        "data size too large for DBM socache: %d >= %d",
                        (idlen + nData), 950);
               return APR_ENOSPC;
      @@ -219,7 +229,7 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
       
           if ((rv = apr_dbm_open(&dbm, ctx->data_file,
                                  APR_DBM_RWCREATE, DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00807)
                            "Cannot open socache DBM file `%s' for writing "
                            "(store)",
                            ctx->data_file);
      @@ -227,7 +237,7 @@ static apr_status_t socache_dbm_store(ap_socache_instance_t *ctx,
               return rv;
           }
           if ((rv = apr_dbm_store(dbm, dbmkey, dbmval)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00808)
                            "Cannot store socache object to DBM file `%s'",
                            ctx->data_file);
               apr_dbm_close(dbm);
      @@ -272,7 +282,7 @@ static apr_status_t socache_dbm_retrieve(ap_socache_instance_t *ctx, server_rec
           apr_pool_clear(ctx->pool);
           if ((rc = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                  DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rc, s, APLOGNO(00809)
                            "Cannot open socache DBM file `%s' for reading "
                            "(fetch)",
                            ctx->data_file);
      @@ -328,7 +338,7 @@ static apr_status_t socache_dbm_remove(ap_socache_instance_t *ctx,
       
           if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                  DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00810)
                            "Cannot open socache DBM file `%s' for writing "
                            "(delete)",
                            ctx->data_file);
      @@ -392,7 +402,7 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
               keyidx = 0;
               if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                      DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00811)
                                "Cannot open socache DBM file `%s' for "
                                "scanning",
                                ctx->data_file);
      @@ -425,7 +435,7 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
               /* pass 2: delete expired elements */
               if (apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                DBM_FILE_MODE, ctx->pool) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00812)
                                "Cannot re-open socache DBM file `%s' for "
                                "expiring",
                                ctx->data_file);
      @@ -441,7 +451,7 @@ static void socache_dbm_expire(ap_socache_instance_t *ctx, server_rec *s)
                   break;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00813)
                        "DBM socache expiry: "
                        "old: %d, new: %d, removed: %d",
                        elts, elts-deleted, deleted);
      @@ -464,7 +474,7 @@ static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r,
           apr_pool_clear(ctx->pool);
           if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                  DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00814)
                            "Cannot open socache DBM file `%s' for status "
                            "retrival",
                            ctx->data_file);
      @@ -486,10 +496,18 @@ static void socache_dbm_status(ap_socache_instance_t *ctx, request_rec *r,
               avg = (int)(size / (long)elts);
           else
               avg = 0;
      -    ap_rprintf(r, "cache type: <b>DBM</b>, maximum size: <b>unlimited</b><br>");
      -    ap_rprintf(r, "current entries: <b>%d</b>, current size: <b>%ld</b> bytes<br>", elts, size);
      -    ap_rprintf(r, "average entry size: <b>%d</b> bytes<br>", avg);
      -    return;
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rprintf(r, "cache type: <b>DBM</b>, maximum size: <b>unlimited</b><br>");
      +        ap_rprintf(r, "current entries: <b>%d</b>, current size: <b>%ld</b> bytes<br>", elts, size);
      +        ap_rprintf(r, "average entry size: <b>%d</b> bytes<br>", avg);
      +    }
      +    else {
      +        ap_rputs("CacheType: DBM\n", r);
      +        ap_rputs("CacheMaximumSize: unlimited\n", r);
      +        ap_rprintf(r, "CacheCurrentEntries: %d\n", elts);
      +        ap_rprintf(r, "CacheCurrentSize: %ld\n", size);
      +        ap_rprintf(r, "CacheAvgEntrySize: %d\n", avg);
      +    }
       }
       
       static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx,
      @@ -511,7 +529,7 @@ static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx,
           now = apr_time_now();
           if ((rv = apr_dbm_open(&dbm, ctx->data_file, APR_DBM_RWCREATE,
                                  DBM_FILE_MODE, ctx->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00815)
                            "Cannot open socache DBM file `%s' for "
                            "iterating", ctx->data_file);
               return rv;
      @@ -532,7 +550,7 @@ static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx,
                                    (unsigned char *)dbmkey.dptr, dbmkey.dsize,
                                    (unsigned char *)dbmval.dptr + sizeof(apr_time_t),
                                    dbmval.dsize - sizeof(apr_time_t), pool);
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(00816)
                                "dbm `%s' entry iterated", ctx->data_file);
                   if (rv != APR_SUCCESS)
                       return rv;
      @@ -542,7 +560,7 @@ static apr_status_t socache_dbm_iterate(ap_socache_instance_t *ctx,
           apr_dbm_close(dbm);
       
           if (rv != APR_SUCCESS && rv != APR_EOF) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00817)
                            "Failure reading first/next socache DBM file `%s' record",
                            ctx->data_file);
               return rv;
      diff --git a/modules/cache/mod_socache_dbm.dep b/modules/cache/mod_socache_dbm.dep
      new file mode 100644
      index 00000000000..8288f2ef46b
      --- /dev/null
      +++ b/modules/cache/mod_socache_dbm.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_socache_dbm.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_socache_dbm.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\generators\mod_status.h"\
      +	
      diff --git a/modules/cache/mod_socache_dbm.dsp b/modules/cache/mod_socache_dbm.dsp
      index bcd253dc951..4de39aa6c56 100644
      --- a/modules/cache/mod_socache_dbm.dsp
      +++ b/modules/cache/mod_socache_dbm.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "mod_socache_dbm_EXPORTS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_dbm_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_dbm_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_dbm_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_dbm_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      diff --git a/modules/cache/mod_socache_dbm.mak b/modules/cache/mod_socache_dbm.mak
      new file mode 100644
      index 00000000000..93453f8b360
      --- /dev/null
      +++ b/modules/cache/mod_socache_dbm.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_socache_dbm.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_socache_dbm - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_socache_dbm - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_socache_dbm - Win32 Release" && "$(CFG)" != "mod_socache_dbm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_socache_dbm.mak" CFG="mod_socache_dbm - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_socache_dbm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_socache_dbm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dbm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_socache_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_dbm.obj"
      +	-@erase "$(INTDIR)\mod_socache_dbm.res"
      +	-@erase "$(INTDIR)\mod_socache_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_dbm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_socache_dbm.so" /d LONG_NAME="socache_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_dbm.pdb" /debug /out:"$(OUTDIR)\mod_socache_dbm.so" /implib:"$(OUTDIR)\mod_socache_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_dbm.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_dbm.obj" \
      +	"$(INTDIR)\mod_socache_dbm.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_socache_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_dbm.so"
      +   if exist .\Release\mod_socache_dbm.so.manifest mt.exe -manifest .\Release\mod_socache_dbm.so.manifest -outputresource:.\Release\mod_socache_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_socache_dbm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_dbm.obj"
      +	-@erase "$(INTDIR)\mod_socache_dbm.res"
      +	-@erase "$(INTDIR)\mod_socache_dbm_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_dbm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.exp"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.lib"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dbm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_dbm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_dbm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_socache_dbm.so" /d LONG_NAME="socache_dbm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_dbm.pdb" /debug /out:"$(OUTDIR)\mod_socache_dbm.so" /implib:"$(OUTDIR)\mod_socache_dbm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_dbm.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_dbm.obj" \
      +	"$(INTDIR)\mod_socache_dbm.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_dbm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_socache_dbm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_dbm.so"
      +   if exist .\Debug\mod_socache_dbm.so.manifest mt.exe -manifest .\Debug\mod_socache_dbm.so.manifest -outputresource:.\Debug\mod_socache_dbm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_socache_dbm.dep")
      +!INCLUDE "mod_socache_dbm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_socache_dbm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_socache_dbm - Win32 Release" || "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_socache_dbm - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dbm - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dbm - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_socache_dbm - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_socache_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_socache_dbm.so" /d LONG_NAME="socache_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dbm - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_socache_dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_dbm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_socache_dbm.so" /d LONG_NAME="socache_dbm_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_socache_dbm.c
      +
      +"$(INTDIR)\mod_socache_dbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_socache_dc.c b/modules/cache/mod_socache_dc.c
      index 78a92b9e2c8..c1d4ab841ec 100644
      --- a/modules/cache/mod_socache_dc.c
      +++ b/modules/cache/mod_socache_dc.c
      @@ -19,6 +19,7 @@
       #include "http_request.h"
       #include "http_config.h"
       #include "http_protocol.h"
      +#include "mod_status.h"
       
       #include "apr_strings.h"
       #include "apr_time.h"
      @@ -74,10 +75,10 @@ static apr_status_t socache_dc_init(ap_socache_instance_t *ctx,
       #endif
           ctx->dc = DC_CTX_new(ctx->target, SESSION_CTX_FLAGS);
           if (!ctx->dc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "distributed scache failed to obtain context");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00738) "distributed scache failed to obtain context");
               return APR_EGENERAL;
           }
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "distributed scache context initialised");
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(00739) "distributed scache context initialised");
       
           return APR_SUCCESS;
       }
      @@ -104,10 +105,10 @@ static apr_status_t socache_dc_store(ap_socache_instance_t *ctx, server_rec *s,
           /* Send the serialised session to the distributed cache context */
           if (!DC_CTX_add_session(ctx->dc, id, idlen, der, der_len,
                                   apr_time_msec(expiry))) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "distributed scache 'store' failed");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00740) "distributed scache 'store' failed");
               return APR_EGENERAL;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "distributed scache 'store' successful");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00741) "distributed scache 'store' successful");
           return APR_SUCCESS;
       }
       
      @@ -120,15 +121,15 @@ static apr_status_t socache_dc_retrieve(ap_socache_instance_t *ctx, server_rec *
       
           /* Retrieve any corresponding session from the distributed cache context */
           if (!DC_CTX_get_session(ctx->dc, id, idlen, dest, *destlen, &data_len)) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "distributed scache 'retrieve' MISS");
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00742) "distributed scache 'retrieve' MISS");
               return APR_NOTFOUND;
           }
           if (data_len > *destlen) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "distributed scache 'retrieve' OVERFLOW");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00743) "distributed scache 'retrieve' OVERFLOW");
               return APR_ENOSPC;
           }
           *destlen = data_len;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "distributed scache 'retrieve' HIT");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00744) "distributed scache 'retrieve' HIT");
           return APR_SUCCESS;
       }
       
      @@ -138,20 +139,27 @@ static apr_status_t socache_dc_remove(ap_socache_instance_t *ctx,
       {
           /* Remove any corresponding session from the distributed cache context */
           if (!DC_CTX_remove_session(ctx->dc, id, idlen)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "distributed scache 'remove' MISS");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00745) "distributed scache 'remove' MISS");
               return APR_NOTFOUND;
      -    } else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "distributed scache 'remove' HIT");
      +    }
      +    else {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00746) "distributed scache 'remove' HIT");
               return APR_SUCCESS;
           }
       }
       
       static void socache_dc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
       {
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00747)
                         "distributed scache 'socache_dc_status'");
      -    ap_rprintf(r, "cache type: <b>DC (Distributed Cache)</b>, "
      -               " target: <b>%s</b><br>", ctx->target);
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rprintf(r, "cache type: <b>DC (Distributed Cache)</b>, "
      +                   " target: <b>%s</b><br>", ctx->target);
      +    }
      +    else {
      +        ap_rputs("CacheType: DC\n", r);
      +        ap_rvputs(r, "CacheTarget: ", ctx->target, "\n", NULL);
      +    }
       }
       
       static apr_status_t socache_dc_iterate(ap_socache_instance_t *instance,
      diff --git a/modules/cache/mod_socache_dc.dep b/modules/cache/mod_socache_dc.dep
      new file mode 100644
      index 00000000000..ef969f7af31
      --- /dev/null
      +++ b/modules/cache/mod_socache_dc.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_socache_dc.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_socache_dc.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/cache/mod_socache_dc.mak b/modules/cache/mod_socache_dc.mak
      new file mode 100644
      index 00000000000..0c4c3c0893e
      --- /dev/null
      +++ b/modules/cache/mod_socache_dc.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_socache_dc.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_socache_dc - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_socache_dc - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_socache_dc - Win32 Release" && "$(CFG)" != "mod_socache_dc - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_socache_dc.mak" CFG="mod_socache_dc - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_socache_dc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_socache_dc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dc - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_dc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_socache_dc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_dc.obj"
      +	-@erase "$(INTDIR)\mod_socache_dc.res"
      +	-@erase "$(INTDIR)\mod_socache_dc_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_dc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dc.exp"
      +	-@erase "$(OUTDIR)\mod_socache_dc.lib"
      +	-@erase "$(OUTDIR)\mod_socache_dc.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_dc_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_dc.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_socache_dc.so" /d LONG_NAME="socache_dc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_dc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_dc.pdb" /debug /out:"$(OUTDIR)\mod_socache_dc.so" /implib:"$(OUTDIR)\mod_socache_dc.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_dc.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_dc.obj" \
      +	"$(INTDIR)\mod_socache_dc.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_dc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_socache_dc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_dc.so"
      +   if exist .\Release\mod_socache_dc.so.manifest mt.exe -manifest .\Release\mod_socache_dc.so.manifest -outputresource:.\Release\mod_socache_dc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_dc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_socache_dc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_dc.obj"
      +	-@erase "$(INTDIR)\mod_socache_dc.res"
      +	-@erase "$(INTDIR)\mod_socache_dc_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_dc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dc.exp"
      +	-@erase "$(OUTDIR)\mod_socache_dc.lib"
      +	-@erase "$(OUTDIR)\mod_socache_dc.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_dc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_dc_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_dc.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_socache_dc.so" /d LONG_NAME="socache_dc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_dc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_dc.pdb" /debug /out:"$(OUTDIR)\mod_socache_dc.so" /implib:"$(OUTDIR)\mod_socache_dc.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_dc.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_dc.obj" \
      +	"$(INTDIR)\mod_socache_dc.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_dc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_socache_dc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_dc.so"
      +   if exist .\Debug\mod_socache_dc.so.manifest mt.exe -manifest .\Debug\mod_socache_dc.so.manifest -outputresource:.\Debug\mod_socache_dc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_socache_dc.dep")
      +!INCLUDE "mod_socache_dc.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_socache_dc.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_socache_dc - Win32 Release" || "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_socache_dc - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dc - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_dc - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_socache_dc - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_socache_dc.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_dc.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_socache_dc.so" /d LONG_NAME="socache_dc_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_dc - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_socache_dc.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_dc.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_socache_dc.so" /d LONG_NAME="socache_dc_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_socache_dc.c
      +
      +"$(INTDIR)\mod_socache_dc.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_socache_memcache.c b/modules/cache/mod_socache_memcache.c
      index 5376eebd796..e943b9b2b82 100644
      --- a/modules/cache/mod_socache_memcache.c
      +++ b/modules/cache/mod_socache_memcache.c
      @@ -17,6 +17,7 @@
       
       #include "httpd.h"
       #include "http_config.h"
      +#include "http_protocol.h"
       
       #include "apr.h"
       #include "apu_version.h"
      @@ -33,6 +34,8 @@
       #include "ap_mpm.h"
       #include "http_log.h"
       #include "apr_memcache.h"
      +#include "apr_strings.h"
      +#include "mod_status.h"
       
       /* The underlying apr_memcache system is thread safe.. */
       #define MC_KEY_LEN 254
      @@ -51,9 +54,15 @@
       #endif
       
       #ifndef MC_DEFAULT_SERVER_TTL
      -#define MC_DEFAULT_SERVER_TTL 600
      +#define MC_DEFAULT_SERVER_TTL    apr_time_from_sec(15)
       #endif
       
      +module AP_MODULE_DECLARE_DATA socache_memcache_module;
      +
      +typedef struct {
      +    apr_uint32_t ttl;
      +} socache_mc_svr_cfg;
      +
       struct ap_socache_instance_t {
           const char *servers;
           apr_memcache_t *mc;
      @@ -85,11 +94,14 @@ static apr_status_t socache_mc_init(ap_socache_instance_t *ctx,
       {
           apr_status_t rv;
           int thread_limit = 0;
      -    int nservers = 0;
      +    apr_uint16_t nservers = 0;
           char *cache_config;
           char *split;
           char *tok;
       
      +    socache_mc_svr_cfg *sconf = ap_get_module_config(s->module_config,
      +                                                     &socache_memcache_module);
      +
           ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
       
           /* Find all the servers in the first run to get a total count */
      @@ -102,8 +114,8 @@ static apr_status_t socache_mc_init(ap_socache_instance_t *ctx,
       
           rv = apr_memcache_create(p, nservers, 0, &ctx->mc);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                     "socache: Failed to create Memcache Object of '%d' size.",
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00785)
      +                     "Failed to create Memcache Object of '%d' size.",
                            nservers);
               return rv;
           }
      @@ -119,14 +131,14 @@ static apr_status_t socache_mc_init(ap_socache_instance_t *ctx,
       
               rv = apr_parse_addr_port(&host_str, &scope_id, &port, split, p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                         "socache: Failed to Parse memcache Server: '%s'", split);
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00786)
      +                         "Failed to Parse memcache Server: '%s'", split);
                   return rv;
               }
       
               if (host_str == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                         "socache: Failed to Parse Server, "
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00787)
      +                         "Failed to Parse Server, "
                                "no hostname specified: '%s'", split);
                   return APR_EINVAL;
               }
      @@ -140,19 +152,19 @@ static apr_status_t socache_mc_init(ap_socache_instance_t *ctx,
                                               MC_DEFAULT_SERVER_MIN,
                                               MC_DEFAULT_SERVER_SMAX,
                                               thread_limit,
      -                                        MC_DEFAULT_SERVER_TTL,
      +                                        sconf->ttl,
                                               &st);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                         "socache: Failed to Create memcache Server: %s:%d",
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00788)
      +                         "Failed to Create memcache Server: %s:%d",
                                host_str, port);
                   return rv;
               }
       
               rv = apr_memcache_add_server(ctx->mc, st);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                         "socache: Failed to Add memcache Server: %s:%d",
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00789)
      +                         "Failed to Add memcache Server: %s:%d",
                                host_str, port);
                   return rv;
               }
      @@ -182,19 +194,13 @@ static int socache_mc_id2key(ap_socache_instance_t *ctx,
                                    char *key, apr_size_t keylen)
       {
           char *cp;
      -    unsigned int n;
       
           if (idlen * 2 + ctx->taglen >= keylen)
               return 1;
       
           cp = apr_cpystrn(key, ctx->tag, ctx->taglen);
      +    ap_bin2hex(id, idlen, cp);
       
      -    for (n = 0; n < idlen; n++) {
      -        apr_snprintf(cp, 3, "%02X", (unsigned) id[n]);
      -        cp += 2;
      -    }
      -
      -    *cp = '\0';
           return 0;
       }
       
      @@ -211,11 +217,17 @@ static apr_status_t socache_mc_store(ap_socache_instance_t *ctx, server_rec *s,
               return APR_EINVAL;
           }
       
      -    /* In APR-util - unclear what 'timeout' is, as it was not implemented */
      -    rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData, 0, 0);
      +    /* memcache needs time in seconds till expiry; fail if this is not
      +     * positive *before* casting to unsigned (apr_uint32_t). */
      +    expiry -= apr_time_now();
      +    if (apr_time_sec(expiry) <= 0) {
      +        return APR_EINVAL;
      +    }
      +    rv = apr_memcache_set(ctx->mc, buf, (char*)ucaData, nData,
      +                          apr_time_sec(expiry), 0);
       
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00790)
                            "scache_mc: error setting key '%s' "
                            "with %d bytes of data", buf, nData);
               return rv;
      @@ -243,13 +255,13 @@ static apr_status_t socache_mc_retrieve(ap_socache_instance_t *ctx, server_rec *
           rv = apr_memcache_getp(ctx->mc, p, buf, &data, &data_len, NULL);
           if (rv) {
               if (rv != APR_NOTFOUND) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00791)
                                "scache_mc: 'retrieve' FAIL");
               }
               return rv;
           }
           else if (data_len > *destlen) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00792)
                            "scache_mc: 'retrieve' OVERFLOW");
               return APR_ENOMEM;
           }
      @@ -274,7 +286,7 @@ static apr_status_t socache_mc_remove(ap_socache_instance_t *ctx, server_rec *s,
           rv = apr_memcache_delete(ctx->mc, buf, 0);
       
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(00793)
                            "scache_mc: error deleting key '%s' ",
                            buf);
           }
      @@ -284,7 +296,58 @@ static apr_status_t socache_mc_remove(ap_socache_instance_t *ctx, server_rec *s,
       
       static void socache_mc_status(ap_socache_instance_t *ctx, request_rec *r, int flags)
       {
      -    /* TODO: Make a mod_status handler. meh. */
      +    apr_memcache_t *rc = ctx->mc;
      +    int i;
      +
      +    for (i = 0; i < rc->ntotal; i++) {
      +        apr_memcache_server_t *ms;
      +        apr_memcache_stats_t *stats;
      +        apr_status_t rv;
      +        char *br = (!(flags & AP_STATUS_SHORT) ? "<br />" : "");
      +
      +        ms = rc->live_servers[i];
      +
      +        ap_rprintf(r, "Memcached server: %s:%d [%s]%s\n", ms->host, (int)ms->port,
      +                (ms->status == APR_MC_SERVER_LIVE) ? "Up" : "Down",
      +                br);
      +        rv = apr_memcache_stats(ms, r->pool, &stats);
      +        if (rv != APR_SUCCESS)
      +            continue;
      +        if (!(flags & AP_STATUS_SHORT)) {
      +            ap_rprintf(r, "<b>Version:</b> <i>%s</i> [%u bits], PID: <i>%u</i>, Uptime: <i>%u hrs</i> <br />\n",
      +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600);
      +            ap_rprintf(r, "<b>Clients::</b> Structures: <i>%u</i>, Total: <i>%u</i>, Current: <i>%u</i> <br />\n",
      +                    stats->connection_structures, stats->total_connections, stats->curr_connections);
      +            ap_rprintf(r, "<b>Storage::</b> Total Items: <i>%u</i>, Current Items: <i>%u</i>, Bytes: <i>%" APR_UINT64_T_FMT "</i> <br />\n",
      +                    stats->total_items, stats->curr_items, stats->bytes);
      +            ap_rprintf(r, "<b>CPU::</b> System: <i>%u</i>, User: <i>%u</i> <br />\n",
      +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user );
      +            ap_rprintf(r, "<b>Cache::</b> Gets: <i>%u</i>, Sets: <i>%u</i>, Hits: <i>%u</i>, Misses: <i>%u</i> <br />\n",
      +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses);
      +            ap_rprintf(r, "<b>Net::</b> Input bytes: <i>%" APR_UINT64_T_FMT "</i>, Output bytes: <i>%" APR_UINT64_T_FMT "</i> <br />\n",
      +                    stats->bytes_read, stats->bytes_written);
      +            ap_rprintf(r, "<b>Misc::</b> Evictions: <i>%" APR_UINT64_T_FMT "</i>, MaxMem: <i>%u</i>, Threads: <i>%u</i> <br />\n",
      +                    stats->evictions, stats->limit_maxbytes, stats->threads);
      +            ap_rputs("<hr><br />\n", r);
      +        }
      +        else {
      +            ap_rprintf(r, "Version: %s [%u bits], PID: %u, Uptime: %u hrs %s\n",
      +                    stats->version , stats->pointer_size, stats->pid, stats->uptime/3600, br);
      +            ap_rprintf(r, "Clients:: Structures: %d, Total: %d, Current: %u %s\n",
      +                    stats->connection_structures, stats->total_connections, stats->curr_connections, br);
      +            ap_rprintf(r, "Storage:: Total Items: %u, Current Items: %u, Bytes: %" APR_UINT64_T_FMT " %s\n",
      +                    stats->total_items, stats->curr_items, stats->bytes, br);
      +            ap_rprintf(r, "CPU:: System: %u, User: %u %s\n",
      +                    (unsigned)stats->rusage_system, (unsigned)stats->rusage_user , br);
      +            ap_rprintf(r, "Cache:: Gets: %u, Sets: %u, Hits: %u, Misses: %u %s\n",
      +                    stats->cmd_get, stats->cmd_set, stats->get_hits, stats->get_misses, br);
      +            ap_rprintf(r, "Net:: Input bytes: %" APR_UINT64_T_FMT ", Output bytes: %" APR_UINT64_T_FMT " %s\n",
      +                    stats->bytes_read, stats->bytes_written, br);
      +            ap_rprintf(r, "Misc:: Evictions: %" APR_UINT64_T_FMT ", MaxMem: %u, Threads: %u %s\n",
      +                    stats->evictions, stats->limit_maxbytes, stats->threads, br);
      +        }
      +    }
      +
       }
       
       static apr_status_t socache_mc_iterate(ap_socache_instance_t *instance,
      @@ -310,17 +373,59 @@ static const ap_socache_provider_t socache_mc = {
       
       #endif /* HAVE_APU_MEMCACHE */
       
      +static void *create_server_config(apr_pool_t *p, server_rec *s)
      +{
      +    socache_mc_svr_cfg *sconf = apr_pcalloc(p, sizeof(socache_mc_svr_cfg));
      +    
      +    sconf->ttl = MC_DEFAULT_SERVER_TTL;
      +
      +    return sconf;
      +}
      +
      +static const char *socache_mc_set_ttl(cmd_parms *cmd, void *dummy,
      +                                      const char *arg)
      +{
      +    apr_interval_time_t ttl;
      +    socache_mc_svr_cfg *sconf = ap_get_module_config(cmd->server->module_config,
      +                                                     &socache_memcache_module);
      +
      +    if (ap_timeout_parameter_parse(arg, &ttl, "s") != APR_SUCCESS) {
      +        return apr_pstrcat(cmd->pool, cmd->cmd->name,
      +                           " has wrong format", NULL);
      +    }
      +
      +    if ((ttl < apr_time_from_sec(0)) || (ttl > apr_time_from_sec(3600))) {
      +        return apr_pstrcat(cmd->pool, cmd->cmd->name,
      +                           " can only be 0 or up to one hour.", NULL);
      +    }
      +
      +    /* apr_memcache_server_create needs a ttl in usec. */
      +    sconf->ttl = ttl;
      +
      +    return NULL;
      +}
      +
       static void register_hooks(apr_pool_t *p)
       {
       #ifdef HAVE_APU_MEMCACHE
      -    ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "mc",
      +    ap_register_provider(p, AP_SOCACHE_PROVIDER_GROUP, "memcache",
                                AP_SOCACHE_PROVIDER_VERSION,
                                &socache_mc);
       #endif
       }
       
      +static const command_rec socache_memcache_cmds[] = {
      +    AP_INIT_TAKE1("MemcacheConnTTL", socache_mc_set_ttl, NULL, RSRC_CONF,
      +                  "TTL used for the connection with the memcache server(s)"),
      +    { NULL }
      +};
      +
       AP_DECLARE_MODULE(socache_memcache) = {
           STANDARD20_MODULE_STUFF,
      -    NULL, NULL, NULL, NULL, NULL,
      -    register_hooks
      +    NULL,                     /* create per-dir    config structures */
      +    NULL,                     /* merge  per-dir    config structures */
      +    create_server_config,     /* create per-server config structures */
      +    NULL,                     /* merge  per-server config structures */
      +    socache_memcache_cmds,    /* table of config file commands       */
      +    register_hooks            /* register hooks                      */
       };
      diff --git a/modules/cache/mod_socache_memcache.dep b/modules/cache/mod_socache_memcache.dep
      new file mode 100644
      index 00000000000..2929c5e6625
      --- /dev/null
      +++ b/modules/cache/mod_socache_memcache.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_socache_memcache.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_socache_memcache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_memcache.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/cache/mod_socache_memcache.dsp b/modules/cache/mod_socache_memcache.dsp
      index e4f81a3c2ab..d5308269618 100644
      --- a/modules/cache/mod_socache_memcache.dsp
      +++ b/modules/cache/mod_socache_memcache.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "mod_socache_memcache_EXPORTS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_memcache_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_memcache_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_memcache_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_memcache_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      diff --git a/modules/cache/mod_socache_memcache.mak b/modules/cache/mod_socache_memcache.mak
      new file mode 100644
      index 00000000000..b75a9a1bd8c
      --- /dev/null
      +++ b/modules/cache/mod_socache_memcache.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_socache_memcache.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_socache_memcache - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_socache_memcache - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_socache_memcache - Win32 Release" && "$(CFG)" != "mod_socache_memcache - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_socache_memcache.mak" CFG="mod_socache_memcache - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_socache_memcache - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_socache_memcache - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_memcache - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_memcache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_socache_memcache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_memcache.obj"
      +	-@erase "$(INTDIR)\mod_socache_memcache.res"
      +	-@erase "$(INTDIR)\mod_socache_memcache_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_memcache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.exp"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.lib"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_memcache_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_memcache.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_socache_memcache.so" /d LONG_NAME="socache_memcache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_memcache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_memcache.pdb" /debug /out:"$(OUTDIR)\mod_socache_memcache.so" /implib:"$(OUTDIR)\mod_socache_memcache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_memcache.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_memcache.obj" \
      +	"$(INTDIR)\mod_socache_memcache.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_memcache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_socache_memcache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_memcache.so"
      +   if exist .\Release\mod_socache_memcache.so.manifest mt.exe -manifest .\Release\mod_socache_memcache.so.manifest -outputresource:.\Release\mod_socache_memcache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_memcache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_socache_memcache.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_memcache.obj"
      +	-@erase "$(INTDIR)\mod_socache_memcache.res"
      +	-@erase "$(INTDIR)\mod_socache_memcache_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_memcache_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.exp"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.lib"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_memcache.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_memcache_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_memcache.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_socache_memcache.so" /d LONG_NAME="socache_memcache_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_memcache.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_memcache.pdb" /debug /out:"$(OUTDIR)\mod_socache_memcache.so" /implib:"$(OUTDIR)\mod_socache_memcache.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_memcache.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_memcache.obj" \
      +	"$(INTDIR)\mod_socache_memcache.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_memcache.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_socache_memcache.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_memcache.so"
      +   if exist .\Debug\mod_socache_memcache.so.manifest mt.exe -manifest .\Debug\mod_socache_memcache.so.manifest -outputresource:.\Debug\mod_socache_memcache.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_socache_memcache.dep")
      +!INCLUDE "mod_socache_memcache.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_socache_memcache.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_socache_memcache - Win32 Release" || "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_socache_memcache - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_memcache - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_memcache - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_socache_memcache - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_socache_memcache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_memcache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_socache_memcache.so" /d LONG_NAME="socache_memcache_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_memcache - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_socache_memcache.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_memcache.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_socache_memcache.so" /d LONG_NAME="socache_memcache_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_socache_memcache.c
      +
      +"$(INTDIR)\mod_socache_memcache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c
      index 710dd52bf2c..2750f254901 100644
      --- a/modules/cache/mod_socache_shmcb.c
      +++ b/modules/cache/mod_socache_shmcb.c
      @@ -19,6 +19,7 @@
       #include "http_request.h"
       #include "http_protocol.h"
       #include "http_config.h"
      +#include "mod_status.h"
       
       #include "apr.h"
       #include "apr_strings.h"
      @@ -28,14 +29,29 @@
       #include "apr_want.h"
       #include "apr_general.h"
       
      +#if APR_HAVE_LIMITS_H
      +#include <limits.h>
      +#endif
      +
       #include "ap_socache.h"
       
      -#define SHMCB_MAX_SIZE (64 * 1024 * 1024)
      +/* XXX Unfortunately, there are still many unsigned ints in use here, so we
      + * XXX cannot allow more than UINT_MAX. Since some of the ints are exposed in
      + * XXX public interfaces, a simple search and replace is not enough.
      + * XXX It should be possible to extend that so that the total cache size can
      + * XXX be APR_SIZE_MAX and only the object size needs to be smaller than
      + * XXX UINT_MAX.
      + */
      +#define SHMCB_MAX_SIZE (UINT_MAX<APR_SIZE_MAX ? UINT_MAX : APR_SIZE_MAX)
       
      -#define DEFAULT_SHMCB_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-shmcb-"
      +#define DEFAULT_SHMCB_PREFIX "socache-shmcb-"
       
       #define DEFAULT_SHMCB_SUFFIX ".cache"
       
      +#define ALIGNED_HEADER_SIZE APR_ALIGN_DEFAULT(sizeof(SHMCBHeader))
      +#define ALIGNED_SUBCACHE_SIZE APR_ALIGN_DEFAULT(sizeof(SHMCBSubcache))
      +#define ALIGNED_INDEX_SIZE APR_ALIGN_DEFAULT(sizeof(SHMCBIndex))
      +
       /*
        * Header structure - the start of the shared-mem segment
        */
      @@ -141,7 +157,7 @@ struct ap_socache_instance_t {
        * a pointer to the corresponding subcache. */
       #define SHMCB_SUBCACHE(pHeader, num) \
                       (SHMCBSubcache *)(((unsigned char *)(pHeader)) + \
      -                        sizeof(SHMCBHeader) + \
      +                        ALIGNED_HEADER_SIZE + \
                               (num) * ((pHeader)->subcache_size))
       
       /* This macro takes a pointer to the header and an id and returns a
      @@ -157,8 +173,9 @@ struct ap_socache_instance_t {
       /* This macro takes a pointer to a subcache and a zero-based index and returns
        * a pointer to the corresponding SHMCBIndex. */
       #define SHMCB_INDEX(pSubcache, num) \
      -                ((SHMCBIndex *)(((unsigned char *)pSubcache) + \
      -                                sizeof(SHMCBSubcache)) + num)
      +                (SHMCBIndex *)(((unsigned char *)pSubcache) + \
      +                        ALIGNED_SUBCACHE_SIZE + \
      +                        (num) * ALIGNED_INDEX_SIZE)
       
       /* This macro takes a pointer to the header and a subcache and returns a
        * pointer to the corresponding data area. */
      @@ -194,7 +211,8 @@ static void shmcb_cyclic_ntoc_memcpy(unsigned int buf_size, unsigned char *data,
           }
       }
       
      -/* A "cyclic-to-normal" memcpy. */static void shmcb_cyclic_cton_memcpy(unsigned int buf_size, unsigned char *dest,
      +/* A "cyclic-to-normal" memcpy. */
      +static void shmcb_cyclic_cton_memcpy(unsigned int buf_size, unsigned char *dest,
                                            const unsigned char *data, unsigned int src_offset,
                                            unsigned int src_len)
       {
      @@ -310,11 +328,9 @@ static const char *socache_shmcb_create(ap_socache_instance_t **context,
               }
       
               if (ctx->shm_size >= SHMCB_MAX_SIZE) {
      -            return apr_psprintf(tmp,
      -                                "Invalid argument: size has "
      -                                "to be < %d bytes on this platform",
      -                                SHMCB_MAX_SIZE);
      -
      +            return apr_psprintf(tmp, "Invalid argument: size has "
      +                    "to be < %" APR_SIZE_T_FMT " bytes on this platform",
      +                    SHMCB_MAX_SIZE);
               }
           }
           else if (cp2 >= path && *cp2 == ')') {
      @@ -341,7 +357,7 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
               const char *path = apr_pstrcat(p, DEFAULT_SHMCB_PREFIX, namespace,
                                              DEFAULT_SHMCB_SUFFIX, NULL);
       
      -        ctx->data_file = ap_server_root_relative(p, path);
      +        ctx->data_file = ap_runtime_dir_relative(p, path);
           }
       
           /* Use anonymous shm by default, fall back on name-based. */
      @@ -351,7 +367,7 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
                * configured successfully; the ap_server_root_relative call
                * above will return NULL for invalid paths. */
               if (ctx->data_file == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00818)
                                "Could not use default path '%s' for shmcb socache",
                                ctx->data_file);
                   return APR_EINVAL;
      @@ -365,7 +381,7 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
           }
       
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00819)
                            "Could not allocate shared memory segment for shmcb "
                            "socache");
               return rv;
      @@ -373,18 +389,18 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
       
           shm_segment = apr_shm_baseaddr_get(ctx->shm);
           shm_segsize = apr_shm_size_get(ctx->shm);
      -    if (shm_segsize < (5 * sizeof(SHMCBHeader))) {
      +    if (shm_segsize < (5 * ALIGNED_HEADER_SIZE)) {
               /* the segment is ridiculously small, bail out */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00820)
                            "shared memory segment too small");
               return APR_ENOSPC;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00821)
                        "shmcb_init allocated %" APR_SIZE_T_FMT
                        " bytes of shared memory",
                        shm_segsize);
           /* Discount the header */
      -    shm_segsize -= sizeof(SHMCBHeader);
      +    shm_segsize -= ALIGNED_HEADER_SIZE;
           /* Select index size based on average object size hints, if given. */
           avg_obj_size = hints && hints->avg_obj_size ? hints->avg_obj_size : 150;
           avg_id_len = hints && hints->avg_id_len ? hints->avg_id_len : 30;
      @@ -393,14 +409,15 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
           while ((num_idx / num_subcache) < (2 * num_subcache))
               num_subcache /= 2;
           num_idx /= num_subcache;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00822)
                        "for %" APR_SIZE_T_FMT " bytes (%" APR_SIZE_T_FMT
                        " including header), recommending %u subcaches, "
                        "%u indexes each", shm_segsize,
      -                 shm_segsize + sizeof(SHMCBHeader), num_subcache, num_idx);
      +                 shm_segsize + ALIGNED_HEADER_SIZE,
      +                 num_subcache, num_idx);
           if (num_idx < 5) {
               /* we're still too small, bail out */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00823)
                            "shared memory segment too small");
               return APR_ENOSPC;
           }
      @@ -416,29 +433,30 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
           header->stat_removes_miss = 0;
           header->subcache_num = num_subcache;
           /* Convert the subcache size (in bytes) to a value that is suitable for
      -     * structure alignment on the host platform, by rounding down if necessary.
      -     * This assumes that sizeof(unsigned long) provides an appropriate
      -     * alignment unit.  */
      -    header->subcache_size = ((size_t)(shm_segsize / num_subcache) &
      -                             ~(size_t)(sizeof(unsigned long) - 1));
      -    header->subcache_data_offset = sizeof(SHMCBSubcache) +
      -                                   num_idx * sizeof(SHMCBIndex);
      +     * structure alignment on the host platform, by rounding down if necessary. */
      +    header->subcache_size = (size_t)(shm_segsize / num_subcache);
      +    if (header->subcache_size != APR_ALIGN_DEFAULT(header->subcache_size)) {
      +        header->subcache_size = APR_ALIGN_DEFAULT(header->subcache_size) -
      +                                APR_ALIGN_DEFAULT(1);
      +    }
      +    header->subcache_data_offset = ALIGNED_SUBCACHE_SIZE +
      +                                   num_idx * ALIGNED_INDEX_SIZE;
           header->subcache_data_size = header->subcache_size -
                                        header->subcache_data_offset;
           header->index_num = num_idx;
       
           /* Output trace info */
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00824)
                        "shmcb_init_memory choices follow");
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00825)
                        "subcache_num = %u", header->subcache_num);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00826)
                        "subcache_size = %u", header->subcache_size);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00827)
                        "subcache_data_offset = %u", header->subcache_data_offset);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00828)
                        "subcache_data_size = %u", header->subcache_data_size);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00829)
                        "index_num = %u", header->index_num);
           /* The header is done, make the caches empty */
           for (loop = 0; loop < header->subcache_num; loop++) {
      @@ -446,7 +464,7 @@ static apr_status_t socache_shmcb_init(ap_socache_instance_t *ctx,
               subcache->idx_pos = subcache->idx_used = 0;
               subcache->data_pos = subcache->data_used = 0;
           }
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(00830)
                        "Shared memory socache initialised");
           /* Success ... */
       
      @@ -472,19 +490,19 @@ static apr_status_t socache_shmcb_store(ap_socache_instance_t *ctx,
           SHMCBSubcache *subcache = SHMCB_MASK(header, id);
           int tryreplace;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00831)
                        "socache_shmcb_store (0x%02x -> subcache %d)",
                        SHMCB_MASK_DBG(header, id));
           /* XXX: Says who?  Why shouldn't this be acceptable, or padded if not? */
           if (idlen < 4) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "unusably short id provided "
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00832) "unusably short id provided "
                       "(%u bytes)", idlen);
               return APR_EINVAL;
           }
           tryreplace = shmcb_subcache_remove(s, header, subcache, id, idlen);
           if (shmcb_subcache_store(s, header, subcache, encoded,
                                    len_encoded, id, idlen, expiry)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00833)
                            "can't store an socache entry!");
               return APR_ENOSPC;
           }
      @@ -494,7 +512,7 @@ static apr_status_t socache_shmcb_store(ap_socache_instance_t *ctx,
           else {
               header->stat_stores++;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00834)
                        "leaving socache_shmcb_store successfully");
           return APR_SUCCESS;
       }
      @@ -509,7 +527,7 @@ static apr_status_t socache_shmcb_retrieve(ap_socache_instance_t *ctx,
           SHMCBSubcache *subcache = SHMCB_MASK(header, id);
           int rv;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00835)
                        "socache_shmcb_retrieve (0x%02x -> subcache %d)",
                        SHMCB_MASK_DBG(header, id));
       
      @@ -520,7 +538,7 @@ static apr_status_t socache_shmcb_retrieve(ap_socache_instance_t *ctx,
               header->stat_retrieves_hit++;
           else
               header->stat_retrieves_miss++;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00836)
                        "leaving socache_shmcb_retrieve successfully");
       
           return rv == 0 ? APR_SUCCESS : APR_NOTFOUND;
      @@ -534,11 +552,11 @@ static apr_status_t socache_shmcb_remove(ap_socache_instance_t *ctx,
           SHMCBSubcache *subcache = SHMCB_MASK(header, id);
           apr_status_t rv;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00837)
                        "socache_shmcb_remove (0x%02x -> subcache %d)",
                        SHMCB_MASK_DBG(header, id));
           if (idlen < 4) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "unusably short id provided "
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00838) "unusably short id provided "
                       "(%u bytes)", idlen);
               return APR_EINVAL;
           }
      @@ -549,7 +567,7 @@ static apr_status_t socache_shmcb_remove(ap_socache_instance_t *ctx,
               header->stat_removes_miss++;
               rv = APR_NOTFOUND;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00839)
                        "leaving socache_shmcb_remove successfully");
       
           return rv;
      @@ -567,7 +585,7 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
           int index_pct, cache_pct;
       
           AP_DEBUG_ASSERT(header->subcache_num > 0);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "inside shmcb_status");
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00840) "inside shmcb_status");
           /* Perform the iteration inside the mutex to avoid corruption or invalid
            * pointer arithmetic. The rest of our logic uses read-only header data so
            * doesn't need the lock. */
      @@ -593,41 +611,70 @@ static void socache_shmcb_status(ap_socache_instance_t *ctx,
                                        header->subcache_num);
           cache_pct = (100 * cache_total) / (header->subcache_data_size *
                                              header->subcache_num);
      -    /* Generate HTML */
      -    ap_rprintf(r, "cache type: <b>SHMCB</b>, shared memory: <b>%" APR_SIZE_T_FMT "</b> "
      -               "bytes, current entries: <b>%d</b><br>",
      -               ctx->shm_size, total);
      -    ap_rprintf(r, "subcaches: <b>%d</b>, indexes per subcache: <b>%d</b><br>",
      -               header->subcache_num, header->index_num);
      -    if (non_empty_subcaches) {
      -        apr_time_t average_expiry = (apr_time_t)(expiry_total / (double)non_empty_subcaches);
      -        ap_rprintf(r, "time left on oldest entries' objects: ");
      -        if (now < average_expiry)
      -            ap_rprintf(r, "avg: <b>%d</b> seconds, (range: %d...%d)<br>",
      -                       (int)apr_time_sec(average_expiry - now),
      -                       (int)apr_time_sec(min_expiry - now),
      -                       (int)apr_time_sec(max_expiry - now));
      -        else
      -            ap_rprintf(r, "expiry_threshold: <b>Calculation error!</b><br>");
      +    /* Generate Output */
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rprintf(r, "cache type: <b>SHMCB</b>, shared memory: <b>%" APR_SIZE_T_FMT "</b> "
      +                   "bytes, current entries: <b>%d</b><br>",
      +                   ctx->shm_size, total);
      +        ap_rprintf(r, "subcaches: <b>%d</b>, indexes per subcache: <b>%d</b><br>",
      +                   header->subcache_num, header->index_num);
      +        if (non_empty_subcaches) {
      +            apr_time_t average_expiry = (apr_time_t)(expiry_total / (double)non_empty_subcaches);
      +            ap_rprintf(r, "time left on oldest entries' objects: ");
      +            if (now < average_expiry)
      +                ap_rprintf(r, "avg: <b>%d</b> seconds, (range: %d...%d)<br>",
      +                           (int)apr_time_sec(average_expiry - now),
      +                           (int)apr_time_sec(min_expiry - now),
      +                           (int)apr_time_sec(max_expiry - now));
      +            else
      +                ap_rprintf(r, "expiry_threshold: <b>Calculation error!</b><br>");
      +        }
      +
      +        ap_rprintf(r, "index usage: <b>%d%%</b>, cache usage: <b>%d%%</b><br>",
      +                   index_pct, cache_pct);
      +        ap_rprintf(r, "total entries stored since starting: <b>%lu</b><br>",
      +                   header->stat_stores);
      +        ap_rprintf(r, "total entries replaced since starting: <b>%lu</b><br>",
      +                   header->stat_replaced);
      +        ap_rprintf(r, "total entries expired since starting: <b>%lu</b><br>",
      +                   header->stat_expiries);
      +        ap_rprintf(r, "total (pre-expiry) entries scrolled out of the cache: "
      +                   "<b>%lu</b><br>", header->stat_scrolled);
      +        ap_rprintf(r, "total retrieves since starting: <b>%lu</b> hit, "
      +                   "<b>%lu</b> miss<br>", header->stat_retrieves_hit,
      +                   header->stat_retrieves_miss);
      +        ap_rprintf(r, "total removes since starting: <b>%lu</b> hit, "
      +                   "<b>%lu</b> miss<br>", header->stat_removes_hit,
      +                   header->stat_removes_miss);
           }
      +    else {
      +        ap_rputs("CacheType: SHMCB\n", r);
      +        ap_rprintf(r, "CacheSharedMemory: %" APR_SIZE_T_FMT "\n",
      +                   ctx->shm_size);
      +        ap_rprintf(r, "CacheCurrentEntries: %d\n", total);
      +        ap_rprintf(r, "CacheSubcaches: %d\n", header->subcache_num);
      +        ap_rprintf(r, "CacheIndexesPerSubcaches: %d\n", header->index_num);
      +        if (non_empty_subcaches) {
      +            apr_time_t average_expiry = (apr_time_t)(expiry_total / (double)non_empty_subcaches);
      +            if (now < average_expiry) {
      +                ap_rprintf(r, "CacheTimeLeftOldestAvg: %d\n", (int)apr_time_sec(average_expiry - now));
      +                ap_rprintf(r, "CacheTimeLeftOldestMin: %d\n", (int)apr_time_sec(min_expiry - now));
      +                ap_rprintf(r, "CacheTimeLeftOldestMax: %d\n", (int)apr_time_sec(max_expiry - now));
      +            }
      +        }
       
      -    ap_rprintf(r, "index usage: <b>%d%%</b>, cache usage: <b>%d%%</b><br>",
      -               index_pct, cache_pct);
      -    ap_rprintf(r, "total entries stored since starting: <b>%lu</b><br>",
      -               header->stat_stores);
      -    ap_rprintf(r, "total entries replaced since starting: <b>%lu</b><br>",
      -               header->stat_replaced);
      -    ap_rprintf(r, "total entries expired since starting: <b>%lu</b><br>",
      -               header->stat_expiries);
      -    ap_rprintf(r, "total (pre-expiry) entries scrolled out of the cache: "
      -               "<b>%lu</b><br>", header->stat_scrolled);
      -    ap_rprintf(r, "total retrieves since starting: <b>%lu</b> hit, "
      -               "<b>%lu</b> miss<br>", header->stat_retrieves_hit,
      -               header->stat_retrieves_miss);
      -    ap_rprintf(r, "total removes since starting: <b>%lu</b> hit, "
      -               "<b>%lu</b> miss<br>", header->stat_removes_hit,
      -               header->stat_removes_miss);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "leaving shmcb_status");
      +        ap_rprintf(r, "CacheIndexUsage: %d%%\n", index_pct);
      +        ap_rprintf(r, "CacheUsage: %d%%\n", cache_pct);
      +        ap_rprintf(r, "CacheStoreCount: %lu\n", header->stat_stores);
      +        ap_rprintf(r, "CacheReplaceCount: %lu\n", header->stat_replaced);
      +        ap_rprintf(r, "CacheExpireCount: %lu\n", header->stat_expiries);
      +        ap_rprintf(r, "CacheDiscardCount: %lu\n", header->stat_scrolled);
      +        ap_rprintf(r, "CacheRetrieveHitCount: %lu\n", header->stat_retrieves_hit);
      +        ap_rprintf(r, "CacheRetrieveMissCount: %lu\n", header->stat_retrieves_miss);
      +        ap_rprintf(r, "CacheRemoveHitCount: %lu\n", header->stat_removes_hit);
      +        ap_rprintf(r, "CacheRemoveMissCount: %lu\n", header->stat_removes_miss);
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00841) "leaving shmcb_status");
       }
       
       static apr_status_t socache_shmcb_iterate(ap_socache_instance_t *instance,
      @@ -680,7 +727,7 @@ static void shmcb_subcache_expire(server_rec *s, SHMCBHeader *header,
           if (!loop)
               /* Nothing to do */
               return;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00842)
                        "expiring %u and reclaiming %u removed socache entries",
                        expired, freed);
           if (loop == subcache->idx_used) {
      @@ -700,7 +747,7 @@ static void shmcb_subcache_expire(server_rec *s, SHMCBHeader *header,
               subcache->data_pos = idx->data_pos;
           }
           header->stat_expiries += expired;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00843)
                        "we now have %u socache entries", subcache->idx_used);
       }
       
      @@ -716,7 +763,7 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
       
           /* Sanity check the input */
           if (total_len > header->subcache_data_size) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00844)
                            "inserting socache entry larger (%d) than subcache data area (%d)",
                            total_len, header->subcache_data_size);
               return -1;
      @@ -734,7 +781,7 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
               unsigned int loop = 0;
       
               idx = SHMCB_INDEX(subcache, subcache->idx_pos);
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00845)
                            "about to force-expire, subcache: idx_used=%d, "
                            "data_used=%d", subcache->idx_used, subcache->data_used);
               do {
      @@ -761,7 +808,7 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
                   loop++;
               } while (header->subcache_data_size - subcache->data_used < total_len);
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00846)
                            "finished force-expire, subcache: idx_used=%d, "
                            "data_used=%d", subcache->idx_used, subcache->data_used);
           }
      @@ -797,10 +844,10 @@ static int shmcb_subcache_store(server_rec *s, SHMCBHeader *header,
           idx->id_len = id_len;
           idx->removed = 0;
           subcache->idx_used++;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00847)
                        "insert happened at idx=%d, data=(%u:%u)", new_idx,
                        id_offset, data_offset);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00848)
                        "finished insert, subcache: idx_pos/idx_used=%d/%d, "
                        "data_pos/data_used=%d/%d",
                        subcache->idx_pos, subcache->idx_used,
      @@ -833,7 +880,7 @@ static int shmcb_subcache_retrieve(server_rec *s, SHMCBHeader *header,
                   && shmcb_cyclic_memcmp(header->subcache_data_size,
                                          SHMCB_DATA(header, subcache),
                                          idx->data_pos, id, idx->id_len) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00849)
                                "match at idx=%d, data=%d", pos, idx->data_pos);
                   if (idx->expires > now) {
                       unsigned int data_offset;
      @@ -855,7 +902,8 @@ static int shmcb_subcache_retrieve(server_rec *s, SHMCBHeader *header,
                   else {
                       /* Already stale, quietly remove and treat as not-found */
                       idx->removed = 1;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +                header->stat_expiries++;
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00850)
                                    "shmcb_subcache_retrieve discarding expired entry");
                       return -1;
                   }
      @@ -865,7 +913,7 @@ static int shmcb_subcache_retrieve(server_rec *s, SHMCBHeader *header,
               pos = SHMCB_CYCLIC_INCREMENT(pos, 1, header->index_num);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00851)
                        "shmcb_subcache_retrieve found no match");
           return -1;
       }
      @@ -888,12 +936,12 @@ static int shmcb_subcache_remove(server_rec *s, SHMCBHeader *header,
                   && shmcb_cyclic_memcmp(header->subcache_data_size,
                                          SHMCB_DATA(header, subcache),
                                          idx->data_pos, id, idx->id_len) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00852)
                                "possible match at idx=%d, data=%d", pos, idx->data_pos);
       
                   /* Found the matching entry, remove it quietly. */
                   idx->removed = 1;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00853)
                                "shmcb_subcache_remove removing matching entry");
                   return 0;
               }
      @@ -928,7 +976,7 @@ static apr_status_t shmcb_subcache_iterate(ap_socache_instance_t *instance,
               /* Only consider 'idx' if the "removed" flag isn't set. */
               if (!idx->removed) {
       
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00854)
                                "iterating idx=%d, data=%d", pos, idx->data_pos);
                   if (idx->expires > now) {
                       unsigned char *id = *buf;
      @@ -970,7 +1018,7 @@ static apr_status_t shmcb_subcache_iterate(ap_socache_instance_t *instance,
       
                       rv = iterator(instance, s, userctx, id, idx->id_len,
                                     dest, dest_len, pool);
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s,
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(00855)
                                    "shmcb entry iterated");
                       if (rv != APR_SUCCESS)
                           return rv;
      @@ -978,7 +1026,8 @@ static apr_status_t shmcb_subcache_iterate(ap_socache_instance_t *instance,
                   else {
                       /* Already stale, quietly remove and treat as not-found */
                       idx->removed = 1;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +                header->stat_expiries++;
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00856)
                                    "shmcb_subcache_iterate discarding expired entry");
                   }
               }
      diff --git a/modules/cache/mod_socache_shmcb.dep b/modules/cache/mod_socache_shmcb.dep
      new file mode 100644
      index 00000000000..a5802b26ccf
      --- /dev/null
      +++ b/modules/cache/mod_socache_shmcb.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_socache_shmcb.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_socache_shmcb.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\generators\mod_status.h"\
      +	
      diff --git a/modules/cache/mod_socache_shmcb.dsp b/modules/cache/mod_socache_shmcb.dsp
      index 822c9e24dc6..17c10084de7 100644
      --- a/modules/cache/mod_socache_shmcb.dsp
      +++ b/modules/cache/mod_socache_shmcb.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "mod_socache_shmcb_EXPORTS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_shmcb_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_socache_shmcb_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_shmcb_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_socache_shmcb_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      diff --git a/modules/cache/mod_socache_shmcb.mak b/modules/cache/mod_socache_shmcb.mak
      new file mode 100644
      index 00000000000..7081784e268
      --- /dev/null
      +++ b/modules/cache/mod_socache_shmcb.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_socache_shmcb.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_socache_shmcb - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_socache_shmcb - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_socache_shmcb - Win32 Release" && "$(CFG)" != "mod_socache_shmcb - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_socache_shmcb.mak" CFG="mod_socache_shmcb - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_socache_shmcb - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_socache_shmcb - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_shmcb - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_shmcb.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_socache_shmcb.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_shmcb.obj"
      +	-@erase "$(INTDIR)\mod_socache_shmcb.res"
      +	-@erase "$(INTDIR)\mod_socache_shmcb_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_shmcb_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.exp"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.lib"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_shmcb_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_shmcb.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_socache_shmcb.so" /d LONG_NAME="socache_shmcb_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_shmcb.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_shmcb.pdb" /debug /out:"$(OUTDIR)\mod_socache_shmcb.so" /implib:"$(OUTDIR)\mod_socache_shmcb.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_shmcb.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_shmcb.obj" \
      +	"$(INTDIR)\mod_socache_shmcb.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_shmcb.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_socache_shmcb.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_shmcb.so"
      +   if exist .\Release\mod_socache_shmcb.so.manifest mt.exe -manifest .\Release\mod_socache_shmcb.so.manifest -outputresource:.\Release\mod_socache_shmcb.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_socache_shmcb.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_socache_shmcb.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_socache_shmcb.obj"
      +	-@erase "$(INTDIR)\mod_socache_shmcb.res"
      +	-@erase "$(INTDIR)\mod_socache_shmcb_src.idb"
      +	-@erase "$(INTDIR)\mod_socache_shmcb_src.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.exp"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.lib"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.pdb"
      +	-@erase "$(OUTDIR)\mod_socache_shmcb.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_socache_shmcb_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_socache_shmcb.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_socache_shmcb.so" /d LONG_NAME="socache_shmcb_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_socache_shmcb.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_socache_shmcb.pdb" /debug /out:"$(OUTDIR)\mod_socache_shmcb.so" /implib:"$(OUTDIR)\mod_socache_shmcb.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_socache_shmcb.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_socache_shmcb.obj" \
      +	"$(INTDIR)\mod_socache_shmcb.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_socache_shmcb.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_socache_shmcb.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_socache_shmcb.so"
      +   if exist .\Debug\mod_socache_shmcb.so.manifest mt.exe -manifest .\Debug\mod_socache_shmcb.so.manifest -outputresource:.\Debug\mod_socache_shmcb.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_socache_shmcb.dep")
      +!INCLUDE "mod_socache_shmcb.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_socache_shmcb.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_socache_shmcb - Win32 Release" || "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_socache_shmcb - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_shmcb - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cache"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cache"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_socache_shmcb - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cache"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cache"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_socache_shmcb - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_socache_shmcb.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_shmcb.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_socache_shmcb.so" /d LONG_NAME="socache_shmcb_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_socache_shmcb - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_socache_shmcb.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_socache_shmcb.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_socache_shmcb.so" /d LONG_NAME="socache_shmcb_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_socache_shmcb.c
      +
      +"$(INTDIR)\mod_socache_shmcb.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cluster/README.heartbeat b/modules/cluster/README.heartbeat
      index e216db67990..5eec5495d69 100644
      --- a/modules/cluster/README.heartbeat
      +++ b/modules/cluster/README.heartbeat
      @@ -14,7 +14,7 @@ Consuming:
         Every 1 second, this module generates a single multicast UDP packet,
         containing the number of busy and idle workers.
         
      -  The packet is a simple ASCII format, similiar to GET query parameters in UDP.
      +  The packet is a simple ASCII format, similar to GET query parameters in UDP.
         
         An Example packet:
           v=1&ready=75&busy=0
      diff --git a/modules/cluster/config5.m4 b/modules/cluster/config5.m4
      index a925f872059..86673167742 100644
      --- a/modules/cluster/config5.m4
      +++ b/modules/cluster/config5.m4
      @@ -11,7 +11,7 @@ case "$host" in
           ;;
       esac
       
      -APACHE_MODULE(heartbeat, Generates Heartbeats, $heartbeat_objects, , )
      +APACHE_MODULE(heartbeat, Generates Heartbeats, $heartbeat_objects, , , , watchdog)
       APACHE_MODULE(heartmonitor, Collects Heartbeats, , , )
       
       APACHE_MODPATH_FINISH
      diff --git a/modules/cluster/mod_heartbeat.c b/modules/cluster/mod_heartbeat.c
      index 45d7c6be524..1dc4a915ccb 100644
      --- a/modules/cluster/mod_heartbeat.c
      +++ b/modules/cluster/mod_heartbeat.c
      @@ -86,21 +86,21 @@ static int hb_monitor(hb_ctx_t *ctx, apr_pool_t *p)
                                      SOCK_DGRAM, APR_PROTO_UDP, p);
               if (rv) {
                   ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
      -                         NULL, "Heartbeat: apr_socket_create failed");
      +                         NULL, APLOGNO(02097) "Heartbeat: apr_socket_create failed");
                   break;
               }
       
               rv = apr_mcast_loopback(sock, 1);
               if (rv) {
                   ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
      -                         NULL, "Heartbeat: apr_mcast_loopback failed");
      +                         NULL, APLOGNO(02098) "Heartbeat: apr_mcast_loopback failed");
                   break;
               }
       
               rv = apr_socket_sendto(sock, ctx->mcast_addr, 0, buf, &len);
               if (rv) {
                   ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
      -                         NULL, "Heartbeat: apr_socket_sendto failed");
      +                         NULL, APLOGNO(02099) "Heartbeat: apr_socket_sendto failed");
                   break;
               }
           } while (0);
      diff --git a/modules/cluster/mod_heartbeat.dep b/modules/cluster/mod_heartbeat.dep
      new file mode 100644
      index 00000000000..d95401f8ad6
      --- /dev/null
      +++ b/modules/cluster/mod_heartbeat.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_heartbeat.mak
      +
      +.\mod_heartbeat.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\core\mod_watchdog.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/cluster/mod_heartbeat.mak b/modules/cluster/mod_heartbeat.mak
      new file mode 100644
      index 00000000000..7ce22c7f457
      --- /dev/null
      +++ b/modules/cluster/mod_heartbeat.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_heartbeat.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_heartbeat - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_heartbeat - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_heartbeat - Win32 Release" && "$(CFG)" != "mod_heartbeat - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_heartbeat.mak" CFG="mod_heartbeat - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_heartbeat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_heartbeat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_watchdog - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_watchdog - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_heartbeat.obj"
      +	-@erase "$(INTDIR)\mod_heartbeat.res"
      +	-@erase "$(INTDIR)\mod_heartbeat_src.idb"
      +	-@erase "$(INTDIR)\mod_heartbeat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_heartbeat.exp"
      +	-@erase "$(OUTDIR)\mod_heartbeat.lib"
      +	-@erase "$(OUTDIR)\mod_heartbeat.pdb"
      +	-@erase "$(OUTDIR)\mod_heartbeat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_heartbeat_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_heartbeat.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_heartbeat.so" /d LONG_NAME="heartbeat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_heartbeat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_heartbeat.pdb" /debug /out:"$(OUTDIR)\mod_heartbeat.so" /implib:"$(OUTDIR)\mod_heartbeat.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_heartbeat.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_heartbeat.obj" \
      +	"$(INTDIR)\mod_heartbeat.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"..\core\Release\mod_watchdog.lib"
      +
      +"$(OUTDIR)\mod_heartbeat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_heartbeat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_heartbeat.so"
      +   if exist .\Release\mod_heartbeat.so.manifest mt.exe -manifest .\Release\mod_heartbeat.so.manifest -outputresource:.\Release\mod_heartbeat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_watchdog - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_watchdog - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_heartbeat.obj"
      +	-@erase "$(INTDIR)\mod_heartbeat.res"
      +	-@erase "$(INTDIR)\mod_heartbeat_src.idb"
      +	-@erase "$(INTDIR)\mod_heartbeat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_heartbeat.exp"
      +	-@erase "$(OUTDIR)\mod_heartbeat.lib"
      +	-@erase "$(OUTDIR)\mod_heartbeat.pdb"
      +	-@erase "$(OUTDIR)\mod_heartbeat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_heartbeat_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_heartbeat.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_heartbeat.so" /d LONG_NAME="heartbeat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_heartbeat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_heartbeat.pdb" /debug /out:"$(OUTDIR)\mod_heartbeat.so" /implib:"$(OUTDIR)\mod_heartbeat.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_heartbeat.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_heartbeat.obj" \
      +	"$(INTDIR)\mod_heartbeat.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"..\core\Debug\mod_watchdog.lib"
      +
      +"$(OUTDIR)\mod_heartbeat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_heartbeat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_heartbeat.so"
      +   if exist .\Debug\mod_heartbeat.so.manifest mt.exe -manifest .\Debug\mod_heartbeat.so.manifest -outputresource:.\Debug\mod_heartbeat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_heartbeat.dep")
      +!INCLUDE "mod_heartbeat.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_heartbeat.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_heartbeat - Win32 Release" || "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +SOURCE=.\mod_heartbeat.c
      +
      +"$(INTDIR)\mod_heartbeat.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cluster"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cluster"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cluster"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cluster"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cluster"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cluster"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +"mod_watchdog - Win32 Release" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Release" 
      +   cd "..\cluster"
      +
      +"mod_watchdog - Win32 ReleaseCLEAN" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +"mod_watchdog - Win32 Debug" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Debug" 
      +   cd "..\cluster"
      +
      +"mod_watchdog - Win32 DebugCLEAN" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\cluster"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_heartbeat - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_heartbeat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_heartbeat.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_heartbeat.so" /d LONG_NAME="heartbeat_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_heartbeat - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_heartbeat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_heartbeat.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_heartbeat.so" /d LONG_NAME="heartbeat_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c
      index b6cdb52cd97..965fef58992 100644
      --- a/modules/cluster/mod_heartmonitor.c
      +++ b/modules/cluster/mod_heartmonitor.c
      @@ -81,45 +81,45 @@ static apr_status_t hm_listen(hm_ctx_t *ctx)
                                  SOCK_DGRAM, APR_PROTO_UDP, ctx->p);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to create listening socket.");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02068)
      +                     "Failed to create listening socket.");
               return rv;
           }
       
           rv = apr_socket_opt_set(ctx->sock, APR_SO_REUSEADDR, 1);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to set APR_SO_REUSEADDR to 1 on socket.");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02069)
      +                     "Failed to set APR_SO_REUSEADDR to 1 on socket.");
               return rv;
           }
       
       
           rv = apr_socket_opt_set(ctx->sock, APR_SO_NONBLOCK, 1);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to set APR_SO_NONBLOCK to 1 on socket.");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02070)
      +                     "Failed to set APR_SO_NONBLOCK to 1 on socket.");
               return rv;
           }
       
           rv = apr_socket_bind(ctx->sock, ctx->mcast_addr);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to bind on socket.");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02071)
      +                     "Failed to bind on socket.");
               return rv;
           }
       
           rv = apr_mcast_join(ctx->sock, ctx->mcast_addr, NULL, NULL);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to join multicast group");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02072)
      +                     "Failed to join multicast group");
               return rv;
           }
       
           rv = apr_mcast_loopback(ctx->sock, 1);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Failed to accept localhost mulitcast on socket.");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02073)
      +                     "Failed to accept localhost mulitcast on socket.");
               return rv;
           }
       
      @@ -155,7 +155,7 @@ static void qs_to_table(const char *input, apr_table_t *parms,
               ap_unescape_url(value);
               apr_table_set(parms, key, value);
               /*
      -           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03182)
                  "Found query arg: %s = %s", key, value);
                */
               key = apr_strtok(NULL, "&", &strtok_state);
      @@ -240,8 +240,8 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
           rv = apr_file_mktemp(&fp, path, APR_CREATE | APR_WRITE, pool);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to open tmp file: %s", path);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02074)
      +                     "Unable to open tmp file: %s", path);
               return rv;
           }
           rv = apr_file_open(&fpin, ctx->storage_path, APR_READ|APR_BINARY|APR_BUFFERED,
      @@ -251,14 +251,14 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
           if (rv == APR_SUCCESS) {
               char *t;
               apr_table_t *hbt = apr_table_make(pool, 10);
      -        apr_bucket_alloc_t *ba = apr_bucket_alloc_create(pool);
      +        apr_bucket_alloc_t *ba;
               apr_bucket_brigade *bb;
               apr_bucket_brigade *tmpbb;
       
               rv = apr_file_info_get(&fi, APR_FINFO_SIZE | APR_FINFO_MTIME, fpin);
               if (rv) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                         "Heartmonitor: Unable to read file: %s", ctx->storage_path);
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02075)
      +                         "Unable to read file: %s", ctx->storage_path);
                   return rv;
               }
       
      @@ -272,6 +272,7 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
                   char buf[4096];
                   const char *ip;
                   apr_size_t bsize = sizeof(buf);
      +
                   apr_brigade_cleanup(tmpbb);
                   if (APR_BRIGADE_EMPTY(bb)) {
                       break;
      @@ -280,8 +281,8 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
                                               APR_BLOCK_READ, sizeof(buf));
       
                   if (rv) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                             "Heartmonitor: Unable to read from file: %s", ctx->storage_path);
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02076)
      +                             "Unable to read from file: %s", ctx->storage_path);
                       return rv;
                   }
       
      @@ -292,46 +293,56 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
                   buf[bsize - 1] = 0;
                   t = strchr(buf, ' ');
                   if (t) {
      -                ip = apr_pstrndup(pool, buf, t - buf);
      -            } else {
      +                ip = apr_pstrmemdup(pool, buf, t - buf);
      +            }
      +            else {
                       ip = NULL;
                   }
      +
                   if (!ip || buf[0] == '#') {
                       /* copy things we can't process */
                       apr_file_printf(fp, "%s\n", buf);
      -            } else if (strcmp(ip, s->ip) !=0 ) {
      +            }
      +            else if (strcmp(ip, s->ip) != 0 ) {
                       hm_server_t node;
                       apr_time_t seen;
      +                const char *val;
      +
                       /* Update seen time according to the last file modification */
                       apr_table_clear(hbt);
                       qs_to_table(apr_pstrdup(pool, t), hbt, pool);
      -                if (apr_table_get(hbt, "busy")) {
      -                    node.busy = atoi(apr_table_get(hbt, "busy"));
      -                } else {
      +                if ((val = apr_table_get(hbt, "busy"))) {
      +                    node.busy = atoi(val);
      +                }
      +                else {
                           node.busy = 0;
                       }
       
      -                if (apr_table_get(hbt, "ready")) {
      -                    node.ready = atoi(apr_table_get(hbt, "ready"));
      -                } else {
      +                if ((val = apr_table_get(hbt, "ready"))) {
      +                    node.ready = atoi(val);
      +                }
      +                else {
                           node.ready = 0;
                       }
       
      -                if (apr_table_get(hbt, "lastseen")) {
      -                    node.seen = atoi(apr_table_get(hbt, "lastseen"));
      -                } else {
      +                if ((val = apr_table_get(hbt, "lastseen"))) {
      +                    node.seen = atoi(val);
      +                }
      +                else {
                           node.seen = SEEN_TIMEOUT;
                       }
                       seen = fage + node.seen;
       
      -                if (apr_table_get(hbt, "port")) {
      -                    node.port = atoi(apr_table_get(hbt, "port"));
      -                } else {
      +                if ((val = apr_table_get(hbt, "port"))) {
      +                    node.port = atoi(val);
      +                }
      +                else {
                           node.port = 80;
                       }
                       apr_file_printf(fp, "%s &ready=%u&busy=%u&lastseen=%u&port=%u\n",
                                       ip, node.ready, node.busy, (unsigned int) seen, node.port);
      -            } else {
      +            }
      +            else {
                       apr_time_t seen;
                       seen = apr_time_sec(now - s->seen);
                       apr_file_printf(fp, "%s &ready=%u&busy=%u&lastseen=%u&port=%u\n",
      @@ -350,15 +361,15 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
       
           rv = apr_file_flush(fp);
           if (rv) {
      -      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                   "Heartmonitor: Unable to flush file: %s", path);
      +      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02077)
      +                   "Unable to flush file: %s", path);
             return rv;
           }
       
           rv = apr_file_close(fp);
           if (rv) {
      -      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                   "Heartmonitor: Unable to close file: %s", path);
      +      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02078)
      +                   "Unable to close file: %s", path);
             return rv;
           }
       
      @@ -366,8 +377,8 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
                                   APR_FPROT_UREAD | APR_FPROT_GREAD |
                                   APR_FPROT_WREAD);
           if (rv && rv != APR_INCOMPLETE && rv != APR_ENOTIMPL) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to set file permissions on %s",
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02079)
      +                     "Unable to set file permissions on %s",
                            path);
               return rv;
           }
      @@ -375,8 +386,8 @@ static apr_status_t hm_file_update_stat(hm_ctx_t *ctx, hm_server_t *s, apr_pool_
           rv = apr_file_rename(path, ctx->storage_path, pool);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to move file: %s -> %s", path,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02080)
      +                     "Unable to move file: %s -> %s", path,
                            ctx->storage_path);
               return rv;
           }
      @@ -403,8 +414,8 @@ static apr_status_t hm_file_update_stats(hm_ctx_t *ctx, apr_pool_t *p)
           rv = apr_file_mktemp(&fp, path, APR_CREATE | APR_WRITE, p);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to open tmp file: %s", path);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02081)
      +                     "Unable to open tmp file: %s", path);
               return rv;
           }
       
      @@ -429,15 +440,15 @@ static apr_status_t hm_file_update_stats(hm_ctx_t *ctx, apr_pool_t *p)
       
           rv = apr_file_flush(fp);
           if (rv) {
      -      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                   "Heartmonitor: Unable to flush file: %s", path);
      +      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02082)
      +                   "Unable to flush file: %s", path);
             return rv;
           }
       
           rv = apr_file_close(fp);
           if (rv) {
      -      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                   "Heartmonitor: Unable to close file: %s", path);
      +      ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02083)
      +                   "Unable to close file: %s", path);
             return rv;
           }
       
      @@ -445,8 +456,8 @@ static apr_status_t hm_file_update_stats(hm_ctx_t *ctx, apr_pool_t *p)
                                   APR_FPROT_UREAD | APR_FPROT_GREAD |
                                   APR_FPROT_WREAD);
           if (rv && rv != APR_INCOMPLETE && rv != APR_ENOTIMPL) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to set file permissions on %s",
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02084)
      +                     "Unable to set file permissions on %s",
                            path);
               return rv;
           }
      @@ -454,8 +465,8 @@ static apr_status_t hm_file_update_stats(hm_ctx_t *ctx, apr_pool_t *p)
           rv = apr_file_rename(path, ctx->storage_path, p);
       
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: Unable to move file: %s -> %s", path,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02085)
      +                     "Unable to move file: %s -> %s", path,
                            ctx->storage_path);
               return rv;
           }
      @@ -534,8 +545,8 @@ static void hm_processmsg(hm_ctx_t *ctx, apr_pool_t *p,
               int port = 80;
               hm_server_t *s;
               /* TODO: REMOVE ME BEFORE PRODUCTION (????) */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s,
      -                     "Heartmonitor: %pI busy=%s ready=%s", from,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(02086)
      +                     "%pI busy=%s ready=%s", from,
                            apr_table_get(tbl, "busy"), apr_table_get(tbl, "ready"));
       
               apr_sockaddr_ip_get(&ip, from);
      @@ -550,8 +561,8 @@ static void hm_processmsg(hm_ctx_t *ctx, apr_pool_t *p,
               s->seen = apr_time_now();
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ctx->s,
      -                     "Heartmonitor: malformed message from %pI",
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ctx->s, APLOGNO(02087)
      +                     "malformed message from %pI",
                            from);
           }
       
      @@ -570,13 +581,11 @@ static apr_status_t hm_recv(hm_ctx_t *ctx, apr_pool_t *p)
           rv = apr_socket_recvfrom(&from, ctx->sock, 0, buf, &len);
       
           if (APR_STATUS_IS_EAGAIN(rv)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: would block");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02088) "would block");
               return APR_SUCCESS;
           }
           else if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                     "Heartmonitor: recvfrom failed");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02089) "recvfrom failed");
               return rv;
           }
       
      @@ -601,13 +610,13 @@ static apr_status_t hm_watchdog_callback(int state, void *data,
                   rv = hm_listen(ctx);
                   if (rv) {
                       ctx->status = rv;
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s,
      -                             "Heartmonitor: Unable to listen for connections!");
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ctx->s, APLOGNO(02090)
      +                             "Unable to listen for connections!");
                   }
                   else {
                       ctx->keep_running = 1;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s,
      -                             "Heartmonitor: %s listener started.",
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(02091)
      +                             "%s listener started.",
                                    HM_WATHCHDOG_NAME);
                   }
               break;
      @@ -648,8 +657,8 @@ static apr_status_t hm_watchdog_callback(int state, void *data,
                   }
               break;
               case AP_WATCHDOG_STATE_STOPPING:
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s,
      -                         "Heartmonitor: stopping %s listener.",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(02092)
      +                         "stopping %s listener.",
                                HM_WATHCHDOG_NAME);
       
                   ctx->keep_running = 0;
      @@ -674,8 +683,8 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
           hm_watchdog_get_instance = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_get_instance);
           hm_watchdog_register_callback = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_register_callback);
           if (!hm_watchdog_get_instance || !hm_watchdog_register_callback) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "Heartmonitor: mod_watchdog is required");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(02093)
      +                     "mod_watchdog is required");
               return !OK;
           }
       
      @@ -683,15 +692,19 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
           if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_CONFIG) {
               /* this is the real thing */
               if (maxworkers) {
      -            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
      +            storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
                                                AP_SLOTMEM_PROVIDER_VERSION);
                   if (!storage) {
      -                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02284)
      +                             "failed to lookup provider 'shm' for '%s', "
      +                             "maybe you need to load mod_slotmem_shm?",
      +                             AP_SLOTMEM_PROVIDER_GROUP);
                       return !OK;
                   }
                   storage->create(&slotmem, "mod_heartmonitor", sizeof(hm_slot_server_t), maxworkers, AP_SLOTMEM_TYPE_PREGRAB, p);
                   if (!slotmem) {
      -                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "slotmem_create for status failed");
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02285)
      +                             "slotmem_create for status failed");
                       return !OK;
                   }
               }
      @@ -704,9 +717,9 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
                                         HM_WATHCHDOG_NAME,
                                         0, 1, p);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                     "Heartmonitor: Failed to create watchdog "
      -                     "instance (%s)", HM_WATHCHDOG_NAME);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(02094)
      +                     "Failed to create watchdog instance (%s)",
      +                     HM_WATHCHDOG_NAME);
               return !OK;
           }
           /* Register a callback with zero interval. */
      @@ -715,13 +728,13 @@ static int hm_post_config(apr_pool_t *p, apr_pool_t *plog,
                                              ctx,
                                              hm_watchdog_callback);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                     "Heartmonitor: Failed to register watchdog "
      -                     "callback (%s)", HM_WATHCHDOG_NAME);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(02095)
      +                     "Failed to register watchdog callback (%s)",
      +                     HM_WATHCHDOG_NAME);
               return !OK;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "Heartmonitor: wd callback %s", HM_WATHCHDOG_NAME);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02096)
      +                 "wd callback %s", HM_WATHCHDOG_NAME);
           return OK;
       }
       
      @@ -751,7 +764,7 @@ static int hm_handler(request_rec *r)
           input_brigade = apr_brigade_create(r->connection->pool, r->connection->bucket_alloc);
           status = ap_get_brigade(r->input_filters, input_brigade, AP_MODE_READBYTES, APR_BLOCK_READ, MAX_MSG_LEN);
           if (status != APR_SUCCESS) {
      -        return HTTP_INTERNAL_SERVER_ERROR;
      +        return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
           }
           apr_brigade_flatten(input_brigade, buf, &len);
       
      @@ -759,7 +772,7 @@ static int hm_handler(request_rec *r)
           buf[len] = '\0';
           tbl = apr_table_make(r->pool, 10);
           qs_to_table(buf, tbl, r->pool);
      -    apr_sockaddr_ip_get(&ip, r->connection->remote_addr);
      +    apr_sockaddr_ip_get(&ip, r->connection->client_addr);
           hmserver.ip = ip;
           hmserver.port = 80;
           if (apr_table_get(tbl, "port") != NULL)
      @@ -790,7 +803,7 @@ static void *hm_create_config(apr_pool_t *p, server_rec *s)
           hm_ctx_t *ctx = (hm_ctx_t *) apr_palloc(p, sizeof(hm_ctx_t));
       
           ctx->active = 0;
      -    ctx->storage_path = ap_server_root_relative(p, "logs/hb.dat");
      +    ctx->storage_path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
           /* TODO: Add directive for tuning the update interval
            */
           ctx->interval = apr_time_from_sec(HM_UPDATE_SEC);
      @@ -814,7 +827,7 @@ static const char *cmd_hm_storage(cmd_parms *cmd,
               return err;
           }
       
      -    ctx->storage_path = ap_server_root_relative(p, path);
      +    ctx->storage_path = ap_runtime_dir_relative(p, path);
       
           return NULL;
       }
      diff --git a/modules/cluster/mod_heartmonitor.dep b/modules/cluster/mod_heartmonitor.dep
      new file mode 100644
      index 00000000000..266efbf3a95
      --- /dev/null
      +++ b/modules/cluster/mod_heartmonitor.dep
      @@ -0,0 +1,63 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_heartmonitor.mak
      +
      +.\mod_heartmonitor.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\heartbeat.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\core\mod_watchdog.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/cluster/mod_heartmonitor.mak b/modules/cluster/mod_heartmonitor.mak
      new file mode 100644
      index 00000000000..2d935d5721a
      --- /dev/null
      +++ b/modules/cluster/mod_heartmonitor.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_heartmonitor.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_heartmonitor - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_heartmonitor - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_heartmonitor - Win32 Release" && "$(CFG)" != "mod_heartmonitor - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_heartmonitor.mak" CFG="mod_heartmonitor - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_heartmonitor - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_heartmonitor - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_heartmonitor.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_watchdog - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_heartmonitor.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_watchdog - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_heartmonitor.obj"
      +	-@erase "$(INTDIR)\mod_heartmonitor.res"
      +	-@erase "$(INTDIR)\mod_heartmonitor_src.idb"
      +	-@erase "$(INTDIR)\mod_heartmonitor_src.pdb"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.exp"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.lib"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.pdb"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_heartmonitor_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_heartmonitor.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_heartmonitor.so" /d LONG_NAME="heartmonitor_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_heartmonitor.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_heartmonitor.pdb" /debug /out:"$(OUTDIR)\mod_heartmonitor.so" /implib:"$(OUTDIR)\mod_heartmonitor.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_heartmonitor.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_heartmonitor.obj" \
      +	"$(INTDIR)\mod_heartmonitor.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"..\core\Release\mod_watchdog.lib"
      +
      +"$(OUTDIR)\mod_heartmonitor.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_heartmonitor.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_heartmonitor.so"
      +   if exist .\Release\mod_heartmonitor.so.manifest mt.exe -manifest .\Release\mod_heartmonitor.so.manifest -outputresource:.\Release\mod_heartmonitor.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_heartmonitor.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_watchdog - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_heartmonitor.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_watchdog - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_heartmonitor.obj"
      +	-@erase "$(INTDIR)\mod_heartmonitor.res"
      +	-@erase "$(INTDIR)\mod_heartmonitor_src.idb"
      +	-@erase "$(INTDIR)\mod_heartmonitor_src.pdb"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.exp"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.lib"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.pdb"
      +	-@erase "$(OUTDIR)\mod_heartmonitor.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_heartmonitor_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_heartmonitor.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_heartmonitor.so" /d LONG_NAME="heartmonitor_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_heartmonitor.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_heartmonitor.pdb" /debug /out:"$(OUTDIR)\mod_heartmonitor.so" /implib:"$(OUTDIR)\mod_heartmonitor.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_heartmonitor.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_heartmonitor.obj" \
      +	"$(INTDIR)\mod_heartmonitor.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"..\core\Debug\mod_watchdog.lib"
      +
      +"$(OUTDIR)\mod_heartmonitor.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_heartmonitor.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_heartmonitor.so"
      +   if exist .\Debug\mod_heartmonitor.so.manifest mt.exe -manifest .\Debug\mod_heartmonitor.so.manifest -outputresource:.\Debug\mod_heartmonitor.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_heartmonitor.dep")
      +!INCLUDE "mod_heartmonitor.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_heartmonitor.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_heartmonitor - Win32 Release" || "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +SOURCE=.\mod_heartmonitor.c
      +
      +"$(INTDIR)\mod_heartmonitor.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\cluster"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\cluster"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\cluster"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\cluster"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\cluster"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\cluster"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\cluster"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +"mod_watchdog - Win32 Release" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Release" 
      +   cd "..\cluster"
      +
      +"mod_watchdog - Win32 ReleaseCLEAN" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\cluster"
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +"mod_watchdog - Win32 Debug" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Debug" 
      +   cd "..\cluster"
      +
      +"mod_watchdog - Win32 DebugCLEAN" : 
      +   cd ".\..\core"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_watchdog.mak" CFG="mod_watchdog - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\cluster"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_heartmonitor - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_heartmonitor.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_heartmonitor.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_heartmonitor.so" /d LONG_NAME="heartmonitor_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_heartmonitor - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_heartmonitor.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_heartmonitor.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_heartmonitor.so" /d LONG_NAME="heartmonitor_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/config5.m4 b/modules/config7.m4
      similarity index 97%
      rename from modules/config5.m4
      rename to modules/config7.m4
      index 7dd021ee29a..16f2ff3630b 100644
      --- a/modules/config5.m4
      +++ b/modules/config7.m4
      @@ -3,7 +3,7 @@ AC_ARG_WITH(module,
         APACHE_HELP_STRING(--with-module=module-type:module-file,
                            Enable module-file in the modules/<module-type> directory.),
         [
      -    as_save_IFS="$IFS"; IFS=","
      +    withval=`echo $withval | sed -e 's/,/ /g'`
           for mod in $withval
           do
             modtype=`echo $mod | sed -e's/\(.*\):.*/\1/'`
      @@ -51,7 +51,6 @@ EOF
           if test ! -z "$EXTRA_MODLIST"; then
             AC_MSG_RESULT(added:$EXTRA_MODLIST)
           fi
      -    IFS="$as_save_IFS"
         ],
         [ AC_MSG_RESULT(none) 
         ])
      diff --git a/modules/experimental/NWGNUnoloris b/modules/core/NWGNUmakefile
      similarity index 94%
      rename from modules/experimental/NWGNUnoloris
      rename to modules/core/NWGNUmakefile
      index d1a9a96c046..a4dd8d32e92 100644
      --- a/modules/experimental/NWGNUnoloris
      +++ b/modules/core/NWGNUmakefile
      @@ -26,7 +26,7 @@ include $(AP_WORK)/build/NWGNUhead.inc
       XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
      -			$(AP_WORK)/include \
      +			$(SRC)/include \
       			$(NWOS) \
       			$(EOLIST)
       
      @@ -99,19 +99,19 @@ endif
       # This is used by the link 'name' directive to name the nlm.  If left blank
       # TARGET_nlm (see below) will be used.
       #
      -NLM_NAME	= noloris
      +NLM_NAME	= macro
       
       #
       # This is used by the link '-desc ' directive.
       # If left blank, NLM_NAME will be used.
       #
      -NLM_DESCRIPTION	= Apache $(VERSION_STR) No-Slowloris Module
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Macro Module
       
       #
       # This is used by the '-threadname' directive.  If left blank,
       # NLM_NAME Thread will be used.
       #
      -NLM_THREAD_NAME	= $(NLM_NAME) Module
      +NLM_THREAD_NAME	= Echo Module
       
       #
       # If this is specified, it will override VERSION value in
      @@ -156,7 +156,7 @@ XDCDATA		=
       # If there is an NLM target, put it here
       #
       TARGET_nlm = \
      -	$(OBJDIR)/$(NLM_NAME).nlm \
      +	$(OBJDIR)/macro.nlm \
       	$(EOLIST)
       
       #
      @@ -170,7 +170,7 @@ TARGET_lib = \
       # Paths must all use the '/' character
       #
       FILES_nlm_objs = \
      -	$(OBJDIR)/mod_noloris.o \
      +	$(OBJDIR)/mod_macro.o \
       	$(EOLIST)
       
       #
      @@ -218,7 +218,7 @@ FILES_nlm_Ximports = \
       # Any symbols exported to here
       #
       FILES_nlm_exports = \
      -	noloris_module \
      +	macro_module \
       	$(EOLIST)
       
       #
      @@ -241,6 +241,7 @@ nlms :: libs $(TARGET_nlm)
       # correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
       #
       install :: nlms FORCE
      +	$(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
       
       #
       # Any specialized rules here
      diff --git a/modules/core/config.m4 b/modules/core/config.m4
      index e2799c91a94..94fb4a12483 100644
      --- a/modules/core/config.m4
      +++ b/modules/core/config.m4
      @@ -45,7 +45,7 @@ fi
       
       APACHE_MODULE(so, DSO capability.  This module will be automatically enabled unless you build all modules statically., , , $enable_so)
       
      -APACHE_MODULE(watchdog, Watchdog module, , , , [
      +APACHE_MODULE(watchdog, Watchdog module, , , most, [
           APR_CHECK_APR_DEFINE(APR_HAS_THREADS)
           if test $ac_cv_define_APR_HAS_THREADS = "no"; then
               AC_MSG_WARN([mod_watchdog requires apr to be built with --enable-threads])
      @@ -53,6 +53,8 @@ APACHE_MODULE(watchdog, Watchdog module, , , , [
           fi
       ])
       
      +APACHE_MODULE(macro, Define and use macros in configuration files, , , most)
      +
       APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
       
       APACHE_MODPATH_FINISH
      diff --git a/modules/core/mod_macro.c b/modules/core/mod_macro.c
      new file mode 100644
      index 00000000000..dae4fcd2971
      --- /dev/null
      +++ b/modules/core/mod_macro.c
      @@ -0,0 +1,955 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "httpd.h"
      +#include "http_config.h"
      +#include "http_log.h"
      +
      +#include "apr.h"
      +#include "apr_strings.h"
      +#include "apr_hash.h"
      +
      +/************************************************ COMPILE TIME DEBUG CONTROL */
      +/*
      +   debug:
      +   #define MOD_MACRO_DEBUG 1
      +
      +   gdb:
      +   run -f ./test/conf/test??.conf
      +*/
      +/* #define MOD_MACRO_DEBUG 1 */
      +#undef MOD_MACRO_DEBUG
      +
      +#if defined(debug)
      +#undef debug
      +#endif /* debug */
      +
      +#if defined(MOD_MACRO_DEBUG)
      +#define debug(stmt) stmt
      +#else
      +#define debug(stmt)
      +#endif /* MOD_MACRO_DEBUG */
      +
      +/******************************************************** MODULE DECLARATION */
      +
      +module AP_MODULE_DECLARE_DATA macro_module;
      +
      +/********************************************************** MACRO MANAGEMENT */
      +
      +/*
      +  this is a macro: name, arguments, contents, location.
      +*/
      +typedef struct
      +{
      +    char *name;                    /* lower case name of the macro */
      +    apr_array_header_t *arguments; /* of char*, macro parameter names */
      +    apr_array_header_t *contents;  /* of char*, macro body */
      +    char *location;                /* of macro definition, for error messages */
      +} ap_macro_t;
      +
      +/* configuration tokens.
      + */
      +#define BEGIN_MACRO "<Macro"
      +#define END_MACRO   "</Macro>"
      +#define USE_MACRO   "Use"
      +#define UNDEF_MACRO "UndefMacro"
      +
      +/*
      +  Macros are kept globally...
      +  They are not per-server or per-directory entities.
      +
      +  note: they are in a temp_pool, and there is a lazy initialization.
      +        ap_macros is reset to NULL in pre_config hook to not depend
      +        on static vs dynamic configuration.
      +
      +  hash type: (char *) name -> (ap_macro_t *) macro
      +*/
      +static apr_hash_t *ap_macros = NULL;
      +
      +/*************************************************************** PARSE UTILS */
      +
      +#define empty_string_p(p) (!(p) || *(p) == '\0')
      +#define trim(line) while (*(line) == ' ' || *(line) == '\t') (line)++
      +
      +/*
      +  return configuration-parsed arguments from line as an array.
      +  the line is expected not to contain any '\n'?
      +*/
      +static apr_array_header_t *get_arguments(apr_pool_t * pool, const char *line)
      +{
      +    apr_array_header_t *args = apr_array_make(pool, 1, sizeof(char *));
      +
      +    trim(line);
      +    while (*line) {
      +        char *arg = ap_getword_conf(pool, &line);
      +        char **new = apr_array_push(args);
      +        *new = arg;
      +        trim(line);
      +    }
      +
      +    return args;
      +}
      +
      +/*
      +  warn if anything non blank appears, but ignore comments...
      +*/
      +static void warn_if_non_blank(const char * what,
      +                              char * ptr,
      +                              ap_configfile_t * cfg)
      +{
      +    char * p;
      +    for (p=ptr; *p; p++) {
      +        if (*p == '#')
      +            break;
      +        if (*p != ' ' && *p != '\t') {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02989)
      +                         "%s on line %d of %s: %s",
      +                         what, cfg->line_number, cfg->name, ptr);
      +            break;
      +        }
      +    }
      +}
      +
      +/*
      +  get read lines as an array till end_token.
      +  counts nesting for begin_token/end_token.
      +  it assumes a line-per-line configuration (thru getline).
      +  this function could be exported.
      +  begin_token may be NULL.
      +*/
      +static char *get_lines_till_end_token(apr_pool_t * pool,
      +                                      ap_configfile_t * config_file,
      +                                      const char *end_token,
      +                                      const char *begin_token,
      +                                      const char *where,
      +                                      apr_array_header_t ** plines)
      +{
      +    apr_array_header_t *lines = apr_array_make(pool, 1, sizeof(char *));
      +    char line[MAX_STRING_LEN];  /* sorry, but this is expected by getline:-( */
      +    int macro_nesting = 1, any_nesting = 1;
      +    int line_number_start = config_file->line_number;
      +
      +    while (!ap_cfg_getline(line, MAX_STRING_LEN, config_file)) {
      +        char *ptr = line;
      +        char *first, **new;
      +        /* skip comments */
      +        if (*line == '#')
      +            continue;
      +        first = ap_getword_conf_nc(pool, &ptr);
      +        if (first) {
      +            /* detect nesting... */
      +            if (!strncmp(first, "</", 2)) {
      +                any_nesting--;
      +                if (any_nesting < 0) {
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING,
      +                                 0, NULL, APLOGNO(02793)
      +                                 "bad (negative) nesting on line %d of %s",
      +                                 config_file->line_number - line_number_start,
      +                                 where);
      +                }
      +            }
      +            else if (!strncmp(first, "<", 1)) {
      +                any_nesting++;
      +            }
      +
      +            if (!strcasecmp(first, end_token)) {
      +                /* check for proper closing */
      +                char * endp = (char *) ap_strrchr_c(line, '>');
      +
      +                /* this cannot happen if end_token contains '>' */
      +                if (endp == NULL) {
      +                  return "end directive missing closing '>'";
      +                }
      +
      +                warn_if_non_blank(
      +                    APLOGNO(02794) "non blank chars found after directive closing",
      +                    endp+1, config_file);
      +
      +                macro_nesting--;
      +                if (!macro_nesting) {
      +                    if (any_nesting) {
      +                        ap_log_error(APLOG_MARK,
      +                                     APLOG_WARNING, 0, NULL, APLOGNO(02795)
      +                                     "bad cumulated nesting (%+d) in %s",
      +                                     any_nesting, where);
      +                    }
      +                    *plines = lines;
      +                    return NULL;
      +                }
      +            }
      +            else if (begin_token && !strcasecmp(first, begin_token)) {
      +                macro_nesting++;
      +            }
      +        }
      +        new = apr_array_push(lines);
      +        *new = apr_psprintf(pool, "%s" APR_EOL_STR, line); /* put EOL back? */
      +    }
      +
      +    return apr_psprintf(pool, "expected token not found: %s", end_token);
      +}
      +
      +/* the @* arguments are double-quote escaped when substituted */
      +#define ESCAPE_ARG '@'
      +
      +/* other $* and %* arguments are simply replaced without escaping */
      +#define ARG_PREFIX "$%@"
      +
      +/*
      +  characters allowed in an argument?
      +  not used yet, because that would trigger some backward compatibility.
      +*/
      +#define ARG_CONTENT              \
      +    "abcdefghijklmnopqrstuvwxyz"   \
      +    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"   \
      +    "0123456789_" ARG_PREFIX
      +
      +/*
      +  returns whether it looks like an argument, i.e. prefixed by ARG_PREFIX.
      +*/
      +static int looks_like_an_argument(const char *word)
      +{
      +    return ap_strchr(ARG_PREFIX, *word) != 0;
      +}
      +
      +/*
      +  generates an error on macro with two arguments of the same name.
      +  generates an error if a macro argument name is empty.
      +  generates a warning if arguments name prefixes conflict.
      +  generates a warning if the first char of an argument is not in ARG_PREFIX
      +*/
      +static const char *check_macro_arguments(apr_pool_t * pool,
      +                                         const ap_macro_t * macro)
      +{
      +    char **tab = (char **) macro->arguments->elts;
      +    int nelts = macro->arguments->nelts;
      +    int i;
      +
      +    for (i = 0; i < nelts; i++) {
      +        size_t ltabi = strlen(tab[i]);
      +        int j;
      +
      +        if (ltabi == 0) {
      +            return apr_psprintf(pool,
      +                                "macro '%s' (%s): empty argument #%d name",
      +                                macro->name, macro->location, i + 1);
      +        }
      +        else if (!looks_like_an_argument(tab[i])) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02796)
      +                         "macro '%s' (%s) "
      +                         "argument name '%s' (#%d) without expected prefix, "
      +                         "better prefix argument names with one of '%s'.",
      +                         macro->name, macro->location,
      +                         tab[i], i + 1, ARG_PREFIX);
      +        }
      +
      +        for (j = i + 1; j < nelts; j++) {
      +            size_t ltabj = strlen(tab[j]);
      +
      +            /* must not use the same argument name twice */
      +            if (!strcmp(tab[i], tab[j])) {
      +                return apr_psprintf(pool,
      +                                    "argument name conflict in macro '%s' (%s): "
      +                                    "argument '%s': #%d and #%d, "
      +                                    "change argument names!",
      +                                    macro->name, macro->location,
      +                                    tab[i], i + 1, j + 1);
      +            }
      +
      +            /* warn about common prefix, but only if non empty names */
      +            if (ltabi && ltabj &&
      +                !strncmp(tab[i], tab[j], ltabi < ltabj ? ltabi : ltabj)) {
      +                ap_log_error(APLOG_MARK, APLOG_WARNING,
      +                             0, NULL, APLOGNO(02797)
      +                             "macro '%s' (%s): "
      +                             "argument name prefix conflict (%s #%d and %s #%d), "
      +                             "be careful about your macro definition!",
      +                             macro->name, macro->location,
      +                             tab[i], i + 1, tab[j], j + 1);
      +            }
      +        }
      +    }
      +
      +    return NULL;
      +}
      +
      +/*
      +  warn about empty strings in array. could be legitimate.
      +*/
      +static void check_macro_use_arguments(const char *where,
      +                                      const apr_array_header_t * array)
      +{
      +    char **tab = (char **) array->elts;
      +    int i;
      +    for (i = 0; i < array->nelts; i++) {
      +        if (empty_string_p(tab[i])) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02798)
      +                         "%s: empty argument #%d", where, i + 1);
      +        }
      +    }
      +}
      +
      +/******************************************************** SUBSTITUTION UTILS */
      +
      +/* could be switched to '\'' */
      +#define DELIM '"'
      +#define ESCAPE '\\'
      +
      +/*
      +  returns the number of needed escapes for the string
      +*/
      +static int number_of_escapes(const char delim, const char *str)
      +{
      +    int nesc = 0;
      +    const char *s = str;
      +    while (*s) {
      +        if (*s == ESCAPE || *s == delim)
      +            nesc++;
      +        s++;
      +    }
      +    debug(fprintf(stderr, "escapes: %d ---%s---\n", nesc, str));
      +    return nesc;
      +}
      +
      +/*
      +  replace name by replacement at the beginning of buf of bufsize.
      +  returns an error message or NULL.
      +  C is not really a nice language for processing strings.
      +*/
      +static char *substitute(char *buf,
      +                        const int bufsize,
      +                        const char *name,
      +                        const char *replacement, const int do_esc)
      +{
      +    int lbuf = strlen(buf),
      +        lname = strlen(name),
      +        lrepl = strlen(replacement),
      +        lsubs = lrepl +
      +        (do_esc ? (2 + number_of_escapes(DELIM, replacement)) : 0),
      +        shift = lsubs - lname, size = lbuf + shift, i, j;
      +
      +    /* buf must starts with name */
      +    ap_assert(!strncmp(buf, name, lname));
      +
      +    /* hmmm??? */
      +    if (!strcmp(name, replacement))
      +        return NULL;
      +
      +    debug(fprintf(stderr,
      +                  "substitute(%s,%s,%s,%d,sh=%d,lbuf=%d,lrepl=%d,lsubs=%d)\n",
      +                  buf, name, replacement, do_esc, shift, lbuf, lrepl, lsubs));
      +
      +    if (size >= bufsize) {
      +        /* could/should I reallocate? */
      +        return "cannot substitute, buffer size too small";
      +    }
      +
      +    /* cannot use strcpy as strings may overlap */
      +    if (shift != 0) {
      +        memmove(buf + lname + shift, buf + lname, lbuf - lname + 1);
      +    }
      +
      +    /* insert the replacement with escapes */
      +    j = 0;
      +    if (do_esc)
      +        buf[j++] = DELIM;
      +    for (i = 0; i < lrepl; i++, j++) {
      +        if (do_esc && (replacement[i] == DELIM || replacement[i] == ESCAPE))
      +            buf[j++] = ESCAPE;
      +        buf[j] = replacement[i];
      +    }
      +    if (do_esc)
      +        buf[j++] = DELIM;
      +
      +    return NULL;
      +}
      +
      +/*
      +  find first occurrence of args in buf.
      +  in case of conflict, the LONGEST argument is kept. (could be the FIRST?).
      +  returns the pointer and the whichone found, or NULL.
      +*/
      +static char *next_substitution(const char *buf,
      +                               const apr_array_header_t * args, int *whichone)
      +{
      +    char *chosen = NULL, **tab = (char **) args->elts;
      +    size_t lchosen = 0;
      +    int i;
      +
      +    for (i = 0; i < args->nelts; i++) {
      +        char *found = ap_strstr((char *) buf, tab[i]);
      +        size_t lfound = strlen(tab[i]);
      +        if (found && (!chosen || found < chosen ||
      +                      (found == chosen && lchosen < lfound))) {
      +            chosen = found;
      +            lchosen = lfound;
      +            *whichone = i;
      +        }
      +    }
      +
      +    return chosen;
      +}
      +
      +/*
      +  substitute macro arguments by replacements in buf of bufsize.
      +  returns an error message or NULL.
      +  if used is defined, returns the used macro arguments.
      +*/
      +static const char *substitute_macro_args(
      +    char *buf,
      +    int bufsize,
      +    const ap_macro_t * macro,
      +    const apr_array_header_t * replacements,
      +    apr_array_header_t * used)
      +{
      +    char *ptr = buf,
      +        **atab = (char **) macro->arguments->elts,
      +        **rtab = (char **) replacements->elts;
      +    int whichone = -1;
      +
      +    if (used) {
      +        ap_assert(used->nalloc >= replacements->nelts);
      +    }
      +    debug(fprintf(stderr, "1# %s", buf));
      +
      +    while ((ptr = next_substitution(ptr, macro->arguments, &whichone))) {
      +        const char *errmsg = substitute(ptr, buf - ptr + bufsize,
      +                                        atab[whichone], rtab[whichone],
      +                                        atab[whichone][0] == ESCAPE_ARG);
      +        if (errmsg) {
      +            return errmsg;
      +        }
      +        ptr += strlen(rtab[whichone]);
      +        if (used) {
      +            used->elts[whichone] = 1;
      +        }
      +    }
      +    debug(fprintf(stderr, "2# %s", buf));
      +
      +    return NULL;
      +}
      +
      +/*
      +  perform substitutions in a macro contents and
      +  return the result as a newly allocated array, if result is defined.
      +  may also return an error message.
      +  passes used down to substitute_macro_args.
      +*/
      +static const char *process_content(apr_pool_t * pool,
      +                                   const ap_macro_t * macro,
      +                                   const apr_array_header_t * replacements,
      +                                   apr_array_header_t * used,
      +                                   apr_array_header_t ** result)
      +{
      +    apr_array_header_t *contents = macro->contents;
      +    char line[MAX_STRING_LEN];
      +    int i;
      +
      +    if (result) {
      +        *result = apr_array_make(pool, contents->nelts, sizeof(char *));
      +    }
      +
      +    /* for each line of the macro body */
      +    for (i = 0; i < contents->nelts; i++) {
      +        const char *errmsg;
      +        /* copy the line and substitute macro parameters */
      +        strncpy(line, ((char **) contents->elts)[i], MAX_STRING_LEN - 1);
      +        errmsg = substitute_macro_args(line, MAX_STRING_LEN,
      +                                       macro, replacements, used);
      +        if (errmsg) {
      +            return apr_psprintf(pool,
      +                               "while processing line %d of macro '%s' (%s) %s",
      +                                i + 1, macro->name, macro->location, errmsg);
      +        }
      +        /* append substituted line to result array */
      +        if (result) {
      +            char **new = apr_array_push(*result);
      +            *new = apr_pstrdup(pool, line);
      +        }
      +    }
      +
      +    return NULL;
      +}
      +
      +/*
      +  warn if some macro arguments are not used.
      +*/
      +static const char *check_macro_contents(apr_pool_t * pool,
      +                                        const ap_macro_t * macro)
      +{
      +    int nelts = macro->arguments->nelts;
      +    char **names = (char **) macro->arguments->elts;
      +    apr_array_header_t *used;
      +    int i;
      +    const char *errmsg;
      +
      +    if (macro->contents->nelts == 0) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02799)
      +                     "macro '%s' (%s): empty contents!",
      +                     macro->name, macro->location);
      +        return NULL;            /* no need to further warnings... */
      +    }
      +
      +    used = apr_array_make(pool, nelts, sizeof(char));
      +
      +    for (i = 0; i < nelts; i++) {
      +        used->elts[i] = 0;
      +    }
      +
      +    errmsg = process_content(pool, macro, macro->arguments, used, NULL);
      +
      +    if (errmsg) {
      +        return errmsg;
      +    }
      +
      +    for (i = 0; i < nelts; i++) {
      +        if (!used->elts[i]) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02800)
      +                         "macro '%s' (%s): argument '%s' (#%d) never used",
      +                         macro->name, macro->location, names[i], i + 1);
      +        }
      +    }
      +
      +    return NULL;
      +}
      +
      +
      +/************************************************** MACRO PSEUDO CONFIG FILE */
      +
      +/*
      +  The expanded content of the macro is to be parsed as a ap_configfile_t.
      +  This is used to have some kind of old fashionned C object oriented inherited
      +  data structure for configs.
      +
      +  The following struct stores the contents.
      +
      +  This structure holds pointers (next, upper) to the current "file" which was
      +  being processed and is interrupted by the macro expansion. At the end
      +  of processing the macro, the initial data structure will be put back
      +  in place (see function next_one) and the reading will go on from there.
      +
      +  If macros are used within macros, there may be a cascade of such temporary
      +  arrays used to insert the expanded macro contents before resuming the real
      +  file processing.
      +
      +  There is some hopus-pocus to deal with line_number when transiting from
      +  one config to the other.
      +*/
      +typedef struct
      +{
      +    int index;                    /* current element */
      +    int char_index;               /* current char in element */
      +    int length;                   /* cached length of the current line */
      +    apr_array_header_t *contents; /* array of char * */
      +    ap_configfile_t *next;        /* next config once this one is processed */
      +    ap_configfile_t **upper;      /* hack: where to update it if needed */
      +} array_contents_t;
      +
      +/*
      +  Get next config if any.
      +  this may be called several times if there are continuations.
      +*/
      +static int next_one(array_contents_t * ml)
      +{
      +    if (ml->next) {
      +        ap_assert(ml->upper);
      +        *(ml->upper) = ml->next;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      +  returns next char if possible
      +  this may involve switching to enclosing config.
      +*/
      +static apr_status_t array_getch(char *ch, void *param)
      +{
      +    array_contents_t *ml = (array_contents_t *) param;
      +    char **tab = (char **) ml->contents->elts;
      +
      +    while (ml->char_index >= ml->length) {
      +        if (ml->index >= ml->contents->nelts) {
      +            /* maybe update */
      +            if (ml->next && ml->next->getch && next_one(ml)) {
      +                apr_status_t rc = ml->next->getch(ch, ml->next->param);
      +                if (*ch==LF)
      +                    ml->next->line_number++;
      +                return rc;
      +            }
      +            return APR_EOF;
      +        }
      +        ml->index++;
      +        ml->char_index = 0;
      +        ml->length = ml->index >= ml->contents->nelts ?
      +            0 : strlen(tab[ml->index]);
      +    }
      +
      +    *ch = tab[ml->index][ml->char_index++];
      +    return APR_SUCCESS;
      +}
      +
      +/*
      +  returns a buf a la fgets.
      +  no more than a line at a time, otherwise the parsing is too much ahead...
      +  NULL at EOF.
      +*/
      +static apr_status_t array_getstr(void *buf, size_t bufsize, void *param)
      +{
      +    array_contents_t *ml = (array_contents_t *) param;
      +    char *buffer = (char *) buf;
      +    char next = '\0';
      +    size_t i = 0;
      +    apr_status_t rc = APR_SUCCESS;
      +
      +    /* read chars from stream, stop on newline */
      +    while (i < bufsize - 1 && next != LF &&
      +           ((rc = array_getch(&next, param)) == APR_SUCCESS)) {
      +        buffer[i++] = next;
      +    }
      +
      +    if (rc == APR_EOF) {
      +        /* maybe update to next, possibly a recursion */
      +        if (next_one(ml)) {
      +            ap_assert(ml->next->getstr);
      +            /* keep next line count in sync! the caller will update
      +               the current line_number, we need to forward to the next */
      +            ml->next->line_number++;
      +            return ml->next->getstr(buf, bufsize, ml->next->param);
      +        }
      +        /* else that is really all we can do */
      +        return APR_EOF;
      +    }
      +
      +    buffer[i] = '\0';
      +
      +    return APR_SUCCESS;
      +}
      +
      +/*
      +  close the array stream?
      +*/
      +static apr_status_t array_close(void *param)
      +{
      +    array_contents_t *ml = (array_contents_t *) param;
      +    /* move index at end of stream... */
      +    ml->index = ml->contents->nelts;
      +    ml->char_index = ml->length;
      +    return APR_SUCCESS;
      +}
      +
      +/*
      +  create an array config stream insertion "object".
      +  could be exported.
      +*/
      +static ap_configfile_t *make_array_config(apr_pool_t * pool,
      +                                          apr_array_header_t * contents,
      +                                          const char *where,
      +                                          ap_configfile_t * cfg,
      +                                          ap_configfile_t ** upper)
      +{
      +    array_contents_t *ls =
      +        (array_contents_t *) apr_palloc(pool, sizeof(array_contents_t));
      +    ap_assert(ls!=NULL);
      +
      +    ls->index = 0;
      +    ls->char_index = 0;
      +    ls->contents = contents;
      +    ls->length = ls->contents->nelts < 1 ?
      +        0 : strlen(((char **) ls->contents->elts)[0]);
      +    ls->next = cfg;
      +    ls->upper = upper;
      +
      +    return ap_pcfg_open_custom(pool, where, (void *) ls,
      +                               array_getch, array_getstr, array_close);
      +}
      +
      +
      +/********************************************************** KEYWORD HANDLING */
      +
      +/*
      +  handles: <Macro macroname arg1 arg2 ...> any trash there is ignored...
      +*/
      +static const char *macro_section(cmd_parms * cmd,
      +                                 void *dummy, const char *arg)
      +{
      +    apr_pool_t *pool;
      +    char *endp, *name, *where;
      +    const char *errmsg;
      +    ap_macro_t *macro;
      +
      +    debug(fprintf(stderr, "macro_section: arg='%s'\n", arg));
      +
      +    /* lazy initialization */
      +    if (ap_macros == NULL)
      +        ap_macros = apr_hash_make(cmd->temp_pool);
      +    ap_assert(ap_macros != NULL);
      +
      +    pool = apr_hash_pool_get(ap_macros);
      +
      +    endp = (char *) ap_strrchr_c(arg, '>');
      +
      +    if (endp == NULL) {
      +        return BEGIN_MACRO "> directive missing closing '>'";
      +    }
      +
      +    if (endp == arg) {
      +        return BEGIN_MACRO " macro definition: empty name";
      +    }
      +
      +    warn_if_non_blank(APLOGNO(02801) "non blank chars found after "
      +                      BEGIN_MACRO " closing '>'",
      +                      endp+1, cmd->config_file);
      +
      +    /* coldly drop '>[^>]*$' out */
      +    *endp = '\0';
      +
      +    /* get lowercase macro name */
      +    name = ap_getword_conf(pool, &arg);
      +    if (empty_string_p(name)) {
      +        return BEGIN_MACRO " macro definition: name not found";
      +    }
      +
      +    ap_str_tolower(name);
      +    macro = apr_hash_get(ap_macros, name, APR_HASH_KEY_STRING);
      +
      +    if (macro != NULL) {
      +        /* already defined: warn about the redefinition */
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02802)
      +                     "macro '%s' multiply defined: "
      +                     "%s, redefined on line %d of \"%s\"",
      +                     macro->name, macro->location,
      +                     cmd->config_file->line_number, cmd->config_file->name);
      +    }
      +    else {
      +        /* allocate a new macro */
      +        macro = (ap_macro_t *) apr_palloc(pool, sizeof(ap_macro_t));
      +        macro->name = name;
      +    }
      +
      +    debug(fprintf(stderr, "macro_section: name=%s\n", name));
      +
      +    /* get macro arguments */
      +    macro->location = apr_psprintf(pool,
      +                                   "defined on line %d of \"%s\"",
      +                                   cmd->config_file->line_number,
      +                                   cmd->config_file->name);
      +    debug(fprintf(stderr, "macro_section: location=%s\n", macro->location));
      +
      +    where =
      +        apr_psprintf(pool, "macro '%s' (%s)", macro->name, macro->location);
      +
      +    if (looks_like_an_argument(name)) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(02803)
      +                     "%s better prefix a macro name with any of '%s'",
      +                     where, ARG_PREFIX);
      +    }
      +
      +    /* get macro parameters */
      +    macro->arguments = get_arguments(pool, arg);
      +
      +    errmsg = check_macro_arguments(cmd->temp_pool, macro);
      +
      +    if (errmsg) {
      +        return errmsg;
      +    }
      +
      +    errmsg = get_lines_till_end_token(pool, cmd->config_file,
      +                                      END_MACRO, BEGIN_MACRO,
      +                                      where, &macro->contents);
      +
      +    if (errmsg) {
      +        return apr_psprintf(cmd->temp_pool,
      +                            "%s" APR_EOL_STR "\tcontents error: %s",
      +                            where, errmsg);
      +    }
      +
      +    errmsg = check_macro_contents(cmd->temp_pool, macro);
      +
      +    if (errmsg) {
      +        return apr_psprintf(cmd->temp_pool,
      +                            "%s" APR_EOL_STR "\tcontents checking error: %s",
      +                            where, errmsg);
      +    }
      +
      +    /* store the new macro */
      +    apr_hash_set(ap_macros, name, APR_HASH_KEY_STRING, macro);
      +
      +    return NULL;
      +}
      +
      +/*
      +  handles: Use name value1 value2 ...
      +*/
      +static const char *use_macro(cmd_parms * cmd, void *dummy, const char *arg)
      +{
      +    char *name, *recursion, *where;
      +    const char *errmsg;
      +    ap_macro_t *macro;
      +    apr_array_header_t *replacements;
      +    apr_array_header_t *contents;
      +
      +    debug(fprintf(stderr, "use_macro -%s-\n", arg));
      +
      +    /* must be initialized, or no macros has been defined */
      +    if (ap_macros == NULL) {
      +        return "no macro defined before " USE_MACRO;
      +    }
      +
      +    /* get lowercase macro name */
      +    name = ap_getword_conf(cmd->temp_pool, &arg);
      +    ap_str_tolower(name);
      +
      +    if (empty_string_p(name)) {
      +        return "no macro name specified with " USE_MACRO;
      +    }
      +
      +    /* get macro definition */
      +    macro = apr_hash_get(ap_macros, name, APR_HASH_KEY_STRING);
      +
      +    if (!macro) {
      +        return apr_psprintf(cmd->temp_pool, "macro '%s' undefined", name);
      +    }
      +
      +    /* recursion is detected here by looking at the config file name,
      +     * which may already contains "macro 'foo'". Ok, it looks like a hack,
      +     * but otherwise it is uneasy to keep this data available somewhere...
      +     * the name has just the needed visibility and liveness.
      +     */
      +    recursion =
      +        apr_pstrcat(cmd->temp_pool, "macro '", macro->name, "'", NULL);
      +
      +    if (ap_strstr((char *) cmd->config_file->name, recursion)) {
      +        return apr_psprintf(cmd->temp_pool,
      +                            "recursive use of macro '%s' is invalid",
      +                            macro->name);
      +    }
      +
      +    /* get macro arguments */
      +    replacements = get_arguments(cmd->temp_pool, arg);
      +
      +    if (macro->arguments->nelts != replacements->nelts) {
      +        return apr_psprintf(cmd->temp_pool,
      +                            "macro '%s' (%s) used "
      +                            "with %d arguments instead of %d",
      +                            macro->name, macro->location,
      +                            replacements->nelts, macro->arguments->nelts);
      +    }
      +
      +    where = apr_psprintf(cmd->temp_pool,
      +                         "macro '%s' (%s) used on line %d of \"%s\"",
      +                         macro->name, macro->location,
      +                         cmd->config_file->line_number,
      +                         cmd->config_file->name);
      +
      +    check_macro_use_arguments(where, replacements);
      +
      +    errmsg = process_content(cmd->temp_pool, macro, replacements,
      +                             NULL, &contents);
      +
      +    if (errmsg) {
      +        return apr_psprintf(cmd->temp_pool,
      +                            "%s error while substituting: %s",
      +                            where, errmsg);
      +    }
      +
      +    /* the current "config file" is replaced by a string array...
      +       at the end of processing the array, the initial config file
      +       will be returned there (see next_one) so as to go on. */
      +    cmd->config_file = make_array_config(cmd->temp_pool, contents, where,
      +                                         cmd->config_file, &cmd->config_file);
      +
      +    return NULL;
      +}
      +
      +static const char *undef_macro(cmd_parms * cmd, void *dummy, const char *arg)
      +{
      +    char *name;
      +    ap_macro_t *macro;
      +
      +    /* must be initialized, or no macros has been defined */
      +    if (ap_macros == NULL) {
      +        return "no macro defined before " UNDEF_MACRO;
      +    }
      +
      +    if (empty_string_p(arg)) {
      +        return "no macro name specified with " UNDEF_MACRO;
      +    }
      +
      +    /* check that the macro is defined */
      +    name = apr_pstrdup(cmd->temp_pool, arg);
      +    ap_str_tolower(name);
      +    macro = apr_hash_get(ap_macros, name, APR_HASH_KEY_STRING);
      +    if (macro == NULL) {
      +        /* could be a warning? */
      +        return apr_psprintf(cmd->temp_pool,
      +                            "cannot remove undefined macro '%s'", name);
      +    }
      +
      +    /* free macro: cannot do that */
      +    /* remove macro from hash table */
      +    apr_hash_set(ap_macros, name, APR_HASH_KEY_STRING, NULL);
      +
      +    return NULL;
      +}
      +
      +static int macro_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
      +{
      +    ap_macros = NULL;
      +    return OK;
      +}
      +
      +/************************************************************* EXPORT MODULE */
      +
      +/*
      +  macro module commands.
      +  configuration file macro stuff
      +  they are processed immediately when found, hence the EXEC_ON_READ.
      +*/
      +static const command_rec macro_cmds[] = {
      +    AP_INIT_RAW_ARGS(BEGIN_MACRO, macro_section, NULL, EXEC_ON_READ | OR_ALL,
      +                     "Beginning of a macro definition section."),
      +    AP_INIT_RAW_ARGS(USE_MACRO, use_macro, NULL, EXEC_ON_READ | OR_ALL,
      +                     "Use of a macro."),
      +    AP_INIT_TAKE1(UNDEF_MACRO, undef_macro, NULL, EXEC_ON_READ | OR_ALL,
      +                  "Remove a macro definition."),
      +
      +    {NULL}
      +};
      +
      +static void macro_hooks(apr_pool_t *p)
      +{
      +    ap_hook_pre_config(macro_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +/*
      +  Module hooks are request-oriented thus it does not suit configuration
      +  file utils a lot. I haven't found any clean hook to apply something
      +  before then after configuration file processing. Also what about
      +  .htaccess files?
      +
      +  Thus I think that server/util.c or server/config.c
      +  would be a better place for this stuff.
      +*/
      +
      +AP_DECLARE_MODULE(macro) = {
      +    STANDARD20_MODULE_STUFF,    /* common stuff */
      +        NULL,                   /* create per-directory config */
      +        NULL,                   /* merge per-directory config structures */
      +        NULL,                   /* create per-server config structure */
      +        NULL,                   /* merge per-server config structures */
      +        macro_cmds,             /* configuration commands */
      +        macro_hooks             /* register hooks */
      +};
      diff --git a/modules/core/mod_macro.dep b/modules/core/mod_macro.dep
      new file mode 100644
      index 00000000000..74ea1a58e22
      --- /dev/null
      +++ b/modules/core/mod_macro.dep
      @@ -0,0 +1,45 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_macro.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_macro.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/core/mod_macro.dsp b/modules/core/mod_macro.dsp
      new file mode 100644
      index 00000000000..61914cc717a
      --- /dev/null
      +++ b/modules/core/mod_macro.dsp
      @@ -0,0 +1,111 @@
      +# Microsoft Developer Studio Project File - Name="mod_macro" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_macro - Win32 Release
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_macro.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_macro.mak" CFG="mod_macro - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_macro - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_macro - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_macro_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /win32
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /d "NDEBUG" /i "../../include" /i "../../srclib/apr/include" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_macro.so" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_macro.so" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_macro.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_macro_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /win32
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /d "_DEBUG" /i "../../include" /i "../../srclib/apr/include" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_macro.so" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_macro.so" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_macro.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_macro - Win32 Release"
      +# Name "mod_macro - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=.\mod_macro.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/core/mod_macro.mak b/modules/core/mod_macro.mak
      new file mode 100644
      index 00000000000..656d96a5530
      --- /dev/null
      +++ b/modules/core/mod_macro.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_macro.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_macro - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_macro - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_macro - Win32 Release" && "$(CFG)" != "mod_macro - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_macro.mak" CFG="mod_macro - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_macro - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_macro - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_macro.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_macro.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_macro.obj"
      +	-@erase "$(INTDIR)\mod_macro_src.idb"
      +	-@erase "$(INTDIR)\mod_macro_src.pdb"
      +	-@erase "$(OUTDIR)\mod_macro.exp"
      +	-@erase "$(OUTDIR)\mod_macro.lib"
      +	-@erase "$(OUTDIR)\mod_macro.pdb"
      +	-@erase "$(OUTDIR)\mod_macro.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_macro_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_macro.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_macro.pdb" /debug /out:"$(OUTDIR)\mod_macro.so" /implib:"$(OUTDIR)\mod_macro.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_macro.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_macro.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_macro.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_macro.so"
      +   if exist .\Release\mod_macro.so.manifest mt.exe -manifest .\Release\mod_macro.so.manifest -outputresource:.\Release\mod_macro.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_macro.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_macro.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_macro.obj"
      +	-@erase "$(INTDIR)\mod_macro_src.idb"
      +	-@erase "$(INTDIR)\mod_macro_src.pdb"
      +	-@erase "$(OUTDIR)\mod_macro.exp"
      +	-@erase "$(OUTDIR)\mod_macro.lib"
      +	-@erase "$(OUTDIR)\mod_macro.pdb"
      +	-@erase "$(OUTDIR)\mod_macro.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_macro_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_macro.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_macro.pdb" /debug /out:"$(OUTDIR)\mod_macro.so" /implib:"$(OUTDIR)\mod_macro.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_macro.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_macro.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_macro.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_macro.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_macro.so"
      +   if exist .\Debug\mod_macro.so.manifest mt.exe -manifest .\Debug\mod_macro.so.manifest -outputresource:.\Debug\mod_macro.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_macro.dep")
      +!INCLUDE "mod_macro.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_macro.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_macro - Win32 Release" || "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\core"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\core"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\core"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\core"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\core"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\core"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\core"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_macro - Win32 Release"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_macro - Win32 Debug"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_macro.so" /d LONG_NAME="macro_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_macro.c
      +
      +"$(INTDIR)\mod_macro.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/core/mod_so.c b/modules/core/mod_so.c
      index 5f44f815935..6eafbe9aeab 100644
      --- a/modules/core/mod_so.c
      +++ b/modules/core/mod_so.c
      @@ -143,6 +143,37 @@ static apr_status_t unload_module(void *data)
           return APR_SUCCESS;
       }
       
      +static const char *dso_load(cmd_parms *cmd, apr_dso_handle_t **modhandlep,
      +                            const char *filename, const char **used_filename)
      +{
      +    int retry = 0;
      +    const char *fullname = ap_server_root_relative(cmd->temp_pool, filename);
      +    char my_error[256];
      +    if (filename != NULL && ap_strchr_c(filename, '/') == NULL) {
      +        /* retry on error without path to use dlopen()'s search path */
      +        retry = 1;
      +    }
      +
      +    if (fullname == NULL && !retry) {
      +        return apr_psprintf(cmd->temp_pool, "Invalid %s path %s",
      +                            cmd->cmd->name, filename);
      +    }
      +    *used_filename = fullname;
      +    if (apr_dso_load(modhandlep, fullname, cmd->pool) == APR_SUCCESS) {
      +        return NULL;
      +    }
      +    if (retry) {
      +        *used_filename = filename;
      +        if (apr_dso_load(modhandlep, filename, cmd->pool) == APR_SUCCESS)
      +            return NULL;
      +    }
      +
      +    return apr_pstrcat(cmd->temp_pool, "Cannot load ", filename,
      +                        " into server: ",
      +                        apr_dso_error(*modhandlep, my_error, sizeof(my_error)),
      +                        NULL);
      +}
      +
       /*
        * This is called for the directive LoadModule and actually loads
        * a shared object file into the address space of the server process.
      @@ -154,7 +185,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
           apr_dso_handle_t *modhandle;
           apr_dso_handle_sym_t modsym;
           module *modp;
      -    const char *szModuleFile = ap_server_root_relative(cmd->pool, filename);
      +    const char *module_file;
           so_server_conf *sconf;
           ap_module_symbol_t *modi;
           ap_module_symbol_t *modie;
      @@ -162,16 +193,11 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
           const char *error;
       
           /* we need to setup this value for dummy to make sure that we don't try
      -     * to add a non-existant tree into the build when we return to
      +     * to add a non-existent tree into the build when we return to
            * execute_now.
            */
           *(ap_directive_t **)dummy = NULL;
       
      -    if (!szModuleFile) {
      -        return apr_pstrcat(cmd->pool, "Invalid LoadModule path ",
      -                           filename, NULL);
      -    }
      -
           /*
            * check for already existing module
            * If it already exists, we have nothing to do
      @@ -183,8 +209,8 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
           for (i = 0; i < sconf->loaded_modules->nelts; i++) {
               modi = &modie[i];
               if (modi->name != NULL && strcmp(modi->name, modname) == 0) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0,
      -                          cmd->pool, "module %s is already loaded, skipping",
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, cmd->pool, APLOGNO(01574)
      +                          "module %s is already loaded, skipping",
                                 modname);
                   return NULL;
               }
      @@ -234,16 +260,11 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
           /*
            * Load the file into the Apache address space
            */
      -    if (apr_dso_load(&modhandle, szModuleFile, cmd->pool) != APR_SUCCESS) {
      -        char my_error[256];
      -
      -        return apr_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
      -                          " into server: ",
      -                          apr_dso_error(modhandle, my_error, sizeof(my_error)),
      -                          NULL);
      -    }
      -    ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, cmd->pool,
      -                 "loaded module %s", modname);
      +    error = dso_load(cmd, &modhandle, filename, &module_file);
      +    if (error)
      +        return error;
      +    ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, cmd->pool, APLOGNO(01575)
      +                 "loaded module %s from %s", modname, module_file);
       
           /*
            * Retrieve the pointer to the module structure through the module name:
      @@ -254,7 +275,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
               char my_error[256];
       
               return apr_pstrcat(cmd->pool, "Can't locate API module structure `",
      -                          modname, "' in file ", szModuleFile, ": ",
      +                          modname, "' in file ", module_file, ": ",
                                 apr_dso_error(modhandle, my_error, sizeof(my_error)),
                                 NULL);
           }
      @@ -271,7 +292,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
                                   "is garbled - expected signature %08lx but saw "
                                   "%08lx - perhaps this is not an Apache module DSO, "
                                   "or was compiled for a different Apache version?",
      -                            modname, szModuleFile,
      +                            modname, module_file,
                                   MODULE_MAGIC_COOKIE, modp->magic);
           }
       
      @@ -300,32 +321,20 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
       
       /*
        * This implements the LoadFile directive and loads an arbitrary
      - * shared object file into the adress space of the server process.
      + * shared object file into the address space of the server process.
        */
       
       static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
       {
           apr_dso_handle_t *handle;
      -    const char *file;
      -
      -    file = ap_server_root_relative(cmd->pool, filename);
      +    const char *used_file, *error;
       
      -    if (!file) {
      -        return apr_pstrcat(cmd->pool, "Invalid LoadFile path ",
      -                           filename, NULL);
      -    }
      -
      -    if (apr_dso_load(&handle, file, cmd->pool) != APR_SUCCESS) {
      -        char my_error[256];
      -
      -        return apr_pstrcat(cmd->pool, "Cannot load ", filename,
      -                          " into server: ",
      -                          apr_dso_error(handle, my_error, sizeof(my_error)),
      -                          NULL);
      -    }
      +    error = dso_load(cmd, &handle, filename, &used_file);
      +    if (error)
      +        return error;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
      -                 "loaded file %s", filename);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(01576)
      +                 "loaded file %s", used_file);
       
           return NULL;
       }
      @@ -391,7 +400,7 @@ static void dump_loaded_modules(apr_pool_t *p, server_rec *s)
       
       static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
       {
      -    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
      +    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool, APLOGNO(01577)
                        "WARNING: LoadFile not supported on this platform");
           return NULL;
       }
      @@ -399,7 +408,7 @@ static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
       static const char *load_module(cmd_parms *cmd, void *dummy,
                                      const char *modname, const char *filename)
       {
      -    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
      +    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool, APLOGNO(01578)
                        "WARNING: LoadModule not supported on this platform");
           return NULL;
       }
      diff --git a/modules/core/mod_watchdog.c b/modules/core/mod_watchdog.c
      index ff6c77cd9bd..a5eb4bf04d0 100644
      --- a/modules/core/mod_watchdog.c
      +++ b/modules/core/mod_watchdog.c
      @@ -18,22 +18,15 @@
        */
       
       #include "apr.h"
      -#if APR_HAVE_UNISTD_H
      -#include <unistd.h>         /* for getpid() */
      -#endif
      -#if APR_HAVE_PROCESS_H
      -#include <process.h>        /* for getpid() on Win32 */
      -#endif
      -
       #include "mod_watchdog.h"
       #include "ap_provider.h"
       #include "ap_mpm.h"
       #include "http_core.h"
       #include "util_mutex.h"
       
      -#define AP_WATCHODG_PGROUP    "watchdog"
      -#define AP_WATCHODG_PVERSION  "parent"
      -#define AP_WATCHODG_CVERSION  "child"
      +#define AP_WATCHDOG_PGROUP    "watchdog"
      +#define AP_WATCHDOG_PVERSION  "parent"
      +#define AP_WATCHDOG_CVERSION  "child"
       
       typedef struct watchdog_list_t watchdog_list_t;
       
      @@ -162,9 +155,8 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
           if (w->is_running) {
               watchdog_list_t *wl = w->callbacks;
               ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, wd_server_conf->s,
      -                     "%sWatchdog (%s) running (%" APR_PID_T_FMT ")",
      -                     w->singleton ? "Singleton" : "",
      -                     w->name, getpid());
      +                     APLOGNO(02972) "%sWatchdog (%s) running",
      +                     w->singleton ? "Singleton " : "", w->name);
               apr_time_clock_hires(w->pool);
               if (wl) {
                   apr_pool_t *ctx = NULL;
      @@ -259,9 +251,8 @@ static void* APR_THREAD_FUNC wd_worker(apr_thread_t *thread, void *data)
               }
           }
           ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, wd_server_conf->s,
      -                 "%sWatchdog (%s) stopping (%" APR_PID_T_FMT ")",
      -                 w->singleton ? "Singleton" : "",
      -                 w->name, getpid());
      +                 APLOGNO(02973) "%sWatchdog (%s) stopping",
      +                 w->singleton ? "Singleton " : "", w->name);
       
           if (locked)
               apr_proc_mutex_unlock(w->mutex);
      @@ -313,7 +304,7 @@ static apr_status_t ap_watchdog_get_instance(ap_watchdog_t **watchdog,
                                                    apr_pool_t *p)
       {
           ap_watchdog_t *w;
      -    const char *pver = parent ? AP_WATCHODG_PVERSION : AP_WATCHODG_CVERSION;
      +    const char *pver = parent ? AP_WATCHDOG_PVERSION : AP_WATCHDOG_CVERSION;
       
           if (parent && mpm_is_forked != AP_MPMQ_NOT_SUPPORTED) {
               /* Parent threads are not supported for
      @@ -322,7 +313,7 @@ static apr_status_t ap_watchdog_get_instance(ap_watchdog_t **watchdog,
               *watchdog = NULL;
               return APR_ENOTIMPL;
           }
      -    w = ap_lookup_provider(AP_WATCHODG_PGROUP, name, pver);
      +    w = ap_lookup_provider(AP_WATCHDOG_PGROUP, name, pver);
           if (w) {
               *watchdog = w;
               return APR_SUCCESS;
      @@ -332,7 +323,7 @@ static apr_status_t ap_watchdog_get_instance(ap_watchdog_t **watchdog,
           w->pool      = p;
           w->singleton = parent ? 0 : singleton;
           *watchdog    = w;
      -    return ap_register_provider(p, AP_WATCHODG_PGROUP, name,
      +    return ap_register_provider(p, AP_WATCHDOG_PGROUP, name,
                                       pver, *watchdog);
       }
       
      @@ -397,7 +388,7 @@ static apr_status_t ap_watchdog_register_callback(ap_watchdog_t *w,
       /*                                                                          */
       /* Pre config hook.                                                         */
       /* Create default watchdogs for parent and child                            */
      -/* Parent watchdog executes inside parent proces so it doesn't need the     */
      +/* Parent watchdog executes inside parent process so it doesn't need the    */
       /* singleton mutex                                                          */
       /*                                                                          */
       /*--------------------------------------------------------------------------*/
      @@ -452,19 +443,6 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
               /* First time config phase -- skip. */
               return OK;
       
      -#if defined(WIN32)
      -    {
      -        const char *ppid = getenv("AP_PARENT_PID");
      -        if (ppid && *ppid) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                "[%" APR_PID_T_FMT " - %s] "
      -                "child second stage post config hook",
      -                getpid(), ppid);
      -            return OK;
      -        }
      -    }
      -#endif
      -
           apr_pool_userdata_get((void *)&wd_server_conf, pk, pproc);
           if (!wd_server_conf) {
               if (!(wd_server_conf = apr_pcalloc(pproc, sizeof(wd_server_conf_t))))
      @@ -473,16 +451,21 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
               apr_pool_userdata_set(wd_server_conf, pk, apr_pool_cleanup_null, pproc);
           }
           wd_server_conf->s = s;
      -    if ((wl = ap_list_provider_names(pconf, AP_WATCHODG_PGROUP,
      -                                            AP_WATCHODG_PVERSION))) {
      +    if ((wl = ap_list_provider_names(pconf, AP_WATCHDOG_PGROUP,
      +                                            AP_WATCHDOG_PVERSION))) {
               const ap_list_provider_names_t *wn;
               int i;
       
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02974)
      +                "Watchdog: found parent providers.");
      +
               wn = (ap_list_provider_names_t *)wl->elts;
               for (i = 0; i < wl->nelts; i++) {
      -            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHODG_PGROUP,
      +            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHDOG_PGROUP,
                                                         wn[i].provider_name,
      -                                                  AP_WATCHODG_PVERSION);
      +                                                  AP_WATCHDOG_PVERSION);
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02975)
      +                    "Watchdog: Looking for parent (%s).", wn[i].provider_name);
                   if (w) {
                       if (!w->active) {
                           int status = ap_run_watchdog_need(s, w->name, 1,
      @@ -499,30 +482,36 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
                            * Create the watchdog thread
                            */
                           if ((rv = wd_startup(w, wd_server_conf->pool)) != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +                        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01571)
                                       "Watchdog: Failed to create parent worker thread.");
                               return rv;
                           }
      +                    ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02976)
      +                            "Watchdog: Created parent worker thread (%s).", w->name);
                           wd_server_conf->parent_workers++;
                       }
                   }
               }
           }
           if (wd_server_conf->parent_workers) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01572)
                            "Spawned %d parent worker threads.",
                            wd_server_conf->parent_workers);
           }
      -    if ((wl = ap_list_provider_names(pconf, AP_WATCHODG_PGROUP,
      -                                            AP_WATCHODG_CVERSION))) {
      +    if ((wl = ap_list_provider_names(pconf, AP_WATCHDOG_PGROUP,
      +                                            AP_WATCHDOG_CVERSION))) {
               const ap_list_provider_names_t *wn;
               int i;
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02977)
      +                "Watchdog: found child providers.");
       
               wn = (ap_list_provider_names_t *)wl->elts;
               for (i = 0; i < wl->nelts; i++) {
      -            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHODG_PGROUP,
      +            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHDOG_PGROUP,
                                                         wn[i].provider_name,
      -                                                  AP_WATCHODG_CVERSION);
      +                                                  AP_WATCHDOG_CVERSION);
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02978)
      +                    "Watchdog: Looking for child (%s).", wn[i].provider_name);
                   if (w) {
                       if (!w->active) {
                           int status = ap_run_watchdog_need(s, w->name, 0,
      @@ -546,6 +535,8 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
                                   return rv;
                               }
                           }
      +                    ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02979)
      +                            "Watchdog: Created child worker thread (%s).", w->name);
                           wd_server_conf->child_workers++;
                       }
                   }
      @@ -562,33 +553,37 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
       /*--------------------------------------------------------------------------*/
       static void wd_child_init_hook(apr_pool_t *p, server_rec *s)
       {
      -    apr_status_t rv;
      +    apr_status_t rv = OK;
           const apr_array_header_t *wl;
       
           if (!wd_server_conf->child_workers) {
               /* We don't have anything configured, bail out.
                */
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02980)
      +                     "Watchdog: nothing configured?");
               return;
           }
      -    if ((wl = ap_list_provider_names(p, AP_WATCHODG_PGROUP,
      -                                        AP_WATCHODG_CVERSION))) {
      +    if ((wl = ap_list_provider_names(p, AP_WATCHDOG_PGROUP,
      +                                        AP_WATCHDOG_CVERSION))) {
               const ap_list_provider_names_t *wn;
               int i;
               wn = (ap_list_provider_names_t *)wl->elts;
               for (i = 0; i < wl->nelts; i++) {
      -            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHODG_PGROUP,
      +            ap_watchdog_t *w = ap_lookup_provider(AP_WATCHDOG_PGROUP,
                                                         wn[i].provider_name,
      -                                                  AP_WATCHODG_CVERSION);
      +                                                  AP_WATCHDOG_CVERSION);
                   if (w && w->active) {
                       /* We have some callbacks registered.
                        * Kick of the watchdog
                        */
                       if ((rv = wd_startup(w, wd_server_conf->pool)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01573)
                                        "Watchdog: Failed to create worker thread.");
                           /* No point to continue */
                           return;
                       }
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02981)
      +                             "Watchdog: Created worker thread (%s).", wn[i].provider_name);
                   }
               }
           }
      diff --git a/modules/core/mod_watchdog.dep b/modules/core/mod_watchdog.dep
      new file mode 100644
      index 00000000000..147475b2d60
      --- /dev/null
      +++ b/modules/core/mod_watchdog.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_watchdog.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_watchdog.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_watchdog.h"\
      +	
      diff --git a/modules/core/mod_watchdog.h b/modules/core/mod_watchdog.h
      index 13d23ba9606..8e7112cf918 100644
      --- a/modules/core/mod_watchdog.h
      +++ b/modules/core/mod_watchdog.h
      @@ -21,9 +21,9 @@
        * @file  mod_watchdog.h
        * @brief Watchdog module for Apache
        *
      - * @defgroup MOD_WATCHDOG watchdog
      + * @defgroup MOD_WATCHDOG mod_watchdog
        * @ingroup  APACHE_MODS
      - * \@{
      + * @{
        */
       
       #include "httpd.h"
      @@ -210,4 +210,4 @@ APR_DECLARE_EXTERNAL_HOOK(ap, AP_WD, int, watchdog_step, (
       #endif
       
       #endif /* MOD_WATCHDOG_H */
      -/** \@} */
      +/** @} */
      diff --git a/modules/core/mod_watchdog.mak b/modules/core/mod_watchdog.mak
      new file mode 100644
      index 00000000000..6b58c6d54f8
      --- /dev/null
      +++ b/modules/core/mod_watchdog.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_watchdog.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_watchdog - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_watchdog - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_watchdog - Win32 Release" && "$(CFG)" != "mod_watchdog - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_watchdog.mak" CFG="mod_watchdog - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_watchdog - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_watchdog - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_watchdog - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_watchdog.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_watchdog.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_watchdog.obj"
      +	-@erase "$(INTDIR)\mod_watchdog.res"
      +	-@erase "$(INTDIR)\mod_watchdog_src.idb"
      +	-@erase "$(INTDIR)\mod_watchdog_src.pdb"
      +	-@erase "$(OUTDIR)\mod_watchdog.exp"
      +	-@erase "$(OUTDIR)\mod_watchdog.lib"
      +	-@erase "$(OUTDIR)\mod_watchdog.pdb"
      +	-@erase "$(OUTDIR)\mod_watchdog.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "AP_WD_DECLARE_EXPORT" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_watchdog_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_watchdog.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_watchdog.so" /d LONG_NAME="watchdog_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_watchdog.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_watchdog.pdb" /debug /out:"$(OUTDIR)\mod_watchdog.so" /implib:"$(OUTDIR)\mod_watchdog.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_watchdog.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_watchdog.obj" \
      +	"$(INTDIR)\mod_watchdog.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_watchdog.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_watchdog.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_watchdog.so"
      +   if exist .\Release\mod_watchdog.so.manifest mt.exe -manifest .\Release\mod_watchdog.so.manifest -outputresource:.\Release\mod_watchdog.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_watchdog.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_watchdog.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_watchdog.obj"
      +	-@erase "$(INTDIR)\mod_watchdog.res"
      +	-@erase "$(INTDIR)\mod_watchdog_src.idb"
      +	-@erase "$(INTDIR)\mod_watchdog_src.pdb"
      +	-@erase "$(OUTDIR)\mod_watchdog.exp"
      +	-@erase "$(OUTDIR)\mod_watchdog.lib"
      +	-@erase "$(OUTDIR)\mod_watchdog.pdb"
      +	-@erase "$(OUTDIR)\mod_watchdog.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "AP_WD_DECLARE_EXPORT" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_watchdog_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_watchdog.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_watchdog.so" /d LONG_NAME="watchdog_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_watchdog.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_watchdog.pdb" /debug /out:"$(OUTDIR)\mod_watchdog.so" /implib:"$(OUTDIR)\mod_watchdog.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_watchdog.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_watchdog.obj" \
      +	"$(INTDIR)\mod_watchdog.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_watchdog.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_watchdog.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_watchdog.so"
      +   if exist .\Debug\mod_watchdog.so.manifest mt.exe -manifest .\Debug\mod_watchdog.so.manifest -outputresource:.\Debug\mod_watchdog.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_watchdog.dep")
      +!INCLUDE "mod_watchdog.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_watchdog.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_watchdog - Win32 Release" || "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_watchdog - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\core"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\core"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_watchdog - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\core"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\core"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\core"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_watchdog - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\core"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\core"
      +
      +!ELSEIF  "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\core"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\core"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_watchdog - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_watchdog.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_watchdog.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_watchdog.so" /d LONG_NAME="watchdog_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_watchdog - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_watchdog.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_watchdog.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_watchdog.so" /d LONG_NAME="watchdog_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_watchdog.c
      +
      +"$(INTDIR)\mod_watchdog.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/core/test/Makefile b/modules/core/test/Makefile
      new file mode 100644
      index 00000000000..bd2a6cb0fad
      --- /dev/null
      +++ b/modules/core/test/Makefile
      @@ -0,0 +1,67 @@
      +#
      +# mod_macro non regression tests
      +
      +# where is apache
      +APA.dir	= /tmp/apache
      +
      +# apache executable with mod macro loaded
      +HTTPD = \
      +	$(APA.dir)/bin/httpd \
      +	  -C 'LoadModule macro_module modules/mod_macro.so' \
      +	  -C "Define PWD $$PWD/conf"
      +
      +# default target
      +.PHONY: default
      +default: clean
      +
      +# run all non regression tests
      +.PHONY: check
      +check: check-out
      +
      +# result directory
      +OUT	= out
      +out:
      +	mkdir $@
      +
      +# test cases & results
      +F.conf	= $(wildcard conf/test*.conf)
      +F.out	= $(F.conf:conf/%.conf=$(OUT)/%.out)
      +
      +# run all tests
      +.PHONY: run-test
      +run-test: $(F.out)
      +
      +# generate & compare in a separate directory
      +.PHONY: check-out
      +check-out: out
      +	$(RM) out/*.out
      +	$(MAKE) OUT=out run-test
      +	diff -r out/ ref/
      +
      +# generate & compare in the same directory
      +.PHONY: check-ref
      +check-ref:
      +	$(RM) ref/*.out
      +	$(MAKE) OUT=ref run-test
      +	svn diff ref/
      +
      +# run one test case
      +# filter output so that it is portable
      +# use '|' sed separator because $PWD will contain plenty '/'
      +$(OUT)/%.out: conf/%.conf
      +	{ \
      +	  echo "# testing with $<" ; \
      +	  $(HTTPD) -f $$PWD/$< 2>&1 ; \
      +	  echo "# exit: $$?" ; \
      +	} > $@.tmp ; \
      +	sed -e "s|$$PWD|.|g" \
      +	    -e "s|^\[[\.a-zA-Z0-9 :]*\] ||" \
      +	    -e "s|\[pid [0-9]*:tid [0-9]*] ||" \
      +	    $@.tmp > $@ ; \
      +	$(RM) $@.tmp
      +
      +# cleanup
      +.PHONY: clean
      +clean:
      +	$(RM) *~
      +	$(RM) -r out
      diff --git a/modules/core/test/conf/inc63_1.conf b/modules/core/test/conf/inc63_1.conf
      new file mode 100644
      index 00000000000..6a436f9c2f6
      --- /dev/null
      +++ b/modules/core/test/conf/inc63_1.conf
      @@ -0,0 +1,5 @@
      +# macro for include
      +<Macro Foo $where>
      +  Warning "Foo macro at $where"
      +</Macro>
      +Use Foo "inc63_.conf:5"
      diff --git a/modules/core/test/conf/inc63_2.conf b/modules/core/test/conf/inc63_2.conf
      new file mode 100644
      index 00000000000..3a0da9ea1e9
      --- /dev/null
      +++ b/modules/core/test/conf/inc63_2.conf
      @@ -0,0 +1,3 @@
      +# use macro defined elsewhere
      +Use Foo "inc63_2.conf:2"
      +Use Bla "inc63_2.conf:3"
      diff --git a/modules/core/test/conf/test01.conf b/modules/core/test/conf/test01.conf
      new file mode 100644
      index 00000000000..9a3d9abb20b
      --- /dev/null
      +++ b/modules/core/test/conf/test01.conf
      @@ -0,0 +1,3 @@
      +# no macro name
      +<Macro>
      +</Macro>
      diff --git a/modules/core/test/conf/test02.conf b/modules/core/test/conf/test02.conf
      new file mode 100644
      index 00000000000..1fe4b412209
      --- /dev/null
      +++ b/modules/core/test/conf/test02.conf
      @@ -0,0 +1,3 @@
      +# no macro name and spaces
      +<Macro       >
      +</Macro>
      diff --git a/modules/core/test/conf/test03.conf b/modules/core/test/conf/test03.conf
      new file mode 100644
      index 00000000000..fdcf4c8cac2
      --- /dev/null
      +++ b/modules/core/test/conf/test03.conf
      @@ -0,0 +1,5 @@
      +# use undefined macro
      +<Macro foo>
      +  Warning "macro foo"
      +</Macro>
      +Use bla
      diff --git a/modules/core/test/conf/test04.conf b/modules/core/test/conf/test04.conf
      new file mode 100644
      index 00000000000..82287754577
      --- /dev/null
      +++ b/modules/core/test/conf/test04.conf
      @@ -0,0 +1,5 @@
      +# wrong args
      +<Macro foo>
      +  Warning "macro foo"
      +</Macro>
      +Use foo hello
      diff --git a/modules/core/test/conf/test05.conf b/modules/core/test/conf/test05.conf
      new file mode 100644
      index 00000000000..2166acaedd9
      --- /dev/null
      +++ b/modules/core/test/conf/test05.conf
      @@ -0,0 +1,5 @@
      +# wrong args
      +<Macro foo $premier>
      +  Warning "macro foo $premier"
      +</Macro>
      +Use foo
      diff --git a/modules/core/test/conf/test06.conf b/modules/core/test/conf/test06.conf
      new file mode 100644
      index 00000000000..35e6b684b47
      --- /dev/null
      +++ b/modules/core/test/conf/test06.conf
      @@ -0,0 +1,6 @@
      +# wrong args
      +<Macro foo $premier>
      +  Warning "macro foo $premier"
      +</Macro>
      +Use foo one two
      +
      diff --git a/modules/core/test/conf/test07.conf b/modules/core/test/conf/test07.conf
      new file mode 100644
      index 00000000000..06f050e4a1a
      --- /dev/null
      +++ b/modules/core/test/conf/test07.conf
      @@ -0,0 +1,3 @@
      +# missing end macro
      +<Macro foo $premier>
      +hello
      diff --git a/modules/core/test/conf/test08.conf b/modules/core/test/conf/test08.conf
      new file mode 100644
      index 00000000000..333dbd9beaf
      --- /dev/null
      +++ b/modules/core/test/conf/test08.conf
      @@ -0,0 +1,3 @@
      +# missing begin macro
      +ServerName hello
      +</Macro>
      diff --git a/modules/core/test/conf/test09.conf b/modules/core/test/conf/test09.conf
      new file mode 100644
      index 00000000000..2513b6ebd2a
      --- /dev/null
      +++ b/modules/core/test/conf/test09.conf
      @@ -0,0 +1,6 @@
      +# recursion is bad
      +<Macro foo>
      +Use foo
      +</Macro>
      +
      +Use foo
      diff --git a/modules/core/test/conf/test10.conf b/modules/core/test/conf/test10.conf
      new file mode 100644
      index 00000000000..157129d01c6
      --- /dev/null
      +++ b/modules/core/test/conf/test10.conf
      @@ -0,0 +1,10 @@
      +# indirect recursion is bad
      +<Macro foo>
      +Use bla
      +</Macro>
      +
      +<Macro bla>
      +Use foo
      +</Macro>
      +
      +Use foo
      diff --git a/modules/core/test/conf/test11.conf b/modules/core/test/conf/test11.conf
      new file mode 100644
      index 00000000000..f397ec63b42
      --- /dev/null
      +++ b/modules/core/test/conf/test11.conf
      @@ -0,0 +1,15 @@
      +# inner macros...
      +<Macro foo $arg>
      +<Macro $arg.in>
      +Warning "macro $arg.in line 1"
      +</Macro>
      +</Macro>
      +
      +# generate a one.in macro
      +Use foo one
      +
      +# use it!
      +Use one.in
      +
      +# end processing
      +Error "done line 15."
      diff --git a/modules/core/test/conf/test12.conf b/modules/core/test/conf/test12.conf
      new file mode 100644
      index 00000000000..84403c6cbb6
      --- /dev/null
      +++ b/modules/core/test/conf/test12.conf
      @@ -0,0 +1,12 @@
      +# multiply defined generates a warning
      +<Macro foo>
      +  Warning "macro foo 1, line 1"
      +</Macro>
      +
      +<Macro foo>
      +  Warning "macro foo 2, line 1"
      +</Macro>
      +
      +Use foo
      +
      +Error "done line 12."
      diff --git a/modules/core/test/conf/test13.conf b/modules/core/test/conf/test13.conf
      new file mode 100644
      index 00000000000..244470df4a1
      --- /dev/null
      +++ b/modules/core/test/conf/test13.conf
      @@ -0,0 +1,18 @@
      +# case insensitive
      +<Macro FOO>
      +  Warning "macro FOO line 1"
      +</MACRO>
      +
      +<MACRO bla>
      +  Warning "macro bla line 1"
      +</macro>
      +
      +use foo
      +
      +<macro foo>
      +  Warning "redefined macro foo line 1"
      +</macro>
      +
      +use FOO
      +
      +Error "done line 18."
      diff --git a/modules/core/test/conf/test14.conf b/modules/core/test/conf/test14.conf
      new file mode 100644
      index 00000000000..48d888892c6
      --- /dev/null
      +++ b/modules/core/test/conf/test14.conf
      @@ -0,0 +1,23 @@
      +# VirtualHost example
      +
      +<Macro MyVirtualHost $host $port $dir>
      +  Listen $port
      +  <VirtualHost $host:$port>
      +    DocumentRoot $dir
      +    <Directory $dir>
      +      Warning "directory $dir"
      +    </Directory>
      +    # limit access to intranet subdir.
      +    <Directory $dir/intranet>
      +      Warning "directory $dir/intranet"
      +    </Directory>
      +  </VirtualHost>
      +</Macro>
      +
      +Use MyVirtualHost www.apache.org 80 /projects/apache/web
      +
      +Use MyVirtualHost www.perl.com 8080 /projects/perl/web
      +
      +Use MyVirtualHost www.ensmp.fr 1234 /projects/mines/web
      +
      +Error "done line 23."
      diff --git a/modules/core/test/conf/test15.conf b/modules/core/test/conf/test15.conf
      new file mode 100644
      index 00000000000..7990e1549a1
      --- /dev/null
      +++ b/modules/core/test/conf/test15.conf
      @@ -0,0 +1,9 @@
      +# non nested...
      +<macro test>
      +<directory /tmp>
      +</macro>
      +
      +use test
      +</directory>
      +
      +Error should not reach this point.
      diff --git a/modules/core/test/conf/test16.conf b/modules/core/test/conf/test16.conf
      new file mode 100644
      index 00000000000..471f66e679f
      --- /dev/null
      +++ b/modules/core/test/conf/test16.conf
      @@ -0,0 +1,11 @@
      +# bad nesting
      +
      +<Macro foo>
      +</Limit>
      +</Macro>
      +
      +<Limit GET>
      +Use foo
      +</Limit>
      +
      +stop
      diff --git a/modules/core/test/conf/test17.conf b/modules/core/test/conf/test17.conf
      new file mode 100644
      index 00000000000..f6294bbb1eb
      --- /dev/null
      +++ b/modules/core/test/conf/test17.conf
      @@ -0,0 +1,10 @@
      +# bad but good nesting
      +
      +<Macro foo>
      +</Directory>
      +</Macro>
      +
      +<Directory /tmp>
      +Use foo
      +
      +Error "done on line 10."
      diff --git a/modules/core/test/conf/test18.conf b/modules/core/test/conf/test18.conf
      new file mode 100644
      index 00000000000..118617de9c1
      --- /dev/null
      +++ b/modules/core/test/conf/test18.conf
      @@ -0,0 +1,10 @@
      +# bad but good nesting
      +
      +<Macro foo>
      +</Location>
      +</Macro>
      +
      +<Location /intranet>
      +Use foo
      +
      +Error "done on line 10."
      diff --git a/modules/core/test/conf/test19.conf b/modules/core/test/conf/test19.conf
      new file mode 100644
      index 00000000000..6568e968bd8
      --- /dev/null
      +++ b/modules/core/test/conf/test19.conf
      @@ -0,0 +1,26 @@
      +# okay till done
      +
      +<Macro foo $where>
      +  # something
      +  Warning "macro foo line 2 in $where"
      +</Macro>
      +
      +<Directory /tmp>
      +  Use foo Directory
      +</Directory>
      +
      +<Location /intra>
      +  Use foo Location
      +</Location>
      +
      +<VirtualHost www.apache.org>
      +  Use foo VirtualHost
      +</VirtualHost>
      +
      +<VirtualHost www.perl.com>
      +  <Directory /tmp>
      +    Use foo "VirtualHost & Directory"
      +  </Directory>
      +</VirtualHost>
      +
      +Error "done line 26."
      diff --git a/modules/core/test/conf/test20.conf b/modules/core/test/conf/test20.conf
      new file mode 100644
      index 00000000000..ccbae0d3848
      --- /dev/null
      +++ b/modules/core/test/conf/test20.conf
      @@ -0,0 +1,11 @@
      +# directory in directory through a macro
      +
      +<Macro foo $dir>
      +  <Directory $dir>
      +    Warning "macro foo $dir"
      +  </Directory>
      +</Macro>
      +
      +<Directory /tmp>
      +  Use foo /tmp
      +</Directory>
      diff --git a/modules/core/test/conf/test21.conf b/modules/core/test/conf/test21.conf
      new file mode 100644
      index 00000000000..7a8c4c9a172
      --- /dev/null
      +++ b/modules/core/test/conf/test21.conf
      @@ -0,0 +1,11 @@
      +# raise an error
      +
      +<Macro foo>
      +  <Directory /tmp>
      +    Error "macro foo dir /tmp"
      +  </Directory>
      +</Macro>
      +
      +<VirtualHost *>
      +  Use foo
      +</VirtualHost>
      diff --git a/modules/core/test/conf/test22.conf b/modules/core/test/conf/test22.conf
      new file mode 100644
      index 00000000000..5a89f83aa7d
      --- /dev/null
      +++ b/modules/core/test/conf/test22.conf
      @@ -0,0 +1,11 @@
      +# simple nesting
      +
      +<Macro foo>
      +  <Directory /tmp>
      +    Warning "macro foo"
      +  </Directory>
      +</Macro>
      +
      +Use foo
      +
      +Error "done on line 11."
      diff --git a/modules/core/test/conf/test23.conf b/modules/core/test/conf/test23.conf
      new file mode 100644
      index 00000000000..e21e2ee6b5c
      --- /dev/null
      +++ b/modules/core/test/conf/test23.conf
      @@ -0,0 +1,15 @@
      +# macro defined in a directory
      +
      +<Directory /tmp>
      +  <Macro foo>
      +    Warning "macro foo in /tmp"
      +  </Macro>
      +</Directory>
      +
      +Use foo
      +
      +<Directory /tmp>
      +  Use foo
      +</Directory>
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test24.conf b/modules/core/test/conf/test24.conf
      new file mode 100644
      index 00000000000..d35070e60c9
      --- /dev/null
      +++ b/modules/core/test/conf/test24.conf
      @@ -0,0 +1,23 @@
      +# nesting...
      +
      +<Macro bla>
      +  <Location /intra>
      +    Warning "macro bla intra"
      +  </Location>
      +  <Location /private>
      +    Warning "macro bla private"
      +  </Location>
      +</Macro>
      +
      +# ok location in config
      +Use bla
      +
      +# ok, location in VH
      +<VirtualHost foo.com>
      +  Use bla
      +</VirtualHost>
      +
      +<Directory /tmp>
      +  # fails: Location within an Directory
      +  Use bla
      +</Directory>
      diff --git a/modules/core/test/conf/test25.conf b/modules/core/test/conf/test25.conf
      new file mode 100644
      index 00000000000..724cf94265b
      --- /dev/null
      +++ b/modules/core/test/conf/test25.conf
      @@ -0,0 +1,27 @@
      +# ok till stop.
      +
      +<Macro RestrictedAccessPolicy $ips>
      +  Warning "restricted access policy $ips"
      +</Macro>
      +
      +<Directory /unexpected/1>
      +  Use RestrictedAccessPolicy 10.0.0.0/8
      +</Directory>
      +
      +<Macro LocalAccessOnly>
      +  Use RestrictedAccessPolicy 10.0.0.0/8
      +</Macro>
      +
      +<Directory /unexpected/2>
      +  Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24 10.0.0.0/8"
      +</Directory>
      +
      +<Location /intra>
      +  Use LocalAccessOnly
      +</Location>
      +
      +<Location /admin>
      +  Use LocalAccessOnly
      +</Location>
      +
      +Error "done line 27."
      diff --git a/modules/core/test/conf/test26.conf b/modules/core/test/conf/test26.conf
      new file mode 100644
      index 00000000000..bb4b5ad0374
      --- /dev/null
      +++ b/modules/core/test/conf/test26.conf
      @@ -0,0 +1,19 @@
      +# ok till stop.
      +# test quotes...
      +
      +<Macro funny "first arg" 'second ... arg'>
      +  <Directory first arg>
      +    Warning "funny directory"
      +  </Directory>
      +  <Location second ... arg>
      +    Warning "funny location"
      +  </Location>
      +</Macro>
      +
      +Use funny /unexpected/1 /intra
      +
      +<VirtualHost www.apache.org>
      +  Use funny /unexpected/2 /intranet
      +</VirtualHost>
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test27.conf b/modules/core/test/conf/test27.conf
      new file mode 100644
      index 00000000000..2f3e83c7a06
      --- /dev/null
      +++ b/modules/core/test/conf/test27.conf
      @@ -0,0 +1,22 @@
      +# define a macro in a macro.
      +
      +<Macro foo $dir $name>
      +  <Macro foo.$name>
      +    <Directory $dir>
      +      Warning "foo.$name $dir"
      +    </Directory>
      +  </Macro>
      +</Macro>
      +
      +Use foo /unexpected/1 one
      +Use foo /unexpected/2 two
      +
      +Use foo.one
      +Use foo.two
      +Use foo.one
      +
      +UndefMacro foo.one
      +UndefMacro foo.two
      +UndefMacro foo
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test28.conf b/modules/core/test/conf/test28.conf
      new file mode 100644
      index 00000000000..69c1c9b6338
      --- /dev/null
      +++ b/modules/core/test/conf/test28.conf
      @@ -0,0 +1,13 @@
      +# interaction with IfModule
      +
      +<IfModule mod_macro.c>
      +  <Macro foo>
      +    Warning "macro foo"
      +  </Macro>
      +
      +  Use foo
      +
      +  Error "done!"
      +</IfModule>
      +
      +Error "should not get there"
      diff --git a/modules/core/test/conf/test29.conf b/modules/core/test/conf/test29.conf
      new file mode 100644
      index 00000000000..7d1f380f712
      --- /dev/null
      +++ b/modules/core/test/conf/test29.conf
      @@ -0,0 +1,10 @@
      +# trigger line overflow during expansion
      +
      +<Macro toobigaline a>
      +  Warning aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
      +          aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      +</Macro>
      +
      +Use toobigaline "cette ligne va etre vraiment trop longue ya pas de doute"
      +
      +Error "should not get there!"
      diff --git a/modules/core/test/conf/test30.conf b/modules/core/test/conf/test30.conf
      new file mode 100644
      index 00000000000..72b2bb2c99d
      --- /dev/null
      +++ b/modules/core/test/conf/test30.conf
      @@ -0,0 +1,12 @@
      +# name conficts: the longest is chosen
      +# also test a parametric section
      +
      +<Macro foo $dir $directive>
      +  <$directive $dir>
      +    Warning "section $directive $dir"
      +  </$directive>
      +</Macro>
      +
      +Use foo /unexpected/1 Directory
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test31.conf b/modules/core/test/conf/test31.conf
      new file mode 100644
      index 00000000000..14964ba372b
      --- /dev/null
      +++ b/modules/core/test/conf/test31.conf
      @@ -0,0 +1,16 @@
      +# parameter name conflicts
      +
      +<Macro bla $dir $di $dd $d>
      +  Warning "argument name conflicts"
      +  $d $di $dir $dd
      +</Macro>
      +
      +Use bla '' '' 8080 Listen
      +
      +<Macro foo $d $di $dir $dd>
      +  Warning "conflicts, but arguments are not used"
      +</Macro>
      +
      +Use foo '' '' 8080 Listen
      +
      +Error "done on line 16."
      diff --git a/modules/core/test/conf/test32.conf b/modules/core/test/conf/test32.conf
      new file mode 100644
      index 00000000000..0b116eca98e
      --- /dev/null
      +++ b/modules/core/test/conf/test32.conf
      @@ -0,0 +1,7 @@
      +# error if same argument name.
      +
      +<Macro foo $arg1 $arg2 $arg3 $arg2>
      +# bad
      +</Macro>
      +
      +
      diff --git a/modules/core/test/conf/test33.conf b/modules/core/test/conf/test33.conf
      new file mode 100644
      index 00000000000..2a8a6dba612
      --- /dev/null
      +++ b/modules/core/test/conf/test33.conf
      @@ -0,0 +1,3 @@
      +# empty name.
      +
      +Use ''
      diff --git a/modules/core/test/conf/test34.conf b/modules/core/test/conf/test34.conf
      new file mode 100644
      index 00000000000..1f4671f46a0
      --- /dev/null
      +++ b/modules/core/test/conf/test34.conf
      @@ -0,0 +1,14 @@
      +# macro parameter prefix conflicts in two orders
      +
      +<Macro foo $d $dd>
      +  Warning "macro foo conflict one"
      +</Macro>
      +
      +<Macro bla $dd $d>
      +  Warning "macro bla conflict two"
      +</Macro>
      +
      +Use foo 1 2
      +Use bla 1 2
      +
      +Error "done on line 14."
      diff --git a/modules/core/test/conf/test35.conf b/modules/core/test/conf/test35.conf
      new file mode 100644
      index 00000000000..37a623ed595
      --- /dev/null
      +++ b/modules/core/test/conf/test35.conf
      @@ -0,0 +1,10 @@
      +# unused arguments
      +
      +<Macro warnings u1 u2 n1 n2 u3>
      +  Warning "macro cannot be used just within a comment u1 u2 u3"
      +  # n1 n2
      +</Macro>
      + 
      +Use warnings 1 2 3 4 5
      +
      +Error "done on line 10."
      diff --git a/modules/core/test/conf/test36.conf b/modules/core/test/conf/test36.conf
      new file mode 100644
      index 00000000000..a68667e10da
      --- /dev/null
      +++ b/modules/core/test/conf/test36.conf
      @@ -0,0 +1,12 @@
      +<Macro warnings $u $n $u1 $n1 $u2 $n2>
      +  Warning "many warnings! $u $u1 $u2"
      +  # $n $n1 $n2
      +</Macro>
      +
      +# warn about unused arguments
      +Use warnings 1 2 3 4 5 6
      +
      +# may warn about empty arguments?
      +Use warnings '' '' '' '' '' ''
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test37.conf b/modules/core/test/conf/test37.conf
      new file mode 100644
      index 00000000000..296dde75eff
      --- /dev/null
      +++ b/modules/core/test/conf/test37.conf
      @@ -0,0 +1,7 @@
      +# empty argument name
      +
      +<Macro stupid ''>
      +  Warn "macro stupid"
      +</Macro>
      +
      +Use stupid hello
      diff --git a/modules/core/test/conf/test38.conf b/modules/core/test/conf/test38.conf
      new file mode 100644
      index 00000000000..184763f09e3
      --- /dev/null
      +++ b/modules/core/test/conf/test38.conf
      @@ -0,0 +1,10 @@
      +# ifmodule
      +
      +<IfModule mod_macro.c>
      +Warning it is really a good idea to have mod_macro.c installed.
      +</IfModule>
      +
      +<IfModule !mod_perl.c>
      +Error it seems you do not have mod perl installed.
      +</IfModule>
      +
      diff --git a/modules/core/test/conf/test39.conf b/modules/core/test/conf/test39.conf
      new file mode 100644
      index 00000000000..792232f2ebf
      --- /dev/null
      +++ b/modules/core/test/conf/test39.conf
      @@ -0,0 +1,23 @@
      +# okay till stop.
      +
      +<IfModule mod_macro.c>
      +  <Macro ModMacro>
      +    Warning Thanks for using mod_macro!
      +  </Macro>
      +</IfModule>
      +
      +<IfModule !mod_macro.c>
      +  <Macro ModMacro>
      +    Error Sorry, mod_macro must be installed to run this configuration file.
      +  </Macro>
      +</IfModule>
      +
      +Use ModMacro
      +
      +<Macro foo>
      +  Warning "macro foo"
      +</Macro>
      +
      +Use foo
      +
      +Error "done!"
      diff --git a/modules/core/test/conf/test40.conf b/modules/core/test/conf/test40.conf
      new file mode 100644
      index 00000000000..e6b81f7a6fb
      --- /dev/null
      +++ b/modules/core/test/conf/test40.conf
      @@ -0,0 +1,33 @@
      +# configuration example with mod_macro
      +#
      +
      +<VirtualHost www.foo.com>
      +  DocumentRoot /foo/document/root/directory
      +
      +  <Macro SubDirAccessControl $subdir>
      +    # access control to subdirs...
      +    <Location /$subdir>
      +      Warning "location /$subdir"
      +    </Location>
      +  </Macro>
      +
      +  # repeat uses
      +  Use SubDirAccessControl A
      +  Use SubDirAccessControl B
      +  Use SubDirAccessControl C
      +  Use SubDirAccessControl D
      +  Use SubDirAccessControl E
      +  Use SubDirAccessControl G
      +  Use SubDirAccessControl H
      +  Use SubDirAccessControl J
      +  Use SubDirAccessControl K
      +  Use SubDirAccessControl L
      +  Use SubDirAccessControl M
      +  Use SubDirAccessControl N
      +
      +  # cleanup
      +  UndefMacro SubDirAccessControl
      +
      +</VirtualHost>
      +
      +Error Stop configuration file processing.
      diff --git a/modules/core/test/conf/test41.conf b/modules/core/test/conf/test41.conf
      new file mode 100644
      index 00000000000..c4e6bdbe56a
      --- /dev/null
      +++ b/modules/core/test/conf/test41.conf
      @@ -0,0 +1,20 @@
      +# another configuration example without mod_macro
      +
      +<VirtualHost www.foo.com>
      +  DocumentRoot /foo/document/root/directory
      +
      +  <Location /A>
      +    Warning "location /A"
      +  </Location>
      +
      +  <Location /B>
      +    Warning "location /B"
      +  </Location>
      +
      +  <Location /C>
      +    Warning "location /C"
      +  </Location>
      +
      +</VirtualHost>
      +
      +Error Stop configuration file processing.
      diff --git a/modules/core/test/conf/test42.conf b/modules/core/test/conf/test42.conf
      new file mode 100644
      index 00000000000..a1426041c35
      --- /dev/null
      +++ b/modules/core/test/conf/test42.conf
      @@ -0,0 +1,13 @@
      +# multiple macro uses
      +
      +<Macro foo $p>
      + Warning "macro foo $p"
      +</Macro>
      +
      +Use foo ''
      +Use foo ''
      +Use foo ''
      +Use foo ''
      +Use foo ''
      +
      +Error "done on line 13."
      diff --git a/modules/core/test/conf/test43.conf b/modules/core/test/conf/test43.conf
      new file mode 100644
      index 00000000000..264b9167767
      --- /dev/null
      +++ b/modules/core/test/conf/test43.conf
      @@ -0,0 +1,29 @@
      +# non necessarily nested.
      +
      +<Macro begindir $dir>
      +<Directory $dir>
      +# hello
      +</Macro>
      +
      +<Macro enddir>
      +</Directory>
      +</Macro>
      +
      +Use begindir /unexpected/1
      +Use enddir
      +
      +
      +Use begindir /unexpected/2
      +Use enddir
      +
      +Use begindir /unexpected/3
      +<Limit GET>
      +</Limit>
      +Use enddir
      +
      +<VirtualHost foo.com>
      +Use begindir /unexpected/4
      +Use enddir
      +</VirtualHost>
      +
      +Error ok!
      diff --git a/modules/core/test/conf/test44.conf b/modules/core/test/conf/test44.conf
      new file mode 100644
      index 00000000000..ef4883eb55e
      --- /dev/null
      +++ b/modules/core/test/conf/test44.conf
      @@ -0,0 +1,19 @@
      +# working recursion...
      +
      +<Macro foo>
      +use bla
      +</Macro>
      +
      +<Macro bla>
      +<IfDefine NoFoo>
      +use foo
      +</IfDefine>
      +</Macro>
      +
      +
      +<IfDefine !NoFoo>
      +# foo gonna call bla, bla wont call foo back...
      +use foo
      +</IfDefine>
      +
      +Error okay.
      diff --git a/modules/core/test/conf/test45.conf b/modules/core/test/conf/test45.conf
      new file mode 100644
      index 00000000000..039493589c3
      --- /dev/null
      +++ b/modules/core/test/conf/test45.conf
      @@ -0,0 +1,7 @@
      +# strange chars
      +
      +<Macro warnings $1 %2 &3 @4 #5 ~6 *7 .8 ,9 !a -b +c =d :e ;f ?g>
      +# hello $1 %2 &3 @4 #5 ~6 *7 .8 ,9 !a -b +c =d :e ;f ?g
      +</Macro>
      +
      +Error "done on line 7."
      diff --git a/modules/core/test/conf/test46.conf b/modules/core/test/conf/test46.conf
      new file mode 100644
      index 00000000000..50520ed7e26
      --- /dev/null
      +++ b/modules/core/test/conf/test46.conf
      @@ -0,0 +1,11 @@
      +# various working prefixes
      +
      +<Macro $i %j @k>
      +# hello %j @k
      +</Macro>
      +
      +<Macro warnings $i second>
      +# not used.
      +</Macro>
      +
      +Error okay.
      diff --git a/modules/core/test/conf/test47.conf b/modules/core/test/conf/test47.conf
      new file mode 100644
      index 00000000000..6e736641dd8
      --- /dev/null
      +++ b/modules/core/test/conf/test47.conf
      @@ -0,0 +1,15 @@
      +# empty macro contents...
      +
      +<Macro foo>
      +</Macro>
      +
      +Use foo
      +
      +<Macro bla $i>
      +</Macro>
      +
      +<Macro bof $i>
      +# some contents...
      +</Macro>
      +
      +Error okay.
      diff --git a/modules/core/test/conf/test48.conf b/modules/core/test/conf/test48.conf
      new file mode 100644
      index 00000000000..96bf461556d
      --- /dev/null
      +++ b/modules/core/test/conf/test48.conf
      @@ -0,0 +1,23 @@
      +# test substitution...
      +
      +<Macro M %premier>
      +Warning %premier
      +</Macro>
      +
      +Use M 1
      +Use M 12
      +Use M 123
      +Use M 1234
      +Use M 12345
      +Use M 123456
      +Use M 1234567
      +Use M 12345678
      +Use M 123456789
      +Use M 1234567890
      +Use M 1234567890a
      +Use M 1234567890ab
      +Use M 1234567890abc
      +Use M 1234567890abcd
      +Use M 1234567890abcde
      +
      +Error "done line 23."
      diff --git a/modules/core/test/conf/test49.conf b/modules/core/test/conf/test49.conf
      new file mode 100644
      index 00000000000..7a21c823ac8
      --- /dev/null
      +++ b/modules/core/test/conf/test49.conf
      @@ -0,0 +1,2 @@
      +# undef macro before anything
      +UndefMacro foo
      diff --git a/modules/core/test/conf/test50.conf b/modules/core/test/conf/test50.conf
      new file mode 100644
      index 00000000000..33dd359f9a8
      --- /dev/null
      +++ b/modules/core/test/conf/test50.conf
      @@ -0,0 +1,5 @@
      +# undef non existing macro
      +<Macro foo>
      +  Warning "foo macro"
      +</Macro>
      +UndefMacro bla
      diff --git a/modules/core/test/conf/test51.conf b/modules/core/test/conf/test51.conf
      new file mode 100644
      index 00000000000..50214fa3c8f
      --- /dev/null
      +++ b/modules/core/test/conf/test51.conf
      @@ -0,0 +1,9 @@
      +# undef existing macro, and try to use it
      +<Macro foo>
      +  Warning "foo macro contents"
      +</Macro>
      +# expanded, but will not be processed because of error
      +Use foo
      +UndefMacro foo
      +# error, does not exist anymore
      +Use foo
      diff --git a/modules/core/test/conf/test52.conf b/modules/core/test/conf/test52.conf
      new file mode 100644
      index 00000000000..bb77c737701
      --- /dev/null
      +++ b/modules/core/test/conf/test52.conf
      @@ -0,0 +1,8 @@
      +# undef existing macro, and try to use it
      +<Macro foo>
      +  Warning "foo macro contents line 1"
      +</Macro>
      +Use foo
      +UndefMacro foo
      +
      +Error "done line 8."
      diff --git a/modules/core/test/conf/test53.conf b/modules/core/test/conf/test53.conf
      new file mode 100644
      index 00000000000..08e8c988b3c
      --- /dev/null
      +++ b/modules/core/test/conf/test53.conf
      @@ -0,0 +1,2 @@
      +# use undefined macro without prior definition
      +Use bla
      diff --git a/modules/core/test/conf/test54.conf b/modules/core/test/conf/test54.conf
      new file mode 100644
      index 00000000000..7dd30aca5f9
      --- /dev/null
      +++ b/modules/core/test/conf/test54.conf
      @@ -0,0 +1,6 @@
      +# empty macro
      +<Macro foo>
      +</Macro>
      +Use foo
      +
      +Error "done line 6."
      diff --git a/modules/core/test/conf/test55.conf b/modules/core/test/conf/test55.conf
      new file mode 100644
      index 00000000000..bd978e98b37
      --- /dev/null
      +++ b/modules/core/test/conf/test55.conf
      @@ -0,0 +1,11 @@
      +# line numbers...
      +<Macro foo $where>
      +  Warning "macro foo(:2) line 1 ($where)"
      +</Macro>
      +<Macro bla $where>
      +  Warning "macro bla(:5) line 1 ($where)"
      +  Use foo "bla line 2"
      +</Macro>
      +Use foo "file line 9"
      +Use bla "file line 10"
      +Error "done line 11."
      diff --git a/modules/core/test/conf/test56.conf b/modules/core/test/conf/test56.conf
      new file mode 100644
      index 00000000000..b7366a28a9d
      --- /dev/null
      +++ b/modules/core/test/conf/test56.conf
      @@ -0,0 +1,18 @@
      +# nesting warnings
      +<Macro Open $dir>
      +  <Directory $dir>
      +    Warning "Open:2 $dir"
      +</Macro>
      +<Macro Close>
      +    Warning "Close:1"
      +  </Directory>
      +</Macro>
      +
      +# some uses
      +Use Open /tmp
      +Use Close
      +
      +Use Open /etc
      +Use Close
      +
      +Error "done line 18."
      diff --git a/modules/core/test/conf/test57.conf b/modules/core/test/conf/test57.conf
      new file mode 100644
      index 00000000000..7c36868b843
      --- /dev/null
      +++ b/modules/core/test/conf/test57.conf
      @@ -0,0 +1,4 @@
      +# empty argument name
      +<Macro foo $x ''>
      +  Warning "macro foo line 1"
      +</Macro>
      diff --git a/modules/core/test/conf/test58.conf b/modules/core/test/conf/test58.conf
      new file mode 100644
      index 00000000000..6c8a2eb76e9
      --- /dev/null
      +++ b/modules/core/test/conf/test58.conf
      @@ -0,0 +1,4 @@
      +# bad directive closing
      +<Macro foo
      +  Warning "macro foo line 1"
      +</Macro>
      diff --git a/modules/core/test/conf/test59.conf b/modules/core/test/conf/test59.conf
      new file mode 100644
      index 00000000000..9f43d7d3fed
      --- /dev/null
      +++ b/modules/core/test/conf/test59.conf
      @@ -0,0 +1,4 @@
      +# empty name
      +<Macro ''>
      +  Warning "empty quoted name macro"
      +</Macro>
      diff --git a/modules/core/test/conf/test60.conf b/modules/core/test/conf/test60.conf
      new file mode 100644
      index 00000000000..969a4ebe101
      --- /dev/null
      +++ b/modules/core/test/conf/test60.conf
      @@ -0,0 +1,17 @@
      +# @ escaping
      +<Macro Foo $one $two>
      +  Warning "macro Foo arg 1: $one"
      +  Warning "macro Foo arg 2: $two"
      +</Macro>
      +<Macro Bla @first @second>
      +  Warning Macro Bla arg 1: @first
      +  Warning Macro Bla arg 2: @second
      +  Use Foo @first 'second'
      +  Use Foo 'first' @second
      +  Use Foo @first @second
      +</Macro>
      +
      +Use Foo hello world
      +Use Bla "hello world" "thank you"
      +
      +Error "done on line 17."
      diff --git a/modules/core/test/conf/test61.conf b/modules/core/test/conf/test61.conf
      new file mode 100644
      index 00000000000..cd2859780ff
      --- /dev/null
      +++ b/modules/core/test/conf/test61.conf
      @@ -0,0 +1,18 @@
      +# deep expansion
      +<Macro F1 $x>
      +  Warning "F1:1 x=$x"
      +</Macro>
      +<Macro F2 $x>
      +  Warning "F2:1 x=$x"
      +  Use F1 $x
      +</Macro>
      +<Macro F3 $x>
      +  Warning "F3:1 x=$x"
      +  Use F2 $x
      +</Macro>
      +<Macro F4 $x>
      +  Warning "F4:1 x=$x"
      +  Use F3 $x
      +</Macro>
      +Use F4 "line=17"
      +Error "done line 18."
      diff --git a/modules/core/test/conf/test62.conf b/modules/core/test/conf/test62.conf
      new file mode 100644
      index 00000000000..9d611de5da4
      --- /dev/null
      +++ b/modules/core/test/conf/test62.conf
      @@ -0,0 +1,25 @@
      +# test continuations
      +<Macro Line \
      +  $start \
      +  $stop>
      +  Warning \
      +    "Line:1-2 start at $start"
      +  Warning \
      +    "Line:3-4 stop at $stop"
      +</Macro>
      +
      +Use Line 11 11
      +Use Line \
      +  12 13
      +Use Line \
      +  14 \
      +  16
      +Use Line 17 \
      +  18
      +Use Line \
      +  \
      +  19 \
      +  \
      +  23
      +
      +Error "done line 25."
      diff --git a/modules/core/test/conf/test63.conf b/modules/core/test/conf/test63.conf
      new file mode 100644
      index 00000000000..7988ae4416c
      --- /dev/null
      +++ b/modules/core/test/conf/test63.conf
      @@ -0,0 +1,9 @@
      +# include
      +include ${PWD}/inc63_1.conf
      +Use Foo "test63.conf:3"
      +<Macro Bla $where>
      +  Warning "Bla at $where"
      +</Macro>
      +include ${PWD}/inc63_2.conf
      +Use Bla "test63.conf:8"
      +Error "done at line 9."
      diff --git a/modules/core/test/conf/test64.conf b/modules/core/test/conf/test64.conf
      new file mode 100644
      index 00000000000..6c123281d63
      --- /dev/null
      +++ b/modules/core/test/conf/test64.conf
      @@ -0,0 +1,5 @@
      +# just continuations
      +Warning "on line 2"
      +Warning \
      +  "from line 3 to line 4"
      +Error "done on line 5."
      diff --git a/modules/core/test/conf/test65.conf b/modules/core/test/conf/test65.conf
      new file mode 100644
      index 00000000000..df9adc32220
      --- /dev/null
      +++ b/modules/core/test/conf/test65.conf
      @@ -0,0 +1,11 @@
      +# simple use continuation
      +<Macro Line $line>
      +  # first macro line is a comment
      +  Warning "Line: $line"
      +</Macro>
      +Use Line \
      +  "on line 6-7"
      +Use \
      +  Line \
      +    "on line 8-10"
      +Error "done on line 11."
      diff --git a/modules/core/test/conf/test66.conf b/modules/core/test/conf/test66.conf
      new file mode 100644
      index 00000000000..a14e58782d1
      --- /dev/null
      +++ b/modules/core/test/conf/test66.conf
      @@ -0,0 +1,7 @@
      +# no double substitution
      +<Macro Foo $x $y>
      +  Warning "Foo: x=$x y=$y"
      +</Macro>
      +Use Foo X Y
      +Use Foo "$y" "$x"
      +Error "done on line 7."
      diff --git a/modules/core/test/conf/test67.conf b/modules/core/test/conf/test67.conf
      new file mode 100644
      index 00000000000..04a5d3d95d9
      --- /dev/null
      +++ b/modules/core/test/conf/test67.conf
      @@ -0,0 +1 @@
      +Error "done at line 1 without LF."
      \ No newline at end of file
      diff --git a/modules/core/test/conf/test68.conf b/modules/core/test/conf/test68.conf
      new file mode 100644
      index 00000000000..2a7b85bd9f6
      --- /dev/null
      +++ b/modules/core/test/conf/test68.conf
      @@ -0,0 +1,5 @@
      +# two directives with continuations & no eol at eof
      +Warning \
      +  "line 2-3"
      +Error \
      +  "done on line 4-5."
      \ No newline at end of file
      diff --git a/modules/core/test/conf/test69.conf b/modules/core/test/conf/test69.conf
      new file mode 100644
      index 00000000000..11a083001d6
      --- /dev/null
      +++ b/modules/core/test/conf/test69.conf
      @@ -0,0 +1,14 @@
      +# warn if ignored non-blank stuff after closing '>'
      +<Macro Foo> this stuff is ignored...
      +  Warning "Foo"
      +</Macro> this stuff is ignored as well...
      +Use Foo
      +<Macro Bla>				
      +  Warning "Bla"
      +</Macro>			
      +Use Bla
      +<Macro Comments> # comments are fine
      +  Warning "Comments"
      +</Macro> # comments are fine
      +Use Comments
      +Error "done on line 14."
      diff --git a/modules/core/test/ref/test01.out b/modules/core/test/ref/test01.out
      new file mode 100644
      index 00000000000..9ea66657186
      --- /dev/null
      +++ b/modules/core/test/ref/test01.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test01.conf
      +httpd: Syntax error on line 2 of ./conf/test01.conf: <Macro macro definition: empty name
      +# exit: 1
      diff --git a/modules/core/test/ref/test02.out b/modules/core/test/ref/test02.out
      new file mode 100644
      index 00000000000..6b491913008
      --- /dev/null
      +++ b/modules/core/test/ref/test02.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test02.conf
      +httpd: Syntax error on line 2 of ./conf/test02.conf: <Macro macro definition: empty name
      +# exit: 1
      diff --git a/modules/core/test/ref/test03.out b/modules/core/test/ref/test03.out
      new file mode 100644
      index 00000000000..f85790124a9
      --- /dev/null
      +++ b/modules/core/test/ref/test03.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test03.conf
      +httpd: Syntax error on line 5 of ./conf/test03.conf: macro 'bla' undefined
      +# exit: 1
      diff --git a/modules/core/test/ref/test04.out b/modules/core/test/ref/test04.out
      new file mode 100644
      index 00000000000..aaa2e6bc883
      --- /dev/null
      +++ b/modules/core/test/ref/test04.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test04.conf
      +httpd: Syntax error on line 5 of ./conf/test04.conf: macro 'foo' (defined on line 2 of "./conf/test04.conf") used with 1 arguments instead of 0
      +# exit: 1
      diff --git a/modules/core/test/ref/test05.out b/modules/core/test/ref/test05.out
      new file mode 100644
      index 00000000000..184c40cd72c
      --- /dev/null
      +++ b/modules/core/test/ref/test05.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test05.conf
      +httpd: Syntax error on line 5 of ./conf/test05.conf: macro 'foo' (defined on line 2 of "./conf/test05.conf") used with 0 arguments instead of 1
      +# exit: 1
      diff --git a/modules/core/test/ref/test06.out b/modules/core/test/ref/test06.out
      new file mode 100644
      index 00000000000..221dd057ede
      --- /dev/null
      +++ b/modules/core/test/ref/test06.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test06.conf
      +httpd: Syntax error on line 5 of ./conf/test06.conf: macro 'foo' (defined on line 2 of "./conf/test06.conf") used with 2 arguments instead of 1
      +# exit: 1
      diff --git a/modules/core/test/ref/test07.out b/modules/core/test/ref/test07.out
      new file mode 100644
      index 00000000000..60003ecb58d
      --- /dev/null
      +++ b/modules/core/test/ref/test07.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test07.conf
      +httpd: Syntax error on line 2 of ./conf/test07.conf: macro 'foo' (defined on line 2 of "./conf/test07.conf")\n\tcontents error: expected token not found: </Macro>
      +# exit: 1
      diff --git a/modules/core/test/ref/test08.out b/modules/core/test/ref/test08.out
      new file mode 100644
      index 00000000000..124c7a0911f
      --- /dev/null
      +++ b/modules/core/test/ref/test08.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test08.conf
      +httpd: Syntax error on line 3 of ./conf/test08.conf: </Macro> without matching <Macro> section
      +# exit: 1
      diff --git a/modules/core/test/ref/test09.out b/modules/core/test/ref/test09.out
      new file mode 100644
      index 00000000000..9af12255590
      --- /dev/null
      +++ b/modules/core/test/ref/test09.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test09.conf
      +httpd: Syntax error on line 1 of macro 'foo' (defined on line 2 of "./conf/test09.conf") used on line 6 of "./conf/test09.conf": recursive use of macro 'foo' is invalid
      +# exit: 1
      diff --git a/modules/core/test/ref/test10.out b/modules/core/test/ref/test10.out
      new file mode 100644
      index 00000000000..4d81abcf719
      --- /dev/null
      +++ b/modules/core/test/ref/test10.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test10.conf
      +httpd: Syntax error on line 1 of macro 'bla' (defined on line 6 of "./conf/test10.conf") used on line 1 of "macro 'foo' (defined on line 2 of "./conf/test10.conf") used on line 10 of "./conf/test10.conf"": recursive use of macro 'foo' is invalid
      +# exit: 1
      diff --git a/modules/core/test/ref/test11.out b/modules/core/test/ref/test11.out
      new file mode 100644
      index 00000000000..d18c95eb5c7
      --- /dev/null
      +++ b/modules/core/test/ref/test11.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test11.conf
      +[core:warn] macro one.in line 1 on line 1 of macro 'one.in' (defined on line 1 of "macro 'foo' (defined on line 2 of "./conf/test11.conf") used on line 9 of "./conf/test11.conf"") used on line 12 of "./conf/test11.conf"
      +[core:error] done line 15. on line 15 of ./conf/test11.conf
      +AH00526: Syntax error on line 15 of ./conf/test11.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test12.out b/modules/core/test/ref/test12.out
      new file mode 100644
      index 00000000000..b1ab2348c96
      --- /dev/null
      +++ b/modules/core/test/ref/test12.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test12.conf
      +[macro:warn] macro 'foo' multiply defined: defined on line 2 of "./conf/test12.conf", redefined on line 6 of "./conf/test12.conf"
      +[core:warn] macro foo 2, line 1 on line 1 of macro 'foo' (defined on line 6 of "./conf/test12.conf") used on line 10 of "./conf/test12.conf"
      +[core:error] done line 12. on line 12 of ./conf/test12.conf
      +AH00526: Syntax error on line 12 of ./conf/test12.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test13.out b/modules/core/test/ref/test13.out
      new file mode 100644
      index 00000000000..13d501e3b94
      --- /dev/null
      +++ b/modules/core/test/ref/test13.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test13.conf
      +[macro:warn] macro 'foo' multiply defined: defined on line 2 of "./conf/test13.conf", redefined on line 12 of "./conf/test13.conf"
      +[core:warn] macro FOO line 1 on line 1 of macro 'foo' (defined on line 2 of "./conf/test13.conf") used on line 10 of "./conf/test13.conf"
      +[core:warn] redefined macro foo line 1 on line 1 of macro 'foo' (defined on line 12 of "./conf/test13.conf") used on line 16 of "./conf/test13.conf"
      +[core:error] done line 18. on line 18 of ./conf/test13.conf
      +AH00526: Syntax error on line 18 of ./conf/test13.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test14.out b/modules/core/test/ref/test14.out
      new file mode 100644
      index 00000000000..16507157f1f
      --- /dev/null
      +++ b/modules/core/test/ref/test14.out
      @@ -0,0 +1,14 @@
      +# testing with conf/test14.conf
      +AH00112: Warning: DocumentRoot [/projects/apache/web] does not exist
      +[core:warn] directory /projects/apache/web on line 5 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 17 of "./conf/test14.conf"
      +[core:warn] directory /projects/apache/web/intranet on line 8 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 17 of "./conf/test14.conf"
      +AH00112: Warning: DocumentRoot [/projects/perl/web] does not exist
      +[core:warn] directory /projects/perl/web on line 5 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 19 of "./conf/test14.conf"
      +[core:warn] directory /projects/perl/web/intranet on line 8 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 19 of "./conf/test14.conf"
      +AH00112: Warning: DocumentRoot [/projects/mines/web] does not exist
      +[core:warn] directory /projects/mines/web on line 5 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 21 of "./conf/test14.conf"
      +[core:warn] directory /projects/mines/web/intranet on line 8 of macro 'myvirtualhost' (defined on line 3 of "./conf/test14.conf") used on line 21 of "./conf/test14.conf"
      +[core:error] done line 23. on line 23 of ./conf/test14.conf
      +AH00526: Syntax error on line 23 of ./conf/test14.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test15.out b/modules/core/test/ref/test15.out
      new file mode 100644
      index 00000000000..b0b82b7bb27
      --- /dev/null
      +++ b/modules/core/test/ref/test15.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test15.conf
      +[macro:warn] bad cumulated nesting (+1) in macro 'test' (defined on line 2 of "./conf/test15.conf")
      +[core:error] should not reach this point. on line 9 of ./conf/test15.conf
      +AH00526: Syntax error on line 9 of ./conf/test15.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test16.out b/modules/core/test/ref/test16.out
      new file mode 100644
      index 00000000000..6e0f9cad1a0
      --- /dev/null
      +++ b/modules/core/test/ref/test16.out
      @@ -0,0 +1,5 @@
      +# testing with conf/test16.conf
      +[macro:warn] bad (negative) nesting on line 2 of macro 'foo' (defined on line 3 of "./conf/test16.conf")
      +[macro:warn] bad cumulated nesting (-1) in macro 'foo' (defined on line 3 of "./conf/test16.conf")
      +httpd: Syntax error on line 9 of ./conf/test16.conf: </Limit> without matching <Limit> section
      +# exit: 1
      diff --git a/modules/core/test/ref/test17.out b/modules/core/test/ref/test17.out
      new file mode 100644
      index 00000000000..c6ca16d0211
      --- /dev/null
      +++ b/modules/core/test/ref/test17.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test17.conf
      +[macro:warn] bad (negative) nesting on line 2 of macro 'foo' (defined on line 3 of "./conf/test17.conf")
      +[macro:warn] bad cumulated nesting (-1) in macro 'foo' (defined on line 3 of "./conf/test17.conf")
      +[core:error] done on line 10. on line 10 of ./conf/test17.conf
      +AH00526: Syntax error on line 10 of ./conf/test17.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test18.out b/modules/core/test/ref/test18.out
      new file mode 100644
      index 00000000000..c5cee819dfd
      --- /dev/null
      +++ b/modules/core/test/ref/test18.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test18.conf
      +[macro:warn] bad (negative) nesting on line 2 of macro 'foo' (defined on line 3 of "./conf/test18.conf")
      +[macro:warn] bad cumulated nesting (-1) in macro 'foo' (defined on line 3 of "./conf/test18.conf")
      +[core:error] done on line 10. on line 10 of ./conf/test18.conf
      +AH00526: Syntax error on line 10 of ./conf/test18.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test19.out b/modules/core/test/ref/test19.out
      new file mode 100644
      index 00000000000..411e5694a00
      --- /dev/null
      +++ b/modules/core/test/ref/test19.out
      @@ -0,0 +1,9 @@
      +# testing with conf/test19.conf
      +[core:warn] macro foo line 2 in Directory on line 1 of macro 'foo' (defined on line 3 of "./conf/test19.conf") used on line 9 of "./conf/test19.conf"
      +[core:warn] macro foo line 2 in Location on line 1 of macro 'foo' (defined on line 3 of "./conf/test19.conf") used on line 13 of "./conf/test19.conf"
      +[core:warn] macro foo line 2 in VirtualHost on line 1 of macro 'foo' (defined on line 3 of "./conf/test19.conf") used on line 17 of "./conf/test19.conf"
      +[core:warn] macro foo line 2 in VirtualHost & Directory on line 1 of macro 'foo' (defined on line 3 of "./conf/test19.conf") used on line 22 of "./conf/test19.conf"
      +[core:error] done line 26. on line 26 of ./conf/test19.conf
      +AH00526: Syntax error on line 26 of ./conf/test19.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test20.out b/modules/core/test/ref/test20.out
      new file mode 100644
      index 00000000000..3ce2b6073c1
      --- /dev/null
      +++ b/modules/core/test/ref/test20.out
      @@ -0,0 +1,4 @@
      +# testing with conf/test20.conf
      +AH00526: Syntax error on line 1 of macro 'foo' (defined on line 3 of "./conf/test20.conf") used on line 10 of "./conf/test20.conf":
      +<Directory not allowed here
      +# exit: 1
      diff --git a/modules/core/test/ref/test21.out b/modules/core/test/ref/test21.out
      new file mode 100644
      index 00000000000..ac8d843b52e
      --- /dev/null
      +++ b/modules/core/test/ref/test21.out
      @@ -0,0 +1,5 @@
      +# testing with conf/test21.conf
      +[core:error] macro foo dir /tmp on line 2 of macro 'foo' (defined on line 3 of "./conf/test21.conf") used on line 10 of "./conf/test21.conf"
      +AH00526: Syntax error on line 2 of macro 'foo' (defined on line 3 of "./conf/test21.conf") used on line 10 of "./conf/test21.conf":
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test22.out b/modules/core/test/ref/test22.out
      new file mode 100644
      index 00000000000..def17dd391d
      --- /dev/null
      +++ b/modules/core/test/ref/test22.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test22.conf
      +[core:warn] macro foo on line 2 of macro 'foo' (defined on line 3 of "./conf/test22.conf") used on line 9 of "./conf/test22.conf"
      +[core:error] done on line 11. on line 11 of ./conf/test22.conf
      +AH00526: Syntax error on line 11 of ./conf/test22.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test23.out b/modules/core/test/ref/test23.out
      new file mode 100644
      index 00000000000..827c861a781
      --- /dev/null
      +++ b/modules/core/test/ref/test23.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test23.conf
      +[core:warn] macro foo in /tmp on line 1 of macro 'foo' (defined on line 4 of "./conf/test23.conf") used on line 9 of "./conf/test23.conf"
      +[core:warn] macro foo in /tmp on line 1 of macro 'foo' (defined on line 4 of "./conf/test23.conf") used on line 12 of "./conf/test23.conf"
      +[core:error] done! on line 15 of ./conf/test23.conf
      +AH00526: Syntax error on line 15 of ./conf/test23.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test24.out b/modules/core/test/ref/test24.out
      new file mode 100644
      index 00000000000..e5d370dcc61
      --- /dev/null
      +++ b/modules/core/test/ref/test24.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test24.conf
      +[core:warn] macro bla intra on line 2 of macro 'bla' (defined on line 3 of "./conf/test24.conf") used on line 13 of "./conf/test24.conf"
      +[core:warn] macro bla private on line 5 of macro 'bla' (defined on line 3 of "./conf/test24.conf") used on line 13 of "./conf/test24.conf"
      +[core:warn] macro bla intra on line 2 of macro 'bla' (defined on line 3 of "./conf/test24.conf") used on line 17 of "./conf/test24.conf"
      +[core:warn] macro bla private on line 5 of macro 'bla' (defined on line 3 of "./conf/test24.conf") used on line 17 of "./conf/test24.conf"
      +AH00526: Syntax error on line 1 of macro 'bla' (defined on line 3 of "./conf/test24.conf") used on line 22 of "./conf/test24.conf":
      +<Location not allowed here
      +# exit: 1
      diff --git a/modules/core/test/ref/test25.out b/modules/core/test/ref/test25.out
      new file mode 100644
      index 00000000000..56bb0bd3323
      --- /dev/null
      +++ b/modules/core/test/ref/test25.out
      @@ -0,0 +1,9 @@
      +# testing with conf/test25.conf
      +[core:warn] restricted access policy 10.0.0.0/8 on line 1 of macro 'restrictedaccesspolicy' (defined on line 3 of "./conf/test25.conf") used on line 8 of "./conf/test25.conf"
      +[core:warn] restricted access policy 192.54.172.0/24 192.54.148.0/24 10.0.0.0/8 on line 1 of macro 'restrictedaccesspolicy' (defined on line 3 of "./conf/test25.conf") used on line 16 of "./conf/test25.conf"
      +[core:warn] restricted access policy 10.0.0.0/8 on line 1 of macro 'restrictedaccesspolicy' (defined on line 3 of "./conf/test25.conf") used on line 1 of "macro 'localaccessonly' (defined on line 11 of "./conf/test25.conf") used on line 20 of "./conf/test25.conf""
      +[core:warn] restricted access policy 10.0.0.0/8 on line 1 of macro 'restrictedaccesspolicy' (defined on line 3 of "./conf/test25.conf") used on line 1 of "macro 'localaccessonly' (defined on line 11 of "./conf/test25.conf") used on line 24 of "./conf/test25.conf""
      +[core:error] done line 27. on line 27 of ./conf/test25.conf
      +AH00526: Syntax error on line 27 of ./conf/test25.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test26.out b/modules/core/test/ref/test26.out
      new file mode 100644
      index 00000000000..28cba28dcfb
      --- /dev/null
      +++ b/modules/core/test/ref/test26.out
      @@ -0,0 +1,11 @@
      +# testing with conf/test26.conf
      +[macro:warn] macro 'funny' (defined on line 4 of "./conf/test26.conf") argument name 'first arg' (#1) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'funny' (defined on line 4 of "./conf/test26.conf") argument name 'second ... arg' (#2) without expected prefix, better prefix argument names with one of '$%@'.
      +[core:warn] funny directory on line 2 of macro 'funny' (defined on line 4 of "./conf/test26.conf") used on line 13 of "./conf/test26.conf"
      +[core:warn] funny location on line 5 of macro 'funny' (defined on line 4 of "./conf/test26.conf") used on line 13 of "./conf/test26.conf"
      +[core:warn] funny directory on line 2 of macro 'funny' (defined on line 4 of "./conf/test26.conf") used on line 16 of "./conf/test26.conf"
      +[core:warn] funny location on line 5 of macro 'funny' (defined on line 4 of "./conf/test26.conf") used on line 16 of "./conf/test26.conf"
      +[core:error] done! on line 19 of ./conf/test26.conf
      +AH00526: Syntax error on line 19 of ./conf/test26.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test27.out b/modules/core/test/ref/test27.out
      new file mode 100644
      index 00000000000..46aa8ea6e9b
      --- /dev/null
      +++ b/modules/core/test/ref/test27.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test27.conf
      +[core:warn] foo.one /unexpected/1 on line 2 of macro 'foo.one' (defined on line 1 of "macro 'foo' (defined on line 3 of "./conf/test27.conf") used on line 11 of "./conf/test27.conf"") used on line 14 of "./conf/test27.conf"
      +[core:warn] foo.two /unexpected/2 on line 2 of macro 'foo.two' (defined on line 1 of "macro 'foo' (defined on line 3 of "./conf/test27.conf") used on line 12 of "./conf/test27.conf"") used on line 15 of "./conf/test27.conf"
      +[core:warn] foo.one /unexpected/1 on line 2 of macro 'foo.one' (defined on line 1 of "macro 'foo' (defined on line 3 of "./conf/test27.conf") used on line 11 of "./conf/test27.conf"") used on line 16 of "./conf/test27.conf"
      +[core:error] done! on line 22 of ./conf/test27.conf
      +AH00526: Syntax error on line 22 of ./conf/test27.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test28.out b/modules/core/test/ref/test28.out
      new file mode 100644
      index 00000000000..eb0a23f3596
      --- /dev/null
      +++ b/modules/core/test/ref/test28.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test28.conf
      +[core:warn] macro foo on line 1 of macro 'foo' (defined on line 4 of "./conf/test28.conf") used on line 8 of "./conf/test28.conf"
      +[core:error] done! on line 10 of ./conf/test28.conf
      +AH00526: Syntax error on line 10 of ./conf/test28.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test29.out b/modules/core/test/ref/test29.out
      new file mode 100644
      index 00000000000..48488f9b4d2
      --- /dev/null
      +++ b/modules/core/test/ref/test29.out
      @@ -0,0 +1,4 @@
      +# testing with conf/test29.conf
      +[macro:warn] macro 'toobigaline' (defined on line 3 of "./conf/test29.conf") argument name 'a' (#1) without expected prefix, better prefix argument names with one of '$%@'.
      +httpd: Syntax error on line 8 of ./conf/test29.conf: macro 'toobigaline' (defined on line 3 of "./conf/test29.conf") used on line 8 of "./conf/test29.conf" error while substituting: while processing line 1 of macro 'toobigaline' (defined on line 3 of "./conf/test29.conf") cannot substitute, buffer size too small
      +# exit: 1
      diff --git a/modules/core/test/ref/test30.out b/modules/core/test/ref/test30.out
      new file mode 100644
      index 00000000000..a84c69f4951
      --- /dev/null
      +++ b/modules/core/test/ref/test30.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test30.conf
      +[macro:warn] macro 'foo' (defined on line 4 of "./conf/test30.conf"): argument name prefix conflict ($dir #1 and $directive #2), be careful about your macro definition!
      +[core:warn] section Directory /unexpected/1 on line 2 of macro 'foo' (defined on line 4 of "./conf/test30.conf") used on line 10 of "./conf/test30.conf"
      +[core:error] done! on line 12 of ./conf/test30.conf
      +AH00526: Syntax error on line 12 of ./conf/test30.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test31.out b/modules/core/test/ref/test31.out
      new file mode 100644
      index 00000000000..831a78417e7
      --- /dev/null
      +++ b/modules/core/test/ref/test31.out
      @@ -0,0 +1,23 @@
      +# testing with conf/test31.conf
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf"): argument name prefix conflict ($dir #1 and $di #2), be careful about your macro definition!
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf"): argument name prefix conflict ($dir #1 and $d #4), be careful about your macro definition!
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf"): argument name prefix conflict ($di #2 and $d #4), be careful about your macro definition!
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf"): argument name prefix conflict ($dd #3 and $d #4), be careful about your macro definition!
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf") used on line 8 of "./conf/test31.conf": empty argument #1
      +[macro:warn] macro 'bla' (defined on line 3 of "./conf/test31.conf") used on line 8 of "./conf/test31.conf": empty argument #2
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument name prefix conflict ($d #1 and $di #2), be careful about your macro definition!
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument name prefix conflict ($d #1 and $dir #3), be careful about your macro definition!
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument name prefix conflict ($d #1 and $dd #4), be careful about your macro definition!
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument name prefix conflict ($di #2 and $dir #3), be careful about your macro definition!
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument '$d' (#1) never used
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument '$di' (#2) never used
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument '$dir' (#3) never used
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf"): argument '$dd' (#4) never used
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf") used on line 14 of "./conf/test31.conf": empty argument #1
      +[macro:warn] macro 'foo' (defined on line 10 of "./conf/test31.conf") used on line 14 of "./conf/test31.conf": empty argument #2
      +[core:warn] argument name conflicts on line 1 of macro 'bla' (defined on line 3 of "./conf/test31.conf") used on line 8 of "./conf/test31.conf"
      +[core:warn] conflicts, but arguments are not used on line 1 of macro 'foo' (defined on line 10 of "./conf/test31.conf") used on line 14 of "./conf/test31.conf"
      +[core:error] done on line 16. on line 16 of ./conf/test31.conf
      +AH00526: Syntax error on line 16 of ./conf/test31.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test32.out b/modules/core/test/ref/test32.out
      new file mode 100644
      index 00000000000..b1620afb6e6
      --- /dev/null
      +++ b/modules/core/test/ref/test32.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test32.conf
      +httpd: Syntax error on line 3 of ./conf/test32.conf: argument name conflict in macro 'foo' (defined on line 3 of "./conf/test32.conf"): argument '$arg2': #2 and #4, change argument names!
      +# exit: 1
      diff --git a/modules/core/test/ref/test33.out b/modules/core/test/ref/test33.out
      new file mode 100644
      index 00000000000..cc5b3d0945e
      --- /dev/null
      +++ b/modules/core/test/ref/test33.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test33.conf
      +httpd: Syntax error on line 3 of ./conf/test33.conf: no macro defined before Use
      +# exit: 1
      diff --git a/modules/core/test/ref/test34.out b/modules/core/test/ref/test34.out
      new file mode 100644
      index 00000000000..1264a546ded
      --- /dev/null
      +++ b/modules/core/test/ref/test34.out
      @@ -0,0 +1,13 @@
      +# testing with conf/test34.conf
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test34.conf"): argument name prefix conflict ($d #1 and $dd #2), be careful about your macro definition!
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test34.conf"): argument '$d' (#1) never used
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test34.conf"): argument '$dd' (#2) never used
      +[macro:warn] macro 'bla' (defined on line 7 of "./conf/test34.conf"): argument name prefix conflict ($dd #1 and $d #2), be careful about your macro definition!
      +[macro:warn] macro 'bla' (defined on line 7 of "./conf/test34.conf"): argument '$dd' (#1) never used
      +[macro:warn] macro 'bla' (defined on line 7 of "./conf/test34.conf"): argument '$d' (#2) never used
      +[core:warn] macro foo conflict one on line 1 of macro 'foo' (defined on line 3 of "./conf/test34.conf") used on line 11 of "./conf/test34.conf"
      +[core:warn] macro bla conflict two on line 1 of macro 'bla' (defined on line 7 of "./conf/test34.conf") used on line 12 of "./conf/test34.conf"
      +[core:error] done on line 14. on line 14 of ./conf/test34.conf
      +AH00526: Syntax error on line 14 of ./conf/test34.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test35.out b/modules/core/test/ref/test35.out
      new file mode 100644
      index 00000000000..fb562383801
      --- /dev/null
      +++ b/modules/core/test/ref/test35.out
      @@ -0,0 +1,13 @@
      +# testing with conf/test35.conf
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf") argument name 'u1' (#1) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf") argument name 'u2' (#2) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf") argument name 'n1' (#3) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf") argument name 'n2' (#4) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf") argument name 'u3' (#5) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf"): argument 'n1' (#3) never used
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test35.conf"): argument 'n2' (#4) never used
      +[core:warn] macro cannot be used just within a comment 1 2 5 on line 1 of macro 'warnings' (defined on line 3 of "./conf/test35.conf") used on line 8 of "./conf/test35.conf"
      +[core:error] done on line 10. on line 10 of ./conf/test35.conf
      +AH00526: Syntax error on line 10 of ./conf/test35.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test36.out b/modules/core/test/ref/test36.out
      new file mode 100644
      index 00000000000..4c627d7dad3
      --- /dev/null
      +++ b/modules/core/test/ref/test36.out
      @@ -0,0 +1,20 @@
      +# testing with conf/test36.conf
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument name prefix conflict ($u #1 and $u1 #3), be careful about your macro definition!
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument name prefix conflict ($u #1 and $u2 #5), be careful about your macro definition!
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument name prefix conflict ($n #2 and $n1 #4), be careful about your macro definition!
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument name prefix conflict ($n #2 and $n2 #6), be careful about your macro definition!
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument '$n' (#2) never used
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument '$n1' (#4) never used
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf"): argument '$n2' (#6) never used
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #1
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #2
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #3
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #4
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #5
      +[macro:warn] macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf": empty argument #6
      +[core:warn] many warnings! 1 3 5 on line 1 of macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 7 of "./conf/test36.conf"
      +[core:warn] many warnings!    on line 1 of macro 'warnings' (defined on line 1 of "./conf/test36.conf") used on line 10 of "./conf/test36.conf"
      +[core:error] done! on line 12 of ./conf/test36.conf
      +AH00526: Syntax error on line 12 of ./conf/test36.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test37.out b/modules/core/test/ref/test37.out
      new file mode 100644
      index 00000000000..fc119c82cf0
      --- /dev/null
      +++ b/modules/core/test/ref/test37.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test37.conf
      +httpd: Syntax error on line 3 of ./conf/test37.conf: macro 'stupid' (defined on line 3 of "./conf/test37.conf"): empty argument #1 name
      +# exit: 1
      diff --git a/modules/core/test/ref/test38.out b/modules/core/test/ref/test38.out
      new file mode 100644
      index 00000000000..ed3f1bb08f5
      --- /dev/null
      +++ b/modules/core/test/ref/test38.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test38.conf
      +[core:warn] it is really a good idea to have mod_macro.c installed. on line 4 of ./conf/test38.conf
      +[core:error] it seems you do not have mod perl installed. on line 8 of ./conf/test38.conf
      +AH00526: Syntax error on line 8 of ./conf/test38.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test39.out b/modules/core/test/ref/test39.out
      new file mode 100644
      index 00000000000..ea2cede9ce2
      --- /dev/null
      +++ b/modules/core/test/ref/test39.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test39.conf
      +[core:warn] Thanks for using mod_macro! on line 1 of macro 'modmacro' (defined on line 4 of "./conf/test39.conf") used on line 15 of "./conf/test39.conf"
      +[core:warn] macro foo on line 1 of macro 'foo' (defined on line 17 of "./conf/test39.conf") used on line 21 of "./conf/test39.conf"
      +[core:error] done! on line 23 of ./conf/test39.conf
      +AH00526: Syntax error on line 23 of ./conf/test39.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test40.out b/modules/core/test/ref/test40.out
      new file mode 100644
      index 00000000000..e3c5971abb7
      --- /dev/null
      +++ b/modules/core/test/ref/test40.out
      @@ -0,0 +1,18 @@
      +# testing with conf/test40.conf
      +AH00112: Warning: DocumentRoot [/foo/document/root/directory] does not exist
      +[core:warn] location /A on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 15 of "./conf/test40.conf"
      +[core:warn] location /B on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 16 of "./conf/test40.conf"
      +[core:warn] location /C on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 17 of "./conf/test40.conf"
      +[core:warn] location /D on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 18 of "./conf/test40.conf"
      +[core:warn] location /E on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 19 of "./conf/test40.conf"
      +[core:warn] location /G on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 20 of "./conf/test40.conf"
      +[core:warn] location /H on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 21 of "./conf/test40.conf"
      +[core:warn] location /J on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 22 of "./conf/test40.conf"
      +[core:warn] location /K on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 23 of "./conf/test40.conf"
      +[core:warn] location /L on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 24 of "./conf/test40.conf"
      +[core:warn] location /M on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 25 of "./conf/test40.conf"
      +[core:warn] location /N on line 2 of macro 'subdiraccesscontrol' (defined on line 7 of "./conf/test40.conf") used on line 26 of "./conf/test40.conf"
      +[core:error] Stop configuration file processing. on line 33 of ./conf/test40.conf
      +AH00526: Syntax error on line 33 of ./conf/test40.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test41.out b/modules/core/test/ref/test41.out
      new file mode 100644
      index 00000000000..3bef2853da5
      --- /dev/null
      +++ b/modules/core/test/ref/test41.out
      @@ -0,0 +1,9 @@
      +# testing with conf/test41.conf
      +AH00112: Warning: DocumentRoot [/foo/document/root/directory] does not exist
      +[core:warn] location /A on line 7 of ./conf/test41.conf
      +[core:warn] location /B on line 11 of ./conf/test41.conf
      +[core:warn] location /C on line 15 of ./conf/test41.conf
      +[core:error] Stop configuration file processing. on line 20 of ./conf/test41.conf
      +AH00526: Syntax error on line 20 of ./conf/test41.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test42.out b/modules/core/test/ref/test42.out
      new file mode 100644
      index 00000000000..bab1510b8d3
      --- /dev/null
      +++ b/modules/core/test/ref/test42.out
      @@ -0,0 +1,15 @@
      +# testing with conf/test42.conf
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 7 of "./conf/test42.conf": empty argument #1
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 8 of "./conf/test42.conf": empty argument #1
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 9 of "./conf/test42.conf": empty argument #1
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 10 of "./conf/test42.conf": empty argument #1
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 11 of "./conf/test42.conf": empty argument #1
      +[core:warn] macro foo  on line 1 of macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 7 of "./conf/test42.conf"
      +[core:warn] macro foo  on line 1 of macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 8 of "./conf/test42.conf"
      +[core:warn] macro foo  on line 1 of macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 9 of "./conf/test42.conf"
      +[core:warn] macro foo  on line 1 of macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 10 of "./conf/test42.conf"
      +[core:warn] macro foo  on line 1 of macro 'foo' (defined on line 3 of "./conf/test42.conf") used on line 11 of "./conf/test42.conf"
      +[core:error] done on line 13. on line 13 of ./conf/test42.conf
      +AH00526: Syntax error on line 13 of ./conf/test42.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test43.out b/modules/core/test/ref/test43.out
      new file mode 100644
      index 00000000000..04a72d8a2ed
      --- /dev/null
      +++ b/modules/core/test/ref/test43.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test43.conf
      +[macro:warn] bad cumulated nesting (+1) in macro 'begindir' (defined on line 3 of "./conf/test43.conf")
      +[macro:warn] bad (negative) nesting on line 2 of macro 'enddir' (defined on line 8 of "./conf/test43.conf")
      +[macro:warn] bad cumulated nesting (-1) in macro 'enddir' (defined on line 8 of "./conf/test43.conf")
      +[core:error] ok! on line 29 of ./conf/test43.conf
      +AH00526: Syntax error on line 29 of ./conf/test43.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test44.out b/modules/core/test/ref/test44.out
      new file mode 100644
      index 00000000000..e744cda69bc
      --- /dev/null
      +++ b/modules/core/test/ref/test44.out
      @@ -0,0 +1,5 @@
      +# testing with conf/test44.conf
      +[core:error] okay. on line 19 of ./conf/test44.conf
      +AH00526: Syntax error on line 19 of ./conf/test44.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test45.out b/modules/core/test/ref/test45.out
      new file mode 100644
      index 00000000000..daadaac7d4e
      --- /dev/null
      +++ b/modules/core/test/ref/test45.out
      @@ -0,0 +1,19 @@
      +# testing with conf/test45.conf
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '&3' (#3) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '#5' (#5) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '~6' (#6) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '*7' (#7) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '.8' (#8) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name ',9' (#9) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '!a' (#10) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '-b' (#11) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '+c' (#12) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '=d' (#13) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name ':e' (#14) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name ';f' (#15) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf") argument name '?g' (#16) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 3 of "./conf/test45.conf"): empty contents!
      +[core:error] done on line 7. on line 7 of ./conf/test45.conf
      +AH00526: Syntax error on line 7 of ./conf/test45.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test46.out b/modules/core/test/ref/test46.out
      new file mode 100644
      index 00000000000..8059744e680
      --- /dev/null
      +++ b/modules/core/test/ref/test46.out
      @@ -0,0 +1,9 @@
      +# testing with conf/test46.conf
      +[macro:warn] macro '$i' (defined on line 3 of "./conf/test46.conf") better prefix a macro name with any of '$%@'
      +[macro:warn] macro '$i' (defined on line 3 of "./conf/test46.conf"): empty contents!
      +[macro:warn] macro 'warnings' (defined on line 7 of "./conf/test46.conf") argument name 'second' (#2) without expected prefix, better prefix argument names with one of '$%@'.
      +[macro:warn] macro 'warnings' (defined on line 7 of "./conf/test46.conf"): empty contents!
      +[core:error] okay. on line 11 of ./conf/test46.conf
      +AH00526: Syntax error on line 11 of ./conf/test46.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test47.out b/modules/core/test/ref/test47.out
      new file mode 100644
      index 00000000000..58fb3cc6b24
      --- /dev/null
      +++ b/modules/core/test/ref/test47.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test47.conf
      +[macro:warn] macro 'foo' (defined on line 3 of "./conf/test47.conf"): empty contents!
      +[macro:warn] macro 'bla' (defined on line 8 of "./conf/test47.conf"): empty contents!
      +[macro:warn] macro 'bof' (defined on line 11 of "./conf/test47.conf"): empty contents!
      +[core:error] okay. on line 15 of ./conf/test47.conf
      +AH00526: Syntax error on line 15 of ./conf/test47.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test48.out b/modules/core/test/ref/test48.out
      new file mode 100644
      index 00000000000..6ac5e993c3a
      --- /dev/null
      +++ b/modules/core/test/ref/test48.out
      @@ -0,0 +1,20 @@
      +# testing with conf/test48.conf
      +[core:warn] 1 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 7 of "./conf/test48.conf"
      +[core:warn] 12 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 8 of "./conf/test48.conf"
      +[core:warn] 123 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 9 of "./conf/test48.conf"
      +[core:warn] 1234 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 10 of "./conf/test48.conf"
      +[core:warn] 12345 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 11 of "./conf/test48.conf"
      +[core:warn] 123456 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 12 of "./conf/test48.conf"
      +[core:warn] 1234567 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 13 of "./conf/test48.conf"
      +[core:warn] 12345678 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 14 of "./conf/test48.conf"
      +[core:warn] 123456789 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 15 of "./conf/test48.conf"
      +[core:warn] 1234567890 on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 16 of "./conf/test48.conf"
      +[core:warn] 1234567890a on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 17 of "./conf/test48.conf"
      +[core:warn] 1234567890ab on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 18 of "./conf/test48.conf"
      +[core:warn] 1234567890abc on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 19 of "./conf/test48.conf"
      +[core:warn] 1234567890abcd on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 20 of "./conf/test48.conf"
      +[core:warn] 1234567890abcde on line 1 of macro 'm' (defined on line 3 of "./conf/test48.conf") used on line 21 of "./conf/test48.conf"
      +[core:error] done line 23. on line 23 of ./conf/test48.conf
      +AH00526: Syntax error on line 23 of ./conf/test48.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test49.out b/modules/core/test/ref/test49.out
      new file mode 100644
      index 00000000000..5e83e02e3ea
      --- /dev/null
      +++ b/modules/core/test/ref/test49.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test49.conf
      +httpd: Syntax error on line 2 of ./conf/test49.conf: no macro defined before UndefMacro
      +# exit: 1
      diff --git a/modules/core/test/ref/test50.out b/modules/core/test/ref/test50.out
      new file mode 100644
      index 00000000000..477e8549d7f
      --- /dev/null
      +++ b/modules/core/test/ref/test50.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test50.conf
      +httpd: Syntax error on line 5 of ./conf/test50.conf: cannot remove undefined macro 'bla'
      +# exit: 1
      diff --git a/modules/core/test/ref/test51.out b/modules/core/test/ref/test51.out
      new file mode 100644
      index 00000000000..be9cc17a1b2
      --- /dev/null
      +++ b/modules/core/test/ref/test51.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test51.conf
      +httpd: Syntax error on line 9 of ./conf/test51.conf: macro 'foo' undefined
      +# exit: 1
      diff --git a/modules/core/test/ref/test52.out b/modules/core/test/ref/test52.out
      new file mode 100644
      index 00000000000..f41b7d6888b
      --- /dev/null
      +++ b/modules/core/test/ref/test52.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test52.conf
      +[core:warn] foo macro contents line 1 on line 1 of macro 'foo' (defined on line 2 of "./conf/test52.conf") used on line 5 of "./conf/test52.conf"
      +[core:error] done line 8. on line 8 of ./conf/test52.conf
      +AH00526: Syntax error on line 8 of ./conf/test52.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test53.out b/modules/core/test/ref/test53.out
      new file mode 100644
      index 00000000000..2fb3852d845
      --- /dev/null
      +++ b/modules/core/test/ref/test53.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test53.conf
      +httpd: Syntax error on line 2 of ./conf/test53.conf: no macro defined before Use
      +# exit: 1
      diff --git a/modules/core/test/ref/test54.out b/modules/core/test/ref/test54.out
      new file mode 100644
      index 00000000000..814b491e6c0
      --- /dev/null
      +++ b/modules/core/test/ref/test54.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test54.conf
      +[macro:warn] macro 'foo' (defined on line 2 of "./conf/test54.conf"): empty contents!
      +[core:error] done line 6. on line 6 of ./conf/test54.conf
      +AH00526: Syntax error on line 6 of ./conf/test54.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test55.out b/modules/core/test/ref/test55.out
      new file mode 100644
      index 00000000000..c3590f95de9
      --- /dev/null
      +++ b/modules/core/test/ref/test55.out
      @@ -0,0 +1,8 @@
      +# testing with conf/test55.conf
      +[core:warn] macro foo(:2) line 1 (file line 9) on line 1 of macro 'foo' (defined on line 2 of "./conf/test55.conf") used on line 9 of "./conf/test55.conf"
      +[core:warn] macro bla(:5) line 1 (file line 10) on line 1 of macro 'bla' (defined on line 5 of "./conf/test55.conf") used on line 10 of "./conf/test55.conf"
      +[core:warn] macro foo(:2) line 1 (bla line 2) on line 1 of macro 'foo' (defined on line 2 of "./conf/test55.conf") used on line 2 of "macro 'bla' (defined on line 5 of "./conf/test55.conf") used on line 10 of "./conf/test55.conf""
      +[core:error] done line 11. on line 11 of ./conf/test55.conf
      +AH00526: Syntax error on line 11 of ./conf/test55.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test56.out b/modules/core/test/ref/test56.out
      new file mode 100644
      index 00000000000..f2a0b6e2fc6
      --- /dev/null
      +++ b/modules/core/test/ref/test56.out
      @@ -0,0 +1,12 @@
      +# testing with conf/test56.conf
      +[macro:warn] bad cumulated nesting (+1) in macro 'open' (defined on line 2 of "./conf/test56.conf")
      +[macro:warn] bad (negative) nesting on line 3 of macro 'close' (defined on line 6 of "./conf/test56.conf")
      +[macro:warn] bad cumulated nesting (-1) in macro 'close' (defined on line 6 of "./conf/test56.conf")
      +[core:warn] Open:2 /tmp on line 2 of macro 'open' (defined on line 2 of "./conf/test56.conf") used on line 12 of "./conf/test56.conf"
      +[core:warn] Close:1 on line 1 of macro 'close' (defined on line 6 of "./conf/test56.conf") used on line 13 of "./conf/test56.conf"
      +[core:warn] Open:2 /etc on line 2 of macro 'open' (defined on line 2 of "./conf/test56.conf") used on line 15 of "./conf/test56.conf"
      +[core:warn] Close:1 on line 1 of macro 'close' (defined on line 6 of "./conf/test56.conf") used on line 16 of "./conf/test56.conf"
      +[core:error] done line 18. on line 18 of ./conf/test56.conf
      +AH00526: Syntax error on line 18 of ./conf/test56.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test57.out b/modules/core/test/ref/test57.out
      new file mode 100644
      index 00000000000..77a190111c0
      --- /dev/null
      +++ b/modules/core/test/ref/test57.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test57.conf
      +httpd: Syntax error on line 2 of ./conf/test57.conf: macro 'foo' (defined on line 2 of "./conf/test57.conf"): empty argument #2 name
      +# exit: 1
      diff --git a/modules/core/test/ref/test58.out b/modules/core/test/ref/test58.out
      new file mode 100644
      index 00000000000..0ece028d418
      --- /dev/null
      +++ b/modules/core/test/ref/test58.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test58.conf
      +httpd: Syntax error on line 2 of ./conf/test58.conf: <Macro> directive missing closing '>'
      +# exit: 1
      diff --git a/modules/core/test/ref/test59.out b/modules/core/test/ref/test59.out
      new file mode 100644
      index 00000000000..7895917b488
      --- /dev/null
      +++ b/modules/core/test/ref/test59.out
      @@ -0,0 +1,3 @@
      +# testing with conf/test59.conf
      +httpd: Syntax error on line 2 of ./conf/test59.conf: <Macro macro definition: name not found
      +# exit: 1
      diff --git a/modules/core/test/ref/test60.out b/modules/core/test/ref/test60.out
      new file mode 100644
      index 00000000000..cac70028611
      --- /dev/null
      +++ b/modules/core/test/ref/test60.out
      @@ -0,0 +1,15 @@
      +# testing with conf/test60.conf
      +[core:warn] macro Foo arg 1: hello on line 1 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 14 of "./conf/test60.conf"
      +[core:warn] macro Foo arg 2: world on line 2 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 14 of "./conf/test60.conf"
      +[core:warn] Macro Bla arg 1: "hello world" on line 1 of macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf"
      +[core:warn] Macro Bla arg 2: "thank you" on line 2 of macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf"
      +[core:warn] macro Foo arg 1: hello world on line 1 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 3 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:warn] macro Foo arg 2: second on line 2 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 3 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:warn] macro Foo arg 1: first on line 1 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 4 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:warn] macro Foo arg 2: thank you on line 2 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 4 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:warn] macro Foo arg 1: hello world on line 1 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 5 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:warn] macro Foo arg 2: thank you on line 2 of macro 'foo' (defined on line 2 of "./conf/test60.conf") used on line 5 of "macro 'bla' (defined on line 6 of "./conf/test60.conf") used on line 15 of "./conf/test60.conf""
      +[core:error] done on line 17. on line 17 of ./conf/test60.conf
      +AH00526: Syntax error on line 17 of ./conf/test60.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test61.out b/modules/core/test/ref/test61.out
      new file mode 100644
      index 00000000000..59639c9750c
      --- /dev/null
      +++ b/modules/core/test/ref/test61.out
      @@ -0,0 +1,9 @@
      +# testing with conf/test61.conf
      +[core:warn] F4:1 x=line=17 on line 1 of macro 'f4' (defined on line 13 of "./conf/test61.conf") used on line 17 of "./conf/test61.conf"
      +[core:warn] F3:1 x=line=17 on line 1 of macro 'f3' (defined on line 9 of "./conf/test61.conf") used on line 2 of "macro 'f4' (defined on line 13 of "./conf/test61.conf") used on line 17 of "./conf/test61.conf""
      +[core:warn] F2:1 x=line=17 on line 1 of macro 'f2' (defined on line 5 of "./conf/test61.conf") used on line 2 of "macro 'f3' (defined on line 9 of "./conf/test61.conf") used on line 2 of "macro 'f4' (defined on line 13 of "./conf/test61.conf") used on line 17 of "./conf/test61.conf"""
      +[core:warn] F1:1 x=line=17 on line 1 of macro 'f1' (defined on line 2 of "./conf/test61.conf") used on line 2 of "macro 'f2' (defined on line 5 of "./conf/test61.conf") used on line 2 of "macro 'f3' (defined on line 9 of "./conf/test61.conf") used on line 2 of "macro 'f4' (defined on line 13 of "./conf/test61.conf") used on line 17 of "./conf/test61.conf""""
      +[core:error] done line 18. on line 18 of ./conf/test61.conf
      +AH00526: Syntax error on line 18 of ./conf/test61.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test62.out b/modules/core/test/ref/test62.out
      new file mode 100644
      index 00000000000..a956e7e7b8a
      --- /dev/null
      +++ b/modules/core/test/ref/test62.out
      @@ -0,0 +1,15 @@
      +# testing with conf/test62.conf
      +[core:warn] Line:1-2 start at 11 on line 1 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 11 of "./conf/test62.conf"
      +[core:warn] Line:3-4 stop at 11 on line 2 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 11 of "./conf/test62.conf"
      +[core:warn] Line:1-2 start at 12 on line 1 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 13 of "./conf/test62.conf"
      +[core:warn] Line:3-4 stop at 13 on line 2 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 13 of "./conf/test62.conf"
      +[core:warn] Line:1-2 start at 14 on line 1 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 16 of "./conf/test62.conf"
      +[core:warn] Line:3-4 stop at 16 on line 2 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 16 of "./conf/test62.conf"
      +[core:warn] Line:1-2 start at 17 on line 1 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 18 of "./conf/test62.conf"
      +[core:warn] Line:3-4 stop at 18 on line 2 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 18 of "./conf/test62.conf"
      +[core:warn] Line:1-2 start at 19 on line 1 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 23 of "./conf/test62.conf"
      +[core:warn] Line:3-4 stop at 23 on line 2 of macro 'line' (defined on line 4 of "./conf/test62.conf") used on line 23 of "./conf/test62.conf"
      +[core:error] done line 25. on line 25 of ./conf/test62.conf
      +AH00526: Syntax error on line 25 of ./conf/test62.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test63.out b/modules/core/test/ref/test63.out
      new file mode 100644
      index 00000000000..985710dd404
      --- /dev/null
      +++ b/modules/core/test/ref/test63.out
      @@ -0,0 +1,10 @@
      +# testing with conf/test63.conf
      +[core:warn] Foo macro at inc63_.conf:5 on line 1 of macro 'foo' (defined on line 2 of "./conf/inc63_1.conf") used on line 5 of "./conf/inc63_1.conf"
      +[core:warn] Foo macro at test63.conf:3 on line 1 of macro 'foo' (defined on line 2 of "./conf/inc63_1.conf") used on line 3 of "./conf/test63.conf"
      +[core:warn] Foo macro at inc63_2.conf:2 on line 1 of macro 'foo' (defined on line 2 of "./conf/inc63_1.conf") used on line 2 of "./conf/inc63_2.conf"
      +[core:warn] Bla at inc63_2.conf:3 on line 1 of macro 'bla' (defined on line 4 of "./conf/test63.conf") used on line 3 of "./conf/inc63_2.conf"
      +[core:warn] Bla at test63.conf:8 on line 1 of macro 'bla' (defined on line 4 of "./conf/test63.conf") used on line 8 of "./conf/test63.conf"
      +[core:error] done at line 9. on line 9 of ./conf/test63.conf
      +AH00526: Syntax error on line 9 of ./conf/test63.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test64.out b/modules/core/test/ref/test64.out
      new file mode 100644
      index 00000000000..99fec92d20c
      --- /dev/null
      +++ b/modules/core/test/ref/test64.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test64.conf
      +[core:warn] on line 2 on line 2 of ./conf/test64.conf
      +[core:warn] from line 3 to line 4 on line 4 of ./conf/test64.conf
      +[core:error] done on line 5. on line 5 of ./conf/test64.conf
      +AH00526: Syntax error on line 5 of ./conf/test64.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test65.out b/modules/core/test/ref/test65.out
      new file mode 100644
      index 00000000000..62882e28f19
      --- /dev/null
      +++ b/modules/core/test/ref/test65.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test65.conf
      +[core:warn] Line: on line 6-7 on line 1 of macro 'line' (defined on line 2 of "./conf/test65.conf") used on line 7 of "./conf/test65.conf"
      +[core:warn] Line: on line 8-10 on line 1 of macro 'line' (defined on line 2 of "./conf/test65.conf") used on line 10 of "./conf/test65.conf"
      +[core:error] done on line 11. on line 11 of ./conf/test65.conf
      +AH00526: Syntax error on line 11 of ./conf/test65.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test66.out b/modules/core/test/ref/test66.out
      new file mode 100644
      index 00000000000..db8616a957d
      --- /dev/null
      +++ b/modules/core/test/ref/test66.out
      @@ -0,0 +1,7 @@
      +# testing with conf/test66.conf
      +[core:warn] Foo: x=X y=Y on line 1 of macro 'foo' (defined on line 2 of "./conf/test66.conf") used on line 5 of "./conf/test66.conf"
      +[core:warn] Foo: x=$y y=$x on line 1 of macro 'foo' (defined on line 2 of "./conf/test66.conf") used on line 6 of "./conf/test66.conf"
      +[core:error] done on line 7. on line 7 of ./conf/test66.conf
      +AH00526: Syntax error on line 7 of ./conf/test66.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test67.out b/modules/core/test/ref/test67.out
      new file mode 100644
      index 00000000000..b83f0749078
      --- /dev/null
      +++ b/modules/core/test/ref/test67.out
      @@ -0,0 +1,5 @@
      +# testing with conf/test67.conf
      +[core:error] done at line 1 without LF. on line 1 of ./conf/test67.conf
      +AH00526: Syntax error on line 1 of ./conf/test67.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test68.out b/modules/core/test/ref/test68.out
      new file mode 100644
      index 00000000000..0289127b26a
      --- /dev/null
      +++ b/modules/core/test/ref/test68.out
      @@ -0,0 +1,6 @@
      +# testing with conf/test68.conf
      +[core:warn] line 2-3 on line 3 of ./conf/test68.conf
      +[core:error] done on line 4-5. on line 5 of ./conf/test68.conf
      +AH00526: Syntax error on line 5 of ./conf/test68.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/core/test/ref/test69.out b/modules/core/test/ref/test69.out
      new file mode 100644
      index 00000000000..ac0c1dbd8ac
      --- /dev/null
      +++ b/modules/core/test/ref/test69.out
      @@ -0,0 +1,10 @@
      +# testing with conf/test69.conf
      +[macro:warn] non blank chars found after <Macro closing '>' on line 2 of ./conf/test69.conf:  this stuff is ignored...
      +[macro:warn] non blank chars found after directive closing on line 4 of ./conf/test69.conf:  this stuff is ignored as well...
      +[core:warn] Foo on line 1 of macro 'foo' (defined on line 2 of "./conf/test69.conf") used on line 5 of "./conf/test69.conf"
      +[core:warn] Bla on line 1 of macro 'bla' (defined on line 6 of "./conf/test69.conf") used on line 9 of "./conf/test69.conf"
      +[core:warn] Comments on line 1 of macro 'comments' (defined on line 10 of "./conf/test69.conf") used on line 13 of "./conf/test69.conf"
      +[core:error] done on line 14. on line 14 of ./conf/test69.conf
      +AH00526: Syntax error on line 14 of ./conf/test69.conf:
      +Configuration processing stopped by Error directive
      +# exit: 1
      diff --git a/modules/database/mod_dbd.c b/modules/database/mod_dbd.c
      index a4a266d16aa..72126652e20 100644
      --- a/modules/database/mod_dbd.c
      +++ b/modules/database/mod_dbd.c
      @@ -175,20 +175,20 @@ static const char *dbd_param(cmd_parms *cmd, void *dconf, const char *val)
                */
               rv = apr_dbd_get_driver(cmd->pool, cfg->name, &driver);
               if (APR_STATUS_IS_ENOTIMPL(rv)) {
      -            return apr_psprintf(cmd->pool, "DBD: No driver for %s", cfg->name);
      +            return apr_psprintf(cmd->pool, "No driver for %s", cfg->name);
               }
               else if (APR_STATUS_IS_EDSOOPEN(rv)) {
                   return apr_psprintf(cmd->pool,
       #ifdef NETWARE
      -                                "DBD: Can't load driver file dbd%s.nlm",
      +                                "Can't load driver file dbd%s.nlm",
       #else
      -                                "DBD: Can't load driver file apr_dbd_%s.so",
      +                                "Can't load driver file apr_dbd_%s.so",
       #endif
                                       cfg->name);
               }
               else if (APR_STATUS_IS_ESYMNOTFOUND(rv)) {
                   return apr_psprintf(cmd->pool,
      -                                "DBD: Failed to load driver apr_dbd_%s_driver",
      +                                "Failed to load driver apr_dbd_%s_driver",
                                       cfg->name);
               }
               break;
      @@ -327,7 +327,7 @@ DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec *s, const char *query,
       
           if (apr_hash_get(svr->cfg->queries, label, APR_HASH_KEY_STRING)
               && strcmp(query, "")) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(02653)
                            "conflicting SQL statements with label %s", label);
           }
       
      @@ -435,7 +435,6 @@ static apr_status_t dbd_prepared_init(apr_pool_t *pool, dbd_cfg_t *cfg,
                                             ap_dbd_t *rec)
       {
           apr_hash_index_t *hi;
      -    apr_status_t rv = APR_SUCCESS;
       
           rec->prepared = apr_hash_make(pool);
       
      @@ -453,14 +452,14 @@ static apr_status_t dbd_prepared_init(apr_pool_t *pool, dbd_cfg_t *cfg,
               stmt = NULL;
               if (apr_dbd_prepare(rec->driver, pool, rec->handle, query,
                                   label, &stmt)) {
      -            rv = APR_EGENERAL;
      +            return APR_EGENERAL;
               }
               else {
                   apr_hash_set(rec->prepared, label, APR_HASH_KEY_STRING, stmt);
               }
           }
       
      -    return rv;
      +    return APR_SUCCESS;
       }
       
       static apr_status_t dbd_init_sql_init(apr_pool_t *pool, dbd_cfg_t *cfg,
      @@ -522,8 +521,8 @@ static apr_status_t dbd_construct(void **data_ptr,
       
           rv = apr_pool_create(&rec_pool, pool);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, cfg->server,
      -                     "DBD: Failed to create memory pool");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, cfg->server, APLOGNO(00624)
      +                     "Failed to create memory pool");
               return rv;
           }
       
      @@ -539,21 +538,21 @@ static apr_status_t dbd_construct(void **data_ptr,
           rv = apr_dbd_get_driver(rec->pool, cfg->name, &rec->driver);
           if (rv != APR_SUCCESS) {
               if (APR_STATUS_IS_ENOTIMPL(rv)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: driver for %s not available", cfg->name);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00625)
      +                         "driver for %s not available", cfg->name);
               }
               else if (APR_STATUS_IS_EDSOOPEN(rv)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: can't find driver for %s", cfg->name);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00626)
      +                         "can't find driver for %s", cfg->name);
               }
               else if (APR_STATUS_IS_ESYMNOTFOUND(rv)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: driver for %s is invalid or corrupted",
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00627)
      +                         "driver for %s is invalid or corrupted",
                                cfg->name);
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: mod_dbd not compatible with APR in get_driver");
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00628)
      +                         "mod_dbd not compatible with APR in get_driver");
               }
               apr_pool_destroy(rec->pool);
               return rv;
      @@ -563,12 +562,12 @@ static apr_status_t dbd_construct(void **data_ptr,
           if (rv != APR_SUCCESS) {
               switch (rv) {
               case APR_EGENERAL:
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: Can't connect to %s: %s", cfg->name, err);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00629)
      +                         "Can't connect to %s: %s", cfg->name, err);
                   break;
               default:
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                         "DBD: mod_dbd not compatible with APR in open");
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00630)
      +                         "mod_dbd not compatible with APR in open");
                   break;
               }
       
      @@ -584,8 +583,8 @@ static apr_status_t dbd_construct(void **data_ptr,
            */
           rv = apr_pool_create(&prepared_pool, rec->pool);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, cfg->server,
      -                     "DBD: Failed to create memory pool");
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, cfg->server, APLOGNO(00631)
      +                     "Failed to create memory pool");
       
               apr_pool_destroy(rec->pool);
               return rv;
      @@ -594,8 +593,8 @@ static apr_status_t dbd_construct(void **data_ptr,
           rv = dbd_prepared_init(prepared_pool, cfg, rec);
           if (rv != APR_SUCCESS) {
               const char *errmsg = apr_dbd_error(rec->driver, rec->handle, rv);
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server,
      -                     "DBD: failed to prepare SQL statements: %s",
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, cfg->server, APLOGNO(00632)
      +                     "failed to prepare SQL statements: %s",
                            (errmsg ? errmsg : "[???]"));
       
               apr_pool_destroy(rec->pool);
      @@ -648,8 +647,8 @@ static apr_status_t dbd_setup(server_rec *s, dbd_group_t *group)
                                   dbd_construct, dbd_destruct, group,
                                   group->pool);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "DBD: failed to initialise");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00633)
      +                     "failed to initialise");
               return rv;
           }
       
      @@ -670,8 +669,8 @@ static apr_status_t dbd_setup_init(apr_pool_t *pool, server_rec *s)
       
               rv2 = apr_pool_create(&group->pool, pool);
               if (rv2 != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv2, s,
      -                         "DBD: Failed to create reslist cleanup memory pool");
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv2, s, APLOGNO(00634)
      +                         "Failed to create reslist cleanup memory pool");
                   return rv2;
               }
       
      @@ -690,8 +689,8 @@ static apr_status_t dbd_setup_init(apr_pool_t *pool, server_rec *s)
               rv2 = apr_thread_mutex_create(&group->mutex,
                                             APR_THREAD_MUTEX_DEFAULT, pool);
               if (rv2 != APR_SUCCESS) {
      -             ap_log_error(APLOG_MARK, APLOG_CRIT, rv2, s,
      -                          "DBD: Failed to create thread mutex");
      +             ap_log_error(APLOG_MARK, APLOG_CRIT, rv2, s, APLOGNO(00635)
      +                          "Failed to create thread mutex");
                    return rv2;
               }
       #endif
      @@ -704,8 +703,8 @@ static void dbd_child_init(apr_pool_t *p, server_rec *s)
       {
         apr_status_t rv = dbd_setup_init(p, s);
         if (rv) {
      -    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                 "DBD: child init failed!");
      +    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00636)
      +                 "child init failed!");
         }
       }
       
      @@ -724,8 +723,8 @@ static apr_status_t dbd_setup_lock(server_rec *s, dbd_group_t *group)
       
           rv2 = apr_thread_mutex_lock(group->mutex);
           if (rv2 != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv2, s,
      -                     "DBD: Failed to acquire thread mutex");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv2, s, APLOGNO(00637)
      +                     "Failed to acquire thread mutex");
               return rv2;
           }
       
      @@ -735,8 +734,8 @@ static apr_status_t dbd_setup_lock(server_rec *s, dbd_group_t *group)
       
           rv2 = apr_thread_mutex_unlock(group->mutex);
           if (rv2 != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv2, s,
      -                     "DBD: Failed to release thread mutex");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv2, s, APLOGNO(00638)
      +                     "Failed to release thread mutex");
               if (rv == APR_SUCCESS) {
                   rv = rv2;
               }
      @@ -783,7 +782,7 @@ static apr_status_t dbd_check(apr_pool_t *pool, server_rec *s, ap_dbd_t *rec)
           }
       
           svr = ap_get_module_config(s->module_config, &dbd_module);
      -    ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +    ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00639)
                        "DBD [%s] Error: %s", svr->cfg->name, errmsg);
           return rv;
       }
      @@ -800,7 +799,8 @@ DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s)
       
           /* If nothing is configured, we shouldn't be here */
           if (cfg->name == no_dbdriver) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "DBD: not configured");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02654)
      +                     "not configured");
               return NULL;
           }
       
      @@ -823,7 +823,7 @@ DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t *pool, server_rec *s)
       
           rv = apr_reslist_acquire(group->reslist, (void*) &rec);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02655)
                            "Failed to acquire DBD connection from pool!");
               return NULL;
           }
      diff --git a/modules/database/mod_dbd.dep b/modules/database/mod_dbd.dep
      new file mode 100644
      index 00000000000..ba15c8f2731
      --- /dev/null
      +++ b/modules/database/mod_dbd.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dbd.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_dbd.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dbd.h"\
      +	
      diff --git a/modules/database/mod_dbd.mak b/modules/database/mod_dbd.mak
      new file mode 100644
      index 00000000000..5cf22653ab2
      --- /dev/null
      +++ b/modules/database/mod_dbd.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dbd.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dbd - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_dbd - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dbd - Win32 Release" && "$(CFG)" != "mod_dbd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dbd.mak" CFG="mod_dbd - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dbd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dbd.obj"
      +	-@erase "$(INTDIR)\mod_dbd.res"
      +	-@erase "$(INTDIR)\mod_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DBD_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dbd_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dbd.so" /d LONG_NAME="dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dbd.pdb" /debug /out:"$(OUTDIR)\mod_dbd.so" /implib:"$(OUTDIR)\mod_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dbd.obj" \
      +	"$(INTDIR)\mod_dbd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dbd.so"
      +   if exist .\Release\mod_dbd.so.manifest mt.exe -manifest .\Release\mod_dbd.so.manifest -outputresource:.\Release\mod_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dbd.obj"
      +	-@erase "$(INTDIR)\mod_dbd.res"
      +	-@erase "$(INTDIR)\mod_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "DBD_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dbd_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dbd.so" /d LONG_NAME="dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dbd.pdb" /debug /out:"$(OUTDIR)\mod_dbd.so" /implib:"$(OUTDIR)\mod_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dbd.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dbd.obj" \
      +	"$(INTDIR)\mod_dbd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dbd.so"
      +   if exist .\Debug\mod_dbd.so.manifest mt.exe -manifest .\Debug\mod_dbd.so.manifest -outputresource:.\Debug\mod_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dbd.dep")
      +!INCLUDE "mod_dbd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dbd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dbd - Win32 Release" || "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_dbd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\database"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\database"
      +
      +!ELSEIF  "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\database"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\database"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dbd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\database"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\database"
      +
      +!ELSEIF  "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\database"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\database"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dbd - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\database"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\database"
      +
      +!ELSEIF  "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\database"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\database"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dbd - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dbd.so" /d LONG_NAME="dbd_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dbd - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dbd.so" /d LONG_NAME="dbd_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_dbd.c
      +
      +"$(INTDIR)\mod_dbd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/dav/fs/config6.m4 b/modules/dav/fs/config6.m4
      index 235d0d7fcd4..dd26ec8bab9 100644
      --- a/modules/dav/fs/config6.m4
      +++ b/modules/dav/fs/config6.m4
      @@ -18,6 +18,6 @@ case "$host" in
           ;;
       esac
       
      -APACHE_MODULE(dav_fs, DAV provider for the filesystem.  --enable-dav also enables mod_dav_fs., $dav_fs_objects, , $dav_fs_enable)
      +APACHE_MODULE(dav_fs, DAV provider for the filesystem.  --enable-dav also enables mod_dav_fs., $dav_fs_objects, , $dav_fs_enable,,dav)
       
       APACHE_MODPATH_FINISH
      diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c
      index 785efb00b05..821168e887e 100644
      --- a/modules/dav/fs/dbm.c
      +++ b/modules/dav/fs/dbm.c
      @@ -97,7 +97,7 @@ static dav_error * dav_fs_dbm_error(dav_db *db, apr_pool_t *p,
               errcode = 1;
               errstr = "Could not open property database.";
               if (APR_STATUS_IS_EDSOOPEN(status))
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, status, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, status, ap_server_conf, APLOGNO(00576)
                   "The DBM driver could not be loaded");
           }
           else {
      @@ -191,7 +191,15 @@ void dav_dbm_close(dav_db *db)
       
       dav_error * dav_dbm_fetch(dav_db *db, apr_datum_t key, apr_datum_t *pvalue)
       {
      -    apr_status_t status = apr_dbm_fetch(db->file, key, pvalue);
      +    apr_status_t status;
      +
      +    if (!key.dptr) {
      +        /* no key could be created (namespace not known) => no value */
      +        memset(pvalue, 0, sizeof(*pvalue));
      +        status = APR_SUCCESS;
      +    } else {
      +        status = apr_dbm_fetch(db->file, key, pvalue);
      +    }
       
           return dav_fs_dbm_error(db, NULL, status);
       }
      @@ -494,8 +502,8 @@ static void dav_propdb_close(dav_db *db)
       
               err = dav_dbm_store(db, key, value);
               if (err != NULL)
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, err->aprerr,
      -                         ap_server_conf, "Error writing propdb: %s", err->desc);
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, err->aprerr, ap_server_conf,
      +                         APLOGNO(00577) "Error writing propdb: %s", err->desc);
           }
       
           dav_dbm_close(db);
      @@ -731,6 +739,10 @@ static dav_error * dav_propdb_get_rollback(dav_db *db,
       static dav_error * dav_propdb_apply_rollback(dav_db *db,
                                                    dav_deadprop_rollback *rollback)
       {
      +    if (!rollback) {
      +        return NULL; /* no rollback, nothing to do */
      +    }
      +
           if (rollback->value.dptr == NULL) {
               /* don't fail if the thing isn't really there. */
               (void) dav_dbm_delete(db, rollback->key);
      diff --git a/modules/dav/fs/lock.c b/modules/dav/fs/lock.c
      index 331d4e83143..c058e2ed051 100644
      --- a/modules/dav/fs/lock.c
      +++ b/modules/dav/fs/lock.c
      @@ -845,7 +845,7 @@ static dav_error * dav_fs_save_locknull_list(apr_pool_t *p, const char *dirpath,
           }
       
           amt = pbuf->cur_len;
      -    if ((rv = apr_file_write(file, pbuf->buf, &amt)) != APR_SUCCESS
      +    if ((rv = apr_file_write_full(file, pbuf->buf, amt, &amt)) != APR_SUCCESS
               || amt != pbuf->cur_len) {
               err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, rv,
                                   apr_psprintf(p,
      @@ -1327,6 +1327,7 @@ static int dav_fs_do_refresh(dav_lock_discovery *dp,
               {
                   dp->f.timeout = new_time;
                   dirty = 1;
      +            break;
               }
           }
       
      diff --git a/modules/dav/fs/mod_dav_fs.dep b/modules/dav/fs/mod_dav_fs.dep
      new file mode 100644
      index 00000000000..0d67f04cc91
      --- /dev/null
      +++ b/modules/dav/fs/mod_dav_fs.dep
      @@ -0,0 +1,203 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dav_fs.mak
      +
      +.\dbm.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\repos.h"\
      +	
      +
      +.\lock.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\repos.h"\
      +	
      +
      +.\mod_dav_fs.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\repos.h"\
      +	
      +
      +.\repos.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\repos.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/dav/fs/mod_dav_fs.mak b/modules/dav/fs/mod_dav_fs.mak
      new file mode 100644
      index 00000000000..5baff674057
      --- /dev/null
      +++ b/modules/dav/fs/mod_dav_fs.mak
      @@ -0,0 +1,407 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dav_fs.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dav_fs - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_dav_fs - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dav_fs - Win32 Release" && "$(CFG)" != "mod_dav_fs - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dav_fs.mak" CFG="mod_dav_fs - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dav_fs - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dav_fs - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav_fs.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dav - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dav_fs.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_dav - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\dbm.obj"
      +	-@erase "$(INTDIR)\lock.obj"
      +	-@erase "$(INTDIR)\mod_dav_fs.obj"
      +	-@erase "$(INTDIR)\mod_dav_fs.res"
      +	-@erase "$(INTDIR)\mod_dav_fs_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_fs_src.pdb"
      +	-@erase "$(INTDIR)\repos.obj"
      +	-@erase "$(OUTDIR)\mod_dav_fs.exp"
      +	-@erase "$(OUTDIR)\mod_dav_fs.lib"
      +	-@erase "$(OUTDIR)\mod_dav_fs.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_fs.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_fs_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav_fs.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dav_fs.so" /d LONG_NAME="dav_fs_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav_fs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav_fs.pdb" /debug /out:"$(OUTDIR)\mod_dav_fs.so" /implib:"$(OUTDIR)\mod_dav_fs.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav_fs.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\dbm.obj" \
      +	"$(INTDIR)\lock.obj" \
      +	"$(INTDIR)\mod_dav_fs.obj" \
      +	"$(INTDIR)\repos.obj" \
      +	"$(INTDIR)\mod_dav_fs.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\main\Release\mod_dav.lib"
      +
      +"$(OUTDIR)\mod_dav_fs.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dav_fs.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav_fs.so"
      +   if exist .\Release\mod_dav_fs.so.manifest mt.exe -manifest .\Release\mod_dav_fs.so.manifest -outputresource:.\Release\mod_dav_fs.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav_fs.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dav - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dav_fs.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_dav - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\dbm.obj"
      +	-@erase "$(INTDIR)\lock.obj"
      +	-@erase "$(INTDIR)\mod_dav_fs.obj"
      +	-@erase "$(INTDIR)\mod_dav_fs.res"
      +	-@erase "$(INTDIR)\mod_dav_fs_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_fs_src.pdb"
      +	-@erase "$(INTDIR)\repos.obj"
      +	-@erase "$(OUTDIR)\mod_dav_fs.exp"
      +	-@erase "$(OUTDIR)\mod_dav_fs.lib"
      +	-@erase "$(OUTDIR)\mod_dav_fs.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_fs.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_fs_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav_fs.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dav_fs.so" /d LONG_NAME="dav_fs_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav_fs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav_fs.pdb" /debug /out:"$(OUTDIR)\mod_dav_fs.so" /implib:"$(OUTDIR)\mod_dav_fs.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav_fs.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\dbm.obj" \
      +	"$(INTDIR)\lock.obj" \
      +	"$(INTDIR)\mod_dav_fs.obj" \
      +	"$(INTDIR)\repos.obj" \
      +	"$(INTDIR)\mod_dav_fs.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\main\Debug\mod_dav.lib"
      +
      +"$(OUTDIR)\mod_dav_fs.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dav_fs.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav_fs.so"
      +   if exist .\Debug\mod_dav_fs.so.manifest mt.exe -manifest .\Debug\mod_dav_fs.so.manifest -outputresource:.\Debug\mod_dav_fs.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dav_fs.dep")
      +!INCLUDE "mod_dav_fs.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dav_fs.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dav_fs - Win32 Release" || "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +SOURCE=.\dbm.c
      +
      +"$(INTDIR)\dbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lock.c
      +
      +"$(INTDIR)\lock.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\mod_dav_fs.c
      +
      +"$(INTDIR)\mod_dav_fs.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\repos.c
      +
      +"$(INTDIR)\repos.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\dav\fs"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\fs"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\dav\fs"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\fs"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\dav\fs"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\fs"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\dav\fs"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\fs"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\dav\fs"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\fs"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\dav\fs"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\fs"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +"mod_dav - Win32 Release" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Release" 
      +   cd "..\fs"
      +
      +"mod_dav - Win32 ReleaseCLEAN" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\fs"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +"mod_dav - Win32 Debug" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Debug" 
      +   cd "..\fs"
      +
      +"mod_dav - Win32 DebugCLEAN" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\fs"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dav_fs - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dav_fs.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav_fs.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dav_fs.so" /d LONG_NAME="dav_fs_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_fs - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dav_fs.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav_fs.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dav_fs.so" /d LONG_NAME="dav_fs_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c
      index 6c4c44b1fde..6a5ff765f84 100644
      --- a/modules/dav/fs/repos.c
      +++ b/modules/dav/fs/repos.c
      @@ -874,12 +874,13 @@ static int dav_fs_is_parent_resource(
                   && ctx2->pathname[len1] == '/');
       }
       
      -static apr_status_t tmpfile_cleanup(void *data) {
      -        dav_stream *ds = data;
      -        if (ds->temppath) {
      -                apr_file_remove(ds->temppath, ds->p);
      -        }
      -        return APR_SUCCESS;
      +static apr_status_t tmpfile_cleanup(void *data)
      +{
      +    dav_stream *ds = data;
      +    if (ds->temppath) {
      +        apr_file_remove(ds->temppath, ds->p);
      +    }
      +    return APR_SUCCESS;
       }
       
       /* custom mktemp that creates the file with APR_OS_DEFAULT permissions */
      @@ -1104,7 +1105,7 @@ static dav_error * dav_fs_deliver(const dav_resource *resource,
           APR_BRIGADE_INSERT_TAIL(bb, bkt);
       
           if ((status = ap_pass_brigade(output, bb)) != APR_SUCCESS) {
      -        return dav_new_error(pool, HTTP_FORBIDDEN, 0, status,
      +        return dav_new_error(pool, AP_FILTER_ERROR, 0, status,
                                    "Could not write contents to filter.");
           }
       
      diff --git a/modules/dav/lock/config6.m4 b/modules/dav/lock/config6.m4
      index 75f7c5bf24d..02a05e5e18c 100644
      --- a/modules/dav/lock/config6.m4
      +++ b/modules/dav/lock/config6.m4
      @@ -12,6 +12,6 @@ case "$host" in
           ;;
       esac
       
      -APACHE_MODULE(dav_lock, DAV provider for generic locking - requires --enable-dav, $dav_lock_objects, , )
      +APACHE_MODULE(dav_lock, DAV provider for generic locking, $dav_lock_objects, ,,,dav)
       
       APACHE_MODPATH_FINISH
      diff --git a/modules/dav/lock/locks.c b/modules/dav/lock/locks.c
      index 264a851a752..17b9ee69c02 100644
      --- a/modules/dav/lock/locks.c
      +++ b/modules/dav/lock/locks.c
      @@ -465,11 +465,11 @@ static dav_error * dav_generic_save_lock_record(dav_lockdb *lockdb,
               return NULL;
           }
       
      -    while(dp) {
      +    while (dp) {
               val.dsize += dav_size_direct(dp);
               dp = dp->next;
           }
      -    while(ip) {
      +    while (ip) {
               val.dsize += dav_size_indirect(ip);
               ip = ip->next;
           }
      @@ -480,7 +480,7 @@ static dav_error * dav_generic_save_lock_record(dav_lockdb *lockdb,
           dp  = direct;
           ip  = indirect;
       
      -    while(dp) {
      +    while (dp) {
               /* Direct lock - lock_discovery struct follows */
               *ptr++ = DAV_LOCK_DIRECT;
               memcpy(ptr, dp, sizeof(dp->f));        /* Fixed portion of struct */
      @@ -505,7 +505,7 @@ static dav_error * dav_generic_save_lock_record(dav_lockdb *lockdb,
               dp = dp->next;
           }
       
      -    while(ip) {
      +    while (ip) {
               /* Indirect lock prefix */
               *ptr++ = DAV_LOCK_INDIRECT;
       
      @@ -1093,6 +1093,7 @@ static int dav_generic_do_refresh(dav_lock_discovery *dp,
               {
                   dp->f.timeout = new_time;
                   dirty = 1;
      +            break;
               }
           }
       
      diff --git a/modules/dav/lock/mod_dav_lock.dep b/modules/dav/lock/mod_dav_lock.dep
      new file mode 100644
      index 00000000000..e21d71b59c1
      --- /dev/null
      +++ b/modules/dav/lock/mod_dav_lock.dep
      @@ -0,0 +1,100 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dav_lock.mak
      +
      +.\locks.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\locks.h"\
      +	
      +
      +.\mod_dav_lock.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\mod_dav.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\locks.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/dav/lock/mod_dav_lock.mak b/modules/dav/lock/mod_dav_lock.mak
      new file mode 100644
      index 00000000000..0ae2b6a98dc
      --- /dev/null
      +++ b/modules/dav/lock/mod_dav_lock.mak
      @@ -0,0 +1,389 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dav_lock.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dav_lock - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_dav_lock - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dav_lock - Win32 Release" && "$(CFG)" != "mod_dav_lock - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dav_lock.mak" CFG="mod_dav_lock - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dav_lock - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dav_lock - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav_lock.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dav - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dav_lock.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_dav - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\locks.obj"
      +	-@erase "$(INTDIR)\mod_dav_lock.obj"
      +	-@erase "$(INTDIR)\mod_dav_lock.res"
      +	-@erase "$(INTDIR)\mod_dav_lock_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_lock_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_lock.exp"
      +	-@erase "$(OUTDIR)\mod_dav_lock.lib"
      +	-@erase "$(OUTDIR)\mod_dav_lock.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_lock.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_lock_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav_lock.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dav_lock.so" /d LONG_NAME="dav_lock_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav_lock.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav_lock.pdb" /debug /out:"$(OUTDIR)\mod_dav_lock.so" /implib:"$(OUTDIR)\mod_dav_lock.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav_lock.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\locks.obj" \
      +	"$(INTDIR)\mod_dav_lock.obj" \
      +	"$(INTDIR)\mod_dav_lock.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\main\Release\mod_dav.lib"
      +
      +"$(OUTDIR)\mod_dav_lock.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dav_lock.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav_lock.so"
      +   if exist .\Release\mod_dav_lock.so.manifest mt.exe -manifest .\Release\mod_dav_lock.so.manifest -outputresource:.\Release\mod_dav_lock.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav_lock.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_dav - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dav_lock.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_dav - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\locks.obj"
      +	-@erase "$(INTDIR)\mod_dav_lock.obj"
      +	-@erase "$(INTDIR)\mod_dav_lock.res"
      +	-@erase "$(INTDIR)\mod_dav_lock_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_lock_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_lock.exp"
      +	-@erase "$(OUTDIR)\mod_dav_lock.lib"
      +	-@erase "$(OUTDIR)\mod_dav_lock.pdb"
      +	-@erase "$(OUTDIR)\mod_dav_lock.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_lock_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav_lock.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dav_lock.so" /d LONG_NAME="dav_lock_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav_lock.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav_lock.pdb" /debug /out:"$(OUTDIR)\mod_dav_lock.so" /implib:"$(OUTDIR)\mod_dav_lock.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav_lock.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\locks.obj" \
      +	"$(INTDIR)\mod_dav_lock.obj" \
      +	"$(INTDIR)\mod_dav_lock.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\main\Debug\mod_dav.lib"
      +
      +"$(OUTDIR)\mod_dav_lock.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dav_lock.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav_lock.so"
      +   if exist .\Debug\mod_dav_lock.so.manifest mt.exe -manifest .\Debug\mod_dav_lock.so.manifest -outputresource:.\Debug\mod_dav_lock.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dav_lock.dep")
      +!INCLUDE "mod_dav_lock.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dav_lock.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dav_lock - Win32 Release" || "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +SOURCE=.\locks.c
      +
      +"$(INTDIR)\locks.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\mod_dav_lock.c
      +
      +"$(INTDIR)\mod_dav_lock.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\dav\lock"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\lock"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\dav\lock"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\lock"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\dav\lock"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\lock"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\dav\lock"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\lock"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\dav\lock"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\lock"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\dav\lock"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\lock"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +"mod_dav - Win32 Release" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Release" 
      +   cd "..\lock"
      +
      +"mod_dav - Win32 ReleaseCLEAN" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\lock"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +"mod_dav - Win32 Debug" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Debug" 
      +   cd "..\lock"
      +
      +"mod_dav - Win32 DebugCLEAN" : 
      +   cd ".\..\main"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dav.mak" CFG="mod_dav - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\lock"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dav_lock - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dav_lock.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav_lock.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dav_lock.so" /d LONG_NAME="dav_lock_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dav_lock - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dav_lock.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav_lock.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dav_lock.so" /d LONG_NAME="dav_lock_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/dav/main/mod_dav.c b/modules/dav/main/mod_dav.c
      index 4f84240f569..7599c6d8635 100644
      --- a/modules/dav/main/mod_dav.c
      +++ b/modules/dav/main/mod_dav.c
      @@ -181,13 +181,13 @@ static void *dav_merge_dir_config(apr_pool_t *p, void *base, void *overrides)
           newconf->provider = DAV_INHERIT_VALUE(parent, child, provider);
           if (parent->provider_name != NULL) {
               if (child->provider_name == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00578)
                                "\"DAV Off\" cannot be used to turn off a subtree "
                                "of a DAV-enabled location.");
               }
               else if (strcasecmp(child->provider_name,
                                   parent->provider_name) != 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00579)
                                "A subtree cannot specify a different DAV provider "
                                "than its parent.");
               }
      @@ -201,6 +201,12 @@ static void *dav_merge_dir_config(apr_pool_t *p, void *base, void *overrides)
           return newconf;
       }
       
      +DAV_DECLARE(const char *) dav_get_provider_name(request_rec *r)
      +{
      +    dav_dir_conf *conf = ap_get_module_config(r->per_dir_config, &dav_module);
      +    return conf ? conf->provider_name : NULL;
      +}
      +
       static const dav_provider *dav_get_provider(request_rec *r)
       {
           dav_dir_conf *conf;
      @@ -254,7 +260,7 @@ static const char *dav_cmd_dav(cmd_parms *cmd, void *config, const char *arg1)
               conf->provider = NULL;
           }
           else {
      -        conf->provider_name = apr_pstrdup(cmd->pool, arg1);
      +        conf->provider_name = arg1;
           }
       
           if (conf->provider_name != NULL) {
      @@ -315,6 +321,7 @@ static const char *dav_cmd_davmintimeout(cmd_parms *cmd, void *config,
       static int dav_error_response(request_rec *r, int status, const char *body)
       {
           r->status = status;
      +    r->status_line = ap_get_status_line(status);
       
           ap_set_content_type(r, "text/html; charset=ISO-8859-1");
       
      @@ -357,16 +364,33 @@ static int dav_error_response_tag(request_rec *r,
               ap_rputs(" xmlns:m=\"http://apache.org/dav/xmlns\"", r);
           }
       
      -    if (err->namespace != NULL) {
      -        ap_rprintf(r,
      -                   " xmlns:C=\"%s\">" DEBUG_CR
      -                   "<C:%s/>" DEBUG_CR,
      -                   err->namespace, err->tagname);
      +    if (err->childtags) {
      +        if (err->namespace != NULL) {
      +            ap_rprintf(r,
      +                    " xmlns:C=\"%s\">" DEBUG_CR
      +                    "<C:%s>%s</C:%s>" DEBUG_CR,
      +                    err->namespace,
      +                    err->tagname, err->childtags, err->tagname);
      +        }
      +        else {
      +            ap_rprintf(r,
      +                    ">" DEBUG_CR
      +                    "<D:%s>%s</D:%s>" DEBUG_CR,
      +                    err->tagname, err->childtags, err->tagname);
      +        }
           }
           else {
      -        ap_rprintf(r,
      -                   ">" DEBUG_CR
      -                   "<D:%s/>" DEBUG_CR, err->tagname);
      +        if (err->namespace != NULL) {
      +            ap_rprintf(r,
      +                    " xmlns:C=\"%s\">" DEBUG_CR
      +                    "<C:%s/>" DEBUG_CR,
      +                    err->namespace, err->tagname);
      +        }
      +        else {
      +            ap_rprintf(r,
      +                    ">" DEBUG_CR
      +                    "<D:%s/>" DEBUG_CR, err->tagname);
      +        }
           }
       
           /* here's our mod_dav specific tag: */
      @@ -414,30 +438,31 @@ static const char *dav_xml_escape_uri(apr_pool_t *p, const char *uri)
       
       /* Write a complete RESPONSE object out as a <DAV:repsonse> xml
          element.  Data is sent into brigade BB, which is auto-flushed into
      -   OUTPUT filter stack.  Use POOL for any temporary allocations.
      +   the output filter stack for request R.  Use POOL for any temporary
      +   allocations.
       
          [Presumably the <multistatus> tag has already been written;  this
          routine is shared by dav_send_multistatus and dav_stream_response.]
       */
      -static void dav_send_one_response(dav_response *response,
      -                                  apr_bucket_brigade *bb,
      -                                  ap_filter_t *output,
      -                                  apr_pool_t *pool)
      +DAV_DECLARE(void) dav_send_one_response(dav_response *response,
      +                                        apr_bucket_brigade *bb,
      +                                        request_rec *r,
      +                                        apr_pool_t *pool)
       {
           apr_text *t = NULL;
       
           if (response->propresult.xmlns == NULL) {
      -      ap_fputs(output, bb, "<D:response>");
      +      ap_fputs(r->output_filters, bb, "<D:response>");
           }
           else {
      -      ap_fputs(output, bb, "<D:response");
      +      ap_fputs(r->output_filters, bb, "<D:response");
             for (t = response->propresult.xmlns; t; t = t->next) {
      -        ap_fputs(output, bb, t->text);
      +        ap_fputs(r->output_filters, bb, t->text);
             }
      -      ap_fputc(output, bb, '>');
      +      ap_fputc(r->output_filters, bb, '>');
           }
       
      -    ap_fputstrs(output, bb,
      +    ap_fputstrs(r->output_filters, bb,
                       DEBUG_CR "<D:href>",
                       dav_xml_escape_uri(pool, response->href),
                       "</D:href>" DEBUG_CR,
      @@ -448,7 +473,7 @@ static void dav_send_one_response(dav_response *response,
              * default to 500 Internal Server Error if first->status
              * is not a known (or valid) status code.
              */
      -      ap_fputstrs(output, bb,
      +      ap_fputstrs(r->output_filters, bb,
                         "<D:status>HTTP/1.1 ",
                         ap_get_status_line(response->status),
                         "</D:status>" DEBUG_CR,
      @@ -457,7 +482,7 @@ static void dav_send_one_response(dav_response *response,
           else {
             /* assume this includes <propstat> and is quoted properly */
             for (t = response->propresult.propstats; t; t = t->next) {
      -        ap_fputs(output, bb, t->text);
      +        ap_fputs(r->output_filters, bb, t->text);
             }
           }
       
      @@ -466,14 +491,14 @@ static void dav_send_one_response(dav_response *response,
              * We supply the description, so we know it doesn't have to
              * have any escaping/encoding applied to it.
              */
      -      ap_fputstrs(output, bb,
      +      ap_fputstrs(r->output_filters, bb,
                         "<D:responsedescription>",
                         response->desc,
                         "</D:responsedescription>" DEBUG_CR,
                         NULL);
           }
       
      -    ap_fputs(output, bb, "</D:response>" DEBUG_CR);
      +    ap_fputs(r->output_filters, bb, "</D:response>" DEBUG_CR);
       }
       
       
      @@ -481,9 +506,9 @@ static void dav_send_one_response(dav_response *response,
          response and write <multistatus> tag into BB, destined for
          R->output_filters.  Use xml NAMESPACES in initial tag, if
          non-NULL. */
      -static void dav_begin_multistatus(apr_bucket_brigade *bb,
      -                                  request_rec *r, int status,
      -                                  apr_array_header_t *namespaces)
      +DAV_DECLARE(void) dav_begin_multistatus(apr_bucket_brigade *bb,
      +                                        request_rec *r, int status,
      +                                        apr_array_header_t *namespaces)
       {
           /* Set the correct status and Content-Type */
           r->status = status;
      @@ -506,8 +531,8 @@ static void dav_begin_multistatus(apr_bucket_brigade *bb,
       }
       
       /* Finish a multistatus response started by dav_begin_multistatus: */
      -static apr_status_t dav_finish_multistatus(request_rec *r,
      -                                           apr_bucket_brigade *bb)
      +DAV_DECLARE(apr_status_t) dav_finish_multistatus(request_rec *r,
      +                                                 apr_bucket_brigade *bb)
       {
           apr_bucket *b;
       
      @@ -521,9 +546,9 @@ static apr_status_t dav_finish_multistatus(request_rec *r,
           return ap_pass_brigade(r->output_filters, bb);
       }
       
      -static void dav_send_multistatus(request_rec *r, int status,
      -                                 dav_response *first,
      -                                 apr_array_header_t *namespaces)
      +DAV_DECLARE(void) dav_send_multistatus(request_rec *r, int status,
      +                                       dav_response *first,
      +                                       apr_array_header_t *namespaces)
       {
           apr_pool_t *subpool;
           apr_bucket_brigade *bb = apr_brigade_create(r->pool,
      @@ -535,7 +560,7 @@ static void dav_send_multistatus(request_rec *r, int status,
       
           for (; first != NULL; first = first->next) {
             apr_pool_clear(subpool);
      -      dav_send_one_response(first, bb, r->output_filters, subpool);
      +      dav_send_one_response(first, bb, r, subpool);
           }
           apr_pool_destroy(subpool);
       
      @@ -557,6 +582,7 @@ static void dav_log_err(request_rec *r, dav_error *err, int level)
               if (errscan->desc == NULL)
                   continue;
       
      +        /* Intentional no APLOGNO */
               ap_log_rerror(APLOG_MARK, level, errscan->aprerr, r, "%s  [%d, #%d]",
                             errscan->desc, errscan->status, errscan->error_id);
           }
      @@ -575,12 +601,17 @@ static void dav_log_err(request_rec *r, dav_error *err, int level)
        *   - repos_hooks->copy_resource
        *   - vsn_hooks->update
        */
      -static int dav_handle_err(request_rec *r, dav_error *err,
      -                          dav_response *response)
      +DAV_DECLARE(int) dav_handle_err(request_rec *r, dav_error *err,
      +                                dav_response *response)
       {
           /* log the errors */
           dav_log_err(r, err, APLOG_ERR);
       
      +    if (!ap_is_HTTP_VALID_RESPONSE(err->status)) {
      +        /* we have responded already */
      +        return AP_FILTER_ERROR;
      +    }
      +
           if (response == NULL) {
               dav_error *stackerr = err;
       
      @@ -604,14 +635,15 @@ static int dav_handle_err(request_rec *r, dav_error *err,
           return DONE;
       }
       
      -/* handy function for return values of methods that (may) create things */
      +/* handy function for return values of methods that (may) create things.
      + * locn if provided is assumed to be escaped. */
       static int dav_created(request_rec *r, const char *locn, const char *what,
                              int replaced)
       {
           const char *body;
       
           if (locn == NULL) {
      -        locn = r->uri;
      +        locn = r->unparsed_uri;
           }
       
           /* did the target resource already exist? */
      @@ -656,7 +688,7 @@ DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth)
       
           /* The caller will return an HTTP_BAD_REQUEST. This will augment the
            * default message that Apache provides. */
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00580)
                         "An invalid Depth header was specified.");
           return -1;
       }
      @@ -679,7 +711,7 @@ static int dav_get_overwrite(request_rec *r)
       
           /* The caller will return an HTTP_BAD_REQUEST. This will augment the
            * default message that Apache provides. */
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00581)
                         "An invalid Overwrite header was specified.");
           return -1;
       }
      @@ -707,6 +739,12 @@ static dav_error *dav_get_resource(request_rec *r, int label_allowed,
       
           conf = ap_get_module_config(r->per_dir_config, &dav_module);
           /* assert: conf->provider != NULL */
      +    if (conf->provider == NULL) {
      +        return dav_new_error(r->pool, HTTP_METHOD_NOT_ALLOWED, 0, 0,
      +                             apr_psprintf(r->pool,
      +                             "DAV not enabled for %s",
      +                             ap_escape_html(r->pool, r->uri)));
      +    }
       
           /* resolve the resource */
           err = (*conf->provider->repos->get_resource)(r, conf->dir,
      @@ -993,10 +1031,10 @@ static int dav_method_put(request_rec *r)
                                              "(URI: %s)", msg);
                       }
                       else {
      -                    /* XXX: should this actually be HTTP_BAD_REQUEST? */
      -                    http_err = HTTP_INTERNAL_SERVER_ERROR;
      -                    msg = apr_psprintf(r->pool, "Could not get next bucket "
      -                                       "brigade (URI: %s)", msg);
      +                    http_err = ap_map_http_request_error(rc, HTTP_BAD_REQUEST);
      +                    msg = apr_psprintf(r->pool,
      +                            "An error occurred while reading"
      +                                    " the request body (URI: %s)", msg);
                       }
                       err = dav_new_error(r->pool, http_err, 0, rc, msg);
                       break;
      @@ -1018,18 +1056,19 @@ static int dav_method_put(request_rec *r)
                           continue;
                       }
       
      -                rc = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      -                if (rc != APR_SUCCESS) {
      -                    err = dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, rc,
      -                                        apr_psprintf(r->pool,
      -                                                    "An error occurred while reading"
      -                                                    " the request body (URI: %s)",
      -                                                    ap_escape_html(r->pool, r->uri)));
      -                    break;
      -                }
      -
                       if (err == NULL) {
                           /* write whatever we read, until we see an error */
      +                    rc = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      +                    if (rc != APR_SUCCESS) {
      +                       err = dav_new_error(r->pool, HTTP_BAD_REQUEST, 0, rc,
      +                                           apr_psprintf(r->pool,
      +                                                        "An error occurred while"
      +                                                        " reading the request body"
      +                                                        " from the bucket (URI: %s)",
      +                                                        ap_escape_html(r->pool, r->uri)));
      +                        break;
      +                    }
      +
                           err = (*resource->hooks->write_stream)(stream, data, len);
                       }
                   }
      @@ -1041,10 +1080,7 @@ static int dav_method_put(request_rec *r)
       
               err2 = (*resource->hooks->close_stream)(stream,
                                                       err == NULL /* commit */);
      -        if (err2 != NULL && err == NULL) {
      -            /* no error during the write, but we hit one at close. use it. */
      -            err = err2;
      -        }
      +        err = dav_join_error(err, err2);
           }
       
           /*
      @@ -1062,6 +1098,7 @@ static int dav_method_put(request_rec *r)
       
           /* check for errors now */
           if (err != NULL) {
      +        err = dav_join_error(err, err2); /* don't forget err2 */
               return dav_handle_err(r, err, NULL);
           }
       
      @@ -1130,7 +1167,7 @@ static void dav_stream_response(dav_walk_resource *wres,
               resp.propresult = *propstats;
           }
       
      -    dav_send_one_response(&resp, ctx->bb, ctx->r->output_filters, pool);
      +    dav_send_one_response(&resp, ctx->bb, ctx->r, pool);
       }
       
       
      @@ -1186,14 +1223,14 @@ static int dav_method_delete(request_rec *r)
       
           if (resource->collection && depth != DAV_INFINITY) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00582)
                             "Depth must be \"infinity\" for DELETE of a collection.");
               return HTTP_BAD_REQUEST;
           }
       
           if (!resource->collection && depth == 1) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00583)
                             "Depth of \"1\" is not allowed for DELETE.");
               return HTTP_BAD_REQUEST;
           }
      @@ -1611,7 +1648,7 @@ static int dav_method_options(request_rec *r)
           /* note: doc == NULL if no request body */
       
           if (doc && !dav_validate_root(doc, "options")) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00584)
                             "The \"options\" element was not found.");
               return HTTP_BAD_REQUEST;
           }
      @@ -2046,7 +2083,7 @@ static int dav_method_propfind(request_rec *r)
       
           if (doc && !dav_validate_root(doc, "propfind")) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00585)
                             "The \"propfind\" element was not found.");
               return HTTP_BAD_REQUEST;
           }
      @@ -2067,7 +2104,7 @@ static int dav_method_propfind(request_rec *r)
               /* "propfind" element must have one of the above three children */
       
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00586)
                             "The \"propfind\" element does not contain one of "
                             "the required child elements (the specific command).");
               return HTTP_BAD_REQUEST;
      @@ -2137,8 +2174,8 @@ static int dav_method_propfind(request_rec *r)
           return DONE;
       }
       
      -static apr_text * dav_failed_proppatch(apr_pool_t *p,
      -                                      apr_array_header_t *prop_ctx)
      +DAV_DECLARE(apr_text *) dav_failed_proppatch(apr_pool_t *p,
      +                                             apr_array_header_t *prop_ctx)
       {
           apr_text_header hdr = { 0 };
           int i = prop_ctx->nelts;
      @@ -2198,7 +2235,8 @@ static apr_text * dav_failed_proppatch(apr_pool_t *p,
           return hdr.first;
       }
       
      -static apr_text * dav_success_proppatch(apr_pool_t *p, apr_array_header_t *prop_ctx)
      +DAV_DECLARE(apr_text *) dav_success_proppatch(apr_pool_t *p,
      +                                              apr_array_header_t *prop_ctx)
       {
           apr_text_header hdr = { 0 };
           int i = prop_ctx->nelts;
      @@ -2299,7 +2337,7 @@ static int dav_method_proppatch(request_rec *r)
       
           if (doc == NULL || !dav_validate_root(doc, "propertyupdate")) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00587)
                             "The request body does not contain "
                             "a \"propertyupdate\" element.");
               return HTTP_BAD_REQUEST;
      @@ -2362,7 +2400,7 @@ static int dav_method_proppatch(request_rec *r)
                   dav_auto_checkin(r, resource, 1 /*undo*/, 0 /*unlock*/, &av_info);
       
                   /* This supplies additional information for the default message. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00588)
                                 "A \"prop\" element is missing inside "
                                 "the propertyupdate command.");
                   return HTTP_BAD_REQUEST;
      @@ -2441,7 +2479,7 @@ static int process_mkcol_body(request_rec *r)
           if (tenc) {
               if (strcasecmp(tenc, "chunked")) {
                   /* Use this instead of Apache's default error string */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00589)
                                 "Unknown Transfer-Encoding %s", tenc);
                   return HTTP_NOT_IMPLEMENTED;
               }
      @@ -2457,7 +2495,7 @@ static int process_mkcol_body(request_rec *r)
       
               if (*pos != '\0') {
                   /* This supplies additional information for the default message. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00590)
                                 "Invalid Content-Length %s", lenp);
                   return HTTP_BAD_REQUEST;
               }
      @@ -2649,7 +2687,7 @@ static int dav_method_copymove(request_rec *r, int is_move)
           }
           if (dest == NULL) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00591)
                             "The request is missing a Destination header.");
               return HTTP_BAD_REQUEST;
           }
      @@ -2658,7 +2696,7 @@ static int dav_method_copymove(request_rec *r, int is_move)
           if (lookup.rnew == NULL) {
               if (lookup.err.status == HTTP_BAD_REQUEST) {
                   /* This supplies additional information for the default message. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00592)
                                 "%s", lookup.err.desc);
                   return HTTP_BAD_REQUEST;
               }
      @@ -2683,11 +2721,6 @@ static int dav_method_copymove(request_rec *r, int is_move)
                                         "Destination URI had an error.");
           }
       
      -    if (dav_get_provider(lookup.rnew) == NULL) {
      -        return dav_error_response(r, HTTP_METHOD_NOT_ALLOWED,
      -                                  "DAV not enabled for Destination URI.");
      -    }
      -
           /* Resolve destination resource */
           err = dav_get_resource(lookup.rnew, 0 /* label_allowed */,
                                  0 /* use_checked_in */, &resnew);
      @@ -2737,41 +2770,43 @@ static int dav_method_copymove(request_rec *r, int is_move)
           }
           if (depth == 1) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00593)
                             "Depth must be \"0\" or \"infinity\" for COPY or MOVE.");
               return HTTP_BAD_REQUEST;
           }
           if (is_move && is_dir && depth != DAV_INFINITY) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00594)
                             "Depth must be \"infinity\" when moving a collection.");
               return HTTP_BAD_REQUEST;
           }
       
           /*
      -     * Check If-Headers and existing locks for each resource in the source
      -     * if we are performing a MOVE. We will return a 424 response with a
      -     * DAV:multistatus body. The multistatus responses will contain the
      -     * information about any resource that fails the validation.
      +     * Check If-Headers and existing locks for each resource in the source.
      +     * We will return a 424 response with a DAV:multistatus body.
      +     * The multistatus responses will contain the information about any
      +     * resource that fails the validation.
            *
      -     * We check the parent resource, too, since this is a MOVE. Moving the
      +     * We check the parent resource, too, if this is a MOVE. Moving the
            * resource effectively removes it from the parent collection, so we
            * must ensure that we have met the appropriate conditions.
            *
            * If a problem occurs with the Request-URI itself, then a plain error
            * (rather than a multistatus) will be returned.
            */
      -    if (is_move
      -        && (err = dav_validate_request(r, resource, depth, NULL,
      -                                       &multi_response,
      -                                       DAV_VALIDATE_PARENT
      -                                       | DAV_VALIDATE_USE_424,
      -                                       NULL)) != NULL) {
      +    if ((err = dav_validate_request(r, resource, depth, NULL,
      +                                    &multi_response,
      +                                    (is_move ? DAV_VALIDATE_PARENT
      +                                             : DAV_VALIDATE_RESOURCE
      +                                               | DAV_VALIDATE_NO_MODIFY)
      +                                    | DAV_VALIDATE_USE_424,
      +                                    NULL)) != NULL) {
               err = dav_push_error(r->pool, err->status, 0,
                                    apr_psprintf(r->pool,
      -                                          "Could not MOVE %s due to a failed "
      +                                          "Could not %s %s due to a failed "
                                                 "precondition on the source "
                                                 "(e.g. locks).",
      +                                          is_move ? "MOVE" : "COPY",
                                                 ap_escape_html(r->pool, r->uri)),
                                    err);
               return dav_handle_err(r, err, multi_response);
      @@ -3000,7 +3035,7 @@ static int dav_method_copymove(request_rec *r, int is_move)
           }
       
           /* return an appropriate response (HTTP_CREATED or HTTP_NO_CONTENT) */
      -    return dav_created(r, lookup.rnew->uri, "Destination",
      +    return dav_created(r, lookup.rnew->unparsed_uri, "Destination",
                              resnew_state == DAV_RESOURCE_EXISTS);
       }
       
      @@ -3032,7 +3067,7 @@ static int dav_method_lock(request_rec *r)
       
           depth = dav_get_depth(r, DAV_INFINITY);
           if (depth != 0 && depth != DAV_INFINITY) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00595)
                             "Depth must be 0 or \"infinity\" for LOCK.");
               return HTTP_BAD_REQUEST;
           }
      @@ -3205,7 +3240,7 @@ static int dav_method_unlock(request_rec *r)
       
           if ((const_locktoken_txt = apr_table_get(r->headers_in,
                                                    "Lock-Token")) == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00596)
                             "Unlock failed (%s):  "
                             "No Lock-Token specified in header", r->filename);
               return HTTP_BAD_REQUEST;
      @@ -3315,7 +3350,7 @@ static int dav_method_vsn_control(request_rec *r)
               apr_size_t tsize;
       
               if (!dav_validate_root(doc, "version-control")) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00597)
                                 "The request body does not contain "
                                 "a \"version-control\" element.");
                   return HTTP_BAD_REQUEST;
      @@ -3323,14 +3358,14 @@ static int dav_method_vsn_control(request_rec *r)
       
               /* get the version URI */
               if ((child = dav_find_child(doc->root, "version")) == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00598)
                                 "The \"version-control\" element does not contain "
                                 "a \"version\" element.");
                   return HTTP_BAD_REQUEST;
               }
       
               if ((child = dav_find_child(child, "href")) == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00599)
                                 "The \"version\" element does not contain "
                                 "an \"href\" element.");
                   return HTTP_BAD_REQUEST;
      @@ -3340,7 +3375,7 @@ static int dav_method_vsn_control(request_rec *r)
               apr_xml_to_text(r->pool, child, APR_XML_X2T_INNER, NULL, NULL,
                               &target, &tsize);
               if (tsize == 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00600)
                                 "An \"href\" element does not contain a URI.");
                   return HTTP_BAD_REQUEST;
               }
      @@ -3492,7 +3527,7 @@ static int dav_method_checkout(request_rec *r)
       
               if (!dav_validate_root(doc, "checkout")) {
                   /* This supplies additional information for the default msg. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00601)
                                 "The request body, if present, must be a "
                                 "DAV:checkout element.");
                   return HTTP_BAD_REQUEST;
      @@ -3539,7 +3574,7 @@ static int dav_method_checkout(request_rec *r)
                           */
       
                           /* This supplies additional info for the default msg. */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00602)
                                         "Within the DAV:activity-set element, the "
                                         "DAV:new element must be used, or at least "
                                         "one DAV:href must be specified.");
      @@ -3692,7 +3727,7 @@ static int dav_method_checkin(request_rec *r)
           if (doc != NULL) {
               if (!dav_validate_root(doc, "checkin")) {
                   /* This supplies additional information for the default msg. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00603)
                                 "The request body, if present, must be a "
                                 "DAV:checkin element.");
                   return HTTP_BAD_REQUEST;
      @@ -3780,7 +3815,7 @@ static int dav_method_update(request_rec *r)
       
           if (doc == NULL || !dav_validate_root(doc, "update")) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00604)
                             "The request body does not contain "
                             "an \"update\" element.");
               return HTTP_BAD_REQUEST;
      @@ -3792,14 +3827,14 @@ static int dav_method_update(request_rec *r)
           else if ((child = dav_find_child(doc->root, "version")) != NULL) {
               /* get the href element */
               if ((child = dav_find_child(child, "href")) == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00605)
                                 "The version element does not contain "
                                 "an \"href\" element.");
                   return HTTP_BAD_REQUEST;
               }
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00606)
                             "The \"update\" element does not contain "
                             "a \"label-name\" or \"version\" element.");
               return HTTP_BAD_REQUEST;
      @@ -3807,7 +3842,7 @@ static int dav_method_update(request_rec *r)
       
           /* a depth greater than zero is only allowed for a label */
           if (!is_label && depth != 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00607)
                             "Depth must be zero for UPDATE with a version");
               return HTTP_BAD_REQUEST;
           }
      @@ -3816,7 +3851,7 @@ static int dav_method_update(request_rec *r)
           apr_xml_to_text(r->pool, child, APR_XML_X2T_INNER, NULL, NULL,
                           &target, &tsize);
           if (tsize == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00608)
                             "A \"label-name\" or \"href\" element does not contain "
                             "any content.");
               return HTTP_BAD_REQUEST;
      @@ -3849,7 +3884,7 @@ static int dav_method_update(request_rec *r)
               if (lookup.rnew == NULL) {
                   if (lookup.err.status == HTTP_BAD_REQUEST) {
                       /* This supplies additional information for the default message. */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00609)
                                     "%s", lookup.err.desc);
                       return HTTP_BAD_REQUEST;
                   }
      @@ -3996,7 +4031,7 @@ static int dav_method_label(request_rec *r)
       
           if (doc == NULL || !dav_validate_root(doc, "label")) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00610)
                             "The request body does not contain "
                             "a \"label\" element.");
               return HTTP_BAD_REQUEST;
      @@ -4013,7 +4048,7 @@ static int dav_method_label(request_rec *r)
               ctx.label_op = DAV_LABEL_REMOVE;
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00611)
                             "The \"label\" element does not contain "
                             "an \"add\", \"set\", or \"remove\" element.");
               return HTTP_BAD_REQUEST;
      @@ -4021,7 +4056,7 @@ static int dav_method_label(request_rec *r)
       
           /* get the label string */
           if ((child = dav_find_child(child, "label-name")) == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00612)
                             "The label command element does not contain "
                             "a \"label-name\" element.");
               return HTTP_BAD_REQUEST;
      @@ -4030,7 +4065,7 @@ static int dav_method_label(request_rec *r)
           apr_xml_to_text(r->pool, child, APR_XML_X2T_INNER, NULL, NULL,
                           &ctx.label, &tsize);
           if (tsize == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00613)
                             "A \"label-name\" element does not contain "
                             "a label name.");
               return HTTP_BAD_REQUEST;
      @@ -4098,7 +4133,7 @@ static int dav_method_report(request_rec *r)
               return result;
           if (doc == NULL) {
               /* This supplies additional information for the default msg. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00614)
                             "The request body must specify a report.");
               return HTTP_BAD_REQUEST;
           }
      @@ -4173,7 +4208,7 @@ static int dav_method_make_workspace(request_rec *r)
       
           if (doc == NULL
               || !dav_validate_root(doc, "mkworkspace")) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00615)
                             "The request body does not contain "
                             "a \"mkworkspace\" element.");
               return HTTP_BAD_REQUEST;
      @@ -4307,7 +4342,7 @@ static int dav_method_merge(request_rec *r)
       
           if (doc == NULL || !dav_validate_root(doc, "merge")) {
               /* This supplies additional information for the default msg. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00616)
                             "The request body must be present and must be a "
                             "DAV:merge element.");
               return HTTP_BAD_REQUEST;
      @@ -4315,14 +4350,14 @@ static int dav_method_merge(request_rec *r)
       
           if ((source_elem = dav_find_child(doc->root, "source")) == NULL) {
               /* This supplies additional information for the default msg. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00617)
                             "The DAV:merge element must contain a DAV:source "
                             "element.");
               return HTTP_BAD_REQUEST;
           }
           if ((href_elem = dav_find_child(source_elem, "href")) == NULL) {
               /* This supplies additional information for the default msg. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00618)
                             "The DAV:source element must contain a DAV:href "
                             "element.");
               return HTTP_BAD_REQUEST;
      @@ -4335,7 +4370,7 @@ static int dav_method_merge(request_rec *r)
           if (lookup.rnew == NULL) {
               if (lookup.err.status == HTTP_BAD_REQUEST) {
                   /* This supplies additional information for the default message. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00619)
                                 "%s", lookup.err.desc);
                   return HTTP_BAD_REQUEST;
               }
      @@ -4448,7 +4483,7 @@ static int dav_method_bind(request_rec *r)
           dest = apr_table_get(r->headers_in, "Destination");
           if (dest == NULL) {
               /* This supplies additional information for the default message. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00620)
                             "The request is missing a Destination header.");
               return HTTP_BAD_REQUEST;
           }
      @@ -4457,7 +4492,7 @@ static int dav_method_bind(request_rec *r)
           if (lookup.rnew == NULL) {
               if (lookup.err.status == HTTP_BAD_REQUEST) {
                   /* This supplies additional information for the default message. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00621)
                                 "%s", lookup.err.desc);
                   return HTTP_BAD_REQUEST;
               }
      @@ -4606,7 +4641,7 @@ static int dav_method_bind(request_rec *r)
       
           /* return an appropriate response (HTTP_CREATED) */
           /* ### spec doesn't say what happens when destination was replaced */
      -    return dav_created(r, lookup.rnew->uri, "Binding", 0);
      +    return dav_created(r, lookup.rnew->unparsed_uri, "Binding", 0);
       }
       
       
      @@ -4621,7 +4656,7 @@ static int dav_handler(request_rec *r)
           /* Reject requests with an unescaped hash character, as these may
            * be more destructive than the user intended. */
           if (r->parsed_uri.fragment != NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00622)
                            "buggy client used un-escaped hash in Request-URI");
               return dav_error_response(r, HTTP_BAD_REQUEST,
                                         "The request was invalid: the URI included "
      diff --git a/modules/dav/main/mod_dav.dep b/modules/dav/main/mod_dav.dep
      new file mode 100644
      index 00000000000..5efe2f483ce
      --- /dev/null
      +++ b/modules/dav/main/mod_dav.dep
      @@ -0,0 +1,354 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dav.mak
      +
      +.\liveprop.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\mod_dav.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_script.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\props.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\providers.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\std_liveprop.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\util.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\http_vhost.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +.\util_lock.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xml.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_dav.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h
      index 768638c3794..80ad1176b4d 100644
      --- a/modules/dav/main/mod_dav.h
      +++ b/modules/dav/main/mod_dav.h
      @@ -130,6 +130,8 @@ typedef struct dav_error {
       
           struct dav_error *prev;     /* previous error (in stack) */
       
      +    const char *childtags;      /* error-tag may have children */
      +
       } dav_error;
       
       /*
      @@ -169,6 +171,38 @@ DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status, int error_id,
                                              const char *desc, dav_error *prev);
       
       
      +/*
      +** Join two errors together.
      +**
      +** This function is used to add a new error stack onto an existing error so
      +** that subsequent errors can be reported after the first error.  It returns
      +** the correct error stack to use so that the caller can blindly call it
      +** without checking that both dest and src are not NULL.
      +** 
      +** <dest> is the error stack that the error will be added to.
      +**
      +** <src> is the error stack that will be appended.
      +*/
      +DAV_DECLARE(dav_error*) dav_join_error(dav_error* dest, dav_error* src);
      +
      +typedef struct dav_response dav_response;
      +
      +/*
      +** dav_handle_err()
      +**
      +** Handle the standard error processing. <err> must be non-NULL.
      +**
      +** <response> is set by the following:
      +**   - dav_validate_request()
      +**   - dav_add_lock()
      +**   - repos_hooks->remove_resource
      +**   - repos_hooks->move_resource
      +**   - repos_hooks->copy_resource
      +**   - vsn_hooks->update
      +*/
      +DAV_DECLARE(int) dav_handle_err(request_rec *r, dav_error *err,
      +                                dav_response *response);
      +
       /* error ID values... */
       
       /* IF: header errors */
      @@ -371,7 +405,9 @@ typedef struct dav_resource {
                                * REGULAR and WORKSPACE resources,
                                * and is always 1 for WORKING */
       
      -    const char *uri;    /* the URI for this resource */
      +    const char *uri;    /* the URI for this resource;
      +                         * currently has an ABI flaw where sometimes it is
      +                         * assumed to be encoded and sometimes not */
       
           dav_resource_private *info;         /* the provider's private info */
       
      @@ -401,7 +437,7 @@ typedef struct dav_locktoken dav_locktoken;
       ** the sub-pools are a bit more general and heavyweight than these buffers.
       */
       
      -/* buffer for reuse; can grow to accomodate needed size */
      +/* buffer for reuse; can grow to accommodate needed size */
       typedef struct
       {
           apr_size_t alloc_len;       /* how much has been allocated */
      @@ -419,7 +455,7 @@ DAV_DECLARE(void) dav_set_bufsize(apr_pool_t *p, dav_buffer *pbuf,
       DAV_DECLARE(void) dav_buffer_init(apr_pool_t *p, dav_buffer *pbuf,
                                         const char *str);
       
      -/* check that the buffer can accomodate <extra_needed> more bytes */
      +/* check that the buffer can accommodate <extra_needed> more bytes */
       DAV_DECLARE(void) dav_check_bufsize(apr_pool_t *p, dav_buffer *pbuf,
                                           apr_size_t extra_needed);
       
      @@ -450,7 +486,7 @@ typedef struct
       } dav_get_props_result;
       
       /* holds the contents of a <response> element */
      -typedef struct dav_response
      +struct dav_response
       {
           const char *href;           /* always */
           const char *desc;           /* optional description at <response> level */
      @@ -461,7 +497,7 @@ typedef struct dav_response
           int status;
       
           struct dav_response *next;
      -} dav_response;
      +};
       
       typedef struct
       {
      @@ -498,6 +534,42 @@ typedef enum {
       #define DAV_STYLE_RFC822        2
       #define DAV_TIMEBUF_SIZE        30
       
      +/* Write a complete RESPONSE object out as a <DAV:response> xml
      + * element.  Data is sent into brigade BB, which is auto-flushed into
      + * the output filter stack for request R.  Use POOL for any temporary
      + * allocations.
      + *
      + * [Presumably the <multistatus> tag has already been written;  this
      + * routine is shared by dav_send_multistatus and dav_stream_response.]
      + */
      +DAV_DECLARE(void) dav_send_one_response(dav_response *response,
      +                                        apr_bucket_brigade *bb,
      +                                        request_rec *r,
      +                                        apr_pool_t *pool);
      +
      +/* Factorized helper function: prep request_rec R for a multistatus
      + * response and write <multistatus> tag into BB, destined for
      + * R->output_filters.  Use xml NAMESPACES in initial tag, if
      + * non-NULL.
      + */
      +DAV_DECLARE(void) dav_begin_multistatus(apr_bucket_brigade *bb,
      +                                        request_rec *r, int status,
      +                                        apr_array_header_t *namespaces);
      +
      +/* Finish a multistatus response started by dav_begin_multistatus: */
      +DAV_DECLARE(apr_status_t) dav_finish_multistatus(request_rec *r,
      +                                                 apr_bucket_brigade *bb);
      +
      +/* Send a multistatus response */
      +DAV_DECLARE(void) dav_send_multistatus(request_rec *r, int status,
      +                                       dav_response *first,
      +                                       apr_array_header_t *namespaces);
      +
      +DAV_DECLARE(apr_text *) dav_failed_proppatch(apr_pool_t *p,
      +                                             apr_array_header_t *prop_ctx);
      +DAV_DECLARE(apr_text *) dav_success_proppatch(apr_pool_t *p,
      +                                              apr_array_header_t *prop_ctx);
      +
       DAV_DECLARE(int) dav_get_depth(request_rec *r, int def_depth);
       
       DAV_DECLARE(int) dav_validate_root(const apr_xml_doc *doc,
      @@ -648,6 +720,7 @@ DAV_DECLARE(const dav_hooks_search *) dav_get_search_hooks(request_rec *r);
       DAV_DECLARE(void) dav_register_provider(apr_pool_t *p, const char *name,
                                               const dav_provider *hooks);
       DAV_DECLARE(const dav_provider *) dav_lookup_provider(const char *name);
      +DAV_DECLARE(const char *) dav_get_provider_name(request_rec *r);
       
       
       /* ### deprecated */
      @@ -849,7 +922,7 @@ struct dav_hooks_liveprop
       **
       ** This structure is used as a standard way to determine if a particular
       ** property is a live property. Its use is not part of the mandated liveprop
      -** interface, but can be used by liveprop providers in conjuction with the
      +** interface, but can be used by liveprop providers in conjunction with the
       ** utility routines below.
       **
       ** spec->name == NULL is the defined end-sentinel for a list of specs.
      @@ -1282,6 +1355,9 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
                                                  the 424 DAV:response */
       #define DAV_VALIDATE_USE_424    0x0080  /* return 424 status, not 207 */
       #define DAV_VALIDATE_IS_PARENT  0x0100  /* for internal use */
      +#define DAV_VALIDATE_NO_MODIFY  0x0200  /* resource is not being modified
      +                                           so allow even if lock token
      +                                           is not provided */
       
       /* Lock-null related public lock functions */
       DAV_DECLARE(int) dav_get_resource_state(request_rec *r,
      @@ -2293,7 +2369,7 @@ struct dav_hooks_vsn
           ** exist. Any <DAV:mkworkspace> element is passed to the provider
           ** in the "doc" structure; it may be empty.
           **
      -    ** If workspace creation is succesful, the state of the resource
      +    ** If workspace creation is successful, the state of the resource
           ** object is updated appropriately.
           **
           ** This hook is optional; if the provider does not support workspaces,
      @@ -2316,7 +2392,7 @@ struct dav_hooks_vsn
           ** Create an activity resource. The resource must not already
           ** exist.
           **
      -    ** If activity creation is succesful, the state of the resource
      +    ** If activity creation is successful, the state of the resource
           ** object is updated appropriately.
           **
           ** This hook is optional; if the provider does not support activities,
      diff --git a/modules/dav/main/mod_dav.mak b/modules/dav/main/mod_dav.mak
      new file mode 100644
      index 00000000000..a107e22d463
      --- /dev/null
      +++ b/modules/dav/main/mod_dav.mak
      @@ -0,0 +1,406 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dav.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dav - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_dav - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dav - Win32 Release" && "$(CFG)" != "mod_dav - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dav.mak" CFG="mod_dav - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dav - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dav - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dav.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\liveprop.obj"
      +	-@erase "$(INTDIR)\mod_dav.obj"
      +	-@erase "$(INTDIR)\mod_dav.res"
      +	-@erase "$(INTDIR)\mod_dav_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_src.pdb"
      +	-@erase "$(INTDIR)\props.obj"
      +	-@erase "$(INTDIR)\providers.obj"
      +	-@erase "$(INTDIR)\std_liveprop.obj"
      +	-@erase "$(INTDIR)\util.obj"
      +	-@erase "$(INTDIR)\util_lock.obj"
      +	-@erase "$(OUTDIR)\mod_dav.exp"
      +	-@erase "$(OUTDIR)\mod_dav.lib"
      +	-@erase "$(OUTDIR)\mod_dav.pdb"
      +	-@erase "$(OUTDIR)\mod_dav.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DAV_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dav.so" /d LONG_NAME="dav_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav.pdb" /debug /out:"$(OUTDIR)\mod_dav.so" /implib:"$(OUTDIR)\mod_dav.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\liveprop.obj" \
      +	"$(INTDIR)\mod_dav.obj" \
      +	"$(INTDIR)\props.obj" \
      +	"$(INTDIR)\providers.obj" \
      +	"$(INTDIR)\std_liveprop.obj" \
      +	"$(INTDIR)\util.obj" \
      +	"$(INTDIR)\util_lock.obj" \
      +	"$(INTDIR)\mod_dav.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dav.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dav.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav.so"
      +   if exist .\Release\mod_dav.so.manifest mt.exe -manifest .\Release\mod_dav.so.manifest -outputresource:.\Release\mod_dav.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dav.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dav.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\liveprop.obj"
      +	-@erase "$(INTDIR)\mod_dav.obj"
      +	-@erase "$(INTDIR)\mod_dav.res"
      +	-@erase "$(INTDIR)\mod_dav_src.idb"
      +	-@erase "$(INTDIR)\mod_dav_src.pdb"
      +	-@erase "$(INTDIR)\props.obj"
      +	-@erase "$(INTDIR)\providers.obj"
      +	-@erase "$(INTDIR)\std_liveprop.obj"
      +	-@erase "$(INTDIR)\util.obj"
      +	-@erase "$(INTDIR)\util_lock.obj"
      +	-@erase "$(OUTDIR)\mod_dav.exp"
      +	-@erase "$(OUTDIR)\mod_dav.lib"
      +	-@erase "$(OUTDIR)\mod_dav.pdb"
      +	-@erase "$(OUTDIR)\mod_dav.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "DAV_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dav_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dav.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dav.so" /d LONG_NAME="dav_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dav.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dav.pdb" /debug /out:"$(OUTDIR)\mod_dav.so" /implib:"$(OUTDIR)\mod_dav.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_dav.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\liveprop.obj" \
      +	"$(INTDIR)\mod_dav.obj" \
      +	"$(INTDIR)\props.obj" \
      +	"$(INTDIR)\providers.obj" \
      +	"$(INTDIR)\std_liveprop.obj" \
      +	"$(INTDIR)\util.obj" \
      +	"$(INTDIR)\util_lock.obj" \
      +	"$(INTDIR)\mod_dav.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dav.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dav.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dav.so"
      +   if exist .\Debug\mod_dav.so.manifest mt.exe -manifest .\Debug\mod_dav.so.manifest -outputresource:.\Debug\mod_dav.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dav.dep")
      +!INCLUDE "mod_dav.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dav.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dav - Win32 Release" || "$(CFG)" == "mod_dav - Win32 Debug"
      +SOURCE=.\liveprop.c
      +
      +"$(INTDIR)\liveprop.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\mod_dav.c
      +
      +"$(INTDIR)\mod_dav.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\props.c
      +
      +"$(INTDIR)\props.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\providers.c
      +
      +"$(INTDIR)\providers.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\std_liveprop.c
      +
      +"$(INTDIR)\std_liveprop.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\util.c
      +
      +"$(INTDIR)\util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\util_lock.c
      +
      +"$(INTDIR)\util_lock.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_dav - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\dav\main"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\main"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\dav\main"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\main"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\dav\main"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\main"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\dav\main"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\dav\main"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dav - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\dav\main"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\main"
      +
      +!ELSEIF  "$(CFG)" == "mod_dav - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\dav\main"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\dav\main"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dav - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dav.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dav.so" /d LONG_NAME="dav_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dav - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dav.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dav.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dav.so" /d LONG_NAME="dav_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/dav/main/props.c b/modules/dav/main/props.c
      index d87dd611316..f64878e67fe 100644
      --- a/modules/dav/main/props.c
      +++ b/modules/dav/main/props.c
      @@ -321,10 +321,14 @@ static int dav_rw_liveprop(dav_propdb *propdb, dav_elem_private *priv)
       /* do a sub-request to fetch properties for the target resource's URI. */
       static void dav_do_prop_subreq(dav_propdb *propdb)
       {
      +    /* need to escape the uri that's in the resource struct because during
      +     * the property walker it's not encoded. */
      +    const char *e_uri = ap_escape_uri(propdb->resource->pool,
      +                                      propdb->resource->uri);
      +
           /* perform a "GET" on the resource's URI (note that the resource
              may not correspond to the current request!). */
      -    propdb->subreq = ap_sub_req_lookup_uri(propdb->resource->uri, propdb->r,
      -                                           NULL);
      +    propdb->subreq = ap_sub_req_lookup_uri(e_uri, propdb->r, NULL);
       }
       
       static dav_error * dav_insert_coreprop(dav_propdb *propdb,
      @@ -562,7 +566,6 @@ DAV_DECLARE(void) dav_close_propdb(dav_propdb *propdb)
       #if 0
           apr_pool_destroy(propdb->p);
       #endif
      -    return;
       }
       
       DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
      @@ -594,13 +597,14 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
               if (propdb->db != NULL) {
                   dav_xmlns_info *xi = dav_xmlns_create(propdb->p);
                   dav_prop_name name;
      +            dav_error *err;
       
                   /* define (up front) any namespaces the db might need */
                   (void) (*db_hooks->define_namespaces)(propdb->db, xi);
       
                   /* get the first property name, beginning the scan */
      -            (void) (*db_hooks->first_name)(propdb->db, &name);
      -            while (name.ns != NULL) {
      +            err = (*db_hooks->first_name)(propdb->db, &name);
      +            while (!err && name.ns) {
       
                       /*
                       ** We also look for <DAV:getcontenttype> and
      @@ -619,7 +623,6 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
                       }
       
                       if (what == DAV_PROP_INSERT_VALUE) {
      -                    dav_error *err;
                           int found;
       
                           if ((err = (*db_hooks->output_value)(propdb->db, &name,
      @@ -638,7 +641,7 @@ DAV_DECLARE(dav_get_props_result) dav_get_allprops(dav_propdb *propdb,
                       }
       
                     next_key:
      -                (void) (*db_hooks->next_name)(propdb->db, &name);
      +                err = (*db_hooks->next_name)(propdb->db, &name);
                   }
       
                   /* all namespaces have been entered into xi. generate them into
      diff --git a/modules/dav/main/std_liveprop.c b/modules/dav/main/std_liveprop.c
      index 1f79dc71287..e760c655b53 100644
      --- a/modules/dav/main/std_liveprop.c
      +++ b/modules/dav/main/std_liveprop.c
      @@ -86,18 +86,18 @@ static dav_prop_insert dav_core_insert_prop(const dav_resource *resource,
                           continue;
       
                       if (!res_hooks->get_resource_type(resource, &name, &uri) &&
      -            name) {
      +                    name) {
       
                           if (!uri || !strcasecmp(uri, "DAV:"))
                               value = apr_pstrcat(p, value ? value : "",
      -                        "<D:", name, "/>", NULL);
      -            else
      +                                            "<D:", name, "/>", NULL);
      +                    else
                               value = apr_pstrcat(p, value ? value : "",
      -                        "<x:", name,
      -                        " xmlns:x=\"", uri,
      -                        "\"/>", NULL);
      +                                            "<x:", name,
      +                                            " xmlns:x=\"", uri,
      +                                            "\"/>", NULL);
                       }
      -        }
      +            }
               }
               switch (resource->type) {
               case DAV_RESOURCE_TYPE_VERSION:
      @@ -114,8 +114,8 @@ static dav_prop_insert dav_core_insert_prop(const dav_resource *resource,
                   else {
                       /* ### should we denote lock-null resources? */
                       if (value == NULL) {
      -                value = "";        /* becomes: <D:resourcetype/> */
      -            }
      +                    value = "";        /* becomes: <D:resourcetype/> */
      +                }
                   }
                   break;
               case DAV_RESOURCE_TYPE_HISTORY:
      diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c
      index d076cc45fd0..9f246047941 100644
      --- a/modules/dav/main/util.c
      +++ b/modules/dav/main/util.c
      @@ -77,6 +77,30 @@ DAV_DECLARE(dav_error*) dav_push_error(apr_pool_t *p, int status,
           return err;
       }
       
      +DAV_DECLARE(dav_error*) dav_join_error(dav_error *dest, dav_error *src)
      +{
      +    dav_error *curr = dest;
      +
      +    /* src error doesn't exist so nothing to join just return dest */
      +    if (src == NULL) {
      +        return dest;
      +    }
      +
      +    /* dest error doesn't exist so nothing to join just return src */
      +    if (curr == NULL) {
      +        return src;
      +    }
      +
      +    /* find last error in dest stack */
      +    while (curr->prev != NULL) {
      +        curr = curr->prev;
      +    }
      +
      +    /* add the src error onto end of dest stack and return it */
      +    curr->prev = src;
      +    return dest;
      +}
      +
       DAV_DECLARE(void) dav_check_bufsize(apr_pool_t * p, dav_buffer *pbuf,
                                           apr_size_t extra_needed)
       {
      @@ -372,8 +396,10 @@ DAV_DECLARE(const char *) dav_xml_get_cdata(const apr_xml_elem *elem, apr_pool_t
       
           if (strip_white) {
               /* trim leading whitespace */
      -        while (apr_isspace(*cdata))     /* assume: return false for '\0' */
      +        while (apr_isspace(*cdata)) {     /* assume: return false for '\0' */
                   ++cdata;
      +            --len;
      +        }
       
               /* trim trailing whitespace */
               while (len-- > 0 && apr_isspace(cdata[len]))
      @@ -402,7 +428,7 @@ DAV_DECLARE(void) dav_xmlns_add(dav_xmlns_info *xi,
           apr_hash_set(xi->prefix_uri, prefix, APR_HASH_KEY_STRING, uri);
       
           /* note: this may overwrite an existing URI->prefix mapping, but it
      -       doesn't matter -- any prefix is usuable to specify the URI. */
      +       doesn't matter -- any prefix is usable to specify the URI. */
           apr_hash_set(xi->uri_prefix, uri, APR_HASH_KEY_STRING, prefix);
       }
       
      @@ -561,7 +587,7 @@ static dav_error * dav_add_if_state(apr_pool_t *p, dav_if_header *ih,
       }
       
       /* fetch_next_token returns the substring from str+1
      - * to the next occurence of char term, or \0, whichever
      + * to the next occurrence of char term, or \0, whichever
        * occurs first.  Leading whitespace is ignored.
        */
       static char *dav_fetch_next_token(char **str, char term)
      @@ -635,9 +661,19 @@ static dav_error * dav_process_if_header(request_rec *r, dav_if_header **p_ih)
       
                   /* clean up the URI a bit */
                   ap_getparents(parsed_uri.path);
      +
      +            /* the resources we will compare to have unencoded paths */
      +            if (ap_unescape_url(parsed_uri.path) != OK) {
      +                return dav_new_error(r->pool, HTTP_BAD_REQUEST,
      +                                     DAV_ERR_IF_TAGGED, rv,
      +                                     "Invalid percent encoded URI in "
      +                                     "tagged If-header.");
      +            }
      +
                   uri_len = strlen(parsed_uri.path);
      -            if (uri_len > 1 && parsed_uri.path[uri_len - 1] == '/')
      +            if (uri_len > 1 && parsed_uri.path[uri_len - 1] == '/') {
                       parsed_uri.path[--uri_len] = '\0';
      +            }
       
                   uri = parsed_uri.path;
                   list_type = tagged;
      @@ -920,13 +956,16 @@ static dav_error * dav_validate_resource_state(apr_pool_t *p,
               /*
               ** For methods other than LOCK:
               **
      -        ** If we have no locks, then <seen_locktoken> can be set to true --
      +        ** If we have no locks or if the resource is not being modified
      +        ** (per RFC 4918 the lock token is not required on resources
      +        ** we are not changing), then <seen_locktoken> can be set to true --
               ** pretending that we've already met the requirement of seeing one
               ** of the resource's locks in the If: header.
               **
               ** Otherwise, it must be cleared and we'll look for one.
               */
      -        seen_locktoken = (lock_list == NULL);
      +        seen_locktoken = (lock_list == NULL
      +                          || flags & DAV_VALIDATE_NO_MODIFY);
           }
       
           /*
      @@ -1556,8 +1595,10 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
               }
           }
       
      -    /* (1) Validate the specified resource, at the specified depth */
      -    if (resource->exists && depth > 0) {
      +    /* (1) Validate the specified resource, at the specified depth.
      +     * Avoid the walk there is no if_header and we aren't planning
      +     * to modify this resource. */
      +    if (resource->exists && depth > 0 && !(!if_header && flags & DAV_VALIDATE_NO_MODIFY)) {
               dav_walker_ctx ctx = { { 0 } };
               dav_response *multi_status;
       
      @@ -1578,7 +1619,7 @@ DAV_DECLARE(dav_error *) dav_validate_request(request_rec *r,
       
               err = (*repos_hooks->walk)(&ctx.w, DAV_INFINITY, &multi_status);
               if (err == NULL) {
      -            *response = multi_status;;
      +            *response = multi_status;
               }
               /* else: implies a 5xx status code occurred. */
           }
      @@ -1714,7 +1755,7 @@ DAV_DECLARE(dav_error *) dav_get_locktoken_list(request_rec *r,
           }
       
           while (if_header != NULL) {
      -        if_state = if_header->state;        /* Begining of the if_state linked list */
      +        if_state = if_header->state;        /* Beginning of the if_state linked list */
               while (if_state != NULL)        {
                   if (if_state->condition == DAV_IF_COND_NORMAL
                       && if_state->type == dav_if_opaquelock) {
      @@ -1782,10 +1823,11 @@ DAV_DECLARE(void) dav_add_vary_header(request_rec *in_req,
            * so only do this check if there is a versioning provider */
           if (vsn_hooks != NULL) {
               const char *target = apr_table_get(in_req->headers_in, DAV_LABEL_HDR);
      -        const char *vary = apr_table_get(out_req->headers_out, "Vary");
       
               /* If Target-Selector specified, add it to the Vary header */
               if (target != NULL) {
      +            const char *vary = apr_table_get(out_req->headers_out, "Vary");
      +
                   if (vary == NULL)
                       vary = DAV_LABEL_HDR;
                   else
      diff --git a/modules/dav/main/util_lock.c b/modules/dav/main/util_lock.c
      index b402a9984af..1b3a6479826 100644
      --- a/modules/dav/main/util_lock.c
      +++ b/modules/dav/main/util_lock.c
      @@ -133,8 +133,18 @@ DAV_DECLARE(const char *) dav_lock_get_activelock(request_rec *r,
               }
               else {
                   time_t now = time(NULL);
      -            apr_snprintf(tmp, sizeof(tmp), "Second-%lu", (long unsigned int)(lock->timeout - now));
      -            dav_buffer_append(p, pbuf, tmp);
      +            
      +            /*
      +            ** Check if the timeout is not, for any reason, already elapsed.
      +            ** (e.g., because of a large collection, or disk under heavy load...)
      +             */
      +            if (now >= lock->timeout) {
      +                dav_buffer_append(p, pbuf, "Second-0");
      +            }
      +            else {
      +                apr_snprintf(tmp, sizeof(tmp), "Second-%lu", (long unsigned int)(lock->timeout - now));
      +                dav_buffer_append(p, pbuf, tmp);
      +            }
               }
       
               dav_buffer_append(p, pbuf,
      @@ -718,7 +728,7 @@ DAV_DECLARE(int) dav_get_resource_state(request_rec *r,
               if (err != NULL) {
                   /* ### don't log an error. return err. add higher-level desc. */
       
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00623)
                                 "Failed to query lock-null status for %s",
                                 r->filename);
       
      diff --git a/modules/debugging/NWGNUmakefile b/modules/debugging/NWGNUmakefile
      index e2bfce35390..5bac93c5327 100644
      --- a/modules/debugging/NWGNUmakefile
      +++ b/modules/debugging/NWGNUmakefile
      @@ -152,8 +152,8 @@ XDCDATA		=
       # If there is an NLM target, put it here
       #
       TARGET_nlm = \
      -	$(OBJDIR)/moddumpio.nlm \
       	$(OBJDIR)/modbucketeer.nlm \
      +	$(OBJDIR)/moddumpio.nlm \
       	$(EOLIST)
       
       #
      diff --git a/modules/debugging/NWGNUmodbucketeer b/modules/debugging/NWGNUmodbucketeer
      index 54cdac6f167..22a2d1101ed 100644
      --- a/modules/debugging/NWGNUmodbucketeer
      +++ b/modules/debugging/NWGNUmodbucketeer
      @@ -97,7 +97,7 @@ NLM_NAME	= modbucketeer
       # This is used by the link '-desc ' directive.
       # If left blank, NLM_NAME will be used.
       #
      -NLM_DESCRIPTION	= Apache $(VERSION_STR) Debugging IO Module
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Bucketeer Module
       
       #
       # This is used by the '-threadname' directive.  If left blank,
      @@ -148,7 +148,7 @@ XDCDATA		=
       # If there is an NLM target, put it here
       #
       TARGET_nlm = \
      -	$(OBJDIR)/modbucketeer.nlm \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
       	$(EOLIST)
       
       #
      diff --git a/modules/debugging/NWGNUmoddumpio b/modules/debugging/NWGNUmoddumpio
      index 4d4a9848f32..b09fa05c869 100644
      --- a/modules/debugging/NWGNUmoddumpio
      +++ b/modules/debugging/NWGNUmoddumpio
      @@ -97,7 +97,7 @@ NLM_NAME	= moddumpio
       # This is used by the link '-desc ' directive.
       # If left blank, NLM_NAME will be used.
       #
      -NLM_DESCRIPTION	= Apache $(VERSION_STR) Debugging IO Module
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) DumpIO Module
       
       #
       # This is used by the '-threadname' directive.  If left blank,
      @@ -148,7 +148,7 @@ XDCDATA		=
       # If there is an NLM target, put it here
       #
       TARGET_nlm = \
      -	$(OBJDIR)/moddumpio.nlm \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
       	$(EOLIST)
       
       #
      diff --git a/modules/debugging/mod_bucketeer.dep b/modules/debugging/mod_bucketeer.dep
      new file mode 100644
      index 00000000000..911398d81f1
      --- /dev/null
      +++ b/modules/debugging/mod_bucketeer.dep
      @@ -0,0 +1,53 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_bucketeer.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_bucketeer.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/debugging/mod_bucketeer.mak b/modules/debugging/mod_bucketeer.mak
      new file mode 100644
      index 00000000000..0e31e94450b
      --- /dev/null
      +++ b/modules/debugging/mod_bucketeer.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_bucketeer.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_bucketeer - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_bucketeer - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_bucketeer - Win32 Release" && "$(CFG)" != "mod_bucketeer - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_bucketeer.mak" CFG="mod_bucketeer - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_bucketeer - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_bucketeer - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_bucketeer - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_bucketeer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_bucketeer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_bucketeer.obj"
      +	-@erase "$(INTDIR)\mod_bucketeer.res"
      +	-@erase "$(INTDIR)\mod_bucketeer_src.idb"
      +	-@erase "$(INTDIR)\mod_bucketeer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_bucketeer.exp"
      +	-@erase "$(OUTDIR)\mod_bucketeer.lib"
      +	-@erase "$(OUTDIR)\mod_bucketeer.pdb"
      +	-@erase "$(OUTDIR)\mod_bucketeer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_bucketeer_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_bucketeer.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_bucketeer.so" /d LONG_NAME="bucketeer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_bucketeer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_bucketeer.pdb" /debug /out:"$(OUTDIR)\mod_bucketeer.so" /implib:"$(OUTDIR)\mod_bucketeer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_bucketeer.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_bucketeer.obj" \
      +	"$(INTDIR)\mod_bucketeer.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_bucketeer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_bucketeer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_bucketeer.so"
      +   if exist .\Release\mod_bucketeer.so.manifest mt.exe -manifest .\Release\mod_bucketeer.so.manifest -outputresource:.\Release\mod_bucketeer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_bucketeer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_bucketeer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_bucketeer.obj"
      +	-@erase "$(INTDIR)\mod_bucketeer.res"
      +	-@erase "$(INTDIR)\mod_bucketeer_src.idb"
      +	-@erase "$(INTDIR)\mod_bucketeer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_bucketeer.exp"
      +	-@erase "$(OUTDIR)\mod_bucketeer.lib"
      +	-@erase "$(OUTDIR)\mod_bucketeer.pdb"
      +	-@erase "$(OUTDIR)\mod_bucketeer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_bucketeer_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_bucketeer.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_bucketeer.so" /d LONG_NAME="bucketeer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_bucketeer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_bucketeer.pdb" /debug /out:"$(OUTDIR)\mod_bucketeer.so" /implib:"$(OUTDIR)\mod_bucketeer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_bucketeer.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_bucketeer.obj" \
      +	"$(INTDIR)\mod_bucketeer.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_bucketeer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_bucketeer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_bucketeer.so"
      +   if exist .\Debug\mod_bucketeer.so.manifest mt.exe -manifest .\Debug\mod_bucketeer.so.manifest -outputresource:.\Debug\mod_bucketeer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_bucketeer.dep")
      +!INCLUDE "mod_bucketeer.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_bucketeer.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_bucketeer - Win32 Release" || "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_bucketeer - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\debugging"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\debugging"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_bucketeer - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\debugging"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\debugging"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_bucketeer - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\debugging"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\debugging"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\debugging"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_bucketeer - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_bucketeer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_bucketeer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_bucketeer.so" /d LONG_NAME="bucketeer_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_bucketeer - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_bucketeer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_bucketeer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_bucketeer.so" /d LONG_NAME="bucketeer_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_bucketeer.c
      +
      +"$(INTDIR)\mod_bucketeer.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/debugging/mod_dumpio.c b/modules/debugging/mod_dumpio.c
      index e15932db55e..c2ef657b855 100644
      --- a/modules/debugging/mod_dumpio.c
      +++ b/modules/debugging/mod_dumpio.c
      @@ -45,7 +45,7 @@ typedef struct dumpio_conf_t {
        * line length of all \xNN sequences; log_error cannot record more
        * than MAX_STRING_LEN characters.
        */
      -#define dumpio_MAX_STRING_LEN MAX_STRING_LEN / 4 - 80
      +#define dumpio_MAX_STRING_LEN (MAX_STRING_LEN / 4 - 80)
       
       /*
        * Workhorse function: simply log to the current error_log
      @@ -97,13 +97,15 @@ static void dumpit(ap_filter_t *f, apr_bucket *b, dumpio_conf_t *ptr)
                        * within ap_log_error, and introduce new vformatter %-escapes
                        * for escaping text, and for binary text (fixed len strings).
                        */
      -                ap_log_cerror(APLOG_MARK | APLOG_NOERRNO, APLOG_TRACE7, 0, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
                                     "mod_dumpio:  %s (%s-%s): %.*s", f->frec->name,
                                     (APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
                                     b->type->name, (int)logbytes, buf);
       #endif
      +                buf += logbytes;
                   }
      -        } else {
      +        }
      +        else {
                   ap_log_cerror(APLOG_MARK, APLOG_TRACE7, rv, c,
                                 "mod_dumpio:  %s (%s-%s): %s", f->frec->name,
                                 (APR_BUCKET_IS_METADATA(b)) ? "metadata" : "data",
      @@ -135,7 +137,7 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
                         f->frec->name,
                         whichmode(mode),
                         ((block) == APR_BLOCK_READ) ? "blocking" : "nonblocking",
      -                  readbytes) ;
      +                  readbytes);
       
           ret = ap_get_brigade(f->next, bb, mode, block, readbytes);
       
      @@ -143,9 +145,11 @@ static int dumpio_input_filter (ap_filter_t *f, apr_bucket_brigade *bb,
               for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
                 dumpit(f, b, ptr);
               }
      -    } else {
      +    }
      +    else {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE7, 0, c,
                             "mod_dumpio: %s - %d", f->frec->name, ret) ;
      +        return ret;
           }
       
           return APR_SUCCESS ;
      @@ -204,15 +208,15 @@ static void dumpio_register_hooks(apr_pool_t *p)
       static void *dumpio_create_sconfig(apr_pool_t *p, server_rec *s)
       {
           dumpio_conf_t *ptr = apr_pcalloc(p, sizeof *ptr);
      -    ptr->enable_input = ptr->enable_output = 0;
      +    ptr->enable_input = 0;
      +    ptr->enable_output = 0;
           return ptr;
       }
       
       static const char *dumpio_enable_input(cmd_parms *cmd, void *dummy, int arg)
       {
      -    dumpio_conf_t *ptr =
      -    (dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
      -                                           &dumpio_module);
      +    dumpio_conf_t *ptr = ap_get_module_config(cmd->server->module_config,
      +                                              &dumpio_module);
       
           ptr->enable_input = arg;
           return NULL;
      @@ -220,9 +224,8 @@ static const char *dumpio_enable_input(cmd_parms *cmd, void *dummy, int arg)
       
       static const char *dumpio_enable_output(cmd_parms *cmd, void *dummy, int arg)
       {
      -    dumpio_conf_t *ptr =
      -    (dumpio_conf_t *) ap_get_module_config(cmd->server->module_config,
      -                                           &dumpio_module);
      +    dumpio_conf_t *ptr = ap_get_module_config(cmd->server->module_config,
      +                                              &dumpio_module);
       
           ptr->enable_output = arg;
           return NULL;
      @@ -238,10 +241,10 @@ static const command_rec dumpio_cmds[] = {
       
       AP_DECLARE_MODULE(dumpio) = {
               STANDARD20_MODULE_STUFF,
      -        NULL,
      -        NULL,
      -        dumpio_create_sconfig,
      -        NULL,
      -        dumpio_cmds,
      -        dumpio_register_hooks
      +        NULL,                   /* create per-dir    config structures */
      +        NULL,                   /* merge  per-dir    config structures */
      +        dumpio_create_sconfig,  /* create per-server config structures */
      +        NULL,                   /* merge  per-server config structures */
      +        dumpio_cmds,            /* table of config file commands       */
      +        dumpio_register_hooks   /* register hooks                      */
       };
      diff --git a/modules/debugging/mod_dumpio.dep b/modules/debugging/mod_dumpio.dep
      new file mode 100644
      index 00000000000..889febc45cb
      --- /dev/null
      +++ b/modules/debugging/mod_dumpio.dep
      @@ -0,0 +1,50 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dumpio.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_dumpio.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/debugging/mod_dumpio.mak b/modules/debugging/mod_dumpio.mak
      new file mode 100644
      index 00000000000..d0943c744f0
      --- /dev/null
      +++ b/modules/debugging/mod_dumpio.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dumpio.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dumpio - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_dumpio - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dumpio - Win32 Release" && "$(CFG)" != "mod_dumpio - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dumpio.mak" CFG="mod_dumpio - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dumpio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dumpio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dumpio - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dumpio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dumpio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dumpio.obj"
      +	-@erase "$(INTDIR)\mod_dumpio.res"
      +	-@erase "$(INTDIR)\mod_dumpio_src.idb"
      +	-@erase "$(INTDIR)\mod_dumpio_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dumpio.exp"
      +	-@erase "$(OUTDIR)\mod_dumpio.lib"
      +	-@erase "$(OUTDIR)\mod_dumpio.pdb"
      +	-@erase "$(OUTDIR)\mod_dumpio.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dumpio_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dumpio.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dumpio.so" /d LONG_NAME="dumpio_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dumpio.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dumpio.pdb" /debug /out:"$(OUTDIR)\mod_dumpio.so" /implib:"$(OUTDIR)\mod_dumpio.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dumpio.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dumpio.obj" \
      +	"$(INTDIR)\mod_dumpio.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dumpio.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dumpio.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dumpio.so"
      +   if exist .\Release\mod_dumpio.so.manifest mt.exe -manifest .\Release\mod_dumpio.so.manifest -outputresource:.\Release\mod_dumpio.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dumpio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dumpio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dumpio.obj"
      +	-@erase "$(INTDIR)\mod_dumpio.res"
      +	-@erase "$(INTDIR)\mod_dumpio_src.idb"
      +	-@erase "$(INTDIR)\mod_dumpio_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dumpio.exp"
      +	-@erase "$(OUTDIR)\mod_dumpio.lib"
      +	-@erase "$(OUTDIR)\mod_dumpio.pdb"
      +	-@erase "$(OUTDIR)\mod_dumpio.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dumpio_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dumpio.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dumpio.so" /d LONG_NAME="dumpio_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dumpio.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dumpio.pdb" /debug /out:"$(OUTDIR)\mod_dumpio.so" /implib:"$(OUTDIR)\mod_dumpio.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dumpio.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dumpio.obj" \
      +	"$(INTDIR)\mod_dumpio.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dumpio.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dumpio.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dumpio.so"
      +   if exist .\Debug\mod_dumpio.so.manifest mt.exe -manifest .\Debug\mod_dumpio.so.manifest -outputresource:.\Debug\mod_dumpio.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dumpio.dep")
      +!INCLUDE "mod_dumpio.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dumpio.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dumpio - Win32 Release" || "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_dumpio - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\debugging"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\debugging"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dumpio - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\debugging"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\debugging"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\debugging"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dumpio - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\debugging"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\debugging"
      +
      +!ELSEIF  "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\debugging"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\debugging"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dumpio - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dumpio.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dumpio.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dumpio.so" /d LONG_NAME="dumpio_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dumpio - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dumpio.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dumpio.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dumpio.so" /d LONG_NAME="dumpio_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_dumpio.c
      +
      +"$(INTDIR)\mod_dumpio.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c
      index 161ceed651f..336f90f3fa5 100644
      --- a/modules/echo/mod_echo.c
      +++ b/modules/echo/mod_echo.c
      @@ -152,18 +152,17 @@ static int process_echo_connection(conn_rec *c)
                                         APR_BLOCK_READ, 0)) != APR_SUCCESS)) {
                   apr_brigade_cleanup(bb);
                   if (!APR_STATUS_IS_EOF(rv) && ! APR_STATUS_IS_TIMEUP(rv))
      -                ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
      +                ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server, APLOGNO(01611)
                                    "ProtocolEcho: Failure reading from %s",
      -                             c->remote_ip);
      +                             c->client_ip);
                   break;
               }
       
               /* Something horribly wrong happened.  Someone didn't block! */
               if (APR_BRIGADE_EMPTY(bb)) {
      -            apr_brigade_cleanup(bb);
      -            ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server, APLOGNO(01612)
                                "ProtocolEcho: Error - read empty brigade from %s!",
      -                         c->remote_ip);
      +                         c->client_ip);
                   break;
               }
       
      @@ -179,9 +178,9 @@ static int process_echo_connection(conn_rec *c)
               APR_BRIGADE_INSERT_TAIL(bb, b);
               rv = ap_pass_brigade(c->output_filters, bb);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, rv, c->base_server, APLOGNO(01613)
                                "ProtocolEcho: Failure writing to %s",
      -                         c->remote_ip);
      +                         c->client_ip);
                   break;
               }
               apr_brigade_cleanup(bb);
      diff --git a/modules/echo/mod_echo.dep b/modules/echo/mod_echo.dep
      new file mode 100644
      index 00000000000..d4789e79b90
      --- /dev/null
      +++ b/modules/echo/mod_echo.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_echo.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_echo.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/echo/mod_echo.mak b/modules/echo/mod_echo.mak
      new file mode 100644
      index 00000000000..6066fa70ca6
      --- /dev/null
      +++ b/modules/echo/mod_echo.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_echo.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_echo - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_echo - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_echo - Win32 Release" && "$(CFG)" != "mod_echo - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_echo.mak" CFG="mod_echo - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_echo - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_echo - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_echo - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_echo.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_echo.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_echo.obj"
      +	-@erase "$(INTDIR)\mod_echo.res"
      +	-@erase "$(INTDIR)\mod_echo_src.idb"
      +	-@erase "$(INTDIR)\mod_echo_src.pdb"
      +	-@erase "$(OUTDIR)\mod_echo.exp"
      +	-@erase "$(OUTDIR)\mod_echo.lib"
      +	-@erase "$(OUTDIR)\mod_echo.pdb"
      +	-@erase "$(OUTDIR)\mod_echo.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_echo_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_echo.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_echo.so" /d LONG_NAME="echo_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_echo.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_echo.pdb" /debug /out:"$(OUTDIR)\mod_echo.so" /implib:"$(OUTDIR)\mod_echo.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_echo.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_echo.obj" \
      +	"$(INTDIR)\mod_echo.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_echo.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_echo.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_echo.so"
      +   if exist .\Release\mod_echo.so.manifest mt.exe -manifest .\Release\mod_echo.so.manifest -outputresource:.\Release\mod_echo.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_echo.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_echo.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_echo.obj"
      +	-@erase "$(INTDIR)\mod_echo.res"
      +	-@erase "$(INTDIR)\mod_echo_src.idb"
      +	-@erase "$(INTDIR)\mod_echo_src.pdb"
      +	-@erase "$(OUTDIR)\mod_echo.exp"
      +	-@erase "$(OUTDIR)\mod_echo.lib"
      +	-@erase "$(OUTDIR)\mod_echo.pdb"
      +	-@erase "$(OUTDIR)\mod_echo.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_echo_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_echo.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_echo.so" /d LONG_NAME="echo_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_echo.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_echo.pdb" /debug /out:"$(OUTDIR)\mod_echo.so" /implib:"$(OUTDIR)\mod_echo.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_echo.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_echo.obj" \
      +	"$(INTDIR)\mod_echo.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_echo.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_echo.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_echo.so"
      +   if exist .\Debug\mod_echo.so.manifest mt.exe -manifest .\Debug\mod_echo.so.manifest -outputresource:.\Debug\mod_echo.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_echo.dep")
      +!INCLUDE "mod_echo.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_echo.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_echo - Win32 Release" || "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_echo - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\echo"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\echo"
      +
      +!ELSEIF  "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\echo"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\echo"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_echo - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\echo"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\echo"
      +
      +!ELSEIF  "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\echo"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\echo"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_echo - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\echo"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\echo"
      +
      +!ELSEIF  "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\echo"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\echo"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_echo - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_echo.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_echo.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_echo.so" /d LONG_NAME="echo_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_echo - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_echo.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_echo.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_echo.so" /d LONG_NAME="echo_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_echo.c
      +
      +"$(INTDIR)\mod_echo.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/examples/NWGNUmakefile b/modules/examples/NWGNUmakefile
      index 01925762706..5d716aec540 100644
      --- a/modules/examples/NWGNUmakefile
      +++ b/modules/examples/NWGNUmakefile
      @@ -151,14 +151,15 @@ XDCDATA		=
       #
       # If there is an NLM target, put it here
       #
      -# We are referencing example.nlm twice to get around a known issue with the
      -# makefiles.  Normally if there is only one element to be built within a
      +# If there is only one element to build it needs to be included twice
      +# in the below target list.
      +# Normally if there is only one element to be built within a
       # directory, the makefile for the single element would be called NWGNUmakefile.
       # But if there are multiples, the parent NWGNUmakefile must reference more
       # than one submakefile. Because the experimental directory might vary in the
       # number of submakefiles, but for the moment only contains one, we reference
       # it twice to allow it parent NWGNUmakefile to work properly.  If another
      -# submakefile is added, the extra reference to example.nlm should be removed.
      +# submakefile is added, the extra reference to the first NLM should be removed.
       TARGET_nlm = \
       	$(OBJDIR)/example_hooks.nlm \
       	$(OBJDIR)/example_ipc.nlm \
      diff --git a/modules/experimental/README b/modules/examples/README
      similarity index 61%
      rename from modules/experimental/README
      rename to modules/examples/README
      index b911e5d0cfb..2e03362aeb2 100644
      --- a/modules/experimental/README
      +++ b/modules/examples/README
      @@ -1,38 +1,38 @@
       README for Apache 2.0 Example Module
       [April, 1997, updated May 2000]
       
      -The files in the src/modules/example directory under the Apache
      +The files in the src/modules/examples directory under the Apache
       distribution directory tree are provided as an example to those that
       wish to write modules that use the Apache API.
       
      -The main file is mod_example.c, which illustrates all the different
      +The main file is mod_example_hooks.c, which illustrates all the different
       callback mechanisms and call syntaces.  By no means does an add-on
       module need to include routines for all of the callbacks - quite the
       contrary!
       
       The example module is an actual working module.  If you link it into
      -your server, enable the "example-handler" handler for a location, and then
      -browse to that location, you will see a display of some of the tracing
      -the example module did as the various callbacks were made.
      +your server, enable the "example-hooks-handler" handler for a location,
      +and then browse to that location, you will see a display of some of the
      +tracing the example module did as the various callbacks were made.
       
      -To include the example module in your server add --enable-example to the
      -other ./configure arguments executed from the httpd source tree. After
      -that run 'make'.
      +To include the example module in your server add --enable-example-hooks
      +to the other ./configure arguments executed from the httpd source tree.
      +After that run 'make'.
       
       To add another module of your own:
       
      -    A. cp modules/experimental/mod_example.c modules/experimental/mod_myexample.c
      +    A. cp modules/examples/mod_example_hooks.c modules/examples/mod_myexample.c
           B. Modify the file
      -    C. Add an entry to modules/experimental/config.m4, e.g.
      +    C. Add an entry to modules/examples/config.m4, e.g.
                APACHE_MODULE(myexample, my new module, , , no)
              The last argument specifies if the module is built by-default
           D. Build the server with --enable-myexample
       
       For windows, the process is slightly different;
       
      -    A. copy modules\experimental\mod_example.c modules\experimental\mod_myexample.c
      -    B. copy modules\experimental\mod_example.dsp modules\experimental\mod_myexample.dsp
      -    C. replace the occurances of 'example' with your module name.
      +    A. copy modules\examples\mod_example_hooks.c modules\examples\mod_myexample.c
      +    B. copy modules\examples\mod_example_hooks.dsp modules\examples\mod_myexample.dsp
      +    C. replace the occurrences of 'example_hooks' with your module name.
           D. add the new .dsp to your Apache.dsw workspace, with dependencies
              on the libapr, libaprutil and libhttpd projects.  With the newer
              Developer Studio 2002 through 2005, when you add the new .dsp
      @@ -42,13 +42,13 @@ To activate the example module, include a block similar to the
       following in your httpd.conf file:
       
           <Location /example-info>
      -	SetHandler example-handler
      +	SetHandler example-hooks-handler
           </Location>
       
       As an alternative, you can put the following into a .htaccess file and
       then request the file "test.example" from that location:
       
      -    AddHandler example-handler .example
      +    AddHandler example-hooks-handler .example
       
       After reloading/restarting your server, you should be able to browse
       to this location and see the brief display mentioned earlier.
      diff --git a/modules/examples/mod_case_filter.c b/modules/examples/mod_case_filter.c
      index f0b84d2900f..409f65bfa66 100644
      --- a/modules/examples/mod_case_filter.c
      +++ b/modules/examples/mod_case_filter.c
      @@ -24,43 +24,43 @@
       
       #include <ctype.h>
       
      -static const char s_szCaseFilterName[]="CaseFilter";
      +static const char s_szCaseFilterName[] = "CaseFilter";
       module AP_MODULE_DECLARE_DATA case_filter_module;
       
       typedef struct
      -    {
      +{
           int bEnabled;
      -    } CaseFilterConfig;
      +} CaseFilterConfig;
       
      -static void *CaseFilterCreateServerConfig(apr_pool_t *p,server_rec *s)
      -    {
      -    CaseFilterConfig *pConfig=apr_pcalloc(p,sizeof *pConfig);
      +static void *CaseFilterCreateServerConfig(apr_pool_t *p, server_rec *s)
      +{
      +    CaseFilterConfig *pConfig = apr_pcalloc(p,sizeof *pConfig);
       
      -    pConfig->bEnabled=0;
      +    pConfig->bEnabled = 0;
       
           return pConfig;
      -    }
      +}
       
       static void CaseFilterInsertFilter(request_rec *r)
      -    {
      -    CaseFilterConfig *pConfig=ap_get_module_config(r->server->module_config,
      -                                                   &case_filter_module);
      +{
      +    CaseFilterConfig *pConfig = ap_get_module_config(r->server->module_config,
      +                                                     &case_filter_module);
       
      -    if(!pConfig->bEnabled)
      +    if (!pConfig->bEnabled)
               return;
       
      -    ap_add_output_filter(s_szCaseFilterName,NULL,r,r->connection);
      -    }
      +    ap_add_output_filter(s_szCaseFilterName, NULL, r, r->connection);
      +}
       
       static apr_status_t CaseFilterOutFilter(ap_filter_t *f,
                                               apr_bucket_brigade *pbbIn)
      -    {
      +{
           request_rec *r = f->r;
           conn_rec *c = r->connection;
           apr_bucket *pbktIn;
           apr_bucket_brigade *pbbOut;
       
      -    pbbOut=apr_brigade_create(r->pool, c->bucket_alloc);
      +    pbbOut = apr_brigade_create(r->pool, c->bucket_alloc);
           for (pbktIn = APR_BRIGADE_FIRST(pbbIn);
                pbktIn != APR_BRIGADE_SENTINEL(pbbIn);
                pbktIn = APR_BUCKET_NEXT(pbktIn))
      @@ -71,25 +71,25 @@ static apr_status_t CaseFilterOutFilter(ap_filter_t *f,
               apr_size_t n;
               apr_bucket *pbktOut;
       
      -        if(APR_BUCKET_IS_EOS(pbktIn))
      -            {
      -            apr_bucket *pbktEOS=apr_bucket_eos_create(c->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(pbbOut,pbktEOS);
      +        if (APR_BUCKET_IS_EOS(pbktIn)) {
      +            apr_bucket *pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(pbbOut, pbktEOS);
                   continue;
      -            }
      +        }
       
               /* read */
      -        apr_bucket_read(pbktIn,&data,&len,APR_BLOCK_READ);
      +        apr_bucket_read(pbktIn, &data, &len, APR_BLOCK_READ);
       
               /* write */
               buf = apr_bucket_alloc(len, c->bucket_alloc);
      -        for(n=0 ; n < len ; ++n)
      +        for (n=0 ; n < len ; ++n) {
                   buf[n] = apr_toupper(data[n]);
      +        }
       
               pbktOut = apr_bucket_heap_create(buf, len, apr_bucket_free,
                                                c->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(pbbOut,pbktOut);
      -        }
      +        APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut);
      +    }
       
           /* Q: is there any advantage to passing a brigade for each bucket?
            * A: obviously, it can cut down server resource consumption, if this
      @@ -101,31 +101,31 @@ static apr_status_t CaseFilterOutFilter(ap_filter_t *f,
            * don't let our caller pass the same buckets to us, twice;
            */
           apr_brigade_cleanup(pbbIn);
      -    return ap_pass_brigade(f->next,pbbOut);
      -    }
      +    return ap_pass_brigade(f->next, pbbOut);
      +}
       
       static const char *CaseFilterEnable(cmd_parms *cmd, void *dummy, int arg)
      -    {
      -    CaseFilterConfig *pConfig=ap_get_module_config(cmd->server->module_config,
      -                                                   &case_filter_module);
      -    pConfig->bEnabled=arg;
      +{
      +    CaseFilterConfig *pConfig = ap_get_module_config(cmd->server->module_config,
      +                                                     &case_filter_module);
      +    pConfig->bEnabled = arg;
       
           return NULL;
      -    }
      +}
       
       static const command_rec CaseFilterCmds[] =
      -    {
      +{
           AP_INIT_FLAG("CaseFilter", CaseFilterEnable, NULL, RSRC_CONF,
                        "Run a case filter on this host"),
           { NULL }
      -    };
      +};
       
       static void CaseFilterRegisterHooks(apr_pool_t *p)
      -    {
      -    ap_hook_insert_filter(CaseFilterInsertFilter,NULL,NULL,APR_HOOK_MIDDLE);
      -    ap_register_output_filter(s_szCaseFilterName,CaseFilterOutFilter,NULL,
      +{
      +    ap_hook_insert_filter(CaseFilterInsertFilter, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_register_output_filter(s_szCaseFilterName, CaseFilterOutFilter, NULL,
                                     AP_FTYPE_RESOURCE);
      -    }
      +}
       
       AP_DECLARE_MODULE(case_filter) =
       {
      diff --git a/modules/examples/mod_case_filter.dep b/modules/examples/mod_case_filter.dep
      new file mode 100644
      index 00000000000..2b8cfad0db3
      --- /dev/null
      +++ b/modules/examples/mod_case_filter.dep
      @@ -0,0 +1,46 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_case_filter.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_case_filter.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/examples/mod_case_filter.mak b/modules/examples/mod_case_filter.mak
      new file mode 100644
      index 00000000000..a7f04bfa4e6
      --- /dev/null
      +++ b/modules/examples/mod_case_filter.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_case_filter.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_case_filter - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_case_filter - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_case_filter - Win32 Release" && "$(CFG)" != "mod_case_filter - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_case_filter.mak" CFG="mod_case_filter - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_case_filter - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_case_filter - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_case_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_case_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_case_filter.obj"
      +	-@erase "$(INTDIR)\mod_case_filter.res"
      +	-@erase "$(INTDIR)\mod_case_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_case_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter.exp"
      +	-@erase "$(OUTDIR)\mod_case_filter.lib"
      +	-@erase "$(OUTDIR)\mod_case_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_case_filter_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_case_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_case_filter.so" /d LONG_NAME="case_filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_case_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_case_filter.pdb" /debug /out:"$(OUTDIR)\mod_case_filter.so" /implib:"$(OUTDIR)\mod_case_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_case_filter.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_case_filter.obj" \
      +	"$(INTDIR)\mod_case_filter.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_case_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_case_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_case_filter.so"
      +   if exist .\Release\mod_case_filter.so.manifest mt.exe -manifest .\Release\mod_case_filter.so.manifest -outputresource:.\Release\mod_case_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_case_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_case_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_case_filter.obj"
      +	-@erase "$(INTDIR)\mod_case_filter.res"
      +	-@erase "$(INTDIR)\mod_case_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_case_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter.exp"
      +	-@erase "$(OUTDIR)\mod_case_filter.lib"
      +	-@erase "$(OUTDIR)\mod_case_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_case_filter_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_case_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_case_filter.so" /d LONG_NAME="case_filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_case_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_case_filter.pdb" /debug /out:"$(OUTDIR)\mod_case_filter.so" /implib:"$(OUTDIR)\mod_case_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_case_filter.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_case_filter.obj" \
      +	"$(INTDIR)\mod_case_filter.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_case_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_case_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_case_filter.so"
      +   if exist .\Debug\mod_case_filter.so.manifest mt.exe -manifest .\Debug\mod_case_filter.so.manifest -outputresource:.\Debug\mod_case_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_case_filter.dep")
      +!INCLUDE "mod_case_filter.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_case_filter.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_case_filter - Win32 Release" || "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_case_filter - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_case_filter - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_case_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_case_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_case_filter.so" /d LONG_NAME="case_filter_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_case_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_case_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_case_filter.so" /d LONG_NAME="case_filter_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_case_filter.c
      +
      +"$(INTDIR)\mod_case_filter.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/examples/mod_case_filter_in.c b/modules/examples/mod_case_filter_in.c
      index 73af077afaa..5116e3b9f62 100644
      --- a/modules/examples/mod_case_filter_in.c
      +++ b/modules/examples/mod_case_filter_in.c
      @@ -53,12 +53,12 @@ static void *CaseFilterInCreateServerConfig(apr_pool_t *p, server_rec *s)
       
       static void CaseFilterInInsertFilter(request_rec *r)
       {
      -    CaseFilterInConfig *pConfig=ap_get_module_config(r->server->module_config,
      -                                                     &case_filter_in_module);
      -    if(!pConfig->bEnabled)
      +    CaseFilterInConfig *pConfig = ap_get_module_config(r->server->module_config,
      +                                                       &case_filter_in_module);
      +    if (!pConfig->bEnabled)
               return;
       
      -    ap_add_input_filter(s_szCaseFilterName,NULL,r,r->connection);
      +    ap_add_input_filter(s_szCaseFilterName, NULL, r, r->connection);
       }
       
       static apr_status_t CaseFilterInFilter(ap_filter_t *f,
      @@ -84,7 +84,7 @@ static apr_status_t CaseFilterInFilter(ap_filter_t *f,
                   return ret;
           }
       
      -    while(!APR_BRIGADE_EMPTY(pCtx->pbbTmp)) {
      +    while (!APR_BRIGADE_EMPTY(pCtx->pbbTmp)) {
               apr_bucket *pbktIn = APR_BRIGADE_FIRST(pCtx->pbbTmp);
               apr_bucket *pbktOut;
               const char *data;
      @@ -99,19 +99,20 @@ static apr_status_t CaseFilterInFilter(ap_filter_t *f,
                * for a file or socket buffer, for example...
                */
       
      -        if(APR_BUCKET_IS_EOS(pbktIn)) {
      +        if (APR_BUCKET_IS_EOS(pbktIn)) {
                   APR_BUCKET_REMOVE(pbktIn);
                   APR_BRIGADE_INSERT_TAIL(pbbOut, pbktIn);
                   break;
               }
       
               ret=apr_bucket_read(pbktIn, &data, &len, eBlock);
      -        if(ret != APR_SUCCESS)
      +        if (ret != APR_SUCCESS)
                   return ret;
       
               buf = ap_malloc(len);
      -        for(n=0 ; n < len ; ++n)
      +        for (n=0 ; n < len ; ++n) {
                   buf[n] = apr_toupper(data[n]);
      +        }
       
               pbktOut = apr_bucket_heap_create(buf, len, 0, c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut);
      @@ -121,7 +122,6 @@ static apr_status_t CaseFilterInFilter(ap_filter_t *f,
           return APR_SUCCESS;
       }
       
      -
       static const char *CaseFilterInEnable(cmd_parms *cmd, void *dummy, int arg)
       {
           CaseFilterInConfig *pConfig
      diff --git a/modules/examples/mod_case_filter_in.dep b/modules/examples/mod_case_filter_in.dep
      new file mode 100644
      index 00000000000..abf8c16b167
      --- /dev/null
      +++ b/modules/examples/mod_case_filter_in.dep
      @@ -0,0 +1,46 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_case_filter_in.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_case_filter_in.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/examples/mod_case_filter_in.mak b/modules/examples/mod_case_filter_in.mak
      new file mode 100644
      index 00000000000..28bb8481804
      --- /dev/null
      +++ b/modules/examples/mod_case_filter_in.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_case_filter_in.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_case_filter_in - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_case_filter_in - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_case_filter_in - Win32 Release" && "$(CFG)" != "mod_case_filter_in - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_case_filter_in.mak" CFG="mod_case_filter_in - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_case_filter_in - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_case_filter_in - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter_in - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_case_filter_in.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_case_filter_in.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_case_filter_in.obj"
      +	-@erase "$(INTDIR)\mod_case_filter_in.res"
      +	-@erase "$(INTDIR)\mod_case_filter_in_src.idb"
      +	-@erase "$(INTDIR)\mod_case_filter_in_src.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.exp"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.lib"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_case_filter_in_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_case_filter_in.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_case_filter_in.so" /d LONG_NAME="case_filter_in_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_case_filter_in.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_case_filter_in.pdb" /debug /out:"$(OUTDIR)\mod_case_filter_in.so" /implib:"$(OUTDIR)\mod_case_filter_in.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_case_filter_in.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_case_filter_in.obj" \
      +	"$(INTDIR)\mod_case_filter_in.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_case_filter_in.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_case_filter_in.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_case_filter_in.so"
      +   if exist .\Release\mod_case_filter_in.so.manifest mt.exe -manifest .\Release\mod_case_filter_in.so.manifest -outputresource:.\Release\mod_case_filter_in.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_case_filter_in.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_case_filter_in.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_case_filter_in.obj"
      +	-@erase "$(INTDIR)\mod_case_filter_in.res"
      +	-@erase "$(INTDIR)\mod_case_filter_in_src.idb"
      +	-@erase "$(INTDIR)\mod_case_filter_in_src.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.exp"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.lib"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.pdb"
      +	-@erase "$(OUTDIR)\mod_case_filter_in.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_case_filter_in_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_case_filter_in.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_case_filter_in.so" /d LONG_NAME="case_filter_in_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_case_filter_in.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_case_filter_in.pdb" /debug /out:"$(OUTDIR)\mod_case_filter_in.so" /implib:"$(OUTDIR)\mod_case_filter_in.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_case_filter_in.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_case_filter_in.obj" \
      +	"$(INTDIR)\mod_case_filter_in.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_case_filter_in.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_case_filter_in.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_case_filter_in.so"
      +   if exist .\Debug\mod_case_filter_in.so.manifest mt.exe -manifest .\Debug\mod_case_filter_in.so.manifest -outputresource:.\Debug\mod_case_filter_in.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_case_filter_in.dep")
      +!INCLUDE "mod_case_filter_in.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_case_filter_in.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_case_filter_in - Win32 Release" || "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_case_filter_in - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter_in - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_case_filter_in - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_case_filter_in - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_case_filter_in.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_case_filter_in.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_case_filter_in.so" /d LONG_NAME="case_filter_in_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_case_filter_in - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_case_filter_in.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_case_filter_in.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_case_filter_in.so" /d LONG_NAME="case_filter_in_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_case_filter_in.c
      +
      +"$(INTDIR)\mod_case_filter_in.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/examples/mod_example_hooks.c b/modules/examples/mod_example_hooks.c
      index 4a3bfb3c1bd..d818dc1f73a 100644
      --- a/modules/examples/mod_example_hooks.c
      +++ b/modules/examples/mod_example_hooks.c
      @@ -15,7 +15,7 @@
        */
       
       /*
      - * Apache example module.  Provide demonstrations of how modules do things.
      + * Apache example_hooks module.  Provide demonstrations of how modules do things.
        * It is not meant to be used in a production server.  Since it participates
        * in all of the processing phases, it could conceivable interfere with
        * the proper operation of other modules -- particularly the ones related
      @@ -26,7 +26,7 @@
        * prefixed with 'x_' instead of 'example_'.
        *
        * To use mod_example_hooks, configure the Apache build with
      - * --enable-example and compile.  Set up a <Location> block in your
      + * --enable-example-hooks and compile.  Set up a <Location> block in your
        * configuration file like so:
        *
        * <Location /example>
      @@ -328,12 +328,13 @@ static x_cfg *our_cconfig(const conn_rec *c)
       static void example_log_each(apr_pool_t *p, server_rec *s, const char *note)
       {
           if (s != NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "mod_example: %s",
      -                     note);
      -    } else {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02991)
      +                     "mod_example_hooks: %s", note);
      +    }
      +    else {
               apr_file_t *out = NULL;
               apr_file_open_stderr(&out, p);
      -        apr_file_printf(out, "mod_example traced in non-loggable "
      +        apr_file_printf(out, "mod_example_hooks traced in non-loggable "
                               "context: %s\n", note);
           }
       }
      @@ -704,7 +705,7 @@ static void *x_merge_server_config(apr_pool_t *p, void *server1_conf,
        * declaration near the bottom of this file.)  Note that these may be       *
        * called for situations that don't relate primarily to our function - in   *
        * other words, the fixup handler shouldn't assume that the request has     *
      - * to do with "example" stuff.                                              *
      + * to do with "example_hooks" stuff.                                        *
        *                                                                          *
        * With the exception of the content handler, all of our routines will be   *
        * called for each request, unless an earlier handler from another module   *
      @@ -742,7 +743,6 @@ static int x_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
            * Log the call and exit.
            */
           trace_startup(ptemp, NULL, NULL, "x_pre_config()");
      -
           return OK;
       }
       
      @@ -1020,7 +1020,7 @@ static int x_handler(request_rec *r)
                   ap_get_server_banner());
           ap_rputs("  <BR>\n", r);
           ap_rprintf(r, "  Server built: \"%s\"\n", ap_get_server_built());
      -    ap_rputs("  </P>\n", r);;
      +    ap_rputs("  </P>\n", r);
           ap_rputs("  <P>\n", r);
           ap_rputs("  The format for the callback trace is:\n", r);
           ap_rputs("  </P>\n", r);
      @@ -1050,7 +1050,8 @@ static int x_handler(request_rec *r)
                                           r->connection->pool);
           if ((status == APR_SUCCESS) && conn_data) {
               ap_rprintf(r, "  <OL>\n%s  </OL>\n", (char *) conn_data);
      -    } else {
      +    }
      +    else {
               ap_rputs("  <P>No connection-specific callback information was "
                        "retrieved.</P>\n", r);
           }
      @@ -1136,7 +1137,6 @@ static int x_pre_connection(conn_rec *c, void *csd)
       static int x_process_connection(conn_rec *c)
       {
           trace_connection(c, "x_process_connection()");
      -
           return DECLINED;
       }
       
      @@ -1182,7 +1182,6 @@ static int x_post_read_request(request_rec *r)
        */
       static int x_translate_name(request_rec *r)
       {
      -
           /*
            * We don't actually *do* anything here, except note the fact that we were
            * called.
      diff --git a/modules/examples/mod_example_hooks.dep b/modules/examples/mod_example_hooks.dep
      new file mode 100644
      index 00000000000..a186c4b9d4c
      --- /dev/null
      +++ b/modules/examples/mod_example_hooks.dep
      @@ -0,0 +1,62 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_example_hooks.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_example_hooks.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/examples/mod_example_hooks.mak b/modules/examples/mod_example_hooks.mak
      new file mode 100644
      index 00000000000..2c1e562e612
      --- /dev/null
      +++ b/modules/examples/mod_example_hooks.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_example_hooks.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_example_hooks - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_example_hooks - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_example_hooks - Win32 Release" && "$(CFG)" != "mod_example_hooks - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_example_hooks.mak" CFG="mod_example_hooks - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_example_hooks - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_example_hooks - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_hooks - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_example_hooks.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_example_hooks.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_example_hooks.obj"
      +	-@erase "$(INTDIR)\mod_example_hooks.res"
      +	-@erase "$(INTDIR)\mod_example_hooks_src.idb"
      +	-@erase "$(INTDIR)\mod_example_hooks_src.pdb"
      +	-@erase "$(OUTDIR)\mod_example_hooks.exp"
      +	-@erase "$(OUTDIR)\mod_example_hooks.lib"
      +	-@erase "$(OUTDIR)\mod_example_hooks.pdb"
      +	-@erase "$(OUTDIR)\mod_example_hooks.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_example_hooks_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_example_hooks.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_example_hooks.so" /d LONG_NAME="example_hooks_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_example_hooks.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_example_hooks.pdb" /debug /out:"$(OUTDIR)\mod_example_hooks.so" /implib:"$(OUTDIR)\mod_example_hooks.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_example_hooks.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_example_hooks.obj" \
      +	"$(INTDIR)\mod_example_hooks.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_example_hooks.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_example_hooks.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_example_hooks.so"
      +   if exist .\Release\mod_example_hooks.so.manifest mt.exe -manifest .\Release\mod_example_hooks.so.manifest -outputresource:.\Release\mod_example_hooks.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_example_hooks.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_example_hooks.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_example_hooks.obj"
      +	-@erase "$(INTDIR)\mod_example_hooks.res"
      +	-@erase "$(INTDIR)\mod_example_hooks_src.idb"
      +	-@erase "$(INTDIR)\mod_example_hooks_src.pdb"
      +	-@erase "$(OUTDIR)\mod_example_hooks.exp"
      +	-@erase "$(OUTDIR)\mod_example_hooks.lib"
      +	-@erase "$(OUTDIR)\mod_example_hooks.pdb"
      +	-@erase "$(OUTDIR)\mod_example_hooks.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_example_hooks_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_example_hooks.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_example_hooks.so" /d LONG_NAME="example_hooks_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_example_hooks.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_example_hooks.pdb" /debug /out:"$(OUTDIR)\mod_example_hooks.so" /implib:"$(OUTDIR)\mod_example_hooks.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_example_hooks.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_example_hooks.obj" \
      +	"$(INTDIR)\mod_example_hooks.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_example_hooks.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_example_hooks.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_example_hooks.so"
      +   if exist .\Debug\mod_example_hooks.so.manifest mt.exe -manifest .\Debug\mod_example_hooks.so.manifest -outputresource:.\Debug\mod_example_hooks.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_example_hooks.dep")
      +!INCLUDE "mod_example_hooks.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_example_hooks.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_example_hooks - Win32 Release" || "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_example_hooks - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_hooks - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_hooks - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_example_hooks - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_example_hooks.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_example_hooks.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_example_hooks.so" /d LONG_NAME="example_hooks_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_example_hooks - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_example_hooks.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_example_hooks.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_example_hooks.so" /d LONG_NAME="example_hooks_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_example_hooks.c
      +
      +"$(INTDIR)\mod_example_hooks.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/examples/mod_example_ipc.c b/modules/examples/mod_example_ipc.c
      index a911f0b4b8d..6f48a842d0d 100644
      --- a/modules/examples/mod_example_ipc.c
      +++ b/modules/examples/mod_example_ipc.c
      @@ -91,7 +91,8 @@ typedef struct exipc_data {
        * on restarts. It assures that the new children will not talk to a stale
        * shared memory segment.
        */
      -static apr_status_t shm_cleanup_wrapper(void *unused) {
      +static apr_status_t shm_cleanup_wrapper(void *unused)
      +{
           if (exipc_shm)
               return apr_shm_destroy(exipc_shm);
           return OK;
      @@ -141,7 +142,7 @@ static int exipc_post_config(apr_pool_t *pconf, apr_pool_t *plog,
            */
           rs = apr_temp_dir_get(&tempdir, pconf);
           if (APR_SUCCESS != rs) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02992)
                            "Failed to find temporary directory");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -159,7 +160,7 @@ static int exipc_post_config(apr_pool_t *pconf, apr_pool_t *plog,
           rs = apr_shm_create(&exipc_shm, sizeof(exipc_data),
                               (const char *) shmfilename, pconf);
           if (APR_SUCCESS != rs) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02993)
                            "Failed to create shared memory segment on file %s",
                            shmfilename);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -204,7 +205,7 @@ static void exipc_child_init(apr_pool_t *p, server_rec *s)
                                            apr_global_mutex_lockfile(exipc_mutex),
                                            p);
           if (APR_SUCCESS != rs) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rs, s, APLOGNO(02994)
                            "Failed to reopen mutex %s in child",
                            exipc_mutex_type);
               /* There's really nothing else we can do here, since This
      @@ -248,10 +249,12 @@ static int exipc_handler(request_rec *r)
               rs = apr_global_mutex_trylock(exipc_mutex);
               if (APR_STATUS_IS_EBUSY(rs)) {
                   apr_sleep(CAMPOUT);
      -        } else if (APR_SUCCESS == rs) {
      +        }
      +        else if (APR_SUCCESS == rs) {
                   gotlock = 1;
                   break; /* Get out of the loop */
      -        } else if (APR_STATUS_IS_ENOTIMPL(rs)) {
      +        }
      +        else if (APR_STATUS_IS_ENOTIMPL(rs)) {
                   /* If it's not implemented, just hang in the mutex. */
                   startcamp = apr_time_now();
                   rs = apr_global_mutex_lock(exipc_mutex);
      @@ -259,28 +262,30 @@ static int exipc_handler(request_rec *r)
                   if (APR_SUCCESS == rs) {
                       gotlock = 1;
                       break; /* Out of the loop */
      -            } else {
      +            }
      +            else {
                       /* Some error, log and bail */
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02995)
                                    "Child %ld failed to acquire lock",
                                    (long int)getpid());
                       break; /* Out of the loop without having the lock */
                   }
      -        } else {
      +        }
      +        else {
                   /* Some other error, log and bail */
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rs, r->server, APLOGNO(02996)
                                "Child %ld failed to try and acquire lock",
                                (long int)getpid());
                   break; /* Out of the loop without having the lock */
      -
               }
      +
               /*
                * The only way to get to this point is if the trylock worked
                * and returned BUSY. So, bump the time and try again
                */
               timecamped += CAMPOUT;
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_NOTICE,
      -                     0, r->server, "Child %ld camping out on mutex for %" APR_INT64_T_FMT
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, r->server, APLOGNO(03187)
      +                     "Child %ld camping out on mutex for %" APR_INT64_T_FMT
                            " microseconds",
                            (long int) getpid(), timecamped);
           } /* Lock acquisition loop */
      @@ -307,7 +312,8 @@ static int exipc_handler(request_rec *r)
                   ap_rprintf(r, "<tr><td>Counter:</td><td>%u</td></tr>\n",
                              (unsigned int)base->counter);
                   ap_rputs("</table>\n", r);
      -        } else {
      +        }
      +        else {
                   /*
                    * Send a page saying that we couldn't get the lock. Don't say
                    * what the counter is, because without the lock the value could
      @@ -348,4 +354,3 @@ AP_DECLARE_MODULE(example_ipc) = {
           NULL,                  /* table of config file commands       */
           exipc_register_hooks   /* register hooks                      */
       };
      -
      diff --git a/modules/examples/mod_example_ipc.dep b/modules/examples/mod_example_ipc.dep
      new file mode 100644
      index 00000000000..9859b814640
      --- /dev/null
      +++ b/modules/examples/mod_example_ipc.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_example_ipc.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_example_ipc.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/examples/mod_example_ipc.mak b/modules/examples/mod_example_ipc.mak
      new file mode 100644
      index 00000000000..218924e664e
      --- /dev/null
      +++ b/modules/examples/mod_example_ipc.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_example_ipc.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_example_ipc - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_example_ipc - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_example_ipc - Win32 Release" && "$(CFG)" != "mod_example_ipc - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_example_ipc.mak" CFG="mod_example_ipc - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_example_ipc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_example_ipc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_ipc - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_example_ipc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_example_ipc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_example_ipc.obj"
      +	-@erase "$(INTDIR)\mod_example_ipc.res"
      +	-@erase "$(INTDIR)\mod_example_ipc_src.idb"
      +	-@erase "$(INTDIR)\mod_example_ipc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_example_ipc.exp"
      +	-@erase "$(OUTDIR)\mod_example_ipc.lib"
      +	-@erase "$(OUTDIR)\mod_example_ipc.pdb"
      +	-@erase "$(OUTDIR)\mod_example_ipc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_example_ipc_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_example_ipc.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_example_ipc.so" /d LONG_NAME="example_ipc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_example_ipc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_example_ipc.pdb" /debug /out:"$(OUTDIR)\mod_example_ipc.so" /implib:"$(OUTDIR)\mod_example_ipc.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_example_ipc.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_example_ipc.obj" \
      +	"$(INTDIR)\mod_example_ipc.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_example_ipc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_example_ipc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_example_ipc.so"
      +   if exist .\Release\mod_example_ipc.so.manifest mt.exe -manifest .\Release\mod_example_ipc.so.manifest -outputresource:.\Release\mod_example_ipc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_example_ipc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_example_ipc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_example_ipc.obj"
      +	-@erase "$(INTDIR)\mod_example_ipc.res"
      +	-@erase "$(INTDIR)\mod_example_ipc_src.idb"
      +	-@erase "$(INTDIR)\mod_example_ipc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_example_ipc.exp"
      +	-@erase "$(OUTDIR)\mod_example_ipc.lib"
      +	-@erase "$(OUTDIR)\mod_example_ipc.pdb"
      +	-@erase "$(OUTDIR)\mod_example_ipc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_example_ipc_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_example_ipc.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_example_ipc.so" /d LONG_NAME="example_ipc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_example_ipc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_example_ipc.pdb" /debug /out:"$(OUTDIR)\mod_example_ipc.so" /implib:"$(OUTDIR)\mod_example_ipc.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_example_ipc.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_example_ipc.obj" \
      +	"$(INTDIR)\mod_example_ipc.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_example_ipc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_example_ipc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_example_ipc.so"
      +   if exist .\Debug\mod_example_ipc.so.manifest mt.exe -manifest .\Debug\mod_example_ipc.so.manifest -outputresource:.\Debug\mod_example_ipc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_example_ipc.dep")
      +!INCLUDE "mod_example_ipc.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_example_ipc.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_example_ipc - Win32 Release" || "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_example_ipc - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_ipc - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\examples"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\examples"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_example_ipc - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ELSEIF  "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\examples"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\examples"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_example_ipc - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_example_ipc.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_example_ipc.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_example_ipc.so" /d LONG_NAME="example_ipc_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_example_ipc - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_example_ipc.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_example_ipc.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_example_ipc.so" /d LONG_NAME="example_ipc_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_example_ipc.c
      +
      +"$(INTDIR)\mod_example_ipc.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/experimental/NWGNUmakefile b/modules/experimental/NWGNUmakefile
      index 29ec122b682..fb5be35df90 100644
      --- a/modules/experimental/NWGNUmakefile
      +++ b/modules/experimental/NWGNUmakefile
      @@ -151,17 +151,16 @@ XDCDATA		=
       #
       # If there is an NLM target, put it here
       #
      -# We are referencing substitute.nlm twice to get around a known issue with the
      -# makefiles.  Normally if there is only one element to be built within a
      +# If there is only one element to build it needs to be included twice
      +# in the below target list.
      +# Normally if there is only one element to be built within a
       # directory, the makefile for the single element would be called NWGNUmakefile.
       # But if there are multiples, the parent NWGNUmakefile must reference more
       # than one submakefile. Because the experimental directory might vary in the
       # number of submakefiles, but for the moment only contains one, we reference
       # it twice to allow it parent NWGNUmakefile to work properly.  If another
      -# submakefile is added, the extra reference to substitute.nlm should be removed.
      +# submakefile is added, the extra reference to the first NLM should be removed.
       TARGET_nlm = \
      -	$(OBJDIR)/noloris.nlm \
      -	$(OBJDIR)/noloris.nlm \
       	$(EOLIST)
       
       #
      diff --git a/modules/experimental/mod_noloris.c b/modules/experimental/mod_noloris.c
      deleted file mode 100644
      index d541e6a3a39..00000000000
      --- a/modules/experimental/mod_noloris.c
      +++ /dev/null
      @@ -1,237 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -
      -/* The use of the scoreboard in this module is based on a similar
      - * but simpler module, mod_antiloris by Kees Monshouwer, from
      - * ftp://ftp.monshouwer.eu/pub/linux/mod_antiloris/
      - * Note the FIXME that affects both modules.
      - *
      - * The major difference is that mod_antiloris checks the scoreboard
      - * on every request.  This implies a per-request overhead that grows
      - * with the scoreboard, and gets very expensive on a big server.
      - * On the other hand, this module (mod_noloris) may be slower to
      - * react to a DoS attack, and in the case of a very small server
      - * it might be too late.
      - *
      - * Author's untested instinct: mod_antiloris will suit servers with
      - * Prefork MPM and low traffic.  A server with a threaded MPM
      - * (or possibly a big prefork server with lots of memory) should
      - * raise MaxClients and use mod_noloris.
      - */
      -
      -#include "httpd.h"
      -#include "http_config.h"
      -#include "http_core.h"
      -#include "http_connection.h"
      -#include "http_log.h"
      -#include "mpm_common.h"
      -#include "ap_mpm.h"
      -#include "apr_hash.h"
      -#include "scoreboard.h"
      -
      -module AP_MODULE_DECLARE_DATA noloris_module;
      -
      -#define ADDR_MAX_SIZE 48
      -
      -static unsigned int default_max_connections;
      -static apr_hash_t *trusted;
      -static apr_interval_time_t recheck_time;
      -static apr_shm_t *shm;
      -static apr_size_t shm_size;
      -static int server_limit;
      -static int thread_limit;
      -
      -static int noloris_conn(conn_rec *conn)
      -{
      -    struct { int child_num; int thread_num; } *sbh = conn->sbh;
      -
      -    char *shm_rec;
      -    if (shm == NULL) {
      -        return DECLINED;  /* we're disabled */
      -    }
      -
      -    /* check the IP is not banned */
      -    shm_rec = apr_shm_baseaddr_get(shm);
      -    while (shm_rec[0] != '\0') {
      -        if (!strcmp(shm_rec, conn->remote_ip)) {
      -            apr_socket_t *csd = ap_get_conn_socket(conn);
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn,
      -                          "Dropping connection from banned IP %s",
      -                          conn->remote_ip);
      -            apr_socket_close(csd);
      -
      -            return DONE;
      -        }
      -        shm_rec += ADDR_MAX_SIZE;
      -    }
      -
      -    /* store this client IP for the monitor to pick up */
      -
      -    ap_update_child_status_from_conn(conn->sbh, SERVER_READY, conn);
      -
      -    return DECLINED;
      -}
      -static int noloris_monitor(apr_pool_t *pool, server_rec *s)
      -{
      -    static apr_hash_t *connections = NULL;
      -    static apr_time_t last_check = 0;
      -    static int *totals;
      -
      -    int i, j;
      -    int *n;
      -    int index = 0;
      -    apr_hash_index_t *hi;
      -    char *ip;
      -    apr_time_t time_now;
      -    char *shm_rec;
      -    worker_score *ws;
      -
      -    /* do nothing if disabled */
      -    if (shm == NULL) {
      -        return 0;
      -    }
      -
      -    /* skip check if it's not due yet */
      -    time_now = apr_time_now();
      -    if (time_now - last_check < recheck_time) {
      -        return 0;
      -    }
      -    last_check = time_now;
      -
      -    /* alloc lots of stuff at start, so we don't leak memory per-call */
      -    if (connections == NULL) {
      -        connections = apr_hash_make(pool);
      -        totals = apr_palloc(pool, server_limit*thread_limit);
      -        ip = apr_palloc(pool, ADDR_MAX_SIZE);
      -    }
      -
      -    /* Get a per-client count of connections in READ state */
      -    for (i = 0; i < server_limit; ++i) {
      -        for (j = 0; j < thread_limit; ++j) {
      -            ws = ap_get_scoreboard_worker_from_indexes(i, j);
      -            if (ws->status == SERVER_BUSY_READ) {
      -                n = apr_hash_get(connections, ws->client, APR_HASH_KEY_STRING);
      -                if (n == NULL) {
      -                    n = totals + index++ ;
      -                    *n = 0;
      -                }
      -                ++*n;
      -                apr_hash_set(connections, ws->client, APR_HASH_KEY_STRING, n);
      -            }
      -        }
      -    }
      -
      -    /* reset shm before writing to it.
      -     * We're only dealing with approx. counts, so we ignore the race condition
      -     * with our prospective readers
      -     */
      -    shm_rec = apr_shm_baseaddr_get(shm);
      -    memset(shm_rec, 0, shm_size);
      -
      -    /* Now check the hash for clients with too many connections in READ state */
      -    for (hi = apr_hash_first(NULL, connections); hi; hi = apr_hash_next(hi)) {
      -        apr_hash_this(hi, (const void**) &ip, NULL, (void**)&n);
      -        if (*n >= default_max_connections) {
      -            /* if this isn't a trusted proxy, we mark it as bad */
      -            if (!apr_hash_get(trusted, ip, APR_HASH_KEY_STRING)) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      -                       "noloris: banning %s with %d connections in READ state",
      -                       ip, *n);
      -                strcpy(shm_rec, ip);
      -                shm_rec += ADDR_MAX_SIZE;
      -            }
      -        }
      -    }
      -    apr_hash_clear(connections);
      -    return 0;
      -}
      -static int noloris_post(apr_pool_t *pconf, apr_pool_t *ptmp, apr_pool_t *plog,
      -                        server_rec *s)
      -{
      -    apr_status_t rv;
      -    int max_bans = thread_limit * server_limit / default_max_connections;
      -    shm_size = ADDR_MAX_SIZE * max_bans;
      -
      -    rv = apr_shm_create(&shm, shm_size, NULL, pconf);
      -    if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      -                     "Failed to create shm segment; mod_noloris disabled");
      -        apr_hash_clear(trusted);
      -        shm = NULL;
      -    }
      -    return 0;
      -}
      -static int noloris_pre(apr_pool_t *pconf, apr_pool_t *ptmp, apr_pool_t *plog)
      -{
      -    ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
      -    ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
      -
      -    /* set up default config stuff here */
      -    trusted = apr_hash_make(pconf);
      -    default_max_connections = 50;
      -    recheck_time = apr_time_from_sec(10);
      -    return 0;
      -}
      -static void noloris_hooks(apr_pool_t *p)
      -{
      -    ap_hook_process_connection(noloris_conn, NULL, NULL, APR_HOOK_FIRST);
      -    ap_hook_pre_config(noloris_pre, NULL, NULL, APR_HOOK_MIDDLE);
      -    ap_hook_post_config(noloris_post, NULL, NULL, APR_HOOK_MIDDLE);
      -    ap_hook_monitor(noloris_monitor, NULL, NULL, APR_HOOK_MIDDLE);
      -}
      -static const char *noloris_trusted(cmd_parms *cmd, void *cfg, const char *val)
      -{
      -    const char* err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -    if (!err) {
      -        apr_hash_set(trusted, val, APR_HASH_KEY_STRING, &noloris_module);
      -    }
      -    return err;
      -}
      -static const char *noloris_recheck(cmd_parms *cmd, void *cfg, const char *val)
      -{
      -    const char* err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -    if (!err) {
      -        recheck_time = apr_time_from_sec(atoi(val));
      -    }
      -    return err;
      -}
      -static const char *noloris_max_conn(cmd_parms *cmd, void *cfg, const char *val)
      -{
      -    const char* err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -    if (!err) {
      -        default_max_connections = atoi(val);
      -    }
      -    return err;
      -}
      -static const command_rec noloris_cmds[] = {
      -    AP_INIT_ITERATE("TrustedProxy", noloris_trusted, NULL, RSRC_CONF,
      -                    "IP addresses from which to allow unlimited connections"),
      -    AP_INIT_TAKE1("ClientRecheckTime", noloris_recheck, NULL, RSRC_CONF,
      -                  "Time interval for rechecking client connection tables"),
      -    AP_INIT_TAKE1("MaxClientConnections", noloris_max_conn, NULL, RSRC_CONF,
      -            "Max connections in READ state to permit from an untrusted client"),
      -    {NULL}
      -};
      -AP_DECLARE_MODULE(noloris) = {
      -    STANDARD20_MODULE_STUFF,
      -    NULL,
      -    NULL,
      -    NULL,
      -    NULL,
      -    noloris_cmds,
      -    noloris_hooks
      -};
      diff --git a/modules/filters/NWGNUdeflate b/modules/filters/NWGNUdeflate
      index 579d1386b80..7f7204d13e7 100644
      --- a/modules/filters/NWGNUdeflate
      +++ b/modules/filters/NWGNUdeflate
      @@ -30,6 +30,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(STDMOD)/ssl \
       			$(NWOS) \
       			$(EOLIST)
       
      diff --git a/modules/filters/NWGNUmakefile b/modules/filters/NWGNUmakefile
      index 0a02b30e10a..922abac9a8e 100644
      --- a/modules/filters/NWGNUmakefile
      +++ b/modules/filters/NWGNUmakefile
      @@ -154,6 +154,7 @@ XDCDATA		=
       TARGET_nlm = \
       	$(OBJDIR)/extfiltr.nlm \
       	$(OBJDIR)/charsetl.nlm \
      +	$(OBJDIR)/mod_data.nlm \
       	$(OBJDIR)/mod_filter.nlm \
       	$(OBJDIR)/mod_request.nlm \
       	$(OBJDIR)/substitute.nlm \
      diff --git a/modules/filters/NWGNUmod_data b/modules/filters/NWGNUmod_data
      new file mode 100644
      index 00000000000..7f46e9aaf74
      --- /dev/null
      +++ b/modules/filters/NWGNUmod_data
      @@ -0,0 +1,248 @@
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# Get the 'head' of the build environment if necessary.  This includes default
      +# targets and paths to tools
      +#
      +
      +ifndef EnvironmentDefined
      +include $(AP_WORK)/build/NWGNUhead.inc
      +endif
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(APR)/include \
      +			$(APRUTIL)/include \
      +			$(AP_WORK)/include \
      +			$(NWOS) \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	= mod_data
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Data Module
      +
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	= Filter Module
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	= 8192
      +
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If these are specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
      +	$(EOLIST)
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(OBJDIR)/$(NLM_NAME).o \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(PRELUDE) \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	aprlib \
      +	libc \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	@aprlib.imp \
      +	@httpd.imp \
      +	@libc.imp \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	data_module \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs = \
      +	$(EOLIST)
      +
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(TARGET_lib)
      +
      +nlms :: libs $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +
      +#
      +# Any specialized rules here
      +#
      +
      +#
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/filters/config.m4 b/modules/filters/config.m4
      index 2bea5689e39..60917edadb7 100644
      --- a/modules/filters/config.m4
      +++ b/modules/filters/config.m4
      @@ -4,19 +4,25 @@ dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
       
       APACHE_MODPATH_INIT(filters)
       
      -APACHE_MODULE(buffer, Filter Buffering, , , yes)
      +APACHE_MODULE(buffer, Filter Buffering, , , most)
       APACHE_MODULE(data, RFC2397 data encoder, , , )
      -APACHE_MODULE(ratelimit, Output Bandwidth Limiting, , , yes)
      +APACHE_MODULE(ratelimit, Output Bandwidth Limiting, , , most)
       APACHE_MODULE(reqtimeout, Limit time waiting for request from client, , , yes)
       APACHE_MODULE(ext_filter, external filter module, , , most)
      -APACHE_MODULE(request, Request Body Filtering, , , yes)
      -APACHE_MODULE(include, Server Side Includes, , , yes)
      +APACHE_MODULE(request, Request Body Filtering, , , most)
      +APACHE_MODULE(include, Server Side Includes, , , most)
       APACHE_MODULE(filter, Smart Filtering, , , yes)
       APACHE_MODULE(reflector, Reflect request through the output filter stack, , , )
       APACHE_MODULE(substitute, response content rewrite-like filtering, , , most)
       
       sed_obj="mod_sed.lo sed0.lo sed1.lo regexp.lo"
      -APACHE_MODULE(sed, filter request and/or response bodies through sed, $sed_obj, , most)
      +APACHE_MODULE(sed, filter request and/or response bodies through sed, $sed_obj, , most, [
      +    if test "x$enable_sed" = "xshared"; then
      +        # The only symbol which needs to be exported is the module
      +        # structure, so ask libtool to hide libsed internals:
      +        APR_ADDTO(MOD_SED_LDADD, [-export-symbols-regex sed_module])
      +    fi
      +])
       
       if test "$ac_cv_ebcdic" = "yes"; then
       # mod_charset_lite can be very useful on an ebcdic system,
      @@ -28,7 +34,7 @@ fi
       
       
       APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
      -  AC_ARG_WITH(z, APACHE_HELP_STRING(--with-z=DIR,use a specific zlib library),
      +  AC_ARG_WITH(z, APACHE_HELP_STRING(--with-z=PATH,use a specific zlib library),
         [
           if test "x$withval" != "xyes" && test "x$withval" != "x"; then
             ap_zlib_base="$withval"
      @@ -60,6 +66,7 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
           ap_zlib_ldflags=""
           if test "$ap_zlib_base" != "/usr"; then
             APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include])
      +      APR_ADDTO(MOD_INCLUDES, [-I${ap_zlib_base}/include])
             dnl put in CPPFLAGS temporarily so that AC_TRY_LINK below will work
             CPPFLAGS="$CPPFLAGS $INCLUDES"
             APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib])
      @@ -76,23 +83,23 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
              APR_ADDTO(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])],
             [AC_MSG_RESULT(not found)
              enable_deflate=no
      -       INCLUDES=$ap_save_includes
              if test "x$ap_zlib_with" = "x"; then
                AC_MSG_WARN([... Error, zlib was missing or unusable])
              else
                AC_MSG_ERROR([... Error, zlib was missing or unusable])
              fi
             ])
      +    INCLUDES=$ap_save_includes
           LDFLAGS=$ap_save_ldflags
           CPPFLAGS=$ap_save_cppflags
           APR_REMOVEFROM(LIBS, [-lz])
         fi
       ])
       
      -AC_DEFUN(FIND_LIBXML2, [
      +AC_DEFUN([FIND_LIBXML2], [
         AC_CACHE_CHECK([for libxml2], [ac_cv_libxml2], [
           AC_ARG_WITH(libxml2,
      -      [APACHE_HELP_STRING(--with-libxml2,location for libxml2)],
      +      [APACHE_HELP_STRING(--with-libxml2=PATH,location for libxml2)],
             [test_paths="${with_libxml2}"],
             [test_paths="/usr/include/libxml2 /usr/local/include/libxml2 /usr/include /usr/local/include"]
           )
      @@ -116,7 +123,7 @@ AC_DEFUN(FIND_LIBXML2, [
       APACHE_MODULE(xml2enc, i18n support for markup filters, , , , [
         FIND_LIBXML2
         if test "$ac_cv_libxml2" = "yes" ; then
      -    APR_ADDTO(CFLAGS, [-I${XML2_INCLUDES}])
      +    APR_ADDTO(MOD_CFLAGS, [-I${XML2_INCLUDES}])
           APR_ADDTO(MOD_XML2ENC_LDADD, [-lxml2])
         else
           enable_xml2enc=no
      @@ -125,7 +132,7 @@ APACHE_MODULE(xml2enc, i18n support for markup filters, , , , [
       APACHE_MODULE(proxy_html, Fix HTML Links in a Reverse Proxy, , , , [
         FIND_LIBXML2
         if test "$ac_cv_libxml2" = "yes" ; then
      -    APR_ADDTO(CFLAGS, [-I${XML2_INCLUDES}])
      +    APR_ADDTO(MOD_CFLAGS, [-I${XML2_INCLUDES}])
           APR_ADDTO(MOD_PROXY_HTML_LDADD, [-lxml2])
         else
           enable_proxy_html=no
      diff --git a/modules/filters/libsed.h b/modules/filters/libsed.h
      index a889d50ab05..76cbc0ce8ad 100644
      --- a/modules/filters/libsed.h
      +++ b/modules/filters/libsed.h
      @@ -28,9 +28,6 @@ extern "C" {
       #include <limits.h>
       
       #include "apr_file_io.h"
      -#ifndef PATH_MAX
      -#define PATH_MAX MAX_PATH
      -#endif
       
       #define SED_NLINES 256
       #define SED_DEPTH 20
      diff --git a/modules/filters/mod_buffer.c b/modules/filters/mod_buffer.c
      index cf552aa7845..203e6724502 100644
      --- a/modules/filters/mod_buffer.c
      +++ b/modules/filters/mod_buffer.c
      @@ -52,7 +52,8 @@ typedef struct buffer_ctx {
       /**
        * Buffer buckets being written to the output filter stack.
        */
      -static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
      +static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
      +{
           apr_bucket *e;
           request_rec *r = f->r;
           buffer_ctx *ctx = f->ctx;
      @@ -74,7 +75,6 @@ static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
               ctx = f->ctx = apr_pcalloc(r->pool, sizeof(*ctx));
               ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
               ctx->conf = ap_get_module_config(f->r->per_dir_config, &buffer_module);
      -
           }
       
           /* Do nothing if asked to filter nothing. */
      @@ -187,7 +187,8 @@ static apr_status_t buffer_out_filter(ap_filter_t *f, apr_bucket_brigade *bb) {
        * Buffer buckets being read from the input filter stack.
        */
       static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
      -        ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) {
      +        ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
      +{
           apr_bucket *e, *after;
           apr_status_t rv;
           buffer_ctx *ctx = f->ctx;
      @@ -213,28 +214,33 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
       
           /* if our buffer is empty, read off the network until the buffer is full */
           if (APR_BRIGADE_EMPTY(ctx->bb)) {
      +        int seen_flush = 0;
      +
               ctx->remaining = ctx->conf->size;
       
      -        while (!ctx->seen_eos && ctx->remaining > 0) {
      +        while (!ctx->seen_eos && !seen_flush && ctx->remaining > 0) {
                   const char *data;
                   apr_size_t size = 0;
       
      -            rv = ap_get_brigade(f->next, ctx->tmp, mode, block, ctx->remaining);
      -
      -            /* if an error was received, bail out now. If the error is
      -             * EAGAIN and we have not yet seen an EOS, we will definitely
      -             * be called again, at which point we will send our buffered
      -             * data. Instead of sending EAGAIN, some filters return an
      -             * empty brigade instead when data is not yet available. In
      -             * this case, pass through the APR_SUCCESS and emulate the
      -             * underlying filter.
      -             */
      -            if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(ctx->tmp)) {
      -                return rv;
      +            if (APR_BRIGADE_EMPTY(ctx->tmp)) {
      +                rv = ap_get_brigade(f->next, ctx->tmp, mode, block,
      +                                    ctx->remaining);
      +
      +                /* if an error was received, bail out now. If the error is
      +                 * EAGAIN and we have not yet seen an EOS, we will definitely
      +                 * be called again, at which point we will send our buffered
      +                 * data. Instead of sending EAGAIN, some filters return an
      +                 * empty brigade instead when data is not yet available. In
      +                 * this case, pass through the APR_SUCCESS and emulate the
      +                 * underlying filter.
      +                 */
      +                if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(ctx->tmp)) {
      +                    return rv;
      +                }
                   }
       
      -            for (e = APR_BRIGADE_FIRST(ctx->tmp); e != APR_BRIGADE_SENTINEL(
      -                    ctx->tmp); e = APR_BUCKET_NEXT(e)) {
      +            do {
      +                e = APR_BRIGADE_FIRST(ctx->tmp);
       
                       /* if we see an EOS, we are done */
                       if (APR_BUCKET_IS_EOS(e)) {
      @@ -248,6 +254,7 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
                       if (APR_BUCKET_IS_FLUSH(e)) {
                           APR_BUCKET_REMOVE(e);
                           APR_BRIGADE_INSERT_TAIL(ctx->bb, e);
      +                    seen_flush = 1;
                           break;
                       }
       
      @@ -260,7 +267,7 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
       
                       /* read the bucket in, pack it into the buffer */
                       if (APR_SUCCESS == (rv = apr_bucket_read(e, &data, &size,
      -                        APR_BLOCK_READ))) {
      +                                                         APR_BLOCK_READ))) {
                           apr_brigade_write(ctx->bb, NULL, NULL, data, size);
                           ctx->remaining -= size;
                           apr_bucket_delete(e);
      @@ -268,7 +275,7 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
                           return rv;
                       }
       
      -            }
      +            } while (!APR_BRIGADE_EMPTY(ctx->tmp));
               }
           }
       
      @@ -288,7 +295,8 @@ static apr_status_t buffer_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
           return APR_SUCCESS;
       }
       
      -static void *create_buffer_config(apr_pool_t *p, char *dummy) {
      +static void *create_buffer_config(apr_pool_t *p, char *dummy)
      +{
           buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
       
           new->size_set = 0; /* unset */
      @@ -297,7 +305,8 @@ static void *create_buffer_config(apr_pool_t *p, char *dummy) {
           return (void *) new;
       }
       
      -static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv) {
      +static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv)
      +{
           buffer_conf *new = (buffer_conf *) apr_pcalloc(p, sizeof(buffer_conf));
           buffer_conf *add = (buffer_conf *) addv;
           buffer_conf *base = (buffer_conf *) basev;
      @@ -308,7 +317,8 @@ static void *merge_buffer_config(apr_pool_t *p, void *basev, void *addv) {
           return new;
       }
       
      -static const char *set_buffer_size(cmd_parms *cmd, void *dconf, const char *arg) {
      +static const char *set_buffer_size(cmd_parms *cmd, void *dconf, const char *arg)
      +{
           buffer_conf *conf = dconf;
       
           if (APR_SUCCESS != apr_strtoff(&(conf->size), arg, NULL, 10) || conf->size
      @@ -324,7 +334,8 @@ static const command_rec buffer_cmds[] = { AP_INIT_TAKE1("BufferSize",
               set_buffer_size, NULL, ACCESS_CONF,
               "Maximum size of the buffer used by the buffer filter"), { NULL } };
       
      -static void register_hooks(apr_pool_t *p) {
      +static void register_hooks(apr_pool_t *p)
      +{
           ap_register_output_filter(bufferFilterName, buffer_out_filter, NULL,
                   AP_FTYPE_CONTENT_SET);
           ap_register_input_filter(bufferFilterName, buffer_in_filter, NULL,
      diff --git a/modules/filters/mod_buffer.dep b/modules/filters/mod_buffer.dep
      new file mode 100644
      index 00000000000..6f776135c17
      --- /dev/null
      +++ b/modules/filters/mod_buffer.dep
      @@ -0,0 +1,48 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_buffer.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_buffer.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_buffer.mak b/modules/filters/mod_buffer.mak
      new file mode 100644
      index 00000000000..d74bec25892
      --- /dev/null
      +++ b/modules/filters/mod_buffer.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_buffer.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_buffer - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_buffer - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_buffer - Win32 Release" && "$(CFG)" != "mod_buffer - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_buffer.mak" CFG="mod_buffer - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_buffer - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_buffer - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_buffer - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_buffer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_buffer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_buffer.obj"
      +	-@erase "$(INTDIR)\mod_buffer.res"
      +	-@erase "$(INTDIR)\mod_buffer_src.idb"
      +	-@erase "$(INTDIR)\mod_buffer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_buffer.exp"
      +	-@erase "$(OUTDIR)\mod_buffer.lib"
      +	-@erase "$(OUTDIR)\mod_buffer.pdb"
      +	-@erase "$(OUTDIR)\mod_buffer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_buffer_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_buffer.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_buffer.so" /d LONG_NAME="buffer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_buffer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_buffer.pdb" /debug /out:"$(OUTDIR)\mod_buffer.so" /implib:"$(OUTDIR)\mod_buffer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_buffer.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_buffer.obj" \
      +	"$(INTDIR)\mod_buffer.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_buffer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_buffer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_buffer.so"
      +   if exist .\Release\mod_buffer.so.manifest mt.exe -manifest .\Release\mod_buffer.so.manifest -outputresource:.\Release\mod_buffer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_buffer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_buffer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_buffer.obj"
      +	-@erase "$(INTDIR)\mod_buffer.res"
      +	-@erase "$(INTDIR)\mod_buffer_src.idb"
      +	-@erase "$(INTDIR)\mod_buffer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_buffer.exp"
      +	-@erase "$(OUTDIR)\mod_buffer.lib"
      +	-@erase "$(OUTDIR)\mod_buffer.pdb"
      +	-@erase "$(OUTDIR)\mod_buffer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_ZUTIL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_buffer_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_buffer.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_buffer.so" /d LONG_NAME="buffer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_buffer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_buffer.pdb" /debug /out:"$(OUTDIR)\mod_buffer.so" /implib:"$(OUTDIR)\mod_buffer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_buffer.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_buffer.obj" \
      +	"$(INTDIR)\mod_buffer.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_buffer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_buffer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_buffer.so"
      +   if exist .\Debug\mod_buffer.so.manifest mt.exe -manifest .\Debug\mod_buffer.so.manifest -outputresource:.\Debug\mod_buffer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_buffer.dep")
      +!INCLUDE "mod_buffer.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_buffer.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_buffer - Win32 Release" || "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_buffer - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_buffer - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_buffer - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_buffer - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_buffer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_buffer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_buffer.so" /d LONG_NAME="buffer_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_buffer - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_buffer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_buffer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_buffer.so" /d LONG_NAME="buffer_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_buffer.c
      +
      +"$(INTDIR)\mod_buffer.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c
      index 2b720bd8868..ed76f611042 100644
      --- a/modules/filters/mod_charset_lite.c
      +++ b/modules/filters/mod_charset_lite.c
      @@ -213,7 +213,7 @@ static int find_code_page(request_rec *r)
           /* If we don't have a full directory configuration, bail out.
            */
           if (!dc->charset_source || !dc->charset_default) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01448)
                             "incomplete configuration: src %s, dst %s",
                             dc->charset_source ? dc->charset_source : "unspecified",
                             dc->charset_default ? dc->charset_default : "unspecified");
      @@ -271,7 +271,7 @@ static int find_code_page(request_rec *r)
               rv = apr_xlate_open(&input_ctx->xlate, dc->charset_source,
                                   dc->charset_default, r->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01449)
                                 "can't open translation %s->%s",
                                 dc->charset_default, dc->charset_source);
                   return HTTP_INTERNAL_SERVER_ERROR;
      @@ -474,40 +474,41 @@ static void log_xlate_error(ap_filter_t *f, apr_status_t rv)
           charset_filter_ctx_t *ctx = f->ctx;
           const char *msg;
           char msgbuf[100];
      -    int cur;
      +    apr_size_t len;
       
           switch(ctx->ees) {
           case EES_LIMIT:
               rv = 0;
      -        msg = "xlate filter - a built-in restriction was encountered";
      +        msg = APLOGNO(02193) "xlate filter - a built-in restriction was encountered";
               break;
           case EES_BAD_INPUT:
               rv = 0;
      -        msg = "xlate filter - an input character was invalid";
      +        msg = APLOGNO(02194) "xlate filter - an input character was invalid";
               break;
           case EES_BUCKET_READ:
               rv = 0;
      -        msg = "xlate filter - bucket read routine failed";
      +        msg = APLOGNO(02195) "xlate filter - bucket read routine failed";
               break;
           case EES_INCOMPLETE_CHAR:
               rv = 0;
      -        strcpy(msgbuf, "xlate filter - incomplete char at end of input - ");
      -        cur = 0;
      -        while ((apr_size_t)cur < ctx->saved) {
      -            apr_snprintf(msgbuf + strlen(msgbuf), sizeof(msgbuf) - strlen(msgbuf),
      -                         "%02X", (unsigned)ctx->buf[cur]);
      -            ++cur;
      -        }
      +        strcpy(msgbuf, APLOGNO(02196) "xlate filter - incomplete char at end of input - ");
      +        len = ctx->saved;
      +
      +        /* We must ensure not to process more than what would fit in the
      +         * remaining of the destination buffer, including terminating NULL */
      +        if (len > (sizeof(msgbuf) - strlen(msgbuf) - 1) / 2)
      +            len = (sizeof(msgbuf) - strlen(msgbuf) - 1) / 2;
      +
      +        ap_bin2hex(ctx->buf, len, msgbuf + strlen(msgbuf));
               msg = msgbuf;
               break;
           case EES_DOWNSTREAM:
      -        msg = "xlate filter - an error occurred in a lower filter";
      +        msg = APLOGNO(02197) "xlate filter - an error occurred in a lower filter";
               break;
           default:
      -        msg = "xlate filter - returning error";
      +        msg = APLOGNO(02198) "xlate filter - returning error";
           }
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      -                  "%s", msg);
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(02997) "%s", msg);
       }
       
       /* chk_filter_chain() is called once per filter instance; it tries to
      @@ -582,7 +583,7 @@ static void chk_filter_chain(ap_filter_t *f)
                                   const char *symbol = output ? "->" : "<-";
       
                                   ap_log_rerror(APLOG_MARK, APLOG_DEBUG,
      -                                          0, f->r,
      +                                          0, f->r, APLOGNO(01451)
                                                 "%s %s - disabling "
                                                 "translation %s%s%s; existing "
                                                 "translation %s%s%s",
      @@ -600,7 +601,7 @@ static void chk_filter_chain(ap_filter_t *f)
                               const char *symbol = output ? "->" : "<-";
       
                               ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                                      0, f->r,
      +                                      0, f->r, APLOGNO(01452)
                                             "chk_filter_chain() - can't disable "
                                             "translation %s%s%s; existing "
                                             "translation %s%s%s",
      @@ -811,7 +812,7 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                   rv = apr_xlate_open(&ctx->xlate,
                                       dc->charset_default, dc->charset_source, f->r->pool);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01453)
                                     "can't open translation %s->%s",
                                     dc->charset_source, dc->charset_default);
                       ctx->noop = 1;
      @@ -865,11 +866,9 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                       consumed_bucket = NULL;
                   }
                   if (dptr == APR_BRIGADE_SENTINEL(bb)) {
      -                done = 1;
                       break;
                   }
                   if (APR_BUCKET_IS_EOS(dptr)) {
      -                done = 1;
                       cur_len = -1; /* XXX yuck, but that tells us to send
                                        * eos down; when we minimize our bb construction
                                        * we'll fix this crap */
      @@ -895,7 +894,6 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                   }
                   rv = apr_bucket_read(dptr, &cur_str, &cur_len, APR_BLOCK_READ);
                   if (rv != APR_SUCCESS) {
      -                done = 1;
                       ctx->ees = EES_BUCKET_READ;
                       break;
                   }
      @@ -973,9 +971,9 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           return rv;
       }
       
      -static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
      -                           ap_input_mode_t mode, apr_read_type_e block,
      -                           apr_off_t readbytes)
      +static apr_status_t xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
      +                                    ap_input_mode_t mode, apr_read_type_e block,
      +                                    apr_off_t readbytes)
       {
           apr_status_t rv;
           charset_req_t *reqinfo = ap_get_module_config(f->r->request_config,
      @@ -986,6 +984,11 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
           apr_size_t buffer_size;
           int hit_eos;
       
      +    /* just get out of the way of things we don't want. */
      +    if (mode != AP_MODE_READBYTES) {
      +        return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +    }
      +
           if (!ctx) {
               /* this is SetInputFilter path; grab the preallocated context,
                * if any; note that if we decided not to do anything in an earlier
      @@ -1023,7 +1026,7 @@ static int xlate_in_filter(ap_filter_t *f, apr_bucket_brigade *bb,
                    * Content-Length can't be unset here because that would break
                    * being able to read the request body.
                    * Processing of chunked request bodies is not impacted by this
      -             * filter since the the length was not declared anyway.
      +             * filter since the length was not declared anyway.
                    */
                   ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, f->r,
                                 "Request body length may change, resulting in "
      diff --git a/modules/filters/mod_charset_lite.dep b/modules/filters/mod_charset_lite.dep
      new file mode 100644
      index 00000000000..3356086d98a
      --- /dev/null
      +++ b/modules/filters/mod_charset_lite.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_charset_lite.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_charset_lite.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_charset_lite.mak b/modules/filters/mod_charset_lite.mak
      new file mode 100644
      index 00000000000..b2524706890
      --- /dev/null
      +++ b/modules/filters/mod_charset_lite.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_charset_lite.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_charset_lite - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_charset_lite - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_charset_lite - Win32 Release" && "$(CFG)" != "mod_charset_lite - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_charset_lite.mak" CFG="mod_charset_lite - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_charset_lite - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_charset_lite - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_charset_lite - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_charset_lite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_charset_lite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_charset_lite.obj"
      +	-@erase "$(INTDIR)\mod_charset_lite.res"
      +	-@erase "$(INTDIR)\mod_charset_lite_src.idb"
      +	-@erase "$(INTDIR)\mod_charset_lite_src.pdb"
      +	-@erase "$(OUTDIR)\mod_charset_lite.exp"
      +	-@erase "$(OUTDIR)\mod_charset_lite.lib"
      +	-@erase "$(OUTDIR)\mod_charset_lite.pdb"
      +	-@erase "$(OUTDIR)\mod_charset_lite.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_charset_lite_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_charset_lite.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_charset_lite.so" /d LONG_NAME="charset_lite_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_charset_lite.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_charset_lite.pdb" /debug /out:"$(OUTDIR)\mod_charset_lite.so" /implib:"$(OUTDIR)\mod_charset_lite.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_charset_lite.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_charset_lite.obj" \
      +	"$(INTDIR)\mod_charset_lite.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_charset_lite.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_charset_lite.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_charset_lite.so"
      +   if exist .\Release\mod_charset_lite.so.manifest mt.exe -manifest .\Release\mod_charset_lite.so.manifest -outputresource:.\Release\mod_charset_lite.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_charset_lite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_charset_lite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_charset_lite.obj"
      +	-@erase "$(INTDIR)\mod_charset_lite.res"
      +	-@erase "$(INTDIR)\mod_charset_lite_src.idb"
      +	-@erase "$(INTDIR)\mod_charset_lite_src.pdb"
      +	-@erase "$(OUTDIR)\mod_charset_lite.exp"
      +	-@erase "$(OUTDIR)\mod_charset_lite.lib"
      +	-@erase "$(OUTDIR)\mod_charset_lite.pdb"
      +	-@erase "$(OUTDIR)\mod_charset_lite.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../srclib/apr-util/include" /I "../../srclib/apr/include" /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_charset_lite_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_charset_lite.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_charset_lite.so" /d LONG_NAME="charset_lite_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_charset_lite.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_charset_lite.pdb" /debug /out:"$(OUTDIR)\mod_charset_lite.so" /implib:"$(OUTDIR)\mod_charset_lite.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_charset_lite.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_charset_lite.obj" \
      +	"$(INTDIR)\mod_charset_lite.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_charset_lite.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_charset_lite.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_charset_lite.so"
      +   if exist .\Debug\mod_charset_lite.so.manifest mt.exe -manifest .\Debug\mod_charset_lite.so.manifest -outputresource:.\Debug\mod_charset_lite.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_charset_lite.dep")
      +!INCLUDE "mod_charset_lite.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_charset_lite.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_charset_lite - Win32 Release" || "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_charset_lite - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_charset_lite - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_charset_lite - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_charset_lite - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_charset_lite.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_charset_lite.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_charset_lite.so" /d LONG_NAME="charset_lite_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_charset_lite - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_charset_lite.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_charset_lite.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_charset_lite.so" /d LONG_NAME="charset_lite_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_charset_lite.c
      +
      +"$(INTDIR)\mod_charset_lite.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_data.c b/modules/filters/mod_data.c
      index 83284dd2d8a..d083d322047 100644
      --- a/modules/filters/mod_data.c
      +++ b/modules/filters/mod_data.c
      @@ -109,7 +109,8 @@ static apr_status_t data_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                   apr_brigade_length(ctx->bb, 1, &len);
                   clen = apr_atoi64(content_length);
                   if (clen >= 0 && clen < APR_INT32_MAX) {
      -                ap_set_content_length(r, len + apr_base64_encode_len(clen) - 1);
      +                ap_set_content_length(r, len +
      +                                      apr_base64_encode_len((int)clen) - 1);
                   }
                   else {
                       apr_table_unset(r->headers_out, "Content-Length");
      diff --git a/modules/filters/mod_data.dep b/modules/filters/mod_data.dep
      new file mode 100644
      index 00000000000..dfcc43dd35b
      --- /dev/null
      +++ b/modules/filters/mod_data.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_data.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_data.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_data.dsp b/modules/filters/mod_data.dsp
      new file mode 100644
      index 00000000000..e4cc23ced07
      --- /dev/null
      +++ b/modules/filters/mod_data.dsp
      @@ -0,0 +1,111 @@
      +# Microsoft Developer Studio Project File - Name="mod_data" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_data - Win32 Release
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_data.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_data.mak" CFG="mod_data - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_data - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_data - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "HAVE_ZUTIL_H" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_data_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /win32
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_data.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_data.so" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_data.so" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_data.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_ZUTIL_H" /Fd"Debug\mod_data_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /win32
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_data.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_data.so" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so
      +# ADD LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_data.so" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_data.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_data - Win32 Release"
      +# Name "mod_data - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=.\mod_data.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/filters/mod_data.mak b/modules/filters/mod_data.mak
      new file mode 100644
      index 00000000000..cc73f510fd2
      --- /dev/null
      +++ b/modules/filters/mod_data.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_data.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_data - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_data - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_data - Win32 Release" && "$(CFG)" != "mod_data - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_data.mak" CFG="mod_data - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_data - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_data - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_data.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_data.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_data.obj"
      +	-@erase "$(INTDIR)\mod_data.res"
      +	-@erase "$(INTDIR)\mod_data_src.idb"
      +	-@erase "$(INTDIR)\mod_data_src.pdb"
      +	-@erase "$(OUTDIR)\mod_data.exp"
      +	-@erase "$(OUTDIR)\mod_data.lib"
      +	-@erase "$(OUTDIR)\mod_data.pdb"
      +	-@erase "$(OUTDIR)\mod_data.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_data_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_data.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_data.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_data.pdb" /debug /out:"$(OUTDIR)\mod_data.so" /implib:"$(OUTDIR)\mod_data.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_data.obj" \
      +	"$(INTDIR)\mod_data.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_data.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_data.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_data.so"
      +   if exist .\Release\mod_data.so.manifest mt.exe -manifest .\Release\mod_data.so.manifest -outputresource:.\Release\mod_data.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_data.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_data.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_data.obj"
      +	-@erase "$(INTDIR)\mod_data.res"
      +	-@erase "$(INTDIR)\mod_data_src.idb"
      +	-@erase "$(INTDIR)\mod_data_src.pdb"
      +	-@erase "$(OUTDIR)\mod_data.exp"
      +	-@erase "$(OUTDIR)\mod_data.lib"
      +	-@erase "$(OUTDIR)\mod_data.pdb"
      +	-@erase "$(OUTDIR)\mod_data.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_ZUTIL_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_data_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_data.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_data.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_data.pdb" /debug /out:"$(OUTDIR)\mod_data.so" /implib:"$(OUTDIR)\mod_data.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_data.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_data.obj" \
      +	"$(INTDIR)\mod_data.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_data.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_data.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_data.so"
      +   if exist .\Debug\mod_data.so.manifest mt.exe -manifest .\Debug\mod_data.so.manifest -outputresource:.\Debug\mod_data.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_data.dep")
      +!INCLUDE "mod_data.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_data.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_data - Win32 Release" || "$(CFG)" == "mod_data - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_data - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_data.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_data.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_data - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_data.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_data.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_data.so" /d LONG_NAME="data_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_data.c
      +
      +"$(INTDIR)\mod_data.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c
      index ba537e491ec..142846089f4 100644
      --- a/modules/filters/mod_deflate.c
      +++ b/modules/filters/mod_deflate.c
      @@ -37,6 +37,7 @@
       #include "httpd.h"
       #include "http_config.h"
       #include "http_log.h"
      +#include "http_core.h"
       #include "apr_lib.h"
       #include "apr_strings.h"
       #include "apr_general.h"
      @@ -45,23 +46,33 @@
       #include "http_request.h"
       #define APR_WANT_STRFUNC
       #include "apr_want.h"
      +#include "mod_ssl.h"
       
       #include "zlib.h"
       
       static const char deflateFilterName[] = "DEFLATE";
       module AP_MODULE_DECLARE_DATA deflate_module;
       
      +#define AP_INFLATE_RATIO_LIMIT 200
      +#define AP_INFLATE_RATIO_BURST 3
      +
       typedef struct deflate_filter_config_t
       {
           int windowSize;
           int memlevel;
           int compressionlevel;
           apr_size_t bufferSize;
      -    char *note_ratio_name;
      -    char *note_input_name;
      -    char *note_output_name;
      +    const char *note_ratio_name;
      +    const char *note_input_name;
      +    const char *note_output_name;
       } deflate_filter_config;
       
      +typedef struct deflate_dirconf_t {
      +    apr_off_t inflate_limit;
      +    int ratio_limit,
      +        ratio_burst;
      +} deflate_dirconf_t;
      +
       /* RFC 1952 Section 2.3 defines the gzip header:
        *
        * +---+---+---+---+---+---+---+---+---+---+
      @@ -83,6 +94,7 @@ static const char deflate_magic[2] = { '\037', '\213' };
       #define DEFAULT_MEMLEVEL 9
       #define DEFAULT_BUFFERSIZE 8096
       
      +static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *mod_deflate_ssl_var = NULL;
       
       /* Check whether a request is gzipped, so we can un-gzip it.
        * If a request has multiple encodings, we need the gzip
      @@ -117,7 +129,7 @@ static int check_gzip(request_rec *r, apr_table_t *hdrs1, apr_table_t *hdrs2)
                   }
               }
               else if (ap_strchr_c(encoding, ',') != NULL) {
      -            /* If the outermost encoding isn't gzip, there's nowt
      +            /* If the outermost encoding isn't gzip, there's nothing
                    * we can do.  So only check the last non-identity token
                    */
                   char *new_encoding = apr_pstrdup(r->pool, encoding);
      @@ -202,6 +214,14 @@ static void *create_deflate_server_config(apr_pool_t *p, server_rec *s)
           return c;
       }
       
      +static void *create_deflate_dirconf(apr_pool_t *p, char *dummy)
      +{
      +    deflate_dirconf_t *dc = apr_pcalloc(p, sizeof(*dc));
      +    dc->ratio_limit = AP_INFLATE_RATIO_LIMIT;
      +    dc->ratio_burst = AP_INFLATE_RATIO_BURST;
      +    return dc;
      +}
      +
       static const char *deflate_set_window_size(cmd_parms *cmd, void *dummy,
                                                  const char *arg)
       {
      @@ -241,16 +261,16 @@ static const char *deflate_set_note(cmd_parms *cmd, void *dummy,
                                                           &deflate_module);
       
           if (arg2 == NULL) {
      -        c->note_ratio_name = apr_pstrdup(cmd->pool, arg1);
      +        c->note_ratio_name = arg1;
           }
           else if (!strcasecmp(arg1, "ratio")) {
      -        c->note_ratio_name = apr_pstrdup(cmd->pool, arg2);
      +        c->note_ratio_name = arg2;
           }
           else if (!strcasecmp(arg1, "input")) {
      -        c->note_input_name = apr_pstrdup(cmd->pool, arg2);
      +        c->note_input_name = arg2;
           }
           else if (!strcasecmp(arg1, "output")) {
      -        c->note_output_name = apr_pstrdup(cmd->pool, arg2);
      +        c->note_output_name = arg2;
           }
           else {
               return apr_psprintf(cmd->pool, "Unknown note type %s", arg1);
      @@ -293,6 +313,55 @@ static const char *deflate_set_compressionlevel(cmd_parms *cmd, void *dummy,
           return NULL;
       }
       
      +
      +static const char *deflate_set_inflate_limit(cmd_parms *cmd, void *dirconf,
      +                                      const char *arg)
      +{
      +    deflate_dirconf_t *dc = (deflate_dirconf_t*) dirconf;
      +    char *errp;
      +
      +    if (APR_SUCCESS != apr_strtoff(&dc->inflate_limit, arg, &errp, 10)) {
      +        return "DeflateInflateLimitRequestBody is not parsable.";
      +    }
      +    if (*errp || dc->inflate_limit < 0) {
      +        return "DeflateInflateLimitRequestBody requires a non-negative integer.";
      +    }
      +
      +    return NULL;
      +}
      +
      +static const char *deflate_set_inflate_ratio_limit(cmd_parms *cmd,
      +                                                   void *dirconf,
      +                                                   const char *arg)
      +{
      +    deflate_dirconf_t *dc = (deflate_dirconf_t*) dirconf;
      +    int i;
      +
      +    i = atoi(arg);
      +    if (i <= 0)
      +        return "DeflateInflateRatioLimit must be positive";
      +
      +    dc->ratio_limit = i;
      +
      +    return NULL;
      +}
      +
      +static const char *deflate_set_inflate_ratio_burst(cmd_parms *cmd,
      +                                                   void *dirconf,
      +                                                   const char *arg)
      +{
      +    deflate_dirconf_t *dc = (deflate_dirconf_t*) dirconf;
      +    int i;
      +
      +    i = atoi(arg);
      +    if (i <= 0)
      +        return "DeflateInflateRatioBurst must be positive";
      +
      +    dc->ratio_burst = i;
      +
      +    return NULL;
      +}
      +
       typedef struct deflate_ctx_t
       {
           z_stream stream;
      @@ -302,8 +371,15 @@ typedef struct deflate_ctx_t
           int (*libz_end_func)(z_streamp);
           unsigned char *validation_buffer;
           apr_size_t validation_buffer_length;
      -    int inflate_init;
      -    int filter_init;
      +    char header[10]; /* sizeof(gzip_header) */
      +    apr_size_t header_len;
      +    int zlib_flags;
      +    int ratio_hits;
      +    apr_off_t inflate_total;
      +    unsigned int consume_pos,
      +                 consume_len;
      +    unsigned int filter_init:1;
      +    unsigned int done:1;
       } deflate_ctx;
       
       /* Number of validation bytes (CRC and length) after the compressed data */
      @@ -419,6 +495,34 @@ static void deflate_check_etag(request_rec *r, const char *transform)
           }
       }
       
      +/* Check whether the (inflate) ratio exceeds the configured limit/burst. */
      +static int check_ratio(request_rec *r, deflate_ctx *ctx,
      +                       const deflate_dirconf_t *dc)
      +{
      +    if (ctx->stream.total_in) {
      +        int ratio = ctx->stream.total_out / ctx->stream.total_in;
      +        if (ratio < dc->ratio_limit) {
      +            ctx->ratio_hits = 0;
      +        }
      +        else if (++ctx->ratio_hits > dc->ratio_burst) {
      +            return 0;
      +        }
      +    }
      +    return 1;
      +}
      +
      +static int have_ssl_compression(request_rec *r)
      +{
      +    const char *comp;
      +    if (mod_deflate_ssl_var == NULL)
      +        return 0;
      +    comp = mod_deflate_ssl_var(r->pool, r->server, r->connection, r,
      +                               "SSL_COMPRESS_METHOD");
      +    if (comp == NULL || *comp == '\0' || strcmp(comp, "NULL") == 0)
      +        return 0;
      +    return 1;
      +}
      +
       static apr_status_t deflate_out_filter(ap_filter_t *f,
                                              apr_bucket_brigade *bb)
       {
      @@ -448,6 +552,14 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
               char *token;
               const char *encoding;
       
      +        if (have_ssl_compression(r)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                          "Compression enabled at SSL level; not compressing "
      +                          "at HTTP level.");
      +            ap_remove_output_filter(f);
      +            return ap_pass_brigade(f->next, bb);
      +        }
      +
               /* We have checked above that bb is not empty */
               e = APR_BRIGADE_LAST(bb);
               if (APR_BUCKET_IS_EOS(e)) {
      @@ -635,7 +747,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
       
                   if (zRC != Z_OK) {
                       deflateEnd(&ctx->stream);
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01383)
                                     "unable to init Zlib: "
                                     "deflateInit2 returned %d: URL %s",
                                     zRC, r->uri);
      @@ -736,7 +848,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                   b = apr_bucket_pool_create(buf, VALIDATION_SIZE, r->pool,
                                              f->c->bucket_alloc);
                   APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01384)
                                 "Zlib: Compressed %ld to %ld : URL %s",
                                 ctx->stream.total_in, ctx->stream.total_out, r->uri);
       
      @@ -788,7 +900,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                   zRC = flush_libz_buffer(ctx, c, f->c->bucket_alloc, deflate,
                                           Z_SYNC_FLUSH, NO_UPDATE_CRC);
                   if (zRC != Z_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01385)
                                     "Zlib error %d flushing zlib output buffer (%s)",
                                     zRC, ctx->stream.msg);
                       return APR_EGENERAL;
      @@ -816,6 +928,14 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
       
               /* read */
               apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
      +        if (!len) {
      +            apr_bucket_delete(e);
      +            continue;
      +        }
      +        if (len > APR_INT32_MAX) {
      +            apr_bucket_split(e, APR_INT32_MAX);
      +            apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
      +        }
       
               /* This crc32 function is from zlib. */
               ctx->crc = crc32(ctx->crc, (const Bytef *)data, len);
      @@ -847,7 +967,7 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
                   zRC = deflate(&(ctx->stream), Z_NO_FLUSH);
       
                   if (zRC != Z_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01386)
                                     "Zlib error %d deflating data (%s)", zRC,
                                     ctx->stream.msg);
                       return APR_EGENERAL;
      @@ -857,7 +977,96 @@ static apr_status_t deflate_out_filter(ap_filter_t *f,
               apr_bucket_delete(e);
           }
       
      -    apr_brigade_cleanup(bb);
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t consume_zlib_flags(deflate_ctx *ctx,
      +                                       const char **data, apr_size_t *len)
      +{
      +    if ((ctx->zlib_flags & EXTRA_FIELD)) {
      +        /* Consume 2 bytes length prefixed data. */
      +        if (ctx->consume_pos == 0) {
      +            if (!*len) {
      +                return APR_INCOMPLETE;
      +            }
      +            ctx->consume_len = (unsigned int)**data;
      +            ctx->consume_pos++;
      +            ++*data;
      +            --*len;
      +        }
      +        if (ctx->consume_pos == 1) {
      +            if (!*len) {
      +                return APR_INCOMPLETE;
      +            }
      +            ctx->consume_len += ((unsigned int)**data) << 8;
      +            ctx->consume_pos++;
      +            ++*data;
      +            --*len;
      +        }
      +        if (*len < ctx->consume_len) {
      +            ctx->consume_len -= *len;
      +            *len = 0;
      +            return APR_INCOMPLETE;
      +        }
      +        *data += ctx->consume_len;
      +        *len -= ctx->consume_len;
      +
      +        ctx->consume_len = ctx->consume_pos = 0;
      +        ctx->zlib_flags &= ~EXTRA_FIELD;
      +    }
      +
      +    if ((ctx->zlib_flags & ORIG_NAME)) {
      +        /* Consume nul terminated string. */
      +        while (*len && **data) {
      +            ++*data;
      +            --*len;
      +        }
      +        if (!*len) {
      +            return APR_INCOMPLETE;
      +        }
      +        /* .. and nul. */
      +        ++*data;
      +        --*len;
      +
      +        ctx->zlib_flags &= ~ORIG_NAME;
      +    }
      +
      +    if ((ctx->zlib_flags & COMMENT)) {
      +        /* Consume nul terminated string. */
      +        while (*len && **data) {
      +            ++*data;
      +            --*len;
      +        }
      +        if (!*len) {
      +            return APR_INCOMPLETE;
      +        }
      +        /* .. and nul. */
      +        ++*data;
      +        --*len;
      +
      +        ctx->zlib_flags &= ~COMMENT;
      +    }
      +
      +    if ((ctx->zlib_flags & HEAD_CRC)) {
      +        /* Consume CRC16 (2 octets). */
      +        if (ctx->consume_pos == 0) {
      +            if (!*len) {
      +                return APR_INCOMPLETE;
      +            }
      +            ctx->consume_pos++;
      +            ++*data;
      +            --*len;
      +        }
      +        if (!*len) {
      +            return APR_INCOMPLETE;
      +        }
      +        ++*data;
      +        --*len;
      +        
      +        ctx->consume_pos = 0;
      +        ctx->zlib_flags &= ~HEAD_CRC;
      +    }
      +
           return APR_SUCCESS;
       }
       
      @@ -874,6 +1083,8 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
           int zRC;
           apr_status_t rv;
           deflate_filter_config *c;
      +    deflate_dirconf_t *dc;
      +    apr_off_t inflate_limit;
       
           /* just get out of the way of things we don't want. */
           if (mode != AP_MODE_READBYTES) {
      @@ -881,66 +1092,100 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
           }
       
           c = ap_get_module_config(r->server->module_config, &deflate_module);
      +    dc = ap_get_module_config(r->per_dir_config, &deflate_module);
       
      -    if (!ctx) {
      -        char deflate_hdr[10];
      +    if (!ctx || ctx->header_len < sizeof(ctx->header)) {
               apr_size_t len;
       
      -        /* only work on main request/no subrequests */
      -        if (!ap_is_initial_req(r)) {
      -            ap_remove_input_filter(f);
      -            return ap_get_brigade(f->next, bb, mode, block, readbytes);
      -        }
      +        if (!ctx) {
      +            /* only work on main request/no subrequests */
      +            if (!ap_is_initial_req(r)) {
      +                ap_remove_input_filter(f);
      +                return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +            }
       
      -        /* We can't operate on Content-Ranges */
      -        if (apr_table_get(r->headers_in, "Content-Range") != NULL) {
      -            ap_remove_input_filter(f);
      -            return ap_get_brigade(f->next, bb, mode, block, readbytes);
      -        }
      +            /* We can't operate on Content-Ranges */
      +            if (apr_table_get(r->headers_in, "Content-Range") != NULL) {
      +                ap_remove_input_filter(f);
      +                return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +            }
       
      -        /* Check whether request body is gzipped.
      -         *
      -         * If it is, we're transforming the contents, invalidating
      -         * some request headers including Content-Encoding.
      -         *
      -         * If not, we just remove ourself.
      -         */
      -        if (check_gzip(r, r->headers_in, NULL) == 0) {
      -            ap_remove_input_filter(f);
      -            return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +            /* Check whether request body is gzipped.
      +             *
      +             * If it is, we're transforming the contents, invalidating
      +             * some request headers including Content-Encoding.
      +             *
      +             * If not, we just remove ourself.
      +             */
      +            if (check_gzip(r, r->headers_in, NULL) == 0) {
      +                ap_remove_input_filter(f);
      +                return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +            }
      +
      +            f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
      +            ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
      +            ctx->proc_bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
      +            ctx->buffer = apr_palloc(r->pool, c->bufferSize);
               }
       
      -        f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
      -        ctx->bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
      -        ctx->proc_bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
      -        ctx->buffer = apr_palloc(r->pool, c->bufferSize);
      +        do {
      +            apr_brigade_cleanup(ctx->bb);
       
      -        rv = ap_get_brigade(f->next, ctx->bb, AP_MODE_READBYTES, block, 10);
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      -        }
      +            len = sizeof(ctx->header) - ctx->header_len;
      +            rv = ap_get_brigade(f->next, ctx->bb, AP_MODE_READBYTES, block,
      +                                len);
       
      -        apr_table_unset(r->headers_in, "Content-Length");
      -        apr_table_unset(r->headers_in, "Content-MD5");
      +            /* ap_get_brigade may return success with an empty brigade for
      +             * a non-blocking read which would block (an empty brigade for
      +             * a blocking read is an issue which is simply forwarded here).
      +             */
      +            if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(ctx->bb)) {
      +                return rv;
      +            }
       
      -        len = 10;
      -        rv = apr_brigade_flatten(ctx->bb, deflate_hdr, &len);
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      -        }
      +            /* zero length body? step aside */
      +            bkt = APR_BRIGADE_FIRST(ctx->bb);
      +            if (APR_BUCKET_IS_EOS(bkt)) {
      +                if (ctx->header_len) {
      +                    /* If the header was (partially) read it's an error, this
      +                     * is not a gzip Content-Encoding, as claimed.
      +                     */
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02619)
      +                                  "Encountered premature end-of-stream while "
      +                                  "reading inflate header");
      +                    return APR_EGENERAL;
      +                }
      +                APR_BUCKET_REMOVE(bkt);
      +                APR_BRIGADE_INSERT_TAIL(bb, bkt);
      +                ap_remove_input_filter(f);
      +                return APR_SUCCESS;
      +            }
      +
      +            rv = apr_brigade_flatten(ctx->bb,
      +                                     ctx->header + ctx->header_len, &len);
      +            if (rv != APR_SUCCESS) {
      +                return rv;
      +            }
      +            if (len && !ctx->header_len) {
      +                apr_table_unset(r->headers_in, "Content-Length");
      +                apr_table_unset(r->headers_in, "Content-MD5");
      +            }
      +            ctx->header_len += len;
      +
      +        } while (ctx->header_len < sizeof(ctx->header));
       
               /* We didn't get the magic bytes. */
      -        if (len != 10 ||
      -            deflate_hdr[0] != deflate_magic[0] ||
      -            deflate_hdr[1] != deflate_magic[1]) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "Zlib: Invalid header");
      +        if (ctx->header[0] != deflate_magic[0] ||
      +            ctx->header[1] != deflate_magic[1]) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01387)
      +                          "Zlib: Invalid header");
                   return APR_EGENERAL;
               }
       
      -        /* We can't handle flags for now. */
      -        if (deflate_hdr[3] != 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "Zlib: Unsupported flags %02x", (int)deflate_hdr[3]);
      +        ctx->zlib_flags = ctx->header[3];
      +        if ((ctx->zlib_flags & RESERVED)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01388)
      +                          "Zlib: Invalid flags %02x", ctx->zlib_flags);
                   return APR_EGENERAL;
               }
       
      @@ -949,7 +1194,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
               if (zRC != Z_OK) {
                   f->ctx = NULL;
                   inflateEnd(&ctx->stream);
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01389)
                                 "unable to init Zlib: "
                                 "inflateInit2 returned %d: URL %s",
                                 zRC, r->uri);
      @@ -964,11 +1209,24 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
               apr_brigade_cleanup(ctx->bb);
           }
       
      +    inflate_limit = dc->inflate_limit; 
      +    if (inflate_limit == 0) { 
      +        /* The core is checking the deflated body, we'll check the inflated */
      +        inflate_limit = ap_get_limit_req_body(f->r);
      +    }
      +
           if (APR_BRIGADE_EMPTY(ctx->proc_bb)) {
               rv = ap_get_brigade(f->next, ctx->bb, mode, block, readbytes);
       
      +        /* Don't terminate on EAGAIN (or success with an empty brigade in
      +         * non-blocking mode), just return focus.
      +         */
      +        if (block == APR_NONBLOCK_READ
      +                && (APR_STATUS_IS_EAGAIN(rv)
      +                    || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(ctx->bb)))) {
      +            return rv;
      +        }
               if (rv != APR_SUCCESS) {
      -            /* What about APR_EAGAIN errors? */
                   inflateEnd(&ctx->stream);
                   return rv;
               }
      @@ -980,80 +1238,184 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
                   const char *data;
                   apr_size_t len;
       
      -            /* If we actually see the EOS, that means we screwed up! */
                   if (APR_BUCKET_IS_EOS(bkt)) {
      -                inflateEnd(&ctx->stream);
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Encountered EOS bucket in inflate filter (bug?)");
      -                return APR_EGENERAL;
      +                if (!ctx->done) {
      +                    inflateEnd(&ctx->stream);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02481)
      +                                  "Encountered premature end-of-stream while inflating");
      +                    return APR_EGENERAL;
      +                }
      +
      +                /* Move everything to the returning brigade. */
      +                APR_BUCKET_REMOVE(bkt);
      +                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, bkt);
      +                break;
                   }
       
                   if (APR_BUCKET_IS_FLUSH(bkt)) {
      -                apr_bucket *tmp_heap;
      +                apr_bucket *tmp_b;
      +
      +                ctx->inflate_total += ctx->stream.avail_out;
                       zRC = inflate(&(ctx->stream), Z_SYNC_FLUSH);
      +                ctx->inflate_total -= ctx->stream.avail_out;
                       if (zRC != Z_OK) {
                           inflateEnd(&ctx->stream);
      -                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01391)
                                         "Zlib error %d inflating data (%s)", zRC,
                                         ctx->stream.msg);
                           return APR_EGENERAL;
                       }
      + 
      +                if (inflate_limit && ctx->inflate_total > inflate_limit) { 
      +                    inflateEnd(&ctx->stream);
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02647)
      +                            "Inflated content length of %" APR_OFF_T_FMT
      +                            " is larger than the configured limit"
      +                            " of %" APR_OFF_T_FMT, 
      +                            ctx->inflate_total, inflate_limit);
      +                    return APR_ENOSPC;
      +                }
       
      -                ctx->stream.next_out = ctx->buffer;
      -                len = c->bufferSize - ctx->stream.avail_out;
      +                if (!check_ratio(r, ctx, dc)) {
      +                    inflateEnd(&ctx->stream);
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02805)
      +                            "Inflated content ratio is larger than the "
      +                            "configured limit %i by %i time(s)",
      +                            dc->ratio_limit, dc->ratio_burst);
      +                    return APR_EINVAL;
      +                }
       
      +                len = c->bufferSize - ctx->stream.avail_out;
                       ctx->crc = crc32(ctx->crc, (const Bytef *)ctx->buffer, len);
      -                tmp_heap = apr_bucket_heap_create((char *)ctx->buffer, len,
      -                                                 NULL, f->c->bucket_alloc);
      -                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
      +                tmp_b = apr_bucket_heap_create((char *)ctx->buffer, len,
      +                                                NULL, f->c->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_b);
      +
      +                ctx->stream.next_out = ctx->buffer;
                       ctx->stream.avail_out = c->bufferSize;
       
      -                /* Move everything to the returning brigade. */
      +                /* Flush everything so far in the returning brigade, but continue
      +                 * reading should EOS/more follow (don't lose them).
      +                 */
      +                tmp_b = APR_BUCKET_PREV(bkt);
                       APR_BUCKET_REMOVE(bkt);
      -                APR_BRIGADE_CONCAT(bb, ctx->bb);
      -                break;
      +                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, bkt);
      +                bkt = tmp_b;
      +                continue;
      +            }
      +
      +            /* sanity check - data after completed compressed body and before eos? */
      +            if (ctx->done) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02482)
      +                              "Encountered extra data after compressed data");
      +                return APR_EGENERAL;
                   }
       
                   /* read */
                   apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
      +            if (!len) {
      +                continue;
      +            }
      +            if (len > APR_INT32_MAX) {
      +                apr_bucket_split(bkt, APR_INT32_MAX);
      +                apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ);
      +            }
      +
      +            if (ctx->zlib_flags) {
      +                rv = consume_zlib_flags(ctx, &data, &len);
      +                if (rv == APR_SUCCESS) {
      +                    ctx->zlib_flags = 0;
      +                }
      +                if (!len) {
      +                    continue;
      +                }
      +            }
       
                   /* pass through zlib inflate. */
                   ctx->stream.next_in = (unsigned char *)data;
      -            ctx->stream.avail_in = len;
      +            ctx->stream.avail_in = (int)len;
       
                   zRC = Z_OK;
       
      -            while (ctx->stream.avail_in != 0) {
      -                if (ctx->stream.avail_out == 0) {
      -                    apr_bucket *tmp_heap;
      -                    ctx->stream.next_out = ctx->buffer;
      -                    len = c->bufferSize - ctx->stream.avail_out;
      -
      -                    ctx->crc = crc32(ctx->crc, (const Bytef *)ctx->buffer, len);
      -                    tmp_heap = apr_bucket_heap_create((char *)ctx->buffer, len,
      -                                                      NULL, f->c->bucket_alloc);
      -                    APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
      -                    ctx->stream.avail_out = c->bufferSize;
      -                }
      +            if (!ctx->validation_buffer) {
      +                while (ctx->stream.avail_in != 0) {
      +                    if (ctx->stream.avail_out == 0) {
      +                        apr_bucket *tmp_heap;
       
      -                zRC = inflate(&ctx->stream, Z_NO_FLUSH);
      +                        ctx->stream.next_out = ctx->buffer;
      +                        len = c->bufferSize - ctx->stream.avail_out;
       
      -                if (zRC == Z_STREAM_END) {
      -                    break;
      -                }
      +                        ctx->crc = crc32(ctx->crc, (const Bytef *)ctx->buffer, len);
      +                        tmp_heap = apr_bucket_heap_create((char *)ctx->buffer, len,
      +                                                          NULL, f->c->bucket_alloc);
      +                        APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
      +                        ctx->stream.avail_out = c->bufferSize;
      +                    }
       
      -                if (zRC != Z_OK) {
      -                    inflateEnd(&ctx->stream);
      -                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                                  "Zlib error %d inflating data (%s)", zRC,
      -                                  ctx->stream.msg);
      -                    return APR_EGENERAL;
      +                    ctx->inflate_total += ctx->stream.avail_out;
      +                    zRC = inflate(&ctx->stream, Z_NO_FLUSH);
      +                    ctx->inflate_total -= ctx->stream.avail_out;
      +                    if (zRC != Z_OK && zRC != Z_STREAM_END) {
      +                        inflateEnd(&ctx->stream);
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01392)
      +                                      "Zlib error %d inflating data (%s)", zRC,
      +                                      ctx->stream.msg);
      +                        return APR_EGENERAL;
      +                    }
      +
      +                    if (inflate_limit && ctx->inflate_total > inflate_limit) { 
      +                        inflateEnd(&ctx->stream);
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02648)
      +                                "Inflated content length of %" APR_OFF_T_FMT
      +                                " is larger than the configured limit"
      +                                " of %" APR_OFF_T_FMT, 
      +                                ctx->inflate_total, inflate_limit);
      +                        return APR_ENOSPC;
      +                    }
      +
      +                    if (!check_ratio(r, ctx, dc)) {
      +                        inflateEnd(&ctx->stream);
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02649)
      +                                "Inflated content ratio is larger than the "
      +                                "configured limit %i by %i time(s)",
      +                                dc->ratio_limit, dc->ratio_burst);
      +                        return APR_EINVAL;
      +                    }
      +
      +                    if (zRC == Z_STREAM_END) {
      +                        ctx->validation_buffer = apr_pcalloc(r->pool,
      +                                                             VALIDATION_SIZE);
      +                        ctx->validation_buffer_length = 0;
      +                        break;
      +                    }
                       }
                   }
      -            if (zRC == Z_STREAM_END) {
      -                apr_bucket *tmp_heap, *eos;
       
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            if (ctx->validation_buffer) {
      +                apr_bucket *tmp_heap;
      +                apr_size_t avail, valid;
      +                unsigned char *buf = ctx->validation_buffer;
      +
      +                avail = ctx->stream.avail_in;
      +                valid = (apr_size_t)VALIDATION_SIZE -
      +                         ctx->validation_buffer_length;
      +
      +                /*
      +                 * We have inflated all data. Now try to capture the
      +                 * validation bytes. We may not have them all available
      +                 * right now, but capture what is there.
      +                 */
      +                if (avail < valid) {
      +                    memcpy(buf + ctx->validation_buffer_length,
      +                           ctx->stream.next_in, avail);
      +                    ctx->validation_buffer_length += avail;
      +                    continue;
      +                }
      +                memcpy(buf + ctx->validation_buffer_length,
      +                       ctx->stream.next_in, valid);
      +                ctx->validation_buffer_length += valid;
      +
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01393)
                                     "Zlib: Inflated %ld to %ld : URL %s",
                                     ctx->stream.total_in, ctx->stream.total_out,
                                     r->uri);
      @@ -1066,41 +1428,37 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
                       APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, tmp_heap);
                       ctx->stream.avail_out = c->bufferSize;
       
      -                /* Is the remaining 8 bytes already in the avail stream? */
      -                if (ctx->stream.avail_in >= 8) {
      +                {
                           unsigned long compCRC, compLen;
      -                    compCRC = getLong(ctx->stream.next_in);
      +                    compCRC = getLong(buf);
                           if (ctx->crc != compCRC) {
                               inflateEnd(&ctx->stream);
      -                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01394)
                                             "Zlib: CRC error inflating data");
                               return APR_EGENERAL;
                           }
      -                    ctx->stream.next_in += 4;
      -                    compLen = getLong(ctx->stream.next_in);
      -                    if (ctx->stream.total_out != compLen) {
      +                    compLen = getLong(buf + VALIDATION_SIZE / 2);
      +                    /* gzip stores original size only as 4 byte value */
      +                    if ((ctx->stream.total_out & 0xFFFFFFFF) != compLen) {
                               inflateEnd(&ctx->stream);
      -                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01395)
                                             "Zlib: Length %ld of inflated data does "
                                             "not match expected value %ld",
                                             ctx->stream.total_out, compLen);
                               return APR_EGENERAL;
                           }
                       }
      -                else {
      -                    /* FIXME: We need to grab the 8 verification bytes
      -                     * from the wire! */
      -                    inflateEnd(&ctx->stream);
      -                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                                  "Verification data not available (bug?)");
      -                    return APR_EGENERAL;
      -                }
       
                       inflateEnd(&ctx->stream);
       
      -                eos = apr_bucket_eos_create(f->c->bucket_alloc);
      -                APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos);
      -                break;
      +                ctx->done = 1;
      +
      +                /* Did we have trailing data behind the closing 8 bytes? */
      +                if (avail > valid) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02485)
      +                                  "Encountered extra data after compressed data");
      +                    return APR_EGENERAL;
      +                }
                   }
       
               }
      @@ -1111,8 +1469,8 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
            * some data in our zlib buffer, flush it out so we can return something.
            */
           if (block == APR_BLOCK_READ &&
      -        APR_BRIGADE_EMPTY(ctx->proc_bb) &&
      -        ctx->stream.avail_out < c->bufferSize) {
      +            APR_BRIGADE_EMPTY(ctx->proc_bb) &&
      +            ctx->stream.avail_out < c->bufferSize) {
               apr_bucket *tmp_heap;
               apr_size_t len;
               ctx->stream.next_out = ctx->buffer;
      @@ -1133,6 +1491,9 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
                   APR_BRIGADE_CONCAT(bb, ctx->proc_bb);
                   apr_brigade_split_ex(bb, bkt, ctx->proc_bb);
               }
      +        if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) {
      +            ap_remove_input_filter(f);
      +        }
           }
       
           return APR_SUCCESS;
      @@ -1143,14 +1504,13 @@ static apr_status_t deflate_in_filter(ap_filter_t *f,
       static apr_status_t inflate_out_filter(ap_filter_t *f,
                                             apr_bucket_brigade *bb)
       {
      -    int zlib_method;
      -    int zlib_flags;
           apr_bucket *e;
           request_rec *r = f->r;
           deflate_ctx *ctx = f->ctx;
           int zRC;
           apr_status_t rv;
           deflate_filter_config *c;
      +    deflate_dirconf_t *dc;
       
           /* Do nothing if asked to filter nothing. */
           if (APR_BRIGADE_EMPTY(bb)) {
      @@ -1158,6 +1518,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
           }
       
           c = ap_get_module_config(r->server->module_config, &deflate_module);
      +    dc = ap_get_module_config(r->per_dir_config, &deflate_module);
       
           if (!ctx) {
       
      @@ -1202,7 +1563,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
               if (zRC != Z_OK) {
                   f->ctx = NULL;
                   inflateEnd(&ctx->stream);
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01397)
                                 "unable to init Zlib: "
                                 "inflateInit2 returned %d: URL %s",
                                 zRC, r->uri);
      @@ -1225,8 +1586,6 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
               /* initialize inflate output buffer */
               ctx->stream.next_out = ctx->buffer;
               ctx->stream.avail_out = c->bufferSize;
      -
      -        ctx->inflate_init = 0;
           }
       
           while (!APR_BRIGADE_EMPTY(bb))
      @@ -1256,7 +1615,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                    */
                   flush_libz_buffer(ctx, c, f->c->bucket_alloc, inflate, Z_SYNC_FLUSH,
                                     UPDATE_CRC);
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01398)
                                 "Zlib: Inflated %ld to %ld : URL %s",
                                 ctx->stream.total_in, ctx->stream.total_out, r->uri);
       
      @@ -1264,20 +1623,21 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                       unsigned long compCRC, compLen;
                       compCRC = getLong(ctx->validation_buffer);
                       if (ctx->crc != compCRC) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01399)
                                         "Zlib: Checksum of inflated stream invalid");
                           return APR_EGENERAL;
                       }
                       ctx->validation_buffer += VALIDATION_SIZE / 2;
                       compLen = getLong(ctx->validation_buffer);
      -                if (ctx->stream.total_out != compLen) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                /* gzip stores original size only as 4 byte value */
      +                if ((ctx->stream.total_out & 0xFFFFFFFF) != compLen) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01400)
                                         "Zlib: Length of inflated stream invalid");
                           return APR_EGENERAL;
                       }
                   }
                   else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01401)
                                     "Zlib: Validation bytes not present");
                       return APR_EGENERAL;
                   }
      @@ -1303,8 +1663,14 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                   /* flush the remaining data from the zlib buffers */
                   zRC = flush_libz_buffer(ctx, c, f->c->bucket_alloc, inflate,
                                           Z_SYNC_FLUSH, UPDATE_CRC);
      -            if (zRC != Z_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            if (zRC == Z_STREAM_END) {
      +                if (ctx->validation_buffer == NULL) {
      +                    ctx->validation_buffer = apr_pcalloc(f->r->pool,
      +                                                         VALIDATION_SIZE);
      +                }
      +            }
      +            else if (zRC != Z_OK) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01402)
                                     "Zlib error %d flushing inflate buffer (%s)",
                                     zRC, ctx->stream.msg);
                       return APR_EGENERAL;
      @@ -1332,56 +1698,68 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
       
               /* read */
               apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
      +        if (!len) {
      +            apr_bucket_delete(e);
      +            continue;
      +        }
      +        if (len > APR_INT32_MAX) {
      +            apr_bucket_split(e, APR_INT32_MAX);
      +            apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
      +        }
       
               /* first bucket contains zlib header */
      -        if (!ctx->inflate_init++) {
      -            if (len < 10) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Insufficient data for inflate");
      -                return APR_EGENERAL;
      +        if (ctx->header_len < sizeof(ctx->header)) {
      +            apr_size_t rem;
      +
      +            rem = sizeof(ctx->header) - ctx->header_len;
      +            if (len < rem) {
      +                memcpy(ctx->header + ctx->header_len, data, len);
      +                ctx->header_len += len;
      +                apr_bucket_delete(e);
      +                continue;
                   }
      -            else  {
      -                zlib_method = data[2];
      -                zlib_flags = data[3];
      +            memcpy(ctx->header + ctx->header_len, data, rem);
      +            ctx->header_len += rem;
      +            {
      +                int zlib_method;
      +                zlib_method = ctx->header[2];
                       if (zlib_method != Z_DEFLATED) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01404)
                                         "inflate: data not deflated!");
                           ap_remove_output_filter(f);
                           return ap_pass_brigade(f->next, bb);
                       }
      -                if (data[0] != deflate_magic[0] ||
      -                    data[1] != deflate_magic[1] ||
      -                    (zlib_flags & RESERVED) != 0) {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                if (ctx->header[0] != deflate_magic[0] ||
      +                    ctx->header[1] != deflate_magic[1]) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01405)
                                             "inflate: bad header");
                           return APR_EGENERAL ;
                       }
      -                data += 10 ;
      -                len -= 10 ;
      -           }
      -           if (zlib_flags & EXTRA_FIELD) {
      -               unsigned int bytes = (unsigned int)(data[0]);
      -               bytes += ((unsigned int)(data[1])) << 8;
      -               bytes += 2;
      -               if (len < bytes) {
      -                   ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                                 "inflate: extra field too big (not "
      -                                 "supported)");
      -                   return APR_EGENERAL;
      -               }
      -               data += bytes;
      -               len -= bytes;
      -           }
      -           if (zlib_flags & ORIG_NAME) {
      -               while (len-- && *data++);
      -           }
      -           if (zlib_flags & COMMENT) {
      -               while (len-- && *data++);
      -           }
      -           if (zlib_flags & HEAD_CRC) {
      -                len -= 2;
      -                data += 2;
      -           }
      +                ctx->zlib_flags = ctx->header[3];
      +                if ((ctx->zlib_flags & RESERVED)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02620)
      +                                  "inflate: bad flags %02x",
      +                                  ctx->zlib_flags);
      +                    return APR_EGENERAL;
      +                }
      +            }
      +            if (len == rem) {
      +                apr_bucket_delete(e);
      +                continue;
      +            }
      +            data += rem;
      +            len -= rem;
      +        }
      +
      +        if (ctx->zlib_flags) {
      +            rv = consume_zlib_flags(ctx, &data, &len);
      +            if (rv == APR_SUCCESS) {
      +                ctx->zlib_flags = 0;
      +            }
      +            if (!len) {
      +                apr_bucket_delete(e);
      +                continue;
      +            }
               }
       
               /* pass through zlib inflate. */
      @@ -1402,7 +1780,7 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                       ctx->validation_buffer_length += copy_size;
                   }
                   if (ctx->stream.avail_in) {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01407)
                                     "Zlib: %d bytes of garbage at the end of "
                                     "compressed stream.", ctx->stream.avail_in);
                       /*
      @@ -1418,7 +1796,6 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
       
               while (ctx->stream.avail_in != 0) {
                   if (ctx->stream.avail_out == 0) {
      -
                       ctx->stream.next_out = ctx->buffer;
                       len = c->bufferSize - ctx->stream.avail_out;
       
      @@ -1436,6 +1813,21 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
       
                   zRC = inflate(&ctx->stream, Z_NO_FLUSH);
       
      +            if (zRC != Z_OK && zRC != Z_STREAM_END) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01409)
      +                              "Zlib error %d inflating data (%s)", zRC,
      +                              ctx->stream.msg);
      +                return APR_EGENERAL;
      +            }
      +
      +            if (!check_ratio(r, ctx, dc)) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02650)
      +                              "Inflated content ratio is larger than the "
      +                              "configured limit %i by %i time(s)",
      +                              dc->ratio_limit, dc->ratio_burst);
      +                return APR_EINVAL;
      +            }
      +
                   if (zRC == Z_STREAM_END) {
                       /*
                        * We have inflated all data. Now try to capture the
      @@ -1446,34 +1838,35 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                                                            VALIDATION_SIZE);
                       if (ctx->stream.avail_in > VALIDATION_SIZE) {
                           ctx->validation_buffer_length = VALIDATION_SIZE;
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01408)
                                         "Zlib: %d bytes of garbage at the end of "
                                         "compressed stream.",
                                         ctx->stream.avail_in - VALIDATION_SIZE);
      -                } else if (ctx->stream.avail_in > 0) {
      -                           ctx->validation_buffer_length = ctx->stream.avail_in;
      +                }
      +                else if (ctx->stream.avail_in > 0) {
      +                    ctx->validation_buffer_length = ctx->stream.avail_in;
                       }
                       if (ctx->validation_buffer_length)
                           memcpy(ctx->validation_buffer, ctx->stream.next_in,
                                  ctx->validation_buffer_length);
                       break;
                   }
      -
      -            if (zRC != Z_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                              "Zlib error %d inflating data (%s)", zRC,
      -                              ctx->stream.msg);
      -                return APR_EGENERAL;
      -            }
               }
       
               apr_bucket_delete(e);
           }
       
      -    apr_brigade_cleanup(bb);
           return APR_SUCCESS;
       }
       
      +static int mod_deflate_post_config(apr_pool_t *pconf, apr_pool_t *plog,
      +                                   apr_pool_t *ptemp, server_rec *s)
      +{
      +    mod_deflate_ssl_var = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
      +    return OK;
      +}
      +
      +
       #define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
       static void register_hooks(apr_pool_t *p)
       {
      @@ -1483,6 +1876,7 @@ static void register_hooks(apr_pool_t *p)
                                     AP_FTYPE_RESOURCE-1);
           ap_register_input_filter(deflateFilterName, deflate_in_filter, NULL,
                                     AP_FTYPE_CONTENT_SET);
      +    ap_hook_post_config(mod_deflate_post_config, NULL, NULL, APR_HOOK_MIDDLE);
       }
       
       static const command_rec deflate_filter_cmds[] = {
      @@ -1496,12 +1890,20 @@ static const command_rec deflate_filter_cmds[] = {
                         "Set the Deflate Memory Level (1-9)"),
           AP_INIT_TAKE1("DeflateCompressionLevel", deflate_set_compressionlevel, NULL, RSRC_CONF,
                         "Set the Deflate Compression Level (1-9)"),
      +    AP_INIT_TAKE1("DeflateInflateLimitRequestBody", deflate_set_inflate_limit, NULL, OR_ALL,
      +                  "Set a limit on size of inflated input"),
      +    AP_INIT_TAKE1("DeflateInflateRatioLimit", deflate_set_inflate_ratio_limit, NULL, OR_ALL,
      +                  "Set the inflate ratio limit above which inflation is "
      +                  "aborted (default: " APR_STRINGIFY(AP_INFLATE_RATIO_LIMIT) ")"),
      +    AP_INIT_TAKE1("DeflateInflateRatioBurst", deflate_set_inflate_ratio_burst, NULL, OR_ALL,
      +                  "Set the maximum number of following inflate ratios above limit "
      +                  "(default: " APR_STRINGIFY(AP_INFLATE_RATIO_BURST) ")"),
           {NULL}
       };
       
       AP_DECLARE_MODULE(deflate) = {
           STANDARD20_MODULE_STUFF,
      -    NULL,                         /* dir config creater */
      +    create_deflate_dirconf,       /* dir config creater */
           NULL,                         /* dir merger --- default is to override */
           create_deflate_server_config, /* server config */
           NULL,                         /* merge server config */
      diff --git a/modules/filters/mod_deflate.dep b/modules/filters/mod_deflate.dep
      new file mode 100644
      index 00000000000..4715df0fdfb
      --- /dev/null
      +++ b/modules/filters/mod_deflate.dep
      @@ -0,0 +1,52 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_deflate.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_deflate.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\ssl\mod_ssl.h"\
      +	
      diff --git a/modules/filters/mod_deflate.dsp b/modules/filters/mod_deflate.dsp
      index 06ce9683373..f990c976b4f 100644
      --- a/modules/filters/mod_deflate.dsp
      +++ b/modules/filters/mod_deflate.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "NDEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_deflate_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "NDEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_deflate_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "_DEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_deflate_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "_DEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_deflate_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      diff --git a/modules/filters/mod_deflate.mak b/modules/filters/mod_deflate.mak
      new file mode 100644
      index 00000000000..95792842a2d
      --- /dev/null
      +++ b/modules/filters/mod_deflate.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_deflate.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_deflate - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_deflate - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_deflate - Win32 Release" && "$(CFG)" != "mod_deflate - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_deflate.mak" CFG="mod_deflate - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_deflate - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_deflate - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_deflate - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_deflate.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_deflate.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_deflate.obj"
      +	-@erase "$(INTDIR)\mod_deflate.res"
      +	-@erase "$(INTDIR)\mod_deflate_src.idb"
      +	-@erase "$(INTDIR)\mod_deflate_src.pdb"
      +	-@erase "$(OUTDIR)\mod_deflate.exp"
      +	-@erase "$(OUTDIR)\mod_deflate.lib"
      +	-@erase "$(OUTDIR)\mod_deflate.pdb"
      +	-@erase "$(OUTDIR)\mod_deflate.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "NDEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_deflate_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_deflate.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_deflate.so" /d LONG_NAME="deflate_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_deflate.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib zdll.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_deflate.pdb" /debug /out:"$(OUTDIR)\mod_deflate.so" /implib:"$(OUTDIR)\mod_deflate.lib" /libpath:"../../srclib/zlib" /base:@..\..\os\win32\BaseAddr.ref,mod_deflate.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_deflate.obj" \
      +	"$(INTDIR)\mod_deflate.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_deflate.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_deflate.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_deflate.so"
      +   if exist .\Release\mod_deflate.so.manifest mt.exe -manifest .\Release\mod_deflate.so.manifest -outputresource:.\Release\mod_deflate.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_deflate.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_deflate.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_deflate.obj"
      +	-@erase "$(INTDIR)\mod_deflate.res"
      +	-@erase "$(INTDIR)\mod_deflate_src.idb"
      +	-@erase "$(INTDIR)\mod_deflate_src.pdb"
      +	-@erase "$(OUTDIR)\mod_deflate.exp"
      +	-@erase "$(OUTDIR)\mod_deflate.lib"
      +	-@erase "$(OUTDIR)\mod_deflate.pdb"
      +	-@erase "$(OUTDIR)\mod_deflate.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/zlib" /D "_DEBUG" /D "ZLIB_DLL" /D "HAVE_ZUTIL_H" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_deflate_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_deflate.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_deflate.so" /d LONG_NAME="deflate_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_deflate.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib zdll.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_deflate.pdb" /debug /out:"$(OUTDIR)\mod_deflate.so" /implib:"$(OUTDIR)\mod_deflate.lib" /libpath:"../../srclib/zlib" /base:@..\..\os\win32\BaseAddr.ref,mod_deflate.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_deflate.obj" \
      +	"$(INTDIR)\mod_deflate.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_deflate.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_deflate.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_deflate.so"
      +   if exist .\Debug\mod_deflate.so.manifest mt.exe -manifest .\Debug\mod_deflate.so.manifest -outputresource:.\Debug\mod_deflate.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_deflate.dep")
      +!INCLUDE "mod_deflate.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_deflate.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_deflate - Win32 Release" || "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_deflate - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_deflate - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_deflate - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_deflate - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_deflate.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_deflate.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_deflate.so" /d LONG_NAME="deflate_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_deflate - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_deflate.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_deflate.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_deflate.so" /d LONG_NAME="deflate_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_deflate.c
      +
      +"$(INTDIR)\mod_deflate.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c
      index 1fd0a9ef6ba..7aac19d86e3 100644
      --- a/modules/filters/mod_ext_filter.c
      +++ b/modules/filters/mod_ext_filter.c
      @@ -66,7 +66,7 @@ typedef struct ef_ctx_t {
           apr_procattr_t *procattr;
           ef_dir_t *dc;
           ef_filter_t *filter;
      -    int noop;
      +    int noop, hit_eos;
       #if APR_FILES_AS_SOCKETS
           apr_pollset_t *pollset;
       #endif
      @@ -396,7 +396,6 @@ static void child_errfn(apr_pool_t *pool, apr_status_t err, const char *descript
           request_rec *r;
           void *vr;
           apr_file_t *stderr_log;
      -    char errbuf[200];
           char time_str[APR_CTIME_LEN];
       
           apr_pool_userdata_get(&vr, ERRFN_USERDATA_KEY, pool);
      @@ -404,11 +403,11 @@ static void child_errfn(apr_pool_t *pool, apr_status_t err, const char *descript
           apr_file_open_stderr(&stderr_log, pool);
           ap_recent_ctime(time_str, apr_time_now());
           apr_file_printf(stderr_log,
      -                    "[%s] [client %s] mod_ext_filter (%d)%s: %s\n",
      +                    "[%s] [client %s] mod_ext_filter (%d)%pm: %s\n",
                           time_str,
      -                    r->connection->remote_ip,
      +                    r->useragent_ip,
                           err,
      -                    apr_strerror(err, errbuf, sizeof(errbuf)),
      +                    &err,
                           description);
       }
       
      @@ -477,7 +476,7 @@ static apr_status_t init_ext_filter_process(ap_filter_t *f)
                                   ctx->procattr,
                                   ctx->p);
           if (rc != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, f->r, APLOGNO(01458)
                             "couldn't create child process to run `%s'",
                             ctx->filter->command);
               return rc;
      @@ -565,7 +564,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
           /* look for the user-defined filter */
           ctx->filter = find_filter_def(f->r->server, f->frec->name);
           if (!ctx->filter) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01459)
                             "couldn't find definition of filter '%s'",
                             f->frec->name);
               return APR_EINVAL;
      @@ -636,7 +635,7 @@ static apr_status_t init_filter_instance(ap_filter_t *f)
       /* drain_available_output():
        *
        * if any data is available from the filter, read it and append it
      - * to the the bucket brigade
      + * to the bucket brigade
        */
       static apr_status_t drain_available_output(ap_filter_t *f,
                                                  apr_bucket_brigade *bb)
      @@ -655,7 +654,7 @@ static apr_status_t drain_available_output(ap_filter_t *f,
               rv = apr_file_read(ctx->proc->out, buf, &len);
               if (rv && !APR_STATUS_IS_EAGAIN(rv))
                  lvl = APLOG_DEBUG;
      -        ap_log_rerror(APLOG_MARK, lvl, rv, r,
      +        ap_log_rerror(APLOG_MARK, lvl, rv, r, APLOGNO(01460)
                             "apr_file_read(child output), len %" APR_SIZE_T_FMT,
                             !rv ? len : -1);
               if (rv != APR_SUCCESS) {
      @@ -681,12 +680,12 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
       
           do {
               tmplen = len - bytes_written;
      -        rv = apr_file_write(ctx->proc->in,
      +        rv = apr_file_write_full(ctx->proc->in,
                              (const char *)data + bytes_written,
      -                       &tmplen);
      +                       tmplen, &tmplen);
               bytes_written += tmplen;
               if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01461)
                                 "apr_file_write(child input), len %" APR_SIZE_T_FMT,
                                 tmplen);
                   return rv;
      @@ -705,7 +704,7 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
                       rv = apr_pollset_poll(ctx->pollset, f->r->server->timeout,
                                             &num_events, &pdesc);
                       if (rv != APR_SUCCESS && !APR_STATUS_IS_EINTR(rv)) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, f->r, APLOGNO(01462)
                                         "apr_pollset_poll()");
                           /* some error such as APR_TIMEUP */
                           return rv;
      @@ -716,7 +715,7 @@ static apr_status_t pass_data_to_filter(ap_filter_t *f, const char *data,
                       /* Yuck... I'd really like to wait until I can read
                        * or write, but instead I have to sleep and try again
                        */
      -                apr_sleep(100000); /* 100 milliseconds */
      +                apr_sleep(apr_time_from_msec(100));
                       ap_log_rerror(APLOG_MARK, APLOG_TRACE6, 0, f->r, "apr_sleep()");
       #endif /* APR_FILES_AS_SOCKETS */
                   }
      @@ -758,9 +757,16 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                   break;
               }
       
      +        if (AP_BUCKET_IS_ERROR(b)) {
      +            apr_bucket *cpy;
      +            apr_bucket_copy(b, &cpy);
      +            APR_BRIGADE_INSERT_TAIL(bb_tmp, cpy);
      +            break;
      +        }
      +
               rv = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "apr_bucket_read()");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01463) "apr_bucket_read()");
                   return rv;
               }
       
      @@ -781,7 +787,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                * that will cause the child to finish generating output
                */
               if ((rv = apr_file_close(ctx->proc->in)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01464)
                                 "apr_file_close(child input)");
                   return rv;
               }
      @@ -791,7 +797,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
               rv = apr_file_pipe_timeout_set(ctx->proc->out,
                                              r->server->timeout);
               if (rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01465)
                                 "apr_file_pipe_timeout_set(child output)");
                   return rv;
               }
      @@ -803,7 +809,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
               rv = apr_file_read(ctx->proc->out, buf, &len);
               if (rv && !APR_STATUS_IS_EOF(rv) && !APR_STATUS_IS_EAGAIN(rv))
                   lvl = APLOG_ERR;
      -        ap_log_rerror(APLOG_MARK, lvl, rv, r,
      +        ap_log_rerror(APLOG_MARK, lvl, rv, r, APLOGNO(01466)
                             "apr_file_read(child output), len %" APR_SIZE_T_FMT,
                             !rv ? len : -1);
               if (APR_STATUS_IS_EAGAIN(rv)) {
      @@ -827,6 +833,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           if (eos) {
               b = apr_bucket_eos_create(c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(bb, b);
      +        ctx->hit_eos = 1;
           }
       
           return APR_SUCCESS;
      @@ -841,7 +848,7 @@ static apr_status_t ef_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           if (!ctx) {
               if ((rv = init_filter_instance(f)) != APR_SUCCESS) {
                   ctx = f->ctx;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01467)
                                 "can't initialise output filter %s: %s",
                                 f->frec->name,
                                 (ctx->dc->onfail == 1) ? "removing" : "aborting");
      @@ -873,28 +880,33 @@ static apr_status_t ef_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
       
           rv = ef_unified_filter(f, bb);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01468)
                             "ef_unified_filter() failed");
           }
       
           if ((rv = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(01469)
                             "ap_pass_brigade() failed");
           }
           return rv;
       }
       
      -static int ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
      -                           ap_input_mode_t mode, apr_read_type_e block,
      -                           apr_off_t readbytes)
      +static apr_status_t ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
      +                                    ap_input_mode_t mode, apr_read_type_e block,
      +                                    apr_off_t readbytes)
       {
           ef_ctx_t *ctx = f->ctx;
           apr_status_t rv;
       
      +    /* just get out of the way of things we don't want. */
      +    if (mode != AP_MODE_READBYTES) {
      +        return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +    }
      +
           if (!ctx) {
               if ((rv = init_filter_instance(f)) != APR_SUCCESS) {
                   ctx = f->ctx;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01470)
                                 "can't initialise input filter %s: %s",
                                 f->frec->name,
                                 (ctx->dc->onfail == 1) ? "removing" : "aborting");
      @@ -910,6 +922,14 @@ static int ef_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
               ctx = f->ctx;
           }
       
      +    if (ctx->hit_eos) {
      +        /* Match behaviour of HTTP_IN if filter is re-invoked after
      +         * hitting EOS: give back another EOS. */
      +        apr_bucket *e = apr_bucket_eos_create(f->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, e);
      +        return APR_SUCCESS;
      +    }
      +
           if (ctx->noop) {
               ap_remove_input_filter(f);
               return ap_get_brigade(f->next, bb, mode, block, readbytes);
      diff --git a/modules/filters/mod_ext_filter.dep b/modules/filters/mod_ext_filter.dep
      new file mode 100644
      index 00000000000..6b662021c5a
      --- /dev/null
      +++ b/modules/filters/mod_ext_filter.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_ext_filter.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_ext_filter.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\include\util_time.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_ext_filter.mak b/modules/filters/mod_ext_filter.mak
      new file mode 100644
      index 00000000000..f03bff360c2
      --- /dev/null
      +++ b/modules/filters/mod_ext_filter.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_ext_filter.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_ext_filter - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_ext_filter - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_ext_filter - Win32 Release" && "$(CFG)" != "mod_ext_filter - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_ext_filter.mak" CFG="mod_ext_filter - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_ext_filter - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_ext_filter - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ext_filter - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ext_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ext_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ext_filter.obj"
      +	-@erase "$(INTDIR)\mod_ext_filter.res"
      +	-@erase "$(INTDIR)\mod_ext_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_ext_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ext_filter.exp"
      +	-@erase "$(OUTDIR)\mod_ext_filter.lib"
      +	-@erase "$(OUTDIR)\mod_ext_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_ext_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ext_filter_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ext_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ext_filter.so" /d LONG_NAME="ext_filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ext_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ext_filter.pdb" /debug /out:"$(OUTDIR)\mod_ext_filter.so" /implib:"$(OUTDIR)\mod_ext_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ext_filter.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ext_filter.obj" \
      +	"$(INTDIR)\mod_ext_filter.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ext_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_ext_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ext_filter.so"
      +   if exist .\Release\mod_ext_filter.so.manifest mt.exe -manifest .\Release\mod_ext_filter.so.manifest -outputresource:.\Release\mod_ext_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ext_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ext_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ext_filter.obj"
      +	-@erase "$(INTDIR)\mod_ext_filter.res"
      +	-@erase "$(INTDIR)\mod_ext_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_ext_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ext_filter.exp"
      +	-@erase "$(OUTDIR)\mod_ext_filter.lib"
      +	-@erase "$(OUTDIR)\mod_ext_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_ext_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ext_filter_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ext_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ext_filter.so" /d LONG_NAME="ext_filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ext_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ext_filter.pdb" /debug /out:"$(OUTDIR)\mod_ext_filter.so" /implib:"$(OUTDIR)\mod_ext_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ext_filter.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ext_filter.obj" \
      +	"$(INTDIR)\mod_ext_filter.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ext_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_ext_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ext_filter.so"
      +   if exist .\Debug\mod_ext_filter.so.manifest mt.exe -manifest .\Debug\mod_ext_filter.so.manifest -outputresource:.\Debug\mod_ext_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_ext_filter.dep")
      +!INCLUDE "mod_ext_filter.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_ext_filter.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_ext_filter - Win32 Release" || "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_ext_filter - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ext_filter - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ext_filter - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_ext_filter - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_ext_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ext_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_ext_filter.so" /d LONG_NAME="ext_filter_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_ext_filter - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_ext_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ext_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_ext_filter.so" /d LONG_NAME="ext_filter_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_ext_filter.c
      +
      +"$(INTDIR)\mod_ext_filter.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c
      index 936cc529a06..7b692233ee0 100644
      --- a/modules/filters/mod_filter.c
      +++ b/modules/filters/mod_filter.c
      @@ -83,12 +83,12 @@ static void filter_trace(conn_rec *c, int debug, const char *fname,
           case 0:        /* normal, operational use */
               return;
           case 1:        /* mod_diagnostics level */
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, "%s", fname);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01375) "%s", fname);
               for (b = APR_BRIGADE_FIRST(bb);
                    b != APR_BRIGADE_SENTINEL(bb);
                    b = APR_BUCKET_NEXT(b)) {
       
      -            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01376)
                                 "%s: type: %s, length: %" APR_SIZE_T_FMT,
                                 fname, b->type->name ? b->type->name : "(unknown)",
                                 b->length);
      @@ -107,14 +107,14 @@ static int filter_init(ap_filter_t *f)
           harness_ctx *fctx = apr_pcalloc(f->r->pool, sizeof(harness_ctx));
           for (p = filter->providers; p; p = p->next) {
               if (p->frec->filter_init_func == filter_init) {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, APLOGNO(01377)
                                 "Chaining of FilterProviders not supported");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               else if (p->frec->filter_init_func) {
                   f->ctx = NULL;
                   if ((err = p->frec->filter_init_func(f)) != OK) {
      -                ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
      +                ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, APLOGNO(01378)
                                     "filter_init for %s failed", p->frec->name);
                       return err;   /* if anyone errors out here, so do we */
                   }
      @@ -131,6 +131,7 @@ static int filter_init(ap_filter_t *f)
           f->ctx = fctx;
           return OK;
       }
      +
       static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
       {
           ap_filter_provider_t *provider;
      @@ -150,7 +151,7 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
               if (provider->expr) {
                   match = ap_expr_exec(r, provider->expr, &err);
                   if (err) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01379)
                                     "Error evaluating filter dispatch condition: %s",
                                     err);
                       match = 0;
      @@ -164,13 +165,21 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
                   const char **type = provider->types;
                   size_t len = strcspn(r->content_type, "; \t");
                   AP_DEBUG_ASSERT(type != NULL);
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
      +                          "Content-Type '%s' ...", r->content_type);
                   while (*type) {
                       /* Handle 'content-type;charset=...' correctly */
                       if (strncmp(*type, r->content_type, len) == 0
                           && (*type)[len] == '\0') {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
      +                                  "... matched '%s'", *type);
                           match = 1;
                           break;
                       }
      +                else {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
      +                                  "... did not match '%s'", *type);
      +                }
                       type++;
                   }
                   ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      @@ -178,6 +187,11 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
                                 provider->frec->name,
                                 match ? "matched" : "did not match");
               }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                          "Content-Type condition for '%s' did not match: "
      +                          "no Content-Type", provider->frec->name);
      +        }
       
               if (match) {
                   /* condition matches this provider */
      @@ -207,9 +221,7 @@ static int filter_lookup(ap_filter_t *f, ap_filter_rec_t *filter)
                           const char *str = apr_table_get(r->headers_out,
                                                           "Cache-Control");
                           if (str) {
      -                        char *str1 = apr_pstrdup(r->pool, str);
      -                        ap_str_tolower(str1);
      -                        if (strstr(str1, "no-transform")) {
      +                        if (ap_strcasestr(str, "no-transform")) {
                                   /* can't use this provider; try next */
                                   continue;
                               }
      @@ -264,7 +276,6 @@ static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
           apr_status_t ret;
       #ifndef NO_PROTOCOL
           const char *cachecontrol;
      -    char *str;
       #endif
           harness_ctx *ctx = f->ctx;
           ap_filter_rec_t *filter = f->frec;
      @@ -290,9 +301,7 @@ static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
                       cachecontrol = apr_table_get(f->r->headers_out,
                                                    "Cache-Control");
                       if (cachecontrol) {
      -                    str = apr_pstrdup(f->r->pool,  cachecontrol);
      -                    ap_str_tolower(str);
      -                    if (strstr(str, "no-transform")) {
      +                    if (ap_strcasestr(cachecontrol, "no-transform")) {
                               ap_remove_output_filter(f);
                               return ap_pass_brigade(f->next, bb);
                           }
      @@ -304,6 +313,7 @@ static apr_status_t filter_harness(ap_filter_t *f, apr_bucket_brigade *bb)
                   ap_remove_output_filter(f);
                   return ap_pass_brigade(f->next, bb);
               }
      +        AP_DEBUG_ASSERT(ctx->func != NULL);
           }
       
           /* call the content filter with its own context, then restore our
      @@ -341,7 +351,7 @@ static const char *filter_protocol(cmd_parms *cmd, void *CFG, const char *fname,
           }
           else {
               /* Find provider */
      -        for (provider = filter->providers; provider; provider = provider->next){
      +        for (provider = filter->providers; provider; provider = provider->next) {
                   if (!strcasecmp(provider->frec->name, pname)) {
                       break;
                   }
      @@ -352,12 +362,15 @@ static const char *filter_protocol(cmd_parms *cmd, void *CFG, const char *fname,
           }
       
           /* Now set flags from our args */
      -    for (arg = apr_strtok(apr_pstrdup(cmd->pool, proto), sep, &tok);
      +    for (arg = apr_strtok(apr_pstrdup(cmd->temp_pool, proto), sep, &tok);
                arg; arg = apr_strtok(NULL, sep, &tok)) {
       
               if (!strcasecmp(arg, "change=yes")) {
                   flags |= AP_FILTER_PROTO_CHANGE | AP_FILTER_PROTO_CHANGE_LENGTH;
               }
      +        if (!strcasecmp(arg, "change=no")) {
      +            flags &= ~(AP_FILTER_PROTO_CHANGE | AP_FILTER_PROTO_CHANGE_LENGTH);
      +        }
               else if (!strcasecmp(arg, "change=1:1")) {
                   flags |= AP_FILTER_PROTO_CHANGE;
               }
      @@ -461,9 +474,11 @@ static const char *add_filter(cmd_parms *cmd, void *CFG,
                                      NULL);
               }
               provider->expr = node;
      +        provider->types = NULL;
           }
           else {
               provider->types = types;
      +        provider->expr = NULL;
           }
           provider->frec = provider_frec;
           provider->next = frec->providers;
      @@ -594,7 +609,7 @@ static const char *filter_bytype(cmd_parms *cmd, void *CFG,
           name = apr_pstrdup(cmd->temp_pool, argv[0]);
           types = apr_palloc(cmd->pool, argc * sizeof(char *));
           memcpy(types, &argv[1], (argc - 1) * sizeof(char *));
      -    types[argc] = NULL;
      +    types[argc-1] = NULL;
           for (pname = apr_strtok(name, ";", &strtok_state);
                pname != NULL && rv == NULL;
                pname = apr_strtok(NULL, ";", &strtok_state)) {
      @@ -640,7 +655,7 @@ static void filter_insert(request_rec *r)
           for (p = cfg->chain; p; p = p->next) {
               filter = apr_hash_get(cfg->live_filters, p->fname, APR_HASH_KEY_STRING);
               if (filter == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01380)
                                 "Unknown filter %s not added", p->fname);
                   continue;
               }
      @@ -655,8 +670,6 @@ static void filter_insert(request_rec *r)
               }
       #endif
           }
      -
      -    return;
       }
       
       static void filter_hooks(apr_pool_t *pool)
      diff --git a/modules/filters/mod_filter.dep b/modules/filters/mod_filter.dep
      new file mode 100644
      index 00000000000..1701264e893
      --- /dev/null
      +++ b/modules/filters/mod_filter.dep
      @@ -0,0 +1,50 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_filter.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_filter.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_filter.mak b/modules/filters/mod_filter.mak
      new file mode 100644
      index 00000000000..c753d9bbfaf
      --- /dev/null
      +++ b/modules/filters/mod_filter.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_filter.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_filter - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_filter - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_filter - Win32 Release" && "$(CFG)" != "mod_filter - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_filter.mak" CFG="mod_filter - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_filter - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_filter - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_filter - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_filter.obj"
      +	-@erase "$(INTDIR)\mod_filter.res"
      +	-@erase "$(INTDIR)\mod_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_filter.exp"
      +	-@erase "$(OUTDIR)\mod_filter.lib"
      +	-@erase "$(OUTDIR)\mod_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_filter_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_filter.so" /d LONG_NAME="filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_filter.pdb" /debug /out:"$(OUTDIR)\mod_filter.so" /implib:"$(OUTDIR)\mod_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_filter.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_filter.obj" \
      +	"$(INTDIR)\mod_filter.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_filter.so"
      +   if exist .\Release\mod_filter.so.manifest mt.exe -manifest .\Release\mod_filter.so.manifest -outputresource:.\Release\mod_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_filter.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_filter.obj"
      +	-@erase "$(INTDIR)\mod_filter.res"
      +	-@erase "$(INTDIR)\mod_filter_src.idb"
      +	-@erase "$(INTDIR)\mod_filter_src.pdb"
      +	-@erase "$(OUTDIR)\mod_filter.exp"
      +	-@erase "$(OUTDIR)\mod_filter.lib"
      +	-@erase "$(OUTDIR)\mod_filter.pdb"
      +	-@erase "$(OUTDIR)\mod_filter.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_filter_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_filter.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_filter.so" /d LONG_NAME="filter_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_filter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_filter.pdb" /debug /out:"$(OUTDIR)\mod_filter.so" /implib:"$(OUTDIR)\mod_filter.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_filter.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_filter.obj" \
      +	"$(INTDIR)\mod_filter.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_filter.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_filter.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_filter.so"
      +   if exist .\Debug\mod_filter.so.manifest mt.exe -manifest .\Debug\mod_filter.so.manifest -outputresource:.\Debug\mod_filter.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_filter.dep")
      +!INCLUDE "mod_filter.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_filter.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_filter - Win32 Release" || "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_filter - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_filter - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_filter - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_filter - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_filter.so" /d LONG_NAME="filter_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_filter - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_filter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_filter.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_filter.so" /d LONG_NAME="filter_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_filter.c
      +
      +"$(INTDIR)\mod_filter.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
      index 3fdcffee1fc..a5e44fead7c 100644
      --- a/modules/filters/mod_include.c
      +++ b/modules/filters/mod_include.c
      @@ -117,7 +117,6 @@ typedef struct {
           const char *default_time_fmt;
           const char *undefined_echo;
           xbithack_t  xbithack;
      -    signed char accessenable;
           signed char lastmodified;
           signed char etag;
           signed char legacy_expr;
      @@ -197,7 +196,6 @@ struct ssi_internal_ctx {
           const char   *undefined_echo;
           apr_size_t    undefined_echo_len;
       
      -    char         accessenable;    /* is using the access tests allowed? */
           char         legacy_expr;     /* use ap_expr or legacy mod_include
                                           expression parser? */
       
      @@ -349,8 +347,6 @@ static void debug_dump_tree(include_ctx_t *ctx, parse_node_t *root)
           if (root->right) root->right->dump_done = 0;
       
           debug_printf(ctx, "     --- End Parse Tree ---\n\n");
      -
      -    return;
       }
       
       #define DEBUG_INIT(ctx, filter, brigade) do { \
      @@ -601,6 +597,7 @@ static void add_include_vars(request_rec *r)
           apr_table_setn(e, "DATE_GMT", LAZY_VALUE);
           apr_table_setn(e, "LAST_MODIFIED", LAZY_VALUE);
           apr_table_setn(e, "DOCUMENT_URI", r->uri);
      +    apr_table_setn(e, "DOCUMENT_ARGS", r->args ? r->args : "");
           if (r->path_info && *r->path_info) {
               apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info);
           }
      @@ -661,13 +658,13 @@ static const char *get_include_var(const char *var, include_ctx_t *ctx)
                * v.s. empty strings on an empty match is deliberate.
                */
               if (!re || !re->have_match) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01329)
                       "regex capture $%" APR_SIZE_T_FMT " refers to no regex in %s",
                       idx, r->filename);
                   return NULL;
               }
               else if (re->nsub < idx || idx >= AP_MAX_REG_MATCH) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01330)
                                 "regex capture $%" APR_SIZE_T_FMT
                                 " is out of range (last regex was: '%s') in %s",
                                 idx, re->rexp, r->filename);
      @@ -699,7 +696,7 @@ static const char *include_expr_var_fn(ap_expr_eval_ctx_t *eval_ctx,
       {
           const char *res, *name = data;
           include_ctx_t *ctx = eval_ctx->data;
      -    if (name[0] == 'e') {
      +    if ((name[0] == 'e') || (name[0] == 'E')) {
               /* keep legacy "env" semantics */
               if ((res = apr_table_get(ctx->r->notes, arg)) != NULL)
                   return res;
      @@ -830,7 +827,7 @@ static char *ap_ssi_parse_string(include_ctx_t *ctx, const char *in, char *out,
                   if (*++p == '{') {
                       ep = ap_strchr_c(++p, '}');
                       if (!ep) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Missing '}' on "
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01331) "Missing '}' on "
                                         "variable \"%s\" in %s", p, r->filename);
                           break;
                       }
      @@ -970,8 +967,8 @@ static APR_INLINE int re_check(include_ctx_t *ctx, const char *string,
       
           compiled = ap_pregcomp(ctx->dpool, rexp, AP_REG_EXTENDED);
           if (!compiled) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "unable to "
      -                      "compile pattern \"%s\"", rexp);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02667)
      +                      "unable to compile pattern \"%s\"", rexp);
               return -1;
           }
       
      @@ -1076,7 +1073,7 @@ static int get_ptoken(include_ctx_t *ctx, const char **parse, token_t *token, to
               TYPE_TOKEN(token, TOKEN_LT);
               return 0;
           case '-':
      -        if (**parse == 'A' && (ctx->intern->accessenable)) {
      +        if (**parse == 'A') {
                   TYPE_TOKEN(token, TOKEN_ACCESS);
                   ++*parse;
                   return 0;
      @@ -1171,7 +1168,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
           parse_node_t *new, *root = NULL, *current = NULL;
           request_rec *r = ctx->r;
           request_rec *rr = NULL;
      -    const char *error = "Invalid expression \"%s\" in file %s";
      +    const char *error = APLOGNO(03188) "Invalid expression \"%s\" in file %s";
           const char *parse = expr;
           unsigned regex = 0;
       
      @@ -1212,6 +1209,8 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                       continue;
       
                   default:
      +                /* Intentional no APLOGNO */
      +                /* error text provides APLOGNO */
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error, expr,
                                     r->filename);
                       *was_error = 1;
      @@ -1337,7 +1336,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                       continue;
                   }
       
      -            error = "Unmatched ')' in \"%s\" in file %s";
      +            error = APLOGNO(03189) "Unmatched ')' in \"%s\" in file %s";
                   break;
       
               case TOKEN_NOT:
      @@ -1362,6 +1361,8 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                   break;
               }
       
      +        /* Intentional no APLOGNO */
      +        /* error text provides APLOGNO */
               ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error, expr, r->filename);
               *was_error = 1;
               return 0;
      @@ -1384,7 +1385,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
               case TOKEN_AND:
               case TOKEN_OR:
                   if (!current->left || !current->right) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01332)
                                     "Invalid expression \"%s\" in file %s",
                                     expr, r->filename);
                       *was_error = 1;
      @@ -1449,7 +1450,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                       current->left->token.type != TOKEN_STRING ||
                       (current->right->token.type != TOKEN_STRING &&
                        current->right->token.type != TOKEN_RE)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01333)
                                   "Invalid expression \"%s\" in file %s",
                                   expr, r->filename);
                       *was_error = 1;
      @@ -1484,7 +1485,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                   if (!current->left || !current->right ||
                       current->left->token.type != TOKEN_STRING ||
                       current->right->token.type != TOKEN_STRING) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01334)
                                     "Invalid expression \"%s\" in file %s",
                                     expr, r->filename);
                       *was_error = 1;
      @@ -1532,7 +1533,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                   if (current->left || !current->right ||
                       (current->right->token.type != TOKEN_STRING &&
                        current->right->token.type != TOKEN_RE)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01335)
                                   "Invalid expression \"%s\" in file %s: Token '-A' must be followed by a URI string.",
                                   expr, r->filename);
                       *was_error = 1;
      @@ -1548,7 +1549,7 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
                   }
                   else {
                       current->value = 0;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rr->status, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rr->status, r, APLOGNO(01336)
                                     "mod_include: The tested "
                                     "subrequest -A \"%s\" returned an error code.",
                                     current->right->token.value);
      @@ -1558,18 +1559,20 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
       
               case TOKEN_RE:
                   if (!error) {
      -                error = "No operator before regex in expr \"%s\" in file %s";
      +                error = APLOGNO(03190) "No operator before regex in expr \"%s\" in file %s";
                   }
               case TOKEN_LBRACE:
                   if (!error) {
      -                error = "Unmatched '(' in \"%s\" in file %s";
      +                error = APLOGNO(03191) "Unmatched '(' in \"%s\" in file %s";
                   }
               default:
                   if (!error) {
      -                error = "internal parser error in \"%s\" in file %s";
      +                error = APLOGNO(03192) "internal parser error in \"%s\" in file %s";
                   }
       
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error, expr,r->filename);
      +            /* Intentional no APLOGNO */
      +            /* error text provides APLOGNO */
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error, expr, r->filename);
                   *was_error = 1;
                   return 0;
               }
      @@ -1585,20 +1588,20 @@ static int parse_expr(include_ctx_t *ctx, const char *expr, int *was_error)
       /* same as above, but use common ap_expr syntax / API */
       static int parse_ap_expr(include_ctx_t *ctx, const char *expr, int *was_error)
       {
      -    ap_expr_info_t expr_info;
      +    ap_expr_info_t *expr_info = apr_pcalloc(ctx->pool, sizeof (*expr_info));
           const char *err;
           int ret;
           backref_t *re = ctx->intern->re;
           ap_expr_eval_ctx_t *eval_ctx = ctx->intern->expr_eval_ctx;
       
      -    expr_info.filename = ctx->r->filename;
      -    expr_info.line_number = 0;
      -    expr_info.module_index = APLOG_MODULE_INDEX;
      -    expr_info.flags = AP_EXPR_FLAG_RESTRICTED;
      -    err = ap_expr_parse(ctx->r->pool, ctx->r->pool, &expr_info, expr,
      +    expr_info->filename = ctx->r->filename;
      +    expr_info->line_number = 0;
      +    expr_info->module_index = APLOG_MODULE_INDEX;
      +    expr_info->flags = AP_EXPR_FLAG_RESTRICTED;
      +    err = ap_expr_parse(ctx->r->pool, ctx->r->pool, expr_info, expr,
                               include_expr_lookup);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(01337)
                             "Could not parse expr \"%s\" in %s: %s", expr,
                             ctx->r->filename, err);
               *was_error = 1;
      @@ -1631,10 +1634,10 @@ static int parse_ap_expr(include_ctx_t *ctx, const char *expr, int *was_error)
               eval_ctx->re_source = &re->source;
           }
       
      -    eval_ctx->info = &expr_info;
      +    eval_ctx->info = expr_info;
           ret = ap_expr_exec_ctx(eval_ctx);
           if (ret < 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(01338)
                             "Could not evaluate expr \"%s\" in %s: %s", expr,
                             ctx->r->filename, ctx->intern->expr_err);
               *was_error = 1;
      @@ -1678,8 +1681,6 @@ static void ap_ssi_get_tag_and_value(include_ctx_t *ctx, char **tag,
           if (dodecode && *tag_val) {
               decodehtml(*tag_val);
           }
      -
      -    return;
       }
       
       static int find_file(request_rec *r, const char *directive, const char *tag,
      @@ -1700,7 +1701,7 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
                                       APR_FILEPATH_NOTABSOLUTE, r->pool);
       
               if (rv != APR_SUCCESS) {
      -            error_fmt = "unable to access file \"%s\" "
      +            error_fmt = APLOGNO(02668) "unable to access file \"%s\" "
                               "in parsed file %s";
               }
               else {
      @@ -1713,18 +1714,20 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
                       if ((rv = apr_stat(finfo, to_send,
                           APR_FINFO_GPROT | APR_FINFO_MIN, rr->pool)) != APR_SUCCESS
                           && rv != APR_INCOMPLETE) {
      -                    error_fmt = "unable to get information about \"%s\" "
      -                        "in parsed file %s";
      +                    error_fmt = APLOGNO(02669) "unable to get information "
      +                                "about \"%s\" in parsed file %s";
                       }
                   }
                   else {
      -                error_fmt = "unable to lookup information about \"%s\" "
      -                            "in parsed file %s";
      +                error_fmt = APLOGNO(02670) "unable to lookup information "
      +                            "about \"%s\" in parsed file %s";
                   }
               }
       
               if (error_fmt) {
                   ret = -1;
      +            /* Intentional no APLOGNO */
      +            /* error_fmt provides APLOGNO */
                   ap_log_rerror(APLOG_MARK, APLOG_ERR,
                                 rv, r, error_fmt, to_send, r->filename);
               }
      @@ -1745,7 +1748,7 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
                   return 0;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unable to get "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01339) "unable to get "
                                 "information about \"%s\" in parsed file %s",
                                 tag_val, r->filename);
                   ap_destroy_sub_req(rr);
      @@ -1753,12 +1756,21 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
               }
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter \"%s\" "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01340) "unknown parameter \"%s\" "
                             "to tag %s in %s", tag, directive, r->filename);
               return -1;
           }
       }
       
      +/*
      + * <!--#comment blah blah blah ... -->
      + */
      +static apr_status_t handle_comment(include_ctx_t *ctx, ap_filter_t *f,
      +                                   apr_bucket_brigade *bb)
      +{
      +    return APR_SUCCESS;
      +}
      +
       /*
        * <!--#include virtual|file="..." [onerror|virtual|file="..."] ... -->
        *
      @@ -1778,7 +1790,8 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for include element in %s",
      +                      0, r, APLOGNO(01341)
      +                      "missing argument for include element in %s",
                             r->filename);
           }
       
      @@ -1798,6 +1811,8 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
               request_rec *rr = NULL;
               char *error_fmt = NULL;
               char *parsed_string;
      +        apr_status_t rv = APR_SUCCESS;
      +        int status = 0;
       
               ap_ssi_get_tag_and_value(ctx, &tag, &tag_val, SSI_VALUE_DECODED);
               if (!tag || !tag_val) {
      @@ -1806,7 +1821,7 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
       
               if (strcmp(tag, "virtual") && strcmp(tag, "file") && strcmp(tag,
                       "onerror")) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01342) "unknown parameter "
                                 "\"%s\" to tag include in %s", tag, r->filename);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      @@ -1816,7 +1831,6 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
                                                   SSI_EXPAND_DROP_NAME);
               if (tag[0] == 'f') {
                   char *newpath;
      -            apr_status_t rv;
       
                   /* be safe; only files in this directory or below allowed */
                   rv = apr_filepath_merge(&newpath, NULL, parsed_string,
      @@ -1844,14 +1858,14 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
               }
       
               if (!error_fmt && rr->status != HTTP_OK) {
      -            error_fmt = "unable to include \"%s\" in parsed file %s";
      +            error_fmt = "unable to include \"%s\" in parsed file %s, subrequest setup returned %d";
               }
       
               if (!error_fmt && (ctx->flags & SSI_FLAG_NO_EXEC) &&
                   rr->content_type && strncmp(rr->content_type, "text/", 5)) {
       
                   error_fmt = "unable to include potential exec \"%s\" in parsed "
      -                        "file %s";
      +                        "file %s, content type not text/*";
               }
       
               /* See the Kludge in includes_filter for why.
      @@ -1862,13 +1876,15 @@ static apr_status_t handle_include(include_ctx_t *ctx, ap_filter_t *f,
                   ap_set_module_config(rr->request_config, &include_module, r);
               }
       
      -        if (!error_fmt && ap_run_sub_req(rr)) {
      -            error_fmt = "unable to include \"%s\" in parsed file %s";
      +        if (!error_fmt && ((status = ap_run_sub_req(rr)))) {
      +            error_fmt = "unable to include \"%s\" in parsed file %s, subrequest returned %d";
               }
       
               if (error_fmt) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, error_fmt, tag_val,
      -                    r->filename);
      +            /* Intentional no APLOGNO */
      +            /* error text is also sent to client */
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, error_fmt, tag_val,
      +                    r->filename, status ? status : rr ? rr->status : 0);
                   if (last_error) {
                       /* onerror threw an error, give up completely */
                       break;
      @@ -1908,7 +1924,8 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for echo element in %s",
      +                      0, r, APLOGNO(01343)
      +                      "missing argument for echo element in %s",
                             r->filename);
           }
       
      @@ -1948,7 +1965,7 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                       d = apr_pstrdup(ctx->pool, decoding);
                       token = apr_strtok(d, ", \t", &last);
       
      -                while(token) {
      +                while (token) {
                           if (!strcasecmp(token, "none")) {
                               /* do nothing */
                           }
      @@ -1971,7 +1988,7 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                               echo_text = ap_pbase64decode(ctx->dpool, echo_text);
                           }
                           else {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown value "
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01344) "unknown value "
                                             "\"%s\" to parameter \"decoding\" of tag echo in "
                                             "%s", token, r->filename);
                               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -1984,7 +2001,7 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                       e = apr_pstrdup(ctx->pool, encoding);
                       token = apr_strtok(e, ", \t", &last);
       
      -                while(token) {
      +                while (token) {
                           if (!strcasecmp(token, "none")) {
                               /* do nothing */
                           }
      @@ -2003,7 +2020,7 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                               echo_text = buf;
                           }
                           else {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown value "
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01345) "unknown value "
                                             "\"%s\" to parameter \"encoding\" of tag echo in "
                                             "%s", token, r->filename);
                               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2035,7 +2052,7 @@ static apr_status_t handle_echo(include_ctx_t *ctx, ap_filter_t *f,
                   encoding = tag_val;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01346) "unknown parameter "
                                 "\"%s\" in tag echo of %s", tag, r->filename);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      @@ -2059,7 +2076,8 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for config element in %s",
      +                      0, r, APLOGNO(01347)
      +                      "missing argument for config element in %s",
                             r->filename);
           }
       
      @@ -2116,7 +2134,7 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
                       ctx->flags &= SSI_FLAG_SIZE_ABBREV;
                   }
                   else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown value "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01348) "unknown value "
                                     "\"%s\" to parameter \"sizefmt\" of tag config "
                                     "in %s", parsed_string, r->filename);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2124,7 +2142,7 @@ static apr_status_t handle_config(include_ctx_t *ctx, ap_filter_t *f,
                   }
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01349) "unknown parameter "
                                 "\"%s\" to tag config in %s", tag, r->filename);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      @@ -2146,7 +2164,8 @@ static apr_status_t handle_fsize(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for fsize element in %s",
      +                      0, r, APLOGNO(01350)
      +                      "missing argument for fsize element in %s",
                             r->filename);
           }
       
      @@ -2233,7 +2252,8 @@ static apr_status_t handle_flastmod(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for flastmod element in %s",
      +                      0, r, APLOGNO(01351)
      +                      "missing argument for flastmod element in %s",
                             r->filename);
           }
       
      @@ -2294,9 +2314,10 @@ static apr_status_t handle_if(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, (ctx->argc)
      -                                ? "too many arguments for if element in %s"
      -                                : "missing expr argument for if element in %s",
      +                      0, r,
      +                      (ctx->argc)
      +                      ? APLOGNO(01352) "too many arguments for if element in %s"
      +                      : APLOGNO(01353) "missing expr argument for if element in %s",
                             r->filename);
           }
       
      @@ -2313,14 +2334,14 @@ static apr_status_t handle_if(include_ctx_t *ctx, ap_filter_t *f,
           ap_ssi_get_tag_and_value(ctx, &tag, &expr, SSI_VALUE_RAW);
       
           if (strcmp(tag, "expr")) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter \"%s\" "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01354) "unknown parameter \"%s\" "
                             "to tag if in %s", tag, r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
           }
       
           if (!expr) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "missing expr value for if "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01355) "missing expr value for if "
                             "element in %s", r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
      @@ -2366,9 +2387,10 @@ static apr_status_t handle_elif(include_ctx_t *ctx, ap_filter_t *f,
           if (ctx->argc != 1) {
               ap_log_rerror(APLOG_MARK,
                             (!(ctx->if_nesting_level)) ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, (ctx->argc)
      -                                ? "too many arguments for if element in %s"
      -                                : "missing expr argument for if element in %s",
      +                      0, r,
      +                      (ctx->argc)
      +                      ? APLOGNO(01356) "too many arguments for if element in %s"
      +                      : APLOGNO(01357) "missing expr argument for if element in %s",
                             r->filename);
           }
       
      @@ -2384,14 +2406,14 @@ static apr_status_t handle_elif(include_ctx_t *ctx, ap_filter_t *f,
           ap_ssi_get_tag_and_value(ctx, &tag, &expr, SSI_VALUE_RAW);
       
           if (strcmp(tag, "expr")) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter \"%s\" "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01358) "unknown parameter \"%s\" "
                             "to tag if in %s", tag, r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
           }
       
           if (!expr) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "missing expr in elif "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01359) "missing expr in elif "
                             "statement: %s", r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
      @@ -2405,7 +2427,10 @@ static apr_status_t handle_elif(include_ctx_t *ctx, ap_filter_t *f,
               return APR_SUCCESS;
           }
       
      -    expr_ret = parse_expr(ctx, expr, &was_error);
      +    if (ctx->intern->legacy_expr)
      +        expr_ret = parse_expr(ctx, expr, &was_error);
      +    else
      +        expr_ret = parse_ap_expr(ctx, expr, &was_error);
       
           if (was_error) {
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2435,7 +2460,8 @@ static apr_status_t handle_else(include_ctx_t *ctx, ap_filter_t *f,
           if (ctx->argc) {
               ap_log_rerror(APLOG_MARK,
                             (!(ctx->if_nesting_level)) ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "else directive does not take tags in %s",
      +                      0, r, APLOGNO(01360)
      +                      "else directive does not take tags in %s",
                             r->filename);
           }
       
      @@ -2474,7 +2500,8 @@ static apr_status_t handle_endif(include_ctx_t *ctx, ap_filter_t *f,
           if (ctx->argc) {
               ap_log_rerror(APLOG_MARK,
                             (!(ctx->if_nesting_level)) ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "endif directive does not take tags in %s",
      +                      0, r, APLOGNO(01361)
      +                      "endif directive does not take tags in %s",
                             r->filename);
           }
       
      @@ -2512,7 +2539,8 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for set element in %s",
      +                      0, r,
      +                      APLOGNO(01362) "missing argument for set element in %s",
                             r->filename);
           }
       
      @@ -2558,7 +2586,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                   char *parsed_string;
       
                   if (!var) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "variable must "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01363) "variable must "
                                     "precede value in set directive in %s",
                                     r->filename);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2575,7 +2603,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                       d = apr_pstrdup(ctx->pool, decoding);
                       token = apr_strtok(d, ", \t", &last);
       
      -                while(token) {
      +                while (token) {
                           if (!strcasecmp(token, "none")) {
                               /* do nothing */
                           }
      @@ -2598,7 +2626,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                               parsed_string = ap_pbase64decode(ctx->dpool, parsed_string);
                           }
                           else {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown value "
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01364) "unknown value "
                                             "\"%s\" to parameter \"decoding\" of tag set in "
                                             "%s", token, r->filename);
                               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2611,7 +2639,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                       e = apr_pstrdup(ctx->pool, encoding);
                       token = apr_strtok(e, ", \t", &last);
       
      -                while(token) {
      +                while (token) {
                           if (!strcasecmp(token, "none")) {
                               /* do nothing */
                           }
      @@ -2630,7 +2658,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                               parsed_string = buf;
                           }
                           else {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown value "
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01365) "unknown value "
                                             "\"%s\" to parameter \"encoding\" of tag set in "
                                             "%s", token, r->filename);
                               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -2650,7 +2678,7 @@ static apr_status_t handle_set(include_ctx_t *ctx, ap_filter_t *f,
                                  apr_pstrdup(p, parsed_string));
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Invalid tag for set "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01366) "Invalid tag for set "
                                 "directive in %s", r->filename);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      @@ -2675,7 +2703,8 @@ static apr_status_t handle_printenv(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "printenv directive does not take tags in %s",
      +                      0, r,
      +                      APLOGNO(01367) "printenv directive does not take tags in %s",
                             r->filename);
           }
       
      @@ -3047,7 +3076,7 @@ static apr_size_t find_directive(include_ctx_t *ctx, const char *data,
       
               if (!intern->directive_len) {
                   intern->error = 1;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "missing "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(01368) "missing "
                                 "directive name in parsed document %s",
                                 ctx->r->filename);
               }
      @@ -3183,7 +3212,7 @@ static apr_size_t find_argument(include_ctx_t *ctx, const char *data,
                   intern->current_arg->name_len = 0;
                   intern->error = 1;
       
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "missing "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(01369) "missing "
                                 "argument name for value to tag %s in %s",
                                 apr_pstrmemdup(ctx->r->pool, intern->directive,
                                                intern->directive_len),
      @@ -3215,7 +3244,7 @@ static apr_size_t find_argument(include_ctx_t *ctx, const char *data,
                                                        intern->current_arg->name_len);
               if (!intern->current_arg->name_len) {
                   intern->error = 1;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "missing "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(01370) "missing "
                                 "argument name for value to tag %s in %s",
                                 apr_pstrmemdup(ctx->r->pool, intern->directive,
                                                intern->directive_len),
      @@ -3691,7 +3720,7 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb)
                           }
                       }
                       else {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01371)
                                         "unknown directive \"%s\" in parsed doc %s",
                                         apr_pstrmemdup(r->pool, intern->directive,
                                                        intern->directive_len),
      @@ -3712,7 +3741,7 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb)
       
               } /* switch(ctx->state) */
       
      -    } /* while(brigade) */
      +    } /* while (brigade) */
       
           /* End of stream. Final cleanup */
           if (intern->seen_eos) {
      @@ -3728,7 +3757,7 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb)
                   }
               }
               else if (PARSE_PRE_HEAD != intern->state) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01372)
                                 "SSI directive was not properly finished at the end "
                                 "of parsed document %s", r->filename);
                   if (ctx->flags & SSI_FLAG_PRINTING) {
      @@ -3737,7 +3766,7 @@ static apr_status_t send_parsed_content(ap_filter_t *f, apr_bucket_brigade *bb)
               }
       
               if (!(ctx->flags & SSI_FLAG_PRINTING)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01373)
                                 "missing closing endif directive in parsed document"
                                 " %s", r->filename);
               }
      @@ -3800,7 +3829,6 @@ static int includes_setup(ap_filter_t *f)
       static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
       {
           request_rec *r = f->r;
      -    include_ctx_t *ctx = f->ctx;
           request_rec *parent;
           include_dir_config *conf = ap_get_module_config(r->per_dir_config,
                                                           &include_module);
      @@ -3809,15 +3837,16 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
                                                              &include_module);
       
           if (!(ap_allow_options(r) & OPT_INCLUDES)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01374)
                             "mod_include: Options +Includes (or IncludesNoExec) "
      -                      "wasn't set, INCLUDES filter removed");
      +                      "wasn't set, INCLUDES filter removed: %s", r->uri);
               ap_remove_output_filter(f);
               return ap_pass_brigade(f->next, b);
           }
       
           if (!f->ctx) {
               struct ssi_internal_ctx *intern;
      +        include_ctx_t *ctx;
       
               /* create context for this filter */
               f->ctx = ctx = apr_palloc(r->pool, sizeof(*ctx));
      @@ -3834,7 +3863,6 @@ static apr_status_t includes_filter(ap_filter_t *f, apr_bucket_brigade *b)
               if ((ap_allow_options(r) & OPT_INC_WITH_EXEC) == 0) {
                   ctx->flags |= SSI_FLAG_NO_EXEC;
               }
      -        intern->accessenable = (conf->accessenable > 0);
               intern->legacy_expr = (conf->legacy_expr > 0);
               intern->expr_eval_ctx = NULL;
               intern->expr_err = NULL;
      @@ -3995,7 +4023,6 @@ static void *create_includes_dir_config(apr_pool_t *p, char *dummy)
           include_dir_config *result = apr_pcalloc(p, sizeof(include_dir_config));
       
           result->xbithack          = XBITHACK_UNSET;
      -    result->accessenable      = UNSET;
           result->lastmodified      = UNSET;
           result->etag              = UNSET;
           result->legacy_expr       = UNSET;
      @@ -4013,7 +4040,6 @@ static void *merge_includes_dir_config(apr_pool_t *p, void *basev, void *overrid
           MERGE(base, over, new, default_time_fmt,  NULL);
           MERGE(base, over, new, undefined_echo,    NULL);
           MERGE(base, over, new, xbithack,          XBITHACK_UNSET);
      -    MERGE(base, over, new, accessenable,      UNSET);
           MERGE(base, over, new, lastmodified,      UNSET);
           MERGE(base, over, new, etag,              UNSET);
           MERGE(base, over, new, legacy_expr,       UNSET);
      @@ -4128,13 +4154,13 @@ static const char *set_default_time_fmt(cmd_parms *cmd, void *mconfig,
        */
       
       static int include_post_config(apr_pool_t *p, apr_pool_t *plog,
      -                                apr_pool_t *ptemp, server_rec *s)
      +                               apr_pool_t *ptemp, server_rec *s)
       {
           include_handlers = apr_hash_make(p);
       
           ssi_pfn_register = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler);
       
      -    if(ssi_pfn_register) {
      +    if (ssi_pfn_register) {
               ssi_pfn_register("if", handle_if);
               ssi_pfn_register("set", handle_set);
               ssi_pfn_register("else", handle_else);
      @@ -4143,6 +4169,7 @@ static int include_post_config(apr_pool_t *p, apr_pool_t *plog,
               ssi_pfn_register("endif", handle_endif);
               ssi_pfn_register("fsize", handle_fsize);
               ssi_pfn_register("config", handle_config);
      +        ssi_pfn_register("comment", handle_comment);
               ssi_pfn_register("include", handle_include);
               ssi_pfn_register("flastmod", handle_flastmod);
               ssi_pfn_register("printenv", handle_printenv);
      @@ -4165,9 +4192,6 @@ static const command_rec includes_cmds[] =
                         "SSI End String Tag"),
           AP_INIT_TAKE1("SSIUndefinedEcho", set_undefined_echo, NULL, OR_ALL,
                         "String to be displayed if an echoed variable is undefined"),
      -    AP_INIT_FLAG("SSIAccessEnable", ap_set_flag_slot_char,
      -                  (void *)APR_OFFSETOF(include_dir_config, accessenable),
      -                  OR_LIMIT, "Whether testing access is enabled. Limited to 'on' or 'off'"),
           AP_INIT_FLAG("SSILegacyExprParser", ap_set_flag_slot_char,
                         (void *)APR_OFFSETOF(include_dir_config, legacy_expr),
                         OR_LIMIT,
      diff --git a/modules/filters/mod_include.dep b/modules/filters/mod_include.dep
      new file mode 100644
      index 00000000000..8e4e3e56e15
      --- /dev/null
      +++ b/modules/filters/mod_include.dep
      @@ -0,0 +1,63 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_include.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_include.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_include.h"\
      +	
      diff --git a/modules/filters/mod_include.mak b/modules/filters/mod_include.mak
      new file mode 100644
      index 00000000000..a9c3fedcd87
      --- /dev/null
      +++ b/modules/filters/mod_include.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_include.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_include - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_include - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_include - Win32 Release" && "$(CFG)" != "mod_include - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_include.mak" CFG="mod_include - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_include - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_include - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_include - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_include.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_include.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_include.obj"
      +	-@erase "$(INTDIR)\mod_include.res"
      +	-@erase "$(INTDIR)\mod_include_src.idb"
      +	-@erase "$(INTDIR)\mod_include_src.pdb"
      +	-@erase "$(OUTDIR)\mod_include.exp"
      +	-@erase "$(OUTDIR)\mod_include.lib"
      +	-@erase "$(OUTDIR)\mod_include.pdb"
      +	-@erase "$(OUTDIR)\mod_include.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_include_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_include.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_include.so" /d LONG_NAME="include_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_include.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_include.pdb" /debug /out:"$(OUTDIR)\mod_include.so" /implib:"$(OUTDIR)\mod_include.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_include.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_include.obj" \
      +	"$(INTDIR)\mod_include.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_include.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_include.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_include.so"
      +   if exist .\Release\mod_include.so.manifest mt.exe -manifest .\Release\mod_include.so.manifest -outputresource:.\Release\mod_include.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_include - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_include.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_include.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_include.obj"
      +	-@erase "$(INTDIR)\mod_include.res"
      +	-@erase "$(INTDIR)\mod_include_src.idb"
      +	-@erase "$(INTDIR)\mod_include_src.pdb"
      +	-@erase "$(OUTDIR)\mod_include.exp"
      +	-@erase "$(OUTDIR)\mod_include.lib"
      +	-@erase "$(OUTDIR)\mod_include.pdb"
      +	-@erase "$(OUTDIR)\mod_include.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_include_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_include.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_include.so" /d LONG_NAME="include_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_include.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_include.pdb" /debug /out:"$(OUTDIR)\mod_include.so" /implib:"$(OUTDIR)\mod_include.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_include.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_include.obj" \
      +	"$(INTDIR)\mod_include.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_include.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_include.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_include.so"
      +   if exist .\Debug\mod_include.so.manifest mt.exe -manifest .\Debug\mod_include.so.manifest -outputresource:.\Debug\mod_include.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_include.dep")
      +!INCLUDE "mod_include.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_include.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_include - Win32 Release" || "$(CFG)" == "mod_include - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_include - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_include - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_include - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_include - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_include - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_include - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_include - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_include.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_include.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_include.so" /d LONG_NAME="include_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_include - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_include.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_include.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_include.so" /d LONG_NAME="include_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_include.c
      +
      +"$(INTDIR)\mod_include.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c
      index a7cbc4a5cf8..ee6a7210638 100644
      --- a/modules/filters/mod_proxy_html.c
      +++ b/modules/filters/mod_proxy_html.c
      @@ -29,8 +29,6 @@
       #define VERBOSEB(x) if (verbose) {x}
       #endif
       
      -#include <ctype.h>
      -
       /* libxml2 */
       #include <libxml/HTMLparser.h>
       
      @@ -40,6 +38,7 @@
       #include "apr_strings.h"
       #include "apr_hash.h"
       #include "apr_strmatch.h"
      +#include "apr_lib.h"
       
       #include "apr_optional.h"
       #include "mod_xml2enc.h"
      @@ -47,8 +46,8 @@
       #include "ap_expr.h"
       
       /* globals set once at startup */
      -static ap_rxplus_t* old_expr;
      -static ap_regex_t* seek_meta;
      +static ap_rxplus_t *old_expr;
      +static ap_regex_t *seek_meta;
       static const apr_strmatch_pattern* seek_content;
       static apr_status_t (*xml2enc_charset)(request_rec*, xmlCharEncoding*, const char**) = NULL;
       static apr_status_t (*xml2enc_filter)(request_rec*, const char*, unsigned int) = NULL;
      @@ -67,32 +66,32 @@ module AP_MODULE_DECLARE_DATA proxy_html_module;
       #define M_INTERPOLATE_FROM      0x200
       
       typedef struct {
      -    const char* val;
      +    const char *val;
       } tattr;
       typedef struct {
           unsigned int start;
           unsigned int end;
       } meta;
       typedef struct urlmap {
      -    struct urlmap* next;
      +    struct urlmap *next;
           unsigned int flags;
           unsigned int regflags;
           union {
      -        const char* c;
      -        ap_regex_t* r;
      +        const char *c;
      +        ap_regex_t *r;
           } from;
      -    const char* to;
      +    const char *to;
           ap_expr_info_t *cond;
       } urlmap;
       typedef struct {
      -    urlmap* map;
      -    const char* doctype;
      -    const char* etag;
      +    urlmap *map;
      +    const char *doctype;
      +    const char *etag;
           unsigned int flags;
           size_t bufsz;
      -    apr_hash_t* links;
      -    apr_array_header_t* events;
      -    const char* charset_out;
      +    apr_hash_t *links;
      +    apr_array_header_t *events;
      +    const char *charset_out;
           int extfix;
           int metafix;
           int strip_comments;
      @@ -100,15 +99,15 @@ typedef struct {
           int enabled;
       } proxy_html_conf;
       typedef struct {
      -    ap_filter_t* f;
      -    proxy_html_conf* cfg;
      +    ap_filter_t *f;
      +    proxy_html_conf *cfg;
           htmlParserCtxtPtr parser;
      -    apr_bucket_brigade* bb;
      -    char* buf;
      +    apr_bucket_brigade *bb;
      +    char *buf;
           size_t offset;
           size_t avail;
      -    const char* encoding;
      -    urlmap* map;
      +    const char *encoding;
      +    urlmap *map;
       } saxctxt;
       
       
      @@ -119,23 +118,23 @@ static htmlSAXHandler sax;
       
       typedef enum { ATTR_IGNORE, ATTR_URI, ATTR_EVENT } rewrite_t;
       
      -static const char* const fpi_html =
      +static const char *const fpi_html =
               "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n";
      -static const char* const fpi_html_legacy =
      +static const char *const fpi_html_legacy =
               "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
      -static const char* const fpi_xhtml =
      +static const char *const fpi_xhtml =
               "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
      -static const char* const fpi_xhtml_legacy =
      +static const char *const fpi_xhtml_legacy =
               "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
      -static const char* const html_etag = ">";
      -static const char* const xhtml_etag = " />";
      +static const char *const html_etag = ">";
      +static const char *const xhtml_etag = " />";
       /*#define DEFAULT_DOCTYPE fpi_html */
      -static const char* const DEFAULT_DOCTYPE = "";
      +static const char *const DEFAULT_DOCTYPE = "";
       #define DEFAULT_ETAG html_etag
       
      -static void normalise(unsigned int flags, char* str)
      +static void normalise(unsigned int flags, char *str)
       {
      -    char* p;
      +    char *p;
           if (flags & NORM_LC)
               for (p = str; *p; ++p)
                   if (isupper(*p))
      @@ -154,10 +153,10 @@ static void normalise(unsigned int flags, char* str)
       
       /* This is always utf-8 on entry.  We can convert charset within FLUSH */
       #define FLUSH AP_fwrite(ctx, (chars+begin), (i-begin), 0); begin = i+1
      -static void pcharacters(void* ctxt, const xmlChar *uchars, int length)
      +static void pcharacters(void *ctxt, const xmlChar *uchars, int length)
       {
      -    const char* chars = (const char*) uchars;
      -    saxctxt* ctx = (saxctxt*) ctxt;
      +    const char *chars = (const char*) uchars;
      +    saxctxt *ctx = (saxctxt*) ctxt;
           int i;
           int begin;
           for (begin=i=0; i<length; i++) {
      @@ -171,9 +170,10 @@ static void pcharacters(void* ctxt, const xmlChar *uchars, int length)
           }
           FLUSH;
       }
      -static void preserve(saxctxt* ctx, const size_t len)
      +
      +static void preserve(saxctxt *ctx, const size_t len)
       {
      -    char* newbuf;
      +    char *newbuf;
           if (len <= (ctx->avail - ctx->offset))
               return;
           else while (len > (ctx->avail - ctx->offset))
      @@ -189,24 +189,26 @@ static void preserve(saxctxt* ctx, const size_t len)
               ctx->buf = newbuf;
           }
       }
      -static void pappend(saxctxt* ctx, const char* buf, const size_t len)
      +
      +static void pappend(saxctxt *ctx, const char *buf, const size_t len)
       {
           preserve(ctx, len);
           memcpy(ctx->buf+ctx->offset, buf, len);
           ctx->offset += len;
       }
      -static void dump_content(saxctxt* ctx)
      +
      +static void dump_content(saxctxt *ctx)
       {
      -    urlmap* m;
      -    char* found;
      +    urlmap *m;
      +    char *found;
           size_t s_from, s_to;
           size_t match;
           char c = 0;
           int nmatch;
           ap_regmatch_t pmatch[10];
      -    char* subs;
      +    char *subs;
           size_t len, offs;
      -    urlmap* themap = ctx->map;
      +    urlmap *themap = ctx->map;
       #ifndef GO_FASTER
           int verbose = APLOGrtrace1(ctx->f->r);
       #endif
      @@ -228,7 +230,7 @@ static void dump_content(saxctxt* ctx)
                       len = strlen(ctx->buf);
                       offs += match;
                       VERBOSEB(
      -                    const char* f = apr_pstrndup(ctx->f->r->pool,
      +                    const char *f = apr_pstrndup(ctx->f->r->pool,
                           ctx->buf + offs, s_from);
                           ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, ctx->f->r,
                                         "C/RX: match at %s, substituting %s", f, subs);
      @@ -277,10 +279,10 @@ static void dump_content(saxctxt* ctx)
           }
           AP_fwrite(ctx, ctx->buf, strlen(ctx->buf), 1);
       }
      -static void pcdata(void* ctxt, const xmlChar *uchars, int length)
      +static void pcdata(void *ctxt, const xmlChar *uchars, int length)
       {
      -    const char* chars = (const char*) uchars;
      -    saxctxt* ctx = (saxctxt*) ctxt;
      +    const char *chars = (const char*) uchars;
      +    saxctxt *ctx = (saxctxt*) ctxt;
           if (ctx->cfg->extfix) {
               pappend(ctx, chars, length);
           }
      @@ -291,10 +293,10 @@ static void pcdata(void* ctxt, const xmlChar *uchars, int length)
               AP_fwrite(ctx, chars, length, 0);
           }
       }
      -static void pcomment(void* ctxt, const xmlChar *uchars)
      +static void pcomment(void *ctxt, const xmlChar *uchars)
       {
      -    const char* chars = (const char*) uchars;
      -    saxctxt* ctx = (saxctxt*) ctxt;
      +    const char *chars = (const char*) uchars;
      +    saxctxt *ctx = (saxctxt*) ctxt;
           if (ctx->cfg->strip_comments)
               return;
       
      @@ -309,10 +311,10 @@ static void pcomment(void* ctxt, const xmlChar *uchars)
               ap_fputs(ctx->f->next, ctx->bb, "-->");
           }
       }
      -static void pendElement(void* ctxt, const xmlChar* uname)
      +static void pendElement(void *ctxt, const xmlChar *uname)
       {
      -    saxctxt* ctx = (saxctxt*) ctxt;
      -    const char* name = (const char*) uname;
      +    saxctxt *ctx = (saxctxt*) ctxt;
      +    const char *name = (const char*) uname;
           const htmlElemDesc* desc = htmlTagLookup(uname);
       
           if ((ctx->cfg->doctype == fpi_html) || (ctx->cfg->doctype == fpi_xhtml)) {
      @@ -338,19 +340,20 @@ static void pendElement(void* ctxt, const xmlChar* uname)
               ap_fprintf(ctx->f->next, ctx->bb, "</%s>", name);
           }
       }
      -static void pstartElement(void* ctxt, const xmlChar* uname,
      +
      +static void pstartElement(void *ctxt, const xmlChar *uname,
                                 const xmlChar** uattrs)
       {
           int required_attrs;
           int num_match;
           size_t offs, len;
      -    char* subs;
      +    char *subs;
           rewrite_t is_uri;
           const char** a;
      -    urlmap* m;
      +    urlmap *m;
           size_t s_to, s_from, match;
      -    char* found;
      -    saxctxt* ctx = (saxctxt*) ctxt;
      +    char *found;
      +    saxctxt *ctx = (saxctxt*) ctxt;
           size_t nmatch;
           ap_regmatch_t pmatch[10];
       #ifndef GO_FASTER
      @@ -358,10 +361,10 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
       #endif
           apr_array_header_t *linkattrs;
           int i;
      -    const char* name = (const char*) uname;
      +    const char *name = (const char*) uname;
           const char** attrs = (const char**) uattrs;
           const htmlElemDesc* desc = htmlTagLookup(uname);
      -    urlmap* themap = ctx->map;
      +    urlmap *themap = ctx->map;
       #ifdef HAVE_STACK
           const void** descp;
       #endif
      @@ -382,12 +385,12 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
               }
           }
           if (!desc && enforce) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01416)
                             "Bogus HTML element %s dropped", name);
               return;
           }
           if (desc && desc->depr && (enforce == 2)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01417)
                             "Deprecated HTML element %s dropped", name);
               return;
           }
      @@ -411,12 +414,12 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
                   if (desc && enforce > 0) {
                       switch (htmlAttrAllowed(desc, (xmlChar*)*a, 2-enforce)) {
                       case HTML_INVALID:
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01418)
                                         "Bogus HTML attribute %s of %s dropped",
                                         *a, name);
                           continue;
                       case HTML_DEPRECATED:
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01419)
                                         "Deprecated HTML attribute %s of %s dropped",
                                         *a, name);
                           continue;
      @@ -432,7 +435,7 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
                       pappend(ctx, a[1], strlen(a[1])+1);
                       is_uri = ATTR_IGNORE;
                       if (linkattrs) {
      -                    tattr* attrs = (tattr*) linkattrs->elts;
      +                    tattr *attrs = (tattr*) linkattrs->elts;
                           for (i=0; i < linkattrs->nelts; ++i) {
                               if (!strcmp(*a, attrs[i].val)) {
                                   is_uri = ATTR_URI;
      @@ -443,7 +446,7 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
                       if ((is_uri == ATTR_IGNORE) && ctx->cfg->extfix
                           && (ctx->cfg->events != NULL)) {
                           for (i=0; i < ctx->cfg->events->nelts; ++i) {
      -                        tattr* attrs = (tattr*) ctx->cfg->events->elts;
      +                        tattr *attrs = (tattr*) ctx->cfg->events->elts;
                               if (!strcmp(*a, attrs[i].val)) {
                                   is_uri = ATTR_EVENT;
                                   break;
      @@ -466,7 +469,7 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
                                       subs = ap_pregsub(ctx->f->r->pool, m->to,
                                                         ctx->buf, nmatch, pmatch);
                                       VERBOSE({
      -                                    const char* f;
      +                                    const char *f;
                                           f = apr_pstrndup(ctx->f->r->pool,
                                                            ctx->buf + offs, s_from);
                                           ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0,
      @@ -534,7 +537,7 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
                                       subs = ap_pregsub(ctx->f->r->pool, m->to, ctx->buf+offs,
                                                           nmatch, pmatch);
                                       VERBOSE({
      -                                    const char* f;
      +                                    const char *f;
                                           f = apr_pstrndup(ctx->f->r->pool,
                                                            ctx->buf + offs, s_from);
                                           ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0,
      @@ -633,20 +636,20 @@ static void pstartElement(void* ctxt, const xmlChar* uname,
       
           if ((enforce > 0) && (required_attrs > 0)) {
               /* if there are more required attributes than we found then complain */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->f->r, APLOGNO(01420)
                             "HTML element %s is missing %d required attributes",
                             name, required_attrs);
           }
       }
       
      -static meta* metafix(request_rec* r, const char* buf)
      +static meta *metafix(request_rec *r, const char *buf)
       {
      -    meta* ret = NULL;
      +    meta *ret = NULL;
           size_t offs = 0;
      -    const char* p;
      -    const char* q;
      -    char* header;
      -    char* content;
      +    const char *p;
      +    const char *q;
      +    char *header;
      +    char *content;
           ap_regmatch_t pmatch[2];
           char delim;
       
      @@ -654,8 +657,8 @@ static meta* metafix(request_rec* r, const char* buf)
               header = NULL;
               content = NULL;
               p = buf+offs+pmatch[1].rm_eo;
      -        while (!isalpha(*++p));
      -        for (q = p; isalnum(*q) || (*q == '-'); ++q);
      +        while (!apr_isalpha(*++p));
      +        for (q = p; apr_isalnum(*q) || (*q == '-'); ++q);
               header = apr_pstrndup(r->pool, p, q-p);
               if (strncasecmp(header, "Content-", 8)) {
                   /* find content=... string */
      @@ -665,16 +668,20 @@ static meta* metafix(request_rec* r, const char* buf)
                   if (p != NULL) {
                       while (*p) {
                           p += 7;
      -                    while (*p && isspace(*p))
      +                    while (apr_isspace(*p))
                               ++p;
      +                    /* XXX Should we search for another content= pattern? */
                           if (*p != '=')
      -                        continue;
      -                    while (*p && isspace(*++p));
      +                        break;
      +                    while (*p && apr_isspace(*++p));
                           if ((*p == '\'') || (*p == '"')) {
                               delim = *p++;
      -                        for (q = p; *q != delim; ++q);
      +                        for (q = p; *q && *q != delim; ++q);
      +                        /* No terminating delimiter found? Skip the boggus directive */
      +                        if (*q != delim)
      +                           break;
                           } else {
      -                        for (q = p; *q && !isspace(*q) && (*q != '>'); ++q);
      +                        for (q = p; *q && !apr_isspace(*q) && (*q != '>'); ++q);
                           }
                           content = apr_pstrndup(r->pool, p, q-p);
                           break;
      @@ -683,8 +690,8 @@ static meta* metafix(request_rec* r, const char* buf)
               }
               else if (!strncasecmp(header, "Content-Type", 12)) {
                   ret = apr_palloc(r->pool, sizeof(meta));
      -            ret->start = pmatch[0].rm_so;
      -            ret->end = pmatch[0].rm_eo;
      +            ret->start = offs+pmatch[0].rm_so;
      +            ret->end = offs+pmatch[0].rm_eo;
               }
               if (header && content) {
       #ifndef GO_FASTER
      @@ -699,15 +706,15 @@ static meta* metafix(request_rec* r, const char* buf)
           return ret;
       }
       
      -static const char* interpolate_vars(request_rec* r, const char* str)
      +static const char *interpolate_vars(request_rec *r, const char *str)
       {
      -    const char* start;
      -    const char* end;
      -    const char* delim;
      -    const char* before;
      -    const char* after;
      -    const char* replacement;
      -    const char* var;
      +    const char *start;
      +    const char *end;
      +    const char *delim;
      +    const char *before;
      +    const char *after;
      +    const char *replacement;
      +    const char *var;
           for (;;) {
               start = str;
               if (start = ap_strstr_c(start, "${"), start == NULL)
      @@ -738,19 +745,19 @@ static const char* interpolate_vars(request_rec* r, const char* str)
           }
           return str;
       }
      -static void fixup_rules(saxctxt* ctx)
      +static void fixup_rules(saxctxt *ctx)
       {
      -    urlmap* newp;
      -    urlmap* p;
      -    urlmap* prev = NULL;
      -    request_rec* r = ctx->f->r;
      +    urlmap *newp;
      +    urlmap *p;
      +    urlmap *prev = NULL;
      +    request_rec *r = ctx->f->r;
       
           for (p = ctx->cfg->map; p; p = p->next) {
               if (p->cond != NULL) {
                   const char *err;
                   int ok = ap_expr_exec(r, p->cond, &err);
                   if (err) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01421)
                                     "Error evaluating expr: %s", err);
                   }
                   if (ok == 0) {
      @@ -787,13 +794,14 @@ static void fixup_rules(saxctxt* ctx)
           if (prev)
               prev->next = NULL;
       }
      -static saxctxt* check_filter_init (ap_filter_t* f)
      +
      +static saxctxt *check_filter_init (ap_filter_t *f)
       {
      -    saxctxt* fctx;
      +    saxctxt *fctx;
           if (!f->ctx) {
      -        proxy_html_conf* cfg;
      -        const char* force;
      -        const char* errmsg = NULL;
      +        proxy_html_conf *cfg;
      +        const char *force;
      +        const char *errmsg = NULL;
               cfg = ap_get_module_config(f->r->per_dir_config, &proxy_html_module);
               force = apr_table_get(f->r->subprocess_env, "PROXY_HTML_FORCE");
       
      @@ -839,19 +847,20 @@ static saxctxt* check_filter_init (ap_filter_t* f)
           }
           return f->ctx;
       }
      -static int proxy_html_filter(ap_filter_t* f, apr_bucket_brigade* bb)
      +
      +static apr_status_t proxy_html_filter(ap_filter_t *f, apr_bucket_brigade *bb)
       {
           apr_bucket* b;
      -    meta* m = NULL;
      +    meta *m = NULL;
           xmlCharEncoding enc;
      -    const char* buf = 0;
      +    const char *buf = 0;
           apr_size_t bytes = 0;
       #ifndef USE_OLD_LIBXML2
           int xmlopts = XML_PARSE_RECOVER | XML_PARSE_NONET |
                         XML_PARSE_NOBLANKS | XML_PARSE_NOERROR | XML_PARSE_NOWARNING;
       #endif
       
      -    saxctxt* ctxt = check_filter_init(f);
      +    saxctxt *ctxt = check_filter_init(f);
           if (!ctxt)
               return ap_pass_brigade(f->next, bb);
           for (b = APR_BRIGADE_FIRST(bb);
      @@ -878,11 +887,11 @@ static int proxy_html_filter(ap_filter_t* f, apr_bucket_brigade* bb)
               else if (apr_bucket_read(b, &buf, &bytes, APR_BLOCK_READ)
                        == APR_SUCCESS) {
                   if (ctxt->parser == NULL) {
      -                const char* cenc;
      +                const char *cenc;
                       if (!xml2enc_charset ||
                           (xml2enc_charset(f->r, &enc, &cenc) != APR_SUCCESS)) {
                           if (!xml2enc_charset)
      -                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r, APLOGNO(01422)
                            "No i18n support found.  Install mod_xml2enc if required");
                           enc = XML_CHAR_ENCODING_NONE;
                           ap_set_content_type(f->r, "text/html;charset=utf-8");
      @@ -919,7 +928,7 @@ static int proxy_html_filter(ap_filter_t* f, apr_bucket_brigade* bb)
                                                 apr_pool_cleanup_null);
       #ifndef USE_OLD_LIBXML2
                       if (xmlopts = xmlCtxtUseOptions(ctxt->parser, xmlopts), xmlopts)
      -                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r, APLOGNO(01423)
                                         "Unsupported parser opts %x", xmlopts);
       #endif
                       if (ctxt->cfg->metafix)
      @@ -937,7 +946,7 @@ static int proxy_html_filter(ap_filter_t* f, apr_bucket_brigade* bb)
                   }
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01424)
                                 "Error in bucket read");
               }
           }
      @@ -946,9 +955,9 @@ static int proxy_html_filter(ap_filter_t* f, apr_bucket_brigade* bb)
           return APR_SUCCESS;
       }
       
      -static void* proxy_html_config(apr_pool_t* pool, char* x)
      +static void *proxy_html_config(apr_pool_t *pool, char *x)
       {
      -    proxy_html_conf* ret = apr_pcalloc(pool, sizeof(proxy_html_conf));
      +    proxy_html_conf *ret = apr_pcalloc(pool, sizeof(proxy_html_conf));
           ret->doctype = DEFAULT_DOCTYPE;
           ret->etag = DEFAULT_ETAG;
           ret->bufsz = 8192;
      @@ -956,11 +965,12 @@ static void* proxy_html_config(apr_pool_t* pool, char* x)
           /* don't initialise links and events until they get set/used */
           return ret;
       }
      -static void* proxy_html_merge(apr_pool_t* pool, void* BASE, void* ADD)
      +
      +static void *proxy_html_merge(apr_pool_t *pool, void *BASE, void *ADD)
       {
      -    proxy_html_conf* base = (proxy_html_conf*) BASE;
      -    proxy_html_conf* add = (proxy_html_conf*) ADD;
      -    proxy_html_conf* conf = apr_palloc(pool, sizeof(proxy_html_conf));
      +    proxy_html_conf *base = (proxy_html_conf *) BASE;
      +    proxy_html_conf *add = (proxy_html_conf *) ADD;
      +    proxy_html_conf *conf = apr_palloc(pool, sizeof(proxy_html_conf));
       
           /* don't merge declarations - just use the most specific */
           conf->links = (add->links == NULL) ? base->links : add->links;
      @@ -970,15 +980,15 @@ static void* proxy_html_merge(apr_pool_t* pool, void* BASE, void* ADD)
                               ? base->charset_out : add->charset_out;
       
           if (add->map && base->map) {
      -        urlmap* a;
      +        urlmap *a;
               conf->map = NULL;
               for (a = base->map; a; a = a->next) {
      -            urlmap* save = conf->map;
      +            urlmap *save = conf->map;
                   conf->map = apr_pmemdup(pool, a, sizeof(urlmap));
                   conf->map->next = save;
               }
               for (a = add->map; a; a = a->next) {
      -            urlmap* save = conf->map;
      +            urlmap *save = conf->map;
                   conf->map = apr_pmemdup(pool, a, sizeof(urlmap));
                   conf->map->next = save;
               }
      @@ -1010,9 +1020,9 @@ static void* proxy_html_merge(apr_pool_t* pool, void* BASE, void* ADD)
       }
       #define REGFLAG(n,s,c) ((s&&(ap_strchr_c((s),(c))!=NULL)) ? (n) : 0)
       #define XREGFLAG(n,s,c) ((!s||(ap_strchr_c((s),(c))==NULL)) ? (n) : 0)
      -static const char* comp_urlmap(cmd_parms *cmd, urlmap* newmap,
      -                               const char* from, const char* to,
      -                               const char* flags, const char* cond)
      +static const char *comp_urlmap(cmd_parms *cmd, urlmap *newmap,
      +                               const char *from, const char *to,
      +                               const char *flags, const char *cond)
       {
           const char *err = NULL;
           newmap->flags
      @@ -1054,7 +1064,7 @@ static const char* comp_urlmap(cmd_parms *cmd, urlmap* newmap,
                  /* we got a substitution.  Check for the case (3) above
                   * that the regexp gets wrong: a negation without a comparison.
                   */
      -            if ((cond[0] == '!') && !strchr(cond, '=')) {
      +            if ((cond[0] == '!') && !ap_strchr_c(cond, '=')) {
                       memmove(newcond+1, newcond, strlen(newcond)-1);
                       newcond[0] = '!';
                   }
      @@ -1067,18 +1077,19 @@ static const char* comp_urlmap(cmd_parms *cmd, urlmap* newmap,
           }
           return err;
       }
      -static const char* set_urlmap(cmd_parms* cmd, void* CFG, const char* args)
      +
      +static const char *set_urlmap(cmd_parms *cmd, void *CFG, const char *args)
       {
      -    proxy_html_conf* cfg = (proxy_html_conf*)CFG;
      -    urlmap* map;
      -    apr_pool_t* pool = cmd->pool;
      -    urlmap* newmap;
      -    const char* usage =
      +    proxy_html_conf *cfg = (proxy_html_conf *)CFG;
      +    urlmap *map;
      +    apr_pool_t *pool = cmd->pool;
      +    urlmap *newmap;
      +    const char *usage =
                     "Usage: ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]";
      -    const char* from;
      -    const char* to;
      -    const char* flags;
      -    const char* cond = NULL;
      +    const char *from;
      +    const char *to;
      +    const char *flags;
      +    const char *cond = NULL;
         
           if (from = ap_getword_conf(cmd->pool, &args), !from)
               return usage;
      @@ -1103,10 +1114,10 @@ static const char* set_urlmap(cmd_parms* cmd, void* CFG, const char* args)
           return comp_urlmap(cmd, newmap, from, to, flags, cond);
       }
       
      -static const char* set_doctype(cmd_parms* cmd, void* CFG,
      -                               const char* t, const char* l)
      +static const char *set_doctype(cmd_parms *cmd, void *CFG,
      +                               const char *t, const char *l)
       {
      -    proxy_html_conf* cfg = (proxy_html_conf*)CFG;
      +    proxy_html_conf *cfg = (proxy_html_conf *)CFG;
           if (!strcasecmp(t, "xhtml")) {
               cfg->etag = xhtml_etag;
               if (l && !strcasecmp(l, "legacy"))
      @@ -1130,35 +1141,38 @@ static const char* set_doctype(cmd_parms* cmd, void* CFG,
           }
           return NULL;
       }
      -static const char* set_flags(cmd_parms* cmd, void* CFG, const char* arg)
      +
      +static const char *set_flags(cmd_parms *cmd, void *CFG, const char *arg)
       {
      -    proxy_html_conf* cfg = CFG;
      +    proxy_html_conf *cfg = CFG;
           if (arg && *arg) {
      -        if (!strcmp(arg, "lowercase"))
      +        if (!strcasecmp(arg, "lowercase"))
                   cfg->flags |= NORM_LC;
      -        else if (!strcmp(arg, "dospath"))
      +        else if (!strcasecmp(arg, "dospath"))
                   cfg->flags |= NORM_MSSLASH;
      -        else if (!strcmp(arg, "reset"))
      +        else if (!strcasecmp(arg, "reset"))
                   cfg->flags |= NORM_RESET;
           }
           return NULL;
       }
      -static const char* set_events(cmd_parms* cmd, void* CFG, const char* arg)
      +
      +static const char *set_events(cmd_parms *cmd, void *CFG, const char *arg)
       {
      -    tattr* attr;
      -    proxy_html_conf* cfg = CFG;
      +    tattr *attr;
      +    proxy_html_conf *cfg = CFG;
           if (cfg->events == NULL)
               cfg->events = apr_array_make(cmd->pool, 20, sizeof(tattr));
           attr = apr_array_push(cfg->events);
           attr->val = arg;
           return NULL;
       }
      -static const char* set_links(cmd_parms* cmd, void* CFG,
      -                             const char* elt, const char* att)
      +
      +static const char *set_links(cmd_parms *cmd, void *CFG,
      +                             const char *elt, const char *att)
       {
      -    apr_array_header_t* attrs;
      -    tattr* attr;
      -    proxy_html_conf* cfg = CFG;
      +    apr_array_header_t *attrs;
      +    tattr *attr;
      +    proxy_html_conf *cfg = CFG;
       
           if (cfg->links == NULL)
               cfg->links = apr_hash_make(cmd->pool);
      @@ -1209,7 +1223,7 @@ static const command_rec proxy_html_cmds[] = {
                        "Enable proxy-html and xml2enc filters"),
           { NULL }
       };
      -static int mod_proxy_html(apr_pool_t* p, apr_pool_t* p1, apr_pool_t* p2)
      +static int mod_proxy_html(apr_pool_t *p, apr_pool_t *p1, apr_pool_t *p2)
       {
           seek_meta = ap_pregcomp(p, "<meta[^>]*(http-equiv)[^>]*>",
                                   AP_REG_EXTENDED|AP_REG_ICASE);
      @@ -1223,7 +1237,7 @@ static int mod_proxy_html(apr_pool_t* p, apr_pool_t* p1, apr_pool_t* p2)
           xml2enc_charset = APR_RETRIEVE_OPTIONAL_FN(xml2enc_charset);
           xml2enc_filter = APR_RETRIEVE_OPTIONAL_FN(xml2enc_filter);
           if (!xml2enc_charset) {
      -        ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, p2,
      +        ap_log_perror(APLOG_MARK, APLOG_NOTICE, 0, p2, APLOGNO(01425)
                             "I18n support in mod_proxy_html requires mod_xml2enc. "
                             "Without it, non-ASCII characters in proxied pages are "
                             "likely to display incorrectly.");
      @@ -1233,9 +1247,9 @@ static int mod_proxy_html(apr_pool_t* p, apr_pool_t* p1, apr_pool_t* p2)
           old_expr = ap_rxplus_compile(p1, "s/^(!)?(\\w+)((=)(.+))?$/reqenv('$2')$1$4'$5'/");
           return OK;
       }
      -static void proxy_html_insert(request_rec* r)
      +static void proxy_html_insert(request_rec *r)
       {
      -    proxy_html_conf* cfg;
      +    proxy_html_conf *cfg;
           cfg = ap_get_module_config(r->per_dir_config, &proxy_html_module);
           if (cfg->enabled) {
               if (xml2enc_filter)
      @@ -1243,9 +1257,9 @@ static void proxy_html_insert(request_rec* r)
               ap_add_output_filter("proxy-html", NULL, r, r->connection);
           }
       }
      -static void proxy_html_hooks(apr_pool_t* p)
      +static void proxy_html_hooks(apr_pool_t *p)
       {
      -    static const char* aszSucc[] = { "mod_filter.c", NULL };
      +    static const char *aszSucc[] = { "mod_filter.c", NULL };
           ap_register_output_filter_protocol("proxy-html", proxy_html_filter,
                                              NULL, AP_FTYPE_RESOURCE,
                                 AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH);
      @@ -1255,7 +1269,8 @@ static void proxy_html_hooks(apr_pool_t* p)
           ap_hook_pre_config(mod_proxy_html, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_insert_filter(proxy_html_insert, NULL, aszSucc, APR_HOOK_MIDDLE);
       }
      -module AP_MODULE_DECLARE_DATA proxy_html_module = {
      +
      +AP_DECLARE_MODULE(proxy_html) = {
           STANDARD20_MODULE_STUFF,
           proxy_html_config,
           proxy_html_merge,
      diff --git a/modules/filters/mod_proxy_html.dep b/modules/filters/mod_proxy_html.dep
      new file mode 100644
      index 00000000000..1a6ed087b35
      --- /dev/null
      +++ b/modules/filters/mod_proxy_html.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_html.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_proxy_html.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_xml2enc.h"\
      +	
      diff --git a/modules/filters/mod_proxy_html.dsp b/modules/filters/mod_proxy_html.dsp
      index 149166cbe8c..1d5d54e76db 100644
      --- a/modules/filters/mod_proxy_html.dsp
      +++ b/modules/filters/mod_proxy_html.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /d "NDEBUG" /i "../../include" /i "../../srclib/apr/include" /I "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" 
      +# ADD RSC /l 0x409 /d "NDEBUG" /i "../../include" /i "../../srclib/apr/include" /I "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /i /d "_DEBUG" "../../include" /i "../../srclib/apr/include" /I "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" 
      +# ADD RSC /l 0x409 /d "_DEBUG" /i "../../include" /i "../../srclib/apr/include" /I "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache" 
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/filters/mod_proxy_html.mak b/modules/filters/mod_proxy_html.mak
      new file mode 100644
      index 00000000000..c3579beb769
      --- /dev/null
      +++ b/modules/filters/mod_proxy_html.mak
      @@ -0,0 +1,352 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_html.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_html - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_html - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_html - Win32 Release" && "$(CFG)" != "mod_proxy_html - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_html.mak" CFG="mod_proxy_html - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_html - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_html - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_html - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_html.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_html.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_proxy_html.obj"
      +	-@erase "$(INTDIR)\mod_proxy_html_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_html_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_html.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_html.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_html.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_html.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/libxml2/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_html_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_html.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib libxml2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_html.pdb" /debug /out:"$(OUTDIR)\mod_proxy_html.so" /implib:"$(OUTDIR)\mod_proxy_html.lib" /libpath:"../../srclib/libxml2/win32/bin.msvc" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_html.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_html.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_proxy_html.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_html.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_html.so"
      +   if exist .\Release\mod_proxy_html.so.manifest mt.exe -manifest .\Release\mod_proxy_html.so.manifest -outputresource:.\Release\mod_proxy_html.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_html.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_html.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_proxy_html.obj"
      +	-@erase "$(INTDIR)\mod_proxy_html_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_html_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_html.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_html.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_html.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_html.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/libxml2/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_html_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_html.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib libxml2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_html.pdb" /debug /out:"$(OUTDIR)\mod_proxy_html.so" /implib:"$(OUTDIR)\mod_proxy_html.lib" /libpath:"../../srclib/libxml2/win32/bin.msvc" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_html.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_html.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_proxy_html.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_html.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_html.so"
      +   if exist .\Debug\mod_proxy_html.so.manifest mt.exe -manifest .\Debug\mod_proxy_html.so.manifest -outputresource:.\Debug\mod_proxy_html.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_html.dep")
      +!INCLUDE "mod_proxy_html.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_html.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_html - Win32 Release" || "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_html - Win32 Release"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_html.so" /d LONG_NAME="proxy_html_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_proxy_html.c
      +
      +"$(INTDIR)\mod_proxy_html.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_html - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_html - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_html - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_html - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_ratelimit.c b/modules/filters/mod_ratelimit.c
      index df4e6b889b2..64283c76c3a 100644
      --- a/modules/filters/mod_ratelimit.c
      +++ b/modules/filters/mod_ratelimit.c
      @@ -35,12 +35,13 @@ typedef struct rl_ctx_t
       {
           int speed;
           int chunk_size;
      +    int burst;
           rl_state_e state;
           apr_bucket_brigade *tmpbb;
           apr_bucket_brigade *holdingbb;
       } rl_ctx_t;
       
      -#if 0
      +#if defined(RLFDEBUG)
       static void brigade_dump(request_rec *r, apr_bucket_brigade *bb)
       {
           apr_bucket *e;
      @@ -48,12 +49,12 @@ static void brigade_dump(request_rec *r, apr_bucket_brigade *bb)
       
           for (e = APR_BRIGADE_FIRST(bb);
                e != APR_BRIGADE_SENTINEL(bb); e = APR_BUCKET_NEXT(e), i++) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03193)
                             "brigade: [%d] %s", i, e->type->name);
       
           }
       }
      -#endif
      +#endif /* RLFDEBUG */
       
       static apr_status_t
       rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
      @@ -66,14 +67,17 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
           apr_bucket_brigade *bb = input_bb;
       
           if (f->c->aborted) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "rl: conn aborted");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01454) "rl: conn aborted");
               apr_brigade_cleanup(bb);
               return APR_ECONNABORTED;
           }
       
      +    /* Set up our rl_ctx_t on first use */
           if (ctx == NULL) {
       
               const char *rl = NULL;
      +        int ratelimit;
      +        int burst = 0;
       
               /* no subrequests. */
               if (f->r->main != NULL) {
      @@ -81,28 +85,42 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
                   return ap_pass_brigade(f->next, bb);
               }
       
      +        /* Configuration: rate limit */
               rl = apr_table_get(f->r->subprocess_env, "rate-limit");
       
               if (rl == NULL) {
                   ap_remove_output_filter(f);
                   return ap_pass_brigade(f->next, bb);
               }
      -
      -        /* first run, init stuff */
      -        ctx = apr_palloc(f->r->pool, sizeof(rl_ctx_t));
      -        f->ctx = ctx;
      -        ctx->speed = 0;
      -        ctx->state = RATE_LIMIT;
      -
      +        
               /* rl is in kilo bytes / second  */
      -        ctx->speed = atoi(rl) * 1024;
      -
      -        if (ctx->speed == 0) {
      +        ratelimit = atoi(rl) * 1024;
      +        if (ratelimit <= 0) {
                   /* remove ourselves */
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r,
      +                          APLOGNO(03488) "rl: disabling: rate-limit = %s (too high?)", rl);
                   ap_remove_output_filter(f);
                   return ap_pass_brigade(f->next, bb);
               }
       
      +        /* Configuration: optional initial burst */
      +        rl = apr_table_get(f->r->subprocess_env, "rate-initial-burst");
      +        if (rl != NULL) {
      +            burst = atoi(rl) * 1024;
      +            if (burst <= 0) {
      +               ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r,
      +                             APLOGNO(03489) "rl: disabling burst: rate-initial-burst = %s (too high?)", rl);
      +               burst = 0;
      +            }
      +        }
      +
      +        /* Set up our context */
      +        ctx = apr_palloc(f->r->pool, sizeof(rl_ctx_t));
      +        f->ctx = ctx;
      +        ctx->state = RATE_LIMIT;
      +        ctx->speed = ratelimit;
      +        ctx->burst = burst;
      +
               /* calculate how many bytes / interval we want to send */
               /* speed is bytes / second, so, how many  (speed / 1000 % interval) */
               ctx->chunk_size = (ctx->speed / (1000 / RATE_INTERVAL_MS));
      @@ -116,7 +134,6 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
       
               if (!APR_BRIGADE_EMPTY(ctx->holdingbb)) {
                   APR_BRIGADE_CONCAT(bb, ctx->holdingbb);
      -            apr_brigade_cleanup(ctx->holdingbb);
               }
       
               while (ctx->state == RATE_FULLSPEED && !APR_BRIGADE_EMPTY(bb)) {
      @@ -146,7 +163,7 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
       
                   if (rv != APR_SUCCESS) {
                       ctx->state = RATE_ERROR;
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, f->r, APLOGNO(01455)
                                     "rl: full speed brigade pass failed.");
                   }
               }
      @@ -184,10 +201,18 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
       
                       apr_brigade_length(bb, 1, &len);
       
      -                rv = apr_brigade_partition(bb, ctx->chunk_size, &stop_point);
      +                /*
      +                 * Pull next chunk of data; the initial amount is our
      +                 * burst allotment (if any) plus a chunk.  All subsequent
      +                 * iterations are just chunks with whatever remaining
      +                 * burst amounts we have left (in case not done in the
      +                 * first bucket).
      +                 */
      +                rv = apr_brigade_partition(bb,
      +                    ctx->chunk_size + ctx->burst, &stop_point);
                       if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
                           ctx->state = RATE_ERROR;
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01456)
                                         "rl: partition failed.");
                           break;
                       }
      @@ -208,17 +233,35 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb)
       
                       APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, fb);
       
      -#if 0
      +                /*
      +                 * Adjust the burst amount depending on how much
      +                 * we've done up to now.
      +                 */
      +                if (ctx->burst) {
      +                    len = ctx->burst;
      +                    apr_brigade_length(ctx->tmpbb, 1, &len);
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                        APLOGNO(03485) "rl: burst %d; len %"APR_OFF_T_FMT, ctx->burst, len);
      +                    if (len < ctx->burst) {
      +                        ctx->burst -= len;
      +                    }
      +                    else {
      +                        ctx->burst = 0;
      +                    }
      +                }
      +
      +#if defined(RLFDEBUG)
                       brigade_dump(f->r, ctx->tmpbb);
                       brigade_dump(f->r, bb);
      -#endif
      +#endif /* RLFDEBUG */
       
                       rv = ap_pass_brigade(f->next, ctx->tmpbb);
                       apr_brigade_cleanup(ctx->tmpbb);
       
                       if (rv != APR_SUCCESS) {
      +                    /* Most often, user disconnects from stream */
                           ctx->state = RATE_ERROR;
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, f->r, APLOGNO(01457)
                                         "rl: brigade pass failed.");
                           break;
                       }
      diff --git a/modules/filters/mod_ratelimit.dep b/modules/filters/mod_ratelimit.dep
      new file mode 100644
      index 00000000000..5015e98bc2f
      --- /dev/null
      +++ b/modules/filters/mod_ratelimit.dep
      @@ -0,0 +1,45 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_ratelimit.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_ratelimit.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_ratelimit.h"\
      +	
      diff --git a/modules/filters/mod_ratelimit.mak b/modules/filters/mod_ratelimit.mak
      new file mode 100644
      index 00000000000..e50e892294c
      --- /dev/null
      +++ b/modules/filters/mod_ratelimit.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_ratelimit.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_ratelimit - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_ratelimit - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_ratelimit - Win32 Release" && "$(CFG)" != "mod_ratelimit - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_ratelimit.mak" CFG="mod_ratelimit - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_ratelimit - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_ratelimit - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ratelimit - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ratelimit.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ratelimit.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ratelimit.obj"
      +	-@erase "$(INTDIR)\mod_ratelimit.res"
      +	-@erase "$(INTDIR)\mod_ratelimit_src.idb"
      +	-@erase "$(INTDIR)\mod_ratelimit_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ratelimit.exp"
      +	-@erase "$(OUTDIR)\mod_ratelimit.lib"
      +	-@erase "$(OUTDIR)\mod_ratelimit.pdb"
      +	-@erase "$(OUTDIR)\mod_ratelimit.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ratelimit_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ratelimit.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ratelimit.so" /d LONG_NAME="ratelimit_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ratelimit.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ratelimit.pdb" /debug /out:"$(OUTDIR)\mod_ratelimit.so" /implib:"$(OUTDIR)\mod_ratelimit.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ratelimit.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ratelimit.obj" \
      +	"$(INTDIR)\mod_ratelimit.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ratelimit.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_ratelimit.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ratelimit.so"
      +   if exist .\Release\mod_ratelimit.so.manifest mt.exe -manifest .\Release\mod_ratelimit.so.manifest -outputresource:.\Release\mod_ratelimit.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ratelimit.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ratelimit.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ratelimit.obj"
      +	-@erase "$(INTDIR)\mod_ratelimit.res"
      +	-@erase "$(INTDIR)\mod_ratelimit_src.idb"
      +	-@erase "$(INTDIR)\mod_ratelimit_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ratelimit.exp"
      +	-@erase "$(OUTDIR)\mod_ratelimit.lib"
      +	-@erase "$(OUTDIR)\mod_ratelimit.pdb"
      +	-@erase "$(OUTDIR)\mod_ratelimit.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ratelimit_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ratelimit.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ratelimit.so" /d LONG_NAME="ratelimit_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ratelimit.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ratelimit.pdb" /debug /out:"$(OUTDIR)\mod_ratelimit.so" /implib:"$(OUTDIR)\mod_ratelimit.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ratelimit.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ratelimit.obj" \
      +	"$(INTDIR)\mod_ratelimit.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ratelimit.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_ratelimit.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ratelimit.so"
      +   if exist .\Debug\mod_ratelimit.so.manifest mt.exe -manifest .\Debug\mod_ratelimit.so.manifest -outputresource:.\Debug\mod_ratelimit.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_ratelimit.dep")
      +!INCLUDE "mod_ratelimit.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_ratelimit.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_ratelimit - Win32 Release" || "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_ratelimit - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ratelimit - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ratelimit - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_ratelimit - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_ratelimit.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ratelimit.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_ratelimit.so" /d LONG_NAME="ratelimit_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_ratelimit - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_ratelimit.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ratelimit.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_ratelimit.so" /d LONG_NAME="ratelimit_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_ratelimit.c
      +
      +"$(INTDIR)\mod_ratelimit.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_reflector.c b/modules/filters/mod_reflector.c
      index 18074d1b625..961092d0ea7 100644
      --- a/modules/filters/mod_reflector.c
      +++ b/modules/filters/mod_reflector.c
      @@ -116,14 +116,8 @@ static int reflector_handler(request_rec * r)
                                           APR_BLOCK_READ, HUGE_STRING_LEN);
       
                   if (status != APR_SUCCESS) {
      -                if (status == AP_FILTER_ERROR) {
      -                    apr_brigade_destroy(bbin);
      -                    return status;
      -                }
      -                else {
      -                    apr_brigade_destroy(bbin);
      -                    return HTTP_BAD_REQUEST;
      -                }
      +                apr_brigade_destroy(bbin);
      +                return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
                   }
       
                   for (bucket = APR_BRIGADE_FIRST(bbin);
      @@ -157,10 +151,10 @@ static int reflector_handler(request_rec * r)
                       status = ap_pass_brigade(r->output_filters, bbout);
                       if (status != APR_SUCCESS) {
                           /* no way to know what type of error occurred */
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(01410)
                                    "reflector_handler: ap_pass_brigade returned %i",
                                         status);
      -                    return HTTP_INTERNAL_SERVER_ERROR;
      +                    return AP_FILTER_ERROR;
                       }
       
                   }
      diff --git a/modules/filters/mod_reflector.dep b/modules/filters/mod_reflector.dep
      new file mode 100644
      index 00000000000..dc91ddf5aff
      --- /dev/null
      +++ b/modules/filters/mod_reflector.dep
      @@ -0,0 +1,57 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_reflector.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_reflector.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_reflector.dsp b/modules/filters/mod_reflector.dsp
      index 789d07f47b3..6f284df65b5 100644
      --- a/modules/filters/mod_reflector.dsp
      +++ b/modules/filters/mod_reflector.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="ratelimit_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="ratelimit_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/filters/mod_reflector.mak b/modules/filters/mod_reflector.mak
      new file mode 100644
      index 00000000000..d38b35c13e0
      --- /dev/null
      +++ b/modules/filters/mod_reflector.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_reflector.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_reflector - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_reflector - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_reflector - Win32 Release" && "$(CFG)" != "mod_reflector - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_reflector.mak" CFG="mod_reflector - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_reflector - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_reflector - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reflector - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_reflector.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_reflector.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_reflector.obj"
      +	-@erase "$(INTDIR)\mod_reflector.res"
      +	-@erase "$(INTDIR)\mod_reflector_src.idb"
      +	-@erase "$(INTDIR)\mod_reflector_src.pdb"
      +	-@erase "$(OUTDIR)\mod_reflector.exp"
      +	-@erase "$(OUTDIR)\mod_reflector.lib"
      +	-@erase "$(OUTDIR)\mod_reflector.pdb"
      +	-@erase "$(OUTDIR)\mod_reflector.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_reflector_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_reflector.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_reflector.pdb" /debug /out:"$(OUTDIR)\mod_reflector.so" /implib:"$(OUTDIR)\mod_reflector.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_reflector.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_reflector.obj" \
      +	"$(INTDIR)\mod_reflector.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_reflector.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_reflector.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_reflector.so"
      +   if exist .\Release\mod_reflector.so.manifest mt.exe -manifest .\Release\mod_reflector.so.manifest -outputresource:.\Release\mod_reflector.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_reflector.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_reflector.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_reflector.obj"
      +	-@erase "$(INTDIR)\mod_reflector.res"
      +	-@erase "$(INTDIR)\mod_reflector_src.idb"
      +	-@erase "$(INTDIR)\mod_reflector_src.pdb"
      +	-@erase "$(OUTDIR)\mod_reflector.exp"
      +	-@erase "$(OUTDIR)\mod_reflector.lib"
      +	-@erase "$(OUTDIR)\mod_reflector.pdb"
      +	-@erase "$(OUTDIR)\mod_reflector.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_reflector_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_reflector.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_reflector.pdb" /debug /out:"$(OUTDIR)\mod_reflector.so" /implib:"$(OUTDIR)\mod_reflector.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_reflector.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_reflector.obj" \
      +	"$(INTDIR)\mod_reflector.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_reflector.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_reflector.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_reflector.so"
      +   if exist .\Debug\mod_reflector.so.manifest mt.exe -manifest .\Debug\mod_reflector.so.manifest -outputresource:.\Debug\mod_reflector.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_reflector.dep")
      +!INCLUDE "mod_reflector.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_reflector.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_reflector - Win32 Release" || "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_reflector - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reflector - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reflector - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_reflector - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_reflector.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_reflector - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_reflector.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_reflector.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_reflector.so" /d LONG_NAME="reflector_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_reflector.c
      +
      +"$(INTDIR)\mod_reflector.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_reqtimeout.c b/modules/filters/mod_reqtimeout.c
      index 800bb6b4a97..538e9b1bde9 100644
      --- a/modules/filters/mod_reqtimeout.c
      +++ b/modules/filters/mod_reqtimeout.c
      @@ -44,7 +44,7 @@ typedef struct
           apr_time_t header_rate_factor;
           int body_timeout;       /* timeout for reading the req body in secs */
           int body_max_timeout;   /* max timeout for req body in secs */
      -    int body_min_rate;      /* timeout for reading the req body in secs */
      +    int body_min_rate;      /* min rate for reading req body in bytes/s */
           apr_time_t body_rate_factor;
       } reqtimeout_srv_cfg;
       
      @@ -85,9 +85,12 @@ static void extend_timeout(reqtimeout_con_cfg *ccfg, apr_bucket_brigade *bb)
       }
       
       static apr_status_t check_time_left(reqtimeout_con_cfg *ccfg,
      -                                    apr_time_t *time_left_p)
      +                                    apr_time_t *time_left_p,
      +                                    apr_time_t now)
       {
      -    *time_left_p = ccfg->timeout_at - apr_time_now();
      +    if (!now)
      +        now = apr_time_now();
      +    *time_left_p = ccfg->timeout_at - now;
           if (*time_left_p <= 0)
               return APR_TIMEUP;
       
      @@ -169,20 +172,27 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
                                             apr_off_t readbytes)
       {
           apr_time_t time_left;
      -    apr_time_t now;
      +    apr_time_t now = 0;
           apr_status_t rv;
           apr_interval_time_t saved_sock_timeout = UNSET;
           reqtimeout_con_cfg *ccfg = f->ctx;
       
           if (ccfg->in_keep_alive) {
      -        /* For this read, the normal keep-alive timeout must be used */
      +        /* For this read[_request line()], wait for the first byte using the
      +         * normal keep-alive timeout (hence don't take this expected idle time
      +         * into account to setup the connection expiry below).
      +         */
               ccfg->in_keep_alive = 0;
      -        return ap_get_brigade(f->next, bb, mode, block, readbytes);
      +        rv = ap_get_brigade(f->next, bb, AP_MODE_SPECULATIVE, block, 1);
      +        if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb)) {
      +            return rv;
      +        }
      +        apr_brigade_cleanup(bb);
           }
       
      -    now = apr_time_now();
           if (ccfg->new_timeout > 0) {
               /* set new timeout */
      +        now = apr_time_now();
               ccfg->timeout_at = now + apr_time_from_sec(ccfg->new_timeout);
               ccfg->new_timeout = 0;
               if (ccfg->new_max_timeout > 0) {
      @@ -191,7 +201,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
               }
           }
           else if (ccfg->timeout_at == 0) {
      -        /* no timeout set */
      +        /* no timeout set, or in between requests */
               return ap_get_brigade(f->next, bb, mode, block, readbytes);
           }
       
      @@ -199,7 +209,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
               ccfg->socket = ap_get_conn_socket(f->c);
           }
       
      -    rv = check_time_left(ccfg, &time_left);
      +    rv = check_time_left(ccfg, &time_left, now);
           if (rv != APR_SUCCESS)
               goto out;
       
      @@ -281,7 +291,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
                   if (rv != APR_SUCCESS)
                       break;
       
      -            rv = check_time_left(ccfg, &time_left);
      +            rv = check_time_left(ccfg, &time_left, 0);
                   if (rv != APR_SUCCESS)
                       break;
       
      @@ -295,10 +305,14 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
                   APR_BRIGADE_PREPEND(bb, ccfg->tmpbb);
       
           }
      -    else {
      -        /* mode != AP_MODE_GETLINE */
      +    else { /* mode != AP_MODE_GETLINE */
               rv = ap_get_brigade(f->next, bb, mode, block, readbytes);
      -        if (ccfg->min_rate > 0 && rv == APR_SUCCESS) {
      +        /* Don't extend the timeout in speculative mode, wait for
      +         * the real (relevant) bytes to be asked later, within the
      +         * currently alloted time.
      +         */
      +        if (ccfg->min_rate > 0 && rv == APR_SUCCESS
      +                && mode != AP_MODE_SPECULATIVE) {
                   extend_timeout(ccfg, bb);
               }
           }
      @@ -307,7 +321,7 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
       
       out:
           if (APR_STATUS_IS_TIMEUP(rv)) {
      -        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
      +        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c, APLOGNO(01382)
                             "Request %s read timeout", ccfg->type);
               /*
                * If we allow a normal lingering close, the client may keep this
      @@ -327,6 +341,15 @@ static apr_status_t reqtimeout_filter(ap_filter_t *f,
           return rv;
       }
       
      +static apr_status_t reqtimeout_eor(ap_filter_t *f, apr_bucket_brigade *bb)
      +{
      +    if (!APR_BRIGADE_EMPTY(bb) && AP_BUCKET_IS_EOR(APR_BRIGADE_LAST(bb))) {
      +        reqtimeout_con_cfg *ccfg = f->ctx;
      +        ccfg->timeout_at = 0;
      +    }
      +    return ap_pass_brigade(f->next, bb);
      +}
      +
       static int reqtimeout_init(conn_rec *c)
       {
           reqtimeout_con_cfg *ccfg;
      @@ -340,7 +363,39 @@ static int reqtimeout_init(conn_rec *c)
               return DECLINED;
           }
       
      -    ccfg = apr_pcalloc(c->pool, sizeof(reqtimeout_con_cfg));
      +    ccfg = ap_get_module_config(c->conn_config, &reqtimeout_module);
      +    if (ccfg == NULL) {
      +        ccfg = apr_pcalloc(c->pool, sizeof(reqtimeout_con_cfg));
      +        ap_set_module_config(c->conn_config, &reqtimeout_module, ccfg);
      +        ap_add_output_filter(reqtimeout_filter_name, ccfg, NULL, c);
      +        ap_add_input_filter(reqtimeout_filter_name, ccfg, NULL, c);
      +    }
      +
      +    /* we are not handling the connection, we just do initialization */
      +    return DECLINED;
      +}
      +
      +static void reqtimeout_before_header(request_rec *r, conn_rec *c)
      +{
      +    reqtimeout_srv_cfg *cfg;
      +    reqtimeout_con_cfg *ccfg =
      +        ap_get_module_config(c->conn_config, &reqtimeout_module);
      +
      +    if (ccfg == NULL) {
      +        /* not configured for this connection */
      +        return;
      +    }
      +
      +    cfg = ap_get_module_config(c->base_server->module_config,
      +                               &reqtimeout_module);
      +    AP_DEBUG_ASSERT(cfg != NULL);
      +
      +    /* (Re)set the state for this new request, but ccfg->socket and
      +     * ccfg->tmpbb which have the lifetime of the connection.
      +     */
      +    ccfg->timeout_at = 0;
      +    ccfg->max_timeout_at = 0;
      +    ccfg->in_keep_alive = (c->keepalives > 0);
           ccfg->type = "header";
           if (cfg->header_timeout != UNSET) {
               ccfg->new_timeout     = cfg->header_timeout;
      @@ -354,21 +409,16 @@ static int reqtimeout_init(conn_rec *c)
               ccfg->min_rate        = MRT_DEFAULT_HEADER_MIN_RATE;
               ccfg->rate_factor     = default_header_rate_factor;
           }
      -    ap_set_module_config(c->conn_config, &reqtimeout_module, ccfg);
      -
      -    ap_add_input_filter("reqtimeout", ccfg, NULL, c);
      -    /* we are not handling the connection, we just do initialization */
      -    return DECLINED;
       }
       
      -static int reqtimeout_after_headers(request_rec *r)
      +static int reqtimeout_before_body(request_rec *r)
       {
           reqtimeout_srv_cfg *cfg;
           reqtimeout_con_cfg *ccfg =
               ap_get_module_config(r->connection->conn_config, &reqtimeout_module);
       
      -    if (ccfg == NULL || r->method_number == M_CONNECT) {
      -        /* either disabled for this connection or a CONNECT request */
      +    if (ccfg == NULL) {
      +        /* not configured for this connection */
               return OK;
           }
           cfg = ap_get_module_config(r->connection->base_server->module_config,
      @@ -378,7 +428,11 @@ static int reqtimeout_after_headers(request_rec *r)
           ccfg->timeout_at = 0;
           ccfg->max_timeout_at = 0;
           ccfg->type = "body";
      -    if (cfg->body_timeout != UNSET) {
      +    if (r->method_number == M_CONNECT) {
      +        /* disabled for a CONNECT request */
      +        ccfg->new_timeout     = 0;
      +    }
      +    else if (cfg->body_timeout != UNSET) {
               ccfg->new_timeout     = cfg->body_timeout;
               ccfg->new_max_timeout = cfg->body_max_timeout;
               ccfg->min_rate        = cfg->body_min_rate;
      @@ -393,41 +447,6 @@ static int reqtimeout_after_headers(request_rec *r)
           return OK;
       }
       
      -static int reqtimeout_after_body(request_rec *r)
      -{
      -    reqtimeout_srv_cfg *cfg;
      -    reqtimeout_con_cfg *ccfg =
      -        ap_get_module_config(r->connection->conn_config, &reqtimeout_module);
      -
      -    if (ccfg == NULL) {
      -        /* not configured for this connection */
      -        return OK;
      -    }
      -
      -    cfg = ap_get_module_config(r->connection->base_server->module_config,
      -                               &reqtimeout_module);
      -    AP_DEBUG_ASSERT(cfg != NULL);
      -
      -    ccfg->timeout_at = 0;
      -    ccfg->max_timeout_at = 0;
      -    ccfg->in_keep_alive = 1;
      -    ccfg->type = "header";
      -    if (ccfg->new_timeout != UNSET) {
      -        ccfg->new_timeout     = cfg->header_timeout;
      -        ccfg->new_max_timeout = cfg->header_max_timeout;
      -        ccfg->min_rate        = cfg->header_min_rate;
      -        ccfg->rate_factor     = cfg->header_rate_factor;
      -    }
      -    else {
      -        ccfg->new_timeout     = MRT_DEFAULT_HEADER_TIMEOUT;
      -        ccfg->new_max_timeout = MRT_DEFAULT_HEADER_MAX_TIMEOUT;
      -        ccfg->min_rate        = MRT_DEFAULT_HEADER_MIN_RATE;
      -        ccfg->rate_factor     = default_header_rate_factor;
      -    }
      -
      -    return OK;
      -}
      -
       static void *reqtimeout_create_srv_config(apr_pool_t *p, server_rec *s)
       {
           reqtimeout_srv_cfg *cfg = apr_pcalloc(p, sizeof(reqtimeout_srv_cfg));
      @@ -463,7 +482,8 @@ static void *reqtimeout_merge_srv_config(apr_pool_t *p, void *base_, void *add_)
           return cfg;
       }
       
      -static const char *parse_int(apr_pool_t *p, const char *arg, int *val) {
      +static const char *parse_int(apr_pool_t *p, const char *arg, int *val)
      +{
           char *endptr;
           *val = strtol(arg, &endptr, 10);
       
      @@ -589,6 +609,14 @@ static void reqtimeout_hooks(apr_pool_t *pool)
           ap_register_input_filter(reqtimeout_filter_name, reqtimeout_filter, NULL,
                                    AP_FTYPE_CONNECTION + 8);
       
      +    /*
      +     * We need to pause timeout detection in between requests, for
      +     * speculative and non-blocking reads, so between each outgoing EOR
      +     * and the next pre_read_request call.
      +     */
      +    ap_register_output_filter(reqtimeout_filter_name, reqtimeout_eor, NULL,
      +                              AP_FTYPE_CONNECTION);
      +
           /*
            * mod_reqtimeout needs to be called before ap_process_http_request (which
            * is run at APR_HOOK_REALLY_LAST) but after all other protocol modules.
      @@ -598,10 +626,10 @@ static void reqtimeout_hooks(apr_pool_t *pool)
            */
           ap_hook_process_connection(reqtimeout_init, NULL, NULL, APR_HOOK_LAST);
       
      -    ap_hook_post_read_request(reqtimeout_after_headers, NULL, NULL,
      +    ap_hook_pre_read_request(reqtimeout_before_header, NULL, NULL,
      +                             APR_HOOK_MIDDLE);
      +    ap_hook_post_read_request(reqtimeout_before_body, NULL, NULL,
                                     APR_HOOK_MIDDLE);
      -    ap_hook_log_transaction(reqtimeout_after_body, NULL, NULL,
      -                            APR_HOOK_MIDDLE);
       
       #if MRT_DEFAULT_HEADER_MIN_RATE > 0
           default_header_rate_factor = apr_time_from_sec(1) / MRT_DEFAULT_HEADER_MIN_RATE;
      diff --git a/modules/filters/mod_reqtimeout.dep b/modules/filters/mod_reqtimeout.dep
      new file mode 100644
      index 00000000000..1b7679fe4fd
      --- /dev/null
      +++ b/modules/filters/mod_reqtimeout.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_reqtimeout.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_reqtimeout.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_reqtimeout.mak b/modules/filters/mod_reqtimeout.mak
      new file mode 100644
      index 00000000000..459272e2b56
      --- /dev/null
      +++ b/modules/filters/mod_reqtimeout.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_reqtimeout.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_reqtimeout - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_reqtimeout - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_reqtimeout - Win32 Release" && "$(CFG)" != "mod_reqtimeout - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_reqtimeout.mak" CFG="mod_reqtimeout - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_reqtimeout - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_reqtimeout - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reqtimeout - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_reqtimeout.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_reqtimeout.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_reqtimeout.obj"
      +	-@erase "$(INTDIR)\mod_reqtimeout.res"
      +	-@erase "$(INTDIR)\mod_reqtimeout_src.idb"
      +	-@erase "$(INTDIR)\mod_reqtimeout_src.pdb"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.exp"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.lib"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.pdb"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_reqtimeout_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_reqtimeout.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_reqtimeout.so" /d LONG_NAME="reqtimeout_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_reqtimeout.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_reqtimeout.pdb" /debug /out:"$(OUTDIR)\mod_reqtimeout.so" /implib:"$(OUTDIR)\mod_reqtimeout.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_reqtimeout.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_reqtimeout.obj" \
      +	"$(INTDIR)\mod_reqtimeout.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_reqtimeout.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_reqtimeout.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_reqtimeout.so"
      +   if exist .\Release\mod_reqtimeout.so.manifest mt.exe -manifest .\Release\mod_reqtimeout.so.manifest -outputresource:.\Release\mod_reqtimeout.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_reqtimeout.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_reqtimeout.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_reqtimeout.obj"
      +	-@erase "$(INTDIR)\mod_reqtimeout.res"
      +	-@erase "$(INTDIR)\mod_reqtimeout_src.idb"
      +	-@erase "$(INTDIR)\mod_reqtimeout_src.pdb"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.exp"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.lib"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.pdb"
      +	-@erase "$(OUTDIR)\mod_reqtimeout.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_RL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_reqtimeout_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_reqtimeout.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_reqtimeout.so" /d LONG_NAME="reqtimeout_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_reqtimeout.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_reqtimeout.pdb" /debug /out:"$(OUTDIR)\mod_reqtimeout.so" /implib:"$(OUTDIR)\mod_reqtimeout.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_reqtimeout.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_reqtimeout.obj" \
      +	"$(INTDIR)\mod_reqtimeout.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_reqtimeout.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_reqtimeout.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_reqtimeout.so"
      +   if exist .\Debug\mod_reqtimeout.so.manifest mt.exe -manifest .\Debug\mod_reqtimeout.so.manifest -outputresource:.\Debug\mod_reqtimeout.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_reqtimeout.dep")
      +!INCLUDE "mod_reqtimeout.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_reqtimeout.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_reqtimeout - Win32 Release" || "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_reqtimeout - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reqtimeout - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_reqtimeout - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_reqtimeout - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_reqtimeout.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_reqtimeout.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_reqtimeout.so" /d LONG_NAME="reqtimeout_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_reqtimeout - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_reqtimeout.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_reqtimeout.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_reqtimeout.so" /d LONG_NAME="reqtimeout_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_reqtimeout.c
      +
      +"$(INTDIR)\mod_reqtimeout.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_request.c b/modules/filters/mod_request.c
      index 77842c6f6d1..21db7de36cf 100644
      --- a/modules/filters/mod_request.c
      +++ b/modules/filters/mod_request.c
      @@ -98,7 +98,7 @@ static apr_status_t keep_body_filter(ap_filter_t *f, apr_bucket_brigade *b,
                   if (apr_strtoff(&ctx->remaining, lenp, &endstr, 10)
                       || endstr == lenp || *endstr || ctx->remaining < 0) {
       
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01411)
                                     "Invalid Content-Length");
       
                       ap_remove_input_filter(f);
      @@ -109,7 +109,7 @@ static apr_status_t keep_body_filter(ap_filter_t *f, apr_bucket_brigade *b,
                    * time, stop it here if it is invalid.
                    */
                   if (dconf->keep_body < ctx->remaining) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01412)
                                 "Requested content-length of %" APR_OFF_T_FMT
                                 " is larger than the configured limit"
                                 " of %" APR_OFF_T_FMT, ctx->remaining, dconf->keep_body);
      @@ -136,7 +136,7 @@ static apr_status_t keep_body_filter(ap_filter_t *f, apr_bucket_brigade *b,
                   apr_brigade_cleanup(f->r->kept_body);
                   f->r->kept_body = NULL;
               }
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01413)
                             "Requested content-length of %" APR_OFF_T_FMT
                             " is larger than the configured limit"
                             " of %" APR_OFF_T_FMT, len, ctx->keep_body);
      @@ -178,7 +178,8 @@ typedef struct kept_body_filter_ctx {
        * been removed from the body during storage. We need to change the request
        * from Transfer-Encoding: chunked to an explicit Content-Length.
        */
      -static int kept_body_filter_init(ap_filter_t *f) {
      +static int kept_body_filter_init(ap_filter_t *f)
      +{
           apr_off_t length = 0;
           request_rec *r = f->r;
           apr_bucket_brigade *kept_body = r->kept_body;
      @@ -233,12 +234,12 @@ static apr_status_t kept_body_filter(ap_filter_t *f, apr_bucket_brigade *b,
       
           /* send part of the kept_body */
           if ((rv = apr_brigade_partition(kept_body, ctx->offset, &ec)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01414)
                             "apr_brigade_partition() failed on kept_body at %" APR_OFF_T_FMT, ctx->offset);
               return rv;
           }
           if ((rv = apr_brigade_partition(kept_body, ctx->offset + readbytes, &e2)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01415)
                             "apr_brigade_partition() failed on kept_body at %" APR_OFF_T_FMT, ctx->offset + readbytes);
               return rv;
           }
      @@ -358,7 +359,7 @@ static const char *set_kept_body_size(cmd_parms *cmd, void *dconf,
           char *end = NULL;
       
           if (APR_SUCCESS != apr_strtoff(&(conf->keep_body), arg, &end, 10)
      -            || conf->keep_body < 0 || end) {
      +            || conf->keep_body < 0 || *end) {
               return "KeptBodySize must be a valid size in bytes, or zero.";
           }
           conf->keep_body_set = 1;
      diff --git a/modules/filters/mod_request.dep b/modules/filters/mod_request.dep
      new file mode 100644
      index 00000000000..ae332a7d582
      --- /dev/null
      +++ b/modules/filters/mod_request.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_request.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_request.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_request.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_request.mak b/modules/filters/mod_request.mak
      new file mode 100644
      index 00000000000..7ceb603beef
      --- /dev/null
      +++ b/modules/filters/mod_request.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_request.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_request - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_request - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_request - Win32 Release" && "$(CFG)" != "mod_request - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_request.mak" CFG="mod_request - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_request - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_request - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_request - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_request.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_request.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_request.obj"
      +	-@erase "$(INTDIR)\mod_request.res"
      +	-@erase "$(INTDIR)\mod_request_src.idb"
      +	-@erase "$(INTDIR)\mod_request_src.pdb"
      +	-@erase "$(OUTDIR)\mod_request.exp"
      +	-@erase "$(OUTDIR)\mod_request.lib"
      +	-@erase "$(OUTDIR)\mod_request.pdb"
      +	-@erase "$(OUTDIR)\mod_request.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_request_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_request.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_request.so" /d LONG_NAME="request_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_request.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_request.pdb" /debug /out:"$(OUTDIR)\mod_request.so" /implib:"$(OUTDIR)\mod_request.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_request.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_request.obj" \
      +	"$(INTDIR)\mod_request.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_request.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_request.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_request.so"
      +   if exist .\Release\mod_request.so.manifest mt.exe -manifest .\Release\mod_request.so.manifest -outputresource:.\Release\mod_request.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_request - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_request.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_request.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_request.obj"
      +	-@erase "$(INTDIR)\mod_request.res"
      +	-@erase "$(INTDIR)\mod_request_src.idb"
      +	-@erase "$(INTDIR)\mod_request_src.pdb"
      +	-@erase "$(OUTDIR)\mod_request.exp"
      +	-@erase "$(OUTDIR)\mod_request.lib"
      +	-@erase "$(OUTDIR)\mod_request.pdb"
      +	-@erase "$(OUTDIR)\mod_request.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_request_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_request.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_request.so" /d LONG_NAME="request_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_request.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_request.pdb" /debug /out:"$(OUTDIR)\mod_request.so" /implib:"$(OUTDIR)\mod_request.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_request.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_request.obj" \
      +	"$(INTDIR)\mod_request.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_request.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_request.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_request.so"
      +   if exist .\Debug\mod_request.so.manifest mt.exe -manifest .\Debug\mod_request.so.manifest -outputresource:.\Debug\mod_request.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_request.dep")
      +!INCLUDE "mod_request.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_request.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_request - Win32 Release" || "$(CFG)" == "mod_request - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_request - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_request - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_request - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_request - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_request - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_request - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_request - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_request.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_request.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_request.so" /d LONG_NAME="request_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_request - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_request.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_request.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_request.so" /d LONG_NAME="request_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_request.c
      +
      +"$(INTDIR)\mod_request.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_sed.c b/modules/filters/mod_sed.c
      index dd776c48786..346c210349d 100644
      --- a/modules/filters/mod_sed.c
      +++ b/modules/filters/mod_sed.c
      @@ -64,7 +64,7 @@ module AP_MODULE_DECLARE_DATA sed_module;
       static apr_status_t log_sed_errf(void *data, const char *error)
       {
           request_rec *r = (request_rec *) data;
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", error);
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02998) "%s", error);
           return APR_SUCCESS;
       }
       
      @@ -312,7 +312,7 @@ static apr_status_t sed_response_filter(ap_filter_t *f,
            * evaluation is allocated on request's pool so it will be cleared once
            * request is over.
            *
      -     * If flush bucket is found then append the the flush bucket to ctx->bb
      +     * If flush bucket is found then append the flush bucket to ctx->bb
            * and pass it to next filter. There may be some data which will still be
            * in sed's internal buffer which can't be flushed until new line
            * character is arrived.
      @@ -424,7 +424,7 @@ static apr_status_t sed_request_filter(ap_filter_t *f,
            * the buckets in bbinp and read the data from buckets and invoke
            * sed_eval_buffer on the data. libsed will generate its output using
            * sed_write_output which will add data in ctx->bb. Do it until it have
      -     * atleast one bucket bucket in ctx->bb. At the end of data eos bucket
      +     * atleast one bucket in ctx->bb. At the end of data eos bucket
            * should be there.
            *
            * Once eos bucket is seen, then invoke sed_finalize_eval to clear the
      diff --git a/modules/filters/mod_sed.dep b/modules/filters/mod_sed.dep
      new file mode 100644
      index 00000000000..6f1ef2b82e1
      --- /dev/null
      +++ b/modules/filters/mod_sed.dep
      @@ -0,0 +1,109 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_sed.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_sed.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\libsed.h"\
      +	
      +
      +.\regexp.c : \
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\libsed.h"\
      +	".\regexp.h"\
      +	".\sed.h"\
      +	
      +
      +.\sed0.c : \
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\libsed.h"\
      +	".\regexp.h"\
      +	".\sed.h"\
      +	
      +
      +.\sed1.c : \
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\libsed.h"\
      +	".\regexp.h"\
      +	".\sed.h"\
      +	
      diff --git a/modules/filters/mod_sed.dsp b/modules/filters/mod_sed.dsp
      index 800dfa10e72..5b1d642c532 100644
      --- a/modules/filters/mod_sed.dsp
      +++ b/modules/filters/mod_sed.dsp
      @@ -11,7 +11,7 @@ CFG=mod_sed - Win32 Debug
       !MESSAGE NMAKE /f "mod_sed.mak".
       !MESSAGE 
       !MESSAGE You can specify a configuration when running NMAKE
      -!MESSAGE by defining the macro CFG on the command line. For substitute:
      +!MESSAGE by defining the macro CFG on the command line. For example:
       !MESSAGE 
       !MESSAGE NMAKE /f "mod_sed.mak" CFG="mod_sed - Win32 Debug"
       !MESSAGE 
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="substitute_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="substitute_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/filters/mod_sed.mak b/modules/filters/mod_sed.mak
      new file mode 100644
      index 00000000000..c997b2376de
      --- /dev/null
      +++ b/modules/filters/mod_sed.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_sed.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_sed - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_sed - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_sed - Win32 Release" && "$(CFG)" != "mod_sed - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_sed.mak" CFG="mod_sed - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_sed - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_sed - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_sed - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_sed.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_sed.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_sed.obj"
      +	-@erase "$(INTDIR)\mod_sed.res"
      +	-@erase "$(INTDIR)\mod_sed_src.idb"
      +	-@erase "$(INTDIR)\mod_sed_src.pdb"
      +	-@erase "$(INTDIR)\regexp.obj"
      +	-@erase "$(INTDIR)\sed0.obj"
      +	-@erase "$(INTDIR)\sed1.obj"
      +	-@erase "$(OUTDIR)\mod_sed.exp"
      +	-@erase "$(OUTDIR)\mod_sed.lib"
      +	-@erase "$(OUTDIR)\mod_sed.pdb"
      +	-@erase "$(OUTDIR)\mod_sed.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_sed_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_sed.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_sed.pdb" /debug /out:"$(OUTDIR)\mod_sed.so" /implib:"$(OUTDIR)\mod_sed.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_sed.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_sed.obj" \
      +	"$(INTDIR)\regexp.obj" \
      +	"$(INTDIR)\sed0.obj" \
      +	"$(INTDIR)\sed1.obj" \
      +	"$(INTDIR)\mod_sed.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_sed.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_sed.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_sed.so"
      +   if exist .\Release\mod_sed.so.manifest mt.exe -manifest .\Release\mod_sed.so.manifest -outputresource:.\Release\mod_sed.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_sed.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_sed.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_sed.obj"
      +	-@erase "$(INTDIR)\mod_sed.res"
      +	-@erase "$(INTDIR)\mod_sed_src.idb"
      +	-@erase "$(INTDIR)\mod_sed_src.pdb"
      +	-@erase "$(INTDIR)\regexp.obj"
      +	-@erase "$(INTDIR)\sed0.obj"
      +	-@erase "$(INTDIR)\sed1.obj"
      +	-@erase "$(OUTDIR)\mod_sed.exp"
      +	-@erase "$(OUTDIR)\mod_sed.lib"
      +	-@erase "$(OUTDIR)\mod_sed.pdb"
      +	-@erase "$(OUTDIR)\mod_sed.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_sed_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_sed.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_sed.pdb" /debug /out:"$(OUTDIR)\mod_sed.so" /implib:"$(OUTDIR)\mod_sed.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_sed.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_sed.obj" \
      +	"$(INTDIR)\regexp.obj" \
      +	"$(INTDIR)\sed0.obj" \
      +	"$(INTDIR)\sed1.obj" \
      +	"$(INTDIR)\mod_sed.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_sed.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_sed.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_sed.so"
      +   if exist .\Debug\mod_sed.so.manifest mt.exe -manifest .\Debug\mod_sed.so.manifest -outputresource:.\Debug\mod_sed.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_sed.dep")
      +!INCLUDE "mod_sed.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_sed.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_sed - Win32 Release" || "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_sed - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_sed - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_sed - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_sed - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_sed.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_sed - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_sed.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_sed.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_sed.so" /d LONG_NAME="sed_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_sed.c
      +
      +"$(INTDIR)\mod_sed.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\regexp.c
      +
      +"$(INTDIR)\regexp.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\sed0.c
      +
      +"$(INTDIR)\sed0.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\sed1.c
      +
      +"$(INTDIR)\sed1.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_substitute.c b/modules/filters/mod_substitute.c
      index 3fd0ad06926..99e82933ba4 100644
      --- a/modules/filters/mod_substitute.c
      +++ b/modules/filters/mod_substitute.c
      @@ -33,6 +33,13 @@
       #define APR_WANT_STRFUNC
       #include "apr_want.h"
       
      +/*
      + * We want to limit the memory usage in a way that is predictable.
      + * Therefore we limit the resulting length of the line.
      + * This is the default value.
      + */
      +#define AP_SUBST_MAX_LINE_LENGTH (1024*1024)
      +
       static const char substitute_filter_name[] = "SUBSTITUTE";
       
       module AP_MODULE_DECLARE_DATA substitute_module;
      @@ -48,6 +55,9 @@ typedef struct subst_pattern_t {
       
       typedef struct {
           apr_array_header_t *patterns;
      +    apr_size_t max_line_length;
      +    int max_line_length_set;
      +    int inherit_before;
       } subst_dir_conf;
       
       typedef struct {
      @@ -61,30 +71,47 @@ typedef struct {
       static void *create_substitute_dcfg(apr_pool_t *p, char *d)
       {
           subst_dir_conf *dcfg =
      -    (subst_dir_conf *) apr_pcalloc(p, sizeof(subst_dir_conf));
      +        (subst_dir_conf *) apr_palloc(p, sizeof(subst_dir_conf));
       
           dcfg->patterns = apr_array_make(p, 10, sizeof(subst_pattern_t));
      +    dcfg->max_line_length = AP_SUBST_MAX_LINE_LENGTH;
      +    dcfg->max_line_length_set = 0;
      +    dcfg->inherit_before = -1;
           return dcfg;
       }
       
       static void *merge_substitute_dcfg(apr_pool_t *p, void *basev, void *overv)
       {
           subst_dir_conf *a =
      -    (subst_dir_conf *) apr_pcalloc(p, sizeof(subst_dir_conf));
      +        (subst_dir_conf *) apr_palloc(p, sizeof(subst_dir_conf));
           subst_dir_conf *base = (subst_dir_conf *) basev;
           subst_dir_conf *over = (subst_dir_conf *) overv;
       
      -    a->patterns = apr_array_append(p, over->patterns,
      -                                                  base->patterns);
      +    a->inherit_before = (over->inherit_before != -1)
      +                            ? over->inherit_before
      +                            : base->inherit_before;
      +    /* SubstituteInheritBefore wasn't the default behavior until 2.5.x,
      +     * and may be re-disabled as desired; the original default behavior
      +     * was to apply inherited subst patterns after locally scoped patterns.
      +     * In later 2.2 and 2.4 versions, SubstituteInheritBefore may be toggled
      +     * 'on' to follow the corrected/expected behavior, without violating POLS.
      +     */
      +    if (a->inherit_before == 1) {
      +        a->patterns = apr_array_append(p, base->patterns,
      +                                          over->patterns);
      +    }
      +    else {
      +        a->patterns = apr_array_append(p, over->patterns,
      +                                          base->patterns);
      +    }
      +    a->max_line_length = over->max_line_length_set ?
      +                             over->max_line_length : base->max_line_length;
      +    a->max_line_length_set = over->max_line_length_set
      +                           | base->max_line_length_set;
           return a;
       }
       
       #define AP_MAX_BUCKETS 1000
      -/*
      - * We want to limit the memory usage in a way that is predictable. Therefore
      - * we limit the resulting length of the line to this value.
      - */
      -#define AP_SUBST_MAX_LINE_LENGTH (128*MAX_STRING_LEN)
       
       #define SEDRMPATBCKT(b, offset, tmp_b, patlen) do {  \
           apr_bucket_split(b, offset);                     \
      @@ -143,9 +170,9 @@ static apr_status_t do_pattmatch(ap_filter_t *f, apr_bucket *inb,
                           const char *repl;
                           /*
                            * space_left counts how many bytes we have left until the
      -                     * line length reaches AP_SUBST_MAX_LINE_LENGTH.
      +                     * line length reaches max_line_length.
                            */
      -                    apr_size_t space_left = AP_SUBST_MAX_LINE_LENGTH;
      +                    apr_size_t space_left = cfg->max_line_length;
                           apr_size_t repl_len = strlen(script->replacement);
                           while ((repl = apr_strmatch(script->pattern, buff, bytes)))
                           {
      @@ -161,7 +188,7 @@ static apr_status_t do_pattmatch(ap_filter_t *f, apr_bucket *inb,
                                    * are constanting allocing space and copying
                                    * strings.
                                    */
      -                            if (vb.strlen + len + repl_len > AP_SUBST_MAX_LINE_LENGTH)
      +                            if (vb.strlen + len + repl_len > cfg->max_line_length)
                                       return APR_ENOMEM;
                                   ap_varbuf_strmemcat(&vb, buff, len);
                                   ap_varbuf_strmemcat(&vb, script->replacement, repl_len);
      @@ -228,19 +255,25 @@ static apr_status_t do_pattmatch(ap_filter_t *f, apr_bucket *inb,
                           int left = bytes;
                           const char *pos = buff;
                           char *repl;
      -                    apr_size_t space_left = AP_SUBST_MAX_LINE_LENGTH;
      +                    apr_size_t space_left = cfg->max_line_length;
                           while (!ap_regexec_len(script->regexp, pos, left,
                                              AP_MAX_REG_MATCH, regm, 0)) {
                               apr_status_t rv;
                               have_match = 1;
                               if (script->flatten && !force_quick) {
      +                            /* check remaining buffer size */
      +                            /* Note that the last param in ap_varbuf_regsub below
      +                             * must stay positive. If it gets 0, it would mean
      +                             * unlimited space available. */
      +                            if (vb.strlen + regm[0].rm_so >= cfg->max_line_length)
      +                                return APR_ENOMEM;
                                   /* copy bytes before the match */
                                   if (regm[0].rm_so > 0)
                                       ap_varbuf_strmemcat(&vb, pos, regm[0].rm_so);
      -                            /* add replacement string */
      +                            /* add replacement string, last argument is unsigned! */
                                   rv = ap_varbuf_regsub(&vb, script->replacement, pos,
                                                         AP_MAX_REG_MATCH, regm,
      -                                                  AP_SUBST_MAX_LINE_LENGTH - vb.strlen);
      +                                                  cfg->max_line_length - vb.strlen);
                                   if (rv != APR_SUCCESS)
                                       return rv;
                               }
      @@ -309,6 +342,9 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           apr_bucket *tmp_b;
           apr_bucket_brigade *tmp_bb = NULL;
           apr_status_t rv;
      +    subst_dir_conf *cfg =
      +    (subst_dir_conf *) ap_get_module_config(f->r->per_dir_config,
      +                                             &substitute_module);
       
           substitute_module_ctx *ctx = f->ctx;
       
      @@ -381,7 +417,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                                                 &fbytes, ctx->tpool);
                       if (rv != APR_SUCCESS)
                           goto err;
      -                if (fbytes > AP_SUBST_MAX_LINE_LENGTH) {
      +                if (fbytes > cfg->max_line_length) {
                           rv = APR_ENOMEM;
                           goto err;
                       }
      @@ -391,8 +427,8 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                       if (rv != APR_SUCCESS)
                           goto err;
                       APR_BRIGADE_CONCAT(ctx->passbb, ctx->pattbb);
      +                apr_brigade_cleanup(ctx->linebb);
                   }
      -            apr_brigade_cleanup(ctx->linebb);
                   APR_BUCKET_REMOVE(b);
                   APR_BRIGADE_INSERT_TAIL(ctx->passbb, b);
               }
      @@ -447,7 +483,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
                                                             &fbytes, ctx->tpool);
                                   if (rv != APR_SUCCESS)
                                       goto err;
      -                            if (fbytes > AP_SUBST_MAX_LINE_LENGTH) {
      +                            if (fbytes > cfg->max_line_length) {
                                       /* Avoid pflattening further lines, we will
                                        * abort later on anyway.
                                        */
      @@ -531,7 +567,7 @@ static apr_status_t substitute_filter(ap_filter_t *f, apr_bucket_brigade *bb)
           return APR_SUCCESS;
       err:
           if (rv == APR_ENOMEM)
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, "Line too long, URI %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01328) "Line too long, URI %s",
                             f->r->uri);
           apr_pool_clear(ctx->tpool);
           return rv;
      @@ -627,6 +663,44 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
           return NULL;
       }
       
      +#define KBYTE         1024
      +#define MBYTE         1048576
      +#define GBYTE         1073741824
      +
      +static const char *set_max_line_length(cmd_parms *cmd, void *cfg, const char *arg)
      +{
      +    subst_dir_conf *dcfg = (subst_dir_conf *)cfg;
      +    apr_off_t max;
      +    char *end;
      +    apr_status_t rv;
      +
      +    rv = apr_strtoff(&max, arg, &end, 10);
      +    if (rv == APR_SUCCESS) {
      +        if ((*end == 'K' || *end == 'k') && !end[1]) {
      +            max *= KBYTE;
      +        }
      +        else if ((*end == 'M' || *end == 'm') && !end[1]) {
      +            max *= MBYTE;
      +        }
      +        else if ((*end == 'G' || *end == 'g') && !end[1]) {
      +            max *= GBYTE;
      +        }
      +        else if (*end && /* neither empty nor [Bb] */
      +                 ((*end != 'B' && *end != 'b') || end[1])) {
      +            rv = APR_EGENERAL;
      +        }
      +    }
      +
      +    if (rv != APR_SUCCESS || max < 0)
      +    {
      +        return "SubstituteMaxLineLength must be a non-negative integer optionally "
      +               "suffixed with 'b', 'k', 'm' or 'g'.";
      +    }
      +    dcfg->max_line_length = (apr_size_t)max;
      +    dcfg->max_line_length_set = 1;
      +    return NULL;
      +}
      +
       #define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
       static void register_hooks(apr_pool_t *pool)
       {
      @@ -635,8 +709,13 @@ static void register_hooks(apr_pool_t *pool)
       }
       
       static const command_rec substitute_cmds[] = {
      -    AP_INIT_TAKE1("Substitute", set_pattern, NULL, OR_ALL,
      +    AP_INIT_TAKE1("Substitute", set_pattern, NULL, OR_FILEINFO,
                         "Pattern to filter the response content (s/foo/bar/[inf])"),
      +    AP_INIT_TAKE1("SubstituteMaxLineLength", set_max_line_length, NULL, OR_FILEINFO,
      +                  "Maximum line length"),
      +    AP_INIT_FLAG("SubstituteInheritBefore", ap_set_flag_slot,
      +                 (void *)APR_OFFSETOF(subst_dir_conf, inherit_before), OR_FILEINFO,
      +                 "Apply inherited patterns before those of the current context"),
           {NULL}
       };
       
      diff --git a/modules/filters/mod_substitute.dep b/modules/filters/mod_substitute.dep
      new file mode 100644
      index 00000000000..b501b34a276
      --- /dev/null
      +++ b/modules/filters/mod_substitute.dep
      @@ -0,0 +1,53 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_substitute.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_substitute.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/filters/mod_substitute.dsp b/modules/filters/mod_substitute.dsp
      index def4157ee58..b0bd34fa5f9 100644
      --- a/modules/filters/mod_substitute.dsp
      +++ b/modules/filters/mod_substitute.dsp
      @@ -11,7 +11,7 @@ CFG=mod_substitute - Win32 Debug
       !MESSAGE NMAKE /f "mod_substitute.mak".
       !MESSAGE 
       !MESSAGE You can specify a configuration when running NMAKE
      -!MESSAGE by defining the macro CFG on the command line. For substitute:
      +!MESSAGE by defining the macro CFG on the command line. For example:
       !MESSAGE 
       !MESSAGE NMAKE /f "mod_substitute.mak" CFG="mod_substitute - Win32 Debug"
       !MESSAGE 
      diff --git a/modules/filters/mod_substitute.mak b/modules/filters/mod_substitute.mak
      new file mode 100644
      index 00000000000..f1538e826cd
      --- /dev/null
      +++ b/modules/filters/mod_substitute.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_substitute.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_substitute - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to mod_substitute - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_substitute - Win32 Release" && "$(CFG)" != "mod_substitute - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_substitute.mak" CFG="mod_substitute - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_substitute - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_substitute - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_substitute - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_substitute.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_substitute.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_substitute.obj"
      +	-@erase "$(INTDIR)\mod_substitute.res"
      +	-@erase "$(INTDIR)\mod_substitute_src.idb"
      +	-@erase "$(INTDIR)\mod_substitute_src.pdb"
      +	-@erase "$(OUTDIR)\mod_substitute.exp"
      +	-@erase "$(OUTDIR)\mod_substitute.lib"
      +	-@erase "$(OUTDIR)\mod_substitute.pdb"
      +	-@erase "$(OUTDIR)\mod_substitute.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_substitute_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_substitute.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_substitute.so" /d LONG_NAME="substitute_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_substitute.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_substitute.pdb" /debug /out:"$(OUTDIR)\mod_substitute.so" /implib:"$(OUTDIR)\mod_substitute.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_substitute.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_substitute.obj" \
      +	"$(INTDIR)\mod_substitute.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_substitute.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_substitute.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_substitute.so"
      +   if exist .\Release\mod_substitute.so.manifest mt.exe -manifest .\Release\mod_substitute.so.manifest -outputresource:.\Release\mod_substitute.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_substitute.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_substitute.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_substitute.obj"
      +	-@erase "$(INTDIR)\mod_substitute.res"
      +	-@erase "$(INTDIR)\mod_substitute_src.idb"
      +	-@erase "$(INTDIR)\mod_substitute_src.pdb"
      +	-@erase "$(OUTDIR)\mod_substitute.exp"
      +	-@erase "$(OUTDIR)\mod_substitute.lib"
      +	-@erase "$(OUTDIR)\mod_substitute.pdb"
      +	-@erase "$(OUTDIR)\mod_substitute.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_substitute_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL" 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_substitute.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_substitute.so" /d LONG_NAME="substitute_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_substitute.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_substitute.pdb" /debug /out:"$(OUTDIR)\mod_substitute.so" /implib:"$(OUTDIR)\mod_substitute.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_substitute.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_substitute.obj" \
      +	"$(INTDIR)\mod_substitute.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_substitute.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_substitute.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_substitute.so"
      +   if exist .\Debug\mod_substitute.so.manifest mt.exe -manifest .\Debug\mod_substitute.so.manifest -outputresource:.\Debug\mod_substitute.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_substitute.dep")
      +!INCLUDE "mod_substitute.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_substitute.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_substitute - Win32 Release" || "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_substitute - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_substitute - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_substitute - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_substitute - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_substitute.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_substitute.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_substitute.so" /d LONG_NAME="substitute_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_substitute - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_substitute.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_substitute.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_substitute.so" /d LONG_NAME="substitute_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_substitute.c
      +
      +"$(INTDIR)\mod_substitute.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c
      index 31d29956f18..7b34c717af9 100644
      --- a/modules/filters/mod_xml2enc.c
      +++ b/modules/filters/mod_xml2enc.c
      @@ -50,6 +50,11 @@ module AP_MODULE_DECLARE_DATA xml2enc_module;
       #define HAVE_ENCODING(enc) \
               (((enc)!=XML_CHAR_ENCODING_NONE)&&((enc)!=XML_CHAR_ENCODING_ERROR))
       
      +/*
      + * XXX: Check all those ap_assert()s ans replace those that should not happen
      + * XXX: with AP_DEBUG_ASSERT and those that may happen with proper error
      + * XXX: handling.
      + */
       typedef struct {
           xmlCharEncoding xml2enc;
           char* buf;
      @@ -96,7 +101,7 @@ static apr_status_t xml2enc_filter(request_rec* r, const char* enc,
           }
           else {
               rv = APR_EGENERAL;
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01426)
                             "xml2enc: bad mode %x", mode);
           }
           if (rv == APR_SUCCESS) {
      @@ -110,7 +115,7 @@ static apr_status_t xml2enc_filter(request_rec* r, const char* enc,
               ap_add_output_filter("xml2enc", ctx, r, r->connection);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01427)
                             "xml2enc: Charset %s not supported.", enc) ;
           }
           return rv;
      @@ -122,7 +127,7 @@ static void fix_skipto(request_rec* r, xml2ctx* ctx)
       {
           apr_status_t rv;
           xml2cfg* cfg = ap_get_module_config(r->per_dir_config, &xml2enc_module);
      -    if ((cfg->skipto != NULL) && (ctx->flags | ENC_SKIPTO)) {
      +    if ((cfg->skipto != NULL) && (ctx->flags & ENC_SKIPTO)) {
               int found = 0;
               char* p = ap_strchr(ctx->buf, '<');
               tattr* starts = (tattr*) cfg->skipto->elts;
      @@ -135,14 +140,14 @@ static void fix_skipto(request_rec* r, xml2ctx* ctx)
                           apr_bucket* bstart;
                           rv = apr_brigade_partition(ctx->bbsave, (p-ctx->buf),
                                                      &bstart);
      +                    ap_assert(rv == APR_SUCCESS);
                           while (b = APR_BRIGADE_FIRST(ctx->bbsave), b != bstart) {
      -                        APR_BUCKET_REMOVE(b);
      -                        apr_bucket_destroy(b);
      +                        apr_bucket_delete(b);
                           }
                           ctx->bytes -= (p-ctx->buf);
                           ctx->buf = p ;
                           found = 1;
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01428)
                                         "Skipped to first <%s> element",
                                         starts[i].val) ;
                           break;
      @@ -151,7 +156,7 @@ static void fix_skipto(request_rec* r, xml2ctx* ctx)
                   p = ap_strchr(p+1, '<');
               }
               if (p == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01429)
                                 "Failed to find start of recognised HTML!");
               }
           }
      @@ -168,7 +173,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
           const char* ctype = r->content_type;
       
           if (ctype) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01430)
                             "Content-Type is %s", ctype) ;
       
               /* If we've got it in the HTTP headers, there's nothing to do */
      @@ -176,7 +181,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
                   p += 8 ;
                   if (ctx->encoding = apr_pstrndup(r->pool, p, strcspn(p, " ;") ),
                       ctx->encoding) {
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01431)
                                     "Got charset %s from HTTP headers", ctx->encoding) ;
                       ctx->xml2enc = xmlParseCharEncoding(ctx->encoding);
                   }
      @@ -188,7 +193,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
               ctx->xml2enc = xmlDetectCharEncoding((const xmlChar*)ctx->buf,
                                                    ctx->bytes); 
               if (HAVE_ENCODING(ctx->xml2enc)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01432)
                                 "Got charset from XML rules.") ;
                   ctx->encoding = xmlGetCharEncodingName(ctx->xml2enc);
               }
      @@ -199,7 +204,9 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
           if (ap_regexec(seek_meta_ctype, ctx->buf, 1, match, 0) == 0 ) {
               /* get markers on the start and end of the match */
               rv = apr_brigade_partition(ctx->bbsave, match[0].rm_eo, &cute);
      +        ap_assert(rv == APR_SUCCESS);
               rv = apr_brigade_partition(ctx->bbsave, match[0].rm_so, &cutb);
      +        ap_assert(rv == APR_SUCCESS);
               /* now set length of useful buf for start-of-data hooks */
               ctx->bytes = match[0].rm_so;
               if (ctx->encoding == NULL) {
      @@ -211,7 +218,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
                           ctx->encoding) {
                           ctx->xml2enc = xmlParseCharEncoding(ctx->encoding);
                           if (HAVE_ENCODING(ctx->xml2enc))
      -                        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01433)
                                             "Got charset %s from HTML META", ctx->encoding) ;
                       }
                   }
      @@ -220,8 +227,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
               /* cut out the <meta> we're invalidating */
               while (cutb != cute) {
                   b = APR_BUCKET_NEXT(cutb);
      -            APR_BUCKET_REMOVE(cutb);
      -            apr_bucket_destroy(cutb);
      +            apr_bucket_delete(cutb);
                   cutb = b;
               }
               /* and leave a string */
      @@ -241,14 +247,14 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
                   ctx->encoding = cfg->default_charset?cfg->default_charset:"ISO-8859-1";
               }
               /* Unsupported charset. Can we get (iconv) support through apr_xlate? */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01434)
                             "Charset %s not supported by libxml2; trying apr_xlate",
                             ctx->encoding);
               if (apr_xlate_open(&ctx->convset, "UTF-8", ctx->encoding, r->pool)
                   == APR_SUCCESS) {
                   ctx->xml2enc = XML_CHAR_ENCODING_UTF8 ;
               } else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01435)
                                 "Charset %s not supported.  Consider aliasing it?",
                                 ctx->encoding) ;
               }
      @@ -256,7 +262,7 @@ static void sniff_encoding(request_rec* r, xml2ctx* ctx)
       
           if (!HAVE_ENCODING(ctx->xml2enc)) {
               /* Use configuration default as a last resort */
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01436)
                         "No usable charset information; using configuration default");
               ctx->xml2enc = (cfg->default_encoding == XML_CHAR_ENCODING_NONE)
                               ? XML_CHAR_ENCODING_8859_1 : cfg->default_encoding ;
      @@ -329,7 +335,7 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
               /* Turn all this off when post-processing */
       
               /* if we don't have enough data to sniff but more's to come, wait */
      -        rv = apr_brigade_length(ctx->bbsave, 0, &ctx->bblen);
      +        apr_brigade_length(ctx->bbsave, 0, &ctx->bblen);
               if ((ctx->bblen < BUF_MIN) && (ctx->bblen != -1)) {
                   APR_BRIGADE_DO(b, ctx->bbsave) {
                       if (APR_BUCKET_IS_EOS(b)) {
      @@ -340,7 +346,8 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                   if (!(ctx->flags & ENC_SEEN_EOS)) {
                       /* not enough data to sniff.  Wait for more */
                       APR_BRIGADE_DO(b, ctx->bbsave) {
      -                    apr_bucket_setaside(b, f->r->pool);
      +                    rv = apr_bucket_setaside(b, f->r->pool);
      +                    ap_assert(rv == APR_SUCCESS);
                       }
                       return APR_SUCCESS;
                   }
      @@ -353,6 +360,7 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
               ctx->buf = apr_palloc(f->r->pool, (apr_size_t)(ctx->bblen+1));
               ctx->bytes = (apr_size_t)ctx->bblen;
               rv = apr_brigade_flatten(ctx->bbsave, ctx->buf, &ctx->bytes);
      +        ap_assert(rv == APR_SUCCESS);
               ctx->buf[ctx->bytes] = 0;
               sniff_encoding(f->r, ctx);
       
      @@ -360,6 +368,9 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
               /* nah, we only have one action here - call it inline */
               fix_skipto(f->r, ctx);
       
      +        /* we might change the Content-Length, so let's force its re-calculation */
      +        apr_table_unset(f->r->headers_out, "Content-Length");
      +
               /* consume the data we just sniffed */
               /* we need to omit any <meta> we just invalidated */
               ctx->flags |= ENC_INITIALISED;
      @@ -382,13 +393,14 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
           while (b = APR_BRIGADE_FIRST(bb), b != APR_BRIGADE_SENTINEL(bb)) {
               ctx->bytes = 0;
               if (APR_BUCKET_IS_METADATA(b)) {
      +            APR_BUCKET_REMOVE(b);
                   if (APR_BUCKET_IS_EOS(b)) {
                       /* send remaining data */
      +                APR_BRIGADE_INSERT_TAIL(ctx->bbnext, b);
                       return ap_fflush(f->next, ctx->bbnext);
                   } else if (APR_BUCKET_IS_FLUSH(b)) {
                       ap_fflush(f->next, ctx->bbnext);
                   }
      -            APR_BUCKET_REMOVE(b);
                   apr_bucket_destroy(b);
               }
               else {        /* data bucket */
      @@ -400,29 +412,30 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                       buf = fixbuf;
                       bytes = BUFLEN;
                       rv = apr_brigade_flatten(bb, buf, &bytes);
      +                ap_assert(rv == APR_SUCCESS);
                       if (bytes == insz) {
                           /* this is only what we've already tried to convert.
                            * The brigade is exhausted.
                            * Save remaining data for next time round
                            */
                 
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01437)
                                         "xml2enc: Setting aside %" APR_SIZE_T_FMT
                                         " unconverted bytes", bytes);
                           rv = ap_fflush(f->next, ctx->bbnext);
                           APR_BRIGADE_CONCAT(ctx->bbsave, bb);
                           APR_BRIGADE_DO(b, ctx->bbsave) {
      -                        apr_bucket_setaside(b, f->r->pool);
      +                        ap_assert(apr_bucket_setaside(b, f->r->pool)
      +                                  == APR_SUCCESS);
                           }
                           return rv;
                       }
                       /* remove the data we've just read */
                       rv = apr_brigade_partition(bb, bytes, &bstart);
                       while (b = APR_BRIGADE_FIRST(bb), b != bstart) {
      -                    APR_BUCKET_REMOVE(b);
      -                    apr_bucket_destroy(b);
      +                    apr_bucket_delete(b);
                       }
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01438)
                                     "xml2enc: consuming %" APR_SIZE_T_FMT
                                     " bytes flattened", bytes);
                   }
      @@ -431,7 +444,7 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                                            APR_BLOCK_READ);
                       APR_BUCKET_REMOVE(b);
                       bdestroy = b;  /* can't destroy until finished with the data */
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01439)
                                     "xml2enc: consuming %" APR_SIZE_T_FMT
                                     " bytes from bucket", bytes);
                   }
      @@ -441,6 +454,7 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                       xml2enc_run_preprocess(f, &buf, &bytes);
                       consumed = insz = bytes;
                       while (insz > 0) {
      +                    apr_status_t rv2;
                           if (ctx->bytes == ctx->bblen) {
                               /* nothing was converted last time!
                                * break out of this loop! 
      @@ -448,7 +462,7 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                               b = apr_bucket_transient_create(buf+(bytes - insz), insz,
                                                               bb->bucket_alloc);
                               APR_BRIGADE_INSERT_HEAD(bb, b);
      -                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01440)
                                             "xml2enc: reinserting %" APR_SIZE_T_FMT
                                             " unconsumed bytes from bucket", insz);
                               break;
      @@ -456,25 +470,30 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                           ctx->bytes = (apr_size_t)ctx->bblen;
                           rv = apr_xlate_conv_buffer(ctx->convset, buf+(bytes - insz),
                                                      &insz, ctx->buf, &ctx->bytes);
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r, APLOGNO(01441)
                                         "xml2enc: converted %" APR_SIZE_T_FMT
                                         "/%" APR_OFF_T_FMT " bytes", consumed - insz,
                                         ctx->bblen - ctx->bytes);
                           consumed = insz;
      -                    ap_fwrite(f->next, ctx->bbnext, ctx->buf,
      -                              (apr_size_t)ctx->bblen - ctx->bytes);
      +                    rv2 = ap_fwrite(f->next, ctx->bbnext, ctx->buf,
      +                                    (apr_size_t)ctx->bblen - ctx->bytes);
      +                    if (rv2 != APR_SUCCESS) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv2, f->r, APLOGNO(01442)
      +                                      "ap_fwrite failed");
      +                        return rv2;
      +                    }
                           switch (rv) {
                           case APR_SUCCESS:
                               continue;
                           case APR_EINCOMPLETE:
      -                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, APLOGNO(01443)
                                             "INCOMPLETE");
                               continue;     /* If outbuf too small, go round again.
                                              * If it was inbuf, we'll break out when
                                              * we test ctx->bytes == ctx->bblen
                                              */
                           case APR_EINVAL: /* try skipping one bad byte */
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01444)
                                          "Skipping invalid byte(s) in input stream!");
                               --insz;
                               continue;
      @@ -482,20 +501,25 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb)
                               /* Erk!  What's this?
                                * Bail out, flush, and hope to eat the buf raw
                                */
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01445)
                                             "Failed to convert input; trying it raw") ;
                               ctx->convset = NULL;
      -                        ap_fflush(f->next, ctx->bbnext);
      -                        return ap_pass_brigade(f->next, ctx->bbnext);
      +                        rv = ap_fflush(f->next, ctx->bbnext);
      +                        if (rv != APR_SUCCESS)
      +                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, f->r, APLOGNO(01446)
      +                                          "ap_fflush failed");
      +                        else
      +                            rv = ap_pass_brigade(f->next, ctx->bbnext);
                           }
                       }
                   } else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01447)
                                     "xml2enc: error reading data") ;
                   }
      -            if (bdestroy) {
      +            if (bdestroy)
                       apr_bucket_destroy(bdestroy);
      -            }
      +            if (rv != APR_SUCCESS)
      +                return rv;
               }
           }
           return APR_SUCCESS;
      @@ -591,7 +615,8 @@ static void* xml2enc_merge(apr_pool_t* pool, void* BASE, void* ADD)
           ret->skipto = add->skipto ? add->skipto : base->skipto;
           return ret;
       }
      -module AP_MODULE_DECLARE_DATA xml2enc_module = {
      +
      +AP_DECLARE_MODULE(xml2enc) = {
           STANDARD20_MODULE_STUFF,
           xml2enc_config,
           xml2enc_merge,
      @@ -600,6 +625,7 @@ module AP_MODULE_DECLARE_DATA xml2enc_module = {
           xml2enc_cmds,
           xml2enc_hooks
       };
      +
       APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(xml2enc, XML2ENC, int, preprocess,
                             (ap_filter_t *f, char** bufp, apr_size_t* bytesp),
                             (f, bufp, bytesp), OK, DECLINED)
      diff --git a/modules/filters/mod_xml2enc.dep b/modules/filters/mod_xml2enc.dep
      new file mode 100644
      index 00000000000..4c89d078c83
      --- /dev/null
      +++ b/modules/filters/mod_xml2enc.dep
      @@ -0,0 +1,54 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_xml2enc.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_xml2enc.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_xml2enc.h"\
      +	
      diff --git a/modules/filters/mod_xml2enc.dsp b/modules/filters/mod_xml2enc.dsp
      index 6ad6ef3ac02..69e2904a9e8 100644
      --- a/modules/filters/mod_xml2enc.dsp
      +++ b/modules/filters/mod_xml2enc.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /d "NDEBUG" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" 
      +# ADD RSC /l 0x409 /d "NDEBUG" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /i /d "_DEBUG" "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" 
      +# ADD RSC /l 0x409 /d "_DEBUG" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/filters/mod_xml2enc.mak b/modules/filters/mod_xml2enc.mak
      new file mode 100644
      index 00000000000..028c736ba0e
      --- /dev/null
      +++ b/modules/filters/mod_xml2enc.mak
      @@ -0,0 +1,352 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_xml2enc.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_xml2enc - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_xml2enc - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_xml2enc - Win32 Release" && "$(CFG)" != "mod_xml2enc - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_xml2enc.mak" CFG="mod_xml2enc - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_xml2enc - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_xml2enc - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_xml2enc - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_xml2enc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_xml2enc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_xml2enc.obj"
      +	-@erase "$(INTDIR)\mod_xml2enc_src.idb"
      +	-@erase "$(INTDIR)\mod_xml2enc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_xml2enc.exp"
      +	-@erase "$(OUTDIR)\mod_xml2enc.lib"
      +	-@erase "$(OUTDIR)\mod_xml2enc.pdb"
      +	-@erase "$(OUTDIR)\mod_xml2enc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/libxml2/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_xml2enc_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d "NDEBUG" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_xml2enc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib libxml2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_xml2enc.pdb" /debug /out:"$(OUTDIR)\mod_xml2enc.so" /implib:"$(OUTDIR)\mod_xml2enc.lib" /libpath:"../../srclib/libxml2/win32/bin.msvc" /base:@..\..\os\win32\BaseAddr.ref,mod_xml2enc.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_xml2enc.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_xml2enc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_xml2enc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_xml2enc.so"
      +   if exist .\Release\mod_xml2enc.so.manifest mt.exe -manifest .\Release\mod_xml2enc.so.manifest -outputresource:.\Release\mod_xml2enc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_xml2enc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_xml2enc.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httpd.res"
      +	-@erase "$(INTDIR)\mod_xml2enc.obj"
      +	-@erase "$(INTDIR)\mod_xml2enc_src.idb"
      +	-@erase "$(INTDIR)\mod_xml2enc_src.pdb"
      +	-@erase "$(OUTDIR)\mod_xml2enc.exp"
      +	-@erase "$(OUTDIR)\mod_xml2enc.lib"
      +	-@erase "$(OUTDIR)\mod_xml2enc.pdb"
      +	-@erase "$(OUTDIR)\mod_xml2enc.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/libxml2/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_xml2enc_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /d "_DEBUG" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_xml2enc.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib libxml2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_xml2enc.pdb" /debug /out:"$(OUTDIR)\mod_xml2enc.so" /implib:"$(OUTDIR)\mod_xml2enc.lib" /libpath:"../../srclib/libxml2/win32/bin.msvc" /base:@..\..\os\win32\BaseAddr.ref,mod_xml2enc.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_xml2enc.obj" \
      +	"$(INTDIR)\httpd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_xml2enc.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_xml2enc.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_xml2enc.so"
      +   if exist .\Debug\mod_xml2enc.so.manifest mt.exe -manifest .\Debug\mod_xml2enc.so.manifest -outputresource:.\Debug\mod_xml2enc.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_xml2enc.dep")
      +!INCLUDE "mod_xml2enc.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_xml2enc.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_xml2enc - Win32 Release" || "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_xml2enc - Win32 Release"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +
      +
      +"$(INTDIR)\httpd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httpd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../srclib/apr-util/include" /i "../../srclib/libxml2/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_xml2enc.so" /d LONG_NAME="xml2enc_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_xml2enc.c
      +
      +"$(INTDIR)\mod_xml2enc.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_xml2enc - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_xml2enc - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\filters"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\filters"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_xml2enc - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ELSEIF  "$(CFG)" == "mod_xml2enc - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\filters"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\filters"
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/filters/regexp.c b/modules/filters/regexp.c
      index ba118a6552d..4acccca6765 100644
      --- a/modules/filters/regexp.c
      +++ b/modules/filters/regexp.c
      @@ -30,7 +30,7 @@
       
       #include "apr.h"
       #include "apr_lib.h"
      -#ifdef APR_HAVE_LIMITS_H
      +#if APR_HAVE_LIMITS_H
       #include <limits.h>
       #endif
       #if APR_HAVE_STDLIB_H
      diff --git a/modules/filters/regexp.h b/modules/filters/regexp.h
      index 1e5a6269a0b..6af89120d0e 100644
      --- a/modules/filters/regexp.h
      +++ b/modules/filters/regexp.h
      @@ -69,7 +69,8 @@ typedef struct _sed_comp_args {
       
       extern char *sed_compile(sed_commands_t *commands, sed_comp_args *compargs,
                                char *ep, char *endbuf, int seof);
      -extern void command_errf(sed_commands_t *commands, const char *fmt, ...);
      +extern void command_errf(sed_commands_t *commands, const char *fmt, ...)
      +                         __attribute__((format(printf,2,3)));
       
       #define SEDERR_CGMES "command garbled: %s"
       #define SEDERR_SMMES "Space missing before filename: %s"
      diff --git a/modules/filters/sed0.c b/modules/filters/sed0.c
      index da47122ac04..a044f647dba 100644
      --- a/modules/filters/sed0.c
      +++ b/modules/filters/sed0.c
      @@ -275,7 +275,7 @@ static int fcomp(sed_commands_t *commands, apr_file_t *fin)
               }
       
               if(p > &commands->respace[RESIZE-1]) {
      -            command_errf(commands, SEDERR_TMMES);
      +            command_errf(commands, SEDERR_TMMES, commands->linebuf);
                   return -1;
               }
       
      @@ -588,7 +588,7 @@ static int fcomp(sed_commands_t *commands, apr_file_t *fin)
                           command_errf(commands, SEDERR_SMMES, commands->linebuf);
                           return -1;
                       }
      -                if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX]) == NULL) {
      +                if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX-1]) == NULL) {
                           command_errf(commands, SEDERR_FNTL, commands->linebuf);
                           return -1;
                       }
      @@ -617,7 +617,7 @@ static int fcomp(sed_commands_t *commands, apr_file_t *fin)
                       command_errf(commands, SEDERR_SMMES, commands->linebuf);
                       return -1;
                   }
      -            if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX]) == NULL) {
      +            if (text(commands, fnamebuf, &fnamebuf[APR_PATH_MAX-1]) == NULL) {
                       command_errf(commands, SEDERR_FNTL, commands->linebuf);
                       return -1;
                   }
      @@ -745,7 +745,7 @@ static int rline(sed_commands_t *commands, apr_file_t *fin,
       
               out1:
                   if (p == lbend) {
      -                command_errf(commands, SEDERR_CLTL, commands->linebuf);
      +                command_errf(commands, SEDERR_CLTL);
                       return -1;
                   }
                   *p = '\0';
      @@ -773,7 +773,7 @@ static int rline(sed_commands_t *commands, apr_file_t *fin,
       
           out2:
               if (p == lbend) {
      -            command_errf(commands, SEDERR_CLTL, commands->linebuf);
      +            command_errf(commands, SEDERR_CLTL);
                   return -1;
               }
               *p = '\0';
      @@ -785,7 +785,7 @@ static int rline(sed_commands_t *commands, apr_file_t *fin,
           while (apr_file_read(fin, &t, &bytes_read) != APR_SUCCESS) {
               if(t == '\n') {
                   if (p == lbend) {
      -                command_errf(commands, SEDERR_CLTL, commands->linebuf);
      +                command_errf(commands, SEDERR_CLTL);
                       return -1;
                   }
                   *p = '\0';
      @@ -852,7 +852,7 @@ static char *address(sed_commands_t *commands, char *expbuf,
               *expbuf++ = commands->nlno;
               commands->tlno[commands->nlno++] = lno;
               if(commands->nlno >= SED_NLINES) {
      -            command_errf(commands, SEDERR_TMLNMES, commands->linebuf);
      +            command_errf(commands, SEDERR_TMLNMES);
                   *status = APR_EGENERAL;
                   return NULL;
               }
      diff --git a/modules/filters/sed1.c b/modules/filters/sed1.c
      index ddca3bdb629..8f383b8b0f4 100644
      --- a/modules/filters/sed1.c
      +++ b/modules/filters/sed1.c
      @@ -25,7 +25,7 @@
       #include "apr_strings.h"
       #include "regexp.h"
       
      -char    *trans[040]  = {
      +static const char *const trans[040]  = {
           "\\01",
           "\\02",
           "\\03",
      @@ -58,7 +58,7 @@ char    *trans[040]  = {
           "\\36",
           "\\37"
       };
      -char rub[] = {"\\177"};
      +static const char rub[] = {"\\177"};
       
       extern int sed_step(char *p1, char *p2, int circf, step_vars_storage *vars);
       static int substitute(sed_eval_t *eval, sed_reptr_t *ipc,
      @@ -235,6 +235,7 @@ static void copy_to_genbuf(sed_eval_t *eval, const char* sz)
           if (eval->gsize < reqsize) {
               grow_gen_buffer(eval, reqsize, NULL);
           }
      +    memcpy(eval->genbuf, sz, len + 1);
       }
       
       /*
      @@ -692,7 +693,8 @@ static apr_status_t command(sed_eval_t *eval, sed_reptr_t *ipc,
                                   step_vars_storage *step_vars)
       {
           int    i;
      -    char   *p1, *p2, *p3;
      +    char   *p1, *p2;
      +    const char *p3;
           int length;
           char sz[32]; /* 32 bytes enough to store 64 bit integer in decimal */
           apr_status_t rv = APR_SUCCESS;
      diff --git a/modules/generators/config5.m4 b/modules/generators/config5.m4
      index e87a5709754..bf295217e00 100644
      --- a/modules/generators/config5.m4
      +++ b/modules/generators/config5.m4
      @@ -32,7 +32,7 @@ case $host in
       esac
       
       if test $cgid_needed = "yes"; then
      -    APACHE_MODULE(cgid, CGI scripts.  Enabled by default with threaded MPMs, , , yes, [
      +    APACHE_MODULE(cgid, CGI scripts.  Enabled by default with threaded MPMs, , , most, [
           case $host in
             *-solaris2*)
               case `uname -r` in
      @@ -72,7 +72,7 @@ For more info: <http://issues.apache.org/bugzilla/show_bug.cgi?id=34264>])
         ])
           APACHE_MODULE(cgi, CGI scripts.  Enabled by default with non-threaded MPMs, , , no)
       else
      -    APACHE_MODULE(cgi, CGI scripts.  Enabled by default with non-threaded MPMs, , , yes)
      +    APACHE_MODULE(cgi, CGI scripts.  Enabled by default with non-threaded MPMs, , , most)
           APACHE_MODULE(cgid, CGI scripts.  Enabled by default with threaded MPMs, , , no)
       fi
       
      diff --git a/modules/generators/mod_asis.c b/modules/generators/mod_asis.c
      index fbf13965ec0..c2b651be2cd 100644
      --- a/modules/generators/mod_asis.c
      +++ b/modules/generators/mod_asis.c
      @@ -44,14 +44,14 @@ static int asis_handler(request_rec *r)
           }
       
           if (r->finfo.filetype == APR_NOFILE) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01233)
                           "File does not exist: %s", r->filename);
               return HTTP_NOT_FOUND;
           }
       
           if ((rv = apr_file_open(&f, r->filename, APR_READ,
                       APR_OS_DEFAULT, r->pool)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01234)
                           "file permissions deny server access: %s", r->filename);
               return HTTP_FORBIDDEN;
           }
      @@ -70,7 +70,7 @@ static int asis_handler(request_rec *r)
               /* This redirect needs to be a GET no matter what the original
                * method was.
                */
      -        r->method = apr_pstrdup(r->pool, "GET");
      +        r->method = "GET";
               r->method_number = M_GET;
       
               ap_internal_redirect_handler(location, r);
      @@ -85,7 +85,7 @@ static int asis_handler(request_rec *r)
       
               rv = apr_file_seek(f, APR_CUR, &pos);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01235)
                                 "mod_asis: failed to find end-of-headers position "
                                 "for %s", r->filename);
                   apr_file_close(f);
      @@ -99,9 +99,9 @@ static int asis_handler(request_rec *r)
               APR_BRIGADE_INSERT_TAIL(bb, b);
               rv = ap_pass_brigade(r->output_filters, bb);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01236)
                                 "mod_asis: ap_pass_brigade failed for file %s", r->filename);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return AP_FILTER_ERROR;
               }
           }
           else {
      diff --git a/modules/generators/mod_asis.dep b/modules/generators/mod_asis.dep
      new file mode 100644
      index 00000000000..cbfe300d2e3
      --- /dev/null
      +++ b/modules/generators/mod_asis.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_asis.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_asis.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/generators/mod_asis.mak b/modules/generators/mod_asis.mak
      new file mode 100644
      index 00000000000..f069aac164b
      --- /dev/null
      +++ b/modules/generators/mod_asis.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_asis.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_asis - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_asis - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_asis - Win32 Release" && "$(CFG)" != "mod_asis - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_asis.mak" CFG="mod_asis - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_asis - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_asis - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_asis - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_asis.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_asis.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_asis.obj"
      +	-@erase "$(INTDIR)\mod_asis.res"
      +	-@erase "$(INTDIR)\mod_asis_src.idb"
      +	-@erase "$(INTDIR)\mod_asis_src.pdb"
      +	-@erase "$(OUTDIR)\mod_asis.exp"
      +	-@erase "$(OUTDIR)\mod_asis.lib"
      +	-@erase "$(OUTDIR)\mod_asis.pdb"
      +	-@erase "$(OUTDIR)\mod_asis.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_asis_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_asis.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_asis.so" /d LONG_NAME="asis_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_asis.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_asis.pdb" /debug /out:"$(OUTDIR)\mod_asis.so" /implib:"$(OUTDIR)\mod_asis.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_asis.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_asis.obj" \
      +	"$(INTDIR)\mod_asis.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_asis.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_asis.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_asis.so"
      +   if exist .\Release\mod_asis.so.manifest mt.exe -manifest .\Release\mod_asis.so.manifest -outputresource:.\Release\mod_asis.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_asis.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_asis.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_asis.obj"
      +	-@erase "$(INTDIR)\mod_asis.res"
      +	-@erase "$(INTDIR)\mod_asis_src.idb"
      +	-@erase "$(INTDIR)\mod_asis_src.pdb"
      +	-@erase "$(OUTDIR)\mod_asis.exp"
      +	-@erase "$(OUTDIR)\mod_asis.lib"
      +	-@erase "$(OUTDIR)\mod_asis.pdb"
      +	-@erase "$(OUTDIR)\mod_asis.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_asis_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_asis.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_asis.so" /d LONG_NAME="asis_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_asis.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_asis.pdb" /debug /out:"$(OUTDIR)\mod_asis.so" /implib:"$(OUTDIR)\mod_asis.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_asis.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_asis.obj" \
      +	"$(INTDIR)\mod_asis.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_asis.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_asis.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_asis.so"
      +   if exist .\Debug\mod_asis.so.manifest mt.exe -manifest .\Debug\mod_asis.so.manifest -outputresource:.\Debug\mod_asis.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_asis.dep")
      +!INCLUDE "mod_asis.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_asis.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_asis - Win32 Release" || "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_asis - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_asis - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_asis - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_asis - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_asis.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_asis.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_asis.so" /d LONG_NAME="asis_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_asis - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_asis.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_asis.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_asis.so" /d LONG_NAME="asis_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_asis.c
      +
      +"$(INTDIR)\mod_asis.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c
      index b6888673634..a9e962315c6 100644
      --- a/modules/generators/mod_autoindex.c
      +++ b/modules/generators/mod_autoindex.c
      @@ -191,7 +191,7 @@ static void emit_preamble(request_rec *r, int xhtml, const char *title)
           if (d->head_insert != NULL) {
               ap_rputs(d->head_insert, r);
           }
      -    ap_rvputs(r, " </head>\n <body>\n", NULL);
      +    ap_rputs(" </head>\n <body>\n", r);
       }
       
       static void push_item(apr_array_header_t *arr, char *type, const char *to,
      @@ -207,7 +207,7 @@ static void push_item(apr_array_header_t *arr, char *type, const char *to,
           }
       
           p->type = type;
      -    p->data = data ? apr_pstrdup(arr->pool, data) : NULL;
      +    p->data = apr_pstrdup(arr->pool, data);
           p->apply_path = apr_pstrcat(arr->pool, path, "*", NULL);
       
           if ((type == BY_PATH) && (!ap_is_matchexp(to))) {
      @@ -694,7 +694,7 @@ static void *merge_autoindex_configs(apr_pool_t *p, void *basev, void *addv)
                    * There are local nonincremental settings, which clear
                    * all inheritance from above.  They *are* the new base settings.
                    */
      -            new->opts = add->opts;;
      +            new->opts = add->opts;
               }
               /*
                * We're guaranteed that there'll be no overlap between
      @@ -1209,7 +1209,7 @@ static char *find_title(request_rec *r)
               }
               n = sizeof(char) * (MAX_STRING_LEN - 1);
               apr_file_read(thefile, titlebuf, &n);
      -        if (n <= 0) {
      +        if (n == 0) {
                   apr_file_close(thefile);
                   return NULL;
               }
      @@ -1336,7 +1336,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
               return (NULL);
           }
       
      -    if((autoindex_opts & SHOW_FORBIDDEN)
      +    if ((autoindex_opts & SHOW_FORBIDDEN)
               && (rr->status == HTTP_UNAUTHORIZED || rr->status == HTTP_FORBIDDEN)) {
               show_forbidden = 1;
           }
      @@ -1416,7 +1416,7 @@ static char *terminate_description(autoindex_config_rec *d, char *desc,
                                          apr_int32_t autoindex_opts, int desc_width)
       {
           int maxsize = desc_width;
      -    register int x;
      +    int x;
       
           /*
            * If there's no DescriptionWidth in effect, default to the old
      @@ -1752,10 +1752,10 @@ static void output_directories(struct ent **ar, int n,
                   }
                   if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
                       if (ar[x]->lm != -1) {
      -                    char time_str[MAX_STRING_LEN];
      +                    char time_str[32];
                           apr_time_exp_t ts;
                           apr_time_exp_lt(&ts, ar[x]->lm);
      -                    apr_strftime(time_str, &rv, MAX_STRING_LEN,
      +                    apr_strftime(time_str, &rv, sizeof(time_str),
                                        "%Y-%m-%d %H:%M  ",
                                        &ts);
                           ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL);
      @@ -1782,7 +1782,7 @@ static void output_directories(struct ent **ar, int n,
                           }
                       }
                       else {
      -                    ap_rputs("</td><td>&nbsp;", r);
      +                    ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcoldesc\">" : ">", "&nbsp;", NULL);
                       }
                   }
                   ap_rputs("</td></tr>\n", r);
      @@ -1840,10 +1840,10 @@ static void output_directories(struct ent **ar, int n,
                   ap_rputs(" ", r);
                   if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
                       if (ar[x]->lm != -1) {
      -                    char time_str[MAX_STRING_LEN];
      +                    char time_str[32];
                           apr_time_exp_t ts;
                           apr_time_exp_lt(&ts, ar[x]->lm);
      -                    apr_strftime(time_str, &rv, MAX_STRING_LEN,
      +                    apr_strftime(time_str, &rv, sizeof(time_str),
                                       "%Y-%m-%d %H:%M  ", &ts);
                           ap_rputs(time_str, r);
                       }
      @@ -1981,7 +1981,7 @@ static int dsortf(struct ent **e1, struct ent **e2)
               }
           }
       
      -    /* The names may be identical in respects other other than
      +    /* The names may be identical in respects other than
            * filename case when strnatcmp is used above, so fall back
            * to strcmp on conflicts so that fn1.01.zzz and fn1.1.zzz
            * are also sorted in a deterministic order.
      @@ -2023,7 +2023,7 @@ static int index_directory(request_rec *r,
           char *charset;
       
           if ((status = apr_dir_open(&thedir, name, r->pool)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01275)
                             "Can't open directory for index: %s", r->filename);
               return HTTP_FORBIDDEN;
           }
      @@ -2274,7 +2274,10 @@ static int handle_autoindex(request_rec *r)
           autoindex_config_rec *d;
           int allow_opts;
       
      -    if(strcmp(r->handler,DIR_MAGIC_TYPE)) {
      +    if (strcmp(r->handler,DIR_MAGIC_TYPE) && !AP_IS_DEFAULT_HANDLER_NAME(r->handler)) {
      +        return DECLINED;
      +    }
      +    if (r->finfo.filetype != APR_DIR) {
               return DECLINED;
           }
       
      @@ -2310,7 +2313,7 @@ static int handle_autoindex(request_rec *r)
           else {
               const char *index_names = apr_table_get(r->notes, "dir-index-names");
       
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01276)
                             "Cannot serve directory %s: No matching DirectoryIndex (%s) found, and "
                             "server-generated directory index forbidden by "
                             "Options directive",
      diff --git a/modules/generators/mod_autoindex.dep b/modules/generators/mod_autoindex.dep
      new file mode 100644
      index 00000000000..1d5ca61c3c5
      --- /dev/null
      +++ b/modules/generators/mod_autoindex.dep
      @@ -0,0 +1,61 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_autoindex.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_autoindex.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/generators/mod_autoindex.mak b/modules/generators/mod_autoindex.mak
      new file mode 100644
      index 00000000000..daebb5dc252
      --- /dev/null
      +++ b/modules/generators/mod_autoindex.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_autoindex.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_autoindex - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_autoindex - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_autoindex - Win32 Release" && "$(CFG)" != "mod_autoindex - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_autoindex.mak" CFG="mod_autoindex - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_autoindex - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_autoindex - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_autoindex - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_autoindex.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_autoindex.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_autoindex.obj"
      +	-@erase "$(INTDIR)\mod_autoindex.res"
      +	-@erase "$(INTDIR)\mod_autoindex_src.idb"
      +	-@erase "$(INTDIR)\mod_autoindex_src.pdb"
      +	-@erase "$(OUTDIR)\mod_autoindex.exp"
      +	-@erase "$(OUTDIR)\mod_autoindex.lib"
      +	-@erase "$(OUTDIR)\mod_autoindex.pdb"
      +	-@erase "$(OUTDIR)\mod_autoindex.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_autoindex_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_autoindex.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_autoindex.so" /d LONG_NAME="autoindex_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_autoindex.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_autoindex.pdb" /debug /out:"$(OUTDIR)\mod_autoindex.so" /implib:"$(OUTDIR)\mod_autoindex.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_autoindex.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_autoindex.obj" \
      +	"$(INTDIR)\mod_autoindex.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_autoindex.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_autoindex.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_autoindex.so"
      +   if exist .\Release\mod_autoindex.so.manifest mt.exe -manifest .\Release\mod_autoindex.so.manifest -outputresource:.\Release\mod_autoindex.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_autoindex.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_autoindex.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_autoindex.obj"
      +	-@erase "$(INTDIR)\mod_autoindex.res"
      +	-@erase "$(INTDIR)\mod_autoindex_src.idb"
      +	-@erase "$(INTDIR)\mod_autoindex_src.pdb"
      +	-@erase "$(OUTDIR)\mod_autoindex.exp"
      +	-@erase "$(OUTDIR)\mod_autoindex.lib"
      +	-@erase "$(OUTDIR)\mod_autoindex.pdb"
      +	-@erase "$(OUTDIR)\mod_autoindex.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_autoindex_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_autoindex.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_autoindex.so" /d LONG_NAME="autoindex_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_autoindex.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_autoindex.pdb" /debug /out:"$(OUTDIR)\mod_autoindex.so" /implib:"$(OUTDIR)\mod_autoindex.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_autoindex.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_autoindex.obj" \
      +	"$(INTDIR)\mod_autoindex.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_autoindex.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_autoindex.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_autoindex.so"
      +   if exist .\Debug\mod_autoindex.so.manifest mt.exe -manifest .\Debug\mod_autoindex.so.manifest -outputresource:.\Debug\mod_autoindex.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_autoindex.dep")
      +!INCLUDE "mod_autoindex.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_autoindex.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_autoindex - Win32 Release" || "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_autoindex - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_autoindex - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_autoindex - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_autoindex - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_autoindex.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_autoindex.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_autoindex.so" /d LONG_NAME="autoindex_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_autoindex - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_autoindex.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_autoindex.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_autoindex.so" /d LONG_NAME="autoindex_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_autoindex.c
      +
      +"$(INTDIR)\mod_autoindex.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c
      index ac855154d36..000f06e5bd5 100644
      --- a/modules/generators/mod_cgi.c
      +++ b/modules/generators/mod_cgi.c
      @@ -21,10 +21,10 @@
        *
        * Adapted by rst from original NCSA code by Rob McCool
        *
      - * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
      - * custom error responses, and DOCUMENT_ROOT because we found it useful.
      - * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
      - * they fail.
      + * This modules uses a httpd core function (ap_add_common_vars) to add some new env vars, 
      + * like REDIRECT_URL and REDIRECT_QUERY_STRING for custom error responses and DOCUMENT_ROOT.
      + * It also adds SERVER_ADMIN - useful for scripts to know who to mail when they fail.
      + * 
        */
       
       #include "apr.h"
      @@ -162,15 +162,17 @@ AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF,
       };
       
       static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret,
      -                           apr_status_t rv, char *error)
      +                           apr_status_t rv, char *logno, char *error)
       {
           apr_file_t *f = NULL;
           apr_finfo_t finfo;
           char time_str[APR_CTIME_LEN];
           int log_flags = rv ? APLOG_ERR : APLOG_ERR;
       
      +    /* Intentional no APLOGNO */
      +    /* Callee provides APLOGNO in error text */
           ap_log_rerror(APLOG_MARK, log_flags, rv, r,
      -                  "%s: %s", error, r->filename);
      +                  "%s%s: %s", logno ? logno : "", error, r->filename);
       
           /* XXX Very expensive mainline case! Open, then getfileinfo! */
           if (!conf->logname ||
      @@ -203,6 +205,7 @@ static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err)
           char argsbuffer[HUGE_STRING_LEN];
           char *newline;
           apr_status_t rv;
      +    cgi_server_conf *conf = ap_get_module_config(r->server->module_config, &cgi_module);
       
           while ((rv = apr_file_gets(argsbuffer, HUGE_STRING_LEN,
                                      script_err)) == APR_SUCCESS) {
      @@ -210,8 +213,7 @@ static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err)
               if (newline) {
                   *newline = '\0';
               }
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "%s", argsbuffer);
      +        log_scripterror(r, conf, r->status, 0, APLOGNO(01215), argsbuffer);
           }
       
           return rv;
      @@ -354,16 +356,15 @@ static void cgi_child_errfn(apr_pool_t *pool, apr_status_t err,
                                   const char *description)
       {
           apr_file_t *stderr_log;
      -    char errbuf[200];
       
           apr_file_open_stderr(&stderr_log, pool);
           /* Escape the logged string because it may be something that
            * came in over the network.
            */
           apr_file_printf(stderr_log,
      -                    "(%d)%s: %s\n",
      +                    "(%d)%pm: %s\n",
                           err,
      -                    apr_strerror(err, errbuf, sizeof(errbuf)),
      +                    &err,
       #ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED
                           ap_escape_logitem(pool,
       #endif
      @@ -436,7 +437,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
               ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM,
                                             conf->limit_mem)) != APR_SUCCESS) ||
       #endif
      -#if RLIMIT_NPROC && defined(AP_CGI_USE_RLIMIT)
      +#if defined(RLIMIT_NPROC) && defined(AP_CGI_USE_RLIMIT)
               ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC,
                                             conf->limit_nproc)) != APR_SUCCESS) ||
       #endif
      @@ -449,7 +450,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
                                               e_info->addrspace)) != APR_SUCCESS) ||
               ((rc = apr_procattr_child_errfn_set(procattr, cgi_child_errfn)) != APR_SUCCESS)) {
               /* Something bad happened, tell the world. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(01216)
                             "couldn't set child process attributes: %s", r->filename);
           }
           else {
      @@ -459,6 +460,7 @@ static apr_status_t run_cgi_child(apr_file_t **script_out,
       
               if (rc != APR_SUCCESS) {
                   /* Bad things happened. Everyone should have cleaned up. */
      +            /* Intentional no APLOGNO */
                   ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
                                 "couldn't create child process: %d: %s", rc,
                                 apr_filepath_name_get(r->filename));
      @@ -587,8 +589,8 @@ static apr_bucket *cgi_bucket_create(request_rec *r,
           /* Create the pollset */
           rv = apr_pollset_create(&data->pollset, 2, r->pool, 0);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                     "cgi: apr_pollset_create(); check system or user limits");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01217)
      +                     "apr_pollset_create(); check system or user limits");
               return NULL;
           }
       
      @@ -599,8 +601,8 @@ static apr_bucket *cgi_bucket_create(request_rec *r,
           fd.client_data = (void *)1;
           rv = apr_pollset_add(data->pollset, &fd);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                     "cgi: apr_pollset_add(); check system or user limits");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01218)
      +                     "apr_pollset_add(); check system or user limits");
               return NULL;
           }
       
      @@ -608,8 +610,8 @@ static apr_bucket *cgi_bucket_create(request_rec *r,
           fd.client_data = (void *)2;
           rv = apr_pollset_add(data->pollset, &fd);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                     "cgi: apr_pollset_add(); check system or user limits");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01219)
      +                     "apr_pollset_add(); check system or user limits");
               return NULL;
           }
       
      @@ -690,7 +692,7 @@ static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
               rv = apr_pollset_poll(data->pollset, timeout, &num, &results);
               if (APR_STATUS_IS_TIMEUP(rv)) {
                   if (timeout) {
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, data->r, APLOGNO(01220)
                                     "Timeout waiting for output from CGI script %s",
                                     data->r->filename);
                       return rv;
      @@ -703,7 +705,7 @@ static apr_status_t cgi_bucket_read(apr_bucket *b, const char **str,
                   continue;
               }
               else if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, data->r, APLOGNO(01221)
                                 "poll failed waiting for CGI child");
                   return rv;
               }
      @@ -775,30 +777,30 @@ static int cgi_handler(request_rec *r)
           conf = ap_get_module_config(r->server->module_config, &cgi_module);
       
           if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r))
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02809),
                                      "Options ExecCGI is off in this directory");
           if (nph && is_included)
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02810),
                                      "attempt to include NPH CGI script");
       
           if (r->finfo.filetype == APR_NOFILE)
      -        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
      +        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(02811),
                                      "script not found or unable to stat");
           if (r->finfo.filetype == APR_DIR)
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02812),
                                      "attempt to invoke directory as script");
       
           if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) &&
               r->path_info && *r->path_info)
           {
               /* default to accept */
      -        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
      +        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(02813),
                                      "AcceptPathInfo off disallows user's path");
           }
       /*
           if (!ap_suexec_enabled) {
               if (!ap_can_exec(&r->finfo))
      -            return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +            return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(03194)
                                          "file permissions deny server execution");
           }
       
      @@ -820,7 +822,7 @@ static int cgi_handler(request_rec *r)
       
           /* build the command line */
           if ((rv = cgi_build_command(&command, &argv, r, p, &e_info)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01222)
                             "don't know how to spawn child process: %s",
                             r->filename);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -829,7 +831,7 @@ static int cgi_handler(request_rec *r)
           /* run the script in its own process */
           if ((rv = run_cgi_child(&script_out, &script_in, &script_err,
                                   command, argv, r, p, &e_info)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01223)
                             "couldn't spawn child process: %s", r->filename);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -852,13 +854,13 @@ static int cgi_handler(request_rec *r)
       
               if (rv != APR_SUCCESS) {
                   if (APR_STATUS_IS_TIMEUP(rv)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01224)
                                     "Timeout during reading request entity data");
                       return HTTP_REQUEST_TIME_OUT;
                   }
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01225)
                                 "Error reading request entity data");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
               }
       
               for (bucket = APR_BRIGADE_FIRST(bb);
      @@ -922,8 +924,6 @@ static int cgi_handler(request_rec *r)
       
           AP_DEBUG_ASSERT(script_in != NULL);
       
      -    apr_brigade_cleanup(bb);
      -
       #if APR_FILES_AS_SOCKETS
           apr_file_pipe_timeout_set(script_in, 0);
           apr_file_pipe_timeout_set(script_err, 0);
      @@ -993,7 +993,7 @@ static int cgi_handler(request_rec *r)
                   /* This redirect needs to be a GET no matter what the original
                    * method was.
                    */
      -            r->method = apr_pstrdup(r->pool, "GET");
      +            r->method = "GET";
                   r->method_number = M_GET;
       
                   /* We already read the message body (if any), so don't allow
      @@ -1130,7 +1130,7 @@ static apr_status_t include_cmd(include_ctx_t *ctx, ap_filter_t *f,
       
           if ((rv = cgi_build_command(&command, &argv, r, r->pool,
                                       &e_info)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01226)
                             "don't know how to spawn cmd child process: %s",
                             r->filename);
               return rv;
      @@ -1140,7 +1140,7 @@ static apr_status_t include_cmd(include_ctx_t *ctx, ap_filter_t *f,
           if ((rv = run_cgi_child(&script_out, &script_in, &script_err,
                                   command, argv, r, r->pool,
                                   &e_info)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01227)
                             "couldn't spawn child process: %s", r->filename);
               return rv;
           }
      @@ -1169,8 +1169,8 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for exec element in %s",
      -                      r->filename);
      +                      0, r, APLOGNO(03195)
      +                      "missing argument for exec element in %s", r->filename);
           }
       
           if (!(ctx->flags & SSI_FLAG_PRINTING)) {
      @@ -1183,7 +1183,7 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
           }
       
           if (ctx->flags & SSI_FLAG_NO_EXEC) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "exec used but not allowed "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01228) "exec used but not allowed "
                             "in %s", r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
      @@ -1203,7 +1203,7 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
       
                   rv = include_cmd(ctx, f, bb, parsed_string);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "execution failure "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01229) "execution failure "
                                     "for parameter \"%s\" to tag exec in file %s",
                                     tag, r->filename);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -1218,14 +1218,14 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
       
                   rv = include_cgi(ctx, f, bb, parsed_string);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "invalid CGI ref "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01230) "invalid CGI ref "
                                     "\"%s\" in %s", tag_val, file);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                       break;
                   }
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01231) "unknown parameter "
                                 "\"%s\" to tag exec in %s", tag, file);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      diff --git a/modules/generators/mod_cgi.dep b/modules/generators/mod_cgi.dep
      new file mode 100644
      index 00000000000..3da4698a1cc
      --- /dev/null
      +++ b/modules/generators/mod_cgi.dep
      @@ -0,0 +1,64 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_cgi.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_cgi.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\mod_include.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_cgi.h"\
      +	
      diff --git a/modules/generators/mod_cgi.mak b/modules/generators/mod_cgi.mak
      new file mode 100644
      index 00000000000..bd5e7e706e5
      --- /dev/null
      +++ b/modules/generators/mod_cgi.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_cgi.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_cgi - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_cgi - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_cgi - Win32 Release" && "$(CFG)" != "mod_cgi - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cgi.mak" CFG="mod_cgi - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cgi - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_cgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cgi.obj"
      +	-@erase "$(INTDIR)\mod_cgi.res"
      +	-@erase "$(INTDIR)\mod_cgi_src.idb"
      +	-@erase "$(INTDIR)\mod_cgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cgi.exp"
      +	-@erase "$(OUTDIR)\mod_cgi.lib"
      +	-@erase "$(OUTDIR)\mod_cgi.pdb"
      +	-@erase "$(OUTDIR)\mod_cgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cgi_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cgi.so" /d LONG_NAME="cgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cgi.pdb" /debug /out:"$(OUTDIR)\mod_cgi.so" /implib:"$(OUTDIR)\mod_cgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cgi.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cgi.obj" \
      +	"$(INTDIR)\mod_cgi.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_cgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cgi.so"
      +   if exist .\Release\mod_cgi.so.manifest mt.exe -manifest .\Release\mod_cgi.so.manifest -outputresource:.\Release\mod_cgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_cgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cgi.obj"
      +	-@erase "$(INTDIR)\mod_cgi.res"
      +	-@erase "$(INTDIR)\mod_cgi_src.idb"
      +	-@erase "$(INTDIR)\mod_cgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cgi.exp"
      +	-@erase "$(OUTDIR)\mod_cgi.lib"
      +	-@erase "$(OUTDIR)\mod_cgi.pdb"
      +	-@erase "$(OUTDIR)\mod_cgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cgi_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cgi.so" /d LONG_NAME="cgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cgi.pdb" /debug /out:"$(OUTDIR)\mod_cgi.so" /implib:"$(OUTDIR)\mod_cgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cgi.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cgi.obj" \
      +	"$(INTDIR)\mod_cgi.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_cgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cgi.so"
      +   if exist .\Debug\mod_cgi.so.manifest mt.exe -manifest .\Debug\mod_cgi.so.manifest -outputresource:.\Debug\mod_cgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_cgi.dep")
      +!INCLUDE "mod_cgi.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_cgi.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_cgi - Win32 Release" || "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_cgi - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cgi - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cgi - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_cgi - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_cgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_cgi.so" /d LONG_NAME="cgi_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_cgi - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_cgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_cgi.so" /d LONG_NAME="cgi_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_cgi.c
      +
      +"$(INTDIR)\mod_cgi.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c
      index 83e6dc1edbb..1148467b46d 100644
      --- a/modules/generators/mod_cgid.c
      +++ b/modules/generators/mod_cgid.c
      @@ -21,10 +21,10 @@
        *
        * Adapted by rst from original NCSA code by Rob McCool
        *
      - * Apache adds some new env vars; REDIRECT_URL and REDIRECT_QUERY_STRING for
      - * custom error responses, and DOCUMENT_ROOT because we found it useful.
      - * It also adds SERVER_ADMIN - useful for scripts to know who to mail when
      - * they fail.
      + * This modules uses a httpd core function (ap_add_common_vars) to add some new env vars, 
      + * like REDIRECT_URL and REDIRECT_QUERY_STRING for custom error responses and DOCUMENT_ROOT.
      + * It also adds SERVER_ADMIN - useful for scripts to know who to mail when they fail.
      + * 
        */
       
       #include "apr_lib.h"
      @@ -87,7 +87,6 @@ static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *cgid_pfn_gtv;
       static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *cgid_pfn_ps;
       
       static apr_pool_t *pcgi = NULL;
      -static int total_modules = 0;
       static pid_t daemon_pid;
       static int daemon_should_exit = 0;
       static server_rec *root_server = NULL;
      @@ -98,6 +97,10 @@ static apr_socklen_t server_addr_len;
       static pid_t parent_pid;
       static ap_unix_identity_t empty_ugid = { (uid_t)-1, (gid_t)-1, -1 };
       
      +typedef struct { 
      +    apr_interval_time_t timeout;
      +} cgid_dirconf;
      +
       /* The APR other-child API doesn't tell us how the daemon exited
        * (SIGSEGV vs. exit(1)).  The other-child maintenance function
        * needs to decide whether to restart the daemon after a failure
      @@ -135,7 +138,7 @@ static int is_scriptaliased(request_rec *r)
       
       #define DEFAULT_LOGBYTES 10385760
       #define DEFAULT_BUFBYTES 1024
      -#define DEFAULT_SOCKET  DEFAULT_REL_RUNTIMEDIR "/cgisock"
      +#define DEFAULT_SOCKET "cgisock"
       
       #define CGI_REQ    1
       #define SSI_REQ    2
      @@ -167,6 +170,10 @@ static int is_scriptaliased(request_rec *r)
       #define DEFAULT_CONNECT_ATTEMPTS  15
       #endif
       
      +#ifndef DEFAULT_CONNECT_STARTUP_DELAY
      +#define DEFAULT_CONNECT_STARTUP_DELAY 60
      +#endif
      +
       typedef struct {
           const char *logname;
           long logbytes;
      @@ -290,11 +297,11 @@ static void cgid_maint(int reason, void *data, apr_wait_t status)
                   }
                   if (!stopping) {
                       if (status == DAEMON_STARTUP_ERROR) {
      -                    ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(01238)
                                        "cgid daemon failed to initialize");
                       }
                       else {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(01239)
                                        "cgid daemon process died, restarting");
                           cgid_start(root_pool, root_server, proc);
                       }
      @@ -319,7 +326,7 @@ static void cgid_maint(int reason, void *data, apr_wait_t status)
                    * guarantee the same permissions as when the socket was created.
                    */
                   if (unlink(sockname) < 0 && errno != ENOENT) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, errno, ap_server_conf, APLOGNO(01240)
                                    "Couldn't unlink unix domain socket %s",
                                    sockname);
                   }
      @@ -588,7 +595,7 @@ static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err,
            * have r->headers_in and possibly other storage referenced by
            * ap_log_rerror()
            */
      -    ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description);
      +    ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, APLOGNO(01241) "%s", description);
       }
       
       static int cgid_server(void *data)
      @@ -614,7 +621,7 @@ static int cgid_server(void *data)
           apr_hook_sort_all();
       
           if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01242)
                            "Couldn't create unix domain socket");
               return errno;
           }
      @@ -623,7 +630,7 @@ static int cgid_server(void *data)
           rc = bind(sd, (struct sockaddr *)server_addr, server_addr_len);
           umask(omask); /* can't fail, so can't clobber errno */
           if (rc < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01243)
                            "Couldn't bind unix domain socket %s",
                            sockname);
               return errno;
      @@ -632,21 +639,21 @@ static int cgid_server(void *data)
           /* Not all flavors of unix use the current umask for AF_UNIX perms */
           rv = apr_file_perms_set(sockname, APR_FPROT_UREAD|APR_FPROT_UWRITE|APR_FPROT_UEXECUTE);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, main_server,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, main_server, APLOGNO(01244)
                            "Couldn't set permissions on unix domain socket %s",
                            sockname);
               return rv;
           }
       
           if (listen(sd, DEFAULT_CGID_LISTENBACKLOG) < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01245)
                            "Couldn't listen on unix domain socket");
               return errno;
           }
       
           if (!geteuid()) {
               if (chown(sockname, ap_unixd_config.user_id, -1) < 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01246)
                                "Couldn't change owner of unix domain socket %s",
                                sockname);
                   return errno;
      @@ -693,7 +700,7 @@ static int cgid_server(void *data)
       #endif
                   if (errno != EINTR) {
                       ap_log_error(APLOG_MARK, APLOG_ERR, errno,
      -                             (server_rec *)data,
      +                             (server_rec *)data, APLOGNO(01247)
                                    "Error accepting on cgid socket");
                   }
                   continue;
      @@ -705,14 +712,14 @@ static int cgid_server(void *data)
               stat = get_req(sd2, r, &argv0, &env, &cgid_req);
               if (stat != APR_SUCCESS) {
                   ap_log_error(APLOG_MARK, APLOG_ERR, stat,
      -                         main_server,
      +                         main_server, APLOGNO(01248)
                                "Error reading request on cgid socket");
                   close(sd2);
                   continue;
               }
       
               if (cgid_req.ppid != parent_pid) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, main_server,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, main_server, APLOGNO(01249)
                                "CGI request received from wrong server instance; "
                                "see ScriptSock directive");
                   close(sd2);
      @@ -727,7 +734,7 @@ static int cgid_server(void *data)
                   rv = sock_write(sd2, &pid, sizeof(pid));
                   if (rv != APR_SUCCESS) {
                       ap_log_error(APLOG_MARK, APLOG_ERR, rv,
      -                             main_server,
      +                             main_server, APLOGNO(01250)
                                    "Error writing pid %" APR_PID_T_FMT " to handler", pid);
                   }
                   close(sd2);
      @@ -786,7 +793,7 @@ static int cgid_server(void *data)
                    * ap_log_rerror() won't work because the header table used by
                    * ap_log_rerror() hasn't been replicated in the phony r
                    */
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, APLOGNO(01251)
                                "couldn't set child process attributes: %s", r->filename);
       
                   procnew->pid = 0; /* no process to clean up */
      @@ -824,7 +831,7 @@ static int cgid_server(void *data)
                        * ap_log_rerror() won't work because the header table used by
                        * ap_log_rerror() hasn't been replicated in the phony r
                        */
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, APLOGNO(01252)
                                    "couldn't create child process: %d: %s", rc,
                                    apr_filepath_name_get(r->filename));
       
      @@ -865,7 +872,7 @@ static int cgid_start(apr_pool_t *p, server_rec *main_server,
       
           daemon_should_exit = 0; /* clear setting from previous generation */
           if ((daemon_pid = fork()) < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, main_server, APLOGNO(01253)
                            "mod_cgid: Couldn't spawn cgid daemon process");
               return DECLINED;
           }
      @@ -896,7 +903,6 @@ static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
       {
           apr_proc_t *procnew = NULL;
           const char *userdata_key = "cgid_init";
      -    module **m;
           int ret = OK;
           void *data;
       
      @@ -910,6 +916,7 @@ static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
               procnew->err = procnew->in = procnew->out = NULL;
               apr_pool_userdata_set((const void *)procnew, userdata_key,
                            apr_pool_cleanup_null, main_server->process->pool);
      +        return ret;
           }
           else {
               procnew = data;
      @@ -917,15 +924,12 @@ static int cgid_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
       
           if (ap_state_query(AP_SQ_MAIN_STATE) != AP_SQ_MS_CREATE_PRE_CONFIG) {
               char *tmp_sockname;
      -        total_modules = 0;
      -        for (m = ap_preloaded_modules; *m != NULL; m++)
      -            total_modules++;
       
               parent_pid = getpid();
      -        tmp_sockname = ap_server_root_relative(p, sockname);
      +        tmp_sockname = ap_runtime_dir_relative(p, sockname);
               if (strlen(tmp_sockname) > sizeof(server_addr->sun_path) - 1) {
                   tmp_sockname[sizeof(server_addr->sun_path)] = '\0';
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_server, APLOGNO(01254)
                               "The length of the ScriptSock path exceeds maximum, "
                               "truncating to %s", tmp_sockname);
               }
      @@ -972,7 +976,14 @@ static void *merge_cgid_config(apr_pool_t *p, void *basev, void *overridesv)
           return overrides->logname ? overrides : base;
       }
       
      +static void *create_cgid_dirconf(apr_pool_t *p, char *dummy)
      +{
      +    cgid_dirconf *c = (cgid_dirconf *) apr_pcalloc(p, sizeof(cgid_dirconf));
      +    return c;
      +}
      +
       static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg)
      +
       {
           server_rec *s = cmd->server;
           cgid_server_conf *conf = ap_get_module_config(s->module_config,
      @@ -1016,7 +1027,7 @@ static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *ar
       
           /* Make sure the pid is appended to the sockname */
           sockname = ap_append_pid(cmd->pool, arg, ".");
      -    sockname = ap_server_root_relative(cmd->pool, sockname);
      +    sockname = ap_runtime_dir_relative(cmd->pool, sockname);
       
           if (!sockname) {
               return apr_pstrcat(cmd->pool, "Invalid ScriptSock path",
      @@ -1025,7 +1036,16 @@ static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *ar
       
           return NULL;
       }
      +static const char *set_script_timeout(cmd_parms *cmd, void *dummy, const char *arg)
      +{
      +    cgid_dirconf *dc = dummy;
       
      +    if (ap_timeout_parameter_parse(arg, &dc->timeout, "s") != APR_SUCCESS) { 
      +        return "CGIDScriptTimeout has wrong format";
      +    }
      + 
      +    return NULL;
      +}
       static const command_rec cgid_cmds[] =
       {
           AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF,
      @@ -1037,6 +1057,10 @@ static const command_rec cgid_cmds[] =
           AP_INIT_TAKE1("ScriptSock", set_script_socket, NULL, RSRC_CONF,
                         "the name of the socket to use for communication with "
                         "the cgi daemon."),
      +    AP_INIT_TAKE1("CGIDScriptTimeout", set_script_timeout, NULL, RSRC_CONF | ACCESS_CONF,
      +                  "The amount of time to wait between successful reads from "
      +                  "the CGI script, in seconds."),
      +                  
           {NULL}
       };
       
      @@ -1048,6 +1072,8 @@ static int log_scripterror(request_rec *r, cgid_server_conf * conf, int ret,
           char time_str[APR_CTIME_LEN];
           int log_flags = rv ? APLOG_ERR : APLOG_ERR;
       
      +    /* Intentional no APLOGNO */
      +    /* Callee provides APLOGNO in error text */
           ap_log_rerror(APLOG_MARK, log_flags, rv, r,
                       "%s: %s", error, r->filename);
       
      @@ -1154,7 +1180,7 @@ static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
                   apr_file_puts("%stdout\n", f);
                   first = 0;
               }
      -        apr_file_write(f, buf, &len);
      +        apr_file_write_full(f, buf, len, NULL);
               apr_file_puts("\n", f);
           }
       
      @@ -1183,19 +1209,27 @@ static int connect_to_daemon(int *sdptr, request_rec *r,
       {
           int sd;
           int connect_tries;
      +    int connect_errno;
           apr_interval_time_t sliding_timer;
       
           connect_tries = 0;
           sliding_timer = 100000; /* 100 milliseconds */
           while (1) {
      +        connect_errno = 0;
               ++connect_tries;
               if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
                   return log_scripterror(r, conf, HTTP_INTERNAL_SERVER_ERROR, errno,
      -                                   "unable to create socket to cgi daemon");
      +                                   APLOGNO(01255) "unable to create socket to cgi daemon");
               }
               if (connect(sd, (struct sockaddr *)server_addr, server_addr_len) < 0) {
      -            if (errno == ECONNREFUSED && connect_tries < DEFAULT_CONNECT_ATTEMPTS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r,
      +            /* Save errno for later */
      +            connect_errno = errno;
      +            /* ECONNREFUSED means the listen queue is full; ENOENT means that
      +             * the cgid server either hasn't started up yet, or we're pointing
      +             * at the wrong socket file */
      +            if ((errno == ECONNREFUSED || errno == ENOENT) && 
      +                 connect_tries < DEFAULT_CONNECT_ATTEMPTS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, errno, r, APLOGNO(01256)
                                     "connect #%d to cgi daemon failed, sleeping before retry",
                                     connect_tries);
                       close(sd);
      @@ -1206,7 +1240,7 @@ static int connect_to_daemon(int *sdptr, request_rec *r,
                   }
                   else {
                       close(sd);
      -                return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno,
      +                return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno, APLOGNO(01257)
                                              "unable to connect to cgi daemon after multiple tries");
                   }
               }
      @@ -1215,9 +1249,20 @@ static int connect_to_daemon(int *sdptr, request_rec *r,
                                             close_unix_socket, apr_pool_cleanup_null);
                   break; /* we got connected! */
               }
      +
      +        /* If we didn't find the socket but the server was not recently restarted,
      +         * chances are there's something wrong with the cgid daemon
      +         */
      +        if (connect_errno == ENOENT &&
      +            apr_time_sec(apr_time_now() - ap_scoreboard_image->global->restart_time) > 
      +                DEFAULT_CONNECT_STARTUP_DELAY) {
      +            return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, connect_errno, 
      +                                   apr_pstrcat(r->pool, APLOGNO(02833) "ScriptSock ", sockname, " does not exist", NULL));
      +        }
      +
               /* gotta try again, but make sure the cgid daemon is still around */
      -        if (kill(daemon_pid, 0) != 0) {
      -            return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, errno,
      +        if (connect_errno != ENOENT && kill(daemon_pid, 0) != 0) {
      +            return log_scripterror(r, conf, HTTP_SERVICE_UNAVAILABLE, connect_errno, APLOGNO(01258)
                                          "cgid daemon is gone; is Apache terminating?");
               }
           }
      @@ -1253,8 +1298,8 @@ static void discard_script_output(apr_bucket_brigade *bb)
       
       struct cleanup_script_info {
           request_rec *r;
      -    unsigned long conn_id;
           cgid_server_conf *conf;
      +    pid_t pid;
       };
       
       static apr_status_t dead_yet(pid_t pid, apr_interval_time_t max_wait)
      @@ -1291,14 +1336,14 @@ static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid)
           if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) {
               return APR_SUCCESS;
           }
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01259)
                         "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL",
                         pid);
           kill(pid, SIGKILL);
           if (dead_yet(pid, apr_time_from_sec(3)) == APR_SUCCESS) {
               return APR_SUCCESS;
           }
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01260)
                         "CGI process %" APR_PID_T_FMT " didn't exit, sending SIGKILL again",
                         pid);
           kill(pid, SIGKILL);
      @@ -1306,25 +1351,19 @@ static apr_status_t cleanup_nonchild_process(request_rec *r, pid_t pid)
           return APR_EGENERAL;
       }
       
      -static apr_status_t cleanup_script(void *vptr)
      -{
      -    struct cleanup_script_info *info = vptr;
      -    int sd;
      -    int rc;
      +static apr_status_t get_cgi_pid(request_rec *r,  cgid_server_conf *conf, pid_t *pid) { 
           cgid_req_t req = {0};
      -    pid_t pid;
           apr_status_t stat;
      +    int rc, sd;
       
      -    rc = connect_to_daemon(&sd, info->r, info->conf);
      +    rc = connect_to_daemon(&sd, r, conf);
           if (rc != OK) {
               return APR_EGENERAL;
           }
       
      -    /* we got a socket, and there is already a cleanup registered for it */
      -
           req.req_type = GETPID_REQ;
           req.ppid = parent_pid;
      -    req.conn_id = info->r->connection->id;
      +    req.conn_id = r->connection->id;
       
           stat = sock_write(sd, &req, sizeof(req));
           if (stat != APR_SUCCESS) {
      @@ -1332,18 +1371,26 @@ static apr_status_t cleanup_script(void *vptr)
           }
       
           /* wait for pid of script */
      -    stat = sock_read(sd, &pid, sizeof(pid));
      +    stat = sock_read(sd, pid, sizeof(*pid));
           if (stat != APR_SUCCESS) {
               return stat;
           }
       
           if (pid == 0) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01261)
                             "daemon couldn't find CGI process for connection %lu",
      -                      info->conn_id);
      +                      r->connection->id);
               return APR_EGENERAL;
           }
      -    return cleanup_nonchild_process(info->r, pid);
      +
      +    return APR_SUCCESS;
      +}
      +
      +
      +static apr_status_t cleanup_script(void *vptr)
      +{
      +    struct cleanup_script_info *info = vptr;
      +    return cleanup_nonchild_process(info->r, info->pid);
       }
       
       static int cgid_handler(request_rec *r)
      @@ -1360,12 +1407,16 @@ static int cgid_handler(request_rec *r)
           apr_file_t *tempsock;
           struct cleanup_script_info *info;
           apr_status_t rv;
      +    cgid_dirconf *dc;
       
           if (strcmp(r->handler, CGI_MAGIC_TYPE) && strcmp(r->handler, "cgi-script")) {
               return DECLINED;
           }
       
           conf = ap_get_module_config(r->server->module_config, &cgid_module);
      +    dc = ap_get_module_config(r->per_dir_config, &cgid_module);
      +
      +    
           is_included = !strcmp(r->protocol, "INCLUDED");
       
           if ((argv0 = strrchr(r->filename, '/')) != NULL) {
      @@ -1380,12 +1431,12 @@ static int cgid_handler(request_rec *r)
           argv0 = r->filename;
       
           if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) {
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(01262)
                       "Options ExecCGI is off in this directory");
           }
       
           if (nph && is_included) {
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(01263)
                       "attempt to include NPH CGI script");
           }
       
      @@ -1394,12 +1445,12 @@ static int cgid_handler(request_rec *r)
       #error at mod_cgi.c for required code in this path.
       #else
           if (r->finfo.filetype == APR_NOFILE) {
      -        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
      +        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(01264)
                       "script not found or unable to stat");
           }
       #endif
           if (r->finfo.filetype == APR_DIR) {
      -        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +        return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(01265)
                       "attempt to invoke directory as script");
           }
       
      @@ -1407,16 +1458,21 @@ static int cgid_handler(request_rec *r)
               r->path_info && *r->path_info)
           {
               /* default to accept */
      -        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0,
      +        return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(01266)
                                      "AcceptPathInfo off disallows user's path");
           }
      -/*
      +    /*
           if (!ap_suexec_enabled) {
               if (!ap_can_exec(&r->finfo))
      -            return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
      +            return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(01267)
                                          "file permissions deny server execution");
           }
      -*/
      +    */
      +
      +    /*
      +     * httpd core function used to add common environment variables like
      +     * DOCUMENT_ROOT. 
      +     */
           ap_add_common_vars(r);
           ap_add_cgi_vars(r);
           env = ap_create_environment(r->pool, r->subprocess_env);
      @@ -1427,17 +1483,24 @@ static int cgid_handler(request_rec *r)
       
           rv = send_req(sd, r, argv0, env, CGI_REQ);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01268)
                            "write to cgi daemon process");
           }
       
           info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
      -    info->r = r;
      -    info->conn_id = r->connection->id;
           info->conf = conf;
      -    apr_pool_cleanup_register(r->pool, info,
      +    info->r = r;
      +    rv = get_cgi_pid(r, conf, &(info->pid));
      +
      +    if (APR_SUCCESS == rv){  
      +        apr_pool_cleanup_register(r->pool, info,
                                     cleanup_script,
                                     apr_pool_cleanup_null);
      +    }
      +    else { 
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, "error determining cgi PID");
      +    }
      +
           /* We are putting the socket discriptor into an apr_file_t so that we can
            * use a pipe bucket to send the data to the client.  APR will create
            * a cleanup for the apr_file_t which will close the socket, so we'll
      @@ -1445,6 +1508,12 @@ static int cgid_handler(request_rec *r)
            */
       
           apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
      +    if (dc->timeout > 0) { 
      +        apr_file_pipe_timeout_set(tempsock, dc->timeout);
      +    }
      +    else { 
      +        apr_file_pipe_timeout_set(tempsock, r->server->timeout);
      +    }
           apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
       
           /* Transfer any put/post args, CERN style...
      @@ -1466,13 +1535,13 @@ static int cgid_handler(request_rec *r)
       
               if (rv != APR_SUCCESS) {
                   if (APR_STATUS_IS_TIMEUP(rv)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01269)
                                     "Timeout during reading request entity data");
                       return HTTP_REQUEST_TIME_OUT;
                   }
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01270)
                                 "Error reading request entity data");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
               }
       
               for (bucket = APR_BRIGADE_FIRST(bb);
      @@ -1521,6 +1590,10 @@ static int cgid_handler(request_rec *r)
                   if (rv != APR_SUCCESS) {
                       /* silly script stopped reading, soak up remaining message */
                       child_stopped_reading = 1;
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,  APLOGNO(02651)
      +                              "Error writing request body to script %s", 
      +                              r->filename);
      +
                   }
               }
               apr_brigade_cleanup(bb);
      @@ -1593,7 +1666,7 @@ static int cgid_handler(request_rec *r)
                   /* This redirect needs to be a GET no matter what the original
                    * method was.
                    */
      -            r->method = apr_pstrdup(r->pool, "GET");
      +            r->method = "GET";
                   r->method_number = M_GET;
       
                   /* We already read the message body (if any), so don't allow
      @@ -1614,7 +1687,11 @@ static int cgid_handler(request_rec *r)
                   return HTTP_MOVED_TEMPORARILY;
               }
       
      -        ap_pass_brigade(r->output_filters, bb);
      +        rv = ap_pass_brigade(r->output_filters, bb);
      +        if (rv != APR_SUCCESS) { 
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r,
      +                          "Failed to flush CGI output to client");
      +        }
           }
       
           if (nph) {
      @@ -1745,7 +1822,10 @@ static int include_cmd(include_ctx_t *ctx, ap_filter_t *f,
           request_rec *r = f->r;
           cgid_server_conf *conf = ap_get_module_config(r->server->module_config,
                                                         &cgid_module);
      +    cgid_dirconf *dc = ap_get_module_config(r->per_dir_config, &cgid_module);
      +
           struct cleanup_script_info *info;
      +    apr_status_t rv;
       
           add_ssi_vars(r);
           env = ap_create_environment(r->pool, r->subprocess_env);
      @@ -1757,13 +1837,22 @@ static int include_cmd(include_ctx_t *ctx, ap_filter_t *f,
           send_req(sd, r, command, env, SSI_REQ);
       
           info = apr_palloc(r->pool, sizeof(struct cleanup_script_info));
      -    info->r = r;
      -    info->conn_id = r->connection->id;
           info->conf = conf;
      -    /* for this type of request, the script is invoked through an
      -     * intermediate shell process...  cleanup_script is only able
      -     * to knock out the shell process, not the actual script
      -     */
      +    info->r = r;
      +    rv = get_cgi_pid(r, conf, &(info->pid));
      +    if (APR_SUCCESS == rv) {             
      +        /* for this type of request, the script is invoked through an
      +         * intermediate shell process...  cleanup_script is only able
      +         * to knock out the shell process, not the actual script
      +         */
      +        apr_pool_cleanup_register(r->pool, info,
      +                                  cleanup_script,
      +                                  apr_pool_cleanup_null);
      +    }
      +    else { 
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, "error determining cgi PID (for SSI)");
      +    }
      +
           apr_pool_cleanup_register(r->pool, info,
                                     cleanup_script,
                                     apr_pool_cleanup_null);
      @@ -1774,6 +1863,13 @@ static int include_cmd(include_ctx_t *ctx, ap_filter_t *f,
            * get rid of the cleanup we registered when we created the socket.
            */
           apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
      +    if (dc->timeout > 0) {
      +        apr_file_pipe_timeout_set(tempsock, dc->timeout);
      +    }
      +    else {
      +        apr_file_pipe_timeout_set(tempsock, r->server->timeout);
      +    }
      +
           apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
       
           APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pipe_create(tempsock,
      @@ -1796,8 +1892,8 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
               ap_log_rerror(APLOG_MARK,
                             (ctx->flags & SSI_FLAG_PRINTING)
                                 ? APLOG_ERR : APLOG_WARNING,
      -                      0, r, "missing argument for exec element in %s",
      -                      r->filename);
      +                      0, r, APLOGNO(03196)
      +                      "missing argument for exec element in %s", r->filename);
           }
       
           if (!(ctx->flags & SSI_FLAG_PRINTING)) {
      @@ -1810,7 +1906,7 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
           }
       
           if (ctx->flags & SSI_FLAG_NO_EXEC) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "exec used but not allowed "
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01271) "exec used but not allowed "
                             "in %s", r->filename);
               SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
               return APR_SUCCESS;
      @@ -1830,7 +1926,7 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
       
                   rv = include_cmd(ctx, f, bb, parsed_string);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01272)
                                     "execution failure for parameter \"%s\" "
                                     "to tag exec in file %s", tag, r->filename);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
      @@ -1845,14 +1941,14 @@ static apr_status_t handle_exec(include_ctx_t *ctx, ap_filter_t *f,
       
                   rv = include_cgi(ctx, f, bb, parsed_string);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "invalid CGI ref "
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01273) "invalid CGI ref "
                                     "\"%s\" in %s", tag_val, file);
                       SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                       break;
                   }
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "unknown parameter "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01274) "unknown parameter "
                                 "\"%s\" to tag exec in %s", tag, file);
                   SSI_CREATE_ERROR_BUCKET(ctx, f, bb);
                   break;
      @@ -1879,7 +1975,7 @@ static void register_hook(apr_pool_t *p)
       
       AP_DECLARE_MODULE(cgid) = {
           STANDARD20_MODULE_STUFF,
      -    NULL, /* dir config creater */
      +    create_cgid_dirconf, /* dir config creater */
           NULL, /* dir merger --- default is to override */
           create_cgid_config, /* server config */
           merge_cgid_config, /* merge server config */
      diff --git a/modules/generators/mod_info.c b/modules/generators/mod_info.c
      index b685560bce0..e5e63de1378 100644
      --- a/modules/generators/mod_info.c
      +++ b/modules/generators/mod_info.c
      @@ -61,7 +61,10 @@
       #include "http_request.h"
       #include "util_script.h"
       #include "ap_mpm.h"
      +#include "mpm_common.h"
      +#include "ap_provider.h"
       #include <stdio.h>
      +#include <stdlib.h>
       
       typedef struct
       {
      @@ -110,7 +113,7 @@ static void put_int_flush_right(request_rec * r, int i, int field)
               if (r)
                   ap_rputc('0' + i % 10, r);
               else
      -            apr_file_putc('0' + i % 10, out);
      +            apr_file_putc((char)('0' + i % 10), out);
           }
           else {
               if (r)
      @@ -300,6 +303,10 @@ static hook_lookup_t startup_hooks[] = {
           {"Test Configuration", ap_hook_get_test_config},
           {"Post Configuration", ap_hook_get_post_config},
           {"Open Logs", ap_hook_get_open_logs},
      +    {"Pre-MPM", ap_hook_get_pre_mpm},
      +    {"MPM", ap_hook_get_mpm},
      +    {"Drop Privileges", ap_hook_get_drop_privileges},
      +    {"Retrieve Optional Functions", ap_hook_get_optional_fn_retrieve},
           {"Child Init", ap_hook_get_child_init},
           {NULL},
       };
      @@ -309,6 +316,7 @@ static hook_lookup_t request_hooks[] = {
           {"Create Connection", ap_hook_get_create_connection},
           {"Process Connection", ap_hook_get_process_connection},
           {"Create Request", ap_hook_get_create_request},
      +    {"Pre-Read Request", ap_hook_get_pre_read_request},
           {"Post-Read Request", ap_hook_get_post_read_request},
           {"Header Parse", ap_hook_get_header_parser},
           {"HTTP Scheme", ap_hook_get_http_scheme},
      @@ -316,15 +324,34 @@ static hook_lookup_t request_hooks[] = {
           {"Quick Handler", ap_hook_get_quick_handler},
           {"Translate Name", ap_hook_get_translate_name},
           {"Map to Storage", ap_hook_get_map_to_storage},
      -    {"Check Access", ap_hook_get_access_checker},
      +    {"Check Access", ap_hook_get_access_checker_ex},
      +    {"Check Access (legacy)", ap_hook_get_access_checker},
           {"Verify User ID", ap_hook_get_check_user_id},
      +    {"Note Authentication Failure", ap_hook_get_note_auth_failure},
           {"Verify User Access", ap_hook_get_auth_checker},
           {"Check Type", ap_hook_get_type_checker},
           {"Fixups", ap_hook_get_fixups},
           {"Insert Filters", ap_hook_get_insert_filter},
           {"Content Handlers", ap_hook_get_handler},
      -    {"Logging", ap_hook_get_log_transaction},
      +    {"Transaction Logging", ap_hook_get_log_transaction},
           {"Insert Errors", ap_hook_get_insert_error_filter},
      +    {"Generate Log ID", ap_hook_get_generate_log_id},
      +    {NULL},
      +};
      +
      +static hook_lookup_t other_hooks[] = {
      +    {"Monitor", ap_hook_get_monitor},
      +    {"Child Status", ap_hook_get_child_status},
      +    {"End Generation", ap_hook_get_end_generation},
      +    {"Error Logging", ap_hook_get_error_log},
      +    {"Query MPM Attributes", ap_hook_get_mpm_query},
      +    {"Query MPM Name", ap_hook_get_mpm_get_name},
      +    {"Register Timed Callback", ap_hook_get_mpm_register_timed_callback},
      +    {"Extend Expression Parser", ap_hook_get_expr_lookup},
      +    {"Set Management Items", ap_hook_get_get_mgmt_items},
      +#if AP_ENABLE_EXCEPTION_HOOK
      +    {"Handle Fatal Exceptions", ap_hook_get_fatal_exception},
      +#endif
           {NULL},
       };
       
      @@ -432,7 +459,8 @@ static int show_server_settings(request_rec * r)
                      MODULE_MAGIC_NUMBER_MINOR);
           ap_rprintf(r,
                      "<dt><strong>Hostname/port:</strong> "
      -               "<tt>%s:%u</tt></dt>\n", ap_get_server_name(r),
      +               "<tt>%s:%u</tt></dt>\n",
      +               ap_escape_html(r->pool, ap_get_server_name(r)),
                      ap_get_server_port(r));
           ap_rprintf(r,
                      "<dt><strong>Timeouts:</strong> "
      @@ -646,16 +674,99 @@ static int show_active_hooks(request_rec * r)
               ap_rputs("\n  </tt>\n</dt>\n", r);
           }
       
      +    ap_rputs
      +        ("</dl>\n<hr />\n<h2><a name=\"other_hooks\">Other Hooks</a></h2>\n<dl>",
      +         r);
      +
      +    for (i = 0; other_hooks[i].name; i++) {
      +        ap_rprintf(r, "<dt><strong>%s:</strong>\n <br /><tt>\n",
      +                   other_hooks[i].name);
      +        dump_a_hook(r, other_hooks[i].get);
      +        ap_rputs("\n  </tt>\n</dt>\n", r);
      +    }
      +
           ap_rputs("</dl>\n<hr />\n", r);
       
           return 0;
       }
       
      +static int cmp_provider_groups(const void *a_, const void *b_)
      +{
      +    const ap_list_provider_groups_t *a = a_, *b = b_;
      +    int ret = strcmp(a->provider_group, b->provider_group);
      +    if (!ret)
      +        ret = strcmp(a->provider_version, b->provider_version);
      +    return ret;
      +}
      +
      +static int cmp_provider_names(const void *a_, const void *b_)
      +{
      +    const ap_list_provider_names_t *a = a_, *b = b_;
      +    return strcmp(a->provider_name, b->provider_name);
      +}
      +
      +static void show_providers(request_rec *r)
      +{
      +    apr_array_header_t *groups = ap_list_provider_groups(r->pool);
      +    ap_list_provider_groups_t *group;
      +    apr_array_header_t *names;
      +    ap_list_provider_names_t *name;
      +    int i,j;
      +    const char *cur_group = NULL;
      +
      +    qsort(groups->elts, groups->nelts, sizeof(ap_list_provider_groups_t),
      +          cmp_provider_groups);
      +    ap_rputs("<h2><a name=\"providers\">Providers</a></h2>\n<dl>", r);
      +
      +    for (i = 0; i < groups->nelts; i++) {
      +        group = &APR_ARRAY_IDX(groups, i, ap_list_provider_groups_t);
      +        if (!cur_group || strcmp(cur_group, group->provider_group) != 0) {
      +            if (cur_group)
      +                ap_rputs("\n</dt>\n", r);
      +            cur_group = group->provider_group;
      +            ap_rprintf(r, "<dt><strong>%s</strong> (version <tt>%s</tt>):"
      +                          "\n <br />\n", cur_group, group->provider_version);
      +        }
      +        names = ap_list_provider_names(r->pool, group->provider_group,
      +                                       group->provider_version);
      +        qsort(names->elts, names->nelts, sizeof(ap_list_provider_names_t),
      +              cmp_provider_names);
      +        for (j = 0; j < names->nelts; j++) {
      +            name = &APR_ARRAY_IDX(names, j, ap_list_provider_names_t);
      +            ap_rprintf(r, "<tt>&nbsp;&nbsp;%s</tt><br/>", name->provider_name);
      +        }
      +    }
      +    if (cur_group)
      +        ap_rputs("\n</dt>\n", r);
      +    ap_rputs("</dl>\n<hr />\n", r);
      +}
      +
      +static int cmp_module_name(const void *a_, const void *b_)
      +{
      +    const module * const *a = a_;
      +    const module * const *b = b_;
      +    return strcmp((*a)->name, (*b)->name);
      +}
      +
      +static apr_array_header_t *get_sorted_modules(apr_pool_t *p)
      +{
      +    apr_array_header_t *arr = apr_array_make(p, 64, sizeof(module *));
      +    module *modp, **entry;
      +    for (modp = ap_top_module; modp; modp = modp->next) {
      +        entry = &APR_ARRAY_PUSH(arr, module *);
      +        *entry = modp;
      +    }
      +    qsort(arr->elts, arr->nelts, sizeof(module *), cmp_module_name);
      +    return arr;
      +}
      +
       static int display_info(request_rec * r)
       {
      -    module *modp;
      +    module *modp = NULL;
           const char *more_info;
           const command_rec *cmd;
      +    apr_array_header_t *modules = NULL;
      +    int i;
       
           if (strcmp(r->handler, "server-info")) {
               return DECLINED;
      @@ -679,25 +790,29 @@ static int display_info(request_rec * r)
                   ap_rputs("<dl><dt><tt>Subpages:<br />", r);
                   ap_rputs("<a href=\"?config\">Configuration Files</a>, "
                            "<a href=\"?server\">Server Settings</a>, "
      -                     "<a href=\"?list\">Module List</a>,  "
      -                     "<a href=\"?hooks\">Active Hooks</a>", r);
      +                     "<a href=\"?list\">Module List</a>, "
      +                     "<a href=\"?hooks\">Active Hooks</a>, "
      +                     "<a href=\"?providers\">Available Providers</a>", r);
                   ap_rputs("</tt></dt></dl><hr />", r);
       
                   ap_rputs("<dl><dt><tt>Sections:<br />", r);
                   ap_rputs("<a href=\"#modules\">Loaded Modules</a>, "
                            "<a href=\"#server\">Server Settings</a>, "
                            "<a href=\"#startup_hooks\">Startup Hooks</a>, "
      -                     "<a href=\"#request_hooks\">Request Hooks</a>", r);
      +                     "<a href=\"#request_hooks\">Request Hooks</a>, "
      +                     "<a href=\"#other_hooks\">Other Hooks</a>, "
      +                     "<a href=\"#providers\">Providers</a>", r);
                   ap_rputs("</tt></dt></dl><hr />", r);
       
                   ap_rputs("<h2><a name=\"modules\">Loaded Modules</a></h2>"
                           "<dl><dt><tt>", r);
       
      -            /* TODO: Sort by Alpha */
      -            for (modp = ap_top_module; modp; modp = modp->next) {
      +            modules = get_sorted_modules(r->pool);
      +            for (i = 0; i < modules->nelts; i++) {
      +                modp = APR_ARRAY_IDX(modules, i, module *);
                       ap_rprintf(r, "<a href=\"#%s\">%s</a>", modp->name,
                                  modp->name);
      -                if (modp->next) {
      +                if (i < modules->nelts) {
                           ap_rputs(", ", r);
                       }
                   }
      @@ -712,6 +827,10 @@ static int display_info(request_rec * r)
                   show_active_hooks(r);
               }
       
      +        if (!r->args || !strcasecmp(r->args, "providers")) {
      +            show_providers(r);
      +        }
      +
               if (r->args && 0 == strcasecmp(r->args, "config")) {
                   ap_rputs("<dl><dt><strong>Configuration:</strong>\n", r);
                   mod_info_module_cmds(r, NULL, ap_conftree, 0, 0);
      @@ -719,7 +838,10 @@ static int display_info(request_rec * r)
               }
               else {
                   int comma = 0;
      -            for (modp = ap_top_module; modp; modp = modp->next) {
      +            if (!modules)
      +                 modules = get_sorted_modules(r->pool);
      +            for (i = 0; i < modules->nelts; i++) {
      +                modp = APR_ARRAY_IDX(modules, i, module *);
                       if (!r->args || !strcasecmp(modp->name, r->args)) {
                           ap_rprintf(r,
                                      "<dl><dt><a name=\"%s\"><strong>Module Name:</strong></a> "
      @@ -825,7 +947,9 @@ static int display_info(request_rec * r)
           }
           else {
               ap_rputs("<dl><dt>Server Module List</dt>", r);
      -        for (modp = ap_top_module; modp; modp = modp->next) {
      +        modules = get_sorted_modules(r->pool);
      +        for (i = 0; i < modules->nelts; i++) {
      +            modp = APR_ARRAY_IDX(modules, i, module *);
                   ap_rputs("<dd>", r);
                   ap_rputs(modp->name, r);
                   ap_rputs("</dd>", r);
      diff --git a/modules/generators/mod_info.dep b/modules/generators/mod_info.dep
      new file mode 100644
      index 00000000000..cdfc02bb065
      --- /dev/null
      +++ b/modules/generators/mod_info.dep
      @@ -0,0 +1,66 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_info.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_info.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/generators/mod_info.mak b/modules/generators/mod_info.mak
      new file mode 100644
      index 00000000000..b0de8a1e789
      --- /dev/null
      +++ b/modules/generators/mod_info.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_info.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_info - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_info - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_info - Win32 Release" && "$(CFG)" != "mod_info - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_info.mak" CFG="mod_info - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_info - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_info - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_info - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_info.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_info.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_info.obj"
      +	-@erase "$(INTDIR)\mod_info.res"
      +	-@erase "$(INTDIR)\mod_info_src.idb"
      +	-@erase "$(INTDIR)\mod_info_src.pdb"
      +	-@erase "$(OUTDIR)\mod_info.exp"
      +	-@erase "$(OUTDIR)\mod_info.lib"
      +	-@erase "$(OUTDIR)\mod_info.pdb"
      +	-@erase "$(OUTDIR)\mod_info.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_info_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_info.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_info.so" /d LONG_NAME="info_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_info.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_info.pdb" /debug /out:"$(OUTDIR)\mod_info.so" /implib:"$(OUTDIR)\mod_info.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_info.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_info.obj" \
      +	"$(INTDIR)\mod_info.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_info.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_info.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_info.so"
      +   if exist .\Release\mod_info.so.manifest mt.exe -manifest .\Release\mod_info.so.manifest -outputresource:.\Release\mod_info.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_info - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_info.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_info.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_info.obj"
      +	-@erase "$(INTDIR)\mod_info.res"
      +	-@erase "$(INTDIR)\mod_info_src.idb"
      +	-@erase "$(INTDIR)\mod_info_src.pdb"
      +	-@erase "$(OUTDIR)\mod_info.exp"
      +	-@erase "$(OUTDIR)\mod_info.lib"
      +	-@erase "$(OUTDIR)\mod_info.pdb"
      +	-@erase "$(OUTDIR)\mod_info.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_info_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_info.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_info.so" /d LONG_NAME="info_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_info.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_info.pdb" /debug /out:"$(OUTDIR)\mod_info.so" /implib:"$(OUTDIR)\mod_info.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_info.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_info.obj" \
      +	"$(INTDIR)\mod_info.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_info.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_info.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_info.so"
      +   if exist .\Debug\mod_info.so.manifest mt.exe -manifest .\Debug\mod_info.so.manifest -outputresource:.\Debug\mod_info.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_info.dep")
      +!INCLUDE "mod_info.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_info.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_info - Win32 Release" || "$(CFG)" == "mod_info - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_info - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_info - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_info - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_info - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_info - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_info - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_info - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_info.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_info.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_info.so" /d LONG_NAME="info_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_info - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_info.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_info.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_info.so" /d LONG_NAME="info_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_info.c
      +
      +"$(INTDIR)\mod_info.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c
      index 47f5988774f..12801f94cec 100644
      --- a/modules/generators/mod_status.c
      +++ b/modules/generators/mod_status.c
      @@ -126,7 +126,7 @@ static void format_kbyte_out(request_rec *r, apr_off_t kbytes)
               ap_rprintf(r, "%.1f GB", (float) kbytes / MBYTE);
       }
       
      -static void show_time(request_rec *r, apr_interval_time_t tsecs)
      +static void show_time(request_rec *r, apr_uint32_t tsecs)
       {
           int days, hrs, mins, secs;
       
      @@ -183,7 +183,8 @@ static int status_handler(request_rec *r)
       {
           const char *loc;
           apr_time_t nowtime;
      -    apr_interval_time_t up_time;
      +    apr_uint32_t up_time;
      +    ap_loadavg_t t;
           int j, i, res, written;
           int ready;
           int busy;
      @@ -245,7 +246,7 @@ static int status_handler(request_rec *r)
           tu = ts = tcu = tcs = 0;
       
           if (!ap_exists_scoreboard_image()) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01237)
                             "Server status unavailable in inetd mode");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -292,6 +293,8 @@ static int status_handler(request_rec *r)
               }
           }
       
      +    ws_record = apr_palloc(r->pool, sizeof *ws_record);
      +
           for (i = 0; i < server_limit; ++i) {
       #ifdef HAVE_TIMES
               clock_t proc_tu = 0, proc_ts = 0, proc_tcu = 0, proc_tcs = 0;
      @@ -306,7 +309,7 @@ static int status_handler(request_rec *r)
               for (j = 0; j < thread_limit; ++j) {
                   int indx = (i * thread_limit) + j;
       
      -            ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
      +            ap_copy_scoreboard_worker(ws_record, i, j);
                   res = ws_record->status;
       
                   if ((i >= max_servers || j >= threads_per_child)
      @@ -391,6 +394,7 @@ static int status_handler(request_rec *r)
           /* up_time in seconds */
           up_time = (apr_uint32_t) apr_time_sec(nowtime -
                                      ap_scoreboard_image->global->restart_time);
      +    ap_get_loadavg(&t);
       
           if (!short_report) {
               ap_rputs(DOCTYPE_HTML_3_2
      @@ -398,10 +402,13 @@ static int status_handler(request_rec *r)
                        "<title>Apache Status</title>\n"
                        "</head><body>\n"
                        "<h1>Apache Server Status for ", r);
      -        ap_rvputs(r, ap_get_server_name(r), " (via ", r->connection->local_ip,
      +        ap_rvputs(r, ap_escape_html(r->pool, ap_get_server_name(r)),
      +                  " (via ", r->connection->local_ip,
                         ")</h1>\n\n", NULL);
               ap_rvputs(r, "<dl><dt>Server Version: ",
                         ap_get_server_description(), "</dt>\n", NULL);
      +        ap_rvputs(r, "<dt>Server MPM: ",
      +                  ap_show_mpm(), "</dt>\n", NULL);
               ap_rvputs(r, "<dt>Server Built: ",
                         ap_get_server_built(), "\n</dt></dl><hr /><dl>\n", NULL);
               ap_rvputs(r, "<dt>Current Time: ",
      @@ -419,6 +426,36 @@ static int status_handler(request_rec *r)
               ap_rputs("<dt>Server uptime: ", r);
               show_time(r, up_time);
               ap_rputs("</dt>\n", r);
      +        ap_rprintf(r, "<dt>Server load: %.2f %.2f %.2f</dt>\n",
      +                   t.loadavg, t.loadavg5, t.loadavg15);
      +    }
      +    else {
      +        ap_rvputs(r, ap_get_server_name(r), "\n", NULL);
      +        ap_rvputs(r, "ServerVersion: ",
      +                  ap_get_server_description(), "\n", NULL);
      +        ap_rvputs(r, "ServerMPM: ",
      +                  ap_show_mpm(), "\n", NULL);
      +        ap_rvputs(r, "Server Built: ",
      +                  ap_get_server_built(), "\n", NULL);
      +        ap_rvputs(r, "CurrentTime: ",
      +                  ap_ht_time(r->pool, nowtime, DEFAULT_TIME_FORMAT, 0),
      +                             "\n", NULL);
      +        ap_rvputs(r, "RestartTime: ",
      +                  ap_ht_time(r->pool,
      +                             ap_scoreboard_image->global->restart_time,
      +                             DEFAULT_TIME_FORMAT, 0),
      +                  "\n", NULL);
      +        ap_rprintf(r, "ParentServerConfigGeneration: %d\n",
      +                   ap_state_query(AP_SQ_CONFIG_GEN));
      +        ap_rprintf(r, "ParentServerMPMGeneration: %d\n",
      +                   (int)mpm_generation);
      +        ap_rprintf(r, "ServerUptimeSeconds: %u\n",
      +                   up_time);
      +        ap_rputs("ServerUptime:", r);
      +        show_time(r, up_time);
      +        ap_rputs("\n", r);
      +        ap_rprintf(r, "Load1: %.2f\nLoad5: %.2f\nLoad15: %.2f\n",
      +                   t.loadavg, t.loadavg5, t.loadavg15);
           }
       
           if (ap_extended_status) {
      @@ -429,6 +466,9 @@ static int status_handler(request_rec *r)
       
       #ifdef HAVE_TIMES
                   /* Allow for OS/2 not having CPU stats */
      +            ap_rprintf(r, "CPUUser: %g\nCPUSystem: %g\nCPUChildrenUser: %g\nCPUChildrenSystem: %g\n",
      +                       tu / tick, ts / tick, tcu / tick, tcs / tick);
      +
                   if (ts || tu || tcu || tcs)
                       ap_rprintf(r, "CPULoad: %g\n",
                                  (tu + ts + tcu + tcs) / tick / up_time * 100.);
      @@ -491,7 +531,7 @@ static int status_handler(request_rec *r)
       
           if (is_async) {
               int write_completion = 0, lingering_close = 0, keep_alive = 0,
      -            connections = 0;
      +            connections = 0, stopping = 0, procs = 0;
               /*
                * These differ from 'busy' and 'ready' in how gracefully finishing
                * threads are counted. XXX: How to make this clear in the html?
      @@ -499,13 +539,15 @@ static int status_handler(request_rec *r)
               int busy_workers = 0, idle_workers = 0;
               if (!short_report)
                   ap_rputs("\n\n<table rules=\"all\" cellpadding=\"1%\">\n"
      -                     "<tr><th rowspan=\"2\">PID</th>"
      +                     "<tr><th rowspan=\"2\">Slot</th>"
      +                         "<th rowspan=\"2\">PID</th>"
      +                         "<th rowspan=\"2\">Stopping</th>"
                                "<th colspan=\"2\">Connections</th>\n"
                                "<th colspan=\"2\">Threads</th>"
      -                         "<th colspan=\"4\">Async connections</th></tr>\n"
      +                         "<th colspan=\"3\">Async connections</th></tr>\n"
                            "<tr><th>total</th><th>accepting</th>"
      -                         "<th>busy</th><th>idle</th><th>writing</th>"
      -                         "<th>keep-alive</th><th>closing</th></tr>\n", r);
      +                         "<th>busy</th><th>idle</th>"
      +                         "<th>writing</th><th>keep-alive</th><th>closing</th></tr>\n", r);
               for (i = 0; i < server_limit; ++i) {
                   ps_record = ap_get_scoreboard_process(i);
                   if (ps_record->pid) {
      @@ -515,26 +557,45 @@ static int status_handler(request_rec *r)
                       lingering_close  += ps_record->lingering_close;
                       busy_workers     += thread_busy_buffer[i];
                       idle_workers     += thread_idle_buffer[i];
      -                if (!short_report)
      -                    ap_rprintf(r, "<tr><td>%" APR_PID_T_FMT "</td><td>%u</td>"
      -                                      "<td>%s</td><td>%u</td><td>%u</td>"
      +                if (!short_report) {
      +                    const char *dying = "no";
      +                    const char *old = "";
      +                    if (ps_record->quiescing) {
      +                        dying = "yes";
      +                        stopping++;
      +                    }
      +                    if (ps_record->generation != mpm_generation)
      +                        old = " (old gen)";
      +                    procs++;
      +                    ap_rprintf(r, "<tr><td>%u</td><td>%" APR_PID_T_FMT "</td>"
      +                                      "<td>%s%s</td>"
      +                                      "<td>%u</td><td>%s</td>"
      +                                      "<td>%u</td><td>%u</td>"
                                             "<td>%u</td><td>%u</td><td>%u</td>"
                                             "</tr>\n",
      -                               ps_record->pid, ps_record->connections,
      +                               i, ps_record->pid,
      +                               dying, old,
      +                               ps_record->connections,
                                      ps_record->not_accepting ? "no" : "yes",
      -                               thread_busy_buffer[i], thread_idle_buffer[i],
      +                               thread_busy_buffer[i],
      +                               thread_idle_buffer[i],
                                      ps_record->write_completion,
                                      ps_record->keep_alive,
                                      ps_record->lingering_close);
      +                }
                   }
               }
               if (!short_report) {
      -            ap_rprintf(r, "<tr><td>Sum</td><td>%d</td><td>&nbsp;</td><td>%d</td>"
      -                          "<td>%d</td><td>%d</td><td>%d</td><td>%d</td>"
      +            ap_rprintf(r, "<tr><td>Sum</td>"
      +                          "<td>%d</td><td>%d</td>"
      +                          "<td>%d</td><td>&nbsp;</td>"
      +                          "<td>%d</td><td>%d</td>"
      +                          "<td>%d</td><td>%d</td><td>%d</td>"
                                 "</tr>\n</table>\n",
      -                          connections, busy_workers, idle_workers,
      +                          procs, stopping,
      +                          connections,
      +                          busy_workers, idle_workers,
                                 write_completion, keep_alive, lingering_close);
      -
               }
               else {
                   ap_rprintf(r, "ConnsTotal: %d\n"
      @@ -582,8 +643,8 @@ static int status_handler(request_rec *r)
                        "\"<b><code>L</code></b>\" Logging, \n"
                        "\"<b><code>G</code></b>\" Gracefully finishing,<br /> \n"
                        "\"<b><code>I</code></b>\" Idle cleanup of worker, \n"
      -                 "\"<b><code>.</code></b>\" Open slot with no current process,<br />\n"
      -                 "<p />\n", r);
      +                 "\"<b><code>.</code></b>\" Open slot with no current process<br />\n"
      +                 "</p>\n", r);
               if (!ap_extended_status) {
                   int j;
                   int k = 0;
      @@ -624,12 +685,12 @@ static int status_handler(request_rec *r)
       #endif
                            "<th>SS</th><th>Req</th>"
                            "<th>Conn</th><th>Child</th><th>Slot</th>"
      -                     "<th>Client</th><th>VHost</th>"
      +                     "<th>Client</th><th>Protocol</th><th>VHost</th>"
                            "<th>Request</th></tr>\n\n", r);
       
               for (i = 0; i < server_limit; ++i) {
                   for (j = 0; j < thread_limit; ++j) {
      -                ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
      +                ap_copy_scoreboard_worker(ws_record, i, j);
       
                       if (ws_record->access_count == 0 &&
                           (ws_record->status == SERVER_READY ||
      @@ -738,12 +799,14 @@ static int status_handler(request_rec *r)
                           format_byte_out(r, bytes);
                           ap_rputs(")\n", r);
                           ap_rprintf(r,
      -                               " <i>%s {%s}</i> <b>[%s]</b><br />\n\n",
      +                               " <i>%s {%s}</i> <i>(%s)</i> <b>[%s]</b><br />\n\n",
                                      ap_escape_html(r->pool,
                                                     ws_record->client),
                                      ap_escape_html(r->pool,
                                                     ap_escape_logitem(r->pool,
                                                                       ws_record->request)),
      +                               ap_escape_html(r->pool,
      +                                              ws_record->protocol),
                                      ap_escape_html(r->pool,
                                                     ws_record->vhost));
                       }
      @@ -822,10 +885,12 @@ static int status_handler(request_rec *r)
                                      (float)conn_bytes / KBYTE, (float) my_bytes / MBYTE,
                                      (float)bytes / MBYTE);
       
      -                    ap_rprintf(r, "</td><td>%s</td><td nowrap>%s</td>"
      +                    ap_rprintf(r, "</td><td>%s</td><td>%s</td><td nowrap>%s</td>"
                                         "<td nowrap>%s</td></tr>\n\n",
                                      ap_escape_html(r->pool,
                                                     ws_record->client),
      +                               ap_escape_html(r->pool,
      +                                              ws_record->protocol),
                                      ap_escape_html(r->pool,
                                                     ws_record->vhost),
                                      ap_escape_html(r->pool,
      @@ -947,4 +1012,3 @@ AP_DECLARE_MODULE(status) =
           NULL,                       /* command table */
           register_hooks              /* register_hooks */
       };
      -
      diff --git a/modules/generators/mod_status.dep b/modules/generators/mod_status.dep
      new file mode 100644
      index 00000000000..7ec631b27d2
      --- /dev/null
      +++ b/modules/generators/mod_status.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_status.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_status.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_status.h"\
      +	
      diff --git a/modules/generators/mod_status.mak b/modules/generators/mod_status.mak
      new file mode 100644
      index 00000000000..168bbc8b087
      --- /dev/null
      +++ b/modules/generators/mod_status.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_status.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_status - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_status - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_status - Win32 Release" && "$(CFG)" != "mod_status - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_status.mak" CFG="mod_status - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_status - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_status - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_status - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_status.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_status.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_status.obj"
      +	-@erase "$(INTDIR)\mod_status.res"
      +	-@erase "$(INTDIR)\mod_status_src.idb"
      +	-@erase "$(INTDIR)\mod_status_src.pdb"
      +	-@erase "$(OUTDIR)\mod_status.exp"
      +	-@erase "$(OUTDIR)\mod_status.lib"
      +	-@erase "$(OUTDIR)\mod_status.pdb"
      +	-@erase "$(OUTDIR)\mod_status.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "STATUS_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_status_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_status.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_status.so" /d LONG_NAME="status_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_status.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_status.pdb" /debug /out:"$(OUTDIR)\mod_status.so" /implib:"$(OUTDIR)\mod_status.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_status.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_status.obj" \
      +	"$(INTDIR)\mod_status.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_status.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_status.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_status.so"
      +   if exist .\Release\mod_status.so.manifest mt.exe -manifest .\Release\mod_status.so.manifest -outputresource:.\Release\mod_status.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_status - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_status.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_status.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_status.obj"
      +	-@erase "$(INTDIR)\mod_status.res"
      +	-@erase "$(INTDIR)\mod_status_src.idb"
      +	-@erase "$(INTDIR)\mod_status_src.pdb"
      +	-@erase "$(OUTDIR)\mod_status.exp"
      +	-@erase "$(OUTDIR)\mod_status.lib"
      +	-@erase "$(OUTDIR)\mod_status.pdb"
      +	-@erase "$(OUTDIR)\mod_status.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "STATUS_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_status_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_status.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_status.so" /d LONG_NAME="status_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_status.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_status.pdb" /debug /out:"$(OUTDIR)\mod_status.so" /implib:"$(OUTDIR)\mod_status.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_status.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_status.obj" \
      +	"$(INTDIR)\mod_status.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_status.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_status.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_status.so"
      +   if exist .\Debug\mod_status.so.manifest mt.exe -manifest .\Debug\mod_status.so.manifest -outputresource:.\Debug\mod_status.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_status.dep")
      +!INCLUDE "mod_status.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_status.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_status - Win32 Release" || "$(CFG)" == "mod_status - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_status - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_status - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_status - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_status - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\generators"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\generators"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_status - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ELSEIF  "$(CFG)" == "mod_status - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\generators"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\generators"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_status - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_status.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_status.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_status.so" /d LONG_NAME="status_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_status - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_status.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_status.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_status.so" /d LONG_NAME="status_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_status.c
      +
      +"$(INTDIR)\mod_status.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/generators/mod_suexec.c b/modules/generators/mod_suexec.c
      index 9a7d2cfe4f7..75e96404c01 100644
      --- a/modules/generators/mod_suexec.c
      +++ b/modules/generators/mod_suexec.c
      @@ -97,7 +97,7 @@ static int suexec_post_config(apr_pool_t *p, apr_pool_t *plog,
                                 s->process->pool);
       
           if ((reported == NULL) && ap_unixd_config.suexec_enabled) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01232)
                            "suEXEC mechanism enabled (wrapper: %s)", SUEXEC_BIN);
       
               apr_pool_userdata_set((void *)1, SUEXEC_POST_CONFIG_USERDATA,
      diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c
      index 14c7630299e..de585c5750c 100644
      --- a/modules/http/byterange_filter.c
      +++ b/modules/http/byterange_filter.c
      @@ -82,8 +82,6 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
                                   int *overlaps, int *reversals)
       {
           const char *range;
      -    const char *if_range;
      -    const char *match;
           const char *ct;
           char *cur;
           apr_array_header_t *merged;
      @@ -135,20 +133,9 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
       
           /*
            * Check the If-Range header for Etag or Date.
      -     * Note that this check will return false (as required) if either
      -     * of the two etags are weak.
            */
      -    if ((if_range = apr_table_get(r->headers_in, "If-Range"))) {
      -        if (if_range[0] == '"') {
      -            if (!(match = apr_table_get(r->headers_out, "Etag"))
      -                || (strcmp(if_range, match) != 0)) {
      -                return 0;
      -            }
      -        }
      -        else if (!(match = apr_table_get(r->headers_out, "Last-Modified"))
      -                 || (strcmp(if_range, match) != 0)) {
      -            return 0;
      -        }
      +    if (AP_CONDITION_NOMATCH == ap_condition_if_range(r, r->headers_out)) {
      +        return 0;
           }
       
           range += 6;
      @@ -305,7 +292,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength,
       
           r->status = HTTP_PARTIAL_CONTENT;
           r->range = apr_array_pstrcat(r->pool, merged, ',');
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01583)
                         "Range: %s | %s (%d : %d : %"APR_OFF_T_FMT")",
                         it, r->range, *overlaps, *reversals, clength);
       
      @@ -393,8 +380,7 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb,
                           return rv;
                       }
                       out_first = APR_BUCKET_NEXT(copy);
      -                APR_BUCKET_REMOVE(copy);
      -                apr_bucket_destroy(copy);
      +                apr_bucket_delete(copy);
                   }
                   else {
                       out_first = copy;
      @@ -413,8 +399,7 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb,
                       }
                       copy = APR_BUCKET_NEXT(copy);
                       if (copy != APR_BRIGADE_SENTINEL(bbout)) {
      -                    APR_BUCKET_REMOVE(copy);
      -                    apr_bucket_destroy(copy);
      +                    apr_bucket_delete(copy);
                       }
                   }
                   break;
      @@ -551,7 +536,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
       
               rv = copy_brigade_range(bb, tmpbb, range_start, range_end);
               if (rv != APR_SUCCESS ) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01584)
                                 "copy_brigade_range() failed [%" APR_OFF_T_FMT
                                 "-%" APR_OFF_T_FMT ",%" APR_OFF_T_FMT "]",
                                 range_start, range_end, clength);
      diff --git a/modules/http/http_core.c b/modules/http/http_core.c
      index 8970ae6dc46..f395bcc445e 100644
      --- a/modules/http/http_core.c
      +++ b/modules/http/http_core.c
      @@ -61,6 +61,17 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy,
           if (ap_timeout_parameter_parse(arg, &timeout, "s") != APR_SUCCESS)
               return "KeepAliveTimeout has wrong format";
           cmd->server->keep_alive_timeout = timeout;
      +
      +    /* We don't want to take into account whether or not KeepAliveTimeout is
      +     * set for the main server, because if no http_module directive is used
      +     * for a vhost, it will inherit the http_srv_cfg from the main server.
      +     * However keep_alive_timeout_set helps determine whether the vhost should
      +     * use its own configured timeout or the one from the vhost declared first
      +     * on the same IP:port (ie. c->base_server, and the legacy behaviour).
      +     */
      +    if (cmd->server->is_virtual) {
      +        cmd->server->keep_alive_timeout_set = 1;
      +    }
           return NULL;
       }
       
      @@ -126,6 +137,7 @@ static int ap_process_http_async_connection(conn_rec *c)
           request_rec *r;
           conn_state_t *cs = c->cs;
       
      +    AP_DEBUG_ASSERT(cs != NULL);
           AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE);
       
           while (cs->state == CONN_STATE_READ_REQUEST_LINE) {
      @@ -136,9 +148,9 @@ static int ap_process_http_async_connection(conn_rec *c)
                   c->keepalive = AP_CONN_UNKNOWN;
                   /* process the request if it was read without error */
       
      -            ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
                   if (r->status == HTTP_OK) {
                       cs->state = CONN_STATE_HANDLER;
      +                ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
                       ap_process_async_request(r);
                       /* After the call to ap_process_request, the
                        * request pool may have been deleted.  We set
      @@ -178,13 +190,23 @@ static int ap_process_http_sync_connection(conn_rec *c)
       
           ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
           while ((r = ap_read_request(c)) != NULL) {
      +        apr_interval_time_t keep_alive_timeout = r->server->keep_alive_timeout;
      +
      +        /* To preserve legacy behaviour, use the keepalive timeout from the
      +         * base server (first on this IP:port) when none is explicitly
      +         * configured on this server.
      +         */
      +        if (!r->server->keep_alive_timeout_set) {
      +            keep_alive_timeout = c->base_server->keep_alive_timeout;
      +        }
       
               c->keepalive = AP_CONN_UNKNOWN;
               /* process the request if it was read without error */
       
      -        ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
               if (r->status == HTTP_OK) {
      -            cs->state = CONN_STATE_HANDLER;
      +            if (cs)
      +                cs->state = CONN_STATE_HANDLER;
      +            ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
                   ap_process_request(r);
                   /* After the call to ap_process_request, the
                    * request pool will have been deleted.  We set
      @@ -213,7 +235,7 @@ static int ap_process_http_sync_connection(conn_rec *c)
                   csd = ap_get_conn_socket(c);
               }
               apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
      -        apr_socket_timeout_set(csd, c->base_server->keep_alive_timeout);
      +        apr_socket_timeout_set(csd, keep_alive_timeout);
               /* Go straight to select() to wait for the next request */
           }
       
      diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c
      index eda0e5dd1f7..595d3c4a806 100644
      --- a/modules/http/http_filters.c
      +++ b/modules/http/http_filters.c
      @@ -57,24 +57,29 @@
       
       APLOG_USE_MODULE(http);
       
      -#define INVALID_CHAR -2
      -
      -static long get_chunk_size(char *);
      -
      -typedef struct http_filter_ctx {
      +typedef struct http_filter_ctx
      +{
           apr_off_t remaining;
           apr_off_t limit;
           apr_off_t limit_used;
      -    enum {
      -        BODY_NONE,
      -        BODY_LENGTH,
      -        BODY_CHUNK,
      -        BODY_CHUNK_PART
      +    apr_int32_t chunk_used;
      +    apr_int32_t chunk_bws;
      +    apr_int32_t chunkbits;
      +    enum
      +    {
      +        BODY_NONE, /* streamed data */
      +        BODY_LENGTH, /* data constrained by content length */
      +        BODY_CHUNK, /* chunk expected */
      +        BODY_CHUNK_PART, /* chunk digits */
      +        BODY_CHUNK_EXT, /* chunk extension */
      +        BODY_CHUNK_CR, /* got space(s) after digits, expect [CR]LF or ext */
      +        BODY_CHUNK_LF, /* got CR after digits or ext, expect LF */
      +        BODY_CHUNK_DATA, /* data constrained by chunked encoding */
      +        BODY_CHUNK_END, /* chunked data terminating CRLF */
      +        BODY_CHUNK_END_LF, /* got CR after data, expect LF */
      +        BODY_CHUNK_TRAILER /* trailers */
           } state;
      -    int eos_sent;
      -    char chunk_ln[32];
      -    char *pos;
      -    apr_off_t linesize;
      +    unsigned int eos_sent :1;
           apr_bucket_brigade *bb;
       } http_ctx_t;
       
      @@ -87,6 +92,23 @@ static apr_status_t bail_out_on_error(http_ctx_t *ctx,
           apr_bucket_brigade *bb = ctx->bb;
       
           apr_brigade_cleanup(bb);
      +
      +    if (f->r->proxyreq == PROXYREQ_RESPONSE) {
      +        switch (http_error) {
      +        case HTTP_REQUEST_ENTITY_TOO_LARGE:
      +            return APR_ENOSPC;
      +
      +        case HTTP_REQUEST_TIME_OUT:
      +            return APR_INCOMPLETE;
      +
      +        case HTTP_NOT_IMPLEMENTED:
      +            return APR_ENOTIMPL;
      +
      +        default:
      +            return APR_EGENERAL;
      +        }
      +    }
      +
           e = ap_bucket_error_create(http_error,
                                      NULL, f->r->pool,
                                      f->c->bucket_alloc);
      @@ -102,117 +124,212 @@ static apr_status_t bail_out_on_error(http_ctx_t *ctx,
           return ap_pass_brigade(f->r->output_filters, bb);
       }
       
      -static apr_status_t get_remaining_chunk_line(http_ctx_t *ctx,
      -                                             apr_bucket_brigade *b,
      -                                             int linelimit)
      +/**
      + * Parse a chunk line with optional extension, detect overflow.
      + * There are several error cases:
      + *  1) If the chunk link is misformatted, APR_EINVAL is returned.
      + *  2) If the conversion would require too many bits, APR_EGENERAL is returned.
      + *  3) If the conversion used the correct number of bits, but an overflow
      + *     caused only the sign bit to flip, then APR_ENOSPC is returned.
      + * A negative chunk length always indicates an overflow error.
      + */
      +static apr_status_t parse_chunk_size(http_ctx_t *ctx, const char *buffer,
      +                                     apr_size_t len, int linelimit, int strict)
       {
      -    apr_status_t rv;
      -    apr_off_t brigade_length;
      -    apr_bucket *e;
      -    const char *lineend;
      -    apr_size_t len = 0;
      +    apr_size_t i = 0;
       
      -    /*
      -     * As the brigade b should have been requested in mode AP_MODE_GETLINE
      -     * all buckets in this brigade are already some type of memory
      -     * buckets (due to the needed scanning for LF in mode AP_MODE_GETLINE)
      -     * or META buckets.
      -     */
      -    rv = apr_brigade_length(b, 0, &brigade_length);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -    /* Sanity check. Should never happen. See above. */
      -    if (brigade_length == -1) {
      -        return APR_EGENERAL;
      -    }
      -    if (!brigade_length) {
      -        return APR_EAGAIN;
      -    }
      -    ctx->linesize += brigade_length;
      -    if (ctx->linesize > linelimit) {
      -        return APR_ENOSPC;
      -    }
      -    /*
      -     * As all buckets are already some type of memory buckets or META buckets
      -     * (see above), we only need to check the last byte in the last data bucket.
      -     */
      -    for (e = APR_BRIGADE_LAST(b);
      -         e != APR_BRIGADE_SENTINEL(b);
      -         e = APR_BUCKET_PREV(e)) {
      +    while (i < len) {
      +        char c = buffer[i];
      +
      +        ap_xlate_proto_from_ascii(&c, 1);
       
      -        if (APR_BUCKET_IS_METADATA(e)) {
      +        /* handle CRLF after the chunk */
      +        if (ctx->state == BODY_CHUNK_END
      +                || ctx->state == BODY_CHUNK_END_LF) {
      +            if (c == LF) {
      +                if (strict && (ctx->state != BODY_CHUNK_END_LF)) {
      +                    /*
      +                     * CR missing before LF.
      +                     */
      +                    return APR_EINVAL;
      +                }
      +                ctx->state = BODY_CHUNK;
      +            }
      +            else if (c == CR && ctx->state == BODY_CHUNK_END) {
      +                ctx->state = BODY_CHUNK_END_LF;
      +            }
      +            else {
      +                /*
      +                 * CRLF expected.
      +                 */
      +                return APR_EINVAL;
      +            }
      +            i++;
                   continue;
               }
      -        rv = apr_bucket_read(e, &lineend, &len, APR_BLOCK_READ);
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      +
      +        /* handle start of the chunk */
      +        if (ctx->state == BODY_CHUNK) {
      +            if (!apr_isxdigit(c)) {
      +                /*
      +                 * Detect invalid character at beginning. This also works for
      +                 * empty chunk size lines.
      +                 */
      +                return APR_EINVAL;
      +            }
      +            else {
      +                ctx->state = BODY_CHUNK_PART;
      +            }
      +            ctx->remaining = 0;
      +            ctx->chunkbits = sizeof(apr_off_t) * 8;
      +            ctx->chunk_used = 0;
      +            ctx->chunk_bws = 0;
      +        }
      +
      +        if (c == LF) {
      +            if (strict && (ctx->state != BODY_CHUNK_LF)) {
      +                /*
      +                 * CR missing before LF.
      +                 */
      +                return APR_EINVAL;
      +            }
      +            if (ctx->remaining) {
      +                ctx->state = BODY_CHUNK_DATA;
      +            }
      +            else {
      +                ctx->state = BODY_CHUNK_TRAILER;
      +            }
               }
      -        if (len > 0) {
      -            break;  /* we got the data we want */
      +        else if (ctx->state == BODY_CHUNK_LF) {
      +            /*
      +             * LF expected.
      +             */
      +            return APR_EINVAL;
               }
      -        /* If we got a zero-length data bucket, we try the next one */
      -    }
      -    /* We had no data in this brigade */
      -    if (!len || e == APR_BRIGADE_SENTINEL(b)) {
      -        return APR_EAGAIN;
      +        else if (c == CR) {
      +            ctx->state = BODY_CHUNK_LF;
      +        }
      +        else if (c == ';') {
      +            ctx->state = BODY_CHUNK_EXT;
      +        }
      +        else if (ctx->state == BODY_CHUNK_EXT) {
      +            /*
      +             * Control chars (excluding tabs) are invalid.
      +             * TODO: more precisely limit input
      +             */
      +            if (c != '\t' && apr_iscntrl(c)) {
      +                return APR_EINVAL;
      +            }
      +        }
      +        else if (c == ' ' || c == '\t') {
      +            /* Be lenient up to 10 implied *LWS, a legacy of RFC 2616,
      +             * and noted as errata to RFC7230;
      +             * https://www.rfc-editor.org/errata_search.php?rfc=7230&eid=4667
      +             */
      +            ctx->state = BODY_CHUNK_CR;
      +            if (++ctx->chunk_bws > 10) {
      +                return APR_EINVAL;
      +            }
      +        }
      +        else if (ctx->state == BODY_CHUNK_CR) {
      +            /*
      +             * ';', CR or LF expected.
      +             */
      +            return APR_EINVAL;
      +        }
      +        else if (ctx->state == BODY_CHUNK_PART) {
      +            int xvalue;
      +
      +            /* ignore leading zeros */
      +            if (!ctx->remaining && c == '0') {
      +                i++;
      +                continue;
      +            }
      +
      +            ctx->chunkbits -= 4;
      +            if (ctx->chunkbits < 0) {
      +                /* overflow */
      +                return APR_ENOSPC;
      +            }
      +
      +            if (c >= '0' && c <= '9') {
      +                xvalue = c - '0';
      +            }
      +            else if (c >= 'A' && c <= 'F') {
      +                xvalue = c - 'A' + 0xa;
      +            }
      +            else if (c >= 'a' && c <= 'f') {
      +                xvalue = c - 'a' + 0xa;
      +            }
      +            else {
      +                /* bogus character */
      +                return APR_EINVAL;
      +            }
      +
      +            ctx->remaining = (ctx->remaining << 4) | xvalue;
      +            if (ctx->remaining < 0) {
      +                /* overflow */
      +                return APR_ENOSPC;
      +            }
      +        }
      +        else {
      +            /* Should not happen */
      +            return APR_EGENERAL;
      +        }
      +
      +        i++;
           }
      -    if (lineend[len - 1] != APR_ASCII_LF) {
      -        return APR_EAGAIN;
      +
      +    /* sanity check */
      +    ctx->chunk_used += len;
      +    if (ctx->chunk_used < 0 || ctx->chunk_used > linelimit) {
      +        return APR_ENOSPC;
           }
      -    /* Line is complete. So reset ctx for next round. */
      -    ctx->linesize = 0;
      -    ctx->pos = ctx->chunk_ln;
      +
           return APR_SUCCESS;
       }
       
      -static apr_status_t get_chunk_line(http_ctx_t *ctx, apr_bucket_brigade *b,
      -                                   int linelimit)
      +static apr_status_t read_chunked_trailers(http_ctx_t *ctx, ap_filter_t *f,
      +                                          apr_bucket_brigade *b, int merge)
       {
      -    apr_size_t len;
      -    int tmp_len;
      -    apr_status_t rv;
      +    int rv;
      +    apr_bucket *e;
      +    request_rec *r = f->r;
      +    apr_table_t *saved_headers_in = r->headers_in;
      +    int saved_status = r->status;
      +
      +    r->status = HTTP_OK;
      +    r->headers_in = r->trailers_in;
      +    apr_table_clear(r->headers_in);
      +    ap_get_mime_headers(r);
       
      -    tmp_len = sizeof(ctx->chunk_ln) - (ctx->pos - ctx->chunk_ln) - 1;
      -    /* Saveguard ourselves against underflows */
      -    if (tmp_len < 0) {
      -        len = 0;
      +    if(r->status == HTTP_OK) {
      +        r->status = saved_status;
      +        e = apr_bucket_eos_create(f->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(b, e);
      +        ctx->eos_sent = 1;
      +        rv = APR_SUCCESS;
           }
           else {
      -        len = (apr_size_t) tmp_len;
      +        const char *error_notes = apr_table_get(r->notes,
      +                                                "error-notes");
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02656)
      +                      "Error while reading HTTP trailer: %i%s%s",
      +                      r->status, error_notes ? ": " : "",
      +                      error_notes ? error_notes : "");
      +        rv = APR_EINVAL;
           }
      -    /*
      -     * Check if there is space left in ctx->chunk_ln. If not, then either
      -     * the chunk size is insane or we have chunk-extensions. Ignore both
      -     * by discarding the remaining part of the line via
      -     * get_remaining_chunk_line. Only bail out if the line is too long.
      -     */
      -    if (len > 0) {
      -        rv = apr_brigade_flatten(b, ctx->pos, &len);
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      -        }
      -        ctx->pos += len;
      -        ctx->linesize += len;
      -        *(ctx->pos) = '\0';
      -        /*
      -         * Check if we really got a full line. If yes the
      -         * last char in the just read buffer must be LF.
      -         * If not advance the buffer and return APR_EAGAIN.
      -         * We do not start processing until we have the
      -         * full line.
      -         */
      -        if (ctx->pos[-1] != APR_ASCII_LF) {
      -            /* Check if the remaining data in the brigade has the LF */
      -            return get_remaining_chunk_line(ctx, b, linelimit);
      -        }
      -        /* Line is complete. So reset ctx->pos for next round. */
      -        ctx->pos = ctx->chunk_ln;
      -        return APR_SUCCESS;
      +
      +    if(!merge) {
      +        r->headers_in = saved_headers_in;
      +    }
      +    else {
      +        r->headers_in = apr_table_overlay(r->pool, saved_headers_in,
      +                r->trailers_in);
           }
      -    return get_remaining_chunk_line(ctx, b, linelimit);
      -}
       
      +    return rv;
      +}
       
       /* This is the HTTP_INPUT filter for HTTP requests and responses from
        * proxied servers (mod_proxy).  It handles chunked and content-length
      @@ -223,12 +340,16 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                                   ap_input_mode_t mode, apr_read_type_e block,
                                   apr_off_t readbytes)
       {
      +    core_server_config *conf =
      +        (core_server_config *) ap_get_module_config(f->r->server->module_config,
      +                                                    &core_module);
      +    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
           apr_bucket *e;
           http_ctx_t *ctx = f->ctx;
           apr_status_t rv;
      -    apr_off_t totalread;
           int http_error = HTTP_REQUEST_ENTITY_TOO_LARGE;
           apr_bucket_brigade *bb;
      +    int again;
       
           /* just get out of the way of things we don't want. */
           if (mode != AP_MODE_READBYTES && mode != AP_MODE_GETLINE) {
      @@ -239,7 +360,6 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
               const char *tenc, *lenp;
               f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
               ctx->state = BODY_NONE;
      -        ctx->pos = ctx->chunk_ln;
               ctx->bb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
               bb = ctx->bb;
       
      @@ -259,25 +379,33 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
               lenp = apr_table_get(f->r->headers_in, "Content-Length");
       
               if (tenc) {
      -            if (!strcasecmp(tenc, "chunked")) {
      +            if (strcasecmp(tenc, "chunked") == 0 /* fast path */
      +                    || ap_find_last_token(f->r->pool, tenc, "chunked")) {
                       ctx->state = BODY_CHUNK;
                   }
      -            /* test lenp, because it gives another case we can handle */
      -            else if (!lenp) {
      -                /* Something that isn't in HTTP, unless some future
      -                 * edition defines new transfer ecodings, is unsupported.
      +            else if (f->r->proxyreq == PROXYREQ_RESPONSE) {
      +                /* http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23
      +                 * Section 3.3.3.3: "If a Transfer-Encoding header field is
      +                 * present in a response and the chunked transfer coding is not
      +                 * the final encoding, the message body length is determined by
      +                 * reading the connection until it is closed by the server."
                        */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      -                              "Unknown Transfer-Encoding: %s", tenc);
      -                return bail_out_on_error(ctx, f, HTTP_NOT_IMPLEMENTED);
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(02555)
      +                              "Unknown Transfer-Encoding: %s; "
      +                              "using read-until-close", tenc);
      +                tenc = NULL;
                   }
                   else {
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r,
      -                  "Unknown Transfer-Encoding: %s; using Content-Length", tenc);
      -                tenc = NULL;
      +                /* Something that isn't a HTTP request, unless some future
      +                 * edition defines new transfer encodings, is unsupported.
      +                 */
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(01585)
      +                              "Unknown Transfer-Encoding: %s", tenc);
      +                return bail_out_on_error(ctx, f, HTTP_BAD_REQUEST);
                   }
      +            lenp = NULL;
               }
      -        if (lenp && !tenc) {
      +        if (lenp) {
                   char *endstr;
       
                   ctx->state = BODY_LENGTH;
      @@ -289,17 +417,17 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                       || endstr == lenp || *endstr || ctx->remaining < 0) {
       
                       ctx->remaining = 0;
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(01587)
                                     "Invalid Content-Length");
       
      -                return bail_out_on_error(ctx, f, HTTP_REQUEST_ENTITY_TOO_LARGE);
      +                return bail_out_on_error(ctx, f, HTTP_BAD_REQUEST);
                   }
       
                   /* If we have a limit in effect and we know the C-L ahead of
                    * time, stop it here if it is invalid.
                    */
                   if (ctx->limit && ctx->limit < ctx->remaining) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(01588)
                                 "Requested content-length of %" APR_OFF_T_FMT
                                 " is larger than the configured limit"
                                 " of %" APR_OFF_T_FMT, ctx->remaining, ctx->limit);
      @@ -334,7 +462,8 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                   if (!ap_is_HTTP_SUCCESS(f->r->status)) {
                       ctx->state = BODY_NONE;
                       ctx->eos_sent = 1;
      -            } else {
      +            }
      +            else {
                       char *tmp;
                       int len;
       
      @@ -342,7 +471,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                        * in a state of expecting one.
                        */
                       f->r->expecting_100 = 0;
      -                tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL, " ",
      +                tmp = apr_pstrcat(f->r->pool, AP_SERVER_PROTOCOL " ",
                                         ap_get_status_line(HTTP_CONTINUE), CRLF CRLF,
                                         NULL);
                       len = strlen(tmp);
      @@ -354,289 +483,274 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
                       e = apr_bucket_flush_create(f->c->bucket_alloc);
                       APR_BRIGADE_INSERT_TAIL(bb, e);
       
      -                ap_pass_brigade(f->c->output_filters, bb);
      -            }
      -        }
      -
      -        /* We can't read the chunk until after sending 100 if required. */
      -        if (ctx->state == BODY_CHUNK) {
      -            apr_brigade_cleanup(bb);
      -
      -            rv = ap_get_brigade(f->next, bb, AP_MODE_GETLINE,
      -                                block, 0);
      -
      -            /* for timeout */
      -            if (block == APR_NONBLOCK_READ &&
      -                ( (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ||
      -                  (APR_STATUS_IS_EAGAIN(rv)) )) {
      -                ctx->state = BODY_CHUNK_PART;
      -                return APR_EAGAIN;
      -            }
      -
      -            if (rv == APR_SUCCESS) {
      -                rv = get_chunk_line(ctx, bb, f->r->server->limit_req_line);
      -                if (APR_STATUS_IS_EAGAIN(rv)) {
      -                    apr_brigade_cleanup(bb);
      -                    ctx->state = BODY_CHUNK_PART;
      -                    return rv;
      -                }
      -                if (rv == APR_SUCCESS) {
      -                    ctx->remaining = get_chunk_size(ctx->chunk_ln);
      -                    if (ctx->remaining == INVALID_CHAR) {
      -                        rv = APR_EGENERAL;
      -                        http_error = HTTP_BAD_REQUEST;
      -                    }
      +                rv = ap_pass_brigade(f->c->output_filters, bb);
      +                if (rv != APR_SUCCESS) {
      +                    return AP_FILTER_ERROR;
                       }
                   }
      -            apr_brigade_cleanup(bb);
      -
      -            /* Detect chunksize error (such as overflow) */
      -            if (rv != APR_SUCCESS || ctx->remaining < 0) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, "Error reading first chunk %s ",
      -                              (ctx->remaining < 0) ? "(overflow)" : "");
      -                ctx->remaining = 0; /* Reset it in case we have to
      -                                     * come back here later */
      -                if (APR_STATUS_IS_TIMEUP(rv)) {
      -                    http_error = HTTP_REQUEST_TIME_OUT;
      -                }
      -                return bail_out_on_error(ctx, f, http_error);
      -            }
      -
      -            if (!ctx->remaining) {
      -                /* Handle trailers by calling ap_get_mime_headers again! */
      -                ctx->state = BODY_NONE;
      -                ap_get_mime_headers(f->r);
      -                e = apr_bucket_eos_create(f->c->bucket_alloc);
      -                APR_BRIGADE_INSERT_TAIL(b, e);
      -                ctx->eos_sent = 1;
      -                return APR_SUCCESS;
      -            }
               }
           }
      -    else {
      -        bb = ctx->bb;
      -    }
       
      +    /* sanity check in case we're read twice */
           if (ctx->eos_sent) {
               e = apr_bucket_eos_create(f->c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(b, e);
               return APR_SUCCESS;
           }
       
      -    if (!ctx->remaining) {
      +    do {
      +        apr_brigade_cleanup(b);
      +        again = 0; /* until further notice */
      +
      +        /* read and handle the brigade */
               switch (ctx->state) {
      -        case BODY_NONE:
      -            break;
      -        case BODY_LENGTH:
      -            e = apr_bucket_eos_create(f->c->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(b, e);
      -            ctx->eos_sent = 1;
      -            return APR_SUCCESS;
               case BODY_CHUNK:
               case BODY_CHUNK_PART:
      -            {
      -                apr_brigade_cleanup(bb);
      +        case BODY_CHUNK_EXT:
      +        case BODY_CHUNK_CR:
      +        case BODY_CHUNK_LF:
      +        case BODY_CHUNK_END:
      +        case BODY_CHUNK_END_LF: {
       
      -                /* We need to read the CRLF after the chunk.  */
      -                if (ctx->state == BODY_CHUNK) {
      -                    rv = ap_get_brigade(f->next, bb, AP_MODE_GETLINE,
      -                                        block, 0);
      -                    if (block == APR_NONBLOCK_READ &&
      -                        ( (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ||
      -                          (APR_STATUS_IS_EAGAIN(rv)) )) {
      -                        return APR_EAGAIN;
      -                    }
      -                    /* If we get an error, then leave */
      -                    if (rv != APR_SUCCESS) {
      -                        return rv;
      -                    }
      -                    /*
      -                     * We really don't care whats on this line. If it is RFC
      -                     * compliant it should be only \r\n. If there is more
      -                     * before we just ignore it as long as we do not get over
      -                     * the limit for request lines.
      -                     */
      -                    rv = get_remaining_chunk_line(ctx, bb,
      -                                                  f->r->server->limit_req_line);
      -                    apr_brigade_cleanup(bb);
      -                    if (APR_STATUS_IS_EAGAIN(rv)) {
      -                        return rv;
      -                    }
      -                } else {
      -                    rv = APR_SUCCESS;
      -                }
      +            rv = ap_get_brigade(f->next, b, AP_MODE_GETLINE, block, 0);
      +
      +            /* for timeout */
      +            if (block == APR_NONBLOCK_READ
      +                    && ((rv == APR_SUCCESS && APR_BRIGADE_EMPTY(b))
      +                            || (APR_STATUS_IS_EAGAIN(rv)))) {
      +                return APR_EAGAIN;
      +            }
      +
      +            if (rv == APR_EOF) {
      +                return APR_INCOMPLETE;
      +            }
      +
      +            if (rv != APR_SUCCESS) {
      +                return rv;
      +            }
      +
      +            e = APR_BRIGADE_FIRST(b);
      +            while (e != APR_BRIGADE_SENTINEL(b)) {
      +                const char *buffer;
      +                apr_size_t len;
      +
      +                if (!APR_BUCKET_IS_METADATA(e)) {
      +                    int parsing = 0;
      +
      +                    rv = apr_bucket_read(e, &buffer, &len, APR_BLOCK_READ);
       
      -                if (rv == APR_SUCCESS) {
      -                    /* Read the real chunk line. */
      -                    rv = ap_get_brigade(f->next, bb, AP_MODE_GETLINE,
      -                                        block, 0);
      -                    /* Test timeout */
      -                    if (block == APR_NONBLOCK_READ &&
      -                        ( (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)) ||
      -                          (APR_STATUS_IS_EAGAIN(rv)) )) {
      -                        ctx->state = BODY_CHUNK_PART;
      -                        return APR_EAGAIN;
      -                    }
      -                    ctx->state = BODY_CHUNK;
                           if (rv == APR_SUCCESS) {
      -                        rv = get_chunk_line(ctx, bb, f->r->server->limit_req_line);
      -                        if (APR_STATUS_IS_EAGAIN(rv)) {
      -                            ctx->state = BODY_CHUNK_PART;
      -                            apr_brigade_cleanup(bb);
      -                            return rv;
      -                        }
      -                        if (rv == APR_SUCCESS) {
      -                            ctx->remaining = get_chunk_size(ctx->chunk_ln);
      -                            if (ctx->remaining == INVALID_CHAR) {
      -                                rv = APR_EGENERAL;
      +                        parsing = 1;
      +                        rv = parse_chunk_size(ctx, buffer, len,
      +                                f->r->server->limit_req_fieldsize, strict);
      +                    }
      +                    if (rv != APR_SUCCESS) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, f->r, APLOGNO(01590)
      +                                      "Error reading/parsing chunk %s ",
      +                                      (APR_ENOSPC == rv) ? "(overflow)" : "");
      +                        if (parsing) {
      +                            if (rv != APR_ENOSPC) {
                                       http_error = HTTP_BAD_REQUEST;
                                   }
      +                            return bail_out_on_error(ctx, f, http_error);
                               }
      +                        return rv;
                           }
      -                    apr_brigade_cleanup(bb);
                       }
       
      -                /* Detect chunksize error (such as overflow) */
      -                if (rv != APR_SUCCESS || ctx->remaining < 0) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, "Error reading chunk %s ",
      -                                  (ctx->remaining < 0) ? "(overflow)" : "");
      -                    ctx->remaining = 0; /* Reset it in case we have to
      -                                         * come back here later */
      -                    if (APR_STATUS_IS_TIMEUP(rv)) {
      -                        http_error = HTTP_REQUEST_TIME_OUT;
      -                    }
      -                    return bail_out_on_error(ctx, f, http_error);
      -                }
      +                apr_bucket_delete(e);
      +                e = APR_BRIGADE_FIRST(b);
      +            }
      +            again = 1; /* come around again */
       
      -                if (!ctx->remaining) {
      -                    /* Handle trailers by calling ap_get_mime_headers again! */
      -                    ctx->state = BODY_NONE;
      -                    ap_get_mime_headers(f->r);
      -                    e = apr_bucket_eos_create(f->c->bucket_alloc);
      -                    APR_BRIGADE_INSERT_TAIL(b, e);
      -                    ctx->eos_sent = 1;
      -                    return APR_SUCCESS;
      -                }
      +            if (ctx->state == BODY_CHUNK_TRAILER) {
      +                /* Treat UNSET as DISABLE - trailers aren't merged by default */
      +                return read_chunked_trailers(ctx, f, b,
      +                            conf->merge_trailers == AP_MERGE_TRAILERS_ENABLE);
                   }
      +
                   break;
               }
      -    }
      +        case BODY_NONE:
      +        case BODY_LENGTH:
      +        case BODY_CHUNK_DATA: {
       
      -    /* Ensure that the caller can not go over our boundary point. */
      -    if (ctx->state == BODY_LENGTH || ctx->state == BODY_CHUNK) {
      -        if (ctx->remaining < readbytes) {
      -            readbytes = ctx->remaining;
      -        }
      -        AP_DEBUG_ASSERT(readbytes > 0);
      -    }
      +            /* Ensure that the caller can not go over our boundary point. */
      +            if (ctx->state != BODY_NONE && ctx->remaining < readbytes) {
      +                readbytes = ctx->remaining;
      +            }
      +            if (readbytes > 0) {
      +                apr_off_t totalread;
       
      -    rv = ap_get_brigade(f->next, b, mode, block, readbytes);
      +                rv = ap_get_brigade(f->next, b, mode, block, readbytes);
       
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      +                /* for timeout */
      +                if (block == APR_NONBLOCK_READ
      +                        && ((rv == APR_SUCCESS && APR_BRIGADE_EMPTY(b))
      +                                || (APR_STATUS_IS_EAGAIN(rv)))) {
      +                    return APR_EAGAIN;
      +                }
      +
      +                if (rv == APR_EOF && ctx->state != BODY_NONE
      +                        && ctx->remaining > 0) {
      +                    return APR_INCOMPLETE;
      +                }
      +
      +                if (rv != APR_SUCCESS) {
      +                    return rv;
      +                }
       
      -    /* How many bytes did we just read? */
      -    apr_brigade_length(b, 0, &totalread);
      +                /* How many bytes did we just read? */
      +                apr_brigade_length(b, 0, &totalread);
       
      -    /* If this happens, we have a bucket of unknown length.  Die because
      -     * it means our assumptions have changed. */
      -    AP_DEBUG_ASSERT(totalread >= 0);
      +                /* If this happens, we have a bucket of unknown length.  Die because
      +                 * it means our assumptions have changed. */
      +                AP_DEBUG_ASSERT(totalread >= 0);
       
      -    if (ctx->state != BODY_NONE) {
      -        ctx->remaining -= totalread;
      -        if (ctx->remaining > 0) {
      -            e = APR_BRIGADE_LAST(b);
      -            if (APR_BUCKET_IS_EOS(e))
      -                return APR_EOF;
      +                if (ctx->state != BODY_NONE) {
      +                    ctx->remaining -= totalread;
      +                    if (ctx->remaining > 0) {
      +                        e = APR_BRIGADE_LAST(b);
      +                        if (APR_BUCKET_IS_EOS(e)) {
      +                            apr_bucket_delete(e);
      +                            return APR_INCOMPLETE;
      +                        }
      +                    }
      +                    else if (ctx->state == BODY_CHUNK_DATA) {
      +                        /* next chunk please */
      +                        ctx->state = BODY_CHUNK_END;
      +                        ctx->chunk_used = 0;
      +                    }
      +                }
      +
      +                /* We have a limit in effect. */
      +                if (ctx->limit) {
      +                    /* FIXME: Note that we might get slightly confused on
      +                     * chunked inputs as we'd need to compensate for the chunk
      +                     * lengths which may not really count.  This seems to be up
      +                     * for interpretation.
      +                     */
      +                    ctx->limit_used += totalread;
      +                    if (ctx->limit < ctx->limit_used) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r,
      +                                      APLOGNO(01591) "Read content length of "
      +                                      "%" APR_OFF_T_FMT " is larger than the "
      +                                      "configured limit of %" APR_OFF_T_FMT,
      +                                      ctx->limit_used, ctx->limit);
      +                        return bail_out_on_error(ctx, f,
      +                                                 HTTP_REQUEST_ENTITY_TOO_LARGE);
      +                    }
      +                }
      +            }
      +
      +            /* If we have no more bytes remaining on a C-L request,
      +             * save the caller a round trip to discover EOS.
      +             */
      +            if (ctx->state == BODY_LENGTH && ctx->remaining == 0) {
      +                e = apr_bucket_eos_create(f->c->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(b, e);
      +                ctx->eos_sent = 1;
      +            }
      +
      +            break;
               }
      -    }
      +        case BODY_CHUNK_TRAILER: {
       
      -    /* If we have no more bytes remaining on a C-L request,
      -     * save the callter a roundtrip to discover EOS.
      -     */
      -    if (ctx->state == BODY_LENGTH && ctx->remaining == 0) {
      -        e = apr_bucket_eos_create(f->c->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(b, e);
      -    }
      +            rv = ap_get_brigade(f->next, b, mode, block, readbytes);
       
      -    /* We have a limit in effect. */
      -    if (ctx->limit) {
      -        /* FIXME: Note that we might get slightly confused on chunked inputs
      -         * as we'd need to compensate for the chunk lengths which may not
      -         * really count.  This seems to be up for interpretation.  */
      -        ctx->limit_used += totalread;
      -        if (ctx->limit < ctx->limit_used) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      -                          "Read content-length of %" APR_OFF_T_FMT
      -                          " is larger than the configured limit"
      -                          " of %" APR_OFF_T_FMT, ctx->limit_used, ctx->limit);
      -            apr_brigade_cleanup(bb);
      -            e = ap_bucket_error_create(HTTP_REQUEST_ENTITY_TOO_LARGE, NULL,
      -                                       f->r->pool,
      -                                       f->c->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(bb, e);
      -            e = apr_bucket_eos_create(f->c->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(bb, e);
      -            ctx->eos_sent = 1;
      -            return ap_pass_brigade(f->r->output_filters, bb);
      +            /* for timeout */
      +            if (block == APR_NONBLOCK_READ
      +                    && ((rv == APR_SUCCESS && APR_BRIGADE_EMPTY(b))
      +                            || (APR_STATUS_IS_EAGAIN(rv)))) {
      +                return APR_EAGAIN;
      +            }
      +
      +            if (rv != APR_SUCCESS) {
      +                return rv;
      +            }
      +
      +            break;
      +        }
      +        default: {
      +            /* Should not happen */
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(02901)
      +                          "Unexpected body state (%i)", (int)ctx->state);
      +            return APR_EGENERAL;
      +        }
               }
      -    }
      +
      +    } while (again);
       
           return APR_SUCCESS;
       }
       
      -/**
      - * Parse a chunk extension, detect overflow.
      - * There are two error cases:
      - *  1) If the conversion would require too many bits, a -1 is returned.
      - *  2) If the conversion used the correct number of bits, but an overflow
      - *     caused only the sign bit to flip, then that negative number is
      - *     returned.
      - * In general, any negative number can be considered an overflow error.
      - */
      -static long get_chunk_size(char *b)
      +struct check_header_ctx {
      +    request_rec *r;
      +    int strict;
      +};
      +
      +/* check a single header, to be used with apr_table_do() */
      +static int check_header(void *arg, const char *name, const char *val)
       {
      -    long chunksize = 0;
      -    size_t chunkbits = sizeof(long) * 8;
      +    struct check_header_ctx *ctx = arg;
      +    const char *test;
       
      -    ap_xlate_proto_from_ascii(b, strlen(b));
      +    if (name[0] == '\0') {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02428)
      +                      "Empty response header name, aborting request");
      +        return 0;
      +    }
       
      -    if (!apr_isxdigit(*b)) {
      -        /*
      -         * Detect invalid character at beginning. This also works for empty
      -         * chunk size lines.
      -         */
      -        return INVALID_CHAR;
      +    if (ctx->strict) { 
      +        test = ap_scan_http_token(name);
           }
      -    /* Skip leading zeros */
      -    while (*b == '0') {
      -        ++b;
      +    else {
      +        test = ap_scan_vchar_obstext(name);
      +    }
      +    if (*test) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02429)
      +                      "Response header name '%s' contains invalid "
      +                      "characters, aborting request",
      +                      name);
      +        return 0;
           }
       
      -    while (apr_isxdigit(*b) && (chunkbits > 0)) {
      -        int xvalue = 0;
      +    test = ap_scan_http_field_content(val);
      +    if (*test) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, APLOGNO(02430)
      +                      "Response header '%s' value of '%s' contains invalid "
      +                      "characters, aborting request",
      +                      name, val);
      +        return 0;
      +    }
      +    return 1;
      +}
       
      -        if (*b >= '0' && *b <= '9') {
      -            xvalue = *b - '0';
      -        }
      -        else if (*b >= 'A' && *b <= 'F') {
      -            xvalue = *b - 'A' + 0xa;
      -        }
      -        else if (*b >= 'a' && *b <= 'f') {
      -            xvalue = *b - 'a' + 0xa;
      -        }
      +/**
      + * Check headers for HTTP conformance
      + * @return 1 if ok, 0 if bad
      + */
      +static APR_INLINE int check_headers(request_rec *r)
      +{
      +    struct check_header_ctx ctx;
      +    core_server_config *conf =
      +            ap_get_core_module_config(r->server->module_config);
      +
      +    ctx.r = r;
      +    ctx.strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
      +    return apr_table_do(check_header, &ctx, r->headers_out, NULL) &&
      +           apr_table_do(check_header, &ctx, r->err_headers_out, NULL);
      +}
       
      -        chunksize = (chunksize << 4) | xvalue;
      -        chunkbits -= 4;
      -        ++b;
      -    }
      -    if (apr_isxdigit(*b) && (chunkbits <= 0)) {
      -        /* overflow */
      -        return -1;
      +static int check_headers_recursion(request_rec *r)
      +{
      +    void *check = NULL;
      +    apr_pool_userdata_get(&check, "check_headers_recursion", r->pool);
      +    if (check) {
      +        return 1;
           }
      -
      -    return chunksize;
      +    apr_pool_userdata_setn("true", "check_headers_recursion", NULL, r->pool);
      +    return 0;
       }
       
       typedef struct header_struct {
      @@ -645,8 +759,7 @@ typedef struct header_struct {
       } header_struct;
       
       /* Send a single HTTP header field to the client.  Note that this function
      - * is used in calls to table_do(), so their interfaces are co-dependent.
      - * In other words, don't change this one without checking table_do in alloc.c.
      + * is used in calls to apr_table_do(), so don't change its interface.
        * It returns true unless there was a write error of some kind.
        */
       static int form_header_field(header_struct *h,
      @@ -747,8 +860,7 @@ static void fixup_vary(request_rec *r)
            * its comma-separated fieldname values, and then add them to varies
            * if not already present in the array.
            */
      -    apr_table_do((int (*)(void *, const char *, const char *))uniq_field_values,
      -                 (void *) varies, r->headers_out, "Vary", NULL);
      +    apr_table_do(uniq_field_values, varies, r->headers_out, "Vary", NULL);
       
           /* If we found any, replace old Vary fields with unique-ified value */
       
      @@ -825,7 +937,7 @@ static apr_status_t send_all_header_fields(header_struct *h,
        * handler.
        * Zap r->status_line if bad.
        */
      -static void validate_status_line(request_rec *r)
      +static apr_status_t validate_status_line(request_rec *r)
       {
           char *end;
       
      @@ -836,15 +948,19 @@ static void validate_status_line(request_rec *r)
                   || (end - 3) != r->status_line
                   || (len >= 4 && ! apr_isspace(r->status_line[3]))) {
                   r->status_line = NULL;
      +            return APR_EGENERAL;
               }
               /* Since we passed the above check, we know that length three
                * is equivalent to only a 3 digit numeric http status.
                * RFC2616 mandates a trailing space, let's add it.
                */
      -        else if (len == 3) {
      +        if (len == 3) {
                   r->status_line = apr_pstrcat(r->pool, r->status_line, " ", NULL);
      +            return APR_EGENERAL;
               }
      +        return APR_SUCCESS;
           }
      +    return APR_EGENERAL;
       }
       
       /*
      @@ -856,15 +972,25 @@ static void validate_status_line(request_rec *r)
       static void basic_http_header_check(request_rec *r,
                                           const char **protocol)
       {
      +    apr_status_t rv;
      +
           if (r->assbackwards) {
               /* no such thing as a response protocol */
               return;
           }
       
      -    validate_status_line(r);
      +    rv = validate_status_line(r);
       
           if (!r->status_line) {
               r->status_line = ap_get_status_line(r->status);
      +    } else if (rv != APR_SUCCESS) {
      +        /* Status line is OK but our own reason phrase
      +         * would be preferred if defined
      +         */
      +        const char *tmp = ap_get_status_line(r->status);
      +        if (!strncmp(tmp, r->status_line, 3)) {
      +            r->status_line = tmp;
      +        }
           }
       
           /* Note that we must downgrade before checking for force responses. */
      @@ -966,10 +1092,10 @@ static void basic_http_header(request_rec *r, apr_bucket_brigade *bb,
                * Date and Server are less interesting, use TRACE5 for them while
                * using TRACE4 for the other headers.
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "  %s: %s", "Date",
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "  Date: %s",
                             proxy_date ? proxy_date : date );
               if (server)
      -            ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "  %s: %s", "Server",
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "  Server: %s",
                                 server);
           }
       
      @@ -1132,16 +1258,19 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
           header_filter_ctx *ctx = f->ctx;
           const char *ctype;
           ap_bucket_error *eb = NULL;
      +    apr_status_t rv = APR_SUCCESS;
      +    int recursive_error = 0;
       
           AP_DEBUG_ASSERT(!r->main);
       
      -    if (r->header_only) {
      -        if (!ctx) {
      -            ctx = f->ctx = apr_pcalloc(r->pool, sizeof(header_filter_ctx));
      -        }
      -        else if (ctx->headers_sent) {
      +    if (!ctx) {
      +        ctx = f->ctx = apr_pcalloc(r->pool, sizeof(header_filter_ctx));
      +    }
      +    else if (ctx->headers_sent) {
      +        /* Eat body if response must not have one. */
      +        if (r->header_only || r->status == HTTP_NO_CONTENT) {
                   apr_brigade_cleanup(b);
      -            return OK;
      +            return APR_SUCCESS;
               }
           }
       
      @@ -1162,9 +1291,36 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
                   return ap_pass_brigade(f->next, b);
               }
           }
      -    if (eb) {
      -        int status;
       
      +    if (!ctx->headers_sent && !check_headers(r)) {
      +        /* We may come back here from ap_die() below,
      +         * so clear anything from this response.
      +         */
      +        apr_table_clear(r->headers_out);
      +        apr_table_clear(r->err_headers_out);
      +        apr_brigade_cleanup(b);
      +
      +        /* Don't recall ap_die() if we come back here (from its own internal
      +         * redirect or error response), otherwise we can end up in infinite
      +         * recursion; better fall through with 500, minimal headers and an
      +         * empty body (EOS only).
      +         */
      +        if (!check_headers_recursion(r)) {
      +            ap_die(HTTP_INTERNAL_SERVER_ERROR, r);
      +            return AP_FILTER_ERROR;
      +        }
      +        r->status = HTTP_INTERNAL_SERVER_ERROR;
      +        e = ap_bucket_eoc_create(c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(b, e);
      +        e = apr_bucket_eos_create(c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(b, e);
      +        r->content_type = r->content_encoding = NULL;
      +        r->content_languages = NULL;
      +        ap_set_content_length(r, 0);
      +        recursive_error = 1;
      +    }
      +    else if (eb) {
      +        int status;
               status = eb->status;
               apr_brigade_cleanup(b);
               ap_die(status, r);
      @@ -1174,7 +1330,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
           if (r->assbackwards) {
               r->sent_bodyct = 1;
               ap_remove_output_filter(f);
      -        return ap_pass_brigade(f->next, b);
      +        rv = ap_pass_brigade(f->next, b);
      +        goto out;
           }
       
           /*
      @@ -1221,6 +1378,10 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
               apr_table_unset(r->headers_out, "Content-Length");
           }
       
      +    if (r->status == HTTP_NO_CONTENT) {
      +        apr_table_unset(r->headers_out, "Content-Length");
      +    }
      +
           ctype = ap_make_content_type(r, r->content_type);
           if (ctype) {
               apr_table_setn(r->headers_out, "Content-Type", ctype);
      @@ -1252,7 +1413,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
           }
       
           /*
      -     * Control cachability for non-cachable responses if not already set by
      +     * Control cachability for non-cacheable responses if not already set by
            * some other part of the server configuration.
            */
           if (r->no_cache && !apr_table_get(r->headers_out, "Expires")) {
      @@ -1308,12 +1469,15 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
       
           terminate_header(b2);
       
      -    ap_pass_brigade(f->next, b2);
      +    rv = ap_pass_brigade(f->next, b2);
      +    if (rv != APR_SUCCESS) {
      +        goto out;
      +    }
      +    ctx->headers_sent = 1;
       
      -    if (r->header_only) {
      +    if (r->header_only || r->status == HTTP_NO_CONTENT) {
               apr_brigade_cleanup(b);
      -        ctx->headers_sent = 1;
      -        return OK;
      +        goto out;
           }
       
           r->sent_bodyct = 1;         /* Whatever follows is real body stuff... */
      @@ -1331,7 +1495,45 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
            * brigade won't be chunked properly.
            */
           ap_remove_output_filter(f);
      -    return ap_pass_brigade(f->next, b);
      +    rv = ap_pass_brigade(f->next, b);
      +out:
      +    if (recursive_error) {
      +        return AP_FILTER_ERROR;
      +    }
      +    return rv;
      +}
      +
      +/*
      + * Map specific APR codes returned by the filter stack to HTTP error
      + * codes, or the default status code provided. Use it as follows:
      + *
      + * return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
      + *
      + * If the filter has already handled the error, AP_FILTER_ERROR will
      + * be returned, which is cleanly passed through.
      + *
      + * These mappings imply that the filter stack is reading from the
      + * downstream client, the proxy will map these codes differently.
      + */
      +AP_DECLARE(int) ap_map_http_request_error(apr_status_t rv, int status)
      +{
      +    switch (rv) {
      +    case AP_FILTER_ERROR:
      +        return AP_FILTER_ERROR;
      +
      +    case APR_ENOSPC:
      +        return HTTP_REQUEST_ENTITY_TOO_LARGE;
      +
      +    case APR_ENOTIMPL:
      +        return HTTP_NOT_IMPLEMENTED;
      +
      +    case APR_TIMEUP:
      +    case APR_ETIMEDOUT:
      +        return HTTP_REQUEST_TIME_OUT;
      +
      +    default:
      +        return status;
      +    }
       }
       
       /* In HTTP/1.1, any method can have a body.  However, most GET handlers
      @@ -1351,7 +1553,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter(ap_filter_t *f,
       AP_DECLARE(int) ap_discard_request_body(request_rec *r)
       {
           apr_bucket_brigade *bb;
      -    int rv, seen_eos;
      +    int seen_eos;
      +    apr_status_t rv;
       
           /* Sometimes we'll get in a state where the input handling has
            * detected an error where we want to drop the connection, so if
      @@ -1374,21 +1577,8 @@ AP_DECLARE(int) ap_discard_request_body(request_rec *r)
                                   APR_BLOCK_READ, HUGE_STRING_LEN);
       
               if (rv != APR_SUCCESS) {
      -            /* FIXME: If we ever have a mapping from filters (apr_status_t)
      -             * to HTTP error codes, this would be a good place for them.
      -             *
      -             * If we received the special case AP_FILTER_ERROR, it means
      -             * that the filters have already handled this error.
      -             * Otherwise, we should assume we have a bad request.
      -             */
      -            if (rv == AP_FILTER_ERROR) {
      -                apr_brigade_destroy(bb);
      -                return rv;
      -            }
      -            else {
      -                apr_brigade_destroy(bb);
      -                return HTTP_BAD_REQUEST;
      -            }
      +            apr_brigade_destroy(bb);
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
               }
       
               for (bucket = APR_BRIGADE_FIRST(bb);
      @@ -1471,12 +1661,12 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy)
       
           if (tenc) {
               if (strcasecmp(tenc, "chunked")) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01592)
                                 "Unknown Transfer-Encoding %s", tenc);
                   return HTTP_NOT_IMPLEMENTED;
               }
               if (r->read_body == REQUEST_CHUNKED_ERROR) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01593)
                                 "chunked Transfer-Encoding forbidden: %s", r->uri);
                   return (lenp) ? HTTP_BAD_REQUEST : HTTP_LENGTH_REQUIRED;
               }
      @@ -1489,7 +1679,7 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy)
               if (apr_strtoff(&r->remaining, lenp, &endstr, 10)
                   || *endstr || r->remaining < 0) {
                   r->remaining = 0;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01594)
                                 "Invalid Content-Length");
                   return HTTP_BAD_REQUEST;
               }
      @@ -1497,7 +1687,7 @@ AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy)
       
           if ((r->read_body == REQUEST_NO_BODY)
               && (r->read_chunked || (r->remaining > 0))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01595)
                             "%s with body is not allowed for %s", r->method, r->uri);
               return HTTP_REQUEST_ENTITY_TOO_LARGE;
           }
      @@ -1557,6 +1747,13 @@ AP_DECLARE(long) ap_get_client_block(request_rec *r, char *buffer,
           /* We lose the failure code here.  This is why ap_get_client_block should
            * not be used.
            */
      +    if (rv == AP_FILTER_ERROR) {
      +        /* AP_FILTER_ERROR means a filter has responded already,
      +         * we are DONE.
      +         */
      +        apr_brigade_destroy(bb);
      +        return -1;
      +    }
           if (rv != APR_SUCCESS) {
               /* if we actually fail here, we want to just return and
                * stop trying to read data from the client.
      diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
      index 0e7d3466fec..7c465777f27 100644
      --- a/modules/http/http_protocol.c
      +++ b/modules/http/http_protocol.c
      @@ -62,8 +62,12 @@ APLOG_USE_MODULE(http);
       
       /* New Apache routine to map status codes into array indicies
        *  e.g.  100 -> 0,  101 -> 1,  200 -> 2 ...
      - * The number of status lines must equal the value of RESPONSE_CODES (httpd.h)
      - * and must be listed in order.
      + * The number of status lines must equal the value of
      + * RESPONSE_CODES (httpd.h) and must be listed in order.
      + * No gaps are allowed between X00 and the largest Xnn
      + * for any X (see ap_index_of_response).
      + * When adding a new code here, add a define to httpd.h
      + * as well.
        */
       
       static const char * const status_lines[RESPONSE_CODES] =
      @@ -80,58 +84,101 @@ static const char * const status_lines[RESPONSE_CODES] =
           "205 Reset Content",
           "206 Partial Content",
           "207 Multi-Status",
      -#define LEVEL_300 11
      +    "208 Already Reported",
      +    NULL, /* 209 */
      +    NULL, /* 210 */
      +    NULL, /* 211 */
      +    NULL, /* 212 */
      +    NULL, /* 213 */
      +    NULL, /* 214 */
      +    NULL, /* 215 */
      +    NULL, /* 216 */
      +    NULL, /* 217 */
      +    NULL, /* 218 */
      +    NULL, /* 219 */
      +    NULL, /* 220 */
      +    NULL, /* 221 */
      +    NULL, /* 222 */
      +    NULL, /* 223 */
      +    NULL, /* 224 */
      +    NULL, /* 225 */
      +    "226 IM Used",
      +#define LEVEL_300 30
           "300 Multiple Choices",
           "301 Moved Permanently",
           "302 Found",
           "303 See Other",
           "304 Not Modified",
           "305 Use Proxy",
      -    "306 unused",
      +    NULL, /* 306 */
           "307 Temporary Redirect",
      -#define LEVEL_400 19
      +    "308 Permanent Redirect",
      +#define LEVEL_400 39
           "400 Bad Request",
      -    "401 Authorization Required",
      +    "401 Unauthorized",
           "402 Payment Required",
           "403 Forbidden",
           "404 Not Found",
           "405 Method Not Allowed",
           "406 Not Acceptable",
           "407 Proxy Authentication Required",
      -    "408 Request Time-out",
      +    "408 Request Timeout",
           "409 Conflict",
           "410 Gone",
           "411 Length Required",
           "412 Precondition Failed",
           "413 Request Entity Too Large",
      -    "414 Request-URI Too Large",
      +    "414 Request-URI Too Long",
           "415 Unsupported Media Type",
           "416 Requested Range Not Satisfiable",
           "417 Expectation Failed",
      -    "418 unused",
      -    "419 unused",
      -    "420 unused",
      -    "421 unused",
      +    NULL, /* 418 */
      +    NULL, /* 419 */
      +    NULL, /* 420 */
      +    "421 Misdirected Request",
           "422 Unprocessable Entity",
           "423 Locked",
           "424 Failed Dependency",
      -    /* This is a hack, but it is required for ap_index_of_response
      -     * to work with 426.
      -     */
      -    "425 No code",
      +    NULL, /* 425 */
           "426 Upgrade Required",
      -#define LEVEL_500 46
      +    NULL, /* 427 */
      +    "428 Precondition Required",
      +    "429 Too Many Requests",
      +    NULL, /* 430 */
      +    "431 Request Header Fields Too Large",
      +    NULL, /* 432 */
      +    NULL, /* 433 */
      +    NULL, /* 434 */
      +    NULL, /* 435 */
      +    NULL, /* 436 */
      +    NULL, /* 437 */
      +    NULL, /* 438 */
      +    NULL, /* 439 */
      +    NULL, /* 440 */
      +    NULL, /* 441 */
      +    NULL, /* 442 */
      +    NULL, /* 443 */
      +    NULL, /* 444 */
      +    NULL, /* 445 */
      +    NULL, /* 446 */
      +    NULL, /* 447 */
      +    NULL, /* 448 */
      +    NULL, /* 449 */
      +    NULL, /* 450 */
      +    "451 Unavailable For Legal Reasons",
      +#define LEVEL_500 91
           "500 Internal Server Error",
      -    "501 Method Not Implemented",
      +    "501 Not Implemented",
           "502 Bad Gateway",
      -    "503 Service Temporarily Unavailable",
      -    "504 Gateway Time-out",
      +    "503 Service Unavailable",
      +    "504 Gateway Timeout",
           "505 HTTP Version Not Supported",
           "506 Variant Also Negotiates",
           "507 Insufficient Storage",
      -    "508 unused",
      -    "509 unused",
      -    "510 Not Extended"
      +    "508 Loop Detected",
      +    NULL, /* 509 */
      +    "510 Not Extended",
      +    "511 Network Authentication Required"
       };
       
       APR_HOOK_STRUCT(
      @@ -279,13 +326,229 @@ AP_DECLARE(int) ap_set_keepalive(request_rec *r)
           return 0;
       }
       
      +AP_DECLARE(ap_condition_e) ap_condition_if_match(request_rec *r,
      +        apr_table_t *headers)
      +{
      +    const char *if_match, *etag;
      +
      +    /* A server MUST use the strong comparison function (see section 13.3.3)
      +     * to compare the entity tags in If-Match.
      +     */
      +    if ((if_match = apr_table_get(r->headers_in, "If-Match")) != NULL) {
      +        if (if_match[0] == '*'
      +                || ((etag = apr_table_get(headers, "ETag")) != NULL
      +                        && ap_find_etag_strong(r->pool, if_match, etag))) {
      +            return AP_CONDITION_STRONG;
      +        }
      +        else {
      +            return AP_CONDITION_NOMATCH;
      +        }
      +    }
      +
      +    return AP_CONDITION_NONE;
      +}
      +
      +AP_DECLARE(ap_condition_e) ap_condition_if_unmodified_since(request_rec *r,
      +        apr_table_t *headers)
      +{
      +    const char *if_unmodified;
      +
      +    if_unmodified = apr_table_get(r->headers_in, "If-Unmodified-Since");
      +    if (if_unmodified) {
      +        apr_int64_t mtime, reqtime;
      +
      +        apr_time_t ius = apr_time_sec(apr_date_parse_http(if_unmodified));
      +
      +        /* All of our comparisons must be in seconds, because that's the
      +         * highest time resolution the HTTP specification allows.
      +         */
      +        mtime = apr_time_sec(apr_date_parse_http(
      +                        apr_table_get(headers, "Last-Modified")));
      +        if (mtime == APR_DATE_BAD) {
      +            mtime = apr_time_sec(r->mtime ? r->mtime : apr_time_now());
      +        }
      +
      +        reqtime = apr_time_sec(apr_date_parse_http(
      +                        apr_table_get(headers, "Date")));
      +        if (!reqtime) {
      +            reqtime = apr_time_sec(r->request_time);
      +        }
      +
      +        if ((ius != APR_DATE_BAD) && (mtime > ius)) {
      +            if (reqtime < mtime + 60) {
      +                if (apr_table_get(r->headers_in, "Range")) {
      +                    /* weak matches not allowed with Range requests */
      +                    return AP_CONDITION_NOMATCH;
      +                }
      +                else {
      +                    return AP_CONDITION_WEAK;
      +                }
      +            }
      +            else {
      +                return AP_CONDITION_STRONG;
      +            }
      +        }
      +        else {
      +            return AP_CONDITION_NOMATCH;
      +        }
      +    }
      +
      +    return AP_CONDITION_NONE;
      +}
      +
      +AP_DECLARE(ap_condition_e) ap_condition_if_none_match(request_rec *r,
      +        apr_table_t *headers)
      +{
      +    const char *if_nonematch, *etag;
      +
      +    if_nonematch = apr_table_get(r->headers_in, "If-None-Match");
      +    if (if_nonematch != NULL) {
      +
      +        if (if_nonematch[0] == '*') {
      +            return AP_CONDITION_STRONG;
      +        }
      +
      +        /* See section 13.3.3 for rules on how to determine if two entities tags
      +         * match. The weak comparison function can only be used with GET or HEAD
      +         * requests.
      +         */
      +        if (r->method_number == M_GET) {
      +            if ((etag = apr_table_get(headers, "ETag")) != NULL) {
      +                if (apr_table_get(r->headers_in, "Range")) {
      +                    if (ap_find_etag_strong(r->pool, if_nonematch, etag)) {
      +                        return AP_CONDITION_STRONG;
      +                    }
      +                }
      +                else {
      +                    if (ap_find_etag_weak(r->pool, if_nonematch, etag)) {
      +                        return AP_CONDITION_WEAK;
      +                    }
      +                }
      +            }
      +        }
      +
      +        else if ((etag = apr_table_get(headers, "ETag")) != NULL
      +                && ap_find_etag_strong(r->pool, if_nonematch, etag)) {
      +            return AP_CONDITION_STRONG;
      +        }
      +        return AP_CONDITION_NOMATCH;
      +    }
      +
      +    return AP_CONDITION_NONE;
      +}
      +
      +AP_DECLARE(ap_condition_e) ap_condition_if_modified_since(request_rec *r,
      +        apr_table_t *headers)
      +{
      +    const char *if_modified_since;
      +
      +    if ((if_modified_since = apr_table_get(r->headers_in, "If-Modified-Since"))
      +            != NULL) {
      +        apr_int64_t mtime;
      +        apr_int64_t ims, reqtime;
      +
      +        /* All of our comparisons must be in seconds, because that's the
      +         * highest time resolution the HTTP specification allows.
      +         */
      +
      +        mtime = apr_time_sec(apr_date_parse_http(
      +                        apr_table_get(headers, "Last-Modified")));
      +        if (mtime == APR_DATE_BAD) {
      +            mtime = apr_time_sec(r->mtime ? r->mtime : apr_time_now());
      +        }
      +
      +        reqtime = apr_time_sec(apr_date_parse_http(
      +                        apr_table_get(headers, "Date")));
      +        if (!reqtime) {
      +            reqtime = apr_time_sec(r->request_time);
      +        }
      +
      +        ims = apr_time_sec(apr_date_parse_http(if_modified_since));
      +
      +        if (ims >= mtime && ims <= reqtime) {
      +            if (reqtime < mtime + 60) {
      +                if (apr_table_get(r->headers_in, "Range")) {
      +                    /* weak matches not allowed with Range requests */
      +                    return AP_CONDITION_NOMATCH;
      +                }
      +                else {
      +                    return AP_CONDITION_WEAK;
      +                }
      +            }
      +            else {
      +                return AP_CONDITION_STRONG;
      +            }
      +        }
      +        else {
      +            return AP_CONDITION_NOMATCH;
      +        }
      +    }
      +
      +    return AP_CONDITION_NONE;
      +}
      +
      +AP_DECLARE(ap_condition_e) ap_condition_if_range(request_rec *r,
      +        apr_table_t *headers)
      +{
      +    const char *if_range, *etag;
      +
      +    if ((if_range = apr_table_get(r->headers_in, "If-Range"))
      +            && apr_table_get(r->headers_in, "Range")) {
      +        if (if_range[0] == '"') {
      +
      +            if ((etag = apr_table_get(headers, "ETag"))
      +                    && !strcmp(if_range, etag)) {
      +                return AP_CONDITION_STRONG;
      +            }
      +            else {
      +                return AP_CONDITION_NOMATCH;
      +            }
      +
      +        }
      +        else {
      +            apr_int64_t mtime;
      +            apr_int64_t rtime, reqtime;
      +
      +            /* All of our comparisons must be in seconds, because that's the
      +             * highest time resolution the HTTP specification allows.
      +             */
      +
      +            mtime = apr_time_sec(apr_date_parse_http(
      +                            apr_table_get(headers, "Last-Modified")));
      +            if (mtime == APR_DATE_BAD) {
      +                mtime = apr_time_sec(r->mtime ? r->mtime : apr_time_now());
      +            }
      +
      +            reqtime = apr_time_sec(apr_date_parse_http(
      +                            apr_table_get(headers, "Date")));
      +            if (!reqtime) {
      +                reqtime = apr_time_sec(r->request_time);
      +            }
      +
      +            rtime = apr_time_sec(apr_date_parse_http(if_range));
      +
      +            if (rtime == mtime) {
      +                if (reqtime < mtime + 60) {
      +                    /* weak matches not allowed with Range requests */
      +                    return AP_CONDITION_NOMATCH;
      +                }
      +                else {
      +                    return AP_CONDITION_STRONG;
      +                }
      +            }
      +            else {
      +                return AP_CONDITION_NOMATCH;
      +            }
      +        }
      +    }
      +
      +    return AP_CONDITION_NONE;
      +}
      +
       AP_DECLARE(int) ap_meets_conditions(request_rec *r)
       {
      -    const char *etag;
      -    const char *if_match, *if_modified_since, *if_unmodified, *if_nonematch;
      -    apr_time_t tmp_time;
      -    apr_int64_t mtime;
      -    int not_modified = 0;
      +    int not_modified = -1; /* unset by default */
      +    ap_condition_e cond;
       
           /* Check for conditional requests --- note that we only want to do
            * this if we are successful so far and we are not processing a
      @@ -302,41 +565,27 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r)
               return OK;
           }
       
      -    etag = apr_table_get(r->headers_out, "ETag");
      -
      -    /* All of our comparisons must be in seconds, because that's the
      -     * highest time resolution the HTTP specification allows.
      -     */
      -    /* XXX: we should define a "time unset" constant */
      -    tmp_time = ((r->mtime != 0) ? r->mtime : apr_time_now());
      -    mtime =  apr_time_sec(tmp_time);
      -
           /* If an If-Match request-header field was given
            * AND the field value is not "*" (meaning match anything)
            * AND if our strong ETag does not match any entity tag in that field,
            *     respond with a status of 412 (Precondition Failed).
            */
      -    if ((if_match = apr_table_get(r->headers_in, "If-Match")) != NULL) {
      -        if (if_match[0] != '*'
      -            && (etag == NULL || etag[0] == 'W'
      -                || !ap_find_list_item(r->pool, if_match, etag))) {
      -            return HTTP_PRECONDITION_FAILED;
      -        }
      +    cond = ap_condition_if_match(r, r->headers_out);
      +    if (AP_CONDITION_NOMATCH == cond) {
      +        return HTTP_PRECONDITION_FAILED;
           }
      -    else {
      -        /* Else if a valid If-Unmodified-Since request-header field was given
      -         * AND the requested resource has been modified since the time
      -         * specified in this field, then the server MUST
      -         *     respond with a status of 412 (Precondition Failed).
      -         */
      -        if_unmodified = apr_table_get(r->headers_in, "If-Unmodified-Since");
      -        if (if_unmodified != NULL) {
      -            apr_time_t ius = apr_date_parse_http(if_unmodified);
       
      -            if ((ius != APR_DATE_BAD) && (mtime > apr_time_sec(ius))) {
      -                return HTTP_PRECONDITION_FAILED;
      -            }
      -        }
      +    /* Else if a valid If-Unmodified-Since request-header field was given
      +     * AND the requested resource has been modified since the time
      +     * specified in this field, then the server MUST
      +     *     respond with a status of 412 (Precondition Failed).
      +     */
      +    cond = ap_condition_if_unmodified_since(r, r->headers_out);
      +    if (AP_CONDITION_NOMATCH == cond) {
      +        not_modified = 0;
      +    }
      +    else if (cond >= AP_CONDITION_WEAK) {
      +        return HTTP_PRECONDITION_FAILED;
           }
       
           /* If an If-None-Match request-header field was given
      @@ -351,27 +600,17 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r)
            * GET or HEAD allow weak etag comparison, all other methods require
            * strong comparison.  We can only use weak if it's not a range request.
            */
      -    if_nonematch = apr_table_get(r->headers_in, "If-None-Match");
      -    if (if_nonematch != NULL) {
      +    cond = ap_condition_if_none_match(r, r->headers_out);
      +    if (AP_CONDITION_NOMATCH == cond) {
      +        not_modified = 0;
      +    }
      +    else if (cond >= AP_CONDITION_WEAK) {
               if (r->method_number == M_GET) {
      -            if (if_nonematch[0] == '*') {
      +            if (not_modified) {
                       not_modified = 1;
                   }
      -            else if (etag != NULL) {
      -                if (apr_table_get(r->headers_in, "Range")) {
      -                    not_modified = etag[0] != 'W'
      -                                   && ap_find_list_item(r->pool,
      -                                                        if_nonematch, etag);
      -                }
      -                else {
      -                    not_modified = ap_find_list_item(r->pool,
      -                                                     if_nonematch, etag);
      -                }
      -            }
               }
      -        else if (if_nonematch[0] == '*'
      -                 || (etag != NULL
      -                     && ap_find_list_item(r->pool, if_nonematch, etag))) {
      +        else {
                   return HTTP_PRECONDITION_FAILED;
               }
           }
      @@ -383,22 +622,27 @@ AP_DECLARE(int) ap_meets_conditions(request_rec *r)
            *    respond with a status of 304 (Not Modified).
            * A date later than the server's current request time is invalid.
            */
      -    if (r->method_number == M_GET
      -        && (not_modified || !if_nonematch)
      -        && (if_modified_since =
      -              apr_table_get(r->headers_in,
      -                            "If-Modified-Since")) != NULL) {
      -        apr_time_t ims_time;
      -        apr_int64_t ims, reqtime;
      -
      -        ims_time = apr_date_parse_http(if_modified_since);
      -        ims = apr_time_sec(ims_time);
      -        reqtime = apr_time_sec(r->request_time);
      +    cond = ap_condition_if_modified_since(r, r->headers_out);
      +    if (AP_CONDITION_NOMATCH == cond) {
      +        not_modified = 0;
      +    }
      +    else if (cond >= AP_CONDITION_WEAK) {
      +        if (r->method_number == M_GET) {
      +            if (not_modified) {
      +                not_modified = 1;
      +            }
      +        }
      +    }
       
      -        not_modified = ims >= mtime && ims <= reqtime;
      +    /* If an If-Range and an Range header is present, we must return
      +     * 200 OK. The byterange filter will convert it to a range response.
      +     */
      +    cond = ap_condition_if_range(r, r->headers_out);
      +    if (cond > AP_CONDITION_NONE) {
      +        return OK;
           }
       
      -    if (not_modified) {
      +    if (not_modified == 1) {
               return HTTP_NOT_MODIFIED;
           }
       
      @@ -444,8 +688,11 @@ AP_DECLARE(void) ap_method_registry_init(apr_pool_t *p)
                                     apr_pool_cleanup_null);
       
           /* put all the standard methods into the registry hash to ease the
      -       mapping operations between name and number */
      +     * mapping operations between name and number
      +     * HEAD is a special-instance of the GET method and shares the same ID
      +     */
           register_one_method(p, "GET", M_GET);
      +    register_one_method(p, "HEAD", M_GET);
           register_one_method(p, "PUT", M_PUT);
           register_one_method(p, "POST", M_POST);
           register_one_method(p, "DELETE", M_DELETE);
      @@ -497,7 +744,7 @@ AP_DECLARE(int) ap_method_register(apr_pool_t *p, const char *methname)
               /* The method registry  has run out of dynamically
                * assignable method numbers. Log this and return M_INVALID.
                */
      -        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, p,
      +        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, p, APLOGNO(01610)
                             "Maximum new request methods %d reached while "
                             "registering method %s.",
                             METHOD_NUMBER_LAST, methname);
      @@ -739,6 +986,7 @@ AP_DECLARE(const char *) ap_method_name_of(apr_pool_t *p, int methnum)
        * decides to define a high-numbered code before the lower numbers.
        * If that sad event occurs, replace the code below with a linear search
        * from status_lines[shortcut[i]] to status_lines[shortcut[i+1]-1];
      + * or use NULL to fill the gaps.
        */
       AP_DECLARE(int) ap_index_of_response(int status)
       {
      @@ -754,7 +1002,7 @@ AP_DECLARE(int) ap_index_of_response(int status)
               status -= 100;
               if (status < 100) {
                   pos = (status + shortcut[i]);
      -            if (pos < shortcut[i + 1]) {
      +            if (pos < shortcut[i + 1] && status_lines[pos] != NULL) {
                       return pos;
                   }
                   else {
      @@ -771,11 +1019,9 @@ AP_DECLARE(const char *) ap_get_status_line(int status)
       }
       
       /* Build the Allow field-value from the request handler method mask.
      - * Note that we always allow TRACE, since it is handled below.
        */
       static char *make_allow(request_rec *r)
       {
      -    char *list;
           apr_int64_t mask;
           apr_array_header_t *allow = apr_array_make(r->pool, 10, sizeof(char *));
           apr_hash_index_t *hi = apr_hash_first(r->pool, methods_registry);
      @@ -803,25 +1049,15 @@ static char *make_allow(request_rec *r)
           if (conf->trace_enable != AP_TRACE_DISABLE)
               *(const char **)apr_array_push(allow) = "TRACE";
       
      -    list = apr_array_pstrcat(r->pool, allow, ',');
      -
           /* ### this is rather annoying. we should enforce registration of
              ### these methods */
           if ((mask & (AP_METHOD_BIT << M_INVALID))
               && (r->allowed_methods->method_list != NULL)
               && (r->allowed_methods->method_list->nelts != 0)) {
      -        int i;
      -        char **xmethod = (char **) r->allowed_methods->method_list->elts;
      -
      -        /*
      -         * Append all of the elements of r->allowed_methods->method_list
      -         */
      -        for (i = 0; i < r->allowed_methods->method_list->nelts; ++i) {
      -            list = apr_pstrcat(r->pool, list, ",", xmethod[i], NULL);
      -        }
      +        apr_array_cat(allow, r->allowed_methods->method_list);
           }
       
      -    return list;
      +    return apr_array_pstrcat(r->pool, allow, ',');
       }
       
       AP_DECLARE(int) ap_send_http_options(request_rec *r)
      @@ -887,6 +1123,7 @@ static const char *get_canned_error_string(int status,
           case HTTP_MOVED_PERMANENTLY:
           case HTTP_MOVED_TEMPORARILY:
           case HTTP_TEMPORARY_REDIRECT:
      +    case HTTP_PERMANENT_REDIRECT:
               return(apr_pstrcat(p,
                                  "<p>The document has moved <a href=\"",
                                  ap_escape_html(r->pool, location),
      @@ -922,11 +1159,12 @@ static const char *get_canned_error_string(int status,
                                         "error-notes",
                                         "</p>\n"));
           case HTTP_FORBIDDEN:
      -        return(apr_pstrcat(p,
      -                           "<p>You don't have permission to access ",
      -                           ap_escape_html(r->pool, r->uri),
      -                           "\non this server.</p>\n",
      -                           NULL));
      +        s1 = apr_pstrcat(p,
      +                         "<p>You don't have permission to access ",
      +                         ap_escape_html(r->pool, r->uri),
      +                         "\non this server.<br />\n",
      +                         NULL);
      +        return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
           case HTTP_NOT_FOUND:
               return(apr_pstrcat(p,
                                  "<p>The requested URL ",
      @@ -1048,6 +1286,14 @@ static const char *get_canned_error_string(int status,
                      "connection to SSL, but your client doesn't support it.\n"
                      "Either upgrade your client, or try requesting the page\n"
                      "using https://\n");
      +    case HTTP_PRECONDITION_REQUIRED:
      +        return("<p>The request is required to be conditional.</p>\n");
      +    case HTTP_TOO_MANY_REQUESTS:
      +        return("<p>The user has sent too many requests\n"
      +               "in a given amount of time.</p>\n");
      +    case HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE:
      +        return("<p>The server refused this request because\n"
      +               "the request header fields are too large.</p>\n");
           case HTTP_INSUFFICIENT_STORAGE:
               return("<p>The method could not be performed on the resource\n"
                      "because the server is unable to store the\n"
      @@ -1061,9 +1307,26 @@ static const char *get_canned_error_string(int status,
           case HTTP_GATEWAY_TIME_OUT:
               return("<p>The gateway did not receive a timely response\n"
                      "from the upstream server or application.</p>\n");
      +    case HTTP_LOOP_DETECTED:
      +        return("<p>The server terminated an operation because\n"
      +               "it encountered an infinite loop.</p>\n");
           case HTTP_NOT_EXTENDED:
               return("<p>A mandatory extension policy in the request is not\n"
                      "accepted by the server for this resource.</p>\n");
      +    case HTTP_NETWORK_AUTHENTICATION_REQUIRED:
      +        return("<p>The client needs to authenticate to gain\n"
      +               "network access.</p>\n");
      +    case HTTP_MISDIRECTED_REQUEST:
      +        return("<p>The client needs a new connection for this\n"
      +               "request as the requested host name does not match\n"
      +               "the Server Name Indication (SNI) in use for this\n"
      +               "connection.</p>\n");
      +    case HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:
      +        s1 = apr_pstrcat(p,
      +                         "<p>Access to ", ap_escape_html(r->pool, r->uri),
      +                         "\nhas been denied for legal reasons.<br />\n",
      +                         NULL);
      +        return(add_optional_notes(r, s1, "error-notes", "</p>\n"));
           default:                    /* HTTP_INTERNAL_SERVER_ERROR */
               /*
                * This comparison to expose error-notes could be modified to
      @@ -1335,8 +1598,6 @@ AP_DECLARE(void) ap_copy_method_list(ap_method_list_t *dest,
       AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
       {
           int methnum;
      -    int i;
      -    char **methods;
       
           /*
            * If it's one of our known methods, use the shortcut and check the
      @@ -1347,18 +1608,13 @@ AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
               return !!(l->method_mask & (AP_METHOD_BIT << methnum));
           }
           /*
      -     * Otherwise, see if the method name is in the array or string names
      +     * Otherwise, see if the method name is in the array of string names.
            */
           if ((l->method_list == NULL) || (l->method_list->nelts == 0)) {
               return 0;
           }
      -    methods = (char **)l->method_list->elts;
      -    for (i = 0; i < l->method_list->nelts; ++i) {
      -        if (strcmp(method, methods[i]) == 0) {
      -            return 1;
      -        }
      -    }
      -    return 0;
      +
      +    return ap_array_str_contains(l->method_list, method);
       }
       
       /*
      @@ -1367,30 +1623,24 @@ AP_DECLARE(int) ap_method_in_list(ap_method_list_t *l, const char *method)
       AP_DECLARE(void) ap_method_list_add(ap_method_list_t *l, const char *method)
       {
           int methnum;
      -    int i;
           const char **xmethod;
      -    char **methods;
       
           /*
            * If it's one of our known methods, use the shortcut and use the
            * bitmask.
            */
           methnum = ap_method_number_of(method);
      -    l->method_mask |= (AP_METHOD_BIT << methnum);
           if (methnum != M_INVALID) {
      +        l->method_mask |= (AP_METHOD_BIT << methnum);
               return;
           }
           /*
            * Otherwise, see if the method name is in the array of string names.
            */
      -    if (l->method_list->nelts != 0) {
      -        methods = (char **)l->method_list->elts;
      -        for (i = 0; i < l->method_list->nelts; ++i) {
      -            if (strcmp(method, methods[i]) == 0) {
      -                return;
      -            }
      -        }
      +    if (ap_array_str_contains(l->method_list, method)) {
      +        return;
           }
      +
           xmethod = (const char **) apr_array_push(l->method_list);
           *xmethod = method;
       }
      @@ -1409,15 +1659,15 @@ AP_DECLARE(void) ap_method_list_remove(ap_method_list_t *l,
            * by a module, use the bitmask.
            */
           methnum = ap_method_number_of(method);
      -    l->method_mask |= ~(AP_METHOD_BIT << methnum);
           if (methnum != M_INVALID) {
      +        l->method_mask &= ~(AP_METHOD_BIT << methnum);
               return;
           }
           /*
            * Otherwise, see if the method name is in the array of string names.
            */
           if (l->method_list->nelts != 0) {
      -        register int i, j, k;
      +        int i, j, k;
               methods = (char **)l->method_list->elts;
               for (i = 0; i < l->method_list->nelts; ) {
                   if (strcmp(method, methods[i]) == 0) {
      diff --git a/modules/http/http_request.c b/modules/http/http_request.c
      index 0a25333ee45..3f5393e04ea 100644
      --- a/modules/http/http_request.c
      +++ b/modules/http/http_request.c
      @@ -73,19 +73,22 @@ static void update_r_in_filters(ap_filter_t *f,
           }
       }
       
      -AP_DECLARE(void) ap_die(int type, request_rec *r)
      +static void ap_die_r(int type, request_rec *r, int recursive_error)
       {
      -    int error_index = ap_index_of_response(type);
      -    char *custom_response = ap_response_code_string(r, error_index);
      -    int recursive_error = 0;
      +    char *custom_response;
           request_rec *r_1st_err = r;
       
      -    if (type == AP_FILTER_ERROR) {
      +    if (type == OK || type == DONE) {
      +        ap_finalize_request_protocol(r);
      +        return;
      +    }
      +
      +    if (!ap_is_HTTP_VALID_RESPONSE(type)) {
               ap_filter_t *next;
       
               /*
                * Check if we still have the ap_http_header_filter in place. If
      -         * this is the case we should not ignore AP_FILTER_ERROR here because
      +         * this is the case we should not ignore the error here because
                * it means that we have not sent any response at all and never
                * will. This is bad. Sent an internal server error instead.
                */
      @@ -99,8 +102,14 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
                * next->frec == ap_http_header_filter
                */
               if (next) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "Custom error page caused AP_FILTER_ERROR");
      +            if (type != AP_FILTER_ERROR) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01579)
      +                              "Invalid response status %i", type);
      +            }
      +            else {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02831)
      +                              "Response from AP_FILTER_ERROR");
      +            }
                   type = HTTP_INTERNAL_SERVER_ERROR;
               }
               else {
      @@ -108,20 +117,13 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
               }
           }
       
      -    if (type == DONE) {
      -        ap_finalize_request_protocol(r);
      -        return;
      -    }
      -
           /*
            * The following takes care of Apache redirects to custom response URLs
            * Note that if we are already dealing with the response to some other
            * error condition, we just report on the original error, and give up on
            * any attempt to handle the other thing "intelligently"...
            */
      -    if (r->status != HTTP_OK) {
      -        recursive_error = type;
      -
      +    if (recursive_error != HTTP_OK) {
               while (r_1st_err->prev && (r_1st_err->prev->status != HTTP_OK))
                   r_1st_err = r_1st_err->prev;  /* Get back to original error */
       
      @@ -141,6 +143,11 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
       
               custom_response = NULL; /* Do NOT retry the custom thing! */
           }
      +    else {
      +        int error_index = ap_index_of_response(type);
      +        custom_response = ap_response_code_string(r, error_index);
      +        recursive_error = 0;
      +    }
       
           r->status = type;
       
      @@ -197,7 +204,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
                                                    "error-notes")) != NULL) {
                       apr_table_setn(r->subprocess_env, "ERROR_NOTES", error_notes);
                   }
      -            r->method = apr_pstrdup(r->pool, "GET");
      +            r->method = "GET";
                   r->method_number = M_GET;
                   ap_internal_redirect(custom_response, r);
                   return;
      @@ -208,7 +215,7 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
                    * dying with a recursive server error...
                    */
                   recursive_error = HTTP_INTERNAL_SERVER_ERROR;
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01580)
                               "Invalid error redirection directive: %s",
                               custom_response);
               }
      @@ -216,26 +223,120 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
           ap_send_error_response(r_1st_err, recursive_error);
       }
       
      -static void check_pipeline(conn_rec *c)
      +AP_DECLARE(void) ap_die(int type, request_rec *r)
       {
      -    if (c->keepalive != AP_CONN_CLOSE) {
      -        apr_status_t rv;
      -        apr_bucket_brigade *bb = apr_brigade_create(c->pool, c->bucket_alloc);
      +    ap_die_r(type, r, r->status);
      +}
       
      -        rv = ap_get_brigade(c->input_filters, bb, AP_MODE_SPECULATIVE,
      -                            APR_NONBLOCK_READ, 1);
      -        if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb)) {
      -            /*
      -             * Error or empty brigade: There is no data present in the input
      -             * filter
      -             */
      -            c->data_in_input_filters = 0;
      +AP_DECLARE(apr_status_t) ap_check_pipeline(conn_rec *c, apr_bucket_brigade *bb,
      +                                           unsigned int max_blank_lines)
      +{
      +    apr_status_t rv = APR_EOF;
      +    ap_input_mode_t mode = AP_MODE_SPECULATIVE;
      +    unsigned int num_blank_lines = 0;
      +    apr_size_t cr = 0;
      +    char buf[2];
      +
      +    while (c->keepalive != AP_CONN_CLOSE && !c->aborted) {
      +        apr_size_t len = cr + 1;
      +
      +        apr_brigade_cleanup(bb);
      +        rv = ap_get_brigade(c->input_filters, bb, mode,
      +                            APR_NONBLOCK_READ, len);
      +        if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb) || !max_blank_lines) {
      +            if (mode == AP_MODE_READBYTES) {
      +                /* Unexpected error, stop with this connection */
      +                ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(02967)
      +                              "Can't consume pipelined empty lines");
      +                c->keepalive = AP_CONN_CLOSE;
      +                rv = APR_EGENERAL;
      +            }
      +            else if (rv != APR_SUCCESS || APR_BRIGADE_EMPTY(bb)) {
      +                if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
      +                    /* Pipe is dead */
      +                    c->keepalive = AP_CONN_CLOSE;
      +                }
      +                else {
      +                    /* Pipe is up and empty */
      +                    rv = APR_EAGAIN;
      +                }
      +            }
      +            else {
      +                apr_off_t n = 0;
      +                /* Single read asked, (non-meta-)data available? */
      +                rv = apr_brigade_length(bb, 0, &n);
      +                if (rv == APR_SUCCESS && n <= 0) {
      +                    rv = APR_EAGAIN;
      +                }
      +            }
      +            break;
      +        }
      +
      +        /* Lookup and consume blank lines */
      +        rv = apr_brigade_flatten(bb, buf, &len);
      +        if (rv != APR_SUCCESS || len != cr + 1) {
      +            int log_level;
      +            if (mode == AP_MODE_READBYTES) {
      +                /* Unexpected error, stop with this connection */
      +                c->keepalive = AP_CONN_CLOSE;
      +                log_level = APLOG_ERR;
      +                rv = APR_EGENERAL;
      +            }
      +            else {
      +                /* Let outside (non-speculative/blocking) read determine
      +                 * where this possible failure comes from (metadata,
      +                 * morphed EOF socket, ...). Debug only here.
      +                 */
      +                log_level = APLOG_DEBUG;
      +                rv = APR_SUCCESS;
      +            }
      +            ap_log_cerror(APLOG_MARK, log_level, rv, c, APLOGNO(02968)
      +                          "Can't check pipelined data");
      +            break;
      +        }
      +
      +        if (mode == AP_MODE_READBYTES) {
      +            /* [CR]LF consumed, try next */
      +            mode = AP_MODE_SPECULATIVE;
      +            cr = 0;
      +        }
      +        else if (cr) {
      +            AP_DEBUG_ASSERT(len == 2 && buf[0] == APR_ASCII_CR);
      +            if (buf[1] == APR_ASCII_LF) {
      +                /* consume this CRLF */
      +                mode = AP_MODE_READBYTES;
      +                num_blank_lines++;
      +            }
      +            else {
      +                /* CR(?!LF) is data */
      +                break;
      +            }
               }
               else {
      -            c->data_in_input_filters = 1;
      +            if (buf[0] == APR_ASCII_LF) {
      +                /* consume this LF */
      +                mode = AP_MODE_READBYTES;
      +                num_blank_lines++;
      +            }
      +            else if (buf[0] == APR_ASCII_CR) {
      +                cr = 1;
      +            }
      +            else {
      +                /* Not [CR]LF, some data */
      +                break;
      +            }
      +        }
      +        if (num_blank_lines > max_blank_lines) {
      +            /* Enough blank lines with this connection,
      +             * stop and don't recycle it.
      +             */
      +            c->keepalive = AP_CONN_CLOSE;
      +            rv = APR_NOTFOUND;
      +            break;
               }
      -        apr_brigade_destroy(bb);
           }
      +
      +    return rv;
       }
       
       
      @@ -244,24 +345,43 @@ AP_DECLARE(void) ap_process_request_after_handler(request_rec *r)
           apr_bucket_brigade *bb;
           apr_bucket *b;
           conn_rec *c = r->connection;
      +    apr_status_t rv;
       
           /* Send an EOR bucket through the output filter chain.  When
            * this bucket is destroyed, the request will be logged and
            * its pool will be freed
            */
      -    bb = apr_brigade_create(r->connection->pool, r->connection->bucket_alloc);
      -    b = ap_bucket_eor_create(r->connection->bucket_alloc, r);
      +    bb = apr_brigade_create(c->pool, c->bucket_alloc);
      +    b = ap_bucket_eor_create(c->bucket_alloc, r);
           APR_BRIGADE_INSERT_HEAD(bb, b);
       
      -    ap_pass_brigade(r->connection->output_filters, bb);
      +    ap_pass_brigade(c->output_filters, bb);
      +    
      +    /* The EOR bucket has either been handled by an output filter (eg.
      +     * deleted or moved to a buffered_bb => no more in bb), or an error
      +     * occured before that (eg. c->aborted => still in bb) and we ought
      +     * to destroy it now. So cleanup any remaining bucket along with
      +     * the orphan request (if any).
      +     */
      +    apr_brigade_cleanup(bb);
       
           /* From here onward, it is no longer safe to reference r
            * or r->pool, because r->pool may have been destroyed
            * already by the EOR bucket's cleanup function.
            */
       
      -    c->cs->state = CONN_STATE_WRITE_COMPLETION;
      -    check_pipeline(c);
      +    /* Check pipeline consuming blank lines, they must not be interpreted as
      +     * the next pipelined request, otherwise we would block on the next read
      +     * without flushing data, and hence possibly delay pending response(s)
      +     * until the next/real request comes in or the keepalive timeout expires.
      +     */
      +    rv = ap_check_pipeline(c, bb, DEFAULT_LIMIT_BLANK_LINES);
      +    c->data_in_input_filters = (rv == APR_SUCCESS);
      +    apr_brigade_destroy(bb);
      +
      +    if (c->cs)
      +        c->cs->state = (c->aborted) ? CONN_STATE_LINGER
      +                                    : CONN_STATE_WRITE_COMPLETION;
           AP_PROCESS_REQUEST_RETURN((uintptr_t)r, r->uri, r->status);
           if (ap_extended_status) {
               ap_time_process_request(c->sbh, STOP_PREQUEST);
      @@ -325,7 +445,8 @@ void ap_process_async_request(request_rec *r)
               if (ap_extended_status) {
                   ap_time_process_request(c->sbh, STOP_PREQUEST);
               }
      -        c->cs->state = CONN_STATE_SUSPENDED;
      +        if (c->cs)
      +            c->cs->state = CONN_STATE_SUSPENDED;
       #if APR_HAS_THREADS
               apr_thread_mutex_unlock(r->invoke_mtx);
       #endif
      @@ -335,23 +456,12 @@ void ap_process_async_request(request_rec *r)
           apr_thread_mutex_unlock(r->invoke_mtx);
       #endif
       
      -    if (access_status == DONE) {
      -        /* e.g., something not in storage like TRACE */
      -        access_status = OK;
      -    }
      -
      -    if (access_status == OK) {
      -        ap_finalize_request_protocol(r);
      -    }
      -    else {
      -        r->status = HTTP_OK;
      -        ap_die(access_status, r);
      -    }
      +    ap_die_r(access_status, r, HTTP_OK);
       
           ap_process_request_after_handler(r);
       }
       
      -void ap_process_request(request_rec *r)
      +AP_DECLARE(void) ap_process_request(request_rec *r)
       {
           apr_bucket_brigade *bb;
           apr_bucket *b;
      @@ -374,7 +484,7 @@ void ap_process_request(request_rec *r)
                    * It is still safe to use r / r->pool here as the eor bucket
                    * could not have been destroyed in the event of a timeout.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, rv, r, APLOGNO(01581)
                                 "Timeout while writing data for URI %s to the"
                                 " client", r->unparsed_uri);
               }
      @@ -437,6 +547,9 @@ static request_rec *internal_internal_redirect(const char *new_uri,
           new->prev = r;
           r->next   = new;
       
      +    new->useragent_addr = r->useragent_addr;
      +    new->useragent_ip = r->useragent_ip;
      +
           /* Must have prev and next pointers set before calling create_request
            * hook.
            */
      @@ -458,6 +571,7 @@ static request_rec *internal_internal_redirect(const char *new_uri,
           new->main            = r->main;
       
           new->headers_in      = r->headers_in;
      +    new->trailers_in     = r->trailers_in;
           new->headers_out     = apr_table_make(r->pool, 12);
           if (ap_is_HTTP_REDIRECT(new->status)) {
               const char *location = apr_table_get(r->headers_out, "Location");
      @@ -465,6 +579,7 @@ static request_rec *internal_internal_redirect(const char *new_uri,
                   apr_table_setn(new->headers_out, "Location", location);
           }
           new->err_headers_out = r->err_headers_out;
      +    new->trailers_out    = apr_table_make(r->pool, 5);
           new->subprocess_env  = rename_original_env(r->pool, r->subprocess_env);
           new->notes           = apr_table_make(r->pool, 5);
       
      @@ -495,7 +610,7 @@ static request_rec *internal_internal_redirect(const char *new_uri,
                   nextf = f->next;
       
                   if (f->r == r && f->frec != ap_subreq_core_filter_handle) {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01582)
                                     "dropping filter '%s' in internal redirect from %s to %s",
                                     f->frec->name, r->unparsed_uri, new_uri);
       
      @@ -531,6 +646,10 @@ static request_rec *internal_internal_redirect(const char *new_uri,
            */
           new->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
       
      +#if APR_HAS_THREADS
      +    new->invoke_mtx = r->invoke_mtx;
      +#endif
      +
           /*
            * XXX: hmm.  This is because mod_setenvif and mod_unique_id really need
            * to do their thing on internal redirects as well.  Perhaps this is a
      @@ -574,6 +693,8 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
                                              r->headers_out);
           r->err_headers_out = apr_table_overlay(r->pool, rr->err_headers_out,
                                                  r->err_headers_out);
      +    r->trailers_out = apr_table_overlay(r->pool, rr->trailers_out,
      +                                           r->trailers_out);
           r->subprocess_env = apr_table_overlay(r->pool, rr->subprocess_env,
                                                 r->subprocess_env);
       
      @@ -590,8 +711,17 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
           update_r_in_filters(r->output_filters, rr, r);
       
           if (r->main) {
      -        ap_add_output_filter_handle(ap_subreq_core_filter_handle,
      -                                    NULL, r, r->connection);
      +        ap_filter_t *next = r->output_filters;
      +        while (next && (next != r->proto_output_filters)) {
      +            if (next->frec == ap_subreq_core_filter_handle) {
      +                break;
      +            }
      +            next = next->next;
      +        }
      +        if (!next || next == r->proto_output_filters) {
      +            ap_add_output_filter_handle(ap_subreq_core_filter_handle,
      +                                        NULL, r, r->connection);
      +        }
           }
           else {
               /*
      @@ -618,8 +748,8 @@ AP_DECLARE(void) ap_internal_fast_redirect(request_rec *rr, request_rec *r)
       
       AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r)
       {
      -    request_rec *new = internal_internal_redirect(new_uri, r);
           int access_status;
      +    request_rec *new = internal_internal_redirect(new_uri, r);
       
           AP_INTERNAL_REDIRECT(r->uri, new_uri);
       
      @@ -635,12 +765,7 @@ AP_DECLARE(void) ap_internal_redirect(const char *new_uri, request_rec *r)
                   access_status = ap_invoke_handler(new);
               }
           }
      -    if (access_status == OK) {
      -        ap_finalize_request_protocol(new);
      -    }
      -    else {
      -        ap_die(access_status, new);
      -    }
      +    ap_die(access_status, new);
       }
       
       /* This function is designed for things like actions or CGI scripts, when
      @@ -661,15 +786,9 @@ AP_DECLARE(void) ap_internal_redirect_handler(const char *new_uri, request_rec *
               ap_set_content_type(new, r->content_type);
           access_status = ap_process_request_internal(new);
           if (access_status == OK) {
      -        if ((access_status = ap_invoke_handler(new)) != 0) {
      -            ap_die(access_status, new);
      -            return;
      -        }
      -        ap_finalize_request_protocol(new);
      -    }
      -    else {
      -        ap_die(access_status, new);
      +        access_status = ap_invoke_handler(new);
           }
      +    ap_die(access_status, new);
       }
       
       AP_DECLARE(void) ap_allow_methods(request_rec *r, int reset, ...)
      diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c
      index 390707d38b3..f92119b633e 100644
      --- a/modules/http/mod_mime.c
      +++ b/modules/http/mod_mime.c
      @@ -440,7 +440,7 @@ static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
       
           types_confname = ap_server_root_relative(p, types_confname);
           if (!types_confname) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, APLOGNO(01596)
                            "Invalid mime types config path %s",
                            (const char *)ap_get_module_config(s->module_config,
                                                               &mime_module));
      @@ -448,7 +448,7 @@ static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
           }
           if ((status = ap_pcfg_openfile(&f, ptemp, types_confname))
                       != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, s, APLOGNO(01597)
                            "could not open mime types config file %s.",
                            types_confname);
               return HTTP_INTERNAL_SERVER_ERROR;
      @@ -562,7 +562,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
               cp++;
           }
           if (!*cp) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01598)
                            "mod_mime: analyze_ct: cannot get media type from '%s'",
                            (const char *) mp);
               return (NULL);
      @@ -572,7 +572,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
               cp++;
           } while (*cp && (*cp != '/') && !apr_isspace(*cp) && (*cp != ';'));
           if (!*cp || (*cp == ';')) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01599)
                            "Cannot get media type from '%s'",
                            (const char *) mp);
               return (NULL);
      @@ -581,7 +581,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
               cp++;
           }
           if (*cp != '/') {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01600)
                            "mod_mime: analyze_ct: cannot get media type from '%s'",
                            (const char *) mp);
               return (NULL);
      @@ -595,7 +595,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
               cp++;
           }
           if (!*cp) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01601)
                            "Cannot get media subtype.");
               return (NULL);
           }
      @@ -616,7 +616,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
           cp++; /* skip the ';' */
           cp = zap_sp(cp);
           if (cp == NULL || *cp == '\0') {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01602)
                            "Cannot get media parameter.");
               return (NULL);
           }
      @@ -637,14 +637,14 @@ static content_type *analyze_ct(request_rec *r, const char *s)
                   else if (*cp == '=') {
                       attribute = zap_sp_and_dup(p, mp, cp, NULL);
                       if (attribute == NULL || *attribute == '\0') {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01603)
                                        "Cannot get media parameter.");
                           return (NULL);
                       }
                       cp++;
                       cp = zap_sp(cp);
                       if (cp == NULL || *cp == '\0') {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01604)
                                        "Cannot get media parameter.");
                           return (NULL);
                       }
      @@ -652,7 +652,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
                       continue;
                   }
                   else {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01605)
                                    "Cannot get media parameter.");
                       return (NULL);
                   }
      @@ -681,14 +681,14 @@ static content_type *analyze_ct(request_rec *r, const char *s)
                                   cp++;
                               }
                               if (*cp != ';' && *cp != '\0') {
      -                            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01606)
                                                "Cannot get media parameter.");
                                   return(NULL);
                               }
                               quoted = 0;
                           }
                           else {
      -                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01607)
                                            "Cannot get media parameter.");
                               return (NULL);
                           }
      @@ -703,7 +703,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
                               break;
                           }
                           else {
      -                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01608)
                                            "Cannot get media parameter.");
                               return (NULL);
                           }
      @@ -711,7 +711,7 @@ static content_type *analyze_ct(request_rec *r, const char *s)
                   }
                   value = zap_sp_and_dup(p, mp, cp, NULL);
                   if (value == NULL || *value == '\0') {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ss, APLOGNO(01609)
                                    "Cannot get media parameter.");
                       return (NULL);
                   }
      @@ -895,7 +895,7 @@ static int find_ct(request_rec *r)
                    * setting redundant filters.    2, we insert these in the types
                    * config hook, which may be too early (dunno.)
                    */
      -            if (exinfo->input_filters && r->proxyreq == PROXYREQ_NONE) {
      +            if (exinfo->input_filters) {
                       const char *filter, *filters = exinfo->input_filters;
                       while (*filters
                           && (filter = ap_getword(r->pool, &filters, ';'))) {
      @@ -905,7 +905,7 @@ static int find_ct(request_rec *r)
                           found = 1;
                       }
                   }
      -            if (exinfo->output_filters && r->proxyreq == PROXYREQ_NONE) {
      +            if (exinfo->output_filters) {
                       const char *filter, *filters = exinfo->output_filters;
                       while (*filters
                           && (filter = ap_getword(r->pool, &filters, ';'))) {
      diff --git a/modules/http/mod_mime.dep b/modules/http/mod_mime.dep
      new file mode 100644
      index 00000000000..7a195a1d189
      --- /dev/null
      +++ b/modules/http/mod_mime.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_mime.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_mime.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/http/mod_mime.mak b/modules/http/mod_mime.mak
      new file mode 100644
      index 00000000000..14d106f4f43
      --- /dev/null
      +++ b/modules/http/mod_mime.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_mime.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_mime - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_mime - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_mime - Win32 Release" && "$(CFG)" != "mod_mime - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_mime.mak" CFG="mod_mime - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_mime - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_mime - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_mime.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_mime.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_mime.obj"
      +	-@erase "$(INTDIR)\mod_mime.res"
      +	-@erase "$(INTDIR)\mod_mime_src.idb"
      +	-@erase "$(INTDIR)\mod_mime_src.pdb"
      +	-@erase "$(OUTDIR)\mod_mime.exp"
      +	-@erase "$(OUTDIR)\mod_mime.lib"
      +	-@erase "$(OUTDIR)\mod_mime.pdb"
      +	-@erase "$(OUTDIR)\mod_mime.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_mime_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_mime.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_mime.so" /d LONG_NAME="mime_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_mime.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_mime.pdb" /debug /out:"$(OUTDIR)\mod_mime.so" /implib:"$(OUTDIR)\mod_mime.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_mime.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_mime.obj" \
      +	"$(INTDIR)\mod_mime.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_mime.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_mime.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_mime.so"
      +   if exist .\Release\mod_mime.so.manifest mt.exe -manifest .\Release\mod_mime.so.manifest -outputresource:.\Release\mod_mime.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_mime.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_mime.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_mime.obj"
      +	-@erase "$(INTDIR)\mod_mime.res"
      +	-@erase "$(INTDIR)\mod_mime_src.idb"
      +	-@erase "$(INTDIR)\mod_mime_src.pdb"
      +	-@erase "$(OUTDIR)\mod_mime.exp"
      +	-@erase "$(OUTDIR)\mod_mime.lib"
      +	-@erase "$(OUTDIR)\mod_mime.pdb"
      +	-@erase "$(OUTDIR)\mod_mime.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_mime_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_mime.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_mime.so" /d LONG_NAME="mime_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_mime.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_mime.pdb" /debug /out:"$(OUTDIR)\mod_mime.so" /implib:"$(OUTDIR)\mod_mime.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_mime.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_mime.obj" \
      +	"$(INTDIR)\mod_mime.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_mime.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_mime.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_mime.so"
      +   if exist .\Debug\mod_mime.so.manifest mt.exe -manifest .\Debug\mod_mime.so.manifest -outputresource:.\Debug\mod_mime.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_mime.dep")
      +!INCLUDE "mod_mime.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_mime.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_mime - Win32 Release" || "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_mime - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\http"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\http"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\http"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\http"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\http"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\http"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\http"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\http"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_mime - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_mime.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_mime.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_mime.so" /d LONG_NAME="mime_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_mime - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_mime.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_mime.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_mime.so" /d LONG_NAME="mime_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_mime.c
      +
      +"$(INTDIR)\mod_mime.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/http2/.gitignore b/modules/http2/.gitignore
      new file mode 100644
      index 00000000000..ca49620fafe
      --- /dev/null
      +++ b/modules/http2/.gitignore
      @@ -0,0 +1,35 @@
      +*.xcuserstate
      +sandbox/httpd/packages/httpd-2.4.x.tar.gz
      +sandbox/test/conf/sites/mod-h2.greenbytes.de.conf
      +*.o
      +*.slo
      +*.lo
      +*.la
      +*.pcap
      +.libs
      +.configured
      +.deps
      +compile
      +aclocal.m4
      +autom4te.cache
      +autoscan.log
      +config.guess
      +config.log
      +config.status
      +config.sub
      +config.h
      +config.h.in
      +config.h.in~
      +configure
      +configure.scan
      +depcomp
      +install-sh
      +libtool
      +ltmain.sh
      +missing
      +stamp-h1
      +Makefile.in
      +Makefile
      +mod_h2-*.tar.gz
      +mod_h2/h2_version.h
      +m4
      diff --git a/modules/http2/Makefile.in b/modules/http2/Makefile.in
      new file mode 100644
      index 00000000000..4395bc3ac76
      --- /dev/null
      +++ b/modules/http2/Makefile.in
      @@ -0,0 +1,20 @@
      +# Licensed to the Apache Software Foundation (ASF) under one or more
      +# contributor license agreements.  See the NOTICE file distributed with
      +# this work for additional information regarding copyright ownership.
      +# The ASF licenses this file to You under the Apache License, Version 2.0
      +# (the "License"); you may not use this file except in compliance with
      +# the License.  You may obtain a copy of the License at
      +#
      +#     http://www.apache.org/licenses/LICENSE-2.0
      +#
      +# Unless required by applicable law or agreed to in writing, software
      +# distributed under the License is distributed on an "AS IS" BASIS,
      +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +# See the License for the specific language governing permissions and
      +# limitations under the License.
      +
      +#
      +#   standard stuff
      +#
      +
      +include $(top_srcdir)/build/special.mk
      diff --git a/modules/http2/NWGNUmakefile b/modules/http2/NWGNUmakefile
      new file mode 100644
      index 00000000000..d4a51ed3045
      --- /dev/null
      +++ b/modules/http2/NWGNUmakefile
      @@ -0,0 +1,246 @@
      +#
      +# Declare the sub-directories to be built here
      +#
      +
      +SUBDIRS = \
      +	$(EOLIST)
      +
      +#
      +# Get the 'head' of the build environment.  This includes default targets and
      +# paths to tools
      +#
      +
      +include $(AP_WORK)/build/NWGNUhead.inc
      +
      +#
      +# build this level's files
      +
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	=
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	=
      +
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	=
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	=
      +
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If these are specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = \
      +	$(OBJDIR)/mod_http2.nlm \
      +	$(OBJDIR)/proxyht2.nlm \
      +	$(EOLIST)
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs = \
      +	$(EOLIST)
      +
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(TARGET_lib)
      +
      +nlms :: libs $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +	$(call COPY,$(OBJDIR)/*.nlm, $(INSTALLBASE)/modules/)
      +
      +#
      +# Any specialized rules here
      +#
      +
      +#
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/http2/NWGNUmod_http2 b/modules/http2/NWGNUmod_http2
      new file mode 100644
      index 00000000000..10974a7ebc7
      --- /dev/null
      +++ b/modules/http2/NWGNUmod_http2
      @@ -0,0 +1,397 @@
      +#
      +# This Makefile requires the environment var NGH2SRC
      +# pointing to the base directory of nghttp2 source tree.
      +#
      +
      +#
      +# Declare the sub-directories to be built here
      +#
      +
      +SUBDIRS = \
      +	$(EOLIST)
      +
      +#
      +# Get the 'head' of the build environment.  This includes default targets and
      +# paths to tools
      +#
      +
      +include $(AP_WORK)/build/NWGNUhead.inc
      +
      +#
      +# build this level's files
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(APR)/include \
      +			$(APRUTIL)/include \
      +			$(SRC)/include \
      +			$(NGH2SRC)/lib/ \
      +			$(NGH2SRC)/lib/includes \
      +			$(SERVER)/mpm/NetWare \
      +			$(STDMOD)/ssl \
      +			$(NWOS) \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			-DHAVE_CONFIG_H \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			-L$(OBJDIR) \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	= mod_http2
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) HTTP2 Support module (w/ NGHTTP2 Lib)
      +
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	= $(NLM_NAME)
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	= 65536
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# Declare all target files (you must add your files here)
      +#
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
      +	$(EOLIST)
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = \
      +	$(OBJDIR)/nghttp2.lib \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(OBJDIR)/h2_alt_svc.o \
      +	$(OBJDIR)/h2_bucket_beam.o \
      +	$(OBJDIR)/h2_bucket_eoc.o \
      +	$(OBJDIR)/h2_bucket_eos.o \
      +	$(OBJDIR)/h2_config.o \
      +	$(OBJDIR)/h2_conn.o \
      +	$(OBJDIR)/h2_conn_io.o \
      +	$(OBJDIR)/h2_ctx.o \
      +	$(OBJDIR)/h2_filter.o \
      +	$(OBJDIR)/h2_from_h1.o \
      +	$(OBJDIR)/h2_h2.o \
      +	$(OBJDIR)/h2_mplx.o \
      +	$(OBJDIR)/h2_ngn_shed.o \
      +	$(OBJDIR)/h2_push.o \
      +	$(OBJDIR)/h2_request.o \
      +	$(OBJDIR)/h2_headers.o \
      +	$(OBJDIR)/h2_session.o \
      +	$(OBJDIR)/h2_stream.o \
      +	$(OBJDIR)/h2_switch.o \
      +	$(OBJDIR)/h2_task.o \
      +	$(OBJDIR)/h2_util.o \
      +	$(OBJDIR)/h2_worker.o \
      +	$(OBJDIR)/h2_workers.o \
      +	$(OBJDIR)/mod_http2.o \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(PRELUDE) \
      +	$(OBJDIR)/nghttp2.lib \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	Libc \
      +	Apache2 \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	@libc.imp \
      +	@aprlib.imp \
      +	@httpd.imp \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	@$(OBJDIR)/mod_http2.imp \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs := $(sort $(patsubst $(NGH2SRC)/lib/%.c,$(OBJDIR)/%.o,$(wildcard $(NGH2SRC)/lib/*.c)))
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(NGH2SRC)/lib/config.h $(TARGET_lib)
      +
      +nlms :: libs $(OBJDIR)/mod_http2.imp $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +	$(call COPY,$(OBJDIR)/*.nlm,        $(INSTALLBASE)/modules/)
      +
      +clean ::
      +	$(call DEL,$(NGH2SRC)/lib/config.h)
      +#
      +# Any specialized rules here
      +#
      +vpath %.c $(NGH2SRC)/lib
      +
      +$(NGH2SRC)/lib/config.h : NWGNUmod_http2
      +	@-$(RM) $@
      +	@echo $(DL)GEN  $@$(DL)
      +	@echo $(DL)/* For NetWare target.$(DL) > $@
      +	@echo $(DL)** Do not edit - created by Make!$(DL) >> $@
      +	@echo $(DL)*/$(DL) >> $@
      +	@echo $(DL)#ifndef NGH2_CONFIG_H$(DL) >> $@
      +	@echo $(DL)#define NGH2_CONFIG_H$(DL) >> $@
      +	@echo #define HAVE_ARPA_INET_H 1 >> $@
      +	@echo #define HAVE_CHOWN 1 >> $@
      +	@echo #define HAVE_DECL_STRERROR_R 1 >> $@
      +	@echo #define HAVE_DLFCN_H 1 >> $@
      +	@echo #define HAVE_DUP2 1 >> $@
      +	@echo #define HAVE_FCNTL_H 1 >> $@
      +	@echo #define HAVE_GETCWD 1 >> $@
      +	@echo #define HAVE_INTTYPES_H 1 >> $@
      +	@echo #define HAVE_LIMITS_H 1 >> $@
      +	@echo #define HAVE_LOCALTIME_R 1 >> $@
      +	@echo #define HAVE_MALLOC 1 >> $@
      +	@echo #define HAVE_MEMCHR 1 >> $@
      +	@echo #define HAVE_MEMMOVE 1 >> $@
      +	@echo #define HAVE_MEMORY_H 1 >> $@
      +	@echo #define HAVE_MEMSET 1 >> $@
      +	@echo #define HAVE_NETDB_H 1 >> $@
      +	@echo #define HAVE_NETINET_IN_H 1 >> $@
      +	@echo #define HAVE_PTRDIFF_T 1 >> $@
      +	@echo #define HAVE_PWD_H 1 >> $@
      +	@echo #define HAVE_SOCKET 1 >> $@
      +	@echo #define HAVE_SQRT 1 >> $@
      +	@echo #define HAVE_STDDEF_H 1 >> $@
      +	@echo #define HAVE_STDINT_H 1 >> $@
      +	@echo #define HAVE_STDLIB_H 1 >> $@
      +	@echo #define HAVE_STRCHR 1 >> $@
      +	@echo #define HAVE_STRDUP 1 >> $@
      +	@echo #define HAVE_STRERROR 1 >> $@
      +	@echo #define HAVE_STRERROR_R 1 >> $@
      +	@echo #define HAVE_STRINGS_H 1 >> $@
      +	@echo #define HAVE_STRING_H 1 >> $@
      +	@echo #define HAVE_STRSTR 1 >> $@
      +	@echo #define HAVE_STRTOL 1 >> $@
      +	@echo #define HAVE_STRTOUL 1 >> $@
      +	@echo #define HAVE_SYSLOG_H 1 >> $@
      +	@echo #define HAVE_SYS_SOCKET_H 1 >> $@
      +	@echo #define HAVE_SYS_STAT_H 1 >> $@
      +	@echo #define HAVE_SYS_TIME_H 1 >> $@
      +	@echo #define HAVE_SYS_TYPES_H 1 >> $@
      +	@echo #define HAVE_TIME_H 1 >> $@
      +	@echo #define HAVE_UNISTD_H 1 >> $@
      +
      +	@echo #define SIZEOF_INT_P 4 >> $@
      +	@echo #define STDC_HEADERS 1 >> $@
      +	@echo #define STRERROR_R_CHAR_P 4 >> $@
      +
      +# Hint to compiler a function parameter is not used
      +	@echo #define _U_ >> $@
      +
      +	@echo #ifndef __cplusplus >> $@
      +	@echo #define inline __inline >> $@
      +	@echo #endif >> $@
      +
      +	@echo $(DL)#endif /* NGH2_CONFIG_H */$(DL) >> $@
      +
      +#
      +# Exports from mod_http2 for mod_proxy_http2
      +$(OBJDIR)/mod_http2.imp : NWGNUmod_http2
      +	@-$(RM) $@
      +	@echo $(DL)GEN  $@$(DL)
      +	@echo $(DL) (HTTP2)$(DL) > $@
      +	@echo $(DL) http2_module,$(DL) >> $@
      +	@echo $(DL) nghttp2_is_fatal,$(DL) >> $@
      +	@echo $(DL) nghttp2_option_del,$(DL) >> $@
      +	@echo $(DL) nghttp2_option_new,$(DL) >> $@
      +	@echo $(DL) nghttp2_option_set_no_auto_window_update,$(DL) >> $@
      +	@echo $(DL) nghttp2_option_set_peer_max_concurrent_streams,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_del,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_new,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_before_frame_send_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_on_data_chunk_recv_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_on_frame_recv_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_on_header_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_on_stream_close_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_callbacks_set_send_callback,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_client_new2,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_consume,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_consume_connection,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_del,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_get_remote_settings,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_get_stream_user_data,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_mem_recv,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_resume_data,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_send,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_want_read,$(DL) >> $@
      +	@echo $(DL) nghttp2_session_want_write,$(DL) >> $@
      +	@echo $(DL) nghttp2_strerror,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_goaway,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_ping,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_request,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_rst_stream,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_settings,$(DL) >> $@
      +	@echo $(DL) nghttp2_submit_window_update,$(DL) >> $@
      +	@echo $(DL) nghttp2_version$(DL) >> $@
      +
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/http2/NWGNUproxyht2 b/modules/http2/NWGNUproxyht2
      new file mode 100644
      index 00000000000..ca44ad7c384
      --- /dev/null
      +++ b/modules/http2/NWGNUproxyht2
      @@ -0,0 +1,288 @@
      +#
      +# This Makefile requires the environment var NGH2SRC
      +# pointing to the base directory of nghttp2 source tree.
      +#
      +
      +#
      +# Declare the sub-directories to be built here
      +#
      +
      +SUBDIRS = \
      +	$(EOLIST)
      +
      +#
      +# Get the 'head' of the build environment.  This includes default targets and
      +# paths to tools
      +#
      +
      +include $(AP_WORK)/build/NWGNUhead.inc
      +
      +#
      +# build this level's files
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(APR)/include \
      +			$(APRUTIL)/include \
      +			$(SRC)/include \
      +			$(NGH2SRC)/lib/includes \
      +			$(STDMOD)/proxy \
      +			$(SERVER)/mpm/NetWare \
      +			$(NWOS) \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			-L$(OBJDIR) \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	= proxyht2
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) HTTP2 Proxy module
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	= $(NLM_NAME)
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	= 65536
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# Declare all target files (you must add your files here)
      +#
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = \
      +	$(OBJDIR)/$(NLM_NAME).nlm \
      +	$(EOLIST)
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(OBJDIR)/mod_proxy_http2.o \
      +	$(OBJDIR)/h2_proxy_session.o \
      +	$(OBJDIR)/h2_proxy_util.o \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(PRELUDE) \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	Libc \
      +	Apache2 \
      +	mod_proxy \
      +	mod_http2 \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	@libc.imp \
      +	@aprlib.imp \
      +	@httpd.imp \
      +	@$(OBJDIR)/mod_http2.imp \
      +	ap_proxy_acquire_connection \
      +	ap_proxy_canon_netloc \
      +	ap_proxy_canonenc \
      +	ap_proxy_connect_backend \
      +	ap_proxy_connection_create \
      +	ap_proxy_cookie_reverse_map \
      +	ap_proxy_determine_connection \
      +	ap_proxy_location_reverse_map \
      +	ap_proxy_port_of_scheme \
      +	ap_proxy_release_connection \
      +	ap_proxy_ssl_connection_cleanup \
      +	ap_sock_disable_nagle \
      +	proxy_hook_canon_handler \
      +	proxy_hook_scheme_handler \
      +	proxy_module \
      +	proxy_run_detach_backend \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	proxy_http2_module \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs :=
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(TARGET_lib)
      +
      +nlms :: libs $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +	$(call COPY,$(OBJDIR)/*.nlm,        $(INSTALLBASE)/modules/)
      +
      +clean ::
      +
      +#
      +# Any specialized rules here
      +#
      +
      +#
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/http2/README.h2 b/modules/http2/README.h2
      new file mode 100644
      index 00000000000..f2956f3c33b
      --- /dev/null
      +++ b/modules/http2/README.h2
      @@ -0,0 +1,70 @@
      +The http2 module adds support for the HTTP/2 protocol to the server.
      +
      +Specifically, it supports the protocols "h2" (HTTP2 over TLS) and "h2c" 
      +(HTTP2 over plain HTTP connections via Upgrade). Additionally it offers
      +the "direct" mode for both encrypted and unencrypted connections.
      +
      +You may enable it for the whole server or specific virtual hosts only. 
      +
      +
      +BUILD
      +
      +If you have libnghttp2 (https://nghttp2.org) installed on your system, simply
      +add 
      +
      +    --enable-http2
      +
      +to your httpd ./configure invocation. Should libnghttp2 reside in a unusual
      +location, add
      +
      +    --with-nghttp2=<path>
      +
      +to ./configure. <path> is expected to be the installation prefix, so there
      +should be a <path>/lib/libnghttp2.*. If your system support pkg-config,
      +<path>/lib/pkgconfig/libnghttp2.pc will be inspected.
      +
      +If you want to link nghttp2 statically into the mod_http2 module, you may
      +similarly to mod_ssl add
      +
      +    --enable-nghttp2-staticlib-deps
      +
      +For this, the lib directory should only contain the libnghttp2.a, not its
      +shared cousins.
      +
      +
      +CONFIGURATION
      +
      +If mod_http2 is enabled for a site or not depends on the new "Protocols"
      +directive. This directive list all protocols enabled for a server or
      +virtual host.
      +
      +If you do not specify "Protocols" all available protocols are enabled. For
      +sites using TLS, the protocol supported by mod_http2 is "h2". For cleartext
      +http:, the offered protocol is "h2c".
      +
      +The following is an example of a server that only supports http/1.1 in
      +general and offers h2 for a specific virtual host.
      +
      +    ...
      +    Protocols http/1.1
      +    <virtualhost *:443>
      +        Protocols h2 http/1.1
      +        ...
      +    </virtualhost>
      +
      +Please see the documentation of mod_http2 for a complete list and explanation 
      +of all options.
      +
      +
      +TLS CONFIGURATION
      +
      +If you want to use HTTP/2 with a browser, most modern browsers will support
      +it without further configuration. However, browsers so far only support
      +HTTP/2 over TLS and are especially picky about the certificate and
      +encryption ciphers used.
      +
      +Server admins may look for up-to-date information about "modern" TLS
      +compatibility under: 
      +
      +  https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
      +
      diff --git a/modules/http2/config2.m4 b/modules/http2/config2.m4
      new file mode 100644
      index 00000000000..ceb183533d0
      --- /dev/null
      +++ b/modules/http2/config2.m4
      @@ -0,0 +1,228 @@
      +dnl Licensed to the Apache Software Foundation (ASF) under one or more
      +dnl contributor license agreements.  See the NOTICE file distributed with
      +dnl this work for additional information regarding copyright ownership.
      +dnl The ASF licenses this file to You under the Apache License, Version 2.0
      +dnl (the "License"); you may not use this file except in compliance with
      +dnl the License.  You may obtain a copy of the License at
      +dnl
      +dnl      http://www.apache.org/licenses/LICENSE-2.0
      +dnl
      +dnl Unless required by applicable law or agreed to in writing, software
      +dnl distributed under the License is distributed on an "AS IS" BASIS,
      +dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +dnl See the License for the specific language governing permissions and
      +dnl limitations under the License.
      +
      +dnl #  start of module specific part
      +APACHE_MODPATH_INIT(http2)
      +
      +dnl #  list of module object files
      +http2_objs="dnl
      +mod_http2.lo dnl
      +h2_alt_svc.lo dnl
      +h2_bucket_beam.lo dnl
      +h2_bucket_eoc.lo dnl
      +h2_bucket_eos.lo dnl
      +h2_config.lo dnl
      +h2_conn.lo dnl
      +h2_conn_io.lo dnl
      +h2_ctx.lo dnl
      +h2_filter.lo dnl
      +h2_from_h1.lo dnl
      +h2_h2.lo dnl
      +h2_headers.lo dnl
      +h2_mplx.lo dnl
      +h2_ngn_shed.lo dnl
      +h2_push.lo dnl
      +h2_request.lo dnl
      +h2_session.lo dnl
      +h2_stream.lo dnl
      +h2_switch.lo dnl
      +h2_task.lo dnl
      +h2_util.lo dnl
      +h2_worker.lo dnl
      +h2_workers.lo dnl
      +"
      +
      +dnl
      +dnl APACHE_CHECK_NGHTTP2
      +dnl
      +dnl Configure for nghttp2, giving preference to
      +dnl "--with-nghttp2=<path>" if it was specified.
      +dnl
      +AC_DEFUN([APACHE_CHECK_NGHTTP2],[
      +  AC_CACHE_CHECK([for nghttp2], [ac_cv_nghttp2], [
      +    dnl initialise the variables we use
      +    ac_cv_nghttp2=no
      +    ap_nghttp2_found=""
      +    ap_nghttp2_base=""
      +    ap_nghttp2_libs=""
      +
      +    dnl Determine the nghttp2 base directory, if any
      +    AC_MSG_CHECKING([for user-provided nghttp2 base directory])
      +    AC_ARG_WITH(nghttp2, APACHE_HELP_STRING(--with-nghttp2=PATH, nghttp2 installation directory), [
      +      dnl If --with-nghttp2 specifies a directory, we use that directory
      +      if test "x$withval" != "xyes" -a "x$withval" != "x"; then
      +        dnl This ensures $withval is actually a directory and that it is absolute
      +        ap_nghttp2_base="`cd $withval ; pwd`"
      +      fi
      +    ])
      +    if test "x$ap_nghttp2_base" = "x"; then
      +      AC_MSG_RESULT(none)
      +    else
      +      AC_MSG_RESULT($ap_nghttp2_base)
      +    fi
      +
      +    dnl Run header and version checks
      +    saved_CPPFLAGS="$CPPFLAGS"
      +    saved_LIBS="$LIBS"
      +    saved_LDFLAGS="$LDFLAGS"
      +
      +    dnl Before doing anything else, load in pkg-config variables
      +    if test -n "$PKGCONFIG"; then
      +      saved_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
      +      AC_MSG_CHECKING([for pkg-config along $PKG_CONFIG_PATH])
      +      if test "x$ap_nghttp2_base" != "x" -a \
      +              -f "${ap_nghttp2_base}/lib/pkgconfig/libnghttp2.pc"; then
      +        dnl Ensure that the given path is used by pkg-config too, otherwise
      +        dnl the system libnghttp2.pc might be picked up instead.
      +        PKG_CONFIG_PATH="${ap_nghttp2_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
      +        export PKG_CONFIG_PATH
      +      fi
      +      AC_ARG_ENABLE(nghttp2-staticlib-deps,APACHE_HELP_STRING(--enable-nghttp2-staticlib-deps,[link mod_http2 with dependencies of libnghttp2's static libraries (as indicated by "pkg-config --static"). Must be specified in addition to --enable-http2.]), [
      +        if test "$enableval" = "yes"; then
      +          PKGCONFIG_LIBOPTS="--static"
      +        fi
      +      ])
      +      ap_nghttp2_libs="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-l --silence-errors libnghttp2`"
      +      if test $? -eq 0; then
      +        ap_nghttp2_found="yes"
      +        pkglookup="`$PKGCONFIG --cflags-only-I libnghttp2`"
      +        APR_ADDTO(CPPFLAGS, [$pkglookup])
      +        APR_ADDTO(MOD_CFLAGS, [$pkglookup])
      +        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-L libnghttp2`"
      +        APR_ADDTO(LDFLAGS, [$pkglookup])
      +        APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
      +        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-other libnghttp2`"
      +        APR_ADDTO(LDFLAGS, [$pkglookup])
      +        APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
      +      fi
      +      PKG_CONFIG_PATH="$saved_PKG_CONFIG_PATH"
      +    fi
      +
      +    dnl fall back to the user-supplied directory if not found via pkg-config
      +    if test "x$ap_nghttp2_base" != "x" -a "x$ap_nghttp2_found" = "x"; then
      +      APR_ADDTO(CPPFLAGS, [-I$ap_nghttp2_base/include])
      +      APR_ADDTO(MOD_CFLAGS, [-I$ap_nghttp2_base/include])
      +      APR_ADDTO(LDFLAGS, [-L$ap_nghttp2_base/lib])
      +      APR_ADDTO(MOD_LDFLAGS, [-L$ap_nghttp2_base/lib])
      +      if test "x$ap_platform_runtime_link_flag" != "x"; then
      +        APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_nghttp2_base/lib])
      +        APR_ADDTO(MOD_LDFLAGS, [$ap_platform_runtime_link_flag$ap_nghttp2_base/lib])
      +      fi
      +    fi
      +
      +    AC_MSG_CHECKING([for nghttp2 version >= 1.2.1])
      +    AC_TRY_COMPILE([#include <nghttp2/nghttp2ver.h>],[
      +#if !defined(NGHTTP2_VERSION_NUM)
      +#error "Missing nghttp2 version"
      +#endif
      +#if NGHTTP2_VERSION_NUM < 0x010201
      +#error "Unsupported nghttp2 version " NGHTTP2_VERSION_TEXT
      +#endif],
      +      [AC_MSG_RESULT(OK)
      +       ac_cv_nghttp2=yes],
      +      [AC_MSG_RESULT(FAILED)])
      +
      +    if test "x$ac_cv_nghttp2" = "xyes"; then
      +      ap_nghttp2_libs="${ap_nghttp2_libs:--lnghttp2} `$apr_config --libs`"
      +      APR_ADDTO(MOD_LDFLAGS, [$ap_nghttp2_libs])
      +      APR_ADDTO(LIBS, [$ap_nghttp2_libs])
      +
      +      dnl Run library and function checks
      +      liberrors=""
      +      AC_CHECK_HEADERS([nghttp2/nghttp2.h])
      +      AC_CHECK_FUNCS([nghttp2_session_server_new2], [], [liberrors="yes"])
      +      if test "x$liberrors" != "x"; then
      +        AC_MSG_WARN([nghttp2 library is unusable])
      +      fi
      +dnl # nghttp2 >= 1.3.0: access to stream weights
      +      AC_CHECK_FUNCS([nghttp2_stream_get_weight], [], [liberrors="yes"])
      +      if test "x$liberrors" != "x"; then
      +        AC_MSG_WARN([nghttp2 version >= 1.3.0 is required])
      +      fi
      +dnl # nghttp2 >= 1.5.0: changing stream priorities
      +      AC_CHECK_FUNCS([nghttp2_session_change_stream_priority], 
      +        [APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_CHANGE_PRIO"])], [])
      +dnl # nghttp2 >= 1.14.0: invalid header callback
      +      AC_CHECK_FUNCS([nghttp2_session_callbacks_set_on_invalid_header_callback], 
      +        [APR_ADDTO(MOD_CPPFLAGS, ["-DH2_NG2_INVALID_HEADER_CB"])], [])
      +    else
      +      AC_MSG_WARN([nghttp2 version is too old])
      +    fi
      +
      +    dnl restore
      +    CPPFLAGS="$saved_CPPFLAGS"
      +    LIBS="$saved_LIBS"
      +    LDFLAGS="$saved_LDFLAGS"
      +  ])
      +  if test "x$ac_cv_nghttp2" = "xyes"; then
      +    AC_DEFINE(HAVE_NGHTTP2, 1, [Define if nghttp2 is available])
      +  fi
      +])
      +
      +
      +dnl # hook module into the Autoconf mechanism (--enable-http2)
      +APACHE_MODULE(http2, [HTTP/2 protocol handling in addition to HTTP protocol 
      +handling. Implemented by mod_http2. This module requires a libnghttp2 installation. 
      +See --with-nghttp2 on how to manage non-standard locations. This module
      +is usually linked shared and requires loading. ], $http2_objs, , most, [
      +    APACHE_CHECK_OPENSSL
      +    if test "$ac_cv_openssl" = "yes" ; then
      +        APR_ADDTO(MOD_CPPFLAGS, ["-DH2_OPENSSL"])
      +    fi
      +
      +    APACHE_CHECK_NGHTTP2
      +    if test "$ac_cv_nghttp2" = "yes" ; then
      +        if test "x$enable_http2" = "xshared"; then
      +           # The only symbol which needs to be exported is the module
      +           # structure, so ask libtool to hide everything else:
      +           APR_ADDTO(MOD_HTTP2_LDADD, [-export-symbols-regex http2_module])
      +        fi
      +    else
      +        enable_http2=no
      +    fi
      +])
      +
      +# Ensure that other modules can pick up mod_http2.h
      +# icing: hold back for now until it is more stable
      +#APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
      +
      +
      +
      +dnl #  list of module object files
      +proxy_http2_objs="dnl
      +mod_proxy_http2.lo dnl
      +h2_proxy_session.lo dnl
      +h2_proxy_util.lo dnl
      +"
      +
      +dnl # hook module into the Autoconf mechanism (--enable-proxy_http2)
      +APACHE_MODULE(proxy_http2, [HTTP/2 proxy module. This module requires a libnghttp2 installation. 
      +See --with-nghttp2 on how to manage non-standard locations. Also requires --enable-proxy.], $proxy_http2_objs, , no, [
      +    APACHE_CHECK_NGHTTP2
      +    if test "$ac_cv_nghttp2" = "yes" ; then
      +        if test "x$enable_http2" = "xshared"; then
      +           # The only symbol which needs to be exported is the module
      +           # structure, so ask libtool to hide everything else:
      +           APR_ADDTO(MOD_PROXY_HTTP2_LDADD, [-export-symbols-regex proxy_http2_module])
      +        fi
      +    else
      +        enable_proxy_http2=no
      +    fi
      +], proxy)
      +
      +
      +dnl #  end of module specific part
      +APACHE_MODPATH_FINISH
      +
      diff --git a/modules/http2/h2.h b/modules/http2/h2.h
      new file mode 100644
      index 00000000000..2b80e1bfba0
      --- /dev/null
      +++ b/modules/http2/h2.h
      @@ -0,0 +1,147 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2__
      +#define __mod_h2__h2__
      +
      +/**
      + * The magic PRIamble of RFC 7540 that is always sent when starting
      + * a h2 communication.
      + */
      +extern const char *H2_MAGIC_TOKEN;
      +
      +#define H2_ERR_NO_ERROR             (0x00)
      +#define H2_ERR_PROTOCOL_ERROR       (0x01)
      +#define H2_ERR_INTERNAL_ERROR       (0x02)
      +#define H2_ERR_FLOW_CONTROL_ERROR   (0x03)
      +#define H2_ERR_SETTINGS_TIMEOUT     (0x04)
      +#define H2_ERR_STREAM_CLOSED        (0x05)
      +#define H2_ERR_FRAME_SIZE_ERROR     (0x06)
      +#define H2_ERR_REFUSED_STREAM       (0x07)
      +#define H2_ERR_CANCEL               (0x08)
      +#define H2_ERR_COMPRESSION_ERROR    (0x09)
      +#define H2_ERR_CONNECT_ERROR        (0x0a)
      +#define H2_ERR_ENHANCE_YOUR_CALM    (0x0b)
      +#define H2_ERR_INADEQUATE_SECURITY  (0x0c)
      +#define H2_ERR_HTTP_1_1_REQUIRED    (0x0d)
      +
      +#define H2_HEADER_METHOD     ":method"
      +#define H2_HEADER_METHOD_LEN 7
      +#define H2_HEADER_SCHEME     ":scheme"
      +#define H2_HEADER_SCHEME_LEN 7
      +#define H2_HEADER_AUTH       ":authority"
      +#define H2_HEADER_AUTH_LEN   10
      +#define H2_HEADER_PATH       ":path"
      +#define H2_HEADER_PATH_LEN   5
      +#define H2_CRLF             "\r\n"
      +
      +/* Max data size to write so it fits inside a TLS record */
      +#define H2_DATA_CHUNK_SIZE          ((16*1024) - 100 - 9) 
      +
      +/* Maximum number of padding bytes in a frame, rfc7540 */
      +#define H2_MAX_PADLEN               256
      +/* Initial default window size, RFC 7540 ch. 6.5.2 */
      +#define H2_INITIAL_WINDOW_SIZE      ((64*1024)-1)
      +
      +#define H2_STREAM_CLIENT_INITIATED(id)      (id&0x01)
      +
      +#define H2_ALEN(a)          (sizeof(a)/sizeof((a)[0]))
      +
      +#define H2MAX(x,y) ((x) > (y) ? (x) : (y))
      +#define H2MIN(x,y) ((x) < (y) ? (x) : (y))
      +
      +typedef enum {
      +    H2_DEPENDANT_AFTER,
      +    H2_DEPENDANT_INTERLEAVED,
      +    H2_DEPENDANT_BEFORE,
      +} h2_dependency;
      +
      +typedef struct h2_priority {
      +    h2_dependency dependency;
      +    int           weight;
      +} h2_priority;
      +
      +typedef enum {
      +    H2_PUSH_NONE,
      +    H2_PUSH_DEFAULT,
      +    H2_PUSH_HEAD,
      +    H2_PUSH_FAST_LOAD,
      +} h2_push_policy;
      +
      +typedef enum {
      +    H2_STREAM_ST_IDLE,
      +    H2_STREAM_ST_OPEN,
      +    H2_STREAM_ST_RESV_LOCAL,
      +    H2_STREAM_ST_RESV_REMOTE,
      +    H2_STREAM_ST_CLOSED_INPUT,
      +    H2_STREAM_ST_CLOSED_OUTPUT,
      +    H2_STREAM_ST_CLOSED,
      +} h2_stream_state_t;
      +
      +typedef enum {
      +    H2_SESSION_ST_INIT,             /* send initial SETTINGS, etc. */
      +    H2_SESSION_ST_DONE,             /* finished, connection close */
      +    H2_SESSION_ST_IDLE,             /* nothing to write, expecting data inc */
      +    H2_SESSION_ST_BUSY,             /* read/write without stop */
      +    H2_SESSION_ST_WAIT,             /* waiting for tasks reporting back */
      +} h2_session_state;
      +
      +typedef struct h2_session_props {
      +    int accepted_max;      /* the highest remote stream id was/will be handled */
      +    int completed_max;     /* the highest remote stream completed */
      +    int emitted_count;     /* the number of local streams sent */
      +    int emitted_max;       /* the highest local stream id sent */
      +    int error;             /* the last session error encountered */
      +    unsigned int accepting : 1;     /* if the session is accepting new streams */
      +    unsigned int shutdown : 1;      /* if the final GOAWAY has been sent */
      +} h2_session_props;
      +
      +
      +/* h2_request is the transformer of HTTP2 streams into HTTP/1.1 internal
      + * format that will be fed to various httpd input filters to finally
      + * become a request_rec to be handled by soemone.
      + */
      +typedef struct h2_request h2_request;
      +
      +struct h2_request {
      +    const char *method; /* pseudo header values, see ch. 8.1.2.3 */
      +    const char *scheme;
      +    const char *authority;
      +    const char *path;
      +    apr_table_t *headers;
      +
      +    apr_time_t request_time;
      +    unsigned int chunked : 1;   /* iff requst body needs to be forwarded as chunked */
      +    unsigned int serialize : 1; /* iff this request is written in HTTP/1.1 serialization */
      +};
      +
      +typedef struct h2_headers h2_headers;
      +
      +struct h2_headers {
      +    int         status;
      +    apr_table_t *headers;
      +    apr_table_t *notes;
      +};
      +
      +typedef apr_status_t h2_io_data_cb(void *ctx, const char *data, apr_off_t len);
      +
      +typedef int h2_stream_pri_cmp(int stream_id1, int stream_id2, void *ctx);
      +
      +/* Note key to attach connection task id to conn_rec/request_rec instances */
      +
      +#define H2_TASK_ID_NOTE         "http2-task-id"
      +#define H2_FILTER_DEBUG_NOTE    "http2-debug"
      +
      +#endif /* defined(__mod_h2__h2__) */
      diff --git a/modules/http2/h2_alt_svc.c b/modules/http2/h2_alt_svc.c
      new file mode 100644
      index 00000000000..3dee9df0b65
      --- /dev/null
      +++ b/modules/http2/h2_alt_svc.c
      @@ -0,0 +1,130 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <apr_strings.h>
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +#include "h2_alt_svc.h"
      +#include "h2_ctx.h"
      +#include "h2_config.h"
      +#include "h2_h2.h"
      +#include "h2_util.h"
      +
      +static int h2_alt_svc_handler(request_rec *r);
      +
      +void h2_alt_svc_register_hooks(void)
      +{
      +    ap_hook_post_read_request(h2_alt_svc_handler, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +/**
      + * Parse an Alt-Svc specifier as described in "HTTP Alternative Services"
      + * (https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-04)
      + * with the following changes:
      + * - do not percent encode token values
      + * - do not use quotation marks
      + */
      +h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool)
      +{
      +    const char *sep = ap_strchr_c(s, '=');
      +    if (sep) {
      +        const char *alpn = apr_pstrmemdup(pool, s, sep - s);
      +        const char *host = NULL;
      +        int port = 0;
      +        s = sep + 1;
      +        sep = ap_strchr_c(s, ':');  /* mandatory : */
      +        if (sep) {
      +            if (sep != s) {    /* optional host */
      +                host = apr_pstrmemdup(pool, s, sep - s);
      +            }
      +            s = sep + 1;
      +            if (*s) {          /* must be a port number */
      +                port = (int)apr_atoi64(s);
      +                if (port > 0 && port < (0x1 << 16)) {
      +                    h2_alt_svc *as = apr_pcalloc(pool, sizeof(*as));
      +                    as->alpn = alpn;
      +                    as->host = host;
      +                    as->port = port;
      +                    return as;
      +                }
      +            }
      +        }
      +    }
      +    return NULL;
      +}
      +
      +#define h2_alt_svc_IDX(list, i) ((h2_alt_svc**)(list)->elts)[i]
      +
      +static int h2_alt_svc_handler(request_rec *r)
      +{
      +    const h2_config *cfg;
      +    int i;
      +    
      +    if (r->connection->keepalives > 0) {
      +        /* Only announce Alt-Svc on the first response */
      +        return DECLINED;
      +    }
      +    
      +    if (h2_ctx_rget(r)) {
      +        return DECLINED;
      +    }
      +    
      +    cfg = h2_config_sget(r->server);
      +    if (r->hostname && cfg && cfg->alt_svcs && cfg->alt_svcs->nelts > 0) {
      +        const char *alt_svc_used = apr_table_get(r->headers_in, "Alt-Svc-Used");
      +        if (!alt_svc_used) {
      +            /* We have alt-svcs defined and client is not already using
      +             * one, announce the services that were configured and match. 
      +             * The security of this connection determines if we allow
      +             * other host names or ports only.
      +             */
      +            const char *alt_svc = "";
      +            const char *svc_ma = "";
      +            int secure = h2_h2_is_tls(r->connection);
      +            int ma = h2_config_geti(cfg, H2_CONF_ALT_SVC_MAX_AGE);
      +            if (ma >= 0) {
      +                svc_ma = apr_psprintf(r->pool, "; ma=%d", ma);
      +            }
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03043)
      +                          "h2_alt_svc: announce %s for %s:%d", 
      +                          (secure? "secure" : "insecure"), 
      +                          r->hostname, (int)r->server->port);
      +            for (i = 0; i < cfg->alt_svcs->nelts; ++i) {
      +                h2_alt_svc *as = h2_alt_svc_IDX(cfg->alt_svcs, i);
      +                const char *ahost = as->host;
      +                if (ahost && !apr_strnatcasecmp(ahost, r->hostname)) {
      +                    ahost = NULL;
      +                }
      +                if (secure || !ahost) {
      +                    alt_svc = apr_psprintf(r->pool, "%s%s%s=\"%s:%d\"%s", 
      +                                           alt_svc,
      +                                           (*alt_svc? ", " : ""), as->alpn,
      +                                           ahost? ahost : "", as->port,
      +                                           svc_ma);
      +                }
      +            }
      +            if (*alt_svc) {
      +                apr_table_setn(r->headers_out, "Alt-Svc", alt_svc);
      +            }
      +        }
      +    }
      +    
      +    return DECLINED;
      +}
      diff --git a/modules/http2/h2_alt_svc.h b/modules/http2/h2_alt_svc.h
      new file mode 100644
      index 00000000000..51f89d00b83
      --- /dev/null
      +++ b/modules/http2/h2_alt_svc.h
      @@ -0,0 +1,39 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_alt_svc__
      +#define __mod_h2__h2_alt_svc__
      +
      +typedef struct h2_alt_svc h2_alt_svc;
      +
      +struct h2_alt_svc {
      +    const char *alpn;
      +    const char *host;
      +    int port;
      +};
      +
      +void h2_alt_svc_register_hooks(void);
      +
      +/**
      + * Parse an Alt-Svc specifier as described in "HTTP Alternative Services"
      + * (https://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-04)
      + * with the following changes:
      + * - do not percent encode token values
      + * - do not use quotation marks
      + */
      +h2_alt_svc *h2_alt_svc_parse(const char *s, apr_pool_t *pool);
      +
      +
      +#endif /* defined(__mod_h2__h2_alt_svc__) */
      diff --git a/modules/http2/h2_bucket_beam.c b/modules/http2/h2_bucket_beam.c
      new file mode 100644
      index 00000000000..add3065c975
      --- /dev/null
      +++ b/modules/http2/h2_bucket_beam.c
      @@ -0,0 +1,1175 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <apr_lib.h>
      +#include <apr_strings.h>
      +#include <apr_time.h>
      +#include <apr_buckets.h>
      +#include <apr_thread_mutex.h>
      +#include <apr_thread_cond.h>
      +
      +#include <httpd.h>
      +#include <http_protocol.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +#include "h2_util.h"
      +#include "h2_bucket_beam.h"
      +
      +static void h2_beam_emitted(h2_bucket_beam *beam, h2_beam_proxy *proxy);
      +
      +#define H2_BPROXY_NEXT(e)             APR_RING_NEXT((e), link)
      +#define H2_BPROXY_PREV(e)             APR_RING_PREV((e), link)
      +#define H2_BPROXY_REMOVE(e)           APR_RING_REMOVE((e), link)
      +
      +#define H2_BPROXY_LIST_INIT(b)        APR_RING_INIT(&(b)->list, h2_beam_proxy, link);
      +#define H2_BPROXY_LIST_SENTINEL(b)    APR_RING_SENTINEL(&(b)->list, h2_beam_proxy, link)
      +#define H2_BPROXY_LIST_EMPTY(b)       APR_RING_EMPTY(&(b)->list, h2_beam_proxy, link)
      +#define H2_BPROXY_LIST_FIRST(b)       APR_RING_FIRST(&(b)->list)
      +#define H2_BPROXY_LIST_LAST(b)	      APR_RING_LAST(&(b)->list)
      +#define H2_PROXY_BLIST_INSERT_HEAD(b, e) do {				\
      +	h2_beam_proxy *ap__b = (e);                                        \
      +	APR_RING_INSERT_HEAD(&(b)->list, ap__b, h2_beam_proxy, link);	\
      +    } while (0)
      +#define H2_BPROXY_LIST_INSERT_TAIL(b, e) do {				\
      +	h2_beam_proxy *ap__b = (e);					\
      +	APR_RING_INSERT_TAIL(&(b)->list, ap__b, h2_beam_proxy, link);	\
      +    } while (0)
      +#define H2_BPROXY_LIST_CONCAT(a, b) do {					\
      +        APR_RING_CONCAT(&(a)->list, &(b)->list, h2_beam_proxy, link);	\
      +    } while (0)
      +#define H2_BPROXY_LIST_PREPEND(a, b) do {					\
      +        APR_RING_PREPEND(&(a)->list, &(b)->list, h2_beam_proxy, link);	\
      +    } while (0)
      +
      +
      +/*******************************************************************************
      + * beam bucket with reference to beam and bucket it represents
      + ******************************************************************************/
      +
      +const apr_bucket_type_t h2_bucket_type_beam;
      +
      +#define H2_BUCKET_IS_BEAM(e)     (e->type == &h2_bucket_type_beam)
      +
      +struct h2_beam_proxy {
      +    apr_bucket_refcount refcount;
      +    APR_RING_ENTRY(h2_beam_proxy) link;
      +    h2_bucket_beam *beam;
      +    apr_bucket *bred;
      +    apr_size_t n;
      +};
      +
      +static const char Dummy = '\0';
      +
      +static apr_status_t beam_bucket_read(apr_bucket *b, const char **str, 
      +                                     apr_size_t *len, apr_read_type_e block)
      +{
      +    h2_beam_proxy *d = b->data;
      +    if (d->bred) {
      +        const char *data;
      +        apr_status_t status = apr_bucket_read(d->bred, &data, len, block);
      +        if (status == APR_SUCCESS) {
      +            *str = data + b->start;
      +            *len = b->length;
      +        }
      +        return status;
      +    }
      +    *str = &Dummy;
      +    *len = 0;
      +    return APR_ECONNRESET;
      +}
      +
      +static void beam_bucket_destroy(void *data)
      +{
      +    h2_beam_proxy *d = data;
      +
      +    if (apr_bucket_shared_destroy(d)) {
      +        /* When the beam gets destroyed before this bucket, it will
      +         * NULLify its reference here. This is not protected by a mutex,
      +         * so it will not help with race conditions.
      +         * But it lets us shut down memory pool with circulare beam
      +         * references. */
      +        if (d->beam) {
      +            h2_beam_emitted(d->beam, d);
      +        }
      +        apr_bucket_free(d);
      +    }
      +}
      +
      +static apr_bucket * h2_beam_bucket_make(apr_bucket *b, 
      +                                        h2_bucket_beam *beam,
      +                                        apr_bucket *bred, apr_size_t n)
      +{
      +    h2_beam_proxy *d;
      +
      +    d = apr_bucket_alloc(sizeof(*d), b->list);
      +    H2_BPROXY_LIST_INSERT_TAIL(&beam->proxies, d);
      +    d->beam = beam;
      +    d->bred = bred;
      +    d->n = n;
      +    
      +    b = apr_bucket_shared_make(b, d, 0, bred? bred->length : 0);
      +    b->type = &h2_bucket_type_beam;
      +
      +    return b;
      +}
      +
      +static apr_bucket *h2_beam_bucket_create(h2_bucket_beam *beam,
      +                                         apr_bucket *bred,
      +                                         apr_bucket_alloc_t *list,
      +                                         apr_size_t n)
      +{
      +    apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
      +
      +    APR_BUCKET_INIT(b);
      +    b->free = apr_bucket_free;
      +    b->list = list;
      +    return h2_beam_bucket_make(b, beam, bred, n);
      +}
      +
      +const apr_bucket_type_t h2_bucket_type_beam = {
      +    "BEAM", 5, APR_BUCKET_DATA,
      +    beam_bucket_destroy,
      +    beam_bucket_read,
      +    apr_bucket_setaside_noop,
      +    apr_bucket_shared_split,
      +    apr_bucket_shared_copy
      +};
      +
      +/*******************************************************************************
      + * h2_blist, a brigade without allocations
      + ******************************************************************************/
      +
      +static apr_array_header_t *beamers;
      +
      +static apr_status_t cleanup_beamers(void *dummy)
      +{
      +    (void)dummy;
      +    beamers = NULL;
      +    return APR_SUCCESS;
      +}
      +
      +void h2_register_bucket_beamer(h2_bucket_beamer *beamer)
      +{
      +    if (!beamers) {
      +        apr_pool_cleanup_register(apr_hook_global_pool, NULL,
      +                                  cleanup_beamers, apr_pool_cleanup_null);
      +        beamers = apr_array_make(apr_hook_global_pool, 10, 
      +                                 sizeof(h2_bucket_beamer*));
      +    }
      +    APR_ARRAY_PUSH(beamers, h2_bucket_beamer*) = beamer;
      +}
      +
      +static apr_bucket *h2_beam_bucket(h2_bucket_beam *beam, 
      +                                  apr_bucket_brigade *dest,
      +                                  const apr_bucket *src)
      +{
      +    apr_bucket *b = NULL;
      +    int i;
      +    if (beamers) {
      +        for (i = 0; i < beamers->nelts && b == NULL; ++i) {
      +            h2_bucket_beamer *beamer;
      +            
      +            beamer = APR_ARRAY_IDX(beamers, i, h2_bucket_beamer*);
      +            b = beamer(beam, dest, src);
      +        }
      +    }
      +    return b;
      +}
      +
      +
      +apr_size_t h2_util_bl_print(char *buffer, apr_size_t bmax, 
      +                            const char *tag, const char *sep, 
      +                            h2_blist *bl)
      +{
      +    apr_size_t off = 0;
      +    const char *sp = "";
      +    apr_bucket *b;
      +    
      +    if (bl) {
      +        memset(buffer, 0, bmax--);
      +        off += apr_snprintf(buffer+off, bmax-off, "%s(", tag);
      +        for (b = H2_BLIST_FIRST(bl); 
      +             bmax && (b != H2_BLIST_SENTINEL(bl));
      +             b = APR_BUCKET_NEXT(b)) {
      +            
      +            off += h2_util_bucket_print(buffer+off, bmax-off, b, sp);
      +            sp = " ";
      +        }
      +        off += apr_snprintf(buffer+off, bmax-off, ")%s", sep);
      +    }
      +    else {
      +        off += apr_snprintf(buffer+off, bmax-off, "%s(null)%s", tag, sep);
      +    }
      +    return off;
      +}
      +
      +
      +
      +/*******************************************************************************
      + * bucket beam that can transport buckets across threads
      + ******************************************************************************/
      +
      +static apr_status_t enter_yellow(h2_bucket_beam *beam, h2_beam_lock *pbl)
      +{
      +    h2_beam_mutex_enter *enter = beam->m_enter;
      +    if (enter) {
      +        void *ctx = beam->m_ctx;
      +        if (ctx) {
      +            return enter(ctx, pbl);
      +        }
      +    }
      +    pbl->mutex = NULL;
      +    pbl->leave = NULL;
      +    return APR_SUCCESS;
      +}
      +
      +static void leave_yellow(h2_bucket_beam *beam, h2_beam_lock *pbl)
      +{
      +    if (pbl->leave) {
      +        pbl->leave(pbl->leave_ctx, pbl->mutex);
      +    }
      +}
      +
      +static void report_consumption(h2_bucket_beam *beam, int force)
      +{
      +    if (force || beam->received_bytes != beam->reported_consumed_bytes) {
      +        if (beam->consumed_fn) { 
      +            beam->consumed_fn(beam->consumed_ctx, beam, beam->received_bytes
      +                              - beam->reported_consumed_bytes);
      +        }
      +        beam->reported_consumed_bytes = beam->received_bytes;
      +    }
      +}
      +
      +static void report_production(h2_bucket_beam *beam, int force)
      +{
      +    if (force || beam->sent_bytes != beam->reported_produced_bytes) {
      +        if (beam->produced_fn) { 
      +            beam->produced_fn(beam->produced_ctx, beam, beam->sent_bytes
      +                              - beam->reported_produced_bytes);
      +        }
      +        beam->reported_produced_bytes = beam->sent_bytes;
      +    }
      +}
      +
      +static apr_size_t calc_buffered(h2_bucket_beam *beam)
      +{
      +    apr_size_t len = 0;
      +    apr_bucket *b;
      +    for (b = H2_BLIST_FIRST(&beam->send_list); 
      +         b != H2_BLIST_SENTINEL(&beam->send_list);
      +         b = APR_BUCKET_NEXT(b)) {
      +        if (b->length == ((apr_size_t)-1)) {
      +            /* do not count */
      +        }
      +        else if (APR_BUCKET_IS_FILE(b)) {
      +            /* if unread, has no real mem footprint. how to test? */
      +        }
      +        else {
      +            len += b->length;
      +        }
      +    }
      +    return len;
      +}
      +
      +static void r_purge_sent(h2_bucket_beam *beam)
      +{
      +    apr_bucket *b;
      +    /* delete all sender buckets in purge brigade, needs to be called
      +     * from sender thread only */
      +    while (!H2_BLIST_EMPTY(&beam->purge_list)) {
      +        b = H2_BLIST_FIRST(&beam->purge_list);
      +        apr_bucket_delete(b);
      +    }
      +}
      +
      +static apr_size_t calc_space_left(h2_bucket_beam *beam)
      +{
      +    if (beam->max_buf_size > 0) {
      +        apr_off_t len = calc_buffered(beam);
      +        return (beam->max_buf_size > len? (beam->max_buf_size - len) : 0);
      +    }
      +    return APR_SIZE_MAX;
      +}
      +
      +static apr_status_t wait_cond(h2_bucket_beam *beam, apr_thread_mutex_t *lock)
      +{
      +    if (beam->timeout > 0) {
      +        return apr_thread_cond_timedwait(beam->m_cond, lock, beam->timeout);
      +    }
      +    else {
      +        return apr_thread_cond_wait(beam->m_cond, lock);
      +    }
      +}
      +
      +static apr_status_t r_wait_space(h2_bucket_beam *beam, apr_read_type_e block,
      +                                 h2_beam_lock *pbl, apr_size_t *premain) 
      +{
      +    *premain = calc_space_left(beam);
      +    while (!beam->aborted && *premain <= 0 
      +           && (block == APR_BLOCK_READ) && pbl->mutex) {
      +        apr_status_t status;
      +        report_production(beam, 1);
      +        status = wait_cond(beam, pbl->mutex);
      +        if (APR_STATUS_IS_TIMEUP(status)) {
      +            return status;
      +        }
      +        r_purge_sent(beam);
      +        *premain = calc_space_left(beam);
      +    }
      +    return beam->aborted? APR_ECONNABORTED : APR_SUCCESS;
      +}
      +
      +static void h2_beam_emitted(h2_bucket_beam *beam, h2_beam_proxy *proxy)
      +{
      +    h2_beam_lock bl;
      +    apr_bucket *b, *next;
      +
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        /* even when beam buckets are split, only the one where
      +         * refcount drops to 0 will call us */
      +        H2_BPROXY_REMOVE(proxy);
      +        /* invoked from receiver thread, the last beam bucket for the send
      +         * bucket is about to be destroyed.
      +         * remove it from the hold, where it should be now */
      +        if (proxy->bred) {
      +            for (b = H2_BLIST_FIRST(&beam->hold_list); 
      +                 b != H2_BLIST_SENTINEL(&beam->hold_list);
      +                 b = APR_BUCKET_NEXT(b)) {
      +                 if (b == proxy->bred) {
      +                    break;
      +                 }
      +            }
      +            if (b != H2_BLIST_SENTINEL(&beam->hold_list)) {
      +                /* bucket is in hold as it should be, mark this one
      +                 * and all before it for purging. We might have placed meta
      +                 * buckets without a green proxy into the hold before it 
      +                 * and schedule them for purging now */
      +                for (b = H2_BLIST_FIRST(&beam->hold_list); 
      +                     b != H2_BLIST_SENTINEL(&beam->hold_list);
      +                     b = next) {
      +                    next = APR_BUCKET_NEXT(b);
      +                    if (b == proxy->bred) {
      +                        APR_BUCKET_REMOVE(b);
      +                        H2_BLIST_INSERT_TAIL(&beam->purge_list, b);
      +                        break;
      +                    }
      +                    else if (APR_BUCKET_IS_METADATA(b)) {
      +                        APR_BUCKET_REMOVE(b);
      +                        H2_BLIST_INSERT_TAIL(&beam->purge_list, b);
      +                    }
      +                    else {
      +                        /* another data bucket before this one in hold. this
      +                         * is normal since DATA buckets need not be destroyed
      +                         * in order */
      +                    }
      +                }
      +                
      +                proxy->bred = NULL;
      +            }
      +            else {
      +                /* it should be there unless we screwed up */
      +                ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, beam->send_pool, 
      +                              APLOGNO(03384) "h2_beam(%d-%s): emitted bucket not "
      +                              "in hold, n=%d", beam->id, beam->tag, 
      +                              (int)proxy->n);
      +                ap_assert(!proxy->bred);
      +            }
      +        }
      +        /* notify anyone waiting on space to become available */
      +        if (!bl.mutex) {
      +            r_purge_sent(beam);
      +        }
      +        else if (beam->m_cond) {
      +            apr_thread_cond_broadcast(beam->m_cond);
      +        }
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +static void h2_blist_cleanup(h2_blist *bl)
      +{
      +    apr_bucket *e;
      +
      +    while (!H2_BLIST_EMPTY(bl)) {
      +        e = H2_BLIST_FIRST(bl);
      +        apr_bucket_delete(e);
      +    }
      +}
      +
      +static apr_status_t beam_close(h2_bucket_beam *beam)
      +{
      +    if (!beam->closed) {
      +        beam->closed = 1;
      +        if (beam->m_cond) {
      +            apr_thread_cond_broadcast(beam->m_cond);
      +        }
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static void beam_set_send_pool(h2_bucket_beam *beam, apr_pool_t *pool);
      +static void beam_set_recv_pool(h2_bucket_beam *beam, apr_pool_t *pool);
      +
      +static apr_status_t beam_recv_cleanup(void *data)
      +{
      +    h2_bucket_beam *beam = data;
      +    /* receiver pool has gone away, clear references */
      +    beam->recv_buffer = NULL;
      +    beam->recv_pool = NULL;
      +    return APR_SUCCESS;
      +}
      +
      +static void beam_set_recv_pool(h2_bucket_beam *beam, apr_pool_t *pool) 
      +{
      +    /* if the beam owner is the sender, monitor receiver pool lifetime */ 
      +    if (beam->owner == H2_BEAM_OWNER_SEND && beam->recv_pool != pool) {
      +        if (beam->recv_pool) {
      +            apr_pool_cleanup_kill(beam->recv_pool, beam, beam_recv_cleanup);
      +        }
      +        beam->recv_pool = pool;
      +        if (beam->recv_pool) {
      +            apr_pool_pre_cleanup_register(beam->recv_pool, beam, beam_recv_cleanup);
      +        }
      +    }
      +}
      +
      +static apr_status_t beam_send_cleanup(void *data)
      +{
      +    h2_bucket_beam *beam = data;
      +    /* sender has gone away, clear up all references to its memory */
      +    r_purge_sent(beam);
      +    h2_blist_cleanup(&beam->send_list);
      +    report_consumption(beam, 0);
      +    while (!H2_BPROXY_LIST_EMPTY(&beam->proxies)) {
      +        h2_beam_proxy *proxy = H2_BPROXY_LIST_FIRST(&beam->proxies);
      +        H2_BPROXY_REMOVE(proxy);
      +        proxy->beam = NULL;
      +        proxy->bred = NULL;
      +    }
      +    h2_blist_cleanup(&beam->purge_list);
      +    h2_blist_cleanup(&beam->hold_list);
      +    beam->send_pool = NULL;
      +    return APR_SUCCESS;
      +}
      +
      +static void beam_set_send_pool(h2_bucket_beam *beam, apr_pool_t *pool) 
      +{
      +    /* if the beam owner is the receiver, monitor sender pool lifetime */
      +    if (beam->owner == H2_BEAM_OWNER_RECV && beam->send_pool != pool) {
      +        if (beam->send_pool && pool 
      +            && apr_pool_is_ancestor(beam->send_pool, pool)) {
      +            /* when sender uses sub-pools to transmit data, stick
      +             * to the lifetime of the pool we already have. */
      +             return;
      +        }
      +        if (beam->send_pool) {
      +            apr_pool_cleanup_kill(beam->send_pool, beam, beam_send_cleanup);
      +        }
      +        beam->send_pool = pool;
      +        if (beam->send_pool) {
      +            apr_pool_pre_cleanup_register(beam->send_pool, beam, beam_send_cleanup);
      +        }
      +    }
      +}
      +
      +static apr_status_t beam_cleanup(void *data)
      +{
      +    h2_bucket_beam *beam = data;
      +    apr_status_t status = APR_SUCCESS;
      +    /* owner of the beam is going away, depending on its role, cleanup
      +     * strategies differ. */
      +    beam_close(beam);
      +    switch (beam->owner) {
      +        case H2_BEAM_OWNER_SEND:
      +            status = beam_send_cleanup(beam);
      +            beam->recv_buffer = NULL;
      +            beam->recv_pool = NULL;
      +            break;
      +        case H2_BEAM_OWNER_RECV:
      +            if (beam->recv_buffer) {
      +                apr_brigade_destroy(beam->recv_buffer);
      +            }
      +            beam->recv_buffer = NULL;
      +            beam->recv_pool = NULL;
      +            if (!H2_BLIST_EMPTY(&beam->send_list)) {
      +                ap_assert(beam->send_pool);
      +            }
      +            if (beam->send_pool) {
      +                /* sender has not cleaned up, its pool still lives.
      +                 * this is normal if the sender uses cleanup via a bucket
      +                 * such as the BUCKET_EOR for requests. In that case, the
      +                 * beam should have lost its mutex protection, meaning
      +                 * it is no longer used multi-threaded and we can safely
      +                 * purge all remaining sender buckets. */
      +                apr_pool_cleanup_kill(beam->send_pool, beam, beam_send_cleanup);
      +                ap_assert(!beam->m_enter);
      +                beam_send_cleanup(beam);
      +            }
      +            ap_assert(H2_BPROXY_LIST_EMPTY(&beam->proxies));
      +            ap_assert(H2_BLIST_EMPTY(&beam->send_list));
      +            ap_assert(H2_BLIST_EMPTY(&beam->hold_list));
      +            ap_assert(H2_BLIST_EMPTY(&beam->purge_list));
      +            break;
      +        default:
      +            ap_assert(NULL);
      +            break;
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_beam_destroy(h2_bucket_beam *beam)
      +{
      +    apr_pool_cleanup_kill(beam->pool, beam, beam_cleanup);
      +    return beam_cleanup(beam);
      +}
      +
      +apr_status_t h2_beam_create(h2_bucket_beam **pbeam, apr_pool_t *pool, 
      +                            int id, const char *tag, 
      +                            h2_beam_owner_t owner,
      +                            apr_size_t max_buf_size)
      +{
      +    h2_bucket_beam *beam;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    beam = apr_pcalloc(pool, sizeof(*beam));
      +    if (!beam) {
      +        return APR_ENOMEM;
      +    }
      +
      +    beam->id = id;
      +    beam->tag = tag;
      +    beam->pool = pool;
      +    beam->owner = owner;
      +    H2_BLIST_INIT(&beam->send_list);
      +    H2_BLIST_INIT(&beam->hold_list);
      +    H2_BLIST_INIT(&beam->purge_list);
      +    H2_BPROXY_LIST_INIT(&beam->proxies);
      +    beam->max_buf_size = max_buf_size;
      +    apr_pool_pre_cleanup_register(pool, beam, beam_cleanup);
      +
      +    *pbeam = beam;
      +    
      +    return status;
      +}
      +
      +void h2_beam_buffer_size_set(h2_bucket_beam *beam, apr_size_t buffer_size)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->max_buf_size = buffer_size;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +apr_size_t h2_beam_buffer_size_get(h2_bucket_beam *beam)
      +{
      +    h2_beam_lock bl;
      +    apr_size_t buffer_size = 0;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        buffer_size = beam->max_buf_size;
      +        leave_yellow(beam, &bl);
      +    }
      +    return buffer_size;
      +}
      +
      +void h2_beam_mutex_set(h2_bucket_beam *beam, 
      +                       h2_beam_mutex_enter m_enter,
      +                       apr_thread_cond_t *cond,
      +                       void *m_ctx)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->m_enter = m_enter;
      +        beam->m_ctx   = m_ctx;
      +        beam->m_cond  = cond;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +void h2_beam_timeout_set(h2_bucket_beam *beam, apr_interval_time_t timeout)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->timeout = timeout;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +apr_interval_time_t h2_beam_timeout_get(h2_bucket_beam *beam)
      +{
      +    h2_beam_lock bl;
      +    apr_interval_time_t timeout = 0;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        timeout = beam->timeout;
      +        leave_yellow(beam, &bl);
      +    }
      +    return timeout;
      +}
      +
      +void h2_beam_abort(h2_bucket_beam *beam)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        if (!beam->aborted) {
      +            beam->aborted = 1;
      +            r_purge_sent(beam);
      +            h2_blist_cleanup(&beam->send_list);
      +            report_consumption(beam, 0);
      +        }
      +        if (beam->m_cond) {
      +            apr_thread_cond_broadcast(beam->m_cond);
      +        }
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +apr_status_t h2_beam_close(h2_bucket_beam *beam)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        r_purge_sent(beam);
      +        beam_close(beam);
      +        report_consumption(beam, 0);
      +        leave_yellow(beam, &bl);
      +    }
      +    return beam->aborted? APR_ECONNABORTED : APR_SUCCESS;
      +}
      +
      +apr_status_t h2_beam_wait_empty(h2_bucket_beam *beam, apr_read_type_e block)
      +{
      +    apr_status_t status;
      +    h2_beam_lock bl;
      +    
      +    if ((status = enter_yellow(beam, &bl)) == APR_SUCCESS) {
      +        while (status == APR_SUCCESS
      +               && !H2_BLIST_EMPTY(&beam->send_list)
      +               && !H2_BPROXY_LIST_EMPTY(&beam->proxies)) {
      +            if (block == APR_NONBLOCK_READ || !bl.mutex) {
      +                status = APR_EAGAIN;
      +                break;
      +            }
      +            if (beam->m_cond) {
      +                apr_thread_cond_broadcast(beam->m_cond);
      +            }
      +            status = wait_cond(beam, bl.mutex);
      +        }
      +        leave_yellow(beam, &bl);
      +    }
      +    return status;
      +}
      +
      +static void move_to_hold(h2_bucket_beam *beam, 
      +                         apr_bucket_brigade *red_brigade)
      +{
      +    apr_bucket *b;
      +    while (red_brigade && !APR_BRIGADE_EMPTY(red_brigade)) {
      +        b = APR_BRIGADE_FIRST(red_brigade);
      +        APR_BUCKET_REMOVE(b);
      +        H2_BLIST_INSERT_TAIL(&beam->send_list, b);
      +    }
      +}
      +
      +static apr_status_t append_bucket(h2_bucket_beam *beam, 
      +                                  apr_bucket *b,
      +                                  apr_read_type_e block,
      +                                  h2_beam_lock *pbl)
      +{
      +    const char *data;
      +    apr_size_t len;
      +    apr_size_t space_left = 0;
      +    apr_status_t status;
      +    
      +    if (APR_BUCKET_IS_METADATA(b)) {
      +        if (APR_BUCKET_IS_EOS(b)) {
      +            beam->closed = 1;
      +        }
      +        APR_BUCKET_REMOVE(b);
      +        H2_BLIST_INSERT_TAIL(&beam->send_list, b);
      +        return APR_SUCCESS;
      +    }
      +    else if (APR_BUCKET_IS_FILE(b)) {
      +        /* file bucket lengths do not really count */
      +    }
      +    else {
      +        space_left = calc_space_left(beam);
      +        if (space_left > 0 && b->length == ((apr_size_t)-1)) {
      +            const char *data;
      +            status = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      +            if (status != APR_SUCCESS) {
      +                return status;
      +            }
      +        }
      +        
      +        if (space_left < b->length) {
      +            status = r_wait_space(beam, block, pbl, &space_left);
      +            if (status != APR_SUCCESS) {
      +                return status;
      +            }
      +            if (space_left <= 0) {
      +                return APR_EAGAIN;
      +            }
      +        }
      +        /* space available, maybe need bucket split */
      +    }
      +    
      +
      +    /* The fundamental problem is that reading a red bucket from
      +     * a green thread is a total NO GO, because the bucket might use
      +     * its pool/bucket_alloc from a foreign thread and that will
      +     * corrupt. */
      +    status = APR_ENOTIMPL;
      +    if (APR_BUCKET_IS_TRANSIENT(b)) {
      +        /* this takes care of transient buckets and converts them
      +         * into heap ones. Other bucket types might or might not be
      +         * affected by this. */
      +        status = apr_bucket_setaside(b, beam->send_pool);
      +    }
      +    else if (APR_BUCKET_IS_HEAP(b)) {
      +        /* For heap buckets read from a green thread is fine. The
      +         * data will be there and live until the bucket itself is
      +         * destroyed. */
      +        status = APR_SUCCESS;
      +    }
      +    else if (APR_BUCKET_IS_POOL(b)) {
      +        /* pool buckets are bastards that register at pool cleanup
      +         * to morph themselves into heap buckets. That may happen anytime,
      +         * even after the bucket data pointer has been read. So at
      +         * any time inside the green thread, the pool bucket memory
      +         * may disappear. yikes. */
      +        status = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      +        if (status == APR_SUCCESS) {
      +            apr_bucket_heap_make(b, data, len, NULL);
      +        }
      +    }
      +    else if (APR_BUCKET_IS_FILE(b)) {
      +        /* For file buckets the problem is their internal readpool that
      +         * is used on the first read to allocate buffer/mmap.
      +         * Since setting aside a file bucket will de-register the
      +         * file cleanup function from the previous pool, we need to
      +         * call that from a red thread. 
      +         * Additionally, we allow callbacks to prevent beaming file
      +         * handles across. The use case for this is to limit the number 
      +         * of open file handles and rather use a less efficient beam
      +         * transport. */
      +        apr_file_t *fd = ((apr_bucket_file *)b->data)->fd;
      +        int can_beam = 1;
      +        if (beam->last_beamed != fd && beam->can_beam_fn) {
      +            can_beam = beam->can_beam_fn(beam->can_beam_ctx, beam, fd);
      +        }
      +        if (can_beam) {
      +            beam->last_beamed = fd;
      +            status = apr_bucket_setaside(b, beam->send_pool);
      +        }
      +        /* else: enter ENOTIMPL case below */
      +    }
      +    
      +    if (status == APR_ENOTIMPL) {
      +        /* we have no knowledge about the internals of this bucket,
      +         * but hope that after read, its data stays immutable for the
      +         * lifetime of the bucket. (see pool bucket handling above for
      +         * a counter example).
      +         * We do the read while in a red thread, so that the bucket may
      +         * use pools/allocators safely. */
      +        if (space_left < APR_BUCKET_BUFF_SIZE) {
      +            space_left = APR_BUCKET_BUFF_SIZE;
      +        }
      +        if (space_left < b->length) {
      +            apr_bucket_split(b, space_left);
      +        }
      +        status = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      +        if (status == APR_SUCCESS) {
      +            status = apr_bucket_setaside(b, beam->send_pool);
      +        }
      +    }
      +    
      +    if (status != APR_SUCCESS && status != APR_ENOTIMPL) {
      +        return status;
      +    }
      +    
      +    APR_BUCKET_REMOVE(b);
      +    H2_BLIST_INSERT_TAIL(&beam->send_list, b);
      +    beam->sent_bytes += b->length;
      +    
      +    return APR_SUCCESS;
      +}
      +
      +void h2_beam_send_from(h2_bucket_beam *beam, apr_pool_t *p)
      +{
      +    h2_beam_lock bl;
      +    /* Called from the red thread to add buckets to the beam */
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        r_purge_sent(beam);
      +        beam_set_send_pool(beam, p);
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +apr_status_t h2_beam_send(h2_bucket_beam *beam, 
      +                          apr_bucket_brigade *red_brigade, 
      +                          apr_read_type_e block)
      +{
      +    apr_bucket *b;
      +    apr_status_t status = APR_SUCCESS;
      +    h2_beam_lock bl;
      +
      +    /* Called from the red thread to add buckets to the beam */
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        r_purge_sent(beam);
      +        if (red_brigade && !beam->send_pool) {
      +            beam_set_send_pool(beam, red_brigade->p);
      +        }
      +        
      +        if (beam->aborted) {
      +            move_to_hold(beam, red_brigade);
      +            status = APR_ECONNABORTED;
      +        }
      +        else if (red_brigade) {
      +            int force_report = !APR_BRIGADE_EMPTY(red_brigade); 
      +            while (!APR_BRIGADE_EMPTY(red_brigade)
      +                   && status == APR_SUCCESS) {
      +                b = APR_BRIGADE_FIRST(red_brigade);
      +                status = append_bucket(beam, b, block, &bl);
      +            }
      +            report_production(beam, force_report);
      +            if (beam->m_cond) {
      +                apr_thread_cond_broadcast(beam->m_cond);
      +            }
      +        }
      +        report_consumption(beam, 0);
      +        leave_yellow(beam, &bl);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_beam_receive(h2_bucket_beam *beam, 
      +                             apr_bucket_brigade *bb, 
      +                             apr_read_type_e block,
      +                             apr_off_t readbytes)
      +{
      +    h2_beam_lock bl;
      +    apr_bucket *bred, *bgreen, *ng;
      +    int transferred = 0;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_off_t remain = readbytes;
      +    
      +    /* Called from the green thread to take buckets from the beam */
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +transfer:
      +        if (beam->aborted) {
      +            if (beam->recv_buffer && !APR_BRIGADE_EMPTY(beam->recv_buffer)) {
      +                apr_brigade_cleanup(beam->recv_buffer);
      +            }
      +            status = APR_ECONNABORTED;
      +            goto leave;
      +        }
      +
      +        /* transfer enough buckets from our green brigade, if we have one */
      +        beam_set_recv_pool(beam, bb->p);
      +        while (beam->recv_buffer
      +               && !APR_BRIGADE_EMPTY(beam->recv_buffer)
      +               && (readbytes <= 0 || remain >= 0)) {
      +            bgreen = APR_BRIGADE_FIRST(beam->recv_buffer);
      +            if (readbytes > 0 && bgreen->length > 0 && remain <= 0) {
      +                break;
      +            }            
      +            APR_BUCKET_REMOVE(bgreen);
      +            APR_BRIGADE_INSERT_TAIL(bb, bgreen);
      +            remain -= bgreen->length;
      +            ++transferred;
      +        }
      +
      +        /* transfer from our red brigade, transforming red buckets to
      +         * green ones until we have enough */
      +        while (!H2_BLIST_EMPTY(&beam->send_list) && (readbytes <= 0 || remain >= 0)) {
      +            bred = H2_BLIST_FIRST(&beam->send_list);
      +            bgreen = NULL;
      +            
      +            if (readbytes > 0 && bred->length > 0 && remain <= 0) {
      +                break;
      +            }
      +                        
      +            if (APR_BUCKET_IS_METADATA(bred)) {
      +                if (APR_BUCKET_IS_EOS(bred)) {
      +                    bgreen = apr_bucket_eos_create(bb->bucket_alloc);
      +                    beam->close_sent = 1;
      +                }
      +                else if (APR_BUCKET_IS_FLUSH(bred)) {
      +                    bgreen = apr_bucket_flush_create(bb->bucket_alloc);
      +                }
      +                else if (AP_BUCKET_IS_ERROR(bred)) {
      +                    ap_bucket_error *eb = (ap_bucket_error *)bred;
      +                    bgreen = ap_bucket_error_create(eb->status, eb->data,
      +                                                    bb->p, bb->bucket_alloc);
      +                }
      +            }
      +            else if (APR_BUCKET_IS_FILE(bred)) {
      +                /* This is set aside into the target brigade pool so that 
      +                 * any read operation messes with that pool and not 
      +                 * the red one. */
      +                apr_bucket_file *f = (apr_bucket_file *)bred->data;
      +                apr_file_t *fd = f->fd;
      +                int setaside = (f->readpool != bb->p);
      +                
      +                if (setaside) {
      +                    status = apr_file_setaside(&fd, fd, bb->p);
      +                    if (status != APR_SUCCESS) {
      +                        goto leave;
      +                    }
      +                    ++beam->files_beamed;
      +                }
      +                ng = apr_brigade_insert_file(bb, fd, bred->start, bred->length, 
      +                                             bb->p);
      +#if APR_HAS_MMAP
      +                /* disable mmap handling as this leads to segfaults when
      +                 * the underlying file is changed while memory pointer has
      +                 * been handed out. See also PR 59348 */
      +                apr_bucket_file_enable_mmap(ng, 0);
      +#endif
      +                remain -= bred->length;
      +                ++transferred;
      +                APR_BUCKET_REMOVE(bred);
      +                H2_BLIST_INSERT_TAIL(&beam->hold_list, bred);
      +                ++transferred;
      +                continue;
      +            }
      +            else {
      +                /* create a "green" standin bucket. we took care about the
      +                 * underlying red bucket and its data when we placed it into
      +                 * the red brigade.
      +                 * the beam bucket will notify us on destruction that bred is
      +                 * no longer needed. */
      +                bgreen = h2_beam_bucket_create(beam, bred, bb->bucket_alloc,
      +                                               beam->buckets_sent++);
      +            }
      +            
      +            /* Place the red bucket into our hold, to be destroyed when no
      +             * green bucket references it any more. */
      +            APR_BUCKET_REMOVE(bred);
      +            H2_BLIST_INSERT_TAIL(&beam->hold_list, bred);
      +            beam->received_bytes += bred->length;
      +            if (bgreen) {
      +                APR_BRIGADE_INSERT_TAIL(bb, bgreen);
      +                remain -= bgreen->length;
      +                ++transferred;
      +            }
      +            else {
      +                bgreen = h2_beam_bucket(beam, bb, bred);
      +                while (bgreen && bgreen != APR_BRIGADE_SENTINEL(bb)) {
      +                    ++transferred;
      +                    remain -= bgreen->length;
      +                    bgreen = APR_BUCKET_NEXT(bgreen);
      +                }
      +            }
      +        }
      +
      +        if (readbytes > 0 && remain < 0) {
      +            /* too much, put some back */
      +            remain = readbytes;
      +            for (bgreen = APR_BRIGADE_FIRST(bb);
      +                 bgreen != APR_BRIGADE_SENTINEL(bb);
      +                 bgreen = APR_BUCKET_NEXT(bgreen)) {
      +                 remain -= bgreen->length;
      +                 if (remain < 0) {
      +                     apr_bucket_split(bgreen, bgreen->length+remain);
      +                     beam->recv_buffer = apr_brigade_split_ex(bb, 
      +                                                        APR_BUCKET_NEXT(bgreen), 
      +                                                        beam->recv_buffer);
      +                     break;
      +                 }
      +            }
      +        }
      +
      +        if (beam->closed 
      +            && (!beam->recv_buffer || APR_BRIGADE_EMPTY(beam->recv_buffer))
      +            && H2_BLIST_EMPTY(&beam->send_list)) {
      +            /* beam is closed and we have nothing more to receive */ 
      +            if (!beam->close_sent) {
      +                apr_bucket *b = apr_bucket_eos_create(bb->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(bb, b);
      +                beam->close_sent = 1;
      +                ++transferred;
      +                status = APR_SUCCESS;
      +            }
      +        }
      +        
      +        if (transferred) {
      +            if (beam->m_cond) {
      +                apr_thread_cond_broadcast(beam->m_cond);
      +            }
      +            status = APR_SUCCESS;
      +        }
      +        else if (beam->closed) {
      +            status = APR_EOF;
      +        }
      +        else if (block == APR_BLOCK_READ && bl.mutex && beam->m_cond) {
      +            status = wait_cond(beam, bl.mutex);
      +            if (status != APR_SUCCESS) {
      +                goto leave;
      +            }
      +            goto transfer;
      +        }
      +        else {
      +            if (beam->m_cond) {
      +                apr_thread_cond_broadcast(beam->m_cond);
      +            }
      +            status = APR_EAGAIN;
      +        }
      +leave:        
      +        leave_yellow(beam, &bl);
      +    }
      +    return status;
      +}
      +
      +void h2_beam_on_consumed(h2_bucket_beam *beam, 
      +                         h2_beam_io_callback *cb, void *ctx)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->consumed_fn = cb;
      +        beam->consumed_ctx = ctx;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +void h2_beam_on_produced(h2_bucket_beam *beam, 
      +                         h2_beam_io_callback *cb, void *ctx)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->produced_fn = cb;
      +        beam->produced_ctx = ctx;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +void h2_beam_on_file_beam(h2_bucket_beam *beam, 
      +                          h2_beam_can_beam_callback *cb, void *ctx)
      +{
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        beam->can_beam_fn = cb;
      +        beam->can_beam_ctx = ctx;
      +        leave_yellow(beam, &bl);
      +    }
      +}
      +
      +
      +apr_off_t h2_beam_get_buffered(h2_bucket_beam *beam)
      +{
      +    apr_bucket *b;
      +    apr_off_t l = 0;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        for (b = H2_BLIST_FIRST(&beam->send_list); 
      +            b != H2_BLIST_SENTINEL(&beam->send_list);
      +            b = APR_BUCKET_NEXT(b)) {
      +            /* should all have determinate length */
      +            l += b->length;
      +        }
      +        leave_yellow(beam, &bl);
      +    }
      +    return l;
      +}
      +
      +apr_off_t h2_beam_get_mem_used(h2_bucket_beam *beam)
      +{
      +    apr_bucket *b;
      +    apr_off_t l = 0;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        for (b = H2_BLIST_FIRST(&beam->send_list); 
      +            b != H2_BLIST_SENTINEL(&beam->send_list);
      +            b = APR_BUCKET_NEXT(b)) {
      +            if (APR_BUCKET_IS_FILE(b)) {
      +                /* do not count */
      +            }
      +            else {
      +                /* should all have determinate length */
      +                l += b->length;
      +            }
      +        }
      +        leave_yellow(beam, &bl);
      +    }
      +    return l;
      +}
      +
      +int h2_beam_empty(h2_bucket_beam *beam)
      +{
      +    int empty = 1;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        empty = (H2_BLIST_EMPTY(&beam->send_list) 
      +                 && (!beam->recv_buffer || APR_BRIGADE_EMPTY(beam->recv_buffer)));
      +        leave_yellow(beam, &bl);
      +    }
      +    return empty;
      +}
      +
      +int h2_beam_holds_proxies(h2_bucket_beam *beam)
      +{
      +    int has_proxies = 1;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        has_proxies = !H2_BPROXY_LIST_EMPTY(&beam->proxies);
      +        leave_yellow(beam, &bl);
      +    }
      +    return has_proxies;
      +}
      +
      +int h2_beam_was_received(h2_bucket_beam *beam)
      +{
      +    int happend = 0;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        happend = (beam->received_bytes > 0);
      +        leave_yellow(beam, &bl);
      +    }
      +    return happend;
      +}
      +
      +apr_size_t h2_beam_get_files_beamed(h2_bucket_beam *beam)
      +{
      +    apr_size_t n = 0;
      +    h2_beam_lock bl;
      +    
      +    if (enter_yellow(beam, &bl) == APR_SUCCESS) {
      +        n = beam->files_beamed;
      +        leave_yellow(beam, &bl);
      +    }
      +    return n;
      +}
      +
      +int h2_beam_no_files(void *ctx, h2_bucket_beam *beam, apr_file_t *file)
      +{
      +    return 0;
      +}
      +
      diff --git a/modules/http2/h2_bucket_beam.h b/modules/http2/h2_bucket_beam.h
      new file mode 100644
      index 00000000000..39fd476c20b
      --- /dev/null
      +++ b/modules/http2/h2_bucket_beam.h
      @@ -0,0 +1,386 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef h2_bucket_beam_h
      +#define h2_bucket_beam_h
      +
      +struct apr_thread_mutex_t;
      +struct apr_thread_cond_t;
      +
      +/*******************************************************************************
      + * apr_bucket list without bells and whistles
      + ******************************************************************************/
      + 
      +/**
      + * h2_blist can hold a list of buckets just like apr_bucket_brigade, but
      + * does not to any allocations or related features.
      + */
      +typedef struct {
      +    APR_RING_HEAD(h2_bucket_list, apr_bucket) list;
      +} h2_blist;
      +
      +#define H2_BLIST_INIT(b)        APR_RING_INIT(&(b)->list, apr_bucket, link);
      +#define H2_BLIST_SENTINEL(b)    APR_RING_SENTINEL(&(b)->list, apr_bucket, link)
      +#define H2_BLIST_EMPTY(b)       APR_RING_EMPTY(&(b)->list, apr_bucket, link)
      +#define H2_BLIST_FIRST(b)       APR_RING_FIRST(&(b)->list)
      +#define H2_BLIST_LAST(b)	APR_RING_LAST(&(b)->list)
      +#define H2_BLIST_INSERT_HEAD(b, e) do {				\
      +	apr_bucket *ap__b = (e);                                        \
      +	APR_RING_INSERT_HEAD(&(b)->list, ap__b, apr_bucket, link);	\
      +    } while (0)
      +#define H2_BLIST_INSERT_TAIL(b, e) do {				\
      +	apr_bucket *ap__b = (e);					\
      +	APR_RING_INSERT_TAIL(&(b)->list, ap__b, apr_bucket, link);	\
      +    } while (0)
      +#define H2_BLIST_CONCAT(a, b) do {					\
      +        APR_RING_CONCAT(&(a)->list, &(b)->list, apr_bucket, link);	\
      +    } while (0)
      +#define H2_BLIST_PREPEND(a, b) do {					\
      +        APR_RING_PREPEND(&(a)->list, &(b)->list, apr_bucket, link);	\
      +    } while (0)
      +
      +/**
      + * Print the buckets in the list into the buffer (type and lengths).
      + * @param buffer the buffer to print into
      + * @param bmax max number of characters to place in buffer, incl. trailing 0
      + * @param tag tag string for this bucket list
      + * @param sep separator to use
      + * @param bl the bucket list to print
      + * @return number of characters printed
      + */
      +apr_size_t h2_util_bl_print(char *buffer, apr_size_t bmax, 
      +                            const char *tag, const char *sep, 
      +                            h2_blist *bl);
      +
      +/*******************************************************************************
      + * h2_bucket_beam
      + ******************************************************************************/
      +
      +/**
      + * A h2_bucket_beam solves the task of transferring buckets, esp. their data,
      + * across threads with zero buffer copies.
      + *
      + * When a thread, let's call it the red thread, wants to send buckets to
      + * another, the green thread, it creates a h2_bucket_beam and adds buckets
      + * via the h2_beam_send(). It gives the beam to the green thread which then
      + * can receive buckets into its own brigade via h2_beam_receive().
      + *
      + * Sending and receiving can happen concurrently, if a thread mutex is set
      + * for the beam, see h2_beam_mutex_set.
      + *
      + * The beam can limit the amount of data it accepts via the buffer_size. This
      + * can also be adjusted during its lifetime. When the beam not only gets a 
      + * mutex but als a condition variable (in h2_beam_mutex_set()), sends and
      + * receives can be done blocking. A timeout can be set for such blocks.
      + *
      + * Care needs to be taken when terminating the beam. The beam registers at
      + * the pool it was created with and will cleanup after itself. However, if
      + * received buckets do still exist, already freed memory might be accessed.
      + * The beam does a assertion on this condition.
      + * 
      + * The proper way of shutting down a beam is to first make sure there are no
      + * more green buckets out there, then cleanup the beam to purge eventually
      + * still existing red buckets and then, possibly, terminate the beam itself
      + * (or the pool it was created with).
      + *
      + * The following restrictions apply to bucket transport:
      + * - only EOS and FLUSH meta buckets are copied through. All other meta buckets
      + *   are kept in the beams hold.
      + * - all kind of data buckets are transported through:
      + *   - transient buckets are converted to heap ones on send
      + *   - heap and pool buckets require no extra handling
      + *   - buckets with indeterminate length are read on send
      + *   - file buckets will transfer the file itself into a new bucket, if allowed
      + *   - all other buckets are read on send to make sure data is present
      + *
      + * This assures that when the red thread sends its red buckets, the data
      + * is made accessible while still on the red side. The red bucket then enters
      + * the beams hold storage.
      + * When the green thread calls receive, red buckets in the hold are wrapped
      + * into special beam buckets. Beam buckets on read present the data directly
      + * from the internal red one, but otherwise live on the green side. When a
      + * beam bucket gets destroyed, it notifies its beam that the corresponding
      + * red bucket from the hold may be destroyed.
      + * Since the destruction of green buckets happens in the green thread, any
      + * corresponding red bucket can not immediately be destroyed, as that would
      + * result in race conditions.
      + * Instead, the beam transfers such red buckets from the hold to the purge
      + * storage. Next time there is a call from the red side, the buckets in
      + * purge will be deleted.
      + *
      + * There are callbacks that can be registered with a beam:
      + * - a "consumed" callback that gets called on the red side with the
      + *   amount of data that has been received by the green side. The amount
      + *   is a delta from the last callback invocation. The red side can trigger
      + *   these callbacks by calling h2_beam_send() with a NULL brigade.
      + * - a "can_beam_file" callback that can prohibit the transfer of file handles
      + *   through the beam. This will cause file buckets to be read on send and
      + *   its data buffer will then be transports just like a heap bucket would.
      + *   When no callback is registered, no restrictions apply and all files are
      + *   passed through.
      + *   File handles transferred to the green side will stay there until the
      + *   receiving brigade's pool is destroyed/cleared. If the pool lives very
      + *   long or if many different files are beamed, the process might run out
      + *   of available file handles.
      + *
      + * The name "beam" of course is inspired by good old transporter
      + * technology where humans are kept inside the transporter's memory
      + * buffers until the transmission is complete. Star gates use a similar trick.
      + */
      +
      +typedef void h2_beam_mutex_leave(void *ctx,  struct apr_thread_mutex_t *lock);
      +
      +typedef struct {
      +    apr_thread_mutex_t *mutex;
      +    h2_beam_mutex_leave *leave;
      +    void *leave_ctx;
      +} h2_beam_lock;
      +
      +typedef struct h2_bucket_beam h2_bucket_beam;
      +
      +typedef apr_status_t h2_beam_mutex_enter(void *ctx, h2_beam_lock *pbl);
      +
      +typedef void h2_beam_io_callback(void *ctx, h2_bucket_beam *beam,
      +                                 apr_off_t bytes);
      +
      +typedef struct h2_beam_proxy h2_beam_proxy;
      +typedef struct {
      +    APR_RING_HEAD(h2_beam_proxy_list, h2_beam_proxy) list;
      +} h2_bproxy_list;
      +
      +typedef int h2_beam_can_beam_callback(void *ctx, h2_bucket_beam *beam,
      +                                      apr_file_t *file);
      +
      +typedef enum {
      +    H2_BEAM_OWNER_SEND,
      +    H2_BEAM_OWNER_RECV
      +} h2_beam_owner_t;
      +
      +/**
      + * Will deny all transfer of apr_file_t across the beam and force
      + * a data copy instead.
      + */
      +int h2_beam_no_files(void *ctx, h2_bucket_beam *beam, apr_file_t *file);
      +
      +struct h2_bucket_beam {
      +    int id;
      +    const char *tag;
      +    apr_pool_t *pool;
      +    h2_beam_owner_t owner;
      +    h2_blist send_list;
      +    h2_blist hold_list;
      +    h2_blist purge_list;
      +    apr_bucket_brigade *recv_buffer;
      +    h2_bproxy_list proxies;
      +    apr_pool_t *send_pool;
      +    apr_pool_t *recv_pool;
      +    
      +    apr_size_t max_buf_size;
      +    apr_interval_time_t timeout;
      +
      +    apr_off_t sent_bytes;     /* amount of bytes send */
      +    apr_off_t received_bytes; /* amount of bytes received */
      +
      +    apr_size_t buckets_sent;  /* # of beam buckets sent */
      +    apr_size_t files_beamed;  /* how many file handles have been set aside */
      +    apr_file_t *last_beamed;  /* last file beamed */
      +    
      +    unsigned int aborted : 1;
      +    unsigned int closed : 1;
      +    unsigned int close_sent : 1;
      +
      +    void *m_ctx;
      +    h2_beam_mutex_enter *m_enter;
      +    struct apr_thread_cond_t *m_cond;
      +    
      +    apr_off_t reported_consumed_bytes; /* amount of bytes reported as consumed */
      +    h2_beam_io_callback *consumed_fn;
      +    void *consumed_ctx;
      +    apr_off_t reported_produced_bytes; /* amount of bytes reported as produced */
      +    h2_beam_io_callback *produced_fn;
      +    void *produced_ctx;
      +    h2_beam_can_beam_callback *can_beam_fn;
      +    void *can_beam_ctx;
      +};
      +
      +/**
      + * Creates a new bucket beam for transfer of buckets across threads.
      + *
      + * The pool the beam is created with will be protected by the given 
      + * mutex and will be used in multiple threads. It needs a pool allocator
      + * that is only used inside that same mutex.
      + *
      + * @param pbeam         will hold the created beam on return
      + * @param pool          pool owning the beam, beam will cleanup when pool released
      + * @param id            identifier of the beam
      + * @param tag           tag identifying beam for logging
      + * @param owner         if the beam is owned by the sender or receiver, e.g. if
      + *                      the pool owner is using this beam for sending or receiving
      + * @param buffer_size   maximum memory footprint of buckets buffered in beam, or
      + *                      0 for no limitation
      + */
      +apr_status_t h2_beam_create(h2_bucket_beam **pbeam,
      +                            apr_pool_t *pool, 
      +                            int id, const char *tag,
      +                            h2_beam_owner_t owner,  
      +                            apr_size_t buffer_size);
      +
      +/**
      + * Destroys the beam immediately without cleanup.
      + */ 
      +apr_status_t h2_beam_destroy(h2_bucket_beam *beam);
      +
      +/**
      + * Send buckets from the given brigade through the beam. Will hold buckets 
      + * internally as long as they have not been processed by the receiving side.
      + * All accepted buckets are removed from the given brigade. Will return with
      + * APR_EAGAIN on non-blocking sends when not all buckets could be accepted.
      + * 
      + * Call from the sender side only.
      + */
      +apr_status_t h2_beam_send(h2_bucket_beam *beam,  
      +                          apr_bucket_brigade *bb, 
      +                          apr_read_type_e block);
      +
      +/**
      + * Register the pool from which future buckets are send. This defines
      + * the lifetime of the buckets, e.g. the pool should not be cleared/destroyed
      + * until the data is no longer needed (or has been received).
      + */
      +void h2_beam_send_from(h2_bucket_beam *beam, apr_pool_t *p);
      +
      +/**
      + * Receive buckets from the beam into the given brigade. Will return APR_EOF
      + * when reading past an EOS bucket. Reads can be blocking until data is 
      + * available or the beam has been closed. Non-blocking calls return APR_EAGAIN
      + * if no data is available.
      + *
      + * Call from the receiver side only.
      + */
      +apr_status_t h2_beam_receive(h2_bucket_beam *beam, 
      +                             apr_bucket_brigade *green_buckets, 
      +                             apr_read_type_e block,
      +                             apr_off_t readbytes);
      +
      +/**
      + * Determine if beam is empty. 
      + */
      +int h2_beam_empty(h2_bucket_beam *beam);
      +
      +/**
      + * Determine if beam has handed out proxy buckets that are not destroyed. 
      + */
      +int h2_beam_holds_proxies(h2_bucket_beam *beam);
      +
      +/**
      + * Abort the beam. Will cleanup any buffered buckets and answer all send
      + * and receives with APR_ECONNABORTED.
      + * 
      + * Call from the sender side only.
      + */
      +void h2_beam_abort(h2_bucket_beam *beam);
      +
      +/**
      + * Close the beam. Sending an EOS bucket serves the same purpose. 
      + * 
      + * Call from the sender side only.
      + */
      +apr_status_t h2_beam_close(h2_bucket_beam *beam);
      +
      +/**
      + * Return APR_SUCCESS when all buckets in transit have been handled. 
      + * When called with APR_BLOCK_READ and a mutex set, will wait until the green
      + * side has consumed all data. Otherwise APR_EAGAIN is returned.
      + * With clear_buffers set, any queued data is discarded.
      + * If a timeout is set on the beam, waiting might also time out and
      + * return APR_ETIMEUP.
      + *
      + * Call from the sender side only.
      + */
      +apr_status_t h2_beam_wait_empty(h2_bucket_beam *beam, apr_read_type_e block);
      +
      +void h2_beam_mutex_set(h2_bucket_beam *beam, 
      +                       h2_beam_mutex_enter m_enter,
      +                       struct apr_thread_cond_t *cond,
      +                       void *m_ctx);
      +
      +/** 
      + * Set/get the timeout for blocking read/write operations. Only works
      + * if a mutex has been set for the beam.
      + */
      +void h2_beam_timeout_set(h2_bucket_beam *beam, 
      +                         apr_interval_time_t timeout);
      +apr_interval_time_t h2_beam_timeout_get(h2_bucket_beam *beam);
      +
      +/**
      + * Set/get the maximum buffer size for beam data (memory footprint).
      + */
      +void h2_beam_buffer_size_set(h2_bucket_beam *beam, 
      +                             apr_size_t buffer_size);
      +apr_size_t h2_beam_buffer_size_get(h2_bucket_beam *beam);
      +
      +/**
      + * Register a callback to be invoked on the sender side with the
      + * amount of bytes that have been consumed by the receiver, since the
      + * last callback invocation or reset.
      + * @param beam the beam to set the callback on
      + * @param cb   the callback or NULL
      + * @param ctx  the context to use in callback invocation
      + * 
      + * Call from the sender side, callbacks invoked on sender side.
      + */
      +void h2_beam_on_consumed(h2_bucket_beam *beam, 
      +                         h2_beam_io_callback *cb, void *ctx);
      +
      +/**
      + * Register a callback to be invoked on the receiver side with the
      + * amount of bytes that have been produces by the sender, since the
      + * last callback invocation or reset.
      + * @param beam the beam to set the callback on
      + * @param cb   the callback or NULL
      + * @param ctx  the context to use in callback invocation
      + * 
      + * Call from the receiver side, callbacks invoked on receiver side.
      + */
      +void h2_beam_on_produced(h2_bucket_beam *beam, 
      +                         h2_beam_io_callback *cb, void *ctx);
      +
      +void h2_beam_on_file_beam(h2_bucket_beam *beam, 
      +                          h2_beam_can_beam_callback *cb, void *ctx);
      +
      +/**
      + * Get the amount of bytes currently buffered in the beam (unread).
      + */
      +apr_off_t h2_beam_get_buffered(h2_bucket_beam *beam);
      +
      +/**
      + * Get the memory used by the buffered buckets, approximately.
      + */
      +apr_off_t h2_beam_get_mem_used(h2_bucket_beam *beam);
      +
      +/**
      + * Return != 0 iff (some) data from the beam has been received.
      + */
      +int h2_beam_was_received(h2_bucket_beam *beam);
      +
      +apr_size_t h2_beam_get_files_beamed(h2_bucket_beam *beam);
      +
      +typedef apr_bucket *h2_bucket_beamer(h2_bucket_beam *beam, 
      +                                     apr_bucket_brigade *dest,
      +                                     const apr_bucket *src);
      +
      +void h2_register_bucket_beamer(h2_bucket_beamer *beamer);
      +
      +#endif /* h2_bucket_beam_h */
      diff --git a/modules/http2/h2_bucket_eoc.c b/modules/http2/h2_bucket_eoc.c
      new file mode 100644
      index 00000000000..33144ef50b7
      --- /dev/null
      +++ b/modules/http2/h2_bucket_eoc.c
      @@ -0,0 +1,110 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_mplx.h"
      +#include "h2_session.h"
      +#include "h2_bucket_eoc.h"
      +
      +typedef struct {
      +    apr_bucket_refcount refcount;
      +    h2_session *session;
      +} h2_bucket_eoc;
      +
      +static apr_status_t bucket_cleanup(void *data)
      +{
      +    h2_session **psession = data;
      +
      +    if (*psession) {
      +        /*
      +         * If bucket_destroy is called after us, this prevents
      +         * bucket_destroy from trying to destroy the pool again.
      +         */
      +        *psession = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t bucket_read(apr_bucket *b, const char **str,
      +                                apr_size_t *len, apr_read_type_e block)
      +{
      +    (void)b;
      +    (void)block;
      +    *str = NULL;
      +    *len = 0;
      +    return APR_SUCCESS;
      +}
      +
      +apr_bucket * h2_bucket_eoc_make(apr_bucket *b, h2_session *session)
      +{
      +    h2_bucket_eoc *h;
      +
      +    h = apr_bucket_alloc(sizeof(*h), b->list);
      +    h->session = session;
      +
      +    b = apr_bucket_shared_make(b, h, 0, 0);
      +    b->type = &h2_bucket_type_eoc;
      +    
      +    return b;
      +}
      +
      +apr_bucket * h2_bucket_eoc_create(apr_bucket_alloc_t *list, h2_session *session)
      +{
      +    apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
      +
      +    APR_BUCKET_INIT(b);
      +    b->free = apr_bucket_free;
      +    b->list = list;
      +    b = h2_bucket_eoc_make(b, session);
      +    if (session) {
      +        h2_bucket_eoc *h = b->data;
      +        apr_pool_pre_cleanup_register(session->pool, &h->session, bucket_cleanup);
      +    }
      +    return b;
      +}
      +
      +static void bucket_destroy(void *data)
      +{
      +    h2_bucket_eoc *h = data;
      +
      +    if (apr_bucket_shared_destroy(h)) {
      +        h2_session *session = h->session;
      +        apr_bucket_free(h);
      +        if (session) {
      +            h2_session_eoc_callback(session);
      +            /* all is gone now */
      +        }
      +    }
      +}
      +
      +const apr_bucket_type_t h2_bucket_type_eoc = {
      +    "H2EOC", 5, APR_BUCKET_METADATA,
      +    bucket_destroy,
      +    bucket_read,
      +    apr_bucket_setaside_noop,
      +    apr_bucket_split_notimpl,
      +    apr_bucket_shared_copy
      +};
      +
      diff --git a/modules/http2/h2_bucket_eoc.h b/modules/http2/h2_bucket_eoc.h
      new file mode 100644
      index 00000000000..2d46691995d
      --- /dev/null
      +++ b/modules/http2/h2_bucket_eoc.h
      @@ -0,0 +1,32 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef mod_http2_h2_bucket_eoc_h
      +#define mod_http2_h2_bucket_eoc_h
      +
      +struct h2_session;
      +
      +/** End Of HTTP/2 SESSION (H2EOC) bucket */
      +extern const apr_bucket_type_t h2_bucket_type_eoc;
      +
      +#define H2_BUCKET_IS_H2EOC(e)     (e->type == &h2_bucket_type_eoc)
      +
      +apr_bucket * h2_bucket_eoc_make(apr_bucket *b, 
      +                                struct h2_session *session);
      +
      +apr_bucket * h2_bucket_eoc_create(apr_bucket_alloc_t *list,
      +                                  struct h2_session *session);
      +
      +#endif /* mod_http2_h2_bucket_eoc_h */
      diff --git a/modules/http2/h2_bucket_eos.c b/modules/http2/h2_bucket_eos.c
      new file mode 100644
      index 00000000000..28c34fdc310
      --- /dev/null
      +++ b/modules/http2/h2_bucket_eos.c
      @@ -0,0 +1,111 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_mplx.h"
      +#include "h2_stream.h"
      +#include "h2_bucket_eos.h"
      +
      +typedef struct {
      +    apr_bucket_refcount refcount;
      +    h2_stream *stream;
      +} h2_bucket_eos;
      +
      +static apr_status_t bucket_cleanup(void *data)
      +{
      +    h2_stream **pstream = data;
      +
      +    if (*pstream) {
      +        /* If bucket_destroy is called after us, this prevents
      +         * bucket_destroy from trying to destroy the stream again. */
      +        *pstream = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t bucket_read(apr_bucket *b, const char **str,
      +                                apr_size_t *len, apr_read_type_e block)
      +{
      +    (void)b;
      +    (void)block;
      +    *str = NULL;
      +    *len = 0;
      +    return APR_SUCCESS;
      +}
      +
      +apr_bucket *h2_bucket_eos_make(apr_bucket *b, h2_stream *stream)
      +{
      +    h2_bucket_eos *h;
      +
      +    h = apr_bucket_alloc(sizeof(*h), b->list);
      +    h->stream = stream;
      +
      +    b = apr_bucket_shared_make(b, h, 0, 0);
      +    b->type = &h2_bucket_type_eos;
      +    
      +    return b;
      +}
      +
      +apr_bucket *h2_bucket_eos_create(apr_bucket_alloc_t *list,
      +                                 h2_stream *stream)
      +{
      +    apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
      +
      +    APR_BUCKET_INIT(b);
      +    b->free = apr_bucket_free;
      +    b->list = list;
      +    b = h2_bucket_eos_make(b, stream);
      +    if (stream) {
      +        h2_bucket_eos *h = b->data;
      +        apr_pool_pre_cleanup_register(stream->pool, &h->stream, bucket_cleanup);
      +    }
      +    return b;
      +}
      +
      +static void bucket_destroy(void *data)
      +{
      +    h2_bucket_eos *h = data;
      +
      +    if (apr_bucket_shared_destroy(h)) {
      +        h2_stream *stream = h->stream;
      +        if (stream && stream->pool) {
      +            apr_pool_cleanup_kill(stream->pool, &h->stream, bucket_cleanup);
      +        }
      +        apr_bucket_free(h);
      +        if (stream) {
      +            h2_stream_eos_destroy(stream);
      +        }
      +    }
      +}
      +
      +const apr_bucket_type_t h2_bucket_type_eos = {
      +    "H2EOS", 5, APR_BUCKET_METADATA,
      +    bucket_destroy,
      +    bucket_read,
      +    apr_bucket_setaside_noop,
      +    apr_bucket_split_notimpl,
      +    apr_bucket_shared_copy
      +};
      +
      diff --git a/modules/http2/h2_bucket_eos.h b/modules/http2/h2_bucket_eos.h
      new file mode 100644
      index 00000000000..27b501dad39
      --- /dev/null
      +++ b/modules/http2/h2_bucket_eos.h
      @@ -0,0 +1,31 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef mod_http2_h2_bucket_stream_eos_h
      +#define mod_http2_h2_bucket_stream_eos_h
      +
      +struct h2_stream;
      +
      +/** End Of HTTP/2 STREAM (H2EOS) bucket */
      +extern const apr_bucket_type_t h2_bucket_type_eos;
      +
      +#define H2_BUCKET_IS_H2EOS(e)     (e->type == &h2_bucket_type_eos)
      +
      +apr_bucket *h2_bucket_eos_make(apr_bucket *b, struct h2_stream *stream);
      +
      +apr_bucket *h2_bucket_eos_create(apr_bucket_alloc_t *list, 
      +                                 struct h2_stream *stream);
      +
      +#endif /* mod_http2_h2_bucket_stream_eos_h */
      diff --git a/modules/http2/h2_config.c b/modules/http2/h2_config.c
      new file mode 100644
      index 00000000000..669d20e75ce
      --- /dev/null
      +++ b/modules/http2/h2_config.c
      @@ -0,0 +1,684 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_hash.h>
      +#include <apr_lib.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +#include <http_log.h>
      +#include <http_vhost.h>
      +
      +#include <ap_mpm.h>
      +
      +#include <apr_strings.h>
      +
      +#include "h2.h"
      +#include "h2_alt_svc.h"
      +#include "h2_ctx.h"
      +#include "h2_conn.h"
      +#include "h2_config.h"
      +#include "h2_h2.h"
      +#include "h2_private.h"
      +
      +#define DEF_VAL     (-1)
      +
      +#define H2_CONFIG_GET(a, b, n) \
      +    (((a)->n == DEF_VAL)? (b) : (a))->n
      +
      +static h2_config defconf = {
      +    "default",
      +    100,                    /* max_streams */
      +    H2_INITIAL_WINDOW_SIZE, /* window_size */
      +    -1,                     /* min workers */
      +    -1,                     /* max workers */
      +    10 * 60,                /* max workers idle secs */
      +    64 * 1024,              /* stream max mem size */
      +    NULL,                   /* no alt-svcs */
      +    -1,                     /* alt-svc max age */
      +    0,                      /* serialize headers */
      +    -1,                     /* h2 direct mode */
      +    -1,                     /* # session extra files */
      +    1,                      /* modern TLS only */
      +    -1,                     /* HTTP/1 Upgrade support */
      +    1024*1024,              /* TLS warmup size */
      +    1,                      /* TLS cooldown secs */
      +    1,                      /* HTTP/2 server push enabled */
      +    NULL,                   /* map of content-type to priorities */
      +    256,                    /* push diary size */
      +    0,                      /* copy files across threads */
      +    NULL,                   /* push list */
      +    0,                      /* early hints, http status 103 */
      +};
      +
      +void h2_config_init(apr_pool_t *pool)
      +{
      +    (void)pool;
      +}
      +
      +static void *h2_config_create(apr_pool_t *pool,
      +                              const char *prefix, const char *x)
      +{
      +    h2_config *conf = (h2_config *)apr_pcalloc(pool, sizeof(h2_config));
      +    const char *s = x? x : "unknown";
      +    char *name = apr_pstrcat(pool, prefix, "[", s, "]", NULL);
      +    
      +    conf->name                 = name;
      +    conf->h2_max_streams       = DEF_VAL;
      +    conf->h2_window_size       = DEF_VAL;
      +    conf->min_workers          = DEF_VAL;
      +    conf->max_workers          = DEF_VAL;
      +    conf->max_worker_idle_secs = DEF_VAL;
      +    conf->stream_max_mem_size  = DEF_VAL;
      +    conf->alt_svc_max_age      = DEF_VAL;
      +    conf->serialize_headers    = DEF_VAL;
      +    conf->h2_direct            = DEF_VAL;
      +    conf->session_extra_files  = DEF_VAL;
      +    conf->modern_tls_only      = DEF_VAL;
      +    conf->h2_upgrade           = DEF_VAL;
      +    conf->tls_warmup_size      = DEF_VAL;
      +    conf->tls_cooldown_secs    = DEF_VAL;
      +    conf->h2_push              = DEF_VAL;
      +    conf->priorities           = NULL;
      +    conf->push_diary_size      = DEF_VAL;
      +    conf->copy_files           = DEF_VAL;
      +    conf->push_list            = NULL;
      +    conf->early_hints          = DEF_VAL;
      +    return conf;
      +}
      +
      +void *h2_config_create_svr(apr_pool_t *pool, server_rec *s)
      +{
      +    return h2_config_create(pool, "srv", s->defn_name);
      +}
      +
      +void *h2_config_create_dir(apr_pool_t *pool, char *x)
      +{
      +    return h2_config_create(pool, "dir", x);
      +}
      +
      +static void *h2_config_merge(apr_pool_t *pool, void *basev, void *addv)
      +{
      +    h2_config *base = (h2_config *)basev;
      +    h2_config *add = (h2_config *)addv;
      +    h2_config *n = (h2_config *)apr_pcalloc(pool, sizeof(h2_config));
      +    char *name = apr_pstrcat(pool, "merged[", add->name, ", ", base->name, "]", NULL);
      +    n->name = name;
      +
      +    n->h2_max_streams       = H2_CONFIG_GET(add, base, h2_max_streams);
      +    n->h2_window_size       = H2_CONFIG_GET(add, base, h2_window_size);
      +    n->min_workers          = H2_CONFIG_GET(add, base, min_workers);
      +    n->max_workers          = H2_CONFIG_GET(add, base, max_workers);
      +    n->max_worker_idle_secs = H2_CONFIG_GET(add, base, max_worker_idle_secs);
      +    n->stream_max_mem_size  = H2_CONFIG_GET(add, base, stream_max_mem_size);
      +    n->alt_svcs             = add->alt_svcs? add->alt_svcs : base->alt_svcs;
      +    n->alt_svc_max_age      = H2_CONFIG_GET(add, base, alt_svc_max_age);
      +    n->serialize_headers    = H2_CONFIG_GET(add, base, serialize_headers);
      +    n->h2_direct            = H2_CONFIG_GET(add, base, h2_direct);
      +    n->session_extra_files  = H2_CONFIG_GET(add, base, session_extra_files);
      +    n->modern_tls_only      = H2_CONFIG_GET(add, base, modern_tls_only);
      +    n->h2_upgrade           = H2_CONFIG_GET(add, base, h2_upgrade);
      +    n->tls_warmup_size      = H2_CONFIG_GET(add, base, tls_warmup_size);
      +    n->tls_cooldown_secs    = H2_CONFIG_GET(add, base, tls_cooldown_secs);
      +    n->h2_push              = H2_CONFIG_GET(add, base, h2_push);
      +    if (add->priorities && base->priorities) {
      +        n->priorities       = apr_hash_overlay(pool, add->priorities, base->priorities);
      +    }
      +    else {
      +        n->priorities       = add->priorities? add->priorities : base->priorities;
      +    }
      +    n->push_diary_size      = H2_CONFIG_GET(add, base, push_diary_size);
      +    n->copy_files           = H2_CONFIG_GET(add, base, copy_files);
      +    if (add->push_list && base->push_list) {
      +        n->push_list        = apr_array_append(pool, base->push_list, add->push_list);
      +    }
      +    else {
      +        n->push_list        = add->push_list? add->push_list : base->push_list;
      +    }
      +    n->early_hints          = H2_CONFIG_GET(add, base, early_hints);
      +    return n;
      +}
      +
      +void *h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv)
      +{
      +    return h2_config_merge(pool, basev, addv);
      +}
      +
      +void *h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv)
      +{
      +    return h2_config_merge(pool, basev, addv);
      +}
      +
      +int h2_config_geti(const h2_config *conf, h2_config_var_t var)
      +{
      +    return (int)h2_config_geti64(conf, var);
      +}
      +
      +apr_int64_t h2_config_geti64(const h2_config *conf, h2_config_var_t var)
      +{
      +    switch(var) {
      +        case H2_CONF_MAX_STREAMS:
      +            return H2_CONFIG_GET(conf, &defconf, h2_max_streams);
      +        case H2_CONF_WIN_SIZE:
      +            return H2_CONFIG_GET(conf, &defconf, h2_window_size);
      +        case H2_CONF_MIN_WORKERS:
      +            return H2_CONFIG_GET(conf, &defconf, min_workers);
      +        case H2_CONF_MAX_WORKERS:
      +            return H2_CONFIG_GET(conf, &defconf, max_workers);
      +        case H2_CONF_MAX_WORKER_IDLE_SECS:
      +            return H2_CONFIG_GET(conf, &defconf, max_worker_idle_secs);
      +        case H2_CONF_STREAM_MAX_MEM:
      +            return H2_CONFIG_GET(conf, &defconf, stream_max_mem_size);
      +        case H2_CONF_ALT_SVC_MAX_AGE:
      +            return H2_CONFIG_GET(conf, &defconf, alt_svc_max_age);
      +        case H2_CONF_SER_HEADERS:
      +            return H2_CONFIG_GET(conf, &defconf, serialize_headers);
      +        case H2_CONF_MODERN_TLS_ONLY:
      +            return H2_CONFIG_GET(conf, &defconf, modern_tls_only);
      +        case H2_CONF_UPGRADE:
      +            return H2_CONFIG_GET(conf, &defconf, h2_upgrade);
      +        case H2_CONF_DIRECT:
      +            return H2_CONFIG_GET(conf, &defconf, h2_direct);
      +        case H2_CONF_SESSION_FILES:
      +            return H2_CONFIG_GET(conf, &defconf, session_extra_files);
      +        case H2_CONF_TLS_WARMUP_SIZE:
      +            return H2_CONFIG_GET(conf, &defconf, tls_warmup_size);
      +        case H2_CONF_TLS_COOLDOWN_SECS:
      +            return H2_CONFIG_GET(conf, &defconf, tls_cooldown_secs);
      +        case H2_CONF_PUSH:
      +            return H2_CONFIG_GET(conf, &defconf, h2_push);
      +        case H2_CONF_PUSH_DIARY_SIZE:
      +            return H2_CONFIG_GET(conf, &defconf, push_diary_size);
      +        case H2_CONF_COPY_FILES:
      +            return H2_CONFIG_GET(conf, &defconf, copy_files);
      +        case H2_CONF_EARLY_HINTS:
      +            return H2_CONFIG_GET(conf, &defconf, early_hints);
      +        default:
      +            return DEF_VAL;
      +    }
      +}
      +
      +const h2_config *h2_config_sget(server_rec *s)
      +{
      +    h2_config *cfg = (h2_config *)ap_get_module_config(s->module_config, 
      +                                                       &http2_module);
      +    ap_assert(cfg);
      +    return cfg;
      +}
      +
      +const struct h2_priority *h2_config_get_priority(const h2_config *conf, 
      +                                                 const char *content_type)
      +{
      +    if (content_type && conf->priorities) {
      +        size_t len = strcspn(content_type, "; \t");
      +        h2_priority *prio = apr_hash_get(conf->priorities, content_type, len);
      +        return prio? prio : apr_hash_get(conf->priorities, "*", 1);
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_max_streams(cmd_parms *parms,
      +                                           void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->h2_max_streams = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->h2_max_streams < 1) {
      +        return "value must be > 0";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_window_size(cmd_parms *parms,
      +                                           void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->h2_window_size = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->h2_window_size < 1024) {
      +        return "value must be >= 1024";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_min_workers(cmd_parms *parms,
      +                                           void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->min_workers = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->min_workers < 1) {
      +        return "value must be > 0";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_max_workers(cmd_parms *parms,
      +                                           void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->max_workers = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->max_workers < 1) {
      +        return "value must be > 0";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_max_worker_idle_secs(cmd_parms *parms,
      +                                                    void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->max_worker_idle_secs = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->max_worker_idle_secs < 1) {
      +        return "value must be > 0";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_stream_max_mem_size(cmd_parms *parms,
      +                                                   void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    
      +    
      +    cfg->stream_max_mem_size = (int)apr_atoi64(value);
      +    (void)arg;
      +    if (cfg->stream_max_mem_size < 1024) {
      +        return "value must be >= 1024";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_add_alt_svc(cmd_parms *parms,
      +                                  void *arg, const char *value)
      +{
      +    if (value && strlen(value)) {
      +        h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +        h2_alt_svc *as = h2_alt_svc_parse(value, parms->pool);
      +        if (!as) {
      +            return "unable to parse alt-svc specifier";
      +        }
      +        if (!cfg->alt_svcs) {
      +            cfg->alt_svcs = apr_array_make(parms->pool, 5, sizeof(h2_alt_svc*));
      +        }
      +        APR_ARRAY_PUSH(cfg->alt_svcs, h2_alt_svc*) = as;
      +    }
      +    (void)arg;
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_alt_svc_max_age(cmd_parms *parms,
      +                                               void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->alt_svc_max_age = (int)apr_atoi64(value);
      +    (void)arg;
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_session_extra_files(cmd_parms *parms,
      +                                                   void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    apr_int64_t max = (int)apr_atoi64(value);
      +    if (max < 0) {
      +        return "value must be a non-negative number";
      +    }
      +    cfg->session_extra_files = (int)max;
      +    (void)arg;
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_serialize_headers(cmd_parms *parms,
      +                                                 void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->serialize_headers = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->serialize_headers = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static const char *h2_conf_set_direct(cmd_parms *parms,
      +                                      void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->h2_direct = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->h2_direct = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static const char *h2_conf_set_push(cmd_parms *parms,
      +                                    void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->h2_push = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->h2_push = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static const char *h2_conf_add_push_priority(cmd_parms *cmd, void *_cfg,
      +                                             const char *ctype, const char *sdependency,
      +                                             const char *sweight)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(cmd->server);
      +    const char *sdefweight = "16";         /* default AFTER weight */
      +    h2_dependency dependency;
      +    h2_priority *priority;
      +    int weight;
      +    
      +    if (!strlen(ctype)) {
      +        return "1st argument must be a mime-type, like 'text/css' or '*'";
      +    }
      +    
      +    if (!sweight) {
      +        /* 2 args only, but which one? */
      +        if (apr_isdigit(sdependency[0])) {
      +            sweight = sdependency;
      +            sdependency = "AFTER";        /* default dependency */
      +        }
      +    }
      +    
      +    if (!strcasecmp("AFTER", sdependency)) {
      +        dependency = H2_DEPENDANT_AFTER;
      +    } 
      +    else if (!strcasecmp("BEFORE", sdependency)) {
      +        dependency = H2_DEPENDANT_BEFORE;
      +        if (sweight) {
      +            return "dependecy 'Before' does not allow a weight";
      +        }
      +    } 
      +    else if (!strcasecmp("INTERLEAVED", sdependency)) {
      +        dependency = H2_DEPENDANT_INTERLEAVED;
      +        sdefweight = "256";        /* default INTERLEAVED weight */
      +    }
      +    else {
      +        return "dependency must be one of 'After', 'Before' or 'Interleaved'";
      +    }
      +    
      +    weight = (int)apr_atoi64(sweight? sweight : sdefweight);
      +    if (weight < NGHTTP2_MIN_WEIGHT) {
      +        return apr_psprintf(cmd->pool, "weight must be a number >= %d",
      +                            NGHTTP2_MIN_WEIGHT);
      +    }
      +    
      +    priority = apr_pcalloc(cmd->pool, sizeof(*priority));
      +    priority->dependency = dependency;
      +    priority->weight = weight;
      +    
      +    if (!cfg->priorities) {
      +        cfg->priorities = apr_hash_make(cmd->pool);
      +    }
      +    apr_hash_set(cfg->priorities, ctype, strlen(ctype), priority);
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_modern_tls_only(cmd_parms *parms,
      +                                               void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->modern_tls_only = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->modern_tls_only = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static const char *h2_conf_set_upgrade(cmd_parms *parms,
      +                                       void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->h2_upgrade = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->h2_upgrade = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static const char *h2_conf_set_tls_warmup_size(cmd_parms *parms,
      +                                               void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->tls_warmup_size = apr_atoi64(value);
      +    (void)arg;
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_tls_cooldown_secs(cmd_parms *parms,
      +                                                 void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    cfg->tls_cooldown_secs = (int)apr_atoi64(value);
      +    (void)arg;
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_push_diary_size(cmd_parms *parms,
      +                                               void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    (void)arg;
      +    cfg->push_diary_size = (int)apr_atoi64(value);
      +    if (cfg->push_diary_size < 0) {
      +        return "value must be >= 0";
      +    }
      +    if (cfg->push_diary_size > 0 && (cfg->push_diary_size & (cfg->push_diary_size-1))) {
      +        return "value must a power of 2";
      +    }
      +    if (cfg->push_diary_size > (1 << 15)) {
      +        return "value must <= 65536";
      +    }
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_copy_files(cmd_parms *parms,
      +                                          void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)arg;
      +    if (!strcasecmp(value, "On")) {
      +        cfg->copy_files = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->copy_files = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +static void add_push(apr_pool_t *pool, h2_config *conf, h2_push_res *push)
      +{
      +    h2_push_res *new;
      +    if (!conf->push_list) {
      +        conf->push_list = apr_array_make(pool, 10, sizeof(*push));
      +    }
      +    new = apr_array_push(conf->push_list);
      +    new->uri_ref = push->uri_ref;
      +    new->critical = push->critical;
      +}
      +
      +static const char *h2_conf_add_push_res(cmd_parms *cmd, void *dirconf,
      +                                        const char *arg1, const char *arg2,
      +                                        const char *arg3)
      +{
      +    h2_config *dconf = (h2_config*)dirconf ;
      +    h2_config *sconf = (h2_config*)h2_config_sget(cmd->server);
      +    h2_push_res push;
      +    const char *last = arg3;
      +    
      +    memset(&push, 0, sizeof(push));
      +    if (!strcasecmp("add", arg1)) {
      +        push.uri_ref = arg2;
      +    }
      +    else {
      +        push.uri_ref = arg1;
      +        last = arg2;
      +        if (arg3) {
      +            return "too many parameter";
      +        }
      +    }
      +    
      +    if (last) {
      +        if (!strcasecmp("critical", last)) {
      +            push.critical = 1;
      +        }
      +        else {
      +            return "unknown last parameter";
      +        }
      +    }
      +
      +    /* server command? set both */
      +    if (cmd->path == NULL) {
      +        add_push(cmd->pool, sconf, &push);
      +        add_push(cmd->pool, dconf, &push);
      +    }
      +    else {
      +        add_push(cmd->pool, dconf, &push);
      +    }
      +
      +    return NULL;
      +}
      +
      +static const char *h2_conf_set_early_hints(cmd_parms *parms,
      +                                           void *arg, const char *value)
      +{
      +    h2_config *cfg = (h2_config *)h2_config_sget(parms->server);
      +    if (!strcasecmp(value, "On")) {
      +        cfg->early_hints = 1;
      +        return NULL;
      +    }
      +    else if (!strcasecmp(value, "Off")) {
      +        cfg->early_hints = 0;
      +        return NULL;
      +    }
      +    
      +    (void)arg;
      +    return "value must be On or Off";
      +}
      +
      +#define AP_END_CMD     AP_INIT_TAKE1(NULL, NULL, NULL, RSRC_CONF, NULL)
      +
      +const command_rec h2_cmds[] = {
      +    AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
      +                  RSRC_CONF, "maximum number of open streams per session"),
      +    AP_INIT_TAKE1("H2WindowSize", h2_conf_set_window_size, NULL,
      +                  RSRC_CONF, "window size on client DATA"),
      +    AP_INIT_TAKE1("H2MinWorkers", h2_conf_set_min_workers, NULL,
      +                  RSRC_CONF, "minimum number of worker threads per child"),
      +    AP_INIT_TAKE1("H2MaxWorkers", h2_conf_set_max_workers, NULL,
      +                  RSRC_CONF, "maximum number of worker threads per child"),
      +    AP_INIT_TAKE1("H2MaxWorkerIdleSeconds", h2_conf_set_max_worker_idle_secs, NULL,
      +                  RSRC_CONF, "maximum number of idle seconds before a worker shuts down"),
      +    AP_INIT_TAKE1("H2StreamMaxMemSize", h2_conf_set_stream_max_mem_size, NULL,
      +                  RSRC_CONF, "maximum number of bytes buffered in memory for a stream"),
      +    AP_INIT_TAKE1("H2AltSvc", h2_add_alt_svc, NULL,
      +                  RSRC_CONF, "adds an Alt-Svc for this server"),
      +    AP_INIT_TAKE1("H2AltSvcMaxAge", h2_conf_set_alt_svc_max_age, NULL,
      +                  RSRC_CONF, "set the maximum age (in seconds) that client can rely on alt-svc information"),
      +    AP_INIT_TAKE1("H2SerializeHeaders", h2_conf_set_serialize_headers, NULL,
      +                  RSRC_CONF, "on to enable header serialization for compatibility"),
      +    AP_INIT_TAKE1("H2ModernTLSOnly", h2_conf_set_modern_tls_only, NULL,
      +                  RSRC_CONF, "off to not impose RFC 7540 restrictions on TLS"),
      +    AP_INIT_TAKE1("H2Upgrade", h2_conf_set_upgrade, NULL,
      +                  RSRC_CONF, "on to allow HTTP/1 Upgrades to h2/h2c"),
      +    AP_INIT_TAKE1("H2Direct", h2_conf_set_direct, NULL,
      +                  RSRC_CONF, "on to enable direct HTTP/2 mode"),
      +    AP_INIT_TAKE1("H2SessionExtraFiles", h2_conf_set_session_extra_files, NULL,
      +                  RSRC_CONF, "number of extra file a session might keep open"),
      +    AP_INIT_TAKE1("H2TLSWarmUpSize", h2_conf_set_tls_warmup_size, NULL,
      +                  RSRC_CONF, "number of bytes on TLS connection before doing max writes"),
      +    AP_INIT_TAKE1("H2TLSCoolDownSecs", h2_conf_set_tls_cooldown_secs, NULL,
      +                  RSRC_CONF, "seconds of idle time on TLS before shrinking writes"),
      +    AP_INIT_TAKE1("H2Push", h2_conf_set_push, NULL,
      +                  RSRC_CONF, "off to disable HTTP/2 server push"),
      +    AP_INIT_TAKE23("H2PushPriority", h2_conf_add_push_priority, NULL,
      +                  RSRC_CONF, "define priority of PUSHed resources per content type"),
      +    AP_INIT_TAKE1("H2PushDiarySize", h2_conf_set_push_diary_size, NULL,
      +                  RSRC_CONF, "size of push diary"),
      +    AP_INIT_TAKE1("H2CopyFiles", h2_conf_set_copy_files, NULL,
      +                  OR_FILEINFO, "on to perform copy of file data"),
      +    AP_INIT_TAKE123("H2PushResource", h2_conf_add_push_res, NULL,
      +                   OR_FILEINFO, "add a resource to be pushed in this location/on this server."),
      +    AP_INIT_TAKE1("H2EarlyHints", h2_conf_set_early_hints, NULL,
      +                  RSRC_CONF, "on to enable interim status 103 responses"),
      +    AP_END_CMD
      +};
      +
      +
      +const h2_config *h2_config_rget(request_rec *r)
      +{
      +    h2_config *cfg = (h2_config *)ap_get_module_config(r->per_dir_config, 
      +                                                       &http2_module);
      +    return cfg? cfg : h2_config_sget(r->server); 
      +}
      +
      +const h2_config *h2_config_get(conn_rec *c)
      +{
      +    h2_ctx *ctx = h2_ctx_get(c, 0);
      +    
      +    if (ctx) {
      +        if (ctx->config) {
      +            return ctx->config;
      +        }
      +        else if (ctx->server) {
      +            ctx->config = h2_config_sget(ctx->server);
      +            return ctx->config;
      +        }
      +    }
      +    
      +    return h2_config_sget(c->base_server);
      +}
      diff --git a/modules/http2/h2_config.h b/modules/http2/h2_config.h
      new file mode 100644
      index 00000000000..1f2fe309d0a
      --- /dev/null
      +++ b/modules/http2/h2_config.h
      @@ -0,0 +1,105 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_config_h__
      +#define __mod_h2__h2_config_h__
      +
      +#undef PACKAGE_VERSION
      +#undef PACKAGE_TARNAME
      +#undef PACKAGE_STRING
      +#undef PACKAGE_NAME
      +#undef PACKAGE_BUGREPORT
      +
      +typedef enum {
      +    H2_CONF_MAX_STREAMS,
      +    H2_CONF_WIN_SIZE,
      +    H2_CONF_MIN_WORKERS,
      +    H2_CONF_MAX_WORKERS,
      +    H2_CONF_MAX_WORKER_IDLE_SECS,
      +    H2_CONF_STREAM_MAX_MEM,
      +    H2_CONF_ALT_SVCS,
      +    H2_CONF_ALT_SVC_MAX_AGE,
      +    H2_CONF_SER_HEADERS,
      +    H2_CONF_DIRECT,
      +    H2_CONF_SESSION_FILES,
      +    H2_CONF_MODERN_TLS_ONLY,
      +    H2_CONF_UPGRADE,
      +    H2_CONF_TLS_WARMUP_SIZE,
      +    H2_CONF_TLS_COOLDOWN_SECS,
      +    H2_CONF_PUSH,
      +    H2_CONF_PUSH_DIARY_SIZE,
      +    H2_CONF_COPY_FILES,
      +    H2_CONF_EARLY_HINTS,
      +} h2_config_var_t;
      +
      +struct apr_hash_t;
      +struct h2_priority;
      +struct h2_push_res;
      +
      +typedef struct h2_push_res {
      +    const char *uri_ref;
      +    int critical;
      +} h2_push_res;
      +
      +/* Apache httpd module configuration for h2. */
      +typedef struct h2_config {
      +    const char *name;
      +    int h2_max_streams;           /* max concurrent # streams (http2) */
      +    int h2_window_size;           /* stream window size (http2) */
      +    int min_workers;              /* min # of worker threads/child */
      +    int max_workers;              /* max # of worker threads/child */
      +    int max_worker_idle_secs;     /* max # of idle seconds for worker */
      +    int stream_max_mem_size;      /* max # bytes held in memory/stream */
      +    apr_array_header_t *alt_svcs; /* h2_alt_svc specs for this server */
      +    int alt_svc_max_age;          /* seconds clients can rely on alt-svc info*/
      +    int serialize_headers;        /* Use serialized HTTP/1.1 headers for 
      +                                     processing, better compatibility */
      +    int h2_direct;                /* if mod_h2 is active directly */
      +    int session_extra_files;      /* # of extra files a session may keep open */  
      +    int modern_tls_only;          /* Accept only modern TLS in HTTP/2 connections */  
      +    int h2_upgrade;               /* Allow HTTP/1 upgrade to h2/h2c */
      +    apr_int64_t tls_warmup_size;  /* Amount of TLS data to send before going full write size */
      +    int tls_cooldown_secs;        /* Seconds of idle time before going back to small TLS records */
      +    int h2_push;                  /* if HTTP/2 server push is enabled */
      +    struct apr_hash_t *priorities;/* map of content-type to h2_priority records */
      +    
      +    int push_diary_size;          /* # of entries in push diary */
      +    int copy_files;               /* if files shall be copied vs setaside on output */
      +    apr_array_header_t *push_list;/* list of h2_push_res configurations */
      +    int early_hints;              /* support status code 103 */
      +} h2_config;
      +
      +
      +void *h2_config_create_dir(apr_pool_t *pool, char *x);
      +void *h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv);
      +void *h2_config_create_svr(apr_pool_t *pool, server_rec *s);
      +void *h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv);
      +
      +extern const command_rec h2_cmds[];
      +
      +const h2_config *h2_config_get(conn_rec *c);
      +const h2_config *h2_config_sget(server_rec *s);
      +const h2_config *h2_config_rget(request_rec *r);
      +
      +int h2_config_geti(const h2_config *conf, h2_config_var_t var);
      +apr_int64_t h2_config_geti64(const h2_config *conf, h2_config_var_t var);
      +
      +void h2_config_init(apr_pool_t *pool);
      +
      +const struct h2_priority *h2_config_get_priority(const h2_config *conf, 
      +                                                 const char *content_type);
      +       
      +#endif /* __mod_h2__h2_config_h__ */
      +
      diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c
      new file mode 100644
      index 00000000000..6f3a8cfe8ec
      --- /dev/null
      +++ b/modules/http2/h2_conn.c
      @@ -0,0 +1,324 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <apr_strings.h>
      +
      +#include <ap_mpm.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +#include <http_log.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_filter.h"
      +#include "h2_mplx.h"
      +#include "h2_session.h"
      +#include "h2_stream.h"
      +#include "h2_h2.h"
      +#include "h2_task.h"
      +#include "h2_worker.h"
      +#include "h2_workers.h"
      +#include "h2_conn.h"
      +#include "h2_version.h"
      +
      +static struct h2_workers *workers;
      +
      +static h2_mpm_type_t mpm_type = H2_MPM_UNKNOWN;
      +static module *mpm_module;
      +static int async_mpm;
      +static apr_socket_t *dummy_socket;
      +
      +static void check_modules(int force) 
      +{
      +    static int checked = 0;
      +    int i;
      +
      +    if (force || !checked) {
      +        for (i = 0; ap_loaded_modules[i]; ++i) {
      +            module *m = ap_loaded_modules[i];
      +            
      +            if (!strcmp("event.c", m->name)) {
      +                mpm_type = H2_MPM_EVENT;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("motorz.c", m->name)) {
      +                mpm_type = H2_MPM_MOTORZ;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("mpm_netware.c", m->name)) {
      +                mpm_type = H2_MPM_NETWARE;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("prefork.c", m->name)) {
      +                mpm_type = H2_MPM_PREFORK;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("simple_api.c", m->name)) {
      +                mpm_type = H2_MPM_SIMPLE;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("mpm_winnt.c", m->name)) {
      +                mpm_type = H2_MPM_WINNT;
      +                mpm_module = m;
      +                break;
      +            }
      +            else if (!strcmp("worker.c", m->name)) {
      +                mpm_type = H2_MPM_WORKER;
      +                mpm_module = m;
      +                break;
      +            }
      +        }
      +        checked = 1;
      +    }
      +}
      +
      +apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s)
      +{
      +    const h2_config *config = h2_config_sget(s);
      +    apr_status_t status = APR_SUCCESS;
      +    int minw, maxw, max_tx_handles, n;
      +    int max_threads_per_child = 0;
      +    int idle_secs = 0;
      +
      +    check_modules(1);
      +    
      +    ap_mpm_query(AP_MPMQ_MAX_THREADS, &max_threads_per_child);
      +    
      +    status = ap_mpm_query(AP_MPMQ_IS_ASYNC, &async_mpm);
      +    if (status != APR_SUCCESS) {
      +        /* some MPMs do not implemnent this */
      +        async_mpm = 0;
      +        status = APR_SUCCESS;
      +    }
      +
      +    h2_config_init(pool);
      +    
      +    minw = h2_config_geti(config, H2_CONF_MIN_WORKERS);
      +    maxw = h2_config_geti(config, H2_CONF_MAX_WORKERS);    
      +    if (minw <= 0) {
      +        minw = max_threads_per_child;
      +    }
      +    if (maxw <= 0) {
      +        maxw = minw;
      +    }
      +    
      +    /* How many file handles is it safe to use for transfer
      +     * to the master connection to be streamed out? 
      +     * Is there a portable APR rlimit on NOFILES? Have not
      +     * found it. And if, how many of those would we set aside?
      +     * This leads all into a process wide handle allocation strategy
      +     * which ultimately would limit the number of accepted connections
      +     * with the assumption of implicitly reserving n handles for every 
      +     * connection and requiring modules with excessive needs to allocate
      +     * from a central pool.
      +     */
      +    n = h2_config_geti(config, H2_CONF_SESSION_FILES);
      +    if (n < 0) {
      +        max_tx_handles = maxw * 2;
      +    }
      +    else {
      +        max_tx_handles = maxw * n;
      +    }
      +    
      +    ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
      +                 "h2_workers: min=%d max=%d, mthrpchild=%d, tx_files=%d", 
      +                 minw, maxw, max_threads_per_child, max_tx_handles);
      +    workers = h2_workers_create(s, pool, minw, maxw, max_tx_handles);
      +    
      +    idle_secs = h2_config_geti(config, H2_CONF_MAX_WORKER_IDLE_SECS);
      +    h2_workers_set_max_idle_secs(workers, idle_secs);
      + 
      +    ap_register_input_filter("H2_IN", h2_filter_core_input,
      +                             NULL, AP_FTYPE_CONNECTION);
      +   
      +    status = h2_mplx_child_init(pool, s);
      +
      +    if (status == APR_SUCCESS) {
      +        status = apr_socket_create(&dummy_socket, APR_INET, SOCK_STREAM,
      +                                   APR_PROTO_TCP, pool);
      +    }
      +
      +    return status;
      +}
      +
      +h2_mpm_type_t h2_conn_mpm_type(void)
      +{
      +    check_modules(0);
      +    return mpm_type;
      +}
      +
      +static module *h2_conn_mpm_module(void)
      +{
      +    check_modules(0);
      +    return mpm_module;
      +}
      +
      +apr_status_t h2_conn_setup(h2_ctx *ctx, conn_rec *c, request_rec *r)
      +{
      +    h2_session *session;
      +    
      +    if (!workers) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02911) 
      +                      "workers not initialized");
      +        return APR_EGENERAL;
      +    }
      +    
      +    if (r) {
      +        session = h2_session_rcreate(r, ctx, workers);
      +    }
      +    else {
      +        session = h2_session_create(c, ctx, workers);
      +    }
      +
      +    h2_ctx_session_set(ctx, session);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c)
      +{
      +    apr_status_t status;
      +    int mpm_state = 0;
      +    
      +    do {
      +        if (c->cs) {
      +            c->cs->sense = CONN_SENSE_DEFAULT;
      +        }
      +        status = h2_session_process(h2_ctx_session_get(ctx), async_mpm);
      +        
      +        if (APR_STATUS_IS_EOF(status)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03045)
      +                          "h2_session(%ld): process, closing conn", c->id);
      +            c->keepalive = AP_CONN_CLOSE;
      +        }
      +        else {
      +            c->keepalive = AP_CONN_KEEPALIVE;
      +        }
      +        
      +        if (ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state)) {
      +            break;
      +        }
      +    } while (!async_mpm
      +             && c->keepalive == AP_CONN_KEEPALIVE 
      +             && mpm_state != AP_MPMQ_STOPPING);
      +    
      +    return DONE;
      +}
      +
      +apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c)
      +{
      +    apr_status_t status;
      +    
      +    status = h2_session_pre_close(h2_ctx_session_get(ctx), async_mpm);
      +    if (status == APR_SUCCESS) {
      +        return DONE; /* This is the same, right? */
      +    }
      +    return status;
      +}
      +
      +conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent)
      +{
      +    apr_allocator_t *allocator;
      +    apr_pool_t *pool;
      +    conn_rec *c;
      +    void *cfg;
      +    
      +    ap_assert(master);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, master,
      +                  "h2_conn(%ld): create slave", master->id);
      +    
      +    /* We create a pool with its own allocator to be used for
      +     * processing a request. This is the only way to have the processing
      +     * independant of its parent pool in the sense that it can work in
      +     * another thread.
      +     */
      +    apr_allocator_create(&allocator);
      +    apr_pool_create_ex(&pool, parent, NULL, allocator);
      +    apr_pool_tag(pool, "h2_slave_conn");
      +    apr_allocator_owner_set(allocator, pool);
      +
      +    c = (conn_rec *) apr_palloc(pool, sizeof(conn_rec));
      +    if (c == NULL) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOMEM, master, 
      +                      APLOGNO(02913) "h2_task: creating conn");
      +        return NULL;
      +    }
      +    
      +    memcpy(c, master, sizeof(conn_rec));
      +        
      +    c->master                 = master;
      +    c->pool                   = pool;   
      +    c->conn_config            = ap_create_conn_config(pool);
      +    c->notes                  = apr_table_make(pool, 5);
      +    c->input_filters          = NULL;
      +    c->output_filters         = NULL;
      +    c->bucket_alloc           = apr_bucket_alloc_create(pool);
      +    c->data_in_input_filters  = 0;
      +    c->data_in_output_filters = 0;
      +    c->clogging_input_filters = 1;
      +    c->log                    = NULL;
      +    c->log_id                 = apr_psprintf(pool, "%ld-%d", 
      +                                             master->id, slave_id);
      +    /* Simulate that we had already a request on this connection. */
      +    c->keepalives             = 1;
      +    /* We cannot install the master connection socket on the slaves, as
      +     * modules mess with timeouts/blocking of the socket, with
      +     * unwanted side effects to the master connection processing.
      +     * Fortunately, since we never use the slave socket, we can just install
      +     * a single, process-wide dummy and everyone is happy.
      +     */
      +    ap_set_module_config(c->conn_config, &core_module, dummy_socket);
      +    /* TODO: these should be unique to this thread */
      +    c->sbh                    = master->sbh;
      +    /* TODO: not all mpm modules have learned about slave connections yet.
      +     * copy their config from master to slave.
      +     */
      +    if (h2_conn_mpm_module()) {
      +        cfg = ap_get_module_config(master->conn_config, h2_conn_mpm_module());
      +        ap_set_module_config(c->conn_config, h2_conn_mpm_module(), cfg);
      +    }
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c, 
      +                  "h2_task: creating conn, master=%ld, sid=%ld, logid=%s", 
      +                  master->id, c->id, c->log_id);
      +    return c;
      +}
      +
      +void h2_slave_destroy(conn_rec *slave)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, slave,
      +                  "h2_slave_conn(%ld): destroy (task=%s)", slave->id,
      +                  apr_table_get(slave->notes, H2_TASK_ID_NOTE));
      +    apr_pool_destroy(slave->pool);
      +}
      +
      +apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd)
      +{
      +    return ap_run_pre_connection(slave, csd);
      +}
      +
      diff --git a/modules/http2/h2_conn.h b/modules/http2/h2_conn.h
      new file mode 100644
      index 00000000000..79948644ae8
      --- /dev/null
      +++ b/modules/http2/h2_conn.h
      @@ -0,0 +1,75 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_conn__
      +#define __mod_h2__h2_conn__
      +
      +struct h2_ctx;
      +struct h2_task;
      +
      +/**
      + * Setup the connection and our context for HTTP/2 processing
      + *
      + * @param ctx the http2 context to setup
      + * @param c the connection HTTP/2 is starting on
      + * @param r the upgrade request that still awaits an answer, optional
      + */
      +apr_status_t h2_conn_setup(struct h2_ctx *ctx, conn_rec *c, request_rec *r);
      +
      +/**
      + * Run the HTTP/2 connection in synchronous fashion. 
      + * Return when the HTTP/2 session is done
      + * and the connection will close or a fatal error occurred.
      + *
      + * @param ctx the http2 context to run
      + * @return APR_SUCCESS when session is done.
      + */
      +apr_status_t h2_conn_run(struct h2_ctx *ctx, conn_rec *c);
      +
      +/**
      + * The connection is about to close. If we have not send a GOAWAY
      + * yet, this is the last chance.
      + */
      +apr_status_t h2_conn_pre_close(struct h2_ctx *ctx, conn_rec *c);
      +
      +/* Initialize this child process for h2 connection work,
      + * to be called once during child init before multi processing
      + * starts.
      + */
      +apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s);
      +
      +
      +typedef enum {
      +    H2_MPM_UNKNOWN,
      +    H2_MPM_WORKER,
      +    H2_MPM_EVENT,
      +    H2_MPM_PREFORK,
      +    H2_MPM_MOTORZ,
      +    H2_MPM_SIMPLE,
      +    H2_MPM_NETWARE,
      +    H2_MPM_WINNT,
      +} h2_mpm_type_t;
      +
      +/* Returns the type of MPM module detected */
      +h2_mpm_type_t h2_conn_mpm_type(void);
      +
      +
      +conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent);
      +void h2_slave_destroy(conn_rec *slave);
      +
      +apr_status_t h2_slave_run_pre_connection(conn_rec *slave, apr_socket_t *csd);
      +void h2_slave_run_connection(conn_rec *slave);
      +
      +#endif /* defined(__mod_h2__h2_conn__) */
      diff --git a/modules/http2/h2_conn_io.c b/modules/http2/h2_conn_io.c
      new file mode 100644
      index 00000000000..303860eeb89
      --- /dev/null
      +++ b/modules/http2/h2_conn_io.c
      @@ -0,0 +1,431 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <apr_strings.h>
      +#include <ap_mpm.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +#include <http_connection.h>
      +#include <http_request.h>
      +
      +#include "h2_private.h"
      +#include "h2_bucket_eoc.h"
      +#include "h2_bucket_eos.h"
      +#include "h2_config.h"
      +#include "h2_conn_io.h"
      +#include "h2_h2.h"
      +#include "h2_session.h"
      +#include "h2_util.h"
      +
      +#define TLS_DATA_MAX          (16*1024) 
      +
      +/* Calculated like this: assuming MTU 1500 bytes
      + * 1500 - 40 (IP) - 20 (TCP) - 40 (TCP options) 
      + *      - TLS overhead (60-100) 
      + * ~= 1300 bytes */
      +#define WRITE_SIZE_INITIAL    1300
      +/* Calculated like this: max TLS record size 16*1024
      + *   - 40 (IP) - 20 (TCP) - 40 (TCP options) 
      + *    - TLS overhead (60-100) 
      + * which seems to create less TCP packets overall
      + */
      +#define WRITE_SIZE_MAX        (TLS_DATA_MAX - 100) 
      +
      +
      +static void h2_conn_io_bb_log(conn_rec *c, int stream_id, int level, 
      +                              const char *tag, apr_bucket_brigade *bb)
      +{
      +    char buffer[16 * 1024];
      +    const char *line = "(null)";
      +    apr_size_t bmax = sizeof(buffer)/sizeof(buffer[0]);
      +    int off = 0;
      +    apr_bucket *b;
      +    
      +    if (bb) {
      +        memset(buffer, 0, bmax--);
      +        for (b = APR_BRIGADE_FIRST(bb); 
      +             bmax && (b != APR_BRIGADE_SENTINEL(bb));
      +             b = APR_BUCKET_NEXT(b)) {
      +            
      +            if (APR_BUCKET_IS_METADATA(b)) {
      +                if (APR_BUCKET_IS_EOS(b)) {
      +                    off += apr_snprintf(buffer+off, bmax-off, "eos ");
      +                }
      +                else if (APR_BUCKET_IS_FLUSH(b)) {
      +                    off += apr_snprintf(buffer+off, bmax-off, "flush ");
      +                }
      +                else if (AP_BUCKET_IS_EOR(b)) {
      +                    off += apr_snprintf(buffer+off, bmax-off, "eor ");
      +                }
      +                else if (H2_BUCKET_IS_H2EOC(b)) {
      +                    off += apr_snprintf(buffer+off, bmax-off, "h2eoc ");
      +                }
      +                else if (H2_BUCKET_IS_H2EOS(b)) {
      +                    off += apr_snprintf(buffer+off, bmax-off, "h2eos ");
      +                }
      +                else {
      +                    off += apr_snprintf(buffer+off, bmax-off, "meta(unknown) ");
      +                }
      +            }
      +            else {
      +                const char *btype = "data";
      +                if (APR_BUCKET_IS_FILE(b)) {
      +                    btype = "file";
      +                }
      +                else if (APR_BUCKET_IS_PIPE(b)) {
      +                    btype = "pipe";
      +                }
      +                else if (APR_BUCKET_IS_SOCKET(b)) {
      +                    btype = "socket";
      +                }
      +                else if (APR_BUCKET_IS_HEAP(b)) {
      +                    btype = "heap";
      +                }
      +                else if (APR_BUCKET_IS_TRANSIENT(b)) {
      +                    btype = "transient";
      +                }
      +                else if (APR_BUCKET_IS_IMMORTAL(b)) {
      +                    btype = "immortal";
      +                }
      +#if APR_HAS_MMAP
      +                else if (APR_BUCKET_IS_MMAP(b)) {
      +                    btype = "mmap";
      +                }
      +#endif
      +                else if (APR_BUCKET_IS_POOL(b)) {
      +                    btype = "pool";
      +                }
      +                
      +                off += apr_snprintf(buffer+off, bmax-off, "%s[%ld] ", 
      +                                    btype, 
      +                                    (long)(b->length == ((apr_size_t)-1)? 
      +                                           -1 : b->length));
      +            }
      +        }
      +        line = *buffer? buffer : "(empty)";
      +    }
      +    /* Intentional no APLOGNO */
      +    ap_log_cerror(APLOG_MARK, level, 0, c, "bb_dump(%s)-%s: %s", 
      +                  c->log_id, tag, line);
      +
      +}
      +
      +apr_status_t h2_conn_io_init(h2_conn_io *io, conn_rec *c, 
      +                             const h2_config *cfg)
      +{
      +    io->c             = c;
      +    io->output        = apr_brigade_create(c->pool, c->bucket_alloc);
      +    io->is_tls        = h2_h2_is_tls(c);
      +    io->buffer_output = io->is_tls;
      +    io->pass_threshold = (apr_size_t)h2_config_geti64(cfg, H2_CONF_STREAM_MAX_MEM) / 2;
      +    
      +    if (io->is_tls) {
      +        /* This is what we start with, 
      +         * see https://issues.apache.org/jira/browse/TS-2503 
      +         */
      +        io->warmup_size    = h2_config_geti64(cfg, H2_CONF_TLS_WARMUP_SIZE);
      +        io->cooldown_usecs = (h2_config_geti(cfg, H2_CONF_TLS_COOLDOWN_SECS) 
      +                              * APR_USEC_PER_SEC);
      +        io->write_size     = (io->cooldown_usecs > 0? 
      +                              WRITE_SIZE_INITIAL : WRITE_SIZE_MAX); 
      +    }
      +    else {
      +        io->warmup_size    = 0;
      +        io->cooldown_usecs = 0;
      +        io->write_size     = 0;
      +    }
      +
      +    if (APLOGctrace1(c)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, io->c,
      +                      "h2_conn_io(%ld): init, buffering=%d, warmup_size=%ld, "
      +                      "cd_secs=%f", io->c->id, io->buffer_output, 
      +                      (long)io->warmup_size,
      +                      ((float)io->cooldown_usecs/APR_USEC_PER_SEC));
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
      +#define LOG_SCRATCH 0
      +
      +static void append_scratch(h2_conn_io *io) 
      +{
      +    if (io->scratch && io->slen > 0) {
      +        apr_bucket *b = apr_bucket_heap_create(io->scratch, io->slen,
      +                                               apr_bucket_free,
      +                                               io->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(io->output, b);
      +#if LOG_SCRATCH
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, io->c, APLOGNO(03386)
      +                      "h2_conn_io(%ld): append_scratch(%ld)", 
      +                      io->c->id, (long)io->slen);
      +#endif
      +        io->scratch = NULL;
      +        io->slen = io->ssize = 0;
      +    }
      +}
      +
      +static apr_size_t assure_scratch_space(h2_conn_io *io) {
      +    apr_size_t remain = io->ssize - io->slen; 
      +    if (io->scratch && remain == 0) {
      +        append_scratch(io);
      +    }
      +    if (!io->scratch) {
      +        /* we control the size and it is larger than what buckets usually
      +         * allocate. */
      +        io->scratch = apr_bucket_alloc(io->write_size, io->c->bucket_alloc);
      +        io->ssize = io->write_size;
      +        io->slen = 0;
      +        remain = io->ssize;
      +    }
      +    return remain;
      +}
      +    
      +static apr_status_t read_to_scratch(h2_conn_io *io, apr_bucket *b)
      +{
      +    apr_status_t status;
      +    const char *data;
      +    apr_size_t len;
      +    
      +    if (!b->length) {
      +        return APR_SUCCESS;
      +    }
      +    
      +    ap_assert(b->length <= (io->ssize - io->slen));
      +    if (APR_BUCKET_IS_FILE(b)) {
      +        apr_bucket_file *f = (apr_bucket_file *)b->data;
      +        apr_file_t *fd = f->fd;
      +        apr_off_t offset = b->start;
      +        apr_size_t len = b->length;
      +        
      +        /* file buckets will either mmap (which we do not want) or
      +         * read 8000 byte chunks and split themself. However, we do
      +         * know *exactly* how many bytes we need where.
      +         */
      +        status = apr_file_seek(fd, APR_SET, &offset);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +        status = apr_file_read(fd, io->scratch + io->slen, &len);
      +#if LOG_SCRATCH
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, io->c, APLOGNO(03387)
      +                      "h2_conn_io(%ld): FILE_to_scratch(%ld)", 
      +                      io->c->id, (long)len); 
      +#endif
      +        if (status != APR_SUCCESS && status != APR_EOF) {
      +            return status;
      +        }
      +        io->slen += len;
      +    }
      +    else {
      +        status = apr_bucket_read(b, &data, &len, APR_BLOCK_READ);
      +        if (status == APR_SUCCESS) {
      +#if LOG_SCRATCH
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, io->c, APLOGNO(03388)
      +                          "h2_conn_io(%ld): read_to_scratch(%ld)", 
      +                          io->c->id, (long)b->length); 
      +#endif
      +            memcpy(io->scratch+io->slen, data, len);
      +            io->slen += len;
      +        }
      +    }
      +    return status;
      +}
      +
      +static void check_write_size(h2_conn_io *io) 
      +{
      +    if (io->write_size > WRITE_SIZE_INITIAL 
      +        && (io->cooldown_usecs > 0)
      +        && (apr_time_now() - io->last_write) >= io->cooldown_usecs) {
      +        /* long time not written, reset write size */
      +        io->write_size = WRITE_SIZE_INITIAL;
      +        io->bytes_written = 0;
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, io->c,
      +                      "h2_conn_io(%ld): timeout write size reset to %ld", 
      +                      (long)io->c->id, (long)io->write_size);
      +    }
      +    else if (io->write_size < WRITE_SIZE_MAX 
      +             && io->bytes_written >= io->warmup_size) {
      +        /* connection is hot, use max size */
      +        io->write_size = WRITE_SIZE_MAX;
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, io->c,
      +                      "h2_conn_io(%ld): threshold reached, write size now %ld", 
      +                      (long)io->c->id, (long)io->write_size);
      +    }
      +}
      +
      +static apr_status_t pass_output(h2_conn_io *io, int flush,
      +                                h2_session *session_eoc)
      +{
      +    conn_rec *c = io->c;
      +    apr_bucket_brigade *bb = io->output;
      +    apr_bucket *b;
      +    apr_off_t bblen;
      +    apr_status_t status;
      +    
      +    append_scratch(io);
      +    if (flush) {
      +        b = apr_bucket_flush_create(c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, b);
      +    }
      +    
      +    if (APR_BRIGADE_EMPTY(bb)) {
      +        return APR_SUCCESS;
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, c, "h2_conn_io: pass_output");
      +    ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, NULL);
      +    apr_brigade_length(bb, 0, &bblen);
      +    
      +    h2_conn_io_bb_log(c, 0, APLOG_TRACE2, "master conn pass", bb);
      +    status = ap_pass_brigade(c->output_filters, bb);
      +    if (status == APR_SUCCESS) {
      +        io->bytes_written += (apr_size_t)bblen;
      +        io->last_write = apr_time_now();
      +    }
      +    apr_brigade_cleanup(bb);
      +
      +    if (session_eoc) {
      +        apr_status_t tmp;
      +        b = h2_bucket_eoc_create(c->bucket_alloc, session_eoc);
      +        APR_BRIGADE_INSERT_TAIL(bb, b);
      +        h2_conn_io_bb_log(c, 0, APLOG_TRACE2, "master conn pass", bb);
      +        tmp = ap_pass_brigade(c->output_filters, bb);
      +        if (status == APR_SUCCESS) {
      +            status = tmp;
      +        }
      +        /* careful with access to io after this, we have flushed an EOC bucket
      +         * that de-allocated us all. */
      +        apr_brigade_cleanup(bb);
      +    }
      +    
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03044)
      +                      "h2_conn_io(%ld): pass_out brigade %ld bytes",
      +                      c->id, (long)bblen);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_conn_io_flush(h2_conn_io *io)
      +{
      +    return pass_output(io, 1, NULL);
      +}
      +
      +apr_status_t h2_conn_io_write_eoc(h2_conn_io *io, h2_session *session)
      +{
      +    return pass_output(io, 1, session);
      +}
      +
      +apr_status_t h2_conn_io_write(h2_conn_io *io, const char *data, size_t length)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_size_t remain;
      +    
      +    if (io->buffer_output) {
      +        while (length > 0) {
      +            remain = assure_scratch_space(io);
      +            if (remain >= length) {
      +#if LOG_SCRATCH
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, io->c, APLOGNO(03389)
      +                              "h2_conn_io(%ld): write_to_scratch(%ld)", 
      +                              io->c->id, (long)length); 
      +#endif
      +                memcpy(io->scratch + io->slen, data, length);
      +                io->slen += length;
      +                length = 0;
      +            }
      +            else {
      +#if LOG_SCRATCH
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, io->c, APLOGNO(03390)
      +                              "h2_conn_io(%ld): write_to_scratch(%ld)", 
      +                              io->c->id, (long)remain); 
      +#endif
      +                memcpy(io->scratch + io->slen, data, remain);
      +                io->slen += remain;
      +                data += remain;
      +                length -= remain;
      +            }
      +        }
      +    }
      +    else {
      +        status = apr_brigade_write(io->output, NULL, NULL, data, length);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_conn_io_pass(h2_conn_io *io, apr_bucket_brigade *bb)
      +{
      +    apr_bucket *b;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    check_write_size(io);
      +    while (!APR_BRIGADE_EMPTY(bb) && status == APR_SUCCESS) {
      +        b = APR_BRIGADE_FIRST(bb);
      +        
      +        if (APR_BUCKET_IS_METADATA(b)) {
      +            /* need to finish any open scratch bucket, as meta data 
      +             * needs to be forward "in order". */
      +            append_scratch(io);
      +            APR_BUCKET_REMOVE(b);
      +            APR_BRIGADE_INSERT_TAIL(io->output, b);
      +        }
      +        else if (io->buffer_output) {
      +            apr_size_t remain = assure_scratch_space(io);
      +            if (b->length > remain) {
      +                apr_bucket_split(b, remain);
      +                if (io->slen == 0) {
      +                    /* complete write_size bucket, append unchanged */
      +                    APR_BUCKET_REMOVE(b);
      +                    APR_BRIGADE_INSERT_TAIL(io->output, b);
      +#if LOG_SCRATCH
      +                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, io->c, APLOGNO(03391)
      +                                  "h2_conn_io(%ld): pass bucket(%ld)", 
      +                                  io->c->id, (long)b->length);
      +#endif
      +                    continue;
      +                }
      +            }
      +            else {
      +                /* bucket fits in remain, copy to scratch */
      +                status = read_to_scratch(io, b);
      +                apr_bucket_delete(b);
      +                continue;
      +            }
      +        }
      +        else {
      +            /* no buffering, forward buckets setaside on flush */
      +            if (APR_BUCKET_IS_TRANSIENT(b)) {
      +                apr_bucket_setaside(b, io->c->pool);
      +            }
      +            APR_BUCKET_REMOVE(b);
      +            APR_BRIGADE_INSERT_TAIL(io->output, b);
      +        }
      +    }
      +    
      +    if (status == APR_SUCCESS) {
      +        if (!APR_BRIGADE_EMPTY(io->output)) {
      +            apr_off_t len = h2_brigade_mem_size(io->output);
      +            if (len >= io->pass_threshold) {
      +                return pass_output(io, 0, NULL);
      +            }
      +        }
      +    }
      +    return status;
      +}
      +
      diff --git a/modules/http2/h2_conn_io.h b/modules/http2/h2_conn_io.h
      new file mode 100644
      index 00000000000..4ccf007086e
      --- /dev/null
      +++ b/modules/http2/h2_conn_io.h
      @@ -0,0 +1,76 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_conn_io__
      +#define __mod_h2__h2_conn_io__
      +
      +struct h2_config;
      +struct h2_session;
      +
      +/* h2_io is the basic handler of a httpd connection. It keeps two brigades,
      + * one for input, one for output and works with the installed connection
      + * filters.
      + * The read is done via a callback function, so that input can be processed
      + * directly without copying.
      + */
      +typedef struct {
      +    conn_rec *c;
      +    apr_bucket_brigade *output;
      +
      +    int is_tls;
      +    apr_time_t cooldown_usecs;
      +    apr_int64_t warmup_size;
      +    
      +    apr_size_t write_size;
      +    apr_time_t last_write;
      +    apr_int64_t bytes_read;
      +    apr_int64_t bytes_written;
      +    
      +    int buffer_output;
      +    apr_size_t pass_threshold;
      +    
      +    char *scratch;
      +    apr_size_t ssize;
      +    apr_size_t slen;
      +} h2_conn_io;
      +
      +apr_status_t h2_conn_io_init(h2_conn_io *io, conn_rec *c, 
      +                             const struct h2_config *cfg);
      +
      +/**
      + * Append data to the buffered output.
      + * @param buf the data to append
      + * @param length the length of the data to append
      + */
      +apr_status_t h2_conn_io_write(h2_conn_io *io,
      +                         const char *buf,
      +                         size_t length);
      +
      +apr_status_t h2_conn_io_pass(h2_conn_io *io, apr_bucket_brigade *bb);
      +
      +/**
      + * Append an End-Of-Connection bucket to the output that, once destroyed,
      + * will tear down the complete http2 session.
      + */
      +apr_status_t h2_conn_io_write_eoc(h2_conn_io *io, struct h2_session *session);
      +
      +/**
      + * Pass any buffered data on to the connection output filters.
      + * @param io the connection io
      + * @param flush if a flush bucket should be appended to any output
      + */
      +apr_status_t h2_conn_io_flush(h2_conn_io *io);
      +
      +#endif /* defined(__mod_h2__h2_conn_io__) */
      diff --git a/modules/http2/h2_ctx.c b/modules/http2/h2_ctx.c
      new file mode 100644
      index 00000000000..e79b5f805d0
      --- /dev/null
      +++ b/modules/http2/h2_ctx.c
      @@ -0,0 +1,120 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +
      +#include "h2_private.h"
      +#include "h2_session.h"
      +#include "h2_task.h"
      +#include "h2_ctx.h"
      +
      +static h2_ctx *h2_ctx_create(const conn_rec *c)
      +{
      +    h2_ctx *ctx = apr_pcalloc(c->pool, sizeof(h2_ctx));
      +    ap_assert(ctx);
      +    ap_set_module_config(c->conn_config, &http2_module, ctx);
      +    h2_ctx_server_set(ctx, c->base_server);
      +    return ctx;
      +}
      +
      +void h2_ctx_clear(const conn_rec *c)
      +{
      +    ap_assert(c);
      +    ap_set_module_config(c->conn_config, &http2_module, NULL);
      +}
      +
      +h2_ctx *h2_ctx_create_for(const conn_rec *c, h2_task *task)
      +{
      +    h2_ctx *ctx = h2_ctx_create(c);
      +    if (ctx) {
      +        ctx->task = task;
      +    }
      +    return ctx;
      +}
      +
      +h2_ctx *h2_ctx_get(const conn_rec *c, int create)
      +{
      +    h2_ctx *ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
      +    if (ctx == NULL && create) {
      +        ctx = h2_ctx_create(c);
      +    }
      +    return ctx;
      +}
      +
      +h2_ctx *h2_ctx_rget(const request_rec *r)
      +{
      +    return h2_ctx_get(r->connection, 0);
      +}
      +
      +const char *h2_ctx_protocol_get(const conn_rec *c)
      +{
      +    h2_ctx *ctx;
      +    if (c->master) {
      +        c = c->master;
      +    }
      +    ctx = (h2_ctx*)ap_get_module_config(c->conn_config, &http2_module);
      +    return ctx? ctx->protocol : NULL;
      +}
      +
      +h2_ctx *h2_ctx_protocol_set(h2_ctx *ctx, const char *proto)
      +{
      +    ctx->protocol = proto;
      +    return ctx;
      +}
      +
      +h2_session *h2_ctx_session_get(h2_ctx *ctx)
      +{
      +    return ctx? ctx->session : NULL;
      +}
      +
      +void h2_ctx_session_set(h2_ctx *ctx, struct h2_session *session)
      +{
      +    ctx->session = session;
      +}
      +
      +server_rec *h2_ctx_server_get(h2_ctx *ctx)
      +{
      +    return ctx? ctx->server : NULL;
      +}
      +
      +h2_ctx *h2_ctx_server_set(h2_ctx *ctx, server_rec *s)
      +{
      +    ctx->server = s;
      +    return ctx;
      +}
      +
      +int h2_ctx_is_task(h2_ctx *ctx)
      +{
      +    return ctx && ctx->task;
      +}
      +
      +h2_task *h2_ctx_get_task(h2_ctx *ctx)
      +{
      +    return ctx? ctx->task : NULL;
      +}
      +
      +h2_task *h2_ctx_cget_task(conn_rec *c)
      +{
      +    return h2_ctx_get_task(h2_ctx_get(c, 0));
      +}
      +
      +h2_task *h2_ctx_rget_task(request_rec *r)
      +{
      +    return h2_ctx_get_task(h2_ctx_rget(r));
      +}
      diff --git a/modules/http2/h2_ctx.h b/modules/http2/h2_ctx.h
      new file mode 100644
      index 00000000000..3b2c842caef
      --- /dev/null
      +++ b/modules/http2/h2_ctx.h
      @@ -0,0 +1,77 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_ctx__
      +#define __mod_h2__h2_ctx__
      +
      +struct h2_session;
      +struct h2_task;
      +struct h2_config;
      +
      +/**
      + * The h2 module context associated with a connection. 
      + *
      + * It keeps track of the different types of connections:
      + * - those from clients that use HTTP/2 protocol
      + * - those from clients that do not use HTTP/2
      + * - those created by ourself to perform work on HTTP/2 streams
      + */
      +typedef struct h2_ctx {
      +    const char *protocol;           /* the protocol negotiated */
      +    struct h2_session *session;     /* the session established */
      +    struct h2_task *task;           /* the h2_task executing or NULL */
      +    const char *hostname;           /* hostname negotiated via SNI, optional */
      +    server_rec *server;             /* httpd server config selected. */
      +    const struct h2_config *config; /* effective config in this context */
      +} h2_ctx;
      +
      +/**
      + * Get (or create) a h2 context record for this connection.
      + * @param c the connection to look at
      + * @param create != 0 iff missing context shall be created
      + * @return h2 context of this connection
      + */
      +h2_ctx *h2_ctx_get(const conn_rec *c, int create);
      +void h2_ctx_clear(const conn_rec *c);
      +
      +h2_ctx *h2_ctx_rget(const request_rec *r);
      +h2_ctx *h2_ctx_create_for(const conn_rec *c, struct h2_task *task);
      +
      +
      +/* Set the h2 protocol established on this connection context or
      + * NULL when other protocols are in place.
      + */
      +h2_ctx *h2_ctx_protocol_set(h2_ctx *ctx, const char *proto);
      +
      +/* Set the server_rec relevant for this context.
      + */
      +h2_ctx *h2_ctx_server_set(h2_ctx *ctx, server_rec *s);
      +server_rec *h2_ctx_server_get(h2_ctx *ctx);
      +
      +struct h2_session *h2_ctx_session_get(h2_ctx *ctx);
      +void h2_ctx_session_set(h2_ctx *ctx, struct h2_session *session);
      +
      +/**
      + * Get the h2 protocol negotiated for this connection, or NULL.
      + */
      +const char *h2_ctx_protocol_get(const conn_rec *c);
      +
      +int h2_ctx_is_task(h2_ctx *ctx);
      +
      +struct h2_task *h2_ctx_get_task(h2_ctx *ctx);
      +struct h2_task *h2_ctx_cget_task(conn_rec *c);
      +struct h2_task *h2_ctx_rget_task(request_rec *r);
      +
      +#endif /* defined(__mod_h2__h2_ctx__) */
      diff --git a/modules/http2/h2_filter.c b/modules/http2/h2_filter.c
      new file mode 100644
      index 00000000000..a4ef20d7e90
      --- /dev/null
      +++ b/modules/http2/h2_filter.c
      @@ -0,0 +1,531 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_strings.h>
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_protocol.h>
      +#include <http_log.h>
      +#include <http_connection.h>
      +#include <scoreboard.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_config.h"
      +#include "h2_conn_io.h"
      +#include "h2_ctx.h"
      +#include "h2_mplx.h"
      +#include "h2_push.h"
      +#include "h2_task.h"
      +#include "h2_stream.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_stream.h"
      +#include "h2_session.h"
      +#include "h2_util.h"
      +#include "h2_version.h"
      +
      +#include "h2_filter.h"
      +
      +#define UNSET       -1
      +#define H2MIN(x,y) ((x) < (y) ? (x) : (y))
      +
      +static apr_status_t consume_brigade(h2_filter_cin *cin, 
      +                                    apr_bucket_brigade *bb, 
      +                                    apr_read_type_e block)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_size_t readlen = 0;
      +    
      +    while (status == APR_SUCCESS && !APR_BRIGADE_EMPTY(bb)) {
      +        
      +        apr_bucket* bucket = APR_BRIGADE_FIRST(bb);
      +        if (APR_BUCKET_IS_METADATA(bucket)) {
      +            /* we do nothing regarding any meta here */
      +        }
      +        else {
      +            const char *bucket_data = NULL;
      +            apr_size_t bucket_length = 0;
      +            status = apr_bucket_read(bucket, &bucket_data,
      +                                     &bucket_length, block);
      +            
      +            if (status == APR_SUCCESS && bucket_length > 0) {
      +                apr_size_t consumed = 0;
      +
      +                status = cin->cb(cin->cb_ctx, bucket_data, bucket_length, &consumed);
      +                if (status == APR_SUCCESS && bucket_length > consumed) {
      +                    /* We have data left in the bucket. Split it. */
      +                    status = apr_bucket_split(bucket, consumed);
      +                }
      +                readlen += consumed;
      +                cin->start_read = apr_time_now();
      +            }
      +        }
      +        apr_bucket_delete(bucket);
      +    }
      +    
      +    if (readlen == 0 && status == APR_SUCCESS && block == APR_NONBLOCK_READ) {
      +        return APR_EAGAIN;
      +    }
      +    return status;
      +}
      +
      +h2_filter_cin *h2_filter_cin_create(apr_pool_t *p, h2_filter_cin_cb *cb, void *ctx)
      +{
      +    h2_filter_cin *cin;
      +    
      +    cin = apr_pcalloc(p, sizeof(*cin));
      +    cin->pool      = p;
      +    cin->cb        = cb;
      +    cin->cb_ctx    = ctx;
      +    cin->start_read = UNSET;
      +    return cin;
      +}
      +
      +void h2_filter_cin_timeout_set(h2_filter_cin *cin, apr_interval_time_t timeout)
      +{
      +    cin->timeout = timeout;
      +}
      +
      +apr_status_t h2_filter_core_input(ap_filter_t* f,
      +                                  apr_bucket_brigade* brigade,
      +                                  ap_input_mode_t mode,
      +                                  apr_read_type_e block,
      +                                  apr_off_t readbytes) 
      +{
      +    h2_filter_cin *cin = f->ctx;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_interval_time_t saved_timeout = UNSET;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                  "core_input(%ld): read, %s, mode=%d, readbytes=%ld", 
      +                  (long)f->c->id, (block == APR_BLOCK_READ)? "BLOCK_READ" : "NONBLOCK_READ", 
      +                  mode, (long)readbytes);
      +    
      +    if (mode == AP_MODE_INIT || mode == AP_MODE_SPECULATIVE) {
      +        return ap_get_brigade(f->next, brigade, mode, block, readbytes);
      +    }
      +    
      +    if (mode != AP_MODE_READBYTES) {
      +        return (block == APR_BLOCK_READ)? APR_SUCCESS : APR_EAGAIN;
      +    }
      +    
      +    if (!cin->bb) {
      +        cin->bb = apr_brigade_create(cin->pool, f->c->bucket_alloc);
      +    }
      +
      +    if (!cin->socket) {
      +        cin->socket = ap_get_conn_socket(f->c);
      +    }
      +    
      +    cin->start_read = apr_time_now();
      +    if (APR_BRIGADE_EMPTY(cin->bb)) {
      +        /* We only do a blocking read when we have no streams to process. So,
      +         * in httpd scoreboard lingo, we are in a KEEPALIVE connection state.
      +         * When reading non-blocking, we do have streams to process and update
      +         * child with NULL request. That way, any current request information
      +         * in the scoreboard is preserved.
      +         */
      +        if (block == APR_BLOCK_READ) {
      +            if (cin->timeout > 0) {
      +                apr_socket_timeout_get(cin->socket, &saved_timeout);
      +                apr_socket_timeout_set(cin->socket, cin->timeout);
      +            }
      +        }
      +        status = ap_get_brigade(f->next, cin->bb, AP_MODE_READBYTES,
      +                                block, readbytes);
      +        if (saved_timeout != UNSET) {
      +            apr_socket_timeout_set(cin->socket, saved_timeout);
      +        }
      +    }
      +    
      +    switch (status) {
      +        case APR_SUCCESS:
      +            status = consume_brigade(cin, cin->bb, block);
      +            break;
      +        case APR_EOF:
      +        case APR_EAGAIN:
      +        case APR_TIMEUP:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, f->c,
      +                          "core_input(%ld): read", (long)f->c->id);
      +            break;
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, f->c, APLOGNO(03046)
      +                          "h2_conn_io: error reading");
      +            break;
      +    }
      +    return status;
      +}
      +
      +/*******************************************************************************
      + * http2 connection status handler + stream out source
      + ******************************************************************************/
      +
      +typedef struct {
      +    apr_bucket_refcount refcount;
      +    h2_bucket_event_cb *cb;
      +    void *ctx;
      +} h2_bucket_observer;
      + 
      +static apr_status_t bucket_read(apr_bucket *b, const char **str,
      +                                apr_size_t *len, apr_read_type_e block)
      +{
      +    (void)b;
      +    (void)block;
      +    *str = NULL;
      +    *len = 0;
      +    return APR_SUCCESS;
      +}
      +
      +static void bucket_destroy(void *data)
      +{
      +    h2_bucket_observer *h = data;
      +    if (apr_bucket_shared_destroy(h)) {
      +        if (h->cb) {
      +            h->cb(h->ctx, H2_BUCKET_EV_BEFORE_DESTROY, NULL);
      +        }
      +        apr_bucket_free(h);
      +    }
      +}
      +
      +apr_bucket * h2_bucket_observer_make(apr_bucket *b, h2_bucket_event_cb *cb,
      +                                 void *ctx)
      +{
      +    h2_bucket_observer *br;
      +
      +    br = apr_bucket_alloc(sizeof(*br), b->list);
      +    br->cb = cb;
      +    br->ctx = ctx;
      +
      +    b = apr_bucket_shared_make(b, br, 0, 0);
      +    b->type = &h2_bucket_type_observer;
      +    return b;
      +} 
      +
      +apr_bucket * h2_bucket_observer_create(apr_bucket_alloc_t *list, 
      +                                       h2_bucket_event_cb *cb, void *ctx)
      +{
      +    apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
      +
      +    APR_BUCKET_INIT(b);
      +    b->free = apr_bucket_free;
      +    b->list = list;
      +    b = h2_bucket_observer_make(b, cb, ctx);
      +    return b;
      +}
      +                                       
      +apr_status_t h2_bucket_observer_fire(apr_bucket *b, h2_bucket_event event)
      +{
      +    if (H2_BUCKET_IS_OBSERVER(b)) {
      +        h2_bucket_observer *l = (h2_bucket_observer *)b->data; 
      +        return l->cb(l->ctx, event, b);
      +    }
      +    return APR_EINVAL;
      +}
      +
      +const apr_bucket_type_t h2_bucket_type_observer = {
      +    "H2OBS", 5, APR_BUCKET_METADATA,
      +    bucket_destroy,
      +    bucket_read,
      +    apr_bucket_setaside_noop,
      +    apr_bucket_split_notimpl,
      +    apr_bucket_shared_copy
      +};
      +
      +apr_bucket *h2_bucket_observer_beam(struct h2_bucket_beam *beam,
      +                                    apr_bucket_brigade *dest,
      +                                    const apr_bucket *src)
      +{
      +    if (H2_BUCKET_IS_OBSERVER(src)) {
      +        h2_bucket_observer *l = (h2_bucket_observer *)src->data; 
      +        apr_bucket *b = h2_bucket_observer_create(dest->bucket_alloc, 
      +                                                  l->cb, l->ctx);
      +        APR_BRIGADE_INSERT_TAIL(dest, b);
      +        l->cb = NULL;
      +        l->ctx = NULL;
      +        h2_bucket_observer_fire(b, H2_BUCKET_EV_BEFORE_MASTER_SEND);
      +        return b;
      +    }
      +    return NULL;
      +}
      +
      +static apr_status_t bbout(apr_bucket_brigade *bb, const char *fmt, ...)
      +{
      +    va_list args;
      +    apr_status_t rv;
      +
      +    va_start(args, fmt);
      +    rv = apr_brigade_vprintf(bb, NULL, NULL, fmt, args);
      +    va_end(args);
      +
      +    return rv;
      +}
      +
      +static void add_settings(apr_bucket_brigade *bb, h2_session *s, int last) 
      +{
      +    h2_mplx *m = s->mplx;
      +    
      +    bbout(bb, "  \"settings\": {\n");
      +    bbout(bb, "    \"SETTINGS_MAX_CONCURRENT_STREAMS\": %d,\n", m->max_streams); 
      +    bbout(bb, "    \"SETTINGS_MAX_FRAME_SIZE\": %d,\n", 16*1024); 
      +    bbout(bb, "    \"SETTINGS_INITIAL_WINDOW_SIZE\": %d,\n",
      +          h2_config_geti(s->config, H2_CONF_WIN_SIZE));
      +    bbout(bb, "    \"SETTINGS_ENABLE_PUSH\": %d\n", h2_session_push_enabled(s)); 
      +    bbout(bb, "  }%s\n", last? "" : ",");
      +}
      +
      +static void add_peer_settings(apr_bucket_brigade *bb, h2_session *s, int last) 
      +{
      +    bbout(bb, "  \"peerSettings\": {\n");
      +    bbout(bb, "    \"SETTINGS_MAX_CONCURRENT_STREAMS\": %d,\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS)); 
      +    bbout(bb, "    \"SETTINGS_MAX_FRAME_SIZE\": %d,\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_MAX_FRAME_SIZE)); 
      +    bbout(bb, "    \"SETTINGS_INITIAL_WINDOW_SIZE\": %d,\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE)); 
      +    bbout(bb, "    \"SETTINGS_ENABLE_PUSH\": %d,\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_ENABLE_PUSH)); 
      +    bbout(bb, "    \"SETTINGS_HEADER_TABLE_SIZE\": %d,\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_HEADER_TABLE_SIZE)); 
      +    bbout(bb, "    \"SETTINGS_MAX_HEADER_LIST_SIZE\": %d\n", 
      +        nghttp2_session_get_remote_settings(s->ngh2, NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE)); 
      +    bbout(bb, "  }%s\n", last? "" : ",");
      +}
      +
      +typedef struct {
      +    apr_bucket_brigade *bb;
      +    h2_session *s;
      +    int idx;
      +} stream_ctx_t;
      +
      +static int add_stream(h2_stream *stream, void *ctx)
      +{
      +    stream_ctx_t *x = ctx;
      +    int32_t flowIn, flowOut;
      +    
      +    flowIn = nghttp2_session_get_stream_effective_local_window_size(x->s->ngh2, stream->id); 
      +    flowOut = nghttp2_session_get_stream_remote_window_size(x->s->ngh2, stream->id);
      +    bbout(x->bb, "%s\n    \"%d\": {\n", (x->idx? "," : ""), stream->id);
      +    bbout(x->bb, "    \"state\": \"%s\",\n", h2_stream_state_str(stream));
      +    bbout(x->bb, "    \"created\": %f,\n", ((double)stream->created)/APR_USEC_PER_SEC);
      +    bbout(x->bb, "    \"flowIn\": %d,\n", flowIn);
      +    bbout(x->bb, "    \"flowOut\": %d,\n", flowOut);
      +    bbout(x->bb, "    \"dataIn\": %"APR_UINT64_T_FMT",\n", stream->in_data_octets);  
      +    bbout(x->bb, "    \"dataOut\": %"APR_UINT64_T_FMT"\n", stream->out_data_octets);  
      +    bbout(x->bb, "    }");
      +    
      +    ++x->idx;
      +    return 1;
      +} 
      +
      +static void add_streams(apr_bucket_brigade *bb, h2_session *s, int last) 
      +{
      +    stream_ctx_t x;
      +    
      +    x.bb = bb;
      +    x.s = s;
      +    x.idx = 0;
      +    bbout(bb, "  \"streams\": {");
      +    h2_mplx_stream_do(s->mplx, add_stream, &x);
      +    bbout(bb, "\n  }%s\n", last? "" : ",");
      +}
      +
      +static void add_push(apr_bucket_brigade *bb, h2_session *s, 
      +                     h2_stream *stream, int last) 
      +{
      +    h2_push_diary *diary;
      +    apr_status_t status;
      +    
      +    bbout(bb, "    \"push\": {\n");
      +    diary = s->push_diary;
      +    if (diary) {
      +        const char *data;
      +        const char *base64_digest;
      +        apr_size_t len;
      +        
      +        status = h2_push_diary_digest_get(diary, bb->p, 256, 
      +                                          stream->request->authority, 
      +                                          &data, &len);
      +        if (status == APR_SUCCESS) {
      +            base64_digest = h2_util_base64url_encode(data, len, bb->p);
      +            bbout(bb, "      \"cacheDigest\": \"%s\",\n", base64_digest);
      +        }
      +    }
      +    bbout(bb, "      \"promises\": %d,\n", s->pushes_promised);
      +    bbout(bb, "      \"submits\": %d,\n", s->pushes_submitted);
      +    bbout(bb, "      \"resets\": %d\n", s->pushes_reset);
      +    bbout(bb, "    }%s\n", last? "" : ",");
      +}
      +
      +static void add_in(apr_bucket_brigade *bb, h2_session *s, int last) 
      +{
      +    bbout(bb, "    \"in\": {\n");
      +    bbout(bb, "      \"requests\": %d,\n", s->remote.emitted_count);
      +    bbout(bb, "      \"resets\": %d, \n", s->streams_reset);
      +    bbout(bb, "      \"frames\": %ld,\n", (long)s->frames_received);
      +    bbout(bb, "      \"octets\": %"APR_UINT64_T_FMT"\n", s->io.bytes_read);
      +    bbout(bb, "    }%s\n", last? "" : ",");
      +}
      +
      +static void add_out(apr_bucket_brigade *bb, h2_session *s, int last) 
      +{
      +    bbout(bb, "    \"out\": {\n");
      +    bbout(bb, "      \"responses\": %d,\n", s->responses_submitted);
      +    bbout(bb, "      \"frames\": %ld,\n", (long)s->frames_sent);
      +    bbout(bb, "      \"octets\": %"APR_UINT64_T_FMT"\n", s->io.bytes_written);
      +    bbout(bb, "    }%s\n", last? "" : ",");
      +}
      +
      +static void add_stats(apr_bucket_brigade *bb, h2_session *s, 
      +                     h2_stream *stream, int last) 
      +{
      +    bbout(bb, "  \"stats\": {\n");
      +    add_in(bb, s, 0);
      +    add_out(bb, s, 0);
      +    add_push(bb, s, stream, 1);
      +    bbout(bb, "  }%s\n", last? "" : ",");
      +}
      +
      +static apr_status_t h2_status_insert(h2_task *task, apr_bucket *b)
      +{
      +    h2_mplx *m = task->mplx;
      +    h2_stream *stream = h2_mplx_stream_get(m, task->stream_id);
      +    h2_session *s;
      +    conn_rec *c;
      +    
      +    apr_bucket_brigade *bb;
      +    apr_bucket *e;
      +    int32_t connFlowIn, connFlowOut;
      +    
      +    if (!stream) {
      +        /* stream already done */
      +        return APR_SUCCESS;
      +    }
      +    s = stream->session;
      +    c = s->c;
      +    
      +    bb = apr_brigade_create(stream->pool, c->bucket_alloc);
      +    
      +    connFlowIn = nghttp2_session_get_effective_local_window_size(s->ngh2); 
      +    connFlowOut = nghttp2_session_get_remote_window_size(s->ngh2);
      +     
      +    bbout(bb, "{\n");
      +    bbout(bb, "  \"version\": \"draft-01\",\n");
      +    add_settings(bb, s, 0);
      +    add_peer_settings(bb, s, 0);
      +    bbout(bb, "  \"connFlowIn\": %d,\n", connFlowIn);
      +    bbout(bb, "  \"connFlowOut\": %d,\n", connFlowOut);
      +    bbout(bb, "  \"sentGoAway\": %d,\n", s->local.shutdown);
      +
      +    add_streams(bb, s, 0);
      +    
      +    add_stats(bb, s, stream, 1);
      +    bbout(bb, "}\n");
      +    
      +    while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
      +        APR_BUCKET_REMOVE(e);
      +        APR_BUCKET_INSERT_AFTER(b, e);
      +        b = e;
      +    }
      +    apr_brigade_destroy(bb);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t status_event(void *ctx, h2_bucket_event event, 
      +                                 apr_bucket *b)
      +{
      +    h2_task *task = ctx;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, task->c->master, 
      +                  "status_event(%s): %d", task->id, event);
      +    switch (event) {
      +        case H2_BUCKET_EV_BEFORE_MASTER_SEND:
      +            h2_status_insert(task, b);
      +            break;
      +        default:
      +            break;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +int h2_filter_h2_status_handler(request_rec *r)
      +{
      +    h2_ctx *ctx = h2_ctx_rget(r);
      +    conn_rec *c = r->connection;
      +    h2_task *task;
      +    apr_bucket_brigade *bb;
      +    apr_bucket *b;
      +    apr_status_t status;
      +    
      +    if (strcmp(r->handler, "http2-status")) {
      +        return DECLINED;
      +    }
      +    if (r->method_number != M_GET && r->method_number != M_POST) {
      +        return DECLINED;
      +    }
      +
      +    task = ctx? h2_ctx_get_task(ctx) : NULL;
      +    if (task) {
      +
      +        if ((status = ap_discard_request_body(r)) != OK) {
      +            return status;
      +        }
      +        
      +        /* We need to handle the actual output on the main thread, as
      +         * we need to access h2_session information. */
      +        r->status = 200;
      +        r->clength = -1;
      +        r->chunked = 1;
      +        apr_table_unset(r->headers_out, "Content-Length");
      +        ap_set_content_type(r, "application/json");
      +        apr_table_setn(r->notes, H2_FILTER_DEBUG_NOTE, "on");
      +
      +        bb = apr_brigade_create(r->pool, c->bucket_alloc);
      +        b = h2_bucket_observer_create(c->bucket_alloc, status_event, task);
      +        APR_BRIGADE_INSERT_TAIL(bb, b);
      +        b = apr_bucket_eos_create(c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, b);
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                      "status_handler(%s): checking for incoming trailers", 
      +                      task->id);
      +        if (r->trailers_in && !apr_is_empty_table(r->trailers_in)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                          "status_handler(%s): seeing incoming trailers", 
      +                          task->id);
      +            apr_table_setn(r->trailers_out, "h2-trailers-in", 
      +                           apr_itoa(r->pool, 1));
      +        }
      +        
      +        status = ap_pass_brigade(r->output_filters, bb);
      +        if (status == APR_SUCCESS
      +            || r->status != HTTP_OK
      +            || c->aborted) {
      +            return OK;
      +        }
      +        else {
      +            /* no way to know what type of error occurred */
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, status, r,
      +                          "status_handler(%s): ap_pass_brigade failed", 
      +                          task->id);
      +            return AP_FILTER_ERROR;
      +        }
      +    }
      +    return DECLINED;
      +}
      +
      diff --git a/modules/http2/h2_filter.h b/modules/http2/h2_filter.h
      new file mode 100644
      index 00000000000..b3e34cc5ba3
      --- /dev/null
      +++ b/modules/http2/h2_filter.h
      @@ -0,0 +1,77 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_filter__
      +#define __mod_h2__h2_filter__
      +
      +struct h2_bucket_beam;
      +struct h2_headers;
      +struct h2_stream;
      +struct h2_session;
      +
      +typedef apr_status_t h2_filter_cin_cb(void *ctx, 
      +                                      const char *data, apr_size_t len,
      +                                      apr_size_t *readlen);
      +
      +typedef struct h2_filter_cin {
      +    apr_pool_t *pool;
      +    apr_bucket_brigade *bb;
      +    h2_filter_cin_cb *cb;
      +    void *cb_ctx;
      +    apr_socket_t *socket;
      +    apr_interval_time_t timeout;
      +    apr_time_t start_read;
      +} h2_filter_cin;
      +
      +h2_filter_cin *h2_filter_cin_create(apr_pool_t *p, h2_filter_cin_cb *cb, void *ctx);
      +
      +void h2_filter_cin_timeout_set(h2_filter_cin *cin, apr_interval_time_t timeout);
      +
      +apr_status_t h2_filter_core_input(ap_filter_t* filter,
      +                                  apr_bucket_brigade* brigade,
      +                                  ap_input_mode_t mode,
      +                                  apr_read_type_e block,
      +                                  apr_off_t readbytes);
      +
      +/******* observer bucket ******************************************************/
      +
      +typedef enum {
      +    H2_BUCKET_EV_BEFORE_DESTROY,
      +    H2_BUCKET_EV_BEFORE_MASTER_SEND
      +} h2_bucket_event;
      +
      +extern const apr_bucket_type_t h2_bucket_type_observer;
      +
      +typedef apr_status_t h2_bucket_event_cb(void *ctx, h2_bucket_event event, apr_bucket *b);
      +
      +#define H2_BUCKET_IS_OBSERVER(e)     (e->type == &h2_bucket_type_observer)
      +
      +apr_bucket * h2_bucket_observer_make(apr_bucket *b, h2_bucket_event_cb *cb, 
      +                                     void *ctx); 
      +
      +apr_bucket * h2_bucket_observer_create(apr_bucket_alloc_t *list, 
      +                                       h2_bucket_event_cb *cb, void *ctx); 
      +                                       
      +apr_status_t h2_bucket_observer_fire(apr_bucket *b, h2_bucket_event event);
      +
      +apr_bucket *h2_bucket_observer_beam(struct h2_bucket_beam *beam,
      +                                    apr_bucket_brigade *dest,
      +                                    const apr_bucket *src);
      +
      +/******* /.well-known/h2/state handler ****************************************/
      +
      +int h2_filter_h2_status_handler(request_rec *r);
      +
      +#endif /* __mod_h2__h2_filter__ */
      diff --git a/modules/http2/h2_from_h1.c b/modules/http2/h2_from_h1.c
      new file mode 100644
      index 00000000000..108e3182767
      --- /dev/null
      +++ b/modules/http2/h2_from_h1.c
      @@ -0,0 +1,839 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stdio.h>
      +
      +#include <apr_date.h>
      +#include <apr_lib.h>
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +#include <util_time.h>
      +
      +#include "h2_private.h"
      +#include "h2_headers.h"
      +#include "h2_from_h1.h"
      +#include "h2_task.h"
      +#include "h2_util.h"
      +
      +
      +/* This routine is called by apr_table_do and merges all instances of
      + * the passed field values into a single array that will be further
      + * processed by some later routine.  Originally intended to help split
      + * and recombine multiple Vary fields, though it is generic to any field
      + * consisting of comma/space-separated tokens.
      + */
      +static int uniq_field_values(void *d, const char *key, const char *val)
      +{
      +    apr_array_header_t *values;
      +    char *start;
      +    char *e;
      +    char **strpp;
      +    int  i;
      +    
      +    (void)key;
      +    values = (apr_array_header_t *)d;
      +    
      +    e = apr_pstrdup(values->pool, val);
      +    
      +    do {
      +        /* Find a non-empty fieldname */
      +        
      +        while (*e == ',' || apr_isspace(*e)) {
      +            ++e;
      +        }
      +        if (*e == '\0') {
      +            break;
      +        }
      +        start = e;
      +        while (*e != '\0' && *e != ',' && !apr_isspace(*e)) {
      +            ++e;
      +        }
      +        if (*e != '\0') {
      +            *e++ = '\0';
      +        }
      +        
      +        /* Now add it to values if it isn't already represented.
      +         * Could be replaced by a ap_array_strcasecmp() if we had one.
      +         */
      +        for (i = 0, strpp = (char **) values->elts; i < values->nelts;
      +             ++i, ++strpp) {
      +            if (*strpp && apr_strnatcasecmp(*strpp, start) == 0) {
      +                break;
      +            }
      +        }
      +        if (i == values->nelts) {  /* if not found */
      +            *(char **)apr_array_push(values) = start;
      +        }
      +    } while (*e != '\0');
      +    
      +    return 1;
      +}
      +
      +/*
      + * Since some clients choke violently on multiple Vary fields, or
      + * Vary fields with duplicate tokens, combine any multiples and remove
      + * any duplicates.
      + */
      +static void fix_vary(request_rec *r)
      +{
      +    apr_array_header_t *varies;
      +    
      +    varies = apr_array_make(r->pool, 5, sizeof(char *));
      +    
      +    /* Extract all Vary fields from the headers_out, separate each into
      +     * its comma-separated fieldname values, and then add them to varies
      +     * if not already present in the array.
      +     */
      +    apr_table_do(uniq_field_values, varies, r->headers_out, "Vary", NULL);
      +    
      +    /* If we found any, replace old Vary fields with unique-ified value */
      +    
      +    if (varies->nelts > 0) {
      +        apr_table_setn(r->headers_out, "Vary",
      +                       apr_array_pstrcat(r->pool, varies, ','));
      +    }
      +}
      +
      +static void set_basic_http_header(apr_table_t *headers, request_rec *r,
      +                                  apr_pool_t *pool)
      +{
      +    char *date = NULL;
      +    const char *proxy_date = NULL;
      +    const char *server = NULL;
      +    const char *us = ap_get_server_banner();
      +    
      +    /*
      +     * keep the set-by-proxy server and date headers, otherwise
      +     * generate a new server header / date header
      +     */
      +    if (r && r->proxyreq != PROXYREQ_NONE) {
      +        proxy_date = apr_table_get(r->headers_out, "Date");
      +        if (!proxy_date) {
      +            /*
      +             * proxy_date needs to be const. So use date for the creation of
      +             * our own Date header and pass it over to proxy_date later to
      +             * avoid a compiler warning.
      +             */
      +            date = apr_palloc(pool, APR_RFC822_DATE_LEN);
      +            ap_recent_rfc822_date(date, r->request_time);
      +        }
      +        server = apr_table_get(r->headers_out, "Server");
      +    }
      +    else {
      +        date = apr_palloc(pool, APR_RFC822_DATE_LEN);
      +        ap_recent_rfc822_date(date, r? r->request_time : apr_time_now());
      +    }
      +    
      +    apr_table_setn(headers, "Date", proxy_date ? proxy_date : date );
      +    if (r) {
      +        apr_table_unset(r->headers_out, "Date");
      +    }
      +    
      +    if (!server && *us) {
      +        server = us;
      +    }
      +    if (server) {
      +        apr_table_setn(headers, "Server", server);
      +        if (r) {
      +            apr_table_unset(r->headers_out, "Server");
      +        }
      +    }
      +}
      +
      +static int copy_header(void *ctx, const char *name, const char *value)
      +{
      +    apr_table_t *headers = ctx;
      +    
      +    apr_table_addn(headers, name, value);
      +    return 1;
      +}
      +
      +static h2_headers *create_response(h2_task *task, request_rec *r)
      +{
      +    const char *clheader;
      +    const char *ctype;
      +    apr_table_t *headers;
      +    /*
      +     * Now that we are ready to send a response, we need to combine the two
      +     * header field tables into a single table.  If we don't do this, our
      +     * later attempts to set or unset a given fieldname might be bypassed.
      +     */
      +    if (!apr_is_empty_table(r->err_headers_out)) {
      +        r->headers_out = apr_table_overlay(r->pool, r->err_headers_out,
      +                                           r->headers_out);
      +        apr_table_clear(r->err_headers_out);
      +    }
      +    
      +    /*
      +     * Remove the 'Vary' header field if the client can't handle it.
      +     * Since this will have nasty effects on HTTP/1.1 caches, force
      +     * the response into HTTP/1.0 mode.
      +     */
      +    if (apr_table_get(r->subprocess_env, "force-no-vary") != NULL) {
      +        apr_table_unset(r->headers_out, "Vary");
      +        r->proto_num = HTTP_VERSION(1,0);
      +        apr_table_setn(r->subprocess_env, "force-response-1.0", "1");
      +    }
      +    else {
      +        fix_vary(r);
      +    }
      +    
      +    /*
      +     * Now remove any ETag response header field if earlier processing
      +     * says so (such as a 'FileETag None' directive).
      +     */
      +    if (apr_table_get(r->notes, "no-etag") != NULL) {
      +        apr_table_unset(r->headers_out, "ETag");
      +    }
      +    
      +    /* determine the protocol and whether we should use keepalives. */
      +    ap_set_keepalive(r);
      +    
      +    if (r->chunked) {
      +        apr_table_unset(r->headers_out, "Content-Length");
      +    }
      +    
      +    ctype = ap_make_content_type(r, r->content_type);
      +    if (ctype) {
      +        apr_table_setn(r->headers_out, "Content-Type", ctype);
      +    }
      +    
      +    if (r->content_encoding) {
      +        apr_table_setn(r->headers_out, "Content-Encoding",
      +                       r->content_encoding);
      +    }
      +    
      +    if (!apr_is_empty_array(r->content_languages)) {
      +        unsigned int i;
      +        char *token;
      +        char **languages = (char **)(r->content_languages->elts);
      +        const char *field = apr_table_get(r->headers_out, "Content-Language");
      +        
      +        while (field && (token = ap_get_list_item(r->pool, &field)) != NULL) {
      +            for (i = 0; i < r->content_languages->nelts; ++i) {
      +                if (!apr_strnatcasecmp(token, languages[i]))
      +                    break;
      +            }
      +            if (i == r->content_languages->nelts) {
      +                *((char **) apr_array_push(r->content_languages)) = token;
      +            }
      +        }
      +        
      +        field = apr_array_pstrcat(r->pool, r->content_languages, ',');
      +        apr_table_setn(r->headers_out, "Content-Language", field);
      +    }
      +    
      +    /*
      +     * Control cachability for non-cachable responses if not already set by
      +     * some other part of the server configuration.
      +     */
      +    if (r->no_cache && !apr_table_get(r->headers_out, "Expires")) {
      +        char *date = apr_palloc(r->pool, APR_RFC822_DATE_LEN);
      +        ap_recent_rfc822_date(date, r->request_time);
      +        apr_table_addn(r->headers_out, "Expires", date);
      +    }
      +    
      +    /* This is a hack, but I can't find anyway around it.  The idea is that
      +     * we don't want to send out 0 Content-Lengths if it is a head request.
      +     * This happens when modules try to outsmart the server, and return
      +     * if they see a HEAD request.  Apache 1.3 handlers were supposed to
      +     * just return in that situation, and the core handled the HEAD.  In
      +     * 2.0, if a handler returns, then the core sends an EOS bucket down
      +     * the filter stack, and the content-length filter computes a C-L of
      +     * zero and that gets put in the headers, and we end up sending a
      +     * zero C-L to the client.  We can't just remove the C-L filter,
      +     * because well behaved 2.0 handlers will send their data down the stack,
      +     * and we will compute a real C-L for the head request. RBB
      +     */
      +    if (r->header_only
      +        && (clheader = apr_table_get(r->headers_out, "Content-Length"))
      +        && !strcmp(clheader, "0")) {
      +        apr_table_unset(r->headers_out, "Content-Length");
      +    }
      +    
      +    headers = apr_table_make(r->pool, 10);
      +    
      +    set_basic_http_header(headers, r, r->pool);
      +    if (r->status == HTTP_NOT_MODIFIED) {
      +        apr_table_do(copy_header, headers, r->headers_out,
      +                     "ETag",
      +                     "Content-Location",
      +                     "Expires",
      +                     "Cache-Control",
      +                     "Vary",
      +                     "Warning",
      +                     "WWW-Authenticate",
      +                     "Proxy-Authenticate",
      +                     "Set-Cookie",
      +                     "Set-Cookie2",
      +                     NULL);
      +    }
      +    else {
      +        apr_table_do(copy_header, headers, r->headers_out, NULL);
      +    }
      +    
      +    return h2_headers_rcreate(r, r->status, headers, r->pool);
      +}
      +
      +typedef enum {
      +    H2_RP_STATUS_LINE,
      +    H2_RP_HEADER_LINE,
      +    H2_RP_DONE
      +} h2_rp_state_t;
      +
      +typedef struct h2_response_parser {
      +    h2_rp_state_t state;
      +    h2_task *task;
      +    int http_status;
      +    apr_array_header_t *hlines;
      +    apr_bucket_brigade *tmp;
      +} h2_response_parser;
      +
      +static apr_status_t parse_header(h2_response_parser *parser, char *line) {
      +    const char *hline;
      +    if (line[0] == ' ' || line[0] == '\t') {
      +        char **plast;
      +        /* continuation line from the header before this */
      +        while (line[0] == ' ' || line[0] == '\t') {
      +            ++line;
      +        }
      +        
      +        plast = apr_array_pop(parser->hlines);
      +        if (plast == NULL) {
      +            /* not well formed */
      +            return APR_EINVAL;
      +        }
      +        hline = apr_psprintf(parser->task->pool, "%s %s", *plast, line);
      +    }
      +    else {
      +        /* new header line */
      +        hline = apr_pstrdup(parser->task->pool, line);
      +    }
      +    APR_ARRAY_PUSH(parser->hlines, const char*) = hline; 
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t get_line(h2_response_parser *parser, apr_bucket_brigade *bb, 
      +                             char *line, apr_size_t len)
      +{
      +    h2_task *task = parser->task;
      +    apr_status_t status;
      +    
      +    if (!parser->tmp) {
      +        parser->tmp = apr_brigade_create(task->pool, task->c->bucket_alloc);
      +    }
      +    status = apr_brigade_split_line(parser->tmp, bb, APR_BLOCK_READ, 
      +                                    HUGE_STRING_LEN);
      +    if (status == APR_SUCCESS) {
      +        --len;
      +        status = apr_brigade_flatten(parser->tmp, line, &len);
      +        if (status == APR_SUCCESS) {
      +            /* we assume a non-0 containing line and remove trailing crlf. */
      +            line[len] = '\0';
      +            if (len >= 2 && !strcmp(H2_CRLF, line + len - 2)) {
      +                len -= 2;
      +                line[len] = '\0';
      +                apr_brigade_cleanup(parser->tmp);
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c,
      +                              "h2_task(%s): read response line: %s", 
      +                              task->id, line);
      +            }
      +            else {
      +                /* this does not look like a complete line yet */
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c,
      +                              "h2_task(%s): read response, incomplete line: %s", 
      +                              task->id, line);
      +                return APR_EAGAIN;
      +            }
      +        }
      +    }
      +    apr_brigade_cleanup(parser->tmp);
      +    return status;
      +}
      +
      +static apr_table_t *make_table(h2_response_parser *parser)
      +{
      +    h2_task *task = parser->task;
      +    apr_array_header_t *hlines = parser->hlines;
      +    if (hlines) {
      +        apr_table_t *headers = apr_table_make(task->pool, hlines->nelts);        
      +        int i;
      +        
      +        for (i = 0; i < hlines->nelts; ++i) {
      +            char *hline = ((char **)hlines->elts)[i];
      +            char *sep = ap_strchr(hline, ':');
      +            if (!sep) {
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, APR_EINVAL, task->c,
      +                              APLOGNO(02955) "h2_task(%s): invalid header[%d] '%s'",
      +                              task->id, i, (char*)hline);
      +                /* not valid format, abort */
      +                return NULL;
      +            }
      +            (*sep++) = '\0';
      +            while (*sep == ' ' || *sep == '\t') {
      +                ++sep;
      +            }
      +            
      +            if (!h2_util_ignore_header(hline)) {
      +                apr_table_merge(headers, hline, sep);
      +            }
      +        }
      +        return headers;
      +    }
      +    else {
      +        return apr_table_make(task->pool, 0);        
      +    }
      +}
      +
      +static apr_status_t pass_response(h2_task *task, ap_filter_t *f, 
      +                                  h2_response_parser *parser) 
      +{
      +    apr_bucket *b;
      +    apr_status_t status;
      +    
      +    h2_headers *response = h2_headers_create(parser->http_status, 
      +                                             make_table(parser),
      +                                             NULL, task->pool);
      +    apr_brigade_cleanup(parser->tmp);
      +    b = h2_bucket_headers_create(task->c->bucket_alloc, response);
      +    APR_BRIGADE_INSERT_TAIL(parser->tmp, b);
      +    b = apr_bucket_flush_create(task->c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(parser->tmp, b);                      
      +    status = ap_pass_brigade(f->next, parser->tmp);
      +    apr_brigade_cleanup(parser->tmp);
      +    
      +    /* reset parser for possible next response */
      +    parser->state = H2_RP_STATUS_LINE;
      +    apr_array_clear(parser->hlines);
      +
      +    if (response->status >= 200) {
      +        task->output.sent_response = 1;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, 
      +                  APLOGNO(03197) "h2_task(%s): passed response %d", 
      +                  task->id, response->status);
      +    return status;
      +}
      +
      +static apr_status_t parse_status(h2_task *task, char *line)
      +{
      +    h2_response_parser *parser = task->output.rparser;
      +    int sindex = (apr_date_checkmask(line, "HTTP/#.# ###*")? 9 : 
      +                  (apr_date_checkmask(line, "HTTP/# ###*")? 7 : 0));
      +    if (sindex > 0) {
      +        int k = sindex + 3;
      +        char keepchar = line[k];
      +        line[k] = '\0';
      +        parser->http_status = atoi(&line[sindex]);
      +        line[k] = keepchar;
      +        parser->state = H2_RP_HEADER_LINE;
      +        
      +        return APR_SUCCESS;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, task->c, APLOGNO(03467)
      +                  "h2_task(%s): unable to parse status line: %s", 
      +                  task->id, line);
      +    return APR_EINVAL;
      +}
      +
      +apr_status_t h2_from_h1_parse_response(h2_task *task, ap_filter_t *f, 
      +                                       apr_bucket_brigade *bb)
      +{
      +    h2_response_parser *parser = task->output.rparser;
      +    char line[HUGE_STRING_LEN];
      +    apr_status_t status = APR_SUCCESS;
      +
      +    if (!parser) {
      +        parser = apr_pcalloc(task->pool, sizeof(*parser));
      +        parser->task = task;
      +        parser->state = H2_RP_STATUS_LINE;
      +        parser->hlines = apr_array_make(task->pool, 10, sizeof(char *));
      +        task->output.rparser = parser;
      +    }
      +    
      +    while (!APR_BRIGADE_EMPTY(bb) && status == APR_SUCCESS) {
      +        switch (parser->state) {
      +            case H2_RP_STATUS_LINE:
      +            case H2_RP_HEADER_LINE:
      +                status = get_line(parser, bb, line, sizeof(line));
      +                if (status == APR_EAGAIN) {
      +                    /* need more data */
      +                    return APR_SUCCESS;
      +                }
      +                else if (status != APR_SUCCESS) {
      +                    return status;
      +                }
      +                if (parser->state == H2_RP_STATUS_LINE) {
      +                    /* instead of parsing, just take it directly */
      +                    status = parse_status(task, line);
      +                }
      +                else if (line[0] == '\0') {
      +                    /* end of headers, pass response onward */
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                                  "h2_task(%s): end of response", task->id);
      +                    return pass_response(task, f, parser);
      +                }
      +                else {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                                  "h2_task(%s): response header %s", task->id, line);
      +                    status = parse_header(parser, line);
      +                }
      +                break;
      +                
      +            default:
      +                return status;
      +        }
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_filter_headers_out(ap_filter_t *f, apr_bucket_brigade *bb)
      +{
      +    h2_task *task = f->ctx;
      +    request_rec *r = f->r;
      +    apr_bucket *b, *bresp, *body_bucket = NULL, *next;
      +    ap_bucket_error *eb = NULL;
      +    h2_headers *response = NULL;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                  "h2_task(%s): output_filter called", task->id);
      +    
      +    if (!task->output.sent_response) {
      +        /* check, if we need to send the response now. Until we actually
      +         * see a DATA bucket or some EOS/EOR, we do not do so. */
      +        for (b = APR_BRIGADE_FIRST(bb);
      +             b != APR_BRIGADE_SENTINEL(bb);
      +             b = APR_BUCKET_NEXT(b))
      +        {
      +            if (AP_BUCKET_IS_ERROR(b) && !eb) {
      +                eb = b->data;
      +            }
      +            else if (AP_BUCKET_IS_EOC(b)) {
      +                /* If we see an EOC bucket it is a signal that we should get out
      +                 * of the way doing nothing.
      +                 */
      +                ap_remove_output_filter(f);
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, f->c,
      +                              "h2_task(%s): eoc bucket passed", task->id);
      +                return ap_pass_brigade(f->next, bb);
      +            }
      +            else if (!H2_BUCKET_IS_HEADERS(b) && !APR_BUCKET_IS_FLUSH(b)) { 
      +                body_bucket = b;
      +                break;
      +            }
      +        }
      +        
      +        if (eb) {
      +            int st = eb->status;
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c, APLOGNO(03047)
      +                          "h2_task(%s): err bucket status=%d", task->id, st);
      +            /* throw everything away and replace it with the error response
      +             * generated by ap_die() */
      +            apr_brigade_cleanup(bb);
      +            ap_die(st, r);
      +            return AP_FILTER_ERROR;
      +        }
      +        
      +        if (body_bucket) {
      +            /* time to insert the response bucket before the body */
      +            response = create_response(task, r);
      +            if (response == NULL) {
      +                ap_log_cerror(APLOG_MARK, APLOG_NOTICE, 0, f->c, APLOGNO(03048)
      +                              "h2_task(%s): unable to create response", task->id);
      +                return APR_ENOMEM;
      +            }
      +            
      +            bresp = h2_bucket_headers_create(f->c->bucket_alloc, response);
      +            APR_BUCKET_INSERT_BEFORE(body_bucket, bresp);
      +            task->output.sent_response = 1;
      +            r->sent_bodyct = 1;
      +        }
      +    }
      +    
      +    if (r->header_only) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                      "h2_task(%s): header_only, cleanup output brigade", 
      +                      task->id);
      +        b = body_bucket? body_bucket : APR_BRIGADE_FIRST(bb);
      +        while (b != APR_BRIGADE_SENTINEL(bb)) {
      +            next = APR_BUCKET_NEXT(b);
      +            if (APR_BUCKET_IS_EOS(b) || AP_BUCKET_IS_EOR(b)) {
      +                break;
      +            } 
      +            APR_BUCKET_REMOVE(b);
      +            apr_bucket_destroy(b);
      +            b = next;
      +        }
      +    }
      +    else if (task->output.sent_response) {
      +        /* lets get out of the way, our task is done */
      +        ap_remove_output_filter(f);
      +    }
      +    return ap_pass_brigade(f->next, bb);
      +}
      +
      +static void make_chunk(h2_task *task, apr_bucket_brigade *bb, 
      +                       apr_bucket *first, apr_off_t chunk_len, 
      +                       apr_bucket *tail)
      +{
      +    /* Surround the buckets [first, tail[ with new buckets carrying the
      +     * HTTP/1.1 chunked encoding format. If tail is NULL, the chunk extends
      +     * to the end of the brigade. */
      +    char buffer[128];
      +    apr_bucket *c;
      +    int len;
      +    
      +    len = apr_snprintf(buffer, H2_ALEN(buffer), 
      +                       "%"APR_UINT64_T_HEX_FMT"\r\n", (apr_uint64_t)chunk_len);
      +    c = apr_bucket_heap_create(buffer, len, NULL, bb->bucket_alloc);
      +    APR_BUCKET_INSERT_BEFORE(first, c);
      +    c = apr_bucket_heap_create("\r\n", 2, NULL, bb->bucket_alloc);
      +    if (tail) {
      +        APR_BUCKET_INSERT_BEFORE(tail, c);
      +    }
      +    else {
      +        APR_BRIGADE_INSERT_TAIL(bb, c);
      +    }
      +    task->input.chunked_total += chunk_len;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, task->c,
      +                  "h2_task(%s): added chunk %ld, total %ld", 
      +                  task->id, (long)chunk_len, (long)task->input.chunked_total);
      +}
      +
      +static int ser_header(void *ctx, const char *name, const char *value) 
      +{
      +    apr_bucket_brigade *bb = ctx;
      +    apr_brigade_printf(bb, NULL, NULL, "%s: %s\r\n", name, value);
      +    return 1;
      +}
      +
      +static apr_status_t read_and_chunk(ap_filter_t *f, h2_task *task,
      +                                   apr_read_type_e block) {
      +    request_rec *r = f->r;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_bucket_brigade *bb = task->input.bbchunk;
      +    
      +    if (!bb) {
      +        bb = apr_brigade_create(r->pool, f->c->bucket_alloc);
      +        task->input.bbchunk = bb;
      +    }
      +    
      +    if (APR_BRIGADE_EMPTY(bb)) {
      +        apr_bucket *b, *next, *first_data = NULL;
      +        apr_bucket_brigade *tmp;
      +        apr_off_t bblen = 0;
      +
      +        /* get more data from the lower layer filters. Always do this
      +         * in larger pieces, since we handle the read modes ourself. */
      +        status = ap_get_brigade(f->next, bb, 
      +                                AP_MODE_READBYTES, block, 32*1024);
      +        if (status == APR_EOF) {
      +            if (!task->input.eos) {
      +                status = apr_brigade_puts(bb, NULL, NULL, "0\r\n\r\n");
      +                task->input.eos = 1;
      +                return APR_SUCCESS;
      +            }
      +            ap_remove_input_filter(f);
      +            return status;
      +            
      +        }
      +        else if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +
      +        for (b = APR_BRIGADE_FIRST(bb); 
      +             b != APR_BRIGADE_SENTINEL(bb) && !task->input.eos; 
      +             b = next) {
      +            next = APR_BUCKET_NEXT(b);
      +            if (APR_BUCKET_IS_METADATA(b)) {
      +                if (first_data) {
      +                    make_chunk(task, bb, first_data, bblen, b);
      +                    first_data = NULL;
      +                }
      +                
      +                if (H2_BUCKET_IS_HEADERS(b)) {
      +                    h2_headers *headers = h2_bucket_headers_get(b);
      +                    
      +                    ap_assert(headers);
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                                  "h2_task(%s): receiving trailers", task->id);
      +                    tmp = apr_brigade_split_ex(bb, b, NULL);
      +                    if (!apr_is_empty_table(headers->headers)) {
      +                        status = apr_brigade_puts(bb, NULL, NULL, "0\r\n");
      +                        apr_table_do(ser_header, bb, headers->headers, NULL);
      +                        status = apr_brigade_puts(bb, NULL, NULL, "\r\n");
      +                    }
      +                    else {
      +                        status = apr_brigade_puts(bb, NULL, NULL, "0\r\n\r\n");
      +                    }
      +                    r->trailers_in = apr_table_clone(r->pool, headers->headers);
      +                    APR_BUCKET_REMOVE(b);
      +                    apr_bucket_destroy(b);
      +                    APR_BRIGADE_CONCAT(bb, tmp);
      +                    apr_brigade_destroy(tmp);
      +                    task->input.eos = 1;
      +                }
      +                else if (APR_BUCKET_IS_EOS(b)) {
      +                    tmp = apr_brigade_split_ex(bb, b, NULL);
      +                    status = apr_brigade_puts(bb, NULL, NULL, "0\r\n\r\n");
      +                    APR_BRIGADE_CONCAT(bb, tmp);
      +                    apr_brigade_destroy(tmp);
      +                    task->input.eos = 1;
      +                }
      +            }
      +            else if (b->length == 0) {
      +                APR_BUCKET_REMOVE(b);
      +                apr_bucket_destroy(b);
      +            } 
      +            else {
      +                if (!first_data) {
      +                    first_data = b;
      +                    bblen = 0;
      +                }
      +                bblen += b->length;
      +            }    
      +        }
      +        
      +        if (first_data) {
      +            make_chunk(task, bb, first_data, bblen, NULL);
      +        }            
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_filter_request_in(ap_filter_t* f,
      +                                  apr_bucket_brigade* bb,
      +                                  ap_input_mode_t mode,
      +                                  apr_read_type_e block,
      +                                  apr_off_t readbytes)
      +{
      +    h2_task *task = f->ctx;
      +    request_rec *r = f->r;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_bucket *b, *next;
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, f->r,
      +                  "h2_task(%s): request filter, exp=%d", task->id, r->expecting_100);
      +    if (!task->request->chunked) {
      +        status = ap_get_brigade(f->next, bb, mode, block, readbytes);
      +        /* pipe data through, just take care of trailers */
      +        for (b = APR_BRIGADE_FIRST(bb); 
      +             b != APR_BRIGADE_SENTINEL(bb); b = next) {
      +            next = APR_BUCKET_NEXT(b);
      +            if (H2_BUCKET_IS_HEADERS(b)) {
      +                h2_headers *headers = h2_bucket_headers_get(b);
      +                ap_assert(headers);
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                              "h2_task(%s): receiving trailers", task->id);
      +                r->trailers_in = apr_table_clone(r->pool, headers->headers);
      +                APR_BUCKET_REMOVE(b);
      +                apr_bucket_destroy(b);
      +                ap_remove_input_filter(f);
      +                break;
      +            }
      +        }
      +        return status;
      +    }
      +
      +    /* Things are more complicated. The standard HTTP input filter, which
      +     * does a lot what we do not want to duplicate, also cares about chunked
      +     * transfer encoding and trailers.
      +     * We need to simulate chunked encoding for it to be happy.
      +     */
      +    if ((status = read_and_chunk(f, task, block)) != APR_SUCCESS) {
      +        return status;
      +    }
      +    
      +    if (mode == AP_MODE_EXHAUSTIVE) {
      +        /* return all we have */
      +        APR_BRIGADE_CONCAT(bb, task->input.bbchunk);
      +    }
      +    else if (mode == AP_MODE_READBYTES) {
      +        status = h2_brigade_concat_length(bb, task->input.bbchunk, readbytes);
      +    }
      +    else if (mode == AP_MODE_SPECULATIVE) {
      +        status = h2_brigade_copy_length(bb, task->input.bbchunk, readbytes);
      +    }
      +    else if (mode == AP_MODE_GETLINE) {
      +        /* we are reading a single LF line, e.g. the HTTP headers. 
      +         * this has the nasty side effect to split the bucket, even
      +         * though it ends with CRLF and creates a 0 length bucket */
      +        status = apr_brigade_split_line(bb, task->input.bbchunk, block, 
      +                                        HUGE_STRING_LEN);
      +        if (APLOGctrace1(f->c)) {
      +            char buffer[1024];
      +            apr_size_t len = sizeof(buffer)-1;
      +            apr_brigade_flatten(bb, buffer, &len);
      +            buffer[len] = 0;
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, f->c,
      +                          "h2_task(%s): getline: %s",
      +                          task->id, buffer);
      +        }
      +    }
      +    else {
      +        /* Hmm, well. There is mode AP_MODE_EATCRLF, but we chose not
      +         * to support it. Seems to work. */
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOTIMPL, f->c,
      +                      APLOGNO(02942) 
      +                      "h2_task, unsupported READ mode %d", mode);
      +        status = APR_ENOTIMPL;
      +    }
      +    
      +    h2_util_bb_log(f->c, task->stream_id, APLOG_TRACE2, "forwarding input", bb);
      +    return status;
      +}
      +
      +apr_status_t h2_filter_trailers_out(ap_filter_t *f, apr_bucket_brigade *bb)
      +{
      +    h2_task *task = f->ctx;
      +    request_rec *r = f->r;
      +    apr_bucket *b, *e;
      + 
      +    if (task && r) {
      +        /* Detect the EOS/EOR bucket and forward any trailers that may have
      +         * been set to our h2_headers.
      +         */
      +        for (b = APR_BRIGADE_FIRST(bb);
      +             b != APR_BRIGADE_SENTINEL(bb);
      +             b = APR_BUCKET_NEXT(b))
      +        {
      +            if ((APR_BUCKET_IS_EOS(b) || AP_BUCKET_IS_EOR(b))
      +                && r->trailers_out && !apr_is_empty_table(r->trailers_out)) {
      +                h2_headers *headers;
      +                apr_table_t *trailers;
      +                
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, f->c, APLOGNO(03049)
      +                              "h2_task(%s): sending trailers", task->id);
      +                trailers = apr_table_clone(r->pool, r->trailers_out);
      +                headers = h2_headers_rcreate(r, HTTP_OK, trailers, r->pool);
      +                e = h2_bucket_headers_create(bb->bucket_alloc, headers);
      +                APR_BUCKET_INSERT_BEFORE(b, e);
      +                apr_table_clear(r->trailers_out);
      +                ap_remove_output_filter(f);
      +                break;
      +            }
      +        }     
      +    }
      +     
      +    return ap_pass_brigade(f->next, bb);
      +}
      +
      diff --git a/modules/http2/h2_from_h1.h b/modules/http2/h2_from_h1.h
      new file mode 100644
      index 00000000000..1b7160a56d6
      --- /dev/null
      +++ b/modules/http2/h2_from_h1.h
      @@ -0,0 +1,49 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_from_h1__
      +#define __mod_h2__h2_from_h1__
      +
      +/**
      + * h2_from_h1 parses a HTTP/1.1 response into
      + * - response status
      + * - a list of header values
      + * - a series of bytes that represent the response body alone, without
      + *   any meta data, such as inserted by chunked transfer encoding.
      + *
      + * All data is allocated from the stream memory pool. 
      + *
      + * Again, see comments in h2_request: ideally we would take the headers
      + * and status from the httpd structures instead of parsing them here, but
      + * we need to have all handlers and filters involved in request/response
      + * processing, so this seems to be the way for now.
      + */
      +struct h2_headers;
      +struct h2_task;
      +
      +apr_status_t h2_from_h1_parse_response(struct h2_task *task, ap_filter_t *f, 
      +                                       apr_bucket_brigade *bb);
      +
      +apr_status_t h2_filter_headers_out(ap_filter_t *f, apr_bucket_brigade *bb);
      +
      +apr_status_t h2_filter_request_in(ap_filter_t* f,
      +                                  apr_bucket_brigade* brigade,
      +                                  ap_input_mode_t mode,
      +                                  apr_read_type_e block,
      +                                  apr_off_t readbytes);
      +
      +apr_status_t h2_filter_trailers_out(ap_filter_t *f, apr_bucket_brigade *bb);
      +
      +#endif /* defined(__mod_h2__h2_from_h1__) */
      diff --git a/modules/http2/h2_h2.c b/modules/http2/h2_h2.c
      new file mode 100644
      index 00000000000..d1743386f8d
      --- /dev/null
      +++ b/modules/http2/h2_h2.c
      @@ -0,0 +1,764 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_strings.h>
      +#include <apr_optional.h>
      +#include <apr_optional_hooks.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +#include <http_log.h>
      +
      +#include "mod_ssl.h"
      +
      +#include "mod_http2.h"
      +#include "h2_private.h"
      +
      +#include "h2_bucket_beam.h"
      +#include "h2_stream.h"
      +#include "h2_task.h"
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_conn.h"
      +#include "h2_filter.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_session.h"
      +#include "h2_util.h"
      +#include "h2_h2.h"
      +#include "mod_http2.h"
      +
      +const char *h2_tls_protos[] = {
      +    "h2", NULL
      +};
      +
      +const char *h2_clear_protos[] = {
      +    "h2c", NULL
      +};
      +
      +const char *H2_MAGIC_TOKEN = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
      +
      +/*******************************************************************************
      + * The optional mod_ssl functions we need. 
      + */
      +static APR_OPTIONAL_FN_TYPE(ssl_engine_disable) *opt_ssl_engine_disable;
      +static APR_OPTIONAL_FN_TYPE(ssl_is_https) *opt_ssl_is_https;
      +static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *opt_ssl_var_lookup;
      +
      +
      +/*******************************************************************************
      + * HTTP/2 error stuff
      + */
      +static const char *h2_err_descr[] = {
      +    "no error",                    /* 0x0 */
      +    "protocol error",
      +    "internal error",
      +    "flow control error",
      +    "settings timeout",
      +    "stream closed",               /* 0x5 */
      +    "frame size error",
      +    "refused stream",
      +    "cancel",
      +    "compression error",
      +    "connect error",               /* 0xa */
      +    "enhance your calm",
      +    "inadequate security",
      +    "http/1.1 required",
      +};
      +
      +const char *h2_h2_err_description(unsigned int h2_error)
      +{
      +    if (h2_error < (sizeof(h2_err_descr)/sizeof(h2_err_descr[0]))) {
      +        return h2_err_descr[h2_error];
      +    }
      +    return "unknown http/2 error code";
      +}
      +
      +/*******************************************************************************
      + * Check connection security requirements of RFC 7540
      + */
      +
      +/*
      + * Black Listed Ciphers from RFC 7549 Appendix A
      + *
      + */
      +static const char *RFC7540_names[] = {
      +    /* ciphers with NULL encrpytion */
      +    "NULL-MD5",                         /* TLS_NULL_WITH_NULL_NULL */
      +    /* same */                          /* TLS_RSA_WITH_NULL_MD5 */
      +    "NULL-SHA",                         /* TLS_RSA_WITH_NULL_SHA */
      +    "NULL-SHA256",                      /* TLS_RSA_WITH_NULL_SHA256 */
      +    "PSK-NULL-SHA",                     /* TLS_PSK_WITH_NULL_SHA */
      +    "DHE-PSK-NULL-SHA",                 /* TLS_DHE_PSK_WITH_NULL_SHA */
      +    "RSA-PSK-NULL-SHA",                 /* TLS_RSA_PSK_WITH_NULL_SHA */
      +    "PSK-NULL-SHA256",                  /* TLS_PSK_WITH_NULL_SHA256 */
      +    "PSK-NULL-SHA384",                  /* TLS_PSK_WITH_NULL_SHA384 */
      +    "DHE-PSK-NULL-SHA256",              /* TLS_DHE_PSK_WITH_NULL_SHA256 */
      +    "DHE-PSK-NULL-SHA384",              /* TLS_DHE_PSK_WITH_NULL_SHA384 */
      +    "RSA-PSK-NULL-SHA256",              /* TLS_RSA_PSK_WITH_NULL_SHA256 */
      +    "RSA-PSK-NULL-SHA384",              /* TLS_RSA_PSK_WITH_NULL_SHA384 */
      +    "ECDH-ECDSA-NULL-SHA",              /* TLS_ECDH_ECDSA_WITH_NULL_SHA */
      +    "ECDHE-ECDSA-NULL-SHA",             /* TLS_ECDHE_ECDSA_WITH_NULL_SHA */
      +    "ECDH-RSA-NULL-SHA",                /* TLS_ECDH_RSA_WITH_NULL_SHA */
      +    "ECDHE-RSA-NULL-SHA",               /* TLS_ECDHE_RSA_WITH_NULL_SHA */
      +    "AECDH-NULL-SHA",                   /* TLS_ECDH_anon_WITH_NULL_SHA */
      +    "ECDHE-PSK-NULL-SHA",               /* TLS_ECDHE_PSK_WITH_NULL_SHA */
      +    "ECDHE-PSK-NULL-SHA256",            /* TLS_ECDHE_PSK_WITH_NULL_SHA256 */
      +    "ECDHE-PSK-NULL-SHA384",            /* TLS_ECDHE_PSK_WITH_NULL_SHA384 */
      +    
      +    /* DES/3DES ciphers */
      +    "PSK-3DES-EDE-CBC-SHA",             /* TLS_PSK_WITH_3DES_EDE_CBC_SHA */
      +    "DHE-PSK-3DES-EDE-CBC-SHA",         /* TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA */
      +    "RSA-PSK-3DES-EDE-CBC-SHA",         /* TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA */
      +    "ECDH-ECDSA-DES-CBC3-SHA",          /* TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA */
      +    "ECDHE-ECDSA-DES-CBC3-SHA",         /* TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA */
      +    "ECDH-RSA-DES-CBC3-SHA",            /* TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA */
      +    "ECDHE-RSA-DES-CBC3-SHA",           /* TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA */
      +    "AECDH-DES-CBC3-SHA",               /* TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA */
      +    "SRP-3DES-EDE-CBC-SHA",             /* TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA */
      +    "SRP-RSA-3DES-EDE-CBC-SHA",         /* TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA */
      +    "SRP-DSS-3DES-EDE-CBC-SHA",         /* TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA */
      +    "ECDHE-PSK-3DES-EDE-CBC-SHA",       /* TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA */
      +    "DES-CBC-SHA",                      /* TLS_RSA_WITH_DES_CBC_SHA */
      +    "DES-CBC3-SHA",                     /* TLS_RSA_WITH_3DES_EDE_CBC_SHA */
      +    "DHE-DSS-DES-CBC3-SHA",             /* TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA */
      +    "DHE-RSA-DES-CBC-SHA",              /* TLS_DHE_RSA_WITH_DES_CBC_SHA */
      +    "DHE-RSA-DES-CBC3-SHA",             /* TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA */
      +    "ADH-DES-CBC-SHA",                  /* TLS_DH_anon_WITH_DES_CBC_SHA */
      +    "ADH-DES-CBC3-SHA",                 /* TLS_DH_anon_WITH_3DES_EDE_CBC_SHA */
      +    "EXP-DH-DSS-DES-CBC-SHA",           /* TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA */
      +    "DH-DSS-DES-CBC-SHA",               /* TLS_DH_DSS_WITH_DES_CBC_SHA */
      +    "DH-DSS-DES-CBC3-SHA",              /* TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA */
      +    "EXP-DH-RSA-DES-CBC-SHA",           /* TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA */
      +    "DH-RSA-DES-CBC-SHA",               /* TLS_DH_RSA_WITH_DES_CBC_SHA */
      +    "DH-RSA-DES-CBC3-SHA",              /* TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA */
      +
      +    /* blacklisted EXPORT ciphers */
      +    "EXP-RC4-MD5",                      /* TLS_RSA_EXPORT_WITH_RC4_40_MD5 */
      +    "EXP-RC2-CBC-MD5",                  /* TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 */
      +    "EXP-DES-CBC-SHA",                  /* TLS_RSA_EXPORT_WITH_DES40_CBC_SHA */
      +    "EXP-DHE-DSS-DES-CBC-SHA",          /* TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA */
      +    "EXP-DHE-RSA-DES-CBC-SHA",          /* TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA */
      +    "EXP-ADH-DES-CBC-SHA",              /* TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA */
      +    "EXP-ADH-RC4-MD5",                  /* TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 */
      +
      +    /* blacklisted RC4 encryption */
      +    "RC4-MD5",                          /* TLS_RSA_WITH_RC4_128_MD5 */
      +    "RC4-SHA",                          /* TLS_RSA_WITH_RC4_128_SHA */
      +    "ADH-RC4-MD5",                      /* TLS_DH_anon_WITH_RC4_128_MD5 */
      +    "KRB5-RC4-SHA",                     /* TLS_KRB5_WITH_RC4_128_SHA */
      +    "KRB5-RC4-MD5",                     /* TLS_KRB5_WITH_RC4_128_MD5 */
      +    "EXP-KRB5-RC4-SHA",                 /* TLS_KRB5_EXPORT_WITH_RC4_40_SHA */
      +    "EXP-KRB5-RC4-MD5",                 /* TLS_KRB5_EXPORT_WITH_RC4_40_MD5 */
      +    "PSK-RC4-SHA",                      /* TLS_PSK_WITH_RC4_128_SHA */
      +    "DHE-PSK-RC4-SHA",                  /* TLS_DHE_PSK_WITH_RC4_128_SHA */
      +    "RSA-PSK-RC4-SHA",                  /* TLS_RSA_PSK_WITH_RC4_128_SHA */
      +    "ECDH-ECDSA-RC4-SHA",               /* TLS_ECDH_ECDSA_WITH_RC4_128_SHA */
      +    "ECDHE-ECDSA-RC4-SHA",              /* TLS_ECDHE_ECDSA_WITH_RC4_128_SHA */
      +    "ECDH-RSA-RC4-SHA",                 /* TLS_ECDH_RSA_WITH_RC4_128_SHA */
      +    "ECDHE-RSA-RC4-SHA",                /* TLS_ECDHE_RSA_WITH_RC4_128_SHA */
      +    "AECDH-RC4-SHA",                    /* TLS_ECDH_anon_WITH_RC4_128_SHA */
      +    "ECDHE-PSK-RC4-SHA",                /* TLS_ECDHE_PSK_WITH_RC4_128_SHA */
      +
      +    /* blacklisted AES128 encrpytion ciphers */
      +    "AES128-SHA256",                    /* TLS_RSA_WITH_AES_128_CBC_SHA */
      +    "DH-DSS-AES128-SHA",                /* TLS_DH_DSS_WITH_AES_128_CBC_SHA */
      +    "DH-RSA-AES128-SHA",                /* TLS_DH_RSA_WITH_AES_128_CBC_SHA */
      +    "DHE-DSS-AES128-SHA",               /* TLS_DHE_DSS_WITH_AES_128_CBC_SHA */
      +    "DHE-RSA-AES128-SHA",               /* TLS_DHE_RSA_WITH_AES_128_CBC_SHA */
      +    "ADH-AES128-SHA",                   /* TLS_DH_anon_WITH_AES_128_CBC_SHA */
      +    "AES128-SHA256",                    /* TLS_RSA_WITH_AES_128_CBC_SHA256 */
      +    "DH-DSS-AES128-SHA256",             /* TLS_DH_DSS_WITH_AES_128_CBC_SHA256 */
      +    "DH-RSA-AES128-SHA256",             /* TLS_DH_RSA_WITH_AES_128_CBC_SHA256 */
      +    "DHE-DSS-AES128-SHA256",            /* TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 */
      +    "DHE-RSA-AES128-SHA256",            /* TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 */
      +    "ECDH-ECDSA-AES128-SHA",            /* TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA */
      +    "ECDHE-ECDSA-AES128-SHA",           /* TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA */
      +    "ECDH-RSA-AES128-SHA",              /* TLS_ECDH_RSA_WITH_AES_128_CBC_SHA */
      +    "ECDHE-RSA-AES128-SHA",             /* TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA */
      +    "AECDH-AES128-SHA",                 /* TLS_ECDH_anon_WITH_AES_128_CBC_SHA */
      +    "ECDHE-ECDSA-AES128-SHA256",        /* TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 */
      +    "ECDH-ECDSA-AES128-SHA256",         /* TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 */
      +    "ECDHE-RSA-AES128-SHA256",          /* TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 */
      +    "ECDH-RSA-AES128-SHA256",           /* TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 */
      +    "ADH-AES128-SHA256",                /* TLS_DH_anon_WITH_AES_128_CBC_SHA256 */
      +    "PSK-AES128-CBC-SHA",               /* TLS_PSK_WITH_AES_128_CBC_SHA */
      +    "DHE-PSK-AES128-CBC-SHA",           /* TLS_DHE_PSK_WITH_AES_128_CBC_SHA */
      +    "RSA-PSK-AES128-CBC-SHA",           /* TLS_RSA_PSK_WITH_AES_128_CBC_SHA */
      +    "PSK-AES128-CBC-SHA256",            /* TLS_PSK_WITH_AES_128_CBC_SHA256 */
      +    "DHE-PSK-AES128-CBC-SHA256",        /* TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 */
      +    "RSA-PSK-AES128-CBC-SHA256",        /* TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 */
      +    "ECDHE-PSK-AES128-CBC-SHA",         /* TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA */
      +    "ECDHE-PSK-AES128-CBC-SHA256",      /* TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 */
      +    "AES128-CCM",                       /* TLS_RSA_WITH_AES_128_CCM */
      +    "AES128-CCM8",                      /* TLS_RSA_WITH_AES_128_CCM_8 */
      +    "PSK-AES128-CCM",                   /* TLS_PSK_WITH_AES_128_CCM */
      +    "PSK-AES128-CCM8",                  /* TLS_PSK_WITH_AES_128_CCM_8 */
      +    "AES128-GCM-SHA256",                /* TLS_RSA_WITH_AES_128_GCM_SHA256 */
      +    "DH-RSA-AES128-GCM-SHA256",         /* TLS_DH_RSA_WITH_AES_128_GCM_SHA256 */
      +    "DH-DSS-AES128-GCM-SHA256",         /* TLS_DH_DSS_WITH_AES_128_GCM_SHA256 */
      +    "ADH-AES128-GCM-SHA256",            /* TLS_DH_anon_WITH_AES_128_GCM_SHA256 */
      +    "PSK-AES128-GCM-SHA256",            /* TLS_PSK_WITH_AES_128_GCM_SHA256 */
      +    "RSA-PSK-AES128-GCM-SHA256",        /* TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 */
      +    "ECDH-ECDSA-AES128-GCM-SHA256",     /* TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 */
      +    "ECDH-RSA-AES128-GCM-SHA256",       /* TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 */
      +    "SRP-AES-128-CBC-SHA",              /* TLS_SRP_SHA_WITH_AES_128_CBC_SHA */
      +    "SRP-RSA-AES-128-CBC-SHA",          /* TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA */
      +    "SRP-DSS-AES-128-CBC-SHA",          /* TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA */
      +    
      +    /* blacklisted AES256 encrpytion ciphers */
      +    "AES256-SHA",                       /* TLS_RSA_WITH_AES_256_CBC_SHA */
      +    "DH-DSS-AES256-SHA",                /* TLS_DH_DSS_WITH_AES_256_CBC_SHA */
      +    "DH-RSA-AES256-SHA",                /* TLS_DH_RSA_WITH_AES_256_CBC_SHA */
      +    "DHE-DSS-AES256-SHA",               /* TLS_DHE_DSS_WITH_AES_256_CBC_SHA */
      +    "DHE-RSA-AES256-SHA",               /* TLS_DHE_RSA_WITH_AES_256_CBC_SHA */
      +    "ADH-AES256-SHA",                   /* TLS_DH_anon_WITH_AES_256_CBC_SHA */
      +    "AES256-SHA256",                    /* TLS_RSA_WITH_AES_256_CBC_SHA256 */
      +    "DH-DSS-AES256-SHA256",             /* TLS_DH_DSS_WITH_AES_256_CBC_SHA256 */
      +    "DH-RSA-AES256-SHA256",             /* TLS_DH_RSA_WITH_AES_256_CBC_SHA256 */
      +    "DHE-DSS-AES256-SHA256",            /* TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 */
      +    "DHE-RSA-AES256-SHA256",            /* TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 */
      +    "ADH-AES256-SHA256",                /* TLS_DH_anon_WITH_AES_256_CBC_SHA256 */
      +    "ECDH-ECDSA-AES256-SHA",            /* TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA */
      +    "ECDHE-ECDSA-AES256-SHA",           /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA */
      +    "ECDH-RSA-AES256-SHA",              /* TLS_ECDH_RSA_WITH_AES_256_CBC_SHA */
      +    "ECDHE-RSA-AES256-SHA",             /* TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA */
      +    "AECDH-AES256-SHA",                 /* TLS_ECDH_anon_WITH_AES_256_CBC_SHA */
      +    "ECDHE-ECDSA-AES256-SHA384",        /* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 */
      +    "ECDH-ECDSA-AES256-SHA384",         /* TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 */
      +    "ECDHE-RSA-AES256-SHA384",          /* TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 */
      +    "ECDH-RSA-AES256-SHA384",           /* TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 */
      +    "PSK-AES256-CBC-SHA",               /* TLS_PSK_WITH_AES_256_CBC_SHA */
      +    "DHE-PSK-AES256-CBC-SHA",           /* TLS_DHE_PSK_WITH_AES_256_CBC_SHA */
      +    "RSA-PSK-AES256-CBC-SHA",           /* TLS_RSA_PSK_WITH_AES_256_CBC_SHA */
      +    "PSK-AES256-CBC-SHA384",            /* TLS_PSK_WITH_AES_256_CBC_SHA384 */
      +    "DHE-PSK-AES256-CBC-SHA384",        /* TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 */
      +    "RSA-PSK-AES256-CBC-SHA384",        /* TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 */
      +    "ECDHE-PSK-AES256-CBC-SHA",         /* TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA */
      +    "ECDHE-PSK-AES256-CBC-SHA384",      /* TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 */
      +    "SRP-AES-256-CBC-SHA",              /* TLS_SRP_SHA_WITH_AES_256_CBC_SHA */
      +    "SRP-RSA-AES-256-CBC-SHA",          /* TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA */
      +    "SRP-DSS-AES-256-CBC-SHA",          /* TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA */
      +    "AES256-CCM",                       /* TLS_RSA_WITH_AES_256_CCM */
      +    "AES256-CCM8",                      /* TLS_RSA_WITH_AES_256_CCM_8 */
      +    "PSK-AES256-CCM",                   /* TLS_PSK_WITH_AES_256_CCM */
      +    "PSK-AES256-CCM8",                  /* TLS_PSK_WITH_AES_256_CCM_8 */
      +    "AES256-GCM-SHA384",                /* TLS_RSA_WITH_AES_256_GCM_SHA384 */
      +    "DH-RSA-AES256-GCM-SHA384",         /* TLS_DH_RSA_WITH_AES_256_GCM_SHA384 */
      +    "DH-DSS-AES256-GCM-SHA384",         /* TLS_DH_DSS_WITH_AES_256_GCM_SHA384 */
      +    "ADH-AES256-GCM-SHA384",            /* TLS_DH_anon_WITH_AES_256_GCM_SHA384 */
      +    "PSK-AES256-GCM-SHA384",            /* TLS_PSK_WITH_AES_256_GCM_SHA384 */
      +    "RSA-PSK-AES256-GCM-SHA384",        /* TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 */
      +    "ECDH-ECDSA-AES256-GCM-SHA384",     /* TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 */
      +    "ECDH-RSA-AES256-GCM-SHA384",       /* TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 */
      +    
      +    /* blacklisted CAMELLIA128 encrpytion ciphers */
      +    "CAMELLIA128-SHA",                  /* TLS_RSA_WITH_CAMELLIA_128_CBC_SHA */
      +    "DH-DSS-CAMELLIA128-SHA",           /* TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA */
      +    "DH-RSA-CAMELLIA128-SHA",           /* TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA */
      +    "DHE-DSS-CAMELLIA128-SHA",          /* TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA */
      +    "DHE-RSA-CAMELLIA128-SHA",          /* TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA */
      +    "ADH-CAMELLIA128-SHA",              /* TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA */
      +    "ECDHE-ECDSA-CAMELLIA128-SHA256",   /* TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "ECDH-ECDSA-CAMELLIA128-SHA256",    /* TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "ECDHE-RSA-CAMELLIA128-SHA256",     /* TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "ECDH-RSA-CAMELLIA128-SHA256",      /* TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "PSK-CAMELLIA128-SHA256",           /* TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "DHE-PSK-CAMELLIA128-SHA256",       /* TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "RSA-PSK-CAMELLIA128-SHA256",       /* TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "ECDHE-PSK-CAMELLIA128-SHA256",     /* TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "CAMELLIA128-GCM-SHA256",           /* TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "DH-RSA-CAMELLIA128-GCM-SHA256",    /* TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "DH-DSS-CAMELLIA128-GCM-SHA256",    /* TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "ADH-CAMELLIA128-GCM-SHA256",       /* TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "ECDH-ECDSA-CAMELLIA128-GCM-SHA256",/* TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "ECDH-RSA-CAMELLIA128-GCM-SHA256",  /* TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "PSK-CAMELLIA128-GCM-SHA256",       /* TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "RSA-PSK-CAMELLIA128-GCM-SHA256",   /* TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 */
      +    "CAMELLIA128-SHA256",               /* TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "DH-DSS-CAMELLIA128-SHA256",        /* TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "DH-RSA-CAMELLIA128-SHA256",        /* TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "DHE-DSS-CAMELLIA128-SHA256",       /* TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "DHE-RSA-CAMELLIA128-SHA256",       /* TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 */
      +    "ADH-CAMELLIA128-SHA256",           /* TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 */
      +    
      +    /* blacklisted CAMELLIA256 encrpytion ciphers */
      +    "CAMELLIA256-SHA",                  /* TLS_RSA_WITH_CAMELLIA_256_CBC_SHA */
      +    "DH-RSA-CAMELLIA256-SHA",           /* TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA */
      +    "DH-DSS-CAMELLIA256-SHA",           /* TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA */
      +    "DHE-DSS-CAMELLIA256-SHA",          /* TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA */
      +    "DHE-RSA-CAMELLIA256-SHA",          /* TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA */
      +    "ADH-CAMELLIA256-SHA",              /* TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA */
      +    "ECDHE-ECDSA-CAMELLIA256-SHA384",   /* TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "ECDH-ECDSA-CAMELLIA256-SHA384",    /* TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "ECDHE-RSA-CAMELLIA256-SHA384",     /* TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "ECDH-RSA-CAMELLIA256-SHA384",      /* TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "PSK-CAMELLIA256-SHA384",           /* TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "DHE-PSK-CAMELLIA256-SHA384",       /* TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "RSA-PSK-CAMELLIA256-SHA384",       /* TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "ECDHE-PSK-CAMELLIA256-SHA384",     /* TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 */
      +    "CAMELLIA256-SHA256",               /* TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "DH-DSS-CAMELLIA256-SHA256",        /* TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "DH-RSA-CAMELLIA256-SHA256",        /* TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "DHE-DSS-CAMELLIA256-SHA256",       /* TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "DHE-RSA-CAMELLIA256-SHA256",       /* TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "ADH-CAMELLIA256-SHA256",           /* TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 */
      +    "CAMELLIA256-GCM-SHA384",           /* TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "DH-RSA-CAMELLIA256-GCM-SHA384",    /* TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "DH-DSS-CAMELLIA256-GCM-SHA384",    /* TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "ADH-CAMELLIA256-GCM-SHA384",       /* TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "ECDH-ECDSA-CAMELLIA256-GCM-SHA384",/* TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "ECDH-RSA-CAMELLIA256-GCM-SHA384",  /* TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "PSK-CAMELLIA256-GCM-SHA384",       /* TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 */
      +    "RSA-PSK-CAMELLIA256-GCM-SHA384",   /* TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 */
      +    
      +    /* The blacklisted ARIA encrpytion ciphers */
      +    "ARIA128-SHA256",                   /* TLS_RSA_WITH_ARIA_128_CBC_SHA256 */
      +    "ARIA256-SHA384",                   /* TLS_RSA_WITH_ARIA_256_CBC_SHA384 */
      +    "DH-DSS-ARIA128-SHA256",            /* TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 */
      +    "DH-DSS-ARIA256-SHA384",            /* TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 */
      +    "DH-RSA-ARIA128-SHA256",            /* TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 */
      +    "DH-RSA-ARIA256-SHA384",            /* TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 */
      +    "DHE-DSS-ARIA128-SHA256",           /* TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 */
      +    "DHE-DSS-ARIA256-SHA384",           /* TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 */
      +    "DHE-RSA-ARIA128-SHA256",           /* TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 */
      +    "DHE-RSA-ARIA256-SHA384",           /* TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 */
      +    "ADH-ARIA128-SHA256",               /* TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 */
      +    "ADH-ARIA256-SHA384",               /* TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 */
      +    "ECDHE-ECDSA-ARIA128-SHA256",       /* TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 */
      +    "ECDHE-ECDSA-ARIA256-SHA384",       /* TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 */
      +    "ECDH-ECDSA-ARIA128-SHA256",        /* TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 */
      +    "ECDH-ECDSA-ARIA256-SHA384",        /* TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 */
      +    "ECDHE-RSA-ARIA128-SHA256",         /* TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 */
      +    "ECDHE-RSA-ARIA256-SHA384",         /* TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 */
      +    "ECDH-RSA-ARIA128-SHA256",          /* TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 */
      +    "ECDH-RSA-ARIA256-SHA384",          /* TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 */
      +    "ARIA128-GCM-SHA256",               /* TLS_RSA_WITH_ARIA_128_GCM_SHA256 */
      +    "ARIA256-GCM-SHA384",               /* TLS_RSA_WITH_ARIA_256_GCM_SHA384 */
      +    "DH-DSS-ARIA128-GCM-SHA256",        /* TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 */
      +    "DH-DSS-ARIA256-GCM-SHA384",        /* TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 */
      +    "DH-RSA-ARIA128-GCM-SHA256",        /* TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 */
      +    "DH-RSA-ARIA256-GCM-SHA384",        /* TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 */
      +    "ADH-ARIA128-GCM-SHA256",           /* TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 */
      +    "ADH-ARIA256-GCM-SHA384",           /* TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 */
      +    "ECDH-ECDSA-ARIA128-GCM-SHA256",    /* TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 */
      +    "ECDH-ECDSA-ARIA256-GCM-SHA384",    /* TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 */
      +    "ECDH-RSA-ARIA128-GCM-SHA256",      /* TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 */
      +    "ECDH-RSA-ARIA256-GCM-SHA384",      /* TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 */
      +    "PSK-ARIA128-SHA256",               /* TLS_PSK_WITH_ARIA_128_CBC_SHA256 */
      +    "PSK-ARIA256-SHA384",               /* TLS_PSK_WITH_ARIA_256_CBC_SHA384 */
      +    "DHE-PSK-ARIA128-SHA256",           /* TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 */
      +    "DHE-PSK-ARIA256-SHA384",           /* TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 */
      +    "RSA-PSK-ARIA128-SHA256",           /* TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 */
      +    "RSA-PSK-ARIA256-SHA384",           /* TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 */
      +    "ARIA128-GCM-SHA256",               /* TLS_PSK_WITH_ARIA_128_GCM_SHA256 */
      +    "ARIA256-GCM-SHA384",               /* TLS_PSK_WITH_ARIA_256_GCM_SHA384 */
      +    "RSA-PSK-ARIA128-GCM-SHA256",       /* TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 */
      +    "RSA-PSK-ARIA256-GCM-SHA384",       /* TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 */
      +    "ECDHE-PSK-ARIA128-SHA256",         /* TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 */
      +    "ECDHE-PSK-ARIA256-SHA384",         /* TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 */
      +
      +    /* blacklisted SEED encryptions */
      +    "SEED-SHA",                         /*TLS_RSA_WITH_SEED_CBC_SHA */
      +    "DH-DSS-SEED-SHA",                  /* TLS_DH_DSS_WITH_SEED_CBC_SHA */
      +    "DH-RSA-SEED-SHA",                  /* TLS_DH_RSA_WITH_SEED_CBC_SHA */
      +    "DHE-DSS-SEED-SHA",                 /* TLS_DHE_DSS_WITH_SEED_CBC_SHA */
      +    "DHE-RSA-SEED-SHA",                 /* TLS_DHE_RSA_WITH_SEED_CBC_SHA */               
      +    "ADH-SEED-SHA",                     /* TLS_DH_anon_WITH_SEED_CBC_SHA */
      +
      +    /* blacklisted KRB5 ciphers */
      +    "KRB5-DES-CBC-SHA",                 /* TLS_KRB5_WITH_DES_CBC_SHA */
      +    "KRB5-DES-CBC3-SHA",                /* TLS_KRB5_WITH_3DES_EDE_CBC_SHA */
      +    "KRB5-IDEA-CBC-SHA",                /* TLS_KRB5_WITH_IDEA_CBC_SHA */
      +    "KRB5-DES-CBC-MD5",                 /* TLS_KRB5_WITH_DES_CBC_MD5 */
      +    "KRB5-DES-CBC3-MD5",                /* TLS_KRB5_WITH_3DES_EDE_CBC_MD5 */
      +    "KRB5-IDEA-CBC-MD5",                /* TLS_KRB5_WITH_IDEA_CBC_MD5 */
      +    "EXP-KRB5-DES-CBC-SHA",             /* TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA */
      +    "EXP-KRB5-DES-CBC-MD5",             /* TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 */
      +    "EXP-KRB5-RC2-CBC-SHA",             /* TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA */
      +    "EXP-KRB5-RC2-CBC-MD5",             /* TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 */
      +  
      +    /* blacklisted exoticas */
      +    "DHE-DSS-CBC-SHA",                  /* TLS_DHE_DSS_WITH_DES_CBC_SHA */
      +    "IDEA-CBC-SHA",                     /* TLS_RSA_WITH_IDEA_CBC_SHA */
      +    
      +    /* not really sure if the following names are correct */
      +    "SSL3_CK_SCSV",                     /* TLS_EMPTY_RENEGOTIATION_INFO_SCSV */
      +    "SSL3_CK_FALLBACK_SCSV"
      +};
      +static size_t RFC7540_names_LEN = sizeof(RFC7540_names)/sizeof(RFC7540_names[0]);
      +
      +
      +static apr_hash_t *BLCNames;
      +
      +static void cipher_init(apr_pool_t *pool)
      +{
      +    apr_hash_t *hash = apr_hash_make(pool);
      +    const char *source;
      +    unsigned int i;
      +    
      +    source = "rfc7540";
      +    for (i = 0; i < RFC7540_names_LEN; ++i) {
      +        apr_hash_set(hash, RFC7540_names[i], APR_HASH_KEY_STRING, source);
      +    }
      +    
      +    BLCNames = hash;
      +}
      +
      +static int cipher_is_blacklisted(const char *cipher, const char **psource)
      +{   
      +    *psource = apr_hash_get(BLCNames, cipher, APR_HASH_KEY_STRING);
      +    return !!*psource;
      +}
      +
      +/*******************************************************************************
      + * Hooks for processing incoming connections:
      + * - process_conn take over connection in case of h2
      + */
      +static int h2_h2_process_conn(conn_rec* c);
      +static int h2_h2_pre_close_conn(conn_rec* c);
      +static int h2_h2_post_read_req(request_rec *r);
      +static int h2_h2_late_fixups(request_rec *r);
      +
      +/*******************************************************************************
      + * Once per lifetime init, retrieve optional functions
      + */
      +apr_status_t h2_h2_init(apr_pool_t *pool, server_rec *s)
      +{
      +    (void)pool;
      +    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s, "h2_h2, child_init");
      +    opt_ssl_engine_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
      +    opt_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
      +    opt_ssl_var_lookup = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
      +    
      +    if (!opt_ssl_is_https || !opt_ssl_var_lookup) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +                     APLOGNO(02951) "mod_ssl does not seem to be enabled");
      +    }
      +    
      +    cipher_init(pool);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +int h2_h2_is_tls(conn_rec *c)
      +{
      +    return opt_ssl_is_https && opt_ssl_is_https(c);
      +}
      +
      +int h2_is_acceptable_connection(conn_rec *c, int require_all) 
      +{
      +    int is_tls = h2_h2_is_tls(c);
      +    const h2_config *cfg = h2_config_get(c);
      +
      +    if (is_tls && h2_config_geti(cfg, H2_CONF_MODERN_TLS_ONLY) > 0) {
      +        /* Check TLS connection for modern TLS parameters, as defined in
      +         * RFC 7540 and https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility
      +         */
      +        apr_pool_t *pool = c->pool;
      +        server_rec *s = c->base_server;
      +        char *val;
      +        
      +        if (!opt_ssl_var_lookup) {
      +            /* unable to check */
      +            return 0;
      +        }
      +        
      +        /* Need Tlsv1.2 or higher, rfc 7540, ch. 9.2
      +         */
      +        val = opt_ssl_var_lookup(pool, s, c, NULL, (char*)"SSL_PROTOCOL");
      +        if (val && *val) {
      +            if (strncmp("TLS", val, 3) 
      +                || !strcmp("TLSv1", val) 
      +                || !strcmp("TLSv1.1", val)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03050)
      +                              "h2_h2(%ld): tls protocol not suitable: %s", 
      +                              (long)c->id, val);
      +                return 0;
      +            }
      +        }
      +        else if (require_all) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03051)
      +                          "h2_h2(%ld): tls protocol is indetermined", (long)c->id);
      +            return 0;
      +        }
      +
      +        /* Check TLS cipher blacklist
      +         */
      +        val = opt_ssl_var_lookup(pool, s, c, NULL, (char*)"SSL_CIPHER");
      +        if (val && *val) {
      +            const char *source;
      +            if (cipher_is_blacklisted(val, &source)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03052)
      +                              "h2_h2(%ld): tls cipher %s blacklisted by %s", 
      +                              (long)c->id, val, source);
      +                return 0;
      +            }
      +        }
      +        else if (require_all) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03053)
      +                          "h2_h2(%ld): tls cipher is indetermined", (long)c->id);
      +            return 0;
      +        }
      +    }
      +    return 1;
      +}
      +
      +int h2_allows_h2_direct(conn_rec *c)
      +{
      +    const h2_config *cfg = h2_config_get(c);
      +    int is_tls = h2_h2_is_tls(c);
      +    const char *needed_protocol = is_tls? "h2" : "h2c";
      +    int h2_direct = h2_config_geti(cfg, H2_CONF_DIRECT);
      +    
      +    if (h2_direct < 0) {
      +        h2_direct = is_tls? 0 : 1;
      +    }
      +    return (h2_direct 
      +            && ap_is_allowed_protocol(c, NULL, NULL, needed_protocol));
      +}
      +
      +int h2_allows_h2_upgrade(conn_rec *c)
      +{
      +    const h2_config *cfg = h2_config_get(c);
      +    int h2_upgrade = h2_config_geti(cfg, H2_CONF_UPGRADE);
      +    
      +    return h2_upgrade > 0 || (h2_upgrade < 0 && !h2_h2_is_tls(c));
      +}
      +
      +/*******************************************************************************
      + * Register various hooks
      + */
      +static const char* const mod_ssl[]        = { "mod_ssl.c", NULL};
      +static const char* const mod_reqtimeout[] = { "mod_reqtimeout.c", NULL};
      +
      +void h2_h2_register_hooks(void)
      +{
      +    /* Our main processing needs to run quite late. Definitely after mod_ssl,
      +     * as we need its connection filters, but also before reqtimeout as its
      +     * method of timeouts is specific to HTTP/1.1 (as of now).
      +     * The core HTTP/1 processing run as REALLY_LAST, so we will have
      +     * a chance to take over before it.
      +     */
      +    ap_hook_process_connection(h2_h2_process_conn, 
      +                               mod_ssl, mod_reqtimeout, APR_HOOK_LAST);
      +    
      +    /* One last chance to properly say goodbye if we have not done so
      +     * already. */
      +    ap_hook_pre_close_connection(h2_h2_pre_close_conn, NULL, mod_ssl, APR_HOOK_LAST);
      +
      +    /* With "H2SerializeHeaders On", we install the filter in this hook
      +     * that parses the response. This needs to happen before any other post
      +     * read function terminates the request with an error. Otherwise we will
      +     * never see the response.
      +     */
      +    ap_hook_post_read_request(h2_h2_post_read_req, NULL, NULL, APR_HOOK_REALLY_FIRST);
      +    ap_hook_fixups(h2_h2_late_fixups, NULL, NULL, APR_HOOK_LAST);
      +
      +    /* special bucket type transfer through a h2_bucket_beam */
      +    h2_register_bucket_beamer(h2_bucket_headers_beam);
      +    h2_register_bucket_beamer(h2_bucket_observer_beam);
      +}
      +
      +int h2_h2_process_conn(conn_rec* c)
      +{
      +    apr_status_t status;
      +    h2_ctx *ctx;
      +    
      +    if (c->master) {
      +        return DECLINED;
      +    }
      +    
      +    ctx = h2_ctx_get(c, 0);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, "h2_h2, process_conn");
      +    if (h2_ctx_is_task(ctx)) {
      +        /* our stream pseudo connection */
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c, "h2_h2, task, declined");
      +        return DECLINED;
      +    }
      +    
      +    if (!ctx && c->keepalives == 0) {
      +        const char *proto = ap_get_protocol(c);
      +        
      +        if (APLOGctrace1(c)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, "h2_h2, process_conn, "
      +                          "new connection using protocol '%s', direct=%d, "
      +                          "tls acceptable=%d", proto, h2_allows_h2_direct(c), 
      +                          h2_is_acceptable_connection(c, 1));
      +        }
      +        
      +        if (!strcmp(AP_PROTOCOL_HTTP1, proto)
      +            && h2_allows_h2_direct(c) 
      +            && h2_is_acceptable_connection(c, 1)) {
      +            /* Fresh connection still is on http/1.1 and H2Direct is enabled. 
      +             * Otherwise connection is in a fully acceptable state.
      +             * -> peek at the first 24 incoming bytes
      +             */
      +            apr_bucket_brigade *temp;
      +            char *s = NULL;
      +            apr_size_t slen;
      +            
      +            temp = apr_brigade_create(c->pool, c->bucket_alloc);
      +            status = ap_get_brigade(c->input_filters, temp,
      +                                    AP_MODE_SPECULATIVE, APR_BLOCK_READ, 24);
      +            
      +            if (status != APR_SUCCESS) {
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03054)
      +                              "h2_h2, error reading 24 bytes speculative");
      +                apr_brigade_destroy(temp);
      +                return DECLINED;
      +            }
      +            
      +            apr_brigade_pflatten(temp, &s, &slen, c->pool);
      +            if ((slen >= 24) && !memcmp(H2_MAGIC_TOKEN, s, 24)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                              "h2_h2, direct mode detected");
      +                if (!ctx) {
      +                    ctx = h2_ctx_get(c, 1);
      +                }
      +                h2_ctx_protocol_set(ctx, h2_h2_is_tls(c)? "h2" : "h2c");
      +            }
      +            else {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c,
      +                              "h2_h2, not detected in %d bytes: %s", 
      +                              (int)slen, s);
      +            }
      +            
      +            apr_brigade_destroy(temp);
      +        }
      +    }
      +
      +    if (ctx) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, "process_conn");
      +        if (!h2_ctx_session_get(ctx)) {
      +            status = h2_conn_setup(ctx, c, NULL);
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, c, "conn_setup");
      +            if (status != APR_SUCCESS) {
      +                return status;
      +            }
      +        }
      +        return h2_conn_run(ctx, c);
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, "h2_h2, declined");
      +    return DECLINED;
      +}
      +
      +static int h2_h2_pre_close_conn(conn_rec *c)
      +{
      +    h2_ctx *ctx;
      +
      +    /* slave connection? */
      +    if (c->master) {
      +        return DECLINED;
      +    }
      +
      +    ctx = h2_ctx_get(c, 0);
      +    if (ctx) {
      +        /* If the session has been closed correctly already, we will not
      +         * fiond a h2_ctx here. The presence indicates that the session
      +         * is still ongoing. */
      +        return h2_conn_pre_close(ctx, c);
      +    }
      +    return DECLINED;
      +}
      +
      +static void check_push(request_rec *r, const char *tag)
      +{
      +    const h2_config *conf = h2_config_rget(r);
      +    if (!r->expecting_100 
      +        && conf && conf->push_list && conf->push_list->nelts > 0) {
      +        int i, old_status;
      +        const char *old_line;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, 
      +                      "%s, early announcing %d resources for push",
      +                      tag, conf->push_list->nelts);
      +        for (i = 0; i < conf->push_list->nelts; ++i) {
      +            h2_push_res *push = &APR_ARRAY_IDX(conf->push_list, i, h2_push_res);
      +            apr_table_addn(r->headers_out, "Link", 
      +                           apr_psprintf(r->pool, "<%s>; rel=preload%s", 
      +                                        push->uri_ref, push->critical? "; critical" : ""));
      +        }
      +        old_status = r->status;
      +        old_line = r->status_line;
      +        r->status = 103;
      +        r->status_line = "103 Early Hints";
      +        ap_send_interim_response(r, 1);
      +        r->status = old_status;
      +        r->status_line = old_line;
      +    }
      +}
      +
      +static int h2_h2_post_read_req(request_rec *r)
      +{
      +    /* slave connection? */
      +    if (r->connection->master) {
      +        h2_ctx *ctx = h2_ctx_rget(r);
      +        struct h2_task *task = h2_ctx_get_task(ctx);
      +        /* This hook will get called twice on internal redirects. Take care
      +         * that we manipulate filters only once. */
      +        if (task && !task->filters_set) {
      +            ap_filter_t *f;
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, 
      +                          "h2_task(%s): adding request filters", task->id);
      +
      +            /* setup the correct filters to process the request for h2 */
      +            ap_add_input_filter("H2_REQUEST", task, r, r->connection);
      +            
      +            /* replace the core http filter that formats response headers
      +             * in HTTP/1 with our own that collects status and headers */
      +            ap_remove_output_filter_byhandle(r->output_filters, "HTTP_HEADER");
      +            ap_add_output_filter("H2_RESPONSE", task, r, r->connection);
      +            
      +            for (f = r->input_filters; f; f = f->next) {
      +                if (!strcmp("H2_SLAVE_IN", f->frec->name)) {
      +                    f->r = r;
      +                    break;
      +                }
      +            }
      +            ap_add_output_filter("H2_TRAILERS_OUT", task, r, r->connection);
      +            task->filters_set = 1;
      +        }
      +    }
      +    return DECLINED;
      +}
      +
      +static int h2_h2_late_fixups(request_rec *r)
      +{
      +    /* slave connection? */
      +    if (r->connection->master) {
      +        h2_ctx *ctx = h2_ctx_rget(r);
      +        struct h2_task *task = h2_ctx_get_task(ctx);
      +        if (task) {
      +            /* check if we copy vs. setaside files in this location */
      +            task->output.copy_files = h2_config_geti(h2_config_rget(r), 
      +                                                     H2_CONF_COPY_FILES);
      +            if (task->output.copy_files) {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                              "h2_slave_out(%s): copy_files on", task->id);
      +                h2_beam_on_file_beam(task->output.beam, h2_beam_no_files, NULL);
      +            }
      +            check_push(r, "late_fixup");
      +        }
      +    }
      +    return DECLINED;
      +}
      +
      diff --git a/modules/http2/h2_h2.h b/modules/http2/h2_h2.h
      new file mode 100644
      index 00000000000..fad129abb30
      --- /dev/null
      +++ b/modules/http2/h2_h2.h
      @@ -0,0 +1,78 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_h2__
      +#define __mod_h2__h2_h2__
      +
      +/**
      + * List of ALPN protocol identifiers that we support in cleartext
      + * negotiations. NULL terminated.
      + */
      +extern const char *h2_clear_protos[];
      +
      +/**
      + * List of ALPN protocol identifiers that we support in TLS encrypted 
      + * negotiations. NULL terminated.
      + */
      +extern const char *h2_tls_protos[];
      +
      +/**
      + * Provide a user readable description of the HTTP/2 error code-
      + * @param h2_error http/2 error code, as in rfc 7540, ch. 7
      + * @return textual description of code or that it is unknown.
      + */
      +const char *h2_h2_err_description(unsigned int h2_error);
      +
      +/*
      + * One time, post config initialization.
      + */
      +apr_status_t h2_h2_init(apr_pool_t *pool, server_rec *s);
      +
      +/* Is the connection a TLS connection?
      + */
      +int h2_h2_is_tls(conn_rec *c);
      +
      +/* Register apache hooks for h2 protocol
      + */
      +void h2_h2_register_hooks(void);
      +
      +/**
      + * Check if the given connection fulfills the requirements as configured.
      + * @param c the connection
      + * @param require_all != 0 iff any missing connection properties make
      + *    the test fail. For example, a cipher might not have been selected while
      + *    the handshake is still ongoing.
      + * @return != 0 iff connection requirements are met
      + */
      +int h2_is_acceptable_connection(conn_rec *c, int require_all);
      +
      +/**
      + * Check if the "direct" HTTP/2 mode of protocol handling is enabled
      + * for the given connection.
      + * @param c the connection to check
      + * @return != 0 iff direct mode is enabled
      + */
      +int h2_allows_h2_direct(conn_rec *c);
      +
      +/**
      + * Check if the "Upgrade" HTTP/1.1 mode of protocol switching is enabled
      + * for the given connection.
      + * @param c the connection to check
      + * @return != 0 iff Upgrade switching is enabled
      + */
      +int h2_allows_h2_upgrade(conn_rec *c);
      +
      +
      +#endif /* defined(__mod_h2__h2_h2__) */
      diff --git a/modules/http2/h2_headers.c b/modules/http2/h2_headers.c
      new file mode 100644
      index 00000000000..8add79f507d
      --- /dev/null
      +++ b/modules/http2/h2_headers.c
      @@ -0,0 +1,161 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stdio.h>
      +
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +#include <util_time.h>
      +
      +#include <nghttp2/nghttp2.h>
      +
      +#include "h2_private.h"
      +#include "h2_h2.h"
      +#include "h2_util.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +
      +
      +typedef struct {
      +    apr_bucket_refcount refcount;
      +    h2_headers *headers;
      +} h2_bucket_headers;
      + 
      +static apr_status_t bucket_read(apr_bucket *b, const char **str,
      +                                apr_size_t *len, apr_read_type_e block)
      +{
      +    (void)b;
      +    (void)block;
      +    *str = NULL;
      +    *len = 0;
      +    return APR_SUCCESS;
      +}
      +
      +apr_bucket * h2_bucket_headers_make(apr_bucket *b, h2_headers *r)
      +{
      +    h2_bucket_headers *br;
      +
      +    br = apr_bucket_alloc(sizeof(*br), b->list);
      +    br->headers = r;
      +
      +    b = apr_bucket_shared_make(b, br, 0, 0);
      +    b->type = &h2_bucket_type_headers;
      +    
      +    return b;
      +} 
      +
      +apr_bucket * h2_bucket_headers_create(apr_bucket_alloc_t *list, 
      +                                       h2_headers *r)
      +{
      +    apr_bucket *b = apr_bucket_alloc(sizeof(*b), list);
      +
      +    APR_BUCKET_INIT(b);
      +    b->free = apr_bucket_free;
      +    b->list = list;
      +    b = h2_bucket_headers_make(b, r);
      +    return b;
      +}
      +                                       
      +h2_headers *h2_bucket_headers_get(apr_bucket *b)
      +{
      +    if (H2_BUCKET_IS_HEADERS(b)) {
      +        return ((h2_bucket_headers *)b->data)->headers;
      +    }
      +    return NULL;
      +}
      +
      +const apr_bucket_type_t h2_bucket_type_headers = {
      +    "H2HEADERS", 5, APR_BUCKET_METADATA,
      +    apr_bucket_destroy_noop,
      +    bucket_read,
      +    apr_bucket_setaside_noop,
      +    apr_bucket_split_notimpl,
      +    apr_bucket_shared_copy
      +};
      +
      +apr_bucket *h2_bucket_headers_beam(struct h2_bucket_beam *beam,
      +                                    apr_bucket_brigade *dest,
      +                                    const apr_bucket *src)
      +{
      +    if (H2_BUCKET_IS_HEADERS(src)) {
      +        h2_headers *r = ((h2_bucket_headers *)src->data)->headers;
      +        apr_bucket *b = h2_bucket_headers_create(dest->bucket_alloc, r);
      +        APR_BRIGADE_INSERT_TAIL(dest, b);
      +        return b;
      +    }
      +    return NULL;
      +}
      +
      +
      +h2_headers *h2_headers_create(int status, apr_table_t *headers_in, 
      +                                apr_table_t *notes, apr_pool_t *pool)
      +{
      +    h2_headers *headers = apr_pcalloc(pool, sizeof(h2_headers));
      +    headers->status    = status;
      +    headers->headers   = (headers_in? apr_table_copy(pool, headers_in)
      +                           : apr_table_make(pool, 5));
      +    headers->notes     = (notes? apr_table_copy(pool, notes)
      +                           : apr_table_make(pool, 5));
      +    return headers;
      +}
      +
      +h2_headers *h2_headers_rcreate(request_rec *r, int status,
      +                                 apr_table_t *header, apr_pool_t *pool)
      +{
      +    h2_headers *headers = h2_headers_create(status, header, r->notes, pool);
      +    if (headers->status == HTTP_FORBIDDEN) {
      +        const char *cause = apr_table_get(r->notes, "ssl-renegotiate-forbidden");
      +        if (cause) {
      +            /* This request triggered a TLS renegotiation that is now allowed 
      +             * in HTTP/2. Tell the client that it should use HTTP/1.1 for this.
      +             */
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, headers->status, r,
      +                          APLOGNO(03061) 
      +                          "h2_headers(%ld): renegotiate forbidden, cause: %s",
      +                          (long)r->connection->id, cause);
      +            headers->status = H2_ERR_HTTP_1_1_REQUIRED;
      +        }
      +    }
      +    return headers;
      +}
      +
      +h2_headers *h2_headers_die(apr_status_t type,
      +                             const h2_request *req, apr_pool_t *pool)
      +{
      +    h2_headers *headers;
      +    char *date;
      +    
      +    headers = apr_pcalloc(pool, sizeof(h2_headers));
      +    headers->status    = (type >= 200 && type < 600)? type : 500;
      +    headers->headers        = apr_table_make(pool, 5);
      +    headers->notes          = apr_table_make(pool, 5);
      +
      +    date = apr_palloc(pool, APR_RFC822_DATE_LEN);
      +    ap_recent_rfc822_date(date, req? req->request_time : apr_time_now());
      +    apr_table_setn(headers->headers, "Date", date);
      +    apr_table_setn(headers->headers, "Server", ap_get_server_banner());
      +    
      +    return headers;
      +}
      +
      +int h2_headers_are_response(h2_headers *headers)
      +{
      +    return headers->status >= 200;
      +}
      +
      diff --git a/modules/http2/h2_headers.h b/modules/http2/h2_headers.h
      new file mode 100644
      index 00000000000..412e93fae25
      --- /dev/null
      +++ b/modules/http2/h2_headers.h
      @@ -0,0 +1,70 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_headers__
      +#define __mod_h2__h2_headers__
      +
      +#include "h2.h"
      +
      +struct h2_bucket_beam;
      +
      +extern const apr_bucket_type_t h2_bucket_type_headers;
      +
      +#define H2_BUCKET_IS_HEADERS(e)     (e->type == &h2_bucket_type_headers)
      +
      +apr_bucket * h2_bucket_headers_make(apr_bucket *b, h2_headers *r); 
      +
      +apr_bucket * h2_bucket_headers_create(apr_bucket_alloc_t *list, 
      +                                       h2_headers *r);
      +                                       
      +h2_headers *h2_bucket_headers_get(apr_bucket *b);
      +
      +apr_bucket *h2_bucket_headers_beam(struct h2_bucket_beam *beam,
      +                                    apr_bucket_brigade *dest,
      +                                    const apr_bucket *src);
      +
      +/**
      + * Create the headers from the given status and headers
      + * @param status the headers status
      + * @param header the headers of the headers
      + * @param notes  the notes carried by the headers
      + * @param pool the memory pool to use
      + */
      +h2_headers *h2_headers_create(int status, apr_table_t *header, 
      +                              apr_table_t *notes, apr_pool_t *pool);
      +
      +/**
      + * Create the headers from the given request_rec.
      + * @param r the request record which was processed
      + * @param status the headers status
      + * @param header the headers of the headers
      + * @param pool the memory pool to use
      + */
      +h2_headers *h2_headers_rcreate(request_rec *r, int status, 
      +                                 apr_table_t *header, apr_pool_t *pool);
      +
      +/**
      + * Create the headers for the given error.
      + * @param stream_id id of the stream to create the headers for
      + * @param type the error code
      + * @param req the original h2_request
      + * @param pool the memory pool to use
      + */
      +h2_headers *h2_headers_die(apr_status_t type,
      +                             const struct h2_request *req, apr_pool_t *pool);
      +
      +int h2_headers_are_response(h2_headers *headers);
      +
      +#endif /* defined(__mod_h2__h2_headers__) */
      diff --git a/modules/http2/h2_mplx.c b/modules/http2/h2_mplx.c
      new file mode 100644
      index 00000000000..5823bd8e547
      --- /dev/null
      +++ b/modules/http2/h2_mplx.c
      @@ -0,0 +1,1424 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +#include <stdlib.h>
      +
      +#include <apr_thread_mutex.h>
      +#include <apr_thread_cond.h>
      +#include <apr_strings.h>
      +#include <apr_time.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +
      +#include "mod_http2.h"
      +
      +#include "h2.h"
      +#include "h2_private.h"
      +#include "h2_bucket_beam.h"
      +#include "h2_config.h"
      +#include "h2_conn.h"
      +#include "h2_ctx.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_ngn_shed.h"
      +#include "h2_request.h"
      +#include "h2_stream.h"
      +#include "h2_task.h"
      +#include "h2_worker.h"
      +#include "h2_workers.h"
      +#include "h2_util.h"
      +
      +
      +static void h2_beam_log(h2_bucket_beam *beam, int id, const char *msg, 
      +                        conn_rec *c, int level)
      +{
      +    if (beam && APLOG_C_IS_LEVEL(c,level)) {
      +        char buffer[2048];
      +        apr_size_t off = 0;
      +        
      +        off += apr_snprintf(buffer+off, H2_ALEN(buffer)-off, "cl=%d, ", beam->closed);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "to_send", ", ", &beam->send_list);
      +        off += h2_util_bb_print(buffer+off, H2_ALEN(buffer)-off, "recv_buffer", ", ", beam->recv_buffer);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "hold", ", ", &beam->hold_list);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "purge", "", &beam->purge_list);
      +
      +        ap_log_cerror(APLOG_MARK, level, 0, c, "beam(%ld-%d): %s %s", 
      +                      c->id, id, msg, buffer);
      +    }
      +}
      +
      +/* utility for iterating over ihash task sets */
      +typedef struct {
      +    h2_mplx *m;
      +    h2_task *task;
      +    apr_time_t now;
      +} task_iter_ctx;
      +
      +/* NULL or the mutex hold by this thread, used for recursive calls
      + */
      +static apr_threadkey_t *thread_lock;
      +
      +apr_status_t h2_mplx_child_init(apr_pool_t *pool, server_rec *s)
      +{
      +    return apr_threadkey_private_create(&thread_lock, NULL, pool);
      +}
      +
      +static apr_status_t enter_mutex(h2_mplx *m, int *pacquired)
      +{
      +    apr_status_t status;
      +    void *mutex = NULL;
      +    
      +    /* Enter the mutex if this thread already holds the lock or
      +     * if we can acquire it. Only on the later case do we unlock
      +     * onleaving the mutex.
      +     * This allow recursive entering of the mutex from the saem thread,
      +     * which is what we need in certain situations involving callbacks
      +     */
      +    ap_assert(m);
      +    apr_threadkey_private_get(&mutex, thread_lock);
      +    if (mutex == m->lock) {
      +        *pacquired = 0;
      +        return APR_SUCCESS;
      +    }
      +
      +    ap_assert(m->lock);
      +    status = apr_thread_mutex_lock(m->lock);
      +    *pacquired = (status == APR_SUCCESS);
      +    if (*pacquired) {
      +        apr_threadkey_private_set(m->lock, thread_lock);
      +    }
      +    return status;
      +}
      +
      +static void leave_mutex(h2_mplx *m, int acquired)
      +{
      +    if (acquired) {
      +        apr_threadkey_private_set(NULL, thread_lock);
      +        apr_thread_mutex_unlock(m->lock);
      +    }
      +}
      +
      +static void beam_leave(void *ctx, apr_thread_mutex_t *lock)
      +{
      +    leave_mutex(ctx, 1);
      +}
      +
      +static apr_status_t beam_enter(void *ctx, h2_beam_lock *pbl)
      +{
      +    h2_mplx *m = ctx;
      +    int acquired;
      +    apr_status_t status;
      +    
      +    status = enter_mutex(m, &acquired);
      +    if (status == APR_SUCCESS) {
      +        pbl->mutex = m->lock;
      +        pbl->leave = acquired? beam_leave : NULL;
      +        pbl->leave_ctx = m;
      +    }
      +    return status;
      +}
      +
      +static void stream_output_consumed(void *ctx, 
      +                                   h2_bucket_beam *beam, apr_off_t length)
      +{
      +    h2_task *task = ctx;
      +    if (length > 0 && task && task->assigned) {
      +        h2_req_engine_out_consumed(task->assigned, task->c, length); 
      +    }
      +}
      +
      +static void stream_input_consumed(void *ctx, 
      +                                  h2_bucket_beam *beam, apr_off_t length)
      +{
      +    h2_mplx *m = ctx;
      +    if (m->input_consumed && length) {
      +        m->input_consumed(m->input_consumed_ctx, beam->id, length);
      +    }
      +}
      +
      +static int can_beam_file(void *ctx, h2_bucket_beam *beam,  apr_file_t *file)
      +{
      +    h2_mplx *m = ctx;
      +    if (m->tx_handles_reserved > 0) {
      +        --m->tx_handles_reserved;
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c,
      +                      "h2_mplx(%ld-%d): beaming file %s, tx_avail %d", 
      +                      m->id, beam->id, beam->tag, m->tx_handles_reserved);
      +        return 1;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c,
      +                  "h2_mplx(%ld-%d): can_beam_file denied on %s", 
      +                  m->id, beam->id, beam->tag);
      +    return 0;
      +}
      +
      +static void have_out_data_for(h2_mplx *m, h2_stream *stream, int response);
      +static void task_destroy(h2_mplx *m, h2_task *task, int called_from_master);
      +
      +static void check_tx_reservation(h2_mplx *m) 
      +{
      +    if (m->tx_handles_reserved <= 0) {
      +        m->tx_handles_reserved += h2_workers_tx_reserve(m->workers, 
      +            H2MIN(m->tx_chunk_size, h2_ihash_count(m->tasks)));
      +    }
      +}
      +
      +static void check_tx_free(h2_mplx *m) 
      +{
      +    if (m->tx_handles_reserved > m->tx_chunk_size) {
      +        apr_size_t count = m->tx_handles_reserved - m->tx_chunk_size;
      +        m->tx_handles_reserved = m->tx_chunk_size;
      +        h2_workers_tx_free(m->workers, count);
      +    }
      +    else if (m->tx_handles_reserved && h2_ihash_empty(m->tasks)) {
      +        h2_workers_tx_free(m->workers, m->tx_handles_reserved);
      +        m->tx_handles_reserved = 0;
      +    }
      +}
      +
      +static int purge_stream(void *ctx, void *val) 
      +{
      +    h2_mplx *m = ctx;
      +    h2_stream *stream = val;
      +    int stream_id = stream->id;
      +    h2_task *task;
      +
      +    /* stream_cleanup clears all buffers and destroys any buckets
      +     * that might hold references into task space. Needs to be done
      +     * before task destruction, otherwise it will complain. */
      +    h2_stream_cleanup(stream);
      +    
      +    task = h2_ihash_get(m->tasks, stream_id);    
      +    if (task) {
      +        task_destroy(m, task, 1);
      +    }
      +    
      +    h2_stream_destroy(stream);
      +    h2_ihash_remove(m->spurge, stream_id);
      +    return 0;
      +}
      +
      +static void purge_streams(h2_mplx *m)
      +{
      +    if (!h2_ihash_empty(m->spurge)) {
      +        while(!h2_ihash_iter(m->spurge, purge_stream, m)) {
      +            /* repeat until empty */
      +        }
      +        h2_ihash_clear(m->spurge);
      +    }
      +}
      +
      +static void h2_mplx_destroy(h2_mplx *m)
      +{
      +    conn_rec **pslave;
      +    ap_assert(m);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                  "h2_mplx(%ld): destroy, tasks=%d", 
      +                  m->id, (int)h2_ihash_count(m->tasks));
      +    check_tx_free(m);
      +    
      +    while (m->spare_slaves->nelts > 0) {
      +        pslave = (conn_rec **)apr_array_pop(m->spare_slaves);
      +        h2_slave_destroy(*pslave);
      +    }
      +    if (m->pool) {
      +        apr_pool_destroy(m->pool);
      +    }
      +}
      +
      +/**
      + * A h2_mplx needs to be thread-safe *and* if will be called by
      + * the h2_session thread *and* the h2_worker threads. Therefore:
      + * - calls are protected by a mutex lock, m->lock
      + * - the pool needs its own allocator, since apr_allocator_t are 
      + *   not re-entrant. The separate allocator works without a 
      + *   separate lock since we already protect h2_mplx itself.
      + *   Since HTTP/2 connections can be expected to live longer than
      + *   their HTTP/1 cousins, the separate allocator seems to work better
      + *   than protecting a shared h2_session one with an own lock.
      + */
      +h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *parent, 
      +                        const h2_config *conf, 
      +                        apr_interval_time_t stream_timeout,
      +                        h2_workers *workers)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_allocator_t *allocator = NULL;
      +    h2_mplx *m;
      +    ap_assert(conf);
      +    
      +    status = apr_allocator_create(&allocator);
      +    if (status != APR_SUCCESS) {
      +        return NULL;
      +    }
      +
      +    m = apr_pcalloc(parent, sizeof(h2_mplx));
      +    if (m) {
      +        m->id = c->id;
      +        APR_RING_ELEM_INIT(m, link);
      +        m->c = c;
      +        apr_pool_create_ex(&m->pool, parent, NULL, allocator);
      +        if (!m->pool) {
      +            return NULL;
      +        }
      +        apr_pool_tag(m->pool, "h2_mplx");
      +        apr_allocator_owner_set(allocator, m->pool);
      +        
      +        status = apr_thread_mutex_create(&m->lock, APR_THREAD_MUTEX_DEFAULT,
      +                                         m->pool);
      +        if (status != APR_SUCCESS) {
      +            h2_mplx_destroy(m);
      +            return NULL;
      +        }
      +        
      +        status = apr_thread_cond_create(&m->task_thawed, m->pool);
      +        if (status != APR_SUCCESS) {
      +            h2_mplx_destroy(m);
      +            return NULL;
      +        }
      +    
      +        m->bucket_alloc = apr_bucket_alloc_create(m->pool);
      +        m->max_streams = h2_config_geti(conf, H2_CONF_MAX_STREAMS);
      +        m->stream_max_mem = h2_config_geti(conf, H2_CONF_STREAM_MAX_MEM);
      +
      +        m->streams = h2_ihash_create(m->pool, offsetof(h2_stream,id));
      +        m->shold = h2_ihash_create(m->pool, offsetof(h2_stream,id));
      +        m->spurge = h2_ihash_create(m->pool, offsetof(h2_stream,id));
      +        m->q = h2_iq_create(m->pool, m->max_streams);
      +        m->readyq = h2_iq_create(m->pool, m->max_streams);
      +        m->tasks = h2_ihash_create(m->pool, offsetof(h2_task,stream_id));
      +        m->redo_tasks = h2_ihash_create(m->pool, offsetof(h2_task, stream_id));
      +
      +        m->stream_timeout = stream_timeout;
      +        m->workers = workers;
      +        m->workers_max = workers->max_workers;
      +        m->workers_limit = 6; /* the original h1 max parallel connections */
      +        m->last_limit_change = m->last_idle_block = apr_time_now();
      +        m->limit_change_interval = apr_time_from_msec(200);
      +        
      +        m->tx_handles_reserved = 0;
      +        m->tx_chunk_size = 4;
      +        
      +        m->spare_slaves = apr_array_make(m->pool, 10, sizeof(conn_rec*));
      +        
      +        m->ngn_shed = h2_ngn_shed_create(m->pool, m->c, m->max_streams, 
      +                                         m->stream_max_mem);
      +        h2_ngn_shed_set_ctx(m->ngn_shed , m);
      +    }
      +    return m;
      +}
      +
      +int h2_mplx_shutdown(h2_mplx *m)
      +{
      +    int acquired, max_stream_started = 0;
      +    
      +    if (enter_mutex(m, &acquired) == APR_SUCCESS) {
      +        max_stream_started = m->max_stream_started;
      +        /* Clear schedule queue, disabling existing streams from starting */ 
      +        h2_iq_clear(m->q);
      +        leave_mutex(m, acquired);
      +    }
      +    return max_stream_started;
      +}
      +
      +static void input_consumed_signal(h2_mplx *m, h2_stream *stream)
      +{
      +    if (stream->input && stream->started) {
      +        h2_beam_send(stream->input, NULL, 0); /* trigger updates */
      +    }
      +}
      +
      +static int output_consumed_signal(h2_mplx *m, h2_task *task)
      +{
      +    if (task->output.beam && task->worker_started && task->assigned) {
      +        /* trigger updates */
      +        h2_beam_send(task->output.beam, NULL, APR_NONBLOCK_READ);
      +    }
      +    return 0;
      +}
      +
      +
      +static void task_destroy(h2_mplx *m, h2_task *task, int called_from_master)
      +{
      +    conn_rec *slave = NULL;
      +    int reuse_slave = 0;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c, 
      +                  "h2_task(%s): destroy", task->id);
      +    if (called_from_master) {
      +        /* Process outstanding events before destruction */
      +        h2_stream *stream = h2_ihash_get(m->streams, task->stream_id);
      +        if (stream) {
      +            input_consumed_signal(m, stream);
      +        }
      +    }
      +    
      +    h2_beam_on_produced(task->output.beam, NULL, NULL);
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, 
      +                  APLOGNO(03385) "h2_task(%s): destroy "
      +                  "output beam empty=%d, holds proxies=%d", 
      +                  task->id,
      +                  h2_beam_empty(task->output.beam),
      +                  h2_beam_holds_proxies(task->output.beam));
      +    
      +    slave = task->c;
      +    reuse_slave = ((m->spare_slaves->nelts < m->spare_slaves->nalloc)
      +                   && !task->rst_error);
      +    
      +    h2_ihash_remove(m->tasks, task->stream_id);
      +    h2_ihash_remove(m->redo_tasks, task->stream_id);
      +    h2_task_destroy(task);
      +
      +    if (slave) {
      +        if (reuse_slave && slave->keepalive == AP_CONN_KEEPALIVE) {
      +            APR_ARRAY_PUSH(m->spare_slaves, conn_rec*) = slave;
      +        }
      +        else {
      +            slave->sbh = NULL;
      +            h2_slave_destroy(slave);
      +        }
      +    }
      +    
      +    check_tx_free(m);
      +}
      +
      +static void stream_done(h2_mplx *m, h2_stream *stream, int rst_error) 
      +{
      +    h2_task *task;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c, 
      +                  "h2_stream(%ld-%d): done", m->c->id, stream->id);
      +    /* Situation: we are, on the master connection, done with processing
      +     * the stream. Either we have handled it successfully, or the stream
      +     * was reset by the client or the connection is gone and we are 
      +     * shutting down the whole session.
      +     *
      +     * We possibly have created a task for this stream to be processed
      +     * on a slave connection. The processing might actually be ongoing
      +     * right now or has already finished. A finished task waits for its
      +     * stream to be done. This is the common case.
      +     * 
      +     * If the stream had input (e.g. the request had a body), a task
      +     * may have read, or is still reading buckets from the input beam.
      +     * This means that the task is referencing memory from the stream's
      +     * pool (or the master connection bucket alloc). Before we can free
      +     * the stream pool, we need to make sure that those references are
      +     * gone. This is what h2_beam_shutdown() on the input waits for.
      +     *
      +     * With the input handled, we can tear down that beam and care
      +     * about the output beam. The stream might still have buffered some
      +     * buckets read from the output, so we need to get rid of those. That
      +     * is done by h2_stream_cleanup().
      +     *
      +     * Now it is save to destroy the task (if it exists and is finished).
      +     * 
      +     * FIXME: we currently destroy the stream, even if the task is still
      +     * ongoing. This is not ok, since task->request is coming from stream
      +     * memory. We should either copy it on task creation or wait with the
      +     * stream destruction until the task is done. 
      +     */
      +    h2_iq_remove(m->q, stream->id);
      +    h2_ihash_remove(m->streams, stream->id);
      +    
      +    h2_stream_cleanup(stream);
      +    m->tx_handles_reserved += h2_beam_get_files_beamed(stream->input);
      +    h2_beam_on_consumed(stream->input, NULL, NULL);
      +    /* Let anyone blocked reading know that there is no more to come */
      +    h2_beam_abort(stream->input);
      +    /* Remove mutex after, so that abort still finds cond to signal */
      +    h2_beam_mutex_set(stream->input, NULL, NULL, NULL);
      +    m->tx_handles_reserved += h2_beam_get_files_beamed(stream->output);
      +
      +    task = h2_ihash_get(m->tasks, stream->id);
      +    if (task) {
      +        if (!task->worker_done) {
      +            /* task still running, cleanup once it is done */
      +            if (rst_error) {
      +                h2_task_rst(task, rst_error);
      +            }
      +            h2_ihash_add(m->shold, stream);
      +            return;
      +        }
      +        else {
      +            /* already finished */
      +            task_destroy(m, task, 1);
      +        }
      +    }
      +    h2_stream_destroy(stream);
      +}
      +
      +static int stream_done_iter(void *ctx, void *val)
      +{
      +    stream_done((h2_mplx*)ctx, val, 0);
      +    return 0;
      +}
      +
      +typedef struct {
      +    h2_mplx_stream_cb *cb;
      +    void *ctx;
      +} stream_iter_ctx_t;
      +
      +static int stream_iter_wrap(void *ctx, void *stream)
      +{
      +    stream_iter_ctx_t *x = ctx;
      +    return x->cb(stream, x->ctx);
      +}
      +
      +apr_status_t h2_mplx_stream_do(h2_mplx *m, h2_mplx_stream_cb *cb, void *ctx)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        stream_iter_ctx_t x;
      +        x.cb = cb;
      +        x.ctx = ctx;
      +        h2_ihash_iter(m->streams, stream_iter_wrap, &x);
      +        
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +static int task_print(void *ctx, void *val)
      +{
      +    h2_mplx *m = ctx;
      +    h2_task *task = val;
      +
      +    if (task) {
      +        h2_stream *stream = h2_ihash_get(m->streams, task->stream_id);
      +
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, /* NO APLOGNO */
      +                      "->03198: h2_stream(%s): %s %s %s"
      +                      "[orph=%d/started=%d/done=%d/frozen=%d]", 
      +                      task->id, task->request->method, 
      +                      task->request->authority, task->request->path,
      +                      (stream? 0 : 1), task->worker_started, 
      +                      task->worker_done, task->frozen);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, /* NO APLOGNO */
      +                      "->03198: h2_stream(%ld-NULL): NULL", m->id);
      +    }
      +    return 1;
      +}
      +
      +static int task_abort_connection(void *ctx, void *val)
      +{
      +    h2_task *task = val;
      +    if (!task->worker_done) { 
      +        if (task->c) {
      +            task->c->aborted = 1;
      +        }
      +        h2_beam_abort(task->input.beam);
      +        h2_beam_abort(task->output.beam);
      +    }
      +    return 1;
      +}
      +
      +static int report_stream_iter(void *ctx, void *val) {
      +    h2_mplx *m = ctx;
      +    h2_stream *stream = val;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                  "h2_mplx(%ld-%d): exists, started=%d, scheduled=%d, ready=%d", 
      +                  m->id, stream->id, stream->started, stream->scheduled,
      +                  h2_stream_is_ready(stream));
      +    return 1;
      +}
      +
      +static int task_done_iter(void *ctx, void *val);
      +
      +apr_status_t h2_mplx_release_and_join(h2_mplx *m, apr_thread_cond_t *wait)
      +{
      +    apr_status_t status;
      +    int acquired;
      +
      +    /* How to shut down a h2 connection:
      +     * 1. tell the workers that no more tasks will come from us */
      +    h2_workers_unregister(m->workers, m);
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        int i, wait_secs = 60;
      +
      +        /* 2. disable WINDOW_UPDATEs and set the mplx to aborted, clear
      +         *    our TODO list and purge any streams we have collected */
      +        h2_mplx_set_consumed_cb(m, NULL, NULL);
      +        h2_mplx_abort(m);
      +        h2_iq_clear(m->q);
      +        purge_streams(m);
      +
      +        /* 3. wakeup all sleeping tasks. Mark all still active streams as 'done'. 
      +         *    m->streams has to be empty afterwards with streams either in
      +         *    a) m->shold because a task is still active
      +         *    b) m->spurge because task is done, or was not started */
      +        h2_ihash_iter(m->tasks, task_abort_connection, m);
      +        apr_thread_cond_broadcast(m->task_thawed);
      +        while (!h2_ihash_iter(m->streams, stream_done_iter, m)) {
      +            /* iterate until all streams have been removed */
      +        }
      +        ap_assert(h2_ihash_empty(m->streams));
      +
      +        /* 4. purge all streams we collected by marking them 'done' */
      +        purge_streams(m);
      +        
      +        /* 5. while workers are busy on this connection, meaning they
      +         *    are processing tasks from this connection, wait on them finishing
      +         *    to wake us and check again. Eventually, this has to succeed. */    
      +        m->join_wait = wait;
      +        for (i = 0; m->workers_busy > 0; ++i) {
      +            status = apr_thread_cond_timedwait(wait, m->lock, apr_time_from_sec(wait_secs));
      +            
      +            if (APR_STATUS_IS_TIMEUP(status)) {
      +                /* This can happen if we have very long running requests
      +                 * that do not time out on IO. */
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c, APLOGNO(03198)
      +                              "h2_mplx(%ld): release, waiting for %d seconds now for "
      +                              "%d h2_workers to return, have still %d tasks outstanding", 
      +                              m->id, i*wait_secs, m->workers_busy,
      +                              (int)h2_ihash_count(m->tasks));
      +                h2_ihash_iter(m->shold, report_stream_iter, m);
      +                h2_ihash_iter(m->tasks, task_print, m);
      +            }
      +            purge_streams(m);
      +        }
      +        m->join_wait = NULL;
      +        
      +        /* 6. All workers for this connection are done, we are in 
      +         * single-threaded processing now effectively. */
      +        leave_mutex(m, acquired);
      +
      +        if (!h2_ihash_empty(m->tasks)) {
      +            /* when we are here, we lost track of the tasks still present.
      +             * this currently happens with mod_proxy_http2 when we shut
      +             * down a h2_req_engine with tasks assigned. Since no parallel
      +             * processing is going on any more, we just clean them up. */ 
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, m->c,  APLOGNO(03056)
      +                          "h2_mplx(%ld): 3. release_join with %d tasks",
      +                          m->id, (int)h2_ihash_count(m->tasks));
      +            h2_ihash_iter(m->tasks, task_print, m);
      +            
      +            while (!h2_ihash_iter(m->tasks, task_done_iter, m)) {
      +                /* iterate until all tasks have been removed */
      +            }
      +        }
      +
      +        /* 7. With all tasks done, the stream hold should be empty and all
      +         *    remaining streams are ready for purging */
      +        ap_assert(h2_ihash_empty(m->shold));
      +        purge_streams(m);
      +        
      +        /* 8. close the h2_req_enginge shed and self destruct */
      +        h2_ngn_shed_destroy(m->ngn_shed);
      +        m->ngn_shed = NULL;
      +        h2_mplx_destroy(m);
      +    }
      +    return status;
      +}
      +
      +void h2_mplx_abort(h2_mplx *m)
      +{
      +    int acquired;
      +    
      +    if (!m->aborted && enter_mutex(m, &acquired) == APR_SUCCESS) {
      +        m->aborted = 1;
      +        h2_ngn_shed_abort(m->ngn_shed);
      +        leave_mutex(m, acquired);
      +    }
      +}
      +
      +apr_status_t h2_mplx_stream_done(h2_mplx *m, h2_stream *stream)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c, 
      +                      "h2_mplx(%ld-%d): marking stream as done.", 
      +                      m->id, stream->id);
      +        stream_done(m, stream, stream->rst_error);
      +        purge_streams(m);
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +h2_stream *h2_mplx_stream_get(h2_mplx *m, int id)
      +{
      +    h2_stream *s = NULL;
      +    int acquired;
      +    
      +    if ((enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        s = h2_ihash_get(m->streams, id);
      +        leave_mutex(m, acquired);
      +    }
      +    return s;
      +}
      +
      +void h2_mplx_set_consumed_cb(h2_mplx *m, h2_mplx_consumed_cb *cb, void *ctx)
      +{
      +    m->input_consumed = cb;
      +    m->input_consumed_ctx = ctx;
      +}
      +
      +static void output_produced(void *ctx, h2_bucket_beam *beam, apr_off_t bytes)
      +{
      +    h2_mplx *m = ctx;
      +    apr_status_t status;
      +    h2_stream *stream;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        stream = h2_ihash_get(m->streams, beam->id);
      +        if (stream) {
      +            have_out_data_for(m, stream, 0);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +}
      +
      +static apr_status_t out_open(h2_mplx *m, int stream_id, h2_bucket_beam *beam)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    h2_task *task = h2_ihash_get(m->tasks, stream_id);
      +    h2_stream *stream = h2_ihash_get(m->streams, stream_id);
      +    apr_size_t beamed_count;
      +    
      +    if (!task || !stream) {
      +        return APR_ECONNABORTED;
      +    }
      +    
      +    if (APLOGctrace2(m->c)) {
      +        h2_beam_log(beam, stream_id, "out_open", m->c, APLOG_TRACE2);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, m->c,
      +                      "h2_mplx(%s): out open", task->id);
      +    }
      +    
      +    h2_beam_on_consumed(stream->output, stream_output_consumed, task);
      +    h2_beam_on_produced(stream->output, output_produced, m);
      +    beamed_count = h2_beam_get_files_beamed(stream->output);
      +    if (m->tx_handles_reserved >= beamed_count) {
      +        m->tx_handles_reserved -= beamed_count;
      +    }
      +    else {
      +        m->tx_handles_reserved = 0;
      +    }
      +    if (!task->output.copy_files) {
      +        h2_beam_on_file_beam(stream->output, can_beam_file, m);
      +    }
      +    
      +    /* time to protect the beam against multi-threaded use */
      +    h2_beam_mutex_set(stream->output, beam_enter, task->cond, m);
      +    
      +    /* we might see some file buckets in the output, see
      +     * if we have enough handles reserved. */
      +    check_tx_reservation(m);
      +    have_out_data_for(m, stream, 0);
      +    return status;
      +}
      +
      +apr_status_t h2_mplx_out_open(h2_mplx *m, int stream_id, h2_bucket_beam *beam)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (m->aborted) {
      +            status = APR_ECONNABORTED;
      +        }
      +        else {
      +            status = out_open(m, stream_id, beam);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +static apr_status_t out_close(h2_mplx *m, h2_task *task)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    h2_stream *stream;
      +    
      +    if (!task) {
      +        return APR_ECONNABORTED;
      +    }
      +
      +    stream = h2_ihash_get(m->streams, task->stream_id);
      +    if (!stream) {
      +        return APR_ECONNABORTED;
      +    }
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, m->c,
      +                  "h2_mplx(%s): close", task->id);
      +    status = h2_beam_close(task->output.beam);
      +    h2_beam_log(task->output.beam, task->stream_id, "out_close", m->c, 
      +                APLOG_TRACE2);
      +    output_consumed_signal(m, task);
      +    have_out_data_for(m, stream, 0);
      +    return status;
      +}
      +
      +apr_status_t h2_mplx_out_trywait(h2_mplx *m, apr_interval_time_t timeout,
      +                                 apr_thread_cond_t *iowait)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (m->aborted) {
      +            status = APR_ECONNABORTED;
      +        }
      +        else if (!h2_iq_empty(m->readyq)) {
      +            status = APR_SUCCESS;
      +        }
      +        else {
      +            purge_streams(m);
      +            m->added_output = iowait;
      +            status = apr_thread_cond_timedwait(m->added_output, m->lock, timeout);
      +            if (APLOGctrace2(m->c)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
      +                              "h2_mplx(%ld): trywait on data for %f ms)",
      +                              m->id, timeout/1000.0);
      +            }
      +            m->added_output = NULL;
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +static void have_out_data_for(h2_mplx *m, h2_stream *stream, int response)
      +{
      +    ap_assert(m);
      +    ap_assert(stream);
      +    h2_iq_append(m->readyq, stream->id);
      +    if (m->added_output) {
      +        apr_thread_cond_signal(m->added_output);
      +    }
      +}
      +
      +apr_status_t h2_mplx_reprioritize(h2_mplx *m, h2_stream_pri_cmp *cmp, void *ctx)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (m->aborted) {
      +            status = APR_ECONNABORTED;
      +        }
      +        else {
      +            h2_iq_sort(m->q, cmp, ctx);
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                          "h2_mplx(%ld): reprioritize tasks", m->id);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_mplx_process(h2_mplx *m, struct h2_stream *stream, 
      +                             h2_stream_pri_cmp *cmp, void *ctx)
      +{
      +    apr_status_t status;
      +    int do_registration = 0;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (m->aborted) {
      +            status = APR_ECONNABORTED;
      +        }
      +        else {
      +            h2_ihash_add(m->streams, stream);
      +            if (h2_stream_is_ready(stream)) {
      +                h2_iq_append(m->readyq, stream->id);
      +            }
      +            else {
      +                if (!m->need_registration) {
      +                    m->need_registration = h2_iq_empty(m->q);
      +                }
      +                if (m->workers_busy < m->workers_max) {
      +                    do_registration = m->need_registration;
      +                }
      +                h2_iq_add(m->q, stream->id, cmp, ctx);                
      +            }
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, m->c,
      +                          "h2_mplx(%ld-%d): process", m->c->id, stream->id);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    if (do_registration) {
      +        m->need_registration = 0;
      +        h2_workers_register(m->workers, m);
      +    }
      +    return status;
      +}
      +
      +static h2_task *next_stream_task(h2_mplx *m)
      +{
      +    h2_task *task = NULL;
      +    h2_stream *stream;
      +    int sid;
      +    while (!m->aborted && !task  && (m->workers_busy < m->workers_limit)
      +           && (sid = h2_iq_shift(m->q)) > 0) {
      +        
      +        stream = h2_ihash_get(m->streams, sid);
      +        if (stream) {
      +            conn_rec *slave, **pslave;
      +            int new_conn = 0;
      +
      +            pslave = (conn_rec **)apr_array_pop(m->spare_slaves);
      +            if (pslave) {
      +                slave = *pslave;
      +            }
      +            else {
      +                slave = h2_slave_create(m->c, stream->id, m->pool);
      +                new_conn = 1;
      +            }
      +            
      +            slave->sbh = m->c->sbh;
      +            slave->aborted = 0;
      +            task = h2_task_create(slave, stream->id, stream->request, 
      +                                  stream->input, stream->output, m);
      +            h2_ihash_add(m->tasks, task);
      +            
      +            m->c->keepalives++;
      +            apr_table_setn(slave->notes, H2_TASK_ID_NOTE, task->id);
      +            if (new_conn) {
      +                h2_slave_run_pre_connection(slave, ap_get_conn_socket(slave));
      +            }
      +            stream->started = 1;
      +            stream->can_be_cleaned = 0;
      +            task->worker_started = 1;
      +            task->started_at = apr_time_now();
      +            if (sid > m->max_stream_started) {
      +                m->max_stream_started = sid;
      +            }
      +
      +            h2_beam_timeout_set(stream->input, m->stream_timeout);
      +            h2_beam_on_consumed(stream->input, stream_input_consumed, m);
      +            h2_beam_on_file_beam(stream->input, can_beam_file, m);
      +            h2_beam_mutex_set(stream->input, beam_enter, task->cond, m);
      +            
      +            h2_beam_buffer_size_set(stream->output, m->stream_max_mem);
      +            h2_beam_timeout_set(stream->output, m->stream_timeout);
      +            ++m->workers_busy;
      +        }
      +    }
      +    return task;
      +}
      +
      +h2_task *h2_mplx_pop_task(h2_mplx *m, int *has_more)
      +{
      +    h2_task *task = NULL;
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (m->aborted) {
      +            *has_more = 0;
      +        }
      +        else {
      +            task = next_stream_task(m);
      +            *has_more = !h2_iq_empty(m->q);
      +        }
      +        
      +        if (has_more && !task) {
      +            m->need_registration = 1;
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return task;
      +}
      +
      +static void task_done(h2_mplx *m, h2_task *task, h2_req_engine *ngn)
      +{
      +    if (task->frozen) {
      +        /* this task was handed over to an engine for processing 
      +         * and the original worker has finished. That means the 
      +         * engine may start processing now. */
      +        h2_task_thaw(task);
      +        apr_thread_cond_broadcast(m->task_thawed);
      +        return;
      +    }
      +    else {
      +        h2_stream *stream;
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                      "h2_mplx(%ld): task(%s) done", m->id, task->id);
      +        out_close(m, task);
      +        
      +        if (ngn) {
      +            apr_off_t bytes = 0;
      +            h2_beam_send(task->output.beam, NULL, APR_NONBLOCK_READ);
      +            bytes += h2_beam_get_buffered(task->output.beam);
      +            if (bytes > 0) {
      +                /* we need to report consumed and current buffered output
      +                 * to the engine. The request will be streamed out or cancelled,
      +                 * no more data is coming from it and the engine should update
      +                 * its calculations before we destroy this information. */
      +                h2_req_engine_out_consumed(ngn, task->c, bytes);
      +            }
      +        }
      +        
      +        if (task->engine) {
      +            if (!m->aborted && !task->c->aborted 
      +                && !h2_req_engine_is_shutdown(task->engine)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, m->c,
      +                              "h2_mplx(%ld): task(%s) has not-shutdown "
      +                              "engine(%s)", m->id, task->id, 
      +                              h2_req_engine_get_id(task->engine));
      +            }
      +            h2_ngn_shed_done_ngn(m->ngn_shed, task->engine);
      +        }
      +        
      +        stream = h2_ihash_get(m->streams, task->stream_id);
      +        if (!m->aborted && stream 
      +            && h2_ihash_get(m->redo_tasks, task->stream_id)) {
      +            /* reset and schedule again */
      +            h2_task_redo(task);
      +            h2_ihash_remove(m->redo_tasks, task->stream_id);
      +            h2_iq_add(m->q, task->stream_id, NULL, NULL);
      +            return;
      +        }
      +        
      +        task->worker_done = 1;
      +        task->done_at = apr_time_now();
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
      +                      "h2_mplx(%s): request done, %f ms elapsed", task->id, 
      +                      (task->done_at - task->started_at) / 1000.0);
      +        if (task->started_at > m->last_idle_block) {
      +            /* this task finished without causing an 'idle block', e.g.
      +             * a block by flow control.
      +             */
      +            if (task->done_at- m->last_limit_change >= m->limit_change_interval
      +                && m->workers_limit < m->workers_max) {
      +                /* Well behaving stream, allow it more workers */
      +                m->workers_limit = H2MIN(m->workers_limit * 2, 
      +                                         m->workers_max);
      +                m->last_limit_change = task->done_at;
      +                m->need_registration = 1;
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                              "h2_mplx(%ld): increase worker limit to %d",
      +                              m->id, m->workers_limit);
      +            }
      +        }
      +        
      +        if (stream) {
      +            /* hang around until the stream deregisters */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
      +                          "h2_mplx(%s): task_done, stream still open", 
      +                          task->id);
      +            /* more data will not arrive, resume the stream */
      +            have_out_data_for(m, stream, 0);
      +            h2_beam_on_consumed(stream->output, NULL, NULL);
      +            h2_beam_mutex_set(stream->output, NULL, NULL, NULL);
      +        }
      +        else {
      +            /* stream no longer active, was it placed in hold? */
      +            stream = h2_ihash_get(m->shold, task->stream_id);
      +            if (stream) {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
      +                              "h2_mplx(%s): task_done, stream %d in hold", 
      +                              task->id, stream->id);
      +                /* We cannot destroy the stream here since this is 
      +                 * called from a worker thread and freeing memory pools
      +                 * is only safe in the only thread using it (and its
      +                 * parent pool / allocator) */
      +                h2_beam_on_consumed(stream->output, NULL, NULL);
      +                h2_beam_mutex_set(stream->output, NULL, NULL, NULL);
      +                h2_ihash_remove(m->shold, stream->id);
      +                h2_ihash_add(m->spurge, stream);
      +            }
      +            else {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
      +                              "h2_mplx(%s): task_done, stream not found", 
      +                              task->id);
      +                task_destroy(m, task, 0);
      +            }
      +        }
      +    }
      +}
      +
      +static int task_done_iter(void *ctx, void *val)
      +{
      +    task_done((h2_mplx*)ctx, val, 0);
      +    return 0;
      +}
      +
      +void h2_mplx_task_done(h2_mplx *m, h2_task *task, h2_task **ptask)
      +{
      +    int acquired;
      +    
      +    if (enter_mutex(m, &acquired) == APR_SUCCESS) {
      +        task_done(m, task, NULL);
      +        --m->workers_busy;
      +        if (m->join_wait) {
      +            apr_thread_cond_signal(m->join_wait);
      +        }
      +        if (ptask) {
      +            /* caller wants another task */
      +            *ptask = next_stream_task(m);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +}
      +
      +/*******************************************************************************
      + * h2_mplx DoS protection
      + ******************************************************************************/
      +
      +static int latest_repeatable_unsubmitted_iter(void *data, void *val)
      +{
      +    task_iter_ctx *ctx = data;
      +    h2_stream *stream;
      +    h2_task *task = val;
      +    if (!task->worker_done && h2_task_can_redo(task) 
      +        && !h2_ihash_get(ctx->m->redo_tasks, task->stream_id)) {
      +        stream = h2_ihash_get(ctx->m->streams, task->stream_id);
      +        if (stream && !h2_stream_is_ready(stream)) {
      +            /* this task occupies a worker, the response has not been submitted 
      +             * yet, not been cancelled and it is a repeatable request
      +             * -> it can be re-scheduled later */
      +            if (!ctx->task || ctx->task->started_at < task->started_at) {
      +                /* we did not have one or this one was started later */
      +                ctx->task = task;
      +            }
      +        }
      +    }
      +    return 1;
      +}
      +
      +static h2_task *get_latest_repeatable_unsubmitted_task(h2_mplx *m) 
      +{
      +    task_iter_ctx ctx;
      +    ctx.m = m;
      +    ctx.task = NULL;
      +    h2_ihash_iter(m->tasks, latest_repeatable_unsubmitted_iter, &ctx);
      +    return ctx.task;
      +}
      +
      +static int timed_out_busy_iter(void *data, void *val)
      +{
      +    task_iter_ctx *ctx = data;
      +    h2_task *task = val;
      +    if (!task->worker_done
      +        && (ctx->now - task->started_at) > ctx->m->stream_timeout) {
      +        /* timed out stream occupying a worker, found */
      +        ctx->task = task;
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +static h2_task *get_timed_out_busy_task(h2_mplx *m) 
      +{
      +    task_iter_ctx ctx;
      +    ctx.m = m;
      +    ctx.task = NULL;
      +    ctx.now = apr_time_now();
      +    h2_ihash_iter(m->tasks, timed_out_busy_iter, &ctx);
      +    return ctx.task;
      +}
      +
      +static apr_status_t unschedule_slow_tasks(h2_mplx *m) 
      +{
      +    h2_task *task;
      +    int n;
      +    
      +    /* Try to get rid of streams that occupy workers. Look for safe requests
      +     * that are repeatable. If none found, fail the connection.
      +     */
      +    n = (m->workers_busy - m->workers_limit - (int)h2_ihash_count(m->redo_tasks));
      +    while (n > 0 && (task = get_latest_repeatable_unsubmitted_task(m))) {
      +        h2_task_rst(task, H2_ERR_CANCEL);
      +        h2_ihash_add(m->redo_tasks, task);
      +        --n;
      +    }
      +    
      +    if ((m->workers_busy - h2_ihash_count(m->redo_tasks)) > m->workers_limit) {
      +        task = get_timed_out_busy_task(m);
      +        if (task) {
      +            /* Too many busy workers, unable to cancel enough streams
      +             * and with a busy, timed out stream, we tell the client
      +             * to go away... */
      +            return APR_TIMEUP;
      +        }
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_mplx_idle(h2_mplx *m)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_time_t now;            
      +    int acquired;
      +    
      +    if (enter_mutex(m, &acquired) == APR_SUCCESS) {
      +        apr_size_t scount = h2_ihash_count(m->streams);
      +        if (scount > 0 && m->workers_busy) {
      +            /* If we have streams in connection state 'IDLE', meaning
      +             * all streams are ready to sent data out, but lack
      +             * WINDOW_UPDATEs. 
      +             * 
      +             * This is ok, unless we have streams that still occupy
      +             * h2 workers. As worker threads are a scarce resource, 
      +             * we need to take measures that we do not get DoSed.
      +             * 
      +             * This is what we call an 'idle block'. Limit the amount 
      +             * of busy workers we allow for this connection until it
      +             * well behaves.
      +             */
      +            now = apr_time_now();
      +            m->last_idle_block = now;
      +            if (m->workers_limit > 2 
      +                && now - m->last_limit_change >= m->limit_change_interval) {
      +                if (m->workers_limit > 16) {
      +                    m->workers_limit = 16;
      +                }
      +                else if (m->workers_limit > 8) {
      +                    m->workers_limit = 8;
      +                }
      +                else if (m->workers_limit > 4) {
      +                    m->workers_limit = 4;
      +                }
      +                else if (m->workers_limit > 2) {
      +                    m->workers_limit = 2;
      +                }
      +                m->last_limit_change = now;
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                              "h2_mplx(%ld): decrease worker limit to %d",
      +                              m->id, m->workers_limit);
      +            }
      +            
      +            if (m->workers_busy > m->workers_limit) {
      +                status = unschedule_slow_tasks(m);
      +            }
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +/*******************************************************************************
      + * HTTP/2 request engines
      + ******************************************************************************/
      +
      +typedef struct {
      +    h2_mplx * m;
      +    h2_req_engine *ngn;
      +    int streams_updated;
      +} ngn_update_ctx;
      +
      +static int ngn_update_window(void *ctx, void *val)
      +{
      +    ngn_update_ctx *uctx = ctx;
      +    h2_task *task = val;
      +    if (task && task->assigned == uctx->ngn
      +        && output_consumed_signal(uctx->m, task)) {
      +        ++uctx->streams_updated;
      +    }
      +    return 1;
      +}
      +
      +static apr_status_t ngn_out_update_windows(h2_mplx *m, h2_req_engine *ngn)
      +{
      +    ngn_update_ctx ctx;
      +        
      +    ctx.m = m;
      +    ctx.ngn = ngn;
      +    ctx.streams_updated = 0;
      +    h2_ihash_iter(m->tasks, ngn_update_window, &ctx);
      +    
      +    return ctx.streams_updated? APR_SUCCESS : APR_EAGAIN;
      +}
      +
      +apr_status_t h2_mplx_req_engine_push(const char *ngn_type, 
      +                                     request_rec *r,
      +                                     http2_req_engine_init *einit)
      +{
      +    apr_status_t status;
      +    h2_mplx *m;
      +    h2_task *task;
      +    int acquired;
      +    
      +    task = h2_ctx_rget_task(r);
      +    if (!task) {
      +        return APR_ECONNABORTED;
      +    }
      +    m = task->mplx;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        h2_stream *stream = h2_ihash_get(m->streams, task->stream_id);
      +        
      +        if (stream) {
      +            status = h2_ngn_shed_push_request(m->ngn_shed, ngn_type, r, einit);
      +        }
      +        else {
      +            status = APR_ECONNABORTED;
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_mplx_req_engine_pull(h2_req_engine *ngn, 
      +                                     apr_read_type_e block, 
      +                                     int capacity, 
      +                                     request_rec **pr)
      +{   
      +    h2_ngn_shed *shed = h2_ngn_shed_get_shed(ngn);
      +    h2_mplx *m = h2_ngn_shed_get_ctx(shed);
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        int want_shutdown = (block == APR_BLOCK_READ);
      +
      +        /* Take this opportunity to update output consummation 
      +         * for this engine */
      +        ngn_out_update_windows(m, ngn);
      +        
      +        if (want_shutdown && !h2_iq_empty(m->q)) {
      +            /* For a blocking read, check first if requests are to be
      +             * had and, if not, wait a short while before doing the
      +             * blocking, and if unsuccessful, terminating read.
      +             */
      +            status = h2_ngn_shed_pull_request(shed, ngn, capacity, 1, pr);
      +            if (APR_STATUS_IS_EAGAIN(status)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, m->c,
      +                              "h2_mplx(%ld): start block engine pull", m->id);
      +                apr_thread_cond_timedwait(m->task_thawed, m->lock, 
      +                                          apr_time_from_msec(20));
      +                status = h2_ngn_shed_pull_request(shed, ngn, capacity, 1, pr);
      +            }
      +        }
      +        else {
      +            status = h2_ngn_shed_pull_request(shed, ngn, capacity,
      +                                              want_shutdown, pr);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      + 
      +void h2_mplx_req_engine_done(h2_req_engine *ngn, conn_rec *r_conn,
      +                             apr_status_t status)
      +{
      +    h2_task *task = h2_ctx_cget_task(r_conn);
      +    
      +    if (task) {
      +        h2_mplx *m = task->mplx;
      +        int acquired;
      +
      +        if (enter_mutex(m, &acquired) == APR_SUCCESS) {
      +            ngn_out_update_windows(m, ngn);
      +            h2_ngn_shed_done_task(m->ngn_shed, ngn, task);
      +            if (status != APR_SUCCESS && h2_task_can_redo(task) 
      +                && !h2_ihash_get(m->redo_tasks, task->stream_id)) {
      +                h2_ihash_add(m->redo_tasks, task);
      +            }
      +            if (task->engine) { 
      +                /* cannot report that as done until engine returns */
      +            }
      +            else {
      +                task_done(m, task, ngn);
      +            }
      +            /* Take this opportunity to update output consummation 
      +             * for this engine */
      +            leave_mutex(m, acquired);
      +        }
      +    }
      +}
      +
      +/*******************************************************************************
      + * mplx master events dispatching
      + ******************************************************************************/
      +
      +static int update_window(void *ctx, void *val)
      +{
      +    input_consumed_signal(ctx, val);
      +    return 1;
      +}
      +
      +apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m, 
      +                                            stream_ev_callback *on_resume, 
      +                                            void *on_ctx)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    int ids[100];
      +    h2_stream *stream;
      +    size_t i, n;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c, 
      +                      "h2_mplx(%ld): dispatch events", m->id);
      +                      
      +        /* update input windows for streams */
      +        h2_ihash_iter(m->streams, update_window, m);
      +        if (on_resume && !h2_iq_empty(m->readyq)) {
      +            n = h2_iq_mshift(m->readyq, ids, H2_ALEN(ids));
      +            for (i = 0; i < n; ++i) {
      +                stream = h2_ihash_get(m->streams, ids[i]);
      +                if (stream) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, m->c, 
      +                                  "h2_mplx(%ld-%d): on_resume", 
      +                                  m->id, stream->id);
      +                    on_resume(on_ctx, stream);
      +                }
      +            }
      +        }
      +        
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_mplx_keep_active(h2_mplx *m, int stream_id)
      +{
      +    apr_status_t status;
      +    int acquired;
      +    
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        h2_stream *s = h2_ihash_get(m->streams, stream_id);
      +        if (s) {
      +            h2_iq_append(m->readyq, stream_id);
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return status;
      +}
      +
      +int h2_mplx_awaits_data(h2_mplx *m)
      +{
      +    apr_status_t status;
      +    int acquired, waiting = 1;
      +     
      +    if ((status = enter_mutex(m, &acquired)) == APR_SUCCESS) {
      +        if (h2_ihash_empty(m->streams)) {
      +            waiting = 0;
      +        }
      +        if (h2_iq_empty(m->q) && h2_ihash_empty(m->tasks)) {
      +            waiting = 0;
      +        }
      +        leave_mutex(m, acquired);
      +    }
      +    return waiting;
      +}
      diff --git a/modules/http2/h2_mplx.h b/modules/http2/h2_mplx.h
      new file mode 100644
      index 00000000000..25e07005e70
      --- /dev/null
      +++ b/modules/http2/h2_mplx.h
      @@ -0,0 +1,356 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_mplx__
      +#define __mod_h2__h2_mplx__
      +
      +/**
      + * The stream multiplexer. It pushes buckets from the connection
      + * thread to the stream threads and vice versa. It's thread-safe
      + * to use.
      + *
      + * There is one h2_mplx instance for each h2_session, which sits on top
      + * of a particular httpd conn_rec. Input goes from the connection to
      + * the stream tasks. Output goes from the stream tasks to the connection,
      + * e.g. the client.
      + *
      + * For each stream, there can be at most "H2StreamMaxMemSize" output bytes
      + * queued in the multiplexer. If a task thread tries to write more
      + * data, it is blocked until space becomes available.
      + *
      + * Writing input is never blocked. In order to use flow control on the input,
      + * the mplx can be polled for input data consumption.
      + */
      +
      +struct apr_pool_t;
      +struct apr_thread_mutex_t;
      +struct apr_thread_cond_t;
      +struct h2_bucket_beam;
      +struct h2_config;
      +struct h2_ihash_t;
      +struct h2_task;
      +struct h2_stream;
      +struct h2_request;
      +struct apr_thread_cond_t;
      +struct h2_workers;
      +struct h2_iqueue;
      +struct h2_ngn_shed;
      +struct h2_req_engine;
      +
      +#include <apr_queue.h>
      +
      +typedef struct h2_mplx h2_mplx;
      +
      +/**
      + * Callback invoked for every stream that had input data read since
      + * the last invocation.
      + */
      +typedef void h2_mplx_consumed_cb(void *ctx, int stream_id, apr_off_t consumed);
      +
      +struct h2_mplx {
      +    long id;
      +    conn_rec *c;
      +    apr_pool_t *pool;
      +    apr_bucket_alloc_t *bucket_alloc;
      +
      +    APR_RING_ENTRY(h2_mplx) link;
      +
      +    unsigned int aborted : 1;
      +    unsigned int need_registration : 1;
      +
      +    struct h2_ihash_t *streams;     /* all streams currently processing */
      +    struct h2_ihash_t *shold;       /* all streams done with task ongoing */
      +    struct h2_ihash_t *spurge;      /* all streams done, ready for destroy */
      +
      +    struct h2_iqueue *q;            /* all stream ids that need to be started */
      +    struct h2_iqueue *readyq;       /* all stream ids ready for output */
      +        
      +    struct h2_ihash_t *tasks;       /* all tasks started and not destroyed */
      +    struct h2_ihash_t *redo_tasks;  /* all tasks that need to be redone */
      +    
      +    int max_streams;        /* max # of concurrent streams */
      +    int max_stream_started; /* highest stream id that started processing */
      +    int workers_busy;       /* # of workers processing on this mplx */
      +    int workers_limit;      /* current # of workers limit, dynamic */
      +    int workers_max;        /* max, hard limit # of workers in a process */
      +    apr_time_t last_idle_block;      /* last time, this mplx entered IDLE while
      +                                      * streams were ready */
      +    apr_time_t last_limit_change;    /* last time, worker limit changed */
      +    apr_interval_time_t limit_change_interval;
      +
      +    apr_thread_mutex_t *lock;
      +    struct apr_thread_cond_t *added_output;
      +    struct apr_thread_cond_t *task_thawed;
      +    struct apr_thread_cond_t *join_wait;
      +    
      +    apr_size_t stream_max_mem;
      +    apr_interval_time_t stream_timeout;
      +    
      +    apr_pool_t *spare_io_pool;
      +    apr_array_header_t *spare_slaves; /* spare slave connections */
      +    
      +    struct h2_workers *workers;
      +    int tx_handles_reserved;
      +    int tx_chunk_size;
      +    
      +    h2_mplx_consumed_cb *input_consumed;
      +    void *input_consumed_ctx;
      +
      +    struct h2_ngn_shed *ngn_shed;
      +};
      +
      +
      +
      +/*******************************************************************************
      + * Object lifecycle and information.
      + ******************************************************************************/
      +
      +apr_status_t h2_mplx_child_init(apr_pool_t *pool, server_rec *s);
      +
      +/**
      + * Create the multiplexer for the given HTTP2 session. 
      + * Implicitly has reference count 1.
      + */
      +h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *master, 
      +                        const struct h2_config *conf, 
      +                        apr_interval_time_t stream_timeout,
      +                        struct h2_workers *workers);
      +
      +/**
      + * Decreases the reference counter of this mplx and waits for it
      + * to reached 0, destroy the mplx afterwards.
      + * This is to be called from the thread that created the mplx in
      + * the first place.
      + * @param m the mplx to be released and destroyed
      + * @param wait condition var to wait on for ref counter == 0
      + */ 
      +apr_status_t h2_mplx_release_and_join(h2_mplx *m, struct apr_thread_cond_t *wait);
      +
      +/**
      + * Aborts the multiplexer. It will answer all future invocation with
      + * APR_ECONNABORTED, leading to early termination of ongoing streams.
      + */
      +void h2_mplx_abort(h2_mplx *mplx);
      +
      +struct h2_task *h2_mplx_pop_task(h2_mplx *mplx, int *has_more);
      +
      +void h2_mplx_task_done(h2_mplx *m, struct h2_task *task, struct h2_task **ptask);
      +
      +/**
      + * Shut down the multiplexer gracefully. Will no longer schedule new streams
      + * but let the ongoing ones finish normally.
      + * @return the highest stream id being/been processed
      + */
      +int h2_mplx_shutdown(h2_mplx *m);
      +
      +int h2_mplx_is_busy(h2_mplx *m);
      +
      +/*******************************************************************************
      + * IO lifetime of streams.
      + ******************************************************************************/
      +
      +struct h2_stream *h2_mplx_stream_get(h2_mplx *m, int id);
      +
      +/**
      + * Notifies mplx that a stream has finished processing.
      + * 
      + * @param m the mplx itself
      + * @param stream the id of the stream being done
      + * @param rst_error if != 0, the stream was reset with the error given
      + *
      + */
      +apr_status_t h2_mplx_stream_done(h2_mplx *m, struct h2_stream *stream);
      +
      +/**
      + * Waits on output data from any stream in this session to become available. 
      + * Returns APR_TIMEUP if no data arrived in the given time.
      + */
      +apr_status_t h2_mplx_out_trywait(h2_mplx *m, apr_interval_time_t timeout,
      +                                 struct apr_thread_cond_t *iowait);
      +
      +apr_status_t h2_mplx_keep_active(h2_mplx *m, int stream_id);
      +
      +/*******************************************************************************
      + * Stream processing.
      + ******************************************************************************/
      +
      +/**
      + * Process a stream request.
      + * 
      + * @param m the multiplexer
      + * @param stream the identifier of the stream
      + * @param r the request to be processed
      + * @param cmp the stream priority compare function
      + * @param ctx context data for the compare function
      + */
      +apr_status_t h2_mplx_process(h2_mplx *m, struct h2_stream *stream, 
      +                             h2_stream_pri_cmp *cmp, void *ctx);
      +
      +/**
      + * Stream priorities have changed, reschedule pending requests.
      + * 
      + * @param m the multiplexer
      + * @param cmp the stream priority compare function
      + * @param ctx context data for the compare function
      + */
      +apr_status_t h2_mplx_reprioritize(h2_mplx *m, h2_stream_pri_cmp *cmp, void *ctx);
      +
      +/**
      + * Register a callback for the amount of input data consumed per stream. The
      + * will only ever be invoked from the thread creating this h2_mplx, e.g. when
      + * calls from that thread into this h2_mplx are made.
      + *
      + * @param m the multiplexer to register the callback at
      + * @param cb the function to invoke
      + * @param ctx user supplied argument to invocation.
      + */
      +void h2_mplx_set_consumed_cb(h2_mplx *m, h2_mplx_consumed_cb *cb, void *ctx);
      +
      +
      +typedef apr_status_t stream_ev_callback(void *ctx, struct h2_stream *stream);
      +
      +/**
      + * Dispatch events for the master connection, such as
      + ± @param m the multiplexer
      + * @param on_resume new output data has arrived for a suspended stream 
      + * @param ctx user supplied argument to invocation.
      + */
      +apr_status_t h2_mplx_dispatch_master_events(h2_mplx *m, 
      +                                            stream_ev_callback *on_resume, 
      +                                            void *ctx);
      +
      +int h2_mplx_awaits_data(h2_mplx *m);
      +
      +typedef int h2_mplx_stream_cb(struct h2_stream *s, void *ctx);
      +
      +apr_status_t h2_mplx_stream_do(h2_mplx *m, h2_mplx_stream_cb *cb, void *ctx);
      +
      +/*******************************************************************************
      + * Output handling of streams.
      + ******************************************************************************/
      +
      +/**
      + * Opens the output for the given stream with the specified response.
      + */
      +apr_status_t h2_mplx_out_open(h2_mplx *mplx, int stream_id,
      +                              struct h2_bucket_beam *beam);
      +
      +/*******************************************************************************
      + * h2_mplx list Manipulation.
      + ******************************************************************************/
      +
      +/**
      + * The magic pointer value that indicates the head of a h2_mplx list
      + * @param  b The mplx list
      + * @return The magic pointer value
      + */
      +#define H2_MPLX_LIST_SENTINEL(b)	APR_RING_SENTINEL((b), h2_mplx, link)
      +
      +/**
      + * Determine if the mplx list is empty
      + * @param b The list to check
      + * @return true or false
      + */
      +#define H2_MPLX_LIST_EMPTY(b)	APR_RING_EMPTY((b), h2_mplx, link)
      +
      +/**
      + * Return the first mplx in a list
      + * @param b The list to query
      + * @return The first mplx in the list
      + */
      +#define H2_MPLX_LIST_FIRST(b)	APR_RING_FIRST(b)
      +
      +/**
      + * Return the last mplx in a list
      + * @param b The list to query
      + * @return The last mplx int he list
      + */
      +#define H2_MPLX_LIST_LAST(b)	APR_RING_LAST(b)
      +
      +/**
      + * Insert a single mplx at the front of a list
      + * @param b The list to add to
      + * @param e The mplx to insert
      + */
      +#define H2_MPLX_LIST_INSERT_HEAD(b, e) do {				\
      +h2_mplx *ap__b = (e);                                        \
      +APR_RING_INSERT_HEAD((b), ap__b, h2_mplx, link);	\
      +} while (0)
      +
      +/**
      + * Insert a single mplx at the end of a list
      + * @param b The list to add to
      + * @param e The mplx to insert
      + */
      +#define H2_MPLX_LIST_INSERT_TAIL(b, e) do {				\
      +h2_mplx *ap__b = (e);					\
      +APR_RING_INSERT_TAIL((b), ap__b, h2_mplx, link);	\
      +} while (0)
      +
      +/**
      + * Get the next mplx in the list
      + * @param e The current mplx
      + * @return The next mplx
      + */
      +#define H2_MPLX_NEXT(e)	APR_RING_NEXT((e), link)
      +/**
      + * Get the previous mplx in the list
      + * @param e The current mplx
      + * @return The previous mplx
      + */
      +#define H2_MPLX_PREV(e)	APR_RING_PREV((e), link)
      +
      +/**
      + * Remove a mplx from its list
      + * @param e The mplx to remove
      + */
      +#define H2_MPLX_REMOVE(e)	APR_RING_REMOVE((e), link)
      +
      +/*******************************************************************************
      + * h2_mplx DoS protection
      + ******************************************************************************/
      +
      +/**
      + * Master connection has entered idle mode.
      + * @param m the mplx instance of the master connection
      + * @return != SUCCESS iff connection should be terminated
      + */
      +apr_status_t h2_mplx_idle(h2_mplx *m);
      +
      +/*******************************************************************************
      + * h2_req_engine handling
      + ******************************************************************************/
      +
      +typedef void h2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed);
      +typedef apr_status_t h2_mplx_req_engine_init(struct h2_req_engine *engine, 
      +                                             const char *id, 
      +                                             const char *type,
      +                                             apr_pool_t *pool, 
      +                                             apr_size_t req_buffer_size,
      +                                             request_rec *r,
      +                                             h2_output_consumed **pconsumed,
      +                                             void **pbaton);
      +
      +apr_status_t h2_mplx_req_engine_push(const char *ngn_type, 
      +                                     request_rec *r, 
      +                                     h2_mplx_req_engine_init *einit);
      +apr_status_t h2_mplx_req_engine_pull(struct h2_req_engine *ngn, 
      +                                     apr_read_type_e block, 
      +                                     int capacity, 
      +                                     request_rec **pr);
      +void h2_mplx_req_engine_done(struct h2_req_engine *ngn, conn_rec *r_conn,
      +                             apr_status_t status);
      +
      +#endif /* defined(__mod_h2__h2_mplx__) */
      diff --git a/modules/http2/h2_ngn_shed.c b/modules/http2/h2_ngn_shed.c
      new file mode 100644
      index 00000000000..e0c40cfb233
      --- /dev/null
      +++ b/modules/http2/h2_ngn_shed.c
      @@ -0,0 +1,380 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +#include <stdlib.h>
      +
      +#include <apr_thread_mutex.h>
      +#include <apr_thread_cond.h>
      +#include <apr_strings.h>
      +#include <apr_time.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +
      +#include "mod_http2.h"
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_config.h"
      +#include "h2_conn.h"
      +#include "h2_ctx.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_request.h"
      +#include "h2_task.h"
      +#include "h2_util.h"
      +#include "h2_ngn_shed.h"
      +
      +
      +typedef struct h2_ngn_entry h2_ngn_entry;
      +struct h2_ngn_entry {
      +    APR_RING_ENTRY(h2_ngn_entry) link;
      +    h2_task *task;
      +    request_rec *r;
      +};
      +
      +#define H2_NGN_ENTRY_NEXT(e)	APR_RING_NEXT((e), link)
      +#define H2_NGN_ENTRY_PREV(e)	APR_RING_PREV((e), link)
      +#define H2_NGN_ENTRY_REMOVE(e)	APR_RING_REMOVE((e), link)
      +
      +#define H2_REQ_ENTRIES_SENTINEL(b)	APR_RING_SENTINEL((b), h2_ngn_entry, link)
      +#define H2_REQ_ENTRIES_EMPTY(b)	APR_RING_EMPTY((b), h2_ngn_entry, link)
      +#define H2_REQ_ENTRIES_FIRST(b)	APR_RING_FIRST(b)
      +#define H2_REQ_ENTRIES_LAST(b)	APR_RING_LAST(b)
      +
      +#define H2_REQ_ENTRIES_INSERT_HEAD(b, e) do {				\
      +h2_ngn_entry *ap__b = (e);                                        \
      +APR_RING_INSERT_HEAD((b), ap__b, h2_ngn_entry, link);	\
      +} while (0)
      +
      +#define H2_REQ_ENTRIES_INSERT_TAIL(b, e) do {				\
      +h2_ngn_entry *ap__b = (e);					\
      +APR_RING_INSERT_TAIL((b), ap__b, h2_ngn_entry, link);	\
      +} while (0)
      +
      +struct h2_req_engine {
      +    const char *id;        /* identifier */
      +    const char *type;      /* name of the engine type */
      +    apr_pool_t *pool;      /* pool for engine specific allocations */
      +    conn_rec *c;           /* connection this engine is assigned to */
      +    h2_task *task;         /* the task this engine is based on, running in */
      +    h2_ngn_shed *shed;
      +
      +    unsigned int shutdown : 1; /* engine is being shut down */
      +    unsigned int done : 1;     /* engine has finished */
      +
      +    APR_RING_HEAD(h2_req_entries, h2_ngn_entry) entries;
      +    int capacity;     /* maximum concurrent requests */
      +    int no_assigned;  /* # of assigned requests */
      +    int no_live;      /* # of live */
      +    int no_finished;  /* # of finished */
      +    
      +    h2_output_consumed *out_consumed;
      +    void *out_consumed_ctx;
      +};
      +
      +const char *h2_req_engine_get_id(h2_req_engine *engine)
      +{
      +    return engine->id;
      +}
      +
      +int h2_req_engine_is_shutdown(h2_req_engine *engine)
      +{
      +    return engine->shutdown;
      +}
      +
      +void h2_req_engine_out_consumed(h2_req_engine *engine, conn_rec *c, 
      +                                apr_off_t bytes)
      +{
      +    if (engine->out_consumed) {
      +        engine->out_consumed(engine->out_consumed_ctx, c, bytes);
      +    }
      +}
      +
      +h2_ngn_shed *h2_ngn_shed_create(apr_pool_t *pool, conn_rec *c,
      +                                int default_capacity, 
      +                                apr_size_t req_buffer_size)
      +{
      +    h2_ngn_shed *shed;
      +    
      +    shed = apr_pcalloc(pool, sizeof(*shed));
      +    shed->c = c;
      +    shed->pool = pool;
      +    shed->default_capacity = default_capacity;
      +    shed->req_buffer_size = req_buffer_size;
      +    shed->ngns = apr_hash_make(pool);
      +    
      +    return shed;
      +}
      +
      +void h2_ngn_shed_set_ctx(h2_ngn_shed *shed, void *user_ctx)
      +{
      +    shed->user_ctx = user_ctx;
      +}
      +
      +void *h2_ngn_shed_get_ctx(h2_ngn_shed *shed)
      +{
      +    return shed->user_ctx;
      +}
      +
      +h2_ngn_shed *h2_ngn_shed_get_shed(h2_req_engine *ngn)
      +{
      +    return ngn->shed;
      +}
      +
      +void h2_ngn_shed_abort(h2_ngn_shed *shed)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c, APLOGNO(03394)
      +                  "h2_ngn_shed(%ld): abort", shed->c->id);
      +    shed->aborted = 1;
      +}
      +
      +static void ngn_add_task(h2_req_engine *ngn, h2_task *task, request_rec *r)
      +{
      +    h2_ngn_entry *entry = apr_pcalloc(task->pool, sizeof(*entry));
      +    APR_RING_ELEM_INIT(entry, link);
      +    entry->task = task;
      +    entry->r = r;
      +    H2_REQ_ENTRIES_INSERT_TAIL(&ngn->entries, entry);
      +}
      +
      +
      +apr_status_t h2_ngn_shed_push_request(h2_ngn_shed *shed, const char *ngn_type, 
      +                                      request_rec *r, 
      +                                      http2_req_engine_init *einit) 
      +{
      +    h2_req_engine *ngn;
      +    h2_task *task = h2_ctx_rget_task(r);
      +
      +    ap_assert(task);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                  "h2_ngn_shed(%ld): PUSHing request (task=%s)", shed->c->id, 
      +                  task->id);
      +    if (task->request->serialize) {
      +        /* Max compatibility, deny processing of this */
      +        return APR_EOF;
      +    }
      +    
      +    if (task->assigned) {
      +        --task->assigned->no_assigned;
      +        --task->assigned->no_live;
      +        task->assigned = NULL;
      +    }
      +    
      +    ngn = apr_hash_get(shed->ngns, ngn_type, APR_HASH_KEY_STRING);
      +    if (ngn && !ngn->shutdown) {
      +        /* this task will be processed in another thread,
      +         * freeze any I/O for the time being. */
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                      "h2_ngn_shed(%ld): pushing request %s to %s", 
      +                      shed->c->id, task->id, ngn->id);
      +        if (!h2_task_has_thawed(task)) {
      +            h2_task_freeze(task);
      +        }
      +        ngn_add_task(ngn, task, r);
      +        ngn->no_assigned++;
      +        return APR_SUCCESS;
      +    }
      +    
      +    /* no existing engine or being shut down, start a new one */
      +    if (einit) {
      +        apr_status_t status;
      +        apr_pool_t *pool = task->pool;
      +        h2_req_engine *newngn;
      +        
      +        newngn = apr_pcalloc(pool, sizeof(*ngn));
      +        newngn->pool = pool;
      +        newngn->id   = apr_psprintf(pool, "ngn-%s", task->id);
      +        newngn->type = apr_pstrdup(pool, ngn_type);
      +        newngn->c    = task->c;
      +        newngn->shed = shed;
      +        newngn->capacity = shed->default_capacity;
      +        newngn->no_assigned = 1;
      +        newngn->no_live = 1;
      +        APR_RING_INIT(&newngn->entries, h2_ngn_entry, link);
      +        
      +        status = einit(newngn, newngn->id, newngn->type, newngn->pool,
      +                       shed->req_buffer_size, r,
      +                       &newngn->out_consumed, &newngn->out_consumed_ctx);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, task->c, APLOGNO(03395)
      +                      "h2_ngn_shed(%ld): create engine %s (%s)", 
      +                      shed->c->id, newngn->id, newngn->type);
      +        if (status == APR_SUCCESS) {
      +            ap_assert(task->engine == NULL);
      +            newngn->task = task;
      +            task->engine = newngn;
      +            task->assigned = newngn;
      +            apr_hash_set(shed->ngns, newngn->type, APR_HASH_KEY_STRING, newngn);
      +        }
      +        return status;
      +    }
      +    return APR_EOF;
      +}
      +
      +static h2_ngn_entry *pop_detached(h2_req_engine *ngn)
      +{
      +    h2_ngn_entry *entry;
      +    for (entry = H2_REQ_ENTRIES_FIRST(&ngn->entries);
      +         entry != H2_REQ_ENTRIES_SENTINEL(&ngn->entries);
      +         entry = H2_NGN_ENTRY_NEXT(entry)) {
      +        if (h2_task_has_thawed(entry->task) 
      +            || (entry->task->engine == ngn)) {
      +            /* The task hosting this engine can always be pulled by it.
      +             * For other task, they need to become detached, e.g. no longer
      +             * assigned to another worker. */
      +            H2_NGN_ENTRY_REMOVE(entry);
      +            return entry;
      +        }
      +    }
      +    return NULL;
      +}
      +
      +apr_status_t h2_ngn_shed_pull_request(h2_ngn_shed *shed, 
      +                                      h2_req_engine *ngn, 
      +                                      int capacity, 
      +                                      int want_shutdown,
      +                                      request_rec **pr)
      +{   
      +    h2_ngn_entry *entry;
      +    
      +    ap_assert(ngn);
      +    *pr = NULL;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, shed->c, APLOGNO(03396)
      +                  "h2_ngn_shed(%ld): pull task for engine %s, shutdown=%d", 
      +                  shed->c->id, ngn->id, want_shutdown);
      +    if (shed->aborted) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c, APLOGNO(03397)
      +                      "h2_ngn_shed(%ld): abort while pulling requests %s", 
      +                      shed->c->id, ngn->id);
      +        ngn->shutdown = 1;
      +        return APR_ECONNABORTED;
      +    }
      +    
      +    ngn->capacity = capacity;
      +    if (H2_REQ_ENTRIES_EMPTY(&ngn->entries)) {
      +        if (want_shutdown) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                          "h2_ngn_shed(%ld): emtpy queue, shutdown engine %s", 
      +                          shed->c->id, ngn->id);
      +            ngn->shutdown = 1;
      +        }
      +        return ngn->shutdown? APR_EOF : APR_EAGAIN;
      +    }
      +    
      +    if ((entry = pop_detached(ngn))) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, entry->task->c, APLOGNO(03398)
      +                      "h2_ngn_shed(%ld): pulled request %s for engine %s", 
      +                      shed->c->id, entry->task->id, ngn->id);
      +        ngn->no_live++;
      +        *pr = entry->r;
      +        entry->task->assigned = ngn;
      +        /* task will now run in ngn's own thread. Modules like lua
      +         * seem to require the correct thread set in the conn_rec.
      +         * See PR 59542. */
      +        if (entry->task->c && ngn->c) {
      +            entry->task->c->current_thread = ngn->c->current_thread;
      +        }
      +        if (entry->task->engine == ngn) {
      +            /* If an engine pushes its own base task, and then pulls
      +             * it back to itself again, it needs to be thawed.
      +             */
      +            h2_task_thaw(entry->task);
      +        }
      +        return APR_SUCCESS;
      +    }
      +    
      +    if (1) {
      +        h2_ngn_entry *entry = H2_REQ_ENTRIES_FIRST(&ngn->entries);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, shed->c, APLOGNO(03399)
      +                      "h2_ngn_shed(%ld): pull task, nothing, first task %s", 
      +                      shed->c->id, entry->task->id);
      +    }
      +    return APR_EAGAIN;
      +}
      +                                 
      +static apr_status_t ngn_done_task(h2_ngn_shed *shed, h2_req_engine *ngn, 
      +                                  h2_task *task, int waslive, int aborted)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, shed->c, APLOGNO(03400)
      +                  "h2_ngn_shed(%ld): task %s %s by %s", 
      +                  shed->c->id, task->id, aborted? "aborted":"done", ngn->id);
      +    ngn->no_finished++;
      +    if (waslive) ngn->no_live--;
      +    ngn->no_assigned--;
      +    task->assigned = NULL;
      +    
      +    return APR_SUCCESS;
      +}
      +                                
      +apr_status_t h2_ngn_shed_done_task(h2_ngn_shed *shed, 
      +                                    struct h2_req_engine *ngn, h2_task *task)
      +{
      +    return ngn_done_task(shed, ngn, task, 1, 0);
      +}
      +                                
      +void h2_ngn_shed_done_ngn(h2_ngn_shed *shed, struct h2_req_engine *ngn)
      +{
      +    if (ngn->done) {
      +        return;
      +    }
      +    
      +    if (!shed->aborted && !H2_REQ_ENTRIES_EMPTY(&ngn->entries)) {
      +        h2_ngn_entry *entry;
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                      "h2_ngn_shed(%ld): exit engine %s (%s), "
      +                      "has still requests queued, shutdown=%d,"
      +                      "assigned=%ld, live=%ld, finished=%ld", 
      +                      shed->c->id, ngn->id, ngn->type,
      +                      ngn->shutdown, 
      +                      (long)ngn->no_assigned, (long)ngn->no_live,
      +                      (long)ngn->no_finished);
      +        for (entry = H2_REQ_ENTRIES_FIRST(&ngn->entries);
      +             entry != H2_REQ_ENTRIES_SENTINEL(&ngn->entries);
      +             entry = H2_NGN_ENTRY_NEXT(entry)) {
      +            h2_task *task = entry->task;
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                          "h2_ngn_shed(%ld): engine %s has queued task %s, "
      +                          "frozen=%d, aborting",
      +                          shed->c->id, ngn->id, task->id, task->frozen);
      +            ngn_done_task(shed, ngn, task, 0, 1);
      +            task->engine = task->assigned = NULL;
      +        }
      +    }
      +    if (!shed->aborted && (ngn->no_assigned > 1 || ngn->no_live > 1)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                      "h2_ngn_shed(%ld): exit engine %s (%s), "
      +                      "assigned=%ld, live=%ld, finished=%ld", 
      +                      shed->c->id, ngn->id, ngn->type,
      +                      (long)ngn->no_assigned, (long)ngn->no_live,
      +                      (long)ngn->no_finished);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, shed->c,
      +                      "h2_ngn_shed(%ld): exit engine %s", 
      +                      shed->c->id, ngn->id);
      +    }
      +    
      +    apr_hash_set(shed->ngns, ngn->type, APR_HASH_KEY_STRING, NULL);
      +    ngn->done = 1;
      +}
      +
      +void h2_ngn_shed_destroy(h2_ngn_shed *shed)
      +{
      +    ap_assert(apr_hash_count(shed->ngns) == 0);
      +}
      +
      diff --git a/modules/http2/h2_ngn_shed.h b/modules/http2/h2_ngn_shed.h
      new file mode 100644
      index 00000000000..c6acbae253c
      --- /dev/null
      +++ b/modules/http2/h2_ngn_shed.h
      @@ -0,0 +1,78 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef h2_req_shed_h
      +#define h2_req_shed_h
      +
      +struct h2_req_engine;
      +struct h2_task;
      +
      +typedef struct h2_ngn_shed h2_ngn_shed;
      +struct h2_ngn_shed {
      +    conn_rec *c;
      +    apr_pool_t *pool;
      +    apr_hash_t *ngns;
      +    void *user_ctx;
      +    
      +    unsigned int aborted : 1;
      +    
      +    int default_capacity;
      +    apr_size_t req_buffer_size; /* preferred buffer size for responses */
      +};
      +
      +const char *h2_req_engine_get_id(h2_req_engine *engine);
      +int h2_req_engine_is_shutdown(h2_req_engine *engine);
      +
      +void h2_req_engine_out_consumed(h2_req_engine *engine, conn_rec *c, 
      +                                apr_off_t bytes);
      +
      +typedef apr_status_t h2_shed_ngn_init(h2_req_engine *engine, 
      +                                      const char *id, 
      +                                      const char *type,
      +                                      apr_pool_t *pool, 
      +                                      apr_size_t req_buffer_size,
      +                                      request_rec *r,
      +                                      h2_output_consumed **pconsumed,
      +                                      void **pbaton);
      +
      +h2_ngn_shed *h2_ngn_shed_create(apr_pool_t *pool, conn_rec *c,
      +                                int default_capactiy, 
      +                                apr_size_t req_buffer_size); 
      +
      +void h2_ngn_shed_destroy(h2_ngn_shed *shed);
      +
      +void h2_ngn_shed_set_ctx(h2_ngn_shed *shed, void *user_ctx);
      +void *h2_ngn_shed_get_ctx(h2_ngn_shed *shed);
      +
      +h2_ngn_shed *h2_ngn_shed_get_shed(struct h2_req_engine *ngn);
      +
      +void h2_ngn_shed_abort(h2_ngn_shed *shed);
      +
      +apr_status_t h2_ngn_shed_push_request(h2_ngn_shed *shed, const char *ngn_type, 
      +                                      request_rec *r, 
      +                                      h2_shed_ngn_init *init_cb);
      +
      +apr_status_t h2_ngn_shed_pull_request(h2_ngn_shed *shed, h2_req_engine *pub_ngn, 
      +                                      int capacity, 
      +                                      int want_shutdown, request_rec **pr);
      +
      +apr_status_t h2_ngn_shed_done_task(h2_ngn_shed *shed, 
      +                                   struct h2_req_engine *ngn, 
      +                                   struct h2_task *task);
      +
      +void h2_ngn_shed_done_ngn(h2_ngn_shed *shed, struct h2_req_engine *ngn);
      +
      +
      +#endif /* h2_req_shed_h */
      diff --git a/modules/http2/h2_private.h b/modules/http2/h2_private.h
      new file mode 100644
      index 00000000000..b68613692da
      --- /dev/null
      +++ b/modules/http2/h2_private.h
      @@ -0,0 +1,27 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef mod_h2_h2_private_h
      +#define mod_h2_h2_private_h
      +
      +#include <apr_time.h>
      +
      +#include <nghttp2/nghttp2.h>
      +
      +extern module AP_MODULE_DECLARE_DATA http2_module;
      +
      +APLOG_USE_MODULE(http2);
      +
      +#endif
      diff --git a/modules/http2/h2_proxy_session.c b/modules/http2/h2_proxy_session.c
      new file mode 100644
      index 00000000000..1dd2a418ddf
      --- /dev/null
      +++ b/modules/http2/h2_proxy_session.c
      @@ -0,0 +1,1546 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <stddef.h>
      +#include <apr_strings.h>
      +#include <nghttp2/nghttp2.h>
      +
      +#include <mpm_common.h>
      +#include <httpd.h>
      +#include <mod_proxy.h>
      +
      +#include "mod_http2.h"
      +#include "h2.h"
      +#include "h2_proxy_util.h"
      +#include "h2_proxy_session.h"
      +
      +APLOG_USE_MODULE(proxy_http2);
      +
      +typedef struct h2_proxy_stream {
      +    int id;
      +    apr_pool_t *pool;
      +    h2_proxy_session *session;
      +
      +    const char *url;
      +    request_rec *r;
      +    h2_proxy_request *req;
      +    const char *real_server_uri;
      +    const char *p_server_uri;
      +    int standalone;
      +
      +    h2_stream_state_t state;
      +    unsigned int suspended : 1;
      +    unsigned int waiting_on_100 : 1;
      +    unsigned int waiting_on_ping : 1;
      +    uint32_t error_code;
      +
      +    apr_bucket_brigade *input;
      +    apr_off_t data_sent;
      +    apr_bucket_brigade *output;
      +    apr_off_t data_received;
      +    
      +    apr_table_t *saves;
      +} h2_proxy_stream;
      +
      +
      +static void dispatch_event(h2_proxy_session *session, h2_proxys_event_t ev, 
      +                           int arg, const char *msg);
      +static void ping_arrived(h2_proxy_session *session);
      +static apr_status_t check_suspended(h2_proxy_session *session);
      +static void stream_resume(h2_proxy_stream *stream);
      +
      +
      +static apr_status_t proxy_session_pre_close(void *theconn)
      +{
      +    proxy_conn_rec *p_conn = (proxy_conn_rec *)theconn;
      +    h2_proxy_session *session = p_conn->data;
      +
      +    if (session && session->ngh2) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, 
      +                      "proxy_session(%s): pool cleanup, state=%d, streams=%d",
      +                      session->id, session->state, 
      +                      (int)h2_proxy_ihash_count(session->streams));
      +        session->aborted = 1;
      +        dispatch_event(session, H2_PROXYS_EV_PRE_CLOSE, 0, NULL);
      +        nghttp2_session_del(session->ngh2);
      +        session->ngh2 = NULL;
      +        p_conn->data = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static int proxy_pass_brigade(apr_bucket_alloc_t *bucket_alloc,
      +                              proxy_conn_rec *p_conn,
      +                              conn_rec *origin, apr_bucket_brigade *bb,
      +                              int flush)
      +{
      +    apr_status_t status;
      +    apr_off_t transferred;
      +
      +    if (flush) {
      +        apr_bucket *e = apr_bucket_flush_create(bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, e);
      +    }
      +    apr_brigade_length(bb, 0, &transferred);
      +    if (transferred != -1)
      +        p_conn->worker->s->transferred += transferred;
      +    status = ap_pass_brigade(origin->output_filters, bb);
      +    /* Cleanup the brigade now to avoid buckets lifetime
      +     * issues in case of error returned below. */
      +    apr_brigade_cleanup(bb);
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, origin, APLOGNO(03357)
      +                      "pass output failed to %pI (%s)",
      +                      p_conn->addr, p_conn->hostname);
      +    }
      +    return status;
      +}
      +
      +static ssize_t raw_send(nghttp2_session *ngh2, const uint8_t *data,
      +                        size_t length, int flags, void *user_data)
      +{
      +    h2_proxy_session *session = user_data;
      +    apr_bucket *b;
      +    apr_status_t status;
      +    int flush = 1;
      +
      +    if (data) {
      +        b = apr_bucket_transient_create((const char*)data, length, 
      +                                        session->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(session->output, b);
      +    }
      +
      +    status = proxy_pass_brigade(session->c->bucket_alloc,  
      +                                session->p_conn, session->c, 
      +                                session->output, flush);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c, 
      +                  "h2_proxy_sesssion(%s): raw_send %d bytes, flush=%d", 
      +                  session->id, (int)length, flush);
      +    if (status != APR_SUCCESS) {
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    return length;
      +}
      +
      +static int on_frame_recv(nghttp2_session *ngh2, const nghttp2_frame *frame,
      +                         void *user_data) 
      +{
      +    h2_proxy_session *session = user_data;
      +    h2_proxy_stream *stream;
      +    request_rec *r;
      +    int n;
      +    
      +    if (APLOGcdebug(session->c)) {
      +        char buffer[256];
      +        
      +        h2_proxy_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03341)
      +                      "h2_proxy_session(%s): recv FRAME[%s]",
      +                      session->id, buffer);
      +    }
      +
      +    session->last_frame_received = apr_time_now();
      +    switch (frame->hd.type) {
      +        case NGHTTP2_HEADERS:
      +            stream = nghttp2_session_get_stream_user_data(ngh2, frame->hd.stream_id);
      +            if (!stream) {
      +                return NGHTTP2_ERR_CALLBACK_FAILURE;
      +            }
      +            r = stream->r;
      +            if (r->status >= 100 && r->status < 200) {
      +                /* By default, we will forward all interim responses when
      +                 * we are sitting on a HTTP/2 connection to the client */
      +                int forward = session->h2_front;
      +                switch(r->status) {
      +                    case 100:
      +                        if (stream->waiting_on_100) {
      +                            stream->waiting_on_100 = 0;
      +                            r->status_line = ap_get_status_line(r->status);
      +                            forward = 1;
      +                        } 
      +                        break;
      +                    case 103:
      +                        /* workaround until we get this into http protocol base
      +                         * parts. without this, unknown codes are converted to
      +                         * 500... */
      +                        r->status_line = "103 Early Hints";
      +                        break;
      +                    default:
      +                        r->status_line = ap_get_status_line(r->status);
      +                        break;
      +                }
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03487) 
      +                              "h2_proxy_session(%s): got interim HEADERS, "
      +                              "status=%d, will forward=%d",
      +                              session->id, r->status, forward);
      +                if (forward) {
      +                    ap_send_interim_response(r, 1);
      +                }
      +            }
      +            stream_resume(stream);
      +            break;
      +        case NGHTTP2_PING:
      +            if (session->check_ping) {
      +                session->check_ping = 0;
      +                ping_arrived(session);
      +            }
      +            break;
      +        case NGHTTP2_PUSH_PROMISE:
      +            break;
      +        case NGHTTP2_SETTINGS:
      +            if (frame->settings.niv > 0) {
      +                n = nghttp2_session_get_remote_settings(ngh2, NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS);
      +                if (n > 0) {
      +                    session->remote_max_concurrent = n;
      +                }
      +            }
      +            break;
      +        case NGHTTP2_GOAWAY:
      +            /* we expect the remote server to tell us the highest stream id
      +             * that it has started processing. */
      +            session->last_stream_id = frame->goaway.last_stream_id;
      +            dispatch_event(session, H2_PROXYS_EV_REMOTE_GOAWAY, 0, NULL);
      +            break;
      +        default:
      +            break;
      +    }
      +    return 0;
      +}
      +
      +static int before_frame_send(nghttp2_session *ngh2,
      +                             const nghttp2_frame *frame, void *user_data)
      +{
      +    h2_proxy_session *session = user_data;
      +    if (APLOGcdebug(session->c)) {
      +        char buffer[256];
      +
      +        h2_proxy_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03343)
      +                      "h2_proxy_session(%s): sent FRAME[%s]",
      +                      session->id, buffer);
      +    }
      +    return 0;
      +}
      +
      +static int add_header(void *table, const char *n, const char *v)
      +{
      +    apr_table_addn(table, n, v);
      +    return 1;
      +}
      +
      +static void process_proxy_header(h2_proxy_stream *stream, const char *n, const char *v)
      +{
      +    request_rec *r = stream->r;
      +    static const struct {
      +        const char *name;
      +        ap_proxy_header_reverse_map_fn func;
      +    } transform_hdrs[] = {
      +        { "Location", ap_proxy_location_reverse_map },
      +        { "Content-Location", ap_proxy_location_reverse_map },
      +        { "URI", ap_proxy_location_reverse_map },
      +        { "Destination", ap_proxy_location_reverse_map },
      +        { "Set-Cookie", ap_proxy_cookie_reverse_map },
      +        { NULL, NULL }
      +    };
      +    proxy_dir_conf *dconf;
      +    int i;
      +    
      +    for (i = 0; transform_hdrs[i].name; ++i) {
      +        if (!ap_cstr_casecmp(transform_hdrs[i].name, n)) {
      +            dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      +            apr_table_add(r->headers_out, n,
      +                          (*transform_hdrs[i].func)(r, dconf, v));
      +            return;
      +       }
      +    }
      +    if (!ap_cstr_casecmp("Link", n)) {
      +        dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      +        apr_table_add(r->headers_out, n,
      +                      h2_proxy_link_reverse_map(r, dconf, 
      +                      stream->real_server_uri, stream->p_server_uri, v));
      +        return;
      +    }
      +    apr_table_add(r->headers_out, n, v);
      +}
      +
      +static apr_status_t h2_proxy_stream_add_header_out(h2_proxy_stream *stream,
      +                                                   const char *n, apr_size_t nlen,
      +                                                   const char *v, apr_size_t vlen)
      +{
      +    if (n[0] == ':') {
      +        if (!stream->data_received && !strncmp(":status", n, nlen)) {
      +            char *s = apr_pstrndup(stream->r->pool, v, vlen);
      +            
      +            apr_table_setn(stream->r->notes, "proxy-status", s);
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, stream->session->c, 
      +                          "h2_proxy_stream(%s-%d): got status %s", 
      +                          stream->session->id, stream->id, s);
      +            stream->r->status = (int)apr_atoi64(s);
      +            if (stream->r->status <= 0) {
      +                stream->r->status = 500;
      +                return APR_EGENERAL;
      +            }
      +        }
      +        return APR_SUCCESS;
      +    }
      +    
      +    if (!h2_proxy_res_ignore_header(n, nlen)) {
      +        char *hname, *hvalue;
      +    
      +        hname = apr_pstrndup(stream->pool, n, nlen);
      +        h2_proxy_util_camel_case_header(hname, nlen);
      +        hvalue = apr_pstrndup(stream->pool, v, vlen);
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, stream->session->c, 
      +                      "h2_proxy_stream(%s-%d): got header %s: %s", 
      +                      stream->session->id, stream->id, hname, hvalue);
      +        process_proxy_header(stream, hname, hvalue);
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static int log_header(void *ctx, const char *key, const char *value)
      +{
      +    h2_proxy_stream *stream = ctx;
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, stream->r, 
      +                  "h2_proxy_stream(%s-%d), header_out %s: %s", 
      +                  stream->session->id, stream->id, key, value);
      +    return 1;
      +}
      +
      +static void h2_proxy_stream_end_headers_out(h2_proxy_stream *stream) 
      +{
      +    h2_proxy_session *session = stream->session;
      +    request_rec *r = stream->r;
      +    apr_pool_t *p = r->pool;
      +    
      +    /* Now, add in the cookies from the response to the ones already saved */
      +    apr_table_do(add_header, stream->saves, r->headers_out, "Set-Cookie", NULL);
      +    
      +    /* and now load 'em all in */
      +    if (!apr_is_empty_table(stream->saves)) {
      +        apr_table_unset(r->headers_out, "Set-Cookie");
      +        r->headers_out = apr_table_overlay(p, r->headers_out, stream->saves);
      +    }
      +    
      +    /* handle Via header in response */
      +    if (session->conf->viaopt != via_off 
      +        && session->conf->viaopt != via_block) {
      +        const char *server_name = ap_get_server_name(stream->r);
      +        apr_port_t port = ap_get_server_port(stream->r);
      +        char portstr[32];
      +        
      +        /* If USE_CANONICAL_NAME_OFF was configured for the proxy virtual host,
      +         * then the server name returned by ap_get_server_name() is the
      +         * origin server name (which doesn't make sense with Via: headers)
      +         * so we use the proxy vhost's name instead.
      +         */
      +        if (server_name == stream->r->hostname) {
      +            server_name = stream->r->server->server_hostname;
      +        }
      +        if (ap_is_default_port(port, stream->r)) {
      +            portstr[0] = '\0';
      +        }
      +        else {
      +            apr_snprintf(portstr, sizeof(portstr), ":%d", port);
      +        }
      +
      +        /* create a "Via:" response header entry and merge it */
      +        apr_table_addn(r->headers_out, "Via",
      +                       (session->conf->viaopt == via_full)
      +                       ? apr_psprintf(p, "%d.%d %s%s (%s)",
      +                                      HTTP_VERSION_MAJOR(r->proto_num),
      +                                      HTTP_VERSION_MINOR(r->proto_num),
      +                                      server_name, portstr,
      +                                      AP_SERVER_BASEVERSION)
      +                       : apr_psprintf(p, "%d.%d %s%s",
      +                                      HTTP_VERSION_MAJOR(r->proto_num),
      +                                      HTTP_VERSION_MINOR(r->proto_num),
      +                                      server_name, portstr)
      +                       );
      +    }
      +    
      +    if (APLOGrtrace2(stream->r)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, stream->r, 
      +                      "h2_proxy_stream(%s-%d), header_out after merging", 
      +                      stream->session->id, stream->id);
      +        apr_table_do(log_header, stream, stream->r->headers_out, NULL);
      +    }
      +}
      +
      +static int stream_response_data(nghttp2_session *ngh2, uint8_t flags,
      +                                int32_t stream_id, const uint8_t *data,
      +                                size_t len, void *user_data) 
      +{
      +    h2_proxy_session *session = user_data;
      +    h2_proxy_stream *stream;
      +    apr_bucket *b;
      +    apr_status_t status;
      +    
      +    stream = nghttp2_session_get_stream_user_data(ngh2, stream_id);
      +    if (!stream) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(03358)
      +                     "h2_proxy_session(%s): recv data chunk for "
      +                     "unknown stream %d, ignored", 
      +                     session->id, stream_id);
      +        return 0;
      +    }
      +    
      +    if (!stream->data_received) {
      +        /* last chance to manipulate response headers.
      +         * after this, only trailers */
      +        h2_proxy_stream_end_headers_out(stream);
      +    }
      +    stream->data_received += len;
      +    
      +    b = apr_bucket_transient_create((const char*)data, len, 
      +                                    stream->r->connection->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(stream->output, b);
      +    /* always flush after a DATA frame, as we have no other indication
      +     * of buffer use */
      +    b = apr_bucket_flush_create(stream->r->connection->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(stream->output, b);
      +    
      +    status = ap_pass_brigade(stream->r->output_filters, stream->output);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, stream->r, APLOGNO(03359)
      +                  "h2_proxy_session(%s): stream=%d, response DATA %ld, %ld"
      +                  " total", session->id, stream_id, (long)len,
      +                  (long)stream->data_received);
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c, APLOGNO(03344)
      +                      "h2_proxy_session(%s): passing output on stream %d", 
      +                      session->id, stream->id);
      +        nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE,
      +                                  stream_id, NGHTTP2_STREAM_CLOSED);
      +        return NGHTTP2_ERR_STREAM_CLOSING;
      +    }
      +    if (stream->standalone) {
      +        nghttp2_session_consume(ngh2, stream_id, len);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, stream->r,
      +                      "h2_proxy_session(%s): stream %d, win_update %d bytes",
      +                      session->id, stream_id, (int)len);
      +    }
      +    return 0;
      +}
      +
      +static int on_stream_close(nghttp2_session *ngh2, int32_t stream_id,
      +                           uint32_t error_code, void *user_data) 
      +{
      +    h2_proxy_session *session = user_data;
      +    h2_proxy_stream *stream;
      +    if (!session->aborted) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03360)
      +                      "h2_proxy_session(%s): stream=%d, closed, err=%d", 
      +                      session->id, stream_id, error_code);
      +        stream = h2_proxy_ihash_get(session->streams, stream_id);
      +        if (stream) {
      +            stream->error_code = error_code;
      +        }
      +        dispatch_event(session, H2_PROXYS_EV_STREAM_DONE, stream_id, NULL);
      +    }
      +    return 0;
      +}
      +
      +static int on_header(nghttp2_session *ngh2, const nghttp2_frame *frame,
      +                     const uint8_t *namearg, size_t nlen,
      +                     const uint8_t *valuearg, size_t vlen, uint8_t flags,
      +                     void *user_data) 
      +{
      +    h2_proxy_session *session = user_data;
      +    h2_proxy_stream *stream;
      +    const char *n = (const char*)namearg;
      +    const char *v = (const char*)valuearg;
      +    
      +    (void)session;
      +    if (frame->hd.type == NGHTTP2_HEADERS && nlen) {
      +        stream = nghttp2_session_get_stream_user_data(ngh2, frame->hd.stream_id);
      +        if (stream) {
      +            if (h2_proxy_stream_add_header_out(stream, n, nlen, v, vlen)) {
      +                return NGHTTP2_ERR_CALLBACK_FAILURE;
      +            }
      +        }
      +    }
      +    else if (frame->hd.type == NGHTTP2_PUSH_PROMISE) {
      +    }
      +    
      +    return 0;
      +}
      +
      +static ssize_t stream_request_data(nghttp2_session *ngh2, int32_t stream_id, 
      +                                   uint8_t *buf, size_t length,
      +                                   uint32_t *data_flags, 
      +                                   nghttp2_data_source *source, void *user_data)
      +{
      +    h2_proxy_stream *stream;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    *data_flags = 0;
      +    stream = nghttp2_session_get_stream_user_data(ngh2, stream_id);
      +    if (!stream) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(03361)
      +                     "h2_proxy_stream(%s): data_read, stream %d not found", 
      +                     stream->session->id, stream_id);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    
      +    if (stream->session->check_ping) {
      +        /* suspend until we hear from the other side */
      +        stream->waiting_on_ping = 1;
      +        status = APR_EAGAIN;
      +    }
      +    else if (stream->r->expecting_100) {
      +        /* suspend until the answer comes */
      +        stream->waiting_on_100 = 1;
      +        status = APR_EAGAIN;
      +    }
      +    else if (APR_BRIGADE_EMPTY(stream->input)) {
      +        status = ap_get_brigade(stream->r->input_filters, stream->input,
      +                                AP_MODE_READBYTES, APR_NONBLOCK_READ,
      +                                H2MAX(APR_BUCKET_BUFF_SIZE, length));
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, status, stream->r, 
      +                      "h2_proxy_stream(%s-%d): request body read", 
      +                      stream->session->id, stream->id);
      +    }
      +
      +    if (status == APR_SUCCESS) {
      +        ssize_t readlen = 0;
      +        while (status == APR_SUCCESS 
      +               && (readlen < length)
      +               && !APR_BRIGADE_EMPTY(stream->input)) {
      +            apr_bucket* b = APR_BRIGADE_FIRST(stream->input);
      +            if (APR_BUCKET_IS_METADATA(b)) {
      +                if (APR_BUCKET_IS_EOS(b)) {
      +                    *data_flags |= NGHTTP2_DATA_FLAG_EOF;
      +                }
      +                else {
      +                    /* we do nothing more regarding any meta here */
      +                }
      +            }
      +            else {
      +                const char *bdata = NULL;
      +                apr_size_t blen = 0;
      +                status = apr_bucket_read(b, &bdata, &blen, APR_BLOCK_READ);
      +                
      +                if (status == APR_SUCCESS && blen > 0) {
      +                    ssize_t copylen = H2MIN(length - readlen, blen);
      +                    memcpy(buf, bdata, copylen);
      +                    buf += copylen;
      +                    readlen += copylen;
      +                    if (copylen < blen) {
      +                        /* We have data left in the bucket. Split it. */
      +                        status = apr_bucket_split(b, copylen);
      +                    }
      +                }
      +            }
      +            apr_bucket_delete(b);
      +        }
      +
      +        stream->data_sent += readlen;
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, stream->r, APLOGNO(03468) 
      +                      "h2_proxy_stream(%d): request DATA %ld, %ld"
      +                      " total, flags=%d", 
      +                      stream->id, (long)readlen, (long)stream->data_sent,
      +                      (int)*data_flags);
      +        return readlen;
      +    }
      +    else if (APR_STATUS_IS_EAGAIN(status)) {
      +        /* suspended stream, needs to be re-awakened */
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, status, stream->r, 
      +                      "h2_proxy_stream(%s-%d): suspending", 
      +                      stream->session->id, stream_id);
      +        stream->suspended = 1;
      +        h2_proxy_iq_add(stream->session->suspended, stream->id, NULL, NULL);
      +        return NGHTTP2_ERR_DEFERRED;
      +    }
      +    else {
      +        nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE, 
      +                                  stream_id, NGHTTP2_STREAM_CLOSED);
      +        return NGHTTP2_ERR_STREAM_CLOSING;
      +    }
      +}
      +
      +#ifdef H2_NG2_INVALID_HEADER_CB
      +static int on_invalid_header_cb(nghttp2_session *ngh2, 
      +                                const nghttp2_frame *frame, 
      +                                const uint8_t *name, size_t namelen, 
      +                                const uint8_t *value, size_t valuelen, 
      +                                uint8_t flags, void *user_data)
      +{
      +    h2_proxy_session *session = user_data;
      +    if (APLOGcdebug(session->c)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03469)
      +                      "h2_proxy_session(%s-%d): denying stream with invalid header "
      +                      "'%s: %s'", session->id, (int)frame->hd.stream_id,
      +                      apr_pstrndup(session->pool, (const char *)name, namelen),
      +                      apr_pstrndup(session->pool, (const char *)value, valuelen));
      +    }
      +    return nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                     frame->hd.stream_id, 
      +                                     NGHTTP2_PROTOCOL_ERROR);
      +}
      +#endif
      +
      +h2_proxy_session *h2_proxy_session_setup(const char *id, proxy_conn_rec *p_conn,
      +                                         proxy_server_conf *conf,
      +                                         int h2_front, 
      +                                         unsigned char window_bits_connection,
      +                                         unsigned char window_bits_stream,
      +                                         h2_proxy_request_done *done)
      +{
      +    if (!p_conn->data) {
      +        apr_pool_t *pool = p_conn->scpool;
      +        h2_proxy_session *session;
      +        nghttp2_session_callbacks *cbs;
      +        nghttp2_option *option;
      +
      +        session = apr_pcalloc(pool, sizeof(*session));
      +        apr_pool_pre_cleanup_register(pool, p_conn, proxy_session_pre_close);
      +        p_conn->data = session;
      +        
      +        session->id = apr_pstrdup(p_conn->scpool, id);
      +        session->c = p_conn->connection;
      +        session->p_conn = p_conn;
      +        session->conf = conf;
      +        session->pool = p_conn->scpool;
      +        session->state = H2_PROXYS_ST_INIT;
      +        session->h2_front = h2_front;
      +        session->window_bits_stream = window_bits_stream;
      +        session->window_bits_connection = window_bits_connection;
      +        session->streams = h2_proxy_ihash_create(pool, offsetof(h2_proxy_stream, id));
      +        session->suspended = h2_proxy_iq_create(pool, 5);
      +        session->done = done;
      +    
      +        session->input = apr_brigade_create(session->pool, session->c->bucket_alloc);
      +        session->output = apr_brigade_create(session->pool, session->c->bucket_alloc);
      +    
      +        nghttp2_session_callbacks_new(&cbs);
      +        nghttp2_session_callbacks_set_on_frame_recv_callback(cbs, on_frame_recv);
      +        nghttp2_session_callbacks_set_on_data_chunk_recv_callback(cbs, stream_response_data);
      +        nghttp2_session_callbacks_set_on_stream_close_callback(cbs, on_stream_close);
      +        nghttp2_session_callbacks_set_on_header_callback(cbs, on_header);
      +        nghttp2_session_callbacks_set_before_frame_send_callback(cbs, before_frame_send);
      +        nghttp2_session_callbacks_set_send_callback(cbs, raw_send);
      +#ifdef H2_NG2_INVALID_HEADER_CB
      +        nghttp2_session_callbacks_set_on_invalid_header_callback(cbs, on_invalid_header_cb);
      +#endif
      +        
      +        nghttp2_option_new(&option);
      +        nghttp2_option_set_peer_max_concurrent_streams(option, 100);
      +        nghttp2_option_set_no_auto_window_update(option, 1);
      +        
      +        nghttp2_session_client_new2(&session->ngh2, cbs, session, option);
      +        
      +        nghttp2_option_del(option);
      +        nghttp2_session_callbacks_del(cbs);
      +
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03362)
      +                      "setup session for %s", p_conn->hostname);
      +    }
      +    else {
      +        h2_proxy_session *session = p_conn->data;
      +        apr_interval_time_t age = apr_time_now() - session->last_frame_received;
      +        if (age > apr_time_from_sec(1)) {
      +            session->check_ping = 1;
      +            nghttp2_submit_ping(session->ngh2, 0, (const uint8_t *)"nevergonnagiveyouup");
      +        }
      +    }
      +    return p_conn->data;
      +}
      +
      +static apr_status_t session_start(h2_proxy_session *session) 
      +{
      +    nghttp2_settings_entry settings[2];
      +    int rv, add_conn_window;
      +    apr_socket_t *s;
      +    
      +    s = ap_get_conn_socket(session->c);
      +#if (!defined(WIN32) && !defined(NETWARE)) || defined(DOXYGEN)
      +    if (s) {
      +        ap_sock_disable_nagle(s);
      +    }
      +#endif
      +    
      +    settings[0].settings_id = NGHTTP2_SETTINGS_ENABLE_PUSH;
      +    settings[0].value = 0;
      +    settings[1].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
      +    settings[1].value = (1 << session->window_bits_stream) - 1;
      +    
      +    rv = nghttp2_submit_settings(session->ngh2, NGHTTP2_FLAG_NONE, settings, 
      +                                 H2_ALEN(settings));
      +    
      +    /* If the connection window is larger than our default, trigger a WINDOW_UPDATE */
      +    add_conn_window = ((1 << session->window_bits_connection) - 1 -
      +                       NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE);
      +    if (!rv && add_conn_window != 0) {
      +        rv = nghttp2_submit_window_update(session->ngh2, NGHTTP2_FLAG_NONE, 0, add_conn_window);
      +    }
      +    return rv? APR_EGENERAL : APR_SUCCESS;
      +}
      +
      +static apr_status_t open_stream(h2_proxy_session *session, const char *url,
      +                                request_rec *r, int standalone,
      +                                h2_proxy_stream **pstream)
      +{
      +    h2_proxy_stream *stream;
      +    apr_uri_t puri;
      +    const char *authority, *scheme, *path;
      +    apr_status_t status;
      +
      +    stream = apr_pcalloc(r->pool, sizeof(*stream));
      +
      +    stream->pool = r->pool;
      +    stream->url = url;
      +    stream->r = r;
      +    stream->standalone = standalone;
      +    stream->session = session;
      +    stream->state = H2_STREAM_ST_IDLE;
      +    
      +    stream->input = apr_brigade_create(stream->pool, session->c->bucket_alloc);
      +    stream->output = apr_brigade_create(stream->pool, session->c->bucket_alloc);
      +    
      +    stream->req = h2_proxy_req_create(1, stream->pool, 0);
      +
      +    status = apr_uri_parse(stream->pool, url, &puri);
      +    if (status != APR_SUCCESS)
      +        return status;
      +
      +    scheme = (strcmp(puri.scheme, "h2")? "http" : "https");
      +    authority = puri.hostname;
      +    if (!ap_strchr_c(authority, ':') && puri.port
      +        && apr_uri_port_of_scheme(scheme) != puri.port) {
      +        /* port info missing and port is not default for scheme: append */
      +        authority = apr_psprintf(stream->pool, "%s:%d", authority, puri.port);
      +    }
      +    /* we need this for mapping relative uris in headers ("Link") back
      +     * to local uris */
      +    stream->real_server_uri = apr_psprintf(stream->pool, "%s://%s", scheme, authority); 
      +    stream->p_server_uri = apr_psprintf(stream->pool, "%s://%s", puri.scheme, authority); 
      +    path = apr_uri_unparse(stream->pool, &puri, APR_URI_UNP_OMITSITEPART);
      +    h2_proxy_req_make(stream->req, stream->pool, r->method, scheme,
      +                authority, path, r->headers_in);
      +
      +    /* Tuck away all already existing cookies */
      +    stream->saves = apr_table_make(r->pool, 2);
      +    apr_table_do(add_header, stream->saves, r->headers_out, "Set-Cookie", NULL);
      +
      +    *pstream = stream;
      +    
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t submit_stream(h2_proxy_session *session, h2_proxy_stream *stream)
      +{
      +    h2_proxy_ngheader *hd;
      +    nghttp2_data_provider *pp = NULL;
      +    nghttp2_data_provider provider;
      +    int rv, may_have_request_body = 1;
      +    apr_status_t status;
      +
      +    hd = h2_proxy_util_nghd_make_req(stream->pool, stream->req);
      +    
      +    /* If we expect a 100-continue response, we must refrain from reading
      +       any input until we get it. Reading the input will possibly trigger
      +       HTTP_IN filter to generate the 100-continue itself. */
      +    if (stream->waiting_on_100 || stream->waiting_on_ping) {
      +        /* make a small test if we get an EOF/EOS immediately */
      +        status = ap_get_brigade(stream->r->input_filters, stream->input,
      +                                AP_MODE_READBYTES, APR_NONBLOCK_READ,
      +                                APR_BUCKET_BUFF_SIZE);
      +        may_have_request_body = APR_STATUS_IS_EAGAIN(status)
      +                                || (status == APR_SUCCESS 
      +                                    && !APR_BUCKET_IS_EOS(APR_BRIGADE_FIRST(stream->input)));
      +    }
      +    
      +    if (may_have_request_body) {
      +        provider.source.fd = 0;
      +        provider.source.ptr = NULL;
      +        provider.read_callback = stream_request_data;
      +        pp = &provider;
      +    }
      +
      +    rv = nghttp2_submit_request(session->ngh2, NULL, 
      +                                hd->nv, hd->nvlen, pp, stream);
      +                                
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03363)
      +                  "h2_proxy_session(%s): submit %s%s -> %d", 
      +                  session->id, stream->req->authority, stream->req->path,
      +                  rv);
      +    if (rv > 0) {
      +        stream->id = rv;
      +        stream->state = H2_STREAM_ST_OPEN;
      +        h2_proxy_ihash_add(session->streams, stream);
      +        dispatch_event(session, H2_PROXYS_EV_STREAM_SUBMITTED, rv, NULL);
      +        
      +        return APR_SUCCESS;
      +    }
      +    return APR_EGENERAL;
      +}
      +
      +static apr_status_t feed_brigade(h2_proxy_session *session, apr_bucket_brigade *bb)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_size_t readlen = 0;
      +    ssize_t n;
      +    
      +    while (status == APR_SUCCESS && !APR_BRIGADE_EMPTY(bb)) {
      +        apr_bucket* b = APR_BRIGADE_FIRST(bb);
      +        
      +        if (APR_BUCKET_IS_METADATA(b)) {
      +            /* nop */
      +        }
      +        else {
      +            const char *bdata = NULL;
      +            apr_size_t blen = 0;
      +            
      +            status = apr_bucket_read(b, &bdata, &blen, APR_BLOCK_READ);
      +            if (status == APR_SUCCESS && blen > 0) {
      +                n = nghttp2_session_mem_recv(session->ngh2, (const uint8_t *)bdata, blen);
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, 
      +                              "h2_proxy_session(%s): feeding %ld bytes -> %ld", 
      +                              session->id, (long)blen, (long)n);
      +                if (n < 0) {
      +                    if (nghttp2_is_fatal((int)n)) {
      +                        status = APR_EGENERAL;
      +                    }
      +                }
      +                else {
      +                    readlen += n;
      +                    if (n < blen) {
      +                        apr_bucket_split(b, n);
      +                    }
      +                }
      +            }
      +        }
      +        apr_bucket_delete(b);
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c, 
      +                  "h2_proxy_session(%s): fed %ld bytes of input to session", 
      +                  session->id, (long)readlen);
      +    if (readlen == 0 && status == APR_SUCCESS) {
      +        return APR_EAGAIN;
      +    }
      +    return status;
      +}
      +
      +static apr_status_t h2_proxy_session_read(h2_proxy_session *session, int block, 
      +                                          apr_interval_time_t timeout)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    if (APR_BRIGADE_EMPTY(session->input)) {
      +        apr_socket_t *socket = NULL;
      +        apr_time_t save_timeout = -1;
      +        
      +        if (block) {
      +            socket = ap_get_conn_socket(session->c);
      +            if (socket) {
      +                apr_socket_timeout_get(socket, &save_timeout);
      +                apr_socket_timeout_set(socket, timeout);
      +            }
      +            else {
      +                /* cannot block on timeout */
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, session->c, APLOGNO(03379)
      +                              "h2_proxy_session(%s): unable to get conn socket", 
      +                              session->id);
      +                return APR_ENOTIMPL;
      +            }
      +        }
      +        
      +        status = ap_get_brigade(session->c->input_filters, session->input, 
      +                                AP_MODE_READBYTES, 
      +                                block? APR_BLOCK_READ : APR_NONBLOCK_READ, 
      +                                64 * 1024);
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE3, status, session->c, 
      +                      "h2_proxy_session(%s): read from conn", session->id);
      +        if (socket && save_timeout != -1) {
      +            apr_socket_timeout_set(socket, save_timeout);
      +        }
      +    }
      +    
      +    if (status == APR_SUCCESS) {
      +        status = feed_brigade(session, session->input);
      +    }
      +    else if (APR_STATUS_IS_TIMEUP(status)) {
      +        /* nop */
      +    }
      +    else if (!APR_STATUS_IS_EAGAIN(status)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c, APLOGNO(03380)
      +                      "h2_proxy_session(%s): read error", session->id);
      +        dispatch_event(session, H2_PROXYS_EV_CONN_ERROR, status, NULL);
      +    }
      +
      +    return status;
      +}
      +
      +apr_status_t h2_proxy_session_submit(h2_proxy_session *session, 
      +                                     const char *url, request_rec *r,
      +                                     int standalone)
      +{
      +    h2_proxy_stream *stream;
      +    apr_status_t status;
      +    
      +    status = open_stream(session, url, r, standalone, &stream);
      +    if (status == APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03381)
      +                      "process stream(%d): %s %s%s, original: %s", 
      +                      stream->id, stream->req->method, 
      +                      stream->req->authority, stream->req->path, 
      +                      r->the_request);
      +        status = submit_stream(session, stream);
      +    }
      +    return status;
      +}
      +
      +static void stream_resume(h2_proxy_stream *stream)
      +{
      +    h2_proxy_session *session = stream->session;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                  "h2_proxy_stream(%s-%d): resuming", 
      +                  session->id, stream->id);
      +    stream->suspended = 0;
      +    h2_proxy_iq_remove(session->suspended, stream->id);
      +    nghttp2_session_resume_data(session->ngh2, stream->id);
      +    dispatch_event(session, H2_PROXYS_EV_STREAM_RESUMED, 0, NULL);
      +}
      +
      +static apr_status_t check_suspended(h2_proxy_session *session)
      +{
      +    h2_proxy_stream *stream;
      +    int i, stream_id;
      +    apr_status_t status;
      +    
      +    for (i = 0; i < session->suspended->nelts; ++i) {
      +        stream_id = session->suspended->elts[i];
      +        stream = nghttp2_session_get_stream_user_data(session->ngh2, stream_id);
      +        if (stream) {
      +            if (stream->waiting_on_100 || stream->waiting_on_ping) {
      +                status = APR_EAGAIN;
      +            }
      +            else {
      +                status = ap_get_brigade(stream->r->input_filters, stream->input,
      +                                        AP_MODE_READBYTES, APR_NONBLOCK_READ,
      +                                        APR_BUCKET_BUFF_SIZE);
      +            }
      +            if (status == APR_SUCCESS && !APR_BRIGADE_EMPTY(stream->input)) {
      +                stream_resume(stream);
      +                check_suspended(session);
      +                return APR_SUCCESS;
      +            }
      +            else if (status != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(status)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, status, session->c, 
      +                              APLOGNO(03382) "h2_proxy_stream(%s-%d): check input", 
      +                              session->id, stream_id);
      +                stream_resume(stream);
      +                check_suspended(session);
      +                return APR_SUCCESS;
      +            }
      +        }
      +        else {
      +            /* gone? */
      +            h2_proxy_iq_remove(session->suspended, stream_id);
      +            check_suspended(session);
      +            return APR_SUCCESS;
      +        }
      +    }
      +    return APR_EAGAIN;
      +}
      +
      +static apr_status_t session_shutdown(h2_proxy_session *session, int reason, 
      +                                     const char *msg)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    const char *err = msg;
      +    
      +    ap_assert(session);
      +    if (!err && reason) {
      +        err = nghttp2_strerror(reason);
      +    }
      +    nghttp2_submit_goaway(session->ngh2, NGHTTP2_FLAG_NONE, 0, 
      +                          reason, (uint8_t*)err, err? strlen(err):0);
      +    status = nghttp2_session_send(session->ngh2);
      +    dispatch_event(session, H2_PROXYS_EV_LOCAL_GOAWAY, reason, err);
      +    return status;
      +}
      +
      +
      +static const char *StateNames[] = {
      +    "INIT",      /* H2_PROXYS_ST_INIT */
      +    "DONE",      /* H2_PROXYS_ST_DONE */
      +    "IDLE",      /* H2_PROXYS_ST_IDLE */
      +    "BUSY",      /* H2_PROXYS_ST_BUSY */
      +    "WAIT",      /* H2_PROXYS_ST_WAIT */
      +    "LSHUTDOWN", /* H2_PROXYS_ST_LOCAL_SHUTDOWN */
      +    "RSHUTDOWN", /* H2_PROXYS_ST_REMOTE_SHUTDOWN */
      +};
      +
      +static const char *state_name(h2_proxys_state state)
      +{
      +    if (state >= (sizeof(StateNames)/sizeof(StateNames[0]))) {
      +        return "unknown";
      +    }
      +    return StateNames[state];
      +}
      +
      +static int is_accepting_streams(h2_proxy_session *session)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_IDLE:
      +        case H2_PROXYS_ST_BUSY:
      +        case H2_PROXYS_ST_WAIT:
      +            return 1;
      +        default:
      +            return 0;
      +    }
      +}
      +
      +static void transit(h2_proxy_session *session, const char *action, 
      +                    h2_proxys_state nstate)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03345)
      +                  "h2_proxy_session(%s): transit [%s] -- %s --> [%s]", session->id,
      +                  state_name(session->state), action, state_name(nstate));
      +    session->state = nstate;
      +}
      +
      +static void ev_init(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_INIT:
      +            if (h2_proxy_ihash_empty(session->streams)) {
      +                transit(session, "init", H2_PROXYS_ST_IDLE);
      +            }
      +            else {
      +                transit(session, "init", H2_PROXYS_ST_BUSY);
      +            }
      +            break;
      +
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_local_goaway(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            /* already did that? */
      +            break;
      +        case H2_PROXYS_ST_IDLE:
      +        case H2_PROXYS_ST_REMOTE_SHUTDOWN:
      +            /* all done */
      +            transit(session, "local goaway", H2_PROXYS_ST_DONE);
      +            break;
      +        default:
      +            transit(session, "local goaway", H2_PROXYS_ST_LOCAL_SHUTDOWN);
      +            break;
      +    }
      +}
      +
      +static void ev_remote_goaway(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_REMOTE_SHUTDOWN:
      +            /* already received that? */
      +            break;
      +        case H2_PROXYS_ST_IDLE:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            /* all done */
      +            transit(session, "remote goaway", H2_PROXYS_ST_DONE);
      +            break;
      +        default:
      +            transit(session, "remote goaway", H2_PROXYS_ST_REMOTE_SHUTDOWN);
      +            break;
      +    }
      +}
      +
      +static void ev_conn_error(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_INIT:
      +        case H2_PROXYS_ST_DONE:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            /* just leave */
      +            transit(session, "conn error", H2_PROXYS_ST_DONE);
      +            break;
      +        
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, arg, session->c,
      +                          "h2_proxy_session(%s): conn error -> shutdown", session->id);
      +            session_shutdown(session, arg, msg);
      +            break;
      +    }
      +}
      +
      +static void ev_proto_error(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_DONE:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            /* just leave */
      +            transit(session, "proto error", H2_PROXYS_ST_DONE);
      +            break;
      +        
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                          "h2_proxy_session(%s): proto error -> shutdown", session->id);
      +            session_shutdown(session, arg, msg);
      +            break;
      +    }
      +}
      +
      +static void ev_conn_timeout(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            transit(session, "conn timeout", H2_PROXYS_ST_DONE);
      +            break;
      +        default:
      +            session_shutdown(session, arg, msg);
      +            transit(session, "conn timeout", H2_PROXYS_ST_DONE);
      +            break;
      +    }
      +}
      +
      +static void ev_no_io(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_BUSY:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +        case H2_PROXYS_ST_REMOTE_SHUTDOWN:
      +            /* nothing for input and output to do. If we remain
      +             * in this state, we go into a tight loop and suck up
      +             * CPU cycles. Ideally, we'd like to do a blocking read, but that
      +             * is not possible if we have scheduled tasks and wait
      +             * for them to produce something. */
      +            if (h2_proxy_ihash_empty(session->streams)) {
      +                if (!is_accepting_streams(session)) {
      +                    /* We are no longer accepting new streams and have
      +                     * finished processing existing ones. Time to leave. */
      +                    session_shutdown(session, arg, msg);
      +                    transit(session, "no io", H2_PROXYS_ST_DONE);
      +                }
      +                else {
      +                    /* When we have no streams, no task events are possible,
      +                     * switch to blocking reads */
      +                    transit(session, "no io", H2_PROXYS_ST_IDLE);
      +                }
      +            }
      +            else {
      +                /* Unable to do blocking reads, as we wait on events from
      +                 * task processing in other threads. Do a busy wait with
      +                 * backoff timer. */
      +                transit(session, "no io", H2_PROXYS_ST_WAIT);
      +            }
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_stream_submitted(h2_proxy_session *session, int stream_id, 
      +                                const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_IDLE:
      +        case H2_PROXYS_ST_WAIT:
      +            transit(session, "stream submitted", H2_PROXYS_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_stream_done(h2_proxy_session *session, int stream_id, 
      +                           const char *msg)
      +{
      +    h2_proxy_stream *stream;
      +    
      +    stream = nghttp2_session_get_stream_user_data(session->ngh2, stream_id);
      +    if (stream) {
      +        int touched = (stream->data_sent || 
      +                       stream_id <= session->last_stream_id);
      +        apr_status_t status = (stream->error_code == 0)? APR_SUCCESS : APR_EINVAL;
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03364)
      +                      "h2_proxy_sesssion(%s): stream(%d) closed "
      +                      "(touched=%d, error=%d)", 
      +                      session->id, stream_id, touched, stream->error_code);
      +        
      +        if (status != APR_SUCCESS) {
      +            stream->r->status = 500;
      +        }
      +        else if (!stream->data_received) {
      +            apr_bucket *b;
      +            /* if the response had no body, this is the time to flush
      +             * an empty brigade which will also write the resonse
      +             * headers */
      +            h2_proxy_stream_end_headers_out(stream);
      +            stream->data_received = 1;
      +            b = apr_bucket_flush_create(stream->r->connection->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(stream->output, b);
      +            b = apr_bucket_eos_create(stream->r->connection->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(stream->output, b);
      +            ap_pass_brigade(stream->r->output_filters, stream->output);
      +        }
      +        
      +        stream->state = H2_STREAM_ST_CLOSED;
      +        h2_proxy_ihash_remove(session->streams, stream_id);
      +        h2_proxy_iq_remove(session->suspended, stream_id);
      +        if (session->done) {
      +            session->done(session, stream->r, status, touched);
      +        }
      +    }
      +    
      +    switch (session->state) {
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_stream_resumed(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_WAIT:
      +            transit(session, "stream resumed", H2_PROXYS_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_data_read(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_IDLE:
      +        case H2_PROXYS_ST_WAIT:
      +            transit(session, "data read", H2_PROXYS_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void ev_ngh2_done(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_DONE:
      +            /* nop */
      +            break;
      +        default:
      +            transit(session, "nghttp2 done", H2_PROXYS_ST_DONE);
      +            break;
      +    }
      +}
      +
      +static void ev_pre_close(h2_proxy_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_PROXYS_ST_DONE:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +            /* nop */
      +            break;
      +        default:
      +            session_shutdown(session, arg, msg);
      +            break;
      +    }
      +}
      +
      +static void dispatch_event(h2_proxy_session *session, h2_proxys_event_t ev, 
      +                           int arg, const char *msg)
      +{
      +    switch (ev) {
      +        case H2_PROXYS_EV_INIT:
      +            ev_init(session, arg, msg);
      +            break;            
      +        case H2_PROXYS_EV_LOCAL_GOAWAY:
      +            ev_local_goaway(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_REMOTE_GOAWAY:
      +            ev_remote_goaway(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_CONN_ERROR:
      +            ev_conn_error(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_PROTO_ERROR:
      +            ev_proto_error(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_CONN_TIMEOUT:
      +            ev_conn_timeout(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_NO_IO:
      +            ev_no_io(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_STREAM_SUBMITTED:
      +            ev_stream_submitted(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_STREAM_DONE:
      +            ev_stream_done(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_STREAM_RESUMED:
      +            ev_stream_resumed(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_DATA_READ:
      +            ev_data_read(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_NGH2_DONE:
      +            ev_ngh2_done(session, arg, msg);
      +            break;
      +        case H2_PROXYS_EV_PRE_CLOSE:
      +            ev_pre_close(session, arg, msg);
      +            break;
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                          "h2_proxy_session(%s): unknown event %d", 
      +                          session->id, ev);
      +            break;
      +    }
      +}
      +
      +static int send_loop(h2_proxy_session *session)
      +{
      +    while (nghttp2_session_want_write(session->ngh2)) {
      +        int rv = nghttp2_session_send(session->ngh2);
      +        if (rv < 0 && nghttp2_is_fatal(rv)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                          "h2_proxy_session(%s): write, rv=%d", session->id, rv);
      +            dispatch_event(session, H2_PROXYS_EV_CONN_ERROR, rv, NULL);
      +            break;
      +        }
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +apr_status_t h2_proxy_session_process(h2_proxy_session *session)
      +{
      +    apr_status_t status;
      +    int have_written = 0, have_read = 0;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                  "h2_proxy_session(%s): process", session->id);
      +           
      +run_loop:
      +    switch (session->state) {
      +        case H2_PROXYS_ST_INIT:
      +            status = session_start(session);
      +            if (status == APR_SUCCESS) {
      +                dispatch_event(session, H2_PROXYS_EV_INIT, 0, NULL);
      +                goto run_loop;
      +            }
      +            else {
      +                dispatch_event(session, H2_PROXYS_EV_CONN_ERROR, status, NULL);
      +            }
      +            break;
      +            
      +        case H2_PROXYS_ST_BUSY:
      +        case H2_PROXYS_ST_LOCAL_SHUTDOWN:
      +        case H2_PROXYS_ST_REMOTE_SHUTDOWN:
      +            have_written = send_loop(session);
      +            
      +            if (nghttp2_session_want_read(session->ngh2)) {
      +                status = h2_proxy_session_read(session, 0, 0);
      +                if (status == APR_SUCCESS) {
      +                    have_read = 1;
      +                }
      +            }
      +            
      +            if (!have_written && !have_read 
      +                && !nghttp2_session_want_write(session->ngh2)) {
      +                dispatch_event(session, H2_PROXYS_EV_NO_IO, 0, NULL);
      +                goto run_loop;
      +            }
      +            break;
      +            
      +        case H2_PROXYS_ST_WAIT:
      +            if (check_suspended(session) == APR_EAGAIN) {
      +                /* no stream has become resumed. Do a blocking read with
      +                 * ever increasing timeouts... */
      +                if (session->wait_timeout < 25) {
      +                    session->wait_timeout = 25;
      +                }
      +                else {
      +                    session->wait_timeout = H2MIN(apr_time_from_msec(100), 
      +                                                  2*session->wait_timeout);
      +                }
      +                
      +                status = h2_proxy_session_read(session, 1, session->wait_timeout);
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE3, status, session->c, 
      +                              APLOGNO(03365)
      +                              "h2_proxy_session(%s): WAIT read, timeout=%fms", 
      +                              session->id, (float)session->wait_timeout/1000.0);
      +                if (status == APR_SUCCESS) {
      +                    have_read = 1;
      +                    dispatch_event(session, H2_PROXYS_EV_DATA_READ, 0, NULL);
      +                }
      +                else if (APR_STATUS_IS_TIMEUP(status)
      +                    || APR_STATUS_IS_EAGAIN(status)) {
      +                    /* go back to checking all inputs again */
      +                    transit(session, "wait cycle", H2_PROXYS_ST_BUSY);
      +                }
      +            }
      +            break;
      +            
      +        case H2_PROXYS_ST_IDLE:
      +            break;
      +
      +        case H2_PROXYS_ST_DONE: /* done, session terminated */
      +            return APR_EOF;
      +            
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, session->c,
      +                          APLOGNO(03346)"h2_proxy_session(%s): unknown state %d", 
      +                          session->id, session->state);
      +            dispatch_event(session, H2_PROXYS_EV_PROTO_ERROR, 0, NULL);
      +            break;
      +    }
      +
      +
      +    if (have_read || have_written) {
      +        session->wait_timeout = 0;
      +    }
      +    
      +    if (!nghttp2_session_want_read(session->ngh2)
      +        && !nghttp2_session_want_write(session->ngh2)) {
      +        dispatch_event(session, H2_PROXYS_EV_NGH2_DONE, 0, NULL);
      +    }
      +    
      +    return APR_SUCCESS; /* needs to be called again */
      +}
      +
      +typedef struct {
      +    h2_proxy_session *session;
      +    h2_proxy_request_done *done;
      +} cleanup_iter_ctx;
      +
      +static int cancel_iter(void *udata, void *val)
      +{
      +    cleanup_iter_ctx *ctx = udata;
      +    h2_proxy_stream *stream = val;
      +    nghttp2_submit_rst_stream(ctx->session->ngh2, NGHTTP2_FLAG_NONE,
      +                              stream->id, 0);
      +    return 1;
      +}
      +
      +void h2_proxy_session_cancel_all(h2_proxy_session *session)
      +{
      +    if (!h2_proxy_ihash_empty(session->streams)) {
      +        cleanup_iter_ctx ctx;
      +        ctx.session = session;
      +        ctx.done = session->done;
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03366)
      +                      "h2_proxy_session(%s): cancel  %d streams",
      +                      session->id, (int)h2_proxy_ihash_count(session->streams));
      +        h2_proxy_ihash_iter(session->streams, cancel_iter, &ctx);
      +        session_shutdown(session, 0, NULL);
      +    }
      +}
      +
      +static int done_iter(void *udata, void *val)
      +{
      +    cleanup_iter_ctx *ctx = udata;
      +    h2_proxy_stream *stream = val;
      +    int touched = (stream->data_sent || 
      +                   stream->id <= ctx->session->last_stream_id);
      +    ctx->done(ctx->session, stream->r, APR_ECONNABORTED, touched);
      +    return 1;
      +}
      +
      +void h2_proxy_session_cleanup(h2_proxy_session *session, 
      +                              h2_proxy_request_done *done)
      +{
      +    if (!h2_proxy_ihash_empty(session->streams)) {
      +        cleanup_iter_ctx ctx;
      +        ctx.session = session;
      +        ctx.done = done;
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03366)
      +                      "h2_proxy_session(%s): terminated, %d streams unfinished",
      +                      session->id, (int)h2_proxy_ihash_count(session->streams));
      +        h2_proxy_ihash_iter(session->streams, done_iter, &ctx);
      +        h2_proxy_ihash_clear(session->streams);
      +    }
      +}
      +
      +static int ping_arrived_iter(void *udata, void *val)
      +{
      +    h2_proxy_stream *stream = val;
      +    if (stream->waiting_on_ping) {
      +        stream->waiting_on_ping = 0;
      +        stream_resume(stream);
      +    }
      +    return 1;
      +}
      +
      +static void ping_arrived(h2_proxy_session *session)
      +{
      +    if (!h2_proxy_ihash_empty(session->streams)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03470)
      +                      "h2_proxy_session(%s): ping arrived, unblocking streams",
      +                      session->id);
      +        h2_proxy_ihash_iter(session->streams, ping_arrived_iter, &session);
      +    }
      +}
      +
      +typedef struct {
      +    h2_proxy_session *session;
      +    conn_rec *c;
      +    apr_off_t bytes;
      +    int updated;
      +} win_update_ctx;
      +
      +static int win_update_iter(void *udata, void *val)
      +{
      +    win_update_ctx *ctx = udata;
      +    h2_proxy_stream *stream = val;
      +    
      +    if (stream->r && stream->r->connection == ctx->c) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, ctx->session->c, 
      +                      "h2_proxy_session(%s-%d): win_update %ld bytes",
      +                      ctx->session->id, (int)stream->id, (long)ctx->bytes);
      +        nghttp2_session_consume(ctx->session->ngh2, stream->id, ctx->bytes);
      +        ctx->updated = 1;
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +
      +void h2_proxy_session_update_window(h2_proxy_session *session, 
      +                                    conn_rec *c, apr_off_t bytes)
      +{
      +    if (!h2_proxy_ihash_empty(session->streams)) {
      +        win_update_ctx ctx;
      +        ctx.session = session;
      +        ctx.c = c;
      +        ctx.bytes = bytes;
      +        ctx.updated = 0;
      +        h2_proxy_ihash_iter(session->streams, win_update_iter, &ctx);
      +        
      +        if (!ctx.updated) {
      +            /* could not find the stream any more, possibly closed, update
      +             * the connection window at least */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                          "h2_proxy_session(%s): win_update conn %ld bytes",
      +                          session->id, (long)bytes);
      +            nghttp2_session_consume_connection(session->ngh2, (size_t)bytes);
      +        }
      +    }
      +}
      +
      diff --git a/modules/http2/h2_proxy_session.h b/modules/http2/h2_proxy_session.h
      new file mode 100644
      index 00000000000..c9820563f56
      --- /dev/null
      +++ b/modules/http2/h2_proxy_session.h
      @@ -0,0 +1,117 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef h2_proxy_session_h
      +#define h2_proxy_session_h
      +
      +#define H2_ALEN(a)          (sizeof(a)/sizeof((a)[0]))
      +
      +#include <nghttp2/nghttp2.h>
      +
      +struct h2_proxy_iqueue;
      +struct h2_proxy_ihash_t;
      +
      +typedef enum {
      +    H2_PROXYS_ST_INIT,             /* send initial SETTINGS, etc. */
      +    H2_PROXYS_ST_DONE,             /* finished, connection close */
      +    H2_PROXYS_ST_IDLE,             /* no streams to process */
      +    H2_PROXYS_ST_BUSY,             /* read/write without stop */
      +    H2_PROXYS_ST_WAIT,             /* waiting for tasks reporting back */
      +    H2_PROXYS_ST_LOCAL_SHUTDOWN,   /* we announced GOAWAY */
      +    H2_PROXYS_ST_REMOTE_SHUTDOWN,  /* client announced GOAWAY */
      +} h2_proxys_state;
      +
      +typedef enum {
      +    H2_PROXYS_EV_INIT,             /* session was initialized */
      +    H2_PROXYS_EV_LOCAL_GOAWAY,     /* we send a GOAWAY */
      +    H2_PROXYS_EV_REMOTE_GOAWAY,    /* remote send us a GOAWAY */
      +    H2_PROXYS_EV_CONN_ERROR,       /* connection error */
      +    H2_PROXYS_EV_PROTO_ERROR,      /* protocol error */
      +    H2_PROXYS_EV_CONN_TIMEOUT,     /* connection timeout */
      +    H2_PROXYS_EV_NO_IO,            /* nothing has been read or written */
      +    H2_PROXYS_EV_STREAM_SUBMITTED, /* stream has been submitted */
      +    H2_PROXYS_EV_STREAM_DONE,      /* stream has been finished */
      +    H2_PROXYS_EV_STREAM_RESUMED,   /* stream signalled availability of headers/data */
      +    H2_PROXYS_EV_DATA_READ,        /* connection data has been read */
      +    H2_PROXYS_EV_NGH2_DONE,        /* nghttp2 wants neither read nor write anything */
      +    H2_PROXYS_EV_PRE_CLOSE,        /* connection will close after this */
      +} h2_proxys_event_t;
      +
      +
      +typedef struct h2_proxy_session h2_proxy_session;
      +typedef void h2_proxy_request_done(h2_proxy_session *s, request_rec *r,
      +                                   apr_status_t status, int touched);
      +
      +struct h2_proxy_session {
      +    const char *id;
      +    conn_rec *c;
      +    proxy_conn_rec *p_conn;
      +    proxy_server_conf *conf;
      +    apr_pool_t *pool;
      +    nghttp2_session *ngh2;   /* the nghttp2 session itself */
      +    
      +    unsigned int aborted : 1;
      +    unsigned int check_ping : 1;
      +    unsigned int h2_front : 1; /* if front-end connection is HTTP/2 */
      +
      +    h2_proxy_request_done *done;
      +    void *user_data;
      +    
      +    unsigned char window_bits_stream;
      +    unsigned char window_bits_connection;
      +
      +    h2_proxys_state state;
      +    apr_interval_time_t wait_timeout;
      +
      +    struct h2_proxy_ihash_t *streams;
      +    struct h2_proxy_iqueue *suspended;
      +    apr_size_t remote_max_concurrent;
      +    int last_stream_id;     /* last stream id processed by backend, or 0 */
      +    apr_time_t last_frame_received;
      +    
      +    apr_bucket_brigade *input;
      +    apr_bucket_brigade *output;
      +};
      +
      +h2_proxy_session *h2_proxy_session_setup(const char *id, proxy_conn_rec *p_conn,
      +                                         proxy_server_conf *conf,
      +                                         int h2_front, 
      +                                         unsigned char window_bits_connection,
      +                                         unsigned char window_bits_stream,
      +                                         h2_proxy_request_done *done);
      +
      +apr_status_t h2_proxy_session_submit(h2_proxy_session *s, const char *url,
      +                                     request_rec *r, int standalone);
      +                       
      +/** 
      + * Perform a step in processing the proxy session. Will return aftert
      + * one read/write cycle and indicate session status by status code.
      + * @param s the session to process
      + * @return APR_EAGAIN  when processing needs to be invoked again
      + *         APR_SUCCESS when all streams have been processed, session still live
      + *         APR_EOF     when the session has been terminated
      + */
      +apr_status_t h2_proxy_session_process(h2_proxy_session *s);
      +
      +void h2_proxy_session_cancel_all(h2_proxy_session *s);
      +
      +void h2_proxy_session_cleanup(h2_proxy_session *s, h2_proxy_request_done *done);
      +
      +void h2_proxy_session_update_window(h2_proxy_session *s, 
      +                                    conn_rec *c, apr_off_t bytes);
      +
      +#define H2_PROXY_REQ_URL_NOTE   "h2-proxy-req-url"
      +
      +#endif /* h2_proxy_session_h */
      diff --git a/modules/http2/h2_proxy_util.c b/modules/http2/h2_proxy_util.c
      new file mode 100644
      index 00000000000..b92a876f42b
      --- /dev/null
      +++ b/modules/http2/h2_proxy_util.c
      @@ -0,0 +1,1055 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <apr_lib.h>
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +#include <http_request.h>
      +#include <mod_proxy.h>
      +
      +#include <nghttp2/nghttp2.h>
      +
      +#include "h2.h"
      +#include "h2_proxy_util.h"
      +
      +APLOG_USE_MODULE(proxy_http2);
      +
      +/* h2_log2(n) iff n is a power of 2 */
      +unsigned char h2_proxy_log2(int n)
      +{
      +    int lz = 0;
      +    if (!n) {
      +        return 0;
      +    }
      +    if (!(n & 0xffff0000u)) {
      +        lz += 16;
      +        n = (n << 16);
      +    }
      +    if (!(n & 0xff000000u)) {
      +        lz += 8;
      +        n = (n << 8);
      +    }
      +    if (!(n & 0xf0000000u)) {
      +        lz += 4;
      +        n = (n << 4);
      +    }
      +    if (!(n & 0xc0000000u)) {
      +        lz += 2;
      +        n = (n << 2);
      +    }
      +    if (!(n & 0x80000000u)) {
      +        lz += 1;
      +    }
      +    
      +    return 31 - lz;
      +}
      +
      +/*******************************************************************************
      + * ihash - hash for structs with int identifier
      + ******************************************************************************/
      +struct h2_proxy_ihash_t {
      +    apr_hash_t *hash;
      +    size_t ioff;
      +};
      +
      +static unsigned int ihash(const char *key, apr_ssize_t *klen)
      +{
      +    return (unsigned int)(*((int*)key));
      +}
      +
      +h2_proxy_ihash_t *h2_proxy_ihash_create(apr_pool_t *pool, size_t offset_of_int)
      +{
      +    h2_proxy_ihash_t *ih = apr_pcalloc(pool, sizeof(h2_proxy_ihash_t));
      +    ih->hash = apr_hash_make_custom(pool, ihash);
      +    ih->ioff = offset_of_int;
      +    return ih;
      +}
      +
      +size_t h2_proxy_ihash_count(h2_proxy_ihash_t *ih)
      +{
      +    return apr_hash_count(ih->hash);
      +}
      +
      +int h2_proxy_ihash_empty(h2_proxy_ihash_t *ih)
      +{
      +    return apr_hash_count(ih->hash) == 0;
      +}
      +
      +void *h2_proxy_ihash_get(h2_proxy_ihash_t *ih, int id)
      +{
      +    return apr_hash_get(ih->hash, &id, sizeof(id));
      +}
      +
      +typedef struct {
      +    h2_proxy_ihash_iter_t *iter;
      +    void *ctx;
      +} iter_ctx;
      +
      +static int ihash_iter(void *ctx, const void *key, apr_ssize_t klen, 
      +                     const void *val)
      +{
      +    iter_ctx *ictx = ctx;
      +    return ictx->iter(ictx->ctx, (void*)val); /* why is this passed const?*/
      +}
      +
      +int h2_proxy_ihash_iter(h2_proxy_ihash_t *ih, h2_proxy_ihash_iter_t *fn, void *ctx)
      +{
      +    iter_ctx ictx;
      +    ictx.iter = fn;
      +    ictx.ctx = ctx;
      +    return apr_hash_do(ihash_iter, &ictx, ih->hash);
      +}
      +
      +void h2_proxy_ihash_add(h2_proxy_ihash_t *ih, void *val)
      +{
      +    apr_hash_set(ih->hash, ((char *)val + ih->ioff), sizeof(int), val);
      +}
      +
      +void h2_proxy_ihash_remove(h2_proxy_ihash_t *ih, int id)
      +{
      +    apr_hash_set(ih->hash, &id, sizeof(id), NULL);
      +}
      +
      +void h2_proxy_ihash_remove_val(h2_proxy_ihash_t *ih, void *val)
      +{
      +    int id = *((int*)((char *)val + ih->ioff));
      +    apr_hash_set(ih->hash, &id, sizeof(id), NULL);
      +}
      +
      +
      +void h2_proxy_ihash_clear(h2_proxy_ihash_t *ih)
      +{
      +    apr_hash_clear(ih->hash);
      +}
      +
      +typedef struct {
      +    h2_proxy_ihash_t *ih;
      +    void **buffer;
      +    size_t max;
      +    size_t len;
      +} collect_ctx;
      +
      +static int collect_iter(void *x, void *val)
      +{
      +    collect_ctx *ctx = x;
      +    if (ctx->len < ctx->max) {
      +        ctx->buffer[ctx->len++] = val;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +size_t h2_proxy_ihash_shift(h2_proxy_ihash_t *ih, void **buffer, size_t max)
      +{
      +    collect_ctx ctx;
      +    size_t i;
      +    
      +    ctx.ih = ih;
      +    ctx.buffer = buffer;
      +    ctx.max = max;
      +    ctx.len = 0;
      +    h2_proxy_ihash_iter(ih, collect_iter, &ctx);
      +    for (i = 0; i < ctx.len; ++i) {
      +        h2_proxy_ihash_remove_val(ih, buffer[i]);
      +    }
      +    return ctx.len;
      +}
      +
      +typedef struct {
      +    h2_proxy_ihash_t *ih;
      +    int *buffer;
      +    size_t max;
      +    size_t len;
      +} icollect_ctx;
      +
      +static int icollect_iter(void *x, void *val)
      +{
      +    icollect_ctx *ctx = x;
      +    if (ctx->len < ctx->max) {
      +        ctx->buffer[ctx->len++] = *((int*)((char *)val + ctx->ih->ioff));
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +size_t h2_proxy_ihash_ishift(h2_proxy_ihash_t *ih, int *buffer, size_t max)
      +{
      +    icollect_ctx ctx;
      +    size_t i;
      +    
      +    ctx.ih = ih;
      +    ctx.buffer = buffer;
      +    ctx.max = max;
      +    ctx.len = 0;
      +    h2_proxy_ihash_iter(ih, icollect_iter, &ctx);
      +    for (i = 0; i < ctx.len; ++i) {
      +        h2_proxy_ihash_remove(ih, buffer[i]);
      +    }
      +    return ctx.len;
      +}
      +
      +/*******************************************************************************
      + * iqueue - sorted list of int
      + ******************************************************************************/
      +
      +static void iq_grow(h2_proxy_iqueue *q, int nlen);
      +static void iq_swap(h2_proxy_iqueue *q, int i, int j);
      +static int iq_bubble_up(h2_proxy_iqueue *q, int i, int top, 
      +                        h2_proxy_iq_cmp *cmp, void *ctx);
      +static int iq_bubble_down(h2_proxy_iqueue *q, int i, int bottom, 
      +                          h2_proxy_iq_cmp *cmp, void *ctx);
      +
      +h2_proxy_iqueue *h2_proxy_iq_create(apr_pool_t *pool, int capacity)
      +{
      +    h2_proxy_iqueue *q = apr_pcalloc(pool, sizeof(h2_proxy_iqueue));
      +    if (q) {
      +        q->pool = pool;
      +        iq_grow(q, capacity);
      +        q->nelts = 0;
      +    }
      +    return q;
      +}
      +
      +int h2_proxy_iq_empty(h2_proxy_iqueue *q)
      +{
      +    return q->nelts == 0;
      +}
      +
      +int h2_proxy_iq_count(h2_proxy_iqueue *q)
      +{
      +    return q->nelts;
      +}
      +
      +
      +void h2_proxy_iq_add(h2_proxy_iqueue *q, int sid, h2_proxy_iq_cmp *cmp, void *ctx)
      +{
      +    int i;
      +    
      +    if (q->nelts >= q->nalloc) {
      +        iq_grow(q, q->nalloc * 2);
      +    }
      +    
      +    i = (q->head + q->nelts) % q->nalloc;
      +    q->elts[i] = sid;
      +    ++q->nelts;
      +    
      +    if (cmp) {
      +        /* bubble it to the front of the queue */
      +        iq_bubble_up(q, i, q->head, cmp, ctx);
      +    }
      +}
      +
      +int h2_proxy_iq_remove(h2_proxy_iqueue *q, int sid)
      +{
      +    int i;
      +    for (i = 0; i < q->nelts; ++i) {
      +        if (sid == q->elts[(q->head + i) % q->nalloc]) {
      +            break;
      +        }
      +    }
      +    
      +    if (i < q->nelts) {
      +        ++i;
      +        for (; i < q->nelts; ++i) {
      +            q->elts[(q->head+i-1)%q->nalloc] = q->elts[(q->head+i)%q->nalloc];
      +        }
      +        --q->nelts;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +void h2_proxy_iq_clear(h2_proxy_iqueue *q)
      +{
      +    q->nelts = 0;
      +}
      +
      +void h2_proxy_iq_sort(h2_proxy_iqueue *q, h2_proxy_iq_cmp *cmp, void *ctx)
      +{
      +    /* Assume that changes in ordering are minimal. This needs,
      +     * best case, q->nelts - 1 comparisons to check that nothing
      +     * changed.
      +     */
      +    if (q->nelts > 0) {
      +        int i, ni, prev, last;
      +        
      +        /* Start at the end of the queue and create a tail of sorted
      +         * entries. Make that tail one element longer in each iteration.
      +         */
      +        last = i = (q->head + q->nelts - 1) % q->nalloc;
      +        while (i != q->head) {
      +            prev = (q->nalloc + i - 1) % q->nalloc;
      +            
      +            ni = iq_bubble_up(q, i, prev, cmp, ctx);
      +            if (ni == prev) {
      +                /* i bubbled one up, bubble the new i down, which
      +                 * keeps all tasks below i sorted. */
      +                iq_bubble_down(q, i, last, cmp, ctx);
      +            }
      +            i = prev;
      +        };
      +    }
      +}
      +
      +
      +int h2_proxy_iq_shift(h2_proxy_iqueue *q)
      +{
      +    int sid;
      +    
      +    if (q->nelts <= 0) {
      +        return 0;
      +    }
      +    
      +    sid = q->elts[q->head];
      +    q->head = (q->head + 1) % q->nalloc;
      +    q->nelts--;
      +    
      +    return sid;
      +}
      +
      +static void iq_grow(h2_proxy_iqueue *q, int nlen)
      +{
      +    if (nlen > q->nalloc) {
      +        int *nq = apr_pcalloc(q->pool, sizeof(int) * nlen);
      +        if (q->nelts > 0) {
      +            int l = ((q->head + q->nelts) % q->nalloc) - q->head;
      +            
      +            memmove(nq, q->elts + q->head, sizeof(int) * l);
      +            if (l < q->nelts) {
      +                /* elts wrapped, append elts in [0, remain] to nq */
      +                int remain = q->nelts - l;
      +                memmove(nq + l, q->elts, sizeof(int) * remain);
      +            }
      +        }
      +        q->elts = nq;
      +        q->nalloc = nlen;
      +        q->head = 0;
      +    }
      +}
      +
      +static void iq_swap(h2_proxy_iqueue *q, int i, int j)
      +{
      +    int x = q->elts[i];
      +    q->elts[i] = q->elts[j];
      +    q->elts[j] = x;
      +}
      +
      +static int iq_bubble_up(h2_proxy_iqueue *q, int i, int top, 
      +                        h2_proxy_iq_cmp *cmp, void *ctx) 
      +{
      +    int prev;
      +    while (((prev = (q->nalloc + i - 1) % q->nalloc), i != top) 
      +           && (*cmp)(q->elts[i], q->elts[prev], ctx) < 0) {
      +        iq_swap(q, prev, i);
      +        i = prev;
      +    }
      +    return i;
      +}
      +
      +static int iq_bubble_down(h2_proxy_iqueue *q, int i, int bottom, 
      +                          h2_proxy_iq_cmp *cmp, void *ctx)
      +{
      +    int next;
      +    while (((next = (q->nalloc + i + 1) % q->nalloc), i != bottom) 
      +           && (*cmp)(q->elts[i], q->elts[next], ctx) > 0) {
      +        iq_swap(q, next, i);
      +        i = next;
      +    }
      +    return i;
      +}
      +
      +/*******************************************************************************
      + * h2_proxy_ngheader
      + ******************************************************************************/
      +#define H2_HD_MATCH_LIT_CS(l, name)  \
      +    ((strlen(name) == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
      +
      +static int h2_util_ignore_header(const char *name) 
      +{
      +    /* never forward, ch. 8.1.2.2 */
      +    return (H2_HD_MATCH_LIT_CS("connection", name)
      +            || H2_HD_MATCH_LIT_CS("proxy-connection", name)
      +            || H2_HD_MATCH_LIT_CS("upgrade", name)
      +            || H2_HD_MATCH_LIT_CS("keep-alive", name)
      +            || H2_HD_MATCH_LIT_CS("transfer-encoding", name));
      +}
      +
      +static int count_header(void *ctx, const char *key, const char *value)
      +{
      +    if (!h2_util_ignore_header(key)) {
      +        (*((size_t*)ctx))++;
      +    }
      +    return 1;
      +}
      +
      +#define NV_ADD_LIT_CS(nv, k, v)     add_header(nv, k, sizeof(k) - 1, v, strlen(v))
      +#define NV_ADD_CS_CS(nv, k, v)      add_header(nv, k, strlen(k), v, strlen(v))
      +
      +static int add_header(h2_proxy_ngheader *ngh, 
      +                      const char *key, size_t key_len,
      +                      const char *value, size_t val_len)
      +{
      +    nghttp2_nv *nv = &ngh->nv[ngh->nvlen++];
      +    
      +    nv->name = (uint8_t*)key;
      +    nv->namelen = key_len;
      +    nv->value = (uint8_t*)value;
      +    nv->valuelen = val_len;
      +    return 1;
      +}
      +
      +static int add_table_header(void *ctx, const char *key, const char *value)
      +{
      +    if (!h2_util_ignore_header(key)) {
      +        add_header(ctx, key, strlen(key), value, strlen(value));
      +    }
      +    return 1;
      +}
      +
      +h2_proxy_ngheader *h2_proxy_util_nghd_make_req(apr_pool_t *p, 
      +                                               const h2_proxy_request *req)
      +{
      +    
      +    h2_proxy_ngheader *ngh;
      +    size_t n;
      +    
      +    ap_assert(req);
      +    ap_assert(req->scheme);
      +    ap_assert(req->authority);
      +    ap_assert(req->path);
      +    ap_assert(req->method);
      +
      +    n = 4;
      +    apr_table_do(count_header, &n, req->headers, NULL);
      +    
      +    ngh = apr_pcalloc(p, sizeof(h2_proxy_ngheader));
      +    ngh->nv =  apr_pcalloc(p, n * sizeof(nghttp2_nv));
      +    NV_ADD_LIT_CS(ngh, ":scheme", req->scheme);
      +    NV_ADD_LIT_CS(ngh, ":authority", req->authority);
      +    NV_ADD_LIT_CS(ngh, ":path", req->path);
      +    NV_ADD_LIT_CS(ngh, ":method", req->method);
      +    apr_table_do(add_table_header, ngh, req->headers, NULL);
      +
      +    return ngh;
      +}
      +
      +/*******************************************************************************
      + * header HTTP/1 <-> HTTP/2 conversions
      + ******************************************************************************/
      + 
      +typedef struct {
      +    const char *name;
      +    size_t len;
      +} literal;
      +
      +#define H2_DEF_LITERAL(n)   { (n), (sizeof(n)-1) }
      +#define H2_LIT_ARGS(a)      (a),H2_ALEN(a)
      +
      +static literal IgnoredRequestHeaders[] = {
      +    H2_DEF_LITERAL("upgrade"),
      +    H2_DEF_LITERAL("connection"),
      +    H2_DEF_LITERAL("keep-alive"),
      +    H2_DEF_LITERAL("http2-settings"),
      +    H2_DEF_LITERAL("proxy-connection"),
      +    H2_DEF_LITERAL("transfer-encoding"),
      +};
      +static literal IgnoredProxyRespHds[] = {
      +    H2_DEF_LITERAL("alt-svc"),
      +};
      +
      +static int ignore_header(const literal *lits, size_t llen,
      +                         const char *name, size_t nlen)
      +{
      +    const literal *lit;
      +    int i;
      +    
      +    for (i = 0; i < llen; ++i) {
      +        lit = &lits[i];
      +        if (lit->len == nlen && !apr_strnatcasecmp(lit->name, name)) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int h2_proxy_req_ignore_header(const char *name, size_t len)
      +{
      +    return ignore_header(H2_LIT_ARGS(IgnoredRequestHeaders), name, len);
      +}
      +
      +int h2_proxy_res_ignore_header(const char *name, size_t len)
      +{
      +    return (h2_proxy_req_ignore_header(name, len) 
      +            || ignore_header(H2_LIT_ARGS(IgnoredProxyRespHds), name, len));
      +}
      +
      +void h2_proxy_util_camel_case_header(char *s, size_t len)
      +{
      +    size_t start = 1;
      +    size_t i;
      +    for (i = 0; i < len; ++i) {
      +        if (start) {
      +            if (s[i] >= 'a' && s[i] <= 'z') {
      +                s[i] -= 'a' - 'A';
      +            }
      +            
      +            start = 0;
      +        }
      +        else if (s[i] == '-') {
      +            start = 1;
      +        }
      +    }
      +}
      +
      +/*******************************************************************************
      + * h2 request handling
      + ******************************************************************************/
      +
      +/** Match a header value against a string constance, case insensitive */
      +#define H2_HD_MATCH_LIT(l, name, nlen)  \
      +    ((nlen == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
      +
      +static apr_status_t h2_headers_add_h1(apr_table_t *headers, apr_pool_t *pool, 
      +                                      const char *name, size_t nlen,
      +                                      const char *value, size_t vlen)
      +{
      +    char *hname, *hvalue;
      +    
      +    if (h2_proxy_req_ignore_header(name, nlen)) {
      +        return APR_SUCCESS;
      +    }
      +    else if (H2_HD_MATCH_LIT("cookie", name, nlen)) {
      +        const char *existing = apr_table_get(headers, "cookie");
      +        if (existing) {
      +            char *nval;
      +            
      +            /* Cookie header come separately in HTTP/2, but need
      +             * to be merged by "; " (instead of default ", ")
      +             */
      +            hvalue = apr_pstrndup(pool, value, vlen);
      +            nval = apr_psprintf(pool, "%s; %s", existing, hvalue);
      +            apr_table_setn(headers, "Cookie", nval);
      +            return APR_SUCCESS;
      +        }
      +    }
      +    else if (H2_HD_MATCH_LIT("host", name, nlen)) {
      +        if (apr_table_get(headers, "Host")) {
      +            return APR_SUCCESS; /* ignore duplicate */
      +        }
      +    }
      +    
      +    hname = apr_pstrndup(pool, name, nlen);
      +    hvalue = apr_pstrndup(pool, value, vlen);
      +    h2_proxy_util_camel_case_header(hname, nlen);
      +    apr_table_mergen(headers, hname, hvalue);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +static h2_proxy_request *h2_proxy_req_createn(int id, apr_pool_t *pool, const char *method, 
      +                                  const char *scheme, const char *authority, 
      +                                  const char *path, apr_table_t *header, 
      +                                  int serialize)
      +{
      +    h2_proxy_request *req = apr_pcalloc(pool, sizeof(h2_proxy_request));
      +    
      +    req->method         = method;
      +    req->scheme         = scheme;
      +    req->authority      = authority;
      +    req->path           = path;
      +    req->headers        = header? header : apr_table_make(pool, 10);
      +    req->request_time   = apr_time_now();
      +    req->serialize      = serialize;
      +    
      +    return req;
      +}
      +
      +h2_proxy_request *h2_proxy_req_create(int id, apr_pool_t *pool, int serialize)
      +{
      +    return h2_proxy_req_createn(id, pool, NULL, NULL, NULL, NULL, NULL, serialize);
      +}
      +
      +typedef struct {
      +    apr_table_t *headers;
      +    apr_pool_t *pool;
      +} h1_ctx;
      +
      +static int set_h1_header(void *ctx, const char *key, const char *value)
      +{
      +    h1_ctx *x = ctx;
      +    size_t klen = strlen(key);
      +    if (!h2_proxy_req_ignore_header(key, klen)) {
      +        h2_headers_add_h1(x->headers, x->pool, key, klen, value, strlen(value));
      +    }
      +    return 1;
      +}
      +
      +apr_status_t h2_proxy_req_make(h2_proxy_request *req, apr_pool_t *pool,
      +                         const char *method, const char *scheme, 
      +                         const char *authority, const char *path, 
      +                         apr_table_t *headers)
      +{
      +    h1_ctx x;
      +
      +    req->method    = method;
      +    req->scheme    = scheme;
      +    req->authority = authority;
      +    req->path      = path;
      +
      +    ap_assert(req->scheme);
      +    ap_assert(req->authority);
      +    ap_assert(req->path);
      +    ap_assert(req->method);
      +
      +    x.pool = pool;
      +    x.headers = req->headers;
      +    apr_table_do(set_h1_header, &x, headers, NULL);
      +    return APR_SUCCESS;
      +}
      +
      +/*******************************************************************************
      + * frame logging
      + ******************************************************************************/
      +
      +int h2_proxy_util_frame_print(const nghttp2_frame *frame, char *buffer, size_t maxlen)
      +{
      +    char scratch[128];
      +    size_t s_len = sizeof(scratch)/sizeof(scratch[0]);
      +    
      +    switch (frame->hd.type) {
      +        case NGHTTP2_DATA: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "DATA[length=%d, flags=%d, stream=%d, padlen=%d]",
      +                                (int)frame->hd.length, frame->hd.flags,
      +                                frame->hd.stream_id, (int)frame->data.padlen);
      +        }
      +        case NGHTTP2_HEADERS: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "HEADERS[length=%d, hend=%d, stream=%d, eos=%d]",
      +                                (int)frame->hd.length,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS),
      +                                frame->hd.stream_id,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM));
      +        }
      +        case NGHTTP2_PRIORITY: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PRIORITY[length=%d, flags=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_RST_STREAM: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "RST_STREAM[length=%d, flags=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_SETTINGS: {
      +            if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
      +                return apr_snprintf(buffer, maxlen,
      +                                    "SETTINGS[ack=1, stream=%d]",
      +                                    frame->hd.stream_id);
      +            }
      +            return apr_snprintf(buffer, maxlen,
      +                                "SETTINGS[length=%d, stream=%d]",
      +                                (int)frame->hd.length, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_PUSH_PROMISE: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PUSH_PROMISE[length=%d, hend=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS),
      +                                frame->hd.stream_id);
      +        }
      +        case NGHTTP2_PING: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PING[length=%d, ack=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags&NGHTTP2_FLAG_ACK,
      +                                frame->hd.stream_id);
      +        }
      +        case NGHTTP2_GOAWAY: {
      +            size_t len = (frame->goaway.opaque_data_len < s_len)?
      +                frame->goaway.opaque_data_len : s_len-1;
      +            memcpy(scratch, frame->goaway.opaque_data, len);
      +            scratch[len] = '\0';
      +            return apr_snprintf(buffer, maxlen, "GOAWAY[error=%d, reason='%s', "
      +                                "last_stream=%d]", frame->goaway.error_code, 
      +                                scratch, frame->goaway.last_stream_id);
      +        }
      +        case NGHTTP2_WINDOW_UPDATE: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "WINDOW_UPDATE[stream=%d, incr=%d]",
      +                                frame->hd.stream_id, 
      +                                frame->window_update.window_size_increment);
      +        }
      +        default:
      +            return apr_snprintf(buffer, maxlen,
      +                                "type=%d[length=%d, flags=%d, stream=%d]",
      +                                frame->hd.type, (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +    }
      +}
      +
      +/*******************************************************************************
      + * link header handling 
      + ******************************************************************************/
      +
      +typedef struct {
      +    apr_pool_t *pool;
      +    request_rec *r;
      +    proxy_dir_conf *conf;
      +    const char *s;
      +    int slen;
      +    int i;
      +    const char *server_uri;
      +    int su_len;
      +    const char *real_backend_uri;
      +    int rbu_len;
      +    const char *p_server_uri;
      +    int psu_len;
      +    int link_start;
      +    int link_end;
      +} link_ctx;
      +
      +static int attr_char(char c) 
      +{
      +    switch (c) {
      +        case '!':
      +        case '#':
      +        case '$':
      +        case '&':
      +        case '+':
      +        case '-':
      +        case '.':
      +        case '^':
      +        case '_':
      +        case '`':
      +        case '|':
      +        case '~':
      +            return 1;
      +        default:
      +            return apr_isalnum(c);
      +    }
      +}
      +
      +static int ptoken_char(char c) 
      +{
      +    switch (c) {
      +        case '!':
      +        case '#':
      +        case '$':
      +        case '&':
      +        case '\'':
      +        case '(':
      +        case ')':
      +        case '*':
      +        case '+':
      +        case '-':
      +        case '.':
      +        case '/':
      +        case ':':
      +        case '<':
      +        case '=':
      +        case '>':
      +        case '?':
      +        case '@':
      +        case '[':
      +        case ']':
      +        case '^':
      +        case '_':
      +        case '`':
      +        case '{':
      +        case '|':
      +        case '}':
      +        case '~':
      +            return 1;
      +        default:
      +            return apr_isalnum(c);
      +    }
      +}
      +
      +static int skip_ws(link_ctx *ctx)
      +{
      +    char c;
      +    while (ctx->i < ctx->slen 
      +           && (((c = ctx->s[ctx->i]) == ' ') || (c == '\t'))) {
      +        ++ctx->i;
      +    }
      +    return (ctx->i < ctx->slen);
      +}
      +
      +static int find_chr(link_ctx *ctx, char c, int *pidx)
      +{
      +    int j;
      +    for (j = ctx->i; j < ctx->slen; ++j) {
      +        if (ctx->s[j] == c) {
      +            *pidx = j;
      +            return 1;
      +        }
      +    } 
      +    return 0;
      +}
      +
      +static int read_chr(link_ctx *ctx, char c)
      +{
      +    if (ctx->i < ctx->slen && ctx->s[ctx->i] == c) {
      +        ++ctx->i;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +static int skip_qstring(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, '\"')) {
      +        int end;
      +        if (find_chr(ctx, '\"', &end)) {
      +            ctx->i = end + 1;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int skip_ptoken(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx)) {
      +        int i;
      +        for (i = ctx->i; i < ctx->slen && ptoken_char(ctx->s[i]); ++i) {
      +            /* nop */
      +        }
      +        if (i > ctx->i) {
      +            ctx->i = i;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +
      +static int read_link(link_ctx *ctx)
      +{
      +    ctx->link_start = ctx->link_end = 0;
      +    if (skip_ws(ctx) && read_chr(ctx, '<')) {
      +        int end;
      +        if (find_chr(ctx, '>', &end)) {
      +            ctx->link_start = ctx->i;
      +            ctx->link_end = end;
      +            ctx->i = end + 1;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int skip_pname(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx)) {
      +        int i;
      +        for (i = ctx->i; i < ctx->slen && attr_char(ctx->s[i]); ++i) {
      +            /* nop */
      +        }
      +        if (i > ctx->i) {
      +            ctx->i = i;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int skip_pvalue(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, '=')) {
      +        if (skip_qstring(ctx) || skip_ptoken(ctx)) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int skip_param(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, ';')) {
      +        if (skip_pname(ctx)) {
      +            skip_pvalue(ctx); /* value is optional */
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_sep(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, ',')) {
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +static size_t subst_str(link_ctx *ctx, int start, int end, const char *ns)
      +{
      +    int olen, nlen, plen;
      +    int delta;
      +    char *p;
      +    
      +    olen = end - start;
      +    nlen = (int)strlen(ns);
      +    delta = nlen - olen;
      +    plen = ctx->slen + delta + 1;
      +    p = apr_pcalloc(ctx->pool, plen);
      +    strncpy(p, ctx->s, start);
      +    strncpy(p + start, ns, nlen);
      +    strcpy(p + start + nlen, ctx->s + end);
      +    ctx->s = p;
      +    ctx->slen = (int)strlen(p);
      +    if (ctx->i >= end) {
      +        ctx->i += delta;
      +    }
      +    return nlen; 
      +}
      +
      +static void map_link(link_ctx *ctx) 
      +{
      +    if (ctx->link_start < ctx->link_end) {
      +        char buffer[HUGE_STRING_LEN];
      +        int need_len, link_len, buffer_len, prepend_p_server; 
      +        const char *mapped;
      +        
      +        buffer[0] = '\0';
      +        buffer_len = 0;
      +        link_len = ctx->link_end - ctx->link_start;
      +        need_len = link_len + 1;
      +        prepend_p_server = (ctx->s[ctx->link_start] == '/'); 
      +        if (prepend_p_server) {
      +            /* common to use relative uris in link header, for mappings
      +             * to work need to prefix the backend server uri */
      +            need_len += ctx->psu_len;
      +            strncpy(buffer, ctx->p_server_uri, sizeof(buffer));
      +            buffer_len = ctx->psu_len;
      +        }
      +        if (need_len > sizeof(buffer)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, ctx->r, APLOGNO(03482) 
      +                          "link_reverse_map uri too long, skipped: %s", ctx->s);
      +            return;
      +        }
      +        strncpy(buffer + buffer_len, ctx->s + ctx->link_start, link_len);
      +        buffer_len += link_len;
      +        buffer[buffer_len] = '\0';
      +        if (!prepend_p_server
      +            && strcmp(ctx->real_backend_uri, ctx->p_server_uri)
      +            && !strncmp(buffer, ctx->real_backend_uri, ctx->rbu_len)) {
      +            /* the server uri and our local proxy uri we use differ, for mapping
      +             * to work, we need to use the proxy uri */
      +            int path_start = ctx->link_start + ctx->rbu_len;
      +            link_len -= ctx->rbu_len;
      +            strcpy(buffer, ctx->p_server_uri);
      +            strncpy(buffer + ctx->psu_len, ctx->s + path_start, link_len);
      +            buffer_len = ctx->psu_len + link_len;
      +            buffer[buffer_len] = '\0';            
      +        }
      +        mapped = ap_proxy_location_reverse_map(ctx->r, ctx->conf, buffer);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, ctx->r, 
      +                      "reverse_map[%s] %s --> %s", ctx->p_server_uri, buffer, mapped);
      +        if (mapped != buffer) {
      +            if (prepend_p_server) {
      +                if (ctx->server_uri == NULL) {
      +                    ctx->server_uri = ap_construct_url(ctx->pool, "", ctx->r);
      +                    ctx->su_len = (int)strlen(ctx->server_uri);
      +                }
      +                if (!strncmp(mapped, ctx->server_uri, ctx->su_len)) {
      +                    mapped += ctx->su_len;
      +                }
      +            }
      +            subst_str(ctx, ctx->link_start, ctx->link_end, mapped);
      +        }
      +    }
      +}
      +
      +/* RFC 5988 <https://tools.ietf.org/html/rfc5988#section-6.2.1>
      +  Link           = "Link" ":" #link-value
      +  link-value     = "<" URI-Reference ">" *( ";" link-param )
      +  link-param     = ( ( "rel" "=" relation-types )
      +                 | ( "anchor" "=" <"> URI-Reference <"> )
      +                 | ( "rev" "=" relation-types )
      +                 | ( "hreflang" "=" Language-Tag )
      +                 | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) )
      +                 | ( "title" "=" quoted-string )
      +                 | ( "title*" "=" ext-value )
      +                 | ( "type" "=" ( media-type | quoted-mt ) )
      +                 | ( link-extension ) )
      +  link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] )
      +                 | ( ext-name-star "=" ext-value )
      +  ext-name-star  = parmname "*" ; reserved for RFC2231-profiled
      +                                ; extensions.  Whitespace NOT
      +                                ; allowed in between.
      +  ptoken         = 1*ptokenchar
      +  ptokenchar     = "!" | "#" | "$" | "%" | "&" | "'" | "("
      +                 | ")" | "*" | "+" | "-" | "." | "/" | DIGIT
      +                 | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA
      +                 | "[" | "]" | "^" | "_" | "`" | "{" | "|"
      +                 | "}" | "~"
      +  media-type     = type-name "/" subtype-name
      +  quoted-mt      = <"> media-type <">
      +  relation-types = relation-type
      +                 | <"> relation-type *( 1*SP relation-type ) <">
      +  relation-type  = reg-rel-type | ext-rel-type
      +  reg-rel-type   = LOALPHA *( LOALPHA | DIGIT | "." | "-" )
      +  ext-rel-type   = URI
      +  
      +  and from <https://tools.ietf.org/html/rfc5987>
      +  parmname      = 1*attr-char
      +  attr-char     = ALPHA / DIGIT
      +                   / "!" / "#" / "$" / "&" / "+" / "-" / "."
      +                   / "^" / "_" / "`" / "|" / "~"
      + */
      +
      +const char *h2_proxy_link_reverse_map(request_rec *r,
      +                                      proxy_dir_conf *conf, 
      +                                      const char *real_backend_uri,
      +                                      const char *proxy_server_uri,
      +                                      const char *s)
      +{
      +    link_ctx ctx;
      +    
      +    if (r->proxyreq != PROXYREQ_REVERSE) {
      +        return s;
      +    }
      +    memset(&ctx, 0, sizeof(ctx));
      +    ctx.r = r;
      +    ctx.pool = r->pool;
      +    ctx.conf = conf;
      +    ctx.real_backend_uri = real_backend_uri;
      +    ctx.rbu_len = (int)strlen(ctx.real_backend_uri);
      +    ctx.p_server_uri = proxy_server_uri;
      +    ctx.psu_len = (int)strlen(ctx.p_server_uri);
      +    ctx.s = s;
      +    ctx.slen = (int)strlen(s);
      +    while (read_link(&ctx)) {
      +        while (skip_param(&ctx)) {
      +            /* nop */
      +        }
      +        map_link(&ctx);
      +        if (!read_sep(&ctx)) {
      +            break;
      +        }
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, 
      +                  "link_reverse_map %s --> %s", s, ctx.s);
      +    return ctx.s;
      +}
      diff --git a/modules/http2/h2_proxy_util.h b/modules/http2/h2_proxy_util.h
      new file mode 100644
      index 00000000000..f90d14951bc
      --- /dev/null
      +++ b/modules/http2/h2_proxy_util.h
      @@ -0,0 +1,204 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_proxy_util__
      +#define __mod_h2__h2_proxy_util__
      +
      +/*******************************************************************************
      + * some debugging/format helpers
      + ******************************************************************************/
      +struct h2_proxy_request;
      +struct nghttp2_frame;
      +
      +int h2_proxy_util_frame_print(const nghttp2_frame *frame, char *buffer, size_t maxlen);
      +
      +/*******************************************************************************
      + * ihash - hash for structs with int identifier
      + ******************************************************************************/
      +typedef struct h2_proxy_ihash_t h2_proxy_ihash_t;
      +typedef int h2_proxy_ihash_iter_t(void *ctx, void *val);
      +
      +/**
      + * Create a hash for structures that have an identifying int member.
      + * @param pool the pool to use
      + * @param offset_of_int the offsetof() the int member in the struct
      + */
      +h2_proxy_ihash_t *h2_proxy_ihash_create(apr_pool_t *pool, size_t offset_of_int);
      +
      +size_t h2_proxy_ihash_count(h2_proxy_ihash_t *ih);
      +int h2_proxy_ihash_empty(h2_proxy_ihash_t *ih);
      +void *h2_proxy_ihash_get(h2_proxy_ihash_t *ih, int id);
      +
      +/**
      + * Iterate over the hash members (without defined order) and invoke
      + * fn for each member until 0 is returned.
      + * @param ih the hash to iterate over
      + * @param fn the function to invoke on each member
      + * @param ctx user supplied data passed into each iteration call
      + * @return 0 if one iteration returned 0, otherwise != 0
      + */
      +int h2_proxy_ihash_iter(h2_proxy_ihash_t *ih, h2_proxy_ihash_iter_t *fn, void *ctx);
      +
      +void h2_proxy_ihash_add(h2_proxy_ihash_t *ih, void *val);
      +void h2_proxy_ihash_remove(h2_proxy_ihash_t *ih, int id);
      +void h2_proxy_ihash_remove_val(h2_proxy_ihash_t *ih, void *val);
      +void h2_proxy_ihash_clear(h2_proxy_ihash_t *ih);
      +
      +size_t h2_proxy_ihash_shift(h2_proxy_ihash_t *ih, void **buffer, size_t max);
      +size_t h2_proxy_ihash_ishift(h2_proxy_ihash_t *ih, int *buffer, size_t max);
      +
      +/*******************************************************************************
      + * iqueue - sorted list of int with user defined ordering
      + ******************************************************************************/
      +typedef struct h2_proxy_iqueue {
      +    int *elts;
      +    int head;
      +    int nelts;
      +    int nalloc;
      +    apr_pool_t *pool;
      +} h2_proxy_iqueue;
      +
      +/**
      + * Comparator for two int to determine their order.
      + *
      + * @param i1 first int to compare
      + * @param i2 second int to compare
      + * @param ctx provided user data
      + * @return value is the same as for strcmp() and has the effect:
      + *    == 0: s1 and s2 are treated equal in ordering
      + *     < 0: s1 should be sorted before s2
      + *     > 0: s2 should be sorted before s1
      + */
      +typedef int h2_proxy_iq_cmp(int i1, int i2, void *ctx);
      +
      +/**
      + * Allocate a new queue from the pool and initialize.
      + * @param id the identifier of the queue
      + * @param pool the memory pool
      + */
      +h2_proxy_iqueue *h2_proxy_iq_create(apr_pool_t *pool, int capacity);
      +
      +/**
      + * Return != 0 iff there are no tasks in the queue.
      + * @param q the queue to check
      + */
      +int h2_proxy_iq_empty(h2_proxy_iqueue *q);
      +
      +/**
      + * Return the number of int in the queue.
      + * @param q the queue to get size on
      + */
      +int h2_proxy_iq_count(h2_proxy_iqueue *q);
      +
      +/**
      + * Add a stream id to the queue. 
      + *
      + * @param q the queue to append the task to
      + * @param sid the stream id to add
      + * @param cmp the comparator for sorting
      + * @param ctx user data for comparator 
      + */
      +void h2_proxy_iq_add(h2_proxy_iqueue *q, int sid, h2_proxy_iq_cmp *cmp, void *ctx);
      +
      +/**
      + * Remove the stream id from the queue. Return != 0 iff task
      + * was found in queue.
      + * @param q the task queue
      + * @param sid the stream id to remove
      + * @return != 0 iff task was found in queue
      + */
      +int h2_proxy_iq_remove(h2_proxy_iqueue *q, int sid);
      +
      +/**
      + * Remove all entries in the queue.
      + */
      +void h2_proxy_iq_clear(h2_proxy_iqueue *q);
      +
      +/**
      + * Sort the stream idqueue again. Call if the task ordering
      + * has changed.
      + *
      + * @param q the queue to sort
      + * @param cmp the comparator for sorting
      + * @param ctx user data for the comparator 
      + */
      +void h2_proxy_iq_sort(h2_proxy_iqueue *q, h2_proxy_iq_cmp *cmp, void *ctx);
      +
      +/**
      + * Get the first stream id from the queue or NULL if the queue is empty. 
      + * The task will be removed.
      + *
      + * @param q the queue to get the first task from
      + * @return the first stream id of the queue, 0 if empty
      + */
      +int h2_proxy_iq_shift(h2_proxy_iqueue *q);
      +
      +/*******************************************************************************
      + * common helpers
      + ******************************************************************************/
      +/* h2_proxy_log2(n) iff n is a power of 2 */
      +unsigned char h2_proxy_log2(int n);
      +
      +/*******************************************************************************
      + * HTTP/2 header helpers
      + ******************************************************************************/
      +void h2_proxy_util_camel_case_header(char *s, size_t len);
      +int h2_proxy_res_ignore_header(const char *name, size_t len);
      +
      +/*******************************************************************************
      + * nghttp2 helpers
      + ******************************************************************************/
      +typedef struct h2_proxy_ngheader {
      +    nghttp2_nv *nv;
      +    apr_size_t nvlen;
      +} h2_proxy_ngheader;
      +h2_proxy_ngheader *h2_proxy_util_nghd_make_req(apr_pool_t *p, 
      +                                               const struct h2_proxy_request *req);
      +
      +/*******************************************************************************
      + * h2_proxy_request helpers
      + ******************************************************************************/
      +typedef struct h2_proxy_request h2_proxy_request;
      +
      +struct h2_proxy_request {
      +    const char *method; /* pseudo header values, see ch. 8.1.2.3 */
      +    const char *scheme;
      +    const char *authority;
      +    const char *path;
      +    
      +    apr_table_t *headers;
      +    
      +    apr_time_t request_time;
      +    
      +    unsigned int chunked : 1;   /* iff requst body needs to be forwarded as chunked */
      +    unsigned int serialize : 1; /* iff this request is written in HTTP/1.1 serialization */
      +};
      +
      +h2_proxy_request *h2_proxy_req_create(int id, apr_pool_t *pool, int serialize);
      +apr_status_t h2_proxy_req_make(h2_proxy_request *req, apr_pool_t *pool,
      +                               const char *method, const char *scheme, 
      +                               const char *authority, const char *path, 
      +                               apr_table_t *headers);
      +
      +/*******************************************************************************
      + * reverse mapping for link headers
      + ******************************************************************************/
      +const char *h2_proxy_link_reverse_map(request_rec *r,
      +                                      proxy_dir_conf *conf, 
      +                                      const char *real_server_uri,
      +                                      const char *proxy_server_uri,
      +                                      const char *s);
      +
      +#endif /* defined(__mod_h2__h2_proxy_util__) */
      diff --git a/modules/http2/h2_push.c b/modules/http2/h2_push.c
      new file mode 100644
      index 00000000000..4330d7a4dc6
      --- /dev/null
      +++ b/modules/http2/h2_push.c
      @@ -0,0 +1,1060 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stdio.h>
      +
      +#include <apr_lib.h>
      +#include <apr_strings.h>
      +#include <apr_hash.h>
      +#include <apr_time.h>
      +
      +#ifdef H2_OPENSSL
      +#include <openssl/sha.h>
      +#endif
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +#include "h2_h2.h"
      +#include "h2_util.h"
      +#include "h2_push.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_session.h"
      +#include "h2_stream.h"
      +
      +/*******************************************************************************
      + * link header handling 
      + ******************************************************************************/
      +
      +static const char *policy_str(h2_push_policy policy)
      +{
      +    switch (policy) {
      +        case H2_PUSH_NONE:
      +            return "none";
      +        case H2_PUSH_FAST_LOAD:
      +            return "fast-load";
      +        case H2_PUSH_HEAD:
      +            return "head";
      +        default:
      +            return "default";
      +    }
      +}
      +
      +typedef struct {
      +    const h2_request *req;
      +    int push_policy;
      +    apr_pool_t *pool;
      +    apr_array_header_t *pushes;
      +    const char *s;
      +    size_t slen;
      +    size_t i;
      +    
      +    const char *link;
      +    apr_table_t *params;
      +    char b[4096];
      +} link_ctx;
      +
      +static int attr_char(char c) 
      +{
      +    switch (c) {
      +        case '!':
      +        case '#':
      +        case '$':
      +        case '&':
      +        case '+':
      +        case '-':
      +        case '.':
      +        case '^':
      +        case '_':
      +        case '`':
      +        case '|':
      +        case '~':
      +            return 1;
      +        default:
      +            return apr_isalnum(c);
      +    }
      +}
      +
      +static int ptoken_char(char c) 
      +{
      +    switch (c) {
      +        case '!':
      +        case '#':
      +        case '$':
      +        case '&':
      +        case '\'':
      +        case '(':
      +        case ')':
      +        case '*':
      +        case '+':
      +        case '-':
      +        case '.':
      +        case '/':
      +        case ':':
      +        case '<':
      +        case '=':
      +        case '>':
      +        case '?':
      +        case '@':
      +        case '[':
      +        case ']':
      +        case '^':
      +        case '_':
      +        case '`':
      +        case '{':
      +        case '|':
      +        case '}':
      +        case '~':
      +            return 1;
      +        default:
      +            return apr_isalnum(c);
      +    }
      +}
      +
      +static int skip_ws(link_ctx *ctx)
      +{
      +    char c;
      +    while (ctx->i < ctx->slen 
      +           && (((c = ctx->s[ctx->i]) == ' ') || (c == '\t'))) {
      +        ++ctx->i;
      +    }
      +    return (ctx->i < ctx->slen);
      +}
      +
      +static int find_chr(link_ctx *ctx, char c, size_t *pidx)
      +{
      +    size_t j;
      +    for (j = ctx->i; j < ctx->slen; ++j) {
      +        if (ctx->s[j] == c) {
      +            *pidx = j;
      +            return 1;
      +        }
      +    } 
      +    return 0;
      +}
      +
      +static int read_chr(link_ctx *ctx, char c)
      +{
      +    if (ctx->i < ctx->slen && ctx->s[ctx->i] == c) {
      +        ++ctx->i;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +static char *mk_str(link_ctx *ctx, size_t end) 
      +{
      +    if (ctx->i < end) {
      +        return apr_pstrndup(ctx->pool, ctx->s + ctx->i, end - ctx->i);
      +    }
      +    return (char*)"";
      +}
      +
      +static int read_qstring(link_ctx *ctx, const char **ps)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, '\"')) {
      +        size_t end;
      +        if (find_chr(ctx, '\"', &end)) {
      +            *ps = mk_str(ctx, end);
      +            ctx->i = end + 1;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_ptoken(link_ctx *ctx, const char **ps)
      +{
      +    if (skip_ws(ctx)) {
      +        size_t i;
      +        for (i = ctx->i; i < ctx->slen && ptoken_char(ctx->s[i]); ++i) {
      +            /* nop */
      +        }
      +        if (i > ctx->i) {
      +            *ps = mk_str(ctx, i);
      +            ctx->i = i;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +
      +static int read_link(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, '<')) {
      +        size_t end;
      +        if (find_chr(ctx, '>', &end)) {
      +            ctx->link = mk_str(ctx, end);
      +            ctx->i = end + 1;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_pname(link_ctx *ctx, const char **pname)
      +{
      +    if (skip_ws(ctx)) {
      +        size_t i;
      +        for (i = ctx->i; i < ctx->slen && attr_char(ctx->s[i]); ++i) {
      +            /* nop */
      +        }
      +        if (i > ctx->i) {
      +            *pname = mk_str(ctx, i);
      +            ctx->i = i;
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_pvalue(link_ctx *ctx, const char **pvalue)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, '=')) {
      +        if (read_qstring(ctx, pvalue) || read_ptoken(ctx, pvalue)) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_param(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, ';')) {
      +        const char *name, *value = "";
      +        if (read_pname(ctx, &name)) {
      +            read_pvalue(ctx, &value); /* value is optional */
      +            apr_table_setn(ctx->params, name, value);
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int read_sep(link_ctx *ctx)
      +{
      +    if (skip_ws(ctx) && read_chr(ctx, ',')) {
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +static void init_params(link_ctx *ctx) 
      +{
      +    if (!ctx->params) {
      +        ctx->params = apr_table_make(ctx->pool, 5);
      +    }
      +    else {
      +        apr_table_clear(ctx->params);
      +    }
      +}
      +
      +static int same_authority(const h2_request *req, const apr_uri_t *uri)
      +{
      +    if (uri->scheme != NULL && strcmp(uri->scheme, req->scheme)) {
      +        return 0;
      +    }
      +    if (uri->hostinfo != NULL && strcmp(uri->hostinfo, req->authority)) {
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +static int set_push_header(void *ctx, const char *key, const char *value) 
      +{
      +    size_t klen = strlen(key);
      +    if (H2_HD_MATCH_LIT("User-Agent", key, klen)
      +        || H2_HD_MATCH_LIT("Accept", key, klen)
      +        || H2_HD_MATCH_LIT("Accept-Encoding", key, klen)
      +        || H2_HD_MATCH_LIT("Accept-Language", key, klen)
      +        || H2_HD_MATCH_LIT("Cache-Control", key, klen)) {
      +        apr_table_setn(ctx, key, value);
      +    }
      +    return 1;
      +}
      +
      +static int has_param(link_ctx *ctx, const char *param)
      +{
      +    const char *p = apr_table_get(ctx->params, param);
      +    return !!p;
      +}
      +
      +static int has_relation(link_ctx *ctx, const char *rel)
      +{
      +    const char *s, *val = apr_table_get(ctx->params, "rel");
      +    if (val) {
      +        if (!strcmp(rel, val)) {
      +            return 1;
      +        }
      +        s = ap_strstr_c(val, rel);
      +        if (s && (s == val || s[-1] == ' ')) {
      +            s += strlen(rel);
      +            if (!*s || *s == ' ') {
      +                return 1;
      +            }
      +        }
      +    }
      +    return 0;
      +}
      +
      +static int add_push(link_ctx *ctx)
      +{
      +    /* so, we have read a Link header and need to decide
      +     * if we transform it into a push.
      +     */
      +    if (has_relation(ctx, "preload") && !has_param(ctx, "nopush")) {
      +        apr_uri_t uri;
      +        if (apr_uri_parse(ctx->pool, ctx->link, &uri) == APR_SUCCESS) {
      +            if (uri.path && same_authority(ctx->req, &uri)) {
      +                char *path;
      +                const char *method;
      +                apr_table_t *headers;
      +                h2_request *req;
      +                h2_push *push;
      +                
      +                /* We only want to generate pushes for resources in the
      +                 * same authority than the original request.
      +                 * icing: i think that is wise, otherwise we really need to
      +                 * check that the vhost/server is available and uses the same
      +                 * TLS (if any) parameters.
      +                 */
      +                path = apr_uri_unparse(ctx->pool, &uri, APR_URI_UNP_OMITSITEPART);
      +                push = apr_pcalloc(ctx->pool, sizeof(*push));
      +                switch (ctx->push_policy) {
      +                    case H2_PUSH_HEAD:
      +                        method = "HEAD";
      +                        break;
      +                    default:
      +                        method = "GET";
      +                        break;
      +                }
      +                headers = apr_table_make(ctx->pool, 5);
      +                apr_table_do(set_push_header, headers, ctx->req->headers, NULL);
      +                req = h2_req_create(0, ctx->pool, method, ctx->req->scheme,
      +                                    ctx->req->authority, path, headers,
      +                                    ctx->req->serialize);
      +                /* atm, we do not push on pushes */
      +                h2_request_end_headers(req, ctx->pool, 1);
      +                push->req = req;
      +                if (has_param(ctx, "critical")) {
      +                    h2_priority *prio = apr_pcalloc(ctx->pool, sizeof(*prio));
      +                    prio->dependency = H2_DEPENDANT_BEFORE;
      +                    push->priority = prio;
      +                }
      +                if (!ctx->pushes) {
      +                    ctx->pushes = apr_array_make(ctx->pool, 5, sizeof(h2_push*));
      +                }
      +                APR_ARRAY_PUSH(ctx->pushes, h2_push*) = push;
      +            }
      +        }
      +    }
      +    return 0;
      +}
      +
      +static void inspect_link(link_ctx *ctx, const char *s, size_t slen)
      +{
      +    /* RFC 5988 <https://tools.ietf.org/html/rfc5988#section-6.2.1>
      +      Link           = "Link" ":" #link-value
      +      link-value     = "<" URI-Reference ">" *( ";" link-param )
      +      link-param     = ( ( "rel" "=" relation-types )
      +                     | ( "anchor" "=" <"> URI-Reference <"> )
      +                     | ( "rev" "=" relation-types )
      +                     | ( "hreflang" "=" Language-Tag )
      +                     | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) )
      +                     | ( "title" "=" quoted-string )
      +                     | ( "title*" "=" ext-value )
      +                     | ( "type" "=" ( media-type | quoted-mt ) )
      +                     | ( link-extension ) )
      +      link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] )
      +                     | ( ext-name-star "=" ext-value )
      +      ext-name-star  = parmname "*" ; reserved for RFC2231-profiled
      +                                    ; extensions.  Whitespace NOT
      +                                    ; allowed in between.
      +      ptoken         = 1*ptokenchar
      +      ptokenchar     = "!" | "#" | "$" | "%" | "&" | "'" | "("
      +                     | ")" | "*" | "+" | "-" | "." | "/" | DIGIT
      +                     | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA
      +                     | "[" | "]" | "^" | "_" | "`" | "{" | "|"
      +                     | "}" | "~"
      +      media-type     = type-name "/" subtype-name
      +      quoted-mt      = <"> media-type <">
      +      relation-types = relation-type
      +                     | <"> relation-type *( 1*SP relation-type ) <">
      +      relation-type  = reg-rel-type | ext-rel-type
      +      reg-rel-type   = LOALPHA *( LOALPHA | DIGIT | "." | "-" )
      +      ext-rel-type   = URI
      +      
      +      and from <https://tools.ietf.org/html/rfc5987>
      +      parmname      = 1*attr-char
      +      attr-char     = ALPHA / DIGIT
      +                       / "!" / "#" / "$" / "&" / "+" / "-" / "."
      +                       / "^" / "_" / "`" / "|" / "~"
      +     */
      +
      +     ctx->s = s;
      +     ctx->slen = slen;
      +     ctx->i = 0;
      +     
      +     while (read_link(ctx)) {
      +        init_params(ctx);
      +        while (read_param(ctx)) {
      +            /* nop */
      +        }
      +        add_push(ctx);
      +        if (!read_sep(ctx)) {
      +            break;
      +        }
      +     }
      +}
      +
      +static int head_iter(void *ctx, const char *key, const char *value) 
      +{
      +    if (!apr_strnatcasecmp("link", key)) {
      +        inspect_link(ctx, value, strlen(value));
      +    }
      +    return 1;
      +}
      +
      +apr_array_header_t *h2_push_collect(apr_pool_t *p, const h2_request *req,
      +                                    int push_policy, const h2_headers *res)
      +{
      +    if (req && push_policy != H2_PUSH_NONE) {
      +        /* Collect push candidates from the request/response pair.
      +         * 
      +         * One source for pushes are "rel=preload" link headers
      +         * in the response.
      +         * 
      +         * TODO: This may be extended in the future by hooks or callbacks
      +         * where other modules can provide push information directly.
      +         */
      +        if (res->headers) {
      +            link_ctx ctx;
      +            
      +            memset(&ctx, 0, sizeof(ctx));
      +            ctx.req = req;
      +            ctx.push_policy = push_policy;
      +            ctx.pool = p;
      +            
      +            apr_table_do(head_iter, &ctx, res->headers, NULL);
      +            if (ctx.pushes) {
      +                apr_table_setn(res->headers, "push-policy", 
      +                               policy_str(push_policy));
      +            }
      +            return ctx.pushes;
      +        }
      +    }
      +    return NULL;
      +}
      +
      +/*******************************************************************************
      + * push diary 
      + *
      + * - The push diary keeps track of resources already PUSHed via HTTP/2 on this
      + *   connection. It records a hash value from the absolute URL of the resource
      + *   pushed.
      + * - Lacking openssl, it uses 'apr_hashfunc_default' for the value
      + * - with openssl, it uses SHA256 to calculate the hash value
      + * - whatever the method to generate the hash, the diary keeps a maximum of 64
      + *   bits per hash, limiting the memory consumption to about 
      + *      H2PushDiarySize * 8 
      + *   bytes. Entries are sorted by most recently used and oldest entries are
      + *   forgotten first.
      + * - Clients can initialize/replace the push diary by sending a 'Cache-Digest'
      + *   header. Currently, this is the base64url encoded value of the cache digest
      + *   as specified in https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/
      + *   This draft can be expected to evolve and the definition of the header
      + *   will be added there and refined.
      + * - The cache digest header is a Golomb Coded Set of hash values, but it may
      + *   limit the amount of bits per hash value even further. For a good description
      + *   of GCS, read here:
      + *      http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller-than-bloom-filters
      + * - The means that the push diary might be initialized with hash values of much
      + *   less than 64 bits, leading to more false positives, but smaller digest size.
      + ******************************************************************************/
      + 
      + 
      +#define GCSLOG_LEVEL   APLOG_TRACE1
      +
      +typedef struct h2_push_diary_entry {
      +    apr_uint64_t hash;
      +} h2_push_diary_entry;
      +
      +
      +#ifdef H2_OPENSSL
      +static void sha256_update(SHA256_CTX *ctx, const char *s)
      +{
      +    SHA256_Update(ctx, s, strlen(s));
      +}
      +
      +static void calc_sha256_hash(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push) 
      +{
      +    SHA256_CTX sha256;
      +    apr_uint64_t val;
      +    unsigned char hash[SHA256_DIGEST_LENGTH];
      +    int i;
      +    
      +    SHA256_Init(&sha256);
      +    sha256_update(&sha256, push->req->scheme);
      +    sha256_update(&sha256, "://");
      +    sha256_update(&sha256, push->req->authority);
      +    sha256_update(&sha256, push->req->path);
      +    SHA256_Final(hash, &sha256);
      +
      +    val = 0;
      +    for (i = 0; i != sizeof(val); ++i)
      +        val = val * 256 + hash[i];
      +    *phash = val >> (64 - diary->mask_bits);
      +}
      +#endif
      +
      +
      +static unsigned int val_apr_hash(const char *str) 
      +{
      +    apr_ssize_t len = strlen(str);
      +    return apr_hashfunc_default(str, &len);
      +}
      +
      +static void calc_apr_hash(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push) 
      +{
      +    apr_uint64_t val;
      +#if APR_UINT64_MAX > UINT_MAX
      +    val = ((apr_uint64_t)(val_apr_hash(push->req->scheme)) << 32);
      +    val ^= ((apr_uint64_t)(val_apr_hash(push->req->authority)) << 16);
      +    val ^= val_apr_hash(push->req->path);
      +#else
      +    val = val_apr_hash(push->req->scheme);
      +    val ^= val_apr_hash(push->req->authority);
      +    val ^= val_apr_hash(push->req->path);
      +#endif
      +    *phash = val;
      +}
      +
      +static apr_int32_t ceil_power_of_2(apr_int32_t n)
      +{
      +    if (n <= 2) return 2;
      +    --n;
      +    n |= n >> 1;
      +    n |= n >> 2;
      +    n |= n >> 4;
      +    n |= n >> 8;
      +    n |= n >> 16;
      +    return ++n;
      +}
      +
      +static h2_push_diary *diary_create(apr_pool_t *p, h2_push_digest_type dtype, 
      +                                   int N)
      +{
      +    h2_push_diary *diary = NULL;
      +    
      +    if (N > 0) {
      +        diary = apr_pcalloc(p, sizeof(*diary));
      +        
      +        diary->NMax        = ceil_power_of_2(N);
      +        diary->N           = diary->NMax;
      +        /* the mask we use in value comparison depends on where we got
      +         * the values from. If we calculate them ourselves, we can use
      +         * the full 64 bits.
      +         * If we set the diary via a compressed golomb set, we have less
      +         * relevant bits and need to use a smaller mask. */
      +        diary->mask_bits   = 64;
      +        /* grows by doubling, start with a power of 2 */
      +        diary->entries     = apr_array_make(p, 16, sizeof(h2_push_diary_entry));
      +        
      +        switch (dtype) {
      +#ifdef H2_OPENSSL
      +            case H2_PUSH_DIGEST_SHA256:
      +                diary->dtype       = H2_PUSH_DIGEST_SHA256;
      +                diary->dcalc       = calc_sha256_hash;
      +                break;
      +#endif /* ifdef H2_OPENSSL */
      +            default:
      +                diary->dtype       = H2_PUSH_DIGEST_APR_HASH;
      +                diary->dcalc       = calc_apr_hash;
      +                break;
      +        }
      +    }
      +    
      +    return diary;
      +}
      +
      +h2_push_diary *h2_push_diary_create(apr_pool_t *p, int N)
      +{
      +    return diary_create(p, H2_PUSH_DIGEST_SHA256, N);
      +}
      +
      +static int h2_push_diary_find(h2_push_diary *diary, apr_uint64_t hash)
      +{
      +    if (diary) {
      +        h2_push_diary_entry *e;
      +        int i;
      +
      +        /* search from the end, where the last accessed digests are */
      +        for (i = diary->entries->nelts-1; i >= 0; --i) {
      +            e = &APR_ARRAY_IDX(diary->entries, i, h2_push_diary_entry);
      +            if (e->hash == hash) {
      +                return i;
      +            }
      +        }
      +    }
      +    return -1;
      +}
      +
      +static h2_push_diary_entry *move_to_last(h2_push_diary *diary, apr_size_t idx)
      +{
      +    h2_push_diary_entry *entries = (h2_push_diary_entry*)diary->entries->elts;
      +    h2_push_diary_entry e;
      +    apr_size_t lastidx = diary->entries->nelts-1;
      +    
      +    /* move entry[idx] to the end */
      +    if (idx < lastidx) {
      +        e =  entries[idx];
      +        memmove(entries+idx, entries+idx+1, sizeof(e) * (lastidx - idx));
      +        entries[lastidx] = e;
      +    }
      +    return &entries[lastidx];
      +}
      +
      +static void h2_push_diary_append(h2_push_diary *diary, h2_push_diary_entry *e)
      +{
      +    h2_push_diary_entry *ne;
      +    
      +    if (diary->entries->nelts < diary->N) {
      +        /* append a new diary entry at the end */
      +        APR_ARRAY_PUSH(diary->entries, h2_push_diary_entry) = *e;
      +        ne = &APR_ARRAY_IDX(diary->entries, diary->entries->nelts-1, h2_push_diary_entry);
      +    }
      +    else {
      +        /* replace content with new digest. keeps memory usage constant once diary is full */
      +        ne = move_to_last(diary, 0);
      +        *ne = *e;
      +    }
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, diary->entries->pool,
      +                  "push_diary_append: %"APR_UINT64_T_HEX_FMT, ne->hash);
      +}
      +
      +apr_array_header_t *h2_push_diary_update(h2_session *session, apr_array_header_t *pushes)
      +{
      +    apr_array_header_t *npushes = pushes;
      +    h2_push_diary_entry e;
      +    int i, idx;
      +    
      +    if (session->push_diary && pushes) {
      +        npushes = NULL;
      +        
      +        for (i = 0; i < pushes->nelts; ++i) {
      +            h2_push *push;
      +            
      +            push = APR_ARRAY_IDX(pushes, i, h2_push*);
      +            session->push_diary->dcalc(session->push_diary, &e.hash, push);
      +            idx = h2_push_diary_find(session->push_diary, e.hash);
      +            if (idx >= 0) {
      +                /* Intentional no APLOGNO */
      +                ap_log_cerror(APLOG_MARK, GCSLOG_LEVEL, 0, session->c,
      +                              "push_diary_update: already there PUSH %s", push->req->path);
      +                move_to_last(session->push_diary, idx);
      +            }
      +            else {
      +                /* Intentional no APLOGNO */
      +                ap_log_cerror(APLOG_MARK, GCSLOG_LEVEL, 0, session->c,
      +                              "push_diary_update: adding PUSH %s", push->req->path);
      +                if (!npushes) {
      +                    npushes = apr_array_make(pushes->pool, 5, sizeof(h2_push_diary_entry*));
      +                }
      +                APR_ARRAY_PUSH(npushes, h2_push*) = push;
      +                h2_push_diary_append(session->push_diary, &e);
      +            }
      +        }
      +    }
      +    return npushes;
      +}
      +    
      +apr_array_header_t *h2_push_collect_update(h2_stream *stream, 
      +                                           const struct h2_request *req, 
      +                                           const struct h2_headers *res)
      +{
      +    h2_session *session = stream->session;
      +    const char *cache_digest = apr_table_get(req->headers, "Cache-Digest");
      +    apr_array_header_t *pushes;
      +    apr_status_t status;
      +    
      +    if (cache_digest && session->push_diary) {
      +        status = h2_push_diary_digest64_set(session->push_diary, req->authority, 
      +                                            cache_digest, stream->pool);
      +        if (status != APR_SUCCESS) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
      +                          APLOGNO(03057)
      +                          "h2_session(%ld): push diary set from Cache-Digest: %s", 
      +                          session->id, cache_digest);
      +        }
      +    }
      +    pushes = h2_push_collect(stream->pool, req, stream->push_policy, res);
      +    return h2_push_diary_update(stream->session, pushes);
      +}
      +
      +static apr_int32_t h2_log2inv(unsigned char log2)
      +{
      +    return log2? (1 << log2) : 1;
      +}
      +
      +
      +typedef struct {
      +    h2_push_diary *diary;
      +    unsigned char log2p;
      +    int mask_bits;
      +    int delta_bits;
      +    int fixed_bits;
      +    apr_uint64_t fixed_mask;
      +    apr_pool_t *pool;
      +    unsigned char *data;
      +    apr_size_t datalen;
      +    apr_size_t offset;
      +    unsigned int bit;
      +    apr_uint64_t last;
      +} gset_encoder;
      +
      +static int cmp_puint64(const void *p1, const void *p2)
      +{
      +    const apr_uint64_t *pu1 = p1, *pu2 = p2;
      +    return (*pu1 > *pu2)? 1 : ((*pu1 == *pu2)? 0 : -1);
      +}
      +
      +/* in golomb bit stream encoding, bit 0 is the 8th of the first char, or
      + * more generally: 
      + *      char(bit/8) & cbit_mask[(bit % 8)]
      + */
      +static unsigned char cbit_mask[] = {
      +    0x80u,
      +    0x40u,
      +    0x20u,
      +    0x10u,
      +    0x08u,
      +    0x04u,
      +    0x02u,
      +    0x01u,
      +};
      +
      +static apr_status_t gset_encode_bit(gset_encoder *encoder, int bit)
      +{
      +    if (++encoder->bit >= 8) {
      +        if (++encoder->offset >= encoder->datalen) {
      +            apr_size_t nlen = encoder->datalen*2;
      +            unsigned char *ndata = apr_pcalloc(encoder->pool, nlen);
      +            if (!ndata) {
      +                return APR_ENOMEM;
      +            }
      +            memcpy(ndata, encoder->data, encoder->datalen);
      +            encoder->data = ndata;
      +            encoder->datalen = nlen;
      +        }
      +        encoder->bit = 0;
      +        encoder->data[encoder->offset] = 0xffu;
      +    }
      +    if (!bit) {
      +        encoder->data[encoder->offset] &= ~cbit_mask[encoder->bit];
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t gset_encode_next(gset_encoder *encoder, apr_uint64_t pval)
      +{
      +    apr_uint64_t delta, flex_bits;
      +    apr_status_t status = APR_SUCCESS;
      +    int i;
      +    
      +    delta = pval - encoder->last;
      +    encoder->last = pval;
      +    flex_bits = (delta >> encoder->fixed_bits);
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, encoder->pool,
      +                  "h2_push_diary_enc: val=%"APR_UINT64_T_HEX_FMT", delta=%"
      +                  APR_UINT64_T_HEX_FMT" flex_bits=%"APR_UINT64_T_FMT", "
      +                  ", fixed_bits=%d, fixed_val=%"APR_UINT64_T_HEX_FMT, 
      +                  pval, delta, flex_bits, encoder->fixed_bits, delta&encoder->fixed_mask);
      +    for (; flex_bits != 0; --flex_bits) {
      +        status = gset_encode_bit(encoder, 1);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +    }
      +    status = gset_encode_bit(encoder, 0);
      +    if (status != APR_SUCCESS) {
      +        return status;
      +    }
      +
      +    for (i = encoder->fixed_bits-1; i >= 0; --i) {
      +        status = gset_encode_bit(encoder, (delta >> i) & 1);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +/**
      + * Get a cache digest as described in 
      + * https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/
      + * from the contents of the push diary.
      + * 
      + * @param diary the diary to calculdate the digest from
      + * @param p the pool to use
      + * @param pdata on successful return, the binary cache digest
      + * @param plen on successful return, the length of the binary data
      + */
      +apr_status_t h2_push_diary_digest_get(h2_push_diary *diary, apr_pool_t *pool, 
      +                                      int maxP, const char *authority, 
      +                                      const char **pdata, apr_size_t *plen)
      +{
      +    int nelts, N, i;
      +    unsigned char log2n, log2pmax;
      +    gset_encoder encoder;
      +    apr_uint64_t *hashes;
      +    apr_size_t hash_count;
      +    
      +    nelts = diary->entries->nelts;
      +    
      +    if (nelts > APR_UINT32_MAX) {
      +        /* should not happen */
      +        return APR_ENOTIMPL;
      +    }
      +    N = ceil_power_of_2(nelts);
      +    log2n = h2_log2(N);
      +    
      +    /* Now log2p is the max number of relevant bits, so that
      +     * log2p + log2n == mask_bits. We can uise a lower log2p
      +     * and have a shorter set encoding...
      +     */
      +    log2pmax = h2_log2(ceil_power_of_2(maxP));
      +    
      +    memset(&encoder, 0, sizeof(encoder));
      +    encoder.diary = diary;
      +    encoder.log2p = H2MIN(diary->mask_bits - log2n, log2pmax);
      +    encoder.mask_bits = log2n + encoder.log2p;
      +    encoder.delta_bits = diary->mask_bits - encoder.mask_bits;
      +    encoder.fixed_bits = encoder.log2p;
      +    encoder.fixed_mask = 1;
      +    encoder.fixed_mask = (encoder.fixed_mask << encoder.fixed_bits) - 1;
      +    encoder.pool = pool;
      +    encoder.datalen = 512;
      +    encoder.data = apr_pcalloc(encoder.pool, encoder.datalen);
      +    
      +    encoder.data[0] = log2n;
      +    encoder.data[1] = encoder.log2p;
      +    encoder.offset = 1;
      +    encoder.bit = 8;
      +    encoder.last = 0;
      +    
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, pool,
      +                  "h2_push_diary_digest_get: %d entries, N=%d, log2n=%d, "
      +                  "mask_bits=%d, enc.mask_bits=%d, delta_bits=%d, enc.log2p=%d, authority=%s", 
      +                  (int)nelts, (int)N, (int)log2n, diary->mask_bits, 
      +                  (int)encoder.mask_bits, (int)encoder.delta_bits, 
      +                  (int)encoder.log2p, authority);
      +                  
      +    if (!authority || !diary->authority 
      +        || !strcmp("*", authority) || !strcmp(diary->authority, authority)) {
      +        hash_count = diary->entries->nelts;
      +        hashes = apr_pcalloc(encoder.pool, hash_count);
      +        for (i = 0; i < hash_count; ++i) {
      +            hashes[i] = ((&APR_ARRAY_IDX(diary->entries, i, h2_push_diary_entry))->hash 
      +                         >> encoder.delta_bits);
      +        }
      +        
      +        qsort(hashes, hash_count, sizeof(apr_uint64_t), cmp_puint64);
      +        for (i = 0; i < hash_count; ++i) {
      +            if (!i || (hashes[i] != hashes[i-1])) {
      +                gset_encode_next(&encoder, hashes[i]);
      +            }
      +        }
      +        /* Intentional no APLOGNO */
      +        ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, pool,
      +                      "h2_push_diary_digest_get: golomb compressed hashes, %d bytes",
      +                      (int)encoder.offset + 1);
      +    }
      +    *pdata = (const char *)encoder.data;
      +    *plen = encoder.offset + 1;
      +    
      +    return APR_SUCCESS;
      +}
      +
      +typedef struct {
      +    h2_push_diary *diary;
      +    apr_pool_t *pool;
      +    unsigned char log2p;
      +    const unsigned char *data;
      +    apr_size_t datalen;
      +    apr_size_t offset;
      +    unsigned int bit;
      +    apr_uint64_t last_val;
      +} gset_decoder;
      +
      +static int gset_decode_next_bit(gset_decoder *decoder)
      +{
      +    if (++decoder->bit >= 8) {
      +        if (++decoder->offset >= decoder->datalen) {
      +            return -1;
      +        }
      +        decoder->bit = 0;
      +    }
      +    return (decoder->data[decoder->offset] & cbit_mask[decoder->bit])? 1 : 0;
      +}
      +
      +static apr_status_t gset_decode_next(gset_decoder *decoder, apr_uint64_t *phash)
      +{
      +    apr_uint64_t flex = 0, fixed = 0, delta;
      +    int i;
      +    
      +    /* read 1 bits until we encounter 0, then read log2n(diary-P) bits.
      +     * On a malformed bit-string, this will not fail, but produce results
      +     * which are pbly too large. Luckily, the diary will modulo the hash.
      +     */
      +    while (1) {
      +        int bit = gset_decode_next_bit(decoder);
      +        if (bit == -1) {
      +            return APR_EINVAL;
      +        }
      +        if (!bit) {
      +            break;
      +        }
      +        ++flex;
      +    }
      +    
      +    for (i = 0; i < decoder->log2p; ++i) {
      +        int bit = gset_decode_next_bit(decoder);
      +        if (bit == -1) {
      +            return APR_EINVAL;
      +        }
      +        fixed = (fixed << 1) | bit;
      +    }
      +    
      +    delta = (flex << decoder->log2p) | fixed;
      +    *phash = delta + decoder->last_val;
      +    decoder->last_val = *phash;
      +    
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, decoder->pool,
      +                  "h2_push_diary_digest_dec: val=%"APR_UINT64_T_HEX_FMT", delta=%"
      +                  APR_UINT64_T_HEX_FMT", flex=%d, fixed=%"APR_UINT64_T_HEX_FMT, 
      +                  *phash, delta, (int)flex, fixed);
      +                  
      +    return APR_SUCCESS;
      +}
      +
      +/**
      + * Initialize the push diary by a cache digest as described in 
      + * https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/
      + * .
      + * @param diary the diary to set the digest into
      + * @param data the binary cache digest
      + * @param len the length of the cache digest
      + * @return APR_EINVAL if digest was not successfully parsed
      + */
      +apr_status_t h2_push_diary_digest_set(h2_push_diary *diary, const char *authority, 
      +                                      const char *data, apr_size_t len)
      +{
      +    gset_decoder decoder;
      +    unsigned char log2n, log2p;
      +    int N, i;
      +    apr_pool_t *pool = diary->entries->pool;
      +    h2_push_diary_entry e;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    if (len < 2) {
      +        /* at least this should be there */
      +        return APR_EINVAL;
      +    }
      +    log2n = data[0];
      +    log2p = data[1];
      +    diary->mask_bits = log2n + log2p;
      +    if (diary->mask_bits > 64) {
      +        /* cannot handle */
      +        return APR_ENOTIMPL;
      +    }
      +    
      +    /* whatever is in the digest, it replaces the diary entries */
      +    apr_array_clear(diary->entries);
      +    if (!authority || !strcmp("*", authority)) {
      +        diary->authority = NULL;
      +    }
      +    else if (!diary->authority || strcmp(diary->authority, authority)) {
      +        diary->authority = apr_pstrdup(diary->entries->pool, authority);
      +    }
      +
      +    N = h2_log2inv(log2n + log2p);
      +
      +    decoder.diary    = diary;
      +    decoder.pool     = pool;
      +    decoder.log2p    = log2p;
      +    decoder.data     = (const unsigned char*)data;
      +    decoder.datalen  = len;
      +    decoder.offset   = 1;
      +    decoder.bit      = 8;
      +    decoder.last_val = 0;
      +    
      +    diary->N = N;
      +    /* Determine effective N we use for storage */
      +    if (!N) {
      +        /* a totally empty cache digest. someone tells us that she has no
      +         * entries in the cache at all. Use our own preferences for N+mask 
      +         */
      +        diary->N = diary->NMax;
      +        return APR_SUCCESS;
      +    }
      +    else if (N > diary->NMax) {
      +        /* Store not more than diary is configured to hold. We open us up
      +         * to DOS attacks otherwise. */
      +        diary->N = diary->NMax;
      +    }
      +    
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, pool,
      +                  "h2_push_diary_digest_set: N=%d, log2n=%d, "
      +                  "diary->mask_bits=%d, dec.log2p=%d", 
      +                  (int)diary->N, (int)log2n, diary->mask_bits, 
      +                  (int)decoder.log2p);
      +                  
      +    for (i = 0; i < diary->N; ++i) {
      +        if (gset_decode_next(&decoder, &e.hash) != APR_SUCCESS) {
      +            /* the data may have less than N values */
      +            break;
      +        }
      +        h2_push_diary_append(diary, &e);
      +    }
      +    
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, pool,
      +                  "h2_push_diary_digest_set: diary now with %d entries, mask_bits=%d", 
      +                  (int)diary->entries->nelts, diary->mask_bits);
      +    return status;
      +}
      +
      +apr_status_t h2_push_diary_digest64_set(h2_push_diary *diary, const char *authority, 
      +                                        const char *data64url, apr_pool_t *pool)
      +{
      +    const char *data;
      +    apr_size_t len = h2_util_base64url_decode(&data, data64url, pool);
      +    /* Intentional no APLOGNO */
      +    ap_log_perror(APLOG_MARK, GCSLOG_LEVEL, 0, pool,
      +                  "h2_push_diary_digest64_set: digest=%s, dlen=%d", 
      +                  data64url, (int)len);
      +    return h2_push_diary_digest_set(diary, authority, data, len);
      +}
      +
      diff --git a/modules/http2/h2_push.h b/modules/http2/h2_push.h
      new file mode 100644
      index 00000000000..eb122ebf864
      --- /dev/null
      +++ b/modules/http2/h2_push.h
      @@ -0,0 +1,118 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +#ifndef __mod_h2__h2_push__
      +#define __mod_h2__h2_push__
      +
      +#include "h2.h"
      +
      +struct h2_request;
      +struct h2_headers;
      +struct h2_ngheader;
      +struct h2_session;
      +struct h2_stream;
      +
      +typedef struct h2_push {
      +    const struct h2_request *req;
      +    h2_priority *priority;
      +} h2_push;
      +
      +typedef enum {
      +    H2_PUSH_DIGEST_APR_HASH,
      +    H2_PUSH_DIGEST_SHA256
      +} h2_push_digest_type;
      +
      +typedef struct h2_push_diary h2_push_diary;
      +
      +typedef void h2_push_digest_calc(h2_push_diary *diary, apr_uint64_t *phash, h2_push *push);
      +
      +struct h2_push_diary {
      +    apr_array_header_t  *entries;
      +    int         NMax; /* Maximum for N, should size change be necessary */
      +    int         N;    /* Current maximum number of entries, power of 2 */
      +    apr_uint64_t         mask; /* mask for relevant bits */
      +    unsigned int         mask_bits; /* number of relevant bits */
      +    const char          *authority;
      +    h2_push_digest_type  dtype;
      +    h2_push_digest_calc *dcalc;
      +};
      +
      +/**
      + * Determine the list of h2_push'es to send to the client on behalf of
      + * the given request/response pair.
      + *
      + * @param p the pool to use
      + * @param req the requst from the client
      + * @param res the response from the server
      + * @return array of h2_push addresses or NULL
      + */
      +apr_array_header_t *h2_push_collect(apr_pool_t *p, 
      +                                    const struct h2_request *req, 
      +                                    int push_policy, 
      +                                    const struct h2_headers *res);
      +
      +/**
      + * Create a new push diary for the given maximum number of entries.
      + * 
      + * @param p the pool to use
      + * @param N the max number of entries, rounded up to 2^x
      + * @return the created diary, might be NULL of max_entries is 0
      + */
      +h2_push_diary *h2_push_diary_create(apr_pool_t *p, int N);
      +
      +/**
      + * Filters the given pushes against the diary and returns only those pushes
      + * that were newly entered in the diary.
      + */
      +apr_array_header_t *h2_push_diary_update(struct h2_session *session, apr_array_header_t *pushes);
      +
      +/**
      + * Collect pushes for the given request/response pair, enter them into the
      + * diary and return those pushes newly entered.
      + */
      +apr_array_header_t *h2_push_collect_update(struct h2_stream *stream, 
      +                                           const struct h2_request *req, 
      +                                           const struct h2_headers *res);
      +/**
      + * Get a cache digest as described in 
      + * https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/
      + * from the contents of the push diary.
      + * 
      + * @param diary the diary to calculdate the digest from
      + * @param p the pool to use
      + * @param authority the authority to get the data for, use NULL/"*" for all
      + * @param pdata on successful return, the binary cache digest
      + * @param plen on successful return, the length of the binary data
      + */
      +apr_status_t h2_push_diary_digest_get(h2_push_diary *diary, apr_pool_t *p, 
      +                                      int maxP, const char *authority, 
      +                                      const char **pdata, apr_size_t *plen);
      +
      +/**
      + * Initialize the push diary by a cache digest as described in 
      + * https://datatracker.ietf.org/doc/draft-kazuho-h2-cache-digest/
      + * .
      + * @param diary the diary to set the digest into
      + * @param authority the authority to set the data for
      + * @param data the binary cache digest
      + * @param len the length of the cache digest
      + * @return APR_EINVAL if digest was not successfully parsed
      + */
      +apr_status_t h2_push_diary_digest_set(h2_push_diary *diary, const char *authority, 
      +                                      const char *data, apr_size_t len);
      +
      +apr_status_t h2_push_diary_digest64_set(h2_push_diary *diary, const char *authority, 
      +                                        const char *data64url, apr_pool_t *pool);
      +
      +#endif /* defined(__mod_h2__h2_push__) */
      diff --git a/modules/http2/h2_request.c b/modules/http2/h2_request.c
      new file mode 100644
      index 00000000000..b6f13c4734c
      --- /dev/null
      +++ b/modules/http2/h2_request.c
      @@ -0,0 +1,334 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +#include <http_log.h>
      +#include <http_vhost.h>
      +#include <util_filter.h>
      +#include <ap_mpm.h>
      +#include <mod_core.h>
      +#include <scoreboard.h>
      +
      +#include "h2_private.h"
      +#include "h2_config.h"
      +#include "h2_push.h"
      +#include "h2_request.h"
      +#include "h2_util.h"
      +
      +
      +typedef struct {
      +    apr_table_t *headers;
      +    apr_pool_t *pool;
      +} h1_ctx;
      +
      +static int set_h1_header(void *ctx, const char *key, const char *value)
      +{
      +    h1_ctx *x = ctx;
      +    size_t klen = strlen(key);
      +    if (!h2_req_ignore_header(key, klen)) {
      +        h2_headers_add_h1(x->headers, x->pool, key, klen, value, strlen(value));
      +    }
      +    return 1;
      +}
      +
      +apr_status_t h2_request_rcreate(h2_request **preq, apr_pool_t *pool, 
      +                                request_rec *r)
      +{
      +    h2_request *req;
      +    const char *scheme, *authority, *path;
      +    h1_ctx x;
      +    
      +    *preq = NULL;
      +    scheme = apr_pstrdup(pool, r->parsed_uri.scheme? r->parsed_uri.scheme
      +              : ap_http_scheme(r));
      +    authority = apr_pstrdup(pool, r->hostname);
      +    path = apr_uri_unparse(pool, &r->parsed_uri, APR_URI_UNP_OMITSITEPART);
      +    
      +    if (!r->method || !scheme || !r->hostname || !path) {
      +        return APR_EINVAL;
      +    }
      +
      +    if (!ap_strchr_c(authority, ':') && r->server && r->server->port) {
      +        apr_port_t defport = apr_uri_port_of_scheme(scheme);
      +        if (defport != r->server->port) {
      +            /* port info missing and port is not default for scheme: append */
      +            authority = apr_psprintf(pool, "%s:%d", authority,
      +                                     (int)r->server->port);
      +        }
      +    }
      +    
      +    req = apr_pcalloc(pool, sizeof(*req));
      +    req->method    = apr_pstrdup(pool, r->method);
      +    req->scheme    = scheme;
      +    req->authority = authority;
      +    req->path      = path;
      +    req->headers   = apr_table_make(pool, 10);
      +    if (r->server) {
      +        req->serialize = h2_config_geti(h2_config_sget(r->server), 
      +                                        H2_CONF_SER_HEADERS);
      +    }
      +
      +    x.pool = pool;
      +    x.headers = req->headers;
      +    apr_table_do(set_h1_header, &x, r->headers_in, NULL);
      +    
      +    *preq = req;
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_request_add_header(h2_request *req, apr_pool_t *pool, 
      +                                   const char *name, size_t nlen,
      +                                   const char *value, size_t vlen)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    if (nlen <= 0) {
      +        return status;
      +    }
      +    
      +    if (name[0] == ':') {
      +        /* pseudo header, see ch. 8.1.2.3, always should come first */
      +        if (!apr_is_empty_table(req->headers)) {
      +            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, pool,
      +                          APLOGNO(02917) 
      +                          "h2_request: pseudo header after request start");
      +            return APR_EGENERAL;
      +        }
      +        
      +        if (H2_HEADER_METHOD_LEN == nlen
      +            && !strncmp(H2_HEADER_METHOD, name, nlen)) {
      +            req->method = apr_pstrndup(pool, value, vlen);
      +        }
      +        else if (H2_HEADER_SCHEME_LEN == nlen
      +                 && !strncmp(H2_HEADER_SCHEME, name, nlen)) {
      +            req->scheme = apr_pstrndup(pool, value, vlen);
      +        }
      +        else if (H2_HEADER_PATH_LEN == nlen
      +                 && !strncmp(H2_HEADER_PATH, name, nlen)) {
      +            req->path = apr_pstrndup(pool, value, vlen);
      +        }
      +        else if (H2_HEADER_AUTH_LEN == nlen
      +                 && !strncmp(H2_HEADER_AUTH, name, nlen)) {
      +            req->authority = apr_pstrndup(pool, value, vlen);
      +        }
      +        else {
      +            char buffer[32];
      +            memset(buffer, 0, 32);
      +            strncpy(buffer, name, (nlen > 31)? 31 : nlen);
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, pool,
      +                          APLOGNO(02954) 
      +                          "h2_request: ignoring unknown pseudo header %s",
      +                          buffer);
      +        }
      +    }
      +    else {
      +        /* non-pseudo header, append to work bucket of stream */
      +        status = h2_headers_add_h1(req->headers, pool, name, nlen, value, vlen);
      +    }
      +    
      +    return status;
      +}
      +
      +apr_status_t h2_request_end_headers(h2_request *req, apr_pool_t *pool, int eos)
      +{
      +    const char *s;
      +    
      +    /* rfc7540, ch. 8.1.2.3:
      +     * - if we have :authority, it overrides any Host header 
      +     * - :authority MUST be ommited when converting h1->h2, so we
      +     *   might get a stream without, but then Host needs to be there */
      +    if (!req->authority) {
      +        const char *host = apr_table_get(req->headers, "Host");
      +        if (!host) {
      +            return APR_BADARG;
      +        }
      +        req->authority = host;
      +    }
      +    else {
      +        apr_table_setn(req->headers, "Host", req->authority);
      +    }
      +
      +    s = apr_table_get(req->headers, "Content-Length");
      +    if (!s) {
      +        /* no content-length given */
      +        if (!eos) {
      +            /* We have not seen a content-length and have no eos,
      +             * simulate a chunked encoding for our HTTP/1.1 infrastructure,
      +             * in case we have "H2SerializeHeaders on" here
      +             */
      +            req->chunked = 1;
      +            apr_table_mergen(req->headers, "Transfer-Encoding", "chunked");
      +        }
      +        else if (apr_table_get(req->headers, "Content-Type")) {
      +            /* If we have a content-type, but already seen eos, no more
      +             * data will come. Signal a zero content length explicitly.
      +             */
      +            apr_table_setn(req->headers, "Content-Length", "0");
      +        }
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
      +h2_request *h2_request_clone(apr_pool_t *p, const h2_request *src)
      +{
      +    h2_request *dst = apr_pmemdup(p, src, sizeof(*dst));
      +    dst->method       = apr_pstrdup(p, src->method);
      +    dst->scheme       = apr_pstrdup(p, src->scheme);
      +    dst->authority    = apr_pstrdup(p, src->authority);
      +    dst->path         = apr_pstrdup(p, src->path);
      +    dst->headers      = apr_table_clone(p, src->headers);
      +    return dst;
      +}
      +
      +request_rec *h2_request_create_rec(const h2_request *req, conn_rec *c)
      +{
      +    int access_status = HTTP_OK;    
      +    const char *rpath;
      +    apr_pool_t *p;
      +    request_rec *r;
      +    const char *s;
      +
      +    apr_pool_create(&p, c->pool);
      +    apr_pool_tag(p, "request");
      +    r = apr_pcalloc(p, sizeof(request_rec));
      +    AP_READ_REQUEST_ENTRY((intptr_t)r, (uintptr_t)c);
      +    r->pool            = p;
      +    r->connection      = c;
      +    r->server          = c->base_server;
      +    
      +    r->user            = NULL;
      +    r->ap_auth_type    = NULL;
      +    
      +    r->allowed_methods = ap_make_method_list(p, 2);
      +    
      +    r->headers_in      = apr_table_clone(r->pool, req->headers);
      +    r->trailers_in     = apr_table_make(r->pool, 5);
      +    r->subprocess_env  = apr_table_make(r->pool, 25);
      +    r->headers_out     = apr_table_make(r->pool, 12);
      +    r->err_headers_out = apr_table_make(r->pool, 5);
      +    r->trailers_out    = apr_table_make(r->pool, 5);
      +    r->notes           = apr_table_make(r->pool, 5);
      +    
      +    r->request_config  = ap_create_request_config(r->pool);
      +    /* Must be set before we run create request hook */
      +    
      +    r->proto_output_filters = c->output_filters;
      +    r->output_filters  = r->proto_output_filters;
      +    r->proto_input_filters = c->input_filters;
      +    r->input_filters   = r->proto_input_filters;
      +    ap_run_create_request(r);
      +    r->per_dir_config  = r->server->lookup_defaults;
      +    
      +    r->sent_bodyct     = 0;                      /* bytect isn't for body */
      +    
      +    r->read_length     = 0;
      +    r->read_body       = REQUEST_NO_BODY;
      +    
      +    r->status          = HTTP_OK;  /* Until further notice */
      +    r->header_only     = 0;
      +    r->the_request     = NULL;
      +    
      +    /* Begin by presuming any module can make its own path_info assumptions,
      +     * until some module interjects and changes the value.
      +     */
      +    r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
      +    
      +    r->useragent_addr = c->client_addr;
      +    r->useragent_ip = c->client_ip;
      +    
      +    ap_run_pre_read_request(r, c);
      +    
      +    /* Time to populate r with the data we have. */
      +    r->request_time = req->request_time;
      +    r->method = req->method;
      +    /* Provide quick information about the request method as soon as known */
      +    r->method_number = ap_method_number_of(r->method);
      +    if (r->method_number == M_GET && r->method[0] == 'H') {
      +        r->header_only = 1;
      +    }
      +
      +    rpath = (req->path ? req->path : "");
      +    ap_parse_uri(r, rpath);
      +    r->protocol = (char*)"HTTP/2.0";
      +    r->proto_num = HTTP_VERSION(2, 0);
      +
      +    r->the_request = apr_psprintf(r->pool, "%s %s %s", 
      +                                  r->method, rpath, r->protocol);
      +    
      +    /* update what we think the virtual host is based on the headers we've
      +     * now read. may update status.
      +     * Leave r->hostname empty, vhost will parse if form our Host: header,
      +     * otherwise we get complains about port numbers.
      +     */
      +    r->hostname = NULL;
      +    ap_update_vhost_from_headers(r);
      +    
      +    /* we may have switched to another server */
      +    r->per_dir_config = r->server->lookup_defaults;
      +    
      +    s = apr_table_get(r->headers_in, "Expect");
      +    if (s && s[0]) {
      +        if (ap_cstr_casecmp(s, "100-continue") == 0) {
      +            r->expecting_100 = 1;
      +        }
      +        else {
      +            r->status = HTTP_EXPECTATION_FAILED;
      +            ap_send_error_response(r, 0);
      +        }
      +    }
      +
      +    /*
      +     * Add the HTTP_IN filter here to ensure that ap_discard_request_body
      +     * called by ap_die and by ap_send_error_response works correctly on
      +     * status codes that do not cause the connection to be dropped and
      +     * in situations where the connection should be kept alive.
      +     */
      +    ap_add_input_filter_handle(ap_http_input_filter_handle,
      +                               NULL, r, r->connection);
      +    
      +    if (access_status != HTTP_OK
      +        || (access_status = ap_run_post_read_request(r))) {
      +        /* Request check post hooks failed. An example of this would be a
      +         * request for a vhost where h2 is disabled --> 421.
      +         */
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03367)
      +                      "h2_request: access_status=%d, request_create failed",
      +                      access_status);
      +        ap_die(access_status, r);
      +        ap_update_child_status(c->sbh, SERVER_BUSY_LOG, r);
      +        ap_run_log_transaction(r);
      +        r = NULL;
      +        goto traceout;
      +    }
      +
      +    AP_READ_REQUEST_SUCCESS((uintptr_t)r, (char *)r->method, 
      +                            (char *)r->uri, (char *)r->server->defn_name, 
      +                            r->status);
      +    return r;
      +traceout:
      +    AP_READ_REQUEST_FAILURE((uintptr_t)r);
      +    return r;
      +}
      +
      +
      diff --git a/modules/http2/h2_request.h b/modules/http2/h2_request.h
      new file mode 100644
      index 00000000000..faf97911942
      --- /dev/null
      +++ b/modules/http2/h2_request.h
      @@ -0,0 +1,47 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_request__
      +#define __mod_h2__h2_request__
      +
      +#include "h2.h"
      +
      +apr_status_t h2_request_rcreate(h2_request **preq, apr_pool_t *pool, 
      +                                request_rec *r);
      +
      +apr_status_t h2_request_add_header(h2_request *req, apr_pool_t *pool,
      +                                   const char *name, size_t nlen,
      +                                   const char *value, size_t vlen);
      +
      +apr_status_t h2_request_add_trailer(h2_request *req, apr_pool_t *pool,
      +                                    const char *name, size_t nlen,
      +                                    const char *value, size_t vlen);
      +
      +apr_status_t h2_request_end_headers(h2_request *req, apr_pool_t *pool, int eos);
      +
      +h2_request *h2_request_clone(apr_pool_t *p, const h2_request *src);
      +
      +/**
      + * Create a request_rec representing the h2_request to be
      + * processed on the given connection.
      + *
      + * @param req the h2 request to process
      + * @param conn the connection to process the request on
      + * @return the request_rec representing the request
      + */
      +request_rec *h2_request_create_rec(const h2_request *req, conn_rec *conn);
      +
      +
      +#endif /* defined(__mod_h2__h2_request__) */
      diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c
      new file mode 100644
      index 00000000000..44eed633256
      --- /dev/null
      +++ b/modules/http2/h2_session.c
      @@ -0,0 +1,2337 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +#include <apr_thread_cond.h>
      +#include <apr_base64.h>
      +#include <apr_strings.h>
      +
      +#include <ap_mpm.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +#include <http_log.h>
      +#include <scoreboard.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_bucket_eoc.h"
      +#include "h2_bucket_eos.h"
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_filter.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_push.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_stream.h"
      +#include "h2_task.h"
      +#include "h2_session.h"
      +#include "h2_util.h"
      +#include "h2_version.h"
      +#include "h2_workers.h"
      +
      +
      +static int h2_session_status_from_apr_status(apr_status_t rv)
      +{
      +    if (rv == APR_SUCCESS) {
      +        return NGHTTP2_NO_ERROR;
      +    }
      +    else if (APR_STATUS_IS_EAGAIN(rv)) {
      +        return NGHTTP2_ERR_WOULDBLOCK;
      +    }
      +    else if (APR_STATUS_IS_EOF(rv)) {
      +        return NGHTTP2_ERR_EOF;
      +    }
      +    return NGHTTP2_ERR_PROTO;
      +}
      +
      +static void update_window(void *ctx, int stream_id, apr_off_t bytes_read)
      +{
      +    h2_session *session = (h2_session*)ctx;
      +    nghttp2_session_consume(session->ngh2, stream_id, bytes_read);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                  "h2_session(%ld-%d): consumed %ld bytes",
      +                  session->id, stream_id, (long)bytes_read);
      +}
      +
      +static apr_status_t h2_session_receive(void *ctx, 
      +                                       const char *data, apr_size_t len,
      +                                       apr_size_t *readlen);
      +
      +static void dispatch_event(h2_session *session, h2_session_event_t ev, 
      +                             int err, const char *msg);
      +
      +apr_status_t h2_session_stream_done(h2_session *session, h2_stream *stream)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                  "h2_stream(%ld-%d): EOS bucket cleanup -> done", 
      +                  session->id, stream->id);
      +    h2_mplx_stream_done(session->mplx, stream);
      +    
      +    dispatch_event(session, H2_SESSION_EV_STREAM_DONE, 0, NULL);
      +    return APR_SUCCESS;
      +}
      +
      +typedef struct stream_sel_ctx {
      +    h2_session *session;
      +    h2_stream *candidate;
      +} stream_sel_ctx;
      +
      +static int find_cleanup_stream(h2_stream *stream, void *ictx)
      +{
      +    stream_sel_ctx *ctx = ictx;
      +    if (H2_STREAM_CLIENT_INITIATED(stream->id)) {
      +        if (!ctx->session->local.accepting
      +            && stream->id > ctx->session->local.accepted_max) {
      +            ctx->candidate = stream;
      +            return 0;
      +        }
      +    }
      +    else {
      +        if (!ctx->session->remote.accepting
      +            && stream->id > ctx->session->remote.accepted_max) {
      +            ctx->candidate = stream;
      +            return 0;
      +        }
      +    }
      +    return 1;
      +}
      +
      +static void cleanup_streams(h2_session *session)
      +{
      +    stream_sel_ctx ctx;
      +    ctx.session = session;
      +    ctx.candidate = NULL;
      +    while (1) {
      +        h2_mplx_stream_do(session->mplx, find_cleanup_stream, &ctx);
      +        if (ctx.candidate) {
      +            h2_session_stream_done(session, ctx.candidate);
      +            ctx.candidate = NULL;
      +        }
      +        else {
      +            break;
      +        }
      +    }
      +}
      +
      +h2_stream *h2_session_open_stream(h2_session *session, int stream_id,
      +                                  int initiated_on, const h2_request *req)
      +{
      +    h2_stream * stream;
      +    apr_pool_t *stream_pool;
      +    
      +    apr_pool_create(&stream_pool, session->pool);
      +    apr_pool_tag(stream_pool, "h2_stream");
      +    
      +    stream = h2_stream_open(stream_id, stream_pool, session, 
      +                            initiated_on);
      +    nghttp2_session_set_stream_user_data(session->ngh2, stream_id, stream);
      +    
      +    if (req) {
      +        h2_stream_set_request(stream, req);
      +    }
      +    
      +    if (H2_STREAM_CLIENT_INITIATED(stream_id)) {
      +        if (stream_id > session->remote.emitted_max) {
      +            ++session->remote.emitted_count;
      +            session->remote.emitted_max = stream->id;
      +            session->local.accepted_max = stream->id;
      +        }
      +    }
      +    else {
      +        if (stream_id > session->local.emitted_max) {
      +            ++session->local.emitted_count;
      +            session->remote.emitted_max = stream->id;
      +        }
      +    }
      +    dispatch_event(session, H2_SESSION_EV_STREAM_OPEN, 0, NULL);
      +    
      +    return stream;
      +}
      +
      +/**
      + * Determine the importance of streams when scheduling tasks.
      + * - if both stream depend on the same one, compare weights
      + * - if one stream is closer to the root, prioritize that one
      + * - if both are on the same level, use the weight of their root
      + *   level ancestors
      + */
      +static int spri_cmp(int sid1, nghttp2_stream *s1, 
      +                    int sid2, nghttp2_stream *s2, h2_session *session)
      +{
      +    nghttp2_stream *p1, *p2;
      +    
      +    p1 = nghttp2_stream_get_parent(s1);
      +    p2 = nghttp2_stream_get_parent(s2);
      +    
      +    if (p1 == p2) {
      +        int32_t w1, w2;
      +        
      +        w1 = nghttp2_stream_get_weight(s1);
      +        w2 = nghttp2_stream_get_weight(s2);
      +        return w2 - w1;
      +    }
      +    else if (!p1) {
      +        /* stream 1 closer to root */
      +        return -1;
      +    }
      +    else if (!p2) {
      +        /* stream 2 closer to root */
      +        return 1;
      +    }
      +    return spri_cmp(sid1, p1, sid2, p2, session);
      +}
      +
      +static int stream_pri_cmp(int sid1, int sid2, void *ctx)
      +{
      +    h2_session *session = ctx;
      +    nghttp2_stream *s1, *s2;
      +    
      +    s1 = nghttp2_session_find_stream(session->ngh2, sid1);
      +    s2 = nghttp2_session_find_stream(session->ngh2, sid2);
      +
      +    if (s1 == s2) {
      +        return 0;
      +    }
      +    else if (!s1) {
      +        return 1;
      +    }
      +    else if (!s2) {
      +        return -1;
      +    }
      +    return spri_cmp(sid1, s1, sid2, s2, session);
      +}
      +
      +static apr_status_t stream_schedule(h2_session *session,
      +                                    h2_stream *stream, int eos)
      +{
      +    (void)session;
      +    return h2_stream_schedule(stream, eos, h2_session_push_enabled(session), 
      +                              stream_pri_cmp, session);
      +}
      +
      +/*
      + * Callback when nghttp2 wants to send bytes back to the client.
      + */
      +static ssize_t send_cb(nghttp2_session *ngh2,
      +                       const uint8_t *data, size_t length,
      +                       int flags, void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    apr_status_t status;
      +    
      +    (void)ngh2;
      +    (void)flags;
      +    status = h2_conn_io_write(&session->io, (const char *)data, length);
      +    if (status == APR_SUCCESS) {
      +        return length;
      +    }
      +    if (APR_STATUS_IS_EAGAIN(status)) {
      +        return NGHTTP2_ERR_WOULDBLOCK;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c, APLOGNO(03062)
      +                  "h2_session: send error");
      +    return h2_session_status_from_apr_status(status);
      +}
      +
      +static int on_invalid_frame_recv_cb(nghttp2_session *ngh2,
      +                                    const nghttp2_frame *frame,
      +                                    int error, void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    (void)ngh2;
      +    
      +    if (APLOGcdebug(session->c)) {
      +        char buffer[256];
      +        
      +        h2_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03063)
      +                      "h2_session(%ld): recv invalid FRAME[%s], frames=%ld/%ld (r/s)",
      +                      session->id, buffer, (long)session->frames_received,
      +                     (long)session->frames_sent);
      +    }
      +    return 0;
      +}
      +
      +static h2_stream *get_stream(h2_session *session, int stream_id)
      +{
      +    return nghttp2_session_get_stream_user_data(session->ngh2, stream_id);
      +}
      +
      +static int on_data_chunk_recv_cb(nghttp2_session *ngh2, uint8_t flags,
      +                                 int32_t stream_id,
      +                                 const uint8_t *data, size_t len, void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    apr_status_t status = APR_SUCCESS;
      +    h2_stream * stream;
      +    int rv;
      +    
      +    (void)flags;
      +    stream = get_stream(session, stream_id);
      +    if (!stream) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03064)
      +                      "h2_stream(%ld-%d): on_data_chunk for unknown stream",
      +                      session->id, (int)stream_id);
      +        rv = nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE, stream_id,
      +                                       NGHTTP2_INTERNAL_ERROR);
      +        if (nghttp2_is_fatal(rv)) {
      +            return NGHTTP2_ERR_CALLBACK_FAILURE;
      +        }
      +        return 0;
      +    }
      +
      +    /* FIXME: enabling setting EOS this way seems to break input handling
      +     * in mod_proxy_http2. why? */
      +    status = h2_stream_write_data(stream, (const char *)data, len,
      +                                  0 /*flags & NGHTTP2_FLAG_END_STREAM*/);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                  "h2_stream(%ld-%d): data_chunk_recv, written %ld bytes",
      +                  session->id, stream_id, (long)len);
      +    if (status != APR_SUCCESS) {
      +        update_window(session, stream_id, len);
      +        rv = nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE, stream_id,
      +                                       H2_STREAM_RST(stream, H2_ERR_INTERNAL_ERROR));
      +        if (nghttp2_is_fatal(rv)) {
      +            return NGHTTP2_ERR_CALLBACK_FAILURE;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static apr_status_t stream_release(h2_session *session, 
      +                                   h2_stream *stream,
      +                                   uint32_t error_code) 
      +{
      +    conn_rec *c = session->c;
      +    apr_bucket *b;
      +    apr_status_t status;
      +    
      +    if (!error_code) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "h2_stream(%ld-%d): handled, closing", 
      +                      session->id, (int)stream->id);
      +        if (H2_STREAM_CLIENT_INITIATED(stream->id)) {
      +            if (stream->id > session->local.completed_max) {
      +                session->local.completed_max = stream->id;
      +            }
      +        }
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03065)
      +                      "h2_stream(%ld-%d): closing with err=%d %s", 
      +                      session->id, (int)stream->id, (int)error_code,
      +                      h2_h2_err_description(error_code));
      +        h2_stream_rst(stream, error_code);
      +    }
      +    
      +    b = h2_bucket_eos_create(c->bucket_alloc, stream);
      +    APR_BRIGADE_INSERT_TAIL(session->bbtmp, b);
      +    status = h2_conn_io_pass(&session->io, session->bbtmp);
      +    apr_brigade_cleanup(session->bbtmp);
      +    return status;
      +}
      +
      +static int on_stream_close_cb(nghttp2_session *ngh2, int32_t stream_id,
      +                              uint32_t error_code, void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    h2_stream *stream;
      +    
      +    (void)ngh2;
      +    stream = get_stream(session, stream_id);
      +    if (stream) {
      +        stream_release(session, stream, error_code);
      +    }
      +    return 0;
      +}
      +
      +static int on_begin_headers_cb(nghttp2_session *ngh2,
      +                               const nghttp2_frame *frame, void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    h2_stream *s;
      +    
      +    /* We may see HEADERs at the start of a stream or after all DATA
      +     * streams to carry trailers. */
      +    (void)ngh2;
      +    s = get_stream(session, frame->hd.stream_id);
      +    if (s) {
      +        /* nop */
      +    }
      +    else {
      +        s = h2_session_open_stream(userp, frame->hd.stream_id, 0, NULL);
      +    }
      +    return s? 0 : NGHTTP2_ERR_START_STREAM_NOT_ALLOWED;
      +}
      +
      +static int on_header_cb(nghttp2_session *ngh2, const nghttp2_frame *frame,
      +                        const uint8_t *name, size_t namelen,
      +                        const uint8_t *value, size_t valuelen,
      +                        uint8_t flags,
      +                        void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    h2_stream * stream;
      +    apr_status_t status;
      +    
      +    (void)flags;
      +    stream = get_stream(session, frame->hd.stream_id);
      +    if (!stream) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c,
      +                      APLOGNO(02920) 
      +                      "h2_session:  stream(%ld-%d): on_header unknown stream",
      +                      session->id, (int)frame->hd.stream_id);
      +        return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
      +    }
      +    
      +    status = h2_stream_add_header(stream, (const char *)name, namelen,
      +                                  (const char *)value, valuelen);
      +    if (status == APR_ECONNRESET) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                      "h2-stream(%ld-%d): on_header, reset stream",
      +                      session->id, stream->id);
      +        nghttp2_submit_rst_stream(ngh2, NGHTTP2_FLAG_NONE, stream->id,
      +                                  NGHTTP2_INTERNAL_ERROR);
      +    }
      +    else if (status != APR_SUCCESS && !h2_stream_is_ready(stream)) {
      +        return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE;
      +    }
      +    return 0;
      +}
      +
      +/**
      + * nghttp2 session has received a complete frame. Most, it uses
      + * for processing of internal state. HEADER and DATA frames however
      + * we need to handle ourself.
      + */
      +static int on_frame_recv_cb(nghttp2_session *ng2s,
      +                            const nghttp2_frame *frame,
      +                            void *userp)
      +{
      +    h2_session *session = (h2_session *)userp;
      +    apr_status_t status = APR_SUCCESS;
      +    h2_stream *stream;
      +    
      +    if (APLOGcdebug(session->c)) {
      +        char buffer[256];
      +        
      +        h2_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03066)
      +                      "h2_session(%ld): recv FRAME[%s], frames=%ld/%ld (r/s)",
      +                      session->id, buffer, (long)session->frames_received,
      +                     (long)session->frames_sent);
      +    }
      +
      +    ++session->frames_received;
      +    switch (frame->hd.type) {
      +        case NGHTTP2_HEADERS:
      +            /* This can be HEADERS for a new stream, defining the request,
      +             * or HEADER may come after DATA at the end of a stream as in
      +             * trailers */
      +            stream = get_stream(session, frame->hd.stream_id);
      +            if (stream) {
      +                int eos = (frame->hd.flags & NGHTTP2_FLAG_END_STREAM);
      +                
      +                if (h2_stream_is_scheduled(stream)) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                                  "h2_stream(%ld-%d): TRAILER, eos=%d", 
      +                                  session->id, frame->hd.stream_id, eos);
      +                    if (eos) {
      +                        status = h2_stream_close_input(stream);
      +                    }
      +                }
      +                else {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                                  "h2_stream(%ld-%d): HEADER, eos=%d", 
      +                                  session->id, frame->hd.stream_id, eos);
      +                    status = stream_schedule(session, stream, eos);
      +                }
      +            }
      +            else {
      +                status = APR_EINVAL;
      +            }
      +            break;
      +        case NGHTTP2_DATA:
      +            stream = get_stream(session, frame->hd.stream_id);
      +            if (stream) {
      +                int eos = (frame->hd.flags & NGHTTP2_FLAG_END_STREAM);
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                              "h2_stream(%ld-%d): DATA, len=%ld, eos=%d", 
      +                              session->id, frame->hd.stream_id, 
      +                              (long)frame->hd.length, eos);
      +                if (eos) {
      +                    status = h2_stream_close_input(stream);
      +                }
      +            }
      +            else {
      +                status = APR_EINVAL;
      +            }
      +            break;
      +        case NGHTTP2_PRIORITY:
      +            session->reprioritize = 1;
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                          "h2_session:  stream(%ld-%d): PRIORITY frame "
      +                          " weight=%d, dependsOn=%d, exclusive=%d", 
      +                          session->id, (int)frame->hd.stream_id,
      +                          frame->priority.pri_spec.weight,
      +                          frame->priority.pri_spec.stream_id,
      +                          frame->priority.pri_spec.exclusive);
      +            break;
      +        case NGHTTP2_WINDOW_UPDATE:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                          "h2_session:  stream(%ld-%d): WINDOW_UPDATE "
      +                          "incr=%d", 
      +                          session->id, (int)frame->hd.stream_id,
      +                          frame->window_update.window_size_increment);
      +            break;
      +        case NGHTTP2_RST_STREAM:
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03067)
      +                          "h2_session(%ld-%d): RST_STREAM by client, errror=%d",
      +                          session->id, (int)frame->hd.stream_id,
      +                          (int)frame->rst_stream.error_code);
      +            stream = get_stream(session, frame->hd.stream_id);
      +            if (stream && stream->initiated_on) {
      +                ++session->pushes_reset;
      +            }
      +            else {
      +                ++session->streams_reset;
      +            }
      +            break;
      +        case NGHTTP2_GOAWAY:
      +            if (frame->goaway.error_code == 0 
      +                && frame->goaway.last_stream_id == ((1u << 31) - 1)) {
      +                /* shutdown notice. Should not come from a client... */
      +                session->remote.accepting = 0;
      +            }
      +            else {
      +                session->remote.accepted_max = frame->goaway.last_stream_id;
      +                dispatch_event(session, H2_SESSION_EV_REMOTE_GOAWAY, 
      +                               frame->goaway.error_code, NULL);
      +            }
      +            break;
      +        default:
      +            if (APLOGctrace2(session->c)) {
      +                char buffer[256];
      +                
      +                h2_util_frame_print(frame, buffer,
      +                                    sizeof(buffer)/sizeof(buffer[0]));
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                              "h2_session: on_frame_rcv %s", buffer);
      +            }
      +            break;
      +    }
      +
      +    if (status != APR_SUCCESS) {
      +        int rv;
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
      +                      APLOGNO(02923) 
      +                      "h2_session: stream(%ld-%d): error handling frame",
      +                      session->id, (int)frame->hd.stream_id);
      +        rv = nghttp2_submit_rst_stream(ng2s, NGHTTP2_FLAG_NONE,
      +                                       frame->hd.stream_id,
      +                                       NGHTTP2_INTERNAL_ERROR);
      +        if (nghttp2_is_fatal(rv)) {
      +            return NGHTTP2_ERR_CALLBACK_FAILURE;
      +        }
      +    }
      +    
      +    return 0;
      +}
      +
      +static char immortal_zeros[H2_MAX_PADLEN];
      +
      +static int on_send_data_cb(nghttp2_session *ngh2, 
      +                           nghttp2_frame *frame, 
      +                           const uint8_t *framehd, 
      +                           size_t length, 
      +                           nghttp2_data_source *source, 
      +                           void *userp)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    h2_session *session = (h2_session *)userp;
      +    int stream_id = (int)frame->hd.stream_id;
      +    unsigned char padlen;
      +    int eos;
      +    h2_stream *stream;
      +    apr_bucket *b;
      +    apr_off_t len = length;
      +    
      +    (void)ngh2;
      +    (void)source;
      +    if (frame->data.padlen > H2_MAX_PADLEN) {
      +        return NGHTTP2_ERR_PROTO;
      +    }
      +    padlen = (unsigned char)frame->data.padlen;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                  "h2_stream(%ld-%d): send_data_cb for %ld bytes",
      +                  session->id, (int)stream_id, (long)length);
      +                  
      +    stream = get_stream(session, stream_id);
      +    if (!stream) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_NOTFOUND, session->c,
      +                      APLOGNO(02924) 
      +                      "h2_stream(%ld-%d): send_data, lookup stream",
      +                      session->id, (int)stream_id);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    
      +    status = h2_conn_io_write(&session->io, (const char *)framehd, 9);
      +    if (padlen && status == APR_SUCCESS) {
      +        status = h2_conn_io_write(&session->io, (const char *)&padlen, 1);
      +    }
      +    
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                      "h2_stream(%ld-%d): writing frame header",
      +                      session->id, (int)stream_id);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    
      +    status = h2_stream_read_to(stream, session->bbtmp, &len, &eos);
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                      "h2_stream(%ld-%d): send_data_cb, reading stream",
      +                      session->id, (int)stream_id);
      +        apr_brigade_cleanup(session->bbtmp);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    else if (len != length) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                      "h2_stream(%ld-%d): send_data_cb, wanted %ld bytes, "
      +                      "got %ld from stream",
      +                      session->id, (int)stream_id, (long)length, (long)len);
      +        apr_brigade_cleanup(session->bbtmp);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    
      +    if (padlen) {
      +        b = apr_bucket_immortal_create(immortal_zeros, padlen, 
      +                                       session->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(session->bbtmp, b);
      +    }
      +    
      +    status = h2_conn_io_pass(&session->io, session->bbtmp);
      +    apr_brigade_cleanup(session->bbtmp);
      +    
      +    if (status == APR_SUCCESS) {
      +        stream->out_data_frames++;
      +        stream->out_data_octets += length;
      +        return 0;
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c,
      +                      APLOGNO(02925) 
      +                      "h2_stream(%ld-%d): failed send_data_cb",
      +                      session->id, (int)stream_id);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +}
      +
      +static int on_frame_send_cb(nghttp2_session *ngh2, 
      +                            const nghttp2_frame *frame,
      +                            void *user_data)
      +{
      +    h2_session *session = user_data;
      +    if (APLOGcdebug(session->c)) {
      +        char buffer[256];
      +        
      +        h2_util_frame_print(frame, buffer, sizeof(buffer)/sizeof(buffer[0]));
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03068)
      +                      "h2_session(%ld): sent FRAME[%s], frames=%ld/%ld (r/s)",
      +                      session->id, buffer, (long)session->frames_received,
      +                     (long)session->frames_sent);
      +    }
      +    ++session->frames_sent;
      +    return 0;
      +}
      +
      +#ifdef H2_NG2_INVALID_HEADER_CB
      +static int on_invalid_header_cb(nghttp2_session *ngh2, 
      +                                const nghttp2_frame *frame, 
      +                                const uint8_t *name, size_t namelen, 
      +                                const uint8_t *value, size_t valuelen, 
      +                                uint8_t flags, void *user_data)
      +{
      +    h2_session *session = user_data;
      +    if (APLOGcdebug(session->c)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03456)
      +                      "h2_session(%ld-%d): denying stream with invalid header "
      +                      "'%s: %s'", session->id, (int)frame->hd.stream_id,
      +                      apr_pstrndup(session->pool, (const char *)name, namelen),
      +                      apr_pstrndup(session->pool, (const char *)value, valuelen));
      +    }
      +    return nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                     frame->hd.stream_id, 
      +                                     NGHTTP2_PROTOCOL_ERROR);
      +}
      +#endif
      +
      +#define NGH2_SET_CALLBACK(callbacks, name, fn)\
      +nghttp2_session_callbacks_set_##name##_callback(callbacks, fn)
      +
      +static apr_status_t init_callbacks(conn_rec *c, nghttp2_session_callbacks **pcb)
      +{
      +    int rv = nghttp2_session_callbacks_new(pcb);
      +    if (rv != 0) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +                      APLOGNO(02926) "nghttp2_session_callbacks_new: %s",
      +                      nghttp2_strerror(rv));
      +        return APR_EGENERAL;
      +    }
      +    
      +    NGH2_SET_CALLBACK(*pcb, send, send_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_frame_recv, on_frame_recv_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_invalid_frame_recv, on_invalid_frame_recv_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_data_chunk_recv, on_data_chunk_recv_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_stream_close, on_stream_close_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_begin_headers, on_begin_headers_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_header, on_header_cb);
      +    NGH2_SET_CALLBACK(*pcb, send_data, on_send_data_cb);
      +    NGH2_SET_CALLBACK(*pcb, on_frame_send, on_frame_send_cb);
      +#ifdef H2_NG2_INVALID_HEADER_CB
      +    NGH2_SET_CALLBACK(*pcb, on_invalid_header, on_invalid_header_cb);
      +#endif
      +    return APR_SUCCESS;
      +}
      +
      +static void h2_session_destroy(h2_session *session)
      +{
      +    ap_assert(session);    
      +
      +    if (session->mplx) {
      +        h2_mplx_set_consumed_cb(session->mplx, NULL, NULL);
      +        h2_mplx_release_and_join(session->mplx, session->iowait);
      +        session->mplx = NULL;
      +    }
      +
      +    ap_remove_input_filter_byhandle((session->r? session->r->input_filters :
      +                                     session->c->input_filters), "H2_IN");
      +    if (session->ngh2) {
      +        nghttp2_session_del(session->ngh2);
      +        session->ngh2 = NULL;
      +    }
      +    if (session->c) {
      +        h2_ctx_clear(session->c);
      +    }
      +
      +    if (APLOGctrace1(session->c)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                      "h2_session(%ld): destroy", session->id);
      +    }
      +    if (session->pool) {
      +        apr_pool_destroy(session->pool);
      +    }
      +}
      +
      +static apr_status_t h2_session_shutdown_notice(h2_session *session)
      +{
      +    apr_status_t status;
      +    
      +    ap_assert(session);
      +    if (!session->local.accepting) {
      +        return APR_SUCCESS;
      +    }
      +    
      +    nghttp2_submit_shutdown_notice(session->ngh2);
      +    session->local.accepting = 0;
      +    status = nghttp2_session_send(session->ngh2);
      +    if (status == APR_SUCCESS) {
      +        status = h2_conn_io_flush(&session->io);
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03457)
      +                  "session(%ld): sent shutdown notice", session->id);
      +    return status;
      +}
      +
      +static apr_status_t h2_session_shutdown(h2_session *session, int error, 
      +                                        const char *msg, int force_close)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    ap_assert(session);
      +    if (session->local.shutdown) {
      +        return APR_SUCCESS;
      +    }
      +    if (!msg && error) {
      +        msg = nghttp2_strerror(error);
      +    }
      +    
      +    if (error || force_close) {
      +        /* not a graceful shutdown, we want to leave... 
      +         * Do not start further streams that are waiting to be scheduled. 
      +         * Find out the max stream id that we habe been processed or
      +         * are still actively working on.
      +         * Remove all streams greater than this number without submitting
      +         * a RST_STREAM frame, since that should be clear from the GOAWAY
      +         * we send. */
      +        session->local.accepted_max = h2_mplx_shutdown(session->mplx);
      +        session->local.error = error;
      +    }
      +    else {
      +        /* graceful shutdown. we will continue processing all streams
      +         * we have, but no longer accept new ones. Report the max stream
      +         * we have received and discard all new ones. */
      +    }
      +    nghttp2_submit_goaway(session->ngh2, NGHTTP2_FLAG_NONE, 
      +                          session->local.accepted_max, 
      +                          error, (uint8_t*)msg, msg? strlen(msg):0);
      +    session->local.accepting = 0;
      +    session->local.shutdown = 1;
      +    status = nghttp2_session_send(session->ngh2);
      +    if (status == APR_SUCCESS) {
      +        status = h2_conn_io_flush(&session->io);
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03069)
      +                  "session(%ld): sent GOAWAY, err=%d, msg=%s", 
      +                  session->id, error, msg? msg : "");
      +    dispatch_event(session, H2_SESSION_EV_LOCAL_GOAWAY, error, msg);
      +    
      +    if (force_close) {
      +        apr_brigade_cleanup(session->bbtmp);
      +        h2_mplx_abort(session->mplx);
      +    }
      +    
      +    return status;
      +}
      +
      +static apr_status_t session_pool_cleanup(void *data)
      +{
      +    h2_session *session = data;
      +    /* On a controlled connection shutdown, this gets never
      +     * called as we deregister and destroy our pool manually.
      +     * However when we have an async mpm, and handed it our idle
      +     * connection, it will just cleanup once the connection is closed
      +     * from the other side (and sometimes even from out side) and
      +     * here we arrive then.
      +     */
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                  "session(%ld): pool_cleanup", session->id);
      +    
      +    if (session->state != H2_SESSION_ST_DONE) {
      +        /* Not good. The connection is being torn down and we have
      +         * not sent a goaway. This is considered a protocol error and
      +         * the client has to assume that any streams "in flight" may have
      +         * been processed and are not safe to retry.
      +         * As clients with idle connection may only learn about a closed
      +         * connection when sending the next request, this has the effect
      +         * that at least this one request will fail.
      +         */
      +        ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, session->c, APLOGNO(03199)
      +                      "session(%ld): connection disappeared without proper "
      +                      "goodbye, clients will be confused, should not happen", 
      +                      session->id);
      +    }
      +    /* keep us from destroying the pool, since that is already ongoing. */
      +    session->pool = NULL;
      +    h2_session_destroy(session);
      +    return APR_SUCCESS;
      +}
      +
      +static void *session_malloc(size_t size, void *ctx)
      +{
      +    h2_session *session = ctx;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, session->c,
      +                  "h2_session(%ld): malloc(%ld)",
      +                  session->id, (long)size);
      +    return malloc(size);
      +}
      +
      +static void session_free(void *p, void *ctx)
      +{
      +    h2_session *session = ctx;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, session->c,
      +                  "h2_session(%ld): free()",
      +                  session->id);
      +    free(p);
      +}
      +
      +static void *session_calloc(size_t n, size_t size, void *ctx)
      +{
      +    h2_session *session = ctx;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, session->c,
      +                  "h2_session(%ld): calloc(%ld, %ld)",
      +                  session->id, (long)n, (long)size);
      +    return calloc(n, size);
      +}
      +
      +static void *session_realloc(void *p, size_t size, void *ctx)
      +{
      +    h2_session *session = ctx;
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, session->c,
      +                  "h2_session(%ld): realloc(%ld)",
      +                  session->id, (long)size);
      +    return realloc(p, size);
      +}
      +
      +static h2_session *h2_session_create_int(conn_rec *c,
      +                                         request_rec *r,
      +                                         h2_ctx *ctx, 
      +                                         h2_workers *workers)
      +{
      +    nghttp2_session_callbacks *callbacks = NULL;
      +    nghttp2_option *options = NULL;
      +    uint32_t n;
      +
      +    apr_pool_t *pool = NULL;
      +    apr_status_t status = apr_pool_create(&pool, c->pool);
      +    h2_session *session;
      +    if (status != APR_SUCCESS) {
      +        return NULL;
      +    }
      +    apr_pool_tag(pool, "h2_session");
      +
      +    session = apr_pcalloc(pool, sizeof(h2_session));
      +    if (session) {
      +        int rv;
      +        nghttp2_mem *mem;
      +        
      +        session->id = c->id;
      +        session->c = c;
      +        session->r = r;
      +        session->s = h2_ctx_server_get(ctx);
      +        session->pool = pool;
      +        session->config = h2_config_sget(session->s);
      +        session->workers = workers;
      +        
      +        session->state = H2_SESSION_ST_INIT;
      +        session->local.accepting = 1;
      +        session->remote.accepting = 1;
      +        
      +        apr_pool_pre_cleanup_register(pool, session, session_pool_cleanup);
      +        
      +        session->max_stream_count = h2_config_geti(session->config, 
      +                                                   H2_CONF_MAX_STREAMS);
      +        session->max_stream_mem = h2_config_geti(session->config, 
      +                                                 H2_CONF_STREAM_MAX_MEM);
      +
      +        status = apr_thread_cond_create(&session->iowait, session->pool);
      +        if (status != APR_SUCCESS) {
      +            return NULL;
      +        }
      +        
      +        session->mplx = h2_mplx_create(c, session->pool, session->config, 
      +                                       session->s->timeout, workers);
      +        
      +        h2_mplx_set_consumed_cb(session->mplx, update_window, session);
      +        
      +        /* Install the connection input filter that feeds the session */
      +        session->cin = h2_filter_cin_create(session->pool, 
      +                                            h2_session_receive, session);
      +        ap_add_input_filter("H2_IN", session->cin, r, c);
      +
      +        h2_conn_io_init(&session->io, c, session->config);
      +        session->bbtmp = apr_brigade_create(session->pool, c->bucket_alloc);
      +        
      +        status = init_callbacks(c, &callbacks);
      +        if (status != APR_SUCCESS) {
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, status, c, APLOGNO(02927) 
      +                          "nghttp2: error in init_callbacks");
      +            h2_session_destroy(session);
      +            return NULL;
      +        }
      +        
      +        rv = nghttp2_option_new(&options);
      +        if (rv != 0) {
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,
      +                          APLOGNO(02928) "nghttp2_option_new: %s", 
      +                          nghttp2_strerror(rv));
      +            h2_session_destroy(session);
      +            return NULL;
      +        }
      +        nghttp2_option_set_peer_max_concurrent_streams(
      +            options, (uint32_t)session->max_stream_count);
      +        /* We need to handle window updates ourself, otherwise we
      +         * get flooded by nghttp2. */
      +        nghttp2_option_set_no_auto_window_update(options, 1);
      +        
      +        if (APLOGctrace6(c)) {
      +            mem = apr_pcalloc(session->pool, sizeof(nghttp2_mem));
      +            mem->mem_user_data = session;
      +            mem->malloc    = session_malloc;
      +            mem->free      = session_free;
      +            mem->calloc    = session_calloc;
      +            mem->realloc   = session_realloc;
      +            
      +            rv = nghttp2_session_server_new3(&session->ngh2, callbacks,
      +                                             session, options, mem);
      +        }
      +        else {
      +            rv = nghttp2_session_server_new2(&session->ngh2, callbacks,
      +                                             session, options);
      +        }
      +        nghttp2_session_callbacks_del(callbacks);
      +        nghttp2_option_del(options);
      +        
      +        if (rv != 0) {
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,
      +                          APLOGNO(02929) "nghttp2_session_server_new: %s",
      +                          nghttp2_strerror(rv));
      +            h2_session_destroy(session);
      +            return NULL;
      +        }
      +         
      +        n = h2_config_geti(session->config, H2_CONF_PUSH_DIARY_SIZE);
      +        session->push_diary = h2_push_diary_create(session->pool, n);
      +        
      +        if (APLOGcdebug(c)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03200)
      +                          "h2_session(%ld) created, max_streams=%d, "
      +                          "stream_mem=%d, workers_limit=%d, workers_max=%d, "
      +                          "push_diary(type=%d,N=%d)",
      +                          session->id, (int)session->max_stream_count, 
      +                          (int)session->max_stream_mem,
      +                          session->mplx->workers_limit, 
      +                          session->mplx->workers_max, 
      +                          session->push_diary->dtype, 
      +                          (int)session->push_diary->N);
      +        }
      +    }
      +    return session;
      +}
      +
      +h2_session *h2_session_create(conn_rec *c, h2_ctx *ctx, h2_workers *workers)
      +{
      +    return h2_session_create_int(c, NULL, ctx, workers);
      +}
      +
      +h2_session *h2_session_rcreate(request_rec *r, h2_ctx *ctx, h2_workers *workers)
      +{
      +    return h2_session_create_int(r->connection, r, ctx, workers);
      +}
      +
      +void h2_session_eoc_callback(h2_session *session)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                  "session(%ld): cleanup and destroy", session->id);
      +    apr_pool_cleanup_kill(session->pool, session, session_pool_cleanup);
      +    h2_session_destroy(session);
      +}
      +
      +static apr_status_t h2_session_start(h2_session *session, int *rv)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    nghttp2_settings_entry settings[3];
      +    size_t slen;
      +    int win_size;
      +    
      +    ap_assert(session);
      +    /* Start the conversation by submitting our SETTINGS frame */
      +    *rv = 0;
      +    if (session->r) {
      +        const char *s, *cs;
      +        apr_size_t dlen; 
      +        h2_stream * stream;
      +
      +        /* 'h2c' mode: we should have a 'HTTP2-Settings' header with
      +         * base64 encoded client settings. */
      +        s = apr_table_get(session->r->headers_in, "HTTP2-Settings");
      +        if (!s) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EINVAL, session->r,
      +                          APLOGNO(02931) 
      +                          "HTTP2-Settings header missing in request");
      +            return APR_EINVAL;
      +        }
      +        cs = NULL;
      +        dlen = h2_util_base64url_decode(&cs, s, session->pool);
      +        
      +        if (APLOGrdebug(session->r)) {
      +            char buffer[128];
      +            h2_util_hex_dump(buffer, 128, (char*)cs, dlen);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, session->r, APLOGNO(03070)
      +                          "upgrading h2c session with HTTP2-Settings: %s -> %s (%d)",
      +                          s, buffer, (int)dlen);
      +        }
      +        
      +        *rv = nghttp2_session_upgrade(session->ngh2, (uint8_t*)cs, dlen, NULL);
      +        if (*rv != 0) {
      +            status = APR_EINVAL;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, session->r,
      +                          APLOGNO(02932) "nghttp2_session_upgrade: %s", 
      +                          nghttp2_strerror(*rv));
      +            return status;
      +        }
      +        
      +        /* Now we need to auto-open stream 1 for the request we got. */
      +        stream = h2_session_open_stream(session, 1, 0, NULL);
      +        if (!stream) {
      +            status = APR_EGENERAL;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, session->r,
      +                          APLOGNO(02933) "open stream 1: %s", 
      +                          nghttp2_strerror(*rv));
      +            return status;
      +        }
      +        
      +        status = h2_stream_set_request_rec(stream, session->r);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +        status = stream_schedule(session, stream, 1);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +    }
      +
      +    slen = 0;
      +    settings[slen].settings_id = NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS;
      +    settings[slen].value = (uint32_t)session->max_stream_count;
      +    ++slen;
      +    win_size = h2_config_geti(session->config, H2_CONF_WIN_SIZE);
      +    if (win_size != H2_INITIAL_WINDOW_SIZE) {
      +        settings[slen].settings_id = NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE;
      +        settings[slen].value = win_size;
      +        ++slen;
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, session->c, APLOGNO(03201)
      +                  "h2_session(%ld): start, INITIAL_WINDOW_SIZE=%ld, "
      +                  "MAX_CONCURRENT_STREAMS=%d", 
      +                  session->id, (long)win_size, (int)session->max_stream_count);
      +    *rv = nghttp2_submit_settings(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                  settings, slen);
      +    if (*rv != 0) {
      +        status = APR_EGENERAL;
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, status, session->c,
      +                      APLOGNO(02935) "nghttp2_submit_settings: %s", 
      +                      nghttp2_strerror(*rv));
      +    }
      +    else {
      +        /* use maximum possible value for connection window size. We are only
      +         * interested in per stream flow control. which have the initial window
      +         * size configured above.
      +         * Therefore, for our use, the connection window can only get in the
      +         * way. Example: if we allow 100 streams with a 32KB window each, we
      +         * buffer up to 3.2 MB of data. Unless we do separate connection window
      +         * interim updates, any smaller connection window will lead to blocking
      +         * in DATA flow.
      +         */
      +        *rv = nghttp2_submit_window_update(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                           0, NGHTTP2_MAX_WINDOW_SIZE - win_size);
      +        if (*rv != 0) {
      +            status = APR_EGENERAL;
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, status, session->c,
      +                          APLOGNO(02970) "nghttp2_submit_window_update: %s", 
      +                          nghttp2_strerror(*rv));        
      +        }
      +    }
      +    
      +    return status;
      +}
      +
      +static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream,  
      +                                      h2_headers *headers, apr_off_t len,
      +                                      int eos);
      +
      +static ssize_t stream_data_cb(nghttp2_session *ng2s,
      +                              int32_t stream_id,
      +                              uint8_t *buf,
      +                              size_t length,
      +                              uint32_t *data_flags,
      +                              nghttp2_data_source *source,
      +                              void *puser)
      +{
      +    h2_session *session = (h2_session *)puser;
      +    apr_off_t nread = length;
      +    int eos = 0;
      +    apr_status_t status;
      +    h2_stream *stream;
      +    ap_assert(session);
      +    
      +    /* The session wants to send more DATA for the stream. We need
      +     * to find out how much of the requested length we can send without
      +     * blocking.
      +     * Indicate EOS when we encounter it or DEFERRED if the stream
      +     * should be suspended. Beware of trailers.
      +     */
      + 
      +    (void)ng2s;
      +    (void)buf;
      +    (void)source;
      +    stream = get_stream(session, stream_id);
      +    if (!stream) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, session->c,
      +                      APLOGNO(02937) 
      +                      "h2_stream(%ld-%d): data requested but stream not found",
      +                      session->id, (int)stream_id);
      +        return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +
      +    status = h2_stream_out_prepare(stream, &nread, &eos, NULL);
      +    if (nread) {
      +        *data_flags |=  NGHTTP2_DATA_FLAG_NO_COPY;
      +    }
      +    
      +    switch (status) {
      +        case APR_SUCCESS:
      +            break;
      +            
      +        case APR_ECONNRESET:
      +            return nghttp2_submit_rst_stream(ng2s, NGHTTP2_FLAG_NONE,
      +                stream->id, stream->rst_error);
      +            
      +        case APR_EAGAIN:
      +            /* If there is no data available, our session will automatically
      +             * suspend this stream and not ask for more data until we resume
      +             * it. Remember at our h2_stream that we need to do this.
      +             */
      +            nread = 0;
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03071)
      +                          "h2_stream(%ld-%d): suspending",
      +                          session->id, (int)stream_id);
      +            return NGHTTP2_ERR_DEFERRED;
      +            
      +        default:
      +            nread = 0;
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, status, session->c,
      +                          APLOGNO(02938) "h2_stream(%ld-%d): reading data",
      +                          session->id, (int)stream_id);
      +            return NGHTTP2_ERR_CALLBACK_FAILURE;
      +    }
      +    
      +    if (eos) {
      +        *data_flags |= NGHTTP2_DATA_FLAG_EOF;
      +    }
      +    return (ssize_t)nread;
      +}
      +
      +struct h2_stream *h2_session_push(h2_session *session, h2_stream *is,
      +                                  h2_push *push)
      +{
      +    apr_status_t status;
      +    h2_stream *stream;
      +    h2_ngheader *ngh;
      +    int nid;
      +    
      +    ngh = h2_util_ngheader_make_req(is->pool, push->req);
      +    nid = nghttp2_submit_push_promise(session->ngh2, 0, is->id, 
      +                                      ngh->nv, ngh->nvlen, NULL);
      +    if (nid <= 0) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03075)
      +                      "h2_stream(%ld-%d): submitting push promise fail: %s",
      +                      session->id, is->id, nghttp2_strerror(nid));
      +        return NULL;
      +    }
      +    ++session->pushes_promised;
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03076)
      +                  "h2_stream(%ld-%d): SERVER_PUSH %d for %s %s on %d",
      +                  session->id, is->id, nid,
      +                  push->req->method, push->req->path, is->id);
      +                  
      +    stream = h2_session_open_stream(session, nid, is->id, push->req);
      +    if (stream) {
      +        h2_session_set_prio(session, stream, push->priority);
      +        status = stream_schedule(session, stream, 1);
      +        if (status != APR_SUCCESS) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, session->c,
      +                          "h2_stream(%ld-%d): scheduling push stream",
      +                          session->id, stream->id);
      +            stream = NULL;
      +        }
      +        ++session->unsent_promises;
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03077)
      +                      "h2_stream(%ld-%d): failed to create stream obj %d",
      +                      session->id, is->id, nid);
      +    }
      +
      +    if (!stream) {
      +        /* try to tell the client that it should not wait. */
      +        nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE, nid,
      +                                  NGHTTP2_INTERNAL_ERROR);
      +    }
      +    
      +    return stream;
      +}
      +
      +static int valid_weight(float f) 
      +{
      +    int w = (int)f;
      +    return (w < NGHTTP2_MIN_WEIGHT? NGHTTP2_MIN_WEIGHT : 
      +            (w > NGHTTP2_MAX_WEIGHT)? NGHTTP2_MAX_WEIGHT : w);
      +}
      +
      +apr_status_t h2_session_set_prio(h2_session *session, h2_stream *stream, 
      +                                 const h2_priority *prio)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +#ifdef H2_NG2_CHANGE_PRIO
      +    nghttp2_stream *s_grandpa, *s_parent, *s;
      +    
      +    if (prio == NULL) {
      +        /* we treat this as a NOP */
      +        return APR_SUCCESS;
      +    }
      +    s = nghttp2_session_find_stream(session->ngh2, stream->id);
      +    if (!s) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                      "h2_stream(%ld-%d): lookup of nghttp2_stream failed",
      +                      session->id, stream->id);
      +        return APR_EINVAL;
      +    }
      +    
      +    s_parent = nghttp2_stream_get_parent(s);
      +    if (s_parent) {
      +        nghttp2_priority_spec ps;
      +        int id_parent, id_grandpa, w_parent, w;
      +        int rv = 0;
      +        const char *ptype = "AFTER";
      +        h2_dependency dep = prio->dependency;
      +        
      +        id_parent = nghttp2_stream_get_stream_id(s_parent);
      +        s_grandpa = nghttp2_stream_get_parent(s_parent);
      +        if (s_grandpa) {
      +            id_grandpa = nghttp2_stream_get_stream_id(s_grandpa);
      +        }
      +        else {
      +            /* parent of parent does not exist, 
      +             * only possible if parent == root */
      +            dep = H2_DEPENDANT_AFTER;
      +        }
      +        
      +        switch (dep) {
      +            case H2_DEPENDANT_INTERLEAVED:
      +                /* PUSHed stream is to be interleaved with initiating stream.
      +                 * It is made a sibling of the initiating stream and gets a
      +                 * proportional weight [1, MAX_WEIGHT] of the initiaing
      +                 * stream weight.
      +                 */
      +                ptype = "INTERLEAVED";
      +                w_parent = nghttp2_stream_get_weight(s_parent);
      +                w = valid_weight(w_parent * ((float)prio->weight / NGHTTP2_MAX_WEIGHT));
      +                nghttp2_priority_spec_init(&ps, id_grandpa, w, 0);
      +                break;
      +                
      +            case H2_DEPENDANT_BEFORE:
      +                /* PUSHed stream os to be sent BEFORE the initiating stream.
      +                 * It gets the same weight as the initiating stream, replaces
      +                 * that stream in the dependency tree and has the initiating
      +                 * stream as child.
      +                 */
      +                ptype = "BEFORE";
      +                w = w_parent = nghttp2_stream_get_weight(s_parent);
      +                nghttp2_priority_spec_init(&ps, stream->id, w_parent, 0);
      +                id_grandpa = nghttp2_stream_get_stream_id(s_grandpa);
      +                rv = nghttp2_session_change_stream_priority(session->ngh2, id_parent, &ps);
      +                if (rv < 0) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03202)
      +                                  "h2_stream(%ld-%d): PUSH BEFORE, weight=%d, "
      +                                  "depends=%d, returned=%d",
      +                                  session->id, id_parent, ps.weight, ps.stream_id, rv);
      +                    return APR_EGENERAL;
      +                }
      +                nghttp2_priority_spec_init(&ps, id_grandpa, w, 0);
      +                break;
      +                
      +            case H2_DEPENDANT_AFTER:
      +                /* The PUSHed stream is to be sent after the initiating stream.
      +                 * Give if the specified weight and let it depend on the intiating
      +                 * stream.
      +                 */
      +                /* fall through, it's the default */
      +            default:
      +                nghttp2_priority_spec_init(&ps, id_parent, valid_weight(prio->weight), 0);
      +                break;
      +        }
      +
      +
      +        rv = nghttp2_session_change_stream_priority(session->ngh2, stream->id, &ps);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03203)
      +                      "h2_stream(%ld-%d): PUSH %s, weight=%d, "
      +                      "depends=%d, returned=%d",
      +                      session->id, stream->id, ptype, 
      +                      ps.weight, ps.stream_id, rv);
      +        status = (rv < 0)? APR_EGENERAL : APR_SUCCESS;
      +    }
      +#else
      +    (void)session;
      +    (void)stream;
      +    (void)prio;
      +    (void)valid_weight;
      +#endif
      +    return status;
      +}
      +
      +int h2_session_push_enabled(h2_session *session)
      +{
      +    /* iff we can and they can and want */
      +    return (session->remote.accepting /* remote GOAWAY received */
      +            && h2_config_geti(session->config, H2_CONF_PUSH)
      +            && nghttp2_session_get_remote_settings(session->ngh2, 
      +                   NGHTTP2_SETTINGS_ENABLE_PUSH));
      +}
      +
      +static apr_status_t h2_session_send(h2_session *session)
      +{
      +    apr_interval_time_t saved_timeout;
      +    int rv;
      +    apr_socket_t *socket;
      +    
      +    socket = ap_get_conn_socket(session->c);
      +    if (socket) {
      +        apr_socket_timeout_get(socket, &saved_timeout);
      +        apr_socket_timeout_set(socket, session->s->timeout);
      +    }
      +    
      +    rv = nghttp2_session_send(session->ngh2);
      +    
      +    if (socket) {
      +        apr_socket_timeout_set(socket, saved_timeout);
      +    }
      +    session->have_written = 1;
      +    if (rv != 0) {
      +        if (nghttp2_is_fatal(rv)) {
      +            dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, rv, nghttp2_strerror(rv));
      +            return APR_EGENERAL;
      +        }
      +    }
      +    
      +    session->unsent_promises = 0;
      +    session->unsent_submits = 0;
      +    
      +    return APR_SUCCESS;
      +}
      +
      +/**
      + * headers for the stream are ready.
      + */
      +static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream,  
      +                                      h2_headers *headers, apr_off_t len,
      +                                      int eos)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    int rv = 0;
      +
      +    ap_assert(session);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                  "h2_stream(%ld-%d): on_headers", session->id, stream->id);
      +    if (headers->status < 100) {
      +        int err = H2_STREAM_RST(stream, headers->status);
      +        rv = nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                       stream->id, err);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, 
      +                  "h2_stream(%ld-%d): unpexected header status %d, stream rst", 
      +                  session->id, stream->id, headers->status);
      +        goto leave;
      +    }
      +    else if (stream->has_response) {
      +        h2_ngheader *nh;
      +        
      +        nh = h2_util_ngheader_make(stream->pool, headers->headers);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03072)
      +                      "h2_stream(%ld-%d): submit %d trailers",
      +                      session->id, (int)stream->id,(int) nh->nvlen);
      +        rv = nghttp2_submit_trailer(session->ngh2, stream->id, nh->nv, nh->nvlen);
      +        goto leave;
      +    }
      +    else {
      +        nghttp2_data_provider provider, *pprovider = NULL;
      +        h2_ngheader *ngh;
      +        apr_table_t *hout;
      +        const char *note;
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03073)
      +                      "h2_stream(%ld-%d): submit response %d, REMOTE_WINDOW_SIZE=%u",
      +                      session->id, stream->id, headers->status,
      +                      (unsigned int)nghttp2_session_get_stream_remote_window_size(session->ngh2, stream->id));
      +        
      +        if (!eos || len > 0) {
      +            memset(&provider, 0, sizeof(provider));
      +            provider.source.fd = stream->id;
      +            provider.read_callback = stream_data_cb;
      +            pprovider = &provider;
      +        }
      +        
      +        /* If this stream is not a pushed one itself,
      +         * and HTTP/2 server push is enabled here,
      +         * and the response HTTP status is not sth >= 400,
      +         * and the remote side has pushing enabled,
      +         * -> find and perform any pushes on this stream
      +         *    *before* we submit the stream response itself.
      +         *    This helps clients avoid opening new streams on Link
      +         *    headers that get pushed right afterwards.
      +         * 
      +         * *) the response code is relevant, as we do not want to 
      +         *    make pushes on 401 or 403 codes and friends. 
      +         *    And if we see a 304, we do not push either
      +         *    as the client, having this resource in its cache, might
      +         *    also have the pushed ones as well.
      +         */
      +        if (!stream->initiated_on
      +            && !stream->has_response
      +            && stream->request && stream->request->method
      +            && !strcmp("GET", stream->request->method)
      +            && (headers->status < 400)
      +            && (headers->status != 304)
      +            && h2_session_push_enabled(session)) {
      +            
      +            h2_stream_submit_pushes(stream, headers);
      +        }
      +        
      +        if (!stream->pref_priority) {
      +            stream->pref_priority = h2_stream_get_priority(stream, headers);
      +        }
      +        h2_session_set_prio(session, stream, stream->pref_priority);
      +        
      +        hout = headers->headers;
      +        note = apr_table_get(headers->notes, H2_FILTER_DEBUG_NOTE);
      +        if (note && !strcmp("on", note)) {
      +            int32_t connFlowIn, connFlowOut;
      +
      +            connFlowIn = nghttp2_session_get_effective_local_window_size(session->ngh2); 
      +            connFlowOut = nghttp2_session_get_remote_window_size(session->ngh2);
      +            hout = apr_table_clone(stream->pool, hout);
      +            apr_table_setn(hout, "conn-flow-in", 
      +                           apr_itoa(stream->pool, connFlowIn));
      +            apr_table_setn(hout, "conn-flow-out", 
      +                           apr_itoa(stream->pool, connFlowOut));
      +        }
      +        
      +        if (headers->status == 103 
      +            && !h2_config_geti(session->config, H2_CONF_EARLY_HINTS)) {
      +            /* suppress sending this to the client, it might have triggered 
      +             * pushes and served its purpose nevertheless */
      +            rv = 0;
      +            goto leave;
      +        }
      +        
      +        ngh = h2_util_ngheader_make_res(stream->pool, headers->status, hout);
      +        rv = nghttp2_submit_response(session->ngh2, stream->id,
      +                                     ngh->nv, ngh->nvlen, pprovider);
      +        stream->has_response = h2_headers_are_response(headers);
      +        session->have_written = 1;
      +        
      +        if (stream->initiated_on) {
      +            ++session->pushes_submitted;
      +        }
      +        else {
      +            ++session->responses_submitted;
      +        }
      +    }
      +    
      +leave:
      +    if (nghttp2_is_fatal(rv)) {
      +        status = APR_EGENERAL;
      +        dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, rv, nghttp2_strerror(rv));
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, status, session->c,
      +                      APLOGNO(02940) "submit_response: %s", 
      +                      nghttp2_strerror(rv));
      +    }
      +    
      +    ++session->unsent_submits;
      +    
      +    /* Unsent push promises are written immediately, as nghttp2
      +     * 1.5.0 realizes internal stream data structures only on 
      +     * send and we might need them for other submits. 
      +     * Also, to conserve memory, we send at least every 10 submits
      +     * so that nghttp2 does not buffer all outbound items too 
      +     * long.
      +     */
      +    if (status == APR_SUCCESS 
      +        && (session->unsent_promises || session->unsent_submits > 10)) {
      +        status = h2_session_send(session);
      +    }
      +    return status;
      +}
      +
      +/**
      + * A stream was resumed as new response/output data arrived.
      + */
      +static apr_status_t on_stream_resume(void *ctx, h2_stream *stream)
      +{
      +    h2_session *session = ctx;
      +    apr_status_t status = APR_EAGAIN;
      +    int rv;
      +    apr_off_t len = 0;
      +    int eos = 0;
      +    h2_headers *headers;
      +    
      +    ap_assert(stream);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, 
      +                  "h2_stream(%ld-%d): on_resume", session->id, stream->id);
      +        
      +send_headers:
      +    headers = NULL;
      +    status = h2_stream_out_prepare(stream, &len, &eos, &headers);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, session->c, 
      +                  "h2_stream(%ld-%d): prepared len=%ld, eos=%d", 
      +                  session->id, stream->id, (long)len, eos);
      +    if (headers) {
      +        status = on_stream_headers(session, stream, headers, len, eos);
      +        if (status != APR_SUCCESS || stream->rst_error) {
      +            return status;
      +        }
      +        goto send_headers;
      +    }
      +    else if (status != APR_EAGAIN) {
      +        if (!stream->has_response) {
      +            int err = H2_STREAM_RST(stream, H2_ERR_PROTOCOL_ERROR);
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03466)
      +                          "h2_stream(%ld-%d): no response, RST_STREAM, err=%d",
      +                          session->id, stream->id, err);
      +            nghttp2_submit_rst_stream(session->ngh2, NGHTTP2_FLAG_NONE,
      +                                      stream->id, err);
      +            return APR_SUCCESS;
      +        } 
      +        rv = nghttp2_session_resume_data(session->ngh2, stream->id);
      +        session->have_written = 1;
      +        ap_log_cerror(APLOG_MARK, nghttp2_is_fatal(rv)?
      +                      APLOG_ERR : APLOG_DEBUG, 0, session->c,
      +                      APLOGNO(02936) 
      +                      "h2_stream(%ld-%d): resuming %s",
      +                      session->id, stream->id, rv? nghttp2_strerror(rv) : "");
      +    }
      +    return status;
      +}
      +
      +static apr_status_t h2_session_receive(void *ctx, const char *data, 
      +                                       apr_size_t len, apr_size_t *readlen)
      +{
      +    h2_session *session = ctx;
      +    ssize_t n;
      +    
      +    if (len > 0) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                      "h2_session(%ld): feeding %ld bytes to nghttp2",
      +                      session->id, (long)len);
      +        n = nghttp2_session_mem_recv(session->ngh2, (const uint8_t *)data, len);
      +        if (n < 0) {
      +            if (nghttp2_is_fatal((int)n)) {
      +                dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, (int)n, nghttp2_strerror((int)n));
      +                return APR_EGENERAL;
      +            }
      +        }
      +        else {
      +            *readlen = n;
      +            session->io.bytes_read += n;
      +        }
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t h2_session_read(h2_session *session, int block)
      +{
      +    apr_status_t status, rstatus = APR_EAGAIN;
      +    conn_rec *c = session->c;
      +    apr_off_t read_start = session->io.bytes_read;
      +    
      +    while (1) {
      +        /* H2_IN filter handles all incoming data against the session.
      +         * We just pull at the filter chain to make it happen */
      +        status = ap_get_brigade(c->input_filters,
      +                                session->bbtmp, AP_MODE_READBYTES,
      +                                block? APR_BLOCK_READ : APR_NONBLOCK_READ,
      +                                APR_BUCKET_BUFF_SIZE);
      +        /* get rid of any possible data we do not expect to get */
      +        apr_brigade_cleanup(session->bbtmp); 
      +
      +        switch (status) {
      +            case APR_SUCCESS:
      +                /* successful read, reset our idle timers */
      +                rstatus = APR_SUCCESS;
      +                if (block) {
      +                    /* successful blocked read, try unblocked to
      +                     * get more. */
      +                    block = 0;
      +                }
      +                break;
      +            case APR_EAGAIN:
      +                return rstatus;
      +            case APR_TIMEUP:
      +                return status;
      +            default:
      +                if (session->io.bytes_read == read_start) {
      +                    /* first attempt failed */
      +                    if (APR_STATUS_IS_ETIMEDOUT(status)
      +                        || APR_STATUS_IS_ECONNABORTED(status)
      +                        || APR_STATUS_IS_ECONNRESET(status)
      +                        || APR_STATUS_IS_EOF(status)
      +                        || APR_STATUS_IS_EBADF(status)) {
      +                        /* common status for a client that has left */
      +                        ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
      +                                      "h2_session(%ld): input gone", session->id);
      +                    }
      +                    else {
      +                        /* uncommon status, log on INFO so that we see this */
      +                        ap_log_cerror( APLOG_MARK, APLOG_DEBUG, status, c,
      +                                      APLOGNO(02950) 
      +                                      "h2_session(%ld): error reading, terminating",
      +                                      session->id);
      +                    }
      +                    return status;
      +                }
      +                /* subsequent failure after success(es), return initial
      +                 * status. */
      +                return rstatus;
      +        }
      +        if ((session->io.bytes_read - read_start) > (64*1024)) {
      +            /* read enough in one go, give write a chance */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, c,
      +                          "h2_session(%ld): read 64k, returning", session->id);
      +            break;
      +        }
      +    }
      +    return rstatus;
      +}
      +
      +static const char *StateNames[] = {
      +    "INIT",      /* H2_SESSION_ST_INIT */
      +    "DONE",      /* H2_SESSION_ST_DONE */
      +    "IDLE",      /* H2_SESSION_ST_IDLE */
      +    "BUSY",      /* H2_SESSION_ST_BUSY */
      +    "WAIT",      /* H2_SESSION_ST_WAIT */
      +};
      +
      +static const char *state_name(h2_session_state state)
      +{
      +    if (state >= (sizeof(StateNames)/sizeof(StateNames[0]))) {
      +        return "unknown";
      +    }
      +    return StateNames[state];
      +}
      +
      +static void update_child_status(h2_session *session, int status, const char *msg)
      +{
      +    /* Assume that we also change code/msg when something really happened and
      +     * avoid updating the scoreboard in between */
      +    if (session->last_status_code != status 
      +        || session->last_status_msg != msg) {
      +        apr_snprintf(session->status, sizeof(session->status),
      +                     "%s, streams: %d/%d/%d/%d/%d (open/recv/resp/push/rst)", 
      +                     msg? msg : "-",
      +                     (int)session->open_streams, 
      +                     (int)session->remote.emitted_count,
      +                     (int)session->responses_submitted,
      +                     (int)session->pushes_submitted,
      +                     (int)session->pushes_reset + session->streams_reset);
      +        ap_update_child_status_descr(session->c->sbh, status, session->status);
      +    }
      +}
      +
      +static void transit(h2_session *session, const char *action, h2_session_state nstate)
      +{
      +    if (session->state != nstate) {
      +        int loglvl = APLOG_DEBUG;
      +        if ((session->state == H2_SESSION_ST_BUSY && nstate == H2_SESSION_ST_WAIT)
      +            || (session->state == H2_SESSION_ST_WAIT && nstate == H2_SESSION_ST_BUSY)){
      +            loglvl = APLOG_TRACE1;
      +        }
      +        ap_log_cerror(APLOG_MARK, loglvl, 0, session->c, APLOGNO(03078)
      +                      "h2_session(%ld): transit [%s] -- %s --> [%s]", session->id,
      +                      state_name(session->state), action, state_name(nstate));
      +        session->state = nstate;
      +        switch (session->state) {
      +            case H2_SESSION_ST_IDLE:
      +                update_child_status(session, (session->open_streams == 0? 
      +                                              SERVER_BUSY_KEEPALIVE
      +                                              : SERVER_BUSY_READ), "idle");
      +                break;
      +            case H2_SESSION_ST_DONE:
      +                update_child_status(session, SERVER_CLOSING, "done");
      +                break;
      +            default:
      +                /* nop */
      +                break;
      +        }
      +    }
      +}
      +
      +static void h2_session_ev_init(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_INIT:
      +            transit(session, "init", H2_SESSION_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_local_goaway(h2_session *session, int arg, const char *msg)
      +{
      +    cleanup_streams(session);
      +    if (!session->remote.shutdown) {
      +        update_child_status(session, SERVER_CLOSING, "local goaway");
      +    }
      +    transit(session, "local goaway", H2_SESSION_ST_DONE);
      +}
      +
      +static void h2_session_ev_remote_goaway(h2_session *session, int arg, const char *msg)
      +{
      +    if (!session->remote.shutdown) {
      +        session->remote.error = arg;
      +        session->remote.accepting = 0;
      +        session->remote.shutdown = 1;
      +        cleanup_streams(session);
      +        update_child_status(session, SERVER_CLOSING, "remote goaway");
      +        transit(session, "remote goaway", H2_SESSION_ST_DONE);
      +    }
      +}
      +
      +static void h2_session_ev_conn_error(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_INIT:
      +        case H2_SESSION_ST_DONE:
      +            /* just leave */
      +            transit(session, "conn error", H2_SESSION_ST_DONE);
      +            break;
      +        
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03401)
      +                          "h2_session(%ld): conn error -> shutdown", session->id);
      +            h2_session_shutdown(session, arg, msg, 0);
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_proto_error(h2_session *session, int arg, const char *msg)
      +{
      +    if (!session->local.shutdown) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03402)
      +                      "h2_session(%ld): proto error -> shutdown", session->id);
      +        h2_session_shutdown(session, arg, msg, 0);
      +    }
      +}
      +
      +static void h2_session_ev_conn_timeout(h2_session *session, int arg, const char *msg)
      +{
      +    transit(session, msg, H2_SESSION_ST_DONE);
      +    if (!session->local.shutdown) {
      +        h2_session_shutdown(session, arg, msg, 1);
      +    }
      +}
      +
      +static void h2_session_ev_no_io(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_BUSY:
      +            /* Nothing to READ, nothing to WRITE on the master connection.
      +             * Possible causes:
      +             * - we wait for the client to send us sth
      +             * - we wait for started tasks to produce output
      +             * - we have finished all streams and the client has sent GO_AWAY
      +             */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c,
      +                          "h2_session(%ld): NO_IO event, %d streams open", 
      +                          session->id, session->open_streams);
      +            h2_conn_io_flush(&session->io);
      +            if (session->open_streams > 0) {
      +                if (h2_mplx_awaits_data(session->mplx)) {
      +                    /* waiting for at least one stream to produce data */
      +                    transit(session, "no io", H2_SESSION_ST_WAIT);
      +                }
      +                else {
      +                    /* we have streams open, and all are submitted and none
      +                     * is suspended. The only thing keeping us from WRITEing
      +                     * more must be the flow control.
      +                     * This means we only wait for WINDOW_UPDATE from the 
      +                     * client and can block on READ. */
      +                    transit(session, "no io (flow wait)", H2_SESSION_ST_IDLE);
      +                    session->idle_until = apr_time_now() + session->s->timeout;
      +                    session->keep_sync_until = session->idle_until;
      +                    /* Make sure we have flushed all previously written output
      +                     * so that the client will react. */
      +                    if (h2_conn_io_flush(&session->io) != APR_SUCCESS) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                        return;
      +                    }
      +                }
      +            }
      +            else if (session->local.accepting) {
      +                /* When we have no streams, but accept new, switch to idle */
      +                apr_time_t now = apr_time_now();
      +                transit(session, "no io (keepalive)", H2_SESSION_ST_IDLE);
      +                session->idle_until = (session->remote.emitted_count? 
      +                                       session->s->keep_alive_timeout : 
      +                                       session->s->timeout) + now;
      +                session->keep_sync_until = now + apr_time_from_sec(1);
      +            }
      +            else {
      +                /* We are no longer accepting new streams and there are
      +                 * none left. Time to leave. */
      +                h2_session_shutdown(session, arg, msg, 0);
      +                transit(session, "no io", H2_SESSION_ST_DONE);
      +            }
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_stream_ready(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_WAIT:
      +            transit(session, "stream ready", H2_SESSION_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_data_read(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_IDLE:
      +        case H2_SESSION_ST_WAIT:
      +            transit(session, "data read", H2_SESSION_ST_BUSY);
      +            break;
      +        default:
      +            /* nop */
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_ngh2_done(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_DONE:
      +            /* nop */
      +            break;
      +        default:
      +            transit(session, "nghttp2 done", H2_SESSION_ST_DONE);
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_mpm_stopping(h2_session *session, int arg, const char *msg)
      +{
      +    switch (session->state) {
      +        case H2_SESSION_ST_DONE:
      +            /* nop */
      +            break;
      +        default:
      +            h2_session_shutdown_notice(session);
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_pre_close(h2_session *session, int arg, const char *msg)
      +{
      +    h2_session_shutdown(session, arg, msg, 1);
      +}
      +
      +static void h2_session_ev_stream_open(h2_session *session, int arg, const char *msg)
      +{
      +    ++session->open_streams;
      +    switch (session->state) {
      +        case H2_SESSION_ST_IDLE:
      +            if (session->open_streams == 1) {
      +                /* enter tiomeout, since we have a stream again */
      +                session->idle_until = (session->s->timeout + apr_time_now());
      +            }
      +            break;
      +        default:
      +            break;
      +    }
      +}
      +
      +static void h2_session_ev_stream_done(h2_session *session, int arg, const char *msg)
      +{
      +    --session->open_streams;
      +    switch (session->state) {
      +        case H2_SESSION_ST_IDLE:
      +            if (session->open_streams == 0) {
      +                /* enter keepalive timeout, since we no longer have streams */
      +                session->idle_until = (session->s->keep_alive_timeout
      +                                       + apr_time_now());
      +            }
      +            break;
      +        default:
      +            break;
      +    }
      +}
      +
      +static void dispatch_event(h2_session *session, h2_session_event_t ev, 
      +                      int arg, const char *msg)
      +{
      +    switch (ev) {
      +        case H2_SESSION_EV_INIT:
      +            h2_session_ev_init(session, arg, msg);
      +            break;            
      +        case H2_SESSION_EV_LOCAL_GOAWAY:
      +            h2_session_ev_local_goaway(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_REMOTE_GOAWAY:
      +            h2_session_ev_remote_goaway(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_CONN_ERROR:
      +            h2_session_ev_conn_error(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_PROTO_ERROR:
      +            h2_session_ev_proto_error(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_CONN_TIMEOUT:
      +            h2_session_ev_conn_timeout(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_NO_IO:
      +            h2_session_ev_no_io(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_STREAM_READY:
      +            h2_session_ev_stream_ready(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_DATA_READ:
      +            h2_session_ev_data_read(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_NGH2_DONE:
      +            h2_session_ev_ngh2_done(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_MPM_STOPPING:
      +            h2_session_ev_mpm_stopping(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_PRE_CLOSE:
      +            h2_session_ev_pre_close(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_STREAM_OPEN:
      +            h2_session_ev_stream_open(session, arg, msg);
      +            break;
      +        case H2_SESSION_EV_STREAM_DONE:
      +            h2_session_ev_stream_done(session, arg, msg);
      +            break;
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
      +                          "h2_session(%ld): unknown event %d", 
      +                          session->id, ev);
      +            break;
      +    }
      +    
      +    if (session->state == H2_SESSION_ST_DONE) {
      +        apr_brigade_cleanup(session->bbtmp);
      +        h2_mplx_abort(session->mplx);
      +    }
      +}
      +
      +static const int MAX_WAIT_MICROS = 200 * 1000;
      +
      +apr_status_t h2_session_process(h2_session *session, int async)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    conn_rec *c = session->c;
      +    int rv, mpm_state, trace = APLOGctrace3(c);
      +
      +    if (trace) {
      +        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                      "h2_session(%ld): process start, async=%d", 
      +                      session->id, async);
      +    }
      +                  
      +    if (c->cs) {
      +        c->cs->state = CONN_STATE_WRITE_COMPLETION;
      +    }
      +    
      +    while (session->state != H2_SESSION_ST_DONE) {
      +        trace = APLOGctrace3(c);
      +        session->have_read = session->have_written = 0;
      +
      +        if (session->local.accepting 
      +            && !ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state)) {
      +            if (mpm_state == AP_MPMQ_STOPPING) {
      +                dispatch_event(session, H2_SESSION_EV_MPM_STOPPING, 0, NULL);
      +            }
      +        }
      +        
      +        session->status[0] = '\0';
      +        
      +        switch (session->state) {
      +            case H2_SESSION_ST_INIT:
      +                ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c);
      +                if (!h2_is_acceptable_connection(c, 1)) {
      +                    update_child_status(session, SERVER_BUSY_READ, "inadequate security");
      +                    h2_session_shutdown(session, NGHTTP2_INADEQUATE_SECURITY, NULL, 1);
      +                } 
      +                else {
      +                    update_child_status(session, SERVER_BUSY_READ, "init");
      +                    status = h2_session_start(session, &rv);
      +                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, c, APLOGNO(03079)
      +                                  "h2_session(%ld): started on %s:%d", session->id,
      +                                  session->s->server_hostname,
      +                                  c->local_addr->port);
      +                    if (status != APR_SUCCESS) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                    }
      +                    dispatch_event(session, H2_SESSION_EV_INIT, 0, NULL);
      +                }
      +                break;
      +                
      +            case H2_SESSION_ST_IDLE:
      +                /* make certain, we send everything before we idle */
      +                h2_conn_io_flush(&session->io);
      +                if (!session->keep_sync_until && async && !session->open_streams
      +                    && !session->r && session->remote.emitted_count) {
      +                    if (trace) {
      +                        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                      "h2_session(%ld): async idle, nonblock read, "
      +                                      "%d streams open", session->id, 
      +                                      session->open_streams);
      +                    }
      +                    /* We do not return to the async mpm immediately, since under
      +                     * load, mpms show the tendency to throw keep_alive connections
      +                     * away very rapidly.
      +                     * So, if we are still processing streams, we wait for the
      +                     * normal timeout first and, on timeout, close.
      +                     * If we have no streams, we still wait a short amount of
      +                     * time here for the next frame to arrive, before handing
      +                     * it to keep_alive processing of the mpm.
      +                     */
      +                    status = h2_session_read(session, 0);
      +                    
      +                    if (status == APR_SUCCESS) {
      +                        session->have_read = 1;
      +                        dispatch_event(session, H2_SESSION_EV_DATA_READ, 0, NULL);
      +                    }
      +                    else if (APR_STATUS_IS_EAGAIN(status) || APR_STATUS_IS_TIMEUP(status)) {
      +                        if (apr_time_now() > session->idle_until) {
      +                            dispatch_event(session, H2_SESSION_EV_CONN_TIMEOUT, 0, NULL);
      +                        }
      +                        else {
      +                            status = APR_EAGAIN;
      +                            goto out;
      +                        }
      +                    }
      +                    else {
      +                        ap_log_cerror( APLOG_MARK, APLOG_DEBUG, status, c,
      +				      APLOGNO(03403)
      +                                      "h2_session(%ld): idle, no data, error", 
      +                                      session->id);
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "timeout");
      +                    }
      +                }
      +                else {
      +                    if (trace) {
      +                        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                      "h2_session(%ld): sync idle, stutter 1-sec, "
      +                                      "%d streams open", session->id,
      +                                      session->open_streams);
      +                    }
      +                    /* We wait in smaller increments, using a 1 second timeout.
      +                     * That gives us the chance to check for MPMQ_STOPPING often. 
      +                     */
      +                    status = h2_mplx_idle(session->mplx);
      +                    if (status != APR_SUCCESS) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 
      +                                       H2_ERR_ENHANCE_YOUR_CALM, "less is more");
      +                    }
      +                    h2_filter_cin_timeout_set(session->cin, apr_time_from_sec(1));
      +                    status = h2_session_read(session, 1);
      +                    if (status == APR_SUCCESS) {
      +                        session->have_read = 1;
      +                        dispatch_event(session, H2_SESSION_EV_DATA_READ, 0, NULL);
      +                    }
      +                    else if (status == APR_EAGAIN) {
      +                        /* nothing to read */
      +                    }
      +                    else if (APR_STATUS_IS_TIMEUP(status)) {
      +                        apr_time_t now = apr_time_now();
      +                        if (now > session->keep_sync_until) {
      +                            /* if we are on an async mpm, now is the time that
      +                             * we may dare to pass control to it. */
      +                            session->keep_sync_until = 0;
      +                        }
      +                        if (now > session->idle_until) {
      +                            if (trace) {
      +                                ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                              "h2_session(%ld): keepalive timeout",
      +                                              session->id);
      +                            }
      +                            dispatch_event(session, H2_SESSION_EV_CONN_TIMEOUT, 0, "timeout");
      +                        }
      +                        else if (trace) {                        
      +                            ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                          "h2_session(%ld): keepalive, %f sec left",
      +                                          session->id, (session->idle_until - now) / 1000000.0f);
      +                        }
      +                        /* continue reading handling */
      +                    }
      +                    else if (APR_STATUS_IS_ECONNABORTED(status)
      +                             || APR_STATUS_IS_ECONNRESET(status)
      +                             || APR_STATUS_IS_EOF(status)
      +                             || APR_STATUS_IS_EBADF(status)) {
      +                        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                      "h2_session(%ld): input gone", session->id);
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                    }
      +                    else {
      +                        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                                      "h2_session(%ld): idle(1 sec timeout) "
      +                                      "read failed", session->id);
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, "error");
      +                    }
      +                }
      +                
      +                break;
      +                
      +            case H2_SESSION_ST_BUSY:
      +                if (nghttp2_session_want_read(session->ngh2)) {
      +                    ap_update_child_status(session->c->sbh, SERVER_BUSY_READ, NULL);
      +                    h2_filter_cin_timeout_set(session->cin, session->s->timeout);
      +                    status = h2_session_read(session, 0);
      +                    if (status == APR_SUCCESS) {
      +                        session->have_read = 1;
      +                        dispatch_event(session, H2_SESSION_EV_DATA_READ, 0, NULL);
      +                    }
      +                    else if (status == APR_EAGAIN) {
      +                        /* nothing to read */
      +                    }
      +                    else if (APR_STATUS_IS_TIMEUP(status)) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_TIMEOUT, 0, NULL);
      +                        break;
      +                    }
      +                    else {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                    }
      +                }
      +                
      +                /* trigger window updates, stream resumes and submits */
      +                status = h2_mplx_dispatch_master_events(session->mplx, 
      +                                                        on_stream_resume,
      +                                                        session);
      +                if (status != APR_SUCCESS) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, status, c,
      +                                  "h2_session(%ld): dispatch error", 
      +                                  session->id);
      +                    dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 
      +                                   H2_ERR_INTERNAL_ERROR, 
      +                                   "dispatch error");
      +                    break;
      +                }
      +                
      +                if (nghttp2_session_want_write(session->ngh2)) {
      +                    ap_update_child_status(session->c->sbh, SERVER_BUSY_WRITE, NULL);
      +                    status = h2_session_send(session);
      +                    if (status != APR_SUCCESS) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 
      +                                       H2_ERR_INTERNAL_ERROR, "writing");
      +                        break;
      +                    }
      +                }
      +                
      +                if (session->have_read || session->have_written) {
      +                    if (session->wait_us) {
      +                        session->wait_us = 0;
      +                    }
      +                }
      +                else if (!nghttp2_session_want_write(session->ngh2)) {
      +                    dispatch_event(session, H2_SESSION_EV_NO_IO, 0, NULL);
      +                }
      +                break;
      +                
      +            case H2_SESSION_ST_WAIT:
      +                if (session->wait_us <= 0) {
      +                    session->wait_us = 10;
      +                    if (h2_conn_io_flush(&session->io) != APR_SUCCESS) {
      +                        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                        break;
      +                    }
      +                }
      +                else {
      +                    /* repeating, increase timer for graceful backoff */
      +                    session->wait_us = H2MIN(session->wait_us*2, MAX_WAIT_MICROS);
      +                }
      +
      +                if (trace) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
      +                                  "h2_session: wait for data, %ld micros", 
      +                                  (long)session->wait_us);
      +                }
      +                status = h2_mplx_out_trywait(session->mplx, session->wait_us, 
      +                                             session->iowait);
      +                if (status == APR_SUCCESS) {
      +                    session->wait_us = 0;
      +                    dispatch_event(session, H2_SESSION_EV_DATA_READ, 0, NULL);
      +                }
      +                else if (APR_STATUS_IS_TIMEUP(status)) {
      +                    /* go back to checking all inputs again */
      +                    transit(session, "wait cycle", session->local.accepting? 
      +                            H2_SESSION_ST_BUSY : H2_SESSION_ST_DONE);
      +                }
      +                else if (APR_STATUS_IS_ECONNRESET(status) 
      +                         || APR_STATUS_IS_ECONNABORTED(status)) {
      +                    dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +                }
      +                else {
      +                    ap_log_cerror(APLOG_MARK, APLOG_WARNING, status, c,
      +				  APLOGNO(03404)
      +                                  "h2_session(%ld): waiting on conditional",
      +                                  session->id);
      +                    h2_session_shutdown(session, H2_ERR_INTERNAL_ERROR, 
      +                                        "cond wait error", 0);
      +                }
      +                break;
      +                
      +            default:
      +                ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,
      +                              APLOGNO(03080)
      +                              "h2_session(%ld): unknown state %d", session->id, session->state);
      +                dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, 0, NULL);
      +                break;
      +        }
      +
      +        if (!nghttp2_session_want_read(session->ngh2) 
      +                 && !nghttp2_session_want_write(session->ngh2)) {
      +            dispatch_event(session, H2_SESSION_EV_NGH2_DONE, 0, NULL); 
      +        }
      +        if (session->reprioritize) {
      +            h2_mplx_reprioritize(session->mplx, stream_pri_cmp, session);
      +            session->reprioritize = 0;
      +        }
      +    }
      +    
      +out:
      +    if (trace) {
      +        ap_log_cerror( APLOG_MARK, APLOG_TRACE3, status, c,
      +                      "h2_session(%ld): [%s] process returns", 
      +                      session->id, state_name(session->state));
      +    }
      +    
      +    if ((session->state != H2_SESSION_ST_DONE)
      +        && (APR_STATUS_IS_EOF(status)
      +            || APR_STATUS_IS_ECONNRESET(status) 
      +            || APR_STATUS_IS_ECONNABORTED(status))) {
      +        dispatch_event(session, H2_SESSION_EV_CONN_ERROR, 0, NULL);
      +    }
      +
      +    status = APR_SUCCESS;
      +    if (session->state == H2_SESSION_ST_DONE) {
      +        status = APR_EOF;
      +        if (!session->eoc_written) {
      +            session->eoc_written = 1;
      +            h2_conn_io_write_eoc(&session->io, session);
      +        }
      +    }
      +    
      +    return status;
      +}
      +
      +apr_status_t h2_session_pre_close(h2_session *session, int async)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c, 
      +                  "h2_session(%ld): pre_close", session->id);
      +    dispatch_event(session, H2_SESSION_EV_PRE_CLOSE, 0, 
      +        (session->state == H2_SESSION_ST_IDLE)? "timeout" : NULL);
      +    return APR_SUCCESS;
      +}
      diff --git a/modules/http2/h2_session.h b/modules/http2/h2_session.h
      new file mode 100644
      index 00000000000..69b7a59c44a
      --- /dev/null
      +++ b/modules/http2/h2_session.h
      @@ -0,0 +1,233 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_session__
      +#define __mod_h2__h2_session__
      +
      +#include "h2_conn_io.h"
      +
      +/**
      + * A HTTP/2 connection, a session with a specific client.
      + * 
      + * h2_session sits on top of a httpd conn_rec* instance and takes complete
      + * control of the connection data. It receives protocol frames from the
      + * client. For new HTTP/2 streams it creates h2_task(s) that are sent
      + * via callback to a dispatcher (see h2_conn.c).
      + * h2_session keeps h2_io's for each ongoing stream which buffer the
      + * payload for that stream.
      + *
      + * New incoming HEADER frames are converted into a h2_stream+h2_task instance
      + * that both represent a HTTP/2 stream, but may have separate lifetimes. This
      + * allows h2_task to be scheduled in other threads without semaphores
      + * all over the place. It allows task memory to be freed independent of
      + * session lifetime and sessions may close down while tasks are still running.
      + *
      + *
      + */
      +
      +#include "h2.h"
      +
      +struct apr_thread_mutext_t;
      +struct apr_thread_cond_t;
      +struct h2_ctx;
      +struct h2_config;
      +struct h2_filter_cin;
      +struct h2_ihash_t;
      +struct h2_mplx;
      +struct h2_priority;
      +struct h2_push;
      +struct h2_push_diary;
      +struct h2_session;
      +struct h2_stream;
      +struct h2_task;
      +struct h2_workers;
      +
      +struct nghttp2_session;
      +
      +typedef enum {
      +    H2_SESSION_EV_INIT,             /* session was initialized */
      +    H2_SESSION_EV_LOCAL_GOAWAY,     /* we send a GOAWAY */
      +    H2_SESSION_EV_REMOTE_GOAWAY,    /* remote send us a GOAWAY */
      +    H2_SESSION_EV_CONN_ERROR,       /* connection error */
      +    H2_SESSION_EV_PROTO_ERROR,      /* protocol error */
      +    H2_SESSION_EV_CONN_TIMEOUT,     /* connection timeout */
      +    H2_SESSION_EV_NO_IO,            /* nothing has been read or written */
      +    H2_SESSION_EV_STREAM_READY,     /* stream signalled availability of headers/data */
      +    H2_SESSION_EV_DATA_READ,        /* connection data has been read */
      +    H2_SESSION_EV_NGH2_DONE,        /* nghttp2 wants neither read nor write anything */
      +    H2_SESSION_EV_MPM_STOPPING,     /* the process is stopping */
      +    H2_SESSION_EV_PRE_CLOSE,        /* connection will close after this */
      +    H2_SESSION_EV_STREAM_OPEN,      /* stream has been opened */
      +    H2_SESSION_EV_STREAM_DONE,      /* stream has been handled completely */
      +} h2_session_event_t;
      +
      +typedef struct h2_session {
      +    long id;                        /* identifier of this session, unique
      +                                     * inside a httpd process */
      +    conn_rec *c;                    /* the connection this session serves */
      +    request_rec *r;                 /* the request that started this in case
      +                                     * of 'h2c', NULL otherwise */
      +    server_rec *s;                  /* server/vhost we're starting on */
      +    const struct h2_config *config; /* Relevant config for this session */
      +    apr_pool_t *pool;               /* pool to use in session */
      +    struct h2_mplx *mplx;           /* multiplexer for stream data */
      +    struct h2_workers *workers;     /* for executing stream tasks */
      +    struct h2_filter_cin *cin;      /* connection input filter context */
      +    h2_conn_io io;                  /* io on httpd conn filters */
      +    struct nghttp2_session *ngh2;   /* the nghttp2 session (internal use) */
      +
      +    h2_session_state state;         /* state session is in */
      +    
      +    h2_session_props local;         /* properties of local session */
      +    h2_session_props remote;        /* properites of remote session */
      +    
      +    unsigned int reprioritize  : 1; /* scheduled streams priority changed */
      +    unsigned int eoc_written   : 1; /* h2 eoc bucket written */
      +    unsigned int flush         : 1; /* flushing output necessary */
      +    unsigned int have_read     : 1; /* session has read client data */
      +    unsigned int have_written  : 1; /* session did write data to client */
      +    apr_interval_time_t  wait_us;   /* timeout during BUSY_WAIT state, micro secs */
      +    
      +    struct h2_push_diary *push_diary; /* remember pushes, avoid duplicates */
      +    
      +    int open_streams;               /* number of streams open */
      +    int unsent_submits;             /* number of submitted, but not yet written responses. */
      +    int unsent_promises;            /* number of submitted, but not yet written push promised */
      +                                         
      +    int responses_submitted;        /* number of http/2 responses submitted */
      +    int streams_reset;              /* number of http/2 streams reset by client */
      +    int pushes_promised;            /* number of http/2 push promises submitted */
      +    int pushes_submitted;           /* number of http/2 pushed responses submitted */
      +    int pushes_reset;               /* number of http/2 pushed reset by client */
      +    
      +    apr_size_t frames_received;     /* number of http/2 frames received */
      +    apr_size_t frames_sent;         /* number of http/2 frames sent */
      +    
      +    apr_size_t max_stream_count;    /* max number of open streams */
      +    apr_size_t max_stream_mem;      /* max buffer memory for a single stream */
      +    
      +    apr_time_t idle_until;          /* Time we shut down due to sheer boredom */
      +    apr_time_t keep_sync_until;     /* Time we sync wait until passing to async mpm */
      +    
      +    apr_bucket_brigade *bbtmp;      /* brigade for keeping temporary data */
      +    struct apr_thread_cond_t *iowait; /* our cond when trywaiting for data */
      +    
      +    char status[64];                /* status message for scoreboard */
      +    int last_status_code;           /* the one already reported */
      +    const char *last_status_msg;    /* the one already reported */
      +} h2_session;
      +
      +
      +/**
      + * Create a new h2_session for the given connection.
      + * The session will apply the configured parameter.
      + * @param c       the connection to work on
      + * @param cfg     the module config to apply
      + * @param workers the worker pool to use
      + * @return the created session
      + */
      +h2_session *h2_session_create(conn_rec *c, struct h2_ctx *ctx, 
      +                              struct h2_workers *workers);
      +
      +/**
      + * Create a new h2_session for the given request.
      + * The session will apply the configured parameter.
      + * @param r       the request that was upgraded
      + * @param cfg     the module config to apply
      + * @param workers the worker pool to use
      + * @return the created session
      + */
      +h2_session *h2_session_rcreate(request_rec *r, struct h2_ctx *ctx,
      +                               struct h2_workers *workers);
      +
      +/**
      + * Process the given HTTP/2 session until it is ended or a fatal
      + * error occurred.
      + *
      + * @param session the sessionm to process
      + */
      +apr_status_t h2_session_process(h2_session *session, int async);
      +
      +/**
      + * Last chance to do anything before the connection is closed.
      + */
      +apr_status_t h2_session_pre_close(h2_session *session, int async);
      +
      +/**
      + * Cleanup the session and all objects it still contains. This will not
      + * destroy h2_task instances that have not finished yet. 
      + * @param session the session to destroy
      + */
      +void h2_session_eoc_callback(h2_session *session);
      +
      +/**
      + * Called when a serious error occurred and the session needs to terminate
      + * without further connection io.
      + * @param session the session to abort
      + * @param reason  the apache status that caused the abort
      + */
      +void h2_session_abort(h2_session *session, apr_status_t reason);
      +
      +/**
      + * Close and deallocate the given session.
      + */
      +void h2_session_close(h2_session *session);
      +
      +/**
      + * Create and register a new stream under the given id.
      + * 
      + * @param session the session to register in
      + * @param stream_id the new stream identifier
      + * @param initiated_on the stream id this one is initiated on or 0
      + * @param req the request for this stream or NULL if not known yet
      + * @return the new stream
      + */
      +struct h2_stream *h2_session_open_stream(h2_session *session, int stream_id,
      +                                         int initiated_on, 
      +                                         const h2_request *req);
      +
      +
      +/**
      + * Returns if client settings have push enabled.
      + * @param != 0 iff push is enabled in client settings
      + */
      +int h2_session_push_enabled(h2_session *session);
      +
      +/**
      + * Destroy the stream and release it everywhere. Reclaim all resources.
      + * @param session the session to which the stream belongs
      + * @param stream the stream to destroy
      + */
      +apr_status_t h2_session_stream_done(h2_session *session, 
      +                                    struct h2_stream *stream);
      +
      +/**
      + * Submit a push promise on the stream and schedule the new steam for
      + * processing..
      + * 
      + * @param session the session to work in
      + * @param is the stream initiating the push
      + * @param push the push to promise
      + * @return the new promised stream or NULL
      + */
      +struct h2_stream *h2_session_push(h2_session *session, 
      +                                  struct h2_stream *is, struct h2_push *push);
      +
      +apr_status_t h2_session_set_prio(h2_session *session, 
      +                                 struct h2_stream *stream, 
      +                                 const struct h2_priority *prio);
      +
      +
      +#endif /* defined(__mod_h2__h2_session__) */
      diff --git a/modules/http2/h2_stream.c b/modules/http2/h2_stream.c
      new file mode 100644
      index 00000000000..dcbaa23f517
      --- /dev/null
      +++ b/modules/http2/h2_stream.c
      @@ -0,0 +1,811 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_log.h>
      +
      +#include <nghttp2/nghttp2.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_bucket_beam.h"
      +#include "h2_conn.h"
      +#include "h2_config.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_push.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_session.h"
      +#include "h2_stream.h"
      +#include "h2_task.h"
      +#include "h2_ctx.h"
      +#include "h2_task.h"
      +#include "h2_util.h"
      +
      +
      +static int state_transition[][7] = {
      +    /*  ID OP RL RR CI CO CL */
      +/*ID*/{  1, 0, 0, 0, 0, 0, 0 },
      +/*OP*/{  1, 1, 0, 0, 0, 0, 0 },
      +/*RL*/{  0, 0, 1, 0, 0, 0, 0 },
      +/*RR*/{  0, 0, 0, 1, 0, 0, 0 },
      +/*CI*/{  1, 1, 0, 0, 1, 0, 0 },
      +/*CO*/{  1, 1, 0, 0, 0, 1, 0 },
      +/*CL*/{  1, 1, 0, 0, 1, 1, 1 },
      +};
      +
      +static void H2_STREAM_OUT_LOG(int lvl, h2_stream *s, const char *tag)
      +{
      +    if (APLOG_C_IS_LEVEL(s->session->c, lvl)) {
      +        conn_rec *c = s->session->c;
      +        char buffer[4 * 1024];
      +        const char *line = "(null)";
      +        apr_size_t len, bmax = sizeof(buffer)/sizeof(buffer[0]);
      +        
      +        len = h2_util_bb_print(buffer, bmax, tag, "", s->out_buffer);
      +        ap_log_cerror(APLOG_MARK, lvl, 0, c, "bb_dump(%s): %s", 
      +                      c->log_id, len? buffer : line);
      +    }
      +}
      +
      +static int set_state(h2_stream *stream, h2_stream_state_t state)
      +{
      +    int allowed = state_transition[state][stream->state];
      +    if (allowed) {
      +        stream->state = state;
      +        return 1;
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, stream->session->c, APLOGNO(03081)
      +                  "h2_stream(%ld-%d): invalid state transition from %d to %d", 
      +                  stream->session->id, stream->id, stream->state, state);
      +    return 0;
      +}
      +
      +static int close_input(h2_stream *stream) 
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_CLOSED_INPUT:
      +        case H2_STREAM_ST_CLOSED:
      +            return 0; /* ignore, idempotent */
      +        case H2_STREAM_ST_CLOSED_OUTPUT:
      +            /* both closed now */
      +            set_state(stream, H2_STREAM_ST_CLOSED);
      +            break;
      +        default:
      +            /* everything else we jump to here */
      +            set_state(stream, H2_STREAM_ST_CLOSED_INPUT);
      +            break;
      +    }
      +    return 1;
      +}
      +
      +static int input_closed(h2_stream *stream) 
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_OPEN:
      +        case H2_STREAM_ST_CLOSED_OUTPUT:
      +            return 0;
      +        default:
      +            return 1;
      +    }
      +}
      +
      +static int close_output(h2_stream *stream) 
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_CLOSED_OUTPUT:
      +        case H2_STREAM_ST_CLOSED:
      +            return 0; /* ignore, idempotent */
      +        case H2_STREAM_ST_CLOSED_INPUT:
      +            /* both closed now */
      +            set_state(stream, H2_STREAM_ST_CLOSED);
      +            break;
      +        default:
      +            /* everything else we jump to here */
      +            set_state(stream, H2_STREAM_ST_CLOSED_OUTPUT);
      +            break;
      +    }
      +    return 1;
      +}
      +
      +static int input_open(const h2_stream *stream) 
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_OPEN:
      +        case H2_STREAM_ST_CLOSED_OUTPUT:
      +            return 1;
      +        default:
      +            return 0;
      +    }
      +}
      +
      +static int output_open(h2_stream *stream) 
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_OPEN:
      +        case H2_STREAM_ST_CLOSED_INPUT:
      +            return 1;
      +        default:
      +            return 0;
      +    }
      +}
      +
      +static void prep_output(h2_stream *stream) {
      +    conn_rec *c = stream->session->c;
      +    if (!stream->out_buffer) {
      +        stream->out_buffer = apr_brigade_create(stream->pool, c->bucket_alloc);
      +    }
      +}
      +
      +static void prepend_response(h2_stream *stream, h2_headers *response)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_bucket *b;
      +    
      +    prep_output(stream);
      +    b = h2_bucket_headers_create(c->bucket_alloc, response);
      +    APR_BRIGADE_INSERT_HEAD(stream->out_buffer, b);
      +}
      +
      +static apr_status_t stream_pool_cleanup(void *ctx)
      +{
      +    h2_stream *stream = ctx;
      +    apr_status_t status;
      +    
      +    ap_assert(stream->can_be_cleaned);
      +    if (stream->files) {
      +        apr_file_t *file;
      +        int i;
      +        for (i = 0; i < stream->files->nelts; ++i) {
      +            file = APR_ARRAY_IDX(stream->files, i, apr_file_t*);
      +            status = apr_file_close(file);
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE3, status, stream->session->c, 
      +                          "h2_stream(%ld-%d): destroy, closed file %d", 
      +                          stream->session->id, stream->id, i);
      +        }
      +        stream->files = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +h2_stream *h2_stream_open(int id, apr_pool_t *pool, h2_session *session,
      +                          int initiated_on)
      +{
      +    h2_stream *stream = apr_pcalloc(pool, sizeof(h2_stream));
      +    
      +    stream->id           = id;
      +    stream->initiated_on = initiated_on;
      +    stream->created      = apr_time_now();
      +    stream->state        = H2_STREAM_ST_IDLE;
      +    stream->pool         = pool;
      +    stream->session      = session;
      +    stream->can_be_cleaned = 1;
      +    
      +    h2_beam_create(&stream->input, pool, id, "input", H2_BEAM_OWNER_SEND, 0);
      +    h2_beam_send_from(stream->input, stream->pool);
      +    h2_beam_create(&stream->output, pool, id, "output", H2_BEAM_OWNER_RECV, 0);
      +    
      +    set_state(stream, H2_STREAM_ST_OPEN);
      +    apr_pool_cleanup_register(pool, stream, stream_pool_cleanup, 
      +                              apr_pool_cleanup_null);
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03082)
      +                  "h2_stream(%ld-%d): opened", session->id, stream->id);
      +    return stream;
      +}
      +
      +void h2_stream_cleanup(h2_stream *stream)
      +{
      +    apr_status_t status;
      +    
      +    ap_assert(stream);
      +    if (stream->out_buffer) {
      +        /* remove any left over output buckets that may still have
      +         * references into request pools */
      +        apr_brigade_cleanup(stream->out_buffer);
      +    }
      +    h2_beam_abort(stream->input);
      +    status = h2_beam_wait_empty(stream->input, APR_NONBLOCK_READ);
      +    if (status == APR_EAGAIN) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, stream->session->c, 
      +                      "h2_stream(%ld-%d): wait on input drain", 
      +                      stream->session->id, stream->id);
      +        status = h2_beam_wait_empty(stream->input, APR_BLOCK_READ);
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, stream->session->c, 
      +                      "h2_stream(%ld-%d): input drain returned", 
      +                      stream->session->id, stream->id);
      +    }
      +}
      +
      +void h2_stream_destroy(h2_stream *stream)
      +{
      +    ap_assert(stream);
      +    ap_assert(!h2_mplx_stream_get(stream->session->mplx, stream->id));
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, stream->session->c, 
      +                  "h2_stream(%ld-%d): destroy", 
      +                  stream->session->id, stream->id);
      +    stream->can_be_cleaned = 1;
      +    if (stream->pool) {
      +        apr_pool_destroy(stream->pool);
      +    }
      +}
      +
      +void h2_stream_eos_destroy(h2_stream *stream)
      +{
      +    h2_session_stream_done(stream->session, stream);
      +    /* stream possibly destroyed */
      +}
      +
      +apr_pool_t *h2_stream_detach_pool(h2_stream *stream)
      +{
      +    apr_pool_t *pool = stream->pool;
      +    stream->pool = NULL;
      +    return pool;
      +}
      +
      +void h2_stream_rst(h2_stream *stream, int error_code)
      +{
      +    stream->rst_error = error_code;
      +    close_input(stream);
      +    close_output(stream);
      +    if (stream->out_buffer) {
      +        apr_brigade_cleanup(stream->out_buffer);
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                  "h2_stream(%ld-%d): reset, error=%d", 
      +                  stream->session->id, stream->id, error_code);
      +}
      +
      +apr_status_t h2_stream_set_request_rec(h2_stream *stream, request_rec *r)
      +{
      +    h2_request *req;
      +    apr_status_t status;
      +
      +    ap_assert(stream->request == NULL);
      +    ap_assert(stream->rtmp == NULL);
      +    if (stream->rst_error) {
      +        return APR_ECONNRESET;
      +    }
      +    status = h2_request_rcreate(&req, stream->pool, r);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(03058)
      +                  "h2_request(%d): set_request_rec %s host=%s://%s%s",
      +                  stream->id, req->method, req->scheme, req->authority, 
      +                  req->path);
      +    stream->rtmp = req;
      +    return status;
      +}
      +
      +apr_status_t h2_stream_set_request(h2_stream *stream, const h2_request *r)
      +{
      +    ap_assert(stream->request == NULL);
      +    ap_assert(stream->rtmp == NULL);
      +    stream->rtmp = h2_request_clone(stream->pool, r);
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t add_trailer(h2_stream *stream,
      +                                const char *name, size_t nlen,
      +                                const char *value, size_t vlen)
      +{
      +    conn_rec *c = stream->session->c;
      +    char *hname, *hvalue;
      +
      +    if (nlen == 0 || name[0] == ':') {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, APR_EINVAL, c, APLOGNO(03060)
      +                      "h2_request(%ld-%d): pseudo header in trailer",
      +                      c->id, stream->id);
      +        return APR_EINVAL;
      +    }
      +    if (h2_req_ignore_trailer(name, nlen)) {
      +        return APR_SUCCESS;
      +    }
      +    if (!stream->trailers) {
      +        stream->trailers = apr_table_make(stream->pool, 5);
      +    }
      +    hname = apr_pstrndup(stream->pool, name, nlen);
      +    hvalue = apr_pstrndup(stream->pool, value, vlen);
      +    h2_util_camel_case_header(hname, nlen);
      +    apr_table_mergen(stream->trailers, hname, hvalue);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_stream_add_header(h2_stream *stream,
      +                                  const char *name, size_t nlen,
      +                                  const char *value, size_t vlen)
      +{
      +    int error = 0;
      +    ap_assert(stream);
      +    
      +    if (stream->has_response) {
      +        return APR_EINVAL;    
      +    }
      +    ++stream->request_headers_added;
      +    if (name[0] == ':') {
      +        if ((vlen) > stream->session->s->limit_req_line) {
      +            /* pseudo header: approximation of request line size check */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                          "h2_stream(%ld-%d): pseudo header %s too long", 
      +                          stream->session->id, stream->id, name);
      +            error = HTTP_REQUEST_URI_TOO_LARGE;
      +        }
      +    }
      +    else if ((nlen + 2 + vlen) > stream->session->s->limit_req_fieldsize) {
      +        /* header too long */
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                      "h2_stream(%ld-%d): header %s too long", 
      +                      stream->session->id, stream->id, name);
      +        error = HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE;
      +    }
      +    
      +    if (stream->request_headers_added 
      +        > stream->session->s->limit_req_fields + 4) {
      +        /* too many header lines, include 4 pseudo headers */
      +        if (stream->request_headers_added 
      +            > stream->session->s->limit_req_fields + 4 + 100) {
      +            /* yeah, right */
      +            return APR_ECONNRESET;
      +        }
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                      "h2_stream(%ld-%d): too many header lines", 
      +                      stream->session->id, stream->id);
      +        error = HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE;
      +    }
      +    
      +    if (h2_stream_is_scheduled(stream)) {
      +        return add_trailer(stream, name, nlen, value, vlen);
      +    }
      +    else if (error) {
      +        return h2_stream_set_error(stream, error); 
      +    }
      +    else {
      +        if (!stream->rtmp) {
      +            stream->rtmp = h2_req_create(stream->id, stream->pool, 
      +                                         NULL, NULL, NULL, NULL, NULL, 0);
      +        }
      +        if (stream->state != H2_STREAM_ST_OPEN) {
      +            return APR_ECONNRESET;
      +        }
      +        return h2_request_add_header(stream->rtmp, stream->pool,
      +                                     name, nlen, value, vlen);
      +    }
      +}
      +
      +apr_status_t h2_stream_schedule(h2_stream *stream, int eos, int push_enabled, 
      +                                h2_stream_pri_cmp *cmp, void *ctx)
      +{
      +    apr_status_t status = APR_EINVAL;
      +    ap_assert(stream);
      +    ap_assert(stream->session);
      +    ap_assert(stream->session->mplx);
      +    
      +    if (!stream->scheduled) {
      +        if (eos) {
      +            close_input(stream);
      +        }
      +
      +        if (h2_stream_is_ready(stream)) {
      +            /* already have a resonse, probably a HTTP error code */
      +            return h2_mplx_process(stream->session->mplx, stream, cmp, ctx);
      +        }
      +        else if (!stream->request && stream->rtmp) {
      +            /* This is the common case: a h2_request was being assembled, now
      +             * it gets finalized and checked for completness */
      +            status = h2_request_end_headers(stream->rtmp, stream->pool, eos);
      +            if (status == APR_SUCCESS) {
      +                stream->rtmp->serialize = h2_config_geti(stream->session->config,
      +                                                         H2_CONF_SER_HEADERS); 
      +
      +                stream->request = stream->rtmp;
      +                stream->rtmp = NULL;
      +                stream->scheduled = 1;
      +                
      +                stream->push_policy = h2_push_policy_determine(stream->request->headers, 
      +                                                               stream->pool, push_enabled);
      +            
      +                
      +                status = h2_mplx_process(stream->session->mplx, stream, cmp, ctx);
      +                ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                              "h2_stream(%ld-%d): scheduled %s %s://%s%s "
      +                              "chunked=%d",
      +                              stream->session->id, stream->id,
      +                              stream->request->method, stream->request->scheme,
      +                              stream->request->authority, stream->request->path,
      +                              stream->request->chunked);
      +                return status;
      +            }
      +        }
      +        else {
      +            status = APR_ECONNRESET;
      +        }
      +    }
      +    
      +    h2_stream_rst(stream, H2_ERR_INTERNAL_ERROR);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, stream->session->c,
      +                  "h2_stream(%ld-%d): RST=2 (internal err) %s %s://%s%s",
      +                  stream->session->id, stream->id,
      +                  stream->request->method, stream->request->scheme,
      +                  stream->request->authority, stream->request->path);
      +    return status;
      +}
      +
      +int h2_stream_is_scheduled(const h2_stream *stream)
      +{
      +    return stream->scheduled;
      +}
      +
      +apr_status_t h2_stream_close_input(h2_stream *stream)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_status_t status;
      +    apr_bucket_brigade *tmp;
      +    apr_bucket *b;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                  "h2_stream(%ld-%d): closing input",
      +                  stream->session->id, stream->id);
      +    if (stream->rst_error) {
      +        return APR_ECONNRESET;
      +    }
      +    
      +    tmp = apr_brigade_create(stream->pool, c->bucket_alloc);
      +    if (stream->trailers && !apr_is_empty_table(stream->trailers)) {
      +        h2_headers *r = h2_headers_create(HTTP_OK, stream->trailers, 
      +                                          NULL, stream->pool);
      +        b = h2_bucket_headers_create(c->bucket_alloc, r);
      +        APR_BRIGADE_INSERT_TAIL(tmp, b);
      +        stream->trailers = NULL;
      +    }
      +    
      +    b = apr_bucket_eos_create(c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(tmp, b);
      +    status = h2_beam_send(stream->input, tmp, APR_BLOCK_READ);
      +    apr_brigade_destroy(tmp);
      +    return status;
      +}
      +
      +apr_status_t h2_stream_write_data(h2_stream *stream,
      +                                  const char *data, size_t len, int eos)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_bucket_brigade *tmp;
      +    
      +    ap_assert(stream);
      +    if (!stream->input) {
      +        return APR_EOF;
      +    }
      +    if (input_closed(stream) || !stream->request) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "h2_stream(%ld-%d): writing denied, closed=%d, eoh=%d", 
      +                      stream->session->id, stream->id, input_closed(stream),
      +                      stream->request != NULL);
      +        return APR_EINVAL;
      +    }
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                  "h2_stream(%ld-%d): add %ld input bytes", 
      +                  stream->session->id, stream->id, (long)len);
      +    
      +    tmp = apr_brigade_create(stream->pool, c->bucket_alloc);
      +    apr_brigade_write(tmp, NULL, NULL, data, len);
      +    status = h2_beam_send(stream->input, tmp, APR_BLOCK_READ);
      +    apr_brigade_destroy(tmp);
      +    
      +    stream->in_data_frames++;
      +    stream->in_data_octets += len;
      +    
      +    if (eos) {
      +        return h2_stream_close_input(stream);
      +    }
      +    
      +    return status;
      +}
      +
      +static apr_status_t fill_buffer(h2_stream *stream, apr_size_t amount)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_bucket *b;
      +    apr_status_t status;
      +    
      +    if (!stream->output) {
      +        return APR_EOF;
      +    }
      +    status = h2_beam_receive(stream->output, stream->out_buffer, 
      +                             APR_NONBLOCK_READ, amount);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, stream->session->c,
      +                  "h2_stream(%ld-%d): beam_received",
      +                  stream->session->id, stream->id);
      +    /* The buckets we reveive are using the stream->out_buffer pool as
      +     * lifetime which is exactly what we want since this is stream->pool.
      +     *
      +     * However: when we send these buckets down the core output filters, the
      +     * filter might decide to setaside them into a pool of its own. And it
      +     * might decide, after having sent the buckets, to clear its pool.
      +     *
      +     * This is problematic for file buckets because it then closed the contained
      +     * file. Any split off buckets we sent afterwards will result in a 
      +     * APR_EBADF.
      +     */
      +    for (b = APR_BRIGADE_FIRST(stream->out_buffer);
      +         b != APR_BRIGADE_SENTINEL(stream->out_buffer);
      +         b = APR_BUCKET_NEXT(b)) {
      +        if (APR_BUCKET_IS_FILE(b)) {
      +            apr_bucket_file *f = (apr_bucket_file *)b->data;
      +            apr_pool_t *fpool = apr_file_pool_get(f->fd);
      +            if (fpool != c->pool) {
      +                apr_bucket_setaside(b, c->pool);
      +                if (!stream->files) {
      +                    stream->files = apr_array_make(stream->pool, 
      +                                                   5, sizeof(apr_file_t*));
      +                }
      +                APR_ARRAY_PUSH(stream->files, apr_file_t*) = f->fd;
      +            }
      +        }
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_stream_set_error(h2_stream *stream, int http_status)
      +{
      +    h2_headers *response;
      +    
      +    if (h2_stream_is_ready(stream)) {
      +        return APR_EINVAL;
      +    }
      +    if (stream->rtmp) {
      +        stream->request = stream->rtmp;
      +        stream->rtmp = NULL;
      +    }
      +    response = h2_headers_die(http_status, stream->request, stream->pool);
      +    prepend_response(stream, response);
      +    h2_beam_close(stream->output);
      +    return APR_SUCCESS;
      +}
      +
      +static apr_bucket *get_first_headers_bucket(apr_bucket_brigade *bb)
      +{
      +    if (bb) {
      +        apr_bucket *b = APR_BRIGADE_FIRST(bb);
      +        while (b != APR_BRIGADE_SENTINEL(bb)) {
      +            if (H2_BUCKET_IS_HEADERS(b)) {
      +                return b;
      +            }
      +            b = APR_BUCKET_NEXT(b);
      +        }
      +    }
      +    return NULL;
      +}
      +
      +apr_status_t h2_stream_out_prepare(h2_stream *stream, apr_off_t *plen, 
      +                                   int *peos, h2_headers **presponse)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_off_t requested;
      +    apr_bucket *b, *e;
      +
      +    if (presponse) {
      +        *presponse = NULL;
      +    }
      +    
      +    if (stream->rst_error) {
      +        *plen = 0;
      +        *peos = 1;
      +        return APR_ECONNRESET;
      +    }
      +    
      +    if (!output_open(stream)) {
      +        return APR_ECONNRESET;
      +    }
      +    prep_output(stream);
      +
      +    if (*plen > 0) {
      +        requested = H2MIN(*plen, H2_DATA_CHUNK_SIZE);
      +    }
      +    else {
      +        requested = H2_DATA_CHUNK_SIZE;
      +    }
      +    *plen = requested;
      +    
      +    H2_STREAM_OUT_LOG(APLOG_TRACE2, stream, "h2_stream_out_prepare_pre");
      +    h2_util_bb_avail(stream->out_buffer, plen, peos);
      +    if (!*peos && *plen < requested) {
      +        /* try to get more data */
      +        status = fill_buffer(stream, (requested - *plen) + H2_DATA_CHUNK_SIZE);
      +        if (APR_STATUS_IS_EOF(status)) {
      +            apr_bucket *eos = apr_bucket_eos_create(c->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(stream->out_buffer, eos);
      +            status = APR_SUCCESS;
      +        }
      +        else if (status == APR_EAGAIN) {
      +            /* did not receive more, it's ok */
      +            status = APR_SUCCESS;
      +        }
      +        *plen = requested;
      +        h2_util_bb_avail(stream->out_buffer, plen, peos);
      +    }
      +    H2_STREAM_OUT_LOG(APLOG_TRACE2, stream, "h2_stream_out_prepare_post");
      +    
      +    b = APR_BRIGADE_FIRST(stream->out_buffer);
      +    while (b != APR_BRIGADE_SENTINEL(stream->out_buffer)) {
      +        e = APR_BUCKET_NEXT(b);
      +        if (APR_BUCKET_IS_FLUSH(b)
      +            || (!APR_BUCKET_IS_METADATA(b) && b->length == 0)) {
      +            APR_BUCKET_REMOVE(b);
      +            apr_bucket_destroy(b);
      +        }
      +        else {
      +            break;
      +        }
      +        b = e;
      +    }
      +    
      +    b = get_first_headers_bucket(stream->out_buffer);
      +    if (b) {
      +        /* there are HEADERS to submit */
      +        *peos = 0;
      +        *plen = 0;
      +        if (b == APR_BRIGADE_FIRST(stream->out_buffer)) {
      +            if (presponse) {
      +                *presponse = h2_bucket_headers_get(b);
      +                APR_BUCKET_REMOVE(b);
      +                apr_bucket_destroy(b);
      +                status = APR_SUCCESS;
      +            }
      +            else {
      +                /* someone needs to retrieve the response first */
      +                h2_mplx_keep_active(stream->session->mplx, stream->id);
      +                status = APR_EAGAIN;
      +            }
      +        }
      +        else {
      +            apr_bucket *e = APR_BRIGADE_FIRST(stream->out_buffer);
      +            while (e != APR_BRIGADE_SENTINEL(stream->out_buffer)) {
      +                if (e == b) {
      +                    break;
      +                }
      +                else if (e->length != (apr_size_t)-1) {
      +                    *plen += e->length;
      +                }
      +                e = APR_BUCKET_NEXT(e);
      +            }
      +        }
      +    }
      +    
      +    if (!*peos && !*plen && status == APR_SUCCESS 
      +        && (!presponse || !*presponse)) {
      +        status = APR_EAGAIN;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, c,
      +                  "h2_stream(%ld-%d): prepare, len=%ld eos=%d",
      +                  c->id, stream->id, (long)*plen, *peos);
      +    return status;
      +}
      +
      +static int is_not_headers(apr_bucket *b)
      +{
      +    return !H2_BUCKET_IS_HEADERS(b);
      +}
      +
      +apr_status_t h2_stream_read_to(h2_stream *stream, apr_bucket_brigade *bb, 
      +                               apr_off_t *plen, int *peos)
      +{
      +    conn_rec *c = stream->session->c;
      +    apr_status_t status = APR_SUCCESS;
      +
      +    if (stream->rst_error) {
      +        return APR_ECONNRESET;
      +    }
      +    status = h2_append_brigade(bb, stream->out_buffer, plen, peos, is_not_headers);
      +    if (status == APR_SUCCESS && !*peos && !*plen) {
      +        status = APR_EAGAIN;
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, c,
      +                  "h2_stream(%ld-%d): read_to, len=%ld eos=%d",
      +                  c->id, stream->id, (long)*plen, *peos);
      +    return status;
      +}
      +
      +
      +int h2_stream_input_is_open(const h2_stream *stream) 
      +{
      +    return input_open(stream);
      +}
      +
      +apr_status_t h2_stream_submit_pushes(h2_stream *stream, h2_headers *response)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    apr_array_header_t *pushes;
      +    int i;
      +    
      +    pushes = h2_push_collect_update(stream, stream->request, response);
      +    if (pushes && !apr_is_empty_array(pushes)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, stream->session->c,
      +                      "h2_stream(%ld-%d): found %d push candidates",
      +                      stream->session->id, stream->id, pushes->nelts);
      +        for (i = 0; i < pushes->nelts; ++i) {
      +            h2_push *push = APR_ARRAY_IDX(pushes, i, h2_push*);
      +            h2_stream *s = h2_session_push(stream->session, stream, push);
      +            if (!s) {
      +                status = APR_ECONNRESET;
      +                break;
      +            }
      +        }
      +    }
      +    return status;
      +}
      +
      +apr_table_t *h2_stream_get_trailers(h2_stream *stream)
      +{
      +    return NULL;
      +}
      +
      +const h2_priority *h2_stream_get_priority(h2_stream *stream, 
      +                                          h2_headers *response)
      +{
      +    if (response && stream->initiated_on) {
      +        const char *ctype = apr_table_get(response->headers, "content-type");
      +        if (ctype) {
      +            /* FIXME: Not good enough, config needs to come from request->server */
      +            return h2_config_get_priority(stream->session->config, ctype);
      +        }
      +    }
      +    return NULL;
      +}
      +
      +const char *h2_stream_state_str(h2_stream *stream)
      +{
      +    switch (stream->state) {
      +        case H2_STREAM_ST_IDLE:
      +            return "IDLE";
      +        case H2_STREAM_ST_OPEN:
      +            return "OPEN";
      +        case H2_STREAM_ST_RESV_LOCAL:
      +            return "RESERVED_LOCAL";
      +        case H2_STREAM_ST_RESV_REMOTE:
      +            return "RESERVED_REMOTE";
      +        case H2_STREAM_ST_CLOSED_INPUT:
      +            return "HALF_CLOSED_REMOTE";
      +        case H2_STREAM_ST_CLOSED_OUTPUT:
      +            return "HALF_CLOSED_LOCAL";
      +        case H2_STREAM_ST_CLOSED:
      +            return "CLOSED";
      +        default:
      +            return "UNKNOWN";
      +            
      +    }
      +}
      +
      +int h2_stream_is_ready(h2_stream *stream)
      +{
      +    if (stream->has_response) {
      +        return 1;
      +    }
      +    else if (stream->out_buffer && get_first_headers_bucket(stream->out_buffer)) {
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +
      diff --git a/modules/http2/h2_stream.h b/modules/http2/h2_stream.h
      new file mode 100644
      index 00000000000..adb419e5165
      --- /dev/null
      +++ b/modules/http2/h2_stream.h
      @@ -0,0 +1,273 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_stream__
      +#define __mod_h2__h2_stream__
      +
      +#include "h2.h"
      +
      +/**
      + * A HTTP/2 stream, e.g. a client request+response in HTTP/1.1 terms.
      + * 
      + * A stream always belongs to a h2_session, the one managing the
      + * connection to the client. The h2_session writes to the h2_stream,
      + * adding HEADERS and DATA and finally an EOS. When headers are done,
      + * h2_stream is scheduled for handling, which is expected to produce
      + * a h2_headers.
      + * 
      + * The h2_headers gives the HEADER frames to sent to the client, followed
      + * by DATA frames read from the h2_stream until EOS is reached.
      + */
      +
      +struct h2_mplx;
      +struct h2_priority;
      +struct h2_request;
      +struct h2_headers;
      +struct h2_session;
      +struct h2_sos;
      +struct h2_bucket_beam;
      +
      +typedef struct h2_stream h2_stream;
      +
      +struct h2_stream {
      +    int id;            /* http2 stream id */
      +    int initiated_on;  /* initiating stream id (PUSH) or 0 */
      +    apr_time_t created;         /* when stream was created */
      +    h2_stream_state_t state;    /* http/2 state of this stream */
      +    struct h2_session *session; /* the session this stream belongs to */
      +    
      +    apr_pool_t *pool;           /* the memory pool for this stream */
      +    const struct h2_request *request; /* the request made in this stream */
      +    struct h2_request *rtmp;    /* request being assembled */
      +    apr_table_t *trailers;      /* optional incoming trailers */
      +    int request_headers_added;  /* number of request headers added */
      +    
      +    struct h2_bucket_beam *input;
      +    struct h2_bucket_beam *output;
      +    apr_bucket_brigade *out_buffer;
      +    apr_array_header_t *files;  /* apr_file_t* we collected during I/O */
      +
      +    int rst_error;              /* stream error for RST_STREAM */
      +    unsigned int aborted   : 1; /* was aborted */
      +    unsigned int scheduled : 1; /* stream has been scheduled */
      +    unsigned int started   : 1; /* stream has started processing */
      +    unsigned int has_response : 1; /* response headers are known */
      +    unsigned int push_policy;   /* which push policy to use for this request */
      +    unsigned int can_be_cleaned : 1; /* stream pool can be cleaned */
      +    
      +    const h2_priority *pref_priority; /* preferred priority for this stream */
      +    apr_off_t out_data_frames;  /* # of DATA frames sent */
      +    apr_off_t out_data_octets;  /* # of DATA octets (payload) sent */
      +    apr_off_t in_data_frames;   /* # of DATA frames received */
      +    apr_off_t in_data_octets;   /* # of DATA octets (payload) received */
      +    
      +    const char  *sos_filter;
      +};
      +
      +
      +#define H2_STREAM_RST(s, def)    (s->rst_error? s->rst_error : (def))
      +
      +/**
      + * Create a stream in OPEN state.
      + * @param id      the stream identifier
      + * @param pool    the memory pool to use for this stream
      + * @param session the session this stream belongs to
      + * @return the newly opened stream
      + */
      +h2_stream *h2_stream_open(int id, apr_pool_t *pool, struct h2_session *session,
      +                          int initiated_on);
      +
      +/**
      + * Cleanup any resources still held by the stream, called by last bucket.
      + */
      +void h2_stream_eos_destroy(h2_stream *stream);
      +
      +/**
      + * Destroy memory pool if still owned by the stream.
      + */
      +void h2_stream_destroy(h2_stream *stream);
      +
      +/**
      + * Cleanup references into requst processing.
      + *
      + * @param stream the stream to cleanup
      + */
      +void h2_stream_cleanup(h2_stream *stream);
      +
      +/**
      + * Detach the memory pool from the stream. Will prevent stream
      + * destruction to take the pool with it.
      + *
      + * @param stream the stream to detach the pool from
      + * @result the detached memory pool or NULL if stream no longer has one
      + */
      +apr_pool_t *h2_stream_detach_pool(h2_stream *stream);
      +
      +/**
      + * Initialize stream->request with the given h2_request.
      + * 
      + * @param stream stream to write request to
      + * @param r the request with all the meta data
      + */
      +apr_status_t h2_stream_set_request(h2_stream *stream, const h2_request *r);
      +
      +/**
      + * Initialize stream->request with the given request_rec.
      + * 
      + * @param stream stream to write request to
      + * @param r the request with all the meta data
      + */
      +apr_status_t h2_stream_set_request_rec(h2_stream *stream, request_rec *r);
      +
      +/*
      + * Add a HTTP/2 header (including pseudo headers) or trailer 
      + * to the given stream, depending on stream state.
      + *
      + * @param stream stream to write the header to
      + * @param name the name of the HTTP/2 header
      + * @param nlen the number of characters in name
      + * @param value the header value
      + * @param vlen the number of characters in value
      + */
      +apr_status_t h2_stream_add_header(h2_stream *stream,
      +                                  const char *name, size_t nlen,
      +                                  const char *value, size_t vlen);
      +
      +/**
      + * Closes the stream's input.
      + *
      + * @param stream stream to close intput of
      + */
      +apr_status_t h2_stream_close_input(h2_stream *stream);
      +
      +/*
      + * Write a chunk of DATA to the stream.
      + *
      + * @param stream stream to write the data to
      + * @param data the beginning of the bytes to write
      + * @param len the number of bytes to write
      + */
      +apr_status_t h2_stream_write_data(h2_stream *stream,
      +                                  const char *data, size_t len, int eos);
      +
      +/**
      + * Reset the stream. Stream write/reads will return errors afterwards.
      + *
      + * @param stream the stream to reset
      + * @param error_code the HTTP/2 error code
      + */
      +void h2_stream_rst(h2_stream *stream, int error_code);
      +
      +/**
      + * Schedule the stream for execution. All header information must be
      + * present. Use the given priority comparison callback to determine 
      + * order in queued streams.
      + * 
      + * @param stream the stream to schedule
      + * @param eos    != 0 iff no more input will arrive
      + * @param cmp    priority comparison
      + * @param ctx    context for comparison
      + */
      +apr_status_t h2_stream_schedule(h2_stream *stream, int eos, int push_enabled,
      +                                h2_stream_pri_cmp *cmp, void *ctx);
      +
      +/**
      + * Determine if stream has been scheduled already.
      + * @param stream the stream to check on
      + * @return != 0 iff stream has been scheduled
      + */
      +int h2_stream_is_scheduled(const h2_stream *stream);
      +
      +/**
      + * Set the HTTP error status as response.
      + */
      +apr_status_t h2_stream_set_error(h2_stream *stream, int http_status);
      +
      +/**
      + * Do a speculative read on the stream output to determine the 
      + * amount of data that can be read.
      + * 
      + * @param stream the stream to speculatively read from
      + * @param plen (in-/out) number of bytes requested and on return amount of bytes that
      + *        may be read without blocking
      + * @param peos (out) != 0 iff end of stream will be reached when reading plen
      + *        bytes (out value).
      + * @param presponse (out) the response of one became available
      + * @return APR_SUCCESS if out information was computed successfully.
      + *         APR_EAGAIN if not data is available and end of stream has not been
      + *         reached yet.
      + */
      +apr_status_t h2_stream_out_prepare(h2_stream *stream, apr_off_t *plen, 
      +                                   int *peos, h2_headers **presponse);
      +
      +/**
      + * Read a maximum number of bytes into the bucket brigade.
      + * 
      + * @param stream the stream to read from
      + * @param bb the brigade to append output to
      + * @param plen (in-/out) max. number of bytes to append and on return actual
      + *        number of bytes appended to brigade
      + * @param peos (out) != 0 iff end of stream has been reached while reading
      + * @return APR_SUCCESS if out information was computed successfully.
      + *         APR_EAGAIN if not data is available and end of stream has not been
      + *         reached yet.
      + */
      +apr_status_t h2_stream_read_to(h2_stream *stream, apr_bucket_brigade *bb, 
      +                               apr_off_t *plen, int *peos);
      +
      +/**
      + * Get optional trailers for this stream, may be NULL. Meaningful
      + * results can only be expected when the end of the response body has
      + * been reached.
      + *
      + * @param stream to ask for trailers
      + * @return trailers for NULL
      + */
      +apr_table_t *h2_stream_get_trailers(h2_stream *stream);
      +
      +/**
      + * Check if the stream has open input.
      + * @param stream the stream to check
      + * @return != 0 iff stream has open input.
      + */
      +int h2_stream_input_is_open(const h2_stream *stream);
      +
      +/**
      + * Submit any server push promises on this stream and schedule
      + * the tasks connection with these.
      + *
      + * @param stream the stream for which to submit
      + */
      +apr_status_t h2_stream_submit_pushes(h2_stream *stream, h2_headers *response);
      +
      +/**
      + * Get priority information set for this stream.
      + */
      +const struct h2_priority *h2_stream_get_priority(h2_stream *stream, 
      +                                                 h2_headers *response);
      +
      +/**
      + * Return a textual representation of the stream state as in RFC 7540
      + * nomenclator, all caps, underscores.
      + */
      +const char *h2_stream_state_str(h2_stream *stream);
      +
      +/**
      + * Determine if stream is ready for submitting a response or a RST
      + * @param stream the stream to check
      + */
      +int h2_stream_is_ready(h2_stream *stream);
      +
      +#endif /* defined(__mod_h2__h2_stream__) */
      diff --git a/modules/http2/h2_switch.c b/modules/http2/h2_switch.c
      new file mode 100644
      index 00000000000..d1d4a60f5de
      --- /dev/null
      +++ b/modules/http2/h2_switch.c
      @@ -0,0 +1,185 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_strings.h>
      +#include <apr_optional.h>
      +#include <apr_optional_hooks.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_config.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_log.h>
      +
      +#include "h2_private.h"
      +
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_conn.h"
      +#include "h2_h2.h"
      +#include "h2_switch.h"
      +
      +/*******************************************************************************
      + * Once per lifetime init, retrieve optional functions
      + */
      +apr_status_t h2_switch_init(apr_pool_t *pool, server_rec *s)
      +{
      +    (void)pool;
      +    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s, "h2_switch init");
      +
      +    return APR_SUCCESS;
      +}
      +
      +static int h2_protocol_propose(conn_rec *c, request_rec *r,
      +                               server_rec *s,
      +                               const apr_array_header_t *offers,
      +                               apr_array_header_t *proposals)
      +{
      +    int proposed = 0;
      +    int is_tls = h2_h2_is_tls(c);
      +    const char **protos = is_tls? h2_tls_protos : h2_clear_protos;
      +    
      +    (void)s;
      +    if (strcmp(AP_PROTOCOL_HTTP1, ap_get_protocol(c))) {
      +        /* We do not know how to switch from anything else but http/1.1.
      +         */
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03083)
      +                      "protocol switch: current proto != http/1.1, declined");
      +        return DECLINED;
      +    }
      +    
      +    if (!h2_is_acceptable_connection(c, 0)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03084)
      +                      "protocol propose: connection requirements not met");
      +        return DECLINED;
      +    }
      +    
      +    if (r) {
      +        /* So far, this indicates an HTTP/1 Upgrade header initiated
      +         * protocol switch. For that, the HTTP2-Settings header needs
      +         * to be present and valid for the connection.
      +         */
      +        const char *p;
      +        
      +        if (!h2_allows_h2_upgrade(c)) {
      +            return DECLINED;
      +        }
      +         
      +        p = apr_table_get(r->headers_in, "HTTP2-Settings");
      +        if (!p) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03085)
      +                          "upgrade without HTTP2-Settings declined");
      +            return DECLINED;
      +        }
      +        
      +        p = apr_table_get(r->headers_in, "Connection");
      +        if (!ap_find_token(r->pool, p, "http2-settings")) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03086)
      +                          "upgrade without HTTP2-Settings declined");
      +            return DECLINED;
      +        }
      +        
      +        /* We also allow switching only for requests that have no body.
      +         */
      +        p = apr_table_get(r->headers_in, "Content-Length");
      +        if (p && strcmp(p, "0")) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03087)
      +                          "upgrade with content-length: %s, declined", p);
      +            return DECLINED;
      +        }
      +    }
      +    
      +    while (*protos) {
      +        /* Add all protocols we know (tls or clear) and that
      +         * are part of the offerings (if there have been any). 
      +         */
      +        if (!offers || ap_array_str_contains(offers, *protos)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                          "proposing protocol '%s'", *protos);
      +            APR_ARRAY_PUSH(proposals, const char*) = *protos;
      +            proposed = 1;
      +        }
      +        ++protos;
      +    }
      +    return proposed? DECLINED : OK;
      +}
      +
      +static int h2_protocol_switch(conn_rec *c, request_rec *r, server_rec *s,
      +                              const char *protocol)
      +{
      +    int found = 0;
      +    const char **protos = h2_h2_is_tls(c)? h2_tls_protos : h2_clear_protos;
      +    const char **p = protos;
      +    
      +    (void)s;
      +    while (*p) {
      +        if (!strcmp(*p, protocol)) {
      +            found = 1;
      +            break;
      +        }
      +        p++;
      +    }
      +    
      +    if (found) {
      +        h2_ctx *ctx = h2_ctx_get(c, 1);
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "switching protocol to '%s'", protocol);
      +        h2_ctx_protocol_set(ctx, protocol);
      +        h2_ctx_server_set(ctx, s);
      +        
      +        if (r != NULL) {
      +            apr_status_t status;
      +            /* Switching in the middle of a request means that
      +             * we have to send out the response to this one in h2
      +             * format. So we need to take over the connection
      +             * right away.
      +             */
      +            ap_remove_input_filter_byhandle(r->input_filters, "http_in");
      +            ap_remove_input_filter_byhandle(r->input_filters, "reqtimeout");
      +            ap_remove_output_filter_byhandle(r->output_filters, "HTTP_HEADER");
      +            
      +            /* Ok, start an h2_conn on this one. */
      +            h2_ctx_server_set(ctx, r->server);
      +            status = h2_conn_setup(ctx, r->connection, r);
      +            if (status != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(03088)
      +                              "session setup");
      +                return status;
      +            }
      +            
      +            h2_conn_run(ctx, c);
      +            return DONE;
      +        }
      +        return DONE;
      +    }
      +    
      +    return DECLINED;
      +}
      +
      +static const char *h2_protocol_get(const conn_rec *c)
      +{
      +    return h2_ctx_protocol_get(c);
      +}
      +
      +void h2_switch_register_hooks(void)
      +{
      +    ap_hook_protocol_propose(h2_protocol_propose, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_protocol_switch(h2_protocol_switch, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_protocol_get(h2_protocol_get, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      diff --git a/modules/http2/h2_switch.h b/modules/http2/h2_switch.h
      new file mode 100644
      index 00000000000..10cee960f6d
      --- /dev/null
      +++ b/modules/http2/h2_switch.h
      @@ -0,0 +1,29 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_switch__
      +#define __mod_h2__h2_switch__
      +
      +/*
      + * One time, post config initialization.
      + */
      +apr_status_t h2_switch_init(apr_pool_t *pool, server_rec *s);
      +
      +/* Register apache hooks for protocol switching
      + */
      +void h2_switch_register_hooks(void);
      +
      +
      +#endif /* defined(__mod_h2__h2_switch__) */
      diff --git a/modules/http2/h2_task.c b/modules/http2/h2_task.c
      new file mode 100644
      index 00000000000..b47300d835d
      --- /dev/null
      +++ b/modules/http2/h2_task.c
      @@ -0,0 +1,718 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <stddef.h>
      +
      +#include <apr_atomic.h>
      +#include <apr_thread_cond.h>
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_connection.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +#include <http_log.h>
      +#include <http_vhost.h>
      +#include <util_filter.h>
      +#include <ap_mpm.h>
      +#include <mod_core.h>
      +#include <scoreboard.h>
      +
      +#include "h2_private.h"
      +#include "h2.h"
      +#include "h2_bucket_beam.h"
      +#include "h2_conn.h"
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_from_h1.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_request.h"
      +#include "h2_headers.h"
      +#include "h2_session.h"
      +#include "h2_stream.h"
      +#include "h2_task.h"
      +#include "h2_worker.h"
      +#include "h2_util.h"
      +
      +static void H2_TASK_OUT_LOG(int lvl, h2_task *task, apr_bucket_brigade *bb, 
      +                            const char *tag)
      +{
      +    if (APLOG_C_IS_LEVEL(task->c, lvl)) {
      +        conn_rec *c = task->c;
      +        char buffer[4 * 1024];
      +        const char *line = "(null)";
      +        apr_size_t len, bmax = sizeof(buffer)/sizeof(buffer[0]);
      +        
      +        len = h2_util_bb_print(buffer, bmax, tag, "", bb);
      +        ap_log_cerror(APLOG_MARK, lvl, 0, c, "bb_dump(%s): %s", 
      +                      task->id, len? buffer : line);
      +    }
      +}
      +
      +static void h2_beam_log(h2_bucket_beam *beam, int id, const char *msg, 
      +                        conn_rec *c, int level)
      +{
      +    if (beam && APLOG_C_IS_LEVEL(c,level)) {
      +        char buffer[2048];
      +        apr_size_t off = 0;
      +        
      +        off += apr_snprintf(buffer+off, H2_ALEN(buffer)-off, "cl=%d, ", beam->closed);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "red", ", ", &beam->send_list);
      +        off += h2_util_bb_print(buffer+off, H2_ALEN(buffer)-off, "green", ", ", beam->recv_buffer);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "hold", ", ", &beam->hold_list);
      +        off += h2_util_bl_print(buffer+off, H2_ALEN(buffer)-off, "purge", "", &beam->purge_list);
      +
      +        ap_log_cerror(APLOG_MARK, level, 0, c, "beam(%ld-%d): %s %s", 
      +                      c->id, id, msg, buffer);
      +    }
      +}
      +
      +/*******************************************************************************
      + * task input handling
      + ******************************************************************************/
      +
      +static int input_ser_header(void *ctx, const char *name, const char *value) 
      +{
      +    h2_task *task = ctx;
      +    apr_brigade_printf(task->input.bb, NULL, NULL, "%s: %s\r\n", name, value);
      +    return 1;
      +}
      +
      +/*******************************************************************************
      + * task output handling
      + ******************************************************************************/
      +
      +static apr_status_t open_output(h2_task *task)
      +{
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03348)
      +                  "h2_task(%s): open output to %s %s %s",
      +                  task->id, task->request->method, 
      +                  task->request->authority, 
      +                  task->request->path);
      +    task->output.opened = 1;
      +    return h2_mplx_out_open(task->mplx, task->stream_id, task->output.beam);
      +}
      +
      +static apr_status_t send_out(h2_task *task, apr_bucket_brigade* bb, int block)
      +{
      +    apr_off_t written, left;
      +    apr_status_t status;
      +
      +    apr_brigade_length(bb, 0, &written);
      +    H2_TASK_OUT_LOG(APLOG_TRACE2, task, bb, "h2_task send_out");
      +    h2_beam_log(task->output.beam, task->stream_id, "send_out(before)", task->c, APLOG_TRACE2);
      +    /* engines send unblocking */
      +    status = h2_beam_send(task->output.beam, bb, 
      +                          block? APR_BLOCK_READ : APR_NONBLOCK_READ);
      +    h2_beam_log(task->output.beam, task->stream_id, "send_out(after)", task->c, APLOG_TRACE2);
      +    
      +    if (APR_STATUS_IS_EAGAIN(status)) {
      +        apr_brigade_length(bb, 0, &left);
      +        written -= left;
      +        status = APR_SUCCESS;
      +    }
      +    if (status == APR_SUCCESS) {
      +        if (h2_task_logio_add_bytes_out) {
      +            h2_task_logio_add_bytes_out(task->c, written);
      +        }
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, task->c, 
      +                      "h2_task(%s): send_out done", task->id);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, task->c,
      +                      "h2_task(%s): send_out (%ld bytes)", 
      +                      task->id, (long)written);
      +    }
      +    return status;
      +}
      +
      +/* Bring the data from the brigade (which represents the result of the
      + * request_rec out filter chain) into the h2_mplx for further sending
      + * on the master connection. 
      + */
      +static apr_status_t slave_out(h2_task *task, ap_filter_t* f, 
      +                              apr_bucket_brigade* bb)
      +{
      +    apr_bucket *b;
      +    apr_status_t status = APR_SUCCESS;
      +    int flush = 0, blocking;
      +    
      +    if (task->frozen) {
      +        h2_util_bb_log(task->c, task->stream_id, APLOG_TRACE2,
      +                       "frozen task output write, ignored", bb);
      +        while (!APR_BRIGADE_EMPTY(bb)) {
      +            b = APR_BRIGADE_FIRST(bb);
      +            if (AP_BUCKET_IS_EOR(b)) {
      +                APR_BUCKET_REMOVE(b);
      +                task->eor = b;
      +            }
      +            else {
      +                apr_bucket_delete(b);
      +            }
      +        }
      +        return APR_SUCCESS;
      +    }
      +
      +    /* we send block once we opened the output, so someone is there
      +     * reading it *and* the task is not assigned to a h2_req_engine */
      +    blocking = (!task->assigned && task->output.opened);
      +    if (!task->output.opened) {
      +        for (b = APR_BRIGADE_FIRST(bb);
      +             b != APR_BRIGADE_SENTINEL(bb);
      +             b = APR_BUCKET_NEXT(b)) {
      +            if (APR_BUCKET_IS_FLUSH(b)) {
      +                flush = 1;
      +                break;
      +            }
      +        }
      +    }
      +    
      +    if (task->output.bb && !APR_BRIGADE_EMPTY(task->output.bb)) {
      +        /* still have data buffered from previous attempt.
      +         * setaside and append new data and try to pass the complete data */
      +        if (!APR_BRIGADE_EMPTY(bb)) {
      +            status = ap_save_brigade(f, &task->output.bb, &bb, task->pool);
      +        }
      +        if (status == APR_SUCCESS) {
      +            status = send_out(task, task->output.bb, blocking);
      +        } 
      +    }
      +    else {
      +        /* no data buffered here, try to pass the brigade directly */
      +        status = send_out(task, bb, blocking); 
      +        if (status == APR_SUCCESS && !APR_BRIGADE_EMPTY(bb)) {
      +            /* could not write all, buffer the rest */
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, task->c, APLOGNO(03405)
      +                          "h2_slave_out(%s): saving brigade", 
      +                          task->id);
      +            status = ap_save_brigade(f, &task->output.bb, &bb, task->pool);
      +            flush = 1;
      +        }
      +    }
      +    
      +    if (status == APR_SUCCESS && !task->output.opened && flush) {
      +        /* got a flush or could not write all, time to tell someone to read */
      +        status = open_output(task);
      +    }
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, task->c, 
      +                  "h2_slave_out(%s): slave_out leave", task->id);    
      +    return status;
      +}
      +
      +static apr_status_t output_finish(h2_task *task)
      +{
      +    if (!task->output.opened) {
      +        return open_output(task);
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +/*******************************************************************************
      + * task slave connection filters
      + ******************************************************************************/
      +
      +static apr_status_t h2_filter_slave_in(ap_filter_t* f,
      +                                       apr_bucket_brigade* bb,
      +                                       ap_input_mode_t mode,
      +                                       apr_read_type_e block,
      +                                       apr_off_t readbytes)
      +{
      +    h2_task *task;
      +    apr_status_t status = APR_SUCCESS;
      +    apr_bucket *b, *next;
      +    apr_off_t bblen;
      +    apr_size_t rmax;
      +    
      +    task = h2_ctx_cget_task(f->c);
      +    ap_assert(task);
      +    rmax = ((readbytes <= APR_SIZE_MAX)? (apr_size_t)readbytes : APR_SIZE_MAX);
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                  "h2_slave_in(%s): read, mode=%d, block=%d, readbytes=%ld", 
      +                  task->id, mode, block, (long)readbytes);
      +    
      +    if (mode == AP_MODE_INIT) {
      +        return ap_get_brigade(f->c->input_filters, bb, mode, block, readbytes);
      +    }
      +    
      +    if (f->c->aborted) {
      +        return APR_ECONNABORTED;
      +    }
      +    
      +    if (!task->input.bb) {
      +        return APR_EOF;
      +    }
      +    
      +    /* Cleanup brigades from those nasty 0 length non-meta buckets
      +     * that apr_brigade_split_line() sometimes produces. */
      +    for (b = APR_BRIGADE_FIRST(task->input.bb);
      +         b != APR_BRIGADE_SENTINEL(task->input.bb); b = next) {
      +        next = APR_BUCKET_NEXT(b);
      +        if (b->length == 0 && !APR_BUCKET_IS_METADATA(b)) {
      +            apr_bucket_delete(b);
      +        } 
      +    }
      +    
      +    while (APR_BRIGADE_EMPTY(task->input.bb)) {
      +        /* Get more input data for our request. */
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, f->c,
      +                      "h2_slave_in(%s): get more data from mplx, block=%d, "
      +                      "readbytes=%ld", task->id, block, (long)readbytes);
      +        
      +        /* Override the block mode we get called with depending on the input's
      +         * setting. */
      +        if (task->input.beam) {
      +            status = h2_beam_receive(task->input.beam, task->input.bb, block, 
      +                                     H2MIN(readbytes, 32*1024));
      +        }
      +        else {
      +            status = APR_EOF;
      +        }
      +        
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, f->c,
      +                      "h2_slave_in(%s): read returned", task->id);
      +        if (APR_STATUS_IS_EAGAIN(status) 
      +            && (mode == AP_MODE_GETLINE || block == APR_BLOCK_READ)) {
      +            /* chunked input handling does not seem to like it if we
      +             * return with APR_EAGAIN from a GETLINE read... 
      +             * upload 100k test on test-ser.example.org hangs */
      +            status = APR_SUCCESS;
      +        }
      +        else if (APR_STATUS_IS_EOF(status)) {
      +            break;
      +        }
      +        else if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +        
      +        h2_util_bb_log(f->c, task->stream_id, APLOG_TRACE2, 
      +                       "input.beam recv raw", task->input.bb);
      +        if (h2_task_logio_add_bytes_in) {
      +            apr_brigade_length(bb, 0, &bblen);
      +            h2_task_logio_add_bytes_in(f->c, bblen);
      +        }
      +    }
      +    
      +    /* Inspect the buckets received, detect EOS and apply
      +     * chunked encoding if necessary */
      +    if (status == APR_EOF && APR_BRIGADE_EMPTY(task->input.bb)) {
      +        return APR_EOF;
      +    }
      +
      +    h2_util_bb_log(f->c, task->stream_id, APLOG_TRACE2, 
      +                   "task_input.bb", task->input.bb);
      +           
      +    if (APR_BRIGADE_EMPTY(task->input.bb)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, f->c,
      +                      "h2_slave_in(%s): no data", task->id);
      +        return (block == APR_NONBLOCK_READ)? APR_EAGAIN : APR_EOF;
      +    }
      +    
      +    if (mode == AP_MODE_EXHAUSTIVE) {
      +        /* return all we have */
      +        APR_BRIGADE_CONCAT(bb, task->input.bb);
      +    }
      +    else if (mode == AP_MODE_READBYTES) {
      +        status = h2_brigade_concat_length(bb, task->input.bb, rmax);
      +    }
      +    else if (mode == AP_MODE_SPECULATIVE) {
      +        status = h2_brigade_copy_length(bb, task->input.bb, rmax);
      +    }
      +    else if (mode == AP_MODE_GETLINE) {
      +        /* we are reading a single LF line, e.g. the HTTP headers. 
      +         * this has the nasty side effect to split the bucket, even
      +         * though it ends with CRLF and creates a 0 length bucket */
      +        status = apr_brigade_split_line(bb, task->input.bb, block, 
      +                                        HUGE_STRING_LEN);
      +        if (APLOGctrace1(f->c)) {
      +            char buffer[1024];
      +            apr_size_t len = sizeof(buffer)-1;
      +            apr_brigade_flatten(bb, buffer, &len);
      +            buffer[len] = 0;
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, f->c,
      +                          "h2_slave_in(%s): getline: %s",
      +                          task->id, buffer);
      +        }
      +    }
      +    else {
      +        /* Hmm, well. There is mode AP_MODE_EATCRLF, but we chose not
      +         * to support it. Seems to work. */
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOTIMPL, f->c,
      +                      APLOGNO(03472) 
      +                      "h2_slave_in(%s), unsupported READ mode %d", 
      +                      task->id, mode);
      +        status = APR_ENOTIMPL;
      +    }
      +    
      +    if (APLOGctrace1(f->c)) {
      +        apr_brigade_length(bb, 0, &bblen);
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, status, f->c,
      +                      "h2_slave_in(%s): %ld data bytes", task->id, (long)bblen);
      +    }
      +    return status;
      +}
      +
      +static apr_status_t h2_filter_slave_output(ap_filter_t* filter,
      +                                           apr_bucket_brigade* brigade)
      +{
      +    h2_task *task = h2_ctx_cget_task(filter->c);
      +    apr_status_t status;
      +    
      +    ap_assert(task);
      +    status = slave_out(task, filter, brigade);
      +    if (status != APR_SUCCESS) {
      +        h2_task_rst(task, H2_ERR_INTERNAL_ERROR);
      +    }
      +    return status;
      +}
      +
      +static apr_status_t h2_filter_parse_h1(ap_filter_t* f, apr_bucket_brigade* bb)
      +{
      +    h2_task *task = h2_ctx_cget_task(f->c);
      +    apr_status_t status;
      +    
      +    ap_assert(task);
      +    /* There are cases where we need to parse a serialized http/1.1 
      +     * response. One example is a 100-continue answer in serialized mode
      +     * or via a mod_proxy setup */
      +    while (!task->output.sent_response) {
      +        status = h2_from_h1_parse_response(task, f, bb);
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, status, f->c,
      +                      "h2_task(%s): parsed response", task->id);
      +        if (APR_BRIGADE_EMPTY(bb) || status != APR_SUCCESS) {
      +            return status;
      +        }
      +    }
      +    
      +    return ap_pass_brigade(f->next, bb);
      +}
      +
      +/*******************************************************************************
      + * task things
      + ******************************************************************************/
      + 
      +int h2_task_can_redo(h2_task *task) {
      +    if (h2_beam_was_received(task->input.beam)) {
      +        /* cannot repeat that. */
      +        return 0;
      +    }
      +    return (!strcmp("GET", task->request->method)
      +            || !strcmp("HEAD", task->request->method)
      +            || !strcmp("OPTIONS", task->request->method));
      +}
      +
      +void h2_task_redo(h2_task *task)
      +{
      +    task->rst_error = 0;
      +}
      +
      +void h2_task_rst(h2_task *task, int error)
      +{
      +    task->rst_error = error;
      +    h2_beam_abort(task->input.beam);
      +    if (!task->worker_done) {
      +        h2_beam_abort(task->output.beam);
      +    }
      +    if (task->c) {
      +        task->c->aborted = 1;
      +    }
      +}
      +
      +/*******************************************************************************
      + * Register various hooks
      + */
      +static const char *const mod_ssl[]        = { "mod_ssl.c", NULL};
      +static int h2_task_pre_conn(conn_rec* c, void *arg);
      +static int h2_task_process_conn(conn_rec* c);
      +
      +APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_in) *h2_task_logio_add_bytes_in;
      +APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_out) *h2_task_logio_add_bytes_out;
      +
      +void h2_task_register_hooks(void)
      +{
      +    /* This hook runs on new connections before mod_ssl has a say.
      +     * Its purpose is to prevent mod_ssl from touching our pseudo-connections
      +     * for streams.
      +     */
      +    ap_hook_pre_connection(h2_task_pre_conn,
      +                           NULL, mod_ssl, APR_HOOK_FIRST);
      +    /* When the connection processing actually starts, we might 
      +     * take over, if the connection is for a task.
      +     */
      +    ap_hook_process_connection(h2_task_process_conn, 
      +                               NULL, NULL, APR_HOOK_FIRST);
      +
      +    ap_register_input_filter("H2_SLAVE_IN", h2_filter_slave_in,
      +                             NULL, AP_FTYPE_NETWORK);
      +    ap_register_output_filter("H2_SLAVE_OUT", h2_filter_slave_output,
      +                              NULL, AP_FTYPE_NETWORK);
      +    ap_register_output_filter("H2_PARSE_H1", h2_filter_parse_h1,
      +                              NULL, AP_FTYPE_NETWORK);
      +
      +    ap_register_input_filter("H2_REQUEST", h2_filter_request_in,
      +                             NULL, AP_FTYPE_PROTOCOL);
      +    ap_register_output_filter("H2_RESPONSE", h2_filter_headers_out,
      +                              NULL, AP_FTYPE_PROTOCOL);
      +    ap_register_output_filter("H2_TRAILERS_OUT", h2_filter_trailers_out,
      +                              NULL, AP_FTYPE_PROTOCOL);
      +}
      +
      +/* post config init */
      +apr_status_t h2_task_init(apr_pool_t *pool, server_rec *s)
      +{
      +    h2_task_logio_add_bytes_in = APR_RETRIEVE_OPTIONAL_FN(ap_logio_add_bytes_in);
      +    h2_task_logio_add_bytes_out = APR_RETRIEVE_OPTIONAL_FN(ap_logio_add_bytes_out);
      +
      +    return APR_SUCCESS;
      +}
      +
      +static int h2_task_pre_conn(conn_rec* c, void *arg)
      +{
      +    h2_ctx *ctx;
      +    
      +    if (!c->master) {
      +        return OK;
      +    }
      +    
      +    ctx = h2_ctx_get(c, 0);
      +    (void)arg;
      +    if (h2_ctx_is_task(ctx)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c,
      +                      "h2_h2, pre_connection, found stream task");
      +        ap_add_input_filter("H2_SLAVE_IN", NULL, NULL, c);
      +        ap_add_output_filter("H2_PARSE_H1", NULL, NULL, c);
      +        ap_add_output_filter("H2_SLAVE_OUT", NULL, NULL, c);
      +    }
      +    return OK;
      +}
      +
      +h2_task *h2_task_create(conn_rec *c, int stream_id, const h2_request *req, 
      +                        h2_bucket_beam *input, h2_bucket_beam *output,  
      +                        h2_mplx *mplx)
      +{
      +    apr_pool_t *pool;
      +    h2_task *task;
      +    
      +    ap_assert(mplx);
      +    ap_assert(c);
      +    ap_assert(req);
      +
      +    apr_pool_create(&pool, c->pool);
      +    task = apr_pcalloc(pool, sizeof(h2_task));
      +    if (task == NULL) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOMEM, c,
      +                      APLOGNO(02941) "h2_task(%ld-%d): create stream task", 
      +                      c->id, stream_id);
      +        return NULL;
      +    }
      +    task->id          = apr_psprintf(pool, "%ld-%d", c->master->id, stream_id);
      +    task->stream_id   = stream_id;
      +    task->c           = c;
      +    task->mplx        = mplx;
      +    task->c->keepalives = mplx->c->keepalives;
      +    task->pool        = pool;
      +    task->request     = req;
      +    task->input.beam  = input;
      +    task->output.beam = output;
      +    
      +    h2_beam_send_from(output, task->pool);
      +    apr_thread_cond_create(&task->cond, pool);
      +    h2_ctx_create_for(c, task);
      +    
      +    return task;
      +}
      +
      +void h2_task_destroy(h2_task *task)
      +{
      +    if (task->eor) {
      +        apr_bucket_destroy(task->eor);
      +    }
      +    if (task->pool) {
      +        apr_pool_destroy(task->pool);
      +    }
      +}
      +
      +apr_status_t h2_task_do(h2_task *task, apr_thread_t *thread, int worker_id)
      +{
      +    ap_assert(task);
      +
      +    if (task->c->master) {
      +        /* Each conn_rec->id is supposed to be unique at a point in time. Since
      +         * some modules (and maybe external code) uses this id as an identifier
      +         * for the request_rec they handle, it needs to be unique for slave 
      +         * connections also.
      +         * The connection id is generated by the MPM and most MPMs use the formula
      +         *    id := (child_num * max_threads) + thread_num
      +         * which means that there is a maximum id of about
      +         *    idmax := max_child_count * max_threads
      +         * If we assume 2024 child processes with 2048 threads max, we get
      +         *    idmax ~= 2024 * 2048 = 2 ** 22
      +         * On 32 bit systems, we have not much space left, but on 64 bit systems
      +         * (and higher?) we can use the upper 32 bits without fear of collision.
      +         * 32 bits is just what we need, since a connection can only handle so
      +         * many streams. 
      +         */
      +        int slave_id, free_bits;
      +        
      +        if (sizeof(unsigned long) >= 8) {
      +            free_bits = 32;
      +            slave_id = task->stream_id;
      +        }
      +        else {
      +            /* Assume we have a more limited number of threads/processes
      +             * and h2 workers on a 32-bit system. Use the worker instead
      +             * of the stream id. */
      +            free_bits = 8;
      +            slave_id = worker_id; 
      +        }
      +        task->c->id = (task->c->master->id << free_bits)^slave_id;
      +    }
      +    
      +    task->input.bb = apr_brigade_create(task->pool, task->c->bucket_alloc);
      +    if (task->request->serialize) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                      "h2_task(%s): serialize request %s %s", 
      +                      task->id, task->request->method, task->request->path);
      +        apr_brigade_printf(task->input.bb, NULL, 
      +                           NULL, "%s %s HTTP/1.1\r\n", 
      +                           task->request->method, task->request->path);
      +        apr_table_do(input_ser_header, task, task->request->headers, NULL);
      +        apr_brigade_puts(task->input.bb, NULL, NULL, "\r\n");
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                  "h2_task(%s): process connection", task->id);
      +    task->c->current_thread = thread; 
      +    ap_run_process_connection(task->c);
      +    
      +    if (task->frozen) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                      "h2_task(%s): process_conn returned frozen task", 
      +                      task->id);
      +        /* cleanup delayed */
      +        return APR_EAGAIN;
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, task->c,
      +                      "h2_task(%s): processing done", task->id);
      +        return output_finish(task);
      +    }
      +}
      +
      +static apr_status_t h2_task_process_request(h2_task *task, conn_rec *c)
      +{
      +    const h2_request *req = task->request;
      +    conn_state_t *cs = c->cs;
      +    request_rec *r;
      +
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                  "h2_task(%s): create request_rec", task->id);
      +    r = h2_request_create_rec(req, c);
      +    if (r && (r->status == HTTP_OK)) {
      +        ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r);
      +        
      +        if (cs) {
      +            cs->state = CONN_STATE_HANDLER;
      +        }
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "h2_task(%s): start process_request", task->id);
      +    
      +        ap_process_request(r);
      +        if (task->frozen) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                          "h2_task(%s): process_request frozen", task->id);
      +        }
      +        else {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                          "h2_task(%s): process_request done", task->id);
      +        }
      +        
      +        /* After the call to ap_process_request, the
      +         * request pool will have been deleted.  We set
      +         * r=NULL here to ensure that any dereference
      +         * of r that might be added later in this function
      +         * will result in a segfault immediately instead
      +         * of nondeterministic failures later.
      +         */
      +        if (cs) 
      +            cs->state = CONN_STATE_WRITE_COMPLETION;
      +        r = NULL;
      +    }
      +    else if (!r) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "h2_task(%s): create request_rec failed, r=NULL", task->id);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c,
      +                      "h2_task(%s): create request_rec failed, r->status=%d", 
      +                      task->id, r->status);
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
      +static int h2_task_process_conn(conn_rec* c)
      +{
      +    h2_ctx *ctx;
      +    
      +    if (!c->master) {
      +        return DECLINED;
      +    }
      +    
      +    ctx = h2_ctx_get(c, 0);
      +    if (h2_ctx_is_task(ctx)) {
      +        if (!ctx->task->request->serialize) {
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                          "h2_h2, processing request directly");
      +            h2_task_process_request(ctx->task, c);
      +            return DONE;
      +        }
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                      "h2_task(%s), serialized handling", ctx->task->id);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                      "slave_conn(%ld): has no task", c->id);
      +    }
      +    return DECLINED;
      +}
      +
      +apr_status_t h2_task_freeze(h2_task *task)
      +{   
      +    if (!task->frozen) {
      +        task->frozen = 1;
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03406) 
      +                      "h2_task(%s), frozen", task->id);
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_task_thaw(h2_task *task)
      +{
      +    if (task->frozen) {
      +        task->frozen = 0;
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, task->c, APLOGNO(03407) 
      +                      "h2_task(%s), thawed", task->id);
      +    }
      +    task->thawed = 1;
      +    return APR_SUCCESS;
      +}
      +
      +int h2_task_has_thawed(h2_task *task)
      +{
      +    return task->thawed;
      +}
      diff --git a/modules/http2/h2_task.h b/modules/http2/h2_task.h
      new file mode 100644
      index 00000000000..a8f0f2c315b
      --- /dev/null
      +++ b/modules/http2/h2_task.h
      @@ -0,0 +1,125 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_task__
      +#define __mod_h2__h2_task__
      +
      +#include <http_core.h>
      +
      +/**
      + * A h2_task fakes a HTTP/1.1 request from the data in a HTTP/2 stream 
      + * (HEADER+CONT.+DATA) the module recieves.
      + *
      + * In order to answer a HTTP/2 stream, we want all Apache httpd infrastructure
      + * to be involved as usual, as if this stream can as a separate HTTP/1.1
      + * request. The basic trickery to do so was derived from google's mod_spdy
      + * source. Basically, we fake a new conn_rec object, even with its own
      + * socket and give it to ap_process_connection().
      + *
      + * Since h2_task instances are executed in separate threads, we may have
      + * different lifetimes than our h2_stream or h2_session instances. Basically,
      + * we would like to be as standalone as possible.
      + *
      + * Finally, to keep certain connection level filters, such as ourselves and
      + * especially mod_ssl ones, from messing with our data, we need a filter
      + * of our own to disble those.
      + */
      +
      +struct apr_thread_cond_t;
      +struct h2_bucket_beam;
      +struct h2_conn;
      +struct h2_mplx;
      +struct h2_task;
      +struct h2_req_engine;
      +struct h2_request;
      +struct h2_response_parser;
      +struct h2_worker;
      +
      +typedef struct h2_task h2_task;
      +
      +struct h2_task {
      +    const char *id;
      +    int stream_id;
      +    conn_rec *c;
      +    apr_pool_t *pool;
      +    
      +    const struct h2_request *request;
      +    int rst_error;                   /* h2 related stream abort error */
      +    
      +    struct {
      +        struct h2_bucket_beam *beam;
      +        unsigned int eos : 1;
      +        apr_bucket_brigade *bb;
      +        apr_bucket_brigade *bbchunk;
      +        apr_off_t chunked_total;
      +    } input;
      +    struct {
      +        struct h2_bucket_beam *beam;
      +        unsigned int opened : 1;
      +        unsigned int sent_response : 1;
      +        unsigned int copy_files : 1;
      +        struct h2_response_parser *rparser;
      +        apr_bucket_brigade *bb;
      +    } output;
      +    
      +    struct h2_mplx *mplx;
      +    struct apr_thread_cond_t *cond;
      +    
      +    unsigned int filters_set    : 1;
      +    unsigned int frozen         : 1;
      +    unsigned int thawed         : 1;
      +    unsigned int worker_started : 1; /* h2_worker started processing */
      +    unsigned int worker_done    : 1; /* h2_worker finished */
      +    
      +    apr_time_t started_at;           /* when processing started */
      +    apr_time_t done_at;              /* when processing was done */
      +    apr_bucket *eor;
      +    
      +    struct h2_req_engine *engine;   /* engine hosted by this task */
      +    struct h2_req_engine *assigned; /* engine that task has been assigned to */
      +};
      +
      +h2_task *h2_task_create(conn_rec *c, int stream_id, 
      +                        const struct h2_request *req, 
      +                        struct h2_bucket_beam *input, 
      +                        struct h2_bucket_beam *output, 
      +                        struct h2_mplx *mplx);
      +
      +void h2_task_destroy(h2_task *task);
      +
      +apr_status_t h2_task_do(h2_task *task, apr_thread_t *thread, int worker_id);
      +
      +void h2_task_redo(h2_task *task);
      +int h2_task_can_redo(h2_task *task);
      +
      +/**
      + * Reset the task with the given error code, resets all input/output.
      + */
      +void h2_task_rst(h2_task *task, int error);
      +
      +void h2_task_register_hooks(void);
      +/*
      + * One time, post config intialization.
      + */
      +apr_status_t h2_task_init(apr_pool_t *pool, server_rec *s);
      +
      +extern APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_in) *h2_task_logio_add_bytes_in;
      +extern APR_OPTIONAL_FN_TYPE(ap_logio_add_bytes_out) *h2_task_logio_add_bytes_out;
      +
      +apr_status_t h2_task_freeze(h2_task *task);
      +apr_status_t h2_task_thaw(h2_task *task);
      +int h2_task_has_thawed(h2_task *task);
      +
      +#endif /* defined(__mod_h2__h2_task__) */
      diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c
      new file mode 100644
      index 00000000000..d800b405692
      --- /dev/null
      +++ b/modules/http2/h2_util.c
      @@ -0,0 +1,1436 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <apr_strings.h>
      +
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +#include <http_request.h>
      +
      +#include <nghttp2/nghttp2.h>
      +
      +#include "h2.h"
      +#include "h2_util.h"
      +
      +/* h2_log2(n) iff n is a power of 2 */
      +unsigned char h2_log2(int n)
      +{
      +    int lz = 0;
      +    if (!n) {
      +        return 0;
      +    }
      +    if (!(n & 0xffff0000u)) {
      +        lz += 16;
      +        n = (n << 16);
      +    }
      +    if (!(n & 0xff000000u)) {
      +        lz += 8;
      +        n = (n << 8);
      +    }
      +    if (!(n & 0xf0000000u)) {
      +        lz += 4;
      +        n = (n << 4);
      +    }
      +    if (!(n & 0xc0000000u)) {
      +        lz += 2;
      +        n = (n << 2);
      +    }
      +    if (!(n & 0x80000000u)) {
      +        lz += 1;
      +    }
      +    
      +    return 31 - lz;
      +}
      +
      +size_t h2_util_hex_dump(char *buffer, size_t maxlen,
      +                        const char *data, size_t datalen)
      +{
      +    size_t offset = 0;
      +    size_t maxoffset = (maxlen-4);
      +    size_t i;
      +    for (i = 0; i < datalen && offset < maxoffset; ++i) {
      +        const char *sep = (i && i % 16 == 0)? "\n" : " ";
      +        int n = apr_snprintf(buffer+offset, maxoffset-offset,
      +                             "%2x%s", ((unsigned int)data[i]&0xff), sep);
      +        offset += n;
      +    }
      +    strcpy(buffer+offset, (i<datalen)? "..." : "");
      +    return strlen(buffer);
      +}
      +
      +size_t h2_util_header_print(char *buffer, size_t maxlen,
      +                            const char *name, size_t namelen,
      +                            const char *value, size_t valuelen)
      +{
      +    size_t offset = 0;
      +    size_t i;
      +    for (i = 0; i < namelen && offset < maxlen; ++i, ++offset) {
      +        buffer[offset] = name[i];
      +    }
      +    for (i = 0; i < 2 && offset < maxlen; ++i, ++offset) {
      +        buffer[offset] = ": "[i];
      +    }
      +    for (i = 0; i < valuelen && offset < maxlen; ++i, ++offset) {
      +        buffer[offset] = value[i];
      +    }
      +    buffer[offset] = '\0';
      +    return offset;
      +}
      +
      +
      +void h2_util_camel_case_header(char *s, size_t len)
      +{
      +    size_t start = 1;
      +    size_t i;
      +    for (i = 0; i < len; ++i) {
      +        if (start) {
      +            if (s[i] >= 'a' && s[i] <= 'z') {
      +                s[i] -= 'a' - 'A';
      +            }
      +            
      +            start = 0;
      +        }
      +        else if (s[i] == '-') {
      +            start = 1;
      +        }
      +    }
      +}
      +
      +static const int BASE64URL_UINT6[] = {
      +/*   0   1   2   3   4   5   6   7   8   9   a   b   c   d   e   f        */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  0 */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  1 */ 
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, /*  2 */
      +    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, /*  3 */ 
      +    -1, 0,  1,  2,  3,  4,  5,  6,   7,  8,  9, 10, 11, 12, 13, 14, /*  4 */
      +    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, /*  5 */
      +    -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, /*  6 */
      +    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, /*  7 */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  8 */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  9 */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  a */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  b */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  c */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  d */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*  e */
      +    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1  /*  f */
      +};
      +static const char BASE64URL_CHARS[] = {
      +    'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', /*  0 -  9 */
      +    'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', /* 10 - 19 */
      +    'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', /* 20 - 29 */
      +    'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', /* 30 - 39 */
      +    'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', /* 40 - 49 */
      +    'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', /* 50 - 59 */
      +    '8', '9', '-', '_', ' ', ' ', ' ', ' ', ' ', ' ', /* 60 - 69 */
      +};
      +
      +apr_size_t h2_util_base64url_decode(const char **decoded, const char *encoded, 
      +                                    apr_pool_t *pool)
      +{
      +    const unsigned char *e = (const unsigned char *)encoded;
      +    const unsigned char *p = e;
      +    unsigned char *d;
      +    int n;
      +    apr_size_t len, mlen, remain, i;
      +    
      +    while (*p && BASE64URL_UINT6[ *p ] != -1) {
      +        ++p;
      +    }
      +    len = p - e;
      +    mlen = (len/4)*4;
      +    *decoded = apr_pcalloc(pool, len+1);
      +    
      +    i = 0;
      +    d = (unsigned char*)*decoded;
      +    for (; i < mlen; i += 4) {
      +        n = ((BASE64URL_UINT6[ e[i+0] ] << 18) +
      +             (BASE64URL_UINT6[ e[i+1] ] << 12) +
      +             (BASE64URL_UINT6[ e[i+2] ] << 6) +
      +             (BASE64URL_UINT6[ e[i+3] ]));
      +        *d++ = n >> 16;
      +        *d++ = n >> 8 & 0xffu;
      +        *d++ = n & 0xffu;
      +    }
      +    remain = len - mlen;
      +    switch (remain) {
      +        case 2:
      +            n = ((BASE64URL_UINT6[ e[mlen+0] ] << 18) +
      +                 (BASE64URL_UINT6[ e[mlen+1] ] << 12));
      +            *d++ = n >> 16;
      +            break;
      +        case 3:
      +            n = ((BASE64URL_UINT6[ e[mlen+0] ] << 18) +
      +                 (BASE64URL_UINT6[ e[mlen+1] ] << 12) +
      +                 (BASE64URL_UINT6[ e[mlen+2] ] << 6));
      +            *d++ = n >> 16;
      +            *d++ = n >> 8 & 0xffu;
      +            break;
      +        default: /* do nothing */
      +            break;
      +    }
      +    return mlen/4*3 + remain;
      +}
      +
      +const char *h2_util_base64url_encode(const char *data, 
      +                                     apr_size_t len, apr_pool_t *pool)
      +{
      +    apr_size_t mlen = ((len+2)/3)*3;
      +    apr_size_t slen = (mlen/3)*4;
      +    apr_size_t i;
      +    const unsigned char *udata = (const unsigned char*)data;
      +    char *enc, *p = apr_pcalloc(pool, slen+1); /* 0 terminated */
      +    
      +    enc = p;
      +    for (i = 0; i < mlen; i+= 3) {
      +        *p++ = BASE64URL_CHARS[ (udata[i] >> 2) & 0x3fu ];
      +        *p++ = BASE64URL_CHARS[ ((udata[i] << 4) + 
      +                                 ((i+1 < len)? (udata[i+1] >> 4) : 0)) & 0x3fu ];
      +        *p++ = BASE64URL_CHARS[ ((udata[i+1] << 2) + 
      +                                 ((i+2 < len)? (udata[i+2] >> 6) : 0)) & 0x3fu ];
      +        if (i+2 < len) {
      +            *p++ = BASE64URL_CHARS[ udata[i+2] & 0x3fu ];
      +        }
      +    }
      +    
      +    return enc;
      +}
      +
      +int h2_util_contains_token(apr_pool_t *pool, const char *s, const char *token)
      +{
      +    char *c;
      +    if (s) {
      +        if (!apr_strnatcasecmp(s, token)) {   /* the simple life */
      +            return 1;
      +        }
      +        
      +        for (c = ap_get_token(pool, &s, 0); c && *c;
      +             c = *s? ap_get_token(pool, &s, 0) : NULL) {
      +            if (!apr_strnatcasecmp(c, token)) { /* seeing the token? */
      +                return 1;
      +            }
      +            while (*s++ == ';') {            /* skip parameters */
      +                ap_get_token(pool, &s, 0);
      +            }
      +            if (*s++ != ',') {               /* need comma separation */
      +                return 0;
      +            }
      +        }
      +    }
      +    return 0;
      +}
      +
      +const char *h2_util_first_token_match(apr_pool_t *pool, const char *s, 
      +                                      const char *tokens[], apr_size_t len)
      +{
      +    char *c;
      +    apr_size_t i;
      +    if (s && *s) {
      +        for (c = ap_get_token(pool, &s, 0); c && *c;
      +             c = *s? ap_get_token(pool, &s, 0) : NULL) {
      +            for (i = 0; i < len; ++i) {
      +                if (!apr_strnatcasecmp(c, tokens[i])) {
      +                    return tokens[i];
      +                }
      +            }
      +            while (*s++ == ';') {            /* skip parameters */
      +                ap_get_token(pool, &s, 0);
      +            }
      +            if (*s++ != ',') {               /* need comma separation */
      +                return 0;
      +            }
      +        }
      +    }
      +    return NULL;
      +}
      +
      +
      +/*******************************************************************************
      + * ihash - hash for structs with int identifier
      + ******************************************************************************/
      +struct h2_ihash_t {
      +    apr_hash_t *hash;
      +    size_t ioff;
      +};
      +
      +static unsigned int ihash(const char *key, apr_ssize_t *klen)
      +{
      +    return (unsigned int)(*((int*)key));
      +}
      +
      +h2_ihash_t *h2_ihash_create(apr_pool_t *pool, size_t offset_of_int)
      +{
      +    h2_ihash_t *ih = apr_pcalloc(pool, sizeof(h2_ihash_t));
      +    ih->hash = apr_hash_make_custom(pool, ihash);
      +    ih->ioff = offset_of_int;
      +    return ih;
      +}
      +
      +size_t h2_ihash_count(h2_ihash_t *ih)
      +{
      +    return apr_hash_count(ih->hash);
      +}
      +
      +int h2_ihash_empty(h2_ihash_t *ih)
      +{
      +    return apr_hash_count(ih->hash) == 0;
      +}
      +
      +void *h2_ihash_get(h2_ihash_t *ih, int id)
      +{
      +    return apr_hash_get(ih->hash, &id, sizeof(id));
      +}
      +
      +typedef struct {
      +    h2_ihash_iter_t *iter;
      +    void *ctx;
      +} iter_ctx;
      +
      +static int ihash_iter(void *ctx, const void *key, apr_ssize_t klen, 
      +                     const void *val)
      +{
      +    iter_ctx *ictx = ctx;
      +    return ictx->iter(ictx->ctx, (void*)val); /* why is this passed const?*/
      +}
      +
      +int h2_ihash_iter(h2_ihash_t *ih, h2_ihash_iter_t *fn, void *ctx)
      +{
      +    iter_ctx ictx;
      +    ictx.iter = fn;
      +    ictx.ctx = ctx;
      +    return apr_hash_do(ihash_iter, &ictx, ih->hash);
      +}
      +
      +void h2_ihash_add(h2_ihash_t *ih, void *val)
      +{
      +    apr_hash_set(ih->hash, ((char *)val + ih->ioff), sizeof(int), val);
      +}
      +
      +void h2_ihash_remove(h2_ihash_t *ih, int id)
      +{
      +    apr_hash_set(ih->hash, &id, sizeof(id), NULL);
      +}
      +
      +void h2_ihash_remove_val(h2_ihash_t *ih, void *val)
      +{
      +    int id = *((int*)((char *)val + ih->ioff));
      +    apr_hash_set(ih->hash, &id, sizeof(id), NULL);
      +}
      +
      +
      +void h2_ihash_clear(h2_ihash_t *ih)
      +{
      +    apr_hash_clear(ih->hash);
      +}
      +
      +typedef struct {
      +    h2_ihash_t *ih;
      +    void **buffer;
      +    size_t max;
      +    size_t len;
      +} collect_ctx;
      +
      +static int collect_iter(void *x, void *val)
      +{
      +    collect_ctx *ctx = x;
      +    if (ctx->len < ctx->max) {
      +        ctx->buffer[ctx->len++] = val;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +size_t h2_ihash_shift(h2_ihash_t *ih, void **buffer, size_t max)
      +{
      +    collect_ctx ctx;
      +    size_t i;
      +    
      +    ctx.ih = ih;
      +    ctx.buffer = buffer;
      +    ctx.max = max;
      +    ctx.len = 0;
      +    h2_ihash_iter(ih, collect_iter, &ctx);
      +    for (i = 0; i < ctx.len; ++i) {
      +        h2_ihash_remove_val(ih, buffer[i]);
      +    }
      +    return ctx.len;
      +}
      +
      +typedef struct {
      +    h2_ihash_t *ih;
      +    int *buffer;
      +    size_t max;
      +    size_t len;
      +} icollect_ctx;
      +
      +static int icollect_iter(void *x, void *val)
      +{
      +    icollect_ctx *ctx = x;
      +    if (ctx->len < ctx->max) {
      +        ctx->buffer[ctx->len++] = *((int*)((char *)val + ctx->ih->ioff));
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +size_t h2_ihash_ishift(h2_ihash_t *ih, int *buffer, size_t max)
      +{
      +    icollect_ctx ctx;
      +    size_t i;
      +    
      +    ctx.ih = ih;
      +    ctx.buffer = buffer;
      +    ctx.max = max;
      +    ctx.len = 0;
      +    h2_ihash_iter(ih, icollect_iter, &ctx);
      +    for (i = 0; i < ctx.len; ++i) {
      +        h2_ihash_remove(ih, buffer[i]);
      +    }
      +    return ctx.len;
      +}
      +
      +/*******************************************************************************
      + * iqueue - sorted list of int
      + ******************************************************************************/
      +
      +static void iq_grow(h2_iqueue *q, int nlen);
      +static void iq_swap(h2_iqueue *q, int i, int j);
      +static int iq_bubble_up(h2_iqueue *q, int i, int top, 
      +                        h2_iq_cmp *cmp, void *ctx);
      +static int iq_bubble_down(h2_iqueue *q, int i, int bottom, 
      +                          h2_iq_cmp *cmp, void *ctx);
      +
      +h2_iqueue *h2_iq_create(apr_pool_t *pool, int capacity)
      +{
      +    h2_iqueue *q = apr_pcalloc(pool, sizeof(h2_iqueue));
      +    if (q) {
      +        q->pool = pool;
      +        iq_grow(q, capacity);
      +        q->nelts = 0;
      +    }
      +    return q;
      +}
      +
      +int h2_iq_empty(h2_iqueue *q)
      +{
      +    return q->nelts == 0;
      +}
      +
      +int h2_iq_count(h2_iqueue *q)
      +{
      +    return q->nelts;
      +}
      +
      +
      +void h2_iq_add(h2_iqueue *q, int sid, h2_iq_cmp *cmp, void *ctx)
      +{
      +    int i;
      +    
      +    if (h2_iq_contains(q, sid)) {
      +        return;
      +    }
      +    if (q->nelts >= q->nalloc) {
      +        iq_grow(q, q->nalloc * 2);
      +    }
      +    i = (q->head + q->nelts) % q->nalloc;
      +    q->elts[i] = sid;
      +    ++q->nelts;
      +    
      +    if (cmp) {
      +        /* bubble it to the front of the queue */
      +        iq_bubble_up(q, i, q->head, cmp, ctx);
      +    }
      +}
      +
      +void h2_iq_append(h2_iqueue *q, int sid)
      +{
      +    h2_iq_add(q, sid, NULL, NULL);
      +}
      +
      +int h2_iq_remove(h2_iqueue *q, int sid)
      +{
      +    int i;
      +    for (i = 0; i < q->nelts; ++i) {
      +        if (sid == q->elts[(q->head + i) % q->nalloc]) {
      +            break;
      +        }
      +    }
      +    
      +    if (i < q->nelts) {
      +        ++i;
      +        for (; i < q->nelts; ++i) {
      +            q->elts[(q->head+i-1)%q->nalloc] = q->elts[(q->head+i)%q->nalloc];
      +        }
      +        --q->nelts;
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +void h2_iq_clear(h2_iqueue *q)
      +{
      +    q->nelts = 0;
      +}
      +
      +void h2_iq_sort(h2_iqueue *q, h2_iq_cmp *cmp, void *ctx)
      +{
      +    /* Assume that changes in ordering are minimal. This needs,
      +     * best case, q->nelts - 1 comparisions to check that nothing
      +     * changed.
      +     */
      +    if (q->nelts > 0) {
      +        int i, ni, prev, last;
      +        
      +        /* Start at the end of the queue and create a tail of sorted
      +         * entries. Make that tail one element longer in each iteration.
      +         */
      +        last = i = (q->head + q->nelts - 1) % q->nalloc;
      +        while (i != q->head) {
      +            prev = (q->nalloc + i - 1) % q->nalloc;
      +            
      +            ni = iq_bubble_up(q, i, prev, cmp, ctx);
      +            if (ni == prev) {
      +                /* i bubbled one up, bubble the new i down, which
      +                 * keeps all tasks below i sorted. */
      +                iq_bubble_down(q, i, last, cmp, ctx);
      +            }
      +            i = prev;
      +        };
      +    }
      +}
      +
      +
      +int h2_iq_shift(h2_iqueue *q)
      +{
      +    int sid;
      +    
      +    if (q->nelts <= 0) {
      +        return 0;
      +    }
      +    
      +    sid = q->elts[q->head];
      +    q->head = (q->head + 1) % q->nalloc;
      +    q->nelts--;
      +    
      +    return sid;
      +}
      +
      +size_t h2_iq_mshift(h2_iqueue *q, int *pint, size_t max)
      +{
      +    int i;
      +    for (i = 0; i < max; ++i) {
      +        pint[i] = h2_iq_shift(q);
      +        if (pint[i] == 0) {
      +            break;
      +        }
      +    }
      +    return i;
      +}
      +
      +static void iq_grow(h2_iqueue *q, int nlen)
      +{
      +    if (nlen > q->nalloc) {
      +        int *nq = apr_pcalloc(q->pool, sizeof(int) * nlen);
      +        if (q->nelts > 0) {
      +            int l = ((q->head + q->nelts) % q->nalloc) - q->head;
      +            
      +            memmove(nq, q->elts + q->head, sizeof(int) * l);
      +            if (l < q->nelts) {
      +                /* elts wrapped, append elts in [0, remain] to nq */
      +                int remain = q->nelts - l;
      +                memmove(nq + l, q->elts, sizeof(int) * remain);
      +            }
      +        }
      +        q->elts = nq;
      +        q->nalloc = nlen;
      +        q->head = 0;
      +    }
      +}
      +
      +static void iq_swap(h2_iqueue *q, int i, int j)
      +{
      +    int x = q->elts[i];
      +    q->elts[i] = q->elts[j];
      +    q->elts[j] = x;
      +}
      +
      +static int iq_bubble_up(h2_iqueue *q, int i, int top, 
      +                        h2_iq_cmp *cmp, void *ctx) 
      +{
      +    int prev;
      +    while (((prev = (q->nalloc + i - 1) % q->nalloc), i != top) 
      +           && (*cmp)(q->elts[i], q->elts[prev], ctx) < 0) {
      +        iq_swap(q, prev, i);
      +        i = prev;
      +    }
      +    return i;
      +}
      +
      +static int iq_bubble_down(h2_iqueue *q, int i, int bottom, 
      +                          h2_iq_cmp *cmp, void *ctx)
      +{
      +    int next;
      +    while (((next = (q->nalloc + i + 1) % q->nalloc), i != bottom) 
      +           && (*cmp)(q->elts[i], q->elts[next], ctx) > 0) {
      +        iq_swap(q, next, i);
      +        i = next;
      +    }
      +    return i;
      +}
      +
      +int h2_iq_contains(h2_iqueue *q, int sid)
      +{
      +    int i;
      +    for (i = 0; i < q->nelts; ++i) {
      +        if (sid == q->elts[(q->head + i) % q->nalloc]) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +/*******************************************************************************
      + * h2_util for apt_table_t
      + ******************************************************************************/
      + 
      +typedef struct {
      +    apr_size_t bytes;
      +    apr_size_t pair_extra;
      +} table_bytes_ctx;
      +
      +static int count_bytes(void *x, const char *key, const char *value)
      +{
      +    table_bytes_ctx *ctx = x;
      +    if (key) {
      +        ctx->bytes += strlen(key);
      +    }
      +    if (value) {
      +        ctx->bytes += strlen(value);
      +    }
      +    ctx->bytes += ctx->pair_extra;
      +    return 1;
      +}
      +
      +apr_size_t h2_util_table_bytes(apr_table_t *t, apr_size_t pair_extra)
      +{
      +    table_bytes_ctx ctx;
      +    
      +    ctx.bytes = 0;
      +    ctx.pair_extra = pair_extra;
      +    apr_table_do(count_bytes, &ctx, t, NULL);
      +    return ctx.bytes;
      +}
      +
      +
      +/*******************************************************************************
      + * h2_util for bucket brigades
      + ******************************************************************************/
      +
      +static apr_status_t last_not_included(apr_bucket_brigade *bb, 
      +                                      apr_off_t maxlen, 
      +                                      int same_alloc,
      +                                      apr_size_t *pfile_buckets_allowed,
      +                                      apr_bucket **pend)
      +{
      +    apr_bucket *b;
      +    apr_status_t status = APR_SUCCESS;
      +    int files_allowed = pfile_buckets_allowed? (int)*pfile_buckets_allowed : 0;
      +    
      +    if (maxlen >= 0) {
      +        /* Find the bucket, up to which we reach maxlen/mem bytes */
      +        for (b = APR_BRIGADE_FIRST(bb); 
      +             (b != APR_BRIGADE_SENTINEL(bb));
      +             b = APR_BUCKET_NEXT(b)) {
      +            
      +            if (APR_BUCKET_IS_METADATA(b)) {
      +                /* included */
      +            }
      +            else {
      +                if (b->length == ((apr_size_t)-1)) {
      +                    const char *ign;
      +                    apr_size_t ilen;
      +                    status = apr_bucket_read(b, &ign, &ilen, APR_BLOCK_READ);
      +                    if (status != APR_SUCCESS) {
      +                        return status;
      +                    }
      +                }
      +                
      +                if (maxlen == 0 && b->length > 0) {
      +                    *pend = b;
      +                    return status;
      +                }
      +                
      +                if (same_alloc && APR_BUCKET_IS_FILE(b)) {
      +                    /* we like it move it, always */
      +                }
      +                else if (files_allowed > 0 && APR_BUCKET_IS_FILE(b)) {
      +                    /* this has no memory footprint really unless
      +                     * it is read, disregard it in length count,
      +                     * unless we do not move the file buckets */
      +                    --files_allowed;
      +                }
      +                else if (maxlen < (apr_off_t)b->length) {
      +                    apr_bucket_split(b, (apr_size_t)maxlen);
      +                    maxlen = 0;
      +                }
      +                else {
      +                    maxlen -= b->length;
      +                }
      +            }
      +        }
      +    }
      +    *pend = APR_BRIGADE_SENTINEL(bb);
      +    return status;
      +}
      +
      +apr_status_t h2_brigade_concat_length(apr_bucket_brigade *dest, 
      +                                      apr_bucket_brigade *src,
      +                                      apr_off_t length)
      +{
      +    apr_bucket *b, *next;
      +    apr_off_t remain = length;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    for (b = APR_BRIGADE_FIRST(src); 
      +         b != APR_BRIGADE_SENTINEL(src);
      +         b = next) {
      +        next = APR_BUCKET_NEXT(b);
      +        
      +        if (APR_BUCKET_IS_METADATA(b)) {
      +            /* fall through */
      +        }
      +        else {
      +            if (remain == b->length) {
      +                /* fall through */
      +            }
      +            else if (remain <= 0) {
      +                return status;
      +            }
      +            else {
      +                if (b->length == ((apr_size_t)-1)) {
      +                    const char *ign;
      +                    apr_size_t ilen;
      +                    status = apr_bucket_read(b, &ign, &ilen, APR_BLOCK_READ);
      +                    if (status != APR_SUCCESS) {
      +                        return status;
      +                    }
      +                }
      +            
      +                if (remain < b->length) {
      +                    apr_bucket_split(b, remain);
      +                }
      +            }
      +        }
      +        APR_BUCKET_REMOVE(b);
      +        APR_BRIGADE_INSERT_TAIL(dest, b);
      +        remain -= b->length;
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_brigade_copy_length(apr_bucket_brigade *dest, 
      +                                    apr_bucket_brigade *src,
      +                                    apr_off_t length)
      +{
      +    apr_bucket *b, *next;
      +    apr_off_t remain = length;
      +    apr_status_t status = APR_SUCCESS;
      +    
      +    for (b = APR_BRIGADE_FIRST(src); 
      +         b != APR_BRIGADE_SENTINEL(src);
      +         b = next) {
      +        next = APR_BUCKET_NEXT(b);
      +        
      +        if (APR_BUCKET_IS_METADATA(b)) {
      +            /* fall through */
      +        }
      +        else {
      +            if (remain == b->length) {
      +                /* fall through */
      +            }
      +            else if (remain <= 0) {
      +                return status;
      +            }
      +            else {
      +                if (b->length == ((apr_size_t)-1)) {
      +                    const char *ign;
      +                    apr_size_t ilen;
      +                    status = apr_bucket_read(b, &ign, &ilen, APR_BLOCK_READ);
      +                    if (status != APR_SUCCESS) {
      +                        return status;
      +                    }
      +                }
      +            
      +                if (remain < b->length) {
      +                    apr_bucket_split(b, remain);
      +                }
      +            }
      +        }
      +        status = apr_bucket_copy(b, &b);
      +        if (status != APR_SUCCESS) {
      +            return status;
      +        }
      +        APR_BRIGADE_INSERT_TAIL(dest, b);
      +        remain -= b->length;
      +    }
      +    return status;
      +}
      +
      +int h2_util_has_eos(apr_bucket_brigade *bb, apr_off_t len)
      +{
      +    apr_bucket *b, *end;
      +    
      +    apr_status_t status = last_not_included(bb, len, 0, 0, &end);
      +    if (status != APR_SUCCESS) {
      +        return status;
      +    }
      +    
      +    for (b = APR_BRIGADE_FIRST(bb);
      +         b != APR_BRIGADE_SENTINEL(bb) && b != end;
      +         b = APR_BUCKET_NEXT(b))
      +    {
      +        if (APR_BUCKET_IS_EOS(b)) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +apr_status_t h2_util_bb_avail(apr_bucket_brigade *bb, 
      +                              apr_off_t *plen, int *peos)
      +{
      +    apr_status_t status;
      +    apr_off_t blen = 0;
      +
      +    /* test read to determine available length */
      +    status = apr_brigade_length(bb, 1, &blen);
      +    if (status != APR_SUCCESS) {
      +        return status;
      +    }
      +    else if (blen == 0) {
      +        /* brigade without data, does it have an EOS bucket somwhere? */
      +        *plen = 0;
      +        *peos = h2_util_has_eos(bb, -1);
      +    }
      +    else {
      +        /* data in the brigade, limit the length returned. Check for EOS
      +         * bucket only if we indicate data. This is required since plen == 0
      +         * means "the whole brigade" for h2_util_hash_eos()
      +         */
      +        if (blen < *plen || *plen < 0) {
      +            *plen = blen;
      +        }
      +        *peos = h2_util_has_eos(bb, *plen);
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +apr_status_t h2_util_bb_readx(apr_bucket_brigade *bb, 
      +                              h2_util_pass_cb *cb, void *ctx, 
      +                              apr_off_t *plen, int *peos)
      +{
      +    apr_status_t status = APR_SUCCESS;
      +    int consume = (cb != NULL);
      +    apr_off_t written = 0;
      +    apr_off_t avail = *plen;
      +    apr_bucket *next, *b;
      +    
      +    /* Pass data in our brigade through the callback until the length
      +     * is satisfied or we encounter an EOS.
      +     */
      +    *peos = 0;
      +    for (b = APR_BRIGADE_FIRST(bb);
      +         (status == APR_SUCCESS) && (b != APR_BRIGADE_SENTINEL(bb));
      +         b = next) {
      +        
      +        if (APR_BUCKET_IS_METADATA(b)) {
      +            if (APR_BUCKET_IS_EOS(b)) {
      +                *peos = 1;
      +            }
      +            else {
      +                /* ignore */
      +            }
      +        }
      +        else if (avail <= 0) {
      +            break;
      +        } 
      +        else {
      +            const char *data = NULL;
      +            apr_size_t data_len;
      +            
      +            if (b->length == ((apr_size_t)-1)) {
      +                /* read to determine length */
      +                status = apr_bucket_read(b, &data, &data_len, APR_NONBLOCK_READ);
      +            }
      +            else {
      +                data_len = b->length;
      +            }
      +            
      +            if (data_len > avail) {
      +                apr_bucket_split(b, avail);
      +                data_len = (apr_size_t)avail;
      +            }
      +            
      +            if (consume) {
      +                if (!data) {
      +                    status = apr_bucket_read(b, &data, &data_len, 
      +                                             APR_NONBLOCK_READ);
      +                }
      +                if (status == APR_SUCCESS) {
      +                    status = cb(ctx, data, data_len);
      +                }
      +            }
      +            else {
      +                data_len = b->length;
      +            }
      +            avail -= data_len;
      +            written += data_len;
      +        }
      +        
      +        next = APR_BUCKET_NEXT(b);
      +        if (consume) {
      +            apr_bucket_delete(b);
      +        }
      +    }
      +    
      +    *plen = written;
      +    if (status == APR_SUCCESS && !*peos && !*plen) {
      +        return APR_EAGAIN;
      +    }
      +    return status;
      +}
      +
      +apr_size_t h2_util_bucket_print(char *buffer, apr_size_t bmax, 
      +                                apr_bucket *b, const char *sep)
      +{
      +    apr_size_t off = 0;
      +    if (sep && *sep) {
      +        off += apr_snprintf(buffer+off, bmax-off, "%s", sep);
      +    }
      +    
      +    if (APR_BUCKET_IS_METADATA(b)) {
      +        if (APR_BUCKET_IS_EOS(b)) {
      +            off += apr_snprintf(buffer+off, bmax-off, "eos");
      +        }
      +        else if (APR_BUCKET_IS_FLUSH(b)) {
      +            off += apr_snprintf(buffer+off, bmax-off, "flush");
      +        }
      +        else if (AP_BUCKET_IS_EOR(b)) {
      +            off += apr_snprintf(buffer+off, bmax-off, "eor");
      +        }
      +        else {
      +            off += apr_snprintf(buffer+off, bmax-off, "%s", b->type->name);
      +        }
      +    }
      +    else {
      +        const char *btype = b->type->name;
      +        if (APR_BUCKET_IS_FILE(b)) {
      +            btype = "file";
      +        }
      +        else if (APR_BUCKET_IS_PIPE(b)) {
      +            btype = "pipe";
      +        }
      +        else if (APR_BUCKET_IS_SOCKET(b)) {
      +            btype = "socket";
      +        }
      +        else if (APR_BUCKET_IS_HEAP(b)) {
      +            btype = "heap";
      +        }
      +        else if (APR_BUCKET_IS_TRANSIENT(b)) {
      +            btype = "transient";
      +        }
      +        else if (APR_BUCKET_IS_IMMORTAL(b)) {
      +            btype = "immortal";
      +        }
      +#if APR_HAS_MMAP
      +        else if (APR_BUCKET_IS_MMAP(b)) {
      +            btype = "mmap";
      +        }
      +#endif
      +        else if (APR_BUCKET_IS_POOL(b)) {
      +            btype = "pool";
      +        }
      +        
      +        off += apr_snprintf(buffer+off, bmax-off, "%s[%ld]", 
      +                            btype, 
      +                            (long)(b->length == ((apr_size_t)-1)? 
      +                                   -1 : b->length));
      +    }
      +    return off;
      +}
      +
      +apr_size_t h2_util_bb_print(char *buffer, apr_size_t bmax, 
      +                            const char *tag, const char *sep, 
      +                            apr_bucket_brigade *bb)
      +{
      +    apr_size_t off = 0;
      +    const char *sp = "";
      +    apr_bucket *b;
      +    
      +    if (bb) {
      +        memset(buffer, 0, bmax--);
      +        off += apr_snprintf(buffer+off, bmax-off, "%s(", tag);
      +        for (b = APR_BRIGADE_FIRST(bb); 
      +             bmax && (b != APR_BRIGADE_SENTINEL(bb));
      +             b = APR_BUCKET_NEXT(b)) {
      +            
      +            off += h2_util_bucket_print(buffer+off, bmax-off, b, sp);
      +            sp = " ";
      +        }
      +        off += apr_snprintf(buffer+off, bmax-off, ")%s", sep);
      +    }
      +    else {
      +        off += apr_snprintf(buffer+off, bmax-off, "%s(null)%s", tag, sep);
      +    }
      +    return off;
      +}
      +
      +apr_status_t h2_append_brigade(apr_bucket_brigade *to,
      +                               apr_bucket_brigade *from, 
      +                               apr_off_t *plen,
      +                               int *peos,
      +                               h2_bucket_gate *should_append)
      +{
      +    apr_bucket *e;
      +    apr_off_t len = 0, remain = *plen;
      +    apr_status_t rv;
      +
      +    *peos = 0;
      +    
      +    while (!APR_BRIGADE_EMPTY(from)) {
      +        e = APR_BRIGADE_FIRST(from);
      +        
      +        if (!should_append(e)) {
      +            goto leave;
      +        }
      +        else if (APR_BUCKET_IS_METADATA(e)) {
      +            if (APR_BUCKET_IS_EOS(e)) {
      +                *peos = 1;
      +                apr_bucket_delete(e);
      +                continue;
      +            }
      +        }
      +        else {        
      +            if (remain > 0 && e->length == ((apr_size_t)-1)) {
      +                const char *ign;
      +                apr_size_t ilen;
      +                rv = apr_bucket_read(e, &ign, &ilen, APR_BLOCK_READ);
      +                if (rv != APR_SUCCESS) {
      +                    return rv;
      +                }
      +            }
      +            
      +            if (remain < e->length) {
      +                if (remain <= 0) {
      +                    goto leave;
      +                }
      +                apr_bucket_split(e, (apr_size_t)remain);
      +            }
      +        }
      +        
      +        APR_BUCKET_REMOVE(e);
      +        APR_BRIGADE_INSERT_TAIL(to, e);
      +        len += e->length;
      +        remain -= e->length;
      +    }
      +leave:
      +    *plen = len;
      +    return APR_SUCCESS;
      +}
      +
      +apr_off_t h2_brigade_mem_size(apr_bucket_brigade *bb)
      +{
      +    apr_bucket *b;
      +    apr_off_t total = 0;
      +
      +    for (b = APR_BRIGADE_FIRST(bb);
      +         b != APR_BRIGADE_SENTINEL(bb);
      +         b = APR_BUCKET_NEXT(b))
      +    {
      +        total += sizeof(*b);
      +        if (b->length > 0) {
      +            if (APR_BUCKET_IS_HEAP(b)
      +                || APR_BUCKET_IS_POOL(b)) {
      +                total += b->length;
      +            }
      +        }
      +    }
      +    return total;
      +}
      +
      +
      +/*******************************************************************************
      + * h2_ngheader
      + ******************************************************************************/
      + 
      +int h2_util_ignore_header(const char *name) 
      +{
      +    /* never forward, ch. 8.1.2.2 */
      +    return (H2_HD_MATCH_LIT_CS("connection", name)
      +            || H2_HD_MATCH_LIT_CS("proxy-connection", name)
      +            || H2_HD_MATCH_LIT_CS("upgrade", name)
      +            || H2_HD_MATCH_LIT_CS("keep-alive", name)
      +            || H2_HD_MATCH_LIT_CS("transfer-encoding", name));
      +}
      +
      +static int count_header(void *ctx, const char *key, const char *value)
      +{
      +    if (!h2_util_ignore_header(key)) {
      +        (*((size_t*)ctx))++;
      +    }
      +    return 1;
      +}
      +
      +#define NV_ADD_LIT_CS(nv, k, v)     add_header(nv, k, sizeof(k) - 1, v, strlen(v))
      +#define NV_ADD_CS_CS(nv, k, v)      add_header(nv, k, strlen(k), v, strlen(v))
      +
      +static int add_header(h2_ngheader *ngh, 
      +                      const char *key, size_t key_len,
      +                      const char *value, size_t val_len)
      +{
      +    nghttp2_nv *nv = &ngh->nv[ngh->nvlen++];
      +    
      +    nv->name = (uint8_t*)key;
      +    nv->namelen = key_len;
      +    nv->value = (uint8_t*)value;
      +    nv->valuelen = val_len;
      +    return 1;
      +}
      +
      +static int add_table_header(void *ctx, const char *key, const char *value)
      +{
      +    if (!h2_util_ignore_header(key)) {
      +        add_header(ctx, key, strlen(key), value, strlen(value));
      +    }
      +    return 1;
      +}
      +
      +
      +h2_ngheader *h2_util_ngheader_make(apr_pool_t *p, apr_table_t *header)
      +{
      +    h2_ngheader *ngh;
      +    size_t n;
      +    
      +    n = 0;
      +    apr_table_do(count_header, &n, header, NULL);
      +    
      +    ngh = apr_pcalloc(p, sizeof(h2_ngheader));
      +    ngh->nv =  apr_pcalloc(p, n * sizeof(nghttp2_nv));
      +    apr_table_do(add_table_header, ngh, header, NULL);
      +
      +    return ngh;
      +}
      +
      +h2_ngheader *h2_util_ngheader_make_res(apr_pool_t *p, 
      +                                       int http_status, 
      +                                       apr_table_t *header)
      +{
      +    h2_ngheader *ngh;
      +    size_t n;
      +    
      +    n = 1;
      +    apr_table_do(count_header, &n, header, NULL);
      +    
      +    ngh = apr_pcalloc(p, sizeof(h2_ngheader));
      +    ngh->nv =  apr_pcalloc(p, n * sizeof(nghttp2_nv));
      +    NV_ADD_LIT_CS(ngh, ":status", apr_psprintf(p, "%d", http_status));
      +    apr_table_do(add_table_header, ngh, header, NULL);
      +
      +    return ngh;
      +}
      +
      +h2_ngheader *h2_util_ngheader_make_req(apr_pool_t *p, 
      +                                       const struct h2_request *req)
      +{
      +    
      +    h2_ngheader *ngh;
      +    size_t n;
      +    
      +    ap_assert(req);
      +    ap_assert(req->scheme);
      +    ap_assert(req->authority);
      +    ap_assert(req->path);
      +    ap_assert(req->method);
      +
      +    n = 4;
      +    apr_table_do(count_header, &n, req->headers, NULL);
      +    
      +    ngh = apr_pcalloc(p, sizeof(h2_ngheader));
      +    ngh->nv =  apr_pcalloc(p, n * sizeof(nghttp2_nv));
      +    NV_ADD_LIT_CS(ngh, ":scheme", req->scheme);
      +    NV_ADD_LIT_CS(ngh, ":authority", req->authority);
      +    NV_ADD_LIT_CS(ngh, ":path", req->path);
      +    NV_ADD_LIT_CS(ngh, ":method", req->method);
      +    apr_table_do(add_table_header, ngh, req->headers, NULL);
      +
      +    return ngh;
      +}
      +
      +/*******************************************************************************
      + * header HTTP/1 <-> HTTP/2 conversions
      + ******************************************************************************/
      + 
      +
      +typedef struct {
      +    const char *name;
      +    size_t len;
      +} literal;
      +
      +#define H2_DEF_LITERAL(n)   { (n), (sizeof(n)-1) }
      +#define H2_LIT_ARGS(a)      (a),H2_ALEN(a)
      +
      +static literal IgnoredRequestHeaders[] = {
      +/*H2_DEF_LITERAL("expect"),*/
      +    H2_DEF_LITERAL("upgrade"),
      +    H2_DEF_LITERAL("connection"),
      +    H2_DEF_LITERAL("keep-alive"),
      +    H2_DEF_LITERAL("http2-settings"),
      +    H2_DEF_LITERAL("proxy-connection"),
      +    H2_DEF_LITERAL("transfer-encoding"),
      +};
      +static literal IgnoredRequestTrailers[] = { /* Ignore, see rfc7230, ch. 4.1.2 */
      +    H2_DEF_LITERAL("te"),
      +    H2_DEF_LITERAL("host"),
      +    H2_DEF_LITERAL("range"),
      +    H2_DEF_LITERAL("cookie"),
      +    H2_DEF_LITERAL("expect"),
      +    H2_DEF_LITERAL("pragma"),
      +    H2_DEF_LITERAL("max-forwards"),
      +    H2_DEF_LITERAL("cache-control"),
      +    H2_DEF_LITERAL("authorization"),
      +    H2_DEF_LITERAL("content-length"),       
      +    H2_DEF_LITERAL("proxy-authorization"),
      +};    
      +static literal IgnoredResponseTrailers[] = {
      +    H2_DEF_LITERAL("age"),
      +    H2_DEF_LITERAL("date"),
      +    H2_DEF_LITERAL("vary"),
      +    H2_DEF_LITERAL("cookie"),
      +    H2_DEF_LITERAL("expires"),
      +    H2_DEF_LITERAL("warning"),
      +    H2_DEF_LITERAL("location"),
      +    H2_DEF_LITERAL("retry-after"),
      +    H2_DEF_LITERAL("cache-control"),
      +    H2_DEF_LITERAL("www-authenticate"),
      +    H2_DEF_LITERAL("proxy-authenticate"),
      +};
      +
      +static int ignore_header(const literal *lits, size_t llen,
      +                         const char *name, size_t nlen)
      +{
      +    const literal *lit;
      +    size_t i;
      +    
      +    for (i = 0; i < llen; ++i) {
      +        lit = &lits[i];
      +        if (lit->len == nlen && !apr_strnatcasecmp(lit->name, name)) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +int h2_req_ignore_header(const char *name, size_t len)
      +{
      +    return ignore_header(H2_LIT_ARGS(IgnoredRequestHeaders), name, len);
      +}
      +
      +int h2_req_ignore_trailer(const char *name, size_t len)
      +{
      +    return (h2_req_ignore_header(name, len) 
      +            || ignore_header(H2_LIT_ARGS(IgnoredRequestTrailers), name, len));
      +}
      +
      +int h2_res_ignore_trailer(const char *name, size_t len)
      +{
      +    return ignore_header(H2_LIT_ARGS(IgnoredResponseTrailers), name, len);
      +}
      +
      +apr_status_t h2_headers_add_h1(apr_table_t *headers, apr_pool_t *pool, 
      +                               const char *name, size_t nlen,
      +                               const char *value, size_t vlen)
      +{
      +    char *hname, *hvalue;
      +    
      +    if (h2_req_ignore_header(name, nlen)) {
      +        return APR_SUCCESS;
      +    }
      +    else if (H2_HD_MATCH_LIT("cookie", name, nlen)) {
      +        const char *existing = apr_table_get(headers, "cookie");
      +        if (existing) {
      +            char *nval;
      +            
      +            /* Cookie header come separately in HTTP/2, but need
      +             * to be merged by "; " (instead of default ", ")
      +             */
      +            hvalue = apr_pstrndup(pool, value, vlen);
      +            nval = apr_psprintf(pool, "%s; %s", existing, hvalue);
      +            apr_table_setn(headers, "Cookie", nval);
      +            return APR_SUCCESS;
      +        }
      +    }
      +    else if (H2_HD_MATCH_LIT("host", name, nlen)) {
      +        if (apr_table_get(headers, "Host")) {
      +            return APR_SUCCESS; /* ignore duplicate */
      +        }
      +    }
      +    
      +    hname = apr_pstrndup(pool, name, nlen);
      +    hvalue = apr_pstrndup(pool, value, vlen);
      +    h2_util_camel_case_header(hname, nlen);
      +    apr_table_mergen(headers, hname, hvalue);
      +    
      +    return APR_SUCCESS;
      +}
      +
      +/*******************************************************************************
      + * h2 request handling
      + ******************************************************************************/
      +
      +h2_request *h2_req_create(int id, apr_pool_t *pool, const char *method, 
      +                          const char *scheme, const char *authority, 
      +                          const char *path, apr_table_t *header, int serialize)
      +{
      +    h2_request *req = apr_pcalloc(pool, sizeof(h2_request));
      +    
      +    req->method         = method;
      +    req->scheme         = scheme;
      +    req->authority      = authority;
      +    req->path           = path;
      +    req->headers        = header? header : apr_table_make(pool, 10);
      +    req->request_time   = apr_time_now();
      +    req->serialize      = serialize;
      +    
      +    return req;
      +}
      +
      +/*******************************************************************************
      + * frame logging
      + ******************************************************************************/
      +
      +int h2_util_frame_print(const nghttp2_frame *frame, char *buffer, size_t maxlen)
      +{
      +    char scratch[128];
      +    size_t s_len = sizeof(scratch)/sizeof(scratch[0]);
      +    
      +    switch (frame->hd.type) {
      +        case NGHTTP2_DATA: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "DATA[length=%d, flags=%d, stream=%d, padlen=%d]",
      +                                (int)frame->hd.length, frame->hd.flags,
      +                                frame->hd.stream_id, (int)frame->data.padlen);
      +        }
      +        case NGHTTP2_HEADERS: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "HEADERS[length=%d, hend=%d, stream=%d, eos=%d]",
      +                                (int)frame->hd.length,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS),
      +                                frame->hd.stream_id,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_STREAM));
      +        }
      +        case NGHTTP2_PRIORITY: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PRIORITY[length=%d, flags=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_RST_STREAM: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "RST_STREAM[length=%d, flags=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_SETTINGS: {
      +            if (frame->hd.flags & NGHTTP2_FLAG_ACK) {
      +                return apr_snprintf(buffer, maxlen,
      +                                    "SETTINGS[ack=1, stream=%d]",
      +                                    frame->hd.stream_id);
      +            }
      +            return apr_snprintf(buffer, maxlen,
      +                                "SETTINGS[length=%d, stream=%d]",
      +                                (int)frame->hd.length, frame->hd.stream_id);
      +        }
      +        case NGHTTP2_PUSH_PROMISE: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PUSH_PROMISE[length=%d, hend=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                !!(frame->hd.flags & NGHTTP2_FLAG_END_HEADERS),
      +                                frame->hd.stream_id);
      +        }
      +        case NGHTTP2_PING: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "PING[length=%d, ack=%d, stream=%d]",
      +                                (int)frame->hd.length,
      +                                frame->hd.flags&NGHTTP2_FLAG_ACK,
      +                                frame->hd.stream_id);
      +        }
      +        case NGHTTP2_GOAWAY: {
      +            size_t len = (frame->goaway.opaque_data_len < s_len)?
      +                frame->goaway.opaque_data_len : s_len-1;
      +            memcpy(scratch, frame->goaway.opaque_data, len);
      +            scratch[len] = '\0';
      +            return apr_snprintf(buffer, maxlen, "GOAWAY[error=%d, reason='%s', "
      +                                "last_stream=%d]", frame->goaway.error_code, 
      +                                scratch, frame->goaway.last_stream_id);
      +        }
      +        case NGHTTP2_WINDOW_UPDATE: {
      +            return apr_snprintf(buffer, maxlen,
      +                                "WINDOW_UPDATE[stream=%d, incr=%d]",
      +                                frame->hd.stream_id, 
      +                                frame->window_update.window_size_increment);
      +        }
      +        default:
      +            return apr_snprintf(buffer, maxlen,
      +                                "type=%d[length=%d, flags=%d, stream=%d]",
      +                                frame->hd.type, (int)frame->hd.length,
      +                                frame->hd.flags, frame->hd.stream_id);
      +    }
      +}
      +
      +/*******************************************************************************
      + * push policy
      + ******************************************************************************/
      +int h2_push_policy_determine(apr_table_t *headers, apr_pool_t *p, int push_enabled)
      +{
      +    h2_push_policy policy = H2_PUSH_NONE;
      +    if (push_enabled) {
      +        const char *val = apr_table_get(headers, "accept-push-policy");
      +        if (val) {
      +            if (ap_find_token(p, val, "fast-load")) {
      +                policy = H2_PUSH_FAST_LOAD;
      +            }
      +            else if (ap_find_token(p, val, "head")) {
      +                policy = H2_PUSH_HEAD;
      +            }
      +            else if (ap_find_token(p, val, "default")) {
      +                policy = H2_PUSH_DEFAULT;
      +            }
      +            else if (ap_find_token(p, val, "none")) {
      +                policy = H2_PUSH_NONE;
      +            }
      +            else {
      +                /* nothing known found in this header, go by default */
      +                policy = H2_PUSH_DEFAULT;
      +            }
      +        }
      +        else {
      +            policy = H2_PUSH_DEFAULT;
      +        }
      +    }
      +    return policy;
      +}
      +
      diff --git a/modules/http2/h2_util.h b/modules/http2/h2_util.h
      new file mode 100644
      index 00000000000..7b925534457
      --- /dev/null
      +++ b/modules/http2/h2_util.h
      @@ -0,0 +1,412 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_util__
      +#define __mod_h2__h2_util__
      +
      +#include <nghttp2/nghttp2.h>
      +
      +/*******************************************************************************
      + * some debugging/format helpers
      + ******************************************************************************/
      +struct h2_request;
      +struct nghttp2_frame;
      +
      +size_t h2_util_hex_dump(char *buffer, size_t maxlen,
      +                        const char *data, size_t datalen);
      +
      +size_t h2_util_header_print(char *buffer, size_t maxlen,
      +                            const char *name, size_t namelen,
      +                            const char *value, size_t valuelen);
      +
      +void h2_util_camel_case_header(char *s, size_t len);
      +
      +int h2_util_frame_print(const nghttp2_frame *frame, char *buffer, size_t maxlen);
      +
      +/*******************************************************************************
      + * ihash - hash for structs with int identifier
      + ******************************************************************************/
      +typedef struct h2_ihash_t h2_ihash_t;
      +typedef int h2_ihash_iter_t(void *ctx, void *val);
      +
      +/**
      + * Create a hash for structures that have an identifying int member.
      + * @param pool the pool to use
      + * @param offset_of_int the offsetof() the int member in the struct
      + */
      +h2_ihash_t *h2_ihash_create(apr_pool_t *pool, size_t offset_of_int);
      +
      +size_t h2_ihash_count(h2_ihash_t *ih);
      +int h2_ihash_empty(h2_ihash_t *ih);
      +void *h2_ihash_get(h2_ihash_t *ih, int id);
      +
      +/**
      + * Iterate over the hash members (without defined order) and invoke
      + * fn for each member until 0 is returned.
      + * @param ih the hash to iterate over
      + * @param fn the function to invoke on each member
      + * @param ctx user supplied data passed into each iteration call
      + * @return 0 if one iteration returned 0, otherwise != 0
      + */
      +int h2_ihash_iter(h2_ihash_t *ih, h2_ihash_iter_t *fn, void *ctx);
      +
      +void h2_ihash_add(h2_ihash_t *ih, void *val);
      +void h2_ihash_remove(h2_ihash_t *ih, int id);
      +void h2_ihash_remove_val(h2_ihash_t *ih, void *val);
      +void h2_ihash_clear(h2_ihash_t *ih);
      +
      +size_t h2_ihash_shift(h2_ihash_t *ih, void **buffer, size_t max);
      +size_t h2_ihash_ishift(h2_ihash_t *ih, int *buffer, size_t max);
      +
      +/*******************************************************************************
      + * iqueue - sorted list of int with user defined ordering
      + ******************************************************************************/
      +typedef struct h2_iqueue {
      +    int *elts;
      +    int head;
      +    int nelts;
      +    int nalloc;
      +    apr_pool_t *pool;
      +} h2_iqueue;
      +
      +/**
      + * Comparator for two int to determine their order.
      + *
      + * @param i1 first int to compare
      + * @param i2 second int to compare
      + * @param ctx provided user data
      + * @return value is the same as for strcmp() and has the effect:
      + *    == 0: s1 and s2 are treated equal in ordering
      + *     < 0: s1 should be sorted before s2
      + *     > 0: s2 should be sorted before s1
      + */
      +typedef int h2_iq_cmp(int i1, int i2, void *ctx);
      +
      +/**
      + * Allocate a new queue from the pool and initialize.
      + * @param id the identifier of the queue
      + * @param pool the memory pool
      + */
      +h2_iqueue *h2_iq_create(apr_pool_t *pool, int capacity);
      +
      +/**
      + * Return != 0 iff there are no tasks in the queue.
      + * @param q the queue to check
      + */
      +int h2_iq_empty(h2_iqueue *q);
      +
      +/**
      + * Return the number of int in the queue.
      + * @param q the queue to get size on
      + */
      +int h2_iq_count(h2_iqueue *q);
      +
      +/**
      + * Add a stream id to the queue. 
      + *
      + * @param q the queue to append the id to
      + * @param sid the stream id to add
      + * @param cmp the comparator for sorting
      + * @param ctx user data for comparator 
      + */
      +void h2_iq_add(h2_iqueue *q, int sid, h2_iq_cmp *cmp, void *ctx);
      +
      +/**
      + * Append the id to the queue if not already present. 
      + *
      + * @param q the queue to append the id to
      + * @param sid the id to append
      + */
      +void h2_iq_append(h2_iqueue *q, int sid);
      +
      +/**
      + * Remove the stream id from the queue. Return != 0 iff task
      + * was found in queue.
      + * @param q the task queue
      + * @param sid the stream id to remove
      + * @return != 0 iff task was found in queue
      + */
      +int h2_iq_remove(h2_iqueue *q, int sid);
      +
      +/**
      + * Remove all entries in the queue.
      + */
      +void h2_iq_clear(h2_iqueue *q);
      +
      +/**
      + * Sort the stream idqueue again. Call if the task ordering
      + * has changed.
      + *
      + * @param q the queue to sort
      + * @param cmp the comparator for sorting
      + * @param ctx user data for the comparator 
      + */
      +void h2_iq_sort(h2_iqueue *q, h2_iq_cmp *cmp, void *ctx);
      +
      +/**
      + * Get the first id from the queue or 0 if the queue is empty. 
      + * The id is being removed.
      + *
      + * @param q the queue to get the first id from
      + * @return the first id of the queue, 0 if empty
      + */
      +int h2_iq_shift(h2_iqueue *q);
      +
      +/**
      + * Get the first max ids from the queue. All these ids will be removed.
      + *
      + * @param q the queue to get the first task from
      + * @param pint the int array to receive the values
      + * @param max the maximum number of ids to shift
      + * @return the actual number of ids shifted
      + */
      +size_t h2_iq_mshift(h2_iqueue *q, int *pint, size_t max);
      +
      +/**
      + * Determine if int is in the queue already
      + *
      + * @parm q the queue
      + * @param sid the integer id to check for
      + * @return != 0 iff sid is already in the queue
      + */
      +int h2_iq_contains(h2_iqueue *q, int sid);
      +
      +/*******************************************************************************
      + * common helpers
      + ******************************************************************************/
      +/* h2_log2(n) iff n is a power of 2 */
      +unsigned char h2_log2(int n);
      +
      +/**
      + * Count the bytes that all key/value pairs in a table have
      + * in length (exlucding terminating 0s), plus additional extra per pair.
      + *
      + * @param t the table to inspect
      + * @param pair_extra the extra amount to add per pair
      + * @return the number of bytes all key/value pairs have
      + */
      +apr_size_t h2_util_table_bytes(apr_table_t *t, apr_size_t pair_extra);
      +
      +/**
      + * Return != 0 iff the string s contains the token, as specified in
      + * HTTP header syntax, rfc7230.
      + */
      +int h2_util_contains_token(apr_pool_t *pool, const char *s, const char *token);
      +
      +const char *h2_util_first_token_match(apr_pool_t *pool, const char *s, 
      +                                      const char *tokens[], apr_size_t len);
      +
      +/** Match a header value against a string constance, case insensitive */
      +#define H2_HD_MATCH_LIT(l, name, nlen)  \
      +    ((nlen == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
      +
      +/*******************************************************************************
      + * HTTP/2 header helpers
      + ******************************************************************************/
      +int h2_req_ignore_header(const char *name, size_t len);
      +int h2_req_ignore_trailer(const char *name, size_t len);
      +int h2_res_ignore_trailer(const char *name, size_t len);
      +
      +/**
      + * Set the push policy for the given request. Takes request headers into 
      + * account, see draft https://tools.ietf.org/html/draft-ruellan-http-accept-push-policy-00
      + * for details.
      + * 
      + * @param headers the http headers to inspect
      + * @param p the pool to use
      + * @param push_enabled if HTTP/2 server push is generally enabled for this request
      + * @return the push policy desired
      + */
      +int h2_push_policy_determine(apr_table_t *headers, apr_pool_t *p, int push_enabled);
      +
      +/*******************************************************************************
      + * base64 url encoding, different table from normal base64
      + ******************************************************************************/
      +/**
      + * I always wanted to write my own base64url decoder...not. See 
      + * https://tools.ietf.org/html/rfc4648#section-5 for description.
      + */
      +apr_size_t h2_util_base64url_decode(const char **decoded, 
      +                                    const char *encoded, 
      +                                    apr_pool_t *pool);
      +const char *h2_util_base64url_encode(const char *data, 
      +                                     apr_size_t len, apr_pool_t *pool);
      +
      +/*******************************************************************************
      + * nghttp2 helpers
      + ******************************************************************************/
      +
      +#define H2_HD_MATCH_LIT_CS(l, name)  \
      +    ((strlen(name) == sizeof(l) - 1) && !apr_strnatcasecmp(l, name))
      +
      +#define H2_CREATE_NV_LIT_CS(nv, NAME, VALUE) nv->name = (uint8_t *)NAME;      \
      +                                             nv->namelen = sizeof(NAME) - 1;  \
      +                                             nv->value = (uint8_t *)VALUE;    \
      +                                             nv->valuelen = strlen(VALUE)
      +
      +#define H2_CREATE_NV_CS_LIT(nv, NAME, VALUE) nv->name = (uint8_t *)NAME;      \
      +                                             nv->namelen = strlen(NAME);      \
      +                                             nv->value = (uint8_t *)VALUE;    \
      +                                             nv->valuelen = sizeof(VALUE) - 1
      +
      +#define H2_CREATE_NV_CS_CS(nv, NAME, VALUE) nv->name = (uint8_t *)NAME;       \
      +                                            nv->namelen = strlen(NAME);       \
      +                                            nv->value = (uint8_t *)VALUE;     \
      +                                            nv->valuelen = strlen(VALUE)
      +
      +int h2_util_ignore_header(const char *name);
      +
      +typedef struct h2_ngheader {
      +    nghttp2_nv *nv;
      +    apr_size_t nvlen;
      +} h2_ngheader;
      +
      +h2_ngheader *h2_util_ngheader_make(apr_pool_t *p, apr_table_t *header);
      +h2_ngheader *h2_util_ngheader_make_res(apr_pool_t *p, 
      +                                       int http_status, 
      +                                       apr_table_t *header);
      +h2_ngheader *h2_util_ngheader_make_req(apr_pool_t *p, 
      +                                       const struct h2_request *req);
      +
      +apr_status_t h2_headers_add_h1(apr_table_t *headers, apr_pool_t *pool, 
      +                               const char *name, size_t nlen,
      +                               const char *value, size_t vlen);
      +
      +/*******************************************************************************
      + * h2_request helpers
      + ******************************************************************************/
      +
      +struct h2_request *h2_req_create(int id, apr_pool_t *pool, const char *method, 
      +                                 const char *scheme, const char *authority, 
      +                                 const char *path, apr_table_t *header,
      +                                 int serialize);
      +
      +/*******************************************************************************
      + * apr brigade helpers
      + ******************************************************************************/
      +
      +/**
      + * Concatenate at most length bytes from src to dest brigade, splitting
      + * buckets if necessary and reading buckets of indeterminate length.
      + */
      +apr_status_t h2_brigade_concat_length(apr_bucket_brigade *dest, 
      +                                      apr_bucket_brigade *src,
      +                                      apr_off_t length);
      +                                
      +/**
      + * Copy at most length bytes from src to dest brigade, splitting
      + * buckets if necessary and reading buckets of indeterminate length.
      + */
      +apr_status_t h2_brigade_copy_length(apr_bucket_brigade *dest, 
      +                                    apr_bucket_brigade *src,
      +                                    apr_off_t length);
      +                                
      +/**
      + * Return != 0 iff there is a FLUSH or EOS bucket in the brigade.
      + * @param bb the brigade to check on
      + * @return != 0 iff brigade holds FLUSH or EOS bucket (or both)
      + */
      +int h2_util_has_eos(apr_bucket_brigade *bb, apr_off_t len);
      +
      +/**
      + * Check how many bytes of the desired amount are available and if the
      + * end of stream is reached by that amount.
      + * @param bb the brigade to check
      + * @param plen the desired length and, on return, the available length
      + * @param on return, if eos has been reached
      + */
      +apr_status_t h2_util_bb_avail(apr_bucket_brigade *bb, 
      +                              apr_off_t *plen, int *peos);
      +
      +typedef apr_status_t h2_util_pass_cb(void *ctx, 
      +                                     const char *data, apr_off_t len);
      +
      +/**
      + * Read at most *plen bytes from the brigade and pass them into the
      + * given callback. If cb is NULL, just return the amount of data that
      + * could have been read.
      + * If an EOS was/would be encountered, set *peos != 0.
      + * @param bb the brigade to read from
      + * @param cb the callback to invoke for the read data
      + * @param ctx optional data passed to callback
      + * @param plen inout, as input gives the maximum number of bytes to read,
      + *    on return specifies the actual/would be number of bytes
      + * @param peos != 0 iff an EOS bucket was/would be encountered.
      + */
      +apr_status_t h2_util_bb_readx(apr_bucket_brigade *bb, 
      +                              h2_util_pass_cb *cb, void *ctx, 
      +                              apr_off_t *plen, int *peos);
      +
      +/**
      + * Print a bucket's meta data (type and length) to the buffer.
      + * @return number of characters printed
      + */
      +apr_size_t h2_util_bucket_print(char *buffer, apr_size_t bmax, 
      +                                apr_bucket *b, const char *sep);
      +                                
      +/**
      + * Prints the brigade bucket types and lengths into the given buffer
      + * up to bmax.
      + * @return number of characters printed
      + */
      +apr_size_t h2_util_bb_print(char *buffer, apr_size_t bmax, 
      +                            const char *tag, const char *sep, 
      +                            apr_bucket_brigade *bb);
      +/**
      + * Logs the bucket brigade (which bucket types with what length)
      + * to the log at the given level.
      + * @param c the connection to log for
      + * @param sid the stream identifier this brigade belongs to
      + * @param level the log level (as in APLOG_*)
      + * @param tag a short message text about the context
      + * @param bb the brigade to log
      + */
      +#define h2_util_bb_log(c, sid, level, tag, bb) \
      +do { \
      +    char buffer[4 * 1024]; \
      +    const char *line = "(null)"; \
      +    apr_size_t len, bmax = sizeof(buffer)/sizeof(buffer[0]); \
      +    len = h2_util_bb_print(buffer, bmax, (tag), "", (bb)); \
      +    ap_log_cerror(APLOG_MARK, level, 0, (c), "bb_dump(%s): %s", \
      +        (c)->log_id, (len? buffer : line)); \
      +} while(0)
      +
      +
      +typedef int h2_bucket_gate(apr_bucket *b);
      +/**
      + * Transfer buckets from one brigade to another with a limit on the 
      + * maximum amount of bytes transferred. Does no setaside magic, lifetime
      + * of brigades must fit. 
      + * @param to   brigade to transfer buckets to
      + * @param from brigades to remove buckets from
      + * @param plen maximum bytes to transfer, actual bytes transferred
      + * @param peos if an EOS bucket was transferred
      + */
      +apr_status_t h2_append_brigade(apr_bucket_brigade *to,
      +                               apr_bucket_brigade *from, 
      +                               apr_off_t *plen,
      +                               int *peos,
      +                               h2_bucket_gate *should_append);
      +
      +/**
      + * Get an approximnation of the memory footprint of the given
      + * brigade. This varies from apr_brigade_length as
      + * - no buckets are ever read
      + * - only buckets known to allocate memory (HEAP+POOL) are counted
      + * - the bucket struct itself is counted
      + */
      +apr_off_t h2_brigade_mem_size(apr_bucket_brigade *bb);
      +
      +#endif /* defined(__mod_h2__h2_util__) */
      diff --git a/modules/http2/h2_version.h b/modules/http2/h2_version.h
      new file mode 100644
      index 00000000000..b29a1160283
      --- /dev/null
      +++ b/modules/http2/h2_version.h
      @@ -0,0 +1,40 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      +*
      +* Licensed under the Apache License, Version 2.0 (the "License");
      +* you may not use this file except in compliance with the License.
      +* You may obtain a copy of the License at
      +*
      +* http://www.apache.org/licenses/LICENSE-2.0
      +
      +* Unless required by applicable law or agreed to in writing, software
      +* distributed under the License is distributed on an "AS IS" BASIS,
      +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      +* See the License for the specific language governing permissions and
      +* limitations under the License.
      +*/
      +
      +#ifndef mod_h2_h2_version_h
      +#define mod_h2_h2_version_h
      +
      +#undef PACKAGE_VERSION
      +#undef PACKAGE_TARNAME
      +#undef PACKAGE_STRING
      +#undef PACKAGE_NAME
      +#undef PACKAGE_BUGREPORT
      +
      +/**
      + * @macro
      + * Version number of the http2 module as c string
      + */
      +#define MOD_HTTP2_VERSION "1.8.5"
      +
      +/**
      + * @macro
      + * Numerical representation of the version number of the http2 module
      + * release. This is a 24 bit number with 8 bits for major number, 8 bits
      + * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
      + */
      +#define MOD_HTTP2_VERSION_NUM 0x010805
      +
      +
      +#endif /* mod_h2_h2_version_h */
      diff --git a/modules/http2/h2_worker.c b/modules/http2/h2_worker.c
      new file mode 100644
      index 00000000000..84e8f989ebd
      --- /dev/null
      +++ b/modules/http2/h2_worker.c
      @@ -0,0 +1,103 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +
      +#include <apr_thread_cond.h>
      +
      +#include <mpm_common.h>
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +
      +#include "h2.h"
      +#include "h2_private.h"
      +#include "h2_conn.h"
      +#include "h2_ctx.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_task.h"
      +#include "h2_worker.h"
      +
      +static void* APR_THREAD_FUNC execute(apr_thread_t *thread, void *wctx)
      +{
      +    h2_worker *worker = (h2_worker *)wctx;
      +    int sticky;
      +    
      +    while (!worker->aborted) {
      +        h2_task *task;
      +        
      +        /* Get a h2_task from the main workers queue. */
      +        worker->get_next(worker, worker->ctx, &task, &sticky);
      +        while (task) {
      +        
      +            h2_task_do(task, thread, worker->id);
      +            /* report the task done and maybe get another one from the same
      +             * mplx (= master connection), if we can be sticky. 
      +             */
      +            if (sticky && !worker->aborted) {
      +                h2_mplx_task_done(task->mplx, task, &task);
      +            }
      +            else {
      +                h2_mplx_task_done(task->mplx, task, NULL);
      +                task = NULL;
      +            }
      +        }
      +    }
      +
      +    worker->worker_done(worker, worker->ctx);
      +    return NULL;
      +}
      +
      +h2_worker *h2_worker_create(int id,
      +                            apr_pool_t *pool,
      +                            apr_threadattr_t *attr,
      +                            h2_worker_mplx_next_fn *get_next,
      +                            h2_worker_done_fn *worker_done,
      +                            void *ctx)
      +{
      +    h2_worker *w = apr_pcalloc(pool, sizeof(h2_worker));
      +    if (w) {
      +        w->id = id;
      +        APR_RING_ELEM_INIT(w, link);
      +        w->get_next = get_next;
      +        w->worker_done = worker_done;
      +        w->ctx = ctx;
      +        apr_thread_create(&w->thread, attr, execute, w, pool);
      +    }
      +    return w;
      +}
      +
      +apr_status_t h2_worker_destroy(h2_worker *worker)
      +{
      +    if (worker->thread) {
      +        apr_status_t status;
      +        apr_thread_join(&status, worker->thread);
      +        worker->thread = NULL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +void h2_worker_abort(h2_worker *worker)
      +{
      +    worker->aborted = 1;
      +}
      +
      +int h2_worker_is_aborted(h2_worker *worker)
      +{
      +    return worker->aborted;
      +}
      +
      +
      diff --git a/modules/http2/h2_worker.h b/modules/http2/h2_worker.h
      new file mode 100644
      index 00000000000..04ff5703616
      --- /dev/null
      +++ b/modules/http2/h2_worker.h
      @@ -0,0 +1,135 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_worker__
      +#define __mod_h2__h2_worker__
      +
      +struct h2_mplx;
      +struct h2_request;
      +struct h2_task;
      +
      +/* h2_worker is a basically a apr_thread_t that reads fromt he h2_workers
      + * task queue and runs h2_tasks it is given.
      + */
      +typedef struct h2_worker h2_worker;
      +
      +/* Invoked when the worker wants a new task to process. Will block
      + * until a h2_mplx becomes available or the worker itself
      + * gets aborted (idle timeout, for example). */
      +typedef apr_status_t h2_worker_mplx_next_fn(h2_worker *worker,
      +                                            void *ctx,
      +                                            struct h2_task **ptask,
      +                                            int *psticky);
      +
      +/* Invoked just before the worker thread exits. */
      +typedef void h2_worker_done_fn(h2_worker *worker, void *ctx);
      +
      +
      +struct h2_worker {
      +    int id;
      +    /** Links to the rest of the workers */
      +    APR_RING_ENTRY(h2_worker) link;
      +    apr_thread_t *thread;
      +    h2_worker_mplx_next_fn *get_next;
      +    h2_worker_done_fn *worker_done;
      +    void *ctx;
      +    int aborted;
      +};
      +
      +/**
      + * The magic pointer value that indicates the head of a h2_worker list
      + * @param  b The worker list
      + * @return The magic pointer value
      + */
      +#define H2_WORKER_LIST_SENTINEL(b)	APR_RING_SENTINEL((b), h2_worker, link)
      +
      +/**
      + * Determine if the worker list is empty
      + * @param b The list to check
      + * @return true or false
      + */
      +#define H2_WORKER_LIST_EMPTY(b)	APR_RING_EMPTY((b), h2_worker, link)
      +
      +/**
      + * Return the first worker in a list
      + * @param b The list to query
      + * @return The first worker in the list
      + */
      +#define H2_WORKER_LIST_FIRST(b)	APR_RING_FIRST(b)
      +
      +/**
      + * Return the last worker in a list
      + * @param b The list to query
      + * @return The last worker int he list
      + */
      +#define H2_WORKER_LIST_LAST(b)	APR_RING_LAST(b)
      +
      +/**
      + * Insert a single worker at the front of a list
      + * @param b The list to add to
      + * @param e The worker to insert
      + */
      +#define H2_WORKER_LIST_INSERT_HEAD(b, e) do {				\
      +	h2_worker *ap__b = (e);                                        \
      +	APR_RING_INSERT_HEAD((b), ap__b, h2_worker, link);	\
      +    } while (0)
      +
      +/**
      + * Insert a single worker at the end of a list
      + * @param b The list to add to
      + * @param e The worker to insert
      + */
      +#define H2_WORKER_LIST_INSERT_TAIL(b, e) do {				\
      +	h2_worker *ap__b = (e);					\
      +	APR_RING_INSERT_TAIL((b), ap__b, h2_worker, link);	\
      +    } while (0)
      +
      +/**
      + * Get the next worker in the list
      + * @param e The current worker
      + * @return The next worker
      + */
      +#define H2_WORKER_NEXT(e)	APR_RING_NEXT((e), link)
      +/**
      + * Get the previous worker in the list
      + * @param e The current worker
      + * @return The previous worker
      + */
      +#define H2_WORKER_PREV(e)	APR_RING_PREV((e), link)
      +
      +/**
      + * Remove a worker from its list
      + * @param e The worker to remove
      + */
      +#define H2_WORKER_REMOVE(e)	APR_RING_REMOVE((e), link)
      +
      +
      +/* Create a new worker with given id, pool and attributes, callbacks
      + * callback parameter.
      + */
      +h2_worker *h2_worker_create(int id,
      +                            apr_pool_t *pool,
      +                            apr_threadattr_t *attr,
      +                            h2_worker_mplx_next_fn *get_next,
      +                            h2_worker_done_fn *worker_done,
      +                            void *ctx);
      +
      +apr_status_t h2_worker_destroy(h2_worker *worker);
      +
      +void h2_worker_abort(h2_worker *worker);
      +
      +int h2_worker_is_aborted(h2_worker *worker);
      +
      +#endif /* defined(__mod_h2__h2_worker__) */
      diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c
      new file mode 100644
      index 00000000000..1dcfb2fcd75
      --- /dev/null
      +++ b/modules/http2/h2_workers.c
      @@ -0,0 +1,416 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <assert.h>
      +#include <apr_atomic.h>
      +#include <apr_thread_mutex.h>
      +#include <apr_thread_cond.h>
      +
      +#include <mpm_common.h>
      +#include <httpd.h>
      +#include <http_core.h>
      +#include <http_log.h>
      +
      +#include "h2.h"
      +#include "h2_private.h"
      +#include "h2_mplx.h"
      +#include "h2_task.h"
      +#include "h2_worker.h"
      +#include "h2_workers.h"
      +
      +
      +static int in_list(h2_workers *workers, h2_mplx *m)
      +{
      +    h2_mplx *e;
      +    for (e = H2_MPLX_LIST_FIRST(&workers->mplxs); 
      +         e != H2_MPLX_LIST_SENTINEL(&workers->mplxs);
      +         e = H2_MPLX_NEXT(e)) {
      +        if (e == m) {
      +            return 1;
      +        }
      +    }
      +    return 0;
      +}
      +
      +static void cleanup_zombies(h2_workers *workers, int lock)
      +{
      +    if (lock) {
      +        apr_thread_mutex_lock(workers->lock);
      +    }
      +    while (!H2_WORKER_LIST_EMPTY(&workers->zombies)) {
      +        h2_worker *zombie = H2_WORKER_LIST_FIRST(&workers->zombies);
      +        H2_WORKER_REMOVE(zombie);
      +        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                      "h2_workers: cleanup zombie %d", zombie->id);
      +        h2_worker_destroy(zombie);
      +    }
      +    if (lock) {
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +}
      +
      +static h2_task *next_task(h2_workers *workers)
      +{
      +    h2_task *task = NULL;
      +    h2_mplx *last = NULL;
      +    int has_more;
      +    
      +    /* Get the next h2_mplx to process that has a task to hand out.
      +     * If it does, place it at the end of the queu and return the
      +     * task to the worker.
      +     * If it (currently) has no tasks, remove it so that it needs
      +     * to register again for scheduling.
      +     * If we run out of h2_mplx in the queue, we need to wait for
      +     * new mplx to arrive. Depending on how many workers do exist,
      +     * we do a timed wait or block indefinitely.
      +     */
      +    while (!task && !H2_MPLX_LIST_EMPTY(&workers->mplxs)) {
      +        h2_mplx *m = H2_MPLX_LIST_FIRST(&workers->mplxs);
      +        
      +        if (last == m) {
      +            break;
      +        }
      +        H2_MPLX_REMOVE(m);
      +        --workers->mplx_count;
      +        
      +        task = h2_mplx_pop_task(m, &has_more);
      +        if (has_more) {
      +            H2_MPLX_LIST_INSERT_TAIL(&workers->mplxs, m);
      +            ++workers->mplx_count;
      +            if (!last) {
      +                last = m;
      +            }
      +        }
      +    }
      +    return task;
      +}
      +
      +/**
      + * Get the next task for the given worker. Will block until a task arrives
      + * or the max_wait timer expires and more than min workers exist.
      + */
      +static apr_status_t get_mplx_next(h2_worker *worker, void *ctx, 
      +                                  h2_task **ptask, int *psticky)
      +{
      +    apr_status_t status;
      +    apr_time_t wait_until = 0, now;
      +    h2_workers *workers = ctx;
      +    h2_task *task = NULL;
      +    
      +    *ptask = NULL;
      +    *psticky = 0;
      +    
      +    status = apr_thread_mutex_lock(workers->lock);
      +    if (status == APR_SUCCESS) {
      +        ++workers->idle_workers;
      +        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                     "h2_worker(%d): looking for work", worker->id);
      +        
      +        while (!h2_worker_is_aborted(worker) && !workers->aborted
      +               && !(task = next_task(workers))) {
      +        
      +            /* Need to wait for a new tasks to arrive. If we are above
      +             * minimum workers, we do a timed wait. When timeout occurs
      +             * and we have still more workers, we shut down one after
      +             * the other. */
      +            cleanup_zombies(workers, 0);
      +            if (workers->worker_count > workers->min_workers) {
      +                now = apr_time_now();
      +                if (now >= wait_until) {
      +                    wait_until = now + apr_time_from_sec(workers->max_idle_secs);
      +                }
      +                
      +                ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                             "h2_worker(%d): waiting signal, "
      +                             "workers=%d, idle=%d", worker->id, 
      +                             (int)workers->worker_count, 
      +                             workers->idle_workers);
      +                status = apr_thread_cond_timedwait(workers->mplx_added,
      +                                                   workers->lock, 
      +                                                   wait_until - now);
      +                if (status == APR_TIMEUP
      +                    && workers->worker_count > workers->min_workers) {
      +                    /* waited long enough without getting a task and
      +                     * we are above min workers, abort this one. */
      +                    ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, 
      +                                 workers->s,
      +                                 "h2_workers: aborting idle worker");
      +                    h2_worker_abort(worker);
      +                    break;
      +                }
      +            }
      +            else {
      +                ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                             "h2_worker(%d): waiting signal (eternal), "
      +                             "worker_count=%d, idle=%d", worker->id, 
      +                             (int)workers->worker_count,
      +                             workers->idle_workers);
      +                apr_thread_cond_wait(workers->mplx_added, workers->lock);
      +            }
      +        }
      +        
      +        /* Here, we either have gotten task or decided to shut down
      +         * the calling worker.
      +         */
      +        if (task) {
      +            /* Ok, we got something to give back to the worker for execution. 
      +             * If we have more idle workers than h2_mplx in our queue, then
      +             * we let the worker be sticky, e.g. making it poll the task's
      +             * h2_mplx instance for more work before asking back here.
      +             * This avoids entering our global lock as long as enough idle
      +             * workers remain. Stickiness of a worker ends when the connection
      +             * has no new tasks to process, so the worker will get back here
      +             * eventually.
      +             */
      +            *ptask = task;
      +            *psticky = (workers->max_workers >= workers->mplx_count);
      +            
      +            if (workers->mplx_count && workers->idle_workers > 1) {
      +                apr_thread_cond_signal(workers->mplx_added);
      +            }
      +        }
      +        
      +        --workers->idle_workers;
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +    
      +    return *ptask? APR_SUCCESS : APR_EOF;
      +}
      +
      +static void worker_done(h2_worker *worker, void *ctx)
      +{
      +    h2_workers *workers = ctx;
      +    apr_status_t status = apr_thread_mutex_lock(workers->lock);
      +    if (status == APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                     "h2_worker(%d): done", worker->id);
      +        H2_WORKER_REMOVE(worker);
      +        --workers->worker_count;
      +        H2_WORKER_LIST_INSERT_TAIL(&workers->zombies, worker);
      +        
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +}
      +
      +static apr_status_t add_worker(h2_workers *workers)
      +{
      +    h2_worker *w = h2_worker_create(workers->next_worker_id++,
      +                                    workers->pool, workers->thread_attr,
      +                                    get_mplx_next, worker_done, workers);
      +    if (!w) {
      +        return APR_ENOMEM;
      +    }
      +    ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                 "h2_workers: adding worker(%d)", w->id);
      +    ++workers->worker_count;
      +    H2_WORKER_LIST_INSERT_TAIL(&workers->workers, w);
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t h2_workers_start(h2_workers *workers)
      +{
      +    apr_status_t status = apr_thread_mutex_lock(workers->lock);
      +    if (status == APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                      "h2_workers: starting");
      +
      +        while (workers->worker_count < workers->min_workers
      +               && status == APR_SUCCESS) {
      +            status = add_worker(workers);
      +        }
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +    return status;
      +}
      +
      +h2_workers *h2_workers_create(server_rec *s, apr_pool_t *server_pool,
      +                              int min_workers, int max_workers,
      +                              apr_size_t max_tx_handles)
      +{
      +    apr_status_t status;
      +    h2_workers *workers;
      +    apr_pool_t *pool;
      +
      +    ap_assert(s);
      +    ap_assert(server_pool);
      +
      +    /* let's have our own pool that will be parent to all h2_worker
      +     * instances we create. This happens in various threads, but always
      +     * guarded by our lock. Without this pool, all subpool creations would
      +     * happen on the pool handed to us, which we do not guard.
      +     */
      +    apr_pool_create(&pool, server_pool);
      +    apr_pool_tag(pool, "h2_workers");
      +    workers = apr_pcalloc(pool, sizeof(h2_workers));
      +    if (workers) {
      +        workers->s = s;
      +        workers->pool = pool;
      +        workers->min_workers = min_workers;
      +        workers->max_workers = max_workers;
      +        workers->max_idle_secs = 10;
      +        
      +        workers->max_tx_handles = max_tx_handles;
      +        workers->spare_tx_handles = workers->max_tx_handles;
      +        
      +        apr_threadattr_create(&workers->thread_attr, workers->pool);
      +        if (ap_thread_stacksize != 0) {
      +            apr_threadattr_stacksize_set(workers->thread_attr,
      +                                         ap_thread_stacksize);
      +            ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
      +                         "h2_workers: using stacksize=%ld", 
      +                         (long)ap_thread_stacksize);
      +        }
      +        
      +        APR_RING_INIT(&workers->workers, h2_worker, link);
      +        APR_RING_INIT(&workers->zombies, h2_worker, link);
      +        APR_RING_INIT(&workers->mplxs, h2_mplx, link);
      +        
      +        status = apr_thread_mutex_create(&workers->lock,
      +                                         APR_THREAD_MUTEX_DEFAULT,
      +                                         workers->pool);
      +        if (status == APR_SUCCESS) {
      +            status = apr_thread_cond_create(&workers->mplx_added, workers->pool);
      +        }
      +        
      +        if (status == APR_SUCCESS) {
      +            status = apr_thread_mutex_create(&workers->tx_lock,
      +                                             APR_THREAD_MUTEX_DEFAULT,
      +                                             workers->pool);
      +        }
      +        
      +        if (status == APR_SUCCESS) {
      +            status = h2_workers_start(workers);
      +        }
      +        
      +        if (status != APR_SUCCESS) {
      +            h2_workers_destroy(workers);
      +            workers = NULL;
      +        }
      +    }
      +    return workers;
      +}
      +
      +void h2_workers_destroy(h2_workers *workers)
      +{
      +    /* before we go, cleanup any zombie workers that may have accumulated */
      +    cleanup_zombies(workers, 1);
      +    
      +    if (workers->mplx_added) {
      +        apr_thread_cond_destroy(workers->mplx_added);
      +        workers->mplx_added = NULL;
      +    }
      +    if (workers->lock) {
      +        apr_thread_mutex_destroy(workers->lock);
      +        workers->lock = NULL;
      +    }
      +    while (!H2_MPLX_LIST_EMPTY(&workers->mplxs)) {
      +        h2_mplx *m = H2_MPLX_LIST_FIRST(&workers->mplxs);
      +        H2_MPLX_REMOVE(m);
      +    }
      +    while (!H2_WORKER_LIST_EMPTY(&workers->workers)) {
      +        h2_worker *w = H2_WORKER_LIST_FIRST(&workers->workers);
      +        H2_WORKER_REMOVE(w);
      +    }
      +    if (workers->pool) {
      +        apr_pool_destroy(workers->pool);
      +        /* workers is gone */
      +    }
      +}
      +
      +apr_status_t h2_workers_register(h2_workers *workers, struct h2_mplx *m)
      +{
      +    apr_status_t status = apr_thread_mutex_lock(workers->lock);
      +    if (status == APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_TRACE3, status, workers->s,
      +                     "h2_workers: register mplx(%ld), idle=%d", 
      +                     m->id, workers->idle_workers);
      +        if (in_list(workers, m)) {
      +            status = APR_EAGAIN;
      +        }
      +        else {
      +            H2_MPLX_LIST_INSERT_TAIL(&workers->mplxs, m);
      +            ++workers->mplx_count;
      +            status = APR_SUCCESS;
      +        }
      +        
      +        if (workers->idle_workers > 0) { 
      +            apr_thread_cond_signal(workers->mplx_added);
      +        }
      +        else if (status == APR_SUCCESS 
      +                 && workers->worker_count < workers->max_workers) {
      +            ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, workers->s,
      +                         "h2_workers: got %d worker, adding 1", 
      +                         workers->worker_count);
      +            add_worker(workers);
      +        }
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +    return status;
      +}
      +
      +apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m)
      +{
      +    apr_status_t status = apr_thread_mutex_lock(workers->lock);
      +    if (status == APR_SUCCESS) {
      +        status = APR_EAGAIN;
      +        if (in_list(workers, m)) {
      +            H2_MPLX_REMOVE(m);
      +            status = APR_SUCCESS;
      +        }
      +        apr_thread_mutex_unlock(workers->lock);
      +    }
      +    return status;
      +}
      +
      +void h2_workers_set_max_idle_secs(h2_workers *workers, int idle_secs)
      +{
      +    if (idle_secs <= 0) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, workers->s,
      +                     APLOGNO(02962) "h2_workers: max_worker_idle_sec value of %d"
      +                     " is not valid, ignored.", idle_secs);
      +        return;
      +    }
      +    workers->max_idle_secs = idle_secs;
      +}
      +
      +apr_size_t h2_workers_tx_reserve(h2_workers *workers, apr_size_t count)
      +{
      +    apr_status_t status = apr_thread_mutex_lock(workers->tx_lock);
      +    if (status == APR_SUCCESS) {
      +        count = H2MIN(workers->spare_tx_handles, count);
      +        workers->spare_tx_handles -= count;
      +        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, workers->s,
      +                     "h2_workers: reserved %d tx handles, %d/%d left", 
      +                     (int)count, (int)workers->spare_tx_handles,
      +                     (int)workers->max_tx_handles);
      +        apr_thread_mutex_unlock(workers->tx_lock);
      +        return count;
      +    }
      +    return 0;
      +}
      +
      +void h2_workers_tx_free(h2_workers *workers, apr_size_t count)
      +{
      +    apr_status_t status = apr_thread_mutex_lock(workers->tx_lock);
      +    if (status == APR_SUCCESS) {
      +        workers->spare_tx_handles += count;
      +        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, workers->s,
      +                     "h2_workers: freed %d tx handles, %d/%d left", 
      +                     (int)count, (int)workers->spare_tx_handles,
      +                     (int)workers->max_tx_handles);
      +        apr_thread_mutex_unlock(workers->tx_lock);
      +    }
      +}
      +
      diff --git a/modules/http2/h2_workers.h b/modules/http2/h2_workers.h
      new file mode 100644
      index 00000000000..ae7b4d8969f
      --- /dev/null
      +++ b/modules/http2/h2_workers.h
      @@ -0,0 +1,120 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + 
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __mod_h2__h2_workers__
      +#define __mod_h2__h2_workers__
      +
      +/* Thread pool specific to executing h2_tasks. Has a minimum and maximum 
      + * number of workers it creates. Starts with minimum workers and adds
      + * some on load, reduces the number again when idle.
      + *
      + */
      +struct apr_thread_mutex_t;
      +struct apr_thread_cond_t;
      +struct h2_mplx;
      +struct h2_request;
      +struct h2_task;
      +
      +typedef struct h2_workers h2_workers;
      +
      +struct h2_workers {
      +    server_rec *s;
      +    apr_pool_t *pool;
      +    
      +    int next_worker_id;
      +    int min_workers;
      +    int max_workers;
      +    int worker_count;
      +    int idle_workers;
      +    int max_idle_secs;
      +    
      +    apr_size_t max_tx_handles;
      +    apr_size_t spare_tx_handles;
      +    
      +    unsigned int aborted : 1;
      +
      +    apr_threadattr_t *thread_attr;
      +    
      +    APR_RING_HEAD(h2_worker_list, h2_worker) workers;
      +    APR_RING_HEAD(h2_worker_zombies, h2_worker) zombies;
      +    APR_RING_HEAD(h2_mplx_list, h2_mplx) mplxs;
      +    int mplx_count;
      +    
      +    struct apr_thread_mutex_t *lock;
      +    struct apr_thread_cond_t *mplx_added;
      +
      +    struct apr_thread_mutex_t *tx_lock;
      +};
      +
      +
      +/* Create a worker pool with the given minimum and maximum number of
      + * threads.
      + */
      +h2_workers *h2_workers_create(server_rec *s, apr_pool_t *pool,
      +                              int min_size, int max_size, 
      +                              apr_size_t max_tx_handles);
      +
      +/* Destroy the worker pool and all its threads. 
      + */
      +void h2_workers_destroy(h2_workers *workers);
      +
      +/**
      + * Registers a h2_mplx for task scheduling. If this h2_mplx runs
      + * out of tasks, it will be automatically be unregistered. Should
      + * new tasks arrive, it needs to be registered again.
      + */
      +apr_status_t h2_workers_register(h2_workers *workers, struct h2_mplx *m);
      +
      +/**
      + * Remove a h2_mplx from the worker registry.
      + */
      +apr_status_t h2_workers_unregister(h2_workers *workers, struct h2_mplx *m);
      +
      +/**
      + * Set the amount of seconds a h2_worker should wait for new tasks
      + * before shutting down (if there are more than the minimum number of
      + * workers).
      + */
      +void h2_workers_set_max_idle_secs(h2_workers *workers, int idle_secs);
      +
      +/**
      + * Reservation of file handles available for transfer between workers
      + * and master connections. 
      + *
      + * When handling output from request processing, file handles are often 
      + * encountered when static files are served. The most efficient way is then
      + * to forward the handle itself to the master connection where it can be
      + * read or sendfile'd to the client. But file handles are a scarce resource,
      + * so there needs to be a limit on how many handles are transferred this way.
      + *
      + * h2_workers keeps track of the number of reserved handles and observes a
      + * configurable maximum value. 
      + *
      + * @param workers the workers instance
      + * @param count how many handles the caller wishes to reserve
      + * @return the number of reserved handles, may be 0.
      + */
      +apr_size_t h2_workers_tx_reserve(h2_workers *workers, apr_size_t count);
      +
      +/**
      + * Return a number of reserved file handles back to the pool. The number
      + * overall may not exceed the numbers reserved.
      + * @param workers the workers instance
      + * @param count how many handles are returned to the pool
      + */
      +void h2_workers_tx_free(h2_workers *workers, apr_size_t count);
      +
      +#endif /* defined(__mod_h2__h2_workers__) */
      diff --git a/modules/http2/mod_http2.c b/modules/http2/mod_http2.c
      new file mode 100644
      index 00000000000..e0a4b908832
      --- /dev/null
      +++ b/modules/http2/mod_http2.c
      @@ -0,0 +1,366 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <apr_optional.h>
      +#include <apr_optional_hooks.h>
      +#include <apr_strings.h>
      +#include <apr_time.h>
      +#include <apr_want.h>
      +
      +#include <httpd.h>
      +#include <http_protocol.h>
      +#include <http_request.h>
      +#include <http_log.h>
      +
      +#include "mod_http2.h"
      +
      +#include <nghttp2/nghttp2.h>
      +#include "h2_stream.h"
      +#include "h2_alt_svc.h"
      +#include "h2_conn.h"
      +#include "h2_filter.h"
      +#include "h2_task.h"
      +#include "h2_session.h"
      +#include "h2_config.h"
      +#include "h2_ctx.h"
      +#include "h2_h2.h"
      +#include "h2_mplx.h"
      +#include "h2_push.h"
      +#include "h2_request.h"
      +#include "h2_switch.h"
      +#include "h2_version.h"
      +
      +
      +static void h2_hooks(apr_pool_t *pool);
      +
      +AP_DECLARE_MODULE(http2) = {
      +    STANDARD20_MODULE_STUFF,
      +    h2_config_create_dir, /* func to create per dir config */
      +    h2_config_merge_dir,  /* func to merge per dir config */
      +    h2_config_create_svr, /* func to create per server config */
      +    h2_config_merge_svr,  /* func to merge per server config */
      +    h2_cmds,              /* command handlers */
      +    h2_hooks
      +};
      +
      +static int h2_h2_fixups(request_rec *r);
      +
      +typedef struct {
      +    unsigned int change_prio : 1;
      +    unsigned int sha256 : 1;
      +    unsigned int inv_headers : 1;
      +} features;
      +
      +static features myfeats;
      +
      +/* The module initialization. Called once as apache hook, before any multi
      + * processing (threaded or not) happens. It is typically at least called twice, 
      + * see
      + * http://wiki.apache.org/httpd/ModuleLife
      + * Since the first run is just a "practise" run, we want to initialize for real
      + * only on the second try. This defeats the purpose of the first dry run a bit, 
      + * since apache wants to verify that a new configuration actually will work. 
      + * So if we have trouble with the configuration, this will only be detected 
      + * when the server has already switched.
      + * On the other hand, when we initialize lib nghttp2, all possible crazy things 
      + * might happen and this might even eat threads. So, better init on the real 
      + * invocation, for now at least.
      + */
      +static int h2_post_config(apr_pool_t *p, apr_pool_t *plog,
      +                          apr_pool_t *ptemp, server_rec *s)
      +{
      +    void *data = NULL;
      +    const char *mod_h2_init_key = "mod_http2_init_counter";
      +    nghttp2_info *ngh2;
      +    apr_status_t status;
      +    
      +    (void)plog;(void)ptemp;
      +#ifdef H2_NG2_CHANGE_PRIO
      +    myfeats.change_prio = 1;
      +#endif
      +#ifdef H2_OPENSSL
      +    myfeats.sha256 = 1;
      +#endif
      +#ifdef H2_NG2_INVALID_HEADER_CB
      +    myfeats.inv_headers = 1;
      +#endif
      +    
      +    apr_pool_userdata_get(&data, mod_h2_init_key, s->process->pool);
      +    if ( data == NULL ) {
      +        ap_log_error( APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03089)
      +                     "initializing post config dry run");
      +        apr_pool_userdata_set((const void *)1, mod_h2_init_key,
      +                              apr_pool_cleanup_null, s->process->pool);
      +        return APR_SUCCESS;
      +    }
      +    
      +    ngh2 = nghttp2_version(0);
      +    ap_log_error( APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03090)
      +                 "mod_http2 (v%s, feats=%s%s%s, nghttp2 %s), initializing...",
      +                 MOD_HTTP2_VERSION, 
      +                 myfeats.change_prio? "CHPRIO"  : "", 
      +                 myfeats.sha256?      "+SHA256" : "",
      +                 myfeats.inv_headers? "+INVHD"  : "",
      +                 ngh2?                ngh2->version_str : "unknown");
      +    
      +    switch (h2_conn_mpm_type()) {
      +        case H2_MPM_SIMPLE:
      +        case H2_MPM_MOTORZ:
      +        case H2_MPM_NETWARE:
      +        case H2_MPM_WINNT:
      +            /* not sure we need something extra for those. */
      +            break;
      +        case H2_MPM_EVENT:
      +        case H2_MPM_WORKER:
      +            /* all fine, we know these ones */
      +            break;
      +        case H2_MPM_PREFORK:
      +            /* ok, we now know how to handle that one */
      +            break;
      +        case H2_MPM_UNKNOWN:
      +            /* ??? */
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03091)
      +                         "post_config: mpm type unknown");
      +            break;
      +    }
      +    
      +    status = h2_h2_init(p, s);
      +    if (status == APR_SUCCESS) {
      +        status = h2_switch_init(p, s);
      +    }
      +    if (status == APR_SUCCESS) {
      +        status = h2_task_init(p, s);
      +    }
      +    
      +    return status;
      +}
      +
      +static char *http2_var_lookup(apr_pool_t *, server_rec *,
      +                         conn_rec *, request_rec *, char *name);
      +static int http2_is_h2(conn_rec *);
      +
      +static apr_status_t http2_req_engine_push(const char *ngn_type, 
      +                                          request_rec *r, 
      +                                          http2_req_engine_init *einit)
      +{
      +    return h2_mplx_req_engine_push(ngn_type, r, einit);
      +}
      +
      +static apr_status_t http2_req_engine_pull(h2_req_engine *ngn, 
      +                                          apr_read_type_e block, 
      +                                          int capacity, 
      +                                          request_rec **pr)
      +{
      +    return h2_mplx_req_engine_pull(ngn, block, capacity, pr);
      +}
      +
      +static void http2_req_engine_done(h2_req_engine *ngn, conn_rec *r_conn,
      +                                  apr_status_t status)
      +{
      +    h2_mplx_req_engine_done(ngn, r_conn, status);
      +}
      +
      +/* Runs once per created child process. Perform any process 
      + * related initionalization here.
      + */
      +static void h2_child_init(apr_pool_t *pool, server_rec *s)
      +{
      +    /* Set up our connection processing */
      +    apr_status_t status = h2_conn_child_init(pool, s);
      +    if (status != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, s,
      +                     APLOGNO(02949) "initializing connection handling");
      +    }
      +    
      +}
      +
      +/* Install this module into the apache2 infrastructure.
      + */
      +static void h2_hooks(apr_pool_t *pool)
      +{
      +    static const char *const mod_ssl[] = { "mod_ssl.c", NULL};
      +    
      +    APR_REGISTER_OPTIONAL_FN(http2_is_h2);
      +    APR_REGISTER_OPTIONAL_FN(http2_var_lookup);
      +    APR_REGISTER_OPTIONAL_FN(http2_req_engine_push);
      +    APR_REGISTER_OPTIONAL_FN(http2_req_engine_pull);
      +    APR_REGISTER_OPTIONAL_FN(http2_req_engine_done);
      +
      +    ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks");
      +    
      +    /* Run once after configuration is set, but before mpm children initialize.
      +     */
      +    ap_hook_post_config(h2_post_config, mod_ssl, NULL, APR_HOOK_MIDDLE);
      +    
      +    /* Run once after a child process has been created.
      +     */
      +    ap_hook_child_init(h2_child_init, NULL, NULL, APR_HOOK_MIDDLE);
      +
      +    h2_h2_register_hooks();
      +    h2_switch_register_hooks();
      +    h2_task_register_hooks();
      +
      +    h2_alt_svc_register_hooks();
      +    
      +    /* Setup subprocess env for certain variables 
      +     */
      +    ap_hook_fixups(h2_h2_fixups, NULL,NULL, APR_HOOK_MIDDLE);
      +    
      +    /* test http2 connection status handler */
      +    ap_hook_handler(h2_filter_h2_status_handler, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +static const char *val_HTTP2(apr_pool_t *p, server_rec *s,
      +                             conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    return ctx? "on" : "off";
      +}
      +
      +static const char *val_H2_PUSH(apr_pool_t *p, server_rec *s,
      +                               conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    if (ctx) {
      +        if (r) {
      +            h2_task *task = h2_ctx_get_task(ctx);
      +            if (task) {
      +                h2_stream *stream = h2_mplx_stream_get(task->mplx, task->stream_id);
      +                if (stream && stream->push_policy != H2_PUSH_NONE) {
      +                    return "on";
      +                }
      +            }
      +        }
      +        else if (c && h2_session_push_enabled(ctx->session)) {
      +            return "on";
      +        }
      +    }
      +    else if (s) {
      +        const h2_config *cfg = h2_config_sget(s);
      +        if (cfg && h2_config_geti(cfg, H2_CONF_PUSH)) {
      +            return "on";
      +        }
      +    }
      +    return "off";
      +}
      +
      +static const char *val_H2_PUSHED(apr_pool_t *p, server_rec *s,
      +                                 conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    if (ctx) {
      +        h2_task *task = h2_ctx_get_task(ctx);
      +        if (task && !H2_STREAM_CLIENT_INITIATED(task->stream_id)) {
      +            return "PUSHED";
      +        }
      +    }
      +    return "";
      +}
      +
      +static const char *val_H2_PUSHED_ON(apr_pool_t *p, server_rec *s,
      +                                    conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    if (ctx) {
      +        h2_task *task = h2_ctx_get_task(ctx);
      +        if (task && !H2_STREAM_CLIENT_INITIATED(task->stream_id)) {
      +            h2_stream *stream = h2_mplx_stream_get(task->mplx, task->stream_id);
      +            if (stream) {
      +                return apr_itoa(p, stream->initiated_on);
      +            }
      +        }
      +    }
      +    return "";
      +}
      +
      +static const char *val_H2_STREAM_TAG(apr_pool_t *p, server_rec *s,
      +                                     conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    if (ctx) {
      +        h2_task *task = h2_ctx_get_task(ctx);
      +        if (task) {
      +            return task->id;
      +        }
      +    }
      +    return "";
      +}
      +
      +static const char *val_H2_STREAM_ID(apr_pool_t *p, server_rec *s,
      +                                    conn_rec *c, request_rec *r, h2_ctx *ctx)
      +{
      +    const char *cp = val_H2_STREAM_TAG(p, s, c, r, ctx);
      +    if (cp && (cp = ap_strchr_c(cp, '-'))) {
      +        return ++cp;
      +    }
      +    return NULL;
      +}
      +
      +typedef const char *h2_var_lookup(apr_pool_t *p, server_rec *s,
      +                                  conn_rec *c, request_rec *r, h2_ctx *ctx);
      +typedef struct h2_var_def {
      +    const char *name;
      +    h2_var_lookup *lookup;
      +    unsigned int  subprocess : 1;    /* should be set in r->subprocess_env */
      +} h2_var_def;
      +
      +static h2_var_def H2_VARS[] = {
      +    { "HTTP2",               val_HTTP2,  1 },
      +    { "H2PUSH",              val_H2_PUSH, 1 },
      +    { "H2_PUSH",             val_H2_PUSH, 1 },
      +    { "H2_PUSHED",           val_H2_PUSHED, 1 },
      +    { "H2_PUSHED_ON",        val_H2_PUSHED_ON, 1 },
      +    { "H2_STREAM_ID",        val_H2_STREAM_ID, 1 },
      +    { "H2_STREAM_TAG",       val_H2_STREAM_TAG, 1 },
      +};
      +
      +#ifndef H2_ALEN
      +#define H2_ALEN(a)          (sizeof(a)/sizeof((a)[0]))
      +#endif
      +
      +
      +static int http2_is_h2(conn_rec *c)
      +{
      +    return h2_ctx_get(c->master? c->master : c, 0) != NULL;
      +}
      +
      +static char *http2_var_lookup(apr_pool_t *p, server_rec *s,
      +                              conn_rec *c, request_rec *r, char *name)
      +{
      +    int i;
      +    /* If the # of vars grow, we need to put definitions in a hash */
      +    for (i = 0; i < H2_ALEN(H2_VARS); ++i) {
      +        h2_var_def *vdef = &H2_VARS[i];
      +        if (!strcmp(vdef->name, name)) {
      +            h2_ctx *ctx = (r? h2_ctx_rget(r) : 
      +                           h2_ctx_get(c->master? c->master : c, 0));
      +            return (char *)vdef->lookup(p, s, c, r, ctx);
      +        }
      +    }
      +    return (char*)"";
      +}
      +
      +static int h2_h2_fixups(request_rec *r)
      +{
      +    if (r->connection->master) {
      +        h2_ctx *ctx = h2_ctx_rget(r);
      +        int i;
      +        
      +        for (i = 0; ctx && i < H2_ALEN(H2_VARS); ++i) {
      +            h2_var_def *vdef = &H2_VARS[i];
      +            if (vdef->subprocess) {
      +                apr_table_setn(r->subprocess_env, vdef->name, 
      +                               vdef->lookup(r->pool, r->server, r->connection, 
      +                                            r, ctx));
      +            }
      +        }
      +    }
      +    return DECLINED;
      +}
      diff --git a/modules/http2/mod_http2.dep b/modules/http2/mod_http2.dep
      new file mode 100644
      index 00000000000..70953c8120e
      --- /dev/null
      +++ b/modules/http2/mod_http2.dep
      @@ -0,0 +1,1551 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_http2.mak
      +
      +./h2_alt_svc.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2_alt_svc.h"\
      +	".\h2_config.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_bucket_eoc.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_bucket_eoc.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_session.h"\
      +	
      +
      +./h2_bucket_eos.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_bucket_eos.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_stream.h"\
      +	
      +
      +./h2_config.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_alt_svc.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	
      +
      +./h2_conn.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_filter.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_version.h"\
      +	".\h2_worker.h"\
      +	".\h2_workers.h"\
      +	
      +
      +./h2_conn_io.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_bucket_eoc.h"\
      +	".\h2_bucket_eos.h"\
      +	".\h2_config.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	".\h2_session.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_ctx.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_private.h"\
      +	".\h2_session.h"\
      +	".\h2_task.h"\
      +	
      +
      +./h2_filter.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_filter.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	".\h2_version.h"\
      +	
      +
      +./h2_from_h1.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_time.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_from_h1.h"\
      +	".\h2_private.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_h2.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\ssl\mod_ssl.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	".\mod_http2.h"\
      +	
      +
      +./h2_int_queue.c : \
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      +
      +./h2_io.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_io_set.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2_io_set.h"\
      +	".\h2_private.h"\
      +	
      +
      +./h2_mplx.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_ngn_shed.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	".\h2_worker.h"\
      +	".\h2_workers.h"\
      +	".\mod_http2.h"\
      +	
      +
      +./h2_ngn_shed.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_ngn_shed.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	".\mod_http2.h"\
      +	
      +
      +./h2_push.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_request.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_private.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_session.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_bucket_eoc.h"\
      +	".\h2_bucket_eos.h"\
      +	".\h2_config.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_filter.h"\
      +	".\h2_from_h1.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	".\h2_version.h"\
      +	".\h2_workers.h"\
      +	
      +
      +./h2_stream.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_filter.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_switch.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_private.h"\
      +	".\h2_switch.h"\
      +	
      +
      +./h2_task.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_from_h1.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_worker.h"\
      +	
      +
      +./h2_task_input.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_task_output.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_from_h1.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_task.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_util.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_private.h"\
      +	".\h2_request.h"\
      +	".\h2_util.h"\
      +	
      +
      +./h2_worker.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_conn.h"\
      +	".\h2_ctx.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_task.h"\
      +	".\h2_worker.h"\
      +	
      +
      +./h2_workers.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_cond.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_private.h"\
      +	".\h2_task.h"\
      +	".\h2_worker.h"\
      +	".\h2_workers.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +./mod_http2.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_queue.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\h2.h"\
      +	".\h2_alt_svc.h"\
      +	".\h2_config.h"\
      +	".\h2_conn.h"\
      +	".\h2_conn_io.h"\
      +	".\h2_ctx.h"\
      +	".\h2_filter.h"\
      +	".\h2_h2.h"\
      +	".\h2_mplx.h"\
      +	".\h2_push.h"\
      +	".\h2_request.h"\
      +	".\h2_session.h"\
      +	".\h2_stream.h"\
      +	".\h2_switch.h"\
      +	".\h2_task.h"\
      +	".\h2_version.h"\
      +	".\mod_http2.h"\
      +	
      diff --git a/modules/http2/mod_http2.dsp b/modules/http2/mod_http2.dsp
      new file mode 100644
      index 00000000000..f26607470d4
      --- /dev/null
      +++ b/modules/http2/mod_http2.dsp
      @@ -0,0 +1,203 @@
      +# Microsoft Developer Studio Project File - Name="mod_http2" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_http2 - Win32 Release
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_http2.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_http2.mak" CFG="mod_http2 - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_http2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_http2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\mod_http2_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /win32
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /out:".\Release\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
      +# ADD LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Release\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Debug\mod_http2_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /win32
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
      +# ADD LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_http2 - Win32 Release"
      +# Name "mod_http2 - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=./h2_alt_svc.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_bucket_beam.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_bucket_eoc.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_bucket_eos.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_config.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_conn.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_conn_io.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_ctx.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_filter.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_from_h1.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_h2.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_mplx.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_ngn_shed.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_push.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_request.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_headers.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_session.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_stream.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_switch.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_task.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_util.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_worker.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_workers.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./mod_http2.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/http2/mod_http2.h b/modules/http2/mod_http2.h
      new file mode 100644
      index 00000000000..f0cc9567cad
      --- /dev/null
      +++ b/modules/http2/mod_http2.h
      @@ -0,0 +1,95 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __MOD_HTTP2_H__
      +#define __MOD_HTTP2_H__
      +
      +/** The http2_var_lookup() optional function retrieves HTTP2 environment
      + * variables. */
      +APR_DECLARE_OPTIONAL_FN(char *, 
      +                        http2_var_lookup, (apr_pool_t *, server_rec *,
      +                                           conn_rec *, request_rec *,  char *));
      +
      +/** An optional function which returns non-zero if the given connection
      + * or its master connection is using HTTP/2. */
      +APR_DECLARE_OPTIONAL_FN(int, 
      +                        http2_is_h2, (conn_rec *));
      +
      +
      +/*******************************************************************************
      + * HTTP/2 request engines
      + ******************************************************************************/
      + 
      +struct apr_thread_cond_t;
      +
      +typedef struct h2_req_engine h2_req_engine;
      +
      +typedef void http2_output_consumed(void *ctx, conn_rec *c, apr_off_t consumed);
      +
      +/**
      + * Initialize a h2_req_engine. The structure will be passed in but
      + * only the name and master are set. The function should initialize
      + * all fields.
      + * @param engine the allocated, partially filled structure
      + * @param r      the first request to process, or NULL
      + */
      +typedef apr_status_t http2_req_engine_init(h2_req_engine *engine, 
      +                                           const char *id, 
      +                                           const char *type,
      +                                           apr_pool_t *pool, 
      +                                           apr_size_t req_buffer_size,
      +                                           request_rec *r,
      +                                           http2_output_consumed **pconsumed,
      +                                           void **pbaton);
      +
      +/**
      + * Push a request to an engine with the specified name for further processing.
      + * If no such engine is available, einit is not NULL, einit is called 
      + * with a new engine record and the caller is responsible for running the
      + * new engine instance.
      + * @param engine_type the type of the engine to add the request to
      + * @param r           the request to push to an engine for processing
      + * @param einit       an optional initialization callback for a new engine 
      + *                    of the requested type, should no instance be available.
      + *                    By passing a non-NULL callback, the caller is willing
      + *                    to init and run a new engine itself.
      + * @return APR_SUCCESS iff slave was successfully added to an engine
      + */
      +APR_DECLARE_OPTIONAL_FN(apr_status_t, 
      +                        http2_req_engine_push, (const char *engine_type, 
      +                                                request_rec *r,
      +                                                http2_req_engine_init *einit));
      +
      +/**
      + * Get a new request for processing in this engine.
      + * @param engine      the engine which is done processing the slave
      + * @param block       if call should block waiting for request to come
      + * @param capacity    how many parallel requests are acceptable
      + * @param pr          the request that needs processing or NULL
      + * @return APR_SUCCESS if new request was assigned
      + *         APR_EAGAIN  if no new request is available
      + *         APR_EOF          if engine may shut down, as no more request will be scheduled
      + *         APR_ECONNABORTED if the engine needs to shut down immediately
      + */
      +APR_DECLARE_OPTIONAL_FN(apr_status_t, 
      +                        http2_req_engine_pull, (h2_req_engine *engine, 
      +                                                apr_read_type_e block,
      +                                                int capacity,
      +                                                request_rec **pr));
      +APR_DECLARE_OPTIONAL_FN(void, 
      +                        http2_req_engine_done, (h2_req_engine *engine, 
      +                                                conn_rec *rconn,
      +                                                apr_status_t status));
      +#endif
      diff --git a/modules/http2/mod_http2.mak b/modules/http2/mod_http2.mak
      new file mode 100644
      index 00000000000..388df956eb9
      --- /dev/null
      +++ b/modules/http2/mod_http2.mak
      @@ -0,0 +1,560 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_http2.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_http2 - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_http2 - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_http2 - Win32 Release" && "$(CFG)" != "mod_http2 - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_http2.mak" CFG="mod_http2 - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_http2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_http2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\h2_alt_svc.obj"
      +	-@erase "$(INTDIR)\h2_bucket_beam.obj"
      +	-@erase "$(INTDIR)\h2_bucket_eoc.obj"
      +	-@erase "$(INTDIR)\h2_bucket_eos.obj"
      +	-@erase "$(INTDIR)\h2_config.obj"
      +	-@erase "$(INTDIR)\h2_conn.obj"
      +	-@erase "$(INTDIR)\h2_conn_io.obj"
      +	-@erase "$(INTDIR)\h2_ctx.obj"
      +	-@erase "$(INTDIR)\h2_filter.obj"
      +	-@erase "$(INTDIR)\h2_from_h1.obj"
      +	-@erase "$(INTDIR)\h2_h2.obj"
      +	-@erase "$(INTDIR)\h2_headers.obj"
      +	-@erase "$(INTDIR)\h2_mplx.obj"
      +	-@erase "$(INTDIR)\h2_ngn_shed.obj"
      +	-@erase "$(INTDIR)\h2_push.obj"
      +	-@erase "$(INTDIR)\h2_request.obj"
      +	-@erase "$(INTDIR)\h2_session.obj"
      +	-@erase "$(INTDIR)\h2_stream.obj"
      +	-@erase "$(INTDIR)\h2_switch.obj"
      +	-@erase "$(INTDIR)\h2_task.obj"
      +	-@erase "$(INTDIR)\h2_util.obj"
      +	-@erase "$(INTDIR)\h2_worker.obj"
      +	-@erase "$(INTDIR)\h2_workers.obj"
      +	-@erase "$(INTDIR)\mod_http2.obj"
      +	-@erase "$(INTDIR)\mod_http2.res"
      +	-@erase "$(INTDIR)\mod_http2_src.idb"
      +	-@erase "$(INTDIR)\mod_http2_src.pdb"
      +	-@erase "$(OUTDIR)\mod_http2.exp"
      +	-@erase "$(OUTDIR)\mod_http2.lib"
      +	-@erase "$(OUTDIR)\mod_http2.pdb"
      +	-@erase "$(OUTDIR)\mod_http2.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D ssize_t=long /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_http2_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_http2.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_http2.pdb" /debug /out:"$(OUTDIR)\mod_http2.so" /implib:"$(OUTDIR)\mod_http2.lib" /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\h2_alt_svc.obj" \
      +	"$(INTDIR)\h2_bucket_beam.obj" \
      +	"$(INTDIR)\h2_bucket_eoc.obj" \
      +	"$(INTDIR)\h2_bucket_eos.obj" \
      +	"$(INTDIR)\h2_config.obj" \
      +	"$(INTDIR)\h2_conn.obj" \
      +	"$(INTDIR)\h2_conn_io.obj" \
      +	"$(INTDIR)\h2_ctx.obj" \
      +	"$(INTDIR)\h2_filter.obj" \
      +	"$(INTDIR)\h2_from_h1.obj" \
      +	"$(INTDIR)\h2_h2.obj" \
      +	"$(INTDIR)\h2_headers.obj" \
      +	"$(INTDIR)\h2_mplx.obj" \
      +	"$(INTDIR)\h2_ngn_shed.obj" \
      +	"$(INTDIR)\h2_push.obj" \
      +	"$(INTDIR)\h2_request.obj" \
      +	"$(INTDIR)\h2_session.obj" \
      +	"$(INTDIR)\h2_stream.obj" \
      +	"$(INTDIR)\h2_switch.obj" \
      +	"$(INTDIR)\h2_task.obj" \
      +	"$(INTDIR)\h2_util.obj" \
      +	"$(INTDIR)\h2_worker.obj" \
      +	"$(INTDIR)\h2_workers.obj" \
      +	"$(INTDIR)\mod_http2.obj" \
      +	"$(INTDIR)\mod_http2.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_http2.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_http2.so"
      +   if exist .\Release\mod_http2.so.manifest mt.exe -manifest .\Release\mod_http2.so.manifest -outputresource:.\Release\mod_http2.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\h2_alt_svc.obj"
      +	-@erase "$(INTDIR)\h2_bucket_beam.obj"
      +	-@erase "$(INTDIR)\h2_bucket_eoc.obj"
      +	-@erase "$(INTDIR)\h2_bucket_eos.obj"
      +	-@erase "$(INTDIR)\h2_config.obj"
      +	-@erase "$(INTDIR)\h2_conn.obj"
      +	-@erase "$(INTDIR)\h2_conn_io.obj"
      +	-@erase "$(INTDIR)\h2_ctx.obj"
      +	-@erase "$(INTDIR)\h2_filter.obj"
      +	-@erase "$(INTDIR)\h2_from_h1.obj"
      +	-@erase "$(INTDIR)\h2_h2.obj"
      +	-@erase "$(INTDIR)\h2_headers.obj"
      +	-@erase "$(INTDIR)\h2_mplx.obj"
      +	-@erase "$(INTDIR)\h2_ngn_shed.obj"
      +	-@erase "$(INTDIR)\h2_push.obj"
      +	-@erase "$(INTDIR)\h2_request.obj"
      +	-@erase "$(INTDIR)\h2_session.obj"
      +	-@erase "$(INTDIR)\h2_stream.obj"
      +	-@erase "$(INTDIR)\h2_switch.obj"
      +	-@erase "$(INTDIR)\h2_task.obj"
      +	-@erase "$(INTDIR)\h2_util.obj"
      +	-@erase "$(INTDIR)\h2_worker.obj"
      +	-@erase "$(INTDIR)\h2_workers.obj"
      +	-@erase "$(INTDIR)\mod_http2.obj"
      +	-@erase "$(INTDIR)\mod_http2.res"
      +	-@erase "$(INTDIR)\mod_http2_src.idb"
      +	-@erase "$(INTDIR)\mod_http2_src.pdb"
      +	-@erase "$(OUTDIR)\mod_http2.exp"
      +	-@erase "$(OUTDIR)\mod_http2.lib"
      +	-@erase "$(OUTDIR)\mod_http2.pdb"
      +	-@erase "$(OUTDIR)\mod_http2.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ssize_t=long /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_http2_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_http2.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_http2.pdb" /debug /out:"$(OUTDIR)\mod_http2.so" /implib:"$(OUTDIR)\mod_http2.lib" /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /base:@..\..\os\win32\BaseAddr.ref,mod_http2.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\h2_alt_svc.obj" \
      +	"$(INTDIR)\h2_bucket_beam.obj" \
      +	"$(INTDIR)\h2_bucket_eoc.obj" \
      +	"$(INTDIR)\h2_bucket_eos.obj" \
      +	"$(INTDIR)\h2_config.obj" \
      +	"$(INTDIR)\h2_conn.obj" \
      +	"$(INTDIR)\h2_conn_io.obj" \
      +	"$(INTDIR)\h2_ctx.obj" \
      +	"$(INTDIR)\h2_filter.obj" \
      +	"$(INTDIR)\h2_from_h1.obj" \
      +	"$(INTDIR)\h2_h2.obj" \
      +	"$(INTDIR)\h2_headers.obj" \
      +	"$(INTDIR)\h2_mplx.obj" \
      +	"$(INTDIR)\h2_ngn_shed.obj" \
      +	"$(INTDIR)\h2_push.obj" \
      +	"$(INTDIR)\h2_request.obj" \
      +	"$(INTDIR)\h2_session.obj" \
      +	"$(INTDIR)\h2_stream.obj" \
      +	"$(INTDIR)\h2_switch.obj" \
      +	"$(INTDIR)\h2_task.obj" \
      +	"$(INTDIR)\h2_util.obj" \
      +	"$(INTDIR)\h2_worker.obj" \
      +	"$(INTDIR)\h2_workers.obj" \
      +	"$(INTDIR)\mod_http2.obj" \
      +	"$(INTDIR)\mod_http2.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_http2.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_http2.so"
      +   if exist .\Debug\mod_http2.so.manifest mt.exe -manifest .\Debug\mod_http2.so.manifest -outputresource:.\Debug\mod_http2.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_http2.dep")
      +!INCLUDE "mod_http2.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_http2.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_http2 - Win32 Release" || "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\http2"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\http2"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\http2"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\http2"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\http2"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\http2"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\http2"
      +
      +!ENDIF 
      +
      +SOURCE=./h2_alt_svc.c
      +
      +"$(INTDIR)\h2_alt_svc.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_bucket_beam.c
      +
      +"$(INTDIR)/h2_bucket_beam.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_bucket_eoc.c
      +
      +"$(INTDIR)\h2_bucket_eoc.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_bucket_eos.c
      +
      +"$(INTDIR)\h2_bucket_eos.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_config.c
      +
      +"$(INTDIR)\h2_config.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_conn.c
      +
      +"$(INTDIR)\h2_conn.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_conn_io.c
      +
      +"$(INTDIR)\h2_conn_io.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_ctx.c
      +
      +"$(INTDIR)\h2_ctx.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_filter.c
      +
      +"$(INTDIR)\h2_filter.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_from_h1.c
      +
      +"$(INTDIR)\h2_from_h1.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_h2.c
      +
      +"$(INTDIR)\h2_h2.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_headers.c
      +
      +"$(INTDIR)\h2_headers.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_mplx.c
      +
      +"$(INTDIR)\h2_mplx.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_ngn_shed.c
      +
      +"$(INTDIR)\h2_ngn_shed.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_push.c
      +
      +"$(INTDIR)\h2_push.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_request.c
      +
      +"$(INTDIR)\h2_request.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_session.c
      +
      +"$(INTDIR)\h2_session.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_stream.c
      +
      +"$(INTDIR)\h2_stream.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_switch.c
      +
      +"$(INTDIR)\h2_switch.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_task.c
      +
      +"$(INTDIR)\h2_task.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_util.c
      +
      +"$(INTDIR)\h2_util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_worker.c
      +
      +"$(INTDIR)\h2_worker.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_workers.c
      +
      +"$(INTDIR)\h2_workers.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_http2 - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_http2.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_http2 - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_http2.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_http2.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_http2.so" /d LONG_NAME="http2_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=./mod_http2.c
      +
      +"$(INTDIR)\mod_http2.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/http2/mod_proxy_http2.c b/modules/http2/mod_proxy_http2.c
      new file mode 100644
      index 00000000000..1e2affabe1d
      --- /dev/null
      +++ b/modules/http2/mod_proxy_http2.c
      @@ -0,0 +1,656 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include <nghttp2/nghttp2.h>
      +
      +#include <httpd.h>
      +#include <mod_proxy.h>
      +#include "mod_http2.h"
      +
      +
      +#include "mod_proxy_http2.h"
      +#include "h2_request.h"
      +#include "h2_proxy_util.h"
      +#include "h2_version.h"
      +#include "h2_proxy_session.h"
      +
      +static void register_hook(apr_pool_t *p);
      +
      +AP_DECLARE_MODULE(proxy_http2) = {
      +    STANDARD20_MODULE_STUFF,
      +    NULL,              /* create per-directory config structure */
      +    NULL,              /* merge per-directory config structures */
      +    NULL,              /* create per-server config structure */
      +    NULL,              /* merge per-server config structures */
      +    NULL,              /* command apr_table_t */
      +    register_hook      /* register hooks */
      +};
      +
      +/* Optional functions from mod_http2 */
      +static int (*is_h2)(conn_rec *c);
      +static apr_status_t (*req_engine_push)(const char *name, request_rec *r, 
      +                                       http2_req_engine_init *einit);
      +static apr_status_t (*req_engine_pull)(h2_req_engine *engine, 
      +                                       apr_read_type_e block, 
      +                                       int capacity, 
      +                                       request_rec **pr);
      +static void (*req_engine_done)(h2_req_engine *engine, conn_rec *r_conn,
      +                               apr_status_t status);
      +                                       
      +typedef struct h2_proxy_ctx {
      +    conn_rec *owner;
      +    apr_pool_t *pool;
      +    request_rec *rbase;
      +    server_rec *server;
      +    const char *proxy_func;
      +    char server_portstr[32];
      +    proxy_conn_rec *p_conn;
      +    proxy_worker *worker;
      +    proxy_server_conf *conf;
      +    
      +    h2_req_engine *engine;
      +    const char *engine_id;
      +    const char *engine_type;
      +    apr_pool_t *engine_pool;    
      +    apr_size_t req_buffer_size;
      +    request_rec *next;
      +    int capacity;
      +    
      +    unsigned standalone : 1;
      +    unsigned is_ssl : 1;
      +    unsigned flushall : 1;
      +    
      +    apr_status_t r_status;     /* status of our first request work */
      +    h2_proxy_session *session; /* current http2 session against backend */
      +} h2_proxy_ctx;
      +
      +static int h2_proxy_post_config(apr_pool_t *p, apr_pool_t *plog,
      +                                apr_pool_t *ptemp, server_rec *s)
      +{
      +    void *data = NULL;
      +    const char *init_key = "mod_proxy_http2_init_counter";
      +    nghttp2_info *ngh2;
      +    apr_status_t status = APR_SUCCESS;
      +    (void)plog;(void)ptemp;
      +    
      +    apr_pool_userdata_get(&data, init_key, s->process->pool);
      +    if ( data == NULL ) {
      +        apr_pool_userdata_set((const void *)1, init_key,
      +                              apr_pool_cleanup_null, s->process->pool);
      +        return APR_SUCCESS;
      +    }
      +    
      +    ngh2 = nghttp2_version(0);
      +    ap_log_error( APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03349)
      +                 "mod_proxy_http2 (v%s, nghttp2 %s), initializing...",
      +                 MOD_HTTP2_VERSION, ngh2? ngh2->version_str : "unknown");
      +    
      +    is_h2 = APR_RETRIEVE_OPTIONAL_FN(http2_is_h2);
      +    req_engine_push = APR_RETRIEVE_OPTIONAL_FN(http2_req_engine_push);
      +    req_engine_pull = APR_RETRIEVE_OPTIONAL_FN(http2_req_engine_pull);
      +    req_engine_done = APR_RETRIEVE_OPTIONAL_FN(http2_req_engine_done);
      +    
      +    /* we need all of them */
      +    if (!req_engine_push || !req_engine_pull || !req_engine_done) {
      +        req_engine_push = NULL;
      +        req_engine_pull = NULL;
      +        req_engine_done = NULL;
      +    }
      +    
      +    return status;
      +}
      +
      +/**
      + * canonicalize the url into the request, if it is meant for us.
      + * slightly modified copy from mod_http
      + */
      +static int proxy_http2_canon(request_rec *r, char *url)
      +{
      +    char *host, *path, sport[7];
      +    char *search = NULL;
      +    const char *err;
      +    const char *scheme;
      +    const char *http_scheme;
      +    apr_port_t port, def_port;
      +
      +    /* ap_port_of_scheme() */
      +    if (ap_cstr_casecmpn(url, "h2c:", 4) == 0) {
      +        url += 4;
      +        scheme = "h2c";
      +        http_scheme = "http";
      +    }
      +    else if (ap_cstr_casecmpn(url, "h2:", 3) == 0) {
      +        url += 3;
      +        scheme = "h2";
      +        http_scheme = "https";
      +    }
      +    else {
      +        return DECLINED;
      +    }
      +    port = def_port = ap_proxy_port_of_scheme(http_scheme);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  "HTTP2: canonicalising URL %s", url);
      +
      +    /* do syntatic check.
      +     * We break the URL into host, port, path, search
      +     */
      +    err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03350)
      +                      "error parsing URL %s: %s", url, err);
      +        return HTTP_BAD_REQUEST;
      +    }
      +
      +    /*
      +     * now parse path/search args, according to rfc1738:
      +     * process the path.
      +     *
      +     * In a reverse proxy, our URL has been processed, so canonicalise
      +     * unless proxy-nocanon is set to say it's raw
      +     * In a forward proxy, we have and MUST NOT MANGLE the original.
      +     */
      +    switch (r->proxyreq) {
      +    default: /* wtf are we doing here? */
      +    case PROXYREQ_REVERSE:
      +        if (apr_table_get(r->notes, "proxy-nocanon")) {
      +            path = url;   /* this is the raw path */
      +        }
      +        else {
      +            path = ap_proxy_canonenc(r->pool, url, (int)strlen(url),
      +                                     enc_path, 0, r->proxyreq);
      +            search = r->args;
      +        }
      +        break;
      +    case PROXYREQ_PROXY:
      +        path = url;
      +        break;
      +    }
      +
      +    if (path == NULL) {
      +        return HTTP_BAD_REQUEST;
      +    }
      +
      +    if (port != def_port) {
      +        apr_snprintf(sport, sizeof(sport), ":%d", port);
      +    }
      +    else {
      +        sport[0] = '\0';
      +    }
      +
      +    if (ap_strchr_c(host, ':')) { /* if literal IPv6 address */
      +        host = apr_pstrcat(r->pool, "[", host, "]", NULL);
      +    }
      +    r->filename = apr_pstrcat(r->pool, "proxy:", scheme, "://", host, sport,
      +            "/", path, (search) ? "?" : "", (search) ? search : "", NULL);
      +    return OK;
      +}
      +
      +static void out_consumed(void *baton, conn_rec *c, apr_off_t bytes)
      +{
      +    h2_proxy_ctx *ctx = baton;
      +    
      +    if (ctx->session) {
      +        h2_proxy_session_update_window(ctx->session, c, bytes);
      +    }
      +}
      +
      +static apr_status_t proxy_engine_init(h2_req_engine *engine, 
      +                                        const char *id, 
      +                                        const char *type,
      +                                        apr_pool_t *pool, 
      +                                        apr_size_t req_buffer_size,
      +                                        request_rec *r,
      +                                        http2_output_consumed **pconsumed,
      +                                        void **pctx)
      +{
      +    h2_proxy_ctx *ctx = ap_get_module_config(r->connection->conn_config, 
      +                                             &proxy_http2_module);
      +    if (ctx) {
      +        conn_rec *c = ctx->owner;
      +        h2_proxy_ctx *nctx;
      +        
      +        /* we need another lifetime for this. If we do not host
      +         * an engine, the context lives in r->pool. Since we expect
      +         * to server more than r, we need to live longer */
      +        nctx = apr_pcalloc(pool, sizeof(*nctx));
      +        if (nctx == NULL) {
      +            return APR_ENOMEM;
      +        }
      +        memcpy(nctx, ctx, sizeof(*nctx));
      +        ctx = nctx;
      +        ctx->pool = pool;
      +        ctx->engine = engine;
      +        ctx->engine_id = id;
      +        ctx->engine_type = type;
      +        ctx->engine_pool = pool;
      +        ctx->req_buffer_size = req_buffer_size;
      +        ctx->capacity = 100;
      +
      +        ap_set_module_config(c->conn_config, &proxy_http2_module, ctx);
      +
      +        *pconsumed = out_consumed;
      +        *pctx = ctx;
      +        return APR_SUCCESS;
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(03368)
      +                  "h2_proxy_session, engine init, no ctx found");
      +    return APR_ENOTIMPL;
      +}
      +
      +static apr_status_t add_request(h2_proxy_session *session, request_rec *r)
      +{
      +    h2_proxy_ctx *ctx = session->user_data;
      +    const char *url;
      +    apr_status_t status;
      +
      +    url = apr_table_get(r->notes, H2_PROXY_REQ_URL_NOTE);
      +    apr_table_setn(r->notes, "proxy-source-port", apr_psprintf(r->pool, "%hu",
      +                   ctx->p_conn->connection->local_addr->port));
      +    status = h2_proxy_session_submit(session, url, r, ctx->standalone);
      +    if (status != APR_SUCCESS) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, status, r->connection, APLOGNO(03351)
      +                      "pass request body failed to %pI (%s) from %s (%s)",
      +                      ctx->p_conn->addr, ctx->p_conn->hostname ? 
      +                      ctx->p_conn->hostname: "", session->c->client_ip, 
      +                      session->c->remote_host ? session->c->remote_host: "");
      +    }
      +    return status;
      +}
      +
      +static void request_done(h2_proxy_session *session, request_rec *r,
      +                         apr_status_t status, int touched)
      +{   
      +    h2_proxy_ctx *ctx = session->user_data;
      +    const char *task_id = apr_table_get(r->connection->notes, H2_TASK_ID_NOTE);
      +
      +    if (status != APR_SUCCESS) {
      +        if (!touched) {
      +            /* untouched request, need rescheduling */
      +            if (req_engine_push && is_h2 && is_h2(ctx->owner)) {
      +                if (req_engine_push(ctx->engine_type, r, NULL) == APR_SUCCESS) {
      +                    /* push to engine */
      +                    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, r->connection, 
      +                                  APLOGNO(03369)
      +                                  "h2_proxy_session(%s): rescheduled request %s",
      +                                  ctx->engine_id, task_id);
      +                    return;
      +                }
      +            }
      +        }
      +        else {
      +            const char *uri;
      +            uri = apr_uri_unparse(r->pool, &r->parsed_uri, 0);
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, r->connection, 
      +                          APLOGNO(03471) "h2_proxy_session(%s): request %s -> %s "
      +                          "not complete, was touched",
      +                          ctx->engine_id, task_id, uri);
      +        }
      +    }
      +    
      +    if (r == ctx->rbase) {
      +        ctx->r_status = (status == APR_SUCCESS)? APR_SUCCESS : HTTP_SERVICE_UNAVAILABLE;
      +    }
      +    
      +    if (req_engine_done && ctx->engine) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, r->connection, 
      +                      APLOGNO(03370)
      +                      "h2_proxy_session(%s): finished request %s",
      +                      ctx->engine_id, task_id);
      +        req_engine_done(ctx->engine, r->connection, status);
      +    }
      +}    
      +
      +static apr_status_t next_request(h2_proxy_ctx *ctx, int before_leave)
      +{
      +    if (ctx->next) {
      +        return APR_SUCCESS;
      +    }
      +    else if (req_engine_pull && ctx->engine) {
      +        apr_status_t status;
      +        status = req_engine_pull(ctx->engine, before_leave? 
      +                                 APR_BLOCK_READ: APR_NONBLOCK_READ, 
      +                                 ctx->capacity, &ctx->next);
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE3, status, ctx->owner, 
      +                      "h2_proxy_engine(%s): pulled request (%s) %s", 
      +                      ctx->engine_id, 
      +                      before_leave? "before leave" : "regular", 
      +                      (ctx->next? ctx->next->the_request : "NULL"));
      +        return APR_STATUS_IS_EAGAIN(status)? APR_SUCCESS : status;
      +    }
      +    return APR_EOF;
      +}
      +
      +static apr_status_t proxy_engine_run(h2_proxy_ctx *ctx) {
      +    apr_status_t status = OK;
      +    int h2_front;
      +    
      +    /* Step Four: Send the Request in a new HTTP/2 stream and
      +     * loop until we got the response or encounter errors.
      +     */
      +    ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, ctx->owner, 
      +                  "eng(%s): setup session", ctx->engine_id);
      +    h2_front = is_h2? is_h2(ctx->owner) : 0;
      +    ctx->session = h2_proxy_session_setup(ctx->engine_id, ctx->p_conn, ctx->conf,
      +                                          h2_front, 30, 
      +                                          h2_proxy_log2((int)ctx->req_buffer_size), 
      +                                          request_done);
      +    if (!ctx->session) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->owner, 
      +                      APLOGNO(03372) "session unavailable");
      +        return HTTP_SERVICE_UNAVAILABLE;
      +    }
      +    
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->owner, APLOGNO(03373)
      +                  "eng(%s): run session %s", ctx->engine_id, ctx->session->id);
      +    ctx->session->user_data = ctx;
      +    
      +    while (1) {
      +        if (ctx->next) {
      +            add_request(ctx->session, ctx->next);
      +            ctx->next = NULL;
      +        }
      +        
      +        status = h2_proxy_session_process(ctx->session);
      +        
      +        if (status == APR_SUCCESS) {
      +            apr_status_t s2;
      +            /* ongoing processing, call again */
      +            if (ctx->session->remote_max_concurrent > 0
      +                && ctx->session->remote_max_concurrent != ctx->capacity) {
      +                ctx->capacity = (int)ctx->session->remote_max_concurrent;
      +            }
      +            s2 = next_request(ctx, 0);
      +            if (s2 == APR_ECONNABORTED) {
      +                /* master connection gone */
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, s2, ctx->owner, 
      +                              APLOGNO(03374) "eng(%s): pull request", 
      +                              ctx->engine_id);
      +                /* give notice that we're leaving and cancel all ongoing
      +                 * streams. */
      +                next_request(ctx, 1); 
      +                h2_proxy_session_cancel_all(ctx->session);
      +                h2_proxy_session_process(ctx->session);
      +                status = ctx->r_status = APR_SUCCESS;
      +                break;
      +            }
      +            if (!ctx->next && h2_proxy_ihash_empty(ctx->session->streams)) {
      +                break;
      +            }
      +        }
      +        else {
      +            /* end of processing, maybe error */
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, ctx->owner, 
      +                          APLOGNO(03375) "eng(%s): end of session %s", 
      +                          ctx->engine_id, ctx->session->id);
      +            /*
      +             * Any open stream of that session needs to
      +             * a) be reopened on the new session iff safe to do so
      +             * b) reported as done (failed) otherwise
      +             */
      +            h2_proxy_session_cleanup(ctx->session, request_done);
      +            break;
      +        }
      +    }
      +    
      +    ctx->session->user_data = NULL;
      +    ctx->session = NULL;
      +    
      +    return status;
      +}
      +
      +static h2_proxy_ctx *push_request_somewhere(h2_proxy_ctx *ctx)
      +{
      +    conn_rec *c = ctx->owner;
      +    const char *engine_type, *hostname;
      +    
      +    hostname = (ctx->p_conn->ssl_hostname? 
      +                ctx->p_conn->ssl_hostname : ctx->p_conn->hostname);
      +    engine_type = apr_psprintf(ctx->pool, "proxy_http2 %s%s", hostname, 
      +                               ctx->server_portstr);
      +    
      +    if (c->master && req_engine_push && ctx->next && is_h2 && is_h2(c)) {
      +        /* If we are have req_engine capabilities, push the handling of this
      +         * request (e.g. slave connection) to a proxy_http2 engine which 
      +         * uses the same backend. We may be called to create an engine 
      +         * ourself. */
      +        if (req_engine_push(engine_type, ctx->next, proxy_engine_init)
      +            == APR_SUCCESS) {
      +            /* to renew the lifetime, we might have set a new ctx */
      +            ctx = ap_get_module_config(c->conn_config, &proxy_http2_module);
      +            if (ctx->engine == NULL) {
      +                /* Another engine instance has taken over processing of this
      +                 * request. */
      +                ctx->r_status = SUSPENDED;
      +                ctx->next = NULL;
      +                return ctx;
      +            }
      +        }
      +    }
      +    
      +    if (!ctx->engine) {
      +        /* No engine was available or has been initialized, handle this
      +         * request just by ourself. */
      +        ctx->engine_id = apr_psprintf(ctx->pool, "eng-proxy-%ld", c->id);
      +        ctx->engine_type = engine_type;
      +        ctx->engine_pool = ctx->pool;
      +        ctx->req_buffer_size = (32*1024);
      +        ctx->standalone = 1;
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                      "h2_proxy_http2(%ld): setup standalone engine for type %s", 
      +                      c->id, engine_type);
      +    }
      +    else {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                      "H2: hosting engine %s", ctx->engine_id);
      +    }
      +    return ctx;
      +}
      +
      +static int proxy_http2_handler(request_rec *r, 
      +                               proxy_worker *worker,
      +                               proxy_server_conf *conf,
      +                               char *url, 
      +                               const char *proxyname,
      +                               apr_port_t proxyport)
      +{
      +    const char *proxy_func;
      +    char *locurl = url, *u;
      +    apr_size_t slen;
      +    int is_ssl = 0;
      +    apr_status_t status;
      +    h2_proxy_ctx *ctx;
      +    apr_uri_t uri;
      +    int reconnected = 0;
      +    
      +    /* find the scheme */
      +    if ((url[0] != 'h' && url[0] != 'H') || url[1] != '2') {
      +       return DECLINED;
      +    }
      +    u = strchr(url, ':');
      +    if (u == NULL || u[1] != '/' || u[2] != '/' || u[3] == '\0') {
      +       return DECLINED;
      +    }
      +    slen = (u - url);
      +    switch(slen) {
      +        case 2:
      +            proxy_func = "H2";
      +            is_ssl = 1;
      +            break;
      +        case 3:
      +            if (url[2] != 'c' && url[2] != 'C') {
      +                return DECLINED;
      +            }
      +            proxy_func = "H2C";
      +            break;
      +        default:
      +            return DECLINED;
      +    }
      +    ctx = apr_pcalloc(r->pool, sizeof(*ctx));
      +    ctx->owner      = r->connection;
      +    ctx->pool       = r->pool;
      +    ctx->rbase      = r;
      +    ctx->server     = r->server;
      +    ctx->proxy_func = proxy_func;
      +    ctx->is_ssl     = is_ssl;
      +    ctx->worker     = worker;
      +    ctx->conf       = conf;
      +    ctx->flushall   = apr_table_get(r->subprocess_env, "proxy-flushall")? 1 : 0;
      +    ctx->r_status   = HTTP_SERVICE_UNAVAILABLE;
      +    ctx->next       = r;
      +    r = NULL;
      +    ap_set_module_config(ctx->owner->conn_config, &proxy_http2_module, ctx);
      +
      +    /* scheme says, this is for us. */
      +    apr_table_setn(ctx->rbase->notes, H2_PROXY_REQ_URL_NOTE, url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, ctx->rbase, 
      +                  "H2: serving URL %s", url);
      +    
      +run_connect:    
      +    /* Get a proxy_conn_rec from the worker, might be a new one, might
      +     * be one still open from another request, or it might fail if the
      +     * worker is stopped or in error. */
      +    if ((status = ap_proxy_acquire_connection(ctx->proxy_func, &ctx->p_conn,
      +                                              ctx->worker, ctx->server)) != OK) {
      +        goto cleanup;
      +    }
      +
      +    ctx->p_conn->is_ssl = ctx->is_ssl;
      +    if (ctx->is_ssl && ctx->p_conn->connection) {
      +        /* If there are some metadata on the connection (e.g. TLS alert),
      +         * let mod_ssl detect them, and create a new connection below.
      +         */ 
      +        apr_bucket_brigade *tmp_bb;
      +        tmp_bb = apr_brigade_create(ctx->rbase->pool, 
      +                                    ctx->rbase->connection->bucket_alloc);
      +        status = ap_get_brigade(ctx->p_conn->connection->input_filters, tmp_bb,
      +                                AP_MODE_SPECULATIVE, APR_NONBLOCK_READ, 1);
      +        if (status != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(status)) {
      +            ctx->p_conn->close = 1;
      +        }
      +        apr_brigade_cleanup(tmp_bb);
      +    }   
      +
      +    /* Step One: Determine the URL to connect to (might be a proxy),
      +     * initialize the backend accordingly and determine the server 
      +     * port string we can expect in responses. */
      +    if ((status = ap_proxy_determine_connection(ctx->pool, ctx->rbase, conf, worker, 
      +                                                ctx->p_conn, &uri, &locurl, 
      +                                                proxyname, proxyport, 
      +                                                ctx->server_portstr,
      +                                                sizeof(ctx->server_portstr))) != OK) {
      +        goto cleanup;
      +    }
      +    
      +    /* If we are not already hosting an engine, try to push the request 
      +     * to an already existing engine or host a new engine here. */
      +    if (!ctx->engine) {
      +        ctx = push_request_somewhere(ctx);
      +        if (ctx->r_status == SUSPENDED) {
      +            /* request was pushed to another engine */
      +            goto cleanup;
      +        }
      +    }
      +    
      +    /* Step Two: Make the Connection (or check that an already existing
      +     * socket is still usable). On success, we have a socket connected to
      +     * backend->hostname. */
      +    if (ap_proxy_connect_backend(ctx->proxy_func, ctx->p_conn, ctx->worker, 
      +                                 ctx->server)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->owner, APLOGNO(03352)
      +                      "H2: failed to make connection to backend: %s",
      +                      ctx->p_conn->hostname);
      +        goto cleanup;
      +    }
      +    
      +    /* Step Three: Create conn_rec for the socket we have open now. */
      +    if (!ctx->p_conn->connection) {
      +        if ((status = ap_proxy_connection_create(ctx->proxy_func, ctx->p_conn,
      +                                                 ctx->owner, 
      +                                                 ctx->server)) != OK) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, ctx->owner, APLOGNO(03353)
      +                          "setup new connection: is_ssl=%d %s %s %s", 
      +                          ctx->p_conn->is_ssl, ctx->p_conn->ssl_hostname, 
      +                          locurl, ctx->p_conn->hostname);
      +            goto cleanup;
      +        }
      +        
      +        if (!ctx->p_conn->data) {
      +            /* New conection: set a note on the connection what CN is
      +             * requested and what protocol we want */
      +            if (ctx->p_conn->ssl_hostname) {
      +                apr_table_setn(ctx->p_conn->connection->notes,
      +                               "proxy-request-hostname", ctx->p_conn->ssl_hostname);
      +            }
      +            if (ctx->is_ssl) {
      +                apr_table_setn(ctx->p_conn->connection->notes,
      +                               "proxy-request-alpn-protos", "h2");
      +            }
      +        }
      +    }
      +
      +run_session:
      +    status = proxy_engine_run(ctx);
      +    if (status == APR_SUCCESS) {
      +        /* session and connection still ok */
      +        if (next_request(ctx, 1) == APR_SUCCESS) {
      +            /* more requests, run again */
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, ctx->owner, APLOGNO(03376)
      +                          "run_session, again");
      +            goto run_session;
      +        }
      +        /* done */
      +        ctx->engine = NULL;
      +    }
      +
      +cleanup:
      +    if (!reconnected && ctx->engine && next_request(ctx, 1) == APR_SUCCESS) {
      +        /* Still more to do, tear down old conn and start over */
      +        if (ctx->p_conn) {
      +            ctx->p_conn->close = 1;
      +            /*only in trunk so far */
      +            /*proxy_run_detach_backend(r, ctx->p_conn);*/
      +            ap_proxy_release_connection(ctx->proxy_func, ctx->p_conn, ctx->server);
      +            ctx->p_conn = NULL;
      +        }
      +        reconnected = 1; /* we do this only once, then fail */
      +        goto run_connect;
      +    }
      +    
      +    if (ctx->p_conn) {
      +        if (status != APR_SUCCESS) {
      +            /* close socket when errors happened or session shut down (EOF) */
      +            ctx->p_conn->close = 1;
      +        }
      +        /*only in trunk so far */
      +        /*proxy_run_detach_backend(ctx->rbase, ctx->p_conn);*/
      +        ap_proxy_release_connection(ctx->proxy_func, ctx->p_conn, ctx->server);
      +        ctx->p_conn = NULL;
      +    }
      +
      +    ap_set_module_config(ctx->owner->conn_config, &proxy_http2_module, NULL);
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, status, ctx->owner, 
      +                  APLOGNO(03377) "leaving handler");
      +    return ctx->r_status;
      +}
      +
      +static void register_hook(apr_pool_t *p)
      +{
      +    ap_hook_post_config(h2_proxy_post_config, NULL, NULL, APR_HOOK_MIDDLE);
      +
      +    proxy_hook_scheme_handler(proxy_http2_handler, NULL, NULL, APR_HOOK_FIRST);
      +    proxy_hook_canon_handler(proxy_http2_canon, NULL, NULL, APR_HOOK_FIRST);
      +}
      +
      diff --git a/modules/http2/mod_proxy_http2.dep b/modules/http2/mod_proxy_http2.dep
      new file mode 100644
      index 00000000000..641fca64f1a
      --- /dev/null
      +++ b/modules/http2/mod_proxy_http2.dep
      @@ -0,0 +1,208 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_http2.mak
      +
      +./h2_proxy_session.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_proxy.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2ver.h"\
      +	".\h2.h"\
      +	".\h2_proxy_session.h"\
      +	".\h2_proxy_util.h"\
      +	".\mod_http2.h"\
      +	
      +
      +./h2_proxy_util.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2ver.h"\
      +	".\h2.h"\
      +	".\h2_proxy_util.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +./mod_proxy_http2.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_proxy.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2.h"\
      +	"..\..\srclib\nghttp2\lib\includes\nghttp2\nghttp2ver.h"\
      +	".\h2.h"\
      +	".\h2_proxy_session.h"\
      +	".\h2_request.h"\
      +	".\h2_proxy_util.h"\
      +	".\h2_version.h"\
      +	".\mod_http2.h"\
      +	".\mod_proxy_http2.h"\
      +	
      diff --git a/modules/http2/mod_proxy_http2.dsp b/modules/http2/mod_proxy_http2.dsp
      new file mode 100644
      index 00000000000..5d6305fdf71
      --- /dev/null
      +++ b/modules/http2/mod_proxy_http2.dsp
      @@ -0,0 +1,119 @@
      +# Microsoft Developer Studio Project File - Name="mod_proxy_http2" - Package Owner=<4>
      +# Microsoft Developer Studio Generated Build File, Format Version 6.00
      +# ** DO NOT EDIT **
      +
      +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
      +
      +CFG=mod_proxy_http2 - Win32 Release
      +!MESSAGE This is not a valid makefile. To build this project using NMAKE,
      +!MESSAGE use the Export Makefile command and run
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_http2.mak".
      +!MESSAGE 
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_http2.mak" CFG="mod_proxy_http2 - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_http2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_http2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +
      +# Begin Project
      +# PROP AllowPerConfigDependencies 0
      +# PROP Scc_ProjName ""
      +# PROP Scc_LocalPath ""
      +CPP=cl.exe
      +MTL=midl.exe
      +RSC=rc.exe
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 0
      +# PROP BASE Output_Dir "Release"
      +# PROP BASE Intermediate_Dir "Release"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 0
      +# PROP Output_Dir "Release"
      +# PROP Intermediate_Dir "Release"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Release\mod_proxy_http2_src" /FD /c
      +# ADD BASE MTL /nologo /D "NDEBUG" /win32
      +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /out:".\Release\mod_proxy_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so
      +# ADD LINK32 kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Release\mod_proxy_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so /opt:ref
      +# Begin Special Build Tool
      +TargetPath=.\Release\mod_proxy_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +# PROP BASE Use_MFC 0
      +# PROP BASE Use_Debug_Libraries 1
      +# PROP BASE Output_Dir "Debug"
      +# PROP BASE Intermediate_Dir "Debug"
      +# PROP BASE Target_Dir ""
      +# PROP Use_MFC 0
      +# PROP Use_Debug_Libraries 1
      +# PROP Output_Dir "Debug"
      +# PROP Intermediate_Dir "Debug"
      +# PROP Ignore_Export_Lib 0
      +# PROP Target_Dir ""
      +# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "ssize_t=long" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ssize_t=long" /Fd"Debug\mod_proxy_http2_src" /FD /c
      +# ADD BASE MTL /nologo /D "_DEBUG" /win32
      +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      +# ADD BASE RSC /l 0x409 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache"
      +BSC32=bscmake.exe
      +# ADD BASE BSC32 /nologo
      +# ADD BSC32 /nologo
      +LINK32=link.exe
      +# ADD BASE LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_proxy_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so
      +# ADD LINK32 kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /incremental:no /debug /out:".\Debug\mod_proxy_http2.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so
      +# Begin Special Build Tool
      +TargetPath=.\Debug\mod_proxy_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      +# End Special Build Tool
      +
      +!ENDIF 
      +
      +# Begin Target
      +
      +# Name "mod_proxy_http2 - Win32 Release"
      +# Name "mod_proxy_http2 - Win32 Debug"
      +# Begin Source File
      +
      +SOURCE=./h2_proxy_session.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./h2_proxy_util.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=./mod_proxy_http2.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +# End Source File
      +# End Target
      +# End Project
      diff --git a/modules/http2/mod_proxy_http2.h b/modules/http2/mod_proxy_http2.h
      new file mode 100644
      index 00000000000..7da84f0fcee
      --- /dev/null
      +++ b/modules/http2/mod_proxy_http2.h
      @@ -0,0 +1,20 @@
      +/* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
      + *
      + * Licensed under the Apache License, Version 2.0 (the "License");
      + * you may not use this file except in compliance with the License.
      + * You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + 
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef __MOD_PROXY_HTTP2_H__
      +#define __MOD_PROXY_HTTP2_H__
      +
      +
      +#endif
      diff --git a/modules/http2/mod_proxy_http2.mak b/modules/http2/mod_proxy_http2.mak
      new file mode 100644
      index 00000000000..e8e06241fcd
      --- /dev/null
      +++ b/modules/http2/mod_proxy_http2.mak
      @@ -0,0 +1,427 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_http2.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_http2 - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_http2 - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_http2 - Win32 Release" && "$(CFG)" != "mod_proxy_http2 - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_http2.mak" CFG="mod_proxy_http2 - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_http2 - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_http2 - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "mod_http2 - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_http2 - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\h2_proxy_session.obj"
      +	-@erase "$(INTDIR)\h2_proxy_util.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http2.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http2.res"
      +	-@erase "$(INTDIR)\mod_proxy_http2_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_http2_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D ssize_t=long /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_http2_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_http2.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib nghttp2.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_http2.pdb" /debug /out:"$(OUTDIR)\mod_proxy_http2.so" /implib:"$(OUTDIR)\mod_proxy_http2.lib" /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\h2_proxy_session.obj" \
      +	"$(INTDIR)\h2_proxy_util.obj" \
      +	"$(INTDIR)\mod_proxy_http2.obj" \
      +	"$(INTDIR)\mod_proxy_http2.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_http2.lib" \
      +	"..\proxy\Release\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_http2.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_http2.so"
      +   if exist .\Release\mod_proxy_http2.so.manifest mt.exe -manifest .\Release\mod_proxy_http2.so.manifest -outputresource:.\Release\mod_proxy_http2.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "mod_http2 - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_http2.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_http2 - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\h2_proxy_session.obj"
      +	-@erase "$(INTDIR)\h2_proxy_util.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http2.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http2.res"
      +	-@erase "$(INTDIR)\mod_proxy_http2_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_http2_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http2.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/nghttp2/lib/includes" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D ssize_t=long /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_http2_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_http2.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib nghttp2d.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_http2.pdb" /debug /out:"$(OUTDIR)\mod_proxy_http2.so" /implib:"$(OUTDIR)\mod_proxy_http2.lib" /libpath:"..\..\srclib\nghttp2\lib\MSVC_obj" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http2.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\h2_proxy_session.obj" \
      +	"$(INTDIR)\h2_proxy_util.obj" \
      +	"$(INTDIR)\mod_proxy_http2.obj" \
      +	"$(INTDIR)\mod_proxy_http2.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_http2.lib" \
      +	"..\proxy\Debug\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_http2.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_http2.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_http2.so"
      +   if exist .\Debug\mod_proxy_http2.so.manifest mt.exe -manifest .\Debug\mod_proxy_http2.so.manifest -outputresource:.\Debug\mod_proxy_http2.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_http2.dep")
      +!INCLUDE "mod_proxy_http2.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_http2.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_http2 - Win32 Release" || "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\http2"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\http2"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\http2"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\http2"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\http2"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\http2"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\http2"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\http2"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +"mod_http2 - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_http2.mak" CFG="mod_http2 - Win32 Release" 
      +   cd "."
      +
      +"mod_http2 - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_http2.mak" CFG="mod_http2 - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +"mod_http2 - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_http2.mak" CFG="mod_http2 - Win32 Debug" 
      +   cd "."
      +
      +"mod_http2 - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_http2.mak" CFG="mod_http2 - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd ".\..\proxy"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "..\http2"
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd ".\..\proxy"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\http2"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd ".\..\proxy"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "..\http2"
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd ".\..\proxy"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\http2"
      +
      +!ENDIF 
      +
      +SOURCE=./h2_proxy_session.c
      +
      +"$(INTDIR)\h2_proxy_session.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=./h2_proxy_util.c
      +
      +"$(INTDIR)\h2_proxy_util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_http2 - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_http2.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /i "\Build11\httpd-2.4.21-dev-mph2\build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http2 - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_http2.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_http2.res" /i "../../include" /i "../../srclib/apr/include" /i "\Build11\httpd-2.4.21-dev-mph2\build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_http2.so" /d LONG_NAME="http2_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=./mod_proxy_http2.c
      +
      +"$(INTDIR)\mod_proxy_http2.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/ldap/mod_ldap.dep b/modules/ldap/mod_ldap.dep
      new file mode 100644
      index 00000000000..37dfd9e214c
      --- /dev/null
      +++ b/modules/ldap/mod_ldap.dep
      @@ -0,0 +1,192 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_ldap.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\util_ldap.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_ldap.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_init.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_option.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_rebind.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_url.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_rmm.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\util_ldap_cache.h"\
      +	
      +
      +.\util_ldap_cache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_init.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_option.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_rebind.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_url.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_rmm.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\util_ldap_cache.h"\
      +	
      +
      +.\util_ldap_cache_mgr.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_init.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_option.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_rebind.h"\
      +	"..\..\srclib\apr-util\include\apr_ldap_url.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_rmm.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\util_ldap_cache.h"\
      +	
      diff --git a/modules/ldap/mod_ldap.mak b/modules/ldap/mod_ldap.mak
      new file mode 100644
      index 00000000000..23ab7fea38c
      --- /dev/null
      +++ b/modules/ldap/mod_ldap.mak
      @@ -0,0 +1,371 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_ldap.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_ldap - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_ldap - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_ldap - Win32 Release" && "$(CFG)" != "mod_ldap - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_ldap.mak" CFG="mod_ldap - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_ldap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_ldap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ldap - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ldap.res"
      +	-@erase "$(INTDIR)\mod_ldap_src.idb"
      +	-@erase "$(INTDIR)\mod_ldap_src.pdb"
      +	-@erase "$(INTDIR)\util_ldap.obj"
      +	-@erase "$(INTDIR)\util_ldap_cache.obj"
      +	-@erase "$(INTDIR)\util_ldap_cache_mgr.obj"
      +	-@erase "$(OUTDIR)\mod_ldap.exp"
      +	-@erase "$(OUTDIR)\mod_ldap.lib"
      +	-@erase "$(OUTDIR)\mod_ldap.pdb"
      +	-@erase "$(OUTDIR)\mod_ldap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "LDAP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ldap_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ldap.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ldap.so" /d LONG_NAME="ldap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ldap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ldap.pdb" /debug /out:"$(OUTDIR)\mod_ldap.so" /implib:"$(OUTDIR)\mod_ldap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ldap.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\util_ldap.obj" \
      +	"$(INTDIR)\util_ldap_cache.obj" \
      +	"$(INTDIR)\util_ldap_cache_mgr.obj" \
      +	"$(INTDIR)\mod_ldap.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ldap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_ldap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ldap.so"
      +   if exist .\Release\mod_ldap.so.manifest mt.exe -manifest .\Release\mod_ldap.so.manifest -outputresource:.\Release\mod_ldap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ldap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ldap.res"
      +	-@erase "$(INTDIR)\mod_ldap_src.idb"
      +	-@erase "$(INTDIR)\mod_ldap_src.pdb"
      +	-@erase "$(INTDIR)\util_ldap.obj"
      +	-@erase "$(INTDIR)\util_ldap_cache.obj"
      +	-@erase "$(INTDIR)\util_ldap_cache_mgr.obj"
      +	-@erase "$(OUTDIR)\mod_ldap.exp"
      +	-@erase "$(OUTDIR)\mod_ldap.lib"
      +	-@erase "$(OUTDIR)\mod_ldap.pdb"
      +	-@erase "$(OUTDIR)\mod_ldap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "LDAP_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ldap_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ldap.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ldap.so" /d LONG_NAME="ldap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ldap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib wldap32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ldap.pdb" /debug /out:"$(OUTDIR)\mod_ldap.so" /implib:"$(OUTDIR)\mod_ldap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ldap.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\util_ldap.obj" \
      +	"$(INTDIR)\util_ldap_cache.obj" \
      +	"$(INTDIR)\util_ldap_cache_mgr.obj" \
      +	"$(INTDIR)\mod_ldap.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ldap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_ldap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ldap.so"
      +   if exist .\Debug\mod_ldap.so.manifest mt.exe -manifest .\Debug\mod_ldap.so.manifest -outputresource:.\Debug\mod_ldap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_ldap.dep")
      +!INCLUDE "mod_ldap.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_ldap.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_ldap - Win32 Release" || "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_ldap - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\ldap"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ldap"
      +
      +!ELSEIF  "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\ldap"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ldap"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ldap - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\ldap"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ldap"
      +
      +!ELSEIF  "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\ldap"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ldap"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ldap - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\ldap"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\ldap"
      +
      +!ELSEIF  "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\ldap"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\ldap"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_ldap - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_ldap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ldap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_ldap.so" /d LONG_NAME="ldap_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_ldap - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_ldap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ldap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_ldap.so" /d LONG_NAME="ldap_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\util_ldap.c
      +
      +"$(INTDIR)\util_ldap.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\util_ldap_cache.c
      +
      +"$(INTDIR)\util_ldap_cache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\util_ldap_cache_mgr.c
      +
      +"$(INTDIR)\util_ldap_cache_mgr.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c
      index 492af95037d..52acafb06a1 100644
      --- a/modules/ldap/util_ldap.c
      +++ b/modules/ldap/util_ldap.c
      @@ -60,6 +60,7 @@
       #endif
       
       #define AP_LDAP_HOPLIMIT_UNSET -1
      +#define AP_LDAP_CHASEREFERRALS_SDKDEFAULT -1
       #define AP_LDAP_CHASEREFERRALS_OFF 0
       #define AP_LDAP_CHASEREFERRALS_ON 1
       
      @@ -156,14 +157,17 @@ static void uldap_connection_close(util_ldap_connection_t *ldc)
             */
            if (!ldc->keep) {
                uldap_connection_unbind(ldc);
      +         ldc->r = NULL;
            }
            else {
                /* mark our connection as available for reuse */
                ldc->freed = apr_time_now();
      +         ldc->r = NULL;
      +     }
      +
       #if APR_HAS_THREADS
      -         apr_thread_mutex_unlock(ldc->lock);
      +     apr_thread_mutex_unlock(ldc->lock);
       #endif
      -     }
       }
       
       
      @@ -178,6 +182,9 @@ static apr_status_t uldap_connection_unbind(void *param)
       
           if (ldc) {
               if (ldc->ldap) {
      +            if (ldc->r) { 
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, ldc->r, "LDC %pp unbind", ldc); 
      +            }
                   ldap_unbind_s(ldc->ldap);
                   ldc->ldap = NULL;
               }
      @@ -202,8 +209,9 @@ static apr_status_t uldap_connection_unbind(void *param)
        *
        * The caller should hold the lock for this connection
        */
      -static apr_status_t util_ldap_connection_remove (void *param) {
      -    util_ldap_connection_t *ldc = param, *l  = NULL, *prev = NULL;
      +static apr_status_t util_ldap_connection_remove (void *param)
      +{
      +    util_ldap_connection_t *ldc = param, *l = NULL, *prev = NULL;
           util_ldap_state_t *st;
       
           if (!ldc) return APR_SUCCESS;
      @@ -262,6 +270,23 @@ static int uldap_connection_init(request_rec *r,
           util_ldap_state_t *st =
               (util_ldap_state_t *)ap_get_module_config(r->server->module_config,
               &ldap_module);
      +    int have_client_certs = !apr_is_empty_array(ldc->client_certs);
      +#if !APR_HAS_SOLARIS_LDAPSDK
      +    /*
      +     * Normally we enable SSL/TLS with apr_ldap_set_option(), except
      +     * with Solaris LDAP, where this is broken.
      +     */
      +    int secure = APR_LDAP_NONE;
      +#else
      +    /*
      +     * With Solaris LDAP, we enable TSL via the secure argument
      +     * to apr_ldap_init(). This requires a fix from apr-util >= 1.4.0.
      +     *
      +     * Just in case client certificates ever get supported, we
      +     * handle those as with the other LDAP SDKs.
      +     */
      +    int secure = have_client_certs ? APR_LDAP_NONE : ldc->secure;
      +#endif
       
           /* Since the host will include a port if the default port is not used,
            * always specify the default ports for the port parameter.  This will
      @@ -272,8 +297,7 @@ static int uldap_connection_init(request_rec *r,
           apr_ldap_init(r->pool, &(ldc->ldap),
                         ldc->host,
                         APR_LDAP_SSL == ldc->secure ? LDAPS_PORT : LDAP_PORT,
      -                  APR_LDAP_NONE,
      -                  &(result));
      +                  secure, &(result));
       
           if (NULL == result) {
               /* something really bad happened */
      @@ -302,11 +326,13 @@ static int uldap_connection_init(request_rec *r,
               return(result->rc);
           }
       
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "LDC %pp init", ldc);
      +
           if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) {
               /* Now that we have an ldap struct, add it to the referral list for rebinds. */
               rc = apr_ldap_rebind_add(ldc->rebind_pool, ldc->ldap, ldc->binddn, ldc->bindpw);
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server, APLOGNO(01277)
                           "LDAP: Unable to add rebind cross reference entry. Out of memory?");
                   uldap_connection_unbind(ldc);
                   ldc->reason = "LDAP: Unable to add rebind cross reference entry.";
      @@ -318,7 +344,7 @@ static int uldap_connection_init(request_rec *r,
           ldap_set_option(ldc->ldap, LDAP_OPT_PROTOCOL_VERSION, &version);
       
           /* set client certificates */
      -    if (!apr_is_empty_array(ldc->client_certs)) {
      +    if (have_client_certs) {
               apr_ldap_set_option(r->pool, ldc->ldap, APR_LDAP_OPT_TLS_CERT,
                                   ldc->client_certs, &(result));
               if (LDAP_SUCCESS != result->rc) {
      @@ -329,7 +355,12 @@ static int uldap_connection_init(request_rec *r,
           }
       
           /* switch on SSL/TLS */
      -    if (APR_LDAP_NONE != ldc->secure) {
      +    if (APR_LDAP_NONE != ldc->secure
      +#if APR_HAS_SOLARIS_LDAPSDK
      +        /* See comments near apr_ldap_init() above */
      +        && have_client_certs
      +#endif
      +       ) {
               apr_ldap_set_option(r->pool, ldc->ldap,
                                   APR_LDAP_OPT_TLS, &ldc->secure, &(result));
               if (LDAP_SUCCESS != result->rc) {
      @@ -343,9 +374,9 @@ static int uldap_connection_init(request_rec *r,
           ldap_option = ldc->deref;
           ldap_set_option(ldc->ldap, LDAP_OPT_DEREF, &ldap_option);
       
      -    if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) {
      +    if (ldc->ChaseReferrals != AP_LDAP_CHASEREFERRALS_SDKDEFAULT) {
               /* Set options for rebind and referrals. */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +        ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server, APLOGNO(01278)
                       "LDAP: Setting referrals to %s.",
                       ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off"));
               apr_ldap_set_option(r->pool, ldc->ldap,
      @@ -354,7 +385,7 @@ static int uldap_connection_init(request_rec *r,
                           LDAP_OPT_ON : LDAP_OPT_OFF),
                       &(result));
               if (result->rc != LDAP_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01279)
                           "Unable to set LDAP_OPT_REFERRALS option to %s: %d.",
                           ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off"),
                           result->rc);
      @@ -363,10 +394,12 @@ static int uldap_connection_init(request_rec *r,
                   uldap_connection_unbind(ldc);
                   return(result->rc);
               }
      +    }
       
      +    if (ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) {
               if ((ldc->ReferralHopLimit != AP_LDAP_HOPLIMIT_UNSET) && ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) {
                   /* Referral hop limit - only if referrals are enabled and a hop limit is explicitly requested */
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01280)
                           "Setting referral hop limit to %d.",
                           ldc->ReferralHopLimit);
                   apr_ldap_set_option(r->pool, ldc->ldap,
      @@ -374,7 +407,7 @@ static int uldap_connection_init(request_rec *r,
                           (void *)&ldc->ReferralHopLimit,
                           &(result));
                   if (result->rc != LDAP_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01281)
                               "Unable to set LDAP_OPT_REFHOPLIMIT option to %d: %d.",
                               ldc->ReferralHopLimit,
                               result->rc);
      @@ -421,7 +454,7 @@ static int uldap_connection_init(request_rec *r,
               rc = apr_ldap_set_option(r->pool, ldc->ldap, LDAP_OPT_NETWORK_TIMEOUT,
                                        (void *)&connectionTimeout, &(result));
               if (APR_SUCCESS != rc) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(01282)
                                    "LDAP: Could not set the connection timeout");
               }
           }
      @@ -440,7 +473,7 @@ static int uldap_connection_init(request_rec *r,
               rc = apr_ldap_set_option(r->pool, ldc->ldap, LDAP_OPT_TIMEOUT,
                                        st->opTimeout, &(result));
               if (APR_SUCCESS != rc) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(01283)
                                    "LDAP: Could not set LDAP_OPT_TIMEOUT");
               }
           }
      @@ -492,6 +525,10 @@ static int uldap_simple_bind(util_ldap_connection_t *ldc, char *binddn,
               ldc->reason = "LDAP: ldap_simple_bind() parse result failed";
               return uldap_ld_errno(ldc);
           }
      +    else { 
      +        ldc->last_backend_conn = ldc->r->request_time;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, ldc->r, "LDC %pp bind", ldc);
      +    }
           return rc;
       }
       
      @@ -516,7 +553,7 @@ static int uldap_connection_open(request_rec *r,
       
           /* If the connection is already bound, return
           */
      -    if (ldc->bound)
      +    if (ldc->bound && !ldc->must_rebind)
           {
               ldc->reason = "LDAP: connection open successful (already bound)";
               return LDAP_SUCCESS;
      @@ -567,7 +604,7 @@ static int uldap_connection_open(request_rec *r,
                                 "(try %d)", failures);
               }
               else if (rc == LDAP_TIMEOUT) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01284)
                                 "ldap_simple_bind() timed out on %s "
                                 "connection, dropped by firewall?",
                                 new_connection ? "new" : "reused");
      @@ -597,6 +634,7 @@ static int uldap_connection_open(request_rec *r,
           }
           else {
               ldc->bound = 1;
      +        ldc->must_rebind = 0;
               ldc->reason = "LDAP: connection open successful";
           }
       
      @@ -694,13 +732,17 @@ static util_ldap_connection_t *
                   && !compare_client_certs(dc->client_certs, l->client_certs))
               {
                   if (st->connection_pool_ttl > 0) {
      -                if (l->bound && (now - l->freed) > st->connection_pool_ttl) {
      +                if (l->bound && (now - l->last_backend_conn) > st->connection_pool_ttl) {
                           ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
                                         "Removing LDAP connection last used %" APR_TIME_T_FMT " seconds ago",
      -                                  (now - l->freed) / APR_USEC_PER_SEC);
      +                                  (now - l->last_backend_conn) / APR_USEC_PER_SEC);
      +                    l->r = r;
                           uldap_connection_unbind(l);
                           /* Go ahead (by falling through) and use it, so we don't create more just to unbind some other old ones */
                       }
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, 
      +                              "Reuse %s LDC %pp", 
      +                              l->bound ? "bound" : "unbound", l);
                   }
                   break;
               }
      @@ -727,12 +769,25 @@ static util_ldap_connection_t *
                       (l->deref == deref) && (l->secure == secureflag) &&
                       !compare_client_certs(dc->client_certs, l->client_certs))
                   {
      -                /* the bind credentials have changed */
      -                /* no check for connection_pool_ttl, since we are unbinding any way */
      -                uldap_connection_unbind(l);
      +                if (st->connection_pool_ttl > 0) {
      +                    if (l->bound && (now - l->last_backend_conn) > st->connection_pool_ttl) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                                "Removing LDAP connection last used %" APR_TIME_T_FMT " seconds ago",
      +                                (now - l->last_backend_conn) / APR_USEC_PER_SEC);
      +                        l->r = r;
      +                        uldap_connection_unbind(l);
      +                        /* Go ahead (by falling through) and use it, so we don't create more just to unbind some other old ones */
      +                    }
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, 
      +                                  "Reuse %s LDC %pp (will rebind)", 
      +                                   l->bound ? "bound" : "unbound", l);
      +                }
       
      +                /* the bind credentials have changed */
      +                l->must_rebind = 1;
                       util_ldap_strdup((char**)&(l->binddn), binddn);
                       util_ldap_strdup((char**)&(l->bindpw), bindpw);
      +
                       break;
                   }
       #if APR_HAS_THREADS
      @@ -755,7 +810,7 @@ static util_ldap_connection_t *
           if (!l) {
               apr_pool_t *newpool;
               if (apr_pool_create(&newpool, NULL) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01285)
                                 "util_ldap: Failed to create memory pool");
       #if APR_HAS_THREADS
                   apr_thread_mutex_unlock(st->mutex);
      @@ -802,7 +857,7 @@ static util_ldap_connection_t *
       
               if (l->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) {
                   if (apr_pool_create(&(l->rebind_pool), l->pool) != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01286)
                                     "util_ldap: Failed to create memory pool");
       #if APR_HAS_THREADS
                       apr_thread_mutex_unlock(st->mutex);
      @@ -822,6 +877,7 @@ static util_ldap_connection_t *
       #if APR_HAS_THREADS
           apr_thread_mutex_unlock(st->mutex);
       #endif
      +    l->r = r;
           return l;
       }
       
      @@ -920,6 +976,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
                             "failed with server down";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
           if (result == LDAP_TIMEOUT && failures == 0) {
      @@ -931,6 +988,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
                             "failed with timeout";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
           if (result != LDAP_SUCCESS) {
      @@ -939,6 +997,7 @@ static int uldap_cache_comparedn(request_rec *r, util_ldap_connection_t *ldc,
               return result;
           }
       
      +    ldc->last_backend_conn = r->request_time;
           entry = ldap_first_entry(ldc->ldap, res);
           searchdn = ldap_get_dn(ldc->ldap, entry);
       
      @@ -1038,13 +1097,19 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
                           ldc->reason = "Comparison no such attribute (cached)";
                       }
                       else {
      -                    ldc->reason = "Comparison undefined (cached)";
      +                    ldc->reason = apr_psprintf(r->pool, 
      +                                              "Comparison undefined: (%d): %s (adding to cache)", 
      +                                              result, ldap_err2string(result));
                       }
       
                       /* record the result code to return with the reason... */
                       result = compare_nodep->result;
                       /* and unlock this read lock */
                       LDAP_CACHE_UNLOCK();
      +
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, 
      +                              "ldap_compare_s(%pp, %s, %s, %s) = %s (cached)", 
      +                              ldc->ldap, dn, attrib, value, ldap_err2string(result));
                       return result;
                   }
               }
      @@ -1075,6 +1140,7 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
               ldc->reason = "ldap_compare_s() failed with server down";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
           if (result == LDAP_TIMEOUT && failures == 0) {
      @@ -1085,9 +1151,11 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
               ldc->reason = "ldap_compare_s() failed with timeout";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
       
      +    ldc->last_backend_conn = r->request_time;
           ldc->reason = "Comparison complete";
           if ((LDAP_COMPARE_TRUE == result) ||
               (LDAP_COMPARE_FALSE == result) ||
      @@ -1115,7 +1183,7 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
                       junk = util_ald_cache_insert(curl->compare_cache,
                                                    &the_compare_node);
                       if (junk == NULL) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01287)
                                         "cache_compare: Cache insertion failure.");
                       }
                   }
      @@ -1125,19 +1193,26 @@ static int uldap_cache_compare(request_rec *r, util_ldap_connection_t *ldc,
                   }
                   LDAP_CACHE_UNLOCK();
               }
      +
               if (LDAP_COMPARE_TRUE == result) {
                   ldc->reason = "Comparison true (adding to cache)";
      -            return LDAP_COMPARE_TRUE;
               }
               else if (LDAP_COMPARE_FALSE == result) {
                   ldc->reason = "Comparison false (adding to cache)";
      -            return LDAP_COMPARE_FALSE;
               }
      -        else {
      +        else if (LDAP_NO_SUCH_ATTRIBUTE == result) {
                   ldc->reason = "Comparison no such attribute (adding to cache)";
      -            return LDAP_NO_SUCH_ATTRIBUTE;
      +        }
      +        else {
      +            ldc->reason = apr_psprintf(r->pool, 
      +                                       "Comparison undefined: (%d): %s (adding to cache)", 
      +                                        result, ldap_err2string(result));
               }
           }
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, 
      +                  "ldap_compare_s(%pp, %s, %s, %s) = %s", 
      +                  ldc->ldap, dn, attrib, value, ldap_err2string(result));
           return result;
       }
       
      @@ -1185,13 +1260,14 @@ static util_compare_subgroup_t* uldap_get_subgroups(request_rec *r,
       
           /* try to do the search */
           result = ldap_search_ext_s(ldc->ldap, (char *)dn, LDAP_SCOPE_BASE,
      -                               (char *)"cn=*", subgroupAttrs, 0,
      +                               NULL, subgroupAttrs, 0,
                                      NULL, NULL, NULL, APR_LDAP_SIZELIMIT, &sga_res);
           if (AP_LDAP_IS_SERVER_DOWN(result)) {
               ldc->reason = "ldap_search_ext_s() for subgroups failed with server"
                             " down";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
           if (result == LDAP_TIMEOUT && failures == 0) {
      @@ -1202,6 +1278,7 @@ static util_compare_subgroup_t* uldap_get_subgroups(request_rec *r,
               ldc->reason = "ldap_search_ext_s() for subgroups failed with timeout";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
       
      @@ -1211,6 +1288,7 @@ static util_compare_subgroup_t* uldap_get_subgroups(request_rec *r,
               return res;
           }
       
      +    ldc->last_backend_conn = r->request_time;
           entry = ldap_first_entry(ldc->ldap, sga_res);
       
           /*
      @@ -1269,8 +1347,8 @@ static util_compare_subgroup_t* uldap_get_subgroups(request_rec *r,
               int sgindex;
               char **group;
               res = apr_pcalloc(r->pool, sizeof(util_compare_subgroup_t));
      -        res->subgroupDNs  = apr_pcalloc(r->pool,
      -                                        sizeof(char *) * (subgroups->nelts));
      +        res->subgroupDNs  = apr_palloc(r->pool,
      +                                       sizeof(char *) * (subgroups->nelts));
               for (sgindex = 0; (group = apr_array_pop(subgroups)); sgindex++) {
                   res->subgroupDNs[sgindex] = apr_pstrdup(r->pool, *group);
               }
      @@ -1406,7 +1484,7 @@ static int uldap_cache_check_subgroups(request_rec *r,
                       if (compare_nodep->subgroupList) {
                           /* Make a local copy of the subgroup list */
                           int i;
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01288)
                                         "Making local copy of SGL for "
                                         "group (%s)(objectClass=%s) ",
                                         dn, (char *)sgc_ents[base_sgcIndex].name);
      @@ -1414,8 +1492,8 @@ static int uldap_cache_check_subgroups(request_rec *r,
                                                       sizeof(util_compare_subgroup_t));
                           tmp_local_sgl->len = compare_nodep->subgroupList->len;
                           tmp_local_sgl->subgroupDNs =
      -                        apr_pcalloc(r->pool,
      -                                    sizeof(char *) * compare_nodep->subgroupList->len);
      +                        apr_palloc(r->pool,
      +                                   sizeof(char *) * compare_nodep->subgroupList->len);
                           for (i = 0; i < compare_nodep->subgroupList->len; i++) {
                               tmp_local_sgl->subgroupDNs[i] =
                                   apr_pstrdup(r->pool,
      @@ -1432,13 +1510,13 @@ static int uldap_cache_check_subgroups(request_rec *r,
       
           if (!tmp_local_sgl && !sgl_cached_empty) {
               /* No Cached SGL, retrieve from LDAP */
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01289)
                             "no cached SGL for %s, retrieving from LDAP", dn);
               tmp_local_sgl = uldap_get_subgroups(r, ldc, url, dn, subgroupAttrs,
                                                   subgroupclasses);
               if (!tmp_local_sgl) {
                   /* No SGL aailable via LDAP either */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "no subgroups for %s",
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01290) "no subgroups for %s",
                                 dn);
               }
       
      @@ -1465,14 +1543,14 @@ static int uldap_cache_check_subgroups(request_rec *r,
                    * based on the objectClass, but we can't call the compare function
                    * while we already hold the cache lock -- only the insert.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01291)
                                 "Cache entry for %s doesn't exist", dn);
                   the_compare_node.result = LDAP_COMPARE_TRUE;
                   util_ald_cache_insert(curl->compare_cache, &the_compare_node);
                   compare_nodep = util_ald_cache_fetch(curl->compare_cache,
                                                        &the_compare_node);
                   if (compare_nodep == NULL) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01292)
                                     "util_ldap: Couldn't retrieve group entry "
                                     "for %s from cache",
                                     dn);
      @@ -1493,7 +1571,7 @@ static int uldap_cache_check_subgroups(request_rec *r,
                   else {
                       util_compare_subgroup_t *sgl_copy =
                           util_ald_sgl_dup(curl->compare_cache, tmp_local_sgl);
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01293)
                                    "Copying local SGL of len %d for group %s into cache",
                                    tmp_local_sgl->len, dn);
                       if (sgl_copy) {
      @@ -1505,7 +1583,7 @@ static int uldap_cache_check_subgroups(request_rec *r,
                           compare_nodep->sgl_processed = 1;
                       }
                       else {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(01294)
                                        "Copy of SGL failed to obtain shared memory, "
                                        "couldn't update cache");
                       }
      @@ -1538,7 +1616,7 @@ static int uldap_cache_check_subgroups(request_rec *r,
                    * 4.A. We found the user in the subgroup. Return
                    * LDAP_COMPARE_TRUE.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01295)
                                 "Found user %s in a subgroup (%s) at level %d of %d.",
                                 r->user, group, cur_subgroup_depth+1,
                                 max_subgroup_depth);
      @@ -1548,7 +1626,7 @@ static int uldap_cache_check_subgroups(request_rec *r,
                    * 4.B. We didn't find the user in this subgroup, so recurse into
                    * it and keep looking.
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01296)
                                 "User %s not found in subgroup (%s) at level %d of "
                                 "%d.", r->user, group, cur_subgroup_depth+1,
                                 max_subgroup_depth);
      @@ -1626,7 +1704,7 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
                       *binddn = apr_pstrdup(r->pool, search_nodep->dn);
                       if (attrs) {
                           int i;
      -                    *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
      +                    *retvals = apr_palloc(r->pool, sizeof(char *) * search_nodep->numvals);
                           for (i = 0; i < search_nodep->numvals; i++) {
                               (*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
                           }
      @@ -1670,9 +1748,19 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
               ldc->reason = "ldap_search_ext_s() for user failed with server down";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
      +        goto start_over;
      +    }
      +
      +    if (result == LDAP_TIMEOUT) {
      +        ldc->reason = "ldap_search_ext_s() for user failed with timeout";
      +        uldap_connection_unbind(ldc);
      +        failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
       
      +
           /* if there is an error (including LDAP_NO_SUCH_OBJECT) return now */
           if (result != LDAP_SUCCESS) {
               ldc->reason = "ldap_search_ext_s() for user failed";
      @@ -1683,6 +1771,7 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
            * We should have found exactly one entry; to find a different
            * number is an error.
            */
      +    ldc->last_backend_conn = r->request_time;
           count = ldap_count_entries(ldc->ldap, res);
           if (count != 1)
           {
      @@ -1733,6 +1822,7 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
               ldap_msgfree(res);
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
       
      @@ -1747,10 +1837,10 @@ static int uldap_cache_checkuserid(request_rec *r, util_ldap_connection_t *ldc,
               /*
                * We have just bound the connection to a different user and password
                * combination, which might be reused unintentionally next time this
      -         * connection is used from the connection pool. To ensure no confusion,
      -         * we mark the connection as unbound.
      +         * connection is used from the connection pool.
                */
      -        ldc->bound = 0;
      +        ldc->must_rebind = 1;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "LDC %pp used for authn, must be rebound", ldc);
           }
       
           /*
      @@ -1884,7 +1974,7 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
                       *binddn = apr_pstrdup(r->pool, search_nodep->dn);
                       if (attrs) {
                           int i;
      -                    *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
      +                    *retvals = apr_palloc(r->pool, sizeof(char *) * search_nodep->numvals);
                           for (i = 0; i < search_nodep->numvals; i++) {
                               (*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
                           }
      @@ -1928,6 +2018,7 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
               ldc->reason = "ldap_search_ext_s() for user failed with server down";
               uldap_connection_unbind(ldc);
               failures++;
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r, "%s (attempt %d)", ldc->reason, failures);
               goto start_over;
           }
       
      @@ -1941,6 +2032,7 @@ static int uldap_cache_getuserdn(request_rec *r, util_ldap_connection_t *ldc,
            * We should have found exactly one entry; to find a different
            * number is an error.
            */
      +    ldc->last_backend_conn = r->request_time;
           count = ldap_count_entries(ldc->ldap, res);
           if (count != 1)
           {
      @@ -2061,7 +2153,7 @@ static const char *util_ldap_set_cache_bytes(cmd_parms *cmd, void *dummy,
       
           st->cache_bytes = atol(bytes);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01297)
                        "ldap cache: Setting shared memory cache size to "
                        "%" APR_SIZE_T_FMT " bytes.",
                        st->cache_bytes);
      @@ -2088,8 +2180,8 @@ static const char *util_ldap_set_cache_file(cmd_parms *cmd, void *dummy,
               st->cache_file = NULL;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      -                 "LDAP cache: Setting shared memory cache file to %s bytes.",
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01298)
      +                 "LDAP cache: Setting shared memory cache file to %s.",
                        st->cache_file);
       
           return NULL;
      @@ -2109,7 +2201,7 @@ static const char *util_ldap_set_cache_ttl(cmd_parms *cmd, void *dummy,
       
           st->search_cache_ttl = atol(ttl) * 1000000;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01299)
                        "ldap cache: Setting cache TTL to %ld microseconds.",
                        st->search_cache_ttl);
       
      @@ -2133,7 +2225,7 @@ static const char *util_ldap_set_cache_entries(cmd_parms *cmd, void *dummy,
               st->search_cache_size = 0;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01300)
                        "ldap cache: Setting search cache size to %ld entries.",
                        st->search_cache_size);
       
      @@ -2154,7 +2246,7 @@ static const char *util_ldap_set_opcache_ttl(cmd_parms *cmd, void *dummy,
       
           st->compare_cache_ttl = atol(ttl) * 1000000;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01301)
                        "ldap cache: Setting operation cache TTL to %ld microseconds.",
                        st->compare_cache_ttl);
       
      @@ -2178,7 +2270,7 @@ static const char *util_ldap_set_opcache_entries(cmd_parms *cmd, void *dummy,
               st->compare_cache_size = 0;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01302)
                        "ldap cache: Setting operation cache size to %ld entries.",
                        st->compare_cache_size);
       
      @@ -2309,7 +2401,7 @@ static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
               return "Certificate type was not specified.";
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01303)
                             "LDAP: SSL trusted global cert - %s (type %s)",
                              file, type);
       
      @@ -2328,7 +2420,7 @@ static const char *util_ldap_set_trusted_global_cert(cmd_parms *cmd,
                   ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
                       != APR_SUCCESS))
               {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server, APLOGNO(01304)
                                "LDAP: Could not open SSL trusted certificate "
                                "authority file - %s",
                                cert->path == NULL ? file : cert->path);
      @@ -2389,7 +2481,7 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
               return "Certificate type was not specified.";
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01305)
                             "LDAP: SSL trusted client cert - %s (type %s)",
                              file, type);
       
      @@ -2408,7 +2500,7 @@ static const char *util_ldap_set_trusted_client_cert(cmd_parms *cmd,
                   ((rv = apr_stat (&finfo, cert->path, APR_FINFO_MIN, cmd->pool))
                       != APR_SUCCESS))
               {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, cmd->server, APLOGNO(01306)
                                "LDAP: Could not open SSL client certificate "
                                "file - %s",
                                cert->path == NULL ? file : cert->path);
      @@ -2436,7 +2528,7 @@ static const char *util_ldap_set_trusted_mode(cmd_parms *cmd, void *dummy,
           (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
                                                     &ldap_module);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01307)
                             "LDAP: SSL trusted mode - %s",
                              mode);
       
      @@ -2472,7 +2564,7 @@ static const char *util_ldap_set_verify_srv_cert(cmd_parms *cmd,
               return err;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01308)
                             "LDAP: SSL verify server certificate - %s",
                             mode?"TRUE":"FALSE");
       
      @@ -2500,11 +2592,11 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
       #ifdef LDAP_OPT_NETWORK_TIMEOUT
           st->connectionTimeout = atol(ttl);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01309)
                        "ldap connection: Setting connection timeout to %ld seconds.",
                        st->connectionTimeout);
       #else
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server, APLOGNO(01310)
                        "LDAP: Connection timeout option not supported by the "
                        "LDAP SDK in use." );
       #endif
      @@ -2515,15 +2607,25 @@ static const char *util_ldap_set_connection_timeout(cmd_parms *cmd,
       
       static const char *util_ldap_set_chase_referrals(cmd_parms *cmd,
                                                        void *config,
      -                                                 int mode)
      +                                                 const char *arg)
       {
           util_ldap_config_t *dc =  config;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      -                      "LDAP: Setting referral chasing %s",
      -                      (mode == AP_LDAP_CHASEREFERRALS_ON) ? "ON" : "OFF");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01311)
      +                      "LDAP: Setting referral chasing %s", arg);
       
      -    dc->ChaseReferrals = mode;
      +    if (0 == strcasecmp(arg, "on")) {
      +        dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_ON;
      +    }
      +    else if (0 == strcasecmp(arg, "off")) {
      +        dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_OFF;
      +    }
      +    else if (0 == strcasecmp(arg, "default")) {
      +        dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_SDKDEFAULT;
      +    }
      +    else {
      +        return "LDAPReferrals must be 'on', 'off', or 'default'";
      +    }
       
           return(NULL);
       }
      @@ -2562,23 +2664,24 @@ static const char *util_ldap_set_referral_hop_limit(cmd_parms *cmd,
               return "LDAPReferralHopLimit must be greater than zero (Use 'LDAPReferrals Off' to disable referral chasing)";
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01312)
                        "LDAP: Limit chased referrals to maximum of %d hops.",
                        dc->ReferralHopLimit);
       
           return NULL;
       }
       
      -static void *util_ldap_create_dir_config(apr_pool_t *p, char *d) {
      -   util_ldap_config_t *dc =
      -       (util_ldap_config_t *) apr_pcalloc(p,sizeof(util_ldap_config_t));
      +static void *util_ldap_create_dir_config(apr_pool_t *p, char *d)
      +{
      +    util_ldap_config_t *dc =
      +        (util_ldap_config_t *) apr_pcalloc(p,sizeof(util_ldap_config_t));
       
      -   /* defaults are AP_LDAP_CHASEREFERRALS_ON and AP_LDAP_DEFAULT_HOPLIMIT */
      -   dc->client_certs = apr_array_make(p, 10, sizeof(apr_ldap_opt_tls_cert_t));
      -   dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_ON;
      -   dc->ReferralHopLimit = AP_LDAP_HOPLIMIT_UNSET;
      +    /* defaults are AP_LDAP_CHASEREFERRALS_ON and AP_LDAP_DEFAULT_HOPLIMIT */
      +    dc->client_certs = apr_array_make(p, 10, sizeof(apr_ldap_opt_tls_cert_t));
      +    dc->ChaseReferrals = AP_LDAP_CHASEREFERRALS_ON;
      +    dc->ReferralHopLimit = AP_LDAP_HOPLIMIT_UNSET;
       
      -   return dc;
      +    return dc;
       }
       
       static const char *util_ldap_set_op_timeout(cmd_parms *cmd,
      @@ -2614,13 +2717,13 @@ static const char *util_ldap_set_op_timeout(cmd_parms *cmd,
               st->opTimeout = NULL;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01313)
                        "ldap connection: Setting op timeout to %ld seconds.",
                        timeout);
       
       #ifndef LDAP_OPT_TIMEOUT
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01314)
                        "LDAP: LDAP_OPT_TIMEOUT option not supported by the "
                        "LDAP library in use. Using LDAPTimeout value as search "
                        "timeout only." );
      @@ -2630,8 +2733,8 @@ static const char *util_ldap_set_op_timeout(cmd_parms *cmd,
       }
       
       static const char *util_ldap_set_conn_ttl(cmd_parms *cmd,
      -                                            void *dummy,
      -                                            const char *val)
      +                                          void *dummy,
      +                                          const char *val)
       {
           apr_interval_time_t timeout;
           util_ldap_state_t *st =
      @@ -2639,19 +2742,20 @@ static const char *util_ldap_set_conn_ttl(cmd_parms *cmd,
                                                         &ldap_module);
       
           if (ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS) {
      -        return "LDAPConnPoolTTL has wrong format";
      +        return "LDAPConnectionPoolTTL has wrong format";
           }
       
           if (timeout < 0) {
               /* reserve -1 for default value */
      -        timeout =  AP_LDAP_CONNPOOL_INFINITE;
      +        timeout = AP_LDAP_CONNPOOL_INFINITE;
           }
           st->connection_pool_ttl = timeout;
           return NULL;
       }
      +
       static const char *util_ldap_set_retry_delay(cmd_parms *cmd,
      -                                            void *dummy,
      -                                            const char *val)
      +                                             void *dummy,
      +                                             const char *val)
       {
           apr_interval_time_t timeout;
           util_ldap_state_t *st =
      @@ -2676,8 +2780,8 @@ static const char *util_ldap_set_retry_delay(cmd_parms *cmd,
       }
       
       static const char *util_ldap_set_retries(cmd_parms *cmd,
      -                                            void *dummy,
      -                                            const char *val)
      +                                         void *dummy,
      +                                         const char *val)
       {
           util_ldap_state_t *st =
               (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config,
      @@ -2789,7 +2893,6 @@ static void *util_ldap_merge_config(apr_pool_t *p, void *basev,
       
       static apr_status_t util_ldap_cleanup_module(void *data)
       {
      -
           server_rec *s = data;
           util_ldap_state_t *st = (util_ldap_state_t *)ap_get_module_config(
               s->module_config, &ldap_module);
      @@ -2799,7 +2902,6 @@ static apr_status_t util_ldap_cleanup_module(void *data)
           }
       
           return APR_SUCCESS;
      -
       }
       
       static int util_ldap_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
      @@ -2858,7 +2960,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
       #endif
               result = util_ldap_cache_init(p, st);
               if (result != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, result, s, APLOGNO(01315)
                                "LDAP cache: could not create shared memory segment");
                   return DONE;
               }
      @@ -2881,7 +2983,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
                   st_vhost->cache_rmm = st->cache_rmm;
                   st_vhost->cache_file = st->cache_file;
                   st_vhost->util_ldap_cache = st->util_ldap_cache;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, result, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, result, s, APLOGNO(01316)
                                "LDAP merging Shared Cache conf: shm=0x%pp rmm=0x%pp "
                                "for VHOST: %s", st->cache_shm, st->cache_rmm,
                                s_vhost->server_hostname);
      @@ -2891,7 +2993,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
       #if APR_HAS_SHARED_MEMORY
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01317)
                            "LDAP cache: LDAPSharedCacheSize is zero, disabling "
                            "shared memory cache");
           }
      @@ -2903,7 +3005,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
               apr_ldap_err_t *result = NULL;
               apr_ldap_info(p, &(result));
               if (result != NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, "%s", result->reason);
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01318) "%s", result->reason);
               }
           }
       
      @@ -2927,12 +3029,12 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (APR_SUCCESS == rc) {
               st->ssl_supported = 1;
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01319)
                            "LDAP: SSL support available" );
           }
           else {
               st->ssl_supported = 0;
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01320)
                            "LDAP: SSL support unavailable%s%s",
                            result_err ? ": " : "",
                            result_err ? result_err->reason : "");
      @@ -2956,7 +3058,7 @@ static int util_ldap_post_config(apr_pool_t *p, apr_pool_t *plog,
           if (st->debug_level > 0) {
               result = ldap_set_option(NULL, AP_LDAP_OPT_DEBUG, &st->debug_level);
               if (result != LDAP_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01321)
                           "LDAP: Could not set the LDAP library debug level to %d:(%d) %s",
                           st->debug_level, result, ldap_err2string(result));
               }
      @@ -2977,7 +3079,7 @@ static void util_ldap_child_init(apr_pool_t *p, server_rec *s)
           sts = apr_global_mutex_child_init(&st->util_ldap_cache_lock,
                     apr_global_mutex_lockfile(st->util_ldap_cache_lock), p);
           if (sts != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, sts, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, sts, s, APLOGNO(01322)
                            "Failed to initialise global mutex %s in child process",
                            ldap_cache_mutex_type);
           }
      @@ -3055,9 +3157,9 @@ static const command_rec util_ldap_cmds[] = {
                         "Specify the LDAP socket connection timeout in seconds "
                         "(default: 10)"),
       
      -    AP_INIT_FLAG("LDAPReferrals", util_ldap_set_chase_referrals,
      +    AP_INIT_TAKE1("LDAPReferrals", util_ldap_set_chase_referrals,
                         NULL, OR_AUTHCFG,
      -                  "Choose whether referrals are chased ['ON'|'OFF'].  Default 'ON'"),
      +                  "Choose whether referrals are chased ['ON'|'OFF'|'DEFAULT'].  Default 'ON'"),
       
           AP_INIT_TAKE1("LDAPReferralHopLimit", util_ldap_set_referral_hop_limit,
                         NULL, OR_AUTHCFG,
      diff --git a/modules/ldap/util_ldap_cache.c b/modules/ldap/util_ldap_cache.c
      index 87642e114a7..d8c1ed9b5bf 100644
      --- a/modules/ldap/util_ldap_cache.c
      +++ b/modules/ldap/util_ldap_cache.c
      @@ -52,7 +52,7 @@ void *util_ldap_url_node_copy(util_ald_cache_t *cache, void *c)
       
           if (node) {
               if (!(node->url = util_ald_strdup(cache, n->url))) {
      -            util_ald_free(cache, node->url);
      +            util_ald_free(cache, node);
                   return NULL;
               }
               node->search_cache = n->search_cache;
      @@ -181,8 +181,8 @@ void *util_ldap_search_node_copy(util_ald_cache_t *cache, void *c)
                   util_ldap_search_node_free(cache, newnode);
                   return NULL;
               }
      -        if(node->bindpw) {
      -            if(!(newnode->bindpw = util_ald_strdup(cache, node->bindpw))) {
      +        if (node->bindpw) {
      +            if (!(newnode->bindpw = util_ald_strdup(cache, node->bindpw))) {
                       util_ldap_search_node_free(cache, newnode);
                       return NULL;
                   }
      @@ -305,14 +305,14 @@ void util_ldap_compare_node_display(request_rec *r, util_ald_cache_t *cache, voi
               cmp_result = apr_itoa(r->pool, node->result);
           }
       
      -    if(node->subgroupList) {
      +    if (node->subgroupList) {
               sub_groups_val = "Yes";
           }
           else {
               sub_groups_val = "No";
           }
       
      -    if(node->sgl_processed) {
      +    if (node->sgl_processed) {
               sub_groups_checked = "Yes";
           }
           else {
      diff --git a/modules/ldap/util_ldap_cache_mgr.c b/modules/ldap/util_ldap_cache_mgr.c
      index 1998c13e0bc..4a0cc9767b4 100644
      --- a/modules/ldap/util_ldap_cache_mgr.c
      +++ b/modules/ldap/util_ldap_cache_mgr.c
      @@ -359,9 +359,11 @@ util_ald_cache_t *util_ald_create_cache(util_ldap_state_t *st,
           cache->maxentries = cache_size;
           cache->numentries = 0;
           cache->size = cache_size / 3;
      -    if (cache->size < 64) cache->size = 64;
      -        for (i = 0; primes[i] && primes[i] < cache->size; ++i) ;
      -            cache->size = primes[i]? primes[i] : primes[i-1];
      +    if (cache->size < 64)
      +        cache->size = 64;
      +    for (i = 0; primes[i] && primes[i] < cache->size; ++i)
      +        ;
      +    cache->size = primes[i] ? primes[i] : primes[i-1];
       
           cache->nodes = (util_cache_node_t **)util_ald_alloc(cache, cache->size * sizeof(util_cache_node_t *));
           if (!cache->nodes) {
      @@ -461,7 +463,7 @@ void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
               util_ald_cache_purge(cache);
               if (cache->numentries >= cache->maxentries) {
                   /* if the purge was not effective, we leave now to avoid an overflow */
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01323)
                                "Purge of LDAP cache failed");
                   return NULL;
               }
      @@ -474,7 +476,7 @@ void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
                * XXX: The cache management should be rewritten to work
                * properly when LDAPSharedCacheSize is too small.
                */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(01324)
                            "LDAPSharedCacheSize is too small. Increase it or "
                            "reduce LDAPCacheEntries/LDAPOpCacheEntries!");
               if (cache->numentries < cache->fullmark) {
      @@ -489,20 +491,20 @@ void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
               node = (util_cache_node_t *)util_ald_alloc(cache,
                                                          sizeof(util_cache_node_t));
               if (node == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01325)
                                "Could not allocate memory for LDAP cache entry");
                   return NULL;
               }
           }
       
      -    /* Take a copy of the payload before proceeeding. */
      +    /* Take a copy of the payload before proceeding. */
           tmp_payload = (*cache->copy)(cache, payload);
           if (tmp_payload == NULL) {
               /*
                * XXX: The cache management should be rewritten to work
                * properly when LDAPSharedCacheSize is too small.
                */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(01326)
                            "LDAPSharedCacheSize is too small. Increase it or "
                            "reduce LDAPCacheEntries/LDAPOpCacheEntries!");
               if (cache->numentries < cache->fullmark) {
      @@ -516,7 +518,7 @@ void *util_ald_cache_insert(util_ald_cache_t *cache, void *payload)
               util_ald_cache_purge(cache);
               tmp_payload = (*cache->copy)(cache, payload);
               if (tmp_payload == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01327)
                                "Could not allocate memory for LDAP cache value");
                   util_ald_free(cache, node);
                   return NULL;
      @@ -604,7 +606,7 @@ char *util_ald_cache_display_stats(request_rec *r, util_ald_cache_t *cache, char
           if (id) {
               buf2 = apr_psprintf(p,
                        "<a href=\"%s?%s\">%s</a>",
      -             r->uri,
      +             ap_escape_html(r->pool, ap_escape_uri(r->pool, r->uri)),
                    id,
                    name);
           }
      diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
      index fc7b83ae1e3..4270b3f2411 100644
      --- a/modules/loggers/mod_log_config.c
      +++ b/modules/loggers/mod_log_config.c
      @@ -39,7 +39,7 @@
        * the request will be logged to the log file(s) defined outside
        * the virtual host section. If a TransferLog or CustomLog directive
        * appears in the VirtualHost section, the log files defined outside
      - * the VirtualHost will _not_ be used. This makes this module compatable
      + * the VirtualHost will _not_ be used. This makes this module compatible
        * with the CLF and config log modules, where the use of TransferLog
        * inside the VirtualHost section overrides its use outside.
        *
      @@ -101,6 +101,9 @@
        * %...{format}t:  The time, in the form given by format, which should
        *                 be in strftime(3) format.
        * %...T:  the time taken to serve the request, in seconds.
      + * %...{s}T:  the time taken to serve the request, in seconds, same as %T.
      + * %...{us}T:  the time taken to serve the request, in micro seconds, same as %D.
      + * %...{ms}T:  the time taken to serve the request, in milliseconds.
        * %...D:  the time taken to serve the request, in micro seconds.
        * %...u:  remote user (from auth; may be bogus if return status (%s) is 401)
        * %...U:  the URL path requested.
      @@ -194,8 +197,8 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
       static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
                                               const char* name);
       
      -static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle);
      -static ap_log_writer* ap_log_set_writer(ap_log_writer *handle);
      +static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle);
      +static ap_log_writer *ap_log_set_writer(ap_log_writer *handle);
       static ap_log_writer *log_writer = ap_default_log_writer;
       static ap_log_writer_init *log_writer_init = ap_default_log_writer_init;
       static int buffered_logs = 0; /* default unbuffered */
      @@ -262,7 +265,10 @@ typedef struct {
           apr_array_header_t *format;
           void *log_writer;
           char *condition_var;
      +    int inherit;
           ap_expr_info_t *condition_expr;
      +    /** place of definition or NULL if already checked */
      +    const ap_directive_t *directive;
       } config_log_state;
       
       /*
      @@ -310,7 +316,12 @@ static const char *log_remote_host(request_rec *r, char *a)
       
       static const char *log_remote_address(request_rec *r, char *a)
       {
      -    return r->connection->remote_ip;
      +    if (a && !strcmp(a, "c")) {
      +        return r->connection->client_ip;
      +    }
      +    else {
      +        return r->useragent_ip;
      +    }
       }
       
       static const char *log_local_address(request_rec *r, char *a)
      @@ -424,6 +435,12 @@ static const char *log_header_in(request_rec *r, char *a)
           return ap_escape_logitem(r->pool, apr_table_get(r->headers_in, a));
       }
       
      +static const char *log_trailer_in(request_rec *r, char *a)
      +{
      +    return ap_escape_logitem(r->pool, apr_table_get(r->trailers_in, a));
      +}
      +
      +
       static APR_INLINE char *find_multiple_headers(apr_pool_t *pool,
                                                     const apr_table_t *table,
                                                     const char *key)
      @@ -507,6 +524,11 @@ static const char *log_header_out(request_rec *r, char *a)
           return ap_escape_logitem(r->pool, cp);
       }
       
      +static const char *log_trailer_out(request_rec *r, char *a)
      +{
      +    return ap_escape_logitem(r->pool, apr_table_get(r->trailers_out, a));
      +}
      +
       static const char *log_note(request_rec *r, char *a)
       {
           return ap_escape_logitem(r->pool, apr_table_get(r->notes, a));
      @@ -536,20 +558,33 @@ static const char *log_cookie(request_rec *r, char *a)
       
               while ((cookie = apr_strtok(cookies, ";", &last1))) {
                   char *name = apr_strtok(cookie, "=", &last2);
      -            char *value;
      -            apr_collapse_spaces(name, name);
      -
      -            if (!strcasecmp(name, a) && (value = apr_strtok(NULL, "=", &last2))) {
      -                char *last;
      -                value += strspn(value, " \t");  /* Move past leading WS */
      -                last = value + strlen(value) - 1;
      -                while (last >= value && apr_isspace(*last)) {
      -                   *last = '\0';
      -                   --last;
      +            /* last2 points to the next char following an '=' delim,
      +               or the trailing NUL char of the string */
      +            char *value = last2;
      +            if (name && *name &&  value && *value) {
      +                char *last = value - 2;
      +                /* Move past leading WS */
      +                name += strspn(name, " \t");
      +                while (last >= name && apr_isspace(*last)) {
      +                    *last = '\0';
      +                    --last;
                       }
       
      -                return ap_escape_logitem(r->pool, value);
      +                if (!strcasecmp(name, a)) {
      +                    /* last1 points to the next char following the ';' delim,
      +                       or the trailing NUL char of the string */
      +                    last = last1 - (*last1 ? 2 : 1);
      +                    /* Move past leading WS */
      +                    value += strspn(value, " \t");
      +                    while (last >= value && apr_isspace(*last)) {
      +                       *last = '\0';
      +                       --last;
      +                    }
      +
      +                    return ap_escape_logitem(r->pool, value);
      +                }
                   }
      +            /* Iterate the remaining tokens using apr_strtok(NULL, ...) */
                   cookies = NULL;
               }
           }
      @@ -588,6 +623,10 @@ static apr_time_t get_request_end_time(request_rec *r)
       {
           log_request_state *state = (log_request_state *)ap_get_module_config(r->request_config,
                                                                                &log_config_module);
      +    if (!state) {
      +        state = apr_pcalloc(r->pool, sizeof(log_request_state));
      +        ap_set_module_config(r->request_config, &log_config_module, state);
      +    }
           if (state->request_end_time == 0) {
               state->request_end_time = apr_time_now();
           }
      @@ -730,18 +769,30 @@ static const char *log_request_time(request_rec *r, char *a)
           }
       }
       
      -static const char *log_request_duration(request_rec *r, char *a)
      -{
      -    apr_time_t duration = get_request_end_time(r) - r->request_time;
      -    return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, apr_time_sec(duration));
      -}
      -
       static const char *log_request_duration_microseconds(request_rec *r, char *a)
      -{
      +{    
           return apr_psprintf(r->pool, "%" APR_TIME_T_FMT,
                               (get_request_end_time(r) - r->request_time));
       }
       
      +static const char *log_request_duration_scaled(request_rec *r, char *a)
      +{
      +    apr_time_t duration = get_request_end_time(r) - r->request_time;
      +    if (*a == '\0' || !strcasecmp(a, "s")) {
      +        duration = apr_time_sec(duration);
      +    }
      +    else if (!strcasecmp(a, "ms")) {
      +        duration = apr_time_as_msec(duration);
      +    }
      +    else if (!strcasecmp(a, "us")) {
      +    }
      +    else {
      +        /* bogus format */
      +        return a;
      +    }
      +    return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, duration);
      +}
      +
       /* These next two routines use the canonical name:port so that log
        * parsers don't need to duplicate all the vhost parsing crud.
        */
      @@ -758,7 +809,7 @@ static const char *log_server_port(request_rec *r, char *a)
               port = r->server->port ? r->server->port : ap_default_port(r);
           }
           else if (!strcasecmp(a, "remote")) {
      -        port = r->connection->remote_addr->port;
      +        port = r->useragent_addr->port;
           }
           else if (!strcasecmp(a, "local")) {
               port = r->connection->local_addr->port;
      @@ -892,7 +943,7 @@ static char *parse_log_misc_string(apr_pool_t *p, log_format_item *it,
       static char *parse_log_item(apr_pool_t *p, log_format_item *it, const char **sa)
       {
           const char *s = *sa;
      -    ap_log_handler *handler;
      +    ap_log_handler *handler = NULL;
       
           if (*s != '%') {
               return parse_log_misc_string(p, it, sa);
      @@ -962,7 +1013,16 @@ static char *parse_log_item(apr_pool_t *p, log_format_item *it, const char **sa)
                   break;
       
               default:
      -            handler = (ap_log_handler *)apr_hash_get(log_hash, s++, 1);
      +            /* check for '^' + two character format first */
      +            if (*s == '^' && *(s+1) && *(s+2)) { 
      +                handler = (ap_log_handler *)apr_hash_get(log_hash, s, 3); 
      +                if (handler) { 
      +                   s += 3;
      +                }
      +            }
      +            if (!handler) {  
      +                handler = (ap_log_handler *)apr_hash_get(log_hash, s++, 1);  
      +            }
                   if (!handler) {
                       char dummy[2];
       
      @@ -1083,7 +1143,7 @@ static int config_log_transaction(request_rec *r, config_log_state *cls,
               const char *err;
               int rc = ap_expr_exec(r, cls->condition_expr, &err);
               if (rc < 0)
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(00644)
                                  "Error evaluating log condition: %s", err);
               if (rc <= 0)
                   return DECLINED;
      @@ -1111,14 +1171,15 @@ static int config_log_transaction(request_rec *r, config_log_state *cls,
               len += strl[i] = strlen(strs[i]);
           }
           if (!log_writer) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00645)
                       "log writer isn't correctly setup");
      -         return HTTP_INTERNAL_SERVER_ERROR;
      +        return HTTP_INTERNAL_SERVER_ERROR;
           }
           rv = log_writer(r, cls->log_writer, strs, strl, format->nelts, len);
      -    if (rv != APR_SUCCESS)
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, "Error writing to %s",
      -                      cls->fname);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00646)
      +                      "Error writing to %s", cls->fname);
      +    }
           return OK;
       }
       
      @@ -1146,12 +1207,15 @@ static int multi_log_transaction(request_rec *r)
                   config_log_transaction(r, cls, mls->default_format);
               }
           }
      -    else if (mls->server_config_logs) {
      +
      +    if (mls->server_config_logs) {
               clsarray = (config_log_state *) mls->server_config_logs->elts;
               for (i = 0; i < mls->server_config_logs->nelts; ++i) {
                   config_log_state *cls = &clsarray[i];
       
      -            config_log_transaction(r, cls, mls->default_format);
      +            if (cls->inherit || !mls->config_logs->nelts) {
      +                config_log_transaction(r, cls, mls->default_format);
      +            }
               }
           }
       
      @@ -1264,6 +1328,7 @@ static const char *add_custom_log(cmd_parms *cmd, void *dummy, const char *fn,
       
           cls->fname = fn;
           cls->format_string = fmt;
      +    cls->directive = cmd->directive;
           if (fmt == NULL) {
               cls->format = NULL;
           }
      @@ -1275,6 +1340,33 @@ static const char *add_custom_log(cmd_parms *cmd, void *dummy, const char *fn,
           return err_string;
       }
       
      +static const char *add_global_log(cmd_parms *cmd, void *dummy, const char *fn,
      +                                  const char *fmt, const char *envclause) {
      +    multi_log_state *mls = ap_get_module_config(cmd->server->module_config,
      +                                                &log_config_module);
      +    config_log_state *clsarray;
      +    config_log_state *cls;
      +    const char *ret;
      +
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +
      +    if (err) {
      +        return err;
      +    }
      +
      +    /* Add a custom log through the normal channel */
      +    ret = add_custom_log(cmd, dummy, fn, fmt, envclause);
      +
      +    /* Set the inherit flag unless there was some error */
      +    if (ret == NULL) {
      +        clsarray = (config_log_state*)mls->config_logs->elts;
      +        cls = &clsarray[mls->config_logs->nelts-1];
      +        cls->inherit = 1;
      +    }
      +
      +    return ret;
      +}
      +
       static const char *set_transfer_log(cmd_parms *cmd, void *dummy,
                                           const char *fn)
       {
      @@ -1299,6 +1391,8 @@ static const command_rec config_log_cmds[] =
       AP_INIT_TAKE23("CustomLog", add_custom_log, NULL, RSRC_CONF,
            "a file name, a custom log format string or format name, "
            "and an optional \"env=\" or \"expr=\" clause (see docs)"),
      +AP_INIT_TAKE23("GlobalLog", add_global_log, NULL, RSRC_CONF,
      +     "Same as CustomLog, but forces virtualhosts to inherit the log"),
       AP_INIT_TAKE1("TransferLog", set_transfer_log, NULL, RSRC_CONF,
            "the filename of the access log"),
       AP_INIT_TAKE12("LogFormat", log_format, NULL, RSRC_CONF,
      @@ -1469,7 +1563,7 @@ static void init_child(apr_pool_t *p, server_rec *s)
                                                    APR_THREAD_MUTEX_DEFAULT,
                                                    p);
                       if (rv != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00647)
                                        "could not initialize buffered log mutex, "
                                        "transfer log may become corrupted");
                           this->mutex.type = apr_anylock_none;
      @@ -1491,9 +1585,9 @@ static void ap_register_log_handler(apr_pool_t *p, char *tag,
           log_struct->func = handler;
           log_struct->want_orig_default = def;
       
      -    apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
      +    apr_hash_set(log_hash, tag, strlen(tag), (const void *)log_struct);
       }
      -static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
      +static ap_log_writer_init *ap_log_set_writer_init(ap_log_writer_init *handle)
       {
           ap_log_writer_init *old = log_writer_init;
           log_writer_init = handle;
      @@ -1522,6 +1616,10 @@ static apr_status_t ap_default_log_writer( request_rec *r,
           int i;
           apr_status_t rv;
       
      +    /*
      +     * We do this memcpy dance because write() is atomic for len < PIPE_BUF,
      +     * while writev() need not be.
      +     */
           str = apr_palloc(r->pool, len + 1);
       
           for (i = 0, s = str; i < nelts; ++i) {
      @@ -1541,7 +1639,7 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
       
               pl = ap_open_piped_log(p, name + 1);
               if (pl == NULL) {
      -           return NULL;;
      +           return NULL;
               }
               return ap_piped_log_write_fd(pl);
           }
      @@ -1551,13 +1649,13 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
               apr_status_t rv;
       
               if (!fname) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, APLOGNO(00648)
                                   "invalid transfer log path %s.", name);
                   return NULL;
               }
               rv = apr_file_open(&fd, fname, xfer_flags, xfer_perms, p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00649)
                                   "could not open transfer log file %s.", fname);
                   return NULL;
               }
      @@ -1602,6 +1700,10 @@ static apr_status_t ap_buffered_log_writer(request_rec *r,
           if (len >= LOG_BUFSIZE) {
               apr_size_t w;
       
      +        /*
      +         * We do this memcpy dance because write() is atomic for
      +         * len < PIPE_BUF, while writev() need not be.
      +         */
               str = apr_palloc(r->pool, len + 1);
               for (i = 0, s = str; i < nelts; ++i) {
                   memcpy(s, strs[i], strl[i]);
      @@ -1657,10 +1759,13 @@ static int log_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
               log_pfn_register(p, "k", log_requests_on_connection, 0);
               log_pfn_register(p, "r", log_request_line, 1);
               log_pfn_register(p, "D", log_request_duration_microseconds, 1);
      -        log_pfn_register(p, "T", log_request_duration, 1);
      +        log_pfn_register(p, "T", log_request_duration_scaled, 1);
               log_pfn_register(p, "U", log_request_uri, 1);
               log_pfn_register(p, "s", log_status, 1);
               log_pfn_register(p, "R", log_handler, 1);
      +
      +        log_pfn_register(p, "^ti", log_trailer_in, 0);
      +        log_pfn_register(p, "^to", log_trailer_out, 0);
           }
       
           /* reset to default conditions */
      @@ -1671,9 +1776,59 @@ static int log_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
           return OK;
       }
       
      +static int check_log_dir(apr_pool_t *p, server_rec *s, config_log_state *cls)
      +{
      +    if (!cls->fname || cls->fname[0] == '|' || !cls->directive) {
      +        return OK;
      +    }
      +    else {
      +        char *abs = ap_server_root_relative(p, cls->fname);
      +        char *dir = ap_make_dirstr_parent(p, abs);
      +        apr_finfo_t finfo;
      +        const ap_directive_t *directive = cls->directive;
      +        apr_status_t rv = apr_stat(&finfo, dir, APR_FINFO_TYPE, p);
      +        cls->directive = NULL; /* Don't check this config_log_state again */
      +        if (rv == APR_SUCCESS && finfo.filetype != APR_DIR)
      +            rv = APR_ENOTDIR;
      +        if (rv != APR_SUCCESS) {
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, rv, s,
      +                         APLOGNO(02297)
      +                         "Cannot access directory '%s' for log file '%s' "
      +                         "defined at %s:%d", dir, cls->fname,
      +                         directive->filename, directive->line_num);
      +            return !OK;
      +        }
      +    }
      +    return OK;
      +}
      +
      +static int log_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
      +{
      +    int rv = OK;
      +    while (s) {
      +        multi_log_state *mls = ap_get_module_config(s->module_config,
      +                                                    &log_config_module);
      +        /*
      +         * We don't need to check mls->server_config_logs because it just
      +         * points to the parent server's mls->config_logs.
      +         */
      +        apr_array_header_t *log_list = mls->config_logs;
      +        config_log_state *clsarray = (config_log_state *) log_list->elts;
      +        int i;
      +        for (i = 0; i < log_list->nelts; ++i) {
      +            if (check_log_dir(ptemp, s, &clsarray[i]) != OK)
      +                rv = !OK;
      +        }
      +
      +        s = s->next;
      +    }
      +    return rv;
      +}
      +
       static void register_hooks(apr_pool_t *p)
       {
           ap_hook_pre_config(log_pre_config,NULL,NULL,APR_HOOK_REALLY_FIRST);
      +    ap_hook_check_config(log_check_config,NULL,NULL,APR_HOOK_MIDDLE);
           ap_hook_child_init(init_child,NULL,NULL,APR_HOOK_MIDDLE);
           ap_hook_open_logs(init_config_log,NULL,NULL,APR_HOOK_MIDDLE);
           ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE);
      diff --git a/modules/loggers/mod_log_config.dep b/modules/loggers/mod_log_config.dep
      new file mode 100644
      index 00000000000..8107bd9e01f
      --- /dev/null
      +++ b/modules/loggers/mod_log_config.dep
      @@ -0,0 +1,62 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_log_config.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_log_config.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_time.h"\
      +	"..\..\srclib\apr-util\include\apr_anylock.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_log_config.h"\
      +	
      diff --git a/modules/loggers/mod_log_config.mak b/modules/loggers/mod_log_config.mak
      new file mode 100644
      index 00000000000..df9ddf6a67c
      --- /dev/null
      +++ b/modules/loggers/mod_log_config.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_log_config.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_log_config - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_log_config - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_log_config - Win32 Release" && "$(CFG)" != "mod_log_config - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_log_config.mak" CFG="mod_log_config - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_log_config - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_log_config - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_config - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_config.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_log_config.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_config.obj"
      +	-@erase "$(INTDIR)\mod_log_config.res"
      +	-@erase "$(INTDIR)\mod_log_config_src.idb"
      +	-@erase "$(INTDIR)\mod_log_config_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_config.exp"
      +	-@erase "$(OUTDIR)\mod_log_config.lib"
      +	-@erase "$(OUTDIR)\mod_log_config.pdb"
      +	-@erase "$(OUTDIR)\mod_log_config.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_config_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_config.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_log_config.so" /d LONG_NAME="log_config_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_config.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_config.pdb" /debug /out:"$(OUTDIR)\mod_log_config.so" /implib:"$(OUTDIR)\mod_log_config.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_config.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_config.obj" \
      +	"$(INTDIR)\mod_log_config.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_config.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_log_config.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_config.so"
      +   if exist .\Release\mod_log_config.so.manifest mt.exe -manifest .\Release\mod_log_config.so.manifest -outputresource:.\Release\mod_log_config.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_config.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_log_config.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_config.obj"
      +	-@erase "$(INTDIR)\mod_log_config.res"
      +	-@erase "$(INTDIR)\mod_log_config_src.idb"
      +	-@erase "$(INTDIR)\mod_log_config_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_config.exp"
      +	-@erase "$(OUTDIR)\mod_log_config.lib"
      +	-@erase "$(OUTDIR)\mod_log_config.pdb"
      +	-@erase "$(OUTDIR)\mod_log_config.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_config_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_config.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_log_config.so" /d LONG_NAME="log_config_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_config.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_config.pdb" /debug /out:"$(OUTDIR)\mod_log_config.so" /implib:"$(OUTDIR)\mod_log_config.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_config.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_config.obj" \
      +	"$(INTDIR)\mod_log_config.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_config.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_log_config.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_config.so"
      +   if exist .\Debug\mod_log_config.so.manifest mt.exe -manifest .\Debug\mod_log_config.so.manifest -outputresource:.\Debug\mod_log_config.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_log_config.dep")
      +!INCLUDE "mod_log_config.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_log_config.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_log_config - Win32 Release" || "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_log_config - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_config - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_config - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_log_config - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_log_config.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_config.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_log_config.so" /d LONG_NAME="log_config_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_log_config - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_log_config.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_config.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_log_config.so" /d LONG_NAME="log_config_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_log_config.c
      +
      +"$(INTDIR)\mod_log_config.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/loggers/mod_log_debug.c b/modules/loggers/mod_log_debug.c
      index 4ccf9c916f8..8a6c1244f5e 100644
      --- a/modules/loggers/mod_log_debug.c
      +++ b/modules/loggers/mod_log_debug.c
      @@ -35,8 +35,8 @@ typedef struct {
           apr_array_header_t *entries;
       } log_debug_dirconf;
       
      -const char *allhooks = "all";
      -const char * const hooks[] = {
      +static const char *allhooks = "all";
      +static const char * const hooks[] = {
           "log_transaction",      /*  0 */
           "quick_handler",        /*  1 */
           "handler",              /*  2 */
      @@ -67,7 +67,7 @@ static void do_debug_log(request_rec *r, const char *hookname)
               if (entry->condition) {
                   int ret = ap_expr_exec(r, entry->condition, &err);
                   if (err) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00640)
                                     "Can't evaluate condition: %s", err);
                       continue;
                   }
      @@ -76,14 +76,18 @@ static void do_debug_log(request_rec *r, const char *hookname)
               }
               msg = ap_expr_str_exec(r, entry->msg_expr, &err);
               if (err)
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00641)
                                 "Can't evaluate message expression: %s", err);
               if (APLOGrdebug(r))
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%s (%s hook, %s:%d)",
      +            /* Intentional no APLOGNO */
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                           "%s (%s hook, %s:%d)",
                                  msg, hookname, entry->msg_expr->filename,
                                  entry->msg_expr->line_number);
               else
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%s", msg);
      +            /* Intentional no APLOGNO */
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                          "%s", msg);
           }
       }
       
      diff --git a/modules/loggers/mod_log_debug.dep b/modules/loggers/mod_log_debug.dep
      new file mode 100644
      index 00000000000..eed5a6d31b0
      --- /dev/null
      +++ b/modules/loggers/mod_log_debug.dep
      @@ -0,0 +1,54 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_log_debug.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_log_debug.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/loggers/mod_log_debug.dsp b/modules/loggers/mod_log_debug.dsp
      index bfc7260fd65..f96e2ae467a 100644
      --- a/modules/loggers/mod_log_debug.dsp
      +++ b/modules/loggers/mod_log_debug.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_config_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_config_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/loggers/mod_log_debug.mak b/modules/loggers/mod_log_debug.mak
      new file mode 100644
      index 00000000000..94b0beeaa86
      --- /dev/null
      +++ b/modules/loggers/mod_log_debug.mak
      @@ -0,0 +1,325 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_log_debug.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_log_debug - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_log_debug - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_log_debug - Win32 Release" && "$(CFG)" != "mod_log_debug - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_log_debug.mak" CFG="mod_log_debug - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_log_debug - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_log_debug - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_debug - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_debug.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_log_debug.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_debug.obj"
      +	-@erase "$(INTDIR)\mod_log_debug.res"
      +	-@erase "$(INTDIR)\mod_log_debug_src.idb"
      +	-@erase "$(INTDIR)\mod_log_debug_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_debug.exp"
      +	-@erase "$(OUTDIR)\mod_log_debug.lib"
      +	-@erase "$(OUTDIR)\mod_log_debug.pdb"
      +	-@erase "$(OUTDIR)\mod_log_debug.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_debug_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_debug.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_debug.pdb" /debug /out:"$(OUTDIR)\mod_log_debug.so" /implib:"$(OUTDIR)\mod_log_debug.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_debug.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_debug.obj" \
      +	"$(INTDIR)\mod_log_debug.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_debug.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_log_debug.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_debug.so"
      +   if exist .\Release\mod_log_debug.so.manifest mt.exe -manifest .\Release\mod_log_debug.so.manifest -outputresource:.\Release\mod_log_debug.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_debug - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_debug.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_log_debug.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_debug.obj"
      +	-@erase "$(INTDIR)\mod_log_debug.res"
      +	-@erase "$(INTDIR)\mod_log_debug_src.idb"
      +	-@erase "$(INTDIR)\mod_log_debug_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_debug.exp"
      +	-@erase "$(OUTDIR)\mod_log_debug.lib"
      +	-@erase "$(OUTDIR)\mod_log_debug.pdb"
      +	-@erase "$(OUTDIR)\mod_log_debug.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_debug_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_debug.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_debug.pdb" /debug /out:"$(OUTDIR)\mod_log_debug.so" /implib:"$(OUTDIR)\mod_log_debug.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_debug.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_debug.obj" \
      +	"$(INTDIR)\mod_log_debug.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_debug.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_log_debug.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_debug.so"
      +   if exist .\Debug\mod_log_debug.so.manifest mt.exe -manifest .\Debug\mod_log_debug.so.manifest -outputresource:.\Debug\mod_log_debug.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_log_debug.dep")
      +!INCLUDE "mod_log_debug.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_log_debug.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_log_debug - Win32 Release" || "$(CFG)" == "mod_log_debug - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_log_debug - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_debug - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_debug - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_debug - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_log_debug - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_log_debug.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_log_debug - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_log_debug.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_debug.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_log_debug.so" /d LONG_NAME="log_debug_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_log_debug.c
      +
      +"$(INTDIR)\mod_log_debug.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/loggers/mod_log_forensic.c b/modules/loggers/mod_log_forensic.c
      index 8e23dd86bc4..bb808e88887 100644
      --- a/modules/loggers/mod_log_forensic.c
      +++ b/modules/loggers/mod_log_forensic.c
      @@ -81,7 +81,7 @@ static int open_log(server_rec *s, apr_pool_t *p)
       
               pl = ap_open_piped_log(p, pname);
               if (pl == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00650)
                                "couldn't spawn forensic log pipe %s", cfg->logname);
                   return 0;
               }
      @@ -94,7 +94,7 @@ static int open_log(server_rec *s, apr_pool_t *p)
               if ((rv = apr_file_open(&cfg->fd, fname,
                                       APR_WRITE | APR_APPEND | APR_CREATE,
                                       APR_OS_DEFAULT, p)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00651)
                                "could not open forensic log file %s.", fname);
                   return 0;
               }
      @@ -126,7 +126,7 @@ static char *log_escape(char *q, const char *e, const char *p)
               if (test_char_table[*(unsigned char *)p]&T_ESCAPE_FORENSIC) {
                   ap_assert(q+2 < e);
                   *q++ = '%';
      -            sprintf(q, "%02x", *(unsigned char *)p);
      +            ap_bin2hex(p, 1, q);
                   q += 2;
               }
               else
      @@ -240,7 +240,7 @@ static int log_after(request_rec *r)
           apr_size_t l, n;
           apr_status_t rv;
       
      -    if (!cfg->fd) {
      +    if (!cfg->fd || id == NULL) {
               return DECLINED;
           }
       
      diff --git a/modules/loggers/mod_log_forensic.dep b/modules/loggers/mod_log_forensic.dep
      new file mode 100644
      index 00000000000..2337156796f
      --- /dev/null
      +++ b/modules/loggers/mod_log_forensic.dep
      @@ -0,0 +1,53 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_log_forensic.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_log_forensic.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\server\test_char.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_atomic.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/loggers/mod_log_forensic.mak b/modules/loggers/mod_log_forensic.mak
      new file mode 100644
      index 00000000000..0ad2e544863
      --- /dev/null
      +++ b/modules/loggers/mod_log_forensic.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_log_forensic.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_log_forensic - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_log_forensic - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_log_forensic - Win32 Release" && "$(CFG)" != "mod_log_forensic - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_log_forensic.mak" CFG="mod_log_forensic - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_log_forensic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_log_forensic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_forensic - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_forensic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_log_forensic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_forensic.obj"
      +	-@erase "$(INTDIR)\mod_log_forensic.res"
      +	-@erase "$(INTDIR)\mod_log_forensic_src.idb"
      +	-@erase "$(INTDIR)\mod_log_forensic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_forensic.exp"
      +	-@erase "$(OUTDIR)\mod_log_forensic.lib"
      +	-@erase "$(OUTDIR)\mod_log_forensic.pdb"
      +	-@erase "$(OUTDIR)\mod_log_forensic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../server" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_forensic_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_forensic.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_log_forensic.so" /d LONG_NAME="log_forensic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_forensic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_forensic.pdb" /debug /out:"$(OUTDIR)\mod_log_forensic.so" /implib:"$(OUTDIR)\mod_log_forensic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_forensic.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_forensic.obj" \
      +	"$(INTDIR)\mod_log_forensic.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_forensic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_log_forensic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_forensic.so"
      +   if exist .\Release\mod_log_forensic.so.manifest mt.exe -manifest .\Release\mod_log_forensic.so.manifest -outputresource:.\Release\mod_log_forensic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_log_forensic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_log_forensic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_log_forensic.obj"
      +	-@erase "$(INTDIR)\mod_log_forensic.res"
      +	-@erase "$(INTDIR)\mod_log_forensic_src.idb"
      +	-@erase "$(INTDIR)\mod_log_forensic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_log_forensic.exp"
      +	-@erase "$(OUTDIR)\mod_log_forensic.lib"
      +	-@erase "$(OUTDIR)\mod_log_forensic.pdb"
      +	-@erase "$(OUTDIR)\mod_log_forensic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../server" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_log_forensic_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_log_forensic.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_log_forensic.so" /d LONG_NAME="log_forensic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_log_forensic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_log_forensic.pdb" /debug /out:"$(OUTDIR)\mod_log_forensic.so" /implib:"$(OUTDIR)\mod_log_forensic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_log_forensic.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_log_forensic.obj" \
      +	"$(INTDIR)\mod_log_forensic.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_log_forensic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_log_forensic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_log_forensic.so"
      +   if exist .\Debug\mod_log_forensic.so.manifest mt.exe -manifest .\Debug\mod_log_forensic.so.manifest -outputresource:.\Debug\mod_log_forensic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_log_forensic.dep")
      +!INCLUDE "mod_log_forensic.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_log_forensic.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_log_forensic - Win32 Release" || "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_log_forensic - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_forensic - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_log_forensic - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_log_forensic - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_log_forensic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_forensic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_log_forensic.so" /d LONG_NAME="log_forensic_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_log_forensic - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_log_forensic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_log_forensic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_log_forensic.so" /d LONG_NAME="log_forensic_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_log_forensic.c
      +
      +"$(INTDIR)\mod_log_forensic.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/loggers/mod_logio.c b/modules/loggers/mod_logio.c
      index f58c2922d3e..6d61d2e5d40 100644
      --- a/modules/loggers/mod_logio.c
      +++ b/modules/loggers/mod_logio.c
      @@ -15,15 +15,7 @@
        */
       
       /*
      - * Written by Bojan Smojver <bojan rexursive.com>:
      - *
      - * The argument to LogFormat and CustomLog is a string, which can include
      - * literal characters copied into the log files, and '%' directives as
      - * follows:
      - *
      - * %...I:  bytes received, including request and headers, cannot be zero
      - * %...O:  bytes sent, including headers, cannot be zero
      - *
      + * Written by Bojan Smojver <bojan rexursive.com>.
        */
       
       #include "apr_strings.h"
      @@ -41,10 +33,12 @@
       #include "http_config.h"
       #include "http_connection.h"
       #include "http_protocol.h"
      +#include "http_request.h"
       
       module AP_MODULE_DECLARE_DATA logio_module;
       
       static const char logio_filter_name[] = "LOG_INPUT_OUTPUT";
      +static const char logio_ttfb_filter_name[] = "LOGIO_TTFB_OUT";
       
       /*
        * Logging of input and output config...
      @@ -56,13 +50,23 @@ typedef struct logio_config_t {
           apr_off_t bytes_last_request;
       } logio_config_t;
       
      +typedef struct logio_dirconf_t {
      +    unsigned int track_ttfb:1;
      +} logio_dirconf_t;
      +
      +typedef struct logio_req_t {
      +    apr_time_t ttfb;
      +} logio_req_t;
      +
      +
      +
       /*
        * Optional function for the core to add to bytes_out
        */
       
      -static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes){
      +static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes)
      +{
           logio_config_t *cf = ap_get_module_config(c->conn_config, &logio_module);
      -
           cf->bytes_out += bytes;
       }
       
      @@ -70,7 +74,8 @@ static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes){
        * Optional function for modules to adjust bytes_in
        */
       
      -static void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes){
      +static void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes)
      +{
           logio_config_t *cf = ap_get_module_config(c->conn_config, &logio_module);
       
           cf->bytes_in += bytes;
      @@ -108,6 +113,25 @@ static const char *log_bytes_out(request_rec *r, char *a)
           return apr_off_t_toa(r->pool, cf->bytes_out);
       }
       
      +static const char *log_bytes_combined(request_rec *r, char *a)
      +{
      +    logio_config_t *cf = ap_get_module_config(r->connection->conn_config,
      +                                              &logio_module);
      +
      +    return apr_off_t_toa(r->pool, cf->bytes_out + cf->bytes_in);
      +}
      +
      +static const char *log_ttfb(request_rec *r, char *a)
      +{
      +    logio_req_t *rconf = ap_get_module_config(r->request_config,
      +                                           &logio_module);
      +
      +    if (!rconf || !rconf->ttfb) { 
      +        return "-";
      +    }
      +
      +    return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, rconf->ttfb);
      +}
       /*
        * Reset counters after logging...
        */
      @@ -132,7 +156,8 @@ static apr_status_t logio_in_filter(ap_filter_t *f,
                                           apr_bucket_brigade *bb,
                                           ap_input_mode_t mode,
                                           apr_read_type_e block,
      -                                    apr_off_t readbytes) {
      +                                    apr_off_t readbytes)
      +{
           apr_off_t length;
           apr_status_t status;
           logio_config_t *cf = ap_get_module_config(f->c->conn_config, &logio_module);
      @@ -151,7 +176,8 @@ static apr_status_t logio_in_filter(ap_filter_t *f,
        * The hooks...
        */
       
      -static int logio_pre_conn(conn_rec *c, void *csd) {
      +static int logio_pre_conn(conn_rec *c, void *csd)
      +{
           logio_config_t *cf = apr_pcalloc(c->pool, sizeof(*cf));
       
           ap_set_module_config(c->conn_config, &logio_module, cf);
      @@ -170,11 +196,62 @@ static int logio_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
           if (log_pfn_register) {
               log_pfn_register(p, "I", log_bytes_in, 0);
               log_pfn_register(p, "O", log_bytes_out, 0);
      +        log_pfn_register(p, "S", log_bytes_combined, 0);
      +        log_pfn_register(p, "^FB", log_ttfb, 0);
           }
       
           return OK;
       }
       
      +static apr_status_t logio_ttfb_filter(ap_filter_t *f, apr_bucket_brigade *b)
      +{
      +    request_rec *r = f->r;
      +    logio_dirconf_t *conf = ap_get_module_config(r->per_dir_config,
      +                                                 &logio_module);
      +    if (conf && conf->track_ttfb) { 
      +        logio_req_t *rconf = ap_get_module_config(r->request_config, 
      +                                                  &logio_module);
      +        if (rconf == NULL) { 
      +            rconf = apr_pcalloc(r->pool, sizeof(logio_req_t));
      +            rconf->ttfb = apr_time_now() - r->request_time;
      +            ap_set_module_config(r->request_config, &logio_module, rconf);
      +        }
      +    }
      +    ap_remove_output_filter(f);
      +    return ap_pass_brigade(f->next, b);
      +}
      +
      +static void logio_insert_filter(request_rec * r)
      +{
      +    logio_dirconf_t *conf = ap_get_module_config(r->per_dir_config,
      +                                                 &logio_module);
      +    if (conf->track_ttfb) { 
      +        ap_add_output_filter(logio_ttfb_filter_name, NULL, r, r->connection);
      +    }
      +}
      +
      +static const char *logio_track_ttfb(cmd_parms *cmd, void *in_dir_config, int arg)
      +{
      +    logio_dirconf_t *dir_config = in_dir_config;
      +    dir_config->track_ttfb = arg;
      +    return NULL;
      +}
      +
      +static void *create_logio_dirconf (apr_pool_t *p, char *dummy)
      +{
      +    logio_dirconf_t *new =
      +        (logio_dirconf_t *) apr_pcalloc(p, sizeof(logio_dirconf_t));
      +    return (void *) new;
      +}
      +
      +
      +static const command_rec logio_cmds[] = {
      +    AP_INIT_FLAG ("LogIOTrackTTFB", logio_track_ttfb, NULL, OR_ALL,
      +                  "Set to 'ON' to enable tracking time to first byte"),
      +    {NULL}
      +};
      +
      +
       static void register_hooks(apr_pool_t *p)
       {
           static const char *pre[] = { "mod_log_config.c", NULL };
      @@ -186,6 +263,10 @@ static void register_hooks(apr_pool_t *p)
           ap_register_input_filter(logio_filter_name, logio_in_filter, NULL,
                                    AP_FTYPE_NETWORK - 1);
       
      +    ap_hook_insert_filter(logio_insert_filter, NULL, NULL, APR_HOOK_LAST);
      +    ap_register_output_filter(logio_ttfb_filter_name, logio_ttfb_filter, NULL,
      +                              AP_FTYPE_RESOURCE);
      +
           APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_out);
           APR_REGISTER_OPTIONAL_FN(ap_logio_add_bytes_in);
           APR_REGISTER_OPTIONAL_FN(ap_logio_get_last_bytes);
      @@ -194,10 +275,10 @@ static void register_hooks(apr_pool_t *p)
       AP_DECLARE_MODULE(logio) =
       {
           STANDARD20_MODULE_STUFF,
      -    NULL,                       /* create per-dir config */
      +    create_logio_dirconf,       /* create per-dir config */ 
           NULL,                       /* merge per-dir config */
           NULL,                       /* server config */
           NULL,                       /* merge server config */
      -    NULL,                       /* command apr_table_t */
      +    logio_cmds,                 /* command apr_table_t */
           register_hooks              /* register hooks */
       };
      diff --git a/modules/loggers/mod_logio.dep b/modules/loggers/mod_logio.dep
      new file mode 100644
      index 00000000000..cc70d819f29
      --- /dev/null
      +++ b/modules/loggers/mod_logio.dep
      @@ -0,0 +1,59 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_logio.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_logio.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_log_config.h"\
      +	
      diff --git a/modules/loggers/mod_logio.mak b/modules/loggers/mod_logio.mak
      new file mode 100644
      index 00000000000..363e848809e
      --- /dev/null
      +++ b/modules/loggers/mod_logio.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_logio.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_logio - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_logio - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_logio - Win32 Release" && "$(CFG)" != "mod_logio - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_logio.mak" CFG="mod_logio - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_logio - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_logio - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_logio - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_logio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_logio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_logio.obj"
      +	-@erase "$(INTDIR)\mod_logio.res"
      +	-@erase "$(INTDIR)\mod_logio_src.idb"
      +	-@erase "$(INTDIR)\mod_logio_src.pdb"
      +	-@erase "$(OUTDIR)\mod_logio.exp"
      +	-@erase "$(OUTDIR)\mod_logio.lib"
      +	-@erase "$(OUTDIR)\mod_logio.pdb"
      +	-@erase "$(OUTDIR)\mod_logio.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_logio_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_logio.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_logio.so" /d LONG_NAME="logio_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_logio.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_logio.pdb" /debug /out:"$(OUTDIR)\mod_logio.so" /implib:"$(OUTDIR)\mod_logio.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_logio.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_logio.obj" \
      +	"$(INTDIR)\mod_logio.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_logio.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_logio.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_logio.so"
      +   if exist .\Release\mod_logio.so.manifest mt.exe -manifest .\Release\mod_logio.so.manifest -outputresource:.\Release\mod_logio.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_logio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_logio.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_logio.obj"
      +	-@erase "$(INTDIR)\mod_logio.res"
      +	-@erase "$(INTDIR)\mod_logio_src.idb"
      +	-@erase "$(INTDIR)\mod_logio_src.pdb"
      +	-@erase "$(OUTDIR)\mod_logio.exp"
      +	-@erase "$(OUTDIR)\mod_logio.lib"
      +	-@erase "$(OUTDIR)\mod_logio.pdb"
      +	-@erase "$(OUTDIR)\mod_logio.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_logio_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_logio.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_logio.so" /d LONG_NAME="logio_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_logio.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_logio.pdb" /debug /out:"$(OUTDIR)\mod_logio.so" /implib:"$(OUTDIR)\mod_logio.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_logio.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_logio.obj" \
      +	"$(INTDIR)\mod_logio.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_logio.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_logio.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_logio.so"
      +   if exist .\Debug\mod_logio.so.manifest mt.exe -manifest .\Debug\mod_logio.so.manifest -outputresource:.\Debug\mod_logio.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_logio.dep")
      +!INCLUDE "mod_logio.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_logio.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_logio - Win32 Release" || "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_logio - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_logio - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\loggers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\loggers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_logio - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ELSEIF  "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\loggers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\loggers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_logio - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_logio.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_logio.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_logio.so" /d LONG_NAME="logio_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_logio - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_logio.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_logio.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_logio.so" /d LONG_NAME="logio_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_logio.c
      +
      +"$(INTDIR)\mod_logio.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/lua/NWGNUmakefile b/modules/lua/NWGNUmakefile
      index dcff6679c42..fd86b3c9ee6 100644
      --- a/modules/lua/NWGNUmakefile
      +++ b/modules/lua/NWGNUmakefile
      @@ -26,9 +26,10 @@ include $(AP_WORK)/build/NWGNUhead.inc
       XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
      -			$(AP_WORK)/include \
      -			$(AP_WORK)/modules/http \
      -			$(AP_WORK)/modules/ssl \
      +			$(SRC)/include \
      +			$(STDMOD)/database \
      +			$(STDMOD)/http \
      +			$(STDMOD)/ssl \
       			$(NWOS) \
       			$(LUASRC)/src \
       			$(EOLIST)
      @@ -44,6 +45,7 @@ XCFLAGS		+= \
       # These defines will come after DEFINES
       #
       XDEFINES	+= \
      +			-DLUA_COMPAT_ALL \
       			$(EOLIST)
       
       #
      @@ -127,7 +129,7 @@ NLM_VERSION	=
       #
       # If this is specified, it will override the default of 64K
       #
      -NLM_STACK_SIZE	= 8192
      +NLM_STACK_SIZE	= 131072
       
       
       #
      @@ -179,8 +181,11 @@ FILES_nlm_objs = \
       	$(OBJDIR)/mod_lua.o \
       	$(OBJDIR)/lua_apr.o \
       	$(OBJDIR)/lua_config.o \
      +	$(OBJDIR)/lua_passwd.o \
       	$(OBJDIR)/lua_request.o \
       	$(OBJDIR)/lua_vmprep.o \
      +	$(OBJDIR)/lua_dbd.o \
      +	$(OBJDIR)/libprews.o \
       	$(EOLIST)
       
       #
      @@ -225,6 +230,12 @@ FILES_nlm_Ximports = \
       	@libc.imp \
       	$(EOLIST)
       
      +# Don't link with Winsock if standard sockets are being used
      +ifndef USE_STDSOCKETS
      +FILES_nlm_Ximports += @ws2nlm.imp \
      +	$(EOLIST)
      +endif
      +
       #
       # Any symbols exported to here
       #
      @@ -261,7 +272,7 @@ install :: nlms FORCE
       # Any specialized rules here
       #
       
      -vpath %.c $(LUASRC)/src
      +vpath %.c $(LUASRC)/src ../arch/netware
       
       #
       # Include the 'tail' makefile that has targets that depend on variables defined
      diff --git a/modules/lua/README b/modules/lua/README
      index 4efa9cd62d8..0be0adeba05 100644
      --- a/modules/lua/README
      +++ b/modules/lua/README
      @@ -38,13 +38,10 @@
       
       * Task List
       ** TODO Use r->file to determine file, doing rewriting in translate_name   
      -** TODO Change to controlling lifecycle by passing in a pool?
      -   Need to determine how to handle server scoped then!
       ** TODO Provide means to get useful output from lua errors in response body
          Probably have to put it on the vm spec for pre-handler errors, as
          it is pre-handler, will prolly be on the request_config somewhere,
          but sometimes cannot put there, so... fun
      -** TODO Filters
       ** TODO Mapping in the server_rec
       ** TODO Connection scoped vms
       ** TODO Figure out how reentrancy works regarding filter chain stuff. 
      @@ -52,8 +49,11 @@
       ** TODO Flesh out apw_*getvm for each flavor we allow
       ** TODO Rework apw_sgetvm to use the create_vm stuff like apw_rgetvm
       ** TODO apw_rgetvm needs to handle connection scoped vms     
      -** TODO options in server scoped vms (ie, min and max vm counts)
       ** TODO provide means to implement authn and authz providers
      +** TODO: Flatten LuaHook* to LuaHook phase file fn ?
      +** TODO: document or remove block sections
      +** TODO: test per-dir behavior of block sections
      +** TODO: Suppress internal details (fs path to scripts, etc) in error responses
           
       * License
         Apache License, Version 2.0,
      @@ -75,3 +75,6 @@
       ** Brian Akins
       ** Justin Erenkrantz
       ** Philip M. Gollucci
      +** Stefan Fritsch
      +** Eric Covener
      +** Daniel Gruno
      diff --git a/modules/lua/config.m4 b/modules/lua/config.m4
      index c70c5af930c..18e9fe56ac7 100644
      --- a/modules/lua/config.m4
      +++ b/modules/lua/config.m4
      @@ -1,7 +1,7 @@
       
       APACHE_MODPATH_INIT(lua)
       
      -dnl Check for Lua 5.1 Libraries
      +dnl Check for Lua 5.2/5.1 Libraries
       dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
       dnl Sets:
       dnl  LUA_CFLAGS
      @@ -11,7 +11,7 @@ AC_DEFUN([CHECK_LUA],
       
       AC_ARG_WITH(
           lua,
      -    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.1 prefix])],
      +    [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.2/5.1 prefix])],
           lua_path="$withval",
           :)
       
      @@ -25,42 +25,39 @@ fi
       AC_CHECK_LIB(m, pow, lib_m="-lm")
       AC_CHECK_LIB(m, sqrt, lib_m="-lm")
       for x in $test_paths ; do
      -  if test "x$x" = "x."; then
      -    AC_CHECK_HEADER(lua.h,[
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua-5.2])
      +    if test -f ${x}/include/lua-5.2/lua.h; then
      +        AC_MSG_RESULT([yes])
               save_CFLAGS=$CFLAGS
               save_LDFLAGS=$LDFLAGS
               CFLAGS="$CFLAGS"
      -        LDFLAGS="$LDFLAGS $lib_m"
      -        AC_CHECK_LIB(lua5.1, luaL_newstate, [
      -            LUA_LIBS="-llua5.1 $lib_m"
      -        ],[
      -            AC_CHECK_LIB(lua-5.1, luaL_newstate, [
      -                LUA_LIBS="-llua-5.1 $lib_m"
      -            ],[
      -                AC_CHECK_LIB(lua, luaL_newstate, [
      -                    LUA_LIBS="-llua $lib_m"
      -                ])
      +        LDFLAGS="-L$x/lib/lua-5.2 $LDFLAGS $lib_m"
      +        AC_CHECK_LIB(lua-5.2, luaL_newstate, [
      +            LUA_LIBS="-L$x/lib/lua-5.2 -llua-5.2 $lib_m"
      +            if test "x$ap_platform_runtime_link_flag" != "x"; then
      +               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua-5.2])
      +            fi
      +            LUA_CFLAGS="-I$x/include/lua-5.2"
                   ])
      -        ])
      -        LUA_CFLAGS=
               CFLAGS=$save_CFLAGS
               LDFLAGS=$save_LDFLAGS
               break
      -    ])
      -  else
      -    AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.1])
      -    if test -f ${x}/include/lua5.1/lua.h; then
      +    else
      +        AC_MSG_RESULT([no])
      +    fi
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.2])
      +    if test -f ${x}/include/lua5.2/lua.h; then
               AC_MSG_RESULT([yes])
               save_CFLAGS=$CFLAGS
               save_LDFLAGS=$LDFLAGS
               CFLAGS="$CFLAGS"
               LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
      -        AC_CHECK_LIB(lua5.1, luaL_newstate, [
      -            LUA_LIBS="-L$x/lib -llua5.1 $lib_m"
      +        AC_CHECK_LIB(lua5.2, luaL_newstate, [
      +            LUA_LIBS="-L$x/lib -llua5.2 $lib_m"
                   if test "x$ap_platform_runtime_link_flag" != "x"; then
                      APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib])
                   fi
      -            LUA_CFLAGS="-I$x/include/lua5.1"
      +            LUA_CFLAGS="-I$x/include/lua5.2"
                   ])
               CFLAGS=$save_CFLAGS
               LDFLAGS=$save_LDFLAGS
      @@ -68,19 +65,19 @@ for x in $test_paths ; do
           else
               AC_MSG_RESULT([no])
           fi
      -    AC_MSG_CHECKING([for lua.h in ${x}/include/lua51])
      -    if test -f ${x}/include/lua51/lua.h; then
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua52])
      +    if test -f ${x}/include/lua52/lua.h; then
               AC_MSG_RESULT([yes])
               save_CFLAGS=$CFLAGS
               save_LDFLAGS=$LDFLAGS
               CFLAGS="$CFLAGS"
      -        LDFLAGS="-L$x/lib/lua51 $LDFLAGS $lib_m"
      +        LDFLAGS="-L$x/lib/lua52 $LDFLAGS $lib_m"
               AC_CHECK_LIB(lua, luaL_newstate, [
      -            LUA_LIBS="-L$x/lib/lua51 -llua $lib_m"
      +            LUA_LIBS="-L$x/lib/lua52 -llua $lib_m"
                   if test "x$ap_platform_runtime_link_flag" != "x"; then
      -               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua51])
      +               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua52])
                   fi
      -            LUA_CFLAGS="-I$x/include/lua51"
      +            LUA_CFLAGS="-I$x/include/lua52"
                   ])
               CFLAGS=$save_CFLAGS
               LDFLAGS=$save_LDFLAGS
      @@ -108,37 +105,100 @@ for x in $test_paths ; do
           else
               AC_MSG_RESULT([no])
           fi
      -  fi
      +  
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua-5.1])
      +    if test -f ${x}/include/lua-5.1/lua.h; then
      +        AC_MSG_RESULT([yes])
      +        save_CFLAGS=$CFLAGS
      +        save_LDFLAGS=$LDFLAGS
      +        CFLAGS="$CFLAGS"
      +        LDFLAGS="-L$x/lib/lua-5.1 $LDFLAGS $lib_m"
      +        AC_CHECK_LIB(lua-5.1, luaL_newstate, [
      +            LUA_LIBS="-L$x/lib/lua-5.1 -llua-5.1 $lib_m"
      +            if test "x$ap_platform_runtime_link_flag" != "x"; then
      +               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua-5.1])
      +            fi
      +            LUA_CFLAGS="-I$x/include/lua-5.1"
      +            ])
      +        CFLAGS=$save_CFLAGS
      +        LDFLAGS=$save_LDFLAGS
      +        break
      +    else
      +        AC_MSG_RESULT([no])
      +    fi
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua5.1])
      +    if test -f ${x}/include/lua5.1/lua.h; then
      +        AC_MSG_RESULT([yes])
      +        save_CFLAGS=$CFLAGS
      +        save_LDFLAGS=$LDFLAGS
      +        CFLAGS="$CFLAGS"
      +        LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
      +        AC_CHECK_LIB(lua5.1, luaL_newstate, [
      +            LUA_LIBS="-L$x/lib -llua5.1 $lib_m"
      +            if test "x$ap_platform_runtime_link_flag" != "x"; then
      +               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib])
      +            fi
      +            LUA_CFLAGS="-I$x/include/lua5.1"
      +            ])
      +        CFLAGS=$save_CFLAGS
      +        LDFLAGS=$save_LDFLAGS
      +        break
      +    else
      +        AC_MSG_RESULT([no])
      +    fi
      +    AC_MSG_CHECKING([for lua.h in ${x}/include/lua51])
      +    if test -f ${x}/include/lua51/lua.h; then
      +        AC_MSG_RESULT([yes])
      +        save_CFLAGS=$CFLAGS
      +        save_LDFLAGS=$LDFLAGS
      +        CFLAGS="$CFLAGS"
      +        LDFLAGS="-L$x/lib/lua51 $LDFLAGS $lib_m"
      +        AC_CHECK_LIB(lua, luaL_newstate, [
      +            LUA_LIBS="-L$x/lib/lua51 -llua $lib_m"
      +            if test "x$ap_platform_runtime_link_flag" != "x"; then
      +               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua51])
      +            fi
      +            LUA_CFLAGS="-I$x/include/lua51"
      +            ])
      +        CFLAGS=$save_CFLAGS
      +        LDFLAGS=$save_LDFLAGS
      +        break
      +    else
      +        AC_MSG_RESULT([no])
      +    fi
       done
       
       AC_SUBST(LUA_LIBS)
       AC_SUBST(LUA_CFLAGS)
       
       if test -z "${LUA_LIBS}"; then
      -  AC_MSG_WARN([*** Lua 5.1 library not found.])
      +  AC_MSG_WARN([*** Lua 5.2 or 5.1 library not found.])
         ifelse([$2], ,
           enable_lua="no"
           if test -z "${lua_path}"; then
      -        AC_MSG_WARN([Lua 5.1 library is required])
      +        AC_MSG_WARN([Lua 5.2 or 5.1 library is required])
           else
      -        AC_MSG_ERROR([Lua 5.1 library is required])
      +        AC_MSG_ERROR([Lua 5.2 or 5.1 library is required])
           fi,
           $2)
       else
         AC_MSG_NOTICE([using '${LUA_LIBS}' for Lua Library])
      -  AC_ARG_ENABLE(luajit,
      -    APACHE_HELP_STRING(--enable-luajit,Enable LuaJit Support),
      -    APR_ADDTO(CPPFLAGS, ["-DAP_ENABLE_LUAJIT"]))
      +  AC_ARG_ENABLE(luajit,APACHE_HELP_STRING(--enable-luajit,Enable LuaJit Support),
      +  [
      +    if test "$enableval" = "yes"; then
      +      APR_ADDTO(MOD_CPPFLAGS, ["-DAP_ENABLE_LUAJIT"])
      +    fi
      +  ])
         ifelse([$1], , , $1) 
       fi 
       ])
       
      -lua_objects="lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo lua_vmprep.lo"
      +lua_objects="lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo lua_vmprep.lo lua_dbd.lo lua_passwd.lo"
       
       APACHE_MODULE(lua, Apache Lua Framework, $lua_objects, , , [
         CHECK_LUA()
         if test "x$enable_lua" != "xno" ; then
      -    APR_ADDTO(INCLUDES, [$LUA_CFLAGS])
      +    APR_ADDTO(MOD_INCLUDES, [$LUA_CFLAGS])
           APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS])
         fi
       ])
      diff --git a/modules/lua/lua_apr.c b/modules/lua/lua_apr.c
      index ad396e66f5d..fd3ba20e7a7 100644
      --- a/modules/lua/lua_apr.c
      +++ b/modules/lua/lua_apr.c
      @@ -14,32 +14,21 @@
        * See the License for the specific language governing permissions and
        * limitations under the License.
        */
      -#include "apr.h"
      -#include "apr_tables.h"
       
       #include "mod_lua.h"
       #include "lua_apr.h"
      +APLOG_USE_MODULE(lua);
       
      -/**
      - * make a userdata out of a C pointer, and vice versa
      - * instead of using lightuserdata
      - */
      -#ifndef lua_boxpointer
      -#define lua_boxpointer(L,u) (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u))
      -#define lua_unboxpointer(L,i)   (*(void **)(lua_touserdata(L, i)))
      -#endif
      -
      -
      -AP_LUA_DECLARE(apr_table_t*) ap_lua_check_apr_table(lua_State *L, int index)
      +req_table_t *ap_lua_check_apr_table(lua_State *L, int index)
       {
      -    apr_table_t *t;
      +    req_table_t* t;
           luaL_checkudata(L, index, "Apr.Table");
      -    t = (apr_table_t *) lua_unboxpointer(L, index);
      +    t = lua_unboxpointer(L, index);
           return t;
       }
       
       
      -AP_LUA_DECLARE(void) ap_lua_push_apr_table(lua_State *L, apr_table_t *t)
      +void ap_lua_push_apr_table(lua_State *L, req_table_t *t)
       {
           lua_boxpointer(L, t);
           luaL_getmetatable(L, "Apr.Table");
      @@ -48,31 +37,49 @@ AP_LUA_DECLARE(void) ap_lua_push_apr_table(lua_State *L, apr_table_t *t)
       
       static int lua_table_set(lua_State *L)
       {
      -    apr_table_t *t = ap_lua_check_apr_table(L, 1);
      -    const char *key = luaL_checkstring(L, 2);
      -    const char *val = luaL_checkstring(L, 3);
      -
      -    apr_table_set(t, key, val);
      +    req_table_t    *t = ap_lua_check_apr_table(L, 1);
      +    const char     *key = luaL_checkstring(L, 2);
      +    const char     *val = luaL_checkstring(L, 3);
      +    /* Unless it's the 'notes' table, check for newline chars */
      +    /* t->r will be NULL in case of the connection notes, but since 
      +       we aren't going to check anything called 'notes', we can safely 
      +       disregard checking whether t->r is defined.
      +    */
      +    if (strcmp(t->n, "notes") && ap_strchr_c(val, '\n')) {
      +        char *badchar;
      +        char *replacement = apr_pstrdup(t->r->pool, val);
      +        badchar = replacement;
      +        while ( (badchar = ap_strchr(badchar, '\n')) ) {
      +            *badchar = ' ';
      +        }
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, t->r, APLOGNO(02614)
      +                      "mod_lua: Value for '%s' in table '%s' contains newline!",
      +                  key, t->n);
      +        apr_table_set(t->t, key, replacement);
      +    }
      +    else {
      +        apr_table_set(t->t, key, val);
      +    }
           return 0;
       }
       
       static int lua_table_get(lua_State *L)
       {
      -    apr_table_t *t = ap_lua_check_apr_table(L, 1);
      -    const char *key = luaL_checkstring(L, 2);
      -    const char *val = apr_table_get(t, key);
      +    req_table_t    *t = ap_lua_check_apr_table(L, 1);
      +    const char     *key = luaL_checkstring(L, 2);
      +    const char     *val = apr_table_get(t->t, key);
           lua_pushstring(L, val);
           return 1;
       }
       
      -static const luaL_reg lua_table_methods[] = {
      +static const luaL_Reg lua_table_methods[] = {
           {"set", lua_table_set},
           {"get", lua_table_get},
           {0, 0}
       };
       
       
      -AP_LUA_DECLARE(int) ap_lua_init(lua_State *L, apr_pool_t *p)
      +int ap_lua_init(lua_State *L, apr_pool_t *p)
       {
           luaL_newmetatable(L, "Apr.Table");
           luaL_register(L, "apr_table", lua_table_methods);
      @@ -88,3 +95,6 @@ AP_LUA_DECLARE(int) ap_lua_init(lua_State *L, apr_pool_t *p)
       
           return 0;
       }
      +
      +
      +
      diff --git a/modules/lua/lua_apr.h b/modules/lua/lua_apr.h
      index c66cdde9e80..c194f11cbb4 100644
      --- a/modules/lua/lua_apr.h
      +++ b/modules/lua/lua_apr.h
      @@ -18,8 +18,19 @@
       #ifndef _LUA_APR_H_
       #define _LUA_APR_H_
       
      -AP_LUA_DECLARE(int) ap_lua_init(lua_State *L, apr_pool_t * p);
      -AP_LUA_DECLARE(apr_table_t*) ap_lua_check_apr_table(lua_State *L, int index);
      -AP_LUA_DECLARE(void) ap_lua_push_apr_table(lua_State *L, apr_table_t *t);
      +#include "scoreboard.h"
      +#include "http_main.h"
      +#include "ap_mpm.h"
      +#include "apr_md5.h"
      +#include "apr_sha1.h"
      +#include "apr_poll.h"
      +#include "apr.h"
      +#include "apr_tables.h"
      +#include "apr_base64.h"
      +
      +
      +int ap_lua_init(lua_State *L, apr_pool_t * p);
      +req_table_t *ap_lua_check_apr_table(lua_State *L, int index);
      +void ap_lua_push_apr_table(lua_State *L, req_table_t *t);
       
       #endif /* !_LUA_APR_H_ */
      diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c
      index 8a967dc5f2b..3b307ebc0e4 100644
      --- a/modules/lua/lua_config.c
      +++ b/modules/lua/lua_config.c
      @@ -39,19 +39,19 @@ static cmd_parms *check_cmd_parms(lua_State *L, int index)
       static int apl_toscope(const char *name)
       {
           if (0 == strcmp("once", name))
      -        return APL_SCOPE_ONCE;
      +        return AP_LUA_SCOPE_ONCE;
           if (0 == strcmp("request", name))
      -        return APL_SCOPE_REQUEST;
      +        return AP_LUA_SCOPE_REQUEST;
           if (0 == strcmp("connection", name))
      -        return APL_SCOPE_CONN;
      +        return AP_LUA_SCOPE_CONN;
           if (0 == strcmp("conn", name))
      -        return APL_SCOPE_CONN;
      -    if (0 == strcmp("server", name))
      -        return APL_SCOPE_SERVER;
      -    return APL_SCOPE_ONCE;
      +        return AP_LUA_SCOPE_CONN;
      +    if (0 == strcmp("thread", name))
      +        return AP_LUA_SCOPE_THREAD;
      +    return AP_LUA_SCOPE_ONCE;
       }
       
      -AP_LUA_DECLARE(apr_status_t) ap_lua_map_handler(ap_lua_dir_cfg *cfg,
      +apr_status_t ap_lua_map_handler(ap_lua_dir_cfg *cfg,
                                                        const char *file,
                                                        const char *function,
                                                        const char *pattern,
      @@ -114,7 +114,7 @@ static int cfg_lua_map_handler(lua_State *L)
               handler->scope = apl_toscope(scope);
           }
           else {
      -        handler->scope = APL_SCOPE_ONCE;
      +        handler->scope = AP_LUA_SCOPE_ONCE;
           }
           lua_pop(L, 1);
       
      @@ -141,7 +141,8 @@ static int cfg_directory(lua_State *L)
           return 1;
       }
       
      -/*static int cfg_root(lua_State *L) {
      +/*static int cfg_root(lua_State *L)
      +{
           ap_lua_dir_cfg *cfg = check_dir_config(L, 1);
           lua_pushstring(L, cfg->root_path);
           return 1;
      @@ -154,15 +155,6 @@ static const struct luaL_Reg cfg_methods[] = {
           {NULL, NULL}
       };
       
      -
      -
      -static int cmd_foo(lua_State *L)
      -{
      -    cmd_parms *cmd = check_cmd_parms(L, 1);
      -    ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, "FOO!");
      -    return 0;
      -}
      -
       /* helper function for the logging functions below */
       static int cmd_log_at(lua_State *L, int level)
       {
      @@ -182,89 +174,70 @@ static int cmd_log_at(lua_State *L, int level)
       /* r:debug(String) and friends which use apache logging */
       static int cmd_emerg(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_EMERG);
      -    return 0;
      +    return cmd_log_at(L, APLOG_EMERG);
       }
       static int cmd_alert(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_ALERT);
      -    return 0;
      +    return cmd_log_at(L, APLOG_ALERT);
       }
       static int cmd_crit(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_CRIT);
      -    return 0;
      +    return cmd_log_at(L, APLOG_CRIT);
       }
       static int cmd_err(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_ERR);
      -    return 0;
      +    return cmd_log_at(L, APLOG_ERR);
       }
       static int cmd_warn(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_WARNING);
      -    return 0;
      +    return cmd_log_at(L, APLOG_WARNING);
       }
       static int cmd_notice(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_NOTICE);
      -    return 0;
      +    return cmd_log_at(L, APLOG_NOTICE);
       }
       static int cmd_info(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_INFO);
      -    return 0;
      +    return cmd_log_at(L, APLOG_INFO);
       }
       static int cmd_debug(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_DEBUG);
      -    return 0;
      +    return cmd_log_at(L, APLOG_DEBUG);
       }
       static int cmd_trace1(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE1);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE1);
       }
       static int cmd_trace2(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE2);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE2);
       }
       static int cmd_trace3(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE3);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE3);
       }
       static int cmd_trace4(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE4);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE4);
       }
       static int cmd_trace5(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE5);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE5);
       }
       static int cmd_trace6(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE6);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE6);
       }
       static int cmd_trace7(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE7);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE7);
       }
       static int cmd_trace8(lua_State *L)
       {
      -    cmd_log_at(L, APLOG_TRACE8);
      -    return 0;
      +    return cmd_log_at(L, APLOG_TRACE8);
       }
       
      -
       static const struct luaL_Reg cmd_methods[] = {
      -    {"foo", cmd_foo},
      -
           {"trace8", cmd_trace8},
           {"trace7", cmd_trace7},
           {"trace6", cmd_trace6},
      @@ -285,7 +258,7 @@ static const struct luaL_Reg cmd_methods[] = {
           {NULL, NULL}
       };
       
      -AP_LUA_DECLARE(void) ap_lua_load_config_lmodule(lua_State *L)
      +void ap_lua_load_config_lmodule(lua_State *L)
       {
           luaL_newmetatable(L, "Apache2.DirConfig");  /* [metatable] */
           lua_pushvalue(L, -1);
      diff --git a/modules/lua/lua_config.h b/modules/lua/lua_config.h
      index d2689da1aae..8a778ad87e8 100644
      --- a/modules/lua/lua_config.h
      +++ b/modules/lua/lua_config.h
      @@ -20,9 +20,9 @@
       #ifndef _APL_CONFIG_H_
       #define _APL_CONFIG_H_
       
      -AP_LUA_DECLARE(void) ap_lua_load_config_lmodule(lua_State *L);
      +void ap_lua_load_config_lmodule(lua_State *L);
       
      -AP_LUA_DECLARE(apr_status_t) ap_lua_map_handler(ap_lua_dir_cfg *cfg,
      +apr_status_t ap_lua_map_handler(ap_lua_dir_cfg *cfg,
                                                       const char *file,
                                                       const char *function,
                                                       const char *pattern,
      diff --git a/modules/lua/lua_dbd.c b/modules/lua/lua_dbd.c
      new file mode 100644
      index 00000000000..8b61a60b107
      --- /dev/null
      +++ b/modules/lua/lua_dbd.c
      @@ -0,0 +1,843 @@
      +/**
      + * Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +
      +#include "mod_lua.h"
      +#include "lua_dbd.h"
      +
      +APLOG_USE_MODULE(lua);
      +static APR_OPTIONAL_FN_TYPE(ap_dbd_close) *lua_ap_dbd_close = NULL;
      +static APR_OPTIONAL_FN_TYPE(ap_dbd_open) *lua_ap_dbd_open = NULL;
      +
      +
      +
      +
      +static request_rec *ap_lua_check_request_rec(lua_State *L, int index)
      +{
      +    request_rec *r;
      +    luaL_checkudata(L, index, "Apache2.Request");
      +    r = lua_unboxpointer(L, index);
      +    return r;
      +}
      +
      +static lua_db_handle *lua_get_db_handle(lua_State *L)
      +{
      +    luaL_checktype(L, 1, LUA_TTABLE);
      +    lua_rawgeti(L, 1, 0);
      +    luaL_checktype(L, -1, LUA_TUSERDATA);
      +    return (lua_db_handle *) lua_topointer(L, -1);
      +}
      +
      +static lua_db_result_set *lua_get_result_set(lua_State *L)
      +{
      +    luaL_checktype(L, 1, LUA_TTABLE);
      +    lua_rawgeti(L, 1, 0);
      +    luaL_checktype(L, -1, LUA_TUSERDATA);
      +    return (lua_db_result_set *) lua_topointer(L, -1);
      +}
      +
      +
      +/*
      +   =============================================================================
      +    db:close(): Closes an open database connection.
      +   =============================================================================
      + */
      +int lua_db_close(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db;
      +    apr_status_t     rc = 0;
      +    /*~~~~~~~~~~~~~~~~~~~~*/
      +    
      +    db = lua_get_db_handle(L);
      +    if (db && db->alive) {
      +        if (db->type == LUA_DBTYPE_APR_DBD) {
      +            rc = apr_dbd_close(db->driver, db->handle);
      +            if (db->pool) apr_pool_destroy(db->pool);
      +        }
      +        else {
      +            lua_ap_dbd_close = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_close);
      +            if (lua_ap_dbd_close != NULL)
      +                if (db->dbdhandle) lua_ap_dbd_close(db->server, db->dbdhandle);
      +        }
      +
      +        db->driver = NULL;
      +        db->handle = NULL;
      +        db->alive = 0;
      +        db->pool = NULL;
      +    }
      +
      +    lua_settop(L, 0);
      +    lua_pushnumber(L, rc);
      +    return 1;
      +} 
      +
      +/*
      +   =============================================================================
      +     db:__gc(): Garbage collecting function.
      +   =============================================================================
      + */
      +int lua_db_gc(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~*/
      +    lua_db_handle    *db;
      +    /*~~~~~~~~~~~~~~~~~~~~*/
      +
      +    db = lua_touserdata(L, 1);
      +    if (db && db->alive) {
      +        if (db->type == LUA_DBTYPE_APR_DBD) {
      +            apr_dbd_close(db->driver, db->handle);
      +            if (db->pool) apr_pool_destroy(db->pool);
      +        }
      +        else {
      +            lua_ap_dbd_close = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_close);
      +            if (lua_ap_dbd_close != NULL)
      +                if (db->dbdhandle) lua_ap_dbd_close(db->server, db->dbdhandle);
      +        }
      +        db->driver = NULL;
      +        db->handle = NULL;
      +        db->alive = 0;
      +        db->pool = NULL;
      +    }
      +    lua_settop(L, 0);
      +    return 0;
      +}
      +
      +/*
      +   =============================================================================
      +    db:active(): Returns true if the connection to the db is still active.
      +   =============================================================================
      + */
      +int lua_db_active(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db = 0;
      +    apr_status_t     rc = 0;
      +    /*~~~~~~~~~~~~~~~~~~~~*/
      +
      +    db = lua_get_db_handle(L);
      +    if (db && db->alive) {
      +        rc = apr_dbd_check_conn(db->driver, db->pool, db->handle);
      +        if (rc == APR_SUCCESS) {
      +            lua_pushboolean(L, 1);
      +            return 1;
      +        }
      +    }
      +
      +    lua_pushboolean(L, 0);
      +    return 1;
      +}
      +
      +/*
      +   =============================================================================
      +    db:query(statement): Executes the given database query and returns the 
      +    number of rows affected. If an error is encountered, returns nil as the 
      +    first parameter and the error message as the second.
      +   =============================================================================
      + */
      +int lua_db_query(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db = 0;
      +    apr_status_t     rc = 0;
      +    int              x = 0;
      +    const char      *statement;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    luaL_checktype(L, 3, LUA_TSTRING);
      +    statement = lua_tostring(L, 3);
      +    db = lua_get_db_handle(L);
      +    if (db && db->alive)
      +        rc = apr_dbd_query(db->driver, db->handle, &x, statement);
      +    else {
      +        rc = 0;
      +        x = -1;
      +    }
      +
      +    if (rc == APR_SUCCESS)
      +        lua_pushnumber(L, x);
      +    else {
      +
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +        const char  *err = apr_dbd_error(db->driver, db->handle, rc);
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +        lua_pushnil(L);
      +        if (err) {
      +            lua_pushstring(L, err);
      +            return 2;
      +        }
      +    }
      +
      +    return 1;
      +}
      +
      +/*
      +   =============================================================================
      +    db:escape(string): Escapes a string for safe use in the given database type.
      +   =============================================================================
      + */
      +int lua_db_escape(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle    *db = 0;
      +    const char       *statement;
      +    const char       *escaped = 0;
      +    request_rec      *r;
      +    /*~~~~~~~~~~~~~~~~~~~~~*/
      +
      +    r = ap_lua_check_request_rec(L, 2);
      +    if (r) {
      +        luaL_checktype(L, 3, LUA_TSTRING);
      +        statement = lua_tostring(L, 3);
      +        db = lua_get_db_handle(L);
      +        if (db && db->alive) {
      +            apr_dbd_init(r->pool);
      +            escaped = apr_dbd_escape(db->driver, r->pool, statement,
      +                                     db->handle);
      +            if (escaped) {
      +                lua_pushstring(L, escaped);
      +                return 1;
      +            }
      +        }
      +        else {
      +            lua_pushnil(L);
      +        }
      +        return (1);
      +    }
      +
      +    return 0;
      +}
      +
      +/*
      +   =============================================================================
      +     resultset(N): Fetches one or more rows from a result set.
      +   =============================================================================
      + */
      +int lua_db_get_row(lua_State *L) 
      +{
      +    int row_no,x,alpha = 0;
      +    const char      *entry, *rowname;
      +    apr_dbd_row_t   *row = 0;
      +    lua_db_result_set *res = lua_get_result_set(L);
      +    
      +    row_no = luaL_optinteger(L, 2, 0);
      +    if (lua_isboolean(L, 3)) {
      +        alpha = lua_toboolean(L, 3);
      +    }
      +    lua_settop(L,0);
      +    
      +    /* Fetch all rows at once? */
      +    
      +    if (row_no == 0) {
      +        row_no = 1;
      +        lua_newtable(L);
      +        while (apr_dbd_get_row(res->driver, res->pool, res->results,
      +                            &row, -1) != -1)
      +         {
      +            lua_pushinteger(L, row_no);
      +            lua_newtable(L);
      +            for (x = 0; x < res->cols; x++) {
      +                entry = apr_dbd_get_entry(res->driver, row, x);
      +                if (entry) {
      +                    if (alpha == 1) {
      +                        rowname = apr_dbd_get_name(res->driver, 
      +                                res->results, x);
      +                        lua_pushstring(L, rowname ? rowname : "(oob)");
      +                    }
      +                    else {
      +                        lua_pushinteger(L, x + 1);
      +                    }
      +                    lua_pushstring(L, entry);
      +                    lua_rawset(L, -3);
      +                }
      +            }
      +            lua_rawset(L, -3);
      +            row_no++;
      +        }
      +        return 1;
      +    }
      +    
      +    /* Just fetch a single row */
      +    if (apr_dbd_get_row(res->driver, res->pool, res->results,
      +                            &row, row_no) != -1)
      +         {
      +        
      +        lua_newtable(L);
      +        for (x = 0; x < res->cols; x++) {
      +            entry = apr_dbd_get_entry(res->driver, row, x);
      +            if (entry) {
      +                if (alpha == 1) {
      +                    rowname = apr_dbd_get_name(res->driver, 
      +                            res->results, x);
      +                    lua_pushstring(L, rowname ? rowname : "(oob)");
      +                }
      +                else {
      +                    lua_pushinteger(L, x + 1);
      +                }
      +                lua_pushstring(L, entry);
      +                lua_rawset(L, -3);
      +            }
      +        }
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +
      +/*
      +   =============================================================================
      +    db:select(statement): Queries the database for the given statement and 
      +    returns the rows/columns found as a table. If an error is encountered, 
      +    returns nil as the first parameter and the error message as the second.
      +   =============================================================================
      + */
      +int lua_db_select(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db = 0;
      +    apr_status_t     rc = 0;
      +    const char      *statement;
      +    request_rec     *r;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    r = ap_lua_check_request_rec(L, 2);
      +    if (r) {
      +        luaL_checktype(L, 3, LUA_TSTRING);
      +        statement = lua_tostring(L, 3);
      +        db = lua_get_db_handle(L);
      +        if (db && db->alive) {
      +
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +            int cols;
      +            apr_dbd_results_t   *results = 0;
      +            lua_db_result_set* resultset = NULL;
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +            rc = apr_dbd_select(db->driver, db->pool, db->handle,
      +                                &results, statement, 0);
      +            if (rc == APR_SUCCESS) {
      +                
      +                cols = apr_dbd_num_cols(db->driver, results);
      +                
      +                if (cols > 0) {
      +                    lua_newtable(L);
      +                    resultset = lua_newuserdata(L, sizeof(lua_db_result_set));
      +                    resultset->cols = cols;
      +                    resultset->driver = db->driver;
      +                    resultset->pool = db->pool;
      +                    resultset->rows = apr_dbd_num_tuples(db->driver, results);
      +                    resultset->results = results;
      +                    luaL_newmetatable(L, "lua_apr.dbselect");
      +                    lua_pushliteral(L, "__call");
      +                    lua_pushcfunction(L, lua_db_get_row);
      +                    lua_rawset(L, -3);
      +                    lua_setmetatable(L, -3);
      +                    lua_rawseti(L, -2, 0);
      +                    return 1;
      +                }
      +                return 0;
      +            }
      +            else {
      +
      +                /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +                const char  *err = apr_dbd_error(db->driver, db->handle, rc);
      +                /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +                lua_pushnil(L);
      +                if (err) {
      +                    lua_pushstring(L, err);
      +                    return 2;
      +                }
      +            }
      +        }
      +
      +        lua_pushboolean(L, 0);
      +        return 1;
      +    }
      +
      +    return 0;
      +}
      +
      +
      +
      +/*
      +   =============================================================================
      +    statement:select(var1, var2, var3...): Injects variables into a prepared 
      +    statement and returns the number of rows matching the query.
      +   =============================================================================
      + */
      +int lua_db_prepared_select(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_prepared_statement  *st = 0;
      +    apr_status_t     rc = 0;
      +    const char       **vars;
      +    int              x, have;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    
      +    /* Fetch the prepared statement and the vars passed */
      +    luaL_checktype(L, 1, LUA_TTABLE);
      +    lua_rawgeti(L, 1, 0);
      +    luaL_checktype(L, -1, LUA_TUSERDATA);
      +    st = (lua_db_prepared_statement*) lua_topointer(L, -1);
      +    
      +    /* Check if we got enough variables passed on to us.
      +     * This, of course, only works for prepared statements made through lua. */
      +    have = lua_gettop(L) - 2;
      +    if (st->variables != -1 && have < st->variables ) {
      +        lua_pushboolean(L, 0);
      +        lua_pushfstring(L, 
      +                "Error in executing prepared statement: Expected %d arguments, got %d.", 
      +                st->variables, have);
      +        return 2;
      +    }
      +    vars = apr_pcalloc(st->db->pool, have*sizeof(char *));
      +    for (x = 0; x < have; x++) {
      +        vars[x] = lua_tostring(L, x + 2);
      +    }
      +
      +    /* Fire off the query */
      +    if (st->db && st->db->alive) {
      +
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +        int cols;
      +        apr_dbd_results_t   *results = 0;
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +        rc = apr_dbd_pselect(st->db->driver, st->db->pool, st->db->handle,
      +                                &results, st->statement, 0, have, vars);
      +        if (rc == APR_SUCCESS) {
      +
      +            /*~~~~~~~~~~~~~~~~~~~~~*/
      +            lua_db_result_set *resultset;
      +            /*~~~~~~~~~~~~~~~~~~~~~*/
      +
      +            cols = apr_dbd_num_cols(st->db->driver, results);
      +            lua_newtable(L);
      +            resultset = lua_newuserdata(L, sizeof(lua_db_result_set));
      +            resultset->cols = cols;
      +            resultset->driver = st->db->driver;
      +            resultset->pool = st->db->pool;
      +            resultset->rows = apr_dbd_num_tuples(st->db->driver, results);
      +            resultset->results = results;
      +            luaL_newmetatable(L, "lua_apr.dbselect");
      +            lua_pushliteral(L, "__call");
      +            lua_pushcfunction(L, lua_db_get_row);
      +            lua_rawset(L, -3);
      +            lua_setmetatable(L, -3);
      +            lua_rawseti(L, -2, 0);
      +            return 1;
      +            
      +        }
      +        else {
      +
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +            const char  *err = apr_dbd_error(st->db->driver, st->db->handle, rc);
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +            lua_pushnil(L);
      +            if (err) {
      +                lua_pushstring(L, err);
      +                return 2;
      +            }
      +            return 1;
      +        }
      +    }
      +
      +    lua_pushboolean(L, 0);
      +    lua_pushliteral(L, 
      +            "Database connection seems to be closed, please reacquire it.");
      +    return (2);
      +}
      +
      +
      +/*
      +   =============================================================================
      +    statement:query(var1, var2, var3...): Injects variables into a prepared 
      +    statement and returns the number of rows affected.
      +   =============================================================================
      + */
      +int lua_db_prepared_query(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_prepared_statement  *st = 0;
      +    apr_status_t     rc = 0;
      +    const char       **vars;
      +    int              x, have;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~*/
      +    
      +    /* Fetch the prepared statement and the vars passed */
      +    luaL_checktype(L, 1, LUA_TTABLE);
      +    lua_rawgeti(L, 1, 0);
      +    luaL_checktype(L, -1, LUA_TUSERDATA);
      +    st = (lua_db_prepared_statement*) lua_topointer(L, -1);
      +    
      +    /* Check if we got enough variables passed on to us.
      +     * This, of course, only works for prepared statements made through lua. */
      +    have = lua_gettop(L) - 2;
      +    if (st->variables != -1 && have < st->variables ) {
      +        lua_pushboolean(L, 0);
      +        lua_pushfstring(L, 
      +                "Error in executing prepared statement: Expected %d arguments, got %d.", 
      +                st->variables, have);
      +        return 2;
      +    }
      +    vars = apr_pcalloc(st->db->pool, have*sizeof(char *));
      +    for (x = 0; x < have; x++) {
      +        vars[x] = lua_tostring(L, x + 2);
      +    }
      +
      +    /* Fire off the query */
      +    if (st->db && st->db->alive) {
      +
      +        /*~~~~~~~~~~~~~~*/
      +        int affected = 0;
      +        /*~~~~~~~~~~~~~~*/
      +
      +        rc = apr_dbd_pquery(st->db->driver, st->db->pool, st->db->handle,
      +                                &affected, st->statement, have, vars);
      +        if (rc == APR_SUCCESS) {
      +            lua_pushinteger(L, affected);
      +            return 1;
      +        }
      +        else {
      +
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +            const char  *err = apr_dbd_error(st->db->driver, st->db->handle, rc);
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +            lua_pushnil(L);
      +            if (err) {
      +                lua_pushstring(L, err);
      +                return 2;
      +            }
      +            return 1;
      +        }
      +    }
      +
      +    lua_pushboolean(L, 0);
      +    lua_pushliteral(L, 
      +            "Database connection seems to be closed, please reacquire it.");
      +    return (2);
      +}
      +
      +/*
      +   =============================================================================
      +    db:prepare(statement): Prepares a statement for later query/select.
      +    Returns a table with a :query and :select function, same as the db funcs.
      +   =============================================================================
      + */
      +int lua_db_prepare(lua_State* L) 
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db = 0;
      +    apr_status_t     rc = 0;
      +    const char      *statement, *at;
      +    request_rec     *r;
      +    lua_db_prepared_statement* st;
      +    int need = 0;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    
      +    r = ap_lua_check_request_rec(L, 2);
      +    if (r) {
      +        apr_dbd_prepared_t *pstatement = NULL;
      +        luaL_checktype(L, 3, LUA_TSTRING);
      +        statement = lua_tostring(L, 3);
      +        
      +        /* Count number of variables in statement */
      +        at = ap_strchr_c(statement,'%');
      +        while (at != NULL) {
      +            if (at[1] == '%') {
      +                at++;
      +            }
      +            else {
      +                need++;
      +            }
      +            at = ap_strchr_c(at+1,'%');
      +        }
      +        
      +        
      +        db = lua_get_db_handle(L);
      +        rc = apr_dbd_prepare(db->driver, r->pool, db->handle, statement, 
      +                    NULL, &pstatement);
      +        if (rc != APR_SUCCESS) {
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +            const char  *err = apr_dbd_error(db->driver, db->handle, rc);
      +            /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +            lua_pushnil(L);
      +            if (err) {
      +                lua_pushstring(L, err);
      +                return 2;
      +            }
      +            return 1;
      +        }
      +        
      +        /* Push the prepared statement table */
      +        lua_newtable(L);
      +        st = lua_newuserdata(L, sizeof(lua_db_prepared_statement));
      +        st->statement = pstatement;
      +        st->variables = need;
      +        st->db = db;
      +        
      +        lua_pushliteral(L, "select");
      +        lua_pushcfunction(L, lua_db_prepared_select);
      +        lua_rawset(L, -4);
      +        lua_pushliteral(L, "query");
      +        lua_pushcfunction(L, lua_db_prepared_query);
      +        lua_rawset(L, -4);
      +        lua_rawseti(L, -2, 0);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +
      +
      +/*
      +   =============================================================================
      +    db:prepared(statement): Fetches a prepared statement made through 
      +    DBDPrepareSQL.
      +   =============================================================================
      + */
      +int lua_db_prepared(lua_State* L) 
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    lua_db_handle   *db = 0;
      +    const char      *tag;
      +    request_rec     *r;
      +    lua_db_prepared_statement* st;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    
      +    r = ap_lua_check_request_rec(L, 2);
      +    if (r) {
      +        apr_dbd_prepared_t *pstatement = NULL;
      +        db = lua_get_db_handle(L);
      +        luaL_checktype(L, 3, LUA_TSTRING);
      +        tag = lua_tostring(L, 3);
      +        
      +        /* Look for the statement */
      +        pstatement = apr_hash_get(db->dbdhandle->prepared, tag, 
      +                APR_HASH_KEY_STRING);
      +        
      +        if (pstatement == NULL) {
      +            lua_pushnil(L);
      +            lua_pushfstring(L, 
      +                    "Could not find any prepared statement called %s!", tag);
      +            return 2;
      +        }
      +        
      +        
      +        /* Push the prepared statement table */
      +        lua_newtable(L);
      +        st = lua_newuserdata(L, sizeof(lua_db_prepared_statement));
      +        st->statement = pstatement;
      +        st->variables = -1; /* we don't know :( */
      +        st->db = db;
      +        lua_pushliteral(L, "select");
      +        lua_pushcfunction(L, lua_db_prepared_select);
      +        lua_rawset(L, -4);
      +        lua_pushliteral(L, "query");
      +        lua_pushcfunction(L, lua_db_prepared_query);
      +        lua_rawset(L, -4);
      +        lua_rawseti(L, -2, 0);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +
      +
      +/* lua_push_db_handle: Creates a database table object with database functions 
      +   and a userdata at index 0, which will call lua_dbgc when garbage collected.
      + */
      +static lua_db_handle* lua_push_db_handle(lua_State *L, request_rec* r, int type,
      +        apr_pool_t* pool) 
      +{
      +    lua_db_handle* db;
      +    lua_newtable(L);
      +    db = lua_newuserdata(L, sizeof(lua_db_handle));
      +    db->alive = 1;
      +    db->pool = pool;
      +    db->type = type;
      +    db->dbdhandle = 0;
      +    db->server = r->server;
      +    luaL_newmetatable(L, "lua_apr.dbacquire");
      +    lua_pushliteral(L, "__gc");
      +    lua_pushcfunction(L, lua_db_gc);
      +    lua_rawset(L, -3);
      +    lua_setmetatable(L, -2);
      +    lua_rawseti(L, -2, 0);
      +    
      +    lua_pushliteral(L, "escape");
      +    lua_pushcfunction(L, lua_db_escape);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "close");
      +    lua_pushcfunction(L, lua_db_close);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "select");
      +    lua_pushcfunction(L, lua_db_select);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "query");
      +    lua_pushcfunction(L, lua_db_query);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "active");
      +    lua_pushcfunction(L, lua_db_active);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "prepare");
      +    lua_pushcfunction(L, lua_db_prepare);
      +    lua_rawset(L, -3);
      +    
      +    lua_pushliteral(L, "prepared");
      +    lua_pushcfunction(L, lua_db_prepared);
      +    lua_rawset(L, -3);
      +    return db;
      +}
      +
      +/*
      +   =============================================================================
      +    dbacquire(dbType, dbString): Opens a new connection to a database of type 
      +    _dbType_ and with the connection parameters _dbString_. If successful, 
      +    returns a table with functions for using the database handle. If an error 
      +    occurs, returns nil as the first parameter and the error message as the 
      +    second. See the APR_DBD for a list of database types and connection strings 
      +    supported.
      +   =============================================================================
      + */
      +int lua_db_acquire(lua_State *L)
      +{
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +    const char      *type;
      +    const char      *arguments;
      +    const char      *error = 0;
      +    request_rec     *r;
      +    lua_db_handle   *db = 0;
      +    apr_status_t     rc = 0;
      +    ap_dbd_t        *dbdhandle = NULL;
      +    apr_pool_t      *pool = NULL;
      +    /*~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    if (r) {
      +        type = luaL_optstring(L, 2, "mod_dbd"); /* Defaults to mod_dbd */
      +        
      +        if (!strcmp(type, "mod_dbd")) {
      +
      +            lua_settop(L, 0);
      +            lua_ap_dbd_open = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_open);
      +            if (lua_ap_dbd_open)
      +                dbdhandle = (ap_dbd_t *) lua_ap_dbd_open(
      +                        r->server->process->pool, r->server);
      +
      +            if (dbdhandle) {
      +                db = lua_push_db_handle(L, r, LUA_DBTYPE_MOD_DBD, dbdhandle->pool);
      +                db->driver = dbdhandle->driver;
      +                db->handle = dbdhandle->handle;
      +                db->dbdhandle = dbdhandle;
      +                return 1;
      +            }
      +            else {
      +                lua_pushnil(L);
      +                if ( lua_ap_dbd_open == NULL )
      +                    lua_pushliteral(L,
      +                                    "mod_dbd doesn't seem to have been loaded.");
      +                else
      +                    lua_pushliteral(
      +                        L,
      +                        "Could not acquire connection from mod_dbd. If your database is running, this may indicate a permission problem.");
      +                return 2;
      +            }
      +        }
      +        else {
      +            rc = apr_pool_create(&pool, NULL);
      +            if (rc != APR_SUCCESS) {
      +                lua_pushnil(L);
      +                lua_pushliteral(L, "Could not allocate memory for database!");
      +                return 2;
      +            }
      +            apr_pool_tag(pool, "lua_dbd_pool");
      +            apr_dbd_init(pool);
      +            dbdhandle = apr_pcalloc(pool, sizeof(ap_dbd_t));
      +            rc = apr_dbd_get_driver(pool, type, &dbdhandle->driver);
      +            if (rc == APR_SUCCESS) {
      +                luaL_checktype(L, 3, LUA_TSTRING);
      +                arguments = lua_tostring(L, 3);
      +                lua_settop(L, 0);
      +                
      +                if (strlen(arguments)) {
      +                    rc = apr_dbd_open_ex(dbdhandle->driver, pool, 
      +                            arguments, &dbdhandle->handle, &error);
      +                    if (rc == APR_SUCCESS) {
      +                        db = lua_push_db_handle(L, r, LUA_DBTYPE_APR_DBD, pool);
      +                        db->driver = dbdhandle->driver;
      +                        db->handle = dbdhandle->handle;
      +                        db->dbdhandle = dbdhandle;
      +                        return 1;
      +                    }
      +                    else {
      +                        lua_pushnil(L);
      +                        if (error) {
      +                            lua_pushstring(L, error);
      +                            return 2;
      +                        }
      +
      +                        return 1;
      +                    }
      +                }
      +
      +                lua_pushnil(L);
      +                lua_pushliteral(L,
      +                                "No database connection string was specified.");
      +                apr_pool_destroy(pool);
      +                return (2);
      +            }
      +            else {
      +                lua_pushnil(L);
      +                if (APR_STATUS_IS_ENOTIMPL(rc)) {
      +                    lua_pushfstring(L, 
      +                         "driver for %s not available", type);
      +                }
      +                else if (APR_STATUS_IS_EDSOOPEN(rc)) {
      +                    lua_pushfstring(L, 
      +                                "can't find driver for %s", type);
      +                }
      +                else if (APR_STATUS_IS_ESYMNOTFOUND(rc)) {
      +                    lua_pushfstring(L, 
      +                                "driver for %s is invalid or corrupted",
      +                                type);
      +                }
      +                else {
      +                    lua_pushliteral(L, 
      +                                "mod_lua not compatible with APR in get_driver");
      +                }
      +                lua_pushinteger(L, rc);
      +                apr_pool_destroy(pool);
      +                return 3;
      +            }
      +        }
      +
      +        lua_pushnil(L);
      +        return 1;
      +    }
      +
      +    return 0;
      +}
      +
      diff --git a/modules/lua/lua_dbd.h b/modules/lua/lua_dbd.h
      new file mode 100644
      index 00000000000..566204b15ca
      --- /dev/null
      +++ b/modules/lua/lua_dbd.h
      @@ -0,0 +1,66 @@
      +/**
      + * Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + * http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef _LUA_DBD_H_
      +#define _LUA_DBD_H_
      +
      +#include "mod_lua.h"
      +#include "apr.h"
      +#include "apr_dbd.h"
      +#include "mod_dbd.h"
      +
      +#define LUA_DBTYPE_APR_DBD 0
      +#define LUA_DBTYPE_MOD_DBD 1
      +typedef struct
      +{
      +    apr_dbd_t               *handle;
      +    const apr_dbd_driver_t  *driver;
      +    int                     alive;
      +    apr_pool_t              *pool;
      +    char                    type;
      +    ap_dbd_t *              dbdhandle;
      +    server_rec              *server;
      +} lua_db_handle;
      +
      +typedef struct {
      +    const apr_dbd_driver_t  *driver;
      +    int                     rows;
      +    int                     cols;
      +    apr_dbd_results_t       *results;
      +    apr_pool_t              *pool;
      +} lua_db_result_set;
      +
      +typedef struct {
      +    apr_dbd_prepared_t      *statement;
      +    int                     variables;
      +    lua_db_handle           *db;
      +} lua_db_prepared_statement;
      +
      +int lua_db_acquire(lua_State* L);
      +int lua_db_escape(lua_State* L);
      +int lua_db_close(lua_State* L);
      +int lua_db_prepare(lua_State* L);
      +int lua_db_prepared(lua_State* L);
      +int lua_db_select(lua_State* L);
      +int lua_db_query(lua_State* L);
      +int lua_db_prepared_select(lua_State* L);
      +int lua_db_prepared_query(lua_State* L);
      +int lua_db_get_row(lua_State* L);
      +int lua_db_gc(lua_State* L);
      +int lua_db_active(lua_State* L);
      +
      +#endif /* !_LUA_DBD_H_ */
      diff --git a/modules/lua/lua_passwd.c b/modules/lua/lua_passwd.c
      new file mode 100644
      index 00000000000..ad865362ac9
      --- /dev/null
      +++ b/modules/lua/lua_passwd.c
      @@ -0,0 +1,178 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "lua_passwd.h"
      +#include "apr_strings.h"
      +#include "apr_errno.h"
      +
      +#if APR_HAVE_STDIO_H
      +#include <stdio.h>
      +#endif
      +
      +#include "apr_md5.h"
      +#include "apr_sha1.h"
      +
      +#if APR_HAVE_TIME_H
      +#include <time.h>
      +#endif
      +#if APR_HAVE_CRYPT_H
      +#include <crypt.h>
      +#endif
      +#if APR_HAVE_STDLIB_H
      +#include <stdlib.h>
      +#endif
      +#if APR_HAVE_STRING_H
      +#include <string.h>
      +#endif
      +#if APR_HAVE_UNISTD_H
      +#include <unistd.h>
      +#endif
      +#if APR_HAVE_IO_H
      +#include <io.h>
      +#endif
      +
      +static int generate_salt(char *s, size_t size, const char **errstr,
      +                         apr_pool_t *pool)
      +{
      +    unsigned char rnd[32];
      +    static const char itoa64[] =
      +        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      +    apr_size_t n;
      +    unsigned int val = 0, bits = 0;
      +    apr_status_t rv;
      +
      +    n = (size * 6 + 7)/8;
      +    if (n > sizeof(rnd)) {
      +        *errstr = apr_psprintf(pool, "generate_salt(): BUG: Buffer too small");
      +        return ERR_RANDOM;
      +    }
      +    rv = apr_generate_random_bytes(rnd, n);
      +    if (rv) {
      +        *errstr = apr_psprintf(pool, "Unable to generate random bytes: %pm",
      +                               &rv);
      +        return ERR_RANDOM;
      +    }
      +    n = 0;
      +    while (size > 0) {
      +        if (bits < 6) {
      +            val |= (rnd[n++] << bits);
      +            bits += 8;
      +        }
      +        *s++ = itoa64[val & 0x3f];
      +        size--;
      +        val >>= 6;
      +        bits -= 6;
      +   }
      +   *s = '\0';
      +   return 0;
      +}
      +
      +/*
      + * Make a password record from the given information.  A zero return
      + * indicates success; on failure, ctx->errstr points to the error message.
      + */
      +int mk_password_hash(passwd_ctx *ctx)
      +{
      +    char *pw;
      +    char salt[16];
      +    apr_status_t rv;
      +    int ret = 0;
      +#if CRYPT_ALGO_SUPPORTED
      +    char *cbuf;
      +#endif
      +
      +    pw = ctx->passwd;
      +    switch (ctx->alg) {
      +    case ALG_APSHA:
      +        /* XXX out >= 28 + strlen(sha1) chars - fixed len SHA */
      +        apr_sha1_base64(pw, strlen(pw), ctx->out);
      +        break;
      +
      +    case ALG_APMD5:
      +        ret = generate_salt(salt, 8, &ctx->errstr, ctx->pool);
      +        if (ret != 0) {
      +            ret = ERR_GENERAL;
      +            break;
      +        }
      +        rv = apr_md5_encode(pw, salt, ctx->out, ctx->out_len);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool,
      +                                       "could not encode password: %pm", &rv);
      +            ret = ERR_GENERAL;
      +        }
      +        break;
      +
      +#if CRYPT_ALGO_SUPPORTED
      +    case ALG_CRYPT:
      +        ret = generate_salt(salt, 8, &ctx->errstr, ctx->pool);
      +        if (ret != 0)
      +            break;
      +        cbuf = crypt(pw, salt);
      +        if (cbuf == NULL) {
      +            rv = APR_FROM_OS_ERROR(errno);
      +            ctx->errstr = apr_psprintf(ctx->pool, "crypt() failed: %pm", &rv);
      +            ret = ERR_PWMISMATCH;
      +            break;
      +        }
      +
      +        apr_cpystrn(ctx->out, cbuf, ctx->out_len - 1);
      +        if (strlen(pw) > 8) {
      +            char *truncpw = apr_pstrdup(ctx->pool, pw);
      +            truncpw[8] = '\0';
      +            if (!strcmp(ctx->out, crypt(truncpw, salt))) {
      +                ctx->errstr = apr_psprintf(ctx->pool,
      +                                           "Warning: Password truncated to 8 "
      +                                           "characters by CRYPT algorithm.");
      +            }
      +            memset(truncpw, '\0', strlen(pw));
      +        }
      +        break;
      +#endif /* CRYPT_ALGO_SUPPORTED */
      +
      +#if BCRYPT_ALGO_SUPPORTED
      +    case ALG_BCRYPT:
      +        rv = apr_generate_random_bytes((unsigned char*)salt, 16);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool, "Unable to generate random "
      +                                       "bytes: %pm", &rv);
      +            ret = ERR_RANDOM;
      +            break;
      +        }
      +
      +        if (ctx->cost == 0)
      +            ctx->cost = BCRYPT_DEFAULT_COST;
      +        rv = apr_bcrypt_encode(pw, ctx->cost, (unsigned char*)salt, 16,
      +                               ctx->out, ctx->out_len);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool, "Unable to encode with "
      +                                       "bcrypt: %pm", &rv);
      +            ret = ERR_PWMISMATCH;
      +            break;
      +        }
      +        break;
      +#endif /* BCRYPT_ALGO_SUPPORTED */
      +
      +    default:
      +        ctx->errstr = apr_psprintf(ctx->pool,
      +                                  "mk_password_hash(): unsupported algorithm %d",
      +                                  ctx->alg);
      +        ret = ERR_GENERAL;
      +    }
      +    memset(pw, '\0', strlen(pw));
      +    return ret;
      +}
      +
      +
      diff --git a/modules/lua/lua_passwd.h b/modules/lua/lua_passwd.h
      new file mode 100644
      index 00000000000..8606cc1d085
      --- /dev/null
      +++ b/modules/lua/lua_passwd.h
      @@ -0,0 +1,90 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef _LUA_PASSWD_H
      +#define _LUA_PASSWD_H
      +
      +#include "apr.h"
      +#include "apr_lib.h"
      +#include "apr_strings.h"
      +#include "apr_errno.h"
      +#include "apr_file_io.h"
      +#include "apr_general.h"
      +#include "apr_version.h"
      +#if !APR_VERSION_AT_LEAST(2,0,0)
      +#include "apu_version.h"
      +#endif
      +
      +#define MAX_PASSWD_LEN 256
      +
      +#define ALG_APMD5  0
      +#define ALG_APSHA  1
      +#define ALG_BCRYPT 2
      +#define ALG_CRYPT  3
      +
      +#define BCRYPT_DEFAULT_COST 5
      +
      +#define ERR_FILEPERM 1
      +#define ERR_SYNTAX 2
      +#define ERR_PWMISMATCH 3
      +#define ERR_INTERRUPTED 4
      +#define ERR_OVERFLOW 5
      +#define ERR_BADUSER 6
      +#define ERR_INVALID 7
      +#define ERR_RANDOM 8
      +#define ERR_GENERAL 9
      +#define ERR_ALG_NOT_SUPP 10
      +
      +#if defined(WIN32) || defined(NETWARE)
      +#define CRYPT_ALGO_SUPPORTED 0
      +#define PLAIN_ALGO_SUPPORTED 1
      +#else
      +#define CRYPT_ALGO_SUPPORTED 1
      +#define PLAIN_ALGO_SUPPORTED 0
      +#endif
      +
      +#if APR_VERSION_AT_LEAST(2,0,0) || \
      +    (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 5)
      +#define BCRYPT_ALGO_SUPPORTED 1
      +#else
      +#define BCRYPT_ALGO_SUPPORTED 0
      +#endif
      +
      +typedef struct passwd_ctx passwd_ctx;
      +
      +struct passwd_ctx {
      +    apr_pool_t      *pool;
      +    const char      *errstr;
      +    char            *out;
      +    apr_size_t      out_len;
      +    char            *passwd;
      +    int             alg;
      +    int             cost;
      +};
      +
      +
      +/*
      + * The following functions return zero on success; otherwise, one of
      + * the ERR_* codes is returned and an error message is stored in ctx->errstr.
      + */
      +
      +/*
      + * Make a password record from the given information.
      + */
      +int mk_password_hash(passwd_ctx *ctx);
      +
      +#endif /* _LUA_PASSWD_H */
      +
      diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c
      index cc3837a46a6..fbc88875747 100644
      --- a/modules/lua/lua_request.c
      +++ b/modules/lua/lua_request.c
      @@ -16,73 +16,94 @@
        */
       
       #include "mod_lua.h"
      -#include "util_script.h"
       #include "lua_apr.h"
      +#include "lua_dbd.h"
      +#include "lua_passwd.h"
      +#include "scoreboard.h"
      +#include "util_md5.h"
      +#include "util_script.h"
      +#include "util_varbuf.h"
      +#include "apr_date.h"
      +#include "apr_pools.h"
      +#include "apr_thread_mutex.h"
      +#include "apr_tables.h"
      +#include "util_cookies.h"
      +
      +#define APR_WANT_BYTEFUNC
      +#include "apr_want.h"
      +
      +extern apr_global_mutex_t* lua_ivm_mutex;
      +extern apr_shm_t *lua_ivm_shm;
       
       APLOG_USE_MODULE(lua);
      +#define POST_MAX_VARS 500
      +
      +#ifndef MODLUA_MAX_REG_MATCH
      +#define MODLUA_MAX_REG_MATCH 25
      +#endif
       
       typedef char *(*req_field_string_f) (request_rec * r);
       typedef int (*req_field_int_f) (request_rec * r);
      -typedef apr_table_t *(*req_field_apr_table_f) (request_rec * r);
      +typedef req_table_t *(*req_field_apr_table_f) (request_rec * r);
      +
       
       void ap_lua_rstack_dump(lua_State *L, request_rec *r, const char *msg)
       {
           int i;
           int top = lua_gettop(L);
      -
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Lua Stack Dump: [%s]", msg);
      -
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01484) "Lua Stack Dump: [%s]", msg);
           for (i = 1; i <= top; i++) {
               int t = lua_type(L, i);
               switch (t) {
               case LUA_TSTRING:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03001)
                                     "%d:  '%s'", i, lua_tostring(L, i));
                       break;
                   }
               case LUA_TUSERDATA:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d:  userdata",
      -                              i);
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03002)
      +                              "%d:  userdata", i);
                       break;
                   }
               case LUA_TLIGHTUSERDATA:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03003)
                                     "%d:  lightuserdata", i);
                       break;
                   }
               case LUA_TNIL:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d:  NIL", i);
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03004)
      +                              "%d:  NIL", i);
                       break;
                   }
               case LUA_TNONE:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "%d:  None", i);
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03005)
      +                              "%d:  None", i);
                       break;
                   }
               case LUA_TBOOLEAN:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "%d:  %s", i, lua_toboolean(L,
      -                                                          i) ? "true" :
      -                              "false");
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03006)
      +                              "%d:  %s", i,
      +                              lua_toboolean(L, i) ? "true" : "false");
                       break;
                   }
               case LUA_TNUMBER:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03007)
                                     "%d:  %g", i, lua_tonumber(L, i));
                       break;
                   }
               case LUA_TTABLE:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03008)
                                     "%d:  <table>", i);
                       break;
                   }
               case LUA_TFUNCTION:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03009)
                                     "%d:  <function>", i);
                       break;
                   }
               default:{
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "%d:  unkown: -[%s]-", i, lua_typename(L, i));
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03010)
      +                              "%d:  unknown: -[%s]-", i, lua_typename(L, i));
                       break;
                   }
               }
      @@ -152,6 +173,142 @@ static int req_aprtable2luatable_cb(void *l, const char *key,
           return 1;
       }
       
      +/* helper callback for req_parseargs */
      +static int req_aprtable2luatable_cb_len(void *l, const char *key,
      +                                    const char *value, size_t len)
      +{
      +    int t;
      +    lua_State *L = (lua_State *) l;     /* [table<s,t>, table<s,s>] */
      +    /* rstack_dump(L, RRR, "start of cb"); */
      +    /* L is [table<s,t>, table<s,s>] */
      +    /* build complex */
      +
      +    lua_getfield(L, -1, key);   /* [VALUE, table<s,t>, table<s,s>] */
      +    /* rstack_dump(L, RRR, "after getfield"); */
      +    t = lua_type(L, -1);
      +    switch (t) {
      +    case LUA_TNIL:
      +    case LUA_TNONE:{
      +            lua_pop(L, 1);      /* [table<s,t>, table<s,s>] */
      +            lua_newtable(L);    /* [array, table<s,t>, table<s,s>] */
      +            lua_pushnumber(L, 1);       /* [1, array, table<s,t>, table<s,s>] */
      +            lua_pushlstring(L, value, len);   /* [string, 1, array, table<s,t>, table<s,s>] */
      +            lua_settable(L, -3);        /* [array, table<s,t>, table<s,s>]  */
      +            lua_setfield(L, -2, key);   /* [table<s,t>, table<s,s>] */
      +            break;
      +        }
      +    case LUA_TTABLE:{
      +            /* [array, table<s,t>, table<s,s>] */
      +            int size = lua_objlen(L, -1);
      +            lua_pushnumber(L, size + 1);        /* [#, array, table<s,t>, table<s,s>] */
      +            lua_pushlstring(L, value, len);   /* [string, #, array, table<s,t>, table<s,s>] */
      +            lua_settable(L, -3);        /* [array, table<s,t>, table<s,s>] */
      +            lua_setfield(L, -2, key);   /* [table<s,t>, table<s,s>] */
      +            break;
      +        }
      +    }
      +
      +    /* L is [table<s,t>, table<s,s>] */
      +    /* build simple */
      +    lua_getfield(L, -2, key);   /* [VALUE, table<s,s>, table<s,t>] */
      +    if (lua_isnoneornil(L, -1)) {       /* only set if not already set */
      +        lua_pop(L, 1);          /* [table<s,s>, table<s,t>]] */
      +        lua_pushlstring(L, value, len);       /* [string, table<s,s>, table<s,t>] */
      +        lua_setfield(L, -3, key);       /* [table<s,s>, table<s,t>]  */
      +    }
      +    else {
      +        lua_pop(L, 1);
      +    }
      +    return 1;
      +}
      +
      +
      +/*
      + =======================================================================================================================
      +    lua_read_body(request_rec *r, const char **rbuf, apr_off_t *size): Reads any additional form data sent in POST/PUT
      +    requests. Used for multipart POST data.
      + =======================================================================================================================
      + */
      +static int lua_read_body(request_rec *r, const char **rbuf, apr_off_t *size,
      +        apr_off_t maxsize)
      +{
      +    int rc = OK;
      +
      +    if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR))) {
      +        return (rc);
      +    }
      +    if (ap_should_client_block(r)) {
      +
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +        char         argsbuffer[HUGE_STRING_LEN];
      +        apr_off_t    rsize, len_read, rpos = 0;
      +        apr_off_t length = r->remaining;
      +        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
      +
      +        if (maxsize != 0 && length > maxsize) {
      +            return APR_EINCOMPLETE; /* Only room for incomplete data chunk :( */
      +        }
      +        *rbuf = (const char *) apr_pcalloc(r->pool, (apr_size_t) (length + 1));
      +        *size = length;
      +        while ((len_read = ap_get_client_block(r, argsbuffer, sizeof(argsbuffer))) > 0) {
      +            if ((rpos + len_read) > length) {
      +                rsize = length - rpos;
      +            }
      +            else {
      +                rsize = len_read;
      +            }
      +
      +            memcpy((char *) *rbuf + rpos, argsbuffer, (size_t) rsize);
      +            rpos += rsize;
      +        }
      +    }
      +
      +    return (rc);
      +}
      +
      +
      +/*
      + * =======================================================================================================================
      + * lua_write_body: Reads any additional form data sent in POST/PUT requests
      + * and writes to a file.
      + * =======================================================================================================================
      + */
      +static apr_status_t lua_write_body(request_rec *r, apr_file_t *file, apr_off_t *size)
      +{
      +    apr_status_t rc = OK;
      +
      +    if ((rc = ap_setup_client_block(r, REQUEST_CHUNKED_ERROR)))
      +        return rc;
      +    if (ap_should_client_block(r)) {
      +        char argsbuffer[HUGE_STRING_LEN];
      +        apr_off_t rsize,
      +                  len_read,
      +                  rpos = 0;
      +        apr_off_t length = r->remaining;
      +        apr_size_t written;
      +
      +        *size = length;
      +        while ((len_read =
      +                    ap_get_client_block(r, argsbuffer,
      +                                        sizeof(argsbuffer))) > 0) {
      +            if ((rpos + len_read) > length)
      +                rsize = (apr_size_t) length - rpos;
      +            else
      +                rsize = len_read;
      +
      +            rc = apr_file_write_full(file, argsbuffer, (apr_size_t) rsize,
      +                                     &written);
      +            if (written != rsize || rc != OK)
      +                return APR_ENOSPC;
      +            if (rc != APR_SUCCESS)
      +                return rc;
      +            rpos += rsize;
      +        }
      +    }
      +
      +    return rc;
      +}
      +
       /* r:parseargs() returning a lua table */
       static int req_parseargs(lua_State *L)
       {
      @@ -164,6 +321,150 @@ static int req_parseargs(lua_State *L)
           return 2;                   /* [table<string, string>, table<string, array<string>>] */
       }
       
      +/* ap_lua_binstrstr: Binary strstr function for uploaded data with NULL bytes */
      +static char* ap_lua_binstrstr (const char * haystack, size_t hsize, const char* needle, size_t nsize)
      +{
      +    size_t p;
      +    if (haystack == NULL) return NULL;
      +    if (needle == NULL) return NULL;
      +    if (hsize < nsize) return NULL;
      +    for (p = 0; p <= (hsize - nsize); ++p) {
      +        if (memcmp(haystack + p, needle, nsize) == 0) {
      +            return (char*) (haystack + p);
      +        }
      +    }
      +    return NULL;
      +} 
      +
      +/* r:parsebody(): Parses regular (url-enocded) or multipart POST data and returns two tables*/
      +static int req_parsebody(lua_State *L)
      +{
      +    apr_array_header_t          *pairs;
      +    apr_off_t len;
      +    int res;
      +    apr_size_t size;
      +    apr_size_t max_post_size;
      +    char *multipart;
      +    const char *contentType;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    max_post_size = (apr_size_t) luaL_optint(L, 2, MAX_STRING_LEN);
      +    multipart = apr_pcalloc(r->pool, 256);
      +    contentType = apr_table_get(r->headers_in, "Content-Type");
      +    lua_newtable(L);
      +    lua_newtable(L);            /* [table, table] */    
      +    if (contentType != NULL && (sscanf(contentType, "multipart/form-data; boundary=%250c", multipart) == 1)) {
      +        char        *buffer, *key, *filename;
      +        char        *start = 0, *end = 0, *crlf = 0;
      +        const char  *data;
      +        int         i;
      +        size_t      vlen = 0;
      +        size_t      len = 0;
      +        if (lua_read_body(r, &data, (apr_off_t*) &size, max_post_size) != OK) {
      +            return 2;
      +        }
      +        len = strlen(multipart);
      +        i = 0;
      +        for
      +        (
      +            start = strstr((char *) data, multipart);
      +            start != NULL;
      +            start = end
      +        ) {
      +            i++;
      +            if (i == POST_MAX_VARS) break;
      +            crlf = strstr((char *) start, "\r\n\r\n");
      +            if (!crlf) break;
      +            end = ap_lua_binstrstr(crlf, (size - (crlf - data)), multipart, len);
      +            if (end == NULL) break;
      +            key = (char *) apr_pcalloc(r->pool, 256);
      +            filename = (char *) apr_pcalloc(r->pool, 256);
      +            vlen = end - crlf - 8;
      +            buffer = (char *) apr_pcalloc(r->pool, vlen+1);
      +            memcpy(buffer, crlf + 4, vlen);
      +            sscanf(start + len + 2,
      +                "Content-Disposition: form-data; name=\"%255[^\"]\"; filename=\"%255[^\"]\"",
      +                key, filename);
      +            if (strlen(key)) {
      +                req_aprtable2luatable_cb_len(L, key, buffer, vlen);
      +            }
      +        }
      +    }
      +    else {
      +        char *buffer;
      +        res = ap_parse_form_data(r, NULL, &pairs, -1, max_post_size);
      +        if (res == OK) {
      +            while(pairs && !apr_is_empty_array(pairs)) {
      +                ap_form_pair_t *pair = (ap_form_pair_t *) apr_array_pop(pairs);
      +                apr_brigade_length(pair->value, 1, &len);
      +                size = (apr_size_t) len;
      +                buffer = apr_palloc(r->pool, size + 1);
      +                apr_brigade_flatten(pair->value, buffer, &size);
      +                buffer[len] = 0;
      +                req_aprtable2luatable_cb(L, pair->name, buffer);
      +            }
      +        }
      +    }
      +    return 2;                   /* [table<string, string>, table<string, array<string>>] */
      +}
      +
      +
      +/*
      + * lua_ap_requestbody; r:requestbody([filename]) - Reads or stores the request
      + * body
      + */
      +static int lua_ap_requestbody(lua_State *L)
      +{
      +    const char     *filename;
      +    request_rec    *r;
      +    apr_off_t      maxSize;
      +    
      +    r = ap_lua_check_request_rec(L, 1);
      +    filename = luaL_optstring(L, 2, 0);
      +    maxSize = luaL_optint(L, 3, 0);
      +
      +    if (r) {
      +        apr_off_t size;
      +        if (maxSize > 0 && r->remaining > maxSize) {
      +            lua_pushnil(L);
      +            lua_pushliteral(L, "Request body was larger than the permitted size.");
      +            return 2;
      +        }
      +        if (r->method_number != M_POST && r->method_number != M_PUT)
      +            return (0);
      +        if (!filename) {
      +            const char     *data;
      +
      +            if (lua_read_body(r, &data, &size, maxSize) != OK)
      +                return (0);
      +
      +            lua_pushlstring(L, data, (size_t) size);
      +            lua_pushinteger(L, (lua_Integer) size);
      +            return (2);
      +        } else {
      +            apr_status_t rc;
      +            apr_file_t     *file;
      +
      +            rc = apr_file_open(&file, filename, APR_CREATE | APR_FOPEN_WRITE,
      +                               APR_FPROT_OS_DEFAULT, r->pool);
      +            lua_settop(L, 0);
      +            if (rc == APR_SUCCESS) {
      +                rc = lua_write_body(r, file, &size);
      +                apr_file_close(file);
      +                if (rc != OK) {
      +                    lua_pushboolean(L, 0);
      +                    return 1;
      +                }
      +                lua_pushinteger(L, (lua_Integer) size);
      +                return (1);
      +            } else
      +                lua_pushboolean(L, 0);
      +            return (1);
      +        }
      +    }
      +
      +    return (0);
      +}
      +
       /* wrap ap_rputs as r:puts(String) */
       static int req_puts(lua_State *L)
       {
      @@ -183,10 +484,12 @@ static int req_write(lua_State *L)
       {
           request_rec *r = ap_lua_check_request_rec(L, 1);
           size_t n;
      +    int rv;
           const char *buf = luaL_checklstring(L, 2, &n);
       
      -    ap_rwrite((void *) buf, n, r);
      -    return 0;
      +    rv = ap_rwrite((void *) buf, n, r);
      +    lua_pushinteger(L, rv);
      +    return 1;
       }
       
       /* r:addoutputfilter(name|function) */
      @@ -194,7 +497,7 @@ static int req_add_output_filter(lua_State *L)
       {
           request_rec *r = ap_lua_check_request_rec(L, 1);
           const char *name = luaL_checkstring(L, 2);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "adding output filter %s",
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01485) "adding output filter %s",
                         name);
           ap_add_output_filter(name, L, r, r->connection);
           return 0;
      @@ -217,6 +520,7 @@ static int req_escape_html(lua_State *L)
           lua_pushstring(L, ap_escape_html(r->pool, s));
           return 1;
       }
      +
       /* wrap optional ssl_var_lookup as  r:ssl_var_lookup(String) */
       static int req_ssl_var_lookup(lua_State *L)
       {
      @@ -227,6 +531,7 @@ static int req_ssl_var_lookup(lua_State *L)
           lua_pushstring(L, res);
           return 1;
       }
      +
       /* BEGIN dispatch mathods for request_rec fields */
       
       /* not really a field, but we treat it like one */
      @@ -235,6 +540,16 @@ static const char *req_document_root(request_rec *r)
           return ap_document_root(r);
       }
       
      +static const char *req_context_prefix(request_rec *r)
      +{
      +    return ap_context_prefix(r);
      +}
      +
      +static const char *req_context_document_root(request_rec *r)
      +{
      +    return ap_context_document_root(r);
      +}
      +
       static char *req_uri_field(request_rec *r)
       {
           return r->uri;
      @@ -263,102 +578,1244 @@ static const char *req_hostname_field(request_rec *r)
           return r->hostname;
       }
       
      -static const char *req_args_field(request_rec *r)
      +static const char *req_args_field(request_rec *r)
      +{
      +    return r->args;
      +}
      +
      +static const char *req_path_info_field(request_rec *r)
      +{
      +    return r->path_info;
      +}
      +
      +static const char *req_canonical_filename_field(request_rec *r)
      +{
      +    return r->canonical_filename;
      +}
      +
      +static const char *req_filename_field(request_rec *r)
      +{
      +    return r->filename;
      +}
      +
      +static const char *req_user_field(request_rec *r)
      +{
      +    return r->user;
      +}
      +
      +static const char *req_unparsed_uri_field(request_rec *r)
      +{
      +    return r->unparsed_uri;
      +}
      +
      +static const char *req_ap_auth_type_field(request_rec *r)
      +{
      +    return r->ap_auth_type;
      +}
      +
      +static const char *req_content_encoding_field(request_rec *r)
      +{
      +    return r->content_encoding;
      +}
      +
      +static const char *req_content_type_field(request_rec *r)
      +{
      +    return r->content_type;
      +}
      +
      +static const char *req_range_field(request_rec *r)
      +{
      +    return r->range;
      +}
      +
      +static const char *req_protocol_field(request_rec *r)
      +{
      +    return r->protocol;
      +}
      +
      +static const char *req_the_request_field(request_rec *r)
      +{
      +    return r->the_request;
      +}
      +
      +static const char *req_log_id_field(request_rec *r)
      +{
      +    return r->log_id;
      +}
      +
      +static const char *req_useragent_ip_field(request_rec *r)
      +{
      +    return r->useragent_ip;
      +}
      +
      +static int req_remaining_field(request_rec *r)
      +{
      +    return r->remaining;
      +}
      +
      +static int req_status_field(request_rec *r)
      +{
      +    return r->status;
      +}
      +
      +static int req_assbackwards_field(request_rec *r)
      +{
      +    return r->assbackwards;
      +}
      +
      +static req_table_t *req_headers_in(request_rec *r)
      +{
      +  req_table_t *t = apr_palloc(r->pool, sizeof(req_table_t));
      +  t->r = r;
      +  t->t = r->headers_in;
      +  t->n = "headers_in";
      +  return t;
      +}
      +
      +static req_table_t *req_headers_out(request_rec *r)
      +{
      +  req_table_t *t = apr_palloc(r->pool, sizeof(req_table_t));
      +  t->r = r;
      +  t->t = r->headers_out;
      +  t->n = "headers_out";
      +  return t;
      +}
      +
      +static req_table_t *req_err_headers_out(request_rec *r)
      +{
      +  req_table_t *t = apr_palloc(r->pool, sizeof(req_table_t));
      +  t->r = r;
      +  t->t = r->err_headers_out;
      +  t->n = "err_headers_out";
      +  return t;
      +}
      +
      +static req_table_t *req_subprocess_env(request_rec *r)
      +{
      +  req_table_t *t = apr_palloc(r->pool, sizeof(req_table_t));
      +  t->r = r;
      +  t->t = r->subprocess_env;
      +  t->n = "subprocess_env";
      +  return t;
      +}
      +
      +static req_table_t *req_notes(request_rec *r)
      +{
      +  req_table_t *t = apr_palloc(r->pool, sizeof(req_table_t));
      +  t->r = r;
      +  t->t = r->notes;
      +  t->n = "notes";
      +  return t;
      +}
      +
      +static int req_ssl_is_https_field(request_rec *r)
      +{
      +    return ap_lua_ssl_is_https(r->connection);
      +}
      +
      +static int req_ap_get_server_port(request_rec *r)
      +{
      +    return (int) ap_get_server_port(r);
      +}
      +
      +static int lua_ap_rflush (lua_State *L) {
      +
      +    int returnValue;
      +    request_rec *r;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    returnValue = ap_rflush(r);
      +    lua_pushboolean(L, (returnValue == 0));
      +    return 1;
      +}
      +
      +
      +static const char* lua_ap_options(request_rec* r) 
      +{
      +    int opts;
      +    opts = ap_allow_options(r);
      +    return apr_psprintf(r->pool, "%s %s %s %s %s %s", (opts&OPT_INDEXES) ? "Indexes" : "", (opts&OPT_INCLUDES) ? "Includes" : "", (opts&OPT_SYM_LINKS) ? "FollowSymLinks" : "", (opts&OPT_EXECCGI) ? "ExecCGI" : "", (opts&OPT_MULTI) ? "MultiViews" : "", (opts&OPT_ALL) == OPT_ALL ? "All" : "" );
      +}
      +
      +static const char* lua_ap_allowoverrides(request_rec* r) 
      +{
      +    int opts;
      +    opts = ap_allow_overrides(r);
      +    if ( (opts & OR_ALL) == OR_ALL) {
      +        return "All";
      +    }
      +    else if (opts == OR_NONE) {
      +        return "None";
      +    }
      +    return apr_psprintf(r->pool, "%s %s %s %s %s", (opts & OR_LIMIT) ? "Limit" : "", (opts & OR_OPTIONS) ? "Options" : "", (opts & OR_FILEINFO) ? "FileInfo" : "", (opts & OR_AUTHCFG) ? "AuthCfg" : "", (opts & OR_INDEXES) ? "Indexes" : "" );
      +    
      +}
      +
      +static int lua_ap_started(request_rec* r) 
      +{
      +    return (int)(ap_scoreboard_image->global->restart_time / 1000000);
      +}
      +
      +static const char* lua_ap_basic_auth_pw(request_rec* r) 
      +{
      +    const char* pw = NULL;
      +    ap_get_basic_auth_pw(r, &pw);
      +    return pw ? pw : "";
      +}
      +
      +static int lua_ap_limit_req_body(request_rec* r) 
      +{
      +    return (int) ap_get_limit_req_body(r);
      +}
      +
      +static int lua_ap_is_initial_req(request_rec *r)
      +{
      +    return ap_is_initial_req(r);
      +}
      +
      +static int lua_ap_some_auth_required(request_rec *r)
      +{
      +    return ap_some_auth_required(r);
      +}
      +
      +static int lua_ap_sendfile(lua_State *L)
      +{
      +
      +    apr_finfo_t file_info;
      +    const char  *filename;
      +    request_rec *r;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    filename = lua_tostring(L, 2);
      +    apr_stat(&file_info, filename, APR_FINFO_MIN, r->pool);
      +    if (file_info.filetype == APR_NOFILE || file_info.filetype == APR_DIR) {
      +        lua_pushboolean(L, 0);
      +    }
      +    else {
      +        apr_size_t      sent;
      +        apr_status_t    rc;
      +        apr_file_t      *file;
      +
      +        rc = apr_file_open(&file, filename, APR_READ, APR_OS_DEFAULT,
      +                            r->pool);
      +        if (rc == APR_SUCCESS) {
      +            ap_send_fd(file, r, 0, (apr_size_t)file_info.size, &sent);
      +            apr_file_close(file);
      +            lua_pushinteger(L, sent);
      +        }
      +        else {
      +            lua_pushboolean(L, 0);
      +        }
      +    }
      +
      +    return (1);
      +}
      +
      +
      +/*
      + * lua_apr_b64encode; r:encode_base64(string) - encodes a string to Base64
      + * format
      + */
      +static int lua_apr_b64encode(lua_State *L)
      +{
      +    const char     *plain;
      +    char           *encoded;
      +    size_t          plain_len, encoded_len;
      +    request_rec    *r;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    plain = lua_tolstring(L, 2, &plain_len);
      +    encoded_len = apr_base64_encode_len(plain_len);
      +    if (encoded_len) {
      +        encoded = apr_palloc(r->pool, encoded_len);
      +        encoded_len = apr_base64_encode(encoded, plain, plain_len);
      +        if (encoded_len > 0 && encoded[encoded_len - 1] == '\0')
      +            encoded_len--; 
      +        lua_pushlstring(L, encoded, encoded_len);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      + * lua_apr_b64decode; r:decode_base64(string) - decodes a Base64 string
      + */
      +static int lua_apr_b64decode(lua_State *L)
      +{
      +    const char     *encoded;
      +    char           *plain;
      +    size_t          encoded_len, decoded_len;
      +    request_rec    *r;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    encoded = lua_tolstring(L, 2, &encoded_len);
      +    decoded_len = apr_base64_decode_len(encoded);
      +    if (decoded_len) {
      +        plain = apr_palloc(r->pool, decoded_len);
      +        decoded_len = apr_base64_decode(plain, encoded);
      +        if (decoded_len > 0 && plain[decoded_len - 1] == '\0')
      +            decoded_len--; 
      +        lua_pushlstring(L, plain, decoded_len);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      + * lua_ap_unescape; r:unescape(string) - Unescapes an URL-encoded string
      + */
      +static int lua_ap_unescape(lua_State *L)
      +{
      +    const char     *escaped;
      +    char           *plain;
      +    size_t x,
      +           y;
      +    request_rec    *r;
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    escaped = lua_tolstring(L, 2, &x);
      +    plain = apr_pstrdup(r->pool, escaped);
      +    y = ap_unescape_urlencoded(plain);
      +    if (!y) {
      +        lua_pushstring(L, plain);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      + * lua_ap_escape; r:escape(string) - URL-escapes a string
      + */
      +static int lua_ap_escape(lua_State *L)
      +{
      +    const char     *plain;
      +    char           *escaped;
      +    size_t x;
      +    request_rec    *r;
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    plain = lua_tolstring(L, 2, &x);
      +    escaped = ap_escape_urlencoded(r->pool, plain);
      +    lua_pushstring(L, escaped);
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_md5; r:md5(string) - Calculates an MD5 digest of a string
      + */
      +static int lua_apr_md5(lua_State *L)
      +{
      +    const char     *buffer;
      +    char           *result;
      +    size_t len;
      +    request_rec    *r;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    buffer = lua_tolstring(L, 2, &len);
      +    result = ap_md5_binary(r->pool, (const unsigned char *)buffer, len);
      +    lua_pushstring(L, result);
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_sha1; r:sha1(string) - Calculates the SHA1 digest of a string
      + */
      +static int lua_apr_sha1(lua_State *L)
      +{
      +    unsigned char digest[APR_SHA1_DIGESTSIZE];
      +    apr_sha1_ctx_t sha1;
      +    const char     *buffer;
      +    char           *result;
      +    size_t len;
      +    request_rec    *r;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    result = apr_pcalloc(r->pool, sizeof(digest) * 2 + 1);
      +    buffer = lua_tolstring(L, 2, &len);
      +    apr_sha1_init(&sha1);
      +    apr_sha1_update(&sha1, buffer, len);
      +    apr_sha1_final(digest, &sha1);
      +    
      +    ap_bin2hex(digest, sizeof(digest), result);
      +    lua_pushstring(L, result);
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_htpassword; r:htpassword(string [, algorithm [, cost]]) - Creates
      + * a htpassword hash from a string
      + */
      +static int lua_apr_htpassword(lua_State *L)
      +{
      +    passwd_ctx     ctx = { 0 };
      +    request_rec    *r;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    ctx.passwd = apr_pstrdup(r->pool, lua_tostring(L, 2));
      +    ctx.alg = luaL_optinteger(L, 3, ALG_APMD5);
      +    ctx.cost = luaL_optinteger(L, 4, 0);
      +    ctx.pool = r->pool;
      +    ctx.out = apr_pcalloc(r->pool, MAX_PASSWD_LEN);
      +    ctx.out_len = MAX_PASSWD_LEN;
      +    if (mk_password_hash(&ctx)) {
      +        lua_pushboolean(L, 0);
      +        lua_pushstring(L, ctx.errstr);
      +        return 2;
      +    } else {
      +        lua_pushstring(L, ctx.out);
      +    }
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_touch; r:touch(string [, time]) - Sets mtime of a file
      + */
      +static int lua_apr_touch(lua_State *L)
      +{
      +    request_rec     *r;
      +    const char      *path;
      +    apr_status_t    status;
      +    apr_time_t      mtime;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    path = lua_tostring(L, 2);
      +    mtime = (apr_time_t)luaL_optnumber(L, 3, (lua_Number)apr_time_now());
      +    status = apr_file_mtime_set(path, mtime, r->pool);
      +    lua_pushboolean(L, (status == 0));
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_mkdir; r:mkdir(string [, permissions]) - Creates a directory
      + */
      +static int lua_apr_mkdir(lua_State *L)
      +{
      +    request_rec     *r;
      +    const char      *path;
      +    apr_status_t    status;
      +    apr_fileperms_t perms;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    path = lua_tostring(L, 2);
      +    perms = luaL_optinteger(L, 3, APR_OS_DEFAULT);
      +    status = apr_dir_make(path, perms, r->pool);
      +    lua_pushboolean(L, (status == 0));
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_mkrdir; r:mkrdir(string [, permissions]) - Creates directories
      + * recursive
      + */
      +static int lua_apr_mkrdir(lua_State *L)
      +{
      +    request_rec     *r;
      +    const char      *path;
      +    apr_status_t    status;
      +    apr_fileperms_t perms;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    path = lua_tostring(L, 2);
      +    perms = luaL_optinteger(L, 3, APR_OS_DEFAULT);
      +    status = apr_dir_make_recursive(path, perms, r->pool);
      +    lua_pushboolean(L, (status == 0));
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_rmdir; r:rmdir(string) - Removes a directory
      + */
      +static int lua_apr_rmdir(lua_State *L)
      +{
      +    request_rec     *r;
      +    const char      *path;
      +    apr_status_t    status;
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    path = lua_tostring(L, 2);
      +    status = apr_dir_remove(path, r->pool);
      +    lua_pushboolean(L, (status == 0));
      +    return 1;
      +}
      +
      +/*
      + * lua_apr_date_parse_rfc; r.date_parse_rfc(string) - Parses a DateTime string
      + */
      +static int lua_apr_date_parse_rfc(lua_State *L)
      +{
      +    const char *input;
      +    apr_time_t result;
      +
      +    luaL_checktype(L, 1, LUA_TSTRING);
      +    input = lua_tostring(L, 1);
      +    result = apr_date_parse_rfc(input);
      +    if (result == 0)
      +        return 0;
      +    lua_pushnumber(L, (lua_Number)(result / APR_USEC_PER_SEC));
      +    return 1;
      +}
      +
      +/*
      + * lua_ap_mpm_query; r:mpm_query(info) - Queries for MPM info
      + */
      +static int lua_ap_mpm_query(lua_State *L)
      +{
      +    int x,
      +        y;
      +
      +    x = lua_tointeger(L, 1);
      +    ap_mpm_query(x, &y);
      +    lua_pushinteger(L, y);
      +    return 1;
      +}
      +
      +/*
      + * lua_ap_expr; r:expr(string) - Evaluates an expr statement.
      + */
      +static int lua_ap_expr(lua_State *L)
      +{
      +    request_rec    *r;
      +    int x = 0;
      +    const char     *expr,
      +    *err;
      +    ap_expr_info_t res;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    expr = lua_tostring(L, 2);
      +
      +
      +    res.filename = NULL;
      +    res.flags = 0;
      +    res.line_number = 0;
      +    res.module_index = APLOG_MODULE_INDEX;
      +
      +    err = ap_expr_parse(r->pool, r->pool, &res, expr, NULL);
      +    if (!err) {
      +        x = ap_expr_exec(r, &res, &err);
      +        lua_pushboolean(L, x);
      +        if (x < 0) {
      +            lua_pushstring(L, err);
      +            return 2;
      +        }
      +        return 1;
      +    } else {
      +        lua_pushboolean(L, 0);
      +        lua_pushstring(L, err);
      +        return 2;
      +    }
      +    lua_pushboolean(L, 0);
      +    return 1;
      +}
      +
      +
      +/*
      + * lua_ap_regex; r:regex(string, pattern [, flags])
      + * - Evaluates a regex and returns captures if matched
      + */
      +static int lua_ap_regex(lua_State *L)
      +{
      +    request_rec    *r;
      +    int i,
      +        rv,
      +        flags;
      +    const char     *pattern,
      +    *source;
      +    char           *err;
      +    ap_regex_t regex;
      +    ap_regmatch_t matches[MODLUA_MAX_REG_MATCH+1];
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    luaL_checktype(L, 3, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    source = lua_tostring(L, 2);
      +    pattern = lua_tostring(L, 3);
      +    flags = luaL_optinteger(L, 4, 0);
      +
      +    rv = ap_regcomp(&regex, pattern, flags);
      +    if (rv) {
      +        lua_pushboolean(L, 0);
      +        err = apr_palloc(r->pool, 256);
      +        ap_regerror(rv, &regex, err, 256);
      +        lua_pushstring(L, err);
      +        return 2;
      +    }
      +
      +    if (regex.re_nsub > MODLUA_MAX_REG_MATCH) {
      +        lua_pushboolean(L, 0);
      +        err = apr_palloc(r->pool, 64);
      +        apr_snprintf(err, 64,
      +                     "regcomp found %d matches; only %d allowed.",
      +                     regex.re_nsub, MODLUA_MAX_REG_MATCH);
      +        lua_pushstring(L, err);
      +        return 2;
      +    }
      +
      +    rv = ap_regexec(&regex, source, MODLUA_MAX_REG_MATCH, matches, 0);
      +    if (rv == AP_REG_NOMATCH) {
      +        lua_pushboolean(L, 0);
      +        return 1;
      +    }
      +    
      +    lua_newtable(L);
      +    for (i = 0; i <= regex.re_nsub; i++) {
      +        lua_pushinteger(L, i);
      +        if (matches[i].rm_so >= 0 && matches[i].rm_eo >= 0)
      +            lua_pushstring(L,
      +                           apr_pstrndup(r->pool, source + matches[i].rm_so,
      +                                        matches[i].rm_eo - matches[i].rm_so));
      +        else
      +            lua_pushnil(L);
      +        lua_settable(L, -3);
      +
      +    }
      +    return 1;
      +}
      +
      +
      +
      +
      +/*
      + * lua_ap_scoreboard_process; r:scoreboard_process(a) - returns scoreboard info
      + */
      +static int lua_ap_scoreboard_process(lua_State *L)
      +{
      +    int i;
      +    process_score  *ps_record;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TNUMBER);
      +    i = lua_tointeger(L, 2);
      +    ps_record = ap_get_scoreboard_process(i);
      +    if (ps_record) {
      +        lua_newtable(L);
      +
      +        lua_pushstring(L, "connections");
      +        lua_pushnumber(L, ps_record->connections);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "keepalive");
      +        lua_pushnumber(L, ps_record->keep_alive);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "lingering_close");
      +        lua_pushnumber(L, ps_record->lingering_close);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "pid");
      +        lua_pushnumber(L, ps_record->pid);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "suspended");
      +        lua_pushnumber(L, ps_record->suspended);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "write_completion");
      +        lua_pushnumber(L, ps_record->write_completion);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "not_accepting");
      +        lua_pushnumber(L, ps_record->not_accepting);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "quiescing");
      +        lua_pushnumber(L, ps_record->quiescing);
      +        lua_settable(L, -3);
      +
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      + * lua_ap_scoreboard_worker; r:scoreboard_worker(proc, thread) - Returns thread
      + * info
      + */
      +static int lua_ap_scoreboard_worker(lua_State *L)
      +{
      +    int i, j;
      +    worker_score *ws_record = NULL;
      +    request_rec *r = NULL;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TNUMBER);
      +    luaL_checktype(L, 3, LUA_TNUMBER);
      +
      +    r = ap_lua_check_request_rec(L, 1);
      +    if (!r) return 0;
      +
      +    i = lua_tointeger(L, 2);
      +    j = lua_tointeger(L, 3);
      +    ws_record = apr_palloc(r->pool, sizeof *ws_record);
      +
      +    ap_copy_scoreboard_worker(ws_record, i, j);
      +    if (ws_record) {
      +        lua_newtable(L);
      +
      +        lua_pushstring(L, "access_count");
      +        lua_pushnumber(L, ws_record->access_count);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "bytes_served");
      +        lua_pushnumber(L, (lua_Number) ws_record->bytes_served);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "client");
      +        lua_pushstring(L, ws_record->client);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "conn_bytes");
      +        lua_pushnumber(L, (lua_Number) ws_record->conn_bytes);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "conn_count");
      +        lua_pushnumber(L, ws_record->conn_count);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "generation");
      +        lua_pushnumber(L, ws_record->generation);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "last_used");
      +        lua_pushnumber(L, (lua_Number) ws_record->last_used);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "pid");
      +        lua_pushnumber(L, ws_record->pid);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "request");
      +        lua_pushstring(L, ws_record->request);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "start_time");
      +        lua_pushnumber(L, (lua_Number) ws_record->start_time);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "status");
      +        lua_pushnumber(L, ws_record->status);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "stop_time");
      +        lua_pushnumber(L, (lua_Number) ws_record->stop_time);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "tid");
      +
      +        lua_pushinteger(L, (lua_Integer) ws_record->tid);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "vhost");
      +        lua_pushstring(L, ws_record->vhost);
      +        lua_settable(L, -3);
      +#ifdef HAVE_TIMES
      +        lua_pushstring(L, "stimes");
      +        lua_pushnumber(L, ws_record->times.tms_stime);
      +        lua_settable(L, -3);
      +
      +        lua_pushstring(L, "utimes");
      +        lua_pushnumber(L, ws_record->times.tms_utime);
      +        lua_settable(L, -3);
      +#endif
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +/*
      + * lua_ap_clock; r:clock() - Returns timestamp with microsecond precision
      + */
      +static int lua_ap_clock(lua_State *L)
      +{
      +    apr_time_t now;
      +    now = apr_time_now();
      +    lua_pushnumber(L, (lua_Number) now);
      +    return 1;
      +}
      +
      +/*
      + * lua_ap_add_input_filter; r:add_input_filter(name) - Adds an input filter to
      + * the chain
      + */
      +static int lua_ap_add_input_filter(lua_State *L)
      +{
      +    request_rec    *r;
      +    const char     *filterName;
      +    ap_filter_rec_t *filter;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    filterName = lua_tostring(L, 2);
      +    filter = ap_get_input_filter_handle(filterName);
      +    if (filter) {
      +        ap_add_input_filter_handle(filter, NULL, r, r->connection);
      +        lua_pushboolean(L, 1);
      +    } else
      +        lua_pushboolean(L, 0);
      +    return 1;
      +}
      +
      +
      +/*
      + * lua_ap_module_info; r:module_info(mod_name) - Returns information about a
      + * loaded module
      + */
      +static int lua_ap_module_info(lua_State *L)
       {
      -    return r->args;
      +    const char     *moduleName;
      +    module         *mod;
      +
      +    luaL_checktype(L, 1, LUA_TSTRING);
      +    moduleName = lua_tostring(L, 1);
      +    mod = ap_find_linked_module(moduleName);
      +    if (mod && mod->cmds) {
      +        const command_rec *cmd;
      +        lua_newtable(L);
      +        lua_pushstring(L, "commands");
      +        lua_newtable(L);
      +        for (cmd = mod->cmds; cmd->name; ++cmd) {
      +            lua_pushstring(L, cmd->name);
      +            lua_pushstring(L, cmd->errmsg);
      +            lua_settable(L, -3);
      +        }
      +        lua_settable(L, -3);
      +        return 1;
      +    }
      +    return 0;
       }
       
      -static const char *req_path_info_field(request_rec *r)
      +/*
      + * lua_ap_runtime_dir_relative: r:runtime_dir_relative(file): Returns the
      + * filename as relative to the runtime dir
      + */
      +static int lua_ap_runtime_dir_relative(lua_State *L)
       {
      -    return r->path_info;
      +    request_rec    *r;
      +    const char     *file;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    file = luaL_optstring(L, 2, ".");
      +    lua_pushstring(L, ap_runtime_dir_relative(r->pool, file));
      +    return 1;
       }
       
      -static const char *req_canonical_filename_field(request_rec *r)
      +/*
      + * lua_ap_set_document_root; r:set_document_root(path) - sets the current doc
      + * root for the request
      + */
      +static int lua_ap_set_document_root(lua_State *L)
       {
      -    return r->canonical_filename;
      +    request_rec    *r;
      +    const char     *root;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    root = lua_tostring(L, 2);
      +    ap_set_document_root(r, root);
      +    return 0;
       }
       
      -static const char *req_filename_field(request_rec *r)
      +/*
      + * lua_ap_getdir; r:get_direntries(directory) - Gets all entries of a
      + * directory and returns the directory info as a table
      + */
      +static int lua_ap_getdir(lua_State *L)
       {
      -    return r->filename;
      +    request_rec    *r;
      +    apr_dir_t      *thedir;
      +    apr_finfo_t    file_info;
      +    apr_status_t   status;
      +    const char     *directory;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    directory = lua_tostring(L, 2);
      +    if (apr_dir_open(&thedir, directory, r->pool) == APR_SUCCESS) {
      +        int i = 0;
      +        lua_newtable(L);
      +        do {
      +            status = apr_dir_read(&file_info, APR_FINFO_NAME, thedir);
      +            if (APR_STATUS_IS_INCOMPLETE(status)) {
      +                continue; /* ignore un-stat()able files */
      +            }
      +            else if (status != APR_SUCCESS) {
      +                break;
      +            }
      +            lua_pushinteger(L, ++i);
      +            lua_pushstring(L, file_info.name);
      +            lua_settable(L, -3);
      +
      +        } while (1);
      +        apr_dir_close(thedir);
      +        return 1;
      +    }
      +    else {
      +        return 0;
      +    }
       }
       
      -static const char *req_user_field(request_rec *r)
      +/*
      + * lua_ap_stat; r:stat(filename [, wanted]) - Runs stat on a file and
      + * returns the file info as a table
      + */
      +static int lua_ap_stat(lua_State *L)
       {
      -    return r->user;
      +    request_rec    *r;
      +    const char     *filename;
      +    apr_finfo_t file_info;
      +    apr_int32_t wanted;
      +
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    r = ap_lua_check_request_rec(L, 1);
      +    filename = lua_tostring(L, 2);
      +    wanted = luaL_optinteger(L, 3, APR_FINFO_MIN);
      +    if (apr_stat(&file_info, filename, wanted, r->pool) == OK) {
      +        lua_newtable(L);
      +        if (wanted & APR_FINFO_MTIME) {
      +            lua_pushstring(L, "mtime");
      +            lua_pushnumber(L, (lua_Number) file_info.mtime);
      +            lua_settable(L, -3);
      +        }
      +        if (wanted & APR_FINFO_ATIME) {
      +            lua_pushstring(L, "atime");
      +            lua_pushnumber(L, (lua_Number) file_info.atime);
      +            lua_settable(L, -3);
      +        }
      +        if (wanted & APR_FINFO_CTIME) {
      +            lua_pushstring(L, "ctime");
      +            lua_pushnumber(L, (lua_Number) file_info.ctime);
      +            lua_settable(L, -3);
      +        }
      +        if (wanted & APR_FINFO_SIZE) {
      +            lua_pushstring(L, "size");
      +            lua_pushnumber(L, (lua_Number) file_info.size);
      +            lua_settable(L, -3);
      +        }
      +        if (wanted & APR_FINFO_TYPE) {
      +            lua_pushstring(L, "filetype");
      +            lua_pushinteger(L, file_info.filetype);
      +            lua_settable(L, -3);
      +        }
      +        if (wanted & APR_FINFO_PROT) {
      +            lua_pushstring(L, "protection");
      +            lua_pushinteger(L, file_info.protection);
      +            lua_settable(L, -3);
      +        }
      +        return 1;
      +    }
      +    else {
      +        return 0;
      +    }
       }
       
      -static const char *req_unparsed_uri_field(request_rec *r)
      +/*
      + * lua_ap_loaded_modules; r:loaded_modules() - Returns a list of loaded modules
      + */
      +static int lua_ap_loaded_modules(lua_State *L)
       {
      -    return r->unparsed_uri;
      +    int i;
      +    lua_newtable(L);
      +    for (i = 0; ap_loaded_modules[i] && ap_loaded_modules[i]->name; i++) {
      +        lua_pushinteger(L, i + 1);
      +        lua_pushstring(L, ap_loaded_modules[i]->name);
      +        lua_settable(L, -3);
      +    }
      +    return 1;
       }
       
      -static const char *req_ap_auth_type_field(request_rec *r)
      +/*
      + * lua_ap_server_info; r:server_info() - Returns server info, such as the
      + * executable filename, server root, mpm etc
      + */
      +static int lua_ap_server_info(lua_State *L)
       {
      -    return r->ap_auth_type;
      +    lua_newtable(L);
      +
      +    lua_pushstring(L, "server_executable");
      +    lua_pushstring(L, ap_server_argv0);
      +    lua_settable(L, -3);
      +
      +    lua_pushstring(L, "server_root");
      +    lua_pushstring(L, ap_server_root);
      +    lua_settable(L, -3);
      +
      +    lua_pushstring(L, "scoreboard_fname");
      +    lua_pushstring(L, ap_scoreboard_fname);
      +    lua_settable(L, -3);
      +
      +    lua_pushstring(L, "server_mpm");
      +    lua_pushstring(L, ap_show_mpm());
      +    lua_settable(L, -3);
      +
      +    return 1;
       }
       
      -static const char *req_content_encoding_field(request_rec *r)
      +
      +/*
      + * === Auto-scraped functions ===
      + */
      +
      +
      +/**
      + * ap_set_context_info: Set context_prefix and context_document_root.
      + * @param r The request
      + * @param prefix the URI prefix, without trailing slash
      + * @param document_root the corresponding directory on disk, without trailing
      + * slash
      + * @note If one of prefix of document_root is NULL, the corrsponding
      + * property will not be changed.
      + */
      +static int lua_ap_set_context_info(lua_State *L)
       {
      -    return r->content_encoding;
      +    request_rec    *r;
      +    const char     *prefix;
      +    const char     *document_root;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    prefix = lua_tostring(L, 2);
      +    luaL_checktype(L, 3, LUA_TSTRING);
      +    document_root = lua_tostring(L, 3);
      +    ap_set_context_info(r, prefix, document_root);
      +    return 0;
       }
       
      -static const char *req_content_type_field(request_rec *r)
      +
      +/**
      + * ap_os_escape_path (apr_pool_t *p, const char *path, int partial)
      + * convert an OS path to a URL in an OS dependant way.
      + * @param p The pool to allocate from
      + * @param path The path to convert
      + * @param partial if set, assume that the path will be appended to something
      + *        with a '/' in it (and thus does not prefix "./")
      + * @return The converted URL
      + */
      +static int lua_ap_os_escape_path(lua_State *L)
       {
      -    return r->content_type;
      +    char           *returnValue;
      +    request_rec    *r;
      +    const char     *path;
      +    int partial = 0;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    path = lua_tostring(L, 2);
      +    if (lua_isboolean(L, 3))
      +        partial = lua_toboolean(L, 3);
      +    returnValue = ap_os_escape_path(r->pool, path, partial);
      +    lua_pushstring(L, returnValue);
      +    return 1;
       }
       
      -static const char *req_range_field(request_rec *r)
      +
      +/**
      + * ap_escape_logitem (apr_pool_t *p, const char *str)
      + * Escape a string for logging
      + * @param p The pool to allocate from
      + * @param str The string to escape
      + * @return The escaped string
      + */
      +static int lua_ap_escape_logitem(lua_State *L)
       {
      -    return r->range;
      +    char           *returnValue;
      +    request_rec    *r;
      +    const char     *str;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    str = lua_tostring(L, 2);
      +    returnValue = ap_escape_logitem(r->pool, str);
      +    lua_pushstring(L, returnValue);
      +    return 1;
       }
       
      -static const char *req_protocol_field(request_rec *r)
      +/**
      + * ap_strcmp_match (const char *str, const char *expected)
      + * Determine if a string matches a pattern containing the wildcards '?' or '*'
      + * @param str The string to check
      + * @param expected The pattern to match against
      + * @param ignoreCase Whether to ignore case when matching
      + * @return 1 if the two strings match, 0 otherwise
      + */
      +static int lua_ap_strcmp_match(lua_State *L)
       {
      -    return r->protocol;
      +    int returnValue;
      +    const char     *str;
      +    const char     *expected;
      +    int ignoreCase = 0;
      +    luaL_checktype(L, 1, LUA_TSTRING);
      +    str = lua_tostring(L, 1);
      +    luaL_checktype(L, 2, LUA_TSTRING);
      +    expected = lua_tostring(L, 2);
      +    if (lua_isboolean(L, 3))
      +        ignoreCase = lua_toboolean(L, 3);
      +    if (!ignoreCase)
      +        returnValue = ap_strcmp_match(str, expected);
      +    else
      +        returnValue = ap_strcasecmp_match(str, expected);
      +    lua_pushboolean(L, (!returnValue));
      +    return 1;
       }
       
      -static const char *req_the_request_field(request_rec *r)
      +
      +/**
      + * ap_set_keepalive (request_rec *r)
      + * Set the keepalive status for this request
      + * @param r The current request
      + * @return 1 if keepalive can be set, 0 otherwise
      + */
      +static int lua_ap_set_keepalive(lua_State *L)
       {
      -    return r->the_request;
      +    int returnValue;
      +    request_rec    *r;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    returnValue = ap_set_keepalive(r);
      +    lua_pushboolean(L, returnValue);
      +    return 1;
       }
       
      -static int req_status_field(request_rec *r)
      +/**
      + * ap_make_etag (request_rec *r, int force_weak)
      + * Construct an entity tag from the resource information.  If it's a real
      + * file, build in some of the file characteristics.
      + * @param r The current request
      + * @param force_weak Force the entity tag to be weak - it could be modified
      + *                   again in as short an interval.
      + * @return The entity tag
      + */
      +static int lua_ap_make_etag(lua_State *L)
       {
      -    return r->status;
      +    char           *returnValue;
      +    request_rec    *r;
      +    int force_weak;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TBOOLEAN);
      +    force_weak = luaL_optint(L, 2, 0);
      +    returnValue = ap_make_etag(r, force_weak);
      +    lua_pushstring(L, returnValue);
      +    return 1;
       }
       
      -static int req_assbackwards_field(request_rec *r)
      +
      +
      +/**
      + * ap_send_interim_response (request_rec *r, int send_headers)
      + * Send an interim (HTTP 1xx) response immediately.
      + * @param r The request
      + * @param send_headers Whether to send&clear headers in r->headers_out
      + */
      +static int lua_ap_send_interim_response(lua_State *L)
       {
      -    return r->assbackwards;
      +    request_rec    *r;
      +    int send_headers = 0;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    if (lua_isboolean(L, 2))
      +        send_headers = lua_toboolean(L, 2);
      +    ap_send_interim_response(r, send_headers);
      +    return 0;
       }
       
      -static apr_table_t* req_headers_in(request_rec *r)
      +
      +/**
      + * ap_custom_response (request_rec *r, int status, const char *string)
      + * Install a custom response handler for a given status
      + * @param r The current request
      + * @param status The status for which the custom response should be used
      + * @param string The custom response.  This can be a static string, a file
      + *               or a URL
      + */
      +static int lua_ap_custom_response(lua_State *L)
       {
      -    return r->headers_in;
      +    request_rec    *r;
      +    int status;
      +    const char     *string;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    luaL_checktype(L, 2, LUA_TNUMBER);
      +    status = lua_tointeger(L, 2);
      +    luaL_checktype(L, 3, LUA_TSTRING);
      +    string = lua_tostring(L, 3);
      +    ap_custom_response(r, status, string);
      +    return 0;
       }
       
      -static apr_table_t* req_headers_out(request_rec *r)
      +
      +/**
      + * ap_exists_config_define (const char *name)
      + * Check for a definition from the server command line
      + * @param name The define to check for
      + * @return 1 if defined, 0 otherwise
      + */
      +static int lua_ap_exists_config_define(lua_State *L)
       {
      -    return r->headers_out;
      +    int returnValue;
      +    const char     *name;
      +    luaL_checktype(L, 1, LUA_TSTRING);
      +    name = lua_tostring(L, 1);
      +    returnValue = ap_exists_config_define(name);
      +    lua_pushboolean(L, returnValue);
      +    return 1;
       }
       
      -static apr_table_t* req_err_headers_out(request_rec *r)
      +static int lua_ap_get_server_name_for_url(lua_State *L)
       {
      -  return r->err_headers_out;
      +    const char     *servername;
      +    request_rec    *r;
      +    luaL_checktype(L, 1, LUA_TUSERDATA);
      +    r = ap_lua_check_request_rec(L, 1);
      +    servername = ap_get_server_name_for_url(r);
      +    lua_pushstring(L, servername);
      +    return 1;
       }
       
      -static apr_table_t* req_subprocess_env(request_rec *r)
      +/* ap_state_query (int query_code) item starts a new field  */
      +static int lua_ap_state_query(lua_State *L)
       {
      -  return r->subprocess_env;
      +
      +    int returnValue;
      +    int query_code;
      +    luaL_checktype(L, 1, LUA_TNUMBER);
      +    query_code = lua_tointeger(L, 1);
      +    returnValue = ap_state_query(query_code);
      +    lua_pushinteger(L, returnValue);
      +    return 1;
       }
       
      -static apr_table_t* req_notes(request_rec *r)
      +/*
      + * lua_ap_usleep; r:usleep(microseconds)
      + * - Sleep for the specified number of microseconds.
      + */
      +static int lua_ap_usleep(lua_State *L)
       {
      -  return r->notes;
      +    apr_interval_time_t msec;
      +    luaL_checktype(L, 1, LUA_TNUMBER);
      +    msec = (apr_interval_time_t)lua_tonumber(L, 1);
      +    apr_sleep(msec);
      +    return 0;
       }
       
      -/* END dispatch mathods for request_rec fields */
      +/* END dispatch methods for request_rec fields */
       
       static int req_dispatch(lua_State *L)
       {
      @@ -376,9 +1833,9 @@ static int req_dispatch(lua_State *L)
           if (rft) {
               switch (rft->type) {
               case APL_REQ_FUNTYPE_TABLE:{
      -                apr_table_t *rs;
      +                req_table_t *rs;
                       req_field_apr_table_f func = (req_field_apr_table_f)rft->fun;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01486)
                                     "request_rec->dispatching %s -> apr table",
                                     name);
                       rs = (*func)(r);
      @@ -388,7 +1845,7 @@ static int req_dispatch(lua_State *L)
       
               case APL_REQ_FUNTYPE_LUACFUN:{
                       lua_CFunction func = (lua_CFunction)rft->fun;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01487)
                                     "request_rec->dispatching %s -> lua_CFunction",
                                     name);
                       lua_pushcfunction(L, func);
      @@ -397,7 +1854,7 @@ static int req_dispatch(lua_State *L)
               case APL_REQ_FUNTYPE_STRING:{
                       req_field_string_f func = (req_field_string_f)rft->fun;
                       char *rs;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01488)
                                     "request_rec->dispatching %s -> string", name);
                       rs = (*func) (r);
                       lua_pushstring(L, rs);
      @@ -406,16 +1863,16 @@ static int req_dispatch(lua_State *L)
               case APL_REQ_FUNTYPE_INT:{
                       req_field_int_f func = (req_field_int_f)rft->fun;
                       int rs;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01489)
                                     "request_rec->dispatching %s -> int", name);
                       rs = (*func) (r);
      -                lua_pushnumber(L, rs);
      +                lua_pushinteger(L, rs);
                       return 1;
                   }
               case APL_REQ_FUNTYPE_BOOLEAN:{
                       req_field_int_f func = (req_field_int_f)rft->fun;
                       int rs;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01490)
                                     "request_rec->dispatching %s -> boolean", name);
                       rs = (*func) (r);
                       lua_pushboolean(L, rs);
      @@ -424,7 +1881,7 @@ static int req_dispatch(lua_State *L)
               }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "nothing for %s", name);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01491) "nothing for %s", name);
           return 0;
       }
       
      @@ -447,49 +1904,621 @@ static int req_log_at(lua_State *L, int level)
       /* r:debug(String) and friends which use apache logging */
       static int req_emerg(lua_State *L)
       {
      -    req_log_at(L, APLOG_EMERG);
      -    return 0;
      +    return req_log_at(L, APLOG_EMERG);
       }
       static int req_alert(lua_State *L)
       {
      -    req_log_at(L, APLOG_ALERT);
      -    return 0;
      +    return req_log_at(L, APLOG_ALERT);
       }
       static int req_crit(lua_State *L)
       {
      -    req_log_at(L, APLOG_CRIT);
      -    return 0;
      +    return req_log_at(L, APLOG_CRIT);
       }
       static int req_err(lua_State *L)
       {
      -    req_log_at(L, APLOG_ERR);
      -    return 0;
      +    return req_log_at(L, APLOG_ERR);
       }
       static int req_warn(lua_State *L)
       {
      -    req_log_at(L, APLOG_WARNING);
      -    return 0;
      +    return req_log_at(L, APLOG_WARNING);
       }
       static int req_notice(lua_State *L)
       {
      -    req_log_at(L, APLOG_NOTICE);
      -    return 0;
      +    return req_log_at(L, APLOG_NOTICE);
       }
       static int req_info(lua_State *L)
       {
      -    req_log_at(L, APLOG_INFO);
      -    return 0;
      +    return req_log_at(L, APLOG_INFO);
       }
       static int req_debug(lua_State *L)
       {
      -    req_log_at(L, APLOG_DEBUG);
      +    return req_log_at(L, APLOG_DEBUG);
      +}
      +
      +static int lua_ivm_get(lua_State *L) 
      +{
      +    const char *key, *raw_key;
      +    apr_pool_t *pool;
      +    lua_ivm_object *object = NULL;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    key = luaL_checkstring(L, 2);
      +    raw_key = apr_pstrcat(r->pool, "lua_ivm_", key, NULL);
      +    apr_global_mutex_lock(lua_ivm_mutex);
      +    pool = *((apr_pool_t**) apr_shm_baseaddr_get(lua_ivm_shm));
      +    apr_pool_userdata_get((void **)&object, raw_key, pool);
      +    if (object) {
      +        if (object->type == LUA_TBOOLEAN) lua_pushboolean(L, (int) object->number);
      +        else if (object->type == LUA_TNUMBER) lua_pushnumber(L, object->number);
      +        else if (object->type == LUA_TSTRING) lua_pushlstring(L, object->vb.buf, object->size);
      +        apr_global_mutex_unlock(lua_ivm_mutex);
      +        return 1;
      +    }
      +    else {
      +        apr_global_mutex_unlock(lua_ivm_mutex);
      +        return 0;
      +    }
      +}
      +
      +
      +static int lua_ivm_set(lua_State *L) 
      +{
      +    const char *key, *raw_key;
      +    const char *value = NULL;
      +    apr_pool_t *pool;
      +    size_t str_len;
      +    lua_ivm_object *object = NULL;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    key = luaL_checkstring(L, 2);
      +    luaL_checkany(L, 3);
      +    raw_key = apr_pstrcat(r->pool, "lua_ivm_", key, NULL);
      +    
      +    apr_global_mutex_lock(lua_ivm_mutex);
      +    pool = *((apr_pool_t**) apr_shm_baseaddr_get(lua_ivm_shm));
      +    apr_pool_userdata_get((void **)&object, raw_key, pool);
      +    if (!object) {
      +        object = apr_pcalloc(pool, sizeof(lua_ivm_object));
      +        ap_varbuf_init(pool, &object->vb, 2);
      +        object->size = 1;
      +        object->vb_size = 1;
      +    }
      +    object->type = lua_type(L, 3);
      +    if (object->type == LUA_TNUMBER) object->number = lua_tonumber(L, 3);
      +    else if (object->type == LUA_TBOOLEAN) object->number = lua_tonumber(L, 3);
      +    else if (object->type == LUA_TSTRING) {
      +        value = lua_tolstring(L, 3, &str_len);
      +        str_len++; /* add trailing \0 */
      +        if ( str_len > object->vb_size) {
      +            ap_varbuf_grow(&object->vb, str_len);
      +            object->vb_size = str_len;
      +        }
      +        object->size = str_len-1;
      +        memset(object->vb.buf, 0, str_len);
      +        memcpy(object->vb.buf, value, str_len-1);
      +    }
      +    apr_pool_userdata_set(object, raw_key, NULL, pool);
      +    apr_global_mutex_unlock(lua_ivm_mutex);
      +    return 0;
      +}
      +
      +static int lua_get_cookie(lua_State *L) 
      +{
      +    const char *key, *cookie;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    key = luaL_checkstring(L, 2);
      +    cookie = NULL;
      +    ap_cookie_read(r, key, &cookie, 0);
      +    if (cookie != NULL) {
      +        lua_pushstring(L, cookie);
      +        return 1;
      +    }
      +    return 0;
      +}
      +
      +static int lua_set_cookie(lua_State *L) 
      +{
      +    const char *key, *value, *out, *path = "", *domain = "";
      +    const char *strexpires = "", *strdomain = "", *strpath = "";
      +    int secure = 0, expires = 0, httponly = 0;
      +    char cdate[APR_RFC822_DATE_LEN+1];
      +    apr_status_t rv;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    
      +    /* New >= 2.4.8 method: */
      +    if (lua_istable(L, 2)) {
      +         
      +        /* key */
      +        lua_pushstring(L, "key");
      +        lua_gettable(L, -2);
      +        key = luaL_checkstring(L, -1);
      +        lua_pop(L, 1);
      +        
      +        /* value */
      +        lua_pushstring(L, "value");
      +        lua_gettable(L, -2);
      +        value = luaL_checkstring(L, -1);
      +        lua_pop(L, 1);
      +        
      +        /* expiry */
      +        lua_pushstring(L, "expires");
      +        lua_gettable(L, -2);
      +        expires = luaL_optint(L, -1, 0);
      +        lua_pop(L, 1);
      +        
      +        /* secure */
      +        lua_pushstring(L, "secure");
      +        lua_gettable(L, -2);
      +        if (lua_isboolean(L, -1)) {
      +            secure = lua_toboolean(L, -1);
      +        }
      +        lua_pop(L, 1);
      +        
      +        /* httponly */
      +        lua_pushstring(L, "httponly");
      +        lua_gettable(L, -2);
      +        if (lua_isboolean(L, -1)) {
      +            httponly = lua_toboolean(L, -1);
      +        }
      +        lua_pop(L, 1);
      +        
      +        /* path */
      +        lua_pushstring(L, "path");
      +        lua_gettable(L, -2);
      +        path = luaL_optstring(L, -1, "/");
      +        lua_pop(L, 1);
      +        
      +        /* domain */
      +        lua_pushstring(L, "domain");
      +        lua_gettable(L, -2);
      +        domain = luaL_optstring(L, -1, "");
      +        lua_pop(L, 1);        
      +    }
      +    /* Old <= 2.4.7 method: */
      +    else {
      +        key = luaL_checkstring(L, 2);
      +        value = luaL_checkstring(L, 3);
      +        secure = 0;
      +        if (lua_isboolean(L, 4)) {
      +            secure = lua_toboolean(L, 4);
      +        }
      +        expires = luaL_optinteger(L, 5, 0);
      +    }
      +    
      +    /* Calculate expiry if set */
      +    if (expires > 0) {
      +        rv = apr_rfc822_date(cdate, apr_time_from_sec(expires));
      +        if (rv == APR_SUCCESS) {
      +            strexpires = apr_psprintf(r->pool, "Expires=%s;", cdate);
      +        }
      +    }
      +    
      +    /* Create path segment */
      +    if (path != NULL && strlen(path) > 0) {
      +        strpath = apr_psprintf(r->pool, "Path=%s;", path);
      +    }
      +    
      +    /* Create domain segment */
      +    if (domain != NULL && strlen(domain) > 0) {
      +        /* Domain does NOT like quotes in most browsers, so let's avoid that */
      +        strdomain = apr_psprintf(r->pool, "Domain=%s;", domain);
      +    }
      +    
      +    /* URL-encode key/value */
      +    value = ap_escape_urlencoded(r->pool, value);
      +    key = ap_escape_urlencoded(r->pool, key);
      +    
      +    /* Create the header */
      +    out = apr_psprintf(r->pool, "%s=%s; %s %s %s %s %s", key, value, 
      +            secure ? "Secure;" : "", 
      +            expires ? strexpires : "", 
      +            httponly ? "HttpOnly;" : "", 
      +            strlen(strdomain) ? strdomain : "", 
      +            strlen(strpath) ? strpath : "");
      +    
      +    apr_table_add(r->err_headers_out, "Set-Cookie", out);
      +    return 0;
      +}
      +
      +static apr_uint64_t ap_ntoh64(const apr_uint64_t *input)
      +{
      +    apr_uint64_t rval;
      +    unsigned char *data = (unsigned char *)&rval;
      +    if (APR_IS_BIGENDIAN) {
      +        return *input;
      +    }
      +    
      +    data[0] = *input >> 56;
      +    data[1] = *input >> 48;
      +    data[2] = *input >> 40;
      +    data[3] = *input >> 32;
      +    data[4] = *input >> 24;
      +    data[5] = *input >> 16;
      +    data[6] = *input >> 8;
      +    data[7] = *input >> 0;
      +
      +    return rval;
      +}
      +
      +static int lua_websocket_greet(lua_State *L)
      +{
      +    const char *key = NULL;
      +    unsigned char digest[APR_SHA1_DIGESTSIZE];
      +    apr_sha1_ctx_t sha1;
      +    char           *encoded;
      +    int encoded_len;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    key = apr_table_get(r->headers_in, "Sec-WebSocket-Key");
      +    if (key != NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03011) 
      +                      "Websocket: Got websocket key: %s", key);
      +        key = apr_pstrcat(r->pool, key, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", 
      +                NULL);
      +        apr_sha1_init(&sha1);
      +        apr_sha1_update(&sha1, key, strlen(key));
      +        apr_sha1_final(digest, &sha1);
      +        encoded_len = apr_base64_encode_len(APR_SHA1_DIGESTSIZE);
      +        if (encoded_len) {
      +            encoded = apr_palloc(r->pool, encoded_len);
      +            encoded_len = apr_base64_encode(encoded, (char*) digest, APR_SHA1_DIGESTSIZE);
      +            r->status = 101;
      +            apr_table_set(r->headers_out, "Upgrade", "websocket");
      +            apr_table_set(r->headers_out, "Connection", "Upgrade");
      +            apr_table_set(r->headers_out, "Sec-WebSocket-Accept", encoded);
      +            
      +            /* Trick httpd into NOT using the chunked filter, IMPORTANT!!!111*/
      +            apr_table_set(r->headers_out, "Transfer-Encoding", "chunked");
      +            
      +            r->clength = 0;
      +            r->bytes_sent = 0;
      +            r->read_chunked = 0;
      +            ap_rflush(r);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03012) 
      +                          "Websocket: Upgraded from HTTP to Websocket");
      +            lua_pushboolean(L, 1);
      +            return 1;
      +        }
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02666)
      +                  "Websocket: Upgrade from HTTP to Websocket failed");
      +    return 0;
      +}
      +
      +static apr_status_t lua_websocket_readbytes(conn_rec* c, char* buffer, 
      +        apr_off_t len) 
      +{
      +    apr_bucket_brigade *brigade = apr_brigade_create(c->pool, c->bucket_alloc);
      +    apr_status_t rv;
      +    rv = ap_get_brigade(c->input_filters, brigade, AP_MODE_READBYTES, 
      +            APR_BLOCK_READ, len);
      +    if (rv == APR_SUCCESS) {
      +        if (!APR_BRIGADE_EMPTY(brigade)) {
      +            apr_bucket* bucket = APR_BRIGADE_FIRST(brigade);
      +            const char* data = NULL;
      +            apr_size_t data_length = 0;
      +            rv = apr_bucket_read(bucket, &data, &data_length, APR_BLOCK_READ);
      +            if (rv == APR_SUCCESS) {
      +                memcpy(buffer, data, len);
      +            }
      +            apr_bucket_delete(bucket);
      +        }
      +    }
      +    apr_brigade_cleanup(brigade);
      +    return rv;
      +}
      +
      +static int lua_websocket_peek(lua_State *L) 
      +{
      +    apr_status_t rv;
      +    apr_bucket_brigade *brigade;
      +    
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    
      +    brigade = apr_brigade_create(r->connection->pool, 
      +            r->connection->bucket_alloc);
      +    rv = ap_get_brigade(r->connection->input_filters, brigade, 
      +            AP_MODE_READBYTES, APR_NONBLOCK_READ, 1);
      +    if (rv == APR_SUCCESS) {
      +        lua_pushboolean(L, 1);
      +    }
      +    else {
      +        lua_pushboolean(L, 0);
      +    }
      +    apr_brigade_cleanup(brigade);
      +    return 1;
      +}
      +
      +static int lua_websocket_read(lua_State *L) 
      +{
      +    apr_socket_t *sock;
      +    apr_status_t rv;
      +    int do_read = 1;
      +    int n = 0;
      +    apr_size_t len = 1;
      +    apr_size_t plen = 0;
      +    unsigned short payload_short = 0;
      +    apr_uint64_t payload_long = 0;
      +    unsigned char *mask_bytes;
      +    char byte;
      +    int plaintext;
      +    
      +    
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    plaintext = ap_lua_ssl_is_https(r->connection) ? 0 : 1;
      +
      +    
      +    mask_bytes = apr_pcalloc(r->pool, 4);
      +    sock = ap_get_conn_socket(r->connection);
      +
      +    while (do_read) { 
      +    do_read = 0;
      +    /* Get opcode and FIN bit */
      +    if (plaintext) {
      +        rv = apr_socket_recv(sock, &byte, &len);
      +    }
      +    else {
      +        rv = lua_websocket_readbytes(r->connection, &byte, 1);
      +    }
      +    if (rv == APR_SUCCESS) {
      +        unsigned char ubyte, fin, opcode, mask, payload;
      +        ubyte = (unsigned char)byte;
      +        /* fin bit is the first bit */
      +        fin = ubyte >> (CHAR_BIT - 1);
      +        /* opcode is the last four bits (there's 3 reserved bits we don't care about) */
      +        opcode = ubyte & 0xf;
      +        
      +        /* Get the payload length and mask bit */
      +        if (plaintext) {
      +            rv = apr_socket_recv(sock, &byte, &len);
      +        }
      +        else {
      +            rv = lua_websocket_readbytes(r->connection, &byte, 1);
      +        }
      +        if (rv == APR_SUCCESS) {
      +            ubyte = (unsigned char)byte;
      +            /* Mask is the first bit */
      +            mask = ubyte >> (CHAR_BIT - 1);
      +            /* Payload is the last 7 bits */
      +            payload = ubyte & 0x7f;
      +            plen = payload;
      +            
      +            /* Extended payload? */
      +            if (payload == 126) {
      +                len = 2;
      +                if (plaintext) {
      +                    /* XXX: apr_socket_recv does not receive len bits, only up to len bits! */
      +                    rv = apr_socket_recv(sock, (char*) &payload_short, &len);
      +                }
      +                else {
      +                    rv = lua_websocket_readbytes(r->connection, 
      +                        (char*) &payload_short, 2);
      +                }
      +                payload_short = ntohs(payload_short);
      +                
      +                if (rv == APR_SUCCESS) {
      +                    plen = payload_short;
      +                }
      +                else {
      +                    return 0;
      +                }
      +            }
      +            /* Super duper extended payload? */
      +            if (payload == 127) {
      +                len = 8;
      +                if (plaintext) {
      +                    rv = apr_socket_recv(sock, (char*) &payload_long, &len);
      +                }
      +                else {
      +                    rv = lua_websocket_readbytes(r->connection, 
      +                            (char*) &payload_long, 8);
      +                }
      +                if (rv == APR_SUCCESS) {
      +                    plen = ap_ntoh64(&payload_long);
      +                }
      +                else {
      +                    return 0;
      +                }
      +            }
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03210)
      +                    "Websocket: Reading %" APR_SIZE_T_FMT " (%s) bytes, masking is %s. %s", 
      +                    plen,
      +                    (payload >= 126) ? "extra payload" : "no extra payload", 
      +                    mask ? "on" : "off", 
      +                    fin ? "This is a final frame" : "more to follow");
      +            if (mask) {
      +                len = 4;
      +                if (plaintext) {
      +                    rv = apr_socket_recv(sock, (char*) mask_bytes, &len);
      +                }
      +                else {
      +                    rv = lua_websocket_readbytes(r->connection, 
      +                            (char*) mask_bytes, 4);
      +                }
      +                if (rv != APR_SUCCESS) {
      +                    return 0;
      +                }
      +            }
      +            if (plen < (HUGE_STRING_LEN*1024) && plen > 0) {
      +                apr_size_t remaining = plen;
      +                apr_size_t received;
      +                apr_off_t at = 0;
      +                char *buffer = apr_palloc(r->pool, plen+1);
      +                buffer[plen] = 0;
      +                
      +                if (plaintext) {
      +                    while (remaining > 0) {
      +                        received = remaining;
      +                        rv = apr_socket_recv(sock, buffer+at, &received);
      +                        if (received > 0 ) {
      +                            remaining -= received;
      +                            at += received;
      +                        }
      +                    }
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, 
      +                    "Websocket: Frame contained %" APR_OFF_T_FMT " bytes, pushed to Lua stack", 
      +                        at);
      +                }
      +                else {
      +                    rv = lua_websocket_readbytes(r->connection, buffer, 
      +                            remaining);
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, 
      +                    "Websocket: SSL Frame contained %" APR_SIZE_T_FMT " bytes, "\
      +                            "pushed to Lua stack", 
      +                        remaining);
      +                }
      +                if (mask) {
      +                    for (n = 0; n < plen; n++) {
      +                        buffer[n] ^= mask_bytes[n%4];
      +                    }
      +                }
      +                
      +                lua_pushlstring(L, buffer, (size_t) plen); /* push to stack */
      +                lua_pushboolean(L, fin); /* push FIN bit to stack as boolean */
      +                return 2;
      +            }
      +            
      +            
      +            /* Decide if we need to react to the opcode or not */
      +            if (opcode == 0x09) { /* ping */
      +                char frame[2];
      +                plen = 2;
      +                frame[0] = 0x8A;
      +                frame[1] = 0;
      +                apr_socket_send(sock, frame, &plen); /* Pong! */
      +                do_read = 1;
      +            }
      +        }
      +    }
      +    }
      +    return 0;
      +}
      +
      +
      +static int lua_websocket_write(lua_State *L) 
      +{
      +    const char *string;
      +    apr_status_t rv;
      +    size_t len;
      +    int raw = 0;
      +    char prelude;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    
      +    if (lua_isboolean(L, 3)) {
      +        raw = lua_toboolean(L, 3);
      +    }
      +    string = lua_tolstring(L, 2, &len);
      +    
      +    if (raw != 1) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03013) 
      +                      "Websocket: Writing framed message to client");
      +        
      +        prelude = 0x81; /* text frame, FIN */
      +        ap_rputc(prelude, r);
      +        if (len < 126) {
      +            ap_rputc(len, r);
      +        } 
      +        else if (len < 65535) {
      +            apr_uint16_t slen = len;
      +            ap_rputc(126, r); 
      +            slen = htons(slen);
      +            ap_rwrite((char*) &slen, 2, r);
      +        }
      +        else {
      +            apr_uint64_t llen = len;
      +            ap_rputc(127, r);
      +            llen = ap_ntoh64(&llen); /* ntoh doubles as hton */
      +            ap_rwrite((char*) &llen, 8, r);
      +        }
      +    }
      +    else {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03014) 
      +                      "Websocket: Writing raw message to client");
      +    }
      +    ap_rwrite(string, len, r);
      +    rv = ap_rflush(r);
      +    if (rv == APR_SUCCESS) {
      +        lua_pushboolean(L, 1);
      +    }
      +    else {
      +        lua_pushboolean(L, 0);
      +    }
      +    return 1;
      +}
      +
      +
      +static int lua_websocket_close(lua_State *L) 
      +{
      +    apr_socket_t *sock;
      +    char prelude[2];
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    
      +    sock = ap_get_conn_socket(r->connection);
      +    
      +    /* Send a header that says: socket is closing. */
      +    prelude[0] = 0x88; /* closing socket opcode */
      +    prelude[1] = 0; /* zero length frame */
      +    ap_rwrite(prelude, 2, r);
      +    
      +    /* Close up tell the MPM and filters to back off */
      +    apr_socket_close(sock);
      +    r->output_filters = NULL;
      +    r->connection->keepalive = AP_CONN_CLOSE;
           return 0;
       }
       
      +static int lua_websocket_ping(lua_State *L) 
      +{
      +    apr_socket_t *sock;
      +    apr_size_t plen;
      +    char prelude[2];
      +    apr_status_t rv;
      +    request_rec *r = ap_lua_check_request_rec(L, 1);
      +    sock = ap_get_conn_socket(r->connection);
      +    
      +    /* Send a header that says: PING. */
      +    prelude[0] = 0x89; /* ping  opcode */
      +    prelude[1] = 0;
      +    plen = 2;
      +    apr_socket_send(sock, prelude, &plen);
      +    
      +    
      +    /* Get opcode and FIN bit from pong */
      +    plen = 2;
      +    rv = apr_socket_recv(sock, prelude, &plen);
      +    if (rv == APR_SUCCESS) {
      +        unsigned char opcode = prelude[0];
      +        unsigned char len = prelude[1];
      +        unsigned char mask = len >> 7;
      +        if (mask) len -= 128;
      +        plen = len;
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03015) 
      +                      "Websocket: Got PONG opcode: %x", opcode);
      +        if (opcode == 0x8A) {
      +            lua_pushboolean(L, 1);
      +        }
      +        else {
      +            lua_pushboolean(L, 0);
      +        }
      +        if (plen > 0) {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, 
      +                          "Websocket: Reading %" APR_SIZE_T_FMT " bytes of PONG", plen);
      +            return 1;
      +        }
      +        if (mask) {
      +            plen = 2;
      +            apr_socket_recv(sock, prelude, &plen);
      +            plen = 2;
      +            apr_socket_recv(sock, prelude, &plen);
      +        }
      +    }
      +    else {
      +        lua_pushboolean(L, 0);
      +    }
      +    return 1;
      +}
      +
      +
       #define APLUA_REQ_TRACE(lev) static int req_trace##lev(lua_State *L)  \
       {                                                               \
      -    req_log_at(L, APLOG_TRACE##lev);                            \
      -    return 0;                                                   \
      +    return req_log_at(L, APLOG_TRACE##lev);                     \
       }
       
       APLUA_REQ_TRACE(1)
      @@ -578,6 +2607,22 @@ static const struct luaL_Reg connection_methods[] = {
           {NULL, NULL}
       };
       
      +static const char* lua_ap_auth_name(request_rec* r)
      +{
      +    const char *name;
      +    name = ap_auth_name(r);
      +    return name ? name : "";
      +}
      +
      +static const char* lua_ap_get_server_name(request_rec* r)
      +{
      +    const char *name;
      +    name = ap_get_server_name(r);
      +    return name ? name : "localhost";
      +}
      +
      +
      +
       
       static const struct luaL_Reg server_methods[] = {
           {NULL, NULL}
      @@ -592,7 +2637,7 @@ static req_fun_t *makefun(const void *fun, int type, apr_pool_t *pool)
           return rft;
       }
       
      -AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
      +void ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
       {
       
           apr_hash_t *dispatch = apr_hash_make(p);
      @@ -603,8 +2648,14 @@ AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
                        makefun(&req_write, APL_REQ_FUNTYPE_LUACFUN, p));
           apr_hash_set(dispatch, "document_root", APR_HASH_KEY_STRING,
                        makefun(&req_document_root, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "context_prefix", APR_HASH_KEY_STRING,
      +                 makefun(&req_context_prefix, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "context_document_root", APR_HASH_KEY_STRING,
      +                 makefun(&req_context_document_root, APL_REQ_FUNTYPE_STRING, p));
           apr_hash_set(dispatch, "parseargs", APR_HASH_KEY_STRING,
                        makefun(&req_parseargs, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "parsebody", APR_HASH_KEY_STRING,
      +                 makefun(&req_parsebody, APL_REQ_FUNTYPE_LUACFUN, p));
           apr_hash_set(dispatch, "debug", APR_HASH_KEY_STRING,
                        makefun(&req_debug, APL_REQ_FUNTYPE_LUACFUN, p));
           apr_hash_set(dispatch, "info", APR_HASH_KEY_STRING,
      @@ -645,6 +2696,8 @@ AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
                        makefun(&req_escape_html, APL_REQ_FUNTYPE_LUACFUN, p));
           apr_hash_set(dispatch, "ssl_var_lookup", APR_HASH_KEY_STRING,
                        makefun(&req_ssl_var_lookup, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "is_https", APR_HASH_KEY_STRING,
      +                 makefun(&req_ssl_is_https_field, APL_REQ_FUNTYPE_BOOLEAN, p));
           apr_hash_set(dispatch, "assbackwards", APR_HASH_KEY_STRING,
                        makefun(&req_assbackwards_field, APL_REQ_FUNTYPE_BOOLEAN, p));
           apr_hash_set(dispatch, "status", APR_HASH_KEY_STRING,
      @@ -681,6 +2734,10 @@ AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
                        makefun(&req_uri_field, APL_REQ_FUNTYPE_STRING, p));
           apr_hash_set(dispatch, "the_request", APR_HASH_KEY_STRING,
                        makefun(&req_the_request_field, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "log_id", APR_HASH_KEY_STRING,
      +                 makefun(&req_log_id_field, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "useragent_ip", APR_HASH_KEY_STRING,
      +                 makefun(&req_useragent_ip_field, APL_REQ_FUNTYPE_STRING, p));
           apr_hash_set(dispatch, "method", APR_HASH_KEY_STRING,
                        makefun(&req_method_field, APL_REQ_FUNTYPE_STRING, p));
           apr_hash_set(dispatch, "proxyreq", APR_HASH_KEY_STRING,
      @@ -695,8 +2752,137 @@ AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
                        makefun(&req_notes, APL_REQ_FUNTYPE_TABLE, p));
           apr_hash_set(dispatch, "subprocess_env", APR_HASH_KEY_STRING,
                        makefun(&req_subprocess_env, APL_REQ_FUNTYPE_TABLE, p));
      -
      -
      +    apr_hash_set(dispatch, "flush", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_rflush, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "port", APR_HASH_KEY_STRING,
      +                 makefun(&req_ap_get_server_port, APL_REQ_FUNTYPE_INT, p));
      +    apr_hash_set(dispatch, "banner", APR_HASH_KEY_STRING,
      +                 makefun(&ap_get_server_banner, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "options", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_options, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "allowoverrides", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_allowoverrides, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "started", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_started, APL_REQ_FUNTYPE_INT, p));
      +    apr_hash_set(dispatch, "basic_auth_pw", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_basic_auth_pw, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "limit_req_body", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_limit_req_body, APL_REQ_FUNTYPE_INT, p));
      +    apr_hash_set(dispatch, "server_built", APR_HASH_KEY_STRING,
      +                 makefun(&ap_get_server_built, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "is_initial_req", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_is_initial_req, APL_REQ_FUNTYPE_BOOLEAN, p));
      +    apr_hash_set(dispatch, "remaining", APR_HASH_KEY_STRING,
      +                 makefun(&req_remaining_field, APL_REQ_FUNTYPE_INT, p));
      +    apr_hash_set(dispatch, "some_auth_required", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_some_auth_required, APL_REQ_FUNTYPE_BOOLEAN, p));
      +    apr_hash_set(dispatch, "server_name", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_get_server_name, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "auth_name", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_auth_name, APL_REQ_FUNTYPE_STRING, p));
      +    apr_hash_set(dispatch, "sendfile", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_sendfile, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "dbacquire", APR_HASH_KEY_STRING,
      +                 makefun(&lua_db_acquire, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "stat", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_stat, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "get_direntries", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_getdir, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "regex", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_regex, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "usleep", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_usleep, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "base64_encode", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_b64encode, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "base64_decode", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_b64decode, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "md5", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_md5, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "sha1", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_sha1, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "htpassword", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_htpassword, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "touch", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_touch, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "mkdir", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_mkdir, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "mkrdir", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_mkrdir, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "rmdir", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_rmdir, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "date_parse_rfc", APR_HASH_KEY_STRING,
      +                 makefun(&lua_apr_date_parse_rfc, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "escape", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_escape, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "unescape", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_unescape, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "mpm_query", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_mpm_query, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "expr", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_expr, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "scoreboard_process", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_scoreboard_process, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "scoreboard_worker", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_scoreboard_worker, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "clock", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_clock, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "requestbody", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_requestbody, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "add_input_filter", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_add_input_filter, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "module_info", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_module_info, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "loaded_modules", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_loaded_modules, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "runtime_dir_relative", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_runtime_dir_relative, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "server_info", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_server_info, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "set_document_root", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_set_document_root, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "set_context_info", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_set_context_info, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "os_escape_path", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_os_escape_path, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "escape_logitem", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_escape_logitem, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "strcmp_match", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_strcmp_match, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "set_keepalive", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_set_keepalive, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "make_etag", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_make_etag, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "send_interim_response", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_send_interim_response, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "custom_response", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_custom_response, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "exists_config_define", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_exists_config_define, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "state_query", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_state_query, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "get_server_name_for_url", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ap_get_server_name_for_url, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "ivm_get", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ivm_get, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "ivm_set", APR_HASH_KEY_STRING,
      +                 makefun(&lua_ivm_set, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "getcookie", APR_HASH_KEY_STRING,
      +                 makefun(&lua_get_cookie, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "setcookie", APR_HASH_KEY_STRING,
      +                 makefun(&lua_set_cookie, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wsupgrade", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_greet, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wsread", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_read, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wspeek", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_peek, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wswrite", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_write, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wsclose", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_close, APL_REQ_FUNTYPE_LUACFUN, p));
      +    apr_hash_set(dispatch, "wsping", APR_HASH_KEY_STRING,
      +                 makefun(&lua_websocket_ping, APL_REQ_FUNTYPE_LUACFUN, p));
      +    
           lua_pushlightuserdata(L, dispatch);
           lua_setfield(L, LUA_REGISTRYINDEX, "Apache2.Request.dispatch");
       
      @@ -726,24 +2912,29 @@ AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p)
       
       }
       
      -AP_LUA_DECLARE(void) ap_lua_push_connection(lua_State *L, conn_rec *c)
      +void ap_lua_push_connection(lua_State *L, conn_rec *c)
       {
      +    req_table_t *t;
           lua_boxpointer(L, c);
           luaL_getmetatable(L, "Apache2.Connection");
           lua_setmetatable(L, -2);
           luaL_getmetatable(L, "Apache2.Connection");
       
      -    ap_lua_push_apr_table(L, c->notes);
      +    t = apr_pcalloc(c->pool, sizeof(req_table_t));
      +    t->t = c->notes;
      +    t->r = NULL;
      +    t->n = "notes";
      +    ap_lua_push_apr_table(L, t);
           lua_setfield(L, -2, "notes");
       
      -    lua_pushstring(L, c->remote_ip);
      -    lua_setfield(L, -2, "remote_ip");
      +    lua_pushstring(L, c->client_ip);
      +    lua_setfield(L, -2, "client_ip");
       
           lua_pop(L, 1);
       }
       
       
      -AP_LUA_DECLARE(void) ap_lua_push_server(lua_State *L, server_rec *s)
      +void ap_lua_push_server(lua_State *L, server_rec *s)
       {
           lua_boxpointer(L, s);
           luaL_getmetatable(L, "Apache2.Server");
      @@ -756,7 +2947,7 @@ AP_LUA_DECLARE(void) ap_lua_push_server(lua_State *L, server_rec *s)
           lua_pop(L, 1);
       }
       
      -AP_LUA_DECLARE(void) ap_lua_push_request(lua_State *L, request_rec *r)
      +void ap_lua_push_request(lua_State *L, request_rec *r)
       {
           lua_boxpointer(L, r);
           luaL_getmetatable(L, "Apache2.Request");
      diff --git a/modules/lua/lua_request.h b/modules/lua/lua_request.h
      index ad272dc98ed..eee6a7a8aaa 100644
      --- a/modules/lua/lua_request.h
      +++ b/modules/lua/lua_request.h
      @@ -15,15 +15,16 @@
        * limitations under the License.
        */
       
      -#include "mod_lua.h"
      -
       #ifndef _LUA_REQUEST_H_
       #define _LUA_REQUEST_H_
       
      -AP_LUA_DECLARE(void) ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p);
      -AP_LUA_DECLARE(void) ap_lua_push_connection(lua_State *L, conn_rec *r);
      -AP_LUA_DECLARE(void) ap_lua_push_server(lua_State *L, server_rec *r);
      -AP_LUA_DECLARE(void) ap_lua_push_request(lua_State *L, request_rec *r);
      +#include "mod_lua.h"
      +#include "util_varbuf.h"
      +
      +void ap_lua_load_request_lmodule(lua_State *L, apr_pool_t *p);
      +void ap_lua_push_connection(lua_State *L, conn_rec *r);
      +void ap_lua_push_server(lua_State *L, server_rec *r);
      +void ap_lua_push_request(lua_State *L, request_rec *r);
       
       #define APL_REQ_FUNTYPE_STRING      1
       #define APL_REQ_FUNTYPE_INT         2
      @@ -38,4 +39,20 @@ typedef struct
       } req_fun_t;
       
       
      +/* Struct to use as userdata for request_rec tables */
      +typedef struct
      +{
      +    request_rec *r; /* Request_rec */
      +    apr_table_t *t; /* apr_table_t* */
      +     char  *n; /* name of table */
      +} req_table_t;
      +
      +typedef struct {
      +    int type;
      +    size_t size;
      +    size_t vb_size;
      +    lua_Number number;
      +    struct ap_varbuf vb;
      +} lua_ivm_object;
      +
       #endif /* !_LUA_REQUEST_H_ */
      diff --git a/modules/lua/lua_vmprep.c b/modules/lua/lua_vmprep.c
      index fb730cfe24b..5a639e0e588 100644
      --- a/modules/lua/lua_vmprep.c
      +++ b/modules/lua/lua_vmprep.c
      @@ -16,13 +16,34 @@
        */
       #include "mod_lua.h"
       #include "http_log.h"
      -#include "apr_reslist.h"
       #include "apr_uuid.h"
       #include "lua_config.h"
       #include "apr_file_info.h"
      +#include "mod_auth.h"
       
       APLOG_USE_MODULE(lua);
       
      +#ifndef AP_LUA_MODULE_EXT
      +#if defined(NETWARE) 
      +#define AP_LUA_MODULE_EXT ".nlm"
      +#elif defined(WIN32)
      +#define AP_LUA_MODULE_EXT ".dll"
      +#elif (defined(__hpux__) || defined(__hpux)) && !defined(__ia64)
      +#define AP_LUA_MODULE_EXT ".sl"
      +#else
      +#define AP_LUA_MODULE_EXT ".so"
      +#endif
      +#endif
      +
      +#if APR_HAS_THREADS
      +    apr_thread_mutex_t *ap_lua_mutex;
      +    
      +void ap_lua_init_mutex(apr_pool_t *pool, server_rec *s) 
      +{
      +    apr_thread_mutex_create(&ap_lua_mutex, APR_THREAD_MUTEX_DEFAULT, pool);
      +}
      +#endif
      +
       /* forward dec'l from this file */
       
       #if 0
      @@ -32,60 +53,66 @@ static void pstack_dump(lua_State *L, apr_pool_t *r, int level,
           int i;
           int top = lua_gettop(L);
       
      -    ap_log_perror(APLOG_MARK, level, 0, r, "Lua Stack Dump: [%s]", msg);
      +    ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03211)
      +                  "Lua Stack Dump: [%s]", msg);
       
           for (i = 1; i <= top; i++) {
               int t = lua_type(L, i);
               switch (t) {
               case LUA_TSTRING:{
      -                ap_log_perror(APLOG_MARK, level, 0, r,
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03212)
                                     "%d:  '%s'", i, lua_tostring(L, i));
                       break;
                   }
               case LUA_TUSERDATA:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  userdata", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03213)
      +                              "%d:  userdata", i);
                       break;
                   }
               case LUA_TLIGHTUSERDATA:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  lightuserdata",
      -                              i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03214)
      +                              "%d:  lightuserdata", i);
                       break;
                   }
               case LUA_TNIL:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  NIL", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03215)
      +                              "%d:  NIL", i);
                       break;
                   }
               case LUA_TNONE:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  None", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03216)
      +                              "%d:  None", i);
                       break;
                   }
               case LUA_TBOOLEAN:{
      -                ap_log_perror(APLOG_MARK, level, 0, r,
      -                              "%d:  %s", i, lua_toboolean(L,
      -                                                          i) ? "true" :
      -                              "false");
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03217)
      +                              "%d:  %s",
      +                              i, lua_toboolean(L, i) ? "true" : "false");
                       break;
                   }
               case LUA_TNUMBER:{
      -                ap_log_perror(APLOG_MARK, level, 0, r,
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03218)
                                     "%d:  %g", i, lua_tonumber(L, i));
                       break;
                   }
               case LUA_TTABLE:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  <table>", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03219)
      +                              "%d:  <table>", i);
                       break;
                   }
               case LUA_TTHREAD:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  <thread>", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03220)
      +                              "%d:  <thread>", i);
                       break;
                   }
               case LUA_TFUNCTION:{
      -                ap_log_perror(APLOG_MARK, level, 0, r, "%d:  <function>", i);
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03221)
      +                              "%d:  <function>", i);
                       break;
                   }
               default:{
      -                ap_log_perror(APLOG_MARK, level, 0, r,
      -                              "%d:  unkown: [%s]", i, lua_typename(L, i));
      +                ap_log_perror(APLOG_MARK, level, 0, r, APLOGNO(03222)
      +                              "%d:  unknown: [%s]", i, lua_typename(L, i));
                       break;
                   }
               }
      @@ -97,7 +124,9 @@ static void pstack_dump(lua_State *L, apr_pool_t *r, int level,
       
       /* BEGIN apache lmodule  */
       
      -AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L)
      +#define makeintegerfield(L, n) lua_pushinteger(L, n); lua_setfield(L, -2, #n)
      +
      +void ap_lua_load_apache2_lmodule(lua_State *L)
       {
           lua_getglobal(L, "package");
           lua_getfield(L, -1, "loaded");
      @@ -107,130 +136,83 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L)
           lua_pop(L, 1);              /* empty stack */
       
           lua_getglobal(L, "apache2");
      -    lua_pushinteger(L, OK);
      -    lua_setfield(L, -2, "OK");
      -
      -    lua_pushinteger(L, DECLINED);
      -    lua_setfield(L, -2, "DECLINED");
      -
      -    lua_pushinteger(L, DONE);
      -    lua_setfield(L, -2, "DONE");
       
           lua_pushstring(L, ap_get_server_banner());
           lua_setfield(L, -2, "version");
       
      -    lua_pushinteger(L, HTTP_MOVED_TEMPORARILY);
      -    lua_setfield(L, -2, "HTTP_MOVED_TEMPORARILY");
      -
      -    lua_pushinteger(L, PROXYREQ_NONE);
      -    lua_setfield(L, -2, "PROXYREQ_NONE");
      -
      -    lua_pushinteger(L, PROXYREQ_PROXY);
      -    lua_setfield(L, -2, "PROXYREQ_PROXY");
      -
      -    lua_pushinteger(L, PROXYREQ_REVERSE);
      -    lua_setfield(L, -2, "PROXYREQ_REVERSE");
      -
      -    lua_pushinteger(L, PROXYREQ_RESPONSE);
      -    lua_setfield(L, -2, "PROXYREQ_RESPONSE");
      -
      +    makeintegerfield(L, OK);
      +    makeintegerfield(L, DECLINED);
      +    makeintegerfield(L, DONE);
      +    makeintegerfield(L, HTTP_MOVED_TEMPORARILY);
      +    makeintegerfield(L, PROXYREQ_NONE);
      +    makeintegerfield(L, PROXYREQ_PROXY);
      +    makeintegerfield(L, PROXYREQ_REVERSE);
      +    makeintegerfield(L, PROXYREQ_RESPONSE);
      +    makeintegerfield(L, PROXYREQ_RESPONSE);
      +    makeintegerfield(L, AUTHZ_DENIED);
      +    makeintegerfield(L, AUTHZ_GRANTED);
      +    makeintegerfield(L, AUTHZ_NEUTRAL);
      +    makeintegerfield(L, AUTHZ_GENERAL_ERROR);
      +    makeintegerfield(L, AUTHZ_DENIED_NO_USER);
      +    
           /*
      -       lua_pushinteger(L, HTTP_CONTINUE);
      -       lua_setfield(L, -2, "HTTP_CONTINUE");
      -       lua_pushinteger(L, HTTP_SWITCHING_PROTOCOLS);
      -       lua_setfield(L, -2, "HTTP_SWITCHING_PROTOCOLS");
      -       lua_pushinteger(L, HTTP_PROCESSING);
      -       lua_setfield(L, -2, "HTTP_PROCESSING");
      -       lua_pushinteger(L, HTTP_OK);
      -       lua_setfield(L, -2, "HTTP_OK");
      -       lua_pushinteger(L, HTTP_CREATED);
      -       lua_setfield(L, -2, "HTTP_CREATED");
      -       lua_pushinteger(L, HTTP_ACCEPTED);
      -       lua_setfield(L, -2, "HTTP_ACCEPTED");
      -       lua_pushinteger(L, HTTP_NON_AUTHORITATIVE);
      -       lua_setfield(L, -2, "HTTP_NON_AUTHORITATIVE");
      -       lua_pushinteger(L, HTTP_NO_CONTENT);
      -       lua_setfield(L, -2, "HTTP_NO_CONTENT");
      -       lua_pushinteger(L, HTTP_RESET_CONTENT);
      -       lua_setfield(L, -2, "HTTP_RESET_CONTENT");
      -       lua_pushinteger(L, HTTP_PARTIAL_CONTENT);
      -       lua_setfield(L, -2, "HTTP_PARTIAL_CONTENT");
      -       lua_pushinteger(L, HTTP_MULTI_STATUS);
      -       lua_setfield(L, -2, "HTTP_MULTI_STATUS");
      -       lua_pushinteger(L, HTTP_MULTIPLE_CHOICES);
      -       lua_setfield(L, -2, "HTTP_MULTIPLE_CHOICES");
      -       lua_pushinteger(L, HTTP_MOVED_PERMANENTLY);
      -       lua_setfield(L, -2, "HTTP_MOVED_PERMANENTLY");
      -       lua_pushinteger(L, HTTP_SEE_OTHER);
      -       lua_setfield(L, -2, "HTTP_SEE_OTHER");
      -       lua_pushinteger(L, HTTP_NOT_MODIFIED);
      -       lua_setfield(L, -2, "HTTP_NOT_MODIFIED");
      -       lua_pushinteger(L, HTTP_USE_PROXY);
      -       lua_setfield(L, -2, "HTTP_USE_PROXY");
      -       lua_pushinteger(L, HTTP_TEMPORARY_REDIRECT);
      -       lua_setfield(L, -2, "HTTP_TEMPORARY_REDIRECT");
      -       lua_pushinteger(L, HTTP_BAD_REQUEST);
      -       lua_setfield(L, -2, "HTTP_BAD_REQUEST");
      -       lua_pushinteger(L, HTTP_UNAUTHORIZED);
      -       lua_setfield(L, -2, "HTTP_UNAUTHORIZED");
      -       lua_pushinteger(L, HTTP_PAYMENT_REQUIRED);
      -       lua_setfield(L, -2, "HTTP_PAYMENT_REQUIRED");
      -       lua_pushinteger(L, HTTP_FORBIDDEN);
      -       lua_setfield(L, -2, "HTTP_FORBIDDEN");
      -       lua_pushinteger(L, HTTP_NOT_FOUND);
      -       lua_setfield(L, -2, "HTTP_NOT_FOUND");
      -       lua_pushinteger(L, HTTP_METHOD_NOT_ALLOWED);
      -       lua_setfield(L, -2, "HTTP_METHOD_NOT_ALLOWED");
      -       lua_pushinteger(L, HTTP_NOT_ACCEPTABLE);
      -       lua_setfield(L, -2, "HTTP_NOT_ACCEPTABLE");
      -       lua_pushinteger(L, HTTP_PROXY_AUTHENTICATION_REQUIRED);
      -       lua_setfield(L, -2, "HTTP_PROXY_AUTHENTICATION_REQUIRED");
      -       lua_pushinteger(L, HTTP_REQUEST_TIME_OUT);
      -       lua_setfield(L, -2, "HTTP_REQUEST_TIME_OUT");
      -       lua_pushinteger(L, HTTP_CONFLICT);
      -       lua_setfield(L, -2, "HTTP_CONFLICT");
      -       lua_pushinteger(L, HTTP_GONE);
      -       lua_setfield(L, -2, "HTTP_GONE");
      -       lua_pushinteger(L, HTTP_LENGTH_REQUIRED);
      -       lua_setfield(L, -2, "HTTP_LENGTH_REQUIRED");
      -       lua_pushinteger(L, HTTP_PRECONDITION_FAILED);
      -       lua_setfield(L, -2, "HTTP_PRECONDITION_FAILED");
      -       lua_pushinteger(L, HTTP_REQUEST_ENTITY_TOO_LARGE);
      -       lua_setfield(L, -2, "HTTP_REQUEST_ENTITY_TOO_LARGE");
      -       lua_pushinteger(L, HTTP_REQUEST_URI_TOO_LARGE);
      -       lua_setfield(L, -2, "HTTP_REQUEST_URI_TOO_LARGE");
      -       lua_pushinteger(L, HTTP_UNSUPPORTED_MEDIA_TYPE);
      -       lua_setfield(L, -2, "HTTP_UNSUPPORTED_MEDIA_TYPE");
      -       lua_pushinteger(L, HTTP_RANGE_NOT_SATISFIABLE);
      -       lua_setfield(L, -2, "HTTP_RANGE_NOT_SATISFIABLE");
      -       lua_pushinteger(L, HTTP_EXPECTATION_FAILED);
      -       lua_setfield(L, -2, "HTTP_EXPECTATION_FAILED");
      -       lua_pushinteger(L, HTTP_UNPROCESSABLE_ENTITY);
      -       lua_setfield(L, -2, "HTTP_UNPROCESSABLE_ENTITY");
      -       lua_pushinteger(L, HTTP_LOCKED);
      -       lua_setfield(L, -2, "HTTP_LOCKED");
      -       lua_pushinteger(L, HTTP_FAILED_DEPENDENCY);
      -       lua_setfield(L, -2, "HTTP_FAILED_DEPENDENCY");
      -       lua_pushinteger(L, HTTP_UPGRADE_REQUIRED);
      -       lua_setfield(L, -2, "HTTP_UPGRADE_REQUIRED");
      -       lua_pushinteger(L, HTTP_INTERNAL_SERVER_ERROR);
      -       lua_setfield(L, -2, "HTTP_INTERNAL_SERVER_ERROR");
      -       lua_pushinteger(L, HTTP_NOT_IMPLEMENTED);
      -       lua_setfield(L, -2, "HTTP_NOT_IMPLEMENTED");
      -       lua_pushinteger(L, HTTP_BAD_GATEWAY);
      -       lua_setfield(L, -2, "HTTP_BAD_GATEWAY");
      -       lua_pushinteger(L, HTTP_SERVICE_UNAVAILABLE);
      -       lua_setfield(L, -2, "HTTP_SERVICE_UNAVAILABLE");
      -       lua_pushinteger(L, HTTP_GATEWAY_TIME_OUT);
      -       lua_setfield(L, -2, "HTTP_GATEWAY_TIME_OUT");
      -       lua_pushinteger(L, HTTP_VERSION_NOT_SUPPORTED);
      -       lua_setfield(L, -2, "HTTP_VERSION_NOT_SUPPORTED");
      -       lua_pushinteger(L, HTTP_VARIANT_ALSO_VARIES);
      -       lua_setfield(L, -2, "HTTP_VARIANT_ALSO_VARIES");
      -       lua_pushinteger(L, HTTP_INSUFFICIENT_STORAGE);
      -       lua_setfield(L, -2, "HTTP_INSUFFICIENT_STORAGE");
      -       lua_pushinteger(L, HTTP_NOT_EXTENDED);
      -       lua_setfield(L, -2, "HTTP_NOT_EXTENDED");
      +       makeintegerfield(L, HTTP_CONTINUE);
      +       makeintegerfield(L, HTTP_SWITCHING_PROTOCOLS);
      +       makeintegerfield(L, HTTP_PROCESSING);
      +       makeintegerfield(L, HTTP_OK);
      +       makeintegerfield(L, HTTP_CREATED);
      +       makeintegerfield(L, HTTP_ACCEPTED);
      +       makeintegerfield(L, HTTP_NON_AUTHORITATIVE);
      +       makeintegerfield(L, HTTP_NO_CONTENT);
      +       makeintegerfield(L, HTTP_RESET_CONTENT);
      +       makeintegerfield(L, HTTP_PARTIAL_CONTENT);
      +       makeintegerfield(L, HTTP_MULTI_STATUS);
      +       makeintegerfield(L, HTTP_ALREADY_REPORTED);
      +       makeintegerfield(L, HTTP_IM_USED);
      +       makeintegerfield(L, HTTP_MULTIPLE_CHOICES);
      +       makeintegerfield(L, HTTP_MOVED_PERMANENTLY);
      +       makeintegerfield(L, HTTP_MOVED_TEMPORARILY);
      +       makeintegerfield(L, HTTP_SEE_OTHER);
      +       makeintegerfield(L, HTTP_NOT_MODIFIED);
      +       makeintegerfield(L, HTTP_USE_PROXY);
      +       makeintegerfield(L, HTTP_TEMPORARY_REDIRECT);
      +       makeintegerfield(L, HTTP_PERMANENT_REDIRECT);
      +       makeintegerfield(L, HTTP_BAD_REQUEST);
      +       makeintegerfield(L, HTTP_UNAUTHORIZED);
      +       makeintegerfield(L, HTTP_PAYMENT_REQUIRED);
      +       makeintegerfield(L, HTTP_FORBIDDEN);
      +       makeintegerfield(L, HTTP_NOT_FOUND);
      +       makeintegerfield(L, HTTP_METHOD_NOT_ALLOWED);
      +       makeintegerfield(L, HTTP_NOT_ACCEPTABLE);
      +       makeintegerfield(L, HTTP_PROXY_AUTHENTICATION_REQUIRED);
      +       makeintegerfield(L, HTTP_REQUEST_TIME_OUT);
      +       makeintegerfield(L, HTTP_CONFLICT);
      +       makeintegerfield(L, HTTP_GONE);
      +       makeintegerfield(L, HTTP_LENGTH_REQUIRED);
      +       makeintegerfield(L, HTTP_PRECONDITION_FAILED);
      +       makeintegerfield(L, HTTP_REQUEST_ENTITY_TOO_LARGE);
      +       makeintegerfield(L, HTTP_REQUEST_URI_TOO_LARGE);
      +       makeintegerfield(L, HTTP_UNSUPPORTED_MEDIA_TYPE);
      +       makeintegerfield(L, HTTP_RANGE_NOT_SATISFIABLE);
      +       makeintegerfield(L, HTTP_EXPECTATION_FAILED);
      +       makeintegerfield(L, HTTP_UNPROCESSABLE_ENTITY);
      +       makeintegerfield(L, HTTP_LOCKED);
      +       makeintegerfield(L, HTTP_FAILED_DEPENDENCY);
      +       makeintegerfield(L, HTTP_UPGRADE_REQUIRED);
      +       makeintegerfield(L, HTTP_PRECONDITION_REQUIRED);
      +       makeintegerfield(L, HTTP_TOO_MANY_REQUESTS);
      +       makeintegerfield(L, HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE);
      +       makeintegerfield(L, HTTP_INTERNAL_SERVER_ERROR);
      +       makeintegerfield(L, HTTP_NOT_IMPLEMENTED);
      +       makeintegerfield(L, HTTP_BAD_GATEWAY);
      +       makeintegerfield(L, HTTP_SERVICE_UNAVAILABLE);
      +       makeintegerfield(L, HTTP_GATEWAY_TIME_OUT);
      +       makeintegerfield(L, HTTP_VERSION_NOT_SUPPORTED);
      +       makeintegerfield(L, HTTP_VARIANT_ALSO_VARIES);
      +       makeintegerfield(L, HTTP_INSUFFICIENT_STORAGE);
      +       makeintegerfield(L, HTTP_LOOP_DETECTED);
      +       makeintegerfield(L, HTTP_NOT_EXTENDED);
      +       makeintegerfield(L, HTTP_NETWORK_AUTHENTICATION_REQUIRED);
            */
       }
       
      @@ -241,10 +223,38 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L)
       /* callback for cleaning up a lua vm when pool is closed */
       static apr_status_t cleanup_lua(void *l)
       {
      +    AP_DEBUG_ASSERT(l != NULL);
           lua_close((lua_State *) l);
           return APR_SUCCESS;
       }
       
      +static apr_status_t server_cleanup_lua(void *resource)
      +{
      +    ap_lua_server_spec* spec = (ap_lua_server_spec*) resource;
      +    AP_DEBUG_ASSERT(spec != NULL);
      +    if (spec->L != NULL) {
      +        lua_close((lua_State *) spec->L);
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +/*
      +        munge_path(L, 
      +                   "path", 
      +                   "?.lua", 
      +                   "./?.lua", 
      +                   lifecycle_pool,
      +                   spec->package_paths, 
      +                   spec->file);
      +*/
      +/**
      + * field -> "path" or "cpath"
      + * sub_pat -> "?.lua"
      + * rep_pat -> "./?.lua"
      + * pool -> lifecycle pool for allocations
      + * paths -> things to add
      + * file -> ???
      + */
       static void munge_path(lua_State *L,
                              const char *field,
                              const char *sub_pat,
      @@ -261,17 +271,24 @@ static void munge_path(lua_State *L,
       
           lua_getglobal(L, "package");
           lua_getfield(L, -1, field);
      +    
           current = lua_tostring(L, -1);
      +
           parent_dir = ap_make_dirstr_parent(pool, file);
      + 
           pattern = apr_pstrcat(pool, parent_dir, sub_pat, NULL);
      +
           luaL_gsub(L, current, rep_pat, pattern);
           lua_setfield(L, -3, field);
           lua_getfield(L, -2, field);
           modified = lua_tostring(L, -1);
      +
      +
           lua_pop(L, 2);
       
      -    part = apr_pstrcat(pool, modified, apr_array_pstrcat(pool, paths, ';'),
      +    part = apr_pstrcat(pool, modified, ";", apr_array_pstrcat(pool, paths, ';'),
                              NULL);
      +
           lua_pushstring(L, part);
           lua_setfield(L, -2, field);
           lua_pop(L, 1);              /* pop "package" off the stack     */
      @@ -285,7 +302,7 @@ static int loadjitmodule(lua_State *L, apr_pool_t *lifecycle_pool) {
           lua_concat(L, 2);
           if (lua_pcall(L, 1, 1, 0)) {
               const char *msg = lua_tostring(L, -1);
      -        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool,
      +        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01480)
                             "Failed to init LuaJIT: %s", msg);
               return 1;
           }
      @@ -296,7 +313,7 @@ static int loadjitmodule(lua_State *L, apr_pool_t *lifecycle_pool) {
       
       #endif
       
      -static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_pool)
      +static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifecycle_pool)
       {
           lua_State* L;
       
      @@ -308,12 +325,18 @@ static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_
       #endif
           luaL_openlibs(L);
           if (spec->package_paths) {
      -        munge_path(L, "path", "?.lua", "./?.lua", lifecycle_pool,
      -            spec->package_paths, spec->file);
      +        munge_path(L, 
      +                   "path", "?.lua", "./?.lua", 
      +                   lifecycle_pool,
      +                   spec->package_paths, 
      +                   spec->file);
           }
           if (spec->package_cpaths) {
      -        munge_path(L, "cpath", "?.so", "./?.so", lifecycle_pool,
      -            spec->package_cpaths, spec->file);
      +        munge_path(L,
      +                   "cpath", "?" AP_LUA_MODULE_EXT, "./?" AP_LUA_MODULE_EXT,
      +                   lifecycle_pool,
      +                   spec->package_cpaths,
      +                   spec->file);
           }
       
           if (spec->cb) {
      @@ -327,31 +350,22 @@ static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_
           }
           else {
               int rc;
      -        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool,
      +        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01481)
                   "loading lua file %s", spec->file);
               rc = luaL_loadfile(L, spec->file);
               if (rc != 0) {
      -            char *err;
      -            switch (rc) {
      -                case LUA_ERRSYNTAX:
      -                    err = "syntax error";
      -                    break;
      -                case LUA_ERRMEM:
      -                    err = "memory allocation error";
      -                    break;
      -                case LUA_ERRFILE:
      -                    err = "error opening or reading file";
      -                    break;
      -                default:
      -                    err = "unknown error";
      -                    break;
      -            }
      -            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool,
      -                "Loading lua file %s: %s",
      -                spec->file, err);
      +            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(01482)
      +                          "Error loading %s: %s", spec->file,
      +                          rc == LUA_ERRMEM ? "memory allocation error"
      +                                           : lua_tostring(L, 0));
      +            return APR_EBADF;
      +        }
      +        if ( lua_pcall(L, 0, LUA_MULTRET, 0) == LUA_ERRRUN ) {
      +            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(02613)
      +                          "Error loading %s: %s", spec->file,
      +                            lua_tostring(L, -1));
                   return APR_EBADF;
               }
      -        lua_pcall(L, 0, LUA_MULTRET, 0);
           }
       
       #ifdef AP_ENABLE_LUAJIT
      @@ -364,78 +378,154 @@ static apr_status_t vm_construct(void **vm, void *params, apr_pool_t *lifecycle_
           return APR_SUCCESS;
       }
       
      -static apr_status_t vm_destruct(void *vm, void *params, apr_pool_t *pool)
      -{
      -    lua_State *L = (lua_State *)vm;
      -
      -    (void)params;
      -    (void)pool;
      -
      -    cleanup_lua(L);
      -
      -    return APR_SUCCESS;
      -}
      -
      -static apr_status_t vm_release(void *vm)
      +static ap_lua_vm_spec* copy_vm_spec(apr_pool_t* pool, ap_lua_vm_spec* spec) 
       {
      -    apr_reslist_t* reslist;
      -    lua_pushlightuserdata(vm,vm);
      -    lua_rawget(vm,LUA_REGISTRYINDEX);
      -    reslist = (apr_reslist_t*)lua_topointer(vm,-1);
      -
      -    return apr_reslist_release(reslist, vm);
      +    ap_lua_vm_spec* copied_spec = apr_pcalloc(pool, sizeof(ap_lua_vm_spec));
      +    copied_spec->bytecode_len = spec->bytecode_len;
      +    copied_spec->bytecode = apr_pstrdup(pool, spec->bytecode);
      +    copied_spec->cb = spec->cb;
      +    copied_spec->cb_arg = NULL;
      +    copied_spec->file = apr_pstrdup(pool, spec->file);
      +    copied_spec->package_cpaths = apr_array_copy(pool, spec->package_cpaths);
      +    copied_spec->package_paths = apr_array_copy(pool, spec->package_paths);
      +    copied_spec->pool = pool;
      +    copied_spec->scope = AP_LUA_SCOPE_SERVER;
      +    copied_spec->codecache = spec->codecache;
      +    return copied_spec;
       }
       
      -static apr_status_t vm_reslist_destroy(void *data)
      +static apr_status_t server_vm_construct(lua_State **resource, void *params, apr_pool_t *pool)
       {
      -    return apr_reslist_destroy(data);
      +    lua_State* L;
      +    ap_lua_server_spec* spec = apr_pcalloc(pool, sizeof(ap_lua_server_spec));
      +    *resource = NULL;
      +    if (vm_construct(&L, params, pool) == APR_SUCCESS) {
      +        spec->finfo = apr_pcalloc(pool, sizeof(ap_lua_finfo));
      +        if (L != NULL) {
      +            spec->L = L;
      +            *resource = (void*) spec;
      +            lua_pushlightuserdata(L, spec);
      +            lua_setfield(L, LUA_REGISTRYINDEX, "Apache2.Lua.server_spec");
      +            return APR_SUCCESS;
      +        }
      +    }
      +    return APR_EGENERAL;
       }
       
      -AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
      -                                               ap_lua_vm_spec *spec)
      +/**
      + * Function used to create a lua_State instance bound into the web
      + * server in the appropriate scope.
      + */
      +lua_State *ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
      +                                               ap_lua_vm_spec *spec, request_rec* r)
       {
           lua_State *L = NULL;
      -
      -    if (spec->scope == APL_SCOPE_SERVER) {
      -        apr_reslist_t *reslist;
      -
      -        if (apr_pool_userdata_get((void **)&reslist,
      -                                  "mod_lua", spec->pool) == APR_SUCCESS) {
      -            if(reslist==NULL) {
      -                if(apr_reslist_create(&reslist,
      -                                      spec->vm_server_pool_min,
      -                                      spec->vm_server_pool_max,
      -                                      spec->vm_server_pool_max,
      -                                      0,
      -                                      vm_construct,
      -                                      vm_destruct,
      -                                      spec,
      -                                      spec->pool) != APR_SUCCESS)
      +    ap_lua_finfo *cache_info = NULL;
      +    int tryCache = 0;
      +    
      +    if (spec->scope == AP_LUA_SCOPE_SERVER) {
      +        char *hash;
      +        apr_reslist_t* reslist = NULL;
      +        ap_lua_server_spec* sspec = NULL;
      +        hash = apr_psprintf(r->pool, "reslist:%s", spec->file);
      +#if APR_HAS_THREADS
      +        apr_thread_mutex_lock(ap_lua_mutex);
      +#endif
      +        if (apr_pool_userdata_get((void **)&reslist, hash,
      +                                  r->server->process->pool) == APR_SUCCESS) {
      +            if (reslist != NULL) {
      +                if (apr_reslist_acquire(reslist, (void**) &sspec) == APR_SUCCESS) {
      +                    L = sspec->L;
      +                    cache_info = sspec->finfo;
      +                }
      +            }
      +        }
      +        if (L == NULL) {
      +            ap_lua_vm_spec* server_spec = copy_vm_spec(r->server->process->pool, spec);
      +            if (
      +                    apr_reslist_create(&reslist, spec->vm_min, spec->vm_max, spec->vm_max, 0, 
      +                                (apr_reslist_constructor) server_vm_construct, 
      +                                (apr_reslist_destructor) server_cleanup_lua, 
      +                                server_spec, r->server->process->pool)
      +                    == APR_SUCCESS && reslist != NULL) {
      +                apr_pool_userdata_set(reslist, hash, NULL,
      +                                            r->server->process->pool);
      +                if (apr_reslist_acquire(reslist, (void**) &sspec) == APR_SUCCESS) {
      +                    L = sspec->L;
      +                    cache_info = sspec->finfo;
      +                }
      +                else {
                           return NULL;
      -
      -                apr_pool_userdata_set(reslist, "mod_lua",
      -                                      vm_reslist_destroy, spec->pool);
      +                }
                   }
      -            apr_reslist_acquire(reslist, (void **)&L);
      -            lua_pushlightuserdata(L, L);
      -            lua_pushlightuserdata(L, reslist);
      -            lua_rawset(L,LUA_REGISTRYINDEX);
      -            apr_pool_userdata_set(L, spec->file, vm_release, lifecycle_pool);
               }
      -    } else {
      +#if APR_HAS_THREADS
      +        apr_thread_mutex_unlock(ap_lua_mutex);
      +#endif
      +    }
      +    else {
               if (apr_pool_userdata_get((void **)&L, spec->file,
      -                                  lifecycle_pool) == APR_SUCCESS) {
      -
      -            if(L==NULL) {
      -                ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool,
      -                              "creating lua_State with file %s", spec->file);
      -                /* not available, so create */
      +                              lifecycle_pool) != APR_SUCCESS) {
      +            L = NULL;
      +        }
      +    }
      +    if (L == NULL) {
      +        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(01483)
      +                        "creating lua_State with file %s", spec->file);
      +        /* not available, so create */
      +
      +        if (!vm_construct(&L, spec, lifecycle_pool)) {
      +            AP_DEBUG_ASSERT(L != NULL);
      +            apr_pool_userdata_set(L, spec->file, cleanup_lua, lifecycle_pool);
      +        }
      +    }
       
      -                if(!vm_construct((void **)&L, spec, lifecycle_pool))
      -                    apr_pool_userdata_set(L, spec->file, cleanup_lua,
      -                                          lifecycle_pool);
      +    if (spec->codecache == AP_LUA_CACHE_FOREVER || (spec->bytecode && spec->bytecode_len > 0)) {
      +        tryCache = 1;
      +    }
      +    else {
      +        char* mkey;
      +        if (spec->scope != AP_LUA_SCOPE_SERVER) {
      +            mkey = apr_psprintf(r->pool, "ap_lua_modified:%s", spec->file);
      +            apr_pool_userdata_get((void **)&cache_info, mkey, lifecycle_pool);
      +            if (cache_info == NULL) {
      +                cache_info = apr_pcalloc(lifecycle_pool, sizeof(ap_lua_finfo));
      +                apr_pool_userdata_set((void*) cache_info, mkey, NULL, lifecycle_pool);
                   }
               }
      +        if (spec->codecache == AP_LUA_CACHE_STAT) {
      +            apr_finfo_t lua_finfo;
      +            apr_stat(&lua_finfo, spec->file, APR_FINFO_MTIME|APR_FINFO_SIZE, lifecycle_pool);
      +
      +            /* On first visit, modified will be zero, but that's fine - The file is 
      +            loaded in the vm_construct function.
      +            */
      +            if ((cache_info->modified == lua_finfo.mtime && cache_info->size == lua_finfo.size)
      +                    || cache_info->modified == 0) {
      +                tryCache = 1;
      +            }
      +            cache_info->modified = lua_finfo.mtime;
      +            cache_info->size = lua_finfo.size;
      +        }
      +        else if (spec->codecache == AP_LUA_CACHE_NEVER) {
      +            if (cache_info->runs == 0)
      +                tryCache = 1;
      +        }
      +        cache_info->runs++;
      +    }
      +    if (tryCache == 0 && spec->scope != AP_LUA_SCOPE_ONCE) {
      +        int rc;
      +        ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool, APLOGNO(02332)
      +            "(re)loading lua file %s", spec->file);
      +        rc = luaL_loadfile(L, spec->file);
      +        if (rc != 0) {
      +            ap_log_perror(APLOG_MARK, APLOG_ERR, 0, lifecycle_pool, APLOGNO(02333)
      +                          "Error loading %s: %s", spec->file,
      +                          rc == LUA_ERRMEM ? "memory allocation error"
      +                                           : lua_tostring(L, 0));
      +            return 0;
      +        }
      +        lua_pcall(L, 0, LUA_MULTRET, 0);
           }
       
           return L;
      diff --git a/modules/lua/lua_vmprep.h b/modules/lua/lua_vmprep.h
      index c2ca8d21cfd..e46ac9b884f 100644
      --- a/modules/lua/lua_vmprep.h
      +++ b/modules/lua/lua_vmprep.h
      @@ -29,60 +29,49 @@
       #include "apr_file_info.h"
       #include "apr_time.h"
       #include "apr_pools.h"
      +#include "apr_reslist.h"
       
       
       #ifndef VMPREP_H
       #define VMPREP_H
       
      -#define APL_CODE_CACHE_STAT     1
      -#define APL_CODE_CACHE_FOREVER  2
      -#define APL_CODE_CACHE_NEVER    3
      +#define AP_LUA_SCOPE_UNSET         0
      +#define AP_LUA_SCOPE_ONCE          1
      +#define AP_LUA_SCOPE_REQUEST       2
      +#define AP_LUA_SCOPE_CONN          3
      +#define AP_LUA_SCOPE_THREAD        4
      +#define AP_LUA_SCOPE_SERVER        5
       
      -#define APL_SCOPE_ONCE          1
      -#define APL_SCOPE_REQUEST       2
      -#define APL_SCOPE_CONN          3
      -#define APL_SCOPE_SERVER        4
      +#define AP_LUA_CACHE_UNSET         0
      +#define AP_LUA_CACHE_NEVER         1
      +#define AP_LUA_CACHE_STAT          2
      +#define AP_LUA_CACHE_FOREVER       3
       
      -
      -/**
      - * the ap_lua_?getvm family of functions is used to create and/or obtain
      - * a handle to a lua state. If there is not an extant vm matching the
      - * spec then a new one is created.
      - */
      -/* lua_State* ap_lua_rgetvm(request_rec *r, ap_lua_vm_spec *spec); */
      -
      -/* returns NULL if the spec requires a request scope */
      -/* lua_State* ap_lua_cgetvm(conn_rec *r, ap_lua_vm_spec *spec);*/
      -
      -/* returns NULL if the spec requires a request scope or conn scope */
      -/* lua_State* ap_lua_sgetvm(server_rec *r, ap_lua_vm_spec *spec); */
      +#define AP_LUA_FILTER_INPUT        1
      +#define AP_LUA_FILTER_OUTPUT       2
       
       typedef void (*ap_lua_state_open_callback) (lua_State *L, apr_pool_t *p,
                                                    void *ctx);
      -
       /**
        * Specification for a lua virtual machine
        */
       typedef struct
       {
      -
           /* NEED TO ADD ADDITIONAL PACKAGE PATHS AS PART OF SPEC INSTEAD OF DIR CONFIG */
           apr_array_header_t *package_paths;
           apr_array_header_t *package_cpaths;
       
           /* name of base file to load in the vm */
      -    char *file;
      -
      -    /* APL_CODE_CACHE_STAT | APL_CODE_CACHE_FOREVER | APL_CODE_CACHE_NEVER */
      -    int code_cache_style;
      +    const char *file;
       
      -    /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER */
      +    /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD | APL_SCOPE_SERVER */
           int scope;
      -        unsigned int vm_server_pool_min;
      -        unsigned int vm_server_pool_max;
      +    unsigned int vm_min;
      +    unsigned int vm_max;
      +
      +    ap_lua_state_open_callback cb;
      +    void* cb_arg;
       
      -        ap_lua_state_open_callback cb;
      -        void* cb_arg;
           /* pool to use for lifecycle if APL_SCOPE_ONCE is set, otherwise unused */
           apr_pool_t *pool;
       
      @@ -92,36 +81,44 @@ typedef struct
            */
           const char *bytecode;
           apr_size_t bytecode_len;
      +    
      +    int codecache;
       } ap_lua_vm_spec;
       
       typedef struct
       {
      -    int code_cache_style;
      -    char *function_name;
      -    char *file_name;
      +    const char *function_name;
      +    const char *file_name;
           int scope;
           ap_regex_t *uri_pattern;
           const char *bytecode;
           apr_size_t bytecode_len;
      +    int codecache;
       } ap_lua_mapped_handler_spec;
       
       typedef struct
       {
      -    apr_pool_t *pool;
      -    apr_hash_t *compiled_files;
      -    apr_thread_rwlock_t *compiled_files_lock;
      -} ap_lua_code_cache;
      -
      -/* remove and make static once out of mod_wombat.c */
      -AP_LUA_DECLARE(void) ap_lua_openlibs(lua_State *L);
      -
      -/* remove and make static once out of mod_wombat.c */
      -AP_LUA_DECLARE(void) ap_lua_registerlib(lua_State *L, char *name, lua_CFunction f);
      +    const char *function_name;
      +    const char *file_name;
      +    const char* filter_name;
      +    int         direction; /* AP_LUA_FILTER_INPUT | AP_LUA_FILTER_OUTPUT */
      +} ap_lua_filter_handler_spec;
      +
      +typedef struct {
      +    apr_size_t runs;
      +    apr_time_t modified;
      +    apr_off_t  size;
      +} ap_lua_finfo;
      +
      +typedef struct {
      +    lua_State* L;
      +    ap_lua_finfo* finfo;
      +} ap_lua_server_spec;
       
       /**
        * Fake out addition of the "apache2" module
        */
      -AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L);
      +void ap_lua_load_apache2_lmodule(lua_State *L);
       
       /*
        * alternate means of getting lua_State (preferred eventually)
      @@ -135,9 +132,16 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L);
        * @cb callback for vm initialization called *before* the file is opened
        * @ctx a baton passed to cb
        */
      -AP_LUA_DECLARE(lua_State*) ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
      -                                                ap_lua_vm_spec *spec);
      -
      +lua_State *ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
      +                                                ap_lua_vm_spec *spec, request_rec* r);
       
      +#if APR_HAS_THREADS || defined(DOXYGEN)
      +/*
      + * Initialize mod_lua mutex.
      + * @pool pool for mutex
      + * @s server_rec for logging
      + */
      +void ap_lua_init_mutex(apr_pool_t *pool, server_rec *s);
      +#endif
       
       #endif
      diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c
      index a3adf4a5d04..3add43648d4 100644
      --- a/modules/lua/mod_lua.c
      +++ b/modules/lua/mod_lua.c
      @@ -19,11 +19,32 @@
       #include <string.h>
       #include <stdlib.h>
       #include <ctype.h>
      -
      +#include <apr_thread_mutex.h>
      +#include <apr_pools.h>
       #include "lua_apr.h"
       #include "lua_config.h"
       #include "apr_optional.h"
       #include "mod_ssl.h"
      +#include "mod_auth.h"
      +#include "util_mutex.h"
      +
      +
      +#ifdef APR_HAS_THREADS
      +#include "apr_thread_proc.h"
      +#endif
      +
      +/* getpid for *NIX */
      +#if APR_HAVE_SYS_TYPES_H
      +#include <sys/types.h>
      +#endif
      +#if APR_HAVE_UNISTD_H
      +#include <unistd.h>
      +#endif
      +
      +/* getpid for Windows */
      +#if APR_HAVE_PROCESS_H
      +#include <process.h>
      +#endif
       
       APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_open,
                                           (lua_State *L, apr_pool_t *p),
      @@ -33,12 +54,46 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ap_lua, AP_LUA, int, lua_request,
                                           (lua_State *L, request_rec *r),
                                           (L, r), OK, DECLINED)
       static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *lua_ssl_val = NULL;
      +static APR_OPTIONAL_FN_TYPE(ssl_is_https) *lua_ssl_is_https = NULL;
       
      -     module AP_MODULE_DECLARE_DATA lua_module;
      +module AP_MODULE_DECLARE_DATA lua_module;
       
       #define AP_LUA_HOOK_FIRST (APR_HOOK_FIRST - 1)
       #define AP_LUA_HOOK_LAST  (APR_HOOK_LAST  + 1)
       
      +typedef struct {
      +    const char *name;
      +    const char *file_name;
      +    const char *function_name;
      +    ap_lua_vm_spec *spec;
      +} lua_authz_provider_spec;
      +
      +typedef struct {
      +    lua_authz_provider_spec *spec;
      +    apr_array_header_t *args;
      +} lua_authz_provider_func;
      +
      +apr_hash_t *lua_authz_providers;
      +
      +typedef struct
      +{
      +    apr_bucket_brigade *tmpBucket;
      +    lua_State *L;
      +    ap_lua_vm_spec *spec;
      +    int broken;
      +} lua_filter_ctx;
      +
      +apr_global_mutex_t *lua_ivm_mutex;
      +apr_shm_t *lua_ivm_shm;
      +char *lua_ivm_shmfile;
      +
      +static apr_status_t shm_cleanup_wrapper(void *unused) {
      +    if (lua_ivm_shm) {
      +        return apr_shm_destroy(lua_ivm_shm);
      +    }
      +    return OK;
      +}
      +
       /**
        * error reporting if lua has an error.
        * Extracts the error from lua stack and prints
      @@ -48,14 +103,13 @@ static void report_lua_error(lua_State *L, request_rec *r)
           const char *lua_response;
           r->status = HTTP_INTERNAL_SERVER_ERROR;
           r->content_type = "text/html";
      -
      -    ap_rputs("<b>Error!</b>\n", r);
      -    ap_rputs("<p>", r);
      +    ap_rputs("<h3>Error!</h3>\n", r);
      +    ap_rputs("<pre>", r);
           lua_response = lua_tostring(L, -1);
      -    ap_rputs(lua_response, r);
      -    ap_rputs("</p>\n", r);
      +    ap_rputs(ap_escape_html(r->pool, lua_response), r);
      +    ap_rputs("</pre>\n", r);
       
      -    ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, "Lua error: %s",
      +    ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, r->pool, APLOGNO(01471) "Lua error: %s",
                         lua_response);
       }
       
      @@ -73,158 +127,529 @@ static int lua_open_hook(lua_State *L, apr_pool_t *p)
           return OK;
       }
       
      -/*
      -static apr_status_t luahood(ap_filter_t *f, apr_bucket_brigade *bb) {
      -    apr_bucket* b;
      -    apr_status_t rs;
      -    for ( b = APR_BRIGADE_FIRST(bb);
      -          b != APR_BRIGADE_SENTINEL(bb);
      -          b = APR_BUCKET_NEXT(b))
      -    {
      -        if (APR_BUCKET_IS_EOS(b)) {kl
      -            break;
      -        }
      -        const char *buffer;
      -        size_t bytes;
      -        if (( rs = apr_bucket_read(b, &buffer, &bytes, APR_BLOCK_READ))) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, rs, f->r, "read failure in luahood");
      -            return rs;
      +static const char *scope_to_string(unsigned int scope)
      +{
      +    switch (scope) {
      +    case AP_LUA_SCOPE_ONCE:
      +    case AP_LUA_SCOPE_UNSET:
      +        return "once";
      +    case AP_LUA_SCOPE_REQUEST:
      +        return "request";
      +    case AP_LUA_SCOPE_CONN:
      +        return "conn";
      +#if APR_HAS_THREADS
      +    case AP_LUA_SCOPE_THREAD:
      +        return "thread";
      +    case AP_LUA_SCOPE_SERVER:
      +        return "server";
      +#endif
      +    default:
      +        ap_assert(0);
      +        return 0;
      +    }
      +}
      +
      +static void ap_lua_release_state(lua_State* L, ap_lua_vm_spec* spec, request_rec* r) {
      +    char *hash;
      +    apr_reslist_t* reslist = NULL;
      +    if (spec->scope == AP_LUA_SCOPE_SERVER) {
      +        ap_lua_server_spec* sspec = NULL;
      +        lua_settop(L, 0);
      +        lua_getfield(L, LUA_REGISTRYINDEX, "Apache2.Lua.server_spec");
      +        sspec = (ap_lua_server_spec*) lua_touserdata(L, 1);
      +        hash = apr_psprintf(r->pool, "reslist:%s", spec->file);
      +        if (apr_pool_userdata_get((void **)&reslist, hash,
      +                                r->server->process->pool) == APR_SUCCESS) {
      +            AP_DEBUG_ASSERT(sspec != NULL);
      +            if (reslist != NULL) {
      +                apr_reslist_release(reslist, sspec);
      +            }
               }
      -        char *mine = apr_pstrmemdup(f->r->pool, buffer, bytes);
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, "sending '%s'", mine);
           }
      +}
       
      -    ap_pass_brigade(f->next, bb);
      +static ap_lua_vm_spec *create_vm_spec(apr_pool_t **lifecycle_pool,
      +                                      request_rec *r,
      +                                      const ap_lua_dir_cfg *cfg,
      +                                      const ap_lua_server_cfg *server_cfg,
      +                                      const char *filename,
      +                                      const char *bytecode,
      +                                      apr_size_t bytecode_len,
      +                                      const char *function,
      +                                      const char *what)
      +{
      +    apr_pool_t *pool;
      +    ap_lua_vm_spec *spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec));
       
      -    return OK;
      +    spec->scope = cfg->vm_scope;
      +    spec->pool = r->pool;
      +    spec->package_paths = cfg->package_paths;
      +    spec->package_cpaths = cfg->package_cpaths;
      +    spec->cb = &lua_open_callback;
      +    spec->cb_arg = NULL;
      +    spec->bytecode = bytecode;
      +    spec->bytecode_len = bytecode_len;
      +    spec->codecache = (cfg->codecache == AP_LUA_CACHE_UNSET) ? AP_LUA_CACHE_STAT : cfg->codecache;
      +    spec->vm_min = cfg->vm_min ? cfg->vm_min : 1;
      +    spec->vm_max = cfg->vm_max ? cfg->vm_max : 1;
      +    
      +    if (filename) {
      +        char *file;
      +        apr_filepath_merge(&file, server_cfg->root_path,
      +                           filename, APR_FILEPATH_NOTRELATIVE, r->pool);
      +        spec->file = file;
      +    }
      +    else {
      +        spec->file = r->filename;
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(02313)
      +                  "%s details: scope: %s, file: %s, func: %s",
      +                  what, scope_to_string(spec->scope), spec->file,
      +                  function ? function : "-");
      +
      +    switch (spec->scope) {
      +    case AP_LUA_SCOPE_ONCE:
      +    case AP_LUA_SCOPE_UNSET:
      +        apr_pool_create(&pool, r->pool);
      +        break;
      +    case AP_LUA_SCOPE_REQUEST:
      +        pool = r->pool;
      +        break;
      +    case AP_LUA_SCOPE_CONN:
      +        pool = r->connection->pool;
      +        break;
      +#if APR_HAS_THREADS
      +    case AP_LUA_SCOPE_THREAD:
      +        pool = apr_thread_pool_get(r->connection->current_thread);
      +        break;
      +    case AP_LUA_SCOPE_SERVER:
      +        pool = r->server->process->pool;
      +        break;
      +#endif
      +    default:
      +        ap_assert(0);
      +    }
      +
      +    *lifecycle_pool = pool;
      +    return spec;
      +}
      +
      +static const char* ap_lua_interpolate_string(apr_pool_t* pool, const char* string, const char** values)
      +{
      +    char *stringBetween;
      +    const char* ret;
      +    int srclen,x,y;
      +    srclen = strlen(string);
      +    ret = "";
      +    y = 0;
      +    for (x=0; x < srclen; x++) {
      +        if (string[x] == '$' && x != srclen-1 && string[x+1] >= '0' && string[x+1] <= '9') {
      +            int v = *(string+x+1) - '0';
      +            if (x-y > 0) {
      +                stringBetween = apr_pstrndup(pool, string+y, x-y);
      +            }
      +            else {
      +                stringBetween = "";
      +            }
      +            ret = apr_pstrcat(pool, ret, stringBetween, values[v], NULL);
      +            y = ++x+1;
      +        }
      +    }
      +    
      +    if (x-y > 0 && y > 0) {
      +        stringBetween = apr_pstrndup(pool, string+y, x-y);
      +        ret = apr_pstrcat(pool, ret, stringBetween, NULL);
      +    }
      +    /* If no replacement was made, just return the original string */
      +    else if (y == 0) {
      +        return string;
      +    }
      +    return ret;
       }
      -*/
      +
      +
       
       /**
        * "main"
        */
       static int lua_handler(request_rec *r)
       {
      -    ap_lua_dir_cfg *dcfg;
      +    int rc = OK;
           if (strcmp(r->handler, "lua-script")) {
               return DECLINED;
           }
      +    /* Decline the request if the script does not exist (or is a directory),
      +     * rather than just returning internal server error */
      +    if (
      +            (r->finfo.filetype == APR_NOFILE)
      +            || (r->finfo.filetype & APR_DIR)
      +        ) {
      +        return DECLINED;
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(01472)
      +                  "handling [%s] in mod_lua", r->filename);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "handling [%s] in mod_lua",
      -                  r->filename);
      -    dcfg = ap_get_module_config(r->per_dir_config, &lua_module);
      -
      +    /* XXX: This seems wrong because it may generate wrong headers for HEAD requests */
           if (!r->header_only) {
               lua_State *L;
      +        apr_pool_t *pool;
               const ap_lua_dir_cfg *cfg = ap_get_module_config(r->per_dir_config,
                                                                &lua_module);
      -        ap_lua_request_cfg *rcfg = ap_get_module_config(r->request_config,
      -                                                        &lua_module);
      -        mapped_request_details *d = rcfg->mapped_request_details;
      -        ap_lua_vm_spec *spec = NULL;
      -
      -        if (!d) {
      -            d = apr_palloc(r->pool, sizeof(mapped_request_details));
      -            spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec));
      -            spec->scope = dcfg->vm_scope;
      -            spec->pool = spec->scope==APL_SCOPE_SERVER ? cfg->pool : r->pool;
      -            spec->file = r->filename;
      -            spec->code_cache_style = dcfg->code_cache_style;
      -            spec->package_paths = cfg->package_paths;
      -            spec->package_cpaths = cfg->package_cpaths;
      -            spec->vm_server_pool_min = cfg->vm_server_pool_min;
      -            spec->vm_server_pool_max = cfg->vm_server_pool_max;
      -            spec->cb = &lua_open_callback;
      -            spec->cb_arg = NULL;
      -            d->spec = spec;
      -            d->function_name = "handle";
      -        }
      -
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                      "request details scope:%u, cache:%u, filename:%s, function:%s",
      -                      d->spec->scope,
      -                      d->spec->code_cache_style,
      -                      d->spec->file,
      -                      d->function_name);
      -        L = ap_lua_get_lua_state(r->pool,
      -                              d->spec);
      +        ap_lua_vm_spec *spec = create_vm_spec(&pool, r, cfg, NULL, NULL, NULL,
      +                                              0, "handle", "request handler");
       
      +        L = ap_lua_get_lua_state(pool, spec, r);
               if (!L) {
                   /* TODO annotate spec with failure reason */
                   r->status = HTTP_INTERNAL_SERVER_ERROR;
                   ap_rputs("Unable to compile VM, see logs", r);
      +            ap_lua_release_state(L, spec, r);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "got a vm!");
      -        lua_getglobal(L, d->function_name);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, APLOGNO(01474) "got a vm!");
      +        lua_getglobal(L, "handle");
               if (!lua_isfunction(L, -1)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      -                          "lua: Unable to find function %s in %s",
      -                          d->function_name,
      -                          d->spec->file);
      +            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01475)
      +                          "lua: Unable to find entry function '%s' in %s (not a valid function)",
      +                          "handle",
      +                          spec->file);
      +            ap_lua_release_state(L, spec, r);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               ap_lua_run_lua_request(L, r);
      -        if (lua_pcall(L, 1, 0, 0)) {
      +        if (lua_pcall(L, 1, 1, 0)) {
                   report_lua_error(L, r);
               }
      +        if (lua_isnumber(L, -1)) {
      +            rc = lua_tointeger(L, -1);
      +        }
      +        ap_lua_release_state(L, spec, r);
           }
      -    return OK;
      +    return rc;
       }
       
       
      +/* ------------------- Input/output content filters ------------------- */
       
      -/**
      - * Like mod_alias except for lua handler fun :-)
      - */
      -static int lua_alias_munger(request_rec *r)
      -{
      +
      +static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_filter_ctx** c) {
      +    apr_pool_t *pool;
           ap_lua_vm_spec *spec;
      -    ap_lua_request_cfg *rcfg = ap_get_module_config(r->request_config,
      -                                                    &lua_module);
      +    int n, rc;
      +    lua_State *L;
      +    lua_filter_ctx *ctx;    
      +    ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config,
      +                                                        &lua_module);
           const ap_lua_dir_cfg *cfg = ap_get_module_config(r->per_dir_config,
      -                                                     &lua_module);
      -    int i;
      -    ap_regmatch_t matches[AP_MAX_REG_MATCH];
      -
      -    for (i = 0; i < cfg->mapped_handlers->nelts; i++) {
      -        const ap_lua_mapped_handler_spec *cnd =
      -            ((const ap_lua_mapped_handler_spec **) cfg->mapped_handlers->elts)[i];
      -
      -        if (OK == ap_regexec(cnd->uri_pattern, r->uri, AP_MAX_REG_MATCH,
      -                             matches, 0)) {
      -            mapped_request_details *d;
      -            r->handler = "lua-script";
      -
      -            spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec));
      -            spec->file = ap_pregsub(r->pool, cnd->file_name, r->uri,
      -                                    AP_MAX_REG_MATCH, matches);
      -            spec->scope = cnd->scope;
      -            spec->code_cache_style = cnd->code_cache_style;
      -            spec->bytecode = cnd->bytecode;
      -            spec->bytecode_len = cnd->bytecode_len;
      -            if (spec->scope == APL_SCOPE_ONCE) {
      -                spec->pool = r->pool;
      +                                                    &lua_module);
      +    
      +    ctx = apr_pcalloc(r->pool, sizeof(lua_filter_ctx));
      +    ctx->broken = 0;
      +    *c = ctx;
      +    /* Find the filter that was called.
      +     * XXX: If we were wired with mod_filter, the filter (mod_filters name)
      +     *      and the provider (our underlying filters name) need to have matched.
      +     */
      +    for (n = 0; n < cfg->mapped_filters->nelts; n++) {
      +        ap_lua_filter_handler_spec *hook_spec =
      +            ((ap_lua_filter_handler_spec **) cfg->mapped_filters->elts)[n];
      +
      +        if (hook_spec == NULL) {
      +            continue;
      +        }
      +        if (!strcasecmp(hook_spec->filter_name, f->frec->name)) {
      +            spec = create_vm_spec(&pool, r, cfg, server_cfg,
      +                                    hook_spec->file_name,
      +                                    NULL,
      +                                    0,
      +                                    hook_spec->function_name,
      +                                    "filter");
      +            L = ap_lua_get_lua_state(pool, spec, r);
      +            if (L) {
      +                L = lua_newthread(L);
                   }
       
      -            spec->cb = &lua_open_callback;
      -            spec->cb_arg = NULL;
      +            if (!L) {
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02328)
      +                                "lua: Failed to obtain lua interpreter for %s %s",
      +                                hook_spec->function_name, hook_spec->file_name);
      +                ap_lua_release_state(L, spec, r);
      +                return APR_EGENERAL;
      +            }
      +            if (hook_spec->function_name != NULL) {
      +                lua_getglobal(L, hook_spec->function_name);
      +                if (!lua_isfunction(L, -1)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02329)
      +                                "lua: Unable to find entry function '%s' in %s (not a valid function)",
      +                                    hook_spec->function_name,
      +                                    hook_spec->file_name);
      +                    ap_lua_release_state(L, spec, r);
      +                    return APR_EGENERAL;
      +                }
       
      -            d = apr_palloc(r->pool, sizeof(mapped_request_details));
      +                ap_lua_run_lua_request(L, r);
      +            }
      +            else {
      +                int t;
      +                ap_lua_run_lua_request(L, r);
       
      -            d->function_name = ap_pregsub(r->pool, cnd->function_name, r->uri,
      -                                          AP_MAX_REG_MATCH, matches);
      -            d->spec = spec;
      +                t = lua_gettop(L);
      +                lua_setglobal(L, "r");
      +                lua_settop(L, t);
      +            }
      +            ctx->L = L;
      +            ctx->spec = spec;
      +            
      +            /* If a Lua filter is interested in filtering a request, it must first do a yield, 
      +             * otherwise we'll assume that it's not interested and pretend we didn't find it.
      +             */
      +            rc = lua_resume(L, 1);
      +            if (rc == LUA_YIELD) {
      +                if (f->frec->providers == NULL) { 
      +                    /* Not wired by mod_filter */
      +                    apr_table_unset(r->headers_out, "Content-Length");
      +                    apr_table_unset(r->headers_out, "Content-MD5");
      +                    apr_table_unset(r->headers_out, "ETAG");
      +                }
      +                return OK;
      +            }
      +            else {
      +                ap_lua_release_state(L, spec, r);
      +                return APR_ENOENT;
      +            }
      +        }
      +    }
      +    return APR_ENOENT;
      +}
       
      -            /* now do replacement on method name where? */
      -            r->filename = apr_pstrdup(r->pool, spec->file);
      -            rcfg->mapped_request_details = d;
      -            return OK;
      +static apr_status_t lua_output_filter_handle(ap_filter_t *f, apr_bucket_brigade *pbbIn) {
      +    request_rec *r = f->r;
      +    int rc;
      +    lua_State *L;
      +    lua_filter_ctx* ctx;
      +    conn_rec *c = r->connection;
      +    apr_bucket *pbktIn;
      +    apr_status_t rv;
      +    
      +    /* Set up the initial filter context and acquire the function.
      +     * The corresponding Lua function should yield here.
      +     */
      +    if (!f->ctx) {
      +        rc = lua_setup_filter_ctx(f,r,&ctx);
      +        if (rc == APR_EGENERAL) {
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +        if (rc == APR_ENOENT) {
      +            /* No filter entry found (or the script declined to filter), just pass on the buckets */
      +            ap_remove_output_filter(f);
      +            return ap_pass_brigade(f->next,pbbIn);
      +        }
      +        else { 
      +            /* We've got a willing lua filter, setup and check for a prefix */
      +            size_t olen;
      +            apr_bucket *pbktOut;
      +            const char* output = lua_tolstring(ctx->L, 1, &olen);
      +
      +            f->ctx = ctx;
      +            ctx->tmpBucket = apr_brigade_create(r->pool, c->bucket_alloc);
      +
      +            if (olen > 0) { 
      +                pbktOut = apr_bucket_heap_create(output, olen, NULL, c->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
      +                rv = ap_pass_brigade(f->next, ctx->tmpBucket);
      +                apr_brigade_cleanup(ctx->tmpBucket);
      +                if (rv != APR_SUCCESS) {
      +                    return rv;
      +                }
      +            }
               }
           }
      -    return DECLINED;
      +    ctx = (lua_filter_ctx*) f->ctx;
      +    L = ctx->L;
      +    /* While the Lua function is still yielding, pass in buckets to the coroutine */
      +    if (!ctx->broken) {
      +        for (pbktIn = APR_BRIGADE_FIRST(pbbIn);
      +            pbktIn != APR_BRIGADE_SENTINEL(pbbIn);
      +            pbktIn = APR_BUCKET_NEXT(pbktIn))
      +            {
      +            const char *data;
      +            apr_size_t len;
      +            apr_bucket *pbktOut;
      +
      +            /* read the bucket */
      +            apr_bucket_read(pbktIn,&data,&len,APR_BLOCK_READ);
      +
      +            /* Push the bucket onto the Lua stack as a global var */
      +            lua_pushlstring(L, data, len);
      +            lua_setglobal(L, "bucket");
      +            
      +            /* If Lua yielded, it means we have something to pass on */
      +            if (lua_resume(L, 0) == LUA_YIELD) {
      +                size_t olen;
      +                const char* output = lua_tolstring(L, 1, &olen);
      +                if (olen > 0) { 
      +                    pbktOut = apr_bucket_heap_create(output, olen, NULL,
      +                                            c->bucket_alloc);
      +                    APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
      +                    rv = ap_pass_brigade(f->next, ctx->tmpBucket);
      +                    apr_brigade_cleanup(ctx->tmpBucket);
      +                    if (rv != APR_SUCCESS) {
      +                        return rv;
      +                    }
      +                }
      +            }
      +            else {
      +                ctx->broken = 1;
      +                ap_lua_release_state(L, ctx->spec, r);
      +                ap_remove_output_filter(f);
      +                apr_brigade_cleanup(pbbIn);
      +                apr_brigade_cleanup(ctx->tmpBucket);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02663)
      +                              "lua: Error while executing filter: %s",
      +                              lua_tostring(L, -1));
      +                return HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +        }
      +        /* If we've safely reached the end, do a final call to Lua to allow for any 
      +        finishing moves by the script, such as appending a tail. */
      +        if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(pbbIn))) {
      +            apr_bucket *pbktEOS;
      +            lua_pushnil(L);
      +            lua_setglobal(L, "bucket");
      +            if (lua_resume(L, 0) == LUA_YIELD) {
      +                apr_bucket *pbktOut;
      +                size_t olen;
      +                const char* output = lua_tolstring(L, 1, &olen);
      +                if (olen > 0) { 
      +                    pbktOut = apr_bucket_heap_create(output, olen, NULL,
      +                            c->bucket_alloc);
      +                    APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktOut);
      +                }
      +            }
      +            pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(ctx->tmpBucket, pbktEOS);
      +            ap_lua_release_state(L, ctx->spec, r);
      +            rv = ap_pass_brigade(f->next, ctx->tmpBucket);
      +            apr_brigade_cleanup(ctx->tmpBucket);
      +            if (rv != APR_SUCCESS) {
      +                return rv;
      +            }
      +        }
      +    }
      +    /* Clean up */
      +    apr_brigade_cleanup(pbbIn);
      +    return APR_SUCCESS;    
      +}
      +
      +
      +
      +static apr_status_t lua_input_filter_handle(ap_filter_t *f,
      +                                       apr_bucket_brigade *pbbOut,
      +                                       ap_input_mode_t eMode,
      +                                       apr_read_type_e eBlock,
      +                                       apr_off_t nBytes) 
      +{
      +    request_rec *r = f->r;
      +    int rc, lastCall = 0;
      +    lua_State *L;
      +    lua_filter_ctx* ctx;
      +    conn_rec *c = r->connection;
      +    apr_status_t ret;
      +    
      +    /* Set up the initial filter context and acquire the function.
      +     * The corresponding Lua function should yield here.
      +     */
      +    if (!f->ctx) {
      +        rc = lua_setup_filter_ctx(f,r,&ctx);
      +        f->ctx = ctx;
      +        if (rc == APR_EGENERAL) {
      +            ctx->broken = 1;
      +            ap_remove_input_filter(f); 
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +        if (rc == APR_ENOENT ) {
      +            ap_remove_input_filter(f);
      +            ctx->broken = 1;
      +        }
      +        if (rc == APR_SUCCESS) {
      +            ctx->tmpBucket = apr_brigade_create(r->pool, c->bucket_alloc);
      +        }
      +    }
      +    ctx = (lua_filter_ctx*) f->ctx;
      +    L = ctx->L;
      +    /* If the Lua script broke or denied serving the request, just pass the buckets through */
      +    if (ctx->broken) {
      +        return ap_get_brigade(f->next, pbbOut, eMode, eBlock, nBytes);
      +    }
      +    
      +    if (APR_BRIGADE_EMPTY(ctx->tmpBucket)) {
      +        ret = ap_get_brigade(f->next, ctx->tmpBucket, eMode, eBlock, nBytes);
      +        if (eMode == AP_MODE_EATCRLF || ret != APR_SUCCESS)
      +            return ret;
      +    }
      +    
      +    /* While the Lua function is still yielding, pass buckets to the coroutine */
      +    if (!ctx->broken) {
      +        lastCall = 0;
      +        while(!APR_BRIGADE_EMPTY(ctx->tmpBucket)) {
      +            apr_bucket *pbktIn = APR_BRIGADE_FIRST(ctx->tmpBucket);
      +            apr_bucket *pbktOut;
      +            const char *data;
      +            apr_size_t len;
      +            
      +            if (APR_BUCKET_IS_EOS(pbktIn)) {
      +                APR_BUCKET_REMOVE(pbktIn);
      +                break;
      +            }
      +
      +            /* read the bucket */
      +            ret = apr_bucket_read(pbktIn, &data, &len, eBlock);
      +            if (ret != APR_SUCCESS)
      +                return ret;
      +
      +            /* Push the bucket onto the Lua stack as a global var */
      +            lastCall++;
      +            lua_pushlstring(L, data, len);
      +            lua_setglobal(L, "bucket");
      +            
      +            /* If Lua yielded, it means we have something to pass on */
      +            if (lua_resume(L, 0) == LUA_YIELD) {
      +                size_t olen;
      +                const char* output = lua_tolstring(L, 1, &olen);
      +                pbktOut = apr_bucket_heap_create(output, olen, 0, c->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut);
      +                apr_bucket_delete(pbktIn);
      +                return APR_SUCCESS;
      +            }
      +            else {
      +                ctx->broken = 1;
      +                ap_lua_release_state(L, ctx->spec, r);
      +                ap_remove_input_filter(f); 
      +                apr_bucket_delete(pbktIn);
      +                return HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +        }
      +        /* If we've safely reached the end, do a final call to Lua to allow for any 
      +        finishing moves by the script, such as appending a tail. */
      +        if (lastCall == 0) {
      +            apr_bucket *pbktEOS = apr_bucket_eos_create(c->bucket_alloc);
      +            lua_pushnil(L);
      +            lua_setglobal(L, "bucket");
      +            if (lua_resume(L, 0) == LUA_YIELD) {
      +                apr_bucket *pbktOut;
      +                size_t olen;
      +                const char* output = lua_tolstring(L, 1, &olen);
      +                pbktOut = apr_bucket_heap_create(output, olen, 0, c->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(pbbOut, pbktOut);
      +            }
      +            APR_BRIGADE_INSERT_TAIL(pbbOut,pbktEOS);
      +            ap_lua_release_state(L, ctx->spec, r);
      +        }
      +    }
      +    return APR_SUCCESS;
       }
       
      +
       /* ---------------- Configury stuff --------------- */
       
       /** harnesses for magic hooks **/
      @@ -232,6 +657,7 @@ static int lua_alias_munger(request_rec *r)
       static int lua_request_rec_hook_harness(request_rec *r, const char *name, int apr_hook_when)
       {
           int rc;
      +    apr_pool_t *pool;
           lua_State *L;
           ap_lua_vm_spec *spec;
           ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config,
      @@ -250,28 +676,18 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
                   if (hook_spec == NULL) {
                       continue;
                   }
      -            spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec));
      -
      -            spec->file = hook_spec->file_name;
      -            spec->code_cache_style = hook_spec->code_cache_style;
      -            spec->scope = hook_spec->scope;
      -            spec->vm_server_pool_min = cfg->vm_server_pool_min;
      -            spec->vm_server_pool_max = cfg->vm_server_pool_max;
      -            spec->bytecode = hook_spec->bytecode;
      -            spec->bytecode_len = hook_spec->bytecode_len;
      -            spec->pool = spec->scope==APL_SCOPE_SERVER ? cfg->pool : r->pool;
      -            spec->package_paths = cfg->package_paths;
      -            spec->package_cpaths = cfg->package_cpaths;
      -            spec->cb = &lua_open_callback;
      -            spec->cb_arg = NULL;
      -
      -            apr_filepath_merge(&spec->file, server_cfg->root_path,
      -                               spec->file, APR_FILEPATH_NOTRELATIVE, r->pool);
      -            L = ap_lua_get_lua_state(r->pool, spec);
      +            spec = create_vm_spec(&pool, r, cfg, server_cfg,
      +                                  hook_spec->file_name,
      +                                  hook_spec->bytecode,
      +                                  hook_spec->bytecode_len,
      +                                  hook_spec->function_name,
      +                                  "request hook");
      +
      +            L = ap_lua_get_lua_state(pool, spec, r);
       
                   if (!L) {
      -                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      -                              "lua: Failed to obtain lua interpreter for %s %s",
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01477)
      +                    "lua: Failed to obtain lua interpreter for entry function '%s' in %s",
                                     hook_spec->function_name, hook_spec->file_name);
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -279,10 +695,133 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
                   if (hook_spec->function_name != NULL) {
                       lua_getglobal(L, hook_spec->function_name);
                       if (!lua_isfunction(L, -1)) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      -                                  "lua: Unable to find function %s in %s",
      +                    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01478)
      +                               "lua: Unable to find entry function '%s' in %s (not a valid function)",
                                         hook_spec->function_name,
                                         hook_spec->file_name);
      +                    ap_lua_release_state(L, spec, r);
      +                    return HTTP_INTERNAL_SERVER_ERROR;
      +                }
      +
      +                ap_lua_run_lua_request(L, r);
      +            }
      +            else {
      +                int t;
      +                ap_lua_run_lua_request(L, r);
      +
      +                t = lua_gettop(L);
      +                lua_setglobal(L, "r");
      +                lua_settop(L, t);
      +            }
      +
      +            if (lua_pcall(L, 1, 1, 0)) {
      +                report_lua_error(L, r);
      +                ap_lua_release_state(L, spec, r);
      +                return HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +            rc = DECLINED;
      +            if (lua_isnumber(L, -1)) {
      +                rc = lua_tointeger(L, -1);
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r, "Lua hook %s:%s for phase %s returned %d", 
      +                              hook_spec->file_name, hook_spec->function_name, name, rc);
      +            }
      +            else { 
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(03017)
      +                              "Lua hook %s:%s for phase %s did not return a numeric value",
      +                              hook_spec->file_name, hook_spec->function_name, name);
      +                return HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +            if (rc != DECLINED) {
      +                ap_lua_release_state(L, spec, r);
      +                return rc;
      +            }
      +            ap_lua_release_state(L, spec, r);
      +        }
      +    }
      +    return DECLINED;
      +}
      +
      +
      +/* Fix for making sure that LuaMapHandler works when FallbackResource is set */
      +static int lua_map_handler_fixups(request_rec *r)
      +{
      +    /* If there is no handler set yet, this might be a LuaMapHandler request */
      +    if (r->handler == NULL) {
      +        int n = 0;
      +        ap_regmatch_t match[10];
      +        const ap_lua_dir_cfg *cfg = ap_get_module_config(r->per_dir_config,
      +                                                     &lua_module);
      +        for (n = 0; n < cfg->mapped_handlers->nelts; n++) {
      +            ap_lua_mapped_handler_spec *hook_spec =
      +            ((ap_lua_mapped_handler_spec **) cfg->mapped_handlers->elts)[n];
      +
      +            if (hook_spec == NULL) {
      +                continue;
      +            }
      +            if (!ap_regexec(hook_spec->uri_pattern, r->uri, 10, match, 0)) {
      +                r->handler = apr_pstrdup(r->pool, "lua-map-handler");
      +                return OK;
      +            }
      +        }
      +    }
      +    return DECLINED;
      +}
      +
      +
      +static int lua_map_handler(request_rec *r)
      +{
      +    int rc, n = 0;
      +    apr_pool_t *pool;
      +    lua_State *L;
      +    const char *filename, *function_name;
      +    const char *values[10];
      +    ap_lua_vm_spec *spec;
      +    ap_regmatch_t match[10];
      +    ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config,
      +                                                         &lua_module);
      +    const ap_lua_dir_cfg *cfg = ap_get_module_config(r->per_dir_config,
      +                                                     &lua_module);
      +    for (n = 0; n < cfg->mapped_handlers->nelts; n++) {
      +        ap_lua_mapped_handler_spec *hook_spec =
      +            ((ap_lua_mapped_handler_spec **) cfg->mapped_handlers->elts)[n];
      +
      +        if (hook_spec == NULL) {
      +            continue;
      +        }
      +        if (!ap_regexec(hook_spec->uri_pattern, r->uri, 10, match, 0)) {
      +            int i;
      +            for (i=0 ; i < 10; i++) {
      +                if (match[i].rm_eo >= 0) {
      +                    values[i] = apr_pstrndup(r->pool, r->uri+match[i].rm_so, match[i].rm_eo - match[i].rm_so);
      +                }
      +                else values[i] = "";
      +            }
      +            filename = ap_lua_interpolate_string(r->pool, hook_spec->file_name, values);
      +            function_name = ap_lua_interpolate_string(r->pool, hook_spec->function_name, values);
      +            spec = create_vm_spec(&pool, r, cfg, server_cfg,
      +                                    filename,
      +                                    hook_spec->bytecode,
      +                                    hook_spec->bytecode_len,
      +                                    function_name,
      +                                    "mapped handler");
      +            L = ap_lua_get_lua_state(pool, spec, r);
      +
      +            if (!L) {
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02330)
      +                                "lua: Failed to obtain Lua interpreter for entry function '%s' in %s",
      +                                function_name, filename);
      +                ap_lua_release_state(L, spec, r);
      +                return HTTP_INTERNAL_SERVER_ERROR;
      +            }
      +
      +            if (function_name != NULL) {
      +                lua_getglobal(L, function_name);
      +                if (!lua_isfunction(L, -1)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02331)
      +                                    "lua: Unable to find entry function '%s' in %s (not a valid function)",
      +                                    function_name,
      +                                    filename);
      +                    ap_lua_release_state(L, spec, r);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
       
      @@ -299,12 +838,21 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
       
                   if (lua_pcall(L, 1, 1, 0)) {
                       report_lua_error(L, r);
      +                ap_lua_release_state(L, spec, r);
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
                   rc = DECLINED;
                   if (lua_isnumber(L, -1)) {
                       rc = lua_tointeger(L, -1);
                   }
      +            else { 
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02483)
      +                              "lua: Lua handler %s in %s did not return a value, assuming apache2.OK",
      +                              function_name,
      +                              filename);
      +                rc = OK;
      +            }
      +            ap_lua_release_state(L, spec, r);
                   if (rc != DECLINED) {
                       return rc;
                   }
      @@ -357,7 +905,7 @@ typedef struct cr_ctx
       } cr_ctx;
       
       
      -/* Okay, this deserves a little explaination -- in order for the errors that lua
      +/* Okay, this deserves a little explanation -- in order for the errors that lua
        * generates to be 'accuarate', including line numbers, we basically inject
        * N line number new lines into the 'top' of the chunk reader.....
        *
      @@ -464,11 +1012,11 @@ static const char *register_named_block_function_hook(const char *name,
           if (line[0]) { 
               const char *word;
               word = ap_getword_conf(cmd->temp_pool, &line);
      -        if (word && *word) {
      +        if (*word) {
                   function = apr_pstrdup(cmd->pool, word);
               }
               word = ap_getword_conf(cmd->temp_pool, &line);
      -        if (word && *word) {
      +        if (*word) {
                   if (!strcasecmp("early", word)) { 
                       when = AP_LUA_HOOK_FIRST;
                   }
      @@ -486,23 +1034,21 @@ static const char *register_named_block_function_hook(const char *name,
       
           {
               cr_ctx ctx;
      -        char buf[32];
               lua_State *lvm;
               char *tmp;
               int rv;
               ap_directive_t **current;
               hack_section_baton *baton;
       
      -        apr_snprintf(buf, sizeof(buf), "%u", cmd->config_file->line_number);
      -        spec->file_name = apr_pstrcat(cmd->pool, cmd->config_file->name, ":",
      -                                      buf, NULL);
      +        spec->file_name = apr_psprintf(cmd->pool, "%s:%u",
      +                                       cmd->config_file->name,
      +                                       cmd->config_file->line_number);
               if (function) {
                   spec->function_name = (char *) function;
               }
               else {
                   function = NULL;
               }
      -        spec->code_cache_style = APL_CODE_CACHE_FOREVER;
       
               ctx.cmd = cmd;
               tmp = apr_pstrdup(cmd->pool, cmd->err_directive->directive + 1);
      @@ -527,7 +1073,11 @@ static const char *register_named_block_function_hook(const char *name,
               else {
                   luaL_Buffer b;
                   luaL_buffinit(lvm, &b);
      +#if LUA_VERSION_NUM >= 503
      +            lua_dump(lvm, ldump_writer, &b, 0);
      +#else
                   lua_dump(lvm, ldump_writer, &b);
      +#endif
                   luaL_pushresult(&b);
                   spec->bytecode_len = lua_strlen(lvm, -1);
                   spec->bytecode = apr_pstrmemdup(cmd->pool, lua_tostring(lvm, -1),
      @@ -580,30 +1130,76 @@ static const char *register_named_file_function_hook(const char *name,
           spec->file_name = apr_pstrdup(cmd->pool, file);
           spec->function_name = apr_pstrdup(cmd->pool, function);
           spec->scope = cfg->vm_scope;
      -    spec->code_cache_style = APL_CODE_CACHE_STAT;
      -    /*
      -       int code_cache_style;
      -       char *function_name;
      -       char *file_name;
      -       int scope;
      -     */
      +
           *(ap_lua_mapped_handler_spec **) apr_array_push(hook_specs) = spec;
           return NULL;
       }
      +static const char *register_mapped_file_function_hook(const char *pattern,
      +                                                     cmd_parms *cmd,
      +                                                     void *_cfg,
      +                                                     const char *file,
      +                                                     const char *function)
      +{
      +    ap_lua_mapped_handler_spec *spec;
      +    ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      +    ap_regex_t *regex = apr_pcalloc(cmd->pool, sizeof(ap_regex_t));
      +    if (ap_regcomp(regex, pattern,0)) {
      +        return "Invalid regex pattern!";
      +    }
      +
      +    spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_mapped_handler_spec));
      +    spec->file_name = apr_pstrdup(cmd->pool, file);
      +    spec->function_name = apr_pstrdup(cmd->pool, function);
      +    spec->scope = cfg->vm_scope;
      +    spec->uri_pattern = regex;
       
      +    *(ap_lua_mapped_handler_spec **) apr_array_push(cfg->mapped_handlers) = spec;
      +    return NULL;
      +}
      +static const char *register_filter_function_hook(const char *filter,
      +                                                     cmd_parms *cmd,
      +                                                     void *_cfg,
      +                                                     const char *file,
      +                                                     const char *function,
      +                                                     int direction)
      +{
      +    ap_lua_filter_handler_spec *spec;
      +    ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      +   
      +    spec = apr_pcalloc(cmd->pool, sizeof(ap_lua_filter_handler_spec));
      +    spec->file_name = apr_pstrdup(cmd->pool, file);
      +    spec->function_name = apr_pstrdup(cmd->pool, function);
      +    spec->filter_name = filter;
      +
      +    *(ap_lua_filter_handler_spec **) apr_array_push(cfg->mapped_filters) = spec;
      +    /* TODO: Make it work on other types than just AP_FTYPE_RESOURCE? */
      +    if (direction == AP_LUA_FILTER_OUTPUT) {
      +        spec->direction = AP_LUA_FILTER_OUTPUT;
      +        ap_register_output_filter_protocol(filter, lua_output_filter_handle, NULL, AP_FTYPE_RESOURCE,
      +                                            AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH);
      +    }
      +    else {
      +        spec->direction = AP_LUA_FILTER_INPUT;
      +        ap_register_input_filter(filter, lua_input_filter_handle, NULL, AP_FTYPE_RESOURCE);
      +    }
      +    return NULL;
      +}
      +/* disabled (see reference below)
       static int lua_check_user_id_harness_first(request_rec *r)
       {
      -
           return lua_request_rec_hook_harness(r, "check_user_id", AP_LUA_HOOK_FIRST);
       }
      +*/
       static int lua_check_user_id_harness(request_rec *r)
       {
           return lua_request_rec_hook_harness(r, "check_user_id", APR_HOOK_MIDDLE);
       }
      +/* disabled (see reference below)
       static int lua_check_user_id_harness_last(request_rec *r)
       {
           return lua_request_rec_hook_harness(r, "check_user_id", AP_LUA_HOOK_LAST);
       }
      +*/
       
       static int lua_translate_name_harness_first(request_rec *r)
       {
      @@ -660,7 +1256,13 @@ static int lua_auth_checker_harness_last(request_rec *r)
       }
       static void lua_insert_filter_harness(request_rec *r)
       {
      -    /* ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "LuaHookInsertFilter not yet implemented"); */
      +    /* ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(03223)
      +     *               "LuaHookInsertFilter not yet implemented"); */
      +}
      +
      +static int lua_log_transaction_harness(request_rec *r)
      +{
      +    return lua_request_rec_hook_harness(r, "log_transaction", APR_HOOK_FIRST);
       }
       
       static int lua_quick_harness(request_rec *r, int lookup)
      @@ -727,6 +1329,15 @@ static const char *register_map_to_storage_hook(cmd_parms *cmd, void *_cfg,
           return register_named_file_function_hook("map_to_storage", cmd, _cfg,
                                                    file, function, APR_HOOK_MIDDLE);
       }
      +
      +static const char *register_log_transaction_hook(cmd_parms *cmd, void *_cfg,
      +                                                const char *file,
      +                                                const char *function)
      +{
      +    return register_named_file_function_hook("log_transaction", cmd, _cfg,
      +                                             file, function, APR_HOOK_FIRST);
      +}
      +
       static const char *register_map_to_storage_block(cmd_parms *cmd, void *_cfg,
                                                        const char *line)
       {
      @@ -734,13 +1345,14 @@ static const char *register_map_to_storage_block(cmd_parms *cmd, void *_cfg,
                                                     line);
       }
       
      +
       static const char *register_check_user_id_hook(cmd_parms *cmd, void *_cfg,
                                                      const char *file,
                                                      const char *function,
                                                      const char *when)
       {
           int apr_hook_when = APR_HOOK_MIDDLE;
      -
      +/* XXX: This does not currently work!!
           if (when) {
               if (!strcasecmp(when, "early")) {
                   apr_hook_when = AP_LUA_HOOK_FIRST;
      @@ -752,7 +1364,7 @@ static const char *register_check_user_id_hook(cmd_parms *cmd, void *_cfg,
                   return "Third argument must be 'early' or 'late'";
               }
           }
      -
      +*/
           return register_named_file_function_hook("check_user_id", cmd, _cfg, file,
                                                    function, apr_hook_when);
       }
      @@ -854,6 +1466,42 @@ static const char *register_quick_hook(cmd_parms *cmd, void *_cfg,
           return register_named_file_function_hook("quick", cmd, _cfg, file,
                                                    function, APR_HOOK_MIDDLE);
       }
      +static const char *register_map_handler(cmd_parms *cmd, void *_cfg,
      +                                       const char* match, const char *file, const char *function)
      +{
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
      +                                                NOT_IN_HTACCESS);
      +    if (err) {
      +        return err;
      +    }
      +    if (!function) function = "handle";
      +    return register_mapped_file_function_hook(match, cmd, _cfg, file,
      +                                             function);
      +}
      +static const char *register_output_filter(cmd_parms *cmd, void *_cfg,
      +                                       const char* filter, const char *file, const char *function)
      +{
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
      +                                                NOT_IN_HTACCESS);
      +    if (err) {
      +        return err;
      +    }
      +    if (!function) function = "handle";
      +    return register_filter_function_hook(filter, cmd, _cfg, file,
      +                                             function, AP_LUA_FILTER_OUTPUT);
      +}
      +static const char *register_input_filter(cmd_parms *cmd, void *_cfg,
      +                                       const char* filter, const char *file, const char *function)
      +{
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES|
      +                                                NOT_IN_HTACCESS);
      +    if (err) {
      +        return err;
      +    }
      +    if (!function) function = "handle";
      +    return register_filter_function_hook(filter, cmd, _cfg, file,
      +                                             function, AP_LUA_FILTER_INPUT);
      +}
       static const char *register_quick_block(cmd_parms *cmd, void *_cfg,
                                               const char *line)
       {
      @@ -863,16 +1511,22 @@ static const char *register_quick_block(cmd_parms *cmd, void *_cfg,
       
       
       
      -static const char *register_package_helper(cmd_parms *cmd, const char *arg,
      +static const char *register_package_helper(cmd_parms *cmd, 
      +                                           const char *arg,
                                                  apr_array_header_t *dir_array)
       {
           apr_status_t rv;
       
           ap_lua_server_cfg *server_cfg =
               ap_get_module_config(cmd->server->module_config, &lua_module);
      +
           char *fixed_filename;
      -    rv = apr_filepath_merge(&fixed_filename, server_cfg->root_path, arg,
      -                            APR_FILEPATH_NOTRELATIVE, cmd->pool);
      +    rv = apr_filepath_merge(&fixed_filename, 
      +                            server_cfg->root_path, 
      +                            arg,
      +                            APR_FILEPATH_NOTRELATIVE, 
      +                            cmd->pool);
      +
           if (rv != APR_SUCCESS) {
               return apr_psprintf(cmd->pool,
                                   "Unable to build full path to file, %s", arg);
      @@ -899,7 +1553,8 @@ static const char *register_package_dir(cmd_parms *cmd, void *_cfg,
        * Called for config directive which looks like
        * LuaPackageCPath /lua/package/path/mapped/thing/like/this/?.so
        */
      -static const char *register_package_cdir(cmd_parms *cmd, void *_cfg,
      +static const char *register_package_cdir(cmd_parms *cmd, 
      +                                         void *_cfg,
                                                const char *arg)
       {
           ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      @@ -907,86 +1562,113 @@ static const char *register_package_cdir(cmd_parms *cmd, void *_cfg,
           return register_package_helper(cmd, arg, cfg->package_cpaths);
       }
       
      -/**
      - * Called for config directive which looks like
      - * LuaCodeCache
      - */
      -static const char *register_code_cache(cmd_parms *cmd, void *_cfg,
      -                                       const char *arg)
      +static const char *register_lua_inherit(cmd_parms *cmd, 
      +                                      void *_cfg,
      +                                      const char *arg)
       {
           ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      -    if (strcmp("stat", arg) == 0) {
      -        cfg->code_cache_style = APL_CODE_CACHE_STAT;
      +    
      +    if (strcasecmp("none", arg) == 0) {
      +        cfg->inherit = AP_LUA_INHERIT_NONE;
           }
      -    else if (strcmp("forever", arg) == 0) {
      -        cfg->code_cache_style = APL_CODE_CACHE_FOREVER;
      +    else if (strcasecmp("parent-first", arg) == 0) {
      +        cfg->inherit = AP_LUA_INHERIT_PARENT_FIRST;
           }
      -    else if (strcmp("never", arg) == 0) {
      -        cfg->code_cache_style = APL_CODE_CACHE_NEVER;
      +    else if (strcasecmp("parent-last", arg) == 0) {
      +        cfg->inherit = AP_LUA_INHERIT_PARENT_LAST;
           }
      -    else {
      +    else { 
               return apr_psprintf(cmd->pool,
      -                            "Invalid value for LuaCodeCache, '%s', "
      -                            "acceptable values are 'stat', 'forever', and "
      -                            "'never'",
      +                            "LuaInherit type of '%s' not recognized, valid "
      +                            "options are 'none', 'parent-first', and 'parent-last'", 
                                   arg);
           }
           return NULL;
       }
      -
      -static const char *register_lua_scope(cmd_parms *cmd, void *_cfg,
      -                                      const char *scope, const char *min,
      +static const char *register_lua_codecache(cmd_parms *cmd, 
      +                                      void *_cfg,
      +                                      const char *arg)
      +{
      +    ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      +    
      +    if (strcasecmp("never", arg) == 0) {
      +        cfg->codecache = AP_LUA_CACHE_NEVER;
      +    }
      +    else if (strcasecmp("stat", arg) == 0) {
      +        cfg->codecache = AP_LUA_CACHE_STAT;
      +    }
      +    else if (strcasecmp("forever", arg) == 0) {
      +        cfg->codecache = AP_LUA_CACHE_FOREVER;
      +    }
      +    else { 
      +        return apr_psprintf(cmd->pool,
      +                            "LuaCodeCache type of '%s' not recognized, valid "
      +                            "options are 'never', 'stat', and 'forever'", 
      +                            arg);
      +    }
      +    return NULL;
      +}
      +static const char *register_lua_scope(cmd_parms *cmd, 
      +                                      void *_cfg,
      +                                      const char *scope, 
      +                                      const char *min,
                                             const char *max)
       {
           ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
           if (strcmp("once", scope) == 0) {
      -        cfg->vm_scope = APL_SCOPE_ONCE;
      +        cfg->vm_scope = AP_LUA_SCOPE_ONCE;
           }
           else if (strcmp("request", scope) == 0) {
      -        cfg->vm_scope = APL_SCOPE_REQUEST;
      +        cfg->vm_scope = AP_LUA_SCOPE_REQUEST;
           }
           else if (strcmp("conn", scope) == 0) {
      -        cfg->vm_scope = APL_SCOPE_CONN;
      +        cfg->vm_scope = AP_LUA_SCOPE_CONN;
      +    }
      +    else if (strcmp("thread", scope) == 0) {
      +#if !APR_HAS_THREADS
      +        return apr_psprintf(cmd->pool,
      +                            "Scope type of '%s' cannot be used because this "
      +                            "server does not have threading support "
      +                            "(APR_HAS_THREADS)" 
      +                            scope);
      +#endif
      +        cfg->vm_scope = AP_LUA_SCOPE_THREAD;
           }
           else if (strcmp("server", scope) == 0) {
      -        cfg->vm_scope = APL_SCOPE_SERVER;
      -        if (min)
      -            cfg->vm_server_pool_min = atoi(min);
      -        if (max)
      -            cfg->vm_server_pool_max = atoi(max);
      +        unsigned int vmin, vmax;
      +#if !APR_HAS_THREADS
      +        return apr_psprintf(cmd->pool,
      +                            "Scope type of '%s' cannot be used because this "
      +                            "server does not have threading support "
      +                            "(APR_HAS_THREADS)" 
      +                            scope);
      +#endif
      +        cfg->vm_scope = AP_LUA_SCOPE_SERVER;
      +        vmin = min ? atoi(min) : 1;
      +        vmax = max ? atoi(max) : 1;
      +        if (vmin == 0) {
      +            vmin = 1;
      +        }
      +        if (vmax < vmin) {
      +            vmax = vmin;
      +        }
      +        cfg->vm_min = vmin;
      +        cfg->vm_max = vmax;
           }
           else {
               return apr_psprintf(cmd->pool,
                                   "Invalid value for LuaScope, '%s', acceptable "
      -                            "values are 'once', 'request', 'conn', and "
      -                            "'server'",
      -                            scope);
      +                            "values are: 'once', 'request', 'conn'"
      +#if APR_HAS_THREADS
      +                            ", 'thread', 'server'"
      +#endif
      +                            ,scope);
           }
      +
           return NULL;
       }
       
       
      -/**
      - * Called for config directive which looks like
      - * AddLuaHandler /alias /path/to/lua/file.lua [handler_function_name]
      - */
      -static const char *lua_map_handler(cmd_parms *cmd, void *_cfg,
      -                                   const char *path, const char *file,
      -                                   const char *function)
      -{
      -    ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg;
      -    apr_status_t rv;
      -    const char *function_name;
      -    function_name = function ? function : "handle";
      -    rv = ap_lua_map_handler(cfg, file, function_name, path, "once");
      -    if (rv != APR_SUCCESS) {
      -        return apr_psprintf(cmd->pool,
      -                            "Unable to configure a lua handler for path "
      -                            "'%s', handler %s#%s",
      -                            path, file, function_name);
      -    }
      -    return NULL;
      -}
       
       static const char *register_lua_root(cmd_parms *cmd, void *_cfg,
                                            const char *root)
      @@ -998,7 +1680,9 @@ static const char *register_lua_root(cmd_parms *cmd, void *_cfg,
           cfg->root_path = root;
           return NULL;
       }
      -AP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var)
      +
      +const char *ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c,
      +                           request_rec *r, const char *var)
       {
           if (lua_ssl_val) { 
               return (const char *)lua_ssl_val(p, s, c, r, (char *)var);
      @@ -1006,8 +1690,146 @@ AP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_r
           return NULL;
       }
       
      +int ap_lua_ssl_is_https(conn_rec *c)
      +{
      +    return lua_ssl_is_https ? lua_ssl_is_https(c) : 0;
      +}
      +
       /*******************************/
       
      +static const char *lua_authz_parse(cmd_parms *cmd, const char *require_line,
      +                                   const void **parsed_require_line)
      +{
      +    const char *provider_name;
      +    lua_authz_provider_spec *spec;
      +    lua_authz_provider_func *func = apr_pcalloc(cmd->pool, sizeof(lua_authz_provider_func));
      +
      +    apr_pool_userdata_get((void**)&provider_name, AUTHZ_PROVIDER_NAME_NOTE,
      +                          cmd->temp_pool);
      +    ap_assert(provider_name != NULL);
      +
      +    spec = apr_hash_get(lua_authz_providers, provider_name, APR_HASH_KEY_STRING);
      +    ap_assert(spec != NULL);
      +    func->spec = spec;
      +
      +    if (require_line && *require_line) {
      +        const char *arg;
      +        func->args = apr_array_make(cmd->pool, 2, sizeof(const char *));
      +        while ((arg = ap_getword_conf(cmd->pool, &require_line)) && *arg) {
      +            APR_ARRAY_PUSH(func->args, const char *) = arg;
      +        }
      +    }
      +
      +    *parsed_require_line = func;
      +    return NULL;
      +}
      +
      +static authz_status lua_authz_check(request_rec *r, const char *require_line,
      +                                    const void *parsed_require_line)
      +{
      +    apr_pool_t *pool;
      +    ap_lua_vm_spec *spec;
      +    lua_State *L;
      +    ap_lua_server_cfg *server_cfg = ap_get_module_config(r->server->module_config,
      +                                                         &lua_module);
      +    const ap_lua_dir_cfg *cfg = ap_get_module_config(r->per_dir_config,
      +                                                     &lua_module);
      +    const lua_authz_provider_func *prov_func = parsed_require_line;
      +    const lua_authz_provider_spec *prov_spec = prov_func->spec;
      +    int result;
      +    int nargs = 0;
      +
      +    spec = create_vm_spec(&pool, r, cfg, server_cfg, prov_spec->file_name,
      +                          NULL, 0, prov_spec->function_name, "authz provider");
      +
      +    L = ap_lua_get_lua_state(pool, spec, r);
      +    if (L == NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02314)
      +                      "Unable to compile VM for authz provider %s", prov_spec->name);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +    lua_getglobal(L, prov_spec->function_name);
      +    if (!lua_isfunction(L, -1)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02319)
      +                      "Unable to find entry function '%s' in %s (not a valid function)",
      +                      prov_spec->function_name, prov_spec->file_name);
      +        ap_lua_release_state(L, spec, r);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +    ap_lua_run_lua_request(L, r);
      +    if (prov_func->args) {
      +        int i;
      +        if (!lua_checkstack(L, prov_func->args->nelts)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02315)
      +                          "Error: authz provider %s: too many arguments", prov_spec->name);
      +            ap_lua_release_state(L, spec, r);
      +            return AUTHZ_GENERAL_ERROR;
      +        }
      +        for (i = 0; i < prov_func->args->nelts; i++) {
      +            const char *arg = APR_ARRAY_IDX(prov_func->args, i, const char *);
      +            lua_pushstring(L, arg);
      +        }
      +        nargs = prov_func->args->nelts;
      +    }
      +    if (lua_pcall(L, 1 + nargs, 1, 0)) {
      +        const char *err = lua_tostring(L, -1);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02316)
      +                      "Error executing authz provider %s: %s", prov_spec->name, err);
      +        ap_lua_release_state(L, spec, r);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +    if (!lua_isnumber(L, -1)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02317)
      +                      "Error: authz provider %s did not return integer", prov_spec->name);
      +        ap_lua_release_state(L, spec, r);
      +        return AUTHZ_GENERAL_ERROR;
      +    }
      +    result = lua_tointeger(L, -1);
      +    ap_lua_release_state(L, spec, r);
      +    switch (result) {
      +        case AUTHZ_DENIED:
      +        case AUTHZ_GRANTED:
      +        case AUTHZ_NEUTRAL:
      +        case AUTHZ_GENERAL_ERROR:
      +        case AUTHZ_DENIED_NO_USER:
      +            return result;
      +        default:
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02318)
      +                          "Error: authz provider %s: invalid return value %d",
      +                          prov_spec->name, result);
      +    }
      +    return AUTHZ_GENERAL_ERROR;
      +}
      +
      +static const authz_provider lua_authz_provider =
      +{
      +    &lua_authz_check,
      +    &lua_authz_parse,
      +};
      +
      +static const char *register_authz_provider(cmd_parms *cmd, void *_cfg,
      +                                           const char *name, const char *file,
      +                                           const char *function)
      +{
      +    lua_authz_provider_spec *spec;
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +    if (err)
      +        return err;
      +
      +    spec = apr_pcalloc(cmd->pool, sizeof(*spec));
      +    spec->name = name;
      +    spec->file_name = file;
      +    spec->function_name = function;
      +
      +    apr_hash_set(lua_authz_providers, name, APR_HASH_KEY_STRING, spec);
      +    ap_register_auth_provider(cmd->pool, AUTHZ_PROVIDER_GROUP, name,
      +                              AUTHZ_PROVIDER_VERSION,
      +                              &lua_authz_provider,
      +                              AP_AUTH_INTERNAL_PER_CONF);
      +    return NULL;
      +}
      +
      +
       command_rec lua_commands[] = {
       
           AP_INIT_TAKE1("LuaRoot", register_lua_root, NULL, OR_ALL,
      @@ -1019,12 +1841,13 @@ command_rec lua_commands[] = {
           AP_INIT_TAKE1("LuaPackageCPath", register_package_cdir, NULL, OR_ALL,
                         "Add a directory to lua's package.cpath"),
       
      -    AP_INIT_TAKE23("LuaMapHandler", lua_map_handler, NULL, OR_ALL,
      -                   "Map a path to a lua handler"),
      +    AP_INIT_TAKE3("LuaAuthzProvider", register_authz_provider, NULL, RSRC_CONF|EXEC_ON_READ,
      +                  "Provide an authorization provider"),
       
           AP_INIT_TAKE23("LuaHookTranslateName", register_translate_name_hook, NULL,
                         OR_ALL,
                         "Provide a hook for the translate name phase of request processing"),
      +
           AP_INIT_RAW_ARGS("<LuaHookTranslateName", register_translate_name_block,
                            NULL,
                            EXEC_ON_READ | OR_ALL,
      @@ -1083,14 +1906,22 @@ command_rec lua_commands[] = {
           AP_INIT_TAKE2("LuaHookInsertFilter", register_insert_filter_hook, NULL,
                         OR_ALL,
                         "Provide a hook for the insert_filter phase of request processing"),
      -
      -    AP_INIT_TAKE1("LuaCodeCache", register_code_cache, NULL, OR_ALL,
      -                  "Configure the compiled code cache. \
      -                   Default is to stat the file each time, options are stat|forever|never"),
      +    
      +    AP_INIT_TAKE2("LuaHookLog", register_log_transaction_hook, NULL,
      +                  OR_ALL,
      +                  "Provide a hook for the logging phase of request processing"),
       
           AP_INIT_TAKE123("LuaScope", register_lua_scope, NULL, OR_ALL,
                           "One of once, request, conn, server -- default is once"),
       
      +    AP_INIT_TAKE1("LuaInherit", register_lua_inherit, NULL, OR_ALL,
      +     "Controls how Lua scripts in parent contexts are merged with the current " 
      +     " context: none|parent-last|parent-first (default: parent-first) "),
      +    
      +    AP_INIT_TAKE1("LuaCodeCache", register_lua_codecache, NULL, OR_ALL,
      +     "Controls the behavior of the in-memory code cache " 
      +     " context: stat|forever|never (default: stat) "),
      +
           AP_INIT_TAKE2("LuaQuickHandler", register_quick_hook, NULL, OR_ALL,
                         "Provide a hook for the quick handler of request processing"),
           AP_INIT_RAW_ARGS("<LuaQuickHandler", register_quick_block, NULL,
      @@ -1099,6 +1930,12 @@ command_rec lua_commands[] = {
           AP_INIT_RAW_ARGS("Lua_____ByteCodeHack", hack_section_handler, NULL,
                            OR_ALL,
                            "(internal) Byte code handler"),
      +    AP_INIT_TAKE23("LuaMapHandler", register_map_handler, NULL, OR_ALL,
      +                  "Maps a path to a lua handler"),
      +    AP_INIT_TAKE3("LuaOutputFilter", register_output_filter, NULL, OR_ALL,
      +                  "Registers a Lua function as an output filter"),
      +    AP_INIT_TAKE3("LuaInputFilter", register_input_filter, NULL, OR_ALL,
      +                  "Registers a Lua function as an input filter"),
           {NULL}
       };
       
      @@ -1110,11 +1947,17 @@ static void *create_dir_config(apr_pool_t *p, char *dir)
           cfg->package_cpaths = apr_array_make(p, 2, sizeof(char *));
           cfg->mapped_handlers =
               apr_array_make(p, 1, sizeof(ap_lua_mapped_handler_spec *));
      -    cfg->code_cache_style = APL_CODE_CACHE_STAT;
      +    cfg->mapped_filters =
      +        apr_array_make(p, 1, sizeof(ap_lua_filter_handler_spec *));
           cfg->pool = p;
           cfg->hooks = apr_hash_make(p);
           cfg->dir = apr_pstrdup(p, dir);
      -    cfg->vm_scope = APL_SCOPE_ONCE;
      +    cfg->vm_scope = AP_LUA_SCOPE_UNSET;
      +    cfg->codecache = AP_LUA_CACHE_UNSET;
      +    cfg->vm_min = 0;
      +    cfg->vm_max = 0;
      +    cfg->inherit = AP_LUA_INHERIT_UNSET;
      +
           return cfg;
       }
       
      @@ -1131,12 +1974,8 @@ static void *create_server_config(apr_pool_t *p, server_rec *s)
       {
       
           ap_lua_server_cfg *cfg = apr_pcalloc(p, sizeof(ap_lua_server_cfg));
      -    cfg->code_cache = apr_pcalloc(p, sizeof(ap_lua_code_cache));
      -    apr_thread_rwlock_create(&cfg->code_cache->compiled_files_lock, p);
      -    cfg->code_cache->compiled_files = apr_hash_make(p);
           cfg->vm_reslists = apr_hash_make(p);
           apr_thread_rwlock_create(&cfg->vm_reslists_lock, p);
      -    cfg->code_cache->pool = p;
           cfg->root_path = NULL;
       
           return cfg;
      @@ -1148,12 +1987,110 @@ static int lua_request_hook(lua_State *L, request_rec *r)
           return OK;
       }
       
      +static int lua_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
      +                            apr_pool_t *ptemp)
      +{
      +    ap_mutex_register(pconf, "lua-ivm-shm", NULL, APR_LOCK_DEFAULT, 0);
      +    return OK;
      +}
      +
       static int lua_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                    apr_pool_t *ptemp, server_rec *s)
       {
      +    apr_pool_t **pool;
      +    const char *tempdir;
      +    apr_status_t rs;
      +
           lua_ssl_val = APR_RETRIEVE_OPTIONAL_FN(ssl_var_lookup);
      +    lua_ssl_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
      +    
      +    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
      +        return OK;
      +
      +    /* Create ivm mutex */
      +    rs = ap_global_mutex_create(&lua_ivm_mutex, NULL, "lua-ivm-shm", NULL,
      +                            s, pconf, 0);
      +    if (APR_SUCCESS != rs) {
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +
      +    /* Create shared memory space */
      +    rs = apr_temp_dir_get(&tempdir, pconf);
      +    if (rs != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02664)
      +                 "mod_lua IVM: Failed to find temporary directory");
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +    lua_ivm_shmfile = apr_psprintf(pconf, "%s/httpd_lua_shm.%ld", tempdir,
      +                           (long int)getpid());
      +    rs = apr_shm_create(&lua_ivm_shm, sizeof(apr_pool_t**),
      +                    (const char *) lua_ivm_shmfile, pconf);
      +    if (rs != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rs, s, APLOGNO(02665)
      +            "mod_lua: Failed to create shared memory segment on file %s",
      +                     lua_ivm_shmfile);
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +    pool = (apr_pool_t **)apr_shm_baseaddr_get(lua_ivm_shm);
      +    apr_pool_create(pool, pconf);
      +    apr_pool_cleanup_register(pconf, NULL, shm_cleanup_wrapper,
      +                          apr_pool_cleanup_null);
           return OK;
       }
      +static void *overlay_hook_specs(apr_pool_t *p,
      +                                        const void *key,
      +                                        apr_ssize_t klen,
      +                                        const void *overlay_val,
      +                                        const void *base_val,
      +                                        const void *data)
      +{
      +    const apr_array_header_t *overlay_info = (const apr_array_header_t*)overlay_val;
      +    const apr_array_header_t *base_info = (const apr_array_header_t*)base_val;
      +    return apr_array_append(p, base_info, overlay_info);
      +}
      +
      +static void *merge_dir_config(apr_pool_t *p, void *basev, void *overridesv)
      +{
      +    ap_lua_dir_cfg *a, *base, *overrides;
      +
      +    a         = (ap_lua_dir_cfg *)apr_pcalloc(p, sizeof(ap_lua_dir_cfg));
      +    base      = (ap_lua_dir_cfg*)basev;
      +    overrides = (ap_lua_dir_cfg*)overridesv;
      +
      +    a->pool = overrides->pool;
      +    a->dir = apr_pstrdup(p, overrides->dir);
      +
      +    a->vm_scope = (overrides->vm_scope == AP_LUA_SCOPE_UNSET) ? base->vm_scope: overrides->vm_scope;
      +    a->inherit = (overrides->inherit == AP_LUA_INHERIT_UNSET) ? base->inherit : overrides->inherit;
      +    a->codecache = (overrides->codecache == AP_LUA_CACHE_UNSET) ? base->codecache : overrides->codecache;
      +    
      +    a->vm_min = (overrides->vm_min == 0) ? base->vm_min : overrides->vm_min;
      +    a->vm_max = (overrides->vm_max == 0) ? base->vm_max : overrides->vm_max;
      +
      +    if (a->inherit == AP_LUA_INHERIT_UNSET || a->inherit == AP_LUA_INHERIT_PARENT_FIRST) { 
      +        a->package_paths = apr_array_append(p, base->package_paths, overrides->package_paths);
      +        a->package_cpaths = apr_array_append(p, base->package_cpaths, overrides->package_cpaths);
      +        a->mapped_handlers = apr_array_append(p, base->mapped_handlers, overrides->mapped_handlers);
      +        a->mapped_filters = apr_array_append(p, base->mapped_filters, overrides->mapped_filters);
      +        a->hooks = apr_hash_merge(p, overrides->hooks, base->hooks, overlay_hook_specs, NULL);
      +    }
      +    else if (a->inherit == AP_LUA_INHERIT_PARENT_LAST) { 
      +        a->package_paths = apr_array_append(p, overrides->package_paths, base->package_paths);
      +        a->package_cpaths = apr_array_append(p, overrides->package_cpaths, base->package_cpaths);
      +        a->mapped_handlers = apr_array_append(p, overrides->mapped_handlers, base->mapped_handlers);
      +        a->mapped_filters = apr_array_append(p, overrides->mapped_filters, base->mapped_filters);
      +        a->hooks = apr_hash_merge(p, base->hooks, overrides->hooks, overlay_hook_specs, NULL);
      +    }
      +    else { 
      +        a->package_paths = overrides->package_paths;
      +        a->package_cpaths = overrides->package_cpaths;
      +        a->mapped_handlers= overrides->mapped_handlers;
      +        a->mapped_filters= overrides->mapped_filters;
      +        a->hooks= overrides->hooks;
      +    }
      +
      +    return a;
      +}
       
       static void lua_register_hooks(apr_pool_t *p)
       {
      @@ -1174,13 +2111,16 @@ static void lua_register_hooks(apr_pool_t *p)
           ap_hook_map_to_storage(lua_map_to_storage_harness, NULL, NULL,
                                  APR_HOOK_MIDDLE);
       
      -    ap_hook_check_user_id(lua_check_user_id_harness_first, NULL, NULL,
      +/*  XXX: Does not work :(  
      + *  ap_hook_check_user_id(lua_check_user_id_harness_first, NULL, NULL,
                                 AP_LUA_HOOK_FIRST);
      + */
           ap_hook_check_user_id(lua_check_user_id_harness, NULL, NULL,
                                  APR_HOOK_MIDDLE);
      -    ap_hook_check_user_id(lua_check_user_id_harness_last, NULL, NULL,
      +/*  XXX: Does not work :(
      + * ap_hook_check_user_id(lua_check_user_id_harness_last, NULL, NULL,
                                 AP_LUA_HOOK_LAST);
      -
      +*/
           ap_hook_type_checker(lua_type_checker_harness, NULL, NULL,
                                APR_HOOK_MIDDLE);
       
      @@ -1201,20 +2141,33 @@ static void lua_register_hooks(apr_pool_t *p)
                                 APR_HOOK_MIDDLE);
           ap_hook_quick_handler(lua_quick_harness, NULL, NULL, APR_HOOK_FIRST);
       
      -    ap_hook_translate_name(lua_alias_munger, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_post_config(lua_post_config, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_pre_config(lua_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
       
           APR_OPTIONAL_HOOK(ap_lua, lua_open, lua_open_hook, NULL, NULL,
                             APR_HOOK_REALLY_FIRST);
       
           APR_OPTIONAL_HOOK(ap_lua, lua_request, lua_request_hook, NULL, NULL,
                             APR_HOOK_REALLY_FIRST);
      +    ap_hook_handler(lua_map_handler, NULL, NULL, AP_LUA_HOOK_FIRST);
      +    
      +    /* Hook this right before FallbackResource kicks in */
      +    ap_hook_fixups(lua_map_handler_fixups, NULL, NULL, AP_LUA_HOOK_LAST-2);
      +#if APR_HAS_THREADS
      +    ap_hook_child_init(ap_lua_init_mutex, NULL, NULL, APR_HOOK_MIDDLE);
      +#endif
      +    /* providers */
      +    lua_authz_providers = apr_hash_make(p);
      +    
      +    /* Logging catcher */
      +    ap_hook_log_transaction(lua_log_transaction_harness,NULL,NULL,
      +                            APR_HOOK_FIRST);
       }
       
       AP_DECLARE_MODULE(lua) = {
           STANDARD20_MODULE_STUFF,
           create_dir_config,          /* create per-dir    config structures */
      -    NULL,                       /* merge  per-dir    config structures */
      +    merge_dir_config,           /* merge  per-dir    config structures */
           create_server_config,       /* create per-server config structures */
           NULL,                       /* merge  per-server config structures */
           lua_commands,               /* table of config file commands       */
      diff --git a/modules/lua/mod_lua.dep b/modules/lua/mod_lua.dep
      new file mode 100644
      index 00000000000..126b7ceafd4
      --- /dev/null
      +++ b/modules/lua/mod_lua.dep
      @@ -0,0 +1,418 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_lua.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\lua_apr.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\lua_apr.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      +
      +.\lua_config.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\lua_config.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      +
      +.\lua_dbd.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\database\mod_dbd.h"\
      +	".\lua_dbd.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      +
      +.\lua_passwd.c : \
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\lua_passwd.h"\
      +	
      +
      +.\lua_request.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_cookies.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\database\mod_dbd.h"\
      +	".\lua_apr.h"\
      +	".\lua_dbd.h"\
      +	".\lua_passwd.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      +
      +.\lua_vmprep.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\lua_config.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      +
      +.\mod_lua.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_varbuf.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_thread_rwlock.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\ssl\mod_ssl.h"\
      +	".\lua_apr.h"\
      +	".\lua_config.h"\
      +	".\lua_request.h"\
      +	".\lua_vmprep.h"\
      +	".\mod_lua.h"\
      +	
      diff --git a/modules/lua/mod_lua.dsp b/modules/lua/mod_lua.dsp
      index e7e79f4f751..ef3294ed13d 100644
      --- a/modules/lua/mod_lua.dsp
      +++ b/modules/lua/mod_lua.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fd"Release\mod_lua_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /I "../database" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fd"Release\mod_lua_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -52,8 +52,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so
      -# ADD LINK32 kernel32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so /opt:ref /libpath:"../../srclib/lua/src"
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /out:".\Release\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so
      +# ADD LINK32 kernel32.lib ws2_32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so /opt:ref /libpath:"../../srclib/lua/src"
       # Begin Special Build Tool
       TargetPath=.\Release\mod_lua.so
       SOURCE="$(InputPath)"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fd"Debug\mod_lua_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /I "../database" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fd"Debug\mod_lua_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      @@ -84,8 +84,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so
      -# ADD LINK32 kernel32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so /libpath:"../../srclib/lua/src"
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so
      +# ADD LINK32 kernel32.lib ws2_32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lua.so" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so /libpath:"../../srclib/lua/src"
       # Begin Special Build Tool
       TargetPath=.\Debug\mod_lua.so
       SOURCE="$(InputPath)"
      @@ -117,6 +117,14 @@ SOURCE=.\lua_config.h
       # End Source File
       # Begin Source File
       
      +SOURCE=.\lua_passwd.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=.\lua_passwd.h
      +# End Source File
      +# Begin Source File
      +
       SOURCE=.\lua_request.c
       # End Source File
       # Begin Source File
      @@ -141,6 +149,14 @@ SOURCE=.\mod_lua.h
       # End Source File
       # Begin Source File
       
      +SOURCE=.\lua_dbd.c
      +# End Source File
      +# Begin Source File
      +
      +SOURCE=.\lua_dbd.h
      +# End Source File
      +# Begin Source File
      +
       SOURCE=..\..\build\win32\httpd.rc
       # End Source File
       # End Target
      diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h
      index a152e00ee7e..7fd115330b2 100644
      --- a/modules/lua/mod_lua.h
      +++ b/modules/lua/mod_lua.h
      @@ -39,11 +39,21 @@
       #include "apr_file_info.h"
       #include "apr_time.h"
       #include "apr_hooks.h"
      +#include "apr_reslist.h"
      +
      +/* Allow for Lua 5.2 backwards compatibility */
      +#define LUA_COMPAT_ALL
       
       #include "lua.h"
       #include "lauxlib.h"
       #include "lualib.h"
       
      +#if LUA_VERSION_NUM > 501
      +/* Load mode for lua_load() */
      +#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
      +#define lua_resume(a,b)   lua_resume(a, NULL, b)
      +#endif
      +
       /* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and
        * AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
        */
      @@ -69,6 +79,12 @@
       #include "lua_request.h"
       #include "lua_vmprep.h"
       
      +typedef enum {
      +    AP_LUA_INHERIT_UNSET        = -1,
      +    AP_LUA_INHERIT_NONE         =  0,
      +    AP_LUA_INHERIT_PARENT_FIRST =  1,
      +    AP_LUA_INHERIT_PARENT_LAST  =  2
      +} ap_lua_inherit_t;
       
       /**
        * make a userdata out of a C pointer, and vice versa
      @@ -87,34 +103,38 @@ typedef struct
           apr_array_header_t *package_cpaths;
       
           /**
      -     * mapped handlers
      +     * mapped handlers/filters
            */
           apr_array_header_t *mapped_handlers;
      +    apr_array_header_t *mapped_filters;
       
           apr_pool_t *pool;
       
           /**
      -     * CODE_CACHE_STAT | CODE_CACHE_FOREVER | CODE_CACHE_NEVER
      -     */
      -    unsigned int code_cache_style;
      -
      -    /**
      -     * APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER
      +     * AP_LUA_SCOPE_ONCE | AP_LUA_SCOPE_REQUEST | AP_LUA_SCOPE_CONN | AP_LUA_SCOPE_SERVER
            */
           unsigned int vm_scope;
      -    unsigned int vm_server_pool_min;
      -    unsigned int vm_server_pool_max;
      +    unsigned int vm_min;
      +    unsigned int vm_max;
       
           /* info for the hook harnesses */
           apr_hash_t *hooks;          /* <wombat_hook_info> */
       
           /* the actual directory being configured */
      -    char *dir;
      +    const char *dir;
      +  
      +    /* Whether Lua scripts in a sub-dir are run before parents */
      +    ap_lua_inherit_t inherit;
      +    
      +    /**
      +     * AP_LUA_CACHE_NEVER | AP_LUA_CACHE_STAT | AP_LUA_CACHE_FOREVER
      +     */
      +    unsigned int codecache;
      +
       } ap_lua_dir_cfg;
       
       typedef struct
       {
      -    ap_lua_code_cache *code_cache;
           apr_hash_t *vm_reslists;
           apr_thread_rwlock_t *vm_reslists_lock;
       
      @@ -124,7 +144,7 @@ typedef struct
       
       typedef struct
       {
      -    char *function_name;
      +    const char *function_name;
           ap_lua_vm_spec *spec;
       } mapped_request_details;
       
      @@ -137,7 +157,7 @@ typedef struct
       typedef struct
       {
           lua_State *L;
      -    char *function;
      +    const char *function;
       } ap_lua_filter_ctx;
       
       extern module AP_MODULE_DECLARE_DATA lua_module;
      @@ -148,6 +168,9 @@ APR_DECLARE_EXTERNAL_HOOK(ap_lua, AP_LUA, int, lua_open,
       APR_DECLARE_EXTERNAL_HOOK(ap_lua, AP_LUA, int, lua_request,
                                 (lua_State *L, request_rec *r))
       
      -AP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r, const char *var);
      +const char *ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_rec *c,
      +                           request_rec *r, const char *var);
      +
      +int ap_lua_ssl_is_https(conn_rec *c);
       
       #endif /* !_MOD_LUA_H_ */
      diff --git a/modules/lua/mod_lua.mak b/modules/lua/mod_lua.mak
      new file mode 100644
      index 00000000000..114d6bd3445
      --- /dev/null
      +++ b/modules/lua/mod_lua.mak
      @@ -0,0 +1,407 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_lua.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_lua - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_lua - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_lua - Win32 Release" && "$(CFG)" != "mod_lua - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_lua.mak" CFG="mod_lua - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_lua - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_lua - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lua - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lua.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_lua.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\lua_apr.obj"
      +	-@erase "$(INTDIR)\lua_config.obj"
      +	-@erase "$(INTDIR)\lua_dbd.obj"
      +	-@erase "$(INTDIR)\lua_passwd.obj"
      +	-@erase "$(INTDIR)\lua_request.obj"
      +	-@erase "$(INTDIR)\lua_vmprep.obj"
      +	-@erase "$(INTDIR)\mod_lua.obj"
      +	-@erase "$(INTDIR)\mod_lua.res"
      +	-@erase "$(INTDIR)\mod_lua_src.idb"
      +	-@erase "$(INTDIR)\mod_lua_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lua.exp"
      +	-@erase "$(OUTDIR)\mod_lua.lib"
      +	-@erase "$(OUTDIR)\mod_lua.pdb"
      +	-@erase "$(OUTDIR)\mod_lua.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /I "../database" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lua_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lua.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lua.so" /d LONG_NAME="lua_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lua.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lua.pdb" /debug /out:"$(OUTDIR)\mod_lua.so" /implib:"$(OUTDIR)\mod_lua.lib" /libpath:"../../srclib/lua/src" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\lua_apr.obj" \
      +	"$(INTDIR)\lua_config.obj" \
      +	"$(INTDIR)\lua_passwd.obj" \
      +	"$(INTDIR)\lua_request.obj" \
      +	"$(INTDIR)\lua_vmprep.obj" \
      +	"$(INTDIR)\mod_lua.obj" \
      +	"$(INTDIR)\lua_dbd.obj" \
      +	"$(INTDIR)\mod_lua.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_lua.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_lua.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lua.so"
      +   if exist .\Release\mod_lua.so.manifest mt.exe -manifest .\Release\mod_lua.so.manifest -outputresource:.\Release\mod_lua.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lua.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_lua.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\lua_apr.obj"
      +	-@erase "$(INTDIR)\lua_config.obj"
      +	-@erase "$(INTDIR)\lua_dbd.obj"
      +	-@erase "$(INTDIR)\lua_passwd.obj"
      +	-@erase "$(INTDIR)\lua_request.obj"
      +	-@erase "$(INTDIR)\lua_vmprep.obj"
      +	-@erase "$(INTDIR)\mod_lua.obj"
      +	-@erase "$(INTDIR)\mod_lua.res"
      +	-@erase "$(INTDIR)\mod_lua_src.idb"
      +	-@erase "$(INTDIR)\mod_lua_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lua.exp"
      +	-@erase "$(OUTDIR)\mod_lua.lib"
      +	-@erase "$(OUTDIR)\mod_lua.pdb"
      +	-@erase "$(OUTDIR)\mod_lua.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/lua/src" /I "../ssl" /I "../database" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "AP_LUA_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lua_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lua.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lua.so" /d LONG_NAME="lua_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lua.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib lua51.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lua.pdb" /debug /out:"$(OUTDIR)\mod_lua.so" /implib:"$(OUTDIR)\mod_lua.lib" /libpath:"../../srclib/lua/src" /base:@..\..\os\win32\BaseAddr.ref,mod_lua.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\lua_apr.obj" \
      +	"$(INTDIR)\lua_config.obj" \
      +	"$(INTDIR)\lua_passwd.obj" \
      +	"$(INTDIR)\lua_request.obj" \
      +	"$(INTDIR)\lua_vmprep.obj" \
      +	"$(INTDIR)\mod_lua.obj" \
      +	"$(INTDIR)\lua_dbd.obj" \
      +	"$(INTDIR)\mod_lua.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_lua.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_lua.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lua.so"
      +   if exist .\Debug\mod_lua.so.manifest mt.exe -manifest .\Debug\mod_lua.so.manifest -outputresource:.\Debug\mod_lua.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_lua.dep")
      +!INCLUDE "mod_lua.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_lua.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_lua - Win32 Release" || "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_lua - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\lua"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\lua"
      +
      +!ELSEIF  "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\lua"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\lua"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lua - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\lua"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\lua"
      +
      +!ELSEIF  "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\lua"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\lua"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lua - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\lua"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\lua"
      +
      +!ELSEIF  "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\lua"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\lua"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_lua - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_lua.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lua.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_lua.so" /d LONG_NAME="lua_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_lua - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_lua.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lua.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_lua.so" /d LONG_NAME="lua_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\lua_apr.c
      +
      +"$(INTDIR)\lua_apr.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lua_config.c
      +
      +"$(INTDIR)\lua_config.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lua_dbd.c
      +
      +"$(INTDIR)\lua_dbd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lua_passwd.c
      +
      +"$(INTDIR)\lua_passwd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lua_request.c
      +
      +"$(INTDIR)\lua_request.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\lua_vmprep.c
      +
      +"$(INTDIR)\lua_vmprep.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\mod_lua.c
      +
      +"$(INTDIR)\mod_lua.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/lua/test/htdocs/test.lua b/modules/lua/test/htdocs/test.lua
      old mode 100755
      new mode 100644
      diff --git a/modules/lua/test/test.lua b/modules/lua/test/test.lua
      index 59ef00aec8d..25da4d9dadd 100755
      --- a/modules/lua/test/test.lua
      +++ b/modules/lua/test/test.lua
      @@ -18,7 +18,7 @@
       local mu = require "moonunit" 
       local http = require "helpers"
       
      -http.base_url = "http://localhost:8000"
      +http.base_url = "http://localhost:8008"
       
       local test = mu.TestCase:new{}
       
      diff --git a/modules/lua/test/test_httpd.conf b/modules/lua/test/test_httpd.conf
      old mode 100755
      new mode 100644
      diff --git a/modules/mappers/config9.m4 b/modules/mappers/config9.m4
      index 0564daad1e1..55a97ab9932 100644
      --- a/modules/mappers/config9.m4
      +++ b/modules/mappers/config9.m4
      @@ -5,12 +5,12 @@ dnl APACHE_MODULE(name, helptext[, objects[, structname[, default[, config]]]])
       APACHE_MODPATH_INIT(mappers)
       
       APACHE_MODULE(vhost_alias, mass virtual hosting module, , , most)
      -APACHE_MODULE(negotiation, content negotiation, , , yes)
      +APACHE_MODULE(negotiation, content negotiation, , , most)
       APACHE_MODULE(dir, directory request handling, , , yes)
       APACHE_MODULE(imagemap, server-side imagemaps, , , no)
      -APACHE_MODULE(actions, Action triggering on requests, , , yes)
      +APACHE_MODULE(actions, Action triggering on requests, , , most)
       APACHE_MODULE(speling, correct common URL misspellings, , , most)
      -APACHE_MODULE(userdir, mapping of requests to user-specific directories, , , yes)
      +APACHE_MODULE(userdir, mapping of requests to user-specific directories, , , most)
       APACHE_MODULE(alias, mapping of requests to different filesystem parts, , , yes)
       APACHE_MODULE(rewrite, rule based URL manipulation, , , most)
       
      diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c
      index e1691c98c77..2a67a2742ae 100644
      --- a/modules/mappers/mod_actions.c
      +++ b/modules/mappers/mod_actions.c
      @@ -118,7 +118,7 @@ static const char *set_script(cmd_parms *cmd, void *m_v,
           }
           else {
               /* ap_method_register recognizes already registered methods,
      -         * so don't bother to check its previous existence explicitely.
      +         * so don't bother to check its previous existence explicitly.
                */
               methnum = ap_method_register(cmd->pool, method);
           }
      @@ -187,7 +187,7 @@ static int action_handler(request_rec *r)
       
           if (action && (t = apr_table_get(conf->action_types, action))) {
               if (*t++ == '0' && r->finfo.filetype == APR_NOFILE) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00652)
                                 "File does not exist: %s", r->filename);
                   return HTTP_NOT_FOUND;
               }
      diff --git a/modules/mappers/mod_actions.dep b/modules/mappers/mod_actions.dep
      new file mode 100644
      index 00000000000..9bfdaf17bcf
      --- /dev/null
      +++ b/modules/mappers/mod_actions.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_actions.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_actions.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_actions.mak b/modules/mappers/mod_actions.mak
      new file mode 100644
      index 00000000000..28ec1e0e5c1
      --- /dev/null
      +++ b/modules/mappers/mod_actions.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_actions.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_actions - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_actions - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_actions - Win32 Release" && "$(CFG)" != "mod_actions - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_actions.mak" CFG="mod_actions - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_actions - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_actions - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_actions - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_actions.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_actions.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_actions.obj"
      +	-@erase "$(INTDIR)\mod_actions.res"
      +	-@erase "$(INTDIR)\mod_actions_src.idb"
      +	-@erase "$(INTDIR)\mod_actions_src.pdb"
      +	-@erase "$(OUTDIR)\mod_actions.exp"
      +	-@erase "$(OUTDIR)\mod_actions.lib"
      +	-@erase "$(OUTDIR)\mod_actions.pdb"
      +	-@erase "$(OUTDIR)\mod_actions.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_actions_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_actions.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_actions.so" /d LONG_NAME="actions_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_actions.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_actions.pdb" /debug /out:"$(OUTDIR)\mod_actions.so" /implib:"$(OUTDIR)\mod_actions.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_actions.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_actions.obj" \
      +	"$(INTDIR)\mod_actions.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_actions.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_actions.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_actions.so"
      +   if exist .\Release\mod_actions.so.manifest mt.exe -manifest .\Release\mod_actions.so.manifest -outputresource:.\Release\mod_actions.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_actions.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_actions.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_actions.obj"
      +	-@erase "$(INTDIR)\mod_actions.res"
      +	-@erase "$(INTDIR)\mod_actions_src.idb"
      +	-@erase "$(INTDIR)\mod_actions_src.pdb"
      +	-@erase "$(OUTDIR)\mod_actions.exp"
      +	-@erase "$(OUTDIR)\mod_actions.lib"
      +	-@erase "$(OUTDIR)\mod_actions.pdb"
      +	-@erase "$(OUTDIR)\mod_actions.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_actions_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_actions.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_actions.so" /d LONG_NAME="actions_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_actions.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_actions.pdb" /debug /out:"$(OUTDIR)\mod_actions.so" /implib:"$(OUTDIR)\mod_actions.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_actions.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_actions.obj" \
      +	"$(INTDIR)\mod_actions.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_actions.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_actions.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_actions.so"
      +   if exist .\Debug\mod_actions.so.manifest mt.exe -manifest .\Debug\mod_actions.so.manifest -outputresource:.\Debug\mod_actions.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_actions.dep")
      +!INCLUDE "mod_actions.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_actions.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_actions - Win32 Release" || "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_actions - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_actions - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_actions - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_actions - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_actions.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_actions.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_actions.so" /d LONG_NAME="actions_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_actions - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_actions.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_actions.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_actions.so" /d LONG_NAME="actions_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_actions.c
      +
      +"$(INTDIR)\mod_actions.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c
      index e0a17eacfb0..22a90aa80c2 100644
      --- a/modules/mappers/mod_alias.c
      +++ b/modules/mappers/mod_alias.c
      @@ -34,6 +34,7 @@
       #include "http_config.h"
       #include "http_request.h"
       #include "http_log.h"
      +#include "ap_expr.h"
       
       
       typedef struct {
      @@ -50,11 +51,20 @@ typedef struct {
       } alias_server_conf;
       
       typedef struct {
      +    unsigned int alias_set:1;
      +    unsigned int redirect_set:1;
           apr_array_header_t *redirects;
      +    const ap_expr_info_t *alias;
      +    char *handler;
      +    const ap_expr_info_t *redirect;
      +    int redirect_status;                /* 301, 302, 303, 410, etc */
       } alias_dir_conf;
       
       module AP_MODULE_DECLARE_DATA alias_module;
       
      +static char magic_error_value;
      +#define PREGSUB_ERROR      (&magic_error_value)
      +
       static void *create_alias_config(apr_pool_t *p, server_rec *s)
       {
           alias_server_conf *a =
      @@ -91,7 +101,17 @@ static void *merge_alias_dir_config(apr_pool_t *p, void *basev, void *overridesv
           (alias_dir_conf *) apr_pcalloc(p, sizeof(alias_dir_conf));
           alias_dir_conf *base = (alias_dir_conf *) basev;
           alias_dir_conf *overrides = (alias_dir_conf *) overridesv;
      +
           a->redirects = apr_array_append(p, overrides->redirects, base->redirects);
      +
      +    a->alias = (overrides->alias_set == 0) ? base->alias : overrides->alias;
      +    a->handler = (overrides->alias_set == 0) ? base->handler : overrides->handler;
      +    a->alias_set = overrides->alias_set || base->alias_set;
      +
      +    a->redirect = (overrides->redirect_set == 0) ? base->redirect : overrides->redirect;
      +    a->redirect_status = (overrides->redirect_set == 0) ? base->redirect_status : overrides->redirect_status;
      +    a->redirect_set = overrides->redirect_set || base->redirect_set;
      +
           return a;
       }
       
      @@ -111,6 +131,12 @@ static const char *add_alias_internal(cmd_parms *cmd, void *dummy,
       
           /* XXX: real can NOT be relative to DocumentRoot here... compat bug. */
       
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
      +
      +    if (err != NULL) {
      +        return err;
      +    }
      +
           if (use_regex) {
               new->regexp = ap_pregcomp(cmd->pool, fake, AP_REG_EXTENDED);
               if (new->regexp == NULL)
      @@ -137,7 +163,7 @@ static const char *add_alias_internal(cmd_parms *cmd, void *dummy,
       
                   if (  (!alias->regexp &&  alias_matches(fake, alias->fake) > 0)
                       || (alias->regexp && !ap_regexec(alias->regexp, fake, 0, NULL, 0))) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00671)
                                    "The %s directive in %s at line %d will probably "
                                    "never match because it overlaps an earlier "
                                    "%sAlias%s.",
      @@ -155,9 +181,41 @@ static const char *add_alias_internal(cmd_parms *cmd, void *dummy,
       }
       
       static const char *add_alias(cmd_parms *cmd, void *dummy, const char *fake,
      -                             const char *real)
      +        const char *real)
       {
      -    return add_alias_internal(cmd, dummy, fake, real, 0);
      +    if (real) {
      +
      +        return add_alias_internal(cmd, dummy, fake, real, 0);
      +
      +    }
      +    else {
      +        alias_dir_conf *dirconf = (alias_dir_conf *) dummy;
      +
      +        const char *err = ap_check_cmd_context(cmd, NOT_IN_DIRECTORY|NOT_IN_FILES);
      +
      +        if (err != NULL) {
      +            return err;
      +        }
      +
      +        if (!cmd->path) {
      +            return "Alias must have two arguments when used globally";
      +        }
      +
      +        dirconf->alias =
      +                ap_expr_parse_cmd(cmd, fake, AP_EXPR_FLAG_STRING_RESULT,
      +                        &err, NULL);
      +        if (err) {
      +            return apr_pstrcat(cmd->temp_pool,
      +                    "Cannot parse alias expression '", fake, "': ", err,
      +                    NULL);
      +        }
      +
      +        dirconf->handler = cmd->info;
      +        dirconf->alias_set = 1;
      +
      +        return NULL;
      +
      +    }
       }
       
       static const char *add_alias_regex(cmd_parms *cmd, void *dummy,
      @@ -194,16 +252,64 @@ static const char *add_redirect_internal(cmd_parms *cmd,
               status = HTTP_MOVED_TEMPORARILY;
           else if (!strcasecmp(arg1, "seeother"))
               status = HTTP_SEE_OTHER;
      -    else if (!strcasecmp(arg1, "gone"))
      +    else if (!strcasecmp(arg1, "gone")) {
               status = HTTP_GONE;
      -    else if (apr_isdigit(*arg1))
      +        grokarg1 = -1;
      +    }
      +    else if (apr_isdigit(*arg1)) {
               status = atoi(arg1);
      -    else
      +        if (!ap_is_HTTP_REDIRECT(status)) {
      +            grokarg1 = -1;
      +        }
      +    }
      +    else {
               grokarg1 = 0;
      +    }
       
           if (arg3 && !grokarg1)
               return "Redirect: invalid first argument (of three)";
       
      +    /*
      +     * if we have the 2nd arg and we understand the 1st one as a redirect
      +     * status (3xx, but not things like 404 /robots.txt), or if we have the
      +     * 1st arg but don't understand it, we use the expression syntax assuming
      +     * a path from the location.
      +     *
      +     * if we understand the first arg but have no second arg, we are dealing
      +     * with a status like "GONE" or a non-redirect status (e.g. 404, 503).
      +     */
      +    if (!cmd->path) {
      +        /* <Location> context only for now */
      +        ;
      +    }
      +    else if ((grokarg1 > 0 && arg2 && !arg3) || (!grokarg1 && !arg2)) {
      +        const char *expr_err = NULL;
      +
      +        url = grokarg1 ? arg2 : arg1;
      +        dirconf->redirect =
      +                ap_expr_parse_cmd(cmd, url, AP_EXPR_FLAG_STRING_RESULT,
      +                        &expr_err, NULL);
      +        if (expr_err) {
      +            return apr_pstrcat(cmd->temp_pool,
      +                    "Cannot parse redirect expression '", url, "': ", expr_err,
      +                    NULL);
      +        }
      +
      +        dirconf->redirect_status = status;
      +        dirconf->redirect_set = 1;
      +
      +        return NULL;
      +
      +    }
      +    else if (grokarg1 < 0 && !arg2) {
      +
      +        dirconf->redirect_status = status;
      +        dirconf->redirect_set = 1;
      +
      +        return NULL;
      +
      +    }
      +
           /*
            * if we don't have the 3rd arg and we didn't understand the 1st
            * one, then assume URL-path URL. This also handles case, eg, GONE
      @@ -269,11 +375,11 @@ static const char *add_redirect_regex(cmd_parms *cmd, void *dirconf,
       
       static const command_rec alias_cmds[] =
       {
      -    AP_INIT_TAKE2("Alias", add_alias, NULL, RSRC_CONF,
      -                  "a fakename and a realname"),
      -    AP_INIT_TAKE2("ScriptAlias", add_alias, "cgi-script", RSRC_CONF,
      -                  "a fakename and a realname"),
      -    AP_INIT_TAKE23("Redirect", add_redirect, (void *) HTTP_MOVED_TEMPORARILY,
      +    AP_INIT_TAKE12("Alias", add_alias, NULL, RSRC_CONF | ACCESS_CONF,
      +                  "a fakename and a realname, or a realname in a Location"),
      +    AP_INIT_TAKE12("ScriptAlias", add_alias, "cgi-script", RSRC_CONF | ACCESS_CONF,
      +                  "a fakename and a realname, or a realname in a Location"),
      +    AP_INIT_TAKE123("Redirect", add_redirect, (void *) HTTP_MOVED_TEMPORARILY,
                          OR_FILEINFO,
                          "an optional status, then document to be redirected and "
                          "destination URL"),
      @@ -333,8 +439,79 @@ static int alias_matches(const char *uri, const char *alias_fakename)
           return urip - uri;
       }
       
      -static char magic_error_value;
      -#define PREGSUB_ERROR      (&magic_error_value)
      +static char *try_alias(request_rec *r)
      +{
      +    alias_dir_conf *dirconf =
      +            (alias_dir_conf *) ap_get_module_config(r->per_dir_config, &alias_module);
      +
      +    if (dirconf->alias) {
      +        const char *err = NULL;
      +
      +        char *found = apr_pstrdup(r->pool,
      +                ap_expr_str_exec(r, dirconf->alias, &err));
      +        if (err) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02825)
      +                          "Can't evaluate alias expression: %s", err);
      +            return PREGSUB_ERROR;
      +        }
      +
      +        if (dirconf->handler) { /* Set handler, and leave a note for mod_cgi */
      +            r->handler = dirconf->handler;
      +            apr_table_setn(r->notes, "alias-forced-type", r->handler);
      +        }
      +        /* XXX This is as SLOW as can be, next step, we optimize
      +         * and merge to whatever part of the found path was already
      +         * canonicalized.  After I finish eliminating os canonical.
      +         * Better fail test for ap_server_root_relative needed here.
      +         */
      +        found = ap_server_root_relative(r->pool, found);
      +        return found;
      +
      +    }
      +
      +    return NULL;
      +}
      +
      +static char *try_redirect(request_rec *r, int *status)
      +{
      +    alias_dir_conf *dirconf =
      +            (alias_dir_conf *) ap_get_module_config(r->per_dir_config, &alias_module);
      +
      +    if (dirconf->redirect_set) {
      +        apr_uri_t uri;
      +        const char *err = NULL;
      +        char *found = "";
      +
      +        if (dirconf->redirect) {
      +
      +            found = apr_pstrdup(r->pool,
      +                    ap_expr_str_exec(r, dirconf->redirect, &err));
      +            if (err) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02826)
      +                              "Can't evaluate redirect expression: %s", err);
      +                return PREGSUB_ERROR;
      +            }
      +
      +            apr_uri_parse(r->pool, found, &uri);
      +            /* Do not escape the query string or fragment. */
      +            found = apr_uri_unparse(r->pool, &uri, APR_URI_UNP_OMITQUERY);
      +            found = ap_escape_uri(r->pool, found);
      +            if (uri.query) {
      +                found = apr_pstrcat(r->pool, found, "?", uri.query, NULL);
      +            }
      +            if (uri.fragment) {
      +                found = apr_pstrcat(r->pool, found, "#", uri.fragment, NULL);
      +            }
      +
      +        }
      +
      +        *status = dirconf->redirect_status;
      +        return found;
      +
      +    }
      +
      +    return NULL;
      +}
       
       static char *try_alias_list(request_rec *r, apr_array_header_t *aliases,
                                   int is_redir, int *status)
      @@ -370,20 +547,9 @@ static char *try_alias_list(request_rec *r, apr_array_header_t *aliases,
                                                           uri.fragment, NULL);
                                   }
                              }
      -                       else {
      -                           int pathlen = strlen(found) -
      -                                         (strlen(r->uri + regm[0].rm_eo));
      -                           AP_DEBUG_ASSERT(pathlen >= 0);
      -                           AP_DEBUG_ASSERT(pathlen <= strlen(found));
      -                           ap_set_context_info(r,
      -                                               apr_pstrmemdup(r->pool, r->uri,
      -                                                              regm[0].rm_eo),
      -                                               apr_pstrmemdup(r->pool, found,
      -                                                              pathlen));
      -                       }
                           }
                           else {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00672)
                                             "Regex substitution in '%s' failed. "
                                             "Replacement too long?", alias->real);
                               return PREGSUB_ERROR;
      @@ -446,7 +612,9 @@ static int translate_alias_redir(request_rec *r)
               return DECLINED;
           }
       
      -    if ((ret = try_alias_list(r, serverconf->redirects, 1, &status)) != NULL) {
      +    if ((ret = try_redirect(r, &status)) != NULL
      +            || (ret = try_alias_list(r, serverconf->redirects, 1, &status))
      +                    != NULL) {
               if (ret == PREGSUB_ERROR)
                   return HTTP_INTERNAL_SERVER_ERROR;
               if (ap_is_HTTP_REDIRECT(status)) {
      @@ -454,14 +622,14 @@ static int translate_alias_redir(request_rec *r)
                       char *orig_target = ret;
       
                       ret = ap_construct_url(r->pool, ret, r);
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00673)
                                     "incomplete redirection target of '%s' for "
                                     "URI '%s' modified to '%s'",
                                     orig_target, r->uri, ret);
                   }
                   if (!ap_is_url(ret)) {
                       status = HTTP_INTERNAL_SERVER_ERROR;
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00674)
                                     "cannot redirect '%s' to '%s'; "
                                     "target is not a valid absoluteURI or abs_path",
                                     r->uri, ret);
      @@ -479,7 +647,9 @@ static int translate_alias_redir(request_rec *r)
               return status;
           }
       
      -    if ((ret = try_alias_list(r, serverconf->aliases, 0, &status)) != NULL) {
      +    if ((ret = try_alias(r)) != NULL
      +            || (ret = try_alias_list(r, serverconf->aliases, 0, &status))
      +                    != NULL) {
               r->filename = ret;
               return OK;
           }
      @@ -497,7 +667,9 @@ static int fixup_redir(request_rec *r)
       
           /* It may have changed since last time, so try again */
       
      -    if ((ret = try_alias_list(r, dirconf->redirects, 1, &status)) != NULL) {
      +    if ((ret = try_redirect(r, &status)) != NULL
      +            || (ret = try_alias_list(r, dirconf->redirects, 1, &status))
      +                    != NULL) {
               if (ret == PREGSUB_ERROR)
                   return HTTP_INTERNAL_SERVER_ERROR;
               if (ap_is_HTTP_REDIRECT(status)) {
      @@ -505,14 +677,14 @@ static int fixup_redir(request_rec *r)
                       char *orig_target = ret;
       
                       ret = ap_construct_url(r->pool, ret, r);
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00675)
                                     "incomplete redirection target of '%s' for "
                                     "URI '%s' modified to '%s'",
                                     orig_target, r->uri, ret);
                   }
                   if (!ap_is_url(ret)) {
                       status = HTTP_INTERNAL_SERVER_ERROR;
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00676)
                                     "cannot redirect '%s' to '%s'; "
                                     "target is not a valid absoluteURI or abs_path",
                                     r->uri, ret);
      diff --git a/modules/mappers/mod_alias.dep b/modules/mappers/mod_alias.dep
      new file mode 100644
      index 00000000000..fab6805b2cf
      --- /dev/null
      +++ b/modules/mappers/mod_alias.dep
      @@ -0,0 +1,51 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_alias.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_alias.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_alias.mak b/modules/mappers/mod_alias.mak
      new file mode 100644
      index 00000000000..17ad406f946
      --- /dev/null
      +++ b/modules/mappers/mod_alias.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_alias.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_alias - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_alias - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_alias - Win32 Release" && "$(CFG)" != "mod_alias - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_alias.mak" CFG="mod_alias - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_alias - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_alias - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_alias - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_alias.obj"
      +	-@erase "$(INTDIR)\mod_alias.res"
      +	-@erase "$(INTDIR)\mod_alias_src.idb"
      +	-@erase "$(INTDIR)\mod_alias_src.pdb"
      +	-@erase "$(OUTDIR)\mod_alias.exp"
      +	-@erase "$(OUTDIR)\mod_alias.lib"
      +	-@erase "$(OUTDIR)\mod_alias.pdb"
      +	-@erase "$(OUTDIR)\mod_alias.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_alias_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_alias.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_alias.so" /d LONG_NAME="alias_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_alias.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_alias.pdb" /debug /out:"$(OUTDIR)\mod_alias.so" /implib:"$(OUTDIR)\mod_alias.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_alias.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_alias.obj" \
      +	"$(INTDIR)\mod_alias.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_alias.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_alias.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_alias.so"
      +   if exist .\Release\mod_alias.so.manifest mt.exe -manifest .\Release\mod_alias.so.manifest -outputresource:.\Release\mod_alias.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_alias.obj"
      +	-@erase "$(INTDIR)\mod_alias.res"
      +	-@erase "$(INTDIR)\mod_alias_src.idb"
      +	-@erase "$(INTDIR)\mod_alias_src.pdb"
      +	-@erase "$(OUTDIR)\mod_alias.exp"
      +	-@erase "$(OUTDIR)\mod_alias.lib"
      +	-@erase "$(OUTDIR)\mod_alias.pdb"
      +	-@erase "$(OUTDIR)\mod_alias.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_alias_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_alias.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_alias.so" /d LONG_NAME="alias_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_alias.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_alias.pdb" /debug /out:"$(OUTDIR)\mod_alias.so" /implib:"$(OUTDIR)\mod_alias.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_alias.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_alias.obj" \
      +	"$(INTDIR)\mod_alias.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_alias.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_alias.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_alias.so"
      +   if exist .\Debug\mod_alias.so.manifest mt.exe -manifest .\Debug\mod_alias.so.manifest -outputresource:.\Debug\mod_alias.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_alias.dep")
      +!INCLUDE "mod_alias.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_alias.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_alias - Win32 Release" || "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_alias - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_alias - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_alias - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_alias - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_alias.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_alias.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_alias.so" /d LONG_NAME="alias_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_alias - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_alias.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_alias.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_alias.so" /d LONG_NAME="alias_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_alias.c
      +
      +"$(INTDIR)\mod_alias.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_dir.c b/modules/mappers/mod_dir.c
      index 4386dba67ac..50cef26ec8c 100644
      --- a/modules/mappers/mod_dir.c
      +++ b/modules/mappers/mod_dir.c
      @@ -29,21 +29,23 @@
       #include "http_log.h"
       #include "http_main.h"
       #include "util_script.h"
      +#include "mod_rewrite.h"
       
       module AP_MODULE_DECLARE_DATA dir_module;
       
       typedef enum {
      -    SLASH_OFF = 0,
      -    SLASH_ON,
      -    SLASH_UNSET
      -} slash_cfg;
      +    MODDIR_OFF = 0,
      +    MODDIR_ON,
      +    MODDIR_UNSET
      +} moddir_cfg;
       
       #define REDIRECT_OFF   0
       #define REDIRECT_UNSET 1
       
       typedef struct dir_config_struct {
           apr_array_header_t *index_names;
      -    slash_cfg do_slash;
      +    moddir_cfg do_slash;
      +    moddir_cfg checkhandler;
           int redirect_index;
           const char *dflt;
       } dir_config_rec;
      @@ -66,8 +68,9 @@ static const char *add_index(cmd_parms *cmd, void *dummy, const char *arg)
                   /* peek to see if "disabled" is first in a series of arguments */
                   const char *tt = t;
                   const char *ww = ap_getword_conf(cmd->temp_pool, &tt);
      -            if (ww == NULL || !ww[0]) {
      +            if (ww[0] == '\0') {
                      /* "disabled" is first, and alone */
      +               apr_array_clear(d->index_names); 
                      break;
                   }
               }
      @@ -82,7 +85,14 @@ static const char *configure_slash(cmd_parms *cmd, void *d_, int arg)
       {
           dir_config_rec *d = d_;
       
      -    d->do_slash = arg ? SLASH_ON : SLASH_OFF;
      +    d->do_slash = arg ? MODDIR_ON : MODDIR_OFF;
      +    return NULL;
      +}
      +static const char *configure_checkhandler(cmd_parms *cmd, void *d_, int arg)
      +{
      +    dir_config_rec *d = d_;
      +
      +    d->checkhandler = arg ? MODDIR_ON : MODDIR_OFF;
           return NULL;
       }
       static const char *configure_redirect(cmd_parms *cmd, void *d_, const char *arg1)
      @@ -122,6 +132,8 @@ static const command_rec dir_cmds[] =
                           "a list of file names"),
           AP_INIT_FLAG("DirectorySlash", configure_slash, NULL, DIR_CMD_PERMS,
                        "On or Off"),
      +    AP_INIT_FLAG("DirectoryCheckHandler", configure_checkhandler, NULL, DIR_CMD_PERMS,
      +                 "On or Off"),
           AP_INIT_TAKE1("DirectoryIndexRedirect", configure_redirect,
                          NULL, DIR_CMD_PERMS, "On, Off, or a 3xx status code."),
       
      @@ -133,7 +145,8 @@ static void *create_dir_config(apr_pool_t *p, char *dummy)
           dir_config_rec *new = apr_pcalloc(p, sizeof(dir_config_rec));
       
           new->index_names = NULL;
      -    new->do_slash = SLASH_UNSET;
      +    new->do_slash = MODDIR_UNSET;
      +    new->checkhandler = MODDIR_UNSET;
           new->redirect_index = REDIRECT_UNSET;
           return (void *) new;
       }
      @@ -146,7 +159,9 @@ static void *merge_dir_configs(apr_pool_t *p, void *basev, void *addv)
       
           new->index_names = add->index_names ? add->index_names : base->index_names;
           new->do_slash =
      -        (add->do_slash == SLASH_UNSET) ? base->do_slash : add->do_slash;
      +        (add->do_slash == MODDIR_UNSET) ? base->do_slash : add->do_slash;
      +    new->checkhandler =
      +        (add->checkhandler == MODDIR_UNSET) ? base->checkhandler : add->checkhandler;
           new->redirect_index=
               (add->redirect_index == REDIRECT_UNSET) ? base->redirect_index : add->redirect_index;
           new->dflt = add->dflt ? add->dflt : base->dflt;
      @@ -161,7 +176,7 @@ static int fixup_dflt(request_rec *r)
           int error_notfound = 0;
       
           name_ptr = d->dflt;
      -    if (name_ptr == NULL) {
      +    if ((name_ptr == NULL) || !(strcasecmp(name_ptr,"disabled"))){
               return DECLINED;
           }
           /* XXX: if FallbackResource points to something that doesn't exist,
      @@ -247,7 +262,7 @@ static int fixup_dir(request_rec *r)
       
               if (r->args != NULL) {
                   ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri),
      -                                "/", "?", r->args, NULL);
      +                                "/?", r->args, NULL);
               }
               else {
                   ifile = apr_pstrcat(r->pool, ap_escape_uri(r->pool, r->uri),
      @@ -259,6 +274,23 @@ static int fixup_dir(request_rec *r)
               return HTTP_MOVED_PERMANENTLY;
           }
       
      +    /* we're running between mod_rewrites fixup and its internal redirect handler, step aside */
      +    if (!strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) { 
      +        /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
      +        if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) { 
      +            r->content_type = NULL;
      +        }
      +        return DECLINED;
      +    }
      +
      +    if (d->checkhandler == MODDIR_ON && strcmp(r->handler, DIR_MAGIC_TYPE)) {
      +        /* Prevent DIR_MAGIC_TYPE from leaking out when someone has taken over */
      +        if (!strcmp(r->content_type, DIR_MAGIC_TYPE)) { 
      +            r->content_type = NULL;
      +        }
      +        return DECLINED;
      +    }
      +
           if (d->index_names) {
               names_ptr = (char **)d->index_names->elts;
               num_names = d->index_names->nelts;
      diff --git a/modules/mappers/mod_dir.dep b/modules/mappers/mod_dir.dep
      new file mode 100644
      index 00000000000..e862f70e25e
      --- /dev/null
      +++ b/modules/mappers/mod_dir.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_dir.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_dir.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_rewrite.h"\
      +	
      diff --git a/modules/mappers/mod_dir.mak b/modules/mappers/mod_dir.mak
      new file mode 100644
      index 00000000000..d490010f340
      --- /dev/null
      +++ b/modules/mappers/mod_dir.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_dir.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_dir - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_dir - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_dir - Win32 Release" && "$(CFG)" != "mod_dir - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_dir.mak" CFG="mod_dir - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_dir - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_dir - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dir - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_dir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dir.obj"
      +	-@erase "$(INTDIR)\mod_dir.res"
      +	-@erase "$(INTDIR)\mod_dir_src.idb"
      +	-@erase "$(INTDIR)\mod_dir_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dir.exp"
      +	-@erase "$(OUTDIR)\mod_dir.lib"
      +	-@erase "$(OUTDIR)\mod_dir.pdb"
      +	-@erase "$(OUTDIR)\mod_dir.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dir_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dir.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_dir.so" /d LONG_NAME="dir_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dir.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dir.pdb" /debug /out:"$(OUTDIR)\mod_dir.so" /implib:"$(OUTDIR)\mod_dir.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dir.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dir.obj" \
      +	"$(INTDIR)\mod_dir.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dir.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_dir.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dir.so"
      +   if exist .\Release\mod_dir.so.manifest mt.exe -manifest .\Release\mod_dir.so.manifest -outputresource:.\Release\mod_dir.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_dir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_dir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_dir.obj"
      +	-@erase "$(INTDIR)\mod_dir.res"
      +	-@erase "$(INTDIR)\mod_dir_src.idb"
      +	-@erase "$(INTDIR)\mod_dir_src.pdb"
      +	-@erase "$(OUTDIR)\mod_dir.exp"
      +	-@erase "$(OUTDIR)\mod_dir.lib"
      +	-@erase "$(OUTDIR)\mod_dir.pdb"
      +	-@erase "$(OUTDIR)\mod_dir.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_dir_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_dir.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_dir.so" /d LONG_NAME="dir_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_dir.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_dir.pdb" /debug /out:"$(OUTDIR)\mod_dir.so" /implib:"$(OUTDIR)\mod_dir.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_dir.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_dir.obj" \
      +	"$(INTDIR)\mod_dir.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_dir.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_dir.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_dir.so"
      +   if exist .\Debug\mod_dir.so.manifest mt.exe -manifest .\Debug\mod_dir.so.manifest -outputresource:.\Debug\mod_dir.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_dir.dep")
      +!INCLUDE "mod_dir.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_dir.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_dir - Win32 Release" || "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_dir - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dir - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_dir - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_dir - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_dir.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dir.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_dir.so" /d LONG_NAME="dir_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_dir - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_dir.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_dir.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_dir.so" /d LONG_NAME="dir_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_dir.c
      +
      +"$(INTDIR)\mod_dir.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_imagemap.c b/modules/mappers/mod_imagemap.c
      index c3de930df56..187a500a5d2 100644
      --- a/modules/mappers/mod_imagemap.c
      +++ b/modules/mappers/mod_imagemap.c
      @@ -176,7 +176,7 @@ static int pointinpoly(const double point[2], double pgon[MAXVERTS][2])
           int i, numverts, crossings = 0;
           double x = point[X], y = point[Y];
       
      -    for (numverts = 0; pgon[numverts][X] != -1 && numverts < MAXVERTS;
      +    for (numverts = 0; numverts < MAXVERTS && pgon[numverts][X] != -1;
               numverts++) {
               /* just counting the vertexes */
           }
      @@ -316,7 +316,7 @@ static void read_quoted(char **string, char **quoted_part)
       /*
        * returns the mapped URL or NULL.
        */
      -static char *imap_url(request_rec *r, const char *base, const char *value)
      +static const char *imap_url(request_rec *r, const char *base, const char *value)
       {
       /* translates a value into a URL. */
           int slen, clen;
      @@ -338,7 +338,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
           if (!strcasecmp(value, "referer")) {
               referer = apr_table_get(r->headers_in, "Referer");
               if (referer && *referer) {
      -            return ap_escape_html(r->pool, referer);
      +            return referer;
               }
               else {
                   /* XXX:  This used to do *value = '\0'; ... which is totally bogus
      @@ -374,7 +374,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
           /* must be a relative URL to be combined with base */
           if (ap_strchr_c(base, '/') == NULL && (!strncmp(value, "../", 3)
               || !strcmp(value, ".."))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00677)
                           "invalid base directive in map file: %s", r->uri);
               return NULL;
           }
      @@ -434,7 +434,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
                                          value */
               }
               else if (directory) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00678)
                               "invalid directory name in map file: %s", r->uri);
                   return NULL;
               }
      @@ -455,7 +455,7 @@ static char *imap_url(request_rec *r, const char *base, const char *value)
           return my_base;
       }
       
      -static int imap_reply(request_rec *r, char *redirect)
      +static int imap_reply(request_rec *r, const char *redirect)
       {
           if (!strcasecmp(redirect, "error")) {
               /* they actually requested an error! */
      @@ -486,8 +486,6 @@ static void menu_header(request_rec *r, char *menu)
                         ap_escape_html(r->pool, r->uri),
                         "</h1>\n<hr />\n\n", NULL);
           }
      -
      -    return;
       }
       
       static void menu_blank(request_rec *r, char *menu)
      @@ -501,11 +499,11 @@ static void menu_blank(request_rec *r, char *menu)
           else if (!strcasecmp(menu, "unformatted")) {
               ap_rputs("\n", r);
           }
      -    return;
       }
       
       static void menu_comment(request_rec *r, char *menu, char *comment)
       {
      +    /* comments are ignored in the 'formatted' form */
           if (!strcasecmp(menu, "formatted")) {
               ap_rputs("\n", r);         /* print just a newline if 'formatted' */
           }
      @@ -515,48 +513,54 @@ static void menu_comment(request_rec *r, char *menu, char *comment)
           else if (!strcasecmp(menu, "unformatted") && *comment) {
               ap_rvputs(r, comment, "\n", NULL);
           }
      -    return;                     /* comments are ignored in the
      -                                   'formatted' form */
       }
       
      -static void menu_default(request_rec *r, char *menu, char *href, char *text)
      +static void menu_default(request_rec *r, const char *menu, const char *href, const char *text)
       {
      +    char *ehref, *etext;
           if (!strcasecmp(href, "error") || !strcasecmp(href, "nocontent")) {
               return;                 /* don't print such lines, these aren't
                                          really href's */
           }
      +
      +    ehref = ap_escape_uri(r->pool, href);
      +    etext = ap_escape_html(r->pool, text);
      +
           if (!strcasecmp(menu, "formatted")) {
      -        ap_rvputs(r, "<pre>(Default) <a href=\"", href, "\">", text,
      -               "</a></pre>\n", NULL);
      +        ap_rvputs(r, "<pre>(Default) <a href=\"", ehref, "\">", etext,
      +                     "</a></pre>\n", NULL);
           }
           else if (!strcasecmp(menu, "semiformatted")) {
      -        ap_rvputs(r, "<pre>(Default) <a href=\"", href, "\">", text,
      +        ap_rvputs(r, "<pre>(Default) <a href=\"", ehref, "\">", etext,
                      "</a></pre>\n", NULL);
           }
           else if (!strcasecmp(menu, "unformatted")) {
      -        ap_rvputs(r, "<a href=\"", href, "\">", text, "</a>", NULL);
      +        ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
           }
      -    return;
       }
       
      -static void menu_directive(request_rec *r, char *menu, char *href, char *text)
      +static void menu_directive(request_rec *r, const char *menu, const char *href, const char *text)
       {
      +    char *ehref, *etext;
           if (!strcasecmp(href, "error") || !strcasecmp(href, "nocontent")) {
               return;                 /* don't print such lines, as this isn't
                                          really an href */
           }
      +
      +    ehref = ap_escape_uri(r->pool, href);
      +    etext = ap_escape_html(r->pool, text);
      +
           if (!strcasecmp(menu, "formatted")) {
      -        ap_rvputs(r, "<pre>          <a href=\"", href, "\">", text,
      +        ap_rvputs(r, "<pre>          <a href=\"", ehref, "\">", etext,
                      "</a></pre>\n", NULL);
           }
           else if (!strcasecmp(menu, "semiformatted")) {
      -        ap_rvputs(r, "<pre>          <a href=\"", href, "\">", text,
      +        ap_rvputs(r, "<pre>          <a href=\"", ehref, "\">", etext,
                      "</a></pre>\n", NULL);
           }
           else if (!strcasecmp(menu, "unformatted")) {
      -        ap_rvputs(r, "<a href=\"", href, "\">", text, "</a>", NULL);
      +        ap_rvputs(r, "<a href=\"", ehref, "\">", etext, "</a>", NULL);
           }
      -    return;
       }
       
       static void menu_footer(request_rec *r)
      @@ -570,9 +574,9 @@ static int imap_handler_internal(request_rec *r)
           char *directive;
           char *value;
           char *href_text;
      -    char *base;
      -    char *redirect;
      -    char *mapdflt;
      +    const char *base;
      +    const char *redirect;
      +    const char *mapdflt;
           char *closest = NULL;
           double closest_yet = -1;
           apr_status_t status;
      @@ -676,7 +680,7 @@ static int imap_handler_internal(request_rec *r)
               if (!*string_pos) {   /* need at least two fields */
                   goto need_2_fields;
               }
      -        while(*string_pos && apr_isspace(*string_pos)) { /* past whitespace */
      +        while (apr_isspace(*string_pos)) { /* past whitespace */
                   ++string_pos;
               }
       
      @@ -844,7 +848,7 @@ static int imap_handler_internal(request_rec *r)
                                                        we failed. They lose! */
       
       need_2_fields:
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00679)
                       "map file %s, line %d syntax error: requires at "
                       "least two fields", r->uri, imap->line_number);
           /* fall through */
      diff --git a/modules/mappers/mod_imagemap.dep b/modules/mappers/mod_imagemap.dep
      new file mode 100644
      index 00000000000..357895ee033
      --- /dev/null
      +++ b/modules/mappers/mod_imagemap.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_imagemap.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_imagemap.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_imagemap.mak b/modules/mappers/mod_imagemap.mak
      new file mode 100644
      index 00000000000..da50a61d60d
      --- /dev/null
      +++ b/modules/mappers/mod_imagemap.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_imagemap.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_imagemap - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_imagemap - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_imagemap - Win32 Release" && "$(CFG)" != "mod_imagemap - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_imagemap.mak" CFG="mod_imagemap - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_imagemap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_imagemap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_imagemap - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_imagemap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_imagemap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_imagemap.obj"
      +	-@erase "$(INTDIR)\mod_imagemap.res"
      +	-@erase "$(INTDIR)\mod_imagemap_src.idb"
      +	-@erase "$(INTDIR)\mod_imagemap_src.pdb"
      +	-@erase "$(OUTDIR)\mod_imagemap.exp"
      +	-@erase "$(OUTDIR)\mod_imagemap.lib"
      +	-@erase "$(OUTDIR)\mod_imagemap.pdb"
      +	-@erase "$(OUTDIR)\mod_imagemap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_imagemap_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_imagemap.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_imagemap.so" /d LONG_NAME="imagemap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_imagemap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_imagemap.pdb" /debug /out:"$(OUTDIR)\mod_imagemap.so" /implib:"$(OUTDIR)\mod_imagemap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_imagemap.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_imagemap.obj" \
      +	"$(INTDIR)\mod_imagemap.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_imagemap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_imagemap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_imagemap.so"
      +   if exist .\Release\mod_imagemap.so.manifest mt.exe -manifest .\Release\mod_imagemap.so.manifest -outputresource:.\Release\mod_imagemap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_imagemap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_imagemap.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_imagemap.obj"
      +	-@erase "$(INTDIR)\mod_imagemap.res"
      +	-@erase "$(INTDIR)\mod_imagemap_src.idb"
      +	-@erase "$(INTDIR)\mod_imagemap_src.pdb"
      +	-@erase "$(OUTDIR)\mod_imagemap.exp"
      +	-@erase "$(OUTDIR)\mod_imagemap.lib"
      +	-@erase "$(OUTDIR)\mod_imagemap.pdb"
      +	-@erase "$(OUTDIR)\mod_imagemap.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_imagemap_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_imagemap.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_imagemap.so" /d LONG_NAME="imagemap_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_imagemap.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_imagemap.pdb" /debug /out:"$(OUTDIR)\mod_imagemap.so" /implib:"$(OUTDIR)\mod_imagemap.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_imagemap.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_imagemap.obj" \
      +	"$(INTDIR)\mod_imagemap.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_imagemap.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_imagemap.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_imagemap.so"
      +   if exist .\Debug\mod_imagemap.so.manifest mt.exe -manifest .\Debug\mod_imagemap.so.manifest -outputresource:.\Debug\mod_imagemap.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_imagemap.dep")
      +!INCLUDE "mod_imagemap.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_imagemap.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_imagemap - Win32 Release" || "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_imagemap - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_imagemap - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_imagemap - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_imagemap - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_imagemap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_imagemap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_imagemap.so" /d LONG_NAME="imagemap_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_imagemap - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_imagemap.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_imagemap.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_imagemap.so" /d LONG_NAME="imagemap_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_imagemap.c
      +
      +"$(INTDIR)\mod_imagemap.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c
      index fc13bcdc786..b008f5cb1b0 100644
      --- a/modules/mappers/mod_negotiation.c
      +++ b/modules/mappers/mod_negotiation.c
      @@ -366,7 +366,7 @@ static float atoq(const char *string)
               return  1.0f;
           }
       
      -    while (*string && apr_isspace(*string)) {
      +    while (apr_isspace(*string)) {
               ++string;
           }
       
      @@ -464,7 +464,7 @@ static const char *get_entry(apr_pool_t *p, accept_rec *result,
               }
       
               *cp++ = '\0';           /* Delimit var */
      -        while (*cp && (apr_isspace(*cp) || *cp == '=')) {
      +        while (apr_isspace(*cp) || *cp == '=') {
                   ++cp;
               }
       
      @@ -685,7 +685,7 @@ static void parse_negotiate_header(request_rec *r, negotiation_state *neg)
           }
       
       #ifdef NEG_DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00680)
                   "dont_fiddle_headers=%d use_rvsa=%d ua_supports_trans=%d "
                   "send_alternates=%d, may_choose=%d",
                   neg->dont_fiddle_headers, neg->use_rvsa,
      @@ -757,7 +757,7 @@ static enum header_state get_header_line(char *buffer, int len, apr_file_t *map)
       
           /* If blank, just return it --- this ends information on this variant */
       
      -    for (cp = buffer; (*cp && apr_isspace(*cp)); ++cp) {
      +    for (cp = buffer; apr_isspace(*cp); ++cp) {
               continue;
           }
       
      @@ -791,8 +791,9 @@ static enum header_state get_header_line(char *buffer, int len, apr_file_t *map)
                    */
       
                   while (c != '\n' && apr_isspace(c)) {
      -                if(apr_file_getc(&c, map) != APR_SUCCESS)
      +                if (apr_file_getc(&c, map) != APR_SUCCESS) {
                           break;
      +                }
                   }
       
                   apr_file_ungetc(c, map);
      @@ -828,33 +829,27 @@ static apr_off_t get_body(char *buffer, apr_size_t *len, const char *tag,
                                 apr_file_t *map)
       {
           char *endbody;
      -    int bodylen;
      -    int taglen;
      +    apr_size_t bodylen;
           apr_off_t pos;
       
      -    taglen = strlen(tag);
      -    *len -= taglen;
       
           /* We are at the first character following a body:tag\n entry
            * Suck in the body, then backspace to the first char after the
            * closing tag entry.  If we fail to read, find the tag or back
            * up then we have a hosed file, so give up already
            */
      +    --*len; /* Reserve space for '\0' */
           if (apr_file_read(map, buffer, len) != APR_SUCCESS) {
               return -1;
           }
      +    buffer[*len] = '\0';
       
      -    /* put a copy of the tag *after* the data read from the file
      -     * so that strstr() will find something with no reliance on
      -     * terminating '\0'
      -     */
      -    memcpy(buffer + *len, tag, taglen);
      -    endbody = strstr(buffer, tag);
      -    if (endbody == buffer + *len) {
      +    endbody = ap_strstr(buffer, tag);
      +    if (!endbody) {
               return -1;
           }
           bodylen = endbody - buffer;
      -    endbody += taglen;
      +    endbody += strlen(tag);
           /* Skip all the trailing cruft after the end tag to the next line */
           while (*endbody) {
               if (*endbody == '\n') {
      @@ -916,7 +911,7 @@ static char *lcase_header_name_return_body(char *header, request_rec *r)
           }
       
           if (!*cp) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00681)
                             "Syntax error in type map, no ':' in %s for header %s",
                             r->filename, header);
               return NULL;
      @@ -924,10 +919,10 @@ static char *lcase_header_name_return_body(char *header, request_rec *r)
       
           do {
               ++cp;
      -    } while (*cp && apr_isspace(*cp));
      +    } while (apr_isspace(*cp));
       
           if (!*cp) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00682)
                             "Syntax error in type map --- no header body: %s for %s",
                             r->filename, header);
               return NULL;
      @@ -955,7 +950,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
       
           if ((status = apr_file_open(map, rr->filename, APR_READ | APR_BUFFERED,
                       APR_OS_DEFAULT, neg->pool)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00683)
                             "cannot access type map file: %s", rr->filename);
               if (APR_STATUS_IS_ENOTDIR(status) || APR_STATUS_IS_ENOENT(status)) {
                   return HTTP_NOT_FOUND;
      @@ -999,7 +994,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
                       body1 = ap_get_token(neg->pool, &body, 0);
                       if (apr_strtoff(&number, body1, &errp, 10) != APR_SUCCESS
                           || *errp || number < 0) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00684)
                                         "Parse error in type map, Content-Length: "
                                         "'%s' in %s is invalid.",
                                         body1, r->filename);
      @@ -1034,7 +1029,7 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
                       while (--eol >= tag && apr_isspace(*eol))
                           *eol = '\0';
                       if ((mime_info.body = get_body(buffer, &len, tag, *map)) < 0) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00685)
                                         "Syntax error in type map, no end tag '%s'"
                                         "found in %s for Body: content.",
                                         tag, r->filename);
      @@ -1064,10 +1059,9 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
           return OK;
       }
       
      -
       /* Sort function used by read_types_multi. */
      -static int variantsortf(var_rec *a, var_rec *b) {
      -
      +static int variantsortf(var_rec *a, var_rec *b)
      +{
           /* First key is the source quality, sort in descending order. */
       
           /* XXX: note that we currently implement no method of setting the
      @@ -1119,7 +1113,7 @@ static int read_types_multi(negotiation_state *neg)
       
           if ((status = apr_dir_open(&dirp, neg->dir_name,
                                      neg->pool)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00686)
                           "cannot read directory for multi: %s", neg->dir_name);
               return HTTP_FORBIDDEN;
           }
      @@ -1291,7 +1285,7 @@ static int read_types_multi(negotiation_state *neg)
            * request must die.
            */
           if (anymatch && !neg->avail_vars->nelts) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00687)
                             "Negotiation: discovered file(s) matching request: %s"
                             " (None could be negotiated).",
                             r->filename);
      @@ -1707,7 +1701,7 @@ static void set_language_quality(negotiation_state *neg, var_rec *variant)
                    * we are allowed to use the prefix of in HTTP/1.1
                    */
                   char *lang = ((char **) (variant->content_languages->elts))[j];
      -            int idx = -1;
      +            int idx;
       
                   /* If we wish to fallback or
                    * we use our own LanguagePriority index.
      @@ -1733,7 +1727,6 @@ static void set_language_quality(negotiation_state *neg, var_rec *variant)
                   }
               }
           }
      -    return;
       }
       
       /* Determining the content length --- if the map didn't tell us,
      @@ -2063,7 +2056,7 @@ static int is_variant_better_rvsa(negotiation_state *neg, var_rec *variant,
           */
       
       #ifdef NEG_DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00688)
                  "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
                  "mimeq=%1.3f langq=%1.3f charq=%1.3f encq=%1.3f "
                  "q=%1.5f definite=%d",
      @@ -2134,7 +2127,7 @@ static int is_variant_better(negotiation_state *neg, var_rec *variant,
            */
       
       #ifdef NEG_DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00689)
                  "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
                  "mimeq=%1.3f langq=%1.3f langidx=%d charq=%1.3f encq=%1.3f ",
                   (variant->file_name ? variant->file_name : ""),
      @@ -2245,27 +2238,21 @@ static int is_variant_better(negotiation_state *neg, var_rec *variant,
        */
       static int variant_has_language(var_rec *variant, const char *lang)
       {
      -    int j, max;
      -
           /* fast exit */
           if (   !lang
      -        || !variant->content_languages
      -        || !(max = variant->content_languages->nelts)) {
      +        || !variant->content_languages) {
               return 0;
           }
       
      -    for (j = 0; j < max; ++j) {
      -        if (!strcmp(lang,
      -                    ((char **) (variant->content_languages->elts))[j])) {
      -            return 1;
      -        }
      +    if (ap_array_str_contains(variant->content_languages, lang)) {
      +        return 1;
           }
       
           return 0;
       }
       
       /* check for environment variables 'no-gzip' and
      - * 'gzip-only-text/html' to get a behaviour similiar
      + * 'gzip-only-text/html' to get a behaviour similar
        * to mod_deflate
        */
       static int discard_variant_by_env(var_rec *variant, int discard)
      @@ -2606,7 +2593,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg,
           }
       
           if (neg->is_transparent || vary_by_type || vary_by_language ||
      -        vary_by_language || vary_by_charset || vary_by_encoding) {
      +        vary_by_charset || vary_by_encoding) {
       
               apr_table_mergen(hdrs, "Vary", 2 + apr_pstrcat(r->pool,
                   neg->is_transparent ? ", negotiate"       : "",
      @@ -2656,9 +2643,9 @@ static char *make_variant_list(request_rec *r, negotiation_state *neg)
                * need to change the calculation of max_vlist_array above.
                */
               *((const char **) apr_array_push(arr)) = "<li><a href=\"";
      -        *((const char **) apr_array_push(arr)) = filename;
      +        *((const char **) apr_array_push(arr)) = ap_escape_path_segment(r->pool, filename);
               *((const char **) apr_array_push(arr)) = "\">";
      -        *((const char **) apr_array_push(arr)) = filename;
      +        *((const char **) apr_array_push(arr)) = ap_escape_html(r->pool, filename);
               *((const char **) apr_array_push(arr)) = "</a> ";
               *((const char **) apr_array_push(arr)) = description;
       
      @@ -2788,7 +2775,7 @@ static int setup_choice_response(request_rec *r, negotiation_state *neg,
            * see that Vary header yet at this point in the control flow.
            * This won't cause any cache consistency problems _unless_ the
            * CGI script also returns a Cache-Control header marking the
      -     * response as cachable.  This needs to be fixed, also there are
      +     * response as cacheable.  This needs to be fixed, also there are
            * problems if a CGI returns an Etag header which also need to be
            * fixed.
            */
      @@ -2890,7 +2877,7 @@ static int do_negotiation(request_rec *r, negotiation_state *neg,
       
                   /* Some HTTP/1.0 clients are known to choke when they get
                    * a 300 (multiple choices) response without a Location
      -             * header.  However the 300 code response we are are about
      +             * header.  However the 300 code response we are about
                    * to generate will only reach 1.0 clients which support
                    * transparent negotiation, and they should be OK. The
                    * response should never reach older 1.0 clients, even if
      @@ -2903,7 +2890,7 @@ static int do_negotiation(request_rec *r, negotiation_state *neg,
               }
       
               if (!*bestp) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00690)
                                 "no acceptable variant: %s", r->filename);
                   return HTTP_NOT_ACCEPTABLE;
               }
      @@ -2973,8 +2960,9 @@ static int handle_map_file(request_rec *r)
           char *udir;
           const char *new_req;
       
      -    if(strcmp(r->handler,MAP_FILE_MAGIC_TYPE) && strcmp(r->handler,"type-map"))
      +    if (strcmp(r->handler, MAP_FILE_MAGIC_TYPE) && strcmp(r->handler, "type-map")) {
               return DECLINED;
      +    }
       
           neg = parse_accept_headers(r);
           if ((res = read_type_map(&map, neg, r))) {
      @@ -2982,7 +2970,9 @@ static int handle_map_file(request_rec *r)
           }
       
           res = do_negotiation(r, neg, &best, 0);
      -    if (res != 0) return res;
      +    if (res != 0) {
      +        return res;
      +    }
       
           if (best->body)
           {
      @@ -3050,7 +3040,7 @@ static int handle_map_file(request_rec *r)
               e = apr_bucket_eos_create(c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(bb, e);
       
      -        return ap_pass_brigade(r->output_filters, bb);
      +        return ap_pass_brigade_fchk(r, bb, NULL);
           }
       
           if (r->path_info && *r->path_info) {
      @@ -3137,7 +3127,7 @@ static int handle_multi(request_rec *r)
           ap_internal_fast_redirect(sub_req, r);
       
           /* give no advise for time on this subrequest.  Perhaps we
      -     * should tally the last mtime amoung all variants, and date
      +     * should tally the last mtime among all variants, and date
            * the most recent, but that could confuse the proxies.
            */
           r->mtime = 0;
      diff --git a/modules/mappers/mod_negotiation.dep b/modules/mappers/mod_negotiation.dep
      new file mode 100644
      index 00000000000..93a58df7358
      --- /dev/null
      +++ b/modules/mappers/mod_negotiation.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_negotiation.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_negotiation.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_negotiation.mak b/modules/mappers/mod_negotiation.mak
      new file mode 100644
      index 00000000000..6de4c00e41e
      --- /dev/null
      +++ b/modules/mappers/mod_negotiation.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_negotiation.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_negotiation - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_negotiation - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_negotiation - Win32 Release" && "$(CFG)" != "mod_negotiation - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_negotiation.mak" CFG="mod_negotiation - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_negotiation - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_negotiation - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_negotiation - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_negotiation.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_negotiation.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_negotiation.obj"
      +	-@erase "$(INTDIR)\mod_negotiation.res"
      +	-@erase "$(INTDIR)\mod_negotiation_src.idb"
      +	-@erase "$(INTDIR)\mod_negotiation_src.pdb"
      +	-@erase "$(OUTDIR)\mod_negotiation.exp"
      +	-@erase "$(OUTDIR)\mod_negotiation.lib"
      +	-@erase "$(OUTDIR)\mod_negotiation.pdb"
      +	-@erase "$(OUTDIR)\mod_negotiation.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_negotiation_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_negotiation.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_negotiation.so" /d LONG_NAME="negotiation_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_negotiation.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_negotiation.pdb" /debug /out:"$(OUTDIR)\mod_negotiation.so" /implib:"$(OUTDIR)\mod_negotiation.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_negotiation.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_negotiation.obj" \
      +	"$(INTDIR)\mod_negotiation.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_negotiation.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_negotiation.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_negotiation.so"
      +   if exist .\Release\mod_negotiation.so.manifest mt.exe -manifest .\Release\mod_negotiation.so.manifest -outputresource:.\Release\mod_negotiation.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_negotiation.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_negotiation.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_negotiation.obj"
      +	-@erase "$(INTDIR)\mod_negotiation.res"
      +	-@erase "$(INTDIR)\mod_negotiation_src.idb"
      +	-@erase "$(INTDIR)\mod_negotiation_src.pdb"
      +	-@erase "$(OUTDIR)\mod_negotiation.exp"
      +	-@erase "$(OUTDIR)\mod_negotiation.lib"
      +	-@erase "$(OUTDIR)\mod_negotiation.pdb"
      +	-@erase "$(OUTDIR)\mod_negotiation.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_negotiation_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_negotiation.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_negotiation.so" /d LONG_NAME="negotiation_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_negotiation.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_negotiation.pdb" /debug /out:"$(OUTDIR)\mod_negotiation.so" /implib:"$(OUTDIR)\mod_negotiation.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_negotiation.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_negotiation.obj" \
      +	"$(INTDIR)\mod_negotiation.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_negotiation.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_negotiation.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_negotiation.so"
      +   if exist .\Debug\mod_negotiation.so.manifest mt.exe -manifest .\Debug\mod_negotiation.so.manifest -outputresource:.\Debug\mod_negotiation.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_negotiation.dep")
      +!INCLUDE "mod_negotiation.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_negotiation.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_negotiation - Win32 Release" || "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_negotiation - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_negotiation - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_negotiation - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_negotiation - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_negotiation.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_negotiation.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_negotiation.so" /d LONG_NAME="negotiation_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_negotiation - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_negotiation.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_negotiation.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_negotiation.so" /d LONG_NAME="negotiation_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_negotiation.c
      +
      +"$(INTDIR)\mod_negotiation.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
      index 014f591110f..dcf7988ed0d 100644
      --- a/modules/mappers/mod_rewrite.c
      +++ b/modules/mappers/mod_rewrite.c
      @@ -142,53 +142,61 @@ static const char* really_last_key = "rewrite_really_last";
       #define REDIRECT_ENVVAR_SCRIPT_URL "REDIRECT_" ENVVAR_SCRIPT_URL
       #define ENVVAR_SCRIPT_URI "SCRIPT_URI"
       
      -#define CONDFLAG_NONE               1<<0
      -#define CONDFLAG_NOCASE             1<<1
      -#define CONDFLAG_NOTMATCH           1<<2
      -#define CONDFLAG_ORNEXT             1<<3
      -#define CONDFLAG_NOVARY             1<<4
      -
      -#define RULEFLAG_NONE               1<<0
      -#define RULEFLAG_FORCEREDIRECT      1<<1
      -#define RULEFLAG_LASTRULE           1<<2
      -#define RULEFLAG_NEWROUND           1<<3
      -#define RULEFLAG_CHAIN              1<<4
      -#define RULEFLAG_IGNOREONSUBREQ     1<<5
      -#define RULEFLAG_NOTMATCH           1<<6
      -#define RULEFLAG_PROXY              1<<7
      -#define RULEFLAG_PASSTHROUGH        1<<8
      -#define RULEFLAG_QSAPPEND           1<<9
      -#define RULEFLAG_NOCASE             1<<10
      -#define RULEFLAG_NOESCAPE           1<<11
      -#define RULEFLAG_NOSUB              1<<12
      -#define RULEFLAG_STATUS             1<<13
      -#define RULEFLAG_ESCAPEBACKREF      1<<14
      -#define RULEFLAG_DISCARDPATHINFO    1<<15
      -#define RULEFLAG_QSDISCARD          1<<16
      -#define RULEFLAG_END                1<<17
      +#define CONDFLAG_NONE               (1<<0)
      +#define CONDFLAG_NOCASE             (1<<1)
      +#define CONDFLAG_NOTMATCH           (1<<2)
      +#define CONDFLAG_ORNEXT             (1<<3)
      +#define CONDFLAG_NOVARY             (1<<4)
      +
      +#define RULEFLAG_NONE               (1<<0)
      +#define RULEFLAG_FORCEREDIRECT      (1<<1)
      +#define RULEFLAG_LASTRULE           (1<<2)
      +#define RULEFLAG_NEWROUND           (1<<3)
      +#define RULEFLAG_CHAIN              (1<<4)
      +#define RULEFLAG_IGNOREONSUBREQ     (1<<5)
      +#define RULEFLAG_NOTMATCH           (1<<6)
      +#define RULEFLAG_PROXY              (1<<7)
      +#define RULEFLAG_PASSTHROUGH        (1<<8)
      +#define RULEFLAG_QSAPPEND           (1<<9)
      +#define RULEFLAG_NOCASE             (1<<10)
      +#define RULEFLAG_NOESCAPE           (1<<11)
      +#define RULEFLAG_NOSUB              (1<<12)
      +#define RULEFLAG_STATUS             (1<<13)
      +#define RULEFLAG_ESCAPEBACKREF      (1<<14)
      +#define RULEFLAG_DISCARDPATHINFO    (1<<15)
      +#define RULEFLAG_QSDISCARD          (1<<16)
      +#define RULEFLAG_END                (1<<17)
      +#define RULEFLAG_QSLAST             (1<<19)
       
       /* return code of the rewrite rule
        * the result may be escaped - or not
        */
      -#define ACTION_NORMAL               1<<0
      -#define ACTION_NOESCAPE             1<<1
      -#define ACTION_STATUS               1<<2
      -
      -
      -#define MAPTYPE_TXT                 1<<0
      -#define MAPTYPE_DBM                 1<<1
      -#define MAPTYPE_PRG                 1<<2
      -#define MAPTYPE_INT                 1<<3
      -#define MAPTYPE_RND                 1<<4
      -#define MAPTYPE_DBD                 1<<5
      -#define MAPTYPE_DBD_CACHE           1<<6
      -
      -#define ENGINE_DISABLED             1<<0
      -#define ENGINE_ENABLED              1<<1
      -
      -#define OPTION_NONE                 1<<0
      -#define OPTION_INHERIT              1<<1
      -#define OPTION_INHERIT_BEFORE       1<<2
      +#define ACTION_NORMAL               (1<<0)
      +#define ACTION_NOESCAPE             (1<<1)
      +#define ACTION_STATUS               (1<<2)
      +
      +
      +#define MAPTYPE_TXT                 (1<<0)
      +#define MAPTYPE_DBM                 (1<<1)
      +#define MAPTYPE_PRG                 (1<<2)
      +#define MAPTYPE_INT                 (1<<3)
      +#define MAPTYPE_RND                 (1<<4)
      +#define MAPTYPE_DBD                 (1<<5)
      +#define MAPTYPE_DBD_CACHE           (1<<6)
      +
      +#define ENGINE_DISABLED             (1<<0)
      +#define ENGINE_ENABLED              (1<<1)
      +
      +#define OPTION_NONE                 (1<<0)
      +#define OPTION_INHERIT              (1<<1)
      +#define OPTION_INHERIT_BEFORE       (1<<2)
      +#define OPTION_NOSLASH              (1<<3)
      +#define OPTION_ANYURI               (1<<4)
      +#define OPTION_MERGEBASE            (1<<5)
      +#define OPTION_INHERIT_DOWN         (1<<6)
      +#define OPTION_INHERIT_DOWN_BEFORE  (1<<7)
      +#define OPTION_IGNORE_INHERIT       (1<<8)
      +#define OPTION_IGNORE_CONTEXT_INFO  (1<<9)
       
       #ifndef RAND_MAX
       #define RAND_MAX 32767
      @@ -228,6 +236,9 @@ static const char* really_last_key = "rewrite_really_last";
       #define subreq_ok(r) (!r->main || \
           (r->main->uri && r->uri && strcmp(r->main->uri, r->uri)))
       
      +#ifndef REWRITE_MAX_ROUNDS
      +#define REWRITE_MAX_ROUNDS 32000
      +#endif
       
       /*
        * +-------------------------------------------------------+
      @@ -305,6 +316,7 @@ typedef struct {
           data_item *env;                  /* added environment variables           */
           data_item *cookie;               /* added cookies                         */
           int        skip;                 /* number of next rules to skip          */
      +    int        maxrounds;            /* limit on number of loops with N flag  */
       } rewriterule_entry;
       
       typedef struct {
      @@ -400,7 +412,7 @@ static int proxy_available;
       
       /* Locks/Mutexes */
       static apr_global_mutex_t *rewrite_mapr_lock_acquire = NULL;
      -const char *rewritemap_mutex_type = "rewrite-map";
      +static const char *rewritemap_mutex_type = "rewrite-map";
       
       /* Optional functions imported from mod_ssl when loaded: */
       static APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *rewrite_ssl_lookup = NULL;
      @@ -432,8 +444,7 @@ static void do_rewritelog(request_rec *r, int level, char *perdir,
           if (!APLOG_R_IS_LEVEL(r, APLOG_DEBUG + level))
               return;
       
      -    rhost = ap_get_remote_host(r->connection, r->per_dir_config,
      -                               REMOTE_NOLOOKUP, NULL);
      +    rhost = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL);
           rname = ap_get_remote_logname(r);
       
           for (redir=0, req=r; req->prev; req = req->prev) {
      @@ -462,6 +473,7 @@ static void do_rewritelog(request_rec *r, int level, char *perdir,
       
           AP_REWRITE_LOG((uintptr_t)r, level, r->main ? 0 : 1, (char *)ap_get_server_name(r), logline);
       
      +    /* Intentional no APLOGNO */
           ap_log_rerror(APLOG_MARK, APLOG_DEBUG + level, 0, r, "%s", logline);
       
           return;
      @@ -545,9 +557,17 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
                   return 7;
               }
               else if (!strncasecmp(uri, "ttps://", 7)) { /* https://  */
      -            /* *sqs = 1; */
      +            *sqs = 1;
                   return 8;
               }
      +        else if (!strncasecmp(uri, "2://", 4)) {    /* h2://     */
      +            *sqs = 1;
      +            return 5;
      +        }
      +        else if (!strncasecmp(uri, "2c://", 5)) {   /* h2c://    */
      +            *sqs = 1;
      +            return 6;
      +        }
               break;
       
           case 'l':
      @@ -582,6 +602,18 @@ static unsigned is_absolute_uri(char *uri, int *supportsqs)
                   return 7;
               }
               break;
      +
      +    case 'w':
      +    case 'W':
      +        if (!strncasecmp(uri, "s://", 4)) {        /* ws://     */
      +            *sqs = 1;
      +            return 5;
      +        }
      +        else if (!strncasecmp(uri, "ss://", 5)) {  /* wss://    */
      +            *sqs = 1;
      +            return 6;
      +        }
      +        break;
           }
       
           return 0;
      @@ -701,7 +733,8 @@ static char *escape_absolute_uri(apr_pool_t *p, char *uri, unsigned scheme)
        * split out a QUERY_STRING part from
        * the current URI string
        */
      -static void splitout_queryargs(request_rec *r, int qsappend, int qsdiscard)
      +static void splitout_queryargs(request_rec *r, int qsappend, int qsdiscard, 
      +                               int qslast)
       {
           char *q;
           int split;
      @@ -720,7 +753,8 @@ static void splitout_queryargs(request_rec *r, int qsappend, int qsdiscard)
               rewritelog((r, 2, NULL, "discarding query string"));
           }
       
      -    q = ap_strchr(r->filename, '?');
      +    q = qslast ? ap_strrchr(r->filename, '?') : ap_strchr(r->filename, '?');
      +
           if (q != NULL) {
               char *olduri;
               apr_size_t len;
      @@ -728,18 +762,23 @@ static void splitout_queryargs(request_rec *r, int qsappend, int qsdiscard)
               olduri = apr_pstrdup(r->pool, r->filename);
               *q++ = '\0';
               if (qsappend) {
      -            r->args = apr_pstrcat(r->pool, q, "&", r->args, NULL);
      +            if (*q) { 
      +                r->args = apr_pstrcat(r->pool, q, "&" , r->args, NULL);
      +            }
               }
               else {
                   r->args = apr_pstrdup(r->pool, q);
               }
       
      -        len = strlen(r->args);
      -        if (!len) {
      -            r->args = NULL;
      -        }
      -        else if (r->args[len-1] == '&') {
      -            r->args[len-1] = '\0';
      +        if (r->args) { 
      +           len = strlen(r->args);
      +      
      +           if (!len) {
      +               r->args = NULL;
      +           }
      +           else if (r->args[len-1] == '&') {
      +               r->args[len-1] = '\0';
      +           }
               }
       
               rewritelog((r, 3, NULL, "split uri=%s -> uri=%s, args=%s", olduri,
      @@ -887,7 +926,7 @@ static int prefix_stat(const char *path, apr_pool_t *pool)
       /*
        * substitute the prefix path 'match' in 'input' with 'subst' (RewriteBase)
        */
      -static char *subst_prefix_path(request_rec *r, char *input, char *match,
      +static char *subst_prefix_path(request_rec *r, char *input, const char *match,
                                      const char *subst)
       {
           apr_size_t len = strlen(match);
      @@ -1117,7 +1156,7 @@ static char *select_random_value_part(request_rec *r, char *value)
       static void rewrite_child_errfn(apr_pool_t *p, apr_status_t err,
                                       const char *desc)
       {
      -    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, "%s", desc);
      +    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, APLOGNO(00653) "%s", desc);
       }
       
       static apr_status_t rewritemap_program_child(apr_pool_t *p,
      @@ -1193,7 +1232,7 @@ static apr_status_t run_rewritemap_programs(server_rec *s, apr_pool_t *p)
               rc = rewritemap_program_child(p, map->argv[0], map->argv,
                                             &fpout, &fpin);
               if (rc != APR_SUCCESS || fpin == NULL || fpout == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rc, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rc, s, APLOGNO(00654)
                                "mod_rewrite: could not start RewriteMap "
                                "program %s", map->checkfile);
                   return rc;
      @@ -1224,7 +1263,7 @@ static char *lookup_map_txtfile(request_rec *r, const char *file, char *key)
           if ((rv = apr_file_open(&fp, file, APR_READ|APR_BUFFERED, APR_OS_DEFAULT,
                                   r->pool)) != APR_SUCCESS)
           {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00655)
                             "mod_rewrite: can't open text RewriteMap file %s", file);
               return NULL;
           }
      @@ -1252,7 +1291,7 @@ static char *lookup_map_txtfile(request_rec *r, const char *file, char *key)
               }
       
               /* jump to the value */
      -        while (*p && apr_isspace(*p)) {
      +        while (apr_isspace(*p)) {
                   ++p;
               }
       
      @@ -1286,7 +1325,7 @@ static char *lookup_map_dbmfile(request_rec *r, const char *file,
           if ((rv = apr_dbm_open_ex(&dbmfp, dbmtype, file, APR_DBM_READONLY,
                                     APR_OS_DEFAULT, r->pool)) != APR_SUCCESS)
           {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00656)
                             "mod_rewrite: can't open DBM RewriteMap %s", file);
               return NULL;
           }
      @@ -1312,9 +1351,16 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label)
           const char *errmsg;
           apr_dbd_results_t *res = NULL;
           apr_dbd_row_t *row = NULL;
      -    const char *ret = NULL;
      +    char *ret = NULL;
           int n = 0;
           ap_dbd_t *db = dbd_acquire(r);
      +    
      +    if (db == NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02963)
      +                      "rewritemap: No db handle available! "
      +                      "Check your database access");
      +        return NULL;
      +   }
       
           stmt = apr_hash_get(db->prepared, label, APR_HASH_KEY_STRING);
       
      @@ -1322,36 +1368,38 @@ static char *lookup_map_dbd(request_rec *r, char *key, const char *label)
                                 stmt, 0, key, NULL);
           if (rv != 0) {
               errmsg = apr_dbd_error(db->driver, db->handle, rv);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00657)
                             "rewritemap: error %s querying for %s", errmsg, key);
               return NULL;
           }
           while ((rv = apr_dbd_get_row(db->driver, r->pool, res, &row, -1)) == 0) {
               ++n;
               if (ret == NULL) {
      -            ret = apr_dbd_get_entry(db->driver, row, 0);
      +            ret = apr_pstrdup(r->pool,
      +                              apr_dbd_get_entry(db->driver, row, 0));
               }
               else {
                   /* randomise crudely amongst multiple results */
                   if ((double)rand() < (double)RAND_MAX/(double)n) {
      -                ret = apr_dbd_get_entry(db->driver, row, 0);
      +                ret = apr_pstrdup(r->pool,
      +                                  apr_dbd_get_entry(db->driver, row, 0));
                   }
               }
           }
           if (rv != -1) {
               errmsg = apr_dbd_error(db->driver, db->handle, rv);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00658)
                             "rewritemap: error %s looking up %s", errmsg, key);
           }
           switch (n) {
           case 0:
               return NULL;
           case 1:
      -        return apr_pstrdup(r->pool, ret);
      +        return ret;
           default:
               /* what's a fair rewritelog level for this? */
               rewritelog((r, 3, NULL, "Multiple values found for %s", key));
      -        return apr_pstrdup(r->pool, ret);
      +        return ret;
           }
       }
       
      @@ -1390,7 +1438,7 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
           if (rewrite_mapr_lock_acquire) {
               rv = apr_global_mutex_lock(rewrite_mapr_lock_acquire);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00659)
                                 "apr_global_mutex_lock(rewrite_mapr_lock_acquire) "
                                 "failed");
                   return NULL; /* Maybe this should be fatal? */
      @@ -1400,9 +1448,10 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
           /* write out the request key */
       #ifdef NO_WRITEV
           nbytes = strlen(key);
      -    apr_file_write(fpin, key, &nbytes);
      +    /* XXX: error handling */
      +    apr_file_write_full(fpin, key, nbytes, NULL);
           nbytes = 1;
      -    apr_file_write(fpin, "\n", &nbytes);
      +    apr_file_write_full(fpin, "\n", nbytes, NULL);
       #else
           iova[0].iov_base = key;
           iova[0].iov_len = strlen(key);
      @@ -1410,7 +1459,8 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
           iova[1].iov_len = 1;
       
           niov = 2;
      -    apr_file_writev(fpin, iova, niov, &nbytes);
      +    /* XXX: error handling */
      +    apr_file_writev_full(fpin, iova, niov, &nbytes);
       #endif
       
           buf = apr_palloc(r->pool, REWRITE_PRG_MAP_BUF + 1);
      @@ -1502,7 +1552,7 @@ static char *lookup_map_program(request_rec *r, apr_file_t *fpin,
           if (rewrite_mapr_lock_acquire) {
               rv = apr_global_mutex_unlock(rewrite_mapr_lock_acquire);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00660)
                                 "apr_global_mutex_unlock(rewrite_mapr_lock_acquire) "
                                 "failed");
                   return NULL; /* Maybe this should be fatal? */
      @@ -1545,7 +1595,7 @@ static char *lookup_map(request_rec *r, char *name, char *key)
           case MAPTYPE_TXT:
               rv = apr_stat(&st, s->checkfile, APR_FINFO_MIN, r->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00661)
                                 "mod_rewrite: can't access text RewriteMap file %s",
                                 s->checkfile);
                   return NULL;
      @@ -1586,7 +1636,7 @@ static char *lookup_map(request_rec *r, char *name, char *key)
           case MAPTYPE_DBM:
               rv = apr_stat(&st, s->checkfile, APR_FINFO_MIN, r->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00662)
                                 "mod_rewrite: can't access DBM RewriteMap file %s",
                                 s->checkfile);
               }
      @@ -1595,7 +1645,7 @@ static char *lookup_map(request_rec *r, char *name, char *key)
       
                   rv = apr_stat(&st2, s->checkfile2, APR_FINFO_MIN, r->pool);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00663)
                                     "mod_rewrite: can't access DBM RewriteMap "
                                     "file %s", s->checkfile2);
                   }
      @@ -1860,7 +1910,7 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
                   else if (!strcmp(var, "IPV6")) {
                       int flag = FALSE;
       #if APR_HAVE_IPV6
      -                apr_sockaddr_t *addr = r->connection->remote_addr;
      +                apr_sockaddr_t *addr = r->useragent_addr;
                       flag = (addr->family == AF_INET6 &&
                               !IN6_IS_ADDR_V4MAPPED((struct in6_addr *)addr->ipaddr_ptr));
                       rewritelog((r, 1, ctx->perdir, "IPV6='%s'", flag ? "on" : "off"));
      @@ -1966,7 +2016,7 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
       
                   case 'D':
                       if (*var == 'R' && !strcmp(var, "REMOTE_ADDR")) {
      -                    result = r->connection->remote_ip;
      +                    result = r->useragent_ip;
                       }
                       else if (!strcmp(var, "SERVER_ADDR")) {
                           result = r->connection->local_ip;
      @@ -2005,7 +2055,7 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
                                                       REMOTE_NAME, NULL);
                       }
                       else if (!strcmp(var, "REMOTE_PORT")) {
      -                    return apr_itoa(r->pool, r->connection->remote_addr->port);
      +                    return apr_itoa(r->pool, r->useragent_addr->port);
                       }
                       break;
       
      @@ -2118,7 +2168,10 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
                   break;
       
               case 16:
      -            if (!strcmp(var, "REQUEST_FILENAME")) {
      +            if (*var == 'C' && !strcmp(var, "CONN_REMOTE_ADDR")) {
      +                result = r->connection->client_ip;
      +            }
      +            else if (!strcmp(var, "REQUEST_FILENAME")) {
                       result = r->filename; /* same as script_filename (15) */
                   }
                   break;
      @@ -2448,10 +2501,18 @@ static void add_cookie(request_rec *r, char *s)
       
           char *tok_cntx;
           char *cookie;
      +    /* long-standing default, but can't use ':' in a cookie */
      +    const char *sep = ":"; 
      +
      +    /* opt-in to ; separator if first character is a ; */
      +    if (s && *s == ';') { 
      +        sep = ";"; 
      +        s++;
      +    }
       
      -    var = apr_strtok(s, ":", &tok_cntx);
      -    val = apr_strtok(NULL, ":", &tok_cntx);
      -    domain = apr_strtok(NULL, ":", &tok_cntx);
      +    var = apr_strtok(s, sep, &tok_cntx);
      +    val = apr_strtok(NULL, sep, &tok_cntx);
      +    domain = apr_strtok(NULL, sep, &tok_cntx);
       
           if (var && val && domain) {
               request_rec *rmain = r;
      @@ -2467,10 +2528,10 @@ static void add_cookie(request_rec *r, char *s)
               if (!data) {
                   char *exp_time = NULL;
       
      -            expires = apr_strtok(NULL, ":", &tok_cntx);
      -            path = expires ? apr_strtok(NULL, ":", &tok_cntx) : NULL;
      -            secure = path ? apr_strtok(NULL, ":", &tok_cntx) : NULL;
      -            httponly = secure ? apr_strtok(NULL, ":", &tok_cntx) : NULL;
      +            expires = apr_strtok(NULL, sep, &tok_cntx);
      +            path = expires ? apr_strtok(NULL, sep, &tok_cntx) : NULL;
      +            secure = path ? apr_strtok(NULL, sep, &tok_cntx) : NULL;
      +            httponly = secure ? apr_strtok(NULL, sep, &tok_cntx) : NULL;
       
                   if (expires) {
                       apr_time_exp_t tms;
      @@ -2606,7 +2667,7 @@ static apr_status_t rewritelock_remove(void *data)
               apr_global_mutex_destroy(rewrite_mapr_lock_acquire);
               rewrite_mapr_lock_acquire = NULL;
           }
      -    return(0);
      +    return APR_SUCCESS;
       }
       
       
      @@ -2741,7 +2802,9 @@ static void *config_server_merge(apr_pool_t *p, void *basev, void *overridesv)
       
           a->server  = overrides->server;
       
      -    if (a->options & OPTION_INHERIT) {
      +    if (a->options & OPTION_INHERIT ||
      +            (base->options & OPTION_INHERIT_DOWN &&
      +             !(a->options & OPTION_IGNORE_INHERIT))) {
               /*
                *  local directives override
                *  and anything else is inherited
      @@ -2753,7 +2816,9 @@ static void *config_server_merge(apr_pool_t *p, void *basev, void *overridesv)
               a->rewriterules    = apr_array_append(p, overrides->rewriterules,
                                                     base->rewriterules);
           }
      -    else if (a->options & OPTION_INHERIT_BEFORE) {
      +    else if (a->options & OPTION_INHERIT_BEFORE || 
      +            (base->options & OPTION_INHERIT_DOWN_BEFORE &&
      +             !(a->options & OPTION_IGNORE_INHERIT))) {
               /*
                *  local directives override
                *  and anything else is inherited (preserving order)
      @@ -2819,18 +2884,28 @@ static void *config_perdir_merge(apr_pool_t *p, void *basev, void *overridesv)
           a->state_set = overrides->state_set || base->state_set;
           a->options = (overrides->options_set == 0) ? base->options : overrides->options;
           a->options_set = overrides->options_set || base->options_set;
      -    a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl;
      -    a->baseurl_set = overrides->baseurl_set || base->baseurl_set;
      +
      +    if (a->options & OPTION_MERGEBASE) { 
      +        a->baseurl = (overrides->baseurl_set == 0) ? base->baseurl : overrides->baseurl;
      +        a->baseurl_set = overrides->baseurl_set || base->baseurl_set;
      +    }
      +    else { 
      +        a->baseurl = overrides->baseurl;
      +    }
       
           a->directory  = overrides->directory;
       
      -    if (a->options & OPTION_INHERIT) {
      +    if (a->options & OPTION_INHERIT ||
      +            (base->options & OPTION_INHERIT_DOWN &&
      +             !(a->options & OPTION_IGNORE_INHERIT))) {
               a->rewriteconds = apr_array_append(p, overrides->rewriteconds,
                                                  base->rewriteconds);
               a->rewriterules = apr_array_append(p, overrides->rewriterules,
                                                  base->rewriterules);
           }
      -    else if (a->options & OPTION_INHERIT_BEFORE) {
      +    else if (a->options & OPTION_INHERIT_BEFORE || 
      +            (base->options & OPTION_INHERIT_DOWN_BEFORE &&
      +             !(a->options & OPTION_IGNORE_INHERIT))) {
               a->rewriteconds    = apr_array_append(p, base->rewriteconds,
                                                     overrides->rewriteconds);
               a->rewriterules    = apr_array_append(p, base->rewriterules,
      @@ -2882,13 +2957,34 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd,
               else if (!strcasecmp(w, "inheritbefore")) {
                   options |= OPTION_INHERIT_BEFORE;
               }
      +        else if (!strcasecmp(w, "inheritdown")) {
      +            options |= OPTION_INHERIT_DOWN;
      +        }
      +        else if(!strcasecmp(w, "inheritdownbefore")) {
      +            options |= OPTION_INHERIT_DOWN_BEFORE;
      +        }
      +        else if (!strcasecmp(w, "ignoreinherit")) {
      +            options |= OPTION_IGNORE_INHERIT;
      +        }
      +        else if (!strcasecmp(w, "allownoslash")) {
      +            options |= OPTION_NOSLASH;
      +        }
               else if (!strncasecmp(w, "MaxRedirects=", 13)) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00664)
                                "RewriteOptions: MaxRedirects option has been "
                                "removed in favor of the global "
                                "LimitInternalRecursion directive and will be "
                                "ignored.");
               }
      +        else if (!strcasecmp(w, "allowanyuri")) {
      +            options |= OPTION_ANYURI;
      +        }
      +        else if (!strcasecmp(w, "mergebase")) {
      +            options |= OPTION_MERGEBASE;
      +        }
      +        else if (!strcasecmp(w, "ignorecontextinfo")) {
      +            options |= OPTION_IGNORE_CONTEXT_INFO;
      +        }
               else {
                   return apr_pstrcat(cmd->pool, "RewriteOptions: unknown option '",
                                      w, "'", NULL);
      @@ -2928,8 +3024,7 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
       
           sconf = ap_get_module_config(cmd->server->module_config, &rewrite_module);
       
      -    newmap = apr_palloc(cmd->pool, sizeof(rewritemap_entry));
      -    newmap->func = NULL;
      +    newmap = apr_pcalloc(cmd->pool, sizeof(rewritemap_entry));
       
           if (strncasecmp(a2, "txt:", 4) == 0) {
               if ((fname = ap_server_root_relative(cmd->pool, a2+4)) == NULL) {
      @@ -2940,7 +3035,6 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
               newmap->type      = MAPTYPE_TXT;
               newmap->datafile  = fname;
               newmap->checkfile = fname;
      -        newmap->checkfile2= NULL;
               newmap->cachename = apr_psprintf(cmd->pool, "%pp:%s",
                                                (void *)cmd->server, a1);
           }
      @@ -2953,7 +3047,6 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
               newmap->type      = MAPTYPE_RND;
               newmap->datafile  = fname;
               newmap->checkfile = fname;
      -        newmap->checkfile2= NULL;
               newmap->cachename = apr_psprintf(cmd->pool, "%pp:%s",
                                                (void *)cmd->server, a1);
           }
      @@ -3027,17 +3120,10 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
               }
       
               newmap->type      = MAPTYPE_PRG;
      -        newmap->datafile  = NULL;
               newmap->checkfile = newmap->argv[0];
      -        newmap->checkfile2= NULL;
      -        newmap->cachename = NULL;
           }
           else if (strncasecmp(a2, "int:", 4) == 0) {
               newmap->type      = MAPTYPE_INT;
      -        newmap->datafile  = NULL;
      -        newmap->checkfile = NULL;
      -        newmap->checkfile2= NULL;
      -        newmap->cachename = NULL;
               newmap->func      = (char *(*)(request_rec *,char *))
                                   apr_hash_get(mapfunc_hash, a2+4, strlen(a2+4));
               if (newmap->func == NULL) {
      @@ -3054,12 +3140,9 @@ static const char *cmd_rewritemap(cmd_parms *cmd, void *dconf, const char *a1,
               newmap->type      = MAPTYPE_TXT;
               newmap->datafile  = fname;
               newmap->checkfile = fname;
      -        newmap->checkfile2= NULL;
               newmap->cachename = apr_psprintf(cmd->pool, "%pp:%s",
                                                (void *)cmd->server, a1);
           }
      -    newmap->fpin  = NULL;
      -    newmap->fpout = NULL;
       
           if (newmap->checkfile
               && (apr_stat(&st, newmap->checkfile, APR_FINFO_MIN,
      @@ -3186,9 +3269,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, void *in_dconf,
           rewrite_server_conf *sconf;
           rewritecond_entry *newcond;
           ap_regex_t *regexp;
      -    char *a1;
      -    char *a2;
      -    char *a3;
      +    char *a1 = NULL, *a2 = NULL, *a3 = NULL;
           const char *err;
       
           sconf = ap_get_module_config(cmd->server->module_config, &rewrite_module);
      @@ -3239,37 +3320,60 @@ static const char *cmd_rewritecond(cmd_parms *cmd, void *in_dconf,
               newcond->ptype = CONDPAT_AP_EXPR;
           }
           else if (*a2 && a2[1]) {
      -        if (!a2[2] && *a2 == '-') {
      -            switch (a2[1]) {
      -            case 'f': newcond->ptype = CONDPAT_FILE_EXISTS; break;
      -            case 's': newcond->ptype = CONDPAT_FILE_SIZE;   break;
      -            case 'd': newcond->ptype = CONDPAT_FILE_DIR;    break;
      -            case 'x': newcond->ptype = CONDPAT_FILE_XBIT;   break;
      -            case 'h': newcond->ptype = CONDPAT_FILE_LINK;   break;
      -            case 'L': newcond->ptype = CONDPAT_FILE_LINK;   break;
      -            case 'U': newcond->ptype = CONDPAT_LU_URL;      break;
      -            case 'F': newcond->ptype = CONDPAT_LU_FILE;     break;
      -            case 'l': if (a2[2] == 't')
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_LT;
      -                      else if (a2[2] == 'e')
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_LE;
      -                      else /* Historical; prefer -L or -h instead */
      -                          newcond->ptype = CONDPAT_FILE_LINK;
      -                      break;
      -            case 'g': if (a2[2] == 't')
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_GT;
      -                      else if (a2[2] == 'e')
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_GE;
      -                      break;
      -            case 'e': if (a2[2] == 'q')
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_EQ;
      -                      break;
      -            case 'n': if (a2[2] == 'e') {
      -                          /* Inversion, ensure !-ne == -eq */
      -                          a2 += 3, newcond->ptype = CONDPAT_INT_EQ;
      -                          newcond->flags ^= CONDFLAG_NOTMATCH;
      -                      }
      -                      break;
      +        if (*a2 == '-') {
      +            if (!a2[2]) {
      +                switch (a2[1]) {
      +                case 'f': newcond->ptype = CONDPAT_FILE_EXISTS; break;
      +                case 's': newcond->ptype = CONDPAT_FILE_SIZE;   break;
      +                case 'd': newcond->ptype = CONDPAT_FILE_DIR;    break;
      +                case 'x': newcond->ptype = CONDPAT_FILE_XBIT;   break;
      +                case 'h': newcond->ptype = CONDPAT_FILE_LINK;   break;
      +                case 'L': newcond->ptype = CONDPAT_FILE_LINK;   break;
      +                case 'l': newcond->ptype = CONDPAT_FILE_LINK;   break;
      +                case 'U': newcond->ptype = CONDPAT_LU_URL;      break;
      +                case 'F': newcond->ptype = CONDPAT_LU_FILE;     break;
      +                }
      +            }
      +            else if (a2[3]) {
      +                switch (a2[1]) {
      +                case 'l':
      +                    if (a2[2] == 't') {
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_LT;
      +                    }
      +                    else if (a2[2] == 'e') {
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_LE;
      +                    }
      +                    break;
      +
      +                case 'g':
      +                    if (a2[2] == 't') {
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_GT;
      +                    }
      +                    else if (a2[2] == 'e') {
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_GE;
      +                    }
      +                    break;
      +
      +                case 'e':
      +                    if (a2[2] == 'q') {
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_EQ;
      +                    }
      +                    break;
      +
      +                case 'n':
      +                    if (a2[2] == 'e') {
      +                        /* Inversion, ensure !-ne == -eq */
      +                        a2 += 3;
      +                        newcond->ptype = CONDPAT_INT_EQ;
      +                        newcond->flags ^= CONDFLAG_NOTMATCH;
      +                    }
      +                    break;
      +                }
                   }
               }
               else {
      @@ -3298,7 +3402,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, void *in_dconf,
           if ((newcond->ptype != CONDPAT_REGEX) &&
               (newcond->ptype < CONDPAT_STR_LT || newcond->ptype > CONDPAT_STR_GE) &&
               (newcond->flags & CONDFLAG_NOCASE)) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00665)
                            "RewriteCond: NoCase option for non-regex pattern '%s' "
                            "is not supported and will be ignored. (%s:%d)", a2,
                            cmd->directive->filename, cmd->directive->line_num);
      @@ -3456,6 +3560,10 @@ static const char *cmd_rewriterule_setflag(apr_pool_t *p, void *_cfg,
               }
               else if (!*key || !strcasecmp(key, "ext")) {       /* next */
                   cfg->flags |= RULEFLAG_NEWROUND;
      +            if (val && *val) { 
      +                cfg->maxrounds = atoi(val);
      +            }
      +
               }
               else if (((*key == 'S' || *key == 's') && !key[1])
                   || !strcasecmp(key, "osubreq")) {              /* nosubreq */
      @@ -3492,6 +3600,9 @@ static const char *cmd_rewriterule_setflag(apr_pool_t *p, void *_cfg,
               } else if ( !strcasecmp(key, "SD")
                       || !strcasecmp(key, "sdiscard") ) {       /* qsdiscard */
                   cfg->flags |= RULEFLAG_QSDISCARD;
      +        } else if ( !strcasecmp(key, "SL")
      +                || !strcasecmp(key, "slast") ) {          /* qslast */
      +            cfg->flags |= RULEFLAG_QSLAST;
               }
               else {
                   ++error;
      @@ -3578,9 +3689,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, void *in_dconf,
           rewrite_server_conf *sconf;
           rewriterule_entry *newrule;
           ap_regex_t *regexp;
      -    char *a1;
      -    char *a2;
      -    char *a3;
      +    char *a1 = NULL, *a2 = NULL, *a3 = NULL;
           const char *err;
       
           sconf = ap_get_module_config(cmd->server->module_config, &rewrite_module);
      @@ -3607,6 +3716,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, void *in_dconf,
           newrule->env = NULL;
           newrule->cookie = NULL;
           newrule->skip   = 0;
      +    newrule->maxrounds = REWRITE_MAX_ROUNDS;
           if (a3 != NULL) {
               if ((err = cmd_parseflagfield(cmd->pool, newrule, a3,
                                             cmd_rewriterule_setflag)) != NULL) {
      @@ -3967,7 +4077,7 @@ static int apply_rewrite_rule(rewriterule_entry *p, rewrite_ctx *ctx)
           /* Ok, we already know the pattern has matched, but we now
            * additionally have to check for all existing preconditions
            * (RewriteCond) which have to be also true. We do this at
      -     * this very late stage to avoid unnessesary checks which
      +     * this very late stage to avoid unnecessary checks which
            * would slow down the rewriting engine.
            */
           rewriteconds = p->rewriteconds;
      @@ -4045,7 +4155,9 @@ static int apply_rewrite_rule(rewriterule_entry *p, rewrite_ctx *ctx)
               r->path_info = NULL;
           }
       
      -    splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND, p->flags & RULEFLAG_QSDISCARD);
      +    splitout_queryargs(r, p->flags & RULEFLAG_QSAPPEND, 
      +                          p->flags & RULEFLAG_QSDISCARD, 
      +                          p->flags & RULEFLAG_QSLAST);
       
           /* Add the previously stripped per-directory location prefix, unless
            * (1) it's an absolute URL path and
      @@ -4150,6 +4262,7 @@ static int apply_rewrite_list(request_rec *r, apr_array_header_t *rewriterules,
           int rc;
           int s;
           rewrite_ctx *ctx;
      +    int round = 1;
       
           ctx = apr_palloc(r->pool, sizeof(*ctx));
           ctx->perdir = perdir;
      @@ -4182,6 +4295,17 @@ static int apply_rewrite_list(request_rec *r, apr_array_header_t *rewriterules,
               rc = apply_rewrite_rule(p, ctx);
       
               if (rc) {
      +
      +            /* Catch looping rules with pathinfo growing unbounded */
      +            if ( strlen( r->filename ) > 2*r->server->limit_req_line ) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                              "RewriteRule '%s' and URI '%s' "
      +                              "exceeded maximum length (%d)", 
      +                              p->pattern, r->uri, 2*r->server->limit_req_line );
      +                r->status = HTTP_INTERNAL_SERVER_ERROR;
      +                return ACTION_STATUS;
      +            }
      +
                   /* Regardless of what we do next, we've found a match. Check to see
                    * if any of the request header fields were involved, and add them
                    * to the Vary field of the response.
      @@ -4238,6 +4362,15 @@ static int apply_rewrite_list(request_rec *r, apr_array_header_t *rewriterules,
                    *  the rewriting ruleset again.
                    */
                   if (p->flags & RULEFLAG_NEWROUND) {
      +                if (++round >= p->maxrounds) { 
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02596)
      +                                  "RewriteRule '%s' and URI '%s' exceeded "
      +                                  "maximum number of rounds (%d) via the [N] flag", 
      +                                  p->pattern, r->uri, p->maxrounds);
      +
      +                    r->status = HTTP_INTERNAL_SERVER_ERROR;
      +                    return ACTION_STATUS; 
      +                }
                       goto loop;
                   }
       
      @@ -4341,7 +4474,7 @@ static void init_child(apr_pool_t *p, server_rec *s)
               rv = apr_global_mutex_child_init(&rewrite_mapr_lock_acquire,
                        apr_global_mutex_lockfile(rewrite_mapr_lock_acquire), p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00666)
                                "mod_rewrite: could not init rewrite_mapr_lock_acquire"
                                " in child");
               }
      @@ -4349,7 +4482,7 @@ static void init_child(apr_pool_t *p, server_rec *s)
       
           /* create the lookup cache */
           if (!init_cache(p)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00667)
                            "mod_rewrite: could not init map cache in child");
           }
       }
      @@ -4379,6 +4512,7 @@ static int hook_uri2file(request_rec *r)
           unsigned int port;
           int rulestatus;
           void *skipdata;
      +    const char *oargs;
       
           /*
            *  retrieve the config structures
      @@ -4415,6 +4549,25 @@ static int hook_uri2file(request_rec *r)
               return DECLINED;
           }
       
      +    /* Unless the anyuri option is set, ensure that the input to the
      +     * first rule really is a URL-path, avoiding security issues with
      +     * poorly configured rules.  See CVE-2011-3368, CVE-2011-4317. */
      +    if ((dconf->options & OPTION_ANYURI) == 0
      +        && ((r->unparsed_uri[0] == '*' && r->unparsed_uri[1] == '\0')
      +            || !r->uri || r->uri[0] != '/')) {
      +        rewritelog((r, 8, NULL, "Declining, request-URI '%s' is not a URL-path. "
      +                    "Consult the manual entry for the RewriteOptions directive "
      +                    "for options and caveats about matching other strings.",
      +                    r->uri));
      +        return DECLINED;
      +    }
      +
      +    /*
      +     *  remember the original query string for later check, since we don't
      +     *  want to apply URL-escaping when no substitution has changed it.
      +     */
      +    oargs = r->args;
      +
           /*
            *  add the SCRIPT_URL variable to the env. this is a bit complicated
            *  due to the fact that apache uses subrequests and internal redirects
      @@ -4501,7 +4654,7 @@ static int hook_uri2file(request_rec *r)
                    * we can actually use it!
                    */
                   if (!proxy_available) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00669)
                                     "attempt to make remote request from mod_rewrite "
                                     "without proxy enabled: %s", r->filename);
                       return HTTP_FORBIDDEN;
      @@ -4549,11 +4702,21 @@ static int hook_uri2file(request_rec *r)
       
                   /* append the QUERY_STRING part */
                   if (r->args) {
      +                char *escaped_args = NULL;
      +                int noescape = (rulestatus == ACTION_NOESCAPE ||
      +                                (oargs && !strcmp(r->args, oargs)));
      +
                       r->filename = apr_pstrcat(r->pool, r->filename, "?",
      -                                          (rulestatus == ACTION_NOESCAPE)
      +                                          noescape
                                                   ? r->args
      -                                            : ap_escape_uri(r->pool, r->args),
      +                                            : (escaped_args =
      +                                               ap_escape_uri(r->pool, r->args)),
                                                 NULL);
      +
      +                rewritelog((r, 1, NULL, "%s %s to query string for redirect %s",
      +                            noescape ? "copying" : "escaping",
      +                            r->args ,
      +                            noescape ? "" : escaped_args));
                   }
       
                   /* determine HTTP redirect response code */
      @@ -4698,9 +4861,10 @@ static int hook_fixup(request_rec *r)
           /*
            *  .htaccess file is called before really entering the directory, i.e.:
            *  URL: http://localhost/foo  and .htaccess is located in foo directory
      -     *  Ignore such attempts, since they may lead to undefined behaviour.
      +     *  Ignore such attempts, allowing mod_dir to direct the client to the
      +     *  canonical URL. This can be controlled with the AllowNoSlash option.
            */
      -    if (!is_proxyreq) {
      +    if (!is_proxyreq && !(dconf->options & OPTION_NOSLASH)) {
               l = strlen(dconf->directory) - 1;
               if (r->filename && strlen(r->filename) == l &&
                   (dconf->directory)[l] == '/' &&
      @@ -4718,11 +4882,11 @@ static int hook_fixup(request_rec *r)
       
           /*
            *  Do the Options check after engine check, so
      -     *  the user is able to explicitely turn RewriteEngine Off.
      +     *  the user is able to explicitly turn RewriteEngine Off.
            */
           if (!(ap_allow_options(r) & (OPT_SYM_LINKS | OPT_SYM_OWNER))) {
               /* FollowSymLinks is mandatory! */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00670)
                            "Options FollowSymLinks and SymLinksIfOwnerMatch are both off, "
                            "so the RewriteRule directive is also forbidden "
                            "due to its similar ability to circumvent directory restrictions : "
      @@ -4733,7 +4897,7 @@ static int hook_fixup(request_rec *r)
           /*
            *  remember the current filename before rewriting for later check
            *  to prevent deadlooping because of internal redirects
      -     *  on final URL/filename which can be equal to the inital one.
      +     *  on final URL/filename which can be equal to the initial one.
            *  also, we'll restore original r->filename if we decline this
            *  request
            */
      @@ -4876,6 +5040,7 @@ static int hook_fixup(request_rec *r)
                   return n;
               }
               else {
      +            const char *tmpfilename = NULL;
                   /* it was finally rewritten to a local path */
       
                   /* if someone used the PASSTHROUGH flag in per-dir
      @@ -4907,6 +5072,8 @@ static int hook_fixup(request_rec *r)
                       return OK;
                   }
       
      +            tmpfilename = r->filename;
      +
                   /* if there is a valid base-URL then substitute
                    * the per-dir prefix with this base-URL if the
                    * current filename still is inside this per-dir
      @@ -4944,11 +5111,32 @@ static int hook_fixup(request_rec *r)
                       }
                   }
       
      +            /* No base URL, or r->filename wasn't still under dconf->directory
      +             * or, r->filename wasn't still under the document root. 
      +             * If there's a context document root AND a context prefix, and 
      +             * the context document root is a prefix of r->filename, replace.
      +             * This allows a relative substitution on a path found by mod_userdir 
      +             * or mod_alias without baking in a RewriteBase.
      +             */
      +            if (tmpfilename == r->filename && 
      +                !(dconf->options & OPTION_IGNORE_CONTEXT_INFO)) { 
      +                if ((ccp = ap_context_document_root(r)) != NULL) { 
      +                    const char *prefix = ap_context_prefix(r);
      +                    if (prefix != NULL) { 
      +                        rewritelog((r, 2, dconf->directory, "trying to replace "
      +                                    "context docroot %s with context prefix %s",
      +                                    ccp, prefix));
      +                        r->filename = subst_prefix_path(r, r->filename,
      +                                ccp, prefix);
      +                    }
      +                }
      +            }
      +
                   /* now initiate the internal redirect */
                   rewritelog((r, 1, dconf->directory, "internal redirect with %s "
                               "[INTERNAL REDIRECT]", r->filename));
                   r->filename = apr_pstrcat(r->pool, "redirect:", r->filename, NULL);
      -            r->handler = "redirect-handler";
      +            r->handler = REWRITE_REDIRECT_HANDLER_NAME;
                   return OK;
               }
           }
      @@ -4994,7 +5182,7 @@ static int hook_mimetype(request_rec *r)
        */
       static int handler_redirect(request_rec *r)
       {
      -    if (strcmp(r->handler, "redirect-handler")) {
      +    if (strcmp(r->handler, REWRITE_REDIRECT_HANDLER_NAME)) {
               return DECLINED;
           }
       
      diff --git a/modules/mappers/mod_rewrite.dep b/modules/mappers/mod_rewrite.dep
      new file mode 100644
      index 00000000000..b6956b11be5
      --- /dev/null
      +++ b/modules/mappers/mod_rewrite.dep
      @@ -0,0 +1,65 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_rewrite.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_rewrite.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_signal.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\database\mod_dbd.h"\
      +	"..\ssl\mod_ssl.h"\
      +	".\mod_rewrite.h"\
      +	
      diff --git a/modules/mappers/mod_rewrite.h b/modules/mappers/mod_rewrite.h
      index 040baeeac1a..8fa158eccab 100644
      --- a/modules/mappers/mod_rewrite.h
      +++ b/modules/mappers/mod_rewrite.h
      @@ -29,6 +29,8 @@
       #include "apr_optional.h"
       #include "httpd.h"
       
      +#define REWRITE_REDIRECT_HANDLER_NAME "redirect-handler"
      +
       /* rewrite map function prototype */
       typedef char *(rewrite_mapfunc_t)(request_rec *r, char *key);
       
      diff --git a/modules/mappers/mod_rewrite.mak b/modules/mappers/mod_rewrite.mak
      new file mode 100644
      index 00000000000..3b08cabbad5
      --- /dev/null
      +++ b/modules/mappers/mod_rewrite.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_rewrite.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_rewrite - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_rewrite - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_rewrite - Win32 Release" && "$(CFG)" != "mod_rewrite - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_rewrite.mak" CFG="mod_rewrite - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_rewrite - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_rewrite - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_rewrite - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_rewrite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_rewrite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_rewrite.obj"
      +	-@erase "$(INTDIR)\mod_rewrite.res"
      +	-@erase "$(INTDIR)\mod_rewrite_src.idb"
      +	-@erase "$(INTDIR)\mod_rewrite_src.pdb"
      +	-@erase "$(OUTDIR)\mod_rewrite.exp"
      +	-@erase "$(OUTDIR)\mod_rewrite.lib"
      +	-@erase "$(OUTDIR)\mod_rewrite.pdb"
      +	-@erase "$(OUTDIR)\mod_rewrite.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../database" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_rewrite_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_rewrite.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_rewrite.so" /d LONG_NAME="rewrite_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_rewrite.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_rewrite.pdb" /debug /out:"$(OUTDIR)\mod_rewrite.so" /implib:"$(OUTDIR)\mod_rewrite.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_rewrite.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_rewrite.obj" \
      +	"$(INTDIR)\mod_rewrite.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_rewrite.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_rewrite.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_rewrite.so"
      +   if exist .\Release\mod_rewrite.so.manifest mt.exe -manifest .\Release\mod_rewrite.so.manifest -outputresource:.\Release\mod_rewrite.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_rewrite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_rewrite.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_rewrite.obj"
      +	-@erase "$(INTDIR)\mod_rewrite.res"
      +	-@erase "$(INTDIR)\mod_rewrite_src.idb"
      +	-@erase "$(INTDIR)\mod_rewrite_src.pdb"
      +	-@erase "$(OUTDIR)\mod_rewrite.exp"
      +	-@erase "$(OUTDIR)\mod_rewrite.lib"
      +	-@erase "$(OUTDIR)\mod_rewrite.pdb"
      +	-@erase "$(OUTDIR)\mod_rewrite.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../database" /I "../ssl" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_rewrite_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_rewrite.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_rewrite.so" /d LONG_NAME="rewrite_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_rewrite.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_rewrite.pdb" /debug /out:"$(OUTDIR)\mod_rewrite.so" /implib:"$(OUTDIR)\mod_rewrite.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_rewrite.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_rewrite.obj" \
      +	"$(INTDIR)\mod_rewrite.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_rewrite.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_rewrite.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_rewrite.so"
      +   if exist .\Debug\mod_rewrite.so.manifest mt.exe -manifest .\Debug\mod_rewrite.so.manifest -outputresource:.\Debug\mod_rewrite.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_rewrite.dep")
      +!INCLUDE "mod_rewrite.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_rewrite.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_rewrite - Win32 Release" || "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_rewrite - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_rewrite - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_rewrite - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_rewrite - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_rewrite.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_rewrite.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_rewrite.so" /d LONG_NAME="rewrite_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_rewrite - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_rewrite.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_rewrite.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_rewrite.so" /d LONG_NAME="rewrite_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_rewrite.c
      +
      +"$(INTDIR)\mod_rewrite.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_speling.c b/modules/mappers/mod_speling.c
      index b1c75d01f28..a9f36516e91 100644
      --- a/modules/mappers/mod_speling.c
      +++ b/modules/mappers/mod_speling.c
      @@ -395,9 +395,10 @@ static int check_speling(request_rec *r)
       
                   ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS,
                                 r,
      -                          ref ? "Fixed spelling: %s to %s from %s"
      -                              : "Fixed spelling: %s to %s",
      -                          r->uri, nuri, ref);
      +                          ref ? APLOGNO(03224) "Fixed spelling: %s to %s from %s"
      +                              : APLOGNO(03225) "Fixed spelling: %s to %s%s",
      +                          r->uri, nuri,
      +                          (ref ? ref : ""));
       
                   return HTTP_MOVED_PERMANENTLY;
               }
      @@ -503,9 +504,10 @@ static int check_speling(request_rec *r)
                   apr_pool_destroy(sub_pool);
       
                   ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                         ref ? "Spelling fix: %s: %d candidates from %s"
      -                             : "Spelling fix: %s: %d candidates",
      -                         r->uri, candidates->nelts, ref);
      +                         ref ? APLOGNO(03226) "Spelling fix: %s: %d candidates from %s"
      +                             : APLOGNO(03227) "Spelling fix: %s: %d candidates%s",
      +                         r->uri, candidates->nelts,
      +                         (ref ? ref : ""));
       
                   return HTTP_MULTIPLE_CHOICES;
               }
      diff --git a/modules/mappers/mod_speling.dep b/modules/mappers/mod_speling.dep
      new file mode 100644
      index 00000000000..6709aa834a0
      --- /dev/null
      +++ b/modules/mappers/mod_speling.dep
      @@ -0,0 +1,51 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_speling.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_speling.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_speling.mak b/modules/mappers/mod_speling.mak
      new file mode 100644
      index 00000000000..b49233f798f
      --- /dev/null
      +++ b/modules/mappers/mod_speling.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_speling.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_speling - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_speling - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_speling - Win32 Release" && "$(CFG)" != "mod_speling - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_speling.mak" CFG="mod_speling - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_speling - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_speling - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_speling - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_speling.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_speling.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_speling.obj"
      +	-@erase "$(INTDIR)\mod_speling.res"
      +	-@erase "$(INTDIR)\mod_speling_src.idb"
      +	-@erase "$(INTDIR)\mod_speling_src.pdb"
      +	-@erase "$(OUTDIR)\mod_speling.exp"
      +	-@erase "$(OUTDIR)\mod_speling.lib"
      +	-@erase "$(OUTDIR)\mod_speling.pdb"
      +	-@erase "$(OUTDIR)\mod_speling.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_speling_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_speling.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_speling.so" /d LONG_NAME="speling_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_speling.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_speling.pdb" /debug /out:"$(OUTDIR)\mod_speling.so" /implib:"$(OUTDIR)\mod_speling.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_speling.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_speling.obj" \
      +	"$(INTDIR)\mod_speling.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_speling.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_speling.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_speling.so"
      +   if exist .\Release\mod_speling.so.manifest mt.exe -manifest .\Release\mod_speling.so.manifest -outputresource:.\Release\mod_speling.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_speling.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_speling.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_speling.obj"
      +	-@erase "$(INTDIR)\mod_speling.res"
      +	-@erase "$(INTDIR)\mod_speling_src.idb"
      +	-@erase "$(INTDIR)\mod_speling_src.pdb"
      +	-@erase "$(OUTDIR)\mod_speling.exp"
      +	-@erase "$(OUTDIR)\mod_speling.lib"
      +	-@erase "$(OUTDIR)\mod_speling.pdb"
      +	-@erase "$(OUTDIR)\mod_speling.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_speling_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_speling.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_speling.so" /d LONG_NAME="speling_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_speling.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_speling.pdb" /debug /out:"$(OUTDIR)\mod_speling.so" /implib:"$(OUTDIR)\mod_speling.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_speling.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_speling.obj" \
      +	"$(INTDIR)\mod_speling.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_speling.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_speling.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_speling.so"
      +   if exist .\Debug\mod_speling.so.manifest mt.exe -manifest .\Debug\mod_speling.so.manifest -outputresource:.\Debug\mod_speling.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_speling.dep")
      +!INCLUDE "mod_speling.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_speling.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_speling - Win32 Release" || "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_speling - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_speling - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_speling - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_speling - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_speling.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_speling.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_speling.so" /d LONG_NAME="speling_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_speling - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_speling.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_speling.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_speling.so" /d LONG_NAME="speling_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_speling.c
      +
      +"$(INTDIR)\mod_speling.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c
      index b181e278d81..1ec0e9010d2 100644
      --- a/modules/mappers/mod_userdir.c
      +++ b/modules/mappers/mod_userdir.c
      @@ -89,7 +89,7 @@ module AP_MODULE_DECLARE_DATA userdir_module;
       
       typedef struct {
           int globally_disabled;
      -    char *userdir;
      +    const char *userdir;
           apr_table_t *enabled_users;
           apr_table_t *disabled_users;
       } userdir_config;
      @@ -137,7 +137,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
                                                        &userdir_module);
           char *username;
           const char *usernames = arg;
      -    char *kw = ap_getword_conf(cmd->pool, &usernames);
      +    char *kw = ap_getword_conf(cmd->temp_pool, &usernames);
           apr_table_t *usertable;
       
           /* Since we are a raw argument, it is possible for us to be called with
      @@ -173,7 +173,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
                * If the first (only?) value isn't one of our keywords, just copy
                * the string to the userdir string.
                */
      -        s_cfg->userdir = apr_pstrdup(cmd->pool, arg);
      +        s_cfg->userdir = arg;
               return NULL;
           }
           /*
      @@ -182,7 +182,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, const char *arg)
            */
           while (*usernames) {
               username = ap_getword_conf(cmd->pool, &usernames);
      -        apr_table_setn(usertable, username, kw);
      +        apr_table_setn(usertable, username, "1");
           }
           return NULL;
       }
      diff --git a/modules/mappers/mod_userdir.dep b/modules/mappers/mod_userdir.dep
      new file mode 100644
      index 00000000000..2aff8341332
      --- /dev/null
      +++ b/modules/mappers/mod_userdir.dep
      @@ -0,0 +1,46 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_userdir.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_userdir.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_userdir.mak b/modules/mappers/mod_userdir.mak
      new file mode 100644
      index 00000000000..8087ce17eca
      --- /dev/null
      +++ b/modules/mappers/mod_userdir.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_userdir.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_userdir - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_userdir - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_userdir - Win32 Release" && "$(CFG)" != "mod_userdir - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_userdir.mak" CFG="mod_userdir - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_userdir - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_userdir - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_userdir - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_userdir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_userdir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_userdir.obj"
      +	-@erase "$(INTDIR)\mod_userdir.res"
      +	-@erase "$(INTDIR)\mod_userdir_src.idb"
      +	-@erase "$(INTDIR)\mod_userdir_src.pdb"
      +	-@erase "$(OUTDIR)\mod_userdir.exp"
      +	-@erase "$(OUTDIR)\mod_userdir.lib"
      +	-@erase "$(OUTDIR)\mod_userdir.pdb"
      +	-@erase "$(OUTDIR)\mod_userdir.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_userdir_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_userdir.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_userdir.so" /d LONG_NAME="userdir_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_userdir.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_userdir.pdb" /debug /out:"$(OUTDIR)\mod_userdir.so" /implib:"$(OUTDIR)\mod_userdir.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_userdir.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_userdir.obj" \
      +	"$(INTDIR)\mod_userdir.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_userdir.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_userdir.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_userdir.so"
      +   if exist .\Release\mod_userdir.so.manifest mt.exe -manifest .\Release\mod_userdir.so.manifest -outputresource:.\Release\mod_userdir.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_userdir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_userdir.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_userdir.obj"
      +	-@erase "$(INTDIR)\mod_userdir.res"
      +	-@erase "$(INTDIR)\mod_userdir_src.idb"
      +	-@erase "$(INTDIR)\mod_userdir_src.pdb"
      +	-@erase "$(OUTDIR)\mod_userdir.exp"
      +	-@erase "$(OUTDIR)\mod_userdir.lib"
      +	-@erase "$(OUTDIR)\mod_userdir.pdb"
      +	-@erase "$(OUTDIR)\mod_userdir.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_userdir_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_userdir.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_userdir.so" /d LONG_NAME="userdir_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_userdir.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_userdir.pdb" /debug /out:"$(OUTDIR)\mod_userdir.so" /implib:"$(OUTDIR)\mod_userdir.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_userdir.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_userdir.obj" \
      +	"$(INTDIR)\mod_userdir.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_userdir.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_userdir.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_userdir.so"
      +   if exist .\Debug\mod_userdir.so.manifest mt.exe -manifest .\Debug\mod_userdir.so.manifest -outputresource:.\Debug\mod_userdir.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_userdir.dep")
      +!INCLUDE "mod_userdir.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_userdir.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_userdir - Win32 Release" || "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_userdir - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_userdir - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_userdir - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_userdir - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_userdir.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_userdir.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_userdir.so" /d LONG_NAME="userdir_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_userdir - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_userdir.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_userdir.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_userdir.so" /d LONG_NAME="userdir_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_userdir.c
      +
      +"$(INTDIR)\mod_userdir.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/mappers/mod_vhost_alias.c b/modules/mappers/mod_vhost_alias.c
      index 70c857d4ee4..0b6169479d2 100644
      --- a/modules/mappers/mod_vhost_alias.c
      +++ b/modules/mappers/mod_vhost_alias.c
      @@ -269,7 +269,7 @@ static void vhost_alias_interpolate(request_rec *r, const char *name,
       
           ndots = 0;
           dots[ndots++] = name-1; /* slightly naughty */
      -    for (p = name; *p; ++p){
      +    for (p = name; *p; ++p) {
               if (*p == '.' && ndots < MAXDOTS) {
                   dots[ndots++] = p;
               }
      diff --git a/modules/mappers/mod_vhost_alias.dep b/modules/mappers/mod_vhost_alias.dep
      new file mode 100644
      index 00000000000..7b520e3b58a
      --- /dev/null
      +++ b/modules/mappers/mod_vhost_alias.dep
      @@ -0,0 +1,50 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_vhost_alias.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_vhost_alias.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/mappers/mod_vhost_alias.mak b/modules/mappers/mod_vhost_alias.mak
      new file mode 100644
      index 00000000000..62085abee59
      --- /dev/null
      +++ b/modules/mappers/mod_vhost_alias.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_vhost_alias.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_vhost_alias - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_vhost_alias - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_vhost_alias - Win32 Release" && "$(CFG)" != "mod_vhost_alias - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_vhost_alias.mak" CFG="mod_vhost_alias - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_vhost_alias - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_vhost_alias - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_vhost_alias - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_vhost_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_vhost_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_vhost_alias.obj"
      +	-@erase "$(INTDIR)\mod_vhost_alias.res"
      +	-@erase "$(INTDIR)\mod_vhost_alias_src.idb"
      +	-@erase "$(INTDIR)\mod_vhost_alias_src.pdb"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.exp"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.lib"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.pdb"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_vhost_alias_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_vhost_alias.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_vhost_alias.so" /d LONG_NAME="vhost_alias_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_vhost_alias.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_vhost_alias.pdb" /debug /out:"$(OUTDIR)\mod_vhost_alias.so" /implib:"$(OUTDIR)\mod_vhost_alias.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_vhost_alias.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_vhost_alias.obj" \
      +	"$(INTDIR)\mod_vhost_alias.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_vhost_alias.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_vhost_alias.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_vhost_alias.so"
      +   if exist .\Release\mod_vhost_alias.so.manifest mt.exe -manifest .\Release\mod_vhost_alias.so.manifest -outputresource:.\Release\mod_vhost_alias.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_vhost_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_vhost_alias.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_vhost_alias.obj"
      +	-@erase "$(INTDIR)\mod_vhost_alias.res"
      +	-@erase "$(INTDIR)\mod_vhost_alias_src.idb"
      +	-@erase "$(INTDIR)\mod_vhost_alias_src.pdb"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.exp"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.lib"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.pdb"
      +	-@erase "$(OUTDIR)\mod_vhost_alias.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_vhost_alias_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_vhost_alias.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_vhost_alias.so" /d LONG_NAME="vhost_alias_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_vhost_alias.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_vhost_alias.pdb" /debug /out:"$(OUTDIR)\mod_vhost_alias.so" /implib:"$(OUTDIR)\mod_vhost_alias.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_vhost_alias.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_vhost_alias.obj" \
      +	"$(INTDIR)\mod_vhost_alias.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_vhost_alias.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_vhost_alias.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_vhost_alias.so"
      +   if exist .\Debug\mod_vhost_alias.so.manifest mt.exe -manifest .\Debug\mod_vhost_alias.so.manifest -outputresource:.\Debug\mod_vhost_alias.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_vhost_alias.dep")
      +!INCLUDE "mod_vhost_alias.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_vhost_alias.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_vhost_alias - Win32 Release" || "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_vhost_alias - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_vhost_alias - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\mappers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\mappers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_vhost_alias - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ELSEIF  "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\mappers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\mappers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_vhost_alias - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_vhost_alias.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_vhost_alias.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_vhost_alias.so" /d LONG_NAME="vhost_alias_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_vhost_alias - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_vhost_alias.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_vhost_alias.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_vhost_alias.so" /d LONG_NAME="vhost_alias_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_vhost_alias.c
      +
      +"$(INTDIR)\mod_vhost_alias.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/config.m4 b/modules/metadata/config.m4
      index 66caf81464c..25d1aece65f 100644
      --- a/modules/metadata/config.m4
      +++ b/modules/metadata/config.m4
      @@ -8,7 +8,7 @@ APACHE_MODULE(env, clearing/setting of ENV vars, , , yes)
       APACHE_MODULE(mime_magic, automagically determining MIME type)
       APACHE_MODULE(cern_meta, CERN-type meta files, , , no)
       APACHE_MODULE(expires, Expires header control, , , most)
      -APACHE_MODULE(headers, HTTP header control, , , most)
      +APACHE_MODULE(headers, HTTP header control, , , yes)
       APACHE_MODULE(ident, RFC 1413 identity check, , , no)
       
       APACHE_MODULE(usertrack, user-session tracking, , , , [
      diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c
      index c2f226769f1..09a41e1cc69 100644
      --- a/modules/metadata/mod_cern_meta.c
      +++ b/modules/metadata/mod_cern_meta.c
      @@ -231,13 +231,13 @@ static int scan_meta_file(request_rec *r, apr_file_t *f)
               /* if we see a bogus header don't ignore it. Shout and scream */
       
               if (!(l = strchr(w, ':'))) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01560)
                       "malformed header in meta file: %s", r->filename);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       
               *l++ = '\0';
      -        while (*l && apr_isspace(*l))
      +        while (apr_isspace(*l))
                   ++l;
       
               if (!strcasecmp(w, "Content-type")) {
      @@ -246,7 +246,7 @@ static int scan_meta_file(request_rec *r, apr_file_t *f)
       
                   char *endp = l + strlen(l) - 1;
                   while (endp > l && apr_isspace(*endp))
      -            *endp-- = '\0';
      +                *endp-- = '\0';
       
                   tmp = apr_pstrdup(r->pool, l);
                   ap_content_type_tolower(tmp);
      @@ -307,7 +307,7 @@ static int add_cern_meta_data(request_rec *r)
           }
           else {
               /* no last slash, buh?! */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01561)
                   "internal error in mod_cern_meta: %s", r->filename);
               /* should really barf, but hey, let's be friends... */
               return DECLINED;
      @@ -332,7 +332,7 @@ static int add_cern_meta_data(request_rec *r)
            */
           rr = ap_sub_req_lookup_file(metafilename, r, NULL);
           if (rr->status != HTTP_OK) {
      -    ap_destroy_sub_req(rr);
      +        ap_destroy_sub_req(rr);
               return DECLINED;
           }
           ap_destroy_sub_req(rr);
      @@ -342,7 +342,7 @@ static int add_cern_meta_data(request_rec *r)
               if (APR_STATUS_IS_ENOENT(retcode)) {
                   return DECLINED;
               }
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01562)
                   "meta file permissions deny server access: %s", metafilename);
               return HTTP_FORBIDDEN;
           }
      diff --git a/modules/metadata/mod_cern_meta.dep b/modules/metadata/mod_cern_meta.dep
      new file mode 100644
      index 00000000000..e01504b1079
      --- /dev/null
      +++ b/modules/metadata/mod_cern_meta.dep
      @@ -0,0 +1,55 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_cern_meta.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_cern_meta.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_cern_meta.mak b/modules/metadata/mod_cern_meta.mak
      new file mode 100644
      index 00000000000..08ba4146113
      --- /dev/null
      +++ b/modules/metadata/mod_cern_meta.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_cern_meta.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_cern_meta - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_cern_meta - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_cern_meta - Win32 Release" && "$(CFG)" != "mod_cern_meta - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_cern_meta.mak" CFG="mod_cern_meta - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_cern_meta - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_cern_meta - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cern_meta - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cern_meta.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_cern_meta.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cern_meta.obj"
      +	-@erase "$(INTDIR)\mod_cern_meta.res"
      +	-@erase "$(INTDIR)\mod_cern_meta_src.idb"
      +	-@erase "$(INTDIR)\mod_cern_meta_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cern_meta.exp"
      +	-@erase "$(OUTDIR)\mod_cern_meta.lib"
      +	-@erase "$(OUTDIR)\mod_cern_meta.pdb"
      +	-@erase "$(OUTDIR)\mod_cern_meta.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cern_meta_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cern_meta.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_cern_meta.so" /d LONG_NAME="cern_meta_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cern_meta.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cern_meta.pdb" /debug /out:"$(OUTDIR)\mod_cern_meta.so" /implib:"$(OUTDIR)\mod_cern_meta.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cern_meta.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cern_meta.obj" \
      +	"$(INTDIR)\mod_cern_meta.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cern_meta.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_cern_meta.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cern_meta.so"
      +   if exist .\Release\mod_cern_meta.so.manifest mt.exe -manifest .\Release\mod_cern_meta.so.manifest -outputresource:.\Release\mod_cern_meta.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_cern_meta.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_cern_meta.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_cern_meta.obj"
      +	-@erase "$(INTDIR)\mod_cern_meta.res"
      +	-@erase "$(INTDIR)\mod_cern_meta_src.idb"
      +	-@erase "$(INTDIR)\mod_cern_meta_src.pdb"
      +	-@erase "$(OUTDIR)\mod_cern_meta.exp"
      +	-@erase "$(OUTDIR)\mod_cern_meta.lib"
      +	-@erase "$(OUTDIR)\mod_cern_meta.pdb"
      +	-@erase "$(OUTDIR)\mod_cern_meta.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_cern_meta_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_cern_meta.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_cern_meta.so" /d LONG_NAME="cern_meta_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_cern_meta.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_cern_meta.pdb" /debug /out:"$(OUTDIR)\mod_cern_meta.so" /implib:"$(OUTDIR)\mod_cern_meta.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_cern_meta.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_cern_meta.obj" \
      +	"$(INTDIR)\mod_cern_meta.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_cern_meta.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_cern_meta.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_cern_meta.so"
      +   if exist .\Debug\mod_cern_meta.so.manifest mt.exe -manifest .\Debug\mod_cern_meta.so.manifest -outputresource:.\Debug\mod_cern_meta.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_cern_meta.dep")
      +!INCLUDE "mod_cern_meta.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_cern_meta.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_cern_meta - Win32 Release" || "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_cern_meta - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cern_meta - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_cern_meta - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_cern_meta - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_cern_meta.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cern_meta.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_cern_meta.so" /d LONG_NAME="cern_meta_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_cern_meta - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_cern_meta.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_cern_meta.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_cern_meta.so" /d LONG_NAME="cern_meta_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_cern_meta.c
      +
      +"$(INTDIR)\mod_cern_meta.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_env.c b/modules/metadata/mod_env.c
      index 38932d84c6f..e3e1d4e0610 100644
      --- a/modules/metadata/mod_env.c
      +++ b/modules/metadata/mod_env.c
      @@ -63,7 +63,7 @@ static void *merge_env_dir_configs(apr_pool_t *p, void *basev, void *addv)
            *     table_set( res->vars, $element.key, $element.val );
            *
            * add->unsetenv already removed the vars from add->vars,
      -     * if they preceeded the UnsetEnv directive.
      +     * if they preceded the UnsetEnv directive.
            */
           res->vars = apr_table_copy(p, base->vars);
           res->unsetenv = NULL;
      @@ -101,7 +101,7 @@ static const char *add_env_module_vars_passed(cmd_parms *cmd, void *sconf_,
               apr_table_setn(vars, arg, apr_pstrdup(cmd->pool, env_var));
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(01506)
                            "PassEnv variable %s was undefined", arg);
           }
       
      @@ -152,7 +152,7 @@ static int fixup_env_module(request_rec *r)
           env_dir_config_rec *sconf = ap_get_module_config(r->per_dir_config,
                                                            &env_module);
       
      -    if (!apr_table_elts(sconf->vars)->nelts) {
      +    if (apr_is_empty_table(sconf->vars)) {
               return DECLINED;
           }
       
      diff --git a/modules/metadata/mod_env.dep b/modules/metadata/mod_env.dep
      new file mode 100644
      index 00000000000..88c0fc2fae6
      --- /dev/null
      +++ b/modules/metadata/mod_env.dep
      @@ -0,0 +1,47 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_env.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_env.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_env.mak b/modules/metadata/mod_env.mak
      new file mode 100644
      index 00000000000..62078307124
      --- /dev/null
      +++ b/modules/metadata/mod_env.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_env.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_env - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_env - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_env - Win32 Release" && "$(CFG)" != "mod_env - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_env.mak" CFG="mod_env - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_env - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_env - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_env - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_env.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_env.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_env.obj"
      +	-@erase "$(INTDIR)\mod_env.res"
      +	-@erase "$(INTDIR)\mod_env_src.idb"
      +	-@erase "$(INTDIR)\mod_env_src.pdb"
      +	-@erase "$(OUTDIR)\mod_env.exp"
      +	-@erase "$(OUTDIR)\mod_env.lib"
      +	-@erase "$(OUTDIR)\mod_env.pdb"
      +	-@erase "$(OUTDIR)\mod_env.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_env_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_env.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_env.so" /d LONG_NAME="env_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_env.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_env.pdb" /debug /out:"$(OUTDIR)\mod_env.so" /implib:"$(OUTDIR)\mod_env.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_env.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_env.obj" \
      +	"$(INTDIR)\mod_env.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_env.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_env.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_env.so"
      +   if exist .\Release\mod_env.so.manifest mt.exe -manifest .\Release\mod_env.so.manifest -outputresource:.\Release\mod_env.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_env - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_env.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_env.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_env.obj"
      +	-@erase "$(INTDIR)\mod_env.res"
      +	-@erase "$(INTDIR)\mod_env_src.idb"
      +	-@erase "$(INTDIR)\mod_env_src.pdb"
      +	-@erase "$(OUTDIR)\mod_env.exp"
      +	-@erase "$(OUTDIR)\mod_env.lib"
      +	-@erase "$(OUTDIR)\mod_env.pdb"
      +	-@erase "$(OUTDIR)\mod_env.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_env_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_env.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_env.so" /d LONG_NAME="env_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_env.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_env.pdb" /debug /out:"$(OUTDIR)\mod_env.so" /implib:"$(OUTDIR)\mod_env.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_env.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_env.obj" \
      +	"$(INTDIR)\mod_env.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_env.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_env.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_env.so"
      +   if exist .\Debug\mod_env.so.manifest mt.exe -manifest .\Debug\mod_env.so.manifest -outputresource:.\Debug\mod_env.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_env.dep")
      +!INCLUDE "mod_env.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_env.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_env - Win32 Release" || "$(CFG)" == "mod_env - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_env - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_env - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_env - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_env - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_env - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_env - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_env - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_env.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_env.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_env.so" /d LONG_NAME="env_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_env - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_env.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_env.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_env.so" /d LONG_NAME="env_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_env.c
      +
      +"$(INTDIR)\mod_env.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c
      index f8a9946868c..447fce48df6 100644
      --- a/modules/metadata/mod_expires.c
      +++ b/modules/metadata/mod_expires.c
      @@ -267,10 +267,7 @@ static char *check_code(apr_pool_t *p, const char *code, char **real_code)
               /* <type>
                */
               word = ap_getword_conf(p, &code);
      -        if (word[0]) {
      -            /* do nothing */
      -        }
      -        else {
      +        if (word[0] == '\0') {
                   return apr_pstrcat(p, "bad expires code, missing <type>", NULL);
               }
       
      @@ -423,7 +420,7 @@ static int set_expiration_fields(request_rec *r, const char *code,
               /* expecting the add_* routines to be case-hardened this
                * is just a reminder that module is beta
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01500)
                           "internal error: bad expires code: %s", r->filename);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -454,6 +451,12 @@ static apr_status_t expires_filter(ap_filter_t *f,
           const char *expiry;
           apr_table_t *t;
       
      +    /* Don't add Expires headers to errors */
      +    if (ap_is_HTTP_ERROR(f->r->status)) {
      +        ap_remove_output_filter(f);
      +        return ap_pass_brigade(f->next, b);
      +    }
      +
           r = f->r;
           conf = (expires_dir_config *) ap_get_module_config(r->per_dir_config,
                                                              &expires_module);
      @@ -543,8 +546,8 @@ static void expires_insert_filter(request_rec *r)
               return;
           }
           ap_add_output_filter("MOD_EXPIRES", NULL, r, r->connection);
      -    return;
       }
      +
       static void register_hooks(apr_pool_t *p)
       {
           /* mod_expires needs to run *before* the cache save filter which is
      diff --git a/modules/metadata/mod_expires.dep b/modules/metadata/mod_expires.dep
      new file mode 100644
      index 00000000000..f2170ce29f2
      --- /dev/null
      +++ b/modules/metadata/mod_expires.dep
      @@ -0,0 +1,54 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_expires.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_expires.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_expires.mak b/modules/metadata/mod_expires.mak
      new file mode 100644
      index 00000000000..db62d315941
      --- /dev/null
      +++ b/modules/metadata/mod_expires.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_expires.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_expires - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_expires - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_expires - Win32 Release" && "$(CFG)" != "mod_expires - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_expires.mak" CFG="mod_expires - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_expires - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_expires - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_expires - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_expires.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_expires.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_expires.obj"
      +	-@erase "$(INTDIR)\mod_expires.res"
      +	-@erase "$(INTDIR)\mod_expires_src.idb"
      +	-@erase "$(INTDIR)\mod_expires_src.pdb"
      +	-@erase "$(OUTDIR)\mod_expires.exp"
      +	-@erase "$(OUTDIR)\mod_expires.lib"
      +	-@erase "$(OUTDIR)\mod_expires.pdb"
      +	-@erase "$(OUTDIR)\mod_expires.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_expires_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_expires.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_expires.so" /d LONG_NAME="expires_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_expires.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_expires.pdb" /debug /out:"$(OUTDIR)\mod_expires.so" /implib:"$(OUTDIR)\mod_expires.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_expires.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_expires.obj" \
      +	"$(INTDIR)\mod_expires.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_expires.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_expires.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_expires.so"
      +   if exist .\Release\mod_expires.so.manifest mt.exe -manifest .\Release\mod_expires.so.manifest -outputresource:.\Release\mod_expires.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_expires.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_expires.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_expires.obj"
      +	-@erase "$(INTDIR)\mod_expires.res"
      +	-@erase "$(INTDIR)\mod_expires_src.idb"
      +	-@erase "$(INTDIR)\mod_expires_src.pdb"
      +	-@erase "$(OUTDIR)\mod_expires.exp"
      +	-@erase "$(OUTDIR)\mod_expires.lib"
      +	-@erase "$(OUTDIR)\mod_expires.pdb"
      +	-@erase "$(OUTDIR)\mod_expires.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_expires_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_expires.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_expires.so" /d LONG_NAME="expires_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_expires.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_expires.pdb" /debug /out:"$(OUTDIR)\mod_expires.so" /implib:"$(OUTDIR)\mod_expires.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_expires.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_expires.obj" \
      +	"$(INTDIR)\mod_expires.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_expires.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_expires.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_expires.so"
      +   if exist .\Debug\mod_expires.so.manifest mt.exe -manifest .\Debug\mod_expires.so.manifest -outputresource:.\Debug\mod_expires.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_expires.dep")
      +!INCLUDE "mod_expires.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_expires.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_expires - Win32 Release" || "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_expires - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_expires - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_expires - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_expires - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_expires.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_expires.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_expires.so" /d LONG_NAME="expires_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_expires - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_expires.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_expires.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_expires.so" /d LONG_NAME="expires_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_expires.c
      +
      +"$(INTDIR)\mod_expires.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c
      index 6a552c4bc41..1ea970d7801 100644
      --- a/modules/metadata/mod_headers.c
      +++ b/modules/metadata/mod_headers.c
      @@ -96,7 +96,9 @@ typedef enum {
           hdr_unset = 'u',            /* unset header */
           hdr_echo = 'e',             /* echo headers from request to response */
           hdr_edit = 'r',             /* change value by regexp, match once */
      -    hdr_edit_r = 'R'            /* change value by regexp, everymatch */
      +    hdr_edit_r = 'R',           /* change value by regexp, everymatch */
      +    hdr_setifempty = 'i',       /* set value if header not already present*/
      +    hdr_note = 'n'              /* set value of header in a note */
       } hdr_actions;
       
       /*
      @@ -131,6 +133,7 @@ typedef struct {
           const char *condition_var;
           const char *subs;
           ap_expr_info_t *expr;
      +    ap_expr_info_t *expr_out;
       } header_entry;
       
       /* echo_do is used for Header echo to iterate through the request headers*/
      @@ -141,7 +144,7 @@ typedef struct {
       
       /* edit_do is used for Header edit to iterate through the request headers */
       typedef struct {
      -    apr_pool_t *p;
      +    request_rec *r;
           header_entry *hdr;
           apr_table_t *t;
       } edit_do;
      @@ -220,6 +223,28 @@ static const char *header_request_ssl_var(request_rec *r, char *name)
           }
       }
       
      +static const char *header_request_loadavg(request_rec *r, char *a)
      +{
      +    ap_loadavg_t t;
      +    ap_get_loadavg(&t);
      +    return apr_psprintf(r->pool, "l=%.2f/%.2f/%.2f", t.loadavg,
      +                        t.loadavg5, t.loadavg15);
      +}
      +
      +static const char *header_request_idle(request_rec *r, char *a)
      +{
      +    ap_sload_t t;
      +    ap_get_sload(&t);
      +    return apr_psprintf(r->pool, "i=%d", t.idle);
      +}
      +
      +static const char *header_request_busy(request_rec *r, char *a)
      +{
      +    ap_sload_t t;
      +    ap_get_sload(&t);
      +    return apr_psprintf(r->pool, "b=%d", t.busy);
      +}
      +
       /*
        * Config routines
        */
      @@ -363,15 +388,29 @@ static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa)
        * contains a pointer to the function used to format the tag. Then save each
        * tag in the tag array anchored in the header_entry.
        */
      -static char *parse_format_string(apr_pool_t *p, header_entry *hdr, const char *s)
      +static char *parse_format_string(cmd_parms *cmd, header_entry *hdr, const char *s)
       {
      +    apr_pool_t *p = cmd->pool;
           char *res;
       
           /* No string to parse with unset and echo commands */
      -    if (hdr->action == hdr_unset ||
      -        hdr->action == hdr_edit ||
      -        hdr->action == hdr_edit_r ||
      -        hdr->action == hdr_echo) {
      +    if (hdr->action == hdr_unset || hdr->action == hdr_echo) {
      +        return NULL;
      +    }
      +    /* Tags are in the replacement value for edit */
      +    else if (hdr->action == hdr_edit || hdr->action == hdr_edit_r ) {
      +        s = hdr->subs;
      +    }
      +
      +    if (!strncmp(s, "expr=", 5)) { 
      +        const char *err;
      +        hdr->expr_out = ap_expr_parse_cmd(cmd, s+5, 
      +                                          AP_EXPR_FLAG_STRING_RESULT,
      +                                          &err, NULL);
      +        if (err) {
      +            return apr_pstrcat(cmd->pool,
      +                    "Can't parse value expression : ", err, NULL);
      +        }
               return NULL;
           }
       
      @@ -409,6 +448,8 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
       
           if (!strcasecmp(action, "set"))
               new->action = hdr_set;
      +    else if (!strcasecmp(action, "setifempty"))
      +        new->action = hdr_setifempty;
           else if (!strcasecmp(action, "add"))
               new->action = hdr_add;
           else if (!strcasecmp(action, "append"))
      @@ -423,9 +464,11 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
               new->action = hdr_edit;
           else if (!strcasecmp(action, "edit*"))
               new->action = hdr_edit_r;
      +    else if (!strcasecmp(action, "note"))
      +        new->action = hdr_note;
           else
      -        return "first argument must be 'add', 'set', 'append', 'merge', "
      -               "'unset', 'echo', 'edit', or 'edit*'.";
      +        return "first argument must be 'add', 'set', 'setifempty', 'append', 'merge', "
      +               "'unset', 'echo', 'note', 'edit', or 'edit*'.";
       
           if (new->action == hdr_edit || new->action == hdr_edit_r) {
               if (subs == NULL) {
      @@ -513,7 +556,7 @@ static APR_INLINE const char *header_inout_cmd(cmd_parms *cmd,
           new->condition_var = condition_var;
           new->expr = expr;
       
      -    return parse_format_string(cmd->pool, new, value);
      +    return parse_format_string(cmd, new, value);
       }
       
       /* Handle all (xxx)Header directives */
      @@ -555,14 +598,29 @@ static const char *header_cmd(cmd_parms *cmd, void *indirconf,
        * (formatter) specific to the tag. Handlers return text strings.
        * Concatenate the return from each handler into one string that is
        * returned from this call.
      + * If the original value was prefixed with "expr=", processing is
      + * handled instead by ap_expr.
        */
       static char* process_tags(header_entry *hdr, request_rec *r)
       {
           int i;
           const char *s;
           char *str = NULL;
      +    format_tag *tag = NULL;
      +
      +    if (hdr->expr_out) { 
      +        const char *err;
      +        const char *val;
      +        val = ap_expr_str_exec(r, hdr->expr_out, &err);
      +        if (err) { 
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02557)
      +                          "Can't evaluate value expression: %s", err);
      +            return "";
      +        }
      +        return apr_pstrdup(r->pool, val);
      +    }
       
      -    format_tag *tag = (format_tag*) hdr->ta->elts;
      +    tag = (format_tag*) hdr->ta->elts;
       
           for (i = 0; i < hdr->ta->nelts; i++) {
               s = tag[i].func(r, tag[i].arg);
      @@ -574,7 +632,7 @@ static char* process_tags(header_entry *hdr, request_rec *r)
           return str ? str : "";
       }
       static const char *process_regexp(header_entry *hdr, const char *value,
      -                                  apr_pool_t *pool)
      +                                  request_rec *r)
       {
           ap_regmatch_t pmatch[AP_MAX_REG_MATCH];
           const char *subs;
      @@ -585,7 +643,10 @@ static const char *process_regexp(header_entry *hdr, const char *value,
               /* no match, nothing to do */
               return value;
           }
      -    subs = ap_pregsub(pool, hdr->subs, value, AP_MAX_REG_MATCH, pmatch);
      +    /* Process tags in the input string rather than the resulting
      +       * substitution to avoid surprises
      +       */
      +    subs = ap_pregsub(r->pool, process_tags(hdr, r), value, AP_MAX_REG_MATCH, pmatch);
           if (subs == NULL)
               return NULL;
           diffsz = strlen(subs) - (pmatch[0].rm_eo - pmatch[0].rm_so);
      @@ -593,25 +654,27 @@ static const char *process_regexp(header_entry *hdr, const char *value,
               remainder = value + pmatch[0].rm_eo;
           }
           else { /* recurse to edit multiple matches if applicable */
      -        remainder = process_regexp(hdr, value + pmatch[0].rm_eo, pool);
      +        remainder = process_regexp(hdr, value + pmatch[0].rm_eo, r);
               if (remainder == NULL)
                   return NULL;
               diffsz += strlen(remainder) - strlen(value + pmatch[0].rm_eo);
           }
      -    ret = apr_palloc(pool, strlen(value) + 1 + diffsz);
      +    ret = apr_palloc(r->pool, strlen(value) + 1 + diffsz);
           memcpy(ret, value, pmatch[0].rm_so);
           strcpy(ret + pmatch[0].rm_so, subs);
           strcat(ret, remainder);
           return ret;
       }
       
      -static int echo_header(echo_do *v, const char *key, const char *val)
      +static int echo_header(void *v, const char *key, const char *val)
       {
      +    edit_do *ed = v;
      +
           /* If the input header (key) matches the regex, echo it intact to
            * r->headers_out.
            */
      -    if (!ap_regexec(v->hdr->regex, key, 0, NULL, 0)) {
      -        apr_table_add(v->r->headers_out, key, val);
      +    if (!ap_regexec(ed->hdr->regex, key, 0, NULL, 0)) {
      +        apr_table_add(ed->r->headers_out, key, val);
           }
       
           return 1;
      @@ -620,7 +683,7 @@ static int echo_header(echo_do *v, const char *key, const char *val)
       static int edit_header(void *v, const char *key, const char *val)
       {
           edit_do *ed = (edit_do *)v;
      -    const char *repl = process_regexp(ed->hdr, val, ed->p);
      +    const char *repl = process_regexp(ed->hdr, val, ed->r);
           if (repl == NULL)
               return 0;
       
      @@ -660,7 +723,7 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                   const char *err = NULL;
                   int eval = ap_expr_exec(r, hdr->expr, &err);
                   if (err) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01501)
                                     "Failed to evaluate expression (%s) - ignoring",
                                     err);
                   }
      @@ -700,7 +763,7 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                       while (*val) {
                           const char *tok_start;
       
      -                    while (*val && apr_isspace(*val))
      +                    while (apr_isspace(*val))
                               ++val;
       
                           tok_start = val;
      @@ -733,19 +796,26 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                   }
                   apr_table_setn(headers, hdr->header, process_tags(hdr, r));
                   break;
      +        case hdr_setifempty:
      +            if (NULL == apr_table_get(headers, hdr->header)) {
      +                if (!strcasecmp(hdr->header, "Content-Type")) {
      +                    ap_set_content_type(r, process_tags(hdr, r));
      +                }
      +                apr_table_setn(headers, hdr->header, process_tags(hdr, r));
      +            }
      +            break;
               case hdr_unset:
                   apr_table_unset(headers, hdr->header);
                   break;
               case hdr_echo:
                   v.r = r;
                   v.hdr = hdr;
      -            apr_table_do((int (*) (void *, const char *, const char *))
      -                         echo_header, (void *) &v, r->headers_in, NULL);
      +            apr_table_do(echo_header, &v, r->headers_in, NULL);
                   break;
               case hdr_edit:
               case hdr_edit_r:
                   if (!strcasecmp(hdr->header, "Content-Type") && r->content_type) {
      -                const char *repl = process_regexp(hdr, r->content_type, r->pool);
      +                const char *repl = process_regexp(hdr, r->content_type, r);
                       if (repl == NULL)
                           return 0;
                       ap_set_content_type(r, repl);
      @@ -753,7 +823,7 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                   if (apr_table_get(headers, hdr->header)) {
                       edit_do ed;
       
      -                ed.p = r->pool;
      +                ed.r = r;
                       ed.hdr = hdr;
                       ed.t = apr_table_make(r->pool, 5);
                       if (!apr_table_do(edit_header, (void *) &ed, headers,
      @@ -763,6 +833,10 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                       apr_table_do(add_them_all, (void *) headers, ed.t, NULL);
                   }
                   break;
      +        case hdr_note:
      +            apr_table_setn(r->notes, process_tags(hdr, r), apr_table_get(headers, hdr->header));
      +            break;
      + 
               }
           }
           return 1;
      @@ -797,7 +871,7 @@ static apr_status_t ap_headers_output_filter(ap_filter_t *f,
           headers_conf *dirconf = ap_get_module_config(f->r->per_dir_config,
                                                        &headers_module);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, f->r->server,
      +    ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, f->r->server, APLOGNO(01502)
                        "headers: ap_headers_output_filter()");
       
           /* do the fixup */
      @@ -822,7 +896,7 @@ static apr_status_t ap_headers_error_filter(ap_filter_t *f,
       
           dirconf = ap_get_module_config(f->r->per_dir_config,
                                           &headers_module);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, f->r->server,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, f->r->server, APLOGNO(01503)
                        "headers: ap_headers_error_filter()");
       
           /*
      @@ -876,7 +950,7 @@ static apr_status_t ap_headers_early(request_rec *r)
       
           return DECLINED;
       err:
      -    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01504)
                         "Regular expression replacement failed (replacement too long?)");
           return HTTP_INTERNAL_SERVER_ERROR;
       }
      @@ -905,6 +979,9 @@ static int header_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
           register_format_tag_handler("t", header_request_time);
           register_format_tag_handler("e", header_request_env_var);
           register_format_tag_handler("s", header_request_ssl_var);
      +    register_format_tag_handler("l", header_request_loadavg);
      +    register_format_tag_handler("i", header_request_idle);
      +    register_format_tag_handler("b", header_request_busy);
       
           return OK;
       }
      diff --git a/modules/metadata/mod_headers.dep b/modules/metadata/mod_headers.dep
      new file mode 100644
      index 00000000000..d4cef71cd21
      --- /dev/null
      +++ b/modules/metadata/mod_headers.dep
      @@ -0,0 +1,57 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_headers.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_headers.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\ssl\mod_ssl.h"\
      +	
      diff --git a/modules/metadata/mod_headers.mak b/modules/metadata/mod_headers.mak
      new file mode 100644
      index 00000000000..7f9cddd85c4
      --- /dev/null
      +++ b/modules/metadata/mod_headers.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_headers.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_headers - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_headers - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_headers - Win32 Release" && "$(CFG)" != "mod_headers - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_headers.mak" CFG="mod_headers - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_headers - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_headers - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_headers - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_headers.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_headers.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_headers.obj"
      +	-@erase "$(INTDIR)\mod_headers.res"
      +	-@erase "$(INTDIR)\mod_headers_src.idb"
      +	-@erase "$(INTDIR)\mod_headers_src.pdb"
      +	-@erase "$(OUTDIR)\mod_headers.exp"
      +	-@erase "$(OUTDIR)\mod_headers.lib"
      +	-@erase "$(OUTDIR)\mod_headers.pdb"
      +	-@erase "$(OUTDIR)\mod_headers.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_headers_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_headers.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_headers.so" /d LONG_NAME="headers_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_headers.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_headers.pdb" /debug /out:"$(OUTDIR)\mod_headers.so" /implib:"$(OUTDIR)\mod_headers.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_headers.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_headers.obj" \
      +	"$(INTDIR)\mod_headers.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_headers.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_headers.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_headers.so"
      +   if exist .\Release\mod_headers.so.manifest mt.exe -manifest .\Release\mod_headers.so.manifest -outputresource:.\Release\mod_headers.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_headers.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_headers.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_headers.obj"
      +	-@erase "$(INTDIR)\mod_headers.res"
      +	-@erase "$(INTDIR)\mod_headers_src.idb"
      +	-@erase "$(INTDIR)\mod_headers_src.pdb"
      +	-@erase "$(OUTDIR)\mod_headers.exp"
      +	-@erase "$(OUTDIR)\mod_headers.lib"
      +	-@erase "$(OUTDIR)\mod_headers.pdb"
      +	-@erase "$(OUTDIR)\mod_headers.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_headers_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_headers.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_headers.so" /d LONG_NAME="headers_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_headers.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_headers.pdb" /debug /out:"$(OUTDIR)\mod_headers.so" /implib:"$(OUTDIR)\mod_headers.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_headers.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_headers.obj" \
      +	"$(INTDIR)\mod_headers.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_headers.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_headers.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_headers.so"
      +   if exist .\Debug\mod_headers.so.manifest mt.exe -manifest .\Debug\mod_headers.so.manifest -outputresource:.\Debug\mod_headers.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_headers.dep")
      +!INCLUDE "mod_headers.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_headers.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_headers - Win32 Release" || "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_headers - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_headers - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_headers - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_headers - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_headers.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_headers.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_headers.so" /d LONG_NAME="headers_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_headers - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_headers.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_headers.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_headers.so" /d LONG_NAME="headers_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_headers.c
      +
      +"$(INTDIR)\mod_headers.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_ident.c b/modules/metadata/mod_ident.c
      index bd2c54d52e1..5520a802ec9 100644
      --- a/modules/metadata/mod_ident.c
      +++ b/modules/metadata/mod_ident.c
      @@ -95,33 +95,33 @@ static apr_status_t rfc1413_connect(apr_socket_t **newsock, conn_rec *conn,
                                     0, conn->pool)) != APR_SUCCESS) {
               /* This should not fail since we have a numeric address string
                * as the host. */
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv, APLOGNO(01492)
                            "rfc1413: apr_sockaddr_info_get(%s) failed",
                            conn->local_ip);
               return rv;
           }
       
      -    if ((rv = apr_sockaddr_info_get(&destsa, conn->remote_ip,
      +    if ((rv = apr_sockaddr_info_get(&destsa, conn->client_ip,
                                     localsa->family, /* has to match */
                                     RFC1413_PORT, 0, conn->pool)) != APR_SUCCESS) {
               /* This should not fail since we have a numeric address string
                * as the host. */
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv, APLOGNO(01493)
                            "rfc1413: apr_sockaddr_info_get(%s) failed",
      -                     conn->remote_ip);
      +                     conn->client_ip);
               return rv;
           }
       
           if ((rv = apr_socket_create(newsock,
                                       localsa->family, /* has to match */
                                       SOCK_STREAM, 0, conn->pool)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv, APLOGNO(01494)
                            "rfc1413: error creating query socket");
               return rv;
           }
       
           if ((rv = apr_socket_timeout_set(*newsock, timeout)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv, APLOGNO(01495)
                            "rfc1413: error setting query socket timeout");
               apr_socket_close(*newsock);
               return rv;
      @@ -137,7 +137,7 @@ static apr_status_t rfc1413_connect(apr_socket_t **newsock, conn_rec *conn,
        */
       
           if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv, APLOGNO(01496)
                            "rfc1413: Error binding query socket to local port");
               apr_socket_close(*newsock);
               return rv;
      @@ -167,7 +167,7 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn,
           apr_size_t buflen;
       
           sav_our_port = conn->local_addr->port;
      -    sav_rmt_port = conn->remote_addr->port;
      +    sav_rmt_port = conn->client_addr->port;
       
           /* send the data */
           buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port,
      @@ -181,7 +181,7 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn,
               apr_status_t status;
               status  = apr_socket_send(sock, buffer+i, &j);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv, APLOGNO(01497)
                                "write: rfc1413: error sending request");
                   return status;
               }
      @@ -202,12 +202,12 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn,
            * Note that the strchr function below checks for \012 instead of '\n'
            * this allows it to work on both ASCII and EBCDIC machines.
            */
      -    while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
      +    while ((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
               apr_size_t j = sizeof(buffer) - 1 - i;
               apr_status_t status;
               status = apr_socket_recv(sock, buffer+i, &j);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv, APLOGNO(01498)
                                "read: rfc1413: error reading response");
                   return status;
               }
      @@ -298,7 +298,7 @@ static const command_rec ident_cmds[] =
       module AP_MODULE_DECLARE_DATA ident_module;
       
       /*
      - * Optional function for the core to to the actual ident request
      + * Optional function for the core to the actual ident request
        */
       static const char *ap_ident_lookup(request_rec *r)
       {
      diff --git a/modules/metadata/mod_ident.dep b/modules/metadata/mod_ident.dep
      new file mode 100644
      index 00000000000..37ff4240c5c
      --- /dev/null
      +++ b/modules/metadata/mod_ident.dep
      @@ -0,0 +1,52 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_ident.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_ident.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_ident.mak b/modules/metadata/mod_ident.mak
      new file mode 100644
      index 00000000000..cc45e211b30
      --- /dev/null
      +++ b/modules/metadata/mod_ident.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_ident.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_ident - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_ident - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_ident - Win32 Release" && "$(CFG)" != "mod_ident - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_ident.mak" CFG="mod_ident - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_ident - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_ident - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ident - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ident.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ident.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ident.obj"
      +	-@erase "$(INTDIR)\mod_ident.res"
      +	-@erase "$(INTDIR)\mod_ident_src.idb"
      +	-@erase "$(INTDIR)\mod_ident_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ident.exp"
      +	-@erase "$(OUTDIR)\mod_ident.lib"
      +	-@erase "$(OUTDIR)\mod_ident.pdb"
      +	-@erase "$(OUTDIR)\mod_ident.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ident_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ident.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ident.so" /d LONG_NAME="ident_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ident.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ident.pdb" /debug /out:"$(OUTDIR)\mod_ident.so" /implib:"$(OUTDIR)\mod_ident.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ident.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ident.obj" \
      +	"$(INTDIR)\mod_ident.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ident.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_ident.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ident.so"
      +   if exist .\Release\mod_ident.so.manifest mt.exe -manifest .\Release\mod_ident.so.manifest -outputresource:.\Release\mod_ident.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ident.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ident.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ident.obj"
      +	-@erase "$(INTDIR)\mod_ident.res"
      +	-@erase "$(INTDIR)\mod_ident_src.idb"
      +	-@erase "$(INTDIR)\mod_ident_src.pdb"
      +	-@erase "$(OUTDIR)\mod_ident.exp"
      +	-@erase "$(OUTDIR)\mod_ident.lib"
      +	-@erase "$(OUTDIR)\mod_ident.pdb"
      +	-@erase "$(OUTDIR)\mod_ident.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ident_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ident.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ident.so" /d LONG_NAME="ident_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ident.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ident.pdb" /debug /out:"$(OUTDIR)\mod_ident.so" /implib:"$(OUTDIR)\mod_ident.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_ident.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ident.obj" \
      +	"$(INTDIR)\mod_ident.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ident.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_ident.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ident.so"
      +   if exist .\Debug\mod_ident.so.manifest mt.exe -manifest .\Debug\mod_ident.so.manifest -outputresource:.\Debug\mod_ident.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_ident.dep")
      +!INCLUDE "mod_ident.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_ident.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_ident - Win32 Release" || "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_ident - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ident - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ident - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_ident - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_ident.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ident.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_ident.so" /d LONG_NAME="ident_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_ident - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_ident.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ident.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_ident.so" /d LONG_NAME="ident_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_ident.c
      +
      +"$(INTDIR)\mod_ident.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_mime_magic.c b/modules/metadata/mod_mime_magic.c
      index 3e99b11ae69..22dadaf6fbd 100644
      --- a/modules/metadata/mod_mime_magic.c
      +++ b/modules/metadata/mod_mime_magic.c
      @@ -161,7 +161,7 @@ struct magic {
               unsigned char hl[4];   /* 2 bytes of a fixed-endian "long" */
           } value;                   /* either number or string */
           unsigned long mask;        /* mask before comparison with value */
      -    char nospflag;             /* supress space character */
      +    char nospflag;             /* suppress space character */
       
           /* NOTE: this string is suspected of overrunning - find it! */
           char desc[MAXDESC];        /* description */
      @@ -548,7 +548,7 @@ static int magic_rsl_add(request_rec *r, const char *str)
       
           /* make sure we have a list to put it in */
           if (!req_dat) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EINVAL, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EINVAL, r, APLOGNO(01507)
                           MODNAME ": request config should not be NULL");
               if (!(req_dat = magic_set_config(r))) {
                   /* failure */
      @@ -650,7 +650,7 @@ static char *rsl_strdup(request_rec *r, int start_frag, int start_pos, int len)
           /* clean up and return */
           result[res_pos] = 0;
       #if MIME_MAGIC_DEBUG
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01508)
                    MODNAME ": rsl_strdup() %d chars: %s", res_pos - 1, result);
       #endif
           return result;
      @@ -723,7 +723,7 @@ static int magic_rsl_to_request(request_rec *r)
                       else {
                           /* should not be possible */
                           /* abandon malfunctioning module */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01509)
                                       MODNAME ": bad state %d (ws)", state);
                           return DECLINED;
                       }
      @@ -767,7 +767,7 @@ static int magic_rsl_to_request(request_rec *r)
                       else {
                           /* should not be possible */
                           /* abandon malfunctioning module */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01510)
                                       MODNAME ": bad state %d (ns)", state);
                           return DECLINED;
                       }
      @@ -803,7 +803,7 @@ static int magic_rsl_to_request(request_rec *r)
           /* detect memory allocation or other errors */
           if (!r->content_type ||
               (state == rsl_encoding && !r->content_encoding)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01511)
                             MODNAME ": unexpected state %d; could be caused by bad "
                             "data in magic file",
                             state);
      @@ -842,7 +842,7 @@ static int magic_process(request_rec *r)
       
           if (apr_file_open(&fd, r->filename, APR_READ, APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
               /* We can't open it, but we were able to stat it. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01512)
                           MODNAME ": can't read `%s'", r->filename);
               /* let some other handler decide what the problem is */
               return DECLINED;
      @@ -853,7 +853,7 @@ static int magic_process(request_rec *r)
            */
           nbytes = sizeof(buf) - 1;
           if ((result = apr_file_read(fd, (char *) buf, &nbytes)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, result, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, result, r, APLOGNO(01513)
                           MODNAME ": read failed: %s", r->filename);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -927,13 +927,13 @@ static int apprentice(server_rec *s, apr_pool_t *p)
           const char *fname = ap_server_root_relative(p, conf->magicfile);
       
           if (!fname) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_EBADPATH, s, APLOGNO(01514)
                            MODNAME ": Invalid magic file path %s", conf->magicfile);
               return -1;
           }
           if ((result = apr_file_open(&f, fname, APR_READ | APR_BUFFERED,
                                       APR_OS_DEFAULT, p)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, result, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, result, s, APLOGNO(01515)
                            MODNAME ": can't read magic file %s", fname);
               return -1;
           }
      @@ -983,28 +983,28 @@ static int apprentice(server_rec *s, apr_pool_t *p)
           (void) apr_file_close(f);
       
       #if MIME_MAGIC_DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01516)
                       MODNAME ": apprentice conf=%x file=%s m=%s m->next=%s last=%s",
                       conf,
                       conf->magicfile ? conf->magicfile : "NULL",
                       conf->magic ? "set" : "NULL",
                       (conf->magic && conf->magic->next) ? "set" : "NULL",
                       conf->last ? "set" : "NULL");
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01517)
                       MODNAME ": apprentice read %d lines, %d rules, %d errors",
                       lineno, rule, errs);
       #endif
       
       #if MIME_MAGIC_DEBUG
           prevm = 0;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01518)
                       MODNAME ": apprentice test");
           for (m = conf->magic; m; m = m->next) {
               if (apr_isprint((((unsigned long) m) >> 24) & 255) &&
                   apr_isprint((((unsigned long) m) >> 16) & 255) &&
                   apr_isprint((((unsigned long) m) >> 8) & 255) &&
                   apr_isprint(((unsigned long) m) & 255)) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01519)
                               MODNAME ": apprentice: POINTER CLOBBERED! "
                               "m=\"%c%c%c%c\" line=%d",
                               (((unsigned long) m) >> 24) & 255,
      @@ -1051,7 +1051,7 @@ static unsigned long signextend(server_rec *s, struct magic *m, unsigned long v)
               case STRING:
                   break;
               default:
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01520)
                               MODNAME ": can't happen: m->type=%d", m->type);
                   return -1;
               }
      @@ -1099,7 +1099,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
           /* get offset, then skip over it */
           m->offset = (int) strtol(l, &t, 0);
           if (l == t) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv, APLOGNO(01521)
                           MODNAME ": offset %s invalid", l);
           }
           l = t;
      @@ -1122,7 +1122,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
                       m->in.type = BYTE;
                       break;
                   default:
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv, APLOGNO(01522)
                               MODNAME ": indirect offset type %c invalid", *l);
                       break;
                   }
      @@ -1139,7 +1139,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
               else
                   t = l;
               if (*t++ != ')') {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv, APLOGNO(01523)
                               MODNAME ": missing ')' in indirect offset");
               }
               l = t;
      @@ -1213,7 +1213,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
               l += NLEDATE;
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv, APLOGNO(01524)
                           MODNAME ": type %s invalid", l);
               return -1;
           }
      @@ -1275,7 +1275,7 @@ static int parse(server_rec *serv, apr_pool_t *p, char *l, int lineno)
           apr_cpystrn(m->desc, l, sizeof(m->desc));
       
       #if MIME_MAGIC_DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, serv,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, serv, APLOGNO(01525)
                       MODNAME ": parse line=%d m=%x next=%x cont=%d desc=%s",
                       lineno, m, m->next, m->cont_level, m->desc);
       #endif /* MIME_MAGIC_DEBUG */
      @@ -1318,7 +1318,7 @@ static char *getstr(server_rec *serv, register char *s, register char *p,
               if (apr_isspace(c))
                   break;
               if (p >= pmax) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, serv, APLOGNO(01526)
                               MODNAME ": string too long: %s", origs);
                   break;
               }
      @@ -1464,7 +1464,7 @@ static int fsmagic(request_rec *r, const char *fn)
               /* We used stat(), the only possible reason for this is that the
                * symlink is broken.
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01527)
                           MODNAME ": broken symlink (%s)", fn);
               return HTTP_INTERNAL_SERVER_ERROR;
           case APR_SOCK:
      @@ -1473,7 +1473,7 @@ static int fsmagic(request_rec *r, const char *fn)
           case APR_REG:
               break;
           default:
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01528)
                             MODNAME ": invalid file type %d.", r->finfo.filetype);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -1540,7 +1540,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
           struct magic *m;
       
       #if MIME_MAGIC_DEBUG
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01529)
                       MODNAME ": match conf=%x file=%s m=%s m->next=%s last=%s",
                       conf,
                       conf->magicfile ? conf->magicfile : "NULL",
      @@ -1555,7 +1555,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
                   apr_isprint((((unsigned long) m) >> 16) & 255) &&
                   apr_isprint((((unsigned long) m) >> 8) & 255) &&
                   apr_isprint(((unsigned long) m) & 255)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01530)
                               MODNAME ": match: POINTER CLOBBERED! "
                               "m=\"%c%c%c%c\"",
                               (((unsigned long) m) >> 24) & 255,
      @@ -1570,7 +1570,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
           for (m = conf->magic; m; m = m->next) {
       #if MIME_MAGIC_DEBUG
               rule_counter++;
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01531)
                           MODNAME ": line=%d desc=%s", m->lineno, m->desc);
       #endif
       
      @@ -1590,7 +1590,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
                   while (m_cont && (m_cont->cont_level != 0)) {
       #if MIME_MAGIC_DEBUG
                       rule_counter++;
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01532)
                               MODNAME ": line=%d mc=%x mc->next=%x cont=%d desc=%s",
                                   m_cont->lineno, m_cont,
                                   m_cont->next, m_cont->cont_level,
      @@ -1609,7 +1609,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
               /* if we get here, the main entry rule was a match */
               /* this will be the last run through the loop */
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01533)
                           MODNAME ": rule matched, line=%d type=%d %s",
                           m->lineno, m->type,
                           (m->type == STRING) ? m->value.s : "");
      @@ -1633,7 +1633,7 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
               m = m->next;
               while (m && (m->cont_level != 0)) {
       #if MIME_MAGIC_DEBUG
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01534)
                               MODNAME ": match line=%d cont=%d type=%d %s",
                               m->lineno, m->cont_level, m->type,
                               (m->type == STRING) ? m->value.s : "");
      @@ -1677,13 +1677,13 @@ static int match(request_rec *r, unsigned char *s, apr_size_t nbytes)
                   m = m->next;
               }
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01535)
                           MODNAME ": matched after %d rules", rule_counter);
       #endif
               return 1;  /* all through */
           }
       #if MIME_MAGIC_DEBUG
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01536)
                       MODNAME ": failed after %d rules", rule_counter);
       #endif
           return 0;  /* no match at all */
      @@ -1729,7 +1729,7 @@ static void mprint(request_rec *r, union VALUETYPE *p, struct magic *m)
               (void) magic_rsl_printf(r, m->desc, pp);
               return;
           default:
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01537)
                           MODNAME ": invalid m->type (%d) in mprint().",
                           m->type);
               return;
      @@ -1775,7 +1775,7 @@ static int mconvert(request_rec *r, union VALUETYPE *p, struct magic *m)
                   ((p->hl[3] << 24) | (p->hl[2] << 16) | (p->hl[1] << 8) | (p->hl[0]));
               return 1;
           default:
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01538)
                           MODNAME ": invalid type %d in mconvert().", m->type);
               return 0;
           }
      @@ -1827,7 +1827,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           int matched;
       
           if ((m->value.s[0] == 'x') && (m->value.s[1] == '\0')) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01539)
                           MODNAME ": BOINK");
               return 1;
           }
      @@ -1872,7 +1872,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
               break;
           default:
               /*  bogosity, pretend that it just wasn't a match */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01540)
                           MODNAME ": invalid type %d in mcheck().", m->type);
               return 0;
           }
      @@ -1882,7 +1882,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           switch (m->reln) {
           case 'x':
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01541)
                           "%lu == *any* = 1", v);
       #endif
               matched = 1;
      @@ -1891,7 +1891,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           case '!':
               matched = v != l;
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01542)
                           "%lu != %lu = %d", v, l, matched);
       #endif
               break;
      @@ -1899,7 +1899,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           case '=':
               matched = v == l;
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01543)
                           "%lu == %lu = %d", v, l, matched);
       #endif
               break;
      @@ -1908,14 +1908,14 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
               if (m->flag & UNSIGNED) {
                   matched = v > l;
       #if MIME_MAGIC_DEBUG
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01544)
                               "%lu > %lu = %d", v, l, matched);
       #endif
               }
               else {
                   matched = (long) v > (long) l;
       #if MIME_MAGIC_DEBUG
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01545)
                               "%ld > %ld = %d", v, l, matched);
       #endif
               }
      @@ -1925,14 +1925,14 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
               if (m->flag & UNSIGNED) {
                   matched = v < l;
       #if MIME_MAGIC_DEBUG
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01546)
                               "%lu < %lu = %d", v, l, matched);
       #endif
               }
               else {
                   matched = (long) v < (long) l;
       #if MIME_MAGIC_DEBUG
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01547)
                               "%ld < %ld = %d", v, l, matched);
       #endif
               }
      @@ -1941,7 +1941,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           case '&':
               matched = (v & l) == l;
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01548)
                           "((%lx & %lx) == %lx) = %d", v, l, l, matched);
       #endif
               break;
      @@ -1949,7 +1949,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           case '^':
               matched = (v & l) != l;
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01549)
                           "((%lx & %lx) != %lx) = %d", v, l, l, matched);
       #endif
               break;
      @@ -1957,7 +1957,7 @@ static int mcheck(request_rec *r, union VALUETYPE *p, struct magic *m)
           default:
               /* bogosity, pretend it didn't match */
               matched = 0;
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01550)
                           MODNAME ": mcheck: can't happen: invalid relation %d.",
                           m->reln);
               break;
      @@ -1973,7 +1973,7 @@ static int ascmagic(request_rec *r, unsigned char *buf, apr_size_t nbytes)
       {
           int has_escapes = 0;
           unsigned char *s;
      -    char nbuf[HOWMANY + 1];  /* one extra for terminating '\0' */
      +    char nbuf[SMALL_HOWMANY + 1];  /* one extra for terminating '\0' */
           char *token;
           const struct names *p;
           int small_nbytes;
      @@ -2137,7 +2137,7 @@ static int create_uncompress_child(struct uncompress_parms *parm, apr_pool_t *cn
                                     ap_make_dirstr_parent(r->pool, r->filename)) != APR_SUCCESS) ||
               (apr_procattr_cmdtype_set(procattr, APR_PROGRAM_PATH) != APR_SUCCESS)) {
               /* Something bad happened, tell the world. */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_ENOPROC, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_ENOPROC, r, APLOGNO(01551)
                      "couldn't setup child process: %s", r->filename);
           }
           else {
      @@ -2152,7 +2152,7 @@ static int create_uncompress_child(struct uncompress_parms *parm, apr_pool_t *cn
       
               if (rc != APR_SUCCESS) {
                   /* Bad things happened. Everyone should have cleaned up. */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_ENOPROC, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_ENOPROC, r, APLOGNO(01552)
                                 MODNAME ": could not execute `%s'.",
                                 compr[parm->method].argv[0]);
               }
      @@ -2184,7 +2184,7 @@ static int uncompress(request_rec *r, int method,
               return -1;
       
           if ((rv = create_uncompress_child(&parm, sub_context, &pipe_out)) != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01553)
                           MODNAME ": couldn't spawn uncompress process: %s", r->uri);
               return -1;
           }
      @@ -2193,7 +2193,7 @@ static int uncompress(request_rec *r, int method,
           rv = apr_file_read(pipe_out, *newch, &n);
           if (n == 0) {
               apr_pool_destroy(sub_context);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01554)
                   MODNAME ": read failed from uncompress of %s", r->filename);
               return -1;
           }
      @@ -2300,7 +2300,7 @@ static int revision_suffix(request_rec *r)
           request_rec *sub;
       
       #if MIME_MAGIC_DEBUG
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01555)
                       MODNAME ": revision_suffix checking %s", r->filename);
       #endif /* MIME_MAGIC_DEBUG */
       
      @@ -2319,7 +2319,7 @@ static int revision_suffix(request_rec *r)
           result = 0;
           sub_filename = apr_pstrndup(r->pool, r->filename, suffix_pos);
       #if MIME_MAGIC_DEBUG
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01556)
                       MODNAME ": subrequest lookup for %s", sub_filename);
       #endif /* MIME_MAGIC_DEBUG */
           sub = ap_sub_req_lookup_file(sub_filename, r, NULL);
      @@ -2328,7 +2328,7 @@ static int revision_suffix(request_rec *r)
           if (sub->content_type) {
               ap_set_content_type(r, apr_pstrdup(r->pool, sub->content_type));
       #if MIME_MAGIC_DEBUG
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01557)
                           MODNAME ": subrequest %s got %s",
                           sub_filename, r->content_type);
       #endif /* MIME_MAGIC_DEBUG */
      @@ -2379,14 +2379,14 @@ static int magic_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server
                       return OK;
       #if MIME_MAGIC_DEBUG
                   prevm = 0;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01558)
                               MODNAME ": magic_init 1 test");
                   for (m = conf->magic; m; m = m->next) {
                       if (apr_isprint((((unsigned long) m) >> 24) & 255) &&
                           apr_isprint((((unsigned long) m) >> 16) & 255) &&
                           apr_isprint((((unsigned long) m) >> 8) & 255) &&
                           apr_isprint(((unsigned long) m) & 255)) {
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01559)
                                       MODNAME ": magic_init 1: POINTER CLOBBERED! "
                                       "m=\"%c%c%c%c\" line=%d",
                                       (((unsigned long) m) >> 24) & 255,
      diff --git a/modules/metadata/mod_mime_magic.dep b/modules/metadata/mod_mime_magic.dep
      new file mode 100644
      index 00000000000..9257aa27e6f
      --- /dev/null
      +++ b/modules/metadata/mod_mime_magic.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_mime_magic.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_mime_magic.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_mime_magic.mak b/modules/metadata/mod_mime_magic.mak
      new file mode 100644
      index 00000000000..f4573f75c1c
      --- /dev/null
      +++ b/modules/metadata/mod_mime_magic.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_mime_magic.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_mime_magic - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_mime_magic - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_mime_magic - Win32 Release" && "$(CFG)" != "mod_mime_magic - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_mime_magic.mak" CFG="mod_mime_magic - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_mime_magic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_mime_magic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime_magic - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_mime_magic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_mime_magic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_mime_magic.obj"
      +	-@erase "$(INTDIR)\mod_mime_magic.res"
      +	-@erase "$(INTDIR)\mod_mime_magic_src.idb"
      +	-@erase "$(INTDIR)\mod_mime_magic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_mime_magic.exp"
      +	-@erase "$(OUTDIR)\mod_mime_magic.lib"
      +	-@erase "$(OUTDIR)\mod_mime_magic.pdb"
      +	-@erase "$(OUTDIR)\mod_mime_magic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_mime_magic_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_mime_magic.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_mime_magic.so" /d LONG_NAME="mime_magic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_mime_magic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_mime_magic.pdb" /debug /out:"$(OUTDIR)\mod_mime_magic.so" /implib:"$(OUTDIR)\mod_mime_magic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_mime_magic.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_mime_magic.obj" \
      +	"$(INTDIR)\mod_mime_magic.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_mime_magic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_mime_magic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_mime_magic.so"
      +   if exist .\Release\mod_mime_magic.so.manifest mt.exe -manifest .\Release\mod_mime_magic.so.manifest -outputresource:.\Release\mod_mime_magic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_mime_magic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_mime_magic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_mime_magic.obj"
      +	-@erase "$(INTDIR)\mod_mime_magic.res"
      +	-@erase "$(INTDIR)\mod_mime_magic_src.idb"
      +	-@erase "$(INTDIR)\mod_mime_magic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_mime_magic.exp"
      +	-@erase "$(OUTDIR)\mod_mime_magic.lib"
      +	-@erase "$(OUTDIR)\mod_mime_magic.pdb"
      +	-@erase "$(OUTDIR)\mod_mime_magic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_mime_magic_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_mime_magic.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_mime_magic.so" /d LONG_NAME="mime_magic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_mime_magic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_mime_magic.pdb" /debug /out:"$(OUTDIR)\mod_mime_magic.so" /implib:"$(OUTDIR)\mod_mime_magic.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_mime_magic.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_mime_magic.obj" \
      +	"$(INTDIR)\mod_mime_magic.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_mime_magic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_mime_magic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_mime_magic.so"
      +   if exist .\Debug\mod_mime_magic.so.manifest mt.exe -manifest .\Debug\mod_mime_magic.so.manifest -outputresource:.\Debug\mod_mime_magic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_mime_magic.dep")
      +!INCLUDE "mod_mime_magic.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_mime_magic.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_mime_magic - Win32 Release" || "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_mime_magic - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime_magic - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_mime_magic - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_mime_magic - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_mime_magic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_mime_magic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_mime_magic.so" /d LONG_NAME="mime_magic_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_mime_magic - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_mime_magic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_mime_magic.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_mime_magic.so" /d LONG_NAME="mime_magic_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_mime_magic.c
      +
      +"$(INTDIR)\mod_mime_magic.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c
      index 2a9ca7dd4f9..28e01df2976 100644
      --- a/modules/metadata/mod_remoteip.c
      +++ b/modules/metadata/mod_remoteip.c
      @@ -37,11 +37,11 @@ typedef struct {
       } remoteip_proxymatch_t;
       
       typedef struct {
      -    /** The header to retrieve a proxy-via ip list */
      +    /** The header to retrieve a proxy-via IP list */
           const char *header_name;
           /** A header to record the proxied IP's
            * (removed as the physical connection and
      -     * from the proxy-via ip header value list)
      +     * from the proxy-via IP header value list)
            */
           const char *proxies_header_name;
           /** A list of trusted proxies, ideally configured
      @@ -51,19 +51,13 @@ typedef struct {
       } remoteip_config_t;
       
       typedef struct {
      -    /** The previous proxy-via request header value */
      -    const char *prior_remote;
      -    /** The unmodified original ip and address */
      -    const char *orig_ip;
      -    apr_sockaddr_t *orig_addr;
      -    /** The list of proxy ip's ignored as remote ip's */
      +    apr_sockaddr_t *useragent_addr;
      +    char *useragent_ip;
      +    /** The list of proxy IP's ignored as remote IP's */
           const char *proxy_ips;
      -    /** The remaining list of untrusted proxied remote ip's */
      +    /** The remaining list of untrusted proxied remote IP's */
           const char *proxied_remote;
      -    /** The most recently modified ip and address record */
      -    const char *proxied_ip;
      -    apr_sockaddr_t proxied_addr;
      -} remoteip_conn_t;
      +} remoteip_req_t;
       
       static void *create_remoteip_server_config(apr_pool_t *p, server_rec *s)
       {
      @@ -136,11 +130,13 @@ static const char *proxies_set(cmd_parms *cmd, void *cfg,
           apr_status_t rv;
           char *ip = apr_pstrdup(cmd->temp_pool, arg);
           char *s = ap_strchr(ip, '/');
      -    if (s)
      +    if (s) {
               *s++ = '\0';
      +    }
       
      -    if (!config->proxymatch_ip)
      +    if (!config->proxymatch_ip) {
               config->proxymatch_ip = apr_array_make(cmd->pool, 1, sizeof(*match));
      +    }
           match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip);
           match->internal = cmd->info;
       
      @@ -164,8 +160,9 @@ static const char *proxies_set(cmd_parms *cmd, void *cfg,
               {
                   apr_sockaddr_ip_get(&ip, temp_sa);
                   rv = apr_ipsubnet_create(&match->ip, ip, NULL, cmd->pool);
      -            if (!(temp_sa = temp_sa->next))
      +            if (!(temp_sa = temp_sa->next)) {
                       break;
      +            }
                   match = (remoteip_proxymatch_t *)
                           apr_array_push(config->proxymatch_ip);
                   match->internal = cmd->info;
      @@ -173,10 +170,9 @@ static const char *proxies_set(cmd_parms *cmd, void *cfg,
           }
       
           if (rv != APR_SUCCESS) {
      -        char msgbuf[128];
      -        apr_strerror(rv, msgbuf, sizeof(msgbuf));
      -        return apr_pstrcat(cmd->pool, "RemoteIP: Error parsing IP ", arg,
      -                           " (", msgbuf, " error) for ", cmd->cmd->name, NULL);
      +        return apr_psprintf(cmd->pool,
      +                            "RemoteIP: Error parsing IP %s (%pm error) for %s",
      +                            arg, &rv, cmd->cmd->name);
           }
       
           return NULL;
      @@ -195,18 +191,19 @@ static const char *proxylist_read(cmd_parms *cmd, void *cfg,
           filename = ap_server_root_relative(cmd->temp_pool, filename);
           rv = ap_pcfg_openfile(&cfp, cmd->temp_pool, filename);
           if (rv != APR_SUCCESS) {
      -        return apr_psprintf(cmd->pool, "%s: Could not open file %s: %s",
      -                            cmd->cmd->name, filename,
      -                            apr_strerror(rv, lbuf, sizeof(lbuf)));
      +        return apr_psprintf(cmd->pool, "%s: Could not open file %s: %pm",
      +                            cmd->cmd->name, filename, &rv);
           }
       
           while (!(ap_cfg_getline(lbuf, MAX_STRING_LEN, cfp))) {
               args = lbuf;
               while (*(arg = ap_getword_conf(cmd->temp_pool, &args)) != '\0') {
      -            if (*arg == '#' || *arg == '\0')
      +            if (*arg == '#') {
                       break;
      +            }
                   errmsg = proxies_set(cmd, cfg, arg);
                   if (errmsg) {
      +                ap_cfg_closefile(cfp);
                       errmsg = apr_psprintf(cmd->pool, "%s at line %d of %s",
                                             errmsg, cfp->line_number, filename);
                       return errmsg;
      @@ -218,70 +215,71 @@ static const char *proxylist_read(cmd_parms *cmd, void *cfg,
           return NULL;
       }
       
      -static int remoteip_modify_connection(request_rec *r)
      +static int remoteip_modify_request(request_rec *r)
       {
           conn_rec *c = r->connection;
           remoteip_config_t *config = (remoteip_config_t *)
               ap_get_module_config(r->server->module_config, &remoteip_module);
      -    remoteip_conn_t *conn;
      -#ifdef REMOTEIP_OPTIMIZED
      -    apr_sockaddr_t temp_sa_buff;
      -    apr_sockaddr_t *temp_sa = &temp_sa_buff;
      -#else
      +    remoteip_req_t *req = NULL;
      +
           apr_sockaddr_t *temp_sa;
      -#endif
      +
           apr_status_t rv;
      -    char *remote = (char *) apr_table_get(r->headers_in, config->header_name);
      +    char *remote;
           char *proxy_ips = NULL;
           char *parse_remote;
           char *eos;
           unsigned char *addrbyte;
      -    void *internal = NULL;
       
      -    apr_pool_userdata_get((void*)&conn, "mod_remoteip-conn", c->pool);
      +    /* If no RemoteIPInternalProxy, RemoteIPInternalProxyList, RemoteIPTrustedProxy
      +       or RemoteIPTrustedProxyList directive is configured,
      +       all proxies will be considered as external trusted proxies.
      +     */
      +    void *internal = NULL;
       
      -    if (conn) {
      -        if (remote && (strcmp(remote, conn->prior_remote) == 0)) {
      -            /* TODO: Recycle r-> overrides from previous request
      -             */
      -            goto ditto_request_rec;
      -        }
      -        else {
      -            /* TODO: Revert connection from previous request
      -             */
      -            c->remote_addr = conn->orig_addr;
      -            c->remote_ip = (char *) conn->orig_ip;
      -        }
      +    if (!config->header_name) {
      +        return DECLINED;
      +    }
      + 
      +    if (config->proxymatch_ip) {
      +        /* This indicates that a RemoteIPInternalProxy, RemoteIPInternalProxyList, RemoteIPTrustedProxy
      +           or RemoteIPTrustedProxyList directive is configured.
      +           In this case, default to internal proxy.
      +         */
      +        internal = (void *) 1;
           }
       
      -    if (!remote)
      +    remote = (char *) apr_table_get(r->headers_in, config->header_name);
      +    if (!remote) {
               return OK;
      -
      +    }
           remote = apr_pstrdup(r->pool, remote);
       
      -#ifdef REMOTEIP_OPTIMIZED
      -    memcpy(temp_sa, c->remote_addr, sizeof(*temp_sa));
      -    temp_sa->pool = r->pool;
      -#else
      -    temp_sa = c->remote_addr;
      -#endif
      +    temp_sa = r->useragent_addr ? r->useragent_addr : c->client_addr;
       
           while (remote) {
       
      -        /* verify c->remote_addr is trusted if there is a trusted proxy list
      +        /* verify user agent IP against the trusted proxy list
                */
               if (config->proxymatch_ip) {
                   int i;
                   remoteip_proxymatch_t *match;
                   match = (remoteip_proxymatch_t *)config->proxymatch_ip->elts;
                   for (i = 0; i < config->proxymatch_ip->nelts; ++i) {
      -                if (apr_ipsubnet_test(match[i].ip, c->remote_addr)) {
      -                    internal = match[i].internal;
      +                if (apr_ipsubnet_test(match[i].ip, temp_sa)) {
      +                    if (internal) {
      +                        /* Allow an internal proxy to present an external proxy,
      +                           but do not allow an external proxy to present an internal proxy.
      +                           In this case, the presented internal proxy will be considered external.
      +                         */
      +                        internal = match[i].internal;
      +                    }
                           break;
                       }
                   }
      -            if (i && i >= config->proxymatch_ip->nelts)
      +            if (i && i >= config->proxymatch_ip->nelts) {
                       break;
      +            }
               }
       
               if ((parse_remote = strrchr(remote, ',')) == NULL) {
      @@ -292,52 +290,43 @@ static int remoteip_modify_connection(request_rec *r)
                   *(parse_remote++) = '\0';
               }
       
      -        while (*parse_remote == ' ')
      +        while (*parse_remote == ' ') {
                   ++parse_remote;
      +        }
       
               eos = parse_remote + strlen(parse_remote) - 1;
      -        while (eos >= parse_remote && *eos == ' ')
      +        while (eos >= parse_remote && *eos == ' ') {
                   *(eos--) = '\0';
      +        }
       
               if (eos < parse_remote) {
      -            if (remote)
      +            if (remote) {
                       *(remote + strlen(remote)) = ',';
      -            else
      +            }
      +            else {
                       remote = parse_remote;
      +            }
                   break;
               }
       
      -#ifdef REMOTEIP_OPTIMIZED
      -        /* Decode remote_addr - sucks; apr_sockaddr_vars_set isn't 'public' */
      -        if (inet_pton(AF_INET, parse_remote,
      -                      &temp_sa->sa.sin.sin_addr) > 0) {
      -            apr_sockaddr_vars_set(temp_sa, APR_INET, temp_sa.port);
      -        }
      -#if APR_HAVE_IPV6
      -        else if (inet_pton(AF_INET6, parse_remote,
      -                           &temp_sa->sa.sin6.sin6_addr) > 0) {
      -            apr_sockaddr_vars_set(temp_sa, APR_INET6, temp_sa.port);
      -        }
      -#endif
      -        else {
      -            rv = apr_get_netos_error();
      -#else /* !REMOTEIP_OPTIMIZED */
      -        /* We map as IPv4 rather than IPv6 for equivilant host names
      +        /* We map as IPv4 rather than IPv6 for equivalent host names
                * or IPV4OVERIPV6
                */
               rv = apr_sockaddr_info_get(&temp_sa,  parse_remote,
                                          APR_UNSPEC, temp_sa->port,
                                          APR_IPV4_ADDR_OK, r->pool);
               if (rv != APR_SUCCESS) {
      -#endif
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG,  rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG,  rv, r, APLOGNO(01568)
                                 "RemoteIP: Header %s value of %s cannot be parsed "
                                 "as a client IP",
                                 config->header_name, parse_remote);
      -            if (remote)
      +
      +            if (remote) {
                       *(remote + strlen(remote)) = ',';
      -            else
      +            }
      +            else {
                       remote = parse_remote;
      +            }
                   break;
               }
       
      @@ -365,85 +354,73 @@ static int remoteip_modify_connection(request_rec *r)
                             && ((temp_sa->sa.sin6.sin6_addr.s6_addr[0] & 0xe0) != 0x20))
       #endif
               )) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG,  rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG,  rv, r, APLOGNO(01569)
                                 "RemoteIP: Header %s value of %s appears to be "
                                 "a private IP or nonsensical.  Ignored",
                                 config->header_name, parse_remote);
      -            if (remote)
      +            if (remote) {
                       *(remote + strlen(remote)) = ',';
      -            else
      +            }
      +            else {
                       remote = parse_remote;
      +            }
      +
                   break;
               }
       
      -        if (!conn) {
      -            conn = (remoteip_conn_t *) apr_palloc(c->pool, sizeof(*conn));
      -            apr_pool_userdata_set(conn, "mod_remoteip-conn", NULL, c->pool);
      -            conn->orig_addr = c->remote_addr;
      -            conn->orig_ip = c->remote_ip;
      +        /* save away our results */
      +        if (!req) {
      +            req = (remoteip_req_t *) apr_palloc(r->pool, sizeof(remoteip_req_t));
      +            req->useragent_ip = r->useragent_ip;
               }
       
      -        /* Set remote_ip string */
      +        /* Set useragent_ip string */
               if (!internal) {
      -            if (proxy_ips)
      +            if (proxy_ips) {
                       proxy_ips = apr_pstrcat(r->pool, proxy_ips, ", ",
      -                                        c->remote_ip, NULL);
      -            else
      -                proxy_ips = c->remote_ip;
      +                                        req->useragent_ip, NULL);
      +            }
      +            else {
      +                proxy_ips = req->useragent_ip;
      +            }
               }
       
      -        c->remote_addr = temp_sa;
      -        apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
      +        req->useragent_addr = temp_sa;
      +        apr_sockaddr_ip_get(&req->useragent_ip, req->useragent_addr);
           }
       
           /* Nothing happened? */
      -    if (!conn || (c->remote_addr == conn->orig_addr))
      +    if (!req) {
               return OK;
      +    }
       
      -    /* Fixups here, remote becomes the new Via header value, etc
      -     * In the heavy operations above we used request scope, to limit
      -     * conn pool memory growth on keepalives, so here we must scope
      -     * the final results to the connection pool lifetime.
      -     * To limit memory growth, we keep recycling the same buffer
      -     * for the final apr_sockaddr_t in the remoteip conn rec.
      -     */
      -    c->remote_ip = apr_pstrdup(c->pool, c->remote_ip);
      -    conn->proxied_ip = c->remote_ip;
      -    memcpy(&conn->proxied_addr, temp_sa, sizeof(*temp_sa));
      -    conn->proxied_addr.pool = c->pool;
      -    c->remote_addr = &conn->proxied_addr;
      -
      -    if (remote)
      -        remote = apr_pstrdup(c->pool, remote);
      -    conn->proxied_remote = remote;
      -    conn->prior_remote = apr_pstrdup(c->pool, apr_table_get(r->headers_in,
      -                                                      config->header_name));
      -    if (proxy_ips)
      -        proxy_ips = apr_pstrdup(c->pool, proxy_ips);
      -    conn->proxy_ips = proxy_ips;
      -
      -    /* Unset remote_host string DNS lookups */
      -    c->remote_host = NULL;
      -    c->remote_logname = NULL;
      -
      -ditto_request_rec:
      -    if (conn->proxied_remote)
      +    req->proxied_remote = remote;
      +    req->proxy_ips = proxy_ips;
      +
      +    if (req->proxied_remote) {
               apr_table_setn(r->headers_in, config->header_name,
      -                       conn->proxied_remote);
      -    else
      +                       req->proxied_remote);
      +    }
      +    else {
               apr_table_unset(r->headers_in, config->header_name);
      -    if (conn->proxy_ips) {
      -        apr_table_setn(r->notes, "remoteip-proxy-ip-list", conn->proxy_ips);
      -        if (config->proxies_header_name)
      +    }
      +    if (req->proxy_ips) {
      +        apr_table_setn(r->notes, "remoteip-proxy-ip-list", req->proxy_ips);
      +        if (config->proxies_header_name) {
                   apr_table_setn(r->headers_in, config->proxies_header_name,
      -                           conn->proxy_ips);
      +                           req->proxy_ips);
      +        }
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
      -                  conn->proxy_ips
      +    r->useragent_addr = req->useragent_addr;
      +    r->useragent_ip = req->useragent_ip;
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  req->proxy_ips
                             ? "Using %s as client's IP by proxies %s"
      -                      : "Using %s as client's IP by internal proxies",
      -                  conn->proxied_ip, conn->proxy_ips);
      +                      : "Using %s as client's IP by internal proxies%s",
      +                  req->useragent_ip,
      +                  (req->proxy_ips ? req->proxy_ips : ""));
           return OK;
       }
       
      @@ -475,7 +452,7 @@ static const command_rec remoteip_cmds[] =
       
       static void register_hooks(apr_pool_t *p)
       {
      -    ap_hook_post_read_request(remoteip_modify_connection, NULL, NULL, APR_HOOK_FIRST);
      +    ap_hook_post_read_request(remoteip_modify_request, NULL, NULL, APR_HOOK_FIRST);
       }
       
       AP_DECLARE_MODULE(remoteip) = {
      diff --git a/modules/metadata/mod_remoteip.dep b/modules/metadata/mod_remoteip.dep
      new file mode 100644
      index 00000000000..ee99a16e487
      --- /dev/null
      +++ b/modules/metadata/mod_remoteip.dep
      @@ -0,0 +1,53 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_remoteip.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_remoteip.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_remoteip.mak b/modules/metadata/mod_remoteip.mak
      new file mode 100644
      index 00000000000..e6cacfb41d7
      --- /dev/null
      +++ b/modules/metadata/mod_remoteip.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_remoteip.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_remoteip - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_remoteip - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_remoteip - Win32 Release" && "$(CFG)" != "mod_remoteip - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_remoteip.mak" CFG="mod_remoteip - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_remoteip - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_remoteip - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_remoteip - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_remoteip.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_remoteip.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_remoteip.obj"
      +	-@erase "$(INTDIR)\mod_remoteip.res"
      +	-@erase "$(INTDIR)\mod_remoteip_src.idb"
      +	-@erase "$(INTDIR)\mod_remoteip_src.pdb"
      +	-@erase "$(OUTDIR)\mod_remoteip.exp"
      +	-@erase "$(OUTDIR)\mod_remoteip.lib"
      +	-@erase "$(OUTDIR)\mod_remoteip.pdb"
      +	-@erase "$(OUTDIR)\mod_remoteip.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_remoteip_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_remoteip.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_remoteip.so" /d LONG_NAME="remoteip_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_remoteip.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_remoteip.pdb" /debug /out:"$(OUTDIR)\mod_remoteip.so" /implib:"$(OUTDIR)\mod_remoteip.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_remoteip.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_remoteip.obj" \
      +	"$(INTDIR)\mod_remoteip.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_remoteip.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_remoteip.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_remoteip.so"
      +   if exist .\Release\mod_remoteip.so.manifest mt.exe -manifest .\Release\mod_remoteip.so.manifest -outputresource:.\Release\mod_remoteip.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_remoteip.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_remoteip.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_remoteip.obj"
      +	-@erase "$(INTDIR)\mod_remoteip.res"
      +	-@erase "$(INTDIR)\mod_remoteip_src.idb"
      +	-@erase "$(INTDIR)\mod_remoteip_src.pdb"
      +	-@erase "$(OUTDIR)\mod_remoteip.exp"
      +	-@erase "$(OUTDIR)\mod_remoteip.lib"
      +	-@erase "$(OUTDIR)\mod_remoteip.pdb"
      +	-@erase "$(OUTDIR)\mod_remoteip.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_remoteip_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_remoteip.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_remoteip.so" /d LONG_NAME="remoteip_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_remoteip.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_remoteip.pdb" /debug /out:"$(OUTDIR)\mod_remoteip.so" /implib:"$(OUTDIR)\mod_remoteip.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_remoteip.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_remoteip.obj" \
      +	"$(INTDIR)\mod_remoteip.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_remoteip.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_remoteip.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_remoteip.so"
      +   if exist .\Debug\mod_remoteip.so.manifest mt.exe -manifest .\Debug\mod_remoteip.so.manifest -outputresource:.\Debug\mod_remoteip.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_remoteip.dep")
      +!INCLUDE "mod_remoteip.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_remoteip.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_remoteip - Win32 Release" || "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_remoteip - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_remoteip - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_remoteip - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_remoteip - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_remoteip.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_remoteip.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_remoteip.so" /d LONG_NAME="remoteip_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_remoteip - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_remoteip.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_remoteip.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_remoteip.so" /d LONG_NAME="remoteip_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_remoteip.c
      +
      +"$(INTDIR)\mod_remoteip.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c
      index e773719b427..c56ef503187 100644
      --- a/modules/metadata/mod_setenvif.c
      +++ b/modules/metadata/mod_setenvif.c
      @@ -41,7 +41,7 @@
        * done. If the value matches the string or regular expression, the
        * environment variables listed as var ... are set. Each var can
        * be in one of three formats: var, which sets the named variable
      - * (the value value "1"); var=value, which sets the variable to
      + * (the value "1"); var=value, which sets the variable to
        * the given value; or !var, which unsets the variable is it has
        * been previously set.
        *
      @@ -165,17 +165,15 @@ static void *merge_setenvif_config(apr_pool_t *p, void *basev, void *overridesv)
       #define ICASE_MAGIC  ((void *)(&setenvif_module))
       #define SEI_MAGIC_HEIRLOOM "setenvif-phase-flag"
       
      +static ap_regex_t *is_header_regex_regex;
      +
       static int is_header_regex(apr_pool_t *p, const char* name)
       {
           /* If a Header name contains characters other than:
            *    -,_,[A-Z\, [a-z] and [0-9].
            * assume the header name is a regular expression.
            */
      -    ap_regex_t *preg = ap_pregcomp(p, "^[-A-Za-z0-9_]*$",
      -                                   (AP_REG_EXTENDED | AP_REG_NOSUB ));
      -    ap_assert(preg != NULL);
      -
      -    if (ap_regexec(preg, name, 0, NULL, 0)) {
      +    if (ap_regexec(is_header_regex_regex, name, 0, NULL, 0)) {
               return 1;
           }
       
      @@ -316,7 +314,7 @@ static const char *add_setenvif_core(cmd_parms *cmd, void *mconfig,
            */
           for (i = 0; i < sconf->conditionals->nelts; ++i) {
               new = &entries[i];
      -        if (!strcasecmp(new->name, fname)) {
      +        if (new->name && !strcasecmp(new->name, fname)) {
                   fname = new->name;
                   break;
               }
      @@ -527,14 +525,13 @@ static int match_headers(request_rec *r)
                       last_name = b->name;
                       switch (b->special_type) {
                       case SPECIAL_REMOTE_ADDR:
      -                    val = r->connection->remote_ip;
      +                    val = r->useragent_ip;
                           break;
                       case SPECIAL_SERVER_ADDR:
                           val = r->connection->local_ip;
                           break;
                       case SPECIAL_REMOTE_HOST:
      -                    val =  ap_get_remote_host(r->connection, r->per_dir_config,
      -                                              REMOTE_NAME, NULL);
      +                    val = ap_get_useragent_host(r, REMOTE_NAME, NULL);
                           break;
                       case SPECIAL_REQUEST_URI:
                           val = r->uri;
      @@ -608,7 +605,7 @@ static int match_headers(request_rec *r)
                                                  replaced);
                               }
                               else {
      -                            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                            ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01505)
                                                 "Regular expression replacement "
                                                 "failed for '%s', value too long?",
                                                 elts[j].key);
      @@ -633,6 +630,10 @@ static void register_hooks(apr_pool_t *p)
       {
           ap_hook_header_parser(match_headers, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_post_read_request(match_headers, NULL, NULL, APR_HOOK_MIDDLE);
      +
      +    is_header_regex_regex = ap_pregcomp(p, "^[-A-Za-z0-9_]*$",
      +                                        (AP_REG_EXTENDED | AP_REG_NOSUB ));
      +    ap_assert(is_header_regex_regex != NULL);
       }
       
       AP_DECLARE_MODULE(setenvif) =
      diff --git a/modules/metadata/mod_setenvif.dep b/modules/metadata/mod_setenvif.dep
      new file mode 100644
      index 00000000000..f13a73d29ec
      --- /dev/null
      +++ b/modules/metadata/mod_setenvif.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_setenvif.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_setenvif.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_setenvif.mak b/modules/metadata/mod_setenvif.mak
      new file mode 100644
      index 00000000000..8c748b675dd
      --- /dev/null
      +++ b/modules/metadata/mod_setenvif.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_setenvif.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_setenvif - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_setenvif - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_setenvif - Win32 Release" && "$(CFG)" != "mod_setenvif - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_setenvif.mak" CFG="mod_setenvif - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_setenvif - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_setenvif - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_setenvif - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_setenvif.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_setenvif.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_setenvif.obj"
      +	-@erase "$(INTDIR)\mod_setenvif.res"
      +	-@erase "$(INTDIR)\mod_setenvif_src.idb"
      +	-@erase "$(INTDIR)\mod_setenvif_src.pdb"
      +	-@erase "$(OUTDIR)\mod_setenvif.exp"
      +	-@erase "$(OUTDIR)\mod_setenvif.lib"
      +	-@erase "$(OUTDIR)\mod_setenvif.pdb"
      +	-@erase "$(OUTDIR)\mod_setenvif.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../ssl" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_setenvif_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_setenvif.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_setenvif.so" /d LONG_NAME="setenvif_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_setenvif.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_setenvif.pdb" /debug /out:"$(OUTDIR)\mod_setenvif.so" /implib:"$(OUTDIR)\mod_setenvif.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_setenvif.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_setenvif.obj" \
      +	"$(INTDIR)\mod_setenvif.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_setenvif.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_setenvif.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_setenvif.so"
      +   if exist .\Release\mod_setenvif.so.manifest mt.exe -manifest .\Release\mod_setenvif.so.manifest -outputresource:.\Release\mod_setenvif.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_setenvif.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_setenvif.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_setenvif.obj"
      +	-@erase "$(INTDIR)\mod_setenvif.res"
      +	-@erase "$(INTDIR)\mod_setenvif_src.idb"
      +	-@erase "$(INTDIR)\mod_setenvif_src.pdb"
      +	-@erase "$(OUTDIR)\mod_setenvif.exp"
      +	-@erase "$(OUTDIR)\mod_setenvif.lib"
      +	-@erase "$(OUTDIR)\mod_setenvif.pdb"
      +	-@erase "$(OUTDIR)\mod_setenvif.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../ssl" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_setenvif_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_setenvif.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_setenvif.so" /d LONG_NAME="setenvif_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_setenvif.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_setenvif.pdb" /debug /out:"$(OUTDIR)\mod_setenvif.so" /implib:"$(OUTDIR)\mod_setenvif.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_setenvif.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_setenvif.obj" \
      +	"$(INTDIR)\mod_setenvif.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_setenvif.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_setenvif.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_setenvif.so"
      +   if exist .\Debug\mod_setenvif.so.manifest mt.exe -manifest .\Debug\mod_setenvif.so.manifest -outputresource:.\Debug\mod_setenvif.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_setenvif.dep")
      +!INCLUDE "mod_setenvif.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_setenvif.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_setenvif - Win32 Release" || "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_setenvif - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_setenvif - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_setenvif - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_setenvif - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_setenvif.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_setenvif.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_setenvif.so" /d LONG_NAME="setenvif_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_setenvif - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_setenvif.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_setenvif.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_setenvif.so" /d LONG_NAME="setenvif_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_setenvif.c
      +
      +"$(INTDIR)\mod_setenvif.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_unique_id.c b/modules/metadata/mod_unique_id.c
      index b710f7f39a8..8bd858fc9bb 100644
      --- a/modules/metadata/mod_unique_id.c
      +++ b/modules/metadata/mod_unique_id.c
      @@ -171,8 +171,8 @@ static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pt
            * be unique as the physical address of the machine
            */
           if ((rv = apr_gethostname(str, sizeof(str) - 1, p)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server,
      -          "mod_unique_id: unable to find hostname of the server");
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01563)
      +          "unable to find hostname of the server");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -180,15 +180,15 @@ static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pt
               global_in_addr = sockaddr->sa.sin.sin_addr.s_addr;
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server,
      -                    "mod_unique_id: unable to find IPv4 address of \"%s\"", str);
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01564)
      +                    "unable to find IPv4 address of \"%s\"", str);
       #if APR_HAVE_IPV6
               if ((rv = apr_sockaddr_info_get(&sockaddr, str, AF_INET6, 0, 0, p)) == APR_SUCCESS) {
                   memcpy(&global_in_addr,
                          (char *)sockaddr->ipaddr_ptr + sockaddr->ipaddr_len - sizeof(global_in_addr),
                          sizeof(global_in_addr));
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server,
      -                         "mod_unique_id: using low-order bits of IPv6 address "
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, rv, main_server, APLOGNO(01565)
      +                         "using low-order bits of IPv6 address "
                                "as if they were unique");
               }
               else
      @@ -197,8 +197,7 @@ static int unique_id_global_init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *pt
           }
       
           apr_sockaddr_ip_get(&ipaddrstr, sockaddr);
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server,
      -                "mod_unique_id: using ip addr %s",
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, main_server, APLOGNO(01566) "using ip addr %s",
                        ipaddrstr);
       
           /*
      @@ -241,7 +240,7 @@ static void unique_id_child_init(apr_pool_t *p, server_rec *s)
            * global_init ... but oh well.
            */
           if ((pid_t)cur_unique_id.pid != pid) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(01567)
                           "oh no! pids are greater than 32-bits!  I'm broken!");
           }
       
      diff --git a/modules/metadata/mod_unique_id.dep b/modules/metadata/mod_unique_id.dep
      new file mode 100644
      index 00000000000..18c6668c8c4
      --- /dev/null
      +++ b/modules/metadata/mod_unique_id.dep
      @@ -0,0 +1,50 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_unique_id.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_unique_id.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_unique_id.mak b/modules/metadata/mod_unique_id.mak
      new file mode 100644
      index 00000000000..b10097bc937
      --- /dev/null
      +++ b/modules/metadata/mod_unique_id.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_unique_id.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_unique_id - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_unique_id - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_unique_id - Win32 Release" && "$(CFG)" != "mod_unique_id - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_unique_id.mak" CFG="mod_unique_id - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_unique_id - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_unique_id - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_unique_id - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_unique_id.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_unique_id.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_unique_id.obj"
      +	-@erase "$(INTDIR)\mod_unique_id.res"
      +	-@erase "$(INTDIR)\mod_unique_id_src.idb"
      +	-@erase "$(INTDIR)\mod_unique_id_src.pdb"
      +	-@erase "$(OUTDIR)\mod_unique_id.exp"
      +	-@erase "$(OUTDIR)\mod_unique_id.lib"
      +	-@erase "$(OUTDIR)\mod_unique_id.pdb"
      +	-@erase "$(OUTDIR)\mod_unique_id.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_unique_id_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_unique_id.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_unique_id.so" /d LONG_NAME="unique_id_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_unique_id.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_unique_id.pdb" /debug /out:"$(OUTDIR)\mod_unique_id.so" /implib:"$(OUTDIR)\mod_unique_id.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_unique_id.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_unique_id.obj" \
      +	"$(INTDIR)\mod_unique_id.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_unique_id.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_unique_id.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_unique_id.so"
      +   if exist .\Release\mod_unique_id.so.manifest mt.exe -manifest .\Release\mod_unique_id.so.manifest -outputresource:.\Release\mod_unique_id.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_unique_id.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_unique_id.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_unique_id.obj"
      +	-@erase "$(INTDIR)\mod_unique_id.res"
      +	-@erase "$(INTDIR)\mod_unique_id_src.idb"
      +	-@erase "$(INTDIR)\mod_unique_id_src.pdb"
      +	-@erase "$(OUTDIR)\mod_unique_id.exp"
      +	-@erase "$(OUTDIR)\mod_unique_id.lib"
      +	-@erase "$(OUTDIR)\mod_unique_id.pdb"
      +	-@erase "$(OUTDIR)\mod_unique_id.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_unique_id_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_unique_id.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_unique_id.so" /d LONG_NAME="unique_id_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_unique_id.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_unique_id.pdb" /debug /out:"$(OUTDIR)\mod_unique_id.so" /implib:"$(OUTDIR)\mod_unique_id.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_unique_id.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_unique_id.obj" \
      +	"$(INTDIR)\mod_unique_id.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_unique_id.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_unique_id.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_unique_id.so"
      +   if exist .\Debug\mod_unique_id.so.manifest mt.exe -manifest .\Debug\mod_unique_id.so.manifest -outputresource:.\Debug\mod_unique_id.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_unique_id.dep")
      +!INCLUDE "mod_unique_id.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_unique_id.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_unique_id - Win32 Release" || "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_unique_id - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_unique_id - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_unique_id - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_unique_id - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_unique_id.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_unique_id.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_unique_id.so" /d LONG_NAME="unique_id_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_unique_id - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_unique_id.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_unique_id.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_unique_id.so" /d LONG_NAME="unique_id_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_unique_id.c
      +
      +"$(INTDIR)\mod_unique_id.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_usertrack.c b/modules/metadata/mod_usertrack.c
      index d94f283678a..73a9f45cc61 100644
      --- a/modules/metadata/mod_usertrack.c
      +++ b/modules/metadata/mod_usertrack.c
      @@ -148,7 +148,6 @@ static void make_cookie(request_rec *r)
                          (dcfg->style == CT_COOKIE2 ? "Set-Cookie2" : "Set-Cookie"),
                          new_cookie);
           apr_table_setn(r->notes, "cookie", apr_pstrdup(r->pool, cookiebuf));   /* log first time */
      -    return;
       }
       
       /* dcfg->regexp is "^cookie_name=([^;]+)|;[ \t]+cookie_name=([^;]+)",
      @@ -237,7 +236,7 @@ static int spot_cookie(request_rec *r)
                           err = 1;
                   }
                   if (err) {
      -                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01499)
                                     "Failed to extract cookie value (out of mem?)");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -308,9 +307,9 @@ static const char *set_cookie_exp(cmd_parms *parms, void *dummy,
            * CookieExpires "[plus] {<num> <type>}*"
            */
       
      -    word = ap_getword_conf(parms->pool, &arg);
      +    word = ap_getword_conf(parms->temp_pool, &arg);
           if (!strncasecmp(word, "plus", 1)) {
      -        word = ap_getword_conf(parms->pool, &arg);
      +        word = ap_getword_conf(parms->temp_pool, &arg);
           };
       
           /* {<num> <type>}* */
      @@ -322,11 +321,10 @@ static const char *set_cookie_exp(cmd_parms *parms, void *dummy,
                   return "bad expires code, numeric value expected.";
       
               /* <type> */
      -        word = ap_getword_conf(parms->pool, &arg);
      +        word = ap_getword_conf(parms->temp_pool, &arg);
               if (!word[0])
                   return "bad expires code, missing <type>";
       
      -        factor = 0;
               if (!strncasecmp(word, "years", 1))
                   factor = 60 * 60 * 24 * 365;
               else if (!strncasecmp(word, "months", 2))
      @@ -347,7 +345,7 @@ static const char *set_cookie_exp(cmd_parms *parms, void *dummy,
               modifier = modifier + factor * num;
       
               /* next <num> */
      -        word = ap_getword_conf(parms->pool, &arg);
      +        word = ap_getword_conf(parms->temp_pool, &arg);
           }
       
           cls->expires = modifier;
      diff --git a/modules/metadata/mod_usertrack.dep b/modules/metadata/mod_usertrack.dep
      new file mode 100644
      index 00000000000..4b31cb3fe50
      --- /dev/null
      +++ b/modules/metadata/mod_usertrack.dep
      @@ -0,0 +1,51 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_usertrack.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_usertrack.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_usertrack.mak b/modules/metadata/mod_usertrack.mak
      new file mode 100644
      index 00000000000..0912540f30b
      --- /dev/null
      +++ b/modules/metadata/mod_usertrack.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_usertrack.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_usertrack - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_usertrack - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_usertrack - Win32 Release" && "$(CFG)" != "mod_usertrack - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_usertrack.mak" CFG="mod_usertrack - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_usertrack - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_usertrack - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_usertrack - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_usertrack.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_usertrack.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_usertrack.obj"
      +	-@erase "$(INTDIR)\mod_usertrack.res"
      +	-@erase "$(INTDIR)\mod_usertrack_src.idb"
      +	-@erase "$(INTDIR)\mod_usertrack_src.pdb"
      +	-@erase "$(OUTDIR)\mod_usertrack.exp"
      +	-@erase "$(OUTDIR)\mod_usertrack.lib"
      +	-@erase "$(OUTDIR)\mod_usertrack.pdb"
      +	-@erase "$(OUTDIR)\mod_usertrack.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_usertrack_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_usertrack.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_usertrack.so" /d LONG_NAME="usertrack_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_usertrack.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_usertrack.pdb" /debug /out:"$(OUTDIR)\mod_usertrack.so" /implib:"$(OUTDIR)\mod_usertrack.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_usertrack.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_usertrack.obj" \
      +	"$(INTDIR)\mod_usertrack.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_usertrack.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_usertrack.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_usertrack.so"
      +   if exist .\Release\mod_usertrack.so.manifest mt.exe -manifest .\Release\mod_usertrack.so.manifest -outputresource:.\Release\mod_usertrack.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_usertrack.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_usertrack.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_usertrack.obj"
      +	-@erase "$(INTDIR)\mod_usertrack.res"
      +	-@erase "$(INTDIR)\mod_usertrack_src.idb"
      +	-@erase "$(INTDIR)\mod_usertrack_src.pdb"
      +	-@erase "$(OUTDIR)\mod_usertrack.exp"
      +	-@erase "$(OUTDIR)\mod_usertrack.lib"
      +	-@erase "$(OUTDIR)\mod_usertrack.pdb"
      +	-@erase "$(OUTDIR)\mod_usertrack.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_usertrack_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_usertrack.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_usertrack.so" /d LONG_NAME="usertrack_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_usertrack.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_usertrack.pdb" /debug /out:"$(OUTDIR)\mod_usertrack.so" /implib:"$(OUTDIR)\mod_usertrack.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_usertrack.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_usertrack.obj" \
      +	"$(INTDIR)\mod_usertrack.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_usertrack.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_usertrack.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_usertrack.so"
      +   if exist .\Debug\mod_usertrack.so.manifest mt.exe -manifest .\Debug\mod_usertrack.so.manifest -outputresource:.\Debug\mod_usertrack.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_usertrack.dep")
      +!INCLUDE "mod_usertrack.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_usertrack.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_usertrack - Win32 Release" || "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_usertrack - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_usertrack - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_usertrack - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_usertrack - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_usertrack.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_usertrack.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_usertrack.so" /d LONG_NAME="usertrack_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_usertrack - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_usertrack.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_usertrack.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_usertrack.so" /d LONG_NAME="usertrack_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_usertrack.c
      +
      +"$(INTDIR)\mod_usertrack.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/metadata/mod_version.c b/modules/metadata/mod_version.c
      index 7bf369bc3a7..688cd8df27f 100644
      --- a/modules/metadata/mod_version.c
      +++ b/modules/metadata/mod_version.c
      @@ -49,7 +49,7 @@
        * = / ==       match; regex must be surrounded by slashes
        * ~            match; regex MAY NOT be surrounded by slashes
        *
      - * Note that all operators may be preceeded by an exclamation mark
      + * Note that all operators may be preceded by an exclamation mark
        * (without spaces) in order to reverse their meaning.
        *
        */
      diff --git a/modules/metadata/mod_version.dep b/modules/metadata/mod_version.dep
      new file mode 100644
      index 00000000000..3661364c970
      --- /dev/null
      +++ b/modules/metadata/mod_version.dep
      @@ -0,0 +1,45 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_version.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_version.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/metadata/mod_version.mak b/modules/metadata/mod_version.mak
      new file mode 100644
      index 00000000000..a723251d98d
      --- /dev/null
      +++ b/modules/metadata/mod_version.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_version.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_version - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_version - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_version - Win32 Release" && "$(CFG)" != "mod_version - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_version.mak" CFG="mod_version - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_version - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_version - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_version - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_version.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_version.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_version.obj"
      +	-@erase "$(INTDIR)\mod_version.res"
      +	-@erase "$(INTDIR)\mod_version_src.idb"
      +	-@erase "$(INTDIR)\mod_version_src.pdb"
      +	-@erase "$(OUTDIR)\mod_version.exp"
      +	-@erase "$(OUTDIR)\mod_version.lib"
      +	-@erase "$(OUTDIR)\mod_version.pdb"
      +	-@erase "$(OUTDIR)\mod_version.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_version_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_version.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_version.so" /d LONG_NAME="version_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_version.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_version.pdb" /debug /out:"$(OUTDIR)\mod_version.so" /implib:"$(OUTDIR)\mod_version.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_version.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_version.obj" \
      +	"$(INTDIR)\mod_version.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_version.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_version.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_version.so"
      +   if exist .\Release\mod_version.so.manifest mt.exe -manifest .\Release\mod_version.so.manifest -outputresource:.\Release\mod_version.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_version - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_version.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_version.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_version.obj"
      +	-@erase "$(INTDIR)\mod_version.res"
      +	-@erase "$(INTDIR)\mod_version_src.idb"
      +	-@erase "$(INTDIR)\mod_version_src.pdb"
      +	-@erase "$(OUTDIR)\mod_version.exp"
      +	-@erase "$(OUTDIR)\mod_version.lib"
      +	-@erase "$(OUTDIR)\mod_version.pdb"
      +	-@erase "$(OUTDIR)\mod_version.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_version_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_version.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_version.so" /d LONG_NAME="version_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_version.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_version.pdb" /debug /out:"$(OUTDIR)\mod_version.so" /implib:"$(OUTDIR)\mod_version.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_version.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_version.obj" \
      +	"$(INTDIR)\mod_version.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_version.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_version.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_version.so"
      +   if exist .\Debug\mod_version.so.manifest mt.exe -manifest .\Debug\mod_version.so.manifest -outputresource:.\Debug\mod_version.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_version.dep")
      +!INCLUDE "mod_version.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_version.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_version - Win32 Release" || "$(CFG)" == "mod_version - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_version - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_version - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_version - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_version - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\metadata"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\metadata"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_version - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ELSEIF  "$(CFG)" == "mod_version - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\metadata"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\metadata"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_version - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_version.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_version.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_version.so" /d LONG_NAME="version_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_version - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_version.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_version.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_version.so" /d LONG_NAME="version_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_version.c
      +
      +"$(INTDIR)\mod_version.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/NWGNUmakefile b/modules/proxy/NWGNUmakefile
      index 2e7f8772129..d44644f015f 100644
      --- a/modules/proxy/NWGNUmakefile
      +++ b/modules/proxy/NWGNUmakefile
      @@ -161,23 +161,14 @@ TARGET_nlm = \
       	$(OBJDIR)/proxyfcgi.nlm \
       	$(OBJDIR)/proxyscgi.nlm \
       	$(OBJDIR)/proxyexpress.nlm \
      +	$(OBJDIR)/proxyhcheck.nlm \
       	$(OBJDIR)/proxylbm_busy.nlm \
       	$(OBJDIR)/proxylbm_hb.nlm \
       	$(OBJDIR)/proxylbm_req.nlm \
       	$(OBJDIR)/proxylbm_traf.nlm \
      +	$(OBJDIR)/proxywstunnel.nlm \
       	$(EOLIST)
       
      -# If WITH_MOD_SERF and SERFSRC have been defined then build the mod_serf module
      -ifdef WITH_MOD_SERF
      -ifneq "$(SERFSRC)" ""
      -ifneq "$(ZLIBSDK)" ""
      -TARGET_nlm += \
      -	$(OBJDIR)/serf.nlm \
      -	$(EOLIST)
      -endif
      -endif
      -endif
      -
       #
       # If there is an LIB target, put it here
       #
      diff --git a/modules/proxy/NWGNUproxy b/modules/proxy/NWGNUproxy
      index a2dd87dd4c2..d731c5a02a8 100644
      --- a/modules/proxy/NWGNUproxy
      +++ b/modules/proxy/NWGNUproxy
      @@ -251,11 +251,12 @@ install :: nlms FORCE
       
       vpath %.c ../arch/netware
       
      -$(OBJDIR)/mod_proxy.imp:
      +$(OBJDIR)/mod_proxy.imp: NWGNUproxy
       	@echo $(DL)GEN  $@$(DL)
       	@echo $(DL)# Exports of mod_proxy$(DL)> $@
       	@echo $(DL) (AP$(VERSION_MAJMIN))$(DL)>> $@
       	@echo $(DL) proxy_module,$(DL)>> $@
      +	@echo $(DL) proxy_hcmethods,$(DL)>> $@
       	@echo $(DL) proxy_hook_canon_handler,$(DL)>> $@
       	@echo $(DL) proxy_hook_get_canon_handler,$(DL)>> $@
       	@echo $(DL) proxy_hook_get_post_request,$(DL)>> $@
      @@ -277,49 +278,53 @@ $(OBJDIR)/mod_proxy.imp:
       	@echo $(DL) ap_proxy_c2hex,$(DL)>> $@
       	@echo $(DL) ap_proxy_canon_netloc,$(DL)>> $@
       	@echo $(DL) ap_proxy_canonenc,$(DL)>> $@
      +	@echo $(DL) ap_proxy_check_connection,$(DL)>> $@
       	@echo $(DL) ap_proxy_checkproxyblock,$(DL)>> $@
      +	@echo $(DL) ap_proxy_checkproxyblock2,$(DL)>> $@
       	@echo $(DL) ap_proxy_conn_is_https,$(DL)>> $@
       	@echo $(DL) ap_proxy_connect_backend,$(DL)>> $@
       	@echo $(DL) ap_proxy_connect_to_backend,$(DL)>> $@
       	@echo $(DL) ap_proxy_connection_create,$(DL)>> $@
      +	@echo $(DL) ap_proxy_connection_reusable,$(DL)>> $@
       	@echo $(DL) ap_proxy_cookie_reverse_map,$(DL)>> $@
      -	@echo $(DL) ap_proxy_date_canon,$(DL)>> $@
      +	@echo $(DL) ap_proxy_create_hdrbrgd,$(DL)>> $@
       	@echo $(DL) ap_proxy_define_balancer,$(DL)>> $@
       	@echo $(DL) ap_proxy_define_worker,$(DL)>> $@
       	@echo $(DL) ap_proxy_determine_connection,$(DL)>> $@
      +	@echo $(DL) ap_proxy_find_balancershm,$(DL)>> $@
      +	@echo $(DL) ap_proxy_find_workershm,$(DL)>> $@
       	@echo $(DL) ap_proxy_get_balancer,$(DL)>> $@
       	@echo $(DL) ap_proxy_get_worker,$(DL)>> $@
       	@echo $(DL) ap_proxy_hashfunc,$(DL)>> $@
       	@echo $(DL) ap_proxy_hex2c,$(DL)>> $@
      -	@echo $(DL) ap_proxy_hex2sec,$(DL)>> $@
       	@echo $(DL) ap_proxy_initialize_balancer,$(DL)>> $@
       	@echo $(DL) ap_proxy_initialize_worker,$(DL)>> $@
       	@echo $(DL) ap_proxy_is_domainname,$(DL)>> $@
       	@echo $(DL) ap_proxy_is_hostname,$(DL)>> $@
       	@echo $(DL) ap_proxy_is_ipaddr,$(DL)>> $@
       	@echo $(DL) ap_proxy_is_word,$(DL)>> $@
      -	@echo $(DL) ap_proxy_liststr,$(DL)>> $@
       	@echo $(DL) ap_proxy_location_reverse_map,$(DL)>> $@
      -	@echo $(DL) ap_proxy_make_fake_req,$(DL)>> $@
       	@echo $(DL) ap_proxy_parse_wstatus,$(DL)>> $@
      +	@echo $(DL) ap_proxy_pass_brigade,$(DL)>> $@
      +	@echo $(DL) ap_proxy_port_of_scheme,$(DL)>> $@
       	@echo $(DL) ap_proxy_post_request,$(DL)>> $@
       	@echo $(DL) ap_proxy_pre_http_request,$(DL)>> $@
       	@echo $(DL) ap_proxy_pre_request,$(DL)>> $@
       	@echo $(DL) ap_proxy_release_connection,$(DL)>> $@
      -	@echo $(DL) ap_proxy_retry_worker,$(DL)>> $@
      -	@echo $(DL) ap_proxy_sec2hex,$(DL)>> $@
       	@echo $(DL) ap_proxy_set_wstatus,$(DL)>> $@
       	@echo $(DL) ap_proxy_share_balancer,$(DL)>> $@
       	@echo $(DL) ap_proxy_share_worker,$(DL)>> $@
      +	@echo $(DL) ap_proxy_show_hcmethod,$(DL)>> $@
       	@echo $(DL) ap_proxy_ssl_connection_cleanup,$(DL)>> $@
       	@echo $(DL) ap_proxy_ssl_disable,$(DL)>> $@
       	@echo $(DL) ap_proxy_ssl_enable,$(DL)>> $@
       	@echo $(DL) ap_proxy_ssl_val,$(DL)>> $@
      -	@echo $(DL) ap_proxy_string_read,$(DL)>> $@
      +	@echo $(DL) ap_proxy_strncpy,$(DL)>> $@
       	@echo $(DL) ap_proxy_sync_balancer,$(DL)>> $@
      -	@echo $(DL) ap_proxy_table_unmerge,$(DL)>> $@
       	@echo $(DL) ap_proxy_trans_match,$(DL)>> $@
      +	@echo $(DL) ap_proxy_transfer_between_connections,$(DL)>> $@
       	@echo $(DL) ap_proxy_valid_balancer_name,$(DL)>> $@
      +	@echo $(DL) ap_proxy_worker_name,$(DL)>> $@
       	@echo $(DL) ap_proxyerror$(DL)>> $@
       
       #
      diff --git a/modules/proxy/NWGNUserf b/modules/proxy/NWGNUproxyhcheck
      similarity index 70%
      rename from modules/proxy/NWGNUserf
      rename to modules/proxy/NWGNUproxyhcheck
      index c9ba6a4fc52..d20065013ff 100644
      --- a/modules/proxy/NWGNUserf
      +++ b/modules/proxy/NWGNUproxyhcheck
      @@ -2,10 +2,6 @@
       # Make sure all needed macro's are defined
       #
       
      -OSSLINC = $(OSSLSDK)/outinc_nw_libc
      -OSSLLIB = $(OSSLSDK)/out_nw_libc
      -OSSLAPP = $(OSSLSDK)/apps
      -
       #
       # Get the 'head' of the build environment if necessary.  This includes default
       # targets and paths to tools
      @@ -15,25 +11,15 @@ ifndef EnvironmentDefined
       include $(AP_WORK)/build/NWGNUhead.inc
       endif
       
      -V_PATH = \
      -			$(SERFSRC) \
      -			$(SERFSRC)/buckets \
      -			$(ZLIBSDK) \
      -			$(EOLIST)
       #
       # These directories will be at the beginning of the include list, followed by
       # INCDIRS
       #
       XINCDIRS	+= \
      -			$(V_PATH) \
      -			$(OSSLINC) \
      -			$(OSSLINC)/openssl \
       			$(APR)/include \
       			$(APRUTIL)/include \
      -			$(AP_WORK)/include \
      -			$(AP_WORK)/modules/http \
      -			$(AP_WORK)/modules/generators \
      -			$(AP_WORK)/modules/ssl \
      +			$(SRC)/include \
      +			$(STDMOD)/core \
       			$(NWOS) \
       			$(EOLIST)
       
      @@ -41,22 +27,18 @@ XINCDIRS	+= \
       # These flags will come after CFLAGS
       #
       XCFLAGS		+= \
      -			-relax_pointers \
       			$(EOLIST)
       
       #
       # These defines will come after DEFINES
       #
       XDEFINES	+= \
      -			-DHAVE_SERF_H \
      -			-DHAVE_OPENSSL \
       			$(EOLIST)
       
       #
       # These flags will be added to the link.opt file
       #
       XLFLAGS		+= \
      -			-l $(OSSLLIB) \
       			$(EOLIST)
       
       #
      @@ -110,19 +92,19 @@ endif
       # This is used by the link 'name' directive to name the nlm.  If left blank
       # TARGET_nlm (see below) will be used.
       #
      -NLM_NAME	= serf
      +NLM_NAME	= proxyhcheck
       
       #
       # This is used by the link '-desc ' directive.
       # If left blank, NLM_NAME will be used.
       #
      -NLM_DESCRIPTION	= Apache $(VERSION_STR) Serf Module
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Proxy Health Check Module
       
       #
       # This is used by the '-threadname' directive.  If left blank,
       # NLM_NAME Thread will be used.
       #
      -NLM_THREAD_NAME	= Serf Module
      +NLM_THREAD_NAME	= Proxy Health Module
       
       #
       # If this is specified, it will override VERSION value in
      @@ -166,72 +148,26 @@ XDCDATA		=
       #
       # If there is an NLM target, put it here
       #
      -TARGET_nlm = \
      -	$(OBJDIR)/$(NLM_NAME).nlm \
      -	$(EOLIST)
      +TARGET_nlm = $(OBJDIR)/$(NLM_NAME).nlm
       
       #
       # If there is an LIB target, put it here
       #
      -TARGET_lib = \
      -	$(EOLIST)
      +TARGET_lib =
       
       #
       # These are the OBJ files needed to create the NLM target above.
       # Paths must all use the '/' character
       #
       FILES_nlm_objs = \
      -	$(OBJDIR)/mod_serf.o \
      +	$(OBJDIR)/mod_proxy_hcheck.o \
       	$(EOLIST)
       
      -# Build serf from source
      -FILES_nlm_objs += \
      -	$(OBJDIR)/context.o \
      -	$(OBJDIR)/aggregate_buckets.o \
      -	$(OBJDIR)/allocator.o \
      -	$(OBJDIR)/barrier_buckets.o \
      -	$(OBJDIR)/buckets.o \
      -	$(OBJDIR)/chunk_buckets.o \
      -	$(OBJDIR)/dechunk_buckets.o \
      -	$(OBJDIR)/deflate_buckets.o \
      -	$(OBJDIR)/file_buckets.o \
      -	$(OBJDIR)/headers_buckets.o \
      -	$(OBJDIR)/limit_buckets.o \
      -	$(OBJDIR)/mmap_buckets.o \
      -	$(OBJDIR)/request_buckets.o \
      -	$(OBJDIR)/response_buckets.o \
      -	$(OBJDIR)/simple_buckets.o \
      -	$(OBJDIR)/socket_buckets.o \
      -	$(OBJDIR)/ssl_buckets.o \
      -	$(EOLIST)
      -
      -# Build zlib from source
      -FILES_nlm_objs += \
      -	$(OBJDIR)/adler32.o \
      -	$(OBJDIR)/crc32.o \
      -	$(OBJDIR)/deflate.o \
      -	$(OBJDIR)/inflate.o \
      -	$(OBJDIR)/inffast.o \
      -	$(OBJDIR)/inftrees.o \
      -	$(OBJDIR)/trees.o \
      -	$(OBJDIR)/zutil.o \
      -	$(EOLIST)
      -
      -ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"
      -FILES_nlm_objs += \
      -	$(OBJDIR)/infblock.o \
      -	$(OBJDIR)/infcodes.o \
      -	$(OBJDIR)/infutil.o \
      -	$(EOLIST)
      -endif
      -
       #
       # These are the LIB files needed to create the NLM target above.
       # These will be added as a library command in the link.opt file.
       #
       FILES_nlm_libs = \
      -	$(OSSLLIB)/crypto.lib \
      -	$(OSSLLIB)/ssl.lib \
       	$(PRELUDE) \
       	$(EOLIST)
       
      @@ -240,8 +176,9 @@ FILES_nlm_libs = \
       # These will be added as a module command in the link.opt file.
       #
       FILES_nlm_modules = \
      -	aprlib \
       	libc \
      +	aprlib \
      +	proxy \
       	$(EOLIST)
       
       #
      @@ -263,12 +200,10 @@ FILE_nlm_copyright =
       # Any additional imports go here
       #
       FILES_nlm_Ximports = \
      +	@libc.imp \
       	@aprlib.imp \
       	@httpd.imp \
      -	@libc.imp \
      -	GetProcessSwitchCount \
      -	RunningProcess \
      -	GetSuperHighResolutionTimer \
      +	@mod_proxy.imp \
       	$(EOLIST)
       
       # Don't link with Winsock if standard sockets are being used
      @@ -281,7 +216,7 @@ endif
       # Any symbols exported to here
       #
       FILES_nlm_exports = \
      -	serf_module \
      +	proxy_hcheck_module \
       	$(EOLIST)
       
       #
      @@ -309,7 +244,7 @@ install :: nlms FORCE
       # Any specialized rules here
       #
       
      -vpath %.c $(V_PATH)
      +vpath %.c ../arch/netware
       
       #
       # Include the 'tail' makefile that has targets that depend on variables defined
      @@ -317,5 +252,3 @@ vpath %.c $(V_PATH)
       #
       
       include $(APBUILD)/NWGNUtail.inc
      -
      -
      diff --git a/modules/proxy/NWGNUproxylbm_busy b/modules/proxy/NWGNUproxylbm_busy
      index 394af7a6e20..c1b91f6b4f0 100644
      --- a/modules/proxy/NWGNUproxylbm_busy
      +++ b/modules/proxy/NWGNUproxylbm_busy
      @@ -19,6 +19,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(AP_WORK)/modules/proxy \
       			$(AP_WORK)/modules/http \
       			$(NWOS) \
       			$(EOLIST)
      diff --git a/modules/proxy/NWGNUproxylbm_hb b/modules/proxy/NWGNUproxylbm_hb
      index 80f2f82224c..19563da6df4 100644
      --- a/modules/proxy/NWGNUproxylbm_hb
      +++ b/modules/proxy/NWGNUproxylbm_hb
      @@ -19,6 +19,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(AP_WORK)/modules/proxy \
       			$(AP_WORK)/modules/http \
       			$(NWOS) \
       			$(EOLIST)
      diff --git a/modules/proxy/NWGNUproxylbm_req b/modules/proxy/NWGNUproxylbm_req
      index 0170056cba6..6a2c4cd0fb0 100644
      --- a/modules/proxy/NWGNUproxylbm_req
      +++ b/modules/proxy/NWGNUproxylbm_req
      @@ -19,6 +19,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(AP_WORK)/modules/proxy \
       			$(AP_WORK)/modules/http \
       			$(NWOS) \
       			$(EOLIST)
      diff --git a/modules/proxy/NWGNUproxylbm_traf b/modules/proxy/NWGNUproxylbm_traf
      index 1960453bd8a..1927d6263c1 100644
      --- a/modules/proxy/NWGNUproxylbm_traf
      +++ b/modules/proxy/NWGNUproxylbm_traf
      @@ -19,6 +19,7 @@ XINCDIRS	+= \
       			$(APR)/include \
       			$(APRUTIL)/include \
       			$(AP_WORK)/include \
      +			$(AP_WORK)/modules/proxy \
       			$(AP_WORK)/modules/http \
       			$(NWOS) \
       			$(EOLIST)
      diff --git a/modules/proxy/NWGNUproxywstunnel b/modules/proxy/NWGNUproxywstunnel
      new file mode 100644
      index 00000000000..ce84ce45662
      --- /dev/null
      +++ b/modules/proxy/NWGNUproxywstunnel
      @@ -0,0 +1,250 @@
      +#
      +# Make sure all needed macro's are defined
      +#
      +
      +#
      +# Get the 'head' of the build environment if necessary.  This includes default
      +# targets and paths to tools
      +#
      +
      +ifndef EnvironmentDefined
      +include $(AP_WORK)/build/NWGNUhead.inc
      +endif
      +
      +#
      +# These directories will be at the beginning of the include list, followed by
      +# INCDIRS
      +#
      +XINCDIRS	+= \
      +			$(APR)/include \
      +			$(APRUTIL)/include \
      +			$(SRC)/include \
      +			$(STDMOD)/http \
      +			$(STDMOD)/proxy \
      +			$(NWOS) \
      +			$(EOLIST)
      +
      +#
      +# These flags will come after CFLAGS
      +#
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These defines will come after DEFINES
      +#
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +#
      +# These flags will be added to the link.opt file
      +#
      +XLFLAGS		+= \
      +			$(EOLIST)
      +
      +#
      +# These values will be appended to the correct variables based on the value of
      +# RELEASE
      +#
      +ifeq "$(RELEASE)" "debug"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "noopt"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +ifeq "$(RELEASE)" "release"
      +XINCDIRS	+= \
      +			$(EOLIST)
      +
      +XCFLAGS		+= \
      +			$(EOLIST)
      +
      +XDEFINES	+= \
      +			$(EOLIST)
      +
      +XLFLAGS		+= \
      +			$(EOLIST)
      +endif
      +
      +#
      +# These are used by the link target if an NLM is being generated
      +# This is used by the link 'name' directive to name the nlm.  If left blank
      +# TARGET_nlm (see below) will be used.
      +#
      +NLM_NAME	= proxywstunnel
      +
      +#
      +# This is used by the link '-desc ' directive.
      +# If left blank, NLM_NAME will be used.
      +#
      +NLM_DESCRIPTION	= Apache $(VERSION_STR) Proxy Web Socket Tunnel Module
      +
      +#
      +# This is used by the '-threadname' directive.  If left blank,
      +# NLM_NAME Thread will be used.
      +#
      +NLM_THREAD_NAME	= Prxy WbSkt Module
      +
      +#
      +# If this is specified, it will override VERSION value in
      +# $(AP_WORK)/build/NWGNUenvironment.inc
      +#
      +NLM_VERSION	=
      +
      +#
      +# If this is specified, it will override the default of 64K
      +#
      +NLM_STACK_SIZE	= 8192
      +
      +
      +#
      +# If this is specified it will be used by the link '-entry' directive
      +#
      +NLM_ENTRY_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-exit' directive
      +#
      +NLM_EXIT_SYM	=
      +
      +#
      +# If this is specified it will be used by the link '-check' directive
      +#
      +NLM_CHECK_SYM	=
      +
      +#
      +# If these are specified it will be used by the link '-flags' directive
      +#
      +NLM_FLAGS	=
      +
      +#
      +# If this is specified it will be linked in with the XDCData option in the def
      +# file instead of the default of $(NWOS)/apache.xdc.  XDCData can be disabled
      +# by setting APACHE_UNIPROC in the environment
      +#
      +XDCDATA		=
      +
      +#
      +# If there is an NLM target, put it here
      +#
      +TARGET_nlm = $(OBJDIR)/$(NLM_NAME).nlm
      +
      +#
      +# If there is an LIB target, put it here
      +#
      +TARGET_lib = 
      +
      +#
      +# These are the OBJ files needed to create the NLM target above.
      +# Paths must all use the '/' character
      +#
      +FILES_nlm_objs = \
      +	$(OBJDIR)/mod_proxy_wstunnel.o \
      +	$(EOLIST)
      +
      +#
      +# These are the LIB files needed to create the NLM target above.
      +# These will be added as a library command in the link.opt file.
      +#
      +FILES_nlm_libs = \
      +	$(PRELUDE) \
      +	$(EOLIST)
      +
      +#
      +# These are the modules that the above NLM target depends on to load.
      +# These will be added as a module command in the link.opt file.
      +#
      +FILES_nlm_modules = \
      +	libc \
      +	aprlib \
      +	proxy \
      +	$(EOLIST)
      +
      +#
      +# If the nlm has a msg file, put it's path here
      +#
      +FILE_nlm_msg =
      +
      +#
      +# If the nlm has a hlp file put it's path here
      +#
      +FILE_nlm_hlp =
      +
      +#
      +# If this is specified, it will override $(NWOS)\copyright.txt.
      +#
      +FILE_nlm_copyright =
      +
      +#
      +# Any additional imports go here
      +#
      +FILES_nlm_Ximports = \
      +	@libc.imp \
      +	@aprlib.imp \
      +	@httpd.imp \
      +	@$(OBJDIR)/mod_proxy.imp \
      +	$(EOLIST)
      +
      +#
      +# Any symbols exported to here
      +#
      +FILES_nlm_exports = \
      +	proxy_wstunnel_module \
      +	$(EOLIST)
      +
      +#
      +# These are the OBJ files needed to create the LIB target above.
      +# Paths must all use the '/' character
      +#
      +FILES_lib_objs = \
      +	$(EOLIST)
      +
      +#
      +# implement targets and dependancies (leave this section alone)
      +#
      +
      +libs :: $(OBJDIR) $(TARGET_lib)
      +
      +nlms :: libs $(TARGET_nlm)
      +
      +#
      +# Updated this target to create necessary directories and copy files to the
      +# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
      +#
      +install :: nlms FORCE
      +
      +#
      +# Any specialized rules here
      +#
      +
      +vpath %.c balancers
      +#
      +# Include the 'tail' makefile that has targets that depend on variables defined
      +# in this makefile
      +#
      +
      +include $(APBUILD)/NWGNUtail.inc
      +
      +
      diff --git a/modules/proxy/ajp.h b/modules/proxy/ajp.h
      index b1596ca73ba..c119a7ee64f 100644
      --- a/modules/proxy/ajp.h
      +++ b/modules/proxy/ajp.h
      @@ -18,8 +18,8 @@
        * @file ajp.h
        * @brief Apache Jserv Protocol
        *
      - * @defgroup AJP_defines AJP definitions
      - * @ingroup  MOD_PROXY
      + * @defgroup AJP_defines mod_proxy AJP definitions
      + * @ingroup  APACHE_INTERNAL
        * @{
        */
       
      @@ -60,6 +60,7 @@
       
       /* The following environment variables match mod_ssl! */
       #define AJP13_HTTPS_INDICATOR           "HTTPS"
      +#define AJP13_SSL_PROTOCOL_INDICATOR    "SSL_PROTOCOL"
       #define AJP13_SSL_CLIENT_CERT_INDICATOR "SSL_CLIENT_CERT"
       #define AJP13_SSL_CIPHER_INDICATOR      "SSL_CIPHER"
       #define AJP13_SSL_SESSION_INDICATOR     "SSL_SESSION_ID"
      @@ -382,7 +383,7 @@ apr_status_t ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err,
       /**
        * Log an AJP message
        *
      - * @param request   The current request
      + * @param r         The current request
        * @param msg       AJP Message to dump
        * @param err       error string to display
        * @return          APR_SUCCESS or error
      diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
      index 0c8a333dd45..67353a70e4c 100644
      --- a/modules/proxy/ajp_header.c
      +++ b/modules/proxy/ajp_header.c
      @@ -37,7 +37,7 @@ static const char *long_res_header_for_sc(int sc)
       {
           const char *rc = NULL;
           sc = sc & 0X00FF;
      -    if(sc <= SC_RES_HEADERS_NUM && sc > 0) {
      +    if (sc <= SC_RES_HEADERS_NUM && sc > 0) {
               rc = response_trans_headers[sc - 1];
           }
       
      @@ -89,39 +89,39 @@ static int sc_for_req_header(const char *header_name)
                       return UNKNOWN_METHOD;
               break;
               case 'C':
      -            if(strcmp(p, "OOKIE2") == 0)
      +            if (strcmp(p, "OOKIE2") == 0)
                       return SC_COOKIE2;
                   else if (strcmp(p, "OOKIE") == 0)
                       return SC_COOKIE;
      -            else if(strcmp(p, "ONNECTION") == 0)
      +            else if (strcmp(p, "ONNECTION") == 0)
                       return SC_CONNECTION;
      -            else if(strcmp(p, "ONTENT-TYPE") == 0)
      +            else if (strcmp(p, "ONTENT-TYPE") == 0)
                       return SC_CONTENT_TYPE;
      -            else if(strcmp(p, "ONTENT-LENGTH") == 0)
      +            else if (strcmp(p, "ONTENT-LENGTH") == 0)
                       return SC_CONTENT_LENGTH;
                   else
                       return UNKNOWN_METHOD;
               break;
               case 'H':
      -            if(strcmp(p, "OST") == 0)
      +            if (strcmp(p, "OST") == 0)
                       return SC_HOST;
                   else
                       return UNKNOWN_METHOD;
               break;
               case 'P':
      -            if(strcmp(p, "RAGMA") == 0)
      +            if (strcmp(p, "RAGMA") == 0)
                       return SC_PRAGMA;
                   else
                       return UNKNOWN_METHOD;
               break;
               case 'R':
      -            if(strcmp(p, "EFERER") == 0)
      +            if (strcmp(p, "EFERER") == 0)
                       return SC_REFERER;
                   else
                       return UNKNOWN_METHOD;
               break;
               case 'U':
      -            if(strcmp(p, "SER-AGENT") == 0)
      +            if (strcmp(p, "SER-AGENT") == 0)
                       return SC_USER_AGENT;
                   else
                       return UNKNOWN_METHOD;
      @@ -139,7 +139,7 @@ static const unsigned char sc_for_req_method_table[] = {
           SC_M_PUT,
           SC_M_POST,
           SC_M_DELETE,
      -    0,                      /* M_DELETE */
      +    0,                      /* M_CONNECT */
           SC_M_OPTIONS,
           SC_M_TRACE,
           0,                      /* M_PATCH  */
      @@ -223,14 +223,13 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           const apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
           const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts;
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE8, 0, r->server,
      -                         "Into ajp_marshal_into_msgb");
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r, "Into ajp_marshal_into_msgb");
       
           if ((method = sc_for_req_method_by_id(r)) == UNKNOWN_METHOD) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -               "ajp_marshal_into_msgb - No such method %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r, APLOGNO(02437)
      +               "ajp_marshal_into_msgb - Sending unknown method %s as request attribute",
                      r->method);
      -        return AJP_EBAD_METHOD;
      +        method = SC_M_JK_STORED;
           }
       
           is_ssl = (apr_byte_t) ap_proxy_conn_is_https(r->connection);
      @@ -240,7 +239,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
               num_headers = t->nelts;
           }
       
      -    remote_host = (char *)ap_get_remote_host(r->connection, r->per_dir_config, REMOTE_HOST, NULL);
      +    remote_host = (char *)ap_get_useragent_host(r, REMOTE_HOST, NULL);
       
           ajp_msg_reset(msg);
       
      @@ -248,16 +247,16 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
               ajp_msg_append_uint8(msg, (apr_byte_t) method)           ||
               ajp_msg_append_string(msg, r->protocol)                  ||
               ajp_msg_append_string(msg, uri->path)                    ||
      -        ajp_msg_append_string(msg, r->connection->remote_ip)     ||
      +        ajp_msg_append_string(msg, r->useragent_ip)              ||
               ajp_msg_append_string(msg, remote_host)                  ||
               ajp_msg_append_string(msg, ap_get_server_name(r))        ||
               ajp_msg_append_uint16(msg, (apr_uint16_t)r->connection->local_addr->port) ||
               ajp_msg_append_uint8(msg, is_ssl)                        ||
               ajp_msg_append_uint16(msg, (apr_uint16_t) num_headers)) {
       
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00968)
                      "ajp_marshal_into_msgb: "
      -               "Error appending the message begining");
      +               "Error appending the message beginning");
               return APR_EGENERAL;
           }
       
      @@ -268,7 +267,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
       
               if ((sc = sc_for_req_header(elts[i].key)) != UNKNOWN_METHOD) {
                   if (ajp_msg_append_uint16(msg, (apr_uint16_t)sc)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00969)
                              "ajp_marshal_into_msgb: "
                              "Error appending the header name");
                       return AJP_EOVERFLOW;
      @@ -276,7 +275,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
               }
               else {
                   if (ajp_msg_append_string(msg, elts[i].key)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00970)
                              "ajp_marshal_into_msgb: "
                              "Error appending the header name");
                       return AJP_EOVERFLOW;
      @@ -284,12 +283,12 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
               }
       
               if (ajp_msg_append_string(msg, elts[i].val)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00971)
                          "ajp_marshal_into_msgb: "
                          "Error appending the header value");
                   return AJP_EOVERFLOW;
               }
      -        ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
                          "ajp_marshal_into_msgb: Header[%d] [%s] = [%s]",
                          i, elts[i].key, elts[i].val);
           }
      @@ -298,7 +297,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           if (s->secret) {
               if (ajp_msg_append_uint8(msg, SC_A_SECRET) ||
                   ajp_msg_append_string(msg, s->secret)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03228)
                          "Error ajp_marshal_into_msgb - "
                          "Error appending secret");
                   return APR_EGENERAL;
      @@ -309,7 +308,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           if (r->user) {
               if (ajp_msg_append_uint8(msg, SC_A_REMOTE_USER) ||
                   ajp_msg_append_string(msg, r->user)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00972)
                          "ajp_marshal_into_msgb: "
                          "Error appending the remote user");
                   return AJP_EOVERFLOW;
      @@ -318,7 +317,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           if (r->ap_auth_type) {
               if (ajp_msg_append_uint8(msg, SC_A_AUTH_TYPE) ||
                   ajp_msg_append_string(msg, r->ap_auth_type)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00973)
                          "ajp_marshal_into_msgb: "
                          "Error appending the auth type");
                   return AJP_EOVERFLOW;
      @@ -328,7 +327,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           if (uri->query) {
               if (ajp_msg_append_uint8(msg, SC_A_QUERY_STRING) ||
                   ajp_msg_append_string(msg, uri->query)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00974)
                          "ajp_marshal_into_msgb: "
                          "Error appending the query string");
                   return AJP_EOVERFLOW;
      @@ -337,7 +336,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           if ((session_route = apr_table_get(r->notes, "session-route"))) {
               if (ajp_msg_append_uint8(msg, SC_A_JVM_ROUTE) ||
                   ajp_msg_append_string(msg, session_route)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00975)
                          "ajp_marshal_into_msgb: "
                          "Error appending the jvm route");
                   return AJP_EOVERFLOW;
      @@ -360,9 +359,9 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
                   && envvar[0]) {
                   if (ajp_msg_append_uint8(msg, SC_A_SSL_CERT)
                       || ajp_msg_append_string(msg, envvar)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "ajp_marshal_into_msgb: "
      -                             "Error appending the SSL certificates");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00976)
      +                              "ajp_marshal_into_msgb: "
      +                              "Error appending the SSL certificates");
                       return AJP_EOVERFLOW;
                   }
               }
      @@ -372,9 +371,9 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
                   && envvar[0]) {
                   if (ajp_msg_append_uint8(msg, SC_A_SSL_CIPHER)
                       || ajp_msg_append_string(msg, envvar)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "ajp_marshal_into_msgb: "
      -                             "Error appending the SSL ciphers");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00977)
      +                              "ajp_marshal_into_msgb: "
      +                              "Error appending the SSL ciphers");
                       return AJP_EOVERFLOW;
                   }
               }
      @@ -384,9 +383,9 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
                   && envvar[0]) {
                   if (ajp_msg_append_uint8(msg, SC_A_SSL_SESSION)
                       || ajp_msg_append_string(msg, envvar)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "ajp_marshal_into_msgb: "
      -                             "Error appending the SSL session");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00978)
      +                              "ajp_marshal_into_msgb: "
      +                              "Error appending the SSL session");
                       return AJP_EOVERFLOW;
                   }
               }
      @@ -398,13 +397,44 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
       
                   if (ajp_msg_append_uint8(msg, SC_A_SSL_KEY_SIZE)
                       || ajp_msg_append_uint16(msg, (unsigned short) atoi(envvar))) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "Error ajp_marshal_into_msgb - "
      -                             "Error appending the SSL key size");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00979)
      +                              "ajp_marshal_into_msgb: "
      +                              "Error appending the SSL key size");
                       return APR_EGENERAL;
                   }
               }
           }
      +    /* If the method was unrecognized, encode it as an attribute */
      +    if (method == SC_M_JK_STORED) {
      +        if (ajp_msg_append_uint8(msg, SC_A_STORED_METHOD)
      +            || ajp_msg_append_string(msg, r->method)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02438)
      +                          "ajp_marshal_into_msgb: "
      +                          "Error appending the method '%s' as request attribute",
      +                          r->method);
      +            return AJP_EOVERFLOW;
      +        }
      +    }
      +    /* Forward the SSL protocol name.
      +     * Modern Tomcat versions know how to retrieve
      +     * the protocol name from this attribute.
      +     */
      +    if (is_ssl) {
      +        if ((envvar = ap_proxy_ssl_val(r->pool, r->server, r->connection, r,
      +                                       AJP13_SSL_PROTOCOL_INDICATOR))
      +            && envvar[0]) {
      +            const char *key = SC_A_SSL_PROTOCOL;
      +            if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
      +                ajp_msg_append_string(msg, key)   ||
      +                ajp_msg_append_string(msg, envvar)) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02830)
      +                        "ajp_marshal_into_msgb: "
      +                        "Error appending attribute %s=%s",
      +                        key, envvar);
      +                return AJP_EOVERFLOW;
      +            }
      +        }
      +    }
           /* Forward the remote port information, which was forgotten
            * from the builtin data of the AJP 13 protocol.
            * Since the servlet spec allows to retrieve it via getRemotePort(),
      @@ -414,11 +444,31 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
            */
           {
               const char *key = SC_A_REQ_REMOTE_PORT;
      -        char *val = apr_itoa(r->pool, r->connection->remote_addr->port);
      +        char *val = apr_itoa(r->pool, r->useragent_addr->port);
      +        if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
      +            ajp_msg_append_string(msg, key)   ||
      +            ajp_msg_append_string(msg, val)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00980)
      +                    "ajp_marshal_into_msgb: "
      +                    "Error appending attribute %s=%s",
      +                    key, val);
      +            return AJP_EOVERFLOW;
      +        }
      +    }
      +    /* Forward the local ip address information, which was forgotten
      +     * from the builtin data of the AJP 13 protocol.
      +     * Since the servlet spec allows to retrieve it via getLocalAddr(),
      +     * we provide the address to the Tomcat connector as a request
      +     * attribute. Modern Tomcat versions know how to retrieve
      +     * the local address from this attribute.
      +     */
      +    {
      +        const char *key = SC_A_REQ_LOCAL_ADDR;
      +        char *val = r->connection->local_ip;
               if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
                   ajp_msg_append_string(msg, key)   ||
                   ajp_msg_append_string(msg, val)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02646)
                           "ajp_marshal_into_msgb: "
                           "Error appending attribute %s=%s",
                           key, val);
      @@ -433,7 +483,7 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
                   if (ajp_msg_append_uint8(msg, SC_A_REQ_ATTRIBUTE) ||
                       ajp_msg_append_string(msg, elts[i].key + 4)   ||
                       ajp_msg_append_string(msg, elts[i].val)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00981)
                               "ajp_marshal_into_msgb: "
                               "Error appending attribute %s=%s",
                               elts[i].key, elts[i].val);
      @@ -443,13 +493,13 @@ static apr_status_t ajp_marshal_into_msgb(ajp_msg_t *msg,
           }
       
           if (ajp_msg_append_uint8(msg, SC_A_ARE_DONE)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00982)
                      "ajp_marshal_into_msgb: "
                      "Error appending the message end");
               return AJP_EOVERFLOW;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE8, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                   "ajp_marshal_into_msgb: Done");
           return APR_SUCCESS;
       }
      @@ -498,7 +548,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
           rc = ajp_msg_get_uint16(msg, &status);
       
           if (rc != APR_SUCCESS) {
      -         ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00983)
                       "ajp_unmarshal_response: Null status");
               return rc;
           }
      @@ -511,11 +561,12 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
               ap_xlate_proto_from_ascii(ptr, strlen(ptr));
       #endif
               r->status_line =  apr_psprintf(r->pool, "%d %s", status, ptr);
      -    } else {
      +    }
      +    else {
               r->status_line = NULL;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
                  "ajp_unmarshal_response: status = %d", status);
       
           rc = ajp_msg_get_uint16(msg, &num_headers);
      @@ -531,16 +582,17 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
               apr_table_do(addit_dammit, save_table, r->headers_out,
                            "Set-Cookie", NULL);
               r->headers_out = save_table;
      -    } else {
      +    }
      +    else {
               r->headers_out = NULL;
               num_headers = 0;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
                  "ajp_unmarshal_response: Number of headers is = %d",
                  num_headers);
       
      -    for(i = 0 ; i < (int) num_headers ; i++) {
      +    for (i = 0; i < (int)num_headers; i++) {
               apr_uint16_t name;
               const char *stringname;
               const char *value;
      @@ -553,17 +605,18 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
                   ajp_msg_get_uint16(msg, &name);
                   stringname = long_res_header_for_sc(name);
                   if (stringname == NULL) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00984)
                              "ajp_unmarshal_response: "
                              "No such sc (%08x)",
                              name);
                       return AJP_EBAD_HEADER;
                   }
      -        } else {
      +        }
      +        else {
                   name = 0;
                   rc = ajp_msg_get_string(msg, &stringname);
                   if (rc != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00985)
                              "ajp_unmarshal_response: "
                              "Null header name");
                       return rc;
      @@ -573,7 +626,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
       
               rc = ajp_msg_get_string(msg, &value);
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00986)
                          "ajp_unmarshal_response: "
                          "Null header value");
                   return rc;
      @@ -594,7 +647,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
               }
       
               ap_xlate_proto_from_ascii(value, strlen(value));
      -        ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
                      "ajp_unmarshal_response: Header[%d] [%s] = [%s]",
                              i, stringname, value);
       
      @@ -604,7 +657,7 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
               if (strcasecmp(stringname, "Content-Type") == 0) {
                    /* add corresponding filter */
                   ap_set_content_type(r, apr_pstrdup(r->pool, value));
      -            ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
                      "ajp_unmarshal_response: ap_set_content_type to '%s'", value);
               }
           }
      @@ -625,14 +678,14 @@ apr_status_t ajp_send_header(apr_socket_t *sock,
       
           rc = ajp_msg_create(r->pool, buffsize, &msg);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00987)
                      "ajp_send_header: ajp_msg_create failed");
               return rc;
           }
       
           rc = ajp_marshal_into_msgb(msg, r, uri);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00988)
                      "ajp_send_header: ajp_marshal_into_msgb failed");
               return rc;
           }
      @@ -640,7 +693,7 @@ apr_status_t ajp_send_header(apr_socket_t *sock,
           rc = ajp_ilink_send(sock, msg);
           ajp_msg_log(r, msg, "ajp_send_header: ajp_ilink_send packet dump");
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00989)
                      "ajp_send_header: ajp_ilink_send failed");
               return rc;
           }
      @@ -662,7 +715,7 @@ apr_status_t ajp_read_header(apr_socket_t *sock,
           if (*msg) {
               rc = ajp_msg_reuse(*msg);
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00990)
                          "ajp_read_header: ajp_msg_reuse failed");
                   return rc;
               }
      @@ -670,7 +723,7 @@ apr_status_t ajp_read_header(apr_socket_t *sock,
           else {
               rc = ajp_msg_create(r->pool, buffsize, msg);
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00991)
                          "ajp_read_header: ajp_msg_create failed");
                   return rc;
               }
      @@ -678,13 +731,18 @@ apr_status_t ajp_read_header(apr_socket_t *sock,
           ajp_msg_reset(*msg);
           rc = ajp_ilink_receive(sock, *msg);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00992)
                      "ajp_read_header: ajp_ilink_receive failed");
               return rc;
           }
           ajp_msg_log(r, *msg, "ajp_read_header: ajp_ilink_receive packet dump");
           rc = ajp_msg_peek_uint8(*msg, &result);
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      +    if (rc != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00993)
      +                      "ajp_read_header: ajp_msg_peek_uint8 failed");
      +        return rc;
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
                      "ajp_read_header: ajp_ilink_received %s (0x%02x)",
                      ajp_type_str(result), result);
           return APR_SUCCESS;
      @@ -695,7 +753,7 @@ int ajp_parse_type(request_rec  *r, ajp_msg_t *msg)
       {
           apr_byte_t result;
           ajp_msg_peek_uint8(msg, &result);
      -    ap_log_error(APLOG_MARK, APLOG_TRACE6, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE6, 0, r,
                      "ajp_parse_type: got %s (0x%02x)",
                      ajp_type_str(result), result);
           return (int) result;
      @@ -710,12 +768,12 @@ apr_status_t ajp_parse_header(request_rec  *r, proxy_dir_conf *conf,
       
           rc = ajp_msg_get_uint8(msg, &result);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00994)
                      "ajp_parse_headers: ajp_msg_get_byte failed");
               return rc;
           }
           if (result != CMD_AJP13_SEND_HEADERS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00995)
                      "ajp_parse_headers: wrong type %s (0x%02x) expecting %s (0x%02x)",
                      ajp_type_str(result), result,
                      ajp_type_str(CMD_AJP13_SEND_HEADERS), CMD_AJP13_SEND_HEADERS);
      @@ -734,12 +792,12 @@ apr_status_t  ajp_parse_data(request_rec  *r, ajp_msg_t *msg,
       
           rc = ajp_msg_get_uint8(msg, &result);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00996)
                      "ajp_parse_data: ajp_msg_get_byte failed");
               return rc;
           }
           if (result != CMD_AJP13_SEND_BODY_CHUNK) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00997)
                      "ajp_parse_data: wrong type %s (0x%02x) expecting %s (0x%02x)",
                      ajp_type_str(result), result,
                      ajp_type_str(CMD_AJP13_SEND_BODY_CHUNK), CMD_AJP13_SEND_BODY_CHUNK);
      @@ -761,7 +819,7 @@ apr_status_t  ajp_parse_data(request_rec  *r, ajp_msg_t *msg,
            */
           expected_len = msg->len - (AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 + 1);
           if (*len != expected_len) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00998)
                      "ajp_parse_data: Wrong chunk length. Length of chunk is %i,"
                      " expected length is %i.", *len, expected_len);
               return AJP_EBAD_HEADER;
      @@ -779,12 +837,12 @@ apr_status_t ajp_parse_reuse(request_rec *r, ajp_msg_t *msg,
       
           rc = ajp_msg_get_uint8(msg, &result);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00999)
                      "ajp_parse_reuse: ajp_msg_get_byte failed");
               return rc;
           }
           if (result != CMD_AJP13_END_RESPONSE) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01000)
                      "ajp_parse_reuse: wrong type %s (0x%02x) expecting %s (0x%02x)",
                      ajp_type_str(result), result,
                      ajp_type_str(CMD_AJP13_END_RESPONSE), CMD_AJP13_END_RESPONSE);
      diff --git a/modules/proxy/ajp_header.h b/modules/proxy/ajp_header.h
      index 18f67f121d3..4c22ac7c610 100644
      --- a/modules/proxy/ajp_header.h
      +++ b/modules/proxy/ajp_header.h
      @@ -41,15 +41,26 @@
       #define SC_A_REQ_ATTRIBUTE      (unsigned char)10
       #define SC_A_SSL_KEY_SIZE       (unsigned char)11       /* only in if JkOptions +ForwardKeySize */
       #define SC_A_SECRET             (unsigned char)12
      +#define SC_A_STORED_METHOD      (unsigned char)13
       #define SC_A_ARE_DONE           (unsigned char)0xFF
       
       /*
        * AJP private request attributes
        *
      + * The following request attribute is recognized by Tomcat
      + * to contain the SSL protocol name
      + */
      +#define SC_A_SSL_PROTOCOL        ("AJP_SSL_PROTOCOL")
      +/*
        * The following request attribute is recognized by Tomcat
        * to contain the forwarded remote port.
        */
       #define SC_A_REQ_REMOTE_PORT    ("AJP_REMOTE_PORT")
      +/*
      + * The following request attribute is recognized by Tomcat
      + * to contain the forwarded local ip address.
      + */
      +#define SC_A_REQ_LOCAL_ADDR     ("AJP_LOCAL_ADDR")
       
       /*
        * Request methods, coded as numbers instead of strings.
      @@ -111,6 +122,7 @@
       #define SC_M_MERGE              (unsigned char)25
       #define SC_M_BASELINE_CONTROL   (unsigned char)26
       #define SC_M_MKACTIVITY         (unsigned char)27
      +#define SC_M_JK_STORED          (unsigned char)0xFF
       
       
       /*
      diff --git a/modules/proxy/ajp_link.c b/modules/proxy/ajp_link.c
      index f8e32ac3d69..4f8a9efc7a2 100644
      --- a/modules/proxy/ajp_link.c
      +++ b/modules/proxy/ajp_link.c
      @@ -34,7 +34,7 @@ apr_status_t ajp_ilink_send(apr_socket_t *sock, ajp_msg_t *msg)
       
               status = apr_socket_send(sock, buf, &written);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, APLOGNO(01029)
                                 "ajp_ilink_send(): send failed");
                   return status;
               }
      @@ -82,7 +82,7 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg)
           status = ilink_read(sock, msg->buf, hlen);
       
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, APLOGNO(01030)
                            "ajp_ilink_receive() can't receive header");
               return (APR_STATUS_IS_TIMEUP(status) ? APR_TIMEUP : AJP_ENO_HEADER);
           }
      @@ -90,7 +90,7 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg)
           status = ajp_msg_check_header(msg, &blen);
       
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01031)
                            "ajp_ilink_receive() received bad header");
               return AJP_EBAD_HEADER;
           }
      @@ -98,14 +98,14 @@ apr_status_t ajp_ilink_receive(apr_socket_t *sock, ajp_msg_t *msg)
           status = ilink_read(sock, msg->buf + hlen, blen);
       
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, NULL, APLOGNO(01032)
                            "ajp_ilink_receive() error while receiving message body "
                            "of length %" APR_SIZE_T_FMT,
                            hlen);
               return AJP_EBAD_MESSAGE;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(01033)
                        "ajp_ilink_receive() received packet len=%" APR_SIZE_T_FMT
                        "type=%d",
                         blen, (int)msg->buf[hlen]);
      diff --git a/modules/proxy/ajp_msg.c b/modules/proxy/ajp_msg.c
      index d5f47b32109..3367b5df4aa 100644
      --- a/modules/proxy/ajp_msg.c
      +++ b/modules/proxy/ajp_msg.c
      @@ -21,9 +21,11 @@ APLOG_USE_MODULE(proxy_ajp);
       #define AJP_MSG_DUMP_BYTES_PER_LINE 16
       /* 2 hex digits plus space plus one char per dumped byte */
       /* plus prefix plus separator plus '\0' */
      -#define AJP_MSG_DUMP_LINE_LENGTH    (strlen("XX .") + \
      -                                     strlen("XXXX    ") + \
      -                                     strlen(" - ") + 1)
      +#define AJP_MSG_DUMP_PREFIX_LENGTH  strlen("XXXX    ")
      +#define AJP_MSG_DUMP_LINE_LENGTH    ((AJP_MSG_DUMP_BYTES_PER_LINE * \
      +                                    strlen("XX .")) + \
      +                                    AJP_MSG_DUMP_PREFIX_LENGTH + \
      +                                    strlen(" - ") + 1)
       
       static char *hex_table = "0123456789ABCDEF";
       
      @@ -70,12 +72,13 @@ apr_status_t ajp_msg_dump(apr_pool_t *pool, ajp_msg_t *msg, char *err,
                   return APR_ENOMEM;
               }
               apr_snprintf(current, rl, "%.4lx    ", (unsigned long)i);
      +        current += AJP_MSG_DUMP_PREFIX_LENGTH;
               line_len = len - i;
               if (line_len > AJP_MSG_DUMP_BYTES_PER_LINE) {
                   line_len = AJP_MSG_DUMP_BYTES_PER_LINE;
               }
               for (j = 0; j < line_len; j++) {
      -             x = msg->buf[i + j];
      +            x = msg->buf[i + j];
       
                   *current++ = hex_table[x >> 4];
                   *current++ = hex_table[x & 0x0f];
      @@ -127,9 +130,11 @@ apr_status_t ajp_msg_log(request_rec *r, ajp_msg_t *msg, char *err)
               if (rc == APR_SUCCESS) {
                   while ((next = ap_strchr(buf, '\n'))) {
                       *next = '\0';
      +                /* Intentional no APLOGNO */
                       ap_log_rerror(APLOG_MARK, level, 0, r, "%s", buf);
                       buf = next + 1;
                   }
      +            /* Intentional no APLOGNO */
                   ap_log_rerror(APLOG_MARK, level, 0, r, "%s", buf);
               }
           }
      @@ -151,7 +156,7 @@ apr_status_t ajp_msg_check_header(ajp_msg_t *msg, apr_size_t *len)
           if (!((head[0] == 0x41 && head[1] == 0x42) ||
                 (head[0] == 0x12 && head[1] == 0x34))) {
       
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01080)
                             "ajp_msg_check_header() got bad signature %02x%02x",
                             head[0], head[1]);
       
      @@ -162,7 +167,7 @@ apr_status_t ajp_msg_check_header(ajp_msg_t *msg, apr_size_t *len)
           msglen += (head[3] & 0xFF);
       
           if (msglen > msg->max_size) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01081)
                            "ajp_msg_check_header() incoming message is "
                            "too big %" APR_SIZE_T_FMT ", max is %" APR_SIZE_T_FMT,
                            msglen, msg->max_size);
      @@ -238,7 +243,7 @@ apr_status_t ajp_msg_end(ajp_msg_t *msg)
       
       static APR_INLINE int ajp_log_overflow(ajp_msg_t *msg, const char *context)
       {
      -    ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(03229)
                        "%s(): BufferOverflowException %" APR_SIZE_T_FMT
                        " %" APR_SIZE_T_FMT,
                        context, msg->pos, msg->len);
      @@ -326,7 +331,7 @@ apr_status_t ajp_msg_append_uint8(ajp_msg_t *msg, apr_byte_t value)
       apr_status_t ajp_msg_append_string_ex(ajp_msg_t *msg, const char *value,
                                             int convert)
       {
      -    size_t len;
      +    apr_size_t len;
       
           if (value == NULL) {
               return(ajp_msg_append_uint16(msg, 0xFFFF));
      @@ -578,7 +583,7 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg)
       apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg)
       {
           if (smsg->len > smsg->max_size) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01082)
                            "ajp_msg_copy(): destination buffer too "
                            "small %" APR_SIZE_T_FMT ", max size is %" APR_SIZE_T_FMT,
                            smsg->len, smsg->max_size);
      diff --git a/modules/proxy/ajp_utils.c b/modules/proxy/ajp_utils.c
      index f89b10f61f5..2fe9f72d008 100644
      --- a/modules/proxy/ajp_utils.c
      +++ b/modules/proxy/ajp_utils.c
      @@ -30,19 +30,19 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           apr_interval_time_t org;
           apr_byte_t result;
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE8, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                                "Into ajp_handle_cping_cpong");
       
           rc = ajp_msg_create(r->pool, AJP_PING_PONG_SZ, &msg);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01007)
                      "ajp_handle_cping_cpong: ajp_msg_create failed");
               return rc;
           }
       
           rc = ajp_msg_serialize_cping(msg);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01008)
                      "ajp_handle_cping_cpong: ajp_marshal_into_msgb failed");
               return rc;
           }
      @@ -50,14 +50,14 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           rc = ajp_ilink_send(sock, msg);
           ajp_msg_log(r, msg, "ajp_handle_cping_cpong: ajp_ilink_send packet dump");
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01009)
                      "ajp_handle_cping_cpong: ajp_ilink_send failed");
               return rc;
           }
       
           rc = apr_socket_timeout_get(sock, &org);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01010)
                      "ajp_handle_cping_cpong: apr_socket_timeout_get failed");
               return rc;
           }
      @@ -65,7 +65,7 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           /* Set CPING/CPONG response timeout */
           rc = apr_socket_timeout_set(sock, timeout);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01011)
                      "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
               return rc;
           }
      @@ -74,7 +74,7 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           /* Read CPONG reply */
           rv = ajp_ilink_receive(sock, msg);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01012)
                      "ajp_handle_cping_cpong: ajp_ilink_receive failed");
               goto cleanup;
           }
      @@ -82,12 +82,12 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           ajp_msg_log(r, msg, "ajp_handle_cping_cpong: ajp_ilink_receive packet dump");
           rv = ajp_msg_get_uint8(msg, &result);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01013)
                      "ajp_handle_cping_cpong: invalid CPONG message");
               goto cleanup;
           }
           if (result != CMD_AJP13_CPONG) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01014)
                      "ajp_handle_cping_cpong: awaited CPONG, received %d ",
                      result);
               rv = APR_EGENERAL;
      @@ -98,12 +98,12 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
           /* Restore original socket timeout */
           rc = apr_socket_timeout_set(sock, org);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01015)
                      "ajp_handle_cping_cpong: apr_socket_timeout_set failed");
               return rc;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE8, 0, r->server,
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r,
                                "ajp_handle_cping_cpong: Done");
           return rv;
       }
      @@ -113,7 +113,7 @@ apr_status_t ajp_handle_cping_cpong(apr_socket_t *sock,
                                     return #x;\
                                     break;
       
      -/**
      +/**
        * Convert numeric message type into string
        * @param type      AJP message type
        * @return          AJP message type as a string
      diff --git a/modules/proxy/balancers/config2.m4 b/modules/proxy/balancers/config2.m4
      index f7232661a84..f6372815d60 100644
      --- a/modules/proxy/balancers/config2.m4
      +++ b/modules/proxy/balancers/config2.m4
      @@ -1,8 +1,8 @@
       APACHE_MODPATH_INIT(proxy/balancers)
       
      -APACHE_MODULE(lbmethod_byrequests, Apache proxy Load balancing by request counting, , , $proxy_mods_enable)
      -APACHE_MODULE(lbmethod_bytraffic, Apache proxy Load balancing by traffic counting, , , $proxy_mods_enable)
      -APACHE_MODULE(lbmethod_bybusyness, Apache proxy Load balancing by busyness, , , $proxy_mods_enable)
      -APACHE_MODULE(lbmethod_heartbeat, Apache proxy Load balancing from Heartbeats, , , $proxy_mods_enable)
      +APACHE_MODULE(lbmethod_byrequests, Apache proxy Load balancing by request counting, , , $enable_proxy_balancer, , proxy_balancer)
      +APACHE_MODULE(lbmethod_bytraffic, Apache proxy Load balancing by traffic counting, , , $enable_proxy_balancer, , proxy_balancer)
      +APACHE_MODULE(lbmethod_bybusyness, Apache proxy Load balancing by busyness, , , $enable_proxy_balancer, , proxy_balancer)
      +APACHE_MODULE(lbmethod_heartbeat, Apache proxy Load balancing from Heartbeats, , , $enable_proxy_balancer, , proxy_balancer)
       
       APACHE_MODPATH_FINISH
      diff --git a/modules/proxy/balancers/mod_lbmethod_bybusyness.c b/modules/proxy/balancers/mod_lbmethod_bybusyness.c
      index dec610ed3d6..67d53a3551e 100644
      --- a/modules/proxy/balancers/mod_lbmethod_bybusyness.c
      +++ b/modules/proxy/balancers/mod_lbmethod_bybusyness.c
      @@ -22,10 +22,12 @@
       
       module AP_MODULE_DECLARE_DATA lbmethod_bybusyness_module;
       
      +static int (*ap_proxy_retry_worker_fn)(const char *proxy_function,
      +        proxy_worker *worker, server_rec *s) = NULL;
      +
       static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
                                       request_rec *r)
       {
      -
           int i;
           proxy_worker **worker;
           proxy_worker *mycandidate = NULL;
      @@ -36,9 +38,18 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
       
           int total_factor = 0;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +    if (!ap_proxy_retry_worker_fn) {
      +        ap_proxy_retry_worker_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_retry_worker);
      +        if (!ap_proxy_retry_worker_fn) {
      +            /* can only happen if mod_proxy isn't loaded */
      +            return NULL;
      +        }
      +    }
      +
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01211)
                        "proxy: Entering bybusyness for BALANCER (%s)",
      -                 balancer->name);
      +                 balancer->s->name);
       
           /* First try to see if we have available candidate */
           do {
      @@ -66,8 +77,9 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
                        * The worker might still be unusable, but we try
                        * anyway.
                        */
      -                if (!PROXY_WORKER_IS_USABLE(*worker))
      -                    ap_proxy_retry_worker("BALANCER", *worker, r->server);
      +                if (!PROXY_WORKER_IS_USABLE(*worker)) {
      +                    ap_proxy_retry_worker_fn("BALANCER", *worker, r->server);
      +                }
       
                       /* Take into calculation only the workers that are
                        * not in error state or not disabled.
      @@ -96,18 +108,18 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer,
       
           if (mycandidate) {
               mycandidate->s->lbstatus -= total_factor;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01212)
                            "proxy: bybusyness selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d",
                            mycandidate->s->name, mycandidate->s->busy, mycandidate->s->lbstatus);
       
           }
       
           return mycandidate;
      -
       }
       
       /* assumed to be mutex protected by caller */
      -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
      +static apr_status_t reset(proxy_balancer *balancer, server_rec *s)
      +{
           int i;
           proxy_worker **worker;
           worker = (proxy_worker **)balancer->workers->elts;
      @@ -118,8 +130,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
           return APR_SUCCESS;
       }
       
      -static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      +static apr_status_t age(proxy_balancer *balancer, server_rec *s)
      +{
      +    return APR_SUCCESS;
       }
       
       static const proxy_balancer_method bybusyness =
      @@ -131,7 +144,6 @@ static const proxy_balancer_method bybusyness =
           &age
       };
       
      -
       static void register_hook(apr_pool_t *p)
       {
           ap_register_provider(p, PROXY_LBMETHOD, "bybusyness", "0", &bybusyness);
      diff --git a/modules/proxy/balancers/mod_lbmethod_bybusyness.dep b/modules/proxy/balancers/mod_lbmethod_bybusyness.dep
      new file mode 100644
      index 00000000000..12cbe7f70de
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_bybusyness.dep
      @@ -0,0 +1,76 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_lbmethod_bybusyness.mak
      +
      +.\mod_lbmethod_bybusyness.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_mpm.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\ap_slotmem.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_connection.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\http_vhost.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\scoreboard.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_charset.h"\
      +	"..\..\..\include\util_ebcdic.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_mutex.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	"..\mod_proxy.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/balancers/mod_lbmethod_bybusyness.mak b/modules/proxy/balancers/mod_lbmethod_bybusyness.mak
      new file mode 100644
      index 00000000000..4a04fd6816b
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_bybusyness.mak
      @@ -0,0 +1,408 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_lbmethod_bybusyness.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_lbmethod_bybusyness - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_lbmethod_bybusyness - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_lbmethod_bybusyness - Win32 Release" && "$(CFG)" != "mod_lbmethod_bybusyness - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_lbmethod_bybusyness.mak" CFG="mod_lbmethod_bybusyness - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_lbmethod_bybusyness - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_lbmethod_bybusyness - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_bybusyness.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Release" "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_lbmethod_bybusyness.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" "mod_proxy_balancer - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_bybusyness_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_bybusyness.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_bybusyness.so" /d LONG_NAME="lbmethod_bybusyness_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_bybusyness.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_bybusyness.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_bybusyness.so" /implib:"$(OUTDIR)\mod_lbmethod_bybusyness.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_bybusyness.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_bybusyness.obj" \
      +	"$(INTDIR)\mod_lbmethod_bybusyness.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\Release\mod_proxy.lib" \
      +	"..\Release\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_bybusyness.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_lbmethod_bybusyness.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_bybusyness.so"
      +   if exist .\Release\mod_lbmethod_bybusyness.so.manifest mt.exe -manifest .\Release\mod_lbmethod_bybusyness.so.manifest -outputresource:.\Release\mod_lbmethod_bybusyness.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_bybusyness.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Debug" "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_lbmethod_bybusyness.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" "mod_proxy_balancer - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_bybusyness_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bybusyness.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_bybusyness_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_bybusyness.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_bybusyness.so" /d LONG_NAME="lbmethod_bybusyness_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_bybusyness.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_bybusyness.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_bybusyness.so" /implib:"$(OUTDIR)\mod_lbmethod_bybusyness.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_bybusyness.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_bybusyness.obj" \
      +	"$(INTDIR)\mod_lbmethod_bybusyness.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\Debug\mod_proxy.lib" \
      +	"..\Debug\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_bybusyness.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_lbmethod_bybusyness.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_bybusyness.so"
      +   if exist .\Debug\mod_lbmethod_bybusyness.so.manifest mt.exe -manifest .\Debug\mod_lbmethod_bybusyness.so.manifest -outputresource:.\Debug\mod_lbmethod_bybusyness.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_lbmethod_bybusyness.dep")
      +!INCLUDE "mod_lbmethod_bybusyness.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_lbmethod_bybusyness.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release" || "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +SOURCE=.\mod_lbmethod_bybusyness.c
      +
      +"$(INTDIR)\mod_lbmethod_bybusyness.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +"mod_proxy_balancer - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +"mod_proxy_balancer - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_lbmethod_bybusyness.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_bybusyness.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_bybusyness.so" /d LONG_NAME="lbmethod_bybusyness_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bybusyness - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_lbmethod_bybusyness.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_bybusyness.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_bybusyness.so" /d LONG_NAME="lbmethod_bybusyness_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/balancers/mod_lbmethod_byrequests.c b/modules/proxy/balancers/mod_lbmethod_byrequests.c
      index e757bf8291e..206fe9216b5 100644
      --- a/modules/proxy/balancers/mod_lbmethod_byrequests.c
      +++ b/modules/proxy/balancers/mod_lbmethod_byrequests.c
      @@ -22,6 +22,9 @@
       
       module AP_MODULE_DECLARE_DATA lbmethod_byrequests_module;
       
      +static int (*ap_proxy_retry_worker_fn)(const char *proxy_function,
      +        proxy_worker *worker, server_rec *s) = NULL;
      +
       /*
        * The idea behind the find_best_byrequests scheduler is the following:
        *
      @@ -80,9 +83,18 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
           int checking_standby;
           int checked_standby;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +    if (!ap_proxy_retry_worker_fn) {
      +        ap_proxy_retry_worker_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_retry_worker);
      +        if (!ap_proxy_retry_worker_fn) {
      +            /* can only happen if mod_proxy isn't loaded */
      +            return NULL;
      +        }
      +    }
      +
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01207)
                        "proxy: Entering byrequests for BALANCER (%s)",
      -                 balancer->name);
      +                 balancer->s->name);
       
           /* First try to see if we have available candidate */
           do {
      @@ -109,7 +121,7 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
                        * anyway.
                        */
                       if (!PROXY_WORKER_IS_USABLE(*worker))
      -                    ap_proxy_retry_worker("BALANCER", *worker, r->server);
      +                    ap_proxy_retry_worker_fn("BALANCER", *worker, r->server);
                       /* Take into calculation only the workers that are
                        * not in error state or not disabled.
                        */
      @@ -127,7 +139,7 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
       
           if (mycandidate) {
               mycandidate->s->lbstatus -= total_factor;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01208)
                            "proxy: byrequests selected worker \"%s\" : busy %" APR_SIZE_T_FMT " : lbstatus %d",
                            mycandidate->s->name, mycandidate->s->busy, mycandidate->s->lbstatus);
       
      @@ -137,7 +149,8 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer,
       }
       
       /* assumed to be mutex protected by caller */
      -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
      +static apr_status_t reset(proxy_balancer *balancer, server_rec *s)
      +{
           int i;
           proxy_worker **worker;
           worker = (proxy_worker **)balancer->workers->elts;
      @@ -147,8 +160,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
           return APR_SUCCESS;
       }
       
      -static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      +static apr_status_t age(proxy_balancer *balancer, server_rec *s)
      +{
      +    return APR_SUCCESS;
       }
       
       /*
      diff --git a/modules/proxy/balancers/mod_lbmethod_byrequests.dep b/modules/proxy/balancers/mod_lbmethod_byrequests.dep
      new file mode 100644
      index 00000000000..acaeb540cc8
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_byrequests.dep
      @@ -0,0 +1,76 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_lbmethod_byrequests.mak
      +
      +.\mod_lbmethod_byrequests.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_mpm.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\ap_slotmem.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_connection.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\http_vhost.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\scoreboard.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_charset.h"\
      +	"..\..\..\include\util_ebcdic.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_mutex.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	"..\mod_proxy.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/balancers/mod_lbmethod_byrequests.mak b/modules/proxy/balancers/mod_lbmethod_byrequests.mak
      new file mode 100644
      index 00000000000..b5914a21b40
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_byrequests.mak
      @@ -0,0 +1,408 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_lbmethod_byrequests.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_lbmethod_byrequests - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_lbmethod_byrequests - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_lbmethod_byrequests - Win32 Release" && "$(CFG)" != "mod_lbmethod_byrequests - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_lbmethod_byrequests.mak" CFG="mod_lbmethod_byrequests - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_lbmethod_byrequests - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_lbmethod_byrequests - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_byrequests.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Release" "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_lbmethod_byrequests.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" "mod_proxy_balancer - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_byrequests_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_byrequests.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_byrequests.so" /d LONG_NAME="lbmethod_byrequests_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_byrequests.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_byrequests.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_byrequests.so" /implib:"$(OUTDIR)\mod_lbmethod_byrequests.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_byrequests.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_byrequests.obj" \
      +	"$(INTDIR)\mod_lbmethod_byrequests.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\Release\mod_proxy.lib" \
      +	"..\Release\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_byrequests.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_lbmethod_byrequests.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_byrequests.so"
      +   if exist .\Release\mod_lbmethod_byrequests.so.manifest mt.exe -manifest .\Release\mod_lbmethod_byrequests.so.manifest -outputresource:.\Release\mod_lbmethod_byrequests.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_byrequests.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Debug" "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_lbmethod_byrequests.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" "mod_proxy_balancer - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_byrequests_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_byrequests.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_byrequests_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_byrequests.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_byrequests.so" /d LONG_NAME="lbmethod_byrequests_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_byrequests.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_byrequests.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_byrequests.so" /implib:"$(OUTDIR)\mod_lbmethod_byrequests.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_byrequests.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_byrequests.obj" \
      +	"$(INTDIR)\mod_lbmethod_byrequests.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\Debug\mod_proxy.lib" \
      +	"..\Debug\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_byrequests.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_lbmethod_byrequests.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_byrequests.so"
      +   if exist .\Debug\mod_lbmethod_byrequests.so.manifest mt.exe -manifest .\Debug\mod_lbmethod_byrequests.so.manifest -outputresource:.\Debug\mod_lbmethod_byrequests.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_lbmethod_byrequests.dep")
      +!INCLUDE "mod_lbmethod_byrequests.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_lbmethod_byrequests.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release" || "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +SOURCE=.\mod_lbmethod_byrequests.c
      +
      +"$(INTDIR)\mod_lbmethod_byrequests.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +"mod_proxy_balancer - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +"mod_proxy_balancer - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_lbmethod_byrequests.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_byrequests.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_byrequests.so" /d LONG_NAME="lbmethod_byrequests_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_byrequests - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_lbmethod_byrequests.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_byrequests.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_byrequests.so" /d LONG_NAME="lbmethod_byrequests_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.c b/modules/proxy/balancers/mod_lbmethod_bytraffic.c
      index ba05d764f3a..b3fe556a550 100644
      --- a/modules/proxy/balancers/mod_lbmethod_bytraffic.c
      +++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.c
      @@ -22,6 +22,9 @@
       
       module AP_MODULE_DECLARE_DATA lbmethod_bytraffic_module;
       
      +static int (*ap_proxy_retry_worker_fn)(const char *proxy_function,
      +        proxy_worker *worker, server_rec *s) = NULL;
      +
       /*
        * The idea behind the find_best_bytraffic scheduler is the following:
        *
      @@ -52,9 +55,18 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
           int checking_standby;
           int checked_standby;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +    if (!ap_proxy_retry_worker_fn) {
      +        ap_proxy_retry_worker_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_retry_worker);
      +        if (!ap_proxy_retry_worker_fn) {
      +            /* can only happen if mod_proxy isn't loaded */
      +            return NULL;
      +        }
      +    }
      +
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01209)
                        "proxy: Entering bytraffic for BALANCER (%s)",
      -                 balancer->name);
      +                 balancer->s->name);
       
           /* First try to see if we have available candidate */
           do {
      @@ -81,7 +93,7 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
                        * anyway.
                        */
                       if (!PROXY_WORKER_IS_USABLE(*worker))
      -                    ap_proxy_retry_worker("BALANCER", *worker, r->server);
      +                    ap_proxy_retry_worker_fn("BALANCER", *worker, r->server);
                       /* Take into calculation only the workers that are
                        * not in error state or not disabled.
                        */
      @@ -100,17 +112,17 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer,
           } while (cur_lbset <= max_lbset && !mycandidate);
       
           if (mycandidate) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01210)
                            "proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT,
                            mycandidate->s->name, mycandidate->s->busy);
      -
           }
       
           return mycandidate;
       }
       
       /* assumed to be mutex protected by caller */
      -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
      +static apr_status_t reset(proxy_balancer *balancer, server_rec *s)
      +{
           int i;
           proxy_worker **worker;
           worker = (proxy_worker **)balancer->workers->elts;
      @@ -123,8 +135,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
           return APR_SUCCESS;
       }
       
      -static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      +static apr_status_t age(proxy_balancer *balancer, server_rec *s)
      +{
      +    return APR_SUCCESS;
       }
       
       static const proxy_balancer_method bytraffic =
      diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.dep b/modules/proxy/balancers/mod_lbmethod_bytraffic.dep
      new file mode 100644
      index 00000000000..75dfce445d6
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.dep
      @@ -0,0 +1,76 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_lbmethod_bytraffic.mak
      +
      +.\mod_lbmethod_bytraffic.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_mpm.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\ap_slotmem.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_connection.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\http_vhost.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\scoreboard.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_charset.h"\
      +	"..\..\..\include\util_ebcdic.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_mutex.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	"..\mod_proxy.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.mak b/modules/proxy/balancers/mod_lbmethod_bytraffic.mak
      new file mode 100644
      index 00000000000..fe68c2bf52d
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.mak
      @@ -0,0 +1,408 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_lbmethod_bytraffic.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_lbmethod_bytraffic - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_lbmethod_bytraffic - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_lbmethod_bytraffic - Win32 Release" && "$(CFG)" != "mod_lbmethod_bytraffic - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_lbmethod_bytraffic.mak" CFG="mod_lbmethod_bytraffic - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_lbmethod_bytraffic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_lbmethod_bytraffic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_bytraffic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Release" "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_lbmethod_bytraffic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" "mod_proxy_balancer - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_bytraffic_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_bytraffic.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_bytraffic.so" /d LONG_NAME="lbmethod_bytraffic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_bytraffic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_bytraffic.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_bytraffic.so" /implib:"$(OUTDIR)\mod_lbmethod_bytraffic.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_bytraffic.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_bytraffic.obj" \
      +	"$(INTDIR)\mod_lbmethod_bytraffic.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\Release\mod_proxy.lib" \
      +	"..\Release\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_bytraffic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_lbmethod_bytraffic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_bytraffic.so"
      +   if exist .\Release\mod_lbmethod_bytraffic.so.manifest mt.exe -manifest .\Release\mod_lbmethod_bytraffic.so.manifest -outputresource:.\Release\mod_lbmethod_bytraffic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_bytraffic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Debug" "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_lbmethod_bytraffic.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" "mod_proxy_balancer - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_bytraffic_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_bytraffic.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_bytraffic_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_bytraffic.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_bytraffic.so" /d LONG_NAME="lbmethod_bytraffic_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_bytraffic.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_bytraffic.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_bytraffic.so" /implib:"$(OUTDIR)\mod_lbmethod_bytraffic.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_bytraffic.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_bytraffic.obj" \
      +	"$(INTDIR)\mod_lbmethod_bytraffic.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\Debug\mod_proxy.lib" \
      +	"..\Debug\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_bytraffic.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_lbmethod_bytraffic.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_bytraffic.so"
      +   if exist .\Debug\mod_lbmethod_bytraffic.so.manifest mt.exe -manifest .\Debug\mod_lbmethod_bytraffic.so.manifest -outputresource:.\Debug\mod_lbmethod_bytraffic.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_lbmethod_bytraffic.dep")
      +!INCLUDE "mod_lbmethod_bytraffic.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_lbmethod_bytraffic.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release" || "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +SOURCE=.\mod_lbmethod_bytraffic.c
      +
      +"$(INTDIR)\mod_lbmethod_bytraffic.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +"mod_proxy_balancer - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +"mod_proxy_balancer - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_lbmethod_bytraffic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_bytraffic.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_bytraffic.so" /d LONG_NAME="lbmethod_bytraffic_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_bytraffic - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_lbmethod_bytraffic.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_bytraffic.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_bytraffic.so" /d LONG_NAME="lbmethod_bytraffic_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
      index e5b5c27dc4f..8b52eca6a27 100644
      --- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c
      +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c
      @@ -31,6 +31,9 @@
       
       module AP_MODULE_DECLARE_DATA lbmethod_heartbeat_module;
       
      +static int (*ap_proxy_retry_worker_fn)(const char *proxy_function,
      +        proxy_worker *worker, server_rec *s) = NULL;
      +
       static const ap_slotmem_provider_t *storage = NULL;
       static ap_slotmem_instance_t *hm_serversmem = NULL;
       
      @@ -79,7 +82,7 @@ argstr_to_table(apr_pool_t *p, char *str, apr_table_t *parms)
               ap_unescape_url(value);
               apr_table_set(parms, key, value);
               /*
      -         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03230)
                "Found query arg: %s = %s", key, value);
                */
               key = apr_strtok(NULL, "&", &strtok_state);
      @@ -124,7 +127,7 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
                   hb_server_t *server;
                   char buf[4096];
                   apr_size_t bsize = sizeof(buf);
      -            const char *ip;
      +            const char *ip, *val;
       
                   apr_brigade_cleanup(tmpbb);
       
      @@ -159,7 +162,7 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
                       continue;
                   }
       
      -            ip = apr_pstrndup(pool, buf, t - buf);
      +            ip = apr_pstrmemdup(pool, buf, t - buf);
                   t++;
       
                   server = apr_hash_get(servers, ip, APR_HASH_KEY_STRING);
      @@ -177,20 +180,20 @@ static apr_status_t readfile_heartbeats(const char *path, apr_hash_t *servers,
       
                   argstr_to_table(pool, apr_pstrdup(pool, t), hbt);
       
      -            if (apr_table_get(hbt, "busy")) {
      -                server->busy = atoi(apr_table_get(hbt, "busy"));
      +            if ((val = apr_table_get(hbt, "busy"))) {
      +                server->busy = atoi(val);
                   }
       
      -            if (apr_table_get(hbt, "ready")) {
      -                server->ready = atoi(apr_table_get(hbt, "ready"));
      +            if ((val = apr_table_get(hbt, "ready"))) {
      +                server->ready = atoi(val);
                   }
       
      -            if (apr_table_get(hbt, "lastseen")) {
      -                server->seen = atoi(apr_table_get(hbt, "lastseen"));
      +            if ((val = apr_table_get(hbt, "lastseen"))) {
      +                server->seen = atoi(val);
                   }
       
      -            if (apr_table_get(hbt, "port")) {
      -                server->port = atoi(apr_table_get(hbt, "port"));
      +            if ((val = apr_table_get(hbt, "port"))) {
      +                server->port = atoi(val);
                   }
       
                   if (server->busy == 0 && server->ready != 0) {
      @@ -270,6 +273,15 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
               ap_get_module_config(r->server->module_config,
                                    &lbmethod_heartbeat_module);
       
      +    if (!ap_proxy_retry_worker_fn) {
      +        ap_proxy_retry_worker_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_retry_worker);
      +        if (!ap_proxy_retry_worker_fn) {
      +            /* can only happen if mod_proxy isn't loaded */
      +            return NULL;
      +        }
      +    }
      +
           apr_pool_create(&tpool, r->pool);
       
           servers = apr_hash_make(tpool);
      @@ -277,7 +289,7 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
           rv = read_heartbeats(ctx->path, servers, tpool);
       
           if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01213)
                             "lb_heartbeat: Unable to read heartbeats at '%s'",
                             ctx->path);
               apr_pool_destroy(tpool);
      @@ -291,13 +303,13 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
               server = apr_hash_get(servers, (*worker)->s->hostname, APR_HASH_KEY_STRING);
       
               if (!server) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(01214)
                             "lb_heartbeat: No server for worker %s", (*worker)->s->name);
                   continue;
               }
       
               if (!PROXY_WORKER_IS_USABLE(*worker)) {
      -            ap_proxy_retry_worker("BALANCER", *worker, r->server);
      +            ap_proxy_retry_worker_fn("BALANCER", *worker, r->server);
               }
       
               if (PROXY_WORKER_IS_USABLE(*worker)) {
      @@ -330,12 +342,14 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer,
           return mycandidate;
       }
       
      -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      +static apr_status_t reset(proxy_balancer *balancer, server_rec *s)
      +{
      +    return APR_SUCCESS;
       }
       
      -static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      +static apr_status_t age(proxy_balancer *balancer, server_rec *s)
      +{
      +    return APR_SUCCESS;
       }
       
       static const proxy_balancer_method heartbeat =
      @@ -348,7 +362,7 @@ static const proxy_balancer_method heartbeat =
       };
       
       static int lb_hb_init(apr_pool_t *p, apr_pool_t *plog,
      -                          apr_pool_t *ptemp, server_rec *s)
      +                      apr_pool_t *ptemp, server_rec *s)
       {
           apr_size_t size;
           unsigned int num;
      @@ -359,19 +373,24 @@ static int lb_hb_init(apr_pool_t *p, apr_pool_t *plog,
           if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
               return OK;
       
      -    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
      +    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
                                        AP_SLOTMEM_PROVIDER_VERSION);
           if (!storage) {
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "ap_lookup_provider %s failed", AP_SLOTMEM_PROVIDER_GROUP);
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02281)
      +                     "Failed to lookup provider 'shm' for '%s'. Maybe you "
      +                     "need to load mod_slotmem_shm?",
      +                     AP_SLOTMEM_PROVIDER_GROUP);
               return OK;
           }
       
           /* Try to use a slotmem created by mod_heartmonitor */
           storage->attach(&hm_serversmem, "mod_heartmonitor", &size, &num, p);
      -    if (!hm_serversmem) {
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "No slotmem from mod_heartmonitor");
      -    } else
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, "Using slotmem from mod_heartmonitor");
      +    if (!hm_serversmem)
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02282)
      +                     "No slotmem from mod_heartmonitor");
      +    else
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(02283)
      +                     "Using slotmem from mod_heartmonitor");
       
           if (hm_serversmem)
               ctx->path = "(slotmem)";
      @@ -390,7 +409,7 @@ static void *lb_hb_create_config(apr_pool_t *p, server_rec *s)
       {
           lb_hb_ctx_t *ctx = (lb_hb_ctx_t *) apr_palloc(p, sizeof(lb_hb_ctx_t));
       
      -    ctx->path = ap_server_root_relative(p, "logs/hb.dat");
      +    ctx->path = ap_runtime_dir_relative(p, DEFAULT_HEARTBEAT_STORAGE);
       
           return ctx;
       }
      @@ -425,7 +444,7 @@ static const char *cmd_lb_hb_storage(cmd_parms *cmd,
               return err;
           }
       
      -    ctx->path = ap_server_root_relative(p, path);
      +    ctx->path = ap_runtime_dir_relative(p, path);
       
           return NULL;
       }
      diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.dep b/modules/proxy/balancers/mod_lbmethod_heartbeat.dep
      new file mode 100644
      index 00000000000..60004822c20
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.dep
      @@ -0,0 +1,77 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_lbmethod_heartbeat.mak
      +
      +.\mod_lbmethod_heartbeat.c : \
      +	"..\..\..\include\ap_config.h"\
      +	"..\..\..\include\ap_config_layout.h"\
      +	"..\..\..\include\ap_expr.h"\
      +	"..\..\..\include\ap_hooks.h"\
      +	"..\..\..\include\ap_mmn.h"\
      +	"..\..\..\include\ap_mpm.h"\
      +	"..\..\..\include\ap_provider.h"\
      +	"..\..\..\include\ap_regex.h"\
      +	"..\..\..\include\ap_release.h"\
      +	"..\..\..\include\ap_slotmem.h"\
      +	"..\..\..\include\apache_noprobes.h"\
      +	"..\..\..\include\heartbeat.h"\
      +	"..\..\..\include\http_config.h"\
      +	"..\..\..\include\http_connection.h"\
      +	"..\..\..\include\http_core.h"\
      +	"..\..\..\include\http_log.h"\
      +	"..\..\..\include\http_main.h"\
      +	"..\..\..\include\http_protocol.h"\
      +	"..\..\..\include\http_request.h"\
      +	"..\..\..\include\http_vhost.h"\
      +	"..\..\..\include\httpd.h"\
      +	"..\..\..\include\os.h"\
      +	"..\..\..\include\scoreboard.h"\
      +	"..\..\..\include\util_cfgtree.h"\
      +	"..\..\..\include\util_charset.h"\
      +	"..\..\..\include\util_ebcdic.h"\
      +	"..\..\..\include\util_filter.h"\
      +	"..\..\..\include\util_mutex.h"\
      +	"..\..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\..\srclib\apr\include\apr.h"\
      +	"..\..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\..\srclib\apr\include\apr_want.h"\
      +	"..\mod_proxy.h"\
      +	
      +
      +..\..\..\build\win32\httpd.rc : \
      +	"..\..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.mak b/modules/proxy/balancers/mod_lbmethod_heartbeat.mak
      new file mode 100644
      index 00000000000..31bd4af9511
      --- /dev/null
      +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.mak
      @@ -0,0 +1,408 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_lbmethod_heartbeat.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_lbmethod_heartbeat - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_lbmethod_heartbeat - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_lbmethod_heartbeat - Win32 Release" && "$(CFG)" != "mod_lbmethod_heartbeat - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_lbmethod_heartbeat.mak" CFG="mod_lbmethod_heartbeat - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_lbmethod_heartbeat - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_lbmethod_heartbeat - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Release" "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_lbmethod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" "mod_proxy_balancer - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_heartbeat_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_heartbeat.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_heartbeat.so" /d LONG_NAME="lbmethod_heartbeat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_heartbeat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_heartbeat.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_heartbeat.so" /implib:"$(OUTDIR)\mod_lbmethod_heartbeat.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_heartbeat.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_heartbeat.obj" \
      +	"$(INTDIR)\mod_lbmethod_heartbeat.res" \
      +	"..\..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\..\Release\libhttpd.lib" \
      +	"..\Release\mod_proxy.lib" \
      +	"..\Release\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_heartbeat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_lbmethod_heartbeat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_heartbeat.so"
      +   if exist .\Release\mod_lbmethod_heartbeat.so.manifest mt.exe -manifest .\Release\mod_lbmethod_heartbeat.so.manifest -outputresource:.\Release\mod_lbmethod_heartbeat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_lbmethod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy_balancer - Win32 Debug" "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_lbmethod_heartbeat.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" "mod_proxy_balancer - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat.obj"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat.res"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat_src.idb"
      +	-@erase "$(INTDIR)\mod_lbmethod_heartbeat_src.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.exp"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.lib"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.pdb"
      +	-@erase "$(OUTDIR)\mod_lbmethod_heartbeat.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_lbmethod_heartbeat_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_lbmethod_heartbeat.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_heartbeat.so" /d LONG_NAME="lbmethod_heartbeat_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_lbmethod_heartbeat.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_lbmethod_heartbeat.pdb" /debug /out:"$(OUTDIR)\mod_lbmethod_heartbeat.so" /implib:"$(OUTDIR)\mod_lbmethod_heartbeat.lib" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_heartbeat.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_lbmethod_heartbeat.obj" \
      +	"$(INTDIR)\mod_lbmethod_heartbeat.res" \
      +	"..\..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\..\Debug\libhttpd.lib" \
      +	"..\Debug\mod_proxy.lib" \
      +	"..\Debug\mod_proxy_balancer.lib"
      +
      +"$(OUTDIR)\mod_lbmethod_heartbeat.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_lbmethod_heartbeat.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_lbmethod_heartbeat.so"
      +   if exist .\Debug\mod_lbmethod_heartbeat.so.manifest mt.exe -manifest .\Debug\mod_lbmethod_heartbeat.so.manifest -outputresource:.\Debug\mod_lbmethod_heartbeat.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_lbmethod_heartbeat.dep")
      +!INCLUDE "mod_lbmethod_heartbeat.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_lbmethod_heartbeat.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release" || "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +SOURCE=.\mod_lbmethod_heartbeat.c
      +
      +"$(INTDIR)\mod_lbmethod_heartbeat.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy\balancers"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy\balancers"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +"mod_proxy_balancer - Win32 Release" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 ReleaseCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +"mod_proxy_balancer - Win32 Debug" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" 
      +   cd ".\balancers"
      +
      +"mod_proxy_balancer - Win32 DebugCLEAN" : 
      +   cd ".\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\balancers"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_lbmethod_heartbeat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_heartbeat.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_heartbeat.so" /d LONG_NAME="lbmethod_heartbeat_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_lbmethod_heartbeat - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_lbmethod_heartbeat.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_lbmethod_heartbeat.res" /i "../../../include" /i "../../../srclib/apr/include" /i "../../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_heartbeat.so" /d LONG_NAME="lbmethod_heartbeat_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/config.m4 b/modules/proxy/config.m4
      index 53144e80663..a0915c653f8 100644
      --- a/modules/proxy/config.m4
      +++ b/modules/proxy/config.m4
      @@ -2,16 +2,22 @@ dnl modules enabled in this directory by default
       
       APACHE_MODPATH_INIT(proxy)
       
      -if test "$enable_proxy" = "shared"; then
      -  proxy_mods_enable=shared
      -elif test "$enable_proxy" = "yes"; then
      -  proxy_mods_enable=yes
      -else
      -  proxy_mods_enable=most
      -fi
      -
       proxy_objs="mod_proxy.lo proxy_util.lo"
      -APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , $proxy_mods_enable)
      +APACHE_MODULE(proxy, Apache proxy module, $proxy_objs, , most)
      +
      +dnl set aside module selections and default, and set the module default to the
      +dnl same scope (shared|static) as selected for mod proxy, along with setting
      +dnl the default selection to "most" for remaining proxy modules, mirroring the
      +dnl behavior of 2.4.1 and later, but failing ./configure only if an explicitly
      +dnl enabled module is missing its prereqs
      +save_module_selection=$module_selection
      +save_module_default=$module_default
      +if test "$enable_proxy" != "no"; then
      +    module_selection=most
      +    if test "$enable_proxy" = "shared" -o "$enable_proxy" = "static"; then
      +        module_default=$enable_proxy
      +    fi
      +fi
       
       proxy_connect_objs="mod_proxy_connect.lo"
       proxy_ftp_objs="mod_proxy_ftp.lo"
      @@ -20,6 +26,7 @@ proxy_fcgi_objs="mod_proxy_fcgi.lo"
       proxy_scgi_objs="mod_proxy_scgi.lo"
       proxy_fdpass_objs="mod_proxy_fdpass.lo"
       proxy_ajp_objs="mod_proxy_ajp.lo ajp_header.lo ajp_link.lo ajp_msg.lo ajp_utils.lo"
      +proxy_wstunnel_objs="mod_proxy_wstunnel.lo"
       proxy_balancer_objs="mod_proxy_balancer.lo"
       
       case "$host" in
      @@ -33,16 +40,17 @@ case "$host" in
           proxy_scgi_objs="$proxy_scgi_objs mod_proxy.la"
           proxy_fdpass_objs="$proxy_fdpass_objs mod_proxy.la"
           proxy_ajp_objs="$proxy_ajp_objs mod_proxy.la"
      +    proxy_wstunnel_objs="$proxy_wstunnel_objs mod_proxy.la"
           proxy_balancer_objs="$proxy_balancer_objs mod_proxy.la"
           ;;
       esac
       
      -APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires and is enabled by --enable-proxy., $proxy_connect_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires and is enabled by --enable-proxy., $proxy_ftp_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires and is enabled by --enable-proxy., $proxy_http_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires and is enabled by --enable-proxy., $proxy_fcgi_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires and is enabled by --enable-proxy., $proxy_scgi_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module.  Requires --enable-proxy., $proxy_fdpass_objs, , , [
      +APACHE_MODULE(proxy_connect, Apache proxy CONNECT module.  Requires --enable-proxy., $proxy_connect_objs, , most, , proxy)
      +APACHE_MODULE(proxy_ftp, Apache proxy FTP module.  Requires --enable-proxy., $proxy_ftp_objs, , most, , proxy)
      +APACHE_MODULE(proxy_http, Apache proxy HTTP module.  Requires --enable-proxy., $proxy_http_objs, , most, , proxy)
      +APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module.  Requires --enable-proxy., $proxy_fcgi_objs, , most, , proxy)
      +APACHE_MODULE(proxy_scgi, Apache proxy SCGI module.  Requires --enable-proxy., $proxy_scgi_objs, , most, , proxy)
      +APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module.  Requires --enable-proxy., $proxy_fdpass_objs, , most, [
         AC_CHECK_DECL(CMSG_DATA,,, [
           #include <sys/types.h>
           #include <sys/socket.h>
      @@ -51,22 +59,18 @@ APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module.  Requires
           AC_MSG_WARN([Your system does not support CMSG_DATA.])
           enable_proxy_fdpass=no
         fi
      -])
      -APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable)
      -APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable)
      -
      -APACHE_MODULE(serf, [Reverse proxy module using Serf], , , no, [
      -    APACHE_CHECK_SERF
      -    if test "$ac_cv_serf" = "yes" ; then
      -      APR_ADDTO(MOD_SERF_LDADD, [\$(SERF_LIBS)])
      -    else
      -      enable_serf=no
      -    fi
      -])
      +],proxy)
      +APACHE_MODULE(proxy_wstunnel, Apache proxy Websocket Tunnel module.  Requires --enable-proxy., $proxy_wstunnel_objs, , most, , proxy)
      +APACHE_MODULE(proxy_ajp, Apache proxy AJP module.  Requires --enable-proxy., $proxy_ajp_objs, , most, , proxy)
      +APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module.  Requires --enable-proxy., $proxy_balancer_objs, , most, , proxy)
       
      -APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , $proxy_mods_enable)
      +APACHE_MODULE(proxy_express, mass reverse-proxy module. Requires --enable-proxy., , , most, , proxy)
      +APACHE_MODULE(proxy_hcheck, [reverse-proxy health-check module. Requires --enable-proxy and --enable-watchdog.], , , most, , [proxy,watchdog])
       
       APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
       
      +module_selection=$save_module_selection
      +module_default=$save_module_default
      +
       APACHE_MODPATH_FINISH
       
      diff --git a/modules/proxy/examples/mod_lbmethod_rr.c b/modules/proxy/examples/mod_lbmethod_rr.c
      deleted file mode 100644
      index 2ed3134d5ae..00000000000
      --- a/modules/proxy/examples/mod_lbmethod_rr.c
      +++ /dev/null
      @@ -1,133 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/* Round Robin lbmethod EXAMPLE module for Apache proxy */
      -
      -/* NOTE: This is designed simply to provide some info on how to create
      -         extra lbmethods via sub-modules... This code is ugly
      -         and needs work to actually do round-robin "right"
      -         but that is left as an exercise for the reader */
      -
      -#include "mod_proxy.h"
      -#include "scoreboard.h"
      -#include "ap_mpm.h"
      -#include "apr_version.h"
      -#include "ap_hooks.h"
      -
      -#if APR_HAVE_UNISTD_H
      -#include <unistd.h> /* for getpid() */
      -#endif
      -
      -module AP_MODULE_DECLARE_DATA proxy_balancer_rr_module;
      -
      -typedef struct {
      -    int index;
      -} rr_data ;
      -
      -/*
      - */
      -static proxy_worker *find_best_roundrobin(proxy_balancer *balancer,
      -                                         request_rec *r)
      -{
      -    int i;
      -    proxy_worker **worker;
      -    proxy_worker *mycandidate = NULL;
      -    int checking_standby;
      -    int checked_standby;
      -    rr_data *ctx;
      -
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: Entering roundrobin for BALANCER %s (%d)",
      -                 balancer->name, (int)getpid());
      -
      -    /* The index of the candidate last chosen is stored in ctx->index */
      -    if (!balancer->context) {
      -        /* UGLY */
      -        ctx = apr_pcalloc(r->server->process->pconf, sizeof(rr_data));
      -        balancer->context = (void *)ctx;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: Creating roundrobin ctx for BALANCER %s (%d)",
      -                 balancer->name, (int)getpid());
      -    } else {
      -        ctx = (rr_data *)balancer->context;
      -    }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: roundrobin index: %d (%d)",
      -                 ctx->index, (int)getpid());
      -
      -    checking_standby = checked_standby = 0;
      -    while (!mycandidate && !checked_standby) {
      -        worker = (proxy_worker **)balancer->workers->elts;
      -
      -        for (i = 0; i < balancer->workers->nelts; i++, worker++) {
      -            if (i < ctx->index)
      -                continue;
      -            if (
      -                (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) ||
      -                (PROXY_WORKER_IS_DRAINING(*worker))
      -                ) {
      -                continue;
      -            }
      -            if (!PROXY_WORKER_IS_USABLE(*worker))
      -                ap_proxy_retry_worker("BALANCER", *worker, r->server);
      -            if (PROXY_WORKER_IS_USABLE(*worker)) {
      -                mycandidate = *worker;
      -                break;
      -            }
      -        }
      -        checked_standby = checking_standby++;
      -    }
      -
      -
      -    ctx->index += 1;
      -    if (ctx->index >= balancer->workers->nelts) {
      -        ctx->index = 0;
      -    }
      -    return mycandidate;
      -}
      -
      -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      -}
      -
      -static apr_status_t age(proxy_balancer *balancer, server_rec *s) {
      -        return APR_SUCCESS;
      -}
      -
      -static const proxy_balancer_method roundrobin =
      -{
      -    "roundrobin",
      -    &find_best_roundrobin,
      -    NULL,
      -    &reset,
      -    &age
      -};
      -
      -
      -static void ap_proxy_rr_register_hook(apr_pool_t *p)
      -{
      -    ap_register_provider(p, PROXY_LBMETHOD, "roundrobin", "0", &roundrobin);
      -}
      -
      -AP_DECLARE_MODULE(proxy_balancer_rr) = {
      -    STANDARD20_MODULE_STUFF,
      -    NULL,       /* create per-directory config structure */
      -    NULL,       /* merge per-directory config structures */
      -    NULL,       /* create per-server config structure */
      -    NULL,       /* merge per-server config structures */
      -    NULL,       /* command apr_table_t */
      -    ap_proxy_rr_register_hook /* register hooks */
      -};
      diff --git a/modules/proxy/fcgi_protocol.h b/modules/proxy/fcgi_protocol.h
      deleted file mode 100644
      index 86e03b25d1c..00000000000
      --- a/modules/proxy/fcgi_protocol.h
      +++ /dev/null
      @@ -1,107 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file fcgi_protocol.h
      - * @brief FastCGI protocol defines
      - *
      - * @addtogroup FCGI_defines
      - * @{
      - */
      -
      -#ifndef FCGI_PROTOCOL_H
      -#define FCGI_PROTOCOL_H
      -
      -
      -#define FCGI_VERSION 1
      -
      -#define FCGI_BEGIN_REQUEST       1
      -#define FCGI_ABORT_REQUEST       2
      -#define FCGI_END_REQUEST         3
      -#define FCGI_PARAMS              4
      -#define FCGI_STDIN               5
      -#define FCGI_STDOUT              6
      -#define FCGI_STDERR              7
      -#define FCGI_DATA                8
      -#define FCGI_GET_VALUES          9
      -#define FCGI_GET_VALUES_RESULT  10
      -#define FCGI_UNKNOWN_TYPE       11
      -#define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
      -
      -typedef struct {
      -    unsigned char version;
      -    unsigned char type;
      -    unsigned char requestIdB1;
      -    unsigned char requestIdB0;
      -    unsigned char contentLengthB1;
      -    unsigned char contentLengthB0;
      -    unsigned char paddingLength;
      -    unsigned char reserved;
      -} fcgi_header;
      -
      -#define FCGI_HDR_VERSION_OFFSET         0
      -#define FCGI_HDR_TYPE_OFFSET            1
      -#define FCGI_HDR_REQUEST_ID_B1_OFFSET   2
      -#define FCGI_HDR_REQUEST_ID_B0_OFFSET   3
      -#define FCGI_HDR_CONTENT_LEN_B1_OFFSET  4
      -#define FCGI_HDR_CONTENT_LEN_B0_OFFSET  5
      -#define FCGI_HDR_PADDING_LEN_OFFSET     6
      -#define FCGI_HDR_RESERVED_OFFSET        7
      -
      -#define FCGI_BRB_ROLEB1_OFFSET       0
      -#define FCGI_BRB_ROLEB0_OFFSET       1
      -#define FCGI_BRB_FLAGS_OFFSET        2
      -#define FCGI_BRB_RESERVED0_OFFSET    3
      -#define FCGI_BRB_RESERVED1_OFFSET    4
      -#define FCGI_BRB_RESERVED2_OFFSET    5
      -#define FCGI_BRB_RESERVED3_OFFSET    6
      -#define FCGI_BRB_RESERVED4_OFFSET    7
      -
      -/*
      - * Number of bytes in a fcgi_header.  Future versions of the protocol
      - * will not reduce this number.
      - */
      -#define FCGI_HEADER_LEN  8
      -
      -/*
      - * Mask for flags component of FCGI_BeginRequestBody
      - */
      -#define FCGI_KEEP_CONN  1
      -
      -/*
      - * Values for role component of FCGI_BeginRequestBody
      - */
      -#define FCGI_RESPONDER  1
      -#define FCGI_AUTHORIZER 2
      -#define FCGI_FILTER     3
      -
      -typedef struct {
      -    unsigned char roleB1;
      -    unsigned char roleB0;
      -    unsigned char flags;
      -    unsigned char reserved[5];
      -} fcgi_begin_request_body;
      -
      -/*
      - * Maximum size of the allowed environment.
      - */
      -#define FCGI_MAX_ENV_SIZE  65535
      -
      -/* #define FCGI_DUMP_ENV_VARS */
      -
      -
      -#endif /* FCGI_PROTOCOL_H */
      -/** @} */
      diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
      index dfce1d7bfc0..d6e65004e32 100644
      --- a/modules/proxy/mod_proxy.c
      +++ b/modules/proxy/mod_proxy.c
      @@ -19,6 +19,7 @@
       #include "apr_optional.h"
       #include "scoreboard.h"
       #include "mod_status.h"
      +#include "proxy_util.h"
       
       #if (MODULE_MAGIC_NUMBER_MAJOR > 20020903)
       #include "mod_ssl.h"
      @@ -35,6 +36,43 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
       #define MAX(x,y) ((x) >= (y) ? (x) : (y))
       #endif
       
      +/*
      + * We do health-checks only if that (sub)module is loaded in. This
      + * allows for us to continue as is w/o requiring mod_watchdog for
      + * those implementations which aren't using health checks
      + */
      +static APR_OPTIONAL_FN_TYPE(set_worker_hc_param) *set_worker_hc_param_f = NULL;
      +
      +/* Externals */
      +proxy_hcmethods_t PROXY_DECLARE_DATA proxy_hcmethods[] = {
      +    {NONE, "NONE", 1},
      +    {TCP, "TCP", 1},
      +    {OPTIONS, "OPTIONS", 1},
      +    {HEAD, "HEAD", 1},
      +    {GET, "GET", 1},
      +    {CPING, "CPING", 0},
      +    {PROVIDER, "PROVIDER", 0},
      +    {EOT, NULL, 1}
      +};
      +
      +proxy_wstat_t PROXY_DECLARE_DATA proxy_wstat_tbl[] = {
      +    {PROXY_WORKER_INITIALIZED,   PROXY_WORKER_INITIALIZED_FLAG,   "Init "},
      +    {PROXY_WORKER_IGNORE_ERRORS, PROXY_WORKER_IGNORE_ERRORS_FLAG, "Ign "},
      +    {PROXY_WORKER_DRAIN,         PROXY_WORKER_DRAIN_FLAG,         "Drn "},
      +    {PROXY_WORKER_GENERIC,       PROXY_WORKER_GENERIC_FLAG,       "Gen "},
      +    {PROXY_WORKER_IN_SHUTDOWN,   PROXY_WORKER_IN_SHUTDOWN_FLAG,   "Shut "},
      +    {PROXY_WORKER_DISABLED,      PROXY_WORKER_DISABLED_FLAG,      "Dis "},
      +    {PROXY_WORKER_STOPPED,       PROXY_WORKER_STOPPED_FLAG,       "Stop "},
      +    {PROXY_WORKER_IN_ERROR,      PROXY_WORKER_IN_ERROR_FLAG,      "Err "},
      +    {PROXY_WORKER_HOT_STANDBY,   PROXY_WORKER_HOT_STANDBY_FLAG,   "Stby "},
      +    {PROXY_WORKER_FREE,          PROXY_WORKER_FREE_FLAG,          "Free "},
      +    {PROXY_WORKER_HC_FAIL,       PROXY_WORKER_HC_FAIL_FLAG,       "HcFl "},
      +    {0x0, '\0', NULL}
      +};
      +
      +static const char * const proxy_id = "proxy";
      +apr_global_mutex_t *proxy_mutex = NULL;
      +
       /*
        * A Web proxy module. Stages:
        *
      @@ -43,7 +81,6 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
        *                  can't trust directory_walk/file_walk since these are
        *                  not in our filesystem.  Prevents mod_http from serving
        *                  the TRACE request we will set aside to handle later.
      - *  type_checker:   set type to PROXY_MAGIC_TYPE if filename begins proxy:
        *  fix_ups:        convert the URL stored in the filename to the
        *                  canonical form.
        *  handler:        handle proxy requests
      @@ -53,6 +90,7 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
       /* Translate the URL into a 'filename' */
       
       static const char *set_worker_param(apr_pool_t *p,
      +                                    server_rec *s,
                                           proxy_worker *worker,
                                           const char *key,
                                           const char *val)
      @@ -62,12 +100,13 @@ static const char *set_worker_param(apr_pool_t *p,
           apr_interval_time_t timeout;
       
           if (!strcasecmp(key, "loadfactor")) {
      -        /* Normalized load factor. Used with BalancerMamber,
      +        /* Normalized load factor. Used with BalancerMember,
                * it is a number between 1 and 100.
                */
      -        worker->s->lbfactor = atoi(val);
      -        if (worker->s->lbfactor < 1 || worker->s->lbfactor > 100)
      +        ival = atoi(val);
      +        if (ival < 1 || ival > 100)
                   return "LoadFactor must be a number between 1..100";
      +        worker->s->lbfactor = ival;
           }
           else if (!strcasecmp(key, "retry")) {
               /* If set it will give the retry timeout for the worker
      @@ -171,18 +210,29 @@ static const char *set_worker_param(apr_pool_t *p,
                   return "DisableReuse must be On|Off";
               worker->s->disablereuse_set = 1;
           }
      +    else if (!strcasecmp(key, "enablereuse")) {
      +        if (!strcasecmp(val, "on"))
      +            worker->s->disablereuse = 0;
      +        else if (!strcasecmp(val, "off"))
      +            worker->s->disablereuse = 1;
      +        else
      +            return "EnableReuse must be On|Off";
      +        worker->s->disablereuse_set = 1;
      +    }
           else if (!strcasecmp(key, "route")) {
               /* Worker route.
                */
      -        if (strlen(val) >= PROXY_WORKER_MAX_ROUTE_SIZE)
      -            return "Route length must be < 64 characters";
      +        if (strlen(val) >= sizeof(worker->s->route))
      +            return apr_psprintf(p, "Route length must be < %d characters",
      +                    (int)sizeof(worker->s->route));
               PROXY_STRNCPY(worker->s->route, val);
           }
           else if (!strcasecmp(key, "redirect")) {
               /* Worker redirection route.
                */
      -        if (strlen(val) >= PROXY_WORKER_MAX_ROUTE_SIZE)
      -            return "Redirect length must be < 64 characters";
      +        if (strlen(val) >= sizeof(worker->s->redirect))
      +            return apr_psprintf(p, "Redirect length must be < %d characters",
      +                    (int)sizeof(worker->s->redirect));
               PROXY_STRNCPY(worker->s->redirect, val);
           }
           else if (!strcasecmp(key, "status")) {
      @@ -253,12 +303,17 @@ static const char *set_worker_param(apr_pool_t *p,
               worker->s->conn_timeout_set = 1;
           }
           else if (!strcasecmp(key, "flusher")) {
      -        if (strlen(val) >= PROXY_WORKER_MAX_SCHEME_SIZE)
      -            return "flusher name length must be < 16 characters";
      +        if (strlen(val) >= sizeof(worker->s->flusher))
      +            apr_psprintf(p, "flusher name length must be < %d characters",
      +                    (int)sizeof(worker->s->flusher));
               PROXY_STRNCPY(worker->s->flusher, val);
           }
           else {
      -        return "unknown Worker parameter";
      +        if (set_worker_hc_param_f) {
      +            return set_worker_hc_param_f(p, s, worker, key, val, NULL);
      +        } else {
      +            return "unknown Worker parameter";
      +        }
           }
           return NULL;
       }
      @@ -277,8 +332,9 @@ static const char *set_balancer_param(proxy_server_conf *conf,
                * Set to something like JSESSIONID or
                * PHPSESSIONID, etc..,
                */
      -        if (strlen(val) > (PROXY_BALANCER_MAX_STICKY_SIZE-1))
      -            return "stickysession length must be < 64 characters";
      +        if (strlen(val) >= sizeof(balancer->s->sticky_path))
      +            apr_psprintf(p, "stickysession length must be < %d characters",
      +                    (int)sizeof(balancer->s->sticky_path));
               PROXY_STRNCPY(balancer->s->sticky_path, val);
               PROXY_STRNCPY(balancer->s->sticky, val);
       
      @@ -287,6 +343,19 @@ static const char *set_balancer_param(proxy_server_conf *conf,
                   PROXY_STRNCPY(balancer->s->sticky_path, path);
               }
           }
      +    else if (!strcasecmp(key, "stickysessionsep")) {
      +        /* separator/delimiter for sessionid and route,
      +         * normally '.'
      +         */
      +        if (strlen(val) != 1) {
      +            if (!strcasecmp(val, "off"))
      +                balancer->s->sticky_separator = 0;
      +            else      
      +                return "stickysessionsep must be a single character or Off";
      +        }
      +        else
      +            balancer->s->sticky_separator = *val;
      +    }
           else if (!strcasecmp(key, "nofailover")) {
               /* If set to 'on' the session will break
                * if the worker is in error state or
      @@ -327,8 +396,12 @@ static const char *set_balancer_param(proxy_server_conf *conf,
               provider = ap_lookup_provider(PROXY_LBMETHOD, val, "0");
               if (provider) {
                   balancer->lbmethod = provider;
      -            PROXY_STRNCPY(balancer->s->lbpname, val);
      -            return NULL;
      +            if (PROXY_STRNCPY(balancer->s->lbpname, val) == APR_SUCCESS) {
      +                return NULL;
      +            }
      +            else {
      +                return "lbmethod name too large";
      +            }
               }
               return "unknown lbmethod";
           }
      @@ -366,17 +439,22 @@ static const char *set_balancer_param(proxy_server_conf *conf,
               }
       
           }
      +    else if (!strcasecmp(key, "failontimeout")) {
      +        if (!strcasecmp(val, "on"))
      +            balancer->failontimeout = 1;
      +        else if (!strcasecmp(val, "off"))
      +            balancer->failontimeout = 0;
      +        else
      +            return "failontimeout must be On|Off";
      +    }
           else if (!strcasecmp(key, "nonce")) {
               if (!strcasecmp(val, "None")) {
                   *balancer->s->nonce = '\0';
               }
               else {
      -            if (strlen(val) > sizeof(balancer->s->nonce)-1) {
      +            if (PROXY_STRNCPY(balancer->s->nonce, val) != APR_SUCCESS) {
                       return "Provided nonce is too large";
                   }
      -            else {
      -                PROXY_STRNCPY(balancer->s->nonce, val);
      -            }
               }
           }
           else if (!strcasecmp(key, "growth")) {
      @@ -385,6 +463,14 @@ static const char *set_balancer_param(proxy_server_conf *conf,
                   return "growth must be between 1 and 100";
               balancer->growth = ival;
           }
      +    else if (!strcasecmp(key, "forcerecovery")) {
      +        if (!strcasecmp(val, "on"))
      +            balancer->s->forcerecovery = 1;
      +        else if (!strcasecmp(val, "off"))
      +            balancer->s->forcerecovery = 0;
      +        else
      +            return "forcerecovery must be On|Off";
      +    }
           else {
               return "unknown Balancer parameter";
           }
      @@ -511,9 +597,9 @@ static const char *proxy_interpolate(request_rec *r, const char *str)
               return str;
           }
           /* OK, this is syntax we want to interpolate.  Is there such a var ? */
      -    var = apr_pstrndup(r->pool, start+2, end-(start+2));
      +    var = apr_pstrmemdup(r->pool, start+2, end-(start+2));
           val = apr_table_get(r->subprocess_env, var);
      -    firstpart = apr_pstrndup(r->pool, str, (start-str));
      +    firstpart = apr_pstrmemdup(r->pool, str, (start-str));
       
           if (val == NULL) {
               return apr_pstrcat(r->pool, firstpart,
      @@ -563,9 +649,18 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
               fake = ent->fake;
               real = ent->real;
           }
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, APLOGNO(03461)
      +                  "attempting to match URI path '%s' against %s '%s' for "
      +                  "proxying", r->uri, (ent->regex ? "pattern" : "prefix"),
      +                  fake);
      +
           if (ent->regex) {
               if (!ap_regexec(ent->regex, r->uri, AP_MAX_REG_MATCH, regm, 0)) {
                   if ((real[0] == '!') && (real[1] == '\0')) {
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03462)
      +                              "proxying is explicitly disabled for URI path "
      +                              "'%s'; declining", r->uri);
                       return DECLINED;
                   }
                   /* test that we haven't reduced the URI */
      @@ -577,7 +672,7 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
                   found = ap_pregsub(r->pool, real, use_uri, AP_MAX_REG_MATCH,
                           (use_uri == r->uri) ? regm : reg1);
                   if (!found) {
      -                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01135)
                                     "Substitution in regular expression failed. "
                                     "Replacement too long?");
                       return HTTP_INTERNAL_SERVER_ERROR;
      @@ -609,6 +704,9 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
       
               if (len != 0) {
                   if ((real[0] == '!') && (real[1] == '\0')) {
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03463)
      +                              "proxying is explicitly disabled for URI path "
      +                              "'%s'; declining", r->uri);
                       return DECLINED;
                   }
                   if (nocanon && len != alias_match(r->unparsed_uri, ent->fake)) {
      @@ -622,7 +720,7 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
               /* We made a reducing transformation, so we can't safely use
                * unparsed_uri.  Safe fallback is to ignore nocanon.
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01136)
                       "Unescaped URL path matched ProxyPass; ignoring unsafe nocanon");
           }
       
      @@ -634,6 +732,14 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
                   /* mod_proxy_http needs to be told.  Different module. */
                   apr_table_setn(r->notes, "proxy-nocanon", "1");
               }
      +        if (ent->flags & PROXYPASS_NOQUERY) {
      +            apr_table_setn(r->notes, "proxy-noquery", "1");
      +        }
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(03464)
      +                      "URI path '%s' matches proxy handler '%s'", r->uri,
      +                      found);
      +
               return OK;
           }
       
      @@ -654,24 +760,40 @@ static int proxy_trans(request_rec *r)
               return OK;
           }
       
      +    if ((r->unparsed_uri[0] == '*' && r->unparsed_uri[1] == '\0')
      +        || !r->uri || r->uri[0] != '/') {
      +        return DECLINED;
      +    }
      +
           /* XXX: since r->uri has been manipulated already we're not really
            * compliant with RFC1945 at this point.  But this probably isn't
            * an issue because this is a hybrid proxy/origin server.
            */
       
           dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      -
      +    conf = (proxy_server_conf *) ap_get_module_config(r->server->module_config,
      +                                                      &proxy_module);
           /* short way - this location is reverse proxied? */
           if (dconf->alias) {
               int rv = ap_proxy_trans_match(r, dconf->alias, dconf);
      +        if (OK == rv) { 
      +            /* Got a hit. Need to make sure it's not explicitly declined */
      +            if (conf->aliases->nelts) {
      +                ent = (struct proxy_alias *) conf->aliases->elts;
      +                for (i = 0; i < conf->aliases->nelts; i++) {
      +                    int rv = ap_proxy_trans_match(r, &ent[i], dconf);
      +                    if (DECLINED == rv) { 
      +                        return DECLINED;
      +                    }
      +                }
      +            }
      +            return OK; 
      +        }
               if (DONE != rv) {
                   return rv;
               }
           }
       
      -    conf
      -            = (proxy_server_conf *) ap_get_module_config(r->server->module_config, &proxy_module);
      -
           /* long way - walk the list of aliases, find a match */
           if (conf->aliases->nelts) {
               ent = (struct proxy_alias *) conf->aliases->elts;
      @@ -699,22 +821,52 @@ static int proxy_walk(request_rec *r)
            */
           const char *proxyname = r->filename + 6;
           int j;
      +    apr_pool_t *rxpool = NULL;
       
           for (j = 0; j < num_sec; ++j)
           {
      +        int nmatch = 0;
      +        int i;
      +        ap_regmatch_t *pmatch = NULL;
      +
               entry_config = sec_proxy[j];
               entry_proxy = ap_get_module_config(entry_config, &proxy_module);
       
      -        /* XXX: What about case insensitive matching ???
      -         * Compare regex, fnmatch or string as appropriate
      -         * If the entry doesn't relate, then continue
      -         */
      -        if (entry_proxy->r
      -              ? ap_regexec(entry_proxy->r, proxyname, 0, NULL, 0)
      -              : (entry_proxy->p_is_fnmatch
      -                   ? apr_fnmatch(entry_proxy->p, proxyname, 0)
      -                   : strncmp(proxyname, entry_proxy->p,
      -                                        strlen(entry_proxy->p)))) {
      +        if (entry_proxy->r) {
      +
      +            if (entry_proxy->refs && entry_proxy->refs->nelts) {
      +                if (!rxpool) {
      +                    apr_pool_create(&rxpool, r->pool);
      +                }
      +                nmatch = entry_proxy->refs->nelts;
      +                pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
      +            }
      +
      +            if (ap_regexec(entry_proxy->r, proxyname, nmatch, pmatch, 0)) {
      +                continue;
      +            }
      +
      +            for (i = 0; i < nmatch; i++) {
      +                if (pmatch[i].rm_so >= 0 && pmatch[i].rm_eo >= 0 &&
      +                        ((const char **)entry_proxy->refs->elts)[i]) {
      +                    apr_table_setn(r->subprocess_env,
      +                            ((const char **)entry_proxy->refs->elts)[i],
      +                            apr_pstrndup(r->pool,
      +                                    proxyname + pmatch[i].rm_so,
      +                                    pmatch[i].rm_eo - pmatch[i].rm_so));
      +                }
      +            }
      +        }
      +
      +        else if (
      +            /* XXX: What about case insensitive matching ???
      +             * Compare regex, fnmatch or string as appropriate
      +             * If the entry doesn't relate, then continue
      +             */
      +            entry_proxy->p_is_fnmatch ? apr_fnmatch(entry_proxy->p,
      +                    proxyname, 0) :
      +                    strncmp(proxyname, entry_proxy->p,
      +                            strlen(entry_proxy->p))) {
                   continue;
               }
               per_dir_defaults = ap_merge_per_dir_configs(r->pool, per_dir_defaults,
      @@ -723,6 +875,10 @@ static int proxy_walk(request_rec *r)
       
           r->per_dir_config = per_dir_defaults;
       
      +    if (rxpool) {
      +        apr_pool_destroy(rxpool);
      +    }
      +
           return OK;
       }
       
      @@ -817,7 +973,7 @@ static int proxy_needsdomain(request_rec *r, const char *url, const char *domain
                                  APR_URI_UNP_REVEALPASSWORD);
       
           apr_table_setn(r->headers_out, "Location", nuri);
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01138)
                         "Domain missing: %s sent to %s%s%s", r->uri,
                         apr_uri_unparse(r->pool, &r->parsed_uri,
                                         APR_URI_UNP_OMITUSERINFO),
      @@ -841,41 +997,60 @@ static int proxy_handler(request_rec *r)
           int i, rc, access_status;
           int direct_connect = 0;
           const char *str;
      -    long maxfwd;
      +    apr_int64_t maxfwd;
           proxy_balancer *balancer = NULL;
           proxy_worker *worker = NULL;
           int attempts = 0, max_attempts = 0;
           struct dirconn_entry *list = (struct dirconn_entry *)conf->dirconn->elts;
      +    int saved_status;
       
           /* is this for us? */
      -    if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
      +    if (!r->filename) {
               return DECLINED;
      +    }
      +
      +    if (!r->proxyreq) {
      +        /* We may have forced the proxy handler via config or .htaccess */
      +        if (r->handler &&
      +            strncmp(r->handler, "proxy:", 6) == 0 &&
      +            strncmp(r->filename, "proxy:", 6) != 0) {
      +            r->proxyreq = PROXYREQ_REVERSE;
      +            r->filename = apr_pstrcat(r->pool, r->handler, r->filename, NULL);
      +        }
      +        else {
      +            return DECLINED;
      +        }
      +    } else if (strncmp(r->filename, "proxy:", 6) != 0) {
      +        return DECLINED;
      +    }
       
           /* handle max-forwards / OPTIONS / TRACE */
           if ((str = apr_table_get(r->headers_in, "Max-Forwards"))) {
      -        maxfwd = strtol(str, NULL, 10);
      -        if (maxfwd < 1) {
      +        char *end;
      +        maxfwd = apr_strtoi64(str, &end, 10);
      +        if (maxfwd < 0 || maxfwd == APR_INT64_MAX || *end) {
      +            return ap_proxyerror(r, HTTP_BAD_REQUEST,
      +                    apr_psprintf(r->pool,
      +                            "Max-Forwards value '%s' could not be parsed", str));
      +        }
      +        else if (maxfwd == 0) {
                   switch (r->method_number) {
                   case M_TRACE: {
                       int access_status;
                       r->proxyreq = PROXYREQ_NONE;
      -                if ((access_status = ap_send_http_trace(r)))
      -                    ap_die(access_status, r);
      -                else
      -                    ap_finalize_request_protocol(r);
      +                access_status = ap_send_http_trace(r);
      +                ap_die(access_status, r);
                       return OK;
                   }
                   case M_OPTIONS: {
                       int access_status;
                       r->proxyreq = PROXYREQ_NONE;
      -                if ((access_status = ap_send_http_options(r)))
      -                    ap_die(access_status, r);
      -                else
      -                    ap_finalize_request_protocol(r);
      +                access_status = ap_send_http_options(r);
      +                ap_die(access_status, r);
                       return OK;
                   }
                   default: {
      -                return ap_proxyerror(r, HTTP_BAD_GATEWAY,
      +                return ap_proxyerror(r, HTTP_BAD_REQUEST,
                                            "Max-Forwards has reached zero - proxy loop?");
                   }
                   }
      @@ -888,7 +1063,7 @@ static int proxy_handler(request_rec *r)
           }
           if (maxfwd >= 0) {
               apr_table_setn(r->headers_in, "Max-Forwards",
      -                       apr_psprintf(r->pool, "%ld", maxfwd));
      +                       apr_psprintf(r->pool, "%" APR_INT64_T_FMT, maxfwd));
           }
       
           if (r->method_number == M_TRACE) {
      @@ -903,8 +1078,8 @@ static int proxy_handler(request_rec *r)
                   apr_table_setn(r->notes, "error-notes",
                                  "TRACE forbidden by server configuration");
                   apr_table_setn(r->notes, "verbose-error-to", "*");
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "proxy: TRACE forbidden by server configuration");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01139)
      +                          "TRACE forbidden by server configuration");
                   return HTTP_METHOD_NOT_ALLOWED;
               }
       
      @@ -921,8 +1096,8 @@ static int proxy_handler(request_rec *r)
                   apr_table_setn(r->notes, "error-notes",
                                  "TRACE with request body is not allowed");
                   apr_table_setn(r->notes, "verbose-error-to", "*");
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "proxy: TRACE with request body is not allowed");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01140)
      +                          "TRACE with request body is not allowed");
                   return HTTP_REQUEST_ENTITY_TOO_LARGE;
               }
           }
      @@ -930,7 +1105,7 @@ static int proxy_handler(request_rec *r)
           uri = r->filename + 6;
           p = strchr(uri, ':');
           if (p == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01141)
                             "proxy_handler no URL in %s", r->filename);
               return HTTP_BAD_REQUEST;
           }
      @@ -942,7 +1117,7 @@ static int proxy_handler(request_rec *r)
                   return HTTP_MOVED_PERMANENTLY;
           }
       
      -    scheme = apr_pstrndup(r->pool, uri, p - uri);
      +    scheme = apr_pstrmemdup(r->pool, uri, p - uri);
           /* Check URI's destination host against NoProxy hosts */
           /* Bypass ProxyRemote server lookup if configured as NoProxy */
           for (direct_connect = i = 0; i < conf->dirconn->nelts &&
      @@ -951,7 +1126,7 @@ static int proxy_handler(request_rec *r)
           }
       #if DEBUGGING
           ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                (direct_connect) ? "NoProxy for %s" : "UseProxy for %s",
      +                (direct_connect) ? APLOGNO(03231) "NoProxy for %s" : APLOGNO(03232) "UseProxy for %s",
                       r->uri);
       #endif
       
      @@ -996,8 +1171,8 @@ static int proxy_handler(request_rec *r)
                                       strlen(ents[i].scheme)) == 0)) {
       
                           /* handle the scheme */
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                 "Trying to run scheme_handler against proxy");
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01142)
      +                                  "Trying to run scheme_handler against proxy");
                           access_status = proxy_run_scheme_handler(r, worker,
                                                                    conf, url,
                                                                    ents[i].hostname,
      @@ -1048,20 +1223,22 @@ static int proxy_handler(request_rec *r)
               */
       
               /* handle the scheme */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "Running scheme %s handler (attempt %d)",
      -                     scheme, attempts);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01143)
      +                      "Running scheme %s handler (attempt %d)",
      +                      scheme, attempts);
               AP_PROXY_RUN(r, worker, conf, url, attempts);
               access_status = proxy_run_scheme_handler(r, worker, conf,
                                                        url, NULL, 0);
      -        if (access_status == OK)
      +        if (access_status == OK
      +                || apr_table_get(r->notes, "proxy-error-override"))
                   break;
               else if (access_status == HTTP_INTERNAL_SERVER_ERROR) {
                   /* Unrecoverable server error.
                    * We can not failover to another worker.
                    * Mark the worker as unusable if member of load balancer
                    */
      -            if (balancer) {
      +            if (balancer
      +                && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
                       worker->s->status |= PROXY_WORKER_IN_ERROR;
                       worker->s->error_time = apr_time_now();
                   }
      @@ -1072,7 +1249,8 @@ static int proxy_handler(request_rec *r)
                    * We can failover to another worker
                    * Mark the worker as unusable if member of load balancer
                    */
      -            if (balancer) {
      +            if (balancer
      +                && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
                       worker->s->status |= PROXY_WORKER_IN_ERROR;
                       worker->s->error_time = apr_time_now();
                   }
      @@ -1090,16 +1268,40 @@ static int proxy_handler(request_rec *r)
                    max_attempts > attempts++);
       
           if (DECLINED == access_status) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                    "proxy: No protocol handler was valid for the URL %s. "
      -                    "If you are using a DSO version of mod_proxy, make sure "
      -                    "the proxy submodules are included in the configuration "
      -                    "using LoadModule.", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01144)
      +                      "No protocol handler was valid for the URL %s. "
      +                      "If you are using a DSO version of mod_proxy, make sure "
      +                      "the proxy submodules are included in the configuration "
      +                      "using LoadModule.", r->uri);
               access_status = HTTP_INTERNAL_SERVER_ERROR;
               goto cleanup;
           }
       cleanup:
      -    ap_proxy_post_request(worker, balancer, r, conf);
      +    /*
      +     * Save current r->status and set it to the value of access_status which
      +     * might be different (e.g. r->status could be HTTP_OK if e.g. we override
      +     * the error page on the proxy or if the error was not generated by the
      +     * backend itself but by the proxy e.g. a bad gateway) in order to give
      +     * ap_proxy_post_request a chance to act correctly on the status code.
      +     * But only do the above if access_status is not OK and not DONE, because
      +     * in this case r->status might contain the true status and overwriting
      +     * it with OK or DONE would be wrong.
      +     */
      +    if ((access_status != OK) && (access_status != DONE)) {
      +        saved_status = r->status;
      +        r->status = access_status;
      +        ap_proxy_post_request(worker, balancer, r, conf);
      +        /*
      +         * Only restore r->status if it has not been changed by
      +         * ap_proxy_post_request as we assume that this change was intentional.
      +         */
      +        if (r->status == access_status) {
      +            r->status = saved_status;
      +        }
      +    }
      +    else {
      +        ap_proxy_post_request(worker, balancer, r, conf);
      +    }
       
           proxy_run_request_status(&access_status, r);
           AP_PROXY_RUN_FINISHED(r, attempts, access_status);
      @@ -1112,7 +1314,6 @@ static int proxy_handler(request_rec *r)
       
       static void * create_proxy_config(apr_pool_t *p, server_rec *s)
       {
      -    unsigned int id;
           proxy_server_conf *ps = apr_pcalloc(p, sizeof(proxy_server_conf));
       
           ps->sec_proxy = apr_array_make(p, 10, sizeof(ap_conf_vector_t *));
      @@ -1125,16 +1326,16 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s)
           ps->forward = NULL;
           ps->reverse = NULL;
           ps->domain = NULL;
      -#if 0
      -    id = ap_proxy_hashfunc(apr_psprintf(p, "%pp-%" APR_TIME_T_FMT, ps, apr_time_now()), PROXY_HASHFUNC_DEFAULT);
      -#else
      -    id = ap_proxy_hashfunc(apr_psprintf(p, "%pp", ps), PROXY_HASHFUNC_DEFAULT);
      -#endif
      -    ps->id = apr_psprintf(p, "s%x", id);
      +    ps->id = apr_psprintf(p, "p%x", 1); /* simply for storage size */
           ps->viaopt = via_off; /* initially backward compatible with 1.3.1 */
           ps->viaopt_set = 0; /* 0 means default */
           ps->req = 0;
           ps->max_balancers = 0;
      +    ps->bal_persist = 0;
      +    ps->inherit = 1;
      +    ps->inherit_set = 0;
      +    ps->ppinherit = 1;
      +    ps->ppinherit_set = 0;
           ps->bgrowth = 5;
           ps->bgrowth_set = 0;
           ps->req_set = 0;
      @@ -1150,7 +1351,7 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s)
           ps->badopt_set = 0;
           ps->source_address = NULL;
           ps->source_address_set = 0;
      -    ps->pool = p;
      +    apr_pool_create_ex(&ps->pool, p, NULL, NULL);
       
           return ps;
       }
      @@ -1161,13 +1362,30 @@ static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
           proxy_server_conf *base = (proxy_server_conf *) basev;
           proxy_server_conf *overrides = (proxy_server_conf *) overridesv;
       
      -    ps->proxies = apr_array_append(p, base->proxies, overrides->proxies);
      +    ps->inherit = (overrides->inherit_set == 0) ? base->inherit : overrides->inherit;
      +    ps->inherit_set = overrides->inherit_set || base->inherit_set;
      +
      +    ps->ppinherit = (overrides->ppinherit_set == 0) ? base->ppinherit : overrides->ppinherit;
      +    ps->ppinherit_set = overrides->ppinherit_set || base->ppinherit_set;
      +
      +    if (ps->ppinherit) {
      +        ps->proxies = apr_array_append(p, base->proxies, overrides->proxies);
      +    }
      +    else {
      +        ps->proxies = overrides->proxies;
      +    }
           ps->sec_proxy = apr_array_append(p, base->sec_proxy, overrides->sec_proxy);
           ps->aliases = apr_array_append(p, base->aliases, overrides->aliases);
           ps->noproxies = apr_array_append(p, base->noproxies, overrides->noproxies);
           ps->dirconn = apr_array_append(p, base->dirconn, overrides->dirconn);
      -    ps->workers = apr_array_append(p, base->workers, overrides->workers);
      -    ps->balancers = apr_array_append(p, base->balancers, overrides->balancers);
      +    if (ps->inherit || ps->ppinherit) {
      +        ps->workers = apr_array_append(p, base->workers, overrides->workers);
      +        ps->balancers = apr_array_append(p, base->balancers, overrides->balancers);
      +    }
      +    else {
      +        ps->workers = overrides->workers;
      +        ps->balancers = overrides->balancers;
      +    }
           ps->forward = overrides->forward ? overrides->forward : base->forward;
           ps->reverse = overrides->reverse ? overrides->reverse : base->reverse;
       
      @@ -1180,6 +1398,7 @@ static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
           ps->bgrowth = (overrides->bgrowth_set == 0) ? base->bgrowth : overrides->bgrowth;
           ps->bgrowth_set = overrides->bgrowth_set || base->bgrowth_set;
           ps->max_balancers = overrides->max_balancers || base->max_balancers;
      +    ps->bal_persist = overrides->bal_persist;
           ps->recv_buffer_size = (overrides->recv_buffer_size_set == 0) ? base->recv_buffer_size : overrides->recv_buffer_size;
           ps->recv_buffer_size_set = overrides->recv_buffer_size_set || base->recv_buffer_size_set;
           ps->io_buffer_size = (overrides->io_buffer_size_set == 0) ? base->io_buffer_size : overrides->io_buffer_size;
      @@ -1194,7 +1413,7 @@ static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
           ps->proxy_status_set = overrides->proxy_status_set || base->proxy_status_set;
           ps->source_address = (overrides->source_address_set == 0) ? base->source_address : overrides->source_address;
           ps->source_address_set = overrides->source_address_set || base->source_address_set;
      -    ps->pool = p;
      +    ps->pool = base->pool;
           return ps;
       }
       static const char *set_source_address(cmd_parms *parms, void *dummy,
      @@ -1246,6 +1465,7 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
           new->p = add->p;
           new->p_is_fnmatch = add->p_is_fnmatch;
           new->r = add->r;
      +    new->refs = add->refs;
       
           /* Put these in the dir config so they work inside <Location> */
           new->raliases = apr_array_append(p, base->raliases, add->raliases);
      @@ -1267,7 +1487,6 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
           return new;
       }
       
      -
       static const char *
           add_proxy(cmd_parms *cmd, void *dummy, const char *f1, const char *r1, int regex)
       {
      @@ -1342,6 +1561,36 @@ static const char *
           return add_proxy(cmd, dummy, f1, r1, 1);
       }
       
      +PROXY_DECLARE(const char *) ap_proxy_de_socketfy(apr_pool_t *p, const char *url)
      +{
      +    const char *ptr;
      +    /*
      +     * We could be passed a URL during the config stage that contains
      +     * the UDS path... ignore it
      +     */
      +    if (!strncasecmp(url, "unix:", 5) &&
      +        ((ptr = ap_strchr_c(url, '|')) != NULL)) {
      +        /* move past the 'unix:...|' UDS path info */
      +        const char *ret, *c;
      +
      +        ret = ptr + 1;
      +        /* special case: "unix:....|scheme:" is OK, expand
      +         * to "unix:....|scheme://localhost"
      +         * */
      +        c = ap_strchr_c(ret, ':');
      +        if (c == NULL) {
      +            return NULL;
      +        }
      +        if (c[1] == '\0') {
      +            return apr_pstrcat(p, ret, "//localhost", NULL);
      +        }
      +        else {
      +            return ret;
      +        }
      +    }
      +    return url;
      +}
      +
       static const char *
           add_pass(cmd_parms *cmd, void *dummy, const char *arg, int is_regex)
       {
      @@ -1387,6 +1636,9 @@ static const char *
               else if (!strcasecmp(word,"interpolate")) {
                   flags |= PROXYPASS_INTERPOLATE;
               }
      +        else if (!strcasecmp(word,"noquery")) {
      +            flags |= PROXYPASS_NOQUERY;
      +        }
               else {
                   char *val = strchr(word, '=');
                   if (!val) {
      @@ -1430,7 +1682,7 @@ static const char *
           }
       
           new->fake = apr_pstrdup(cmd->pool, f);
      -    new->real = apr_pstrdup(cmd->pool, r);
      +    new->real = apr_pstrdup(cmd->pool, ap_proxy_de_socketfy(cmd->pool, r));
           new->flags = flags;
           if (use_regex) {
               new->regex = ap_pregcomp(cmd->pool, f, AP_REG_EXTENDED);
      @@ -1448,21 +1700,38 @@ static const char *
           elts = (const apr_table_entry_t *)arr->elts;
           /* Distinguish the balancer from worker */
           if (ap_proxy_valid_balancer_name(r, 9)) {
      -        proxy_balancer *balancer = ap_proxy_get_balancer(cmd->pool, conf, r);
      +        proxy_balancer *balancer = ap_proxy_get_balancer(cmd->pool, conf, r, 0);
      +        char *fake_copy;
      +
      +        /*
      +         * In the regex case supplying a fake URL doesn't make sense as it
      +         * cannot be parsed anyway with apr_uri_parse later on in
      +         * ap_proxy_define_balancer / ap_proxy_update_balancer
      +         */
      +        if (use_regex) {
      +            fake_copy = NULL;
      +        }
      +        else {
      +            fake_copy = f;
      +        }
               if (!balancer) {
      -            const char *err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, r, 0);
      +            const char *err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, r, fake_copy, 0);
                   if (err)
                       return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
               }
      +        else {
      +            ap_proxy_update_balancer(cmd->pool, balancer, fake_copy);
      +        }
               for (i = 0; i < arr->nelts; i++) {
                   const char *err = set_balancer_param(conf, cmd->pool, balancer, elts[i].key,
                                                        elts[i].val);
                   if (err)
                       return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
               }
      +        new->balancer = balancer;
           }
           else {
      -        proxy_worker *worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, r);
      +        proxy_worker *worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, ap_proxy_de_socketfy(cmd->pool, r));
               int reuse = 0;
               if (!worker) {
                   const char *err = ap_proxy_define_worker(cmd->pool, &worker, NULL, conf, r, 0);
      @@ -1472,18 +1741,18 @@ static const char *
                   PROXY_COPY_CONF_PARAMS(worker, conf);
               } else {
                   reuse = 1;
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server, APLOGNO(01145)
                                "Sharing worker '%s' instead of creating new worker '%s'",
      -                         worker->s->name, new->real);
      +                         ap_proxy_worker_name(cmd->pool, worker), new->real);
               }
       
               for (i = 0; i < arr->nelts; i++) {
                   if (reuse) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(01146)
                                    "Ignoring parameter '%s=%s' for worker '%s' because of worker sharing",
      -                             elts[i].key, elts[i].val, worker->s->name);
      +                             elts[i].key, elts[i].val, ap_proxy_worker_name(cmd->pool, worker));
                   } else {
      -                const char *err = set_worker_param(cmd->pool, worker, elts[i].key,
      +                const char *err = set_worker_param(cmd->pool, s, worker, elts[i].key,
                                                          elts[i].val);
                       if (err)
                           return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
      @@ -1587,6 +1856,7 @@ static const char *
           for (i = 0; i < conf->noproxies->nelts; i++) {
               if (strcasecmp(arg, list[i].name) == 0) { /* ignore case for host names */
                   found = 1;
      +            break;
               }
           }
       
      @@ -1620,8 +1890,10 @@ static const char *
       
           /* Don't duplicate entries */
           for (i = 0; i < conf->dirconn->nelts; i++) {
      -        if (strcasecmp(arg, list[i].name) == 0)
      +        if (strcasecmp(arg, list[i].name) == 0) {
                   found = 1;
      +            break;
      +        }
           }
       
           if (!found) {
      @@ -1629,25 +1901,25 @@ static const char *
               New->name = apr_pstrdup(parms->pool, arg);
               New->hostaddr = NULL;
       
      -    if (ap_proxy_is_ipaddr(New, parms->pool)) {
      +        if (ap_proxy_is_ipaddr(New, parms->pool)) {
       #if DEBUGGING
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                     "Parsed addr %s", inet_ntoa(New->addr));
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                     "Parsed mask %s", inet_ntoa(New->mask));
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03018)
      +                         "Parsed addr %s", inet_ntoa(New->addr));
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03019)
      +                         "Parsed mask %s", inet_ntoa(New->mask));
       #endif
      -    }
      -    else if (ap_proxy_is_domainname(New, parms->pool)) {
      -        ap_str_tolower(New->name);
      +        }
      +        else if (ap_proxy_is_domainname(New, parms->pool)) {
      +            ap_str_tolower(New->name);
       #if DEBUGGING
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                     "Parsed domain %s", New->name);
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03020)
      +                         "Parsed domain %s", New->name);
       #endif
               }
               else if (ap_proxy_is_hostname(New, parms->pool)) {
                   ap_str_tolower(New->name);
       #if DEBUGGING
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03021)
                                "Parsed host %s", New->name);
       #endif
               }
      @@ -1848,6 +2120,35 @@ static const char *set_bgrowth(cmd_parms *parms, void *dummy, const char *arg)
           return NULL;
       }
       
      +static const char *set_persist(cmd_parms *parms, void *dummy, int flag)
      +{
      +    proxy_server_conf *psf =
      +    ap_get_module_config(parms->server->module_config, &proxy_module);
      +
      +    psf->bal_persist = flag;
      +    return NULL;
      +}
      +
      +static const char *set_inherit(cmd_parms *parms, void *dummy, int flag)
      +{
      +    proxy_server_conf *psf =
      +    ap_get_module_config(parms->server->module_config, &proxy_module);
      +
      +    psf->inherit = flag;
      +    psf->inherit_set = 1;
      +    return NULL;
      +}
      +
      +static const char *set_ppinherit(cmd_parms *parms, void *dummy, int flag)
      +{
      +    proxy_server_conf *psf =
      +    ap_get_module_config(parms->server->module_config, &proxy_module);
      +
      +    psf->ppinherit = flag;
      +    psf->ppinherit_set = 1;
      +    return NULL;
      +}
      +
       static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
       {
           server_rec *s = cmd->server;
      @@ -1901,41 +2202,41 @@ static const char *add_member(cmd_parms *cmd, void *dummy, const char *arg)
           ap_str_tolower(path);   /* lowercase scheme://hostname */
       
           /* Try to find the balancer */
      -    balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, path);
      +    balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, path, 0);
           if (!balancer) {
      -        err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, path, 0);
      +        err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, path, "/", 0);
               if (err)
                   return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
           }
       
           /* Try to find existing worker */
      -    worker = ap_proxy_get_worker(cmd->temp_pool, balancer, conf, name);
      +    worker = ap_proxy_get_worker(cmd->temp_pool, balancer, conf, ap_proxy_de_socketfy(cmd->temp_pool, name));
           if (!worker) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01147)
                            "Defining worker '%s' for balancer '%s'",
      -                     name, balancer->name);
      +                     name, balancer->s->name);
               if ((err = ap_proxy_define_worker(cmd->pool, &worker, balancer, conf, name, 0)) != NULL)
                   return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, cmd->server, APLOGNO(01148)
                            "Defined worker '%s' for balancer '%s'",
      -                     worker->s->name, balancer->name);
      +                     ap_proxy_worker_name(cmd->pool, worker), balancer->s->name);
               PROXY_COPY_CONF_PARAMS(worker, conf);
           } else {
               reuse = 1;
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, cmd->server, APLOGNO(01149)
                            "Sharing worker '%s' instead of creating new worker '%s'",
      -                     worker->s->name, name);
      +                     ap_proxy_worker_name(cmd->pool, worker), name);
           }
       
           arr = apr_table_elts(params);
           elts = (const apr_table_entry_t *)arr->elts;
           for (i = 0; i < arr->nelts; i++) {
               if (reuse) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(01150)
                                "Ignoring parameter '%s=%s' for worker '%s' because of worker sharing",
      -                         elts[i].key, elts[i].val, worker->s->name);
      +                         elts[i].key, elts[i].val, ap_proxy_worker_name(cmd->pool, worker));
               } else {
      -            err = set_worker_param(cmd->pool, worker, elts[i].key,
      +            err = set_worker_param(cmd->pool, cmd->server, worker, elts[i].key,
                                                      elts[i].val);
                   if (err)
                       return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
      @@ -1981,10 +2282,10 @@ static const char *
           }
       
           if (ap_proxy_valid_balancer_name(name, 9)) {
      -        balancer = ap_proxy_get_balancer(cmd->pool, conf, name);
      +        balancer = ap_proxy_get_balancer(cmd->pool, conf, name, 0);
               if (!balancer) {
                   if (in_proxy_section) {
      -                err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, name, 0);
      +                err = ap_proxy_define_balancer(cmd->pool, &balancer, conf, name, "/", 0);
                       if (err)
                           return apr_pstrcat(cmd->temp_pool, "ProxySet ",
                                              err, NULL);
      @@ -1995,7 +2296,7 @@ static const char *
               }
           }
           else {
      -        worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, name);
      +        worker = ap_proxy_get_worker(cmd->temp_pool, NULL, conf, ap_proxy_de_socketfy(cmd->temp_pool, name));
               if (!worker) {
                   if (in_proxy_section) {
                       err = ap_proxy_define_worker(cmd->pool, &worker, NULL,
      @@ -2020,7 +2321,7 @@ static const char *
               else
                   *val++ = '\0';
               if (worker)
      -            err = set_worker_param(cmd->pool, worker, word, val);
      +            err = set_worker_param(cmd->pool, cmd->server, worker, word, val);
               else
                   err = set_balancer_param(conf, cmd->pool, balancer, word, val);
       
      @@ -2092,17 +2393,6 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
                   return "Regex could not be compiled";
               }
           }
      -    else if (!strcmp(cmd->path, "~")) {
      -        cmd->path = ap_getword_conf(cmd->pool, &arg);
      -        if (!cmd->path)
      -            return "<Proxy ~ > block must specify a path";
      -        if (strncasecmp(cmd->path, "proxy:", 6))
      -            cmd->path += 6;
      -        r = ap_pregcomp(cmd->pool, cmd->path, AP_REG_EXTENDED);
      -        if (!r) {
      -            return "Regex could not be compiled";
      -        }
      -    }
       
           /* initialize our config and fetch it */
           conf = ap_set_config_vectors(cmd->server, new_dir_conf, cmd->path,
      @@ -2116,6 +2406,11 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
           conf->p = cmd->path;
           conf->p_is_fnmatch = apr_fnmatch_test(conf->p);
       
      +    if (r) {
      +        conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *));
      +        ap_regname(r, conf->refs, AP_REG_MATCH, 1);
      +    }
      +
           ap_add_per_proxy_conf(cmd->server, new_dir_conf);
       
           if (*arg != '\0') {
      @@ -2130,10 +2425,10 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
                                      "> arguments are not supported for non url.",
                                      NULL);
               if (ap_proxy_valid_balancer_name((char *)conf->p, 9)) {
      -            balancer = ap_proxy_get_balancer(cmd->pool, sconf, conf->p);
      +            balancer = ap_proxy_get_balancer(cmd->pool, sconf, conf->p, 0);
                   if (!balancer) {
                       err = ap_proxy_define_balancer(cmd->pool, &balancer,
      -                                               sconf, conf->p, 0);
      +                                               sconf, conf->p, "/", 0);
                       if (err)
                           return apr_pstrcat(cmd->temp_pool, thiscmd->name,
                                              " ", err, NULL);
      @@ -2141,7 +2436,7 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
               }
               else {
                   worker = ap_proxy_get_worker(cmd->temp_pool, NULL, sconf,
      -                                         conf->p);
      +                                         ap_proxy_de_socketfy(cmd->temp_pool, (char*)conf->p));
                   if (!worker) {
                       err = ap_proxy_define_worker(cmd->pool, &worker, NULL,
                                                 sconf, conf->p, 0);
      @@ -2165,7 +2460,7 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg)
                   else
                       *val++ = '\0';
                   if (worker)
      -                err = set_worker_param(cmd->pool, worker, word, val);
      +                err = set_worker_param(cmd->pool, cmd->server, worker, word, val);
                   else
                       err = set_balancer_param(sconf, cmd->pool, balancer,
                                                word, val);
      @@ -2235,6 +2530,14 @@ static const command_rec proxy_cmds[] =
            "A balancer name and scheme with list of params"),
           AP_INIT_TAKE1("BalancerGrowth", set_bgrowth, NULL, RSRC_CONF,
            "Number of additional Balancers that can be added post-config"),
      +    AP_INIT_FLAG("BalancerPersist", set_persist, NULL, RSRC_CONF,
      +     "on if the balancer should persist changes on reboot/restart made via the Balancer Manager"),
      +    AP_INIT_FLAG("BalancerInherit", set_inherit, NULL, RSRC_CONF,
      +     "on if this server should inherit Balancers and Workers defined in the main server "
      +     "(Setting to off recommended if using the Balancer Manager)"),
      +    AP_INIT_FLAG("ProxyPassInherit", set_ppinherit, NULL, RSRC_CONF,
      +     "on if this server should inherit all ProxyPass directives defined in the main server "
      +     "(Setting to off recommended if using the Balancer Manager)"),
           AP_INIT_TAKE1("ProxyStatus", set_status_opt, NULL, RSRC_CONF,
            "Configure Status: proxy status to one of: on | off | full"),
           AP_INIT_RAW_ARGS("ProxySet", set_proxy_param, NULL, RSRC_CONF|ACCESS_CONF,
      @@ -2297,6 +2600,13 @@ PROXY_DECLARE(const char *) ap_proxy_ssl_val(apr_pool_t *p, server_rec *s,
       static int proxy_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                    apr_pool_t *ptemp, server_rec *s)
       {
      +    apr_status_t rv = ap_global_mutex_create(&proxy_mutex, NULL,
      +            proxy_id, NULL, s, pconf, 0);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02478)
      +        "failed to create %s mutex", proxy_id);
      +        return rv;
      +    }
       
           proxy_ssl_enable = APR_RETRIEVE_OPTIONAL_FN(ssl_proxy_enable);
           proxy_ssl_disable = APR_RETRIEVE_OPTIONAL_FN(ssl_engine_disable);
      @@ -2320,77 +2630,103 @@ static int proxy_status_hook(request_rec *r, int flags)
           proxy_balancer *balancer = NULL;
           proxy_worker **worker = NULL;
       
      -    if (flags & AP_STATUS_SHORT || conf->balancers->nelts == 0 ||
      +    if (conf->balancers->nelts == 0 ||
               conf->proxy_status == status_off)
               return OK;
       
           balancer = (proxy_balancer *)conf->balancers->elts;
           for (i = 0; i < conf->balancers->nelts; i++) {
      -        ap_rputs("<hr />\n<h1>Proxy LoadBalancer Status for ", r);
      -        ap_rvputs(r, balancer->name, "</h1>\n\n", NULL);
      -        ap_rputs("\n\n<table border=\"0\"><tr>"
      -                 "<th>SSes</th><th>Timeout</th><th>Method</th>"
      -                 "</tr>\n<tr>", r);
      -        if (*balancer->s->sticky) {
      -            if (strcmp(balancer->s->sticky, balancer->s->sticky_path)) {
      -                ap_rvputs(r, "<td>", balancer->s->sticky, " | ",
      -                          balancer->s->sticky_path, NULL);
      +        if (!(flags & AP_STATUS_SHORT)) {
      +            ap_rputs("<hr />\n<h1>Proxy LoadBalancer Status for ", r);
      +            ap_rvputs(r, balancer->s->name, "</h1>\n\n", NULL);
      +            ap_rputs("\n\n<table border=\"0\"><tr>"
      +                     "<th>SSes</th><th>Timeout</th><th>Method</th>"
      +                     "</tr>\n<tr>", r);
      +            if (*balancer->s->sticky) {
      +                if (strcmp(balancer->s->sticky, balancer->s->sticky_path)) {
      +                    ap_rvputs(r, "<td>", balancer->s->sticky, " | ",
      +                              balancer->s->sticky_path, NULL);
      +                }
      +                else {
      +                    ap_rvputs(r, "<td>", balancer->s->sticky, NULL);
      +                }
                   }
                   else {
      -                ap_rvputs(r, "<td>", balancer->s->sticky, NULL);
      +                ap_rputs("<td> - ", r);
                   }
      +            ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
      +                       apr_time_sec(balancer->s->timeout));
      +            ap_rprintf(r, "<td>%s</td>\n",
      +                       balancer->lbmethod->name);
      +            ap_rputs("</table>\n", r);
      +            ap_rputs("\n\n<table border=\"0\"><tr>"
      +                     "<th>Sch</th><th>Host</th><th>Stat</th>"
      +                     "<th>Route</th><th>Redir</th>"
      +                     "<th>F</th><th>Set</th><th>Acc</th><th>Wr</th><th>Rd</th>"
      +                     "</tr>\n", r);
               }
               else {
      -            ap_rputs("<td> - ", r);
      -        }
      -        ap_rprintf(r, "</td><td>%" APR_TIME_T_FMT "</td>",
      -                   apr_time_sec(balancer->s->timeout));
      -        ap_rprintf(r, "<td>%s</td>\n",
      -                   balancer->lbmethod->name);
      -        ap_rputs("</table>\n", r);
      -        ap_rputs("\n\n<table border=\"0\"><tr>"
      -                 "<th>Sch</th><th>Host</th><th>Stat</th>"
      -                 "<th>Route</th><th>Redir</th>"
      -                 "<th>F</th><th>Set</th><th>Acc</th><th>Wr</th><th>Rd</th>"
      -                 "</tr>\n", r);
      +            ap_rprintf(r, "ProxyBalancer[%d]Name: %s\n", i, balancer->s->name);
      +        }
       
               worker = (proxy_worker **)balancer->workers->elts;
               for (n = 0; n < balancer->workers->nelts; n++) {
                   char fbuf[50];
      -            ap_rvputs(r, "<tr>\n<td>", (*worker)->s->scheme, "</td>", NULL);
      -            ap_rvputs(r, "<td>", (*worker)->s->hostname, "</td><td>", NULL);
      -            ap_rvputs(r, ap_proxy_parse_wstatus(r->pool, *worker), NULL);
      -            ap_rvputs(r, "</td><td>", (*worker)->s->route, NULL);
      -            ap_rvputs(r, "</td><td>", (*worker)->s->redirect, NULL);
      -            ap_rprintf(r, "</td><td>%d</td>", (*worker)->s->lbfactor);
      -            ap_rprintf(r, "<td>%d</td>", (*worker)->s->lbset);
      -            ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>", (*worker)->s->elected);
      -            ap_rputs(apr_strfsize((*worker)->s->transferred, fbuf), r);
      -            ap_rputs("</td><td>", r);
      -            ap_rputs(apr_strfsize((*worker)->s->read, fbuf), r);
      -            ap_rputs("</td>\n", r);
      -
      -            /* TODO: Add the rest of dynamic worker data */
      -            ap_rputs("</tr>\n", r);
      +            if (!(flags & AP_STATUS_SHORT)) {
      +                ap_rvputs(r, "<tr>\n<td>", (*worker)->s->scheme, "</td>", NULL);
      +                ap_rvputs(r, "<td>", (*worker)->s->hostname, "</td><td>", NULL);
      +                ap_rvputs(r, ap_proxy_parse_wstatus(r->pool, *worker), NULL);
      +                ap_rvputs(r, "</td><td>", (*worker)->s->route, NULL);
      +                ap_rvputs(r, "</td><td>", (*worker)->s->redirect, NULL);
      +                ap_rprintf(r, "</td><td>%d</td>", (*worker)->s->lbfactor);
      +                ap_rprintf(r, "<td>%d</td>", (*worker)->s->lbset);
      +                ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td><td>",
      +                           (*worker)->s->elected);
      +                ap_rputs(apr_strfsize((*worker)->s->transferred, fbuf), r);
      +                ap_rputs("</td><td>", r);
      +                ap_rputs(apr_strfsize((*worker)->s->read, fbuf), r);
      +                ap_rputs("</td>\n", r);
      +
      +                /* TODO: Add the rest of dynamic worker data */
      +                ap_rputs("</tr>\n", r);
      +            }
      +            else {
      +                ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Name: %s\n",
      +                           i, n, (*worker)->s->name);
      +                ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Status: %s\n",
      +                           i, n, ap_proxy_parse_wstatus(r->pool, *worker));
      +                ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Elected: %"
      +                              APR_SIZE_T_FMT "\n",
      +                           i, n, (*worker)->s->elected);
      +                ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Sent: %s\n",
      +                           i, n, apr_strfsize((*worker)->s->transferred, fbuf));
      +                ap_rprintf(r, "ProxyBalancer[%d]Worker[%d]Rcvd: %s\n",
      +                           i, n, apr_strfsize((*worker)->s->read, fbuf));
      +                /* TODO: Add the rest of dynamic worker data */
      +            }
       
                   ++worker;
               }
      -        ap_rputs("</table>\n", r);
      +        if (!(flags & AP_STATUS_SHORT)) {
      +            ap_rputs("</table>\n", r);
      +        }
               ++balancer;
           }
      -    ap_rputs("<hr /><table>\n"
      -             "<tr><th>SSes</th><td>Sticky session name</td></tr>\n"
      -             "<tr><th>Timeout</th><td>Balancer Timeout</td></tr>\n"
      -             "<tr><th>Sch</th><td>Connection scheme</td></tr>\n"
      -             "<tr><th>Host</th><td>Backend Hostname</td></tr>\n"
      -             "<tr><th>Stat</th><td>Worker status</td></tr>\n"
      -             "<tr><th>Route</th><td>Session Route</td></tr>\n"
      -             "<tr><th>Redir</th><td>Session Route Redirection</td></tr>\n"
      -             "<tr><th>F</th><td>Load Balancer Factor</td></tr>\n"
      -             "<tr><th>Acc</th><td>Number of uses</td></tr>\n"
      -             "<tr><th>Wr</th><td>Number of bytes transferred</td></tr>\n"
      -             "<tr><th>Rd</th><td>Number of bytes read</td></tr>\n"
      -             "</table>", r);
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rputs("<hr /><table>\n"
      +                 "<tr><th>SSes</th><td>Sticky session name</td></tr>\n"
      +                 "<tr><th>Timeout</th><td>Balancer Timeout</td></tr>\n"
      +                 "<tr><th>Sch</th><td>Connection scheme</td></tr>\n"
      +                 "<tr><th>Host</th><td>Backend Hostname</td></tr>\n"
      +                 "<tr><th>Stat</th><td>Worker status</td></tr>\n"
      +                 "<tr><th>Route</th><td>Session Route</td></tr>\n"
      +                 "<tr><th>Redir</th><td>Session Route Redirection</td></tr>\n"
      +                 "<tr><th>F</th><td>Load Balancer Factor</td></tr>\n"
      +                 "<tr><th>Acc</th><td>Number of uses</td></tr>\n"
      +                 "<tr><th>Wr</th><td>Number of bytes transferred</td></tr>\n"
      +                 "<tr><th>Rd</th><td>Number of bytes read</td></tr>\n"
      +                 "</table>", r);
      +    }
       
           return OK;
       }
      @@ -2399,6 +2735,15 @@ static void child_init(apr_pool_t *p, server_rec *s)
       {
           proxy_worker *reverse = NULL;
       
      +    apr_status_t rv = apr_global_mutex_child_init(&proxy_mutex,
      +                                      apr_global_mutex_lockfile(proxy_mutex),
      +                                      p);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(02479)
      +                     "could not init proxy_mutex in child");
      +        exit(1); /* Ugly, but what else? */
      +    }
      +
           /* TODO */
           while (s) {
               void *sconf = s->module_config;
      @@ -2423,43 +2768,61 @@ static void child_init(apr_pool_t *p, server_rec *s)
                   PROXY_STRNCPY(conf->forward->s->name,     "proxy:forward");
                   PROXY_STRNCPY(conf->forward->s->hostname, "*");
                   PROXY_STRNCPY(conf->forward->s->scheme,   "*");
      -            conf->forward->hash = conf->forward->s->hash =
      +            conf->forward->hash.def = conf->forward->s->hash.def =
                       ap_proxy_hashfunc(conf->forward->s->name, PROXY_HASHFUNC_DEFAULT);
      -             /* Do not disable worker in case of errors */
      +             conf->forward->hash.fnv = conf->forward->s->hash.fnv =
      +                ap_proxy_hashfunc(conf->forward->s->name, PROXY_HASHFUNC_FNV);
      +            /* Do not disable worker in case of errors */
                   conf->forward->s->status |= PROXY_WORKER_IGNORE_ERRORS;
      +            /* Mark as the "generic" worker */
      +            conf->forward->s->status |= PROXY_WORKER_GENERIC;
      +            ap_proxy_initialize_worker(conf->forward, s, conf->pool);
                   /* Disable address cache for generic forward worker */
                   conf->forward->s->is_address_reusable = 0;
      -            ap_proxy_initialize_worker(conf->forward, s, conf->pool);
               }
               if (!reverse) {
                   ap_proxy_define_worker(p, &reverse, NULL, NULL, "http://www.apache.org", 0);
                   PROXY_STRNCPY(reverse->s->name,     "proxy:reverse");
                   PROXY_STRNCPY(reverse->s->hostname, "*");
                   PROXY_STRNCPY(reverse->s->scheme,   "*");
      -            reverse->hash = reverse->s->hash =
      +            reverse->hash.def = reverse->s->hash.def =
                       ap_proxy_hashfunc(reverse->s->name, PROXY_HASHFUNC_DEFAULT);
      +            reverse->hash.fnv = reverse->s->hash.fnv =
      +                ap_proxy_hashfunc(reverse->s->name, PROXY_HASHFUNC_FNV);
                   /* Do not disable worker in case of errors */
                   reverse->s->status |= PROXY_WORKER_IGNORE_ERRORS;
      +            /* Mark as the "generic" worker */
      +            reverse->s->status |= PROXY_WORKER_GENERIC;
      +            conf->reverse = reverse;
      +            ap_proxy_initialize_worker(conf->reverse, s, conf->pool);
                   /* Disable address cache for generic reverse worker */
                   reverse->s->is_address_reusable = 0;
               }
               conf->reverse = reverse;
      -        ap_proxy_initialize_worker(conf->reverse, s, conf->pool);
               s = s->next;
           }
       }
       
       /*
        * This routine is called before the server processes the configuration
      - * files.  There is no return value.
      + * files.
        */
       static int proxy_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
                                   apr_pool_t *ptemp)
       {
      +    apr_status_t rv = ap_mutex_register(pconf, proxy_id, NULL,
      +            APR_LOCK_DEFAULT, 0);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, rv, plog, APLOGNO(02480)
      +                "failed to register %s mutex", proxy_id);
      +        return 500; /* An HTTP status would be a misnomer! */
      +    }
      +
           APR_OPTIONAL_HOOK(ap, status_hook, proxy_status_hook, NULL, NULL,
                             APR_HOOK_MIDDLE);
           /* Reset workers count on gracefull restart */
           proxy_lb_workers = 0;
      +    set_worker_hc_param_f = APR_RETRIEVE_OPTIONAL_FN(set_worker_hc_param);
           return OK;
       }
       static void register_hooks(apr_pool_t *p)
      @@ -2472,8 +2835,8 @@ static void register_hooks(apr_pool_t *p)
            * make sure that we are called after the mpm
            * initializes.
            */
      -    static const char *const aszPred[] = { "mpm_winnt.c", "mod_proxy_balancer.c", NULL};
      -
      +    static const char *const aszPred[] = { "mpm_winnt.c", "mod_proxy_balancer.c",
      +                                           "mod_proxy_hcheck.c", NULL};
           /* handler */
           ap_hook_handler(proxy_handler, NULL, NULL, APR_HOOK_FIRST);
           /* filename-to-URI translation */
      @@ -2491,6 +2854,8 @@ static void register_hooks(apr_pool_t *p)
           /* child init handling */
           ap_hook_child_init(child_init, aszPred, NULL, APR_HOOK_MIDDLE);
       
      +    /* register optional functions within proxy_util.c */
      +    proxy_util_register_hooks(p);
       }
       
       AP_DECLARE_MODULE(proxy) =
      diff --git a/modules/proxy/mod_proxy.dep b/modules/proxy/mod_proxy.dep
      new file mode 100644
      index 00000000000..43d8070365f
      --- /dev/null
      +++ b/modules/proxy/mod_proxy.dep
      @@ -0,0 +1,153 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy.mak
      +
      +.\mod_proxy.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_core.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\generators\mod_status.h"\
      +	"..\ssl\mod_ssl.h"\
      +	".\mod_proxy.h"\
      +	".\proxy_util.h"\
      +	
      +
      +.\proxy_util.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_support.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\mod_proxy.h"\
      +	".\proxy_util.h"\
      +	".\scgi.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
      index a45adf6434d..281a77650c9 100644
      --- a/modules/proxy/mod_proxy.h
      +++ b/modules/proxy/mod_proxy.h
      @@ -27,6 +27,7 @@
        */
       
       #include "apr_hooks.h"
      +#include "apr_optional.h"
       #include "apr.h"
       #include "apr_lib.h"
       #include "apr_strings.h"
      @@ -74,6 +75,22 @@ enum enctype {
           enc_path, enc_search, enc_user, enc_fpath, enc_parm
       };
       
      +typedef enum {
      +    NONE, TCP, OPTIONS, HEAD, GET, CPING, PROVIDER, EOT
      +} hcmethod_t;
      +
      +typedef struct {
      +    hcmethod_t method;
      +    char *name;
      +    int implemented;
      +} proxy_hcmethods_t;
      +
      +typedef struct {
      +    unsigned int bit;
      +    char flag;
      +    const char *name;
      +} proxy_wstat_t;
      +
       #define BALANCER_PREFIX "balancer://"
       
       #if APR_CHARSET_EBCDIC
      @@ -88,6 +105,11 @@ enum enctype {
        */
       #define DEFAULT_MAX_FORWARDS    -1
       
      +typedef struct proxy_balancer  proxy_balancer;
      +typedef struct proxy_worker    proxy_worker;
      +typedef struct proxy_conn_pool proxy_conn_pool;
      +typedef struct proxy_balancer_method proxy_balancer_method;
      +
       /* static information about a remote proxy */
       struct proxy_remote {
           const char *scheme;     /* the schemes handled by this proxy, or '*' */
      @@ -100,11 +122,13 @@ struct proxy_remote {
       
       #define PROXYPASS_NOCANON 0x01
       #define PROXYPASS_INTERPOLATE 0x02
      +#define PROXYPASS_NOQUERY 0x04
       struct proxy_alias {
           const char  *real;
           const char  *fake;
           ap_regex_t  *regex;
           unsigned int flags;
      +    proxy_balancer *balancer; /* only valid for reverse-proxys */
       };
       
       struct dirconn_entry {
      @@ -119,11 +143,6 @@ struct noproxy_entry {
           struct apr_sockaddr_t *addr;
       };
       
      -typedef struct proxy_balancer  proxy_balancer;
      -typedef struct proxy_worker    proxy_worker;
      -typedef struct proxy_conn_pool proxy_conn_pool;
      -typedef struct proxy_balancer_method proxy_balancer_method;
      -
       typedef struct {
           apr_array_header_t *proxies;
           apr_array_header_t *sec_proxy;
      @@ -136,7 +155,7 @@ typedef struct {
           proxy_worker       *reverse;    /* reverse "module-driven" proxy worker */
           const char *domain;     /* domain name to use in absence of a domain name in the request */
           const char *id;
      -    apr_pool_t *pool;       /* Pool used for allocating this struct */
      +    apr_pool_t *pool;       /* Pool used for allocating this struct's elements */
           int req;                /* true if proxy requests are enabled */
           int max_balancers;      /* maximum number of allowed balancers */
           int bgrowth;            /* number of post-config balancers can added */
      @@ -161,8 +180,8 @@ typedef struct {
               status_full
           } proxy_status;             /* Status display options */
           apr_sockaddr_t *source_address;
      -    apr_global_mutex_t  *mutex; /* global lock (needed??) */
      -    ap_slotmem_instance_t *slot;  /* balancers shm data - runtime */
      +    apr_global_mutex_t  *mutex; /* global lock, for pool, etc */
      +    ap_slotmem_instance_t *bslot;  /* balancers shm data - runtime */
           ap_slotmem_provider_t *storage;
       
           unsigned int req_set:1;
      @@ -175,6 +194,11 @@ typedef struct {
           unsigned int proxy_status_set:1;
           unsigned int source_address_set:1;
           unsigned int bgrowth_set:1;
      +    unsigned int bal_persist:1;
      +    unsigned int inherit:1;
      +    unsigned int inherit_set:1;
      +    unsigned int ppinherit:1;
      +    unsigned int ppinherit_set:1;
       } proxy_server_conf;
       
       
      @@ -211,6 +235,10 @@ typedef struct {
           unsigned int error_override_set:1;
           unsigned int alias_set:1;
           unsigned int add_forwarded_headers:1;
      +
      +    /** Named back references */
      +    apr_array_header_t *refs;
      +
       } proxy_dir_conf;
       
       /* if we interpolate env vars per-request, we'll need a per-request
      @@ -241,6 +269,12 @@ typedef struct {
           unsigned int need_flush:1; /* Flag to decide whether we need to flush the
                                       * filter chain or not */
           unsigned int inreslist:1;  /* connection in apr_reslist? */
      +    const char   *uds_path;    /* Unix domain socket path */
      +    const char   *ssl_hostname;/* Hostname (SNI) in use by SSL connection */
      +    apr_bucket_brigade *tmp_bb;/* Temporary brigade created with the connection
      +                                * and its scpool/bucket_alloc (NULL before),
      +                                * must be left cleaned when used (locally).
      +                                */
       } proxy_conn_rec;
       
       typedef struct {
      @@ -256,31 +290,39 @@ struct proxy_conn_pool {
           proxy_conn_rec *conn;   /* Single connection for prefork mpm */
       };
       
      -/* Keep below in sync with proxy_util.c! */
       /* worker status bits */
      +/*
      + * NOTE: Keep up-to-date w/ proxy_wstat_tbl[]
      + * in mod_proxy.c !
      + */
       #define PROXY_WORKER_INITIALIZED    0x0001
       #define PROXY_WORKER_IGNORE_ERRORS  0x0002
       #define PROXY_WORKER_DRAIN          0x0004
      +#define PROXY_WORKER_GENERIC        0x0008
       #define PROXY_WORKER_IN_SHUTDOWN    0x0010
       #define PROXY_WORKER_DISABLED       0x0020
       #define PROXY_WORKER_STOPPED        0x0040
       #define PROXY_WORKER_IN_ERROR       0x0080
       #define PROXY_WORKER_HOT_STANDBY    0x0100
       #define PROXY_WORKER_FREE           0x0200
      +#define PROXY_WORKER_HC_FAIL        0x0400
       
       /* worker status flags */
       #define PROXY_WORKER_INITIALIZED_FLAG    'O'
       #define PROXY_WORKER_IGNORE_ERRORS_FLAG  'I'
       #define PROXY_WORKER_DRAIN_FLAG          'N'
      +#define PROXY_WORKER_GENERIC_FLAG        'G'
       #define PROXY_WORKER_IN_SHUTDOWN_FLAG    'U'
       #define PROXY_WORKER_DISABLED_FLAG       'D'
       #define PROXY_WORKER_STOPPED_FLAG        'S'
       #define PROXY_WORKER_IN_ERROR_FLAG       'E'
       #define PROXY_WORKER_HOT_STANDBY_FLAG    'H'
       #define PROXY_WORKER_FREE_FLAG           'F'
      +#define PROXY_WORKER_HC_FAIL_FLAG        'C'
       
       #define PROXY_WORKER_NOT_USABLE_BITMAP ( PROXY_WORKER_IN_SHUTDOWN | \
      -PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR )
      +PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR | \
      +PROXY_WORKER_HC_FAIL )
       
       /* NOTE: these check the shared status */
       #define PROXY_WORKER_IS_INITIALIZED(f)  ( (f)->s->status &  PROXY_WORKER_INITIALIZED )
      @@ -292,19 +334,33 @@ PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR )
       
       #define PROXY_WORKER_IS_DRAINING(f)   ( (f)->s->status &  PROXY_WORKER_DRAIN )
       
      +#define PROXY_WORKER_IS_GENERIC(f)   ( (f)->s->status &  PROXY_WORKER_GENERIC )
      +
      +#define PROXY_WORKER_IS_HCFAILED(f)   ( (f)->s->status &  PROXY_WORKER_HC_FAIL )
      +
      +#define PROXY_WORKER_IS(f, b)   ( (f)->s->status & (b) )
      +
       /* default worker retry timeout in seconds */
       #define PROXY_WORKER_DEFAULT_RETRY    60
       
       /* Some max char string sizes, for shm fields */
       #define PROXY_WORKER_MAX_SCHEME_SIZE    16
       #define PROXY_WORKER_MAX_ROUTE_SIZE     64
      +#define PROXY_BALANCER_MAX_ROUTE_SIZE PROXY_WORKER_MAX_ROUTE_SIZE
       #define PROXY_WORKER_MAX_NAME_SIZE      96
      +#define PROXY_BALANCER_MAX_NAME_SIZE PROXY_WORKER_MAX_NAME_SIZE
       #define PROXY_WORKER_MAX_HOSTNAME_SIZE  64
      +#define PROXY_BALANCER_MAX_HOSTNAME_SIZE PROXY_WORKER_MAX_HOSTNAME_SIZE
       #define PROXY_BALANCER_MAX_STICKY_SIZE  64
       
      +/* RFC-1035 mentions limits of 255 for host-names and 253 for domain-names,
      + * dotted together(?) this would fit the below size (+ trailing NUL).
      + */
      +#define PROXY_WORKER_RFC1035_NAME_SIZE  512
      +
       #define PROXY_MAX_PROVIDER_NAME_SIZE    16
       
      -#define PROXY_STRNCPY(dst, src) apr_cpystrn((dst), (src), sizeof(dst))
      +#define PROXY_STRNCPY(dst, src) ap_proxy_strncpy((dst), (src), (sizeof(dst)))
       
       #define PROXY_COPY_CONF_PARAMS(w, c) \
       do {                             \
      @@ -316,8 +372,14 @@ do {                             \
       (w)->s->io_buffer_size_set   = (c)->io_buffer_size_set;    \
       } while (0)
       
      +/* use 2 hashes */
      +typedef struct {
      +    unsigned int def;
      +    unsigned int fnv;
      +} proxy_hashes ;
       
      -/* Runtime worker status informations. Shared in scoreboard */
      +/* Runtime worker status information. Shared in scoreboard */
      +/* The addition of member uds_path in 2.4.7 was an incompatible API change. */
       typedef struct {
           char      name[PROXY_WORKER_MAX_NAME_SIZE];
           char      scheme[PROXY_WORKER_MAX_SCHEME_SIZE];   /* scheme to use ajp|http|https */
      @@ -325,6 +387,7 @@ typedef struct {
           char      route[PROXY_WORKER_MAX_ROUTE_SIZE];     /* balancing route */
           char      redirect[PROXY_WORKER_MAX_ROUTE_SIZE];  /* temporary balancing redirection route */
           char      flusher[PROXY_WORKER_MAX_SCHEME_SIZE];  /* flush provider used by mod_proxy_fdpass */
      +    char      uds_path[PROXY_WORKER_MAX_NAME_SIZE];   /* path to worker's unix domain socket if applicable */
           int             lbset;      /* load balancer cluster set */
           int             retries;    /* number of retries on this worker */
           int             lbstatus;   /* Current lbstatus */
      @@ -334,7 +397,7 @@ typedef struct {
           int             hmax;       /* Hard maximum on the total number of connections */
           int             flush_wait; /* poll wait time in microseconds if flush_auto */
           int             index;      /* shm array index */
      -    unsigned int    hash;       /* hash of worker name */
      +    proxy_hashes    hash;       /* hash of worker name */
           unsigned int    status;     /* worker status bitfield */
           enum {
               flush_off,
      @@ -371,13 +434,21 @@ typedef struct {
           unsigned int     keepalive_set:1;
           unsigned int     disablereuse_set:1;
           unsigned int     was_malloced:1;
      +    char      hcuri[PROXY_WORKER_MAX_ROUTE_SIZE];     /* health check uri */
      +    char      hcexpr[PROXY_WORKER_MAX_SCHEME_SIZE];   /* name of condition expr for health check */
      +    int             passes;     /* number of successes for check to pass */
      +    int             pcount;     /* current count of passes */
      +    int             fails;      /* number of failures for check to fail */
      +    int             fcount;     /* current count of failures */
      +    hcmethod_t      method;     /* method to use for health check */
      +    apr_interval_time_t interval;
       } proxy_worker_shared;
       
       #define ALIGNED_PROXY_WORKER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_worker_shared)))
       
       /* Worker configuration */
       struct proxy_worker {
      -    unsigned int    hash;       /* hash of worker name */
      +    proxy_hashes    hash;       /* hash of worker name */
           unsigned int local_status;  /* status of per-process worker */
           proxy_conn_pool     *cp;    /* Connection pool to use */
           proxy_worker_shared   *s;   /* Shared data */
      @@ -386,6 +457,11 @@ struct proxy_worker {
           void            *context;   /* general purpose storage */
       };
       
      +/* default to health check every 30 seconds */
      +#define HCHECK_WATHCHDOG_DEFAULT_INTERVAL (30)
      +/* The watchdog runs every 2 seconds, which is also the minimal check */
      +#define HCHECK_WATHCHDOG_INTERVAL (2)
      +
       /*
        * Time to wait (in microseconds) to find out if more data is currently
        * available at the backend.
      @@ -396,16 +472,25 @@ typedef struct {
           char      sticky_path[PROXY_BALANCER_MAX_STICKY_SIZE];     /* URL sticky session identifier */
           char      sticky[PROXY_BALANCER_MAX_STICKY_SIZE];          /* sticky session identifier */
           char      lbpname[PROXY_MAX_PROVIDER_NAME_SIZE];  /* lbmethod provider name */
      -    char nonce[APR_UUID_FORMATTED_LENGTH + 1];
      +    char      nonce[APR_UUID_FORMATTED_LENGTH + 1];
      +    char      name[PROXY_BALANCER_MAX_NAME_SIZE];
      +    char      sname[PROXY_BALANCER_MAX_NAME_SIZE];
      +    char      vpath[PROXY_BALANCER_MAX_ROUTE_SIZE];
      +    char      vhost[PROXY_BALANCER_MAX_HOSTNAME_SIZE];
           apr_interval_time_t timeout;  /* Timeout for waiting on free connection */
           apr_time_t      wupdated;     /* timestamp of last change to workers list */
           int             max_attempts;     /* Number of attempts before failing */
           int             index;      /* shm array index */
      +    proxy_hashes hash;
           unsigned int    sticky_force:1;   /* Disable failover for sticky sessions */
           unsigned int    scolonsep:1;      /* true if ';' seps sticky session paths */
           unsigned int    max_attempts_set:1;
           unsigned int    was_malloced:1;
           unsigned int    need_reset:1;
      +    unsigned int    vhosted:1;
      +    unsigned int    inactive:1;
      +    unsigned int    forcerecovery:1;
      +    char      sticky_separator;                                /* separator for sessionid/route */
       } proxy_balancer_shared;
       
       #define ALIGNED_PROXY_BALANCER_SHARED_SIZE (APR_ALIGN_DEFAULT(sizeof(proxy_balancer_shared)))
      @@ -413,18 +498,19 @@ typedef struct {
       struct proxy_balancer {
           apr_array_header_t *workers;  /* initially configured workers */
           apr_array_header_t *errstatuses;  /* statuses to force members into error */
      -    ap_slotmem_instance_t *slot;  /* worker shm data - runtime */
      +    ap_slotmem_instance_t *wslot;  /* worker shm data - runtime */
           ap_slotmem_provider_t *storage;
           int growth;                   /* number of post-config workers can added */
           int max_workers;              /* maximum number of allowed workers */
      -    const char *name;             /* name of the load balancer */
      -    const char *sname;            /* filesystem safe balancer name */
      +    proxy_hashes hash;
           apr_time_t      wupdated;    /* timestamp of last change to workers list */
           proxy_balancer_method *lbmethod;
           apr_global_mutex_t  *gmutex; /* global lock for updating list of workers */
           apr_thread_mutex_t  *tmutex; /* Thread lock for updating shm */
      +    proxy_server_conf *sconf;
           void            *context;    /* general purpose storage */
           proxy_balancer_shared *s;    /* Shared data */
      +    int failontimeout;           /* Whether to mark a member in Err if IO timeout occurs */
       };
       
       struct proxy_balancer_method {
      @@ -466,12 +552,25 @@ struct proxy_balancer_method {
       #define PROXY_DECLARE_DATA             __declspec(dllimport)
       #endif
       
      -/**
      - * Hook an optional proxy hook.  Unlike static hooks, this uses a macro
      - * instead of a function.
      +/* Using PROXY_DECLARE_OPTIONAL_HOOK instead of
      + * APR_DECLARE_EXTERNAL_HOOK allows build/make_nw_export.awk
      + * to distinguish between hooks that implement
      + * proxy_hook_xx and proxy_hook_get_xx in mod_proxy.c and
      + * those which don't.
        */
      -#define PROXY_OPTIONAL_HOOK(name,fn,pre,succ,order) \
      -        APR_OPTIONAL_HOOK(proxy,name,fn,pre,succ,order)
      +#define PROXY_DECLARE_OPTIONAL_HOOK APR_DECLARE_EXTERNAL_HOOK
      +
      +/* These 2 are in mod_proxy.c */
      +extern PROXY_DECLARE_DATA proxy_hcmethods_t proxy_hcmethods[];
      +extern PROXY_DECLARE_DATA proxy_wstat_t proxy_wstat_tbl[];
      +
      +/* Following 4 from health check */
      +APR_DECLARE_OPTIONAL_FN(void, hc_show_exprs, (request_rec *));
      +APR_DECLARE_OPTIONAL_FN(void, hc_select_exprs, (request_rec *, const char *));
      +APR_DECLARE_OPTIONAL_FN(int, hc_valid_expr, (request_rec *, const char *));
      +APR_DECLARE_OPTIONAL_FN(const char *, set_worker_hc_param,
      +                        (apr_pool_t *, server_rec *, proxy_worker *,
      +                         const char *, const char *, void *));
       
       APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, scheme_handler, (request_rec *r,
                                 proxy_worker *worker, proxy_server_conf *conf, char *url,
      @@ -485,7 +584,7 @@ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, fixups, (request_rec *r))
       /**
        * pre request hook.
        * It will return the most suitable worker at the moment
      - * and coresponding balancer.
      + * and corresponding balancer.
        * The url is rewritten from balancer://cluster/uri to scheme://host:port/uri
        * and then the scheme_handler is called.
        *
      @@ -512,28 +611,32 @@ APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, request_status,
       
       /* proxy_util.c */
       
      -PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r);
      +PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src,
      +                                             apr_size_t dlen);
       PROXY_DECLARE(int) ap_proxy_hex2c(const char *x);
       PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x);
       PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t,
                                              int forcedec, int proxyreq);
       PROXY_DECLARE(char *)ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp,
                                                  char **passwordp, char **hostp, apr_port_t *port);
      -PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x);
      -PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val);
      -PROXY_DECLARE(int) ap_proxy_hex2sec(const char *x);
      -PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y);
       PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message);
      -PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p);
      -PROXY_DECLARE(int) ap_proxy_is_domainname(struct dirconn_entry *This, apr_pool_t *p);
      -PROXY_DECLARE(int) ap_proxy_is_hostname(struct dirconn_entry *This, apr_pool_t *p);
      -PROXY_DECLARE(int) ap_proxy_is_word(struct dirconn_entry *This, apr_pool_t *p);
       PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf, apr_sockaddr_t *uri_addr);
      +
      +/** Test whether the hostname/address of the request are blocked by the ProxyBlock
      + * configuration.
      + * @param r         request
      + * @param conf      server configuration
      + * @param hostname  hostname from request URI
      + * @param addr      resolved address of hostname, or NULL if not known
      + * @return OK on success, or else an errro
      + */
      +PROXY_DECLARE(int) ap_proxy_checkproxyblock2(request_rec *r, proxy_server_conf *conf, 
      +                                             const char *hostname, apr_sockaddr_t *addr);
      +
       PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r);
      -PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb, char *buff, size_t bufflen, int *eos);
      -PROXY_DECLARE(void) ap_proxy_table_unmerge(apr_pool_t *p, apr_table_t *t, char *key);
       /* DEPRECATED (will be replaced with ap_proxy_connect_backend */
       PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **, const char *, apr_sockaddr_t *, const char *, proxy_server_conf *, request_rec *);
      +/* DEPRECATED (will be replaced with ap_proxy_check_connection */
       PROXY_DECLARE(apr_status_t) ap_proxy_ssl_connection_cleanup(proxy_conn_rec *conn,
                                                                   request_rec *r);
       PROXY_DECLARE(int) ap_proxy_ssl_enable(conn_rec *c);
      @@ -563,6 +666,16 @@ typedef __declspec(dllimport) const char *
       
       
       /* Connection pool API */
      +/**
      + * Return the user-land, UDS aware worker name
      + * @param p        memory pool used for displaying worker name
      + * @param worker   the worker
      + * @return         name
      + */
      +
      +PROXY_DECLARE(char *) ap_proxy_worker_name(apr_pool_t *p,
      +                                           proxy_worker *worker);
      +
       /**
        * Get the worker from proxy configuration
        * @param p        memory pool used for finding worker
      @@ -628,11 +741,24 @@ PROXY_DECLARE(int) ap_proxy_valid_balancer_name(char *name, int i);
        * @param p     memory pool used for temporary storage while finding balancer
        * @param conf  current proxy server configuration
        * @param url   url to find the worker from; must have balancer:// prefix
      + * @param careactive true if we care if the balancer is active or not
        * @return      proxy_balancer or NULL if not found
        */
       PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p,
                                                             proxy_server_conf *conf,
      -                                                      const char *url);
      +                                                      const char *url,
      +                                                      int careactive);
      +
      +/**
      + * Update the balancer's vhost related fields
      + * @param p     memory pool used for temporary storage while finding balancer
      + * @param balancer  balancer to be updated
      + * @param url   url to find vhost info
      + * @return      error string or NULL if OK
      + */
      +PROXY_DECLARE(char *) ap_proxy_update_balancer(apr_pool_t *p,
      +                                               proxy_balancer *balancer,
      +                                               const char *url);
       
       /**
        * Define and Allocate space for the balancer to proxy configuration
      @@ -640,13 +766,15 @@ PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p,
        * @param balancer the new balancer
        * @param conf   current proxy server configuration
        * @param url    url containing balancer name
      + * @param alias  alias/fake-path to this balancer
        * @param do_malloc true if shared struct should be malloced
      - * @return       error message or NULL if successfull
      + * @return       error message or NULL if successful
        */
       PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
                                                      proxy_balancer **balancer,
                                                      proxy_server_conf *conf,
                                                      const char *url,
      +                                               const char *alias,
                                                      int do_malloc);
       
       /**
      @@ -671,6 +799,32 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
                                                                server_rec *s,
                                                                apr_pool_t *p);
       
      +/**
      + * Find the shm of the worker as needed
      + * @param storage slotmem provider
      + * @param slot    slotmem instance
      + * @param worker  worker to find
      + * @param index   pointer to index within slotmem of worker
      + * @return        pointer to shm of worker, or NULL
      + */
      +PROXY_DECLARE(proxy_worker_shared *) ap_proxy_find_workershm(ap_slotmem_provider_t *storage,
      +                                                             ap_slotmem_instance_t *slot,
      +                                                             proxy_worker *worker,
      +                                                             unsigned int *index);
      +
      +/**
      + * Find the shm of the balancer as needed
      + * @param storage  slotmem provider
      + * @param slot     slotmem instance
      + * @param balancer balancer of shm to find
      + * @param index    pointer to index within slotmem of balancer
      + * @return         pointer to shm of balancer, or NULL
      + */
      +PROXY_DECLARE(proxy_balancer_shared *) ap_proxy_find_balancershm(ap_slotmem_provider_t *storage,
      +                                                                 ap_slotmem_instance_t *slot,
      +                                                                 proxy_balancer *balancer,
      +                                                                 unsigned int *index);
      +
       /**
        * Get the most suitable worker and/or balancer for the request
        * @param worker   worker used for processing request
      @@ -713,8 +867,9 @@ PROXY_DECLARE(int) ap_proxy_post_request(proxy_worker *worker,
        * @param url     request url
        * @param proxyname are we connecting directly or via a proxy
        * @param proxyport proxy host port
      - * @param server_portstr Via headers server port
      - * @param server_portstr_size size of the server_portstr buffer
      + * @param server_portstr Via headers server port, must be non-NULL
      + * @param server_portstr_size size of the server_portstr buffer; must
      + * be at least one, even if the protocol doesn't use this
        * @return         OK or HTTP_XXX error
        */
       PROXY_DECLARE(int) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
      @@ -737,9 +892,8 @@ PROXY_DECLARE(int) ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
        * @note The error status of the worker will cleared if the retry interval has
        * elapsed since the last error.
        */
      -PROXY_DECLARE(int) ap_proxy_retry_worker(const char *proxy_function,
      -                                         proxy_worker *worker,
      -                                         server_rec *s);
      +APR_DECLARE_OPTIONAL_FN(int, ap_proxy_retry_worker,
      +        (const char *proxy_function, proxy_worker *worker, server_rec *s));
       
       /**
        * Acquire a connection from worker connection pool
      @@ -767,6 +921,28 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function,
       PROXY_DECLARE(int) ap_proxy_release_connection(const char *proxy_function,
                                                      proxy_conn_rec *conn,
                                                      server_rec *s);
      +
      +#define PROXY_CHECK_CONN_EMPTY (1 << 0)
      +/**
      + * Check a connection to the backend
      + * @param scheme calling proxy scheme (http, ajp, ...)
      + * @param conn   acquired connection
      + * @param server current server record
      + * @param max_blank_lines how many blank lines to consume,
      + *                        or zero for none (considered data)
      + * @param flags  PROXY_CHECK_* bitmask
      + * @return APR_SUCCESS: connection established,
      + *         APR_ENOTEMPTY: connection established with data,
      + *         APR_ENOSOCKET: not connected,
      + *         APR_EINVAL: worker in error state (unusable),
      + *         other: connection closed/aborted (remotely)
      + */
      +PROXY_DECLARE(apr_status_t) ap_proxy_check_connection(const char *scheme,
      +                                                      proxy_conn_rec *conn,
      +                                                      server_rec *server,
      +                                                      unsigned max_blank_lines,
      +                                                      int flags);
      +
       /**
        * Make a connection to the backend
        * @param proxy_function calling proxy scheme (http, ajp, ...)
      @@ -781,6 +957,17 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
                                                   proxy_conn_rec *conn,
                                                   proxy_worker *worker,
                                                   server_rec *s);
      +
      +/**
      + * Make a connection to a Unix Domain Socket (UDS) path
      + * @param sock     UDS to connect
      + * @param uds_path UDS path to connect to
      + * @param p        pool to make the sock addr
      + * @return         APR_SUCCESS or error status
      + */
      +PROXY_DECLARE(apr_status_t) ap_proxy_connect_uds(apr_socket_t *sock,
      +                                                 const char *uds_path,
      +                                                 apr_pool_t *p);
       /**
        * Make a connection record for backend connection
        * @param proxy_function calling proxy scheme (http, ajp, ...)
      @@ -794,6 +981,17 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
       PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
                                                     proxy_conn_rec *conn,
                                                     conn_rec *c, server_rec *s);
      +
      +/**
      + * Determine if proxy connection can potentially be reused at the
      + * end of this request.
      + * @param conn proxy connection
      + * @return non-zero if reusable, 0 otherwise
      + * @note Even if this function returns non-zero, the connection may
      + * be subsequently marked for closure.
      + */
      +PROXY_DECLARE(int) ap_proxy_connection_reusable(proxy_conn_rec *conn);
      +
       /**
        * Signal the upstream chain that the connection to the backend broke in the
        * middle of the response. This is done by sending an error bucket with
      @@ -804,28 +1002,6 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
       PROXY_DECLARE(void) ap_proxy_backend_broke(request_rec *r,
                                                  apr_bucket_brigade *brigade);
       
      -/**
      - * Transform buckets from one bucket allocator to another one by creating a
      - * transient bucket for each data bucket and let it use the data read from
      - * the old bucket. Metabuckets are transformed by just recreating them.
      - * Attention: Currently only the following bucket types are handled:
      - *
      - * All data buckets
      - * FLUSH
      - * EOS
      - *
      - * If an other bucket type is found its type is logged as a debug message
      - * and APR_EGENERAL is returned.
      - * @param r    current request record of client request. Only used for logging
      - *             purposes
      - * @param from the brigade that contains the buckets to transform
      - * @param to   the brigade that will receive the transformed buckets
      - * @return     APR_SUCCESS if all buckets could be transformed APR_EGENERAL
      - *             otherwise
      - */
      -PROXY_DECLARE(apr_status_t) ap_proxy_buckets_lifetime_transform(request_rec *r,
      -                                                                apr_bucket_brigade *from,
      -                                                                apr_bucket_brigade *to);
       /**
        * Return a hash based on the passed string
        * @param str     string to produce hash from
      @@ -880,6 +1056,62 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r,
                                               struct proxy_alias *ent,
                                               proxy_dir_conf *dconf);
       
      +/**
      + * Create a HTTP request header brigade,  old_cl_val and old_te_val as required.
      + * @param p               pool
      + * @param header_brigade  header brigade to use/fill
      + * @param r               request
      + * @param p_conn          proxy connection rec
      + * @param worker          selected worker
      + * @param conf            per-server proxy config
      + * @param uri             uri
      + * @param url             url
      + * @param server_portstr  port as string
      + * @param old_cl_val      stored old content-len val
      + * @param old_te_val      stored old TE val
      + * @return                OK or HTTP_EXPECTATION_FAILED
      + */
      +PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
      +                                           apr_bucket_brigade *header_brigade,
      +                                           request_rec *r,
      +                                           proxy_conn_rec *p_conn,
      +                                           proxy_worker *worker,
      +                                           proxy_server_conf *conf,
      +                                           apr_uri_t *uri,
      +                                           char *url, char *server_portstr,
      +                                           char **old_cl_val,
      +                                           char **old_te_val);
      +
      +/**
      + * @param bucket_alloc  bucket allocator
      + * @param r             request
      + * @param p_conn        proxy connection
      + * @param origin        connection rec of origin
      + * @param  bb           brigade to send to origin
      + * @param  flush        flush
      + * @return              status (OK)
      + */
      +PROXY_DECLARE(int) ap_proxy_pass_brigade(apr_bucket_alloc_t *bucket_alloc,
      +                                         request_rec *r, proxy_conn_rec *p_conn,
      +                                         conn_rec *origin, apr_bucket_brigade *bb,
      +                                         int flush);
      +
      +/**
      + * Clear the headers referenced by the Connection header from the given
      + * table, and remove the Connection header.
      + * @param r request
      + * @param headers table of headers to clear
      + * @return 1 if "close" was present, 0 otherwise.
      + */
      +APR_DECLARE_OPTIONAL_FN(int, ap_proxy_clear_connection,
      +        (request_rec *r, apr_table_t *headers));
      +
      +/**
      + * @param socket        socket to test
      + * @return              TRUE if socket is connected/active
      + */
      +PROXY_DECLARE(int) ap_proxy_is_socket_connected(apr_socket_t *socket);
      +
       #define PROXY_LBMETHOD "proxylbmethod"
       
       /* The number of dynamic workers that can be added when reconfiguring.
      @@ -893,12 +1125,85 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r,
        */
       int ap_proxy_lb_workers(void);
       
      -/* For proxy_util */
      -extern module PROXY_DECLARE_DATA proxy_module;
      +/**
      + * Return the port number of a known scheme (eg: http -> 80).
      + * @param scheme        scheme to test
      + * @return              port number or 0 if unknown
      + */
      +PROXY_DECLARE(apr_port_t) ap_proxy_port_of_scheme(const char *scheme);
      +
      +/**
      + * Return the name of the health check method (eg: "OPTIONS").
      + * @param method        method enum
      + * @return              name of method
      + */
      +PROXY_DECLARE (const char *) ap_proxy_show_hcmethod(hcmethod_t method);
      +
      +/**
      + * Strip a unix domain socket (UDS) prefix from the input URL
      + * @param p             pool to allocate result from
      + * @param url           a URL potentially prefixed with a UDS path
      + * @return              URL with the UDS prefix removed
      + */
      +PROXY_DECLARE(const char *) ap_proxy_de_socketfy(apr_pool_t *p, const char *url);
      +
      +/*
      + * Transform buckets from one bucket allocator to another one by creating a
      + * transient bucket for each data bucket and let it use the data read from
      + * the old bucket. Metabuckets are transformed by just recreating them.
      + * Attention: Currently only the following bucket types are handled:
      + *
      + * All data buckets
      + * FLUSH
      + * EOS
      + *
      + * If an other bucket type is found its type is logged as a debug message
      + * and APR_EGENERAL is returned.
      + *
      + * @param r     request_rec of the actual request. Used for logging purposes
      + * @param from  the bucket brigade to take the buckets from
      + * @param to    the bucket brigade to store the transformed buckets
      + * @return      apr_status_t of the operation. Either APR_SUCCESS or
      + *              APR_EGENERAL
      + */
      +PROXY_DECLARE(apr_status_t) ap_proxy_buckets_lifetime_transform(request_rec *r,
      +                                                      apr_bucket_brigade *from,
      +                                                      apr_bucket_brigade *to);
       
      -extern int PROXY_DECLARE_DATA proxy_lb_workers;
      -extern const apr_strmatch_pattern PROXY_DECLARE_DATA *ap_proxy_strmatch_path;
      -extern const apr_strmatch_pattern PROXY_DECLARE_DATA *ap_proxy_strmatch_domain;
      +/*
      + * Sends all data that can be read non blocking from the input filter chain of
      + * c_i and send it down the output filter chain of c_o. For reading it uses
      + * the bucket brigade bb_i which should be created from the bucket allocator
      + * associated with c_i. For sending through the output filter chain it uses
      + * the bucket brigade bb_o which should be created from the bucket allocator
      + * associated with c_o. In order to get the buckets from bb_i to bb_o
      + * ap_proxy_buckets_lifetime_transform is used.
      + *
      + * @param r     request_rec of the actual request. Used for logging purposes
      + * @param c_i   inbound connection conn_rec
      + * @param c_o   outbound connection conn_rec
      + * @param bb_i  bucket brigade for pulling data from the inbound connection
      + * @param bb_o  bucket brigade for sending data through the outbound connection
      + * @param name  string for logging from where data was pulled
      + * @param sent  if not NULL will be set to 1 if data was sent through c_o
      + * @param bsize maximum amount of data pulled in one iteration from c_i
      + * @param after if set flush data on c_o only once after the loop
      + * @return      apr_status_t of the operation. Could be any error returned from
      + *              either the input filter chain of c_i or the output filter chain
      + *              of c_o. APR_EPIPE if the outgoing connection was aborted.
      + */
      +PROXY_DECLARE(apr_status_t) ap_proxy_transfer_between_connections(
      +                                                       request_rec *r,
      +                                                       conn_rec *c_i,
      +                                                       conn_rec *c_o,
      +                                                       apr_bucket_brigade *bb_i,
      +                                                       apr_bucket_brigade *bb_o,
      +                                                       const char *name,
      +                                                       int *sent,
      +                                                       apr_off_t bsize,
      +                                                       int after);
      +
      +extern module PROXY_DECLARE_DATA proxy_module;
       
       #endif /*MOD_PROXY_H*/
       /** @} */
      diff --git a/modules/proxy/mod_proxy.mak b/modules/proxy/mod_proxy.mak
      new file mode 100644
      index 00000000000..98737d6307c
      --- /dev/null
      +++ b/modules/proxy/mod_proxy.mak
      @@ -0,0 +1,361 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy - Win32 Release" && "$(CFG)" != "mod_proxy - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy.mak" CFG="mod_proxy - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy.obj"
      +	-@erase "$(INTDIR)\mod_proxy.res"
      +	-@erase "$(INTDIR)\mod_proxy_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_src.pdb"
      +	-@erase "$(INTDIR)\proxy_util.obj"
      +	-@erase "$(OUTDIR)\mod_proxy.exp"
      +	-@erase "$(OUTDIR)\mod_proxy.lib"
      +	-@erase "$(OUTDIR)\mod_proxy.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../generators" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "PROXY_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy.so" /d LONG_NAME="proxy_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy.pdb" /debug /out:"$(OUTDIR)\mod_proxy.so" /implib:"$(OUTDIR)\mod_proxy.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy.obj" \
      +	"$(INTDIR)\proxy_util.obj" \
      +	"$(INTDIR)\mod_proxy.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_proxy.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy.so"
      +   if exist .\Release\mod_proxy.so.manifest mt.exe -manifest .\Release\mod_proxy.so.manifest -outputresource:.\Release\mod_proxy.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy.obj"
      +	-@erase "$(INTDIR)\mod_proxy.res"
      +	-@erase "$(INTDIR)\mod_proxy_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_src.pdb"
      +	-@erase "$(INTDIR)\proxy_util.obj"
      +	-@erase "$(OUTDIR)\mod_proxy.exp"
      +	-@erase "$(OUTDIR)\mod_proxy.lib"
      +	-@erase "$(OUTDIR)\mod_proxy.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../ssl" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../generators" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "PROXY_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy.so" /d LONG_NAME="proxy_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy.pdb" /debug /out:"$(OUTDIR)\mod_proxy.so" /implib:"$(OUTDIR)\mod_proxy.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy.obj" \
      +	"$(INTDIR)\proxy_util.obj" \
      +	"$(INTDIR)\mod_proxy.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_proxy.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy.so"
      +   if exist .\Debug\mod_proxy.so.manifest mt.exe -manifest .\Debug\mod_proxy.so.manifest -outputresource:.\Debug\mod_proxy.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy.dep")
      +!INCLUDE "mod_proxy.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy - Win32 Release" || "$(CFG)" == "mod_proxy - Win32 Debug"
      +SOURCE=.\mod_proxy.c
      +
      +"$(INTDIR)\mod_proxy.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\proxy_util.c
      +
      +"$(INTDIR)\proxy_util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy.so" /d LONG_NAME="proxy_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy.so" /d LONG_NAME="proxy_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
      index 3465a97dab7..051724e559d 100644
      --- a/modules/proxy/mod_proxy_ajp.c
      +++ b/modules/proxy/mod_proxy_ajp.c
      @@ -32,7 +32,7 @@ static int proxy_ajp_canon(request_rec *r, char *url)
           char *host, *path, sport[7];
           char *search = NULL;
           const char *err;
      -    apr_port_t port = AJP13_DEF_PORT;
      +    apr_port_t port, def_port;
       
           /* ap_port_of_scheme() */
           if (strncasecmp(url, "ajp:", 4) == 0) {
      @@ -42,17 +42,17 @@ static int proxy_ajp_canon(request_rec *r, char *url)
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -             "proxy: AJP: canonicalising URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
       
           /*
            * do syntactic check.
            * We break the URL into host, port, path, search
            */
      +    port = def_port = ap_proxy_port_of_scheme("ajp");
      +
           err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "error parsing URL %s: %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00867) "error parsing URL %s: %s",
                             url, err);
               return HTTP_BAD_REQUEST;
           }
      @@ -73,7 +73,10 @@ static int proxy_ajp_canon(request_rec *r, char *url)
           if (path == NULL)
               return HTTP_BAD_REQUEST;
       
      -    apr_snprintf(sport, sizeof(sport), ":%d", port);
      +    if (port != def_port)
      +         apr_snprintf(sport, sizeof(sport), ":%d", port);
      +    else
      +         sport[0] = '\0';
       
           if (ap_strchr_c(host, ':')) {
               /* if literal IPv6 address */
      @@ -120,10 +123,7 @@ static apr_off_t get_content_length(request_rec * r)
       {
           apr_off_t len = 0;
       
      -    if (r->clength > 0) {
      -        return r->clength;
      -    }
      -    else if (r->main == NULL) {
      +    if (r->main == NULL) {
               const char *clp = apr_table_get(r->headers_in, "Content-Length");
       
               if (clp) {
      @@ -141,7 +141,7 @@ static apr_off_t get_content_length(request_rec * r)
        * XXX: AJP Auto Flushing
        *
        * When processing CMD_AJP13_SEND_BODY_CHUNK AJP messages we will do a poll
      - * with FLUSH_WAIT miliseconds timeout to determine if more data is currently
      + * with FLUSH_WAIT milliseconds timeout to determine if more data is currently
        * available at the backend. If there is no more data available, we flush
        * the data to the client by adding a flush bucket to the brigade we pass
        * up the filter chain.
      @@ -177,13 +177,13 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
           apr_byte_t conn_reuse = 0;
           const char *tenc;
           int havebody = 1;
      -    int output_failed = 0;
      +    int client_failed = 0;
           int backend_failed = 0;
           apr_off_t bb_len;
           int data_sent = 0;
           int request_ended = 0;
           int headers_sent = 0;
      -    int rv = 0;
      +    int rv = OK;
           apr_int32_t conn_poll_fd;
           apr_pollfd_t *conn_poll;
           proxy_server_conf *psf =
      @@ -209,11 +209,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
           /* send request headers */
           status = ajp_send_header(conn->sock, r, maxsize, uri);
           if (status != APR_SUCCESS) {
      -        conn->close++;
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                     "proxy: AJP: request failed to %pI (%s)",
      -                     conn->worker->cp->addr,
      -                     conn->worker->s->hostname);
      +        conn->close = 1;
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00868)
      +                      "request failed to %pI (%s)",
      +                      conn->worker->cp->addr,
      +                      conn->worker->s->hostname);
               if (status == AJP_EOVERFLOW)
                   return HTTP_BAD_REQUEST;
               else if  (status == AJP_EBAD_METHOD) {
      @@ -236,9 +236,9 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
           status = ajp_alloc_data_msg(r->pool, &buff, &bufsiz, &msg);
           if (status != APR_SUCCESS) {
               /* We had a failure: Close connection to backend */
      -        conn->close++;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: ajp_alloc_data_msg failed");
      +        conn->close = 1;
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00869)
      +                      "ajp_alloc_data_msg failed");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -247,8 +247,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
           tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
           if (tenc && (strcasecmp(tenc, "chunked") == 0)) {
               /* The AJP protocol does not want body data yet */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: request is chunked");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00870) "request is chunked");
           } else {
               /* Get client provided Content-Length header */
               content_length = get_content_length(r);
      @@ -258,48 +257,47 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
       
               if (status != APR_SUCCESS) {
                   /* We had a failure: Close connection to backend */
      -            conn->close++;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "proxy: ap_get_brigade failed");
      +            conn->close = 1;
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00871)
      +                          "ap_get_brigade failed");
                   apr_brigade_destroy(input_brigade);
      -            return HTTP_BAD_REQUEST;
      +            return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
               }
       
               /* have something */
               if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "proxy: APR_BUCKET_IS_EOS");
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00872) "APR_BUCKET_IS_EOS");
               }
       
               /* Try to send something */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: data to read (max %" APR_SIZE_T_FMT
      -                     " at %" APR_SIZE_T_FMT ")", bufsiz, msg->pos);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00873)
      +                      "data to read (max %" APR_SIZE_T_FMT
      +                      " at %" APR_SIZE_T_FMT ")", bufsiz, msg->pos);
       
               status = apr_brigade_flatten(input_brigade, buff, &bufsiz);
               if (status != APR_SUCCESS) {
                   /* We had a failure: Close connection to backend */
      -            conn->close++;
      +            conn->close = 1;
                   apr_brigade_destroy(input_brigade);
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                         "proxy: apr_brigade_flatten");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00874)
      +                          "apr_brigade_flatten");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               apr_brigade_cleanup(input_brigade);
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00875)
      +                      "got %" APR_SIZE_T_FMT " bytes of data", bufsiz);
               if (bufsiz > 0) {
                   status = ajp_send_data_msg(conn->sock, msg, bufsiz);
                   ajp_msg_log(r, msg, "First ajp_send_data_msg: ajp_ilink_send packet dump");
                   if (status != APR_SUCCESS) {
                       /* We had a failure: Close connection to backend */
      -                conn->close++;
      +                conn->close = 1;
                       apr_brigade_destroy(input_brigade);
      -                ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                             "proxy: send failed to %pI (%s)",
      -                             conn->worker->cp->addr,
      -                             conn->worker->s->hostname);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00876)
      +                              "send failed to %pI (%s)",
      +                              conn->worker->cp->addr,
      +                              conn->worker->s->hostname);
                       /*
                        * It is fatal when we failed to send a (part) of the request
                        * body.
      @@ -310,10 +308,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                   send_body = 1;
               }
               else if (content_length > 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                         "proxy: read zero bytes, expecting"
      -                         " %" APR_OFF_T_FMT " bytes",
      -                         content_length);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00877)
      +                          "read zero bytes, expecting"
      +                          " %" APR_OFF_T_FMT " bytes",
      +                          content_length);
                   /*
                    * We can only get here if the client closed the connection
                    * to us without sending the body.
      @@ -323,7 +321,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                    * for later resusage by the next request again.
                    * Close it to clean things up.
                    */
      -            conn->close++;
      +            conn->close = 1;
                   return HTTP_BAD_REQUEST;
               }
           }
      @@ -334,12 +332,12 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                                    (ajp_msg_t **)&(conn->data));
           if (status != APR_SUCCESS) {
               /* We had a failure: Close connection to backend */
      -        conn->close++;
      +        conn->close = 1;
               apr_brigade_destroy(input_brigade);
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                     "proxy: read response failed from %pI (%s)",
      -                     conn->worker->cp->addr,
      -                     conn->worker->s->hostname);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00878)
      +                      "read response failed from %pI (%s)",
      +                      conn->worker->cp->addr,
      +                      conn->worker->s->hostname);
       
               /* If we had a successful cping/cpong and then a timeout
                * we assume it is a request that cause a back-end timeout,
      @@ -360,7 +358,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
               }
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      -    /* parse the reponse */
      +    /* parse the response */
           result = ajp_parse_type(r, conn->data);
           output_brigade = apr_brigade_create(p, r->connection->bucket_alloc);
       
      @@ -383,18 +381,23 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                               /* This is the end */
                               bufsiz = 0;
                               havebody = 0;
      -                        ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
      -                                     "proxy: APR_BUCKET_IS_EOS");
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00879)
      +                                      "APR_BUCKET_IS_EOS");
                           } else {
                               status = ap_get_brigade(r->input_filters, input_brigade,
                                                       AP_MODE_READBYTES,
                                                       APR_BLOCK_READ,
                                                       maxsize - AJP_HEADER_SZ);
                               if (status != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_DEBUG, status,
      -                                         r->server,
      -                                         "ap_get_brigade failed");
      -                            output_failed = 1;
      +                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00880)
      +                                          "ap_get_brigade failed");
      +                            if (APR_STATUS_IS_TIMEUP(status)) {
      +                                rv = HTTP_REQUEST_TIME_OUT;
      +                            }
      +                            else if (status == AP_FILTER_ERROR) {
      +                                rv = AP_FILTER_ERROR;
      +                            }
      +                            client_failed = 1;
                                   break;
                               }
                               bufsiz = maxsize;
      @@ -402,10 +405,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                                                            &bufsiz);
                               apr_brigade_cleanup(input_brigade);
                               if (status != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_DEBUG, status,
      -                                         r->server,
      +                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00881)
                                                "apr_brigade_flatten failed");
      -                            output_failed = 1;
      +                            rv = HTTP_INTERNAL_SERVER_ERROR;
      +                            client_failed = 1;
                                   break;
                               }
                           }
      @@ -415,8 +418,8 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                           status = ajp_send_data_msg(conn->sock, msg, bufsiz);
                           ajp_msg_log(r, msg, "ajp_send_data_msg after CMD_AJP13_GET_BODY_CHUNK: ajp_ilink_send packet dump");
                           if (status != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
      -                                     "ajp_send_data_msg failed");
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00882)
      +                                      "ajp_send_data_msg failed");
                               backend_failed = 1;
                               break;
                           }
      @@ -426,8 +429,8 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                            * something is wrong TC asks for more body but we are
                            * already at the end of the body data
                            */
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                 "ap_proxy_ajp_request error read after end");
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00883)
      +                                  "ap_proxy_ajp_request error read after end");
                           backend_failed = 1;
                       }
                       break;
      @@ -437,8 +440,8 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                            * Backend already send us the headers.
                            */
                           backend_failed = 1;
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                 "proxy: Backend sent headers twice.");
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00884)
      +                                  "Backend sent headers twice.");
                           break;
                       }
                       /* AJP13_SEND_HEADERS: process them */
      @@ -452,9 +455,9 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                           if ((buf = apr_table_get(r->headers_out, wa))) {
                               apr_table_set(r->err_headers_out, wa, buf);
                           } else {
      -                        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                     "ap_proxy_ajp_request: origin server "
      -                                     "sent 401 without WWW-Authenticate header");
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00885)
      +                                      "ap_proxy_ajp_request: origin server "
      +                                      "sent 401 without WWW-Authenticate header");
                           }
                       }
                       headers_sent = 1;
      @@ -476,8 +479,9 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                                       APR_BRIGADE_INSERT_TAIL(output_brigade, e);
                                   }
                                   else {
      -                                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                     "Ignoring flush message received before headers");
      +                                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00886)
      +                                              "Ignoring flush message "
      +                                              "received before headers");
                                   }
                               }
                               else {
      @@ -514,11 +518,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                               if (headers_sent) {
                                   if (ap_pass_brigade(r->output_filters,
                                                       output_brigade) != APR_SUCCESS) {
      -                                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                              "proxy: error processing body.%s",
      +                                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00887)
      +                                              "error processing body.%s",
                                                     r->connection->aborted ?
                                                     " Client aborted connection." : "");
      -                                output_failed = 1;
      +                                client_failed = 1;
                                   }
                                   data_sent = 1;
                                   apr_brigade_cleanup(output_brigade);
      @@ -543,9 +547,9 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                           APR_BRIGADE_INSERT_TAIL(output_brigade, e);
                           if (ap_pass_brigade(r->output_filters,
                                               output_brigade) != APR_SUCCESS) {
      -                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                      "proxy: error processing end");
      -                        output_failed = 1;
      +                        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00888)
      +                                      "error processing end");
      +                        client_failed = 1;
                           }
                           /* XXX: what about flush here? See mod_jk */
                           data_sent = 1;
      @@ -559,23 +563,27 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
       
               /*
                * If connection has been aborted by client: Stop working.
      -         * Nevertheless, we regard our operation so far as a success:
      -         * So reset output_failed to 0 and set result to CMD_AJP13_END_RESPONSE
      -         * But: Close this connection to the backend.
      +         * Pretend we are done (data_sent) to avoid further processing.
                */
               if (r->connection->aborted) {
      -            conn->close++;
      -            output_failed = 0;
      -            result = CMD_AJP13_END_RESPONSE;
      -            request_ended = 1;
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02821)
      +                          "client connection aborted");
      +            /* no response yet (or ever), set status for access log */
      +            if (!headers_sent) {
      +                r->status = HTTP_BAD_REQUEST;
      +            }
      +            client_failed = 1;
      +            /* return DONE */
      +            data_sent = 1;
      +            break;
               }
       
               /*
                * We either have finished successfully or we failed.
                * So bail out
                */
      -        if ((result == CMD_AJP13_END_RESPONSE) || backend_failed
      -            || output_failed)
      +        if ((result == CMD_AJP13_END_RESPONSE)
      +                || backend_failed || client_failed)
                   break;
       
               /* read the response */
      @@ -583,8 +591,8 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                                        (ajp_msg_t **)&(conn->data));
               if (status != APR_SUCCESS) {
                   backend_failed = 1;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, status, r->server,
      -                         "ajp_read_header failed");
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00889)
      +                          "ajp_read_header failed");
                   break;
               }
               result = ajp_parse_type(r, conn->data);
      @@ -597,37 +605,37 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
            */
           apr_brigade_cleanup(output_brigade);
       
      -    if (backend_failed || output_failed) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: Processing of request failed backend: %i, "
      -                     "output: %i", backend_failed, output_failed);
      +    if (backend_failed || client_failed) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00890)
      +                      "Processing of request failed backend: %i, client: %i",
      +                      backend_failed, client_failed);
               /* We had a failure: Close connection to backend */
      -        conn->close++;
      -        /* Return DONE to avoid error messages being added to the stream */
      +        conn->close = 1;
               if (data_sent) {
      +            /* Return DONE to avoid error messages being added to the stream */
                   rv = DONE;
               }
           }
           else if (!request_ended) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: Processing of request didn't terminate cleanly");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00891)
      +                      "Processing of request didn't terminate cleanly");
               /* We had a failure: Close connection to backend */
      -        conn->close++;
      +        conn->close = 1;
               backend_failed = 1;
      -        /* Return DONE to avoid error messages being added to the stream */
               if (data_sent) {
      +            /* Return DONE to avoid error messages being added to the stream */
                   rv = DONE;
               }
           }
           else if (!conn_reuse) {
               /* Our backend signalled connection close */
      -        conn->close++;
      +        conn->close = 1;
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: got response from %pI (%s)",
      -                     conn->worker->cp->addr,
      -                     conn->worker->s->hostname);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00892)
      +                      "got response from %pI (%s)",
      +                      conn->worker->cp->addr,
      +                      conn->worker->s->hostname);
       
               if (conf->error_override && ap_is_HTTP_ERROR(r->status)) {
                   /* clear r->status for override error, otherwise ErrorDocument
      @@ -636,6 +644,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                    */
                   rv = r->status;
                   r->status = HTTP_OK;
      +            /*
      +             * prevent proxy_handler() from treating this as an
      +             * internal error.
      +             */
      +            apr_table_setn(r->notes, "proxy-error-override", "1");
               }
               else {
                   rv = OK;
      @@ -643,10 +656,10 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
           }
       
           if (backend_failed) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                     "proxy: dialog to %pI (%s) failed",
      -                     conn->worker->cp->addr,
      -                     conn->worker->s->hostname);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00893)
      +                      "dialog to %pI (%s) failed",
      +                      conn->worker->cp->addr,
      +                      conn->worker->s->hostname);
               /*
                * If we already send data, signal a broken backend connection
                * upwards in the chain.
      @@ -665,6 +678,15 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                   rv = HTTP_INTERNAL_SERVER_ERROR;
               }
           }
      +    else if (client_failed) {
      +        int level = (r->connection->aborted) ? APLOG_DEBUG : APLOG_ERR;
      +        ap_log_rerror(APLOG_MARK, level, status, r, APLOGNO(02822)
      +                      "dialog with client %pI failed",
      +                      r->connection->client_addr);
      +        if (rv == OK) {
      +            rv = HTTP_BAD_REQUEST;
      +        }
      +    }
       
           /*
            * Ensure that we sent an EOS bucket thru the filter chain, if we already
      @@ -672,19 +694,22 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
            * one to the brigade already (no longer making it empty). So we should
            * not do this in this case.
            */
      -    if (data_sent && !r->eos_sent && APR_BRIGADE_EMPTY(output_brigade)) {
      +    if (data_sent && !r->eos_sent && !r->connection->aborted
      +            && APR_BRIGADE_EMPTY(output_brigade)) {
               e = apr_bucket_eos_create(r->connection->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(output_brigade, e);
           }
       
           /* If we have added something to the brigade above, send it */
      -    if (!APR_BRIGADE_EMPTY(output_brigade))
      -        ap_pass_brigade(r->output_filters, output_brigade);
      +    if (!APR_BRIGADE_EMPTY(output_brigade)
      +        && ap_pass_brigade(r->output_filters, output_brigade) != APR_SUCCESS) {
      +        rv = AP_FILTER_ERROR;
      +    }
       
           apr_brigade_destroy(output_brigade);
       
           if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) {
      -        conn->close++;
      +        conn->close = 1;
           }
       
           return rv;
      @@ -706,32 +731,16 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker,
           int retry;
           proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
                                                        &proxy_module);
      -
      -    /*
      -     * Note: Memory pool allocation.
      -     * A downstream keepalive connection is always connected to the existence
      -     * (or not) of an upstream keepalive connection. If this is not done then
      -     * load balancing against multiple backend servers breaks (one backend
      -     * server ends up taking 100% of the load), and the risk is run of
      -     * downstream keepalive connections being kept open unnecessarily. This
      -     * keeps webservers busy and ties up resources.
      -     *
      -     * As a result, we allocate all sockets out of the upstream connection
      -     * pool, and when we want to reuse a socket, we check first whether the
      -     * connection ID of the current upstream connection is the same as that
      -     * of the connection when the socket was opened.
      -     */
      -    apr_pool_t *p = r->connection->pool;
      -    apr_uri_t *uri = apr_palloc(r->connection->pool, sizeof(*uri));
      -
      +    apr_pool_t *p = r->pool;
      +    apr_uri_t *uri;
       
           if (strncasecmp(url, "ajp:", 4) != 0) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: AJP: declining URL %s", url);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00894) "declining URL %s", url);
               return DECLINED;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: AJP: serving URL %s", url);
      +
      +    uri = apr_palloc(p, sizeof(*uri));
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00895) "serving URL %s", url);
       
           /* create space for state information */
           status = ap_proxy_acquire_connection(scheme, &backend, worker,
      @@ -760,10 +769,13 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker,
                   break;
       
               /* Step Two: Make the Connection */
      -        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                         "proxy: AJP: failed to make connection to backend: %s",
      -                         backend->hostname);
      +        if (ap_proxy_check_connection(scheme, backend, r->server, 0,
      +                                      PROXY_CHECK_CONN_EMPTY)
      +                && ap_proxy_connect_backend(scheme, backend, worker,
      +                                            r->server)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00896)
      +                          "failed to make connection to backend: %s",
      +                          backend->hostname);
                   status = HTTP_SERVICE_UNAVAILABLE;
                   break;
               }
      @@ -779,11 +791,10 @@ static int proxy_ajp_handler(request_rec *r, proxy_worker *worker,
                    * TCP connection gets closed and try it once again.
                    */
                   if (status != APR_SUCCESS) {
      -                backend->close++;
      -                ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                             "proxy: AJP: cping/cpong failed to %pI (%s)",
      -                             worker->cp->addr,
      -                             worker->s->hostname);
      +                backend->close = 1;
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00897)
      +                              "cping/cpong failed to %pI (%s)",
      +                              worker->cp->addr, worker->s->hostname);
                       status = HTTP_SERVICE_UNAVAILABLE;
                       retry++;
                       continue;
      diff --git a/modules/proxy/mod_proxy_ajp.dep b/modules/proxy/mod_proxy_ajp.dep
      new file mode 100644
      index 00000000000..475859a3601
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_ajp.dep
      @@ -0,0 +1,356 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_ajp.mak
      +
      +.\mod_proxy_ajp.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +.\ajp_header.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\ajp_header.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +.\ajp_link.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +.\ajp_msg.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +.\ajp_utils.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ajp.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_ajp.mak b/modules/proxy/mod_proxy_ajp.mak
      new file mode 100644
      index 00000000000..b14a569ae28
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_ajp.mak
      @@ -0,0 +1,416 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_ajp.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_ajp - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_ajp - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_ajp - Win32 Release" && "$(CFG)" != "mod_proxy_ajp - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_ajp.mak" CFG="mod_proxy_ajp - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_ajp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_ajp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_ajp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_ajp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ajp_header.obj"
      +	-@erase "$(INTDIR)\ajp_link.obj"
      +	-@erase "$(INTDIR)\ajp_msg.obj"
      +	-@erase "$(INTDIR)\ajp_utils.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ajp.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ajp.res"
      +	-@erase "$(INTDIR)\mod_proxy_ajp_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_ajp_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_ajp_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_ajp.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_ajp.so" /d LONG_NAME="proxy_ajp_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_ajp.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_ajp.pdb" /debug /out:"$(OUTDIR)\mod_proxy_ajp.so" /implib:"$(OUTDIR)\mod_proxy_ajp.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_ajp.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_ajp.obj" \
      +	"$(INTDIR)\ajp_header.obj" \
      +	"$(INTDIR)\ajp_link.obj" \
      +	"$(INTDIR)\ajp_msg.obj" \
      +	"$(INTDIR)\ajp_utils.obj" \
      +	"$(INTDIR)\mod_proxy_ajp.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_ajp.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_ajp.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_ajp.so"
      +   if exist .\Release\mod_proxy_ajp.so.manifest mt.exe -manifest .\Release\mod_proxy_ajp.so.manifest -outputresource:.\Release\mod_proxy_ajp.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_ajp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_ajp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ajp_header.obj"
      +	-@erase "$(INTDIR)\ajp_link.obj"
      +	-@erase "$(INTDIR)\ajp_msg.obj"
      +	-@erase "$(INTDIR)\ajp_utils.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ajp.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ajp.res"
      +	-@erase "$(INTDIR)\mod_proxy_ajp_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_ajp_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ajp.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_ajp_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_ajp.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_ajp.so" /d LONG_NAME="proxy_ajp_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_ajp.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_ajp.pdb" /debug /out:"$(OUTDIR)\mod_proxy_ajp.so" /implib:"$(OUTDIR)\mod_proxy_ajp.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_ajp.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_ajp.obj" \
      +	"$(INTDIR)\ajp_header.obj" \
      +	"$(INTDIR)\ajp_link.obj" \
      +	"$(INTDIR)\ajp_msg.obj" \
      +	"$(INTDIR)\ajp_utils.obj" \
      +	"$(INTDIR)\mod_proxy_ajp.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_ajp.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_ajp.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_ajp.so"
      +   if exist .\Debug\mod_proxy_ajp.so.manifest mt.exe -manifest .\Debug\mod_proxy_ajp.so.manifest -outputresource:.\Debug\mod_proxy_ajp.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_ajp.dep")
      +!INCLUDE "mod_proxy_ajp.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_ajp.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_ajp - Win32 Release" || "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +SOURCE=.\mod_proxy_ajp.c
      +
      +"$(INTDIR)\mod_proxy_ajp.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ajp_header.c
      +
      +"$(INTDIR)\ajp_header.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ajp_link.c
      +
      +"$(INTDIR)\ajp_link.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ajp_msg.c
      +
      +"$(INTDIR)\ajp_msg.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ajp_utils.c
      +
      +"$(INTDIR)\ajp_utils.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_ajp - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_ajp.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_ajp.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_ajp.so" /d LONG_NAME="proxy_ajp_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ajp - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_ajp.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_ajp.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_ajp.so" /d LONG_NAME="proxy_ajp_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c
      index 8d8f2306728..ec9f103adb4 100644
      --- a/modules/proxy/mod_proxy_balancer.c
      +++ b/modules/proxy/mod_proxy_balancer.c
      @@ -28,6 +28,16 @@ ap_slotmem_provider_t *storage = NULL;
       
       module AP_MODULE_DECLARE_DATA proxy_balancer_module;
       
      +static APR_OPTIONAL_FN_TYPE(set_worker_hc_param) *set_worker_hc_param_f = NULL;
      +
      +static int (*ap_proxy_retry_worker_fn)(const char *proxy_function,
      +        proxy_worker *worker, server_rec *s) = NULL;
      +
      +static APR_OPTIONAL_FN_TYPE(hc_show_exprs) *hc_show_exprs_f = NULL;
      +static APR_OPTIONAL_FN_TYPE(hc_select_exprs) *hc_select_exprs_f = NULL;
      +static APR_OPTIONAL_FN_TYPE(hc_valid_expr) *hc_valid_expr_f = NULL;
      +
      +
       /*
        * Register our mutex type before the config is read so we
        * can adjust the mutex settings using the Mutex directive.
      @@ -43,7 +53,10 @@ static int balancer_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
           if (rv != APR_SUCCESS) {
               return rv;
           }
      -
      +    set_worker_hc_param_f = APR_RETRIEVE_OPTIONAL_FN(set_worker_hc_param);
      +    hc_show_exprs_f = APR_RETRIEVE_OPTIONAL_FN(hc_show_exprs);
      +    hc_select_exprs_f = APR_RETRIEVE_OPTIONAL_FN(hc_select_exprs);
      +    hc_valid_expr_f = APR_RETRIEVE_OPTIONAL_FN(hc_valid_expr);
           return OK;
       }
       
      @@ -67,15 +80,14 @@ static int proxy_balancer_canon(request_rec *r, char *url)
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -             "proxy: BALANCER: canonicalising URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
       
           /* do syntatic check.
            * We break the URL into host, port, path, search
            */
           err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01157)
                             "error parsing URL %s: %s",
                             url, err);
               return HTTP_BAD_REQUEST;
      @@ -96,7 +108,7 @@ static int proxy_balancer_canon(request_rec *r, char *url)
           if (path == NULL)
               return HTTP_BAD_REQUEST;
       
      -    r->filename = apr_pstrcat(r->pool, "proxy:", BALANCER_PREFIX, host,
      +    r->filename = apr_pstrcat(r->pool, "proxy:" BALANCER_PREFIX, host,
                   "/", path, (search) ? "?" : "", (search) ? search : "", NULL);
       
           r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
      @@ -115,8 +127,9 @@ static void init_balancer_members(apr_pool_t *p, server_rec *s,
           for (i = 0; i < balancer->workers->nelts; i++) {
               int worker_is_initialized;
               proxy_worker *worker = *workers;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "Looking at %s -> %s initialized?", balancer->name, worker->s->name);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01158)
      +                     "Looking at %s -> %s initialized?", balancer->s->name,
      +                     ap_proxy_worker_name(p, worker));
               worker_is_initialized = PROXY_WORKER_IS_INITIALIZED(worker);
               if (!worker_is_initialized) {
                   ap_proxy_initialize_worker(worker, s, p);
      @@ -199,7 +212,8 @@ static char *get_cookie_param(request_rec *r, const char *name)
       /* Find the worker that has the 'route' defined
        */
       static proxy_worker *find_route_worker(proxy_balancer *balancer,
      -                                       const char *route, request_rec *r)
      +                                       const char *route, request_rec *r,
      +                                       int recursion)
       {
           int i;
           int checking_standby;
      @@ -215,7 +229,7 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer,
                   if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(worker) : PROXY_WORKER_IS_STANDBY(worker)) )
                       continue;
                   if (*(worker->s->route) && strcmp(worker->s->route, route) == 0) {
      -                if (worker && PROXY_WORKER_IS_USABLE(worker)) {
      +                if (PROXY_WORKER_IS_USABLE(worker)) {
                           return worker;
                       } else {
                           /*
      @@ -225,7 +239,7 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer,
                            * The worker might still be unusable, but we try
                            * anyway.
                            */
      -                    ap_proxy_retry_worker("BALANCER", worker, r->server);
      +                    ap_proxy_retry_worker_fn("BALANCER", worker, r->server);
                           if (PROXY_WORKER_IS_USABLE(worker)) {
                                   return worker;
                           } else {
      @@ -236,10 +250,15 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer,
                                * This enables to safely remove the member from the
                                * balancer. Of course you will need some kind of
                                * session replication between those two remote.
      +                         * Also check that we haven't gone thru all the
      +                         * balancer members by means of redirects.
      +                         * This should avoid redirect cycles.
                                */
      -                        if (*worker->s->redirect) {
      +                        if ((*worker->s->redirect)
      +                            && (recursion < balancer->workers->nelts)) {
                                   proxy_worker *rworker = NULL;
      -                            rworker = find_route_worker(balancer, worker->s->redirect, r);
      +                            rworker = find_route_worker(balancer, worker->s->redirect,
      +                                                        r, recursion + 1);
                                   /* Check if the redirect worker is usable */
                                   if (rworker && !PROXY_WORKER_IS_USABLE(rworker)) {
                                       /*
      @@ -249,7 +268,7 @@ static proxy_worker *find_route_worker(proxy_balancer *balancer,
                                        * The worker might still be unusable, but we try
                                        * anyway.
                                        */
      -                                ap_proxy_retry_worker("BALANCER", rworker, r->server);
      +                                ap_proxy_retry_worker_fn("BALANCER", rworker, r->server);
                                   }
                                   if (rworker && PROXY_WORKER_IS_USABLE(rworker))
                                       return rworker;
      @@ -276,42 +295,42 @@ static proxy_worker *find_session_route(proxy_balancer *balancer,
           /* Try to find the sticky route inside url */
           *route = get_path_param(r->pool, *url, balancer->s->sticky_path, balancer->s->scolonsep);
           if (*route) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: BALANCER: Found value %s for "
      -                     "stickysession %s", *route, balancer->s->sticky_path);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01159)
      +                     "Found value %s for stickysession %s",
      +                     *route, balancer->s->sticky_path);
               *sticky_used =  balancer->s->sticky_path;
           }
           else {
               *route = get_cookie_param(r, balancer->s->sticky);
               if (*route) {
                   *sticky_used =  balancer->s->sticky;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "proxy: BALANCER: Found value %s for "
      -                         "stickysession %s", *route, balancer->s->sticky);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01160)
      +                         "Found value %s for stickysession %s",
      +                         *route, balancer->s->sticky);
               }
           }
           /*
      -     * If we found a value for sticksession, find the first '.' within.
      -     * Everything after '.' (if present) is our route.
      +     * If we found a value for stickysession, find the first '.' (or whatever
      +     * sticky_separator is set to) within. Everything after '.' (if present)
      +     * is our route. 
            */
      -    if ((*route) && ((*route = strchr(*route, '.')) != NULL ))
      +    if ((*route) && (balancer->s->sticky_separator != 0) && ((*route = strchr(*route, balancer->s->sticky_separator)) != NULL ))
               (*route)++;
           if ((*route) && (**route)) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                                  "proxy: BALANCER: Found route %s", *route);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01161) "Found route %s", *route);
               /* We have a route in path or in cookie
                * Find the worker that has this route defined.
                */
      -        worker = find_route_worker(balancer, *route, r);
      +        worker = find_route_worker(balancer, *route, r, 1);
               if (worker && strcmp(*route, worker->s->route)) {
                   /*
                    * Notice that the route of the worker chosen is different from
                    * the route supplied by the client.
                    */
                   apr_table_setn(r->subprocess_env, "BALANCER_ROUTE_CHANGED", "1");
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "proxy: BALANCER: Route changed from %s to %s",
      -                         *route, worker->s->route);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01162)
      +                          "Route changed from %s to %s",
      +                          *route, worker->s->route);
               }
               return worker;
           }
      @@ -326,8 +345,9 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
           apr_status_t rv;
       
           if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -        "proxy: BALANCER: (%s). Lock failed for find_best_worker()", balancer->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01163)
      +                      "%s: Lock failed for find_best_worker()",
      +                      balancer->s->name);
               return NULL;
           }
       
      @@ -337,8 +357,9 @@ static proxy_worker *find_best_worker(proxy_balancer *balancer,
               candidate->s->elected++;
       
           if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -        "proxy: BALANCER: (%s). Unlock failed for find_best_worker()", balancer->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01164)
      +                      "%s: Unlock failed for find_best_worker()",
      +                      balancer->s->name);
           }
       
           if (candidate == NULL) {
      @@ -413,27 +434,38 @@ static void force_recovery(proxy_balancer *balancer, server_rec *s)
               }
               else {
                   /* Try if we can recover */
      -            ap_proxy_retry_worker("BALANCER", *worker, s);
      +            ap_proxy_retry_worker_fn("BALANCER", *worker, s);
                   if (!((*worker)->s->status & PROXY_WORKER_IN_ERROR)) {
                       ok = 1;
                       break;
                   }
               }
           }
      -    if (!ok) {
      +    if (!ok && balancer->s->forcerecovery) {
               /* If all workers are in error state force the recovery.
                */
               worker = (proxy_worker **)balancer->workers->elts;
               for (i = 0; i < balancer->workers->nelts; i++, worker++) {
                   ++(*worker)->s->retries;
                   (*worker)->s->status &= ~PROXY_WORKER_IN_ERROR;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                         "proxy: BALANCER: (%s). Forcing recovery for worker (%s)",
      -                         balancer->name, (*worker)->s->hostname);
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01165)
      +                         "%s: Forcing recovery for worker (%s)",
      +                         balancer->s->name, (*worker)->s->hostname);
               }
           }
       }
       
      +static apr_status_t decrement_busy_count(void *worker_)
      +{
      +    proxy_worker *worker = worker_;
      +    
      +    if (worker->s->busy) {
      +        worker->s->busy--;
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
       static int proxy_balancer_pre_request(proxy_worker **worker,
                                             proxy_balancer **balancer,
                                             request_rec *r,
      @@ -452,16 +484,15 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
            * for balancer, because this is failover attempt.
            */
           if (!*balancer &&
      -        !(*balancer = ap_proxy_get_balancer(r->pool, conf, *url)))
      +        !(*balancer = ap_proxy_get_balancer(r->pool, conf, *url, 1)))
               return DECLINED;
       
           /* Step 2: Lock the LoadBalancer
            * XXX: perhaps we need the process lock here
            */
           if ((rv = PROXY_THREAD_LOCK(*balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                     "proxy: BALANCER: (%s). Lock failed for pre_request",
      -                     (*balancer)->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01166)
      +                      "%s: Lock failed for pre_request", (*balancer)->s->name);
               return DECLINED;
           }
       
      @@ -521,34 +552,34 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
                   workers++;
               }
               if (member_of) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                         "proxy: BALANCER: (%s). All workers are in error state for route (%s)",
      -                         (*balancer)->name, route);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01167)
      +                          "%s: All workers are in error state for route (%s)",
      +                          (*balancer)->s->name, route);
                   if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                             "proxy: BALANCER: (%s). Unlock failed for pre_request",
      -                             (*balancer)->name);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01168)
      +                              "%s: Unlock failed for pre_request",
      +                              (*balancer)->s->name);
                   }
                   return HTTP_SERVICE_UNAVAILABLE;
               }
           }
       
           if ((rv = PROXY_THREAD_UNLOCK(*balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                     "proxy: BALANCER: (%s). Unlock failed for pre_request",
      -                     (*balancer)->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01169)
      +                      "%s: Unlock failed for pre_request",
      +                      (*balancer)->s->name);
           }
           if (!*worker) {
               runtime = find_best_worker(*balancer, r);
               if (!runtime) {
                   if ((*balancer)->workers->nelts) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                            "proxy: BALANCER: (%s). All workers are in error state",
      -                            (*balancer)->name);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01170)
      +                              "%s: All workers are in error state",
      +                              (*balancer)->s->name);
                   } else {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                            "proxy: BALANCER: (%s). No workers in balancer",
      -                            (*balancer)->name);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01171)
      +                              "%s: No workers in balancer",
      +                              (*balancer)->s->name);
                   }
       
                   return HTTP_SERVICE_UNAVAILABLE;
      @@ -568,10 +599,12 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
           }
       
           (*worker)->s->busy++;
      +    apr_pool_cleanup_register(r->pool, *worker, decrement_busy_count,
      +                              apr_pool_cleanup_null);
       
           /* Add balancer/worker info to env. */
           apr_table_setn(r->subprocess_env,
      -                   "BALANCER_NAME", (*balancer)->name);
      +                   "BALANCER_NAME", (*balancer)->s->name);
           apr_table_setn(r->subprocess_env,
                          "BALANCER_WORKER_NAME", (*worker)->s->name);
           apr_table_setn(r->subprocess_env,
      @@ -594,9 +627,9 @@ static int proxy_balancer_pre_request(proxy_worker **worker,
               apr_table_setn(r->subprocess_env,
                              "BALANCER_SESSION_ROUTE", route);
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: BALANCER (%s) worker (%s) rewritten to %s",
      -                 (*balancer)->name, (*worker)->s->name, *url);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01172)
      +                  "%s: worker (%s) rewritten to %s",
      +                  (*balancer)->s->name, (*worker)->s->name, *url);
       
           return access_status;
       }
      @@ -610,20 +643,24 @@ static int proxy_balancer_post_request(proxy_worker *worker,
           apr_status_t rv;
       
           if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -            "proxy: BALANCER: (%s). Lock failed for post_request",
      -            balancer->name);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01173)
      +                      "%s: Lock failed for post_request",
      +                      balancer->s->name);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      -    if (!apr_is_empty_array(balancer->errstatuses)) {
      +    if (!apr_is_empty_array(balancer->errstatuses)
      +        && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
               int i;
               for (i = 0; i < balancer->errstatuses->nelts; i++) {
                   int val = ((int *)balancer->errstatuses->elts)[i];
                   if (r->status == val) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                             "proxy: BALANCER: (%s).  Forcing recovery for worker (%s), failonstatus %d",
      -                             balancer->name, worker->s->name, val);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01174)
      +                              "%s: Forcing worker (%s) into error state "
      +                              "due to status code %d matching 'failonstatus' "
      +                              "balancer parameter",
      +                              balancer->s->name, ap_proxy_worker_name(r->pool, worker),
      +                              val);
                       worker->s->status |= PROXY_WORKER_IN_ERROR;
                       worker->s->error_time = apr_time_now();
                       break;
      @@ -631,19 +668,26 @@ static int proxy_balancer_post_request(proxy_worker *worker,
               }
           }
       
      -    if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -            "proxy: BALANCER: (%s). Unlock failed for post_request",
      -            balancer->name);
      +    if (balancer->failontimeout
      +        && !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
      +        && (apr_table_get(r->notes, "proxy_timedout")) != NULL) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02460)
      +                      "%s: Forcing worker (%s) into error state "
      +                      "due to timeout and 'failontimeout' parameter being set",
      +                       balancer->s->name, ap_proxy_worker_name(r->pool, worker));
      +        worker->s->status |= PROXY_WORKER_IN_ERROR;
      +        worker->s->error_time = apr_time_now();
      +
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_balancer_post_request for (%s)", balancer->name);
       
      -    if (worker && worker->s->busy)
      -        worker->s->busy--;
      +    if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01175)
      +                      "%s: Unlock failed for post_request", balancer->s->name);
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01176)
      +                  "proxy_balancer_post_request for (%s)", balancer->s->name);
       
           return OK;
      -
       }
       
       static void recalc_factors(proxy_balancer *balancer)
      @@ -690,24 +734,35 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                apr_pool_t *ptemp, server_rec *s)
       {
           apr_status_t rv;
      -    void *sconf = s->module_config;
      -    proxy_server_conf *conf = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
      +    proxy_server_conf *conf;
           ap_slotmem_instance_t *new = NULL;
           apr_time_t tstamp;
       
           /* balancer_post_config() will be called twice during startup.  So, don't
            * set up the static data the 1st time through. */
      -    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
      +    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
               return OK;
      +    }
      +
      +    if (!ap_proxy_retry_worker_fn) {
      +        ap_proxy_retry_worker_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_retry_worker);
      +        if (!ap_proxy_retry_worker_fn) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02230)
      +                         "mod_proxy must be loaded for mod_proxy_balancer");
      +            return !OK;
      +        }
      +    }
       
           /*
            * Get slotmem setups
            */
      -    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shared",
      +    storage = ap_lookup_provider(AP_SLOTMEM_PROVIDER_GROUP, "shm",
                                        AP_SLOTMEM_PROVIDER_VERSION);
           if (!storage) {
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s,
      -                     "ap_lookup_provider %s failed: is mod_slotmem_shm loaded??",
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01177)
      +                     "Failed to lookup provider 'shm' for '%s': is "
      +                     "mod_slotmem_shm loaded??",
                            AP_SLOTMEM_PROVIDER_GROUP);
               return !OK;
           }
      @@ -719,24 +774,50 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
            */
           while (s) {
               int i,j;
      +        char *id;
               proxy_balancer *balancer;
      -        sconf = s->module_config;
      +        ap_slotmem_type_t type;
      +        void *sconf = s->module_config;
               conf = (proxy_server_conf *)ap_get_module_config(sconf, &proxy_module);
      -
      +        /*
      +         * During create_proxy_config() we created a dummy id. Now that
      +         * we have identifying info, we can create the real id
      +         */
      +        id = apr_psprintf(pconf, "%s.%s.%d.%s.%s.%u.%s",
      +                          (s->server_scheme ? s->server_scheme : "????"),
      +                          (s->server_hostname ? s->server_hostname : "???"),
      +                          (int)s->port,
      +                          (s->server_admin ? s->server_admin : "??"),
      +                          (s->defn_name ? s->defn_name : "?"),
      +                          s->defn_line_number,
      +                          (s->error_fname ? s->error_fname : DEFAULT_ERRORLOG));
      +        conf->id = apr_psprintf(pconf, "p%x",
      +                                ap_proxy_hashfunc(id, PROXY_HASHFUNC_DEFAULT));
      +        if (conf->bslot) {
      +            /* Shared memory already created for this proxy_server_conf.
      +             */
      +            s = s->next;
      +            continue;
      +        }
      +        if (conf->bal_persist) {
      +            type = AP_SLOTMEM_TYPE_PERSIST;
      +        } else {
      +            type = 0;
      +        }
               if (conf->balancers->nelts) {
                   conf->max_balancers = conf->balancers->nelts + conf->bgrowth;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Doing balancers create: %d, %d (%d)",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01178) "Doing balancers create: %d, %d (%d)",
                                (int)ALIGNED_PROXY_BALANCER_SHARED_SIZE,
                                (int)conf->balancers->nelts, conf->max_balancers);
       
                   rv = storage->create(&new, conf->id,
                                        ALIGNED_PROXY_BALANCER_SHARED_SIZE,
      -                                 conf->max_balancers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
      +                                 conf->max_balancers, type, pconf);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_create failed");
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01179) "balancer slotmem_create failed");
                       return !OK;
                   }
      -            conf->slot = new;
      +            conf->bslot = new;
               }
               conf->storage = storage;
       
      @@ -746,21 +827,24 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                   proxy_worker **workers;
                   proxy_worker *worker;
                   proxy_balancer_shared *bshm;
      +            const char *sname;
                   unsigned int index;
       
      +            /* now that we have the right id, we need to redo the sname field */
      +            ap_pstr2_alnum(pconf, balancer->s->name + sizeof(BALANCER_PREFIX) - 1,
      +                           &sname);
      +            sname = apr_pstrcat(pconf, conf->id, "_", sname, NULL);
      +            PROXY_STRNCPY(balancer->s->sname, sname); /* We know this will succeed */
      +
                   balancer->max_workers = balancer->workers->nelts + balancer->growth;
      -            /* no need for the 'balancer://' prefix */
      -            ap_pstr2_alnum(pconf, balancer->name + sizeof(BALANCER_PREFIX) - 1,
      -                           &balancer->sname);
      -            balancer->sname = apr_pstrcat(pconf, conf->id, "_", balancer->sname, NULL);
       
                   /* Create global mutex */
                   rv = ap_global_mutex_create(&(balancer->gmutex), NULL, balancer_mutex_type,
      -                                        balancer->sname, s, pconf, 0);
      +                                        balancer->s->sname, s, pconf, 0);
                   if (rv != APR_SUCCESS || !balancer->gmutex) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01180)
                                    "mutex creation of %s : %s failed", balancer_mutex_type,
      -                             balancer->sname);
      +                             balancer->s->sname);
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
       
      @@ -768,34 +852,42 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                             apr_pool_cleanup_null);
       
                   /* setup shm for balancers */
      -            if ((rv = storage->grab(conf->slot, &index)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_grab failed");
      -                return !OK;
      -
      +            bshm = ap_proxy_find_balancershm(storage, conf->bslot, balancer, &index);
      +            if (bshm) {
      +                if ((rv = storage->fgrab(conf->bslot, index)) != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(02408) "balancer slotmem_fgrab failed");
      +                    return !OK;
      +                }
                   }
      -            if ((rv = storage->dptr(conf->slot, index, (void *)&bshm)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "balancer slotmem_dptr failed");
      -                return !OK;
      +            else {
      +                if ((rv = storage->grab(conf->bslot, &index)) != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01181) "balancer slotmem_grab failed");
      +                    return !OK;
      +                }
      +                if ((rv = storage->dptr(conf->bslot, index, (void *)&bshm)) != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01182) "balancer slotmem_dptr failed");
      +                    return !OK;
      +                }
                   }
                   if ((rv = ap_proxy_share_balancer(balancer, bshm, index)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot share balancer");
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01183) "Cannot share balancer");
                       return !OK;
                   }
       
                   /* create slotmem slots for workers */
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "Doing workers create: %s (%s), %d, %d",
      -                         balancer->name, balancer->sname,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01184) "Doing workers create: %s (%s), %d, %d [%u]",
      +                         balancer->s->name, balancer->s->sname,
                                (int)ALIGNED_PROXY_WORKER_SHARED_SIZE,
      -                         (int)balancer->max_workers);
      +                         (int)balancer->max_workers, i);
       
      -            rv = storage->create(&new, balancer->sname,
      +            rv = storage->create(&new, balancer->s->sname,
                                        ALIGNED_PROXY_WORKER_SHARED_SIZE,
      -                                 balancer->max_workers, AP_SLOTMEM_TYPE_PREGRAB, pconf);
      +                                 balancer->max_workers, type, pconf);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_create failed");
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01185) "worker slotmem_create failed");
                       return !OK;
                   }
      -            balancer->slot = new;
      +            balancer->wslot = new;
                   balancer->storage = storage;
       
                   /* sync all timestamps */
      @@ -807,21 +899,36 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                       proxy_worker_shared *shm;
       
                       worker = *workers;
      -                if ((rv = storage->grab(balancer->slot, &index)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_grab failed");
      -                    return !OK;
       
      +                shm = ap_proxy_find_workershm(storage, balancer->wslot, worker, &index);
      +                if (shm) {
      +                    if ((rv = storage->fgrab(balancer->wslot, index)) != APR_SUCCESS) {
      +                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(02409) "worker slotmem_fgrab failed");
      +                        return !OK;
      +                    }
                       }
      -                if ((rv = storage->dptr(balancer->slot, index, (void *)&shm)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_dptr failed");
      -                    return !OK;
      +                else {
      +                    if ((rv = storage->grab(balancer->wslot, &index)) != APR_SUCCESS) {
      +                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01186) "worker slotmem_grab failed");
      +                        return !OK;
      +
      +                    }
      +                    if ((rv = storage->dptr(balancer->wslot, index, (void *)&shm)) != APR_SUCCESS) {
      +                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01187) "worker slotmem_dptr failed");
      +                        return !OK;
      +                    }
                       }
                       if ((rv = ap_proxy_share_worker(worker, shm, index)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot share worker");
      +                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(01188) "Cannot share worker");
                           return !OK;
                       }
                       worker->s->updated = tstamp;
                   }
      +            if (conf->bal_persist) {
      +                /* We could have just read-in a persisted config. Force a sync. */
      +                balancer->wupdated--;
      +                ap_proxy_sync_balancer(balancer, s, conf);
      +            }
               }
               s = s->next;
           }
      @@ -831,10 +938,10 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
       
       static void create_radio(const char *name, unsigned int flag, request_rec *r)
       {
      -    ap_rvputs(r, "<td>On <input name='", name, "' id='", name, "' value='1' type=radio", NULL);
      +    ap_rvputs(r, "<td><label for='", name, "1'>On</label> <input name='", name, "' id='", name, "1' value='1' type=radio", NULL);
           if (flag)
               ap_rputs(" checked", r);
      -    ap_rvputs(r, "> <br/> Off <input name='", name, "' id='", name, "' value='0' type=radio", NULL);
      +    ap_rvputs(r, "> <br/> <label for='", name, "0'>Off</label> <input name='", name, "' id='", name, "0' value='0' type=radio", NULL);
           if (!flag)
               ap_rputs(" checked", r);
           ap_rputs("></td>\n", r);
      @@ -867,9 +974,9 @@ static void push2table(const char *input, apr_table_t *params,
                   apr_table_set(params, key, val);
               }
               else {
      -            const char *ok = *allowed;
      -            while (ok) {
      -                if (strcmp(ok, key) == 0) {
      +            const char **ok = allowed;
      +            while (*ok) {
      +                if (strcmp(*ok, key) == 0) {
                           apr_table_set(params, key, val);
                           break;
                       }
      @@ -921,21 +1028,21 @@ static int balancer_handler(request_rec *r)
           balancer = (proxy_balancer *)conf->balancers->elts;
           for (i = 0; i < conf->balancers->nelts; i++, balancer++) {
               if ((rv = PROXY_THREAD_LOCK(balancer)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                         "proxy: BALANCER: (%s). Lock failed for balancer_handler",
      -                         balancer->name);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01189)
      +                          "%s: Lock failed for balancer_handler",
      +                          balancer->s->name);
               }
               ap_proxy_sync_balancer(balancer, r->server, conf);
               if ((rv = PROXY_THREAD_UNLOCK(balancer)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                         "proxy: BALANCER: (%s). Unlock failed for balancer_handler",
      -                         balancer->name);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01190)
      +                          "%s: Unlock failed for balancer_handler",
      +                          balancer->s->name);
               }
           }
       
           if (r->args && (r->method_number == M_GET)) {
      -        const char *allowed[] = { "w", "b", "nonce", NULL };
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "parsing r->args");
      +        const char *allowed[] = { "w", "b", "nonce", "xml", NULL };
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01191) "parsing r->args");
       
               push2table(r->args, params, allowed, r->pool);
           }
      @@ -948,7 +1055,7 @@ static int balancer_handler(request_rec *r)
               rv = ap_get_brigade(r->input_filters, ib, AP_MODE_READBYTES,
                                       APR_BLOCK_READ, len);
               if (rv != APR_SUCCESS) {
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
               }
               apr_brigade_flatten(ib, buf, &len);
               buf[len] = '\0';
      @@ -956,7 +1063,7 @@ static int balancer_handler(request_rec *r)
           }
           if ((name = apr_table_get(params, "b")))
               bsel = ap_proxy_get_balancer(r->pool, conf,
      -            apr_pstrcat(r->pool, BALANCER_PREFIX, name, NULL));
      +            apr_pstrcat(r->pool, BALANCER_PREFIX, name, NULL), 0);
       
           if ((name = apr_table_get(params, "w"))) {
               wsel = ap_proxy_get_worker(r->pool, bsel, conf, name);
      @@ -982,7 +1089,7 @@ static int balancer_handler(request_rec *r)
               const char *val;
               int was_usable = PROXY_WORKER_IS_USABLE(wsel);
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings worker params");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01192) "settings worker params");
       
               if ((val = apr_table_get(params, "w_lf"))) {
                   int ival = atoi(val);
      @@ -1004,17 +1111,27 @@ static int balancer_handler(request_rec *r)
                   else
                       *wsel->s->redirect = '\0';
               }
      +        /*
      +         * TODO: Look for all 'w_status_#' keys and then loop thru
      +         * on that # character, since the character == the flag
      +         */
               if ((val = apr_table_get(params, "w_status_I"))) {
      -            ap_proxy_set_wstatus('I', atoi(val), wsel);
      +            ap_proxy_set_wstatus(PROXY_WORKER_IGNORE_ERRORS_FLAG, atoi(val), wsel);
               }
               if ((val = apr_table_get(params, "w_status_N"))) {
      -            ap_proxy_set_wstatus('N', atoi(val), wsel);
      +            ap_proxy_set_wstatus(PROXY_WORKER_DRAIN_FLAG, atoi(val), wsel);
               }
               if ((val = apr_table_get(params, "w_status_D"))) {
      -            ap_proxy_set_wstatus('D', atoi(val), wsel);
      +            ap_proxy_set_wstatus(PROXY_WORKER_DISABLED_FLAG, atoi(val), wsel);
               }
               if ((val = apr_table_get(params, "w_status_H"))) {
      -            ap_proxy_set_wstatus('H', atoi(val), wsel);
      +            ap_proxy_set_wstatus(PROXY_WORKER_HOT_STANDBY_FLAG, atoi(val), wsel);
      +        }
      +        if ((val = apr_table_get(params, "w_status_S"))) {
      +            ap_proxy_set_wstatus(PROXY_WORKER_STOPPED_FLAG, atoi(val), wsel);
      +        }
      +        if ((val = apr_table_get(params, "w_status_C"))) {
      +            ap_proxy_set_wstatus(PROXY_WORKER_HC_FAIL_FLAG, atoi(val), wsel);
               }
               if ((val = apr_table_get(params, "w_ls"))) {
                   int ival = atoi(val);
      @@ -1022,6 +1139,47 @@ static int balancer_handler(request_rec *r)
                       wsel->s->lbset = ival;
                    }
               }
      +        if ((val = apr_table_get(params, "w_hi"))) {
      +            int ival = atoi(val);
      +            if (ival >= HCHECK_WATHCHDOG_INTERVAL) {
      +                wsel->s->interval = apr_time_from_sec(ival);
      +             }
      +        }
      +        if ((val = apr_table_get(params, "w_hp"))) {
      +            int ival = atoi(val);
      +            if (ival >= 1) {
      +                wsel->s->passes = ival;
      +             }
      +        }
      +        if ((val = apr_table_get(params, "w_hf"))) {
      +            int ival = atoi(val);
      +            if (ival >= 1) {
      +                wsel->s->fails = ival;
      +             }
      +        }
      +        if ((val = apr_table_get(params, "w_hm"))) {
      +            proxy_hcmethods_t *method = proxy_hcmethods;
      +            for (; method->name; method++) {
      +                if (!strcasecmp(method->name, val) && method->implemented)
      +                    wsel->s->method = method->method;
      +            }
      +        }
      +        if ((val = apr_table_get(params, "w_hu"))) {
      +            if (strlen(val) && strlen(val) < sizeof(wsel->s->hcuri))
      +                strcpy(wsel->s->hcuri, val);
      +            else
      +                *wsel->s->hcuri = '\0';
      +        }
      +        if (hc_valid_expr_f && (val = apr_table_get(params, "w_he"))) {
      +            if (strlen(val) && hc_valid_expr_f(r, val) && strlen(val) < sizeof(wsel->s->hcexpr))
      +                strcpy(wsel->s->hcexpr, val);
      +            else
      +                *wsel->s->hcexpr = '\0';
      +        }
      +        /* If the health check method doesn't support an expr, then null it */
      +        if (wsel->s->method == NONE || wsel->s->method == TCP) {
      +            *wsel->s->hcexpr = '\0';
      +        }
               /* if enabling, we need to reset all lb params */
               if (bsel && !was_usable && PROXY_WORKER_IS_USABLE(wsel)) {
                   bsel->s->need_reset = 1;
      @@ -1032,7 +1190,8 @@ static int balancer_handler(request_rec *r)
           if (bsel && ok2change) {
               const char *val;
               int ival;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "settings balancer params");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01193)
      +                      "settings balancer params");
               if ((val = apr_table_get(params, "b_lbm"))) {
                   if ((strlen(val) < (sizeof(bsel->s->lbpname)-1)) &&
                       strcmp(val, bsel->s->lbpname)) {
      @@ -1083,63 +1242,67 @@ static int balancer_handler(request_rec *r)
                   (val = apr_table_get(params, "b_nwrkr"))) {
                   char *ret;
                   proxy_worker *nworker;
      -            nworker = ap_proxy_get_worker(conf->pool, bsel, conf, val);
      -            if (!nworker && storage->num_free_slots(bsel->slot)) {
      +            nworker = ap_proxy_get_worker(r->pool, bsel, conf, val);
      +            if (!nworker && storage->num_free_slots(bsel->wslot)) {
                       if ((rv = PROXY_GLOBAL_LOCK(bsel)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                 "proxy: BALANCER: (%s). Lock failed for adding worker",
      -                                 bsel->name);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01194)
      +                                  "%s: Lock failed for adding worker",
      +                                  bsel->s->name);
                       }
                       ret = ap_proxy_define_worker(conf->pool, &nworker, bsel, conf, val, 0);
                       if (!ret) {
                           unsigned int index;
                           proxy_worker_shared *shm;
                           PROXY_COPY_CONF_PARAMS(nworker, conf);
      -                    if ((rv = storage->grab(bsel->slot, &index)) != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "worker slotmem_grab failed");
      +                    if ((rv = storage->grab(bsel->wslot, &index)) != APR_SUCCESS) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01195)
      +                                      "worker slotmem_grab failed");
                               if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                         "proxy: BALANCER: (%s). Unlock failed for adding worker",
      -                                         bsel->name);
      +                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01196)
      +                                          "%s: Unlock failed for adding worker",
      +                                          bsel->s->name);
                               }
                               return HTTP_BAD_REQUEST;
                           }
      -                    if ((rv = storage->dptr(bsel->slot, index, (void *)&shm)) != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "worker slotmem_dptr failed");
      +                    if ((rv = storage->dptr(bsel->wslot, index, (void *)&shm)) != APR_SUCCESS) {
      +                        ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01197)
      +                                      "worker slotmem_dptr failed");
                               if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                         "proxy: BALANCER: (%s). Unlock failed for adding worker",
      -                                         bsel->name);
      +                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01198)
      +                                          "%s: Unlock failed for adding worker",
      +                                          bsel->s->name);
                               }
                               return HTTP_BAD_REQUEST;
                           }
                           if ((rv = ap_proxy_share_worker(nworker, shm, index)) != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "Cannot share worker");
      +                        ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01199)
      +                                      "Cannot share worker");
                               if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                         "proxy: BALANCER: (%s). Unlock failed for adding worker",
      -                                         bsel->name);
      +                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01200)
      +                                          "%s: Unlock failed for adding worker",
      +                                          bsel->s->name);
                               }
                               return HTTP_BAD_REQUEST;
                           }
                           if ((rv = ap_proxy_initialize_worker(nworker, r->server, conf->pool)) != APR_SUCCESS) {
      -                        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, r->server, "Cannot init worker");
      +                        ap_log_rerror(APLOG_MARK, APLOG_EMERG, rv, r, APLOGNO(01201)
      +                                      "Cannot init worker");
                               if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
      -                            ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                         "proxy: BALANCER: (%s). Unlock failed for adding worker",
      -                                         bsel->name);
      +                            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01202)
      +                                          "%s: Unlock failed for adding worker",
      +                                          bsel->s->name);
                               }
                               return HTTP_BAD_REQUEST;
                           }
                           /* sync all timestamps */
                           bsel->wupdated = bsel->s->wupdated = nworker->s->updated = apr_time_now();
                           /* by default, all new workers are disabled */
      -                    ap_proxy_set_wstatus('D', 1, nworker);
      +                    ap_proxy_set_wstatus(PROXY_WORKER_DISABLED_FLAG, 1, nworker);
                       }
                       if ((rv = PROXY_GLOBAL_UNLOCK(bsel)) != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                 "proxy: BALANCER: (%s). Unlock failed for adding worker",
      -                                 bsel->name);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01203)
      +                                  "%s: Unlock failed for adding worker",
      +                                  bsel->s->name);
                       }
                   }
       
      @@ -1148,9 +1311,10 @@ static int balancer_handler(request_rec *r)
           }
       
           action = ap_construct_url(r->pool, r->uri, r);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "genning page");
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01204) "genning page");
       
           if (apr_table_get(params, "xml")) {
      +        char date[APR_RFC822_DATE_LEN];
               ap_set_content_type(r, "text/xml");
               ap_rputs("<?xml version='1.0' encoding='UTF-8' ?>\n", r);
               ap_rputs("<httpd:manager xmlns:httpd='http://httpd.apache.org'>\n", r);
      @@ -1158,18 +1322,160 @@ static int balancer_handler(request_rec *r)
               balancer = (proxy_balancer *)conf->balancers->elts;
               for (i = 0; i < conf->balancers->nelts; i++) {
                   ap_rputs("    <httpd:balancer>\n", r);
      -            ap_rvputs(r, "      <httpd:name>", balancer->name, "</httpd:name>\n", NULL);
      +            /* Start proxy_balancer */
      +            ap_rvputs(r, "      <httpd:name>", balancer->s->name, "</httpd:name>\n", NULL);
      +            if (*balancer->s->sticky) {
      +                ap_rvputs(r, "      <httpd:stickysession>", balancer->s->sticky,
      +                          "</httpd:stickysession>\n", NULL);
      +                ap_rprintf(r,
      +                           "      <httpd:nofailover>%s</httpd:nofailover>\n",
      +                           (balancer->s->sticky_force ? "On" : "Off"));
      +            }
      +            ap_rprintf(r,
      +                       "      <httpd:timeout>%" APR_TIME_T_FMT "</httpd:timeout>",
      +                       apr_time_sec(balancer->s->timeout));
      +            if (balancer->s->max_attempts_set) {
      +                ap_rprintf(r,
      +                           "      <httpd:maxattempts>%d</httpd:maxattempts>\n",
      +                           balancer->s->max_attempts);
      +            }
      +            ap_rvputs(r, "      <httpd:lbmethod>", balancer->lbmethod->name,
      +                      "</httpd:lbmethod>\n", NULL);
      +            if (*balancer->s->sticky) {
      +                ap_rprintf(r,
      +                           "      <httpd:scolonpathdelim>%s</httpd:scolonpathdelim>\n",
      +                           (balancer->s->scolonsep ? "On" : "Off"));
      +            }
      +            /* End proxy_balancer */
                   ap_rputs("      <httpd:workers>\n", r);
                   workers = (proxy_worker **)balancer->workers->elts;
                   for (n = 0; n < balancer->workers->nelts; n++) {
                       worker = *workers;
      +                /* Start proxy_worker */
                       ap_rputs("        <httpd:worker>\n", r);
      +                ap_rvputs(r, "          <httpd:name>", ap_proxy_worker_name(r->pool, worker),
      +                          "</httpd:name>\n", NULL);
                       ap_rvputs(r, "          <httpd:scheme>", worker->s->scheme,
                                 "</httpd:scheme>\n", NULL);
                       ap_rvputs(r, "          <httpd:hostname>", worker->s->hostname,
                                 "</httpd:hostname>\n", NULL);
                       ap_rprintf(r, "          <httpd:loadfactor>%d</httpd:loadfactor>\n",
                                 worker->s->lbfactor);
      +                ap_rprintf(r,
      +                           "          <httpd:port>%d</httpd:port>\n",
      +                           worker->s->port);
      +                ap_rprintf(r, "          <httpd:min>%d</httpd:min>\n",
      +                           worker->s->min);
      +                ap_rprintf(r, "          <httpd:smax>%d</httpd:smax>\n",
      +                           worker->s->smax);
      +                ap_rprintf(r, "          <httpd:max>%d</httpd:max>\n",
      +                           worker->s->hmax);
      +                ap_rprintf(r,
      +                           "          <httpd:ttl>%" APR_TIME_T_FMT "</httpd:ttl>\n",
      +                           apr_time_sec(worker->s->ttl));
      +                if (worker->s->timeout_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:timeout>%" APR_TIME_T_FMT "</httpd:timeout>\n",
      +                               apr_time_sec(worker->s->timeout));
      +                }
      +                if (worker->s->acquire_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:acquire>%" APR_TIME_T_FMT "</httpd:acquire>\n",
      +                               apr_time_msec(worker->s->acquire));
      +                }
      +                if (worker->s->recv_buffer_size_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:recv_buffer_size>%" APR_SIZE_T_FMT "</httpd:recv_buffer_size>\n",
      +                               worker->s->recv_buffer_size);
      +                }
      +                if (worker->s->io_buffer_size_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:io_buffer_size>%" APR_SIZE_T_FMT "</httpd:io_buffer_size>\n",
      +                               worker->s->io_buffer_size);
      +                }
      +                if (worker->s->keepalive_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:keepalive>%s</httpd:keepalive>\n",
      +                               (worker->s->keepalive ? "On" : "Off"));
      +                }
      +                /* Begin proxy_worker_stat */
      +                ap_rputs("          <httpd:status>", r);
      +                ap_rputs(ap_proxy_parse_wstatus(r->pool, worker), r);
      +                ap_rputs("</httpd:status>\n", r);
      +                if ((worker->s->error_time > 0) && apr_rfc822_date(date, worker->s->error_time) == APR_SUCCESS) {
      +                    ap_rvputs(r, "          <httpd:error_time>", date,
      +                              "</httpd:error_time>\n", NULL);
      +                }
      +                ap_rprintf(r,
      +                           "          <httpd:retries>%d</httpd:retries>\n",
      +                           worker->s->retries);
      +                ap_rprintf(r,
      +                           "          <httpd:lbstatus>%d</httpd:lbstatus>\n",
      +                           worker->s->lbstatus);
      +                ap_rprintf(r,
      +                           "          <httpd:loadfactor>%d</httpd:loadfactor>\n",
      +                           worker->s->lbfactor);
      +                ap_rprintf(r,
      +                           "          <httpd:transferred>%" APR_OFF_T_FMT "</httpd:transferred>\n",
      +                           worker->s->transferred);
      +                ap_rprintf(r,
      +                           "          <httpd:read>%" APR_OFF_T_FMT "</httpd:read>\n",
      +                           worker->s->read);
      +                ap_rprintf(r,
      +                           "          <httpd:elected>%" APR_SIZE_T_FMT "</httpd:elected>\n",
      +                           worker->s->elected);
      +                ap_rvputs(r, "          <httpd:route>",
      +                          ap_escape_html(r->pool, worker->s->route),
      +                          "</httpd:route>\n", NULL);
      +                ap_rvputs(r, "          <httpd:redirect>",
      +                          ap_escape_html(r->pool, worker->s->redirect),
      +                          "</httpd:redirect>\n", NULL);
      +                ap_rprintf(r,
      +                           "          <httpd:busy>%" APR_SIZE_T_FMT "</httpd:busy>\n",
      +                           worker->s->busy);
      +                ap_rprintf(r, "          <httpd:lbset>%d</httpd:lbset>\n",
      +                           worker->s->lbset);
      +                /* End proxy_worker_stat */
      +                if (!strcasecmp(worker->s->scheme, "ajp")) {
      +                    ap_rputs("          <httpd:flushpackets>", r);
      +                    switch (worker->s->flush_packets) {
      +                        case flush_off:
      +                            ap_rputs("Off", r);
      +                            break;
      +                        case flush_on:
      +                            ap_rputs("On", r);
      +                            break;
      +                        case flush_auto:
      +                            ap_rputs("Auto", r);
      +                            break;
      +                    }
      +                    ap_rputs("</httpd:flushpackets>\n", r);
      +                    if (worker->s->flush_packets == flush_auto) {
      +                        ap_rprintf(r,
      +                                   "          <httpd:flushwait>%d</httpd:flushwait>\n",
      +                                   worker->s->flush_wait);
      +                    }
      +                    if (worker->s->ping_timeout_set) {
      +                        ap_rprintf(r,
      +                                   "          <httpd:ping>%" APR_TIME_T_FMT "</httpd:ping>",
      +                                   apr_time_msec(worker->s->ping_timeout));
      +                    }
      +                }
      +                if (worker->s->disablereuse_set) {
      +                    ap_rprintf(r,
      +                               "      <httpd:disablereuse>%s</httpd:disablereuse>\n",
      +                               (worker->s->disablereuse ? "On" : "Off"));
      +                }
      +                if (worker->s->conn_timeout_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:connectiontimeout>%" APR_TIME_T_FMT "</httpd:connectiontimeout>\n",
      +                               apr_time_msec(worker->s->conn_timeout));
      +                }
      +                if (worker->s->retry_set) {
      +                    ap_rprintf(r,
      +                               "          <httpd:retry>%" APR_TIME_T_FMT "</httpd:retry>\n",
      +                               apr_time_sec(worker->s->retry));
      +                }
                       ap_rputs("        </httpd:worker>\n", r);
                       ++workers;
                   }
      @@ -1183,80 +1489,135 @@ static int balancer_handler(request_rec *r)
           else {
               ap_set_content_type(r, "text/html; charset=ISO-8859-1");
               ap_rputs(DOCTYPE_HTML_3_2
      -                 "<html><head><title>Balancer Manager</title></head>\n", r);
      +                 "<html><head><title>Balancer Manager</title>\n", r);
      +        ap_rputs("<style type='text/css'>\n"
      +                 "table {\n"
      +                 " border-width: 1px;\n"
      +                 " border-spacing: 3px;\n"
      +                 " border-style: solid;\n"
      +                 " border-color: gray;\n"
      +                 " border-collapse: collapse;\n"
      +                 " background-color: white;\n"
      +                 " text-align: center;\n"
      +                 "}\n"
      +                 "th {\n"
      +                 " border-width: 1px;\n"
      +                 " padding: 2px;\n"
      +                 " border-style: dotted;\n"
      +                 " border-color: gray;\n"
      +                 " background-color: lightgray;\n"
      +                 " text-align: center;\n"
      +                 "}\n"
      +                 "td {\n"
      +                 " border-width: 1px;\n"
      +                 " padding: 2px;\n"
      +                 " border-style: dotted;\n"
      +                 " border-color: gray;\n"
      +                 " background-color: white;\n"
      +                 " text-align: center;\n"
      +                 "}\n"
      +                 "</style>\n</head>\n", r);
               ap_rputs("<body><h1>Load Balancer Manager for ", r);
      -        ap_rvputs(r, ap_get_server_name(r), "</h1>\n\n", NULL);
      +        ap_rvputs(r, ap_escape_html(r->pool, ap_get_server_name(r)),
      +                  "</h1>\n\n", NULL);
               ap_rvputs(r, "<dl><dt>Server Version: ",
                         ap_get_server_description(), "</dt>\n", NULL);
               ap_rvputs(r, "<dt>Server Built: ",
      -                  ap_get_server_built(), "\n</dt></dl>\n", NULL);
      +                  ap_get_server_built(), "</dt>\n", NULL);
      +        ap_rvputs(r, "<dt>Balancer changes will ", conf->bal_persist ? "" : "NOT ",
      +                  "be persisted on restart.</dt>", NULL);
      +        ap_rvputs(r, "<dt>Balancers are ", conf->inherit ? "" : "NOT ",
      +                  "inherited from main server.</dt>", NULL);
      +        ap_rvputs(r, "<dt>ProxyPass settings are ", conf->ppinherit ? "" : "NOT ",
      +                  "inherited from main server.</dt>", NULL);
      +        ap_rputs("</dl>\n", r);
               balancer = (proxy_balancer *)conf->balancers->elts;
               for (i = 0; i < conf->balancers->nelts; i++) {
       
                   ap_rputs("<hr />\n<h3>LoadBalancer Status for ", r);
      -            ap_rvputs(r, "<a href='", r->uri, "?b=",
      -                      balancer->name + sizeof(BALANCER_PREFIX) - 1,
      -                      "&nonce=", balancer->s->nonce,
      +            ap_rvputs(r, "<a href='", ap_escape_uri(r->pool, r->uri), "?b=",
      +                      balancer->s->name + sizeof(BALANCER_PREFIX) - 1,
      +                      "&amp;nonce=", balancer->s->nonce,
                             "'>", NULL);
      -            ap_rvputs(r, balancer->name, "</a></h3>\n\n", NULL);
      -            ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>"
      +            ap_rvputs(r, balancer->s->name, "</a> [",balancer->s->sname, "]</h3>\n", NULL);
      +            ap_rputs("\n\n<table><tr>"
                       "<th>MaxMembers</th><th>StickySession</th><th>DisableFailover</th><th>Timeout</th><th>FailoverAttempts</th><th>Method</th>"
      -                "</tr>\n<tr>", r);
      +                "<th>Path</th><th>Active</th></tr>\n<tr>", r);
                   /* the below is a safe cast, since the number of slots total will
                    * never be more than max_workers, which is restricted to int */
      -            ap_rprintf(r, "<td align='center'>%d [%d Used]</td>\n", balancer->max_workers,
      -                       balancer->max_workers - (int)storage->num_free_slots(balancer->slot));
      +            ap_rprintf(r, "<td>%d [%d Used]</td>\n", balancer->max_workers,
      +                       balancer->max_workers - (int)storage->num_free_slots(balancer->wslot));
                   if (*balancer->s->sticky) {
                       if (strcmp(balancer->s->sticky, balancer->s->sticky_path)) {
      -                    ap_rvputs(r, "<td align='center'>", balancer->s->sticky, " | ",
      +                    ap_rvputs(r, "<td>", balancer->s->sticky, " | ",
                                     balancer->s->sticky_path, NULL);
                       }
                       else {
      -                    ap_rvputs(r, "<td align='center'>", balancer->s->sticky, NULL);
      +                    ap_rvputs(r, "<td>", balancer->s->sticky, NULL);
                       }
                   }
                   else {
      -                ap_rputs("<td align='center'> (None) ", r);
      +                ap_rputs("<td> (None) ", r);
                   }
      -            ap_rprintf(r, "<td align='center'>%s</td>\n",
      +            ap_rprintf(r, "</td><td>%s</td>\n",
                              balancer->s->sticky_force ? "On" : "Off");
      -            ap_rprintf(r, "</td><td align='center'>%" APR_TIME_T_FMT "</td>",
      +            ap_rprintf(r, "<td>%" APR_TIME_T_FMT "</td>",
                       apr_time_sec(balancer->s->timeout));
      -            ap_rprintf(r, "<td align='center'>%d</td>\n", balancer->s->max_attempts);
      -            ap_rprintf(r, "<td align='center'>%s</td>\n",
      +            ap_rprintf(r, "<td>%d</td>\n", balancer->s->max_attempts);
      +            ap_rprintf(r, "<td>%s</td>\n",
                              balancer->s->lbpname);
      +            ap_rputs("<td>", r);
      +            if (*balancer->s->vhost) {
      +                ap_rvputs(r, balancer->s->vhost, " -> ", NULL);
      +            }
      +            ap_rvputs(r, balancer->s->vpath, "</td>\n", NULL);
      +            ap_rprintf(r, "<td>%s</td>\n",
      +                       !balancer->s->inactive ? "Yes" : "No");
                   ap_rputs("</table>\n<br />", r);
      -            ap_rputs("\n\n<table border='0' style='text-align: left;'><tr>"
      +            ap_rputs("\n\n<table><tr>"
                       "<th>Worker URL</th>"
                       "<th>Route</th><th>RouteRedir</th>"
      -                "<th>Factor</th><th>Set</th><th align='center'>Status</th>"
      -                "<th>Elected</th><th>Busy</th><th>Load</th><th>To</th><th>From</th>"
      -                "</tr>\n", r);
      +                "<th>Factor</th><th>Set</th><th>Status</th>"
      +                "<th>Elected</th><th>Busy</th><th>Load</th><th>To</th><th>From</th>", r);
      +            if (set_worker_hc_param_f) {
      +                ap_rputs("<th>HC Method</th><th>HC Interval</th><th>Passes</th><th>Fails</th><th>HC uri</th><th>HC Expr</th>", r);
      +            }
      +            ap_rputs("</tr>\n", r);
       
                   workers = (proxy_worker **)balancer->workers->elts;
                   for (n = 0; n < balancer->workers->nelts; n++) {
                       char fbuf[50];
                       worker = *workers;
      -                ap_rvputs(r, "<tr>\n<td><a href='", r->uri, "?b=",
      -                          balancer->name + sizeof(BALANCER_PREFIX) - 1, "&w=",
      +                ap_rvputs(r, "<tr>\n<td><a href='",
      +                          ap_escape_uri(r->pool, r->uri), "?b=",
      +                          balancer->s->name + sizeof(BALANCER_PREFIX) - 1, "&amp;w=",
                                 ap_escape_uri(r->pool, worker->s->name),
      -                          "&nonce=", balancer->s->nonce,
      +                          "&amp;nonce=", balancer->s->nonce,
                                 "'>", NULL);
      -                ap_rvputs(r, worker->s->name, "</a></td>", NULL);
      -                ap_rvputs(r, "<td align='center'>", ap_escape_html(r->pool, worker->s->route),
      +                ap_rvputs(r, (*worker->s->uds_path ? "<i>" : ""), ap_proxy_worker_name(r->pool, worker),
      +                          (*worker->s->uds_path ? "</i>" : ""), "</a></td>", NULL);
      +                ap_rvputs(r, "<td>", ap_escape_html(r->pool, worker->s->route),
                                 NULL);
      -                ap_rvputs(r, "</td><td align='center'>",
      +                ap_rvputs(r, "</td><td>",
                                 ap_escape_html(r->pool, worker->s->redirect), NULL);
      -                ap_rprintf(r, "</td><td align='center'>%d</td>", worker->s->lbfactor);
      -                ap_rprintf(r, "<td align='center'>%d</td><td align='center'>", worker->s->lbset);
      +                ap_rprintf(r, "</td><td>%d</td>", worker->s->lbfactor);
      +                ap_rprintf(r, "<td>%d</td><td>", worker->s->lbset);
                       ap_rvputs(r, ap_proxy_parse_wstatus(r->pool, worker), NULL);
                       ap_rputs("</td>", r);
      -                ap_rprintf(r, "<td align='center'>%" APR_SIZE_T_FMT "</td>", worker->s->elected);
      -                ap_rprintf(r, "<td align='center'>%" APR_SIZE_T_FMT "</td>", worker->s->busy);
      -                ap_rprintf(r, "<td align='center'>%d</td><td align='center'>", worker->s->lbstatus);
      +                ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td>", worker->s->elected);
      +                ap_rprintf(r, "<td>%" APR_SIZE_T_FMT "</td>", worker->s->busy);
      +                ap_rprintf(r, "<td>%d</td><td>", worker->s->lbstatus);
                       ap_rputs(apr_strfsize(worker->s->transferred, fbuf), r);
      -                ap_rputs("</td><td align='center'>", r);
      +                ap_rputs("</td><td>", r);
                       ap_rputs(apr_strfsize(worker->s->read, fbuf), r);
      +                if (set_worker_hc_param_f) {
      +                    ap_rprintf(r, "</td><td>%s</td>", ap_proxy_show_hcmethod(worker->s->method));
      +                    ap_rprintf(r, "<td>%d</td>", (int)apr_time_sec(worker->s->interval));
      +                    ap_rprintf(r, "<td>%d (%d)</td>", worker->s->passes,worker->s->pcount);
      +                    ap_rprintf(r, "<td>%d (%d)</td>", worker->s->fails, worker->s->fcount);
      +                    ap_rprintf(r, "<td>%s</td>", worker->s->hcuri);
      +                    ap_rprintf(r, "<td>%s", worker->s->hcexpr);
      +                }
                       ap_rputs("</td></tr>\n", r);
       
                       ++workers;
      @@ -1265,12 +1626,15 @@ static int balancer_handler(request_rec *r)
                   ++balancer;
               }
               ap_rputs("<hr />\n", r);
      +        if (hc_show_exprs_f) {
      +            hc_show_exprs_f(r);
      +        }
               if (wsel && bsel) {
                   ap_rputs("<h3>Edit worker settings for ", r);
      -            ap_rvputs(r, wsel->s->name, "</h3>\n", NULL);
      +            ap_rvputs(r, (*wsel->s->uds_path?"<i>":""), ap_proxy_worker_name(r->pool, wsel), (*wsel->s->uds_path?"</i>":""), "</h3>\n", NULL);
                   ap_rputs("<form method='POST' enctype='application/x-www-form-urlencoded' action='", r);
      -            ap_rvputs(r, action, "'>\n", NULL);
      -            ap_rputs("<dl>\n<table><tr><td>Load factor:</td><td><input name='w_lf' id='w_lf' type=text ", r);
      +            ap_rvputs(r, ap_escape_uri(r->pool, action), "'>\n", NULL);
      +            ap_rputs("<table><tr><td>Load factor:</td><td><input name='w_lf' id='w_lf' type=text ", r);
                   ap_rprintf(r, "value='%d'></td></tr>\n", wsel->s->lbfactor);
                   ap_rputs("<tr><td>LB Set:</td><td><input name='w_ls' id='w_ls' type=text ", r);
                   ap_rprintf(r, "value='%d'></td></tr>\n", wsel->s->lbset);
      @@ -1283,31 +1647,69 @@ static int balancer_handler(request_rec *r)
                             NULL);
                   ap_rputs("'></td></tr>\n", r);
                   ap_rputs("<tr><td>Status:</td>", r);
      -            ap_rputs("<td><table border='1'><tr><th>Ign</th><th>Drn</th><th>Dis</th><th>Stby</th></tr>\n<tr>", r);
      -            create_radio("w_status_I", (PROXY_WORKER_IGNORE_ERRORS & wsel->s->status), r);
      -            create_radio("w_status_N", (PROXY_WORKER_DRAIN & wsel->s->status), r);
      -            create_radio("w_status_D", (PROXY_WORKER_DISABLED & wsel->s->status), r);
      -            create_radio("w_status_H", (PROXY_WORKER_HOT_STANDBY & wsel->s->status), r);
      -            ap_rputs("</tr></table>\n", r);
      -            ap_rputs("<tr><td colspan=2><input type=submit value='Submit'></td></tr>\n", r);
      +            ap_rputs("<td><table><tr>"
      +                     "<th>Ignore Errors</th>"
      +                     "<th>Draining Mode</th>"
      +                     "<th>Disabled</th>"
      +                     "<th>Hot Standby</th>", r);
      +            if (hc_show_exprs_f) {
      +                ap_rputs("<th>HC Fail</th>", r);
      +            }
      +            ap_rputs("<th>Stopped</th></tr>\n<tr>", r);
      +            create_radio("w_status_I", (PROXY_WORKER_IS(wsel, PROXY_WORKER_IGNORE_ERRORS)), r);
      +            create_radio("w_status_N", (PROXY_WORKER_IS(wsel, PROXY_WORKER_DRAIN)), r);
      +            create_radio("w_status_D", (PROXY_WORKER_IS(wsel, PROXY_WORKER_DISABLED)), r);
      +            create_radio("w_status_H", (PROXY_WORKER_IS(wsel, PROXY_WORKER_HOT_STANDBY)), r);
      +            if (hc_show_exprs_f) {
      +                create_radio("w_status_C", (PROXY_WORKER_IS(wsel, PROXY_WORKER_HC_FAIL)), r);
      +            }
      +            create_radio("w_status_S", (PROXY_WORKER_IS(wsel, PROXY_WORKER_STOPPED)), r);
      +            ap_rputs("</tr></table></td></tr>\n", r);
      +            if (hc_select_exprs_f) {
      +                proxy_hcmethods_t *method = proxy_hcmethods;
      +                ap_rputs("<tr><td colspan='2'>\n<table align='center'><tr><th>Health Check param</th><th>Value</th></tr>\n", r);
      +                ap_rputs("<tr><td>Method</td><td><select name='w_hm'>\n", r);
      +                for (; method->name; method++) {
      +                    if (method->implemented) {
      +                        ap_rprintf(r, "<option value='%s' %s >%s</option>\n",
      +                                method->name,
      +                                (wsel->s->method == method->method) ? "selected" : "",
      +                                method->name);
      +                    }
      +                }
      +                ap_rputs("</select>\n</td></tr>\n", r);
      +                ap_rputs("<tr><td>Expr</td><td><select name='w_he'>\n", r);
      +                hc_select_exprs_f(r, wsel->s->hcexpr);
      +                ap_rputs("</select>\n</td></tr>\n", r);
      +                ap_rprintf(r, "<tr><td>Interval (secs)</td><td><input name='w_hi' id='w_hi' type='text'"
      +                           "value='%d'></td></tr>\n", (int)apr_time_sec(wsel->s->interval));
      +                ap_rprintf(r, "<tr><td>Passes trigger</td><td><input name='w_hp' id='w_hp' type='text'"
      +                           "value='%d'></td></tr>\n", wsel->s->passes);
      +                ap_rprintf(r, "<tr><td>Fails trigger)</td><td><input name='w_hf' id='w_hf' type='text'"
      +                           "value='%d'></td></tr>\n", wsel->s->fails);
      +                ap_rprintf(r, "<tr><td>HC uri</td><td><input name='w_hu' id='w_hu' type='text'"
      +                        "value='%s'</td></tr>\n", ap_escape_html(r->pool, wsel->s->hcuri));
      +                ap_rputs("</table>\n</td></tr>\n", r);
      +            }
      +            ap_rputs("<tr><td colspan='2'><input type=submit value='Submit'></td></tr>\n", r);
                   ap_rvputs(r, "</table>\n<input type=hidden name='w' id='w' ",  NULL);
                   ap_rvputs(r, "value='", ap_escape_uri(r->pool, wsel->s->name), "'>\n", NULL);
                   ap_rvputs(r, "<input type=hidden name='b' id='b' ", NULL);
      -            ap_rvputs(r, "value='", bsel->name + sizeof(BALANCER_PREFIX) - 1,
      +            ap_rvputs(r, "value='", bsel->s->name + sizeof(BALANCER_PREFIX) - 1,
                             "'>\n", NULL);
                   ap_rvputs(r, "<input type=hidden name='nonce' id='nonce' value='",
                             bsel->s->nonce, "'>\n", NULL);
      -            ap_rvputs(r, "</form>\n", NULL);
      +            ap_rputs("</form>\n", r);
                   ap_rputs("<hr />\n", r);
               } else if (bsel) {
                   const apr_array_header_t *provs;
                   const ap_list_provider_names_t *pname;
                   int i;
                   ap_rputs("<h3>Edit balancer settings for ", r);
      -            ap_rvputs(r, bsel->name, "</h3>\n", NULL);
      +            ap_rvputs(r, bsel->s->name, "</h3>\n", NULL);
                   ap_rputs("<form method='POST' enctype='application/x-www-form-urlencoded' action='", r);
      -            ap_rvputs(r, action, "'>\n", NULL);
      -            ap_rputs("<dl>\n<table>\n", r);
      +            ap_rvputs(r, ap_escape_uri(r->pool, action), "'>\n", NULL);
      +            ap_rputs("<table>\n", r);
                   provs = ap_list_provider_names(r->pool, PROXY_LBMETHOD, "0");
                   if (provs) {
                       ap_rputs("<tr><td>LBmethod:</td>", r);
      @@ -1336,18 +1738,18 @@ static int balancer_handler(request_rec *r)
                       ap_rvputs(r, "value ='", bsel->s->sticky, NULL);
                   }
                   ap_rputs("'>&nbsp;&nbsp;&nbsp;&nbsp;(Use '-' to delete)</td></tr>\n", r);
      -            if (storage->num_free_slots(bsel->slot) != 0) {
      +            if (storage->num_free_slots(bsel->wslot) != 0) {
                       ap_rputs("<tr><td>Add New Worker:</td><td><input name='b_nwrkr' id='b_nwrkr' size=32 type=text>"
                                "&nbsp;&nbsp;&nbsp;&nbsp;Are you sure? <input name='b_wyes' id='b_wyes' type=checkbox value='1'>"
                                "</td></tr>", r);
                   }
                   ap_rputs("<tr><td colspan=2><input type=submit value='Submit'></td></tr>\n", r);
                   ap_rvputs(r, "</table>\n<input type=hidden name='b' id='b' ", NULL);
      -            ap_rvputs(r, "value='", bsel->name + sizeof(BALANCER_PREFIX) - 1,
      +            ap_rvputs(r, "value='", bsel->s->name + sizeof(BALANCER_PREFIX) - 1,
                             "'>\n", NULL);
                   ap_rvputs(r, "<input type=hidden name='nonce' id='nonce' value='",
                             bsel->s->nonce, "'>\n", NULL);
      -            ap_rvputs(r, "</form>\n", NULL);
      +            ap_rputs("</form>\n", r);
                   ap_rputs("<hr />\n", r);
               }
               ap_rputs(ap_psignature("",r), r);
      @@ -1369,9 +1771,9 @@ static void balancer_child_init(apr_pool_t *p, server_rec *s)
               if (conf->balancers->nelts) {
                   apr_size_t size;
                   unsigned int num;
      -            storage->attach(&(conf->slot), conf->id, &size, &num, p);
      -            if (!conf->slot) {
      -                ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "slotmem_attach failed");
      +            storage->attach(&(conf->bslot), conf->id, &size, &num, p);
      +            if (!conf->bslot) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01205) "slotmem_attach failed");
                       exit(1); /* Ugly, but what else? */
                   }
               }
      @@ -1381,9 +1783,9 @@ static void balancer_child_init(apr_pool_t *p, server_rec *s)
                   rv = ap_proxy_initialize_balancer(balancer, s, p);
       
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01206)
                                    "Failed to init balancer %s in child",
      -                             balancer->name);
      +                             balancer->s->name);
                       exit(1); /* Ugly, but what else? */
                   }
                   init_balancer_members(conf->pool, s, balancer);
      @@ -1400,8 +1802,9 @@ static void ap_proxy_balancer_register_hook(apr_pool_t *p)
            * initializes
            */
           static const char *const aszPred[] = { "mpm_winnt.c", "mod_slotmem_shm.c", NULL};
      +    static const char *const aszPred2[] = { "mod_proxy.c", NULL};
            /* manager handler */
      -    ap_hook_post_config(balancer_post_config, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_post_config(balancer_post_config, aszPred2, NULL, APR_HOOK_MIDDLE);
           ap_hook_pre_config(balancer_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_handler(balancer_handler, NULL, NULL, APR_HOOK_FIRST);
           ap_hook_child_init(balancer_child_init, aszPred, NULL, APR_HOOK_MIDDLE);
      diff --git a/modules/proxy/mod_proxy_balancer.dep b/modules/proxy/mod_proxy_balancer.dep
      new file mode 100644
      index 00000000000..0902194cead
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_balancer.dep
      @@ -0,0 +1,76 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_balancer.mak
      +
      +.\mod_proxy_balancer.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_balancer.mak b/modules/proxy/mod_proxy_balancer.mak
      new file mode 100644
      index 00000000000..86d7ec5ea7d
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_balancer.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_balancer.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_balancer - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_balancer - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_balancer - Win32 Release" && "$(CFG)" != "mod_proxy_balancer - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_balancer.mak" CFG="mod_proxy_balancer - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_balancer - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_balancer - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_balancer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_balancer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_balancer.obj"
      +	-@erase "$(INTDIR)\mod_proxy_balancer.res"
      +	-@erase "$(INTDIR)\mod_proxy_balancer_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_balancer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_balancer_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_balancer.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_balancer.so" /d LONG_NAME="proxy_balancer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_balancer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_balancer.pdb" /debug /out:"$(OUTDIR)\mod_proxy_balancer.so" /implib:"$(OUTDIR)\mod_proxy_balancer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_balancer.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_balancer.obj" \
      +	"$(INTDIR)\mod_proxy_balancer.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_balancer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_balancer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_balancer.so"
      +   if exist .\Release\mod_proxy_balancer.so.manifest mt.exe -manifest .\Release\mod_proxy_balancer.so.manifest -outputresource:.\Release\mod_proxy_balancer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_balancer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_balancer.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_balancer.obj"
      +	-@erase "$(INTDIR)\mod_proxy_balancer.res"
      +	-@erase "$(INTDIR)\mod_proxy_balancer_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_balancer_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_balancer.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_balancer_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_balancer.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_balancer.so" /d LONG_NAME="proxy_balancer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_balancer.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_balancer.pdb" /debug /out:"$(OUTDIR)\mod_proxy_balancer.so" /implib:"$(OUTDIR)\mod_proxy_balancer.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_balancer.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_balancer.obj" \
      +	"$(INTDIR)\mod_proxy_balancer.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_balancer.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_balancer.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_balancer.so"
      +   if exist .\Debug\mod_proxy_balancer.so.manifest mt.exe -manifest .\Debug\mod_proxy_balancer.so.manifest -outputresource:.\Debug\mod_proxy_balancer.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_balancer.dep")
      +!INCLUDE "mod_proxy_balancer.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_balancer.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_balancer - Win32 Release" || "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +SOURCE=.\mod_proxy_balancer.c
      +
      +"$(INTDIR)\mod_proxy_balancer.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_balancer - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_balancer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_balancer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_balancer.so" /d LONG_NAME="proxy_balancer_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_balancer - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_balancer.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_balancer.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_balancer.so" /d LONG_NAME="proxy_balancer_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c
      index 4ccd6ca42f7..1984342a377 100644
      --- a/modules/proxy/mod_proxy_connect.c
      +++ b/modules/proxy/mod_proxy_connect.c
      @@ -119,7 +119,7 @@ static int allowed_port(connect_conf *conf, int port)
           int i;
           port_range *list = (port_range *) conf->allowed_connect_ports->elts;
       
      -    if (apr_is_empty_array(conf->allowed_connect_ports)){
      +    if (apr_is_empty_array(conf->allowed_connect_ports)) {
               return port == APR_URI_HTTPS_DEFAULT_PORT
                      || port == APR_URI_SNEWS_DEFAULT_PORT;
           }
      @@ -138,59 +138,11 @@ static int proxy_connect_canon(request_rec *r, char *url)
           if (r->method_number != M_CONNECT) {
           return DECLINED;
           }
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: CONNECT: canonicalising URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
       
           return OK;
       }
       
      -/* read available data (in blocks of CONN_BLKSZ) from c_i and copy to c_o */
      -static int proxy_connect_transfer(request_rec *r, conn_rec *c_i, conn_rec *c_o,
      -                                  apr_bucket_brigade *bb, char *name)
      -{
      -    int rv;
      -#ifdef DEBUGGING
      -    apr_off_t len;
      -#endif
      -
      -    do {
      -        apr_brigade_cleanup(bb);
      -        rv = ap_get_brigade(c_i->input_filters, bb, AP_MODE_READBYTES,
      -                            APR_NONBLOCK_READ, CONN_BLKSZ);
      -        if (rv == APR_SUCCESS) {
      -            if (c_o->aborted)
      -                return APR_EPIPE;
      -            if (APR_BRIGADE_EMPTY(bb))
      -                break;
      -#ifdef DEBUGGING
      -            len = -1;
      -            apr_brigade_length(bb, 0, &len);
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "proxy: CONNECT: read %" APR_OFF_T_FMT
      -                          " bytes from %s", len, name);
      -#endif
      -            rv = ap_pass_brigade(c_o->output_filters, bb);
      -            if (rv == APR_SUCCESS) {
      -                ap_fflush(c_o->output_filters, bb);
      -            }
      -            else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                              "proxy: CONNECT: error on %s - ap_pass_brigade",
      -                              name);
      -            }
      -        } else if (!APR_STATUS_IS_EAGAIN(rv)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r,
      -                          "proxy: CONNECT: error on %s - ap_get_brigade",
      -                          name);
      -        }
      -    } while (rv == APR_SUCCESS);
      -
      -    if (APR_STATUS_IS_EAGAIN(rv)) {
      -        rv = APR_SUCCESS;
      -    }
      -    return rv;
      -}
      -
       /* CONNECT handler */
       static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
                                        proxy_server_conf *conf,
      @@ -204,33 +156,32 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
           apr_socket_t *sock;
           conn_rec *c = r->connection;
           conn_rec *backconn;
      +    int done = 0;
       
      -    apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
      -    apr_status_t err, rv;
      +    apr_bucket_brigade *bb_front;
      +    apr_bucket_brigade *bb_back;
      +    apr_status_t rv;
           apr_size_t nbytes;
           char buffer[HUGE_STRING_LEN];
           apr_socket_t *client_socket = ap_get_conn_socket(c);
           int failed, rc;
      -    int client_error = 0;
           apr_pollset_t *pollset;
           apr_pollfd_t pollfd;
           const apr_pollfd_t *signalled;
           apr_int32_t pollcnt, pi;
           apr_int16_t pollevent;
      -    apr_sockaddr_t *uri_addr, *connect_addr;
      +    apr_sockaddr_t *nexthop;
       
           apr_uri_t uri;
           const char *connectname;
      -    int connectport = 0;
      +    apr_port_t connectport = 0;
       
           /* is this for us? */
           if (r->method_number != M_CONNECT) {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                     "proxy: CONNECT: declining URL %s", url);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "declining URL %s", url);
               return DECLINED;
           }
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: CONNECT: serving URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "serving URL %s", url);
       
       
           /*
      @@ -246,45 +197,39 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
                                                NULL));
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: CONNECT: connecting %s to %s:%d", url, uri.hostname,
      -                 uri.port);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01019)
      +                  "connecting %s to %s:%d", url, uri.hostname, uri.port);
      +
      +    /* Determine host/port of next hop; from request URI or of a proxy. */
      +    connectname = proxyname ? proxyname : uri.hostname;
      +    connectport = proxyname ? proxyport : uri.port;
       
      -    /* do a DNS lookup for the destination host */
      -    err = apr_sockaddr_info_get(&uri_addr, uri.hostname, APR_UNSPEC, uri.port,
      -                                0, p);
      -    if (APR_SUCCESS != err) {
      +    /* Do a DNS lookup for the next hop */
      +    rv = apr_sockaddr_info_get(&nexthop, connectname, APR_UNSPEC, 
      +                               connectport, 0, p);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02327)
      +                      "failed to resolve hostname '%s'", connectname);
               return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                                    apr_pstrcat(p, "DNS lookup failure for: ",
      -                                         uri.hostname, NULL));
      -    }
      -
      -    /* are we connecting directly, or via a proxy? */
      -    if (proxyname) {
      -        connectname = proxyname;
      -        connectport = proxyport;
      -        err = apr_sockaddr_info_get(&connect_addr, proxyname, APR_UNSPEC,
      -                                    proxyport, 0, p);
      -    }
      -    else {
      -        connectname = uri.hostname;
      -        connectport = uri.port;
      -        connect_addr = uri_addr;
      +                                         connectname, NULL));
           }
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: CONNECT: connecting to remote proxy %s on port %d",
      -                 connectname, connectport);
       
      -    /* check if ProxyBlock directive on this host */
      -    if (OK != ap_proxy_checkproxyblock(r, conf, uri_addr)) {
      +    /* Check ProxyBlock directive on the hostname/address.  */
      +    if (ap_proxy_checkproxyblock2(r, conf, uri.hostname, 
      +                                 proxyname ? NULL : nexthop) != OK) {
               return ap_proxyerror(r, HTTP_FORBIDDEN,
                                    "Connect to remote machine blocked");
           }
       
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  "connecting to remote proxy %s on port %d",
      +                  connectname, connectport);
      +
           /* Check if it is an allowed port */
      -    if(!allowed_port(c_conf, uri.port)) {
      -              return ap_proxyerror(r, HTTP_FORBIDDEN,
      -                                   "Connect to remote machine blocked");
      +    if (!allowed_port(c_conf, uri.port)) {
      +        return ap_proxyerror(r, HTTP_FORBIDDEN,
      +                             "Connect to remote machine blocked");
           }
       
           /*
      @@ -293,15 +238,6 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
            * We have determined who to connect to. Now make the connection.
            */
       
      -    /* get all the possible IP addresses for the destname and loop through them
      -     * until we get a successful connection
      -     */
      -    if (APR_SUCCESS != err) {
      -        return ap_proxyerror(r, HTTP_BAD_GATEWAY,
      -                             apr_pstrcat(p, "DNS lookup failure for: ",
      -                                         connectname, NULL));
      -    }
      -
           /*
            * At this point we have a list of one or more IP addresses of
            * the machine to connect to. If configured, reorder this
      @@ -312,7 +248,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
            * For now we do nothing, ie we get DNS round robin.
            * XXX FIXME
            */
      -    failed = ap_proxy_connect_to_backend(&sock, "CONNECT", connect_addr,
      +    failed = ap_proxy_connect_to_backend(&sock, "CONNECT", nexthop,
                                                connectname, conf, r);
       
           /* handle a permanent error from the above loop */
      @@ -326,20 +262,19 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
           }
       
           /* setup polling for connection */
      -    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                  "proxy: CONNECT: setting up poll()");
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "setting up poll()");
       
           if ((rv = apr_pollset_create(&pollset, 2, r->pool, 0)) != APR_SUCCESS) {
               apr_socket_close(sock);
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                      "proxy: CONNECT: error apr_pollset_create()");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01020)
      +                      "error apr_pollset_create()");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           /* Add client side to the poll */
           pollfd.p = r->pool;
           pollfd.desc_type = APR_POLL_SOCKET;
      -    pollfd.reqevents = APR_POLLIN;
      +    pollfd.reqevents = APR_POLLIN | APR_POLLHUP;
           pollfd.desc.s = client_socket;
           pollfd.client_data = NULL;
           apr_pollset_add(pollset, &pollfd);
      @@ -358,9 +293,9 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
                                               c->id, c->sbh, c->bucket_alloc);
           if (!backconn) {
               /* peer reset */
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                      "proxy: an error occurred creating a new connection "
      -                      "to %pI (%s)", connect_addr, connectname);
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01021)
      +                      "an error occurred creating a new connection "
      +                      "to %pI (%s)", nexthop, connectname);
               apr_socket_close(sock);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -368,45 +303,47 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
           rc = ap_run_pre_connection(backconn, sock);
           if (rc != OK && rc != DONE) {
               backconn->aborted = 1;
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                      "proxy: CONNECT: pre_connection setup failed (%d)", rc);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01022)
      +                      "pre_connection setup failed (%d)", rc);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      -                  "proxy: CONNECT: connection complete to %pI (%s)",
      -                  connect_addr, connectname);
      +                  "connection complete to %pI (%s)",
      +                  nexthop, connectname);
           apr_table_setn(r->notes, "proxy-source-port", apr_psprintf(r->pool, "%hu",
                          backconn->local_addr->port));
       
      +
      +    bb_front = apr_brigade_create(p, c->bucket_alloc);
      +    bb_back = apr_brigade_create(p, backconn->bucket_alloc);
      +
           /* If we are connecting through a remote proxy, we need to pass
            * the CONNECT request on to it.
            */
           if (proxyport) {
           /* FIXME: Error checking ignored.
            */
      -        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                     "proxy: CONNECT: sending the CONNECT request"
      -                     " to the remote proxy");
      -        ap_fprintf(backconn->output_filters, bb,
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                      "sending the CONNECT request to the remote proxy");
      +        ap_fprintf(backconn->output_filters, bb_back,
                          "CONNECT %s HTTP/1.0" CRLF, r->uri);
      -        ap_fprintf(backconn->output_filters, bb,
      +        ap_fprintf(backconn->output_filters, bb_back,
                          "Proxy-agent: %s" CRLF CRLF, ap_get_server_banner());
      -        ap_fflush(backconn->output_filters, bb);
      +        ap_fflush(backconn->output_filters, bb_back);
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                     "proxy: CONNECT: Returning 200 OK Status");
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "Returning 200 OK");
               nbytes = apr_snprintf(buffer, sizeof(buffer),
                                     "HTTP/1.0 200 Connection Established" CRLF);
               ap_xlate_proto_to_ascii(buffer, nbytes);
      -        ap_fwrite(c->output_filters, bb, buffer, nbytes);
      +        ap_fwrite(c->output_filters, bb_front, buffer, nbytes);
               nbytes = apr_snprintf(buffer, sizeof(buffer),
                                     "Proxy-agent: %s" CRLF CRLF,
                                     ap_get_server_banner());
               ap_xlate_proto_to_ascii(buffer, nbytes);
      -        ap_fwrite(c->output_filters, bb, buffer, nbytes);
      -        ap_fflush(c->output_filters, bb);
      +        ap_fwrite(c->output_filters, bb_front, buffer, nbytes);
      +        ap_fflush(c->output_filters, bb_front);
       #if 0
               /* This is safer code, but it doesn't work yet.  I'm leaving it
                * here so that I can fix it later.
      @@ -418,8 +355,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
       #endif
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                 "proxy: CONNECT: setting up poll()");
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "setting up poll()");
       
           /*
            * Step Four: Handle Data Transfer
      @@ -436,19 +372,19 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
           r->proto_input_filters = c->input_filters;
       /*    r->sent_bodyct = 1;*/
       
      -    while (1) { /* Infinite loop until error (one side closes the connection) */
      -        if ((rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled))
      -            != APR_SUCCESS) {
      +    do { /* Loop until done (one side closes the connection, or an error) */
      +        rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled);
      +        if (rv != APR_SUCCESS) {
                   if (APR_STATUS_IS_EINTR(rv)) {
                       continue;
                   }
                   apr_socket_close(sock);
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "proxy: CONNECT: error apr_poll()");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01023) "error apr_poll()");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       #ifdef DEBUGGING
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: CONNECT: woke from poll(), i=%d", pollcnt);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01024)
      +                      "woke from poll(), i=%d", pollcnt);
       #endif
       
               for (pi = 0; pi < pollcnt; pi++) {
      @@ -456,46 +392,59 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
       
                   if (cur->desc.s == sock) {
                       pollevent = cur->rtnevents;
      -                if (pollevent & APR_POLLIN) {
      +                if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
       #ifdef DEBUGGING
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                  "proxy: CONNECT: sock was readable");
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01025)
      +                                  "sock was readable");
       #endif
      -                    rv = proxy_connect_transfer(r, backconn, c, bb, "sock");
      -                    }
      -                else if ((pollevent & APR_POLLERR)
      -                         || (pollevent & APR_POLLHUP)) {
      -                         rv = APR_EPIPE;
      -                         ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r,
      -                                       "proxy: CONNECT: err/hup on backconn");
      +                    done |= ap_proxy_transfer_between_connections(r, backconn,
      +                                                                  c, bb_back,
      +                                                                  bb_front,
      +                                                                  "sock", NULL,
      +                                                                  CONN_BLKSZ, 1)
      +                                                                 != APR_SUCCESS;
      +                }
      +                else if (pollevent & APR_POLLERR) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(01026)
      +                                  "err on backconn");
      +                    backconn->aborted = 1;
      +                    done = 1;
                       }
      -                if (rv != APR_SUCCESS)
      -                    client_error = 1;
                   }
                   else if (cur->desc.s == client_socket) {
                       pollevent = cur->rtnevents;
      -                if (pollevent & APR_POLLIN) {
      +                if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
       #ifdef DEBUGGING
      -                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                  "proxy: CONNECT: client was readable");
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01027)
      +                                  "client was readable");
       #endif
      -                    rv = proxy_connect_transfer(r, c, backconn, bb, "client");
      +                    done |= ap_proxy_transfer_between_connections(r, c,
      +                                                                  backconn,
      +                                                                  bb_front,
      +                                                                  bb_back,
      +                                                                  "client",
      +                                                                  NULL,
      +                                                                  CONN_BLKSZ, 1)
      +                                                                 != APR_SUCCESS;
      +                }
      +                else if (pollevent & APR_POLLERR) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02827)
      +                                  "err on client");
      +                    c->aborted = 1;
      +                    done = 1;
                       }
                   }
                   else {
      -                rv = APR_EBADF;
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "proxy: CONNECT: unknown socket in pollset");
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01028)
      +                              "unknown socket in pollset");
      +                done = 1;
                   }
       
               }
      -        if (rv != APR_SUCCESS) {
      -            break;
      -        }
      -    }
      +    } while (!done);
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                 "proxy: CONNECT: finished with poll() - cleaning up");
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                  "finished with poll() - cleaning up");
       
           /*
            * Step Five: Clean Up
      @@ -503,12 +452,12 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
            * Close the socket and clean up
            */
       
      -    if (client_error)
      +    if (backconn->aborted)
               apr_socket_close(sock);
           else
               ap_lingering_close(backconn);
       
      -    c->aborted = 1;
      +    c->keepalive = AP_CONN_CLOSE;
       
           return OK;
       }
      diff --git a/modules/proxy/mod_proxy_connect.dep b/modules/proxy/mod_proxy_connect.dep
      new file mode 100644
      index 00000000000..926b6e2ac7f
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_connect.dep
      @@ -0,0 +1,73 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_connect.mak
      +
      +.\mod_proxy_connect.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_connect.mak b/modules/proxy/mod_proxy_connect.mak
      new file mode 100644
      index 00000000000..be354dbfb9d
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_connect.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_connect.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_connect - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_connect - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_connect - Win32 Release" && "$(CFG)" != "mod_proxy_connect - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_connect.mak" CFG="mod_proxy_connect - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_connect - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_connect - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_connect.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_connect.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_connect.obj"
      +	-@erase "$(INTDIR)\mod_proxy_connect.res"
      +	-@erase "$(INTDIR)\mod_proxy_connect_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_connect_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_connect_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_connect.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_connect.so" /d LONG_NAME="proxy_connect_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_connect.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_connect.pdb" /debug /out:"$(OUTDIR)\mod_proxy_connect.so" /implib:"$(OUTDIR)\mod_proxy_connect.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_connect.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_connect.obj" \
      +	"$(INTDIR)\mod_proxy_connect.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_connect.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_connect.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_connect.so"
      +   if exist .\Release\mod_proxy_connect.so.manifest mt.exe -manifest .\Release\mod_proxy_connect.so.manifest -outputresource:.\Release\mod_proxy_connect.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_connect.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_connect.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_connect.obj"
      +	-@erase "$(INTDIR)\mod_proxy_connect.res"
      +	-@erase "$(INTDIR)\mod_proxy_connect_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_connect_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_connect.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_connect_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_connect.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_connect.so" /d LONG_NAME="proxy_connect_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_connect.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_connect.pdb" /debug /out:"$(OUTDIR)\mod_proxy_connect.so" /implib:"$(OUTDIR)\mod_proxy_connect.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_connect.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_connect.obj" \
      +	"$(INTDIR)\mod_proxy_connect.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_connect.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_connect.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_connect.so"
      +   if exist .\Debug\mod_proxy_connect.so.manifest mt.exe -manifest .\Debug\mod_proxy_connect.so.manifest -outputresource:.\Debug\mod_proxy_connect.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_connect.dep")
      +!INCLUDE "mod_proxy_connect.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_connect.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_connect - Win32 Release" || "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +SOURCE=.\mod_proxy_connect.c
      +
      +"$(INTDIR)\mod_proxy_connect.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_connect - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_connect.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_connect.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_connect.so" /d LONG_NAME="proxy_connect_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_connect - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_connect.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_connect.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_connect.so" /d LONG_NAME="proxy_connect_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_express.c b/modules/proxy/mod_proxy_express.c
      index 7dbc50d1d08..0f5d604295c 100644
      --- a/modules/proxy/mod_proxy_express.c
      +++ b/modules/proxy/mod_proxy_express.c
      @@ -22,8 +22,8 @@ module AP_MODULE_DECLARE_DATA proxy_express_module;
       static int proxy_available = 0;
       
       typedef struct {
      -    char *dbmfile;
      -    char *dbmtype;
      +    const char *dbmfile;
      +    const char *dbmtype;
           int enabled;
       } express_server_conf;
       
      @@ -48,13 +48,14 @@ static const char *set_dbmtype(cmd_parms *cmd,
           express_server_conf *sconf;
           sconf = ap_get_module_config(cmd->server->module_config, &proxy_express_module);
       
      -    sconf->dbmtype = apr_pstrdup(cmd->pool, arg);
      +    sconf->dbmtype = arg;
      +
           return NULL;
       }
       
       static const char *set_enabled(cmd_parms *cmd,
      -                              void *dconf,
      -                              int flag)
      +                               void *dconf,
      +                               int flag)
       {
           express_server_conf *sconf;
           sconf = ap_get_module_config(cmd->server->module_config, &proxy_express_module);
      @@ -107,7 +108,7 @@ static int xlate_name(request_rec *r)
       {
           int i;
           const char *name;
      -    char *backend;
      +    char *backend = NULL;
           apr_dbm_t *db;
           apr_status_t rv;
           apr_datum_t key, val;
      @@ -122,16 +123,15 @@ static int xlate_name(request_rec *r)
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_express: Enabled");
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01001) "proxy_express: Enabled");
           if (!sconf->dbmfile || (r->filename && strncmp(r->filename, "proxy:", 6) == 0)) {
               /* it should be go on as an internal proxy request */
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_express: Opening DBM file: %s (%s)",
      -                 sconf->dbmfile, sconf->dbmtype);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01002)
      +                  "proxy_express: Opening DBM file: %s (%s)",
      +                  sconf->dbmfile, sconf->dbmtype);
           rv = apr_dbm_open_ex(&db, sconf->dbmtype, sconf->dbmfile, APR_DBM_READONLY,
                                APR_OS_DEFAULT, r->pool);
           if (rv != APR_SUCCESS) {
      @@ -139,30 +139,28 @@ static int xlate_name(request_rec *r)
           }
       
           name = ap_get_server_name(r);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_express: looking for %s", name);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01003)
      +                  "proxy_express: looking for %s", name);
           key.dptr = (char *)name;
           key.dsize = strlen(key.dptr);
       
           rv = apr_dbm_fetch(db, key, &val);
      -    apr_dbm_close(db);
      -    if (rv != APR_SUCCESS) {
      -        return DECLINED;
      +    if (rv == APR_SUCCESS) {
      +        backend = apr_pstrmemdup(r->pool, val.dptr, val.dsize);
           }
      -
      -    backend = apr_pstrmemdup(r->pool, val.dptr, val.dsize);
      -    if (!backend) {
      +    apr_dbm_close(db);
      +    if (rv != APR_SUCCESS || !backend) {
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_express: found %s -> %s", name, backend);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01004)
      +                  "proxy_express: found %s -> %s", name, backend);
           r->filename = apr_pstrcat(r->pool, "proxy:", backend, r->uri, NULL);
           r->handler = "proxy-server";
           r->proxyreq = PROXYREQ_REVERSE;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy_express: rewritten as: %s", r->filename);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01005)
      +                  "proxy_express: rewritten as: %s", r->filename);
       
           ralias = (struct proxy_alias *)dconf->raliases->elts;
           /*
      @@ -170,7 +168,7 @@ static int xlate_name(request_rec *r)
            * for this host... If so, don't do it again.
            */
           /*
      -     * NOTE: dconf is process specific so this wil only
      +     * NOTE: dconf is process specific so this will only
            *       work as long as we maintain that this process
            *       or thread is handling the backend
            */
      @@ -183,8 +181,8 @@ static int xlate_name(request_rec *r)
       
           /* Didn't find one... add it */
           if (!ralias) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                    "proxy_express: adding PPR entry");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01006)
      +                      "proxy_express: adding PPR entry");
               ralias = apr_array_push(dconf->raliases);
               ralias->fake = "/";
               ralias->real = apr_pstrdup(dconf->raliases->pool, backend);
      @@ -211,11 +209,7 @@ static void register_hooks(apr_pool_t *p)
       
       /* the main config structure */
       
      -#if MODULE_MAGIC_COOKIE == 0x41503234UL
       AP_DECLARE_MODULE(proxy_express) =
      -#else
      -module AP_MODULE_DECLARE_DATA proxy_express =
      -#endif
       {
           STANDARD20_MODULE_STUFF,
           NULL,           /* create per-dir config structures */
      @@ -225,4 +219,3 @@ module AP_MODULE_DECLARE_DATA proxy_express =
           command_table,  /* table of config file commands */
           register_hooks  /* register hooks */
       };
      -
      diff --git a/modules/proxy/mod_proxy_express.dep b/modules/proxy/mod_proxy_express.dep
      new file mode 100644
      index 00000000000..f9e5ffb311a
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_express.dep
      @@ -0,0 +1,74 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_express.mak
      +
      +.\mod_proxy_express.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_express.mak b/modules/proxy/mod_proxy_express.mak
      new file mode 100644
      index 00000000000..f656d226dd1
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_express.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_express.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_express - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_express - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_express - Win32 Release" && "$(CFG)" != "mod_proxy_express - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_express.mak" CFG="mod_proxy_express - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_express - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_express - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_express.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_express.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_express.obj"
      +	-@erase "$(INTDIR)\mod_proxy_express.res"
      +	-@erase "$(INTDIR)\mod_proxy_express_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_express_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_express.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_express.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_express.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_express.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_express_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_express.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_express.so" /d LONG_NAME="proxy_balancer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_express.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_express.pdb" /debug /out:"$(OUTDIR)\mod_proxy_express.so" /implib:"$(OUTDIR)\mod_proxy_express.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_express.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_express.obj" \
      +	"$(INTDIR)\mod_proxy_express.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_express.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_express.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_express.so"
      +   if exist .\Release\mod_proxy_express.so.manifest mt.exe -manifest .\Release\mod_proxy_express.so.manifest -outputresource:.\Release\mod_proxy_express.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_express.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_express.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_express.obj"
      +	-@erase "$(INTDIR)\mod_proxy_express.res"
      +	-@erase "$(INTDIR)\mod_proxy_express_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_express_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_express.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_express.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_express.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_express.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_express_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_express.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_express.so" /d LONG_NAME="proxy_balancer_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_express.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_express.pdb" /debug /out:"$(OUTDIR)\mod_proxy_express.so" /implib:"$(OUTDIR)\mod_proxy_express.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_express.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_express.obj" \
      +	"$(INTDIR)\mod_proxy_express.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_express.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_express.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_express.so"
      +   if exist .\Debug\mod_proxy_express.so.manifest mt.exe -manifest .\Debug\mod_proxy_express.so.manifest -outputresource:.\Debug\mod_proxy_express.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_express.dep")
      +!INCLUDE "mod_proxy_express.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_express.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_express - Win32 Release" || "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +SOURCE=.\mod_proxy_express.c
      +
      +"$(INTDIR)\mod_proxy_express.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_express - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_express.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_express.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_express.so" /d LONG_NAME="proxy_balancer_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_express - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_express.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_express.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_express.so" /d LONG_NAME="proxy_balancer_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c
      index d0a214366bf..76d381bc2a2 100644
      --- a/modules/proxy/mod_proxy_fcgi.c
      +++ b/modules/proxy/mod_proxy_fcgi.c
      @@ -15,57 +15,14 @@
        */
       
       #include "mod_proxy.h"
      -#include "fcgi_protocol.h"
      +#include "util_fcgi.h"
       #include "util_script.h"
       
       module AP_MODULE_DECLARE_DATA proxy_fcgi_module;
       
      -/*
      - * The below 3 functions serve to map the FCGI structs
      - * back and forth between an 8 byte array. We do this to avoid
      - * any potential padding issues when we send or read these
      - * structures.
      - *
      - * NOTE: These have specific internal knowledge of the
      - *       layout of the fcgi_header and fcgi_begin_request_body
      - *       structs!
      - */
      -static void fcgi_header_to_array(fcgi_header *h, unsigned char a[])
      -{
      -    a[FCGI_HDR_VERSION_OFFSET]        = h->version;
      -    a[FCGI_HDR_TYPE_OFFSET]           = h->type;
      -    a[FCGI_HDR_REQUEST_ID_B1_OFFSET]  = h->requestIdB1;
      -    a[FCGI_HDR_REQUEST_ID_B0_OFFSET]  = h->requestIdB0;
      -    a[FCGI_HDR_CONTENT_LEN_B1_OFFSET] = h->contentLengthB1;
      -    a[FCGI_HDR_CONTENT_LEN_B0_OFFSET] = h->contentLengthB0;
      -    a[FCGI_HDR_PADDING_LEN_OFFSET]    = h->paddingLength;
      -    a[FCGI_HDR_RESERVED_OFFSET]       = h->reserved;
      -}
      -
      -static void fcgi_header_from_array(fcgi_header *h, unsigned char a[])
      -{
      -    h->version         = a[FCGI_HDR_VERSION_OFFSET];
      -    h->type            = a[FCGI_HDR_TYPE_OFFSET];
      -    h->requestIdB1     = a[FCGI_HDR_REQUEST_ID_B1_OFFSET];
      -    h->requestIdB0     = a[FCGI_HDR_REQUEST_ID_B0_OFFSET];
      -    h->contentLengthB1 = a[FCGI_HDR_CONTENT_LEN_B1_OFFSET];
      -    h->contentLengthB0 = a[FCGI_HDR_CONTENT_LEN_B0_OFFSET];
      -    h->paddingLength   = a[FCGI_HDR_PADDING_LEN_OFFSET];
      -    h->reserved        = a[FCGI_HDR_RESERVED_OFFSET];
      -}
      -
      -static void fcgi_begin_request_body_to_array(fcgi_begin_request_body *h,
      -                                             unsigned char a[])
      -{
      -    a[FCGI_BRB_ROLEB1_OFFSET]    = h->roleB1;
      -    a[FCGI_BRB_ROLEB0_OFFSET]    = h->roleB0;
      -    a[FCGI_BRB_FLAGS_OFFSET]     = h->flags;
      -    a[FCGI_BRB_RESERVED0_OFFSET] = h->reserved[0];
      -    a[FCGI_BRB_RESERVED1_OFFSET] = h->reserved[1];
      -    a[FCGI_BRB_RESERVED2_OFFSET] = h->reserved[2];
      -    a[FCGI_BRB_RESERVED3_OFFSET] = h->reserved[3];
      -    a[FCGI_BRB_RESERVED4_OFFSET] = h->reserved[4];
      -}
      +typedef struct {
      +    int need_dirwalk;
      +} fcgi_req_config_t;
       
       /*
        * Canonicalise http-like URLs.
      @@ -76,8 +33,11 @@ static void fcgi_begin_request_body_to_array(fcgi_begin_request_body *h,
       static int proxy_fcgi_canon(request_rec *r, char *url)
       {
           char *host, sport[7];
      -    const char *err, *path;
      -    apr_port_t port = 8000;
      +    const char *err;
      +    char *path;
      +    apr_port_t port, def_port;
      +    fcgi_req_config_t *rconf = NULL;
      +    const char *pathinfo_type = NULL;
       
           if (strncasecmp(url, "fcgi:", 5) == 0) {
               url += 5;
      @@ -86,17 +46,21 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: FCGI: canonicalising URL %s", url);
      +    port = def_port = ap_proxy_port_of_scheme("fcgi");
       
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                 "canonicalising URL %s", url);
           err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01059)
                             "error parsing URL %s: %s", url, err);
               return HTTP_BAD_REQUEST;
           }
       
      -    apr_snprintf(sport, sizeof(sport), ":%d", port);
      +    if (port != def_port)
      +        apr_snprintf(sport, sizeof(sport), ":%d", port);
      +    else
      +        sport[0] = '\0';
       
           if (ap_strchr_c(host, ':')) {
               /* if literal IPv6 address */
      @@ -116,70 +80,70 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
           r->filename = apr_pstrcat(r->pool, "proxy:fcgi://", host, sport, "/",
                                     path, NULL);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                  "proxy: FCGI: set r->filename to %s", r->filename);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01060)
      +                  "set r->filename to %s", r->filename);
       
      -    if (apr_table_get(r->subprocess_env, "proxy-fcgi-pathinfo")) {
      -        r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
      +    rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
      +    if (rconf == NULL) { 
      +        rconf = apr_pcalloc(r->pool, sizeof(fcgi_req_config_t));
      +        ap_set_module_config(r->request_config, &proxy_fcgi_module, rconf);
      +    }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                      "proxy: FCGI: set r->path_info to %s", r->path_info);
      +    if (NULL != (pathinfo_type = apr_table_get(r->subprocess_env, "proxy-fcgi-pathinfo"))) {
      +        /* It has to be on disk for this to work */
      +        if (!strcasecmp(pathinfo_type, "full")) { 
      +            rconf->need_dirwalk = 1;
      +            ap_unescape_url_keep2f(path, 0);
      +        }
      +        else if (!strcasecmp(pathinfo_type, "first-dot")) { 
      +            char *split = ap_strchr(path, '.');
      +            if (split) { 
      +                char *slash = ap_strchr(split, '/');
      +                if (slash) { 
      +                    r->path_info = apr_pstrdup(r->pool, slash);
      +                    ap_unescape_url_keep2f(r->path_info, 0);
      +                    *slash = '\0'; /* truncate path */
      +                }
      +            }
      +        }
      +        else if (!strcasecmp(pathinfo_type, "last-dot")) { 
      +            char *split = ap_strrchr(path, '.');
      +            if (split) { 
      +                char *slash = ap_strchr(split, '/');
      +                if (slash) { 
      +                    r->path_info = apr_pstrdup(r->pool, slash);
      +                    ap_unescape_url_keep2f(r->path_info, 0);
      +                    *slash = '\0'; /* truncate path */
      +                }
      +            }
      +        }
      +        else { 
      +            /* before proxy-fcgi-pathinfo had multi-values. This requires the
      +             * the FCGI server to fixup PATH_INFO because it's the entire path
      +             */
      +            r->path_info = apr_pstrcat(r->pool, "/", path, NULL);
      +            if (!strcasecmp(pathinfo_type, "unescape")) { 
      +                ap_unescape_url_keep2f(r->path_info, 0);
      +            }
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01061)
      +                    "set r->path_info to %s", r->path_info);
      +        }
           }
       
           return OK;
       }
       
      -/*
      - * Fill in a fastcgi request header with the following type, request id,
      - * content length, and padding length.
      - *
      - * The header array must be at least FCGI_HEADER_LEN bytes long.
      - */
      -static void fill_in_header(fcgi_header *header,
      -                           unsigned char type,
      -                           apr_uint16_t request_id,
      -                           apr_uint16_t content_len,
      -                           unsigned char padding_len)
      -{
      -    header->version = FCGI_VERSION;
      -
      -    header->type = type;
      -
      -    header->requestIdB1 = ((request_id >> 8) & 0xff);
      -    header->requestIdB0 = ((request_id) & 0xff);
      -
      -    header->contentLengthB1 = ((content_len >> 8) & 0xff);
      -    header->contentLengthB0 = ((content_len) & 0xff);
      -
      -    header->paddingLength = padding_len;
      -
      -    header->reserved = 0;
      -}
      -
       /* Wrapper for apr_socket_sendv that handles updating the worker stats. */
       static apr_status_t send_data(proxy_conn_rec *conn,
                                     struct iovec *vec,
                                     int nvec,
      -                              apr_size_t *len,
      -                              int blocking)
      +                              apr_size_t *len)
       {
      -    apr_status_t rv = APR_SUCCESS, arv;
      +    apr_status_t rv = APR_SUCCESS;
           apr_size_t written = 0, to_write = 0;
           int i, offset;
      -    apr_interval_time_t old_timeout;
           apr_socket_t *s = conn->sock;
       
      -    if (!blocking) {
      -        arv = apr_socket_timeout_get(s, &old_timeout);
      -        if (arv != APR_SUCCESS) {
      -            return arv;
      -        }
      -        arv = apr_socket_timeout_set(s, 0);
      -        if (arv != APR_SUCCESS) {
      -            return arv;
      -        }
      -    }
      -
           for (i = 0; i < nvec; i++) {
               to_write += vec[i].iov_len;
           }
      @@ -211,12 +175,6 @@ static apr_status_t send_data(proxy_conn_rec *conn,
           conn->worker->s->transferred += written;
           *len = written;
       
      -    if (!blocking) {
      -        arv = apr_socket_timeout_set(s, old_timeout);
      -        if ((arv != APR_SUCCESS) && (rv == APR_SUCCESS)) {
      -            return arv;
      -        }
      -    }
           return rv;
       }
       
      @@ -234,58 +192,104 @@ static apr_status_t get_data(proxy_conn_rec *conn,
           return rv;
       }
       
      -static apr_status_t send_begin_request(proxy_conn_rec *conn, int request_id)
      +static apr_status_t get_data_full(proxy_conn_rec *conn,
      +                                  char *buffer,
      +                                  apr_size_t buflen)
      +{
      +    apr_size_t readlen;
      +    apr_size_t cumulative_len = 0;
      +    apr_status_t rv;
      +
      +    do {
      +        readlen = buflen - cumulative_len;
      +        rv = get_data(conn, buffer + cumulative_len, &readlen);
      +        if (rv != APR_SUCCESS) {
      +            return rv;
      +        }
      +        cumulative_len += readlen;
      +    } while (cumulative_len < buflen);
      +
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t send_begin_request(proxy_conn_rec *conn,
      +                                       apr_uint16_t request_id)
       {
           struct iovec vec[2];
      -    fcgi_header header;
      -    unsigned char farray[FCGI_HEADER_LEN];
      -    fcgi_begin_request_body brb;
      -    unsigned char abrb[FCGI_HEADER_LEN];
      +    ap_fcgi_header header;
      +    unsigned char farray[AP_FCGI_HEADER_LEN];
      +    ap_fcgi_begin_request_body brb;
      +    unsigned char abrb[AP_FCGI_HEADER_LEN];
           apr_size_t len;
       
      -    fill_in_header(&header, FCGI_BEGIN_REQUEST, request_id, sizeof(abrb), 0);
      +    ap_fcgi_fill_in_header(&header, AP_FCGI_BEGIN_REQUEST, request_id,
      +                           sizeof(abrb), 0);
       
      -    brb.roleB1 = ((FCGI_RESPONDER >> 8) & 0xff);
      -    brb.roleB0 = ((FCGI_RESPONDER) & 0xff);
      -    brb.flags = FCGI_KEEP_CONN;
      -    brb.reserved[0] = 0;
      -    brb.reserved[1] = 0;
      -    brb.reserved[2] = 0;
      -    brb.reserved[3] = 0;
      -    brb.reserved[4] = 0;
      +    ap_fcgi_fill_in_request_body(&brb, AP_FCGI_RESPONDER,
      +                                 ap_proxy_connection_reusable(conn)
      +                                     ? AP_FCGI_KEEP_CONN : 0);
       
      -    fcgi_header_to_array(&header, farray);
      -    fcgi_begin_request_body_to_array(&brb, abrb);
      +    ap_fcgi_header_to_array(&header, farray);
      +    ap_fcgi_begin_request_body_to_array(&brb, abrb);
       
           vec[0].iov_base = (void *)farray;
           vec[0].iov_len = sizeof(farray);
           vec[1].iov_base = (void *)abrb;
           vec[1].iov_len = sizeof(abrb);
       
      -    return send_data(conn, vec, 2, &len, 1);
      +    return send_data(conn, vec, 2, &len);
       }
       
       static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
      -                                     int request_id)
      +                                     apr_pool_t *temp_pool,
      +                                     apr_uint16_t request_id)
       {
           const apr_array_header_t *envarr;
           const apr_table_entry_t *elts;
           struct iovec vec[2];
      -    fcgi_header header;
      -    unsigned char farray[FCGI_HEADER_LEN];
      -    apr_size_t bodylen, envlen;
      -    char *body, *itr;
      +    ap_fcgi_header header;
      +    unsigned char farray[AP_FCGI_HEADER_LEN];
      +    char *body;
           apr_status_t rv;
      -    apr_size_t len;
      -    int i, numenv;
      +    apr_size_t avail_len, len, required_len;
      +    int next_elem, starting_elem;
      +    fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
      +
      +    if (rconf) { 
      +       if (rconf->need_dirwalk) { 
      +          ap_directory_walk(r);
      +       }
      +    }
      +
      +    /* Strip proxy: prefixes */
      +    if (r->filename) {
      +        char *newfname = NULL;
      +
      +        if (!strncmp(r->filename, "proxy:balancer://", 17)) {
      +            newfname = apr_pstrdup(r->pool, r->filename+17);
      +        }
      +        else if (!strncmp(r->filename, "proxy:fcgi://", 13)) {
      +            newfname = apr_pstrdup(r->pool, r->filename+13);
      +        }
      +        /* Query string in environment only */
      +        if (newfname && r->args && *r->args) { 
      +            char *qs = strrchr(newfname, '?');
      +            if (qs && !strcmp(qs+1, r->args)) { 
      +                *qs = '\0';
      +            }
      +        }
      +
      +        if (newfname) {
      +            newfname = ap_strchr(newfname, '/');
      +            r->filename = newfname;
      +        }
      +    }
       
           ap_add_common_vars(r);
           ap_add_cgi_vars(r);
      -
      + 
           /* XXX are there any FastCGI specific env vars we need to send? */
       
      -    bodylen = envlen = 0;
      -
           /* XXX mod_cgi/mod_cgid use ap_create_environment here, which fills in
            *     the TZ value specially.  We could use that, but it would mean
            *     parsing the key/value pairs back OUT of the allocated env array,
      @@ -293,123 +297,78 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
            *     place, which would suck. */
       
           envarr = apr_table_elts(r->subprocess_env);
      -
           elts = (const apr_table_entry_t *) envarr->elts;
       
      -    for (i = 0; i < envarr->nelts; ++i) {
      -        apr_size_t keylen, vallen;
      -
      -        if (! elts[i].key) {
      -            continue;
      -        }
      -
      -        keylen = strlen(elts[i].key);
      -
      -        if (keylen >> 7 == 0) {
      -            envlen += 1;
      -        }
      -        else {
      -            envlen += 4;
      -        }
      -
      -        envlen += keylen;
      -
      -        vallen = strlen(elts[i].val);
      -
      -#ifdef FCGI_DUMP_ENV_VARS
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                      "proxy: FCGI: sending env var '%s' value '%s'",
      -                      elts[i].key, elts[i].val);
      -#endif
      -
      -        if (vallen >> 7 == 0) {
      -            envlen += 1;
      +    if (APLOGrtrace8(r)) {
      +        int i;
      +        
      +        for (i = 0; i < envarr->nelts; ++i) {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r, APLOGNO(01062)
      +                          "sending env var '%s' value '%s'",
      +                          elts[i].key, elts[i].val);
               }
      -        else {
      -            envlen += 4;
      -        }
      -
      -        envlen += vallen;
      +    }
       
      -        /* The cast of bodylen is safe since FCGI_MAX_ENV_SIZE is for sure an int */
      -        if (envlen > FCGI_MAX_ENV_SIZE) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "proxy: FCGI: truncating environment to %d bytes and %d elements",
      -                          (int)bodylen, i);
      +    /* Send envvars over in as many FastCGI records as it takes, */
      +    next_elem = 0; /* starting with the first one */
      +
      +    avail_len = 16 * 1024; /* our limit per record, which could have been up
      +                            * to AP_FCGI_MAX_CONTENT_LEN
      +                            */
      +
      +    while (next_elem < envarr->nelts) {
      +        starting_elem = next_elem;
      +        required_len = ap_fcgi_encoded_env_len(r->subprocess_env,
      +                                               avail_len,
      +                                               &next_elem);
      +
      +        if (!required_len) {
      +            if (next_elem < envarr->nelts) {
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +                              APLOGNO(02536) "couldn't encode envvar '%s' in %"
      +                              APR_SIZE_T_FMT " bytes",
      +                              elts[next_elem].key, avail_len);
      +                /* skip this envvar and continue */
      +                ++next_elem;
      +                continue;
      +            }
      +            /* only an unused element at the end of the array */
                   break;
               }
       
      -        bodylen = envlen;
      -    }
      -
      -    numenv = i;
      +        body = apr_palloc(temp_pool, required_len);
      +        rv = ap_fcgi_encode_env(r, r->subprocess_env, body, required_len,
      +                                &starting_elem);
      +        /* we pre-compute, so we can't run out of space */
      +        ap_assert(rv == APR_SUCCESS);
      +        /* compute and encode must be in sync */
      +        ap_assert(starting_elem == next_elem);
       
      -    body = apr_pcalloc(r->pool, bodylen);
      +        ap_fcgi_fill_in_header(&header, AP_FCGI_PARAMS, request_id,
      +                               (apr_uint16_t)required_len, 0);
      +        ap_fcgi_header_to_array(&header, farray);
       
      -    itr = body;
      -
      -    for (i = 0; i < numenv; ++i) {
      -        apr_size_t keylen, vallen;
      -
      -        if (! elts[i].key) {
      -            continue;
      -        }
      -
      -        keylen = strlen(elts[i].key);
      -
      -        if (keylen >> 7 == 0) {
      -            itr[0] = keylen & 0xff;
      -            itr += 1;
      -        }
      -        else {
      -            itr[0] = ((keylen >> 24) & 0xff) | 0x80;
      -            itr[1] = ((keylen >> 16) & 0xff);
      -            itr[2] = ((keylen >> 8) & 0xff);
      -            itr[3] = ((keylen) & 0xff);
      -            itr += 4;
      -        }
      +        vec[0].iov_base = (void *)farray;
      +        vec[0].iov_len = sizeof(farray);
      +        vec[1].iov_base = body;
      +        vec[1].iov_len = required_len;
       
      -        vallen = strlen(elts[i].val);
      +        rv = send_data(conn, vec, 2, &len);
      +        apr_pool_clear(temp_pool);
       
      -        if (vallen >> 7 == 0) {
      -            itr[0] = vallen & 0xff;
      -            itr += 1;
      +        if (rv) {
      +            return rv;
               }
      -        else {
      -            itr[0] = ((vallen >> 24) & 0xff) | 0x80;
      -            itr[1] = ((vallen >> 16) & 0xff);
      -            itr[2] = ((vallen >> 8) & 0xff);
      -            itr[3] = ((vallen) & 0xff);
      -            itr += 4;
      -        }
      -
      -        memcpy(itr, elts[i].key, keylen);
      -        itr += keylen;
      -
      -        memcpy(itr, elts[i].val, vallen);
      -        itr += vallen;
           }
       
      -    fill_in_header(&header, FCGI_PARAMS, request_id, bodylen, 0);
      -    fcgi_header_to_array(&header, farray);
      +    /* Envvars sent, so say we're done */
      +    ap_fcgi_fill_in_header(&header, AP_FCGI_PARAMS, request_id, 0, 0);
      +    ap_fcgi_header_to_array(&header, farray);
       
           vec[0].iov_base = (void *)farray;
           vec[0].iov_len = sizeof(farray);
      -    vec[1].iov_base = body;
      -    vec[1].iov_len = bodylen;
      -
      -    rv = send_data(conn, vec, 2, &len, 1);
      -    if (rv) {
      -        return rv;
      -    }
       
      -    fill_in_header(&header, FCGI_PARAMS, request_id, 0, 0);
      -    fcgi_header_to_array(&header, farray);
      -
      -    vec[0].iov_base = (void *)farray;
      -    vec[0].iov_len = sizeof(farray);
      -
      -    return send_data(conn, vec, 1, &len, 1);
      +    return send_data(conn, vec, 1, &len);
       }
       
       enum {
      @@ -427,13 +386,12 @@ enum {
        *
        * Returns 0 if it can't find the end of the headers, and 1 if it found the
        * end of the headers. */
      -static int handle_headers(request_rec *r,
      -                          int *state,
      -                          char *readbuf)
      +static int handle_headers(request_rec *r, int *state,
      +                          const char *readbuf, apr_size_t readlen)
       {
           const char *itr = readbuf;
       
      -    while (*itr) {
      +    while (readlen--) {
               if (*itr == '\r') {
                   switch (*state) {
                       case HDR_STATE_GOT_CRLF:
      @@ -481,83 +439,30 @@ static int handle_headers(request_rec *r,
           return 0;
       }
       
      -static void dump_header_to_log(request_rec *r, unsigned char fheader[],
      -                               apr_size_t length)
      -{
      -#ifdef FCGI_DUMP_HEADERS
      -    apr_size_t posn = 0;
      -    char asc_line[20];
      -    char hex_line[60];
      -    int i = 0;
      -
      -    memset(asc_line, 0, sizeof(asc_line));
      -    memset(hex_line, 0, sizeof(hex_line));
      -
      -    while (posn < length) {
      -        unsigned char c = fheader[posn];
      -
      -        if (i >= 20) {
      -            i = 0;
      -
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "HEADER: %s %s", asc_line, hex_line);
      -
      -            memset(asc_line, 0, sizeof(asc_line));
      -            memset(hex_line, 0, sizeof(hex_line));
      -        }
      -
      -        if (isprint(c)) {
      -            asc_line[i] = c;
      -        }
      -        else {
      -            asc_line[i] = '.';
      -        }
      -
      -        if ((c >> 4) >= 10) {
      -            hex_line[i * 3] = 'a' + ((c >> 4) - 10);
      -        }
      -        else {
      -            hex_line[i * 3] = '0' + (c >> 4);
      -        }
      -
      -        if ((c & 0x0F) >= 10) {
      -            hex_line[i * 3 + 1] = 'a' + ((c & 0x0F) - 10);
      -        }
      -        else {
      -            hex_line[i * 3 + 1] = '0' + (c & 0xF);
      -        }
      -
      -        hex_line[i * 3 + 2] = ' ';
      -
      -        i++;
      -        posn++;
      -    }
      -
      -    if (i != 1) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "HEADER: %s %s",
      -                     asc_line, hex_line);
      -    }
      -
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "HEADER: -EOH-");
      -#endif
      -}
      -
       static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
      -                             request_rec *r, int request_id)
      +                             request_rec *r, apr_pool_t *setaside_pool,
      +                             apr_uint16_t request_id, const char **err,
      +                             int *bad_request, int *has_responded)
       {
           apr_bucket_brigade *ib, *ob;
      -    int seen_end_of_headers = 0, done = 0;
      +    int seen_end_of_headers = 0, done = 0, ignore_body = 0;
           apr_status_t rv = APR_SUCCESS;
           int script_error_status = HTTP_OK;
           conn_rec *c = r->connection;
           struct iovec vec[2];
      -    fcgi_header header;
      -    unsigned char farray[FCGI_HEADER_LEN];
      +    ap_fcgi_header header;
      +    unsigned char farray[AP_FCGI_HEADER_LEN];
           apr_pollfd_t pfd;
           int header_state = HDR_STATE_READING_HEADERS;
      -    apr_pool_t *setaside_pool;
      -
      -    apr_pool_create(&setaside_pool, r->pool);
      +    char stack_iobuf[AP_IOBUFSIZE];
      +    apr_size_t iobuf_size = AP_IOBUFSIZE;
      +    char *iobuf = stack_iobuf;
      +
      +    *err = NULL;
      +    if (conn->worker->s->io_buffer_size_set) {
      +        iobuf_size = conn->worker->s->io_buffer_size;
      +        iobuf = apr_palloc(r->pool, iobuf_size);
      +    }
       
           pfd.desc_type = APR_POLL_SOCKET;
           pfd.desc.s = conn->sock;
      @@ -568,34 +473,34 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
           ob = apr_brigade_create(r->pool, c->bucket_alloc);
       
           while (! done) {
      -        apr_interval_time_t timeout = conn->worker->s->timeout;
      +        apr_interval_time_t timeout;
               apr_size_t len;
               int n;
       
               /* We need SOME kind of timeout here, or virtually anything will
                * cause timeout errors. */
      -        if (! conn->worker->s->timeout_set) {
      -            timeout = apr_time_from_sec(30);
      -        }
      +        apr_socket_timeout_get(conn->sock, &timeout);
       
               rv = apr_poll(&pfd, 1, &n, timeout);
               if (rv != APR_SUCCESS) {
                   if (APR_STATUS_IS_EINTR(rv)) {
                       continue;
                   }
      +            *err = "polling";
                   break;
               }
       
               if (pfd.rtnevents & APR_POLLOUT) {
      -            char writebuf[AP_IOBUFSIZE];
      -            apr_size_t writebuflen;
      +            apr_size_t to_send, writebuflen;
                   int last_stdin = 0;
      -            int nvec = 0;
      +            char *iobuf_cursor;
       
                   rv = ap_get_brigade(r->input_filters, ib,
                                       AP_MODE_READBYTES, APR_BLOCK_READ,
      -                                sizeof(writebuf));
      +                                iobuf_size);
                   if (rv != APR_SUCCESS) {
      +                *err = "reading input brigade";
      +                *bad_request = 1;
                       break;
                   }
       
      @@ -603,30 +508,48 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                       last_stdin = 1;
                   }
       
      -            writebuflen = sizeof(writebuf);
      +            writebuflen = iobuf_size;
       
      -            rv = apr_brigade_flatten(ib, writebuf, &writebuflen);
      +            rv = apr_brigade_flatten(ib, iobuf, &writebuflen);
       
                   apr_brigade_cleanup(ib);
       
                   if (rv != APR_SUCCESS) {
      +                *err = "flattening brigade";
                       break;
                   }
       
      -            fill_in_header(&header, FCGI_STDIN, request_id,
      -                           (apr_uint16_t) writebuflen, 0);
      -            fcgi_header_to_array(&header, farray);
      +            to_send = writebuflen;
      +            iobuf_cursor = iobuf;
      +            while (to_send > 0) {
      +                int nvec = 0;
      +                apr_size_t write_this_time;
      +
      +                write_this_time =
      +                    to_send < AP_FCGI_MAX_CONTENT_LEN ? to_send : AP_FCGI_MAX_CONTENT_LEN;
      +
      +                ap_fcgi_fill_in_header(&header, AP_FCGI_STDIN, request_id,
      +                                       (apr_uint16_t)write_this_time, 0);
      +                ap_fcgi_header_to_array(&header, farray);
       
      -            vec[nvec].iov_base = (void *)farray;
      -            vec[nvec].iov_len = sizeof(farray);
      -            ++nvec;
      -            if (writebuflen) {
      -                vec[nvec].iov_base = writebuf;
      -                vec[nvec].iov_len = writebuflen;
      +                vec[nvec].iov_base = (void *)farray;
      +                vec[nvec].iov_len = sizeof(farray);
                       ++nvec;
      -            }
      +                if (writebuflen) {
      +                    vec[nvec].iov_base = iobuf_cursor;
      +                    vec[nvec].iov_len = write_this_time;
      +                    ++nvec;
      +                }
       
      -            rv = send_data(conn, vec, nvec, &len, 0);
      +                rv = send_data(conn, vec, nvec, &len);
      +                if (rv != APR_SUCCESS) {
      +                    *err = "sending stdin";
      +                    break;
      +                }
      +
      +                to_send -= write_this_time;
      +                iobuf_cursor += write_this_time;
      +            }
                   if (rv != APR_SUCCESS) {
                       break;
                   }
      @@ -634,82 +557,61 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                   if (last_stdin) {
                       pfd.reqevents = APR_POLLIN; /* Done with input data */
       
      -                if (writebuflen) { /* empty FCGI_STDIN not already sent? */
      -                    fill_in_header(&header, FCGI_STDIN, request_id, 0, 0);
      -                    fcgi_header_to_array(&header, farray);
      +                /* signal EOF (empty FCGI_STDIN) */
      +                ap_fcgi_fill_in_header(&header, AP_FCGI_STDIN, request_id,
      +                                       0, 0);
      +                ap_fcgi_header_to_array(&header, farray);
       
      -                    vec[0].iov_base = (void *)farray;
      -                    vec[0].iov_len = sizeof(farray);
      +                vec[0].iov_base = (void *)farray;
      +                vec[0].iov_len = sizeof(farray);
       
      -                    rv = send_data(conn, vec, 1, &len, 1);
      +                rv = send_data(conn, vec, 1, &len);
      +                if (rv != APR_SUCCESS) {
      +                    *err = "sending empty stdin";
      +                    break;
                       }
                   }
               }
       
               if (pfd.rtnevents & APR_POLLIN) {
      -            /* readbuf has one byte on the end that is always 0, so it's
      -             * able to work with a strstr when we search for the end of
      -             * the headers, even if we fill the entire length in the recv. */
      -            char readbuf[AP_IOBUFSIZE + 1];
                   apr_size_t readbuflen;
      -            apr_size_t clen;
      -            int rid, type;
      +            apr_uint16_t clen, rid;
                   apr_bucket *b;
      -            char plen;
      -
      -            memset(readbuf, 0, sizeof(readbuf));
      -            memset(farray, 0, sizeof(farray));
      +            unsigned char plen;
      +            unsigned char type, version;
       
                   /* First, we grab the header... */
      -            readbuflen = FCGI_HEADER_LEN;
      -
      -            rv = get_data(conn, (char *) farray, &readbuflen);
      +            rv = get_data_full(conn, (char *) farray, AP_FCGI_HEADER_LEN);
                   if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01067)
      +                              "Failed to read FastCGI header");
                       break;
                   }
       
      -            dump_header_to_log(r, farray, readbuflen);
      -
      -            if (readbuflen != FCGI_HEADER_LEN) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "proxy: FCGI: Failed to read entire header "
      -                             "got %" APR_SIZE_T_FMT " wanted %d",
      -                             readbuflen, FCGI_HEADER_LEN);
      -                rv = APR_EINVAL;
      -                break;
      -            }
      +            ap_log_rdata(APLOG_MARK, APLOG_TRACE8, r, "FastCGI header",
      +                         farray, AP_FCGI_HEADER_LEN, 0);
       
      -            fcgi_header_from_array(&header, farray);
      +            ap_fcgi_header_fields_from_array(&version, &type, &rid,
      +                                             &clen, &plen, farray);
       
      -            if (header.version != FCGI_VERSION) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "proxy: FCGI: Got bogus version %d",
      -                             (int) header.version);
      +            if (version != AP_FCGI_VERSION_1) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01068)
      +                              "Got bogus version %d", (int)version);
                       rv = APR_EINVAL;
                       break;
                   }
       
      -            type = header.type;
      -
      -            rid = header.requestIdB1 << 8;
      -            rid |= header.requestIdB0;
      -
                   if (rid != request_id) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "proxy: FCGI: Got bogus rid %d, expected %d",
      -                             rid, request_id);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01069)
      +                              "Got bogus rid %d, expected %d",
      +                              rid, request_id);
                       rv = APR_EINVAL;
                       break;
                   }
       
      -            clen = header.contentLengthB1 << 8;
      -            clen |= header.contentLengthB0;
      -
      -            plen = header.paddingLength;
      -
       recv_again:
      -            if (clen > sizeof(readbuf) - 1) {
      -                readbuflen = sizeof(readbuf) - 1;
      +            if (clen > iobuf_size) {
      +                readbuflen = iobuf_size;
                   } else {
                       readbuflen = clen;
                   }
      @@ -718,24 +620,25 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                    * recv call, this will eventually change when we move to real
                    * nonblocking recv calls. */
                   if (readbuflen != 0) {
      -                rv = get_data(conn, readbuf, &readbuflen);
      +                rv = get_data(conn, iobuf, &readbuflen);
                       if (rv != APR_SUCCESS) {
      +                    *err = "reading response body";
                           break;
                       }
      -                readbuf[readbuflen] = 0;
                   }
       
                   switch (type) {
      -            case FCGI_STDOUT:
      +            case AP_FCGI_STDOUT:
                       if (clen != 0) {
      -                    b = apr_bucket_transient_create(readbuf,
      +                    b = apr_bucket_transient_create(iobuf,
                                                           readbuflen,
                                                           c->bucket_alloc);
       
                           APR_BRIGADE_INSERT_TAIL(ob, b);
       
                           if (! seen_end_of_headers) {
      -                        int st = handle_headers(r, &header_state, readbuf);
      +                        int st = handle_headers(r, &header_state,
      +                                                iobuf, readbuflen);
       
                               if (st == 1) {
                                   int status;
      @@ -749,16 +652,38 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                                       apr_brigade_cleanup(ob);
                                       tmp_b = apr_bucket_eos_create(c->bucket_alloc);
                                       APR_BRIGADE_INSERT_TAIL(ob, tmp_b);
      -                                ap_pass_brigade(r->output_filters, ob);
      -                                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                                    "proxy: FCGI: Error parsing script headers");
      +
      +                                *has_responded = 1;
                                       r->status = status;
      -                                rv = APR_EINVAL;
      -                                break;
      +                                rv = ap_pass_brigade(r->output_filters, ob);
      +                                if (rv != APR_SUCCESS) {
      +                                    *err = "passing headers brigade to output filters";
      +                                    break;
      +                                }
      +                                else if (status == HTTP_NOT_MODIFIED
      +                                         || status == HTTP_PRECONDITION_FAILED) {
      +                                    /* Special 'status' cases handled:
      +                                     * 1) HTTP 304 response MUST NOT contain
      +                                     *    a message-body, ignore it.
      +                                     * 2) HTTP 412 response.
      +                                     * The break is not added since there might
      +                                     * be more bytes to read from the FCGI
      +                                     * connection. Even if the message-body is
      +                                     * ignored (and the EOS bucket has already
      +                                     * been sent) we want to avoid subsequent
      +                                     * bogus reads. */
      +                                    ignore_body = 1;
      +                                }
      +                                else {
      +                                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01070)
      +                                                    "Error parsing script headers");
      +                                    rv = APR_EINVAL;
      +                                    break;
      +                                }
                                   }
       
      -                            if (conf->error_override &&
      -                                ap_is_HTTP_ERROR(r->status)) {
      +                            if (conf->error_override
      +                                && ap_is_HTTP_ERROR(r->status) && ap_is_initial_req(r)) {
                                       /*
                                        * set script_error_status to discard
                                        * everything after the headers
      @@ -771,9 +696,15 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                                       r->status = HTTP_OK;
                                   }
       
      -                            if (script_error_status == HTTP_OK) {
      +                            if (script_error_status == HTTP_OK
      +                                && !APR_BRIGADE_EMPTY(ob) && !ignore_body) {
      +                                /* Send the part of the body that we read while
      +                                 * reading the headers.
      +                                 */
      +                                *has_responded = 1;
                                       rv = ap_pass_brigade(r->output_filters, ob);
                                       if (rv != APR_SUCCESS) {
      +                                    *err = "passing brigade to output filters";
                                           break;
                                       }
                                   }
      @@ -795,16 +726,18 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                                * but that could be a huge amount of data; so we pass
                                * along smaller chunks
                                */
      -                        if (script_error_status == HTTP_OK) {
      +                        if (script_error_status == HTTP_OK && !ignore_body) {
      +                            *has_responded = 1;
                                   rv = ap_pass_brigade(r->output_filters, ob);
                                   if (rv != APR_SUCCESS) {
      +                                *err = "passing brigade to output filters";
                                       break;
                                   }
                               }
                               apr_brigade_cleanup(ob);
                           }
       
      -                    /* If we didn't read all the data go back and get the
      +                    /* If we didn't read all the data, go back and get the
                            * rest of it. */
                           if (clen > readbuflen) {
                               clen -= readbuflen;
      @@ -816,8 +749,11 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                           if (script_error_status == HTTP_OK) {
                               b = apr_bucket_eos_create(c->bucket_alloc);
                               APR_BRIGADE_INSERT_TAIL(ob, b);
      +
      +                        *has_responded = 1;
                               rv = ap_pass_brigade(r->output_filters, ob);
                               if (rv != APR_SUCCESS) {
      +                            *err = "passing brigade to output filters";
                                   break;
                               }
                           }
      @@ -826,11 +762,11 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                       }
                       break;
       
      -            case FCGI_STDERR:
      +            case AP_FCGI_STDERR:
                       /* TODO: Should probably clean up this logging a bit... */
                       if (clen) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                                 "proxy: FCGI: Got error '%s'", readbuf);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01071)
      +                                  "Got error '%.*s'", (int)readbuflen, iobuf);
                       }
       
                       if (clen > readbuflen) {
      @@ -839,21 +775,25 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
                       }
                       break;
       
      -            case FCGI_END_REQUEST:
      +            case AP_FCGI_END_REQUEST:
                       done = 1;
                       break;
       
                   default:
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "proxy: FCGI: Got bogus record %d", type);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01072)
      +                              "Got bogus record %d", type);
      +                break;
      +            }
      +            /* Leave on above switch's inner error. */
      +            if (rv != APR_SUCCESS) {
                       break;
                   }
       
                   if (plen) {
      -                readbuflen = plen;
      -
      -                rv = get_data(conn, readbuf, &readbuflen);
      +                rv = get_data_full(conn, iobuf, plen);
                       if (rv != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02537)
      +                                  "Error occurred reading padding");
                           break;
                       }
                   }
      @@ -865,6 +805,7 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf,
       
           if (script_error_status != HTTP_OK) {
               ap_die(script_error_status, r); /* send ErrorDocument */
      +        *has_responded = 1;
           }
       
           return rv;
      @@ -881,40 +822,64 @@ static int fcgi_do_request(apr_pool_t *p, request_rec *r,
                                  char *url, char *server_portstr)
       {
           /* Request IDs are arbitrary numbers that we assign to a
      -     * single request. This would allow multiplex/pipelinig of
      +     * single request. This would allow multiplex/pipelining of
            * multiple requests to the same FastCGI connection, but
            * we don't support that, and always use a value of '1' to
            * keep things simple. */
      -    int request_id = 1;
      +    apr_uint16_t request_id = 1;
           apr_status_t rv;
      +    apr_pool_t *temp_pool;
      +    const char *err;
      +    int bad_request = 0,
      +        has_responded = 0;
       
      -    /* Step 1: Send FCGI_BEGIN_REQUEST */
      +    /* Step 1: Send AP_FCGI_BEGIN_REQUEST */
           rv = send_begin_request(conn, request_id);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                     "proxy: FCGI: Failed Writing Request to %s:",
      -                     server_portstr);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01073)
      +                      "Failed Writing Request to %s:", server_portstr);
               conn->close = 1;
               return HTTP_SERVICE_UNAVAILABLE;
           }
       
      +    apr_pool_create(&temp_pool, r->pool);
      +
           /* Step 2: Send Environment via FCGI_PARAMS */
      -    rv = send_environment(conn, r, request_id);
      +    rv = send_environment(conn, r, temp_pool, request_id);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                     "proxy: FCGI: Failed writing Environment to %s:",
      -                     server_portstr);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01074)
      +                      "Failed writing Environment to %s:", server_portstr);
               conn->close = 1;
               return HTTP_SERVICE_UNAVAILABLE;
           }
       
           /* Step 3: Read records from the back end server and handle them. */
      -    rv = dispatch(conn, conf, r, request_id);
      +    rv = dispatch(conn, conf, r, temp_pool, request_id,
      +                  &err, &bad_request, &has_responded);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                     "proxy: FCGI: Error dispatching request to %s:",
      -                     server_portstr);
      +        /* If the client aborted the connection during retrieval or (partially)
      +         * sending the response, don't return a HTTP_SERVICE_UNAVAILABLE, since
      +         * this is not a backend problem. */
      +        if (r->connection->aborted) {
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, rv, r, 
      +                          "The client aborted the connection.");
      +            conn->close = 1;
      +            return OK;
      +        }
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01075)
      +                      "Error dispatching request to %s: %s%s%s",
      +                      server_portstr,
      +                      err ? "(" : "",
      +                      err ? err : "",
      +                      err ? ")" : "");
               conn->close = 1;
      +        if (has_responded) {
      +            return AP_FILTER_ERROR;
      +        }
      +        if (bad_request) {
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
      +        }
               return HTTP_SERVICE_UNAVAILABLE;
           }
       
      @@ -935,46 +900,40 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
           char server_portstr[32];
           conn_rec *origin = NULL;
           proxy_conn_rec *backend = NULL;
      +    apr_uri_t *uri;
       
           proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
                                                        &proxy_module);
       
           apr_pool_t *p = r->pool;
       
      -    apr_uri_t *uri = apr_palloc(r->pool, sizeof(*uri));
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: FCGI: url: %s proxyname: %s proxyport: %d",
      -                 url, proxyname, proxyport);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01076)
      +                  "url: %s proxyname: %s proxyport: %d",
      +                  url, proxyname, proxyport);
       
      -    if (strncasecmp(url, "fcgi:", 5) == 0) {
      -        url += 5;
      -    }
      -    else {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: FCGI: declining URL %s", url);
      +    if (strncasecmp(url, "fcgi:", 5) != 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01077) "declining URL %s", url);
               return DECLINED;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: FCGI: serving URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01078) "serving URL %s", url);
       
           /* Create space for state information */
      -    if (! backend) {
      -        status = ap_proxy_acquire_connection(FCGI_SCHEME, &backend, worker,
      -                                             r->server);
      -        if (status != OK) {
      -            if (backend) {
      -                backend->close = 1;
      -                ap_proxy_release_connection(FCGI_SCHEME, backend, r->server);
      -            }
      -            return status;
      +    status = ap_proxy_acquire_connection(FCGI_SCHEME, &backend, worker,
      +                                         r->server);
      +    if (status != OK) {
      +        if (backend) {
      +            backend->close = 1;
      +            ap_proxy_release_connection(FCGI_SCHEME, backend, r->server);
               }
      +        return status;
           }
       
           backend->is_ssl = 0;
       
           /* Step One: Determine Who To Connect To */
      +    uri = apr_palloc(p, sizeof(*uri));
           status = ap_proxy_determine_connection(p, r, conf, worker, backend,
                                                  uri, &url, proxyname, proxyport,
                                                  server_portstr,
      @@ -983,17 +942,24 @@ static int proxy_fcgi_handler(request_rec *r, proxy_worker *worker,
               goto cleanup;
           }
       
      -    /* XXX Setting close to 0 is a great way to end up with
      -     *     timeouts at this point, since we lack good ways to manage the
      -     *     back end fastcgi processes.  This should be revisited when we
      -     *     have a better story on that part of things. */
      +    /* This scheme handler does not reuse connections by default, to
      +     * avoid tying up a fastcgi that isn't expecting to work on 
      +     * parallel requests.  But if the user went out of their way to
      +     * type the default value of disablereuse=off, we'll allow it.
      +     */  
           backend->close = 1;
      +    if (worker->s->disablereuse_set && !worker->s->disablereuse) { 
      +        backend->close = 0;
      +    }
       
           /* Step Two: Make the Connection */
      -    if (ap_proxy_connect_backend(FCGI_SCHEME, backend, worker, r->server)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "proxy: FCGI: failed to make connection to backend: %s",
      -                     backend->hostname);
      +    if (ap_proxy_check_connection(FCGI_SCHEME, backend, r->server, 0,
      +                                  PROXY_CHECK_CONN_EMPTY)
      +            && ap_proxy_connect_backend(FCGI_SCHEME, backend, worker,
      +                                        r->server)) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01079)
      +                      "failed to make connection to backend: %s",
      +                      backend->hostname);
               status = HTTP_SERVICE_UNAVAILABLE;
               goto cleanup;
           }
      diff --git a/modules/proxy/mod_proxy_fcgi.dep b/modules/proxy/mod_proxy_fcgi.dep
      new file mode 100644
      index 00000000000..a2fc7cb7ce9
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_fcgi.dep
      @@ -0,0 +1,75 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_fcgi.mak
      +
      +.\mod_proxy_fcgi.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_fcgi.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_fcgi.dsp b/modules/proxy/mod_proxy_fcgi.dsp
      index fdb34b3d55d..ac778edce28 100644
      --- a/modules/proxy/mod_proxy_fcgi.dsp
      +++ b/modules/proxy/mod_proxy_fcgi.dsp
      @@ -114,10 +114,6 @@ SOURCE=.\mod_proxy_fcgi.c
       
       SOURCE=.\mod_proxy.h
       # End Source File
      -# Begin Source File
      -
      -SOURCE=.\fcgi_protocol.h
      -# End Source File
       # End Group
       # Begin Source File
       
      diff --git a/modules/proxy/mod_proxy_fcgi.mak b/modules/proxy/mod_proxy_fcgi.mak
      new file mode 100644
      index 00000000000..4b150889d4b
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_fcgi.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_fcgi.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_fcgi - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_fcgi - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_fcgi - Win32 Release" && "$(CFG)" != "mod_proxy_fcgi - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_fcgi.mak" CFG="mod_proxy_fcgi - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_fcgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_fcgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_fcgi.obj"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi.res"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_fcgi_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_fcgi.so" /d LONG_NAME="proxy_fcgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_fcgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_fcgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_fcgi.so" /implib:"$(OUTDIR)\mod_proxy_fcgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_fcgi.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_fcgi.obj" \
      +	"$(INTDIR)\mod_proxy_fcgi.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_fcgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_fcgi.so"
      +   if exist .\Release\mod_proxy_fcgi.so.manifest mt.exe -manifest .\Release\mod_proxy_fcgi.so.manifest -outputresource:.\Release\mod_proxy_fcgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_fcgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_fcgi.obj"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi.res"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_fcgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_fcgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_fcgi_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_fcgi.so" /d LONG_NAME="proxy_fcgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_fcgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_fcgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_fcgi.so" /implib:"$(OUTDIR)\mod_proxy_fcgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_fcgi.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_fcgi.obj" \
      +	"$(INTDIR)\mod_proxy_fcgi.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_fcgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_fcgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_fcgi.so"
      +   if exist .\Debug\mod_proxy_fcgi.so.manifest mt.exe -manifest .\Debug\mod_proxy_fcgi.so.manifest -outputresource:.\Debug\mod_proxy_fcgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_fcgi.dep")
      +!INCLUDE "mod_proxy_fcgi.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_fcgi.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_fcgi - Win32 Release" || "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +SOURCE=.\mod_proxy_fcgi.c
      +
      +"$(INTDIR)\mod_proxy_fcgi.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_fcgi - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_fcgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_fcgi.so" /d LONG_NAME="proxy_fcgi_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_fcgi - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_fcgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_fcgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_fcgi.so" /d LONG_NAME="proxy_fcgi_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_fdpass.c b/modules/proxy/mod_proxy_fdpass.c
      index 0a170f5c78a..195b0fdb6c1 100644
      --- a/modules/proxy/mod_proxy_fdpass.c
      +++ b/modules/proxy/mod_proxy_fdpass.c
      @@ -24,12 +24,6 @@
       #error This module only works on unix platforms with the correct OS support
       #endif
       
      -#include "apr_version.h"
      -#if APR_MAJOR_VERSION < 2
      -/* for apr_wait_for_io_or_timeout */
      -#include "apr_support.h"
      -#endif
      -
       #include "mod_proxy_fdpass.h"
       
       module AP_MODULE_DECLARE_DATA proxy_fdpass_module;
      @@ -49,73 +43,25 @@ static int proxy_fdpass_canon(request_rec *r, char *url)
       
           r->filename = apr_pstrcat(r->pool, "proxy:fd://", path, NULL);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                  "proxy: FD: set r->filename to %s", r->filename);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01151)
      +                  "set r->filename to %s", r->filename);
           return OK;
       }
       
      -/* TODO: In APR 2.x: Extend apr_sockaddr_t to possibly be a path !!! */
      -static apr_status_t socket_connect_un(apr_socket_t *sock,
      -                                      struct sockaddr_un *sa)
      -{
      -    apr_status_t rv;
      -    apr_os_sock_t rawsock;
      -    apr_interval_time_t t;
      -
      -    rv = apr_os_sock_get(&rawsock, sock);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -
      -    rv = apr_socket_timeout_get(sock, &t);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -
      -    do {
      -        rv = connect(rawsock, (struct sockaddr*)sa,
      -                               sizeof(*sa) + strlen(sa->sun_path));
      -    } while (rv == -1 && errno == EINTR);
      -
      -    if ((rv == -1) && (errno == EINPROGRESS || errno == EALREADY)
      -        && (t > 0)) {
      -#if APR_MAJOR_VERSION < 2
      -        rv = apr_wait_for_io_or_timeout(NULL, sock, 0);
      -#else
      -        rv = apr_socket_wait(sock, APR_WAIT_WRITE);
      -#endif
      -
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      -        }
      -    }
      -
      -    if (rv == -1 && errno != EISCONN) {
      -        return errno;
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
       static apr_status_t get_socket_from_path(apr_pool_t *p,
                                                const char* path,
                                                apr_socket_t **out_sock)
       {
      -    struct sockaddr_un sa;
           apr_socket_t *s;
           apr_status_t rv;
           *out_sock = NULL;
       
           rv = apr_socket_create(&s, AF_UNIX, SOCK_STREAM, 0, p);
      -
           if (rv != APR_SUCCESS) {
               return rv;
           }
       
      -    sa.sun_family = AF_UNIX;
      -    apr_cpystrn(sa.sun_path, path, sizeof(sa.sun_path));
      -
      -    rv = socket_connect_un(s, &sa);
      +    rv = ap_proxy_connect_uds(s, path, p);
           if (rv != APR_SUCCESS) {
               return rv;
           }
      @@ -125,7 +71,6 @@ static apr_status_t get_socket_from_path(apr_pool_t *p,
           return APR_SUCCESS;
       }
       
      -
       static apr_status_t send_socket(apr_pool_t *p,
                                       apr_socket_t *s,
                                       apr_socket_t *outbound)
      @@ -172,7 +117,6 @@ static apr_status_t send_socket(apr_pool_t *p,
               return errno;
           }
       
      -
           return APR_SUCCESS;
       }
       
      @@ -195,23 +139,22 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
           rv = get_socket_from_path(r->pool, url, &sock);
       
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                      "proxy: FD: Failed to connect to '%s'",
      -                      url);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01152)
      +                      "Failed to connect to '%s'", url);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           {
               int status;
      -        const char *flush_method = worker->s->flusher ? worker->s->flusher : "flush";
      +        const char *flush_method = *worker->s->flusher ? worker->s->flusher : "flush";
       
               proxy_fdpass_flush *flush = ap_lookup_provider(PROXY_FDPASS_FLUSHER,
                                                              flush_method, "0");
       
               if (!flush) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: FD: Unable to find configured flush "
      -                          "provider '%s'", flush_method);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01153)
      +                          "Unable to find configured flush provider '%s'",
      +                          flush_method);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       
      @@ -225,8 +168,7 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
       
           rv = send_socket(r->pool, sock, clientsock);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                      "proxy: FD: send_socket failed:");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01154) "send_socket failed:");
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -239,14 +181,13 @@ static int proxy_fdpass_handler(request_rec *r, proxy_worker *worker,
               rv = apr_socket_create(&dummy, APR_INET, SOCK_STREAM, APR_PROTO_TCP,
                                      r->connection->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: FD: failed to create dummy socket");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01155)
      +                          "failed to create dummy socket");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               ap_set_core_module_config(r->connection->conn_config, dummy);
           }
       
      -
           return OK;
       }
       
      @@ -266,8 +207,8 @@ static int standard_flush(request_rec *r)
           status = ap_pass_brigade(r->output_filters, bb);
       
           if (status != OK) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      -                      "proxy: FD: ap_pass_brigade failed:");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01156)
      +                      "ap_pass_brigade failed:");
               return status;
           }
       
      diff --git a/modules/proxy/mod_proxy_fdpass.h b/modules/proxy/mod_proxy_fdpass.h
      index 372abf2dd90..1a13feda2c7 100644
      --- a/modules/proxy/mod_proxy_fdpass.h
      +++ b/modules/proxy/mod_proxy_fdpass.h
      @@ -18,7 +18,7 @@
        * @file mod_proxy_fdpass.h
        * @brief FD Passing interfaces
        *
      - * @addtogroup FDPass_provider
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c
      index 529f1f25fc2..104736b2423 100644
      --- a/modules/proxy/mod_proxy_ftp.c
      +++ b/modules/proxy/mod_proxy_ftp.c
      @@ -16,6 +16,7 @@
       
       /* FTP routines for Apache proxy */
       
      +#define APR_WANT_BYTEFUNC
       #include "mod_proxy.h"
       #if APR_HAVE_TIME_H
       #include <time.h>
      @@ -171,7 +172,7 @@ static int ftp_check_globbingchars(const char *path)
       {
           for ( ; *path; ++path) {
               if (*path == '\\')
      -        ++path;
      +            ++path;
               if (*path != '\0' && strchr(FTP_GLOBBING_CHARS, *path) != NULL)
                   return TRUE;
           }
      @@ -209,6 +210,79 @@ static int ftp_check_string(const char *x)
           return 1;
       }
       
      +/*
      + * converts a series of buckets into a string
      + * XXX: BillS says this function performs essentially the same function as
      + * ap_rgetline() in protocol.c. Deprecate this function and use ap_rgetline()
      + * instead? I think ftp_string_read() will not work properly on non ASCII
      + * (EBCDIC) machines either.
      + */
      +static apr_status_t ftp_string_read(conn_rec *c, apr_bucket_brigade *bb,
      +        char *buff, apr_size_t bufflen, int *eos)
      +{
      +    apr_bucket *e;
      +    apr_status_t rv;
      +    char *pos = buff;
      +    char *response;
      +    int found = 0;
      +    apr_size_t len;
      +
      +    /* start with an empty string */
      +    buff[0] = 0;
      +    *eos = 0;
      +
      +    /* loop through each brigade */
      +    while (!found) {
      +        /* get brigade from network one line at a time */
      +        if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb,
      +                                                AP_MODE_GETLINE,
      +                                                APR_BLOCK_READ,
      +                                                0))) {
      +            return rv;
      +        }
      +        /* loop through each bucket */
      +        while (!found) {
      +            if (*eos || APR_BRIGADE_EMPTY(bb)) {
      +                /* The connection aborted or timed out */
      +                return APR_ECONNABORTED;
      +            }
      +            e = APR_BRIGADE_FIRST(bb);
      +            if (APR_BUCKET_IS_EOS(e)) {
      +                *eos = 1;
      +            }
      +            else {
      +                if (APR_SUCCESS != (rv = apr_bucket_read(e,
      +                                                         (const char **)&response,
      +                                                         &len,
      +                                                         APR_BLOCK_READ))) {
      +                    return rv;
      +                }
      +                /*
      +                 * is string LF terminated?
      +                 * XXX: This check can be made more efficient by simply checking
      +                 * if the last character in the 'response' buffer is an ASCII_LF.
      +                 * See ap_rgetline() for an example.
      +                 */
      +                if (memchr(response, APR_ASCII_LF, len)) {
      +                    found = 1;
      +                }
      +                /* concat strings until buff is full - then throw the data away */
      +                if (len > ((bufflen-1)-(pos-buff))) {
      +                    len = (bufflen-1)-(pos-buff);
      +                }
      +                if (len > 0) {
      +                    memcpy(pos, response, len);
      +                    pos += len;
      +                }
      +            }
      +            apr_bucket_delete(e);
      +        }
      +        *pos = '\0';
      +    }
      +
      +    return APR_SUCCESS;
      +}
      +
       /*
        * Canonicalise ftp URLs.
        */
      @@ -228,8 +302,7 @@ static int proxy_ftp_canon(request_rec *r, char *url)
           }
           def_port = apr_uri_port_of_scheme("ftp");
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: FTP: canonicalising URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
       
           port = def_port;
           err = ap_proxy_canon_netloc(p, &url, &user, &password, &host, &port);
      @@ -314,12 +387,12 @@ static int ftp_getrc_msg(conn_rec *ftp_ctrl, apr_bucket_brigade *bb, char *msgbu
           apr_status_t rv;
           int eos;
       
      -    if (APR_SUCCESS != (rv = ap_proxy_string_read(ftp_ctrl, bb, response, sizeof(response), &eos))) {
      +    if (APR_SUCCESS != (rv = ftp_string_read(ftp_ctrl, bb, response, sizeof(response), &eos))) {
               return -1;
           }
       /*
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
      -                 "proxy: <FTP: %s", response);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(03233)
      +                 "<%s", response);
       */
           if (!apr_isdigit(response[0]) || !apr_isdigit(response[1]) ||
           !apr_isdigit(response[2]) || (response[3] != ' ' && response[3] != '-'))
      @@ -333,7 +406,7 @@ static int ftp_getrc_msg(conn_rec *ftp_ctrl, apr_bucket_brigade *bb, char *msgbu
               memcpy(buff, response, 3);
               buff[3] = ' ';
               do {
      -            if (APR_SUCCESS != (rv = ap_proxy_string_read(ftp_ctrl, bb, response, sizeof(response), &eos))) {
      +            if (APR_SUCCESS != (rv = ftp_string_read(ftp_ctrl, bb, response, sizeof(response), &eos))) {
                       return -1;
                   }
                   mb = apr_cpystrn(mb, response + (' ' == response[0] ? 1 : 4), me - mb);
      @@ -374,7 +447,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
           apr_bucket_brigade *out = apr_brigade_create(p, c->bucket_alloc);
           apr_status_t rv;
       
      -    register int n;
      +    int n;
           char *dir, *path, *reldir, *site, *str, *type;
       
           const char *pwd = apr_table_get(r->notes, "Directory-PWD");
      @@ -457,7 +530,9 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
                       " </head>\n"
                       " <body>\n  <h2>Directory of "
                       "<a href=\"/\">%s</a>/%s",
      -                site, basedir, escpath, site, basedir, escpath, site, str);
      +                ap_escape_html(p, site), basedir, escpath,
      +                ap_escape_uri(p, site), basedir, escpath,
      +                ap_escape_uri(p, site), str);
       
               APR_BRIGADE_INSERT_TAIL(out, apr_bucket_pool_create(str, strlen(str),
                                                                 p, c->bucket_alloc));
      @@ -558,8 +633,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
                   /* len+1 to leave space for the trailing nil char */
                   apr_cpystrn(ctx->buffer+strlen(ctx->buffer), response, len+1);
       
      -            APR_BUCKET_REMOVE(e);
      -            apr_bucket_destroy(e);
      +            apr_bucket_delete(e);
               }
       
               /* EOS? jump to footer */
      @@ -615,8 +689,9 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
                   filename = strrchr(ctx->buffer, ' ');
                   if (filename == NULL) {
                       /* Line is broken.  Ignore it. */
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                             "proxy_ftp: could not parse line %s", ctx->buffer);
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01034)
      +                              "proxy_ftp: could not parse line %s",
      +                              ctx->buffer);
                       /* erase buffer for next time around */
                       ctx->buffer[0] = 0;
                       continue;  /* while state is BODY */
      @@ -745,8 +820,7 @@ proxy_ftp_command(const char *cmd, request_rec *r, conn_rec *ftp_ctrl,
                   *crlf = '\0';
               if (strncmp(message,"PASS ", 5) == 0)
                   strcpy(&message[5], "****");
      -        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                     "proxy:>FTP: %s", message);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, ">%s", message);
           }
       
           rc = ftp_getrc_msg(ftp_ctrl, bb, message, sizeof message);
      @@ -755,8 +829,7 @@ proxy_ftp_command(const char *cmd, request_rec *r, conn_rec *ftp_ctrl,
           if ((crlf = strchr(message, '\r')) != NULL ||
               (crlf = strchr(message, '\n')) != NULL)
               *crlf = '\0';
      -    ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                 "proxy:<FTP: %3.3u %s", rc, message);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "<%3.3u %s", rc, message);
       
           if (pmessage != NULL)
               *pmessage = apr_pstrdup(r->pool, message);
      @@ -846,8 +919,8 @@ static int ftp_unauthorized(request_rec *r, int log_it)
            * guessing attempts)
            */
           if (log_it)
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                      "proxy: missing or failed auth to %s",
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(01035)
      +                      "missing or failed auth to %s",
                             apr_uri_unparse(r->pool,
                                        &r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
       
      @@ -900,7 +973,6 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
           apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
           char *buf, *connectname;
           apr_port_t connectport;
      -    char buffer[MAX_STRING_LEN];
           char *ftpmessage = NULL;
           char *path, *strp, *type_suffix, *cwd = NULL;
           apr_uri_t uri;
      @@ -926,17 +998,17 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
       
           /* is this for us? */
           if (proxyhost) {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: declining URL %s - proxyhost %s specified:", url, proxyhost);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                      "declining URL %s - proxyhost %s specified:", url,
      +                      proxyhost);
               return DECLINED;        /* proxy connections are via HTTP */
           }
           if (strncasecmp(url, "ftp:", 4)) {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: declining URL %s - not ftp:", url);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                      "declining URL %s - not ftp:", url);
               return DECLINED;        /* only interested in FTP */
           }
      -    ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                 "proxy: FTP: serving URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "serving URL %s", url);
       
       
           /*
      @@ -1032,14 +1104,13 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               password = "apache-proxy@";
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -       "proxy: FTP: connecting %s to %s:%d", url, connectname, connectport);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01036)
      +                  "connecting %s to %s:%d", url, connectname, connectport);
       
           if (worker->s->is_address_reusable) {
               if (!worker->cp->addr) {
                   if ((err = PROXY_THREAD_LOCK(worker->balancer)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server,
      -                             "proxy: FTP: lock");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, APLOGNO(01037) "lock");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
               }
      @@ -1058,8 +1129,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
           if (worker->s->is_address_reusable && !worker->cp->addr) {
               worker->cp->addr = connect_addr;
               if ((uerr = PROXY_THREAD_UNLOCK(worker->balancer)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, uerr, r->server,
      -                         "proxy: FTP: unlock");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, APLOGNO(01038) "unlock");
               }
           }
           /*
      @@ -1073,7 +1143,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
           }
       
           /* check if ProxyBlock directive on this host */
      -    if (OK != ap_proxy_checkproxyblock(r, conf, connect_addr)) {
      +    if (OK != ap_proxy_checkproxyblock2(r, conf, connectname, connect_addr)) {
               return ap_proxyerror(r, HTTP_FORBIDDEN,
                                    "Connect to remote machine blocked");
           }
      @@ -1103,9 +1173,9 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
       
       
           if (ap_proxy_connect_backend("FTP", backend, worker, r->server)) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: FTP: an error occurred creating a new connection to %pI (%s)",
      -                     connect_addr, connectname);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01039)
      +                      "an error occurred creating a new connection to %pI (%s)",
      +                      connect_addr, connectname);
               proxy_ftp_cleanup(r, backend);
               return HTTP_SERVICE_UNAVAILABLE;
           }
      @@ -1122,8 +1192,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
           origin = backend->connection;
           sock = backend->sock;
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: FTP: control connection complete");
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  "control connection complete");
       
       
           /*
      @@ -1257,7 +1327,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                   break;
               *strp = '\0';
       
      -        len = decodeenc(path); /* Note! This decodes a %2f -> "/" */
      +        decodeenc(path); /* Note! This decodes a %2f -> "/" */
       
               if (strchr(path, '/')) { /* are there now any '/' characters? */
                   return ftp_proxyerror(r, backend, HTTP_BAD_REQUEST,
      @@ -1305,8 +1375,6 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
       
           /* set up data connection - EPSV */
           {
      -        apr_sockaddr_t *data_addr;
      -        char *data_ip;
               apr_port_t data_port;
       
               /*
      @@ -1336,15 +1404,36 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                   data_port = parse_epsv_reply(ftpmessage);
       
                   if (data_port) {
      -                apr_sockaddr_t *epsv_addr;
      -
      -                ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                             "proxy: FTP: EPSV contacting remote host on port %d",
      -                             data_port);
      +                apr_sockaddr_t *remote_addr, epsv_addr;
      +
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                              "EPSV contacting remote host on port %d", data_port);
      +
      +                /* Retrieve the client's address. */
      +                rv = apr_socket_addr_get(&remote_addr, APR_REMOTE, sock);
      +                if (rv == APR_SUCCESS) {
      +                    /* Take a shallow copy of the server address to
      +                     * modify; the _addr_get function gives back a
      +                     * pointer to the socket's internal structure.
      +                     * This is awkward given current APR network
      +                     * interfaces. */
      +                    epsv_addr = *remote_addr;
      +                    epsv_addr.port = data_port;
      +#if APR_HAVE_IPV6
      +                    if (epsv_addr.family == APR_INET6) {
      +                        epsv_addr.sa.sin6.sin6_port = htons(data_port);
      +                    }
      +                    else
      +#endif
      +                    {
      +                        epsv_addr.sa.sin.sin_port = htons(data_port);
      +                    }
      +                    rv = apr_socket_create(&data_sock, epsv_addr.family, SOCK_STREAM, 0, r->pool);
      +                }
       
      -                if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                  "proxy: FTP: error creating EPSV socket");
      +                if (rv != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01040) 
      +                                  "could not establish socket for client data connection");
                           proxy_ftp_cleanup(r, backend);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
      @@ -1352,28 +1441,29 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                       if (conf->recv_buffer_size > 0
                               && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
                                                           conf->recv_buffer_size))) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                  "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01041)
      +                                  "apr_socket_opt_set(SO_RCVBUF): Failed to "
      +                                  "set ProxyReceiveBufferSize, using default");
                       }
       
                       rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
                       if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                 "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01042)
      +                                  "apr_socket_opt_set(APR_TCP_NODELAY): "
      +                                  "Failed to set");
                       }
       
      -                /* make the connection */
      -                apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
      -                apr_sockaddr_ip_get(&data_ip, data_addr);
      -                apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port, 0, p);
      -                rv = apr_socket_connect(data_sock, epsv_addr);
      +                rv = apr_socket_connect(data_sock, &epsv_addr);
                       if (rv != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                 "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?", epsv_addr);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01043)
      +                                  "EPSV attempt to connect to %pI failed - "
      +                                  "Firewall/NAT?", &epsv_addr);
                           return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, apr_psprintf(r->pool,
      -                                                                           "EPSV attempt to connect to %pI failed - firewall/NAT?", epsv_addr));
      +                                                                           "EPSV attempt to connect to %pI failed - firewall/NAT?", &epsv_addr));
                       }
                       else {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                                  "connected data socket to %pI", &epsv_addr);
                           connect = 1;
                       }
                   }
      @@ -1426,13 +1516,13 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
       
                       apr_sockaddr_t *pasv_addr;
                       apr_port_t pasvport = (p1 << 8) + p0;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                          "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d",
      -                             h3, h2, h1, h0, pasvport);
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01044)
      +                              "PASV contacting host %d.%d.%d.%d:%d",
      +                              h3, h2, h1, h0, pasvport);
       
                       if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                  "proxy: error creating PASV socket");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01045)
      +                                  "error creating PASV socket");
                           proxy_ftp_cleanup(r, backend);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
      @@ -1440,22 +1530,23 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                       if (conf->recv_buffer_size > 0
                               && (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
                                                           conf->recv_buffer_size))) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                  "proxy: FTP: apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01046)
      +                                  "apr_socket_opt_set(SO_RCVBUF): Failed to set ProxyReceiveBufferSize, using default");
                       }
       
                       rv = apr_socket_opt_set(data_sock, APR_TCP_NODELAY, 1);
                       if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                                 "apr_socket_opt_set(APR_TCP_NODELAY): Failed to set");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01047)
      +                                  "apr_socket_opt_set(APR_TCP_NODELAY): "
      +                                  "Failed to set");
                       }
       
                       /* make the connection */
                       apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p);
                       rv = apr_socket_connect(data_sock, pasv_addr);
                       if (rv != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
      -                                 "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01048)
      +                                  "PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
                           return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, apr_psprintf(r->pool,
                                                                                  "PASV attempt to connect to %pI failed - firewall/NAT?", pasv_addr));
                       }
      @@ -1475,8 +1566,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               unsigned int h0, h1, h2, h3, p0, p1;
       
               if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: FTP: error creating local socket");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01049)
      +                          "error creating local socket");
                   proxy_ftp_cleanup(r, backend);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
      @@ -1487,8 +1578,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               if ((rv = apr_socket_opt_set(local_sock, APR_SO_REUSEADDR, one))
                       != APR_SUCCESS) {
       #ifndef _OSD_POSIX              /* BS2000 has this option "always on" */
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: FTP: error setting reuseaddr option");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01050)
      +                          "error setting reuseaddr option");
                   proxy_ftp_cleanup(r, backend);
                   return HTTP_INTERNAL_SERVER_ERROR;
       #endif                          /* _OSD_POSIX */
      @@ -1497,16 +1588,16 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
       
               if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -            "proxy: FTP: error binding to ftp data socket %pI", local_addr);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01051)
      +                          "error binding to ftp data socket %pI", local_addr);
                   proxy_ftp_cleanup(r, backend);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       
               /* only need a short queue */
               if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: FTP: error listening to ftp data socket %pI", local_addr);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01052)
      +                          "error listening to ftp data socket %pI", local_addr);
                   proxy_ftp_cleanup(r, backend);
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
      @@ -1532,7 +1623,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                                             "Error reading from remote server");
                   }
                   if (rc != 200) {
      -                return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, buffer);
      +                return ftp_proxyerror(r, backend, HTTP_BAD_GATEWAY, ftpmessage);
                   }
       
                   /* signal that we must use the EPRT/PORT loop */
      @@ -1605,8 +1696,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                        size = ftpmessage; /* already pstrdup'ed: no copy necessary */
               }
               else if (rc == 550) {    /* Not a regular file */
      -            ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
      -                         "proxy: FTP: SIZE shows this is a directory");
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
      +                          "SIZE shows this is a directory");
                   dirlisting = 1;
                   rc = proxy_ftp_command(apr_pstrcat(p, "CWD ",
                                  ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
      @@ -1652,7 +1743,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               if (len != 0)
                   buf = apr_pstrcat(p, "LIST ", path, CRLF, NULL);
               else if (cwd == NULL || strchr(cwd, '/') != NULL)
      -            buf = apr_pstrcat(p, "LIST -lag", CRLF, NULL);
      +            buf = "LIST -lag" CRLF;
               else
                   buf = "LIST" CRLF;
           }
      @@ -1674,39 +1765,39 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                                      r, origin, bb, &ftpmessage);
               /* then extract the Last-Modified time from it (YYYYMMDDhhmmss or YYYYMMDDhhmmss.xxx GMT). */
               if (rc == 213) {
      -        struct {
      -            char YYYY[4+1];
      -        char MM[2+1];
      -        char DD[2+1];
      -        char hh[2+1];
      -        char mm[2+1];
      -        char ss[2+1];
      -        } time_val;
      -        if (6 == sscanf(ftpmessage, "%4[0-9]%2[0-9]%2[0-9]%2[0-9]%2[0-9]%2[0-9]",
      -            time_val.YYYY, time_val.MM, time_val.DD, time_val.hh, time_val.mm, time_val.ss)) {
      +            struct {
      +                char YYYY[4+1];
      +                char MM[2+1];
      +                char DD[2+1];
      +                char hh[2+1];
      +                char mm[2+1];
      +                char ss[2+1];
      +            } time_val;
      +            if (6 == sscanf(ftpmessage, "%4[0-9]%2[0-9]%2[0-9]%2[0-9]%2[0-9]%2[0-9]",
      +                time_val.YYYY, time_val.MM, time_val.DD, time_val.hh, time_val.mm, time_val.ss)) {
                       struct tm tms;
      -        memset (&tms, '\0', sizeof tms);
      -        tms.tm_year = atoi(time_val.YYYY) - 1900;
      -        tms.tm_mon  = atoi(time_val.MM)   - 1;
      -        tms.tm_mday = atoi(time_val.DD);
      -        tms.tm_hour = atoi(time_val.hh);
      -        tms.tm_min  = atoi(time_val.mm);
      -        tms.tm_sec  = atoi(time_val.ss);
      +                memset (&tms, '\0', sizeof tms);
      +                tms.tm_year = atoi(time_val.YYYY) - 1900;
      +                tms.tm_mon  = atoi(time_val.MM)   - 1;
      +                tms.tm_mday = atoi(time_val.DD);
      +                tms.tm_hour = atoi(time_val.hh);
      +                tms.tm_min  = atoi(time_val.mm);
      +                tms.tm_sec  = atoi(time_val.ss);
       #ifdef HAVE_TIMEGM /* Does system have timegm()? */
      -        mtime = timegm(&tms);
      -        mtime *= APR_USEC_PER_SEC;
      +                mtime = timegm(&tms);
      +                mtime *= APR_USEC_PER_SEC;
       #elif HAVE_GMTOFF /* does struct tm have a member tm_gmtoff? */
                       /* mktime will subtract the local timezone, which is not what we want.
      -         * Add it again because the MDTM string is GMT
      -         */
      -        mtime = mktime(&tms);
      -        mtime += tms.tm_gmtoff;
      -        mtime *= APR_USEC_PER_SEC;
      +                 * Add it again because the MDTM string is GMT
      +                 */
      +                mtime = mktime(&tms);
      +                mtime += tms.tm_gmtoff;
      +                mtime *= APR_USEC_PER_SEC;
       #else
      -        mtime = 0L;
      +                mtime = 0L;
       #endif
                   }
      -    }
      +        }
       #endif /* USE_MDTM */
       /* FIXME: Handle range requests - send REST */
               buf = apr_pstrcat(p, "RETR ", ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL);
      @@ -1738,8 +1829,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                                     "Error reading from remote server");
           }
           if (rc == 550) {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server,
      -                     "proxy: FTP: RETR failed, trying LIST instead");
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,
      +                      "RETR failed, trying LIST instead");
       
               /* Directory Listings should always be fetched in ASCII mode */
               dirlisting = 1;
      @@ -1805,14 +1896,14 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               if (xfer_type != 'A' && size != NULL) {
                   /* We "trust" the ftp server to really serve (size) bytes... */
                   apr_table_setn(r->headers_out, "Content-Length", size);
      -            ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                         "proxy: FTP: Content-Length set to %s", size);
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                          "Content-Length set to %s", size);
               }
           }
           if (r->content_type) {
               apr_table_setn(r->headers_out, "Content-Type", r->content_type);
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: Content-Type set to %s", r->content_type);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                      "Content-Type set to %s", r->content_type);
           }
       
       #if defined(USE_MDTM) && (defined(HAVE_TIMEGM) || defined(HAVE_GMTOFF))
      @@ -1820,8 +1911,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               char datestr[APR_RFC822_DATE_LEN];
               apr_rfc822_date(datestr, mtime);
               apr_table_set(r->headers_out, "Last-Modified", datestr);
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: Last-Modified set to %s", datestr);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                      "Last-Modified set to %s", datestr);
           }
       #endif /* USE_MDTM */
       
      @@ -1834,9 +1925,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
       
           /* set content-encoding (not for dir listings, they are uncompressed)*/
           if (r->content_encoding != NULL && r->content_encoding[0] != '\0') {
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: Content-Encoding set to %s",
      -                     r->content_encoding);
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                      "Content-Encoding set to %s", r->content_encoding);
               apr_table_setn(r->headers_out, "Content-Encoding", r->content_encoding);
           }
       
      @@ -1851,8 +1941,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                       break;
                   }
                   else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                            "proxy: FTP: failed to accept data connection");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01053)
      +                              "failed to accept data connection");
                       proxy_ftp_cleanup(r, backend);
                       return HTTP_BAD_GATEWAY;
                   }
      @@ -1867,8 +1957,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                * the peer reset the connection already; ap_run_create_connection() closed
                * the socket
                */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -          "proxy: FTP: an error occurred creating the transfer connection");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01054)
      +                      "an error occurred creating the transfer connection");
               proxy_ftp_cleanup(r, backend);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -1881,9 +1971,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
           /* set up the connection filters */
           rc = ap_run_pre_connection(data, data_sock);
           if (rc != OK && rc != DONE) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: FTP: pre_connection setup failed (%d)",
      -                     rc);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01055)
      +                      "pre_connection setup failed (%d)", rc);
               data->aborted = 1;
               proxy_ftp_cleanup(r, backend);
               return rc;
      @@ -1908,8 +1997,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
               apr_bucket *e;
               int finish = FALSE;
       
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: start body send");
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "start body send");
       
               /* read the body, pass it to the output filters */
               while (ap_get_brigade(data->input_filters,
      @@ -1921,14 +2009,12 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                   {
                       apr_off_t readbytes;
                       apr_brigade_length(bb, 0, &readbytes);
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      -                             r->server, "proxy (PID %d): readbytes: %#x",
      -                             getpid(), readbytes);
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01056)
      +                             "proxy: readbytes: %#x", readbytes);
                   }
       #endif
                   /* sanity check */
                   if (APR_BRIGADE_EMPTY(bb)) {
      -                apr_brigade_cleanup(bb);
                       break;
                   }
       
      @@ -1944,8 +2030,8 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                           apr_socket_close(data_sock);
                       }
                       data_sock = NULL;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                             "proxy: FTP: data connection closed");
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01057)
      +                              "data connection closed");
                       /* signal that we must leave */
                       finish = TRUE;
                   }
      @@ -1971,19 +2057,17 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
                       break;
                   }
               }
      -        ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                     "proxy: FTP: end body send");
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "end body send");
       
           }
           if (data_sock) {
               ap_flush_conn(data);
               apr_socket_close(data_sock);
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: FTP: data connection closed");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01058) "data connection closed");
           }
       
           /* Retrieve the final response for the RETR or LIST commands */
      -    rc = proxy_ftp_command(NULL, r, origin, bb, &ftpmessage);
      +    proxy_ftp_command(NULL, r, origin, bb, &ftpmessage);
           apr_brigade_cleanup(bb);
       
           /*
      @@ -1994,8 +2078,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
            */
       
           /* finish */
      -    rc = proxy_ftp_command("QUIT" CRLF,
      -                           r, origin, bb, &ftpmessage);
      +    proxy_ftp_command("QUIT" CRLF, r, origin, bb, &ftpmessage);
           /* responses: 221, 500 */
           /* 221 Service closing control connection. */
           /* 500 Syntax error, command unrecognized. */
      diff --git a/modules/proxy/mod_proxy_ftp.dep b/modules/proxy/mod_proxy_ftp.dep
      new file mode 100644
      index 00000000000..46b78fe7b12
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_ftp.dep
      @@ -0,0 +1,74 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_ftp.mak
      +
      +.\mod_proxy_ftp.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_ftp.mak b/modules/proxy/mod_proxy_ftp.mak
      new file mode 100644
      index 00000000000..0b1ca30d663
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_ftp.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_ftp.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_ftp - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_ftp - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_ftp - Win32 Release" && "$(CFG)" != "mod_proxy_ftp - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_ftp.mak" CFG="mod_proxy_ftp - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_ftp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_ftp - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_ftp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_ftp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_ftp.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ftp.res"
      +	-@erase "$(INTDIR)\mod_proxy_ftp_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_ftp_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_ftp_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_ftp.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_ftp.so" /d LONG_NAME="proxy_ftp_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_ftp.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_ftp.pdb" /debug /out:"$(OUTDIR)\mod_proxy_ftp.so" /implib:"$(OUTDIR)\mod_proxy_ftp.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_ftp.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_ftp.obj" \
      +	"$(INTDIR)\mod_proxy_ftp.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_ftp.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_ftp.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_ftp.so"
      +   if exist .\Release\mod_proxy_ftp.so.manifest mt.exe -manifest .\Release\mod_proxy_ftp.so.manifest -outputresource:.\Release\mod_proxy_ftp.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_ftp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_ftp.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_ftp.obj"
      +	-@erase "$(INTDIR)\mod_proxy_ftp.res"
      +	-@erase "$(INTDIR)\mod_proxy_ftp_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_ftp_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_ftp.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_ftp_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_ftp.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_ftp.so" /d LONG_NAME="proxy_ftp_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_ftp.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_ftp.pdb" /debug /out:"$(OUTDIR)\mod_proxy_ftp.so" /implib:"$(OUTDIR)\mod_proxy_ftp.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_ftp.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_ftp.obj" \
      +	"$(INTDIR)\mod_proxy_ftp.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_ftp.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_ftp.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_ftp.so"
      +   if exist .\Debug\mod_proxy_ftp.so.manifest mt.exe -manifest .\Debug\mod_proxy_ftp.so.manifest -outputresource:.\Debug\mod_proxy_ftp.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_ftp.dep")
      +!INCLUDE "mod_proxy_ftp.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_ftp.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_ftp - Win32 Release" || "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +SOURCE=.\mod_proxy_ftp.c
      +
      +"$(INTDIR)\mod_proxy_ftp.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_ftp - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_ftp.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_ftp.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_ftp.so" /d LONG_NAME="proxy_ftp_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_ftp - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_ftp.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_ftp.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_ftp.so" /d LONG_NAME="proxy_ftp_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_hcheck.c b/modules/proxy/mod_proxy_hcheck.c
      new file mode 100644
      index 00000000000..0dee1b45950
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_hcheck.c
      @@ -0,0 +1,1177 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +#include "mod_proxy.h"
      +#include "mod_watchdog.h"
      +#include "ap_slotmem.h"
      +#include "ap_expr.h"
      +#if APR_HAS_THREADS
      +#include "apr_thread_pool.h"
      +#endif
      +
      +module AP_MODULE_DECLARE_DATA proxy_hcheck_module;
      +
      +#define HCHECK_WATHCHDOG_NAME ("_proxy_hcheck_")
      +#define HC_THREADPOOL_SIZE (16)
      +
      +/* Why? So we can easily set/clear HC_USE_THREADS during dev testing */
      +#if APR_HAS_THREADS
      +#define HC_USE_THREADS 1
      +#else
      +#define HC_USE_THREADS 0
      +typedef void apr_thread_pool_t;
      +#endif
      +
      +typedef struct {
      +    char *name;
      +    hcmethod_t method;
      +    int passes;
      +    int fails;
      +    apr_interval_time_t interval;
      +    char *hurl;
      +    char *hcexpr;
      +} hc_template_t;
      +
      +typedef struct {
      +    char *expr;
      +    ap_expr_info_t *pexpr;       /* parsed expression */
      +} hc_condition_t;
      +
      +typedef struct {
      +    apr_pool_t *p;
      +    apr_bucket_alloc_t *ba;
      +    apr_array_header_t *templates;
      +    apr_table_t *conditions;
      +    ap_watchdog_t *watchdog;
      +    apr_hash_t *hcworkers;
      +    apr_thread_pool_t *hctp;
      +    int tpsize;
      +    server_rec *s;
      +} sctx_t;
      +
      +/* Used in the HC worker via the context field */
      +typedef struct {
      +    char *path;      /* The path of the original worker URL */
      +    char *req;       /* pre-formatted HTTP/AJP request */
      +    proxy_worker *w; /* Pointer to the actual worker */
      +} wctx_t;
      +
      +typedef struct {
      +    apr_pool_t *ptemp;
      +    sctx_t *ctx;
      +    proxy_worker *worker;
      +    apr_time_t now;
      +} baton_t;
      +
      +static void *hc_create_config(apr_pool_t *p, server_rec *s)
      +{
      +    sctx_t *ctx = (sctx_t *) apr_palloc(p, sizeof(sctx_t));
      +    apr_pool_create(&ctx->p, p);
      +    ctx->ba = apr_bucket_alloc_create(p);
      +    ctx->templates = apr_array_make(p, 10, sizeof(hc_template_t));
      +    ctx->conditions = apr_table_make(p, 10);
      +    ctx->hcworkers = apr_hash_make(p);
      +    ctx->tpsize = HC_THREADPOOL_SIZE;
      +    ctx->s = s;
      +
      +    return ctx;
      +}
      +
      +/*
      + * This serves double duty by not only validating (and creating)
      + * the health-check template, but also ties into set_worker_param()
      + * which does the actual setting of worker params in shm.
      + */
      +static const char *set_worker_hc_param(apr_pool_t *p,
      +                                    server_rec *s,
      +                                    proxy_worker *worker,
      +                                    const char *key,
      +                                    const char *val,
      +                                    void *v)
      +{
      +    int ival;
      +    hc_template_t *temp;
      +    sctx_t *ctx = (sctx_t *) ap_get_module_config(s->module_config,
      +                                                  &proxy_hcheck_module);
      +    if (!worker && !v) {
      +        return "Bad call to set_worker_hc_param()";
      +    }
      +    temp = (hc_template_t *)v;
      +    if (!strcasecmp(key, "hctemplate")) {
      +        hc_template_t *template;
      +        template = (hc_template_t *)ctx->templates->elts;
      +        for (ival = 0; ival < ctx->templates->nelts; ival++, template++) {
      +            if (!strcasecmp(template->name, val)) {
      +                if (worker) {
      +                    worker->s->method = template->method;
      +                    worker->s->interval = template->interval;
      +                    worker->s->passes = template->passes;
      +                    worker->s->fails = template->fails;
      +                    PROXY_STRNCPY(worker->s->hcuri, template->hurl);
      +                    PROXY_STRNCPY(worker->s->hcexpr, template->hcexpr);
      +                } else {
      +                    temp->method = template->method;
      +                    temp->interval = template->interval;
      +                    temp->passes = template->passes;
      +                    temp->fails = template->fails;
      +                    temp->hurl = apr_pstrdup(p, template->hurl);
      +                    temp->hcexpr = apr_pstrdup(p, template->hcexpr);
      +                }
      +                return NULL;
      +            }
      +        }
      +        return apr_psprintf(p, "Unknown ProxyHCTemplate name: %s", val);
      +    }
      +    else if (!strcasecmp(key, "hcmethod")) {
      +        proxy_hcmethods_t *method = proxy_hcmethods;
      +        for (; method->name; method++) {
      +            if (!strcasecmp(val, method->name)) {
      +                if (!method->implemented) {
      +                    return apr_psprintf(p, "Health check method %s not (yet) implemented",
      +                                        val);
      +                }
      +                if (worker) {
      +                    worker->s->method = method->method;
      +                } else {
      +                    temp->method = method->method;
      +                }
      +                return NULL;
      +            }
      +        }
      +        return "Unknown method";
      +    }
      +    else if (!strcasecmp(key, "hcinterval")) {
      +        ival = atoi(val);
      +        if (ival < HCHECK_WATHCHDOG_INTERVAL)
      +            return apr_psprintf(p, "Interval must be a positive value greater than %d seconds",
      +                                HCHECK_WATHCHDOG_INTERVAL);
      +        if (worker) {
      +            worker->s->interval = apr_time_from_sec(ival);
      +        } else {
      +            temp->interval = apr_time_from_sec(ival);
      +        }
      +    }
      +    else if (!strcasecmp(key, "hcpasses")) {
      +        ival = atoi(val);
      +        if (ival < 0)
      +            return "Passes must be a positive value";
      +        if (worker) {
      +            worker->s->passes = ival;
      +        } else {
      +            temp->passes = ival;
      +        }
      +    }
      +    else if (!strcasecmp(key, "hcfails")) {
      +        ival = atoi(val);
      +        if (ival < 0)
      +            return "Fails must be a positive value";
      +        if (worker) {
      +            worker->s->fails = ival;
      +        } else {
      +            temp->fails = ival;
      +        }
      +    }
      +    else if (!strcasecmp(key, "hcuri")) {
      +        if (strlen(val) >= sizeof(worker->s->hcuri))
      +            return apr_psprintf(p, "Health check uri length must be < %d characters",
      +                    (int)sizeof(worker->s->hcuri));
      +        if (worker) {
      +            PROXY_STRNCPY(worker->s->hcuri, val);
      +        } else {
      +            temp->hurl = apr_pstrdup(p, val);
      +        }
      +    }
      +    else if (!strcasecmp(key, "hcexpr")) {
      +        hc_condition_t *cond;
      +        cond = (hc_condition_t *)apr_table_get(ctx->conditions, val);
      +        if (!cond) {
      +            return apr_psprintf(p, "Unknown health check condition expr: %s", val);
      +        }
      +        /* This check is wonky... a known expr can't be this big. Check anyway */
      +        if (strlen(val) >= sizeof(worker->s->hcexpr))
      +            return apr_psprintf(p, "Health check uri length must be < %d characters",
      +                    (int)sizeof(worker->s->hcexpr));
      +        if (worker) {
      +            PROXY_STRNCPY(worker->s->hcexpr, val);
      +        } else {
      +            temp->hcexpr = apr_pstrdup(p, val);
      +        }
      +    }
      +  else {
      +        return "unknown Worker hcheck parameter";
      +    }
      +    return NULL;
      +}
      +
      +static const char *set_hc_condition(cmd_parms *cmd, void *dummy, const char *arg)
      +{
      +    char *name = NULL;
      +    char *expr;
      +    sctx_t *ctx;
      +    hc_condition_t *cond;
      +
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
      +    if (err)
      +        return err;
      +    ctx = (sctx_t *) ap_get_module_config(cmd->server->module_config,
      +                                          &proxy_hcheck_module);
      +
      +    name = ap_getword_conf(cmd->pool, &arg);
      +    if (!*name) {
      +        return apr_pstrcat(cmd->temp_pool, "Missing expression name for ",
      +                           cmd->cmd->name, NULL);
      +    }
      +    if (strlen(name) > (PROXY_WORKER_MAX_SCHEME_SIZE - 1)) {
      +        return apr_psprintf(cmd->temp_pool, "Expression name limited to %d characters",
      +                           (PROXY_WORKER_MAX_SCHEME_SIZE - 1));
      +    }
      +    /* get expr. Allow fancy new {...} quoting style */
      +    expr = ap_getword_conf2(cmd->temp_pool, &arg);
      +    if (!*expr) {
      +        return apr_pstrcat(cmd->temp_pool, "Missing expression for ",
      +                           cmd->cmd->name, NULL);
      +    }
      +    cond = apr_palloc(cmd->pool, sizeof(hc_condition_t));
      +    cond->pexpr = ap_expr_parse_cmd(cmd, expr, 0, &err, NULL);
      +    if (err) {
      +        return apr_psprintf(cmd->temp_pool, "Could not parse expression \"%s\": %s",
      +                            expr, err);
      +    }
      +    cond->expr = apr_pstrdup(cmd->pool, expr);
      +    apr_table_setn(ctx->conditions, name, (void *)cond);
      +    expr = ap_getword_conf(cmd->temp_pool, &arg);
      +    if (*expr) {
      +        return "error: extra parameter(s)";
      +    }
      +
      +    return NULL;
      +}
      +
      +static const char *set_hc_template(cmd_parms *cmd, void *dummy, const char *arg)
      +{
      +    char *name = NULL;
      +    char *word, *val;
      +    hc_template_t *template;
      +    sctx_t *ctx;
      +
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
      +    if (err)
      +        return err;
      +    ctx = (sctx_t *) ap_get_module_config(cmd->server->module_config,
      +                                          &proxy_hcheck_module);
      +
      +    name = ap_getword_conf(cmd->temp_pool, &arg);
      +    if (!*name) {
      +        return apr_pstrcat(cmd->temp_pool, "Missing template name for ",
      +                           cmd->cmd->name, NULL);
      +    }
      +
      +    template = (hc_template_t *)apr_array_push(ctx->templates);
      +
      +    template->name = apr_pstrdup(cmd->pool, name);
      +    template->method = template->passes = template->fails = 1;
      +    template->interval = apr_time_from_sec(HCHECK_WATHCHDOG_DEFAULT_INTERVAL);
      +    template->hurl = NULL;
      +    template->hcexpr = NULL;
      +    while (*arg) {
      +        word = ap_getword_conf(cmd->pool, &arg);
      +        val = strchr(word, '=');
      +        if (!val) {
      +            return "Invalid ProxyHCTemplate parameter. Parameter must be "
      +                   "in the form 'key=value'";
      +        }
      +        else
      +            *val++ = '\0';
      +        err = set_worker_hc_param(cmd->pool, ctx->s, NULL, word, val, template);
      +
      +        if (err) {
      +            /* get rid of recently pushed (bad) template */
      +            apr_array_pop(ctx->templates);
      +            return apr_pstrcat(cmd->temp_pool, "ProxyHCTemplate: ", err, " ", word, "=", val, "; ", name, NULL);
      +        }
      +        /* No error means we have a valid template */
      +    }
      +
      +    return NULL;
      +}
      +
      +#if HC_USE_THREADS
      +static const char *set_hc_tpsize (cmd_parms *cmd, void *dummy, const char *arg)
      +{
      +    sctx_t *ctx;
      +
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
      +    if (err)
      +        return err;
      +    ctx = (sctx_t *) ap_get_module_config(cmd->server->module_config,
      +                                          &proxy_hcheck_module);
      +
      +    ctx->tpsize = atoi(arg);
      +    if (ctx->tpsize < 0)
      +        return "Invalid ProxyHCTPsize parameter. Parameter must be "
      +               ">= 0";
      +    return NULL;
      +}
      +#endif
      +
      +/*
      + * Create a dummy request rec, simply so we can use ap_expr.
      + * Use our short-lived poll for bucket_alloc
      + */
      +static request_rec *create_request_rec(apr_pool_t *p1, conn_rec *conn, const char *method)
      +{
      +    request_rec *r;
      +    apr_pool_t *p;
      +    apr_bucket_alloc_t *ba;
      +    apr_pool_create(&p, p1);
      +    apr_pool_tag(p, "request");
      +    r = apr_pcalloc(p, sizeof(request_rec));
      +    ba = apr_bucket_alloc_create(p);
      +    r->pool            = p;
      +    r->connection      = conn;
      +    r->connection->bucket_alloc = ba;
      +    r->server          = conn->base_server;
      +
      +    r->user            = NULL;
      +    r->ap_auth_type    = NULL;
      +
      +    r->allowed_methods = ap_make_method_list(p, 2);
      +
      +    r->headers_in      = apr_table_make(r->pool, 25);
      +    r->trailers_in     = apr_table_make(r->pool, 5);
      +    r->subprocess_env  = apr_table_make(r->pool, 25);
      +    r->headers_out     = apr_table_make(r->pool, 12);
      +    r->err_headers_out = apr_table_make(r->pool, 5);
      +    r->trailers_out    = apr_table_make(r->pool, 5);
      +    r->notes           = apr_table_make(r->pool, 5);
      +
      +    r->kept_body       = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      +    r->request_config  = ap_create_request_config(r->pool);
      +    /* Must be set before we run create request hook */
      +
      +    r->proto_output_filters = conn->output_filters;
      +    r->output_filters  = r->proto_output_filters;
      +    r->proto_input_filters = conn->input_filters;
      +    r->input_filters   = r->proto_input_filters;
      +    r->per_dir_config  = r->server->lookup_defaults;
      +
      +    r->sent_bodyct     = 0;                      /* bytect isn't for body */
      +
      +    r->read_length     = 0;
      +    r->read_body       = REQUEST_NO_BODY;
      +
      +    r->status          = HTTP_OK;  /* Until further notice */
      +    r->header_only     = 1;
      +    r->the_request     = NULL;
      +
      +    /* Begin by presuming any module can make its own path_info assumptions,
      +     * until some module interjects and changes the value.
      +     */
      +    r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
      +
      +    r->useragent_addr = conn->client_addr;
      +    r->useragent_ip = conn->client_ip;
      +
      +
      +    /* Time to populate r with the data we have. */
      +    r->method = method;
      +    /* Provide quick information about the request method as soon as known */
      +    r->method_number = ap_method_number_of(r->method);
      +    if (r->method_number == M_GET && r->method[0] == 'G') {
      +        r->header_only = 0;
      +    }
      +
      +    r->protocol = "HTTP/1.0";
      +    r->proto_num = HTTP_VERSION(1, 0);
      +
      +    r->hostname = NULL;
      +
      +    return r;
      +}
      +
      +static proxy_worker *hc_get_hcworker(sctx_t *ctx, proxy_worker *worker,
      +                                     apr_pool_t *p)
      +{
      +    proxy_worker *hc = NULL;
      +    const char* wptr;
      +    apr_port_t port;
      +
      +    wptr = apr_psprintf(ctx->p, "%pp", worker);
      +    hc = (proxy_worker *)apr_hash_get(ctx->hcworkers, wptr, APR_HASH_KEY_STRING);
      +    port = (worker->s->port ? worker->s->port : ap_proxy_port_of_scheme(worker->s->scheme));
      +    if (!hc) {
      +        apr_uri_t uri;
      +        apr_status_t rv;
      +        const char *url = worker->s->name;
      +        wctx_t *wctx = apr_pcalloc(ctx->p, sizeof(wctx_t));
      +
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03248)
      +                     "Creating hc worker %s for %s://%s:%d",
      +                     wptr, worker->s->scheme, worker->s->hostname,
      +                     (int)port);
      +
      +        ap_proxy_define_worker(ctx->p, &hc, NULL, NULL, worker->s->name, 0);
      +        PROXY_STRNCPY(hc->s->name,     wptr);
      +        PROXY_STRNCPY(hc->s->hostname, worker->s->hostname);
      +        PROXY_STRNCPY(hc->s->scheme,   worker->s->scheme);
      +        PROXY_STRNCPY(hc->s->hcuri,    worker->s->hcuri);
      +        PROXY_STRNCPY(hc->s->hcexpr,   worker->s->hcexpr);
      +        hc->hash.def = hc->s->hash.def = ap_proxy_hashfunc(hc->s->name, PROXY_HASHFUNC_DEFAULT);
      +        hc->hash.fnv = hc->s->hash.fnv = ap_proxy_hashfunc(hc->s->name, PROXY_HASHFUNC_FNV);
      +        hc->s->port = port;
      +        /* Do not disable worker in case of errors */
      +        hc->s->status |= PROXY_WORKER_IGNORE_ERRORS;
      +        /* Mark as the "generic" worker */
      +        hc->s->status |= PROXY_WORKER_GENERIC;
      +        ap_proxy_initialize_worker(hc, ctx->s, ctx->p);
      +        hc->s->is_address_reusable = worker->s->is_address_reusable;
      +        hc->s->disablereuse = worker->s->disablereuse;
      +        hc->s->method = worker->s->method;
      +        rv = apr_uri_parse(p, url, &uri);
      +        if (rv == APR_SUCCESS) {
      +            wctx->path = apr_pstrdup(ctx->p, uri.path);
      +        }
      +        wctx->w = worker;
      +        hc->context = wctx;
      +        apr_hash_set(ctx->hcworkers, wptr, APR_HASH_KEY_STRING, hc);
      +    }
      +    /* This *could* have changed via the Balancer Manager */
      +    /* TODO */
      +    if (hc->s->method != worker->s->method) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03311)
      +                     "Updating hc worker %s for %s://%s:%d",
      +                     wptr, worker->s->scheme, worker->s->hostname,
      +                     (int)port);
      +        hc->s->method = worker->s->method;
      +        apr_hash_set(ctx->hcworkers, wptr, APR_HASH_KEY_STRING, hc);
      +    }
      +    return hc;
      +}
      +
      +static int hc_determine_connection(sctx_t *ctx, proxy_worker *worker) {
      +    apr_status_t rv = APR_SUCCESS;
      +    int will_reuse = worker->s->is_address_reusable && !worker->s->disablereuse;
      +    /*
      +     * normally, this is done in ap_proxy_determine_connection().
      +     * TODO: Look at using ap_proxy_determine_connection() with a
      +     * fake request_rec
      +     */
      +    if (!worker->cp->addr || !will_reuse) {
      +        rv = apr_sockaddr_info_get(&(worker->cp->addr), worker->s->hostname, APR_UNSPEC,
      +                                   worker->s->port, 0, ctx->p);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03249)
      +                         "DNS lookup failure for: %s:%d",
      +                         worker->s->hostname, (int)worker->s->port);
      +        }
      +    }
      +    return (rv == APR_SUCCESS ? OK : !OK);
      +}
      +
      +static apr_status_t hc_init_worker(sctx_t *ctx, proxy_worker *worker) {
      +    apr_status_t rv = APR_SUCCESS;
      +    /*
      +     * Since this is the watchdog, workers never actually handle a
      +     * request here, and so the local data isn't initialized (of
      +     * course, the shared memory is). So we need to bootstrap
      +     * worker->cp. Note, we only need do this once.
      +     */
      +    if (!worker->cp) {
      +        rv = ap_proxy_initialize_worker(worker, ctx->s, ctx->p);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ctx->s, APLOGNO(03250) "Cannot init worker");
      +            return rv;
      +        }
      +        rv = (hc_determine_connection(ctx, worker) == OK ? APR_SUCCESS : APR_EGENERAL);
      +    }
      +    return rv;
      +}
      +
      +static apr_status_t backend_cleanup(const char *proxy_function, proxy_conn_rec *backend,
      +                                    server_rec *s, int status)
      +{
      +    if (backend) {
      +        backend->close = 1;
      +        ap_proxy_release_connection(proxy_function, backend, s);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03251)
      +                     "Health check %s Status (%d) for %s.",
      +                     ap_proxy_show_hcmethod(backend->worker->s->method),
      +                     status,
      +                     backend->worker->s->name);
      +    }
      +    if (status != OK) {
      +        return APR_EGENERAL;
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static int hc_get_backend(const char *proxy_function, proxy_conn_rec **backend,
      +                          proxy_worker *hc, sctx_t *ctx)
      +{
      +    int status;
      +    status = ap_proxy_acquire_connection(proxy_function, backend, hc, ctx->s);
      +    if (status == OK) {
      +        (*backend)->addr = hc->cp->addr;
      +        (*backend)->pool = ctx->p;
      +        (*backend)->hostname = hc->s->hostname;
      +        if (strcmp(hc->s->scheme, "https") == 0) {
      +            if (!ap_proxy_ssl_enable(NULL)) {
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ctx->s, APLOGNO(03252)
      +                              "mod_ssl not configured?");
      +                return !OK;
      +            }
      +            (*backend)->is_ssl = 1;
      +        }
      +
      +    }
      +    status = hc_determine_connection(ctx, hc);
      +    if (status == OK) {
      +        (*backend)->addr = hc->cp->addr;
      +    }
      +    return status;
      +}
      +
      +static apr_status_t hc_check_tcp(sctx_t *ctx, apr_pool_t *ptemp, proxy_worker *worker)
      +{
      +    int status;
      +    proxy_conn_rec *backend = NULL;
      +    proxy_worker *hc;
      +
      +    hc = hc_get_hcworker(ctx, worker, ptemp);
      +
      +    status = hc_get_backend("HCTCP", &backend, hc, ctx);
      +    if (status == OK) {
      +        backend->addr = hc->cp->addr;
      +        status = ap_proxy_connect_backend("HCTCP", backend, hc, ctx->s);
      +        /* does an unconditional ap_proxy_is_socket_connected() */
      +    }
      +    return backend_cleanup("HCTCP", backend, ctx->s, status);
      +}
      +
      +static void hc_send(sctx_t *ctx, apr_pool_t *ptemp, const char *out, proxy_conn_rec *backend)
      +{
      +    apr_bucket_brigade *tmp_bb = apr_brigade_create(ptemp, ctx->ba);
      +    ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, ctx->s, "%s", out);
      +    APR_BRIGADE_INSERT_TAIL(tmp_bb, apr_bucket_pool_create(out, strlen(out), ptemp,
      +                            ctx->ba));
      +    APR_BRIGADE_INSERT_TAIL(tmp_bb, apr_bucket_flush_create(ctx->ba));
      +    ap_pass_brigade(backend->connection->output_filters, tmp_bb);
      +    apr_brigade_destroy(tmp_bb);
      +}
      +
      +static int hc_read_headers(sctx_t *ctx, request_rec *r)
      +{
      +    char buffer[HUGE_STRING_LEN];
      +    int len;
      +
      +    len = ap_getline(buffer, sizeof(buffer), r, 1);
      +    if (len <= 0) {
      +        return !OK;
      +    }
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ctx->s, APLOGNO(03254)
      +            "%s", buffer);
      +    /* for the below, see ap_proxy_http_process_response() */
      +    if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
      +        int major;
      +        char keepchar;
      +        int proxy_status = OK;
      +        const char *proxy_status_line = NULL;
      +
      +        major = buffer[5] - '0';
      +        if ((major != 1) || (len >= sizeof(buffer)-1)) {
      +            return !OK;
      +        }
      +
      +        keepchar = buffer[12];
      +        buffer[12] = '\0';
      +        proxy_status = atoi(&buffer[9]);
      +        if (keepchar != '\0') {
      +            buffer[12] = keepchar;
      +        } else {
      +            buffer[12] = ' ';
      +            buffer[13] = '\0';
      +        }
      +        proxy_status_line = apr_pstrdup(r->pool, &buffer[9]);
      +        r->status = proxy_status;
      +        r->status_line = proxy_status_line;
      +    } else {
      +        return !OK;
      +    }
      +    /* OK, 1st line is OK... scarf in the headers */
      +    while ((len = ap_getline(buffer, sizeof(buffer), r, 1)) > 0) {
      +        char *value, *end;
      +        if (!(value = strchr(buffer, ':'))) {
      +            return !OK;
      +        }
      +        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, ctx->s, "%s", buffer);
      +        *value = '\0';
      +        ++value;
      +        while (apr_isspace(*value))
      +            ++value;            /* Skip to start of value   */
      +        for (end = &value[strlen(value)-1]; end > value && apr_isspace(*end); --end)
      +            *end = '\0';
      +        apr_table_add(r->headers_out, buffer, value);
      +    }
      +    return OK;
      +}
      +
      +static int hc_read_body (sctx_t *ctx, request_rec *r)
      +{
      +    apr_status_t rv = APR_SUCCESS;
      +    apr_bucket_brigade *bb;
      +    int seen_eos = 0;
      +
      +    bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      +    do {
      +        apr_bucket *bucket, *cpy;
      +        apr_size_t len = HUGE_STRING_LEN;
      +
      +        rv = ap_get_brigade(r->proto_input_filters, bb, AP_MODE_READBYTES,
      +                            APR_BLOCK_READ, len);
      +
      +        if (rv != APR_SUCCESS) {
      +            if (APR_STATUS_IS_TIMEUP(rv) || APR_STATUS_IS_EOF(rv)) {
      +                rv = APR_SUCCESS;
      +                break;
      +            }
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ctx->s, APLOGNO(03300)
      +                          "Error reading response body");
      +            break;
      +        }
      +
      +        for (bucket = APR_BRIGADE_FIRST(bb);
      +             bucket != APR_BRIGADE_SENTINEL(bb);
      +             bucket = APR_BUCKET_NEXT(bucket))
      +        {
      +            if (APR_BUCKET_IS_EOS(bucket)) {
      +                seen_eos = 1;
      +                break;
      +            }
      +            if (APR_BUCKET_IS_FLUSH(bucket)) {
      +                continue;
      +            }
      +            rv =  apr_bucket_copy(bucket, &cpy);
      +            if (rv != APR_SUCCESS) {
      +                break;
      +            }
      +            APR_BRIGADE_INSERT_TAIL(r->kept_body, cpy);
      +        }
      +        apr_brigade_cleanup(bb);
      +    }
      +    while (!seen_eos);
      +    return (rv == APR_SUCCESS ? OK : !OK);
      +}
      +
      +/*
      + * Send the HTTP OPTIONS, HEAD or GET request to the backend
      + * server associated w/ worker. If we have Conditions,
      + * then apply those to the resulting response, otherwise
      + * any status code 2xx or 3xx is considered "passing"
      + */
      +static apr_status_t hc_check_http(sctx_t *ctx, apr_pool_t *ptemp, proxy_worker *worker)
      +{
      +    int status;
      +    proxy_conn_rec *backend = NULL;
      +    proxy_worker *hc;
      +    conn_rec c;
      +    request_rec *r;
      +    wctx_t *wctx;
      +    hc_condition_t *cond;
      +    const char *method = NULL;
      +
      +    hc = hc_get_hcworker(ctx, worker, ptemp);
      +    wctx = (wctx_t *)hc->context;
      +
      +    if ((status = hc_get_backend("HCOH", &backend, hc, ctx)) != OK) {
      +        return backend_cleanup("HCOH", backend, ctx->s, status);
      +    }
      +    if ((status = ap_proxy_connect_backend("HCOH", backend, hc, ctx->s)) != OK) {
      +        return backend_cleanup("HCOH", backend, ctx->s, status);
      +    }
      +
      +    if (!backend->connection) {
      +        if ((status = ap_proxy_connection_create("HCOH", backend, &c, ctx->s)) != OK) {
      +            return backend_cleanup("HCOH", backend, ctx->s, status);
      +        }
      +    }
      +    switch (hc->s->method) {
      +        case OPTIONS:
      +            if (!wctx->req) {
      +                wctx->req = apr_psprintf(ctx->p,
      +                                   "OPTIONS * HTTP/1.0\r\nHost: %s:%d\r\n\r\n",
      +                                    hc->s->hostname, (int)hc->s->port);
      +            }
      +            method = "OPTIONS";
      +            break;
      +
      +        case HEAD:
      +            method = "HEAD";
      +            /* fallthru */
      +        case GET:
      +            if (!method) { /* did we fall thru? If not, we are GET */
      +                method = "GET";
      +            }
      +            if (!wctx->req) {
      +                wctx->req = apr_psprintf(ctx->p,
      +                                   "%s %s%s%s HTTP/1.0\r\nHost: %s:%d\r\n\r\n",
      +                                   method,
      +                                   (wctx->path ? wctx->path : ""),
      +                                   (wctx->path && *hc->s->hcuri ? "/" : "" ),
      +                                   (*hc->s->hcuri ? hc->s->hcuri : ""),
      +                                   hc->s->hostname, (int)hc->s->port);
      +            }
      +            break;
      +
      +        default:
      +            return backend_cleanup("HCOH", backend, ctx->s, !OK);
      +            break;
      +    }
      +
      +    hc_send(ctx, ptemp, wctx->req, backend);
      +
      +    r = create_request_rec(ptemp, backend->connection, method);
      +    if ((status = hc_read_headers(ctx, r)) != OK) {
      +        return backend_cleanup("HCOH", backend, ctx->s, status);
      +    }
      +    if (hc->s->method == GET) {
      +        if ((status = hc_read_body(ctx, r)) != OK) {
      +            return backend_cleanup("HCOH", backend, ctx->s, status);
      +        }
      +    }
      +
      +    if (*worker->s->hcexpr &&
      +            (cond = (hc_condition_t *)apr_table_get(ctx->conditions, worker->s->hcexpr)) != NULL) {
      +        const char *err;
      +        int ok = ap_expr_exec(r, cond->pexpr, &err);
      +        if (ok > 0) {
      +            status = OK;
      +            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, ctx->s,
      +                         "Condition %s for %s (%s): passed", worker->s->hcexpr,
      +                         hc->s->name, worker->s->name);
      +        } else if (ok < 0 || err) {
      +            status = !OK;
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, ctx->s, APLOGNO(03301)
      +                         "Error on checking condition %s for %s (%s): %s", worker->s->hcexpr,
      +                         hc->s->name, worker->s->name, err);
      +        } else {
      +            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, ctx->s,
      +                         "Condition %s for %s (%s) : failed", worker->s->hcexpr,
      +                         hc->s->name, worker->s->name);
      +            status = !OK;
      +        }
      +    } else if (r->status < 200 || r->status > 399) {
      +        status = !OK;
      +    }
      +    return backend_cleanup("HCOH", backend, ctx->s, status);
      +}
      +
      +static void * APR_THREAD_FUNC hc_check(apr_thread_t *thread, void *b)
      +{
      +    baton_t *baton = (baton_t *)b;
      +    sctx_t *ctx = baton->ctx;
      +    apr_time_t now = baton->now;
      +    proxy_worker *worker = baton->worker;
      +    apr_pool_t *ptemp = baton->ptemp;
      +    server_rec *s = ctx->s;
      +    apr_status_t rv;
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03256)
      +                 "%sHealth checking %s", (thread ? "Threaded " : ""), worker->s->name);
      +
      +    switch (worker->s->method) {
      +        case TCP:
      +            rv = hc_check_tcp(ctx, ptemp, worker);
      +            break;
      +
      +        case OPTIONS:
      +        case HEAD:
      +        case GET:
      +             rv = hc_check_http(ctx, ptemp, worker);
      +             break;
      +
      +        default:
      +            rv = APR_ENOTIMPL;
      +            break;
      +    }
      +    if (rv == APR_ENOTIMPL) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(03257)
      +                         "Somehow tried to use unimplemented hcheck method: %d",
      +                         (int)worker->s->method);
      +        apr_pool_destroy(ptemp);
      +        return NULL;
      +    }
      +    /* what state are we in ? */
      +    if (PROXY_WORKER_IS_HCFAILED(worker)) {
      +        if (rv == APR_SUCCESS) {
      +            worker->s->pcount += 1;
      +            if (worker->s->pcount >= worker->s->passes) {
      +                ap_proxy_set_wstatus(PROXY_WORKER_HC_FAIL_FLAG, 0, worker);
      +                ap_proxy_set_wstatus(PROXY_WORKER_IN_ERROR_FLAG, 0, worker);
      +                worker->s->pcount = 0;
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03302)
      +                             "%sHealth check ENABLING %s", (thread ? "Threaded " : ""),
      +                             worker->s->name);
      +
      +            }
      +        }
      +    } else {
      +        if (rv != APR_SUCCESS) {
      +            worker->s->error_time = now;
      +            worker->s->fcount += 1;
      +            if (worker->s->fcount >= worker->s->fails) {
      +                ap_proxy_set_wstatus(PROXY_WORKER_HC_FAIL_FLAG, 1, worker);
      +                worker->s->fcount = 0;
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(03303)
      +                             "%sHealth check DISABLING %s", (thread ? "Threaded " : ""),
      +                             worker->s->name);
      +            }
      +        }
      +    }
      +    worker->s->updated = now;
      +    apr_pool_destroy(ptemp);
      +    return NULL;
      +}
      +
      +static apr_status_t hc_watchdog_callback(int state, void *data,
      +                                         apr_pool_t *pool)
      +{
      +    apr_status_t rv = APR_SUCCESS;
      +    apr_time_t now = apr_time_now();
      +    proxy_balancer *balancer;
      +    sctx_t *ctx = (sctx_t *)data;
      +    server_rec *s = ctx->s;
      +    proxy_server_conf *conf;
      +    switch (state) {
      +        case AP_WATCHDOG_STATE_STARTING:
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03258)
      +                         "%s watchdog started.",
      +                         HCHECK_WATHCHDOG_NAME);
      +#if HC_USE_THREADS
      +            if (ctx->tpsize) {
      +                rv =  apr_thread_pool_create(&ctx->hctp, ctx->tpsize,
      +                                             ctx->tpsize, ctx->p);
      +                if (rv != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_INFO, rv, s, APLOGNO(03312)
      +                                 "apr_thread_pool_create() with %d threads failed",
      +                                 ctx->tpsize);
      +                    /* we can continue on without the threadpools */
      +                    ctx->hctp = NULL;
      +                } else {
      +                    ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(03313)
      +                                 "apr_thread_pool_create() with %d threads succeeded",
      +                                 ctx->tpsize);
      +                }
      +            } else {
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(03314)
      +                             "Skipping apr_thread_pool_create()");
      +                ctx->hctp = NULL;
      +            }
      +
      +#endif
      +            break;
      +
      +        case AP_WATCHDOG_STATE_RUNNING:
      +            /* loop thru all workers */
      +            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
      +                         "Run of %s watchdog.",
      +                         HCHECK_WATHCHDOG_NAME);
      +            if (s) {
      +                int i;
      +                conf = (proxy_server_conf *) ap_get_module_config(s->module_config, &proxy_module);
      +                balancer = (proxy_balancer *)conf->balancers->elts;
      +                for (i = 0; i < conf->balancers->nelts; i++, balancer++) {
      +                    int n;
      +                    proxy_worker **workers;
      +                    proxy_worker *worker;
      +                    /* Have any new balancers or workers been added dynamically? */
      +                    ap_proxy_sync_balancer(balancer, s, conf);
      +                    workers = (proxy_worker **)balancer->workers->elts;
      +                    for (n = 0; n < balancer->workers->nelts; n++) {
      +                        worker = *workers;
      +                        if (!PROXY_WORKER_IS(worker, PROXY_WORKER_STOPPED) &&
      +                           (worker->s->method != NONE) &&
      +                           (now > worker->s->updated + worker->s->interval)) {
      +                            baton_t *baton;
      +                            /* This pool must last the lifetime of the (possible) thread */
      +                            apr_pool_t *ptemp;
      +                            apr_pool_create(&ptemp, ctx->p);
      +                            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
      +                                         "Checking %s worker: %s  [%d] (%pp)", balancer->s->name,
      +                                         worker->s->name, worker->s->method, worker);
      +
      +                            if ((rv = hc_init_worker(ctx, worker)) != APR_SUCCESS) {
      +                                return rv;
      +                            }
      +                            baton = apr_palloc(ptemp, sizeof(baton_t));
      +                            baton->ctx = ctx;
      +                            baton->now = now;
      +                            baton->worker = worker;
      +                            baton->ptemp = ptemp;
      +
      +                            if (!ctx->hctp) {
      +                                hc_check(NULL, baton);
      +                            }
      +#if HC_USE_THREADS
      +                            else {
      +                                rv = apr_thread_pool_push(ctx->hctp, hc_check, (void *)baton,
      +                                                          APR_THREAD_TASK_PRIORITY_NORMAL, NULL);
      +                            }
      +#endif
      +                        }
      +                        workers++;
      +                    }
      +                }
      +                /* s = s->next; */
      +            }
      +            break;
      +
      +        case AP_WATCHDOG_STATE_STOPPING:
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03261)
      +                         "stopping %s watchdog.",
      +                         HCHECK_WATHCHDOG_NAME);
      +#if HC_USE_THREADS
      +            rv =  apr_thread_pool_destroy(ctx->hctp);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_error(APLOG_MARK, APLOG_INFO, rv, s, APLOGNO(03315)
      +                             "apr_thread_pool_destroy() failed");
      +            }
      +#endif
      +            ctx->hctp = NULL;
      +            break;
      +    }
      +    return rv;
      +}
      +
      +static int hc_post_config(apr_pool_t *p, apr_pool_t *plog,
      +                       apr_pool_t *ptemp, server_rec *s)
      +{
      +    apr_status_t rv;
      +    sctx_t *ctx;
      +
      +    APR_OPTIONAL_FN_TYPE(ap_watchdog_get_instance) *hc_watchdog_get_instance;
      +    APR_OPTIONAL_FN_TYPE(ap_watchdog_register_callback) *hc_watchdog_register_callback;
      +
      +    hc_watchdog_get_instance = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_get_instance);
      +    hc_watchdog_register_callback = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_register_callback);
      +    if (!hc_watchdog_get_instance || !hc_watchdog_register_callback) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(03262)
      +                     "mod_watchdog is required");
      +        return !OK;
      +    }
      +    ctx = (sctx_t *) ap_get_module_config(s->module_config,
      +                                          &proxy_hcheck_module);
      +
      +    rv = hc_watchdog_get_instance(&ctx->watchdog,
      +                                  HCHECK_WATHCHDOG_NAME,
      +                                  0, 1, p);
      +    if (rv) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(03263)
      +                     "Failed to create watchdog instance (%s)",
      +                     HCHECK_WATHCHDOG_NAME);
      +        return !OK;
      +    }
      +    rv = hc_watchdog_register_callback(ctx->watchdog,
      +            apr_time_from_sec(HCHECK_WATHCHDOG_INTERVAL),
      +            ctx,
      +            hc_watchdog_callback);
      +    if (rv) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(03264)
      +                     "Failed to register watchdog callback (%s)",
      +                     HCHECK_WATHCHDOG_NAME);
      +        return !OK;
      +    }
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03265)
      +                 "watchdog callback registered (%s)", HCHECK_WATHCHDOG_NAME);
      +    return OK;
      +}
      +
      +static void hc_show_exprs(request_rec *r)
      +{
      +    const apr_table_entry_t *elts;
      +    const apr_array_header_t *hdr;
      +    int i;
      +    sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
      +                                                  &proxy_hcheck_module);
      +    if (apr_is_empty_table(ctx->conditions))
      +        return;
      +
      +    ap_rputs("\n\n<table>"
      +             "<tr><th colspan='2'>Health check cond. expressions:</th></tr>\n"
      +             "<tr><th>Expr name</th><th>Expression</th></tr>\n", r);
      +
      +    hdr = apr_table_elts(ctx->conditions);
      +    elts = (const apr_table_entry_t *) hdr->elts;
      +    for (i = 0; i < hdr->nelts; ++i) {
      +        hc_condition_t *cond;
      +        if (!elts[i].key) {
      +            continue;
      +        }
      +        cond = (hc_condition_t *)elts[i].val;
      +        ap_rprintf(r, "<tr><td>%s</td><td>%s</td></tr>\n",
      +                   ap_escape_html(r->pool, elts[i].key),
      +                   ap_escape_html(r->pool, cond->expr));
      +    }
      +    ap_rputs("</table><hr/>\n", r);
      +}
      +
      +static void hc_select_exprs(request_rec *r, const char *expr)
      +{
      +    const apr_table_entry_t *elts;
      +    const apr_array_header_t *hdr;
      +    int i;
      +    sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
      +                                                  &proxy_hcheck_module);
      +    if (apr_is_empty_table(ctx->conditions))
      +        return;
      +
      +    hdr = apr_table_elts(ctx->conditions);
      +    elts = (const apr_table_entry_t *) hdr->elts;
      +    for (i = 0; i < hdr->nelts; ++i) {
      +        if (!elts[i].key) {
      +            continue;
      +        }
      +        ap_rprintf(r, "<option value='%s' %s >%s</option>\n",
      +                   ap_escape_html(r->pool, elts[i].key),
      +                   (!strcmp(elts[i].key, expr)) ? "selected" : "",
      +                           ap_escape_html(r->pool, elts[i].key));
      +    }
      +}
      +
      +static int hc_valid_expr(request_rec *r, const char *expr)
      +{
      +    const apr_table_entry_t *elts;
      +    const apr_array_header_t *hdr;
      +    int i;
      +    sctx_t *ctx = (sctx_t *) ap_get_module_config(r->server->module_config,
      +                                                  &proxy_hcheck_module);
      +    if (apr_is_empty_table(ctx->conditions))
      +        return 0;
      +
      +    hdr = apr_table_elts(ctx->conditions);
      +    elts = (const apr_table_entry_t *) hdr->elts;
      +    for (i = 0; i < hdr->nelts; ++i) {
      +        if (!elts[i].key) {
      +            continue;
      +        }
      +        if (!strcmp(elts[i].key, expr))
      +            return 1;
      +    }
      +    return 0;
      +}
      +
      +static const char *hc_get_body(request_rec *r)
      +{
      +    apr_off_t length;
      +    apr_size_t len;
      +    apr_status_t rv;
      +    char *buf;
      +
      +    if (!r || !r->kept_body)
      +        return "";
      +
      +    rv = apr_brigade_length(r->kept_body, 1, &length);
      +    len = (apr_size_t)length;
      +    if (rv != APR_SUCCESS || len == 0)
      +        return "";
      +
      +    buf = apr_palloc(r->pool, len + 1);
      +    rv = apr_brigade_flatten(r->kept_body, buf, &len);
      +    if (rv != APR_SUCCESS)
      +        return "";
      +    buf[len] = '\0'; /* ensure */
      +    return (const char*)buf;
      +}
      +
      +static const char *hc_expr_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
      +{
      +    char *var = (char *)data;
      +
      +    if (var && *var && ctx->r && strcasecmp(var, "BODY") == 0) {
      +        return hc_get_body(ctx->r);
      +    }
      +    return NULL;
      +}
      +
      +static const char *hc_expr_func_fn(ap_expr_eval_ctx_t *ctx, const void *data,
      +                                const char *arg)
      +{
      +    char *var = (char *)arg;
      +
      +    if (var && *var && ctx->r && strcasecmp(var, "BODY") == 0) {
      +        return hc_get_body(ctx->r);
      +    }
      +    return NULL;
      +}
      +
      +static int hc_expr_lookup(ap_expr_lookup_parms *parms)
      +{
      +    switch (parms->type) {
      +    case AP_EXPR_FUNC_VAR:
      +        /* for now, we just handle everything that starts with HC_.
      +         */
      +        if (strncasecmp(parms->name, "HC_", 3) == 0) {
      +            *parms->func = hc_expr_var_fn;
      +            *parms->data = parms->name + 3;
      +            return OK;
      +        }
      +        break;
      +    case AP_EXPR_FUNC_STRING:
      +        /* Function HC() is implemented by us.
      +         */
      +        if (strcasecmp(parms->name, "HC") == 0) {
      +            *parms->func = hc_expr_func_fn;
      +            *parms->data = parms->arg;
      +            return OK;
      +        }
      +        break;
      +    }
      +    return DECLINED;
      +}
      +
      +static const command_rec command_table[] = {
      +    AP_INIT_RAW_ARGS("ProxyHCTemplate", set_hc_template, NULL, OR_FILEINFO,
      +                     "Health check template"),
      +    AP_INIT_RAW_ARGS("ProxyHCExpr", set_hc_condition, NULL, OR_FILEINFO,
      +                     "Define a health check condition ruleset expression"),
      +#if HC_USE_THREADS
      +    AP_INIT_TAKE1("ProxyHCTPsize", set_hc_tpsize, NULL, OR_FILEINFO,
      +                     "Set size of health check thread pool"),
      +#endif
      +    { NULL }
      +};
      +
      +static void hc_register_hooks(apr_pool_t *p)
      +{
      +    static const char *const aszPre[] = { "mod_proxy_balancer.c", "mod_proxy.c", NULL};
      +    static const char *const aszSucc[] = { "mod_watchdog.c", NULL};
      +    APR_REGISTER_OPTIONAL_FN(set_worker_hc_param);
      +    APR_REGISTER_OPTIONAL_FN(hc_show_exprs);
      +    APR_REGISTER_OPTIONAL_FN(hc_select_exprs);
      +    APR_REGISTER_OPTIONAL_FN(hc_valid_expr);
      +    ap_hook_post_config(hc_post_config, aszPre, aszSucc, APR_HOOK_LAST);
      +    ap_hook_expr_lookup(hc_expr_lookup, NULL, NULL, APR_HOOK_MIDDLE);
      +}
      +
      +/* the main config structure */
      +
      +AP_DECLARE_MODULE(proxy_hcheck) =
      +{
      +    STANDARD20_MODULE_STUFF,
      +    NULL,              /* create per-dir config structures */
      +    NULL,              /* merge  per-dir config structures */
      +    hc_create_config,  /* create per-server config structures */
      +    NULL,              /* merge  per-server config structures */
      +    command_table,     /* table of config file commands */
      +    hc_register_hooks  /* register hooks */
      +};
      diff --git a/modules/proxy/mod_proxy_hcheck.dep b/modules/proxy/mod_proxy_hcheck.dep
      new file mode 100644
      index 00000000000..008ee64bb21
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_hcheck.dep
      @@ -0,0 +1,5 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_hcheck.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/examples/mod_lbmethod_rr.dsp b/modules/proxy/mod_proxy_hcheck.dsp
      similarity index 52%
      rename from modules/proxy/examples/mod_lbmethod_rr.dsp
      rename to modules/proxy/mod_proxy_hcheck.dsp
      index 84a423b8511..73aaf2b7233 100644
      --- a/modules/proxy/examples/mod_lbmethod_rr.dsp
      +++ b/modules/proxy/mod_proxy_hcheck.dsp
      @@ -1,24 +1,24 @@
      -# Microsoft Developer Studio Project File - Name="mod_lbmethod_rr" - Package Owner=<4>
      +# Microsoft Developer Studio Project File - Name="mod_proxy_hcheck" - Package Owner=<4>
       # Microsoft Developer Studio Generated Build File, Format Version 6.00
       # ** DO NOT EDIT **
       
       # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
       
      -CFG=mod_lbmethod_rr - Win32 Release
      +CFG=mod_proxy_hcheck - Win32 Release
       !MESSAGE This is not a valid makefile. To build this project using NMAKE,
       !MESSAGE use the Export Makefile command and run
       !MESSAGE 
      -!MESSAGE NMAKE /f "mod_lbmethod_rr.mak".
      +!MESSAGE NMAKE /f "mod_proxy_hcheck.mak".
       !MESSAGE 
       !MESSAGE You can specify a configuration when running NMAKE
       !MESSAGE by defining the macro CFG on the command line. For example:
       !MESSAGE 
      -!MESSAGE NMAKE /f "mod_lbmethod_rr.mak" CFG="mod_lbmethod_rr - Win32 Release"
      +!MESSAGE NMAKE /f "mod_proxy_hcheck.mak" CFG="mod_proxy_hcheck - Win32 Release"
       !MESSAGE 
       !MESSAGE Possible choices for configuration are:
       !MESSAGE 
      -!MESSAGE "mod_lbmethod_rr - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      -!MESSAGE "mod_lbmethod_rr - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_hcheck - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_hcheck - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
       !MESSAGE 
       
       # Begin Project
      @@ -29,7 +29,7 @@ CPP=cl.exe
       MTL=midl.exe
       RSC=rc.exe
       
      -!IF  "$(CFG)" == "mod_lbmethod_rr - Win32 Release"
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
       
       # PROP BASE Use_MFC 0
       # PROP BASE Use_Debug_Libraries 0
      @@ -43,25 +43,25 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_lbmethod_rr_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_proxy_hcheck_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
      -# ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_lbmethod_rr.res" /i "../../../include" /i "../../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_lbmethod_rr.so" /d LONG_NAME="lbmethod_rr_module for Apache"
      +# ADD BASE RSC /l 0x809 /d "NDEBUG"
      +# ADD RSC /l 0x409 /fo"Release/mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /out:".\Release\mod_lbmethod_rr.so" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_rr.so
      -# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_lbmethod_rr.so" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_rr.so /opt:ref
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /out:".\Release\mod_proxy_hcheck.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so
      +# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_proxy_hcheck.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so /opt:ref
       # Begin Special Build Tool
      -TargetPath=.\Release\mod_lbmethod_rr.so
      +TargetPath=.\Release\mod_proxy_hcheck.so
       SOURCE="$(InputPath)"
       PostBuild_Desc=Embed .manifest
       PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
       # End Special Build Tool
       
      -!ELSEIF  "$(CFG)" == "mod_lbmethod_rr - Win32 Debug"
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
       
       # PROP BASE Use_MFC 0
       # PROP BASE Use_Debug_Libraries 1
      @@ -75,19 +75,19 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I ".." /I "../../../include" /I "../../../srclib/apr/include" /I "../../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_lbmethod_rr_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_proxy_hcheck_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
      -# ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_lbmethod_rr.res" /i "../../../include" /i "../../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_lbmethod_rr.so" /d LONG_NAME="lbmethod_rr_module for Apache"
      +# ADD BASE RSC /l 0x809 /d "_DEBUG"
      +# ADD RSC /l 0x409 /fo"Debug/mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lbmethod_rr.so" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_rr.so
      -# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_lbmethod_rr.so" /base:@..\..\..\os\win32\BaseAddr.ref,mod_lbmethod_rr.so
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_proxy_hcheck.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so
      +# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_proxy_hcheck.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so
       # Begin Special Build Tool
      -TargetPath=.\Debug\mod_lbmethod_rr.so
      +TargetPath=.\Debug\mod_proxy_hcheck.so
       SOURCE="$(InputPath)"
       PostBuild_Desc=Embed .manifest
       PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      @@ -97,15 +97,27 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       
       # Begin Target
       
      -# Name "mod_lbmethod_rr - Win32 Release"
      -# Name "mod_lbmethod_rr - Win32 Debug"
      +# Name "mod_proxy_hcheck - Win32 Release"
      +# Name "mod_proxy_hcheck - Win32 Debug"
      +# Begin Group "Source Files"
      +
      +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
      +# Begin Source File
      +
      +SOURCE=.\mod_proxy_hcheck.c
      +# End Source File
      +# End Group
      +# Begin Group "Header Files"
      +
      +# PROP Default_Filter ".h"
       # Begin Source File
       
      -SOURCE=.\mod_lbmethod_rr.c
      +SOURCE=.\mod_proxy.h
       # End Source File
      +# End Group
       # Begin Source File
       
      -SOURCE=..\..\..\build\win32\httpd.rc
      +SOURCE=..\..\build\win32\httpd.rc
       # End Source File
       # End Target
       # End Project
      diff --git a/modules/proxy/mod_proxy_hcheck.mak b/modules/proxy/mod_proxy_hcheck.mak
      new file mode 100644
      index 00000000000..dc0d7589afe
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_hcheck.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_hcheck.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_hcheck - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_hcheck - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_hcheck - Win32 Release" && "$(CFG)" != "mod_proxy_hcheck - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_hcheck.mak" CFG="mod_proxy_hcheck - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_hcheck - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_hcheck - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_hcheck.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_hcheck.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_hcheck.obj"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck.res"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_hcheck_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_hcheck.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_hcheck.pdb" /debug /out:"$(OUTDIR)\mod_proxy_hcheck.so" /implib:"$(OUTDIR)\mod_proxy_hcheck.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_hcheck.obj" \
      +	"$(INTDIR)\mod_proxy_hcheck.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_hcheck.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_hcheck.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_hcheck.so"
      +   if exist .\Release\mod_proxy_hcheck.so.manifest mt.exe -manifest .\Release\mod_proxy_hcheck.so.manifest -outputresource:.\Release\mod_proxy_hcheck.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_hcheck.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_hcheck.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_hcheck.obj"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck.res"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_hcheck_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_hcheck.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../core" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_hcheck_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_hcheck.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_hcheck.pdb" /debug /out:"$(OUTDIR)\mod_proxy_hcheck.so" /implib:"$(OUTDIR)\mod_proxy_hcheck.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_hcheck.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_hcheck.obj" \
      +	"$(INTDIR)\mod_proxy_hcheck.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_hcheck.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_hcheck.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_hcheck.so"
      +   if exist .\Debug\mod_proxy_hcheck.so.manifest mt.exe -manifest .\Debug\mod_proxy_hcheck.so.manifest -outputresource:.\Debug\mod_proxy_hcheck.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_hcheck.dep")
      +!INCLUDE "mod_proxy_hcheck.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_hcheck.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_hcheck - Win32 Release" || "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +SOURCE=.\mod_proxy_hcheck.c
      +
      +"$(INTDIR)\mod_proxy_hcheck.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F .\libapr.mak CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F .\libapr.mak CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F .\libapr.mak CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F .\libapr.mak CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F .\libhttpd.mak CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F .\libhttpd.mak CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F .\libhttpd.mak CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F .\libhttpd.mak CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F .\mod_proxy.mak CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F .\mod_proxy.mak CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F .\mod_proxy.mak CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F .\mod_proxy.mak CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_hcheck - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_hcheck.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /i "\build6\hcheck\build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_hcheck - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_hcheck.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_hcheck.res" /i "../../include" /i "../../srclib/apr/include" /i "\build6\hcheck\build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_hcheck.so" /d LONG_NAME="proxy_hcheck_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
      index 4e897d87c69..d343aa7be71 100644
      --- a/modules/proxy/mod_proxy_http.c
      +++ b/modules/proxy/mod_proxy_http.c
      @@ -21,6 +21,9 @@
       
       module AP_MODULE_DECLARE_DATA proxy_http_module;
       
      +static int (*ap_proxy_clear_connection_fn)(request_rec *r, apr_table_t *headers) =
      +        NULL;
      +
       static apr_status_t ap_proxy_http_cleanup(const char *scheme,
                                                 request_rec *r,
                                                 proxy_conn_rec *backend);
      @@ -51,20 +54,18 @@ static int proxy_http_canon(request_rec *r, char *url)
           else {
               return DECLINED;
           }
      -    def_port = apr_uri_port_of_scheme(scheme);
      +    port = def_port = ap_proxy_port_of_scheme(scheme);
       
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: HTTP: canonicalising URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                  "HTTP: canonicalising URL %s", url);
       
           /* do syntatic check.
            * We break the URL into host, port, path, search
            */
      -    port = def_port;
           err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "error parsing URL %s: %s",
      -                      url, err);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01083)
      +                      "error parsing URL %s: %s", url, err);
               return HTTP_BAD_REQUEST;
           }
       
      @@ -179,33 +180,7 @@ static apr_table_t *ap_proxy_clean_warnings(apr_pool_t *p, apr_table_t *headers)
               return headers;
          }
       }
      -static int clear_conn_headers(void *data, const char *key, const char *val)
      -{
      -    apr_table_t *headers = ((header_dptr*)data)->table;
      -    apr_pool_t *pool = ((header_dptr*)data)->pool;
      -    const char *name;
      -    char *next = apr_pstrdup(pool, val);
      -    while (*next) {
      -        name = next;
      -        while (*next && !apr_isspace(*next) && (*next != ',')) {
      -            ++next;
      -        }
      -        while (*next && (apr_isspace(*next) || (*next == ','))) {
      -            *next++ = '\0';
      -        }
      -        apr_table_unset(headers, name);
      -    }
      -    return 1;
      -}
      -static void ap_proxy_clear_connection(apr_pool_t *p, apr_table_t *headers)
      -{
      -    header_dptr x;
      -    x.pool = p;
      -    x.table = headers;
      -    apr_table_unset(headers, "Proxy-Connection");
      -    apr_table_do(clear_conn_headers, &x, headers, "Connection", NULL);
      -    apr_table_unset(headers, "Connection");
      -}
      +
       static void add_te_chunked(apr_pool_t *p,
                                  apr_bucket_alloc_t *bucket_alloc,
                                  apr_bucket_brigade *header_brigade)
      @@ -251,44 +226,6 @@ static void terminate_headers(apr_bucket_alloc_t *bucket_alloc,
           APR_BRIGADE_INSERT_TAIL(header_brigade, e);
       }
       
      -static int pass_brigade(apr_bucket_alloc_t *bucket_alloc,
      -                                 request_rec *r, proxy_conn_rec *p_conn,
      -                                 conn_rec *origin, apr_bucket_brigade *bb,
      -                                 int flush)
      -{
      -    apr_status_t status;
      -    apr_off_t transferred;
      -
      -    if (flush) {
      -        apr_bucket *e = apr_bucket_flush_create(bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(bb, e);
      -    }
      -    apr_brigade_length(bb, 0, &transferred);
      -    if (transferred != -1)
      -        p_conn->worker->s->transferred += transferred;
      -    status = ap_pass_brigade(origin->output_filters, bb);
      -    if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                     "proxy: pass request body failed to %pI (%s)",
      -                     p_conn->addr, p_conn->hostname);
      -        if (origin->aborted) {
      -            const char *ssl_note;
      -
      -            if (((ssl_note = apr_table_get(origin->notes, "SSL_connect_rv"))
      -                != NULL) && (strcmp(ssl_note, "err") == 0)) {
      -                return ap_proxyerror(r, HTTP_INTERNAL_SERVER_ERROR,
      -                                     "Error during SSL Handshake with"
      -                                     " remote server");
      -            }
      -            return APR_STATUS_IS_TIMEUP(status) ? HTTP_GATEWAY_TIME_OUT : HTTP_BAD_GATEWAY;
      -        }
      -        else {
      -            return HTTP_BAD_REQUEST;
      -        }
      -    }
      -    apr_brigade_cleanup(bb);
      -    return OK;
      -}
       
       #define MAX_MEM_SPOOL 16384
       
      @@ -367,7 +304,7 @@ static int stream_reqbody_chunked(apr_pool_t *p,
               }
       
               /* The request is flushed below this loop with chunk EOS header */
      -        rv = pass_brigade(bucket_alloc, r, p_conn, origin, bb, 0);
      +        rv = ap_proxy_pass_brigade(bucket_alloc, r, p_conn, origin, bb, 0);
               if (rv != OK) {
                   return rv;
               }
      @@ -381,7 +318,13 @@ static int stream_reqbody_chunked(apr_pool_t *p,
                                       HUGE_STRING_LEN);
       
               if (status != APR_SUCCESS) {
      -            return HTTP_BAD_REQUEST;
      +            conn_rec *c = r->connection;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02608)
      +                          "read request body failed to %pI (%s)"
      +                          " from %s (%s)", p_conn->addr,
      +                          p_conn->hostname ? p_conn->hostname: "",
      +                          c->client_ip, c->remote_host ? c->remote_host: "");
      +            return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
               }
           }
       
      @@ -413,7 +356,7 @@ static int stream_reqbody_chunked(apr_pool_t *p,
           }
       
           /* Now we have headers-only, or the chunk EOS mark; flush it */
      -    rv = pass_brigade(bucket_alloc, r, p_conn, origin, bb, 1);
      +    rv = ap_proxy_pass_brigade(bucket_alloc, r, p_conn, origin, bb, 1);
           return rv;
       }
       
      @@ -423,7 +366,7 @@ static int stream_reqbody_cl(apr_pool_t *p,
                                             conn_rec *origin,
                                             apr_bucket_brigade *header_brigade,
                                             apr_bucket_brigade *input_brigade,
      -                                      const char *old_cl_val)
      +                                      char *old_cl_val)
       {
           int seen_eos = 0, rv = 0;
           apr_status_t status = APR_SUCCESS;
      @@ -441,8 +384,8 @@ static int stream_reqbody_cl(apr_pool_t *p,
               status = apr_strtoff(&cl_val, old_cl_val, &endstr, 10);
       
               if (status || *endstr || endstr == old_cl_val || cl_val < 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      -                          "proxy: could not parse request Content-Length (%s)",
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01085)
      +                          "could not parse request Content-Length (%s)",
                                 old_cl_val);
                   return HTTP_BAD_REQUEST;
               }
      @@ -478,8 +421,8 @@ static int stream_reqbody_cl(apr_pool_t *p,
                * Prevents HTTP Response Splitting.
                */
               if (bytes_streamed > cl_val) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "proxy: read more bytes of request body than expected "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01086)
      +                          "read more bytes of request body than expected "
                                 "(got %" APR_OFF_T_FMT ", expected %" APR_OFF_T_FMT ")",
                                 bytes_streamed, cl_val);
                   return HTTP_INTERNAL_SERVER_ERROR;
      @@ -512,7 +455,7 @@ static int stream_reqbody_cl(apr_pool_t *p,
               }
       
               /* Once we hit EOS, we are ready to flush. */
      -        rv = pass_brigade(bucket_alloc, r, p_conn, origin, bb, seen_eos);
      +        rv = ap_proxy_pass_brigade(bucket_alloc, r, p_conn, origin, bb, seen_eos);
               if (rv != OK) {
                   return rv ;
               }
      @@ -526,14 +469,20 @@ static int stream_reqbody_cl(apr_pool_t *p,
                                       HUGE_STRING_LEN);
       
               if (status != APR_SUCCESS) {
      -            return HTTP_BAD_REQUEST;
      +            conn_rec *c = r->connection;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02609)
      +                          "read request body failed to %pI (%s)"
      +                          " from %s (%s)", p_conn->addr,
      +                          p_conn->hostname ? p_conn->hostname: "",
      +                          c->client_ip, c->remote_host ? c->remote_host: "");
      +            return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
               }
           }
       
           if (bytes_streamed != cl_val) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "proxy: client %s given Content-Length did not match"
      -                     " number of body bytes read", r->connection->remote_ip);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01087)
      +                      "client %s given Content-Length did not match"
      +                      " number of body bytes read", r->connection->client_ip);
               return HTTP_BAD_REQUEST;
           }
       
      @@ -542,7 +491,7 @@ static int stream_reqbody_cl(apr_pool_t *p,
                * body; send it now with the flush flag
                */
               bb = header_brigade;
      -        return(pass_brigade(bucket_alloc, r, p_conn, origin, bb, 1));
      +        return(ap_proxy_pass_brigade(bucket_alloc, r, p_conn, origin, bb, 1));
           }
       
           return OK;
      @@ -588,11 +537,10 @@ static int spool_reqbody_cl(apr_pool_t *p,
                    * Let it take effect if we decide to store the body in a
                    * temporary file on disk.
                    */
      -            if (bytes_spooled + bytes > limit) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                             "proxy: Request body is larger than the"
      -                             " configured limit of %" APR_OFF_T_FMT ".",
      -                             limit);
      +            if (limit && (bytes_spooled + bytes > limit)) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01088)
      +                              "Request body is larger than the configured "
      +                              "limit of %" APR_OFF_T_FMT, limit);
                       return HTTP_REQUEST_ENTITY_TOO_LARGE;
                   }
                   /* can't spool any more in memory; write latest brigade to disk */
      @@ -602,8 +550,8 @@ static int spool_reqbody_cl(apr_pool_t *p,
       
                       status = apr_temp_dir_get(&temp_dir, p);
                       if (status != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                                 "proxy: search for temporary directory failed");
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01089)
      +                                  "search for temporary directory failed");
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
                       apr_filepath_merge(&template, temp_dir,
      @@ -611,9 +559,9 @@ static int spool_reqbody_cl(apr_pool_t *p,
                                          APR_FILEPATH_NATIVE, p);
                       status = apr_file_mktemp(&tmpfile, template, 0, p);
                       if (status != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                                 "proxy: creation of temporary file in directory %s failed",
      -                                 temp_dir);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01090)
      +                                  "creation of temporary file in directory "
      +                                  "%s failed", temp_dir);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
                   }
      @@ -631,9 +579,9 @@ static int spool_reqbody_cl(apr_pool_t *p,
                           if (apr_file_name_get(&tmpfile_name, tmpfile) != APR_SUCCESS) {
                               tmpfile_name = "(unknown)";
                           }
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                                 "proxy: write to temporary file %s failed",
      -                                 tmpfile_name);
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01091)
      +                                  "write to temporary file %s failed",
      +                                  tmpfile_name);
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
                       AP_DEBUG_ASSERT(bytes_read == bytes_written);
      @@ -670,7 +618,13 @@ static int spool_reqbody_cl(apr_pool_t *p,
                                       HUGE_STRING_LEN);
       
               if (status != APR_SUCCESS) {
      -            return HTTP_BAD_REQUEST;
      +            conn_rec *c = r->connection;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(02610)
      +                          "read request body failed to %pI (%s)"
      +                          " from %s (%s)", p_conn->addr,
      +                          p_conn->hostname ? p_conn->hostname: "",
      +                          c->client_ip, c->remote_host ? c->remote_host: "");
      +            return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
               }
           }
       
      @@ -687,7 +641,7 @@ static int spool_reqbody_cl(apr_pool_t *p,
               APR_BRIGADE_INSERT_TAIL(header_brigade, e);
           }
           /* This is all a single brigade, pass with flush flagged */
      -    return(pass_brigade(bucket_alloc, r, p_conn, origin, header_brigade, 1));
      +    return(ap_proxy_pass_brigade(bucket_alloc, r, p_conn, origin, header_brigade, 1));
       }
       
       static
      @@ -704,258 +658,31 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
           apr_bucket_brigade *temp_brigade;
           apr_bucket *e;
           char *buf;
      -    const apr_array_header_t *headers_in_array;
      -    const apr_table_entry_t *headers_in;
      -    int counter;
           apr_status_t status;
           enum rb_methods {RB_INIT, RB_STREAM_CL, RB_STREAM_CHUNKED, RB_SPOOL_CL};
           enum rb_methods rb_method = RB_INIT;
      -    const char *old_cl_val = NULL;
      -    const char *old_te_val = NULL;
      +    char *old_cl_val = NULL;
      +    char *old_te_val = NULL;
           apr_off_t bytes_read = 0;
           apr_off_t bytes;
           int force10, rv;
      -    apr_table_t *headers_in_copy;
      -    proxy_dir_conf *dconf;
           conn_rec *origin = p_conn->connection;
      -    int do_100_continue;
      -
      -    dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      -    header_brigade = apr_brigade_create(p, origin->bucket_alloc);
      -
      -    /*
      -     * Send the HTTP/1.1 request to the remote server
      -     */
      -
      -    /*
      -     * To be compliant, we only use 100-Continue for requests with bodies.
      -     * We also make sure we won't be talking HTTP/1.0 as well.
      -     */
      -    do_100_continue = (worker->s->ping_timeout_set
      -                       && ap_request_has_body(r)
      -                       && (PROXYREQ_REVERSE == r->proxyreq)
      -                       && !(apr_table_get(r->subprocess_env, "force-proxy-request-1.0")));
       
           if (apr_table_get(r->subprocess_env, "force-proxy-request-1.0")) {
      -        /*
      -         * According to RFC 2616 8.2.3 we are not allowed to forward an
      -         * Expect: 100-continue to an HTTP/1.0 server. Instead we MUST return
      -         * a HTTP_EXPECTATION_FAILED
      -         */
               if (r->expecting_100) {
                   return HTTP_EXPECTATION_FAILED;
               }
      -        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.0" CRLF, NULL);
               force10 = 1;
      -        p_conn->close++;
           } else {
      -        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
               force10 = 0;
           }
      -    if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) {
      -        origin->keepalive = AP_CONN_CLOSE;
      -        p_conn->close++;
      -    }
      -    ap_xlate_proto_to_ascii(buf, strlen(buf));
      -    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      -    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      -    if (dconf->preserve_host == 0) {
      -        if (ap_strchr_c(uri->hostname, ':')) { /* if literal IPv6 address */
      -            if (uri->port_str && uri->port != DEFAULT_HTTP_PORT) {
      -                buf = apr_pstrcat(p, "Host: [", uri->hostname, "]:",
      -                                  uri->port_str, CRLF, NULL);
      -            } else {
      -                buf = apr_pstrcat(p, "Host: [", uri->hostname, "]", CRLF, NULL);
      -            }
      -        } else {
      -            if (uri->port_str && uri->port != DEFAULT_HTTP_PORT) {
      -                buf = apr_pstrcat(p, "Host: ", uri->hostname, ":",
      -                                  uri->port_str, CRLF, NULL);
      -            } else {
      -                buf = apr_pstrcat(p, "Host: ", uri->hostname, CRLF, NULL);
      -            }
      -        }
      -    }
      -    else {
      -        /* don't want to use r->hostname, as the incoming header might have a
      -         * port attached
      -         */
      -        const char* hostname = apr_table_get(r->headers_in,"Host");
      -        if (!hostname) {
      -            hostname =  r->server->server_hostname;
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                          "proxy: no HTTP 0.9 request (with no host line) "
      -                          "on incoming request and preserve host set "
      -                          "forcing hostname to be %s for uri %s",
      -                          hostname,
      -                          r->uri );
      -        }
      -        buf = apr_pstrcat(p, "Host: ", hostname, CRLF, NULL);
      -    }
      -    ap_xlate_proto_to_ascii(buf, strlen(buf));
      -    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      -    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      -
      -    /* handle Via */
      -    if (conf->viaopt == via_block) {
      -        /* Block all outgoing Via: headers */
      -        apr_table_unset(r->headers_in, "Via");
      -    } else if (conf->viaopt != via_off) {
      -        const char *server_name = ap_get_server_name(r);
      -        /* If USE_CANONICAL_NAME_OFF was configured for the proxy virtual host,
      -         * then the server name returned by ap_get_server_name() is the
      -         * origin server name (which does make too much sense with Via: headers)
      -         * so we use the proxy vhost's name instead.
      -         */
      -        if (server_name == r->hostname)
      -            server_name = r->server->server_hostname;
      -        /* Create a "Via:" request header entry and merge it */
      -        /* Generate outgoing Via: header with/without server comment: */
      -        apr_table_mergen(r->headers_in, "Via",
      -                         (conf->viaopt == via_full)
      -                         ? apr_psprintf(p, "%d.%d %s%s (%s)",
      -                                        HTTP_VERSION_MAJOR(r->proto_num),
      -                                        HTTP_VERSION_MINOR(r->proto_num),
      -                                        server_name, server_portstr,
      -                                        AP_SERVER_BASEVERSION)
      -                         : apr_psprintf(p, "%d.%d %s%s",
      -                                        HTTP_VERSION_MAJOR(r->proto_num),
      -                                        HTTP_VERSION_MINOR(r->proto_num),
      -                                        server_name, server_portstr)
      -        );
      -    }
      -
      -    /* Use HTTP/1.1 100-Continue as quick "HTTP ping" test
      -     * to backend
      -     */
      -    if (do_100_continue) {
      -        apr_table_mergen(r->headers_in, "Expect", "100-Continue");
      -        r->expecting_100 = 1;
      -    }
      -
      -    /* X-Forwarded-*: handling
      -     *
      -     * XXX Privacy Note:
      -     * -----------------
      -     *
      -     * These request headers are only really useful when the mod_proxy
      -     * is used in a reverse proxy configuration, so that useful info
      -     * about the client can be passed through the reverse proxy and on
      -     * to the backend server, which may require the information to
      -     * function properly.
      -     *
      -     * In a forward proxy situation, these options are a potential
      -     * privacy violation, as information about clients behind the proxy
      -     * are revealed to arbitrary servers out there on the internet.
      -     *
      -     * The HTTP/1.1 Via: header is designed for passing client
      -     * information through proxies to a server, and should be used in
      -     * a forward proxy configuation instead of X-Forwarded-*. See the
      -     * ProxyVia option for details.
      -     */
      -    if (dconf->add_forwarded_headers) {
      -       if (PROXYREQ_REVERSE == r->proxyreq) {
      -           const char *buf;
      -
      -           /* Add X-Forwarded-For: so that the upstream has a chance to
      -            * determine, where the original request came from.
      -            */
      -           apr_table_mergen(r->headers_in, "X-Forwarded-For",
      -                            c->remote_ip);
      -
      -           /* Add X-Forwarded-Host: so that upstream knows what the
      -            * original request hostname was.
      -            */
      -           if ((buf = apr_table_get(r->headers_in, "Host"))) {
      -               apr_table_mergen(r->headers_in, "X-Forwarded-Host", buf);
      -           }
      -
      -           /* Add X-Forwarded-Server: so that upstream knows what the
      -            * name of this proxy server is (if there are more than one)
      -            * XXX: This duplicates Via: - do we strictly need it?
      -            */
      -           apr_table_mergen(r->headers_in, "X-Forwarded-Server",
      -                            r->server->server_hostname);
      -       }
      -    }
      -
      -    proxy_run_fixups(r);
      -    /*
      -     * Make a copy of the headers_in table before clearing the connection
      -     * headers as we need the connection headers later in the http output
      -     * filter to prepare the correct response headers.
      -     *
      -     * Note: We need to take r->pool for apr_table_copy as the key / value
      -     * pairs in r->headers_in have been created out of r->pool and
      -     * p might be (and actually is) a longer living pool.
      -     * This would trigger the bad pool ancestry abort in apr_table_copy if
      -     * apr is compiled with APR_POOL_DEBUG.
      -     */
      -    headers_in_copy = apr_table_copy(r->pool, r->headers_in);
      -    ap_proxy_clear_connection(p, headers_in_copy);
      -    /* send request headers */
      -    headers_in_array = apr_table_elts(headers_in_copy);
      -    headers_in = (const apr_table_entry_t *) headers_in_array->elts;
      -    for (counter = 0; counter < headers_in_array->nelts; counter++) {
      -        if (headers_in[counter].key == NULL
      -             || headers_in[counter].val == NULL
      -
      -            /* Already sent */
      -             || !strcasecmp(headers_in[counter].key, "Host")
      -
      -            /* Clear out hop-by-hop request headers not to send
      -             * RFC2616 13.5.1 says we should strip these headers
      -             */
      -             || !strcasecmp(headers_in[counter].key, "Keep-Alive")
      -             || !strcasecmp(headers_in[counter].key, "TE")
      -             || !strcasecmp(headers_in[counter].key, "Trailer")
      -             || !strcasecmp(headers_in[counter].key, "Upgrade")
      -
      -             ) {
      -            continue;
      -        }
      -        /* Do we want to strip Proxy-Authorization ?
      -         * If we haven't used it, then NO
      -         * If we have used it then MAYBE: RFC2616 says we MAY propagate it.
      -         * So let's make it configurable by env.
      -         */
      -        if (!strcasecmp(headers_in[counter].key,"Proxy-Authorization")) {
      -            if (r->user != NULL) { /* we've authenticated */
      -                if (!apr_table_get(r->subprocess_env, "Proxy-Chain-Auth")) {
      -                    continue;
      -                }
      -            }
      -        }
      -
      -
      -        /* Skip Transfer-Encoding and Content-Length for now.
      -         */
      -        if (!strcasecmp(headers_in[counter].key, "Transfer-Encoding")) {
      -            old_te_val = headers_in[counter].val;
      -            continue;
      -        }
      -        if (!strcasecmp(headers_in[counter].key, "Content-Length")) {
      -            old_cl_val = headers_in[counter].val;
      -            continue;
      -        }
      -
      -        /* for sub-requests, ignore freshness/expiry headers */
      -        if (r->main) {
      -            if (    !strcasecmp(headers_in[counter].key, "If-Match")
      -                 || !strcasecmp(headers_in[counter].key, "If-Modified-Since")
      -                 || !strcasecmp(headers_in[counter].key, "If-Range")
      -                 || !strcasecmp(headers_in[counter].key, "If-Unmodified-Since")
      -                 || !strcasecmp(headers_in[counter].key, "If-None-Match")) {
      -                continue;
      -            }
      -        }
       
      -        buf = apr_pstrcat(p, headers_in[counter].key, ": ",
      -                          headers_in[counter].val, CRLF,
      -                          NULL);
      -        ap_xlate_proto_to_ascii(buf, strlen(buf));
      -        e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      +    header_brigade = apr_brigade_create(p, bucket_alloc);
      +    rv = ap_proxy_create_hdrbrgd(p, header_brigade, r, p_conn,
      +                                 worker, conf, uri, url, server_portstr,
      +                                 &old_cl_val, &old_te_val);
      +    if (rv != OK) {
      +        return rv;
           }
       
           /* We have headers, let's figure out our request body... */
      @@ -972,15 +699,9 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
            */
           if (!r->kept_body && r->main) {
               /* XXX: Why DON'T sub-requests use keepalives? */
      -        p_conn->close++;
      -        if (old_cl_val) {
      -            old_cl_val = NULL;
      -            apr_table_unset(r->headers_in, "Content-Length");
      -        }
      -        if (old_te_val) {
      -            old_te_val = NULL;
      -            apr_table_unset(r->headers_in, "Transfer-Encoding");
      -        }
      +        p_conn->close = 1;
      +        old_cl_val = NULL;
      +        old_te_val = NULL;
               rb_method = RB_STREAM_CL;
               e = apr_bucket_eos_create(input_brigade->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(input_brigade, e);
      @@ -989,28 +710,26 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
       
           /* WE only understand chunked.  Other modules might inject
            * (and therefore, decode) other flavors but we don't know
      -     * that the can and have done so unless they they remove
      +     * that the can and have done so unless they remove
            * their decoding from the headers_in T-E list.
            * XXX: Make this extensible, but in doing so, presume the
            * encoding has been done by the extensions' handler, and
            * do not modify add_te_chunked's logic
            */
           if (old_te_val && strcasecmp(old_te_val, "chunked") != 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "proxy: %s Transfer-Encoding is not supported",
      -                     old_te_val);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01093)
      +                      "%s Transfer-Encoding is not supported", old_te_val);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           if (old_cl_val && old_te_val) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_ENOTIMPL, r->server,
      -                     "proxy: client %s (%s) requested Transfer-Encoding "
      -                     "chunked body with Content-Length (C-L ignored)",
      -                     c->remote_ip, c->remote_host ? c->remote_host: "");
      -        apr_table_unset(r->headers_in, "Content-Length");
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01094)
      +                      "client %s (%s) requested Transfer-Encoding "
      +                      "chunked body with Content-Length (C-L ignored)",
      +                      c->client_ip, c->remote_host ? c->remote_host: "");
               old_cl_val = NULL;
               origin->keepalive = AP_CONN_CLOSE;
      -        p_conn->close++;
      +        p_conn->close = 1;
           }
       
           /* Prefetch MAX_MEM_SPOOL bytes
      @@ -1027,12 +746,12 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
                                       AP_MODE_READBYTES, APR_BLOCK_READ,
                                       MAX_MEM_SPOOL - bytes_read);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                         "proxy: prefetch request body failed to %pI (%s)"
      -                         " from %s (%s)",
      -                         p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
      -                         c->remote_ip, c->remote_host ? c->remote_host: "");
      -            return HTTP_BAD_REQUEST;
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01095)
      +                          "prefetch request body failed to %pI (%s)"
      +                          " from %s (%s)",
      +                          p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
      +                          c->client_ip, c->remote_host ? c->remote_host: "");
      +            return ap_map_http_request_error(status, HTTP_BAD_REQUEST);
               }
       
               apr_brigade_length(temp_brigade, 1, &bytes);
      @@ -1049,11 +768,11 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
                */
               status = ap_save_brigade(NULL, &input_brigade, &temp_brigade, p);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
      -                         "proxy: processing prefetched request body failed"
      -                         " to %pI (%s) from %s (%s)",
      -                         p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
      -                         c->remote_ip, c->remote_host ? c->remote_host: "");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01096)
      +                          "processing prefetched request body failed"
      +                          " to %pI (%s) from %s (%s)",
      +                          p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
      +                          c->client_ip, c->remote_host ? c->remote_host: "");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
       
      @@ -1154,7 +873,7 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
            * otherwise sent Connection: Keep-Alive.
            */
           if (!force10) {
      -        if (p_conn->close) {
      +        if (!ap_proxy_connection_reusable(p_conn)) {
                   buf = apr_pstrdup(p, "Connection: close" CRLF);
               }
               else {
      @@ -1183,25 +902,84 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
               break;
           default:
               /* shouldn't be possible */
      -        rv = HTTP_INTERNAL_SERVER_ERROR ;
      +        rv = HTTP_INTERNAL_SERVER_ERROR;
               break;
           }
       
           if (rv != OK) {
               /* apr_status_t value has been logged in lower level method */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "proxy: pass request body failed to %pI (%s)"
      -                     " from %s (%s)",
      -                     p_conn->addr,
      -                     p_conn->hostname ? p_conn->hostname: "",
      -                     c->remote_ip,
      -                     c->remote_host ? c->remote_host: "");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01097)
      +                      "pass request body failed to %pI (%s) from %s (%s)",
      +                      p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
      +                      c->client_ip, c->remote_host ? c->remote_host: "");
               return rv;
           }
       
           return OK;
       }
       
      +/*
      + * If the date is a valid RFC 850 date or asctime() date, then it
      + * is converted to the RFC 1123 format.
      + */
      +static const char *date_canon(apr_pool_t *p, const char *date)
      +{
      +    apr_status_t rv;
      +    char* ndate;
      +
      +    apr_time_t time = apr_date_parse_http(date);
      +    if (!time) {
      +        return date;
      +    }
      +
      +    ndate = apr_palloc(p, APR_RFC822_DATE_LEN);
      +    rv = apr_rfc822_date(ndate, time);
      +    if (rv != APR_SUCCESS) {
      +        return date;
      +    }
      +
      +    return ndate;
      +}
      +
      +static request_rec *make_fake_req(conn_rec *c, request_rec *r)
      +{
      +    apr_pool_t *pool;
      +    request_rec *rp;
      +
      +    apr_pool_create(&pool, c->pool);
      +
      +    rp = apr_pcalloc(pool, sizeof(*r));
      +
      +    rp->pool            = pool;
      +    rp->status          = HTTP_OK;
      +
      +    rp->headers_in      = apr_table_make(pool, 50);
      +    rp->trailers_in     = apr_table_make(pool, 5);
      +
      +    rp->subprocess_env  = apr_table_make(pool, 50);
      +    rp->headers_out     = apr_table_make(pool, 12);
      +    rp->trailers_out    = apr_table_make(pool, 5);
      +    rp->err_headers_out = apr_table_make(pool, 5);
      +    rp->notes           = apr_table_make(pool, 5);
      +
      +    rp->server = r->server;
      +    rp->log = r->log;
      +    rp->proxyreq = r->proxyreq;
      +    rp->request_time = r->request_time;
      +    rp->connection      = c;
      +    rp->output_filters  = c->output_filters;
      +    rp->input_filters   = c->input_filters;
      +    rp->proto_output_filters  = c->output_filters;
      +    rp->proto_input_filters   = c->input_filters;
      +    rp->useragent_ip = c->client_ip;
      +    rp->useragent_addr = c->client_addr;
      +
      +    rp->request_config  = ap_create_request_config(pool);
      +    proxy_run_create_req(r, rp);
      +
      +    return rp;
      +}
      +
       static void process_proxy_header(request_rec *r, proxy_dir_conf *c,
                                        const char *key, const char *value)
       {
      @@ -1222,7 +1000,7 @@ static void process_proxy_header(request_rec *r, proxy_dir_conf *c,
           for (i = 0; date_hdrs[i]; ++i) {
               if (!strcasecmp(date_hdrs[i], key)) {
                   apr_table_add(r->headers_out, key,
      -                          ap_proxy_date_canon(r->pool, value));
      +                          date_canon(r->pool, value));
                   return;
               }
           }
      @@ -1234,7 +1012,6 @@ static void process_proxy_header(request_rec *r, proxy_dir_conf *c,
              }
           }
           apr_table_add(r->headers_out, key, value);
      -    return;
       }
       
       /*
      @@ -1261,6 +1038,7 @@ static void ap_proxy_read_headers(request_rec *r, request_rec *rr,
           psc = (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
       
           r->headers_out = apr_table_make(r->pool, 20);
      +    r->trailers_out = apr_table_make(r->pool, 5);
           *pread_len = 0;
       
           /*
      @@ -1289,7 +1067,7 @@ static void ap_proxy_read_headers(request_rec *r, request_rec *rr,
                       if (psc->badopt == bad_error) {
                           /* Nope, it wasn't even an extra HTTP header. Give up. */
                           r->headers_out = NULL;
      -                    return ;
      +                    return;
                       }
                       else if (psc->badopt == bad_body) {
                           /* if we've already started loading headers_out, then
      @@ -1298,23 +1076,25 @@ static void ap_proxy_read_headers(request_rec *r, request_rec *rr,
                            * the first line of the response.
                            */
                           if (saw_headers) {
      -                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                         "proxy: Starting body due to bogus non-header in headers "
      -                         "returned by %s (%s)", r->uri, r->method);
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01098)
      +                                      "Starting body due to bogus non-header "
      +                                      "in headers returned by %s (%s)",
      +                                      r->uri, r->method);
                               *pread_len = len;
      -                        return ;
      -                    } else {
      -                         ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                         "proxy: No HTTP headers "
      -                         "returned by %s (%s)", r->uri, r->method);
      -                        return ;
      +                        return;
      +                    }
      +                    else {
      +                        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01099)
      +                                      "No HTTP headers returned by %s (%s)",
      +                                      r->uri, r->method);
      +                        return;
                           }
                       }
                   }
                   /* this is the psc->badopt == bad_ignore case */
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                         "proxy: Ignoring bogus HTTP header "
      -                         "returned by %s (%s)", r->uri, r->method);
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01100)
      +                          "Ignoring bogus HTTP header returned by %s (%s)",
      +                          r->uri, r->method);
                   continue;
               }
       
      @@ -1327,15 +1107,14 @@ static void ap_proxy_read_headers(request_rec *r, request_rec *rr,
                   ++value;            /* Skip to start of value   */
       
               /* should strip trailing whitespace as well */
      -        for (end = &value[strlen(value)-1]; end > value && apr_isspace(*end); --
      -end)
      +        for (end = &value[strlen(value)-1]; end > value && apr_isspace(*end); --end)
                   *end = '\0';
       
               /* make sure we add so as not to destroy duplicated headers
                * Modify headers requiring canonicalisation and/or affected
                * by ProxyPassReverse and family with process_proxy_header
                */
      -        process_proxy_header(r, dconf, buffer, value) ;
      +        process_proxy_header(r, dconf, buffer, value);
               saw_headers = 1;
       
               /* the header was too long; at the least we should skip extra data */
      @@ -1381,7 +1160,7 @@ apr_status_t ap_proxygetline(apr_bucket_brigade *bb, char *s, int n, request_rec
       }
       
       /*
      - * Limit the number of interim respones we sent back to the client. Otherwise
      + * Limit the number of interim responses we sent back to the client. Otherwise
        * we suffer from a memory build up. Besides there is NO sense in sending back
        * an unlimited number of interim responses to the client. Thus if we cross
        * this limit send back a 502 (Bad Gateway).
      @@ -1390,6 +1169,14 @@ apr_status_t ap_proxygetline(apr_bucket_brigade *bb, char *s, int n, request_rec
       #define AP_MAX_INTERIM_RESPONSES 10
       #endif
       
      +static int add_trailers(void *data, const char *key, const char *val)
      +{
      +    if (val) {
      +        apr_table_add((apr_table_t*)data, key, val);
      +    }
      +    return 1;
      +}
      +
       static
       apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                                                   proxy_conn_rec **backend_ptr,
      @@ -1401,7 +1188,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
           const char *buf;
           char keepchar;
           apr_bucket *e;
      -    apr_bucket_brigade *bb, *tmp_bb;
      +    apr_bucket_brigade *bb;
           apr_bucket_brigade *pass_bb;
           int len, backasswards;
           int interim_response = 0; /* non-zero whilst interim 1xx responses
      @@ -1440,8 +1227,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                   apr_status_t rc;
                   rc = apr_socket_timeout_set(backend->sock, worker->s->ping_timeout);
                   if (rc != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
      -                             "proxy: could not set 100-Continue timeout");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(01101)
      +                              "could not set 100-Continue timeout");
                   }
               }
           }
      @@ -1450,31 +1237,32 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
            * filter chain
            */
       
      -    backend->r = ap_proxy_make_fake_req(origin, r);
      +    backend->r = make_fake_req(origin, r);
           /* In case anyone needs to know, this is a fake request that is really a
            * response.
            */
           backend->r->proxyreq = PROXYREQ_RESPONSE;
           apr_table_setn(r->notes, "proxy-source-port", apr_psprintf(r->pool, "%hu",
                          origin->local_addr->port));
      -    tmp_bb = apr_brigade_create(p, c->bucket_alloc);
           do {
               apr_status_t rc;
       
               apr_brigade_cleanup(bb);
       
      -        rc = ap_proxygetline(tmp_bb, buffer, sizeof(buffer), backend->r, 0, &len);
      +        rc = ap_proxygetline(backend->tmp_bb, buffer, sizeof(buffer),
      +                             backend->r, 0, &len);
               if (len == 0) {
                   /* handle one potential stray CRLF */
      -            rc = ap_proxygetline(tmp_bb, buffer, sizeof(buffer), backend->r, 0, &len);
      +            rc = ap_proxygetline(backend->tmp_bb, buffer, sizeof(buffer),
      +                                 backend->r, 0, &len);
               }
               if (len <= 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                          "proxy: error reading status line from remote "
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, APLOGNO(01102)
      +                          "error reading status line from remote "
                                 "server %s:%d", backend->hostname, backend->port);
                   if (APR_STATUS_IS_TIMEUP(rc)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                              "proxy: read timeout");
      +                apr_table_setn(r->notes, "proxy_timedout", "1");
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01103) "read timeout");
                       if (do_100_continue) {
                           return ap_proxyerror(r, HTTP_SERVICE_UNAVAILABLE, "Timeout on 100-Continue");
                       }
      @@ -1494,8 +1282,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                       !APR_STATUS_IS_TIMEUP(rc)) {
                       apr_bucket *eos;
       
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                              "proxy: Closing connection to client because"
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01104)
      +                              "Closing connection to client because"
                                     " reading from backend server %s:%d failed."
                                     " Number of keepalives %i", backend->hostname,
                                     backend->port, c->keepalives);
      @@ -1529,11 +1317,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                       return OK;
                   }
                   else if (!c->keepalives) {
      -                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                                   "proxy: NOT Closing connection to client"
      +                     ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01105)
      +                                   "NOT Closing connection to client"
                                          " although reading from backend server %s:%d"
      -                                   " failed.", backend->hostname,
      -                                   backend->port);
      +                                   " failed.",
      +                                   backend->hostname, backend->port);
                   }
                   return ap_proxyerror(r, HTTP_BAD_GATEWAY,
                                        "Error reading from remote server");
      @@ -1546,6 +1334,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                */
               if (apr_date_checkmask(buffer, "HTTP/#.# ###*")) {
                   int major, minor;
      +            int toclose;
       
                   major = buffer[5] - '0';
                   minor = buffer[7] - '0';
      @@ -1600,11 +1389,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                                         &pread_len);
       
                   if (r->headers_out == NULL) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
      -                             r->server, "proxy: bad HTTP/%d.%d header "
      -                             "returned by %s (%s)", major, minor, r->uri,
      -                             r->method);
      -                backend->close += 1;
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01106)
      +                              "bad HTTP/%d.%d header returned by %s (%s)",
      +                              major, minor, r->uri, r->method);
      +                backend->close = 1;
                       /*
                        * ap_send_error relies on a headers_out to be present. we
                        * are in a bad position here.. so force everything we send out
      @@ -1641,11 +1429,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                        * XXX: We aught to treat such a response as uncachable
                        */
                       apr_table_unset(r->headers_out, "Content-Length");
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                             "proxy: server %s:%d returned Transfer-Encoding"
      -                             " and Content-Length", backend->hostname,
      -                             backend->port);
      -                backend->close += 1;
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01107)
      +                              "server %s:%d returned Transfer-Encoding"
      +                              " and Content-Length",
      +                              backend->hostname, backend->port);
      +                backend->close = 1;
                   }
       
                   /*
      @@ -1653,11 +1441,13 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                    * ap_http_filter to know where to end.
                    */
                   te = apr_table_get(r->headers_out, "Transfer-Encoding");
      +
                   /* strip connection listed hop-by-hop headers from response */
      -            backend->close += ap_proxy_liststr(apr_table_get(r->headers_out,
      -                                                             "Connection"),
      -                                              "close");
      -            ap_proxy_clear_connection(p, r->headers_out);
      +            toclose = ap_proxy_clear_connection_fn(r, r->headers_out);
      +            if (toclose) {
      +                backend->close = 1;
      +            }
      +
                   if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
                       ap_set_content_type(r, apr_pstrdup(p, buf));
                   }
      @@ -1669,6 +1459,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                   for (i=0; hop_by_hop_hdrs[i]; ++i) {
                       apr_table_unset(r->headers_out, hop_by_hop_hdrs[i]);
                   }
      +
                   /* Delete warnings with wrong date */
                   r->headers_out = ap_proxy_clean_warnings(p, r->headers_out);
       
      @@ -1701,7 +1492,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
       
                   /* cancel keepalive if HTTP/1.0 or less */
                   if ((major < 1) || (minor < 1)) {
      -                backend->close += 1;
      +                backend->close = 1;
                       origin->keepalive = AP_CONN_CLOSE;
                   }
               } else {
      @@ -1709,7 +1500,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                   backasswards = 1;
                   r->status = 200;
                   r->status_line = "200 OK";
      -            backend->close += 1;
      +            backend->close = 1;
               }
       
               if (ap_is_HTTP_INFO(proxy_status)) {
      @@ -1736,21 +1527,24 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                    * behaviour here might break something.
                    *
                    * So let's make it configurable.
      +             *
      +             * We need to set "r->expecting_100 = 1" otherwise origin
      +             * server behaviour will apply.
                    */
                   const char *policy = apr_table_get(r->subprocess_env,
                                                      "proxy-interim-response");
                   ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                         "proxy: HTTP: received interim %d response",
      -                         r->status);
      -            if (!policy || !strcasecmp(policy, "RFC")) {
      +                          "HTTP: received interim %d response", r->status);
      +            if (!policy
      +                    || (!strcasecmp(policy, "RFC") && ((r->expecting_100 = 1)))) {
                       ap_send_interim_response(r, 1);
                   }
                   /* FIXME: refine this to be able to specify per-response-status
                    * policies and maybe also add option to bail out with 502
                    */
                   else if (strcasecmp(policy, "Suppress")) {
      -                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      -                             "undefined proxy interim response policy");
      +                ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01108)
      +                              "undefined proxy interim response policy");
                   }
               }
               /* Moved the fixups of Date headers and those affected by
      @@ -1763,8 +1557,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                   if ((buf = apr_table_get(r->headers_out, wa))) {
                       apr_table_set(r->err_headers_out, wa, buf);
                   } else {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                             "proxy: origin server sent 401 without WWW-Authenticate header");
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01109)
      +                              "origin server sent 401 without "
      +                              "WWW-Authenticate header");
                   }
               }
       
      @@ -1804,8 +1599,25 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                   if (!r->header_only && /* not HEAD request */
                       (proxy_status != HTTP_NO_CONTENT) && /* not 204 */
                       (proxy_status != HTTP_NOT_MODIFIED)) { /* not 304 */
      +                const char *tmp;
      +                /* Add minimal headers needed to allow http_in filter
      +                 * detecting end of body without waiting for a timeout. */
      +                if ((tmp = apr_table_get(r->headers_out, "Transfer-Encoding"))) {
      +                    apr_table_set(backend->r->headers_in, "Transfer-Encoding", tmp);
      +                }
      +                else if ((tmp = apr_table_get(r->headers_out, "Content-Length"))) {
      +                    apr_table_set(backend->r->headers_in, "Content-Length", tmp);
      +                }
      +                else if (te) {
      +                    apr_table_set(backend->r->headers_in, "Transfer-Encoding", te);
      +                }
                       ap_discard_request_body(backend->r);
                   }
      +            /*
      +             * prevent proxy_handler() from treating this as an
      +             * internal error.
      +             */
      +            apr_table_setn(r->notes, "proxy-error-override", "1");
                   return proxy_status;
               }
       
      @@ -1832,8 +1644,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
       
                   apr_table_unset(r->headers_out,"Transfer-Encoding");
       
      -            ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, r->server,
      -                         "proxy: start body send");
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r, "start body send");
       
                   /*
                    * if we are overriding the errors, we can't put the content
      @@ -1865,8 +1676,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
       
                           /* ap_get_brigade will return success with an empty brigade
                            * for a non-blocking read which would block: */
      -                    if (APR_STATUS_IS_EAGAIN(rv)
      -                        || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb))) {
      +                    if (mode == APR_NONBLOCK_READ
      +                        && (APR_STATUS_IS_EAGAIN(rv)
      +                            || (rv == APR_SUCCESS && APR_BRIGADE_EMPTY(bb)))) {
                               /* flush to the client and switch to blocking mode */
                               e = apr_bucket_flush_create(c->bucket_alloc);
                               APR_BRIGADE_INSERT_TAIL(bb, e);
      @@ -1880,6 +1692,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                               continue;
                           }
                           else if (rv == APR_EOF) {
      +                        backend->close = 1;
                               break;
                           }
                           else if (rv != APR_SUCCESS) {
      @@ -1887,8 +1700,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                                * our backend bailed on us. Pass along a 502 error
                                * error bucket
                                */
      -                        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      -                                      "proxy: error reading response");
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01110)
      +                                      "error reading response");
                               ap_proxy_backend_broke(r, bb);
                               ap_pass_brigade(r->output_filters, bb);
                               backend_broke = 1;
      @@ -1898,18 +1711,22 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                           /* next time try a non-blocking read */
                           mode = APR_NONBLOCK_READ;
       
      +                    if (!apr_is_empty_table(backend->r->trailers_in)) {
      +                        apr_table_do(add_trailers, r->trailers_out,
      +                                backend->r->trailers_in, NULL);
      +                        apr_table_clear(backend->r->trailers_in);
      +                    }
      +
                           apr_brigade_length(bb, 0, &readbytes);
                           backend->worker->s->read += readbytes;
       #if DEBUGGING
                           {
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      -                                 r->server, "proxy (PID %d): readbytes: %#x",
      -                                 getpid(), readbytes);
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01111)
      +                                  "readbytes: %#x", readbytes);
                           }
       #endif
                           /* sanity check */
                           if (APR_BRIGADE_EMPTY(bb)) {
      -                        apr_brigade_cleanup(bb);
                               break;
                           }
       
      @@ -1972,12 +1789,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
       
                       } while (!finish);
                   }
      -            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                         "proxy: end body send");
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "end body send");
               }
               else if (!interim_response) {
      -            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                         "proxy: header only");
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "header only");
       
                   /* make sure we release the backend connection as soon
                    * as we know we are done, so that the backend isn't
      @@ -1997,6 +1812,10 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
               }
           } while (interim_response && (interim_response < AP_MAX_INTERIM_RESPONSES));
       
      +    /* We have to cleanup bb brigade, because buckets inserted to it could be
      +     * created from scpool and this pool can be freed before this brigade. */
      +    apr_brigade_cleanup(bb);
      +
           /* See define of AP_MAX_INTERIM_RESPONSES for why */
           if (interim_response >= AP_MAX_INTERIM_RESPONSES) {
               return ap_proxyerror(r, HTTP_BAD_GATEWAY,
      @@ -2057,23 +1876,23 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
              return DECLINED;
           if ((u - url) > 14)
               return HTTP_BAD_REQUEST;
      -    scheme = apr_pstrndup(p, url, u - url);
      +    scheme = apr_pstrmemdup(p, url, u - url);
           /* scheme is lowercase */
           ap_str_tolower(scheme);
           /* is it for us? */
           if (strcmp(scheme, "https") == 0) {
               if (!ap_proxy_ssl_enable(NULL)) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                         "proxy: HTTPS: declining URL %s"
      -                         " (mod_ssl not configured?)", url);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01112)
      +                          "HTTPS: declining URL %s (mod_ssl not configured?)",
      +                          url);
                   return DECLINED;
               }
               is_ssl = 1;
               proxy_function = "HTTPS";
           }
           else if (!(strcmp(scheme, "http") == 0 || (strcmp(scheme, "ftp") == 0 && proxyname))) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                     "proxy: HTTP: declining URL %s", url);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01113) "HTTP: declining URL %s",
      +                      url);
               return DECLINED; /* only interested in HTTP, or FTP via proxy */
           }
           else {
      @@ -2082,8 +1901,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
               else
                   proxy_function = "FTP";
           }
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, r->server,
      -                 "proxy: HTTP: serving URL %s", url);
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "HTTP: serving URL %s", url);
       
       
           /* create space for state information */
      @@ -2091,13 +1909,8 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
                                                     worker, r->server)) != OK)
               goto cleanup;
       
      -
           backend->is_ssl = is_ssl;
       
      -    if (is_ssl) {
      -        ap_proxy_ssl_connection_cleanup(backend, r);
      -    }
      -
           /*
            * In the case that we are handling a reverse proxy connection and this
            * is not a request that is coming over an already kept alive connection
      @@ -2122,10 +1935,13 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
                   break;
       
               /* Step Two: Make the Connection */
      -        if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                         "proxy: HTTP: failed to make connection to backend: %s",
      -                         backend->hostname);
      +        if (ap_proxy_check_connection(proxy_function, backend, r->server, 1,
      +                                      PROXY_CHECK_CONN_EMPTY)
      +                && ap_proxy_connect_backend(proxy_function, backend, worker,
      +                                            r->server)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01114)
      +                          "HTTP: failed to make connection to backend: %s",
      +                          backend->hostname);
                   status = HTTP_SERVICE_UNAVAILABLE;
                   break;
               }
      @@ -2140,9 +1956,10 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
                    * requested, such that mod_ssl can check if it is requested to do
                    * so.
                    */
      -            if (is_ssl) {
      -                apr_table_set(backend->connection->notes, "proxy-request-hostname",
      -                              uri->hostname);
      +            if (backend->ssl_hostname) {
      +                apr_table_setn(backend->connection->notes,
      +                               "proxy-request-hostname",
      +                               backend->ssl_hostname);
                   }
               }
       
      @@ -2154,9 +1971,9 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
                                               conf, uri, locurl, server_portstr)) != OK) {
                   if ((status == HTTP_SERVICE_UNAVAILABLE) && worker->s->ping_timeout_set) {
                       backend->close = 1;
      -                ap_log_error(APLOG_MARK, APLOG_INFO, status, r->server,
      -                             "proxy: HTTP: 100-Continue failed to %pI (%s)",
      -                             worker->cp->addr, worker->s->hostname);
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, status, r, APLOGNO(01115)
      +                              "HTTP: 100-Continue failed to %pI (%s)",
      +                              worker->cp->addr, worker->s->hostname);
                       retry++;
                       continue;
                   } else {
      @@ -2181,8 +1998,34 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
           }
           return status;
       }
      +
      +/* post_config hook: */
      +static int proxy_http_post_config(apr_pool_t *pconf, apr_pool_t *plog,
      +        apr_pool_t *ptemp, server_rec *s)
      +{
      +
      +    /* proxy_http_post_config() will be called twice during startup.  So, don't
      +     * set up the static data the 1st time through. */
      +    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
      +        return OK;
      +    }
      +
      +    if (!ap_proxy_clear_connection_fn) {
      +        ap_proxy_clear_connection_fn =
      +                APR_RETRIEVE_OPTIONAL_FN(ap_proxy_clear_connection);
      +        if (!ap_proxy_clear_connection_fn) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02477)
      +                         "mod_proxy must be loaded for mod_proxy_http");
      +            return !OK;
      +        }
      +    }
      +
      +    return OK;
      +}
      +
       static void ap_proxy_http_register_hook(apr_pool_t *p)
       {
      +    ap_hook_post_config(proxy_http_post_config, NULL, NULL, APR_HOOK_MIDDLE);
           proxy_hook_scheme_handler(proxy_http_handler, NULL, NULL, APR_HOOK_FIRST);
           proxy_hook_canon_handler(proxy_http_canon, NULL, NULL, APR_HOOK_FIRST);
           warn_rx = ap_pregcomp(p, "[0-9]{3}[ \t]+[^ \t]+[ \t]+\"[^\"]*\"([ \t]+\"([^\"]+)\")?", 0);
      diff --git a/modules/proxy/mod_proxy_http.dep b/modules/proxy/mod_proxy_http.dep
      new file mode 100644
      index 00000000000..35c91b714f4
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_http.dep
      @@ -0,0 +1,73 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_http.mak
      +
      +.\mod_proxy_http.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_http.mak b/modules/proxy/mod_proxy_http.mak
      new file mode 100644
      index 00000000000..c3811872170
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_http.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_http.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_http - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_http - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_http - Win32 Release" && "$(CFG)" != "mod_proxy_http - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_http.mak" CFG="mod_proxy_http - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_http - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_http - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_http.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_http.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_http.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http.res"
      +	-@erase "$(INTDIR)\mod_proxy_http_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_http_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_http.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_http.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_http_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_http.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_http.so" /d LONG_NAME="proxy_http_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_http.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_http.pdb" /debug /out:"$(OUTDIR)\mod_proxy_http.so" /implib:"$(OUTDIR)\mod_proxy_http.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_http.obj" \
      +	"$(INTDIR)\mod_proxy_http.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_http.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_http.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_http.so"
      +   if exist .\Release\mod_proxy_http.so.manifest mt.exe -manifest .\Release\mod_proxy_http.so.manifest -outputresource:.\Release\mod_proxy_http.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_http.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_http.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_http.obj"
      +	-@erase "$(INTDIR)\mod_proxy_http.res"
      +	-@erase "$(INTDIR)\mod_proxy_http_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_http_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_http.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_http.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_http.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_http_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_http.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_http.so" /d LONG_NAME="proxy_http_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_http.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_http.pdb" /debug /out:"$(OUTDIR)\mod_proxy_http.so" /implib:"$(OUTDIR)\mod_proxy_http.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_http.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_http.obj" \
      +	"$(INTDIR)\mod_proxy_http.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_http.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_http.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_http.so"
      +   if exist .\Debug\mod_proxy_http.so.manifest mt.exe -manifest .\Debug\mod_proxy_http.so.manifest -outputresource:.\Debug\mod_proxy_http.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_http.dep")
      +!INCLUDE "mod_proxy_http.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_http.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_http - Win32 Release" || "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +SOURCE=.\mod_proxy_http.c
      +
      +"$(INTDIR)\mod_proxy_http.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_http - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_http.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_http.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_http.so" /d LONG_NAME="proxy_http_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_http - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_http.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_http.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_http.so" /d LONG_NAME="proxy_http_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_scgi.c b/modules/proxy/mod_proxy_scgi.c
      index bd9c53ed5c5..cede817a7ea 100644
      --- a/modules/proxy/mod_proxy_scgi.c
      +++ b/modules/proxy/mod_proxy_scgi.c
      @@ -37,13 +37,13 @@
       #include "util_script.h"
       
       #include "mod_proxy.h"
      +#include "scgi.h"
       
       
       #define SCHEME "scgi"
       #define PROXY_FUNCTION "SCGI"
       #define SCGI_MAGIC "SCGI"
       #define SCGI_PROTOCOL_VERSION "1"
      -#define SCGI_DEFAULT_PORT (4000)
       
       /* just protect from typos */
       #define CONTENT_LENGTH "CONTENT_LENGTH"
      @@ -64,10 +64,12 @@ typedef struct {
       
       const char *scgi_sendfile_off = "off";
       const char *scgi_sendfile_on = "X-Sendfile";
      +const char *scgi_internal_redirect_off = "off";
      +const char *scgi_internal_redirect_on = "Location";
       
       typedef struct {
           const char *sendfile;
      -    int internal_redirect;
      +    const char *internal_redirect;
       } scgi_config;
       
       
      @@ -176,21 +178,28 @@ static int scgi_canon(request_rec *r, char *url)
       {
           char *host, sport[sizeof(":65535")];
           const char *err, *path;
      -    apr_port_t port = SCGI_DEFAULT_PORT;
      +    apr_port_t port, def_port;
       
           if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
               return DECLINED;
           }
           url += sizeof(SCHEME); /* Keep slashes */
       
      +    port = def_port = SCGI_DEF_PORT;
      +
           err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
           if (err) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00857)
                             "error parsing URL %s: %s", url, err);
               return HTTP_BAD_REQUEST;
           }
       
      -    apr_snprintf(sport, sizeof(sport), ":%u", port);
      +    if (port != def_port) {
      +        apr_snprintf(sport, sizeof(sport), ":%u", port);
      +    }
      +    else {
      +        sport[0] = '\0';
      +    }
       
           if (ap_strchr(host, ':')) { /* if literal IPv6 address */
               host = apr_pstrcat(r->pool, "[", host, "]", NULL);
      @@ -225,9 +234,9 @@ static int sendall(proxy_conn_rec *conn, const char *buf, apr_size_t length,
           while (length > 0) {
               written = length;
               if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "proxy: " PROXY_FUNCTION ": sending data to "
      -                          "%s:%u failed", conn->hostname, conn->port);
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00858)
      +                          "sending data to %s:%u failed",
      +                          conn->hostname, conn->port);
                   return HTTP_SERVICE_UNAVAILABLE;
               }
       
      @@ -336,9 +345,8 @@ static int send_request_body(request_rec *r, proxy_conn_rec *conn)
                   readlen = ap_get_client_block(r, buf, AP_IOBUFSIZE);
               }
               if (readlen == -1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "proxy: " PROXY_FUNCTION ": receiving request body "
      -                          "failed");
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00859)
      +                          "receiving request body failed");
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
           }
      @@ -372,9 +380,9 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn)
           status = ap_scan_script_header_err_brigade_ex(r, bb, NULL,
                                                         APLOG_MODULE_INDEX);
           if (status != OK) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "proxy: " PROXY_FUNCTION ": error reading response "
      -                      "headers from %s:%u", conn->hostname, conn->port);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00860)
      +                      "error reading response headers from %s:%u",
      +                      conn->hostname, conn->port);
               r->status_line = NULL;
               apr_brigade_destroy(bb);
               return status;
      @@ -392,9 +400,8 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn)
               if (location) {
                   scgi_request_config *req_conf = apr_palloc(r->pool,
                                                              sizeof(*req_conf));
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "proxy: " PROXY_FUNCTION ": Found %s: %s - "
      -                          "preparing subrequest.",
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00861)
      +                          "Found %s: %s - preparing subrequest.",
                                 conf->sendfile, location);
       
                   if (err) {
      @@ -412,11 +419,29 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn)
               }
           }
       
      -    if (conf->internal_redirect && r->status == HTTP_OK) {
      -        location = apr_table_get(r->headers_out, "Location");
      +    if (r->status == HTTP_OK 
      +        && (!conf->internal_redirect /* default === On */
      +            || conf->internal_redirect != scgi_internal_redirect_off)) {
      +        short err = 1;
      +        const char *location_header = conf->internal_redirect ? 
      +            conf->internal_redirect : scgi_internal_redirect_on;
      +
      +        location = apr_table_get(r->err_headers_out, location_header);
      +        if (!location) {
      +            err = 0;
      +            location = apr_table_get(r->headers_out, location_header);
      +        }
               if (location && *location == '/') {
                   scgi_request_config *req_conf = apr_palloc(r->pool,
                                                              sizeof(*req_conf));
      +            if (strcasecmp(location_header, "Location")) {
      +                if (err) {
      +                    apr_table_unset(r->err_headers_out, location_header);
      +                }
      +                else {
      +                    apr_table_unset(r->headers_out, location_header);
      +                }
      +            }
                   req_conf->location = location;
                   req_conf->type = scgi_internal_redirect;
                   ap_set_module_config(r->request_config, &proxy_scgi_module,
      @@ -426,8 +451,9 @@ static int pass_response(request_rec *r, proxy_conn_rec *conn)
               }
           }
       
      -    /* XXX: What could we do with that return code? */
      -    (void)ap_pass_brigade(r->output_filters, bb);
      +    if (ap_pass_brigade(r->output_filters, bb)) {
      +        return AP_FILTER_ERROR;
      +    }
       
           return OK;
       }
      @@ -444,9 +470,8 @@ static int scgi_request_status(int *status, request_rec *r)
                                                   &proxy_scgi_module))) {
               switch (req_conf->type) {
               case scgi_internal_redirect:
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "proxy: " PROXY_FUNCTION ": Internal redirect to %s",
      -                          req_conf->location);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00862)
      +                          "Internal redirect to %s", req_conf->location);
       
                   r->status_line = NULL;
                   if (r->method_number != M_GET) {
      @@ -460,9 +485,8 @@ static int scgi_request_status(int *status, request_rec *r)
                   /* break; */
       
               case scgi_sendfile:
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "proxy: " PROXY_FUNCTION ": File subrequest to %s",
      -                          req_conf->location);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00863)
      +                          "File subrequest to %s", req_conf->location);
                   do {
                       request_rec *rr;
       
      @@ -477,7 +501,7 @@ static int scgi_request_status(int *status, request_rec *r)
                           ap_run_sub_req(rr);
                       }
                       else {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00864)
                                         "Subrequest to file '%s' not possible. "
                                         "(rr->status=%d, rr->finfo.filetype=%d)",
                                         req_conf->location, rr->status,
      @@ -485,7 +509,7 @@ static int scgi_request_status(int *status, request_rec *r)
                           *status = HTTP_INTERNAL_SERVER_ERROR;
                           return *status;
                       }
      -            } while(0);
      +            } while (0);
       
                   return OK;
                   /* break; */
      @@ -506,12 +530,12 @@ static int scgi_handler(request_rec *r, proxy_worker *worker,
           int status;
           proxy_conn_rec *backend = NULL;
           apr_pool_t *p = r->pool;
      -    apr_uri_t *uri = apr_palloc(r->pool, sizeof(*uri));
      +    apr_uri_t *uri;
           char dummy;
       
           if (strncasecmp(url, SCHEME "://", sizeof(SCHEME) + 2)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                      "proxy: " PROXY_FUNCTION ": declining URL %s", url);
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00865)
      +                      "declining URL %s", url);
               return DECLINED;
           }
       
      @@ -524,6 +548,7 @@ static int scgi_handler(request_rec *r, proxy_worker *worker,
           backend->is_ssl = 0;
       
           /* Step One: Determine Who To Connect To */
      +    uri = apr_palloc(p, sizeof(*uri));
           status = ap_proxy_determine_connection(p, r, conf, worker, backend,
                                                  uri, &url, proxyname, proxyport,
                                                  &dummy, 1);
      @@ -533,9 +558,9 @@ static int scgi_handler(request_rec *r, proxy_worker *worker,
       
           /* Step Two: Make the Connection */
           if (ap_proxy_connect_backend(PROXY_FUNCTION, backend, worker, r->server)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "proxy: " PROXY_FUNCTION ": failed to make connection "
      -                     "to backend: %s:%u", backend->hostname, backend->port);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00866)
      +                      "failed to make connection to backend: %s:%u",
      +                      backend->hostname, backend->port);
               status = HTTP_SERVICE_UNAVAILABLE;
               goto cleanup;
           }
      @@ -561,8 +586,8 @@ static void *create_scgi_config(apr_pool_t *p, char *dummy)
       {
           scgi_config *conf=apr_palloc(p, sizeof(*conf));
       
      -    conf->sendfile = NULL;
      -    conf->internal_redirect = -1;
      +    conf->sendfile = NULL; /* === default (off) */
      +    conf->internal_redirect = NULL; /* === default (on) */
       
           return conf;
       }
      @@ -573,7 +598,7 @@ static void *merge_scgi_config(apr_pool_t *p, void *base_, void *add_)
           scgi_config *base=base_, *add=add_, *conf=apr_palloc(p, sizeof(*conf));
       
           conf->sendfile = add->sendfile ? add->sendfile: base->sendfile;
      -    conf->internal_redirect =   (add->internal_redirect != -1)
      +    conf->internal_redirect = add->internal_redirect
                                     ? add->internal_redirect
                                     : base->internal_redirect;
           return conf;
      @@ -598,16 +623,33 @@ static const char *scgi_set_send_file(cmd_parms *cmd, void *mconfig,
       }
       
       
      +static const char *scgi_set_internal_redirect(cmd_parms *cmd, void *mconfig,
      +                                              const char *arg)
      +{
      +    scgi_config *conf = mconfig;
      +
      +    if (!strcasecmp(arg, "Off")) {
      +        conf->internal_redirect = scgi_internal_redirect_off;
      +    }
      +    else if (!strcasecmp(arg, "On")) {
      +        conf->internal_redirect = scgi_internal_redirect_on;
      +    }
      +    else {
      +        conf->internal_redirect = arg;
      +    }
      +    return NULL;
      +}
      +
      +
       static const command_rec scgi_cmds[] =
       {
           AP_INIT_TAKE1("ProxySCGISendfile", scgi_set_send_file, NULL,
                         RSRC_CONF|ACCESS_CONF,
      -                  "The name of the X-Sendfile peudo response header or "
      +                  "The name of the X-Sendfile pseudo response header or "
                         "On or Off"),
      -    AP_INIT_FLAG("ProxySCGIInternalRedirect", ap_set_flag_slot,
      -                 (void*)APR_OFFSETOF(scgi_config, internal_redirect),
      -                 RSRC_CONF|ACCESS_CONF,
      -                 "Off if internal redirect responses should not be accepted"),
      +    AP_INIT_TAKE1("ProxySCGIInternalRedirect", scgi_set_internal_redirect, NULL,
      +                  RSRC_CONF|ACCESS_CONF,
      +                  "The name of the pseudo response header or On or Off"),
           {NULL}
       };
       
      diff --git a/modules/proxy/mod_proxy_scgi.dep b/modules/proxy/mod_proxy_scgi.dep
      new file mode 100644
      index 00000000000..1b20db84579
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_scgi.dep
      @@ -0,0 +1,75 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_scgi.mak
      +
      +.\mod_proxy_scgi.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	".\scgi.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_proxy_scgi.mak b/modules/proxy/mod_proxy_scgi.mak
      new file mode 100644
      index 00000000000..7ffb24843dd
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_scgi.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_scgi.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_scgi - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_scgi - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_scgi - Win32 Release" && "$(CFG)" != "mod_proxy_scgi - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_scgi.mak" CFG="mod_proxy_scgi - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_scgi - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_scgi - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_scgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_scgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_scgi.obj"
      +	-@erase "$(INTDIR)\mod_proxy_scgi.res"
      +	-@erase "$(INTDIR)\mod_proxy_scgi_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_scgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_scgi_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_scgi.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_scgi.so" /d LONG_NAME="proxy_scgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_scgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_scgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_scgi.so" /implib:"$(OUTDIR)\mod_proxy_scgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_scgi.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_scgi.obj" \
      +	"$(INTDIR)\mod_proxy_scgi.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_scgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_scgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_scgi.so"
      +   if exist .\Release\mod_proxy_scgi.so.manifest mt.exe -manifest .\Release\mod_proxy_scgi.so.manifest -outputresource:.\Release\mod_proxy_scgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_scgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_scgi.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_scgi.obj"
      +	-@erase "$(INTDIR)\mod_proxy_scgi.res"
      +	-@erase "$(INTDIR)\mod_proxy_scgi_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_scgi_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_scgi.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_scgi_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_scgi.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_scgi.so" /d LONG_NAME="proxy_scgi_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_scgi.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_scgi.pdb" /debug /out:"$(OUTDIR)\mod_proxy_scgi.so" /implib:"$(OUTDIR)\mod_proxy_scgi.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_scgi.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_scgi.obj" \
      +	"$(INTDIR)\mod_proxy_scgi.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_scgi.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_scgi.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_scgi.so"
      +   if exist .\Debug\mod_proxy_scgi.so.manifest mt.exe -manifest .\Debug\mod_proxy_scgi.so.manifest -outputresource:.\Debug\mod_proxy_scgi.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_scgi.dep")
      +!INCLUDE "mod_proxy_scgi.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_scgi.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_scgi - Win32 Release" || "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +SOURCE=.\mod_proxy_scgi.c
      +
      +"$(INTDIR)\mod_proxy_scgi.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_scgi - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_scgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_scgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_scgi.so" /d LONG_NAME="proxy_scgi_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_scgi - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_scgi.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_scgi.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_scgi.so" /d LONG_NAME="proxy_scgi_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c
      new file mode 100644
      index 00000000000..597cf118620
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_wstunnel.c
      @@ -0,0 +1,376 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "mod_proxy.h"
      +
      +module AP_MODULE_DECLARE_DATA proxy_wstunnel_module;
      +
      +/*
      + * Canonicalise http-like URLs.
      + * scheme is the scheme for the URL
      + * url is the URL starting with the first '/'
      + * def_port is the default port for this scheme.
      + */
      +static int proxy_wstunnel_canon(request_rec *r, char *url)
      +{
      +    char *host, *path, sport[7];
      +    char *search = NULL;
      +    const char *err;
      +    char *scheme;
      +    apr_port_t port, def_port;
      +
      +    /* ap_port_of_scheme() */
      +    if (strncasecmp(url, "ws:", 3) == 0) {
      +        url += 3;
      +        scheme = "ws:";
      +        def_port = apr_uri_port_of_scheme("http");
      +    }
      +    else if (strncasecmp(url, "wss:", 4) == 0) {
      +        url += 4;
      +        scheme = "wss:";
      +        def_port = apr_uri_port_of_scheme("https");
      +    }
      +    else {
      +        return DECLINED;
      +    }
      +
      +    port = def_port;
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, "canonicalising URL %s", url);
      +
      +    /*
      +     * do syntactic check.
      +     * We break the URL into host, port, path, search
      +     */
      +    err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
      +    if (err) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02439) "error parsing URL %s: %s",
      +                      url, err);
      +        return HTTP_BAD_REQUEST;
      +    }
      +
      +    /*
      +     * now parse path/search args, according to rfc1738:
      +     * process the path. With proxy-nocanon set (by
      +     * mod_proxy) we use the raw, unparsed uri
      +     */
      +    if (apr_table_get(r->notes, "proxy-nocanon")) {
      +        path = url;   /* this is the raw path */
      +    }
      +    else {
      +        path = ap_proxy_canonenc(r->pool, url, strlen(url), enc_path, 0,
      +                                 r->proxyreq);
      +        search = r->args;
      +    }
      +    if (path == NULL)
      +        return HTTP_BAD_REQUEST;
      +
      +    apr_snprintf(sport, sizeof(sport), ":%d", port);
      +
      +    if (ap_strchr_c(host, ':')) {
      +        /* if literal IPv6 address */
      +        host = apr_pstrcat(r->pool, "[", host, "]", NULL);
      +    }
      +    r->filename = apr_pstrcat(r->pool, "proxy:", scheme, "//", host, sport,
      +                              "/", path, (search) ? "?" : "",
      +                              (search) ? search : "", NULL);
      +    return OK;
      +}
      +
      +/*
      + * process the request and write the response.
      + */
      +static int proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
      +                                proxy_conn_rec *conn,
      +                                proxy_worker *worker,
      +                                proxy_server_conf *conf,
      +                                apr_uri_t *uri,
      +                                char *url, char *server_portstr)
      +{
      +    apr_status_t rv;
      +    apr_pollset_t *pollset;
      +    apr_pollfd_t pollfd;
      +    const apr_pollfd_t *signalled;
      +    apr_int32_t pollcnt, pi;
      +    apr_int16_t pollevent;
      +    conn_rec *c = r->connection;
      +    apr_socket_t *sock = conn->sock;
      +    conn_rec *backconn = conn->connection;
      +    char *buf;
      +    apr_bucket_brigade *header_brigade;
      +    apr_bucket *e;
      +    char *old_cl_val = NULL;
      +    char *old_te_val = NULL;
      +    apr_bucket_brigade *bb = apr_brigade_create(p, c->bucket_alloc);
      +    apr_socket_t *client_socket = ap_get_conn_socket(c);
      +    int done = 0, replied = 0;
      +
      +    header_brigade = apr_brigade_create(p, backconn->bucket_alloc);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "sending request");
      +
      +    rv = ap_proxy_create_hdrbrgd(p, header_brigade, r, conn,
      +                                 worker, conf, uri, url, server_portstr,
      +                                 &old_cl_val, &old_te_val);
      +    if (rv != OK) {
      +        return rv;
      +    }
      +
      +    buf = apr_pstrdup(p, "Upgrade: WebSocket" CRLF "Connection: Upgrade" CRLF CRLF);
      +    ap_xlate_proto_to_ascii(buf, strlen(buf));
      +    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      +
      +    if ((rv = ap_proxy_pass_brigade(backconn->bucket_alloc, r, conn, backconn,
      +                                    header_brigade, 1)) != OK)
      +        return rv;
      +
      +    apr_brigade_cleanup(header_brigade);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, "setting up poll()");
      +
      +    if ((rv = apr_pollset_create(&pollset, 2, p, 0)) != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02443)
      +                      "error apr_pollset_create()");
      +        return HTTP_INTERNAL_SERVER_ERROR;
      +    }
      +
      +#if 0
      +    apr_socket_opt_set(sock, APR_SO_NONBLOCK, 1);
      +    apr_socket_opt_set(sock, APR_SO_KEEPALIVE, 1);
      +    apr_socket_opt_set(client_socket, APR_SO_NONBLOCK, 1);
      +    apr_socket_opt_set(client_socket, APR_SO_KEEPALIVE, 1);
      +#endif
      +
      +    pollfd.p = p;
      +    pollfd.desc_type = APR_POLL_SOCKET;
      +    pollfd.reqevents = APR_POLLIN | APR_POLLHUP;
      +    pollfd.desc.s = sock;
      +    pollfd.client_data = NULL;
      +    apr_pollset_add(pollset, &pollfd);
      +
      +    pollfd.desc.s = client_socket;
      +    apr_pollset_add(pollset, &pollfd);
      +
      +    ap_remove_input_filter_byhandle(c->input_filters, "reqtimeout");
      +
      +    r->output_filters = c->output_filters;
      +    r->proto_output_filters = c->output_filters;
      +    r->input_filters = c->input_filters;
      +    r->proto_input_filters = c->input_filters;
      +
      +    /* This handler should take care of the entire connection; make it so that
      +     * nothing else is attempted on the connection after returning. */
      +    c->keepalive = AP_CONN_CLOSE;
      +
      +    do { /* Loop until done (one side closes the connection, or an error) */
      +        rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled);
      +        if (rv != APR_SUCCESS) {
      +            if (APR_STATUS_IS_EINTR(rv)) {
      +                continue;
      +            }
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02444) "error apr_poll()");
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02445)
      +                      "woke from poll(), i=%d", pollcnt);
      +
      +        for (pi = 0; pi < pollcnt; pi++) {
      +            const apr_pollfd_t *cur = &signalled[pi];
      +
      +            if (cur->desc.s == sock) {
      +                pollevent = cur->rtnevents;
      +                if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02446)
      +                                  "sock was readable");
      +                    done |= ap_proxy_transfer_between_connections(r, backconn,
      +                                                                  c,
      +                                                                  header_brigade,
      +                                                                  bb, "sock",
      +                                                                  NULL,
      +                                                                  AP_IOBUFSIZE,
      +                                                                  0)
      +                                                                 != APR_SUCCESS;
      +                }
      +                else if (pollevent & APR_POLLERR) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02447)
      +                            "error on backconn");
      +                    backconn->aborted = 1;
      +                    done = 1;
      +                }
      +                else { 
      +                    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02605)
      +                            "unknown event on backconn %d", pollevent);
      +                    done = 1;
      +                }
      +            }
      +            else if (cur->desc.s == client_socket) {
      +                pollevent = cur->rtnevents;
      +                if (pollevent & (APR_POLLIN | APR_POLLHUP)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02448)
      +                                  "client was readable");
      +                    done |= ap_proxy_transfer_between_connections(r, c,
      +                                                                  backconn, bb,
      +                                                                  header_brigade,
      +                                                                  "client",
      +                                                                  &replied,
      +                                                                  AP_IOBUFSIZE,
      +                                                                  0)
      +                                                                 != APR_SUCCESS;
      +                }
      +                else if (pollevent & APR_POLLERR) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, APLOGNO(02607)
      +                            "error on client conn");
      +                    c->aborted = 1;
      +                    done = 1;
      +                }
      +                else { 
      +                    ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, APLOGNO(02606)
      +                            "unknown event on client conn %d", pollevent);
      +                    done = 1;
      +                }
      +            }
      +            else {
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02449)
      +                              "unknown socket in pollset");
      +                done = 1;
      +            }
      +
      +        }
      +    } while (!done);
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                  "finished with poll() - cleaning up");
      +
      +    if (!replied) {
      +        return HTTP_BAD_GATEWAY;
      +    }
      +    else {
      +        return OK;
      +    }
      +
      +    return OK;
      +}
      +
      +/*
      + */
      +static int proxy_wstunnel_handler(request_rec *r, proxy_worker *worker,
      +                             proxy_server_conf *conf,
      +                             char *url, const char *proxyname,
      +                             apr_port_t proxyport)
      +{
      +    int status;
      +    char server_portstr[32];
      +    proxy_conn_rec *backend = NULL;
      +    const char *upgrade;
      +    char *scheme;
      +    int retry;
      +    conn_rec *c = r->connection;
      +    apr_pool_t *p = r->pool;
      +    apr_uri_t *uri;
      +    int is_ssl = 0;
      +
      +    if (strncasecmp(url, "wss:", 4) == 0) {
      +        scheme = "WSS";
      +        is_ssl = 1;
      +    }
      +    else if (strncasecmp(url, "ws:", 3) == 0) {
      +        scheme = "WS";
      +    }
      +    else {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02450) "declining URL %s", url);
      +        return DECLINED;
      +    }
      +
      +    upgrade = apr_table_get(r->headers_in, "Upgrade");
      +    if (!upgrade || strcasecmp(upgrade, "WebSocket") != 0) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02900)
      +                      "declining URL %s  (not WebSocket)", url);
      +        return DECLINED;
      +    }
      +
      +    uri = apr_palloc(p, sizeof(*uri));
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02451) "serving URL %s", url);
      +
      +    /* create space for state information */
      +    status = ap_proxy_acquire_connection(scheme, &backend, worker,
      +                                         r->server);
      +    if (status != OK) {
      +        if (backend) {
      +            backend->close = 1;
      +            ap_proxy_release_connection(scheme, backend, r->server);
      +        }
      +        return status;
      +    }
      +
      +    backend->is_ssl = is_ssl;
      +    backend->close = 0;
      +
      +    retry = 0;
      +    while (retry < 2) {
      +        char *locurl = url;
      +        /* Step One: Determine Who To Connect To */
      +        status = ap_proxy_determine_connection(p, r, conf, worker, backend,
      +                                               uri, &locurl, proxyname, proxyport,
      +                                               server_portstr,
      +                                               sizeof(server_portstr));
      +
      +        if (status != OK)
      +            break;
      +
      +        /* Step Two: Make the Connection */
      +        if (ap_proxy_connect_backend(scheme, backend, worker, r->server)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02452)
      +                          "failed to make connection to backend: %s",
      +                          backend->hostname);
      +            status = HTTP_SERVICE_UNAVAILABLE;
      +            break;
      +        }
      +        /* Step Three: Create conn_rec */
      +        if (!backend->connection) {
      +            if ((status = ap_proxy_connection_create(scheme, backend,
      +                                                     c, r->server)) != OK)
      +                break;
      +        }
      +
      +        backend->close = 1; /* must be after ap_proxy_determine_connection */
      +
      +
      +        /* Step Three: Process the Request */
      +        status = proxy_wstunnel_request(p, r, backend, worker, conf, uri, locurl,
      +                                      server_portstr);
      +        break;
      +    }
      +
      +    /* Do not close the socket */
      +    ap_proxy_release_connection(scheme, backend, r->server);
      +    return status;
      +}
      +
      +static void ap_proxy_http_register_hook(apr_pool_t *p)
      +{
      +    proxy_hook_scheme_handler(proxy_wstunnel_handler, NULL, NULL, APR_HOOK_FIRST);
      +    proxy_hook_canon_handler(proxy_wstunnel_canon, NULL, NULL, APR_HOOK_FIRST);
      +}
      +
      +AP_DECLARE_MODULE(proxy_wstunnel) = {
      +    STANDARD20_MODULE_STUFF,
      +    NULL,                       /* create per-directory config structure */
      +    NULL,                       /* merge per-directory config structures */
      +    NULL,                       /* create per-server config structure */
      +    NULL,                       /* merge per-server config structures */
      +    NULL,                       /* command apr_table_t */
      +    ap_proxy_http_register_hook /* register hooks */
      +};
      diff --git a/modules/proxy/mod_proxy_wstunnel.dep b/modules/proxy/mod_proxy_wstunnel.dep
      new file mode 100644
      index 00000000000..5692e63579d
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_wstunnel.dep
      @@ -0,0 +1,73 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_proxy_wstunnel.mak
      +
      +.\mod_proxy_wstunnel.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_reslist.h"\
      +	"..\..\srclib\apr-util\include\apr_strmatch.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_proxy.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/proxy/mod_serf.dsp b/modules/proxy/mod_proxy_wstunnel.dsp
      similarity index 58%
      rename from modules/proxy/mod_serf.dsp
      rename to modules/proxy/mod_proxy_wstunnel.dsp
      index 4301c70d94c..60fd0624e23 100644
      --- a/modules/proxy/mod_serf.dsp
      +++ b/modules/proxy/mod_proxy_wstunnel.dsp
      @@ -1,24 +1,24 @@
      -# Microsoft Developer Studio Project File - Name="mod_serf" - Package Owner=<4>
      +# Microsoft Developer Studio Project File - Name="mod_proxy_wstunnel" - Package Owner=<4>
       # Microsoft Developer Studio Generated Build File, Format Version 6.00
       # ** DO NOT EDIT **
       
       # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
       
      -CFG=mod_serf - Win32 Release
      +CFG=mod_proxy_wstunnel - Win32 Release
       !MESSAGE This is not a valid makefile. To build this project using NMAKE,
       !MESSAGE use the Export Makefile command and run
       !MESSAGE 
      -!MESSAGE NMAKE /f "mod_serf.mak".
      +!MESSAGE NMAKE /f "mod_proxy_wstunnel.mak".
       !MESSAGE 
       !MESSAGE You can specify a configuration when running NMAKE
       !MESSAGE by defining the macro CFG on the command line. For example:
       !MESSAGE 
      -!MESSAGE NMAKE /f "mod_serf.mak" CFG="mod_serf - Win32 Release"
      +!MESSAGE NMAKE /f "mod_proxy_wstunnel.mak" CFG="mod_proxy_wstunnel - Win32 Release"
       !MESSAGE 
       !MESSAGE Possible choices for configuration are:
       !MESSAGE 
      -!MESSAGE "mod_serf - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      -!MESSAGE "mod_serf - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_wstunnel - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_wstunnel - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
       !MESSAGE 
       
       # Begin Project
      @@ -29,7 +29,7 @@ CPP=cl.exe
       MTL=midl.exe
       RSC=rc.exe
       
      -!IF  "$(CFG)" == "mod_serf - Win32 Release"
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
       
       # PROP BASE Use_MFC 0
       # PROP BASE Use_Debug_Libraries 0
      @@ -43,25 +43,25 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/serf" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_serf_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Release\mod_proxy_wstunnel_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x809 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_serf.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_serf.so" /d LONG_NAME="serf_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /out:".\Release\mod_serf.so" /base:@..\..\os\win32\BaseAddr.ref,mod_serf.so
      -# ADD LINK32 libserf.lib kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_serf.so" /libpath:..\..\srclib\serf\Release /base:@..\..\os\win32\BaseAddr.ref,mod_serf.so /opt:ref
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /out:".\Release\mod_proxy_wstunnel.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so
      +# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Release\mod_proxy_wstunnel.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so /opt:ref
       # Begin Special Build Tool
      -TargetPath=.\Release\mod_serf.so
      +TargetPath=.\Release\mod_proxy_wstunnel.so
       SOURCE="$(InputPath)"
       PostBuild_Desc=Embed .manifest
       PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
       # End Special Build Tool
       
      -!ELSEIF  "$(CFG)" == "mod_serf - Win32 Debug"
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
       
       # PROP BASE Use_MFC 0
       # PROP BASE Use_Debug_Libraries 1
      @@ -75,19 +75,19 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/serf" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_serf_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fd"Debug\mod_proxy_wstunnel_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x809 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_serf.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_serf.so" /d LONG_NAME="serf_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_serf.so" /base:@..\..\os\win32\BaseAddr.ref,mod_serf.so
      -# ADD LINK32 libserf.lib kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_serf.so" /libpath:..\..\srclib\serf\Debug /base:@..\..\os\win32\BaseAddr.ref,mod_serf.so
      +# ADD BASE LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_proxy_wstunnel.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so
      +# ADD LINK32 kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /debug /out:".\Debug\mod_proxy_wstunnel.so" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so
       # Begin Special Build Tool
      -TargetPath=.\Debug\mod_serf.so
      +TargetPath=.\Debug\mod_proxy_wstunnel.so
       SOURCE="$(InputPath)"
       PostBuild_Desc=Embed .manifest
       PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).manifest -outputresource:$(TargetPath);2
      @@ -97,14 +97,14 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       
       # Begin Target
       
      -# Name "mod_serf - Win32 Release"
      -# Name "mod_serf - Win32 Debug"
      +# Name "mod_proxy_wstunnel - Win32 Release"
      +# Name "mod_proxy_wstunnel - Win32 Debug"
       # Begin Group "Source Files"
       
       # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
       # Begin Source File
       
      -SOURCE=.\mod_serf.c
      +SOURCE=.\mod_proxy_wstunnel.c
       # End Source File
       # End Group
       # Begin Group "Header Files"
      diff --git a/modules/proxy/mod_proxy_wstunnel.mak b/modules/proxy/mod_proxy_wstunnel.mak
      new file mode 100644
      index 00000000000..530715feff5
      --- /dev/null
      +++ b/modules/proxy/mod_proxy_wstunnel.mak
      @@ -0,0 +1,380 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_proxy_wstunnel.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_proxy_wstunnel - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_proxy_wstunnel - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_proxy_wstunnel - Win32 Release" && "$(CFG)" != "mod_proxy_wstunnel - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_proxy_wstunnel.mak" CFG="mod_proxy_wstunnel - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_proxy_wstunnel - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_proxy_wstunnel - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_wstunnel.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_proxy_wstunnel.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_proxy - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel.obj"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel.res"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_wstunnel_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_wstunnel.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_wstunnel.pdb" /debug /out:"$(OUTDIR)\mod_proxy_wstunnel.so" /implib:"$(OUTDIR)\mod_proxy_wstunnel.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_wstunnel.obj" \
      +	"$(INTDIR)\mod_proxy_wstunnel.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_wstunnel.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_proxy_wstunnel.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_wstunnel.so"
      +   if exist .\Release\mod_proxy_wstunnel.so.manifest mt.exe -manifest .\Release\mod_proxy_wstunnel.so.manifest -outputresource:.\Release\mod_proxy_wstunnel.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_proxy_wstunnel.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_proxy - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_proxy_wstunnel.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_proxy - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel.obj"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel.res"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel_src.idb"
      +	-@erase "$(INTDIR)\mod_proxy_wstunnel_src.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.exp"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.lib"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.pdb"
      +	-@erase "$(OUTDIR)\mod_proxy_wstunnel.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_proxy_wstunnel_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_proxy_wstunnel.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_proxy_wstunnel.pdb" /debug /out:"$(OUTDIR)\mod_proxy_wstunnel.so" /implib:"$(OUTDIR)\mod_proxy_wstunnel.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_proxy_wstunnel.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_proxy_wstunnel.obj" \
      +	"$(INTDIR)\mod_proxy_wstunnel.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_proxy.lib"
      +
      +"$(OUTDIR)\mod_proxy_wstunnel.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_proxy_wstunnel.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_proxy_wstunnel.so"
      +   if exist .\Debug\mod_proxy_wstunnel.so.manifest mt.exe -manifest .\Debug\mod_proxy_wstunnel.so.manifest -outputresource:.\Debug\mod_proxy_wstunnel.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_proxy_wstunnel.dep")
      +!INCLUDE "mod_proxy_wstunnel.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_proxy_wstunnel.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_proxy_wstunnel - Win32 Release" || "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +SOURCE=.\mod_proxy_wstunnel.c
      +
      +"$(INTDIR)\mod_proxy_wstunnel.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\proxy"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\proxy"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\proxy"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +"mod_proxy - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" 
      +   cd "."
      +
      +"mod_proxy - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +"mod_proxy - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" 
      +   cd "."
      +
      +"mod_proxy - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_proxy.mak" CFG="mod_proxy - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_proxy_wstunnel.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_proxy_wstunnel - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_proxy_wstunnel.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_proxy_wstunnel.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_proxy_wstunnel.so" /d LONG_NAME="proxy_wstunnel_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/proxy/mod_serf.c b/modules/proxy/mod_serf.c
      deleted file mode 100644
      index 3f899e28874..00000000000
      --- a/modules/proxy/mod_serf.c
      +++ /dev/null
      @@ -1,1126 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "mod_serf.h"
      -
      -#include "httpd.h"
      -#include "http_core.h"
      -#include "http_config.h"
      -#include "http_protocol.h"
      -#include "http_request.h"
      -#include "http_log.h"
      -
      -#include "serf.h"
      -#include "apr_uri.h"
      -#include "apr_strings.h"
      -#include "apr_version.h"
      -#include "ap_mpm.h"
      -
      -module AP_MODULE_DECLARE_DATA serf_module;
      -static int mpm_supprts_serf = 0;
      -
      -typedef struct {
      -    int on;
      -    int preservehost;
      -    apr_uri_t url;
      -} serf_config_t;
      -
      -typedef struct {
      -  const char *name;
      -  const char *provider;
      -  apr_table_t *params;
      -} serf_cluster_t;
      -
      -typedef struct {
      -  /* name -> serf_cluster_t* */
      -  apr_hash_t *clusters;
      -} serf_server_config_t;
      -
      -typedef struct {
      -    int rstatus;
      -    int want_ssl;
      -    int done_headers;
      -    int keep_reading;
      -    request_rec *r;
      -    apr_pool_t *serf_pool;
      -    apr_bucket_brigade *tmpbb;
      -    serf_config_t *conf;
      -    serf_ssl_context_t *ssl_ctx;
      -    serf_bucket_alloc_t *bkt_alloc;
      -    serf_bucket_t *body_bkt;
      -} s_baton_t;
      -
      -#if !APR_VERSION_AT_LEAST(1,4,0)
      -#define apr_time_from_msec(x) (x * 1000)
      -#endif
      -
      -/**
      - * This works right now because all timers are invoked in the single listener
      - * thread in the Event MPM -- the same thread that serf callbacks are made
      - * from, so we don't technically need a mutex yet, but with the Simple MPM,
      - * invocations are made from worker threads, and we need to figure out locking
      - */
      -static void timed_cleanup_callback(void *baton)
      -{
      -    s_baton_t *ctx = baton;
      -
      -    /* Causes all serf connections to unregister from the event mpm */
      -    if (ctx->rstatus) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, ctx->rstatus, ctx->r,
      -                      "serf: request returned: %d", ctx->rstatus);
      -        ctx->r->status = HTTP_OK;
      -        apr_pool_destroy(ctx->serf_pool);
      -        ap_die(ctx->rstatus, ctx->r);
      -    }
      -    else {
      -        apr_bucket *e;
      -        apr_brigade_cleanup(ctx->tmpbb);
      -        e = apr_bucket_flush_create(ctx->r->connection->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, e);
      -        e = apr_bucket_eos_create(ctx->r->connection->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(ctx->tmpbb, e);
      -
      -        /* TODO: return code? bleh */
      -        ap_pass_brigade(ctx->r->output_filters, ctx->tmpbb);
      -
      -        apr_pool_destroy(ctx->serf_pool);
      -
      -        ap_finalize_request_protocol(ctx->r);
      -        ap_process_request_after_handler(ctx->r);
      -        return;
      -    }
      -}
      -
      -static void closed_connection(serf_connection_t *conn,
      -                              void *closed_baton,
      -                              apr_status_t why,
      -                              apr_pool_t *pool)
      -{
      -    s_baton_t *ctx = closed_baton;
      -
      -    if (why) {
      -        /* justin says that error handling isn't done yet. hah. */
      -        /* XXXXXX: review */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, why, ctx->r, "Closed Connection Error");
      -        ctx->rstatus = HTTP_INTERNAL_SERVER_ERROR;
      -    }
      -
      -    if (mpm_supprts_serf) {
      -        ap_mpm_register_timed_callback(apr_time_from_msec(1),
      -                                       timed_cleanup_callback, ctx);
      -    }
      -    ctx->keep_reading = 0;
      -}
      -
      -static serf_bucket_t* conn_setup(apr_socket_t *sock,
      -                                 void *setup_baton,
      -                                 apr_pool_t *pool)
      -{
      -    serf_bucket_t *c;
      -    s_baton_t *ctx = setup_baton;
      -
      -    c = serf_bucket_socket_create(sock, ctx->bkt_alloc);
      -    if (ctx->want_ssl) {
      -        c = serf_bucket_ssl_decrypt_create(c, ctx->ssl_ctx, ctx->bkt_alloc);
      -    }
      -
      -    return c;
      -}
      -
      -static int copy_headers_in(void *vbaton, const char *key, const char *value)
      -{
      -    serf_bucket_t *hdrs_bkt = (serf_bucket_t *)vbaton;
      -
      -    /* XXXXX: List of headers not to copy to serf. serf's serf_bucket_headers_setn,
      -     * doesn't actually overwrite a header if we set it once, so we need to ignore anything
      -     * we might want to toggle or combine.
      -     */
      -    switch (key[0]) {
      -    case 'a':
      -    case 'A':
      -        if (strcasecmp("Accept-Encoding", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    case 'c':
      -    case 'C':
      -        if (strcasecmp("Connection", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    case 'h':
      -    case 'H':
      -        if (strcasecmp("Host", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    case 'k':
      -    case 'K':
      -        if (strcasecmp("Keep-Alive", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    case 't':
      -    case 'T':
      -        if (strcasecmp("TE", key) == 0) {
      -            return 0;
      -        }
      -        if (strcasecmp("Trailer", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    case 'u':
      -    case 'U':
      -        if (strcasecmp("Upgrade", key) == 0) {
      -            return 0;
      -        }
      -        break;
      -    default:
      -        break;
      -    }
      -
      -    serf_bucket_headers_setn(hdrs_bkt, key, value);
      -    return 0;
      -}
      -
      -static int copy_headers_out(void *vbaton, const char *key, const char *value)
      -{
      -    s_baton_t *ctx = vbaton;
      -    int done = 0;
      -
      -    /* XXXXX: Special Treatment required for MANY other headers. fixme.*/
      -    switch (key[0]) {
      -    case 'c':
      -    case 'C':
      -        if (strcasecmp("Content-Type", key) == 0) {
      -            ap_set_content_type(ctx->r, value);
      -            done = 1;
      -            break;
      -        }
      -        else if (strcasecmp("Connection", key) == 0) {
      -            done = 1;
      -            break;
      -        }
      -        else if (strcasecmp("Content-Encoding", key) == 0) {
      -            done = 1;
      -            break;
      -        }
      -        else if (strcasecmp("Content-Length", key) == 0) {
      -            done = 1;
      -            break;
      -        }
      -        break;
      -    case 't':
      -    case 'T':
      -        if (strcasecmp("Transfer-Encoding", key) == 0) {
      -            done = 1;
      -            break;
      -        }
      -        break;
      -    default:
      -            break;
      -    }
      -
      -    if (!done) {
      -        apr_table_addn(ctx->r->headers_out, key, value);
      -    }
      -
      -    return 0;
      -}
      -
      -static serf_bucket_t* accept_response(serf_request_t *request,
      -                                      serf_bucket_t *stream,
      -                                      void *acceptor_baton,
      -                                      apr_pool_t *pool)
      -{
      -    serf_bucket_t *c;
      -    serf_bucket_alloc_t *bkt_alloc;
      -
      -    /* get the per-request bucket allocator */
      -    bkt_alloc = serf_request_get_alloc(request);
      -
      -    /* Create a barrier so the response doesn't eat us! */
      -    c = serf_bucket_barrier_create(stream, bkt_alloc);
      -
      -    return serf_bucket_response_create(c, bkt_alloc);
      -}
      -
      -static apr_status_t handle_response(serf_request_t *request,
      -                                    serf_bucket_t *response,
      -                                    void *vbaton,
      -                                    apr_pool_t *pool)
      -{
      -    apr_status_t rv;
      -    s_baton_t *ctx = vbaton;
      -    const char *data;
      -    apr_size_t len;
      -    serf_status_line sl;
      -
      -    if (response == NULL) {
      -        ctx->rstatus = HTTP_INTERNAL_SERVER_ERROR;
      -        return APR_EGENERAL;
      -    }
      -
      -    /* XXXXXXX: Create better error message. */
      -    rv = serf_bucket_response_status(response, &sl);
      -    if (rv) {
      -        if (APR_STATUS_IS_EAGAIN(rv)) {
      -            return APR_SUCCESS;
      -        }
      -
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, ctx->r, "serf_bucket_response_status...");
      -
      -        ctx->rstatus = HTTP_INTERNAL_SERVER_ERROR;
      -
      -        if (mpm_supprts_serf) {
      -            ap_mpm_register_timed_callback(apr_time_from_msec(1),
      -                                           timed_cleanup_callback, ctx);
      -        }
      -
      -        return rv;
      -    }
      -
      -    /**
      -     * XXXXX: If I understood serf buckets better, it might be possible to not
      -     * copy all of the data here, and better stream it to the client.
      -     **/
      -
      -    do {
      -        apr_brigade_cleanup(ctx->tmpbb);
      -        rv = serf_bucket_read(response, AP_IOBUFSIZE, &data, &len);
      -
      -        if (SERF_BUCKET_READ_ERROR(rv)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, ctx->r, "serf_bucket_read(response)");
      -            return rv;
      -        }
      -
      -        if (!ctx->done_headers) {
      -            serf_bucket_t *hdrs;
      -            serf_status_line line;
      -
      -            /* TODO: improve */
      -            serf_bucket_response_status(response, &line);
      -            ctx->r->status = line.code;
      -
      -            hdrs = serf_bucket_response_get_headers(response);
      -            serf_bucket_headers_do(hdrs, copy_headers_out, ctx);
      -            ctx->done_headers = 1;
      -        }
      -
      -
      -        if (len > 0) {
      -            /* TODO: make APR bucket <-> serf bucket stuff more magical. */
      -            apr_brigade_write(ctx->tmpbb, NULL, NULL, data, len);
      -        }
      -
      -        if (APR_STATUS_IS_EOF(rv)) {
      -            ctx->keep_reading = 0;
      -
      -            ctx->rstatus = ap_pass_brigade(ctx->r->output_filters, ctx->tmpbb);
      -
      -            if (mpm_supprts_serf) {
      -                ap_mpm_register_timed_callback(apr_time_from_msec(1),
      -                                               timed_cleanup_callback, ctx);
      -            }
      -            return APR_EOF;
      -        }
      -
      -        ctx->rstatus = ap_pass_brigade(ctx->r->output_filters, ctx->tmpbb);
      -
      -        /* XXXX: Should we send a flush now? */
      -        if (APR_STATUS_IS_EAGAIN(rv)) {
      -            return APR_SUCCESS;
      -        }
      -
      -    } while (1);
      -}
      -
      -
      -static apr_status_t setup_request(serf_request_t *request,
      -                                  void *vbaton,
      -                                  serf_bucket_t **req_bkt,
      -                                  serf_response_acceptor_t *acceptor,
      -                                  void **acceptor_baton,
      -                                  serf_response_handler_t *handler,
      -                                  void **handler_baton,
      -                                  apr_pool_t *pool)
      -{
      -    s_baton_t *ctx = vbaton;
      -    serf_bucket_t *hdrs_bkt;
      -
      -    *req_bkt = serf_bucket_request_create(ctx->r->method, ctx->r->unparsed_uri,
      -                                          ctx->body_bkt,
      -                                          serf_request_get_alloc(request));
      -
      -    hdrs_bkt = serf_bucket_request_get_headers(*req_bkt);
      -
      -    apr_table_do(copy_headers_in, hdrs_bkt, ctx->r->headers_in, NULL);
      -
      -    if (ctx->conf->preservehost) {
      -        serf_bucket_headers_setn(hdrs_bkt, "Host",
      -                                 apr_table_get(ctx->r->headers_in, "Host"));
      -    }
      -    else {
      -        serf_bucket_headers_setn(hdrs_bkt, "Host", ctx->conf->url.hostname);
      -    }
      -
      -    serf_bucket_headers_setn(hdrs_bkt, "Accept-Encoding", "gzip");
      -
      -    if (ctx->want_ssl) {
      -        if (ctx->ssl_ctx == NULL) {
      -            *req_bkt = serf_bucket_ssl_encrypt_create(*req_bkt, NULL,
      -                                           ctx->bkt_alloc);
      -            ctx->ssl_ctx = serf_bucket_ssl_encrypt_context_get(*req_bkt);
      -        }
      -        else {
      -            *req_bkt = serf_bucket_ssl_encrypt_create(*req_bkt, ctx->ssl_ctx,
      -                                                      ctx->bkt_alloc);
      -        }
      -    }
      -
      -    *acceptor = accept_response;
      -    *acceptor_baton = ctx;
      -    *handler = handle_response;
      -    *handler_baton = ctx;
      -
      -    return APR_SUCCESS;
      -}
      -
      -/* TOOD: rewrite drive_serf to make it async */
      -static int drive_serf(request_rec *r, serf_config_t *conf)
      -{
      -    apr_status_t rv = 0;
      -    apr_pool_t *pool;
      -    apr_sockaddr_t *address;
      -    s_baton_t *baton = apr_palloc(r->pool, sizeof(s_baton_t));
      -    /* XXXXX: make persistent/per-process or something.*/
      -    serf_context_t *serfme;
      -    serf_connection_t *conn;
      -    serf_server_config_t *ctx =
      -        (serf_server_config_t *)ap_get_module_config(r->server->module_config,
      -                                                     &serf_module);
      -
      -    /* Allocate everything out of a subpool, with a shorter lifetime than
      -     * the main request, so that we can cleanup safely and remove our events
      -     * from the main serf context in the async mpm mode.
      -     */
      -    apr_pool_create(&pool, r->pool);
      -    if (strcmp(conf->url.scheme, "cluster") == 0) {
      -        int rc;
      -        ap_serf_cluster_provider_t *cp;
      -        serf_cluster_t *cluster;
      -        apr_array_header_t *servers = NULL;
      -        apr_uint32_t pick = 0;
      -        ap_serf_server_t *choice;
      -
      -        /* TODO: could this be optimized in post-config to pre-setup the
      -         * pointers to the right cluster inside the conf structure?
      -         */
      -        cluster = apr_hash_get(ctx->clusters,
      -                               conf->url.hostname,
      -                               APR_HASH_KEY_STRING);
      -        if (!cluster) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "SerfCluster: unable to find cluster %s", conf->url.hostname);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        cp = ap_lookup_provider(AP_SERF_CLUSTER_PROVIDER, cluster->provider, "0");
      -
      -        if (cp == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "SerfCluster: unable to find provider %s", cluster->provider);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        if (cp->list_servers == NULL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                          "SerfCluster: %s is missing list servers provider.", cluster->provider);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        rc = cp->list_servers(cp->baton,
      -                              r,
      -                              cluster->params,
      -                              &servers);
      -
      -        if (rc != OK) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                          "SerfCluster: %s list servers returned failure", cluster->provider);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        if (servers == NULL || apr_is_empty_array(servers)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r,
      -                          "SerfCluster: %s failed to provide a list of servers", cluster->provider);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        /* TOOD: restructure try all servers in the array !! */
      -        pick = ap_random_pick(0, servers->nelts-1);
      -        choice = APR_ARRAY_IDX(servers, pick, ap_serf_server_t *);
      -
      -        rv = apr_sockaddr_info_get(&address, choice->ip,
      -                                   APR_UNSPEC, choice->port, 0,
      -                                   pool);
      -    }
      -    else {
      -        /* XXXXX: cache dns? */
      -        rv = apr_sockaddr_info_get(&address, conf->url.hostname,
      -                                   APR_UNSPEC, conf->url.port, 0,
      -                                   pool);
      -    }
      -
      -    if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "Unable to resolve: %s", conf->url.hostname);
      -        return HTTP_INTERNAL_SERVER_ERROR;
      -    }
      -
      -    if (mpm_supprts_serf) {
      -        serfme = ap_lookup_provider("mpm_serf", "instance", "0");
      -        if (!serfme) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mpm lied to us about supporting serf.");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -    }
      -    else {
      -        serfme = serf_context_create(pool);
      -    }
      -
      -    baton->r = r;
      -    baton->conf = conf;
      -    baton->serf_pool = pool;
      -    baton->bkt_alloc = serf_bucket_allocator_create(pool, NULL, NULL);
      -    baton->body_bkt = NULL;
      -    baton->ssl_ctx = NULL;
      -    baton->rstatus = OK;
      -
      -    baton->tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      -    baton->done_headers = 0;
      -    baton->keep_reading = 1;
      -
      -    if (strcasecmp(conf->url.scheme, "https") == 0) {
      -        baton->want_ssl = 1;
      -    }
      -    else {
      -        baton->want_ssl = 0;
      -    }
      -
      -    rv = ap_setup_client_block(baton->r, REQUEST_CHUNKED_DECHUNK);
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    /* TODO: create custom serf bucket, which does async request body reads */
      -    if (ap_should_client_block(r)) {
      -        apr_size_t len;
      -        apr_off_t flen = 0;
      -        char buf[AP_IOBUFSIZE];
      -        apr_file_t *fp;
      -
      -        rv = apr_file_mktemp(&fp, "mod_serf_buffer.XXXXXX", 0, pool);
      -        if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_serf: Unable to create temp request body buffer file.");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        do {
      -            len = sizeof(buf);
      -            rv = ap_get_client_block(baton->r, buf, len);
      -            if (rv > 0) {
      -                rv = apr_file_write_full(fp, buf, rv, NULL);
      -                if (rv) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_serf: failed to read request body");
      -                    return HTTP_INTERNAL_SERVER_ERROR;
      -                }
      -            }
      -        } while(rv > 0);
      -
      -        if (rv < 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "mod_serf: failed to read request body");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
      -        apr_file_seek(fp, APR_SET, &flen);
      -        baton->body_bkt = serf_bucket_file_create(fp, baton->bkt_alloc);
      -    }
      -
      -    conn = serf_connection_create(serfme, address,
      -                                  conn_setup, baton,
      -                                  closed_connection, baton,
      -                                  pool);
      -
      -    /* XXX: Is it correct that we don't use the returned serf_request_t? */
      -    serf_connection_request_create(conn, setup_request, baton);
      -
      -    if (mpm_supprts_serf) {
      -        return SUSPENDED;
      -    }
      -    else {
      -        do {
      -            rv = serf_context_run(serfme, SERF_DURATION_FOREVER, pool);
      -
      -            /* XXXX: Handle timeouts */
      -            if (APR_STATUS_IS_TIMEUP(rv)) {
      -                continue;
      -            }
      -
      -            if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, "serf_context_run() for %pI", address);
      -                return HTTP_INTERNAL_SERVER_ERROR;
      -            }
      -
      -            serf_debug__closed_conn(baton->bkt_alloc);
      -        } while (baton->keep_reading);
      -
      -        return baton->rstatus;
      -    }
      -}
      -
      -static int serf_handler(request_rec *r)
      -{
      -    serf_config_t *conf = ap_get_module_config(r->per_dir_config,
      -                                               &serf_module);
      -
      -    if (conf->on == 0) {
      -        return DECLINED;
      -    }
      -
      -    return drive_serf(r, conf);
      -}
      -
      -static int is_true(const char *w)
      -{
      -    if (strcasecmp(w, "on") == 0 || strcmp(w, "1") == 0 ||
      -        strcasecmp(w, "true") == 0)
      -    {
      -        return 1;
      -    }
      -
      -    return 0;
      -}
      -static const char *add_pass(cmd_parms *cmd, void *vconf,
      -                            int argc, char *const argv[])
      -{
      -    int i;
      -    apr_status_t rv;
      -    serf_config_t *conf = (serf_config_t *) vconf;
      -
      -    if (argc < 1) {
      -        return "SerfPass must have at least a URI.";
      -    }
      -
      -    rv = apr_uri_parse(cmd->pool, argv[0], &conf->url);
      -
      -    if (rv != APR_SUCCESS) {
      -        return "mod_serf: Unable to parse SerfPass url.";
      -    }
      -
      -    if (!conf->url.scheme) {
      -        return "mod_serf: Need scheme part in url.";
      -    }
      -
      -    /* XXXX: These are bugs in apr_uri_parse. Fixme. */
      -    if (!conf->url.port) {
      -        conf->url.port = apr_uri_port_of_scheme(conf->url.scheme);
      -    }
      -
      -    if (!conf->url.path) {
      -        conf->url.path = "/";
      -    }
      -
      -    for (i = 1; i < argc; i++) {
      -        const char *p = argv[i];
      -        const char *x = ap_strchr_c(p, '=');
      -
      -        if (x) {
      -            if (strncmp(p, "preservehost", x-p) == 0) {
      -                conf->preservehost = is_true(x+1);
      -            }
      -        }
      -    }
      -
      -    conf->on = 1;
      -
      -    return NULL;
      -}
      -
      -/* SerfCluster <name> <provider> <key=value_params_to_provider> ... */
      -
      -static const char *add_cluster(cmd_parms *cmd, void *d,
      -                               int argc, char *const argv[])
      -{
      -    const char *rv;
      -    ap_serf_cluster_provider_t *backend;
      -    int i;
      -    serf_cluster_t *cluster = NULL;
      -    serf_server_config_t *ctx =
      -        (serf_server_config_t *)ap_get_module_config(cmd->server->module_config,
      -                                                     &serf_module);
      -
      -    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -
      -    if (err != NULL) {
      -        return err;
      -    }
      -
      -    if (argc < 2) {
      -        return "SerfCluster must have at least a name and provider.";
      -    }
      -
      -    cluster = apr_palloc(cmd->pool, sizeof(serf_cluster_t));
      -    cluster->name = apr_pstrdup(cmd->pool, argv[0]);
      -    cluster->provider = apr_pstrdup(cmd->pool, argv[1]);
      -    cluster->params = apr_table_make(cmd->pool, 6);
      -
      -    backend = ap_lookup_provider(AP_SERF_CLUSTER_PROVIDER, cluster->provider, "0");
      -
      -    if (backend == NULL) {
      -        return apr_psprintf(cmd->pool, "SerfCluster: unable to find "
      -                            "provider '%s'", cluster->provider);
      -    }
      -
      -    for (i = 2; i < argc; i++) {
      -        const char *p = argv[i];
      -        const char *x = ap_strchr_c(p, '=');
      -
      -        if (x && strlen(p) > 1) {
      -            apr_table_addn(cluster->params,
      -                           apr_pstrndup(cmd->pool, p, x-p),
      -                           x+1);
      -        }
      -        else {
      -            apr_table_addn(cluster->params,
      -                           apr_pstrdup(cmd->pool, p),
      -                           "");
      -        }
      -    }
      -
      -    if (backend->check_config == NULL) {
      -        return apr_psprintf(cmd->pool, "SerfCluster: Provider '%s' failed to "
      -                             "provider a configuration checker",
      -                            cluster->provider);
      -    }
      -
      -    rv = backend->check_config(backend->baton, cmd, cluster->params);
      -
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    apr_hash_set(ctx->clusters, cluster->name, APR_HASH_KEY_STRING, cluster);
      -
      -    return NULL;
      -}
      -
      -static void *create_dir_config(apr_pool_t *p, char *dummy)
      -{
      -    serf_config_t *new = (serf_config_t *) apr_pcalloc(p, sizeof(serf_config_t));
      -    new->on = 0;
      -    new->preservehost = 1;
      -    return new;
      -}
      -
      -static void *create_server_config(apr_pool_t *p, server_rec *s)
      -{
      -    serf_server_config_t *ctx =
      -        (serf_server_config_t *) apr_pcalloc(p, sizeof(serf_server_config_t));
      -
      -    ctx->clusters = apr_hash_make(p);
      -
      -    return ctx;
      -}
      -
      -static void * merge_server_config(apr_pool_t *p, void *basev, void *overridesv)
      -{
      -    serf_server_config_t *ctx = apr_pcalloc(p, sizeof(serf_server_config_t));
      -    serf_server_config_t *base = (serf_server_config_t *) basev;
      -    serf_server_config_t *overrides = (serf_server_config_t *) overridesv;
      -
      -    ctx->clusters = apr_hash_overlay(p, base->clusters, overrides->clusters);
      -    return ctx;
      -}
      -
      -static const command_rec serf_cmds[] =
      -{
      -    AP_INIT_TAKE_ARGV("SerfCluster", add_cluster, NULL, RSRC_CONF,
      -                      "Configure a cluster backend"),
      -    AP_INIT_TAKE_ARGV("SerfPass", add_pass, NULL, OR_INDEXES,
      -                      "URL to reverse proxy to"),
      -    {NULL}
      -};
      -
      -typedef struct hb_table_baton_t {
      -    apr_pool_t *p;
      -    const char *msg;
      -} hb_table_baton_t;
      -
      -static int hb_table_check(void *rec, const char *key, const char *value)
      -{
      -    hb_table_baton_t *b = (hb_table_baton_t*)rec;
      -    if (strcmp(key, "path") != 0) {
      -        b->msg = apr_psprintf(b->p,
      -                              "SerfCluster Heartbeat Invalid parameter '%s'",
      -                              key);
      -        return 1;
      -    }
      -
      -    return 0;
      -}
      -
      -static const char* hb_config_check(void *baton,
      -                                   cmd_parms *cmd,
      -                                   apr_table_t *params)
      -{
      -    hb_table_baton_t b;
      -
      -    if (apr_is_empty_table(params)) {
      -        return "SerfCluster Heartbeat requires a path to the heartbat information.";
      -    }
      -
      -    b.p = cmd->pool;
      -    b.msg = NULL;
      -
      -    apr_table_do(hb_table_check, &b, params, NULL);
      -
      -    if (b.msg) {
      -        return b.msg;
      -    }
      -
      -    return NULL;
      -}
      -
      -typedef struct hb_server_t {
      -    const char *ip;
      -    int busy;
      -    int ready;
      -    int seen;
      -    unsigned int port;
      -} hb_server_t;
      -
      -static void
      -argstr_to_table(apr_pool_t *p, char *str, apr_table_t *parms)
      -{
      -    char *key;
      -    char *value;
      -    char *strtok_state;
      -
      -    key = apr_strtok(str, "&", &strtok_state);
      -    while (key) {
      -        value = strchr(key, '=');
      -        if (value) {
      -            *value = '\0';      /* Split the string in two */
      -            value++;            /* Skip passed the = */
      -        }
      -        else {
      -            value = "1";
      -        }
      -        ap_unescape_url(key);
      -        ap_unescape_url(value);
      -        apr_table_set(parms, key, value);
      -        key = apr_strtok(NULL, "&", &strtok_state);
      -    }
      -}
      -
      -static apr_status_t read_heartbeats(const char *path,
      -                                    apr_array_header_t *servers,
      -                                    apr_pool_t *pool)
      -{
      -    apr_finfo_t fi;
      -    apr_status_t rv;
      -    apr_file_t *fp;
      -
      -    if (!path) {
      -        return APR_SUCCESS;
      -    }
      -
      -    rv = apr_file_open(&fp, path, APR_READ|APR_BINARY|APR_BUFFERED,
      -                       APR_OS_DEFAULT, pool);
      -
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    rv = apr_file_info_get(&fi, APR_FINFO_SIZE, fp);
      -
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    {
      -        char *t;
      -        int lineno = 0;
      -        apr_table_t *hbt = apr_table_make(pool, 10);
      -        char buf[4096];
      -
      -        while (apr_file_gets(buf, sizeof(buf), fp) == APR_SUCCESS) {
      -            hb_server_t *server;
      -            const char *ip;
      -            lineno++;
      -
      -            /* comment */
      -            if (buf[0] == '#') {
      -                continue;
      -            }
      -
      -
      -            /* line format: <IP> <query_string>\n */
      -            t = strchr(buf, ' ');
      -            if (!t) {
      -                continue;
      -            }
      -
      -            ip = apr_pstrndup(pool, buf, t - buf);
      -            t++;
      -            server = apr_pcalloc(pool, sizeof(hb_server_t));
      -            server->ip = ip;
      -            server->port = 80;
      -            server->seen = -1;
      -            apr_table_clear(hbt);
      -
      -            argstr_to_table(pool, apr_pstrdup(pool, t), hbt);
      -
      -            if (apr_table_get(hbt, "busy")) {
      -                server->busy = atoi(apr_table_get(hbt, "busy"));
      -            }
      -
      -            if (apr_table_get(hbt, "ready")) {
      -                server->ready = atoi(apr_table_get(hbt, "ready"));
      -            }
      -
      -            if (apr_table_get(hbt, "lastseen")) {
      -                server->seen = atoi(apr_table_get(hbt, "lastseen"));
      -            }
      -
      -            if (apr_table_get(hbt, "port")) {
      -                server->port = atoi(apr_table_get(hbt, "port"));
      -            }
      -
      -            if (server->busy == 0 && server->ready != 0) {
      -                /* Server has zero threads active, but lots of them ready,
      -                 * it likely just started up, so lets /4 the number ready,
      -                 * to prevent us from completely flooding it with all new
      -                 * requests.
      -                 */
      -                server->ready = server->ready / 4;
      -            }
      -
      -            APR_ARRAY_PUSH(servers, hb_server_t *) = server;
      -        }
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
      -static int hb_server_sort(const void *a_, const void *b_)
      -{
      -    hb_server_t *a = (hb_server_t*)a_;
      -    hb_server_t *b = (hb_server_t*)b_;
      -    if (a->ready == b->ready) {
      -        return 0;
      -    }
      -    else if (a->ready > b->ready) {
      -        return -1;
      -    }
      -    else {
      -        return 1;
      -    }
      -}
      -
      -static int hb_list_servers(void *baton,
      -                           request_rec *r,
      -                           apr_table_t *params,
      -                           apr_array_header_t **out_servers)
      -{
      -    int i;
      -    hb_server_t *hbs;
      -    apr_status_t rv;
      -    apr_pool_t *tpool;
      -    apr_array_header_t *tmpservers;
      -    apr_array_header_t *servers;
      -    const char *path = apr_table_get(params, "path");
      -
      -    apr_pool_create(&tpool, r->pool);
      -
      -    path = ap_server_root_relative(tpool, path);
      -
      -    tmpservers = apr_array_make(tpool, 32, sizeof(hb_server_t *));
      -    rv = read_heartbeats(path, tmpservers, tpool);
      -
      -    if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                      "SerfCluster: Heartbeat unable to read '%s'", path);
      -        apr_pool_destroy(tpool);
      -        return HTTP_INTERNAL_SERVER_ERROR;
      -    }
      -
      -    qsort(tmpservers->elts, tmpservers->nelts, sizeof(hb_server_t *),
      -          hb_server_sort);
      -
      -    servers = apr_array_make(r->pool, tmpservers->nelts, sizeof(ap_serf_server_t *));
      -    for (i = 0;
      -         i < tmpservers->nelts;
      -         i++)
      -    {
      -        ap_serf_server_t *x;
      -
      -        hbs = APR_ARRAY_IDX(tmpservers, i, hb_server_t *);
      -        if (hbs->ready > 0) {
      -            x = apr_palloc(r->pool, sizeof(ap_serf_server_t));
      -            x->ip = apr_pstrdup(r->pool, hbs->ip);
      -            x->port = hbs->port;
      -            APR_ARRAY_PUSH(servers, ap_serf_server_t *) = x;
      -        }
      -    }
      -
      -    *out_servers = servers;
      -    apr_pool_destroy(tpool);
      -    return OK;
      -}
      -
      -static const ap_serf_cluster_provider_t builtin_heartbeat =
      -{
      -    "heartbeat",
      -    NULL,
      -    &hb_config_check,
      -    &hb_list_servers,
      -    NULL,
      -    NULL
      -};
      -
      -static int static_table_check(void *rec, const char *key, const char *value)
      -{
      -    hb_table_baton_t *b = (hb_table_baton_t*)rec;
      -    if (strcmp(key, "hosts") != 0 &&
      -        strcmp(key, "order") != 0) {
      -        b->msg = apr_psprintf(b->p,
      -                              "SerfCluster Static Invalid parameter '%s'",
      -                              key);
      -        return 1;
      -    }
      -
      -    return 0;
      -}
      -
      -static const char* static_config_check(void *baton,
      -                                   cmd_parms *cmd,
      -                                   apr_table_t *params)
      -{
      -    hb_table_baton_t b;
      -
      -    if (apr_is_empty_table(params)) {
      -        return "SerfCluster Static requires at least a host list.";
      -    }
      -
      -    b.p = cmd->pool;
      -    b.msg = NULL;
      -
      -    apr_table_do(static_table_check, &b, params, NULL);
      -
      -    if (b.msg) {
      -        return b.msg;
      -    }
      -
      -    if (apr_table_get(params, "hosts") == NULL) {
      -        return "SerfCluster Static requires at least a hosts parameter";
      -    }
      -    return NULL;
      -}
      -
      -static int static_list_servers(void *baton,
      -                               request_rec *r,
      -                               apr_table_t *params,
      -                               apr_array_header_t **out_servers)
      -{
      -    apr_status_t rv;
      -    char *ip;
      -    char *strtok_state;
      -    apr_array_header_t *servers;
      -    const char *hosts = apr_table_get(params, "hosts");
      -    const char *order = apr_table_get(params, "order");
      -
      -    servers = apr_array_make(r->pool, 10, sizeof(ap_serf_server_t *));
      -
      -    ip = apr_strtok(apr_pstrdup(r->pool, hosts), ",", &strtok_state);
      -    while (ip) {
      -        char *host_str;
      -        char *scope_id;
      -        apr_port_t port = 0;
      -
      -        rv = apr_parse_addr_port(&host_str, &scope_id, &port, ip, r->pool);
      -        if (!rv) {
      -            ap_serf_server_t *s = apr_palloc(r->pool, sizeof(ap_serf_server_t));
      -            s->ip = host_str;
      -            s->port = port ? port : 80;
      -            APR_ARRAY_PUSH(servers, ap_serf_server_t *) = s;
      -        }
      -        ip = apr_strtok(NULL, ",", &strtok_state);
      -    }
      -
      -    if (strcmp(order, "random") == 0) {
      -        /* TODO: support order=random */
      -    }
      -
      -    *out_servers = servers;
      -
      -    return OK;
      -}
      -
      -static const ap_serf_cluster_provider_t builtin_static =
      -{
      -    "static",
      -    NULL,
      -    &static_config_check,
      -    &static_list_servers,
      -    NULL,
      -    NULL
      -};
      -
      -static int serf_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
      -{
      -    apr_status_t rv;
      -    rv = ap_mpm_query(AP_MPMQ_HAS_SERF, &mpm_supprts_serf);
      -
      -    if (rv != APR_SUCCESS) {
      -        mpm_supprts_serf = 0;
      -    }
      -
      -    return OK;
      -}
      -
      -static void register_hooks(apr_pool_t *p)
      -{
      -    ap_register_provider(p, AP_SERF_CLUSTER_PROVIDER,
      -                         "heartbeat", "0", &builtin_heartbeat);
      -
      -    ap_register_provider(p, AP_SERF_CLUSTER_PROVIDER,
      -                         "static", "0", &builtin_static);
      -
      -    ap_hook_post_config(serf_post_config, NULL, NULL, APR_HOOK_MIDDLE);
      -
      -    ap_hook_handler(serf_handler, NULL, NULL, APR_HOOK_FIRST);
      -}
      -
      -AP_DECLARE_MODULE(serf) =
      -{
      -    STANDARD20_MODULE_STUFF,
      -    create_dir_config,
      -    NULL,
      -    create_server_config,
      -    merge_server_config,
      -    serf_cmds,
      -    register_hooks
      -};
      diff --git a/modules/proxy/mod_serf.h b/modules/proxy/mod_serf.h
      deleted file mode 100644
      index 39fb541b301..00000000000
      --- a/modules/proxy/mod_serf.h
      +++ /dev/null
      @@ -1,109 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -
      -/**
      - * @file mod_serf.h
      - * @brief Serf Interfaces
      - *
      - */
      -
      -#include "httpd.h"
      -#include "http_config.h"
      -#if !defined(WIN32) && !defined(NETWARE)
      -#include "ap_config_auto.h"
      -#endif
      -#ifdef HAVE_SERF
      -#include "serf.h"
      -#endif
      -
      -#include "ap_provider.h"
      -
      -#ifndef _MOD_SERF_H_
      -#define _MOD_SERF_H_
      -/**
      - * @addtogroup Serf_cluster_provider
      - * @{
      - */
      -#define AP_SERF_CLUSTER_PROVIDER "serf_cluster"
      -typedef struct ap_serf_server_t ap_serf_server_t;
      -struct ap_serf_server_t {
      -    /* TOOD: consider using apr_sockaddr_t, except they suck. */
      -    const char *ip;
      -    apr_port_t port;
      -};
      -
      -typedef struct ap_serf_cluster_provider_t ap_serf_cluster_provider_t;
      -struct ap_serf_cluster_provider_t {
      -    /**
      -     * Human readable name of this provider, used in configuration.
      -     */
      -    const char *name;
      -    /**
      -     * Baton passed to all methods in this provider.
      -     *
      -     * This field may be NULL.
      -     */
      -    void *baton;
      -    /**
      -     * Check that the key/value pairs used to configure the
      -     * cluster are valid.
      -     *
      -     * Return non-NULL on failure with an error message, like standard httpd
      -     * configuration directives.
      -     *
      -     * This field must be set.
      -     */
      -    const char* (*check_config)(void *baton,
      -                                cmd_parms *cmd,
      -                                apr_table_t *params);
      -    /**
      -     * Provide an ordered array of ap_serf_server_t in the order that
      -     * mod_serf should attempt to use them.  If a server on the list
      -     * is known to be not responding, it may be skipped.  If mod_serf is
      -     * unable to contact any of the servers, a 502 will be returned to the
      -     * client.
      -     *
      -     * Returns OK on sucess, all other return codes will result in a 500.
      -     *
      -     * This field must be set.
      -     */
      -    int (*list_servers)(void *baton,
      -                        request_rec *r,
      -                        apr_table_t *params,
      -                        apr_array_header_t **servers);
      -    /**
      -     * If a request was successfully fulfilled by this address, feedback will
      -     * be given to the provider, so it may make better recommendations.
      -     *
      -     * This field may be NULL.
      -     */
      -    void (*server_success)(void *baton, request_rec *r, apr_table_t *params,
      -                           ap_serf_server_t* server);
      -    /**
      -     * If a request failed to be fulfilled by this address, feedback will
      -     * be given to the provider, so it may make better recommendations.
      -     *
      -     * This field may be NULL.
      -     */
      -    void (*server_failure)(void *baton, request_rec *r, apr_table_t *params,
      -                           ap_serf_server_t* server);
      -
      -};
      -/** @} */
      -
      -#endif /* _MOD_SERF_H_ */
      -
      diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
      index b0a9c19f7ff..6444b6899e3 100644
      --- a/modules/proxy/proxy_util.c
      +++ b/modules/proxy/proxy_util.c
      @@ -20,6 +20,9 @@
       #include "scoreboard.h"
       #include "apr_version.h"
       #include "apr_hash.h"
      +#include "proxy_util.h"
      +#include "ajp.h"
      +#include "scgi.h"
       
       #if APR_HAVE_UNISTD_H
       #include <unistd.h>         /* for getpid() */
      @@ -30,6 +33,13 @@
       #define apr_socket_create apr_socket_create_ex
       #endif
       
      +#if APR_HAVE_SYS_UN_H
      +#include <sys/un.h>
      +#endif
      +#if (APR_MAJOR_VERSION < 2)
      +#include "apr_support.h"        /* for apr_wait_for_io_or_timeout() */
      +#endif
      +
       APLOG_USE_MODULE(proxy);
       
       /*
      @@ -44,30 +54,14 @@ typedef struct {
           const char   *proxy_auth;      /* Proxy authorization */
       } forward_info;
       
      -/* Keep synced with mod_proxy.h! */
      -static struct wstat {
      -    unsigned int bit;
      -    char flag;
      -    const char *name;
      -} wstat_tbl[] = {
      -    {PROXY_WORKER_INITIALIZED,   PROXY_WORKER_INITIALIZED_FLAG,   "Init "},
      -    {PROXY_WORKER_IGNORE_ERRORS, PROXY_WORKER_IGNORE_ERRORS_FLAG, "Ign "},
      -    {PROXY_WORKER_DRAIN,         PROXY_WORKER_DRAIN_FLAG,         "Drn "},
      -    {PROXY_WORKER_IN_SHUTDOWN,   PROXY_WORKER_IN_SHUTDOWN_FLAG,   "Shut "},
      -    {PROXY_WORKER_DISABLED,      PROXY_WORKER_DISABLED_FLAG,      "Dis "},
      -    {PROXY_WORKER_STOPPED,       PROXY_WORKER_STOPPED_FLAG,       "Stop "},
      -    {PROXY_WORKER_IN_ERROR,      PROXY_WORKER_IN_ERROR_FLAG,      "Err "},
      -    {PROXY_WORKER_HOT_STANDBY,   PROXY_WORKER_HOT_STANDBY_FLAG,   "Stby "},
      -    {PROXY_WORKER_FREE,          PROXY_WORKER_FREE_FLAG,          "Free "},
      -    {0x0, '\0', NULL}
      -};
      -
       /* Global balancer counter */
       int PROXY_DECLARE_DATA proxy_lb_workers = 0;
       static int lb_workers_limit = 0;
       const apr_strmatch_pattern PROXY_DECLARE_DATA *ap_proxy_strmatch_path;
       const apr_strmatch_pattern PROXY_DECLARE_DATA *ap_proxy_strmatch_domain;
       
      +extern apr_global_mutex_t *proxy_mutex;
      +
       static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r);
       static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r);
       static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r);
      @@ -77,6 +71,29 @@ APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(proxy, PROXY, int, create_req,
                                          (request_rec *r, request_rec *pr), (r, pr),
                                          OK, DECLINED)
       
      +PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src,
      +                                             apr_size_t dlen)
      +{
      +    char *thenil;
      +    apr_size_t thelen;
      +
      +    /* special case handling */
      +    if (!dlen) {
      +        /* XXX: APR_ENOSPACE would be better */
      +        return APR_EGENERAL;
      +    }
      +    if (!src) {
      +        *dst = '\0';
      +        return APR_SUCCESS;
      +    }
      +    thenil = apr_cpystrn(dst, src, dlen);
      +    thelen = thenil - dst;
      +    if (src[thelen] == '\0') {
      +        return APR_SUCCESS;
      +    }
      +    return APR_EGENERAL;
      +}
      +
       /* already called in the knowledge that the characters are hex digits */
       PROXY_DECLARE(int) ap_proxy_hex2c(const char *x)
       {
      @@ -289,7 +306,7 @@ PROXY_DECLARE(char *)
               url = "";
           }
           else {
      -        *(url++) = '\0';    /* skip seperating '/' */
      +        *(url++) = '\0';    /* skip separating '/' */
           }
       
           /* find _last_ '@' since it might occur in user/password part */
      @@ -342,150 +359,6 @@ PROXY_DECLARE(char *)
           return NULL;
       }
       
      -/*
      - * If the date is a valid RFC 850 date or asctime() date, then it
      - * is converted to the RFC 1123 format.
      - */
      -PROXY_DECLARE(const char *)
      -     ap_proxy_date_canon(apr_pool_t *p, const char *date)
      -{
      -    apr_status_t rv;
      -    char* ndate;
      -
      -    apr_time_t time = apr_date_parse_http(date);
      -    if (!time) {
      -        return date;
      -    }
      -
      -    ndate = apr_palloc(p, APR_RFC822_DATE_LEN);
      -    rv = apr_rfc822_date(ndate, time);
      -    if (rv != APR_SUCCESS) {
      -        return date;
      -    }
      -
      -    return ndate;
      -}
      -
      -PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r)
      -{
      -    apr_pool_t *pool;
      -    request_rec *rp;
      -
      -    apr_pool_create(&pool, c->pool);
      -
      -    rp = apr_pcalloc(pool, sizeof(*r));
      -
      -    rp->pool            = pool;
      -    rp->status          = HTTP_OK;
      -
      -    rp->headers_in      = apr_table_make(pool, 50);
      -    rp->subprocess_env  = apr_table_make(pool, 50);
      -    rp->headers_out     = apr_table_make(pool, 12);
      -    rp->err_headers_out = apr_table_make(pool, 5);
      -    rp->notes           = apr_table_make(pool, 5);
      -
      -    rp->server = r->server;
      -    rp->proxyreq = r->proxyreq;
      -    rp->request_time = r->request_time;
      -    rp->connection      = c;
      -    rp->output_filters  = c->output_filters;
      -    rp->input_filters   = c->input_filters;
      -    rp->proto_output_filters  = c->output_filters;
      -    rp->proto_input_filters   = c->input_filters;
      -
      -    rp->request_config  = ap_create_request_config(pool);
      -    proxy_run_create_req(r, rp);
      -
      -    return rp;
      -}
      -
      -
      -/*
      - * list is a comma-separated list of case-insensitive tokens, with
      - * optional whitespace around the tokens.
      - * The return returns 1 if the token val is found in the list, or 0
      - * otherwise.
      - */
      -PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val)
      -{
      -    int len, i;
      -    const char *p;
      -
      -    len = strlen(val);
      -
      -    while (list != NULL) {
      -        p = ap_strchr_c(list, ',');
      -        if (p != NULL) {
      -            i = p - list;
      -            do {
      -                p++;
      -            } while (apr_isspace(*p));
      -        }
      -        else {
      -            i = strlen(list);
      -        }
      -
      -        while (i > 0 && apr_isspace(list[i - 1])) {
      -            i--;
      -        }
      -        if (i == len && strncasecmp(list, val, len) == 0) {
      -            return 1;
      -        }
      -        list = p;
      -    }
      -    return 0;
      -}
      -
      -/*
      - * Converts 8 hex digits to a time integer
      - */
      -PROXY_DECLARE(int) ap_proxy_hex2sec(const char *x)
      -{
      -    int i, ch;
      -    unsigned int j;
      -
      -    for (i = 0, j = 0; i < 8; i++) {
      -        ch = x[i];
      -        j <<= 4;
      -        if (apr_isdigit(ch)) {
      -            j |= ch - '0';
      -        }
      -        else if (apr_isupper(ch)) {
      -            j |= ch - ('A' - 10);
      -        }
      -        else {
      -            j |= ch - ('a' - 10);
      -        }
      -    }
      -    if (j == 0xffffffff) {
      -        return -1;      /* so that it works with 8-byte ints */
      -    }
      -    else {
      -        return j;
      -    }
      -}
      -
      -/*
      - * Converts a time integer to 8 hex digits
      - */
      -PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y)
      -{
      -    int i, ch;
      -    unsigned int j = t;
      -
      -    for (i = 7; i >= 0; i--) {
      -        ch = j & 0xF;
      -        j >>= 4;
      -        if (ch >= 10) {
      -            y[i] = ch + ('A' - 10);
      -        }
      -        else {
      -            y[i] = ch + '0';
      -        }
      -    }
      -    y[8] = '\0';
      -}
      -
       PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message)
       {
           const char *uri = ap_escape_html(r->pool, r->uri);
      @@ -499,18 +372,18 @@ PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *mes
                   NULL));
       
           /* Allow "error-notes" string to be printed by ap_send_error_response() */
      -    apr_table_setn(r->notes, "verbose-error-to", apr_pstrdup(r->pool, "*"));
      +    apr_table_setn(r->notes, "verbose-error-to", "*");
       
           r->status_line = apr_psprintf(r->pool, "%3.3u Proxy Error", statuscode);
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -             "proxy: %s returned by %s", message, r->uri);
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00898) "%s returned by %s", message,
      +                  r->uri);
           return statuscode;
       }
       
       static const char *
            proxy_get_host_of_request(request_rec *r)
       {
      -    char *url, *user = NULL, *password = NULL, *err, *host;
      +    char *url, *user = NULL, *password = NULL, *err, *host = NULL;
           apr_port_t port;
       
           if (r->hostname != NULL) {
      @@ -527,7 +400,7 @@ static const char *
           err = ap_proxy_canon_netloc(r->pool, &url, &user, &password, &host, &port);
       
           if (err != NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", err);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00899) "%s", err);
           }
       
           r->hostname = host;
      @@ -630,7 +503,7 @@ PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p)
               bits = 8 * quads;
       
               if (bits != 32) {     /* no warning for fully qualified IP address */
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00900)
                                "Warning: NetMask not supplied with IP-Addr; guessing: %s/%ld",
                                inet_ntoa(This->addr), bits);
               }
      @@ -639,11 +512,11 @@ PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p)
           This->mask.s_addr = htonl(APR_INADDR_NONE << (32 - bits));
       
           if (*addr == '\0' && (This->addr.s_addr & ~This->mask.s_addr) != 0) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00901)
                            "Warning: NetMask and IP-Addr disagree in %s/%ld",
                            inet_ntoa(This->addr), bits);
               This->addr.s_addr &= This->mask.s_addr;
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00902)
                            "         Set to %s/%ld", inet_ntoa(This->addr), bits);
           }
       
      @@ -680,22 +553,22 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
       
               if (This->addr.s_addr == (addr.s_addr & This->mask.s_addr)) {
       #if DEBUGGING
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00903)
                                "1)IP-Match: %s[%s] <-> ", host, inet_ntoa(addr));
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00904)
                                "%s/", inet_ntoa(This->addr));
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00905)
                                "%s", inet_ntoa(This->mask));
       #endif
                   return 1;
               }
       #if DEBUGGING
               else {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00906)
                                "1)IP-NoMatch: %s[%s] <-> ", host, inet_ntoa(addr));
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00907)
                                "%s/", inet_ntoa(This->addr));
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00908)
                                "%s", inet_ntoa(This->mask));
               }
       #endif
      @@ -706,7 +579,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
               if (apr_sockaddr_info_get(&reqaddr, host, APR_UNSPEC, 0, 0, r->pool)
                   != APR_SUCCESS) {
       #if DEBUGGING
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00909)
                    "2)IP-NoMatch: hostname=%s msg=Host not found", host);
       #endif
                   return 0;
      @@ -718,22 +591,22 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
                   ip = (struct in_addr *) reqaddr->ipaddr_ptr;
                   if (This->addr.s_addr == (ip->s_addr & This->mask.s_addr)) {
       #if DEBUGGING
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00910)
                                    "3)IP-Match: %s[%s] <-> ", host, inet_ntoa(*ip));
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00911)
                                    "%s/", inet_ntoa(This->addr));
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00912)
                                    "%s", inet_ntoa(This->mask));
       #endif
                       return 1;
                   }
       #if DEBUGGING
                   else {
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00913)
                                    "3)IP-NoMatch: %s[%s] <-> ", host, inet_ntoa(*ip));
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00914)
                                    "%s/", inet_ntoa(This->addr));
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00915)
                                    "%s", inet_ntoa(This->mask));
                   }
       #endif
      @@ -762,7 +635,7 @@ PROXY_DECLARE(int) ap_proxy_is_domainname(struct dirconn_entry *This, apr_pool_t
       
       #if 0
           if (addr[i] == ':') {
      -    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(03234)
                            "@@@@ handle optional port in proxy_is_domainname()");
           /* @@@@ handle optional port */
           }
      @@ -885,44 +758,63 @@ static int proxy_match_word(struct dirconn_entry *This, request_rec *r)
           return host != NULL && ap_strstr_c(host, This->name) != NULL;
       }
       
      -/* checks whether a host in uri_addr matches proxyblock */
      +/* Backwards-compatible interface. */
       PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf *conf,
                                    apr_sockaddr_t *uri_addr)
      +{
      +    return ap_proxy_checkproxyblock2(r, conf, uri_addr->hostname, uri_addr);
      +}
      +
      +#define MAX_IP_STR_LEN (46)
      +
      +PROXY_DECLARE(int) ap_proxy_checkproxyblock2(request_rec *r, proxy_server_conf *conf,
      +                                             const char *hostname, apr_sockaddr_t *addr)
       {
           int j;
      -    apr_sockaddr_t * src_uri_addr = uri_addr;
      +
           /* XXX FIXME: conf->noproxies->elts is part of an opaque structure */
           for (j = 0; j < conf->noproxies->nelts; j++) {
               struct noproxy_entry *npent = (struct noproxy_entry *) conf->noproxies->elts;
      -        struct apr_sockaddr_t *conf_addr = npent[j].addr;
      -        uri_addr = src_uri_addr;
      -        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                     "proxy: checking remote machine [%s] against [%s]", uri_addr->hostname, npent[j].name);
      -        if ((npent[j].name && ap_strstr_c(uri_addr->hostname, npent[j].name))
      -            || npent[j].name[0] == '*') {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                         "proxy: connect to remote machine %s blocked: name %s matched", uri_addr->hostname, npent[j].name);
      +        struct apr_sockaddr_t *conf_addr;
      +
      +        ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                      "checking remote machine [%s] against [%s]",
      +                      hostname, npent[j].name);
      +        if (ap_strstr_c(hostname, npent[j].name) || npent[j].name[0] == '*') {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(00916)
      +                          "connect to remote machine %s blocked: name %s "
      +                          "matched", hostname, npent[j].name);
                   return HTTP_FORBIDDEN;
               }
      -        while (conf_addr) {
      -            uri_addr = src_uri_addr;
      -            while (uri_addr) {
      -                char *conf_ip;
      -                char *uri_ip;
      -                apr_sockaddr_ip_get(&conf_ip, conf_addr);
      -                apr_sockaddr_ip_get(&uri_ip, uri_addr);
      -                ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, r->server,
      -                             "proxy: ProxyBlock comparing %s and %s", conf_ip, uri_ip);
      -                if (!apr_strnatcasecmp(conf_ip, uri_ip)) {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
      -                                 "proxy: connect to remote machine %s blocked: IP %s matched", uri_addr->hostname, conf_ip);
      +
      +        /* No IP address checks if no IP address was passed in,
      +         * i.e. the forward address proxy case, where this server does
      +         * not resolve the hostname.  */
      +        if (!addr)
      +            continue;
      +
      +        for (conf_addr = npent[j].addr; conf_addr; conf_addr = conf_addr->next) {
      +            char caddr[MAX_IP_STR_LEN], uaddr[MAX_IP_STR_LEN];
      +            apr_sockaddr_t *uri_addr;
      +
      +            if (apr_sockaddr_ip_getbuf(caddr, sizeof caddr, conf_addr))
      +                continue;
      +
      +            for (uri_addr = addr; uri_addr; uri_addr = uri_addr->next) {
      +                if (apr_sockaddr_ip_getbuf(uaddr, sizeof uaddr, uri_addr))
      +                    continue;
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                              "ProxyBlock comparing %s and %s", caddr, uaddr);
      +                if (!strcmp(caddr, uaddr)) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(00917)
      +                                  "connect to remote machine %s blocked: "
      +                                  "IP %s matched", hostname, caddr);
                           return HTTP_FORBIDDEN;
                       }
      -                uri_addr = uri_addr->next;
                   }
      -            conf_addr = conf_addr->next;
               }
           }
      +
           return OK;
       }
       
      @@ -933,109 +825,6 @@ PROXY_DECLARE(int) ap_proxy_pre_http_request(conn_rec *c, request_rec *r)
           return OK;
       }
       
      -/*
      - * converts a series of buckets into a string
      - * XXX: BillS says this function performs essentially the same function as
      - * ap_rgetline() in protocol.c. Deprecate this function and use ap_rgetline()
      - * instead? I think ap_proxy_string_read() will not work properly on non ASCII
      - * (EBCDIC) machines either.
      - */
      -PROXY_DECLARE(apr_status_t) ap_proxy_string_read(conn_rec *c, apr_bucket_brigade *bb,
      -                                                 char *buff, apr_size_t bufflen, int *eos)
      -{
      -    apr_bucket *e;
      -    apr_status_t rv;
      -    char *pos = buff;
      -    char *response;
      -    int found = 0;
      -    apr_size_t len;
      -
      -    /* start with an empty string */
      -    buff[0] = 0;
      -    *eos = 0;
      -
      -    /* loop through each brigade */
      -    while (!found) {
      -        /* get brigade from network one line at a time */
      -        if (APR_SUCCESS != (rv = ap_get_brigade(c->input_filters, bb,
      -                                                AP_MODE_GETLINE,
      -                                                APR_BLOCK_READ,
      -                                                0))) {
      -            return rv;
      -        }
      -        /* loop through each bucket */
      -        while (!found) {
      -            if (*eos || APR_BRIGADE_EMPTY(bb)) {
      -                /* The connection aborted or timed out */
      -                return APR_ECONNABORTED;
      -            }
      -            e = APR_BRIGADE_FIRST(bb);
      -            if (APR_BUCKET_IS_EOS(e)) {
      -                *eos = 1;
      -            }
      -            else {
      -                if (APR_SUCCESS != (rv = apr_bucket_read(e,
      -                                                         (const char **)&response,
      -                                                         &len,
      -                                                         APR_BLOCK_READ))) {
      -                    return rv;
      -                }
      -                /*
      -                 * is string LF terminated?
      -                 * XXX: This check can be made more efficient by simply checking
      -                 * if the last character in the 'response' buffer is an ASCII_LF.
      -                 * See ap_rgetline() for an example.
      -                 */
      -                if (memchr(response, APR_ASCII_LF, len)) {
      -                    found = 1;
      -                }
      -                /* concat strings until buff is full - then throw the data away */
      -                if (len > ((bufflen-1)-(pos-buff))) {
      -                    len = (bufflen-1)-(pos-buff);
      -                }
      -                if (len > 0) {
      -                    memcpy(pos, response, len);
      -                    pos += len;
      -                }
      -            }
      -            APR_BUCKET_REMOVE(e);
      -            apr_bucket_destroy(e);
      -        }
      -        *pos = '\0';
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
      -/* unmerge an element in the table */
      -PROXY_DECLARE(void) ap_proxy_table_unmerge(apr_pool_t *p, apr_table_t *t, char *key)
      -{
      -    apr_off_t offset = 0;
      -    apr_off_t count = 0;
      -    char *value = NULL;
      -
      -    /* get the value to unmerge */
      -    const char *initial = apr_table_get(t, key);
      -    if (!initial) {
      -        return;
      -    }
      -    value = apr_pstrdup(p, initial);
      -
      -    /* remove the value from the headers */
      -    apr_table_unset(t, key);
      -
      -    /* find each comma */
      -    while (value[count]) {
      -        if (value[count] == ',') {
      -            value[count] = 0;
      -            apr_table_add(t, key, value + offset);
      -            offset = count + 1;
      -        }
      -        count++;
      -    }
      -    apr_table_add(t, key, value + offset);
      -}
      -
       PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
                                     proxy_dir_conf *conf, const char *url)
       {
      @@ -1074,10 +863,10 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
                * to find which member actually handled this request.
                */
               if (ap_proxy_valid_balancer_name((char *)real, 0) &&
      -            (balancer = ap_proxy_get_balancer(r->pool, sconf, real))) {
      +            (balancer = ap_proxy_get_balancer(r->pool, sconf, real, 1))) {
                   int n, l3 = 0;
                   proxy_worker **worker = (proxy_worker **)balancer->workers->elts;
      -            const char *urlpart = ap_strchr_c(real, '/');
      +            const char *urlpart = ap_strchr_c(real + sizeof(BALANCER_PREFIX) - 1, '/');
                   if (urlpart) {
                       if (!urlpart[1])
                           urlpart = NULL;
      @@ -1104,7 +893,12 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
                           }
                       }
                       else if (l1 >= l2 && strncasecmp((*worker)->s->name, url, l2) == 0) {
      -                    u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
      +                    /* edge case where fake is just "/"... avoid double slash */
      +                    if ((ent[i].fake[0] == '/') && (ent[i].fake[1] == 0) && (url[l2] == '/')) {
      +                        u = apr_pstrdup(r->pool, &url[l2]);
      +                    } else {
      +                        u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
      +                    }
                           return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
                       }
                       worker++;
      @@ -1128,7 +922,7 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
                           part = url;
                       }
                   }
      -            if (l1 >= l2 && strncasecmp(real, part, l2) == 0) {
      +            if (l2 > 0 && l1 >= l2 && strncasecmp(real, part, l2) == 0) {
                       u = apr_pstrcat(r->pool, ent[i].fake, &part[l2], NULL);
                       return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
                   }
      @@ -1151,14 +945,14 @@ PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r,
           proxy_req_conf *rconf = ap_get_module_config(r->request_config,
                                                        &proxy_module);
           struct proxy_alias *ent;
      -    size_t len = strlen(str);
      +    apr_size_t len = strlen(str);
           const char *newpath = NULL;
           const char *newdomain = NULL;
           const char *pathp;
           const char *domainp;
           const char *pathe = NULL;
           const char *domaine = NULL;
      -    size_t l1, l2, poffs = 0, doffs = 0;
      +    apr_size_t l1, l2, poffs = 0, doffs = 0;
           int i;
           int ddiff = 0;
           int pdiff = 0;
      @@ -1275,11 +1069,13 @@ PROXY_DECLARE(int) ap_proxy_valid_balancer_name(char *name, int i)
       
       PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p,
                                                             proxy_server_conf *conf,
      -                                                      const char *url)
      +                                                      const char *url,
      +                                                      int care)
       {
           proxy_balancer *balancer;
           char *c, *uri = apr_pstrdup(p, url);
           int i;
      +    proxy_hashes hash;
       
           c = strchr(uri, ':');
           if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') {
      @@ -1289,33 +1085,63 @@ PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p,
           if ((c = strchr(c + 3, '/'))) {
               *c = '\0';
           }
      +    ap_str_tolower(uri);
      +    hash.def = ap_proxy_hashfunc(uri, PROXY_HASHFUNC_DEFAULT);
      +    hash.fnv = ap_proxy_hashfunc(uri, PROXY_HASHFUNC_FNV);
           balancer = (proxy_balancer *)conf->balancers->elts;
           for (i = 0; i < conf->balancers->nelts; i++) {
      -        if (strcasecmp(balancer->name, uri) == 0) {
      -            return balancer;
      +        if (balancer->hash.def == hash.def && balancer->hash.fnv == hash.fnv) {
      +            if (!care || !balancer->s->inactive) {
      +                return balancer;
      +            }
               }
               balancer++;
           }
           return NULL;
       }
       
      +
      +PROXY_DECLARE(char *) ap_proxy_update_balancer(apr_pool_t *p,
      +                                                proxy_balancer *balancer,
      +                                                const char *url)
      +{
      +    apr_uri_t puri;
      +    if (!url) {
      +        return NULL;
      +    }
      +    if (apr_uri_parse(p, url, &puri) != APR_SUCCESS) {
      +        return apr_psprintf(p, "unable to parse: %s", url);
      +    }
      +    if (puri.path && PROXY_STRNCPY(balancer->s->vpath, puri.path) != APR_SUCCESS) {
      +        return apr_psprintf(p, "balancer %s front-end virtual-path (%s) too long",
      +                            balancer->s->name, puri.path);
      +    }
      +    if (puri.hostname && PROXY_STRNCPY(balancer->s->vhost, puri.hostname) != APR_SUCCESS) {
      +        return apr_psprintf(p, "balancer %s front-end vhost name (%s) too long",
      +                            balancer->s->name, puri.hostname);
      +    }
      +    return NULL;
      +}
      +
      +#define PROXY_UNSET_NONCE '\n'
      +
       PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
                                                      proxy_balancer **balancer,
                                                      proxy_server_conf *conf,
                                                      const char *url,
      +                                               const char *alias,
                                                      int do_malloc)
       {
      -    char nonce[APR_UUID_FORMATTED_LENGTH + 1];
           proxy_balancer_method *lbmethod;
      -    apr_uuid_t uuid;
           proxy_balancer_shared *bshared;
           char *c, *q, *uri = apr_pstrdup(p, url);
      +    const char *sname;
       
           /* We should never get here without a valid BALANCER_PREFIX... */
       
           c = strchr(uri, ':');
           if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0')
      -        return "Bad syntax for a balancer name";
      +        return apr_psprintf(p, "Bad syntax for a balancer name (%s)", uri);
           /* remove path from uri */
           if ((q = strchr(c + 3, '/')))
               *q = '\0';
      @@ -1325,15 +1151,11 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
           memset(*balancer, 0, sizeof(proxy_balancer));
       
           /*
      -     * NOTE: The default method is byrequests, which we assume
      -     * exists!
      +     * NOTE: The default method is byrequests - if it doesn't
      +     * exist, that's OK at this time. We check when we share and sync
            */
           lbmethod = ap_lookup_provider(PROXY_LBMETHOD, "byrequests", "0");
      -    if (!lbmethod) {
      -        return "Can't find 'byrequests' lb method";
      -    }
       
      -    (*balancer)->name = uri;
           (*balancer)->workers = apr_array_make(p, 5, sizeof(proxy_worker *));
           (*balancer)->gmutex = NULL;
           (*balancer)->tmutex = NULL;
      @@ -1348,16 +1170,31 @@ PROXY_DECLARE(char *) ap_proxy_define_balancer(apr_pool_t *p,
       
           bshared->was_malloced = (do_malloc != 0);
           PROXY_STRNCPY(bshared->lbpname, "byrequests");
      +    if (PROXY_STRNCPY(bshared->name, uri) != APR_SUCCESS) {
      +        return apr_psprintf(p, "balancer name (%s) too long", uri);
      +    }
      +    /*
      +     * We do the below for verification. The real sname will be
      +     * done post_config
      +     */
      +    ap_pstr2_alnum(p, bshared->name + sizeof(BALANCER_PREFIX) - 1,
      +                   &sname);
      +    sname = apr_pstrcat(p, conf->id, "_", sname, NULL);
      +    if (PROXY_STRNCPY(bshared->sname, sname) != APR_SUCCESS) {
      +        return apr_psprintf(p, "balancer safe-name (%s) too long", sname);
      +    }
      +    bshared->hash.def = ap_proxy_hashfunc(bshared->name, PROXY_HASHFUNC_DEFAULT);
      +    bshared->hash.fnv = ap_proxy_hashfunc(bshared->name, PROXY_HASHFUNC_FNV);
      +    (*balancer)->hash = bshared->hash;
       
      -    /* Retrieve a UUID and store the nonce for the lifetime of
      -     * the process. */
      -    apr_uuid_get(&uuid);
      -    apr_uuid_format(nonce, &uuid);
      -    PROXY_STRNCPY(bshared->nonce, nonce);
      +    bshared->forcerecovery = 1;
      +    bshared->sticky_separator = '.';
      +    *bshared->nonce = PROXY_UNSET_NONCE;  /* impossible valid input */
       
           (*balancer)->s = bshared;
      +    (*balancer)->sconf = conf;
       
      -    return NULL;
      +    return ap_proxy_update_balancer(p, *balancer, alias);
       }
       
       /*
      @@ -1367,20 +1204,45 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_balancer(proxy_balancer *balancer,
                                                           proxy_balancer_shared *shm,
                                                           int i)
       {
      +    apr_status_t rv = APR_SUCCESS;
           proxy_balancer_method *lbmethod;
      +    char *action = "copying";
           if (!shm || !balancer->s)
               return APR_EINVAL;
       
      -    memcpy(shm, balancer->s, sizeof(proxy_balancer_shared));
      -    if (balancer->s->was_malloced)
      -        free(balancer->s);
      +    if ((balancer->s->hash.def != shm->hash.def) ||
      +        (balancer->s->hash.fnv != shm->hash.fnv)) {
      +        memcpy(shm, balancer->s, sizeof(proxy_balancer_shared));
      +        if (balancer->s->was_malloced)
      +            free(balancer->s);
      +    } else {
      +        action = "re-using";
      +    }
           balancer->s = shm;
           balancer->s->index = i;
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02337)
      +                 "%s shm[%d] (0x%pp) for %s", action, i, (void *)shm,
      +                 balancer->s->name);
           /* the below should always succeed */
           lbmethod = ap_lookup_provider(PROXY_LBMETHOD, balancer->s->lbpname, "0");
      -    if (lbmethod)
      +    if (lbmethod) {
               balancer->lbmethod = lbmethod;
      -    return APR_SUCCESS;
      +    } else {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02432)
      +                     "Cannot find LB Method: %s", balancer->s->lbpname);
      +        return APR_EINVAL;
      +    }
      +    if (*balancer->s->nonce == PROXY_UNSET_NONCE) {
      +        char nonce[APR_UUID_FORMATTED_LENGTH + 1];
      +        apr_uuid_t uuid;
      +        /* Retrieve a UUID and store the nonce for the lifetime of
      +         * the process.
      +         */
      +        apr_uuid_get(&uuid);
      +        apr_uuid_format(nonce, &uuid);
      +        rv = PROXY_STRNCPY(balancer->s->nonce, nonce);
      +    }
      +    return rv;
       }
       
       PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balancer, server_rec *s, apr_pool_t *p)
      @@ -1391,8 +1253,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
           unsigned int num;
       
           if (!storage) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "no provider for %s", balancer->name);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(00918)
      +                     "no provider for %s", balancer->s->name);
               return APR_EGENERAL;
           }
           /*
      @@ -1400,8 +1262,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
            * mutex and then attach to the shared worker shm
            */
           if (!balancer->gmutex) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "no mutex %s", balancer->name);
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(00919)
      +                     "no mutex %s", balancer->s->name);
               return APR_EGENERAL;
           }
       
      @@ -1410,16 +1272,16 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
                                            apr_global_mutex_lockfile(balancer->gmutex),
                                            p);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(00920)
                            "Failed to reopen mutex %s in child",
      -                     balancer->name);
      +                     balancer->s->name);
               return rv;
           }
       
           /* now attach */
      -    storage->attach(&(balancer->slot), balancer->sname, &size, &num, p);
      -    if (!balancer->slot) {
      -        ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, s, "slotmem_attach failed");
      +    storage->attach(&(balancer->wslot), balancer->s->sname, &size, &num, p);
      +    if (!balancer->wslot) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(00921) "slotmem_attach failed");
               return APR_EGENERAL;
           }
           if (balancer->lbmethod && balancer->lbmethod->reset)
      @@ -1428,7 +1290,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
           if (balancer->tmutex == NULL) {
               rv = apr_thread_mutex_create(&(balancer->tmutex), APR_THREAD_MUTEX_DEFAULT, p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(00922)
                                "can not create balancer thread mutex");
                   return rv;
               }
      @@ -1440,6 +1302,15 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_balancer(proxy_balancer *balance
        * CONNECTION related...
        */
       
      +static void socket_cleanup(proxy_conn_rec *conn)
      +{
      +    conn->sock = NULL;
      +    conn->tmp_bb = NULL;
      +    conn->connection = NULL;
      +    conn->ssl_hostname = NULL;
      +    apr_pool_clear(conn->scpool);
      +}
      +
       static apr_status_t conn_pool_cleanup(void *theworker)
       {
           proxy_worker *worker = (proxy_worker *)theworker;
      @@ -1471,6 +1342,13 @@ static void init_conn_pool(apr_pool_t *p, proxy_worker *worker)
           worker->cp = cp;
       }
       
      +PROXY_DECLARE(int) ap_proxy_connection_reusable(proxy_conn_rec *conn)
      +{
      +    proxy_worker *worker = conn->worker;
      +
      +    return ! (conn->close || !worker->s->is_address_reusable || worker->s->disablereuse);
      +}
      +
       static apr_status_t connection_cleanup(void *theconn)
       {
           proxy_conn_rec *conn = (proxy_conn_rec *)theconn;
      @@ -1480,7 +1358,7 @@ static apr_status_t connection_cleanup(void *theconn)
            * If the connection pool is NULL the worker
            * cleanup has been run. Just return.
            */
      -    if (!worker->cp) {
      +    if (!worker->cp->pool) {
               return APR_SUCCESS;
           }
       
      @@ -1491,15 +1369,15 @@ static apr_status_t connection_cleanup(void *theconn)
       
           /* Sanity check: Did we already return the pooled connection? */
           if (conn->inreslist) {
      -        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conn->pool,
      -                      "proxy: Pooled connection 0x%pp for worker %s has been"
      +        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, conn->pool, APLOGNO(00923)
      +                      "Pooled connection 0x%pp for worker %s has been"
                             " already returned to the connection pool.", conn,
      -                      worker->s->name);
      +                      ap_proxy_worker_name(conn->pool, worker));
               return APR_SUCCESS;
           }
       
           /* determine if the connection need to be closed */
      -    if (conn->close || !worker->s->is_address_reusable || worker->s->disablereuse) {
      +    if (!worker->s->is_address_reusable || worker->s->disablereuse) {
               apr_pool_t *p = conn->pool;
               apr_pool_clear(p);
               conn = apr_pcalloc(p, sizeof(proxy_conn_rec));
      @@ -1508,6 +1386,12 @@ static apr_status_t connection_cleanup(void *theconn)
               apr_pool_create(&(conn->scpool), p);
               apr_pool_tag(conn->scpool, "proxy_conn_scpool");
           }
      +    else if (conn->close
      +                || (conn->connection
      +                    && conn->connection->keepalive == AP_CONN_CLOSE)) {
      +        socket_cleanup(conn);
      +        conn->close = 0;
      +    }
       
           if (worker->s->hmax && worker->cp->res) {
               conn->inreslist = 1;
      @@ -1522,17 +1406,10 @@ static apr_status_t connection_cleanup(void *theconn)
           return APR_SUCCESS;
       }
       
      -static void socket_cleanup(proxy_conn_rec *conn)
      -{
      -    conn->sock = NULL;
      -    conn->connection = NULL;
      -    apr_pool_clear(conn->scpool);
      -}
      -
      +/* DEPRECATED */
       PROXY_DECLARE(apr_status_t) ap_proxy_ssl_connection_cleanup(proxy_conn_rec *conn,
                                                                   request_rec *r)
       {
      -    apr_bucket_brigade *bb;
           apr_status_t rv;
       
           /*
      @@ -1544,22 +1421,21 @@ PROXY_DECLARE(apr_status_t) ap_proxy_ssl_connection_cleanup(proxy_conn_rec *conn
            * processed. We don't expect any data to be in the returned brigade.
            */
           if (conn->sock && conn->connection) {
      -        bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      -        rv = ap_get_brigade(conn->connection->input_filters, bb,
      +        rv = ap_get_brigade(conn->connection->input_filters, conn->tmp_bb,
                                   AP_MODE_READBYTES, APR_NONBLOCK_READ,
                                   HUGE_STRING_LEN);
      -        if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
      -            socket_cleanup(conn);
      -        }
      -        if (!APR_BRIGADE_EMPTY(bb)) {
      +        if (!APR_BRIGADE_EMPTY(conn->tmp_bb)) {
                   apr_off_t len;
       
      -            rv = apr_brigade_length(bb, 0, &len);
      +            rv = apr_brigade_length(conn->tmp_bb, 0, &len);
                   ap_log_rerror(APLOG_MARK, APLOG_TRACE3, rv, r,
      -                          "proxy: SSL cleanup brigade contained %"
      +                          "SSL cleanup brigade contained %"
                                 APR_OFF_T_FMT " bytes of data.", len);
      +            apr_brigade_cleanup(conn->tmp_bb);
      +        }
      +        if ((rv != APR_SUCCESS) && !APR_STATUS_IS_EAGAIN(rv)) {
      +            socket_cleanup(conn);
               }
      -        apr_brigade_destroy(bb);
           }
           return APR_SUCCESS;
       }
      @@ -1604,10 +1480,11 @@ static apr_status_t connection_constructor(void **resource, void *params,
       static apr_status_t connection_destructor(void *resource, void *params,
                                                 apr_pool_t *pool)
       {
      -    proxy_conn_rec *conn = (proxy_conn_rec *)resource;
      +    proxy_worker *worker = params;
       
           /* Destroy the pool only if not called from reslist_destroy */
      -    if (conn->worker->cp->pool) {
      +    if (worker->cp->pool) {
      +        proxy_conn_rec *conn = resource;
               apr_pool_destroy(conn->pool);
           }
       
      @@ -1618,6 +1495,16 @@ static apr_status_t connection_destructor(void *resource, void *params,
        * WORKER related...
        */
       
      +PROXY_DECLARE(char *) ap_proxy_worker_name(apr_pool_t *p,
      +                                           proxy_worker *worker)
      +{
      +    if (!(*worker->s->uds_path) || !p) {
      +        /* just in case */
      +        return worker->s->name;
      +    }
      +    return apr_pstrcat(p, "unix:", worker->s->uds_path, "|", worker->s->name, NULL);
      +}
      +
       PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p,
                                                         proxy_balancer *balancer,
                                                         proxy_server_conf *conf,
      @@ -1633,6 +1520,12 @@ PROXY_DECLARE(proxy_worker *) ap_proxy_get_worker(apr_pool_t *p,
           char *url_copy;
           int i;
       
      +    if (!url) {
      +        return NULL;
      +    }
      +
      +    url = ap_proxy_de_socketfy(p, url);
      +
           c = ap_strchr_c(url, ':');
           if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') {
               return NULL;
      @@ -1711,19 +1604,47 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p,
                                                    int do_malloc)
       {
           int rv;
      -    apr_uri_t uri;
      +    apr_uri_t uri, urisock;
           proxy_worker_shared *wshared;
      +    char *ptr, *sockpath = NULL;
       
      +    /*
      +     * Look to see if we are using UDS:
      +     * require format: unix:/path/foo/bar.sock|http://ignored/path2/
      +     * This results in talking http to the socket at /path/foo/bar.sock
      +     */
      +    ptr = ap_strchr((char *)url, '|');
      +    if (ptr) {
      +        *ptr = '\0';
      +        rv = apr_uri_parse(p, url, &urisock);
      +        if (rv == APR_SUCCESS && !strcasecmp(urisock.scheme, "unix")) {
      +            sockpath = ap_runtime_dir_relative(p, urisock.path);;
      +            url = ptr+1;    /* so we get the scheme for the uds */
      +        }
      +        else {
      +            *ptr = '|';
      +        }
      +    }
           rv = apr_uri_parse(p, url, &uri);
       
           if (rv != APR_SUCCESS) {
      -        return "Unable to parse URL";
      +        return apr_pstrcat(p, "Unable to parse URL: ", url, NULL);
           }
      -    if (!uri.hostname || !uri.scheme) {
      -        return "URL must be absolute!";
      +    if (!uri.scheme) {
      +        return apr_pstrcat(p, "URL must be absolute!: ", url, NULL);
      +    }
      +    /* allow for unix:/path|http: */
      +    if (!uri.hostname) {
      +        if (sockpath) {
      +            uri.hostname = "localhost";
      +        }
      +        else {
      +            return apr_pstrcat(p, "URL must be absolute!: ", url, NULL);
      +        }
      +    }
      +    else {
      +        ap_str_tolower(uri.hostname);
           }
      -
      -    ap_str_tolower(uri.hostname);
           ap_str_tolower(uri.scheme);
           /*
            * Workers can be associated w/ balancers or on their
      @@ -1760,17 +1681,44 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p,
       
           memset(wshared, 0, sizeof(proxy_worker_shared));
       
      -    PROXY_STRNCPY(wshared->name, apr_uri_unparse(p, &uri, APR_URI_UNP_REVEALPASSWORD));
      -    PROXY_STRNCPY(wshared->scheme, uri.scheme);
      -    PROXY_STRNCPY(wshared->hostname, uri.hostname);
      -    wshared->port = uri.port;
      +    wshared->port = (uri.port ? uri.port : ap_proxy_port_of_scheme(uri.scheme));
      +    if (uri.port && uri.port == ap_proxy_port_of_scheme(uri.scheme)) {
      +        uri.port = 0;
      +    }
      +    ptr = apr_uri_unparse(p, &uri, APR_URI_UNP_REVEALPASSWORD);
      +    if (PROXY_STRNCPY(wshared->name, ptr) != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02808)
      +        "Alert! worker name (%s) too long; truncated to: %s", ptr, wshared->name);
      +    }
      +    if (PROXY_STRNCPY(wshared->scheme, uri.scheme) != APR_SUCCESS) {
      +        return apr_psprintf(p, "worker scheme (%s) too long", uri.scheme);
      +    }
      +    if (PROXY_STRNCPY(wshared->hostname, uri.hostname) != APR_SUCCESS) {
      +        return apr_psprintf(p, "worker hostname (%s) too long", uri.hostname);
      +    }
           wshared->flush_packets = flush_off;
           wshared->flush_wait = PROXY_FLUSH_WAIT;
           wshared->is_address_reusable = 1;
           wshared->lbfactor = 1;
      +    wshared->passes = 1;
      +    wshared->fails = 1;
      +    wshared->interval = apr_time_from_sec(HCHECK_WATHCHDOG_DEFAULT_INTERVAL);
           wshared->smax = -1;
      -    wshared->hash = ap_proxy_hashfunc(wshared->name, PROXY_HASHFUNC_DEFAULT);
      +    wshared->hash.def = ap_proxy_hashfunc(wshared->name, PROXY_HASHFUNC_DEFAULT);
      +    wshared->hash.fnv = ap_proxy_hashfunc(wshared->name, PROXY_HASHFUNC_FNV);
           wshared->was_malloced = (do_malloc != 0);
      +    if (sockpath) {
      +        if (PROXY_STRNCPY(wshared->uds_path, sockpath) != APR_SUCCESS) {
      +            return apr_psprintf(p, "worker uds path (%s) too long", sockpath);
      +        }
      +
      +    }
      +    else {
      +        *wshared->uds_path = '\0';
      +    }
      +    if (!balancer) {
      +        wshared->status |= PROXY_WORKER_IGNORE_ERRORS;
      +    }
       
           (*worker)->hash = wshared->hash;
           (*worker)->context = NULL;
      @@ -1787,14 +1735,30 @@ PROXY_DECLARE(char *) ap_proxy_define_worker(apr_pool_t *p,
       PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_worker_shared *shm,
                                                         int i)
       {
      +    char *action = "copying";
           if (!shm || !worker->s)
               return APR_EINVAL;
       
      -    memcpy(shm, worker->s, sizeof(proxy_worker_shared));
      -    if (worker->s->was_malloced)
      -        free(worker->s); /* was malloced in ap_proxy_define_worker */
      +    if ((worker->s->hash.def != shm->hash.def) ||
      +        (worker->s->hash.fnv != shm->hash.fnv)) {
      +        memcpy(shm, worker->s, sizeof(proxy_worker_shared));
      +        if (worker->s->was_malloced)
      +            free(worker->s); /* was malloced in ap_proxy_define_worker */
      +    } else {
      +        action = "re-using";
      +    }
           worker->s = shm;
           worker->s->index = i;
      +    {
      +        apr_pool_t *pool;
      +        apr_pool_create(&pool, ap_server_conf->process->pool);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338)
      +                     "%s shm[%d] (0x%pp) for worker: %s", action, i, (void *)shm,
      +                     ap_proxy_worker_name(pool, worker));
      +        if (pool) {
      +            apr_pool_destroy(pool);
      +        }
      +    }
           return APR_SUCCESS;
       }
       
      @@ -1805,12 +1769,14 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
       
           if (worker->s->status & PROXY_WORKER_INITIALIZED) {
               /* The worker is already initialized */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "worker %s shared already initialized", worker->s->name);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00924)
      +                     "worker %s shared already initialized",
      +                     ap_proxy_worker_name(p, worker));
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "initializing worker %s shared", worker->s->name);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00925)
      +                     "initializing worker %s shared",
      +                     ap_proxy_worker_name(p, worker));
               /* Set default parameters */
               if (!worker->s->retry_set) {
                   worker->s->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
      @@ -1832,39 +1798,44 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
                   if (worker->s->smax == -1 || worker->s->smax > worker->s->hmax) {
                       worker->s->smax = worker->s->hmax;
                   }
      -            /* Set min to be lower then smax */
      +            /* Set min to be lower than smax */
                   if (worker->s->min > worker->s->smax) {
                       worker->s->min = worker->s->smax;
                   }
               }
               else {
      -            /* This will supress the apr_reslist creation */
      +            /* This will suppress the apr_reslist creation */
                   worker->s->min = worker->s->smax = worker->s->hmax = 0;
               }
           }
       
           /* What if local is init'ed and shm isn't?? Even possible? */
           if (worker->local_status & PROXY_WORKER_INITIALIZED) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "worker %s local already initialized", worker->s->name);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00926)
      +                     "worker %s local already initialized",
      +                     ap_proxy_worker_name(p, worker));
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "initializing worker %s local", worker->s->name);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00927)
      +                     "initializing worker %s local",
      +                     ap_proxy_worker_name(p, worker));
      +        apr_global_mutex_lock(proxy_mutex);
               /* Now init local worker data */
               if (worker->tmutex == NULL) {
                   rv = apr_thread_mutex_create(&(worker->tmutex), APR_THREAD_MUTEX_DEFAULT, p);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00928)
                                    "can not create worker thread mutex");
      +                apr_global_mutex_unlock(proxy_mutex);
                       return rv;
                   }
               }
               if (worker->cp == NULL)
                   init_conn_pool(p, worker);
               if (worker->cp == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                "can not create connection pool");
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00929)
      +                         "can not create connection pool");
      +            apr_global_mutex_unlock(proxy_mutex);
                   return APR_EGENERAL;
               }
       
      @@ -1879,8 +1850,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
                                             conn_pool_cleanup,
                                             apr_pool_cleanup_null);
       
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                "proxy: initialized pool in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00930)
      +                "initialized pool in child %" APR_PID_T_FMT " for (%s) min=%d max=%d smax=%d",
                        getpid(), worker->s->hostname, worker->s->min,
                        worker->s->hmax, worker->s->smax);
       
      @@ -1896,10 +1867,12 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
                   rv = connection_constructor(&conn, worker, worker->cp->pool);
                   worker->cp->conn = conn;
       
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "proxy: initialized single connection worker in child %" APR_PID_T_FMT " for (%s)",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00931)
      +                 "initialized single connection worker in child %" APR_PID_T_FMT " for (%s)",
                        getpid(), worker->s->hostname);
               }
      +        apr_global_mutex_unlock(proxy_mutex);
      +
           }
           if (rv == APR_SUCCESS) {
               worker->s->status |= (PROXY_WORKER_INITIALIZED);
      @@ -1908,22 +1881,28 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser
           return rv;
       }
       
      -PROXY_DECLARE(int) ap_proxy_retry_worker(const char *proxy_function,
      -                                         proxy_worker *worker,
      -                                         server_rec *s)
      +static int ap_proxy_retry_worker(const char *proxy_function, proxy_worker *worker,
      +        server_rec *s)
       {
           if (worker->s->status & PROXY_WORKER_IN_ERROR) {
      -        if (apr_time_now() > worker->s->error_time + worker->s->retry) {
      +        if (PROXY_WORKER_IS(worker, PROXY_WORKER_STOPPED)) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(3305)
      +                         "%s: Won't retry worker (%s): stopped",
      +                         proxy_function, worker->s->hostname);
      +            return DECLINED;
      +        }
      +        if ((worker->s->status & PROXY_WORKER_IGNORE_ERRORS)
      +            || apr_time_now() > worker->s->error_time + worker->s->retry) {
                   ++worker->s->retries;
                   worker->s->status &= ~PROXY_WORKER_IN_ERROR;
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                         "proxy: %s: worker for (%s) has been marked for retry",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00932)
      +                         "%s: worker for (%s) has been marked for retry",
                                proxy_function, worker->s->hostname);
                   return OK;
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                         "proxy: %s: too soon to retry worker for (%s)",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00933)
      +                         "%s: too soon to retry worker for (%s)",
                                proxy_function, worker->s->hostname);
                   return DECLINED;
               }
      @@ -1933,6 +1912,40 @@ PROXY_DECLARE(int) ap_proxy_retry_worker(const char *proxy_function,
           }
       }
       
      +/*
      + * In the case of the reverse proxy, we need to see if we
      + * were passed a UDS url (eg: from mod_proxy) and adjust uds_path
      + * as required.  
      + */
      +static void fix_uds_filename(request_rec *r, char **url) 
      +{
      +    char *ptr, *ptr2;
      +    if (!r || !r->filename) return;
      +
      +    if (!strncmp(r->filename, "proxy:", 6) &&
      +            (ptr2 = ap_strcasestr(r->filename, "unix:")) &&
      +            (ptr = ap_strchr(ptr2, '|'))) {
      +        apr_uri_t urisock;
      +        apr_status_t rv;
      +        *ptr = '\0';
      +        rv = apr_uri_parse(r->pool, ptr2, &urisock);
      +        if (rv == APR_SUCCESS) {
      +            char *rurl = ptr+1;
      +            char *sockpath = ap_runtime_dir_relative(r->pool, urisock.path);
      +            apr_table_setn(r->notes, "uds_path", sockpath);
      +            *url = apr_pstrdup(r->pool, rurl); /* so we get the scheme for the uds */
      +            /* r->filename starts w/ "proxy:", so add after that */
      +            memmove(r->filename+6, rurl, strlen(rurl)+1);
      +            ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      +                    "*: rewrite of url due to UDS(%s): %s (%s)",
      +                    sockpath, *url, r->filename);
      +        }
      +        else {
      +            *ptr = '|';
      +        }
      +    }
      +}
      +
       PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker,
                                               proxy_balancer **balancer,
                                               request_rec *r,
      @@ -1945,17 +1958,16 @@ PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker,
               *worker = ap_proxy_get_worker(r->pool, NULL, conf, *url);
               if (*worker) {
                   ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                          "proxy: %s: found worker %s for %s",
      +                          "%s: found worker %s for %s",
                                 (*worker)->s->scheme, (*worker)->s->name, *url);
      -
                   *balancer = NULL;
      +            fix_uds_filename(r, url);
                   access_status = OK;
               }
               else if (r->proxyreq == PROXYREQ_PROXY) {
                   if (conf->forward) {
                       ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                              "proxy: *: found forward proxy worker for %s",
      -                              *url);
      +                              "*: found forward proxy worker for %s", *url);
                       *balancer = NULL;
                       *worker = conf->forward;
                       access_status = OK;
      @@ -1970,8 +1982,7 @@ PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker,
               else if (r->proxyreq == PROXYREQ_REVERSE) {
                   if (conf->reverse) {
                       ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                              "proxy: *: found reverse proxy worker for %s",
      -                              *url);
      +                              "*: using default reverse proxy worker for %s (no keepalive)", *url);
                       *balancer = NULL;
                       *worker = conf->reverse;
                       access_status = OK;
      @@ -1981,14 +1992,14 @@ PROXY_DECLARE(int) ap_proxy_pre_request(proxy_worker **worker,
                        * regarding the Connection header in the request.
                        */
                       apr_table_setn(r->subprocess_env, "proxy-nokeepalive", "1");
      +                fix_uds_filename(r, url);
                   }
               }
           }
           else if (access_status == DECLINED && *balancer != NULL) {
               /* All the workers are busy */
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "proxy: all workers are busy.  Unable to serve %s",
      -                      *url);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00934)
      +                      "all workers are busy.  Unable to serve %s", *url);
               access_status = HTTP_SERVICE_UNAVAILABLE;
           }
           return access_status;
      @@ -2027,11 +2038,9 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
               if ((rv = apr_socket_create(newsock, backend_addr->family,
                                           SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
                   loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      -            ap_log_rerror(APLOG_MARK, loglevel, rv, r,
      -                          "proxy: %s: error creating fam %d socket for target %s",
      -                          proxy_function,
      -                          backend_addr->family,
      -                          backend_name);
      +            ap_log_rerror(APLOG_MARK, loglevel, rv, r, APLOGNO(00935)
      +                          "%s: error creating fam %d socket for target %s",
      +                          proxy_function, backend_addr->family, backend_name);
                   /*
                    * this could be an IPv6 address from the DNS but the
                    * local machine won't give us an IPv6 socket; hopefully the
      @@ -2044,14 +2053,14 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
               if (conf->recv_buffer_size > 0 &&
                   (rv = apr_socket_opt_set(*newsock, APR_SO_RCVBUF,
                                            conf->recv_buffer_size))) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00936)
                                 "apr_socket_opt_set(SO_RCVBUF): Failed to set "
                                 "ProxyReceiveBufferSize, using default");
               }
       
               rv = apr_socket_opt_set(*newsock, APR_TCP_NODELAY, 1);
               if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00937)
                                 "apr_socket_opt_set(APR_TCP_NODELAY): "
                                 "Failed to set");
               }
      @@ -2065,14 +2074,21 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
               }
       
               ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r,
      -                      "proxy: %s: fam %d socket created to connect to %s",
      +                      "%s: fam %d socket created to connect to %s",
                             proxy_function, backend_addr->family, backend_name);
       
               if (conf->source_address) {
      -            rv = apr_socket_bind(*newsock, conf->source_address);
      +            apr_sockaddr_t *local_addr;
      +            /* Make a copy since apr_socket_bind() could change
      +             * conf->source_address, which we don't want.
      +             */
      +            local_addr = apr_pmemdup(r->pool, conf->source_address,
      +                                     sizeof(apr_sockaddr_t));
      +            local_addr->pool = r->pool;
      +            rv = apr_socket_bind(*newsock, local_addr);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                              "proxy: %s: failed to bind socket to local address",
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00938)
      +                              "%s: failed to bind socket to local address",
                                     proxy_function);
                   }
               }
      @@ -2084,11 +2100,9 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
               if (rv != APR_SUCCESS) {
                   apr_socket_close(*newsock);
                   loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      -            ap_log_rerror(APLOG_MARK, loglevel, rv, r,
      -                          "proxy: %s: attempt to connect to %pI (%s) failed",
      -                          proxy_function,
      -                          backend_addr,
      -                          backend_name);
      +            ap_log_rerror(APLOG_MARK, loglevel, rv, r, APLOGNO(00939)
      +                          "%s: attempt to connect to %pI (%s) failed",
      +                          proxy_function, backend_addr, backend_name);
                   backend_addr = backend_addr->next;
                   continue;
               }
      @@ -2109,8 +2123,8 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function,
               ap_proxy_retry_worker(proxy_function, worker, s);
       
               if (!PROXY_WORKER_IS_USABLE(worker)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                         "proxy: %s: disabled connection for (%s)",
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00940)
      +                         "%s: disabled connection for (%s)",
                                proxy_function, worker->s->hostname);
                   return HTTP_SERVICE_UNAVAILABLE;
               }
      @@ -2132,13 +2146,13 @@ PROXY_DECLARE(int) ap_proxy_acquire_connection(const char *proxy_function,
           }
       
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                     "proxy: %s: failed to acquire connection for (%s)",
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00941)
      +                     "%s: failed to acquire connection for (%s)",
                            proxy_function, worker->s->hostname);
               return HTTP_SERVICE_UNAVAILABLE;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "proxy: %s: has acquired connection for (%s)",
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00942)
      +                 "%s: has acquired connection for (%s)",
                        proxy_function, worker->s->hostname);
       
           (*conn)->worker = worker;
      @@ -2152,8 +2166,8 @@ PROXY_DECLARE(int) ap_proxy_release_connection(const char *proxy_function,
                                                      proxy_conn_rec *conn,
                                                      server_rec *s)
       {
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                "proxy: %s: has released connection for (%s)",
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00943)
      +                "%s: has released connection for (%s)",
                       proxy_function, conn->worker->s->hostname);
           connection_cleanup(conn);
       
      @@ -2175,6 +2189,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
           int server_port;
           apr_status_t err = APR_SUCCESS;
           apr_status_t uerr = APR_SUCCESS;
      +    const char *uds_path;
       
           /*
            * Break up the URL to determine the host to connect to
      @@ -2187,106 +2202,150 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
                                                NULL));
           }
           if (!uri->port) {
      -        uri->port = apr_uri_port_of_scheme(uri->scheme);
      +        uri->port = ap_proxy_port_of_scheme(uri->scheme);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: connecting %s to %s:%d", *url, uri->hostname,
      -                 uri->port);
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00944)
      +                 "connecting %s to %s:%d", *url, uri->hostname, uri->port);
       
           /*
            * allocate these out of the specified connection pool
            * The scheme handler decides if this is permanent or
            * short living pool.
            */
      -    /* are we connecting directly, or via a proxy? */
      -    if (!proxyname) {
      +    /* Unless we are connecting the backend via a (forward Proxy)Remote, we
      +     * have to use the original form of the URI (non absolute), but this is
      +     * also the case via a remote proxy using the CONNECT method since the
      +     * original request (and URI) is to be embedded in the body.
      +     */
      +    if (!proxyname || conn->is_ssl) {
               *url = apr_pstrcat(p, uri->path, uri->query ? "?" : "",
                                  uri->query ? uri->query : "",
                                  uri->fragment ? "#" : "",
                                  uri->fragment ? uri->fragment : "", NULL);
           }
           /*
      -     * Make sure that we pick the the correct and valid worker.
      -     * If a single keepalive connection triggers different workers,
      -     * then we have a problem (we don't select the correct one).
      -     * Do an expensive check in this case, where we compare the
      -     * the hostnames associated between the two.
      +     * Figure out if our passed in proxy_conn_rec has a usable
      +     * address cached.
            *
      -     * TODO: Handle this much better...
      +     * TODO: Handle this much better... 
      +     *
      +     * XXX: If generic workers are ever address-reusable, we need 
      +     *      to check host and port on the conn and be careful about
      +     *      spilling the cached addr from the worker.
            */
      -    if (!conn->hostname || !worker->s->is_address_reusable ||
      -         worker->s->disablereuse ||
      -         (r->connection->keepalives &&
      -         (r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) &&
      -         (strcasecmp(conn->hostname, uri->hostname) != 0) ) ) {
      -        if (proxyname) {
      -            conn->hostname = apr_pstrdup(conn->pool, proxyname);
      -            conn->port = proxyport;
      -            /*
      -             * If we have a forward proxy and the protocol is HTTPS,
      -             * then we need to prepend a HTTP CONNECT request before
      -             * sending our actual HTTPS requests.
      -             * Save our real backend data for using it later during HTTP CONNECT.
      -             */
      -            if (conn->is_ssl) {
      -                const char *proxy_auth;
      -
      -                forward_info *forward = apr_pcalloc(conn->pool, sizeof(forward_info));
      -                conn->forward = forward;
      -                forward->use_http_connect = 1;
      -                forward->target_host = apr_pstrdup(conn->pool, uri->hostname);
      -                forward->target_port = uri->port;
      -                /* Do we want to pass Proxy-Authorization along?
      -                 * If we haven't used it, then YES
      -                 * If we have used it then MAYBE: RFC2616 says we MAY propagate it.
      -                 * So let's make it configurable by env.
      -                 * The logic here is the same used in mod_proxy_http.
      -                 */
      -                proxy_auth = apr_table_get(r->headers_in, "Proxy-Authorization");
      -                if (proxy_auth != NULL &&
      -                    proxy_auth[0] != '\0' &&
      -                    r->user == NULL && /* we haven't yet authenticated */
      -                    apr_table_get(r->subprocess_env, "Proxy-Chain-Auth")) {
      -                    forward->proxy_auth = apr_pstrdup(conn->pool, proxy_auth);
      -                }
      -            }
      +    uds_path = (*worker->s->uds_path ? worker->s->uds_path : apr_table_get(r->notes, "uds_path"));
      +    if (uds_path) {
      +        if (conn->uds_path == NULL) {
      +            /* use (*conn)->pool instead of worker->cp->pool to match lifetime */
      +            conn->uds_path = apr_pstrdup(conn->pool, uds_path);
      +        }
      +        if (conn->uds_path) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02545)
      +                         "%s: has determined UDS as %s",
      +                         uri->scheme, conn->uds_path);
               }
               else {
      -            conn->hostname = apr_pstrdup(conn->pool, uri->hostname);
      -            conn->port = uri->port;
      +            /* should never happen */
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02546)
      +                         "%s: cannot determine UDS (%s)",
      +                         uri->scheme, uds_path);
      +
               }
      -        socket_cleanup(conn);
      -        err = apr_sockaddr_info_get(&(conn->addr),
      -                                    conn->hostname, APR_UNSPEC,
      -                                    conn->port, 0,
      -                                    conn->pool);
      -    }
      -    else if (!worker->cp->addr) {
      -        if ((err = PROXY_THREAD_LOCK(worker)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server,
      -                         "proxy: lock");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -
               /*
      -         * Worker can have the single constant backend adress.
      -         * The single DNS lookup is used once per worker.
      -         * If dynamic change is needed then set the addr to NULL
      -         * inside dynamic config to force the lookup.
      +         * In UDS cases, some structs are NULL. Protect from de-refs
      +         * and provide info for logging at the same time.
                */
      -        err = apr_sockaddr_info_get(&(worker->cp->addr),
      -                                    conn->hostname, APR_UNSPEC,
      -                                    conn->port, 0,
      -                                    worker->cp->pool);
      -        conn->addr = worker->cp->addr;
      -        if ((uerr = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, uerr, r->server,
      -                         "proxy: unlock");
      +        if (!conn->addr) {
      +            apr_sockaddr_t *sa;
      +            apr_sockaddr_info_get(&sa, NULL, APR_UNSPEC, 0, 0, conn->pool);
      +            conn->addr = sa;
               }
      +        conn->hostname = "httpd-UDS";
      +        conn->port = 0;
           }
           else {
      -        conn->addr = worker->cp->addr;
      +        int will_reuse = worker->s->is_address_reusable && !worker->s->disablereuse;
      +        if (!conn->hostname || !will_reuse) {
      +            if (proxyname) {
      +                conn->hostname = apr_pstrdup(conn->pool, proxyname);
      +                conn->port = proxyport;
      +                /*
      +                 * If we have a forward proxy and the protocol is HTTPS,
      +                 * then we need to prepend a HTTP CONNECT request before
      +                 * sending our actual HTTPS requests.
      +                 * Save our real backend data for using it later during HTTP CONNECT.
      +                 */
      +                if (conn->is_ssl) {
      +                    const char *proxy_auth;
      +
      +                    forward_info *forward = apr_pcalloc(conn->pool, sizeof(forward_info));
      +                    conn->forward = forward;
      +                    forward->use_http_connect = 1;
      +                    forward->target_host = apr_pstrdup(conn->pool, uri->hostname);
      +                    forward->target_port = uri->port;
      +                    /* Do we want to pass Proxy-Authorization along?
      +                     * If we haven't used it, then YES
      +                     * If we have used it then MAYBE: RFC2616 says we MAY propagate it.
      +                     * So let's make it configurable by env.
      +                     * The logic here is the same used in mod_proxy_http.
      +                     */
      +                    proxy_auth = apr_table_get(r->headers_in, "Proxy-Authorization");
      +                    if (proxy_auth != NULL &&
      +                        proxy_auth[0] != '\0' &&
      +                        r->user == NULL && /* we haven't yet authenticated */
      +                        apr_table_get(r->subprocess_env, "Proxy-Chain-Auth")) {
      +                        forward->proxy_auth = apr_pstrdup(conn->pool, proxy_auth);
      +                    }
      +                }
      +            }
      +            else {
      +                conn->hostname = apr_pstrdup(conn->pool, uri->hostname);
      +                conn->port = uri->port;
      +            }
      +            if (!will_reuse) {
      +                /*
      +                 * Only do a lookup if we should not reuse the backend address.
      +                 * Otherwise we will look it up once for the worker.
      +                 */
      +                err = apr_sockaddr_info_get(&(conn->addr),
      +                                            conn->hostname, APR_UNSPEC,
      +                                            conn->port, 0,
      +                                            conn->pool);
      +            }
      +            socket_cleanup(conn);
      +            conn->close = 0;
      +        }
      +        if (will_reuse) {
      +            /*
      +             * Looking up the backend address for the worker only makes sense if
      +             * we can reuse the address.
      +             */
      +            if (!worker->cp->addr) {
      +                if ((err = PROXY_THREAD_LOCK(worker)) != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, err, r, APLOGNO(00945) "lock");
      +                    return HTTP_INTERNAL_SERVER_ERROR;
      +                }
      +
      +                /*
      +                 * Worker can have the single constant backend address.
      +                 * The single DNS lookup is used once per worker.
      +                 * If dynamic change is needed then set the addr to NULL
      +                 * inside dynamic config to force the lookup.
      +                 */
      +                err = apr_sockaddr_info_get(&(worker->cp->addr),
      +                                            conn->hostname, APR_UNSPEC,
      +                                            conn->port, 0,
      +                                            worker->cp->pool);
      +                conn->addr = worker->cp->addr;
      +                if ((uerr = PROXY_THREAD_UNLOCK(worker)) != APR_SUCCESS) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, uerr, r, APLOGNO(00946) "unlock");
      +                }
      +            }
      +            else {
      +                conn->addr = worker->cp->addr;
      +            }
      +        }
           }
           /* Close a possible existing socket if we are told to do so */
           if (conn->close) {
      @@ -2301,24 +2360,62 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
           }
       
           /* Get the server port for the Via headers */
      -    {
      -        server_port = ap_get_server_port(r);
      -        if (ap_is_default_port(server_port, r)) {
      -            strcpy(server_portstr,"");
      -        }
      -        else {
      -            apr_snprintf(server_portstr, server_portstr_size, ":%d",
      -                         server_port);
      -        }
      +    server_port = ap_get_server_port(r);
      +    AP_DEBUG_ASSERT(server_portstr_size > 0);
      +    if (ap_is_default_port(server_port, r)) {
      +        server_portstr[0] = '\0';
      +    }
      +    else {
      +        apr_snprintf(server_portstr, server_portstr_size, ":%d",
      +                     server_port);
           }
      +
           /* check if ProxyBlock directive on this host */
      -    if (OK != ap_proxy_checkproxyblock(r, conf, conn->addr)) {
      +    if (OK != ap_proxy_checkproxyblock2(r, conf, uri->hostname, 
      +                                       proxyname ? NULL : conn->addr)) {
               return ap_proxyerror(r, HTTP_FORBIDDEN,
                                    "Connect to remote machine blocked");
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
      -                 "proxy: connected %s to %s:%d", *url, conn->hostname,
      -                 conn->port);
      +    /*
      +     * When SSL is configured, determine the hostname (SNI) for the request
      +     * and save it in conn->ssl_hostname. Close any reused connection whose
      +     * SNI differs.
      +     */
      +    if (conn->is_ssl) {
      +        proxy_dir_conf *dconf;
      +        const char *ssl_hostname;
      +        /*
      +         * In the case of ProxyPreserveHost on use the hostname of
      +         * the request if present otherwise use the one from the
      +         * backend request URI.
      +         */
      +        dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      +        if (dconf->preserve_host) {
      +            ssl_hostname = r->hostname;
      +        }
      +        else if (conn->forward
      +                 && ((forward_info *)(conn->forward))->use_http_connect) {
      +            ssl_hostname = ((forward_info *)conn->forward)->target_host;
      +        }
      +        else {
      +            ssl_hostname = conn->hostname;
      +        }
      +        /*
      +         * Close if a SNI is in use but this request requires no or
      +         * a different one, or no SNI is in use but one is required.
      +         */
      +        if ((conn->ssl_hostname && (!ssl_hostname ||
      +                                    strcasecmp(conn->ssl_hostname,
      +                                               ssl_hostname) != 0)) ||
      +                (!conn->ssl_hostname && ssl_hostname && conn->sock)) {
      +            socket_cleanup(conn);
      +        }
      +        if (conn->ssl_hostname == NULL) {
      +            conn->ssl_hostname = apr_pstrdup(conn->scpool, ssl_hostname);
      +        }
      +    }
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00947)
      +                 "connected %s to %s:%d", *url, conn->hostname, conn->port);
           return OK;
       }
       
      @@ -2329,7 +2426,7 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
       #endif
       
       #if USE_ALTERNATE_IS_CONNECTED && defined(APR_MSG_PEEK)
      -static int is_socket_connected(apr_socket_t *socket)
      +PROXY_DECLARE(int) ap_proxy_is_socket_connected(apr_socket_t *socket)
       {
           apr_pollfd_t pfds[1];
           apr_status_t status;
      @@ -2367,7 +2464,7 @@ static int is_socket_connected(apr_socket_t *socket)
       
       }
       #else
      -static int is_socket_connected(apr_socket_t *sock)
      +PROXY_DECLARE(int) ap_proxy_is_socket_connected(apr_socket_t *sock)
       
       {
           apr_size_t buffer_len = 1;
      @@ -2410,8 +2507,8 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
           forward_info *forward = (forward_info *)backend->forward;
           int len = 0;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "proxy: CONNECT: sending the CONNECT request for %s:%d "
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00948)
      +                 "CONNECT: sending the CONNECT request for %s:%d "
                        "to the remote proxy %pI (%s)",
                        forward->target_host, forward->target_port,
                        backend->addr, backend->hostname);
      @@ -2429,6 +2526,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
           nbytes += apr_snprintf(buffer + nbytes, sizeof(buffer) - nbytes,
                                  "Proxy-agent: %s" CRLF CRLF,
                                  ap_get_server_banner());
      +    ap_xlate_proto_to_ascii(buffer, nbytes);
           apr_socket_send(backend->sock, buffer, &nbytes);
       
           /* Receive the whole CONNECT response */
      @@ -2440,7 +2538,8 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
               len += nbytes;
               left -= nbytes;
               buffer[len] = '\0';
      -        if (strstr(buffer + len - nbytes, "\r\n\r\n") != NULL) {
      +        if (strstr(buffer + len - nbytes, CRLF_ASCII CRLF_ASCII) != NULL) {
      +            ap_xlate_proto_from_ascii(buffer, len);
                   complete = 1;
                   break;
               }
      @@ -2450,10 +2549,9 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
               nbytes = sizeof(drain_buffer) - 1;
               while (status == APR_SUCCESS && nbytes) {
                   status = apr_socket_recv(backend->sock, drain_buffer, &nbytes);
      -            buffer[nbytes] = '\0';
      +            drain_buffer[nbytes] = '\0';
                   nbytes = sizeof(drain_buffer) - 1;
      -            if (strstr(drain_buffer, "\r\n\r\n") != NULL) {
      -                complete = 1;
      +            if (strstr(drain_buffer, CRLF_ASCII CRLF_ASCII) != NULL) {
                       break;
                   }
               }
      @@ -2461,11 +2559,11 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
       
           /* Check for HTTP_OK response status */
           if (status == APR_SUCCESS) {
      -        int major, minor;
      +        unsigned int major, minor;
               /* Only scan for three character status code */
               char code_str[4];
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00949)
                            "send_http_connect: response from the forward proxy: %s",
                            buffer);
       
      @@ -2476,10 +2574,10 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
                       status = APR_SUCCESS;
                   }
                   else {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00950)
                                    "send_http_connect: the forward proxy returned code is '%s'",
                                    code_str);
      -            status = APR_INCOMPLETE;
      +                status = APR_INCOMPLETE;
                   }
               }
           }
      @@ -2488,13 +2586,155 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
       }
       
       
      +/* TODO: In APR 2.x: Extend apr_sockaddr_t to possibly be a path !!! */
      +PROXY_DECLARE(apr_status_t) ap_proxy_connect_uds(apr_socket_t *sock,
      +                                                 const char *uds_path,
      +                                                 apr_pool_t *p)
      +{
      +#if APR_HAVE_SYS_UN_H
      +    apr_status_t rv;
      +    apr_os_sock_t rawsock;
      +    apr_interval_time_t t;
      +    struct sockaddr_un *sa;
      +    apr_socklen_t addrlen, pathlen;
      +
      +    rv = apr_os_sock_get(&rawsock, sock);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    rv = apr_socket_timeout_get(sock, &t);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    pathlen = strlen(uds_path);
      +    /* copy the UDS path (including NUL) to the sockaddr_un */
      +    addrlen = APR_OFFSETOF(struct sockaddr_un, sun_path) + pathlen;
      +    sa = (struct sockaddr_un *)apr_palloc(p, addrlen + 1);
      +    memcpy(sa->sun_path, uds_path, pathlen + 1);
      +    sa->sun_family = AF_UNIX;
      +
      +    do {
      +        rv = connect(rawsock, (struct sockaddr*)sa, addrlen);
      +    } while (rv == -1 && (rv = errno) == EINTR);
      +
      +    if (rv && rv != EISCONN) {
      +        if ((rv == EINPROGRESS || rv == EALREADY) && (t > 0))  {
      +#if APR_MAJOR_VERSION < 2
      +            rv = apr_wait_for_io_or_timeout(NULL, sock, 0);
      +#else
      +            rv = apr_socket_wait(sock, APR_WAIT_WRITE);
      +#endif
      +        }
      +        if (rv != APR_SUCCESS) {
      +            return rv;
      +        }
      +    }
      +
      +    return APR_SUCCESS;
      +#else
      +    return APR_ENOTIMPL;
      +#endif
      +}
      +
      +PROXY_DECLARE(apr_status_t) ap_proxy_check_connection(const char *scheme,
      +                                                      proxy_conn_rec *conn,
      +                                                      server_rec *server,
      +                                                      unsigned max_blank_lines,
      +                                                      int flags)
      +{
      +    apr_status_t rv = APR_SUCCESS;
      +    proxy_worker *worker = conn->worker;
      +
      +    if (!PROXY_WORKER_IS_USABLE(worker)) {
      +        /*
      +         * The worker is in error likely done by a different thread / process
      +         * e.g. for a timeout or bad status. We should respect this and should
      +         * not continue with a connection via this worker even if we got one.
      +         */
      +        rv = APR_EINVAL;
      +    }
      +    else if (conn->connection) {
      +        /* We have a conn_rec, check the full filter stack for things like
      +         * SSL alert/shutdown, filters aside data...
      +         */
      +        rv = ap_check_pipeline(conn->connection, conn->tmp_bb,
      +                               max_blank_lines);
      +        apr_brigade_cleanup(conn->tmp_bb);
      +        if (rv == APR_SUCCESS) {
      +            /* Some data available, the caller might not want them. */
      +            if (flags & PROXY_CHECK_CONN_EMPTY) {
      +                rv = APR_ENOTEMPTY;
      +            }
      +        }
      +        else if (APR_STATUS_IS_EAGAIN(rv)) {
      +            /* Filter chain is OK and empty, yet we can't determine from
      +             * ap_check_pipeline (actually ap_core_input_filter) whether
      +             * an empty non-blocking read is EAGAIN or EOF on the socket
      +             * side (it's always SUCCESS), so check it explicitely here.
      +             */
      +            if (ap_proxy_is_socket_connected(conn->sock)) {
      +                rv = APR_SUCCESS;
      +            }
      +            else {
      +                rv = APR_EPIPE;
      +            }
      +        }
      +    }
      +    else if (conn->sock) {
      +        /* For modules working with sockets directly, check it. */
      +        if (!ap_proxy_is_socket_connected(conn->sock)) {
      +            rv = APR_EPIPE;
      +        }
      +    }
      +    else {
      +        rv = APR_ENOSOCKET;
      +    }
      +
      +    if (rv == APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, server,
      +                     "%s: reusing backend connection %pI<>%pI",
      +                     scheme, conn->connection->local_addr,
      +                     conn->connection->client_addr);
      +    }
      +    else if (conn->sock) {
      +        /* This clears conn->scpool (and associated data), so backup and
      +         * restore any ssl_hostname for this connection set earlier by
      +         * ap_proxy_determine_connection().
      +         */
      +        char ssl_hostname[PROXY_WORKER_RFC1035_NAME_SIZE];
      +        if (rv == APR_EINVAL
      +                || !conn->ssl_hostname
      +                || PROXY_STRNCPY(ssl_hostname, conn->ssl_hostname)) {
      +            ssl_hostname[0] = '\0';
      +        }
      +
      +        socket_cleanup(conn);
      +        if (rv != APR_ENOTEMPTY) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, APLOGNO(00951)
      +                         "%s: backend socket is disconnected.", scheme);
      +        }
      +        else {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, server, APLOGNO(03408)
      +                         "%s: reusable backend connection is not empty: "
      +                         "forcibly closed", scheme);
      +        }
      +
      +        if (ssl_hostname[0]) {
      +            conn->ssl_hostname = apr_pstrdup(conn->scpool, ssl_hostname);
      +        }
      +    }
      +
      +    return rv;
      +}
      +
       PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
                                                   proxy_conn_rec *conn,
                                                   proxy_worker *worker,
                                                   server_rec *s)
       {
           apr_status_t rv;
      -    int connected = 0;
           int loglevel;
           apr_sockaddr_t *backend_addr = conn->addr;
           /* the local address to use for the outgoing connection */
      @@ -2504,101 +2744,144 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
           proxy_server_conf *conf =
               (proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
       
      -    if (conn->sock) {
      -        if (!(connected = is_socket_connected(conn->sock))) {
      -            socket_cleanup(conn);
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                         "proxy: %s: backend socket is disconnected.",
      -                         proxy_function);
      -        }
      +    rv = ap_proxy_check_connection(proxy_function, conn, s, 0, 0);
      +    if (rv == APR_EINVAL) {
      +        return DECLINED;
           }
      -    while (backend_addr && !connected) {
      -        if ((rv = apr_socket_create(&newsock, backend_addr->family,
      -                                SOCK_STREAM, APR_PROTO_TCP,
      -                                conn->scpool)) != APR_SUCCESS) {
      -            loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      -            ap_log_error(APLOG_MARK, loglevel, rv, s,
      -                         "proxy: %s: error creating fam %d socket for target %s",
      +
      +    while (rv != APR_SUCCESS && (backend_addr || conn->uds_path)) {
      +#if APR_HAVE_SYS_UN_H
      +        if (conn->uds_path)
      +        {
      +            rv = apr_socket_create(&newsock, AF_UNIX, SOCK_STREAM, 0,
      +                                   conn->scpool);
      +            if (rv != APR_SUCCESS) {
      +                loglevel = APLOG_ERR;
      +                ap_log_error(APLOG_MARK, loglevel, rv, s, APLOGNO(02453)
      +                             "%s: error creating Unix domain socket for "
      +                             "target %s",
      +                             proxy_function,
      +                             worker->s->hostname);
      +                break;
      +            }
      +            conn->connection = NULL;
      +
      +            rv = ap_proxy_connect_uds(newsock, conn->uds_path, conn->scpool);
      +            if (rv != APR_SUCCESS) {
      +                apr_socket_close(newsock);
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02454)
      +                             "%s: attempt to connect to Unix domain socket "
      +                             "%s (%s) failed",
      +                             proxy_function,
      +                             conn->uds_path,
      +                             worker->s->hostname);
      +                break;
      +            }
      +
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02823)
      +                         "%s: connection established with Unix domain socket "
      +                         "%s (%s)",
                                proxy_function,
      -                         backend_addr->family,
      +                         conn->uds_path,
                                worker->s->hostname);
      -            /*
      -             * this could be an IPv6 address from the DNS but the
      -             * local machine won't give us an IPv6 socket; hopefully the
      -             * DNS returned an additional address to try
      -             */
      -            backend_addr = backend_addr->next;
      -            continue;
      -        }
      -        conn->connection = NULL;
      -
      -        if (worker->s->recv_buffer_size > 0 &&
      -            (rv = apr_socket_opt_set(newsock, APR_SO_RCVBUF,
      -                                     worker->s->recv_buffer_size))) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                         "apr_socket_opt_set(SO_RCVBUF): Failed to set "
      -                         "ProxyReceiveBufferSize, using default");
               }
      +        else
      +#endif
      +        {
      +            if ((rv = apr_socket_create(&newsock, backend_addr->family,
      +                                        SOCK_STREAM, APR_PROTO_TCP,
      +                                        conn->scpool)) != APR_SUCCESS) {
      +                loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      +                ap_log_error(APLOG_MARK, loglevel, rv, s, APLOGNO(00952)
      +                             "%s: error creating fam %d socket for "
      +                             "target %s",
      +                             proxy_function,
      +                             backend_addr->family,
      +                             worker->s->hostname);
      +                /*
      +                 * this could be an IPv6 address from the DNS but the
      +                 * local machine won't give us an IPv6 socket; hopefully the
      +                 * DNS returned an additional address to try
      +                 */
      +                backend_addr = backend_addr->next;
      +                continue;
      +            }
      +            conn->connection = NULL;
      +
      +            if (worker->s->recv_buffer_size > 0 &&
      +                (rv = apr_socket_opt_set(newsock, APR_SO_RCVBUF,
      +                                         worker->s->recv_buffer_size))) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00953)
      +                             "apr_socket_opt_set(SO_RCVBUF): Failed to set "
      +                             "ProxyReceiveBufferSize, using default");
      +            }
       
      -        rv = apr_socket_opt_set(newsock, APR_TCP_NODELAY, 1);
      -        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      -             ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                          "apr_socket_opt_set(APR_TCP_NODELAY): "
      -                          "Failed to set");
      -        }
      +            rv = apr_socket_opt_set(newsock, APR_TCP_NODELAY, 1);
      +            if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00954)
      +                             "apr_socket_opt_set(APR_TCP_NODELAY): "
      +                             "Failed to set");
      +            }
       
      -        /* Set a timeout for connecting to the backend on the socket */
      -        if (worker->s->conn_timeout_set) {
      -            apr_socket_timeout_set(newsock, worker->s->conn_timeout);
      -        }
      -        else if (worker->s->timeout_set) {
      -            apr_socket_timeout_set(newsock, worker->s->timeout);
      -        }
      -        else if (conf->timeout_set) {
      -            apr_socket_timeout_set(newsock, conf->timeout);
      -        }
      -        else {
      -             apr_socket_timeout_set(newsock, s->timeout);
      -        }
      -        /* Set a keepalive option */
      -        if (worker->s->keepalive) {
      -            if ((rv = apr_socket_opt_set(newsock,
      -                            APR_SO_KEEPALIVE, 1)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                             "apr_socket_opt_set(SO_KEEPALIVE): Failed to set"
      -                             " Keepalive");
      +            /* Set a timeout for connecting to the backend on the socket */
      +            if (worker->s->conn_timeout_set) {
      +                apr_socket_timeout_set(newsock, worker->s->conn_timeout);
      +            }
      +            else if (worker->s->timeout_set) {
      +                apr_socket_timeout_set(newsock, worker->s->timeout);
      +            }
      +            else if (conf->timeout_set) {
      +                apr_socket_timeout_set(newsock, conf->timeout);
      +            }
      +            else {
      +                apr_socket_timeout_set(newsock, s->timeout);
      +            }
      +            /* Set a keepalive option */
      +            if (worker->s->keepalive) {
      +                if ((rv = apr_socket_opt_set(newsock,
      +                                             APR_SO_KEEPALIVE, 1)) != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00955)
      +                                 "apr_socket_opt_set(SO_KEEPALIVE): Failed to set"
      +                                 " Keepalive");
      +                }
      +            }
      +            ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
      +                         "%s: fam %d socket created to connect to %s",
      +                         proxy_function, backend_addr->family, worker->s->hostname);
      +
      +            if (conf->source_address_set) {
      +                local_addr = apr_pmemdup(conn->scpool, conf->source_address,
      +                                         sizeof(apr_sockaddr_t));
      +                local_addr->pool = conn->scpool;
      +                rv = apr_socket_bind(newsock, local_addr);
      +                if (rv != APR_SUCCESS) {
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(00956)
      +                                 "%s: failed to bind socket to local address",
      +                                 proxy_function);
      +                }
                   }
      -        }
      -        ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
      -                     "proxy: %s: fam %d socket created to connect to %s",
      -                     proxy_function, backend_addr->family, worker->s->hostname);
       
      -        if (conf->source_address_set) {
      -            local_addr = apr_pmemdup(conn->pool, conf->source_address,
      -                                     sizeof(apr_sockaddr_t));
      -            local_addr->pool = conn->pool;
      -            rv = apr_socket_bind(newsock, local_addr);
      +            /* make the connection out of the socket */
      +            rv = apr_socket_connect(newsock, backend_addr);
      +
      +            /* if an error occurred, loop round and try again */
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      -                    "proxy: %s: failed to bind socket to local address",
      -                    proxy_function);
      +                apr_socket_close(newsock);
      +                loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      +                ap_log_error(APLOG_MARK, loglevel, rv, s, APLOGNO(00957)
      +                             "%s: attempt to connect to %pI (%s) failed",
      +                             proxy_function,
      +                             backend_addr,
      +                             worker->s->hostname);
      +                backend_addr = backend_addr->next;
      +                continue;
                   }
      -        }
      -
      -        /* make the connection out of the socket */
      -        rv = apr_socket_connect(newsock, backend_addr);
       
      -        /* if an error occurred, loop round and try again */
      -        if (rv != APR_SUCCESS) {
      -            apr_socket_close(newsock);
      -            loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      -            ap_log_error(APLOG_MARK, loglevel, rv, s,
      -                         "proxy: %s: attempt to connect to %pI (%s) failed",
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02824)
      +                         "%s: connection established with %pI (%s)",
                                proxy_function,
                                backend_addr,
                                worker->s->hostname);
      -            backend_addr = backend_addr->next;
      -            continue;
               }
       
               /* Set a timeout on the socket */
      @@ -2614,7 +2897,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
       
               conn->sock = newsock;
       
      -        if (conn->forward) {
      +        if (!conn->uds_path && conn->forward) {
                   forward_info *forward = (forward_info *)conn->forward;
                   /*
                    * For HTTP CONNECT we need to prepend CONNECT request before
      @@ -2627,8 +2910,8 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
                           conn->sock = NULL;
                           apr_socket_close(newsock);
                           loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
      -                    ap_log_error(APLOG_MARK, loglevel, rv, s,
      -                                 "proxy: %s: attempt to connect to %s:%d "
      +                    ap_log_error(APLOG_MARK, loglevel, rv, s, APLOGNO(00958)
      +                                 "%s: attempt to connect to %s:%d "
                                        "via http CONNECT through %pI (%s) failed",
                                        proxy_function,
                                        forward->target_host, forward->target_port,
      @@ -2638,38 +2921,79 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
                       }
                   }
               }
      -
      -        connected    = 1;
           }
      -    /*
      -     * Put the entire worker to error state if
      -     * the PROXY_WORKER_IGNORE_ERRORS flag is not set.
      -     * Altrough some connections may be alive
      -     * no further connections to the worker could be made
      -     */
      -    if (!connected && PROXY_WORKER_IS_USABLE(worker) &&
      -        !(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
      -        worker->s->error_time = apr_time_now();
      -        worker->s->status |= PROXY_WORKER_IN_ERROR;
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -            "ap_proxy_connect_backend disabling worker for (%s) for %"
      -            APR_TIME_T_FMT "s",
      -            worker->s->hostname, apr_time_sec(worker->s->retry));
      +
      +    if (PROXY_WORKER_IS_USABLE(worker)) {
      +        /*
      +         * Put the entire worker to error state if
      +         * the PROXY_WORKER_IGNORE_ERRORS flag is not set.
      +         * Although some connections may be alive
      +         * no further connections to the worker could be made
      +         */
      +        if (rv != APR_SUCCESS) {
      +            if (!(worker->s->status & PROXY_WORKER_IGNORE_ERRORS)) {
      +                worker->s->error_time = apr_time_now();
      +                worker->s->status |= PROXY_WORKER_IN_ERROR;
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00959)
      +                    "ap_proxy_connect_backend disabling worker for (%s) for %"
      +                    APR_TIME_T_FMT "s",
      +                    worker->s->hostname, apr_time_sec(worker->s->retry));
      +            }
      +        }
      +        else {
      +            if (worker->s->retries) {
      +                /*
      +                 * A worker came back. So here is where we need to
      +                 * either reset all params to initial conditions or
      +                 * apply some sort of aging
      +                 */
      +            }
      +            worker->s->error_time = 0;
      +            worker->s->retries = 0;
      +        }
           }
           else {
      -        if (worker->s->retries) {
      -            /*
      -             * A worker came back. So here is where we need to
      -             * either reset all params to initial conditions or
      -             * apply some sort of aging
      -             */
      +        /*
      +         * The worker is in error likely done by a different thread / process
      +         * e.g. for a timeout or bad status. We should respect this and should
      +         * not continue with a connection via this worker even if we got one.
      +         */
      +        if (rv == APR_SUCCESS) {
      +            socket_cleanup(conn);
               }
      -        worker->s->error_time = 0;
      -        worker->s->retries = 0;
      +        rv = APR_EINVAL;
           }
      -    return connected ? OK : DECLINED;
      +
      +    return rv == APR_SUCCESS ? OK : DECLINED;
       }
       
      +static apr_status_t connection_shutdown(void *theconn)
      +{
      +    proxy_conn_rec *conn = (proxy_conn_rec *)theconn;
      +    conn_rec *c = conn->connection;
      +    if (c) {
      +        if (!c->aborted) {
      +            apr_interval_time_t saved_timeout = 0;
      +            apr_socket_timeout_get(conn->sock, &saved_timeout);
      +            if (saved_timeout) {
      +                apr_socket_timeout_set(conn->sock, 0);
      +            }
      +
      +            (void)ap_shutdown_conn(c, 0);
      +            c->aborted = 1;
      +
      +            if (saved_timeout) {
      +                apr_socket_timeout_set(conn->sock, saved_timeout);
      +            }
      +        }
      +
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02642)
      +                      "proxy: connection shutdown");
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +
       PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
                                                     proxy_conn_rec *conn,
                                                     conn_rec *c,
      @@ -2685,6 +3009,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
           }
       
           bucket_alloc = apr_bucket_alloc_create(conn->scpool);
      +    conn->tmp_bb = apr_brigade_create(conn->scpool, bucket_alloc);
           /*
            * The socket is now open, create a new backend server connection
            */
      @@ -2698,7 +3023,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
                * closed the socket
                */
               ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      -                     s, "proxy: %s: an error occurred creating a "
      +                     s, APLOGNO(00960) "%s: an error occurred creating a "
                            "new connection to %pI (%s)", proxy_function,
                            backend_addr, conn->hostname);
               /* XXX: Will be closed when proxy_conn is closed */
      @@ -2710,7 +3035,7 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
           if (conn->is_ssl) {
               if (!ap_proxy_ssl_enable(conn->connection)) {
                   ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      -                         s, "proxy: %s: failed to enable ssl support "
      +                         s, APLOGNO(00961) "%s: failed to enable ssl support "
                                "for %pI (%s)", proxy_function,
                                backend_addr, conn->hostname);
                   return HTTP_INTERNAL_SERVER_ERROR;
      @@ -2721,8 +3046,8 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
               ap_proxy_ssl_disable(conn->connection);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "proxy: %s: connection complete to %pI (%s)",
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00962)
      +                 "%s: connection complete to %pI (%s)",
                        proxy_function, backend_addr, conn->hostname);
       
           /*
      @@ -2735,13 +3060,18 @@ PROXY_DECLARE(int) ap_proxy_connection_create(const char *proxy_function,
           rc = ap_run_pre_connection(conn->connection, conn->sock);
           if (rc != OK && rc != DONE) {
               conn->connection->aborted = 1;
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "proxy: %s: pre_connection setup failed (%d)",
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00963)
      +                     "%s: pre_connection setup failed (%d)",
                            proxy_function, rc);
               return rc;
           }
           apr_socket_timeout_set(conn->sock, current_timeout);
       
      +    /* Shutdown the connection before closing it (eg. SSL connections
      +     * need to be close-notify-ed).
      +     */
      +    apr_pool_pre_cleanup_register(conn->scpool, conn, connection_shutdown);
      +
           return OK;
       }
       
      @@ -2777,57 +3107,6 @@ PROXY_DECLARE(void) ap_proxy_backend_broke(request_rec *r,
           APR_BRIGADE_INSERT_TAIL(brigade, e);
       }
       
      -/*
      - * Transform buckets from one bucket allocator to another one by creating a
      - * transient bucket for each data bucket and let it use the data read from
      - * the old bucket. Metabuckets are transformed by just recreating them.
      - * Attention: Currently only the following bucket types are handled:
      - *
      - * All data buckets
      - * FLUSH
      - * EOS
      - *
      - * If an other bucket type is found its type is logged as a debug message
      - * and APR_EGENERAL is returned.
      - */
      -PROXY_DECLARE(apr_status_t)
      -ap_proxy_buckets_lifetime_transform(request_rec *r, apr_bucket_brigade *from,
      -                                    apr_bucket_brigade *to)
      -{
      -    apr_bucket *e;
      -    apr_bucket *new;
      -    const char *data;
      -    apr_size_t bytes;
      -    apr_status_t rv = APR_SUCCESS;
      -
      -    apr_brigade_cleanup(to);
      -    for (e = APR_BRIGADE_FIRST(from);
      -         e != APR_BRIGADE_SENTINEL(from);
      -         e = APR_BUCKET_NEXT(e)) {
      -        if (!APR_BUCKET_IS_METADATA(e)) {
      -            apr_bucket_read(e, &data, &bytes, APR_BLOCK_READ);
      -            new = apr_bucket_transient_create(data, bytes, r->connection->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(to, new);
      -        }
      -        else if (APR_BUCKET_IS_FLUSH(e)) {
      -            new = apr_bucket_flush_create(r->connection->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(to, new);
      -        }
      -        else if (APR_BUCKET_IS_EOS(e)) {
      -            new = apr_bucket_eos_create(r->connection->bucket_alloc);
      -            APR_BRIGADE_INSERT_TAIL(to, new);
      -        }
      -        else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                          "proxy: Unhandled bucket type of type %s in"
      -                          " ap_proxy_buckets_lifetime_transform", e->type->name);
      -            apr_bucket_delete(e);
      -            rv = APR_EGENERAL;
      -        }
      -    }
      -    return rv;
      -}
      -
       /*
        * Provide a string hashing function for the proxy.
        * We offer 2 methods: one is the APR model but we
      @@ -2866,7 +3145,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_set_wstatus(char c, int set, proxy_worker *
       {
           unsigned int *status = &w->s->status;
           char flag = toupper(c);
      -    struct wstat *pwt = wstat_tbl;
      +    proxy_wstat_t *pwt = proxy_wstat_tbl;
           while (pwt->bit) {
               if (flag == pwt->flag) {
                   if (set)
      @@ -2884,12 +3163,15 @@ PROXY_DECLARE(char *) ap_proxy_parse_wstatus(apr_pool_t *p, proxy_worker *w)
       {
           char *ret = "";
           unsigned int status = w->s->status;
      -    struct wstat *pwt = wstat_tbl;
      +    proxy_wstat_t *pwt = proxy_wstat_tbl;
           while (pwt->bit) {
               if (status & pwt->bit)
                   ret = apr_pstrcat(p, ret, pwt->name, NULL);
               pwt++;
           }
      +    if (!*ret) {
      +        ret = "??? ";
      +    }
           if (PROXY_WORKER_IS_USABLE(w))
               ret = apr_pstrcat(p, ret, "Ok ", NULL);
           return ret;
      @@ -2911,7 +3193,12 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec
           lbmethod = ap_lookup_provider(PROXY_LBMETHOD, b->s->lbpname, "0");
           if (lbmethod) {
               b->lbmethod = lbmethod;
      +    } else {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s, APLOGNO(02433)
      +                     "Cannot find LB Method: %s", b->s->lbpname);
      +        return APR_EINVAL;
           }
      +
           /* worker sync */
       
           /*
      @@ -2924,38 +3211,47 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec
           for (index = 0; index < b->max_workers; index++) {
               int found;
               apr_status_t rv;
      -        if ((rv = storage->dptr(b->slot, (unsigned int)index, (void *)&shm)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_dptr failed");
      +        if ((rv = storage->dptr(b->wslot, (unsigned int)index, (void *)&shm)) != APR_SUCCESS) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(00965) "worker slotmem_dptr failed");
                   return APR_EGENERAL;
               }
               /* account for possible "holes" in the slotmem
                * (eg: slots 0-2 are used, but 3 isn't, but 4-5 is)
                */
      -        if (!shm->hash)
      +        if (!shm->hash.def || !shm->hash.fnv)
                   continue;
               found = 0;
               workers = (proxy_worker **)b->workers->elts;
               for (i = 0; i < b->workers->nelts; i++, workers++) {
                   proxy_worker *worker = *workers;
      -            if (worker->hash == shm->hash) {
      +            if (worker->hash.def == shm->hash.def && worker->hash.fnv == shm->hash.fnv) {
                       found = 1;
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02402)
      +                             "re-grabbing shm[%d] (0x%pp) for worker: %s", i, (void *)shm,
      +                             ap_proxy_worker_name(conf->pool, worker));
                       break;
                   }
               }
               if (!found) {
                   proxy_worker **runtime;
      +            apr_global_mutex_lock(proxy_mutex);
                   runtime = apr_array_push(b->workers);
                   *runtime = apr_palloc(conf->pool, sizeof(proxy_worker));
      +            apr_global_mutex_unlock(proxy_mutex);
                   (*runtime)->hash = shm->hash;
                   (*runtime)->context = NULL;
                   (*runtime)->cp = NULL;
                   (*runtime)->balancer = b;
                   (*runtime)->s = shm;
                   (*runtime)->tmutex = NULL;
      -            if ((rv = ap_proxy_initialize_worker(*runtime, s, conf->pool)) != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "Cannot init worker");
      +            rv = ap_proxy_initialize_worker(*runtime, s, conf->pool);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(00966) "Cannot init worker");
                       return rv;
                   }
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02403)
      +                         "grabbing shm[%d] (0x%pp) for worker: %s", i, (void *)shm,
      +                         (*runtime)->s->name);
               }
           }
           if (b->s->need_reset) {
      @@ -2967,3 +3263,602 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec
           return APR_SUCCESS;
       }
       
      +PROXY_DECLARE(proxy_worker_shared *) ap_proxy_find_workershm(ap_slotmem_provider_t *storage,
      +                                                               ap_slotmem_instance_t *slot,
      +                                                               proxy_worker *worker,
      +                                                               unsigned int *index)
      +{
      +    proxy_worker_shared *shm;
      +    unsigned int i, limit;
      +    limit = storage->num_slots(slot);
      +    for (i = 0; i < limit; i++) {
      +        if (storage->dptr(slot, i, (void *)&shm) != APR_SUCCESS) {
      +            return NULL;
      +        }
      +        if ((worker->s->hash.def == shm->hash.def) &&
      +            (worker->s->hash.fnv == shm->hash.fnv)) {
      +            *index = i;
      +            return shm;
      +        }
      +    }
      +    return NULL;
      +}
      +
      +PROXY_DECLARE(proxy_balancer_shared *) ap_proxy_find_balancershm(ap_slotmem_provider_t *storage,
      +                                                                 ap_slotmem_instance_t *slot,
      +                                                                 proxy_balancer *balancer,
      +                                                                 unsigned int *index)
      +{
      +    proxy_balancer_shared *shm;
      +    unsigned int i, limit;
      +    limit = storage->num_slots(slot);
      +    for (i = 0; i < limit; i++) {
      +        if (storage->dptr(slot, i, (void *)&shm) != APR_SUCCESS) {
      +            return NULL;
      +        }
      +        if ((balancer->s->hash.def == shm->hash.def) &&
      +            (balancer->s->hash.fnv == shm->hash.fnv)) {
      +            *index = i;
      +            return shm;
      +        }
      +    }
      +    return NULL;
      +}
      +
      +typedef struct header_connection {
      +    apr_pool_t *pool;
      +    apr_array_header_t *array;
      +    const char *first;
      +    unsigned int closed:1;
      +} header_connection;
      +
      +static int find_conn_headers(void *data, const char *key, const char *val)
      +{
      +    header_connection *x = data;
      +    const char *name;
      +
      +    do {
      +        while (*val == ',' || *val == ';') {
      +            val++;
      +        }
      +        name = ap_get_token(x->pool, &val, 0);
      +        if (!strcasecmp(name, "close")) {
      +            x->closed = 1;
      +        }
      +        if (!x->first) {
      +            x->first = name;
      +        }
      +        else {
      +            const char **elt;
      +            if (!x->array) {
      +                x->array = apr_array_make(x->pool, 4, sizeof(char *));
      +            }
      +            elt = apr_array_push(x->array);
      +            *elt = name;
      +        }
      +    } while (*val);
      +
      +    return 1;
      +}
      +
      +/**
      + * Remove all headers referred to by the Connection header.
      + */
      +static int ap_proxy_clear_connection(request_rec *r, apr_table_t *headers)
      +{
      +    const char **name;
      +    header_connection x;
      +
      +    x.pool = r->pool;
      +    x.array = NULL;
      +    x.first = NULL;
      +    x.closed = 0;
      +
      +    apr_table_unset(headers, "Proxy-Connection");
      +
      +    apr_table_do(find_conn_headers, &x, headers, "Connection", NULL);
      +    if (x.first) {
      +        /* fast path - no memory allocated for one header */
      +        apr_table_unset(headers, "Connection");
      +        apr_table_unset(headers, x.first);
      +    }
      +    if (x.array) {
      +        /* two or more headers */
      +        while ((name = apr_array_pop(x.array))) {
      +            apr_table_unset(headers, *name);
      +        }
      +    }
      +
      +    return x.closed;
      +}
      +
      +PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
      +                                            apr_bucket_brigade *header_brigade,
      +                                            request_rec *r,
      +                                            proxy_conn_rec *p_conn,
      +                                            proxy_worker *worker,
      +                                            proxy_server_conf *conf,
      +                                            apr_uri_t *uri,
      +                                            char *url, char *server_portstr,
      +                                            char **old_cl_val,
      +                                            char **old_te_val)
      +{
      +    conn_rec *c = r->connection;
      +    int counter;
      +    char *buf;
      +    const apr_array_header_t *headers_in_array;
      +    const apr_table_entry_t *headers_in;
      +    apr_table_t *saved_headers_in;
      +    apr_bucket *e;
      +    int do_100_continue;
      +    conn_rec *origin = p_conn->connection;
      +    proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
      +
      +    /*
      +     * To be compliant, we only use 100-Continue for requests with bodies.
      +     * We also make sure we won't be talking HTTP/1.0 as well.
      +     */
      +    do_100_continue = (worker->s->ping_timeout_set
      +                       && ap_request_has_body(r)
      +                       && (PROXYREQ_REVERSE == r->proxyreq)
      +                       && !(apr_table_get(r->subprocess_env, "force-proxy-request-1.0")));
      +
      +    if (apr_table_get(r->subprocess_env, "force-proxy-request-1.0")) {
      +        /*
      +         * According to RFC 2616 8.2.3 we are not allowed to forward an
      +         * Expect: 100-continue to an HTTP/1.0 server. Instead we MUST return
      +         * a HTTP_EXPECTATION_FAILED
      +         */
      +        if (r->expecting_100) {
      +            return HTTP_EXPECTATION_FAILED;
      +        }
      +        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.0" CRLF, NULL);
      +        p_conn->close = 1;
      +    } else {
      +        buf = apr_pstrcat(p, r->method, " ", url, " HTTP/1.1" CRLF, NULL);
      +    }
      +    if (apr_table_get(r->subprocess_env, "proxy-nokeepalive")) {
      +        origin->keepalive = AP_CONN_CLOSE;
      +        p_conn->close = 1;
      +    }
      +    ap_xlate_proto_to_ascii(buf, strlen(buf));
      +    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      +    if (dconf->preserve_host == 0) {
      +        if (ap_strchr_c(uri->hostname, ':')) { /* if literal IPv6 address */
      +            if (uri->port_str && uri->port != DEFAULT_HTTP_PORT) {
      +                buf = apr_pstrcat(p, "Host: [", uri->hostname, "]:",
      +                                  uri->port_str, CRLF, NULL);
      +            } else {
      +                buf = apr_pstrcat(p, "Host: [", uri->hostname, "]", CRLF, NULL);
      +            }
      +        } else {
      +            if (uri->port_str && uri->port != DEFAULT_HTTP_PORT) {
      +                buf = apr_pstrcat(p, "Host: ", uri->hostname, ":",
      +                                  uri->port_str, CRLF, NULL);
      +            } else {
      +                buf = apr_pstrcat(p, "Host: ", uri->hostname, CRLF, NULL);
      +            }
      +        }
      +    }
      +    else {
      +        /* don't want to use r->hostname, as the incoming header might have a
      +         * port attached
      +         */
      +        const char* hostname = apr_table_get(r->headers_in,"Host");
      +        if (!hostname) {
      +            hostname =  r->server->server_hostname;
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01092)
      +                          "no HTTP 0.9 request (with no host line) "
      +                          "on incoming request and preserve host set "
      +                          "forcing hostname to be %s for uri %s",
      +                          hostname, r->uri);
      +        }
      +        buf = apr_pstrcat(p, "Host: ", hostname, CRLF, NULL);
      +    }
      +    ap_xlate_proto_to_ascii(buf, strlen(buf));
      +    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      +
      +    /*
      +     * Save the original headers in here and restore them when leaving, since
      +     * we will apply proxy purpose only modifications (eg. clearing hop-by-hop
      +     * headers, add Via or X-Forwarded-* or Expect...), whereas the originals
      +     * will be needed later to prepare the correct response and logging.
      +     *
      +     * Note: We need to take r->pool for apr_table_copy as the key / value
      +     * pairs in r->headers_in have been created out of r->pool and
      +     * p might be (and actually is) a longer living pool.
      +     * This would trigger the bad pool ancestry abort in apr_table_copy if
      +     * apr is compiled with APR_POOL_DEBUG.
      +     */
      +    saved_headers_in = r->headers_in;
      +    r->headers_in = apr_table_copy(r->pool, saved_headers_in);
      +
      +    /* handle Via */
      +    if (conf->viaopt == via_block) {
      +        /* Block all outgoing Via: headers */
      +        apr_table_unset(r->headers_in, "Via");
      +    } else if (conf->viaopt != via_off) {
      +        const char *server_name = ap_get_server_name(r);
      +        /* If USE_CANONICAL_NAME_OFF was configured for the proxy virtual host,
      +         * then the server name returned by ap_get_server_name() is the
      +         * origin server name (which does make too much sense with Via: headers)
      +         * so we use the proxy vhost's name instead.
      +         */
      +        if (server_name == r->hostname)
      +            server_name = r->server->server_hostname;
      +        /* Create a "Via:" request header entry and merge it */
      +        /* Generate outgoing Via: header with/without server comment: */
      +        apr_table_mergen(r->headers_in, "Via",
      +                         (conf->viaopt == via_full)
      +                         ? apr_psprintf(p, "%d.%d %s%s (%s)",
      +                                        HTTP_VERSION_MAJOR(r->proto_num),
      +                                        HTTP_VERSION_MINOR(r->proto_num),
      +                                        server_name, server_portstr,
      +                                        AP_SERVER_BASEVERSION)
      +                         : apr_psprintf(p, "%d.%d %s%s",
      +                                        HTTP_VERSION_MAJOR(r->proto_num),
      +                                        HTTP_VERSION_MINOR(r->proto_num),
      +                                        server_name, server_portstr)
      +                         );
      +    }
      +
      +    /* Use HTTP/1.1 100-Continue as quick "HTTP ping" test
      +     * to backend
      +     */
      +    if (do_100_continue) {
      +        const char *val;
      +
      +        if (!r->expecting_100) {
      +            /* Don't forward any "100 Continue" response if the client is
      +             * not expecting it.
      +             */
      +            apr_table_setn(r->subprocess_env, "proxy-interim-response",
      +                                              "Suppress");
      +        }
      +
      +        /* Add the Expect header if not already there. */
      +        if (((val = apr_table_get(r->headers_in, "Expect")) == NULL)
      +                || (strcasecmp(val, "100-Continue") != 0 /* fast path */
      +                    && !ap_find_token(r->pool, val, "100-Continue"))) {
      +            apr_table_mergen(r->headers_in, "Expect", "100-Continue");
      +        }
      +    }
      +
      +    /* X-Forwarded-*: handling
      +     *
      +     * XXX Privacy Note:
      +     * -----------------
      +     *
      +     * These request headers are only really useful when the mod_proxy
      +     * is used in a reverse proxy configuration, so that useful info
      +     * about the client can be passed through the reverse proxy and on
      +     * to the backend server, which may require the information to
      +     * function properly.
      +     *
      +     * In a forward proxy situation, these options are a potential
      +     * privacy violation, as information about clients behind the proxy
      +     * are revealed to arbitrary servers out there on the internet.
      +     *
      +     * The HTTP/1.1 Via: header is designed for passing client
      +     * information through proxies to a server, and should be used in
      +     * a forward proxy configuration instead of X-Forwarded-*. See the
      +     * ProxyVia option for details.
      +     */
      +    if (dconf->add_forwarded_headers) {
      +        if (PROXYREQ_REVERSE == r->proxyreq) {
      +            const char *buf;
      +
      +            /* Add X-Forwarded-For: so that the upstream has a chance to
      +             * determine, where the original request came from.
      +             */
      +            apr_table_mergen(r->headers_in, "X-Forwarded-For",
      +                             r->useragent_ip);
      +
      +            /* Add X-Forwarded-Host: so that upstream knows what the
      +             * original request hostname was.
      +             */
      +            if ((buf = apr_table_get(r->headers_in, "Host"))) {
      +                apr_table_mergen(r->headers_in, "X-Forwarded-Host", buf);
      +            }
      +
      +            /* Add X-Forwarded-Server: so that upstream knows what the
      +             * name of this proxy server is (if there are more than one)
      +             * XXX: This duplicates Via: - do we strictly need it?
      +             */
      +            apr_table_mergen(r->headers_in, "X-Forwarded-Server",
      +                             r->server->server_hostname);
      +        }
      +    }
      +
      +    proxy_run_fixups(r);
      +    if (ap_proxy_clear_connection(r, r->headers_in) < 0) {
      +        return HTTP_BAD_REQUEST;
      +    }
      +
      +    /* send request headers */
      +    headers_in_array = apr_table_elts(r->headers_in);
      +    headers_in = (const apr_table_entry_t *) headers_in_array->elts;
      +    for (counter = 0; counter < headers_in_array->nelts; counter++) {
      +        if (headers_in[counter].key == NULL
      +            || headers_in[counter].val == NULL
      +
      +            /* Already sent */
      +            || !strcasecmp(headers_in[counter].key, "Host")
      +
      +            /* Clear out hop-by-hop request headers not to send
      +             * RFC2616 13.5.1 says we should strip these headers
      +             */
      +            || !strcasecmp(headers_in[counter].key, "Keep-Alive")
      +            || !strcasecmp(headers_in[counter].key, "TE")
      +            || !strcasecmp(headers_in[counter].key, "Trailer")
      +            || !strcasecmp(headers_in[counter].key, "Upgrade")
      +
      +            ) {
      +            continue;
      +        }
      +        /* Do we want to strip Proxy-Authorization ?
      +         * If we haven't used it, then NO
      +         * If we have used it then MAYBE: RFC2616 says we MAY propagate it.
      +         * So let's make it configurable by env.
      +         */
      +        if (!strcasecmp(headers_in[counter].key,"Proxy-Authorization")) {
      +            if (r->user != NULL) { /* we've authenticated */
      +                if (!apr_table_get(r->subprocess_env, "Proxy-Chain-Auth")) {
      +                    continue;
      +                }
      +            }
      +        }
      +
      +        /* Skip Transfer-Encoding and Content-Length for now.
      +         */
      +        if (!strcasecmp(headers_in[counter].key, "Transfer-Encoding")) {
      +            *old_te_val = headers_in[counter].val;
      +            continue;
      +        }
      +        if (!strcasecmp(headers_in[counter].key, "Content-Length")) {
      +            *old_cl_val = headers_in[counter].val;
      +            continue;
      +        }
      +
      +        /* for sub-requests, ignore freshness/expiry headers */
      +        if (r->main) {
      +            if (   !strcasecmp(headers_in[counter].key, "If-Match")
      +                || !strcasecmp(headers_in[counter].key, "If-Modified-Since")
      +                || !strcasecmp(headers_in[counter].key, "If-Range")
      +                || !strcasecmp(headers_in[counter].key, "If-Unmodified-Since")
      +                || !strcasecmp(headers_in[counter].key, "If-None-Match")) {
      +                continue;
      +            }
      +        }
      +
      +        buf = apr_pstrcat(p, headers_in[counter].key, ": ",
      +                          headers_in[counter].val, CRLF,
      +                          NULL);
      +        ap_xlate_proto_to_ascii(buf, strlen(buf));
      +        e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(header_brigade, e);
      +    }
      +
      +    /* Restore the original headers in (see comment above),
      +     * we won't modify them anymore.
      +     */
      +    r->headers_in = saved_headers_in;
      +    return OK;
      +}
      +
      +PROXY_DECLARE(int) ap_proxy_pass_brigade(apr_bucket_alloc_t *bucket_alloc,
      +                                         request_rec *r, proxy_conn_rec *p_conn,
      +                                         conn_rec *origin, apr_bucket_brigade *bb,
      +                                         int flush)
      +{
      +    apr_status_t status;
      +    apr_off_t transferred;
      +
      +    if (flush) {
      +        apr_bucket *e = apr_bucket_flush_create(bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, e);
      +    }
      +    apr_brigade_length(bb, 0, &transferred);
      +    if (transferred != -1)
      +        p_conn->worker->s->transferred += transferred;
      +    status = ap_pass_brigade(origin->output_filters, bb);
      +    /* Cleanup the brigade now to avoid buckets lifetime
      +     * issues in case of error returned below. */
      +    apr_brigade_cleanup(bb);
      +    if (status != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(01084)
      +                      "pass request body failed to %pI (%s)",
      +                      p_conn->addr, p_conn->hostname);
      +        if (origin->aborted) {
      +            const char *ssl_note;
      +
      +            if (((ssl_note = apr_table_get(origin->notes, "SSL_connect_rv"))
      +                 != NULL) && (strcmp(ssl_note, "err") == 0)) {
      +                return ap_proxyerror(r, HTTP_INTERNAL_SERVER_ERROR,
      +                                     "Error during SSL Handshake with"
      +                                     " remote server");
      +            }
      +            return APR_STATUS_IS_TIMEUP(status) ? HTTP_GATEWAY_TIME_OUT : HTTP_BAD_GATEWAY;
      +        }
      +        else {
      +            return HTTP_BAD_REQUEST;
      +        }
      +    }
      +    return OK;
      +}
      +
      +/* Fill in unknown schemes from apr_uri_port_of_scheme() */
      +
      +typedef struct proxy_schemes_t {
      +    const char *name;
      +    apr_port_t default_port;
      +} proxy_schemes_t ;
      +
      +static proxy_schemes_t pschemes[] =
      +{
      +    {"fcgi",     8000},
      +    {"ajp",      AJP13_DEF_PORT},
      +    {"scgi",     SCGI_DEF_PORT},
      +    {"h2c",      DEFAULT_HTTP_PORT},
      +    {"h2",       DEFAULT_HTTPS_PORT},
      +    { NULL, 0xFFFF }     /* unknown port */
      +};
      +
      +PROXY_DECLARE(apr_port_t) ap_proxy_port_of_scheme(const char *scheme)
      +{
      +    if (scheme) {
      +        apr_port_t port;
      +        if ((port = apr_uri_port_of_scheme(scheme)) != 0) {
      +            return port;
      +        } else {
      +            proxy_schemes_t *pscheme;
      +            for (pscheme = pschemes; pscheme->name != NULL; ++pscheme) {
      +                if (strcasecmp(scheme, pscheme->name) == 0) {
      +                    return pscheme->default_port;
      +                }
      +            }
      +        }
      +    }
      +    return 0;
      +}
      +
      +PROXY_DECLARE(apr_status_t) ap_proxy_buckets_lifetime_transform(request_rec *r,
      +                                                      apr_bucket_brigade *from,
      +                                                      apr_bucket_brigade *to)
      +{
      +    apr_bucket *e;
      +    apr_bucket *new;
      +    const char *data;
      +    apr_size_t bytes;
      +    apr_status_t rv = APR_SUCCESS;
      +    apr_bucket_alloc_t *bucket_alloc = to->bucket_alloc;
      +
      +    apr_brigade_cleanup(to);
      +    for (e = APR_BRIGADE_FIRST(from);
      +         e != APR_BRIGADE_SENTINEL(from);
      +         e = APR_BUCKET_NEXT(e)) {
      +        if (!APR_BUCKET_IS_METADATA(e)) {
      +            apr_bucket_read(e, &data, &bytes, APR_BLOCK_READ);
      +            new = apr_bucket_transient_create(data, bytes, bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(to, new);
      +        }
      +        else if (APR_BUCKET_IS_FLUSH(e)) {
      +            new = apr_bucket_flush_create(bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(to, new);
      +        }
      +        else if (APR_BUCKET_IS_EOS(e)) {
      +            new = apr_bucket_eos_create(bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(to, new);
      +        }
      +        else {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03304)
      +                          "Unhandled bucket type of type %s in"
      +                          " ap_proxy_buckets_lifetime_transform", e->type->name);
      +            rv = APR_EGENERAL;
      +        }
      +    }
      +    return rv;
      +}
      +
      +PROXY_DECLARE(apr_status_t) ap_proxy_transfer_between_connections(
      +                                                       request_rec *r,
      +                                                       conn_rec *c_i,
      +                                                       conn_rec *c_o,
      +                                                       apr_bucket_brigade *bb_i,
      +                                                       apr_bucket_brigade *bb_o,
      +                                                       const char *name,
      +                                                       int *sent,
      +                                                       apr_off_t bsize,
      +                                                       int after)
      +{
      +    apr_status_t rv;
      +#ifdef DEBUGGING
      +    apr_off_t len;
      +#endif
      +
      +    do {
      +        apr_brigade_cleanup(bb_i);
      +        rv = ap_get_brigade(c_i->input_filters, bb_i, AP_MODE_READBYTES,
      +                            APR_NONBLOCK_READ, bsize);
      +        if (rv == APR_SUCCESS) {
      +            if (c_o->aborted) {
      +                return APR_EPIPE;
      +            }
      +            if (APR_BRIGADE_EMPTY(bb_i)) {
      +                break;
      +            }
      +#ifdef DEBUGGING
      +            len = -1;
      +            apr_brigade_length(bb_i, 0, &len);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03306)
      +                          "ap_proxy_transfer_between_connections: "
      +                          "read %" APR_OFF_T_FMT
      +                          " bytes from %s", len, name);
      +#endif
      +            if (sent) {
      +                *sent = 1;
      +            }
      +            ap_proxy_buckets_lifetime_transform(r, bb_i, bb_o);
      +            if (!after) {
      +                apr_bucket *b;
      +
      +                /*
      +                 * Do not use ap_fflush here since this would cause the flush
      +                 * bucket to be sent in a separate brigade afterwards which
      +                 * causes some filters to set aside the buckets from the first
      +                 * brigade and process them when the flush arrives in the second
      +                 * brigade. As set asides of our transformed buckets involve
      +                 * memory copying we try to avoid this. If we have the flush
      +                 * bucket in the first brigade they directly process the
      +                 * buckets without setting them aside.
      +                 */
      +                b = apr_bucket_flush_create(bb_o->bucket_alloc);
      +                APR_BRIGADE_INSERT_TAIL(bb_o, b);
      +            }
      +            rv = ap_pass_brigade(c_o->output_filters, bb_o);
      +            if (rv != APR_SUCCESS) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(03307)
      +                              "ap_proxy_transfer_between_connections: "
      +                              "error on %s - ap_pass_brigade",
      +                              name);
      +            }
      +        } else if (!APR_STATUS_IS_EAGAIN(rv) && !APR_STATUS_IS_EOF(rv)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(03308)
      +                          "ap_proxy_transfer_between_connections: "
      +                          "error on %s - ap_get_brigade",
      +                          name);
      +        }
      +    } while (rv == APR_SUCCESS);
      +
      +    if (after) {
      +        ap_fflush(c_o->output_filters, bb_o);
      +    }
      +
      +    ap_log_rerror(APLOG_MARK, APLOG_TRACE2, rv, r,
      +                  "ap_proxy_transfer_between_connections complete");
      +
      +    if (APR_STATUS_IS_EAGAIN(rv)) {
      +        rv = APR_SUCCESS;
      +    }
      +
      +    return rv;
      +}
      +
      +PROXY_DECLARE (const char *) ap_proxy_show_hcmethod(hcmethod_t method)
      +{
      +    proxy_hcmethods_t *m = proxy_hcmethods;
      +    for (; m->name; m++) {
      +        if (m->method == method) {
      +            return m->name;
      +        }
      +    }
      +    return "???";
      +}
      +
      +void proxy_util_register_hooks(apr_pool_t *p)
      +{
      +    APR_REGISTER_OPTIONAL_FN(ap_proxy_retry_worker);
      +    APR_REGISTER_OPTIONAL_FN(ap_proxy_clear_connection);
      +}
      diff --git a/modules/proxy/proxy_util.h b/modules/proxy/proxy_util.h
      new file mode 100644
      index 00000000000..202be8d6535
      --- /dev/null
      +++ b/modules/proxy/proxy_util.h
      @@ -0,0 +1,45 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef PROXY_UTIL_H_
      +#define PROXY_UTIL_H_
      +
      +/**
      + * @file  proxy_util.h
      + * @brief Internal interfaces private to mod_proxy.
      + *
      + * @defgroup MOD_PROXY_PRIVATE Private
      + * @ingroup MOD_PROXY
      + * @{
      + */
      +
      +PROXY_DECLARE(int) ap_proxy_is_ipaddr(struct dirconn_entry *This, apr_pool_t *p);
      +PROXY_DECLARE(int) ap_proxy_is_domainname(struct dirconn_entry *This, apr_pool_t *p);
      +PROXY_DECLARE(int) ap_proxy_is_hostname(struct dirconn_entry *This, apr_pool_t *p);
      +PROXY_DECLARE(int) ap_proxy_is_word(struct dirconn_entry *This, apr_pool_t *p);
      +
      +PROXY_DECLARE_DATA extern int proxy_lb_workers;
      +PROXY_DECLARE_DATA extern const apr_strmatch_pattern *ap_proxy_strmatch_path;
      +PROXY_DECLARE_DATA extern const apr_strmatch_pattern *ap_proxy_strmatch_domain;
      +
      +/**
      + * Register optional functions declared within proxy_util.c.
      + */
      +void proxy_util_register_hooks(apr_pool_t *p);
      +
      +/** @} */
      +
      +#endif /* PROXY_UTIL_H_ */
      diff --git a/server/mpm/simple/simple_io.h b/modules/proxy/scgi.h
      similarity index 69%
      rename from server/mpm/simple/simple_io.h
      rename to modules/proxy/scgi.h
      index a1c8dbdfbb2..a2e5e965090 100644
      --- a/server/mpm/simple/simple_io.h
      +++ b/modules/proxy/scgi.h
      @@ -14,13 +14,23 @@
        * limitations under the License.
        */
       
      -#include "simple_types.h"
      +/**
      + * @file scgi.h
      + * @brief Shared SCGI-related definitions
      + *
      + * @ingroup APACHE_INTERNAL
      + * @{
      + */
       
      -#ifndef APACHE_MPM_SIMPLE_IO_H
      -#define APACHE_MPM_SIMPLE_IO_H
      +#ifndef SCGI_H
      +#define SCGI_H
       
      -apr_status_t simple_io_accept(simple_core_t * sc, simple_sb_t * sb);
      +/* This is not defined by the protocol.  It is a convention
      + * of mod_proxy_scgi, and mod_proxy utility routines must
      + * use the same value as mod_proxy_scgi.
      + */
      +#define SCGI_DEF_PORT 4000
       
      -apr_status_t simple_io_event_process(simple_core_t * sc, simple_sb_t * sb);
      +/** @} */
       
      -#endif
      +#endif /* SCGI_H */
      diff --git a/modules/session/NWGNUmakefile b/modules/session/NWGNUmakefile
      index 8adaac59f91..85f3a3114ff 100644
      --- a/modules/session/NWGNUmakefile
      +++ b/modules/session/NWGNUmakefile
      @@ -18,9 +18,11 @@ include $(AP_WORK)/build/NWGNUhead.inc
       #
       # Make sure all needed macro's are defined
       #
      -ifneq ($(MAKECMDGOALS),clean)
      +ifneq "$(MAKECMDGOALS)" "clean"
      +ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
       APU_HAVE_CRYPTO = $(shell $(AWK) '/^\#define APU_HAVE_CRYPTO/{print $$3}' $(APRUTIL)/include/apu.h)
       endif
      +endif
       
       #
       # These directories will be at the beginning of the include list, followed by
      diff --git a/modules/session/config.m4 b/modules/session/config.m4
      index 373df4761a6..7a38185d0f5 100644
      --- a/modules/session/config.m4
      +++ b/modules/session/config.m4
      @@ -30,7 +30,7 @@ case "$host" in
       esac
       
       APACHE_MODULE(session, session module, , , most)
      -APACHE_MODULE(session_cookie, session cookie module, $session_cookie_objects, , $session_mods_enable)
      +APACHE_MODULE(session_cookie, session cookie module, $session_cookie_objects, , $session_mods_enable,,session)
       
       if test "$enable_session_crypto" != ""; then
         session_mods_enable_crypto=$enable_session_crypto
      @@ -47,7 +47,7 @@ if test "$session_mods_enable_crypto" != "no"; then
         ], [ap_HAVE_APR_CRYPTO="yes"], [ap_HAVE_APR_CRYPTO="no"])
         CPPFLAGS="$saved_CPPFLAGS"
         if test $ap_HAVE_APR_CRYPTO = "no"; then
      -    AC_MSG_WARN([Your APR does not include SSL/EVP support.])
      +    AC_MSG_WARN([Your APR does not include SSL/EVP support. To enable it: configure --with-crypto])
           if test "$enable_session_crypto" != "" -a "$enable_session_crypto" != "no"; then
               AC_MSG_ERROR([mod_session_crypto cannot be enabled])
           fi
      @@ -58,9 +58,9 @@ APACHE_MODULE(session_crypto, session crypto module, $session_crypto_objects, ,
       if test "$session_mods_enable_crypto" = "no" ; then
         enable_session_crypto=no
       fi
      -])
      +],session)
       
      -APACHE_MODULE(session_dbd, session dbd module, $session_dbd_objects, , $session_mods_enable)
      +APACHE_MODULE(session_dbd, session dbd module, $session_dbd_objects, , $session_mods_enable,,session)
       
       APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
       
      diff --git a/modules/session/mod_session.c b/modules/session/mod_session.c
      index 09ef7cbc858..ff4c9a6f2db 100644
      --- a/modules/session/mod_session.c
      +++ b/modules/session/mod_session.c
      @@ -22,7 +22,6 @@
       #include "http_request.h"
       #include "http_protocol.h"
       
      -#define SESSION_PREFIX "mod_session: "
       #define SESSION_EXPIRY "expiry"
       #define HTTP_SESSION "HTTP_SESSION"
       
      @@ -63,16 +62,16 @@ static int session_included(request_rec * r, session_dir_conf * conf)
               included = 0;
               for (i = 0; !included && i < conf->includes->nelts; i++) {
                   const char *include = includes[i];
      -            if (strncmp(r->uri, include, strlen(include))) {
      +            if (strncmp(r->uri, include, strlen(include)) == 0) {
                       included = 1;
                   }
               }
           }
       
           if (conf->excludes->nelts) {
      -        for (i = 0; included && i < conf->includes->nelts; i++) {
      +        for (i = 0; included && i < conf->excludes->nelts; i++) {
                   const char *exclude = excludes[i];
      -            if (strncmp(r->uri, exclude, strlen(exclude))) {
      +            if (strncmp(r->uri, exclude, strlen(exclude)) == 0) {
                       included = 0;
                   }
               }
      @@ -89,8 +88,7 @@ static int session_included(request_rec * r, session_dir_conf * conf)
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -/* ??? We return errors but we ignore them thru-out. ??? */
      -static int ap_session_load(request_rec * r, session_rec ** z)
      +static apr_status_t ap_session_load(request_rec * r, session_rec ** z)
       {
       
           session_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
      @@ -106,7 +104,7 @@ static int ap_session_load(request_rec * r, session_rec ** z)
       
           /* should the session be loaded at all? */
           if (!session_included(r, dconf)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, SESSION_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01814)
                             "excluded by configuration for: %s", r->uri);
               return APR_SUCCESS;
           }
      @@ -114,13 +112,13 @@ static int ap_session_load(request_rec * r, session_rec ** z)
           /* load the session from the session hook */
           rv = ap_run_session_load(r, &zz);
           if (DECLINED == rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, SESSION_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01815)
                             "session is enabled but no session modules have been configured, "
                             "session not loaded: %s", r->uri);
               return APR_EGENERAL;
           }
           else if (OK != rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, SESSION_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01816)
                             "error while loading the session, "
                             "session not loaded: %s", r->uri);
               return rv;
      @@ -128,29 +126,35 @@ static int ap_session_load(request_rec * r, session_rec ** z)
       
           /* found a session that hasn't expired? */
           now = apr_time_now();
      -    if (!zz || (zz->expiry && zz->expiry < now)) {
      +    if (zz) {
      +        if (zz->expiry && zz->expiry < now) {
      +            zz = NULL;
      +        }
      +        else {
      +            /* having a session we cannot decode is just as good as having
      +               none at all */
      +            rv = ap_run_session_decode(r, zz);
      +            if (OK != rv) {
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01817)
      +                              "error while decoding the session, "
      +                              "session not loaded: %s", r->uri);
      +                zz = NULL;
      +            }
      +        }
      +    }
       
      -        /* no luck, create a blank session */
      +    /* no luck, create a blank session */
      +    if (!zz) {
               zz = (session_rec *) apr_pcalloc(r->pool, sizeof(session_rec));
               zz->pool = r->pool;
               zz->entries = apr_table_make(zz->pool, 10);
      -        zz->uuid = (apr_uuid_t *) apr_pcalloc(zz->pool, sizeof(apr_uuid_t));
      -        apr_uuid_get(zz->uuid);
      -
      -    }
      -    else {
      -        rv = ap_run_session_decode(r, zz);
      -        if (OK != rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, SESSION_PREFIX
      -                          "error while decoding the session, "
      -                          "session not loaded: %s", r->uri);
      -            return rv;
      -        }
           }
       
      -    /* make sure the expiry is set, if present */
      -    if (!zz->expiry && dconf->maxage) {
      -        zz->expiry = now + dconf->maxage * APR_USEC_PER_SEC;
      +    /* make sure the expiry and maxage are set, if present */
      +    if (dconf->maxage) {
      +        if (!zz->expiry) {
      +            zz->expiry = now + dconf->maxage * APR_USEC_PER_SEC;
      +        }
               zz->maxage = dconf->maxage;
           }
       
      @@ -169,8 +173,7 @@ static int ap_session_load(request_rec * r, session_rec ** z)
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -/* ??? We return errors but we ignore them thru-out. ??? */
      -static int ap_session_save(request_rec * r, session_rec * z)
      +static apr_status_t ap_session_save(request_rec * r, session_rec * z)
       {
           if (z) {
               apr_time_t now = apr_time_now();
      @@ -181,13 +184,13 @@ static int ap_session_save(request_rec * r, session_rec * z)
       
               /* sanity checks, should we try save at all? */
               if (z->written) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, SESSION_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01818)
                                 "attempt made to save the session twice, "
                                 "session not saved: %s", r->uri);
                   return APR_EGENERAL;
               }
               if (z->expiry && z->expiry < now) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, SESSION_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01819)
                                 "attempt made to save a session when the session had already expired, "
                                 "session not saved: %s", r->uri);
                   return APR_EGENERAL;
      @@ -199,10 +202,15 @@ static int ap_session_save(request_rec * r, session_rec * z)
                   z->maxage = dconf->maxage;
               }
       
      +        /* reset the expiry before saving if present */
      +        if (z->dirty && z->maxage) {
      +            z->expiry = now + z->maxage * APR_USEC_PER_SEC;
      +        } 
      +
               /* encode the session */
               rv = ap_run_session_encode(r, z);
               if (OK != rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, SESSION_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01820)
                                 "error while encoding the session, "
                                 "session not saved: %s", r->uri);
                   return rv;
      @@ -211,13 +219,13 @@ static int ap_session_save(request_rec * r, session_rec * z)
               /* try the save */
               rv = ap_run_session_save(r, z);
               if (DECLINED == rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, SESSION_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(01821)
                                 "session is enabled but no session modules have been configured, "
                                 "session not saved: %s", r->uri);
                   return APR_EGENERAL;
               }
               else if (OK != rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, SESSION_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01822)
                                 "error while saving the session, "
                                 "session not saved: %s", r->uri);
                   return rv;
      @@ -240,14 +248,21 @@ static int ap_session_save(request_rec * r, session_rec * z)
        * @param key The key to get.
        * @param value The buffer to write the value to.
        */
      -static void ap_session_get(request_rec * r, session_rec * z, const char *key, const char **value)
      +static apr_status_t ap_session_get(request_rec * r, session_rec * z,
      +        const char *key, const char **value)
       {
           if (!z) {
      -        ap_session_load(r, &z); /* errors ignored?? */
      +        apr_status_t rv;
      +        rv = ap_session_load(r, &z);
      +        if (APR_SUCCESS != rv) {
      +            return rv;
      +        }
           }
           if (z && z->entries) {
               *value = apr_table_get(z->entries, key);
           }
      +
      +    return OK;
       }
       
       /**
      @@ -262,11 +277,15 @@ static void ap_session_get(request_rec * r, session_rec * z, const char *key, co
        * @param key The key to set. The existing key value will be replaced.
        * @param value The value to set.
        */
      -static void ap_session_set(request_rec * r, session_rec * z,
      -                                const char *key, const char *value)
      +static apr_status_t ap_session_set(request_rec * r, session_rec * z,
      +        const char *key, const char *value)
       {
           if (!z) {
      -        ap_session_load(r, &z); /* errors ignored?? */
      +        apr_status_t rv;
      +        rv = ap_session_load(r, &z);
      +        if (APR_SUCCESS != rv) {
      +            return rv;
      +        }
           }
           if (z) {
               if (value) {
      @@ -277,28 +296,30 @@ static void ap_session_set(request_rec * r, session_rec * z,
               }
               z->dirty = 1;
           }
      +    return APR_SUCCESS;
       }
       
      -static int identity_count(int *count, const char *key, const char *val)
      +static int identity_count(void *v, const char *key, const char *val)
       {
      +    int *count = v;
           *count += strlen(key) * 3 + strlen(val) * 3 + 1;
           return 1;
       }
       
      -static int identity_concat(char *buffer, const char *key, const char *val)
      +static int identity_concat(void *v, const char *key, const char *val)
       {
      -    char *slider = buffer;
      +    char *slider = v;
           int length = strlen(slider);
           slider += length;
           if (length) {
               *slider = '&';
               slider++;
           }
      -    ap_escape_path_segment_buffer(slider, key);
      +    ap_escape_urlencoded_buffer(slider, key);
           slider += strlen(slider);
           *slider = '=';
           slider++;
      -    ap_escape_path_segment_buffer(slider, val);
      +    ap_escape_urlencoded_buffer(slider, val);
           return 1;
       }
       
      @@ -315,7 +336,7 @@ static int identity_concat(char *buffer, const char *key, const char *val)
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -static int session_identity_encode(request_rec * r, session_rec * z)
      +static apr_status_t session_identity_encode(request_rec * r, session_rec * z)
       {
       
           char *buffer = NULL;
      @@ -324,11 +345,9 @@ static int session_identity_encode(request_rec * r, session_rec * z)
               char *expiry = apr_psprintf(z->pool, "%" APR_INT64_T_FMT, z->expiry);
               apr_table_setn(z->entries, SESSION_EXPIRY, expiry);
           }
      -    apr_table_do((int (*) (void *, const char *, const char *))
      -                 identity_count, &length, z->entries, NULL);;
      +    apr_table_do(identity_count, &length, z->entries, NULL);
           buffer = apr_pcalloc(r->pool, length + 1);
      -    apr_table_do((int (*) (void *, const char *, const char *))
      -                 identity_concat, buffer, z->entries, NULL);
      +    apr_table_do(identity_concat, buffer, z->entries, NULL);
           z->encoded = buffer;
           return OK;
       
      @@ -351,7 +370,7 @@ static int session_identity_encode(request_rec * r, session_rec * z)
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -static int session_identity_decode(request_rec * r, session_rec * z)
      +static apr_status_t session_identity_decode(request_rec * r, session_rec * z)
       {
       
           char *last = NULL;
      @@ -364,7 +383,7 @@ static int session_identity_decode(request_rec * r, session_rec * z)
           }
       
           /* decode what we have */
      -    encoded = apr_pstrcat(r->pool, z->encoded, NULL);
      +    encoded = apr_pstrdup(r->pool, z->encoded);
           pair = apr_strtok(encoded, sep, &last);
           while (pair && pair[0]) {
               char *plast = NULL;
      @@ -375,7 +394,7 @@ static int session_identity_decode(request_rec * r, session_rec * z)
                   if (!val || !*val) {
                       apr_table_unset(z->entries, key);
                   }
      -            else if (!ap_unescape_all(key) && !ap_unescape_all(val)) {
      +            else if (!ap_unescape_urlencoded(key) && !ap_unescape_urlencoded(val)) {
                       if (!strcmp(SESSION_EXPIRY, key)) {
                           z->expiry = (apr_time_t) apr_atoi64(val);
                       }
      @@ -408,7 +427,7 @@ static int session_identity_decode(request_rec * r, session_rec * z)
        * attempt to save the session will be called
        */
       static apr_status_t session_output_filter(ap_filter_t * f,
      -                                                    apr_bucket_brigade * in)
      +        apr_bucket_brigade * in)
       {
       
           /* save all the sessions in all the requests */
      @@ -422,7 +441,8 @@ static apr_status_t session_output_filter(ap_filter_t * f,
                                                             &session_module);
       
               /* load the session, or create one if necessary */
      -        ap_session_load(r, &z); /* errors ignored?? */
      +        /* when unset or on error, z will be NULL */
      +        ap_session_load(r, &z);
               if (!z || z->written) {
                   r = r->next;
                   continue;
      @@ -435,13 +455,17 @@ static apr_status_t session_output_filter(ap_filter_t * f,
                       override = apr_table_get(r->headers_out, conf->header);
                   }
                   if (override) {
      +                apr_table_unset(r->err_headers_out, conf->header);
      +                apr_table_unset(r->headers_out, conf->header);
                       z->encoded = override;
      +                z->dirty = 1;
                       session_identity_decode(r, z);
                   }
               }
       
               /* save away the session, and we're done */
      -        ap_session_save(r, z); /* errors ignored?? */
      +        /* when unset or on error, we've complained to the log */
      +        ap_session_save(r, z);
       
               r = r->next;
           }
      @@ -479,9 +503,14 @@ static int session_fixups(request_rec * r)
                                                         &session_module);
       
           session_rec *z = NULL;
      -    ap_session_load(r, &z); /* errors ignored?? */
       
      -    if (conf->env) {
      +    /* if an error occurs or no session has been configured, we ignore
      +     * the broken session and allow it to be recreated from scratch on save
      +     * if necessary.
      +     */
      +    ap_session_load(r, &z);
      +
      +    if (z && conf->env) {
               session_identity_encode(r, z);
               if (z->encoded) {
                   apr_table_set(r->subprocess_env, HTTP_SESSION, z->encoded);
      diff --git a/modules/session/mod_session.dep b/modules/session/mod_session.dep
      new file mode 100644
      index 00000000000..d773317e2d5
      --- /dev/null
      +++ b/modules/session/mod_session.dep
      @@ -0,0 +1,56 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_session.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_session.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_session.h"\
      +	
      diff --git a/modules/session/mod_session.h b/modules/session/mod_session.h
      index 647f8c59a26..a6dd5e9f471 100644
      --- a/modules/session/mod_session.h
      +++ b/modules/session/mod_session.h
      @@ -125,8 +125,8 @@ typedef struct {
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_load,
      -                          (request_rec * r, session_rec ** z))
      +APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, apr_status_t, session_load,
      +        (request_rec * r, session_rec ** z))
       
       /**
        * Hook to save the session.
      @@ -137,8 +137,8 @@ APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_load,
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_save,
      -                          (request_rec * r, session_rec * z))
      +APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, apr_status_t, session_save,
      +        (request_rec * r, session_rec * z))
       
       /**
        * Hook to encode the session.
      @@ -150,8 +150,8 @@ APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_save,
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_encode,
      -                          (request_rec * r, session_rec * z))
      +APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, apr_status_t, session_encode,
      +        (request_rec * r, session_rec * z))
       
       /**
        * Hook to decode the session.
      @@ -163,15 +163,19 @@ APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_encode,
        * @param r The request
        * @param z A pointer to where the session will be written.
        */
      -APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, int, session_decode,
      -                          (request_rec * r, session_rec * z))
      -
      -APR_DECLARE_OPTIONAL_FN(void, ap_session_get, (request_rec * r, session_rec * z,
      -                                               const char *key, const char **value));
      -APR_DECLARE_OPTIONAL_FN(void, ap_session_set, (request_rec * r, session_rec * z,
      -                                               const char *key, const char *value));
      -APR_DECLARE_OPTIONAL_FN(int, ap_session_load, (request_rec *, session_rec **));
      -APR_DECLARE_OPTIONAL_FN(int, ap_session_save, (request_rec *, session_rec *));
      +APR_DECLARE_EXTERNAL_HOOK(ap, SESSION, apr_status_t, session_decode,
      +        (request_rec * r, session_rec * z))
      +
      +APR_DECLARE_OPTIONAL_FN(
      +        apr_status_t,
      +        ap_session_get,
      +        (request_rec * r, session_rec * z, const char *key, const char **value));
      +APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_session_set,
      +        (request_rec * r, session_rec * z, const char *key, const char *value));
      +APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_session_load,
      +        (request_rec *, session_rec **));
      +APR_DECLARE_OPTIONAL_FN(apr_status_t, ap_session_save,
      +        (request_rec *, session_rec *));
       
       /**
        * The name of the module.
      diff --git a/modules/session/mod_session.mak b/modules/session/mod_session.mak
      new file mode 100644
      index 00000000000..ce92fa61a63
      --- /dev/null
      +++ b/modules/session/mod_session.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_session.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_session - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_session - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_session - Win32 Release" && "$(CFG)" != "mod_session - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_session.mak" CFG="mod_session - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_session - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_session - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_session.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session.obj"
      +	-@erase "$(INTDIR)\mod_session.res"
      +	-@erase "$(INTDIR)\mod_session_src.idb"
      +	-@erase "$(INTDIR)\mod_session_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session.exp"
      +	-@erase "$(OUTDIR)\mod_session.lib"
      +	-@erase "$(OUTDIR)\mod_session.pdb"
      +	-@erase "$(OUTDIR)\mod_session.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "SESSION_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_session.so" /d LONG_NAME="session_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session.pdb" /debug /out:"$(OUTDIR)\mod_session.so" /implib:"$(OUTDIR)\mod_session.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session.obj" \
      +	"$(INTDIR)\mod_session.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_session.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_session.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session.so"
      +   if exist .\Release\mod_session.so.manifest mt.exe -manifest .\Release\mod_session.so.manifest -outputresource:.\Release\mod_session.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_session - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_session.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session.obj"
      +	-@erase "$(INTDIR)\mod_session.res"
      +	-@erase "$(INTDIR)\mod_session_src.idb"
      +	-@erase "$(INTDIR)\mod_session_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session.exp"
      +	-@erase "$(OUTDIR)\mod_session.lib"
      +	-@erase "$(OUTDIR)\mod_session.pdb"
      +	-@erase "$(OUTDIR)\mod_session.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "SESSION_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_session.so" /d LONG_NAME="session_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session.pdb" /debug /out:"$(OUTDIR)\mod_session.so" /implib:"$(OUTDIR)\mod_session.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session.obj" \
      +	"$(INTDIR)\mod_session.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_session.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_session.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session.so"
      +   if exist .\Debug\mod_session.so.manifest mt.exe -manifest .\Debug\mod_session.so.manifest -outputresource:.\Debug\mod_session.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_session.dep")
      +!INCLUDE "mod_session.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_session.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_session - Win32 Release" || "$(CFG)" == "mod_session - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_session - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_session - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_session.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_session.so" /d LONG_NAME="session_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_session - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_session.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_session.so" /d LONG_NAME="session_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_session.c
      +
      +"$(INTDIR)\mod_session.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/session/mod_session_cookie.c b/modules/session/mod_session_cookie.c
      index 760157a9481..6a02322bf19 100644
      --- a/modules/session/mod_session_cookie.c
      +++ b/modules/session/mod_session_cookie.c
      @@ -20,7 +20,6 @@
       #include "http_log.h"
       #include "util_cookies.h"
       
      -#define LOG_PREFIX "mod_session_cookie: "
       #define MOD_SESSION_COOKIE "mod_session_cookie"
       
       module AP_MODULE_DECLARE_DATA session_cookie_module;
      @@ -55,7 +54,7 @@ typedef struct {
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -static int session_cookie_save(request_rec * r, session_rec * z)
      +static apr_status_t session_cookie_save(request_rec * r, session_rec * z)
       {
       
           session_cookie_dir_conf *conf = ap_get_module_config(r->per_dir_config,
      @@ -110,7 +109,7 @@ static int session_cookie_save(request_rec * r, session_rec * z)
        *
        * On success, this returns APR_SUCCESS.
        */
      -static int session_cookie_load(request_rec * r, session_rec ** z)
      +static apr_status_t session_cookie_load(request_rec * r, session_rec ** z)
       {
       
           session_cookie_dir_conf *conf = ap_get_module_config(r->per_dir_config,
      @@ -158,7 +157,6 @@ static int session_cookie_load(request_rec * r, session_rec ** z)
           zz->pool = m->pool;
           zz->entries = apr_table_make(m->pool, 10);
           zz->encoded = val;
      -    zz->uuid = (apr_uuid_t *) apr_pcalloc(m->pool, sizeof(apr_uuid_t));
           *z = zz;
       
           /* put the session in the notes so we don't have to parse it again */
      diff --git a/modules/session/mod_session_cookie.dep b/modules/session/mod_session_cookie.dep
      new file mode 100644
      index 00000000000..23d87277fa7
      --- /dev/null
      +++ b/modules/session/mod_session_cookie.dep
      @@ -0,0 +1,49 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_session_cookie.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_session_cookie.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_cookies.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_session.h"\
      +	
      diff --git a/modules/session/mod_session_cookie.mak b/modules/session/mod_session_cookie.mak
      new file mode 100644
      index 00000000000..014f1e3b8c6
      --- /dev/null
      +++ b/modules/session/mod_session_cookie.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_session_cookie.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_session_cookie - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_session_cookie - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_session_cookie - Win32 Release" && "$(CFG)" != "mod_session_cookie - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_session_cookie.mak" CFG="mod_session_cookie - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_session_cookie - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_session_cookie - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_cookie.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_session_cookie.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_session - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_cookie.obj"
      +	-@erase "$(INTDIR)\mod_session_cookie.res"
      +	-@erase "$(INTDIR)\mod_session_cookie_src.idb"
      +	-@erase "$(INTDIR)\mod_session_cookie_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_cookie.exp"
      +	-@erase "$(OUTDIR)\mod_session_cookie.lib"
      +	-@erase "$(OUTDIR)\mod_session_cookie.pdb"
      +	-@erase "$(OUTDIR)\mod_session_cookie.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_cookie_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_cookie.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_session_cookie.so" /d LONG_NAME="session_cookie_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_cookie.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_cookie.pdb" /debug /out:"$(OUTDIR)\mod_session_cookie.so" /implib:"$(OUTDIR)\mod_session_cookie.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_cookie.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_cookie.obj" \
      +	"$(INTDIR)\mod_session_cookie.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_cookie.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_session_cookie.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_cookie.so"
      +   if exist .\Release\mod_session_cookie.so.manifest mt.exe -manifest .\Release\mod_session_cookie.so.manifest -outputresource:.\Release\mod_session_cookie.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_cookie.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_session_cookie.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_session - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_cookie.obj"
      +	-@erase "$(INTDIR)\mod_session_cookie.res"
      +	-@erase "$(INTDIR)\mod_session_cookie_src.idb"
      +	-@erase "$(INTDIR)\mod_session_cookie_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_cookie.exp"
      +	-@erase "$(OUTDIR)\mod_session_cookie.lib"
      +	-@erase "$(OUTDIR)\mod_session_cookie.pdb"
      +	-@erase "$(OUTDIR)\mod_session_cookie.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_cookie_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_cookie.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_session_cookie.so" /d LONG_NAME="session_cookie_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_cookie.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_cookie.pdb" /debug /out:"$(OUTDIR)\mod_session_cookie.so" /implib:"$(OUTDIR)\mod_session_cookie.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_cookie.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_cookie.obj" \
      +	"$(INTDIR)\mod_session_cookie.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_cookie.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_session_cookie.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_cookie.so"
      +   if exist .\Debug\mod_session_cookie.so.manifest mt.exe -manifest .\Debug\mod_session_cookie.so.manifest -outputresource:.\Debug\mod_session_cookie.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_session_cookie.dep")
      +!INCLUDE "mod_session_cookie.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_session_cookie.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_session_cookie - Win32 Release" || "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +"mod_session - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" 
      +   cd "."
      +
      +"mod_session - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +"mod_session - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" 
      +   cd "."
      +
      +"mod_session - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_session_cookie - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_session_cookie.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_cookie.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_session_cookie.so" /d LONG_NAME="session_cookie_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_session_cookie - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_session_cookie.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_cookie.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_session_cookie.so" /d LONG_NAME="session_cookie_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_session_cookie.c
      +
      +"$(INTDIR)\mod_session_cookie.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/session/mod_session_crypto.c b/modules/session/mod_session_crypto.c
      index a64582fed24..9231a5e8220 100644
      --- a/modules/session/mod_session_crypto.c
      +++ b/modules/session/mod_session_crypto.c
      @@ -18,6 +18,7 @@
       #include "apu_version.h"
       #include "apr_base64.h"                /* for apr_base64_decode et al */
       #include "apr_lib.h"
      +#include "apr_md5.h"
       #include "apr_strings.h"
       #include "http_log.h"
       #include "http_core.h"
      @@ -34,7 +35,6 @@
       
       #include "apr_crypto.h"                /* for apr_*_crypt et al */
       
      -#define LOG_PREFIX "mod_session_crypto: "
       #define CRYPTO_KEY "session_crypto_context"
       
       module AP_MODULE_DECLARE_DATA session_crypto_module;
      @@ -58,10 +58,145 @@ typedef struct {
           int library_set;
       } session_crypto_conf;
       
      -AP_DECLARE(int) ap_session_crypto_encode(request_rec * r, session_rec * z);
      -AP_DECLARE(int) ap_session_crypto_decode(request_rec * r, session_rec * z);
      -AP_DECLARE(int) ap_session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
      -        apr_pool_t *ptemp, server_rec *s);
      +/* Wrappers around apr_siphash24() and apr_crypto_equals(),
      + * available in APU-1.6/APR-2.0 only.
      + */
      +#if APU_MAJOR_VERSION > 1 || (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 6)
      +
      +#include "apr_siphash.h"
      +
      +#define AP_SIPHASH_DSIZE    APR_SIPHASH_DSIZE
      +#define AP_SIPHASH_KSIZE    APR_SIPHASH_KSIZE
      +#define ap_siphash24_auth   apr_siphash24_auth
      +
      +#define ap_crypto_equals    apr_crypto_equals
      +
      +#else
      +
      +#define AP_SIPHASH_DSIZE    8
      +#define AP_SIPHASH_KSIZE    16
      +
      +#define ROTL64(x, n) (((x) << (n)) | ((x) >> (64 - (n))))
      +
      +#define U8TO64_LE(p) \
      +    (((apr_uint64_t)((p)[0])      ) | \
      +     ((apr_uint64_t)((p)[1]) <<  8) | \
      +     ((apr_uint64_t)((p)[2]) << 16) | \
      +     ((apr_uint64_t)((p)[3]) << 24) | \
      +     ((apr_uint64_t)((p)[4]) << 32) | \
      +     ((apr_uint64_t)((p)[5]) << 40) | \
      +     ((apr_uint64_t)((p)[6]) << 48) | \
      +     ((apr_uint64_t)((p)[7]) << 56))
      +
      +#define U64TO8_LE(p, v) \
      +do { \
      +    (p)[0] = (unsigned char)((v)      ); \
      +    (p)[1] = (unsigned char)((v) >>  8); \
      +    (p)[2] = (unsigned char)((v) >> 16); \
      +    (p)[3] = (unsigned char)((v) >> 24); \
      +    (p)[4] = (unsigned char)((v) >> 32); \
      +    (p)[5] = (unsigned char)((v) >> 40); \
      +    (p)[6] = (unsigned char)((v) >> 48); \
      +    (p)[7] = (unsigned char)((v) >> 56); \
      +} while (0)
      +
      +#define SIPROUND() \
      +do { \
      +    v0 += v1; v1=ROTL64(v1,13); v1 ^= v0; v0=ROTL64(v0,32); \
      +    v2 += v3; v3=ROTL64(v3,16); v3 ^= v2; \
      +    v0 += v3; v3=ROTL64(v3,21); v3 ^= v0; \
      +    v2 += v1; v1=ROTL64(v1,17); v1 ^= v2; v2=ROTL64(v2,32); \
      +} while(0)
      +
      +static apr_uint64_t ap_siphash24(const void *src, apr_size_t len,
      +                                 const unsigned char key[AP_SIPHASH_KSIZE])
      +{
      +    const unsigned char *ptr, *end;
      +    apr_uint64_t v0, v1, v2, v3, m;
      +    apr_uint64_t k0, k1;
      +    unsigned int rem;
      +
      +    k0 = U8TO64_LE(key + 0);
      +    k1 = U8TO64_LE(key + 8);
      +    v3 = k1 ^ (apr_uint64_t)0x7465646279746573ULL;
      +    v2 = k0 ^ (apr_uint64_t)0x6c7967656e657261ULL;
      +    v1 = k1 ^ (apr_uint64_t)0x646f72616e646f6dULL;
      +    v0 = k0 ^ (apr_uint64_t)0x736f6d6570736575ULL;
      +
      +    rem = (unsigned int)(len & 0x7);
      +    for (ptr = src, end = ptr + len - rem; ptr < end; ptr += 8) {
      +        m = U8TO64_LE(ptr);
      +        v3 ^= m;
      +        SIPROUND();
      +        SIPROUND();
      +        v0 ^= m;
      +    }
      +    m = (apr_uint64_t)(len & 0xff) << 56;
      +    switch (rem) {
      +        case 7: m |= (apr_uint64_t)ptr[6] << 48;
      +        case 6: m |= (apr_uint64_t)ptr[5] << 40;
      +        case 5: m |= (apr_uint64_t)ptr[4] << 32;
      +        case 4: m |= (apr_uint64_t)ptr[3] << 24;
      +        case 3: m |= (apr_uint64_t)ptr[2] << 16;
      +        case 2: m |= (apr_uint64_t)ptr[1] << 8;
      +        case 1: m |= (apr_uint64_t)ptr[0];
      +        case 0: break;
      +    }
      +    v3 ^= m;
      +    SIPROUND();
      +    SIPROUND();
      +    v0 ^= m;
      +
      +    v2 ^= 0xff;
      +    SIPROUND();
      +    SIPROUND();
      +    SIPROUND();
      +    SIPROUND();
      +
      +    return v0 ^ v1 ^ v2 ^ v3;
      +}
      +
      +static void ap_siphash24_auth(unsigned char out[AP_SIPHASH_DSIZE],
      +                              const void *src, apr_size_t len,
      +                              const unsigned char key[AP_SIPHASH_KSIZE])
      +{
      +    apr_uint64_t h;
      +    h = ap_siphash24(src, len, key);
      +    U64TO8_LE(out, h);
      +}
      +
      +static int ap_crypto_equals(const void *buf1, const void *buf2,
      +                            apr_size_t size)
      +{
      +    const unsigned char *p1 = buf1;
      +    const unsigned char *p2 = buf2;
      +    unsigned char diff = 0;
      +    apr_size_t i;
      +
      +    for (i = 0; i < size; ++i) {
      +        diff |= p1[i] ^ p2[i];
      +    }
      +
      +    return 1 & ((diff - 1) >> 8);
      +}
      +
      +#endif
      +
      +static void compute_auth(const void *src, apr_size_t len,
      +                         const char *passphrase, apr_size_t passlen,
      +                         unsigned char auth[AP_SIPHASH_DSIZE])
      +{
      +    unsigned char key[APR_MD5_DIGESTSIZE];
      +
      +    /* XXX: if we had a way to get the raw bytes from an apr_crypto_key_t
      +     *      we could use them directly (not available in APR-1.5.x).
      +     * MD5 is 128bit too, so use it to get a suitable siphash key
      +     * from the passphrase.
      +     */
      +    apr_md5(key, passphrase, passlen);
      +
      +    ap_siphash24_auth(auth, src, len, key);
      +}
       
       /**
        * Initialise the encryption as per the current config.
      @@ -77,7 +212,7 @@ static apr_status_t crypt_init(request_rec *r,
       
           res = apr_crypto_get_block_key_types(&ciphers, f);
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01823)
                       "no ciphers returned by APR. "
                       "session encryption not possible");
               return res;
      @@ -110,7 +245,7 @@ static apr_status_t crypt_init(request_rec *r,
               }
               options[offset] = 0;
       
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01824)
                       "cipher '%s' not recognised by crypto driver. "
                       "session encryption not possible, options: %s", dconf->cipher, options);
       
      @@ -134,21 +269,14 @@ static apr_status_t encrypt_string(request_rec * r, const apr_crypto_t *f,
           apr_crypto_block_t *block = NULL;
           unsigned char *encrypt = NULL;
           unsigned char *combined = NULL;
      -    apr_size_t encryptlen, tlen;
      +    apr_size_t encryptlen, tlen, combinedlen;
           char *base64;
           apr_size_t blockSize = 0;
           const unsigned char *iv = NULL;
           apr_uuid_t salt;
           apr_crypto_block_key_type_e *cipher;
           const char *passphrase;
      -
      -    /* by default, return an empty string */
      -    *out = "";
      -
      -    /* don't attempt to encrypt an empty string, trying to do so causes a segfault */
      -    if (!in || !*in) {
      -        return APR_SUCCESS;
      -    }
      +    apr_size_t passlen;
       
           /* use a uuid as a salt value, and prepend it to our result */
           apr_uuid_get(&salt);
      @@ -158,64 +286,67 @@ static apr_status_t encrypt_string(request_rec * r, const apr_crypto_t *f,
           }
       
           /* encrypt using the first passphrase in the list */
      -    passphrase = APR_ARRAY_IDX(dconf->passphrases, 0, char *);
      -    res = apr_crypto_passphrase(&key, &ivSize, passphrase,
      -            strlen(passphrase),
      +    passphrase = APR_ARRAY_IDX(dconf->passphrases, 0, const char *);
      +    passlen = strlen(passphrase);
      +    res = apr_crypto_passphrase(&key, &ivSize, passphrase, passlen,
                   (unsigned char *) (&salt), sizeof(apr_uuid_t),
                   *cipher, APR_MODE_CBC, 1, 4096, f, r->pool);
           if (APR_STATUS_IS_ENOKEY(res)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01825)
                       "the passphrase '%s' was empty", passphrase);
           }
           if (APR_STATUS_IS_EPADDING(res)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01826)
                       "padding is not supported for cipher");
           }
           if (APR_STATUS_IS_EKEYTYPE(res)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01827)
                       "the key type is not known");
           }
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01828)
                       "encryption could not be configured.");
               return res;
           }
       
           res = apr_crypto_block_encrypt_init(&block, &iv, key, &blockSize, r->pool);
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01829)
                       "apr_crypto_block_encrypt_init failed");
               return res;
           }
       
           /* encrypt the given string */
      -    res = apr_crypto_block_encrypt(&encrypt, &encryptlen, (unsigned char *)in,
      -            strlen(in), block);
      +    res = apr_crypto_block_encrypt(&encrypt, &encryptlen,
      +                                   (const unsigned char *)in, strlen(in),
      +                                   block);
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01830)
                       "apr_crypto_block_encrypt failed");
               return res;
           }
           res = apr_crypto_block_encrypt_finish(encrypt + encryptlen, &tlen, block);
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01831)
                       "apr_crypto_block_encrypt_finish failed");
               return res;
           }
           encryptlen += tlen;
       
      -    /* prepend the salt and the iv to the result */
      -    combined = apr_palloc(r->pool, ivSize + encryptlen + sizeof(apr_uuid_t));
      -    memcpy(combined, &salt, sizeof(apr_uuid_t));
      -    memcpy(combined + sizeof(apr_uuid_t), iv, ivSize);
      -    memcpy(combined + sizeof(apr_uuid_t) + ivSize, encrypt, encryptlen);
      -
      -    /* base64 encode the result */
      -    base64 = apr_palloc(r->pool, apr_base64_encode_len(ivSize + encryptlen +
      -                    sizeof(apr_uuid_t) + 1)
      -            * sizeof(char));
      -    apr_base64_encode(base64, (const char *) combined,
      -            ivSize + encryptlen + sizeof(apr_uuid_t));
      +    /* prepend the salt and the iv to the result (keep room for the MAC) */
      +    combinedlen = AP_SIPHASH_DSIZE + sizeof(apr_uuid_t) + ivSize + encryptlen;
      +    combined = apr_palloc(r->pool, combinedlen);
      +    memcpy(combined + AP_SIPHASH_DSIZE, &salt, sizeof(apr_uuid_t));
      +    memcpy(combined + AP_SIPHASH_DSIZE + sizeof(apr_uuid_t), iv, ivSize);
      +    memcpy(combined + AP_SIPHASH_DSIZE + sizeof(apr_uuid_t) + ivSize,
      +           encrypt, encryptlen);
      +    /* authenticate the whole salt+IV+ciphertext with a leading MAC */
      +    compute_auth(combined + AP_SIPHASH_DSIZE, combinedlen - AP_SIPHASH_DSIZE,
      +                 passphrase, passlen, combined);
      +
      +    /* base64 encode the result (APR handles the trailing '\0') */
      +    base64 = apr_palloc(r->pool, apr_base64_encode_len(combinedlen));
      +    apr_base64_encode(base64, (const char *) combined, combinedlen);
           *out = base64;
       
           return res;
      @@ -239,8 +370,8 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
           apr_size_t decodedlen;
           char *decoded;
           apr_size_t blockSize = 0;
      -    apr_uuid_t salt;
           apr_crypto_block_key_type_e *cipher;
      +    unsigned char auth[AP_SIPHASH_DSIZE];
           int i = 0;
       
           /* strip base64 from the string */
      @@ -248,6 +379,13 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
           decodedlen = apr_base64_decode(decoded, in);
           decoded[decodedlen] = '\0';
       
      +    /* sanity check - decoded too short? */
      +    if (decodedlen < (AP_SIPHASH_DSIZE + sizeof(apr_uuid_t))) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO()
      +                "too short to decrypt, aborting");
      +        return APR_ECRYPT;
      +    }
      +
           res = crypt_init(r, f, &cipher, dconf);
           if (res != APR_SUCCESS) {
               return res;
      @@ -256,38 +394,49 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
           /* try each passphrase in turn */
           for (; i < dconf->passphrases->nelts; i++) {
               const char *passphrase = APR_ARRAY_IDX(dconf->passphrases, i, char *);
      -        apr_size_t len = decodedlen;
      -        char *slider = decoded;
      +        apr_size_t passlen = strlen(passphrase);
      +        apr_size_t len = decodedlen - AP_SIPHASH_DSIZE;
      +        unsigned char *slider = (unsigned char *)decoded + AP_SIPHASH_DSIZE;
      +
      +        /* Verify authentication of the whole salt+IV+ciphertext by computing
      +         * the MAC and comparing it (timing safe) with the one in the payload.
      +         */
      +        compute_auth(slider, len, passphrase, passlen, auth);
      +        if (!ap_crypto_equals(auth, decoded, AP_SIPHASH_DSIZE)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO()
      +                    "auth does not match, skipping");
      +            continue;
      +        }
       
               /* encrypt using the first passphrase in the list */
      -        res = apr_crypto_passphrase(&key, &ivSize, passphrase,
      -                strlen(passphrase),
      -                (unsigned char *)decoded, sizeof(apr_uuid_t),
      -                *cipher, APR_MODE_CBC, 1, 4096, f, r->pool);
      +        res = apr_crypto_passphrase(&key, &ivSize, passphrase, passlen,
      +                                    slider, sizeof(apr_uuid_t),
      +                                    *cipher, APR_MODE_CBC, 1, 4096,
      +                                    f, r->pool);
               if (APR_STATUS_IS_ENOKEY(res)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01832)
                           "the passphrase '%s' was empty", passphrase);
                   continue;
               }
               else if (APR_STATUS_IS_EPADDING(res)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01833)
                           "padding is not supported for cipher");
                   continue;
               }
               else if (APR_STATUS_IS_EKEYTYPE(res)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01834)
                           "the key type is not known");
                   continue;
               }
               else if (APR_SUCCESS != res) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01835)
                           "encryption could not be configured.");
                   continue;
               }
       
               /* sanity check - decoded too short? */
      -        if (decodedlen < (sizeof(apr_uuid_t) + ivSize)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, LOG_PREFIX
      +        if (len < (sizeof(apr_uuid_t) + ivSize)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(01836)
                           "too short to decrypt, skipping");
                   res = APR_ECRYPT;
                   continue;
      @@ -297,10 +446,10 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
               slider += sizeof(apr_uuid_t);
               len -= sizeof(apr_uuid_t);
       
      -        res = apr_crypto_block_decrypt_init(&block, &blockSize, (unsigned char *)slider, key,
      -                r->pool);
      +        res = apr_crypto_block_decrypt_init(&block, &blockSize, slider, key,
      +                                            r->pool);
               if (APR_SUCCESS != res) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01837)
                           "apr_crypto_block_decrypt_init failed");
                   continue;
               }
      @@ -311,9 +460,9 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
       
               /* decrypt the given string */
               res = apr_crypto_block_decrypt(&decrypted, &decryptedlen,
      -                (unsigned char *)slider, len, block);
      +                                       slider, len, block);
               if (res) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01838)
                           "apr_crypto_block_decrypt failed");
                   continue;
               }
      @@ -321,7 +470,7 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
       
               res = apr_crypto_block_decrypt_finish(decrypted + decryptedlen, &tlen, block);
               if (APR_SUCCESS != res) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01839)
                           "apr_crypto_block_decrypt_finish failed");
                   continue;
               }
      @@ -332,7 +481,7 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
           }
       
           if (APR_SUCCESS != res) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, res, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, res, r, APLOGNO(01840)
                       "decryption failed");
           }
       
      @@ -346,7 +495,7 @@ static apr_status_t decrypt_string(request_rec * r, const apr_crypto_t *f,
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -AP_DECLARE(int) ap_session_crypto_encode(request_rec * r, session_rec * z)
      +static apr_status_t session_crypto_encode(request_rec * r, session_rec * z)
       {
       
           char *encoded = NULL;
      @@ -359,7 +508,7 @@ AP_DECLARE(int) ap_session_crypto_encode(request_rec * r, session_rec * z)
               apr_pool_userdata_get((void **)&f, CRYPTO_KEY, r->server->process->pconf);
               res = encrypt_string(r, f, dconf, z->encoded, &encoded);
               if (res != OK) {
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, res, r, APLOGNO(01841)
                           "encrypt session failed");
                   return res;
               }
      @@ -376,7 +525,8 @@ AP_DECLARE(int) ap_session_crypto_encode(request_rec * r, session_rec * z)
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -AP_DECLARE(int) ap_session_crypto_decode(request_rec * r, session_rec * z)
      +static apr_status_t session_crypto_decode(request_rec * r,
      +        session_rec * z)
       {
       
           char *encoded = NULL;
      @@ -390,7 +540,7 @@ AP_DECLARE(int) ap_session_crypto_decode(request_rec * r, session_rec * z)
                       r->server->process->pconf);
               res = decrypt_string(r, f, dconf, z->encoded, &encoded);
               if (res != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, res, r, APLOGNO(01842)
                           "decrypt session failed, wrong passphrase?");
                   return res;
               }
      @@ -404,7 +554,7 @@ AP_DECLARE(int) ap_session_crypto_decode(request_rec * r, session_rec * z)
       /**
        * Initialise the SSL in the post_config hook.
        */
      -AP_DECLARE(int) ap_session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
      +static int session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
               apr_pool_t *ptemp, server_rec *s)
       {
           const apr_crypto_driver_t *driver = NULL;
      @@ -427,31 +577,31 @@ AP_DECLARE(int) ap_session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
       
               rv = apr_crypto_init(p);
               if (APR_SUCCESS != rv) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, LOG_PREFIX
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01843)
                           "APR crypto could not be initialised");
                   return rv;
               }
       
               rv = apr_crypto_get_driver(&driver, conf->library, conf->params, &err, p);
               if (APR_EREINIT == rv) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, LOG_PREFIX
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(01844)
                           "warning: crypto for '%s' was already initialised, "
                           "using existing configuration", conf->library);
                   rv = APR_SUCCESS;
               }
               if (APR_SUCCESS != rv && err) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, LOG_PREFIX
      -                    "%s", err->msg);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01845)
      +                    "The crypto library '%s' could not be loaded: %s (%s: %d)", conf->library, err->msg, err->reason, err->rc);
                   return rv;
               }
               if (APR_ENOTIMPL == rv) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, LOG_PREFIX
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01846)
                           "The crypto library '%s' could not be found",
                           conf->library);
                   return rv;
               }
               if (APR_SUCCESS != rv || !driver) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, LOG_PREFIX
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01847)
                           "The crypto library '%s' could not be loaded",
                           conf->library);
                   return rv;
      @@ -459,13 +609,13 @@ AP_DECLARE(int) ap_session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
       
               rv = apr_crypto_make(&f, driver, conf->params, p);
               if (APR_SUCCESS != rv) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, LOG_PREFIX
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01848)
                           "The crypto library '%s' could not be initialised",
                           conf->library);
                   return rv;
               }
       
      -        ap_log_error(APLOG_MARK, APLOG_INFO, rv, s, LOG_PREFIX
      +        ap_log_error(APLOG_MARK, APLOG_INFO, rv, s, APLOGNO(01849)
                       "The crypto library '%s' was loaded successfully",
                       conf->library);
       
      @@ -540,18 +690,77 @@ static const char *set_crypto_driver(cmd_parms * cmd, void *config, const char *
       
       static const char *set_crypto_passphrase(cmd_parms * cmd, void *config, const char *arg)
       {
      -    char *word, *val;
      -    int passphrase_set = 0;
      +    int arglen = strlen(arg);
      +    char **argv;
      +    char *result;
           const char **passphrase;
           session_crypto_dir_conf *dconf = (session_crypto_dir_conf *) config;
       
           passphrase = apr_array_push(dconf->passphrases);
      -    *passphrase = arg;
      +
      +    if ((arglen > 5) && strncmp(arg, "exec:", 5) == 0) {
      +        if (apr_tokenize_to_argv(arg+5, &argv, cmd->temp_pool) != APR_SUCCESS) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Unable to parse exec arguments from ",
      +                               arg+5, NULL);
      +        }
      +        argv[0] = ap_server_root_relative(cmd->temp_pool, argv[0]);
      +
      +        if (!argv[0]) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Invalid SessionCryptoPassphrase exec location:",
      +                               arg+5, NULL);
      +        }
      +        result = ap_get_exec_line(cmd->pool,
      +                                  (const char*)argv[0], (const char * const *)argv);
      +
      +        if(!result) {
      +            return apr_pstrcat(cmd->pool,
      +                               "Unable to get bind password from exec of ",
      +                               arg+5, NULL);
      +        }
      +        *passphrase = result;
      +    }
      +    else {
      +        *passphrase = arg;
      +    }
      +
           dconf->passphrases_set = 1;
       
           return NULL;
       }
       
      +static const char *set_crypto_passphrase_file(cmd_parms *cmd, void *config,
      +                                  const char *filename)
      +{
      +    char buffer[MAX_STRING_LEN];
      +    char *arg;
      +    const char *args;
      +    ap_configfile_t *file;
      +    apr_status_t rv;
      +
      +    filename = ap_server_root_relative(cmd->temp_pool, filename);
      +    rv = ap_pcfg_openfile(&file, cmd->temp_pool, filename);
      +    if (rv != APR_SUCCESS) {
      +        return apr_psprintf(cmd->pool, "%s: Could not open file %s: %pm",
      +                            cmd->cmd->name, filename, &rv);
      +    }
      +
      +    while (!(ap_cfg_getline(buffer, sizeof(buffer), file))) {
      +        args = buffer;
      +        while (*(arg = ap_getword_conf(cmd->pool, &args)) != '\0') {
      +            if (*arg == '#') {
      +                break;
      +            }
      +            set_crypto_passphrase(cmd, config, arg);
      +        }
      +    }
      +
      +    ap_cfg_closefile(file);
      +
      +    return NULL;
      +}
      +
       static const char *set_crypto_cipher(cmd_parms * cmd, void *config, const char *cipher)
       {
           session_crypto_dir_conf *dconf = (session_crypto_dir_conf *) config;
      @@ -566,6 +775,8 @@ static const command_rec session_crypto_cmds[] =
       {
           AP_INIT_ITERATE("SessionCryptoPassphrase", set_crypto_passphrase, NULL, RSRC_CONF|OR_AUTHCFG,
                   "The passphrase(s) used to encrypt the session. First will be used for encryption, all phrases will be accepted for decryption"),
      +    AP_INIT_TAKE1("SessionCryptoPassphraseFile", set_crypto_passphrase_file, NULL, RSRC_CONF|ACCESS_CONF,
      +            "File containing passphrase(s) used to encrypt the session, one per line. First will be used for encryption, all phrases will be accepted for decryption"),
           AP_INIT_TAKE1("SessionCryptoCipher", set_crypto_cipher, NULL, RSRC_CONF|OR_AUTHCFG,
                   "The underlying crypto cipher to use"),
           AP_INIT_RAW_ARGS("SessionCryptoDriver", set_crypto_driver, NULL, RSRC_CONF,
      @@ -575,9 +786,9 @@ static const command_rec session_crypto_cmds[] =
       
       static void register_hooks(apr_pool_t * p)
       {
      -    ap_hook_session_encode(ap_session_crypto_encode, NULL, NULL, APR_HOOK_LAST);
      -    ap_hook_session_decode(ap_session_crypto_decode, NULL, NULL, APR_HOOK_FIRST);
      -    ap_hook_post_config(ap_session_crypto_init, NULL, NULL, APR_HOOK_LAST);
      +    ap_hook_session_encode(session_crypto_encode, NULL, NULL, APR_HOOK_LAST);
      +    ap_hook_session_decode(session_crypto_decode, NULL, NULL, APR_HOOK_FIRST);
      +    ap_hook_post_config(session_crypto_init, NULL, NULL, APR_HOOK_LAST);
       }
       
       AP_DECLARE_MODULE(session_crypto) =
      diff --git a/modules/session/mod_session_crypto.dep b/modules/session/mod_session_crypto.dep
      new file mode 100644
      index 00000000000..fff2fa5cd2f
      --- /dev/null
      +++ b/modules/session/mod_session_crypto.dep
      @@ -0,0 +1,57 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_session_crypto.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_session_crypto.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_crypto.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr-util\include\apu_errno.h"\
      +	"..\..\srclib\apr-util\include\apu_version.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_version.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_session.h"\
      +	
      diff --git a/modules/session/mod_session_crypto.mak b/modules/session/mod_session_crypto.mak
      new file mode 100644
      index 00000000000..13a4c67eab8
      --- /dev/null
      +++ b/modules/session/mod_session_crypto.mak
      @@ -0,0 +1,381 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_session_crypto.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_session_crypto - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_session_crypto - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_session_crypto - Win32 Release" && "$(CFG)" != "mod_session_crypto - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_session_crypto.mak" CFG="mod_session_crypto - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_session_crypto - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_session_crypto - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_crypto.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_session_crypto.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_session - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_crypto.obj"
      +	-@erase "$(INTDIR)\mod_session_crypto.res"
      +	-@erase "$(INTDIR)\mod_session_crypto_src.idb"
      +	-@erase "$(INTDIR)\mod_session_crypto_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_crypto.exp"
      +	-@erase "$(OUTDIR)\mod_session_crypto.lib"
      +	-@erase "$(OUTDIR)\mod_session_crypto.pdb"
      +	-@erase "$(OUTDIR)\mod_session_crypto.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_crypto_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_crypto.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_session_crypto.so" /d LONG_NAME="session_crypto_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_crypto.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_crypto.pdb" /debug /out:"$(OUTDIR)\mod_session_crypto.so" /implib:"$(OUTDIR)\mod_session_crypto.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_crypto.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_crypto.obj" \
      +	"$(INTDIR)\mod_session_crypto.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_crypto.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_session_crypto.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_crypto.so"
      +   if exist .\Release\mod_session_crypto.so.manifest mt.exe -manifest .\Release\mod_session_crypto.so.manifest -outputresource:.\Release\mod_session_crypto.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_crypto.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_session_crypto.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_session - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_crypto.obj"
      +	-@erase "$(INTDIR)\mod_session_crypto.res"
      +	-@erase "$(INTDIR)\mod_session_crypto_src.idb"
      +	-@erase "$(INTDIR)\mod_session_crypto_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_crypto.exp"
      +	-@erase "$(OUTDIR)\mod_session_crypto.lib"
      +	-@erase "$(OUTDIR)\mod_session_crypto.pdb"
      +	-@erase "$(OUTDIR)\mod_session_crypto.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_crypto_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_crypto.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_session_crypto.so" /d LONG_NAME="session_crypto_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_crypto.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_crypto.pdb" /debug /out:"$(OUTDIR)\mod_session_crypto.so" /implib:"$(OUTDIR)\mod_session_crypto.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_crypto.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_crypto.obj" \
      +	"$(INTDIR)\mod_session_crypto.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_crypto.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_session_crypto.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_crypto.so"
      +   if exist .\Debug\mod_session_crypto.so.manifest mt.exe -manifest .\Debug\mod_session_crypto.so.manifest -outputresource:.\Debug\mod_session_crypto.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_session_crypto.dep")
      +!INCLUDE "mod_session_crypto.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_session_crypto.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_session_crypto - Win32 Release" || "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +"mod_session - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" 
      +   cd "."
      +
      +"mod_session - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +"mod_session - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" 
      +   cd "."
      +
      +"mod_session - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_session_crypto - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_session_crypto.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_crypto.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_session_crypto.so" /d LONG_NAME="session_crypto_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_session_crypto - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_session_crypto.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_crypto.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_session_crypto.so" /d LONG_NAME="session_crypto_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_session_crypto.c
      +
      +"$(INTDIR)\mod_session_crypto.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/session/mod_session_dbd.c b/modules/session/mod_session_dbd.c
      index 37bedf04e78..0be7306f820 100644
      --- a/modules/session/mod_session_dbd.c
      +++ b/modules/session/mod_session_dbd.c
      @@ -23,7 +23,6 @@
       #include "mod_dbd.h"
       #include "mpm_common.h"
       
      -#define LOG_PREFIX "mod_session_dbd: "
       #define MOD_SESSION_DBD "mod_session_dbd"
       
       module AP_MODULE_DECLARE_DATA session_dbd_module;
      @@ -67,7 +66,7 @@ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp,
               session_dbd_prepare_fn = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare);
               session_dbd_acquire_fn = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire);
               if (!session_dbd_prepare_fn || !session_dbd_acquire_fn) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01850)
                                 "You must load mod_dbd to enable AuthDBD functions");
                   return APR_EGENERAL;
               }
      @@ -75,14 +74,14 @@ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp,
       
           dbd = session_dbd_acquire_fn(r);
           if (!dbd) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01851)
                             "failed to acquire database connection");
               return APR_EGENERAL;
           }
       
           statement = apr_hash_get(dbd->prepared, query, APR_HASH_KEY_STRING);
           if (!statement) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01852)
                             "failed to find the prepared statement called '%s'", query);
               return APR_EGENERAL;
           }
      @@ -95,8 +94,11 @@ static apr_status_t dbd_init(request_rec *r, const char *query, ap_dbd_t **dbdp,
       
       /**
        * Load the session by the key specified.
      + *
      + * The session value is allocated using the passed apr_pool_t.
        */
      -static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
      +static apr_status_t dbd_load(apr_pool_t *p, request_rec * r,
      +                             const char *key, const char **val)
       {
       
           apr_status_t rv;
      @@ -110,7 +112,7 @@ static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
                                                             &session_dbd_module);
       
           if (conf->selectlabel == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01853)
                             "no SessionDBDselectlabel has been specified");
               return APR_EGENERAL;
           }
      @@ -122,7 +124,7 @@ static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
           rv = apr_dbd_pvbselect(dbd->driver, r->pool, dbd->handle, &res, statement,
                                 0, key, &expiry, NULL);
           if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01854)
                             "query execution error saving session '%s' "
                             "in database using query '%s': %s", key, conf->selectlabel,
                             apr_dbd_error(dbd->driver, dbd->handle, rv));
      @@ -132,14 +134,14 @@ static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
                rv != -1;
                rv = apr_dbd_get_row(dbd->driver, r->pool, res, &row, -1)) {
               if (rv != 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01855)
                                 "error retrieving results while saving '%s' "
                                 "in database using query '%s': %s", key, conf->selectlabel,
                                  apr_dbd_error(dbd->driver, dbd->handle, rv));
                   return APR_EGENERAL;
               }
               if (*val == NULL) {
      -            *val = apr_dbd_get_entry(dbd->driver, row, 0);
      +            *val = apr_pstrdup(p, apr_dbd_get_entry(dbd->driver, row, 0));
               }
               /* we can't break out here or row won't get cleaned up */
           }
      @@ -162,7 +164,7 @@ static apr_status_t dbd_load(request_rec * r, const char *key, const char **val)
        *
        * On success, this returns OK.
        */
      -static int session_dbd_load(request_rec * r, session_rec ** z)
      +static apr_status_t session_dbd_load(request_rec * r, session_rec ** z)
       {
       
           session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
      @@ -191,7 +193,7 @@ static int session_dbd_load(request_rec * r, session_rec ** z)
           }
       
           /* first look in the notes */
      -    note = apr_pstrcat(r->pool, MOD_SESSION_DBD, name, NULL);
      +    note = apr_pstrcat(m->pool, MOD_SESSION_DBD, name, NULL);
           zz = (session_rec *)apr_table_get(m->notes, note);
           if (zz) {
               *z = zz;
      @@ -204,7 +206,7 @@ static int session_dbd_load(request_rec * r, session_rec ** z)
               /* load an RFC2109 or RFC2965 compliant cookie */
               ap_cookie_read(r, name, &key, conf->remove);
               if (key) {
      -            ret = dbd_load(r, key, &val);
      +            ret = dbd_load(m->pool, r, key, &val);
                   if (ret != APR_SUCCESS) {
                       return ret;
                   }
      @@ -215,7 +217,7 @@ static int session_dbd_load(request_rec * r, session_rec ** z)
           /* load named session */
           else if (conf->peruser) {
               if (r->user) {
      -            ret = dbd_load(r, r->user, &val);
      +            ret = dbd_load(m->pool, r, r->user, &val);
                   if (ret != APR_SUCCESS) {
                       return ret;
                   }
      @@ -228,15 +230,14 @@ static int session_dbd_load(request_rec * r, session_rec ** z)
           }
       
           /* create a new session and return it */
      -    zz = (session_rec *) apr_pcalloc(r->pool, sizeof(session_rec));
      -    zz->pool = r->pool;
      +    zz = (session_rec *) apr_pcalloc(m->pool, sizeof(session_rec));
      +    zz->pool = m->pool;
           zz->entries = apr_table_make(zz->pool, 10);
      -    zz->uuid = (apr_uuid_t *) apr_pcalloc(zz->pool, sizeof(apr_uuid_t));
      -    if (key) {
      -        apr_uuid_parse(zz->uuid, key);
      -    }
      -    else {
      -        apr_uuid_get(zz->uuid);
      +    if (key && val) {
      +        apr_uuid_t *uuid = apr_pcalloc(zz->pool, sizeof(apr_uuid_t));
      +        if (APR_SUCCESS == apr_uuid_parse(uuid, key)) {
      +            zz->uuid = uuid;
      +        }
           }
           zz->encoded = val;
           *z = zz;
      @@ -251,8 +252,8 @@ static int session_dbd_load(request_rec * r, session_rec ** z)
       /**
        * Save the session by the key specified.
        */
      -static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
      -                             apr_int64_t expiry)
      +static apr_status_t dbd_save(request_rec * r, const char *oldkey,
      +        const char *newkey, const char *val, apr_int64_t expiry)
       {
       
           apr_status_t rv;
      @@ -264,7 +265,7 @@ static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
                                                             &session_dbd_module);
       
           if (conf->updatelabel == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01856)
                             "no SessionDBDupdatelabel has been specified");
               return APR_EGENERAL;
           }
      @@ -273,26 +274,28 @@ static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
           if (rv) {
               return rv;
           }
      -    rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
      -                          val, &expiry, key, NULL);
      -    if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      -                      "query execution error updating session '%s' "
      -                      "using database query '%s': %s", key, conf->updatelabel,
      -                      apr_dbd_error(dbd->driver, dbd->handle, rv));
      -        return APR_EGENERAL;
      -    }
       
      -    /*
      -     * if some rows were updated it means a session existed and was updated,
      -     * so we are done.
      -     */
      -    if (rows != 0) {
      -        return APR_SUCCESS;
      +    if (oldkey) {
      +        rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows,
      +                statement, val, &expiry, newkey, oldkey, NULL);
      +        if (rv) {
      +            ap_log_rerror(
      +                    APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01857) "query execution error updating session '%s' "
      +                    "using database query '%s': %s/%s", oldkey, newkey, conf->updatelabel, apr_dbd_error(dbd->driver, dbd->handle, rv));
      +            return APR_EGENERAL;
      +        }
      +
      +        /*
      +         * if some rows were updated it means a session existed and was updated,
      +         * so we are done.
      +         */
      +        if (rows != 0) {
      +            return APR_SUCCESS;
      +        }
           }
       
           if (conf->insertlabel == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01858)
                             "no SessionDBDinsertlabel has been specified");
               return APR_EGENERAL;
           }
      @@ -302,11 +305,11 @@ static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
               return rv;
           }
           rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
      -                          val, &expiry, key, NULL);
      +                          val, &expiry, newkey, NULL);
           if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01859)
                             "query execution error inserting session '%s' "
      -                      "in database with '%s': %s", key, conf->insertlabel,
      +                      "in database with '%s': %s", newkey, conf->insertlabel,
                             apr_dbd_error(dbd->driver, dbd->handle, rv));
               return APR_EGENERAL;
           }
      @@ -319,9 +322,9 @@ static apr_status_t dbd_save(request_rec * r, const char *key, const char *val,
               return APR_SUCCESS;
           }
       
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01860)
                         "the session insert query did not cause any rows to be added "
      -                  "to the database for session '%s', session not inserted", key);
      +                  "to the database for session '%s', session not inserted", newkey);
       
           return APR_EGENERAL;
       
      @@ -334,38 +337,30 @@ static apr_status_t dbd_remove(request_rec * r, const char *key)
       {
       
           apr_status_t rv;
      +    ap_dbd_t *dbd;
           apr_dbd_prepared_t *statement;
           int rows = 0;
       
           session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
                                                             &session_dbd_module);
      -    ap_dbd_t *dbd = session_dbd_acquire_fn(r);
      -    if (dbd == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      -                      "failed to acquire database connection to remove "
      -                      "session with key '%s'", key);
      -        return APR_EGENERAL;
      -    }
       
           if (conf->deletelabel == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01862)
                             "no SessionDBDdeletelabel has been specified");
               return APR_EGENERAL;
           }
       
      -    statement = apr_hash_get(dbd->prepared, conf->deletelabel,
      -                             APR_HASH_KEY_STRING);
      -    if (statement == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      -                      "prepared statement could not be found for "
      -                      "SessionDBDdeletelabel with the label '%s'",
      -                      conf->deletelabel);
      -        return APR_EGENERAL;
      +    rv = dbd_init(r, conf->deletelabel, &dbd, &statement);
      +    if (rv != APR_SUCCESS) {
      +        /* No need to do additional error logging here, it has already
      +           been done in dbd_init if needed */
      +        return rv;
           }
      +
           rv = apr_dbd_pvbquery(dbd->driver, r->pool, dbd->handle, &rows, statement,
                                 key, NULL);
           if (rv != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01864)
                             "query execution error removing session '%s' "
                             "from database", key);
               return rv;
      @@ -403,30 +398,41 @@ static apr_status_t dbd_clean(apr_pool_t *p, server_rec *s)
        * @param r The request pointer.
        * @param z A pointer to where the session will be written.
        */
      -static int session_dbd_save(request_rec * r, session_rec * z)
      +static apr_status_t session_dbd_save(request_rec * r, session_rec * z)
       {
       
      -    char *buffer;
           apr_status_t ret = APR_SUCCESS;
           session_dbd_dir_conf *conf = ap_get_module_config(r->per_dir_config,
                                                             &session_dbd_module);
       
           /* support anonymous sessions */
           if (conf->name_set || conf->name2_set) {
      +        char *oldkey = NULL, *newkey = NULL;
       
               /* don't cache pages with a session */
               apr_table_addn(r->headers_out, "Cache-Control", "no-cache");
       
      -        /* must we create a uuid? */
      -        buffer = apr_pcalloc(r->pool, APR_UUID_FORMATTED_LENGTH + 1);
      -        apr_uuid_format(buffer, z->uuid);
      +        /* if the session is new or changed, make a new session ID */
      +        if (z->uuid) {
      +            oldkey = apr_pcalloc(r->pool, APR_UUID_FORMATTED_LENGTH + 1);
      +            apr_uuid_format(oldkey, z->uuid);
      +        }
      +        if (z->dirty || !oldkey) {
      +            z->uuid = apr_pcalloc(z->pool, sizeof(apr_uuid_t));
      +            apr_uuid_get(z->uuid);
      +            newkey = apr_pcalloc(r->pool, APR_UUID_FORMATTED_LENGTH + 1);
      +            apr_uuid_format(newkey, z->uuid);
      +        }
      +        else {
      +            newkey = oldkey;
      +        }
       
               /* save the session with the uuid as key */
               if (z->encoded && z->encoded[0]) {
      -            ret = dbd_save(r, buffer, z->encoded, z->expiry);
      +            ret = dbd_save(r, oldkey, newkey, z->encoded, z->expiry);
               }
               else {
      -            ret = dbd_remove(r, buffer);
      +            ret = dbd_remove(r, oldkey);
               }
               if (ret != APR_SUCCESS) {
                   return ret;
      @@ -434,13 +440,13 @@ static int session_dbd_save(request_rec * r, session_rec * z)
       
               /* create RFC2109 compliant cookie */
               if (conf->name_set) {
      -            ap_cookie_write(r, conf->name, buffer, conf->name_attrs, z->maxage,
      +            ap_cookie_write(r, conf->name, newkey, conf->name_attrs, z->maxage,
                                   r->headers_out, r->err_headers_out, NULL);
               }
       
               /* create RFC2965 compliant cookie */
               if (conf->name2_set) {
      -            ap_cookie_write2(r, conf->name2, buffer, conf->name2_attrs, z->maxage,
      +            ap_cookie_write2(r, conf->name2, newkey, conf->name2_attrs, z->maxage,
                                    r->headers_out, r->err_headers_out, NULL);
               }
       
      @@ -455,14 +461,14 @@ static int session_dbd_save(request_rec * r, session_rec * z)
               apr_table_addn(r->headers_out, "Cache-Control", "no-cache");
       
               if (r->user) {
      -            ret = dbd_save(r, r->user, z->encoded, z->expiry);
      +            ret = dbd_save(r, r->user, r->user, z->encoded, z->expiry);
                   if (ret != APR_SUCCESS) {
                       return ret;
                   }
                   return OK;
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01865)
                      "peruser sessions can only be saved if a user is logged in, "
                                 "session not saved: %s", r->uri);
               }
      diff --git a/modules/session/mod_session_dbd.dep b/modules/session/mod_session_dbd.dep
      new file mode 100644
      index 00000000000..9cb6808be25
      --- /dev/null
      +++ b/modules/session/mod_session_dbd.dep
      @@ -0,0 +1,60 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_session_dbd.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_session_dbd.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_cookies.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_dbd.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_uuid.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\database\mod_dbd.h"\
      +	".\mod_session.h"\
      +	
      diff --git a/modules/session/mod_session_dbd.mak b/modules/session/mod_session_dbd.mak
      new file mode 100644
      index 00000000000..e16c61ef95f
      --- /dev/null
      +++ b/modules/session/mod_session_dbd.mak
      @@ -0,0 +1,409 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_session_dbd.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_session_dbd - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_session_dbd - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_session_dbd - Win32 Release" && "$(CFG)" != "mod_session_dbd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_session_dbd.mak" CFG="mod_session_dbd - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_session_dbd - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_session_dbd - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Release" "mod_dbd - Win32 Release" "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_session_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" "mod_dbd - Win32 ReleaseCLEAN" "mod_session - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_dbd.obj"
      +	-@erase "$(INTDIR)\mod_session_dbd.res"
      +	-@erase "$(INTDIR)\mod_session_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_session_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_session_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_session_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_session_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../database" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_dbd_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_session_dbd.so" /d LONG_NAME="session_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_dbd.pdb" /debug /out:"$(OUTDIR)\mod_session_dbd.so" /implib:"$(OUTDIR)\mod_session_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_dbd.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_dbd.obj" \
      +	"$(INTDIR)\mod_session_dbd.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib" \
      +	"..\database\Release\mod_dbd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_session_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_dbd.so"
      +   if exist .\Release\mod_session_dbd.so.manifest mt.exe -manifest .\Release\mod_session_dbd.so.manifest -outputresource:.\Release\mod_session_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_session_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "mod_session - Win32 Debug" "mod_dbd - Win32 Debug" "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_session_dbd.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" "mod_dbd - Win32 DebugCLEAN" "mod_session - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_session_dbd.obj"
      +	-@erase "$(INTDIR)\mod_session_dbd.res"
      +	-@erase "$(INTDIR)\mod_session_dbd_src.idb"
      +	-@erase "$(INTDIR)\mod_session_dbd_src.pdb"
      +	-@erase "$(OUTDIR)\mod_session_dbd.exp"
      +	-@erase "$(OUTDIR)\mod_session_dbd.lib"
      +	-@erase "$(OUTDIR)\mod_session_dbd.pdb"
      +	-@erase "$(OUTDIR)\mod_session_dbd.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../database" /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_session_dbd_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_session_dbd.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_session_dbd.so" /d LONG_NAME="session_dbd_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_session_dbd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_session_dbd.pdb" /debug /out:"$(OUTDIR)\mod_session_dbd.so" /implib:"$(OUTDIR)\mod_session_dbd.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_session_dbd.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_session_dbd.obj" \
      +	"$(INTDIR)\mod_session_dbd.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib" \
      +	"..\database\Debug\mod_dbd.lib" \
      +	"$(OUTDIR)\mod_session.lib"
      +
      +"$(OUTDIR)\mod_session_dbd.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_session_dbd.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_session_dbd.so"
      +   if exist .\Debug\mod_session_dbd.so.manifest mt.exe -manifest .\Debug\mod_session_dbd.so.manifest -outputresource:.\Debug\mod_session_dbd.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_session_dbd.dep")
      +!INCLUDE "mod_session_dbd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_session_dbd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_session_dbd - Win32 Release" || "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\session"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\session"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +"mod_dbd - Win32 Release" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" 
      +   cd "..\session"
      +
      +"mod_dbd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\session"
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +"mod_dbd - Win32 Debug" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" 
      +   cd "..\session"
      +
      +"mod_dbd - Win32 DebugCLEAN" : 
      +   cd ".\..\database"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_dbd.mak" CFG="mod_dbd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\session"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +"mod_session - Win32 Release" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" 
      +   cd "."
      +
      +"mod_session - Win32 ReleaseCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Release" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +"mod_session - Win32 Debug" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" 
      +   cd "."
      +
      +"mod_session - Win32 DebugCLEAN" : 
      +   cd "."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\mod_session.mak" CFG="mod_session - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "."
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_session_dbd - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_session_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_session_dbd.so" /d LONG_NAME="session_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_session_dbd - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_session_dbd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_session_dbd.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_session_dbd.so" /d LONG_NAME="session_dbd_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_session_dbd.c
      +
      +"$(INTDIR)\mod_session_dbd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/slotmem/mod_slotmem_plain.c b/modules/slotmem/mod_slotmem_plain.c
      index 47da15b49a0..4c2b19b61da 100644
      --- a/modules/slotmem/mod_slotmem_plain.c
      +++ b/modules/slotmem/mod_slotmem_plain.c
      @@ -75,7 +75,7 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new, const char *name
               if (name[0] == ':')
                   fname = name;
               else
      -            fname = ap_server_root_relative(pool, name);
      +            fname = ap_runtime_dir_relative(pool, name);
       
               /* first try to attach to existing slotmem */
               if (next) {
      @@ -126,7 +126,7 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new, const char *name
               if (name[0] == ':')
                   fname = name;
               else
      -            fname = ap_server_root_relative(pool, name);
      +            fname = ap_runtime_dir_relative(pool, name);
           }
           else
               return APR_ENOSHMAVAIL;
      @@ -154,7 +154,7 @@ static apr_status_t slotmem_dptr(ap_slotmem_instance_t *score, unsigned int id,
           if (!score)
               return APR_ENOSHMAVAIL;
           if (id >= score->num)
      -        return APR_ENOSHMAVAIL;
      +        return APR_EINVAL;
       
           ptr = (char *)score->base + score->size * id;
           if (!ptr)
      @@ -174,7 +174,10 @@ static apr_status_t slotmem_get(ap_slotmem_instance_t *slot, unsigned int id, un
           }
       
           inuse = slot->inuse + id;
      -    if (id >= slot->num || (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse)) {
      +    if (id >= slot->num) {
      +        return APR_EINVAL;
      +    }
      +    if (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse) {
               return APR_NOTFOUND;
           }
           ret = slotmem_dptr(slot, id, &ptr);
      @@ -197,7 +200,10 @@ static apr_status_t slotmem_put(ap_slotmem_instance_t *slot, unsigned int id, un
           }
       
           inuse = slot->inuse + id;
      -    if (id >= slot->num || (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse)) {
      +    if (id >= slot->num) {
      +        return APR_EINVAL;
      +    }
      +    if (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse) {
               return APR_NOTFOUND;
           }
           ret = slotmem_dptr(slot, id, &ptr);
      @@ -251,13 +257,29 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id)
               }
           }
           if (i >= slot->num) {
      -        return APR_ENOSHMAVAIL;
      +        return APR_EINVAL;
           }
           *inuse = 1;
           *id = i;
           return APR_SUCCESS;
       }
       
      +static apr_status_t slotmem_fgrab(ap_slotmem_instance_t *slot, unsigned int id)
      +{
      +    char *inuse;
      +    
      +    if (!slot) {
      +        return APR_ENOSHMAVAIL;
      +    }
      +    
      +    if (id >= slot->num) {
      +        return APR_EINVAL;
      +    }
      +    inuse = slot->inuse + id;
      +    *inuse = 1;
      +    return APR_SUCCESS;
      +}
      +
       static apr_status_t slotmem_release(ap_slotmem_instance_t *slot, unsigned int id)
       {
           char *inuse;
      @@ -268,7 +290,10 @@ static apr_status_t slotmem_release(ap_slotmem_instance_t *slot, unsigned int id
       
           inuse = slot->inuse;
       
      -    if (id >= slot->num || !inuse[id] ) {
      +    if (id >= slot->num) {
      +        return APR_EINVAL;
      +    }
      +    if (!inuse[id] ) {
               return APR_NOTFOUND;
           }
           inuse[id] = 0;
      @@ -287,7 +312,8 @@ static const ap_slotmem_provider_t storage = {
           &slotmem_num_free_slots,
           &slotmem_slot_size,
           &slotmem_grab,
      -    &slotmem_release
      +    &slotmem_release,
      +    &slotmem_fgrab
       };
       
       static int pre_config(apr_pool_t *p, apr_pool_t *plog,
      diff --git a/modules/slotmem/mod_slotmem_plain.dep b/modules/slotmem/mod_slotmem_plain.dep
      new file mode 100644
      index 00000000000..274535e7e7c
      --- /dev/null
      +++ b/modules/slotmem/mod_slotmem_plain.dep
      @@ -0,0 +1,51 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_slotmem_plain.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_slotmem_plain.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/slotmem/mod_slotmem_plain.dsp b/modules/slotmem/mod_slotmem_plain.dsp
      index d15ccae2be3..023e31cbab4 100644
      --- a/modules/slotmem/mod_slotmem_plain.dsp
      +++ b/modules/slotmem/mod_slotmem_plain.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="echo_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="echo_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/slotmem/mod_slotmem_plain.mak b/modules/slotmem/mod_slotmem_plain.mak
      new file mode 100644
      index 00000000000..4e7891a0a25
      --- /dev/null
      +++ b/modules/slotmem/mod_slotmem_plain.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_slotmem_plain.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_slotmem_plain - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_slotmem_plain - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_slotmem_plain - Win32 Release" && "$(CFG)" != "mod_slotmem_plain - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_slotmem_plain.mak" CFG="mod_slotmem_plain - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_slotmem_plain - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_slotmem_plain - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_plain - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_slotmem_plain.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_slotmem_plain.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_slotmem_plain.obj"
      +	-@erase "$(INTDIR)\mod_slotmem_plain.res"
      +	-@erase "$(INTDIR)\mod_slotmem_plain_src.idb"
      +	-@erase "$(INTDIR)\mod_slotmem_plain_src.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.exp"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.lib"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_slotmem_plain_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_slotmem_plain.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_slotmem_plain.pdb" /debug /out:"$(OUTDIR)\mod_slotmem_plain.so" /implib:"$(OUTDIR)\mod_slotmem_plain.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_slotmem_plain.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_slotmem_plain.obj" \
      +	"$(INTDIR)\mod_slotmem_plain.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_slotmem_plain.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_slotmem_plain.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_slotmem_plain.so"
      +   if exist .\Release\mod_slotmem_plain.so.manifest mt.exe -manifest .\Release\mod_slotmem_plain.so.manifest -outputresource:.\Release\mod_slotmem_plain.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_slotmem_plain.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_slotmem_plain.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_slotmem_plain.obj"
      +	-@erase "$(INTDIR)\mod_slotmem_plain.res"
      +	-@erase "$(INTDIR)\mod_slotmem_plain_src.idb"
      +	-@erase "$(INTDIR)\mod_slotmem_plain_src.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.exp"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.lib"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_plain.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_slotmem_plain_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_slotmem_plain.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_slotmem_plain.pdb" /debug /out:"$(OUTDIR)\mod_slotmem_plain.so" /implib:"$(OUTDIR)\mod_slotmem_plain.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_slotmem_plain.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_slotmem_plain.obj" \
      +	"$(INTDIR)\mod_slotmem_plain.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_slotmem_plain.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_slotmem_plain.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_slotmem_plain.so"
      +   if exist .\Debug\mod_slotmem_plain.so.manifest mt.exe -manifest .\Debug\mod_slotmem_plain.so.manifest -outputresource:.\Debug\mod_slotmem_plain.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_slotmem_plain.dep")
      +!INCLUDE "mod_slotmem_plain.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_slotmem_plain.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_slotmem_plain - Win32 Release" || "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_slotmem_plain - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\slotmem"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\slotmem"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_plain - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\slotmem"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\slotmem"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_plain - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\slotmem"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\slotmem"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\slotmem"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_slotmem_plain - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_slotmem_plain.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_plain - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_slotmem_plain.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_slotmem_plain.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_slotmem_plain.so" /d LONG_NAME="slotmem_plain_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_slotmem_plain.c
      +
      +"$(INTDIR)\mod_slotmem_plain.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c
      index f82f63c18eb..04258def0ee 100644
      --- a/modules/slotmem/mod_slotmem_shm.c
      +++ b/modules/slotmem/mod_slotmem_shm.c
      @@ -24,26 +24,12 @@
       #include  "ap_slotmem.h"
       
       #include "httpd.h"
      -#ifdef AP_NEED_SET_MUTEX_PERMS
      -#include "unixd.h"
      -#endif
      -
      -#if APR_HAVE_UNISTD_H
      -#include <unistd.h>         /* for getpid() */
      -#endif
      -
      -#if HAVE_SYS_SEM_H
      -#include <sys/shm.h>
      -#if !defined(SHM_R)
      -#define SHM_R 0400
      -#endif
      -#if !defined(SHM_W)
      -#define SHM_W 0200
      -#endif
      -#endif
      +#include "http_main.h"
      +#include "ap_mpm.h" /* for ap_mpm_query() */
       
      -#define AP_SLOTMEM_IS_PREGRAB(t) (t->desc.type & AP_SLOTMEM_TYPE_PREGRAB)
      -#define AP_SLOTMEM_IS_PERSIST(t) (t->desc.type & AP_SLOTMEM_TYPE_PERSIST)
      +#define AP_SLOTMEM_IS_PREGRAB(t)    (t->desc.type & AP_SLOTMEM_TYPE_PREGRAB)
      +#define AP_SLOTMEM_IS_PERSIST(t)    (t->desc.type & AP_SLOTMEM_TYPE_PERSIST)
      +#define AP_SLOTMEM_IS_CLEARINUSE(t) (t->desc.type & AP_SLOTMEM_TYPE_CLEARINUSE)
       
       /* The description of the slots to reuse the slotmem */
       typedef struct {
      @@ -56,7 +42,8 @@ typedef struct {
       #define AP_UNSIGNEDINT_OFFSET (APR_ALIGN_DEFAULT(sizeof(unsigned int)))
       
       struct ap_slotmem_instance_t {
      -    char                 *name;       /* per segment name */
      +    char                 *name;       /* file based SHM path/name */
      +    char                 *pname;      /* persisted file path/name */
           int                  fbased;      /* filebased? */
           void                 *shm;        /* ptr to memory segment (apr_shm_t *) */
           void                 *base;       /* data set start */
      @@ -68,7 +55,6 @@ struct ap_slotmem_instance_t {
           struct ap_slotmem_instance_t  *next;       /* location of next allocated segment */
       };
       
      -
       /*
        * Memory layout:
        *     sharedslotdesc_t | num_free | slots | isuse array |
      @@ -81,67 +67,115 @@ struct ap_slotmem_instance_t {
       static struct ap_slotmem_instance_t *globallistmem = NULL;
       static apr_pool_t *gpool = NULL;
       
      -/* apr:shmem/unix/shm.c */
      -static apr_status_t unixd_set_shm_perms(const char *fname)
      -{
      -#ifdef AP_NEED_SET_MUTEX_PERMS
      -#if APR_USE_SHMEM_SHMGET || APR_USE_SHMEM_SHMGET_ANON
      -    struct shmid_ds shmbuf;
      -    key_t shmkey;
      -    int shmid;
      +#define DEFAULT_SLOTMEM_PREFIX "slotmem-shm-"
      +#define DEFAULT_SLOTMEM_SUFFIX ".shm"
      +#define DEFAULT_SLOTMEM_PERSIST_SUFFIX ".persist"
       
      -    shmkey = ftok(fname, 1);
      -    if (shmkey == (key_t)-1) {
      -        return errno;
      -    }
      -    if ((shmid = shmget(shmkey, 0, SHM_R | SHM_W)) == -1) {
      -        return errno;
      -    }
      -#if MODULE_MAGIC_NUMBER_MAJOR <= 20081212
      -#define ap_unixd_config unixd_config
      -#endif
      -    shmbuf.shm_perm.uid  = ap_unixd_config.user_id;
      -    shmbuf.shm_perm.gid  = ap_unixd_config.group_id;
      -    shmbuf.shm_perm.mode = 0600;
      -    if (shmctl(shmid, IPC_SET, &shmbuf) == -1) {
      -        return errno;
      -    }
      -    return APR_SUCCESS;
      +/* Unixes (and Netware) have the unlink() semantic, which allows to
      + * apr_file_remove() a file still in use (opened elsewhere), the inode
      + * remains until the last fd is closed, whereas any file created with
      + * the same name/path will use a new inode.
      + *
      + * On windows and OS/2 ("\SHAREMEM\..." tree), apr_file_remove() marks
      + * the files for deletion until the last HANDLE is closed, meanwhile the
      + * same file/path can't be opened/recreated.
      + * Thus on graceful restart (the only restart mode with mpm_winnt), the
      + * old file may still exist until all the children stop, while we ought
      + * to create a new one for our new clear SHM.  Therefore, we would only
      + * be able to reuse (attach) the old SHM, preventing some changes to
      + * the config file, like the number of balancers/members, since the
      + * size checks (to fit the new config) would fail.  Let's avoid this by
      + * including the generation number in the SHM filename (obviously not
      + * the persisted name!)
      + */
      +#ifndef SLOTMEM_UNLINK_SEMANTIC
      +#if defined(WIN32) || defined(OS2)
      +#define SLOTMEM_UNLINK_SEMANTIC 0
       #else
      -    return APR_ENOTIMPL;
      +#define SLOTMEM_UNLINK_SEMANTIC 1
       #endif
      -#else
      -    return APR_ENOTIMPL;
       #endif
      -}
       
       /*
        * Persist the slotmem in a file
        * slotmem name and file name.
        * none      : no persistent data
      - * anonymous : $server_root/logs/anonymous.slotmem
      - * :rel_name : $server_root/logs/rel_name.slotmem
      - * abs_name  : $abs_name.slotmem
      + * rel_name  : $server_root/rel_name
      + * /abs_name : $abs_name
        *
        */
      -static const char *store_filename(apr_pool_t *pool, const char *slotmemname)
      +static int slotmem_filenames(apr_pool_t *pool,
      +                             const char *slotname,
      +                             const char **filename,
      +                             const char **persistname)
       {
      -    const char *storename;
      -    const char *fname;
      -    if (strcasecmp(slotmemname, "none") == 0)
      -        return NULL;
      -    else if (strcasecmp(slotmemname, "anonymous") == 0)
      -        fname = ap_server_root_relative(pool, "logs/anonymous");
      -    else if (slotmemname[0] == ':') {
      -        const char *tmpname;
      -        tmpname = apr_pstrcat(pool, "logs/", &slotmemname[1], NULL);
      -        fname = ap_server_root_relative(pool, tmpname);
      +    const char *fname = NULL, *pname = NULL;
      +
      +    if (slotname && *slotname && strcasecmp(slotname, "none") != 0) {
      +        if (slotname[0] != '/') {
      +#if !SLOTMEM_UNLINK_SEMANTIC
      +            /* Each generation needs its own file name. */
      +            int generation = 0;
      +            ap_mpm_query(AP_MPMQ_GENERATION, &generation);
      +            fname = apr_psprintf(pool, "%s%s_%x%s", DEFAULT_SLOTMEM_PREFIX,
      +                                 slotname, generation, DEFAULT_SLOTMEM_SUFFIX);
      +#else
      +            /* Reuse the same file name for each generation. */
      +            fname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
      +                                slotname, DEFAULT_SLOTMEM_SUFFIX,
      +                                NULL);
      +#endif
      +            fname = ap_runtime_dir_relative(pool, fname);
      +        }
      +        else {
      +            /* Don't mangle the file name if given an absolute path, it's
      +             * up to the caller to provide a unique name when necessary.
      +             */
      +            fname = slotname;
      +        }
      +
      +        if (persistname) {
      +            /* Persisted file names are immutable... */
      +#if !SLOTMEM_UNLINK_SEMANTIC
      +            if (slotname[0] != '/') {
      +                pname = apr_pstrcat(pool, DEFAULT_SLOTMEM_PREFIX,
      +                                    slotname, DEFAULT_SLOTMEM_SUFFIX,
      +                                    DEFAULT_SLOTMEM_PERSIST_SUFFIX,
      +                                    NULL);
      +                pname = ap_runtime_dir_relative(pool, pname);
      +            }
      +            else
      +#endif
      +            pname = apr_pstrcat(pool, fname,
      +                                DEFAULT_SLOTMEM_PERSIST_SUFFIX,
      +                                NULL);
      +        }
           }
      -    else {
      -        fname = slotmemname;
      +
      +    *filename = fname;
      +    if (persistname) {
      +        *persistname = pname;
      +    }
      +    return (fname != NULL);
      +}
      +
      +static void slotmem_clearinuse(ap_slotmem_instance_t *slot)
      +{
      +    unsigned int i;
      +    char *inuse;
      +    
      +    if (!slot) {
      +        return;
      +    }
      +    
      +    inuse = slot->inuse;
      +    
      +    for (i = 0; i < slot->desc.num; i++, inuse++) {
      +        if (*inuse) {
      +            *inuse = 0;
      +            (*slot->num_free)++;
      +        }
           }
      -    storename = apr_pstrcat(pool, fname, ".slotmem", NULL);
      -    return storename;
       }
       
       static void store_slotmem(ap_slotmem_instance_t *slotmem)
      @@ -149,9 +183,11 @@ static void store_slotmem(ap_slotmem_instance_t *slotmem)
           apr_file_t *fp;
           apr_status_t rv;
           apr_size_t nbytes;
      -    const char *storename;
      +    unsigned char digest[APR_MD5_DIGESTSIZE];
      +    const char *storename = slotmem->pname;
       
      -    storename = store_filename(slotmem->gpool, slotmem->name);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02334)
      +                 "storing %s", storename);
       
           if (storename) {
               rv = apr_file_open(&fp, storename, APR_CREATE | APR_READ | APR_WRITE,
      @@ -164,42 +200,75 @@ static void store_slotmem(ap_slotmem_instance_t *slotmem)
               if (rv != APR_SUCCESS) {
                   return;
               }
      +        if (AP_SLOTMEM_IS_CLEARINUSE(slotmem)) {
      +            slotmem_clearinuse(slotmem);
      +        }
               nbytes = (slotmem->desc.size * slotmem->desc.num) +
                        (slotmem->desc.num * sizeof(char)) + AP_UNSIGNEDINT_OFFSET;
      -        apr_file_write(fp, slotmem->persist, &nbytes);
      +        apr_md5(digest, slotmem->persist, nbytes);
      +        rv = apr_file_write_full(fp, slotmem->persist, nbytes, NULL);
      +        if (rv == APR_SUCCESS) {
      +            rv = apr_file_write_full(fp, digest, APR_MD5_DIGESTSIZE, NULL);
      +        }
               apr_file_close(fp);
      +        if (rv != APR_SUCCESS) {
      +            apr_file_remove(storename, slotmem->gpool);
      +        }
           }
       }
       
      -/* should be apr_status_t really */
      -static void restore_slotmem(void *ptr, const char *name, apr_size_t size,
      -                            apr_pool_t *pool)
      +static apr_status_t restore_slotmem(void *ptr, const char *storename,
      +                                    apr_size_t size, apr_pool_t *pool)
       {
      -    const char *storename;
           apr_file_t *fp;
           apr_size_t nbytes = size;
      -    apr_status_t rv;
      +    apr_status_t rv = APR_SUCCESS;
      +    unsigned char digest[APR_MD5_DIGESTSIZE];
      +    unsigned char digest2[APR_MD5_DIGESTSIZE];
       
      -    storename = store_filename(pool, name);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02335)
      +                 "restoring %s", storename);
       
           if (storename) {
               rv = apr_file_open(&fp, storename, APR_READ | APR_WRITE, APR_OS_DEFAULT,
                                  pool);
               if (rv == APR_SUCCESS) {
      -            apr_finfo_t fi;
      -            if (apr_file_info_get(&fi, APR_FINFO_SIZE, fp) == APR_SUCCESS) {
      -                if (fi.size == nbytes) {
      -                    apr_file_read(fp, ptr, &nbytes);
      +            rv = apr_file_read(fp, ptr, &nbytes);
      +            if ((rv == APR_SUCCESS || rv == APR_EOF) && nbytes == size) {
      +                rv = APR_SUCCESS;   /* for successful return @ EOF */
      +                /*
      +                 * if at EOF, don't bother checking md5
      +                 *  - backwards compatibility
      +                 *  */
      +                if (apr_file_eof(fp) != APR_EOF) {
      +                    apr_size_t ds = APR_MD5_DIGESTSIZE;
      +                    rv = apr_file_read(fp, digest, &ds);
      +                    if ((rv == APR_SUCCESS || rv == APR_EOF) &&
      +                        ds == APR_MD5_DIGESTSIZE) {
      +                        rv = APR_SUCCESS;
      +                        apr_md5(digest2, ptr, nbytes);
      +                        if (memcmp(digest, digest2, APR_MD5_DIGESTSIZE)) {
      +                            ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                                         APLOGNO(02551) "bad md5 match");
      +                            rv = APR_EGENERAL;
      +                        }
      +                    }
                       }
                       else {
      -                    apr_file_close(fp);
      -                    apr_file_remove(storename, pool);
      -                    return;
      +                    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +                                 APLOGNO(02552) "at EOF... bypassing md5 match check (old persist file?)");
                       }
                   }
      +            else if (nbytes != size) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                             APLOGNO(02553) "Expected %" APR_SIZE_T_FMT ": Read %" APR_SIZE_T_FMT,
      +                             size, nbytes);
      +                rv = APR_EGENERAL;
      +            }
                   apr_file_close(fp);
               }
           }
      +    return rv;
       }
       
       static apr_status_t cleanup_slotmem(void *param)
      @@ -212,10 +281,11 @@ static apr_status_t cleanup_slotmem(void *param)
                   if (AP_SLOTMEM_IS_PERSIST(next)) {
                       store_slotmem(next);
                   }
      +            apr_shm_destroy((apr_shm_t *)next->shm);
                   if (next->fbased) {
                       apr_shm_remove(next->name, next->gpool);
      +                apr_file_remove(next->name, next->gpool);
                   }
      -            apr_shm_destroy((apr_shm_t *)next->shm);
                   next = next->next;
               }
           }
      @@ -256,35 +326,32 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
                                          unsigned int item_num,
                                          ap_slotmem_type_t type, apr_pool_t *pool)
       {
      -/*    void *slotmem = NULL; */
      -    int fbased;
      +    int fbased = 1;
      +    int restored = 0;
           char *ptr;
           sharedslotdesc_t desc;
           ap_slotmem_instance_t *res;
           ap_slotmem_instance_t *next = globallistmem;
      -    const char *fname;
      +    const char *fname, *pname = NULL;
           apr_shm_t *shm;
           apr_size_t basesize = (item_size * item_num);
           apr_size_t size = AP_SLOTMEM_OFFSET + AP_UNSIGNEDINT_OFFSET +
                             (item_num * sizeof(char)) + basesize;
      +    int persist = (type & AP_SLOTMEM_TYPE_PERSIST) != 0;
           apr_status_t rv;
       
      -    if (gpool == NULL)
      +    if (gpool == NULL) {
               return APR_ENOSHMAVAIL;
      -    if (name) {
      -        if (name[0] == ':') {
      -            fname = name;
      -        }
      -        else {
      -            fname = ap_server_root_relative(pool, name);
      -        }
      -
      +    }
      +    if (slotmem_filenames(pool, name, &fname, persist ? &pname : NULL)) {
               /* first try to attach to existing slotmem */
               if (next) {
                   for (;;) {
                       if (strcmp(next->name, fname) == 0) {
                           /* we already have it */
                           *new = next;
      +                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02603)
      +                                 "create found %s in global list", fname);
                           return APR_SUCCESS;
                       }
                       if (!next->next) {
      @@ -293,13 +360,18 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
                       next = next->next;
                   }
               }
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02602)
      +                     "create didn't find %s in global list", fname);
           }
           else {
      -        fname = "anonymous";
      +        fbased = 0;
      +        fname = "none";
           }
       
           /* first try to attach to existing shared memory */
      -    fbased = (name && name[0] != ':');
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02300)
      +                 "create %s: %"APR_SIZE_T_FMT"/%u", fname, item_size,
      +                 item_num);
           if (fbased) {
               rv = apr_shm_attach(&shm, fname, gpool);
           }
      @@ -307,15 +379,24 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
               rv = APR_EINVAL;
           }
           if (rv == APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02598)
      +                     "apr_shm_attach() succeeded");
      +
               /* check size */
               if (apr_shm_size_get(shm) != size) {
                   apr_shm_detach(shm);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02599)
      +                         "existing shared memory for %s could not be used (failed size check)",
      +                         fname);
                   return APR_EINVAL;
               }
               ptr = (char *)apr_shm_baseaddr_get(shm);
               memcpy(&desc, ptr, sizeof(desc));
               if (desc.size != item_size || desc.num != item_num) {
                   apr_shm_detach(shm);
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(02600)
      +                         "existing shared memory for %s could not be used (failed contents check)",
      +                         fname);
                   return APR_EINVAL;
               }
               ptr += AP_SLOTMEM_OFFSET;
      @@ -329,18 +410,14 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
               else {
                   rv = apr_shm_create(&shm, size, NULL, gpool);
               }
      +        ap_log_error(APLOG_MARK, rv == APR_SUCCESS ? APLOG_DEBUG : APLOG_ERR,
      +                     rv, ap_server_conf, APLOGNO(02611)
      +                     "create: apr_shm_create(%s) %s",
      +                     fname ? fname : "",
      +                     rv == APR_SUCCESS ? "succeeded" : "failed");
               if (rv != APR_SUCCESS) {
                   return rv;
               }
      -        if (fbased) {
      -            /* Set permissions to shared memory
      -             * so it can be attached by child process
      -             * having different user credentials
      -             *
      -             * See apr:shmem/unix/shm.c
      -             */
      -            unixd_set_shm_perms(fname);
      -        }
               ptr = (char *)apr_shm_baseaddr_get(shm);
               desc.size = item_size;
               desc.num = item_num;
      @@ -352,8 +429,17 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
                * TODO: Error check the below... What error makes
                * sense if the restore fails? Any?
                */
      -        if (type & AP_SLOTMEM_TYPE_PERSIST) {
      -            restore_slotmem(ptr, fname, dsize, pool);
      +        if (persist) {
      +            rv = restore_slotmem(ptr, pname, dsize, pool);
      +            if (rv == APR_SUCCESS) {
      +                restored = 1;
      +            }
      +            else {
      +                /* just in case, re-zero */
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +                             APLOGNO(02554) "could not restore %s", fname);
      +                memset(ptr, 0, dsize);
      +            }
               }
           }
       
      @@ -361,10 +447,13 @@ static apr_status_t slotmem_create(ap_slotmem_instance_t **new,
           res = (ap_slotmem_instance_t *) apr_pcalloc(gpool,
                                                       sizeof(ap_slotmem_instance_t));
           res->name = apr_pstrdup(gpool, fname);
      +    res->pname = apr_pstrdup(gpool, pname);
           res->fbased = fbased;
           res->shm = shm;
           res->num_free = (unsigned int *)ptr;
      -    *res->num_free = item_num;
      +    if (!restored) {
      +        *res->num_free = item_num;
      +    }
           res->persist = (void *)ptr;
           ptr += AP_UNSIGNEDINT_OFFSET;
           res->base = (void *)ptr;
      @@ -399,18 +488,13 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new,
           if (gpool == NULL) {
               return APR_ENOSHMAVAIL;
           }
      -    if (name) {
      -        if (name[0] == ':') {
      -            fname = name;
      -        }
      -        else {
      -            fname = ap_server_root_relative(pool, name);
      -        }
      -    }
      -    else {
      +    if (!slotmem_filenames(pool, name, &fname, NULL)) {
               return APR_ENOSHMAVAIL;
           }
       
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02301)
      +                 "attach looking for %s", fname);
      +
           /* first try to attach to existing slotmem */
           if (next) {
               for (;;) {
      @@ -419,6 +503,10 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new,
                       *new = next;
                       *item_size = next->desc.size;
                       *item_num = next->desc.num;
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +                             APLOGNO(02302)
      +                             "attach found %s: %"APR_SIZE_T_FMT"/%u", fname,
      +                             *item_size, *item_num);
                       return APR_SUCCESS;
                   }
                   if (!next->next) {
      @@ -428,7 +516,7 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new,
               }
           }
       
      -    /* first try to attach to existing shared memory */
      +    /* next try to attach to existing shared memory */
           rv = apr_shm_attach(&shm, fname, gpool);
           if (rv != APR_SUCCESS) {
               return rv;
      @@ -463,6 +551,10 @@ static apr_status_t slotmem_attach(ap_slotmem_instance_t **new,
           *new = res;
           *item_size = desc.size;
           *item_num = desc.num;
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +                 APLOGNO(02303)
      +                 "attach found %s: %"APR_SIZE_T_FMT"/%u", fname,
      +                 *item_size, *item_num);
           return APR_SUCCESS;
       }
       
      @@ -475,7 +567,7 @@ static apr_status_t slotmem_dptr(ap_slotmem_instance_t *slot,
               return APR_ENOSHMAVAIL;
           }
           if (id >= slot->desc.num) {
      -        return APR_ENOSHMAVAIL;
      +        return APR_EINVAL;
           }
       
           ptr = (char *)slot->base + slot->desc.size * id;
      @@ -498,7 +590,10 @@ static apr_status_t slotmem_get(ap_slotmem_instance_t *slot, unsigned int id,
           }
       
           inuse = slot->inuse + id;
      -    if (id >= slot->desc.num || (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse)) {
      +    if (id >= slot->desc.num) {
      +        return APR_EINVAL;
      +    }
      +    if (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse) {
               return APR_NOTFOUND;
           }
           ret = slotmem_dptr(slot, id, &ptr);
      @@ -522,7 +617,10 @@ static apr_status_t slotmem_put(ap_slotmem_instance_t *slot, unsigned int id,
           }
       
           inuse = slot->inuse + id;
      -    if (id >= slot->desc.num || (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse)) {
      +    if (id >= slot->desc.num) {
      +        return APR_EINVAL;
      +    }
      +    if (AP_SLOTMEM_IS_PREGRAB(slot) && !*inuse) {
               return APR_NOTFOUND;
           }
           ret = slotmem_dptr(slot, id, &ptr);
      @@ -576,6 +674,10 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id)
               }
           }
           if (i >= slot->desc.num) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02293)
      +                     "slotmem(%s) grab failed. Num %u/num_free %u",
      +                     slot->name, slotmem_num_slots(slot),
      +                     slotmem_num_free_slots(slot));
               return APR_EINVAL;
           }
           *inuse = 1;
      @@ -584,6 +686,30 @@ static apr_status_t slotmem_grab(ap_slotmem_instance_t *slot, unsigned int *id)
           return APR_SUCCESS;
       }
       
      +static apr_status_t slotmem_fgrab(ap_slotmem_instance_t *slot, unsigned int id)
      +{
      +    char *inuse;
      +    
      +    if (!slot) {
      +        return APR_ENOSHMAVAIL;
      +    }
      +
      +    if (id >= slot->desc.num) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02397)
      +                     "slotmem(%s) fgrab failed. Num %u/num_free %u",
      +                     slot->name, slotmem_num_slots(slot),
      +                     slotmem_num_free_slots(slot));
      +        return APR_EINVAL;
      +    }
      +    inuse = slot->inuse + id;
      +
      +    if (!*inuse) {
      +        *inuse = 1;
      +        (*slot->num_free)--;
      +    }
      +    return APR_SUCCESS;
      +}
      +
       static apr_status_t slotmem_release(ap_slotmem_instance_t *slot,
                                           unsigned int id)
       {
      @@ -596,7 +722,15 @@ static apr_status_t slotmem_release(ap_slotmem_instance_t *slot,
           inuse = slot->inuse;
       
           if (id >= slot->desc.num || !inuse[id] ) {
      -        return APR_NOTFOUND;
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02294)
      +                     "slotmem(%s) release failed. Num %u/inuse[%u] %d",
      +                     slot->name, slotmem_num_slots(slot),
      +                     id, (int)inuse[id]);
      +        if (id >= slot->desc.num) {
      +            return APR_EINVAL;
      +        } else {
      +            return APR_NOTFOUND;
      +        }
           }
           inuse[id] = 0;
           (*slot->num_free)++;
      @@ -615,10 +749,11 @@ static const ap_slotmem_provider_t storage = {
           &slotmem_num_free_slots,
           &slotmem_slot_size,
           &slotmem_grab,
      -    &slotmem_release
      +    &slotmem_release,
      +    &slotmem_fgrab
       };
       
      -/* make the storage usuable from outside */
      +/* make the storage usable from outside */
       static const ap_slotmem_provider_t *slotmem_shm_getstorage(void)
       {
           return (&storage);
      @@ -657,7 +792,7 @@ static int pre_config(apr_pool_t *p, apr_pool_t *plog,
       static void ap_slotmem_shm_register_hook(apr_pool_t *p)
       {
           const ap_slotmem_provider_t *storage = slotmem_shm_getstorage();
      -    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shared",
      +    ap_register_provider(p, AP_SLOTMEM_PROVIDER_GROUP, "shm",
                                AP_SLOTMEM_PROVIDER_VERSION, storage);
           ap_hook_post_config(post_config, NULL, NULL, APR_HOOK_LAST);
           ap_hook_pre_config(pre_config, NULL, NULL, APR_HOOK_MIDDLE);
      @@ -672,4 +807,3 @@ AP_DECLARE_MODULE(slotmem_shm) = {
           NULL,                       /* command apr_table_t */
           ap_slotmem_shm_register_hook  /* register hooks */
       };
      -
      diff --git a/modules/slotmem/mod_slotmem_shm.dep b/modules/slotmem/mod_slotmem_shm.dep
      new file mode 100644
      index 00000000000..e3320b8fbc3
      --- /dev/null
      +++ b/modules/slotmem/mod_slotmem_shm.dep
      @@ -0,0 +1,57 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_slotmem_shm.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      +
      +.\mod_slotmem_shm.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_slotmem.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/modules/slotmem/mod_slotmem_shm.dsp b/modules/slotmem/mod_slotmem_shm.dsp
      index 177dde8e660..615ddd4a3c0 100644
      --- a/modules/slotmem/mod_slotmem_shm.dsp
      +++ b/modules/slotmem/mod_slotmem_shm.dsp
      @@ -47,7 +47,7 @@ RSC=rc.exe
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      -# ADD RSC /l 0x409 /fo"Release/mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="echo_module for Apache"
      +# ADD RSC /l 0x409 /fo"Release/mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      @@ -79,7 +79,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      -# ADD RSC /l 0x409 /fo"Debug/mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="echo_module for Apache"
      +# ADD RSC /l 0x409 /fo"Debug/mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache"
       BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
      diff --git a/modules/slotmem/mod_slotmem_shm.mak b/modules/slotmem/mod_slotmem_shm.mak
      new file mode 100644
      index 00000000000..e7e64b8e4fd
      --- /dev/null
      +++ b/modules/slotmem/mod_slotmem_shm.mak
      @@ -0,0 +1,353 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_slotmem_shm.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_slotmem_shm - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_slotmem_shm - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_slotmem_shm - Win32 Release" && "$(CFG)" != "mod_slotmem_shm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_slotmem_shm.mak" CFG="mod_slotmem_shm - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_slotmem_shm - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_slotmem_shm - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_shm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_slotmem_shm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_slotmem_shm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_slotmem_shm.obj"
      +	-@erase "$(INTDIR)\mod_slotmem_shm.res"
      +	-@erase "$(INTDIR)\mod_slotmem_shm_src.idb"
      +	-@erase "$(INTDIR)\mod_slotmem_shm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.exp"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.lib"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_slotmem_shm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_slotmem_shm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_slotmem_shm.pdb" /debug /out:"$(OUTDIR)\mod_slotmem_shm.so" /implib:"$(OUTDIR)\mod_slotmem_shm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_slotmem_shm.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_slotmem_shm.obj" \
      +	"$(INTDIR)\mod_slotmem_shm.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_slotmem_shm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_slotmem_shm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_slotmem_shm.so"
      +   if exist .\Release\mod_slotmem_shm.so.manifest mt.exe -manifest .\Release\mod_slotmem_shm.so.manifest -outputresource:.\Release\mod_slotmem_shm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_slotmem_shm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_slotmem_shm.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_slotmem_shm.obj"
      +	-@erase "$(INTDIR)\mod_slotmem_shm.res"
      +	-@erase "$(INTDIR)\mod_slotmem_shm_src.idb"
      +	-@erase "$(INTDIR)\mod_slotmem_shm_src.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.exp"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.lib"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.pdb"
      +	-@erase "$(OUTDIR)\mod_slotmem_shm.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_slotmem_shm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_slotmem_shm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_slotmem_shm.pdb" /debug /out:"$(OUTDIR)\mod_slotmem_shm.so" /implib:"$(OUTDIR)\mod_slotmem_shm.lib" /base:@..\..\os\win32\BaseAddr.ref,mod_slotmem_shm.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_slotmem_shm.obj" \
      +	"$(INTDIR)\mod_slotmem_shm.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_slotmem_shm.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_slotmem_shm.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_slotmem_shm.so"
      +   if exist .\Debug\mod_slotmem_shm.so.manifest mt.exe -manifest .\Debug\mod_slotmem_shm.so.manifest -outputresource:.\Debug\mod_slotmem_shm.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_slotmem_shm.dep")
      +!INCLUDE "mod_slotmem_shm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_slotmem_shm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_slotmem_shm - Win32 Release" || "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "mod_slotmem_shm - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\slotmem"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\slotmem"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_shm - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\slotmem"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\slotmem"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\slotmem"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_slotmem_shm - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\slotmem"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\slotmem"
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\slotmem"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\slotmem"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_slotmem_shm - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_slotmem_shm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_slotmem_shm - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_slotmem_shm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_slotmem_shm.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_slotmem_shm.so" /d LONG_NAME="slotmem_shm_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\mod_slotmem_shm.c
      +
      +"$(INTDIR)\mod_slotmem_shm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/ssl/README b/modules/ssl/README
      index c46377f27cf..5fc73124347 100644
      --- a/modules/ssl/README
      +++ b/modules/ssl/README
      @@ -59,7 +59,7 @@ DATA STRUCTURES
        For an overview how these are related and chained together have a look at the
        page in README.dsov.{fig,ps}. It contains overview diagrams for those data
        structures. It's designed for DIN A4 paper size, but you can easily generate
      - a smaller version inside XFig by specifing a magnification on the Export
      + a smaller version inside XFig by specifying a magnification on the Export
        panel.
       
       INCOMPATIBILITIES
      @@ -81,7 +81,7 @@ MAJOR CHANGES
        o The DBM based session cache is now based on APR's DBM API only.
        o The shared memory based session cache is now based on APR's APIs.
        o SSL I/O is now implemented in terms of filters rather than BUFF
      - o Eliminated ap_global_ctx. Storing Persistant information in 
      + o Eliminated ap_global_ctx. Storing Persistent information in 
          process_rec->pool->user_data. The ssl_pphrase_Handle_CB() and 
          ssl_config_global_* () functions have an extra parameter now - 
          "server_rec *" -  which is used to retrieve the SSLModConfigRec.
      diff --git a/modules/ssl/README.dsov.fig b/modules/ssl/README.dsov.fig
      index d8d03db247c..77cd2ca277a 100644
      --- a/modules/ssl/README.dsov.fig
      +++ b/modules/ssl/README.dsov.fig
      @@ -339,7 +339,7 @@ Single
       4 0 0 200 0 20 8 0.0000 4 90 465 11745 4770 ->method\001
       4 0 0 200 0 20 8 0.0000 4 120 1665 9945 6480 X509_STORE_CTX_get_app_data()\001
       4 0 0 200 0 20 8 0.0000 4 120 1215 10980 6705 SSL_CTX_get_cert_store()\001
      -4 0 0 200 0 20 8 0.0000 4 120 1020 8280 5130 SSL_get_app_data2()\001
      +4 0 0 200 0 20 8 0.0000 4 120 1020 8280 5130 modssl_get_app_data2()\001
       4 0 0 100 0 18 20 0.0000 4 270 1290 10710 7605 OpenSSL\001
       4 0 0 100 0 18 12 0.0000 4 180 720 10710 7785 [Crypto]\001
       4 0 0 100 0 18 20 0.0000 4 270 1290 10935 3645 OpenSSL\001
      diff --git a/modules/ssl/README.dsov.ps b/modules/ssl/README.dsov.ps
      index def19dbecfa..bcbf268713c 100644
      Binary files a/modules/ssl/README.dsov.ps and b/modules/ssl/README.dsov.ps differ
      diff --git a/modules/ssl/config.m4 b/modules/ssl/config.m4
      index 1ee122e2325..45eeb43d9dc 100644
      --- a/modules/ssl/config.m4
      +++ b/modules/ssl/config.m4
      @@ -20,7 +20,6 @@ dnl #  list of module object files
       ssl_objs="dnl
       mod_ssl.lo dnl
       ssl_engine_config.lo dnl
      -ssl_engine_dh.lo dnl
       ssl_engine_init.lo dnl
       ssl_engine_io.lo dnl
       ssl_engine_kernel.lo dnl
      @@ -40,7 +39,6 @@ dnl #  hook module into the Autoconf mechanism (--enable-ssl option)
       APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , most, [
           APACHE_CHECK_OPENSSL
           if test "$ac_cv_openssl" = "yes" ; then
      -        APR_ADDTO(MOD_SSL_LDADD, [\$(SSL_LIBS)])
               if test "x$enable_ssl" = "xshared"; then
                  # The only symbol which needs to be exported is the module
                  # structure, so ask libtool to hide everything else:
      diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c
      index 424a8f66aaf..f8e71b33a53 100644
      --- a/modules/ssl/mod_ssl.c
      +++ b/modules/ssl/mod_ssl.c
      @@ -26,12 +26,17 @@
       
       #include "ssl_private.h"
       #include "mod_ssl.h"
      +#include "mod_ssl_openssl.h"
       #include "util_md5.h"
       #include "util_mutex.h"
       #include "ap_provider.h"
       
       #include <assert.h>
       
      +APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ssl, SSL, int, pre_handshake,
      +                                    (conn_rec *c,SSL *ssl,int is_proxy),
      +                                    (c,ssl,is_proxy), OK, DECLINED);
      +
       /*
        *  the table of configuration directives we provide
        */
      @@ -79,14 +84,6 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(FIPS, FLAG,
                       "Enable FIPS-140 mode "
                       "(`on', `off')")
      -#ifdef HAVE_TLSEXT_TICKETS
      -    SSL_CMD_SRV(TicketKeyFile, TAKE2,
      -                "Key file to use for encrypting and decrypting the client ticket (RFC 5077) "
      -                "(keyname '/path/to/file')")
      -    SSL_CMD_SRV(TicketKeyDefault, TAKE1,
      -                "Set the key name used by default for new sessions "
      -               "(keyname)")
      -#endif
           SSL_CMD_ALL(CipherSuite, TAKE1,
                       "Colon-delimited list of permitted SSL Ciphers "
                       "('XXX:...:XXX' - see manual)")
      @@ -99,9 +96,11 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(CertificateChainFile, TAKE1,
                       "SSL Server CA Certificate Chain file "
                       "('/path/to/file' - PEM encoded)")
      -    SSL_CMD_SRV(PKCS7CertificateFile, TAKE1,
      -                "PKCS#7 file containing server certificate and chain"
      -                " certificates ('/path/to/file' - PEM encoded)")
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    SSL_CMD_SRV(SessionTicketKeyFile, TAKE1,
      +                "TLS session ticket encryption/decryption key file (RFC 5077) "
      +                "('/path/to/file' - file with 48 bytes of random data)")
      +#endif
           SSL_CMD_ALL(CACertificatePath, TAKE1,
                       "SSL CA Certificate path "
                       "('/path/to/dir' - contains PEM encoded files)")
      @@ -120,7 +119,7 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(CARevocationFile, TAKE1,
                       "SSL CA Certificate Revocation List (CRL) file "
                       "('/path/to/file' - PEM encoded)")
      -    SSL_CMD_SRV(CARevocationCheck, TAKE1,
      +    SSL_CMD_SRV(CARevocationCheck, RAW_ARGS,
                       "SSL CA Certificate Revocation List (CRL) checking mode")
           SSL_CMD_ALL(VerifyClient, TAKE1,
                       "SSL Client verify type "
      @@ -131,11 +130,27 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(SessionCacheTimeout, TAKE1,
                       "SSL Session Cache object lifetime "
                       "('N' - number of seconds)")
      +#ifdef OPENSSL_NO_SSL3
      +#define SSLv3_PROTO_PREFIX ""
      +#else
      +#define SSLv3_PROTO_PREFIX "SSLv3|"
      +#endif
      +#ifdef HAVE_TLSV1_X
      +#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1|TLSv1.1|TLSv1.2"
      +#else
      +#define SSL_PROTOCOLS SSLv3_PROTO_PREFIX "TLSv1"
      +#endif
           SSL_CMD_SRV(Protocol, RAW_ARGS,
      -                "Enable or disable various SSL protocols"
      -                "('[+-][SSLv2|SSLv3|TLSv1] ...' - see manual)")
      +                "Enable or disable various SSL protocols "
      +                "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
           SSL_CMD_SRV(HonorCipherOrder, FLAG,
                       "Use the server's cipher ordering preference")
      +    SSL_CMD_SRV(Compression, FLAG,
      +                "Enable SSL level compression "
      +                "(`on', `off')")
      +    SSL_CMD_SRV(SessionTickets, FLAG,
      +                "Enable or disable TLS session tickets"
      +                "(`on', `off')")
           SSL_CMD_SRV(InsecureRenegotiation, FLAG,
                       "Enable support for insecure renegotiation")
           SSL_CMD_ALL(UserName, TAKE1,
      @@ -143,6 +158,15 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(StrictSNIVHostCheck, FLAG,
                       "Strict SNI virtual host checking")
       
      +#ifdef HAVE_SRP
      +    SSL_CMD_SRV(SRPVerifierFile, TAKE1,
      +                "SRP verifier file "
      +                "('/path/to/file' - created by srptool)")
      +    SSL_CMD_SRV(SRPUnknownUserSeed, TAKE1,
      +                "SRP seed for unknown users (to avoid leaking a user's existence) "
      +                "('some secret text')")
      +#endif
      +
           /*
            * Proxy configuration for remote SSL connections
            */
      @@ -151,7 +175,7 @@ static const command_rec ssl_config_cmds[] = {
                       "('on', 'off')")
           SSL_CMD_SRV(ProxyProtocol, RAW_ARGS,
                      "SSL Proxy: enable or disable SSL protocol flavors "
      -               "('[+-][SSLv2|SSLv3|TLSv1] ...' - see manual)")
      +                "('[+-][" SSL_PROTOCOLS "] ...' - see manual)")
           SSL_CMD_SRV(ProxyCipherSuite, TAKE1,
                      "SSL Proxy: colon-delimited list of permitted SSL ciphers "
                      "('XXX:...:XXX' - see manual)")
      @@ -173,7 +197,7 @@ static const command_rec ssl_config_cmds[] = {
           SSL_CMD_SRV(ProxyCARevocationFile, TAKE1,
                       "SSL Proxy: CA Certificate Revocation List (CRL) file "
                       "('/path/to/file' - PEM encoded)")
      -    SSL_CMD_SRV(ProxyCARevocationCheck, TAKE1,
      +    SSL_CMD_SRV(ProxyCARevocationCheck, RAW_ARGS,
                       "SSL Proxy: CA Certificate Revocation List (CRL) checking mode")
           SSL_CMD_SRV(ProxyMachineCertificateFile, TAKE1,
                      "SSL Proxy: file containing client certificates "
      @@ -186,9 +210,12 @@ static const command_rec ssl_config_cmds[] = {
                      "of the client certificate "
                      "(`/path/to/file' - PEM encoded certificates)")
           SSL_CMD_SRV(ProxyCheckPeerExpire, FLAG,
      -                "SSL Proxy: check the peers certificate expiration date")
      +                "SSL Proxy: check the peer certificate's expiration date")
           SSL_CMD_SRV(ProxyCheckPeerCN, FLAG,
      -                "SSL Proxy: check the peers certificate CN")
      +                "SSL Proxy: check the peer certificate's CN")
      +    SSL_CMD_SRV(ProxyCheckPeerName, FLAG,
      +                "SSL Proxy: check the peer certificate's name "
      +                "(must be present in subjectAltName extension or CN")
       
           /*
            * Per-directory context configuration directives
      @@ -219,6 +246,10 @@ static const command_rec ssl_config_cmds[] = {
                       "Maximum age of OCSP responses")
           SSL_CMD_SRV(OCSPResponderTimeout, TAKE1,
                       "OCSP responder query timeout")
      +    SSL_CMD_SRV(OCSPUseRequestNonce, FLAG,
      +                "Whether OCSP queries use a nonce or not ('on', 'off')")
      +    SSL_CMD_SRV(OCSPProxyURL, TAKE1,
      +                "Proxy URL to use for OCSP requests")
       
       #ifdef HAVE_OCSP_STAPLING
           /*
      @@ -249,6 +280,11 @@ static const command_rec ssl_config_cmds[] = {
                       "SSL stapling option to Force the OCSP Stapling URL")
       #endif
       
      +#ifdef HAVE_SSL_CONF_CMD
      +    SSL_CMD_SRV(OpenSSLConfCmd, TAKE2,
      +                "OpenSSL configuration command")
      +#endif
      +
           /* Deprecated directives. */
           AP_INIT_RAW_ARGS("SSLLog", ap_set_deprecated, NULL, OR_ALL,
             "SSLLog directive is no longer supported - use ErrorLog."),
      @@ -278,9 +314,12 @@ static apr_status_t ssl_cleanup_pre_config(void *data)
       #endif
           ERR_remove_state(0);
       
      -    /* Don't call ERR_free_strings here; ERR_load_*_strings only
      -     * actually load the error strings once per process due to static
      +    /* Don't call ERR_free_strings in earlier versions, ERR_load_*_strings only
      +     * actually loaded the error strings once per process due to static
            * variable abuse in OpenSSL. */
      +#if (OPENSSL_VERSION_NUMBER >= 0x00090805f)
      +    ERR_free_strings();
      +#endif
       
           /* Also don't call CRYPTO_cleanup_all_ex_data here; any registered
            * ex_data indices may have been cached in static variables in
      @@ -313,6 +352,11 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
           OpenSSL_add_all_algorithms();
           OPENSSL_load_builtin_modules();
       
      +    if (OBJ_txt2nid("id-on-dnsSRV") == NID_undef) {
      +        (void)OBJ_create("1.3.6.1.5.5.7.8.7", "id-on-dnsSRV",
      +                         "SRVName otherName form");
      +    }
      +
           /*
            * Let us cleanup the ssl library when the module is unloaded
            */
      @@ -328,7 +372,10 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
           /* Register mutex type names so they can be configured with Mutex */
           ap_mutex_register(pconf, SSL_CACHE_MUTEX_TYPE, NULL, APR_LOCK_DEFAULT, 0);
       #ifdef HAVE_OCSP_STAPLING
      -    ap_mutex_register(pconf, SSL_STAPLING_MUTEX_TYPE, NULL, APR_LOCK_DEFAULT, 0);
      +    ap_mutex_register(pconf, SSL_STAPLING_CACHE_MUTEX_TYPE, NULL,
      +                      APR_LOCK_DEFAULT, 0);
      +    ap_mutex_register(pconf, SSL_STAPLING_REFRESH_MUTEX_TYPE, NULL,
      +                      APR_LOCK_DEFAULT, 0);
       #endif
       
           return OK;
      @@ -337,6 +384,7 @@ static int ssl_hook_pre_config(apr_pool_t *pconf,
       static SSLConnRec *ssl_init_connection_ctx(conn_rec *c)
       {
           SSLConnRec *sslconn = myConnConfig(c);
      +    SSLSrvConfigRec *sc;
       
           if (sslconn) {
               return sslconn;
      @@ -346,6 +394,8 @@ static SSLConnRec *ssl_init_connection_ctx(conn_rec *c)
       
           sslconn->server = c->base_server;
           sslconn->verify_depth = UNSET;
      +    sc = mySrvConfig(c->base_server);
      +    sslconn->cipher_suite = sc->server->auth.cipher_suite;
       
           myConnConfigSet(c, sslconn);
       
      @@ -360,7 +410,7 @@ int ssl_proxy_enable(conn_rec *c)
           sc = mySrvConfig(sslconn->server);
       
           if (!sc->proxy_enabled) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01961)
                             "SSL Proxy requested for %s but not enabled "
                             "[Hint: SSLProxyEngine]", sc->vhost_id);
       
      @@ -402,6 +452,7 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
           SSL *ssl;
           SSLConnRec *sslconn = myConnConfig(c);
           char *vhost_md5;
      +    int rc;
           modssl_ctx_t *mctx;
           server_rec *server;
       
      @@ -423,8 +474,8 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
            * attach this to the socket. Additionally we register this attachment
            * so we can detach later.
            */
      -    if (!(ssl = SSL_new(mctx->ssl_ctx))) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +    if (!(sslconn->ssl = ssl = SSL_new(mctx->ssl_ctx))) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01962)
                             "Unable to create a new SSL connection from the SSL "
                             "context");
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, server);
      @@ -434,13 +485,18 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
               return DECLINED; /* XXX */
           }
       
      +    rc = ssl_run_pre_handshake(c, ssl, sslconn->is_proxy ? 1 : 0);
      +    if (rc != OK && rc != DECLINED) {
      +        return rc;
      +    }
      +
           vhost_md5 = ap_md5_binary(c->pool, (unsigned char *)sc->vhost_id,
                                     sc->vhost_id_len);
       
           if (!SSL_set_session_id_context(ssl, (unsigned char *)vhost_md5,
                                           APR_MD5_DIGESTSIZE*2))
           {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01963)
                             "Unable to set session id context to '%s'", vhost_md5);
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, server);
       
      @@ -450,18 +506,7 @@ int ssl_init_ssl_connection(conn_rec *c, request_rec *r)
           }
       
           SSL_set_app_data(ssl, c);
      -    SSL_set_app_data2(ssl, NULL); /* will be request_rec */
      -
      -    sslconn->ssl = ssl;
      -
      -    /*
      -     *  Configure callbacks for SSL connection
      -     */
      -    SSL_set_tmp_rsa_callback(ssl, ssl_callback_TmpRSA);
      -    SSL_set_tmp_dh_callback(ssl,  ssl_callback_TmpDH);
      -#ifndef OPENSSL_NO_EC
      -    SSL_set_tmp_ecdh_callback(ssl, ssl_callback_TmpECDH);
      -#endif
      +    modssl_set_app_data2(ssl, NULL); /* will be request_rec */
       
           SSL_set_verify_result(ssl, X509_V_OK);
       
      @@ -494,6 +539,7 @@ static apr_port_t ssl_hook_default_port(const request_rec *r)
       
       static int ssl_hook_pre_connection(conn_rec *c, void *csd)
       {
      +
           SSLSrvConfigRec *sc;
           SSLConnRec *sslconn = myConnConfig(c);
       
      @@ -506,8 +552,8 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
           /*
            * Immediately stop processing if SSL is disabled for this connection
            */
      -    if (!(sc && (sc->enabled == SSL_ENABLED_TRUE ||
      -                 (sslconn && sslconn->is_proxy))))
      +    if (c->master || !(sc && (sc->enabled == SSL_ENABLED_TRUE ||
      +                              (sslconn && sslconn->is_proxy))))
           {
               return DECLINED;
           }
      @@ -528,13 +574,33 @@ static int ssl_hook_pre_connection(conn_rec *c, void *csd)
            * later access inside callback functions
            */
       
      -    ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +    ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(01964)
                         "Connection to child %ld established "
                         "(server %s)", c->id, sc->vhost_id);
       
           return ssl_init_ssl_connection(c, NULL);
       }
       
      +static int ssl_hook_process_connection(conn_rec* c)
      +{
      +    SSLConnRec *sslconn = myConnConfig(c);
      +
      +    if (sslconn && !sslconn->disabled) {
      +        /* On an active SSL connection, let the input filters initialize
      +         * themselves which triggers the handshake, which again triggers
      +         * all kinds of useful things such as SNI and ALPN.
      +         */
      +        apr_bucket_brigade* temp;
      +
      +        temp = apr_brigade_create(c->pool, c->bucket_alloc);
      +        ap_get_brigade(c->input_filters, temp,
      +                       AP_MODE_INIT, APR_BLOCK_READ, 0);
      +        apr_brigade_destroy(temp);
      +    }
      +    
      +    return DECLINED;
      +}
      +
       /*
        *  the module registration phase
        */
      @@ -548,6 +614,8 @@ static void ssl_register_hooks(apr_pool_t *p)
           ssl_io_filter_register(p);
       
           ap_hook_pre_connection(ssl_hook_pre_connection,NULL,NULL, APR_HOOK_MIDDLE);
      +    ap_hook_process_connection(ssl_hook_process_connection, 
      +                                                   NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_test_config   (ssl_hook_ConfigTest,    NULL,NULL, APR_HOOK_MIDDLE);
           ap_hook_post_config   (ssl_init_Module,        NULL,NULL, APR_HOOK_MIDDLE);
           ap_hook_http_scheme   (ssl_hook_http_scheme,   NULL,NULL, APR_HOOK_MIDDLE);
      diff --git a/modules/ssl/mod_ssl.dep b/modules/ssl/mod_ssl.dep
      new file mode 100644
      index 00000000000..323d0f699bc
      --- /dev/null
      +++ b/modules/ssl/mod_ssl.dep
      @@ -0,0 +1,1086 @@
      +# Microsoft Developer Studio Generated Dependency File, included by mod_ssl.mak
      +
      +.\mod_ssl.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_ssl.h"\
      +	".\mod_ssl_openssl.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_config.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_init.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\mpm_common.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_ssl.h"\
      +	".\mod_ssl_openssl.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_io.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_date.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_ssl.h"\
      +	".\mod_ssl_openssl.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_kernel.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_md5.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_md5.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\mod_ssl.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_log.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_mutex.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_ocsp.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_base64.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_pphrase.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_rand.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_engine_vars.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\loggers\mod_log_config.h"\
      +	".\mod_ssl.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_scache.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	"..\generators\mod_status.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_util.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_util_ocsp.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_util_ssl.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +.\ssl_util_stapling.c : \
      +	"..\..\include\ap_config.h"\
      +	"..\..\include\ap_config_layout.h"\
      +	"..\..\include\ap_expr.h"\
      +	"..\..\include\ap_hooks.h"\
      +	"..\..\include\ap_mmn.h"\
      +	"..\..\include\ap_mpm.h"\
      +	"..\..\include\ap_provider.h"\
      +	"..\..\include\ap_regex.h"\
      +	"..\..\include\ap_release.h"\
      +	"..\..\include\ap_socache.h"\
      +	"..\..\include\apache_noprobes.h"\
      +	"..\..\include\http_config.h"\
      +	"..\..\include\http_connection.h"\
      +	"..\..\include\http_core.h"\
      +	"..\..\include\http_log.h"\
      +	"..\..\include\http_main.h"\
      +	"..\..\include\http_protocol.h"\
      +	"..\..\include\http_request.h"\
      +	"..\..\include\http_vhost.h"\
      +	"..\..\include\httpd.h"\
      +	"..\..\include\mod_auth.h"\
      +	"..\..\include\os.h"\
      +	"..\..\include\scoreboard.h"\
      +	"..\..\include\util_cfgtree.h"\
      +	"..\..\include\util_charset.h"\
      +	"..\..\include\util_ebcdic.h"\
      +	"..\..\include\util_filter.h"\
      +	"..\..\include\util_mutex.h"\
      +	"..\..\include\util_script.h"\
      +	"..\..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\..\srclib\apr-util\include\apr_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_optional.h"\
      +	"..\..\srclib\apr-util\include\apr_optional_hooks.h"\
      +	"..\..\srclib\apr-util\include\apr_uri.h"\
      +	"..\..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\..\srclib\apr-util\include\apu.h"\
      +	"..\..\srclib\apr\include\apr.h"\
      +	"..\..\srclib\apr\include\apr_allocator.h"\
      +	"..\..\srclib\apr\include\apr_dso.h"\
      +	"..\..\srclib\apr\include\apr_errno.h"\
      +	"..\..\srclib\apr\include\apr_file_info.h"\
      +	"..\..\srclib\apr\include\apr_file_io.h"\
      +	"..\..\srclib\apr\include\apr_fnmatch.h"\
      +	"..\..\srclib\apr\include\apr_general.h"\
      +	"..\..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\..\srclib\apr\include\apr_hash.h"\
      +	"..\..\srclib\apr\include\apr_inherit.h"\
      +	"..\..\srclib\apr\include\apr_lib.h"\
      +	"..\..\srclib\apr\include\apr_mmap.h"\
      +	"..\..\srclib\apr\include\apr_network_io.h"\
      +	"..\..\srclib\apr\include\apr_poll.h"\
      +	"..\..\srclib\apr\include\apr_pools.h"\
      +	"..\..\srclib\apr\include\apr_portable.h"\
      +	"..\..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\..\srclib\apr\include\apr_ring.h"\
      +	"..\..\srclib\apr\include\apr_shm.h"\
      +	"..\..\srclib\apr\include\apr_strings.h"\
      +	"..\..\srclib\apr\include\apr_tables.h"\
      +	"..\..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\..\srclib\apr\include\apr_time.h"\
      +	"..\..\srclib\apr\include\apr_user.h"\
      +	"..\..\srclib\apr\include\apr_want.h"\
      +	".\ssl_private.h"\
      +	".\ssl_util_ssl.h"\
      +	
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/modules/ssl/mod_ssl.dsp b/modules/ssl/mod_ssl.dsp
      index fc86a7b6e88..72af2936cef 100644
      --- a/modules/ssl/mod_ssl.dsp
      +++ b/modules/ssl/mod_ssl.dsp
      @@ -43,7 +43,7 @@ RSC=rc.exe
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fd"Release\mod_ssl_src" /FD /c
      +# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /D "SSL_DECLARE_EXPORT" /Fd"Release\mod_ssl_src" /FD /c
       # ADD BASE MTL /nologo /D "NDEBUG" /win32
       # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "NDEBUG"
      @@ -75,7 +75,7 @@ PostBuild_Cmds=if exist $(TargetPath).manifest mt.exe -manifest $(TargetPath).ma
       # PROP Ignore_Export_Lib 0
       # PROP Target_Dir ""
       # ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
      -# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /Fd"Debug\mod_ssl_src" /FD /c
      +# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /D "SSL_DECLARE_EXPORT" /Fd"Debug\mod_ssl_src" /FD /c
       # ADD BASE MTL /nologo /D "_DEBUG" /win32
       # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
       # ADD BASE RSC /l 0x409 /d "_DEBUG"
      @@ -112,10 +112,6 @@ SOURCE=.\ssl_engine_config.c
       # End Source File
       # Begin Source File
       
      -SOURCE=.\ssl_engine_dh.c
      -# End Source File
      -# Begin Source File
      -
       SOURCE=.\ssl_engine_init.c
       # End Source File
       # Begin Source File
      diff --git a/modules/ssl/mod_ssl.h b/modules/ssl/mod_ssl.h
      index 48984e2401a..db8ffafd2ec 100644
      --- a/modules/ssl/mod_ssl.h
      +++ b/modules/ssl/mod_ssl.h
      @@ -29,6 +29,27 @@
       #include "httpd.h"
       #include "apr_optional.h"
       
      +/* Create a set of SSL_DECLARE(type), SSL_DECLARE_NONSTD(type) and
      + * SSL_DECLARE_DATA with appropriate export and import tags for the platform
      + */
      +#if !defined(WIN32)
      +#define SSL_DECLARE(type)            type
      +#define SSL_DECLARE_NONSTD(type)     type
      +#define SSL_DECLARE_DATA
      +#elif defined(SSL_DECLARE_STATIC)
      +#define SSL_DECLARE(type)            type __stdcall
      +#define SSL_DECLARE_NONSTD(type)     type
      +#define SSL_DECLARE_DATA
      +#elif defined(SSL_DECLARE_EXPORT)
      +#define SSL_DECLARE(type)            __declspec(dllexport) type __stdcall
      +#define SSL_DECLARE_NONSTD(type)     __declspec(dllexport) type
      +#define SSL_DECLARE_DATA             __declspec(dllexport)
      +#else
      +#define SSL_DECLARE(type)            __declspec(dllimport) type __stdcall
      +#define SSL_DECLARE_NONSTD(type)     __declspec(dllimport) type
      +#define SSL_DECLARE_DATA             __declspec(dllimport)
      +#endif
      +
       /** The ssl_var_lookup() optional function retrieves SSL environment
        * variables. */
       APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup,
      diff --git a/modules/ssl/mod_ssl.mak b/modules/ssl/mod_ssl.mak
      new file mode 100644
      index 00000000000..a3bd304a545
      --- /dev/null
      +++ b/modules/ssl/mod_ssl.mak
      @@ -0,0 +1,487 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on mod_ssl.dsp
      +!IF "$(CFG)" == ""
      +CFG=mod_ssl - Win32 Release
      +!MESSAGE No configuration specified. Defaulting to mod_ssl - Win32 Release.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "mod_ssl - Win32 Release" && "$(CFG)" != "mod_ssl - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "mod_ssl.mak" CFG="mod_ssl - Win32 Release"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "mod_ssl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE "mod_ssl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ssl - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Release" "libaprutil - Win32 Release" "libapr - Win32 Release" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" "libaprutil - Win32 ReleaseCLEAN" "libhttpd - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ssl.obj"
      +	-@erase "$(INTDIR)\mod_ssl.res"
      +	-@erase "$(INTDIR)\mod_ssl_src.idb"
      +	-@erase "$(INTDIR)\mod_ssl_src.pdb"
      +	-@erase "$(INTDIR)\ssl_engine_config.obj"
      +	-@erase "$(INTDIR)\ssl_engine_init.obj"
      +	-@erase "$(INTDIR)\ssl_engine_io.obj"
      +	-@erase "$(INTDIR)\ssl_engine_kernel.obj"
      +	-@erase "$(INTDIR)\ssl_engine_log.obj"
      +	-@erase "$(INTDIR)\ssl_engine_mutex.obj"
      +	-@erase "$(INTDIR)\ssl_engine_ocsp.obj"
      +	-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
      +	-@erase "$(INTDIR)\ssl_engine_rand.obj"
      +	-@erase "$(INTDIR)\ssl_engine_vars.obj"
      +	-@erase "$(INTDIR)\ssl_scache.obj"
      +	-@erase "$(INTDIR)\ssl_util.obj"
      +	-@erase "$(INTDIR)\ssl_util_ocsp.obj"
      +	-@erase "$(INTDIR)\ssl_util_ssl.obj"
      +	-@erase "$(INTDIR)\ssl_util_stapling.obj"
      +	-@erase "$(OUTDIR)\mod_ssl.exp"
      +	-@erase "$(OUTDIR)\mod_ssl.lib"
      +	-@erase "$(OUTDIR)\mod_ssl.pdb"
      +	-@erase "$(OUTDIR)\mod_ssl.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /D "SSL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ssl.obj" \
      +	"$(INTDIR)\ssl_engine_config.obj" \
      +	"$(INTDIR)\ssl_engine_init.obj" \
      +	"$(INTDIR)\ssl_engine_io.obj" \
      +	"$(INTDIR)\ssl_engine_kernel.obj" \
      +	"$(INTDIR)\ssl_engine_log.obj" \
      +	"$(INTDIR)\ssl_engine_mutex.obj" \
      +	"$(INTDIR)\ssl_engine_pphrase.obj" \
      +	"$(INTDIR)\ssl_engine_rand.obj" \
      +	"$(INTDIR)\ssl_engine_vars.obj" \
      +	"$(INTDIR)\ssl_engine_ocsp.obj" \
      +	"$(INTDIR)\ssl_util_ocsp.obj" \
      +	"$(INTDIR)\ssl_scache.obj" \
      +	"$(INTDIR)\ssl_util_stapling.obj" \
      +	"$(INTDIR)\ssl_util.obj" \
      +	"$(INTDIR)\ssl_util_ssl.obj" \
      +	"$(INTDIR)\mod_ssl.res" \
      +	"..\..\srclib\apr\Release\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Release\libaprutil-1.lib" \
      +	"..\..\Release\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\mod_ssl.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
      +   if exist .\Release\mod_ssl.so.manifest mt.exe -manifest .\Release\mod_ssl.so.manifest -outputresource:.\Release\mod_ssl.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "mod_ssl - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "libhttpd - Win32 Debug" "libaprutil - Win32 Debug" "libapr - Win32 Debug" "$(OUTDIR)\mod_ssl.so" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" "libaprutil - Win32 DebugCLEAN" "libhttpd - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\mod_ssl.obj"
      +	-@erase "$(INTDIR)\mod_ssl.res"
      +	-@erase "$(INTDIR)\mod_ssl_src.idb"
      +	-@erase "$(INTDIR)\mod_ssl_src.pdb"
      +	-@erase "$(INTDIR)\ssl_engine_config.obj"
      +	-@erase "$(INTDIR)\ssl_engine_init.obj"
      +	-@erase "$(INTDIR)\ssl_engine_io.obj"
      +	-@erase "$(INTDIR)\ssl_engine_kernel.obj"
      +	-@erase "$(INTDIR)\ssl_engine_log.obj"
      +	-@erase "$(INTDIR)\ssl_engine_mutex.obj"
      +	-@erase "$(INTDIR)\ssl_engine_ocsp.obj"
      +	-@erase "$(INTDIR)\ssl_engine_pphrase.obj"
      +	-@erase "$(INTDIR)\ssl_engine_rand.obj"
      +	-@erase "$(INTDIR)\ssl_engine_vars.obj"
      +	-@erase "$(INTDIR)\ssl_scache.obj"
      +	-@erase "$(INTDIR)\ssl_util.obj"
      +	-@erase "$(INTDIR)\ssl_util_ocsp.obj"
      +	-@erase "$(INTDIR)\ssl_util_ssl.obj"
      +	-@erase "$(INTDIR)\ssl_util_stapling.obj"
      +	-@erase "$(OUTDIR)\mod_ssl.exp"
      +	-@erase "$(OUTDIR)\mod_ssl.lib"
      +	-@erase "$(OUTDIR)\mod_ssl.pdb"
      +	-@erase "$(OUTDIR)\mod_ssl.so"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../../include" /I "../generators" /I "../../srclib/apr/include" /I "../../srclib/apr-util/include" /I "../../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /D "HAVE_OPENSSL" /D "HAVE_SSL_SET_STATE" /D "HAVE_OPENSSL_ENGINE_H" /D "HAVE_ENGINE_INIT" /D "HAVE_ENGINE_LOAD_BUILTIN_ENGINES" /D "SSL_DECLARE_EXPORT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\mod_ssl_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\mod_ssl.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib wsock32.lib ws2_32.lib advapi32.lib gdi32.lib libeay32.lib ssleay32.lib /nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\mod_ssl.pdb" /debug /out:"$(OUTDIR)\mod_ssl.so" /implib:"$(OUTDIR)\mod_ssl.lib" /libpath:"../../srclib/openssl/out32dll.dbg" /libpath:"../../srclib/openssl/out32.dbg" /libpath:"../../srclib/openssl/out32dll" /libpath:"../../srclib/openssl/out32" /base:@..\..\os\win32\BaseAddr.ref,mod_ssl.so 
      +LINK32_OBJS= \
      +	"$(INTDIR)\mod_ssl.obj" \
      +	"$(INTDIR)\ssl_engine_config.obj" \
      +	"$(INTDIR)\ssl_engine_init.obj" \
      +	"$(INTDIR)\ssl_engine_io.obj" \
      +	"$(INTDIR)\ssl_engine_kernel.obj" \
      +	"$(INTDIR)\ssl_engine_log.obj" \
      +	"$(INTDIR)\ssl_engine_mutex.obj" \
      +	"$(INTDIR)\ssl_engine_pphrase.obj" \
      +	"$(INTDIR)\ssl_engine_rand.obj" \
      +	"$(INTDIR)\ssl_engine_vars.obj" \
      +	"$(INTDIR)\ssl_engine_ocsp.obj" \
      +	"$(INTDIR)\ssl_util_ocsp.obj" \
      +	"$(INTDIR)\ssl_scache.obj" \
      +	"$(INTDIR)\ssl_util_stapling.obj" \
      +	"$(INTDIR)\ssl_util.obj" \
      +	"$(INTDIR)\ssl_util_ssl.obj" \
      +	"$(INTDIR)\mod_ssl.res" \
      +	"..\..\srclib\apr\Debug\libapr-1.lib" \
      +	"..\..\srclib\apr-util\Debug\libaprutil-1.lib" \
      +	"..\..\Debug\libhttpd.lib"
      +
      +"$(OUTDIR)\mod_ssl.so" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\mod_ssl.so
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\mod_ssl.so"
      +   if exist .\Debug\mod_ssl.so.manifest mt.exe -manifest .\Debug\mod_ssl.so.manifest -outputresource:.\Debug\mod_ssl.so;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("mod_ssl.dep")
      +!INCLUDE "mod_ssl.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "mod_ssl.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "mod_ssl - Win32 Release" || "$(CFG)" == "mod_ssl - Win32 Debug"
      +SOURCE=.\mod_ssl.c
      +
      +"$(INTDIR)\mod_ssl.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_config.c
      +
      +"$(INTDIR)\ssl_engine_config.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_init.c
      +
      +"$(INTDIR)\ssl_engine_init.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_io.c
      +
      +"$(INTDIR)\ssl_engine_io.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_kernel.c
      +
      +"$(INTDIR)\ssl_engine_kernel.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_log.c
      +
      +"$(INTDIR)\ssl_engine_log.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_mutex.c
      +
      +"$(INTDIR)\ssl_engine_mutex.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_ocsp.c
      +
      +"$(INTDIR)\ssl_engine_ocsp.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_pphrase.c
      +
      +"$(INTDIR)\ssl_engine_pphrase.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_rand.c
      +
      +"$(INTDIR)\ssl_engine_rand.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_engine_vars.c
      +
      +"$(INTDIR)\ssl_engine_vars.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_scache.c
      +
      +"$(INTDIR)\ssl_scache.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_util.c
      +
      +"$(INTDIR)\ssl_util.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_util_ocsp.c
      +
      +"$(INTDIR)\ssl_util_ocsp.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_util_ssl.c
      +
      +"$(INTDIR)\ssl_util_ssl.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ssl_util_stapling.c
      +
      +"$(INTDIR)\ssl_util_stapling.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +!IF  "$(CFG)" == "mod_ssl - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\modules\ssl"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ssl"
      +
      +!ELSEIF  "$(CFG)" == "mod_ssl - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\modules\ssl"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ssl"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ssl - Win32 Release"
      +
      +"libaprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" 
      +   cd "..\..\modules\ssl"
      +
      +"libaprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ssl"
      +
      +!ELSEIF  "$(CFG)" == "mod_ssl - Win32 Debug"
      +
      +"libaprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" 
      +   cd "..\..\modules\ssl"
      +
      +"libaprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libaprutil.mak" CFG="libaprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\modules\ssl"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "mod_ssl - Win32 Release"
      +
      +"libhttpd - Win32 Release" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" 
      +   cd ".\modules\ssl"
      +
      +"libhttpd - Win32 ReleaseCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Release" RECURSE=1 CLEAN 
      +   cd ".\modules\ssl"
      +
      +!ELSEIF  "$(CFG)" == "mod_ssl - Win32 Debug"
      +
      +"libhttpd - Win32 Debug" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" 
      +   cd ".\modules\ssl"
      +
      +"libhttpd - Win32 DebugCLEAN" : 
      +   cd ".\..\.."
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libhttpd.mak" CFG="libhttpd - Win32 Debug" RECURSE=1 CLEAN 
      +   cd ".\modules\ssl"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "mod_ssl - Win32 Release"
      +
      +
      +"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "mod_ssl - Win32 Debug"
      +
      +
      +"$(INTDIR)\mod_ssl.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\mod_ssl.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d BIN_NAME="mod_ssl.so" /d LONG_NAME="proxy_ssl_module for Apache" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/modules/ssl/mod_ssl_openssl.h b/modules/ssl/mod_ssl_openssl.h
      new file mode 100644
      index 00000000000..0fa654ade56
      --- /dev/null
      +++ b/modules/ssl/mod_ssl_openssl.h
      @@ -0,0 +1,73 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +/**
      + * @file mod_ssl_openssl.h
      + * @brief Interface to OpenSSL-specific APIs provided by mod_ssl
      + *
      + * @defgroup MOD_SSL mod_ssl_openssl
      + * @ingroup  APACHE_MODS
      + * @{
      + */
      +
      +#ifndef __MOD_SSL_OPENSSL_H__
      +#define __MOD_SSL_OPENSSL_H__
      +
      +#include "mod_ssl.h"
      +
      +/* OpenSSL headers */
      +
      +#ifndef SSL_PRIVATE_H
      +#include <openssl/opensslv.h>
      +#if (OPENSSL_VERSION_NUMBER >= 0x10001000)
      +/* must be defined before including ssl.h */
      +#define OPENSSL_NO_SSL_INTERN
      +#endif
      +#include <openssl/ssl.h>
      +#endif
      +
      +/**
      + * init_server hook -- allow SSL_CTX-specific initialization to be performed by
      + * a module for each SSL-enabled server (one at a time)
      + * @param s SSL-enabled [virtual] server
      + * @param p pconf pool
      + * @param is_proxy 1 if this server supports backend connections
      + * over SSL/TLS, 0 if it supports client connections over SSL/TLS
      + * @param ctx OpenSSL SSL Context for the server
      + */
      +APR_DECLARE_EXTERNAL_HOOK(ssl, SSL, int, init_server,
      +                          (server_rec *s, apr_pool_t *p, int is_proxy, SSL_CTX *ctx))
      +
      +/**
      + * pre_handshake hook
      + * @param c conn_rec for new connection from client or to backend server
      + * @param ssl OpenSSL SSL Connection for the client or backend server
      + * @param is_proxy 1 if this handshake is for a backend connection, 0 otherwise
      + */
      +APR_DECLARE_EXTERNAL_HOOK(ssl, SSL, int, pre_handshake,
      +                          (conn_rec *c, SSL *ssl, int is_proxy))
      +
      +/**
      + * proxy_post_handshake hook -- allow module to abort after successful
      + * handshake with backend server and subsequent peer checks
      + * @param c conn_rec for connection to backend server
      + * @param ssl OpenSSL SSL Connection for the client or backend server
      + */
      +APR_DECLARE_EXTERNAL_HOOK(ssl, SSL, int, proxy_post_handshake,
      +                          (conn_rec *c, SSL *ssl))
      +
      +#endif /* __MOD_SSL_OPENSSL_H__ */
      +/** @} */
      diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c
      index 1d140f55834..129a01ff545 100644
      --- a/modules/ssl/ssl_engine_config.c
      +++ b/modules/ssl/ssl_engine_config.c
      @@ -66,17 +66,15 @@ SSLModConfigRec *ssl_config_global_create(server_rec *s)
                                                       sizeof(ssl_randseed_t));
           mc->tVHostKeys             = apr_hash_make(pool);
           mc->tPrivateKey            = apr_hash_make(pool);
      -    mc->tPublicCert            = apr_hash_make(pool);
       #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
           mc->szCryptoDevice         = NULL;
       #endif
       #ifdef HAVE_OCSP_STAPLING
           mc->stapling_cache         = NULL;
      -    mc->stapling_mutex         = NULL;
      +    mc->stapling_cache_mutex   = NULL;
      +    mc->stapling_refresh_mutex = NULL;
       #endif
       
      -    memset(mc->pTmpKeys, 0, sizeof(mc->pTmpKeys));
      -
           apr_pool_userdata_set(mc, SSL_MOD_CONFIG_KEY,
                                 apr_pool_cleanup_null,
                                 pool);
      @@ -100,7 +98,7 @@ BOOL ssl_config_global_isfixed(SSLModConfigRec *mc)
       **  _________________________________________________________________
       */
       
      -static void modssl_ctx_init(modssl_ctx_t *mctx)
      +static void modssl_ctx_init(modssl_ctx_t *mctx, apr_pool_t *p)
       {
           mctx->sc                  = NULL; /* set during module init */
       
      @@ -109,17 +107,21 @@ static void modssl_ctx_init(modssl_ctx_t *mctx)
           mctx->pks                 = NULL;
           mctx->pkp                 = NULL;
       
      -    mctx->protocol            = SSL_PROTOCOL_ALL;
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    mctx->ticket_key          = NULL;
      +#endif
      +
      +    mctx->protocol            = SSL_PROTOCOL_DEFAULT;
      +    mctx->protocol_set        = 0;
       
           mctx->pphrase_dialog_type = SSL_PPTYPE_UNSET;
           mctx->pphrase_dialog_path = NULL;
       
      -    mctx->pkcs7               = NULL;
           mctx->cert_chain          = NULL;
       
           mctx->crl_path            = NULL;
           mctx->crl_file            = NULL;
      -    mctx->crl_check_mode      = SSL_CRLCHECK_UNSET;
      +    mctx->crl_check_mask      = UNSET;
       
           mctx->auth.ca_cert_path   = NULL;
           mctx->auth.ca_cert_file   = NULL;
      @@ -133,6 +135,8 @@ static void modssl_ctx_init(modssl_ctx_t *mctx)
           mctx->ocsp_resptime_skew  = UNSET;
           mctx->ocsp_resp_maxage    = UNSET;
           mctx->ocsp_responder_timeout = UNSET;
      +    mctx->ocsp_use_request_nonce = UNSET;
      +    mctx->proxy_uri              = NULL;
       
       #ifdef HAVE_OCSP_STAPLING
           mctx->stapling_enabled           = UNSET;
      @@ -145,6 +149,19 @@ static void modssl_ctx_init(modssl_ctx_t *mctx)
           mctx->stapling_responder_timeout = UNSET;
           mctx->stapling_force_url         = NULL;
       #endif
      +
      +#ifdef HAVE_SRP
      +    mctx->srp_vfile =             NULL;
      +    mctx->srp_unknown_user_seed = NULL;
      +    mctx->srp_vbase =             NULL;
      +#endif
      +#ifdef HAVE_SSL_CONF_CMD
      +    mctx->ssl_ctx_config = SSL_CONF_CTX_new();
      +    SSL_CONF_CTX_set_flags(mctx->ssl_ctx_config, SSL_CONF_FLAG_FILE);
      +    SSL_CONF_CTX_set_flags(mctx->ssl_ctx_config, SSL_CONF_FLAG_SERVER);
      +    SSL_CONF_CTX_set_flags(mctx->ssl_ctx_config, SSL_CONF_FLAG_CERTIFICATE);
      +    mctx->ssl_ctx_param = apr_array_make(p, 5, sizeof(ssl_ctx_param_t));
      +#endif
       }
       
       static void modssl_ctx_init_proxy(SSLSrvConfigRec *sc,
      @@ -154,7 +171,7 @@ static void modssl_ctx_init_proxy(SSLSrvConfigRec *sc,
       
           mctx = sc->proxy = apr_palloc(p, sizeof(*sc->proxy));
       
      -    modssl_ctx_init(mctx);
      +    modssl_ctx_init(mctx, p);
       
           mctx->pkp = apr_palloc(p, sizeof(*mctx->pkp));
       
      @@ -172,11 +189,16 @@ static void modssl_ctx_init_server(SSLSrvConfigRec *sc,
       
           mctx = sc->server = apr_palloc(p, sizeof(*sc->server));
       
      -    modssl_ctx_init(mctx);
      +    modssl_ctx_init(mctx, p);
       
           mctx->pks = apr_pcalloc(p, sizeof(*mctx->pks));
       
      -    /* mctx->pks->... certs/keys are set during module init */
      +    mctx->pks->cert_files = apr_array_make(p, 3, sizeof(char *));
      +    mctx->pks->key_files  = apr_array_make(p, 3, sizeof(char *));
      +
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    mctx->ticket_key = apr_pcalloc(p, sizeof(*mctx->ticket_key));
      +#endif
       }
       
       static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
      @@ -184,7 +206,7 @@ static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
           SSLSrvConfigRec *sc = apr_palloc(p, sizeof(*sc));
       
           sc->mc                     = NULL;
      -    sc->enabled                = SSL_ENABLED_FALSE;
      +    sc->enabled                = SSL_ENABLED_UNSET;
           sc->proxy_enabled          = UNSET;
           sc->vhost_id               = NULL;  /* set during module init */
           sc->vhost_id_len           = 0;     /* set during module init */
      @@ -193,18 +215,17 @@ static SSLSrvConfigRec *ssl_config_server_new(apr_pool_t *p)
           sc->insecure_reneg         = UNSET;
           sc->proxy_ssl_check_peer_expire = SSL_ENABLED_UNSET;
           sc->proxy_ssl_check_peer_cn     = SSL_ENABLED_UNSET;
      -#ifndef OPENSSL_NO_TLSEXT
      +    sc->proxy_ssl_check_peer_name   = SSL_ENABLED_UNSET;
      +#ifdef HAVE_TLSEXT
           sc->strict_sni_vhost_check = SSL_ENABLED_UNSET;
       #endif
       #ifdef HAVE_FIPS
           sc->fips                   = UNSET;
       #endif
      -
      -#ifdef HAVE_TLSEXT_TICKETS
      -    sc->default_ticket_name = NULL;
      -    sc->default_ticket = NULL;
      -    sc->tickets = apr_array_make(p, 4, sizeof(modssl_ticket_t*));
      +#ifndef OPENSSL_NO_COMP
      +    sc->compression            = UNSET;
       #endif
      +    sc->session_tickets        = UNSET;
       
           modssl_ctx_init_proxy(sc, p);
       
      @@ -226,16 +247,22 @@ void *ssl_config_server_create(apr_pool_t *p, server_rec *s)
       }
       
       #define cfgMerge(el,unset)  mrg->el = (add->el == (unset)) ? base->el : add->el
      -#define cfgMergeArray(el)   mrg->el = apr_array_append(p, add->el, base->el)
      +#define cfgMergeArray(el)   mrg->el = apr_array_append(p, base->el, add->el)
       #define cfgMergeString(el)  cfgMerge(el, NULL)
       #define cfgMergeBool(el)    cfgMerge(el, UNSET)
       #define cfgMergeInt(el)     cfgMerge(el, UNSET)
       
      -static void modssl_ctx_cfg_merge(modssl_ctx_t *base,
      +static void modssl_ctx_cfg_merge(apr_pool_t *p,
      +                                 modssl_ctx_t *base,
                                        modssl_ctx_t *add,
                                        modssl_ctx_t *mrg)
       {
      -    cfgMerge(protocol, SSL_PROTOCOL_ALL);
      +    if (add->protocol_set) {
      +        mrg->protocol = add->protocol;
      +    }
      +    else {
      +        mrg->protocol = base->protocol;
      +    }
       
           cfgMerge(pphrase_dialog_type, SSL_PPTYPE_UNSET);
           cfgMergeString(pphrase_dialog_path);
      @@ -244,7 +271,7 @@ static void modssl_ctx_cfg_merge(modssl_ctx_t *base,
       
           cfgMerge(crl_path, NULL);
           cfgMerge(crl_file, NULL);
      -    cfgMerge(crl_check_mode, SSL_CRLCHECK_UNSET);
      +    cfgMergeInt(crl_check_mask);
       
           cfgMergeString(auth.ca_cert_path);
           cfgMergeString(auth.ca_cert_file);
      @@ -258,6 +285,8 @@ static void modssl_ctx_cfg_merge(modssl_ctx_t *base,
           cfgMergeInt(ocsp_resptime_skew);
           cfgMergeInt(ocsp_resp_maxage);
           cfgMergeInt(ocsp_responder_timeout);
      +    cfgMergeBool(ocsp_use_request_nonce);
      +    cfgMerge(proxy_uri, NULL);
       #ifdef HAVE_OCSP_STAPLING
           cfgMergeBool(stapling_enabled);
           cfgMergeInt(stapling_resptime_skew);
      @@ -269,34 +298,83 @@ static void modssl_ctx_cfg_merge(modssl_ctx_t *base,
           cfgMergeInt(stapling_responder_timeout);
           cfgMerge(stapling_force_url, NULL);
       #endif
      +
      +#ifdef HAVE_SRP
      +    cfgMergeString(srp_vfile);
      +    cfgMergeString(srp_unknown_user_seed);
      +#endif
      +
      +#ifdef HAVE_SSL_CONF_CMD
      +    cfgMergeArray(ssl_ctx_param);
      +#endif
       }
       
      -static void modssl_ctx_cfg_merge_proxy(modssl_ctx_t *base,
      +static void modssl_ctx_cfg_merge_proxy(apr_pool_t *p,
      +                                       modssl_ctx_t *base,
                                              modssl_ctx_t *add,
                                              modssl_ctx_t *mrg)
       {
      -    modssl_ctx_cfg_merge(base, add, mrg);
      +    modssl_ctx_cfg_merge(p, base, add, mrg);
       
           cfgMergeString(pkp->cert_file);
           cfgMergeString(pkp->cert_path);
           cfgMergeString(pkp->ca_cert_file);
       }
       
      -static void modssl_ctx_cfg_merge_server(modssl_ctx_t *base,
      -                                        modssl_ctx_t *add,
      -                                        modssl_ctx_t *mrg)
      +static void modssl_ctx_cfg_merge_certkeys_array(apr_pool_t *p,
      +                                                apr_array_header_t *base,
      +                                                apr_array_header_t *add,
      +                                                apr_array_header_t *mrg)
       {
           int i;
       
      -    modssl_ctx_cfg_merge(base, add, mrg);
      +    /*
      +     * pick up to CERTKEYS_IDX_MAX+1 entries from "add" (in which case they
      +     * they "knock out" their corresponding entries in "base", emulating
      +     * the behavior with cfgMergeString in releases up to 2.4.7)
      +     */
      +    for (i = 0; i < add->nelts && i <= CERTKEYS_IDX_MAX; i++) {
      +        APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(add, i, const char *);
      +    }
      +
      +    /* add remaining ones from "base" */
      +    while (i < base->nelts) {
      +        APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(base, i, const char *);
      +        i++;
      +    }
       
      -    for (i = 0; i < SSL_AIDX_MAX; i++) {
      -        cfgMergeString(pks->cert_files[i]);
      -        cfgMergeString(pks->key_files[i]);
      +    /* and finally, append the rest of "add" (if there are any) */
      +    for (i = CERTKEYS_IDX_MAX+1; i < add->nelts; i++) {
      +        APR_ARRAY_PUSH(mrg, const char *) = APR_ARRAY_IDX(add, i, const char *);
           }
      +}
      +
      +static void modssl_ctx_cfg_merge_server(apr_pool_t *p,
      +                                        modssl_ctx_t *base,
      +                                        modssl_ctx_t *add,
      +                                        modssl_ctx_t *mrg)
      +{
      +    modssl_ctx_cfg_merge(p, base, add, mrg);
      +
      +    /*
      +     * For better backwards compatibility with releases up to 2.4.7,
      +     * merging global and vhost-level SSLCertificateFile and
      +     * SSLCertificateKeyFile directives needs special treatment.
      +     * See also PR 56306 and 56353.
      +     */
      +    modssl_ctx_cfg_merge_certkeys_array(p, base->pks->cert_files,
      +                                        add->pks->cert_files,
      +                                        mrg->pks->cert_files);
      +    modssl_ctx_cfg_merge_certkeys_array(p, base->pks->key_files,
      +                                        add->pks->key_files,
      +                                        mrg->pks->key_files);
       
           cfgMergeString(pks->ca_name_path);
           cfgMergeString(pks->ca_name_file);
      +
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    cfgMergeString(ticket_key->file_path);
      +#endif
       }
       
       /*
      @@ -310,27 +388,27 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv)
       
           cfgMerge(mc, NULL);
           cfgMerge(enabled, SSL_ENABLED_UNSET);
      -#ifdef HAVE_TLSEXT_TICKETS
      -    cfgMergeString(default_ticket_name);
      -    apr_array_cat(mrg->tickets, base->tickets);
      -    apr_array_cat(mrg->tickets, add->tickets);
      -#endif
           cfgMergeBool(proxy_enabled);
           cfgMergeInt(session_cache_timeout);
           cfgMergeBool(cipher_server_pref);
           cfgMergeBool(insecure_reneg);
           cfgMerge(proxy_ssl_check_peer_expire, SSL_ENABLED_UNSET);
           cfgMerge(proxy_ssl_check_peer_cn, SSL_ENABLED_UNSET);
      -#ifndef OPENSSL_NO_TLSEXT
      +    cfgMerge(proxy_ssl_check_peer_name, SSL_ENABLED_UNSET);
      +#ifdef HAVE_TLSEXT
           cfgMerge(strict_sni_vhost_check, SSL_ENABLED_UNSET);
       #endif
       #ifdef HAVE_FIPS
           cfgMergeBool(fips);
       #endif
      +#ifndef OPENSSL_NO_COMP
      +    cfgMergeBool(compression);
      +#endif
      +    cfgMergeBool(session_tickets);
       
      -    modssl_ctx_cfg_merge_proxy(base->proxy, add->proxy, mrg->proxy);
      +    modssl_ctx_cfg_merge_proxy(p, base->proxy, add->proxy, mrg->proxy);
       
      -    modssl_ctx_cfg_merge_server(base->server, add->server, mrg->server);
      +    modssl_ctx_cfg_merge_server(p, base->server, add->server, mrg->server);
       
           return mrg;
       }
      @@ -531,8 +609,15 @@ const char *ssl_cmd_SSLRandomSeed(cmd_parms *cmd,
               seed->cpPath = ap_server_root_relative(mc->pPool, arg2+5);
           }
           else if ((arg2len > 4) && strEQn(arg2, "egd:", 4)) {
      +#ifdef HAVE_RAND_EGD
               seed->nSrc   = SSL_RSSRC_EGD;
               seed->cpPath = ap_server_root_relative(mc->pPool, arg2+4);
      +#else
      +        return apr_pstrcat(cmd->pool, "Invalid SSLRandomSeed entropy source `",
      +                           arg2, "': This version of " MODSSL_LIBRARY_NAME
      +                           " does not support the Entropy Gathering Daemon "
      +                           "(EGD).", NULL);
      +#endif
           }
           else if (strcEQ(arg2, "builtin")) {
               seed->nSrc   = SSL_RSSRC_BUILTIN;
      @@ -581,7 +666,7 @@ const char *ssl_cmd_SSLEngine(cmd_parms *cmd, void *dcfg, const char *arg)
       
           if (!strcasecmp(arg, "On")) {
               sc->enabled = SSL_ENABLED_TRUE;
      -    return NULL;
      +        return NULL;
           }
           else if (!strcasecmp(arg, "Off")) {
               sc->enabled = SSL_ENABLED_FALSE;
      @@ -595,64 +680,6 @@ const char *ssl_cmd_SSLEngine(cmd_parms *cmd, void *dcfg, const char *arg)
           return "Argument must be On, Off, or Optional";
       }
       
      -const char *ssl_cmd_SSLTicketKeyDefault(cmd_parms *cmd, void *dcfg, const char *name)
      -{
      -#ifdef HAVE_TLSEXT_TICKETS
      -    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      -
      -    sc->default_ticket_name = name;
      -
      -    return NULL;
      -#else
      -    return "TLS Ticket keys are not supported.";
      -#endif
      -}
      -
      -const char *ssl_cmd_SSLTicketKeyFile(cmd_parms *cmd, void *dcfg, const char *name, const char *path)
      -{
      -#ifdef HAVE_TLSEXT_TICKETS
      -    apr_status_t rv;
      -    apr_file_t *fp;
      -    apr_size_t len;
      -    char buf[TLSEXT_TICKET_KEYLEN];
      -    modssl_ticket_t* ticket = NULL;
      -    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      -
      -    path = ap_server_root_relative(cmd->pool, path);
      -
      -    rv = apr_file_open(&fp, path, APR_READ|APR_BINARY,
      -                       APR_OS_DEFAULT, cmd->temp_pool);
      -
      -    if (rv != APR_SUCCESS) {
      -        return apr_psprintf(cmd->pool,
      -                            "Failed to open %s: (%d) %pm",
      -                            path, rv, &rv);
      -    }
      -
      -    rv = apr_file_read_full(fp, &buf[0], TLSEXT_TICKET_KEYLEN, &len);
      -
      -    if (rv != APR_SUCCESS) {
      -        return apr_psprintf(cmd->pool,
      -                            "Failed to read at least 48 bytes from %s: (%d) %pm",
      -                            path, rv, &rv);
      -    }
      -
      -    ticket = apr_palloc(cmd->pool, sizeof(modssl_ticket_t));
      -
      -    ticket->conf_name = name;
      -
      -    memcpy(ticket->key_name, buf, 16);
      -    memcpy(ticket->hmac_secret, buf + 16, 16);
      -    memcpy(ticket->aes_key, buf + 32, 16);
      -
      -    APR_ARRAY_PUSH(sc->tickets, modssl_ticket_t*) = ticket;
      -
      -    return NULL;
      -#else
      -    return "TLS Ticket keys are not supported.";
      -#endif
      -}
      -
       const char *ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag)
       {
       #ifdef HAVE_FIPS
      @@ -683,6 +710,9 @@ const char *ssl_cmd_SSLCipherSuite(cmd_parms *cmd,
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
           SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
       
      +    /* always disable null and export ciphers */
      +    arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
      +
           if (cmd->path) {
               dc->szCipherSuite = arg;
           }
      @@ -720,6 +750,23 @@ static const char *ssl_cmd_check_file(cmd_parms *parms,
       
       }
       
      +const char *ssl_cmd_SSLCompression(cmd_parms *cmd, void *dcfg, int flag)
      +{
      +#if !defined(OPENSSL_NO_COMP)
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +#ifndef SSL_OP_NO_COMPRESSION
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +    if (err)
      +        return "This version of openssl does not support configuring "
      +               "compression within <VirtualHost> sections.";
      +#endif
      +    sc->compression = flag ? TRUE : FALSE;
      +    return NULL;
      +#else
      +    return "Setting Compression mode unsupported; not implemented by the SSL library";
      +#endif
      +}
      +
       const char *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag)
       {
       #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
      @@ -727,10 +774,21 @@ const char *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag)
           sc->cipher_server_pref = flag?TRUE:FALSE;
           return NULL;
       #else
      -    return "SSLHonorCiperOrder unsupported; not implemented by the SSL library";
      +    return "SSLHonorCipherOrder unsupported; not implemented by the SSL library";
       #endif
       }
       
      +const char *ssl_cmd_SSLSessionTickets(cmd_parms *cmd, void *dcfg, int flag)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +#ifndef SSL_OP_NO_TICKET
      +    return "This version of OpenSSL does not support using "
      +           "SSLSessionTickets.";
      +#endif
      +    sc->session_tickets = flag ? TRUE : FALSE;
      +    return NULL;
      +}
      +
       const char *ssl_cmd_SSLInsecureRenegotiation(cmd_parms *cmd, void *dcfg, int flag)
       {
       #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
      @@ -765,56 +823,19 @@ static const char *ssl_cmd_check_dir(cmd_parms *parms,
       
       }
       
      -#define SSL_AIDX_CERTS 1
      -#define SSL_AIDX_KEYS  2
      -
      -static const char *ssl_cmd_check_aidx_max(cmd_parms *parms,
      -                                          const char *arg,
      -                                          int idx)
      -{
      -    SSLSrvConfigRec *sc = mySrvConfig(parms->server);
      -    const char *err, *desc=NULL, **files=NULL;
      -    int i;
      -
      -    if ((err = ssl_cmd_check_file(parms, &arg))) {
      -        return err;
      -    }
      -
      -    switch (idx) {
      -      case SSL_AIDX_CERTS:
      -        desc = "certificates";
      -        files = sc->server->pks->cert_files;
      -        break;
      -      case SSL_AIDX_KEYS:
      -        desc = "private keys";
      -        files = sc->server->pks->key_files;
      -        break;
      -    }
      -
      -    for (i = 0; i < SSL_AIDX_MAX; i++) {
      -        if (!files[i]) {
      -            files[i] = arg;
      -            return NULL;
      -        }
      -    }
      -
      -    return apr_psprintf(parms->pool,
      -                        "%s: only up to %d "
      -                        "different %s per virtual host allowed",
      -                         parms->cmd->name, SSL_AIDX_MAX, desc);
      -}
      -
       const char *ssl_cmd_SSLCertificateFile(cmd_parms *cmd,
                                              void *dcfg,
                                              const char *arg)
       {
      -
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
           const char *err;
       
      -    if ((err = ssl_cmd_check_aidx_max(cmd, arg, SSL_AIDX_CERTS))) {
      +    if ((err = ssl_cmd_check_file(cmd, &arg))) {
               return err;
           }
       
      +    *(const char **)apr_array_push(sc->server->pks->cert_files) = arg;
      +    
           return NULL;
       }
       
      @@ -822,12 +843,15 @@ const char *ssl_cmd_SSLCertificateKeyFile(cmd_parms *cmd,
                                                 void *dcfg,
                                                 const char *arg)
       {
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
           const char *err;
       
      -    if ((err = ssl_cmd_check_aidx_max(cmd, arg, SSL_AIDX_KEYS))) {
      +    if ((err = ssl_cmd_check_file(cmd, &arg))) {
               return err;
           }
       
      +    *(const char **)apr_array_push(sc->server->pks->key_files) = arg;
      +
           return NULL;
       }
       
      @@ -847,7 +871,8 @@ const char *ssl_cmd_SSLCertificateChainFile(cmd_parms *cmd,
           return NULL;
       }
       
      -const char *ssl_cmd_SSLPKCS7CertificateFile(cmd_parms *cmd,
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd,
                                                   void *dcfg,
                                                   const char *arg)
       {
      @@ -858,10 +883,11 @@ const char *ssl_cmd_SSLPKCS7CertificateFile(cmd_parms *cmd,
               return err;
           }
       
      -    sc->server->pkcs7 = arg;
      +    sc->server->ticket_key->file_path = arg;
       
           return NULL;
       }
      +#endif
       
       #define NO_PER_DIR_SSL_CA \
           "Your SSL library does not have support for per-directory CA"
      @@ -974,23 +1000,38 @@ const char *ssl_cmd_SSLCARevocationFile(cmd_parms *cmd,
       
       static const char *ssl_cmd_crlcheck_parse(cmd_parms *parms,
                                                 const char *arg,
      -                                          ssl_crlcheck_t *mode)
      +                                          int *mask)
       {
      -    if (strcEQ(arg, "none")) {
      -        *mode = SSL_CRLCHECK_NONE;
      +    const char *w;
      +
      +    w = ap_getword_conf(parms->temp_pool, &arg);
      +    if (strcEQ(w, "none")) {
      +        *mask = SSL_CRLCHECK_NONE;
           }
      -    else if (strcEQ(arg, "leaf")) {
      -        *mode = SSL_CRLCHECK_LEAF;
      +    else if (strcEQ(w, "leaf")) {
      +        *mask = SSL_CRLCHECK_LEAF;
           }
      -    else if (strcEQ(arg, "chain")) {
      -        *mode = SSL_CRLCHECK_CHAIN;
      +    else if (strcEQ(w, "chain")) {
      +        *mask = SSL_CRLCHECK_CHAIN;
           }
           else {
               return apr_pstrcat(parms->temp_pool, parms->cmd->name,
      -                           ": Invalid argument '", arg, "'",
      +                           ": Invalid argument '", w, "'",
                                  NULL);
           }
       
      +    while (*arg) {
      +        w = ap_getword_conf(parms->temp_pool, &arg);
      +        if (strcEQ(w, "no_crl_for_cert_ok")) {
      +            *mask |= SSL_CRLCHECK_NO_CRL_FOR_CERT_OK;
      +        }
      +        else {
      +            return apr_pstrcat(parms->temp_pool, parms->cmd->name,
      +                               ": Invalid argument '", w, "'",
      +                               NULL);
      +        }
      +    }
      +
           return NULL;
       }
       
      @@ -1000,7 +1041,7 @@ const char *ssl_cmd_SSLCARevocationCheck(cmd_parms *cmd,
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
      -    return ssl_cmd_crlcheck_parse(cmd, arg, &sc->server->crl_check_mode);
      +    return ssl_cmd_crlcheck_parse(cmd, arg, &sc->server->crl_check_mask);
       }
       
       static const char *ssl_cmd_verify_parse(cmd_parms *parms,
      @@ -1150,7 +1191,9 @@ const char *ssl_cmd_SSLSessionCache(cmd_parms *cmd,
                   all_names = apr_array_pstrcat(cmd->pool, name_list, ',');
       
                   err = apr_psprintf(cmd->pool, "'%s' session cache not supported "
      -                               "(known names: %s)", name, all_names);
      +                               "(known names: %s). Maybe you need to load the "
      +                               "appropriate socache module (mod_socache_%s?).",
      +                               name, all_names, name);
               }
           }
       
      @@ -1269,7 +1312,7 @@ const char *ssl_cmd_SSLRequire(cmd_parms *cmd,
           }
       
           require = apr_array_push(dc->aRequirement);
      -    require->cpExpr = apr_pstrdup(cmd->pool, arg);
      +    require->cpExpr = arg;
           require->mpExpr = info;
       
           return NULL;
      @@ -1307,27 +1350,42 @@ static const char *ssl_cmd_protocol_parse(cmd_parms *parms,
               }
       
               if (strcEQ(w, "SSLv2")) {
      -#ifdef OPENSSL_NO_SSL2
      -            if (action != '-') {
      -                return "SSLv2 not supported by this version of OpenSSL";
      +            if (action == '-') {
      +                continue;
      +            }
      +            else {
      +                return "SSLProtocol: SSLv2 is no longer supported";
                   }
      -#endif
      -            thisopt = SSL_PROTOCOL_SSLV2;
               }
               else if (strcEQ(w, "SSLv3")) {
      +#ifdef OPENSSL_NO_SSL3
      +            if (action != '-') {
      +                return "SSLv3 not supported by this version of OpenSSL";
      +            }
      +            /* Nothing to do, the flag is not present to be toggled */
      +            continue;
      +#else
                   thisopt = SSL_PROTOCOL_SSLV3;
      +#endif
               }
               else if (strcEQ(w, "TLSv1")) {
                   thisopt = SSL_PROTOCOL_TLSV1;
               }
      +#ifdef HAVE_TLSV1_X
      +        else if (strcEQ(w, "TLSv1.1")) {
      +            thisopt = SSL_PROTOCOL_TLSV1_1;
      +        }
      +        else if (strcEQ(w, "TLSv1.2")) {
      +            thisopt = SSL_PROTOCOL_TLSV1_2;
      +        }
      +#endif
               else if (strcEQ(w, "all")) {
                   thisopt = SSL_PROTOCOL_ALL;
               }
               else {
                   return apr_pstrcat(parms->temp_pool,
                                      parms->cmd->name,
      -                               ": Illegal protocol '",
      -                               w, "'", NULL);
      +                               ": Illegal protocol '", w, "'", NULL);
               }
       
               if (action == '-') {
      @@ -1337,6 +1395,12 @@ static const char *ssl_cmd_protocol_parse(cmd_parms *parms,
                   *options |= thisopt;
               }
               else {
      +            if (*options != SSL_PROTOCOL_NONE) {
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, parms->server, APLOGNO(02532)
      +                             "%s: Protocol '%s' overrides already set parameter(s). "
      +                             "Check if a +/- prefix is missing.",
      +                             parms->cmd->name, w);
      +            }
                   *options = thisopt;
               }
           }
      @@ -1350,6 +1414,7 @@ const char *ssl_cmd_SSLProtocol(cmd_parms *cmd,
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
      +    sc->server->protocol_set = 1;
           return ssl_cmd_protocol_parse(cmd, arg, &sc->server->protocol);
       }
       
      @@ -1368,6 +1433,7 @@ const char *ssl_cmd_SSLProxyProtocol(cmd_parms *cmd,
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
      +    sc->proxy->protocol_set = 1;
           return ssl_cmd_protocol_parse(cmd, arg, &sc->proxy->protocol);
       }
       
      @@ -1377,6 +1443,9 @@ const char *ssl_cmd_SSLProxyCipherSuite(cmd_parms *cmd,
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
      +    /* always disable null and export ciphers */
      +    arg = apr_pstrcat(cmd->pool, arg, ":!aNULL:!eNULL:!EXP", NULL);
      +
           sc->proxy->auth.cipher_suite = arg;
       
           return NULL;
      @@ -1486,7 +1555,7 @@ const char *ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *cmd,
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
      -    return ssl_cmd_crlcheck_parse(cmd, arg, &sc->proxy->crl_check_mode);
      +    return ssl_cmd_crlcheck_parse(cmd, arg, &sc->proxy->crl_check_mask);
       }
       
       const char *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *cmd,
      @@ -1609,6 +1678,27 @@ const char *ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const ch
           return NULL;
       }
       
      +const char *ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +
      +    sc->server->ocsp_use_request_nonce = flag ? TRUE : FALSE;
      +
      +    return NULL;
      +}
      +
      +const char *ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg,
      +                                    const char *arg)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +    sc->server->proxy_uri = apr_palloc(cmd->pool, sizeof(apr_uri_t));
      +    if (apr_uri_parse(cmd->pool, arg, sc->server->proxy_uri) != APR_SUCCESS) {
      +        return apr_psprintf(cmd->pool,
      +                            "SSLOCSPProxyURL: Cannot parse URL %s", arg);
      +    }
      +    return NULL;
      +}
      +
       const char *ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag)
       {
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      @@ -1627,9 +1717,18 @@ const char *ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag)
           return NULL;
       }
       
      +const char *ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +
      +    sc->proxy_ssl_check_peer_name = flag ? SSL_ENABLED_TRUE : SSL_ENABLED_FALSE;
      +
      +    return NULL;
      +}
      +
       const char  *ssl_cmd_SSLStrictSNIVHostCheck(cmd_parms *cmd, void *dcfg, int flag)
       {
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
           SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
       
           sc->strict_sni_vhost_check = flag ? SSL_ENABLED_TRUE : SSL_ENABLED_FALSE;
      @@ -1687,7 +1786,9 @@ const char *ssl_cmd_SSLStaplingCache(cmd_parms *cmd,
               all_names = apr_array_pstrcat(cmd->pool, name_list, ',');
       
               err = apr_psprintf(cmd->pool, "'%s' stapling cache not supported "
      -                           "(known names: %s)", name, all_names);
      +                           "(known names: %s) Maybe you need to load the "
      +                           "appropriate socache module (mod_socache_%s?)",
      +                           name, all_names, name);
           }
       
           if (err) {
      @@ -1786,6 +1887,69 @@ const char *ssl_cmd_SSLStaplingForceURL(cmd_parms *cmd, void *dcfg,
       
       #endif /* HAVE_OCSP_STAPLING */
       
      +#ifdef HAVE_SSL_CONF_CMD
      +const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg,
      +                                      const char *arg1, const char *arg2)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +    SSL_CONF_CTX *cctx = sc->server->ssl_ctx_config;
      +    int value_type = SSL_CONF_cmd_value_type(cctx, arg1);
      +    const char *err;
      +    ssl_ctx_param_t *param;
      +
      +    if (value_type == SSL_CONF_TYPE_UNKNOWN) {
      +        return apr_psprintf(cmd->pool,
      +                            "'%s': invalid OpenSSL configuration command",
      +                            arg1);
      +    }
      +
      +    if (value_type == SSL_CONF_TYPE_FILE) {
      +        if ((err = ssl_cmd_check_file(cmd, &arg2)))
      +            return err;
      +    }
      +    else if (value_type == SSL_CONF_TYPE_DIR) {
      +        if ((err = ssl_cmd_check_dir(cmd, &arg2)))
      +            return err;
      +    }
      +
      +    if (strcEQ(arg1, "CipherString")) {
      +        /* always disable null and export ciphers */
      +        arg2 = apr_pstrcat(cmd->pool, arg2, ":!aNULL:!eNULL:!EXP", NULL);
      +    }
      +
      +    param = apr_array_push(sc->server->ssl_ctx_param);
      +    param->name = arg1;
      +    param->value = arg2;
      +    return NULL;
      +}
      +#endif
      +
      +#ifdef HAVE_SRP
      +
      +const char *ssl_cmd_SSLSRPVerifierFile(cmd_parms *cmd, void *dcfg,
      +                                       const char *arg)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +    const char *err;
      +
      +    if ((err = ssl_cmd_check_file(cmd, &arg)))
      +        return err;
      +    /* SRP_VBASE_init takes char*, not const char*  */
      +    sc->server->srp_vfile = apr_pstrdup(cmd->pool, arg);
      +    return NULL;
      +}
      +
      +const char *ssl_cmd_SSLSRPUnknownUserSeed(cmd_parms *cmd, void *dcfg,
      +                                          const char *arg)
      +{
      +    SSLSrvConfigRec *sc = mySrvConfig(cmd->server);
      +    /* SRP_VBASE_new takes char*, not const char*  */
      +    sc->server->srp_unknown_user_seed = apr_pstrdup(cmd->pool, arg);
      +    return NULL;
      +}
      +
      +#endif /* HAVE_SRP */
      +
       void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s)
       {
           apr_file_t *out = NULL;
      @@ -1804,8 +1968,12 @@ void ssl_hook_ConfigTest(apr_pool_t *pconf, server_rec *s)
                   modssl_pk_server_t *const pks = sc->server->pks;
                   int i;
       
      -            for (i = 0; (i < SSL_AIDX_MAX) && pks->cert_files[i]; i++) {
      -                apr_file_printf(out, "  %s\n", pks->cert_files[i]);
      +            for (i = 0; (i < pks->cert_files->nelts) &&
      +                        APR_ARRAY_IDX(pks->cert_files, i, const char *);
      +                 i++) {
      +                apr_file_printf(out, "  %s\n",
      +                                APR_ARRAY_IDX(pks->cert_files,
      +                                              i, const char *));
                   }
               }
       
      diff --git a/modules/ssl/ssl_engine_dh.c b/modules/ssl/ssl_engine_dh.c
      deleted file mode 100644
      index 0cc74555705..00000000000
      --- a/modules/ssl/ssl_engine_dh.c
      +++ /dev/null
      @@ -1,244 +0,0 @@
      -#if 0
      -=pod
      -#endif
      -
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/*                      _             _
      - *  _ __ ___   ___   __| |    ___ ___| |  mod_ssl
      - * | '_ ` _ \ / _ \ / _` |   / __/ __| |  Apache Interface to OpenSSL
      - * | | | | | | (_) | (_| |   \__ \__ \ |
      - * |_| |_| |_|\___/ \__,_|___|___/___/_|
      - *                      |_____|
      - * ssl_engine_dh.c
      - * Diffie-Hellman Built-in Temporary Parameters
      - */
      -
      -#include "ssl_private.h"
      -
      -/* ----BEGIN GENERATED SECTION-------- */
      -
      -/*
      -** Diffie-Hellman-Parameters: (512 bit)
      -**     prime:
      -**         00:9f:db:8b:8a:00:45:44:f0:04:5f:17:37:d0:ba:
      -**         2e:0b:27:4c:df:1a:9f:58:82:18:fb:43:53:16:a1:
      -**         6e:37:41:71:fd:19:d8:d8:f3:7c:39:bf:86:3f:d6:
      -**         0e:3e:30:06:80:a3:03:0c:6e:4c:37:57:d0:8f:70:
      -**         e6:aa:87:10:33
      -**     generator: 2 (0x2)
      -** Diffie-Hellman-Parameters: (1024 bit)
      -**     prime:
      -**         00:d6:7d:e4:40:cb:bb:dc:19:36:d6:93:d3:4a:fd:
      -**         0a:d5:0c:84:d2:39:a4:5f:52:0b:b8:81:74:cb:98:
      -**         bc:e9:51:84:9f:91:2e:63:9c:72:fb:13:b4:b4:d7:
      -**         17:7e:16:d5:5a:c1:79:ba:42:0b:2a:29:fe:32:4a:
      -**         46:7a:63:5e:81:ff:59:01:37:7b:ed:dc:fd:33:16:
      -**         8a:46:1a:ad:3b:72:da:e8:86:00:78:04:5b:07:a7:
      -**         db:ca:78:74:08:7d:15:10:ea:9f:cc:9d:dd:33:05:
      -**         07:dd:62:db:88:ae:aa:74:7d:e0:f4:d6:e2:bd:68:
      -**         b0:e7:39:3e:0f:24:21:8e:b3
      -**     generator: 2 (0x2)
      -*/
      -
      -static unsigned char dh512_p[] = {
      -    0x9F, 0xDB, 0x8B, 0x8A, 0x00, 0x45, 0x44, 0xF0, 0x04, 0x5F, 0x17, 0x37,
      -    0xD0, 0xBA, 0x2E, 0x0B, 0x27, 0x4C, 0xDF, 0x1A, 0x9F, 0x58, 0x82, 0x18,
      -    0xFB, 0x43, 0x53, 0x16, 0xA1, 0x6E, 0x37, 0x41, 0x71, 0xFD, 0x19, 0xD8,
      -    0xD8, 0xF3, 0x7C, 0x39, 0xBF, 0x86, 0x3F, 0xD6, 0x0E, 0x3E, 0x30, 0x06,
      -    0x80, 0xA3, 0x03, 0x0C, 0x6E, 0x4C, 0x37, 0x57, 0xD0, 0x8F, 0x70, 0xE6,
      -    0xAA, 0x87, 0x10, 0x33,
      -};
      -static unsigned char dh512_g[] = {
      -    0x02,
      -};
      -
      -static DH *get_dh512(void)
      -{
      -    DH *dh;
      -
      -    if (!(dh = DH_new())) {
      -        return NULL;
      -    }
      -
      -    dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), NULL);
      -    dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), NULL);
      -    if (!(dh->p && dh->g)) {
      -        DH_free(dh);
      -        return NULL;
      -    }
      -
      -    return dh;
      -}
      -
      -static unsigned char dh1024_p[] = {
      -    0xD6, 0x7D, 0xE4, 0x40, 0xCB, 0xBB, 0xDC, 0x19, 0x36, 0xD6, 0x93, 0xD3,
      -    0x4A, 0xFD, 0x0A, 0xD5, 0x0C, 0x84, 0xD2, 0x39, 0xA4, 0x5F, 0x52, 0x0B,
      -    0xB8, 0x81, 0x74, 0xCB, 0x98, 0xBC, 0xE9, 0x51, 0x84, 0x9F, 0x91, 0x2E,
      -    0x63, 0x9C, 0x72, 0xFB, 0x13, 0xB4, 0xB4, 0xD7, 0x17, 0x7E, 0x16, 0xD5,
      -    0x5A, 0xC1, 0x79, 0xBA, 0x42, 0x0B, 0x2A, 0x29, 0xFE, 0x32, 0x4A, 0x46,
      -    0x7A, 0x63, 0x5E, 0x81, 0xFF, 0x59, 0x01, 0x37, 0x7B, 0xED, 0xDC, 0xFD,
      -    0x33, 0x16, 0x8A, 0x46, 0x1A, 0xAD, 0x3B, 0x72, 0xDA, 0xE8, 0x86, 0x00,
      -    0x78, 0x04, 0x5B, 0x07, 0xA7, 0xDB, 0xCA, 0x78, 0x74, 0x08, 0x7D, 0x15,
      -    0x10, 0xEA, 0x9F, 0xCC, 0x9D, 0xDD, 0x33, 0x05, 0x07, 0xDD, 0x62, 0xDB,
      -    0x88, 0xAE, 0xAA, 0x74, 0x7D, 0xE0, 0xF4, 0xD6, 0xE2, 0xBD, 0x68, 0xB0,
      -    0xE7, 0x39, 0x3E, 0x0F, 0x24, 0x21, 0x8E, 0xB3,
      -};
      -static unsigned char dh1024_g[] = {
      -    0x02,
      -};
      -
      -static DH *get_dh1024(void)
      -{
      -    DH *dh;
      -
      -    if (!(dh = DH_new())) {
      -        return NULL;
      -    }
      -
      -    dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
      -    dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
      -    if (!(dh->p && dh->g)) {
      -        DH_free(dh);
      -        return NULL;
      -    }
      -
      -    return dh;
      -}
      -
      -/* ----END GENERATED SECTION---------- */
      -
      -DH *ssl_dh_GetTmpParam(int nKeyLen)
      -{
      -    DH *dh;
      -
      -    if (nKeyLen == 512)
      -        dh = get_dh512();
      -    else if (nKeyLen == 1024)
      -        dh = get_dh1024();
      -    else
      -        dh = get_dh1024();
      -    return dh;
      -}
      -
      -DH *ssl_dh_GetParamFromFile(char *file)
      -{
      -    DH *dh = NULL;
      -    BIO *bio;
      -
      -    if ((bio = BIO_new_file(file, "r")) == NULL)
      -        return NULL;
      -    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
      -    BIO_free(bio);
      -    return (dh);
      -}
      -
      -/*
      -=cut
      -##
      -##  Embedded Perl script for generating the temporary DH parameters
      -##
      -
      -require 5.003;
      -use strict;
      -
      -#   configuration
      -my $file  = $0;
      -my $begin = '----BEGIN GENERATED SECTION--------';
      -my $end   = '----END GENERATED SECTION----------';
      -
      -#   read ourself and keep a backup
      -open(FP, "<$file") || die;
      -my $source = '';
      -$source .= $_ while (<FP>);
      -close(FP);
      -open(FP, ">$file.bak") || die;
      -print FP $source;
      -close(FP);
      -
      -#   generate the DH parameters
      -print "1. Generate 512 and 1024 bit Diffie-Hellman parameters (p, g)\n";
      -my $rand = '';
      -foreach $file (qw(/var/log/messages /var/adm/messages
      -                  /kernel /vmunix /vmlinuz /etc/hosts /etc/resolv.conf)) {
      -    if (-f $file) {
      -        $rand = $file     if ($rand eq '');
      -        $rand .= ":$file" if ($rand ne '');
      -    }
      -}
      -$rand = "-rand $rand" if ($rand ne '');
      -system("openssl gendh $rand -out dh512.pem 512");
      -system("openssl gendh $rand -out dh1024.pem 1024");
      -
      -#   generate DH param info
      -my $dhinfo = '';
      -open(FP, "openssl dh -noout -text -in dh512.pem |") || die;
      -$dhinfo .= $_ while (<FP>);
      -close(FP);
      -open(FP, "openssl dh -noout -text -in dh1024.pem |") || die;
      -$dhinfo .= $_ while (<FP>);
      -close(FP);
      -$dhinfo =~ s|^|** |mg;
      -$dhinfo = "\n\/\*\n$dhinfo\*\/\n\n";
      -
      -my $indent_args = "-i4 -npsl -di0 -br -nce -d0 -cli0 -npcs -nfc1";
      -
      -#   generate C source from DH params
      -my $dhsource = '';
      -open(FP, "openssl dh -noout -C -in dh512.pem | indent $indent_args | expand |") || die;
      -$dhsource .= $_ while (<FP>);
      -close(FP);
      -open(FP, "openssl dh -noout -C -in dh1024.pem | indent $indent_args | expand |") || die;
      -$dhsource .= $_ while (<FP>);
      -close(FP);
      -$dhsource =~ s|(DH\s+\*get_dh)(\d+)[^}]*\n}|static $1$2(void)
      -{
      -    DH *dh;
      -
      -    if (!(dh = DH_new())) {
      -        return NULL;
      -    }
      -
      -    dh->p = BN_bin2bn(dh$2_p, sizeof(dh$2_p), NULL);
      -    dh->g = BN_bin2bn(dh$2_g, sizeof(dh$2_g), NULL);
      -    if (!(dh->p && dh->g)) {
      -        DH_free(dh);
      -        return NULL;
      -    }
      -
      -    return dh;
      -}
      -|sg;
      -
      -#   generate output
      -my $o = $dhinfo . $dhsource;
      -
      -#   insert the generated code at the target location
      -$source =~ s|(\/\* $begin.+?\n).*\n(.*?\/\* $end)|$1$o$2|s;
      -
      -#   and update the source on disk
      -print "Updating file `$file'\n";
      -open(FP, ">$file") || die;
      -print FP $source;
      -close(FP);
      -
      -#   cleanup
      -unlink("dh512.pem");
      -unlink("dh1024.pem");
      -
      -=pod
      -*/
      diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c
      index 678a60a6c90..cb3efa29291 100644
      --- a/modules/ssl/ssl_engine_init.c
      +++ b/modules/ssl/ssl_engine_init.c
      @@ -27,175 +27,133 @@
                                         see Recursive.''
                                               -- Unknown   */
       #include "ssl_private.h"
      +#include "mod_ssl.h"
      +#include "mod_ssl_openssl.h"
       #include "mpm_common.h"
       
      +APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ssl, SSL, int, init_server,
      +                                    (server_rec *s,apr_pool_t *p,int is_proxy,SSL_CTX *ctx),
      +                                    (s,p,is_proxy,ctx), OK, DECLINED)
      +
       /*  _________________________________________________________________
       **
       **  Module Initialization
       **  _________________________________________________________________
       */
       
      -
      -static void ssl_add_version_components(apr_pool_t *p,
      -                                       server_rec *s)
      -{
      -    char *modver = ssl_var_lookup(p, s, NULL, NULL, "SSL_VERSION_INTERFACE");
      -    char *libver = ssl_var_lookup(p, s, NULL, NULL, "SSL_VERSION_LIBRARY");
      -    char *incver = ssl_var_lookup(p, s, NULL, NULL,
      -                                  "SSL_VERSION_LIBRARY_INTERFACE");
      -
      -    ap_add_version_component(p, libver);
      -
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                 "%s compiled against Server: %s, Library: %s",
      -                 modver, AP_SERVER_BASEVERSION, incver);
      -}
      -
      +#ifdef HAVE_ECC
      +#define KEYTYPES "RSA, DSA or ECC"
      +#else 
      +#define KEYTYPES "RSA or DSA"
      +#endif
       
       /*
      - * Handle the Temporary RSA Keys and DH Params
      + * Grab well-defined DH parameters from OpenSSL, see the get_rfc*
      + * functions in <openssl/bn.h> for all available primes.
        */
      +static DH *make_dh_params(BIGNUM *(*prime)(BIGNUM *), const char *gen)
      +{
      +    DH *dh = DH_new();
       
      -#define MODSSL_TMP_KEY_FREE(mc, type, idx) \
      -    if (mc->pTmpKeys[idx]) { \
      -        type##_free((type *)mc->pTmpKeys[idx]); \
      -        mc->pTmpKeys[idx] = NULL; \
      +    if (!dh) {
      +        return NULL;
           }
      +    dh->p = prime(NULL);
      +    BN_dec2bn(&dh->g, gen);
      +    if (!dh->p || !dh->g) {
      +        DH_free(dh);
      +        return NULL;
      +    }
      +    return dh;
      +}
       
      -#define MODSSL_TMP_KEYS_FREE(mc, type) \
      -    MODSSL_TMP_KEY_FREE(mc, type, SSL_TMP_KEY_##type##_512); \
      -    MODSSL_TMP_KEY_FREE(mc, type, SSL_TMP_KEY_##type##_1024)
      -
      -static void ssl_tmp_keys_free(server_rec *s)
      +/* Storage and initialization for DH parameters. */
      +static struct dhparam {
      +    BIGNUM *(*const prime)(BIGNUM *); /* function to generate... */
      +    DH *dh;                           /* ...this, used for keys.... */
      +    const unsigned int min;           /* ...of length >= this. */
      +} dhparams[] = {
      +    { get_rfc3526_prime_8192, NULL, 6145 },
      +    { get_rfc3526_prime_6144, NULL, 4097 },
      +    { get_rfc3526_prime_4096, NULL, 3073 },
      +    { get_rfc3526_prime_3072, NULL, 2049 },
      +    { get_rfc3526_prime_2048, NULL, 1025 },
      +    { get_rfc2409_prime_1024, NULL, 0 }
      +};
      +
      +static void init_dh_params(void)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
      +    unsigned n;
       
      -    MODSSL_TMP_KEYS_FREE(mc, RSA);
      -    MODSSL_TMP_KEYS_FREE(mc, DH);
      +    for (n = 0; n < sizeof(dhparams)/sizeof(dhparams[0]); n++)
      +        dhparams[n].dh = make_dh_params(dhparams[n].prime, "2");
       }
       
      -static int ssl_tmp_key_init_rsa(server_rec *s,
      -                                int bits, int idx)
      +static void free_dh_params(void)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
      -
      -#ifdef HAVE_FIPS
      +    unsigned n;
       
      -    if (FIPS_mode() && bits < 1024) {
      -        mc->pTmpKeys[idx] = NULL;
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "Init: Skipping generating temporary "
      -                     "%d bit RSA private key in FIPS mode", bits);
      -        return OK;
      -    }
      -
      -#endif
      -#ifdef HAVE_GENERATE_EX
      -    {
      -        RSA *tkey;
      -        BIGNUM *bn_f4;
      -        if (!(tkey = RSA_new())
      -          || !(bn_f4 = BN_new())
      -          || !BN_set_word(bn_f4, RSA_F4)
      -          || !RSA_generate_key_ex(tkey, bits, bn_f4, NULL))
      -        {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                         "Init: Failed to generate temporary "
      -                         "%d bit RSA private key", bits);
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -            return !OK;
      -        }
      -        BN_free(bn_f4);
      -        mc->pTmpKeys[idx] = tkey;
      -    }
      -#else
      -    if (!(mc->pTmpKeys[idx] =
      -          RSA_generate_key(bits, RSA_F4, NULL, NULL)))
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "Init: Failed to generate temporary "
      -                     "%d bit RSA private key", bits);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -        return !OK;
      +    /* DH_free() is a noop for a NULL parameter, so these are harmless
      +     * in the (unexpected) case where these variables are already
      +     * NULL. */
      +    for (n = 0; n < sizeof(dhparams)/sizeof(dhparams[0]); n++) {
      +        DH_free(dhparams[n].dh);
      +        dhparams[n].dh = NULL;
           }
      -#endif
      -
      -    return OK;
       }
       
      -static int ssl_tmp_key_init_dh(server_rec *s,
      -                               int bits, int idx)
      +/* Hand out the same DH structure though once generated as we leak
      + * memory otherwise and freeing the structure up after use would be
      + * hard to track and in fact is not needed at all as it is safe to
      + * use the same parameters over and over again security wise (in
      + * contrast to the keys itself) and code safe as the returned structure
      + * is duplicated by OpenSSL anyway. Hence no modification happens
      + * to our copy. */
      +DH *modssl_get_dh_params(unsigned keylen)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
      -
      -#ifdef HAVE_FIPS
      -
      -    if (FIPS_mode() && bits < 1024) {
      -        mc->pTmpKeys[idx] = NULL;
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "Init: Skipping generating temporary "
      -                     "%d bit DH parameters in FIPS mode", bits);
      -        return OK;
      -    }
      -
      -#endif
      +    unsigned n;
       
      -    if (!(mc->pTmpKeys[idx] =
      -          ssl_dh_GetTmpParam(bits)))
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "Init: Failed to generate temporary "
      -                     "%d bit DH parameters", bits);
      -        return !OK;
      -    }
      -
      -    return OK;
      +    for (n = 0; n < sizeof(dhparams)/sizeof(dhparams[0]); n++)
      +        if (keylen >= dhparams[n].min)
      +            return dhparams[n].dh;
      +        
      +    return NULL; /* impossible to reach. */
       }
       
      -#define MODSSL_TMP_KEY_INIT_RSA(s, bits) \
      -    ssl_tmp_key_init_rsa(s, bits, SSL_TMP_KEY_RSA_##bits)
      -
      -#define MODSSL_TMP_KEY_INIT_DH(s, bits) \
      -    ssl_tmp_key_init_dh(s, bits, SSL_TMP_KEY_DH_##bits)
      -
      -static int ssl_tmp_keys_init(server_rec *s)
      +static void ssl_add_version_components(apr_pool_t *p,
      +                                       server_rec *s)
       {
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s,
      -                 "Init: Generating temporary RSA private keys (512/1024 bits)");
      -
      -    if (MODSSL_TMP_KEY_INIT_RSA(s, 512) ||
      -        MODSSL_TMP_KEY_INIT_RSA(s, 1024)) {
      -        return !OK;
      -    }
      -
      -    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s,
      -                 "Init: Generating temporary DH parameters (512/1024 bits)");
      +    char *modver = ssl_var_lookup(p, s, NULL, NULL, "SSL_VERSION_INTERFACE");
      +    char *libver = ssl_var_lookup(p, s, NULL, NULL, "SSL_VERSION_LIBRARY");
      +    char *incver = ssl_var_lookup(p, s, NULL, NULL,
      +                                  "SSL_VERSION_LIBRARY_INTERFACE");
       
      -    if (MODSSL_TMP_KEY_INIT_DH(s, 512) ||
      -        MODSSL_TMP_KEY_INIT_DH(s, 1024)) {
      -        return !OK;
      -    }
      +    ap_add_version_component(p, libver);
       
      -    return OK;
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01876)
      +                 "%s compiled against Server: %s, Library: %s",
      +                 modver, AP_SERVER_BASEVERSION, incver);
       }
       
       /*
        *  Per-module initialization
        */
      -int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
      -                    apr_pool_t *ptemp,
      -                    server_rec *base_server)
      +apr_status_t ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
      +                             apr_pool_t *ptemp,
      +                             server_rec *base_server)
       {
           SSLModConfigRec *mc = myModConfig(base_server);
           SSLSrvConfigRec *sc;
           server_rec *s;
      +    apr_status_t rv;
      +    apr_array_header_t *pphrases;
       
      -    if (SSLeay() < SSL_LIBRARY_VERSION) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server,
      +    if (SSLeay() < MODSSL_LIBRARY_VERSION) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, APLOGNO(01882)
                            "Init: this version of mod_ssl was compiled against "
                            "a newer library (%s, version currently loaded is %s)"
                            " - may result in undefined or erroneous behavior",
      -                     SSL_LIBRARY_TEXT, SSLeay_version(SSLEAY_VERSION));
      +                     MODSSL_LIBRARY_TEXT, SSLeay_version(SSLEAY_VERSION));
           }
       
           /* We initialize mc->pid per-process in the child init,
      @@ -238,13 +196,16 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
               sc->vhost_id = ssl_util_vhostid(p, s);
               sc->vhost_id_len = strlen(sc->vhost_id);
       
      -        if (ap_get_server_protocol(s) &&
      -            strcmp("https", ap_get_server_protocol(s)) == 0) {
      +        /* Default to enabled if SSLEngine is not set explicitly, and
      +         * the protocol is https. */
      +        if (ap_get_server_protocol(s) 
      +            && strcmp("https", ap_get_server_protocol(s)) == 0
      +            && sc->enabled == SSL_ENABLED_UNSET) {
                   sc->enabled = SSL_ENABLED_TRUE;
               }
       
      -       /* If sc->enabled is UNSET, then SSL is optional on this vhost  */
      -        /* Fix up stuff that may not have been set */
      +        /* Fix up stuff that may not have been set.  If sc->enabled is
      +         * UNSET, then SSL is disabled on this vhost.  */
               if (sc->enabled == SSL_ENABLED_UNSET) {
                   sc->enabled = SSL_ENABLED_FALSE;
               }
      @@ -275,11 +236,13 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
            * SSL external crypto device ("engine") support
            */
       #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
      -    ssl_init_Engine(base_server, p);
      +    if ((rv = ssl_init_Engine(base_server, p)) != APR_SUCCESS) {
      +        return rv;
      +    }
       #endif
       
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                 "Init: Initialized %s library", SSL_LIBRARY_NAME);
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01883)
      +                 "Init: Initialized %s library", MODSSL_LIBRARY_NAME);
       
           /*
            * Seed the Pseudo Random Number Generator (PRNG)
      @@ -292,34 +255,22 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
           if(sc->fips) {
               if (!FIPS_mode()) {
                   if (FIPS_mode_set(1)) {
      -                ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01884)
                                    "Operating in SSL FIPS mode");
                   }
                   else {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "FIPS mode failed");
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01885) "FIPS mode failed");
                       ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -                ssl_die();
      +                return ssl_die(s);
                   }
               }
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01886)
                            "SSL FIPS mode disabled");
           }
       #endif
       
      -    /*
      -     * read server private keys/public certs into memory.
      -     * decrypting any encrypted keys via configured SSLPassPhraseDialogs
      -     * anything that needs to live longer than ptemp needs to also survive
      -     * restarts, in which case they'll live inside s->process->pool.
      -     */
      -    ssl_pphrase_Handle(base_server, ptemp);
      -
      -    if (ssl_tmp_keys_init(base_server)) {
      -        return !OK;
      -    }
      -
           /*
            * initialize the mutex handling
            */
      @@ -327,18 +278,22 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       #ifdef HAVE_OCSP_STAPLING
      -    ssl_stapling_ex_init();
      +    ssl_stapling_certinfo_hash_init(p);
       #endif
       
           /*
            * initialize session caching
            */
      -    ssl_scache_init(base_server, p);
      +    if ((rv = ssl_scache_init(base_server, p)) != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    pphrases = apr_array_make(ptemp, 2, sizeof(char *));
       
           /*
            *  initialize servers
            */
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, base_server,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, base_server, APLOGNO(01887)
                        "Init: Initializing (virtual) servers for SSL");
       
           for (s = base_server; s; s = s->next) {
      @@ -352,13 +307,40 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
               /*
                * Read the server certificate and key
                */
      -        ssl_init_ConfigureServer(s, p, ptemp, sc);
      +        if ((rv = ssl_init_ConfigureServer(s, p, ptemp, sc, pphrases))
      +            != APR_SUCCESS) {
      +            return rv;
      +        }
      +    }
      +
      +    if (pphrases->nelts > 0) {
      +        memset(pphrases->elts, 0, pphrases->elt_size * pphrases->nelts);
      +        pphrases->nelts = 0;
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02560)
      +                     "Init: Wiped out the queried pass phrases from memory");
           }
       
           /*
            * Configuration consistency checks
            */
      -    ssl_init_CheckServers(base_server, ptemp);
      +    if ((rv = ssl_init_CheckServers(base_server, ptemp)) != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    for (s = base_server; s; s = s->next) {
      +        sc = mySrvConfig(s);
      +
      +        if (sc->enabled == SSL_ENABLED_TRUE || sc->enabled == SSL_ENABLED_OPTIONAL) {
      +            if ((rv = ssl_run_init_server(s, p, 0, sc->server->ssl_ctx)) != APR_SUCCESS) {
      +                return rv;
      +            }
      +        }
      +        else if (sc->proxy_enabled == SSL_ENABLED_TRUE) {
      +            if ((rv = ssl_run_init_server(s, p, 1, sc->proxy->ssl_ctx)) != APR_SUCCESS) {
      +                return rv;
      +            }
      +        }
      +    }
       
           /*
            *  Announce mod_ssl and SSL library in HTTP Server field
      @@ -366,7 +348,9 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
            */
           ssl_add_version_components(p, base_server);
       
      -    SSL_init_app_data2_idx(); /* for SSL_get_app_data2() at request time */
      +    modssl_init_app_data2_idx(); /* for modssl_get_app_data2() at request time */
      +
      +    init_dh_params();
       
           return OK;
       }
      @@ -376,82 +360,56 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog,
        * a hardware accellerator card for crypto operations.
        */
       #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
      -void ssl_init_Engine(server_rec *s, apr_pool_t *p)
      +apr_status_t ssl_init_Engine(server_rec *s, apr_pool_t *p)
       {
           SSLModConfigRec *mc = myModConfig(s);
           ENGINE *e;
       
           if (mc->szCryptoDevice) {
               if (!(e = ENGINE_by_id(mc->szCryptoDevice))) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01888)
                                "Init: Failed to load Crypto Device API `%s'",
                                mc->szCryptoDevice);
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -            ssl_die();
      +            return ssl_die(s);
               }
       
      +#ifdef ENGINE_CTRL_CHIL_SET_FORKCHECK
               if (strEQ(mc->szCryptoDevice, "chil")) {
                   ENGINE_ctrl(e, ENGINE_CTRL_CHIL_SET_FORKCHECK, 1, 0, 0);
               }
      +#endif
       
               if (!ENGINE_set_default(e, ENGINE_METHOD_ALL)) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01889)
                                "Init: Failed to enable Crypto Device API `%s'",
                                mc->szCryptoDevice);
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -            ssl_die();
      +            return ssl_die(s);
               }
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01890)
                            "Init: loaded Crypto Device API `%s'",
                            mc->szCryptoDevice);
       
               ENGINE_free(e);
           }
      +
      +    return APR_SUCCESS;
       }
       #endif
       
      -static void ssl_init_server_check(server_rec *s,
      -                                  apr_pool_t *p,
      -                                  apr_pool_t *ptemp,
      -                                  modssl_ctx_t *mctx)
      +#ifdef HAVE_TLSEXT
      +static apr_status_t ssl_init_ctx_tls_extensions(server_rec *s,
      +                                                apr_pool_t *p,
      +                                                apr_pool_t *ptemp,
      +                                                modssl_ctx_t *mctx)
       {
      -    /*
      -     * check for important parameters and the
      -     * possibility that the user forgot to set them.
      -     */
      -    if (!mctx->pks->cert_files[0] && !mctx->pkcs7) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "No SSL Certificate set [hint: SSLCertificateFile]");
      -        ssl_die();
      -    }
      +    apr_status_t rv;
       
      -    /*
      -     *  Check for problematic re-initializations
      -     */
      -    if (mctx->pks->certs[SSL_AIDX_RSA] ||
      -        mctx->pks->certs[SSL_AIDX_DSA]
      -#ifndef OPENSSL_NO_EC
      -      || mctx->pks->certs[SSL_AIDX_ECC]
      -#endif
      -        )
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "Illegal attempt to re-initialise SSL for server "
      -                "(SSLEngine On should go in the VirtualHost, not in global scope.)");
      -        ssl_die();
      -    }
      -}
      -
      -#ifndef OPENSSL_NO_TLSEXT
      -static void ssl_init_ctx_tls_extensions(server_rec *s,
      -                                        apr_pool_t *p,
      -                                        apr_pool_t *ptemp,
      -                                        modssl_ctx_t *mctx)
      -{
           /*
            * Configure TLS extensions support
            */
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01893)
                        "Configuring TLS extension handling");
       
           /*
      @@ -460,11 +418,11 @@ static void ssl_init_ctx_tls_extensions(server_rec *s,
           if (!SSL_CTX_set_tlsext_servername_callback(mctx->ssl_ctx,
                                 ssl_callback_ServerNameIndication) ||
               !SSL_CTX_set_tlsext_servername_arg(mctx->ssl_ctx, mctx)) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01894)
                            "Unable to initialize TLS servername extension "
                            "callback (incompatible OpenSSL version?)");
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      +        return ssl_die(s);
           }
       
       #ifdef HAVE_OCSP_STAPLING
      @@ -472,16 +430,51 @@ static void ssl_init_ctx_tls_extensions(server_rec *s,
            * OCSP Stapling support, status_request extension
            */
           if ((mctx->pkp == FALSE) && (mctx->stapling_enabled == TRUE)) {
      -        modssl_init_stapling(s, p, ptemp, mctx);
      +        if ((rv = modssl_init_stapling(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +            return rv;
      +        }
      +    }
      +#endif
      +
      +#ifdef HAVE_SRP
      +    /*
      +     * TLS-SRP support
      +     */
      +    if (mctx->srp_vfile != NULL) {
      +        int err;
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02308)
      +                     "Using SRP verifier file [%s]", mctx->srp_vfile);
      +
      +        if (!(mctx->srp_vbase = SRP_VBASE_new(mctx->srp_unknown_user_seed))) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02309)
      +                         "Unable to initialize SRP verifier structure "
      +                         "[%s seed]",
      +                         mctx->srp_unknown_user_seed ? "with" : "without");
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +            return ssl_die(s);
      +        }
      +
      +        err = SRP_VBASE_init(mctx->srp_vbase, mctx->srp_vfile);
      +        if (err != SRP_NO_ERROR) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02310)
      +                         "Unable to load SRP verifier file [error %d]", err);
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +            return ssl_die(s);
      +        }
      +
      +        SSL_CTX_set_srp_username_callback(mctx->ssl_ctx,
      +                                          ssl_callback_SRPServerParams);
      +        SSL_CTX_set_srp_cb_arg(mctx->ssl_ctx, mctx);
           }
       #endif
      +    return APR_SUCCESS;
       }
       #endif
       
      -static void ssl_init_ctx_protocol(server_rec *s,
      -                                  apr_pool_t *p,
      -                                  apr_pool_t *ptemp,
      -                                  modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx_protocol(server_rec *s,
      +                                          apr_pool_t *p,
      +                                          apr_pool_t *ptemp,
      +                                          modssl_ctx_t *mctx)
       {
           SSL_CTX *ctx = NULL;
           MODSSL_SSL_METHOD_CONST SSL_METHOD *method = NULL;
      @@ -493,38 +486,51 @@ static void ssl_init_ctx_protocol(server_rec *s,
            *  Create the new per-server SSL context
            */
           if (protocol == SSL_PROTOCOL_NONE) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02231)
                       "No SSL protocols available [hint: SSLProtocol]");
      -        ssl_die();
      +        return ssl_die(s);
           }
       
           cp = apr_pstrcat(p,
      -                     (protocol & SSL_PROTOCOL_SSLV2 ? "SSLv2, " : ""),
      +#ifndef OPENSSL_NO_SSL3
                            (protocol & SSL_PROTOCOL_SSLV3 ? "SSLv3, " : ""),
      +#endif
                            (protocol & SSL_PROTOCOL_TLSV1 ? "TLSv1, " : ""),
      +#ifdef HAVE_TLSV1_X
      +                     (protocol & SSL_PROTOCOL_TLSV1_1 ? "TLSv1.1, " : ""),
      +                     (protocol & SSL_PROTOCOL_TLSV1_2 ? "TLSv1.2, " : ""),
      +#endif
                            NULL);
           cp[strlen(cp)-2] = NUL;
       
           ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
                        "Creating new SSL context (protocols: %s)", cp);
       
      +#ifndef OPENSSL_NO_SSL3
           if (protocol == SSL_PROTOCOL_SSLV3) {
               method = mctx->pkp ?
                   SSLv3_client_method() : /* proxy */
                   SSLv3_server_method();  /* server */
           }
      -#ifndef OPENSSL_NO_SSL2
      -    else if (protocol == SSL_PROTOCOL_SSLV2) {
      -        method = mctx->pkp ?
      -            SSLv2_client_method() : /* proxy */
      -            SSLv2_server_method();  /* server */
      -    }
      +    else
       #endif
      -    else if (protocol == SSL_PROTOCOL_TLSV1) {
      +    if (protocol == SSL_PROTOCOL_TLSV1) {
               method = mctx->pkp ?
                   TLSv1_client_method() : /* proxy */
                   TLSv1_server_method();  /* server */
           }
      +#ifdef HAVE_TLSV1_X
      +    else if (protocol == SSL_PROTOCOL_TLSV1_1) {
      +        method = mctx->pkp ?
      +            TLSv1_1_client_method() : /* proxy */
      +            TLSv1_1_server_method();  /* server */
      +    }
      +    else if (protocol == SSL_PROTOCOL_TLSV1_2) {
      +        method = mctx->pkp ?
      +            TLSv1_2_client_method() : /* proxy */
      +            TLSv1_2_server_method();  /* server */
      +    }
      +#endif
           else { /* For multiple protocols, we need a flexible method */
               method = mctx->pkp ?
                   SSLv23_client_method() : /* proxy */
      @@ -536,24 +542,57 @@ static void ssl_init_ctx_protocol(server_rec *s,
       
           SSL_CTX_set_options(ctx, SSL_OP_ALL);
       
      -    if (!(protocol & SSL_PROTOCOL_SSLV2)) {
      -        SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
      -    }
      +    /* always disable SSLv2, as per RFC 6176 */
      +    SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
       
      +#ifndef OPENSSL_NO_SSL3
           if (!(protocol & SSL_PROTOCOL_SSLV3)) {
               SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3);
           }
      +#endif
       
           if (!(protocol & SSL_PROTOCOL_TLSV1)) {
               SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1);
           }
       
      +#ifdef HAVE_TLSV1_X
      +    if (!(protocol & SSL_PROTOCOL_TLSV1_1)) {
      +        SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1);
      +    }
      +
      +    if (!(protocol & SSL_PROTOCOL_TLSV1_2)) {
      +        SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2);
      +    }
      +#endif
      +
       #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
           if (sc->cipher_server_pref == TRUE) {
               SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
           }
       #endif
       
      +
      +#ifndef OPENSSL_NO_COMP
      +    if (sc->compression != TRUE) {
      +#ifdef SSL_OP_NO_COMPRESSION
      +        /* OpenSSL >= 1.0 only */
      +        SSL_CTX_set_options(ctx, SSL_OP_NO_COMPRESSION);
      +#else
      +        sk_SSL_COMP_zero(SSL_COMP_get_compression_methods());
      +#endif
      +    }
      +#endif
      +
      +#ifdef SSL_OP_NO_TICKET
      +    /*
      +     * Configure using RFC 5077 TLS session tickets
      +     * for session resumption.
      +     */
      +    if (sc->session_tickets == FALSE) {
      +        SSL_CTX_set_options(ctx, SSL_OP_NO_TICKET);
      +    }
      +#endif
      +
       #ifdef SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
           if (sc->insecure_reneg == TRUE) {
               SSL_CTX_set_options(ctx, SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION);
      @@ -566,6 +605,9 @@ static void ssl_init_ctx_protocol(server_rec *s,
            * Configure additional context ingredients
            */
           SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE);
      +#ifdef HAVE_ECC
      +    SSL_CTX_set_options(ctx, SSL_OP_SINGLE_ECDH_USE);
      +#endif
       
       #ifdef SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
           /*
      @@ -580,6 +622,8 @@ static void ssl_init_ctx_protocol(server_rec *s,
           if (ap_max_mem_free != APR_ALLOCATOR_MAX_FREE_UNLIMITED)
               SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
       #endif
      +
      +    return APR_SUCCESS;
       }
       
       static void ssl_init_ctx_session_cache(server_rec *s,
      @@ -606,19 +650,19 @@ static void ssl_init_ctx_callbacks(server_rec *s,
       {
           SSL_CTX *ctx = mctx->ssl_ctx;
       
      -    SSL_CTX_set_tmp_rsa_callback(ctx, ssl_callback_TmpRSA);
           SSL_CTX_set_tmp_dh_callback(ctx,  ssl_callback_TmpDH);
      -#ifndef OPENSSL_NO_EC
      -    SSL_CTX_set_tmp_ecdh_callback(ctx,ssl_callback_TmpECDH);
      -#endif
       
           SSL_CTX_set_info_callback(ctx, ssl_callback_Info);
      +
      +#ifdef HAVE_TLS_ALPN
      +    SSL_CTX_set_alpn_select_cb(ctx, ssl_callback_alpn_select, NULL);
      +#endif
       }
       
      -static void ssl_init_ctx_verify(server_rec *s,
      -                                apr_pool_t *p,
      -                                apr_pool_t *ptemp,
      -                                modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx_verify(server_rec *s,
      +                                        apr_pool_t *p,
      +                                        apr_pool_t *ptemp,
      +                                        modssl_ctx_t *mctx)
       {
           SSL_CTX *ctx = mctx->ssl_ctx;
       
      @@ -659,11 +703,11 @@ static void ssl_init_ctx_verify(server_rec *s,
                                                  mctx->auth.ca_cert_file,
                                                  mctx->auth.ca_cert_path))
               {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01895)
                           "Unable to configure verify locations "
                           "for client authentication");
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -            ssl_die();
      +            return ssl_die(s);
               }
       
               if (mctx->pks && (mctx->pks->ca_name_file || mctx->pks->ca_name_path)) {
      @@ -675,10 +719,10 @@ static void ssl_init_ctx_verify(server_rec *s,
                                                 mctx->auth.ca_cert_file,
                                                 mctx->auth.ca_cert_path);
               if (sk_X509_NAME_num(ca_list) <= 0) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01896)
                           "Unable to determine list of acceptable "
                           "CA certificates for client authentication");
      -            ssl_die();
      +            return ssl_die(s);
               }
       
               SSL_CTX_set_client_CA_list(ctx, ca_list);
      @@ -692,79 +736,93 @@ static void ssl_init_ctx_verify(server_rec *s,
               ca_list = SSL_CTX_get_client_CA_list(ctx);
       
               if (sk_X509_NAME_num(ca_list) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01897)
                                "Init: Oops, you want to request client "
                                "authentication, but no CAs are known for "
                                "verification!?  [Hint: SSLCACertificate*]");
               }
           }
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_ctx_cipher_suite(server_rec *s,
      -                                      apr_pool_t *p,
      -                                      apr_pool_t *ptemp,
      -                                      modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx_cipher_suite(server_rec *s,
      +                                              apr_pool_t *p,
      +                                              apr_pool_t *ptemp,
      +                                              modssl_ctx_t *mctx)
       {
           SSL_CTX *ctx = mctx->ssl_ctx;
      -    const char *suite = mctx->auth.cipher_suite;
      +    const char *suite;
       
           /*
      -     *  Configure SSL Cipher Suite
      +     *  Configure SSL Cipher Suite. Always disable NULL and export ciphers,
      +     *  see also ssl_engine_config.c:ssl_cmd_SSLCipherSuite().
      +     *  OpenSSL's SSL_DEFAULT_CIPHER_LIST includes !aNULL:!eNULL from 0.9.8f,
      +     *  and !EXP from 0.9.8zf/1.0.1m/1.0.2a, so append them while we support
      +     *  earlier versions.
            */
      -    if (!suite) {
      -        return;
      -    }
      +    suite = mctx->auth.cipher_suite ? mctx->auth.cipher_suite :
      +            apr_pstrcat(ptemp, SSL_DEFAULT_CIPHER_LIST, ":!aNULL:!eNULL:!EXP",
      +                        NULL);
       
           ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, s,
                        "Configuring permitted SSL ciphers [%s]",
                        suite);
       
           if (!SSL_CTX_set_cipher_list(ctx, suite)) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01898)
                       "Unable to configure permitted SSL ciphers");
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      +        return ssl_die(s);
           }
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_ctx_crl(server_rec *s,
      -                             apr_pool_t *p,
      -                             apr_pool_t *ptemp,
      -                             modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx_crl(server_rec *s,
      +                                     apr_pool_t *p,
      +                                     apr_pool_t *ptemp,
      +                                     modssl_ctx_t *mctx)
       {
           X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);
           unsigned long crlflags = 0;
           char *cfgp = mctx->pkp ? "SSLProxy" : "SSL";
      +    int crl_check_mode;
      +
      +    if (mctx->crl_check_mask == UNSET) {
      +        mctx->crl_check_mask = SSL_CRLCHECK_NONE;
      +    }
      +    crl_check_mode = mctx->crl_check_mask & ~SSL_CRLCHECK_FLAGS;
       
           /*
            * Configure Certificate Revocation List (CRL) Details
            */
       
           if (!(mctx->crl_file || mctx->crl_path)) {
      -        if (mctx->crl_check_mode == SSL_CRLCHECK_LEAF ||
      -            mctx->crl_check_mode == SSL_CRLCHECK_CHAIN) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        if (crl_check_mode == SSL_CRLCHECK_LEAF ||
      +            crl_check_mode == SSL_CRLCHECK_CHAIN) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01899)
                                "Host %s: CRL checking has been enabled, but "
                                "neither %sCARevocationFile nor %sCARevocationPath "
                                "is configured", mctx->sc->vhost_id, cfgp, cfgp);
      -            ssl_die();
      +            return ssl_die(s);
               }
      -        return;
      +        return APR_SUCCESS;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01900)
                        "Configuring certificate revocation facility");
       
           if (!store || !X509_STORE_load_locations(store, mctx->crl_file,
                                                    mctx->crl_path)) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01901)
                            "Host %s: unable to configure X.509 CRL storage "
                            "for certificate revocation", mctx->sc->vhost_id);
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      +        return ssl_die(s);
           }
       
      -    switch (mctx->crl_check_mode) {
      +    switch (crl_check_mode) {
              case SSL_CRLCHECK_LEAF:
                  crlflags = X509_V_FLAG_CRL_CHECK;
                  break;
      @@ -778,37 +836,83 @@ static void ssl_init_ctx_crl(server_rec *s,
           if (crlflags) {
               X509_STORE_set_flags(store, crlflags);
           } else {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01902)
                            "Host %s: X.509 CRL storage locations configured, "
                            "but CRL checking (%sCARevocationCheck) is not "
                            "enabled", mctx->sc->vhost_id, cfgp);
           }
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_ctx_pkcs7_cert_chain(server_rec *s, modssl_ctx_t *mctx)
      +/*
      + * Read a file that optionally contains the server certificate in PEM
      + * format, possibly followed by a sequence of CA certificates that
      + * should be sent to the peer in the SSL Certificate message.
      + */
      +static int use_certificate_chain(
      +    SSL_CTX *ctx, char *file, int skipfirst, pem_password_cb *cb)
       {
      -    STACK_OF(X509) *certs = ssl_read_pkcs7(s, mctx->pkcs7);
      +    BIO *bio;
      +    X509 *x509;
      +    unsigned long err;
           int n;
       
      -    if (!mctx->ssl_ctx->extra_certs)
      -        for (n = 1; n < sk_X509_num(certs); ++n)
      -             SSL_CTX_add_extra_chain_cert(mctx->ssl_ctx, sk_X509_value(certs, n));
      +    if ((bio = BIO_new(BIO_s_file_internal())) == NULL)
      +        return -1;
      +    if (BIO_read_filename(bio, file) <= 0) {
      +        BIO_free(bio);
      +        return -1;
      +    }
      +    /* optionally skip a leading server certificate */
      +    if (skipfirst) {
      +        if ((x509 = PEM_read_bio_X509(bio, NULL, cb, NULL)) == NULL) {
      +            BIO_free(bio);
      +            return -1;
      +        }
      +        X509_free(x509);
      +    }
      +    /* free a perhaps already configured extra chain */
      +#ifdef OPENSSL_NO_SSL_INTERN
      +    SSL_CTX_clear_extra_chain_certs(ctx);
      +#else
      +    if (ctx->extra_certs != NULL) {
      +        sk_X509_pop_free((STACK_OF(X509) *)ctx->extra_certs, X509_free);
      +        ctx->extra_certs = NULL;
      +    }
      +#endif
      +    /* create new extra chain by loading the certs */
      +    n = 0;
      +    while ((x509 = PEM_read_bio_X509(bio, NULL, cb, NULL)) != NULL) {
      +        if (!SSL_CTX_add_extra_chain_cert(ctx, x509)) {
      +            X509_free(x509);
      +            BIO_free(bio);
      +            return -1;
      +        }
      +        n++;
      +    }
      +    /* Make sure that only the error is just an EOF */
      +    if ((err = ERR_peek_error()) > 0) {
      +        if (!(   ERR_GET_LIB(err) == ERR_LIB_PEM
      +              && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)) {
      +            BIO_free(bio);
      +            return -1;
      +        }
      +        while (ERR_get_error() > 0) ;
      +    }
      +    BIO_free(bio);
      +    return n;
       }
       
      -static void ssl_init_ctx_cert_chain(server_rec *s,
      -                                    apr_pool_t *p,
      -                                    apr_pool_t *ptemp,
      -                                    modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx_cert_chain(server_rec *s,
      +                                            apr_pool_t *p,
      +                                            apr_pool_t *ptemp,
      +                                            modssl_ctx_t *mctx)
       {
           BOOL skip_first = FALSE;
           int i, n;
           const char *chain = mctx->cert_chain;
       
      -    if (mctx->pkcs7) {
      -        ssl_init_ctx_pkcs7_cert_chain(s, mctx);
      -        return;
      -    }
      -
           /*
            * Optionally configure extra server certificate chain certificates.
            * This is usually done by OpenSSL automatically when one of the
      @@ -820,372 +924,405 @@ static void ssl_init_ctx_cert_chain(server_rec *s,
            * SSLCACertificateFile and also use client authentication mod_ssl
            * would accept all clients also issued by this CA. Obviously this
            * isn't what we want in this situation. So this feature here exists
      -     * to allow one to explicity configure CA certificates which are
      +     * to allow one to explicitly configure CA certificates which are
            * used only for the server certificate chain.
            */
           if (!chain) {
      -        return;
      +        return APR_SUCCESS;
           }
       
      -    for (i = 0; (i < SSL_AIDX_MAX) && mctx->pks->cert_files[i]; i++) {
      -        if (strEQ(mctx->pks->cert_files[i], chain)) {
      +    for (i = 0; (i < mctx->pks->cert_files->nelts) &&
      +         APR_ARRAY_IDX(mctx->pks->cert_files, i, const char *); i++) {
      +        if (strEQ(APR_ARRAY_IDX(mctx->pks->cert_files, i, const char *), chain)) {
                   skip_first = TRUE;
                   break;
               }
           }
       
      -    n = SSL_CTX_use_certificate_chain(mctx->ssl_ctx,
      -                                      (char *)chain,
      -                                      skip_first, NULL);
      +    n = use_certificate_chain(mctx->ssl_ctx, (char *)chain, skip_first, NULL);
           if (n < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01903)
                       "Failed to configure CA certificate chain!");
      -        ssl_die();
      +        return ssl_die(s);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01904)
                        "Configuring server certificate chain "
                        "(%d CA certificate%s)",
                        n, n == 1 ? "" : "s");
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_ctx(server_rec *s,
      -                         apr_pool_t *p,
      -                         apr_pool_t *ptemp,
      -                         modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_ctx(server_rec *s,
      +                                 apr_pool_t *p,
      +                                 apr_pool_t *ptemp,
      +                                 modssl_ctx_t *mctx)
       {
      -    ssl_init_ctx_protocol(s, p, ptemp, mctx);
      +    apr_status_t rv;
      +
      +    if ((rv = ssl_init_ctx_protocol(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +        return rv;
      +    }
       
           ssl_init_ctx_session_cache(s, p, ptemp, mctx);
       
           ssl_init_ctx_callbacks(s, p, ptemp, mctx);
       
      -    ssl_init_ctx_verify(s, p, ptemp, mctx);
      +    if ((rv = ssl_init_ctx_verify(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +        return rv;
      +    }
       
      -    ssl_init_ctx_cipher_suite(s, p, ptemp, mctx);
      +    if ((rv = ssl_init_ctx_cipher_suite(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +        return rv;
      +    }
       
      -    ssl_init_ctx_crl(s, p, ptemp, mctx);
      +    if ((rv = ssl_init_ctx_crl(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +        return rv;
      +    }
       
           if (mctx->pks) {
               /* XXX: proxy support? */
      -        ssl_init_ctx_cert_chain(s, p, ptemp, mctx);
      -#ifndef OPENSSL_NO_TLSEXT
      -        ssl_init_ctx_tls_extensions(s, p, ptemp, mctx);
      +        if ((rv = ssl_init_ctx_cert_chain(s, p, ptemp, mctx)) != APR_SUCCESS) {
      +            return rv;
      +        }
      +#ifdef HAVE_TLSEXT
      +        if ((rv = ssl_init_ctx_tls_extensions(s, p, ptemp, mctx)) !=
      +            APR_SUCCESS) {
      +            return rv;
      +        }
       #endif
           }
      +
      +    return APR_SUCCESS;
       }
       
      -static int ssl_server_import_cert(server_rec *s,
      -                                  modssl_ctx_t *mctx,
      -                                  const char *id,
      -                                  int idx)
      +static void ssl_check_public_cert(server_rec *s,
      +                                  apr_pool_t *ptemp,
      +                                  X509 *cert,
      +                                  const char *key_id)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
      -    ssl_asn1_t *asn1;
      -    MODSSL_D2I_X509_CONST unsigned char *ptr;
      -    const char *type = ssl_asn1_keystr(idx);
      -    X509 *cert;
      +    int is_ca, pathlen;
       
      -    if (!(asn1 = ssl_asn1_table_get(mc->tPublicCert, id))) {
      -        return FALSE;
      +    if (!cert) {
      +        return;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "Configuring %s server certificate", type);
      -
      -    ptr = asn1->cpData;
      -    if (!(cert = d2i_X509(NULL, &ptr, asn1->nData))) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "Unable to import %s server certificate", type);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      -    }
      +    /*
      +     * Some information about the certificate(s)
      +     */
       
      -    if (SSL_CTX_use_certificate(mctx->ssl_ctx, cert) <= 0) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "Unable to configure %s server certificate", type);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      -    }
      +    if (modssl_X509_getBC(cert, &is_ca, &pathlen)) {
      +        if (is_ca) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01906)
      +                         "%s server certificate is a CA certificate "
      +                         "(BasicConstraints: CA == TRUE !?)", key_id);
      +        }
       
      -#ifdef HAVE_OCSP_STAPLING
      -    if ((mctx->pkp == FALSE) && (mctx->stapling_enabled == TRUE)) {
      -        if (!ssl_stapling_init_cert(s, mctx, cert)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                         "Unable to configure server certificate for stapling");
      +        if (pathlen > 0) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01907)
      +                         "%s server certificate is not a leaf certificate "
      +                         "(BasicConstraints: pathlen == %d > 0 !?)",
      +                         key_id, pathlen);
               }
           }
      -#endif
       
      -    mctx->pks->certs[idx] = cert;
      +    if (modssl_X509_match_name(ptemp, cert, (const char *)s->server_hostname,
      +                               TRUE, s) == FALSE) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01909)
      +                     "%s server certificate does NOT include an ID "
      +                     "which matches the server name", key_id);
      +    }
      +}
       
      -    return TRUE;
      +/* prevent OpenSSL from showing its "Enter PEM pass phrase:" prompt */
      +static int ssl_no_passwd_prompt_cb(char *buf, int size, int rwflag,
      +                                   void *userdata) {
      +   return 0;
       }
       
      -static int ssl_server_import_key(server_rec *s,
      -                                 modssl_ctx_t *mctx,
      -                                 const char *id,
      -                                 int idx)
      +static apr_status_t ssl_init_server_certs(server_rec *s,
      +                                          apr_pool_t *p,
      +                                          apr_pool_t *ptemp,
      +                                          modssl_ctx_t *mctx,
      +                                          apr_array_header_t *pphrases)
       {
           SSLModConfigRec *mc = myModConfig(s);
      -    ssl_asn1_t *asn1;
      -    MODSSL_D2I_PrivateKey_CONST unsigned char *ptr;
      -    const char *type = ssl_asn1_keystr(idx);
      -    int pkey_type;
      -    EVP_PKEY *pkey;
      -
      -#ifndef OPENSSL_NO_EC
      -    if (idx == SSL_AIDX_ECC)
      -      pkey_type = EVP_PKEY_EC;
      -    else
      +    const char *vhost_id = mctx->sc->vhost_id, *key_id, *certfile, *keyfile;
      +    int i;
      +    X509 *cert;
      +    DH *dhparams;
      +#ifdef HAVE_ECC
      +    EC_GROUP *ecparams = NULL;
      +    int nid;
      +    EC_KEY *eckey = NULL;
      +#endif
      +#ifndef HAVE_SSL_CONF_CMD
      +    SSL *ssl;
       #endif
      -    pkey_type = (idx == SSL_AIDX_RSA) ? EVP_PKEY_RSA : EVP_PKEY_DSA;
       
      -    if (!(asn1 = ssl_asn1_table_get(mc->tPrivateKey, id))) {
      -        return FALSE;
      -    }
      +    /* no OpenSSL default prompts for any of the SSL_CTX_use_* calls, please */
      +    SSL_CTX_set_default_passwd_cb(mctx->ssl_ctx, ssl_no_passwd_prompt_cb);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "Configuring %s server private key", type);
      +    /* Iterate over the SSLCertificateFile array */
      +    for (i = 0; (i < mctx->pks->cert_files->nelts) &&
      +                (certfile = APR_ARRAY_IDX(mctx->pks->cert_files, i,
      +                                          const char *));
      +         i++) {
      +        key_id = apr_psprintf(ptemp, "%s:%d", vhost_id, i);
       
      -    ptr = asn1->cpData;
      -    if (!(pkey = d2i_PrivateKey(pkey_type, NULL, &ptr, asn1->nData)))
      -    {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "Unable to import %s server private key", type);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      -    }
      +        ERR_clear_error();
       
      -    if (SSL_CTX_use_PrivateKey(mctx->ssl_ctx, pkey) <= 0) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                "Unable to configure %s server private key", type);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      -    }
      +        /* first the certificate (public key) */
      +        if (mctx->cert_chain) {
      +            if ((SSL_CTX_use_certificate_file(mctx->ssl_ctx, certfile,
      +                                              SSL_FILETYPE_PEM) < 1)) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02561)
      +                             "Failed to configure certificate %s, check %s",
      +                             key_id, certfile);
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +                return APR_EGENERAL;
      +            }
      +        } else {
      +            if ((SSL_CTX_use_certificate_chain_file(mctx->ssl_ctx,
      +                                                    certfile) < 1)) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02562)
      +                             "Failed to configure certificate %s (with chain),"
      +                             " check %s", key_id, certfile);
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +                return APR_EGENERAL;
      +            }
      +        }
       
      -    /*
      -     * XXX: wonder if this is still needed, this is old todo doc.
      -     * (see http://www.psy.uq.edu.au/~ftp/Crypto/ssleay/TODO.html)
      -     */
      -    if ((pkey_type == EVP_PKEY_DSA) && mctx->pks->certs[idx]) {
      -        EVP_PKEY *pubkey = X509_get_pubkey(mctx->pks->certs[idx]);
      +        /* and second, the private key */
      +        if (i < mctx->pks->key_files->nelts) {
      +            keyfile = APR_ARRAY_IDX(mctx->pks->key_files, i, const char *);
      +        } else {
      +            keyfile = certfile;
      +        }
       
      -        if (pubkey && EVP_PKEY_missing_parameters(pubkey)) {
      -            EVP_PKEY_copy_parameters(pubkey, pkey);
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                    "Copying DSA parameters from private key to certificate");
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -            EVP_PKEY_free(pubkey);
      +        ERR_clear_error();
      +
      +        if ((SSL_CTX_use_PrivateKey_file(mctx->ssl_ctx, keyfile,
      +                                         SSL_FILETYPE_PEM) < 1) &&
      +            (ERR_GET_FUNC(ERR_peek_last_error())
      +                != X509_F_X509_CHECK_PRIVATE_KEY)) {
      +            ssl_asn1_t *asn1;
      +            EVP_PKEY *pkey;
      +            const unsigned char *ptr;
      +
      +            ERR_clear_error();
      +
      +            /* perhaps it's an encrypted private key, so try again */
      +            ssl_load_encrypted_pkey(s, ptemp, i, keyfile, &pphrases);
      +
      +            if (!(asn1 = ssl_asn1_table_get(mc->tPrivateKey, key_id)) ||
      +                !(ptr = asn1->cpData) ||
      +                !(pkey = d2i_AutoPrivateKey(NULL, &ptr, asn1->nData)) ||
      +                (SSL_CTX_use_PrivateKey(mctx->ssl_ctx, pkey) < 1)) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02564)
      +                             "Failed to configure encrypted (?) private key %s,"
      +                             " check %s", key_id, keyfile);
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +                return APR_EGENERAL;
      +            }
               }
      -    }
       
      -    mctx->pks->keys[idx] = pkey;
      +        if (SSL_CTX_check_private_key(mctx->ssl_ctx) < 1) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02565)
      +                         "Certificate and private key %s from %s and %s "
      +                         "do not match", key_id, certfile, keyfile);
      +            return APR_EGENERAL;
      +        }
       
      -    return TRUE;
      -}
      +#ifdef HAVE_SSL_CONF_CMD
      +        /* 
      +         * workaround for those OpenSSL versions where SSL_CTX_get0_certificate
      +         * is not yet available: create an SSL struct which we dispose of
      +         * as soon as we no longer need access to the cert. (Strictly speaking,
      +         * SSL_CTX_get0_certificate does not depend on the SSL_CONF stuff,
      +         * but there's no reliable way to check for its existence, so we
      +         * assume that if SSL_CONF is available, it's OpenSSL 1.0.2 or later,
      +         * and SSL_CTX_get0_certificate is implemented.)
      +         */
      +        if (!(cert = SSL_CTX_get0_certificate(mctx->ssl_ctx))) {
      +#else
      +        ssl = SSL_new(mctx->ssl_ctx);
      +        if (ssl) {
      +            /* Workaround bug in SSL_get_certificate in OpenSSL 0.9.8y */
      +            SSL_set_connect_state(ssl);
      +            cert = SSL_get_certificate(ssl);
      +        }
      +        if (!ssl || !cert) {
      +#endif
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02566)
      +                         "Unable to retrieve certificate %s", key_id);
      +#ifndef HAVE_SSL_CONF_CMD
      +            if (ssl)
      +                SSL_free(ssl);
      +#endif
      +            return APR_EGENERAL;
      +        }
       
      -static void ssl_check_public_cert(server_rec *s,
      -                                  apr_pool_t *ptemp,
      -                                  X509 *cert,
      -                                  int type)
      -{
      -    int is_ca, pathlen;
      -    apr_array_header_t *ids;
      +        /* warn about potential cert issues */
      +        ssl_check_public_cert(s, ptemp, cert, key_id);
       
      -    if (!cert) {
      -        return;
      +#if defined(HAVE_OCSP_STAPLING) && !defined(SSL_CTRL_SET_CURRENT_CERT)
      +        /* 
      +         * OpenSSL up to 1.0.1: configure stapling as we go. In 1.0.2
      +         * and later, there's SSL_CTX_set_current_cert, which allows
      +         * iterating over all certs in an SSL_CTX (including those possibly
      +         * loaded via SSLOpenSSLConfCmd Certificate), so for 1.0.2 and
      +         * later, we defer to the code in ssl_init_server_ctx.
      +         */
      +        if ((mctx->stapling_enabled == TRUE) &&
      +            !ssl_stapling_init_cert(s, p, ptemp, mctx, cert)) {
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02567)
      +                         "Unable to configure certificate %s for stapling",
      +                         key_id);
      +        }
      +#endif
      +
      +#ifndef HAVE_SSL_CONF_CMD
      +        SSL_free(ssl);
      +#endif
      +
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02568)
      +                     "Certificate and private key %s configured from %s and %s",
      +                     key_id, certfile, keyfile);
           }
       
           /*
      -     * Some information about the certificate(s)
      +     * Try to read DH parameters from the (first) SSLCertificateFile
            */
      -
      -    if (SSL_X509_isSGC(cert)) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "%s server certificate enables "
      -                     "Server Gated Cryptography (SGC)",
      -                     ssl_asn1_keystr(type));
      +    if ((certfile = APR_ARRAY_IDX(mctx->pks->cert_files, 0, const char *)) &&
      +        (dhparams = ssl_dh_GetParamFromFile(certfile))) {
      +        SSL_CTX_set_tmp_dh(mctx->ssl_ctx, dhparams);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02540)
      +                     "Custom DH parameters (%d bits) for %s loaded from %s",
      +                     BN_num_bits(dhparams->p), vhost_id, certfile);
      +        DH_free(dhparams);
           }
       
      -    if (SSL_X509_getBC(cert, &is_ca, &pathlen)) {
      -        if (is_ca) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      -                         "%s server certificate is a CA certificate "
      -                         "(BasicConstraints: CA == TRUE !?)",
      -                         ssl_asn1_keystr(type));
      -        }
      -
      -        if (pathlen > 0) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      -                         "%s server certificate is not a leaf certificate "
      -                         "(BasicConstraints: pathlen == %d > 0 !?)",
      -                         ssl_asn1_keystr(type), pathlen);
      -        }
      +#ifdef HAVE_ECC
      +    /*
      +     * Similarly, try to read the ECDH curve name from SSLCertificateFile...
      +     */
      +    if ((certfile != NULL) && 
      +        (ecparams = ssl_ec_GetParamFromFile(certfile)) &&
      +        (nid = EC_GROUP_get_curve_name(ecparams)) &&
      +        (eckey = EC_KEY_new_by_curve_name(nid))) {
      +        SSL_CTX_set_tmp_ecdh(mctx->ssl_ctx, eckey);
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02541)
      +                     "ECDH curve %s for %s specified in %s",
      +                     OBJ_nid2sn(nid), vhost_id, certfile);
           }
      -
           /*
      -     * Check if the server name is covered by the certificate.
      -     * Consider both dNSName entries in the subjectAltName extension
      -     * and, as a fallback, commonName attributes in the subject DN.
      -     * (DNS-IDs and CN-IDs as defined in RFC 6125).
      +     * ...otherwise, enable auto curve selection (OpenSSL 1.0.2 and later)
      +     * or configure NIST P-256 (required to enable ECDHE for earlier versions)
            */
      -    if (SSL_X509_getIDs(ptemp, cert, &ids)) {
      -        char *cp;
      -        int i;
      -        char **id = (char **)ids->elts;
      -        BOOL is_wildcard, matched = FALSE;
      -
      -        for (i = 0; i < ids->nelts; i++) {
      -            if (!id[i])
      -                continue;
      -
      -            /*
      -             * Determine if it is a wildcard ID - we're restrictive
      -             * in the sense that we require the wildcard character to be
      -             * THE left-most label (i.e., the ID must start with "*.")
      -             */
      -            is_wildcard = (*id[i] == '*' && *(id[i]+1) == '.') ? TRUE : FALSE;
      -
      -            /*
      -             * If the ID includes a wildcard character, check if it matches
      -             * for the left-most DNS label (i.e., the wildcard character
      -             * is not allowed to match a dot). Otherwise, try a simple
      -             * string compare, case insensitively.
      -             */
      -            if ((is_wildcard == TRUE &&
      -                 (cp = strchr(s->server_hostname, '.')) &&
      -                 !strcasecmp(id[i]+1, cp)) ||
      -                !strcasecmp(id[i], s->server_hostname)) {
      -                matched = TRUE;
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                             "%sID '%s' in %s certificate configured "
      -                             "for %s matches server name",
      -                             is_wildcard ? "Wildcard " : "",
      -                             id[i], ssl_asn1_keystr(type),
      -                             (mySrvConfig(s))->vhost_id);
      -                break;
      -            }
      -        }
      -
      -        if (matched == FALSE) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      -                         "%s certificate configured for %s does NOT include "
      -                         "an ID which matches the server name",
      -                         ssl_asn1_keystr(type), (mySrvConfig(s))->vhost_id);
      -        }
      +    else {
      +#if defined(SSL_CTX_set_ecdh_auto)
      +        SSL_CTX_set_ecdh_auto(mctx->ssl_ctx, 1);
      +#else
      +        SSL_CTX_set_tmp_ecdh(mctx->ssl_ctx,
      +                             EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
      +#endif
           }
      +    EC_KEY_free(eckey);
      +    EC_GROUP_free(ecparams);
      +#endif
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_server_certs(server_rec *s,
      -                                  apr_pool_t *p,
      -                                  apr_pool_t *ptemp,
      -                                  modssl_ctx_t *mctx)
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +static apr_status_t ssl_init_ticket_key(server_rec *s,
      +                                        apr_pool_t *p,
      +                                        apr_pool_t *ptemp,
      +                                        modssl_ctx_t *mctx)
       {
      -    const char *rsa_id, *dsa_id;
      -#ifndef OPENSSL_NO_EC
      -    const char *ecc_id;
      -#endif
      -    const char *vhost_id = mctx->sc->vhost_id;
      -    int i;
      -    int have_rsa, have_dsa;
      -#ifndef OPENSSL_NO_EC
      -    int have_ecc;
      -#endif
      +    apr_status_t rv;
      +    apr_file_t *fp;
      +    apr_size_t len;
      +    char buf[TLSEXT_TICKET_KEY_LEN];
      +    char *path;
      +    modssl_ticket_key_t *ticket_key = mctx->ticket_key;
       
      -    rsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_RSA);
      -    dsa_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_DSA);
      -#ifndef OPENSSL_NO_EC
      -    ecc_id = ssl_asn1_table_keyfmt(ptemp, vhost_id, SSL_AIDX_ECC);
      -#endif
      +    if (!ticket_key->file_path) {
      +        return APR_SUCCESS;
      +    }
       
      -    have_rsa = ssl_server_import_cert(s, mctx, rsa_id, SSL_AIDX_RSA);
      -    have_dsa = ssl_server_import_cert(s, mctx, dsa_id, SSL_AIDX_DSA);
      -#ifndef OPENSSL_NO_EC
      -    have_ecc = ssl_server_import_cert(s, mctx, ecc_id, SSL_AIDX_ECC);
      -#endif
      +    path = ap_server_root_relative(p, ticket_key->file_path);
       
      -    if (!(have_rsa || have_dsa
      -#ifndef OPENSSL_NO_EC
      -        || have_ecc
      -#endif
      -)) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -#ifndef OPENSSL_NO_EC
      -                "Oops, no RSA, DSA or ECC server certificate found "
      -#else
      -                "Oops, no RSA or DSA server certificate found "
      -#endif
      -                "for '%s:%d'?!", s->server_hostname, s->port);
      -        ssl_die();
      +    rv = apr_file_open(&fp, path, APR_READ|APR_BINARY,
      +                       APR_OS_DEFAULT, ptemp);
      +
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02286)
      +                     "Failed to open ticket key file %s: (%d) %pm",
      +                     path, rv, &rv);
      +        return ssl_die(s);
           }
       
      -    for (i = 0; i < SSL_AIDX_MAX; i++) {
      -        ssl_check_public_cert(s, ptemp, mctx->pks->certs[i], i);
      +    rv = apr_file_read_full(fp, &buf[0], TLSEXT_TICKET_KEY_LEN, &len);
      +
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02287)
      +                     "Failed to read %d bytes from %s: (%d) %pm",
      +                     TLSEXT_TICKET_KEY_LEN, path, rv, &rv);
      +        return ssl_die(s);
           }
       
      -    have_rsa = ssl_server_import_key(s, mctx, rsa_id, SSL_AIDX_RSA);
      -    have_dsa = ssl_server_import_key(s, mctx, dsa_id, SSL_AIDX_DSA);
      -#ifndef OPENSSL_NO_EC
      -    have_ecc = ssl_server_import_key(s, mctx, ecc_id, SSL_AIDX_ECC);
      -#endif
      +    memcpy(ticket_key->key_name, buf, 16);
      +    memcpy(ticket_key->hmac_secret, buf + 16, 16);
      +    memcpy(ticket_key->aes_key, buf + 32, 16);
       
      -    if (!(have_rsa || have_dsa
      -#ifndef OPENSSL_NO_EC
      -        || have_ecc
      -#endif
      -          )) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -#ifndef OPENSSL_NO_EC
      -                "Oops, no RSA, DSA or ECC server private key found?!");
      -#else
      -                "Oops, no RSA or DSA server private key found?!");
      -#endif
      -        ssl_die();
      +    if (!SSL_CTX_set_tlsext_ticket_key_cb(mctx->ssl_ctx,
      +                                          ssl_callback_SessionTicket)) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01913)
      +                     "Unable to initialize TLS session ticket key callback "
      +                     "(incompatible OpenSSL version?)");
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +        return ssl_die(s);
           }
       
      -#ifdef HAVE_TLSEXT_TICKETS
      -    if (mctx->sc->tickets->nelts > 0) { 
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02288)
      +                 "TLS session ticket key for %s successfully loaded from %s",
      +                 (mySrvConfig(s))->vhost_id, path);
       
      -        if (mctx->sc->default_ticket_name != NULL) {
      -            int i;
      -            modssl_ticket_t* ticket = NULL;
      -            mctx->sc->default_ticket = NULL;
      +    return APR_SUCCESS;
      +}
      +#endif
       
      -            for (i = 0; i < mctx->sc->tickets->nelts; i++) {
      -                ticket = APR_ARRAY_IDX(mctx->sc->tickets, i, modssl_ticket_t*);
      -                if (strcmp(ticket->conf_name, mctx->sc->default_ticket_name) == 0) {
      -                    mctx->sc->default_ticket = ticket;
      -                }
      -            }
      +static BOOL load_x509_info(apr_pool_t *ptemp,
      +                           STACK_OF(X509_INFO) *sk,
      +                           const char *filename)
      +{
      +    BIO *in;
       
      -            if (mctx->sc->default_ticket == NULL) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                            "Misconfigured TLS Tickets.  Couldn't find key named '%s'",
      -                            mctx->sc->default_ticket_name);
      -                ssl_die();
      -            }
      -        }
      -        else {
      -            mctx->sc->default_ticket = APR_ARRAY_IDX(mctx->sc->tickets, 0, modssl_ticket_t*);
      -        }
      +    if (!(in = BIO_new(BIO_s_file()))) {
      +        return FALSE;
      +    }
       
      -        if (!SSL_CTX_set_tlsext_ticket_key_cb(mctx->ssl_ctx, ssl_callback_tlsext_tickets)) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                        "Unable to initialize TLS session ticket extension "
      -                        "(incompatible OpenSSL version?)");
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -            ssl_die();
      -        }
      +    if (BIO_read_filename(in, filename) <= 0) {
      +        BIO_free(in);
      +        return FALSE;
           }
      -#endif
       
      +    ERR_clear_error();
      +
      +    PEM_X509_INFO_read_bio(in, sk, NULL, NULL);
      +
      +    BIO_free(in);
      +
      +    return TRUE;
       }
       
      -static void ssl_init_proxy_certs(server_rec *s,
      -                                 apr_pool_t *p,
      -                                 apr_pool_t *ptemp,
      -                                 modssl_ctx_t *mctx)
      +static apr_status_t ssl_init_proxy_certs(server_rec *s,
      +                                         apr_pool_t *p,
      +                                         apr_pool_t *ptemp,
      +                                         modssl_ctx_t *mctx)
       {
           int n, ncerts = 0;
           STACK_OF(X509_INFO) *sk;
      @@ -1198,24 +1335,43 @@ static void ssl_init_proxy_certs(server_rec *s,
                                      ssl_callback_proxy_cert);
       
           if (!(pkp->cert_file || pkp->cert_path)) {
      -        return;
      +        return APR_SUCCESS;
           }
       
           sk = sk_X509_INFO_new_null();
       
           if (pkp->cert_file) {
      -        SSL_X509_INFO_load_file(ptemp, sk, pkp->cert_file);
      +        load_x509_info(ptemp, sk, pkp->cert_file);
           }
       
           if (pkp->cert_path) {
      -        SSL_X509_INFO_load_path(ptemp, sk, pkp->cert_path);
      +        apr_dir_t *dir;
      +        apr_finfo_t dirent;
      +        apr_int32_t finfo_flags = APR_FINFO_TYPE|APR_FINFO_NAME;
      +    
      +        if (apr_dir_open(&dir, pkp->cert_path, ptemp) == APR_SUCCESS) {
      +            while ((apr_dir_read(&dirent, finfo_flags, dir)) == APR_SUCCESS) {
      +                const char *fullname;
      +
      +                if (dirent.filetype == APR_DIR) {
      +                    continue; /* don't try to load directories */
      +                }
      +        
      +                fullname = apr_pstrcat(ptemp,
      +                                       pkp->cert_path, "/", dirent.name,
      +                                       NULL);
      +                load_x509_info(ptemp, sk, fullname);
      +            }
      +
      +            apr_dir_close(dir);
      +        }
           }
       
           if ((ncerts = sk_X509_INFO_num(sk)) <= 0) {
               sk_X509_INFO_free(sk);
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(02206)
                            "no client certs found for SSL proxy");
      -        return;
      +        return APR_SUCCESS;
           }
       
           /* Check that all client certs have got certificates and private
      @@ -1223,35 +1379,47 @@ static void ssl_init_proxy_certs(server_rec *s,
           for (n = 0; n < ncerts; n++) {
               X509_INFO *inf = sk_X509_INFO_value(sk, n);
       
      -        if (!inf->x509 || !inf->x_pkey) {
      +        if (!inf->x509 || !inf->x_pkey || !inf->x_pkey->dec_pkey ||
      +            inf->enc_data) {
                   sk_X509_INFO_free(sk);
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, s, APLOGNO(02252)
                                "incomplete client cert configured for SSL proxy "
                                "(missing or encrypted private key?)");
      -            ssl_die();
      -            return;
      +            return ssl_die(s);
      +        }
      +        
      +        if (X509_check_private_key(inf->x509, inf->x_pkey->dec_pkey) != 1) {
      +            ssl_log_xerror(SSLLOG_MARK, APLOG_STARTUP, 0, ptemp, s, inf->x509,
      +                           APLOGNO(02326) "proxy client certificate and "
      +                           "private key do not match");
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      +            return ssl_die(s);
               }
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02207)
                        "loaded %d client certs for SSL proxy",
                        ncerts);
           pkp->certs = sk;
       
       
           if (!pkp->ca_cert_file || !store) {
      -        return;
      +        return APR_SUCCESS;
           }
       
      -    /* Load all of the CA certs and construct a chain */
      +    /* If SSLProxyMachineCertificateChainFile is configured, load all
      +     * the CA certs and have OpenSSL attempt to construct a full chain
      +     * from each configured end-entity cert up to a root.  This will
      +     * allow selection of the correct cert given a list of root CA
      +     * names in the certificate request from the server.  */
           pkp->ca_certs = (STACK_OF(X509) **) apr_pcalloc(p, ncerts * sizeof(sk));
           sctx = X509_STORE_CTX_new();
       
           if (!sctx) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02208)
                            "SSL proxy client cert initialization failed");
               ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -        ssl_die();
      +        return ssl_die(s);
           }
       
           X509_STORE_load_locations(store, pkp->ca_cert_file, NULL);
      @@ -1266,8 +1434,9 @@ static void ssl_init_proxy_certs(server_rec *s,
               if (X509_verify_cert(sctx) != 1) {
                   int err = X509_STORE_CTX_get_error(sctx);
                   ssl_log_xerror(SSLLOG_MARK, APLOG_WARNING, 0, ptemp, s, inf->x509,
      -                         "SSL proxy client cert chain verification failed: %s :",
      -                          X509_verify_cert_error_string(err));
      +                           APLOGNO(02270) "SSL proxy client cert chain "
      +                           "verification failed: %s :",
      +                           X509_verify_cert_error_string(err));
               }
       
               /* Clear X509_verify_cert errors */
      @@ -1291,13 +1460,15 @@ static void ssl_init_proxy_certs(server_rec *s,
                   }
       
                   ssl_log_xerror(SSLLOG_MARK, APLOG_DEBUG, 0, ptemp, s, inf->x509,
      -                         "loaded %i intermediate CA%s for cert %i: ",
      -                         i, i == 1 ? "" : "s", n);
      +                           APLOGNO(02271)
      +                           "loaded %i intermediate CA%s for cert %i: ",
      +                           i, i == 1 ? "" : "s", n);
                   if (i > 0) {
                       int j;
                       for (j = 0; j < i; j++) {
                           ssl_log_xerror(SSLLOG_MARK, APLOG_DEBUG, 0, ptemp, s,
      -                                   sk_X509_value(chain, j), "%i:", j);
      +                                   sk_X509_value(chain, j), APLOGNO(03039)
      +                                   "%i:", j);
                       }
                   }
               }
      @@ -1307,60 +1478,178 @@ static void ssl_init_proxy_certs(server_rec *s,
           }
       
           X509_STORE_CTX_free(sctx);
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_proxy_ctx(server_rec *s,
      -                               apr_pool_t *p,
      -                               apr_pool_t *ptemp,
      -                               SSLSrvConfigRec *sc)
      +static apr_status_t ssl_init_proxy_ctx(server_rec *s,
      +                                       apr_pool_t *p,
      +                                       apr_pool_t *ptemp,
      +                                       SSLSrvConfigRec *sc)
       {
      -    ssl_init_ctx(s, p, ptemp, sc->proxy);
      +    apr_status_t rv;
      +
      +    if ((rv = ssl_init_ctx(s, p, ptemp, sc->proxy)) != APR_SUCCESS) {
      +        return rv;
      +    }
       
      -    ssl_init_proxy_certs(s, p, ptemp, sc->proxy);
      +    if ((rv = ssl_init_proxy_certs(s, p, ptemp, sc->proxy)) != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    return APR_SUCCESS;
       }
       
      -static void ssl_init_server_ctx(server_rec *s,
      -                                apr_pool_t *p,
      -                                apr_pool_t *ptemp,
      -                                SSLSrvConfigRec *sc)
      +static apr_status_t ssl_init_server_ctx(server_rec *s,
      +                                        apr_pool_t *p,
      +                                        apr_pool_t *ptemp,
      +                                        SSLSrvConfigRec *sc,
      +                                        apr_array_header_t *pphrases)
       {
      -    ssl_init_server_check(s, p, ptemp, sc->server);
      +    apr_status_t rv;
      +#ifdef HAVE_SSL_CONF_CMD
      +    ssl_ctx_param_t *param = (ssl_ctx_param_t *)sc->server->ssl_ctx_param->elts;
      +    SSL_CONF_CTX *cctx = sc->server->ssl_ctx_config;
      +    int i;
      +#endif
      +
      +    /*
      +     *  Check for problematic re-initializations
      +     */
      +    if (sc->server->ssl_ctx) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02569)
      +                     "Illegal attempt to re-initialise SSL for server "
      +                     "(SSLEngine On should go in the VirtualHost, not in global scope.)");
      +        return APR_EGENERAL;
      +    }
      +
      +    if ((rv = ssl_init_ctx(s, p, ptemp, sc->server)) != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    if ((rv = ssl_init_server_certs(s, p, ptemp, sc->server, pphrases))
      +        != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +#ifdef HAVE_SSL_CONF_CMD
      +    SSL_CONF_CTX_set_ssl_ctx(cctx, sc->server->ssl_ctx);
      +    for (i = 0; i < sc->server->ssl_ctx_param->nelts; i++, param++) {
      +        ERR_clear_error();
      +        if (SSL_CONF_cmd(cctx, param->name, param->value) <= 0) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02407)
      +                         "\"SSLOpenSSLConfCmd %s %s\" failed for %s",
      +                         param->name, param->value, sc->vhost_id);
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +            return ssl_die(s);
      +        } else {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02556)
      +                         "\"SSLOpenSSLConfCmd %s %s\" applied to %s",
      +                         param->name, param->value, sc->vhost_id);
      +        }
      +    }
       
      -    ssl_init_ctx(s, p, ptemp, sc->server);
      +    if (SSL_CONF_CTX_finish(cctx) == 0) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02547)
      +                         "SSL_CONF_CTX_finish() failed");
      +            SSL_CONF_CTX_free(cctx);
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +            return ssl_die(s);
      +    }
      +    SSL_CONF_CTX_free(cctx);
      +#endif
       
      -    ssl_init_server_certs(s, p, ptemp, sc->server);
      +    if (SSL_CTX_check_private_key(sc->server->ssl_ctx) != 1) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02572)
      +                     "Failed to configure at least one certificate and key "
      +                     "for %s", sc->vhost_id);
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +        return ssl_die(s);
      +    }
      +
      +#if defined(HAVE_OCSP_STAPLING) && defined(SSL_CTRL_SET_CURRENT_CERT)
      +    /*
      +     * OpenSSL 1.0.2 and later allows iterating over all SSL_CTX certs
      +     * by means of SSL_CTX_set_current_cert. Enabling stapling at this
      +     * (late) point makes sure that we catch both certificates loaded
      +     * via SSLCertificateFile and SSLOpenSSLConfCmd Certificate.
      +     */
      +    if (sc->server->stapling_enabled == TRUE) {
      +        X509 *cert;
      +        int i = 0;
      +        int ret = SSL_CTX_set_current_cert(sc->server->ssl_ctx,
      +                                           SSL_CERT_SET_FIRST);
      +        while (ret) {
      +            cert = SSL_CTX_get0_certificate(sc->server->ssl_ctx);
      +            if (!cert || !ssl_stapling_init_cert(s, p, ptemp, sc->server,
      +                                                 cert)) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02604)
      +                             "Unable to configure certificate %s:%d "
      +                             "for stapling", sc->vhost_id, i);
      +            }
      +            ret = SSL_CTX_set_current_cert(sc->server->ssl_ctx,
      +                                           SSL_CERT_SET_NEXT);
      +            i++;
      +        }
      +    }
      +#endif
      +
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    if ((rv = ssl_init_ticket_key(s, p, ptemp, sc->server)) != APR_SUCCESS) {
      +        return rv;
      +    }
      +#endif
      +
      +    SSL_CTX_set_timeout(sc->server->ssl_ctx,
      +                        sc->session_cache_timeout == UNSET ?
      +                        SSL_SESSION_CACHE_TIMEOUT : sc->session_cache_timeout);
      +
      +    return APR_SUCCESS;
       }
       
       /*
        * Configure a particular server
        */
      -void ssl_init_ConfigureServer(server_rec *s,
      -                              apr_pool_t *p,
      -                              apr_pool_t *ptemp,
      -                              SSLSrvConfigRec *sc)
      +apr_status_t ssl_init_ConfigureServer(server_rec *s,
      +                                      apr_pool_t *p,
      +                                      apr_pool_t *ptemp,
      +                                      SSLSrvConfigRec *sc,
      +                                      apr_array_header_t *pphrases)
       {
      +    apr_status_t rv;
      +
           /* Initialize the server if SSL is enabled or optional.
            */
           if ((sc->enabled == SSL_ENABLED_TRUE) || (sc->enabled == SSL_ENABLED_OPTIONAL)) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "Configuring server for SSL protocol");
      -        ssl_init_server_ctx(s, p, ptemp, sc);
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01914)
      +                     "Configuring server %s for SSL protocol", sc->vhost_id);
      +        if ((rv = ssl_init_server_ctx(s, p, ptemp, sc, pphrases))
      +            != APR_SUCCESS) {
      +            return rv;
      +        }
           }
       
           if (sc->proxy_enabled) {
      -        ssl_init_proxy_ctx(s, p, ptemp, sc);
      +        if ((rv = ssl_init_proxy_ctx(s, p, ptemp, sc)) != APR_SUCCESS) {
      +            return rv;
      +        }
           }
      +
      +    return APR_SUCCESS;
       }
       
      -void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
      +apr_status_t ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
       {
      -    server_rec *s, *ps;
      +    server_rec *s;
           SSLSrvConfigRec *sc;
      +#ifndef HAVE_TLSEXT
      +    server_rec *ps;
           apr_hash_t *table;
           const char *key;
           apr_ssize_t klen;
       
           BOOL conflict = FALSE;
      +#endif
       
           /*
            * Give out warnings when a server has HTTPS configured
      @@ -1371,7 +1660,7 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
       
               if ((sc->enabled == SSL_ENABLED_TRUE) && (s->port == DEFAULT_HTTP_PORT)) {
                   ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
      -                         base_server,
      +                         base_server, APLOGNO(01915)
                                "Init: (%s) You configured HTTPS(%d) "
                                "on the standard HTTP(%d) port!",
                                ssl_util_vhostid(p, s),
      @@ -1380,7 +1669,7 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
       
               if ((sc->enabled == SSL_ENABLED_FALSE) && (s->port == DEFAULT_HTTPS_PORT)) {
                   ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
      -                         base_server,
      +                         base_server, APLOGNO(01916)
                                "Init: (%s) You configured HTTP(%d) "
                                "on the standard HTTPS(%d) port!",
                                ssl_util_vhostid(p, s),
      @@ -1388,11 +1677,11 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
               }
           }
       
      +#ifndef HAVE_TLSEXT
           /*
            * Give out warnings when more than one SSL-aware virtual server uses the
      -     * same IP:port. This doesn't work because mod_ssl then will always use
      -     * just the certificate/keys of one virtual host (which one cannot be said
      -     * easily - but that doesn't matter here).
      +     * same IP:port and an OpenSSL version without support for TLS extensions
      +     * (SNI in particular) is used.
            */
           table = apr_hash_make(p);
       
      @@ -1410,19 +1699,8 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
               klen = strlen(key);
       
               if ((ps = (server_rec *)apr_hash_get(table, key, klen))) {
      -            ap_log_error(APLOG_MARK,
      -#ifdef OPENSSL_NO_TLSEXT
      -                         APLOG_WARNING,
      -#else
      -                         APLOG_DEBUG,
      -#endif
      -                         0,
      -                         base_server,
      -#ifdef OPENSSL_NO_TLSEXT
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, APLOGNO(02662)
                                "Init: SSL server IP/port conflict: "
      -#else
      -                         "Init: SSL server IP/port overlap: "
      -#endif
                                "%s (%s:%d) vs. %s (%s:%d)",
                                ssl_util_vhostid(p, s),
                                (s->defn_name ? s->defn_name : "unknown"),
      @@ -1438,16 +1716,16 @@ void ssl_init_CheckServers(server_rec *base_server, apr_pool_t *p)
           }
       
           if (conflict) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server,
      -#ifdef OPENSSL_NO_TLSEXT
      -                     "Init: You should not use name-based "
      -                     "virtual hosts in conjunction with SSL!!");
      -#else
      -                     "Init: Name-based SSL virtual hosts only "
      -                     "work for clients with TLS server name indication "
      -                     "support (RFC 4366)");
      -#endif
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, base_server, APLOGNO(01917)
      +                     "Init: Name-based SSL virtual hosts require "
      +                     "an OpenSSL version with support for TLS extensions "
      +                     "(RFC 6066 - Server Name Indication / SNI), "
      +                     "but the currently used library version (%s) is "
      +                     "lacking this feature", SSLeay_version(SSLEAY_VERSION));
           }
      +#endif
      +
      +    return APR_SUCCESS;
       }
       
       static int ssl_init_FindCAList_X509NameCmp(const X509_NAME * const *a,
      @@ -1473,9 +1751,9 @@ static void ssl_init_PushCAList(STACK_OF(X509_NAME) *ca_list,
           for (n = 0; n < sk_X509_NAME_num(sk); n++) {
               X509_NAME *name = sk_X509_NAME_value(sk, n);
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02209)
                            "CA certificate: %s",
      -                     SSL_X509_NAME_to_string(ptemp, name, 0));
      +                     modssl_X509_NAME_to_string(ptemp, name, 0));
       
               /*
                * note that SSL_load_client_CA_file() checks for duplicates,
      @@ -1519,7 +1797,7 @@ STACK_OF(X509_NAME) *ssl_init_FindCAList(server_rec *s,
                * then the file failed to load, and users should hear about that.
                */
               if (sk_X509_NAME_num(ca_list) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02210)
                           "Failed to load SSLCACertificateFile: %s", ca_file);
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
               }
      @@ -1535,10 +1813,11 @@ STACK_OF(X509_NAME) *ssl_init_FindCAList(server_rec *s,
               apr_status_t rv;
       
               if ((rv = apr_dir_open(&dir, ca_path, ptemp)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(02211)
                           "Failed to open Certificate Path `%s'",
                           ca_path);
      -            ssl_die();
      +            sk_X509_NAME_pop_free(ca_list, X509_NAME_free);
      +            return NULL;
               }
       
               while ((apr_dir_read(&direntry, finfo_flags, dir)) == APR_SUCCESS) {
      @@ -1585,6 +1864,13 @@ void ssl_init_Child(apr_pool_t *p, server_rec *s)
       static void ssl_init_ctx_cleanup(modssl_ctx_t *mctx)
       {
           MODSSL_CFG_ITEM_FREE(SSL_CTX_free, mctx->ssl_ctx);
      +
      +#ifdef HAVE_SRP
      +    if (mctx->srp_vbase != NULL) {
      +        SRP_VBASE_free(mctx->srp_vbase);
      +        mctx->srp_vbase = NULL;
      +    }
      +#endif
       }
       
       static void ssl_init_ctx_cleanup_proxy(modssl_ctx_t *mctx)
      @@ -1592,23 +1878,19 @@ static void ssl_init_ctx_cleanup_proxy(modssl_ctx_t *mctx)
           ssl_init_ctx_cleanup(mctx);
       
           if (mctx->pkp->certs) {
      -        sk_X509_INFO_pop_free(mctx->pkp->certs, X509_INFO_free);
      -        mctx->pkp->certs = NULL;
      -    }
      -}
      +        int i = 0;
      +        int ncerts = sk_X509_INFO_num(mctx->pkp->certs);
       
      -static void ssl_init_ctx_cleanup_server(modssl_ctx_t *mctx)
      -{
      -    int i;
      -
      -    ssl_init_ctx_cleanup(mctx);
      -
      -    for (i=0; i < SSL_AIDX_MAX; i++) {
      -        MODSSL_CFG_ITEM_FREE(X509_free,
      -                             mctx->pks->certs[i]);
      +        if (mctx->pkp->ca_certs) {
      +            for (i = 0; i < ncerts; i++) {
      +                if (mctx->pkp->ca_certs[i] != NULL) {
      +                    sk_X509_pop_free(mctx->pkp->ca_certs[i], X509_free);
      +                }
      +            }
      +        }
       
      -        MODSSL_CFG_ITEM_FREE(EVP_PKEY_free,
      -                             mctx->pks->keys[i]);
      +        sk_X509_INFO_pop_free(mctx->pkp->certs, X509_INFO_free);
      +        mctx->pkp->certs = NULL;
           }
       }
       
      @@ -1623,11 +1905,6 @@ apr_status_t ssl_init_ModuleKill(void *data)
            */
           ssl_scache_kill(base_server);
       
      -    /*
      -     * Destroy the temporary keys and params
      -     */
      -    ssl_tmp_keys_free(base_server);
      -
           /*
            * Free the non-pool allocated structures
            * in the per-server configurations
      @@ -1637,9 +1914,10 @@ apr_status_t ssl_init_ModuleKill(void *data)
       
               ssl_init_ctx_cleanup_proxy(sc->proxy);
       
      -        ssl_init_ctx_cleanup_server(sc->server);
      +        ssl_init_ctx_cleanup(sc->server);
           }
       
      +    free_dh_params();
      +
           return APR_SUCCESS;
       }
      -
      diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c
      index 45e2ca42a44..82953ad0ac8 100644
      --- a/modules/ssl/ssl_engine_io.c
      +++ b/modules/ssl/ssl_engine_io.c
      @@ -28,8 +28,14 @@
                                         core keeps dumping.''
                                                   -- Unknown    */
       #include "ssl_private.h"
      +#include "mod_ssl.h"
      +#include "mod_ssl_openssl.h"
       #include "apr_date.h"
       
      +APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(ssl, SSL, int, proxy_post_handshake,
      +                                    (conn_rec *c,SSL *ssl),
      +                                    (c,ssl),OK,DECLINED);
      +
       /*  _________________________________________________________________
       **
       **  I/O Hooks
      @@ -186,6 +192,7 @@ static int bio_filter_out_write(BIO *bio, const char *in, int inl)
       {
           bio_filter_out_ctx_t *outctx = (bio_filter_out_ctx_t *)(bio->ptr);
           apr_bucket *e;
      +    int need_flush;
       
           /* Abort early if the client has initiated a renegotiation. */
           if (outctx->filter_ctx->config->reneg_state == RENEG_ABORT) {
      @@ -204,6 +211,26 @@ static int bio_filter_out_write(BIO *bio, const char *in, int inl)
           e = apr_bucket_transient_create(in, inl, outctx->bb->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(outctx->bb, e);
       
      +    /* In theory, OpenSSL should flush as necessary, but it is known
      +     * not to do so correctly in some cases (< 0.9.8m; see PR 46952),
      +     * or on the proxy/client side (after ssl23_client_hello(), e.g.
      +     * ssl/proxy.t test suite).
      +     *
      +     * Historically, this flush call was performed only for an SSLv2
      +     * connection or for a proxy connection.  Calling _out_flush can
      +     * be expensive in cases where requests/responses are pipelined,
      +     * so limit the performance impact to handshake time.
      +     */
      +#if OPENSSL_VERSION_NUMBER < 0x0009080df
      +     need_flush = !SSL_is_init_finished(outctx->filter_ctx->pssl);
      +#else
      +     need_flush = SSL_in_connect_init(outctx->filter_ctx->pssl);
      +#endif
      +    if (need_flush) {
      +        e = apr_bucket_flush_create(outctx->bb->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(outctx->bb, e);
      +    }
      +
           if (bio_filter_out_pass(outctx) < 0) {
               return -1;
           }
      @@ -317,7 +344,7 @@ static int char_buffer_read(char_buffer_t *buffer, char *in, int inl)
           }
       
           if (buffer->length > inl) {
      -        /* we have have enough to fill the caller's buffer */
      +        /* we have enough to fill the caller's buffer */
               memmove(in, buffer->value, inl);
               buffer->value += inl;
               buffer->length -= inl;
      @@ -444,21 +471,6 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
               return -1;
           }
       
      -    /* In theory, OpenSSL should flush as necessary, but it is known
      -     * not to do so correctly in some cases; see PR 46952.
      -     *
      -     * Historically, this flush call was performed only for an SSLv2
      -     * connection or for a proxy connection.  Calling _out_flush
      -     * should be very cheap in cases where it is unnecessary (and no
      -     * output is buffered) so the performance impact of doing it
      -     * unconditionally should be minimal.
      -     */
      -    if (bio_filter_out_flush(inctx->bio_out) < 0) {
      -        bio_filter_out_ctx_t *outctx = inctx->bio_out->ptr;
      -        inctx->rc = outctx->rc;
      -        return -1;
      -    }
      -
           BIO_clear_retry_flags(bio);
       
           if (!inctx->bb) {
      @@ -482,6 +494,12 @@ static int bio_filter_in_read(BIO *bio, char *in, int inlen)
                   return -1;
               }
       
      +        if (block == APR_BLOCK_READ 
      +            && APR_STATUS_IS_TIMEUP(inctx->rc)
      +            && APR_BRIGADE_EMPTY(inctx->bb)) {
      +            /* don't give up, just return the timeout */
      +            return -1;
      +        }
               if (inctx->rc != APR_SUCCESS) {
                   /* Unexpected errors discard the brigade */
                   apr_brigade_cleanup(inctx->bb);
      @@ -584,6 +602,11 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
                   break;
               }
       
      +        /* We rely on SSL_get_error() after the read, which requires an empty
      +         * error queue before the read in order to work properly.
      +         */
      +        ERR_clear_error();
      +
               /* SSL_read may not read because we haven't taken enough data
                * from the stack.  This is where we want to consider all of
                * the blocking and SPECULATIVE semantics
      @@ -663,8 +686,12 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
                           }
                           continue;  /* Blocking and nothing yet?  Try again. */
                       }
      +                else if (APR_STATUS_IS_TIMEUP(inctx->rc)) {
      +                    /* just return it, the calling layer might be fine with it,
      +                       and we do not want to bloat the log. */
      +                }
                       else {
      -                    ap_log_cerror(APLOG_MARK, APLOG_INFO, inctx->rc, c,
      +                    ap_log_cerror(APLOG_MARK, APLOG_INFO, inctx->rc, c, APLOGNO(01991)
                                         "SSL input filter read failed.");
                       }
                   }
      @@ -672,7 +699,7 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
                       /*
                        * Log SSL errors and any unexpected conditions.
                        */
      -                ap_log_cerror(APLOG_MARK, APLOG_INFO, inctx->rc, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_INFO, inctx->rc, c, APLOGNO(01992)
                                     "SSL library error %d reading data", ssl_err);
                       ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, mySrvFromConn(c));
       
      @@ -757,6 +784,11 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
               return APR_EGENERAL;
           }
       
      +    /* We rely on SSL_get_error() after the write, which requires an empty error
      +     * queue before the write in order to work properly.
      +     */
      +    ERR_clear_error();
      +
           outctx = (bio_filter_out_ctx_t *)filter_ctx->pbioWrite->ptr;
           res = SSL_write(filter_ctx->pssl, (unsigned char *)data, len);
       
      @@ -775,15 +807,27 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
                    */
                   outctx->rc = APR_EAGAIN;
               }
      +        else if (ssl_err == SSL_ERROR_WANT_READ) {
      +            /*
      +             * If OpenSSL wants to read during write, and we were
      +             * nonblocking, set the sense explicitly to read and
      +             * report as an EAGAIN.
      +             *
      +             * (This is usually the case when the client forces an SSL
      +             * renegotiation which is handled implicitly by OpenSSL.)
      +             */
      +            outctx->c->cs->sense = CONN_SENSE_WANT_READ;
      +            outctx->rc = APR_EAGAIN;
      +        }
               else if (ssl_err == SSL_ERROR_SYSCALL) {
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c, APLOGNO(01993)
                                 "SSL output filter write failed.");
               }
               else /* if (ssl_err == SSL_ERROR_SSL) */ {
                   /*
                    * Log SSL errors
                    */
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c, APLOGNO(01994)
                                 "SSL library error %d writing data", ssl_err);
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, mySrvFromConn(c));
               }
      @@ -800,7 +844,7 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
                   reason = "likely due to failed renegotiation";
               }
       
      -        ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_INFO, outctx->rc, c, APLOGNO(01995)
                             "failed to write %" APR_SSIZE_T_FMT
                             " of %" APR_SIZE_T_FMT " bytes (%s)",
                             len - (apr_size_t)res, len, reason);
      @@ -813,12 +857,12 @@ static apr_status_t ssl_filter_write(ap_filter_t *f,
       /* Just use a simple request.  Any request will work for this, because
        * we use a flag in the conn_rec->conn_vector now.  The fake request just
        * gets the request back to the Apache core so that a response can be sent.
      - *
      - * To avoid calling back for more data from the socket, use an HTTP/0.9
      - * request, and tack on an EOS bucket.
      + * Since we use an HTTP/1.x request, we also have to inject the empty line
      + * that terminates the headers, or the core will read more data from the
      + * socket.
        */
       #define HTTP_ON_HTTPS_PORT \
      -    "GET /" CRLF
      +    "GET / HTTP/1.0" CRLF
       
       #define HTTP_ON_HTTPS_PORT_BUCKET(alloc) \
           apr_bucket_immortal_create(HTTP_ON_HTTPS_PORT, \
      @@ -844,31 +888,39 @@ static void ssl_io_filter_disable(SSLConnRec *sslconn, ap_filter_t *f)
       
       static apr_status_t ssl_io_filter_error(ap_filter_t *f,
                                               apr_bucket_brigade *bb,
      -                                        apr_status_t status)
      +                                        apr_status_t status,
      +                                        int is_init)
       {
           SSLConnRec *sslconn = myConnConfig(f->c);
           apr_bucket *bucket;
      +    int send_eos = 1;
       
           switch (status) {
           case MODSSL_ERROR_HTTP_ON_HTTPS:
                   /* log the situation */
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c, APLOGNO(01996)
                                "SSL handshake failed: HTTP spoken on HTTPS port; "
                                "trying to send HTML error page");
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, sslconn->server);
       
      -            sslconn->non_ssl_request = 1;
                   ssl_io_filter_disable(sslconn, f);
      +            f->c->keepalive = AP_CONN_CLOSE;
      +            if (is_init) {
      +                sslconn->non_ssl_request = NON_SSL_SEND_REQLINE;
      +                return APR_EGENERAL;
      +            }
      +            sslconn->non_ssl_request = NON_SSL_SEND_HDR_SEP;
       
                   /* fake the request line */
                   bucket = HTTP_ON_HTTPS_PORT_BUCKET(f->c->bucket_alloc);
      +            send_eos = 0;
                   break;
       
           case MODSSL_ERROR_BAD_GATEWAY:
               bucket = ap_bucket_error_create(HTTP_BAD_REQUEST, NULL,
                                               f->c->pool,
                                               f->c->bucket_alloc);
      -        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c,
      +        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, f->c, APLOGNO(01997)
                             "SSL handshake failed: sending 502");
               break;
       
      @@ -877,9 +929,10 @@ static apr_status_t ssl_io_filter_error(ap_filter_t *f,
           }
       
           APR_BRIGADE_INSERT_TAIL(bb, bucket);
      -    bucket = apr_bucket_eos_create(f->c->bucket_alloc);
      -    APR_BRIGADE_INSERT_TAIL(bb, bucket);
      -
      +    if (send_eos) {
      +        bucket = apr_bucket_eos_create(f->c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, bucket);
      +    }
           return APR_SUCCESS;
       }
       
      @@ -900,6 +953,7 @@ static void ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
           SSLConnRec *sslconn = myConnConfig(c);
           int shutdown_type;
           int loglevel = APLOG_DEBUG;
      +    const char *logno;
       
           if (!ssl) {
               return;
      @@ -944,6 +998,7 @@ static void ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
           if (abortive) {
               shutdown_type = SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN;
               type = "abortive";
      +        logno = APLOGNO(01998);
               loglevel = APLOG_INFO;
           }
           else switch (sslconn->shutdown_type) {
      @@ -952,12 +1007,14 @@ static void ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
                  (violates the SSL/TLS standard!) */
               shutdown_type = SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN;
               type = "unclean";
      +        logno = APLOGNO(01999);
               break;
             case SSL_SHUTDOWN_TYPE_ACCURATE:
               /* send close notify and wait for clients close notify
                  (standard compliant, but usually causes connection hangs) */
               shutdown_type = 0;
               type = "accurate";
      +        logno = APLOGNO(02000);
               break;
             default:
               /*
      @@ -968,18 +1025,21 @@ static void ssl_filter_io_shutdown(ssl_filter_ctx_t *filter_ctx,
                  (standard compliant and safe, so it's the DEFAULT!) */
               shutdown_type = SSL_RECEIVED_SHUTDOWN;
               type = "standard";
      +        logno = APLOGNO(02001);
               break;
           }
       
           SSL_set_shutdown(ssl, shutdown_type);
      -    SSL_smart_shutdown(ssl);
      +    modssl_smart_shutdown(ssl);
       
           /* and finally log the fact that we've closed the connection */
           if (APLOG_CS_IS_LEVEL(c, mySrvFromConn(c), loglevel)) {
      +        /* Intentional no APLOGNO */
      +        /* logno provides APLOGNO */
               ap_log_cserror(APLOG_MARK, loglevel, 0, c, mySrvFromConn(c),
      -                       "Connection closed to child %ld with %s shutdown "
      +                       "%sConnection closed to child %ld with %s shutdown "
                              "(server %s)",
      -                       c->id, type,
      +                       logno, c->id, type,
                              ssl_util_vhostid(c->pool, mySrvFromConn(c)));
           }
       
      @@ -1040,24 +1100,66 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
       
           server = sslconn->server;
           if (sslconn->is_proxy) {
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
               apr_ipsubnet_t *ip;
      +#ifdef HAVE_TLS_ALPN
      +        const char *alpn_note;
      +#endif
       #endif
               const char *hostname_note = apr_table_get(c->notes,
                                                         "proxy-request-hostname");
      +        BOOL proxy_ssl_check_peer_ok = TRUE;
      +        int post_handshake_rc = OK;
      +
               sc = mySrvConfig(server);
       
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
      +#ifdef HAVE_TLS_ALPN
      +        alpn_note = apr_table_get(c->notes, "proxy-request-alpn-protos");
      +        if (alpn_note) {
      +            char *protos, *s, *p, *last;
      +            apr_size_t len;
      +
      +            s = protos = apr_pcalloc(c->pool, strlen(alpn_note)+1);
      +            p = apr_pstrdup(c->pool, alpn_note);
      +            while ((p = apr_strtok(p, ", ", &last))) {
      +                len = last - p - (*last? 1 : 0); 
      +                if (len > 255) {
      +                    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(03309)
      +                                  "ALPN proxy protocol identifier too long: %s",
      +                                  p);
      +                    ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, server);
      +                    return APR_EGENERAL;
      +                }
      +                *s++ = (unsigned char)len;
      +                while (len--) {
      +                    *s++ = *p++;
      +                }
      +                p = NULL;
      +            }
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, c, 
      +                          "setting alpn protos from '%s', protolen=%d", 
      +                          alpn_note, (int)(s - protos));
      +            if (protos != s && SSL_set_alpn_protos(filter_ctx->pssl, 
      +                                                   (unsigned char *)protos, 
      +                                                   s - protos)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c, APLOGNO(03310)
      +                              "error setting alpn protos from '%s'", alpn_note);
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_WARNING, server);
      +            }
      +        }
      +#endif /* defined HAVE_TLS_ALPN */
               /*
                * Enable SNI for backend requests. Make sure we don't do it for
      -         * pure SSLv2 or SSLv3 connections, and also prevent IP addresses
      +         * pure SSLv3 connections, and also prevent IP addresses
                * from being included in the SNI extension. (OpenSSL would simply
                * pass them on, but RFC 6066 is quite clear on this: "Literal
                * IPv4 and IPv6 addresses are not permitted".)
                */
               if (hostname_note &&
      -            sc->proxy->protocol != SSL_PROTOCOL_SSLV2 &&
      +#ifndef OPENSSL_NO_SSL3
                   sc->proxy->protocol != SSL_PROTOCOL_SSLV3 &&
      +#endif
                   apr_ipsubnet_create(&ip, hostname_note, NULL,
                                       c->pool) != APR_SUCCESS) {
                   if (SSL_set_tlsext_host_name(filter_ctx->pssl, hostname_note)) {
      @@ -1065,16 +1167,16 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                                     "SNI extension for SSL Proxy request set to '%s'",
                                     hostname_note);
                   } else {
      -                ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c, APLOGNO(02002)
                                     "Failed to set SNI extension for SSL Proxy "
                                     "request to '%s'", hostname_note);
                       ssl_log_ssl_error(SSLLOG_MARK, APLOG_WARNING, server);
                   }
      -	}
      +        }
       #endif
       
               if ((n = SSL_connect(filter_ctx->pssl)) <= 0) {
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02003)
                                 "SSL Proxy connect failed");
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, server);
                   /* ensure that the SSL structures etc are freed, etc: */
      @@ -1083,48 +1185,86 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                   return MODSSL_ERROR_BAD_GATEWAY;
               }
       
      +        cert = SSL_get_peer_certificate(filter_ctx->pssl);
      +
               if (sc->proxy_ssl_check_peer_expire != SSL_ENABLED_FALSE) {
      -            cert = SSL_get_peer_certificate(filter_ctx->pssl);
                   if (!cert
                       || (X509_cmp_current_time(
                            X509_get_notBefore(cert)) >= 0)
                       || (X509_cmp_current_time(
                            X509_get_notAfter(cert)) <= 0)) {
      -                ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +                proxy_ssl_check_peer_ok = FALSE;
      +                ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02004)
                                     "SSL Proxy: Peer certificate is expired");
      -                if (cert) {
      -                    X509_free(cert);
      -                }
      -                /* ensure that the SSL structures etc are freed, etc: */
      -                ssl_filter_io_shutdown(filter_ctx, c, 1);
      -                apr_table_setn(c->notes, "SSL_connect_rv", "err");
      -                return HTTP_BAD_GATEWAY;
                   }
      -            X509_free(cert);
               }
      -        if ((sc->proxy_ssl_check_peer_cn != SSL_ENABLED_FALSE) &&
      +        if ((sc->proxy_ssl_check_peer_name != SSL_ENABLED_FALSE) &&
      +            ((sc->proxy_ssl_check_peer_cn != SSL_ENABLED_FALSE) ||
      +             (sc->proxy_ssl_check_peer_name == SSL_ENABLED_TRUE)) &&
      +            hostname_note) {
      +            apr_table_unset(c->notes, "proxy-request-hostname");
      +            if (!cert
      +                || modssl_X509_match_name(c->pool, cert, hostname_note,
      +                                          TRUE, server) == FALSE) {
      +                proxy_ssl_check_peer_ok = FALSE;
      +                ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02411)
      +                              "SSL Proxy: Peer certificate does not match "
      +                              "for hostname %s", hostname_note);
      +            }
      +        }
      +        else if ((sc->proxy_ssl_check_peer_cn == SSL_ENABLED_TRUE) &&
                   hostname_note) {
                   const char *hostname;
      +            int match = 0;
       
                   hostname = ssl_var_lookup(NULL, server, c, NULL,
                                             "SSL_CLIENT_S_DN_CN");
                   apr_table_unset(c->notes, "proxy-request-hostname");
      -            if (strcasecmp(hostname, hostname_note)) {
      -                ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +
      +            /* Do string match or simplest wildcard match if that
      +             * fails. */
      +            match = strcasecmp(hostname, hostname_note) == 0;
      +            if (!match && strncmp(hostname, "*.", 2) == 0) {
      +                const char *p = ap_strchr_c(hostname_note, '.');
      +                
      +                match = p && strcasecmp(p, hostname + 1) == 0;
      +            }
      +
      +            if (!match) {
      +                proxy_ssl_check_peer_ok = FALSE;
      +                ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02005)
                                     "SSL Proxy: Peer certificate CN mismatch:"
                                     " Certificate CN: %s Requested hostname: %s",
                                     hostname, hostname_note);
      -                /* ensure that the SSL structures etc are freed, etc: */
      -                ssl_filter_io_shutdown(filter_ctx, c, 1);
      -                apr_table_setn(c->notes, "SSL_connect_rv", "err");
      -                return HTTP_BAD_GATEWAY;
                   }
               }
       
      +        if (proxy_ssl_check_peer_ok == TRUE) {
      +            /* another chance to fail */
      +            post_handshake_rc = ssl_run_proxy_post_handshake(c, filter_ctx->pssl);
      +        }
      +
      +        if (cert) {
      +            X509_free(cert);
      +        }
      +
      +        if (proxy_ssl_check_peer_ok != TRUE
      +            || (post_handshake_rc != OK && post_handshake_rc != DECLINED)) {
      +            /* ensure that the SSL structures etc are freed, etc: */
      +            ssl_filter_io_shutdown(filter_ctx, c, 1);
      +            apr_table_setn(c->notes, "SSL_connect_rv", "err");
      +            return HTTP_BAD_GATEWAY;
      +        }
      +
               apr_table_setn(c->notes, "SSL_connect_rv", "ok");
               return APR_SUCCESS;
           }
       
      +    /* We rely on SSL_get_error() after the accept, which requires an empty
      +     * error queue before the accept in order to work properly.
      +     */
      +    ERR_clear_error();
      +
           if ((n = SSL_accept(filter_ctx->pssl)) <= 0) {
               bio_filter_in_ctx_t *inctx = (bio_filter_in_ctx_t *)
                                            (filter_ctx->pbioRead->ptr);
      @@ -1139,7 +1279,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                    * was transferred. That's not a real error and can occur
                    * sporadically with some clients.
                    */
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, rc, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, rc, c, APLOGNO(02006)
                                "SSL handshake stopped: connection was closed");
               }
               else if (ssl_err == SSL_ERROR_WANT_READ) {
      @@ -1162,7 +1302,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                   return MODSSL_ERROR_HTTP_ON_HTTPS;
               }
               else if (ssl_err == SSL_ERROR_SYSCALL) {
      -            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rc, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rc, c, APLOGNO(02007)
                                 "SSL handshake interrupted by system "
                                 "[Hint: Stop button pressed in browser?!]");
               }
      @@ -1170,7 +1310,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                   /*
                    * Log SSL errors and any unexpected conditions.
                    */
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, rc, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, rc, c, APLOGNO(02008)
                                 "SSL library error %d in handshake "
                                 "(server %s)", ssl_err,
                                 ssl_util_vhostid(c->pool, server));
      @@ -1205,7 +1345,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                    * optional_no_ca doesn't appear to work as advertised
                    * in 1.x
                    */
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02009)
                                 "SSL client authentication failed, "
                                 "accepting certificate based on "
                                 "\"SSLVerifyClient optional_no_ca\" "
      @@ -1217,7 +1357,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
                       sslconn->verify_error :
                       X509_verify_cert_error_string(verify_result);
       
      -            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02010)
                                "SSL client authentication failed: %s",
                                error ? error : "unknown");
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_INFO, server);
      @@ -1245,7 +1385,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx)
           if ((sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE) &&
               !sslconn->client_cert)
           {
      -        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, c, APLOGNO(02011)
                             "No acceptable peer certificate available");
       
               ssl_filter_io_shutdown(filter_ctx, c, 1);
      @@ -1266,18 +1406,36 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
           const char *start = inctx->buffer; /* start of block to return */
           apr_size_t len = sizeof(inctx->buffer); /* length of block to return */
           int is_init = (mode == AP_MODE_INIT);
      +    apr_bucket *bucket;
       
           if (f->c->aborted) {
               /* XXX: Ok, if we aborted, we ARE at the EOS.  We also have
                * aborted.  This 'double protection' is probably redundant,
                * but also effective against just about anything.
                */
      -        apr_bucket *bucket = apr_bucket_eos_create(f->c->bucket_alloc);
      +        bucket = apr_bucket_eos_create(f->c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(bb, bucket);
               return APR_ECONNABORTED;
           }
       
           if (!inctx->ssl) {
      +        SSLConnRec *sslconn = myConnConfig(f->c);
      +        if (sslconn->non_ssl_request == NON_SSL_SEND_REQLINE) {
      +            bucket = HTTP_ON_HTTPS_PORT_BUCKET(f->c->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(bb, bucket);
      +            if (mode != AP_MODE_SPECULATIVE) {
      +                sslconn->non_ssl_request = NON_SSL_SEND_HDR_SEP;
      +            }
      +            return APR_SUCCESS;
      +        }
      +        if (sslconn->non_ssl_request == NON_SSL_SEND_HDR_SEP) {
      +            bucket = apr_bucket_immortal_create(CRLF, 2, f->c->bucket_alloc);
      +            APR_BRIGADE_INSERT_TAIL(bb, bucket);
      +            if (mode != AP_MODE_SPECULATIVE) {
      +                sslconn->non_ssl_request = NON_SSL_SET_ERROR_MSG;
      +            }
      +            return APR_SUCCESS;
      +        }
               return ap_get_brigade(f->next, bb, mode, block, readbytes);
           }
       
      @@ -1296,7 +1454,7 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
            * rather than have SSLEngine On configured.
            */
           if ((status = ssl_io_filter_handshake(inctx->filter_ctx)) != APR_SUCCESS) {
      -        return ssl_io_filter_error(f, bb, status);
      +        return ssl_io_filter_error(f, bb, status, is_init);
           }
       
           if (is_init) {
      @@ -1350,12 +1508,12 @@ static apr_status_t ssl_io_filter_input(ap_filter_t *f,
       
           /* Handle custom errors. */
           if (status != APR_SUCCESS) {
      -        return ssl_io_filter_error(f, bb, status);
      +        return ssl_io_filter_error(f, bb, status, 0);
           }
       
           /* Create a transient bucket out of the decrypted data. */
           if (len > 0) {
      -        apr_bucket *bucket =
      +        bucket =
                   apr_bucket_transient_create(start, len, f->c->bucket_alloc);
               APR_BRIGADE_INSERT_TAIL(bb, bucket);
           }
      @@ -1385,7 +1543,7 @@ struct coalesce_ctx {
       static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                                                  apr_bucket_brigade *bb)
       {
      -    apr_bucket *e, *last = NULL;
      +    apr_bucket *e, *upto;
           apr_size_t bytes = 0;
           struct coalesce_ctx *ctx = f->ctx;
           unsigned count = 0;
      @@ -1412,19 +1570,20 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                    && (ctx == NULL
                        || bytes + ctx->bytes + e->length < COALESCE_BYTES);
                e = APR_BUCKET_NEXT(e)) {
      -        last = e;
               if (e->length) count++; /* don't count zero-length buckets */
               bytes += e->length;
           }
      +    upto = e;
       
           /* Coalesce the prefix, if:
            * a) more than one bucket is found to coalesce, or
            * b) the brigade contains only a single data bucket, or
      -     * c)
      +     * c) the data bucket is not last but we have buffered data already.
            */
           if (bytes > 0
               && (count > 1
      -            || (count == 1 && APR_BUCKET_NEXT(last) == APR_BRIGADE_SENTINEL(bb)))) {
      +            || (upto == APR_BRIGADE_SENTINEL(bb))
      +            || (ctx && ctx->bytes > 0))) {
               /* If coalescing some bytes, ensure a context has been
                * created. */
               if (!ctx) {
      @@ -1441,14 +1600,14 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                * normal path of sending the buffer + remaining buckets in
                * brigade.  */
               e = APR_BRIGADE_FIRST(bb);
      -        while (e != last) {
      +        while (e != upto) {
                   apr_size_t len;
                   const char *data;
                   apr_bucket *next;
       
                   if (APR_BUCKET_IS_METADATA(e)
                       || e->length == (apr_size_t)-1) {
      -                ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
      +                ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, APLOGNO(02012)
                                     "unexpected bucket type during coalesce");
                       break; /* non-fatal error; break out */
                   }
      @@ -1461,7 +1620,7 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                        * non-block/flush/block.  */
                       rv = apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
                       if (rv) {
      -                    ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c,
      +                    ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c, APLOGNO(02013)
                                         "coalesce failed to read from data bucket");
                           return AP_FILTER_ERROR;
                       }
      @@ -1469,7 +1628,7 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
                       /* Be paranoid. */
                       if (len > sizeof ctx->buffer
                           || (len + ctx->bytes > sizeof ctx->buffer)) {
      -                    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c,
      +                    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, f->c, APLOGNO(02014)
                                         "unexpected coalesced bucket data length");
                           break; /* non-fatal error; break out */
                       }
      @@ -1493,8 +1652,6 @@ static apr_status_t ssl_io_filter_coalesce(ap_filter_t *f,
            * the filter stack, first prepending anything that has been
            * coalesced. */
           if (ctx && ctx->bytes) {
      -        apr_bucket *e;
      -
               ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, f->c,
                             "coalesce: passing on %" APR_SIZE_T_FMT " bytes", ctx->bytes);
       
      @@ -1536,52 +1693,33 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
           inctx->block = APR_BLOCK_READ;
       
           if ((status = ssl_io_filter_handshake(filter_ctx)) != APR_SUCCESS) {
      -        return ssl_io_filter_error(f, bb, status);
      +        return ssl_io_filter_error(f, bb, status, 0);
           }
       
      -    while (!APR_BRIGADE_EMPTY(bb)) {
      +    while (!APR_BRIGADE_EMPTY(bb) && status == APR_SUCCESS) {
               apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
       
      -        /* If it is a flush or EOS, we need to pass this down.
      -         * These types do not require translation by OpenSSL.
      -         */
      -        if (APR_BUCKET_IS_EOS(bucket) || APR_BUCKET_IS_FLUSH(bucket)) {
      -            if (bio_filter_out_flush(filter_ctx->pbioWrite) < 0) {
      -                status = outctx->rc;
      -                break;
      -            }
      -
      -            if (APR_BUCKET_IS_EOS(bucket)) {
      -                /*
      -                 * By definition, nothing can come after EOS.
      -                 * which also means we can pass the rest of this brigade
      -                 * without creating a new one since it only contains the
      -                 * EOS bucket.
      -                 */
      -
      -                if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
      -                    return status;
      -                }
      -                break;
      -            }
      -            else {
      -                /* bio_filter_out_flush() already passed down a flush bucket
      -                 * if there was any data to be flushed.
      -                 */
      -                apr_bucket_delete(bucket);
      +        if (APR_BUCKET_IS_METADATA(bucket)) {
      +            /* Pass through metadata buckets untouched.  EOC is
      +             * special; terminate the SSL layer first. */
      +            if (AP_BUCKET_IS_EOC(bucket)) {
      +                ssl_filter_io_shutdown(filter_ctx, f->c, 0);
                   }
      -        }
      -        else if (AP_BUCKET_IS_EOC(bucket)) {
      -            /* The EOC bucket indicates connection closure, so SSL
      -             * shutdown must now be performed.  */
      -            ssl_filter_io_shutdown(filter_ctx, f->c, 0);
      -            if ((status = ap_pass_brigade(f->next, bb)) != APR_SUCCESS) {
      -                return status;
      -            }
      -            break;
      +            AP_DEBUG_ASSERT(APR_BRIGADE_EMPTY(outctx->bb));
      +
      +            /* Metadata buckets are passed one per brigade; it might
      +             * be more efficient (but also more complex) to use
      +             * outctx->bb as a true buffer and interleave these with
      +             * data buckets. */
      +            APR_BUCKET_REMOVE(bucket);
      +            APR_BRIGADE_INSERT_HEAD(outctx->bb, bucket);
      +            status = ap_pass_brigade(f->next, outctx->bb);
      +            if (status == APR_SUCCESS && f->c->aborted)
      +                status = APR_ECONNRESET;
      +            apr_brigade_cleanup(outctx->bb);
               }
               else {
      -            /* filter output */
      +            /* Filter a data bucket. */
                   const char *data;
                   apr_size_t len;
       
      @@ -1594,7 +1732,9 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
                           break;
                       }
                       rblock = APR_BLOCK_READ;
      -                continue; /* and try again with a blocking read. */
      +                /* and try again with a blocking read. */
      +                status = APR_SUCCESS;
      +                continue;
                   }
       
                   rblock = APR_NONBLOCK_READ;
      @@ -1605,11 +1745,8 @@ static apr_status_t ssl_io_filter_output(ap_filter_t *f,
       
                   status = ssl_filter_write(f, data, len);
                   apr_bucket_delete(bucket);
      -
      -            if (status != APR_SUCCESS) {
      -                break;
      -            }
               }
      +
           }
       
           return status;
      @@ -1651,9 +1788,9 @@ int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
               rv = ap_get_brigade(r->proto_input_filters, tempb, AP_MODE_READBYTES,
                                   APR_BLOCK_READ, 8192);
               if (rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02015)
                                 "could not read request body for SSL buffer");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return ap_map_http_request_error(rv, HTTP_INTERNAL_SERVER_ERROR);
               }
       
               /* Iterate through the returned brigade: setaside each bucket
      @@ -1670,7 +1807,7 @@ int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
                   } else if (!APR_BUCKET_IS_METADATA(e)) {
                       rv = apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
                       if (rv != APR_SUCCESS) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02016)
                                         "could not read bucket for SSL buffer");
                           return HTTP_INTERNAL_SERVER_ERROR;
                       }
      @@ -1679,7 +1816,7 @@ int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
       
                   rv = apr_bucket_setaside(e, r->pool);
                   if (rv != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02017)
                                     "could not setaside bucket for SSL buffer");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -1694,7 +1831,7 @@ int ssl_io_buffer_fill(request_rec *r, apr_size_t maxlen)
       
               /* Fail if this exceeds the maximum buffer size. */
               if (total > maxlen) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02018)
                                 "request body exceeds maximum size (%" APR_SIZE_T_FMT
                                 ") for SSL buffer", maxlen);
                   return HTTP_REQUEST_ENTITY_TOO_LARGE;
      @@ -1731,6 +1868,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
       {
           struct modssl_buffer_ctx *ctx = f->ctx;
           apr_status_t rv;
      +    apr_bucket *e, *d;
       
           ap_log_cerror(APLOG_MARK, APLOG_TRACE4, 0, f->c,
                         "read from buffered SSL brigade, mode %d, "
      @@ -1755,12 +1893,10 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
           }
       
           if (mode == AP_MODE_READBYTES) {
      -        apr_bucket *e;
      -
               /* Partition the buffered brigade. */
               rv = apr_brigade_partition(ctx->bb, bytes, &e);
               if (rv && rv != APR_INCOMPLETE) {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c, APLOGNO(02019)
                                 "could not partition buffered SSL brigade");
                   ap_remove_input_filter(f);
                   return rv;
      @@ -1771,7 +1907,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
               if (rv == APR_INCOMPLETE) {
                   APR_BRIGADE_CONCAT(bb, ctx->bb);
               } else {
      -            apr_bucket *d = APR_BRIGADE_FIRST(ctx->bb);
      +            d = APR_BRIGADE_FIRST(ctx->bb);
       
                   e = APR_BUCKET_PREV(e);
       
      @@ -1790,7 +1926,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
               rv = apr_brigade_split_line(bb, ctx->bb, block, bytes);
       
               if (rv) {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, f->c, APLOGNO(02020)
                                 "could not split line from buffered SSL brigade");
                   ap_remove_input_filter(f);
                   return rv;
      @@ -1798,7 +1934,7 @@ static apr_status_t ssl_io_filter_buffer(ap_filter_t *f,
           }
       
           if (APR_BRIGADE_EMPTY(ctx->bb)) {
      -        apr_bucket *e = APR_BRIGADE_LAST(bb);
      +        e = APR_BRIGADE_LAST(bb);
       
               /* Ensure that the brigade is terminated by an EOS if the
                * buffered request body has been entirely consumed. */
      @@ -1862,8 +1998,10 @@ void ssl_io_filter_init(conn_rec *c, request_rec *r, SSL *ssl)
           filter_ctx->pbioWrite       = BIO_new(&bio_filter_out_method);
           filter_ctx->pbioWrite->ptr  = (void *)bio_filter_out_ctx_new(filter_ctx, c);
       
      -    /* We insert a clogging input filter. Let the core know. */
      -    c->clogging_input_filters = 1;
      +    /* write is non blocking for the benefit of async mpm */
      +    if (c->cs) {
      +        BIO_set_nbio(filter_ctx->pbioWrite, 1);
      +    }
       
           ssl_io_input_add_filter(filter_ctx, c, r, ssl);
       
      @@ -1874,8 +2012,14 @@ void ssl_io_filter_init(conn_rec *c, request_rec *r, SSL *ssl)
                                     ssl_io_filter_cleanup, apr_pool_cleanup_null);
       
           if (APLOG_CS_IS_LEVEL(c, mySrvFromConn(c), APLOG_TRACE4)) {
      -        BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
      -        BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl);
      +        BIO *rbio = SSL_get_rbio(ssl),
      +            *wbio = SSL_get_wbio(ssl);
      +        BIO_set_callback(rbio, ssl_io_data_cb);
      +        BIO_set_callback_arg(rbio, (void *)ssl);
      +        if (wbio && wbio != rbio) {
      +            BIO_set_callback(wbio, ssl_io_data_cb);
      +            BIO_set_callback_arg(wbio, (void *)ssl);
      +        }
           }
       
           return;
      @@ -1900,8 +2044,8 @@ void ssl_io_filter_register(apr_pool_t *p)
       
       #define DUMP_WIDTH 16
       
      -static void ssl_io_data_dump(server_rec *srvr,
      -                             const char *s,
      +static void ssl_io_data_dump(server_rec *s,
      +                             const char *b,
                                    long len)
       {
           char buf[256];
      @@ -1910,12 +2054,12 @@ static void ssl_io_data_dump(server_rec *srvr,
           unsigned char ch;
       
           trunc = 0;
      -    for(; (len > 0) && ((s[len-1] == ' ') || (s[len-1] == '\0')); len--)
      +    for(; (len > 0) && ((b[len-1] == ' ') || (b[len-1] == '\0')); len--)
               trunc++;
           rows = (len / DUMP_WIDTH);
           if ((rows * DUMP_WIDTH) < len)
               rows++;
      -    ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, srvr,
      +    ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, s,
                   "+-------------------------------------------------------------------------+");
           for(i = 0 ; i< rows; i++) {
       #if APR_CHARSET_EBCDIC
      @@ -1925,7 +2069,7 @@ static void ssl_io_data_dump(server_rec *srvr,
                   j = len % DUMP_WIDTH;
               if (j == 0)
                   j = DUMP_WIDTH;
      -        memcpy(ebcdic_text,(char *)(s) + i * DUMP_WIDTH, j);
      +        memcpy(ebcdic_text,(char *)(b) + i * DUMP_WIDTH, j);
               ap_xlate_proto_from_ascii(ebcdic_text, j);
       #endif /* APR_CHARSET_EBCDIC */
               apr_snprintf(tmp, sizeof(tmp), "| %04x: ", i * DUMP_WIDTH);
      @@ -1934,7 +2078,7 @@ static void ssl_io_data_dump(server_rec *srvr,
                   if (((i * DUMP_WIDTH) + j) >= len)
                       apr_cpystrn(buf+strlen(buf), "   ", sizeof(buf)-strlen(buf));
                   else {
      -                ch = ((unsigned char)*((char *)(s) + i * DUMP_WIDTH + j)) & 0xff;
      +                ch = ((unsigned char)*((char *)(b) + i * DUMP_WIDTH + j)) & 0xff;
                       apr_snprintf(tmp, sizeof(tmp), "%02x%c", ch , j==7 ? '-' : ' ');
                       apr_cpystrn(buf+strlen(buf), tmp, sizeof(buf)-strlen(buf));
                   }
      @@ -1944,7 +2088,7 @@ static void ssl_io_data_dump(server_rec *srvr,
                   if (((i * DUMP_WIDTH) + j) >= len)
                       apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
                   else {
      -                ch = ((unsigned char)*((char *)(s) + i * DUMP_WIDTH + j)) & 0xff;
      +                ch = ((unsigned char)*((char *)(b) + i * DUMP_WIDTH + j)) & 0xff;
       #if APR_CHARSET_EBCDIC
                       apr_snprintf(tmp, sizeof(tmp), "%c", (ch >= 0x20 && ch <= 0x7F) ? ebcdic_text[j] : '.');
       #else /* APR_CHARSET_EBCDIC */
      @@ -1954,13 +2098,12 @@ static void ssl_io_data_dump(server_rec *srvr,
                   }
               }
               apr_cpystrn(buf+strlen(buf), " |", sizeof(buf)-strlen(buf));
      -        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, srvr,
      -                     "%s", buf);
      +        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, s, "%s", buf);
           }
           if (trunc > 0)
      -        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, srvr,
      +        ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, s,
                       "| %04ld - <SPACES/NULS>", len + trunc);
      -    ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, srvr,
      +    ap_log_error(APLOG_MARK, APLOG_TRACE7, 0, s,
                   "+-------------------------------------------------------------------------+");
           return;
       }
      @@ -1984,7 +2127,7 @@ long ssl_io_data_cb(BIO *bio, int cmd,
               if (rc >= 0) {
                   ap_log_cserror(APLOG_MARK, APLOG_TRACE4, 0, c, s,
                           "%s: %s %ld/%d bytes %s BIO#%pp [mem: %pp] %s",
      -                    SSL_LIBRARY_NAME,
      +                    MODSSL_LIBRARY_NAME,
                           (cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "write" : "read"),
                           rc, argi, (cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "to" : "from"),
                           bio, argp,
      @@ -1995,7 +2138,7 @@ long ssl_io_data_cb(BIO *bio, int cmd,
               else {
                   ap_log_cserror(APLOG_MARK, APLOG_TRACE4, 0, c, s,
                           "%s: I/O error, %d bytes expected to %s on BIO#%pp [mem: %pp]",
      -                    SSL_LIBRARY_NAME, argi,
      +                    MODSSL_LIBRARY_NAME, argi,
                           (cmd == (BIO_CB_WRITE|BIO_CB_RETURN) ? "write" : "read"),
                           bio, argp);
               }
      diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c
      index c75478009ba..d4459a2f265 100644
      --- a/modules/ssl/ssl_engine_kernel.c
      +++ b/modules/ssl/ssl_engine_kernel.c
      @@ -29,9 +29,12 @@
                                         time I was too famous.''
                                                   -- Unknown                */
       #include "ssl_private.h"
      +#include "mod_ssl.h"
      +#include "util_md5.h"
      +#include "scoreboard.h"
       
       static void ssl_configure_env(request_rec *r, SSLConnRec *sslconn);
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
       static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s);
       #endif
       
      @@ -48,13 +51,13 @@ static apr_status_t upgrade_connection(request_rec *r)
           apr_status_t rv;
           SSL *ssl;
       
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02028)
                         "upgrading connection to TLS");
       
           bb = apr_brigade_create(r->pool, conn->bucket_alloc);
       
      -    rv = ap_fputstrs(conn->output_filters, bb, SWITCH_STATUS_LINE, CRLF,
      -                     UPGRADE_HEADER, CRLF, CONNECTION_HEADER, CRLF, CRLF, NULL);
      +    rv = ap_fputs(conn->output_filters, bb, SWITCH_STATUS_LINE CRLF
      +                  UPGRADE_HEADER CRLF CONNECTION_HEADER CRLF CRLF);
           if (rv == APR_SUCCESS) {
               APR_BRIGADE_INSERT_TAIL(bb,
                                       apr_bucket_flush_create(conn->bucket_alloc));
      @@ -62,7 +65,7 @@ static apr_status_t upgrade_connection(request_rec *r)
           }
       
           if (rv) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02029)
                             "failed to send 101 interim response for connection "
                             "upgrade");
               return rv;
      @@ -78,8 +81,9 @@ static apr_status_t upgrade_connection(request_rec *r)
           SSL_do_handshake(ssl);
       
           if (SSL_get_state(ssl) != SSL_ST_OK) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                      "TLS upgrade handshake failed: not accepted by client!?");
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02030)
      +                      "TLS upgrade handshake failed");
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
       
               return APR_ECONNABORTED;
           }
      @@ -110,6 +114,108 @@ static int has_buffered_data(request_rec *r)
           return result;
       }
       
      +static int ap_array_same_str_set(apr_array_header_t *s1, apr_array_header_t *s2)
      +{
      +    int i;
      +    const char *c;
      +    
      +    if (s1 == s2) {
      +        return 1;
      +    }
      +    else if (!s1 || !s2 || (s1->nelts != s2->nelts)) {
      +        return 0;
      +    }
      +    
      +    for (i = 0; i < s1->nelts; i++) {
      +        c = APR_ARRAY_IDX(s1, i, const char *);
      +        if (!c || !ap_array_str_contains(s2, c)) {
      +            return 0;
      +        }
      +    }
      +    return 1;
      +}
      +
      +static int ssl_pk_server_compatible(modssl_pk_server_t *pks1, 
      +                                    modssl_pk_server_t *pks2) 
      +{
      +    if (!pks1 || !pks2) {
      +        return 0;
      +    }
      +    /* both have the same certificates? */
      +    if ((pks1->ca_name_path != pks2->ca_name_path)
      +        && (!pks1->ca_name_path || !pks2->ca_name_path 
      +            || strcmp(pks1->ca_name_path, pks2->ca_name_path))) {
      +        return 0;
      +    }
      +    if ((pks1->ca_name_file != pks2->ca_name_file)
      +        && (!pks1->ca_name_file || !pks2->ca_name_file 
      +            || strcmp(pks1->ca_name_file, pks2->ca_name_file))) {
      +        return 0;
      +    }
      +    if (!ap_array_same_str_set(pks1->cert_files, pks2->cert_files)
      +        || !ap_array_same_str_set(pks1->key_files, pks2->key_files)) {
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +static int ssl_auth_compatible(modssl_auth_ctx_t *a1, 
      +                               modssl_auth_ctx_t *a2) 
      +{
      +    if (!a1 || !a2) {
      +        return 0;
      +    }
      +    /* both have the same verification */
      +    if ((a1->verify_depth != a2->verify_depth)
      +        || (a1->verify_mode != a2->verify_mode)) {
      +        return 0;
      +    }
      +    /* both have the same ca path/file */
      +    if ((a1->ca_cert_path != a2->ca_cert_path)
      +        && (!a1->ca_cert_path || !a2->ca_cert_path 
      +            || strcmp(a1->ca_cert_path, a2->ca_cert_path))) {
      +        return 0;
      +    }
      +    if ((a1->ca_cert_file != a2->ca_cert_file)
      +        && (!a1->ca_cert_file || !a2->ca_cert_file 
      +            || strcmp(a1->ca_cert_file, a2->ca_cert_file))) {
      +        return 0;
      +    }
      +    /* both have the same ca cipher suite string */
      +    if ((a1->cipher_suite != a2->cipher_suite)
      +        && (!a1->cipher_suite || !a2->cipher_suite 
      +            || strcmp(a1->cipher_suite, a2->cipher_suite))) {
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +static int ssl_ctx_compatible(modssl_ctx_t *ctx1, 
      +                              modssl_ctx_t *ctx2) 
      +{
      +    if (!ctx1 || !ctx2 
      +        || (ctx1->protocol != ctx2->protocol)
      +        || !ssl_auth_compatible(&ctx1->auth, &ctx2->auth)
      +        || !ssl_pk_server_compatible(ctx1->pks, ctx2->pks)) {
      +        return 0;
      +    }
      +    return 1;
      +}
      +
      +static int ssl_server_compatible(server_rec *s1, server_rec *s2)
      +{
      +    SSLSrvConfigRec *sc1 = s1? mySrvConfig(s1) : NULL;
      +    SSLSrvConfigRec *sc2 = s2? mySrvConfig(s2) : NULL;
      +
      +    /* both use the same TLS protocol? */
      +    if (!sc1 || !sc2 
      +        || !ssl_ctx_compatible(sc1->server, sc2->server)) {
      +        return 0;
      +    }
      +    
      +    return 1;
      +}
      +
       /*
        *  Post Read Request Handler
        */
      @@ -118,7 +224,7 @@ int ssl_hook_ReadReq(request_rec *r)
           SSLSrvConfigRec *sc = mySrvConfig(r->server);
           SSLConnRec *sslconn;
           const char *upgrade;
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
           const char *servername;
       #endif
           SSL *ssl;
      @@ -130,46 +236,42 @@ int ssl_hook_ReadReq(request_rec *r)
               && (upgrade = apr_table_get(r->headers_in, "Upgrade")) != NULL
               && ap_find_token(r->pool, upgrade, "TLS/1.0")) {
               if (upgrade_connection(r)) {
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return AP_FILTER_ERROR;
               }
           }
       
      +    /* If we are on a slave connection, we do not expect to have an SSLConnRec,
      +     * but our master connection might. */
           sslconn = myConnConfig(r->connection);
      +    if (!(sslconn && sslconn->ssl) && r->connection->master) {
      +        sslconn = myConnConfig(r->connection->master);
      +    }
      +    
      +    /* If "SSLEngine optional" is configured, this is not an SSL
      +     * connection, and this isn't a subrequest, send an Upgrade
      +     * response header.  Note this must happen before map_to_storage
      +     * and OPTIONS * request processing is completed.
      +     */
      +    if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl)
      +        && !r->main) {
      +        apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
      +        apr_table_mergen(r->headers_out, "Connection", "upgrade");
      +    }
      +
           if (!sslconn) {
               return DECLINED;
           }
       
      -    if (sslconn->non_ssl_request) {
      -        const char *errmsg;
      -        char *thisurl;
      -        char *thisport = "";
      -        int port = ap_get_server_port(r);
      -
      -        if (!ap_is_default_port(port, r)) {
      -            thisport = apr_psprintf(r->pool, ":%u", port);
      -        }
      -
      -        thisurl = ap_escape_html(r->pool,
      -                                 apr_psprintf(r->pool, "https://%s%s/",
      -                                              ap_get_server_name_for_url(r),
      -                                              thisport));
      -
      -        errmsg = apr_psprintf(r->pool,
      -                              "Reason: You're speaking plain HTTP "
      -                              "to an SSL-enabled server port.<br />\n"
      -                              "Instead use the HTTPS scheme to access "
      -                              "this URL, please.<br />\n"
      -                              "<blockquote>Hint: "
      -                              "<a href=\"%s\"><b>%s</b></a></blockquote>",
      -                              thisurl, thisurl);
      -
      -        apr_table_setn(r->notes, "error-notes", errmsg);
      +    if (sslconn->non_ssl_request == NON_SSL_SET_ERROR_MSG) {
      +        apr_table_setn(r->notes, "error-notes",
      +                       "Reason: You're speaking plain HTTP to an SSL-enabled "
      +                       "server port.<br />\n Instead use the HTTPS scheme to "
      +                       "access this URL, please.<br />\n");
       
               /* Now that we have caught this error, forget it. we are done
                * with using SSL on this request.
                */
      -        sslconn->non_ssl_request = 0;
      -
      +        sslconn->non_ssl_request = NON_SSL_OK;
       
               return HTTP_BAD_REQUEST;
           }
      @@ -182,57 +284,79 @@ int ssl_hook_ReadReq(request_rec *r)
           if (!ssl) {
               return DECLINED;
           }
      -#ifndef OPENSSL_NO_TLSEXT
      -    if ((servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name))) {
      -        char *host, *scope_id;
      -        apr_port_t port;
      -        apr_status_t rv;
      -
      -        /*
      -         * The SNI extension supplied a hostname. So don't accept requests
      -         * with either no hostname or a different hostname.
      -         */
      -        if (!r->hostname) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                        "Hostname %s provided via SNI, but no hostname"
      -                        " provided in HTTP request", servername);
      -            return HTTP_BAD_REQUEST;
      -        }
      -        rv = apr_parse_addr_port(&host, &scope_id, &port, r->hostname, r->pool);
      -        if (rv != APR_SUCCESS || scope_id) {
      -            return HTTP_BAD_REQUEST;
      +#ifdef HAVE_TLSEXT
      +    /*
      +     * Perform SNI checks only on the initial request.  In particular,
      +     * if these checks detect a problem, the checks shouldn't return an
      +     * error again when processing an ErrorDocument redirect for the
      +     * original problem.
      +     */
      +    if (r->proxyreq != PROXYREQ_PROXY && ap_is_initial_req(r)) {
      +        server_rec *handshakeserver = sslconn->server;
      +        SSLSrvConfigRec *hssc = mySrvConfig(handshakeserver);
      +
      +        if ((servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name))) {
      +            /*
      +             * The SNI extension supplied a hostname. So don't accept requests
      +             * with either no hostname or a hostname that selected a different
      +             * virtual host than the one used for the handshake, causing
      +             * different SSL parameters to be applied, such as SSLProtocol,
      +             * SSLCACertificateFile/Path and SSLCADNRequestFile/Path which
      +             * cannot be renegotiated (SSLCA* due to current limitations in
      +             * OpenSSL, see:
      +             * http://mail-archives.apache.org/mod_mbox/httpd-dev/200806.mbox/%3C48592955.2090303@velox.ch%3E
      +             * and
      +             * http://mail-archives.apache.org/mod_mbox/httpd-dev/201312.mbox/%3CCAKQ1sVNpOrdiBm-UPw1hEdSN7YQXRRjeaT-MCWbW_7mN%3DuFiOw%40mail.gmail.com%3E
      +             * )
      +             */
      +            if (!r->hostname) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02031)
      +                            "Hostname %s provided via SNI, but no hostname"
      +                            " provided in HTTP request", servername);
      +                return HTTP_BAD_REQUEST;
      +            }
      +            if (r->server != handshakeserver 
      +                && !ssl_server_compatible(sslconn->server, r->server)) {
      +                /* 
      +                 * The request does not select the virtual host that was
      +                 * selected by the SNI and its SSL parameters are different
      +                 */
      +                
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02032)
      +                             "Hostname %s provided via SNI and hostname %s provided"
      +                             " via HTTP have no compatible SSL setup",
      +                             servername, r->hostname);
      +                return HTTP_MISDIRECTED_REQUEST;
      +            }
               }
      -        if (strcasecmp(host, servername)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                        "Hostname %s provided via SNI and hostname %s provided"
      -                        " via HTTP are different", servername, host);
      -            return HTTP_BAD_REQUEST;
      +        else if (((sc->strict_sni_vhost_check == SSL_ENABLED_TRUE)
      +                  || hssc->strict_sni_vhost_check == SSL_ENABLED_TRUE)
      +                 && r->connection->vhost_lookup_data) {
      +            /*
      +             * We are using a name based configuration here, but no hostname was
      +             * provided via SNI. Don't allow that if are requested to do strict
      +             * checking. Check whether this strict checking was set up either in the
      +             * server config we used for handshaking or in our current server.
      +             * This should avoid insecure configuration by accident.
      +             */
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02033)
      +                         "No hostname was provided via SNI for a name based"
      +                         " virtual host");
      +            apr_table_setn(r->notes, "error-notes",
      +                           "Reason: The client software did not provide a "
      +                           "hostname using Server Name Indication (SNI), "
      +                           "which is required to access this server.<br />\n");
      +            return HTTP_FORBIDDEN;
               }
           }
      -    else if (((sc->strict_sni_vhost_check == SSL_ENABLED_TRUE)
      -             || (mySrvConfig(sslconn->server))->strict_sni_vhost_check
      -                == SSL_ENABLED_TRUE)
      -             && r->connection->vhost_lookup_data) {
      -        /*
      -         * We are using a name based configuration here, but no hostname was
      -         * provided via SNI. Don't allow that if are requested to do strict
      -         * checking. Check wether this strict checking was setup either in the
      -         * server config we used for handshaking or in our current server.
      -         * This should avoid insecure configuration by accident.
      -         */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
      -                     "No hostname was provided via SNI for a name based"
      -                     " virtual host");
      -        return HTTP_FORBIDDEN;
      -    }
       #endif
      -    SSL_set_app_data2(ssl, r);
      +    modssl_set_app_data2(ssl, r);
       
           /*
            * Log information about incoming HTTPS requests
            */
           if (APLOGrinfo(r) && ap_is_initial_req(r)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02034)
                            "%s HTTPS request received for child %ld (server %s)",
                            (r->connection->keepalives <= 0 ?
                            "Initial (No.1)" :
      @@ -299,6 +423,7 @@ int ssl_hook_Access(request_rec *r)
           SSLConnRec *sslconn         = myConnConfig(r->connection);
           SSL *ssl                    = sslconn ? sslconn->ssl : NULL;
           server_rec *handshakeserver = sslconn ? sslconn->server : NULL;
      +    SSLSrvConfigRec *hssc       = handshakeserver? mySrvConfig(handshakeserver) : NULL;
           SSL_CTX *ctx = NULL;
           apr_array_header_t *requires;
           ssl_require_t *ssl_requires;
      @@ -310,9 +435,30 @@ int ssl_hook_Access(request_rec *r)
           X509_STORE_CTX cert_store_ctx;
           STACK_OF(SSL_CIPHER) *cipher_list_old = NULL, *cipher_list = NULL;
           const SSL_CIPHER *cipher = NULL;
      -    int depth, verify_old, verify, n;
      -
      +    int depth, verify_old, verify, n, is_slave = 0;
      +    const char *ncipher_suite;
      +
      +    /* On a slave connection, we do not expect to have an SSLConnRec, but
      +     * our master connection might have one. */
      +    if (!(sslconn && ssl) && r->connection->master) {
      +        sslconn         = myConnConfig(r->connection->master);
      +        ssl             = sslconn ? sslconn->ssl : NULL;
      +        handshakeserver = sslconn ? sslconn->server : NULL;
      +        hssc            = handshakeserver? mySrvConfig(handshakeserver) : NULL;
      +        is_slave        = 1;
      +    }
      +    
           if (ssl) {
      +        /*
      +         * We should have handshaken here (on handshakeserver),
      +         * otherwise we are being redirected (ErrorDocument) from
      +         * a renegotiation failure below. The access is still 
      +         * forbidden in the latter case, let ap_die() handle
      +         * this recursive (same) error.
      +         */
      +        if (SSL_get_state(ssl) != SSL_ST_OK) {
      +            return HTTP_FORBIDDEN;
      +        }
               ctx = SSL_get_SSL_CTX(ssl);
           }
       
      @@ -320,7 +466,7 @@ int ssl_hook_Access(request_rec *r)
            * Support for SSLRequireSSL directive
            */
           if (dc->bSSLRequired && !ssl) {
      -        if (sc->enabled == SSL_ENABLED_OPTIONAL) {
      +        if ((sc->enabled == SSL_ENABLED_OPTIONAL) && !is_slave) {
                   /* This vhost was configured for optional SSL, just tell the
                    * client that we need to upgrade.
                    */
      @@ -330,7 +476,7 @@ int ssl_hook_Access(request_rec *r)
                   return HTTP_UPGRADE_REQUIRED;
               }
       
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02219)
                             "access to %s failed, reason: %s",
                             r->filename, "SSL connection required");
       
      @@ -349,6 +495,19 @@ int ssl_hook_Access(request_rec *r)
               return DECLINED;
           }
       
      +#ifdef HAVE_SRP
      +    /*
      +     * Support for per-directory reconfigured SSL connection parameters
      +     *
      +     * We do not force any renegotiation if the user is already authenticated
      +     * via SRP.
      +     *
      +     */
      +    if (SSL_get_srp_username(ssl)) {
      +        return DECLINED;
      +    }
      +#endif
      +
           /*
            * Support for per-directory reconfigured SSL connection parameters.
            *
      @@ -390,8 +549,13 @@ int ssl_hook_Access(request_rec *r)
            *   new cipher suite. This approach is fine because the user explicitly
            *   has to enable this via ``SSLOptions +OptRenegotiate''. So we do no
            *   implicit optimizations.
      -     */
      -    if (dc->szCipherSuite || (r->server != handshakeserver)) {
      +     */     
      +    ncipher_suite = (dc->szCipherSuite? 
      +                     dc->szCipherSuite : (r->server != handshakeserver)?
      +                     sc->server->auth.cipher_suite : NULL);
      +    
      +    if (ncipher_suite && (!sslconn->cipher_suite 
      +                          || strcmp(ncipher_suite, sslconn->cipher_suite))) {
               /* remember old state */
       
               if (dc->nOptions & SSL_OPT_OPTRENEGOTIATE) {
      @@ -406,11 +570,19 @@ int ssl_hook_Access(request_rec *r)
               }
       
               /* configure new state */
      -        if ((dc->szCipherSuite || sc->server->auth.cipher_suite) &&
      -            !SSL_set_cipher_list(ssl, dc->szCipherSuite ?
      -                                      dc->szCipherSuite :
      -                                      sc->server->auth.cipher_suite)) {
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        if (is_slave) {
      +            /* TODO: this categorically fails changed cipher suite settings
      +             * on slave connections. We could do better by
      +             * - create a new SSL* from our SSL_CTX and set cipher suite there,
      +             *   and retrieve ciphers, free afterwards
      +             * Modifying the SSL on a slave connection is no good.
      +             */
      +            apr_table_setn(r->notes, "ssl-renegotiate-forbidden", "cipher-suite");
      +            return HTTP_FORBIDDEN;
      +        }
      +
      +        if (!SSL_set_cipher_list(ssl, ncipher_suite)) {
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02253)
                                 "Unable to reconfigure (per-directory) "
                                 "permitted SSL ciphers");
                   ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
      @@ -476,42 +648,26 @@ int ssl_hook_Access(request_rec *r)
               }
       
               if (renegotiate) {
      +            if (is_slave) {
      +                /* The request causes renegotiation on a slave connection.
      +                 * This is not allowed since we might have concurrent requests
      +                 * on this connection.
      +                 */
      +                apr_table_setn(r->notes, "ssl-renegotiate-forbidden", "cipher-suite");
      +                return HTTP_FORBIDDEN;
      +            }
      +            
       #ifdef SSL_OP_CIPHER_SERVER_PREFERENCE
                   if (sc->cipher_server_pref == TRUE) {
                       SSL_set_options(ssl, SSL_OP_CIPHER_SERVER_PREFERENCE);
                   }
       #endif
                   /* tracing */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02220)
                                "Reconfigured cipher suite will force renegotiation");
               }
           }
       
      -    /*
      -     * override of SSLVerifyDepth
      -     *
      -     * The depth checks are handled by us manually inside the verify callback
      -     * function and not by OpenSSL internally (and our function is aware of
      -     * both the per-server and per-directory contexts). So we cannot ask
      -     * OpenSSL about the currently verify depth. Instead we remember it in our
      -     * SSLConnRec attached to the SSL* of OpenSSL.  We've to force the
      -     * renegotiation if the reconfigured/new verify depth is less than the
      -     * currently active/remembered verify depth (because this means more
      -     * restriction on the certificate chain).
      -     */
      -    n = (sslconn->verify_depth != UNSET) ?
      -        sslconn->verify_depth :
      -        (mySrvConfig(handshakeserver))->server->auth.verify_depth;
      -    /* determine the new depth */
      -    sslconn->verify_depth = (dc->nVerifyDepth != UNSET) ?
      -                            dc->nVerifyDepth : sc->server->auth.verify_depth;
      -    if (sslconn->verify_depth < n) {
      -        renegotiate = TRUE;
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                     "Reduced client verification depth will force "
      -                     "renegotiation");
      -    }
      -
           /*
            * override of SSLVerifyClient
            *
      @@ -528,6 +684,7 @@ int ssl_hook_Access(request_rec *r)
            */
           if ((dc->nVerifyClient != SSL_CVERIFY_UNSET) ||
               (sc->server->auth.verify_mode != SSL_CVERIFY_UNSET)) {
      +
               /* remember old state */
               verify_old = SSL_get_verify_mode(ssl);
               /* configure new state */
      @@ -546,6 +703,9 @@ int ssl_hook_Access(request_rec *r)
                   verify |= SSL_VERIFY_PEER;
               }
       
      +        /* TODO: this seems premature since we do not know if there
      +         *       are any changes required.
      +         */
               SSL_set_verify(ssl, verify, ssl_callback_SSLVerify);
               SSL_set_verify_result(ssl, X509_V_OK);
       
      @@ -561,6 +721,15 @@ int ssl_hook_Access(request_rec *r)
                         (verify     & SSL_VERIFY_FAIL_IF_NO_PEER_CERT)))
                   {
                       renegotiate = TRUE;
      +                if (is_slave) {
      +                    /* The request causes renegotiation on a slave connection.
      +                     * This is not allowed since we might have concurrent requests
      +                     * on this connection.
      +                     */
      +                    apr_table_setn(r->notes, "ssl-renegotiate-forbidden", "verify-client");
      +                    SSL_set_verify(ssl, verify_old, ssl_callback_SSLVerify);
      +                    return HTTP_FORBIDDEN;
      +                }
                       /* optimization */
       
                       if ((dc->nOptions & SSL_OPT_OPTRENEGOTIATE) &&
      @@ -571,11 +740,40 @@ int ssl_hook_Access(request_rec *r)
                           X509_free(peercert);
                       }
       
      -                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02255)
                                     "Changed client verification type will force "
                                     "%srenegotiation",
                                     renegotiate_quick ? "quick " : "");
      -             }
      +            }
      +            else if (verify != SSL_VERIFY_NONE) {
      +                /*
      +                 * override of SSLVerifyDepth
      +                 *
      +                 * The depth checks are handled by us manually inside the
      +                 * verify callback function and not by OpenSSL internally
      +                 * (and our function is aware of both the per-server and
      +                 * per-directory contexts). So we cannot ask OpenSSL about
      +                 * the currently verify depth. Instead we remember it in our
      +                 * SSLConnRec attached to the SSL* of OpenSSL.  We've to force
      +                 * the renegotiation if the reconfigured/new verify depth is
      +                 * less than the currently active/remembered verify depth
      +                 * (because this means more restriction on the certificate
      +                 * chain).
      +                 */
      +                n = (sslconn->verify_depth != UNSET)
      +                    ? sslconn->verify_depth
      +                    : hssc->server->auth.verify_depth;
      +                /* determine the new depth */
      +                sslconn->verify_depth = (dc->nVerifyDepth != UNSET)
      +                                        ? dc->nVerifyDepth
      +                                        : sc->server->auth.verify_depth;
      +                if (sslconn->verify_depth < n) {
      +                    renegotiate = TRUE;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02254)
      +                                  "Reduced client verification depth will "
      +                                  "force renegotiation");
      +                }
      +            }
               }
               /* If we're handling a request for a vhost other than the default one,
                * then we need to make sure that client authentication is properly
      @@ -591,8 +789,6 @@ int ssl_hook_Access(request_rec *r)
                   && renegotiate
                   && ((verify & SSL_VERIFY_PEER) ||
                       (verify & SSL_VERIFY_FAIL_IF_NO_PEER_CERT))) {
      -            SSLSrvConfigRec *hssc = mySrvConfig(handshakeserver);
      -
       #define MODSSL_CFG_CA_NE(f, sc1, sc2) \
                   (sc1->server->auth.f && \
                    (!sc2->server->auth.f || \
      @@ -601,7 +797,7 @@ int ssl_hook_Access(request_rec *r)
                   if (MODSSL_CFG_CA_NE(ca_cert_file, sc, hssc) ||
                       MODSSL_CFG_CA_NE(ca_cert_path, sc, hssc)) {
                       if (verify & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02256)
                                "Non-default virtual host with SSLVerify set to "
                                "'require' and VirtualHost-specific CA certificate "
                                "list is only available to clients with TLS server "
      @@ -651,7 +847,7 @@ int ssl_hook_Access(request_rec *r)
               }
       
               if (rv) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02257)
                                 "could not buffer message body to allow "
                                 "SSL renegotiation to proceed");
                   return rv;
      @@ -673,14 +869,14 @@ int ssl_hook_Access(request_rec *r)
                * here because it resets too much of the connection.  So we set the
                * state explicitly and continue the handshake manually.
                */
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02221)
                             "Requesting connection re-negotiation");
       
               if (renegotiate_quick) {
                   STACK_OF(X509) *cert_stack;
       
                   /* perform just a manual re-verification of the peer */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02258)
                                "Performing quick renegotiation: "
                                "just re-verifying the peer");
       
      @@ -688,7 +884,14 @@ int ssl_hook_Access(request_rec *r)
       
                   cert = SSL_get_peer_certificate(ssl);
       
      -            if (!cert_stack && cert) {
      +            if (!cert_stack || (sk_X509_num(cert_stack) == 0)) {
      +                if (!cert) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02222)
      +                                  "Cannot find peer certificate chain");
      +
      +                    return HTTP_FORBIDDEN;
      +                }
      +
                       /* client cert is in the session cache, but there is
                        * no chain, since ssl3_get_client_certificate()
                        * sk_X509_shift-ed the peer cert out of the chain.
      @@ -698,17 +901,10 @@ int ssl_hook_Access(request_rec *r)
                       sk_X509_push(cert_stack, cert);
                   }
       
      -            if (!cert_stack || (sk_X509_num(cert_stack) == 0)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Cannot find peer certificate chain");
      -
      -                return HTTP_FORBIDDEN;
      -            }
      -
                   if (!(cert_store ||
                         (cert_store = SSL_CTX_get_cert_store(ctx))))
                   {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02223)
                                     "Cannot find certificate storage");
       
                       return HTTP_FORBIDDEN;
      @@ -730,7 +926,7 @@ int ssl_hook_Access(request_rec *r)
                                              (char *)ssl);
       
                   if (!X509_verify_cert(&cert_store_ctx)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02224)
                                     "Re-negotiation verification step failed");
                       ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
                   }
      @@ -744,6 +940,7 @@ int ssl_hook_Access(request_rec *r)
                   }
               }
               else {
      +            const char *reneg_support;
                   request_rec *id = r->main ? r->main : r;
       
                   /* Additional mitigation for CVE-2009-3555: At this point,
      @@ -756,24 +953,24 @@ int ssl_hook_Access(request_rec *r)
                    * discarded.  Legimately pipelined HTTP requests will be
                    * retried anyway with this approach. */
                   if (has_buffered_data(r)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02259)
                                     "insecure SSL re-negotiation required, but "
                                     "a pipelined request is present; keepalive "
                                     "disabled");
                       r->connection->keepalive = AP_CONN_CLOSE;
                   }
       
      -            /* Perform a full renegotiation. */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      -                          "Performing full renegotiation: complete handshake "
      -                          "protocol (%s support secure renegotiation)",
       #if defined(SSL_get_secure_renegotiation_support)
      -                          SSL_get_secure_renegotiation_support(ssl) ?
      -                          "client does" : "client does not"
      +            reneg_support = SSL_get_secure_renegotiation_support(ssl) ?
      +                            "client does" : "client does not";
       #else
      -                          "server does not"
      +            reneg_support = "server does not";
       #endif
      -                );
      +            /* Perform a full renegotiation. */
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02260)
      +                          "Performing full renegotiation: complete handshake "
      +                          "protocol (%s support secure renegotiation)",
      +                          reneg_support);
       
                   SSL_set_session_id_context(ssl,
                                              (unsigned char *)&id,
      @@ -787,7 +984,7 @@ int ssl_hook_Access(request_rec *r)
                   SSL_do_handshake(ssl);
       
                   if (SSL_get_state(ssl) != SSL_ST_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02225)
                                     "Re-negotiation request failed");
                       ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
       
      @@ -795,26 +992,35 @@ int ssl_hook_Access(request_rec *r)
                       return HTTP_FORBIDDEN;
                   }
       
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02226)
                                 "Awaiting re-negotiation handshake");
       
      -            /* XXX: Should replace setting ssl->state with SSL_renegotiate(ssl);
      +            /* XXX: Should replace setting state with SSL_renegotiate(ssl);
                    * However, this causes failures in perl-framework currently,
                    * perhaps pre-test if we have already negotiated?
                    */
      +#ifdef OPENSSL_NO_SSL_INTERN
      +            SSL_set_state(ssl, SSL_ST_ACCEPT);
      +#else
                   ssl->state = SSL_ST_ACCEPT;
      +#endif
                   SSL_do_handshake(ssl);
       
                   sslconn->reneg_state = RENEG_REJECT;
       
                   if (SSL_get_state(ssl) != SSL_ST_OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                              "Re-negotiation handshake failed: "
      -                              "Not accepted by client!?");
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02261)
      +                              "Re-negotiation handshake failed");
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, r->server);
       
                       r->connection->keepalive = AP_CONN_CLOSE;
                       return HTTP_FORBIDDEN;
                   }
      +
      +            /* Full renegotiation successful, we now have handshaken with
      +             * this server's parameters.
      +             */
      +            sslconn->server = r->server;
               }
       
               /*
      @@ -837,7 +1043,7 @@ int ssl_hook_Access(request_rec *r)
                                     (sc->server->auth.verify_mode == SSL_CVERIFY_REQUIRE));
       
                   if (do_verify && (SSL_get_verify_result(ssl) != X509_V_OK)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02262)
                                     "Re-negotiation handshake failed: "
                                     "Client verification failed");
       
      @@ -846,7 +1052,7 @@ int ssl_hook_Access(request_rec *r)
       
                   if (do_verify) {
                       if ((peercert = SSL_get_peer_certificate(ssl)) == NULL) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02263)
                                         "Re-negotiation handshake failed: "
                                         "Client certificate missing");
       
      @@ -863,7 +1069,7 @@ int ssl_hook_Access(request_rec *r)
               if (cipher_list) {
                   cipher = SSL_get_current_cipher(ssl);
                   if (sk_SSL_CIPHER_find(cipher_list, cipher) < 0) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02264)
                                    "SSL cipher suite not renegotiated: "
                                    "access to %s denied using cipher %s",
                                     r->filename,
      @@ -871,6 +1077,10 @@ int ssl_hook_Access(request_rec *r)
                       return HTTP_FORBIDDEN;
                   }
               }
      +        /* remember any new cipher suite used in renegotiation */
      +        if (ncipher_suite) {
      +            sslconn->cipher_suite = ncipher_suite;
      +        }
           }
       
           /* If we're trying to have the user name set from a client
      @@ -886,7 +1096,7 @@ int ssl_hook_Access(request_rec *r)
               if (val && val[0])
                   r->user = val;
               else
      -            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(02227)
                                 "Failed to set r->user to '%s'", dc->szUserName);
           }
       
      @@ -902,7 +1112,7 @@ int ssl_hook_Access(request_rec *r)
               ok = ap_expr_exec(r, req->mpExpr, &errstring);
       
               if (ok < 0) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02265)
                                 "access to %s failed, reason: Failed to execute "
                                 "SSL requirement expression: %s",
                                 r->filename, errstring);
      @@ -914,15 +1124,15 @@ int ssl_hook_Access(request_rec *r)
               }
       
               if (ok != 1) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02266)
                                 "Access to %s denied for %s "
                                 "(requirement expression not fulfilled)",
      -                          r->filename, r->connection->remote_ip);
      +                          r->filename, r->useragent_ip);
       
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02228)
                                 "Failed expression: %s", req->cpExpr);
       
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02229)
                                 "access to %s failed, reason: %s",
                                 r->filename,
                                 "SSL requirement expression not fulfilled");
      @@ -949,7 +1159,7 @@ int ssl_hook_Access(request_rec *r)
        *  Fake a Basic authentication from the X509 client certificate.
        *
        *  This must be run fairly early on to prevent a real authentication from
      - *  occuring, in particular it must be run before anything else that
      + *  occurring, in particular it must be run before anything else that
        *  authenticates a user.  This means that the Module statement for this
        *  module should be LAST in the Configuration file.
        */
      @@ -996,7 +1206,7 @@ int ssl_hook_UserCheck(request_rec *r)
                   password = auth_line;
       
                   if ((username[0] == '/') && strEQ(password, "password")) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02035)
                           "Encountered FakeBasicAuth spoof: %s", username);
                       return HTTP_FORBIDDEN;
                   }
      @@ -1044,7 +1254,7 @@ int ssl_hook_UserCheck(request_rec *r)
                                   NULL);
           apr_table_setn(r->headers_in, "Authorization", auth_line);
       
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02036)
                         "Faking HTTP Basic Auth header: \"Authorization: %s\"",
                         auth_line);
       
      @@ -1093,6 +1303,7 @@ static const char *ssl_hook_Fixup_vars[] = {
           "SSL_CLIENT_I_DN",
           "SSL_CLIENT_A_KEY",
           "SSL_CLIENT_A_SIG",
      +    "SSL_CLIENT_CERT_RFC4523_CEA",
           "SSL_SERVER_M_VERSION",
           "SSL_SERVER_M_SERIAL",
           "SSL_SERVER_V_START",
      @@ -1103,6 +1314,10 @@ static const char *ssl_hook_Fixup_vars[] = {
           "SSL_SERVER_A_SIG",
           "SSL_SESSION_ID",
           "SSL_SESSION_RESUMED",
      +#ifdef HAVE_SRP
      +    "SSL_SRP_USER",
      +    "SSL_SRP_USERINFO",
      +#endif
           NULL
       };
       
      @@ -1113,20 +1328,15 @@ int ssl_hook_Fixup(request_rec *r)
           SSLDirConfigRec *dc = myDirConfig(r);
           apr_table_t *env = r->subprocess_env;
           char *var, *val = "";
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
           const char *servername;
       #endif
           STACK_OF(X509) *peer_certs;
           SSL *ssl;
           int i;
       
      -    /* If "SSLEngine optional" is configured, this is not an SSL
      -     * connection, and this isn't a subrequest, send an Upgrade
      -     * response header. */
      -    if (sc->enabled == SSL_ENABLED_OPTIONAL && !(sslconn && sslconn->ssl)
      -        && !r->main) {
      -        apr_table_setn(r->headers_out, "Upgrade", "TLS/1.0, HTTP/1.1");
      -        apr_table_mergen(r->headers_out, "Connection", "upgrade");
      +    if (!(sslconn && sslconn->ssl) && r->connection->master) {
      +        sslconn = myConnConfig(r->connection->master);
           }
       
           /*
      @@ -1142,7 +1352,7 @@ int ssl_hook_Fixup(request_rec *r)
           /* the always present HTTPS (=HTTP over SSL) flag! */
           apr_table_setn(env, "HTTPS", "on");
       
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
           /* add content of SNI TLS extension (if supplied with ClientHello) */
           if ((servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name))) {
               apr_table_set(env, "SSL_TLS_SNI", servername);
      @@ -1151,7 +1361,8 @@ int ssl_hook_Fixup(request_rec *r)
       
           /* standard SSL environment variables */
           if (dc->nOptions & SSL_OPT_STDENVVARS) {
      -        modssl_var_extract_dns(env, sslconn->ssl, r->pool);
      +        modssl_var_extract_dns(env, ssl, r->pool);
      +        modssl_var_extract_san_entries(env, ssl, r->pool);
       
               for (i = 0; ssl_hook_Fixup_vars[i]; i++) {
                   var = (char *)ssl_hook_Fixup_vars[i];
      @@ -1285,121 +1496,46 @@ const authz_provider ssl_authz_provider_verify_client =
       */
       
       /*
      - * Handle out temporary RSA private keys on demand
      - *
      - * The background of this as the TLSv1 standard explains it:
      - *
      - * | D.1. Temporary RSA keys
      - * |
      - * |    US Export restrictions limit RSA keys used for encryption to 512
      - * |    bits, but do not place any limit on lengths of RSA keys used for
      - * |    signing operations. Certificates often need to be larger than 512
      - * |    bits, since 512-bit RSA keys are not secure enough for high-value
      - * |    transactions or for applications requiring long-term security. Some
      - * |    certificates are also designated signing-only, in which case they
      - * |    cannot be used for key exchange.
      - * |
      - * |    When the public key in the certificate cannot be used for encryption,
      - * |    the server signs a temporary RSA key, which is then exchanged. In
      - * |    exportable applications, the temporary RSA key should be the maximum
      - * |    allowable length (i.e., 512 bits). Because 512-bit RSA keys are
      - * |    relatively insecure, they should be changed often. For typical
      - * |    electronic commerce applications, it is suggested that keys be
      - * |    changed daily or every 500 transactions, and more often if possible.
      - * |    Note that while it is acceptable to use the same temporary key for
      - * |    multiple transactions, it must be signed each time it is used.
      - * |
      - * |    RSA key generation is a time-consuming process. In many cases, a
      - * |    low-priority process can be assigned the task of key generation.
      - * |    Whenever a new key is completed, the existing temporary key can be
      - * |    replaced with the new one.
      - *
      - * XXX: base on comment above, if thread support is enabled,
      - * we should spawn a low-priority thread to generate new keys
      - * on the fly.
      - *
      - * So we generated 512 and 1024 bit temporary keys on startup
      - * which we now just hand out on demand....
      - */
      -
      -RSA *ssl_callback_TmpRSA(SSL *ssl, int export, int keylen)
      -{
      -    conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      -    SSLModConfigRec *mc = myModConfigFromConn(c);
      -    int idx;
      -
      -    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c,
      -                  "handing out temporary %d bit RSA key", keylen);
      -
      -    /* doesn't matter if export flag is on,
      -     * we won't be asked for keylen > 512 in that case.
      -     * if we are asked for a keylen > 1024, it is too expensive
      -     * to generate on the fly.
      -     * XXX: any reason not to generate 2048 bit keys at startup?
      -     */
      -
      -    switch (keylen) {
      -      case 512:
      -        idx = SSL_TMP_KEY_RSA_512;
      -        break;
      -
      -      case 1024:
      -      default:
      -        idx = SSL_TMP_KEY_RSA_1024;
      -    }
      -
      -    return (RSA *)mc->pTmpKeys[idx];
      -}
      -
      -/*
      - * Hand out the already generated DH parameters...
      + * Hand out standard DH parameters, based on the authentication strength
        */
       DH *ssl_callback_TmpDH(SSL *ssl, int export, int keylen)
       {
           conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      -    SSLModConfigRec *mc = myModConfigFromConn(c);
      -    int idx;
      -
      -    ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c,
      -                  "handing out temporary %d bit DH key", keylen);
      +    EVP_PKEY *pkey;
      +    int type;
       
      -    switch (keylen) {
      -      case 512:
      -        idx = SSL_TMP_KEY_DH_512;
      -        break;
      +#ifdef SSL_CERT_SET_SERVER
      +    /*
      +     * When multiple certs/keys are configured for the SSL_CTX: make sure
      +     * that we get the private key which is indeed used for the current
      +     * SSL connection (available in OpenSSL 1.0.2 or later only)
      +     */
      +    SSL_set_current_cert(ssl, SSL_CERT_SET_SERVER);
      +#endif
      +    pkey = SSL_get_privatekey(ssl);
      +    type = pkey ? EVP_PKEY_type(pkey->type) : EVP_PKEY_NONE;
       
      -      case 1024:
      -      default:
      -        idx = SSL_TMP_KEY_DH_1024;
      +    /*
      +     * OpenSSL will call us with either keylen == 512 or keylen == 1024
      +     * (see the definition of SSL_EXPORT_PKEYLENGTH in ssl_locl.h).
      +     * Adjust the DH parameter length according to the size of the
      +     * RSA/DSA private key used for the current connection, and always
      +     * use at least 1024-bit parameters.
      +     * Note: This may cause interoperability issues with implementations
      +     * which limit their DH support to 1024 bit - e.g. Java 7 and earlier.
      +     * In this case, SSLCertificateFile can be used to specify fixed
      +     * 1024-bit DH parameters (with the effect that OpenSSL skips this
      +     * callback).
      +     */
      +    if ((type == EVP_PKEY_RSA) || (type == EVP_PKEY_DSA)) {
      +        keylen = EVP_PKEY_bits(pkey);
           }
       
      -    return (DH *)mc->pTmpKeys[idx];
      -}
      -
      -#ifndef OPENSSL_NO_EC
      -EC_KEY *ssl_callback_TmpECDH(SSL *ssl, int export, int keylen)
      -{
      -    conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      -    static EC_KEY *ecdh = NULL;
      -    static int init = 0;
      -
      -    /* XXX Uses 256-bit key for now. TODO: support other sizes. */
           ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, c,
      -                  "handing out temporary 256 bit ECC key");
      -
      -    if (init == 0) {
      -        ecdh = EC_KEY_new();
      -        if (ecdh != NULL) {
      -            /* ecdh->group = EC_GROUP_new_by_nid(NID_secp160r2); */
      -            EC_KEY_set_group(ecdh,
      -              EC_GROUP_new_by_curve_name(NID_X9_62_prime256v1));
      -        }
      -        init = 1;
      -    }
      +                  "handing out built-in DH parameters for %d-bit authenticated connection", keylen);
       
      -    return ecdh;
      +    return modssl_get_dh_params(keylen);
       }
      -#endif
       
       /*
        * This OpenSSL callback function is called when OpenSSL
      @@ -1411,29 +1547,31 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
           SSL *ssl = X509_STORE_CTX_get_ex_data(ctx,
                                                 SSL_get_ex_data_X509_STORE_CTX_idx());
           conn_rec *conn      = (conn_rec *)SSL_get_app_data(ssl);
      -    request_rec *r      = (request_rec *)SSL_get_app_data2(ssl);
      +    request_rec *r      = (request_rec *)modssl_get_app_data2(ssl);
           server_rec *s       = r ? r->server : mySrvFromConn(conn);
       
           SSLSrvConfigRec *sc = mySrvConfig(s);
           SSLDirConfigRec *dc = r ? myDirConfig(r) : NULL;
           SSLConnRec *sslconn = myConnConfig(conn);
           modssl_ctx_t *mctx  = myCtxConfig(sslconn, sc);
      +    int crl_check_mode  = mctx->crl_check_mask & ~SSL_CRLCHECK_FLAGS;
       
           /* Get verify ingredients */
           int errnum   = X509_STORE_CTX_get_error(ctx);
           int errdepth = X509_STORE_CTX_get_error_depth(ctx);
           int depth, verify;
       
      +
           /*
            * Log verification information
            */
           ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, conn,
      -                    X509_STORE_CTX_get_current_cert(ctx),
      +                    X509_STORE_CTX_get_current_cert(ctx), APLOGNO(02275)
                           "Certificate Verification, depth %d, "
      -                    "CRL checking mode: %s", errdepth,
      -                    mctx->crl_check_mode == SSL_CRLCHECK_CHAIN ?
      -                    "chain" : (mctx->crl_check_mode == SSL_CRLCHECK_LEAF ?
      -                               "leaf" : "none"));
      +                    "CRL checking mode: %s (%x)", errdepth,
      +                    crl_check_mode == SSL_CRLCHECK_CHAIN ? "chain" :
      +                    crl_check_mode == SSL_CRLCHECK_LEAF  ? "leaf"  : "none",
      +                    mctx->crl_check_mask);
       
           /*
            * Check for optionally acceptable non-verifiable issuer situation
      @@ -1457,7 +1595,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
           if (ssl_verify_error_is_optional(errnum) &&
               (verify == SSL_CVERIFY_OPTIONAL_NO_CA))
           {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, conn,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, conn, APLOGNO(02037)
                             "Certificate Verification: Verifiable Issuer is "
                             "configured as optional, therefore we're accepting "
                             "the certificate");
      @@ -1482,6 +1620,17 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
               X509_STORE_CTX_set_error(ctx, -1);
           }
       
      +    if (!ok && errnum == X509_V_ERR_UNABLE_TO_GET_CRL
      +            && (mctx->crl_check_mask & SSL_CRLCHECK_NO_CRL_FOR_CERT_OK)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, conn,
      +                      "Certificate Verification: Temporary error (%d): %s: "
      +                      "optional therefore we're accepting the certificate",
      +                      errnum, X509_verify_cert_error_string(errnum));
      +        X509_STORE_CTX_set_error(ctx, X509_V_OK);
      +        errnum = X509_V_OK;
      +        ok = TRUE;
      +    }
      +
       #ifndef OPENSSL_NO_OCSP
           /*
            * Perform OCSP-based revocation checks
      @@ -1493,7 +1642,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
               if (ssl_verify_error_is_optional(errnum)) {
                   X509_STORE_CTX_set_error(ctx, X509_V_ERR_APPLICATION_VERIFICATION);
                   errnum = X509_V_ERR_APPLICATION_VERIFICATION;
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn, APLOGNO(02038)
                                 "cannot perform OCSP validation for cert "
                                 "if issuer has not been verified "
                                 "(optional_no_ca configured)");
      @@ -1513,11 +1662,11 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
           if (!ok) {
               if (APLOGcinfo(conn)) {
                   ssl_log_cxerror(SSLLOG_MARK, APLOG_INFO, 0, conn,
      -                            X509_STORE_CTX_get_current_cert(ctx),
      +                            X509_STORE_CTX_get_current_cert(ctx), APLOGNO(02276)
                                   "Certificate Verification: Error (%d): %s",
                                   errnum, X509_verify_cert_error_string(errnum));
               } else {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn, APLOGNO(02039)
                                 "Certificate Verification: Error (%d): %s",
                                 errnum, X509_verify_cert_error_string(errnum));
               }
      @@ -1541,7 +1690,7 @@ int ssl_callback_SSLVerify(int ok, X509_STORE_CTX *ctx)
           }
       
           if (errdepth > depth) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, conn, APLOGNO(02040)
                             "Certificate Verification: Certificate Chain too long "
                             "(chain has %d certificates, but maximum allowed are "
                             "only %d)",
      @@ -1566,7 +1715,7 @@ static void modssl_proxy_info_log(conn_rec *c,
                                         X509_INFO *info,
                                         const char *msg)
       {
      -    ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, c, info->x509,
      +    ssl_log_cxerror(SSLLOG_MARK, APLOG_DEBUG, 0, c, info->x509, APLOGNO(02277)
                           SSLPROXY_CERT_CB_LOG_FMT "%s, sending",
                           (mySrvConfigFromConn(c))->vhost_id, msg);
       }
      @@ -1596,12 +1745,12 @@ int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
           STACK_OF(X509) **ca_cert_chains;
           int i, j, k;
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02267)
                        SSLPROXY_CERT_CB_LOG_FMT "entered",
                        sc->vhost_id);
       
           if (!certs || (sk_X509_INFO_num(certs) <= 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(02268)
                            SSLPROXY_CERT_CB_LOG_FMT
                            "downstream server wanted client certificate "
                            "but none are configured", sc->vhost_id);
      @@ -1617,7 +1766,7 @@ int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
                */
               info = sk_X509_INFO_value(certs, 0);
       
      -        modssl_proxy_info_log(c, info, "no acceptable CA list");
      +        modssl_proxy_info_log(c, info, APLOGNO(02278) "no acceptable CA list");
       
               modssl_set_cert_info(info, x509, pkey);
       
      @@ -1634,7 +1783,8 @@ int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
       
                   /* Search certs (by issuer name) one by one*/
                   if (X509_NAME_cmp(issuer, ca_name) == 0) {
      -                modssl_proxy_info_log(c, info, "found acceptable cert");
      +                modssl_proxy_info_log(c, info, APLOGNO(02279)
      +                                      "found acceptable cert");
       
                       modssl_set_cert_info(info, x509, pkey);
       
      @@ -1652,7 +1802,8 @@ int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
                           ca_issuer = X509_get_issuer_name(ca_cert);
       
                           if(X509_NAME_cmp(ca_issuer, ca_name) == 0 ) {
      -                        modssl_proxy_info_log(c, info, "found acceptable cert by intermediate CA");
      +                        modssl_proxy_info_log(c, info, APLOGNO(02280)
      +                                              "found acceptable cert by intermediate CA");
       
                               modssl_set_cert_info(info, x509, pkey);
       
      @@ -1663,7 +1814,7 @@ int ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
               } /* end loop through available certs */
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02269)
                        SSLPROXY_CERT_CB_LOG_FMT
                        "no client certificate found!?", sc->vhost_id);
       
      @@ -1678,7 +1829,7 @@ static void ssl_session_log(server_rec *s,
                                   const char *result,
                                   long timeout)
       {
      -    char buf[SSL_SESSION_ID_STRING_LEN];
      +    char buf[MODSSL_SESSION_ID_STRING_LEN];
           char timeout_str[56] = {'\0'};
       
           if (!APLOGdebug(s)) {
      @@ -1687,14 +1838,14 @@ static void ssl_session_log(server_rec *s,
       
           if (timeout) {
               apr_snprintf(timeout_str, sizeof(timeout_str),
      -                     "timeout=%lds ", (timeout - time(NULL)));
      +                     "timeout=%lds ", timeout);
           }
       
           ap_log_error(APLOG_MARK, APLOG_TRACE2, 0, s,
                        "Inter-Process Session Cache: "
                        "request=%s status=%s id=%s %s(session %s)",
                        request, status,
      -                 SSL_SESSION_id2sz(id, idlen, buf, sizeof(buf)),
      +                 modssl_SSL_SESSION_id2sz(id, idlen, buf, sizeof(buf)),
                        timeout_str, result);
       }
       
      @@ -1725,8 +1876,12 @@ int ssl_callback_NewSessionCacheEntry(SSL *ssl, SSL_SESSION *session)
            * Store the SSL_SESSION in the inter-process cache with the
            * same expire time, so it expires automatically there, too.
            */
      +#ifdef OPENSSL_NO_SSL_INTERN
      +    id = (unsigned char *)SSL_SESSION_get_id(session, &idlen);
      +#else
           id = session->session_id;
           idlen = session->session_id_length;
      +#endif
       
           rc = ssl_scache_store(s, id, idlen,
                                 apr_time_from_sec(SSL_SESSION_get_time(session)
      @@ -1782,7 +1937,7 @@ SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *ssl,
       
       /*
        *  This callback function is executed by OpenSSL whenever a
      - *  SSL_SESSION is removed from the the internal OpenSSL cache.
      + *  SSL_SESSION is removed from the internal OpenSSL cache.
        *  We use this to remove the SSL_SESSION in the inter-process
        *  disk-cache, too.
        */
      @@ -1806,8 +1961,12 @@ void ssl_callback_DelSessionCacheEntry(SSL_CTX *ctx,
           /*
            * Remove the SSL_SESSION from the inter-process cache
            */
      +#ifdef OPENSSL_NO_SSL_INTERN
      +    id = (unsigned char *)SSL_SESSION_get_id(session, &idlen);
      +#else
           id = session->session_id;
           idlen = session->session_id_length;
      +#endif
       
           /* TODO: Do we need a temp pool here, or are we always shutting down? */
           ssl_scache_remove(s, id, idlen, sc->mc->pPool);
      @@ -1827,32 +1986,32 @@ static void log_tracing_state(const SSL *ssl, conn_rec *c,
            */
           if (where & SSL_CB_HANDSHAKE_START) {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
      -                      "%s: Handshake: start", SSL_LIBRARY_NAME);
      +                      "%s: Handshake: start", MODSSL_LIBRARY_NAME);
           }
           else if (where & SSL_CB_HANDSHAKE_DONE) {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
      -                      "%s: Handshake: done", SSL_LIBRARY_NAME);
      +                      "%s: Handshake: done", MODSSL_LIBRARY_NAME);
           }
           else if (where & SSL_CB_LOOP) {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                             "%s: Loop: %s",
      -                      SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
      +                      MODSSL_LIBRARY_NAME, SSL_state_string_long(ssl));
           }
           else if (where & SSL_CB_READ) {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                             "%s: Read: %s",
      -                      SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
      +                      MODSSL_LIBRARY_NAME, SSL_state_string_long(ssl));
           }
           else if (where & SSL_CB_WRITE) {
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                             "%s: Write: %s",
      -                      SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
      +                      MODSSL_LIBRARY_NAME, SSL_state_string_long(ssl));
           }
           else if (where & SSL_CB_ALERT) {
               char *str = (where & SSL_CB_READ) ? "read" : "write";
               ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                             "%s: Alert: %s:%s:%s",
      -                      SSL_LIBRARY_NAME, str,
      +                      MODSSL_LIBRARY_NAME, str,
                             SSL_alert_type_string_long(rc),
                             SSL_alert_desc_string_long(rc));
           }
      @@ -1860,12 +2019,12 @@ static void log_tracing_state(const SSL *ssl, conn_rec *c,
               if (rc == 0) {
                   ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                                 "%s: Exit: failed in %s",
      -                          SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
      +                          MODSSL_LIBRARY_NAME, SSL_state_string_long(ssl));
               }
               else if (rc < 0) {
                   ap_log_cerror(APLOG_MARK, APLOG_TRACE3, 0, c,
                                 "%s: Exit: error in %s",
      -                          SSL_LIBRARY_NAME, SSL_state_string_long(ssl));
      +                          MODSSL_LIBRARY_NAME, SSL_state_string_long(ssl));
               }
           }
       
      @@ -1875,10 +2034,8 @@ static void log_tracing_state(const SSL *ssl, conn_rec *c,
            * right after a finished handshake.
            */
           if (where & SSL_CB_HANDSHAKE_DONE) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      -                      "Connection: Client IP: %s, Protocol: %s, "
      -                      "Cipher: %s (%s/%s bits)",
      -                      ssl_var_lookup(NULL, s, c, NULL, "REMOTE_ADDR"),
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02041)
      +                      "Protocol: %s, Cipher: %s (%s/%s bits)",
                             ssl_var_lookup(NULL, s, c, NULL, "SSL_PROTOCOL"),
                             ssl_var_lookup(NULL, s, c, NULL, "SSL_CIPHER"),
                             ssl_var_lookup(NULL, s, c, NULL, "SSL_CIPHER_USEKEYSIZE"),
      @@ -1916,12 +2073,12 @@ void ssl_callback_Info(const SSL *ssl, int where, int rc)
               if (state == SSL3_ST_SR_CLNT_HELLO_A
                   || state == SSL23_ST_SR_CLNT_HELLO_A) {
                   scr->reneg_state = RENEG_ABORT;
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02042)
                                 "rejecting client initiated renegotiation");
               }
           }
           /* If the first handshake is complete, change state to reject any
      -     * subsequent client-initated renegotiation. */
      +     * subsequent client-initiated renegotiation. */
           else if ((where & SSL_CB_HANDSHAKE_DONE) && scr->reneg_state == RENEG_INIT) {
               scr->reneg_state = RENEG_REJECT;
           }
      @@ -1932,37 +2089,74 @@ void ssl_callback_Info(const SSL *ssl, int where, int rc)
           }
       }
       
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
       /*
      - * This callback function is executed when OpenSSL encounters an extended
      - * client hello with a server name indication extension ("SNI", cf. RFC 4366).
      + * This function sets the virtual host from an extended
      + * client hello with a server name indication extension ("SNI", cf. RFC 6066).
        */
      -int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx)
      +static apr_status_t init_vhost(conn_rec *c, SSL *ssl)
       {
      -    const char *servername =
      -                SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
      -
      -    if (servername) {
      -        conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      -        if (c) {
      +    const char *servername;
      +    
      +    if (c) {
      +        SSLConnRec *sslcon = myConnConfig(c);
      +        
      +        if (sslcon->server != c->base_server) {
      +            /* already found the vhost */
      +            return APR_SUCCESS;
      +        }
      +        
      +        servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
      +        if (servername) {
                   if (ap_vhost_iterate_given_conn(c, ssl_find_vhost,
                                                   (void *)servername)) {
      -                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02043)
                                     "SSL virtual host for servername %s found",
                                     servername);
      -                return SSL_TLSEXT_ERR_OK;
      +                return APR_SUCCESS;
                   }
                   else {
      -                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02044)
                                     "No matching SSL virtual host for servername "
                                     "%s found (using default/first virtual host)",
                                     servername);
      -                return SSL_TLSEXT_ERR_ALERT_WARNING;
      +                /*
      +                 * RFC 6066 section 3 says "It is NOT RECOMMENDED to send
      +                 * a warning-level unrecognized_name(112) alert, because
      +                 * the client's behavior in response to warning-level alerts
      +                 * is unpredictable."
      +                 *
      +                 * To maintain backwards compatibility in mod_ssl, we
      +                 * no longer send any alert (neither warning- nor fatal-level),
      +                 * i.e. we take the second action suggested in RFC 6066:
      +                 * "If the server understood the ClientHello extension but
      +                 * does not recognize the server name, the server SHOULD take
      +                 * one of two actions: either abort the handshake by sending
      +                 * a fatal-level unrecognized_name(112) alert or continue
      +                 * the handshake."
      +                 */
                   }
               }
      +        else {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02645)
      +                          "Server name not provided via TLS extension "
      +                          "(using default/first virtual host)");
      +        }
           }
      +    
      +    return APR_NOTFOUND;
      +}
       
      -    return SSL_TLSEXT_ERR_NOACK;
      +/*
      + * This callback function is executed when OpenSSL encounters an extended
      + * client hello with a server name indication extension ("SNI", cf. RFC 6066).
      + */
      +int ssl_callback_ServerNameIndication(SSL *ssl, int *al, modssl_ctx_t *mctx)
      +{
      +    conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      +    apr_status_t status = init_vhost(c, ssl);
      +    
      +    return (status == APR_SUCCESS)? SSL_TLSEXT_ERR_OK : SSL_TLSEXT_ERR_NOACK;
       }
       
       /*
      @@ -1974,62 +2168,22 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
       {
           SSLSrvConfigRec *sc;
           SSL *ssl;
      -    BOOL found = FALSE;
      -    apr_array_header_t *names;
      -    int i;
      +    BOOL found;
           SSLConnRec *sslcon;
       
      -    /* check ServerName */
      -    if (!strcasecmp(servername, s->server_hostname)) {
      -        found = TRUE;
      -    }
      -
      -    /*
      -     * if not matched yet, check ServerAlias entries
      -     * (adapted from vhost.c:matches_aliases())
      -     */
      -    if (!found) {
      -        names = s->names;
      -        if (names) {
      -            char **name = (char **)names->elts;
      -            for (i = 0; i < names->nelts; ++i) {
      -                if (!name[i])
      -                    continue;
      -                if (!strcasecmp(servername, name[i])) {
      -                    found = TRUE;
      -                    break;
      -                }
      -            }
      -        }
      -    }
      -
      -    /* if still no match, check ServerAlias entries with wildcards */
      -    if (!found) {
      -        names = s->wild_names;
      -        if (names) {
      -            char **name = (char **)names->elts;
      -            for (i = 0; i < names->nelts; ++i) {
      -                if (!name[i])
      -                    continue;
      -                if (!ap_strcasecmp_match(servername, name[i])) {
      -                    found = TRUE;
      -                    break;
      -                }
      -            }
      -        }
      -    }
      +    found = ssl_util_vhost_matches(servername, s);
       
           /* set SSL_CTX (if matched) */
           sslcon = myConnConfig(c);
           if (found && (ssl = sslcon->ssl) &&
               (sc = mySrvConfig(s))) {
      -        SSL_set_SSL_CTX(ssl, sc->server->ssl_ctx);
      +        SSL_CTX *ctx = SSL_set_SSL_CTX(ssl, sc->server->ssl_ctx);
               /*
                * SSL_set_SSL_CTX() only deals with the server cert,
                * so we need to duplicate a few additional settings
                * from the ctx by hand
                */
      -        SSL_set_options(ssl, SSL_CTX_get_options(ssl->ctx));
      +        SSL_set_options(ssl, SSL_CTX_get_options(ctx));
               if ((SSL_get_verify_mode(ssl) == SSL_VERIFY_NONE) ||
                   (SSL_num_renegotiations(ssl) == 0)) {
                  /*
      @@ -2039,8 +2193,25 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
                   * Otherwise, we would possibly reset a per-directory
                   * configuration which was put into effect by ssl_hook_Access.
                   */
      -            SSL_set_verify(ssl, SSL_CTX_get_verify_mode(ssl->ctx),
      -                           SSL_CTX_get_verify_callback(ssl->ctx));
      +            SSL_set_verify(ssl, SSL_CTX_get_verify_mode(ctx),
      +                           SSL_CTX_get_verify_callback(ctx));
      +        }
      +
      +        /*
      +         * Adjust the session id context. ssl_init_ssl_connection()
      +         * always picks the configuration of the first vhost when
      +         * calling SSL_new(), but we want to tie the session to the
      +         * vhost we have just switched to. Again, we have to make sure
      +         * that we're not overwriting a session id context which was
      +         * possibly set in ssl_hook_Access(), before triggering
      +         * a renegotiation.
      +         */
      +        if (SSL_num_renegotiations(ssl) == 0) {
      +            unsigned char *sid_ctx =
      +                (unsigned char *)ap_md5_binary(c->pool,
      +                                               (unsigned char *)sc->vhost_id,
      +                                               sc->vhost_id_len);
      +            SSL_set_session_id_context(ssl, sid_ctx, APR_MD5_DIGESTSIZE*2);
               }
       
               /*
      @@ -2048,7 +2219,9 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
                * retrieval
                */
               sslcon->server = s;
      -
      +        sslcon->cipher_suite = sc->server->auth.cipher_suite;
      +        
      +        ap_update_child_status_from_server(c->sbh, SERVER_BUSY_READ, c, s);
               /*
                * There is one special filter callback, which is set
                * very early depending on the base_server's log level.
      @@ -2057,8 +2230,14 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
                * we need to set that callback here.
                */
               if (APLOGtrace4(s)) {
      -            BIO_set_callback(SSL_get_rbio(ssl), ssl_io_data_cb);
      -            BIO_set_callback_arg(SSL_get_rbio(ssl), (void *)ssl);
      +            BIO *rbio = SSL_get_rbio(ssl),
      +                *wbio = SSL_get_wbio(ssl);
      +            BIO_set_callback(rbio, ssl_io_data_cb);
      +            BIO_set_callback_arg(rbio, (void *)ssl);
      +            if (wbio && wbio != rbio) {
      +                BIO_set_callback(wbio, ssl_io_data_cb);
      +                BIO_set_callback_arg(wbio, (void *)ssl);
      +            }
               }
       
               return 1;
      @@ -2066,93 +2245,190 @@ static int ssl_find_vhost(void *servername, conn_rec *c, server_rec *s)
       
           return 0;
       }
      -#endif
      +#endif /* HAVE_TLSEXT */
       
      -#ifdef HAVE_TLSEXT_TICKETS
      -
      -#ifndef tlsext_tick_md
      -#ifdef OPENSSL_NO_SHA256
      -#define tlsext_tick_md	EVP_sha1
      -#else
      -#define tlsext_tick_md	EVP_sha256
      -#endif
      -#endif
      -
      -int ssl_callback_tlsext_tickets(SSL *ssl,
      -                                char *keyname,
      -                                char *iv,
      -                                EVP_CIPHER_CTX *cipher_ctx,
      -                                HMAC_CTX *hctx,
      -                                int mode)
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +/*
      + * This callback function is executed when OpenSSL needs a key for encrypting/
      + * decrypting a TLS session ticket (RFC 5077) and a ticket key file has been
      + * configured through SSLSessionTicketKeyFile.
      + */
      +int ssl_callback_SessionTicket(SSL *ssl,
      +                               unsigned char *keyname,
      +                               unsigned char *iv,
      +                               EVP_CIPHER_CTX *cipher_ctx,
      +                               HMAC_CTX *hctx,
      +                               int mode)
       {
      -    conn_rec *conn      = (conn_rec *)SSL_get_app_data(ssl);
      -    server_rec *s       = mySrvFromConn(conn);
      +    conn_rec *c = (conn_rec *)SSL_get_app_data(ssl);
      +    server_rec *s = mySrvFromConn(c);
           SSLSrvConfigRec *sc = mySrvConfig(s);
      +    SSLConnRec *sslconn = myConnConfig(c);
      +    modssl_ctx_t *mctx = myCtxConfig(sslconn, sc);
      +    modssl_ticket_key_t *ticket_key = mctx->ticket_key;
       
           if (mode == 1) {
      -        modssl_ticket_t* ticket = sc->default_ticket;
      -
      -        /* Setting up the stuff for encrypting:
      -         *  - keyname contains at least 16 bytes we can write to.
      -         *  - iv contains at least EVP_MAX_IV_LENGTH (16) bytes we can write to.
      -         *  - hctx is already allocated, we just need to set the
      -         *    secret key via HMAC_Init_ex.
      -         *  - cipher_ctx is also allocated, and we need to configure
      -         *    the cipher and private key.
      +        /* 
      +         * OpenSSL is asking for a key for encrypting a ticket,
      +         * see s3_srvr.c:ssl3_send_newsession_ticket()
                */
       
      -        if (ticket == NULL) {
      -            /* this should not happen, we always set the default
      -             * ticket.
      -             */
      +        if (ticket_key == NULL) {
      +            /* should never happen, but better safe than sorry */
                   return -1;
               }
       
      -        memcpy(keyname, ticket->key_name, 16);
      -
      +        memcpy(keyname, ticket_key->key_name, 16);
               RAND_pseudo_bytes(iv, EVP_MAX_IV_LENGTH);
      -
               EVP_EncryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), NULL,
      -                           ticket->aes_key, iv);
      +                           ticket_key->aes_key, iv);
      +        HMAC_Init_ex(hctx, ticket_key->hmac_secret, 16, tlsext_tick_md(), NULL);
       
      -        HMAC_Init_ex(hctx, ticket->hmac_secret, 16, tlsext_tick_md(), NULL);
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02289)
      +                      "TLS session ticket key for %s successfully set, "
      +                      "creating new session ticket", sc->vhost_id);
       
               return 0;
           }
           else if (mode == 0) {
      -        /* Setup contextes for decryption, based on the keyname input */
      -        int i;
      -        modssl_ticket_t* ticket = NULL;
      -
      -        for (i = 0; i < sc->tickets->nelts; i++) {
      -            modssl_ticket_t* itticket = APR_ARRAY_IDX(sc->tickets, i, modssl_ticket_t*);
      -            if (memcmp(keyname, itticket->key_name, 16) == 0) {
      -                ticket = itticket;
      -                break;
      -            }
      -        }
      +        /* 
      +         * OpenSSL is asking for the decryption key,
      +         * see t1_lib.c:tls_decrypt_ticket()
      +         */
       
      -        if (ticket == NULL) {
      -            /* Ticket key not found, but no error */
      +        /* check key name */
      +        if (ticket_key == NULL || memcmp(keyname, ticket_key->key_name, 16)) {
                   return 0;
               }
       
      -        EVP_DecryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), NULL, ticket->aes_key, iv);
      +        EVP_DecryptInit_ex(cipher_ctx, EVP_aes_128_cbc(), NULL,
      +                           ticket_key->aes_key, iv);
      +        HMAC_Init_ex(hctx, ticket_key->hmac_secret, 16, tlsext_tick_md(), NULL);
      +
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(02290)
      +                      "TLS session ticket key for %s successfully set, "
      +                      "decrypting existing session ticket", sc->vhost_id);
      +
      +        return 1;
      +    }
      +
      +    /* OpenSSL is not expected to call us with modes other than 1 or 0 */
      +    return -1;
      +}
      +#endif /* HAVE_TLS_SESSION_TICKETS */
      +
      +#ifdef HAVE_TLS_ALPN
      +
      +/*
      + * This callback function is executed when the TLS Application-Layer
      + * Protocol Negotiation Extension (ALPN, RFC 7301) is triggered by the Client
      + * Hello, giving a list of desired protocol names (in descending preference) 
      + * to the server.
      + * The callback has to select a protocol name or return an error if none of
      + * the clients preferences is supported.
      + * The selected protocol does not have to be on the client list, according
      + * to RFC 7301, so no checks are performed.
      + * The client protocol list is serialized as length byte followed by ASCII
      + * characters (not null-terminated), followed by the next protocol name.
      + */
      +int ssl_callback_alpn_select(SSL *ssl,
      +                             const unsigned char **out, unsigned char *outlen,
      +                             const unsigned char *in, unsigned int inlen,
      +                             void *arg)
      +{
      +    conn_rec *c = (conn_rec*)SSL_get_app_data(ssl);
      +    SSLConnRec *sslconn = myConnConfig(c);
      +    apr_array_header_t *client_protos;
      +    const char *proposed;
      +    size_t len;
      +    int i;
      +
      +    /* If the connection object is not available,
      +     * then there's nothing for us to do. */
      +    if (c == NULL) {
      +        return SSL_TLSEXT_ERR_OK;
      +    }
       
      -        HMAC_Init_ex(hctx, ticket->hmac_secret, 16, tlsext_tick_md(), NULL);
      +    if (inlen == 0) {
      +        /* someone tries to trick us? */
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02837)
      +                      "ALPN client protocol list empty");
      +        return SSL_TLSEXT_ERR_ALERT_FATAL;
      +    }
       
      -        if (ticket != sc->default_ticket) {
      -            /* Ticket key found, we did our stuff, but didn't use the default,
      -             * re-issue a ticket with the default ticket */
      -            return 2;
      +    client_protos = apr_array_make(c->pool, 0, sizeof(char *));
      +    for (i = 0; i < inlen; /**/) {
      +        unsigned int plen = in[i++];
      +        if (plen + i > inlen) {
      +            /* someone tries to trick us? */
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02838)
      +                          "ALPN protocol identifier too long");
      +            return SSL_TLSEXT_ERR_ALERT_FATAL;
               }
      -        else {
      -            return 1;
      +        APR_ARRAY_PUSH(client_protos, char *) =
      +            apr_pstrndup(c->pool, (const char *)in+i, plen);
      +        i += plen;
      +    }
      +
      +    /* The order the callbacks are invoked from TLS extensions is, unfortunately
      +     * not defined and older openssl versions do call ALPN selection before
      +     * they callback the SNI. We need to make sure that we know which vhost
      +     * we are dealing with so we respect the correct protocols.
      +     */
      +    init_vhost(c, ssl);
      +    
      +    proposed = ap_select_protocol(c, NULL, sslconn->server, client_protos);
      +    if (!proposed) {
      +        proposed = ap_get_protocol(c);
      +    }
      +    
      +    len = strlen(proposed);
      +    if (len > 255) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02840)
      +                      "ALPN negotiated protocol name too long");
      +        return SSL_TLSEXT_ERR_ALERT_FATAL;
      +    }
      +    *out = (const unsigned char *)proposed;
      +    *outlen = (unsigned char)len;
      +        
      +    if (strcmp(proposed, ap_get_protocol(c))) {
      +        apr_status_t status;
      +        
      +        status = ap_switch_protocol(c, NULL, sslconn->server, proposed);
      +        if (status != APR_SUCCESS) {
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, status, c,
      +                          APLOGNO(02908) "protocol switch to '%s' failed",
      +                          proposed);
      +            return SSL_TLSEXT_ERR_ALERT_FATAL;
               }
           }
       
      -    /* TODO: log invalid use */
      -    return -1;
      +    return SSL_TLSEXT_ERR_OK;
       }
      +#endif /* HAVE_TLS_ALPN */
       
      -#endif
      +#ifdef HAVE_SRP
      +
      +int ssl_callback_SRPServerParams(SSL *ssl, int *ad, void *arg)
      +{
      +    modssl_ctx_t *mctx = (modssl_ctx_t *)arg;
      +    char *username = SSL_get_srp_username(ssl);
      +    SRP_user_pwd *u;
      +
      +    if (username == NULL
      +        || (u = SRP_VBASE_get_by_user(mctx->srp_vbase, username)) == NULL) {
      +        *ad = SSL_AD_UNKNOWN_PSK_IDENTITY;
      +        return SSL3_AL_FATAL;
      +    }
      +
      +    if (SSL_set_srp_server_param(ssl, u->N, u->g, u->s, u->v, u->info) < 0) {
      +        *ad = SSL_AD_INTERNAL_ERROR;
      +        return SSL3_AL_FATAL;
      +    }
      +
      +    /* reset all other options */
      +    SSL_set_verify(ssl, SSL_VERIFY_NONE,  ssl_callback_SSLVerify);
      +    return SSL_ERROR_NONE;
      +}
      +
      +#endif /* HAVE_SRP */
      diff --git a/modules/ssl/ssl_engine_log.c b/modules/ssl/ssl_engine_log.c
      index 31861ca721e..d2f9ed0aaa8 100644
      --- a/modules/ssl/ssl_engine_log.c
      +++ b/modules/ssl/ssl_engine_log.c
      @@ -63,14 +63,19 @@ static const char *ssl_log_annotation(const char *error)
           return ssl_log_annotate[i].cpAnnotation;
       }
       
      -void ssl_die(void)
      +apr_status_t ssl_die(server_rec *s)
       {
      -    /*
      -     * This is used for fatal errors and here
      -     * it is common module practice to really
      -     * exit from the complete program.
      -     */
      -    exit(1);
      +    if (s != NULL && s->is_virtual && s->error_fname != NULL)
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, APLOGNO(02311)
      +                     "Fatal error initialising mod_ssl, exiting. "
      +                     "See %s for more information",
      +                     ap_server_root_relative(s->process->pool,
      +                                             s->error_fname));
      +    else
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, APLOGNO(02312)
      +                     "Fatal error initialising mod_ssl, exiting.");
      +
      +    return APR_EGENERAL;
       }
       
       /*
      @@ -136,8 +141,8 @@ static void ssl_log_cert_error(const char *file, int line, int level,
                   int maxdnlen = (HUGE_STRING_LEN - msglen - 300) / 2;
       
                   BIO_puts(bio, " [subject: ");
      -            name = SSL_X509_NAME_to_string(p, X509_get_subject_name(cert),
      -                                           maxdnlen);
      +            name = modssl_X509_NAME_to_string(p, X509_get_subject_name(cert),
      +                                              maxdnlen);
                   if (!strIsEmpty(name)) {
                       BIO_puts(bio, name);
                   } else {
      @@ -145,8 +150,8 @@ static void ssl_log_cert_error(const char *file, int line, int level,
                   }
       
                   BIO_puts(bio, " / issuer: ");
      -            name = SSL_X509_NAME_to_string(p, X509_get_issuer_name(cert),
      -                                           maxdnlen);
      +            name = modssl_X509_NAME_to_string(p, X509_get_issuer_name(cert),
      +                                              maxdnlen);
                   if (!strIsEmpty(name)) {
                       BIO_puts(bio, name);
                   } else {
      diff --git a/modules/ssl/ssl_engine_mutex.c b/modules/ssl/ssl_engine_mutex.c
      index c7f8582442c..e915a163d27 100644
      --- a/modules/ssl/ssl_engine_mutex.c
      +++ b/modules/ssl/ssl_engine_mutex.c
      @@ -72,11 +72,11 @@ int ssl_mutex_reinit(server_rec *s, apr_pool_t *p)
                                                 lockfile,
                                                 p)) != APR_SUCCESS) {
               if (lockfile)
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(02024)
                                "Cannot reinit %s mutex with file `%s'",
                                SSL_CACHE_MUTEX_TYPE, lockfile);
               else
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(02025)
                                "Cannot reinit %s mutex", SSL_CACHE_MUTEX_TYPE);
               return FALSE;
           }
      @@ -89,7 +89,7 @@ int ssl_mutex_on(server_rec *s)
           apr_status_t rv;
       
           if ((rv = apr_global_mutex_lock(mc->pMutex)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(02026)
                            "Failed to acquire SSL session cache lock");
               return FALSE;
           }
      @@ -102,7 +102,7 @@ int ssl_mutex_off(server_rec *s)
           apr_status_t rv;
       
           if ((rv = apr_global_mutex_unlock(mc->pMutex)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(02027)
                            "Failed to release SSL session cache lock");
               return FALSE;
           }
      diff --git a/modules/ssl/ssl_engine_ocsp.c b/modules/ssl/ssl_engine_ocsp.c
      index b6920bf5fac..f2956511d4c 100644
      --- a/modules/ssl/ssl_engine_ocsp.c
      +++ b/modules/ssl/ssl_engine_ocsp.c
      @@ -73,7 +73,7 @@ static apr_uri_t *determine_responder_uri(SSLSrvConfigRec *sc, X509 *cert,
           }
       
           if (s == NULL) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01918)
                             "no OCSP responder specified in certificate and "
                             "no default configured");
               return NULL;
      @@ -81,13 +81,13 @@ static apr_uri_t *determine_responder_uri(SSLSrvConfigRec *sc, X509 *cert,
       
           rv = apr_uri_parse(p, s, u);
           if (rv || !u->hostname) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(01919)
                             "failed to parse OCSP responder URI '%s'", s);
               return NULL;
           }
       
           if (strcasecmp(u->scheme, "http") != 0) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(01920)
                             "cannot handle OCSP responder URI '%s'", s);
               return NULL;
           }
      @@ -104,19 +104,22 @@ static apr_uri_t *determine_responder_uri(SSLSrvConfigRec *sc, X509 *cert,
        * request object on success, or NULL on error. */
       static OCSP_REQUEST *create_request(X509_STORE_CTX *ctx, X509 *cert,
                                           OCSP_CERTID **certid,
      -                                    server_rec *s, apr_pool_t *p)
      +                                    server_rec *s, apr_pool_t *p,
      +                                    SSLSrvConfigRec *sc)
       {
           OCSP_REQUEST *req = OCSP_REQUEST_new();
       
           *certid = OCSP_cert_to_id(NULL, cert, ctx->current_issuer);
           if (!*certid || !OCSP_request_add0_id(req, *certid)) {
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01921)
                            "could not retrieve certificate id");
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
               return NULL;
           }
       
      -    OCSP_request_add1_nonce(req, 0, -1);
      +    if (sc->server->ocsp_use_request_nonce != FALSE) {
      +        OCSP_request_add1_nonce(req, 0, -1);
      +    }
       
           return req;
       }
      @@ -139,7 +142,7 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
               return V_OCSP_CERTSTATUS_UNKNOWN;
           }
       
      -    request = create_request(ctx, cert, &certID, s, pool);
      +    request = create_request(ctx, cert, &certID, s, pool, sc);
           if (request) {
               apr_interval_time_t to = sc->server->ocsp_responder_timeout == UNSET ?
                                        apr_time_from_sec(DEFAULT_OCSP_TIMEOUT) :
      @@ -155,7 +158,7 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
               int r = OCSP_response_status(response);
       
               if (r != OCSP_RESPONSE_STATUS_SUCCESSFUL) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01922)
                                "OCSP response not successful: %d", rc);
                   rc = V_OCSP_CERTSTATUS_UNKNOWN;
               }
      @@ -164,27 +167,27 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
           if (rc == V_OCSP_CERTSTATUS_GOOD) {
               basicResponse = OCSP_response_get1_basic(response);
               if (!basicResponse) {
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01923)
                                 "could not retrieve OCSP basic response");
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                   rc = V_OCSP_CERTSTATUS_UNKNOWN;
               }
           }
       
      -    if (rc == V_OCSP_CERTSTATUS_GOOD) {
      -        if (OCSP_check_nonce(request, basicResponse) != 1) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                        "Bad OCSP responder answer (bad nonce)");
      -            rc = V_OCSP_CERTSTATUS_UNKNOWN;
      -        }
      +    if (rc == V_OCSP_CERTSTATUS_GOOD &&
      +            sc->server->ocsp_use_request_nonce != FALSE &&
      +            OCSP_check_nonce(request, basicResponse) != 1) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01924)
      +                    "Bad OCSP responder answer (bad nonce)");
      +        rc = V_OCSP_CERTSTATUS_UNKNOWN;
           }
       
           if (rc == V_OCSP_CERTSTATUS_GOOD) {
               /* TODO: allow flags configuration. */
               if (OCSP_basic_verify(basicResponse, NULL, ctx->ctx, 0) != 1) {
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01925)
                               "failed to verify the OCSP response");
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                   rc = V_OCSP_CERTSTATUS_UNKNOWN;
               }
           }
      @@ -196,9 +199,9 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
               rc = OCSP_resp_find_status(basicResponse, certID, &status,
                                          &reason, NULL, &thisup, &nextup);
               if (rc != 1) {
      -            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -            ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert,
      +            ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert, APLOGNO(02272)
                                   "failed to retrieve OCSP response status");
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                   rc = V_OCSP_CERTSTATUS_UNKNOWN;
               }
               else {
      @@ -216,9 +219,9 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
                   int vrc  = OCSP_check_validity(thisup, nextup, resptime_skew,
                                                  sc->server->ocsp_resp_maxage);
                   if (vrc != 1) {
      -                ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
      -                ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert,
      +                ssl_log_cxerror(SSLLOG_MARK, APLOG_ERR, 0, c, cert, APLOGNO(02273)
                                       "OCSP response outside validity period");
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                       rc = V_OCSP_CERTSTATUS_UNKNOWN;
                   }
               }
      @@ -230,7 +233,7 @@ static int verify_ocsp_status(X509 *cert, X509_STORE_CTX *ctx, conn_rec *c,
                       status == V_OCSP_CERTSTATUS_GOOD ? "good" :
                       (status == V_OCSP_CERTSTATUS_REVOKED ? "revoked" : "unknown");
       
      -            ssl_log_cxerror(SSLLOG_MARK, level, 0, c, cert,
      +            ssl_log_cxerror(SSLLOG_MARK, level, 0, c, cert, APLOGNO(03239)
                                   "OCSP validation completed, "
                                   "certificate status: %s (%d, %d)",
                                   result, status, reason);
      diff --git a/modules/ssl/ssl_engine_pphrase.c b/modules/ssl/ssl_engine_pphrase.c
      index ca26e247925..4099864fe57 100644
      --- a/modules/ssl/ssl_engine_pphrase.c
      +++ b/modules/ssl/ssl_engine_pphrase.c
      @@ -30,11 +30,31 @@
                                                  -- Clifford Stoll     */
       #include "ssl_private.h"
       
      +typedef struct {
      +    server_rec         *s;
      +    apr_pool_t         *p;
      +    apr_array_header_t *aPassPhrase;
      +    int                 nPassPhraseCur;
      +    char               *cpPassPhraseCur;
      +    int                 nPassPhraseDialog;
      +    int                 nPassPhraseDialogCur;
      +    BOOL                bPassPhraseDialogOnce;
      +    const char         *key_id;
      +    const char         *pkey_file;
      +} pphrase_cb_arg_t;
      +
      +#ifdef HAVE_ECC
      +static const char *key_types[] = {"RSA", "DSA", "ECC"};
      +#else
      +static const char *key_types[] = {"RSA", "DSA"};
      +#endif
      +
       /*
        * Return true if the named file exists and is readable
        */
       
      -static apr_status_t exists_and_readable(char *fname, apr_pool_t *pool, apr_time_t *mtime)
      +static apr_status_t exists_and_readable(const char *fname, apr_pool_t *pool,
      +                                        apr_time_t *mtime)
       {
           apr_status_t stat;
           apr_finfo_t sbuf;
      @@ -73,11 +93,11 @@ static apr_status_t exists_and_readable(char *fname, apr_pool_t *pool, apr_time_
        * since apr_array_push() will apr_alloc arr->nalloc * 2 elts,
        * leaving the original arr->elts to waste.
        */
      -static char *asn1_table_vhost_key(SSLModConfigRec *mc, apr_pool_t *p,
      -                                  char *id, char *an)
      +static const char *asn1_table_vhost_key(SSLModConfigRec *mc, apr_pool_t *p,
      +                                  const char *id, int i)
       {
           /* 'p' pool used here is cleared on restarts (or sooner) */
      -    char *key = apr_psprintf(p, "%s:%s", id, an);
      +    char *key = apr_psprintf(p, "%s:%d", id, i);
           void *keyptr = apr_hash_get(mc->tVHostKeys, key,
                                       APR_HASH_KEY_STRING);
       
      @@ -103,12 +123,6 @@ static char *asn1_table_vhost_key(SSLModConfigRec *mc, apr_pool_t *p,
       static apr_file_t *writetty = NULL;
       static apr_file_t *readtty = NULL;
       
      -/*
      - * sslc has a nasty flaw where its
      - * PEM_read_bio_PrivateKey does not take a callback arg.
      - */
      -static server_rec *ssl_pphrase_server_rec = NULL;
      -
       int ssl_pphrase_Handle_CB(char *, int, int, void *);
       
       static char *pphrase_array_get(apr_array_header_t *arr, int idx)
      @@ -120,459 +134,260 @@ static char *pphrase_array_get(apr_array_header_t *arr, int idx)
           return ((char **)arr->elts)[idx];
       }
       
      -static void pphrase_array_clear(apr_array_header_t *arr)
      -{
      -    if (arr->nelts > 0) {
      -        memset(arr->elts, 0, arr->elt_size * arr->nelts);
      -    }
      -    arr->nelts = 0;
      -}
      -
      -/* Abandon all hope, ye who read this code.  Don't believe the name:
      - * "passphrase handling" is really a peripheral (if complex) concern;
      - * the core purpose of this function to load into memory all
      - * configured certs and key from files.  The private key handling in
      - * here should be split out into a separate function for improved
      - * readability.  The myCtxVarGet abomination can be thrown away with
      - * SSLC support, vastly simplifying the code. */
      -void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
      +apr_status_t ssl_load_encrypted_pkey(server_rec *s, apr_pool_t *p, int idx,
      +                                     const char *pkey_file,
      +                                     apr_array_header_t **pphrases)
       {
           SSLModConfigRec *mc = myModConfig(s);
      -    SSLSrvConfigRec *sc;
      -    server_rec *pServ;
      -    char *cpVHostID;
      -    char szPath[MAX_STRING_LEN];
      -    EVP_PKEY *pPrivateKey;
      +    SSLSrvConfigRec *sc = mySrvConfig(s);
      +    const char *key_id = asn1_table_vhost_key(mc, p, sc->vhost_id, idx);
      +    EVP_PKEY *pPrivateKey = NULL;
           ssl_asn1_t *asn1;
           unsigned char *ucp;
           long int length;
      -    X509 *pX509Cert;
           BOOL bReadable;
      -    apr_array_header_t *aPassPhrase;
      -    int nPassPhrase;
      -    int nPassPhraseCur;
      -    char *cpPassPhraseCur;
      -    int nPassPhraseRetry;
      -    int nPassPhraseDialog;
      -    int nPassPhraseDialogCur;
      -    BOOL bPassPhraseDialogOnce;
      -    char **cpp;
      -    int i, j;
      -    ssl_algo_t algoCert, algoKey, at;
      -    char *an;
      +    int nPassPhrase = (*pphrases)->nelts;
      +    int nPassPhraseRetry = 0;
           apr_time_t pkey_mtime = 0;
           apr_status_t rv;
      -    /*
      -     * Start with a fresh pass phrase array
      -     */
      -    aPassPhrase       = apr_array_make(p, 2, sizeof(char *));
      -    nPassPhrase       = 0;
      -    nPassPhraseDialog = 0;
      +    pphrase_cb_arg_t ppcb_arg;
      +
      +    if (!pkey_file) {
      +         ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02573)
      +                      "Init: No private key specified for %s", key_id);
      +         return ssl_die(s);
      +    }
      +    else if ((rv = exists_and_readable(pkey_file, p, &pkey_mtime))
      +             != APR_SUCCESS ) {
      +         ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(02574)
      +                      "Init: Can't open server private key file %s", pkey_file);
      +         return ssl_die(s);
      +    }
      +
      +    ppcb_arg.s                     = s;
      +    ppcb_arg.p                     = p;
      +    ppcb_arg.aPassPhrase           = *pphrases;
      +    ppcb_arg.nPassPhraseCur        = 0;
      +    ppcb_arg.cpPassPhraseCur       = NULL;
      +    ppcb_arg.nPassPhraseDialog     = 0;
      +    ppcb_arg.nPassPhraseDialogCur  = 0;
      +    ppcb_arg.bPassPhraseDialogOnce = TRUE;
      +    ppcb_arg.key_id                = key_id;
      +    ppcb_arg.pkey_file             = pkey_file;
       
           /*
      -     * Walk through all configured servers
      +     * if the private key is encrypted and SSLPassPhraseDialog
      +     * is configured to "builtin" it isn't possible to prompt for
      +     * a password after httpd has detached from the tty.
      +     * in this case if we already have a private key and the
      +     * file name/mtime hasn't changed, then reuse the existing key.
      +     * we also reuse existing private keys that were encrypted for
      +     * exec: and pipe: dialogs to minimize chances to snoop the
      +     * password.  that and pipe: dialogs might prompt the user
      +     * for password, which on win32 for example could happen 4
      +     * times at startup.  twice for each child and twice within
      +     * each since apache "restarts itself" on startup.
      +     * of course this will not work for the builtin dialog if
      +     * the server was started without LoadModule ssl_module
      +     * configured, then restarted with it configured.
      +     * but we fall through with a chance of success if the key
      +     * is not encrypted or can be handled via exec or pipe dialog.
      +     * and in the case of fallthrough, pkey_mtime and isatty()
      +     * are used to give a better idea as to what failed.
            */
      -    for (pServ = s; pServ != NULL; pServ = pServ->next) {
      -        sc = mySrvConfig(pServ);
      -        cpVHostID = ssl_util_vhostid(p, pServ);
      -        if (!sc->enabled) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
      -                         "SSL not enabled on vhost %s, skipping SSL setup",
      -                         cpVHostID);
      -            continue;
      +    if (pkey_mtime) {
      +        ssl_asn1_t *asn1 = ssl_asn1_table_get(mc->tPrivateKey, key_id);
      +        if (asn1 && (asn1->source_mtime == pkey_mtime)) {
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02575)
      +                         "Reusing existing private key from %s on restart",
      +                         ppcb_arg.pkey_file);
      +            return APR_SUCCESS;
               }
      +    }
       
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, pServ,
      -                     "Loading certificate & private key of SSL-aware server '%s'",
      -                     cpVHostID);
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(02576)
      +                 "Attempting to load encrypted (?) private key %s", key_id);
       
      +    for (;;) {
               /*
      -         * Read in server certificate(s): This is the easy part
      -         * because this file isn't encrypted in any way.
      +         * Try to read the private key file with the help of
      +         * the callback function which serves the pass
      +         * phrases to OpenSSL
                */
      -        if (sc->server->pks->cert_files[0] == NULL
      -            && sc->server->pkcs7 == NULL) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, pServ,
      -                         "Server should be SSL-aware but has no certificate "
      -                         "configured [Hint: SSLCertificateFile] (%s:%d)",
      -                         pServ->defn_name, pServ->defn_line_number);
      -            ssl_die();
      -        }
       
      -        /* Bitmasks for all key algorithms configured for this server;
      -         * initialize to zero. */
      -        algoCert = SSL_ALGO_UNKNOWN;
      -        algoKey  = SSL_ALGO_UNKNOWN;
      -
      -        /* Iterate through configured certificate files for this
      -         * server. */
      -        for (i = 0, j = 0; i < SSL_AIDX_MAX
      -                 && (sc->server->pks->cert_files[i] != NULL
      -                     || sc->server->pkcs7); i++) {
      -            const char *key_id;
      -            int using_cache = 0;
      -
      -            if (sc->server->pkcs7) {
      -                STACK_OF(X509) *certs = ssl_read_pkcs7(pServ,
      -                                                       sc->server->pkcs7);
      -                pX509Cert = sk_X509_value(certs, 0);
      -                i = SSL_AIDX_MAX;
      -            } else {
      -                apr_cpystrn(szPath, sc->server->pks->cert_files[i],
      -                            sizeof(szPath));
      -                if ((rv = exists_and_readable(szPath, p, NULL))
      -                    != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      -                                 "Init: Can't open server certificate file %s",
      -                                 szPath);
      -                    ssl_die();
      -                }
      -                if ((pX509Cert = SSL_read_X509(szPath, NULL, NULL)) == NULL) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                                 "Init: Unable to read server certificate from"
      -                                 " file %s", szPath);
      -                    ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -                    ssl_die();
      -                }
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                             "Init: Read server certificate from '%s'",
      -                             szPath);
      -            }
      -            /*
      -             * check algorithm type of certificate and make
      -             * sure only one certificate per type is used.
      -             */
      -            at = ssl_util_algotypeof(pX509Cert, NULL);
      -            an = ssl_util_algotypestr(at);
      -            if (algoCert & at) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                             "Init: Multiple %s server certificates not "
      -                             "allowed", an);
      -                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -                ssl_die();
      -            }
      -            algoCert |= at;
      +        ppcb_arg.cpPassPhraseCur = NULL;
       
      -            /* Determine the hash key used for this (vhost, algo-type)
      -             * pair used to index both the mc->tPrivateKey and
      -             * mc->tPublicCert tables: */
      -            key_id = asn1_table_vhost_key(mc, p, cpVHostID, an);
      +        /* Ensure that the error stack is empty; some SSL
      +         * functions will fail spuriously if the error stack
      +         * is not empty. */
      +        ERR_clear_error();
       
      -            /*
      -             * Insert the certificate into global module configuration to let it
      -             * survive the processing between the 1st Apache API init round (where
      -             * we operate here) and the 2nd Apache init round (where the
      -             * certificate is actually used to configure mod_ssl's per-server
      -             * configuration structures).
      -             */
      -            length = i2d_X509(pX509Cert, NULL);
      -            ucp = ssl_asn1_table_set(mc->tPublicCert, key_id, length);
      -            (void)i2d_X509(pX509Cert, &ucp); /* 2nd arg increments */
      +        bReadable = ((pPrivateKey = modssl_read_privatekey(ppcb_arg.pkey_file,
      +                     NULL, ssl_pphrase_Handle_CB, &ppcb_arg)) != NULL ?
      +                     TRUE : FALSE);
       
      -            /*
      -             * Free the X509 structure
      -             */
      -            X509_free(pX509Cert);
      -
      -            /*
      -             * Read in the private key: This is the non-trivial part, because the
      -             * key is typically encrypted, so a pass phrase dialog has to be used
      -             * to request it from the user (or it has to be alternatively gathered
      -             * from a dialog program). The important point here is that ISPs
      -             * usually have hundrets of virtual servers configured and a lot of
      -             * them use SSL, so really we have to minimize the pass phrase
      -             * dialogs.
      -             *
      -             * The idea is this: When N virtual hosts are configured and all of
      -             * them use encrypted private keys with different pass phrases, we
      -             * have no chance and have to pop up N pass phrase dialogs. But
      -             * usually the admin is clever enough and uses the same pass phrase
      -             * for more private key files (typically he even uses one single pass
      -             * phrase for all). When this is the case we can minimize the dialogs
      -             * by trying to re-use already known/entered pass phrases.
      -             */
      -            if (sc->server->pks->key_files[j] != NULL)
      -                apr_cpystrn(szPath, sc->server->pks->key_files[j++], sizeof(szPath));
      -
      -            /*
      -             * Try to read the private key file with the help of
      -             * the callback function which serves the pass
      -             * phrases to OpenSSL
      -             */
      -            myCtxVarSet(mc,  1, pServ);
      -            myCtxVarSet(mc,  2, p);
      -            myCtxVarSet(mc,  3, aPassPhrase);
      -            myCtxVarSet(mc,  4, &nPassPhraseCur);
      -            myCtxVarSet(mc,  5, &cpPassPhraseCur);
      -            myCtxVarSet(mc,  6, cpVHostID);
      -            myCtxVarSet(mc,  7, an);
      -            myCtxVarSet(mc,  8, &nPassPhraseDialog);
      -            myCtxVarSet(mc,  9, &nPassPhraseDialogCur);
      -            myCtxVarSet(mc, 10, &bPassPhraseDialogOnce);
      -
      -            nPassPhraseCur        = 0;
      -            nPassPhraseRetry      = 0;
      -            nPassPhraseDialogCur  = 0;
      -            bPassPhraseDialogOnce = TRUE;
      -
      -            pPrivateKey = NULL;
      -
      -            for (;;) {
      -                /*
      -                 * Try to read the private key file with the help of
      -                 * the callback function which serves the pass
      -                 * phrases to OpenSSL
      -                 */
      -                if ((rv = exists_and_readable(szPath, p,
      -                                              &pkey_mtime)) != APR_SUCCESS ) {
      -                     ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      -                                  "Init: Can't open server private key file "
      -                                  "%s",szPath);
      -                     ssl_die();
      -                }
      -
      -                /*
      -                 * if the private key is encrypted and SSLPassPhraseDialog
      -                 * is configured to "builtin" it isn't possible to prompt for
      -                 * a password after httpd has detached from the tty.
      -                 * in this case if we already have a private key and the
      -                 * file name/mtime hasn't changed, then reuse the existing key.
      -                 * we also reuse existing private keys that were encrypted for
      -                 * exec: and pipe: dialogs to minimize chances to snoop the
      -                 * password.  that and pipe: dialogs might prompt the user
      -                 * for password, which on win32 for example could happen 4
      -                 * times at startup.  twice for each child and twice within
      -                 * each since apache "restarts itself" on startup.
      -                 * of course this will not work for the builtin dialog if
      -                 * the server was started without LoadModule ssl_module
      -                 * configured, then restarted with it configured.
      -                 * but we fall through with a chance of success if the key
      -                 * is not encrypted or can be handled via exec or pipe dialog.
      -                 * and in the case of fallthrough, pkey_mtime and isatty()
      -                 * are used to give a better idea as to what failed.
      -                 */
      -                if (pkey_mtime) {
      -                    ssl_asn1_t *asn1 =
      -                        ssl_asn1_table_get(mc->tPrivateKey, key_id);
      -
      -                    if (asn1 && (asn1->source_mtime == pkey_mtime)) {
      -                        ap_log_error(APLOG_MARK, APLOG_INFO,
      -                                     0, pServ,
      -                                     "%s reusing existing "
      -                                     "%s private key on restart",
      -                                     cpVHostID, ssl_asn1_keystr(i));
      -                        using_cache = 1;
      -                        break;
      -                    }
      -                }
      +        /*
      +         * when the private key file now was readable,
      +         * it's fine and we go out of the loop
      +         */
      +        if (bReadable)
      +           break;
       
      -                cpPassPhraseCur = NULL;
      -                ssl_pphrase_server_rec = s; /* to make up for sslc flaw */
      -
      -                /* Ensure that the error stack is empty; some SSL
      -                 * functions will fail spuriously if the error stack
      -                 * is not empty. */
      -                ERR_clear_error();
      -
      -                bReadable = ((pPrivateKey = SSL_read_PrivateKey(szPath, NULL,
      -                            ssl_pphrase_Handle_CB, s)) != NULL ? TRUE : FALSE);
      -
      -                /*
      -                 * when the private key file now was readable,
      -                 * it's fine and we go out of the loop
      -                 */
      -                if (bReadable)
      -                   break;
      -
      -                /*
      -                 * when we have more remembered pass phrases
      -                 * try to reuse these first.
      -                 */
      -                if (nPassPhraseCur < nPassPhrase) {
      -                    nPassPhraseCur++;
      -                    continue;
      -                }
      +        /*
      +         * when we have more remembered pass phrases
      +         * try to reuse these first.
      +         */
      +        if (ppcb_arg.nPassPhraseCur < nPassPhrase) {
      +            ppcb_arg.nPassPhraseCur++;
      +            continue;
      +        }
       
      -                /*
      -                 * else it's not readable and we have no more
      -                 * remembered pass phrases. Then this has to mean
      -                 * that the callback function popped up the dialog
      -                 * but a wrong pass phrase was entered.  We give the
      -                 * user (but not the dialog program) a few more
      -                 * chances...
      -                 */
      +        /*
      +         * else it's not readable and we have no more
      +         * remembered pass phrases. Then this has to mean
      +         * that the callback function popped up the dialog
      +         * but a wrong pass phrase was entered.  We give the
      +         * user (but not the dialog program) a few more
      +         * chances...
      +         */
       #ifndef WIN32
      -                if ((sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
      -                       || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE)
      +        if ((sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN
      +             || sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE)
       #else
      -                if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE
      +        if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE
       #endif
      -                    && cpPassPhraseCur != NULL
      -                    && nPassPhraseRetry < BUILTIN_DIALOG_RETRIES ) {
      -                    apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase incorrect "
      -                            "(%d more retr%s permitted).\n",
      -                            (BUILTIN_DIALOG_RETRIES-nPassPhraseRetry),
      -                            (BUILTIN_DIALOG_RETRIES-nPassPhraseRetry) == 1 ? "y" : "ies");
      -                    nPassPhraseRetry++;
      -                    if (nPassPhraseRetry > BUILTIN_DIALOG_BACKOFF)
      -                        apr_sleep((nPassPhraseRetry-BUILTIN_DIALOG_BACKOFF)
      -                                    * 5 * APR_USEC_PER_SEC);
      -                    continue;
      -                }
      +            && ppcb_arg.cpPassPhraseCur != NULL
      +            && nPassPhraseRetry < BUILTIN_DIALOG_RETRIES ) {
      +            apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase incorrect "
      +                    "(%d more retr%s permitted).\n",
      +                    (BUILTIN_DIALOG_RETRIES-nPassPhraseRetry),
      +                    (BUILTIN_DIALOG_RETRIES-nPassPhraseRetry) == 1 ? "y" : "ies");
      +            nPassPhraseRetry++;
      +            if (nPassPhraseRetry > BUILTIN_DIALOG_BACKOFF)
      +                apr_sleep((nPassPhraseRetry-BUILTIN_DIALOG_BACKOFF)
      +                            * 5 * APR_USEC_PER_SEC);
      +            continue;
      +        }
       #ifdef WIN32
      -                if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN) {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                                 "Init: SSLPassPhraseDialog builtin is not "
      -                                 "supported on Win32 (key file "
      -                                 "%s)", szPath);
      -                    ssl_die();
      -                }
      +        if (sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN) {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02577)
      +                         "Init: SSLPassPhraseDialog builtin is not "
      +                         "supported on Win32 (key file "
      +                         "%s)", ppcb_arg.pkey_file);
      +            return ssl_die(s);
      +        }
       #endif /* WIN32 */
       
      -                /*
      -                 * Ok, anything else now means a fatal error.
      -                 */
      -                if (cpPassPhraseCur == NULL) {
      -                    if (nPassPhraseDialogCur && pkey_mtime &&
      -                        !isatty(fileno(stdout))) /* XXX: apr_isatty() */
      -                    {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      -                                     pServ,
      -                                     "Init: Unable to read pass phrase "
      -                                     "[Hint: key introduced or changed "
      -                                     "before restart?]");
      -                        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, pServ);
      -                    }
      -                    else {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      -                                     pServ, "Init: Private key not found");
      -                        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, pServ);
      -                    }
      -                    if (writetty) {
      -                        apr_file_printf(writetty, "Apache:mod_ssl:Error: Private key not found.\n");
      -                        apr_file_printf(writetty, "**Stopped\n");
      -                    }
      -                }
      -                else {
      -                    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, pServ,
      -                                 "Init: Pass phrase incorrect for key of %s",
      -                                 cpVHostID);
      -                    ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, pServ);
      -
      -                    if (writetty) {
      -                        apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase incorrect.\n");
      -                        apr_file_printf(writetty, "**Stopped\n");
      -                    }
      -                }
      -                ssl_die();
      -            }
      -
      -            /* If a cached private key was found, nothing more to do
      -             * here; loop through to the next configured cert for this
      -             * vhost. */
      -            if (using_cache)
      -                continue;
      -
      -            if (pPrivateKey == NULL) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                            "Init: Unable to read server private key from "
      -                            "file %s [Hint: Perhaps it is in a separate file? "
      -                            "  See SSLCertificateKeyFile]", szPath);
      -                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -                ssl_die();
      -            }
      -
      -            /*
      -             * check algorithm type of private key and make
      -             * sure only one private key per type is used.
      -             */
      -            at = ssl_util_algotypeof(NULL, pPrivateKey);
      -            an = ssl_util_algotypestr(at);
      -            if (algoKey & at) {
      -                ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                             "Init: Multiple %s server private keys not "
      -                             "allowed", an);
      -                ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      -                ssl_die();
      -            }
      -            algoKey |= at;
      -
      -            /*
      -             * Log the type of reading
      -             */
      -            if (nPassPhraseDialogCur == 0) {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, pServ,
      -                             "unencrypted %s private key - pass phrase not "
      -                             "required", an);
      +        /*
      +         * Ok, anything else now means a fatal error.
      +         */
      +        if (ppcb_arg.cpPassPhraseCur == NULL) {
      +            if (ppcb_arg.nPassPhraseDialogCur && pkey_mtime &&
      +                !isatty(fileno(stdout))) /* XXX: apr_isatty() */
      +            {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      +                             s, APLOGNO(02578)
      +                             "Init: Unable to read pass phrase "
      +                             "[Hint: key introduced or changed "
      +                             "before restart?]");
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                   }
                   else {
      -                if (cpPassPhraseCur != NULL) {
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      -                                 pServ,
      -                                 "encrypted %s private key - pass phrase "
      -                                 "requested", an);
      -                }
      -                else {
      -                    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      -                                 pServ,
      -                                 "encrypted %s private key - pass phrase"
      -                                 " reused", an);
      -                }
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      +                             s, APLOGNO(02579) "Init: Private key not found");
      +                ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
                   }
      -
      -            /*
      -             * Ok, when we have one more pass phrase store it
      -             */
      -            if (cpPassPhraseCur != NULL) {
      -                cpp = (char **)apr_array_push(aPassPhrase);
      -                *cpp = cpPassPhraseCur;
      -                nPassPhrase++;
      +            if (writetty) {
      +                apr_file_printf(writetty, "Apache:mod_ssl:Error: Private key not found.\n");
      +                apr_file_printf(writetty, "**Stopped\n");
                   }
      -
      -            /*
      -             * Insert private key into the global module configuration
      -             * (we convert it to a stand-alone DER byte sequence
      -             * because the SSL library uses static variables inside a
      -             * RSA structure which do not survive DSO reloads!)
      -             */
      -            length = i2d_PrivateKey(pPrivateKey, NULL);
      -            ucp = ssl_asn1_table_set(mc->tPrivateKey, key_id, length);
      -            (void)i2d_PrivateKey(pPrivateKey, &ucp); /* 2nd arg increments */
      -
      -            if (nPassPhraseDialogCur != 0) {
      -                /* remember mtime of encrypted keys */
      -                asn1 = ssl_asn1_table_get(mc->tPrivateKey, key_id);
      -                asn1->source_mtime = pkey_mtime;
      +        }
      +        else {
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02580)
      +                         "Init: Pass phrase incorrect for key %s",
      +                         key_id);
      +            ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +
      +            if (writetty) {
      +                apr_file_printf(writetty, "Apache:mod_ssl:Error: Pass phrase incorrect.\n");
      +                apr_file_printf(writetty, "**Stopped\n");
                   }
      +        }
      +        return ssl_die(s);
      +    }
       
      -            /*
      -             * Free the private key structure
      -             */
      -            EVP_PKEY_free(pPrivateKey);
      +    if (pPrivateKey == NULL) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(02581)
      +                     "Init: Unable to read server private key from file %s",
      +                     ppcb_arg.pkey_file);
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_EMERG, s);
      +        return ssl_die(s);
      +    }
      +
      +    /*
      +     * Log the type of reading
      +     */
      +    if (ppcb_arg.nPassPhraseDialogCur == 0) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02582)
      +                     "unencrypted %s private key - pass phrase not "
      +                     "required", key_id);
      +    }
      +    else {
      +        if (ppcb_arg.cpPassPhraseCur != NULL) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      +                         s, APLOGNO(02583)
      +                         "encrypted %s private key - pass phrase "
      +                         "requested", key_id);
      +        }
      +        else {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0,
      +                         s, APLOGNO(02584)
      +                         "encrypted %s private key - pass phrase"
      +                         " reused", key_id);
               }
           }
       
      +    /*
      +     * Ok, when we have one more pass phrase store it
      +     */
      +    if (ppcb_arg.cpPassPhraseCur != NULL) {
      +        *(const char **)apr_array_push(ppcb_arg.aPassPhrase) =
      +            ppcb_arg.cpPassPhraseCur;
      +        nPassPhrase++;
      +    }
      +
      +    /*
      +     * Insert private key into the global module configuration
      +     * (we convert it to a stand-alone DER byte sequence
      +     * because the SSL library uses static variables inside a
      +     * RSA structure which do not survive DSO reloads!)
      +     */
      +    length = i2d_PrivateKey(pPrivateKey, NULL);
      +    ucp = ssl_asn1_table_set(mc->tPrivateKey, key_id, length);
      +    (void)i2d_PrivateKey(pPrivateKey, &ucp); /* 2nd arg increments */
      +
      +    if (ppcb_arg.nPassPhraseDialogCur != 0) {
      +        /* remember mtime of encrypted keys */
      +        asn1 = ssl_asn1_table_get(mc->tPrivateKey, key_id);
      +        asn1->source_mtime = pkey_mtime;
      +    }
      +
      +    /*
      +     * Free the private key structure
      +     */
      +    EVP_PKEY_free(pPrivateKey);
      +
           /*
            * Let the user know when we're successful.
            */
      -    if (nPassPhraseDialog > 0) {
      -        sc = mySrvConfig(s);
      +    if ((ppcb_arg.nPassPhraseDialog > 0) &&
      +        (ppcb_arg.cpPassPhraseCur != NULL)) {
               if (writetty) {
                   apr_file_printf(writetty, "\n"
                                   "OK: Pass Phrase Dialog successful.\n");
               }
           }
       
      -    /*
      -     * Wipe out the used memory from the
      -     * pass phrase array and then deallocate it
      -     */
      -    if (aPassPhrase->nelts) {
      -        pphrase_array_clear(aPassPhrase);
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                     "Init: Wiped out the queried pass phrases from memory");
      -    }
      -
           /* Close the pipes if they were opened
            */
           if (readtty) {
      @@ -580,7 +395,8 @@ void ssl_pphrase_Handle(server_rec *s, apr_pool_t *p)
               apr_file_close(writetty);
               readtty = writetty = NULL;
           }
      -    return;
      +
      +    return APR_SUCCESS;
       }
       
       static apr_status_t ssl_pipe_child_create(apr_pool_t *p, const char *progname)
      @@ -599,12 +415,10 @@ static apr_status_t ssl_pipe_child_create(apr_pool_t *p, const char *progname)
                                          APR_FULL_BLOCK,
                                          APR_NO_PIPE)) == APR_SUCCESS)) {
               char **args;
      -        const char *pname;
       
               apr_tokenize_to_argv(progname, &args, p);
      -        pname = apr_pstrdup(p, args[0]);
               procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew));
      -        rc = apr_proc_create(procnew, pname, (const char * const *)args,
      +        rc = apr_proc_create(procnew, args[0], (const char * const *)args,
                                    NULL, procattr, p);
               if (rc == APR_SUCCESS) {
                   /* XXX: not sure if we aught to...
      @@ -647,45 +461,19 @@ static int pipe_get_passwd_cb(char *buf, int length, char *prompt, int verify)
       
       int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
       {
      -    SSLModConfigRec *mc;
      -    server_rec *s;
      -    apr_pool_t *p;
      -    apr_array_header_t *aPassPhrase;
      -    SSLSrvConfigRec *sc;
      -    int *pnPassPhraseCur;
      -    char **cppPassPhraseCur;
      -    char *cpVHostID;
      -    char *cpAlgoType;
      -    int *pnPassPhraseDialog;
      -    int *pnPassPhraseDialogCur;
      -    BOOL *pbPassPhraseDialogOnce;
      +    pphrase_cb_arg_t *ppcb_arg = (pphrase_cb_arg_t *)srv;
      +    SSLSrvConfigRec *sc = mySrvConfig(ppcb_arg->s);
           char *cpp;
           int len = -1;
       
      -    mc = myModConfig((server_rec *)srv);
      -
      -    /*
      -     * Reconnect to the context of ssl_phrase_Handle()
      -     */
      -    s                      = myCtxVarGet(mc,  1, server_rec *);
      -    p                      = myCtxVarGet(mc,  2, apr_pool_t *);
      -    aPassPhrase            = myCtxVarGet(mc,  3, apr_array_header_t *);
      -    pnPassPhraseCur        = myCtxVarGet(mc,  4, int *);
      -    cppPassPhraseCur       = myCtxVarGet(mc,  5, char **);
      -    cpVHostID              = myCtxVarGet(mc,  6, char *);
      -    cpAlgoType             = myCtxVarGet(mc,  7, char *);
      -    pnPassPhraseDialog     = myCtxVarGet(mc,  8, int *);
      -    pnPassPhraseDialogCur  = myCtxVarGet(mc,  9, int *);
      -    pbPassPhraseDialogOnce = myCtxVarGet(mc, 10, BOOL *);
      -    sc                     = mySrvConfig(s);
      -
      -    (*pnPassPhraseDialog)++;
      -    (*pnPassPhraseDialogCur)++;
      +    ppcb_arg->nPassPhraseDialog++;
      +    ppcb_arg->nPassPhraseDialogCur++;
       
           /*
            * When remembered pass phrases are available use them...
            */
      -    if ((cpp = pphrase_array_get(aPassPhrase, *pnPassPhraseCur)) != NULL) {
      +    if ((cpp = pphrase_array_get(ppcb_arg->aPassPhrase,
      +                                 ppcb_arg->nPassPhraseCur)) != NULL) {
               apr_cpystrn(buf, cpp, bufsize);
               len = strlen(buf);
               return len;
      @@ -701,25 +489,29 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
       
               if (sc->server->pphrase_dialog_type == SSL_PPTYPE_PIPE) {
                   if (!readtty) {
      -                ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb_arg->s,
      +                             APLOGNO(01965)
                                    "Init: Creating pass phrase dialog pipe child "
                                    "'%s'", sc->server->pphrase_dialog_path);
      -                if (ssl_pipe_child_create(p, sc->server->pphrase_dialog_path)
      +                if (ssl_pipe_child_create(ppcb_arg->p,
      +                                          sc->server->pphrase_dialog_path)
                               != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ppcb_arg->s,
      +                                 APLOGNO(01966)
                                        "Init: Failed to create pass phrase pipe '%s'",
                                        sc->server->pphrase_dialog_path);
      -                    PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
      +                    PEMerr(PEM_F_PEM_DEF_CALLBACK,
      +                           PEM_R_PROBLEMS_GETTING_PASSWORD);
                           memset(buf, 0, (unsigned int)bufsize);
                           return (-1);
                       }
                   }
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb_arg->s, APLOGNO(01967)
                                "Init: Requesting pass phrase via piped dialog");
               }
               else { /* sc->server->pphrase_dialog_type == SSL_PPTYPE_BUILTIN */
       #ifdef WIN32
      -            PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
      +            PEMerr(PEM_F_PEM_DEF_CALLBACK, PEM_R_PROBLEMS_GETTING_PASSWORD);
                   memset(buf, 0, (unsigned int)bufsize);
                   return (-1);
       #else
      @@ -729,9 +521,9 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
                    * we print the prompt to stdout before EVP_read_pw_string turns
                    * off tty echo
                    */
      -            apr_file_open_stdout(&writetty, p);
      +            apr_file_open_stdout(&writetty, ppcb_arg->p);
       
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb_arg->s, APLOGNO(01968)
                                "Init: Requesting pass phrase via builtin terminal "
                                "dialog");
       #endif
      @@ -743,16 +535,17 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
                * this terminal dialog and why to the hell he has to enter
                * something...
                */
      -        if (*pnPassPhraseDialog == 1) {
      +        if (ppcb_arg->nPassPhraseDialog == 1) {
                   apr_file_printf(writetty, "%s mod_ssl (Pass Phrase Dialog)\n",
                                   AP_SERVER_BASEVERSION);
                   apr_file_printf(writetty, "Some of your private key files are encrypted for security reasons.\n");
                   apr_file_printf(writetty, "In order to read them you have to provide the pass phrases.\n");
               }
      -        if (*pbPassPhraseDialogOnce) {
      -            *pbPassPhraseDialogOnce = FALSE;
      +        if (ppcb_arg->bPassPhraseDialogOnce) {
      +            ppcb_arg->bPassPhraseDialogOnce = FALSE;
                   apr_file_printf(writetty, "\n");
      -            apr_file_printf(writetty, "Server %s (%s)\n", cpVHostID, cpAlgoType);
      +            apr_file_printf(writetty, "Private key %s (%s)\n",
      +                            ppcb_arg->key_id, ppcb_arg->pkey_file);
               }
       
               /*
      @@ -770,7 +563,7 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
                       i = EVP_read_pw_string(buf, bufsize, "", FALSE);
                   }
                   if (i != 0) {
      -                PEMerr(PEM_F_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
      +                PEMerr(PEM_F_PEM_DEF_CALLBACK,PEM_R_PROBLEMS_GETTING_PASSWORD);
                       memset(buf, 0, (unsigned int)bufsize);
                       return (-1);
                   }
      @@ -787,19 +580,31 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
            */
           else if (sc->server->pphrase_dialog_type == SSL_PPTYPE_FILTER) {
               const char *cmd = sc->server->pphrase_dialog_path;
      -        const char **argv = apr_palloc(p, sizeof(char *) * 4);
      +        const char **argv = apr_palloc(ppcb_arg->p, sizeof(char *) * 4);
      +        const char *idx = ap_strrchr_c(ppcb_arg->key_id, ':') + 1;
               char *result;
      +        int i;
       
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, ppcb_arg->s, APLOGNO(01969)
                            "Init: Requesting pass phrase from dialog filter "
                            "program (%s)", cmd);
       
               argv[0] = cmd;
      -        argv[1] = cpVHostID;
      -        argv[2] = cpAlgoType;
      +        argv[1] = apr_pstrndup(ppcb_arg->p, ppcb_arg->key_id,
      +                               idx-1 - ppcb_arg->key_id);
      +        if ((i = atoi(idx)) < CERTKEYS_IDX_MAX+1) {
      +            /*
      +             * For compatibility with existing 2.4.x configurations, use
      +             * "RSA", "DSA" and "ECC" strings for the first two/three keys
      +             */
      +            argv[2] = key_types[i];
      +        } else {
      +            /* Four and above: use the integer index */
      +            argv[2] = apr_pstrdup(ppcb_arg->p, idx);
      +        }
               argv[3] = NULL;
       
      -        result = ssl_util_readfilter(s, p, cmd, argv);
      +        result = ssl_util_readfilter(ppcb_arg->s, ppcb_arg->p, cmd, argv);
               apr_cpystrn(buf, result, bufsize);
               len = strlen(buf);
           }
      @@ -807,11 +612,10 @@ int ssl_pphrase_Handle_CB(char *buf, int bufsize, int verify, void *srv)
           /*
            * Ok, we now have the pass phrase, so give it back
            */
      -    *cppPassPhraseCur = apr_pstrdup(p, buf);
      +    ppcb_arg->cpPassPhraseCur = apr_pstrdup(ppcb_arg->p, buf);
       
           /*
            * And return its length to OpenSSL...
            */
           return (len);
       }
      -
      diff --git a/modules/ssl/ssl_engine_rand.c b/modules/ssl/ssl_engine_rand.c
      index d3521f5cc34..4e1a9c1cdad 100644
      --- a/modules/ssl/ssl_engine_rand.c
      +++ b/modules/ssl/ssl_engine_rand.c
      @@ -81,6 +81,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                       nDone += ssl_rand_feedfp(p, fp, pRandSeed->nBytes);
                       ssl_util_ppclose(s, p, fp);
                   }
      +#ifdef HAVE_RAND_EGD
                   else if (pRandSeed->nSrc == SSL_RSSRC_EGD) {
                       /*
                        * seed in contents provided by the external
      @@ -90,6 +91,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                           continue;
                       nDone += n;
                   }
      +#endif
                   else if (pRandSeed->nSrc == SSL_RSSRC_BUILTIN) {
                       struct {
                           time_t t;
      @@ -124,7 +126,7 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                        "%sSeeding PRNG with %d bytes of entropy", prefix, nDone);
       
           if (RAND_status() == 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01990)
                            "%sPRNG still contains insufficient entropy!", prefix);
       
           return nDone;
      diff --git a/modules/ssl/ssl_engine_vars.c b/modules/ssl/ssl_engine_vars.c
      index c0e933d303d..6b14a55e3fb 100644
      --- a/modules/ssl/ssl_engine_vars.c
      +++ b/modules/ssl/ssl_engine_vars.c
      @@ -39,28 +39,40 @@
       **  _________________________________________________________________
       */
       
      -static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r, char *var);
      +static char *ssl_var_lookup_ssl(apr_pool_t *p, SSLConnRec *sslconn, request_rec *r, char *var);
       static char *ssl_var_lookup_ssl_cert(apr_pool_t *p, request_rec *r, X509 *xs, char *var);
       static char *ssl_var_lookup_ssl_cert_dn(apr_pool_t *p, X509_NAME *xsname, char *var);
      +static char *ssl_var_lookup_ssl_cert_san(apr_pool_t *p, X509 *xs, char *var);
       static char *ssl_var_lookup_ssl_cert_valid(apr_pool_t *p, ASN1_TIME *tm);
       static char *ssl_var_lookup_ssl_cert_remain(apr_pool_t *p, ASN1_TIME *tm);
       static char *ssl_var_lookup_ssl_cert_serial(apr_pool_t *p, X509 *xs);
       static char *ssl_var_lookup_ssl_cert_chain(apr_pool_t *p, STACK_OF(X509) *sk, char *var);
      +static char *ssl_var_lookup_ssl_cert_rfc4523_cea(apr_pool_t *p, SSL *ssl);
       static char *ssl_var_lookup_ssl_cert_PEM(apr_pool_t *p, X509 *xs);
      -static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, conn_rec *c);
      -static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var);
      +static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, SSLConnRec *sslconn);
      +static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, SSLConnRec *sslconn, char *var);
       static void  ssl_var_lookup_ssl_cipher_bits(SSL *ssl, int *usekeysize, int *algkeysize);
       static char *ssl_var_lookup_ssl_version(apr_pool_t *p, char *var);
       static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl);
       
      -static int ssl_is_https(conn_rec *c)
      +static SSLConnRec *ssl_get_effective_config(conn_rec *c)
       {
           SSLConnRec *sslconn = myConnConfig(c);
      +    if (!(sslconn && sslconn->ssl) && c->master) {
      +        /* use master connection if no SSL defined here */
      +        sslconn = myConnConfig(c->master);
      +    }
      +    return sslconn;
      +}
      +
      +static int ssl_is_https(conn_rec *c)
      +{
      +    SSLConnRec *sslconn = ssl_get_effective_config(c);
           return sslconn && sslconn->ssl;
       }
       
       static const char var_interface[] = "mod_ssl/" AP_SERVER_BASEREVISION;
      -static char var_library_interface[] = SSL_LIBRARY_TEXT;
      +static char var_library_interface[] = MODSSL_LIBRARY_TEXT;
       static char *var_library = NULL;
       
       static apr_array_header_t *expr_peer_ext_list_fn(ap_expr_eval_ctx_t *ctx,
      @@ -73,7 +85,17 @@ static apr_array_header_t *expr_peer_ext_list_fn(ap_expr_eval_ctx_t *ctx,
       static const char *expr_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
       {
           char *var = (char *)data;
      -    return ssl_var_lookup_ssl(ctx->p, ctx->c, ctx->r, var);
      +    SSLConnRec *sslconn = ssl_get_effective_config(ctx->c);
      +
      +    return sslconn ? ssl_var_lookup_ssl(ctx->p, sslconn, ctx->r, var) : NULL;
      +}
      +
      +static const char *expr_func_fn(ap_expr_eval_ctx_t *ctx, const void *data,
      +                                const char *arg)
      +{
      +    char *var = (char *)arg;
      +
      +    return var ? ssl_var_lookup(ctx->p, ctx->s, ctx->c, ctx->r, var) : NULL;
       }
       
       static int ssl_expr_lookup(ap_expr_lookup_parms *parms)
      @@ -90,6 +112,15 @@ static int ssl_expr_lookup(ap_expr_lookup_parms *parms)
                   return OK;
               }
               break;
      +    case AP_EXPR_FUNC_STRING:
      +        /* Function SSL() is implemented by us.
      +         */
      +        if (strcEQ(parms->name, "SSL")) {
      +            *parms->func = expr_func_fn;
      +            *parms->data = NULL;
      +            return OK;
      +        }
      +        break;
           case AP_EXPR_FUNC_LIST:
               if (strcEQ(parms->name, "PeerExtList")) {
                   *parms->func = expr_peer_ext_list_fn;
      @@ -111,7 +142,7 @@ void ssl_var_register(apr_pool_t *p)
           APR_REGISTER_OPTIONAL_FN(ssl_ext_list);
       
           /* Perform once-per-process library version determination: */
      -    var_library = apr_pstrdup(p, SSL_LIBRARY_DYNTEXT);
      +    var_library = apr_pstrdup(p, MODSSL_LIBRARY_DYNTEXT);
       
           if ((cp = strchr(var_library, ' ')) != NULL) {
               *cp = '/';
      @@ -187,9 +218,10 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
                       result = r->uri;
                   else if (strcEQ(var, "REQUEST_FILENAME"))
                       result = r->filename;
      +            else if (strcEQ(var, "REMOTE_ADDR"))
      +                result = r->useragent_ip;
                   else if (strcEQ(var, "REMOTE_HOST"))
      -                result = ap_get_remote_host(r->connection, r->per_dir_config,
      -                                            REMOTE_NAME, NULL);
      +                result = ap_get_useragent_host(r, REMOTE_NAME, NULL);
                   else if (strcEQ(var, "REMOTE_IDENT"))
                       result = ap_get_remote_logname(r);
                   else if (strcEQ(var, "REMOTE_USER"))
      @@ -238,12 +270,10 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
            * Connection stuff
            */
           if (result == NULL && c != NULL) {
      -        SSLConnRec *sslconn = myConnConfig(c);
      +        SSLConnRec *sslconn = ssl_get_effective_config(c);
               if (strlen(var) > 4 && strcEQn(var, "SSL_", 4)
                   && sslconn && sslconn->ssl)
      -            result = ssl_var_lookup_ssl(p, c, r, var+4);
      -        else if (strcEQ(var, "REMOTE_ADDR"))
      -            result = c->remote_ip;
      +            result = ssl_var_lookup_ssl(p, sslconn, r, var+4);
               else if (strcEQ(var, "HTTPS")) {
                   if (sslconn && sslconn->ssl)
                       result = "on";
      @@ -261,7 +291,7 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
               else if (strcEQ(var, "SERVER_SOFTWARE"))
                   result = ap_get_server_banner();
               else if (strcEQ(var, "API_VERSION")) {
      -            result = apr_itoa(p, MODULE_MAGIC_NUMBER);
      +            result = apr_itoa(p, MODULE_MAGIC_NUMBER_MAJOR);
                   resdup = FALSE;
               }
               else if (strcEQ(var, "TIME_YEAR")) {
      @@ -313,10 +343,9 @@ char *ssl_var_lookup(apr_pool_t *p, server_rec *s, conn_rec *c, request_rec *r,
           return (char *)result;
       }
       
      -static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r,
      -                                char *var)
      +static char *ssl_var_lookup_ssl(apr_pool_t *p, SSLConnRec *sslconn, 
      +                                request_rec *r, char *var)
       {
      -    SSLConnRec *sslconn = myConnConfig(c);
           char *result;
           X509 *xs;
           STACK_OF(X509) *sk;
      @@ -332,13 +361,21 @@ static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r,
               result = (char *)SSL_get_version(ssl);
           }
           else if (ssl != NULL && strcEQ(var, "SESSION_ID")) {
      -        char buf[SSL_SESSION_ID_STRING_LEN];
      +        char buf[MODSSL_SESSION_ID_STRING_LEN];
               SSL_SESSION *pSession = SSL_get_session(ssl);
               if (pSession) {
      -            result = apr_pstrdup(p, SSL_SESSION_id2sz(
      -                                     pSession->session_id,
      -                                     pSession->session_id_length,
      -                                     buf, sizeof(buf)));
      +            unsigned char *id;
      +            unsigned int idlen;
      +
      +#ifdef OPENSSL_NO_SSL_INTERN
      +            id = (unsigned char *)SSL_SESSION_get_id(pSession, &idlen);
      +#else
      +            id = pSession->session_id;
      +            idlen = pSession->session_id_length;
      +#endif
      +
      +            result = apr_pstrdup(p, modssl_SSL_SESSION_id2sz(id, idlen,
      +                                                             buf, sizeof(buf)));
               }
           }
           else if(ssl != NULL && strcEQ(var, "SESSION_RESUMED")) {
      @@ -348,14 +385,17 @@ static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r,
                   result = "Initial";
           }
           else if (ssl != NULL && strlen(var) >= 6 && strcEQn(var, "CIPHER", 6)) {
      -        result = ssl_var_lookup_ssl_cipher(p, c, var+6);
      +        result = ssl_var_lookup_ssl_cipher(p, sslconn, var+6);
           }
           else if (ssl != NULL && strlen(var) > 18 && strcEQn(var, "CLIENT_CERT_CHAIN_", 18)) {
               sk = SSL_get_peer_cert_chain(ssl);
               result = ssl_var_lookup_ssl_cert_chain(p, sk, var+18);
           }
      +    else if (ssl != NULL && strcEQ(var, "CLIENT_CERT_RFC4523_CEA")) {
      +        result = ssl_var_lookup_ssl_cert_rfc4523_cea(p, ssl);
      +    }
           else if (ssl != NULL && strcEQ(var, "CLIENT_VERIFY")) {
      -        result = ssl_var_lookup_ssl_cert_verify(p, c);
      +        result = ssl_var_lookup_ssl_cert_verify(p, sslconn);
           }
           else if (ssl != NULL && strlen(var) > 7 && strcEQn(var, "CLIENT_", 7)) {
               if ((xs = SSL_get_peer_certificate(ssl)) != NULL) {
      @@ -374,7 +414,7 @@ static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r,
           else if (ssl != NULL && strcEQ(var, "COMPRESS_METHOD")) {
               result = ssl_var_lookup_ssl_compress_meth(ssl);
           }
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
           else if (ssl != NULL && strcEQ(var, "TLS_SNI")) {
               result = apr_pstrdup(p, SSL_get_servername(ssl,
                                                          TLSEXT_NAMETYPE_host_name));
      @@ -387,6 +427,18 @@ static char *ssl_var_lookup_ssl(apr_pool_t *p, conn_rec *c, request_rec *r,
       #endif
               result = apr_pstrdup(p, flag ? "true" : "false");
           }
      +#ifdef HAVE_SRP
      +    else if (ssl != NULL && strcEQ(var, "SRP_USER")) {
      +        if ((result = SSL_get_srp_username(ssl)) != NULL) {
      +            result = apr_pstrdup(p, result);
      +        }
      +    }
      +    else if (ssl != NULL && strcEQ(var, "SRP_USERINFO")) {
      +        if ((result = SSL_get_srp_userinfo(ssl)) != NULL) {
      +            result = apr_pstrdup(p, result);
      +        }
      +    }
      +#endif
       
           return result;
       }
      @@ -472,6 +524,10 @@ static char *ssl_var_lookup_ssl_cert(apr_pool_t *p, request_rec *r, X509 *xs,
               result = ssl_var_lookup_ssl_cert_dn(p, xsname, var+5);
               resdup = FALSE;
           }
      +    else if (strlen(var) > 4 && strcEQn(var, "SAN_", 4)) {
      +        result = ssl_var_lookup_ssl_cert_san(p, xs, var+4);
      +        resdup = FALSE;
      +    }
           else if (strcEQ(var, "A_SIG")) {
               nid = OBJ_obj2nid((ASN1_OBJECT *)(xs->cert_info->signature->algorithm));
               result = apr_pstrdup(p,
      @@ -488,7 +544,7 @@ static char *ssl_var_lookup_ssl_cert(apr_pool_t *p, request_rec *r, X509 *xs,
               result = ssl_var_lookup_ssl_cert_PEM(p, xs);
           }
       
      -    if (result != NULL && resdup)
      +    if (resdup)
               result = apr_pstrdup(p, result);
           return result;
       }
      @@ -550,7 +606,7 @@ static char *ssl_var_lookup_ssl_cert_dn(apr_pool_t *p, X509_NAME *xsname, char *
                       n =OBJ_obj2nid((ASN1_OBJECT *)X509_NAME_ENTRY_get_object(xsne));
       
                       if (n == ssl_var_lookup_ssl_cert_dn_rec[i].nid && idx-- == 0) {
      -                    result = SSL_X509_NAME_ENTRY_to_string(p, xsne);
      +                    result = modssl_X509_NAME_ENTRY_to_string(p, xsne);
                           break;
                       }
                   }
      @@ -560,6 +616,49 @@ static char *ssl_var_lookup_ssl_cert_dn(apr_pool_t *p, X509_NAME *xsname, char *
           return result;
       }
       
      +static char *ssl_var_lookup_ssl_cert_san(apr_pool_t *p, X509 *xs, char *var)
      +{
      +    int type, numlen;
      +    const char *onf = NULL;
      +    apr_array_header_t *entries;
      +
      +    if (strcEQn(var, "Email_", 6)) {
      +        type = GEN_EMAIL;
      +        var += 6;
      +    }
      +    else if (strcEQn(var, "DNS_", 4)) {
      +        type = GEN_DNS;
      +        var += 4;
      +    }
      +    else if (strcEQn(var, "OTHER_", 6)) {
      +        type = GEN_OTHERNAME;
      +        var += 6;
      +        if (strEQn(var, "msUPN_", 6)) {
      +            var += 6;
      +            onf = "msUPN";
      +        }
      +        else if (strEQn(var, "dnsSRV_", 7)) {
      +            var += 7;
      +            onf = "id-on-dnsSRV";
      +        }
      +        else
      +           return NULL;
      +    }
      +    else
      +        return NULL;
      +
      +    /* sanity check: number must be between 1 and 4 digits */
      +    numlen = strspn(var, "0123456789");
      +    if ((numlen < 1) || (numlen > 4) || (numlen != strlen(var)))
      +        return NULL;
      +
      +    if (modssl_X509_getSAN(p, xs, type, onf, atoi(var), &entries))
      +        /* return the first entry from this 1-element array */
      +        return APR_ARRAY_IDX(entries, 0, char *);
      +    else
      +        return NULL;
      +}
      +
       static char *ssl_var_lookup_ssl_cert_valid(apr_pool_t *p, ASN1_TIME *tm)
       {
           char *result;
      @@ -657,6 +756,37 @@ static char *ssl_var_lookup_ssl_cert_chain(apr_pool_t *p, STACK_OF(X509) *sk, ch
           return result;
       }
       
      +static char *ssl_var_lookup_ssl_cert_rfc4523_cea(apr_pool_t *p, SSL *ssl)
      +{
      +    char *result;
      +    X509 *xs;
      +
      +    ASN1_INTEGER *serialNumber;
      +
      +    if (!(xs = SSL_get_peer_certificate(ssl))) {
      +        return NULL;
      +    }
      +
      +    result = NULL;
      +
      +    serialNumber = X509_get_serialNumber(xs);
      +    if (serialNumber) {
      +        X509_NAME *issuer = X509_get_issuer_name(xs);
      +        if (issuer) {
      +            BIGNUM *bn = ASN1_INTEGER_to_BN(serialNumber, NULL);
      +            char *decimal = BN_bn2dec(bn);
      +            result = apr_pstrcat(p, "{ serialNumber ", decimal,
      +                    ", issuer rdnSequence:\"",
      +                    modssl_X509_NAME_to_string(p, issuer, 0), "\" }", NULL);
      +            OPENSSL_free(decimal);
      +            BN_free(bn);
      +        }
      +    }
      +
      +    X509_free(xs);
      +    return result;
      +}
      +
       static char *ssl_var_lookup_ssl_cert_PEM(apr_pool_t *p, X509 *xs)
       {
           char *result;
      @@ -674,9 +804,8 @@ static char *ssl_var_lookup_ssl_cert_PEM(apr_pool_t *p, X509 *xs)
           return result;
       }
       
      -static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, conn_rec *c)
      +static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, SSLConnRec *sslconn)
       {
      -    SSLConnRec *sslconn = myConnConfig(c);
           char *result;
           long vrc;
           const char *verr;
      @@ -710,9 +839,8 @@ static char *ssl_var_lookup_ssl_cert_verify(apr_pool_t *p, conn_rec *c)
           return result;
       }
       
      -static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, conn_rec *c, char *var)
      +static char *ssl_var_lookup_ssl_cipher(apr_pool_t *p, SSLConnRec *sslconn, char *var)
       {
      -    SSLConnRec *sslconn = myConnConfig(c);
           char *result;
           BOOL resdup;
           int usekeysize, algkeysize;
      @@ -812,7 +940,7 @@ static void extract_dn(apr_table_t *t, apr_hash_t *nids, const char *pfx,
                        apr_hash_set(count, &nid, sizeof nid, dup);
                        key = apr_pstrcat(p, pfx, tag, NULL);
                    }
      -             value = SSL_X509_NAME_ENTRY_to_string(p, xsne);
      +             value = modssl_X509_NAME_ENTRY_to_string(p, xsne);
                    apr_table_setn(t, key, value);
                }
           }
      @@ -853,13 +981,61 @@ void modssl_var_extract_dns(apr_table_t *t, SSL *ssl, apr_pool_t *p)
           }
       }
       
      +static void extract_san_array(apr_table_t *t, const char *pfx,
      +                              apr_array_header_t *entries, apr_pool_t *p)
      +{
      +    int i;
      +
      +    for (i = 0; i < entries->nelts; i++) {
      +        const char *key = apr_psprintf(p, "%s_%d", pfx, i);
      +        apr_table_setn(t, key, APR_ARRAY_IDX(entries, i, const char *));
      +    }
      +}
      +
      +void modssl_var_extract_san_entries(apr_table_t *t, SSL *ssl, apr_pool_t *p)
      +{
      +    X509 *xs;
      +    apr_array_header_t *entries;
      +
      +    /* subjectAltName entries of the server certificate */
      +    xs = SSL_get_certificate(ssl);
      +    if (xs) {
      +        if (modssl_X509_getSAN(p, xs, GEN_EMAIL, NULL, -1, &entries)) {
      +            extract_san_array(t, "SSL_SERVER_SAN_Email", entries, p);
      +        }
      +        if (modssl_X509_getSAN(p, xs, GEN_DNS, NULL, -1, &entries)) {
      +            extract_san_array(t, "SSL_SERVER_SAN_DNS", entries, p);
      +        }
      +        if (modssl_X509_getSAN(p, xs, GEN_OTHERNAME, "id-on-dnsSRV", -1,
      +                               &entries)) {
      +            extract_san_array(t, "SSL_SERVER_SAN_OTHER_dnsSRV", entries, p);
      +        }
      +        /* no need to free xs (refcount does not increase) */
      +    }
      +
      +    /* subjectAltName entries of the client certificate */
      +    xs = SSL_get_peer_certificate(ssl);
      +    if (xs) {
      +        if (modssl_X509_getSAN(p, xs, GEN_EMAIL, NULL, -1, &entries)) {
      +            extract_san_array(t, "SSL_CLIENT_SAN_Email", entries, p);
      +        }
      +        if (modssl_X509_getSAN(p, xs, GEN_DNS, NULL, -1, &entries)) {
      +            extract_san_array(t, "SSL_CLIENT_SAN_DNS", entries, p);
      +        }
      +        if (modssl_X509_getSAN(p, xs, GEN_OTHERNAME, "msUPN", -1, &entries)) {
      +            extract_san_array(t, "SSL_CLIENT_SAN_OTHER_msUPN", entries, p);
      +        }
      +        X509_free(xs);
      +    }
      +}
      +
       /* For an extension type which OpenSSL does not recognize, attempt to
        * parse the extension type as a primitive string.  This will fail for
        * any structured extension type per the docs.  Returns non-zero on
        * success and writes the string to the given bio. */
       static int dump_extn_value(BIO *bio, ASN1_OCTET_STRING *str)
       {
      -    MODSSL_D2I_ASN1_type_bytes_CONST unsigned char *pp = str->data;
      +    const unsigned char *pp = str->data;
           ASN1_STRING *ret = ASN1_STRING_new();
           int rv = 0;
       
      @@ -877,7 +1053,7 @@ static int dump_extn_value(BIO *bio, ASN1_OCTET_STRING *str)
       apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
                                        const char *extension)
       {
      -    SSLConnRec *sslconn = myConnConfig(c);
      +    SSLConnRec *sslconn = ssl_get_effective_config(c);
           SSL *ssl = NULL;
           apr_array_header_t *array = NULL;
           X509 *xs = NULL;
      @@ -895,7 +1071,7 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
            */
           oid = OBJ_txt2obj(extension, 0);
           if (!oid) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01970)
                             "could not parse OID '%s'", extension);
               ERR_clear_error();
               return NULL;
      @@ -907,7 +1083,7 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
           }
       
           count = X509_get_ext_count(xs);
      -    /* Create an array large enough to accomodate every extension. This is
      +    /* Create an array large enough to accommodate every extension. This is
            * likely overkill, but safe.
            */
           array = apr_array_make(p, count, sizeof(char *));
      @@ -931,7 +1107,7 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
                       BIO_get_mem_ptr(bio, &buf);
                       *ptr = apr_pstrmemdup(p, buf->data, buf->length);
                   } else {
      -                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +                ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01971)
                                     "Found an extension '%s', but failed to "
                                     "create a string from it", extension);
                   }
      @@ -955,11 +1131,15 @@ apr_array_header_t *ssl_ext_list(apr_pool_t *p, conn_rec *c, int peer,
       static char *ssl_var_lookup_ssl_compress_meth(SSL *ssl)
       {
           char *result = "NULL";
      -#if (OPENSSL_VERSION_NUMBER >= 0x00908000)
      +#ifndef OPENSSL_NO_COMP
           SSL_SESSION *pSession = SSL_get_session(ssl);
       
           if (pSession) {
      +#ifdef OPENSSL_NO_SSL_INTERN
      +        switch (SSL_SESSION_get_compress_id(pSession)) {
      +#else
               switch (pSession->compress_meth) {
      +#endif
               case 0:
                   /* default "NULL" already set */
                   break;
      @@ -1017,7 +1197,7 @@ void ssl_var_log_config_register(apr_pool_t *p)
        */
       static const char *ssl_var_log_handler_c(request_rec *r, char *a)
       {
      -    SSLConnRec *sslconn = myConnConfig(r->connection);
      +    SSLConnRec *sslconn = ssl_get_effective_config(r->connection);
           char *result;
       
           if (sslconn == NULL || sslconn->ssl == NULL)
      diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h
      index 43949eee327..7813e4137cd 100644
      --- a/modules/ssl/ssl_private.h
      +++ b/modules/ssl/ssl_private.h
      @@ -57,7 +57,7 @@
       /* The #ifdef macros are only defined AFTER including the above
        * therefore we cannot include these system files at the top  :-(
        */
      -#ifdef APR_HAVE_STDLIB_H
      +#if APR_HAVE_STDLIB_H
       #include <stdlib.h>
       #endif
       #if APR_HAVE_SYS_TIME_H
      @@ -82,6 +82,11 @@
       #include "ap_expr.h"
       
       /* OpenSSL headers */
      +#include <openssl/opensslv.h>
      +#if (OPENSSL_VERSION_NUMBER >= 0x10001000)
      +/* must be defined before including ssl.h */
      +#define OPENSSL_NO_SSL_INTERN
      +#endif
       #include <openssl/ssl.h>
       #include <openssl/err.h>
       #include <openssl/x509.h>
      @@ -100,69 +105,90 @@
       #include <openssl/engine.h>
       #endif
       
      -#if (OPENSSL_VERSION_NUMBER < 0x0090700f)
      -#error mod_ssl requires OpenSSL 0.9.7 or later
      +#if (OPENSSL_VERSION_NUMBER < 0x0090801f)
      +#error mod_ssl requires OpenSSL 0.9.8a or later
       #endif
       
      -/* ...shifting sands of OpenSSL... */
      -#if (OPENSSL_VERSION_NUMBER >= 0x0090707f)
      -#define MODSSL_D2I_SSL_SESSION_CONST const
      +/**
      + * ...shifting sands of OpenSSL...
      + * Note: when adding support for new OpenSSL features, avoid explicit
      + * version number checks whenever possible, and use "feature-based"
      + * detection instead (check for definitions of constants or functions)
      + */
      +#if (OPENSSL_VERSION_NUMBER >= 0x10000000)
      +#define MODSSL_SSL_CIPHER_CONST const
      +#define MODSSL_SSL_METHOD_CONST const
       #else
      -#define MODSSL_D2I_SSL_SESSION_CONST
      +#define MODSSL_SSL_CIPHER_CONST
      +#define MODSSL_SSL_METHOD_CONST
       #endif
       
      -#if (OPENSSL_VERSION_NUMBER >= 0x00908000)
      -#define HAVE_GENERATE_EX
      -#define MODSSL_D2I_ASN1_type_bytes_CONST const
      -#define MODSSL_D2I_PrivateKey_CONST const
      -#define MODSSL_D2I_X509_CONST const
      -#else
      -#define MODSSL_D2I_ASN1_type_bytes_CONST
      -#define MODSSL_D2I_PrivateKey_CONST
      -#define MODSSL_D2I_X509_CONST
      +#if defined(OPENSSL_FIPS)
      +#define HAVE_FIPS
       #endif
       
      -#if OPENSSL_VERSION_NUMBER >= 0x00908080 && !defined(OPENSSL_NO_OCSP) \
      -    && !defined(OPENSSL_NO_TLSEXT)
      -#define HAVE_OCSP_STAPLING
      -#if (OPENSSL_VERSION_NUMBER < 0x10000000)
      -#define sk_OPENSSL_STRING_pop sk_pop
      -#endif
      +#if defined(SSL_OP_NO_TLSv1_2)
      +#define HAVE_TLSV1_X
       #endif
       
      -#if (OPENSSL_VERSION_NUMBER >= 0x009080a0) && defined(OPENSSL_FIPS)
      -#define HAVE_FIPS
      +#if defined(SSL_CONF_FLAG_FILE)
      +#define HAVE_SSL_CONF_CMD
       #endif
       
      -#if (OPENSSL_VERSION_NUMBER >= 0x10000000)
      -#define MODSSL_SSL_CIPHER_CONST const
      -#define MODSSL_SSL_METHOD_CONST const
      -#else
      -#define MODSSL_SSL_CIPHER_CONST
      -#define MODSSL_SSL_METHOD_CONST
      -/* ECC support came along in OpenSSL 1.0.0 */
      -#define OPENSSL_NO_EC
      +/**
      +  * The following features all depend on TLS extension support.
      +  * Within this block, check again for features (not version numbers).
      +  */
      +#if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name)
      +
      +#define HAVE_TLSEXT
      +
      +/* ECC: make sure we have at least 1.0.0 */
      +#if !defined(OPENSSL_NO_EC) && defined(TLSEXT_ECPOINTFORMAT_uncompressed)
      +#define HAVE_ECC
       #endif
       
      -#ifndef PEM_F_DEF_CALLBACK
      -#ifdef PEM_F_PEM_DEF_CALLBACK
      -/** In OpenSSL 0.9.8 PEM_F_DEF_CALLBACK was renamed */
      -#define PEM_F_DEF_CALLBACK PEM_F_PEM_DEF_CALLBACK
      +/* OCSP stapling */
      +#if !defined(OPENSSL_NO_OCSP) && defined(SSL_CTX_set_tlsext_status_cb)
      +#define HAVE_OCSP_STAPLING
      +/* backward compatibility with OpenSSL < 1.0 */
      +#ifndef sk_OPENSSL_STRING_num
      +#define sk_OPENSSL_STRING_num sk_num
      +#endif
      +#ifndef sk_OPENSSL_STRING_value
      +#define sk_OPENSSL_STRING_value sk_value
      +#endif
      +#ifndef sk_OPENSSL_STRING_pop
      +#define sk_OPENSSL_STRING_pop sk_pop
       #endif
       #endif
       
      -#ifndef OPENSSL_NO_TLSEXT
      -#ifndef SSL_CTRL_SET_TLSEXT_HOSTNAME
      -#define OPENSSL_NO_TLSEXT
      +/* TLS session tickets */
      +#if defined(SSL_CTX_set_tlsext_ticket_key_cb)
      +#define HAVE_TLS_SESSION_TICKETS
      +#define TLSEXT_TICKET_KEY_LEN 48
      +#ifndef tlsext_tick_md
      +#ifdef OPENSSL_NO_SHA256
      +#define tlsext_tick_md EVP_sha1
      +#else
      +#define tlsext_tick_md EVP_sha256
      +#endif
       #endif
       #endif
       
      -#ifndef OPENSSL_NO_TLSEXT
      -#ifdef SSL_CTX_set_tlsext_ticket_key_cb
      -#define HAVE_TLSEXT_TICKETS
      +/* Secure Remote Password */
      +#if !defined(OPENSSL_NO_SRP) && defined(SSL_CTRL_SET_TLS_EXT_SRP_USERNAME_CB)
      +#define HAVE_SRP
      +#include <openssl/srp.h>
       #endif
      +
      +/* ALPN Protocol Negotiation */
      +#if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
      +#define HAVE_TLS_ALPN
       #endif
       
      +#endif /* !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name) */
      +
       /* mod_ssl headers */
       #include "ssl_util_ssl.h"
       
      @@ -222,9 +248,6 @@ ap_set_module_config(c->conn_config, &ssl_module, val)
       #define mySrvConfigFromConn(c) mySrvConfig(mySrvFromConn(c))
       #define myModConfigFromConn(c) myModConfig(mySrvFromConn(c))
       
      -#define myCtxVarSet(mc,num,val)  mc->rCtx.pV##num = val
      -#define myCtxVarGet(mc,num,type) (type)(mc->rCtx.pV##num)
      -
       /**
        * Defaults for the configuration
        */
      @@ -247,42 +270,16 @@ ap_set_module_config(c->conn_config, &ssl_module, val)
       #define DEFAULT_OCSP_TIMEOUT 10
       #endif
       
      -/**
      - * Define the certificate algorithm types
      +/*
      + * For better backwards compatibility with the SSLCertificate[Key]File
      + * and SSLPassPhraseDialog ("exec" type) directives in 2.4.7 and earlier
        */
      -
      -typedef int ssl_algo_t;
      -
      -#define SSL_ALGO_UNKNOWN (0)
      -#define SSL_ALGO_RSA     (1<<0)
      -#define SSL_ALGO_DSA     (1<<1)
      -#ifndef OPENSSL_NO_EC
      -#define SSL_ALGO_ECC     (1<<2)
      -#define SSL_ALGO_ALL     (SSL_ALGO_RSA|SSL_ALGO_DSA|SSL_ALGO_ECC)
      -#else
      -#define SSL_ALGO_ALL     (SSL_ALGO_RSA|SSL_ALGO_DSA)
      -#endif
      -
      -#define SSL_AIDX_RSA     (0)
      -#define SSL_AIDX_DSA     (1)
      -#ifndef OPENSSL_NO_EC
      -#define SSL_AIDX_ECC     (2)
      -#define SSL_AIDX_MAX     (3)
      +#ifdef HAVE_ECC
      +#define CERTKEYS_IDX_MAX 2
       #else
      -#define SSL_AIDX_MAX     (2)
      +#define CERTKEYS_IDX_MAX 1
       #endif
       
      -
      -/**
      - * Define IDs for the temporary RSA keys and DH params
      - */
      -
      -#define SSL_TMP_KEY_RSA_512  (0)
      -#define SSL_TMP_KEY_RSA_1024 (1)
      -#define SSL_TMP_KEY_DH_512   (2)
      -#define SSL_TMP_KEY_DH_1024  (3)
      -#define SSL_TMP_KEY_MAX      (4)
      -
       /**
        * Define the SSL options
        */
      @@ -300,13 +297,27 @@ typedef int ssl_opt_t;
        * Define the SSL Protocol options
        */
       #define SSL_PROTOCOL_NONE  (0)
      -#define SSL_PROTOCOL_SSLV2 (1<<0)
      +#ifndef OPENSSL_NO_SSL3
       #define SSL_PROTOCOL_SSLV3 (1<<1)
      +#endif
       #define SSL_PROTOCOL_TLSV1 (1<<2)
      -#ifndef OPENSSL_NO_SSL2
      -#define SSL_PROTOCOL_ALL   (SSL_PROTOCOL_SSLV2|SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
      +#ifndef OPENSSL_NO_SSL3
      +#define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
      +#else
      +#define SSL_PROTOCOL_BASIC (SSL_PROTOCOL_TLSV1)
      +#endif
      +#ifdef HAVE_TLSV1_X
      +#define SSL_PROTOCOL_TLSV1_1 (1<<3)
      +#define SSL_PROTOCOL_TLSV1_2 (1<<4)
      +#define SSL_PROTOCOL_ALL   (SSL_PROTOCOL_BASIC| \
      +                            SSL_PROTOCOL_TLSV1_1|SSL_PROTOCOL_TLSV1_2)
      +#else
      +#define SSL_PROTOCOL_ALL   (SSL_PROTOCOL_BASIC)
      +#endif
      +#ifndef OPENSSL_NO_SSL3
      +#define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL & ~SSL_PROTOCOL_SSLV3)
       #else
      -#define SSL_PROTOCOL_ALL   (SSL_PROTOCOL_SSLV3|SSL_PROTOCOL_TLSV1)
      +#define SSL_PROTOCOL_DEFAULT (SSL_PROTOCOL_ALL)
       #endif
       typedef int ssl_proto_t;
       
      @@ -332,13 +343,15 @@ typedef enum {
           || (errnum == X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
       
       /**
      -  * CRL checking modes
      +  * CRL checking mask (mode | flags)
         */
       typedef enum {
      -    SSL_CRLCHECK_UNSET = UNSET,
      -    SSL_CRLCHECK_NONE  = 0,
      -    SSL_CRLCHECK_LEAF  = 1,
      -    SSL_CRLCHECK_CHAIN = 2
      +    SSL_CRLCHECK_NONE  = (0),
      +    SSL_CRLCHECK_LEAF  = (1 << 0),
      +    SSL_CRLCHECK_CHAIN = (1 << 1),
      +
      +#define SSL_CRLCHECK_FLAGS (~0x3)
      +    SSL_CRLCHECK_NO_CRL_FOR_CERT_OK = (1 << 2)
       } ssl_crlcheck_t;
       
       /**
      @@ -374,7 +387,7 @@ typedef enum {
        * Define the SSL requirement structure
        */
       typedef struct {
      -    char           *cpExpr;
      +    const char     *cpExpr;
           ap_expr_info_t *mpExpr;
       } ssl_require_t;
       
      @@ -429,7 +442,12 @@ typedef struct {
           int verify_depth;
           int is_proxy;
           int disabled;
      -    int non_ssl_request;
      +    enum {
      +        NON_SSL_OK = 0,        /* is SSL request, or error handling completed */
      +        NON_SSL_SEND_REQLINE,  /* Need to send the fake request line */
      +        NON_SSL_SEND_HDR_SEP,  /* Need to send the header separator */
      +        NON_SSL_SET_ERROR_MSG  /* Need to set the error message */
      +    } non_ssl_request;
       
           /* Track the handshake/renegotiation state for the connection so
            * that all client-initiated renegotiations can be rejected, as a
      @@ -438,13 +456,15 @@ typedef struct {
               RENEG_INIT = 0, /* Before initial handshake */
               RENEG_REJECT, /* After initial handshake; any client-initiated
                              * renegotiation should be rejected */
      -        RENEG_ALLOW, /* A server-initated renegotiation is taking
      +        RENEG_ALLOW, /* A server-initiated renegotiation is taking
                             * place (as dictated by configuration) */
               RENEG_ABORT /* Renegotiation initiated by client, abort the
                            * connection */
           } reneg_state;
       
           server_rec *server;
      +    
      +    const char *cipher_suite; /* cipher suite used in last reneg */
       } SSLConnRec;
       
       /* BIG FAT WARNING: SSLModConfigRec has unusual memory lifetime: it is
      @@ -491,15 +511,11 @@ typedef struct {
           apr_global_mutex_t   *pMutex;
           apr_array_header_t   *aRandSeed;
           apr_hash_t     *tVHostKeys;
      -    void           *pTmpKeys[SSL_TMP_KEY_MAX];
      -
      -    /* Two hash tables of pointers to ssl_asn1_t structures.  The
      -     * structures are used to store certificates and private keys
      -     * respectively, in raw DER format (serialized OpenSSL X509 and
      -     * PrivateKey structures).  The tables are indexed by (vhost-id,
      -     * algorithm type) using the function ssl_asn1_table_keyfmt(); for
      -     * example the string "vhost.example.com:443:RSA". */
      -    apr_hash_t     *tPublicCert;
      +
      +    /* A hash table of pointers to ssl_asn1_t structures.  The structures
      +     * are used to store private keys in raw DER format (serialized OpenSSL
      +     * PrivateKey structures).  The table is indexed by (vhost-id,
      +     * index), for example the string "vhost.example.com:443:0". */
           apr_hash_t     *tPrivateKey;
       
       #if defined(HAVE_OPENSSL_ENGINE_H) && defined(HAVE_ENGINE_INIT)
      @@ -509,29 +525,17 @@ typedef struct {
       #ifdef HAVE_OCSP_STAPLING
           const ap_socache_provider_t *stapling_cache;
           ap_socache_instance_t *stapling_cache_context;
      -    apr_global_mutex_t   *stapling_mutex;
      +    apr_global_mutex_t   *stapling_cache_mutex;
      +    apr_global_mutex_t   *stapling_refresh_mutex;
       #endif
      -
      -    struct {
      -        void *pV1, *pV2, *pV3, *pV4, *pV5, *pV6, *pV7, *pV8, *pV9, *pV10;
      -    } rCtx;
       } SSLModConfigRec;
       
       /** Structure representing configured filenames for certs and keys for
      - * a given vhost, and the corresponding in-memory structures once the
      - * files are parsed.  */
      + * a given vhost */
       typedef struct {
      -    /* Lists of configured certs and keys for this server; from index
      -     * 0 up to SSL_AIDX_MAX-1 or the first NULL pointer.  Note that
      -     * these arrays are NOT indexed by algorithm type, they are simply
      -     * unordered lists. */
      -    const char  *cert_files[SSL_AIDX_MAX];
      -    const char  *key_files[SSL_AIDX_MAX];
      -    /* Loaded certs and keys; these arrays ARE indexed by the
      -     * algorithm type, i.e.  keys[SSL_AIDX_RSA] maps to the RSA
      -     * private key. */
      -    X509        *certs[SSL_AIDX_MAX];
      -    EVP_PKEY    *keys[SSL_AIDX_MAX];
      +    /* Lists of configured certs and keys for this server */
      +    apr_array_header_t *cert_files;
      +    apr_array_header_t *key_files;
       
           /** Certificates which specify the set of CA names which should be
            * sent in the CertificateRequest message: */
      @@ -563,19 +567,20 @@ typedef struct {
           ssl_verify_t verify_mode;
       } modssl_auth_ctx_t;
       
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +typedef struct {
      +    const char *file_path;
      +    unsigned char key_name[16];
      +    unsigned char hmac_secret[16];
      +    unsigned char aes_key[16];
      +} modssl_ticket_key_t;
      +#endif
       
      -#ifdef HAVE_TLSEXT_TICKETS
      -
      -/* 48 bytes: 16 for keyname, 16 for HMAC secret, 16 for AES private key */
      -#define TLSEXT_TICKET_KEYLEN (48)
      -
      +#ifdef HAVE_SSL_CONF_CMD
       typedef struct {
      -    /* Human readable name, used in the configuration */
      -    const char *conf_name;
      -    char key_name[16];
      -    char hmac_secret[16];
      -    char aes_key[16];
      -} modssl_ticket_t;
      +    const char *name;
      +    const char *value;
      +} ssl_ctx_param_t;
       #endif
       
       typedef struct SSLSrvConfigRec SSLSrvConfigRec;
      @@ -588,19 +593,23 @@ typedef struct {
           modssl_pk_server_t *pks;
           modssl_pk_proxy_t  *pkp;
       
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +    modssl_ticket_key_t *ticket_key;
      +#endif
      +
           ssl_proto_t  protocol;
      +    int protocol_set;
       
           /** config for handling encrypted keys */
           ssl_pphrase_t pphrase_dialog_type;
           const char   *pphrase_dialog_path;
       
           const char  *cert_chain;
      -    const char  *pkcs7;
       
           /** certificate revocation list */
           const char    *crl_path;
           const char    *crl_file;
      -    ssl_crlcheck_t crl_check_mode;
      +    int            crl_check_mask;
       
       #ifdef HAVE_OCSP_STAPLING
           /** OCSP stapling options */
      @@ -615,6 +624,12 @@ typedef struct {
           const char *stapling_force_url;
       #endif
       
      +#ifdef HAVE_SRP
      +    char *srp_vfile;
      +    char *srp_unknown_user_seed;
      +    SRP_VBASE  *srp_vbase;
      +#endif
      +
           modssl_auth_ctx_t auth;
       
           BOOL ocsp_enabled; /* true if OCSP verification enabled */
      @@ -624,7 +639,13 @@ typedef struct {
           long ocsp_resptime_skew;
           long ocsp_resp_maxage;
           apr_interval_time_t ocsp_responder_timeout;
      +    BOOL ocsp_use_request_nonce;
      +    apr_uri_t *proxy_uri;
       
      +#ifdef HAVE_SSL_CONF_CMD
      +    SSL_CONF_CTX *ssl_ctx_config; /* Configuration context */
      +    apr_array_header_t *ssl_ctx_param; /* parameters to pass to SSL_CTX */
      +#endif
       } modssl_ctx_t;
       
       struct SSLSrvConfigRec {
      @@ -640,17 +661,17 @@ struct SSLSrvConfigRec {
           modssl_ctx_t    *proxy;
           ssl_enabled_t    proxy_ssl_check_peer_expire;
           ssl_enabled_t    proxy_ssl_check_peer_cn;
      -#ifndef OPENSSL_NO_TLSEXT
      +    ssl_enabled_t    proxy_ssl_check_peer_name;
      +#ifdef HAVE_TLSEXT
           ssl_enabled_t    strict_sni_vhost_check;
       #endif
       #ifdef HAVE_FIPS
           BOOL             fips;
       #endif
      -#ifdef HAVE_TLSEXT_TICKETS
      -    const char *default_ticket_name;
      -    modssl_ticket_t* default_ticket;
      -    apr_array_header_t* tickets;
      +#ifndef OPENSSL_NO_COMP
      +    BOOL             compression;
       #endif
      +    BOOL             session_tickets;
       };
       
       /**
      @@ -696,7 +717,6 @@ const char  *ssl_cmd_SSLCipherSuite(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCertificateFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCertificateKeyFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCertificateChainFile(cmd_parms *, void *, const char *);
      -const char  *ssl_cmd_SSLPKCS7CertificateFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCACertificatePath(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCACertificateFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCADNRequestPath(cmd_parms *, void *, const char *);
      @@ -705,6 +725,8 @@ const char  *ssl_cmd_SSLCARevocationPath(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCARevocationFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLCARevocationCheck(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLHonorCipherOrder(cmd_parms *cmd, void *dcfg, int flag);
      +const char  *ssl_cmd_SSLCompression(cmd_parms *, void *, int flag);
      +const char  *ssl_cmd_SSLSessionTickets(cmd_parms *, void *, int flag);
       const char  *ssl_cmd_SSLVerifyClient(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLVerifyDepth(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLSessionCache(cmd_parms *, void *, const char *);
      @@ -731,25 +753,39 @@ const char  *ssl_cmd_SSLProxyCARevocationCheck(cmd_parms *, void *, const char *
       const char  *ssl_cmd_SSLProxyMachineCertificatePath(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLProxyMachineCertificateFile(cmd_parms *, void *, const char *);
       const char  *ssl_cmd_SSLProxyMachineCertificateChainFile(cmd_parms *, void *, const char *);
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd, void *dcfg, const char *arg);
      +#endif
       const char  *ssl_cmd_SSLProxyCheckPeerExpire(cmd_parms *cmd, void *dcfg, int flag);
       const char  *ssl_cmd_SSLProxyCheckPeerCN(cmd_parms *cmd, void *dcfg, int flag);
      +const char  *ssl_cmd_SSLProxyCheckPeerName(cmd_parms *cmd, void *dcfg, int flag);
       
       const char *ssl_cmd_SSLOCSPOverrideResponder(cmd_parms *cmd, void *dcfg, int flag);
       const char *ssl_cmd_SSLOCSPDefaultResponder(cmd_parms *cmd, void *dcfg, const char *arg);
       const char *ssl_cmd_SSLOCSPResponseTimeSkew(cmd_parms *cmd, void *dcfg, const char *arg);
       const char *ssl_cmd_SSLOCSPResponseMaxAge(cmd_parms *cmd, void *dcfg, const char *arg);
       const char *ssl_cmd_SSLOCSPResponderTimeout(cmd_parms *cmd, void *dcfg, const char *arg);
      +const char *ssl_cmd_SSLOCSPUseRequestNonce(cmd_parms *cmd, void *dcfg, int flag);
       const char *ssl_cmd_SSLOCSPEnable(cmd_parms *cmd, void *dcfg, int flag);
      +const char *ssl_cmd_SSLOCSPProxyURL(cmd_parms *cmd, void *dcfg, const char *arg);
      +
      +#ifdef HAVE_SSL_CONF_CMD
      +const char *ssl_cmd_SSLOpenSSLConfCmd(cmd_parms *cmd, void *dcfg, const char *arg1, const char *arg2);
      +#endif
      +
      +#ifdef HAVE_SRP
      +const char *ssl_cmd_SSLSRPVerifierFile(cmd_parms *cmd, void *dcfg, const char *arg);
      +const char *ssl_cmd_SSLSRPUnknownUserSeed(cmd_parms *cmd, void *dcfg, const char *arg);
      +#endif
       
       const char *ssl_cmd_SSLFIPS(cmd_parms *cmd, void *dcfg, int flag);
      -const char *ssl_cmd_SSLTicketKeyDefault(cmd_parms *cmd, void *dcfg, const char *name);
      -const char *ssl_cmd_SSLTicketKeyFile(cmd_parms *cmd, void *dcfg, const char *name, const char *path);
       
       /**  module initialization  */
      -int          ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *);
      -void         ssl_init_Engine(server_rec *, apr_pool_t *);
      -void         ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *);
      -void         ssl_init_CheckServers(server_rec *, apr_pool_t *);
      +apr_status_t ssl_init_Module(apr_pool_t *, apr_pool_t *, apr_pool_t *, server_rec *);
      +apr_status_t ssl_init_Engine(server_rec *, apr_pool_t *);
      +apr_status_t ssl_init_ConfigureServer(server_rec *, apr_pool_t *, apr_pool_t *, SSLSrvConfigRec *,
      +                                      apr_array_header_t *);
      +apr_status_t ssl_init_CheckServers(server_rec *, apr_pool_t *);
       STACK_OF(X509_NAME)
                   *ssl_init_FindCAList(server_rec *, apr_pool_t *, const char *, const char *);
       void         ssl_init_Child(apr_pool_t *, server_rec *);
      @@ -769,11 +805,7 @@ extern const authz_provider ssl_authz_provider_require_ssl;
       extern const authz_provider ssl_authz_provider_verify_client;
       
       /**  OpenSSL callbacks */
      -RSA         *ssl_callback_TmpRSA(SSL *, int, int);
       DH          *ssl_callback_TmpDH(SSL *, int, int);
      -#ifndef OPENSSL_NO_EC
      -EC_KEY      *ssl_callback_TmpECDH(SSL *, int, int);
      -#endif
       int          ssl_callback_SSLVerify(int, X509_STORE_CTX *);
       int          ssl_callback_SSLVerify_CRL(int, X509_STORE_CTX *, conn_rec *);
       int          ssl_callback_proxy_cert(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
      @@ -781,21 +813,22 @@ int          ssl_callback_NewSessionCacheEntry(SSL *, SSL_SESSION *);
       SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *, unsigned char *, int, int *);
       void         ssl_callback_DelSessionCacheEntry(SSL_CTX *, SSL_SESSION *);
       void         ssl_callback_Info(const SSL *, int, int);
      -#ifndef OPENSSL_NO_TLSEXT
      +#ifdef HAVE_TLSEXT
       int          ssl_callback_ServerNameIndication(SSL *, int *, modssl_ctx_t *);
       #endif
      +#ifdef HAVE_TLS_SESSION_TICKETS
      +int         ssl_callback_SessionTicket(SSL *, unsigned char *, unsigned char *,
      +                                       EVP_CIPHER_CTX *, HMAC_CTX *, int);
      +#endif
       
      -#ifdef HAVE_TLSEXT_TICKETS
      -int         ssl_callback_tlsext_tickets(SSL *ssl,
      -                                        char *keyname,
      -                                        char *iv,
      -                                        EVP_CIPHER_CTX *cipher_ctx,
      -                                        HMAC_CTX *hctx,
      -                                        int mode);
      +#ifdef HAVE_TLS_ALPN
      +int ssl_callback_alpn_select(SSL *ssl, const unsigned char **out,
      +                             unsigned char *outlen, const unsigned char *in,
      +                             unsigned int inlen, void *arg);
       #endif
       
       /**  Session Cache Support  */
      -void         ssl_scache_init(server_rec *, apr_pool_t *);
      +apr_status_t ssl_scache_init(server_rec *, apr_pool_t *);
       void         ssl_scache_status_register(apr_pool_t *p);
       void         ssl_scache_kill(server_rec *);
       BOOL         ssl_scache_store(server_rec *, UCHAR *, int,
      @@ -819,10 +852,14 @@ const char *ssl_cmd_SSLStaplingErrorCacheTimeout(cmd_parms *, void *, const char
       const char *ssl_cmd_SSLStaplingReturnResponderErrors(cmd_parms *, void *, int);
       const char *ssl_cmd_SSLStaplingFakeTryLater(cmd_parms *, void *, int);
       const char *ssl_cmd_SSLStaplingResponderTimeout(cmd_parms *, void *, const char *);
      -const char  *ssl_cmd_SSLStaplingForceURL(cmd_parms *, void *, const char *);
      -void         modssl_init_stapling(server_rec *, apr_pool_t *, apr_pool_t *, modssl_ctx_t *);
      -void         ssl_stapling_ex_init(void);
      -int          ssl_stapling_init_cert(server_rec *s, modssl_ctx_t *mctx, X509 *x);
      +const char *ssl_cmd_SSLStaplingForceURL(cmd_parms *, void *, const char *);
      +apr_status_t modssl_init_stapling(server_rec *, apr_pool_t *, apr_pool_t *, modssl_ctx_t *);
      +void         ssl_stapling_certinfo_hash_init(apr_pool_t *);
      +int          ssl_stapling_init_cert(server_rec *, apr_pool_t *, apr_pool_t *,
      +                                    modssl_ctx_t *, X509 *);
      +#endif
      +#ifdef HAVE_SRP
      +int          ssl_callback_SRPServerParams(SSL *, int *, void *);
       #endif
       
       /**  I/O  */
      @@ -845,17 +882,20 @@ void         ssl_util_ppclose(server_rec *, apr_pool_t *, apr_file_t *);
       char        *ssl_util_readfilter(server_rec *, apr_pool_t *, const char *,
                                        const char * const *);
       BOOL         ssl_util_path_check(ssl_pathcheck_t, const char *, apr_pool_t *);
      -ssl_algo_t   ssl_util_algotypeof(X509 *, EVP_PKEY *);
      -char        *ssl_util_algotypestr(ssl_algo_t);
       void         ssl_util_thread_setup(apr_pool_t *);
       int          ssl_init_ssl_connection(conn_rec *c, request_rec *r);
       
      +BOOL         ssl_util_vhost_matches(const char *servername, server_rec *s);
      +
       /**  Pass Phrase Support  */
      -void         ssl_pphrase_Handle(server_rec *, apr_pool_t *);
      +apr_status_t ssl_load_encrypted_pkey(server_rec *, apr_pool_t *, int,
      +                                     const char *, apr_array_header_t **);
       
       /**  Diffie-Hellman Parameter Support  */
      -DH           *ssl_dh_GetTmpParam(int);
      -DH           *ssl_dh_GetParamFromFile(char *);
      +DH           *ssl_dh_GetParamFromFile(const char *);
      +#ifdef HAVE_ECC
      +EC_GROUP     *ssl_ec_GetParamFromFile(const char *);
      +#endif
       
       unsigned char *ssl_asn1_table_set(apr_hash_t *table,
                                         const char *key,
      @@ -867,14 +907,6 @@ ssl_asn1_t *ssl_asn1_table_get(apr_hash_t *table,
       void ssl_asn1_table_unset(apr_hash_t *table,
                                 const char *key);
       
      -const char *ssl_asn1_keystr(int keytype);
      -
      -const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
      -                                  const char *id,
      -                                  int keytype);
      -
      -STACK_OF(X509) *ssl_read_pkcs7(server_rec *s, const char *pkcs7);
      -
       /**  Mutex Support  */
       int          ssl_mutex_init(server_rec *, apr_pool_t *);
       int          ssl_mutex_reinit(server_rec *, apr_pool_t *);
      @@ -885,10 +917,12 @@ int          ssl_stapling_mutex_reinit(server_rec *, apr_pool_t *);
       
       /* mutex type names for Mutex directive */
       #define SSL_CACHE_MUTEX_TYPE    "ssl-cache"
      -#define SSL_STAPLING_MUTEX_TYPE "ssl-stapling"
      +#define SSL_STAPLING_CACHE_MUTEX_TYPE "ssl-stapling"
      +#define SSL_STAPLING_REFRESH_MUTEX_TYPE "ssl-stapling-refresh"
      +
      +apr_status_t ssl_die(server_rec *);
       
       /**  Logfile Support  */
      -void         ssl_die(void);
       void         ssl_log_ssl_error(const char *, int, int, server_rec *);
       
       /* ssl_log_xerror, ssl_log_cxerror and ssl_log_rxerror are wrappers for the
      @@ -926,6 +960,10 @@ void         ssl_var_log_config_register(apr_pool_t *p);
        * allocating from 'p': */
       void modssl_var_extract_dns(apr_table_t *t, SSL *ssl, apr_pool_t *p);
       
      +/* Extract SSL_*_SAN_* variables (subjectAltName entries) into table 't'
      + * from SSL object 'ssl', allocating from 'p'. */
      +void modssl_var_extract_san_entries(apr_table_t *t, SSL *ssl, apr_pool_t *p);
      +
       #ifndef OPENSSL_NO_OCSP
       /* Perform OCSP validation of the current cert in the given context.
        * Returns non-zero on success or zero on failure.  On failure, the
      @@ -943,6 +981,11 @@ OCSP_RESPONSE *modssl_dispatch_ocsp_request(const apr_uri_t *uri,
                                                   conn_rec *c, apr_pool_t *p);
       #endif
       
      +/* Retrieve DH parameters for given key length.  Return value should
      + * be treated as unmutable, since it is stored in process-global
      + * memory. */
      +DH *modssl_get_dh_params(unsigned keylen);
      +
       #endif /* SSL_PRIVATE_H */
       /** @} */
       
      diff --git a/modules/ssl/ssl_scache.c b/modules/ssl/ssl_scache.c
      index e75c4c61545..70d18772e09 100644
      --- a/modules/ssl/ssl_scache.c
      +++ b/modules/ssl/ssl_scache.c
      @@ -37,7 +37,7 @@
       **  _________________________________________________________________
       */
       
      -void ssl_scache_init(server_rec *s, apr_pool_t *p)
      +apr_status_t ssl_scache_init(server_rec *s, apr_pool_t *p)
       {
           SSLModConfigRec *mc = myModConfig(s);
           apr_status_t rv;
      @@ -49,7 +49,7 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p)
            * will be immediately cleared anyway.  For every subsequent
            * invocation, initialize the configured cache. */
           if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG)
      -        return;
      +        return APR_SUCCESS;
       
       #ifdef HAVE_OCSP_STAPLING
           if (mc->stapling_cache) {
      @@ -61,9 +61,9 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p)
               rv = mc->stapling_cache->init(mc->stapling_cache_context,
                                            "mod_ssl-stapling", &hints, s, p);
               if (rv) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01872)
                                "Could not initialize stapling cache. Exiting.");
      -            ssl_die();
      +            return ssl_die(s);
               }
           }
       #endif
      @@ -73,10 +73,10 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p)
            * But we can operate without it, of course.
            */
           if (mc->sesscache == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(01873)
                            "Init: Session Cache is not configured "
                            "[hint: SSLSessionCache]");
      -        return;
      +        return APR_SUCCESS;
           }
       
           memset(&hints, 0, sizeof hints);
      @@ -86,10 +86,12 @@ void ssl_scache_init(server_rec *s, apr_pool_t *p)
       
           rv = mc->sesscache->init(mc->sesscache_context, "mod_ssl-session", &hints, s, p);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01874)
                            "Could not initialize session cache. Exiting.");
      -        ssl_die();
      +        return ssl_die(s);
           }
      +
      +    return APR_SUCCESS;
       }
       
       void ssl_scache_kill(server_rec *s)
      @@ -113,14 +115,14 @@ BOOL ssl_scache_store(server_rec *s, UCHAR *id, int idlen,
                             apr_pool_t *p)
       {
           SSLModConfigRec *mc = myModConfig(s);
      -    unsigned char encoded[SSL_SESSION_MAX_DER], *ptr;
      +    unsigned char encoded[MODSSL_SESSION_MAX_DER], *ptr;
           unsigned int len;
           apr_status_t rv;
       
           /* Serialise the session. */
           len = i2d_SSL_SESSION(sess, NULL);
           if (len > sizeof encoded) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01875)
                            "session is too big (%u bytes)", len);
               return FALSE;
           }
      @@ -146,9 +148,9 @@ SSL_SESSION *ssl_scache_retrieve(server_rec *s, UCHAR *id, int idlen,
                                        apr_pool_t *p)
       {
           SSLModConfigRec *mc = myModConfig(s);
      -    unsigned char dest[SSL_SESSION_MAX_DER];
      -    unsigned int destlen = SSL_SESSION_MAX_DER;
      -    MODSSL_D2I_SSL_SESSION_CONST unsigned char *ptr;
      +    unsigned char dest[MODSSL_SESSION_MAX_DER];
      +    unsigned int destlen = MODSSL_SESSION_MAX_DER;
      +    const unsigned char *ptr;
           apr_status_t rv;
       
           if (mc->sesscache->flags & AP_SOCACHE_FLAG_NOTMPSAFE) {
      @@ -196,15 +198,20 @@ static int ssl_ext_status_hook(request_rec *r, int flags)
       {
           SSLModConfigRec *mc = myModConfig(r->server);
       
      -    if (mc == NULL || flags & AP_STATUS_SHORT || mc->sesscache == NULL)
      +    if (mc == NULL || mc->sesscache == NULL)
               return OK;
       
      -    ap_rputs("<hr>\n", r);
      -    ap_rputs("<table cellspacing=0 cellpadding=0>\n", r);
      -    ap_rputs("<tr><td bgcolor=\"#000000\">\n", r);
      -    ap_rputs("<b><font color=\"#ffffff\" face=\"Arial,Helvetica\">SSL/TLS Session Cache Status:</font></b>\r", r);
      -    ap_rputs("</td></tr>\n", r);
      -    ap_rputs("<tr><td bgcolor=\"#ffffff\">\n", r);
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rputs("<hr>\n", r);
      +        ap_rputs("<table cellspacing=0 cellpadding=0>\n", r);
      +        ap_rputs("<tr><td bgcolor=\"#000000\">\n", r);
      +        ap_rputs("<b><font color=\"#ffffff\" face=\"Arial,Helvetica\">SSL/TLS Session Cache Status:</font></b>\r", r);
      +        ap_rputs("</td></tr>\n", r);
      +        ap_rputs("<tr><td bgcolor=\"#ffffff\">\n", r);
      +    }
      +    else {
      +        ap_rputs("TLSSessionCacheStatus\n", r);
      +    }
       
           if (mc->sesscache->flags & AP_SOCACHE_FLAG_NOTMPSAFE) {
               ssl_mutex_on(r->server);
      @@ -216,8 +223,11 @@ static int ssl_ext_status_hook(request_rec *r, int flags)
               ssl_mutex_off(r->server);
           }
       
      -    ap_rputs("</td></tr>\n", r);
      -    ap_rputs("</table>\n", r);
      +    if (!(flags & AP_STATUS_SHORT)) {
      +        ap_rputs("</td></tr>\n", r);
      +        ap_rputs("</table>\n", r);
      +    }
      +
           return OK;
       }
       
      diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c
      index 3a88493750c..ddde3c74ef5 100644
      --- a/modules/ssl/ssl_util.c
      +++ b/modules/ssl/ssl_util.c
      @@ -60,6 +60,52 @@ char *ssl_util_vhostid(apr_pool_t *p, server_rec *s)
           return id;
       }
       
      +/*
      + * Return TRUE iff the given servername matches the server record when
      + * selecting virtual hosts.
      + */
      +BOOL ssl_util_vhost_matches(const char *servername, server_rec *s)
      +{
      +    apr_array_header_t *names;
      +    int i;
      +    
      +    /* check ServerName */
      +    if (!strcasecmp(servername, s->server_hostname)) {
      +        return TRUE;
      +    }
      +    
      +    /*
      +     * if not matched yet, check ServerAlias entries
      +     * (adapted from vhost.c:matches_aliases())
      +     */
      +    names = s->names;
      +    if (names) {
      +        char **name = (char **)names->elts;
      +        for (i = 0; i < names->nelts; ++i) {
      +            if (!name[i])
      +                continue;
      +            if (!strcasecmp(servername, name[i])) {
      +                return TRUE;
      +            }
      +        }
      +    }
      +    
      +    /* if still no match, check ServerAlias entries with wildcards */
      +    names = s->wild_names;
      +    if (names) {
      +        char **name = (char **)names->elts;
      +        for (i = 0; i < names->nelts; ++i) {
      +            if (!name[i])
      +                continue;
      +            if (!ap_strcasecmp_match(servername, name[i])) {
      +                return TRUE;
      +            }
      +        }
      +    }
      +    
      +    return FALSE;
      +}
      +
       apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, const char *cmd,
                                   const char * const *argv)
       {
      @@ -76,8 +122,7 @@ apr_file_t *ssl_util_ppopen(server_rec *s, apr_pool_t *p, const char *cmd,
               return NULL;
           if (apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS)
               return NULL;
      -    if ((proc = (apr_proc_t *)apr_pcalloc(p, sizeof(apr_proc_t))) == NULL)
      -        return NULL;
      +    proc = apr_pcalloc(p, sizeof(apr_proc_t));
           if (apr_proc_create(proc, cmd, argv, NULL, procattr, p) != APR_SUCCESS)
               return NULL;
           return proc->out;
      @@ -136,61 +181,8 @@ BOOL ssl_util_path_check(ssl_pathcheck_t pcm, const char *path, apr_pool_t *p)
           return TRUE;
       }
       
      -ssl_algo_t ssl_util_algotypeof(X509 *pCert, EVP_PKEY *pKey)
      -{
      -    ssl_algo_t t;
      -    EVP_PKEY *pFreeKey = NULL;
      -
      -    t = SSL_ALGO_UNKNOWN;
      -    if (pCert != NULL)
      -        pFreeKey = pKey = X509_get_pubkey(pCert);
      -    if (pKey != NULL) {
      -        switch (EVP_PKEY_type(pKey->type)) {
      -            case EVP_PKEY_RSA:
      -                t = SSL_ALGO_RSA;
      -                break;
      -            case EVP_PKEY_DSA:
      -                t = SSL_ALGO_DSA;
      -                break;
      -#ifndef OPENSSL_NO_EC
      -            case EVP_PKEY_EC:
      -                t = SSL_ALGO_ECC;
      -                break;
      -#endif
      -            default:
      -                break;
      -        }
      -    }
      -    if (pFreeKey != NULL)
      -        EVP_PKEY_free(pFreeKey);
      -    return t;
      -}
      -
      -char *ssl_util_algotypestr(ssl_algo_t t)
      -{
      -    char *cp;
      -
      -    cp = "UNKNOWN";
      -    switch (t) {
      -        case SSL_ALGO_RSA:
      -            cp = "RSA";
      -            break;
      -        case SSL_ALGO_DSA:
      -            cp = "DSA";
      -            break;
      -#ifndef OPENSSL_NO_EC
      -        case SSL_ALGO_ECC:
      -            cp = "ECC";
      -            break;
      -#endif
      -        default:
      -            break;
      -    }
      -    return cp;
      -}
      -
       /*
      - * certain key and cert data needs to survive restarts,
      + * certain key data needs to survive restarts,
        * which are stored in the user data table of s->process->pool.
        * to prevent "leaking" of this data, we use malloc/free
        * rather than apr_palloc and these wrappers to help make sure
      @@ -254,81 +246,6 @@ void ssl_asn1_table_unset(apr_hash_t *table,
           apr_hash_set(table, key, klen, NULL);
       }
       
      -#ifndef OPENSSL_NO_EC
      -static const char *ssl_asn1_key_types[] = {"RSA", "DSA", "ECC"};
      -#else
      -static const char *ssl_asn1_key_types[] = {"RSA", "DSA"};
      -#endif
      -
      -const char *ssl_asn1_keystr(int keytype)
      -{
      -    if (keytype >= SSL_AIDX_MAX) {
      -        return NULL;
      -    }
      -
      -    return ssl_asn1_key_types[keytype];
      -}
      -
      -const char *ssl_asn1_table_keyfmt(apr_pool_t *p,
      -                                  const char *id,
      -                                  int keytype)
      -{
      -    const char *keystr = ssl_asn1_keystr(keytype);
      -
      -    return apr_pstrcat(p, id, ":", keystr, NULL);
      -}
      -
      -STACK_OF(X509) *ssl_read_pkcs7(server_rec *s, const char *pkcs7)
      -{
      -    PKCS7 *p7;
      -    STACK_OF(X509) *certs = NULL;
      -    FILE *f;
      -
      -    f = fopen(pkcs7, "r");
      -    if (!f) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "Can't open %s", pkcs7);
      -        ssl_die();
      -    }
      -
      -    p7 = PEM_read_PKCS7(f, NULL, NULL, NULL);
      -    if (!p7) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s,
      -                     "Can't read PKCS7 object %s", pkcs7);
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_CRIT, s);
      -        exit(1);
      -    }
      -
      -    switch (OBJ_obj2nid(p7->type)) {
      -    case NID_pkcs7_signed:
      -        certs = p7->d.sign->cert;
      -        p7->d.sign->cert = NULL;
      -        PKCS7_free(p7);
      -        break;
      -
      -    case NID_pkcs7_signedAndEnveloped:
      -        certs = p7->d.signed_and_enveloped->cert;
      -        p7->d.signed_and_enveloped->cert = NULL;
      -        PKCS7_free(p7);
      -        break;
      -
      -    default:
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                     "Don't understand PKCS7 file %s", pkcs7);
      -        ssl_die();
      -    }
      -
      -    if (!certs) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      -                     "No certificates in %s", pkcs7);
      -        ssl_die();
      -    }
      -
      -    fclose(f);
      -
      -    return certs;
      -}
      -
      -
       #if APR_HAS_THREADS
       /*
        * To ensure thread-safetyness in OpenSSL - work in progress
      @@ -376,24 +293,11 @@ static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file,
            * allocated memory from a pool, create a subpool that we can blow
            * away in the destruction callback.
            */
      -    rv = apr_pool_create(&p, dynlockpool);
      -    if (rv != APR_SUCCESS) {
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, dynlockpool,
      -                       "Failed to create subpool for dynamic lock");
      -        return NULL;
      -    }
      -
      -    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, p,
      +    apr_pool_create(&p, dynlockpool);
      +    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE1, 0, p,
                         "Creating dynamic lock");
       
      -    value = (struct CRYPTO_dynlock_value *)apr_palloc(p,
      -                                                      sizeof(struct CRYPTO_dynlock_value));
      -    if (!value) {
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, 0, p,
      -                      "Failed to allocate dynamic lock structure");
      -        return NULL;
      -    }
      -
      +    value = apr_palloc(p, sizeof(struct CRYPTO_dynlock_value));
           value->pool = p;
           /* Keep our own copy of the place from which we were created,
              using our own pool. */
      @@ -402,7 +306,7 @@ static struct CRYPTO_dynlock_value *ssl_dyn_create_function(const char *file,
           rv = apr_thread_mutex_create(&(value->mutex), APR_THREAD_MUTEX_DEFAULT,
                                       p);
           if (rv != APR_SUCCESS) {
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, p,
      +        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, p, APLOGNO(02186)
                             "Failed to create thread mutex for dynamic lock");
               apr_pool_destroy(p);
               return NULL;
      @@ -420,17 +324,17 @@ static void ssl_dyn_lock_function(int mode, struct CRYPTO_dynlock_value *l,
           apr_status_t rv;
       
           if (mode & CRYPTO_LOCK) {
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
      +        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE3, 0, l->pool,
                             "Acquiring mutex %s:%d", l->file, l->line);
               rv = apr_thread_mutex_lock(l->mutex);
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, rv, l->pool,
      +        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE3, rv, l->pool,
                             "Mutex %s:%d acquired!", l->file, l->line);
           }
           else {
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
      +        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE3, 0, l->pool,
                             "Releasing mutex %s:%d", l->file, l->line);
               rv = apr_thread_mutex_unlock(l->mutex);
      -        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, rv, l->pool,
      +        ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE3, rv, l->pool,
                             "Mutex %s:%d released!", l->file, l->line);
           }
       }
      @@ -443,13 +347,13 @@ static void ssl_dyn_destroy_function(struct CRYPTO_dynlock_value *l,
       {
           apr_status_t rv;
       
      -    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_DEBUG, 0, l->pool,
      +    ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_TRACE1, 0, l->pool,
                         "Destroying dynamic lock %s:%d", l->file, l->line);
           rv = apr_thread_mutex_destroy(l->mutex);
           if (rv != APR_SUCCESS) {
               ap_log_perror(file, line, APLOG_MODULE_INDEX, APLOG_ERR, rv, l->pool,
      -                      "Failed to destroy mutex for dynamic lock %s:%d",
      -                      l->file, l->line);
      +                      APLOGNO(02192) "Failed to destroy mutex for dynamic "
      +                      "lock %s:%d", l->file, l->line);
           }
       
           /* Trust that whomever owned the CRYPTO_dynlock_value we were
      diff --git a/modules/ssl/ssl_util_ocsp.c b/modules/ssl/ssl_util_ocsp.c
      index 06ff9933e38..a00c273d89f 100644
      --- a/modules/ssl/ssl_util_ocsp.c
      +++ b/modules/ssl/ssl_util_ocsp.c
      @@ -27,7 +27,8 @@
       
       /* Serialize an OCSP request which will be sent to the responder at
        * given URI to a memory BIO object, which is returned. */
      -static BIO *serialize_request(OCSP_REQUEST *req, const apr_uri_t *uri)
      +static BIO *serialize_request(OCSP_REQUEST *req, const apr_uri_t *uri,
      +                              const apr_uri_t *proxy_uri)
       {
           BIO *bio;
           int len;
      @@ -36,7 +37,13 @@ static BIO *serialize_request(OCSP_REQUEST *req, const apr_uri_t *uri)
       
           bio = BIO_new(BIO_s_mem());
       
      -    BIO_printf(bio, "POST %s%s%s HTTP/1.0\r\n"
      +    BIO_printf(bio, "POST ");
      +    /* Use full URL instead of URI in case of a request through a proxy */
      +    if (proxy_uri) {
      +        BIO_printf(bio, "http://%s:%d",
      +                   uri->hostname, uri->port);
      +    }
      +    BIO_printf(bio, "%s%s%s HTTP/1.0\r\n"
                      "Host: %s:%d\r\n"
                      "Content-Type: application/ocsp-request\r\n"
                      "Content-Length: %d\r\n"
      @@ -58,25 +65,38 @@ static BIO *serialize_request(OCSP_REQUEST *req, const apr_uri_t *uri)
        * NULL on error. */
       static apr_socket_t *send_request(BIO *request, const apr_uri_t *uri,
                                         apr_interval_time_t timeout,
      -                                  conn_rec *c, apr_pool_t *p)
      +                                  conn_rec *c, apr_pool_t *p,
      +                                  const apr_uri_t *proxy_uri)
       {
           apr_status_t rv;
           apr_sockaddr_t *sa;
           apr_socket_t *sd;
           char buf[HUGE_STRING_LEN];
           int len;
      +    const apr_uri_t *next_hop_uri;
      +
      +    if (proxy_uri) {
      +        next_hop_uri = proxy_uri;
      +    }
      +    else {
      +        next_hop_uri = uri;
      +    }
       
      -    rv = apr_sockaddr_info_get(&sa, uri->hostname, APR_UNSPEC, uri->port, 0, p);
      +    rv = apr_sockaddr_info_get(&sa, next_hop_uri->hostname, APR_UNSPEC,
      +                               next_hop_uri->port, 0, p);
           if (rv) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      -                      "could not resolve address of OCSP responder %s",
      -                      uri->hostinfo);
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01972)
      +                      "could not resolve address of %s %s",
      +                      proxy_uri ? "proxy" : "OCSP responder",
      +                      next_hop_uri->hostinfo);
               return NULL;
           }
       
           /* establish a connection to the OCSP responder */
      -    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      -                  "connecting to OCSP responder '%s'", uri->hostinfo);
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01973)
      +                  "connecting to %s '%s'",
      +                  proxy_uri ? "proxy" : "OCSP responder",
      +                  uri->hostinfo);
       
           /* Cycle through address until a connect() succeeds. */
           for (; sa; sa = sa->next) {
      @@ -93,15 +113,15 @@ static apr_socket_t *send_request(BIO *request, const apr_uri_t *uri,
           }
       
           if (sa == NULL) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      -                      "could not connect to OCSP responder '%s'",
      -                      uri->hostinfo);
      -        apr_socket_close(sd);
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01974)
      +                      "could not connect to %s '%s'",
      +                      proxy_uri ? "proxy" : "OCSP responder",
      +                      next_hop_uri->hostinfo);
               return NULL;
           }
       
           /* send the request and get a response */
      -    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +    ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01975)
                        "sending request to OCSP responder");
       
           while ((len = BIO_read(request, buf, sizeof buf)) > 0) {
      @@ -118,7 +138,7 @@ static apr_socket_t *send_request(BIO *request, const apr_uri_t *uri,
       
               if (rv) {
                   apr_socket_close(sd);
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01976)
                                 "failed to send request to OCSP responder '%s'",
                                 uri->hostinfo);
                   return NULL;
      @@ -141,20 +161,26 @@ static char *get_line(apr_bucket_brigade *bbout, apr_bucket_brigade *bbin,
       
           rv = apr_brigade_split_line(bbout, bbin, APR_BLOCK_READ, 8192);
           if (rv) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01977)
                             "failed reading line from OCSP server");
               return NULL;
           }
       
           rv = apr_brigade_pflatten(bbout, &line, &len, p);
           if (rv) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01978)
                             "failed reading line from OCSP server");
               return NULL;
           }
       
      -    if (len && line[len-1] != APR_ASCII_LF) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +    if (len == 0) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(02321)
      +                      "empty response from OCSP server");
      +        return NULL;
      +    }
      +
      +    if (line[len-1] != APR_ASCII_LF) {
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01979)
                             "response header line too long from OCSP server");
               return NULL;
           }
      @@ -193,7 +219,7 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c,
           if (!line || strncmp(line, "HTTP/", 5)
               || (line = ap_strchr(line, ' ')) == NULL
               || (code = apr_atoi64(++line)) < 200 || code > 299) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01980)
                             "bad response from OCSP server: %s",
                             line ? line : "(none)");
               return NULL;
      @@ -205,18 +231,18 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c,
           count = 0;
           while ((line = get_line(tmpbb, bb, c, p)) != NULL && line[0]
                  && ++count < MAX_HEADERS) {
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01981)
                             "OCSP response header: %s", line);
           }
       
           if (count == MAX_HEADERS) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01982)
                             "could not read response headers from OCSP server, "
                             "exceeded maximum count (%u)", MAX_HEADERS);
               return NULL;
           }
           else if (!line) {
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01983)
                             "could not read response header from OCSP server");
               return NULL;
           }
      @@ -230,24 +256,30 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c,
               apr_bucket *e = APR_BRIGADE_FIRST(bb);
       
               rv = apr_bucket_read(e, &data, &len, APR_BLOCK_READ);
      -        if (rv == APR_EOF || (rv == APR_SUCCESS && len == 0)) {
      -            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +        if (rv == APR_EOF) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01984)
                                 "OCSP response: got EOF");
                   break;
               }
               if (rv != APR_SUCCESS) {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01985)
                                 "error reading response from OCSP server");
                   return NULL;
               }
      +        if (len == 0) {
      +            /* Ignore zero-length buckets (possible side-effect of
      +             * line splitting). */
      +            apr_bucket_delete(e);
      +            continue;
      +        }
               count += len;
               if (count > MAX_CONTENT) {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01986)
                                 "OCSP response size exceeds %u byte limit",
                                 MAX_CONTENT);
                   return NULL;
               }
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01987)
                             "OCSP response: got %" APR_SIZE_T_FMT
                             " bytes, %" APR_SIZE_T_FMT " total", len, count);
       
      @@ -262,9 +294,9 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c,
            * bio. */
           response = d2i_OCSP_RESPONSE_bio(bio, NULL);
           if (response == NULL) {
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, mySrvFromConn(c));
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01988)
                             "failed to decode OCSP response data");
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, mySrvFromConn(c));
           }
       
           return response;
      @@ -278,16 +310,18 @@ OCSP_RESPONSE *modssl_dispatch_ocsp_request(const apr_uri_t *uri,
           OCSP_RESPONSE *response = NULL;
           apr_socket_t *sd;
           BIO *bio;
      +    const apr_uri_t *proxy_uri;
       
      -    bio = serialize_request(request, uri);
      +    proxy_uri = (mySrvConfigFromConn(c))->server->proxy_uri;
      +    bio = serialize_request(request, uri, proxy_uri);
           if (bio == NULL) {
      -        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, mySrvFromConn(c));
      -        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(01989)
                             "could not serialize OCSP request");
      +        ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, mySrvFromConn(c));
               return NULL;
           }
       
      -    sd = send_request(bio, uri, timeout, c, p);
      +    sd = send_request(bio, uri, timeout, c, p, proxy_uri);
           if (sd == NULL) {
               /* Errors already logged. */
               BIO_free(bio);
      diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c
      index 5022d0da387..a7607c73498 100644
      --- a/modules/ssl/ssl_util_ssl.c
      +++ b/modules/ssl/ssl_util_ssl.c
      @@ -38,84 +38,43 @@
        * also note that OpenSSL increments at static variable when
        * SSL_get_ex_new_index() is called, so we _must_ do this at startup.
        */
      -static int SSL_app_data2_idx = -1;
      +static int app_data2_idx = -1;
       
      -void SSL_init_app_data2_idx(void)
      +void modssl_init_app_data2_idx(void)
       {
           int i;
       
      -    if (SSL_app_data2_idx > -1) {
      +    if (app_data2_idx > -1) {
               return;
           }
       
           /* we _do_ need to call this twice */
      -    for (i=0; i<=1; i++) {
      -        SSL_app_data2_idx =
      +    for (i = 0; i <= 1; i++) {
      +        app_data2_idx =
                   SSL_get_ex_new_index(0,
                                        "Second Application Data for SSL",
                                        NULL, NULL, NULL);
           }
       }
       
      -void *SSL_get_app_data2(SSL *ssl)
      +void *modssl_get_app_data2(SSL *ssl)
       {
      -    return (void *)SSL_get_ex_data(ssl, SSL_app_data2_idx);
      +    return (void *)SSL_get_ex_data(ssl, app_data2_idx);
       }
       
      -void SSL_set_app_data2(SSL *ssl, void *arg)
      +void modssl_set_app_data2(SSL *ssl, void *arg)
       {
      -    SSL_set_ex_data(ssl, SSL_app_data2_idx, (char *)arg);
      +    SSL_set_ex_data(ssl, app_data2_idx, (char *)arg);
           return;
       }
       
       /*  _________________________________________________________________
       **
      -**  High-Level Certificate / Private Key Loading
      +**  High-Level Private Key Loading
       **  _________________________________________________________________
       */
       
      -X509 *SSL_read_X509(char* filename, X509 **x509, pem_password_cb *cb)
      -{
      -    X509 *rc;
      -    BIO *bioS;
      -    BIO *bioF;
      -
      -    /* 1. try PEM (= DER+Base64+headers) */
      -    if ((bioS=BIO_new_file(filename, "r")) == NULL)
      -        return NULL;
      -    rc = PEM_read_bio_X509 (bioS, x509, cb, NULL);
      -    BIO_free(bioS);
      -
      -    if (rc == NULL) {
      -        /* 2. try DER+Base64 */
      -        if ((bioS=BIO_new_file(filename, "r")) == NULL)
      -            return NULL;
      -
      -        if ((bioF = BIO_new(BIO_f_base64())) == NULL) {
      -            BIO_free(bioS);
      -            return NULL;
      -        }
      -        bioS = BIO_push(bioF, bioS);
      -        rc = d2i_X509_bio(bioS, NULL);
      -        BIO_free_all(bioS);
      -
      -        if (rc == NULL) {
      -            /* 3. try plain DER */
      -            if ((bioS=BIO_new_file(filename, "r")) == NULL)
      -                return NULL;
      -            rc = d2i_X509_bio(bioS, NULL);
      -            BIO_free(bioS);
      -        }
      -    }
      -    if (rc != NULL && x509 != NULL) {
      -        if (*x509 != NULL)
      -            X509_free(*x509);
      -        *x509 = rc;
      -    }
      -    return rc;
      -}
      -
      -EVP_PKEY *SSL_read_PrivateKey(char* filename, EVP_PKEY **key, pem_password_cb *cb, void *s)
      +EVP_PKEY *modssl_read_privatekey(const char* filename, EVP_PKEY **key, pem_password_cb *cb, void *s)
       {
           EVP_PKEY *rc;
           BIO *bioS;
      @@ -162,10 +121,11 @@ EVP_PKEY *SSL_read_PrivateKey(char* filename, EVP_PKEY **key, pem_password_cb *c
       **  _________________________________________________________________
       */
       
      -int SSL_smart_shutdown(SSL *ssl)
      +int modssl_smart_shutdown(SSL *ssl)
       {
           int i;
           int rc;
      +    int flush;
       
           /*
            * Repeat the calls, because SSL_shutdown internally dispatches through a
      @@ -175,85 +135,33 @@ int SSL_smart_shutdown(SSL *ssl)
            * connection and OpenSSL cannot recognize it.
            */
           rc = 0;
      +    flush = !(SSL_get_shutdown(ssl) & SSL_SENT_SHUTDOWN);
           for (i = 0; i < 4 /* max 2x pending + 2x data = 4 */; i++) {
      -        if ((rc = SSL_shutdown(ssl)))
      +        rc = SSL_shutdown(ssl);
      +        if (rc >= 0 && flush && (SSL_get_shutdown(ssl) & SSL_SENT_SHUTDOWN)) {
      +            /* Once the close notity is sent through the output filters,
      +             * ensure it is flushed through the socket.
      +             */
      +            if (BIO_flush(SSL_get_wbio(ssl)) <= 0) {
      +                rc = -1;
      +                break;
      +            }
      +            flush = 0;
      +        }
      +        if (rc != 0)
                   break;
           }
           return rc;
       }
       
      -/*  _________________________________________________________________
      -**
      -**  Cipher Suite Spec String Creation
      -**  _________________________________________________________________
      -*/
      -
      -char *SSL_make_ciphersuite(apr_pool_t *p, SSL *ssl)
      -{
      -    STACK_OF(SSL_CIPHER) *sk;
      -    SSL_CIPHER *c;
      -    int i;
      -    int l;
      -    char *cpCipherSuite;
      -    char *cp;
      -
      -    if (ssl == NULL)
      -        return "";
      -    if ((sk = (STACK_OF(SSL_CIPHER) *)SSL_get_ciphers(ssl)) == NULL)
      -        return "";
      -    l = 0;
      -    for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
      -        c = sk_SSL_CIPHER_value(sk, i);
      -        l += strlen(SSL_CIPHER_get_name(c))+2+1;
      -    }
      -    if (l == 0)
      -        return "";
      -    cpCipherSuite = (char *)apr_palloc(p, l+1);
      -    cp = cpCipherSuite;
      -    for (i = 0; i < sk_SSL_CIPHER_num(sk); i++) {
      -        c = sk_SSL_CIPHER_value(sk, i);
      -        l = strlen(SSL_CIPHER_get_name(c));
      -        memcpy(cp, SSL_CIPHER_get_name(c), l);
      -        cp += l;
      -        *cp++ = '/';
      -        *cp++ = (c->valid == 1 ? '1' : '0');
      -        *cp++ = ':';
      -    }
      -    *(cp-1) = NUL;
      -    return cpCipherSuite;
      -}
      -
       /*  _________________________________________________________________
       **
       **  Certificate Checks
       **  _________________________________________________________________
       */
       
      -/* check whether cert contains extended key usage with a SGC tag */
      -BOOL SSL_X509_isSGC(X509 *cert)
      -{
      -    int ext_nid;
      -    EXTENDED_KEY_USAGE *sk;
      -    BOOL is_sgc;
      -    int i;
      -
      -    is_sgc = FALSE;
      -    sk = X509_get_ext_d2i(cert, NID_ext_key_usage, NULL, NULL);
      -    if (sk) {
      -        for (i = 0; i < sk_ASN1_OBJECT_num(sk); i++) {
      -            ext_nid = OBJ_obj2nid(sk_ASN1_OBJECT_value(sk, i));
      -            if (ext_nid == NID_ms_sgc || ext_nid == NID_ns_sgc) {
      -                is_sgc = TRUE;
      -                break;
      -            }
      -        }
      -    EXTENDED_KEY_USAGE_free(sk);
      -    }
      -    return is_sgc;
      -}
      -
       /* retrieve basic constraints ingredients */
      -BOOL SSL_X509_getBC(X509 *cert, int *ca, int *pathlen)
      +BOOL modssl_X509_getBC(X509 *cert, int *ca, int *pathlen)
       {
           BASIC_CONSTRAINTS *bc;
           BIGNUM *bn = NULL;
      @@ -265,34 +173,49 @@ BOOL SSL_X509_getBC(X509 *cert, int *ca, int *pathlen)
           *ca = bc->ca;
           *pathlen = -1 /* unlimited */;
           if (bc->pathlen != NULL) {
      -        if ((bn = ASN1_INTEGER_to_BN(bc->pathlen, NULL)) == NULL)
      +        if ((bn = ASN1_INTEGER_to_BN(bc->pathlen, NULL)) == NULL) {
      +            BASIC_CONSTRAINTS_free(bc);
                   return FALSE;
      -        if ((cp = BN_bn2dec(bn)) == NULL)
      +        }
      +        if ((cp = BN_bn2dec(bn)) == NULL) {
      +            BN_free(bn);
      +            BASIC_CONSTRAINTS_free(bc);
                   return FALSE;
      +        }
               *pathlen = atoi(cp);
      -        free(cp);
      +        OPENSSL_free(cp);
               BN_free(bn);
           }
           BASIC_CONSTRAINTS_free(bc);
           return TRUE;
       }
       
      -/* convert a NAME_ENTRY to UTF8 string */
      -char *SSL_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne)
      +/* convert an ASN.1 string to a UTF-8 string (escaping control characters) */
      +static char *asn1_string_to_utf8(apr_pool_t *p, ASN1_STRING *asn1str)
       {
           char *result = NULL;
      -    BIO* bio;
      +    BIO *bio;
           int len;
       
           if ((bio = BIO_new(BIO_s_mem())) == NULL)
               return NULL;
      -    ASN1_STRING_print_ex(bio, X509_NAME_ENTRY_get_data(xsne),
      -                         ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_UTF8_CONVERT);
      +
      +    ASN1_STRING_print_ex(bio, asn1str, ASN1_STRFLGS_ESC_CTRL|
      +                                       ASN1_STRFLGS_UTF8_CONVERT);
           len = BIO_pending(bio);
      -    result = apr_palloc(p, len+1);
      -    len = BIO_read(bio, result, len);
      -    result[len] = NUL;
      +    if (len > 0) {
      +        result = apr_palloc(p, len+1);
      +        len = BIO_read(bio, result, len);
      +        result[len] = NUL;
      +    }
           BIO_free(bio);
      +    return result;
      +}
      +
      +/* convert a NAME_ENTRY to UTF8 string */
      +char *modssl_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne)
      +{
      +    char *result = asn1_string_to_utf8(p, X509_NAME_ENTRY_get_data(xsne));
           ap_xlate_proto_from_ascii(result, len);
           return result;
       }
      @@ -301,7 +224,7 @@ char *SSL_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne)
        * convert an X509_NAME to an RFC 2253 formatted string, optionally truncated
        * to maxlen characters (specify a maxlen of 0 for no length limit)
        */
      -char *SSL_X509_NAME_to_string(apr_pool_t *p, X509_NAME *dn, unsigned int maxlen)
      +char *modssl_X509_NAME_to_string(apr_pool_t *p, X509_NAME *dn, int maxlen)
       {
           char *result = NULL;
           BIO *bio;
      @@ -312,8 +235,8 @@ char *SSL_X509_NAME_to_string(apr_pool_t *p, X509_NAME *dn, unsigned int maxlen)
           X509_NAME_print_ex(bio, dn, 0, XN_FLAG_RFC2253);
           len = BIO_pending(bio);
           if (len > 0) {
      -        result = apr_palloc(p, maxlen ? maxlen+1 : len+1);
      -        if (maxlen && maxlen < len) {
      +        result = apr_palloc(p, (maxlen > 0) ? maxlen+1 : len+1);
      +        if (maxlen > 0 && maxlen < len) {
                   len = BIO_read(bio, result, maxlen);
                   if (maxlen > 2) {
                       /* insert trailing ellipsis if there's enough space */
      @@ -329,185 +252,235 @@ char *SSL_X509_NAME_to_string(apr_pool_t *p, X509_NAME *dn, unsigned int maxlen)
           return result;
       }
       
      -/* return an array of (RFC 6125 coined) DNS-IDs and CN-IDs in a certificate */
      -BOOL SSL_X509_getIDs(apr_pool_t *p, X509 *x509, apr_array_header_t **ids)
      +static void parse_otherName_value(apr_pool_t *p, ASN1_TYPE *value,
      +                                  const char *onf, apr_array_header_t **entries)
      +{
      +    const char *str;
      +    int nid = onf ? OBJ_txt2nid(onf) : NID_undef;
      +
      +    if (!value || (nid == NID_undef) || !*entries)
      +       return;
      +
      +    /* 
      +     * Currently supported otherName forms (values for "onf"):
      +     * "msUPN" (1.3.6.1.4.1.311.20.2.3): Microsoft User Principal Name
      +     * "id-on-dnsSRV" (1.3.6.1.5.5.7.8.7): SRVName, as specified in RFC 4985
      +     */
      +    if ((nid == NID_ms_upn) && (value->type == V_ASN1_UTF8STRING) &&
      +        (str = asn1_string_to_utf8(p, value->value.utf8string))) {
      +        APR_ARRAY_PUSH(*entries, const char *) = str;
      +    } else if (strEQ(onf, "id-on-dnsSRV") &&
      +               (value->type == V_ASN1_IA5STRING) &&
      +               (str = asn1_string_to_utf8(p, value->value.ia5string))) {
      +        APR_ARRAY_PUSH(*entries, const char *) = str;
      +    }
      +}
      +
      +/* 
      + * Return an array of subjectAltName entries of type "type". If idx is -1,
      + * return all entries of the given type, otherwise return an array consisting
      + * of the n-th occurrence of that type only. Currently supported types:
      + * GEN_EMAIL (rfc822Name)
      + * GEN_DNS (dNSName)
      + * GEN_OTHERNAME (requires the otherName form ["onf"] argument to be supplied,
      + *                see parse_otherName_value for the currently supported forms)
      + */
      +BOOL modssl_X509_getSAN(apr_pool_t *p, X509 *x509, int type, const char *onf,
      +                        int idx, apr_array_header_t **entries)
       {
           STACK_OF(GENERAL_NAME) *names;
      -    BIO *bio;
      -    X509_NAME *subj;
      -    char **cpp;
      -    int i, n;
      +    int nid = onf ? OBJ_txt2nid(onf) : NID_undef;
       
      -    if (!x509 || !(*ids = apr_array_make(p, 0, sizeof(char *)))) {
      -        *ids = NULL;
      +    if (!x509 || (type < GEN_OTHERNAME) ||
      +        ((type == GEN_OTHERNAME) && (nid == NID_undef)) ||
      +        (type > GEN_RID) || (idx < -1) ||
      +        !(*entries = apr_array_make(p, 0, sizeof(char *)))) {
      +        *entries = NULL;
               return FALSE;
           }
       
      -    /* First, the DNS-IDs (dNSName entries in the subjectAltName extension) */
      -    if ((names = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL)) &&
      -        (bio = BIO_new(BIO_s_mem()))) {
      +    if ((names = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL))) {
      +        int i, n = 0;
               GENERAL_NAME *name;
      +        const char *utf8str;
       
               for (i = 0; i < sk_GENERAL_NAME_num(names); i++) {
                   name = sk_GENERAL_NAME_value(names, i);
      -            if (name->type == GEN_DNS) {
      -                ASN1_STRING_print_ex(bio, name->d.ia5, ASN1_STRFLGS_ESC_CTRL|
      -                                     ASN1_STRFLGS_UTF8_CONVERT);
      -                n = BIO_pending(bio);
      -                if (n > 0) {
      -                    cpp = (char **)apr_array_push(*ids);
      -                    *cpp = apr_palloc(p, n+1);
      -                    n = BIO_read(bio, *cpp, n);
      -                    (*cpp)[n] = NUL;
      +
      +            if (name->type != type)
      +                continue;
      +
      +            switch (type) {
      +            case GEN_EMAIL:
      +            case GEN_DNS:
      +                if (((idx == -1) || (n == idx)) &&
      +                    (utf8str = asn1_string_to_utf8(p, name->d.ia5))) {
      +                    APR_ARRAY_PUSH(*entries, const char *) = utf8str;
                       }
      +                n++;
      +                break;
      +            case GEN_OTHERNAME:
      +                if (OBJ_obj2nid(name->d.otherName->type_id) == nid) {
      +                    if (((idx == -1) || (n == idx))) {
      +                        parse_otherName_value(p, name->d.otherName->value,
      +                                              onf, entries);
      +                    }
      +                    n++;
      +                }
      +                break;
      +            default:
      +                /*
      +                 * Not implemented right now:
      +                 * GEN_X400 (x400Address)
      +                 * GEN_DIRNAME (directoryName)
      +                 * GEN_EDIPARTY (ediPartyName)
      +                 * GEN_URI (uniformResourceIdentifier)
      +                 * GEN_IPADD (iPAddress)
      +                 * GEN_RID (registeredID)
      +                 */
      +                break;
                   }
      -        }
      -        BIO_free(bio);
      -    }
       
      -    if (names)
      -        sk_GENERAL_NAME_free(names);
      +            if ((idx != -1) && (n > idx))
      +               break;
      +        }
       
      -    /* Second, the CN-IDs (commonName attributes in the subject DN) */
      -    subj = X509_get_subject_name(x509);
      -    i = -1;
      -    while ((i = X509_NAME_get_index_by_NID(subj, NID_commonName, i)) != -1) {
      -        cpp = (char **)apr_array_push(*ids);
      -        *cpp = SSL_X509_NAME_ENTRY_to_string(p, X509_NAME_get_entry(subj, i));
      +        sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free);
           }
       
      -    return apr_is_empty_array(*ids) ? FALSE : TRUE;
      +    return apr_is_empty_array(*entries) ? FALSE : TRUE;
       }
       
      -/*  _________________________________________________________________
      -**
      -**  Low-Level CA Certificate Loading
      -**  _________________________________________________________________
      -*/
      -
      -BOOL SSL_X509_INFO_load_file(apr_pool_t *ptemp,
      -                             STACK_OF(X509_INFO) *sk,
      -                             const char *filename)
      +/* return an array of (RFC 6125 coined) DNS-IDs and CN-IDs in a certificate */
      +static BOOL getIDs(apr_pool_t *p, X509 *x509, apr_array_header_t **ids)
       {
      -    BIO *in;
      +    X509_NAME *subj;
      +    int i = -1;
       
      -    if (!(in = BIO_new(BIO_s_file()))) {
      +    /* First, the DNS-IDs (dNSName entries in the subjectAltName extension) */
      +    if (!x509 ||
      +        (modssl_X509_getSAN(p, x509, GEN_DNS, NULL, -1, ids) == FALSE && !*ids)) {
      +        *ids = NULL;
               return FALSE;
           }
       
      -    if (BIO_read_filename(in, filename) <= 0) {
      -        BIO_free(in);
      -        return FALSE;
      +    /* Second, the CN-IDs (commonName attributes in the subject DN) */
      +    subj = X509_get_subject_name(x509);
      +    while ((i = X509_NAME_get_index_by_NID(subj, NID_commonName, i)) != -1) {
      +        APR_ARRAY_PUSH(*ids, const char *) = 
      +            modssl_X509_NAME_ENTRY_to_string(p, X509_NAME_get_entry(subj, i));
           }
       
      -    ERR_clear_error();
      -
      -    PEM_X509_INFO_read_bio(in, sk, NULL, NULL);
      -
      -    BIO_free(in);
      -
      -    return TRUE;
      +    return apr_is_empty_array(*ids) ? FALSE : TRUE;
       }
       
      -BOOL SSL_X509_INFO_load_path(apr_pool_t *ptemp,
      -                             STACK_OF(X509_INFO) *sk,
      -                             const char *pathname)
      +/* 
      + * Check if a certificate matches for a particular name, by iterating over its
      + * DNS-IDs and CN-IDs (RFC 6125), optionally with basic wildcard matching.
      + * If server_rec is non-NULL, some (debug/trace) logging is enabled.
      + */
      +BOOL modssl_X509_match_name(apr_pool_t *p, X509 *x509, const char *name,
      +                            BOOL allow_wildcard, server_rec *s)
       {
      -    /* XXX: this dir read code is exactly the same as that in
      -     * ssl_engine_init.c, only the call to handle the fullname is different,
      -     * should fold the duplication.
      -     */
      -    apr_dir_t *dir;
      -    apr_finfo_t dirent;
      -    apr_int32_t finfo_flags = APR_FINFO_TYPE|APR_FINFO_NAME;
      -    const char *fullname;
      -    BOOL ok = FALSE;
      +    BOOL matched = FALSE;
      +    apr_array_header_t *ids;
       
      -    if (apr_dir_open(&dir, pathname, ptemp) != APR_SUCCESS) {
      -        return FALSE;
      -    }
      +    /*
      +     * At some day in the future, this might be replaced with X509_check_host()
      +     * (available in OpenSSL 1.0.2 and later), but two points should be noted:
      +     * 1) wildcard matching in X509_check_host() might yield different
      +     *    results (by default, it supports a broader set of patterns, e.g.
      +     *    wildcards in non-initial positions);
      +     * 2) we lose the option of logging each DNS- and CN-ID (until a match
      +     *    is found).
      +     */
       
      -    while ((apr_dir_read(&dirent, finfo_flags, dir)) == APR_SUCCESS) {
      -        if (dirent.filetype == APR_DIR) {
      -            continue; /* don't try to load directories */
      -        }
      +    if (getIDs(p, x509, &ids)) {
      +        const char *cp;
      +        int i;
      +        char **id = (char **)ids->elts;
      +        BOOL is_wildcard;
      +
      +        for (i = 0; i < ids->nelts; i++) {
      +            if (!id[i])
      +                continue;
      +
      +            /*
      +             * Determine if it is a wildcard ID - we're restrictive
      +             * in the sense that we require the wildcard character to be
      +             * THE left-most label (i.e., the ID must start with "*.")
      +             */
      +            is_wildcard = (*id[i] == '*' && *(id[i]+1) == '.') ? TRUE : FALSE;
      +
      +            /*
      +             * If the ID includes a wildcard character (and the caller is
      +             * allowing wildcards), check if it matches for the left-most
      +             * DNS label - i.e., the wildcard character is not allowed
      +             * to match a dot. Otherwise, try a simple string compare.
      +             */
      +            if ((allow_wildcard == TRUE && is_wildcard == TRUE &&
      +                 (cp = ap_strchr_c(name, '.')) && !strcasecmp(id[i]+1, cp)) ||
      +                !strcasecmp(id[i], name)) {
      +                matched = TRUE;
      +            }
       
      -        fullname = apr_pstrcat(ptemp,
      -                               pathname, "/", dirent.name,
      -                               NULL);
      +            if (s) {
      +                ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s,
      +                             "[%s] modssl_X509_match_name: expecting name '%s', "
      +                             "%smatched by ID '%s'",
      +                             (mySrvConfig(s))->vhost_id, name,
      +                             matched == TRUE ? "" : "NOT ", id[i]);
      +            }
       
      -        if (SSL_X509_INFO_load_file(ptemp, sk, fullname)) {
      -            ok = TRUE;
      +            if (matched == TRUE) {
      +                break;
      +            }
               }
      +
           }
       
      -    apr_dir_close(dir);
      +    if (s) {
      +        ssl_log_xerror(SSLLOG_MARK, APLOG_DEBUG, 0, p, s, x509,
      +                       APLOGNO(02412) "[%s] Cert %s for name '%s'",
      +                       (mySrvConfig(s))->vhost_id,
      +                       matched == TRUE ? "matches" : "does not match",
      +                       name);
      +    }
       
      -    return ok;
      +    return matched;
       }
       
       /*  _________________________________________________________________
       **
      -**  Extra Server Certificate Chain Support
      +**  Custom (EC)DH parameter support
       **  _________________________________________________________________
       */
       
      -/*
      - * Read a file that optionally contains the server certificate in PEM
      - * format, possibly followed by a sequence of CA certificates that
      - * should be sent to the peer in the SSL Certificate message.
      - */
      -int SSL_CTX_use_certificate_chain(
      -    SSL_CTX *ctx, char *file, int skipfirst, pem_password_cb *cb)
      +DH *ssl_dh_GetParamFromFile(const char *file)
       {
      +    DH *dh = NULL;
           BIO *bio;
      -    X509 *x509;
      -    unsigned long err;
      -    int n;
      -    STACK_OF(X509) *extra_certs;
      -
      -    if ((bio = BIO_new(BIO_s_file_internal())) == NULL)
      -        return -1;
      -    if (BIO_read_filename(bio, file) <= 0) {
      -        BIO_free(bio);
      -        return -1;
      -    }
      -    /* optionally skip a leading server certificate */
      -    if (skipfirst) {
      -        if ((x509 = PEM_read_bio_X509(bio, NULL, cb, NULL)) == NULL) {
      -            BIO_free(bio);
      -            return -1;
      -        }
      -        X509_free(x509);
      -    }
      -    /* free a perhaps already configured extra chain */
      -    extra_certs = ctx->extra_certs;
      -    if (extra_certs != NULL) {
      -        sk_X509_pop_free((STACK_OF(X509) *)extra_certs, X509_free);
      -        ctx->extra_certs = NULL;
      -    }
      -    /* create new extra chain by loading the certs */
      -    n = 0;
      -    while ((x509 = PEM_read_bio_X509(bio, NULL, cb, NULL)) != NULL) {
      -        if (!SSL_CTX_add_extra_chain_cert(ctx, x509)) {
      -            X509_free(x509);
      -            BIO_free(bio);
      -            return -1;
      -        }
      -        n++;
      -    }
      -    /* Make sure that only the error is just an EOF */
      -    if ((err = ERR_peek_error()) > 0) {
      -        if (!(   ERR_GET_LIB(err) == ERR_LIB_PEM
      -              && ERR_GET_REASON(err) == PEM_R_NO_START_LINE)) {
      -            BIO_free(bio);
      -            return -1;
      -        }
      -        while (ERR_get_error() > 0) ;
      -    }
      +
      +    if ((bio = BIO_new_file(file, "r")) == NULL)
      +        return NULL;
      +    dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
      +    BIO_free(bio);
      +    return (dh);
      +}
      +
      +#ifdef HAVE_ECC
      +EC_GROUP *ssl_ec_GetParamFromFile(const char *file)
      +{
      +    EC_GROUP *group = NULL;
      +    BIO *bio;
      +
      +    if ((bio = BIO_new_file(file, "r")) == NULL)
      +        return NULL;
      +    group = PEM_read_bio_ECPKParameters(bio, NULL, NULL, NULL);
           BIO_free(bio);
      -    return n;
      +    return (group);
       }
      +#endif
       
       /*  _________________________________________________________________
       **
      @@ -515,17 +488,18 @@ int SSL_CTX_use_certificate_chain(
       **  _________________________________________________________________
       */
       
      -char *SSL_SESSION_id2sz(unsigned char *id, int idlen,
      -                        char *str, int strsize)
      +char *modssl_SSL_SESSION_id2sz(unsigned char *id, int idlen,
      +                               char *str, int strsize)
       {
      -    char *cp;
      -    int n;
      +    if (idlen > SSL_MAX_SSL_SESSION_ID_LENGTH)
      +        idlen = SSL_MAX_SSL_SESSION_ID_LENGTH;
      +        
      +    /* We must ensure not to process more than what would fit in the
      +     * destination buffer, including terminating NULL */
      +    if (idlen > (strsize-1) / 2)
      +        idlen = (strsize-1) / 2;
      +
      +    ap_bin2hex(id, idlen, str);
       
      -    cp = str;
      -    for (n = 0; n < idlen && n < SSL_MAX_SSL_SESSION_ID_LENGTH; n++) {
      -        apr_snprintf(cp, strsize - (cp-str), "%02X", id[n]);
      -        cp += 2;
      -    }
      -    *cp = NUL;
           return str;
       }
      diff --git a/modules/ssl/ssl_util_ssl.h b/modules/ssl/ssl_util_ssl.h
      index db2a2e30fe0..5f7483195c8 100644
      --- a/modules/ssl/ssl_util_ssl.h
      +++ b/modules/ssl/ssl_util_ssl.h
      @@ -38,41 +38,36 @@
        * SSL library version number
        */
       
      -#define SSL_LIBRARY_VERSION OPENSSL_VERSION_NUMBER
      -#define SSL_LIBRARY_NAME    "OpenSSL"
      -#define SSL_LIBRARY_TEXT    OPENSSL_VERSION_TEXT
      -#define SSL_LIBRARY_DYNTEXT SSLeay_version(SSLEAY_VERSION)
      +#define MODSSL_LIBRARY_VERSION OPENSSL_VERSION_NUMBER
      +#define MODSSL_LIBRARY_NAME    "OpenSSL"
      +#define MODSSL_LIBRARY_TEXT    OPENSSL_VERSION_TEXT
      +#define MODSSL_LIBRARY_DYNTEXT SSLeay_version(SSLEAY_VERSION)
       
       /**
        *  Maximum length of a DER encoded session.
        *  FIXME: There is no define in OpenSSL, but OpenSSL uses 1024*10,
        *         so this value should be ok. Although we have no warm feeling.
        */
      -#define SSL_SESSION_MAX_DER 1024*10
      +#define MODSSL_SESSION_MAX_DER 1024*10
       
      -/** max length for SSL_SESSION_id2sz */
      -#define SSL_SESSION_ID_STRING_LEN \
      +/** max length for modssl_SSL_SESSION_id2sz */
      +#define MODSSL_SESSION_ID_STRING_LEN \
           ((SSL_MAX_SSL_SESSION_ID_LENGTH + 1) * 2)
       
       /**
        *  Additional Functions
        */
      -void        SSL_init_app_data2_idx(void);
      -void       *SSL_get_app_data2(SSL *);
      -void        SSL_set_app_data2(SSL *, void *);
      -X509       *SSL_read_X509(char *, X509 **, pem_password_cb *);
      -EVP_PKEY   *SSL_read_PrivateKey(char *, EVP_PKEY **, pem_password_cb *, void *);
      -int         SSL_smart_shutdown(SSL *ssl);
      -char       *SSL_make_ciphersuite(apr_pool_t *, SSL *);
      -BOOL        SSL_X509_isSGC(X509 *);
      -BOOL        SSL_X509_getBC(X509 *, int *, int *);
      -char       *SSL_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne);
      -char       *SSL_X509_NAME_to_string(apr_pool_t *, X509_NAME *, unsigned int);
      -BOOL        SSL_X509_getIDs(apr_pool_t *, X509 *, apr_array_header_t **);
      -BOOL        SSL_X509_INFO_load_file(apr_pool_t *, STACK_OF(X509_INFO) *, const char *);
      -BOOL        SSL_X509_INFO_load_path(apr_pool_t *, STACK_OF(X509_INFO) *, const char *);
      -int         SSL_CTX_use_certificate_chain(SSL_CTX *, char *, int, pem_password_cb *);
      -char       *SSL_SESSION_id2sz(unsigned char *, int, char *, int);
      +void        modssl_init_app_data2_idx(void);
      +void       *modssl_get_app_data2(SSL *);
      +void        modssl_set_app_data2(SSL *, void *);
      +EVP_PKEY   *modssl_read_privatekey(const char *, EVP_PKEY **, pem_password_cb *, void *);
      +int         modssl_smart_shutdown(SSL *ssl);
      +BOOL        modssl_X509_getBC(X509 *, int *, int *);
      +char       *modssl_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne);
      +char       *modssl_X509_NAME_to_string(apr_pool_t *, X509_NAME *, int);
      +BOOL        modssl_X509_getSAN(apr_pool_t *, X509 *, int, const char *, int, apr_array_header_t **);
      +BOOL        modssl_X509_match_name(apr_pool_t *, X509 *, const char *, BOOL, server_rec *);
      +char       *modssl_SSL_SESSION_id2sz(unsigned char *, int, char *, int);
       
       #endif /* __SSL_UTIL_SSL_H__ */
       /** @} */
      diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c
      index 5ebd3060b88..0737f43779b 100644
      --- a/modules/ssl/ssl_util_stapling.c
      +++ b/modules/ssl/ssl_util_stapling.c
      @@ -34,6 +34,9 @@
       
       #ifdef HAVE_OCSP_STAPLING
       
      +static int stapling_cache_mutex_on(server_rec *s);
      +static int stapling_cache_mutex_off(server_rec *s);
      +
       /**
        * Maxiumum OCSP stapling response size. This should be the response for a
        * single certificate and will typically include the responder certificate chain
      @@ -43,36 +46,32 @@
       
       #define MAX_STAPLING_DER 10240
       
      -/* Cached info stored in certificate ex_info. */
      +/* Cached info stored in the global stapling_certinfo hash. */
       typedef struct {
      -    /* Index in session cache SHA1 hash of certificate */
      -    UCHAR idx[20];
      -    /* Certificate ID for OCSP requests or NULL if ID cannot be determined */
      +    /* Index in session cache (SHA-1 digest of DER encoded certificate) */
      +    UCHAR idx[SHA_DIGEST_LENGTH];
      +    /* Certificate ID for OCSP request */
           OCSP_CERTID *cid;
      -    /* Responder details */
      +    /* URI of the OCSP responder */
           char *uri;
       } certinfo;
       
      -static void certinfo_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
      -                                        int idx, long argl, void *argp)
      +static apr_status_t ssl_stapling_certid_free(void *data)
       {
      -    certinfo *cinf = ptr;
      +    OCSP_CERTID *cid = data;
       
      -    if (!cinf)
      -        return;
      -    if (cinf->uri)
      -        OPENSSL_free(cinf->uri);
      -    OPENSSL_free(cinf);
      +    if (cid) {
      +        OCSP_CERTID_free(cid);
      +    }
      +
      +    return APR_SUCCESS;
       }
       
      -static int stapling_ex_idx = -1;
      +static apr_hash_t *stapling_certinfo;
       
      -void ssl_stapling_ex_init(void)
      +void ssl_stapling_certinfo_hash_init(apr_pool_t *p)
       {
      -    if (stapling_ex_idx != -1)
      -        return;
      -    stapling_ex_idx = X509_get_ex_new_index(0, "X509 cached OCSP info", 0, 0,
      -                                            certinfo_free);
      +    stapling_certinfo = apr_hash_make(p);
       }
       
       static X509 *stapling_get_issuer(modssl_ctx_t *mctx, X509 *x)
      @@ -81,9 +80,16 @@ static X509 *stapling_get_issuer(modssl_ctx_t *mctx, X509 *x)
           int i;
           X509_STORE *st = SSL_CTX_get_cert_store(mctx->ssl_ctx);
           X509_STORE_CTX inctx;
      +    STACK_OF(X509) *extra_certs = NULL;
       
      -    for (i = 0; i < sk_X509_num(mctx->ssl_ctx->extra_certs); i++) {
      -        issuer = sk_X509_value(mctx->ssl_ctx->extra_certs, i);
      +#ifdef OPENSSL_NO_SSL_INTERN
      +    SSL_CTX_get_extra_chain_certs(mctx->ssl_ctx, &extra_certs);
      +#else
      +    extra_certs = mctx->ssl_ctx->extra_certs;
      +#endif
      +
      +    for (i = 0; i < sk_X509_num(extra_certs); i++) {
      +        issuer = sk_X509_value(extra_certs, i);
               if (X509_check_issued(issuer, x) == X509_V_OK) {
                   CRYPTO_add(&issuer->references, 1, CRYPTO_LOCK_X509);
                   return issuer;
      @@ -99,69 +105,96 @@ static X509 *stapling_get_issuer(modssl_ctx_t *mctx, X509 *x)
       
       }
       
      -int ssl_stapling_init_cert(server_rec *s, modssl_ctx_t *mctx, X509 *x)
      +int ssl_stapling_init_cert(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp,
      +                           modssl_ctx_t *mctx, X509 *x)
       {
      -    certinfo *cinf;
      +    UCHAR idx[SHA_DIGEST_LENGTH];
      +    certinfo *cinf = NULL;
           X509 *issuer = NULL;
      +    OCSP_CERTID *cid = NULL;
           STACK_OF(OPENSSL_STRING) *aia = NULL;
       
      -    if (x == NULL)
      +    if ((x == NULL) || (X509_digest(x, EVP_sha1(), idx, NULL) != 1))
               return 0;
      -    cinf  = X509_get_ex_data(x, stapling_ex_idx);
      +
      +    cinf = apr_hash_get(stapling_certinfo, idx, sizeof(idx));
           if (cinf) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "ssl_stapling_init_cert: certificate already initialized!");
      -        return 0;
      -    }
      -    cinf = OPENSSL_malloc(sizeof(certinfo));
      -    if (!cinf) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "ssl_stapling_init_cert: error allocating memory!");
      -        return 0;
      +        /* 
      +         * We already parsed the certificate, and no OCSP URI was found.
      +         * The certificate might be used for multiple vhosts, though,
      +         * so we check for a ForceURL for this vhost.
      +         */
      +        if (!cinf->uri && !mctx->stapling_force_url) {
      +            ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x,
      +                           APLOGNO(02814) "ssl_stapling_init_cert: no OCSP URI "
      +                           "in certificate and no SSLStaplingForceURL "
      +                           "configured for server %s", mctx->sc->vhost_id);
      +            return 0;
      +        }
      +        return 1;
           }
      -    cinf->cid = NULL;
      -    cinf->uri = NULL;
      -    X509_set_ex_data(x, stapling_ex_idx, cinf);
      -
      -    issuer = stapling_get_issuer(mctx, x);
       
      -    if (issuer == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "ssl_stapling_init_cert: Can't retrieve issuer certificate!");
      +    if (!(issuer = stapling_get_issuer(mctx, x))) {
      +        ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x, APLOGNO(02217)
      +                       "ssl_stapling_init_cert: can't retrieve issuer "
      +                       "certificate!");
               return 0;
           }
       
      -    cinf->cid = OCSP_cert_to_id(NULL, x, issuer);
      +    cid = OCSP_cert_to_id(NULL, x, issuer);
           X509_free(issuer);
      -    if (!cinf->cid)
      +    if (!cid) {
      +        ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x, APLOGNO(02815)
      +                       "ssl_stapling_init_cert: can't create CertID "
      +                       "for OCSP request");
               return 0;
      -    X509_digest(x, EVP_sha1(), cinf->idx, NULL);
      +    }
       
           aia = X509_get1_ocsp(x);
      -    if (aia)
      -        cinf->uri = sk_OPENSSL_STRING_pop(aia);
      -    if (!cinf->uri && !mctx->stapling_force_url) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                     "ssl_stapling_init_cert: no responder URL");
      -    }
      -    if (aia)
      -        X509_email_free(aia);
      +    if (!aia && !mctx->stapling_force_url) {
      +        OCSP_CERTID_free(cid);
      +        ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x,
      +                       APLOGNO(02218) "ssl_stapling_init_cert: no OCSP URI "
      +                       "in certificate and no SSLStaplingForceURL set");
      +        return 0;
      +    }
      +
      +    /* At this point, we have determined that there's something to store */
      +    cinf = apr_pcalloc(p, sizeof(certinfo));
      +    memcpy (cinf->idx, idx, sizeof(idx));
      +    cinf->cid = cid;
      +    /* make sure cid is also freed at pool cleanup */
      +    apr_pool_cleanup_register(p, cid, ssl_stapling_certid_free,
      +                              apr_pool_cleanup_null);
      +    if (aia) {
      +       /* allocate uri from the pconf pool */
      +       cinf->uri = apr_pstrdup(p, sk_OPENSSL_STRING_value(aia, 0));
      +       X509_email_free(aia);
      +    }
      +
      +    ssl_log_xerror(SSLLOG_MARK, APLOG_TRACE1, 0, ptemp, s, x,
      +                   "ssl_stapling_init_cert: storing certinfo for server %s",
      +                   mctx->sc->vhost_id);
      +
      +    apr_hash_set(stapling_certinfo, cinf->idx, sizeof(cinf->idx), cinf);
      +
           return 1;
       }
       
      -static certinfo *stapling_get_cert_info(server_rec *s, modssl_ctx_t *mctx,
      +static certinfo *stapling_get_certinfo(server_rec *s, modssl_ctx_t *mctx,
                                               SSL *ssl)
       {
           certinfo *cinf;
           X509 *x;
      +    UCHAR idx[SHA_DIGEST_LENGTH];
           x = SSL_get_certificate(ssl);
      -    if (x == NULL)
      +    if ((x == NULL) || (X509_digest(x, EVP_sha1(), idx, NULL) != 1))
               return NULL;
      -    cinf = X509_get_ex_data(x, stapling_ex_idx);
      +    cinf = apr_hash_get(stapling_certinfo, idx, sizeof(idx));
           if (cinf && cinf->cid)
               return cinf;
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s,
      -                 "stapling_get_cert_info: stapling not supported for certificate");
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, s, APLOGNO(01926)
      +                 "stapling_get_certinfo: stapling not supported for certificate");
           return NULL;
       }
       
      @@ -180,22 +213,23 @@ static BOOL stapling_cache_response(server_rec *s, modssl_ctx_t *mctx,
                                           BOOL ok, apr_pool_t *pool)
       {
           SSLModConfigRec *mc = myModConfig(s);
      -    unsigned char resp_der[MAX_STAPLING_DER];
      +    unsigned char resp_der[MAX_STAPLING_DER]; /* includes one-byte flag + response */
           unsigned char *p;
      -    int resp_derlen;
      +    int resp_derlen, stored_len;
           BOOL rv;
           apr_time_t expiry;
       
      -    resp_derlen = i2d_OCSP_RESPONSE(rsp, NULL) + 1;
      +    resp_derlen = i2d_OCSP_RESPONSE(rsp, NULL);
       
           if (resp_derlen <= 0) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01927)
                            "OCSP stapling response encode error??");
               return FALSE;
           }
       
      -    if (resp_derlen > sizeof resp_der) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +    stored_len = resp_derlen + 1; /* response + ok flag */
      +    if (stored_len > sizeof resp_der) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01928)
                            "OCSP stapling response too big (%u bytes)", resp_derlen);
               return FALSE;
           }
      @@ -216,11 +250,15 @@ static BOOL stapling_cache_response(server_rec *s, modssl_ctx_t *mctx,
       
           i2d_OCSP_RESPONSE(rsp, &p);
       
      +    if (mc->stapling_cache->flags & AP_SOCACHE_FLAG_NOTMPSAFE)
      +        stapling_cache_mutex_on(s);
           rv = mc->stapling_cache->store(mc->stapling_cache_context, s,
                                          cinf->idx, sizeof(cinf->idx),
      -                                   expiry, resp_der, resp_derlen, pool);
      +                                   expiry, resp_der, stored_len, pool);
      +    if (mc->stapling_cache->flags & AP_SOCACHE_FLAG_NOTMPSAFE)
      +        stapling_cache_mutex_off(s);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01929)
                            "stapling_cache_response: OCSP response session store error!");
               return FALSE;
           }
      @@ -228,7 +266,7 @@ static BOOL stapling_cache_response(server_rec *s, modssl_ctx_t *mctx,
           return TRUE;
       }
       
      -static BOOL stapling_get_cached_response(server_rec *s, OCSP_RESPONSE **prsp,
      +static void stapling_get_cached_response(server_rec *s, OCSP_RESPONSE **prsp,
                                                BOOL *pok, certinfo *cinf,
                                                apr_pool_t *pool)
       {
      @@ -239,40 +277,43 @@ static BOOL stapling_get_cached_response(server_rec *s, OCSP_RESPONSE **prsp,
           const unsigned char *p;
           unsigned int resp_derlen = MAX_STAPLING_DER;
       
      +    if (mc->stapling_cache->flags & AP_SOCACHE_FLAG_NOTMPSAFE)
      +        stapling_cache_mutex_on(s);
           rv = mc->stapling_cache->retrieve(mc->stapling_cache_context, s,
                                             cinf->idx, sizeof(cinf->idx),
                                             resp_der, &resp_derlen, pool);
      +    if (mc->stapling_cache->flags & AP_SOCACHE_FLAG_NOTMPSAFE)
      +        stapling_cache_mutex_off(s);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01930)
                            "stapling_get_cached_response: cache miss");
      -        return TRUE;
      +        return;
           }
           if (resp_derlen <= 1) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        /* should-not-occur; must have at least valid-when-stored flag +
      +         * OCSPResponseStatus
      +         */
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01931)
                            "stapling_get_cached_response: response length invalid??");
      -        return TRUE;
      +        return;
           }
           p = resp_der;
      -    if (pok) {
      -        if (*p)
      -            *pok = TRUE;
      -        else
      -            *pok = FALSE;
      -    }
      +    if (*p) /* valid when stored */
      +        *pok = TRUE;
      +    else
      +        *pok = FALSE;
           p++;
           resp_derlen--;
           rsp = d2i_OCSP_RESPONSE(NULL, &p, resp_derlen);
           if (!rsp) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01932)
                            "stapling_get_cached_response: response parse error??");
      -        return TRUE;
      +        return;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01933)
                        "stapling_get_cached_response: cache hit");
       
           *prsp = rsp;
      -
      -    return TRUE;
       }
       
       static int stapling_set_response(SSL *ssl, OCSP_RESPONSE *rsp)
      @@ -291,10 +332,12 @@ static int stapling_check_response(server_rec *s, modssl_ctx_t *mctx,
                                          certinfo *cinf, OCSP_RESPONSE *rsp,
                                          BOOL *pok)
       {
      -    int status, reason;
      +    int status = V_OCSP_CERTSTATUS_UNKNOWN;
      +    int reason = OCSP_REVOKED_STATUS_NOSTATUS;
           OCSP_BASICRESP *bs = NULL;
           ASN1_GENERALIZEDTIME *rev, *thisupd, *nextupd;
           int response_status = OCSP_response_status(rsp);
      +    int rv = SSL_TLSEXT_ERR_OK;
       
           if (pok)
               *pok = FALSE;
      @@ -312,16 +355,18 @@ static int stapling_check_response(server_rec *s, modssl_ctx_t *mctx,
           bs = OCSP_response_get1_basic(rsp);
           if (bs == NULL) {
               /* If we can't parse response just pass it to client */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01934)
                            "stapling_check_response: Error Parsing Response!");
               return SSL_TLSEXT_ERR_OK;
           }
       
           if (!OCSP_resp_find_status(bs, cinf->cid, &status, &reason, &rev,
                                      &thisupd, &nextupd)) {
      -        /* If ID not present just pass back to client */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        /* If ID not present pass back to client (if configured so) */
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01935)
                            "stapling_check_response: certificate ID not present in response!");
      +        if (mctx->stapling_return_errors == FALSE)
      +            rv = SSL_TLSEXT_ERR_NOACK;
           }
           else {
               if (OCSP_check_validity(thisupd, nextupd,
      @@ -336,27 +381,53 @@ static int stapling_check_response(server_rec *s, modssl_ctx_t *mctx,
                    * retrieved from cache and it is expected to subsequently expire
                    */
                   if (pok) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01936)
                                    "stapling_check_response: response times invalid");
                   }
                   else {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01937)
                                    "stapling_check_response: cached response expired");
                   }
       
      -            OCSP_BASICRESP_free(bs);
      -            return SSL_TLSEXT_ERR_NOACK;
      +            rv = SSL_TLSEXT_ERR_NOACK;
      +        }
      +
      +        if (status != V_OCSP_CERTSTATUS_GOOD) {
      +            char snum[MAX_STRING_LEN] = { '\0' };
      +            BIO *bio = BIO_new(BIO_s_mem());
      +
      +            if (bio) {
      +                int n;
      +                if ((i2a_ASN1_INTEGER(bio, cinf->cid->serialNumber) != -1) &&
      +                    ((n = BIO_read(bio, snum, sizeof snum - 1)) > 0))
      +                    snum[n] = '\0';
      +                BIO_free(bio);
      +            }
      +
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02969)
      +                         "stapling_check_response: response has certificate "
      +                         "status %s (reason: %s) for serial number %s",
      +                         OCSP_cert_status_str(status),
      +                         (reason != OCSP_REVOKED_STATUS_NOSTATUS) ?
      +                         OCSP_crl_reason_str(reason) : "n/a",
      +                         snum[0] ? snum : "[n/a]");
      +
      +            if (mctx->stapling_return_errors == FALSE) {
      +                if (pok)
      +                    *pok = FALSE;
      +                rv = SSL_TLSEXT_ERR_NOACK;
      +            }
               }
           }
       
           OCSP_BASICRESP_free(bs);
       
      -    return SSL_TLSEXT_ERR_OK;
      +    return rv;
       }
       
       static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
                                           certinfo *cinf, OCSP_RESPONSE **prsp,
      -                                    apr_pool_t *pool)
      +                                    BOOL *pok, apr_pool_t *pool)
       {
           conn_rec *conn      = (conn_rec *)SSL_get_app_data(ssl);
           apr_pool_t *vpool;
      @@ -364,14 +435,13 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
           OCSP_CERTID *id = NULL;
           STACK_OF(X509_EXTENSION) *exts;
           int i;
      -    BOOL ok = FALSE;
           BOOL rv = TRUE;
           const char *ocspuri;
           apr_uri_t uri;
       
           *prsp = NULL;
           /* Build up OCSP query from server certificate info */
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01938)
                        "stapling_renew_response: querying responder");
       
           req = OCSP_REQUEST_new();
      @@ -396,19 +466,25 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
           else
               ocspuri = cinf->uri;
       
      +    if (!ocspuri) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(02621)
      +                     "stapling_renew_response: no uri for responder");
      +        rv = FALSE;
      +        goto done;
      +    }
      +
           /* Create a temporary pool to constrain memory use */
           apr_pool_create(&vpool, conn->pool);
       
      -    ok = apr_uri_parse(vpool, ocspuri, &uri);
      -    if (ok != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +    if (apr_uri_parse(vpool, ocspuri, &uri) != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01939)
                            "stapling_renew_response: Error parsing uri %s",
                             ocspuri);
               rv = FALSE;
               goto done;
           }
           else if (strcmp(uri.scheme, "http")) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01940)
                            "stapling_renew_response: Unsupported uri %s", ocspuri);
               rv = FALSE;
               goto done;
      @@ -424,7 +500,7 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
           apr_pool_destroy(vpool);
       
           if (!*prsp) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01941)
                            "stapling_renew_response: responder error");
               if (mctx->stapling_fake_trylater) {
                   *prsp = OCSP_response_create(OCSP_RESPONSE_STATUS_TRYLATER, NULL);
      @@ -437,22 +513,23 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
               int response_status = OCSP_response_status(*prsp);
       
               if (response_status == OCSP_RESPONSE_STATUS_SUCCESSFUL) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01942)
                               "stapling_renew_response: query response received");
      -            stapling_check_response(s, mctx, cinf, *prsp, &ok);
      -            if (ok == FALSE) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                             "stapling_renew_response: error in retreived response!");
      +            stapling_check_response(s, mctx, cinf, *prsp, pok);
      +            if (*pok == FALSE) {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01943)
      +                             "stapling_renew_response: error in retrieved response!");
                   }
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01944)
                                "stapling_renew_response: responder error %s",
                                OCSP_response_status_str(response_status));
      +            *pok = FALSE;
               }
           }
      -    if (stapling_cache_response(s, mctx, *prsp, cinf, ok, pool) == FALSE) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +    if (stapling_cache_response(s, mctx, *prsp, cinf, *pok, pool) == FALSE) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01945)
                            "stapling_renew_response: error caching response!");
           }
       
      @@ -468,7 +545,7 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl,
       }
       
       /*
      - * SSLStaplingMutex operations. Similar to SSL mutex except a mutex is
      + * SSL stapling mutex operations. Similar to SSL mutex except mutexes are
        * mandatory if stapling is enabled.
        */
       static int ssl_stapling_mutex_init(server_rec *s, apr_pool_t *p)
      @@ -477,12 +554,23 @@ static int ssl_stapling_mutex_init(server_rec *s, apr_pool_t *p)
           SSLSrvConfigRec *sc = mySrvConfig(s);
           apr_status_t rv;
       
      -    if (mc->stapling_mutex || sc->server->stapling_enabled != TRUE) {
      +    /* already init or stapling not enabled? */
      +    if (mc->stapling_refresh_mutex || sc->server->stapling_enabled != TRUE) {
               return TRUE;
           }
       
      -    if ((rv = ap_global_mutex_create(&mc->stapling_mutex, NULL,
      -                                     SSL_STAPLING_MUTEX_TYPE, NULL, s,
      +    /* need a cache mutex? */
      +    if (mc->stapling_cache->flags & AP_SOCACHE_FLAG_NOTMPSAFE) {
      +        if ((rv = ap_global_mutex_create(&mc->stapling_cache_mutex, NULL,
      +                                         SSL_STAPLING_CACHE_MUTEX_TYPE, NULL, s,
      +                                         s->process->pool, 0)) != APR_SUCCESS) {
      +            return FALSE;
      +        }
      +    }
      +
      +    /* always need stapling_refresh_mutex */
      +    if ((rv = ap_global_mutex_create(&mc->stapling_refresh_mutex, NULL,
      +                                     SSL_STAPLING_REFRESH_MUTEX_TYPE, NULL, s,
                                            s->process->pool, 0)) != APR_SUCCESS) {
               return FALSE;
           }
      @@ -490,65 +578,160 @@ static int ssl_stapling_mutex_init(server_rec *s, apr_pool_t *p)
           return TRUE;
       }
       
      -int ssl_stapling_mutex_reinit(server_rec *s, apr_pool_t *p)
      +static int stapling_mutex_reinit_helper(server_rec *s, apr_pool_t *p, 
      +                                        apr_global_mutex_t **mutex,
      +                                        const char *type)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
           apr_status_t rv;
           const char *lockfile;
       
      -    if (mc->stapling_mutex == NULL) {
      -        return TRUE;
      -    }
      -
      -    lockfile = apr_global_mutex_lockfile(mc->stapling_mutex);
      -    if ((rv = apr_global_mutex_child_init(&mc->stapling_mutex,
      +    lockfile = apr_global_mutex_lockfile(*mutex);
      +    if ((rv = apr_global_mutex_child_init(mutex,
                                                 lockfile, p)) != APR_SUCCESS) {
               if (lockfile) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(01946)
                                "Cannot reinit %s mutex with file `%s'",
      -                         SSL_STAPLING_MUTEX_TYPE, lockfile);
      +                         type, lockfile);
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      -                         "Cannot reinit %s mutex", SSL_STAPLING_MUTEX_TYPE);
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(01947)
      +                         "Cannot reinit %s mutex", type);
               }
               return FALSE;
           }
           return TRUE;
       }
       
      -static int stapling_mutex_on(server_rec *s)
      +int ssl_stapling_mutex_reinit(server_rec *s, apr_pool_t *p)
       {
           SSLModConfigRec *mc = myModConfig(s);
      +
      +    if (mc->stapling_cache_mutex != NULL
      +        && stapling_mutex_reinit_helper(s, p, &mc->stapling_cache_mutex,
      +                                        SSL_STAPLING_CACHE_MUTEX_TYPE) == FALSE) {
      +        return FALSE;
      +    }
      +
      +    if (mc->stapling_refresh_mutex != NULL
      +        && stapling_mutex_reinit_helper(s, p, &mc->stapling_refresh_mutex,
      +                                        SSL_STAPLING_REFRESH_MUTEX_TYPE) == FALSE) {
      +        return FALSE;
      +    }
      +
      +    return TRUE;
      +}
      +
      +static int stapling_mutex_on(server_rec *s, apr_global_mutex_t *mutex,
      +                             const char *name)
      +{
           apr_status_t rv;
       
      -    if ((rv = apr_global_mutex_lock(mc->stapling_mutex)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      -                     "Failed to acquire OCSP stapling lock");
      +    if ((rv = apr_global_mutex_lock(mutex)) != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(01948)
      +                     "Failed to acquire OCSP %s lock", name);
               return FALSE;
           }
           return TRUE;
       }
       
      -static int stapling_mutex_off(server_rec *s)
      +static int stapling_mutex_off(server_rec *s, apr_global_mutex_t *mutex,
      +                              const char *name)
       {
      -    SSLModConfigRec *mc = myModConfig(s);
           apr_status_t rv;
       
      -    if ((rv = apr_global_mutex_unlock(mc->stapling_mutex)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
      -                     "Failed to release OCSP stapling lock");
      +    if ((rv = apr_global_mutex_unlock(mutex)) != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s, APLOGNO(01949)
      +                     "Failed to release OCSP %s lock", name);
               return FALSE;
           }
           return TRUE;
       }
       
      +static int stapling_cache_mutex_on(server_rec *s)
      +{
      +    SSLModConfigRec *mc = myModConfig(s);
      +
      +    return stapling_mutex_on(s, mc->stapling_cache_mutex,
      +                             SSL_STAPLING_CACHE_MUTEX_TYPE);
      +}
      +
      +static int stapling_cache_mutex_off(server_rec *s)
      +{
      +    SSLModConfigRec *mc = myModConfig(s);
      +
      +    return stapling_mutex_off(s, mc->stapling_cache_mutex,
      +                              SSL_STAPLING_CACHE_MUTEX_TYPE);
      +}
      +
      +static int stapling_refresh_mutex_on(server_rec *s)
      +{
      +    SSLModConfigRec *mc = myModConfig(s);
      +
      +    return stapling_mutex_on(s, mc->stapling_refresh_mutex,
      +                             SSL_STAPLING_REFRESH_MUTEX_TYPE);
      +}
      +
      +static int stapling_refresh_mutex_off(server_rec *s)
      +{
      +    SSLModConfigRec *mc = myModConfig(s);
      +
      +    return stapling_mutex_off(s, mc->stapling_refresh_mutex,
      +                              SSL_STAPLING_REFRESH_MUTEX_TYPE);
      +}
      +
      +static int get_and_check_cached_response(server_rec *s, modssl_ctx_t *mctx,
      +                                         OCSP_RESPONSE **rsp, BOOL *pok,
      +                                         certinfo *cinf, apr_pool_t *p)
      +{
      +    BOOL ok = FALSE;
      +    int rv;
      +
      +    AP_DEBUG_ASSERT(*rsp == NULL);
      +
      +    /* Check to see if we already have a response for this certificate */
      +    stapling_get_cached_response(s, rsp, &ok, cinf, p);
      +
      +    if (*rsp) {
      +        /* see if response is acceptable */
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01953)
      +                     "stapling_cb: retrieved cached response");
      +        rv = stapling_check_response(s, mctx, cinf, *rsp, NULL);
      +        if (rv == SSL_TLSEXT_ERR_ALERT_FATAL) {
      +            OCSP_RESPONSE_free(*rsp);
      +            *rsp = NULL;
      +            return SSL_TLSEXT_ERR_ALERT_FATAL;
      +        }
      +        else if (rv == SSL_TLSEXT_ERR_NOACK) {
      +            /* Error in response. If this error was not present when it was
      +             * stored (i.e. response no longer valid) then it can be
      +             * renewed straight away.
      +             *
      +             * If the error *was* present at the time it was stored then we
      +             * don't renew the response straight away; we just wait for the
      +             * cached response to expire.
      +             */
      +            if (ok) {
      +                OCSP_RESPONSE_free(*rsp);
      +                *rsp = NULL;
      +            }
      +            else if (!mctx->stapling_return_errors) {
      +                OCSP_RESPONSE_free(*rsp);
      +                *rsp = NULL;
      +                *pok = FALSE;
      +                return SSL_TLSEXT_ERR_NOACK;
      +            }
      +        }
      +    }
      +    return 0;
      +}
      +
       /* Certificate Status callback. This is called when a client includes a
        * certificate status request extension.
        *
        * Check for cached responses in session cache. If valid send back to
      - * client.  If absent or no longer valid query responder and update
      - * cache. */
      + * client.  If absent or no longer valid, query responder and update
      + * cache.
      + */
       static int stapling_cb(SSL *ssl, void *arg)
       {
           conn_rec *conn      = (conn_rec *)SSL_get_app_data(ssl);
      @@ -559,108 +742,101 @@ static int stapling_cb(SSL *ssl, void *arg)
           certinfo *cinf = NULL;
           OCSP_RESPONSE *rsp = NULL;
           int rv;
      -    BOOL ok;
      +    BOOL ok = TRUE;
       
           if (sc->server->stapling_enabled != TRUE) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01950)
                            "stapling_cb: OCSP Stapling disabled");
               return SSL_TLSEXT_ERR_NOACK;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01951)
                        "stapling_cb: OCSP Stapling callback called");
       
      -    cinf = stapling_get_cert_info(s, mctx, ssl);
      +    cinf = stapling_get_certinfo(s, mctx, ssl);
           if (cinf == NULL) {
               return SSL_TLSEXT_ERR_NOACK;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01952)
                        "stapling_cb: retrieved cached certificate data");
       
      -    /* Check to see if we already have a response for this certificate */
      -    stapling_mutex_on(s);
      -
      -    rv = stapling_get_cached_response(s, &rsp, &ok, cinf, conn->pool);
      -    if (rv == FALSE) {
      -        stapling_mutex_off(s);
      -        return SSL_TLSEXT_ERR_ALERT_FATAL;
      +    rv = get_and_check_cached_response(s, mctx, &rsp, &ok, cinf, conn->pool);
      +    if (rv != 0) {
      +        return rv;
           }
       
      -    if (rsp) {
      -        /* see if response is acceptable */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "stapling_cb: retrieved cached response");
      -        rv = stapling_check_response(s, mctx, cinf, rsp, NULL);
      -        if (rv == SSL_TLSEXT_ERR_ALERT_FATAL) {
      -            OCSP_RESPONSE_free(rsp);
      -            stapling_mutex_off(s);
      -            return SSL_TLSEXT_ERR_ALERT_FATAL;
      +    if (rsp == NULL) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01954)
      +                     "stapling_cb: renewing cached response");
      +        stapling_refresh_mutex_on(s);
      +        /* Maybe another request refreshed the OCSP response while this
      +         * thread waited for the mutex.  Check again.
      +         */
      +        rv = get_and_check_cached_response(s, mctx, &rsp, &ok, cinf,
      +                                           conn->pool);
      +        if (rv != 0) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03236)
      +                         "stapling_cb: error checking for cached response "
      +                         "after obtaining refresh mutex");
      +            stapling_refresh_mutex_off(s);
      +            return rv;
               }
      -        else if (rv == SSL_TLSEXT_ERR_NOACK) {
      -            /* Error in response. If this error was not present when it was
      -             * stored (i.e. response no longer valid) then it can be
      -             * renewed straight away.
      -             *
      -             * If the error *was* present at the time it was stored then we
      -             * don't renew the response straight away we just wait for the
      -             * cached response to expire.
      -             */
      -            if (ok) {
      -                OCSP_RESPONSE_free(rsp);
      -                rsp = NULL;
      +        else if (rsp) {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03237)
      +                         "stapling_cb: don't need to refresh cached response "
      +                         "after obtaining refresh mutex");
      +            stapling_refresh_mutex_off(s);
      +        }
      +        else {
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03238)
      +                         "stapling_cb: still must refresh cached response "
      +                         "after obtaining refresh mutex");
      +            rv = stapling_renew_response(s, mctx, ssl, cinf, &rsp, &ok,
      +                                         conn->pool);
      +            stapling_refresh_mutex_off(s);
      +
      +            if (rv == TRUE) {
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(03040)
      +                             "stapling_cb: success renewing response");
                   }
      -            else if (!mctx->stapling_return_errors) {
      -                OCSP_RESPONSE_free(rsp);
      -                stapling_mutex_off(s);
      -                return SSL_TLSEXT_ERR_NOACK;
      +            else {
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01955)
      +                             "stapling_cb: fatal error renewing response");
      +                return SSL_TLSEXT_ERR_ALERT_FATAL;
                   }
               }
           }
       
      -    if (rsp == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                     "stapling_cb: renewing cached response");
      -        rv = stapling_renew_response(s, mctx, ssl, cinf, &rsp, conn->pool);
      -
      -        if (rv == FALSE) {
      -            stapling_mutex_off(s);
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      -                         "stapling_cb: fatal error");
      -            return SSL_TLSEXT_ERR_ALERT_FATAL;
      -        }
      -    }
      -    stapling_mutex_off(s);
      -
      -    if (rsp) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      +    if (rsp && ((ok == TRUE) || (mctx->stapling_return_errors == TRUE))) {
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01956)
                            "stapling_cb: setting response");
               if (!stapling_set_response(ssl, rsp))
                   return SSL_TLSEXT_ERR_ALERT_FATAL;
               return SSL_TLSEXT_ERR_OK;
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
      -                 "stapling_cb: no response available");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01957)
      +                 "stapling_cb: no suitable response available");
       
           return SSL_TLSEXT_ERR_NOACK;
       
       }
       
      -void modssl_init_stapling(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp,
      -                          modssl_ctx_t *mctx)
      +apr_status_t modssl_init_stapling(server_rec *s, apr_pool_t *p,
      +                                  apr_pool_t *ptemp, modssl_ctx_t *mctx)
       {
           SSL_CTX *ctx = mctx->ssl_ctx;
           SSLModConfigRec *mc = myModConfig(s);
       
           if (mc->stapling_cache == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01958)
                            "SSLStapling: no stapling cache available");
      -        ssl_die();
      +        return ssl_die(s);
           }
           if (ssl_stapling_mutex_init(s, ptemp) == FALSE) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(01959)
                            "SSLStapling: cannot initialise stapling mutex");
      -        ssl_die();
      +        return ssl_die(s);
           }
           /* Set some default values for parameters if they are not set */
           if (mctx->stapling_resptime_skew == UNSET) {
      @@ -682,7 +858,9 @@ void modssl_init_stapling(server_rec *s, apr_pool_t *p, apr_pool_t *ptemp,
               mctx->stapling_responder_timeout = 10 * APR_USEC_PER_SEC;
           }
           SSL_CTX_set_tlsext_status_cb(ctx, stapling_cb);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "OCSP stapling initialized");
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01960) "OCSP stapling initialized");
      +
      +    return APR_SUCCESS;
       }
       
       #endif
      diff --git a/modules/test/NWGNUmakefile b/modules/test/NWGNUmakefile
      index 1afb7af9718..006a5197bd3 100644
      --- a/modules/test/NWGNUmakefile
      +++ b/modules/test/NWGNUmakefile
      @@ -151,14 +151,15 @@ XDCDATA		=
       #
       # If there is an NLM target, put it here
       #
      -# We are referencing substitute.nlm twice to get around a known issue with the
      -# makefiles.  Normally if there is only one element to be built within a
      +# If there is only one element to build it needs to be included twice
      +# in the below target list.
      +# Normally if there is only one element to be built within a
       # directory, the makefile for the single element would be called NWGNUmakefile.
       # But if there are multiples, the parent NWGNUmakefile must reference more
       # than one submakefile. Because the experimental directory might vary in the
       # number of submakefiles, but for the moment only contains one, we reference
       # it twice to allow it parent NWGNUmakefile to work properly.  If another
      -# submakefile is added, the extra reference to substitute.nlm should be removed.
      +# submakefile is added, the extra reference to the first NLM should be removed.
       TARGET_nlm = \
       	$(OBJDIR)/optfnexport.nlm \
       	$(OBJDIR)/optfnimport.nlm \
      diff --git a/modules/test/mod_dialup.c b/modules/test/mod_dialup.c
      index 1bcc3eb8080..330c7c32a9a 100644
      --- a/modules/test/mod_dialup.c
      +++ b/modules/test/mod_dialup.c
      @@ -85,10 +85,10 @@ dialup_send_pulse(dialup_baton_t *db)
       
               apr_brigade_cleanup(db->tmpbb);
       
      -        if (status != OK) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, db->r,
      +        if (status != APR_SUCCESS) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, db->r, APLOGNO(01867)
                                 "dialup: pulse: ap_pass_brigade failed:");
      -            return status;
      +            return AP_FILTER_ERROR;
               }
           }
       
      @@ -120,7 +120,7 @@ dialup_callback(void *baton)
               return;
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, status, db->r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, db->r, APLOGNO(01868)
                             "dialup: pulse returned: %d", status);
               db->r->status = HTTP_OK;
               ap_die(status, db->r);
      @@ -177,7 +177,7 @@ dialup_handler(request_rec *r)
       
           status = ap_meets_conditions(r);
           if (status != OK) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01869)
                             "dialup: declined, meets conditions, good luck core handler");
               return DECLINED;
           }
      @@ -206,7 +206,7 @@ dialup_handler(request_rec *r)
       
           status = dialup_send_pulse(db);
           if (status != SUSPENDED && status != DONE) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01870)
                             "dialup: failed, send pulse");
               return status;
           }
      diff --git a/modules/test/mod_optional_fn_export.c b/modules/test/mod_optional_fn_export.c
      index 358275a74de..5dccfc97822 100644
      --- a/modules/test/mod_optional_fn_export.c
      +++ b/modules/test/mod_optional_fn_export.c
      @@ -25,7 +25,7 @@
       
       static int TestOptionalFn(const char *szStr)
       {
      -    ap_log_error(APLOG_MARK,APLOG_ERR,OK,NULL,
      +    ap_log_error(APLOG_MARK,APLOG_ERR,OK,NULL, APLOGNO(01871)
                        "Optional function test said: %s",szStr);
       
           return OK;
      diff --git a/modules/test/mod_optional_fn_import.c b/modules/test/mod_optional_fn_import.c
      index a01a3e74fdc..aba70e12b50 100644
      --- a/modules/test/mod_optional_fn_import.c
      +++ b/modules/test/mod_optional_fn_import.c
      @@ -27,14 +27,14 @@ static APR_OPTIONAL_FN_TYPE(TestOptionalFn) *pfn;
       
       static int ImportLogTransaction(request_rec *r)
       {
      -    if(pfn)
      +    if (pfn)
               return pfn(r->the_request);
           return DECLINED;
       }
       
       static void ImportFnRetrieve(void)
       {
      -    pfn=APR_RETRIEVE_OPTIONAL_FN(TestOptionalFn);
      +    pfn = APR_RETRIEVE_OPTIONAL_FN(TestOptionalFn);
       }
       
       static void ImportRegisterHooks(apr_pool_t *p)
      diff --git a/modules/test/mod_optional_hook_export.h b/modules/test/mod_optional_hook_export.h
      index 7af6862043b..223f5914e9e 100644
      --- a/modules/test/mod_optional_hook_export.h
      +++ b/modules/test/mod_optional_hook_export.h
      @@ -15,7 +15,7 @@
        */
       
       #ifndef MOD_OPTIONAL_HOOK_EXPORT_H
      -#define MOD_OPTOPNAL_HOOK_EXPORT_H
      +#define MOD_OPTIONAL_HOOK_EXPORT_H
       
       #include "ap_config.h"
       
      diff --git a/modules/test/mod_optional_hook_import.c b/modules/test/mod_optional_hook_import.c
      index 9a188527346..12da318e86c 100644
      --- a/modules/test/mod_optional_hook_import.c
      +++ b/modules/test/mod_optional_hook_import.c
      @@ -21,7 +21,7 @@
       
       static int ImportOptionalHookTestHook(const char *szStr)
       {
      -    ap_log_error(APLOG_MARK,APLOG_ERR,OK,NULL,"Optional hook test said: %s",
      +    ap_log_error(APLOG_MARK,APLOG_ERR,OK,NULL, APLOGNO(01866)"Optional hook test said: %s",
                        szStr);
       
           return OK;
      diff --git a/os/bs2000/ebcdic.c b/os/bs2000/ebcdic.c
      index dd5ef54f422..7ec00768ed2 100644
      --- a/os/bs2000/ebcdic.c
      +++ b/os/bs2000/ebcdic.c
      @@ -25,7 +25,7 @@ Within the POSIX subsystem, the same character set was chosen as in
       "native BS2000", namely EBCDIC.
       
       EBCDIC Table. (Yes, in EBCDIC, the letters 'a'..'z' are not contiguous!)
      -This apr_table_t is bijective, i.e. there are no ambigous or duplicate characters
      +This apr_table_t is bijective, i.e. there are no ambiguous or duplicate characters
       00    00 01 02 03 85 09 86 7f  87 8d 8e 0b 0c 0d 0e 0f  *................*
       10    10 11 12 13 8f 0a 08 97  18 19 9c 9d 1c 1d 1e 1f  *................*
       20    80 81 82 83 84 92 17 1b  88 89 8a 8b 8c 05 06 07  *................*
      diff --git a/os/bs2000/os.c b/os/bs2000/os.c
      index 0869ff4cbf9..199706fefc4 100644
      --- a/os/bs2000/os.c
      +++ b/os/bs2000/os.c
      @@ -85,7 +85,7 @@ int os_init_job_environment(server_rec *server, const char *user_name, int one_p
       
               type = forktype = bs2_noFORK;
       
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, APLOGNO(02170)
                            "The debug mode of Apache should only "
                            "be started by an unprivileged user!");
               return 0;
      @@ -114,8 +114,8 @@ pid_t os_fork(const char *user)
       
               pid = ufork(username);
               if (pid == -1 && errno == EPERM) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
      -                         ap_server_conf, "ufork: Possible mis-configuration "
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, errno, ap_server_conf,
      +                         APLOGNO(02171) "ufork: Possible mis-configuration "
                                "for user %s - Aborting.", user);
                   exit(1);
               }
      diff --git a/os/netware/pre_nw.h b/os/netware/pre_nw.h
      index dcb1145e486..eef1f6f10b2 100644
      --- a/os/netware/pre_nw.h
      +++ b/os/netware/pre_nw.h
      @@ -55,7 +55,7 @@
       #endif
       #endif
       
      -/* C9X defintion used by MSL C++ library */
      +/* C9X definition used by MSL C++ library */
       #define DECIMAL_DIG 17
       
       /* some code may want to use the MS convention for long long */
      diff --git a/os/unix/unixd.c b/os/unix/unixd.c
      index e29fb16d1da..d7042bf6867 100644
      --- a/os/unix/unixd.c
      +++ b/os/unix/unixd.c
      @@ -69,12 +69,12 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
           limit = *plimit;
           if ((getrlimit(type, limit)) != 0)  {
               *plimit = NULL;
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, cmd->server, APLOGNO(02172)
                            "%s: getrlimit failed", cmd->cmd->name);
               return;
           }
       
      -    if ((str = ap_getword_conf(cmd->pool, &arg))) {
      +    if (*(str = ap_getword_conf(cmd->temp_pool, &arg)) != '\0') {
               if (!strcasecmp(str, "max")) {
                   cur = limit->rlim_max;
               }
      @@ -83,12 +83,12 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
               }
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, APLOGNO(02173)
                            "Invalid parameters for %s", cmd->cmd->name);
               return;
           }
       
      -    if (arg2 && (str = ap_getword_conf(cmd->pool, &arg2))) {
      +    if (arg2 && (*(str = ap_getword_conf(cmd->temp_pool, &arg2)) != '\0')) {
               max = atol(str);
           }
       
      @@ -96,7 +96,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
           if (geteuid()) {
               limit->rlim_cur = cur;
               if (max && (max > limit->rlim_max)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, APLOGNO(02174)
                                "Must be uid 0 to raise maximum %s", cmd->cmd->name);
               }
               else if (max) {
      @@ -113,7 +113,7 @@ AP_DECLARE(void) ap_unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
           }
       #else
       
      -    ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, APLOGNO(02175)
                        "Platform does not support rlimit for %s", cmd->cmd->name);
       #endif
       }
      @@ -165,11 +165,8 @@ static apr_status_t ap_unix_create_privileged_process(
           }
       
           i = 0;
      -    if (args) {
      -        while (args[i]) {
      -            i++;
      -            }
      -    }
      +    while (args[i])
      +        i++;
           /* allocate space for 4 new args, the input args, and a null terminator */
           newargs = apr_palloc(p, sizeof(char *) * (i + 4));
           newprogname = SUEXEC_BIN;
      @@ -244,7 +241,7 @@ AP_DECLARE(apr_status_t) ap_unixd_set_proc_mutex_perms(apr_proc_mutex_t *pmutex)
                   };
       #endif
                   union semun ick;
      -            struct semid_ds buf;
      +            struct semid_ds buf = { { 0 } };
       
                   apr_os_proc_mutex_get(&ospmutex, pmutex);
                   buf.sem_perm.uid = ap_unixd_config.user_id;
      @@ -307,7 +304,7 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr,
       #ifdef _OSD_POSIX
               apr_os_sock_get(&sockdes, csd);
               if (sockdes >= FD_SETSIZE) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, APLOGNO(02176)
                                "new file descriptor %d is too large; you probably need "
                                "to rebuild Apache with a larger FD_SETSIZE "
                                "(currently %d)",
      @@ -414,7 +411,7 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr,
                    * Ben Hyde noted that temporary ENETDOWN situations
                    * occur in mobile IP.
                    */
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(02177)
                                "apr_socket_accept: giving up.");
                   return APR_EGENERAL;
       #endif /*ENETDOWN*/
      @@ -425,11 +422,11 @@ AP_DECLARE(apr_status_t) ap_unixd_accept(void **accepted, ap_listen_rec *lr,
                    * Do not print an error in this case.
                    */
                   if (!lr->active) {
      -                ap_log_error(APLOG_MARK, APLOG_DEBUG, status, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_DEBUG, status, ap_server_conf, APLOGNO(02178)
                                    "apr_socket_accept failed for inactive listener");
                       return status;
                   }
      -            ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf, APLOGNO(02179)
                                "apr_socket_accept: (client socket)");
                   return APR_EGENERAL;
           }
      @@ -496,7 +493,7 @@ int os_init_job_environment(server_rec *server, const char *user_name, int one_p
       
               type = forktype = bs2_noFORK;
       
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, server, APLOGNO(02180)
                            "The debug mode of Apache should only "
                            "be started by an unprivileged user!");
               return 0;
      @@ -525,8 +522,8 @@ pid_t os_fork(const char *user)
       
               pid = ufork(username);
               if (pid == -1 && errno == EPERM) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, errno,
      -                         ap_server_conf, "ufork: Possible mis-configuration "
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, errno, ap_server_conf,
      +                         APLOGNO(02181) "ufork: Possible mis-configuration "
                                "for user %s - Aborting.", user);
                   exit(1);
               }
      diff --git a/os/win32/BaseAddr.ref b/os/win32/BaseAddr.ref
      index c51f4ae7a7a..7ad338eae69 100644
      --- a/os/win32/BaseAddr.ref
      +++ b/os/win32/BaseAddr.ref
      @@ -8,112 +8,124 @@
       
       ; module name             base-address      max-size
       
      -libhttpd.dll                0x6FF00000    0x000A0000
      -mod_auth_basic.so           0x6FEF0000    0x00010000
      -mod_auth_digest.so          0x6FED0000    0x00020000
      -mod_cern_meta.so            0x6FEC0000    0x00010000
      -mod_expires.so              0x6FEB0000    0x00010000
      -mod_headers.so              0x6FEA0000    0x00010000
      -mod_info.so                 0x6FE90000    0x00010000
      -mod_rewrite.so              0x6FE70000    0x00020000
      -mod_speling.so              0x6FE60000    0x00010000
      -mod_status.so               0x6FE50000    0x00010000
      -mod_usertrack.so            0x6FE40000    0x00010000
      -mod_file_cache.so           0x6FE20000    0x00020000
      -mod_unique_id.so            0x6FE00000    0x00010000
      -mod_vhost_alias.so          0x6FDF0000    0x00010000
      -mod_mime_magic.so           0x6FDE0000    0x00010000
      -mod_dav.so                  0x6FDC0000    0x00020000
      -mod_dav_fs.so               0x6FDB0000    0x00010000
      -mod_proxy_connect.so        0x6FD90000    0x00010000
      -mod_proxy_ftp.so            0x6FD80000    0x00010000
      -mod_proxy_http.so           0x6FD70000    0x00010000
      -mod_ssl.so                  0x6FD00000    0x00070000
      -mod_actions.so              0x6FCE0000    0x00010000
      -mod_alias.so                0x6FCD0000    0x00010000
      -mod_asis.so                 0x6FCC0000    0x00010000
      -mod_autoindex.so            0x6FCA0000    0x00010000
      -mod_cgi.so                  0x6FC90000    0x00010000
      -mod_dir.so                  0x6FC80000    0x00010000
      -mod_env.so                  0x6FC70000    0x00010000
      -mod_imagemap.so             0x6FC60000    0x00010000
      -mod_include.so              0x6FC50000    0x00010000
      -mod_isapi.so                0x6FC40000    0x00010000
      -mod_log_config.so           0x6FC30000    0x00010000
      -mod_mime.so                 0x6FC20000    0x00010000
      -mod_negotiation.so          0x6FC10000    0x00010000
      -mod_setenvif.so             0x6FC00000    0x00010000
      -mod_userdir.so              0x6FBF0000    0x00010000
      -mod_cache.so                0x6FBE0000    0x00010000
      -mod_cache_disk.so           0x6FBD0000    0x00010000
      -mod_buffer.so               0x6FBC0000    0x00010000
      -mod_deflate.so              0x6FBA0000    0x00020000
      -mod_ext_filter.so           0x6FB90000    0x00010000
      -mod_charset_lite.so         0x6FB80000    0x00010000
      -mod_authn_anon.so           0x6FB70000    0x00010000
      -mod_authn_dbm.so            0x6FB60000    0x00010000
      -mod_authn_file.so           0x6FB40000    0x00010000
      -mod_authz_dbm.so            0x6FB30000    0x00010000
      -mod_authz_groupfile.so      0x6FB10000    0x00010000
      -mod_authz_host.so           0x6FB00000    0x00010000
      -mod_authz_user.so           0x6FAF0000    0x00010000
      -mod_logio.so                0x6FAE0000    0x00010000
      -mod_ldap.so                 0x6FAD0000    0x00010000
      -mod_authnz_ldap.so          0x6FAC0000    0x00010000
      -mod_ident.so                0x6FAB0000    0x00010000
      -mod_proxy_ajp.so            0x6FAA0000    0x00010000
      -mod_proxy_balancer.so       0x6FA90000    0x00010000
      -mod_log_forensic.so         0x6FA80000    0x00010000
      -mod_version.so              0x6FA70000    0x00010000
      -mod_bucketeer.so            0x6FA60000    0x00010000
      -mod_dumpio.so               0x6FA50000    0x00010000
      -mod_echo.so                 0x6FA40000    0x00010000
      -mod_authn_dbd.so            0x6FA30000    0x00010000
      -mod_dbd.so                  0x6FA20000    0x00010000
      -mod_proxy.so                0x6FA00000    0x00020000
      -mod_access_compat.so        0x6F9F0000    0x00010000
      -mod_authz_core.so           0x6F9E0000    0x00010000
      -mod_proxy_fcgi.so           0x6F9D0000    0x00010000
      -mod_authn_core.so           0x6F9C0000    0x00010000
      -mod_authz_dbd.so            0x6F9B0000    0x00010000
      -mod_authz_owner.so          0x6F9A0000    0x00010000
      -mod_example_hooks.so        0x6F990000    0x00010000
      -mod_case_filter.so          0x6F980000    0x00010000
      -mod_case_filter_in.so       0x6F970000    0x00010000
      -mod_substitute.so           0x6F960000    0x00010000
      -mod_filter.so               0x6F950000    0x00010000
      -mod_dav_lock.so             0x6F940000    0x00010000
      -mod_auth_form.so            0x6F930000    0x00010000
      -mod_example_ipc.so          0x6F920000    0x00010000
      -mod_request.so              0x6F910000    0x00010000
      -mod_lbmethod_rr.so          0x6F900000    0x00010000
      -mod_session.so              0x6F8F0000    0x00010000
      -mod_session_cookie.so       0x6F8E0000    0x00010000
      -mod_session_crypto.so       0x6F8D0000    0x00010000
      -mod_session_dbd.so          0x6F8C0000    0x00010000
      -mod_socache_dbm.so          0x6F8B0000    0x00010000
      -mod_socache_dc.so           0x6F8A0000    0x00010000
      -mod_socache_memcache.so     0x6F890000    0x00010000
      -mod_socache_shmcb.so        0x6F880000    0x00010000
      -mod_sed.so                  0x6F870000    0x00010000
      -mod_lua.so                  0x6F860000    0x00010000
      -mod_ratelimit.so            0x6F850000    0x00010000
      -mod_remoteip.so             0x6F840000    0x00010000
      -mod_lbmethod_bybusyness.so  0x6F830000    0x00010000
      -mod_lbmethod_byrequests.so  0x6F820000    0x00010000
      -mod_lbmethod_bytraffic.so   0x6F810000    0x00010000
      -mod_lbmethod_heartbeat.so   0x6F800000    0x00010000
      -mod_heartbeat.so            0x6F7F0000    0x00010000
      -mod_heartmonitor.so         0x6F7E0000    0x00010000
      -mod_watchdog.so             0x6F7D0000    0x00010000
      -mod_proxy_scgi.so           0x6F7C0000    0x00010000
      -mod_serf.so                 0x6F7B0000    0x00010000
      -mod_reqtimeout.so           0x6F7A0000    0x00010000
      -mod_reflector.so            0x6F790000    0x00010000
      -mod_slotmem_plain.so        0x6F780000    0x00010000
      -mod_slotmem_shm.so          0x6F770000    0x00010000
      -mod_authn_socache.so        0x6F760000    0x00010000
      -mod_proxy_express.so        0x6F750000    0x00010000
      -mod_log_debug.so            0x6F740000    0x00010000
      -mod_proxy_html.so           0x6F730000    0x00010000
      -mod_xml2enc.so              0x6F720000    0x00010000
      \ No newline at end of file
      +libhttpd.dll                0x6FF00000    0x000E0000
      +mod_auth_basic.so           0x6FFE0000    0x00020000
      +mod_auth_digest.so          0x70000000    0x00020000
      +mod_cern_meta.so            0x70020000    0x00010000
      +mod_expires.so              0x70030000    0x00010000
      +mod_headers.so              0x70040000    0x00020000
      +mod_info.so                 0x70060000    0x00020000
      +mod_rewrite.so              0x70080000    0x00030000
      +mod_speling.so              0x700B0000    0x00010000
      +mod_status.so               0x700C0000    0x00020000
      +mod_usertrack.so            0x700E0000    0x00010000
      +mod_file_cache.so           0x700F0000    0x00020000
      +mod_unique_id.so            0x70110000    0x00010000
      +mod_vhost_alias.so          0x70120000    0x00010000
      +mod_mime_magic.so           0x70130000    0x00020000
      +mod_dav.so                  0x70150000    0x00040000
      +mod_dav_fs.so               0x70190000    0x00030000
      +mod_proxy_connect.so        0x701C0000    0x00020000
      +mod_proxy_ftp.so            0x701E0000    0x00020000
      +mod_proxy_http.so           0x70200000    0x00020000
      +mod_ssl.so                  0x70220000    0x00070000
      +mod_actions.so              0x70290000    0x00010000
      +mod_alias.so                0x702A0000    0x00020000
      +mod_asis.so                 0x702C0000    0x00010000
      +mod_autoindex.so            0x702D0000    0x00020000
      +mod_cgi.so                  0x702F0000    0x00020000
      +mod_dir.so                  0x70310000    0x00010000
      +mod_env.so                  0x70320000    0x00010000
      +mod_imagemap.so             0x70330000    0x00020000
      +mod_include.so              0x70350000    0x00030000
      +mod_isapi.so                0x70380000    0x00020000
      +mod_log_config.so           0x703A0000    0x00020000
      +mod_mime.so                 0x703C0000    0x00020000
      +mod_negotiation.so          0x703E0000    0x00020000
      +mod_setenvif.so             0x70400000    0x00020000
      +mod_userdir.so              0x70420000    0x00010000
      +mod_cache.so                0x70430000    0x00030000
      +mod_cache_disk.so           0x70460000    0x00020000
      +mod_buffer.so               0x70480000    0x00010000
      +mod_deflate.so              0x70490000    0x00020000
      +mod_ext_filter.so           0x704B0000    0x00020000
      +mod_charset_lite.so         0x704D0000    0x00010000
      +mod_authn_anon.so           0x704E0000    0x00010000
      +mod_authn_dbm.so            0x704F0000    0x00010000
      +mod_authn_file.so           0x70500000    0x00010000
      +mod_authz_dbm.so            0x70510000    0x00010000
      +mod_authz_groupfile.so      0x70520000    0x00010000
      +mod_authz_host.so           0x70530000    0x00010000
      +mod_authz_user.so           0x70540000    0x00010000
      +mod_logio.so                0x70550000    0x00010000
      +mod_ldap.so                 0x70560000    0x00030000
      +mod_authnz_ldap.so          0x70590000    0x00020000
      +mod_ident.so                0x705B0000    0x00010000
      +mod_proxy_ajp.so            0x705C0000    0x00020000
      +mod_proxy_balancer.so       0x705E0000    0x00020000
      +mod_log_forensic.so         0x70600000    0x00010000
      +mod_version.so              0x70610000    0x00010000
      +mod_bucketeer.so            0x70620000    0x00010000
      +mod_dumpio.so               0x70630000    0x00010000
      +mod_echo.so                 0x70640000    0x00010000
      +mod_authn_dbd.so            0x70650000    0x00010000
      +mod_dbd.so                  0x70660000    0x00020000
      +mod_proxy.so                0x70680000    0x00040000
      +mod_access_compat.so        0x706C0000    0x00010000
      +mod_authz_core.so           0x706D0000    0x00020000
      +mod_proxy_fcgi.so           0x706F0000    0x00020000
      +mod_authn_core.so           0x70710000    0x00010000
      +mod_authz_dbd.so            0x70720000    0x00010000
      +mod_authz_owner.so          0x70730000    0x00010000
      +mod_example_hooks.so        0x70740000    0x00020000
      +mod_case_filter.so          0x70760000    0x00010000
      +mod_case_filter_in.so       0x70770000    0x00010000
      +mod_substitute.so           0x70780000    0x00020000
      +mod_filter.so               0x707A0000    0x00020000
      +mod_dav_lock.so             0x707C0000    0x00020000
      +mod_auth_form.so            0x707E0000    0x00020000
      +mod_example_ipc.so          0x70800000    0x00010000
      +mod_request.so              0x70810000    0x00010000
      +mod_session.so              0x70830000    0x00020000
      +mod_session_cookie.so       0x70850000    0x00010000
      +mod_session_crypto.so       0x70860000    0x00020000
      +mod_session_dbd.so          0x70880000    0x00020000
      +mod_socache_dbm.so          0x708A0000    0x00020000
      +mod_socache_dc.so           0x708C0000    0x00010000
      +mod_socache_memcache.so     0x708D0000    0x00010000
      +mod_socache_shmcb.so        0x708E0000    0x00020000
      +mod_sed.so                  0x70900000    0x00020000
      +mod_lua.so                  0x70920000    0x00040000
      +mod_ratelimit.so            0x70960000    0x00010000
      +mod_remoteip.so             0x70970000    0x00010000
      +mod_lbmethod_bybusyness.so  0x70980000    0x00010000
      +mod_lbmethod_byrequests.so  0x70990000    0x00010000
      +mod_lbmethod_bytraffic.so   0x709A0000    0x00010000
      +mod_lbmethod_heartbeat.so   0x709B0000    0x00020000
      +mod_heartbeat.so            0x709D0000    0x00010000
      +mod_heartmonitor.so         0x709E0000    0x00020000
      +mod_watchdog.so             0x70A00000    0x00020000
      +mod_proxy_scgi.so           0x70A20000    0x00020000
      +mod_reqtimeout.so           0x70A40000    0x00020000
      +mod_reflector.so            0x70A60000    0x00010000
      +mod_slotmem_plain.so        0x70A70000    0x00010000
      +mod_slotmem_shm.so          0x70A80000    0x00020000
      +mod_authn_socache.so        0x70AA0000    0x00020000
      +mod_proxy_express.so        0x70AC0000    0x00010000
      +mod_log_debug.so            0x70AD0000    0x00010000
      +mod_proxy_html.so           0x70AE0000    0x00020000
      +mod_xml2enc.so              0x70B00000    0x00020000
      +mod_data.so                 0x70B20000    0x00010000
      +mod_allowmethods.so         0x70B30000    0x00010000
      +mod_macro.so                0x70B40000    0x00020000
      +mod_cache_socache.so        0x70B60000    0x00020000
      +mod_proxy_wstunnel.so       0x70B80000    0x00020000
      +mod_dialup.so               0x70BA0000    0x00010000
      +mod_optional_fn_export.so   0x70BB0000    0x00010000
      +mod_optional_fn_import.so   0x70BC0000    0x00010000
      +mod_optional_hook_export.so 0x70BD0000    0x00010000
      +mod_optional_hook_import.so 0x70BE0000    0x00010000
      +mod_authnz_fcgi.so          0x70BF0000    0x00020000
      +mod_http2.so                0x70C10000    0x00030000
      +mod_proxy_http2.so          0x70C40000    0x00020000
      +mod_proxy_hcheck.so         0x70C60000    0x00020000
      diff --git a/os/win32/ap_regkey.c b/os/win32/ap_regkey.c
      index e080ab4f1fd..13c23778041 100644
      --- a/os/win32/ap_regkey.c
      +++ b/os/win32/ap_regkey.c
      @@ -488,7 +488,7 @@ AP_DECLARE(apr_status_t) ap_regkey_value_array_get(apr_array_header_t **result,
       #if APR_HAS_ANSI_FS
           ELSE_WIN_OS_IS_ANSI
           {
      -        /* Small possiblity the array is either unterminated
      +        /* Small possibility the array is either unterminated
                * or single NULL terminated.  Avert.
                */
               buf = (char *)value;
      diff --git a/server/Makefile.in b/server/Makefile.in
      index 42d1fe5c142..9663eec7dca 100644
      --- a/server/Makefile.in
      +++ b/server/Makefile.in
      @@ -7,7 +7,7 @@ SUBDIRS = mpm
       
       LTLIBRARY_NAME    = libmain.la
       LTLIBRARY_SOURCES = \
      -	config.c log.c main.c vhost.c util.c \
      +	config.c log.c main.c vhost.c util.c util_fcgi.c \
       	util_script.c util_md5.c util_cfgtree.c util_ebcdic.c util_time.c \
       	connection.c listen.c util_mutex.c mpm_common.c mpm_unix.c \
       	util_charset.c util_cookies.c util_debug.c util_xml.c \
      @@ -15,6 +15,7 @@ LTLIBRARY_SOURCES = \
       	scoreboard.c error_bucket.c protocol.c core.c request.c provider.c \
       	eoc_bucket.c eor_bucket.c core_filters.c \
       	util_expr_parse.c util_expr_scan.c util_expr_eval.c
      +
       LTLIBRARY_DEPENDENCIES = test_char.h
       
       TARGETS = delete-exports $(LTLIBRARY_NAME) $(CORE_IMPLIB_FILE) export_vars.h httpd.exp
      @@ -60,7 +61,7 @@ export_files:
       	  for dir in $(EXPORT_DIRS_APR); do \
       	      ls $$dir/ap[ru].h $$dir/ap[ru]_*.h 2>/dev/null; \
       	  done; \
      -	) | sort -u > $@
      +	) | sed -e s,//,/,g | sort -u > $@
       
       exports.c: export_files
       	$(AWK) -f $(top_srcdir)/build/make_exports.awk `cat $?` > $@
      diff --git a/server/config.c b/server/config.c
      index 4a0fc1a7234..61daeaf4a91 100644
      --- a/server/config.c
      +++ b/server/config.c
      @@ -15,7 +15,7 @@
        */
       
       /*
      - * http_config.c: once was auxillary functions for reading httpd's config
      + * http_config.c: once was auxiliary functions for reading httpd's config
        * file and converting filenames into a namespace
        *
        * Rob McCool
      @@ -59,6 +59,7 @@
       
       AP_DECLARE_DATA const char *ap_server_argv0 = NULL;
       AP_DECLARE_DATA const char *ap_server_root = NULL;
      +AP_DECLARE_DATA const char *ap_runtime_dir = NULL;
       AP_DECLARE_DATA server_rec *ap_server_conf = NULL;
       AP_DECLARE_DATA apr_pool_t *ap_pglobal = NULL;
       
      @@ -79,6 +80,7 @@ APR_HOOK_STRUCT(
                  APR_HOOK_LINK(quick_handler)
                  APR_HOOK_LINK(optional_fn_retrieve)
                  APR_HOOK_LINK(test_config)
      +           APR_HOOK_LINK(open_htaccess)
       )
       
       AP_IMPLEMENT_HOOK_RUN_ALL(int, header_parser,
      @@ -134,7 +136,8 @@ AP_DECLARE(int) ap_hook_post_config(ap_HOOK_post_config_t *pf,
               apr_hook_debug_show("post_config", aszPre, aszSucc);
       }
       
      -AP_DECLARE(apr_array_header_t *) ap_hook_get_post_config(void) {
      +AP_DECLARE(apr_array_header_t *) ap_hook_get_post_config(void)
      +{
           return _hooks.link_post_config;
       }
       
      @@ -146,7 +149,7 @@ AP_DECLARE(int) ap_run_post_config(apr_pool_t *pconf,
           ap_LINK_post_config_t *pHook;
           int n;
       
      -    if(!_hooks.link_post_config)
      +    if (!_hooks.link_post_config)
               return;
       
           pHook = (ap_LINK_post_config_t *)_hooks.link_post_config->elts;
      @@ -170,6 +173,12 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(int, handler, (request_rec *r),
       AP_IMPLEMENT_HOOK_RUN_FIRST(int, quick_handler, (request_rec *r, int lookup),
                                   (r, lookup), DECLINED)
       
      +AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, open_htaccess,
      +                            (request_rec *r, const char *dir_name, const char *access_name,
      +                             ap_configfile_t **conffile, const char **full_name),
      +                            (r, dir_name, access_name, conffile, full_name),
      +                            AP_DECLINED)
      +
       /* hooks with no args are implemented last, after disabling APR hook probes */
       #if defined(APR_HOOK_PROBES_ENABLED)
       #undef APR_HOOK_PROBES_ENABLED
      @@ -368,12 +377,6 @@ static int invoke_filter_init(request_rec *r, ap_filter_t *filters)
           return OK;
       }
       
      -/*
      - * TODO: Move this to an appropriate include file and possibly prefix it
      - * with AP_.
      - */
      -#define DEFAULT_HANDLER_NAME ""
      -
       AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
       {
           const char *handler;
      @@ -422,7 +425,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
                   }
               }
               else {
      -            handler = DEFAULT_HANDLER_NAME;
      +            handler = AP_DEFAULT_HANDLER_NAME;
               }
       
               r->handler = handler;
      @@ -433,7 +436,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
           r->handler = old_handler;
       
           if (result == DECLINED && r->handler && r->filename) {
      -        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, APLOGNO(00523)
                   "handler \"%s\" not found for: %s", r->handler, r->filename);
           }
           if ((result != OK) && (result != DONE) && (result != DECLINED) && (result != SUSPENDED)
      @@ -447,7 +450,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r)
                */
               ignore = apr_table_get(r->notes, "HTTP_IGNORE_RANGE");
               if (!ignore) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00524)
                                 "Handler for %s returned invalid result code %d",
                                 r->handler, result);
                   result = HTTP_INTERNAL_SERVER_ERROR;
      @@ -598,7 +601,8 @@ AP_DECLARE(const char *) ap_add_module(module *m, apr_pool_t *p,
                   len -= slen;
               }
       
      -        ap_module_short_names[m->module_index] = strdup(sym_name);
      +        ap_module_short_names[m->module_index] = ap_malloc(len + 1);
      +        memcpy(ap_module_short_names[m->module_index], sym_name, len);
               ap_module_short_names[m->module_index][len] = '\0';
               merger_func_cache[m->module_index] = m->merge_dir_config;
           }
      @@ -622,8 +626,9 @@ AP_DECLARE(const char *) ap_add_module(module *m, apr_pool_t *p,
       
           /* We cannot fix the string in-place, because it's const */
           if (m->name[strlen(m->name)-1] == ')') {
      -        char *tmp = strdup(m->name); /* FIXME: memory leak, albeit a small one */
      -        tmp[strlen(tmp)-1] = '\0';
      +        char *tmp = ap_malloc(strlen(m->name)); /* FIXME: memory leak, albeit a small one */
      +        memcpy(tmp, m->name, strlen(m->name)-1);
      +        tmp[strlen(m->name)-1] = '\0';
               m->name = tmp;
           }
       #endif /*_OSD_POSIX*/
      @@ -666,7 +671,7 @@ AP_DECLARE(void) ap_remove_module(module *m)
       
               if (!modp) {
                   /* Uh-oh, this module doesn't exist */
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00525)
                                "Cannot remove module %s: not found in module list",
                                m->name);
                   return;
      @@ -732,7 +737,7 @@ AP_DECLARE(void) ap_remove_loaded_module(module *mod)
            *
            *  Note: 1. We cannot determine if the module was successfully
            *           removed by ap_remove_module().
      -     *        2. We have not to complain explicity when the module
      +     *        2. We have not to complain explicitly when the module
            *           is not found because ap_remove_module() did it
            *           for us already.
            */
      @@ -843,13 +848,26 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
           char *w, *w2, *w3;
           const char *errmsg = NULL;
       
      -    /** Have we been provided a list of acceptable directives? */
      -    if(parms->override_list != NULL)
      -         if(apr_table_get(parms->override_list, cmd->name) != NULL)
      +    /* Have we been provided a list of acceptable directives? */
      +    if (parms->override_list != NULL) { 
      +         if (apr_table_get(parms->override_list, cmd->name) != NULL) { 
                     override_list_ok = 1;
      +         }
      +    }
       
      -    if ((parms->override & cmd->req_override) == 0 && !override_list_ok)
      -        return apr_pstrcat(parms->pool, cmd->name, " not allowed here", NULL);
      +    if ((parms->override & cmd->req_override) == 0 && !override_list_ok) {
      +        if (parms->override & NONFATAL_OVERRIDE) {
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, parms->temp_pool,
      +                          APLOGNO(02295)
      +                          "%s in .htaccess forbidden by AllowOverride",
      +                          cmd->name);
      +            return NULL;
      +        }
      +        else {
      +            return apr_pstrcat(parms->pool, cmd->name,
      +                               " not allowed here", NULL);
      +        }
      +    }
       
           parms->info = cmd->cmd_data;
           parms->cmd = cmd;
      @@ -962,12 +980,20 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
               return cmd->AP_TAKE3(parms, mconfig, w, w2, w3);
       
           case ITERATE:
      -        while (*(w = ap_getword_conf(parms->pool, &args)) != '\0') {
      +        w = ap_getword_conf(parms->pool, &args);
      +        
      +        if (*w == '\0')
      +            return apr_pstrcat(parms->pool, cmd->name,
      +                               " requires at least one argument",
      +                               cmd->errmsg ? ", " : NULL, cmd->errmsg, NULL);
       
      +        while (*w != '\0') {
                   errmsg = cmd->AP_TAKE1(parms, mconfig, w);
       
                   if (errmsg && strcmp(errmsg, DECLINE_CMD) != 0)
                       return errmsg;
      +
      +            w = ap_getword_conf(parms->pool, &args);
               }
       
               return errmsg;
      @@ -991,7 +1017,11 @@ static const char *invoke_cmd(const command_rec *cmd, cmd_parms *parms,
               return errmsg;
       
           case FLAG:
      -        w = ap_getword_conf(parms->pool, &args);
      +        /*
      +         * This is safe to use temp_pool here, because the 'flag' itself is not
      +         * forwarded as-is
      +         */
      +        w = ap_getword_conf(parms->temp_pool, &args);
       
               if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
                   return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
      @@ -1085,7 +1115,11 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
           args = ap_resolve_env(temp_pool, l);
       #endif
       
      -    cmd_name = ap_getword_conf(p, &args);
      +    /* The first word is the name of a directive.  We can safely use the
      +     * 'temp_pool' for it.  If it matches the name of a known directive, we
      +     * can reference the string within the module if needed.  Otherwise, we
      +     * can still make a copy in the 'p' pool. */
      +    cmd_name = ap_getword_conf(temp_pool, &args);
           if (*cmd_name == '\0') {
               /* Note: this branch should not occur. An empty line should have
                * triggered the exit further above.
      @@ -1106,10 +1140,11 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
           newdir = apr_pcalloc(p, sizeof(ap_directive_t));
           newdir->filename = parms->config_file->name;
           newdir->line_num = parms->config_file->line_number;
      -    newdir->directive = cmd_name;
           newdir->args = apr_pstrdup(p, args);
       
           if ((cmd = ap_find_command_in_modules(cmd_name, &mod)) != NULL) {
      +        newdir->directive = cmd->name;
      +        
               if (cmd->req_override & EXEC_ON_READ) {
                   ap_directive_t *sub_tree = NULL;
       
      @@ -1143,6 +1178,11 @@ static const char *ap_build_config_sub(apr_pool_t *p, apr_pool_t *temp_pool,
                   return retval;
               }
           }
      +    else {
      +        /* No known directive found?  Make a copy of what we have parsed. */
      +        newdir->directive = apr_pstrdup(p, cmd_name);
      +    }
      +
       
           if (cmd_name[0] == '<') {
               if (cmd_name[1] != '/') {
      @@ -1202,11 +1242,14 @@ AP_DECLARE(const char *) ap_build_cont_config(apr_pool_t *p,
           ap_directive_t *sub_tree = NULL;
           apr_status_t rc;
           struct ap_varbuf vb;
      +    apr_size_t max_len = VARBUF_MAX_LEN;
      +    if (p == temp_pool)
      +        max_len = HUGE_STRING_LEN; /* lower limit for .htaccess */
       
           bracket = apr_pstrcat(temp_pool, orig_directive + 1, ">", NULL);
           ap_varbuf_init(temp_pool, &vb, VARBUF_INIT_LEN);
       
      -    while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, VARBUF_MAX_LEN))
      +    while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, max_len))
                  == APR_SUCCESS) {
               if (!memcmp(vb.buf, "</", 2)
                   && (strcasecmp(vb.buf + 2, bracket) == 0)
      @@ -1248,11 +1291,20 @@ static const char *ap_walk_config_sub(const ap_directive_t *current,
       
           if (ml == NULL) {
               parms->err_directive = current;
      -        return apr_pstrcat(parms->pool, "Invalid command '",
      -                           current->directive,
      -                           "', perhaps misspelled or defined by a module "
      -                           "not included in the server configuration",
      -                           NULL);
      +        if (parms->override & NONFATAL_UNKNOWN) {
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, parms->temp_pool,
      +                          APLOGNO(02296) "Unknown directive %s "
      +                          "perhaps misspelled or defined by a module "
      +                          "not included in the server configuration", dir);
      +            return NULL;
      +        }
      +        else {
      +            return apr_pstrcat(parms->pool, "Invalid command '",
      +                               current->directive,
      +                               "', perhaps misspelled or defined by a module "
      +                               "not included in the server configuration",
      +                               NULL);
      +        }
           }
       
           for ( ; ml != NULL; ml = ml->next) {
      @@ -1274,7 +1326,7 @@ static const char *ap_walk_config_sub(const ap_directive_t *current,
               if (retval != NULL && strcmp(retval, DECLINE_CMD) != 0) {
                   /* If the directive in error has already been set, don't
                    * replace it.  Otherwise, an error inside a container
      -             * will be reported as occuring on the first line of the
      +             * will be reported as occurring on the first line of the
                    * container.
                    */
                   if (!parms->err_directive) {
      @@ -1324,6 +1376,9 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
           ap_directive_t **last_ptr = NULL;
           apr_status_t rc;
           struct ap_varbuf vb;
      +    apr_size_t max_len = VARBUF_MAX_LEN;
      +    if (p == temp_pool)
      +        max_len = HUGE_STRING_LEN; /* lower limit for .htaccess */
       
           ap_varbuf_init(temp_pool, &vb, VARBUF_INIT_LEN);
       
      @@ -1335,7 +1390,7 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
                */
               last_ptr = &(current->last);
       
      -        if(last_ptr && *last_ptr) {
      +        if (last_ptr && *last_ptr) {
                   current = *last_ptr;
               }
       
      @@ -1343,13 +1398,13 @@ AP_DECLARE(const char *) ap_build_config(cmd_parms *parms,
                   current = current->next;
               }
       
      -        if(last_ptr) {
      +        if (last_ptr) {
                   /* update cached pointer to last node */
                   *last_ptr = current;
               }
           }
       
      -    while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, VARBUF_MAX_LEN))
      +    while ((rc = ap_varbuf_cfg_getline(&vb, parms->config_file, max_len))
                  == APR_SUCCESS) {
               errmsg = ap_build_config_sub(p, temp_pool, vb.buf, parms,
                                            &current, &curr_parent, conftree);
      @@ -1534,22 +1589,40 @@ AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *file)
           }
       }
       
      +AP_DECLARE(char *) ap_runtime_dir_relative(apr_pool_t *p, const char *file)
      +{
      +    char *newpath = NULL;
      +    apr_status_t rv;
      +    const char *runtime_dir = ap_runtime_dir ? ap_runtime_dir : ap_server_root_relative(p, DEFAULT_REL_RUNTIMEDIR);
      +
      +    rv = apr_filepath_merge(&newpath, runtime_dir, file,
      +                            APR_FILEPATH_TRUENAME, p);
      +    if (newpath && (rv == APR_SUCCESS || APR_STATUS_IS_EPATHWILD(rv)
      +                                      || APR_STATUS_IS_ENOENT(rv)
      +                                      || APR_STATUS_IS_ENOTDIR(rv))) {
      +        return newpath;
      +    }
      +    else {
      +        return NULL;
      +    }
      +}
      +
      +
       AP_DECLARE(const char *) ap_soak_end_container(cmd_parms *cmd, char *directive)
       {
           struct ap_varbuf vb;
           const char *args;
           char *cmd_name;
           apr_status_t rc;
      +    apr_size_t max_len = VARBUF_MAX_LEN;
      +    if (cmd->pool == cmd->temp_pool)
      +        max_len = HUGE_STRING_LEN; /* lower limit for .htaccess */
       
           ap_varbuf_init(cmd->temp_pool, &vb, VARBUF_INIT_LEN);
       
      -    while((rc = ap_varbuf_cfg_getline(&vb, cmd->config_file, VARBUF_MAX_LEN))
      -          == APR_SUCCESS) {
      -#if RESOLVE_ENV_PER_TOKEN
      +    while ((rc = ap_varbuf_cfg_getline(&vb, cmd->config_file, max_len))
      +           == APR_SUCCESS) {
               args = vb.buf;
      -#else
      -        args = ap_resolve_env(cmd->temp_pool, vb.buf);
      -#endif
       
               cmd_name = ap_getword_conf(cmd->temp_pool, &args);
               if (cmd_name[0] == '<') {
      @@ -1639,7 +1712,7 @@ typedef struct {
       
       
       /* arr_elts_getstr() returns the next line from the string array. */
      -static apr_status_t arr_elts_getstr(void *buf, size_t bufsiz, void *param)
      +static apr_status_t arr_elts_getstr(void *buf, apr_size_t bufsiz, void *param)
       {
           arr_elts_param_t *arr_param = (arr_elts_param_t *)param;
           char *elt;
      @@ -1717,6 +1790,54 @@ static int fname_alphasort(const void *fn1, const void *fn2)
           return strcmp(f1->fname,f2->fname);
       }
       
      +/**
      + * Used by -D DUMP_INCLUDES to output the config file "tree".
      + */
      +static void dump_config_name(const char *fname, apr_pool_t *p)
      +{
      +    unsigned i, recursion, line_number;
      +    void *data;
      +    apr_file_t *out = NULL;
      +
      +    apr_file_open_stdout(&out, p);
      +
      +    /* ap_include_sentinel is defined by the core Include directive; use it to
      +     * figure out how deep in the stack we are.
      +     */
      +    apr_pool_userdata_get(&data, "ap_include_sentinel", p);
      +
      +    if (data) {
      +        recursion = *(unsigned *)data;
      +    } else {
      +        recursion = 0;
      +    }
      +
      +    /* Indent once for each level. */
      +    for (i = 0; i < (recursion + 1); ++i) {
      +        apr_file_printf(out, "  ");
      +    }
      +
      +    /* ap_include_lineno is similarly defined to tell us where in the last
      +     * config file we were.
      +     */
      +    apr_pool_userdata_get(&data, "ap_include_lineno", p);
      +
      +    if (data) {
      +        line_number = *(unsigned *)data;
      +    } else {
      +        line_number = 0;
      +    }
      +
      +    /* Print the line number and the name of the parsed file. */
      +    if (line_number > 0) {
      +        apr_file_printf(out, "(%u)", line_number);
      +    } else {
      +        apr_file_printf(out, "(*)");
      +    }
      +
      +    apr_file_printf(out, " %s\n", fname);
      +}
      +
       AP_DECLARE(const char *) ap_process_resource_config(server_rec *s,
                                                           const char *fname,
                                                           ap_directive_t **conftree,
      @@ -1737,9 +1858,12 @@ AP_DECLARE(const char *) ap_process_resource_config(server_rec *s,
       
           rv = ap_pcfg_openfile(&cfp, p, fname);
           if (rv != APR_SUCCESS) {
      -        char errmsg[120];
      -        return apr_psprintf(p, "Could not open configuration file %s: %s",
      -                            fname, apr_strerror(rv, errmsg, sizeof errmsg));
      +        return apr_psprintf(p, "Could not open configuration file %s: %pm",
      +                            fname, &rv);
      +    }
      +
      +    if (ap_exists_config_define("DUMP_INCLUDES")) {
      +        dump_config_name(fname, p);
           }
       
           parms.config_file = cfp;
      @@ -1791,9 +1915,8 @@ static const char *process_resource_config_nofnmatch(server_rec *s,
                */
               rv = apr_dir_open(&dirp, path, ptemp);
               if (rv != APR_SUCCESS) {
      -            char errmsg[120];
      -            return apr_psprintf(p, "Could not open config directory %s: %s",
      -                                path, apr_strerror(rv, errmsg, sizeof errmsg));
      +            return apr_psprintf(p, "Could not open config directory %s: %pm",
      +                                path, &rv);
               }
       
               candidates = apr_array_make(ptemp, 1, sizeof(fnames));
      @@ -1852,7 +1975,7 @@ static const char *process_resource_config_fnmatch(server_rec *s,
           /* find the first part of the filename */
           rest = ap_strchr_c(fname, '/');
           if (rest) {
      -        fname = apr_pstrndup(ptemp, fname, rest - fname);
      +        fname = apr_pstrmemdup(ptemp, fname, rest - fname);
               rest++;
           }
       
      @@ -1878,9 +2001,8 @@ static const char *process_resource_config_fnmatch(server_rec *s,
            */
           rv = apr_dir_open(&dirp, path, ptemp);
           if (rv != APR_SUCCESS) {
      -        char errmsg[120];
      -        return apr_psprintf(p, "Could not open config directory %s: %s",
      -                            path, apr_strerror(rv, errmsg, sizeof errmsg));
      +        return apr_psprintf(p, "Could not open config directory %s: %pm",
      +                            path, &rv);
           }
       
           candidates = apr_array_make(ptemp, 1, sizeof(fnames));
      @@ -1962,7 +2084,7 @@ AP_DECLARE(const char *) ap_process_fnmatch_configs(server_rec *s,
           }
       
           if (!apr_fnmatch_test(fname)) {
      -        return ap_process_resource_config(s, fname, conftree, p, ptemp);
      +        return process_resource_config_nofnmatch(s, fname, conftree, p, ptemp, 0, optional);
           }
           else {
               apr_status_t status;
      @@ -2004,26 +2126,34 @@ AP_DECLARE(int) ap_process_config_tree(server_rec *s,
           errmsg = ap_walk_config(conftree, &parms, s->lookup_defaults);
           if (errmsg) {
               if (parms.err_directive)
      -            ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p,
      +            ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p, APLOGNO(00526)
                                 "Syntax error on line %d of %s:",
                                 parms.err_directive->line_num,
                                 parms.err_directive->filename);
      -        ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p,
      -                     "%s", errmsg);
      +        ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p, "%s", errmsg);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
           return OK;
       }
       
      +apr_status_t ap_open_htaccess(request_rec *r, const char *dir_name,
      +                              const char *access_name,
      +                              ap_configfile_t **conffile,
      +                              const char **full_name)
      +{
      +    *full_name = ap_make_full_path(r->pool, dir_name, access_name);
      +    return ap_pcfg_openfile(conffile, r->pool, *full_name);
      +}
      +
       AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
                                              request_rec *r, int override,
                                              int override_opts, apr_table_t *override_list,
      -                                       const char *d, const char *access_name)
      +                                       const char *d, const char *access_names)
       {
           ap_configfile_t *f = NULL;
           cmd_parms parms;
      -    char *filename = NULL;
      +    const char *filename;
           const struct htaccess_result *cache;
           struct htaccess_result *new;
           ap_conf_vector_t *dc = NULL;
      @@ -2047,15 +2177,11 @@ AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
           parms.path = apr_pstrdup(r->pool, d);
       
           /* loop through the access names and find the first one */
      -    while (access_name[0]) {
      -        /* AFAICT; there is no use of the actual 'filename' against
      -         * any canonicalization, so we will simply take the given
      -         * name, ignoring case sensitivity and aliases
      -         */
      -        filename = ap_make_full_path(r->pool, d,
      -                                     ap_getword_conf(r->pool, &access_name));
      -        status = ap_pcfg_openfile(&f, r->pool, filename);
      +    while (access_names[0]) {
      +        const char *access_name = ap_getword_conf(r->pool, &access_names);
       
      +        filename = NULL;
      +        status = ap_run_open_htaccess(r, d, access_name, &f, &filename);
               if (status == APR_SUCCESS) {
                   const char *errmsg;
                   ap_directive_t *temptree = NULL;
      @@ -2081,7 +2207,7 @@ AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result,
               else {
                   if (!APR_STATUS_IS_ENOENT(status)
                       && !APR_STATUS_IS_ENOTDIR(status)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_CRIT, status, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_CRIT, status, r, APLOGNO(00529)
                                     "%s pcfg_openfile: unable to check htaccess file, "
                                     "ensure it is readable and that '%s' "
                                     "is executable",
      @@ -2272,7 +2398,7 @@ static server_rec *init_server_config(process_rec *process, apr_pool_t *p)
                                      NULL, APR_UNSPEC, 0, 0, p);
           if (rv != APR_SUCCESS) {
               /* should we test here for rv being an EAIERR? */
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, rv, NULL, APLOGNO(00530)
                            "initialisation: bug or getaddrinfo fail");
               return NULL;
           }
      @@ -2333,6 +2459,16 @@ AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp,
       
           init_config_globals(p);
       
      +    if (ap_exists_config_define("DUMP_INCLUDES")) {
      +        apr_file_t *out = NULL;
      +        apr_file_open_stdout(&out, p);
      +
      +        /* Included files will be dumped as the config is walked; print a
      +         * header.
      +         */
      +        apr_file_printf(out, "Included configuration files:\n");
      +    }
      +
           /* All server-wide config files now have the SAME syntax... */
           error = process_command_config(s, ap_server_pre_read_config, conftree,
                                          p, ptemp);
      @@ -2349,7 +2485,7 @@ AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp,
       
           if (!confname) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT,
      -                     APR_EBADPATH, NULL, "Invalid config file path %s",
      +                     APR_EBADPATH, NULL, APLOGNO(00532) "Invalid config file path %s",
                            filename);
               return NULL;
           }
      @@ -2363,7 +2499,7 @@ AP_DECLARE(server_rec*) ap_read_config(process_rec *process, apr_pool_t *ptemp,
       
           error = ap_check_mpm();
           if (error) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, 0, NULL, APLOGNO(00534)
                            "%s: Configuration error: %s", ap_server_argv0, error);
               return NULL;
           }
      diff --git a/server/connection.c b/server/connection.c
      index 13ba951b0c2..917e661c4fb 100644
      --- a/server/connection.c
      +++ b/server/connection.c
      @@ -34,12 +34,15 @@ APR_HOOK_STRUCT(
                   APR_HOOK_LINK(create_connection)
                   APR_HOOK_LINK(process_connection)
                   APR_HOOK_LINK(pre_connection)
      +            APR_HOOK_LINK(pre_close_connection)
       )
       AP_IMPLEMENT_HOOK_RUN_FIRST(conn_rec *,create_connection,
                                   (apr_pool_t *p, server_rec *server, apr_socket_t *csd, long conn_id, void *sbh, apr_bucket_alloc_t *alloc),
                                   (p, server, csd, conn_id, sbh, alloc), NULL)
       AP_IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
       AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c, void *csd),(c, csd),OK,DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_close_connection,(conn_rec *c),(c),OK,DECLINED)
      +
       /*
        * More machine-dependent networking gooo... on some systems,
        * you've got to be *really* sure that all the packets are acknowledged
      @@ -64,29 +67,50 @@ AP_IMPLEMENT_HOOK_RUN_ALL(int,pre_connection,(conn_rec *c, void *csd),(c, csd),O
       #define MAX_SECS_TO_LINGER 30
       #endif
       
      -AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c)
      +AP_CORE_DECLARE(apr_status_t) ap_shutdown_conn(conn_rec *c, int flush)
       {
      +    apr_status_t rv;
           apr_bucket_brigade *bb;
           apr_bucket *b;
       
           bb = apr_brigade_create(c->pool, c->bucket_alloc);
       
      -    /* FLUSH bucket */
      -    b = apr_bucket_flush_create(c->bucket_alloc);
      -    APR_BRIGADE_INSERT_TAIL(bb, b);
      +    if (flush) {
      +        /* FLUSH bucket */
      +        b = apr_bucket_flush_create(c->bucket_alloc);
      +        APR_BRIGADE_INSERT_TAIL(bb, b);
      +    }
       
           /* End Of Connection bucket */
           b = ap_bucket_eoc_create(c->bucket_alloc);
           APR_BRIGADE_INSERT_TAIL(bb, b);
       
      -    ap_pass_brigade(c->output_filters, bb);
      +    rv = ap_pass_brigade(c->output_filters, bb);
      +    apr_brigade_destroy(bb);
      +    return rv;
      +}
      +
      +AP_CORE_DECLARE(void) ap_flush_conn(conn_rec *c)
      +{
      +    (void)ap_shutdown_conn(c, 1);
      +}
      +
      +AP_DECLARE(int) ap_prep_lingering_close(conn_rec *c)
      +{
      +    /* Give protocol handlers one last chance to raise their voice */
      +    ap_run_pre_close_connection(c);
      +    
      +    if (c->sbh) {
      +        ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
      +    }
      +    return 0;
       }
       
       /* we now proceed to read from the client until we get EOF, or until
      - * MAX_SECS_TO_LINGER has passed.  the reasons for doing this are
      + * MAX_SECS_TO_LINGER has passed.  The reasons for doing this are
        * documented in a draft:
        *
      - * http://www.ics.uci.edu/pub/ietf/http/draft-ietf-http-connection-00.txt
      + * http://tools.ietf.org/html/draft-ietf-http-connection-00.txt
        *
        * in a nutshell -- if we don't make this effort we risk causing
        * TCP RST packets to be sent which can tear down a connection before
      @@ -102,8 +126,10 @@ AP_DECLARE(int) ap_start_lingering_close(conn_rec *c)
               return 1;
           }
       
      -    ap_update_child_status(c->sbh, SERVER_CLOSING, NULL);
      -
      +    if (ap_prep_lingering_close(c)) {
      +        return 1;
      +    }
      +    
       #ifdef NO_LINGCLOSE
           ap_flush_conn(c); /* just close it */
           apr_socket_close(csd);
      @@ -139,7 +165,7 @@ AP_DECLARE(void) ap_lingering_close(conn_rec *c)
       {
           char dummybuf[512];
           apr_size_t nbytes;
      -    apr_time_t timeup = 0;
      +    apr_time_t now, timeup = 0;
           apr_socket_t *csd = ap_get_conn_socket(c);
       
           if (ap_start_lingering_close(c)) {
      @@ -163,6 +189,7 @@ AP_DECLARE(void) ap_lingering_close(conn_rec *c)
               if (apr_socket_recv(csd, dummybuf, &nbytes) || nbytes == 0)
                   break;
       
      +        now = apr_time_now();
               if (timeup == 0) {
                   /*
                    * First time through;
      @@ -173,17 +200,16 @@ AP_DECLARE(void) ap_lingering_close(conn_rec *c)
                    * DoS attacks.
                    */
                   if (apr_table_get(c->notes, "short-lingering-close")) {
      -                timeup = apr_time_now() + apr_time_from_sec(SECONDS_TO_LINGER);
      +                timeup = now + apr_time_from_sec(SECONDS_TO_LINGER);
                   }
                   else {
      -                timeup = apr_time_now() + apr_time_from_sec(MAX_SECS_TO_LINGER);
      +                timeup = now + apr_time_from_sec(MAX_SECS_TO_LINGER);
                   }
                   continue;
               }
      -    } while (apr_time_now() < timeup);
      +    } while (now < timeup);
       
           apr_socket_close(csd);
      -    return;
       }
       
       AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
      @@ -200,4 +226,3 @@ AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c, void *csd)
               ap_run_process_connection(c);
           }
       }
      -
      diff --git a/server/core.c b/server/core.c
      index 751c32219b4..20fa583bdbb 100644
      --- a/server/core.c
      +++ b/server/core.c
      @@ -64,7 +64,7 @@
       
       /* LimitXMLRequestBody handling */
       #define AP_LIMIT_UNSET                  ((long) -1)
      -#define AP_DEFAULT_LIMIT_XML_BODY       ((size_t)1000000)
      +#define AP_DEFAULT_LIMIT_XML_BODY       ((apr_size_t)1000000)
       
       #define AP_MIN_SENDFILE_BYTES           (256)
       
      @@ -82,12 +82,18 @@
       
       APR_HOOK_STRUCT(
           APR_HOOK_LINK(get_mgmt_items)
      +    APR_HOOK_LINK(insert_network_bucket)
       )
       
       AP_IMPLEMENT_HOOK_RUN_ALL(int, get_mgmt_items,
                                 (apr_pool_t *p, const char *val, apr_hash_t *ht),
                                 (p, val, ht), OK, DECLINED)
       
      +AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t, insert_network_bucket,
      +                            (conn_rec *c, apr_bucket_brigade *bb,
      +                             apr_socket_t *socket),
      +                            (c, bb, socket), AP_DECLINED)
      +
       /* Server core module... This module provides support for really basic
        * server operations, including options and commands which control the
        * operation of other modules.  Consider this the bureaucracy module.
      @@ -184,6 +190,9 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
           conf->max_overlaps = AP_MAXRANGES_UNSET;
           conf->max_reversals = AP_MAXRANGES_UNSET;
       
      +    conf->cgi_pass_auth = AP_CGI_PASS_AUTH_UNSET;
      +    conf->qualify_redirect_url = AP_CORE_CONFIG_UNSET; 
      +
           return (void *)conf;
       }
       
      @@ -192,7 +201,6 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
           core_dir_config *base = (core_dir_config *)basev;
           core_dir_config *new = (core_dir_config *)newv;
           core_dir_config *conf;
      -    int i;
       
           /* Create this conf by duplicating the base, replacing elements
            * (or creating copies for merging) where new-> values exist.
      @@ -203,6 +211,7 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
           conf->d_is_fnmatch = new->d_is_fnmatch;
           conf->d_components = new->d_components;
           conf->r = new->r;
      +    conf->refs = new->refs;
           conf->condition = new->condition;
       
           if (new->opts & OPT_UNSET) {
      @@ -241,34 +250,25 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
               conf->override_opts = new->override_opts;
           }
       
      -    if (conf->override_list == NULL) {
      +    if (new->override_list != NULL) {
               conf->override_list = new->override_list;
           }
       
      -    if (conf->response_code_strings == NULL) {
      -        conf->response_code_strings = new->response_code_strings;
      +    if (conf->response_code_exprs == NULL) {
      +        conf->response_code_exprs = new->response_code_exprs;
           }
      -    else if (new->response_code_strings != NULL) {
      -        /* If we merge, the merge-result must have its own array
      -         */
      -        conf->response_code_strings = apr_pmemdup(a,
      -            base->response_code_strings,
      -            sizeof(*conf->response_code_strings) * RESPONSE_CODES);
      -
      -        for (i = 0; i < RESPONSE_CODES; ++i) {
      -            if (new->response_code_strings[i] != NULL) {
      -                conf->response_code_strings[i] = new->response_code_strings[i];
      -            }
      -        }
      +    else if (new->response_code_exprs != NULL) {
      +        conf->response_code_exprs = apr_hash_overlay(a,
      +                new->response_code_exprs, conf->response_code_exprs);
           }
      -    /* Otherwise we simply use the base->response_code_strings array
      +    /* Otherwise we simply use the base->response_code_exprs array
            */
       
           if (new->hostname_lookups != HOSTNAME_LOOKUP_UNSET) {
               conf->hostname_lookups = new->hostname_lookups;
           }
       
      -    if (new->content_md5 == AP_CONTENT_MD5_UNSET) {
      +    if (new->content_md5 != AP_CONTENT_MD5_UNSET) {
               conf->content_md5 = new->content_md5;
           }
       
      @@ -308,8 +308,6 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
       
           if (new->limit_xml_body != AP_LIMIT_UNSET)
               conf->limit_xml_body = new->limit_xml_body;
      -    else
      -        conf->limit_xml_body = base->limit_xml_body;
       
           if (!conf->sec_file) {
               conf->sec_file = new->sec_file;
      @@ -351,6 +349,9 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
           if (new->handler) {
               conf->handler = new->handler;
           }
      +    if (new->expr_handler) {
      +        conf->expr_handler = new->expr_handler;
      +    }
       
           if (new->output_filters) {
               conf->output_filters = new->output_filters;
      @@ -406,6 +407,19 @@ static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv)
           conf->max_overlaps = new->max_overlaps != AP_MAXRANGES_UNSET ? new->max_overlaps : base->max_overlaps;
           conf->max_reversals = new->max_reversals != AP_MAXRANGES_UNSET ? new->max_reversals : base->max_reversals;
       
      +    conf->cgi_pass_auth = new->cgi_pass_auth != AP_CGI_PASS_AUTH_UNSET ? new->cgi_pass_auth : base->cgi_pass_auth;
      +
      +    if (new->cgi_var_rules) {
      +        if (!conf->cgi_var_rules) {
      +            conf->cgi_var_rules = new->cgi_var_rules;
      +        }
      +        else {
      +            conf->cgi_var_rules = apr_hash_overlay(a, new->cgi_var_rules, conf->cgi_var_rules);
      +        }
      +    }
      +
      +    AP_CORE_MERGE_FLAG(qualify_redirect_url, conf, base, new);
      +
           return (void*)conf;
       }
       
      @@ -439,6 +453,10 @@ static void *create_core_server_config(apr_pool_t *a, server_rec *s)
       #if APR_HAS_SO_ACCEPTFILTER
               apr_table_setn(conf->accf_map, "http", ACCEPT_FILTER_NAME);
               apr_table_setn(conf->accf_map, "https", "dataready");
      +#elif defined(WIN32)
      +        /* 'data' is disabled on Windows due to a DoS vuln (PR 59970) */
      +        apr_table_setn(conf->accf_map, "http", "connect");
      +        apr_table_setn(conf->accf_map, "https", "connect");
       #else
               apr_table_setn(conf->accf_map, "http", "data");
               apr_table_setn(conf->accf_map, "https", "data");
      @@ -469,6 +487,9 @@ static void *create_core_server_config(apr_pool_t *a, server_rec *s)
       
           conf->trace_enable = AP_TRACE_UNSET;
       
      +    conf->protocols = apr_array_make(a, 5, sizeof(const char *));
      +    conf->protocols_honor_order = -1;
      +    
           return (void *)conf;
       }
       
      @@ -498,6 +519,15 @@ static void *merge_core_server_configs(apr_pool_t *p, void *basev, void *virtv)
           if (virt->trace_enable != AP_TRACE_UNSET)
               conf->trace_enable = virt->trace_enable;
       
      +    if (virt->http09_enable != AP_HTTP09_UNSET)
      +        conf->http09_enable = virt->http09_enable;
      +
      +    if (virt->http_conformance != AP_HTTP_CONFORMANCE_UNSET)
      +        conf->http_conformance = virt->http_conformance;
      +
      +    if (virt->http_methods != AP_HTTP_METHODS_UNSET)
      +        conf->http_methods = virt->http_methods;
      +
           /* no action for virt->accf_map, not allowed per-vhost */
       
           if (virt->protocol)
      @@ -515,6 +545,16 @@ static void *merge_core_server_configs(apr_pool_t *p, void *basev, void *virtv)
           if (virt->error_log_req)
               conf->error_log_req = virt->error_log_req;
       
      +    conf->merge_trailers = (virt->merge_trailers != AP_MERGE_TRAILERS_UNSET)
      +                           ? virt->merge_trailers
      +                           : base->merge_trailers;
      +
      +    conf->protocols = ((virt->protocols->nelts > 0)? 
      +                       virt->protocols : base->protocols);
      +    conf->protocols_honor_order = ((virt->protocols_honor_order < 0)?
      +                                       base->protocols_honor_order :
      +                                       virt->protocols_honor_order);
      +    
           return conf;
       }
       
      @@ -787,58 +827,79 @@ char *ap_response_code_string(request_rec *r, int error_index)
       {
           core_dir_config *dirconf;
           core_request_config *reqconf = ap_get_core_module_config(r->request_config);
      +    const char *err;
      +    const char *response;
      +    ap_expr_info_t *expr;
       
           /* check for string registered via ap_custom_response() first */
      -    if (reqconf->response_code_strings != NULL &&
      -        reqconf->response_code_strings[error_index] != NULL) {
      +    if (reqconf->response_code_strings != NULL
      +            && reqconf->response_code_strings[error_index] != NULL) {
               return reqconf->response_code_strings[error_index];
           }
       
           /* check for string specified via ErrorDocument */
           dirconf = ap_get_core_module_config(r->per_dir_config);
       
      -    if (dirconf->response_code_strings == NULL) {
      +    if (!dirconf->response_code_exprs) {
      +        return NULL;
      +    }
      +
      +    expr = apr_hash_get(dirconf->response_code_exprs, &error_index,
      +            sizeof(error_index));
      +    if (!expr) {
      +        return NULL;
      +    }
      +
      +    /* special token to indicate revert back to default */
      +    if ((char *) expr == &errordocument_default) {
               return NULL;
           }
       
      -    if (dirconf->response_code_strings[error_index] == &errordocument_default) {
      +    err = NULL;
      +    response = ap_expr_str_exec(r, expr, &err);
      +    if (err) {
      +        ap_log_rerror(
      +                APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02841) "core: ErrorDocument: can't "
      +                "evaluate require expression: %s", err);
               return NULL;
           }
       
      -    return dirconf->response_code_strings[error_index];
      +    /* alas, duplication required as we return not-const */
      +    return apr_pstrdup(r->pool, response);
       }
       
       
       /* Code from Harald Hanche-Olsen <hanche@imf.unit.no> */
      -static APR_INLINE void do_double_reverse (conn_rec *conn)
      +static APR_INLINE int do_double_reverse (int double_reverse,
      +                                         const char *remote_host,
      +                                         apr_sockaddr_t *client_addr,
      +                                         apr_pool_t *pool)
       {
           apr_sockaddr_t *sa;
           apr_status_t rv;
       
      -    if (conn->double_reverse) {
      +    if (double_reverse) {
               /* already done */
      -        return;
      +        return double_reverse;
           }
       
      -    if (conn->remote_host == NULL || conn->remote_host[0] == '\0') {
      +    if (remote_host == NULL || remote_host[0] == '\0') {
               /* single reverse failed, so don't bother */
      -        conn->double_reverse = -1;
      -        return;
      +        return -1;
           }
       
      -    rv = apr_sockaddr_info_get(&sa, conn->remote_host, APR_UNSPEC, 0, 0, conn->pool);
      +    rv = apr_sockaddr_info_get(&sa, remote_host, APR_UNSPEC, 0, 0, pool);
           if (rv == APR_SUCCESS) {
               while (sa) {
      -            if (apr_sockaddr_equal(sa, conn->remote_addr)) {
      -                conn->double_reverse = 1;
      -                return;
      +            if (apr_sockaddr_equal(sa, client_addr)) {
      +                return 1;
                   }
       
                   sa = sa->next;
               }
           }
       
      -    conn->double_reverse = -1;
      +    return -1;
       }
       
       AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
      @@ -871,12 +932,15 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
               && (type == REMOTE_DOUBLE_REV
               || hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
       
      -        if (apr_getnameinfo(&conn->remote_host, conn->remote_addr, 0)
      +        if (apr_getnameinfo(&conn->remote_host, conn->client_addr, 0)
                   == APR_SUCCESS) {
                   ap_str_tolower(conn->remote_host);
       
                   if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
      -                do_double_reverse(conn);
      +                conn->double_reverse = do_double_reverse(conn->double_reverse,
      +                                                         conn->remote_host,
      +                                                         conn->client_addr,
      +                                                         conn->pool);
                       if (conn->double_reverse != 1) {
                           conn->remote_host = NULL;
                       }
      @@ -890,7 +954,9 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
           }
       
           if (type == REMOTE_DOUBLE_REV) {
      -        do_double_reverse(conn);
      +        conn->double_reverse = do_double_reverse(conn->double_reverse,
      +                                                 conn->remote_host,
      +                                                 conn->client_addr, conn->pool);
               if (conn->double_reverse == -1) {
                   return NULL;
               }
      @@ -910,7 +976,87 @@ AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config,
               }
               else {
                   *str_is_ip = 1;
      -            return conn->remote_ip;
      +            return conn->client_ip;
      +        }
      +    }
      +}
      +
      +AP_DECLARE(const char *) ap_get_useragent_host(request_rec *r,
      +                                               int type, int *str_is_ip)
      +{
      +    conn_rec *conn = r->connection;
      +    int hostname_lookups;
      +    int ignored_str_is_ip;
      +
      +    /* Guard here when examining the host before the read_request hook
      +     * has populated an r->useragent_addr
      +     */
      +    if (!r->useragent_addr || (r->useragent_addr == conn->client_addr)) {
      +        return ap_get_remote_host(conn, r->per_dir_config, type, str_is_ip);
      +    }
      +
      +    if (!str_is_ip) { /* caller doesn't want to know */
      +        str_is_ip = &ignored_str_is_ip;
      +    }
      +    *str_is_ip = 0;
      +
      +    hostname_lookups = ((core_dir_config *)
      +                        ap_get_core_module_config(r->per_dir_config))
      +                            ->hostname_lookups;
      +    if (hostname_lookups == HOSTNAME_LOOKUP_UNSET) {
      +        hostname_lookups = HOSTNAME_LOOKUP_OFF;
      +    }
      +
      +    if (type != REMOTE_NOLOOKUP
      +        && r->useragent_host == NULL
      +        && (type == REMOTE_DOUBLE_REV
      +        || hostname_lookups != HOSTNAME_LOOKUP_OFF)) {
      +
      +        if (apr_getnameinfo(&r->useragent_host, r->useragent_addr, 0)
      +            == APR_SUCCESS) {
      +            ap_str_tolower(r->useragent_host);
      +
      +            if (hostname_lookups == HOSTNAME_LOOKUP_DOUBLE) {
      +                r->double_reverse = do_double_reverse(r->double_reverse,
      +                                                      r->useragent_host,
      +                                                      r->useragent_addr,
      +                                                      r->pool);
      +                if (r->double_reverse != 1) {
      +                    r->useragent_host = NULL;
      +                }
      +            }
      +        }
      +
      +        /* if failed, set it to the NULL string to indicate error */
      +        if (r->useragent_host == NULL) {
      +            r->useragent_host = "";
      +        }
      +    }
      +
      +    if (type == REMOTE_DOUBLE_REV) {
      +        r->double_reverse = do_double_reverse(r->double_reverse,
      +                                              r->useragent_host,
      +                                              r->useragent_addr, r->pool);
      +        if (r->double_reverse == -1) {
      +            return NULL;
      +        }
      +    }
      +
      +    /*
      +     * Return the desired information; either the remote DNS name, if found,
      +     * or either NULL (if the hostname was requested) or the IP address
      +     * (if any identifier was requested).
      +     */
      +    if (r->useragent_host != NULL && r->useragent_host[0] != '\0') {
      +        return r->useragent_host;
      +    }
      +    else {
      +        if (type == REMOTE_HOST || type == REMOTE_DOUBLE_REV) {
      +            return NULL;
      +        }
      +        else {
      +            *str_is_ip = 1;
      +            return r->useragent_ip;
               }
           }
       }
      @@ -973,7 +1119,7 @@ AP_DECLARE(const char *) ap_get_server_name(request_rec *r)
                   retval = r->hostname ? r->hostname : r->server->server_hostname;
                   break;
               default:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00109)
                                "ap_get_server_name: Invalid UCN Option somehow");
                   retval = "localhost";
                   break;
      @@ -992,7 +1138,7 @@ AP_DECLARE(const char *) ap_get_server_name_for_url(request_rec *r)
       
       #if APR_HAVE_IPV6
           if (ap_strchr_c(plain_server_name, ':')) { /* IPv6 literal? */
      -        return apr_psprintf(r->pool, "[%s]", plain_server_name);
      +        return apr_pstrcat(r->pool, "[", plain_server_name, "]", NULL);
           }
       #endif
           return plain_server_name;
      @@ -1036,7 +1182,7 @@ AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r)
                              ap_default_port(r);
                   break;
               default:
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00110)
                                "ap_get_server_port: Invalid UCN Option somehow");
                   port = ap_default_port(r);
                   break;
      @@ -1074,7 +1220,7 @@ AP_DECLARE(apr_off_t) ap_get_limit_req_body(const request_rec *r)
       /*****************************************************************
        *
        * Commands... this module handles almost all of the NCSA httpd.conf
      - * commands, but most of the old srm.conf is in the the modules.
      + * commands, but most of the old srm.conf is in the modules.
        */
       
       
      @@ -1140,7 +1286,10 @@ AP_DECLARE(const char *) ap_check_cmd_context(cmd_parms *cmd,
                       || (found = find_parent(cmd->directive, "<LocationMatch"))))
               || ((forbidden & NOT_IN_FILES)
                   && ((found = find_parent(cmd->directive, "<Files"))
      -                || (found = find_parent(cmd->directive, "<FilesMatch"))))) {
      +                || (found = find_parent(cmd->directive, "<FilesMatch"))
      +                || (found = find_parent(cmd->directive, "<If"))
      +                || (found = find_parent(cmd->directive, "<ElseIf"))
      +                || (found = find_parent(cmd->directive, "<Else"))))) {
               return apr_pstrcat(cmd->pool, cmd->cmd->name, gt,
                                  " cannot occur within ", found->directive,
                                  "> section", NULL);
      @@ -1204,8 +1353,8 @@ AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word)
               }
       
               if (*s == '$') {
      -            if (s[1] == '{' && (e = ap_strchr_c(s, '}'))) {
      -                char *name = apr_pstrndup(p, s+2, e-s-2);
      +            if (s[1] == '{' && (e = ap_strchr_c(s+2, '}'))) {
      +                char *name = apr_pstrmemdup(p, s+2, e-s-2);
                       word = NULL;
                       if (server_config_defined_vars)
                           word = apr_table_get(server_config_defined_vars, name);
      @@ -1218,7 +1367,7 @@ AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word)
                       }
                       else {
                           if (ap_strchr(name, ':') == 0)
      -                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
      +                        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, APLOGNO(00111)
                                            "Config variable ${%s} is not defined",
                                            name);
                           current->string = s;
      @@ -1259,6 +1408,7 @@ AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word)
       static int reset_config_defines(void *dummy)
       {
           ap_server_config_defines = saved_server_config_defines;
      +    saved_server_config_defines = NULL;
           server_config_defined_vars = NULL;
           return OK;
       }
      @@ -1320,7 +1470,7 @@ static const char *unset_define(cmd_parms *cmd, void *dummy,
           defines = (char **)ap_server_config_defines->elts;
           for (i = 0; i < ap_server_config_defines->nelts; i++) {
               if (strcmp(defines[i], name) == 0) {
      -            defines[i] = apr_array_pop(ap_server_config_defines);
      +            defines[i] = *(char **)apr_array_pop(ap_server_config_defines);
                   break;
               }
           }
      @@ -1413,16 +1563,18 @@ static const char *set_document_root(cmd_parms *cmd, void *dummy,
           /* TODO: ap_configtestonly */
           if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
                                  APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
      -        || !ap_is_directory(cmd->pool, arg)) {
      +        || !ap_is_directory(cmd->temp_pool, arg)) {
               if (cmd->server->is_virtual) {
                   ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0,
      -                          cmd->pool,
      +                          cmd->pool, APLOGNO(00112)
                                 "Warning: DocumentRoot [%s] does not exist",
                                 arg);
                   conf->ap_document_root = arg;
               }
               else {
      -            return "DocumentRoot must be a directory";
      +            return apr_psprintf(cmd->pool, 
      +                                "DocumentRoot '%s' is not a directory, or is not readable",
      +                                arg);
               }
           }
           return NULL;
      @@ -1481,32 +1633,48 @@ static const char *set_error_document(cmd_parms *cmd, void *conf_,
           /* The entry should be ignored if it is a full URL for a 401 error */
       
           if (error_number == 401 && what == REMOTE_PATH) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server,
      -                     "cannot use a full URL in a 401 ErrorDocument "
      -                     "directive --- ignoring!");
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server, APLOGNO(00113)
      +                     "%s:%d cannot use a full URL in a 401 ErrorDocument "
      +                     "directive --- ignoring!", cmd->directive->filename, cmd->directive->line_num);
           }
           else { /* Store it... */
      -        if (conf->response_code_strings == NULL) {
      -            conf->response_code_strings =
      -                apr_pcalloc(cmd->pool,
      -                            sizeof(*conf->response_code_strings) *
      -                            RESPONSE_CODES);
      +        if (conf->response_code_exprs == NULL) {
      +            conf->response_code_exprs = apr_hash_make(cmd->pool);
               }
       
      -        if (strcmp(msg, "default") == 0) {
      +        if (strcasecmp(msg, "default") == 0) {
                   /* special case: ErrorDocument 404 default restores the
                    * canned server error response
                    */
      -            conf->response_code_strings[index_number] = &errordocument_default;
      +            apr_hash_set(conf->response_code_exprs,
      +                    apr_pmemdup(cmd->pool, &index_number, sizeof(index_number)),
      +                    sizeof(index_number), &errordocument_default);
               }
               else {
      +            ap_expr_info_t *expr;
      +            const char *expr_err = NULL;
      +
                   /* hack. Prefix a " if it is a msg; as that is what
                    * http_protocol.c relies on to distinguish between
                    * a msg and a (local) path.
                    */
      -            conf->response_code_strings[index_number] = (what == MSG) ?
      -                    apr_pstrcat(cmd->pool, "\"",msg,NULL) :
      -                    apr_pstrdup(cmd->pool, msg);
      +            const char *response =
      +                    (what == MSG) ? apr_pstrcat(cmd->pool, "\"", msg, NULL) :
      +                            apr_pstrdup(cmd->pool, msg);
      +
      +            expr = ap_expr_parse_cmd(cmd, response, AP_EXPR_FLAG_STRING_RESULT,
      +                    &expr_err, NULL);
      +
      +            if (expr_err) {
      +                return apr_pstrcat(cmd->temp_pool,
      +                                   "Cannot parse expression in ErrorDocument: ",
      +                                   expr_err, NULL);
      +            }
      +
      +            apr_hash_set(conf->response_code_exprs,
      +                    apr_pmemdup(cmd->pool, &index_number, sizeof(index_number)),
      +                    sizeof(index_number), expr);
      +
               }
           }
       
      @@ -1583,7 +1751,7 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
       
           /* Throw a warning if we're in <Location> or <Files> */
           if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00114)
                            "Useless use of AllowOverride in line %d of %s.",
                            cmd->directive->line_num, cmd->directive->filename);
           }
      @@ -1608,7 +1776,7 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
                   if (v)
                       set_allow_opts(cmd, &(d->override_opts), v);
                   else
      -                d->override_opts = OPT_SYM_LINKS;
      +                d->override_opts = OPT_ALL;
               }
               else if (!strcasecmp(w, "FileInfo")) {
                   d->override |= OR_FILEINFO;
      @@ -1619,6 +1787,17 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
               else if (!strcasecmp(w, "Indexes")) {
                   d->override |= OR_INDEXES;
               }
      +        else if (!strcasecmp(w, "Nonfatal")) {
      +            if (!strcasecmp(v, "Override")) {
      +                d->override |= NONFATAL_OVERRIDE;
      +            }
      +            else if (!strcasecmp(v, "Unknown")) {
      +                d->override |= NONFATAL_UNKNOWN;
      +            }
      +            else if (!strcasecmp(v, "All")) {
      +                d->override |= NONFATAL_ALL;
      +            }
      +        }
               else if (!strcasecmp(w, "None")) {
                   d->override = OR_NONE;
               }
      @@ -1635,6 +1814,49 @@ static const char *set_override(cmd_parms *cmd, void *d_, const char *l)
           return NULL;
       }
       
      +static const char *set_cgi_pass_auth(cmd_parms *cmd, void *d_, int flag)
      +{
      +    core_dir_config *d = d_;
      +
      +    d->cgi_pass_auth = flag ? AP_CGI_PASS_AUTH_ON : AP_CGI_PASS_AUTH_OFF;
      +
      +    return NULL;
      +}
      +
      +static const char *set_cgi_var(cmd_parms *cmd, void *d_,
      +                               const char *var, const char *rule_)
      +{
      +    core_dir_config *d = d_;
      +    char *rule = apr_pstrdup(cmd->pool, rule_);
      +
      +    ap_str_tolower(rule);
      +
      +    if (!strcmp(var, "REQUEST_URI")) {
      +        if (strcmp(rule, "current-uri") && strcmp(rule, "original-uri")) {
      +            return "Valid rules for REQUEST_URI are 'current-uri' and 'original-uri'";
      +        }
      +    }
      +    else {
      +        return apr_pstrcat(cmd->pool, "Unrecognized CGI variable: \"",
      +                           var, "\"", NULL);
      +    }
      +
      +    if (!d->cgi_var_rules) {
      +        d->cgi_var_rules = apr_hash_make(cmd->pool);
      +    }
      +    apr_hash_set(d->cgi_var_rules, var, APR_HASH_KEY_STRING, rule);
      +    return NULL;
      +}
      +
      +static const char *set_qualify_redirect_url(cmd_parms *cmd, void *d_, int flag)
      +{
      +    core_dir_config *d = d_;
      +
      +    d->qualify_redirect_url = flag ? AP_CORE_CONFIG_ON : AP_CORE_CONFIG_OFF;
      +
      +    return NULL;
      +}
      +
       static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *const argv[])
       {
           core_dir_config *d = d_;
      @@ -1643,29 +1865,47 @@ static const char *set_override_list(cmd_parms *cmd, void *d_, int argc, char *c
       
           /* Throw a warning if we're in <Location> or <Files> */
           if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -                     "Useless use of AllowOverrideList in line %d of %s.",
      -                     cmd->directive->line_num, cmd->directive->filename);
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00115)
      +                     "Useless use of AllowOverrideList at %s:%d",
      +                     cmd->directive->filename, cmd->directive->line_num);
           }
           if ((err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS)) != NULL)
               return err;
       
      -    d->override_list = apr_table_make(cmd->pool, 1);
      +    d->override_list = apr_table_make(cmd->pool, argc);
       
      -    for (i=0;i<argc;i++){
      +    for (i = 0; i < argc; i++) {
               if (!strcasecmp(argv[i], "None")) {
      +            if (argc != 1) {
      +                return "'None' not allowed with other directives in "
      +                       "AllowOverrideList";
      +            }
                   return NULL;
               }
               else {
                   const command_rec *result = NULL;
                   module *mod = ap_top_module;
      +
                   result = ap_find_command_in_modules(argv[i], &mod);
      -            if (result)
      -                apr_table_set(d->override_list, argv[i], "1");
      -            else
      +            if (result == NULL) {
                       ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      -                             "Discarding unrecognized directive `%s' in AllowOverrideList.",
      -                             argv[i]);
      +                             APLOGNO(00116) "Discarding unrecognized "
      +                             "directive `%s' in AllowOverrideList at %s:%d",
      +                             argv[i], cmd->directive->filename,
      +                             cmd->directive->line_num);
      +                continue;
      +            }
      +            else if ((result->req_override & (OR_ALL|ACCESS_CONF)) == 0) {
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +                             APLOGNO(02304) "Discarding directive `%s' not "
      +                             "allowed in AllowOverrideList at %s:%d",
      +                             argv[i], cmd->directive->filename,
      +                             cmd->directive->line_num);
      +                continue;
      +            }
      +            else {
      +                apr_table_setn(d->override_list, argv[i], "1");
      +            }
               }
           }
       
      @@ -1775,7 +2015,7 @@ static const char *set_default_type(cmd_parms *cmd, void *d_,
                                          const char *arg)
       {
           if ((strcasecmp(arg, "off") != 0) && (strcasecmp(arg, "none") != 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00117)
                     "Ignoring deprecated use of DefaultType in line %d of %s.",
                            cmd->directive->line_num, cmd->directive->filename);
           }
      @@ -1783,6 +2023,22 @@ static const char *set_default_type(cmd_parms *cmd, void *d_,
           return NULL;
       }
       
      +static const char *set_sethandler(cmd_parms *cmd,
      +                                     void *d_,
      +                                     const char *arg_)
      +{
      +    core_dir_config *dirconf = d_;
      +    const char *err;
      +    dirconf->expr_handler = ap_expr_parse_cmd(cmd, arg_,
      +                                          AP_EXPR_FLAG_STRING_RESULT,
      +                                          &err, NULL);
      +    if (err) {
      +        return apr_pstrcat(cmd->pool,
      +                "Can't parse expression : ", err, NULL);
      +    }
      +    return NULL;
      +}
      +
       /*
        * Note what data should be used when forming file ETag values.
        * It would be nicer to do this as an ITERATE, but then we couldn't
      @@ -1986,7 +2242,7 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd,
               return unclosed_directive(cmd);
           }
       
      -    limited_methods = apr_pstrndup(cmd->temp_pool, arg, endp - arg);
      +    limited_methods = apr_pstrmemdup(cmd->temp_pool, arg, endp - arg);
       
           if (!limited_methods[0]) {
               return missing_container_arg(cmd);
      @@ -2003,7 +2259,7 @@ AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd,
                   return "TRACE cannot be controlled by <Limit>, see TraceEnable";
               }
               else if (methnum == M_INVALID) {
      -            /* method has not been registered yet, but resorce restriction
      +            /* method has not been registered yet, but resource restriction
                    * is always checked before method handling, so register it.
                    */
                   methnum = ap_method_register(cmd->pool,
      @@ -2093,7 +2349,7 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg)
                   return "Regex could not be compiled";
               }
           }
      -    else if (!strcmp(cmd->path, "/") == 0)
      +    else if (strcmp(cmd->path, "/") != 0)
           {
               char *newpath;
       
      @@ -2124,6 +2380,11 @@ static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg)
           conf->d = cmd->path;
           conf->d_is_fnmatch = (apr_fnmatch_test(conf->d) != 0);
       
      +    if (r) {
      +        conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *));
      +        ap_regname(r, conf->refs, AP_REG_MATCH, 1);
      +    }
      +
           /* Make this explicit - the "/" root has 0 elements, that is, we
            * will always merge it, and it will always sort and merge first.
            * All others are sorted and tested by the number of slashes.
      @@ -2200,6 +2461,11 @@ static const char *urlsection(cmd_parms *cmd, void *mconfig, const char *arg)
           conf->d_is_fnmatch = apr_fnmatch_test(conf->d) != 0;
           conf->r = r;
       
      +    if (r) {
      +        conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *));
      +        ap_regname(r, conf->refs, AP_REG_MATCH, 1);
      +    }
      +
           ap_add_per_url_conf(cmd->server, new_url_conf);
       
           if (*arg != '\0') {
      @@ -2282,6 +2548,11 @@ static const char *filesection(cmd_parms *cmd, void *mconfig, const char *arg)
           conf->d_is_fnmatch = apr_fnmatch_test(conf->d) != 0;
           conf->r = r;
       
      +    if (r) {
      +        conf->refs = apr_array_make(cmd->pool, 8, sizeof(char *));
      +        ap_regname(r, conf->refs, AP_REG_MATCH, 1);
      +    }
      +
           ap_add_file_conf(cmd->pool, (core_dir_config *)mconfig, new_file_conf);
       
           if (*arg != '\0') {
      @@ -2322,7 +2593,11 @@ static const char *ifsection(cmd_parms *cmd, void *mconfig, const char *arg)
       
           arg = apr_pstrndup(cmd->temp_pool, arg, endp - arg);
       
      -
      +    /*
      +     * Set a dummy value so that other directives notice that they are inside
      +     * a config section.
      +     */
      +    cmd->path = "*If";
           /* Only if not an .htaccess file */
           if (!old_path) {
               cmd->override = OR_ALL|ACCESS_CONF;
      @@ -2464,17 +2739,7 @@ static const char *start_ifmod(cmd_parms *cmd, void *mconfig, const char *arg)
       
       AP_DECLARE(int) ap_exists_config_define(const char *name)
       {
      -    char **defines;
      -    int i;
      -
      -    defines = (char **)ap_server_config_defines->elts;
      -    for (i = 0; i < ap_server_config_defines->nelts; i++) {
      -        if (strcmp(defines[i], name) == 0) {
      -            return 1;
      -        }
      -    }
      -
      -    return 0;
      +    return ap_array_str_contains(ap_server_config_defines, name);
       }
       
       static const char *start_ifdefine(cmd_parms *cmd, void *dummy, const char *arg)
      @@ -2758,6 +3023,24 @@ static const char *set_server_root(cmd_parms *cmd, void *dummy,
           return NULL;
       }
       
      +static const char *set_runtime_dir(cmd_parms *cmd, void *dummy, const char *arg)
      +{
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +
      +    if (err != NULL) {
      +        return err;
      +    }
      +
      +    if ((apr_filepath_merge((char**)&ap_runtime_dir, NULL,
      +                            ap_server_root_relative(cmd->temp_pool, arg),
      +                            APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS)
      +        || !ap_is_directory(cmd->temp_pool, ap_runtime_dir)) {
      +        return "DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot";
      +    }
      +
      +    return NULL;
      +}
      +
       static const char *set_timeout(cmd_parms *cmd, void *dummy, const char *arg)
       {
           const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
      @@ -2902,6 +3185,10 @@ static const char *include_config (cmd_parms *cmd, void *dummy,
           int optional = cmd->cmd->cmd_data ? 1 : 0;
           void *data;
       
      +    /* NOTE: ap_include_sentinel is also used by ap_process_resource_config()
      +     * during DUMP_INCLUDES; don't change its type or remove it without updating
      +     * the other.
      +     */
           apr_pool_userdata_get(&data, "ap_include_sentinel", cmd->pool);
           if (data) {
               recursion = data;
      @@ -2926,6 +3213,24 @@ static const char *include_config (cmd_parms *cmd, void *dummy,
                                  name, NULL);
           }
       
      +    if (ap_exists_config_define("DUMP_INCLUDES")) {
      +        unsigned *line_number;
      +
      +        /* NOTE: ap_include_lineno is used by ap_process_resource_config()
      +         * during DUMP_INCLUDES; don't change its type or remove it without
      +         * updating the other.
      +         */
      +        apr_pool_userdata_get(&data, "ap_include_lineno", cmd->pool);
      +        if (data) {
      +            line_number = data;
      +        } else {
      +            data = line_number = apr_palloc(cmd->pool, sizeof(*line_number));
      +            apr_pool_userdata_setn(data, "ap_include_lineno", NULL, cmd->pool);
      +        }
      +
      +        *line_number = cmd->config_file->line_number;
      +    }
      +
           error = ap_process_fnmatch_configs(cmd->server, conffile, &conftree,
                                              cmd->pool, cmd->temp_pool,
                                              optional);
      @@ -3058,7 +3363,7 @@ enum server_token_type {
           SrvTk_MINIMAL,       /* eg: Apache/2.0.41 */
           SrvTk_OS,            /* eg: Apache/2.0.41 (UNIX) */
           SrvTk_FULL,          /* eg: Apache/2.0.41 (UNIX) PHP/4.2.2 FooBar/1.2b */
      -    SrvTk_PRODUCT_ONLY  /* eg: Apache */
      +    SrvTk_PRODUCT_ONLY   /* eg: Apache */
       };
       static enum server_token_type ap_server_tokens = SrvTk_FULL;
       
      @@ -3149,7 +3454,7 @@ static void set_banner(apr_pool_t *pconf)
       }
       
       static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
      -                                   const char *arg1, const char *arg2)
      +                                   const char *arg)
       {
           const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       
      @@ -3157,24 +3462,27 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy,
               return err;
           }
       
      -    if (!strcasecmp(arg1, "OS")) {
      +    if (!strcasecmp(arg, "OS")) {
               ap_server_tokens = SrvTk_OS;
           }
      -    else if (!strcasecmp(arg1, "Min") || !strcasecmp(arg1, "Minimal")) {
      +    else if (!strcasecmp(arg, "Min") || !strcasecmp(arg, "Minimal")) {
               ap_server_tokens = SrvTk_MINIMAL;
           }
      -    else if (!strcasecmp(arg1, "Major")) {
      +    else if (!strcasecmp(arg, "Major")) {
               ap_server_tokens = SrvTk_MAJOR;
           }
      -    else if (!strcasecmp(arg1, "Minor") ) {
      +    else if (!strcasecmp(arg, "Minor") ) {
               ap_server_tokens = SrvTk_MINOR;
           }
      -    else if (!strcasecmp(arg1, "Prod") || !strcasecmp(arg1, "ProductOnly")) {
      +    else if (!strcasecmp(arg, "Prod") || !strcasecmp(arg, "ProductOnly")) {
               ap_server_tokens = SrvTk_PRODUCT_ONLY;
           }
      -    else {
      +    else if (!strcasecmp(arg, "Full")) {
               ap_server_tokens = SrvTk_FULL;
           }
      +    else {
      +        return "ServerTokens takes 1 argument: 'Prod(uctOnly)', 'Major', 'Minor', 'Min(imal)', 'OS', or 'Full'";
      +    }
       
           return NULL;
       }
      @@ -3347,7 +3655,7 @@ static const char *set_max_reversals(cmd_parms *cmd, void *conf_, const char *ar
           return NULL;
       }
       
      -AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r)
      +AP_DECLARE(apr_size_t) ap_get_limit_xml_body(const request_rec *r)
       {
           core_dir_config *conf;
       
      @@ -3355,14 +3663,14 @@ AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r)
           if (conf->limit_xml_body == AP_LIMIT_UNSET)
               return AP_DEFAULT_LIMIT_XML_BODY;
       
      -    return (size_t)conf->limit_xml_body;
      +    return (apr_size_t)conf->limit_xml_body;
       }
       
       #if !defined (RLIMIT_CPU) || !(defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)) || !defined (RLIMIT_NPROC)
       static const char *no_set_limit(cmd_parms *cmd, void *conf_,
                                       const char *arg, const char *arg2)
       {
      -    ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server,
      +    ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, APLOGNO(00118)
                       "%s not supported on this platform", cmd->cmd->name);
       
           return NULL;
      @@ -3420,7 +3728,7 @@ static const char *set_recursion_limit(cmd_parms *cmd, void *dummy,
               return "The recursion limit must be greater than zero.";
           }
           if (limit < 4) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00119)
                            "Limiting internal redirects to very low numbers may "
                            "cause normal requests to fail.");
           }
      @@ -3434,7 +3742,7 @@ static const char *set_recursion_limit(cmd_parms *cmd, void *dummy,
                   return "The recursion limit must be greater than zero.";
               }
               if (limit < 4) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, APLOGNO(00120)
                                "Limiting the subrequest depth to a very low level may"
                                " cause normal requests to fail.");
               }
      @@ -3449,20 +3757,20 @@ static void log_backtrace(const request_rec *r)
       {
           const request_rec *top = r;
       
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00121)
                         "r->uri = %s", r->uri ? r->uri : "(unexpectedly NULL)");
       
           while (top && (top->prev || top->main)) {
               if (top->prev) {
                   top = top->prev;
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00122)
                                 "redirected from r->uri = %s",
                                 top->uri ? top->uri : "(unexpectedly NULL)");
               }
       
               if (!top->prev && top->main) {
                   top = top->main;
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00123)
                                 "subrequested from r->uri = %s",
                                 top->uri ? top->uri : "(unexpectedly NULL)");
               }
      @@ -3490,7 +3798,7 @@ AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r)
               if (top->prev) {
                   if (++redirects >= rlimit) {
                       /* uuh, too much. */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00124)
                                     "Request exceeded the limit of %d internal "
                                     "redirects due to probable configuration error. "
                                     "Use 'LimitInternalRecursion' to increase the "
      @@ -3510,7 +3818,7 @@ AP_DECLARE(int) ap_is_recursion_limit_exceeded(const request_rec *r)
               if (!top->prev && top->main) {
                   if (++subreqs >= slimit) {
                       /* uuh, too much. */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00125)
                                     "Request exceeded the limit of %d subrequest "
                                     "nesting levels due to probable configuration "
                                     "error. Use 'LimitInternalRecursion' to increase "
      @@ -3554,6 +3862,99 @@ static const char *set_trace_enable(cmd_parms *cmd, void *dummy,
           return NULL;
       }
       
      +static const char *set_protocols(cmd_parms *cmd, void *dummy,
      +                                 const char *arg)
      +{
      +    core_server_config *conf =
      +    ap_get_core_module_config(cmd->server->module_config);
      +    const char **np;
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
      +
      +    if (err) {
      +        return err;
      +    }
      +    
      +    np = (const char **)apr_array_push(conf->protocols);
      +    *np = arg;
      +
      +    return NULL;
      +}
      +
      +static const char *set_protocols_honor_order(cmd_parms *cmd, void *dummy,
      +                                             const char *arg)
      +{
      +    core_server_config *conf =
      +    ap_get_core_module_config(cmd->server->module_config);
      +    const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
      +    
      +    if (err) {
      +        return err;
      +    }
      +    
      +    if (strcasecmp(arg, "on") == 0) {
      +        conf->protocols_honor_order = 1;
      +    }
      +    else if (strcasecmp(arg, "off") == 0) {
      +        conf->protocols_honor_order = 0;
      +    }
      +    else {
      +        return "ProtocolsHonorOrder must be 'on' or 'off'";
      +    }
      +    
      +    return NULL;
      +}
      +
      +static const char *set_http_protocol_options(cmd_parms *cmd, void *dummy,
      +                                             const char *arg)
      +{
      +    core_server_config *conf =
      +        ap_get_core_module_config(cmd->server->module_config);
      +
      +    if (strcasecmp(arg, "allow0.9") == 0)
      +        conf->http09_enable |= AP_HTTP09_ENABLE;
      +    else if (strcasecmp(arg, "require1.0") == 0)
      +        conf->http09_enable |= AP_HTTP09_DISABLE;
      +    else if (strcasecmp(arg, "strict") == 0)
      +        conf->http_conformance |= AP_HTTP_CONFORMANCE_STRICT;
      +    else if (strcasecmp(arg, "unsafe") == 0)
      +        conf->http_conformance |= AP_HTTP_CONFORMANCE_UNSAFE;
      +    else if (strcasecmp(arg, "registeredmethods") == 0)
      +        conf->http_methods |= AP_HTTP_METHODS_REGISTERED;
      +    else if (strcasecmp(arg, "lenientmethods") == 0)
      +        conf->http_methods |= AP_HTTP_METHODS_LENIENT;
      +    else
      +        return "HttpProtocolOptions accepts "
      +               "'Unsafe' or 'Strict' (default), "
      +               "'RegisteredMethods' or 'LenientMethods' (default), and "
      +               "'Require1.0' or 'Allow0.9' (default)";
      +
      +    if ((conf->http09_enable & AP_HTTP09_ENABLE)
      +            && (conf->http09_enable & AP_HTTP09_DISABLE))
      +        return "HttpProtocolOptions 'Allow0.9' and 'Require1.0'"
      +               " are mutually exclusive";
      +
      +    if ((conf->http_conformance & AP_HTTP_CONFORMANCE_STRICT)
      +            && (conf->http_conformance & AP_HTTP_CONFORMANCE_UNSAFE))
      +        return "HttpProtocolOptions 'Strict' and 'Unsafe'"
      +               " are mutually exclusive";
      +
      +    if ((conf->http_methods & AP_HTTP_METHODS_REGISTERED)
      +            && (conf->http_methods & AP_HTTP_METHODS_LENIENT))
      +        return "HttpProtocolOptions 'RegisteredMethods' and 'LenientMethods'"
      +               " are mutually exclusive";
      +
      +    return NULL;
      +}
      +
      +static const char *set_http_method(cmd_parms *cmd, void *conf, const char *arg)
      +{
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +    if (err != NULL)
      +        return err;
      +    ap_method_register(cmd->pool, arg);
      +    return NULL;
      +}
      +
       static apr_hash_t *errorlog_hash;
       
       static int log_constant_item(const ap_errorlog_info *info, const char *arg,
      @@ -3806,6 +4207,16 @@ AP_DECLARE(void) ap_register_errorlog_handler(apr_pool_t *p, char *tag,
       }
       
       
      +static const char *set_merge_trailers(cmd_parms *cmd, void *dummy, int arg)
      +{
      +    core_server_config *conf = ap_get_module_config(cmd->server->module_config,
      +                                                    &core_module);
      +    conf->merge_trailers = (arg ? AP_MERGE_TRAILERS_ENABLE :
      +            AP_MERGE_TRAILERS_DISABLE);
      +
      +    return NULL;
      +}
      +
       /* Note --- ErrorDocument will now work from .htaccess files.
        * The AllowOverride of Fileinfo allows webmasters to turn it off
        */
      @@ -3911,6 +4322,8 @@ AP_INIT_TAKE1("ServerSignature", set_signature_flag, NULL, OR_ALL,
         "En-/disable server signature (on|off|email)"),
       AP_INIT_TAKE1("ServerRoot", set_server_root, NULL, RSRC_CONF | EXEC_ON_READ,
         "Common directory of server-related files (logs, confs, etc.)"),
      +AP_INIT_TAKE1("DefaultRuntimeDir", set_runtime_dir, NULL, RSRC_CONF | EXEC_ON_READ,
      +  "Common directory for run-time files (shared memory, locks, etc.)"),
       AP_INIT_TAKE1("ErrorLog", set_server_string_slot,
         (void *)APR_OFFSETOF(server_rec, error_fname), RSRC_CONF,
         "The filename of the error log"),
      @@ -3944,9 +4357,9 @@ AP_INIT_ITERATE("LogLevel", set_loglevel, NULL, RSRC_CONF|ACCESS_CONF,
         "Level of verbosity in error logging"),
       AP_INIT_TAKE1("NameVirtualHost", ap_set_name_virtual_host, NULL, RSRC_CONF,
         "A numeric IP address:port, or the name of a host"),
      -AP_INIT_TAKE12("ServerTokens", set_serv_tokens, NULL, RSRC_CONF,
      +AP_INIT_TAKE1("ServerTokens", set_serv_tokens, NULL, RSRC_CONF,
         "Determine tokens displayed in the Server: header - Min(imal), "
      -  "Major, Minor, Prod, OS or Full"),
      +  "Major, Minor, Prod(uctOnly), OS, or Full"),
       AP_INIT_TAKE1("LimitRequestLine", set_limit_req_line, NULL, RSRC_CONF,
         "Limit on maximum size of an HTTP request line"),
       AP_INIT_TAKE1("LimitRequestFieldsize", set_limit_req_fieldsize, NULL,
      @@ -4002,11 +4415,19 @@ AP_INIT_TAKE12("RLimitNPROC", no_set_limit, NULL,
       AP_INIT_TAKE12("LimitInternalRecursion", set_recursion_limit, NULL, RSRC_CONF,
                     "maximum recursion depth of internal redirects and subrequests"),
       
      +AP_INIT_FLAG("CGIPassAuth", set_cgi_pass_auth, NULL, OR_AUTHCFG,
      +             "Controls whether HTTP authorization headers, normally hidden, will "
      +             "be passed to scripts"),
      +AP_INIT_TAKE2("CGIVar", set_cgi_var, NULL, OR_FILEINFO,
      +              "Controls how some CGI variables are set"),
      +AP_INIT_FLAG("QualifyRedirectURL", set_qualify_redirect_url, NULL, OR_FILEINFO,
      +             "Controls whether HTTP authorization headers, normally hidden, will "
      +             "be passed to scripts"),
      +
       AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower,
              (void *)APR_OFFSETOF(core_dir_config, mime_type), OR_FILEINFO,
            "a mime type that overrides other configured type"),
      -AP_INIT_TAKE1("SetHandler", ap_set_string_slot_lower,
      -       (void *)APR_OFFSETOF(core_dir_config, handler), OR_FILEINFO,
      +AP_INIT_TAKE1("SetHandler", set_sethandler, NULL, OR_FILEINFO,
          "a handler name that overrides any other configured handler"),
       AP_INIT_TAKE1("SetOutputFilter", ap_set_string_slot,
              (void *)APR_OFFSETOF(core_dir_config, output_filters), OR_FILEINFO,
      @@ -4042,7 +4463,7 @@ AP_INIT_TAKE1("MaxConnectionsPerChild", ap_mpm_set_max_requests, NULL, RSRC_CONF
       AP_INIT_TAKE1("CoreDumpDirectory", ap_mpm_set_coredumpdir, NULL, RSRC_CONF,
                     "The location of the directory Apache changes to before dumping core"),
       AP_INIT_TAKE1("MaxMemFree", ap_mpm_set_max_mem_free, NULL, RSRC_CONF,
      -              "Maximum number of 1k blocks a particular childs allocator may hold."),
      +              "Maximum number of 1k blocks a particular child's allocator may hold."),
       AP_INIT_TAKE1("ThreadStackSize", ap_mpm_set_thread_stacksize, NULL, RSRC_CONF,
                     "Size in bytes of stack used by threads handling client connections"),
       #if AP_ENABLE_EXCEPTION_HOOK
      @@ -4051,6 +4472,19 @@ AP_INIT_TAKE1("EnableExceptionHook", ap_mpm_set_exception_hook, NULL, RSRC_CONF,
       #endif
       AP_INIT_TAKE1("TraceEnable", set_trace_enable, NULL, RSRC_CONF,
                     "'on' (default), 'off' or 'extended' to trace request body content"),
      +AP_INIT_FLAG("MergeTrailers", set_merge_trailers, NULL, RSRC_CONF,
      +              "merge request trailers into request headers or not"),
      +AP_INIT_ITERATE("Protocols", set_protocols, NULL, RSRC_CONF,
      +                "Controls which protocols are allowed"),
      +AP_INIT_TAKE1("ProtocolsHonorOrder", set_protocols_honor_order, NULL, RSRC_CONF,
      +              "'off' (default) or 'on' to respect given order of protocols, "
      +              "by default the client specified order determines selection"),
      +AP_INIT_ITERATE("HttpProtocolOptions", set_http_protocol_options, NULL, RSRC_CONF,
      +                "'Allow0.9' or 'Require1.0' (default); "
      +                "'RegisteredMethods' or 'LenientMethods' (default); "
      +                "'Unsafe' or 'Strict' (default). Sets HTTP acceptance rules"),
      +AP_INIT_ITERATE("RegisterHttpMethod", set_http_method, NULL, RSRC_CONF,
      +                "Registers non-standard HTTP methods"),
       { NULL }
       };
       
      @@ -4062,6 +4496,7 @@ AP_INIT_TAKE1("TraceEnable", set_trace_enable, NULL, RSRC_CONF,
       AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
       {
           apr_status_t rv;
      +    char *path;
       
           /* XXX this seems too specific, this should probably become
            * some general-case test
      @@ -4070,7 +4505,7 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
               return HTTP_FORBIDDEN;
           }
           if (!r->uri || ((r->uri[0] != '/') && strcmp(r->uri, "*"))) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00126)
                            "Invalid URI in request %s", r->the_request);
               return HTTP_BAD_REQUEST;
           }
      @@ -4081,46 +4516,31 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
                   || r->uri[r->server->pathlen] == '/'
                   || r->uri[r->server->pathlen] == '\0'))
           {
      -        /* skip all leading /'s (e.g. http://localhost///foo)
      -         * so we are looking at only the relative path.
      -         */
      -        char *path = r->uri + r->server->pathlen;
      -        while (*path == '/') {
      -            ++path;
      -        }
      -        if ((rv = apr_filepath_merge(&r->filename, ap_document_root(r), path,
      -                                     APR_FILEPATH_TRUENAME
      -                                   | APR_FILEPATH_SECUREROOT, r->pool))
      -                    != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                         "Cannot map %s to file", r->the_request);
      -            return HTTP_FORBIDDEN;
      -        }
      -        r->canonical_filename = r->filename;
      +        path = r->uri + r->server->pathlen;
           }
           else {
      -        /*
      -         * Make sure that we do not mess up the translation by adding two
      -         * /'s in a row.  This happens under windows when the document
      -         * root ends with a /
      -         */
      -        /* skip all leading /'s (e.g. http://localhost///foo)
      -         * so we are looking at only the relative path.
      -         */
      -        char *path = r->uri;
      -        while (*path == '/') {
      -            ++path;
      -        }
      -        if ((rv = apr_filepath_merge(&r->filename, ap_document_root(r), path,
      -                                     APR_FILEPATH_TRUENAME
      -                                   | APR_FILEPATH_SECUREROOT, r->pool))
      -                    != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                         "Cannot map %s to file", r->the_request);
      -            return HTTP_FORBIDDEN;
      -        }
      -        r->canonical_filename = r->filename;
      +        path = r->uri;
           }
      +    /*
      +     * Make sure that we do not mess up the translation by adding two
      +     * /'s in a row.  This happens under windows when the document
      +     * root ends with a /
      +     */
      +    /* skip all leading /'s (e.g. http://localhost///foo)
      +     * so we are looking at only the relative path.
      +     */
      +    while (*path == '/') {
      +        ++path;
      +    }
      +    if ((rv = apr_filepath_merge(&r->filename, ap_document_root(r), path,
      +                                 APR_FILEPATH_TRUENAME
      +                               | APR_FILEPATH_SECUREROOT, r->pool))
      +                != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00127)
      +                     "Cannot map %s to file", r->the_request);
      +        return HTTP_FORBIDDEN;
      +    }
      +    r->canonical_filename = r->filename;
       
           return OK;
       }
      @@ -4147,7 +4567,6 @@ static int core_map_to_storage(request_rec *r)
       
       static int do_nothing(request_rec *r) { return OK; }
       
      -
       static int core_override_type(request_rec *r)
       {
           core_dir_config *conf =
      @@ -4158,8 +4577,30 @@ static int core_override_type(request_rec *r)
           if (conf->mime_type && strcmp(conf->mime_type, "none"))
               ap_set_content_type(r, (char*) conf->mime_type);
       
      -    if (conf->handler && strcmp(conf->handler, "none"))
      +    if (conf->expr_handler) { 
      +        const char *err;
      +        const char *val;
      +        val = ap_expr_str_exec(r, conf->expr_handler, &err);
      +        if (err) {
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(03154)
      +                          "Can't evaluate handler expression: %s", err);
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +
      +        if (val != ap_strstr_c(val, "proxy:unix")) { 
      +            /* Retained for compatibility --  but not for UDS */
      +            char *tmp = apr_pstrdup(r->pool, val);
      +            ap_str_tolower(tmp);
      +            val = tmp;
      +        }
      +
      +        if (strcmp(val, "none")) { 
      +            r->handler = val;
      +        }
      +    }
      +    else if (conf->handler && strcmp(conf->handler, "none")) { 
               r->handler = conf->handler;
      +    }
       
           /* Deal with the poor soul who is trying to force path_info to be
            * accepted within the core_handler, where they will let the subreq
      @@ -4216,8 +4657,9 @@ static int default_handler(request_rec *r)
       
           if (r->method_number == M_GET || r->method_number == M_POST) {
               if (r->finfo.filetype == APR_NOFILE) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                          "File does not exist: %s", r->filename);
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00128)
      +                          "File does not exist: %s",
      +                          apr_pstrcat(r->pool, r->filename, r->path_info, NULL));
                   return HTTP_NOT_FOUND;
               }
       
      @@ -4225,7 +4667,7 @@ static int default_handler(request_rec *r)
                * raw I/O on a dir.
                */
               if (r->finfo.filetype == APR_DIR) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00129)
                                 "Attempt to serve directory: %s", r->filename);
                   return HTTP_NOT_FOUND;
               }
      @@ -4234,7 +4676,7 @@ static int default_handler(request_rec *r)
                   r->path_info && *r->path_info)
               {
                   /* default to reject */
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00130)
                                 "File does not exist: %s",
                                 apr_pstrcat(r->pool, r->filename, r->path_info, NULL));
                   return HTTP_NOT_FOUND;
      @@ -4254,7 +4696,7 @@ static int default_handler(request_rec *r)
                   req_cfg = ap_get_core_module_config(r->request_config);
                   if (!req_cfg->deliver_script) {
                       /* The flag hasn't been set for this request. Punt. */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00131)
                                     "This resource does not accept the %s method.",
                                     r->method);
                       return HTTP_METHOD_NOT_ALLOWED;
      @@ -4267,7 +4709,7 @@ static int default_handler(request_rec *r)
                                   | AP_SENDFILE_ENABLED(d->enable_sendfile)
       #endif
                                           , 0, r->pool)) != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, status, r, APLOGNO(00132)
                                 "file permissions deny server access: %s", r->filename);
                   return HTTP_FORBIDDEN;
               }
      @@ -4309,10 +4751,10 @@ static int default_handler(request_rec *r)
               }
               else {
                   /* no way to know what type of error occurred */
      -            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, r, APLOGNO(00133)
                                 "default_handler: ap_pass_brigade returned %i",
                                 status);
      -            return HTTP_INTERNAL_SERVER_ERROR;
      +            return AP_FILTER_ERROR;
               }
           }
           else {              /* unusual method (not GET or POST) */
      @@ -4324,10 +4766,10 @@ static int default_handler(request_rec *r)
                   if (r->the_request
                       && r->the_request[0] == 0x16
                       && (r->the_request[1] == 0x2 || r->the_request[1] == 0x3)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00134)
                                     "Invalid method in request %s - possible attempt to establish SSL connection on non-SSL port", r->the_request);
                   } else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00135)
                                     "Invalid method in request %s", r->the_request);
                   }
                   return HTTP_NOT_IMPLEMENTED;
      @@ -4356,6 +4798,45 @@ AP_DECLARE(int) ap_sys_privileges_handlers(int inc)
           return sys_privileges;
       }
       
      +static int check_errorlog_dir(apr_pool_t *p, server_rec *s)
      +{
      +    if (!s->error_fname || s->error_fname[0] == '|'
      +        || strcmp(s->error_fname, "syslog") == 0) {
      +        return APR_SUCCESS;
      +    }
      +    else {
      +        char *abs = ap_server_root_relative(p, s->error_fname);
      +        char *dir = ap_make_dirstr_parent(p, abs);
      +        apr_finfo_t finfo;
      +        apr_status_t rv = apr_stat(&finfo, dir, APR_FINFO_TYPE, p);
      +        if (rv == APR_SUCCESS && finfo.filetype != APR_DIR)
      +            rv = APR_ENOTDIR;
      +        if (rv != APR_SUCCESS) {
      +            const char *desc = "main error log";
      +            if (s->defn_name)
      +                desc = apr_psprintf(p, "error log of vhost defined at %s:%d",
      +                                    s->defn_name, s->defn_line_number);
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, rv,
      +                          ap_server_conf, APLOGNO(02291)
      +                         "Cannot access directory '%s' for %s", dir, desc);
      +            return !OK;
      +        }
      +    }
      +    return OK;
      +}
      +
      +static int core_check_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
      +{
      +    int rv = OK;
      +    while (s) {
      +        if (check_errorlog_dir(ptemp, s) != OK)
      +            rv = !OK;
      +        s = s->next;
      +    }
      +    return rv;
      +}
      +
      +
       static int core_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
       {
           ap_mutex_init(pconf);
      @@ -4383,7 +4864,7 @@ static int core_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pte
           ap_setup_make_content_type(pconf);
           ap_setup_auth_internal(ptemp);
           if (!sys_privileges) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(00136)
                            "Server MUST relinquish startup privileges before "
                            "accepting connections.  Please ensure mod_unixd "
                            "or other system security module is loaded.");
      @@ -4493,7 +4974,7 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
           conn_rec *c = (conn_rec *) apr_pcalloc(ptrans, sizeof(conn_rec));
       
           c->sbh = sbh;
      -    (void)ap_update_child_status(c->sbh, SERVER_BUSY_READ, (request_rec *)NULL);
      +    ap_update_child_status(c->sbh, SERVER_BUSY_READ, NULL);
       
           /* Got a connection structure, so initialize what fields we can
            * (the rest are zeroed out by pcalloc).
      @@ -4504,34 +4985,27 @@ static conn_rec *core_create_conn(apr_pool_t *ptrans, server_rec *server,
           c->pool = ptrans;
           if ((rv = apr_socket_addr_get(&c->local_addr, APR_LOCAL, csd))
               != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server, APLOGNO(00137)
                            "apr_socket_addr_get(APR_LOCAL)");
               apr_socket_close(csd);
               return NULL;
           }
       
           apr_sockaddr_ip_get(&c->local_ip, c->local_addr);
      -    if ((rv = apr_socket_addr_get(&c->remote_addr, APR_REMOTE, csd))
      +    if ((rv = apr_socket_addr_get(&c->client_addr, APR_REMOTE, csd))
               != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, rv, server, APLOGNO(00138)
                            "apr_socket_addr_get(APR_REMOTE)");
               apr_socket_close(csd);
               return NULL;
           }
       
      -    apr_sockaddr_ip_get(&c->remote_ip, c->remote_addr);
      +    apr_sockaddr_ip_get(&c->client_ip, c->client_addr);
           c->base_server = server;
       
           c->id = id;
           c->bucket_alloc = alloc;
       
      -    c->cs = (conn_state_t *)apr_pcalloc(ptrans, sizeof(conn_state_t));
      -    APR_RING_INIT(&(c->cs->timeout_list), conn_state_t, timeout_list);
      -    c->cs->expiration_time = 0;
      -    c->cs->state = CONN_STATE_CHECK_REQUEST_LINE_READABLE;
      -    c->cs->c = c;
      -    c->cs->p = ptrans;
      -    c->cs->bucket_alloc = alloc;
           c->clogging_input_filters = 0;
       
           return c;
      @@ -4554,7 +5028,7 @@ static int core_pre_connection(conn_rec *c, void *csd)
               /* expected cause is that the client disconnected already,
                * hence the debug level
                */
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(00139)
                             "apr_socket_opt_set(APR_TCP_NODELAY)");
           }
       
      @@ -4567,7 +5041,7 @@ static int core_pre_connection(conn_rec *c, void *csd)
           rv = apr_socket_timeout_set(csd, c->base_server->timeout);
           if (rv != APR_SUCCESS) {
               /* expected cause is that the client disconnected already */
      -        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(00140)
                             "apr_socket_timeout_set");
           }
       
      @@ -4619,6 +5093,11 @@ static void core_child_init(apr_pool_t *pchild, server_rec *s)
           apr_random_after_fork(&proc);
       }
       
      +static void core_optional_fn_retrieve(void)
      +{
      +    ap_init_scoreboard(NULL);
      +}
      +
       AP_CORE_DECLARE(void) ap_random_parent_after_fork(void)
       {
           /*
      @@ -4649,7 +5128,7 @@ AP_CORE_DECLARE(void) ap_init_rng(apr_pool_t *p)
           if (rv == APR_SUCCESS)
               return;
       error:
      -    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00141)
                        "Could not initialize random number generator");
           exit(1);
       }
      @@ -4687,24 +5166,44 @@ AP_DECLARE(void) ap_random_insecure_bytes(void *buf, apr_size_t size)
       AP_DECLARE(apr_uint32_t) ap_random_pick(apr_uint32_t min, apr_uint32_t max)
       {
           apr_uint32_t number;
      +#if (!__GNUC__ || __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) || \
      +     !__sparc__ || APR_SIZEOF_VOIDP != 8)
      +    /* This triggers a gcc bug on sparc/64bit with gcc < 4.8, PR 52900 */
           if (max < 16384) {
               apr_uint16_t num16;
               ap_random_insecure_bytes(&num16, sizeof(num16));
               RAND_RANGE(num16, min, max, APR_UINT16_MAX);
               number = num16;
           }
      -    else {
      +    else
      +#endif
      +    {
               ap_random_insecure_bytes(&number, sizeof(number));
               RAND_RANGE(number, min, max, APR_UINT32_MAX);
           }
           return number;
       }
       
      +static apr_status_t core_insert_network_bucket(conn_rec *c,
      +                                               apr_bucket_brigade *bb,
      +                                               apr_socket_t *socket)
      +{
      +    apr_bucket *e = apr_bucket_socket_create(socket, c->bucket_alloc);
      +    APR_BRIGADE_INSERT_TAIL(bb, e);
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t core_dirwalk_stat(apr_finfo_t *finfo, request_rec *r,
      +                                      apr_int32_t wanted) 
      +{
      +    return apr_stat(finfo, r->filename, wanted, r->pool);
      +}
      +
       static void core_dump_config(apr_pool_t *p, server_rec *s)
       {
           core_server_config *sconf = ap_get_core_module_config(s->module_config);
           apr_file_t *out = NULL;
      -    char *tmp;
      +    const char *tmp;
           const char **defines;
           int i;
           if (!ap_exists_config_define("DUMP_RUN_CFG"))
      @@ -4714,7 +5213,10 @@ static void core_dump_config(apr_pool_t *p, server_rec *s)
           apr_file_printf(out, "ServerRoot: \"%s\"\n", ap_server_root);
           tmp = ap_server_root_relative(p, sconf->ap_document_root);
           apr_file_printf(out, "Main DocumentRoot: \"%s\"\n", tmp);
      -    tmp = ap_server_root_relative(p, s->error_fname);
      +    if (s->error_fname[0] != '|' && strcmp(s->error_fname, "syslog") != 0)
      +        tmp = ap_server_root_relative(p, s->error_fname);
      +    else
      +        tmp = s->error_fname;
           apr_file_printf(out, "Main ErrorLog: \"%s\"\n", tmp);
           if (ap_scoreboard_fname) {
               tmp = ap_server_root_relative(p, ap_scoreboard_fname);
      @@ -4734,7 +5236,80 @@ static void core_dump_config(apr_pool_t *p, server_rec *s)
               else
                   apr_file_printf(out, "Define: %s\n", name);
           }
      +}
      +
      +static int core_upgrade_handler(request_rec *r)
      +{
      +    conn_rec *c = r->connection;
      +    const char *upgrade;
      +
      +    if (c->master) {
      +        /* Not possible to perform an HTTP/1.1 upgrade from a slave
      +         * connection. */
      +        return DECLINED;
      +    }
      +    
      +    upgrade = apr_table_get(r->headers_in, "Upgrade");
      +    if (upgrade && *upgrade) {
      +        const char *conn = apr_table_get(r->headers_in, "Connection");
      +        if (ap_find_token(r->pool, conn, "upgrade")) {
      +            apr_array_header_t *offers = NULL;
      +            const char *err;
      +            
      +            err = ap_parse_token_list_strict(r->pool, upgrade, &offers, 0);
      +            if (err) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02910)
      +                              "parsing Upgrade header: %s", err);
      +                return DECLINED;
      +            }
      +            
      +            if (offers && offers->nelts > 0) {
      +                const char *protocol = ap_select_protocol(c, r, NULL, offers);
      +                if (protocol && strcmp(protocol, ap_get_protocol(c))) {
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02909)
      +                                  "Upgrade selects '%s'", protocol);
      +                    /* Let the client know what we are upgrading to. */
      +                    apr_table_clear(r->headers_out);
      +                    apr_table_setn(r->headers_out, "Upgrade", protocol);
      +                    apr_table_setn(r->headers_out, "Connection", "Upgrade");
      +                    
      +                    r->status = HTTP_SWITCHING_PROTOCOLS;
      +                    r->status_line = ap_get_status_line(r->status);
      +                    ap_send_interim_response(r, 1);
      +
      +                    ap_switch_protocol(c, r, r->server, protocol);
      +
      +                    /* make sure httpd closes the connection after this */
      +                    c->keepalive = AP_CONN_CLOSE;
      +                    return DONE;
      +                }
      +            }
      +        }
      +    }
      +    else if (!c->keepalives) {
      +        /* first request on a master connection, if we have protocols other
      +         * than the current one enabled here, announce them to the
      +         * client. If the client is already talking a protocol with requests
      +         * on slave connections, leave it be. */
      +        const apr_array_header_t *upgrades;
      +        ap_get_protocol_upgrades(c, r, NULL, 0, &upgrades);
      +        if (upgrades && upgrades->nelts > 0) {
      +            char *protocols = apr_array_pstrcat(r->pool, upgrades, ',');
      +            apr_table_setn(r->headers_out, "Upgrade", protocols);
      +            apr_table_setn(r->headers_out, "Connection", "Upgrade");
      +        }
      +    }
      +    
      +    return DECLINED;
      +}
       
      +static int core_upgrade_storage(request_rec *r)
      +{
      +    if ((r->method_number == M_OPTIONS) && r->uri && (r->uri[0] == '*') &&
      +        (r->uri[1] == '\0')) {
      +        return core_upgrade_handler(r);
      +    }
      +    return DECLINED;
       }
       
       static void register_hooks(apr_pool_t *p)
      @@ -4756,12 +5331,15 @@ static void register_hooks(apr_pool_t *p)
       
           ap_hook_pre_config(core_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
           ap_hook_post_config(core_post_config,NULL,NULL,APR_HOOK_REALLY_FIRST);
      +    ap_hook_check_config(core_check_config,NULL,NULL,APR_HOOK_FIRST);
           ap_hook_test_config(core_dump_config,NULL,NULL,APR_HOOK_FIRST);
           ap_hook_translate_name(ap_core_translate,NULL,NULL,APR_HOOK_REALLY_LAST);
      +    ap_hook_map_to_storage(core_upgrade_storage,NULL,NULL,APR_HOOK_REALLY_FIRST);
           ap_hook_map_to_storage(core_map_to_storage,NULL,NULL,APR_HOOK_REALLY_LAST);
           ap_hook_open_logs(ap_open_logs,NULL,NULL,APR_HOOK_REALLY_FIRST);
           ap_hook_child_init(core_child_init,NULL,NULL,APR_HOOK_REALLY_FIRST);
           ap_hook_child_init(ap_logs_child_init,NULL,NULL,APR_HOOK_MIDDLE);
      +    ap_hook_handler(core_upgrade_handler,NULL,NULL,APR_HOOK_REALLY_FIRST);
           ap_hook_handler(default_handler,NULL,NULL,APR_HOOK_REALLY_LAST);
           /* FIXME: I suspect we can eliminate the need for these do_nothings - Ben */
           ap_hook_type_checker(do_nothing,NULL,NULL,APR_HOOK_REALLY_LAST);
      @@ -4771,7 +5349,13 @@ static void register_hooks(apr_pool_t *p)
                             APR_HOOK_MIDDLE);
           ap_hook_pre_mpm(ap_create_scoreboard, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_child_status(ap_core_child_status, NULL, NULL, APR_HOOK_MIDDLE);
      -
      +    ap_hook_insert_network_bucket(core_insert_network_bucket, NULL, NULL,
      +                                  APR_HOOK_REALLY_LAST);
      +    ap_hook_dirwalk_stat(core_dirwalk_stat, NULL, NULL, APR_HOOK_REALLY_LAST);
      +    ap_hook_open_htaccess(ap_open_htaccess, NULL, NULL, APR_HOOK_REALLY_LAST);
      +    ap_hook_optional_fn_retrieve(core_optional_fn_retrieve, NULL, NULL,
      +                                 APR_HOOK_MIDDLE);
      +    
           /* register the core's insert_filter hook and register core-provided
            * filters
            */
      diff --git a/server/core_filters.c b/server/core_filters.c
      index 24f1f1f38f0..ddc2ff7f0fc 100644
      --- a/server/core_filters.c
      +++ b/server/core_filters.c
      @@ -48,7 +48,6 @@
       #include "mpm_common.h"
       #include "scoreboard.h"
       #include "mod_core.h"
      -#include "mod_proxy.h"
       #include "ap_listen.h"
       
       #include "mod_so.h" /* for ap_find_loaded_module_symbol */
      @@ -78,11 +77,23 @@ do { \
       #undef APLOG_MODULE_INDEX
       #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
       
      -int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
      -                         ap_input_mode_t mode, apr_read_type_e block,
      -                         apr_off_t readbytes)
      +struct core_output_filter_ctx {
      +    apr_bucket_brigade *buffered_bb;
      +    apr_bucket_brigade *tmp_flush_bb;
      +    apr_pool_t *deferred_write_pool;
      +    apr_size_t bytes_written;
      +};
      +
      +struct core_filter_ctx {
      +    apr_bucket_brigade *b;
      +    apr_bucket_brigade *tmpbb;
      +};
      +
      +
      +apr_status_t ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
      +                                  ap_input_mode_t mode, apr_read_type_e block,
      +                                  apr_off_t readbytes)
       {
      -    apr_bucket *e;
           apr_status_t rv;
           core_net_rec *net = f->ctx;
           core_ctx_t *ctx = net->in_ctx;
      @@ -105,13 +116,13 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
       
           if (!ctx)
           {
      -        ctx = apr_pcalloc(f->c->pool, sizeof(*ctx));
      +        net->in_ctx = ctx = apr_palloc(f->c->pool, sizeof(*ctx));
               ctx->b = apr_brigade_create(f->c->pool, f->c->bucket_alloc);
      -        ctx->tmpbb = apr_brigade_create(ctx->b->p, ctx->b->bucket_alloc);
      +        ctx->tmpbb = apr_brigade_create(f->c->pool, f->c->bucket_alloc);
               /* seed the brigade with the client socket. */
      -        e = apr_bucket_socket_create(net->client_socket, f->c->bucket_alloc);
      -        APR_BRIGADE_INSERT_TAIL(ctx->b, e);
      -        net->in_ctx = ctx;
      +        rv = ap_run_insert_network_bucket(f->c, ctx->b, net->client_socket);
      +        if (rv != APR_SUCCESS)
      +            return rv;
           }
           else if (APR_BRIGADE_EMPTY(ctx->b)) {
               return APR_EOF;
      @@ -137,7 +148,7 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
                * empty).  We do this by returning whatever we have read.  This may
                * or may not be bogus, but is consistent (for now) with EOF logic.
                */
      -        if (APR_STATUS_IS_EAGAIN(rv)) {
      +        if (APR_STATUS_IS_EAGAIN(rv) && block == APR_NONBLOCK_READ) {
                   rv = APR_SUCCESS;
               }
               return rv;
      @@ -223,7 +234,9 @@ int ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b,
               e = APR_BRIGADE_FIRST(ctx->b);
               rv = apr_bucket_read(e, &str, &len, block);
       
      -        if (APR_STATUS_IS_EAGAIN(rv)) {
      +        if (APR_STATUS_IS_EAGAIN(rv) && block == APR_NONBLOCK_READ) {
      +            /* getting EAGAIN for a blocking read is an error; for a
      +             * non-blocking read, return an empty brigade. */
                   return APR_SUCCESS;
               }
               else if (rv != APR_SUCCESS) {
      @@ -363,7 +376,7 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
           apr_bucket_brigade *bb = NULL;
           apr_bucket *bucket, *next, *flush_upto = NULL;
           apr_size_t bytes_in_brigade, non_file_bytes_in_brigade;
      -    int eor_buckets_in_brigade;
      +    int eor_buckets_in_brigade, morphing_bucket_in_brigade;
           apr_status_t rv;
       
           /* Fail quickly if the connection has already been aborted. */
      @@ -377,10 +390,6 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
           if (ctx == NULL) {
               ctx = apr_pcalloc(c->pool, sizeof(*ctx));
               net->out_ctx = (core_output_filter_ctx_t *)ctx;
      -        rv = apr_socket_opt_set(net->client_socket, APR_SO_NONBLOCK, 1);
      -        if (rv != APR_SUCCESS) {
      -            return rv;
      -        }
               /*
                * Need to create tmp brigade with correct lifetime. Passing
                * NULL to apr_brigade_split_ex would result in a brigade
      @@ -391,14 +400,8 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
               ctx->buffered_bb = apr_brigade_create(c->pool, c->bucket_alloc);
           }
       
      -    if (new_bb != NULL) {
      -        for (bucket = APR_BRIGADE_FIRST(new_bb); bucket != APR_BRIGADE_SENTINEL(new_bb); bucket = APR_BUCKET_NEXT(bucket)) {
      -            if (bucket->length > 0) {
      -                ctx->bytes_in += bucket->length;
      -            }
      -        }
      +    if (new_bb != NULL)
               bb = new_bb;
      -    }
       
           if ((ctx->buffered_bb != NULL) &&
               !APR_BRIGADE_EMPTY(ctx->buffered_bb)) {
      @@ -415,7 +418,7 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
           }
       
           /* Scan through the brigade and decide whether to attempt a write,
      -     * based on the following rules:
      +     * and how much to write, based on the following rules:
            *
            *  1) The new_bb is null: Do a nonblocking write of as much as
            *     possible: do a nonblocking write of as much data as possible,
      @@ -424,10 +427,13 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
            *     completion and has just determined that this connection
            *     is writable.)
            *
      -     *  2) The brigade contains a flush bucket: Do a blocking write
      +     *  2) Determine if and up to which bucket we need to do a blocking
      +     *     write:
      +     *
      +     *  a) The brigade contains a flush bucket: Do a blocking write
            *     of everything up that point.
            *
      -     *  3) The request is in CONN_STATE_HANDLER state, and the brigade
      +     *  b) The request is in CONN_STATE_HANDLER state, and the brigade
            *     contains at least THRESHOLD_MAX_BUFFER bytes in non-file
            *     buckets: Do blocking writes until the amount of data in the
            *     buffer is less than THRESHOLD_MAX_BUFFER.  (The point of this
      @@ -435,14 +441,25 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
            *     streaming out lots of data faster than the data can be
            *     sent to the client.)
            *
      -     *  4) The request is in CONN_STATE_HANDLER state, and the brigade
      +     *  c) The request is in CONN_STATE_HANDLER state, and the brigade
            *     contains at least MAX_REQUESTS_IN_PIPELINE EOR buckets:
            *     Do blocking writes until less than MAX_REQUESTS_IN_PIPELINE EOR
            *     buckets are left. (The point of this rule is to prevent too many
            *     FDs being kept open by pipelined requests, possibly allowing a
            *     DoS).
            *
      -     *  5) The brigade contains at least THRESHOLD_MIN_WRITE
      +     *  d) The brigade contains a morphing bucket: If there was no other
      +     *     reason to do a blocking write yet, try reading the bucket. If its
      +     *     contents fit into memory before THRESHOLD_MAX_BUFFER is reached,
      +     *     everything is fine. Otherwise we need to do a blocking write the
      +     *     up to and including the morphing bucket, because ap_save_brigade()
      +     *     would read the whole bucket into memory later on.
      +     *
      +     *  3) Actually do the blocking write up to the last bucket determined
      +     *     by rules 2a-d. The point of doing only one flush is to make as
      +     *     few calls to writev() as possible.
      +     *
      +     *  4) If the brigade contains at least THRESHOLD_MIN_WRITE
            *     bytes: Do a nonblocking write of as much data as possible,
            *     then save the rest in ctx->buffered_bb.
            */
      @@ -450,54 +467,58 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
           if (new_bb == NULL) {
               rv = send_brigade_nonblocking(net->client_socket, bb,
                                             &(ctx->bytes_written), c);
      -        if (APR_STATUS_IS_EAGAIN(rv)) {
      -            rv = APR_SUCCESS;
      -        }
      -        else if (rv != APR_SUCCESS) {
      +        if (rv != APR_SUCCESS && !APR_STATUS_IS_EAGAIN(rv)) {
                   /* The client has aborted the connection */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, rv, c,
      +                          "core_output_filter: writing data to the network");
      +            apr_brigade_cleanup(bb);
                   c->aborted = 1;
      +            return rv;
               }
               setaside_remaining_output(f, ctx, bb, c);
      -        return rv;
      +        return APR_SUCCESS;
           }
       
           bytes_in_brigade = 0;
           non_file_bytes_in_brigade = 0;
           eor_buckets_in_brigade = 0;
      +    morphing_bucket_in_brigade = 0;
      +
           for (bucket = APR_BRIGADE_FIRST(bb); bucket != APR_BRIGADE_SENTINEL(bb);
                bucket = next) {
               next = APR_BUCKET_NEXT(bucket);
       
               if (!APR_BUCKET_IS_METADATA(bucket)) {
                   if (bucket->length == (apr_size_t)-1) {
      -                const char *data;
      -                apr_size_t length;
      -                /* XXX support nonblocking read here? */
      -                rv = apr_bucket_read(bucket, &data, &length, APR_BLOCK_READ);
      -                if (rv != APR_SUCCESS) {
      -                    return rv;
      -                }
      -                /* reading may have split the bucket, so recompute next: */
      -                next = APR_BUCKET_NEXT(bucket);
      +                /*
      +                 * A setaside of morphing buckets would read everything into
      +                 * memory. Instead, we will flush everything up to and
      +                 * including this bucket.
      +                 */
      +                morphing_bucket_in_brigade = 1;
                   }
      -            bytes_in_brigade += bucket->length;
      -            if (!APR_BUCKET_IS_FILE(bucket)) {
      -                non_file_bytes_in_brigade += bucket->length;
      +            else {
      +                bytes_in_brigade += bucket->length;
      +                if (!APR_BUCKET_IS_FILE(bucket))
      +                    non_file_bytes_in_brigade += bucket->length;
                   }
               }
               else if (AP_BUCKET_IS_EOR(bucket)) {
                   eor_buckets_in_brigade++;
               }
       
      -        if (APR_BUCKET_IS_FLUSH(bucket)                         ||
      -            (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER) ||
      -            (eor_buckets_in_brigade > MAX_REQUESTS_IN_PIPELINE) )
      -        {
      +        if (APR_BUCKET_IS_FLUSH(bucket)
      +            || non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER
      +            || morphing_bucket_in_brigade
      +            || eor_buckets_in_brigade > MAX_REQUESTS_IN_PIPELINE) {
      +            /* this segment of the brigade MUST be sent before returning. */
      +
                   if (APLOGctrace6(c)) {
                       char *reason = APR_BUCKET_IS_FLUSH(bucket) ?
                                      "FLUSH bucket" :
                                      (non_file_bytes_in_brigade >= THRESHOLD_MAX_BUFFER) ?
                                      "THRESHOLD_MAX_BUFFER" :
      +                               morphing_bucket_in_brigade ? "morphing bucket" :
                                      "MAX_REQUESTS_IN_PIPELINE";
                       ap_log_cerror(APLOG_MARK, APLOG_TRACE6, 0, c,
                                     "core_output_filter: flushing because of %s",
      @@ -511,6 +532,7 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
                   bytes_in_brigade = 0;
                   non_file_bytes_in_brigade = 0;
                   eor_buckets_in_brigade = 0;
      +            morphing_bucket_in_brigade = 0;
               }
           }
       
      @@ -521,6 +543,9 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
                                          &(ctx->bytes_written), c);
               if (rv != APR_SUCCESS) {
                   /* The client has aborted the connection */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, rv, c,
      +                          "core_output_filter: writing data to the network");
      +            apr_brigade_cleanup(bb);
                   c->aborted = 1;
                   return rv;
               }
      @@ -532,6 +557,9 @@ apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *new_bb)
                                             &(ctx->bytes_written), c);
               if ((rv != APR_SUCCESS) && (!APR_STATUS_IS_EAGAIN(rv))) {
                   /* The client has aborted the connection */
      +            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, rv, c,
      +                          "core_output_filter: writing data to the network");
      +            apr_brigade_cleanup(bb);
                   c->aborted = 1;
                   return rv;
               }
      @@ -563,7 +591,6 @@ static void setaside_remaining_output(ap_filter_t *f,
                   }
                   ap_save_brigade(f, &(ctx->buffered_bb), &bb,
                                   ctx->deferred_write_pool);
      -            apr_brigade_cleanup(bb);
               }
           }
           else if (ctx->deferred_write_pool) {
      @@ -616,7 +643,6 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s,
                       if (nvec > 0) {
                           (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 1);
                           rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c);
      -                    nvec = 0;
                           if (rv != APR_SUCCESS) {
                               (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0);
                               return rv;
      @@ -625,6 +651,7 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s,
                       rv = sendfile_nonblocking(s, bucket, bytes_written, c);
                       if (nvec > 0) {
                           (void)apr_socket_opt_set(s, APR_TCP_NOPUSH, 0);
      +                    nvec = 0;
                       }
                       if (rv != APR_SUCCESS) {
                           return rv;
      @@ -637,10 +664,26 @@ static apr_status_t send_brigade_nonblocking(apr_socket_t *s,
               if (!APR_BUCKET_IS_METADATA(bucket)) {
                   const char *data;
                   apr_size_t length;
      -            rv = apr_bucket_read(bucket, &data, &length, APR_BLOCK_READ);
      +            
      +            /* Non-blocking read first, in case this is a morphing
      +             * bucket type. */
      +            rv = apr_bucket_read(bucket, &data, &length, APR_NONBLOCK_READ);
      +            if (APR_STATUS_IS_EAGAIN(rv)) {
      +                /* Read would block; flush any pending data and retry. */
      +                if (nvec) {
      +                    rv = writev_nonblocking(s, vec, nvec, bb, bytes_written, c);
      +                    if (rv) {
      +                        return rv;
      +                    }
      +                    nvec = 0;
      +                }
      +                
      +                rv = apr_bucket_read(bucket, &data, &length, APR_BLOCK_READ);
      +            }
                   if (rv != APR_SUCCESS) {
                       return rv;
                   }
      +
                   /* reading may have split the bucket, so recompute next: */
                   next = APR_BUCKET_NEXT(bucket);
                   vec[nvec].iov_base = (char *)data;
      @@ -674,8 +717,7 @@ static void remove_empty_buckets(apr_bucket_brigade *bb)
           apr_bucket *bucket;
           while (((bucket = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) &&
                  (APR_BUCKET_IS_METADATA(bucket) || (bucket->length == 0))) {
      -        APR_BUCKET_REMOVE(bucket);
      -        apr_bucket_destroy(bucket);
      +        apr_bucket_delete(bucket);
           }
       }
       
      @@ -701,7 +743,9 @@ static apr_status_t send_brigade_blocking(apr_socket_t *s,
                       pollset.reqevents = APR_POLLOUT;
                       pollset.desc.s = s;
                       apr_socket_timeout_get(s, &timeout);
      -                rv = apr_poll(&pollset, 1, &nsds, timeout);
      +                do {
      +                    rv = apr_poll(&pollset, 1, &nsds, timeout);
      +                } while (APR_STATUS_IS_EINTR(rv));
                       if (rv != APR_SUCCESS) {
                           break;
                       }
      @@ -746,19 +790,16 @@ static apr_status_t writev_nonblocking(apr_socket_t *s,
                   for (i = offset; i < nvec; ) {
                       apr_bucket *bucket = APR_BRIGADE_FIRST(bb);
                       if (APR_BUCKET_IS_METADATA(bucket)) {
      -                    APR_BUCKET_REMOVE(bucket);
      -                    apr_bucket_destroy(bucket);
      +                    apr_bucket_delete(bucket);
                       }
                       else if (n >= vec[i].iov_len) {
      -                    APR_BUCKET_REMOVE(bucket);
      -                    apr_bucket_destroy(bucket);
      +                    apr_bucket_delete(bucket);
                           offset++;
                           n -= vec[i++].iov_len;
                       }
                       else {
                           apr_bucket_split(bucket, n);
      -                    APR_BUCKET_REMOVE(bucket);
      -                    apr_bucket_destroy(bucket);
      +                    apr_bucket_delete(bucket);
                           vec[i].iov_len -= n;
                           vec[i].iov_base = (char *) vec[i].iov_base + n;
                           break;
      @@ -798,7 +839,7 @@ static apr_status_t sendfile_nonblocking(apr_socket_t *s,
           apr_size_t bytes_written = 0;
       
           if (!APR_BUCKET_IS_FILE(bucket)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, c->base_server,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, c->base_server, APLOGNO(00006)
                            "core_filter: sendfile_nonblocking: "
                            "this should never happen");
               return APR_EGENERAL;
      @@ -837,12 +878,10 @@ static apr_status_t sendfile_nonblocking(apr_socket_t *s,
           *cumulative_bytes_written += bytes_written;
           if ((bytes_written < file_length) && (bytes_written > 0)) {
               apr_bucket_split(bucket, bytes_written);
      -        APR_BUCKET_REMOVE(bucket);
      -        apr_bucket_destroy(bucket);
      +        apr_bucket_delete(bucket);
           }
           else if (bytes_written == file_length) {
      -        APR_BUCKET_REMOVE(bucket);
      -        apr_bucket_destroy(bucket);
      +        apr_bucket_delete(bucket);
           }
           return rv;
       }
      diff --git a/server/error_bucket.c b/server/error_bucket.c
      index d113c171a8d..52b55c35c43 100644
      --- a/server/error_bucket.c
      +++ b/server/error_bucket.c
      @@ -45,7 +45,7 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_make(apr_bucket *b, int error,
       
           h = apr_bucket_alloc(sizeof(*h), b->list);
           h->status = error;
      -    h->data = (buf) ? apr_pstrdup(p, buf) : NULL;
      +    h->data = apr_pstrdup(p, buf);
       
           b = apr_bucket_shared_make(b, h, 0, 0);
           b->type = &ap_bucket_type_error;
      @@ -61,6 +61,9 @@ AP_DECLARE(apr_bucket *) ap_bucket_error_create(int error, const char *buf,
           APR_BUCKET_INIT(b);
           b->free = apr_bucket_free;
           b->list = list;
      +    if (!ap_is_HTTP_VALID_RESPONSE(error)) {
      +        error = HTTP_INTERNAL_SERVER_ERROR;
      +    }
           return ap_bucket_error_make(b, error, buf, p);
       }
       
      diff --git a/server/gen_test_char.c b/server/gen_test_char.c
      index 1c40bde93e5..48ae6f47d02 100644
      --- a/server/gen_test_char.c
      +++ b/server/gen_test_char.c
      @@ -16,11 +16,11 @@
       
       #ifdef CROSS_COMPILE
       
      +#include <ctype.h>
       #define apr_isalnum(c) (isalnum(((unsigned char)(c))))
       #define apr_isalpha(c) (isalpha(((unsigned char)(c))))
       #define apr_iscntrl(c) (iscntrl(((unsigned char)(c))))
       #define apr_isprint(c) (isprint(((unsigned char)(c))))
      -#include <ctype.h>
       #define APR_HAVE_STDIO_H 1
       #define APR_HAVE_STRING_H 1
       
      @@ -29,10 +29,10 @@
       #include "apr.h"
       #include "apr_lib.h"
       
      -#if defined(WIN32) || defined(OS2)
      -#define NEED_ENHANCED_ESCAPES
       #endif
       
      +#if defined(WIN32) || defined(OS2)
      +#define NEED_ENHANCED_ESCAPES
       #endif
       
       #if APR_HAVE_STDIO_H
      @@ -52,11 +52,13 @@
       #define T_ESCAPE_LOGITEM      (0x10)
       #define T_ESCAPE_FORENSIC     (0x20)
       #define T_ESCAPE_URLENCODED   (0x40)
      +#define T_HTTP_CTRLS          (0x80)
      +#define T_VCHAR_OBSTEXT      (0x100)
       
       int main(int argc, char *argv[])
       {
           unsigned c;
      -    unsigned char flags;
      +    unsigned short flags;
       
           printf("/* this file is automatically generated by gen_test_char, "
                  "do not edit */\n"
      @@ -67,19 +69,23 @@ int main(int argc, char *argv[])
                  "#define T_ESCAPE_LOGITEM       (%u)\n"
                  "#define T_ESCAPE_FORENSIC      (%u)\n"
                  "#define T_ESCAPE_URLENCODED    (%u)\n"
      +           "#define T_HTTP_CTRLS           (%u)\n"
      +           "#define T_VCHAR_OBSTEXT        (%u)\n"
                  "\n"
      -           "static const unsigned char test_char_table[256] = {",
      +           "static const unsigned short test_char_table[256] = {",
                  T_ESCAPE_SHELL_CMD,
                  T_ESCAPE_PATH_SEGMENT,
                  T_OS_ESCAPE_PATH,
                  T_HTTP_TOKEN_STOP,
                  T_ESCAPE_LOGITEM,
                  T_ESCAPE_FORENSIC,
      -           T_ESCAPE_URLENCODED);
      +           T_ESCAPE_URLENCODED,
      +           T_HTTP_CTRLS,
      +           T_VCHAR_OBSTEXT);
       
           for (c = 0; c < 256; ++c) {
               flags = 0;
      -        if (c % 20 == 0)
      +        if (c % 8 == 0)
                   printf("\n    ");
       
               /* escape_shell_cmd */
      @@ -90,7 +96,7 @@ int main(int argc, char *argv[])
                * since Win32/OS2 use carets or doubled-double quotes,
                * and neither lf nor cr can be escaped.  We escape unix
                * specific as well, to assure that cross-compiled unix
      -         * applications behave similiarly when invoked on win32/os2.
      +         * applications behave similarly when invoked on win32/os2.
                *
                * Rem please keep in-sync with apr's list in win32/filesys.c
                */
      @@ -107,7 +113,7 @@ int main(int argc, char *argv[])
                   flags |= T_ESCAPE_PATH_SEGMENT;
               }
       
      -        if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:@&=/~", c)) {
      +        if (!apr_isalnum(c) && !strchr("$-_.+!*'(),:;@&=/~", c)) {
                   flags |= T_OS_ESCAPE_PATH;
               }
       
      @@ -115,11 +121,32 @@ int main(int argc, char *argv[])
                   flags |= T_ESCAPE_URLENCODED;
               }
       
      -        /* these are the "tspecials" (RFC2068) or "separators" (RFC2616) */
      -        if (c && (apr_iscntrl(c) || strchr(" \t()<>@,;:\\\"/[]?={}", c))) {
      +        /* Stop for any non-'token' character, including ctrls, obs-text,
      +         * and "tspecials" (RFC2068) a.k.a. "separators" (RFC2616), which
      +         * is easer to express as characters remaining in the ASCII token set
      +         */
      +        if (!c || !(apr_isalnum(c) || strchr("!#$%&'*+-.^_`|~", c))) {
                   flags |= T_HTTP_TOKEN_STOP;
               }
       
      +        /* Catch CTRLs other than VCHAR, HT and SP, and obs-text (RFC7230 3.2)
      +         * This includes only the C0 plane, not C1 (which is obs-text itself.)
      +         * XXX: We should verify that all ASCII C0 ctrls/DEL corresponding to
      +         * the current EBCDIC translation are captured, and ASCII C1 ctrls
      +         * corresponding are all permitted (as they fall under obs-text rule)
      +         */
      +        if (!c || (apr_iscntrl(c) && c != '\t')) {
      +            flags |= T_HTTP_CTRLS;
      +        }
      +
      +        /* From RFC3986, the specific sets of gen-delims, sub-delims (2.2),
      +         * and unreserved (2.3) that are possible somewhere within a URI.
      +         * Spec requires all others to be %XX encoded, including obs-text.
      +         */
      +        if (c && !apr_iscntrl(c) && c != ' ') {
      +            flags |= T_VCHAR_OBSTEXT;
      +        }
      +
               /* For logging, escape all control characters,
                * double quotes (because they delimit the request in the log file)
                * backslashes (because we use backslash for escaping)
      @@ -137,7 +164,7 @@ int main(int argc, char *argv[])
                   flags |= T_ESCAPE_FORENSIC;
               }
       
      -        printf("%u%c", flags, (c < 255) ? ',' : ' ');
      +        printf("0x%03x%c", flags, (c < 255) ? ',' : ' ');
           }
       
           printf("\n};\n");
      diff --git a/server/gen_test_char.dep b/server/gen_test_char.dep
      new file mode 100644
      index 00000000000..2bd9f6cc605
      --- /dev/null
      +++ b/server/gen_test_char.dep
      @@ -0,0 +1,7 @@
      +# Microsoft Developer Studio Generated Dependency File, included by gen_test_char.mak
      +
      +.\gen_test_char.c : \
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	
      diff --git a/server/gen_test_char.mak b/server/gen_test_char.mak
      new file mode 100644
      index 00000000000..d6e7bfb1e6a
      --- /dev/null
      +++ b/server/gen_test_char.mak
      @@ -0,0 +1,234 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on gen_test_char.dsp
      +!IF "$(CFG)" == ""
      +CFG=gen_test_char - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to gen_test_char - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "gen_test_char - Win32 Release" && "$(CFG)" != "gen_test_char - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "gen_test_char.mak" CFG="gen_test_char - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "gen_test_char - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "gen_test_char - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "gen_test_char - Win32 Release"
      +
      +OUTDIR=.
      +INTDIR=.\Release
      +# Begin Custom Macros
      +OutDir=.
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\gen_test_char.exe"
      +
      +!ELSE 
      +
      +ALL : "libapr - Win32 Release" "$(OUTDIR)\gen_test_char.exe"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\gen_test_char.idb"
      +	-@erase "$(INTDIR)\gen_test_char.obj"
      +	-@erase "$(OUTDIR)\gen_test_char.exe"
      +
      +"$(INTDIR)" :
      +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /O2 /I "..\include" /I "..\srclib\apr\include" /I "..\srclib\apr-util\include" /I "..\os\win32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\gen_test_char" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\gen_test_char.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Release\gen_test_char.pdb" /out:"$(OUTDIR)\gen_test_char.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\gen_test_char.obj" \
      +	"..\srclib\apr\Release\libapr-1.lib"
      +
      +"$(OUTDIR)\gen_test_char.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +!ELSEIF  "$(CFG)" == "gen_test_char - Win32 Debug"
      +
      +OUTDIR=.
      +INTDIR=.\Debug
      +# Begin Custom Macros
      +OutDir=.
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\gen_test_char.exe"
      +
      +!ELSE 
      +
      +ALL : "libapr - Win32 Debug" "$(OUTDIR)\gen_test_char.exe"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"libapr - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\gen_test_char.idb"
      +	-@erase "$(INTDIR)\gen_test_char.obj"
      +	-@erase "$(OUTDIR)\Debug\gen_test_char.pdb"
      +	-@erase "$(OUTDIR)\gen_test_char.exe"
      +
      +"$(INTDIR)" :
      +    if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "..\include" /I "..\srclib\apr\include" /I "..\srclib\apr-util\include" /I "..\os\win32" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\gen_test_char" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\gen_test_char.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\Debug\gen_test_char.pdb" /debug /out:"$(OUTDIR)\gen_test_char.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\gen_test_char.obj" \
      +	"..\srclib\apr\Debug\libapr-1.lib"
      +
      +"$(OUTDIR)\gen_test_char.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("gen_test_char.dep")
      +!INCLUDE "gen_test_char.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "gen_test_char.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "gen_test_char - Win32 Release" || "$(CFG)" == "gen_test_char - Win32 Debug"
      +
      +!IF  "$(CFG)" == "gen_test_char - Win32 Release"
      +
      +"libapr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" 
      +   cd "..\..\server"
      +
      +"libapr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\server"
      +
      +!ELSEIF  "$(CFG)" == "gen_test_char - Win32 Debug"
      +
      +"libapr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" 
      +   cd "..\..\server"
      +
      +"libapr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\libapr.mak" CFG="libapr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\server"
      +
      +!ENDIF 
      +
      +SOURCE=.\gen_test_char.c
      +
      +"$(INTDIR)\gen_test_char.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/server/listen.c b/server/listen.c
      index 8cbf80ae52c..98cd117c567 100644
      --- a/server/listen.c
      +++ b/server/listen.c
      @@ -22,20 +22,41 @@
       
       #include "ap_config.h"
       #include "httpd.h"
      +#include "http_main.h"
       #include "http_config.h"
       #include "http_core.h"
       #include "ap_listen.h"
       #include "http_log.h"
       #include "mpm_common.h"
       
      +#include <stdlib.h>
      +#if APR_HAVE_UNISTD_H
      +#include <unistd.h>
      +#endif
      +
       /* we know core's module_index is 0 */
       #undef APLOG_MODULE_INDEX
       #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
       
       AP_DECLARE_DATA ap_listen_rec *ap_listeners = NULL;
       
      +/* Let ap_num_listen_buckets be global so that it can
      + * be printed by ap_log_mpm_common(), but keep the listeners
      + * buckets static since it is used only here to close them
      + * all (including duplicated) with ap_close_listeners().
      + */
      +AP_DECLARE_DATA int ap_num_listen_buckets;
      +static ap_listen_rec **ap_listen_buckets;
      +
      +/* Determine once, at runtime, whether or not SO_REUSEPORT
      + * is usable on this platform, and hence whether or not
      + * listeners can be duplicated (if configured).
      + */
      +AP_DECLARE_DATA int ap_have_so_reuseport = -1;
      +
       static ap_listen_rec *old_listeners;
       static int ap_listenbacklog;
      +static int ap_listencbratio;
       static int send_buffer_size;
       static int receive_buffer_size;
       
      @@ -56,7 +77,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
       #ifndef WIN32
           stat = apr_socket_opt_set(s, APR_SO_REUSEADDR, one);
           if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(00067)
                             "make_sock: for address %pI, apr_socket_opt_set: (SO_REUSEADDR)",
                             server->bind_addr);
               apr_socket_close(s);
      @@ -66,7 +87,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
       
           stat = apr_socket_opt_set(s, APR_SO_KEEPALIVE, one);
           if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(00068)
                             "make_sock: for address %pI, apr_socket_opt_set: (SO_KEEPALIVE)",
                             server->bind_addr);
               apr_socket_close(s);
      @@ -77,7 +98,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
           if (server->bind_addr->family == APR_INET6) {
               stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting);
               if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -            ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(00069)
                                 "make_sock: for address %pI, apr_socket_opt_set: "
                                 "(IPV6_V6ONLY)",
                                 server->bind_addr);
      @@ -109,7 +130,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
           if (send_buffer_size) {
               stat = apr_socket_opt_set(s, APR_SO_SNDBUF,  send_buffer_size);
               if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p, APLOGNO(00070)
                                 "make_sock: failed to set SendBufferSize for "
                                 "address %pI, using default",
                                 server->bind_addr);
      @@ -119,7 +140,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
           if (receive_buffer_size) {
               stat = apr_socket_opt_set(s, APR_SO_RCVBUF, receive_buffer_size);
               if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p,
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, stat, p, APLOGNO(00071)
                                 "make_sock: failed to set ReceiveBufferSize for "
                                 "address %pI, using default",
                                 server->bind_addr);
      @@ -131,8 +152,25 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
           ap_sock_disable_nagle(s);
       #endif
       
      +#if defined(SO_REUSEPORT)
      +    if (ap_have_so_reuseport) {
      +        int thesock;
      +        apr_os_sock_get(&thesock, s);
      +        if (setsockopt(thesock, SOL_SOCKET, SO_REUSEPORT,
      +                       (void *)&one, sizeof(int)) < 0) {
      +            stat = apr_get_netos_error();
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(02638)
      +                          "make_sock: for address %pI, apr_socket_opt_set: "
      +                          "(SO_REUSEPORT)",
      +                          server->bind_addr);
      +            apr_socket_close(s);
      +            return stat;
      +        }
      +    }
      +#endif
      +
           if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
      +        ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p, APLOGNO(00072)
                             "make_sock: could not bind to address %pI",
                             server->bind_addr);
               apr_socket_close(s);
      @@ -140,7 +178,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
           }
       
           if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
      +        ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p, APLOGNO(00073)
                             "make_sock: unable to listen for connections "
                             "on address %pI",
                             server->bind_addr);
      @@ -161,7 +199,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
            */
           stat = apr_socket_opt_set(s, APR_SO_REUSEADDR, one);
           if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(00074)
                           "make_sock: for address %pI, apr_socket_opt_set: (SO_REUSEADDR)",
                            server->bind_addr);
               apr_socket_close(s);
      @@ -213,17 +251,20 @@ static void ap_apply_accept_filter(apr_pool_t *p, ap_listen_rec *lis,
       
           if (accf) {
       #if APR_HAS_SO_ACCEPTFILTER
      +        /* In APR 1.x, the 2nd and 3rd parameters are char * instead of 
      +         * const char *, so make a copy of those args here.
      +         */
               rv = apr_socket_accept_filter(s, apr_pstrdup(p, accf),
      -                                      apr_pstrdup(p,""));
      +                                      apr_pstrdup(p, ""));
               if (rv != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(rv)) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p,
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00075)
                                 "Failed to enable the '%s' Accept Filter",
                                 accf);
               }
       #else
               rv = apr_socket_opt_set(s, APR_TCP_DEFER_ACCEPT, 30);
               if (rv != APR_SUCCESS && !APR_STATUS_IS_ENOTIMPL(rv)) {
      -            ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p,
      +            ap_log_perror(APLOG_MARK, APLOG_WARNING, rv, p, APLOGNO(00076)
                                     "Failed to enable APR_TCP_DEFER_ACCEPT");
               }
       #endif
      @@ -238,7 +279,7 @@ static apr_status_t close_listeners_on_exec(void *v)
       
       static const char *alloc_listener(process_rec *process, char *addr,
                                         apr_port_t port, const char* proto,
      -                                  void *dummy)
      +                                  void *slave)
       {
           ap_listen_rec **walk, *last;
           apr_status_t status;
      @@ -273,7 +314,7 @@ static const char *alloc_listener(process_rec *process, char *addr,
           }
       
           if (found_listener) {
      -        if (ap_listeners->slave != dummy) {
      +        if (ap_listeners->slave != slave) {
                   return "Cannot define a slave on the same IP:port as a Listener";
               }
               return NULL;
      @@ -282,7 +323,7 @@ static const char *alloc_listener(process_rec *process, char *addr,
           if ((status = apr_sockaddr_info_get(&sa, addr, APR_UNSPEC, port, 0,
                                               process->pool))
               != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
      +        ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, APLOGNO(00077)
                             "alloc_listener: failed to set up sockaddr for %s",
                             addr);
               return "Listen setup failed";
      @@ -320,7 +361,7 @@ static const char *alloc_listener(process_rec *process, char *addr,
               }
       #endif
               if (status != APR_SUCCESS) {
      -            ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool,
      +            ap_log_perror(APLOG_MARK, APLOG_CRIT, status, process->pool, APLOGNO(00078)
                                 "alloc_listener: failed to get a socket for %s",
                                 addr);
                   return "Listen setup failed";
      @@ -333,7 +374,7 @@ static const char *alloc_listener(process_rec *process, char *addr,
                   last->next = new;
                   last = new;
               }
      -        new->slave = dummy;
      +        new->slave = slave;
           }
       
           return NULL;
      @@ -416,7 +457,7 @@ static int open_listeners(apr_pool_t *pool)
                    * listen (which would generate an error). IPv4 will be handled
                    * on the established IPv6 socket.
                    */
      -            if (IS_INADDR_ANY(lr->bind_addr)) {
      +            if (IS_INADDR_ANY(lr->bind_addr) && previous) {
                       for (cur = ap_listeners; cur != lr; cur = cur->next) {
                           if (lr->bind_addr->port == cur->bind_addr->port
                               && IS_IN6ADDR_ANY(cur->bind_addr)
      @@ -479,11 +520,7 @@ static int open_listeners(apr_pool_t *pool)
           }
       
           /* close the old listeners */
      -    for (lr = old_listeners; lr; lr = next) {
      -        apr_socket_close(lr->sd);
      -        lr->active = 0;
      -        next = lr->next;
      -    }
      +    ap_close_listeners_ex(old_listeners);
           old_listeners = NULL;
       
       #if AP_NONBLOCK_WHEN_MULTI_LISTEN
      @@ -498,7 +535,7 @@ static int open_listeners(apr_pool_t *pool)
       
               status = apr_socket_opt_set(lr->sd, APR_SO_NONBLOCK, use_nonblock);
               if (status != APR_SUCCESS) {
      -            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool,
      +            ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, status, pool, APLOGNO(00079)
                                 "unable to control socket non-blocking status");
                   return -1;
               }
      @@ -555,7 +592,7 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s)
           }
       
           if (open_listeners(s->process->pool)) {
      -       return 0;
      +        return 0;
           }
       
           for (lr = ap_listeners; lr; lr = lr->next) {
      @@ -579,15 +616,124 @@ AP_DECLARE(int) ap_setup_listeners(server_rec *s)
           return num_listeners;
       }
       
      -AP_DECLARE_NONSTD(void) ap_close_listeners(void)
      +AP_DECLARE(apr_status_t) ap_duplicate_listeners(apr_pool_t *p, server_rec *s,
      +                                                ap_listen_rec ***buckets,
      +                                                int *num_buckets)
       {
      +    static int warn_once;
      +    int i;
      +    apr_status_t stat;
      +    int use_nonblock = 0;
           ap_listen_rec *lr;
       
      -    for (lr = ap_listeners; lr; lr = lr->next) {
      +    if (*num_buckets < 1) {
      +        *num_buckets = 1;
      +        if (ap_listencbratio > 0) {
      +#ifdef _SC_NPROCESSORS_ONLN
      +            if (ap_have_so_reuseport) {
      +                int num_online_cores = sysconf(_SC_NPROCESSORS_ONLN),
      +                    val = num_online_cores / ap_listencbratio;
      +                if (val > 1) {
      +                    *num_buckets = val;
      +                }
      +                ap_log_perror(APLOG_MARK, APLOG_INFO, 0, p, APLOGNO(02819)
      +                              "Using %i listeners bucket(s) based on %i "
      +                              "online CPU cores and a ratio of %i",
      +                              *num_buckets, num_online_cores,
      +                              ap_listencbratio);
      +            }
      +            else
      +#endif
      +            if (!warn_once) {
      +                ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, p, APLOGNO(02820)
      +                              "ListenCoresBucketsRatio ignored without "
      +                              "SO_REUSEPORT and _SC_NPROCESSORS_ONLN "
      +                              "support: using a single listeners bucket");
      +                warn_once = 1;
      +            }
      +        }
      +    }
      +
      +    *buckets = apr_pcalloc(p, *num_buckets * sizeof(ap_listen_rec *));
      +    (*buckets)[0] = ap_listeners;
      +
      +    for (i = 1; i < *num_buckets; i++) {
      +        ap_listen_rec *last = NULL;
      +        lr = ap_listeners;
      +        while (lr) {
      +            ap_listen_rec *duplr;
      +            char *hostname;
      +            apr_port_t port;
      +            apr_sockaddr_t *sa;
      +            duplr = apr_palloc(p, sizeof(ap_listen_rec));
      +            duplr->slave = NULL;
      +            duplr->protocol = apr_pstrdup(p, lr->protocol);
      +            hostname = apr_pstrdup(p, lr->bind_addr->hostname);
      +            port = lr->bind_addr->port;
      +            apr_sockaddr_info_get(&sa, hostname, APR_UNSPEC, port, 0, p);
      +            duplr->bind_addr = sa;
      +            duplr->next = NULL;
      +            stat = apr_socket_create(&duplr->sd, duplr->bind_addr->family,
      +                                     SOCK_STREAM, 0, p);
      +            if (stat != APR_SUCCESS) {
      +                ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, p, APLOGNO(02640)
      +                            "ap_duplicate_listeners: for address %pI, "
      +                            "cannot duplicate a new socket!",
      +                            duplr->bind_addr);
      +                return stat;
      +            }
      +            make_sock(p, duplr);
      +#if AP_NONBLOCK_WHEN_MULTI_LISTEN
      +            use_nonblock = (ap_listeners && ap_listeners->next);
      +            stat = apr_socket_opt_set(duplr->sd, APR_SO_NONBLOCK, use_nonblock);
      +            if (stat != APR_SUCCESS) {
      +                ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(02641)
      +                              "unable to control socket non-blocking status");
      +                return stat;
      +            }
      +#endif
      +            ap_apply_accept_filter(p, duplr, s);
      +
      +            if (last == NULL) {
      +                (*buckets)[i] = last = duplr;
      +            }
      +            else {
      +                last->next = duplr;
      +                last = duplr;
      +            }
      +            lr = lr->next;
      +        }
      +    }
      +
      +    ap_listen_buckets = *buckets;
      +    ap_num_listen_buckets = *num_buckets;
      +    return APR_SUCCESS;
      +}
      +
      +AP_DECLARE_NONSTD(void) ap_close_listeners(void)
      +{
      +    int i;
      +
      +    ap_close_listeners_ex(ap_listeners);
      +
      +    /* Start from index 1 since either ap_duplicate_listeners()
      +     * was called and ap_listen_buckets[0] == ap_listeners, or
      +     * it wasn't and ap_num_listen_buckets == 0.
      +     */
      +    for (i = 1; i < ap_num_listen_buckets; i++) {
      +        ap_close_listeners_ex(ap_listen_buckets[i]);
      +    }
      +}
      +
      +AP_DECLARE_NONSTD(void) ap_close_listeners_ex(ap_listen_rec *listeners)
      +{
      +    ap_listen_rec *lr;
      +    for (lr = listeners; lr; lr = lr->next) {
               apr_socket_close(lr->sd);
               lr->active = 0;
           }
       }
      +
       AP_DECLARE_NONSTD(int) ap_close_selected_listeners(ap_slave_t *slave)
       {
           ap_listen_rec *lr;
      @@ -609,13 +755,45 @@ AP_DECLARE(void) ap_listen_pre_config(void)
       {
           old_listeners = ap_listeners;
           ap_listeners = NULL;
      +    ap_listen_buckets = NULL;
      +    ap_num_listen_buckets = 0;
           ap_listenbacklog = DEFAULT_LISTENBACKLOG;
      +    ap_listencbratio = 0;
      +
      +    /* Check once whether or not SO_REUSEPORT is supported. */
      +    if (ap_have_so_reuseport < 0) {
      +        /* This is limited to Linux with defined SO_REUSEPORT (ie. 3.9+) for
      +         * now since the implementation evenly distributes connections across
      +         * all the listening threads/processes.
      +         *
      +         * *BSDs have SO_REUSEPORT too but with a different semantic: the first
      +         * wildcard address bound socket or the last non-wildcard address bound
      +         * socket will receive connections (no evenness garantee); the rest of
      +         * the sockets bound to the same port will not.
      +         * This can't (always) work for httpd.
      +         *
      +         * TODO: latests DragonFlyBSD's SO_REUSEPORT (seems to?) have the same
      +         * semantic as Linux, so we may need HAVE_SO_REUSEPORT available from
      +         * configure.in some day.
      +         */
      +#if defined(SO_REUSEPORT) && defined(__linux__)
      +        apr_socket_t *sock;
      +        if (apr_socket_create(&sock, APR_UNSPEC, SOCK_STREAM, 0,
      +                              ap_pglobal) == APR_SUCCESS) {
      +            int thesock, on = 1;
      +            apr_os_sock_get(&thesock, sock);
      +            ap_have_so_reuseport = (setsockopt(thesock, SOL_SOCKET,
      +                                               SO_REUSEPORT, (void *)&on,
      +                                               sizeof(int)) == 0);
      +            apr_socket_close(sock);
      +        }
      +        else
      +#endif
      +        ap_have_so_reuseport = 0;
      +
      +    }
       }
       
      -/* Hack: populate an extra field
      - * When this gets called from a Listen directive, dummy is null.
      - * So we can use non-null dummy to pass a data pointer without conflict
      - */
       AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
                                                       int argc, char *const argv[])
       {
      @@ -662,7 +840,7 @@ AP_DECLARE_NONSTD(const char *) ap_set_listener(cmd_parms *cmd, void *dummy,
               ap_str_tolower(proto);
           }
       
      -    return alloc_listener(cmd->server->process, host, port, proto, dummy);
      +    return alloc_listener(cmd->server->process, host, port, proto, NULL);
       }
       
       AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd,
      @@ -685,6 +863,26 @@ AP_DECLARE_NONSTD(const char *) ap_set_listenbacklog(cmd_parms *cmd,
           return NULL;
       }
       
      +AP_DECLARE_NONSTD(const char *) ap_set_listencbratio(cmd_parms *cmd,
      +                                                     void *dummy,
      +                                                     const char *arg)
      +{
      +    int b;
      +    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      +
      +    if (err != NULL) {
      +        return err;
      +    }
      +
      +    b = atoi(arg);
      +    if (b < 1) {
      +        return "ListenCoresBucketsRatio must be > 0";
      +    }
      +
      +    ap_listencbratio = b;
      +    return NULL;
      +}
      +
       AP_DECLARE_NONSTD(const char *) ap_set_send_buffer_size(cmd_parms *cmd,
                                                               void *dummy,
                                                               const char *arg)
      diff --git a/server/log.c b/server/log.c
      index 9fe76047be1..bfec379d2a6 100644
      --- a/server/log.c
      +++ b/server/log.c
      @@ -53,6 +53,7 @@
       #include "http_main.h"
       #include "util_time.h"
       #include "ap_mpm.h"
      +#include "ap_listen.h"
       
       #if HAVE_GETTID
       #include <sys/syscall.h>
      @@ -248,14 +249,14 @@ AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
           char *filename = ap_server_root_relative(p, fname);
           if (!filename) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT,
      -                     APR_EBADPATH, NULL, "Invalid -E error log file %s",
      +                     APR_EBADPATH, NULL, APLOGNO(00085) "Invalid -E error log file %s",
                            fname);
               return APR_EBADPATH;
           }
           if ((rc = apr_file_open(&stderr_file, filename,
                                   APR_APPEND | APR_WRITE | APR_CREATE | APR_LARGEFILE,
                                   APR_OS_DEFAULT, p)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL, APLOGNO(00086)
                            "%s: could not open error log file %s.",
                            ap_server_argv0, fname);
               return rc;
      @@ -288,7 +289,7 @@ AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
               stderr_pool = NULL;
       
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rc, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rc, NULL, APLOGNO(00087)
                            "unable to replace stderr with error log file");
           }
           return rc;
      @@ -297,7 +298,7 @@ AP_DECLARE(apr_status_t) ap_replace_stderr_log(apr_pool_t *p,
       static void log_child_errfn(apr_pool_t *pool, apr_status_t err,
                                   const char *description)
       {
      -    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, APLOGNO(00088)
                        "%s", description);
       }
       
      @@ -331,10 +332,8 @@ static int log_child(apr_pool_t *p, const char *progname,
               && ((rc = apr_procattr_child_errfn_set(procattr, log_child_errfn))
                       == APR_SUCCESS)) {
               char **args;
      -        const char *pname;
       
               apr_tokenize_to_argv(progname, &args, p);
      -        pname = apr_pstrdup(p, args[0]);
               procnew = (apr_proc_t *)apr_pcalloc(p, sizeof(*procnew));
       
               if (dummy_stderr) {
      @@ -342,7 +341,7 @@ static int log_child(apr_pool_t *p, const char *progname,
                       rc = apr_procattr_child_err_set(procattr, errfile, NULL);
               }
       
      -        rc = apr_proc_create(procnew, pname, (const char * const *)args,
      +        rc = apr_proc_create(procnew, args[0], (const char * const *)args,
                                    NULL, procattr, p);
       
               if (rc == APR_SUCCESS) {
      @@ -387,7 +386,7 @@ static int open_error_log(server_rec *s, int is_main, apr_pool_t *p)
                * child inherits the parents stderr. */
               rc = log_child(p, fname, &dummy, cmdtype, is_main);
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL, APLOGNO(00089)
                                "Couldn't start ErrorLog process '%s'.",
                                s->error_fname + 1);
                   return DONE;
      @@ -421,7 +420,7 @@ static int open_error_log(server_rec *s, int is_main, apr_pool_t *p)
           else {
               fname = ap_server_root_relative(p, s->error_fname);
               if (!fname) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, APR_EBADPATH, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, APR_EBADPATH, NULL, APLOGNO(00090)
                                "%s: Invalid error log path %s.",
                                ap_server_argv0, s->error_fname);
                   return DONE;
      @@ -429,7 +428,7 @@ static int open_error_log(server_rec *s, int is_main, apr_pool_t *p)
               if ((rc = apr_file_open(&s->error_log, fname,
                                      APR_APPEND | APR_WRITE | APR_CREATE | APR_LARGEFILE,
                                      APR_OS_DEFAULT, p)) != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL, APLOGNO(00091)
                                "%s: could not open error log file %s.",
                                ap_server_argv0, fname);
                   return DONE;
      @@ -480,7 +479,7 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
               apr_file_flush(s_main->error_log);
               rv = apr_file_dup2(stderr_log, s_main->error_log, stderr_p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s_main,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s_main, APLOGNO(00092)
                                "unable to replace stderr with error_log");
               }
               else {
      @@ -499,8 +498,8 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
                    * as stdin. This in turn would prevent the piped logger from
                    * exiting.
                    */
      -             apr_file_close(s_main->error_log);
      -             s_main->error_log = stderr_log;
      +            apr_file_close(s_main->error_log);
      +            s_main->error_log = stderr_log;
               }
           }
           /* note that stderr may still need to be replaced with something
      @@ -509,9 +508,16 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
            * XXX: This is BS - /dev/null is non-portable
            *      errno-as-apr_status_t is also non-portable
            */
      -    if (replace_stderr && freopen("/dev/null", "w", stderr) == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s_main,
      -                     "unable to replace stderr with /dev/null");
      +
      +#ifdef WIN32
      +#define NULL_DEVICE "nul"
      +#else
      +#define NULL_DEVICE "/dev/null"
      +#endif
      +
      +    if (replace_stderr && freopen(NULL_DEVICE, "w", stderr) == NULL) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s_main, APLOGNO(00093)
      +                     "unable to replace stderr with %s", NULL_DEVICE);
           }
       
           for (virt = s_main->next; virt; virt = virt->next) {
      @@ -561,9 +567,12 @@ static int cpystrn(char *buf, const char *arg, int buflen)
       static int log_remote_address(const ap_errorlog_info *info, const char *arg,
                                     char *buf, int buflen)
       {
      -    if (info->c)
      -        return apr_snprintf(buf, buflen, "%s:%d", info->c->remote_ip,
      -                            info->c->remote_addr->port);
      +    if (info->r && !(arg && *arg == 'c'))
      +        return apr_snprintf(buf, buflen, "%s:%d", info->r->useragent_ip,
      +                            info->r->useragent_addr ? info->r->useragent_addr->port : 0);
      +    else if (info->c)
      +        return apr_snprintf(buf, buflen, "%s:%d", info->c->client_ip,
      +                            info->c->client_addr ? info->c->client_addr->port : 0);
           else
               return 0;
       }
      @@ -616,7 +625,7 @@ static int log_ctime(const ap_errorlog_info *info, const char *arg,
           int time_len = buflen;
           int option = AP_CTIME_OPTION_NONE;
       
      -    while(arg && *arg) {
      +    while (arg && *arg) {
               switch (*arg) {
                   case 'u':   option |= AP_CTIME_OPTION_USEC;
                               break;
      @@ -958,14 +967,21 @@ static int do_errorlog_default(const ap_errorlog_info *info, char *buf,
               }
           }
       
      -    if (info->c) {
      -        /*
      -         * remote_ip can be client or backend server. If we have a scoreboard
      -         * handle, it is likely a client.
      -         */
      +    /*
      +     * useragent_ip/client_ip can be client or backend server. If we have
      +     * a scoreboard handle, it is likely a client.
      +     */
      +    if (info->r) {
      +        len += apr_snprintf(buf + len, buflen - len,
      +                            info->r->connection->sbh ? "[client %s:%d] " : "[remote %s:%d] ",
      +                            info->r->useragent_ip,
      +                            info->r->useragent_addr ? info->r->useragent_addr->port : 0);
      +    }
      +    else if (info->c) {
               len += apr_snprintf(buf + len, buflen - len,
                                   info->c->sbh ? "[client %s:%d] " : "[remote %s:%d] ",
      -                            info->c->remote_ip, info->c->remote_addr->port);
      +                            info->c->client_ip,
      +                            info->c->client_addr ? info->c->client_addr->port : 0);
           }
       
           /* the actual error message */
      @@ -1005,6 +1021,7 @@ static int do_errorlog_format(apr_array_header_t *fmt, ap_errorlog_info *info,
           int skipping = 0;
           ap_errorlog_format_item *items = (ap_errorlog_format_item *)fmt->elts;
       
      +    AP_DEBUG_ASSERT(fmt->nelts > 0);
           for (i = 0; i < fmt->nelts; ++i) {
               ap_errorlog_format_item *item = &items[i];
               if (item->flags & AP_ERRORLOG_FLAG_FIELD_SEP) {
      @@ -1077,7 +1094,8 @@ static void write_logline(char *errstr, apr_size_t len, apr_file_t *logf,
           }
       #ifdef HAVE_SYSLOG
           else {
      -        syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%s", errstr);
      +        syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%.*s",
      +               (int)len, errstr);
           }
       #endif
       }
      @@ -1102,7 +1120,8 @@ static void log_error_core(const char *file, int line, int module_index,
           int done = 0;
           int line_number = 0;
       
      -    if (r && r->connection) {
      +    if (r) {
      +        AP_DEBUG_ASSERT(r->connection != NULL);
               c = r->connection;
           }
       
      @@ -1177,6 +1196,7 @@ static void log_error_core(const char *file, int line, int module_index,
       
           info.s             = s;
           info.c             = c;
      +    info.pool          = pool;
           info.file          = NULL;
           info.line          = 0;
           info.status        = 0;
      @@ -1241,7 +1261,7 @@ static void log_error_core(const char *file, int line, int module_index,
                * prepare and log one line
                */
       
      -        if (log_format) {
      +        if (log_format && !info.startup) {
                   len += do_errorlog_format(log_format, &info, errstr + len,
                                             MAX_STRING_LEN - len,
                                             &errstr_start, &errstr_end, fmt, args);
      @@ -1251,8 +1271,7 @@ static void log_error_core(const char *file, int line, int module_index,
                                              &errstr_start, &errstr_end, fmt, args);
               }
       
      -        if (!*errstr)
      -        {
      +        if (!*errstr) {
                   /*
                    * Don't log empty lines. This can happen with once-per-conn/req
                    * info if an item with AP_ERRORLOG_FLAG_REQUIRED is NULL.
      @@ -1261,17 +1280,35 @@ static void log_error_core(const char *file, int line, int module_index,
               }
               write_logline(errstr, len, logf, level_and_mask);
       
      -        if (!log_format) {
      -            /* only pass the real error string to the hook */
      +        if (done) {
      +            /*
      +             * We don't call the error_log hook for per-request/per-conn
      +             * lines, and we only pass the actual log message, not the
      +             * prefix and suffix.
      +             */
                   errstr[errstr_end] = '\0';
      -            ap_run_error_log(file, line, module_index, level, status, s, r, pool,
      -                             errstr + errstr_start);
      +            ap_run_error_log(&info, errstr + errstr_start);
               }
       
               *errstr = '\0';
           }
       }
       
      +/* For internal calls to log_error_core with self-composed arg lists */
      +static void log_error_va_glue(const char *file, int line, int module_index,
      +                              int level, apr_status_t status,
      +                              const server_rec *s, const conn_rec *c,
      +                              const request_rec *r, apr_pool_t *pool,
      +                              const char *fmt, ...)
      +{
      +    va_list args;
      +
      +    va_start(args, fmt);
      +    log_error_core(file, line, module_index, level, status, s, c, r, pool,
      +                   fmt, args);
      +    va_end(args);
      +}
      +
       AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
                                      int level, apr_status_t status,
                                      const server_rec *s, const char *fmt, ...)
      @@ -1350,6 +1387,129 @@ AP_DECLARE(void) ap_log_cerror_(const char *file, int line, int module_index,
           va_end(args);
       }
       
      +#define BYTES_LOGGED_PER_LINE 16
      +#define LOG_BYTES_BUFFER_SIZE (BYTES_LOGGED_PER_LINE * 3 + 2)
      +
      +static void fmt_data(unsigned char *buf, const void *vdata, apr_size_t len, apr_size_t *off)
      +{
      +    const unsigned char *data = (const unsigned char *)vdata;
      +    unsigned char *chars;
      +    unsigned char *hex;
      +    apr_size_t this_time = 0;
      +
      +    memset(buf, ' ', LOG_BYTES_BUFFER_SIZE - 1);
      +    buf[LOG_BYTES_BUFFER_SIZE - 1] = '\0';
      +    
      +    chars = buf; /* start character dump here */
      +    hex   = buf + BYTES_LOGGED_PER_LINE + 1; /* start hex dump here */
      +    while (*off < len && this_time < BYTES_LOGGED_PER_LINE) {
      +        unsigned char c = data[*off];
      +
      +        if (apr_isprint(c)
      +            && c != '\\') {  /* backslash will be escaped later, which throws
      +                              * off the formatting
      +                              */
      +            *chars = c;
      +        }
      +        else {
      +            *chars = '.';
      +        }
      +
      +        if ((c >> 4) >= 10) {
      +            *hex = 'a' + ((c >> 4) - 10);
      +        }
      +        else {
      +            *hex = '0' + (c >> 4);
      +        }
      +
      +        if ((c & 0x0F) >= 10) {
      +            *(hex + 1) = 'a' + ((c & 0x0F) - 10);
      +        }
      +        else {
      +            *(hex + 1) = '0' + (c & 0x0F);
      +        }
      +
      +        chars += 1;
      +        hex += 2;
      +        *off += 1;
      +        ++this_time;
      +    }
      +}
      +
      +static void log_data_core(const char *file, int line, int module_index,
      +                          int level, const server_rec *s,
      +                          const conn_rec *c, const request_rec *r,
      +                          const char *label, const void *data, apr_size_t len,
      +                          unsigned int flags)
      +{
      +    unsigned char buf[LOG_BYTES_BUFFER_SIZE];
      +    apr_size_t off;
      +    char prefix[20];
      +
      +    if (!(flags & AP_LOG_DATA_SHOW_OFFSET)) {
      +        prefix[0] = '\0';
      +    }
      +
      +    if (len > 0xffff) { /* bug in caller? */
      +        len = 0xffff;
      +    }
      +
      +    if (label) {
      +        log_error_va_glue(file, line, module_index, level, APR_SUCCESS, s,
      +                          c, r, NULL, "%s (%" APR_SIZE_T_FMT " bytes)",
      +                          label, len);
      +    }
      +
      +    off = 0;
      +    while (off < len) {
      +        if (flags & AP_LOG_DATA_SHOW_OFFSET) {
      +            apr_snprintf(prefix, sizeof prefix, "%04x: ", (unsigned int)off);
      +        }
      +        fmt_data(buf, data, len, &off);
      +        log_error_va_glue(file, line, module_index, level, APR_SUCCESS, s,
      +                          c, r, NULL, "%s%s", prefix, buf);
      +    }
      +}
      +
      +AP_DECLARE(void) ap_log_data_(const char *file, int line, 
      +                              int module_index, int level,
      +                              const server_rec *s, const char *label,
      +                              const void *data, apr_size_t len,
      +                              unsigned int flags)
      +{
      +    log_data_core(file, line, module_index, level, s, NULL, NULL, label,
      +                  data, len, flags);
      +}
      +
      +AP_DECLARE(void) ap_log_rdata_(const char *file, int line,
      +                               int module_index, int level,
      +                               const request_rec *r, const char *label,
      +                               const void *data, apr_size_t len,
      +                               unsigned int flags)
      +{
      +    log_data_core(file, line, module_index, level, r->server, NULL, r, label,
      +                  data, len, flags);
      +}
      +
      +AP_DECLARE(void) ap_log_cdata_(const char *file, int line,
      +                               int module_index, int level,
      +                               const conn_rec *c, const char *label,
      +                               const void *data, apr_size_t len,
      +                               unsigned int flags)
      +{
      +    log_data_core(file, line, module_index, level, c->base_server, c, NULL,
      +                  label, data, len, flags);
      +}
      +
      +AP_DECLARE(void) ap_log_csdata_(const char *file, int line, int module_index,
      +                                int level, const conn_rec *c, const server_rec *s,
      +                                const char *label, const void *data,
      +                                apr_size_t len, unsigned int flags)
      +{
      +    log_data_core(file, line, module_index, level, s, c, NULL, label, data,
      +                  len, flags);
      +}
      +
       AP_DECLARE(void) ap_log_command_line(apr_pool_t *plog, server_rec *s)
       {
           int i;
      @@ -1373,10 +1533,19 @@ AP_DECLARE(void) ap_log_command_line(apr_pool_t *plog, server_rec *s)
                   strcat(result, " ");
               }
           }
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(00094)
                        "Command line: '%s'", result);
       }
       
      +/* grab bag function to log commonly logged and shared info */
      +AP_DECLARE(void) ap_log_mpm_common(server_rec *s)
      +{
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG , 0, s, APLOGNO(02639)
      +                 "Using SO_REUSEPORT: %s (%d)",
      +                 ap_have_so_reuseport ? "yes" : "no",
      +                 ap_num_listen_buckets);
      +}
      +
       AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *rel_fname)
       {
           apr_status_t rv;
      @@ -1385,11 +1554,11 @@ AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *rel_fname)
           if (fname != NULL) {
               rv = apr_file_remove(fname, p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00095)
                                "failed to remove PID file %s", fname);
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00096)
                                "removed PID file %s (pid=%" APR_PID_T_FMT ")",
                                fname, getpid());
               }
      @@ -1412,7 +1581,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
           fname = ap_server_root_relative(p, filename);
           if (!fname) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, APR_EBADPATH,
      -                     NULL, "Invalid PID file path %s, ignoring.", filename);
      +                     NULL, APLOGNO(00097) "Invalid PID file path %s, ignoring.", filename);
               return;
           }
       
      @@ -1426,7 +1595,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
                *      that may screw up scripts written to do something
                *      based on the last modification time of the pid file.
                */
      -        ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, p,
      +        ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, p, APLOGNO(00098)
                             "pid file %s overwritten -- Unclean "
                             "shutdown of previous Apache run?",
                             fname);
      @@ -1436,9 +1605,9 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename)
                                   APR_WRITE | APR_CREATE | APR_TRUNCATE,
                                   APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, p))
               != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00099)
                            "could not create %s", fname);
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00100)
                            "%s: could not log pid to file %s",
                            ap_server_argv0, fname);
               exit(1);
      @@ -1465,7 +1634,7 @@ AP_DECLARE(apr_status_t) ap_read_pid(apr_pool_t *p, const char *filename,
           fname = ap_server_root_relative(p, filename);
           if (!fname) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, APR_EBADPATH,
      -                     NULL, "Invalid PID file path %s, ignoring.", filename);
      +                     NULL, APLOGNO(00101) "Invalid PID file path %s, ignoring.", filename);
               return APR_EGENERAL;
           }
       
      @@ -1500,7 +1669,7 @@ AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile,
           char time_str[APR_CTIME_LEN];
       
           apr_ctime(time_str, apr_time_now());
      -    ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(00102)
                        "[%s] file %s, line %d, assertion \"%s\" failed",
                        time_str, szFile, nLine, szExp);
       #if defined(WIN32)
      @@ -1536,20 +1705,17 @@ static apr_status_t piped_log_spawn(piped_log *pl)
               ((status = apr_procattr_child_errfn_set(procattr, log_child_errfn))
                != APR_SUCCESS) ||
               ((status = apr_procattr_error_check_set(procattr, 1)) != APR_SUCCESS)) {
      -        char buf[120];
               /* Something bad happened, give up and go away. */
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                     "piped_log_spawn: unable to setup child process '%s': %s",
      -                     pl->program, apr_strerror(status, buf, sizeof(buf)));
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, status, NULL, APLOGNO(00103)
      +                     "piped_log_spawn: unable to setup child process '%s'",
      +                     pl->program);
           }
           else {
               char **args;
      -        const char *pname;
       
               apr_tokenize_to_argv(pl->program, &args, pl->p);
      -        pname = apr_pstrdup(pl->p, args[0]);
               procnew = apr_pcalloc(pl->p, sizeof(apr_proc_t));
      -        status = apr_proc_create(procnew, pname, (const char * const *) args,
      +        status = apr_proc_create(procnew, args[0], (const char * const *) args,
                                        NULL, procattr, pl->p);
       
               if (status == APR_SUCCESS) {
      @@ -1564,11 +1730,10 @@ static apr_status_t piped_log_spawn(piped_log *pl)
                   close_handle_in_child(pl->p, pl->read_fd);
               }
               else {
      -            char buf[120];
                   /* Something bad happened, give up and go away. */
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                         "unable to start piped log program '%s': %s",
      -                         pl->program, apr_strerror(status, buf, sizeof(buf)));
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, status, NULL, APLOGNO(00104)
      +                         "unable to start piped log program '%s'",
      +                         pl->program);
               }
           }
       
      @@ -1579,7 +1744,7 @@ static apr_status_t piped_log_spawn(piped_log *pl)
       static void piped_log_maintenance(int reason, void *data, apr_wait_t status)
       {
           piped_log *pl = data;
      -    apr_status_t stats;
      +    apr_status_t rv;
           int mpm_state;
       
           switch (reason) {
      @@ -1589,24 +1754,23 @@ static void piped_log_maintenance(int reason, void *data, apr_wait_t status)
                                * tells other logic not to try to kill it
                                */
               apr_proc_other_child_unregister(pl);
      -        stats = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state);
      -        if (stats != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +        rv = ap_mpm_query(AP_MPMQ_MPM_STATE, &mpm_state);
      +        if (rv != APR_SUCCESS) {
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00105)
                                "can't query MPM state; not restarting "
                                "piped log program '%s'",
                                pl->program);
               }
               else if (mpm_state != AP_MPMQ_STOPPING) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00106)
                                "piped log program '%s' failed unexpectedly",
                                pl->program);
      -            if ((stats = piped_log_spawn(pl)) != APR_SUCCESS) {
      +            if ((rv = piped_log_spawn(pl)) != APR_SUCCESS) {
                       /* what can we do?  This could be the error log we're having
                        * problems opening up... */
      -                char buf[120];
      -                ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      -                             "piped_log_maintenance: unable to respawn '%s': %s",
      -                             pl->program, apr_strerror(stats, buf, sizeof(buf)));
      +                ap_log_error(APLOG_MARK, APLOG_STARTUP, rv, NULL, APLOGNO(00107)
      +                             "piped_log_maintenance: unable to respawn '%s'",
      +                             pl->program);
                   }
               }
               break;
      @@ -1697,7 +1861,7 @@ AP_DECLARE(piped_log *) ap_open_piped_log_ex(apr_pool_t *p,
       
           rc = log_child(p, program, &dummy, cmdtype, 0);
           if (rc != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL, APLOGNO(00108)
                            "Couldn't start piped log process '%s'.",
                            (program == NULL) ? "NULL" : program);
               return NULL;
      @@ -1759,11 +1923,8 @@ AP_DECLARE(const char *) ap_parse_log_level(const char *str, int *val)
       }
       
       AP_IMPLEMENT_HOOK_VOID(error_log,
      -                       (const char *file, int line, int module_index, int level,
      -                        apr_status_t status, const server_rec *s,
      -                        const request_rec *r, apr_pool_t *pool,
      -                        const char *errstr), (file, line, module_index, level,
      -                        status, s, r, pool, errstr))
      +                       (const ap_errorlog_info *info, const char *errstr),
      +                       (info, errstr))
       
       AP_IMPLEMENT_HOOK_RUN_FIRST(int, generate_log_id,
                                   (const conn_rec *c, const request_rec *r,
      diff --git a/server/main.c b/server/main.c
      index 1cb2f75d9ce..c5f35b9b447 100644
      --- a/server/main.c
      +++ b/server/main.c
      @@ -425,6 +425,8 @@ static void usage(process_rec *process)
                        "  -t -D DUMP_MODULES : show all loaded modules ");
           ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
                        "  -M                 : a synonym for -t -D DUMP_MODULES");
      +    ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +                 "  -t -D DUMP_INCLUDES: show all included configuration files");
           ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
                        "  -t                 : run syntax check for config files");
           ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      @@ -438,7 +440,7 @@ static void usage(process_rec *process)
       int main(int argc, const char * const argv[])
       {
           char c;
      -    int showcompile = 0;
      +    int showcompile = 0, showdirectives = 0;
           const char *confname = SERVER_CONFIG_FILE;
           const char *def_server_root = HTTPD_ROOT;
           const char *temp_error_log = NULL;
      @@ -453,6 +455,7 @@ int main(int argc, const char * const argv[])
           module **mod;
           const char *opt_arg;
           APR_OPTIONAL_FN_TYPE(ap_signal_server) *signal_server;
      +    int rc = OK;
       
           AP_MONCONTROL(0); /* turn off profiling of startup */
       
      @@ -480,8 +483,8 @@ int main(int argc, const char * const argv[])
       
           error = ap_setup_prelinked_modules(process);
           if (error) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, 0, NULL, "%s: %s",
      -                     ap_server_argv0, error);
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_EMERG, 0, NULL, APLOGNO(00012)
      +                     "%s: %s", ap_server_argv0, error);
               destroy_and_exit_process(process, 1);
           }
       
      @@ -523,6 +526,9 @@ int main(int argc, const char * const argv[])
                   /* Setting -D DUMP_MODULES is equivalent to setting -M */
                   else if (strcmp(opt_arg, "DUMP_MODULES") == 0)
                       ap_run_mode = AP_SQ_RM_CONFIG_DUMP;
      +            /* Setting -D DUMP_INCLUDES is a type of configuration dump */
      +            else if (strcmp(opt_arg, "DUMP_INCLUDES") == 0)
      +                ap_run_mode = AP_SQ_RM_CONFIG_DUMP;
                   break;
       
               case 'e':
      @@ -553,8 +559,9 @@ int main(int argc, const char * const argv[])
                   destroy_and_exit_process(process, 0);
       
               case 'L':
      -            ap_show_directives();
      -            destroy_and_exit_process(process, 0);
      +            ap_run_mode = AP_SQ_RM_CONFIG_DUMP;
      +            showdirectives = 1;
      +            break;
       
               case 't':
                   if (ap_run_mode == AP_SQ_RM_UNKNOWN)
      @@ -631,7 +638,7 @@ int main(int argc, const char * const argv[])
       
           if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
      -                     NULL, "Pre-configuration failed");
      +                     NULL, APLOGNO(00013) "Pre-configuration failed");
               destroy_and_exit_process(process, 1);
           }
       
      @@ -649,7 +656,7 @@ int main(int argc, const char * const argv[])
       
               if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
                   ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
      -                         NULL, "Configuration check failed");
      +                         NULL, APLOGNO(00014) "Configuration check failed");
                   destroy_and_exit_process(process, 1);
               }
       
      @@ -657,6 +664,10 @@ int main(int argc, const char * const argv[])
                   if (showcompile) { /* deferred due to dynamically loaded MPM */
                       show_compile_settings();
                   }
      +            else if (showdirectives) { /* deferred in case of DSOs */
      +                ap_show_directives();
      +                destroy_and_exit_process(process, 0);
      +            }
                   else {
                       ap_run_test_config(pconf, ap_server_conf);
                       if (ap_run_mode == AP_SQ_RM_CONFIG_TEST)
      @@ -666,6 +677,11 @@ int main(int argc, const char * const argv[])
               }
           }
       
      +    /* If our config failed, deal with that here. */
      +    if (rv != OK) {
      +        destroy_and_exit_process(process, 1);
      +    }
      +
           signal_server = APR_RETRIEVE_OPTIONAL_FN(ap_signal_server);
           if (signal_server) {
               int exit_status;
      @@ -675,28 +691,23 @@ int main(int argc, const char * const argv[])
               }
           }
       
      -    /* If our config failed, deal with that here. */
      -    if (rv != OK) {
      -        destroy_and_exit_process(process, 1);
      -    }
      -
           apr_pool_clear(plog);
       
           if ( ap_run_open_logs(pconf, plog, ptemp, ap_server_conf) != OK) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
      -                     0, NULL, "Unable to open logs");
      +                     0, NULL, APLOGNO(00015) "Unable to open logs");
               destroy_and_exit_process(process, 1);
           }
       
           if ( ap_run_post_config(pconf, plog, ptemp, ap_server_conf) != OK) {
               ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
      -                     NULL, "Configuration Failed");
      +                     NULL, APLOGNO(00016) "Configuration Failed");
               destroy_and_exit_process(process, 1);
           }
       
           apr_pool_destroy(ptemp);
       
      -    for (;;) {
      +    do {
               ap_main_state = AP_SQ_MS_DESTROY_CONFIG;
               apr_hook_deregister_all();
               apr_pool_clear(pconf);
      @@ -726,8 +737,8 @@ int main(int argc, const char * const argv[])
               apr_hook_sort_all();
       
               if (ap_run_pre_config(pconf, plog, ptemp) != OK) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
      -                         0, NULL, "Pre-configuration failed");
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL,
      +                         APLOGNO(00017) "Pre-configuration failed, exiting");
                   destroy_and_exit_process(process, 1);
               }
       
      @@ -745,21 +756,21 @@ int main(int argc, const char * const argv[])
               apr_hook_sort_all();
       
               if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0,
      -                         NULL, "Configuration check failed");
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL,
      +                         APLOGNO(00018) "Configuration check failed, exiting");
                   destroy_and_exit_process(process, 1);
               }
       
               apr_pool_clear(plog);
               if (ap_run_open_logs(pconf, plog, ptemp, ap_server_conf) != OK) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
      -                         0, NULL, "Unable to open logs");
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL,
      +                         APLOGNO(00019) "Unable to open logs, exiting");
                   destroy_and_exit_process(process, 1);
               }
       
               if (ap_run_post_config(pconf, plog, ptemp, ap_server_conf) != OK) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR,
      -                         0, NULL, "Configuration Failed");
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL,
      +                         APLOGNO(00020) "Configuration Failed, exiting");
                   destroy_and_exit_process(process, 1);
               }
       
      @@ -769,16 +780,23 @@ int main(int argc, const char * const argv[])
               ap_run_optional_fn_retrieve();
       
               ap_main_state = AP_SQ_MS_RUN_MPM;
      -        if (ap_run_mpm(pconf, plog, ap_server_conf) != OK)
      -            break;
      +        rc = ap_run_mpm(pconf, plog, ap_server_conf);
       
               apr_pool_lock(pconf, 0);
      -    }
       
      -    apr_pool_lock(pconf, 0);
      -    destroy_and_exit_process(process, 0);
      +    } while (rc == OK);
      +
      +    if (rc == DONE) {
      +        rc = OK;
      +    }
      +    else if (rc != OK) {
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, APLOGNO(02818)
      +                     "MPM run failed, exiting");
      +    }
      +    destroy_and_exit_process(process, rc);
       
      -    return 0; /* Termination 'ok' */
      +    /* NOTREACHED */
      +    return !OK;
       }
       
       #ifdef AP_USING_AUTOCONF
      diff --git a/server/mpm/MPM.NAMING b/server/mpm/MPM.NAMING
      index 1cc0c7c4ff1..c07884d4758 100644
      --- a/server/mpm/MPM.NAMING
      +++ b/server/mpm/MPM.NAMING
      @@ -1,14 +1,14 @@
       
       The following MPMs currently exist:
       
      -  simple ........ Single or Multi Process, with Preforking or Threading,
      -                  depending on configuration and operating systems.  Should
      -                  be able to run on all modern operating systems.
         prefork ....... Multi  Process Model with Preforking (Apache 1.3)
         mpmt_os2 ...... Multi Process Model with Threading on OS/2
                         Constant number of processes, variable number of threads.
                         One acceptor thread per process, multiple workers threads.
         winnt ......... Single Process Model with Threading on Windows NT
      +  event ......... Multi Process model with threads.  One acceptor thread,
      +                  multiple worker threads, separate poller threads for idle
      +                  connections and asynchoneous write completion.
         worker ........ Multi Process model with threads.  One acceptor thread,
                         multiple worker threads.
         netware ....... Multi-threaded MPM for Netware
      diff --git a/server/mpm/config.m4 b/server/mpm/config.m4
      index 0b263cbc568..6d3ab86b737 100644
      --- a/server/mpm/config.m4
      +++ b/server/mpm/config.m4
      @@ -38,6 +38,17 @@ AC_CACHE_CHECK([whether APR supports thread-safe pollsets], [ac_cv_have_threadsa
           fi
       ])
       
      +dnl See if APR has skiplist
      +dnl The base httpd prereq is APR 1.4.x, so we don't have to consider
      +dnl earlier versions.
      +case $APR_VERSION in
      +    1.4*)
      +        apr_has_skiplist=no
      +        ;;
      +    *)
      +        apr_has_skiplist=yes
      +esac
      +
       dnl See if this is a forking platform w.r.t. MPMs
       case $host in
           *mingw32* | *os2-emx*)
      @@ -49,7 +60,7 @@ case $host in
       esac
       
       dnl APACHE_MPM_SUPPORTED(name, supports-shared, is_threaded)
      -AC_DEFUN(APACHE_MPM_SUPPORTED,[
      +AC_DEFUN([APACHE_MPM_SUPPORTED],[
           if test "$2" = "yes"; then
               eval "ap_supported_mpm_$1=shared"
               ap_supported_shared_mpms="$ap_supported_shared_mpms $1 "
      @@ -62,7 +73,7 @@ AC_DEFUN(APACHE_MPM_SUPPORTED,[
       ])dnl
       
       dnl APACHE_MPM_ENABLED(name)
      -AC_DEFUN(APACHE_MPM_ENABLED,[
      +AC_DEFUN([APACHE_MPM_ENABLED],[
           if ap_mpm_is_enabled $1; then
               :
           else
      diff --git a/server/mpm/config2.m4 b/server/mpm/config2.m4
      index 3482d3f4142..d7e73ec05e3 100644
      --- a/server/mpm/config2.m4
      +++ b/server/mpm/config2.m4
      @@ -1,7 +1,7 @@
       AC_MSG_CHECKING(which MPM to use by default)
       AC_ARG_WITH(mpm,
       APACHE_HELP_STRING(--with-mpm=MPM,Choose the process model for Apache to use by default.
      -                          MPM={simple|event|worker|prefork|winnt}
      +                          MPM={event|worker|prefork|winnt}
                                 This will be statically linked as the only available MPM unless
                                 --enable-mpms-shared is also specified.
       ),[
      diff --git a/server/mpm/event/config.m4 b/server/mpm/event/config.m4
      index 351f1acf4bd..c891c758051 100644
      --- a/server/mpm/event/config.m4
      +++ b/server/mpm/event/config.m4
      @@ -7,6 +7,8 @@ elif test $have_threaded_sig_graceful != yes; then
           AC_MSG_RESULT(no - SIG_GRACEFUL cannot be used with a threaded MPM)
       elif test $ac_cv_have_threadsafe_pollset != yes; then
           AC_MSG_RESULT(no - APR_POLLSET_THREADSAFE is not supported)
      +elif test $apr_has_skiplist != yes; then
      +    AC_MSG_RESULT(no - APR skiplist is not available, need APR 1.5.x or later)
       else
           AC_MSG_RESULT(yes)
           APACHE_MPM_SUPPORTED(event, yes, yes)
      diff --git a/server/mpm/event/config3.m4 b/server/mpm/event/config3.m4
      index 5c96fe3c30d..8aa1631fabd 100644
      --- a/server/mpm/event/config3.m4
      +++ b/server/mpm/event/config3.m4
      @@ -1,11 +1,7 @@
       dnl ## XXX - Need a more thorough check of the proper flags to use
       
      -APACHE_CHECK_SERF
      -if test "$ac_cv_serf" = yes ; then
      -    APR_ADDTO(MOD_MPM_EVENT_LDADD,[\$(SERF_LIBS)])
      -fi
       APACHE_SUBST(MOD_MPM_EVENT_LDADD)
       
      -APACHE_MPM_MODULE(event, $enable_mpm_event, event.lo fdqueue.lo pod.lo,[
      +APACHE_MPM_MODULE(event, $enable_mpm_event, event.lo fdqueue.lo,[
           AC_CHECK_FUNCS(pthread_kill)
       ], , [\$(MOD_MPM_EVENT_LDADD)])
      diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c
      index 063d85ff7e9..2c55c5bbf20 100644
      --- a/server/mpm/event/event.c
      +++ b/server/mpm/event/event.c
      @@ -19,10 +19,10 @@
        *
        * After a client completes the first request, the client can keep the
        * connection open to send more requests with the same socket.  This can save
      - * signifigant overhead in creating TCP connections.  However, the major
      + * significant overhead in creating TCP connections.  However, the major
        * disadvantage is that Apache traditionally keeps an entire child
        * process/thread waiting for data from the client.  To solve this problem,
      - * this MPM has a dedicated thread for handling both the Listenting sockets,
      + * this MPM has a dedicated thread for handling both the Listening sockets,
        * and all sockets that are in a Keep Alive status.
        *
        * The MPM assumes the underlying apr_pollset implementation is somewhat
      @@ -30,7 +30,7 @@
        * enables the MPM to avoid extra high level locking or having to wake up the
        * listener thread when a keep-alive socket needs to be sent to it.
        *
      - * This MPM not preform well on older platforms that do not have very good
      + * This MPM does not perform well on older platforms that do not have very good
        * threading, like Linux with a 2.4 kernel, but this does not matter, since we
        * require EPoll or KQueue.
        *
      @@ -59,6 +59,8 @@
       #include "apr_want.h"
       #include "apr_version.h"
       
      +#include <stdlib.h>
      +
       #if APR_HAVE_UNISTD_H
       #include <unistd.h>
       #endif
      @@ -83,8 +85,8 @@
       #include "http_config.h"        /* for read_config */
       #include "http_core.h"          /* for get_remote_host */
       #include "http_connection.h"
      +#include "http_protocol.h"
       #include "ap_mpm.h"
      -#include "pod.h"
       #include "mpm_common.h"
       #include "ap_listen.h"
       #include "scoreboard.h"
      @@ -92,16 +94,12 @@
       #include "mpm_default.h"
       #include "http_vhost.h"
       #include "unixd.h"
      +#include "apr_skiplist.h"
       
       #include <signal.h>
       #include <limits.h>             /* for INT_MAX */
       
       
      -#if HAVE_SERF
      -#include "mod_serf.h"
      -#include "serf.h"
      -#endif
      -
       /* Limit on the total --- clients will be locked out if more servers than
        * this are needed.  It is intended solely to keep the server from crashing
        * when things get out of hand.
      @@ -162,79 +160,141 @@
       #endif
       #define WORKER_FACTOR_SCALE   16  /* scale factor to allow fractional values */
       static unsigned int worker_factor = DEFAULT_WORKER_FACTOR * WORKER_FACTOR_SCALE;
      -
      -static int threads_per_child = 0;   /* Worker threads per child */
      -static int ap_daemons_to_start = 0;
      -static int min_spare_threads = 0;
      -static int max_spare_threads = 0;
      -static int ap_daemons_limit = 0;
      -static int max_workers = 0;
      -static int server_limit = 0;
      -static int thread_limit = 0;
      +    /* AsyncRequestWorkerFactor * 16 */
      +
      +static int threads_per_child = 0;           /* ThreadsPerChild */
      +static int ap_daemons_to_start = 0;         /* StartServers */
      +static int min_spare_threads = 0;           /* MinSpareThreads */
      +static int max_spare_threads = 0;           /* MaxSpareThreads */
      +static int active_daemons_limit = 0;        /* MaxRequestWorkers / ThreadsPerChild */
      +static int active_daemons = 0;              /* workers that still active, i.e. are
      +                                               not shutting down gracefully */
      +static int max_workers = 0;                 /* MaxRequestWorkers */
      +static int server_limit = 0;                /* ServerLimit */
      +static int thread_limit = 0;                /* ThreadLimit */
      +static int had_healthy_child = 0;
       static int dying = 0;
       static int workers_may_exit = 0;
       static int start_thread_may_exit = 0;
       static int listener_may_exit = 0;
      -static int requests_this_child;
       static int num_listensocks = 0;
      -static apr_uint32_t connection_count = 0;
      +static apr_int32_t conns_this_child;        /* MaxConnectionsPerChild, only access
      +                                               in listener thread */
      +static apr_uint32_t connection_count = 0;   /* Number of open connections */
      +static apr_uint32_t lingering_count = 0;    /* Number of connections in lingering close */
      +static apr_uint32_t suspended_count = 0;    /* Number of suspended connections */
      +static apr_uint32_t clogged_count = 0;      /* Number of threads processing ssl conns */
      +static apr_uint32_t threads_shutdown = 0;   /* Number of threads that have shutdown
      +                                               early during graceful termination */
       static int resource_shortage = 0;
       static fd_queue_t *worker_queue;
       static fd_queue_info_t *worker_queue_info;
       static int mpm_state = AP_MPMQ_STARTING;
       
       static apr_thread_mutex_t *timeout_mutex;
      -APR_RING_HEAD(timeout_head_t, conn_state_t);
      +
      +module AP_MODULE_DECLARE_DATA mpm_event_module;
      +
      +/* forward declare */
      +struct event_srv_cfg_s;
      +typedef struct event_srv_cfg_s event_srv_cfg;
      +
      +struct event_conn_state_t {
      +    /** APR_RING of expiration timeouts */
      +    APR_RING_ENTRY(event_conn_state_t) timeout_list;
      +    /** the time when the entry was queued */
      +    apr_time_t queue_timestamp;
      +    /** connection record this struct refers to */
      +    conn_rec *c;
      +    /** request record (if any) this struct refers to */
      +    request_rec *r;
      +    /** server config this struct refers to */
      +    event_srv_cfg *sc;
      +    /** is the current conn_rec suspended?  (disassociated with
      +     * a particular MPM thread; for suspend_/resume_connection
      +     * hooks)
      +     */
      +    int suspended;
      +    /** memory pool to allocate from */
      +    apr_pool_t *p;
      +    /** bucket allocator */
      +    apr_bucket_alloc_t *bucket_alloc;
      +    /** poll file descriptor information */
      +    apr_pollfd_t pfd;
      +    /** public parts of the connection state */
      +    conn_state_t pub;
      +};
      +APR_RING_HEAD(timeout_head_t, event_conn_state_t);
      +
       struct timeout_queue {
           struct timeout_head_t head;
      -    int count;
      -    const char *tag;
      +    int count, *total;
      +    apr_interval_time_t timeout;
      +    struct timeout_queue *next;
       };
      -static struct timeout_queue write_completion_q, keepalive_q, linger_q,
      -                            short_linger_q;
      +/*
      + * Several timeout queues that use different timeouts, so that we always can
      + * simply append to the end.
      + *   write_completion_q uses vhost's TimeOut
      + *   keepalive_q        uses vhost's KeepAliveTimeOut
      + *   linger_q           uses MAX_SECS_TO_LINGER
      + *   short_linger_q     uses SECONDS_TO_LINGER
      + */
      +static struct timeout_queue *write_completion_q,
      +                            *keepalive_q,
      +                            *linger_q,
      +                            *short_linger_q;
      +
       static apr_pollfd_t *listener_pollfd;
       
       /*
        * Macros for accessing struct timeout_queue.
        * For TO_QUEUE_APPEND and TO_QUEUE_REMOVE, timeout_mutex must be held.
        */
      -#define TO_QUEUE_APPEND(q, el)                                            \
      -    do {                                                                  \
      -        APR_RING_INSERT_TAIL(&(q).head, el, conn_state_t, timeout_list);  \
      -        (q).count++;                                                      \
      +#define TO_QUEUE_APPEND(q, el)                                                \
      +    do {                                                                      \
      +        APR_RING_INSERT_TAIL(&(q)->head, el, event_conn_state_t,              \
      +                             timeout_list);                                   \
      +        ++*(q)->total;                                                        \
      +        ++(q)->count;                                                         \
           } while (0)
       
      -#define TO_QUEUE_REMOVE(q, el)             \
      -    do {                                   \
      -        APR_RING_REMOVE(el, timeout_list); \
      -        (q).count--;                       \
      +#define TO_QUEUE_REMOVE(q, el)                                                \
      +    do {                                                                      \
      +        APR_RING_REMOVE(el, timeout_list);                                    \
      +        --*(q)->total;                                                        \
      +        --(q)->count;                                                         \
           } while (0)
       
      -#define TO_QUEUE_INIT(q)                                            \
      -    do {                                                            \
      -            APR_RING_INIT(&(q).head, conn_state_t, timeout_list);   \
      -            (q).tag = #q;                                           \
      +#define TO_QUEUE_INIT(q, p, t, v)                                             \
      +    do {                                                                      \
      +        struct timeout_queue *b = (v);                                        \
      +        (q) = apr_palloc((p), sizeof *(q));                                   \
      +        APR_RING_INIT(&(q)->head, event_conn_state_t, timeout_list);          \
      +        (q)->total = (b) ? (b)->total : apr_pcalloc((p), sizeof *(q)->total); \
      +        (q)->count = 0;                                                       \
      +        (q)->timeout = (t);                                                   \
      +        (q)->next = NULL;                                                     \
           } while (0)
       
       #define TO_QUEUE_ELEM_INIT(el) APR_RING_ELEM_INIT(el, timeout_list)
       
      +/*
      + * The pollset for sockets that are in any of the timeout queues. Currently
      + * we use the timeout_mutex to make sure that connections are added/removed
      + * atomically to/from both event_pollset and a timeout queue. Otherwise
      + * some confusion can happen under high load if timeout queues and pollset
      + * get out of sync.
      + * XXX: It should be possible to make the lock unnecessary in many or even all
      + * XXX: cases.
      + */
       static apr_pollset_t *event_pollset;
       
      -#if HAVE_SERF
      -typedef struct {
      -    apr_pollset_t *pollset;
      -    apr_pool_t *pool;
      -} s_baton_t;
      -
      -static serf_context_t *g_serf;
      -#endif
      -
       /* The structure used to pass unique initialization info to each thread */
       typedef struct
       {
      -    int pid;
      -    int tid;
      -    int sd;
      +    int pslot;  /* process slot */
      +    int tslot;  /* worker slot of the thread */
       } proc_info;
       
       /* Structure used to pass information to the thread responsible for
      @@ -252,9 +312,6 @@ typedef enum
       {
           PT_CSD,
           PT_ACCEPT
      -#if HAVE_SERF
      -    , PT_SERF
      -#endif
       } poll_type_e;
       
       typedef struct
      @@ -282,24 +339,48 @@ typedef struct event_retained_data {
            * scoreboard.
            */
           int max_daemons_limit;
      +
      +    /*
      +     * All running workers, active and shutting down, including those that
      +     * may be left from before a graceful restart.
      +     * Not kept up-to-date when shutdown is pending.
      +     */
      +    int total_daemons;
      +
           /*
            * idle_spawn_rate is the number of children that will be spawned on the
            * next maintenance cycle if there aren't enough idle servers.  It is
      -     * doubled up to MAX_SPAWN_RATE, and reset only when a cycle goes by
      -     * without the need to spawn.
      +     * maintained per listeners bucket, doubled up to MAX_SPAWN_RATE, and
      +     * reset only when a cycle goes by without the need to spawn.
            */
      -    int idle_spawn_rate;
      +    int *idle_spawn_rate;
       #ifndef MAX_SPAWN_RATE
       #define MAX_SPAWN_RATE        (32)
       #endif
           int hold_off_on_exponential_spawning;
      +    /*
      +     * Current number of listeners buckets and maximum reached across
      +     * restarts (to size retained data according to dynamic num_buckets,
      +     * eg. idle_spawn_rate).
      +     */
      +    int num_buckets, max_buckets;
       } event_retained_data;
       static event_retained_data *retained;
      + 
      +typedef struct event_child_bucket {
      +    ap_pod_t *pod;
      +    ap_listen_rec *listeners;
      +} event_child_bucket;
      +static event_child_bucket *all_buckets, /* All listeners buckets */
      +                          *my_bucket;   /* Current child bucket */
      +
      +struct event_srv_cfg_s {
      +    struct timeout_queue *wc_q,
      +                         *ka_q;
      +};
       
       #define ID_FROM_CHILD_THREAD(c, t)    ((c * thread_limit) + t)
       
      -static ap_event_pod_t *pod;
      -
       /* The event MPM respects a couple of runtime flags that can aid
        * in debugging. Setting the -DNO_DETACH flag will prevent the root process
        * from detaching from its controlling terminal. Additionally, setting
      @@ -352,10 +433,14 @@ static void disable_listensocks(int process_slot)
       static void enable_listensocks(int process_slot)
       {
           int i;
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00457)
                        "Accepting new connections again: "
      -                 "%u active conns, %u idle workers",
      +                 "%u active conns (%u lingering/%u clogged/%u suspended), "
      +                 "%u idle workers",
                        apr_atomic_read32(&connection_count),
      +                 apr_atomic_read32(&lingering_count),
      +                 apr_atomic_read32(&clogged_count),
      +                 apr_atomic_read32(&suspended_count),
                        ap_queue_info_get_idlers(worker_queue_info));
           for (i = 0; i < num_listensocks; i++)
               apr_pollset_add(event_pollset, &listener_pollfd[i]);
      @@ -450,9 +535,6 @@ static int event_query(int query_code, int *result, apr_status_t *rv)
           case AP_MPMQ_IS_ASYNC:
               *result = 1;
               break;
      -    case AP_MPMQ_HAS_SERF:
      -        *result = 1;
      -        break;
           case AP_MPMQ_HARD_LIMIT_DAEMONS:
               *result = server_limit;
               break;
      @@ -478,7 +560,7 @@ static int event_query(int query_code, int *result, apr_status_t *rv)
               *result = ap_max_requests_per_child;
               break;
           case AP_MPMQ_MAX_DAEMONS:
      -        *result = ap_daemons_limit;
      +        *result = active_daemons_limit;
               break;
           case AP_MPMQ_MPM_STATE:
               *result = mpm_state;
      @@ -515,27 +597,6 @@ static void event_note_child_started(int slot, pid_t pid)
                               retained->my_generation, slot, MPM_CHILD_STARTED);
       }
       
      -static void event_note_child_lost_slot(int slot, pid_t newpid)
      -{
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      -                 "pid %" APR_PID_T_FMT " taking over scoreboard slot from "
      -                 "%" APR_PID_T_FMT "%s",
      -                 newpid,
      -                 ap_scoreboard_image->parent[slot].pid,
      -                 ap_scoreboard_image->parent[slot].quiescing ?
      -                 " (quiescing)" : "");
      -    ap_run_child_status(ap_server_conf,
      -                        ap_scoreboard_image->parent[slot].pid,
      -                        ap_scoreboard_image->parent[slot].generation,
      -                        slot, MPM_CHILD_LOST_SLOT);
      -    /* Don't forget about this exiting child process, or we
      -     * won't be able to kill it if it doesn't exit by the
      -     * time the server is shut down.
      -     */
      -    ap_register_extra_mpm_process(ap_scoreboard_image->parent[slot].pid,
      -                                  ap_scoreboard_image->parent[slot].generation);
      -}
      -
       static const char *event_get_name(void)
       {
           return "event";
      @@ -572,7 +633,20 @@ static int child_fatal;
       static int volatile shutdown_pending;
       static int volatile restart_pending;
       
      -static apr_status_t decrement_connection_count(void *dummy) {
      +static apr_status_t decrement_connection_count(void *cs_)
      +{
      +    event_conn_state_t *cs = cs_;
      +    switch (cs->pub.state) {
      +        case CONN_STATE_LINGER_NORMAL:
      +        case CONN_STATE_LINGER_SHORT:
      +            apr_atomic_dec32(&lingering_count);
      +            break;
      +        case CONN_STATE_SUSPENDED:
      +            apr_atomic_dec32(&suspended_count);
      +            break;
      +        default:
      +            break;
      +    }
           apr_atomic_dec32(&connection_count);
           return APR_SUCCESS;
       }
      @@ -583,7 +657,7 @@ static apr_status_t decrement_connection_count(void *dummy) {
        * Previously this was initiated in sig_term() and restart() signal handlers,
        * but we want to be able to start a shutdown/restart from other sources --
        * e.g. on Win32, from the service manager. Now the service manager can
      - * call ap_start_shutdown() or ap_start_restart() as appropiate.  Note that
      + * call ap_start_shutdown() or ap_start_restart() as appropriate.  Note that
        * these functions can also be called by the child processes, since global
        * variables are no longer used to pass on the required action to the parent.
        *
      @@ -648,22 +722,22 @@ static void set_signals(void)
       
           sa.sa_handler = sig_term;
           if (sigaction(SIGTERM, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00459)
                            "sigaction(SIGTERM)");
       #ifdef AP_SIG_GRACEFUL_STOP
           if (sigaction(AP_SIG_GRACEFUL_STOP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00460)
                            "sigaction(" AP_SIG_GRACEFUL_STOP_STRING ")");
       #endif
       #ifdef SIGINT
           if (sigaction(SIGINT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00461)
                            "sigaction(SIGINT)");
       #endif
       #ifdef SIGXCPU
           sa.sa_handler = SIG_DFL;
           if (sigaction(SIGXCPU, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00462)
                            "sigaction(SIGXCPU)");
       #endif
       #ifdef SIGXFSZ
      @@ -672,13 +746,13 @@ static void set_signals(void)
            * rather than terminate the process. */
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGXFSZ, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00463)
                            "sigaction(SIGXFSZ)");
       #endif
       #ifdef SIGPIPE
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGPIPE, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00464)
                            "sigaction(SIGPIPE)");
       #endif
       
      @@ -688,10 +762,10 @@ static void set_signals(void)
           sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
           sa.sa_handler = restart;
           if (sigaction(SIGHUP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00465)
                            "sigaction(SIGHUP)");
           if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00466)
                            "sigaction(" AP_SIG_GRACEFUL_STRING ")");
       #else
           if (!one_process) {
      @@ -720,52 +794,128 @@ static void set_signals(void)
       #endif
       }
       
      -static int start_lingering_close(conn_state_t *cs)
      +static void notify_suspend(event_conn_state_t *cs)
       {
      -    apr_status_t rv;
      -    if (ap_start_lingering_close(cs->c)) {
      -        apr_pool_clear(cs->p);
      -        ap_push_pool(worker_queue_info, cs->p);
      -        return 0;
      -    }
      -    else {
      -        apr_socket_t *csd = ap_get_conn_socket(cs->c);
      -        struct timeout_queue *q;
      +    ap_run_suspend_connection(cs->c, cs->r);
      +    cs->suspended = 1;
      +    cs->c->sbh = NULL;
      +}
       
      +static void notify_resume(event_conn_state_t *cs, ap_sb_handle_t *sbh)
      +{
      +    cs->c->sbh = sbh;
      +    cs->suspended = 0;
      +    ap_run_resume_connection(cs->c, cs->r);
      +}
      +
      +static int start_lingering_close_common(event_conn_state_t *cs, int in_worker)
      +{
      +    apr_status_t rv;
      +    struct timeout_queue *q;
      +    apr_socket_t *csd = cs->pfd.desc.s;
      +#ifdef AP_DEBUG
      +    {
               rv = apr_socket_timeout_set(csd, 0);
               AP_DEBUG_ASSERT(rv == APR_SUCCESS);
      -        /*
      -         * If some module requested a shortened waiting period, only wait for
      -         * 2s (SECONDS_TO_LINGER). This is useful for mitigating certain
      -         * DoS attacks.
      -         */
      -        if (apr_table_get(cs->c->notes, "short-lingering-close")) {
      -            cs->expiration_time =
      -                apr_time_now() + apr_time_from_sec(SECONDS_TO_LINGER);
      -            q = &short_linger_q;
      -            cs->state = CONN_STATE_LINGER_SHORT;
      -        }
      -        else {
      -            cs->expiration_time =
      -                apr_time_now() + apr_time_from_sec(MAX_SECS_TO_LINGER);
      -            q = &linger_q;
      -            cs->state = CONN_STATE_LINGER_NORMAL;
      -        }
      +    }
      +#else
      +    apr_socket_timeout_set(csd, 0);
      +#endif
      +    cs->queue_timestamp = apr_time_now();
      +    /*
      +     * If some module requested a shortened waiting period, only wait for
      +     * 2s (SECONDS_TO_LINGER). This is useful for mitigating certain
      +     * DoS attacks.
      +     */
      +    if (apr_table_get(cs->c->notes, "short-lingering-close")) {
      +        q = short_linger_q;
      +        cs->pub.state = CONN_STATE_LINGER_SHORT;
      +    }
      +    else {
      +        q = linger_q;
      +        cs->pub.state = CONN_STATE_LINGER_NORMAL;
      +    }
      +    apr_atomic_inc32(&lingering_count);
      +    if (in_worker) { 
      +        notify_suspend(cs);
      +    }
      +    else {
      +        cs->c->sbh = NULL;
      +    }
      +    apr_thread_mutex_lock(timeout_mutex);
      +    TO_QUEUE_APPEND(q, cs);
      +    cs->pfd.reqevents = (
      +            cs->pub.sense == CONN_SENSE_WANT_WRITE ? APR_POLLOUT :
      +                    APR_POLLIN) | APR_POLLHUP | APR_POLLERR;
      +    cs->pub.sense = CONN_SENSE_DEFAULT;
      +    rv = apr_pollset_add(event_pollset, &cs->pfd);
      +    apr_thread_mutex_unlock(timeout_mutex);
      +    if (rv != APR_SUCCESS && !APR_STATUS_IS_EEXIST(rv)) {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(03092)
      +                     "start_lingering_close: apr_pollset_add failure");
               apr_thread_mutex_lock(timeout_mutex);
      -        TO_QUEUE_APPEND(*q, cs);
      +        TO_QUEUE_REMOVE(q, cs);
               apr_thread_mutex_unlock(timeout_mutex);
      -        cs->pfd.reqevents = APR_POLLIN | APR_POLLHUP | APR_POLLERR;
      -        rv = apr_pollset_add(event_pollset, &cs->pfd);
      -        if (rv != APR_SUCCESS && !APR_STATUS_IS_EEXIST(rv)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      -                         "start_lingering_close: apr_pollset_add failure");
      -            AP_DEBUG_ASSERT(0);
      -        }
      +        apr_socket_close(cs->pfd.desc.s);
      +        ap_push_pool(worker_queue_info, cs->p);
      +        return 0;
           }
           return 1;
       }
       
      -static int stop_lingering_close(conn_state_t *cs)
      +/*
      + * Close our side of the connection, flushing data to the client first.
      + * Pre-condition: cs is not in any timeout queue and not in the pollset,
      + *                timeout_mutex is not locked
      + * return: 0 if connection is fully closed,
      + *         1 if connection is lingering
      + * May only be called by worker thread.
      + */
      +static int start_lingering_close_blocking(event_conn_state_t *cs)
      +{
      +    if (ap_start_lingering_close(cs->c)) {
      +        notify_suspend(cs);
      +        ap_push_pool(worker_queue_info, cs->p);
      +        return 0;
      +    }
      +    return start_lingering_close_common(cs, 1);
      +}
      +
      +/*
      + * Close our side of the connection, NOT flushing data to the client.
      + * This should only be called if there has been an error or if we know
      + * that our send buffers are empty.
      + * Pre-condition: cs is not in any timeout queue and not in the pollset,
      + *                timeout_mutex is not locked
      + * return: 0 if connection is fully closed,
      + *         1 if connection is lingering
      + * may be called by listener thread
      + */
      +static int start_lingering_close_nonblocking(event_conn_state_t *cs)
      +{
      +    conn_rec *c = cs->c;
      +    apr_socket_t *csd = cs->pfd.desc.s;
      +
      +    if (ap_prep_lingering_close(c)
      +        || c->aborted
      +        || ap_shutdown_conn(c, 0) != APR_SUCCESS || c->aborted
      +        || apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS) {
      +        apr_socket_close(csd);
      +        ap_push_pool(worker_queue_info, cs->p);
      +        if (dying)
      +            ap_queue_interrupt_one(worker_queue);
      +        return 0;
      +    }
      +    return start_lingering_close_common(cs, 0);
      +}
      +
      +/*
      + * forcibly close a lingering connection after the lingering period has
      + * expired
      + * Pre-condition: cs is not in any timeout queue and not in the pollset
      + * return: irrelevant (need same prototype as start_lingering_close)
      + */
      +static int stop_lingering_close(event_conn_state_t *cs)
       {
           apr_status_t rv;
           apr_socket_t *csd = ap_get_conn_socket(cs->c);
      @@ -773,22 +923,86 @@ static int stop_lingering_close(conn_state_t *cs)
                        "socket reached timeout in lingering-close state");
           rv = apr_socket_close(csd);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "error closing socket");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00468) "error closing socket");
               AP_DEBUG_ASSERT(0);
           }
      -    apr_pool_clear(cs->p);
           ap_push_pool(worker_queue_info, cs->p);
      +    if (dying)
      +        ap_queue_interrupt_one(worker_queue);
           return 0;
       }
       
      +/*
      + * This runs before any non-MPM cleanup code on the connection;
      + * if the connection is currently suspended as far as modules
      + * know, provide notification of resumption.
      + */
      +static apr_status_t ptrans_pre_cleanup(void *dummy)
      +{
      +    event_conn_state_t *cs = dummy;
      +
      +    if (cs->suspended) {
      +        notify_resume(cs, NULL);
      +    }
      +    return APR_SUCCESS;
      +}
       
      +/*
      + * event_pre_read_request() and event_request_cleanup() track the
      + * current r for a given connection.
      + */
      +static apr_status_t event_request_cleanup(void *dummy)
      +{
      +    conn_rec *c = dummy;
      +    event_conn_state_t *cs = ap_get_module_config(c->conn_config,
      +                                                  &mpm_event_module);
       
      -/*****************************************************************
      - * Child process main loop.
      +    cs->r = NULL;
      +    return APR_SUCCESS;
      +}
      +
      +static void event_pre_read_request(request_rec *r, conn_rec *c)
      +{
      +    event_conn_state_t *cs = ap_get_module_config(c->conn_config,
      +                                                  &mpm_event_module);
      +
      +    cs->r = r;
      +    cs->sc = ap_get_module_config(ap_server_conf->module_config,
      +                                  &mpm_event_module);
      +    apr_pool_cleanup_register(r->pool, c, event_request_cleanup,
      +                              apr_pool_cleanup_null);
      +}
      +
      +/*
      + * event_post_read_request() tracks the current server config for a
      + * given request.
        */
      +static int event_post_read_request(request_rec *r)
      +{
      +    conn_rec *c = r->connection;
      +    event_conn_state_t *cs = ap_get_module_config(c->conn_config,
      +                                                  &mpm_event_module);
      +
      +    /* To preserve legacy behaviour (consistent with other MPMs), use
      +     * the keepalive timeout from the base server (first on this IP:port)
      +     * when none is explicitly configured on this server.
      +     */
      +    if (r->server->keep_alive_timeout_set) {
      +        cs->sc = ap_get_module_config(r->server->module_config,
      +                                      &mpm_event_module);
      +    }
      +    else {
      +        cs->sc = ap_get_module_config(c->base_server->module_config,
      +                                      &mpm_event_module);
      +    }
      +    return OK;
      +}
       
      -static int process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock,
      -                          conn_state_t * cs, int my_child_num,
      +/*
      + * process one connection in the worker
      + */
      +static void process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock,
      +                          event_conn_state_t * cs, int my_child_num,
                                 int my_thread_num)
       {
           conn_rec *c;
      @@ -796,39 +1010,43 @@ static int process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock
           int rc;
           ap_sb_handle_t *sbh;
       
      +    /* XXX: This will cause unbounded mem usage for long lasting connections */
           ap_create_sb_handle(&sbh, p, my_child_num, my_thread_num);
       
           if (cs == NULL) {           /* This is a new connection */
               listener_poll_type *pt = apr_pcalloc(p, sizeof(*pt));
      -        cs = apr_pcalloc(p, sizeof(conn_state_t));
      +        cs = apr_pcalloc(p, sizeof(event_conn_state_t));
               cs->bucket_alloc = apr_bucket_alloc_create(p);
               c = ap_run_create_connection(p, ap_server_conf, sock,
                                            conn_id, sbh, cs->bucket_alloc);
               if (!c) {
      -            apr_bucket_alloc_destroy(cs->bucket_alloc);
      -            apr_pool_clear(p);
                   ap_push_pool(worker_queue_info, p);
      -            return 1;
      +            return;
               }
               apr_atomic_inc32(&connection_count);
      -        apr_pool_cleanup_register(c->pool, NULL, decrement_connection_count, apr_pool_cleanup_null);
      +        apr_pool_cleanup_register(c->pool, cs, decrement_connection_count,
      +                                  apr_pool_cleanup_null);
      +        ap_set_module_config(c->conn_config, &mpm_event_module, cs);
               c->current_thread = thd;
               cs->c = c;
      -        c->cs = cs;
      +        c->cs = &(cs->pub);
               cs->p = p;
      +        cs->sc = ap_get_module_config(ap_server_conf->module_config,
      +                                      &mpm_event_module);
               cs->pfd.desc_type = APR_POLL_SOCKET;
               cs->pfd.reqevents = APR_POLLIN;
               cs->pfd.desc.s = sock;
               pt->type = PT_CSD;
               pt->baton = cs;
               cs->pfd.client_data = pt;
      +        apr_pool_pre_cleanup_register(p, cs, ptrans_pre_cleanup);
               TO_QUEUE_ELEM_INIT(cs);
       
               ap_update_vhost_given_ip(c);
       
               rc = ap_run_pre_connection(c, sock);
               if (rc != OK && rc != DONE) {
      -            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(00469)
                                 "process_socket: connection aborted");
                   c->aborted = 1;
               }
      @@ -846,28 +1064,35 @@ static int process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock
                * When the accept filter is active, sockets are kept in the
                * kernel until a HTTP request is received.
                */
      -        cs->state = CONN_STATE_READ_REQUEST_LINE;
      +        cs->pub.state = CONN_STATE_READ_REQUEST_LINE;
       
      +        cs->pub.sense = CONN_SENSE_DEFAULT;
           }
           else {
               c = cs->c;
      -        c->sbh = sbh;
      +        notify_resume(cs, sbh);
               c->current_thread = thd;
      +        /* Subsequent request on a conn, and thread number is part of ID */
      +        c->id = conn_id;
           }
       
           if (c->clogging_input_filters && !c->aborted) {
      -        /* Since we have an input filter which 'cloggs' the input stream,
      -         * like mod_ssl, lets just do the normal read from input filters,
      -         * like the Worker MPM does.
      +        /* Since we have an input filter which 'clogs' the input stream,
      +         * like mod_ssl used to, lets just do the normal read from input
      +         * filters, like the Worker MPM does. Filters that need to write
      +         * where they would otherwise read, or read where they would
      +         * otherwise write, should set the sense appropriately.
                */
      +        apr_atomic_inc32(&clogged_count);
               ap_run_process_connection(c);
      -        if (cs->state != CONN_STATE_SUSPENDED) {
      -            cs->state = CONN_STATE_LINGER;
      +        if (cs->pub.state != CONN_STATE_SUSPENDED) {
      +            cs->pub.state = CONN_STATE_LINGER;
               }
      +        apr_atomic_dec32(&clogged_count);
           }
       
       read_request:
      -    if (cs->state == CONN_STATE_READ_REQUEST_LINE) {
      +    if (cs->pub.state == CONN_STATE_READ_REQUEST_LINE) {
               if (!c->aborted) {
                   ap_run_process_connection(c);
       
      @@ -877,57 +1102,58 @@ static int process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock
                    */
               }
               else {
      -            cs->state = CONN_STATE_LINGER;
      +            cs->pub.state = CONN_STATE_LINGER;
               }
           }
       
      -    if (cs->state == CONN_STATE_WRITE_COMPLETION) {
      +    if (cs->pub.state == CONN_STATE_WRITE_COMPLETION) {
               ap_filter_t *output_filter = c->output_filters;
               apr_status_t rv;
      -        ap_update_child_status_from_conn(sbh, SERVER_BUSY_WRITE, c);
      +        ap_update_child_status(sbh, SERVER_BUSY_WRITE, NULL);
               while (output_filter->next != NULL) {
                   output_filter = output_filter->next;
               }
               rv = output_filter->frec->filter_func.out_func(output_filter, NULL);
               if (rv != APR_SUCCESS) {
      -            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, rv, c, APLOGNO(00470)
                                 "network write failure in core output filter");
      -            cs->state = CONN_STATE_LINGER;
      +            cs->pub.state = CONN_STATE_LINGER;
               }
               else if (c->data_in_output_filters) {
                   /* Still in WRITE_COMPLETION_STATE:
                    * Set a write timeout for this connection, and let the
                    * event thread poll for writeability.
                    */
      -            cs->expiration_time = ap_server_conf->timeout + apr_time_now();
      +            cs->queue_timestamp = apr_time_now();
      +            notify_suspend(cs);
                   apr_thread_mutex_lock(timeout_mutex);
      -            TO_QUEUE_APPEND(write_completion_q, cs);
      -            apr_thread_mutex_unlock(timeout_mutex);
      -            cs->pfd.reqevents = APR_POLLOUT | APR_POLLHUP | APR_POLLERR;
      +            TO_QUEUE_APPEND(cs->sc->wc_q, cs);
      +            cs->pfd.reqevents = (
      +                    cs->pub.sense == CONN_SENSE_WANT_READ ? APR_POLLIN :
      +                            APR_POLLOUT) | APR_POLLHUP | APR_POLLERR;
      +            cs->pub.sense = CONN_SENSE_DEFAULT;
                   rc = apr_pollset_add(event_pollset, &cs->pfd);
      -            return 1;
      +            apr_thread_mutex_unlock(timeout_mutex);
      +            return;
               }
               else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted ||
                   listener_may_exit) {
      -            c->cs->state = CONN_STATE_LINGER;
      +            cs->pub.state = CONN_STATE_LINGER;
               }
               else if (c->data_in_input_filters) {
      -            cs->state = CONN_STATE_READ_REQUEST_LINE;
      +            cs->pub.state = CONN_STATE_READ_REQUEST_LINE;
                   goto read_request;
               }
               else {
      -            cs->state = CONN_STATE_CHECK_REQUEST_LINE_READABLE;
      +            cs->pub.state = CONN_STATE_CHECK_REQUEST_LINE_READABLE;
               }
           }
       
      -    if (cs->state == CONN_STATE_LINGER) {
      -        if (!start_lingering_close(cs))
      -            return 0;
      +    if (cs->pub.state == CONN_STATE_LINGER) {
      +        start_lingering_close_blocking(cs);
           }
      -    else if (cs->state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) {
      -        apr_status_t rc;
      -
      -        /* It greatly simplifies the logic to use a single timeout value here
      +    else if (cs->pub.state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) {
      +        /* It greatly simplifies the logic to use a single timeout value per q
                * because the new element can just be added to the end of the list and
                * it will stay sorted in expiration time sequence.  If brand new
                * sockets are sent to the event thread for a readability check, this
      @@ -935,43 +1161,50 @@ static int process_socket(apr_thread_t *thd, apr_pool_t * p, apr_socket_t * sock
                * timeout today.  With a normal client, the socket will be readable in
                * a few milliseconds anyway.
                */
      -        cs->expiration_time = ap_server_conf->keep_alive_timeout +
      -                              apr_time_now();
      +        cs->queue_timestamp = apr_time_now();
      +        notify_suspend(cs);
               apr_thread_mutex_lock(timeout_mutex);
      -        TO_QUEUE_APPEND(keepalive_q, cs);
      -        apr_thread_mutex_unlock(timeout_mutex);
      +        TO_QUEUE_APPEND(cs->sc->ka_q, cs);
       
               /* Add work to pollset. */
               cs->pfd.reqevents = APR_POLLIN;
               rc = apr_pollset_add(event_pollset, &cs->pfd);
      +        apr_thread_mutex_unlock(timeout_mutex);
       
               if (rc != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf, APLOGNO(03093)
                                "process_socket: apr_pollset_add failure");
                   AP_DEBUG_ASSERT(rc == APR_SUCCESS);
               }
           }
      -    return 1;
      +    else if (cs->pub.state == CONN_STATE_SUSPENDED) {
      +        apr_atomic_inc32(&suspended_count);
      +        notify_suspend(cs);
      +    }
       }
       
      -/* requests_this_child has gone to zero or below.  See if the admin coded
      +/* conns_this_child has gone to zero or below.  See if the admin coded
          "MaxConnectionsPerChild 0", and keep going in that case.  Doing it this way
          simplifies the hot path in worker_thread */
       static void check_infinite_requests(void)
       {
           if (ap_max_requests_per_child) {
      +        ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
      +                     "Stopping process due to MaxConnectionsPerChild");
               signal_threads(ST_GRACEFUL);
           }
           else {
      -        requests_this_child = INT_MAX;  /* keep going */
      +        /* keep going */
      +        conns_this_child = APR_INT32_MAX;
           }
       }
       
      -static void close_listeners(int process_slot, int *closed) {
      +static void close_listeners(int process_slot, int *closed)
      +{
           if (!*closed) {
               int i;
               disable_listensocks(process_slot);
      -        ap_close_listeners();
      +        ap_close_listeners_ex(my_bucket->listeners);
               *closed = 1;
               dying = 1;
               ap_scoreboard_image->parent[process_slot].quiescing = 1;
      @@ -981,6 +1214,9 @@ static void close_listeners(int process_slot, int *closed) {
               }
               /* wake up the main thread */
               kill(ap_my_pid, SIGTERM);
      +
      +        ap_free_idle_pools(worker_queue_info);
      +        ap_queue_interrupt_all(worker_queue);
           }
       }
       
      @@ -1005,47 +1241,14 @@ static void dummy_signal_handler(int sig)
       }
       
       
      -#if HAVE_SERF
      -static apr_status_t s_socket_add(void *user_baton,
      -                                 apr_pollfd_t *pfd,
      -                                 void *serf_baton)
      -{
      -    s_baton_t *s = (s_baton_t*)user_baton;
      -    /* XXXXX: recycle listener_poll_types */
      -    listener_poll_type *pt = ap_malloc(sizeof(*pt));
      -    pt->type = PT_SERF;
      -    pt->baton = serf_baton;
      -    pfd->client_data = pt;
      -    return apr_pollset_add(s->pollset, pfd);
      -}
      -
      -static apr_status_t s_socket_remove(void *user_baton,
      -                                    apr_pollfd_t *pfd,
      -                                    void *serf_baton)
      -{
      -    s_baton_t *s = (s_baton_t*)user_baton;
      -    listener_poll_type *pt = pfd->client_data;
      -    free(pt);
      -    return apr_pollset_remove(s->pollset, pfd);
      -}
      -#endif
      -
       static apr_status_t init_pollset(apr_pool_t *p)
       {
      -#if HAVE_SERF
      -    s_baton_t *baton = NULL;
      -#endif
           ap_listen_rec *lr;
           listener_poll_type *pt;
           int i = 0;
       
      -    TO_QUEUE_INIT(write_completion_q);
      -    TO_QUEUE_INIT(keepalive_q);
      -    TO_QUEUE_INIT(linger_q);
      -    TO_QUEUE_INIT(short_linger_q);
      -
           listener_pollfd = apr_palloc(p, sizeof(apr_pollfd_t) * num_listensocks);
      -    for (lr = ap_listeners; lr != NULL; lr = lr->next, i++) {
      +    for (lr = my_bucket->listeners; lr != NULL; lr = lr->next, i++) {
               apr_pollfd_t *pfd;
               AP_DEBUG_ASSERT(i < num_listensocks);
               pfd = &listener_pollfd[i];
      @@ -1065,21 +1268,6 @@ static apr_status_t init_pollset(apr_pool_t *p)
               lr->accept_func = ap_unixd_accept;
           }
       
      -#if HAVE_SERF
      -    baton = apr_pcalloc(p, sizeof(*baton));
      -    baton->pollset = event_pollset;
      -    /* TODO: subpools, threads, reuse, etc.  -- currently use malloc() inside :( */
      -    baton->pool = p;
      -
      -    g_serf = serf_context_create_ex(baton,
      -                                    s_socket_add,
      -                                    s_socket_remove, p);
      -
      -    ap_register_provider(p, "mpm_serf",
      -                         "instance", "0", g_serf);
      -
      -#endif
      -
           return APR_SUCCESS;
       }
       
      @@ -1088,28 +1276,17 @@ static apr_status_t push_timer2worker(timer_event_t* te)
           return ap_queue_push_timer(worker_queue, te);
       }
       
      +/*
      + * Pre-condition: pfd->cs is neither in pollset nor timeout queue
      + * this function may only be called by the listener
      + */
       static apr_status_t push2worker(const apr_pollfd_t * pfd,
                                       apr_pollset_t * pollset)
       {
           listener_poll_type *pt = (listener_poll_type *) pfd->client_data;
      -    conn_state_t *cs = (conn_state_t *) pt->baton;
      +    event_conn_state_t *cs = (event_conn_state_t *) pt->baton;
           apr_status_t rc;
       
      -    rc = apr_pollset_remove(pollset, pfd);
      -
      -    /*
      -     * Some of the pollset backends, like KQueue or Epoll
      -     * automagically remove the FD if the socket is closed,
      -     * therefore, we can accept _SUCCESS or _NOTFOUND,
      -     * and we still want to keep going
      -     */
      -    if (rc != APR_SUCCESS && !APR_STATUS_IS_NOTFOUND(rc)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
      -                     "pollset remove failed");
      -        start_lingering_close(cs);
      -        return rc;
      -    }
      -
           rc = ap_queue_push(worker_queue, cs->pfd.desc.s, cs, cs->p);
           if (rc != APR_SUCCESS) {
               /* trash the connection; we couldn't queue the connected
      @@ -1118,8 +1295,7 @@ static apr_status_t push2worker(const apr_pollfd_t * pfd,
               apr_bucket_alloc_destroy(cs->bucket_alloc);
               apr_socket_close(cs->pfd.desc.s);
               ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
      -                     ap_server_conf, "push2worker: ap_queue_push failed");
      -        apr_pool_clear(cs->p);
      +                     ap_server_conf, APLOGNO(00471) "push2worker: ap_queue_push failed");
               ap_push_pool(worker_queue_info, cs->p);
           }
       
      @@ -1151,48 +1327,62 @@ static void get_worker(int *have_idle_worker_p, int blocking, int *all_busy)
           else
               rc = ap_queue_info_try_get_idler(worker_queue_info);
       
      -    if (rc == APR_SUCCESS) {
      +    if (rc == APR_SUCCESS || APR_STATUS_IS_EOF(rc)) {
               *have_idle_worker_p = 1;
           }
           else if (!blocking && rc == APR_EAGAIN) {
               *all_busy = 1;
           }
      -    else if (!APR_STATUS_IS_EOF(rc)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
      +    else {
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf, APLOGNO(00472)
                            "ap_queue_info_wait_for_idler failed.  "
                            "Attempting to shutdown process gracefully");
               signal_threads(ST_GRACEFUL);
           }
       }
       
      -/* XXXXXX: Convert to skiplist or other better data structure
      - * (yes, this is VERY VERY VERY VERY BAD)
      - */
      -
       /* Structures to reuse */
       static APR_RING_HEAD(timer_free_ring_t, timer_event_t) timer_free_ring;
      -/* Active timers */
      -static APR_RING_HEAD(timer_ring_t, timer_event_t) timer_ring;
       
      -static apr_thread_mutex_t *g_timer_ring_mtx;
      +static apr_skiplist *timer_skiplist;
      +
      +/* The following compare function is used by apr_skiplist_insert() to keep the
      + * elements (timers) sorted and provide O(log n) complexity (this is also true
      + * for apr_skiplist_{find,remove}(), but those are not used in MPM event where
      + * inserted timers are not searched nor removed, but with apr_skiplist_pop()
      + * which does use any compare function).  It is meant to return 0 when a == b,
      + * <0 when a < b, and >0 when a > b.  However apr_skiplist_insert() will not
      + * add duplicates (i.e. a == b), and apr_skiplist_add() is only available in
      + * APR 1.6, yet multiple timers could possibly be created in the same micro-
      + * second (duplicates with regard to apr_time_t); therefore we implement the
      + * compare function to return +1 instead of 0 when compared timers are equal,
      + * thus duplicates are still added after each other (in order of insertion).
      + */
      +static int timer_comp(void *a, void *b)
      +{
      +    apr_time_t t1 = (apr_time_t) ((timer_event_t *)a)->when;
      +    apr_time_t t2 = (apr_time_t) ((timer_event_t *)b)->when;
      +    AP_DEBUG_ASSERT(t1);
      +    AP_DEBUG_ASSERT(t2);
      +    return ((t1 < t2) ? -1 : 1);
      +}
      +
      +static apr_thread_mutex_t *g_timer_skiplist_mtx;
       
       static apr_status_t event_register_timed_callback(apr_time_t t,
                                                         ap_mpm_callback_fn_t *cbfn,
                                                         void *baton)
       {
      -    int inserted = 0;
      -    timer_event_t *ep;
           timer_event_t *te;
           /* oh yeah, and make locking smarter/fine grained. */
      -    apr_thread_mutex_lock(g_timer_ring_mtx);
      +    apr_thread_mutex_lock(g_timer_skiplist_mtx);
       
           if (!APR_RING_EMPTY(&timer_free_ring, timer_event_t, link)) {
               te = APR_RING_FIRST(&timer_free_ring);
               APR_RING_REMOVE(te, link);
           }
           else {
      -        /* XXXXX: lol, pool allocation without a context from any thread.Yeah. Right. MPMs Suck. */
      -        te = ap_malloc(sizeof(timer_event_t));
      +        te = apr_skiplist_alloc(timer_skiplist, sizeof(timer_event_t));
               APR_RING_ELEM_INIT(te, link);
           }
       
      @@ -1201,36 +1391,29 @@ static apr_status_t event_register_timed_callback(apr_time_t t,
           /* XXXXX: optimize */
           te->when = t + apr_time_now();
       
      -    /* Okay, insert sorted by when.. */
      -    for (ep = APR_RING_FIRST(&timer_ring);
      -         ep != APR_RING_SENTINEL(&timer_ring,
      -                                 timer_event_t, link);
      -         ep = APR_RING_NEXT(ep, link))
      -    {
      -        if (ep->when > te->when) {
      -            inserted = 1;
      -            APR_RING_INSERT_BEFORE(ep, te, link);
      -            break;
      -        }
      -    }
      -
      -    if (!inserted) {
      -        APR_RING_INSERT_TAIL(&timer_ring, te, timer_event_t, link);
      -    }
      +    /* Okay, add sorted by when.. */
      +    apr_skiplist_insert(timer_skiplist, te);
       
      -    apr_thread_mutex_unlock(g_timer_ring_mtx);
      +    apr_thread_mutex_unlock(g_timer_skiplist_mtx);
       
           return APR_SUCCESS;
       }
       
      -static void process_lingering_close(conn_state_t *cs, const apr_pollfd_t *pfd)
      +
      +/*
      + * Close socket and clean up if remote closed its end while we were in
      + * lingering close.
      + * Only to be called in the listener thread;
      + * Pre-condition: cs is in one of the linger queues and in the pollset
      + */
      +static void process_lingering_close(event_conn_state_t *cs, const apr_pollfd_t *pfd)
       {
           apr_socket_t *csd = ap_get_conn_socket(cs->c);
           char dummybuf[2048];
           apr_size_t nbytes;
           apr_status_t rv;
           struct timeout_queue *q;
      -    q = (cs->state == CONN_STATE_LINGER_SHORT) ?  &short_linger_q : &linger_q;
      +    q = (cs->pub.state == CONN_STATE_LINGER_SHORT) ? short_linger_q : linger_q;
       
           /* socket is already in non-blocking state */
           do {
      @@ -1238,23 +1421,24 @@ static void process_lingering_close(conn_state_t *cs, const apr_pollfd_t *pfd)
               rv = apr_socket_recv(csd, dummybuf, &nbytes);
           } while (rv == APR_SUCCESS);
       
      -    if (!APR_STATUS_IS_EOF(rv)) {
      +    if (APR_STATUS_IS_EAGAIN(rv)) {
               return;
           }
       
      +    apr_thread_mutex_lock(timeout_mutex);
           rv = apr_pollset_remove(event_pollset, pfd);
           AP_DEBUG_ASSERT(rv == APR_SUCCESS);
       
           rv = apr_socket_close(csd);
           AP_DEBUG_ASSERT(rv == APR_SUCCESS);
       
      -    apr_thread_mutex_lock(timeout_mutex);
      -    TO_QUEUE_REMOVE(*q, cs);
      +    TO_QUEUE_REMOVE(q, cs);
           apr_thread_mutex_unlock(timeout_mutex);
           TO_QUEUE_ELEM_INIT(cs);
       
      -    apr_pool_clear(cs->p);
           ap_push_pool(worker_queue_info, cs->p);
      +    if (dying)
      +        ap_queue_interrupt_one(worker_queue);
       }
       
       /* call 'func' for all elements of 'q' with timeout less than 'timeout_time'.
      @@ -1263,36 +1447,68 @@ static void process_lingering_close(conn_state_t *cs, const apr_pollfd_t *pfd)
        */
       static void process_timeout_queue(struct timeout_queue *q,
                                         apr_time_t timeout_time,
      -                                  int (*func)(conn_state_t *))
      +                                  int (*func)(event_conn_state_t *))
       {
      -    int count = 0;
      -    conn_state_t *first, *cs, *last;
      -    if (!q->count) {
      +    int total = 0, count;
      +    event_conn_state_t *first, *cs, *last;
      +    struct timeout_head_t trash;
      +    struct timeout_queue *qp;
      +    apr_status_t rv;
      +
      +    if (!*q->total) {
               return;
           }
      -    AP_DEBUG_ASSERT(!APR_RING_EMPTY(&q->head, conn_state_t, timeout_list));
       
      -    cs = first = APR_RING_FIRST(&q->head);
      -    while (cs != APR_RING_SENTINEL(&q->head, conn_state_t, timeout_list)
      -           && cs->expiration_time < timeout_time) {
      -        last = cs;
      -        cs = APR_RING_NEXT(cs, timeout_list);
      -        count++;
      +    APR_RING_INIT(&trash, event_conn_state_t, timeout_list);
      +    for (qp = q; qp; qp = qp->next) {
      +        count = 0;
      +        cs = first = last = APR_RING_FIRST(&qp->head);
      +        while (cs != APR_RING_SENTINEL(&qp->head, event_conn_state_t,
      +                                       timeout_list)
      +               /* Trash the entry if:
      +                * - no timeout_time was given (asked for all), or
      +                * - it expired (according to the queue timeout), or
      +                * - the system clock skewed in the past: no entry should be
      +                *   registered above the given timeout_time (~now) + the queue
      +                *   timeout, we won't keep any here (eg. for centuries).
      +                * Stop otherwise, no following entry will match thanks to the
      +                * single timeout per queue (entries are added to the end!).
      +                * This allows maintenance in O(1).
      +                */
      +               && (!timeout_time
      +                   || cs->queue_timestamp + qp->timeout < timeout_time
      +                   || cs->queue_timestamp > timeout_time + qp->timeout)) {
      +            last = cs;
      +            rv = apr_pollset_remove(event_pollset, &cs->pfd);
      +            if (rv != APR_SUCCESS && !APR_STATUS_IS_NOTFOUND(rv)) {
      +                ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, cs->c, APLOGNO(00473)
      +                              "apr_pollset_remove failed");
      +            }
      +            cs = APR_RING_NEXT(cs, timeout_list);
      +            count++;
      +        }
      +        if (!count)
      +            continue;
      +
      +        APR_RING_UNSPLICE(first, last, timeout_list);
      +        APR_RING_SPLICE_TAIL(&trash, first, last, event_conn_state_t,
      +                             timeout_list);
      +        qp->count -= count;
      +        total += count;
           }
      -    if (!count)
      +    if (!total)
               return;
       
      -    APR_RING_UNSPLICE(first, last, timeout_list);
      -    AP_DEBUG_ASSERT(q->count >= count);
      -    q->count -= count;
      +    AP_DEBUG_ASSERT(*q->total >= total);
      +    *q->total -= total;
           apr_thread_mutex_unlock(timeout_mutex);
      -    while (count) {
      +    first = APR_RING_FIRST(&trash);
      +    do {
               cs = APR_RING_NEXT(first, timeout_list);
               TO_QUEUE_ELEM_INIT(first);
               func(first);
               first = cs;
      -        count--;
      -    }
      +    } while (--total);
           apr_thread_mutex_lock(timeout_mutex);
       }
       
      @@ -1302,13 +1518,12 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
           timer_event_t *te;
           apr_status_t rc;
           proc_info *ti = dummy;
      -    int process_slot = ti->pid;
      +    int process_slot = ti->pslot;
           apr_pool_t *tpool = apr_thread_pool_get(thd);
           void *csd = NULL;
           apr_pool_t *ptrans;         /* Pool for per-transaction stuff */
           ap_listen_rec *lr;
           int have_idle_worker = 0;
      -    conn_state_t *cs;
           const apr_pollfd_t *out_pfd;
           apr_int32_t num = 0;
           apr_interval_time_t timeout_interval;
      @@ -1351,9 +1566,8 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                       break;
               }
       
      -        if (requests_this_child <= 0) {
      +        if (conns_this_child <= 0)
                   check_infinite_requests();
      -        }
       
               now = apr_time_now();
               if (APLOGtrace6(ap_server_conf)) {
      @@ -1362,18 +1576,27 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                       last_log = now;
                       apr_thread_mutex_lock(timeout_mutex);
                       ap_log_error(APLOG_MARK, APLOG_TRACE6, 0, ap_server_conf,
      -                             "connections: %d (write-completion: %d "
      -                             "keep-alive: %d lingering: %d)",
      -                             connection_count, write_completion_q.count,
      -                             keepalive_q.count,
      -                             linger_q.count + short_linger_q.count);
      +                             "connections: %u (clogged: %u write-completion: %d "
      +                             "keep-alive: %d lingering: %d suspended: %u)",
      +                             apr_atomic_read32(&connection_count),
      +                             apr_atomic_read32(&clogged_count),
      +                             *write_completion_q->total,
      +                             *keepalive_q->total,
      +                             apr_atomic_read32(&lingering_count),
      +                             apr_atomic_read32(&suspended_count));
      +                if (dying) {
      +                    ap_log_error(APLOG_MARK, APLOG_TRACE6, 0, ap_server_conf,
      +                                 "%u/%u workers shutdown",
      +                                 apr_atomic_read32(&threads_shutdown),
      +                                 threads_per_child);
      +                }
                       apr_thread_mutex_unlock(timeout_mutex);
                   }
               }
       
      -        apr_thread_mutex_lock(g_timer_ring_mtx);
      -        if (!APR_RING_EMPTY(&timer_ring, timer_event_t, link)) {
      -            te = APR_RING_FIRST(&timer_ring);
      +        apr_thread_mutex_lock(g_timer_skiplist_mtx);
      +        te = apr_skiplist_peek(timer_skiplist);
      +        if (te) {
                   if (te->when > now) {
                       timeout_interval = te->when - now;
                   }
      @@ -1384,14 +1607,8 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
               else {
                   timeout_interval = apr_time_from_msec(100);
               }
      -        apr_thread_mutex_unlock(g_timer_ring_mtx);
      +        apr_thread_mutex_unlock(g_timer_skiplist_mtx);
       
      -#if HAVE_SERF
      -        rc = serf_context_prerun(g_serf);
      -        if (rc != APR_SUCCESS) {
      -            /* TOOD: what should do here? ugh. */
      -        }
      -#endif
               rc = apr_pollset_poll(event_pollset, timeout_interval, &num, &out_pfd);
               if (rc != APR_SUCCESS) {
                   if (APR_STATUS_IS_EINTR(rc)) {
      @@ -1413,33 +1630,32 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
               }
       
               now = apr_time_now();
      -        apr_thread_mutex_lock(g_timer_ring_mtx);
      -        for (ep = APR_RING_FIRST(&timer_ring);
      -             ep != APR_RING_SENTINEL(&timer_ring,
      -                                     timer_event_t, link);
      -             ep = APR_RING_FIRST(&timer_ring))
      -        {
      +        apr_thread_mutex_lock(g_timer_skiplist_mtx);
      +        ep = apr_skiplist_peek(timer_skiplist);
      +        while (ep) {
                   if (ep->when < now + EVENT_FUDGE_FACTOR) {
      -                APR_RING_REMOVE(ep, link);
      +                apr_skiplist_pop(timer_skiplist, NULL);
                       push_timer2worker(ep);
                   }
                   else {
                       break;
                   }
      +            ep = apr_skiplist_peek(timer_skiplist);
               }
      -        apr_thread_mutex_unlock(g_timer_ring_mtx);
      +        apr_thread_mutex_unlock(g_timer_skiplist_mtx);
       
               while (num) {
                   pt = (listener_poll_type *) out_pfd->client_data;
                   if (pt->type == PT_CSD) {
                       /* one of the sockets is readable */
      -                struct timeout_queue *remove_from_q = &write_completion_q;
      +                event_conn_state_t *cs = (event_conn_state_t *) pt->baton;
      +                struct timeout_queue *remove_from_q = cs->sc->wc_q;
                       int blocking = 1;
      -                cs = (conn_state_t *) pt->baton;
      -                switch (cs->state) {
      +
      +                switch (cs->pub.state) {
                       case CONN_STATE_CHECK_REQUEST_LINE_READABLE:
      -                    cs->state = CONN_STATE_READ_REQUEST_LINE;
      -                    remove_from_q = &keepalive_q;
      +                    cs->pub.state = CONN_STATE_READ_REQUEST_LINE;
      +                    remove_from_q = cs->sc->ka_q;
                           /* don't wait for a worker for a keepalive request */
                           blocking = 0;
                           /* FALL THROUGH */
      @@ -1447,21 +1663,37 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                           get_worker(&have_idle_worker, blocking,
                                      &workers_were_busy);
                           apr_thread_mutex_lock(timeout_mutex);
      -                    TO_QUEUE_REMOVE(*remove_from_q, cs);
      +                    TO_QUEUE_REMOVE(remove_from_q, cs);
      +                    rc = apr_pollset_remove(event_pollset, &cs->pfd);
                           apr_thread_mutex_unlock(timeout_mutex);
      +
      +                    /*
      +                     * Some of the pollset backends, like KQueue or Epoll
      +                     * automagically remove the FD if the socket is closed,
      +                     * therefore, we can accept _SUCCESS or _NOTFOUND,
      +                     * and we still want to keep going
      +                     */
      +                    if (rc != APR_SUCCESS && !APR_STATUS_IS_NOTFOUND(rc)) {
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
      +                                     APLOGNO(03094) "pollset remove failed");
      +                        start_lingering_close_nonblocking(cs);
      +                        break;
      +                    }
      +
                           TO_QUEUE_ELEM_INIT(cs);
                           /* If we didn't get a worker immediately for a keep-alive
                            * request, we close the connection, so that the client can
                            * re-connect to a different process.
                            */
                           if (!have_idle_worker) {
      -                        start_lingering_close(cs);
      +                        start_lingering_close_nonblocking(cs);
                               break;
                           }
                           rc = push2worker(out_pfd, event_pollset);
                           if (rc != APR_SUCCESS) {
                               ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
      -                                     ap_server_conf, "push2worker failed");
      +                                     ap_server_conf, APLOGNO(03095)
      +                                     "push2worker failed");
                           }
                           else {
                               have_idle_worker = 0;
      @@ -1473,10 +1705,10 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                           break;
                       default:
                           ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
      -                                 ap_server_conf,
      +                                 ap_server_conf, APLOGNO(03096)
                                        "event_loop: unexpected state %d",
      -                                 cs->state);
      -                    AP_DEBUG_ASSERT(0);
      +                                 cs->pub.state);
      +                    ap_assert(0);
                       }
                   }
                   else if (pt->type == PT_ACCEPT) {
      @@ -1486,12 +1718,14 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                               disable_listensocks(process_slot);
                           listeners_disabled = 1;
                           ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      -                                 "All workers busy, not accepting new conns"
      +                                 "All workers busy, not accepting new conns "
                                        "in this process");
                       }
      -                else if (apr_atomic_read32(&connection_count) > threads_per_child
      -                         + ap_queue_info_get_idlers(worker_queue_info) *
      -                           worker_factor / WORKER_FACTOR_SCALE)
      +                else if (  (int)apr_atomic_read32(&connection_count)
      +                           - (int)apr_atomic_read32(&lingering_count)
      +                         > threads_per_child
      +                           + ap_queue_info_get_idlers(worker_queue_info) *
      +                             worker_factor / WORKER_FACTOR_SCALE)
                       {
                           if (!listeners_disabled)
                               disable_listensocks(process_slot);
      @@ -1523,7 +1757,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                               apr_allocator_owner_set(allocator, ptrans);
                               if (ptrans == NULL) {
                                   ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
      -                                         ap_server_conf,
      +                                         ap_server_conf, APLOGNO(03097)
                                                "Failed to create transaction pool");
                                   signal_threads(ST_GRACEFUL);
                                   return NULL;
      @@ -1546,6 +1780,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                           }
       
                           if (csd != NULL) {
      +                        conns_this_child--;
                               rc = ap_queue_push(worker_queue, csd, NULL, ptrans);
                               if (rc != APR_SUCCESS) {
                                   /* trash the connection; we couldn't queue the connected
      @@ -1553,9 +1788,8 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                                    */
                                   apr_socket_close(csd);
                                   ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
      -                                         ap_server_conf,
      +                                         ap_server_conf, APLOGNO(03098)
                                                "ap_queue_push failed");
      -                            apr_pool_clear(ptrans);
                                   ap_push_pool(worker_queue_info, ptrans);
                               }
                               else {
      @@ -1563,18 +1797,10 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                               }
                           }
                           else {
      -                        apr_pool_clear(ptrans);
                               ap_push_pool(worker_queue_info, ptrans);
                           }
                       }
                   }               /* if:else on pt->type */
      -#if HAVE_SERF
      -            else if (pt->type == PT_SERF) {
      -                /* send socket to serf. */
      -                /* XXXX: this doesn't require get_worker() */
      -                serf_event_trigger(g_serf, pt->baton, out_pfd);
      -            }
      -#endif
                   out_pfd++;
                   num--;
               }                   /* while for processing poll */
      @@ -1583,8 +1809,11 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                * r->request_time for new requests
                */
               now = apr_time_now();
      -        /* we only do this once per 0.1s (TIMEOUT_FUDGE_FACTOR) */
      -        if (now > timeout_time) {
      +        /* We only do this once per 0.1s (TIMEOUT_FUDGE_FACTOR), or on a clock
      +         * skew (if the system time is set back in the meantime, timeout_time
      +         * will exceed now + TIMEOUT_FUDGE_FACTOR, can't happen otherwise).
      +         */
      +        if (now > timeout_time || now + TIMEOUT_FUDGE_FACTOR < timeout_time ) {
                   struct process_score *ps;
                   timeout_time = now + TIMEOUT_FUDGE_FACTOR;
       
      @@ -1595,39 +1824,41 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                   /* If all workers are busy, we kill older keep-alive connections so that they
                    * may connect to another process.
                    */
      -            if (workers_were_busy && keepalive_q.count) {
      -                ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
      -                             "All workers are busy, will close %d keep-alive "
      -                             "connections",
      -                             keepalive_q.count);
      -                process_timeout_queue(&keepalive_q,
      -                                      timeout_time + ap_server_conf->keep_alive_timeout,
      -                                      start_lingering_close);
      +            if ((workers_were_busy || dying) && *keepalive_q->total) {
      +                if (!dying)
      +                    ap_log_error(APLOG_MARK, APLOG_TRACE1, 0, ap_server_conf,
      +                                 "All workers are busy, will close %d keep-alive "
      +                                 "connections",
      +                                 *keepalive_q->total);
      +                process_timeout_queue(keepalive_q, 0,
      +                                      start_lingering_close_nonblocking);
                   }
                   else {
      -                process_timeout_queue(&keepalive_q, timeout_time,
      -                                      start_lingering_close);
      +                process_timeout_queue(keepalive_q, timeout_time,
      +                                      start_lingering_close_nonblocking);
                   }
                   /* Step 2: write completion timeouts */
      -            process_timeout_queue(&write_completion_q, timeout_time, start_lingering_close);
      +            process_timeout_queue(write_completion_q, timeout_time,
      +                                  start_lingering_close_nonblocking);
                   /* Step 3: (normal) lingering close completion timeouts */
      -            process_timeout_queue(&linger_q, timeout_time, stop_lingering_close);
      +            process_timeout_queue(linger_q, timeout_time, stop_lingering_close);
                   /* Step 4: (short) lingering close completion timeouts */
      -            process_timeout_queue(&short_linger_q, timeout_time, stop_lingering_close);
      +            process_timeout_queue(short_linger_q, timeout_time, stop_lingering_close);
       
                   ps = ap_get_scoreboard_process(process_slot);
      -            ps->write_completion = write_completion_q.count;
      -            ps->lingering_close = linger_q.count + short_linger_q.count;
      -            ps->keep_alive = keepalive_q.count;
      +            ps->write_completion = *write_completion_q->total;
      +            ps->keep_alive = *keepalive_q->total;
                   apr_thread_mutex_unlock(timeout_mutex);
       
                   ps->connections = apr_atomic_read32(&connection_count);
      -            /* XXX: should count CONN_STATE_SUSPENDED and set ps->suspended */
      -        }
      -        if (listeners_disabled && !workers_were_busy &&
      -            (int)apr_atomic_read32(&connection_count) <
      -            ((int)ap_queue_info_get_idlers(worker_queue_info) - 1) *
      -            worker_factor / WORKER_FACTOR_SCALE + threads_per_child)
      +            ps->suspended = apr_atomic_read32(&suspended_count);
      +            ps->lingering_close = apr_atomic_read32(&lingering_count);
      +        }
      +        if (listeners_disabled && !workers_were_busy
      +            && (int)apr_atomic_read32(&connection_count)
      +               - (int)apr_atomic_read32(&lingering_count)
      +               < ((int)ap_queue_info_get_idlers(worker_queue_info) - 1)
      +                 * worker_factor / WORKER_FACTOR_SCALE + threads_per_child)
               {
                   listeners_disabled = 0;
                   enable_listensocks(process_slot);
      @@ -1645,6 +1876,34 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
           return NULL;
       }
       
      +/*
      + * During graceful shutdown, if there are more running worker threads than
      + * open connections, exit one worker thread.
      + *
      + * return 1 if thread should exit, 0 if it should continue running.
      + */
      +static int worker_thread_should_exit_early(void)
      +{
      +    for (;;) {
      +        apr_uint32_t conns = apr_atomic_read32(&connection_count);
      +        apr_uint32_t dead = apr_atomic_read32(&threads_shutdown);
      +        apr_uint32_t newdead;
      +
      +        AP_DEBUG_ASSERT(dead <= threads_per_child);
      +        if (conns >= threads_per_child - dead)
      +            return 0;
      +
      +        newdead = dead + 1;
      +        if (apr_atomic_cas32(&threads_shutdown, newdead, dead) == dead) {
      +            /*
      +             * No other thread has exited in the mean time, safe to exit
      +             * this one.
      +             */
      +            return 1;
      +        }
      +    }
      +}
      +
       /* XXX For ungraceful termination/restart, we definitely don't want to
        *     wait for active connections to finish but we may want to wait
        *     for idle workers to get out of the queue code and release mutexes,
      @@ -1655,10 +1914,10 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
       static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
       {
           proc_info *ti = dummy;
      -    int process_slot = ti->pid;
      -    int thread_slot = ti->tid;
      +    int process_slot = ti->pslot;
      +    int thread_slot = ti->tslot;
           apr_socket_t *csd = NULL;
      -    conn_state_t *cs;
      +    event_conn_state_t *cs;
           apr_pool_t *ptrans;         /* Pool for per-transaction stuff */
           apr_status_t rv;
           int is_idle = 0;
      @@ -1686,11 +1945,15 @@ static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
               }
       
               ap_update_child_status_from_indexes(process_slot, thread_slot,
      -                                            dying ? SERVER_GRACEFUL : SERVER_READY, NULL);
      +                                            dying ? SERVER_GRACEFUL
      +                                                  : SERVER_READY, NULL);
             worker_pop:
               if (workers_may_exit) {
                   break;
               }
      +        if (dying && worker_thread_should_exit_early()) {
      +            break;
      +        }
       
               te = NULL;
               rv = ap_queue_pop_something(worker_queue, &csd, &cs, &ptrans, &te);
      @@ -1719,7 +1982,7 @@ static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
                   /* We got some other error. */
                   else if (!workers_may_exit) {
                       ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      -                             "ap_queue_pop failed");
      +                             APLOGNO(03099) "ap_queue_pop failed");
                   }
                   continue;
               }
      @@ -1727,26 +1990,22 @@ static void *APR_THREAD_FUNC worker_thread(apr_thread_t * thd, void *dummy)
                   te->cbfunc(te->baton);
       
                   {
      -                apr_thread_mutex_lock(g_timer_ring_mtx);
      +                apr_thread_mutex_lock(g_timer_skiplist_mtx);
                       APR_RING_INSERT_TAIL(&timer_free_ring, te, timer_event_t, link);
      -                apr_thread_mutex_unlock(g_timer_ring_mtx);
      +                apr_thread_mutex_unlock(g_timer_skiplist_mtx);
                   }
               }
               else {
                   is_idle = 0;
                   worker_sockets[thread_slot] = csd;
      -            rv = process_socket(thd, ptrans, csd, cs, process_slot, thread_slot);
      -            if (!rv) {
      -                requests_this_child--;
      -            }
      +            process_socket(thd, ptrans, csd, cs, process_slot, thread_slot);
                   worker_sockets[thread_slot] = NULL;
               }
           }
       
           ap_update_child_status_from_indexes(process_slot, thread_slot,
      -                                        dying ? SERVER_DEAD :
      -                                        SERVER_GRACEFUL,
      -                                        (request_rec *) NULL);
      +                                        dying ? SERVER_DEAD
      +                                              : SERVER_GRACEFUL, NULL);
       
           apr_thread_exit(thd, APR_SUCCESS);
           return NULL;
      @@ -1772,13 +2031,12 @@ static void create_listener_thread(thread_starter * ts)
           apr_status_t rv;
       
           my_info = (proc_info *) ap_malloc(sizeof(proc_info));
      -    my_info->pid = my_child_num;
      -    my_info->tid = -1;          /* listener thread doesn't have a thread slot */
      -    my_info->sd = 0;
      +    my_info->pslot = my_child_num;
      +    my_info->tslot = -1;      /* listener thread doesn't have a thread slot */
           rv = apr_thread_create(&ts->listener, thread_attr, listener_thread,
                                  my_info, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00474)
                            "apr_thread_create: unable to create listener thread");
               /* let the parent decide how bad this really is */
               clean_child_exit(APEXIT_CHILDSICK);
      @@ -1796,8 +2054,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
           thread_starter *ts = dummy;
           apr_thread_t **threads = ts->threads;
           apr_threadattr_t *thread_attr = ts->threadattr;
      -    int child_num_arg = ts->child_num_arg;
      -    int my_child_num = child_num_arg;
      +    int my_child_num = ts->child_num_arg;
           proc_info *my_info;
           apr_status_t rv;
           int i;
      @@ -1806,13 +2063,14 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
           int loops;
           int prev_threads_created;
           int max_recycled_pools = -1;
      +    int good_methods[] = {APR_POLLSET_KQUEUE, APR_POLLSET_PORT, APR_POLLSET_EPOLL};
       
           /* We must create the fd queues before we start up the listener
            * and worker threads. */
           worker_queue = apr_pcalloc(pchild, sizeof(*worker_queue));
           rv = ap_queue_init(worker_queue, threads_per_child, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(03100)
                            "ap_queue_init() failed");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1827,7 +2085,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
           rv = ap_queue_info_create(&worker_queue_info, pchild,
                                     threads_per_child, max_recycled_pools);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(03101)
                            "ap_queue_info_create() failed");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1838,24 +2096,40 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
           rv = apr_thread_mutex_create(&timeout_mutex, APR_THREAD_MUTEX_DEFAULT,
                                        pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(03102)
                            "creation of the timeout mutex failed.");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
       
           /* Create the main pollset */
      -    rv = apr_pollset_create(&event_pollset,
      -                            threads_per_child, /* XXX don't we need more, to handle
      +    for (i = 0; i < sizeof(good_methods) / sizeof(good_methods[0]); i++) {
      +        rv = apr_pollset_create_ex(&event_pollset,
      +                            threads_per_child*2, /* XXX don't we need more, to handle
                                                       * connections in K-A or lingering
                                                       * close?
                                                       */
      -                            pchild, APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY);
      +                            pchild, APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY | APR_POLLSET_NODEFAULT,
      +                            good_methods[i]);
      +        if (rv == APR_SUCCESS) {
      +            break;
      +        }
      +    }
      +    if (rv != APR_SUCCESS) {
      +        rv = apr_pollset_create(&event_pollset,
      +                               threads_per_child*2, /* XXX don't we need more, to handle
      +                                                     * connections in K-A or lingering
      +                                                     * close?
      +                                                     */
      +                               pchild, APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY);
      +    }
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(03103)
                            "apr_pollset_create with Thread Safety failed.");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
       
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02471)
      +                 "start_threads: Using %s", apr_pollset_method_name(event_pollset));
           worker_sockets = apr_pcalloc(pchild, threads_per_child
                                        * sizeof(apr_socket_t *));
       
      @@ -1864,16 +2138,15 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
               /* threads_per_child does not include the listener thread */
               for (i = 0; i < threads_per_child; i++) {
                   int status =
      -                ap_scoreboard_image->servers[child_num_arg][i].status;
      +                ap_scoreboard_image->servers[my_child_num][i].status;
       
      -            if (status != SERVER_GRACEFUL && status != SERVER_DEAD) {
      +            if (status != SERVER_DEAD) {
                       continue;
                   }
       
                   my_info = (proc_info *) ap_malloc(sizeof(proc_info));
      -            my_info->pid = my_child_num;
      -            my_info->tid = i;
      -            my_info->sd = 0;
      +            my_info->pslot = my_child_num;
      +            my_info->tslot = i;
       
                   /* We are creating threads right now */
                   ap_update_child_status_from_indexes(my_child_num, i,
      @@ -1885,6 +2158,7 @@ static void *APR_THREAD_FUNC start_threads(apr_thread_t * thd, void *dummy)
                                          worker_thread, my_info, pchild);
                   if (rv != APR_SUCCESS) {
                       ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +                             APLOGNO(03104)
                                    "apr_thread_create: unable to create worker thread");
                       /* let the parent decide how bad this really is */
                       clean_child_exit(APEXIT_CHILDSICK);
      @@ -1955,13 +2229,13 @@ static void join_workers(apr_thread_t * listener, apr_thread_t ** threads)
                   ++iter;
               }
               if (iter >= 10) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00475)
                                "the listener thread didn't stop accepting");
               }
               else {
                   rv = apr_thread_join(&thread_rv, listener);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00476)
                                    "apr_thread_join: unable to join listener thread");
                   }
               }
      @@ -1971,7 +2245,7 @@ static void join_workers(apr_thread_t * listener, apr_thread_t ** threads)
               if (threads[i]) {       /* if we ever created this thread */
                   rv = apr_thread_join(&thread_rv, threads[i]);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00477)
                                    "apr_thread_join: unable to join worker "
                                    "thread %d", i);
                   }
      @@ -1989,18 +2263,19 @@ static void join_start_thread(apr_thread_t * start_thread_id)
                                        */
           rv = apr_thread_join(&thread_rv, start_thread_id);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00478)
                            "apr_thread_join: unable to join the start " "thread");
           }
       }
       
      -static void child_main(int child_num_arg)
      +static void child_main(int child_num_arg, int child_bucket)
       {
           apr_thread_t **threads;
           apr_status_t rv;
           thread_starter *ts;
           apr_threadattr_t *thread_attr;
           apr_thread_t *start_thread_id;
      +    int i;
       
           mpm_state = AP_MPMQ_STARTING;       /* for benefit of any hooks that run as this
                                                * child initializes
      @@ -2009,6 +2284,14 @@ static void child_main(int child_num_arg)
           ap_fatal_signal_child_setup(ap_server_conf);
           apr_pool_create(&pchild, pconf);
       
      +    /* close unused listeners and pods */
      +    for (i = 0; i < retained->num_buckets; i++) {
      +        if (i != child_bucket) {
      +            ap_close_listeners_ex(all_buckets[i].listeners);
      +            ap_mpm_podx_close(all_buckets[i].pod);
      +        }
      +    }
      +
           /*stuff to do before we switch id's, so we have permissions. */
           ap_reopen_scoreboard(pchild, NULL, 0);
       
      @@ -2016,9 +2299,10 @@ static void child_main(int child_num_arg)
               clean_child_exit(APEXIT_CHILDFATAL);
           }
       
      -    apr_thread_mutex_create(&g_timer_ring_mtx, APR_THREAD_MUTEX_DEFAULT, pchild);
      +    apr_thread_mutex_create(&g_timer_skiplist_mtx, APR_THREAD_MUTEX_DEFAULT, pchild);
           APR_RING_INIT(&timer_free_ring, timer_event_t, link);
      -    APR_RING_INIT(&timer_ring, timer_event_t, link);
      +    apr_skiplist_init(&timer_skiplist, pchild);
      +    apr_skiplist_set_compare(timer_skiplist, timer_comp, timer_comp);
           ap_run_child_init(pchild, ap_server_conf);
       
           /* done with init critical section */
      @@ -2029,17 +2313,17 @@ static void child_main(int child_num_arg)
            */
           rv = apr_setup_signal_thread();
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(00479)
                            "Couldn't initialize signal thread");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
       
           if (ap_max_requests_per_child) {
      -        requests_this_child = ap_max_requests_per_child;
      +        conns_this_child = ap_max_requests_per_child;
           }
           else {
               /* coding a value of zero means infinity */
      -        requests_this_child = INT_MAX;
      +        conns_this_child = APR_INT32_MAX;
           }
       
           /* Setup worker threads */
      @@ -2055,7 +2339,13 @@ static void child_main(int child_num_arg)
           apr_threadattr_detach_set(thread_attr, 0);
       
           if (ap_thread_stacksize != 0) {
      -        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
      +        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
      +        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02436)
      +                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
      +                         "inappropriate, using default", 
      +                         ap_thread_stacksize);
      +        }
           }
       
           ts->threads = threads;
      @@ -2066,7 +2356,7 @@ static void child_main(int child_num_arg)
           rv = apr_thread_create(&start_thread_id, thread_attr, start_threads,
                                  ts, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00480)
                            "apr_thread_create: unable to create worker thread");
               /* let the parent decide how bad this really is */
               clean_child_exit(APEXIT_CHILDSICK);
      @@ -2111,25 +2401,25 @@ static void child_main(int child_num_arg)
               apr_signal(SIGTERM, dummy_signal_handler);
               /* Watch for any messages from the parent over the POD */
               while (1) {
      -            rv = ap_event_pod_check(pod);
      -            if (rv == AP_NORESTART) {
      +            rv = ap_mpm_podx_check(my_bucket->pod);
      +            if (rv == AP_MPM_PODX_NORESTART) {
                       /* see if termination was triggered while we slept */
                       switch (terminate_mode) {
                       case ST_GRACEFUL:
      -                    rv = AP_GRACEFUL;
      +                    rv = AP_MPM_PODX_GRACEFUL;
                           break;
                       case ST_UNGRACEFUL:
      -                    rv = AP_RESTART;
      +                    rv = AP_MPM_PODX_RESTART;
                           break;
                       }
                   }
      -            if (rv == AP_GRACEFUL || rv == AP_RESTART) {
      +            if (rv == AP_MPM_PODX_GRACEFUL || rv == AP_MPM_PODX_RESTART) {
                       /* make sure the start thread has finished;
                        * signal_threads() and join_workers depend on that
                        */
                       join_start_thread(start_thread_id);
                       signal_threads(rv ==
      -                               AP_GRACEFUL ? ST_GRACEFUL : ST_UNGRACEFUL);
      +                               AP_MPM_PODX_GRACEFUL ? ST_GRACEFUL : ST_UNGRACEFUL);
                       break;
                   }
               }
      @@ -2149,7 +2439,7 @@ static void child_main(int child_num_arg)
           clean_child_exit(resource_shortage ? APEXIT_CHILDSICK : 0);
       }
       
      -static int make_child(server_rec * s, int slot)
      +static int make_child(server_rec * s, int slot, int bucket)
       {
           int pid;
       
      @@ -2157,15 +2447,28 @@ static int make_child(server_rec * s, int slot)
               retained->max_daemons_limit = slot + 1;
           }
       
      +    if (ap_scoreboard_image->parent[slot].pid != 0) {
      +        /* XXX replace with assert or remove ? */
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(03455)
      +                 "BUG: Scoreboard slot %d should be empty but is "
      +                 "in use by pid %" APR_PID_T_FMT,
      +                 slot, ap_scoreboard_image->parent[slot].pid);
      +        return -1;
      +    }
      +
           if (one_process) {
      +        my_bucket = &all_buckets[0];
      +
               set_signals();
               event_note_child_started(slot, getpid());
      -        child_main(slot);
      +        child_main(slot, 0);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return -1;
           }
       
           if ((pid = fork()) == -1) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s, APLOGNO(00481)
                            "fork: Unable to fork new process");
       
               /* fork didn't succeed.  There's no need to touch the scoreboard;
      @@ -2184,6 +2487,8 @@ static int make_child(server_rec * s, int slot)
           }
       
           if (!pid) {
      +        my_bucket = &all_buckets[bucket];
      +
       #ifdef HAVE_BINDPROCESSOR
               /* By default, AIX binds to a single processor.  This bit unbinds
                * children which will then bind to another CPU.
      @@ -2192,26 +2497,24 @@ static int make_child(server_rec * s, int slot)
                                          PROCESSOR_CLASS_ANY);
               if (status != OK)
                   ap_log_error(APLOG_MARK, APLOG_DEBUG, errno,
      -                         ap_server_conf,
      +                         ap_server_conf, APLOGNO(00482)
                                "processor unbind failed");
       #endif
               RAISE_SIGSTOP(MAKE_CHILD);
       
               apr_signal(SIGTERM, just_die);
      -        child_main(slot);
      +        child_main(slot, bucket);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return -1;
           }
      -    /* else */
      -    if (ap_scoreboard_image->parent[slot].pid != 0) {
      -        /* This new child process is squatting on the scoreboard
      -         * entry owned by an exiting child process, which cannot
      -         * exit until all active requests complete.
      -         */
      -        event_note_child_lost_slot(slot, pid);
      -    }
      +
           ap_scoreboard_image->parent[slot].quiescing = 0;
           ap_scoreboard_image->parent[slot].not_accepting = 0;
      +    ap_scoreboard_image->parent[slot].bucket = bucket;
           event_note_child_started(slot, pid);
      +    active_daemons++;
      +    retained->total_daemons++;
           return 0;
       }
       
      @@ -2220,128 +2523,91 @@ static void startup_children(int number_to_start)
       {
           int i;
       
      -    for (i = 0; number_to_start && i < ap_daemons_limit; ++i) {
      +    for (i = 0; number_to_start && i < server_limit; ++i) {
               if (ap_scoreboard_image->parent[i].pid != 0) {
                   continue;
               }
      -        if (make_child(ap_server_conf, i) < 0) {
      +        if (make_child(ap_server_conf, i, i % retained->num_buckets) < 0) {
                   break;
               }
               --number_to_start;
           }
       }
       
      -static void perform_idle_server_maintenance(void)
      +static void perform_idle_server_maintenance(int child_bucket, int num_buckets)
       {
           int i, j;
      -    int idle_thread_count;
      +    int idle_thread_count = 0;
           worker_score *ws;
           process_score *ps;
      -    int free_length;
      -    int totally_free_length = 0;
      +    int free_length = 0;
           int free_slots[MAX_SPAWN_RATE];
      -    int last_non_dead;
      -    int total_non_dead;
      +    int last_non_dead = -1;
           int active_thread_count = 0;
       
      -    /* initialize the free_list */
      -    free_length = 0;
      -
      -    idle_thread_count = 0;
      -    last_non_dead = -1;
      -    total_non_dead = 0;
      -
      -    for (i = 0; i < ap_daemons_limit; ++i) {
      +    for (i = 0; i < server_limit; ++i) {
               /* Initialization to satisfy the compiler. It doesn't know
                * that threads_per_child is always > 0 */
               int status = SERVER_DEAD;
      -        int any_dying_threads = 0;
      -        int any_dead_threads = 0;
      -        int all_dead_threads = 1;
      +        int child_threads_active = 0;
       
      -        if (i >= retained->max_daemons_limit
      -            && totally_free_length == retained->idle_spawn_rate)
      +        if (i >= retained->max_daemons_limit &&
      +            free_length == retained->idle_spawn_rate[child_bucket]) {
                   /* short cut if all active processes have been examined and
                    * enough empty scoreboard slots have been found
                    */
       
                   break;
      +        }
               ps = &ap_scoreboard_image->parent[i];
      -        for (j = 0; j < threads_per_child; j++) {
      -            ws = &ap_scoreboard_image->servers[i][j];
      -            status = ws->status;
      -
      -            /* XXX any_dying_threads is probably no longer needed    GLA */
      -            any_dying_threads = any_dying_threads ||
      -                (status == SERVER_GRACEFUL);
      -            any_dead_threads = any_dead_threads || (status == SERVER_DEAD);
      -            all_dead_threads = all_dead_threads &&
      -                (status == SERVER_DEAD || status == SERVER_GRACEFUL);
      -
      -            /* We consider a starting server as idle because we started it
      -             * at least a cycle ago, and if it still hasn't finished starting
      -             * then we're just going to swamp things worse by forking more.
      -             * So we hopefully won't need to fork more if we count it.
      -             * This depends on the ordering of SERVER_READY and SERVER_STARTING.
      -             */
      -            if (ps->pid != 0) { /* XXX just set all_dead_threads in outer
      -                                   for loop if no pid?  not much else matters */
      +        if (ps->pid != 0) {
      +            for (j = 0; j < threads_per_child; j++) {
      +                ws = &ap_scoreboard_image->servers[i][j];
      +                status = ws->status;
      +
      +                /* We consider a starting server as idle because we started it
      +                 * at least a cycle ago, and if it still hasn't finished starting
      +                 * then we're just going to swamp things worse by forking more.
      +                 * So we hopefully won't need to fork more if we count it.
      +                 * This depends on the ordering of SERVER_READY and SERVER_STARTING.
      +                 */
                       if (status <= SERVER_READY && !ps->quiescing && !ps->not_accepting
      -                    && ps->generation == retained->my_generation)
      +                    && ps->generation == retained->my_generation
      +                    && ps->bucket == child_bucket)
                       {
                           ++idle_thread_count;
                       }
                       if (status >= SERVER_READY && status < SERVER_GRACEFUL) {
      -                    ++active_thread_count;
      +                    ++child_threads_active;
                       }
                   }
      -        }
      -        if (any_dead_threads
      -            && totally_free_length < retained->idle_spawn_rate
      -            && free_length < MAX_SPAWN_RATE
      -            && (!ps->pid      /* no process in the slot */
      -                  || ps->quiescing)) {  /* or at least one is going away */
      -            if (all_dead_threads) {
      -                /* great! we prefer these, because the new process can
      -                 * start more threads sooner.  So prioritize this slot
      -                 * by putting it ahead of any slots with active threads.
      -                 *
      -                 * first, make room by moving a slot that's potentially still
      -                 * in use to the end of the array
      -                 */
      -                free_slots[free_length] = free_slots[totally_free_length];
      -                free_slots[totally_free_length++] = i;
      -            }
      -            else {
      -                /* slot is still in use - back of the bus
      -                 */
      -                free_slots[free_length] = i;
      -            }
      -            ++free_length;
      -        }
      -        /* XXX if (!ps->quiescing)     is probably more reliable  GLA */
      -        if (!any_dying_threads) {
                   last_non_dead = i;
      -            ++total_non_dead;
               }
      +        active_thread_count += child_threads_active;
      +        if (!ps->pid && free_length < retained->idle_spawn_rate[child_bucket])
      +            free_slots[free_length++] = i;
      +        else if (child_threads_active == threads_per_child)
      +            had_healthy_child = 1;
           }
       
           if (retained->sick_child_detected) {
      -        if (active_thread_count > 0) {
      -            /* some child processes appear to be working.  don't kill the
      -             * whole server.
      +        if (had_healthy_child) {
      +            /* Assume this is a transient error, even though it may not be.  Leave
      +             * the server up in case it is able to serve some requests or the
      +             * problem will be resolved.
                    */
                   retained->sick_child_detected = 0;
               }
               else {
      -            /* looks like a basket case.  give up.
      +            /* looks like a basket case, as no child ever fully initialized; give up.
                    */
                   shutdown_pending = 1;
                   child_fatal = 1;
                   ap_log_error(APLOG_MARK, APLOG_ALERT, 0,
      -                         ap_server_conf,
      -                         "No active workers found..."
      -                         " Apache is exiting!");
      +                         ap_server_conf, APLOGNO(02324)
      +                         "A resource shortage or other unrecoverable failure "
      +                         "was encountered before any child process initialized "
      +                         "successfully... httpd is exiting!");
                   /* the child already logged the failure details */
                   return;
               }
      @@ -2349,46 +2615,78 @@ static void perform_idle_server_maintenance(void)
       
           retained->max_daemons_limit = last_non_dead + 1;
       
      -    if (idle_thread_count > max_spare_threads) {
      -        /* Kill off one child */
      -        ap_event_pod_signal(pod, TRUE);
      -        retained->idle_spawn_rate = 1;
      -    }
      -    else if (idle_thread_count < min_spare_threads) {
      -        /* terminate the free list */
      -        if (free_length == 0) { /* scoreboard is full, can't fork */
      -
      -            if (active_thread_count >= ap_daemons_limit * threads_per_child) {
      -                if (!retained->maxclients_reported) {
      -                    /* only report this condition once */
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      -                                 "server reached MaxRequestWorkers setting, "
      -                                 "consider raising the MaxRequestWorkers "
      -                                 "setting");
      -                    retained->maxclients_reported = 1;
      -                }
      -            }
      -            else {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      -                             "scoreboard is full, not at MaxRequestWorkers");
      +    if (idle_thread_count > max_spare_threads / num_buckets)
      +    {
      +        /*
      +         * Child processes that we ask to shut down won't die immediately
      +         * but may stay around for a long time when they finish their
      +         * requests. If the server load changes many times, many such
      +         * gracefully finishing processes may accumulate, filling up the
      +         * scoreboard. To avoid running out of scoreboard entries, we
      +         * don't shut down more processes when the total number of processes
      +         * is high.
      +         *
      +         * XXX It would be nice if we could
      +         * XXX - kill processes without keepalive connections first
      +         * XXX - tell children to stop accepting new connections, and
      +         * XXX   depending on server load, later be able to resurrect them
      +         *       or kill them
      +         */
      +        if (retained->total_daemons <= active_daemons_limit &&
      +            retained->total_daemons < server_limit) {
      +            /* Kill off one child */
      +            ap_mpm_podx_signal(all_buckets[child_bucket].pod,
      +                               AP_MPM_PODX_GRACEFUL);
      +            retained->idle_spawn_rate[child_bucket] = 1;
      +            active_daemons--;
      +        } else {
      +            ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, ap_server_conf,
      +                         "Not shutting down child: total daemons %d / "
      +                         "active limit %d / ServerLimit %d",
      +                         retained->total_daemons, active_daemons_limit,
      +                         server_limit);
      +        }
      +    }
      +    else if (idle_thread_count < min_spare_threads / num_buckets) {
      +        if (active_thread_count >= max_workers) {
      +            if (!retained->maxclients_reported) {
      +                /* only report this condition once */
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00484)
      +                             "server reached MaxRequestWorkers setting, "
      +                             "consider raising the MaxRequestWorkers "
      +                             "setting");
      +                retained->maxclients_reported = 1;
                   }
      -            retained->idle_spawn_rate = 1;
      +            retained->idle_spawn_rate[child_bucket] = 1;
      +        }
      +        else if (free_length == 0) { /* scoreboard is full, can't fork */
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(03490)
      +                         "scoreboard is full, not at MaxRequestWorkers."
      +                         "Increase ServerLimit.");
      +            retained->idle_spawn_rate[child_bucket] = 1;
               }
               else {
      -            if (free_length > retained->idle_spawn_rate) {
      -                free_length = retained->idle_spawn_rate;
      +            if (free_length > retained->idle_spawn_rate[child_bucket]) {
      +                free_length = retained->idle_spawn_rate[child_bucket];
                   }
      -            if (retained->idle_spawn_rate >= 8) {
      -                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +            if (retained->idle_spawn_rate[child_bucket] >= 8) {
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00486)
                                    "server seems busy, (you may need "
                                    "to increase StartServers, ThreadsPerChild "
                                    "or Min/MaxSpareThreads), "
                                    "spawning %d children, there are around %d idle "
      -                             "threads, and %d total children", free_length,
      -                             idle_thread_count, total_non_dead);
      +                             "threads, %d active children, and %d children "
      +                             "that are shutting down", free_length,
      +                             idle_thread_count, active_daemons,
      +                             retained->total_daemons);
                   }
                   for (i = 0; i < free_length; ++i) {
      -                make_child(ap_server_conf, free_slots[i]);
      +                ap_log_error(APLOG_MARK, APLOG_TRACE5, 0, ap_server_conf,
      +                             "Spawning new child: slot %d active / "
      +                             "total daemons: %d/%d",
      +                             free_slots[i], active_daemons,
      +                             retained->total_daemons);
      +                make_child(ap_server_conf, free_slots[i], child_bucket);
                   }
                   /* the next time around we want to spawn twice as many if this
                    * wasn't good enough, but not if we've just done a graceful
      @@ -2396,19 +2694,19 @@ static void perform_idle_server_maintenance(void)
                   if (retained->hold_off_on_exponential_spawning) {
                       --retained->hold_off_on_exponential_spawning;
                   }
      -            else if (retained->idle_spawn_rate < MAX_SPAWN_RATE) {
      -                retained->idle_spawn_rate *= 2;
      +            else if (retained->idle_spawn_rate[child_bucket]
      +                     < MAX_SPAWN_RATE / num_buckets) {
      +                retained->idle_spawn_rate[child_bucket] *= 2;
                   }
               }
           }
           else {
      -        retained->idle_spawn_rate = 1;
      +        retained->idle_spawn_rate[child_bucket] = 1;
           }
       }
       
      -static void server_main_loop(int remaining_children_to_start)
      +static void server_main_loop(int remaining_children_to_start, int num_buckets)
       {
      -    ap_generation_t old_gen;
           int child_slot;
           apr_exit_why_e exitwhy;
           int status, processed_status;
      @@ -2432,10 +2730,14 @@ static void server_main_loop(int remaining_children_to_start)
                              == retained->my_generation) {
                           shutdown_pending = 1;
                           child_fatal = 1;
      +                    /*
      +                     * total_daemons counting will be off now, but as we
      +                     * are shutting down, that is not an issue anymore.
      +                     */
                           return;
                       }
                       else {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, APLOGNO(00487)
                                        "Ignoring fatal error in child of previous "
                                        "generation (pid %ld).",
                                        (long)pid.pid);
      @@ -2450,43 +2752,43 @@ static void server_main_loop(int remaining_children_to_start)
                   }
                   /* non-fatal death... note that it's gone in the scoreboard. */
                   if (child_slot >= 0) {
      +                process_score *ps;
      +
                       for (i = 0; i < threads_per_child; i++)
                           ap_update_child_status_from_indexes(child_slot, i,
      -                                                        SERVER_DEAD,
      -                                                        (request_rec *) NULL);
      +                                                        SERVER_DEAD, NULL);
       
                       event_note_child_killed(child_slot, 0, 0);
      -                ap_scoreboard_image->parent[child_slot].quiescing = 0;
      +                ps = &ap_scoreboard_image->parent[child_slot];
      +                if (!ps->quiescing)
      +                    active_daemons--;
      +                ps->quiescing = 0;
      +                /* NOTE: We don't dec in the (child_slot < 0) case! */
      +                retained->total_daemons--;
                       if (processed_status == APEXIT_CHILDSICK) {
                           /* resource shortage, minimize the fork rate */
      -                    retained->idle_spawn_rate = 1;
      +                    retained->idle_spawn_rate[ps->bucket] = 1;
                       }
      -                else if (remaining_children_to_start
      -                         && child_slot < ap_daemons_limit) {
      +                else if (remaining_children_to_start) {
                           /* we're still doing a 1-for-1 replacement of dead
                            * children with new children
                            */
      -                    make_child(ap_server_conf, child_slot);
      +                    make_child(ap_server_conf, child_slot, ps->bucket);
                           --remaining_children_to_start;
                       }
                   }
      -            else if (ap_unregister_extra_mpm_process(pid.pid, &old_gen) == 1) {
      -
      -                event_note_child_killed(-1, /* already out of the scoreboard */
      -                                        pid.pid, old_gen);
       #if APR_HAS_OTHER_CHILD
      -            }
                   else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH,
                                                       status) == 0) {
                       /* handled */
      -#endif
                   }
      +#endif
                   else if (retained->is_graceful) {
                       /* Great, we've probably just lost a slot in the
                        * scoreboard.  Somehow we don't know about this child.
                        */
                       ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00488)
                                    "long lost child came home! (pid %ld)",
                                    (long) pid.pid);
                   }
      @@ -2511,20 +2813,24 @@ static void server_main_loop(int remaining_children_to_start)
                   continue;
               }
       
      -        perform_idle_server_maintenance();
      +        for (i = 0; i < num_buckets; i++) {
      +            perform_idle_server_maintenance(i, num_buckets);
      +        }
           }
       }
       
       static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
       {
      +    int num_buckets = retained->num_buckets;
           int remaining_children_to_start;
      +    int i;
       
           ap_log_pid(pconf, ap_pid_fname);
       
           if (!retained->is_graceful) {
               if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
                   mpm_state = AP_MPMQ_STOPPING;
      -            return DONE;
      +            return !OK;
               }
               /* fix the generation number in the global score; we just got a new,
                * cleared scoreboard
      @@ -2534,9 +2840,24 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
       
           restart_pending = shutdown_pending = 0;
           set_signals();
      -    /* Don't thrash... */
      -    if (max_spare_threads < min_spare_threads + threads_per_child)
      -        max_spare_threads = min_spare_threads + threads_per_child;
      +
      +    /* Don't thrash since num_buckets depends on the
      +     * system and the number of online CPU cores...
      +     */
      +    if (active_daemons_limit < num_buckets)
      +        active_daemons_limit = num_buckets;
      +    if (ap_daemons_to_start < num_buckets)
      +        ap_daemons_to_start = num_buckets;
      +    /* We want to create as much children at a time as the number of buckets,
      +     * so to optimally accept connections (evenly distributed across buckets).
      +     * Thus min_spare_threads should at least maintain num_buckets children,
      +     * and max_spare_threads allow num_buckets more children w/o triggering
      +     * immediately (e.g. num_buckets idle threads margin, one per bucket).
      +     */
      +    if (min_spare_threads < threads_per_child * (num_buckets - 1) + num_buckets)
      +        min_spare_threads = threads_per_child * (num_buckets - 1) + num_buckets;
      +    if (max_spare_threads < min_spare_threads + (threads_per_child + 1) * num_buckets)
      +        max_spare_threads = min_spare_threads + (threads_per_child + 1) * num_buckets;
       
           /* If we're doing a graceful_restart then we're going to see a lot
            * of children exiting immediately when we get into the main loop
      @@ -2548,8 +2869,8 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
            * supposed to start up without the 1 second penalty between each fork.
            */
           remaining_children_to_start = ap_daemons_to_start;
      -    if (remaining_children_to_start > ap_daemons_limit) {
      -        remaining_children_to_start = ap_daemons_limit;
      +    if (remaining_children_to_start > active_daemons_limit) {
      +        remaining_children_to_start = active_daemons_limit;
           }
           if (!retained->is_graceful) {
               startup_children(remaining_children_to_start);
      @@ -2561,23 +2882,27 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
               retained->hold_off_on_exponential_spawning = 10;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00489)
                        "%s configured -- resuming normal operations",
                        ap_get_server_description());
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00490)
                        "Server built: %s", ap_get_server_built());
           ap_log_command_line(plog, s);
      +    ap_log_mpm_common(s);
       
           mpm_state = AP_MPMQ_RUNNING;
       
      -    server_main_loop(remaining_children_to_start);
      +    server_main_loop(remaining_children_to_start, num_buckets);
           mpm_state = AP_MPMQ_STOPPING;
       
           if (shutdown_pending && !retained->is_graceful) {
               /* Time to shut down:
                * Kill child processes, tell them to call child_exit, etc...
                */
      -        ap_event_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, active_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
               ap_reclaim_child_processes(1, /* Start with SIGTERM */
                                          event_note_child_killed);
       
      @@ -2585,7 +2910,7 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
                   /* cleanup pid file on normal shutdown */
                   ap_remove_pid(pconf, ap_pid_fname);
                   ap_log_error(APLOG_MARK, APLOG_NOTICE, 0,
      -                         ap_server_conf, "caught SIGTERM, shutting down");
      +                         ap_server_conf, APLOGNO(00491) "caught SIGTERM, shutting down");
               }
               return DONE;
           } else if (shutdown_pending) {
      @@ -2598,13 +2923,16 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
       
               /* Close our listeners, and then ask our children to do same */
               ap_close_listeners();
      -        ap_event_pod_killpg(pod, ap_daemons_limit, TRUE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, active_daemons_limit,
      +                               AP_MPM_PODX_GRACEFUL);
      +        }
               ap_relieve_child_processes(event_note_child_killed);
       
               if (!child_fatal) {
                   /* cleanup pid file on normal shutdown */
                   ap_remove_pid(pconf, ap_pid_fname);
      -            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00492)
                                "caught " AP_SIG_GRACEFUL_STOP_STRING
                                ", shutting down gracefully");
               }
      @@ -2624,7 +2952,7 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
                   ap_relieve_child_processes(event_note_child_killed);
       
                   active_children = 0;
      -            for (index = 0; index < ap_daemons_limit; ++index) {
      +            for (index = 0; index < retained->max_daemons_limit; ++index) {
                       if (ap_mpm_safe_kill(MPM_CHILD_PID(index), 0) == APR_SUCCESS) {
                           active_children = 1;
                           /* Having just one child is enough to stay around */
      @@ -2638,7 +2966,10 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
                * way, try and make sure that all of our processes are
                * really dead.
                */
      -        ap_event_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, active_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
               ap_reclaim_child_processes(1, event_note_child_killed);
       
               return DONE;
      @@ -2660,12 +2991,14 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
           ap_scoreboard_image->global->running_generation = retained->my_generation;
       
           if (retained->is_graceful) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00493)
                            AP_SIG_GRACEFUL_STRING
                            " received.  Doing graceful restart");
               /* wake up the children...time to die.  But we'll have more soon */
      -        ap_event_pod_killpg(pod, ap_daemons_limit, TRUE);
      -
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, active_daemons_limit,
      +                               AP_MPM_PODX_GRACEFUL);
      +        }
       
               /* This is mostly for debugging... so that we know what is still
                * gracefully dealing with existing request.
      @@ -2677,17 +3010,71 @@ static int event_run(apr_pool_t * _pconf, apr_pool_t * plog, server_rec * s)
                * and a SIGHUP, we may as well use the same signal, because some user
                * pthreads are stealing signals from us left and right.
                */
      -        ap_event_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, active_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
       
               ap_reclaim_child_processes(1,  /* Start with SIGTERM */
                                          event_note_child_killed);
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00494)
                            "SIGHUP received.  Attempting to restart");
           }
       
      +    active_daemons = 0;
      +
      +    return OK;
      +}
      +
      +static void setup_slave_conn(conn_rec *c, void *csd) 
      +{
      +    event_conn_state_t *mcs;
      +    event_conn_state_t *cs;
      +    
      +    mcs = ap_get_module_config(c->master->conn_config, &mpm_event_module);
      +    
      +    cs = apr_pcalloc(c->pool, sizeof(*cs));
      +    cs->c = c;
      +    cs->r = NULL;
      +    cs->sc = mcs->sc;
      +    cs->suspended = 0;
      +    cs->p = c->pool;
      +    cs->bucket_alloc = c->bucket_alloc;
      +    cs->pfd = mcs->pfd;
      +    cs->pub = mcs->pub;
      +    cs->pub.state = CONN_STATE_READ_REQUEST_LINE;
      +    cs->pub.sense = CONN_SENSE_DEFAULT;
      +    
      +    c->cs = &(cs->pub);
      +    ap_set_module_config(c->conn_config, &mpm_event_module, cs);
      +}
      +
      +static int event_pre_connection(conn_rec *c, void *csd)
      +{
      +    if (c->master && (!c->cs || c->cs == c->master->cs)) {
      +        setup_slave_conn(c, csd);
      +    }
           return OK;
       }
       
      +static int event_protocol_switch(conn_rec *c, request_rec *r, server_rec *s,
      +                                 const char *protocol)
      +{
      +    if (!r && s) {
      +        /* connection based switching of protocol, set the correct server
      +         * configuration, so that timeouts, keepalives and such are used
      +         * for the server that the connection was switched on.
      +         * Normally, we set this on post_read_request, but on a protocol
      +         * other than http/1.1, this might never happen.
      +         */
      +        event_conn_state_t *cs;
      +        
      +        cs = ap_get_module_config(c->conn_config, &mpm_event_module);
      +        cs->sc = ap_get_module_config(s->module_config, &mpm_event_module);
      +    }
      +    return DECLINED;
      +}
      +
       /* This really should be a post_config hook, but the error log is already
        * redirected by that point, so we need to do this in the open_logs phase.
        */
      @@ -2696,7 +3083,10 @@ static int event_open_logs(apr_pool_t * p, apr_pool_t * plog,
       {
           int startup = 0;
           int level_flags = 0;
      +    int num_buckets = 0;
      +    ap_listen_rec **listen_buckets;
           apr_status_t rv;
      +    int i;
       
           pconf = p;
       
      @@ -2710,17 +3100,67 @@ static int event_open_logs(apr_pool_t * p, apr_pool_t * plog,
               ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
                            (startup ? NULL : s),
                            "no listening sockets available, shutting down");
      -        return DONE;
      +        return !OK;
           }
       
      -    if (!one_process) {
      -        if ((rv = ap_event_pod_open(pconf, &pod))) {
      +    if (one_process) {
      +        num_buckets = 1;
      +    }
      +    else if (retained->is_graceful) {
      +        /* Preserve the number of buckets on graceful restarts. */
      +        num_buckets = retained->num_buckets;
      +    }
      +    if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
      +                                     &listen_buckets, &num_buckets))) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
      +                     (startup ? NULL : s),
      +                     "could not duplicate listeners");
      +        return !OK;
      +    }
      +
      +    all_buckets = apr_pcalloc(pconf, num_buckets * sizeof(*all_buckets));
      +    for (i = 0; i < num_buckets; i++) {
      +        if (!one_process && /* no POD in one_process mode */
      +                (rv = ap_mpm_podx_open(pconf, &all_buckets[i].pod))) {
                   ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
                                (startup ? NULL : s),
                                "could not open pipe-of-death");
      -            return DONE;
      +            return !OK;
      +        }
      +        all_buckets[i].listeners = listen_buckets[i];
      +    }
      +
      +    if (retained->max_buckets < num_buckets) {
      +        int new_max, *new_ptr;
      +        new_max = retained->max_buckets * 2;
      +        if (new_max < num_buckets) {
      +            new_max = num_buckets;
      +        }
      +        new_ptr = (int *)apr_palloc(ap_pglobal, new_max * sizeof(int));
      +        memcpy(new_ptr, retained->idle_spawn_rate,
      +               retained->num_buckets * sizeof(int));
      +        retained->idle_spawn_rate = new_ptr;
      +        retained->max_buckets = new_max;
      +    }
      +    if (retained->num_buckets < num_buckets) {
      +        int rate_max = 1;
      +        /* If new buckets are added, set their idle spawn rate to
      +         * the highest so far, so that they get filled as quickly
      +         * as the existing ones.
      +         */
      +        for (i = 0; i < retained->num_buckets; i++) {
      +            if (rate_max < retained->idle_spawn_rate[i]) {
      +                rate_max = retained->idle_spawn_rate[i];
      +            }
      +        }
      +        for (/* up to date i */; i < num_buckets; i++) {
      +            retained->idle_spawn_rate[i] = rate_max;
               }
           }
      +    retained->num_buckets = num_buckets;
      +
      +    /* for skiplist */
      +    srand((unsigned int)apr_time_now());
           return OK;
       }
       
      @@ -2750,14 +3190,24 @@ static int event_pre_config(apr_pool_t * pconf, apr_pool_t * plog,
           if (!retained) {
               retained = ap_retained_data_create(userdata_key, sizeof(*retained));
               retained->max_daemons_limit = -1;
      -        retained->idle_spawn_rate = 1;
           }
           ++retained->module_loads;
           if (retained->module_loads == 2) {
      +        /* test for correct operation of fdqueue */
      +        static apr_uint32_t foo1, foo2;
      +
      +        apr_atomic_set32(&foo1, 100);
      +        foo2 = apr_atomic_add32(&foo1, -10);
      +        if (foo2 != 100 || foo1 != 90) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, APLOGNO(02405)
      +                         "atomics not working as expected - add32 of negative number");
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +
               rv = apr_pollset_create(&event_pollset, 1, plog,
                                       APR_POLLSET_THREADSAFE | APR_POLLSET_NOCOPY);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00495)
                                "Couldn't create a Thread Safe Pollset. "
                                "Is it supported on your platform?"
                                "Also check system or user limits!");
      @@ -2771,7 +3221,7 @@ static int event_pre_config(apr_pool_t * pconf, apr_pool_t * plog,
                   rv = apr_proc_detach(no_detach ? APR_PROC_DETACH_FOREGROUND
                                        : APR_PROC_DETACH_DAEMONIZE);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00496)
                                    "apr_proc_detach failed");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -2786,14 +3236,78 @@ static int event_pre_config(apr_pool_t * pconf, apr_pool_t * plog,
           max_spare_threads = DEFAULT_MAX_FREE_DAEMON * DEFAULT_THREADS_PER_CHILD;
           server_limit = DEFAULT_SERVER_LIMIT;
           thread_limit = DEFAULT_THREAD_LIMIT;
      -    ap_daemons_limit = server_limit;
      +    active_daemons_limit = server_limit;
           threads_per_child = DEFAULT_THREADS_PER_CHILD;
      -    max_workers = ap_daemons_limit * threads_per_child;
      +    max_workers = active_daemons_limit * threads_per_child;
      +    had_healthy_child = 0;
           ap_extended_status = 0;
       
           return OK;
       }
       
      +static int event_post_config(apr_pool_t *pconf, apr_pool_t *plog,
      +                             apr_pool_t *ptemp, server_rec *s)
      +{
      +    struct {
      +        struct timeout_queue *tail, *q;
      +        apr_hash_t *hash;
      +    } wc, ka;
      +
      +    /* Not needed in pre_config stage */
      +    if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
      +        return OK;
      +    }
      +
      +    wc.tail = ka.tail = NULL;
      +    wc.hash = apr_hash_make(ptemp);
      +    ka.hash = apr_hash_make(ptemp);
      +
      +    TO_QUEUE_INIT(linger_q, pconf,
      +                  apr_time_from_sec(MAX_SECS_TO_LINGER), NULL);
      +    TO_QUEUE_INIT(short_linger_q, pconf,
      +                  apr_time_from_sec(SECONDS_TO_LINGER), NULL);
      +
      +    for (; s; s = s->next) {
      +        event_srv_cfg *sc = apr_pcalloc(pconf, sizeof *sc);
      +
      +        ap_set_module_config(s->module_config, &mpm_event_module, sc);
      +        if (!wc.tail) {
      +            /* The main server uses the global queues */
      +            TO_QUEUE_INIT(wc.q, pconf, s->timeout, NULL);
      +            apr_hash_set(wc.hash, &s->timeout, sizeof s->timeout, wc.q);
      +            wc.tail = write_completion_q = wc.q;
      +
      +            TO_QUEUE_INIT(ka.q, pconf, s->keep_alive_timeout, NULL);
      +            apr_hash_set(ka.hash, &s->keep_alive_timeout,
      +                         sizeof s->keep_alive_timeout, ka.q);
      +            ka.tail = keepalive_q = ka.q;
      +        }
      +        else {
      +            /* The vhosts use any existing queue with the same timeout,
      +             * or their own queue(s) if there isn't */
      +            wc.q = apr_hash_get(wc.hash, &s->timeout, sizeof s->timeout);
      +            if (!wc.q) {
      +                TO_QUEUE_INIT(wc.q, pconf, s->timeout, wc.tail);
      +                apr_hash_set(wc.hash, &s->timeout, sizeof s->timeout, wc.q);
      +                wc.tail = wc.tail->next = wc.q;
      +            }
      +
      +            ka.q = apr_hash_get(ka.hash, &s->keep_alive_timeout,
      +                                sizeof s->keep_alive_timeout);
      +            if (!ka.q) {
      +                TO_QUEUE_INIT(ka.q, pconf, s->keep_alive_timeout, ka.tail);
      +                apr_hash_set(ka.hash, &s->keep_alive_timeout,
      +                             sizeof s->keep_alive_timeout, ka.q);
      +                ka.tail = ka.tail->next = ka.q;
      +            }
      +        }
      +        sc->wc_q = wc.q;
      +        sc->ka_q = ka.q;
      +    }
      +
      +    return OK;
      +}
      +
       static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
                                     apr_pool_t *ptemp, server_rec *s)
       {
      @@ -2806,14 +3320,12 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (server_limit > MAX_SERVER_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00497)
                                "WARNING: ServerLimit of %d exceeds compile-time "
      -                         "limit of", server_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d servers, decreasing to %d.",
      -                         MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
      +                         "limit of %d servers, decreasing to %d.",
      +                         server_limit, MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00498)
                                "ServerLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                server_limit, MAX_SERVER_LIMIT);
      @@ -2822,11 +3334,11 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00499)
                                "WARNING: ServerLimit of %d not allowed, "
                                "increasing to 1.", server_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00500)
                                "ServerLimit of %d not allowed, increasing to 1",
                                server_limit);
               }
      @@ -2841,7 +3353,7 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit != retained->first_server_limit) {
               /* don't need a startup console version here */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00501)
                            "changing ServerLimit to %d from original value of %d "
                            "not allowed during restart",
                            server_limit, retained->first_server_limit);
      @@ -2850,14 +3362,12 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (thread_limit > MAX_THREAD_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00502)
                                "WARNING: ThreadLimit of %d exceeds compile-time "
      -                         "limit of", thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
      +                         "limit of %d threads, decreasing to %d.",
      +                         thread_limit, MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00503)
                                "ThreadLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                thread_limit, MAX_THREAD_LIMIT);
      @@ -2866,11 +3376,11 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (thread_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00504)
                                "WARNING: ThreadLimit of %d not allowed, "
                                "increasing to 1.", thread_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00505)
                                "ThreadLimit of %d not allowed, increasing to 1",
                                thread_limit);
               }
      @@ -2885,7 +3395,7 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (thread_limit != retained->first_thread_limit) {
               /* don't need a startup console version here */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00506)
                            "changing ThreadLimit to %d from original value of %d "
                            "not allowed during restart",
                            thread_limit, retained->first_thread_limit);
      @@ -2894,17 +3404,13 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (threads_per_child > thread_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00507)
                                "WARNING: ThreadsPerChild of %d exceeds ThreadLimit "
      -                         "of", threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         thread_limit, thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ThreadLimit "
      -                         "directive.");
      +                         "of %d threads, decreasing to %d. "
      +                         "To increase, please see the ThreadLimit directive.",
      +                         threads_per_child, thread_limit, thread_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00508)
                                "ThreadsPerChild of %d exceeds ThreadLimit "
                                "of %d, decreasing to match",
                                threads_per_child, thread_limit);
      @@ -2913,11 +3419,11 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (threads_per_child < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00509)
                                "WARNING: ThreadsPerChild of %d not allowed, "
                                "increasing to 1.", threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00510)
                                "ThreadsPerChild of %d not allowed, increasing to 1",
                                threads_per_child);
               }
      @@ -2926,17 +3432,14 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (max_workers < threads_per_child) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00511)
                                "WARNING: MaxRequestWorkers of %d is less than "
      -                         "ThreadsPerChild of", max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d, increasing to %d.  MaxRequestWorkers must be at "
      -                         "least as large",
      -                         threads_per_child, threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " as the number of threads in a single server.");
      +                         "ThreadsPerChild of %d, increasing to %d. "
      +                         "MaxRequestWorkers must be at least as large "
      +                         "as the number of threads in a single server.",
      +                         max_workers, threads_per_child, threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00512)
                                "MaxRequestWorkers of %d is less than ThreadsPerChild "
                                "of %d, increasing to match",
                                max_workers, threads_per_child);
      @@ -2944,24 +3447,20 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
               max_workers = threads_per_child;
           }
       
      -    ap_daemons_limit = max_workers / threads_per_child;
      +    active_daemons_limit = max_workers / threads_per_child;
       
           if (max_workers % threads_per_child) {
      -        int tmp_max_workers = ap_daemons_limit * threads_per_child;
      +        int tmp_max_workers = active_daemons_limit * threads_per_child;
       
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00513)
                                "WARNING: MaxRequestWorkers of %d is not an integer "
      -                         "multiple of", max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " ThreadsPerChild of %d, decreasing to nearest "
      -                         "multiple %d,", threads_per_child,
      -                         tmp_max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " for a maximum of %d servers.",
      -                         ap_daemons_limit);
      +                         "multiple of ThreadsPerChild of %d, decreasing to nearest "
      +                         "multiple %d, for a maximum of %d servers.",
      +                         max_workers, threads_per_child, tmp_max_workers,
      +                         active_daemons_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00514)
                                "MaxRequestWorkers of %d is not an integer multiple "
                                "of ThreadsPerChild of %d, decreasing to nearest "
                                "multiple %d", max_workers, threads_per_child,
      @@ -2970,35 +3469,32 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
               max_workers = tmp_max_workers;
           }
       
      -    if (ap_daemons_limit > server_limit) {
      +    if (active_daemons_limit > server_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         "WARNING: MaxRequestWorkers of %d would require %d "
      -                         "servers and ", max_workers, ap_daemons_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " would exceed ServerLimit of %d, decreasing to %d.",
      -                         server_limit, server_limit * threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ServerLimit "
      -                         "directive.");
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00515)
      +                         "WARNING: MaxRequestWorkers of %d would require %d servers "
      +                         "and would exceed ServerLimit of %d, decreasing to %d. "
      +                         "To increase, please see the ServerLimit directive.",
      +                         max_workers, active_daemons_limit, server_limit,
      +                         server_limit * threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00516)
                                "MaxRequestWorkers of %d would require %d servers and "
                                "exceed ServerLimit of %d, decreasing to %d",
      -                         max_workers, ap_daemons_limit, server_limit,
      +                         max_workers, active_daemons_limit, server_limit,
                                server_limit * threads_per_child);
               }
      -        ap_daemons_limit = server_limit;
      +        active_daemons_limit = server_limit;
           }
       
      -    /* ap_daemons_to_start > ap_daemons_limit checked in ap_mpm_run() */
      -    if (ap_daemons_to_start < 0) {
      +    /* ap_daemons_to_start > active_daemons_limit checked in ap_mpm_run() */
      +    if (ap_daemons_to_start < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00517)
                                "WARNING: StartServers of %d not allowed, "
                                "increasing to 1.", ap_daemons_to_start);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00518)
                                "StartServers of %d not allowed, increasing to 1",
                                ap_daemons_to_start);
               }
      @@ -3007,15 +3503,13 @@ static int event_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (min_spare_threads < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00519)
                                "WARNING: MinSpareThreads of %d not allowed, "
      -                         "increasing to 1", min_spare_threads);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " to avoid almost certain server failure.");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " Please read the documentation.");
      +                         "increasing to 1 to avoid almost certain server "
      +                         "failure. Please read the documentation.",
      +                         min_spare_threads);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00520)
                                "MinSpareThreads of %d not allowed, increasing to 1",
                                min_spare_threads);
               }
      @@ -3043,12 +3537,18 @@ static void event_hooks(apr_pool_t * p)
            * to retrieve it, so register as REALLY_FIRST
            */
           ap_hook_pre_config(event_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
      +    ap_hook_post_config(event_post_config, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_check_config(event_check_config, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_mpm(event_run, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_mpm_query(event_query, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_mpm_register_timed_callback(event_register_timed_callback, NULL, NULL,
                                               APR_HOOK_MIDDLE);
      +    ap_hook_pre_read_request(event_pre_read_request, NULL, NULL, APR_HOOK_MIDDLE);
      +    ap_hook_post_read_request(event_post_read_request, NULL, NULL, APR_HOOK_MIDDLE);
           ap_hook_mpm_get_name(event_get_name, NULL, NULL, APR_HOOK_MIDDLE);
      +
      +    ap_hook_pre_connection(event_pre_connection, NULL, NULL, APR_HOOK_REALLY_FIRST);
      +    ap_hook_protocol_switch(event_protocol_switch, NULL, NULL, APR_HOOK_REALLY_FIRST);
       }
       
       static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy,
      @@ -3095,7 +3595,7 @@ static const char *set_max_workers(cmd_parms * cmd, void *dummy,
               return err;
           }
           if (!strcasecmp(cmd->cmd->name, "MaxClients")) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(00521)
                            "MaxClients is deprecated, use MaxRequestWorkers "
                            "instead.");
           }
      @@ -3151,6 +3651,9 @@ static const char *set_worker_factor(cmd_parms * cmd, void *dummy,
           if (*endptr)
               return "error parsing value";
       
      +    if (val <= 0)
      +        return "AsyncRequestWorkerFactor argument must be a positive number";
      +
           worker_factor = val * WORKER_FACTOR_SCALE;
           if (worker_factor == 0)
               worker_factor = 1;
      diff --git a/server/mpm/event/fdqueue.c b/server/mpm/event/fdqueue.c
      index f7de0bfb263..64b318d0e06 100644
      --- a/server/mpm/event/fdqueue.c
      +++ b/server/mpm/event/fdqueue.c
      @@ -17,18 +17,20 @@
       #include "fdqueue.h"
       #include "apr_atomic.h"
       
      -typedef struct recycled_pool
      +static const apr_uint32_t zero_pt = APR_UINT32_MAX/2;
      +
      +struct recycled_pool
       {
           apr_pool_t *pool;
           struct recycled_pool *next;
      -} recycled_pool;
      +};
       
       struct fd_queue_info_t
       {
      -    apr_int32_t idlers;      /**
      -                                  * 0 or positive: number of idle worker threads
      -                              * negative: number of threads blocked waiting
      -                              *           for an idle worker
      +    apr_uint32_t idlers;     /**
      +                              * >= zero_pt: number of idle worker threads
      +                              * < zero_pt:  number of threads blocked waiting
      +                              *             for an idle worker
                                     */
           apr_thread_mutex_t *idlers_mutex;
           apr_thread_cond_t *wait_for_idler;
      @@ -36,7 +38,7 @@ struct fd_queue_info_t
           int max_idlers;
           int max_recycled_pools;
           apr_uint32_t recycled_pools_count;
      -    recycled_pool *recycled_pools;
      +    struct recycled_pool *recycled_pools;
       };
       
       static apr_status_t queue_info_cleanup(void *data_)
      @@ -82,6 +84,7 @@ apr_status_t ap_queue_info_create(fd_queue_info_t ** queue_info,
           qi->recycled_pools = NULL;
           qi->max_recycled_pools = max_recycled_pools;
           qi->max_idlers = max_idlers;
      +    qi->idlers = zero_pt;
           apr_pool_cleanup_register(pool, qi, queue_info_cleanup,
                                     apr_pool_cleanup_null);
       
      @@ -94,17 +97,12 @@ apr_status_t ap_queue_info_set_idle(fd_queue_info_t * queue_info,
                                           apr_pool_t * pool_to_recycle)
       {
           apr_status_t rv;
      -    int prev_idlers;
      +    apr_int32_t prev_idlers;
       
           ap_push_pool(queue_info, pool_to_recycle);
       
           /* Atomically increment the count of idle workers */
      -    /*
      -     * TODO: The atomics expect unsigned whereas we're using signed.
      -     *       Need to double check that they work as expected or else
      -     *       rework how we determine blocked.
      -     */
      -    prev_idlers = apr_atomic_inc32((apr_uint32_t *)&(queue_info->idlers));
      +    prev_idlers = apr_atomic_inc32(&(queue_info->idlers)) - zero_pt;
       
           /* If other threads are waiting on a worker, wake one up */
           if (prev_idlers < 0) {
      @@ -129,10 +127,10 @@ apr_status_t ap_queue_info_set_idle(fd_queue_info_t * queue_info,
       
       apr_status_t ap_queue_info_try_get_idler(fd_queue_info_t * queue_info)
       {
      -    int prev_idlers;
      -    prev_idlers = apr_atomic_dec32((apr_uint32_t *)&(queue_info->idlers));
      -    if (prev_idlers <= 0) {
      -        apr_atomic_inc32((apr_uint32_t *)&(queue_info->idlers));    /* back out dec */
      +    apr_int32_t new_idlers;
      +    new_idlers = apr_atomic_add32(&(queue_info->idlers), -1) - zero_pt;
      +    if (--new_idlers <= 0) {
      +        apr_atomic_inc32(&(queue_info->idlers));    /* back out dec */
               return APR_EAGAIN;
           }
           return APR_SUCCESS;
      @@ -142,11 +140,11 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info,
                                                 int *had_to_block)
       {
           apr_status_t rv;
      -    int prev_idlers;
      +    apr_int32_t prev_idlers;
       
           /* Atomically decrement the idle worker count, saving the old value */
           /* See TODO in ap_queue_info_set_idle() */
      -    prev_idlers = apr_atomic_add32((apr_uint32_t *)&(queue_info->idlers), -1);
      +    prev_idlers = apr_atomic_add32(&(queue_info->idlers), -1) - zero_pt;
       
           /* Block if there weren't any idle workers */
           if (prev_idlers <= 0) {
      @@ -154,7 +152,7 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info,
               if (rv != APR_SUCCESS) {
                   AP_DEBUG_ASSERT(0);
                   /* See TODO in ap_queue_info_set_idle() */
      -            apr_atomic_inc32((apr_uint32_t *)&(queue_info->idlers));    /* back out dec */
      +            apr_atomic_inc32(&(queue_info->idlers));    /* back out dec */
                   return rv;
               }
               /* Re-check the idle worker count to guard against a
      @@ -173,10 +171,11 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info,
                *     now non-negative, it's safe for this function to
                *     return immediately.
                *
      -         *     A negative value in queue_info->idlers tells how many
      +         *     A "negative value" (relative to zero_pt) in
      +         *     queue_info->idlers tells how many
                *     threads are waiting on an idle worker.
                */
      -        if (queue_info->idlers < 0) {
      +        if (queue_info->idlers < zero_pt) {
                   *had_to_block = 1;
                   rv = apr_thread_cond_wait(queue_info->wait_for_idler,
                                             queue_info->idlers_mutex);
      @@ -207,7 +206,7 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info,
       apr_uint32_t ap_queue_info_get_idlers(fd_queue_info_t * queue_info)
       {
           apr_int32_t val;
      -    val = (apr_int32_t)apr_atomic_read32((apr_uint32_t *)&queue_info->idlers);
      +    val = (apr_int32_t)apr_atomic_read32(&queue_info->idlers) - zero_pt;
           if (val < 0)
               return 0;
           return val;
      @@ -232,6 +231,7 @@ void ap_push_pool(fd_queue_info_t * queue_info,
               apr_atomic_inc32(&queue_info->recycled_pools_count);
           }
       
      +    apr_pool_clear(pool_to_recycle);
           new_recycle = (struct recycled_pool *) apr_palloc(pool_to_recycle,
                                                             sizeof (*new_recycle));
           new_recycle->pool = pool_to_recycle;
      @@ -280,6 +280,19 @@ void ap_pop_pool(apr_pool_t ** recycled_pool, fd_queue_info_t * queue_info)
           }
       }
       
      +void ap_free_idle_pools(fd_queue_info_t *queue_info)
      +{
      +    apr_pool_t *p;
      +
      +    queue_info->max_recycled_pools = 0;
      +    do {
      +        ap_pop_pool(&p, queue_info);
      +        if (p != NULL)
      +            apr_pool_destroy(p);
      +    } while (p != NULL);
      +}
      +
      +
       apr_status_t ap_queue_info_term(fd_queue_info_t * queue_info)
       {
           apr_status_t rv;
      @@ -364,7 +377,7 @@ apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
        *               to reserve an idle worker thread
        */
       apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
      -                           conn_state_t * cs, apr_pool_t * p)
      +                           event_conn_state_t * ecs, apr_pool_t * p)
       {
           fd_queue_elem_t *elem;
           apr_status_t rv;
      @@ -381,7 +394,7 @@ apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
           if (queue->in >= queue->bounds)
               queue->in -= queue->bounds;
           elem->sd = sd;
      -    elem->cs = cs;
      +    elem->ecs = ecs;
           elem->p = p;
           queue->nelts++;
       
      @@ -422,7 +435,7 @@ apr_status_t ap_queue_push_timer(fd_queue_t * queue, timer_event_t *te)
        * 'sd'.
        */
       apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
      -                                    conn_state_t ** cs, apr_pool_t ** p,
      +                                    event_conn_state_t ** ecs, apr_pool_t ** p,
                                           timer_event_t ** te_out)
       {
           fd_queue_elem_t *elem;
      @@ -465,7 +478,7 @@ apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
                   queue->out -= queue->bounds;
               queue->nelts--;
               *sd = elem->sd;
      -        *cs = elem->cs;
      +        *ecs = elem->ecs;
               *p = elem->p;
       #ifdef AP_DEBUG
               elem->sd = NULL;
      @@ -477,17 +490,30 @@ apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
           return rv;
       }
       
      -apr_status_t ap_queue_interrupt_all(fd_queue_t * queue)
      +static apr_status_t queue_interrupt(fd_queue_t * queue, int all)
       {
           apr_status_t rv;
       
           if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
               return rv;
           }
      -    apr_thread_cond_broadcast(queue->not_empty);
      +    if (all)
      +        apr_thread_cond_broadcast(queue->not_empty);
      +    else
      +        apr_thread_cond_signal(queue->not_empty);
           return apr_thread_mutex_unlock(queue->one_big_mutex);
       }
       
      +apr_status_t ap_queue_interrupt_all(fd_queue_t * queue)
      +{
      +    return queue_interrupt(queue, 1);
      +}
      +
      +apr_status_t ap_queue_interrupt_one(fd_queue_t * queue)
      +{
      +    return queue_interrupt(queue, 0);
      +}
      +
       apr_status_t ap_queue_term(fd_queue_t * queue)
       {
           apr_status_t rv;
      diff --git a/server/mpm/event/fdqueue.h b/server/mpm/event/fdqueue.h
      index 5877ee74fb6..37be684d150 100644
      --- a/server/mpm/event/fdqueue.h
      +++ b/server/mpm/event/fdqueue.h
      @@ -40,6 +40,7 @@
       #include "ap_mpm.h"
       
       typedef struct fd_queue_info_t fd_queue_info_t;
      +typedef struct event_conn_state_t event_conn_state_t;
       
       apr_status_t ap_queue_info_create(fd_queue_info_t ** queue_info,
                                         apr_pool_t * pool, int max_idlers,
      @@ -51,12 +52,13 @@ apr_status_t ap_queue_info_wait_for_idler(fd_queue_info_t * queue_info,
                                                 int *had_to_block);
       apr_status_t ap_queue_info_term(fd_queue_info_t * queue_info);
       apr_uint32_t ap_queue_info_get_idlers(fd_queue_info_t * queue_info);
      +void ap_free_idle_pools(fd_queue_info_t *queue_info);
       
       struct fd_queue_elem_t
       {
           apr_socket_t *sd;
           apr_pool_t *p;
      -    conn_state_t *cs;
      +    event_conn_state_t *ecs;
       };
       typedef struct fd_queue_elem_t fd_queue_elem_t;
       
      @@ -91,12 +93,13 @@ void ap_push_pool(fd_queue_info_t * queue_info,
       apr_status_t ap_queue_init(fd_queue_t * queue, int queue_capacity,
                                  apr_pool_t * a);
       apr_status_t ap_queue_push(fd_queue_t * queue, apr_socket_t * sd,
      -                           conn_state_t * cs, apr_pool_t * p);
      +                           event_conn_state_t * ecs, apr_pool_t * p);
       apr_status_t ap_queue_push_timer(fd_queue_t *queue, timer_event_t *te);
       apr_status_t ap_queue_pop_something(fd_queue_t * queue, apr_socket_t ** sd,
      -                                    conn_state_t ** cs, apr_pool_t ** p,
      +                                    event_conn_state_t ** ecs, apr_pool_t ** p,
                                           timer_event_t ** te);
       apr_status_t ap_queue_interrupt_all(fd_queue_t * queue);
      +apr_status_t ap_queue_interrupt_one(fd_queue_t * queue);
       apr_status_t ap_queue_term(fd_queue_t * queue);
       
       #endif /* FDQUEUE_H */
      diff --git a/server/mpm/event/mpm_default.h b/server/mpm/event/mpm_default.h
      index 079e71fe3c6..214caa0c27c 100644
      --- a/server/mpm/event/mpm_default.h
      +++ b/server/mpm/event/mpm_default.h
      @@ -19,7 +19,8 @@
        * @file  event/mpm_default.h
        * @brief Event MPM defaults
        *
      - * @addtogroup APACHE_MPM_EVENT
      + * @defgroup APACHE_MPM_EVENT Event MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/server/mpm/event/pod.c b/server/mpm/event/pod.c
      deleted file mode 100644
      index 2c5d89723e9..00000000000
      --- a/server/mpm/event/pod.c
      +++ /dev/null
      @@ -1,113 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "pod.h"
      -
      -#include "apr_portable.h"
      -
      -#if APR_HAVE_UNISTD_H
      -#include <unistd.h>
      -#endif
      -
      -APLOG_USE_MODULE(mpm_event);
      -
      -AP_DECLARE(apr_status_t) ap_event_pod_open(apr_pool_t * p, ap_event_pod_t ** pod)
      -{
      -    apr_status_t rv;
      -
      -    *pod = apr_palloc(p, sizeof(**pod));
      -    rv = apr_file_pipe_create(&((*pod)->pod_in), &((*pod)->pod_out), p);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -/*
      -    apr_file_pipe_timeout_set((*pod)->pod_in, 0);
      -*/
      -    (*pod)->p = p;
      -
      -    /* close these before exec. */
      -    apr_file_inherit_unset((*pod)->pod_in);
      -    apr_file_inherit_unset((*pod)->pod_out);
      -
      -    return APR_SUCCESS;
      -}
      -
      -AP_DECLARE(int) ap_event_pod_check(ap_event_pod_t * pod)
      -{
      -    char c;
      -    apr_os_file_t fd;
      -    int rc;
      -
      -    /* we need to surface EINTR so we'll have to grab the
      -     * native file descriptor and do the OS read() ourselves
      -     */
      -    apr_os_file_get(&fd, pod->pod_in);
      -    rc = read(fd, &c, 1);
      -    if (rc == 1) {
      -        switch (c) {
      -        case RESTART_CHAR:
      -            return AP_RESTART;
      -        case GRACEFUL_CHAR:
      -            return AP_GRACEFUL;
      -        }
      -    }
      -    return AP_NORESTART;
      -}
      -
      -AP_DECLARE(apr_status_t) ap_event_pod_close(ap_event_pod_t * pod)
      -{
      -    apr_status_t rv;
      -
      -    rv = apr_file_close(pod->pod_out);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -
      -    rv = apr_file_close(pod->pod_in);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -    return rv;
      -}
      -
      -static apr_status_t pod_signal_internal(ap_event_pod_t * pod, int graceful)
      -{
      -    apr_status_t rv;
      -    char char_of_death = graceful ? GRACEFUL_CHAR : RESTART_CHAR;
      -    apr_size_t one = 1;
      -
      -    rv = apr_file_write(pod->pod_out, &char_of_death, &one);
      -    if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      -                     "write pipe_of_death");
      -    }
      -    return rv;
      -}
      -
      -AP_DECLARE(apr_status_t) ap_event_pod_signal(ap_event_pod_t * pod, int graceful)
      -{
      -    return pod_signal_internal(pod, graceful);
      -}
      -
      -AP_DECLARE(void) ap_event_pod_killpg(ap_event_pod_t * pod, int num, int graceful)
      -{
      -    int i;
      -    apr_status_t rv = APR_SUCCESS;
      -
      -    for (i = 0; i < num && rv == APR_SUCCESS; i++) {
      -        rv = pod_signal_internal(pod, graceful);
      -    }
      -}
      diff --git a/server/mpm/event/pod.h b/server/mpm/event/pod.h
      deleted file mode 100644
      index 861e4d99574..00000000000
      --- a/server/mpm/event/pod.h
      +++ /dev/null
      @@ -1,59 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file  event/pod.h
      - * @brief pod definitions
      - *
      - * @addtogroup APACHE_MPM_EVENT
      - * @{
      - */
      -
      -#include "apr.h"
      -#include "apr_strings.h"
      -#define APR_WANT_STRFUNC
      -#include "apr_want.h"
      -
      -#include "httpd.h"
      -#include "http_config.h"
      -#include "http_log.h"
      -#include "http_main.h"
      -#include "mpm_common.h"
      -#include "ap_mpm.h"
      -#include "ap_listen.h"
      -#include "mpm_default.h"
      -
      -#define RESTART_CHAR '$'
      -#define GRACEFUL_CHAR '!'
      -
      -#define AP_RESTART  0
      -#define AP_GRACEFUL 1
      -
      -typedef struct ap_event_pod_t ap_event_pod_t;
      -
      -struct ap_event_pod_t
      -{
      -    apr_file_t *pod_in;
      -    apr_file_t *pod_out;
      -    apr_pool_t *p;
      -};
      -
      -AP_DECLARE(apr_status_t) ap_event_pod_open(apr_pool_t * p, ap_event_pod_t ** pod);
      -AP_DECLARE(int) ap_event_pod_check(ap_event_pod_t * pod);
      -AP_DECLARE(apr_status_t) ap_event_pod_close(ap_event_pod_t * pod);
      -AP_DECLARE(apr_status_t) ap_event_pod_signal(ap_event_pod_t * pod, int graceful);
      -AP_DECLARE(void) ap_event_pod_killpg(ap_event_pod_t * pod, int num, int graceful);
      -/** @} */
      diff --git a/server/mpm/mpmt_os2/mpm_default.h b/server/mpm/mpmt_os2/mpm_default.h
      index 02b4a74decd..36ba94427b9 100644
      --- a/server/mpm/mpmt_os2/mpm_default.h
      +++ b/server/mpm/mpmt_os2/mpm_default.h
      @@ -18,7 +18,8 @@
        * @file  mpmt_os2/mpm_default.h
        * @brief os2 MPM defaults
        *
      - * @addtogroup APACHE_MPM_OS2
      + * @defgroup APACHE_MPM_OS2 OS/2 MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/server/mpm/mpmt_os2/mpmt_os2.c b/server/mpm/mpmt_os2/mpmt_os2.c
      index 10362dfefe1..22bf5e73710 100644
      --- a/server/mpm/mpmt_os2/mpmt_os2.c
      +++ b/server/mpm/mpmt_os2/mpmt_os2.c
      @@ -24,7 +24,7 @@
        * spawning children as required to ensure there are always ap_daemons_to_start
        * processes accepting connections.
        *
      - * Each child process consists of a a pool of worker threads and a
      + * Each child process consists of a pool of worker threads and a
        * main thread that accepts connections & passes them to the workers via
        * a work queue. The worker thread pool is dynamic, managed by a maintanence
        * thread so that the number of idle threads is kept between
      @@ -102,7 +102,7 @@ typedef struct {
           listen_socket_t listeners[1];
       } parent_info_t;
       
      -static char master_main();
      +static int master_main();
       static void spawn_child(int slot);
       void ap_mpm_child_main(apr_pool_t *pconf);
       static void set_signals();
      @@ -153,34 +153,35 @@ static int mpmt_os2_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
               ap_mpm_child_main(pconf);
       
               /* Outta here */
      -        return 1;
      +        return DONE;
           }
           else {
               /* Parent process */
      -        char restart;
      +        int rc;
               is_parent_process = TRUE;
       
               if (ap_setup_listeners(ap_server_conf) < 1) {
      -            ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, APLOGNO(00200)
                                "no listening sockets available, shutting down");
      -            return 1;
      +            return !OK;
               }
       
               ap_log_pid(pconf, ap_pid_fname);
       
      -        restart = master_main();
      +        rc = master_main();
               ++ap_my_generation;
               ap_scoreboard_image->global->running_generation = ap_my_generation;
       
      -        if (!restart) {
      +        if (rc != OK) {
                   ap_remove_pid(pconf, ap_pid_fname);
      -            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      -                         "caught SIGTERM, shutting down");
      -            return 1;
      +            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00201)
      +                         "caught %s, shutting down",
      +                         (rc == DONE) ? "SIGTERM" : "error");
      +            return rc;
               }
           }  /* Parent process */
       
      -    return 0; /* Restart */
      +    return OK; /* Restart */
       }
       
       
      @@ -188,7 +189,7 @@ static int mpmt_os2_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
       /* Main processing of the parent process
        * returns TRUE if restarting
        */
      -static char master_main()
      +static int master_main()
       {
           server_rec *s = ap_server_conf;
           ap_listen_rec *lr;
      @@ -201,9 +202,9 @@ static char master_main()
           set_signals();
       
           if (ap_setup_listeners(ap_server_conf) < 1) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, APLOGNO(00202)
                            "no listening sockets available, shutting down");
      -        return FALSE;
      +        return !OK;
           }
       
           /* Allocate a shared memory block for the array of listeners */
      @@ -217,9 +218,9 @@ static char master_main()
                                  PAG_READ|PAG_WRITE|PAG_COMMIT);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, APR_FROM_OS_ERROR(rc), s,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, APR_FROM_OS_ERROR(rc), s, APLOGNO(00203)
                            "failure allocating shared memory, shutting down");
      -        return FALSE;
      +        return !OK;
           }
       
           /* Store the listener sockets in the shared memory area for our children to see */
      @@ -234,9 +235,9 @@ static char master_main()
           rc = DosCreateMutexSem(NULL, &ap_mpm_accept_mutex, DC_SEM_SHARED, FALSE);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, APR_FROM_OS_ERROR(rc), s,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, APR_FROM_OS_ERROR(rc), s, APLOGNO(00204)
                            "failure creating accept mutex, shutting down");
      -        return FALSE;
      +        return !OK;
           }
       
           parent_info->accept_mutex = ap_mpm_accept_mutex;
      @@ -249,24 +250,24 @@ static char master_main()
                                      PAG_COMMIT|PAG_READ|PAG_WRITE);
       
               if (rc) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00205)
                                "unable to allocate shared memory for scoreboard , exiting");
      -            return FALSE;
      +            return !OK;
               }
       
               ap_init_scoreboard(sb_mem);
           }
       
           ap_scoreboard_image->global->restart_time = apr_time_now();
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00206)
                       "%s configured -- resuming normal operations",
                       ap_get_server_description());
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00207)
                       "Server built: %s", ap_get_server_built());
           if (one_process) {
               ap_scoreboard_image->parent[0].pid = getpid();
               ap_mpm_child_main(pconf);
      -        return FALSE;
      +        return DONE;
           }
       
           while (!restart_pending && !shutdown_pending) {
      @@ -318,7 +319,7 @@ static char master_main()
           }
       
           DosFreeMem(parent_info);
      -    return restart_pending;
      +    return restart_pending ? OK : DONE;
       }
       
       
      @@ -339,7 +340,7 @@ static void spawn_child(int slot)
                           ppib->pib_pchcmd, NULL, &proc_rc, progname);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00208)
                            "error spawning child, slot %d", slot);
           }
       
      @@ -382,17 +383,17 @@ static void set_signals()
           sa.sa_handler = sig_term;
       
           if (sigaction(SIGTERM, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGTERM)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00209) "sigaction(SIGTERM)");
       
           if (sigaction(SIGINT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGINT)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00210) "sigaction(SIGINT)");
       
           sa.sa_handler = sig_restart;
       
           if (sigaction(SIGHUP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00211) "sigaction(SIGHUP)");
           if (sigaction(SIGUSR1, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGUSR1)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00212) "sigaction(SIGUSR1)");
       }
       
       
      @@ -492,11 +493,11 @@ static int mpmt_os2_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_daemons_to_start < 0) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00213)
                                "WARNING: StartServers of %d not allowed, "
                                "increasing to 1.", ap_daemons_to_start);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00214)
                                "StartServers of %d not allowed, increasing to 1",
                                ap_daemons_to_start);
               }
      @@ -505,15 +506,12 @@ static int mpmt_os2_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_min_spare_threads < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00215)
                                "WARNING: MinSpareThreads of %d not allowed, "
      -                         "increasing to 1", ap_min_spare_threads);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " to avoid almost certain server failure.");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " Please read the documentation.");
      +                         "increasing to 1 to avoid almost certain server failure. "
      +                         "Please read the documentation.", ap_min_spare_threads);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00216)
                                "MinSpareThreads of %d not allowed, increasing to 1",
                                ap_min_spare_threads);
               }
      diff --git a/server/mpm/mpmt_os2/mpmt_os2_child.c b/server/mpm/mpmt_os2/mpmt_os2_child.c
      index fd5afba8bfb..ca9f594754a 100644
      --- a/server/mpm/mpmt_os2/mpmt_os2_child.c
      +++ b/server/mpm/mpmt_os2/mpmt_os2_child.c
      @@ -117,7 +117,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
           rc = DosCreateEventSem(NULL, &shutdown_event, 0, FALSE);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00189)
                            "unable to create shutdown semaphore, exiting");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -127,7 +127,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
                                     PAG_READ|PAG_WRITE);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00190)
                            "scoreboard not readable in child, exiting");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -139,7 +139,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
           rc = DosOpenMutexSem(NULL, &ap_mpm_accept_mutex);
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00191)
                            "accept mutex couldn't be accessed in child, exiting");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -148,7 +148,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
           for (child_slot = 0; ap_scoreboard_image->parent[child_slot].pid != my_pid && child_slot < HARD_SERVER_LIMIT; child_slot++);
       
           if (child_slot == HARD_SERVER_LIMIT) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00192)
                            "child pid not found in scoreboard, exiting");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -162,7 +162,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
           rc = DosCreateQueue(&workq, QUE_FIFO, apr_psprintf(pchild, "/queues/httpd/work.%d", my_pid));
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00193)
                            "unable to create work queue, exiting");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -235,7 +235,7 @@ void ap_mpm_child_main(apr_pool_t *pconf)
       
               if (rv != APR_SUCCESS) {
                   if (!APR_STATUS_IS_EINTR(rv)) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00194)
                                    "apr_socket_accept");
                       clean_child_exit(APEXIT_CHILDFATAL);
                   }
      @@ -319,7 +319,7 @@ ULONG APIENTRY thread_exception_handler(EXCEPTIONREPORTRECORD *pReportRec,
       
           if (pReportRec->ExceptionNum == XCPT_ACCESS_VIOLATION ||
               pReportRec->ExceptionNum == XCPT_INTEGER_DIVIDE_BY_ZERO) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00195)
                            "caught exception in worker thread, initiating child shutdown pid=%d", getpid());
               for (c=0; c<HARD_THREAD_LIMIT; c++) {
                   if (ap_scoreboard_image->servers[child_slot][c].tid == _gettid()) {
      @@ -370,7 +370,7 @@ static void worker_main(void *vpArg)
                             apr_psprintf(pchild, "/queues/httpd/work.%d", getpid()));
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00196)
                            "unable to open work queue, exiting");
               ap_scoreboard_image->servers[child_slot][thread_slot].tid = 0;
           }
      @@ -424,7 +424,7 @@ static void server_maintenance(void *vpArg)
                             apr_psprintf(pchild, "/queues/httpd/work.%d", getpid()));
       
           if (rc) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, APR_FROM_OS_ERROR(rc), ap_server_conf, APLOGNO(00197)
                            "unable to open work queue in maintenance thread");
               return;
           }
      @@ -479,10 +479,10 @@ static void set_signals()
           sa.sa_handler = sig_term;
       
           if (sigaction(SIGTERM, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGTERM)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00198) "sigaction(SIGTERM)");
       
           sa.sa_handler = sig_hup;
       
           if (sigaction(SIGHUP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00199) "sigaction(SIGHUP)");
       }
      diff --git a/server/mpm/netware/mpm_default.h b/server/mpm/netware/mpm_default.h
      index b8c3ad6f4bb..f7783ceffed 100644
      --- a/server/mpm/netware/mpm_default.h
      +++ b/server/mpm/netware/mpm_default.h
      @@ -18,7 +18,8 @@
        * @file  netware/mpm_default.h
        * @brief Defaults for Netware MPM
        *
      - * @addtogroup APACHE_MPM_NETWARE
      + * @defgroup APACHE_MPM_NETWARE Netware MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       #ifndef APACHE_MPM_DEFAULT_H
      diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c
      index 1f3ee97d537..2fab52f5989 100644
      --- a/server/mpm/netware/mpm_netware.c
      +++ b/server/mpm/netware/mpm_netware.c
      @@ -405,7 +405,7 @@ void worker_main(void *arg)
       
                   if (srv <= 0) {
                       if (srv < 0) {
      -                    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00217)
                               "select() failed on listen socket");
                           apr_thread_yield();
                       }
      @@ -504,14 +504,14 @@ void worker_main(void *arg)
                               * Ben Hyde noted that temporary ENETDOWN situations
                               * occur in mobile IP.
                               */
      -                        ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf, APLOGNO(00218)
                                   "apr_socket_accept: giving up.");
                               clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, ptrans,
                                                bucket_alloc);
                       }
       #endif
                       else {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf, APLOGNO(00219)
                                   "apr_socket_accept: (client socket)");
                               clean_child_exit(1, my_worker_num, ptrans, bucket_alloc);
                       }
      @@ -680,7 +680,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
                   static int reported = 0;
       
                   if (!reported) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00220)
                           "server reached MaxRequestWorkers setting, consider"
                           " raising the MaxRequestWorkers setting");
                       reported = 1;
      @@ -689,7 +689,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
               }
               else {
                   if (idle_spawn_rate >= 8) {
      -                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00221)
                           "server seems busy, (you may need "
                           "to increase StartServers, or Min/MaxSpareServers), "
                           "spawning %d children, there are %d idle, and "
      @@ -812,7 +812,7 @@ static void show_server_data()
           do {
              printf(" %d", lr->bind_addr->port);
              lr = lr->next;
      -    } while(lr && lr != ap_listeners);
      +    } while (lr && lr != ap_listeners);
       
           /* Display dynamic modules loaded */
           printf("\n");
      @@ -830,7 +830,7 @@ static int setup_listeners(server_rec *s)
           int sockdes;
       
           if (ap_setup_listeners(s) < 1 ) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, APLOGNO(00222)
                   "no listening sockets available, shutting down");
               return -1;
           }
      @@ -870,9 +870,9 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           ap_server_conf = s;
       
           if (setup_listeners(s)) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, status, s,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, status, s, APLOGNO(00223)
                   "no listening sockets available, shutting down");
      -        return -1;
      +        return !OK;
           }
       
           restart_pending = shutdown_pending = 0;
      @@ -880,7 +880,7 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
           if (!is_graceful) {
               if (ap_run_pre_mpm(s->process->pool, SB_NOT_SHARED) != OK) {
      -            return 1;
      +            return !OK;
               }
           }
       
      @@ -910,12 +910,13 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
               hold_screen_on_exit = 0;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00224)
                   "%s configured -- resuming normal operations",
                   ap_get_server_description());
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00225)
                   "Server built: %s", ap_get_server_built());
           ap_log_command_line(plog, s);
      +    ap_log_mpm_common(s);
           show_server_data();
       
           mpm_state = AP_MPMQ_RUNNING;
      @@ -938,17 +939,17 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           shutdown_listeners();*/
       
           if (shutdown_pending) { /* Got an unload from the console */
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00226)
                   "caught SIGTERM, shutting down");
       
               while (worker_thread_count > 0) {
      -            printf ("\rShutdown pending. Waiting for %d thread(s) to terminate...",
      +            printf ("\rShutdown pending. Waiting for %lu thread(s) to terminate...",
                           worker_thread_count);
                   apr_thread_yield();
               }
       
               mpm_main_cleanup();
      -        return 1;
      +        return DONE;
           }
           else {  /* the only other way out is a restart */
               /* advance to the next generation */
      @@ -958,12 +959,12 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
               ++ap_my_generation;
               ap_scoreboard_image->global->running_generation = ap_my_generation;
       
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00227)
                       "Graceful restart requested, doing restart");
       
               /* Wait for all of the threads to terminate before initiating the restart */
               while (worker_thread_count > 0) {
      -            printf ("\rRestart pending. Waiting for %d thread(s) to terminate...",
      +            printf ("\rRestart pending. Waiting for %lu thread(s) to terminate...",
                           worker_thread_count);
                   apr_thread_yield();
               }
      @@ -971,7 +972,7 @@ static int netware_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           }
       
           mpm_main_cleanup();
      -    return 0;
      +    return OK;
       }
       
       static int netware_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
      @@ -1018,19 +1019,15 @@ static int netware_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_threads_limit > HARD_THREAD_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00228)
                                "WARNING: MaxThreads of %d exceeds compile-time "
      -                         "limit of", ap_threads_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         HARD_THREAD_LIMIT, HARD_THREAD_LIMIT);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the HARD_THREAD_LIMIT"
      -                         "define in");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " server/mpm/netware%s.", MPM_HARD_LIMITS_FILE);
      +                         "limit of %d threads, decreasing to %d. "
      +                         "To increase, please see the HARD_THREAD_LIMIT "
      +                         "define in server/mpm/netware%s.",
      +                         ap_threads_limit, HARD_THREAD_LIMIT, HARD_THREAD_LIMIT,
      +                         MPM_HARD_LIMITS_FILE);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00229)
                                "MaxThreads of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                ap_threads_limit, HARD_THREAD_LIMIT);
      @@ -1039,11 +1036,11 @@ static int netware_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (ap_threads_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00230)
                                "WARNING: MaxThreads of %d not allowed, "
                                "increasing to 1.", ap_threads_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(02661)
                                "MaxThreads of %d not allowed, increasing to 1",
                                ap_threads_limit);
               }
      @@ -1055,11 +1052,11 @@ static int netware_check_config(apr_pool_t *p, apr_pool_t *plog,
            */
           if (ap_threads_to_start < 0) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00231)
                                "WARNING: StartThreads of %d not allowed, "
                                "increasing to 1.", ap_threads_to_start);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00232)
                                "StartThreads of %d not allowed, increasing to 1",
                                ap_threads_to_start);
               }
      @@ -1068,15 +1065,12 @@ static int netware_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_threads_min_free < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00233)
                                "WARNING: MinSpareThreads of %d not allowed, "
      -                         "increasing to 1", ap_threads_min_free);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " to avoid almost certain server failure.");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " Please read the documentation.");
      +                         "increasing to 1 to avoid almost certain server failure. "
      +                         "Please read the documentation.", ap_threads_min_free);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00234)
                                "MinSpareThreads of %d not allowed, increasing to 1",
                                ap_threads_min_free);
               }
      @@ -1202,7 +1196,7 @@ static int CommandLineInterpreter(scr_t screenID, const char *commandLine)
               ActivateScreen (getscreenhandle());
       
               /* If an instance id was not given but the nlm is loaded in
      -            protected space, then the the command belongs to the
      +            protected space, then the command belongs to the
                   OS address space instance to pass it on. */
               pID = strstr (szcommandLine, "-p");
               if ((pID == NULL) && nlmisloadedprotected())
      diff --git a/server/mpm/prefork/mpm_default.h b/server/mpm/prefork/mpm_default.h
      index 5f131c5a028..55b038b5302 100644
      --- a/server/mpm/prefork/mpm_default.h
      +++ b/server/mpm/prefork/mpm_default.h
      @@ -18,7 +18,8 @@
        * @file  prefork/mpm_default.h
        * @brief Prefork MPM defaults
        *
      - * @addtogroup APACHE_MPM_PREFORK
      + * @defgroup APACHE_MPM_PREFORK Prefork MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
      index 5c382c92c87..8bb46a3948f 100644
      --- a/server/mpm/prefork/prefork.c
      +++ b/server/mpm/prefork/prefork.c
      @@ -48,6 +48,8 @@
       #include "ap_mmn.h"
       #include "apr_poll.h"
       
      +#include <stdlib.h>
      +
       #ifdef HAVE_TIME_H
       #include <time.h>
       #endif
      @@ -86,14 +88,12 @@
       
       /* config globals */
       
      -static apr_proc_mutex_t *accept_mutex;
       static int ap_daemons_to_start=0;
       static int ap_daemons_min_free=0;
       static int ap_daemons_max_free=0;
       static int ap_daemons_limit=0;      /* MaxRequestWorkers */
       static int server_limit = 0;
       static int mpm_state = AP_MPMQ_STARTING;
      -static ap_pod_t *pod;
       
       /* data retained by prefork across load/unload of the module
        * allocated on first call to pre-config hook; located on
      @@ -125,6 +125,15 @@ typedef struct prefork_retained_data {
       } prefork_retained_data;
       static prefork_retained_data *retained;
       
      +typedef struct prefork_child_bucket {
      +    ap_pod_t *pod;
      +    ap_listen_rec *listeners;
      +    apr_proc_mutex_t *mutex;
      +} prefork_child_bucket;
      +static int                   num_buckets; /* Number of listeners buckets */
      +static prefork_child_bucket *all_buckets, /* All listeners buckets */
      +                            *my_bucket;   /* Current child bucket */
      +
       #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
       
       /* one_process --- debugging mode variable; can be set from the command line
      @@ -175,12 +184,12 @@ static void chdir_for_gprof(void)
                                  APR_GREAD | APR_GEXECUTE |
                                  APR_WREAD | APR_WEXECUTE, pconf);
               if(res != APR_SUCCESS && !APR_STATUS_IS_EEXIST(res)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, res, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, res, ap_server_conf, APLOGNO(00142)
                                "gprof: error creating directory %s", dir);
               }
           }
           else {
      -        use_dir = ap_server_root_relative(pconf, DEFAULT_REL_RUNTIMEDIR);
      +        use_dir = ap_runtime_dir_relative(pconf, "");
           }
       
           chdir(use_dir);
      @@ -222,48 +231,50 @@ static void clean_child_exit(int code)
               prefork_note_child_killed(/* slot */ 0, 0, 0);
           }
       
      -    ap_mpm_pod_close(pod);
      +    ap_mpm_pod_close(my_bucket->pod);
           chdir_for_gprof();
           exit(code);
       }
       
      -static void accept_mutex_on(void)
      +static apr_status_t accept_mutex_on(void)
       {
      -    apr_status_t rv = apr_proc_mutex_lock(accept_mutex);
      +    apr_status_t rv = apr_proc_mutex_lock(my_bucket->mutex);
           if (rv != APR_SUCCESS) {
               const char *msg = "couldn't grab the accept mutex";
       
               if (retained->my_generation !=
                   ap_scoreboard_image->global->running_generation) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf, "%s", msg);
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf, APLOGNO(00143) "%s", msg);
                   clean_child_exit(0);
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, "%s", msg);
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(00144) "%s", msg);
                   exit(APEXIT_CHILDFATAL);
               }
           }
      +    return APR_SUCCESS;
       }
       
      -static void accept_mutex_off(void)
      +static apr_status_t accept_mutex_off(void)
       {
      -    apr_status_t rv = apr_proc_mutex_unlock(accept_mutex);
      +    apr_status_t rv = apr_proc_mutex_unlock(my_bucket->mutex);
           if (rv != APR_SUCCESS) {
               const char *msg = "couldn't release the accept mutex";
       
               if (retained->my_generation !=
                   ap_scoreboard_image->global->running_generation) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf, "%s", msg);
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf, APLOGNO(00145) "%s", msg);
                   /* don't exit here... we have a connection to
                    * process, after which point we'll see that the
                    * generation changed and we'll exit cleanly
                    */
               }
               else {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, "%s", msg);
      +            ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(00146) "%s", msg);
                   exit(APEXIT_CHILDFATAL);
               }
           }
      +    return APR_SUCCESS;
       }
       
       /* On some architectures it's safe to do unserialized accept()s in the single
      @@ -272,9 +283,9 @@ static void accept_mutex_off(void)
        * when it's safe in the single Listen case.
        */
       #ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
      -#define SAFE_ACCEPT(stmt) do {if (ap_listeners->next) {stmt;}} while(0)
      +#define SAFE_ACCEPT(stmt) (ap_listeners->next ? (stmt) : APR_SUCCESS)
       #else
      -#define SAFE_ACCEPT(stmt) do {stmt;} while(0)
      +#define SAFE_ACCEPT(stmt) (stmt)
       #endif
       
       static int prefork_query(int query_code, int *result, apr_status_t *rv)
      @@ -352,7 +363,7 @@ static int volatile die_now = 0;
       static void stop_listening(int sig)
       {
           mpm_state = AP_MPMQ_STOPPING;
      -    ap_close_listeners();
      +    ap_close_listeners_ex(my_bucket->listeners);
       
           /* For a graceful stop, we want the child to exit when done */
           die_now = 1;
      @@ -402,20 +413,20 @@ static void set_signals(void)
       
           sa.sa_handler = sig_term;
           if (sigaction(SIGTERM, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGTERM)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00147) "sigaction(SIGTERM)");
       #ifdef AP_SIG_GRACEFUL_STOP
           if (sigaction(AP_SIG_GRACEFUL_STOP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00148)
                            "sigaction(" AP_SIG_GRACEFUL_STOP_STRING ")");
       #endif
       #ifdef SIGINT
           if (sigaction(SIGINT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGINT)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00149) "sigaction(SIGINT)");
       #endif
       #ifdef SIGXCPU
           sa.sa_handler = SIG_DFL;
           if (sigaction(SIGXCPU, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGXCPU)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00150) "sigaction(SIGXCPU)");
       #endif
       #ifdef SIGXFSZ
           /* For systems following the LFS standard, ignoring SIGXFSZ allows
      @@ -423,12 +434,12 @@ static void set_signals(void)
            * rather than terminate the process. */
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGXFSZ, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGXFSZ)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00151) "sigaction(SIGXFSZ)");
       #endif
       #ifdef SIGPIPE
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGPIPE, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGPIPE)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00152) "sigaction(SIGPIPE)");
       #endif
       
           /* we want to ignore HUPs and AP_SIG_GRACEFUL while we're busy
      @@ -438,9 +449,9 @@ static void set_signals(void)
           sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
           sa.sa_handler = restart;
           if (sigaction(SIGHUP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(SIGHUP)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00153) "sigaction(SIGHUP)");
           if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "sigaction(" AP_SIG_GRACEFUL_STRING ")");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00154) "sigaction(" AP_SIG_GRACEFUL_STRING ")");
       #else
           if (!one_process) {
       #ifdef SIGXCPU
      @@ -477,7 +488,7 @@ static void set_signals(void)
       static int requests_this_child;
       static int num_listensocks = 0;
       
      -static void child_main(int child_num_arg)
      +static void child_main(int child_num_arg, int child_bucket)
       {
       #if APR_HAS_THREADS
           apr_thread_t *thd = NULL;
      @@ -521,18 +532,26 @@ static void child_main(int child_num_arg)
           apr_pool_create(&ptrans, pchild);
           apr_pool_tag(ptrans, "transaction");
       
      +    /* close unused listeners and pods */
      +    for (i = 0; i < num_buckets; i++) {
      +        if (i != child_bucket) {
      +            ap_close_listeners_ex(all_buckets[i].listeners);
      +            ap_mpm_pod_close(all_buckets[i].pod);
      +        }
      +    }
      +
           /* needs to be done before we switch UIDs so we have permissions */
           ap_reopen_scoreboard(pchild, NULL, 0);
      -    lockfile = apr_proc_mutex_lockfile(accept_mutex);
      -    status = apr_proc_mutex_child_init(&accept_mutex,
      -                                       lockfile,
      -                                       pchild);
      +    status = SAFE_ACCEPT(apr_proc_mutex_child_init(&my_bucket->mutex,
      +                                    apr_proc_mutex_lockfile(my_bucket->mutex),
      +                                    pchild));
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
      +        lockfile = apr_proc_mutex_lockfile(my_bucket->mutex);
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00155)
                            "Couldn't initialize cross-process lock in child "
                            "(%s) (%s)",
                            lockfile ? lockfile : "none",
      -                     apr_proc_mutex_name(accept_mutex));
      +                     apr_proc_mutex_name(my_bucket->mutex));
               clean_child_exit(APEXIT_CHILDFATAL);
           }
       
      @@ -549,12 +568,12 @@ static void child_main(int child_num_arg)
           /* Set up the pollfd array */
           status = apr_pollset_create(&pollset, num_listensocks, pchild, 0);
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00156)
                            "Couldn't create pollset in child; check system or user limits");
               clean_child_exit(APEXIT_CHILDSICK); /* assume temporary resource issue */
           }
       
      -    for (lr = ap_listeners, i = num_listensocks; i--; lr = lr->next) {
      +    for (lr = my_bucket->listeners, i = num_listensocks; i--; lr = lr->next) {
               apr_pollfd_t pfd = { 0 };
       
               pfd.desc_type = APR_POLL_SOCKET;
      @@ -564,9 +583,16 @@ static void child_main(int child_num_arg)
       
               status = apr_pollset_add(pollset, &pfd);
               if (status != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
      -                         "Couldn't add listener to pollset; check system or user limits");
      -            clean_child_exit(APEXIT_CHILDSICK);
      +            /* If the child processed a SIGWINCH before setting up the
      +             * pollset, this error path is expected and harmless,
      +             * since the listener fd was already closed; so don't
      +             * pollute the logs in that case. */
      +            if (!die_now) {
      +                ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf, APLOGNO(00157)
      +                             "Couldn't add listener to pollset; check system or user limits");
      +                clean_child_exit(APEXIT_CHILDSICK);
      +            }
      +            clean_child_exit(0);
               }
       
               lr->accept_func = ap_unixd_accept;
      @@ -605,7 +631,7 @@ static void child_main(int child_num_arg)
       
               if (num_listensocks == 1) {
                   /* There is only one listener record, so refer to that one. */
      -            lr = ap_listeners;
      +            lr = my_bucket->listeners;
               }
               else {
                   /* multiple listening sockets - need to poll */
      @@ -639,9 +665,9 @@ static void child_main(int child_num_arg)
                            * occasionally, and we'd loop forever due to it.
                            */
                           ap_log_error(APLOG_MARK, APLOG_ERR, status,
      -                                 ap_server_conf, "apr_pollset_poll: (listen)");
      +                                 ap_server_conf, APLOGNO(00158) "apr_pollset_poll: (listen)");
                           SAFE_ACCEPT(accept_mutex_off());
      -                    clean_child_exit(1);
      +                    clean_child_exit(APEXIT_CHILDSICK);
                       }
       
                       /* We can always use pdesc[0], but sockets at position N
      @@ -677,8 +703,8 @@ static void child_main(int child_num_arg)
               SAFE_ACCEPT(accept_mutex_off());      /* unlock after "accept" */
       
               if (status == APR_EGENERAL) {
      -            /* resource shortage or should-not-occur occured */
      -            clean_child_exit(1);
      +            /* resource shortage or should-not-occur occurred */
      +            clean_child_exit(APEXIT_CHILDSICK);
               }
               else if (status != APR_SUCCESS) {
                   continue;
      @@ -703,7 +729,7 @@ static void child_main(int child_num_arg)
                * while we were processing the connection or we are the lucky
                * idle server process that gets to die.
                */
      -        if (ap_mpm_pod_check(pod) == APR_SUCCESS) { /* selected as idle? */
      +        if (ap_mpm_pod_check(my_bucket->pod) == APR_SUCCESS) { /* selected as idle? */
                   die_now = 1;
               }
               else if (retained->my_generation !=
      @@ -719,7 +745,7 @@ static void child_main(int child_num_arg)
       }
       
       
      -static int make_child(server_rec *s, int slot)
      +static int make_child(server_rec *s, int slot, int bucket)
       {
           int pid;
       
      @@ -728,6 +754,8 @@ static int make_child(server_rec *s, int slot)
           }
       
           if (one_process) {
      +        my_bucket = &all_buckets[0];
      +
               apr_signal(SIGHUP, sig_term);
               /* Don't catch AP_SIG_GRACEFUL in ONE_PROCESS mode :) */
               apr_signal(SIGINT, sig_term);
      @@ -736,21 +764,22 @@ static int make_child(server_rec *s, int slot)
       #endif
               apr_signal(SIGTERM, sig_term);
               prefork_note_child_started(slot, getpid());
      -        child_main(slot);
      +        child_main(slot, 0);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return -1;
           }
       
           (void) ap_update_child_status_from_indexes(slot, 0, SERVER_STARTING,
                                                      (request_rec *) NULL);
       
      -
       #ifdef _OSD_POSIX
           /* BS2000 requires a "special" version of fork() before a setuid() call */
           if ((pid = os_fork(ap_unixd_config.user_name)) == -1) {
       #else
           if ((pid = fork()) == -1) {
       #endif
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s, "fork: Unable to fork new process");
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s, APLOGNO(00159) "fork: Unable to fork new process");
       
               /* fork didn't succeed. Fix the scoreboard or else
                * it will say SERVER_STARTING forever and ever
      @@ -768,6 +797,8 @@ static int make_child(server_rec *s, int slot)
           }
       
           if (!pid) {
      +        my_bucket = &all_buckets[bucket];
      +
       #ifdef HAVE_BINDPROCESSOR
               /* by default AIX binds to a single processor
                * this bit unbinds children which will then bind to another cpu
      @@ -776,7 +807,7 @@ static int make_child(server_rec *s, int slot)
                                          PROCESSOR_CLASS_ANY);
               if (status != OK) {
                   ap_log_error(APLOG_MARK, APLOG_DEBUG, errno,
      -                         ap_server_conf, "processor unbind failed");
      +                         ap_server_conf, APLOGNO(00160) "processor unbind failed");
               }
       #endif
               RAISE_SIGSTOP(MAKE_CHILD);
      @@ -790,9 +821,10 @@ static int make_child(server_rec *s, int slot)
                * The pod is used for signalling the graceful restart.
                */
               apr_signal(AP_SIG_GRACEFUL, stop_listening);
      -        child_main(slot);
      +        child_main(slot, bucket);
           }
       
      +    ap_scoreboard_image->parent[slot].bucket = bucket;
           prefork_note_child_started(slot, pid);
       
           return 0;
      @@ -808,7 +840,7 @@ static void startup_children(int number_to_start)
               if (ap_scoreboard_image->servers[i][0].status != SERVER_DEAD) {
                   continue;
               }
      -        if (make_child(ap_server_conf, i) < 0) {
      +        if (make_child(ap_server_conf, i, i % num_buckets) < 0) {
                   break;
               }
               --number_to_start;
      @@ -817,6 +849,8 @@ static void startup_children(int number_to_start)
       
       static void perform_idle_server_maintenance(apr_pool_t *p)
       {
      +    static int bucket_make_child_record = -1;
      +    static int bucket_kill_child_record = -1;
           int i;
           int idle_count;
           worker_score *ws;
      @@ -867,7 +901,8 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
                * shut down gracefully, in case it happened to pick up a request
                * while we were counting
                */
      -        ap_mpm_pod_signal(pod);
      +        bucket_kill_child_record = (bucket_kill_child_record + 1) % num_buckets;
      +        ap_mpm_pod_signal(all_buckets[bucket_kill_child_record].pod);
               retained->idle_spawn_rate = 1;
           }
           else if (idle_count < ap_daemons_min_free) {
      @@ -875,7 +910,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
               if (free_length == 0) {
                   /* only report this condition once */
                   if (!retained->maxclients_reported) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00161)
                                   "server reached MaxRequestWorkers setting, consider"
                                   " raising the MaxRequestWorkers setting");
                       retained->maxclients_reported = 1;
      @@ -884,7 +919,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
               }
               else {
                   if (retained->idle_spawn_rate >= 8) {
      -                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00162)
                           "server seems busy, (you may need "
                           "to increase StartServers, or Min/MaxSpareServers), "
                           "spawning %d children, there are %d idle, and "
      @@ -892,7 +927,10 @@ static void perform_idle_server_maintenance(apr_pool_t *p)
                           idle_count, total_non_dead);
                   }
                   for (i = 0; i < free_length; ++i) {
      -                make_child(ap_server_conf, free_slots[i]);
      +                bucket_make_child_record++;
      +                bucket_make_child_record %= num_buckets;
      +                make_child(ap_server_conf, free_slots[i],
      +                           bucket_make_child_record);
                   }
                   /* the next time around we want to spawn twice as many if this
                    * wasn't good enough, but not if we've just done a graceful
      @@ -918,22 +956,14 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       {
           int index;
           int remaining_children_to_start;
      -    apr_status_t rv;
      +    int i;
       
           ap_log_pid(pconf, ap_pid_fname);
       
      -    /* Initialize cross-process accept lock */
      -    rv = ap_proc_mutex_create(&accept_mutex, NULL, AP_ACCEPT_MUTEX_TYPE, NULL,
      -                              s, _pconf, 0);
      -    if (rv != APR_SUCCESS) {
      -        mpm_state = AP_MPMQ_STOPPING;
      -        return DONE;
      -    }
      -
           if (!retained->is_graceful) {
               if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
                   mpm_state = AP_MPMQ_STOPPING;
      -            return DONE;
      +            return !OK;
               }
               /* fix the generation number in the global score; we just got a new,
                * cleared scoreboard
      @@ -946,12 +976,23 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
           if (one_process) {
               AP_MONCONTROL(1);
      -        make_child(ap_server_conf, 0);
      +        make_child(ap_server_conf, 0, 0);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return !OK;
           }
      -    else {
      -    if (ap_daemons_max_free < ap_daemons_min_free + 1)  /* Don't thrash... */
      -        ap_daemons_max_free = ap_daemons_min_free + 1;
      +
      +    /* Don't thrash since num_buckets depends on the
      +     * system and the number of online CPU cores...
      +     */
      +    if (ap_daemons_limit < num_buckets)
      +        ap_daemons_limit = num_buckets;
      +    if (ap_daemons_to_start < num_buckets)
      +        ap_daemons_to_start = num_buckets;
      +    if (ap_daemons_min_free < num_buckets)
      +        ap_daemons_min_free = num_buckets;
      +    if (ap_daemons_max_free < ap_daemons_min_free + num_buckets)
      +        ap_daemons_max_free = ap_daemons_min_free + num_buckets;
       
           /* If we're doing a graceful_restart then we're going to see a lot
            * of children exiting immediately when we get into the main loop
      @@ -976,15 +1017,18 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
               retained->hold_off_on_exponential_spawning = 10;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00163)
                       "%s configured -- resuming normal operations",
                       ap_get_server_description());
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00164)
                       "Server built: %s", ap_get_server_built());
           ap_log_command_line(plog, s);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_mpm_common(s);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00165)
                       "Accept mutex: %s (default: %s)",
      -                apr_proc_mutex_name(accept_mutex),
      +                (all_buckets[0].mutex)
      +                    ? apr_proc_mutex_name(all_buckets[0].mutex)
      +                    : "none",
                       apr_proc_mutex_defname());
       
           mpm_state = AP_MPMQ_RUNNING;
      @@ -1015,10 +1059,10 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                           || ap_get_scoreboard_process(child_slot)->generation
                              == retained->my_generation) {
                           mpm_state = AP_MPMQ_STOPPING;
      -                    return DONE;
      +                    return !OK;
                       }
                       else {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, APLOGNO(00166)
                                        "Ignoring fatal error in child of previous "
                                        "generation (pid %ld).",
                                        (long)pid.pid);
      @@ -1041,7 +1085,8 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                           /* we're still doing a 1-for-1 replacement of dead
                            * children with new children
                            */
      -                    make_child(ap_server_conf, child_slot);
      +                    make_child(ap_server_conf, child_slot,
      +                               ap_get_scoreboard_process(child_slot)->bucket);
                           --remaining_children_to_start;
                       }
       #if APR_HAS_OTHER_CHILD
      @@ -1056,7 +1101,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                        * child.
                        */
                       ap_log_error(APLOG_MARK, APLOG_WARNING,
      -                            0, ap_server_conf,
      +                            0, ap_server_conf, APLOGNO(00167)
                                   "long lost child came home! (pid %ld)", (long)pid.pid);
                   }
                   /* Don't perform idle maintenance when a child dies,
      @@ -1082,7 +1127,6 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
               perform_idle_server_maintenance(pconf);
           }
      -    } /* one_process */
       
           mpm_state = AP_MPMQ_STOPPING;
       
      @@ -1091,14 +1135,14 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                * Kill child processes, tell them to call child_exit, etc...
                */
               if (ap_unixd_killpg(getpgrp(), SIGTERM) < 0) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "killpg SIGTERM");
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00168) "killpg SIGTERM");
               }
               ap_reclaim_child_processes(1, /* Start with SIGTERM */
                                          prefork_note_child_killed);
       
               /* cleanup pid file on normal shutdown */
               ap_remove_pid(pconf, ap_pid_fname);
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00169)
                           "caught SIGTERM, shutting down");
       
               return DONE;
      @@ -1115,7 +1159,9 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
               ap_close_listeners();
       
               /* kill off the idle ones */
      -        ap_mpm_pod_killpg(pod, retained->max_daemons_limit);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_pod_killpg(all_buckets[i].pod, retained->max_daemons_limit);
      +        }
       
               /* Send SIGUSR1 to the active children */
               active_children = 0;
      @@ -1132,7 +1178,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
               /* cleanup pid file */
               ap_remove_pid(pconf, ap_pid_fname);
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00170)
                  "caught " AP_SIG_GRACEFUL_STOP_STRING ", shutting down gracefully");
       
               if (ap_graceful_shutdown_timeout) {
      @@ -1185,11 +1231,13 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           ap_scoreboard_image->global->running_generation = retained->my_generation;
       
           if (retained->is_graceful) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00171)
                           "Graceful restart requested, doing restart");
       
               /* kill off the idle ones */
      -        ap_mpm_pod_killpg(pod, retained->max_daemons_limit);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_pod_killpg(all_buckets[i].pod, retained->max_daemons_limit);
      +        }
       
               /* This is mostly for debugging... so that we know what is still
                * gracefully dealing with existing request.  This will break
      @@ -1213,11 +1261,11 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           else {
               /* Kill 'em off */
               if (ap_unixd_killpg(getpgrp(), SIGHUP) < 0) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "killpg SIGHUP");
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00172) "killpg SIGHUP");
               }
               ap_reclaim_child_processes(0, /* Not when just starting up */
                                          prefork_note_child_killed);
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00173)
                           "SIGHUP received.  Attempting to restart");
           }
       
      @@ -1231,7 +1279,10 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
       {
           int startup = 0;
           int level_flags = 0;
      +    ap_listen_rec **listen_buckets;
           apr_status_t rv;
      +    char id[16];
      +    int i;
       
           pconf = p;
       
      @@ -1245,15 +1296,45 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
               ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
                            (startup ? NULL : s),
                            "no listening sockets available, shutting down");
      -        return DONE;
      +        return !OK;
           }
       
      -    if ((rv = ap_mpm_pod_open(pconf, &pod))) {
      +    if (one_process) {
      +        num_buckets = 1;
      +    }
      +    else if (!retained->is_graceful) { /* Preserve the number of buckets
      +                                          on graceful restarts. */
      +        num_buckets = 0;
      +    }
      +    if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
      +                                     &listen_buckets, &num_buckets))) {
               ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
                            (startup ? NULL : s),
      -                     "could not open pipe-of-death");
      -        return DONE;
      +                     "could not duplicate listeners");
      +        return !OK;
           }
      +    all_buckets = apr_pcalloc(pconf, num_buckets *
      +                                     sizeof(prefork_child_bucket));
      +    for (i = 0; i < num_buckets; i++) {
      +        if ((rv = ap_mpm_pod_open(pconf, &all_buckets[i].pod))) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
      +                         (startup ? NULL : s),
      +                         "could not open pipe-of-death");
      +            return !OK;
      +        }
      +        /* Initialize cross-process accept lock (safe accept needed only) */
      +        if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i", i),
      +                               ap_proc_mutex_create(&all_buckets[i].mutex,
      +                                                    NULL, AP_ACCEPT_MUTEX_TYPE,
      +                                                    id, s, pconf, 0))))) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
      +                         (startup ? NULL : s),
      +                         "could not create accept mutex");
      +            return !OK;
      +        }
      +        all_buckets[i].listeners = listen_buckets[i];
      +    }
      +
           return OK;
       }
       
      @@ -1295,7 +1376,7 @@ static int prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp
                   rv = apr_proc_detach(no_detach ? APR_PROC_DETACH_FOREGROUND
                                                  : APR_PROC_DETACH_DAEMONIZE);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00174)
                                    "apr_proc_detach failed");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -1327,14 +1408,12 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (server_limit > MAX_SERVER_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00175)
                                "WARNING: ServerLimit of %d exceeds compile-time "
      -                         "limit of", server_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d servers, decreasing to %d.",
      -                         MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
      +                         "limit of %d servers, decreasing to %d.",
      +                         server_limit, MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00176)
                                "ServerLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                server_limit, MAX_SERVER_LIMIT);
      @@ -1343,11 +1422,11 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00177)
                                "WARNING: ServerLimit of %d not allowed, "
                                "increasing to 1.", server_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00178)
                                "ServerLimit of %d not allowed, increasing to 1",
                                server_limit);
               }
      @@ -1362,7 +1441,7 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit != retained->first_server_limit) {
               /* don't need a startup console version here */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00179)
                            "changing ServerLimit to %d from original value of %d "
                            "not allowed during restart",
                            server_limit, retained->first_server_limit);
      @@ -1371,17 +1450,13 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_daemons_limit > server_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00180)
                                "WARNING: MaxRequestWorkers of %d exceeds ServerLimit "
      -                         "value of", ap_daemons_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d servers, decreasing MaxRequestWorkers to %d.",
      -                         server_limit, server_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ServerLimit "
      -                         "directive.");
      +                         "value of %d servers, decreasing MaxRequestWorkers to %d. "
      +                         "To increase, please see the ServerLimit directive.",
      +                         ap_daemons_limit, server_limit, server_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00181)
                                "MaxRequestWorkers of %d exceeds ServerLimit value "
                                "of %d, decreasing to match",
                                ap_daemons_limit, server_limit);
      @@ -1390,11 +1465,11 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (ap_daemons_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00182)
                                "WARNING: MaxRequestWorkers of %d not allowed, "
                                "increasing to 1.", ap_daemons_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00183)
                                "MaxRequestWorkers of %d not allowed, increasing to 1",
                                ap_daemons_limit);
               }
      @@ -1402,13 +1477,13 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
       
           /* ap_daemons_to_start > ap_daemons_limit checked in prefork_run() */
      -    if (ap_daemons_to_start < 0) {
      +    if (ap_daemons_to_start < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00184)
                                "WARNING: StartServers of %d not allowed, "
                                "increasing to 1.", ap_daemons_to_start);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00185)
                                "StartServers of %d not allowed, increasing to 1",
                                ap_daemons_to_start);
               }
      @@ -1417,15 +1492,12 @@ static int prefork_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_daemons_min_free < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00186)
                                "WARNING: MinSpareServers of %d not allowed, "
      -                         "increasing to 1", ap_daemons_min_free);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " to avoid almost certain server failure.");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " Please read the documentation.");
      +                         "increasing to 1 to avoid almost certain server failure. "
      +                         "Please read the documentation.", ap_daemons_min_free);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00187)
                                "MinSpareServers of %d not allowed, increasing to 1",
                                ap_daemons_min_free);
               }
      @@ -1496,7 +1568,7 @@ static const char *set_max_clients (cmd_parms *cmd, void *dummy, const char *arg
               return err;
           }
           if (!strcasecmp(cmd->cmd->name, "MaxClients")) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(00188)
                            "MaxClients is deprecated, use MaxRequestWorkers "
                            "instead.");
           }
      diff --git a/server/mpm/simple/Makefile.in b/server/mpm/simple/Makefile.in
      deleted file mode 100644
      index f34af9cbd66..00000000000
      --- a/server/mpm/simple/Makefile.in
      +++ /dev/null
      @@ -1 +0,0 @@
      -include $(top_srcdir)/build/special.mk
      diff --git a/server/mpm/simple/SIMPLE.README b/server/mpm/simple/SIMPLE.README
      deleted file mode 100644
      index f04090b7b40..00000000000
      --- a/server/mpm/simple/SIMPLE.README
      +++ /dev/null
      @@ -1,6 +0,0 @@
      -The Simple MPM aims to create a single MPM, that runs on all modern
      -Unix and Win32 platforms, by using APR as much as possible.
      -
      -The Simple MPM core run loop revovles around a Poll CB event system, with 
      -timers being built in.  When an event, either an IO or Timer is ready to run, 
      -it is dispatched to any available threads in the currrent process.
      diff --git a/server/mpm/simple/config.m4 b/server/mpm/simple/config.m4
      deleted file mode 100644
      index 82500d278aa..00000000000
      --- a/server/mpm/simple/config.m4
      +++ /dev/null
      @@ -1,13 +0,0 @@
      -AC_MSG_CHECKING(if simple MPM supports this platform)
      -if test $forking_mpms_supported != yes; then
      -    AC_MSG_RESULT(no - This is not a forking platform)
      -elif test $ac_cv_define_APR_HAS_THREADS != yes; then
      -    AC_MSG_RESULT(no - APR does not support threads)
      -elif test $have_threaded_sig_graceful != yes; then
      -    AC_MSG_RESULT(no - SIG_GRACEFUL cannot be used with a threaded MPM)
      -elif test $ac_cv_have_threadsafe_pollset != yes; then
      -    AC_MSG_RESULT(no - APR_POLLSET_THREADSAFE is not supported)
      -else
      -    AC_MSG_RESULT(yes)
      -    APACHE_MPM_SUPPORTED(simple, yes, yes)
      -fi
      diff --git a/server/mpm/simple/config3.m4 b/server/mpm/simple/config3.m4
      deleted file mode 100644
      index e518119518c..00000000000
      --- a/server/mpm/simple/config3.m4
      +++ /dev/null
      @@ -1,3 +0,0 @@
      -simple_objects="simple_api.lo simple_children.lo simple_core.lo \
      -simple_event.lo simple_run.lo simple_io.lo"
      -APACHE_MPM_MODULE(simple, $enable_mpm_simple, $simple_objects)
      diff --git a/server/mpm/simple/simple_api.c b/server/mpm/simple/simple_api.c
      deleted file mode 100644
      index 6de5226a6bf..00000000000
      --- a/server/mpm/simple/simple_api.c
      +++ /dev/null
      @@ -1,277 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "ap_mpm.h"
      -#include "httpd.h"
      -#include "http_config.h"
      -#include "mpm_common.h"
      -#include "http_log.h"
      -#include "scoreboard.h"
      -#include "ap_listen.h"
      -#include "simple_types.h"
      -#include "simple_run.h"
      -#include "http_core.h"
      -
      -/* This file contains the absolute minimal MPM API, to interface with httpd. */
      -
      -static int simple_run(apr_pool_t * pconf, apr_pool_t * plog, server_rec * s)
      -{
      -    simple_core_t *sc = simple_core_get();
      -
      -    sc->mpm_state = AP_MPMQ_RUNNING;
      -
      -    if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
      -        sc->mpm_state = AP_MPMQ_STOPPING;
      -        return DONE;
      -    }
      -
      -    return simple_main_loop(sc);
      -}
      -
      -static int simple_query(int query_code, int *result, apr_status_t *rv)
      -{
      -    simple_core_t *sc = simple_core_get();
      -
      -    *rv = APR_SUCCESS;
      -    switch (query_code) {
      -    case AP_MPMQ_IS_THREADED:
      -        *result = AP_MPMQ_STATIC;
      -        break;
      -    case AP_MPMQ_IS_FORKED:
      -        *result = AP_MPMQ_DYNAMIC;
      -        break;
      -    case AP_MPMQ_IS_ASYNC:
      -        *result = 1;
      -        break;
      -    case AP_MPMQ_MAX_DAEMON_USED:
      -        *result = sc->procmgr.proc_count;
      -        break;
      -    case AP_MPMQ_HARD_LIMIT_DAEMONS:
      -        *result = sc->procmgr.proc_count;
      -        break;
      -    case AP_MPMQ_HARD_LIMIT_THREADS:
      -        *result = sc->procmgr.thread_count;
      -        break;
      -    case AP_MPMQ_MAX_THREADS:
      -        *result = sc->procmgr.thread_count;
      -        break;
      -    case AP_MPMQ_MAX_SPARE_DAEMONS:
      -        *result = sc->procmgr.proc_count;
      -        break;
      -    case AP_MPMQ_MIN_SPARE_DAEMONS:
      -        *result = sc->procmgr.proc_count;
      -        break;
      -    case AP_MPMQ_MIN_SPARE_THREADS:
      -    case AP_MPMQ_MAX_SPARE_THREADS:
      -        *result = sc->procmgr.thread_count;
      -        break;
      -    case AP_MPMQ_MAX_REQUESTS_DAEMON:
      -        *result = sc->procmgr.max_requests_per_child;
      -        break;
      -    case AP_MPMQ_MAX_DAEMONS:
      -        *result = sc->procmgr.proc_count;
      -        break;
      -    case AP_MPMQ_MPM_STATE:
      -        *result = sc->mpm_state;
      -        break;
      -    case AP_MPMQ_GENERATION:
      -        *result = 0;
      -        break;
      -    default:
      -        *rv = APR_ENOTIMPL;
      -        break;
      -    }
      -    return OK;
      -}
      -
      -static const char *
      -simple_get_name(void)
      -{
      -    return "simple";
      -}
      -
      -static int
      -simple_open_logs(apr_pool_t * p,
      -                 apr_pool_t * plog, apr_pool_t * ptemp, server_rec * s)
      -{
      -    int nsock;
      -
      -    nsock = ap_setup_listeners(s);
      -
      -    if (nsock < 1) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, 0,
      -                     s,
      -                     "simple_open_logs: no listening sockets available, shutting down");
      -        return DONE;
      -    }
      -
      -    return OK;
      -}
      -
      -static int
      -simple_pre_config(apr_pool_t * pconf, apr_pool_t * plog, apr_pool_t * ptemp)
      -{
      -    int run_debug;
      -    apr_status_t rv;
      -    simple_core_t *sc;
      -
      -    /* this is our first 'real' entry point, so setup everything here. */
      -    rv = simple_core_init_once();
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_core_init_once: Fatal Error Encountered");
      -        return HTTP_INTERNAL_SERVER_ERROR;
      -    }
      -
      -    sc = simple_core_get();
      -
      -    sc->restart_num++;
      -
      -    run_debug = ap_exists_config_define("DEBUG");
      -
      -    if (run_debug) {
      -        sc->run_foreground = 1;
      -        sc->run_single_process = 1;
      -    }
      -    else {
      -        sc->run_foreground = ap_exists_config_define("FOREGROUND");
      -    }
      -
      -    if (sc->restart_num == 2) {
      -
      -        if (sc->run_foreground) {
      -            rv = apr_proc_detach(APR_PROC_DETACH_FOREGROUND);
      -        }
      -        else {
      -            rv = apr_proc_detach(APR_PROC_DETACH_DAEMONIZE);
      -        }
      -
      -        if (rv) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                         "simple_pre_config: apr_proc_detach(%s) failed",
      -                         sc->run_foreground ? "FOREGROUND" : "DAEMONIZE");
      -            return HTTP_INTERNAL_SERVER_ERROR;
      -        }
      -    }
      -
      -    return OK;
      -}
      -
      -static int
      -simple_check_config(apr_pool_t * p, apr_pool_t * plog,
      -                    apr_pool_t * ptemp, server_rec * s)
      -{
      -    simple_core_t *sc = simple_core_get();
      -
      -    if (sc->procmgr.proc_count > SIMPLE_MAX_PROC) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "simple_check_config: SimpleProcCount must be at most %d",
      -                     SIMPLE_MAX_PROC);
      -        return !OK;
      -    }
      -
      -    if (sc->procmgr.proc_count < SIMPLE_MIN_PROC) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "simple_check_config: SimpleProcCount must be at least %d",
      -                     SIMPLE_MIN_PROC);
      -        return !OK;
      -    }
      -
      -    if (sc->procmgr.thread_count > SIMPLE_MAX_THREADS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "simple_check_config: SimpleThreadCount must be at most %d",
      -                     SIMPLE_MAX_THREADS);
      -        return !OK;
      -    }
      -
      -    if (sc->procmgr.thread_count < SIMPLE_MIN_THREADS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
      -                     "simple_check_config: SimpleThreadCount must be at least %d",
      -                     SIMPLE_MIN_THREADS);
      -        return !OK;
      -    }
      -
      -    return OK;
      -}
      -
      -static void simple_hooks(apr_pool_t * p)
      -{
      -    static const char *const aszSucc[] = { "core.c", NULL };
      -
      -    ap_hook_open_logs(simple_open_logs, NULL, aszSucc, APR_HOOK_REALLY_FIRST);
      -
      -    ap_hook_pre_config(simple_pre_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
      -
      -    ap_hook_check_config(simple_check_config, NULL, NULL, APR_HOOK_MIDDLE);
      -
      -    ap_hook_mpm(simple_run, NULL, NULL, APR_HOOK_MIDDLE);
      -
      -    ap_hook_mpm_query(simple_query, NULL, NULL, APR_HOOK_MIDDLE);
      -
      -    ap_hook_mpm_get_name(simple_get_name, NULL, NULL, APR_HOOK_MIDDLE);
      -}
      -
      -static const char *set_proccount(cmd_parms * cmd, void *baton,
      -                                 const char *arg)
      -{
      -    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -    if (err != NULL) {
      -        return err;
      -    }
      -
      -    simple_core_get()->procmgr.proc_count = atoi(arg);
      -    return NULL;
      -}
      -
      -
      -static const char *set_threadcount(cmd_parms * cmd, void *baton,
      -                                   const char *arg)
      -{
      -    simple_core_t *sc = simple_core_get();
      -    const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
      -
      -    if (err != NULL) {
      -        return err;
      -    }
      -
      -    sc->procmgr.thread_count = atoi(arg);
      -
      -    return NULL;
      -}
      -
      -static const command_rec simple_cmds[] = {
      -    AP_INIT_TAKE1("SimpleProcCount", set_proccount, NULL, RSRC_CONF,
      -                  "Number of child processes launched at server startup"),
      -    AP_INIT_TAKE1("SimpleThreadCount", set_threadcount, NULL, RSRC_CONF,
      -                  "Set the number of Worker Threads Per-Process"),
      -    /* pqXXXXXXXXX: These do NOT belong in the MPM configuration commands. */
      -    LISTEN_COMMANDS,
      -    {NULL}
      -};
      -
      -
      -
      -AP_DECLARE_MODULE(mpm_simple) = {
      -    MPM20_MODULE_STUFF,
      -    NULL,                       /* hook to run before apache parses args */
      -    NULL,                       /* create per-directory config structure */
      -    NULL,                       /* merge per-directory config structures */
      -    NULL,                       /* create per-server config structure */
      -    NULL,                       /* merge per-server config structures */
      -    simple_cmds,                /* command apr_table_t */
      -    simple_hooks                /* register_hooks */
      -};
      diff --git a/server/mpm/simple/simple_children.c b/server/mpm/simple/simple_children.c
      deleted file mode 100644
      index 0476f59cafb..00000000000
      --- a/server/mpm/simple/simple_children.c
      +++ /dev/null
      @@ -1,162 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "httpd.h"
      -#include "http_config.h"
      -#include "simple_types.h"
      -#include "simple_event.h"
      -#include "simple_run.h"
      -#include "http_log.h"
      -#include "simple_children.h"
      -#include "apr_hash.h"
      -
      -#include <unistd.h> /* For fork() */
      -
      -#define SPAWN_CHILDREN_INTERVAL (apr_time_from_sec(5))
      -
      -APLOG_USE_MODULE(mpm_simple);
      -
      -static void simple_kill_random_child(simple_core_t * sc)
      -{
      -    /* See comment in simple_spawn_child for why we check here. */
      -    if (!sc->run_single_process) {
      -        apr_hash_index_t *hi;
      -        simple_child_t *child = NULL;
      -
      -        apr_thread_mutex_lock(sc->mtx);
      -        hi = apr_hash_first(sc->pool, sc->children);
      -        if (hi != NULL) {
      -            apr_hash_this(hi, NULL, NULL, (void **)&child);
      -            apr_hash_set(sc->children, &child->pid, sizeof(child->pid), NULL);
      -        }
      -        apr_thread_mutex_unlock(sc->mtx);
      -
      -        if (child != NULL) {
      -            kill(child->pid, 9);
      -            /* TODO: recycle child object */
      -        }
      -    }
      -}
      -
      -static void clean_child_exit(int code) __attribute__ ((noreturn));
      -static void clean_child_exit(int code)
      -{
      -    /* TODO: Pool cleanups.... sigh. */
      -    exit(code);
      -}
      -
      -static int simple_spawn_child(simple_core_t * sc)
      -{
      -    pid_t pid = 0;
      -    int rv = 0;
      -    /* Although we could cut this off 'earlier', and not even invoke this
      -     * function, I would like to keep the functions invoked when in debug mode
      -     * to be as close as possible to those when not in debug... So, we just skip
      -     * the actual spawn itself, but go through all of the motions...
      -     */
      -    if (!sc->run_single_process) {
      -        if (sc->spawn_via == SIMPLE_SPAWN_FORK) {
      -
      -            pid = fork();
      -            if (pid == -1) {
      -                rv = errno;
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                             "simple_spawn_child: Unable to fork new process");
      -                return rv;
      -            }
      -
      -            if (pid == 0) {
      -                /* this is the child process */
      -
      -                rv = simple_child_loop(sc);
      -
      -                if (rv) {
      -                    clean_child_exit(APEXIT_CHILDFATAL);
      -                }
      -                else {
      -                    clean_child_exit(0);
      -                }
      -            }
      -        }
      -        else {
      -            /* TODO: SIMPLE_SPAWN_EXEC */
      -            abort();
      -        }
      -    }
      -
      -    if (pid != 0) {
      -        simple_child_t *child;
      -
      -        apr_thread_mutex_lock(sc->mtx);
      -
      -        child = apr_palloc(sc->pool, sizeof(simple_child_t));
      -        child->pid = pid;
      -        apr_hash_set(sc->children, &child->pid, sizeof(child->pid), child);
      -
      -        apr_thread_mutex_unlock(sc->mtx);
      -    }
      -
      -    return 0;
      -}
      -
      -void simple_check_children_size(simple_core_t * sc, void *baton)
      -{
      -    unsigned int count;
      -    int wanted;
      -    int i;
      -
      -    simple_register_timer(sc,
      -                          simple_check_children_size,
      -                          NULL, SPAWN_CHILDREN_INTERVAL,
      -                          sc->pool);
      -
      -    if (sc->run_single_process && sc->restart_num == 2) {
      -        static int run = 0;
      -        /* This is kinda of hack, but rather than spawning a child process,
      -         * we register the normal IO handlers in the main event loop....
      -         */
      -        if (run == 0) {
      -            simple_single_process_hack(sc);
      -            run++;
      -        }
      -    }
      -
      -    {
      -        apr_thread_mutex_lock(sc->mtx);
      -        count = apr_hash_count(sc->children);
      -        wanted = sc->procmgr.proc_count;
      -        apr_thread_mutex_unlock(sc->mtx);
      -    }
      -
      -    if (count > wanted) {
      -        /* kill some kids */
      -        int to_kill = count - wanted;
      -        for (i = 0; i < to_kill; i++) {
      -            simple_kill_random_child(sc);
      -        }
      -    }
      -    else if (count < wanted) {
      -        int rv = 0;
      -        /* spawn some kids */
      -        int to_spawn = wanted - count;
      -        for (i = 0; rv == 0 && i < to_spawn; i++) {
      -            rv = simple_spawn_child(sc);
      -        }
      -    }
      -    else {
      -        /* juuuuust right. */
      -    }
      -}
      diff --git a/server/mpm/simple/simple_children.h b/server/mpm/simple/simple_children.h
      deleted file mode 100644
      index e43f8bbb470..00000000000
      --- a/server/mpm/simple/simple_children.h
      +++ /dev/null
      @@ -1,28 +0,0 @@
      -
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "simple_types.h"
      -
      -#ifndef APACHE_MPM_SIMPLE_CHILDREN_H
      -#define APACHE_MPM_SIMPLE_CHILDREN_H
      -
      -void simple_check_children_size(simple_core_t * sc, void *baton);
      -
      -void simple_check_children_status(simple_core_t * sc, void *baton);
      -
      -
      -#endif /* APACHE_MPM_SIMPLE_CHILDREN_H */
      diff --git a/server/mpm/simple/simple_core.c b/server/mpm/simple/simple_core.c
      deleted file mode 100644
      index aa682110d9b..00000000000
      --- a/server/mpm/simple/simple_core.c
      +++ /dev/null
      @@ -1,73 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/* Simple Core utility methods.
      - */
      -
      -#include "simple_types.h"
      -#include "ap_mpm.h"
      -#include "httpd.h"
      -#include "http_log.h"
      -#include "http_config.h"
      -#include "http_main.h"
      -
      -static simple_core_t *g_simple_core;
      -
      -APLOG_USE_MODULE(mpm_simple);
      -
      -simple_core_t *simple_core_get()
      -{
      -    return g_simple_core;
      -}
      -
      -apr_status_t simple_core_init_once(void)
      -{
      -    apr_status_t rv;
      -    const char *userdata_key = "mpm_simple_module";
      -    simple_core_t *sc;
      -
      -    g_simple_core = ap_retained_data_get(userdata_key);
      -    if (g_simple_core) {
      -        return APR_SUCCESS;
      -    }
      -
      -    sc = g_simple_core = ap_retained_data_create(userdata_key, sizeof(*g_simple_core));
      -
      -    apr_pool_create(&sc->pool, ap_pglobal);
      -
      -    apr_pool_tag(sc->pool, "simple-mpm-core");
      -
      -    sc->mpm_state = AP_MPMQ_STARTING;
      -    sc->procmgr.proc_count = SIMPLE_DEF_PROC;
      -    sc->procmgr.thread_count = SIMPLE_DEF_THREADS;
      -    sc->procmgr.max_requests_per_child = 0; /* unlimited */
      -
      -    sc->children = apr_hash_make(sc->pool);
      -    /* TODO: configurable spawning mech */
      -    sc->spawn_via = SIMPLE_SPAWN_FORK;
      -
      -    APR_RING_INIT(&sc->timer_ring, simple_timer_t, link);
      -
      -    rv = apr_thread_mutex_create(&sc->mtx, 0, sc->pool);
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_core_init_once: apr_thread_mutex_create failed.");
      -        return rv;
      -    }
      -
      -    return APR_SUCCESS;
      -}
      diff --git a/server/mpm/simple/simple_event.c b/server/mpm/simple/simple_event.c
      deleted file mode 100644
      index 6157c034413..00000000000
      --- a/server/mpm/simple/simple_event.c
      +++ /dev/null
      @@ -1,101 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/* #define APR_RING_DEBUG 1 */
      -
      -#include "simple_types.h"
      -#include "simple_event.h"
      -
      -static apr_status_t
      -simple_timer_pool_cleanup(void *baton)
      -{
      -    simple_timer_t *elem = (simple_timer_t *)baton;
      -    simple_core_t *sc = elem->sc;
      -
      -    apr_thread_mutex_lock(sc->mtx);
      -    APR_RING_REMOVE(elem, link);
      -    apr_thread_mutex_unlock(sc->mtx);
      -
      -    return APR_SUCCESS;
      -}
      -
      -
      -void
      -simple_register_timer(simple_core_t * sc,
      -                      simple_timer_cb cb,
      -                      void *baton, apr_time_t relative_time,
      -                      apr_pool_t *shutdown_pool)
      -{
      -    simple_timer_t *elem = NULL;
      -    simple_timer_t *ep = NULL;
      -    int inserted = 0;
      -    apr_time_t t = apr_time_now() + relative_time;
      -
      -    apr_thread_mutex_lock(sc->mtx);
      -
      -    APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -    elem = (simple_timer_t *) apr_pcalloc(shutdown_pool, sizeof(simple_timer_t));
      -
      -    APR_RING_ELEM_INIT(elem, link);
      -    elem->expires = t;
      -    elem->cb = cb;
      -    elem->baton = baton;
      -    elem->pool = shutdown_pool;
      -    elem->sc = sc;
      -    apr_pool_cleanup_register(elem->pool, elem, simple_timer_pool_cleanup, apr_pool_cleanup_null);
      -
      -    APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -    /* pqXXXXXX: skiplist would be a nice optimization here. */
      -    if (!APR_RING_EMPTY(&sc->timer_ring, simple_timer_t, link)) {
      -        ep = APR_RING_FIRST(&sc->timer_ring);
      -        while (inserted == 0 &&
      -               ep != APR_RING_SENTINEL(&sc->timer_ring, simple_timer_t, link))
      -        {
      -            if (ep->expires < elem->expires) {
      -                APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t,
      -                                           link);
      -                APR_RING_INSERT_BEFORE(ep, elem, link);
      -                inserted = 1;
      -                APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t,
      -                                           link);
      -            }
      -            ep = APR_RING_NEXT(ep, link);
      -        }
      -    }
      -
      -    APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -    if (!inserted) {
      -        APR_RING_INSERT_TAIL(&sc->timer_ring, elem, simple_timer_t, link);
      -    }
      -
      -    APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -    apr_thread_mutex_unlock(sc->mtx);
      -}
      -
      -
      -void
      -simple_timer_run(simple_timer_t *ep)
      -{
      -    apr_pool_cleanup_kill(ep->pool, ep, simple_timer_pool_cleanup);
      -
      -    ep->cb(ep->sc, ep->baton);
      -}
      -
      -
      diff --git a/server/mpm/simple/simple_event.h b/server/mpm/simple/simple_event.h
      deleted file mode 100644
      index ebc54c6a77b..00000000000
      --- a/server/mpm/simple/simple_event.h
      +++ /dev/null
      @@ -1,60 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr.h"
      -#include "apr_pools.h"
      -#include "apr_poll.h"
      -
      -#ifndef APACHE_MPM_SIMPLE_EVENT_H
      -#define APACHE_MPM_SIMPLE_EVENT_H
      -
      -/* pqXXXXXX: Pool based cleanups
      - */
      -
      -void
      -simple_register_timer(simple_core_t * sc,
      -                      simple_timer_cb cb,
      -                      void *baton,
      -                      apr_time_t relative_time,
      -                      apr_pool_t *shutdown_pool);
      -
      -void
      -simple_timer_run(simple_timer_t *ep);
      -
      -#if THESE_ARE_JUST_IDEAS_PATCHES_WELCOME
      -/**
      - * @see apr_poll.h for watch_for values
      - */
      -void
      -simple_register_sock_io(simple_core_t * sc,
      -                        simple_io_sock_cb cb,
      -                        void *baton,
      -                        apr_socket_t * sock,
      -                        int watch_for, apr_time_t relative_timeout);
      -
      -/**
      - * @see apr_poll.h for watch_for values
      - */
      -void
      -simple_register_file_io(simple_core_t * sc,
      -                        simple_io_file_cb cb,
      -                        void *baton,
      -                        apr_file_t * file,
      -                        int watch_for, apr_time_t relative_timeout);
      -
      -#endif
      -
      -#endif /* APACHE_MPM_SIMPLE_EVENT_H */
      diff --git a/server/mpm/simple/simple_io.c b/server/mpm/simple/simple_io.c
      deleted file mode 100644
      index 50e2d6ad27f..00000000000
      --- a/server/mpm/simple/simple_io.c
      +++ /dev/null
      @@ -1,301 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "httpd.h"
      -#include "http_log.h"
      -#include "ap_listen.h"
      -#include "simple_types.h"
      -#include "simple_io.h"
      -#include "simple_event.h"
      -
      -#include "http_connection.h"
      -#include "util_filter.h"
      -#include "http_main.h"
      -#include "scoreboard.h"
      -#include "http_vhost.h"
      -
      -APLOG_USE_MODULE(mpm_simple);
      -
      -static void simple_io_timeout_cb(simple_core_t * sc, void *baton)
      -{
      -/* Code disabled because it does nothing yet but causes a compiler warning */
      -#if 0
      -    simple_conn_t *scon = (simple_conn_t *) baton;
      -    /* pqXXXXX: handle timeouts. */
      -    conn_rec *c = scon->c;
      -    conn_state_t *cs = c->cs;
      -
      -    cs = NULL;
      -#endif
      -
      -    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      -                 "io timeout hit (?)");
      -}
      -
      -static apr_status_t simple_io_process(simple_conn_t * scon)
      -{
      -    apr_status_t rv;
      -    simple_core_t *sc;
      -    conn_rec *c;
      -    conn_state_t *cs;
      -
      -    if (scon->c->clogging_input_filters && !scon->c->aborted) {
      -        /* Since we have an input filter which 'cloggs' the input stream,
      -         * like mod_ssl, lets just do the normal read from input filters,
      -         * like the Worker MPM does.
      -         */
      -        ap_run_process_connection(scon->c);
      -        if (scon->c->cs->state != CONN_STATE_SUSPENDED) {
      -            scon->c->cs->state = CONN_STATE_LINGER;
      -        }
      -    }
      -
      -    sc = scon->sc;
      -    c = scon->c;
      -    cs = c->cs;
      -
      -    while (!c->aborted) {
      -
      -        if (cs->pfd.reqevents != 0) {
      -            rv = apr_pollcb_remove(sc->pollcb, &cs->pfd);
      -            if (rv) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      -                             "simple_io_process: apr_pollcb_remove failure");
      -                /*AP_DEBUG_ASSERT(rv == APR_SUCCESS);*/
      -            }
      -            cs->pfd.reqevents = 0;
      -        }
      -
      -        if (cs->state == CONN_STATE_READ_REQUEST_LINE) {
      -            if (!c->aborted) {
      -                ap_run_process_connection(c);
      -                /* state will be updated upon return
      -                 * fall thru to either wait for readability/timeout or
      -                 * do lingering close
      -                 */
      -            }
      -            else {
      -                cs->state = CONN_STATE_LINGER;
      -            }
      -        }
      -
      -        if (cs->state == CONN_STATE_WRITE_COMPLETION) {
      -            ap_filter_t *output_filter = c->output_filters;
      -            while (output_filter->next != NULL) {
      -                output_filter = output_filter->next;
      -            }
      -
      -            rv = output_filter->frec->filter_func.out_func(output_filter,
      -                                                           NULL);
      -
      -            if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      -                             "network write failure in core output filter");
      -                cs->state = CONN_STATE_LINGER;
      -            }
      -            else if (c->data_in_output_filters) {
      -                /* Still in WRITE_COMPLETION_STATE:
      -                 * Set a write timeout for this connection, and let the
      -                 * event thread poll for writeability.
      -                 */
      -
      -                simple_register_timer(scon->sc,
      -                                      simple_io_timeout_cb,
      -                                      scon,
      -                                      scon->c->base_server !=
      -                                      NULL ? scon->c->base_server->
      -                                      timeout : ap_server_conf->timeout,
      -                                      scon->pool);
      -
      -                cs->pfd.reqevents = APR_POLLOUT | APR_POLLHUP | APR_POLLERR;
      -
      -                rv = apr_pollcb_add(sc->pollcb, &cs->pfd);
      -
      -                if (rv != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, rv,
      -                                 ap_server_conf,
      -                                 "apr_pollcb_add: failed in write completion");
      -                    AP_DEBUG_ASSERT(rv == APR_SUCCESS);
      -                }
      -                return APR_SUCCESS;
      -            }
      -            else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted) {
      -                c->cs->state = CONN_STATE_LINGER;
      -            }
      -            else if (c->data_in_input_filters) {
      -                cs->state = CONN_STATE_READ_REQUEST_LINE;
      -            }
      -            else {
      -                cs->state = CONN_STATE_CHECK_REQUEST_LINE_READABLE;
      -            }
      -        }
      -
      -        if (cs->state == CONN_STATE_LINGER) {
      -            ap_lingering_close(c);
      -            apr_pool_destroy(scon->pool);
      -            return APR_SUCCESS;
      -        }
      -
      -        if (cs->state == CONN_STATE_CHECK_REQUEST_LINE_READABLE) {
      -            simple_register_timer(scon->sc,
      -                                  simple_io_timeout_cb,
      -                                  scon,
      -                                  scon->c->base_server !=
      -                                  NULL ? scon->c->base_server->
      -                                  timeout : ap_server_conf->timeout,
      -                                  scon->pool);
      -
      -            cs->pfd.reqevents = APR_POLLIN;
      -
      -            rv = apr_pollcb_add(sc->pollcb, &cs->pfd);
      -
      -            if (rv) {
      -                ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      -                             "process_socket: apr_pollcb_add failure in read request line");
      -                AP_DEBUG_ASSERT(rv == APR_SUCCESS);
      -            }
      -
      -            return APR_SUCCESS;
      -        }
      -    }
      -
      -    ap_lingering_close(c);
      -    apr_pool_destroy(scon->pool);
      -    return APR_SUCCESS;
      -}
      -
      -static void *simple_io_invoke(apr_thread_t * thread, void *baton)
      -{
      -    simple_sb_t *sb = (simple_sb_t *) baton;
      -    simple_conn_t *scon = (simple_conn_t *) sb->baton;
      -    apr_status_t rv;
      -
      -    scon->c->current_thread = thread;
      -
      -    rv = simple_io_process(scon);
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
      -                     "simple_io_invoke: simple_io_process failed (?)");
      -    }
      -
      -    return NULL;
      -}
      -
      -static void *simple_io_setup_conn(apr_thread_t * thread, void *baton)
      -{
      -    apr_status_t rv;
      -    ap_sb_handle_t *sbh;
      -    conn_state_t *cs;
      -    long conn_id = 0;
      -    simple_sb_t *sb;
      -    simple_conn_t *scon = (simple_conn_t *) baton;
      -
      -    /* pqXXXXX: remove this. */
      -    ap_create_sb_handle(&sbh, scon->pool, 0, 0);
      -
      -    scon->ba = apr_bucket_alloc_create(scon->pool);
      -
      -    scon->c = ap_run_create_connection(scon->pool, ap_server_conf, scon->sock,
      -                                       conn_id, sbh, scon->ba);
      -    /* XXX: handle failure */
      -
      -    scon->c->cs = apr_pcalloc(scon->pool, sizeof(conn_state_t));
      -    cs = scon->c->cs;
      -    sb = apr_pcalloc(scon->pool, sizeof(simple_sb_t));
      -
      -    scon->c->current_thread = thread;
      -
      -    cs->pfd.p = scon->pool;
      -    cs->pfd.desc_type = APR_POLL_SOCKET;
      -    cs->pfd.desc.s = scon->sock;
      -    cs->pfd.reqevents = APR_POLLIN;
      -
      -    sb->type = SIMPLE_PT_CORE_IO;
      -    sb->baton = scon;
      -    cs->pfd.client_data = sb;
      -
      -    ap_update_vhost_given_ip(scon->c);
      -
      -    rv = ap_run_pre_connection(scon->c, scon->sock);
      -    if (rv != OK && rv != DONE) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      -                     "simple_io_setup_conn: connection aborted");
      -        scon->c->aborted = 1;
      -    }
      -
      -    scon->c->cs->state = CONN_STATE_READ_REQUEST_LINE;
      -
      -    rv = simple_io_process(scon);
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
      -                     "simple_io_setup_conn: simple_io_process failed (?)");
      -    }
      -
      -    return NULL;
      -}
      -
      -apr_status_t simple_io_accept(simple_core_t * sc, simple_sb_t * sb)
      -{
      -    apr_status_t rv;
      -    apr_pool_t *ptrans;
      -    apr_socket_t *socket;
      -    ap_listen_rec *lr = (ap_listen_rec *) sb->baton;
      -
      -    /* pqXXXXXX: Consider doing pool recycling like the event/worker MPMs do. */
      -    apr_pool_create(&ptrans, NULL);
      -
      -    apr_pool_tag(ptrans, "transaction");
      -
      -    rv = apr_socket_accept(&socket, lr->sd, ptrans);
      -    if (rv) {
      -        /* pqXXXXXX: unixd.c has _tons_ of custom handling on return values
      -         * from accept, but it seems really crazy, it either worked, or didn't,
      -         * but taking this approach of swallowing the error it is possible we have a
      -         * fatal error on our listening socket, but we don't notice.
      -         *
      -         * Need to discuss this on dev@
      -         */
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_io_accept: apr_socket_accept failed");
      -        return APR_SUCCESS;
      -    }
      -    else {
      -        simple_conn_t *scon = apr_pcalloc(ptrans, sizeof(simple_conn_t));
      -        scon->pool = ptrans;
      -        scon->sock = socket;
      -        scon->sc = sc;
      -
      -        return apr_thread_pool_push(sc->workers,
      -                                    simple_io_setup_conn,
      -                                    scon,
      -                                    APR_THREAD_TASK_PRIORITY_NORMAL, NULL);
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
      -apr_status_t simple_io_event_process(simple_core_t * sc, simple_sb_t * sb)
      -{
      -    /* pqXXXXX: In theory, if we have non-blocking operations on the connection
      -     *  we can do them here, before pushing to another thread, thats just
      -     * not implemented right now.
      -     */
      -    return apr_thread_pool_push(sc->workers,
      -                                simple_io_invoke,
      -                                sb, APR_THREAD_TASK_PRIORITY_NORMAL, NULL);
      -}
      diff --git a/server/mpm/simple/simple_run.c b/server/mpm/simple/simple_run.c
      deleted file mode 100644
      index 86ba2467765..00000000000
      --- a/server/mpm/simple/simple_run.c
      +++ /dev/null
      @@ -1,342 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/* #define APR_RING_DEBUG 1 */
      -
      -#include "httpd.h"
      -#include "http_log.h"
      -#include "http_main.h"
      -#include "simple_types.h"
      -#include "simple_event.h"
      -#include "simple_children.h"
      -#include "simple_run.h"
      -#include "simple_io.h"
      -#include "ap_mpm.h"
      -#include "scoreboard.h"
      -
      -#include "ap_listen.h"
      -#include "mpm_common.h"
      -#include "apr_version.h"
      -
      -#if !APR_VERSION_AT_LEAST(1,4,0)
      -#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000)
      -#endif
      -
      -APLOG_USE_MODULE(mpm_simple);
      -
      -/**
      - * Create Timers.
      - */
      -static apr_status_t simple_main_setup_timers(simple_core_t * sc)
      -{
      -    simple_register_timer(sc, simple_check_children_size, NULL, 0, sc->pool);
      -
      -    return APR_SUCCESS;
      -}
      -
      -/**
      - * Create worker thread pool.
      - */
      -static apr_status_t simple_setup_workers(simple_core_t * sc)
      -{
      -    apr_status_t rv;
      -
      -    rv = apr_thread_pool_create(&sc->workers,
      -                                sc->procmgr.thread_count,
      -                                sc->procmgr.thread_count, sc->pool);
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_setup_workers: apr_thread_pool_create with %d threads failed",
      -                     sc->procmgr.thread_count);
      -        return rv;
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
      -static apr_status_t simple_setup_listeners(simple_core_t * sc)
      -{
      -    ap_listen_rec *lr;
      -    apr_status_t rv;
      -
      -    for (lr = ap_listeners; lr != NULL; lr = lr->next) {
      -        apr_pollfd_t *pfd = apr_palloc(sc->pool, sizeof(apr_pollfd_t));
      -        simple_sb_t *sb = apr_pcalloc(sc->pool, sizeof(simple_sb_t));
      -
      -        pfd->p = sc->pool;
      -        pfd->desc_type = APR_POLL_SOCKET;
      -        pfd->desc.s = lr->sd;
      -        pfd->reqevents = APR_POLLIN;
      -
      -        sb->type = SIMPLE_PT_CORE_ACCEPT;
      -        sb->baton = lr;
      -
      -        pfd->client_data = sb;
      -
      -        rv = apr_socket_opt_set(pfd->desc.s, APR_SO_NONBLOCK, 1);
      -        if (rv) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                         "simple_setup_workers: apr_socket_opt_set(APR_SO_NONBLOCK = 1) failed on %pI",
      -                         lr->bind_addr);
      -            return rv;
      -        }
      -
      -        rv = apr_pollcb_add(sc->pollcb, pfd);
      -        if (rv) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                         "simple_setup_workers: apr_pollcb_add failed on %pI",
      -                         lr->bind_addr);
      -            return rv;
      -        }
      -    }
      -
      -    return APR_SUCCESS;
      -}
      -
      -
      -
      -static apr_status_t simple_io_callback(void *baton, apr_pollfd_t * pfd)
      -{
      -    apr_status_t rv = APR_SUCCESS;
      -    simple_core_t *sc = (simple_core_t *) baton;
      -    simple_sb_t *sb = pfd->client_data;
      -
      -
      -    if (sb->type == SIMPLE_PT_CORE_ACCEPT) {
      -        rv = simple_io_accept(sc, sb);
      -    }
      -    else if (sb->type == SIMPLE_PT_CORE_IO) {
      -        rv = simple_io_event_process(sc, sb);
      -    }
      -    else if (sb->type == SIMPLE_PT_USER) {
      -        /* TODO: */
      -        abort();
      -    }
      -    else {
      -        abort();
      -    }
      -
      -    return rv;
      -}
      -
      -static void *simple_timer_invoke(apr_thread_t * thread, void *baton)
      -{
      -    simple_timer_t *ep = (simple_timer_t *) baton;
      -
      -    simple_timer_run(ep);
      -
      -    return NULL;
      -}
      -
      -static int simple_run_loop(simple_core_t * sc)
      -{
      -    apr_status_t rv;
      -    simple_timer_t *ep = NULL;
      -
      -    while (sc->mpm_state == AP_MPMQ_RUNNING) {
      -        apr_time_t tnow = apr_time_now();
      -        simple_timer_t *head;
      -        apr_interval_time_t timeout = apr_time_from_msec(500);
      -        APR_RING_HEAD(simple_temp_timer_ring_t, simple_timer_t) tmp_ring;
      -
      -        apr_thread_mutex_lock(sc->mtx);
      -        head = APR_RING_FIRST(&sc->timer_ring);
      -
      -        if (head != APR_RING_SENTINEL(&sc->timer_ring, simple_timer_t, link)) {
      -            if (tnow < head->expires) {
      -                timeout = (head->expires - tnow);
      -                if (timeout > apr_time_from_msec(500)) {
      -                    /* pqXXXXX: I'm 95% sure that the Linux Powertop guys will slap me for this. */
      -                    timeout = apr_time_from_msec(500);
      -                }
      -            }
      -            else {
      -                /* We have already expired timers in the queue. */
      -                timeout = 0;
      -            }
      -        }
      -        apr_thread_mutex_unlock(sc->mtx);
      -
      -        rv = apr_pollcb_poll(sc->pollcb, timeout, simple_io_callback, sc);
      -
      -        tnow = apr_time_now();
      -
      -        if (rv) {
      -            if (!APR_STATUS_IS_EINTR(rv) && !APR_STATUS_IS_TIMEUP(rv)) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                             "simple_main_loop: apr_pollcb_poll failed");
      -                return DONE;
      -            }
      -        }
      -
      -        APR_RING_INIT(&tmp_ring, simple_timer_t, link);
      -
      -        apr_thread_mutex_lock(sc->mtx);
      -
      -        APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -        /* now iterate any timers */
      -        if (!APR_RING_EMPTY(&sc->timer_ring, simple_timer_t, link)) {
      -            for (ep = APR_RING_FIRST(&sc->timer_ring);
      -                 ep != APR_RING_SENTINEL(&sc->timer_ring,
      -                                         simple_timer_t, link);
      -                 ep = APR_RING_NEXT(ep, link)) {
      -                if (ep->expires < tnow) {
      -                    simple_timer_t *next = APR_RING_PREV(ep, link);
      -                    /* push this task */
      -                    APR_RING_REMOVE(ep, link);
      -                    APR_RING_CHECK_CONSISTENCY(&sc->timer_ring,
      -                                               simple_timer_t, link);
      -                    APR_RING_INSERT_TAIL(&tmp_ring, ep, simple_timer_t, link);
      -                    ep = next;
      -                }
      -                else {
      -                    break;
      -                }
      -            }
      -        }
      -
      -        APR_RING_CHECK_CONSISTENCY(&sc->timer_ring, simple_timer_t, link);
      -
      -        apr_thread_mutex_unlock(sc->mtx);
      -
      -        if (!APR_RING_EMPTY(&tmp_ring, simple_timer_t, link)) {
      -            for (ep = APR_RING_FIRST(&tmp_ring);
      -                 ep != APR_RING_SENTINEL(&tmp_ring,
      -                                         simple_timer_t, link);
      -                 ep = APR_RING_NEXT(ep, link)) {
      -                apr_thread_pool_push(sc->workers,
      -                                     simple_timer_invoke,
      -                                     ep,
      -                                     APR_THREAD_TASK_PRIORITY_NORMAL, NULL);
      -            }
      -        }
      -    }
      -
      -    return OK;
      -}
      -
      -void simple_single_process_hack(simple_core_t * sc)
      -{
      -    apr_status_t rv;
      -    /* Normally this is only ran in the child processes, but we want to do it here too... */
      -    rv = simple_setup_listeners(sc);
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_single_child_hack: simple_setup_listeners failed");
      -    }
      -}
      -
      -static int simple_setup_privs(simple_core_t * sc)
      -{
      -    int rv = ap_run_drop_privileges(sc->pool, ap_server_conf);
      -
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_setup_privs: ap_run_drop_privileges failed");
      -        return rv;
      -    }
      -
      -    return 0;
      -}
      -
      -static int simple_setup_pollcb(simple_core_t * sc)
      -{
      -    int i;
      -    apr_status_t rv;
      -    int good_methods[] = {APR_POLLSET_KQUEUE, APR_POLLSET_PORT, APR_POLLSET_EPOLL};
      -
      -    for (i = 0; i < sizeof(good_methods) / sizeof(void*); i++) {
      -        /* pqXXXXX: make size of pollcb configrable or dynamic */
      -        rv = apr_pollcb_create_ex(&sc->pollcb, 512,
      -                                  sc->pool, APR_POLLSET_NODEFAULT, good_methods[i]);
      -        if (!rv) {
      -            break;
      -        }
      -    }
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                   "simple_setup_pollcb: apr_pollcb_create failed for all possible backends!");
      -        return rv;
      -    }
      -    return rv;
      -}
      -
      -int simple_child_loop(simple_core_t * sc)
      -{
      -    apr_status_t rv;
      -
      -    rv = simple_setup_pollcb(sc);
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    /* XXXXX: Hack. Reseting parts of the simple core needs to be more
      -     * thought out than this.
      -     */
      -    APR_RING_INIT(&sc->timer_ring, simple_timer_t, link);
      -
      -    rv = simple_setup_workers(sc);
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_child_loop: simple_setup_workers failed");
      -        return !OK;
      -    }
      -
      -    rv = simple_setup_listeners(sc);
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_child_loop: simple_setup_sockets failed");
      -        return !OK;
      -    }
      -
      -    rv = simple_setup_privs(sc);
      -    if (rv) {
      -        /* simple_setup_privs already logged error */
      -        return !OK;
      -    }
      -
      -    ap_run_child_init(sc->pool, ap_server_conf);
      -
      -    return simple_run_loop(sc);
      -}
      -
      -int simple_main_loop(simple_core_t * sc)
      -{
      -    apr_status_t rv;
      -
      -    rv = simple_setup_pollcb(sc);
      -    if (rv) {
      -        return rv;
      -    }
      -
      -    rv = simple_setup_workers(sc);
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_main_loop: simple_setup_workers failed");
      -        return !OK;
      -    }
      -
      -    rv = simple_main_setup_timers(sc);
      -    if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "simple_main_loop: simple_setup_timers failed");
      -        return !OK;
      -    }
      -
      -    return simple_run_loop(sc);
      -}
      diff --git a/server/mpm/simple/simple_types.h b/server/mpm/simple/simple_types.h
      deleted file mode 100644
      index a71691f5f7d..00000000000
      --- a/server/mpm/simple/simple_types.h
      +++ /dev/null
      @@ -1,132 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr.h"
      -#include "apr_pools.h"
      -#include "apr_poll.h"
      -#include "apr_hash.h"
      -#include "apr_ring.h"
      -#include "apr_thread_pool.h"
      -#include "apr_buckets.h"
      -#include "httpd.h"
      -
      -#ifndef APACHE_MPM_SIMPLE_TYPES_H
      -#define APACHE_MPM_SIMPLE_TYPES_H
      -
      -typedef struct simple_core_t simple_core_t;
      -
      -typedef struct
      -{
      -    int proc_count;
      -    int thread_count;
      -    int max_requests_per_child;
      -} simple_proc_mgr_t;
      -
      -#define SIMPLE_MAX_PROC (500000)
      -#define SIMPLE_DEF_PROC (5)
      -#define SIMPLE_MIN_PROC (1)
      -#define SIMPLE_MAX_THREADS (500000)
      -#define SIMPLE_DEF_THREADS (5)
      -#define SIMPLE_MIN_THREADS (1)
      -
      -typedef void (*simple_timer_cb) (simple_core_t * sc, void *baton);
      -typedef void (*simple_io_sock_cb) (simple_core_t * sc, apr_socket_t * sock,
      -                                   int flags, void *baton);
      -typedef void (*simple_io_file_cb) (simple_core_t * sc, apr_socket_t * sock,
      -                                   int flags, void *baton);
      -
      -typedef struct simple_sb_t simple_sb_t;
      -
      -typedef enum
      -{
      -    SIMPLE_PT_CORE_ACCEPT,
      -    SIMPLE_PT_CORE_IO,
      -    /* pqXXXXXX: User IO not defined yet. */
      -    SIMPLE_PT_USER
      -} simple_poll_type_e;
      -
      -typedef enum
      -{
      -    SIMPLE_SPAWN_FORK,
      -    SIMPLE_SPAWN_EXEC,
      -} simple_spawn_type_e;
      -
      -struct simple_sb_t
      -{
      -    simple_poll_type_e type;
      -    void *baton;
      -};
      -
      -typedef struct simple_timer_t simple_timer_t;
      -struct simple_timer_t
      -{
      -    APR_RING_ENTRY(simple_timer_t) link;
      -    apr_time_t expires;
      -    simple_timer_cb cb;
      -    void *baton;
      -    apr_pool_t *pool;
      -    simple_core_t *sc;
      -};
      -
      -typedef struct simple_child_t simple_child_t;
      -struct simple_child_t
      -{
      -    /* TODO: More is needed here. */
      -    pid_t pid;
      -};
      -
      -struct simple_core_t
      -{
      -    apr_pool_t *pool;
      -    apr_thread_mutex_t *mtx;
      -
      -    int mpm_state;
      -    int restart_num;
      -
      -    int run_single_process;
      -    int run_foreground;
      -    simple_spawn_type_e spawn_via;
      -
      -    simple_proc_mgr_t procmgr;
      -
      -    /* PID -> simple_child_t map */
      -    apr_hash_t *children;
      -
      -    apr_pollcb_t *pollcb;
      -
      -    /* List of upcoming timers, sorted by nearest first.
      -     */
      -    APR_RING_HEAD(simple_timer_ring_t, simple_timer_t) timer_ring;
      -
      -    apr_thread_pool_t *workers;
      -};
      -
      -typedef struct simple_conn_t simple_conn_t;
      -struct simple_conn_t
      -{
      -    apr_pool_t *pool;
      -    simple_core_t *sc;
      -    apr_socket_t *sock;
      -    apr_bucket_alloc_t *ba;
      -    conn_rec *c;
      -};
      -
      -simple_core_t *simple_core_get(void);
      -
      -/* Allocates/initializes data retained over the life of the process */
      -apr_status_t simple_core_init_once(void);
      -
      -#endif /* APACHE_MPM_SIMPLE_TYPES_H */
      diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c
      index 1f8201359cb..94a1438c607 100644
      --- a/server/mpm/winnt/child.c
      +++ b/server/mpm/winnt/child.c
      @@ -45,7 +45,22 @@
       
       #ifdef __MINGW32__
       #include <mswsock.h>
      -#endif
      +
      +#ifndef WSAID_ACCEPTEX
      +#define WSAID_ACCEPTEX \
      +  {0xb5367df1, 0xcbac, 0x11cf, {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
      +typedef BOOL (WINAPI *LPFN_ACCEPTEX)(SOCKET, SOCKET, PVOID, DWORD, DWORD, DWORD, LPDWORD, LPOVERLAPPED);
      +#endif /* WSAID_ACCEPTEX */
      +
      +#ifndef WSAID_GETACCEPTEXSOCKADDRS
      +#define WSAID_GETACCEPTEXSOCKADDRS \
      +  {0xb5367df2, 0xcbac, 0x11cf, {0x95, 0xca, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}}
      +typedef VOID (WINAPI *LPFN_GETACCEPTEXSOCKADDRS)(PVOID, DWORD, DWORD, DWORD,
      +                                                 struct sockaddr **, LPINT,
      +                                                 struct sockaddr **, LPINT);
      +#endif /* WSAID_GETACCEPTEXSOCKADDRS */
      +
      +#endif /* __MINGW32__ */
       
       /*
        * The Windows MPM uses a queue of completion contexts that it passes
      @@ -121,10 +136,17 @@ static void mpm_recycle_completion_context(winnt_conn_ctx_t *context)
            * state so -don't- close it.
            */
           if (context) {
      +        HANDLE saved_event;
      +
               apr_pool_clear(context->ptrans);
               context->ba = apr_bucket_alloc_create(context->ptrans);
               context->next = NULL;
      +
      +        saved_event = context->overlapped.hEvent;
      +        memset(&context->overlapped, 0, sizeof(context->overlapped));
      +        context->overlapped.hEvent = saved_event;
               ResetEvent(context->overlapped.hEvent);
      +
               apr_thread_mutex_lock(qlock);
               if (qtail) {
                   qtail->next = context;
      @@ -166,7 +188,7 @@ static winnt_conn_ctx_t *mpm_get_completion_context(int *timeout)
                       /* All workers are busy, need to wait for one */
                       static int reported = 0;
                       if (!reported) {
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00326)
                                        "Server ran out of threads to serve "
                                        "requests. Consider raising the "
                                        "ThreadsPerChild setting");
      @@ -184,7 +206,7 @@ static winnt_conn_ctx_t *mpm_get_completion_context(int *timeout)
                       else {
                           if (rv == WAIT_TIMEOUT) {
                               /* somewhat-normal condition where threads are busy */
      -                        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00327)
                                            "mpm_get_completion_context: Failed to get a "
                                            "free context within 1 second");
                               *timeout = 1;
      @@ -192,7 +214,7 @@ static winnt_conn_ctx_t *mpm_get_completion_context(int *timeout)
                           else {
                               /* should be the unexpected, generic WAIT_FAILED */
                               ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
      -                                     ap_server_conf,
      +                                     ap_server_conf, APLOGNO(00328)
                                            "mpm_get_completion_context: "
                                            "WaitForSingleObject failed to get free context");
                           }
      @@ -216,7 +238,7 @@ static winnt_conn_ctx_t *mpm_get_completion_context(int *timeout)
                       if (context->overlapped.hEvent == NULL) {
                           /* Hopefully this is a temporary condition ... */
                           ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_os_error(),
      -                                 ap_server_conf,
      +                                 ap_server_conf, APLOGNO(00329)
                                        "mpm_get_completion_context: "
                                        "CreateEvent failed.");
       
      @@ -230,7 +252,7 @@ static winnt_conn_ctx_t *mpm_get_completion_context(int *timeout)
                       rv = apr_pool_create_ex(&context->ptrans, pchild, NULL,
                                               allocator);
                       if (rv != APR_SUCCESS) {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(00330)
                                        "mpm_get_completion_context: Failed "
                                        "to create the transaction pool.");
                           CloseHandle(context->overlapped.hEvent);
      @@ -281,6 +303,10 @@ static unsigned int __stdcall winnt_accept(void *lr_)
           winnt_conn_ctx_t *context = NULL;
           DWORD BytesRead;
           SOCKET nlsd;
      +    LPFN_ACCEPTEX lpfnAcceptEx = NULL;
      +    LPFN_GETACCEPTEXSOCKADDRS lpfnGetAcceptExSockaddrs = NULL;
      +    GUID GuidAcceptEx = WSAID_ACCEPTEX;
      +    GUID GuidGetAcceptExSockaddrs = WSAID_GETACCEPTEXSOCKADDRS;
           core_server_config *core_sconf;
           const char *accf_name;
           int rv;
      @@ -296,8 +322,21 @@ static unsigned int __stdcall winnt_accept(void *lr_)
           core_sconf = ap_get_core_module_config(ap_server_conf->module_config);
           accf_name = apr_table_get(core_sconf->accf_map, lr->protocol);
       
      -    if (strcmp(accf_name, "data") == 0)
      -        accf = 2;
      +    if (!accf_name) {
      +        accf = 0;
      +        accf_name = "none";
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +                     APLOGNO(02531) "winnt_accept: Listen protocol '%s' has "
      +                     "no known accept filter. Using 'none' instead",
      +                     lr->protocol);
      +    }
      +    else if (strcmp(accf_name, "data") == 0) {
      +        accf = 1;
      +        accf_name = "connect";
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +                     APLOGNO(03458) "winnt_accept: 'data' accept filter is no "
      +                     "longer supported. Using 'connect' instead");
      +    }
           else if (strcmp(accf_name, "connect") == 0)
               accf = 1;
           else if (strcmp(accf_name, "none") == 0)
      @@ -305,7 +344,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
           else {
               accf = 0;
               accf_name = "none";
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, APLOGNO(00331)
                            "winnt_accept: unrecognized AcceptFilter '%s', "
                            "only 'data', 'connect' or 'none' are valid. "
                            "Using 'none' instead", accf_name);
      @@ -316,22 +355,40 @@ static unsigned int __stdcall winnt_accept(void *lr_)
       #if APR_HAVE_IPV6
           if (getsockname(nlsd, (struct sockaddr *)&ss_listen, &namelen) == SOCKET_ERROR) {
               ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(),
      -                     ap_server_conf,
      +                     ap_server_conf, APLOGNO(00332)
                            "winnt_accept: getsockname error on listening socket, "
                            "is IPv6 available?");
               return 1;
          }
       #endif
       
      -    if (accf > 0) /* 'data' or 'connect' */
      +    if (accf > 0) /* 'connect' */
           {
      +        if (WSAIoctl(nlsd, SIO_GET_EXTENSION_FUNCTION_POINTER,
      +                     &GuidAcceptEx, sizeof GuidAcceptEx, 
      +                     &lpfnAcceptEx, sizeof lpfnAcceptEx, 
      +                     &BytesRead, NULL, NULL) == SOCKET_ERROR) {
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(),
      +                         ap_server_conf, APLOGNO(02322)
      +                         "winnt_accept: failed to retrieve AcceptEx, try 'AcceptFilter none'");
      +            return 1;
      +        }
      +        if (WSAIoctl(nlsd, SIO_GET_EXTENSION_FUNCTION_POINTER,
      +                     &GuidGetAcceptExSockaddrs, sizeof GuidGetAcceptExSockaddrs,
      +                     &lpfnGetAcceptExSockaddrs, sizeof lpfnGetAcceptExSockaddrs,
      +                     &BytesRead, NULL, NULL) == SOCKET_ERROR) {
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_netos_error(),
      +                         ap_server_conf, APLOGNO(02323)
      +                         "winnt_accept: failed to retrieve GetAcceptExSockaddrs, try 'AcceptFilter none'");
      +            return 1;
      +        }
               /* first, high priority event is an already accepted connection */
               events[1] = exit_event;
               events[2] = max_requests_per_child_event;
           }
           else /* accf == 0, 'none' */
           {
      -reinit: /* target of data or connect upon too many AcceptEx failures */
      +reinit: /* target of connect upon too many AcceptEx failures */
       
               /* last, low priority event is a not yet accepted connection */
               events[0] = exit_event;
      @@ -344,17 +401,16 @@ static unsigned int __stdcall winnt_accept(void *lr_)
               rv = WSAEventSelect(nlsd, events[2], FD_ACCEPT);
               if (rv) {
                   ap_log_error(APLOG_MARK, APLOG_ERR,
      -                         apr_get_netos_error(), ap_server_conf,
      +                         apr_get_netos_error(), ap_server_conf, APLOGNO(00333)
                                "WSAEventSelect() failed.");
                   CloseHandle(events[2]);
                   return 1;
               }
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      -                 "Child: Accept thread listening on %s:%d using AcceptFilter %s",
      -                 lr->bind_addr->hostname ? lr->bind_addr->hostname : "*",
      -                 lr->bind_addr->port, accf_name);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00334)
      +                 "Child: Accept thread listening on %pI using AcceptFilter %s",
      +                 lr->bind_addr, accf_name);
       
           while (!shutdown_in_progress) {
               if (!context) {
      @@ -366,7 +422,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                           /* Hopefully a temporary condition in the provider? */
                           ++err_count;
                           if (err_count > MAX_ACCEPTEX_ERR_COUNT) {
      -                        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(00335)
                                            "winnt_accept: Too many failures grabbing a "
                                            "connection ctx.  Aborting.");
                               break;
      @@ -377,9 +433,8 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                   }
               }
       
      -        if (accf > 0) /* Either 'connect' or 'data' */
      +        if (accf > 0) /* 'connect' */
               {
      -            DWORD len;
                   char *buf;
       
                   /* Create and initialize the accept socket */
      @@ -402,29 +457,21 @@ static unsigned int __stdcall winnt_accept(void *lr_)
       
                   if (context->accept_socket == INVALID_SOCKET) {
                       ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(),
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00336)
                                    "winnt_accept: Failed to allocate an accept socket. "
                                    "Temporary resource constraint? Try again.");
                       Sleep(100);
                       continue;
                   }
       
      -            if (accf == 2) { /* 'data' */
      -                len = APR_BUCKET_BUFF_SIZE;
      -                buf = apr_bucket_alloc(len, context->ba);
      -                len -= PADDED_ADDR_SIZE * 2;
      -            }
      -            else /* (accf == 1) 'connect' */ {
      -                len = 0;
      -                buf = context->buff;
      -            }
      +            buf = context->buff;
       
                   /* AcceptEx on the completion context. The completion context will be
                    * signaled when a connection is accepted.
                    */
      -            if (!AcceptEx(nlsd, context->accept_socket, buf, len,
      -                          PADDED_ADDR_SIZE, PADDED_ADDR_SIZE, &BytesRead,
      -                          &context->overlapped)) {
      +            if (!lpfnAcceptEx(nlsd, context->accept_socket, buf, 0,
      +                              PADDED_ADDR_SIZE, PADDED_ADDR_SIZE, &BytesRead,
      +                              &context->overlapped)) {
                       rv = apr_get_netos_error();
                       if ((rv == APR_FROM_OS_ERROR(WSAECONNRESET)) ||
                           (rv == APR_FROM_OS_ERROR(WSAEACCES))) {
      @@ -432,8 +479,6 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                            * 1) the client disconnects early
                            * 2) handshake was incomplete
                            */
      -                    if (accf == 2)
      -                        apr_bucket_free(buf);
                           closesocket(context->accept_socket);
                           context->accept_socket = INVALID_SOCKET;
                           continue;
      @@ -448,18 +493,16 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                            * 3) the dynamic address / adapter has changed
                            * Give five chances, then fall back on AcceptFilter 'none'
                            */
      -                    if (accf == 2)
      -                        apr_bucket_free(buf);
                           closesocket(context->accept_socket);
                           context->accept_socket = INVALID_SOCKET;
                           ++err_count;
                           if (err_count > MAX_ACCEPTEX_ERR_COUNT) {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00337)
                                            "Child: Encountered too many AcceptEx "
                                            "faults accepting client connections. "
                                            "Possible causes: dynamic address renewal, "
                                            "or incompatible VPN or firewall software. ");
      -                        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf, APLOGNO(00338)
                                            "winnt_mpm: falling back to "
                                            "'AcceptFilter none'.");
                               err_count = 0;
      @@ -469,16 +512,14 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                       }
                       else if ((rv != APR_FROM_OS_ERROR(ERROR_IO_PENDING)) &&
                                (rv != APR_FROM_OS_ERROR(WSA_IO_PENDING))) {
      -                    if (accf == 2)
      -                        apr_bucket_free(buf);
                           closesocket(context->accept_socket);
                           context->accept_socket = INVALID_SOCKET;
                           ++err_count;
                           if (err_count > MAX_ACCEPTEX_ERR_COUNT) {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00339)
                                            "Child: Encountered too many AcceptEx "
                                            "faults accepting client connections.");
      -                        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf, APLOGNO(00340)
                                            "winnt_mpm: falling back to "
                                            "'AcceptFilter none'.");
                               err_count = 0;
      @@ -501,7 +542,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                                                    &context->overlapped,
                                                    &BytesRead, FALSE)) {
                               ap_log_error(APLOG_MARK, APLOG_WARNING,
      -                                     apr_get_os_error(), ap_server_conf,
      +                                     apr_get_os_error(), ap_server_conf, APLOGNO(00341)
                                    "winnt_accept: Asynchronous AcceptEx failed.");
                               closesocket(context->accept_socket);
                               context->accept_socket = INVALID_SOCKET;
      @@ -511,14 +552,10 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                           /* exit_event triggered or event handle was closed */
                           closesocket(context->accept_socket);
                           context->accept_socket = INVALID_SOCKET;
      -                    if (accf == 2)
      -                        apr_bucket_free(buf);
                           break;
                       }
       
                       if (context->accept_socket == INVALID_SOCKET) {
      -                    if (accf == 2)
      -                        apr_bucket_free(buf);
                           continue;
                       }
                   }
      @@ -533,7 +570,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                                  SO_UPDATE_ACCEPT_CONTEXT, (char *)&nlsd,
                                  sizeof(nlsd))) {
                       ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(),
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00342)
                                    "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed.");
                       /* Not a failure condition. Keep running. */
                   }
      @@ -541,24 +578,9 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                   /* Get the local & remote address
                    * TODO; error check
                    */
      -            GetAcceptExSockaddrs(buf, len, PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
      -                                 &context->sa_server, &context->sa_server_len,
      -                                 &context->sa_client, &context->sa_client_len);
      -
      -            /* For 'data', craft a bucket for our data result
      -             * and pass to worker_main as context->overlapped.Pointer
      -             */
      -            if (accf == 2 && BytesRead)
      -            {
      -                apr_bucket *b;
      -                b = apr_bucket_heap_create(buf, APR_BUCKET_BUFF_SIZE,
      -                                           apr_bucket_free, context->ba);
      -                /* Adjust the bucket to refer to the actual bytes read */
      -                b->length = BytesRead;
      -                context->overlapped.Pointer = b;
      -            }
      -            else
      -                context->overlapped.Pointer = NULL;
      +            lpfnGetAcceptExSockaddrs(buf, 0, PADDED_ADDR_SIZE, PADDED_ADDR_SIZE,
      +                                     &context->sa_server, &context->sa_server_len,
      +                                     &context->sa_client, &context->sa_client_len);
               }
               else /* (accf = 0)  e.g. 'none' */
               {
      @@ -601,14 +623,14 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                           || rv == APR_FROM_OS_ERROR(WSAEINPROGRESS)
                           || rv == APR_FROM_OS_ERROR(WSAEWOULDBLOCK) ) {
                           ap_log_error(APLOG_MARK, APLOG_DEBUG,
      -                                 rv, ap_server_conf,
      +                                 rv, ap_server_conf, APLOGNO(00343)
                                        "accept() failed, retrying.");
                           continue;
                       }
       
                       /* A more serious error than 'retry', log it */
                       ap_log_error(APLOG_MARK, APLOG_WARNING,
      -                             rv, ap_server_conf,
      +                             rv, ap_server_conf, APLOGNO(00344)
                                    "accept() failed.");
       
                       if (   rv == APR_FROM_OS_ERROR(WSAEMFILE)
      @@ -617,7 +639,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                           Sleep(100);
                           ++err_count;
                           if (err_count > MAX_ACCEPTEX_ERR_COUNT) {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00345)
                                            "Child: Encountered too many accept() "
                                            "resource faults, aborting.");
                               break;
      @@ -632,29 +654,29 @@ static unsigned int __stdcall winnt_accept(void *lr_)
                    * os_sock_make and os_sock_put that it does not query).
                    */
                   WSAEventSelect(context->accept_socket, 0, 0);
      -            context->overlapped.Pointer = NULL;
                   err_count = 0;
       
                   context->sa_server_len = sizeof(context->buff) / 2;
                   if (getsockname(context->accept_socket, context->sa_server,
                                   &context->sa_server_len) == SOCKET_ERROR) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf, APLOGNO(00346)
                                    "getsockname failed");
                       continue;
                   }
                   if ((getpeername(context->accept_socket, context->sa_client,
                                    &context->sa_client_len)) == SOCKET_ERROR) {
      -                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_WARNING, apr_get_netos_error(), ap_server_conf, APLOGNO(00347)
                                    "getpeername failed");
                       memset(&context->sa_client, '\0', sizeof(context->sa_client));
                   }
               }
       
      -        sockinfo.os_sock = &context->accept_socket;
      -        sockinfo.local   = context->sa_server;
      -        sockinfo.remote  = context->sa_client;
      -        sockinfo.family  = context->sa_server->sa_family;
      -        sockinfo.type    = SOCK_STREAM;
      +        sockinfo.os_sock  = &context->accept_socket;
      +        sockinfo.local    = context->sa_server;
      +        sockinfo.remote   = context->sa_client;
      +        sockinfo.family   = context->sa_server->sa_family;
      +        sockinfo.type     = SOCK_STREAM;
      +        sockinfo.protocol = IPPROTO_TCP;
               /* Restore the state corresponding to apr_os_sock_make's default
                * assumption of timeout -1 (really, a flaw of os_sock_make and
                * os_sock_put that it does not query to determine ->timeout).
      @@ -683,7 +705,7 @@ static unsigned int __stdcall winnt_accept(void *lr_)
               SetEvent(exit_event);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00348)
                        "Child: Accept thread exiting.");
           return 0;
       }
      @@ -712,7 +734,7 @@ static winnt_conn_ctx_t *winnt_get_connection(winnt_conn_ctx_t *context)
                                              &CompKey, &pol, INFINITE);
               if (!rc) {
                   rc = apr_get_os_error();
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, rc, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, rc, ap_server_conf, APLOGNO(00349)
                                "Child: GetQueuedComplationStatus returned %d",
                                rc);
                   continue;
      @@ -736,7 +758,6 @@ static winnt_conn_ctx_t *winnt_get_connection(winnt_conn_ctx_t *context)
           return context;
       }
       
      -
       /*
        * worker_main()
        * Main entry point for the worker threads. Worker threads block in
      @@ -744,19 +765,16 @@ static winnt_conn_ctx_t *winnt_get_connection(winnt_conn_ctx_t *context)
        */
       static DWORD __stdcall worker_main(void *thread_num_val)
       {
      -    apr_thread_t *thd = NULL;
      +    apr_thread_t *thd;
           apr_os_thread_t osthd;
           static int requests_this_child = 0;
           winnt_conn_ctx_t *context = NULL;
           int thread_num = (int)thread_num_val;
           ap_sb_handle_t *sbh;
      -    apr_bucket *e;
      -    int rc;
           conn_rec *c;
           apr_int32_t disconnected;
       
           osthd = apr_os_thread_current();
      -    apr_os_thread_put(&thd, &osthd, pchild);
       
           while (1) {
       
      @@ -778,86 +796,34 @@ static DWORD __stdcall worker_main(void *thread_num_val)
                   }
               }
       
      -        e = context->overlapped.Pointer;
      -
               ap_create_sb_handle(&sbh, context->ptrans, 0, thread_num);
               c = ap_run_create_connection(context->ptrans, ap_server_conf,
                                            context->sock, thread_num, sbh,
                                            context->ba);
       
      -        if (!c)
      -        {
      +        if (!c) {
                   /* ap_run_create_connection closes the socket on failure */
                   context->accept_socket = INVALID_SOCKET;
      -            if (e)
      -                apr_bucket_free(e);
                   continue;
               }
       
      +        thd = NULL;
      +        apr_os_thread_put(&thd, &osthd, context->ptrans);
               c->current_thread = thd;
       
      -        /* follow ap_process_connection(c, context->sock) logic
      -         * as it left us no chance to reinject our first data bucket.
      -         */
      -        ap_update_vhost_given_ip(c);
      +        ap_process_connection(c, context->sock);
       
      -        rc = ap_run_pre_connection(c, context->sock);
      -        if (rc != OK && rc != DONE) {
      -            c->aborted = 1;
      -        }
      +        apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED, &disconnected);
       
      -        if (e && c->aborted)
      -        {
      -            apr_bucket_free(e);
      -        }
      -        else if (e)
      -        {
      -            core_ctx_t *ctx;
      -            core_net_rec *net;
      -            ap_filter_t *filt;
      -
      -            filt = c->input_filters;
      -            while ((strcmp(filt->frec->name, "core_in") != 0) && filt->next)
      -                filt = filt->next;
      -            net = filt->ctx;
      -            ctx = net->in_ctx;
      -
      -            if (net->in_ctx)
      -                ctx = net->in_ctx;
      -            else
      -            {
      -                ctx = apr_pcalloc(c->pool, sizeof(*ctx));
      -                ctx->b = apr_brigade_create(c->pool, c->bucket_alloc);
      -                ctx->tmpbb = apr_brigade_create(c->pool, c->bucket_alloc);
      -
      -                /* seed the brigade with AcceptEx read heap bucket */
      -                e = context->overlapped.Pointer;
      -                APR_BRIGADE_INSERT_HEAD(ctx->b, e);
      -
      -                /* also seed the brigade with the client socket. */
      -                e = apr_bucket_socket_create(net->client_socket,
      -                                             c->bucket_alloc);
      -                APR_BRIGADE_INSERT_TAIL(ctx->b, e);
      -                net->in_ctx = ctx;
      -            }
      -        }
      -
      -        if (!c->aborted)
      -        {
      -            ap_run_process_connection(c);
      -
      -            apr_socket_opt_get(context->sock, APR_SO_DISCONNECTED,
      -                               &disconnected);
      -
      -            if (!disconnected) {
      -                context->accept_socket = INVALID_SOCKET;
      +        if (!disconnected) {
      +            context->accept_socket = INVALID_SOCKET;
      +            if (!c->aborted) { 
                       ap_lingering_close(c);
                   }
               }
           }
       
      -    ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD,
      -                                        (request_rec *) NULL);
      +    ap_update_child_status_from_indexes(0, thread_num, SERVER_DEAD, NULL);
       
           return 0;
       }
      @@ -917,12 +883,12 @@ static void create_listener_thread(void)
       }
       
       
      -void child_main(apr_pool_t *pconf)
      +void child_main(apr_pool_t *pconf, DWORD parent_pid)
       {
           apr_status_t status;
           apr_hash_t *ht;
           ap_listen_rec *lr;
      -    HANDLE child_events[2];
      +    HANDLE child_events[3];
           HANDLE *child_handles;
           int listener_started = 0;
           int threads_created = 0;
      @@ -932,6 +898,7 @@ void child_main(apr_pool_t *pconf)
           DWORD tid;
           int rv;
           int i;
      +    int num_events;
       
           apr_pool_create(&pchild, pconf);
           apr_pool_tag(pchild, "pchild");
      @@ -942,13 +909,31 @@ void child_main(apr_pool_t *pconf)
           /* Initialize the child_events */
           max_requests_per_child_event = CreateEvent(NULL, TRUE, FALSE, NULL);
           if (!max_requests_per_child_event) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00350)
                            "Child: Failed to create a max_requests event.");
               exit(APEXIT_CHILDINIT);
           }
           child_events[0] = exit_event;
           child_events[1] = max_requests_per_child_event;
       
      +    if (parent_pid != my_pid) {
      +        child_events[2] = OpenProcess(SYNCHRONIZE, FALSE, parent_pid);
      +        if (child_events[2] == NULL) {
      +            num_events = 2;
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), ap_server_conf, APLOGNO(02643)
      +                         "Child: Failed to open handle to parent process %ld; "
      +                         "will not react to abrupt parent termination", parent_pid);
      +        }
      +        else {
      +            num_events = 3;
      +        }
      +    }
      +    else {
      +        /* presumably -DONE_PROCESS */
      +        child_events[2] = NULL;
      +        num_events = 2;
      +    }
      +
           /*
            * Wait until we have permission to start accepting connections.
            * start_mutex is used to ensure that only one child ever
      @@ -956,12 +941,12 @@ void child_main(apr_pool_t *pconf)
            */
           status = apr_proc_mutex_lock(start_mutex);
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf, APLOGNO(00351)
                            "Child: Failed to acquire the start_mutex. "
                            "Process will exit.");
               exit(APEXIT_CHILDINIT);
           }
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00352)
                        "Child: Acquired the start mutex.");
       
           /*
      @@ -974,7 +959,7 @@ void child_main(apr_pool_t *pconf)
           qwait_event = CreateEvent(NULL, TRUE, FALSE, NULL);
           if (!qwait_event) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
      -                     ap_server_conf,
      +                     ap_server_conf, APLOGNO(00353)
                            "Child: Failed to create a qwait event.");
               exit(APEXIT_CHILDINIT);
           }
      @@ -982,7 +967,7 @@ void child_main(apr_pool_t *pconf)
           /*
            * Create the pool of worker threads
            */
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00354)
                        "Child: Starting %d worker threads.", ap_threads_per_child);
           child_handles = (HANDLE) apr_pcalloc(pchild, ap_threads_per_child
                                                         * sizeof(HANDLE));
      @@ -1002,7 +987,7 @@ void child_main(apr_pool_t *pconf)
                                                   stack_res_flag, &tid);
                   if (child_handles[i] == 0) {
                       ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00355)
                                    "Child: CreateThread failed. Unable to "
                                    "create all worker threads. Created %d of the %d "
                                    "threads requested with the ThreadsPerChild "
      @@ -1039,7 +1024,7 @@ void child_main(apr_pool_t *pconf)
               apr_sleep(1 * APR_USEC_PER_SEC);
           }
       
      -    /* Wait for one of three events:
      +    /* Wait for one of these events:
            * exit_event:
            *    The exit_event is signaled by the parent process to notify
            *    the child that it is time to exit.
      @@ -1048,6 +1033,8 @@ void child_main(apr_pool_t *pconf)
            *    This event is signaled by the worker threads to indicate that
            *    the process has handled MaxConnectionsPerChild connections.
            *
      +     * parent process exiting
      +     *
            * TIMEOUT:
            *    To do periodic maintenance on the server (check for thread exits,
            *    number of completion contexts, etc.)
      @@ -1065,10 +1052,11 @@ void child_main(apr_pool_t *pconf)
            */
           while (1) {
       #if !APR_HAS_OTHER_CHILD
      -        rv = WaitForMultipleObjects(2, (HANDLE *)child_events, FALSE, INFINITE);
      +        rv = WaitForMultipleObjects(num_events, (HANDLE *)child_events, FALSE, INFINITE);
               cld = rv - WAIT_OBJECT_0;
       #else
      -        rv = WaitForMultipleObjects(2, (HANDLE *)child_events, FALSE, 1000);
      +        /* THIS IS THE EXPECTED BUILD VARIATION -- APR_HAS_OTHER_CHILD */
      +        rv = WaitForMultipleObjects(num_events, (HANDLE *)child_events, FALSE, 1000);
               cld = rv - WAIT_OBJECT_0;
               if (rv == WAIT_TIMEOUT) {
                   apr_proc_other_child_refresh_all(APR_OC_REASON_RUNNING);
      @@ -1078,22 +1066,40 @@ void child_main(apr_pool_t *pconf)
                   if (rv == WAIT_FAILED) {
                   /* Something serious is wrong */
                   ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
      -                         ap_server_conf,
      +                         ap_server_conf, APLOGNO(00356)
                                "Child: WAIT_FAILED -- shutting down server");
      +            /* check handle validity to identify a possible culprit */
      +            for (i = 0; i < num_events; i++) {
      +                DWORD out_flags;
      +
      +                if (0 == GetHandleInformation(child_events[i], &out_flags)) {
      +                    ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(),
      +                                 ap_server_conf, APLOGNO(02644)
      +                                 "Child: Event handle #%d (%pp) is invalid",
      +                                 i, child_events[i]);
      +                }
      +            }
                   break;
               }
               else if (cld == 0) {
                   /* Exit event was signaled */
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00357)
                                "Child: Exit event signaled. Child process is "
                                "ending.");
                   break;
               }
      +        else if (cld == 2) {
      +            /* The parent is dead.  Shutdown the child process. */
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(02538)
      +                         "Child: Parent process exited abruptly. Child process "
      +                         "is ending");
      +            break;
      +        }
               else {
                   /* MaxConnectionsPerChild event set by the worker threads.
                    * Signal the parent to restart
                    */
      -            ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00358)
                                "Child: Process exiting because it reached "
                                "MaxConnectionsPerChild. Signaling the parent to "
                                "restart a new child process.");
      @@ -1134,11 +1140,11 @@ void child_main(apr_pool_t *pconf)
            */
           rv = apr_proc_mutex_unlock(start_mutex);
           if (rv == APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, ap_server_conf, APLOGNO(00359)
                            "Child: Released the start mutex");
           }
           else {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(00360)
                            "Child: Failure releasing the start mutex");
           }
       
      @@ -1146,7 +1152,7 @@ void child_main(apr_pool_t *pconf)
            * Post worker threads blocked on the ThreadDispatch IOCompletion port
            */
           while (g_blocked_threads > 0) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00361)
                            "Child: %d threads blocked on the completion port",
                            g_blocked_threads);
               for (i=g_blocked_threads; i > 0; i--) {
      @@ -1187,7 +1193,7 @@ void child_main(apr_pool_t *pconf)
                   /* Every 30 seconds give an update */
                   if ((time_remains % 30000) == 0) {
                       ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS,
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00362)
                                    "Child: Waiting %d more seconds "
                                    "for %d worker threads to finish.",
                                    time_remains / 1000, threads_created);
      @@ -1231,21 +1237,21 @@ void child_main(apr_pool_t *pconf)
       
           /* Kill remaining threads off the hard way */
           if (threads_created) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00363)
                            "Child: Terminating %d threads that failed to exit.",
                            threads_created);
           }
           for (i = 0; i < threads_created; i++) {
      -        int *score_idx;
      +        int *idx;
               TerminateThread(child_handles[i], 1);
               CloseHandle(child_handles[i]);
               /* Reset the scoreboard entry for the thread we just whacked */
      -        score_idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
      -        if (score_idx) {
      -            ap_update_child_status_from_indexes(0, *score_idx, SERVER_DEAD, NULL);
      +        idx = apr_hash_get(ht, &child_handles[i], sizeof(HANDLE));
      +        if (idx) {
      +            ap_update_child_status_from_indexes(0, *idx, SERVER_DEAD, NULL);
               }
           }
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00364)
                        "Child: All worker threads have exited.");
       
           apr_thread_mutex_destroy(child_lock);
      @@ -1254,6 +1260,9 @@ void child_main(apr_pool_t *pconf)
       
           apr_pool_destroy(pchild);
           CloseHandle(exit_event);
      +    if (child_events[2] != NULL) {
      +        CloseHandle(child_events[2]);
      +    }
       }
       
       #endif /* def WIN32 */
      diff --git a/server/mpm/winnt/mpm_default.h b/server/mpm/winnt/mpm_default.h
      index a0e38efee0e..b5350d437da 100644
      --- a/server/mpm/winnt/mpm_default.h
      +++ b/server/mpm/winnt/mpm_default.h
      @@ -18,7 +18,8 @@
        * @file  winnt/mpm_default.h
        * @brief win32 MPM defaults
        *
      - * @addtogroup APACHE_MPM_WINNT
      + * @defgroup APACHE_MPM_WINNT WinNT MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c
      index 2a74fe7826a..2487e45be2b 100644
      --- a/server/mpm/winnt/mpm_winnt.c
      +++ b/server/mpm/winnt/mpm_winnt.c
      @@ -95,9 +95,6 @@ int winnt_mpm_state = AP_MPMQ_STARTING;
        */
       apr_pool_t *pconf;
       
      -/* definitions from child.c */
      -void child_main(apr_pool_t *pconf);
      -
       /* Only one of these, the pipe from our parent, meant only for
        * one child worker's consumption (not to be inherited!)
        * XXX: decorate this name for the trunk branch, was left simplified
      @@ -189,10 +186,10 @@ static void winnt_note_child_killed(int slot)
        * signal_restart_name and signal_shutdown_name.
        */
       #define MAX_SIGNAL_NAME 30  /* Long enough for apPID_shutdown, where PID is an int */
      -char signal_name_prefix[MAX_SIGNAL_NAME];
      -char signal_restart_name[MAX_SIGNAL_NAME];
      -char signal_shutdown_name[MAX_SIGNAL_NAME];
      -void setup_signal_names(char *prefix)
      +static char signal_name_prefix[MAX_SIGNAL_NAME];
      +static char signal_restart_name[MAX_SIGNAL_NAME];
      +static char signal_shutdown_name[MAX_SIGNAL_NAME];
      +static void setup_signal_names(char *prefix)
       {
           apr_snprintf(signal_name_prefix, sizeof(signal_name_prefix), prefix);
           apr_snprintf(signal_shutdown_name, sizeof(signal_shutdown_name),
      @@ -246,13 +243,13 @@ AP_DECLARE(void) ap_signal_parent(ap_signal_parent_e type)
               /* Um, problem, can't signal the parent, which means we can't
                * signal ourselves to die. Ignore for now...
                */
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf, APLOGNO(00382)
                            "OpenEvent on %s event", signal_name);
               return;
           }
           if (SetEvent(e) == 0) {
               /* Same problem as above */
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, apr_get_os_error(), ap_server_conf, APLOGNO(00383)
                            "SetEvent on %s event", signal_name);
               CloseHandle(e);
               return;
      @@ -280,13 +277,13 @@ static void get_handles_from_parent(server_rec *s, HANDLE *child_exit_event,
           void *sb_shared;
           apr_status_t rv;
       
      -    /* *** We now do this was back in winnt_rewrite_args
      +    /* *** We now do this way back in winnt_rewrite_args
            * pipe = GetStdHandle(STD_INPUT_HANDLE);
            */
           if (!ReadFile(pipe, &ready_event, sizeof(HANDLE),
                         &BytesRead, (LPOVERLAPPED) NULL)
               || (BytesRead != sizeof(HANDLE))) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00384)
                            "Child: Unable to retrieve the ready event from the parent");
               exit(APEXIT_CHILDINIT);
           }
      @@ -297,7 +294,7 @@ static void get_handles_from_parent(server_rec *s, HANDLE *child_exit_event,
           if (!ReadFile(pipe, child_exit_event, sizeof(HANDLE),
                         &BytesRead, (LPOVERLAPPED) NULL)
               || (BytesRead != sizeof(HANDLE))) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00385)
                            "Child: Unable to retrieve the exit event from the parent");
               exit(APEXIT_CHILDINIT);
           }
      @@ -305,14 +302,14 @@ static void get_handles_from_parent(server_rec *s, HANDLE *child_exit_event,
           if (!ReadFile(pipe, &os_start, sizeof(os_start),
                         &BytesRead, (LPOVERLAPPED) NULL)
               || (BytesRead != sizeof(os_start))) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00386)
                            "Child: Unable to retrieve the start_mutex from the parent");
               exit(APEXIT_CHILDINIT);
           }
           *child_start_mutex = NULL;
           if ((rv = apr_os_proc_mutex_put(child_start_mutex, &os_start, s->process->pool))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00387)
                            "Child: Unable to access the start_mutex from the parent");
               exit(APEXIT_CHILDINIT);
           }
      @@ -320,21 +317,21 @@ static void get_handles_from_parent(server_rec *s, HANDLE *child_exit_event,
           if (!ReadFile(pipe, &hScore, sizeof(hScore),
                         &BytesRead, (LPOVERLAPPED) NULL)
               || (BytesRead != sizeof(hScore))) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00388)
                            "Child: Unable to retrieve the scoreboard from the parent");
               exit(APEXIT_CHILDINIT);
           }
           *scoreboard_shm = NULL;
           if ((rv = apr_os_shm_put(scoreboard_shm, &hScore, s->process->pool))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00389)
                            "Child: Unable to access the scoreboard from the parent");
               exit(APEXIT_CHILDINIT);
           }
       
           rv = ap_reopen_scoreboard(s->process->pool, scoreboard_shm, 1);
           if (rv || !(sb_shared = apr_shm_baseaddr_get(*scoreboard_shm))) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00390)
                            "Child: Unable to reopen the scoreboard from the parent");
               exit(APEXIT_CHILDINIT);
           }
      @@ -343,7 +340,7 @@ static void get_handles_from_parent(server_rec *s, HANDLE *child_exit_event,
            */
           ap_init_scoreboard(sb_shared);
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00391)
                        "Child: Retrieved our scoreboard from the parent.");
       }
       
      @@ -363,66 +360,73 @@ static int send_handles_to_child(apr_pool_t *p,
           HANDLE hScore;
           apr_size_t BytesWritten;
       
      +    if ((rv = apr_file_write_full(child_in, &my_generation,
      +                                  sizeof(my_generation), NULL))
      +            != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(02964)
      +                     "Parent: Unable to send its generation to the child");
      +        return -1;
      +    }
           if (!DuplicateHandle(hCurrentProcess, child_ready_event, hProcess, &hDup,
               EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00392)
                            "Parent: Unable to duplicate the ready event handle for the child");
               return -1;
           }
           if ((rv = apr_file_write_full(child_in, &hDup, sizeof(hDup), &BytesWritten))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00393)
                            "Parent: Unable to send the exit event handle to the child");
               return -1;
           }
           if (!DuplicateHandle(hCurrentProcess, child_exit_event, hProcess, &hDup,
                                EVENT_MODIFY_STATE | SYNCHRONIZE, FALSE, 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00394)
                            "Parent: Unable to duplicate the exit event handle for the child");
               return -1;
           }
           if ((rv = apr_file_write_full(child_in, &hDup, sizeof(hDup), &BytesWritten))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00395)
                            "Parent: Unable to send the exit event handle to the child");
               return -1;
           }
           if ((rv = apr_os_proc_mutex_get(&os_start, child_start_mutex)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00396)
                            "Parent: Unable to retrieve the start mutex for the child");
               return -1;
           }
           if (!DuplicateHandle(hCurrentProcess, os_start, hProcess, &hDup,
                                SYNCHRONIZE, FALSE, 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00397)
                            "Parent: Unable to duplicate the start mutex to the child");
               return -1;
           }
           if ((rv = apr_file_write_full(child_in, &hDup, sizeof(hDup), &BytesWritten))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00398)
                            "Parent: Unable to send the start mutex to the child");
               return -1;
           }
           if ((rv = apr_os_shm_get(&hScore, scoreboard_shm)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00399)
                            "Parent: Unable to retrieve the scoreboard handle for the child");
               return -1;
           }
           if (!DuplicateHandle(hCurrentProcess, hScore, hProcess, &hDup,
                                FILE_MAP_READ | FILE_MAP_WRITE, FALSE, 0)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00400)
                            "Parent: Unable to duplicate the scoreboard handle to the child");
               return -1;
           }
           if ((rv = apr_file_write_full(child_in, &hDup, sizeof(hDup), &BytesWritten))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00401)
                            "Parent: Unable to send the scoreboard handle to the child");
               return -1;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00402)
                        "Parent: Sent the scoreboard to the child");
           return 0;
       }
      @@ -454,16 +458,16 @@ static void get_listeners_from_parent(server_rec *s)
           /* Open the pipe to the parent process to receive the inherited socket
            * data. The sockets have been set to listening in the parent process.
            *
      -     * *** We now do this was back in winnt_rewrite_args
      +     * *** We now do this way back in winnt_rewrite_args
            * pipe = GetStdHandle(STD_INPUT_HANDLE);
            */
           for (lr = ap_listeners; lr; lr = lr->next, ++lcnt) {
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00403)
                            "Child: Waiting for data for listening socket %pI",
                            lr->bind_addr);
               if (!ReadFile(pipe, &WSAProtocolInfo, sizeof(WSAPROTOCOL_INFO),
                             &BytesRead, (LPOVERLAPPED) NULL)) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00404)
                                "Child: Unable to read socket data from parent");
                   exit(APEXIT_CHILDINIT);
               }
      @@ -471,19 +475,19 @@ static void get_listeners_from_parent(server_rec *s)
               nsd = WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
                               &WSAProtocolInfo, 0, 0);
               if (nsd == INVALID_SOCKET) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf, APLOGNO(00405)
                                "Child: WSASocket failed to open the inherited socket");
                   exit(APEXIT_CHILDINIT);
               }
       
               if (!SetHandleInformation((HANDLE)nsd, HANDLE_FLAG_INHERIT, 0)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), ap_server_conf, APLOGNO(00406)
                                "Child: SetHandleInformation failed");
               }
               apr_os_sock_put(&lr->sd, &nsd, s->process->pool);
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00407)
                        "Child: retrieved %d listeners from parent", lcnt);
       }
       
      @@ -505,12 +509,12 @@ static int send_listeners_to_child(apr_pool_t *p, DWORD dwProcessId,
               apr_os_sock_t nsd;
               lpWSAProtocolInfo = apr_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
               apr_os_sock_get(&nsd, lr->sd);
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00408)
                            "Parent: Duplicating socket %d (%pI) and sending it to child process %lu",
                            nsd, lr->bind_addr, dwProcessId);
               if (WSADuplicateSocket(nsd, dwProcessId,
                                      lpWSAProtocolInfo) == SOCKET_ERROR) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_netos_error(), ap_server_conf, APLOGNO(00409)
                                "Parent: WSADuplicateSocket failed for socket %d. Check the FAQ.", nsd);
                   return -1;
               }
      @@ -518,13 +522,13 @@ static int send_listeners_to_child(apr_pool_t *p, DWORD dwProcessId,
               if ((rv = apr_file_write_full(child_in, lpWSAProtocolInfo,
                                             sizeof(WSAPROTOCOL_INFO), &BytesWritten))
                       != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00410)
                                "Parent: Unable to write duplicated socket %d to the child.", nsd);
                   return -1;
               }
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00411)
                        "Parent: Sent %d listeners to child %lu", lcnt, dwProcessId);
           return 0;
       }
      @@ -564,7 +568,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
           apr_procattr_detach_set(attr, 1);
           if (((rv = apr_filepath_get(&cwd, 0, ptemp)) != APR_SUCCESS)
                  || ((rv = apr_procattr_dir_set(attr, cwd)) != APR_SUCCESS)) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00412)
                            "Parent: Failed to get the current path");
           }
       
      @@ -574,7 +578,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
                */
               if ((rv = ap_os_proc_filepath(&cmd, ptemp))
                       != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, ERROR_BAD_PATHNAME, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, ERROR_BAD_PATHNAME, ap_server_conf, APLOGNO(00413)
                                "Parent: Failed to get full path of %s",
                                ap_server_conf->process->argv[0]);
                   apr_pool_destroy(ptemp);
      @@ -595,7 +599,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
           /* Create a pipe to send handles to the child */
           if ((rv = apr_procattr_io_set(attr, APR_FULL_BLOCK,
                                         APR_NO_PIPE, APR_NO_PIPE)) != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00414)
                               "Parent: Unable to create child stdin pipe.");
               apr_pool_destroy(ptemp);
               return -1;
      @@ -604,7 +608,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
           /* Create the child_ready_event */
           waitlist[waitlist_ready] = CreateEvent(NULL, TRUE, FALSE, NULL);
           if (!waitlist[waitlist_ready]) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00415)
                            "Parent: Could not create ready event for child process");
               apr_pool_destroy (ptemp);
               return -1;
      @@ -613,7 +617,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
           /* Create the child_exit_event */
           hExitEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
           if (!hExitEvent) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00416)
                            "Parent: Could not create exit event for child process");
               apr_pool_destroy(ptemp);
               CloseHandle(waitlist[waitlist_ready]);
      @@ -633,7 +637,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
           rv = apr_proc_create(&new_child, cmd, (const char * const *)args,
                                (const char * const *)env, attr, ptemp);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00417)
                            "Parent: Failed to create the child process.");
               apr_pool_destroy(ptemp);
               CloseHandle(hExitEvent);
      @@ -642,7 +646,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_
               return -1;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00418)
                        "Parent: Created child process %d", new_child.pid);
       
           if (send_handles_to_child(ptemp, waitlist[waitlist_ready], hExitEvent,
      @@ -767,7 +771,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
                               &child_exit_event, &child_pid);
           if (rv < 0)
           {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00419)
                            "master_main: create child process failed. Exiting.");
               shutdown_pending = 1;
               goto die_now;
      @@ -791,23 +795,23 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
           cld = rv - WAIT_OBJECT_0;
           if (rv == WAIT_FAILED) {
               /* Something serious is wrong */
      -        ap_log_error(APLOG_MARK,APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +        ap_log_error(APLOG_MARK,APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00420)
                            "master_main: WaitForMultipleObjects WAIT_FAILED -- doing server shutdown");
               shutdown_pending = 1;
           }
           else if (rv == WAIT_TIMEOUT) {
               /* Hey, this cannot happen */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, APLOGNO(00421)
                            "master_main: WaitForMultipleObjects with INFINITE wait exited with WAIT_TIMEOUT");
               shutdown_pending = 1;
           }
           else if (cld == SHUTDOWN_HANDLE) {
               /* shutdown_event signalled */
               shutdown_pending = 1;
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, s,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, s, APLOGNO(00422)
                            "Parent: Received shutdown signal -- Shutting down the server.");
               if (ResetEvent(shutdown_event) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, APLOGNO(00423)
                                "ResetEvent(shutdown_event)");
               }
           }
      @@ -816,15 +820,15 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
                * then signal the child process to exit.
                */
               restart_pending = 1;
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(00424)
                            "Parent: Received restart signal -- Restarting the server.");
               if (ResetEvent(restart_event) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, APLOGNO(00425)
                                "Parent: ResetEvent(restart_event) failed.");
               }
               if (SetEvent(child_exit_event) == 0) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s,
      -                         "Parent: SetEvent for child process %pp failed.",
      +            ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, APLOGNO(00426)
      +                         "Parent: SetEvent for child process event %pp failed.",
                                event_handles[CHILD_HANDLE]);
               }
               /* Don't wait to verify that the child process really exits,
      @@ -843,15 +847,17 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
               if (   exitcode == APEXIT_CHILDFATAL
                   || exitcode == APEXIT_CHILDINIT
                   || exitcode == APEXIT_INIT) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
      -                         "Parent: child process exited with status %lu -- Aborting.", exitcode);
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(00427)
      +                         "Parent: child process %lu exited with status %lu -- Aborting.",
      +                         child_pid, exitcode);
                   shutdown_pending = 1;
               }
               else {
                   int i;
                   restart_pending = 1;
      -            ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      -                         "Parent: child process exited with status %lu -- Restarting.", exitcode);
      +            ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00428)
      +                         "Parent: child process %lu exited with status %lu -- Restarting.",
      +                         child_pid, exitcode);
                   for (i = 0; i < ap_threads_per_child; i++) {
                       ap_update_child_status_from_indexes(0, i, SERVER_DEAD, NULL);
                   }
      @@ -885,22 +891,22 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
               }
               /* Signal the child processes to exit */
               if (SetEvent(child_exit_event) == 0) {
      -                ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf,
      -                             "Parent: SetEvent for child process %pp failed",
      +                ap_log_error(APLOG_MARK,APLOG_ERR, apr_get_os_error(), ap_server_conf, APLOGNO(00429)
      +                             "Parent: SetEvent for child process event %pp failed",
                                    event_handles[CHILD_HANDLE]);
               }
               if (event_handles[CHILD_HANDLE]) {
                   rv = WaitForSingleObject(event_handles[CHILD_HANDLE], timeout);
                   if (rv == WAIT_OBJECT_0) {
      -                ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      -                             "Parent: Child process exited successfully.");
      +                ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00430)
      +                             "Parent: Child process %lu exited successfully.", child_pid);
                       CloseHandle(event_handles[CHILD_HANDLE]);
                       event_handles[CHILD_HANDLE] = NULL;
                   }
                   else {
      -                ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
      -                             "Parent: Forcing termination of child process %pp",
      -                             event_handles[CHILD_HANDLE]);
      +                ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf, APLOGNO(00431)
      +                             "Parent: Forcing termination of child process %lu",
      +                             child_pid);
                       TerminateProcess(event_handles[CHILD_HANDLE], 1);
                       CloseHandle(event_handles[CHILD_HANDLE]);
                       event_handles[CHILD_HANDLE] = NULL;
      @@ -998,7 +1004,7 @@ static void winnt_rewrite_args(process_rec *process)
            *   -k config
            *   -k uninstall
            *   -k stop
      -     *   -k shutdown (same as -k stop). Maintained for backward compatability.
      +     *   -k shutdown (same as -k stop). Maintained for backward compatibility.
            *
            * We can't leave this phase until we know our identity
            * and modify the command arguments appropriately.
      @@ -1038,12 +1044,13 @@ static void winnt_rewrite_args(process_rec *process)
           {
               HANDLE filehand;
               HANDLE hproc = GetCurrentProcess();
      +        DWORD BytesRead;
       
               /* This is the child */
               my_pid = GetCurrentProcessId();
               parent_pid = (DWORD) atol(pid);
       
      -        /* Prevent holding open the (nonexistant) console */
      +        /* Prevent holding open the (nonexistent) console */
               ap_real_exit_code = 0;
       
               /* The parent gave us stdin, we need to remember this
      @@ -1075,6 +1082,16 @@ static void winnt_rewrite_args(process_rec *process)
                * already
                */
       
      +        /* Read this child's generation number as soon as now,
      +         * so that further hooks can query it.
      +         */
      +        if (!ReadFile(pipe, &my_generation, sizeof(my_generation),
      +                      &BytesRead, (LPOVERLAPPED) NULL)
      +                || (BytesRead != sizeof(my_generation))) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), NULL, APLOGNO(02965)
      +                         "Child: Unable to retrieve my generation from the parent");
      +            exit(APEXIT_CHILDINIT);
      +        }
       
               /* The parent is responsible for providing the
                * COMPLETE ARGUMENTS REQUIRED to the child.
      @@ -1108,7 +1125,7 @@ static void winnt_rewrite_args(process_rec *process)
            */
           if ((rv = ap_os_proc_filepath(&binpath, process->pconf))
                   != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK,APLOG_CRIT, rv, NULL,
      +        ap_log_error(APLOG_MARK,APLOG_CRIT, rv, NULL, APLOGNO(00432)
                            "Failed to get the full path of %s", process->argv[0]);
               exit(APEXIT_INIT);
           }
      @@ -1255,7 +1272,7 @@ static void winnt_rewrite_args(process_rec *process)
           {
               if (service_set == APR_SUCCESS)
               {
      -            ap_log_error(APLOG_MARK,APLOG_ERR, 0, NULL,
      +            ap_log_error(APLOG_MARK,APLOG_ERR, 0, NULL, APLOGNO(00433)
                        "%s: Service is already installed.", service_name);
                   exit(APEXIT_INIT);
               }
      @@ -1281,26 +1298,26 @@ static void winnt_rewrite_args(process_rec *process)
                   rv = mpm_merge_service_args(process->pool, mpm_new_argv,
                                               fixed_args);
                   if (rv == APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK,APLOG_INFO, 0, NULL,
      +                ap_log_error(APLOG_MARK,APLOG_INFO, 0, NULL, APLOGNO(00434)
                                    "Using ConfigArgs of the installed service "
                                    "\"%s\".", service_name);
                   }
                   else  {
      -                ap_log_error(APLOG_MARK,APLOG_WARNING, rv, NULL,
      +                ap_log_error(APLOG_MARK,APLOG_WARNING, rv, NULL, APLOGNO(00435)
                                    "No installed ConfigArgs for the service "
                                    "\"%s\", using Apache defaults.", service_name);
                   }
               }
               else
               {
      -            ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL,
      +            ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL, APLOGNO(00436)
                        "No installed service named \"%s\".", service_name);
                   exit(APEXIT_INIT);
               }
           }
           if (strcasecmp(signal_arg, "install") && service_set && service_set != SERVICE_UNSET)
           {
      -        ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL,
      +        ap_log_error(APLOG_MARK,APLOG_ERR, service_set, NULL, APLOGNO(00437)
                    "No installed service named \"%s\".", service_name);
               exit(APEXIT_INIT);
           }
      @@ -1367,12 +1384,13 @@ static int winnt_pre_config(apr_pool_t *pconf_, apr_pool_t *plog, apr_pool_t *pt
       
           if (!strcasecmp(signal_arg, "runservice")
                   && (service_to_start_success != APR_SUCCESS)) {
      -        ap_log_error(APLOG_MARK,APLOG_CRIT, service_to_start_success, NULL,
      +        ap_log_error(APLOG_MARK,APLOG_CRIT, service_to_start_success, NULL, APLOGNO(00438)
                            "%s: Unable to start the service manager.",
                            service_name);
               exit(APEXIT_INIT);
           }
      -    else if (!one_process && !my_generation) {
      +    else if (ap_state_query(AP_SQ_RUN_MODE) == AP_SQ_RM_NORMAL
      +             && !one_process && !my_generation) {
               /* Open a null handle to soak stdout in this process.
                * We need to emulate apr_proc_detach, unix performs this
                * same check in the pre_config hook (although it is
      @@ -1404,25 +1422,23 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
                                     apr_pool_t *ptemp, server_rec* s)
       {
           int is_parent;
      -    static int restart_num = 0;
           int startup = 0;
       
           /* We want this only in the parent and only the first time around */
           is_parent = (parent_pid == my_pid);
      -    if (is_parent && restart_num++ == 0) {
      +    if (is_parent &&
      +        ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
               startup = 1;
           }
       
           if (thread_limit > MAX_THREAD_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00439)
                                "WARNING: ThreadLimit of %d exceeds compile-time "
      -                         "limit of", thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
      +                         "limit of %d threads, decreasing to %d.",
      +                         thread_limit, MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
               } else if (is_parent) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00440)
                                "ThreadLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                thread_limit, MAX_THREAD_LIMIT);
      @@ -1431,11 +1447,11 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
           }
           else if (thread_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00441)
                                "WARNING: ThreadLimit of %d not allowed, "
                                "increasing to 1.", thread_limit);
               } else if (is_parent) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00442)
                                "ThreadLimit of %d not allowed, increasing to 1",
                                thread_limit);
               }
      @@ -1451,7 +1467,7 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
           else if (thread_limit != first_thread_limit) {
               /* Don't need a startup console version here */
               if (is_parent) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00443)
                                "changing ThreadLimit to %d from original value "
                                "of %d not allowed during restart",
                                thread_limit, first_thread_limit);
      @@ -1461,17 +1477,13 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
       
           if (ap_threads_per_child > thread_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00444)
                                "WARNING: ThreadsPerChild of %d exceeds ThreadLimit "
      -                         "of", ap_threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         thread_limit, thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ThreadLimit "
      -                         "directive.");
      +                         "of %d threads, decreasing to %d. To increase, please "
      +                         "see the ThreadLimit directive.",
      +                         ap_threads_per_child, thread_limit, thread_limit);
               } else if (is_parent) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00445)
                                "ThreadsPerChild of %d exceeds ThreadLimit "
                                "of %d, decreasing to match",
                                ap_threads_per_child, thread_limit);
      @@ -1480,11 +1492,11 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
           }
           else if (ap_threads_per_child < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00446)
                                "WARNING: ThreadsPerChild of %d not allowed, "
                                "increasing to 1.", ap_threads_per_child);
               } else if (is_parent) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00447)
                                "ThreadsPerChild of %d not allowed, increasing to 1",
                                ap_threads_per_child);
               }
      @@ -1496,7 +1508,6 @@ static int winnt_check_config(apr_pool_t *pconf, apr_pool_t *plog,
       
       static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec* s)
       {
      -    static int restart_num = 0;
           apr_status_t rv = 0;
       
           /* Handle the following SCM aspects in this phase:
      @@ -1556,7 +1567,8 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
       
           if (parent_pid == my_pid)
           {
      -        if (restart_num++ == 1)
      +        if (ap_state_query(AP_SQ_MAIN_STATE) != AP_SQ_MS_CREATE_PRE_CONFIG
      +            && ap_state_query(AP_SQ_CONFIG_GEN) == 1)
               {
                   /* This code should be run once in the parent and not run
                    * across a restart
      @@ -1571,7 +1583,7 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
                    */
                   shutdown_event = CreateEvent(sa, FALSE, FALSE, signal_shutdown_name);
                   if (!shutdown_event) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00448)
                                    "Parent: Cannot create shutdown event %s", signal_shutdown_name);
                       CleanNullACL((void *)sa);
                       return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1583,7 +1595,7 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
                   restart_event = CreateEvent(sa, FALSE, FALSE, signal_restart_name);
                   if (!restart_event) {
                       CloseHandle(shutdown_event);
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, apr_get_os_error(), ap_server_conf, APLOGNO(00449)
                                    "Parent: Cannot create restart event %s", signal_restart_name);
                       CleanNullACL((void *)sa);
                       return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1598,7 +1610,7 @@ static int winnt_post_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *pt
                                               APR_LOCK_DEFAULT,
                                               ap_server_conf->process->pool);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf, APLOGNO(00450)
                                    "%s: Unable to create the start_mutex.",
                                    service_name);
                       return HTTP_INTERNAL_SERVER_ERROR;
      @@ -1641,8 +1653,8 @@ static int winnt_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, s
       
           if (ap_setup_listeners(s) < 1) {
               ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0,
      -                     NULL, "no listening sockets available, shutting down");
      -        return DONE;
      +                     NULL, APLOGNO(00451) "no listening sockets available, shutting down");
      +        return !OK;
           }
       
           return OK;
      @@ -1665,15 +1677,13 @@ static void winnt_child_init(apr_pool_t *pchild, struct server_rec *s)
       
               /* Done reading from the parent, close that channel */
               CloseHandle(pipe);
      -
      -        my_generation = ap_scoreboard_image->global->running_generation;
           }
           else {
               /* Single process mode - this lock doesn't even need to exist */
               rv = apr_proc_mutex_create(&start_mutex, signal_name_prefix,
                                          APR_LOCK_DEFAULT, s->process->pool);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf,
      +            ap_log_error(APLOG_MARK,APLOG_ERR, rv, ap_server_conf, APLOGNO(00452)
                                "%s child: Unable to init the start_mutex.",
                                service_name);
                   exit(APEXIT_CHILDINIT);
      @@ -1697,7 +1707,7 @@ static int winnt_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
           if (!restart && ((parent_pid == my_pid) || one_process)) {
               /* Set up the scoreboard. */
               if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
      -            return DONE;
      +            return !OK;
               }
           }
       
      @@ -1705,24 +1715,25 @@ static int winnt_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s )
           {
               /* The child process or in one_process (debug) mode
                */
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00453)
                            "Child process is running");
       
      -        child_main(pconf);
      +        child_main(pconf, parent_pid);
       
      -        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, ap_server_conf, APLOGNO(00454)
                            "Child process is exiting");
               return DONE;
           }
           else
           {
               /* A real-honest to goodness parent */
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00455)
                            "%s configured -- resuming normal operations",
                            ap_get_server_description());
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00456)
                            "Server built: %s", ap_get_server_built());
               ap_log_command_line(plog, s);
      +        ap_log_mpm_common(s);
       
               restart = master_main(ap_server_conf, shutdown_event, restart_event);
       
      diff --git a/server/mpm/winnt/mpm_winnt.h b/server/mpm/winnt/mpm_winnt.h
      index 43adda994c0..22ba001407e 100644
      --- a/server/mpm/winnt/mpm_winnt.h
      +++ b/server/mpm/winnt/mpm_winnt.h
      @@ -33,7 +33,7 @@
       #define SERVICE_APACHE_RESTART 128
       
       #ifndef AP_DEFAULT_SERVICE_NAME
      -#define AP_DEFAULT_SERVICE_NAME "Apache2.x"
      +#define AP_DEFAULT_SERVICE_NAME "Apache2.4"
       #endif
       
       #define SERVICECONFIG "System\\CurrentControlSet\\Services\\%s"
      @@ -67,6 +67,7 @@ void mpm_nt_eventlog_stderr_flush(void);
       
       /* From mpm_winnt.c: */
       
      +extern module AP_MODULE_DECLARE_DATA mpm_winnt_module;
       extern int ap_threads_per_child;
       
       extern DWORD my_pid;
      @@ -79,8 +80,6 @@ extern DWORD stack_res_flag;
       
       extern void clean_child_exit(int);
       
      -void setup_signal_names(char *prefix);
      -
       typedef enum {
           SIGNAL_PARENT_SHUTDOWN,
           SIGNAL_PARENT_RESTART,
      @@ -91,7 +90,7 @@ AP_DECLARE(void) ap_signal_parent(ap_signal_parent_e type);
       void hold_console_open_on_error(void);
       
       /* From child.c: */
      -void child_main(apr_pool_t *pconf);
      +void child_main(apr_pool_t *pconf, DWORD parent_pid);
       
       #endif /* APACHE_MPM_WINNT_H */
       /** @} */
      diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c
      index 1c145be9b79..22f044dd2f7 100644
      --- a/server/mpm/winnt/service.c
      +++ b/server/mpm/winnt/service.c
      @@ -21,11 +21,18 @@
       
       #define _WINUSER_
       
      +#include "apr.h"
      +#include "apr_strings.h"
      +#include "apr_lib.h"
      +#if APR_HAS_UNICODE_FS
      +#include "arch/win32/apr_arch_utf8.h"
      +#include "arch/win32/apr_arch_misc.h"
      +#include <wchar.h>
      +#endif
      +
       #include "httpd.h"
       #include "http_log.h"
       #include "mpm_winnt.h"
      -#include "apr_strings.h"
      -#include "apr_lib.h"
       #include "ap_regkey.h"
       
       #ifdef NOUSER
      @@ -41,6 +48,10 @@ APLOG_USE_MODULE(mpm_winnt);
       static char *mpm_service_name = NULL;
       static char *mpm_display_name = NULL;
       
      +#if APR_HAS_UNICODE_FS
      +static apr_wchar_t *mpm_service_name_w;
      +#endif
      +
       typedef struct nt_service_ctx_t
       {
           HANDLE mpm_thread;       /* primary thread handle of the apache server */
      @@ -57,6 +68,32 @@ static nt_service_ctx_t globdat;
       static int ReportStatusToSCMgr(int currentState, int waitHint,
                                      nt_service_ctx_t *ctx);
       
      +/* Rather than repeat this logic throughout, create an either-or wide or narrow
      + * implementation because we don't actually pass strings to OpenSCManager.
      + * This election is based on build time defines and runtime os version test.
      + */
      +#undef OpenSCManager
      +typedef SC_HANDLE (WINAPI *fpt_OpenSCManager)(const void *lpMachine,
      +                                              const void *lpDatabase,
      +                                              DWORD dwAccess);
      +static fpt_OpenSCManager pfn_OpenSCManager = NULL;
      +static APR_INLINE SC_HANDLE OpenSCManager(const void *lpMachine,
      +                                          const void *lpDatabase,
      +                                          DWORD dwAccess)
      +{
      +    if (!pfn_OpenSCManager) {
      +#if APR_HAS_UNICODE_FS
      +        IF_WIN_OS_IS_UNICODE
      +            pfn_OpenSCManager = (fpt_OpenSCManager)OpenSCManagerW;
      +#endif
      +#if APR_HAS_ANSI_FS
      +        ELSE_WIN_OS_IS_ANSI
      +            pfn_OpenSCManager = (fpt_OpenSCManager)OpenSCManagerA;
      +#endif
      +    }
      +    return (*(pfn_OpenSCManager))(lpMachine, lpDatabase, dwAccess); 
      +}
      +
       /* exit() for Win32 is macro mapped (horrible, we agree) that allows us
        * to catch the non-zero conditions and inform the console process that
        * the application died, and hang on to the console a bit longer.
      @@ -67,7 +104,7 @@ static int ReportStatusToSCMgr(int currentState, int waitHint,
        *
        * If ap_real_exit_code is reset to 0, it will not be set or trigger this
        * behavior on exit.  All service and child processes are expected to
      - * reset this flag to zero to avoid undesireable side effects.
      + * reset this flag to zero to avoid undesirable side effects.
        */
       AP_DECLARE_DATA int ap_real_exit_code = 1;
       
      @@ -90,7 +127,8 @@ void hold_console_open_on_error(void)
           hConErr = GetStdHandle(STD_ERROR_HANDLE);
           if ((hConIn == INVALID_HANDLE_VALUE) || (hConErr == INVALID_HANDLE_VALUE))
               return;
      -    if (!WriteConsole(hConErr, msg, (DWORD)strlen(msg), &result, NULL) || !result)
      +    if (!WriteConsole(hConErr, msg, (DWORD)strlen(msg), &result, NULL) 
      +            || !result)
               return;
           if (!GetConsoleScreenBufferInfo(hConErr, &coninfo))
               return;
      @@ -244,16 +282,54 @@ static void set_service_description(void)
           if ((ChangeServiceConfig2) &&
               (schSCManager = OpenSCManager(NULL, NULL, SC_MANAGER_CONNECT)))
           {
      -        SC_HANDLE schService = OpenService(schSCManager, mpm_service_name,
      -                                           SERVICE_CHANGE_CONFIG);
      +        SC_HANDLE schService;
      +
      +#if APR_HAS_UNICODE_FS
      +        IF_WIN_OS_IS_UNICODE
      +        {
      +            schService = OpenServiceW(schSCManager,
      +                                      (LPCWSTR)mpm_service_name_w,
      +                                      SERVICE_CHANGE_CONFIG);
      +        }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +        ELSE_WIN_OS_IS_ANSI
      +        {
      +            schService = OpenService(schSCManager, mpm_service_name,
      +                                     SERVICE_CHANGE_CONFIG);
      +        }
      +#endif
               if (schService) {
                   /* Cast is necessary, ChangeServiceConfig2 handles multiple
                    * object types, some volatile, some not.
                    */
      -            /* ###: utf-ize */
      -            ChangeServiceConfig2(schService,
      -                                 1 /* SERVICE_CONFIG_DESCRIPTION */,
      -                                 (LPVOID) &full_description);
      +#if APR_HAS_UNICODE_FS
      +            IF_WIN_OS_IS_UNICODE
      +            {
      +                apr_size_t slen = strlen(full_description) + 1;
      +                apr_size_t wslen = slen;
      +                apr_wchar_t *full_description_w = 
      +                    (apr_wchar_t*)apr_palloc(pconf, 
      +                                             wslen * sizeof(apr_wchar_t));
      +                apr_status_t rv = apr_conv_utf8_to_ucs2(full_description, &slen,
      +                                                        full_description_w,
      +                                                        &wslen);
      +                if ((rv != APR_SUCCESS) || slen
      +                        || ChangeServiceConfig2W(schService, 1
      +                                                 /*SERVICE_CONFIG_DESCRIPTION*/,
      +                                                 (LPVOID) &full_description_w))
      +                    full_description = NULL;
      +            }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +            ELSE_WIN_OS_IS_ANSI
      +            {
      +                if (ChangeServiceConfig2(schService,
      +                                         1 /* SERVICE_CONFIG_DESCRIPTION */,
      +                                         (LPVOID) &full_description))
      +                    full_description = NULL;
      +            }
      +#endif
                   CloseServiceHandle(schService);
               }
               CloseServiceHandle(schSCManager);
      @@ -263,7 +339,7 @@ static void set_service_description(void)
       /* handle the SCM's ControlService() callbacks to our service */
       
       static DWORD WINAPI service_nt_ctrl(DWORD dwCtrlCode, DWORD dwEventType,
      -                                   LPVOID lpEventData, LPVOID lpContext)
      +                                    LPVOID lpEventData, LPVOID lpContext)
       {
           nt_service_ctx_t *ctx = lpContext;
       
      @@ -296,25 +372,31 @@ static DWORD WINAPI service_nt_ctrl(DWORD dwCtrlCode, DWORD dwEventType,
        */
       extern apr_array_header_t *mpm_new_argv;
       
      -/* ###: utf-ize */
      -static void __stdcall service_nt_main_fn(DWORD argc, LPTSTR *argv)
      +#if APR_HAS_UNICODE_FS
      +static void __stdcall service_nt_main_fn_w(DWORD argc, LPWSTR *argv)
       {
           const char *ignored;
           nt_service_ctx_t *ctx = &globdat;
      +    char *service_name;
      +    apr_size_t wslen = wcslen(argv[0]) + 1;
      +    apr_size_t slen = wslen * 3 - 2;
      +
      +    service_name = malloc(slen);
      +    (void)apr_conv_ucs2_to_utf8(argv[0], &wslen, service_name, &slen);
       
           /* args and service names live in the same pool */
      -    mpm_service_set_name(mpm_new_argv->pool, &ignored, argv[0]);
      +    mpm_service_set_name(mpm_new_argv->pool, &ignored, service_name);
       
           memset(&ctx->ssStatus, 0, sizeof(ctx->ssStatus));
           ctx->ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
           ctx->ssStatus.dwCurrentState = SERVICE_START_PENDING;
           ctx->ssStatus.dwCheckPoint = 1;
      -
      -    /* ###: utf-ize */
      -    if (!(ctx->hServiceStatus = RegisterServiceCtrlHandlerEx(argv[0], service_nt_ctrl, ctx)))
      +    if (!(ctx->hServiceStatus = 
      +              RegisterServiceCtrlHandlerExW(argv[0], service_nt_ctrl, ctx)))
           {
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, apr_get_os_error(),
      -                     NULL, "Failure registering service handler");
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 
      +                     apr_get_os_error(), NULL, 
      +                     APLOGNO(00365) "Failure registering service handler");
               return;
           }
       
      @@ -323,11 +405,12 @@ static void __stdcall service_nt_main_fn(DWORD argc, LPTSTR *argv)
       
           /* We need to append all the command arguments passed via StartService()
            * to our running service... which just got here via the SCM...
      -     * but we hvae no interest in argv[0] for the mpm_new_argv list.
      +     * but we have no interest in argv[0] for the mpm_new_argv list.
            */
           if (argc > 1)
           {
      -        char **cmb_data;
      +        char **cmb_data, **cmb;
      +        DWORD i;
       
               mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
               cmb_data = malloc(mpm_new_argv->nalloc * sizeof(const char *));
      @@ -340,6 +423,16 @@ static void __stdcall service_nt_main_fn(DWORD argc, LPTSTR *argv)
               memcpy (cmb_data + mpm_new_argv->nelts, argv + 1,
                       mpm_new_argv->elt_size * (argc - 1));
       
      +        cmb = cmb_data + mpm_new_argv->nelts;
      +
      +        for (i = 1; i < argc; ++i)
      +        {
      +            wslen = wcslen(argv[i]) + 1;
      +            slen = wslen * 3 - 2;
      +            service_name = malloc(slen);
      +            (void)apr_conv_ucs2_to_utf8(argv[i], &wslen, *(cmb++), &slen);
      +        }
      +
               /* The replacement arg list is complete */
               mpm_new_argv->elts = (char *)cmb_data;
               mpm_new_argv->nelts = mpm_new_argv->nalloc;
      @@ -352,27 +445,105 @@ static void __stdcall service_nt_main_fn(DWORD argc, LPTSTR *argv)
       
           WaitForSingleObject(ctx->service_term, INFINITE);
       }
      +#endif /* APR_HAS_UNICODE_FS */
       
       
      -static DWORD WINAPI service_nt_dispatch_thread(LPVOID nada)
      +#if APR_HAS_ANSI_FS
      +static void __stdcall service_nt_main_fn(DWORD argc, LPSTR *argv)
       {
      -    apr_status_t rv = APR_SUCCESS;
      +    const char *ignored;
      +    nt_service_ctx_t *ctx = &globdat;
      +
      +    /* args and service names live in the same pool */
      +    mpm_service_set_name(mpm_new_argv->pool, &ignored, argv[0]);
      +
      +    memset(&ctx->ssStatus, 0, sizeof(ctx->ssStatus));
      +    ctx->ssStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS;
      +    ctx->ssStatus.dwCurrentState = SERVICE_START_PENDING;
      +    ctx->ssStatus.dwCheckPoint = 1;
       
      -    SERVICE_TABLE_ENTRY dispatchTable[] =
      +    if (!(ctx->hServiceStatus = 
      +              RegisterServiceCtrlHandlerExA(argv[0], service_nt_ctrl, ctx)))
      +        {
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 
      +                     apr_get_os_error(), NULL, 
      +                     APLOGNO(00365) "Failure registering service handler");
      +        return;
      +    }
      +
      +    /* Report status, no errors, and buy 3 more seconds */
      +    ReportStatusToSCMgr(SERVICE_START_PENDING, 30000, ctx);
      +
      +    /* We need to append all the command arguments passed via StartService()
      +     * to our running service... which just got here via the SCM...
      +     * but we have no interest in argv[0] for the mpm_new_argv list.
      +     */
      +    if (argc > 1)
           {
      -        { "", service_nt_main_fn },
      +        char **cmb_data;
      +
      +        mpm_new_argv->nalloc = mpm_new_argv->nelts + argc - 1;
      +        cmb_data = malloc(mpm_new_argv->nalloc * sizeof(const char *));
      +
      +        /* mpm_new_argv remains first (of lower significance) */
      +        memcpy (cmb_data, mpm_new_argv->elts,
      +                mpm_new_argv->elt_size * mpm_new_argv->nelts);
      +
      +        /* Service args follow from StartService() invocation */
      +        memcpy (cmb_data + mpm_new_argv->nelts, argv + 1,
      +                mpm_new_argv->elt_size * (argc - 1));
      +
      +        /* The replacement arg list is complete */
      +        mpm_new_argv->elts = (char *)cmb_data;
      +        mpm_new_argv->nelts = mpm_new_argv->nalloc;
      +    }
      +
      +    /* Let the main thread continue now... but hang on to the
      +     * signal_monitor event so we can take further action
      +     */
      +    SetEvent(ctx->service_init);
      +
      +    WaitForSingleObject(ctx->service_term, INFINITE);
      +}
      +#endif
      +
      +
      + static DWORD WINAPI service_nt_dispatch_thread(LPVOID nada)
      + {
      +#if APR_HAS_UNICODE_FS
      +    SERVICE_TABLE_ENTRYW dispatchTable_w[] =
      +    {
      +        { L"", service_nt_main_fn_w },
               { NULL, NULL }
           };
      -
      -    /* ###: utf-ize */
      -    if (!StartServiceCtrlDispatcher(dispatchTable))
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    SERVICE_TABLE_ENTRYA dispatchTable[] =
           {
      +        { "", service_nt_main_fn },
      +        { NULL, NULL }
      +    };
      +#endif
      +    apr_status_t rv;
      + 
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +        rv = StartServiceCtrlDispatcherW(dispatchTable_w);
      +#endif
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +         rv = StartServiceCtrlDispatcherA(dispatchTable);
      +#endif
      +    if (rv) {
      +        rv = APR_SUCCESS;
      +    }
      +    else {
               /* This is a genuine failure of the SCM. */
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "Error starting service control dispatcher");
      +                     APLOGNO(00366) "Error starting Windows service control "
      +                     "dispatcher");
           }
      -
           return (rv);
       }
       
      @@ -400,8 +571,24 @@ apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name,
            */
           mpm_service_name = apr_palloc(p, strlen(set_name) + 1);
           apr_collapse_spaces((char*) mpm_service_name, set_name);
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +    {
      +        apr_size_t slen = strlen(mpm_service_name) + 1;
      +        apr_size_t wslen = slen;
      +        mpm_service_name_w = apr_palloc(p, wslen * sizeof(apr_wchar_t));
      +        rv = apr_conv_utf8_to_ucs2(mpm_service_name, &slen,
      +                                   mpm_service_name_w, &wslen);
      +        if (rv != APR_SUCCESS)
      +            return rv;
      +        else if (slen)
      +            return APR_ENAMETOOLONG;
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +
           apr_snprintf(key_name, sizeof(key_name), SERVICECONFIG, mpm_service_name);
      -    rv = ap_regkey_open(&key, AP_REGKEY_LOCAL_MACHINE, key_name, APR_READ, pconf);
      +    rv = ap_regkey_open(&key, AP_REGKEY_LOCAL_MACHINE, key_name,
      +                        APR_READ, pconf);
           if (rv == APR_SUCCESS) {
               rv = ap_regkey_value_get(&mpm_display_name, key, "DisplayName", pconf);
               ap_regkey_close(key);
      @@ -411,6 +598,7 @@ apr_status_t mpm_service_set_name(apr_pool_t *p, const char **display_name,
               mpm_display_name = apr_pstrdup(p, set_name);
           }
           *display_name = mpm_display_name;
      +
           return rv;
       }
       
      @@ -433,9 +621,9 @@ apr_status_t mpm_merge_service_args(apr_pool_t *p,
           }
           if (rv != APR_SUCCESS) {
               if (rv == ERROR_FILE_NOT_FOUND) {
      -            ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      -                         "No ConfigArgs registered for %s, perhaps "
      -                         "this service is not installed?",
      +            ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(00367)
      +                         "No ConfigArgs registered for the '%s' service, "
      +                         "perhaps this service is not installed?",
                                mpm_service_name);
                   return APR_SUCCESS;
               }
      @@ -557,22 +745,53 @@ apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
                                        const char * const * argv, int reconfig)
       {
           char key_name[MAX_PATH];
      -    char exe_path[MAX_PATH];
           char *launch_cmd;
           ap_regkey_t *key;
           apr_status_t rv;
           SC_HANDLE   schService;
           SC_HANDLE   schSCManager;
      +    DWORD       rc;
      +#if APR_HAS_UNICODE_FS
      +    apr_wchar_t *display_name_w;
      +    apr_wchar_t *launch_cmd_w;
      +#endif
       
      -    fprintf(stderr,reconfig ? "Reconfiguring the %s service\n"
      -                   : "Installing the %s service\n", mpm_display_name);
      +    fprintf(stderr, reconfig ? "Reconfiguring the '%s' service\n"
      +                             : "Installing the '%s' service\n",
      +                    mpm_display_name);
       
      -    /* ###: utf-ize */
      -    if (GetModuleFileName(NULL, exe_path, sizeof(exe_path)) == 0)
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
           {
      -        apr_status_t rv = apr_get_os_error();
      +        apr_size_t slen = strlen(mpm_display_name) + 1;
      +        apr_size_t wslen = slen;
      +        display_name_w = apr_palloc(ptemp, wslen * sizeof(apr_wchar_t));
      +        rv = apr_conv_utf8_to_ucs2(mpm_display_name, &slen,
      +                                   display_name_w, &wslen);
      +        if (rv != APR_SUCCESS)
      +            return rv;
      +        else if (slen)
      +            return APR_ENAMETOOLONG;
      +
      +        launch_cmd_w = apr_palloc(ptemp, (MAX_PATH + 17) * sizeof(apr_wchar_t));
      +        launch_cmd_w[0] = L'"';
      +        rc = GetModuleFileNameW(NULL, launch_cmd_w + 1, MAX_PATH);
      +        wcscpy(launch_cmd_w + rc + 1, L"\" -k runservice");
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +    {
      +        launch_cmd = apr_palloc(ptemp, MAX_PATH + 17);
      +        launch_cmd[0] = '"';
      +        rc = GetModuleFileName(NULL, launch_cmd + 1, MAX_PATH);
      +        strcpy(launch_cmd + rc + 1, "\" -k runservice");
      +    }
      +#endif
      +    if (rc == 0) {
      +        rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "GetModuleFileName failed");
      +                     APLOGNO(00368) "GetModuleFileName failed");
               return rv;
           }
       
      @@ -581,39 +800,69 @@ apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
           if (!schSCManager) {
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "Failed to open the WinNT service manager, perhaps "
      -                     "you forgot to log in as Adminstrator?");
      +                     APLOGNO(00369)  "Failed to open the Windows service "
      +                     "manager, perhaps you forgot to log in as Adminstrator?");
               return (rv);
           }
       
      -    launch_cmd = apr_psprintf(ptemp, "\"%s\" -k runservice", exe_path);
      -
           if (reconfig) {
      -        /* ###: utf-ize */
      -        schService = OpenService(schSCManager, mpm_service_name,
      -                                 SERVICE_CHANGE_CONFIG);
      +#if APR_HAS_UNICODE_FS
      +        IF_WIN_OS_IS_UNICODE
      +        {
      +            schService = OpenServiceW(schSCManager, mpm_service_name_w,
      +                                      SERVICE_CHANGE_CONFIG);
      +        }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +        ELSE_WIN_OS_IS_ANSI
      +        {
      +            schService = OpenService(schSCManager, mpm_service_name,
      +                                     SERVICE_CHANGE_CONFIG);
      +        }
      +#endif
               if (!schService) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_ERR,
      -                         apr_get_os_error(), NULL,
      -                         "OpenService failed");
      +            rv = apr_get_os_error();
      +            CloseServiceHandle(schSCManager);
      +            ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      +                         APLOGNO(00373) "Failed to open the '%s' service",
      +                         mpm_display_name);
      +            return (rv);
               }
      -        /* ###: utf-ize */
      -        else if (!ChangeServiceConfig(schService,
      +
      +#if APR_HAS_UNICODE_FS
      +        IF_WIN_OS_IS_UNICODE
      +        {
      +            rc = ChangeServiceConfigW(schService,
                                             SERVICE_WIN32_OWN_PROCESS,
                                             SERVICE_AUTO_START,
                                             SERVICE_ERROR_NORMAL,
      -                                      launch_cmd, NULL, NULL,
      -                                      "Tcpip\0Afd\0", NULL, NULL,
      -                                      mpm_display_name)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_ERR,
      +                                      launch_cmd_w, NULL, NULL,
      +                                      L"Tcpip\0Afd\0", NULL, NULL,
      +                                      display_name_w);
      +        }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +        ELSE_WIN_OS_IS_ANSI
      +        {
      +            rc = ChangeServiceConfig(schService,
      +                                     SERVICE_WIN32_OWN_PROCESS,
      +                                     SERVICE_AUTO_START,
      +                                     SERVICE_ERROR_NORMAL,
      +                                     launch_cmd, NULL, NULL,
      +                                     "Tcpip\0Afd\0", NULL, NULL,
      +                                     mpm_display_name);
      +        }
      +#endif
      +        if (!rc) {
      +            ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP,
                                apr_get_os_error(), NULL,
      -                         "ChangeServiceConfig failed");
      +                         APLOGNO(02652) "ChangeServiceConfig failed");
       
                   /* !schService aborts configuration below */
                   CloseServiceHandle(schService);
                   schService = NULL;
      -            }
               }
      +    }
           else {
               /* RPCSS is the Remote Procedure Call (RPC) Locator required
                * for DCOM communication pipes.  I am far from convinced we
      @@ -621,26 +870,48 @@ apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
                * be warned that future apache modules or ISAPI dll's may
                * depend on it.
                */
      -        /* ###: utf-ize */
      -        schService = CreateService(schSCManager,         /* SCManager database */
      -                                   mpm_service_name,     /* name of service    */
      -                                   mpm_display_name,     /* name to display    */
      -                                   SERVICE_ALL_ACCESS,   /* access required    */
      -                                   SERVICE_WIN32_OWN_PROCESS,  /* service type */
      -                                   SERVICE_AUTO_START,   /* start type         */
      -                                   SERVICE_ERROR_NORMAL, /* error control type */
      -                                   launch_cmd,           /* service's binary   */
      -                                   NULL,                 /* no load svc group  */
      -                                   NULL,                 /* no tag identifier  */
      -                                   "Tcpip\0Afd\0",       /* dependencies       */
      -                                   NULL,                 /* use SYSTEM account */
      -                                   NULL);                /* no password        */
      -
      +#if APR_HAS_UNICODE_FS
      +        IF_WIN_OS_IS_UNICODE
      +        {
      +            schService = CreateServiceW(schSCManager,    // SCManager database
      +                                 mpm_service_name_w,   // name of service
      +                                 display_name_w,   // name to display
      +                                 SERVICE_ALL_ACCESS,   // access required
      +                                 SERVICE_WIN32_OWN_PROCESS,  // service type
      +                                 SERVICE_AUTO_START,   // start type
      +                                 SERVICE_ERROR_NORMAL, // error control type
      +                                 launch_cmd_w,         // service's binary
      +                                 NULL,                 // no load svc group
      +                                 NULL,                 // no tag identifier
      +                                 L"Tcpip\0Afd\0",      // dependencies
      +                                 NULL,                 // use SYSTEM account
      +                                 NULL);                // no password
      +        }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +        ELSE_WIN_OS_IS_ANSI
      +        {
      +            schService = CreateService(schSCManager,     // SCManager database
      +                                 mpm_service_name,     // name of service
      +                                 mpm_display_name,     // name to display
      +                                 SERVICE_ALL_ACCESS,   // access required
      +                                 SERVICE_WIN32_OWN_PROCESS,  // service type
      +                                 SERVICE_AUTO_START,   // start type
      +                                 SERVICE_ERROR_NORMAL, // error control type
      +                                 launch_cmd,           // service's binary
      +                                 NULL,                 // no load svc group
      +                                 NULL,                 // no tag identifier
      +                                 "Tcpip\0Afd\0",       // dependencies
      +                                 NULL,                 // use SYSTEM account
      +                                 NULL);                // no password
      +        }
      +#endif
               if (!schService)
               {
                   rv = apr_get_os_error();
                   ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                         "Failed to create WinNT Service Profile");
      +                         APLOGNO(00370) "Failed to create the '%s' service",
      +                         mpm_display_name);
                   CloseServiceHandle(schSCManager);
                   return (rv);
               }
      @@ -662,11 +933,12 @@ apr_status_t mpm_service_install(apr_pool_t *ptemp, int argc,
           }
           if (rv != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "%s: Failed to store the ConfigArgs in the registry.",
      -                     mpm_display_name);
      +                     APLOGNO(00371) "Failed to store ConfigArgs for the "
      +                     "'%s' service in the registry.", mpm_display_name);
               return (rv);
           }
      -    fprintf(stderr,"The %s service is successfully installed.\n", mpm_display_name);
      +    fprintf(stderr, "The '%s' service is successfully installed.\n",
      +                    mpm_display_name);
           return APR_SUCCESS;
       }
       
      @@ -677,24 +949,35 @@ apr_status_t mpm_service_uninstall(void)
           SC_HANDLE schService;
           SC_HANDLE schSCManager;
       
      -    fprintf(stderr,"Removing the %s service\n", mpm_display_name);
      +    fprintf(stderr, "Removing the '%s' service\n", mpm_display_name);
       
           schSCManager = OpenSCManager(NULL, NULL, /* local, default database */
                                        SC_MANAGER_CONNECT);
           if (!schSCManager) {
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "Failed to open the WinNT service manager.");
      +                     APLOGNO(00369)  "Failed to open the Windows service "
      +                     "manager, perhaps you forgot to log in as Adminstrator?");
               return (rv);
           }
       
      -    /* ###: utf-ize */
      -    schService = OpenService(schSCManager, mpm_service_name, DELETE);
      -
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +    {
      +        schService = OpenServiceW(schSCManager, mpm_service_name_w, DELETE);
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +    {
      +        schService = OpenService(schSCManager, mpm_service_name, DELETE);
      +    }
      +#endif
           if (!schService) {
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                        "%s: OpenService failed", mpm_display_name);
      +                     APLOGNO(00373) "Failed to open the '%s' service",
      +                     mpm_display_name);
               return (rv);
           }
       
      @@ -712,14 +995,16 @@ apr_status_t mpm_service_uninstall(void)
           if (DeleteService(schService) == 0) {
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "%s: Failed to delete the service.", mpm_display_name);
      +                     APLOGNO(00374) "Failed to delete the '%s' service",
      +                     mpm_display_name);
               return (rv);
           }
       
           CloseServiceHandle(schService);
           CloseServiceHandle(schSCManager);
       
      -    fprintf(stderr,"The %s service has been removed successfully.\n", mpm_display_name);
      +    fprintf(stderr, "The '%s' service has been removed successfully.\n",
      +                    mpm_display_name);
           return APR_SUCCESS;
       }
       
      @@ -731,7 +1016,8 @@ apr_status_t mpm_service_uninstall(void)
        * ControlService signal is sent.
        */
       
      -static int signal_service_transition(SC_HANDLE schService, DWORD signal, DWORD pending, DWORD complete)
      +static int signal_service_transition(SC_HANDLE schService, DWORD signal,
      +                                     DWORD pending, DWORD complete)
       {
           if (signal && !ControlService(schService, signal, &globdat.ssStatus))
               return FALSE;
      @@ -750,28 +1036,40 @@ apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
                                      const char * const * argv)
       {
           apr_status_t rv;
      -    CHAR **start_argv;
           SC_HANDLE   schService;
           SC_HANDLE   schSCManager;
       
      -    fprintf(stderr,"Starting the %s service\n", mpm_display_name);
      +    fprintf(stderr, "Starting the '%s' service\n", mpm_display_name);
       
           schSCManager = OpenSCManager(NULL, NULL, /* local, default database */
                                        SC_MANAGER_CONNECT);
           if (!schSCManager) {
               rv = apr_get_os_error();
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "Failed to open the WinNT service manager");
      +                     APLOGNO(00369)  "Failed to open the Windows service "
      +                     "manager, perhaps you forgot to log in as Adminstrator?");
               return (rv);
           }
       
      -    /* ###: utf-ize */
      -    schService = OpenService(schSCManager, mpm_service_name,
      -                             SERVICE_START | SERVICE_QUERY_STATUS);
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +    {
      +        schService = OpenServiceW(schSCManager, mpm_service_name_w,
      +                                  SERVICE_START | SERVICE_QUERY_STATUS);
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +    {
      +        schService = OpenService(schSCManager, mpm_service_name,
      +                                 SERVICE_START | SERVICE_QUERY_STATUS);
      +    }
      +#endif
           if (!schService) {
               rv = apr_get_os_error();
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL,
      -                     "%s: Failed to open the service.", mpm_display_name);
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, rv, NULL, 
      +                     APLOGNO(00373) "Failed to open the '%s' service",
      +                     mpm_display_name);
               CloseServiceHandle(schSCManager);
               return (rv);
           }
      @@ -779,23 +1077,54 @@ apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
           if (QueryServiceStatus(schService, &globdat.ssStatus)
               && (globdat.ssStatus.dwCurrentState == SERVICE_RUNNING)) {
               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL,
      -                     "Service %s is already started!", mpm_display_name);
      +                     APLOGNO(00377) "The '%s' service is already started!",
      +                     mpm_display_name);
               CloseServiceHandle(schService);
               CloseServiceHandle(schSCManager);
               return 0;
           }
       
      -    start_argv = malloc((argc + 1) * sizeof(const char **));
      -    memcpy(start_argv, argv, argc * sizeof(const char **));
      -    start_argv[argc] = NULL;
      -
           rv = APR_EINIT;
      -    /* ###: utf-ize */
      -    if (StartService(schService, argc, start_argv)
      -        && signal_service_transition(schService, 0, /* test only */
      -                                     SERVICE_START_PENDING,
      -                                     SERVICE_RUNNING))
      -        rv = APR_SUCCESS;
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +    {
      +        LPWSTR *start_argv_w = malloc((argc + 1) * sizeof(LPCWSTR));
      +        int i;
      +
      +        for (i = 0; i < argc; ++i)
      +        {
      +            apr_size_t slen = strlen(argv[i]) + 1;
      +            apr_size_t wslen = slen;
      +            start_argv_w[i] = malloc(wslen * sizeof(WCHAR));
      +            rv = apr_conv_utf8_to_ucs2(argv[i], &slen, start_argv_w[i], &wslen);
      +            if (rv != APR_SUCCESS)
      +                return rv;
      +            else if (slen)
      +                return APR_ENAMETOOLONG;
      +        }
      +        start_argv_w[argc] = NULL;
      +
      +        if (StartServiceW(schService, argc, start_argv_w)
      +            && signal_service_transition(schService, 0, /* test only */
      +                                         SERVICE_START_PENDING,
      +                                         SERVICE_RUNNING))
      +                rv = APR_SUCCESS;
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +    {
      +        char **start_argv = malloc((argc + 1) * sizeof(const char *));
      +        memcpy(start_argv, argv, argc * sizeof(const char *));
      +        start_argv[argc] = NULL;
      +
      +        if (StartService(schService, argc, start_argv)
      +            && signal_service_transition(schService, 0, /* test only */
      +                                         SERVICE_START_PENDING,
      +                                         SERVICE_RUNNING))
      +                rv = APR_SUCCESS;
      +    }
      +#endif
           if (rv != APR_SUCCESS)
               rv = apr_get_os_error();
       
      @@ -803,10 +1132,10 @@ apr_status_t mpm_service_start(apr_pool_t *ptemp, int argc,
           CloseServiceHandle(schSCManager);
       
           if (rv == APR_SUCCESS)
      -        fprintf(stderr,"The %s service is running.\n", mpm_display_name);
      +        fprintf(stderr, "The '%s' service is running.\n", mpm_display_name);
           else
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      -                     "%s: Failed to start the service process.",
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00378)
      +                     "Failed to start the '%s' service",
                            mpm_display_name);
       
           return rv;
      @@ -825,42 +1154,61 @@ void mpm_signal_service(apr_pool_t *ptemp, int signal)
                                        SC_MANAGER_CONNECT);
       
           if (!schSCManager) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, apr_get_os_error(), NULL,
      -                     "Failed to open the NT Service Manager");
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP,
      +                     apr_get_os_error(), NULL,
      +                     APLOGNO(00369)  "Failed to open the Windows service "
      +                     "manager, perhaps you forgot to log in as Adminstrator?");
               return;
           }
       
      -    /* ###: utf-ize */
      -    schService = OpenService(schSCManager, mpm_service_name,
      -                             SERVICE_INTERROGATE | SERVICE_QUERY_STATUS |
      -                             SERVICE_USER_DEFINED_CONTROL |
      -                             SERVICE_START | SERVICE_STOP);
      -
      +#if APR_HAS_UNICODE_FS
      +    IF_WIN_OS_IS_UNICODE
      +    {
      +        schService = OpenServiceW(schSCManager, mpm_service_name_w,
      +                                  SERVICE_INTERROGATE | SERVICE_QUERY_STATUS |
      +                                  SERVICE_USER_DEFINED_CONTROL |
      +                                  SERVICE_START | SERVICE_STOP);
      +    }
      +#endif /* APR_HAS_UNICODE_FS */
      +#if APR_HAS_ANSI_FS
      +    ELSE_WIN_OS_IS_ANSI
      +    {
      +        schService = OpenService(schSCManager, mpm_service_name,
      +                                 SERVICE_INTERROGATE | SERVICE_QUERY_STATUS |
      +                                 SERVICE_USER_DEFINED_CONTROL |
      +                                 SERVICE_START | SERVICE_STOP);
      +    }
      +#endif
           if (schService == NULL) {
               /* Could not open the service */
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, apr_get_os_error(), NULL,
      -                     "Failed to open the %s Service", mpm_display_name);
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP,
      +                     apr_get_os_error(), NULL,
      +                     APLOGNO(00373) "Failed to open the '%s' service",
      +                     mpm_display_name);
               CloseServiceHandle(schSCManager);
               return;
           }
       
           if (!QueryServiceStatus(schService, &globdat.ssStatus)) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, apr_get_os_error(), NULL,
      -                     "Query of Service %s failed", mpm_display_name);
      +        ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP,
      +                     apr_get_os_error(), NULL,
      +                     APLOGNO(00381) "Query of the '%s' service failed",
      +                     mpm_display_name);
               CloseServiceHandle(schService);
               CloseServiceHandle(schSCManager);
               return;
           }
       
           if (!signal && (globdat.ssStatus.dwCurrentState == SERVICE_STOPPED)) {
      -        fprintf(stderr,"The %s service is not started.\n", mpm_display_name);
      +        fprintf(stderr, "The '%s' service is not started.\n", mpm_display_name);
               CloseServiceHandle(schService);
               CloseServiceHandle(schSCManager);
               return;
           }
       
      -    fprintf(stderr,"The %s service is %s.\n", mpm_display_name,
      -            signal ? "restarting" : "stopping");
      +    fprintf(stderr, signal ? "The '%s' service is restarting.\n"
      +                           : "The '%s' service is stopping.\n",
      +                    mpm_display_name);
       
           if (!signal)
               success = signal_service_transition(schService,
      @@ -883,9 +1231,11 @@ void mpm_signal_service(apr_pool_t *ptemp, int signal)
           CloseServiceHandle(schSCManager);
       
           if (success)
      -        fprintf(stderr,"The %s service has %s.\n", mpm_display_name,
      -               signal ? "restarted" : "stopped");
      +        fprintf(stderr, signal ? "The '%s' service has restarted.\n"
      +                               : "The '%s' service has stopped.\n",
      +                        mpm_display_name);
           else
      -        fprintf(stderr,"Failed to %s the %s service.\n",
      -               signal ? "restart" : "stop", mpm_display_name);
      +        fprintf(stderr, signal ? "Failed to restart the '%s' service.\n"
      +                               : "Failed to stop the '%s' service.\n",
      +                        mpm_display_name);
       }
      diff --git a/server/mpm/worker/config3.m4 b/server/mpm/worker/config3.m4
      index dc2bccb5542..c28b73bf54c 100644
      --- a/server/mpm/worker/config3.m4
      +++ b/server/mpm/worker/config3.m4
      @@ -1,5 +1,5 @@
       dnl ## XXX - Need a more thorough check of the proper flags to use
       
      -APACHE_MPM_MODULE(worker, $enable_mpm_worker, worker.lo fdqueue.lo pod.lo,[
      +APACHE_MPM_MODULE(worker, $enable_mpm_worker, worker.lo fdqueue.lo,[
           AC_CHECK_FUNCS(pthread_kill)
       ])
      diff --git a/server/mpm/worker/mpm_default.h b/server/mpm/worker/mpm_default.h
      index 244a0bb1fdd..464250e1416 100644
      --- a/server/mpm/worker/mpm_default.h
      +++ b/server/mpm/worker/mpm_default.h
      @@ -18,7 +18,8 @@
        * @file  worker/mpm_default.h
        * @brief Worker MPM defaults
        *
      - * @addtogroup APACHE_MPM_WORKER
      + * @defgroup APACHE_MPM_WORKER Worker MPM
      + * @ingroup APACHE_INTERNAL
        * @{
        */
       
      diff --git a/server/mpm/worker/pod.c b/server/mpm/worker/pod.c
      deleted file mode 100644
      index c39930b8c82..00000000000
      --- a/server/mpm/worker/pod.c
      +++ /dev/null
      @@ -1,113 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -#include "apr_portable.h"
      -#include "pod.h"
      -
      -#if APR_HAVE_UNISTD_H
      -#include <unistd.h>
      -#endif
      -
      -APLOG_USE_MODULE(mpm_worker);
      -
      -AP_DECLARE(apr_status_t) ap_worker_pod_open(apr_pool_t *p, ap_worker_pod_t **pod)
      -{
      -    apr_status_t rv;
      -
      -    *pod = apr_palloc(p, sizeof(**pod));
      -    rv = apr_file_pipe_create(&((*pod)->pod_in), &((*pod)->pod_out), p);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -/*
      -    apr_file_pipe_timeout_set((*pod)->pod_in, 0);
      -*/
      -    (*pod)->p = p;
      -
      -    /* close these before exec. */
      -    apr_file_inherit_unset((*pod)->pod_in);
      -    apr_file_inherit_unset((*pod)->pod_out);
      -
      -    return APR_SUCCESS;
      -}
      -
      -AP_DECLARE(int) ap_worker_pod_check(ap_worker_pod_t *pod)
      -{
      -    char c;
      -    apr_os_file_t fd;
      -    int rc;
      -
      -    /* we need to surface EINTR so we'll have to grab the
      -     * native file descriptor and do the OS read() ourselves
      -     */
      -    apr_os_file_get(&fd, pod->pod_in);
      -    rc = read(fd, &c, 1);
      -    if (rc == 1) {
      -        switch(c) {
      -        case RESTART_CHAR:
      -            return AP_RESTART;
      -        case GRACEFUL_CHAR:
      -            return AP_GRACEFUL;
      -        }
      -    }
      -    return AP_NORESTART;
      -}
      -
      -AP_DECLARE(apr_status_t) ap_worker_pod_close(ap_worker_pod_t *pod)
      -{
      -    apr_status_t rv;
      -
      -    rv = apr_file_close(pod->pod_out);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -
      -    rv = apr_file_close(pod->pod_in);
      -    if (rv != APR_SUCCESS) {
      -        return rv;
      -    }
      -    return rv;
      -}
      -
      -static apr_status_t pod_signal_internal(ap_worker_pod_t *pod, int graceful)
      -{
      -    apr_status_t rv;
      -    char char_of_death = graceful ? GRACEFUL_CHAR : RESTART_CHAR;
      -    apr_size_t one = 1;
      -
      -    rv = apr_file_write(pod->pod_out, &char_of_death, &one);
      -    if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      -                     "write pipe_of_death");
      -    }
      -    return rv;
      -}
      -
      -AP_DECLARE(apr_status_t) ap_worker_pod_signal(ap_worker_pod_t *pod, int graceful)
      -{
      -    return pod_signal_internal(pod, graceful);
      -}
      -
      -AP_DECLARE(void) ap_worker_pod_killpg(ap_worker_pod_t *pod, int num, int graceful)
      -{
      -    int i;
      -    apr_status_t rv = APR_SUCCESS;
      -
      -    for (i = 0; i < num && rv == APR_SUCCESS; i++) {
      -        rv = pod_signal_internal(pod, graceful);
      -    }
      -}
      -
      diff --git a/server/mpm/worker/pod.h b/server/mpm/worker/pod.h
      deleted file mode 100644
      index ccb9cf9d700..00000000000
      --- a/server/mpm/worker/pod.h
      +++ /dev/null
      @@ -1,58 +0,0 @@
      -/* Licensed to the Apache Software Foundation (ASF) under one or more
      - * contributor license agreements.  See the NOTICE file distributed with
      - * this work for additional information regarding copyright ownership.
      - * The ASF licenses this file to You under the Apache License, Version 2.0
      - * (the "License"); you may not use this file except in compliance with
      - * the License.  You may obtain a copy of the License at
      - *
      - *     http://www.apache.org/licenses/LICENSE-2.0
      - *
      - * Unless required by applicable law or agreed to in writing, software
      - * distributed under the License is distributed on an "AS IS" BASIS,
      - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      - * See the License for the specific language governing permissions and
      - * limitations under the License.
      - */
      -
      -/**
      - * @file worker/pod.h
      - * @brief Worker MPM Pipe of Death
      - *
      - * @addtogroup APACHE_MPM_WORKER
      - * @{
      - */
      -
      -#include "apr.h"
      -#include "apr_strings.h"
      -#define APR_WANT_STRFUNC
      -#include "apr_want.h"
      -
      -#include "httpd.h"
      -#include "http_config.h"
      -#include "http_log.h"
      -#include "http_main.h"
      -#include "mpm_common.h"
      -#include "ap_mpm.h"
      -#include "ap_listen.h"
      -#include "mpm_default.h"
      -
      -#define RESTART_CHAR '$'
      -#define GRACEFUL_CHAR '!'
      -
      -#define AP_RESTART  0
      -#define AP_GRACEFUL 1
      -
      -typedef struct ap_worker_pod_t ap_worker_pod_t;
      -
      -struct ap_worker_pod_t {
      -    apr_file_t *pod_in;
      -    apr_file_t *pod_out;
      -    apr_pool_t *p;
      -};
      -
      -AP_DECLARE(apr_status_t) ap_worker_pod_open(apr_pool_t *p, ap_worker_pod_t **pod);
      -AP_DECLARE(int) ap_worker_pod_check(ap_worker_pod_t *pod);
      -AP_DECLARE(apr_status_t) ap_worker_pod_close(ap_worker_pod_t *pod);
      -AP_DECLARE(apr_status_t) ap_worker_pod_signal(ap_worker_pod_t *pod, int graceful);
      -AP_DECLARE(void) ap_worker_pod_killpg(ap_worker_pod_t *pod, int num, int graceful);
      -/** @} */
      diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c
      index 64612ac79c2..73c33bfabc6 100644
      --- a/server/mpm/worker/worker.c
      +++ b/server/mpm/worker/worker.c
      @@ -30,6 +30,9 @@
       #include "apr_thread_mutex.h"
       #include "apr_proc_mutex.h"
       #include "apr_poll.h"
      +
      +#include <stdlib.h>
      +
       #define APR_WANT_STRFUNC
       #include "apr_want.h"
       
      @@ -58,7 +61,6 @@
       #include "http_core.h"          /* for get_remote_host */
       #include "http_connection.h"
       #include "ap_mpm.h"
      -#include "pod.h"
       #include "mpm_common.h"
       #include "ap_listen.h"
       #include "scoreboard.h"
      @@ -122,6 +124,7 @@ static int ap_daemons_limit = 0;
       static int max_workers = 0;
       static int server_limit = 0;
       static int thread_limit = 0;
      +static int had_healthy_child = 0;
       static int dying = 0;
       static int workers_may_exit = 0;
       static int start_thread_may_exit = 0;
      @@ -156,17 +159,31 @@ typedef struct worker_retained_data {
           /*
            * idle_spawn_rate is the number of children that will be spawned on the
            * next maintenance cycle if there aren't enough idle servers.  It is
      -     * doubled up to MAX_SPAWN_RATE, and reset only when a cycle goes by
      -     * without the need to spawn.
      +     * maintained per listeners bucket, doubled up to MAX_SPAWN_RATE, and
      +     * reset only when a cycle goes by without the need to spawn.
            */
      -    int idle_spawn_rate;
      +    int *idle_spawn_rate;
       #ifndef MAX_SPAWN_RATE
       #define MAX_SPAWN_RATE        (32)
       #endif
           int hold_off_on_exponential_spawning;
      +    /*
      +     * Current number of listeners buckets and maximum reached across
      +     * restarts (to size retained data according to dynamic num_buckets,
      +     * eg. idle_spawn_rate).
      +     */
      +    int num_buckets, max_buckets;
       } worker_retained_data;
       static worker_retained_data *retained;
       
      +typedef struct worker_child_bucket {
      +    ap_pod_t *pod;
      +    ap_listen_rec *listeners;
      +    apr_proc_mutex_t *mutex;
      +} worker_child_bucket;
      +static worker_child_bucket *all_buckets, /* All listeners buckets */
      +                           *my_bucket;   /* Current child bucket */
      +
       #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
       
       /* The structure used to pass unique initialization info to each thread */
      @@ -188,8 +205,6 @@ typedef struct {
       
       #define ID_FROM_CHILD_THREAD(c, t)    ((c * thread_limit) + t)
       
      -static ap_worker_pod_t *pod;
      -
       /* The worker MPM respects a couple of runtime flags that can aid
        * in debugging. Setting the -DNO_DETACH flag will prevent the root process
        * from detaching from its controlling terminal. Additionally, setting
      @@ -217,9 +232,6 @@ static pid_t ap_my_pid; /* Linux getpid() doesn't work except in main
       static pid_t parent_pid;
       static apr_os_thread_t *listener_os_thread;
       
      -/* Locks for accept serialization */
      -static apr_proc_mutex_t *accept_mutex;
      -
       #ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
       #define SAFE_ACCEPT(stmt) (ap_listeners->next ? (stmt) : APR_SUCCESS)
       #else
      @@ -396,7 +408,7 @@ static void worker_note_child_started(int slot, pid_t pid)
       
       static void worker_note_child_lost_slot(int slot, pid_t newpid)
       {
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00263)
                        "pid %" APR_PID_T_FMT " taking over scoreboard slot from "
                        "%" APR_PID_T_FMT "%s",
                        newpid,
      @@ -457,7 +469,7 @@ static int volatile restart_pending;
        * Previously this was initiated in sig_term() and restart() signal handlers,
        * but we want to be able to start a shutdown/restart from other sources --
        * e.g. on Win32, from the service manager. Now the service manager can
      - * call ap_start_shutdown() or ap_start_restart() as appropiate.  Note that
      + * call ap_start_shutdown() or ap_start_restart() as appropriate.  Note that
        * these functions can also be called by the child processes, since global
        * variables are no longer used to pass on the required action to the parent.
        *
      @@ -522,22 +534,22 @@ static void set_signals(void)
       
           sa.sa_handler = sig_term;
           if (sigaction(SIGTERM, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00264)
                            "sigaction(SIGTERM)");
       #ifdef AP_SIG_GRACEFUL_STOP
           if (sigaction(AP_SIG_GRACEFUL_STOP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00265)
                            "sigaction(" AP_SIG_GRACEFUL_STOP_STRING ")");
       #endif
       #ifdef SIGINT
           if (sigaction(SIGINT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00266)
                            "sigaction(SIGINT)");
       #endif
       #ifdef SIGXCPU
           sa.sa_handler = SIG_DFL;
           if (sigaction(SIGXCPU, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00267)
                            "sigaction(SIGXCPU)");
       #endif
       #ifdef SIGXFSZ
      @@ -546,13 +558,13 @@ static void set_signals(void)
            * rather than terminate the process. */
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGXFSZ, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00268)
                            "sigaction(SIGXFSZ)");
       #endif
       #ifdef SIGPIPE
           sa.sa_handler = SIG_IGN;
           if (sigaction(SIGPIPE, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00269)
                            "sigaction(SIGPIPE)");
       #endif
       
      @@ -562,10 +574,10 @@ static void set_signals(void)
           sigaddset(&sa.sa_mask, AP_SIG_GRACEFUL);
           sa.sa_handler = restart;
           if (sigaction(SIGHUP, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00270)
                            "sigaction(SIGHUP)");
           if (sigaction(AP_SIG_GRACEFUL, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, APLOGNO(00271)
                            "sigaction(" AP_SIG_GRACEFUL_STRING ")");
       #else
           if (!one_process) {
      @@ -665,13 +677,13 @@ static void accept_mutex_error(const char *func, apr_status_t rv, int process_sl
           else if (requests_this_child == INT_MAX
               || ((requests_this_child == ap_max_requests_per_child)
                   && ap_max_requests_per_child)) {
      -        ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, level, rv, ap_server_conf, APLOGNO(00272)
                            "apr_proc_mutex_%s failed "
                            "before this child process served any requests.",
                            func);
               clean_child_exit(APEXIT_CHILDSICK);
           }
      -    ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
      +    ap_log_error(APLOG_MARK, level, rv, ap_server_conf, APLOGNO(00273)
                        "apr_proc_mutex_%s failed. Attempting to "
                        "shutdown process gracefully.", func);
           signal_threads(ST_GRACEFUL);
      @@ -701,7 +713,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
               clean_child_exit(APEXIT_CHILDSICK);
           }
       
      -    for (lr = ap_listeners; lr != NULL; lr = lr->next) {
      +    for (lr = my_bucket->listeners; lr != NULL; lr = lr->next) {
               apr_pollfd_t pfd = { 0 };
       
               pfd.desc_type = APR_POLL_SOCKET;
      @@ -758,7 +770,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
               /* We've already decremented the idle worker count inside
                * ap_queue_info_wait_for_idler. */
       
      -        if ((rv = SAFE_ACCEPT(apr_proc_mutex_lock(accept_mutex)))
      +        if ((rv = SAFE_ACCEPT(apr_proc_mutex_lock(my_bucket->mutex)))
                   != APR_SUCCESS) {
       
                   if (!listener_may_exit) {
      @@ -767,9 +779,9 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                   break;                    /* skip the lock release */
               }
       
      -        if (!ap_listeners->next) {
      +        if (!my_bucket->listeners->next) {
                   /* Only one listener, so skip the poll */
      -            lr = ap_listeners;
      +            lr = my_bucket->listeners;
               }
               else {
                   while (!listener_may_exit) {
      @@ -784,7 +796,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
       
                           /* apr_pollset_poll() will only return errors in catastrophic
                            * circumstances. Let's try exiting gracefully, for now. */
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, APLOGNO(03137)
                                        "apr_pollset_poll: (listen)");
                           signal_threads(ST_GRACEFUL);
                       }
      @@ -839,7 +851,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                       resource_shortage = 1;
                       signal_threads(ST_GRACEFUL);
                   }
      -            if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(accept_mutex)))
      +            if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(my_bucket->mutex)))
                       != APR_SUCCESS) {
       
                       if (listener_may_exit) {
      @@ -854,7 +866,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                            * socket to a worker
                            */
                           apr_socket_close(csd);
      -                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(03138)
                                        "ap_queue_push failed");
                       }
                       else {
      @@ -863,7 +875,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                   }
               }
               else {
      -            if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(accept_mutex)))
      +            if ((rv = SAFE_ACCEPT(apr_proc_mutex_unlock(my_bucket->mutex)))
                       != APR_SUCCESS) {
                       int level = APLOG_EMERG;
       
      @@ -871,7 +883,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
                           ap_scoreboard_image->global->running_generation) {
                           level = APLOG_DEBUG; /* common to get these at restart time */
                       }
      -                ap_log_error(APLOG_MARK, level, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, level, rv, ap_server_conf, APLOGNO(00274)
                                    "apr_proc_mutex_unlock failed. Attempting to "
                                    "shutdown process gracefully.");
                       signal_threads(ST_GRACEFUL);
      @@ -880,7 +892,7 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t *thd, void * dummy)
               }
           }
       
      -    ap_close_listeners();
      +    ap_close_listeners_ex(my_bucket->listeners);
           ap_queue_term(worker_queue);
           dying = 1;
           ap_scoreboard_image->parent[process_slot].quiescing = 1;
      @@ -916,7 +928,8 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy)
           ap_scoreboard_image->servers[process_slot][thread_slot].pid = ap_my_pid;
           ap_scoreboard_image->servers[process_slot][thread_slot].tid = apr_os_thread_current();
           ap_scoreboard_image->servers[process_slot][thread_slot].generation = retained->my_generation;
      -    ap_update_child_status_from_indexes(process_slot, thread_slot, SERVER_STARTING, NULL);
      +    ap_update_child_status_from_indexes(process_slot, thread_slot,
      +                                        SERVER_STARTING, NULL);
       
       #ifdef HAVE_PTHREAD_KILL
           unblock_signal(WORKER_SIGNAL);
      @@ -937,7 +950,8 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy)
                   is_idle = 1;
               }
       
      -        ap_update_child_status_from_indexes(process_slot, thread_slot, SERVER_READY, NULL);
      +        ap_update_child_status_from_indexes(process_slot, thread_slot,
      +                                            SERVER_READY, NULL);
       worker_pop:
               if (workers_may_exit) {
                   break;
      @@ -967,7 +981,7 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy)
                   }
                   /* We got some other error. */
                   else if (!workers_may_exit) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(03139)
                                    "ap_queue_pop failed");
                   }
                   continue;
      @@ -983,7 +997,8 @@ static void * APR_THREAD_FUNC worker_thread(apr_thread_t *thd, void * dummy)
           }
       
           ap_update_child_status_from_indexes(process_slot, thread_slot,
      -        (dying) ? SERVER_DEAD : SERVER_GRACEFUL, (request_rec *) NULL);
      +                                        dying ? SERVER_DEAD
      +                                              : SERVER_GRACEFUL, NULL);
       
           apr_thread_exit(thd, APR_SUCCESS);
           return NULL;
      @@ -1013,7 +1028,7 @@ static void create_listener_thread(thread_starter *ts)
           rv = apr_thread_create(&ts->listener, thread_attr, listener_thread,
                                  my_info, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00275)
                            "apr_thread_create: unable to create listener thread");
               /* let the parent decide how bad this really is */
               clean_child_exit(APEXIT_CHILDSICK);
      @@ -1031,8 +1046,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
           thread_starter *ts = dummy;
           apr_thread_t **threads = ts->threads;
           apr_threadattr_t *thread_attr = ts->threadattr;
      -    int child_num_arg = ts->child_num_arg;
      -    int my_child_num = child_num_arg;
      +    int my_child_num = ts->child_num_arg;
           proc_info *my_info;
           apr_status_t rv;
           int i;
      @@ -1046,7 +1060,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
           worker_queue = apr_pcalloc(pchild, sizeof(*worker_queue));
           rv = ap_queue_init(worker_queue, threads_per_child, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(03140)
                            "ap_queue_init() failed");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1054,7 +1068,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
           rv = ap_queue_info_create(&worker_queue_info, pchild,
                                     threads_per_child);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(03141)
                            "ap_queue_info_create() failed");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1066,7 +1080,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
           while (1) {
               /* threads_per_child does not include the listener thread */
               for (i = 0; i < threads_per_child; i++) {
      -            int status = ap_scoreboard_image->servers[child_num_arg][i].status;
      +            int status = ap_scoreboard_image->servers[my_child_num][i].status;
       
                   if (status != SERVER_GRACEFUL && status != SERVER_DEAD) {
                       continue;
      @@ -1086,8 +1100,8 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
                   rv = apr_thread_create(&threads[i], thread_attr,
                                          worker_thread, my_info, pchild);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      -                    "apr_thread_create: unable to create worker thread");
      +                ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(03142)
      +                             "apr_thread_create: unable to create worker thread");
                       /* let the parent decide how bad this really is */
                       clean_child_exit(APEXIT_CHILDSICK);
                   }
      @@ -1129,7 +1143,8 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy)
           return NULL;
       }
       
      -static void join_workers(apr_thread_t *listener, apr_thread_t **threads)
      +static void join_workers(apr_thread_t *listener, apr_thread_t **threads,
      +                         int mode)
       {
           int i;
           apr_status_t rv, thread_rv;
      @@ -1159,13 +1174,13 @@ static void join_workers(apr_thread_t *listener, apr_thread_t **threads)
                   ++iter;
               }
               if (iter >= 10) {
      -            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00276)
                                "the listener thread didn't exit");
               }
               else {
                   rv = apr_thread_join(&thread_rv, listener);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00277)
                                    "apr_thread_join: unable to join listener thread");
                   }
               }
      @@ -1173,16 +1188,18 @@ static void join_workers(apr_thread_t *listener, apr_thread_t **threads)
       
           for (i = 0; i < threads_per_child; i++) {
               if (threads[i]) { /* if we ever created this thread */
      +            if (mode != ST_GRACEFUL) {
       #ifdef HAVE_PTHREAD_KILL
      -            apr_os_thread_t *worker_os_thread;
      +                apr_os_thread_t *worker_os_thread;
       
      -            apr_os_thread_get(&worker_os_thread, threads[i]);
      -            pthread_kill(*worker_os_thread, WORKER_SIGNAL);
      +                apr_os_thread_get(&worker_os_thread, threads[i]);
      +                pthread_kill(*worker_os_thread, WORKER_SIGNAL);
       #endif
      +            }
       
                   rv = apr_thread_join(&thread_rv, threads[i]);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00278)
                                    "apr_thread_join: unable to join worker "
                                    "thread %d",
                                    i);
      @@ -1201,19 +1218,20 @@ static void join_start_thread(apr_thread_t *start_thread_id)
                                       */
           rv = apr_thread_join(&thread_rv, start_thread_id);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00279)
                            "apr_thread_join: unable to join the start "
                            "thread");
           }
       }
       
      -static void child_main(int child_num_arg)
      +static void child_main(int child_num_arg, int child_bucket)
       {
           apr_thread_t **threads;
           apr_status_t rv;
           thread_starter *ts;
           apr_threadattr_t *thread_attr;
           apr_thread_t *start_thread_id;
      +    int i;
       
           mpm_state = AP_MPMQ_STARTING; /* for benefit of any hooks that run as this
                                          * child initializes
      @@ -1222,14 +1240,22 @@ static void child_main(int child_num_arg)
           ap_fatal_signal_child_setup(ap_server_conf);
           apr_pool_create(&pchild, pconf);
       
      +    /* close unused listeners and pods */
      +    for (i = 0; i < retained->num_buckets; i++) {
      +        if (i != child_bucket) {
      +            ap_close_listeners_ex(all_buckets[i].listeners);
      +            ap_mpm_podx_close(all_buckets[i].pod);
      +        }
      +    }
      +
           /*stuff to do before we switch id's, so we have permissions.*/
           ap_reopen_scoreboard(pchild, NULL, 0);
       
      -    rv = SAFE_ACCEPT(apr_proc_mutex_child_init(&accept_mutex,
      -                                               apr_proc_mutex_lockfile(accept_mutex),
      -                                               pchild));
      +    rv = SAFE_ACCEPT(apr_proc_mutex_child_init(&my_bucket->mutex,
      +                                    apr_proc_mutex_lockfile(my_bucket->mutex),
      +                                    pchild));
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(00280)
                            "Couldn't initialize cross-process lock in child");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1248,7 +1274,7 @@ static void child_main(int child_num_arg)
            */
           rv = apr_setup_signal_thread();
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_EMERG, rv, ap_server_conf, APLOGNO(00281)
                            "Couldn't initialize signal thread");
               clean_child_exit(APEXIT_CHILDFATAL);
           }
      @@ -1275,7 +1301,13 @@ static void child_main(int child_num_arg)
           apr_threadattr_detach_set(thread_attr, 0);
       
           if (ap_thread_stacksize != 0) {
      -        apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
      +        rv = apr_threadattr_stacksize_set(thread_attr, ap_thread_stacksize);
      +        if (rv != APR_SUCCESS && rv != APR_ENOTIMPL) {
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02435)
      +                         "WARNING: ThreadStackSize of %" APR_SIZE_T_FMT " is "
      +                         "inappropriate, using default", 
      +                         ap_thread_stacksize);
      +        }
           }
       
           ts->threads = threads;
      @@ -1286,7 +1318,7 @@ static void child_main(int child_num_arg)
           rv = apr_thread_create(&start_thread_id, thread_attr, start_threads,
                                  ts, pchild);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, rv, ap_server_conf, APLOGNO(00282)
                            "apr_thread_create: unable to create worker thread");
               /* let the parent decide how bad this really is */
               clean_child_exit(APEXIT_CHILDSICK);
      @@ -1318,7 +1350,7 @@ static void child_main(int child_num_arg)
                *   If the worker hasn't exited, then this blocks until
                *   they have (then cleans up).
                */
      -        join_workers(ts->listener, threads);
      +        join_workers(ts->listener, threads, ST_UNGRACEFUL);
           }
           else { /* !one_process */
               /* remove SIGTERM from the set of blocked signals...  if one of
      @@ -1329,24 +1361,24 @@ static void child_main(int child_num_arg)
               apr_signal(SIGTERM, dummy_signal_handler);
               /* Watch for any messages from the parent over the POD */
               while (1) {
      -            rv = ap_worker_pod_check(pod);
      -            if (rv == AP_NORESTART) {
      +            rv = ap_mpm_podx_check(my_bucket->pod);
      +            if (rv == AP_MPM_PODX_NORESTART) {
                       /* see if termination was triggered while we slept */
                       switch(terminate_mode) {
                       case ST_GRACEFUL:
      -                    rv = AP_GRACEFUL;
      +                    rv = AP_MPM_PODX_GRACEFUL;
                           break;
                       case ST_UNGRACEFUL:
      -                    rv = AP_RESTART;
      +                    rv = AP_MPM_PODX_RESTART;
                           break;
                       }
                   }
      -            if (rv == AP_GRACEFUL || rv == AP_RESTART) {
      +            if (rv == AP_MPM_PODX_GRACEFUL || rv == AP_MPM_PODX_RESTART) {
                       /* make sure the start thread has finished;
                        * signal_threads() and join_workers depend on that
                        */
                       join_start_thread(start_thread_id);
      -                signal_threads(rv == AP_GRACEFUL ? ST_GRACEFUL : ST_UNGRACEFUL);
      +                signal_threads(rv == AP_MPM_PODX_GRACEFUL ? ST_GRACEFUL : ST_UNGRACEFUL);
                       break;
                   }
               }
      @@ -1358,7 +1390,8 @@ static void child_main(int child_num_arg)
                *   If the worker hasn't exited, then this blocks until
                *   they have (then cleans up).
                */
      -        join_workers(ts->listener, threads);
      +        join_workers(ts->listener, threads,
      +                     rv == AP_MPM_PODX_GRACEFUL ? ST_GRACEFUL : ST_UNGRACEFUL);
           }
       
           free(threads);
      @@ -1366,7 +1399,7 @@ static void child_main(int child_num_arg)
           clean_child_exit(resource_shortage ? APEXIT_CHILDSICK : 0);
       }
       
      -static int make_child(server_rec *s, int slot)
      +static int make_child(server_rec *s, int slot, int bucket)
       {
           int pid;
       
      @@ -1375,14 +1408,18 @@ static int make_child(server_rec *s, int slot)
           }
       
           if (one_process) {
      +        my_bucket = &all_buckets[0];
      +
               set_signals();
               worker_note_child_started(slot, getpid());
      -        child_main(slot);
      +        child_main(slot, 0);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return -1;
           }
       
           if ((pid = fork()) == -1) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, errno, s, APLOGNO(00283)
                            "fork: Unable to fork new process");
               /* fork didn't succeed.  There's no need to touch the scoreboard;
                * if we were trying to replace a failed child process, then
      @@ -1400,6 +1437,8 @@ static int make_child(server_rec *s, int slot)
           }
       
           if (!pid) {
      +        my_bucket = &all_buckets[bucket];
      +
       #ifdef HAVE_BINDPROCESSOR
               /* By default, AIX binds to a single processor.  This bit unbinds
                * children which will then bind to another CPU.
      @@ -1408,16 +1447,18 @@ static int make_child(server_rec *s, int slot)
                                      PROCESSOR_CLASS_ANY);
               if (status != OK)
                   ap_log_error(APLOG_MARK, APLOG_DEBUG, errno,
      -                         ap_server_conf,
      +                         ap_server_conf, APLOGNO(00284)
                                "processor unbind failed");
       #endif
               RAISE_SIGSTOP(MAKE_CHILD);
       
               apr_signal(SIGTERM, just_die);
      -        child_main(slot);
      +        child_main(slot, bucket);
               /* NOTREACHED */
      +        ap_assert(0);
      +        return -1;
           }
      -    /* else */
      +
           if (ap_scoreboard_image->parent[slot].pid != 0) {
               /* This new child process is squatting on the scoreboard
                * entry owned by an exiting child process, which cannot
      @@ -1426,6 +1467,7 @@ static int make_child(server_rec *s, int slot)
               worker_note_child_lost_slot(slot, pid);
           }
           ap_scoreboard_image->parent[slot].quiescing = 0;
      +    ap_scoreboard_image->parent[slot].bucket = bucket;
           worker_note_child_started(slot, pid);
           return 0;
       }
      @@ -1439,14 +1481,14 @@ static void startup_children(int number_to_start)
               if (ap_scoreboard_image->parent[i].pid != 0) {
                   continue;
               }
      -        if (make_child(ap_server_conf, i) < 0) {
      +        if (make_child(ap_server_conf, i, i % retained->num_buckets) < 0) {
                   break;
               }
               --number_to_start;
           }
       }
       
      -static void perform_idle_server_maintenance(void)
      +static void perform_idle_server_maintenance(int child_bucket, int num_buckets)
       {
           int i, j;
           int idle_thread_count;
      @@ -1473,12 +1515,15 @@ static void perform_idle_server_maintenance(void)
               int any_dying_threads = 0;
               int any_dead_threads = 0;
               int all_dead_threads = 1;
      +        int child_threads_active = 0;
       
      -        if (i >= retained->max_daemons_limit && totally_free_length == retained->idle_spawn_rate)
      +        if (i >= retained->max_daemons_limit &&
      +            totally_free_length == retained->idle_spawn_rate[child_bucket]) {
                   /* short cut if all active processes have been examined and
                    * enough empty scoreboard slots have been found
                    */
                   break;
      +        }
               ps = &ap_scoreboard_image->parent[i];
               for (j = 0; j < threads_per_child; j++) {
                   ws = &ap_scoreboard_image->servers[i][j];
      @@ -1502,16 +1547,19 @@ static void perform_idle_server_maintenance(void)
                                          loop if no pid?  not much else matters */
                       if (status <= SERVER_READY &&
                               !ps->quiescing &&
      -                        ps->generation == retained->my_generation) {
      +                        ps->generation == retained->my_generation &&
      +                        ps->bucket == child_bucket) {
                           ++idle_thread_count;
                       }
                       if (status >= SERVER_READY && status < SERVER_GRACEFUL) {
      -                    ++active_thread_count;
      +                    ++child_threads_active;
                       }
                   }
               }
      -        if (any_dead_threads && totally_free_length < retained->idle_spawn_rate
      -                && free_length < MAX_SPAWN_RATE
      +        active_thread_count += child_threads_active;
      +        if (any_dead_threads
      +                && totally_free_length < retained->idle_spawn_rate[child_bucket]
      +                && free_length < MAX_SPAWN_RATE / num_buckets
                       && (!ps->pid               /* no process in the slot */
                           || ps->quiescing)) {   /* or at least one is going away */
                   if (all_dead_threads) {
      @@ -1532,6 +1580,9 @@ static void perform_idle_server_maintenance(void)
                   }
                   ++free_length;
               }
      +        else if (child_threads_active == threads_per_child) {
      +            had_healthy_child = 1;
      +        }
               /* XXX if (!ps->quiescing)     is probably more reliable  GLA */
               if (!any_dying_threads) {
                   last_non_dead = i;
      @@ -1540,21 +1591,23 @@ static void perform_idle_server_maintenance(void)
           }
       
           if (retained->sick_child_detected) {
      -        if (active_thread_count > 0) {
      -            /* some child processes appear to be working.  don't kill the
      -             * whole server.
      +        if (had_healthy_child) {
      +            /* Assume this is a transient error, even though it may not be.  Leave
      +             * the server up in case it is able to serve some requests or the
      +             * problem will be resolved.
                    */
                   retained->sick_child_detected = 0;
               }
               else {
      -            /* looks like a basket case.  give up.
      +            /* looks like a basket case, as no child ever fully initialized; give up.
                    */
                   shutdown_pending = 1;
                   child_fatal = 1;
                   ap_log_error(APLOG_MARK, APLOG_ALERT, 0,
      -                         ap_server_conf,
      -                         "No active workers found..."
      -                         " Apache is exiting!");
      +                         ap_server_conf, APLOGNO(02325)
      +                         "A resource shortage or other unrecoverable failure "
      +                         "was encountered before any child process initialized "
      +                         "successfully... httpd is exiting!");
                   /* the child already logged the failure details */
                   return;
               }
      @@ -1562,12 +1615,13 @@ static void perform_idle_server_maintenance(void)
       
           retained->max_daemons_limit = last_non_dead + 1;
       
      -    if (idle_thread_count > max_spare_threads) {
      +    if (idle_thread_count > max_spare_threads / num_buckets) {
               /* Kill off one child */
      -        ap_worker_pod_signal(pod, TRUE);
      -        retained->idle_spawn_rate = 1;
      +        ap_mpm_podx_signal(all_buckets[child_bucket].pod,
      +                           AP_MPM_PODX_GRACEFUL);
      +        retained->idle_spawn_rate[child_bucket] = 1;
           }
      -    else if (idle_thread_count < min_spare_threads) {
      +    else if (idle_thread_count < min_spare_threads / num_buckets) {
               /* terminate the free list */
               if (free_length == 0) { /* scoreboard is full, can't fork */
       
      @@ -1577,7 +1631,7 @@ static void perform_idle_server_maintenance(void)
                       if (0 == idle_thread_count) {
                           if (!retained->maxclients_reported) {
                               /* only report this condition once */
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00286)
                                            "server reached MaxRequestWorkers "
                                            "setting, consider raising the "
                                            "MaxRequestWorkers setting");
      @@ -1585,7 +1639,7 @@ static void perform_idle_server_maintenance(void)
                           }
                       } else {
                           if (!retained->near_maxclients_reported) {
      -                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf,
      +                        ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00287)
                                            "server is within MinSpareThreads of "
                                            "MaxRequestWorkers, consider raising the "
                                            "MaxRequestWorkers setting");
      @@ -1595,18 +1649,18 @@ static void perform_idle_server_maintenance(void)
                   }
                   else {
                       ap_log_error(APLOG_MARK, APLOG_ERR, 0,
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00288)
                                    "scoreboard is full, not at MaxRequestWorkers");
                   }
      -            retained->idle_spawn_rate = 1;
      +            retained->idle_spawn_rate[child_bucket] = 1;
               }
               else {
      -            if (free_length > retained->idle_spawn_rate) {
      -                free_length = retained->idle_spawn_rate;
      +            if (free_length > retained->idle_spawn_rate[child_bucket]) {
      +                free_length = retained->idle_spawn_rate[child_bucket];
                   }
      -            if (retained->idle_spawn_rate >= 8) {
      +            if (retained->idle_spawn_rate[child_bucket] >= 8) {
                       ap_log_error(APLOG_MARK, APLOG_INFO, 0,
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00289)
                                    "server seems busy, (you may need "
                                    "to increase StartServers, ThreadsPerChild "
                                    "or Min/MaxSpareThreads), "
      @@ -1615,7 +1669,7 @@ static void perform_idle_server_maintenance(void)
                                    idle_thread_count, total_non_dead);
                   }
                   for (i = 0; i < free_length; ++i) {
      -                make_child(ap_server_conf, free_slots[i]);
      +                make_child(ap_server_conf, free_slots[i], child_bucket);
                   }
                   /* the next time around we want to spawn twice as many if this
                    * wasn't good enough, but not if we've just done a graceful
      @@ -1623,17 +1677,18 @@ static void perform_idle_server_maintenance(void)
                   if (retained->hold_off_on_exponential_spawning) {
                       --retained->hold_off_on_exponential_spawning;
                   }
      -            else if (retained->idle_spawn_rate < MAX_SPAWN_RATE) {
      -                retained->idle_spawn_rate *= 2;
      +            else if (retained->idle_spawn_rate[child_bucket]
      +                     < MAX_SPAWN_RATE / num_buckets) {
      +                retained->idle_spawn_rate[child_bucket] *= 2;
                   }
               }
           }
           else {
      -      retained->idle_spawn_rate = 1;
      +        retained->idle_spawn_rate[child_bucket] = 1;
           }
       }
       
      -static void server_main_loop(int remaining_children_to_start)
      +static void server_main_loop(int remaining_children_to_start, int num_buckets)
       {
           ap_generation_t old_gen;
           int child_slot;
      @@ -1662,7 +1717,7 @@ static void server_main_loop(int remaining_children_to_start)
                           return;
                       }
                       else {
      -                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf,
      +                    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, APLOGNO(00290)
                                        "Ignoring fatal error in child of previous "
                                        "generation (pid %ld).",
                                        (long)pid.pid);
      @@ -1677,28 +1732,38 @@ static void server_main_loop(int remaining_children_to_start)
                   }
                   /* non-fatal death... note that it's gone in the scoreboard. */
                   if (child_slot >= 0) {
      +                process_score *ps;
      +
                       for (i = 0; i < threads_per_child; i++)
      -                    ap_update_child_status_from_indexes(child_slot, i, SERVER_DEAD,
      -                                                        (request_rec *) NULL);
      +                    ap_update_child_status_from_indexes(child_slot, i,
      +                                                        SERVER_DEAD, NULL);
       
                       worker_note_child_killed(child_slot, 0, 0);
      -                ap_scoreboard_image->parent[child_slot].quiescing = 0;
      +                ps = &ap_scoreboard_image->parent[child_slot];
      +                ps->quiescing = 0;
                       if (processed_status == APEXIT_CHILDSICK) {
                           /* resource shortage, minimize the fork rate */
      -                    retained->idle_spawn_rate = 1;
      +                    retained->idle_spawn_rate[ps->bucket] = 1;
                       }
                       else if (remaining_children_to_start
                           && child_slot < ap_daemons_limit) {
                           /* we're still doing a 1-for-1 replacement of dead
                            * children with new children
                            */
      -                    make_child(ap_server_conf, child_slot);
      +                    make_child(ap_server_conf, child_slot, ps->bucket);
                           --remaining_children_to_start;
                       }
                   }
                   else if (ap_unregister_extra_mpm_process(pid.pid, &old_gen) == 1) {
                       worker_note_child_killed(-1, /* already out of the scoreboard */
                                                pid.pid, old_gen);
      +                if (processed_status == APEXIT_CHILDSICK
      +                    && old_gen == retained->my_generation) {
      +                    /* resource shortage, minimize the fork rate */
      +                    for (i = 0; i < num_buckets; i++) {
      +                        retained->idle_spawn_rate[i] = 1;
      +                    }
      +                }
       #if APR_HAS_OTHER_CHILD
                   }
                   else if (apr_proc_other_child_alert(&pid, APR_OC_REASON_DEATH,
      @@ -1711,7 +1776,7 @@ static void server_main_loop(int remaining_children_to_start)
                        * scoreboard.  Somehow we don't know about this child.
                        */
                       ap_log_error(APLOG_MARK, APLOG_WARNING, 0,
      -                             ap_server_conf,
      +                             ap_server_conf, APLOGNO(00291)
                                    "long lost child came home! (pid %ld)",
                                    (long)pid.pid);
                   }
      @@ -1736,29 +1801,24 @@ static void server_main_loop(int remaining_children_to_start)
                   continue;
               }
       
      -        perform_idle_server_maintenance();
      +        for (i = 0; i < num_buckets; i++) {
      +            perform_idle_server_maintenance(i, num_buckets);
      +        }
           }
       }
       
       static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       {
      +    int num_buckets = retained->num_buckets;
           int remaining_children_to_start;
      -    apr_status_t rv;
      +    int i;
       
           ap_log_pid(pconf, ap_pid_fname);
       
      -    /* Initialize cross-process accept lock */
      -    rv = ap_proc_mutex_create(&accept_mutex, NULL, AP_ACCEPT_MUTEX_TYPE, NULL,
      -                              s, _pconf, 0);
      -    if (rv != APR_SUCCESS) {
      -        mpm_state = AP_MPMQ_STOPPING;
      -        return DONE;
      -    }
      -
           if (!retained->is_graceful) {
               if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) {
                   mpm_state = AP_MPMQ_STOPPING;
      -            return DONE;
      +            return !OK;
               }
               /* fix the generation number in the global score; we just got a new,
                * cleared scoreboard
      @@ -1768,9 +1828,24 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
           restart_pending = shutdown_pending = 0;
           set_signals();
      -    /* Don't thrash... */
      -    if (max_spare_threads < min_spare_threads + threads_per_child)
      -        max_spare_threads = min_spare_threads + threads_per_child;
      +
      +    /* Don't thrash since num_buckets depends on the
      +     * system and the number of online CPU cores...
      +     */
      +    if (ap_daemons_limit < num_buckets)
      +        ap_daemons_limit = num_buckets;
      +    if (ap_daemons_to_start < num_buckets)
      +        ap_daemons_to_start = num_buckets;
      +    /* We want to create as much children at a time as the number of buckets,
      +     * so to optimally accept connections (evenly distributed across buckets).
      +     * Thus min_spare_threads should at least maintain num_buckets children,
      +     * and max_spare_threads allow num_buckets more children w/o triggering
      +     * immediately (e.g. num_buckets idle threads margin, one per bucket).
      +     */
      +    if (min_spare_threads < threads_per_child * (num_buckets - 1) + num_buckets)
      +        min_spare_threads = threads_per_child * (num_buckets - 1) + num_buckets;
      +    if (max_spare_threads < min_spare_threads + (threads_per_child + 1) * num_buckets)
      +        max_spare_threads = min_spare_threads + (threads_per_child + 1) * num_buckets;
       
           /* If we're doing a graceful_restart then we're going to see a lot
            * of children exiting immediately when we get into the main loop
      @@ -1795,26 +1870,32 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
               retained->hold_off_on_exponential_spawning = 10;
           }
       
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00292)
                       "%s configured -- resuming normal operations",
                       ap_get_server_description());
      -    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf,
      +    ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, APLOGNO(00293)
                       "Server built: %s", ap_get_server_built());
           ap_log_command_line(plog, s);
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf,
      +    ap_log_mpm_common(s);
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(00294)
                       "Accept mutex: %s (default: %s)",
      -                apr_proc_mutex_name(accept_mutex),
      +                (all_buckets[0].mutex)
      +                    ? apr_proc_mutex_name(all_buckets[0].mutex)
      +                    : "none",
                       apr_proc_mutex_defname());
           mpm_state = AP_MPMQ_RUNNING;
       
      -    server_main_loop(remaining_children_to_start);
      +    server_main_loop(remaining_children_to_start, num_buckets);
           mpm_state = AP_MPMQ_STOPPING;
       
           if (shutdown_pending && !retained->is_graceful) {
               /* Time to shut down:
                * Kill child processes, tell them to call child_exit, etc...
                */
      -        ap_worker_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, ap_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
               ap_reclaim_child_processes(1, /* Start with SIGTERM */
                                          worker_note_child_killed);
       
      @@ -1822,7 +1903,7 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                   /* cleanup pid file on normal shutdown */
                   ap_remove_pid(pconf, ap_pid_fname);
                   ap_log_error(APLOG_MARK, APLOG_NOTICE, 0,
      -                         ap_server_conf, "caught SIGTERM, shutting down");
      +                         ap_server_conf, APLOGNO(00295) "caught SIGTERM, shutting down");
               }
               return DONE;
           } else if (shutdown_pending) {
      @@ -1835,13 +1916,17 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
       
               /* Close our listeners, and then ask our children to do same */
               ap_close_listeners();
      -        ap_worker_pod_killpg(pod, ap_daemons_limit, TRUE);
      +
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, ap_daemons_limit,
      +                               AP_MPM_PODX_GRACEFUL);
      +        }
               ap_relieve_child_processes(worker_note_child_killed);
       
               if (!child_fatal) {
                   /* cleanup pid file on normal shutdown */
                   ap_remove_pid(pconf, ap_pid_fname);
      -            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00296)
                                "caught " AP_SIG_GRACEFUL_STOP_STRING
                                ", shutting down gracefully");
               }
      @@ -1875,7 +1960,10 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                * way, try and make sure that all of our processes are
                * really dead.
                */
      -        ap_worker_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, ap_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
               ap_reclaim_child_processes(1, worker_note_child_killed);
       
               return DONE;
      @@ -1897,11 +1985,13 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
           ap_scoreboard_image->global->running_generation = retained->my_generation;
       
           if (retained->is_graceful) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00297)
                            AP_SIG_GRACEFUL_STRING " received.  Doing graceful restart");
               /* wake up the children...time to die.  But we'll have more soon */
      -        ap_worker_pod_killpg(pod, ap_daemons_limit, TRUE);
      -
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, ap_daemons_limit,
      +                               AP_MPM_PODX_GRACEFUL);
      +        }
       
               /* This is mostly for debugging... so that we know what is still
                * gracefully dealing with existing request.
      @@ -1913,11 +2003,14 @@ static int worker_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s)
                * and a SIGHUP, we may as well use the same signal, because some user
                * pthreads are stealing signals from us left and right.
                */
      -        ap_worker_pod_killpg(pod, ap_daemons_limit, FALSE);
      +        for (i = 0; i < num_buckets; i++) {
      +            ap_mpm_podx_killpg(all_buckets[i].pod, ap_daemons_limit,
      +                               AP_MPM_PODX_RESTART);
      +        }
       
               ap_reclaim_child_processes(1, /* Start with SIGTERM */
                                          worker_note_child_killed);
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, APLOGNO(00298)
                           "SIGHUP received.  Attempting to restart");
           }
       
      @@ -1931,7 +2024,11 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
       {
           int startup = 0;
           int level_flags = 0;
      +    int num_buckets = 0;
      +    ap_listen_rec **listen_buckets;
           apr_status_t rv;
      +    char id[16];
      +    int i;
       
           pconf = p;
       
      @@ -1945,17 +2042,75 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
               ap_log_error(APLOG_MARK, APLOG_ALERT | level_flags, 0,
                            (startup ? NULL : s),
                            "no listening sockets available, shutting down");
      -        return DONE;
      +        return !OK;
           }
       
      -    if (!one_process) {
      -        if ((rv = ap_worker_pod_open(pconf, &pod))) {
      +    if (one_process) {
      +        num_buckets = 1;
      +    }
      +    else if (retained->is_graceful) {
      +        /* Preserve the number of buckets on graceful restarts. */
      +        num_buckets = retained->num_buckets;
      +    }
      +    if ((rv = ap_duplicate_listeners(pconf, ap_server_conf,
      +                                     &listen_buckets, &num_buckets))) {
      +        ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
      +                     (startup ? NULL : s),
      +                     "could not duplicate listeners");
      +        return !OK;
      +    }
      +
      +    all_buckets = apr_pcalloc(pconf, num_buckets * sizeof(*all_buckets));
      +    for (i = 0; i < num_buckets; i++) {
      +        if (!one_process && /* no POD in one_process mode */
      +                (rv = ap_mpm_podx_open(pconf, &all_buckets[i].pod))) {
                   ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
                                (startup ? NULL : s),
                                "could not open pipe-of-death");
      -            return DONE;
      +            return !OK;
               }
      +        /* Initialize cross-process accept lock (safe accept needed only) */
      +        if ((rv = SAFE_ACCEPT((apr_snprintf(id, sizeof id, "%i", i),
      +                               ap_proc_mutex_create(&all_buckets[i].mutex,
      +                                                    NULL, AP_ACCEPT_MUTEX_TYPE,
      +                                                    id, s, pconf, 0))))) {
      +            ap_log_error(APLOG_MARK, APLOG_CRIT | level_flags, rv,
      +                         (startup ? NULL : s),
      +                         "could not create accept mutex");
      +            return !OK;
      +        }
      +        all_buckets[i].listeners = listen_buckets[i];
           }
      +
      +    if (retained->max_buckets < num_buckets) {
      +        int new_max, *new_ptr;
      +        new_max = retained->max_buckets * 2;
      +        if (new_max < num_buckets) {
      +            new_max = num_buckets;
      +        }
      +        new_ptr = (int *)apr_palloc(ap_pglobal, new_max * sizeof(int));
      +        memcpy(new_ptr, retained->idle_spawn_rate,
      +               retained->num_buckets * sizeof(int));
      +        retained->idle_spawn_rate = new_ptr;
      +        retained->max_buckets = new_max;
      +    }
      +    if (retained->num_buckets < num_buckets) {
      +        int rate_max = 1;
      +        /* If new buckets are added, set their idle spawn rate to
      +         * the highest so far, so that they get filled as quickly
      +         * as the existing ones.
      +         */
      +        for (i = 0; i < retained->num_buckets; i++) {
      +            if (rate_max < retained->idle_spawn_rate[i]) {
      +                rate_max = retained->idle_spawn_rate[i];
      +            }
      +        }
      +        for (/* up to date i */; i < num_buckets; i++) {
      +            retained->idle_spawn_rate[i] = rate_max;
      +        }
      +    }
      +    retained->num_buckets = num_buckets;
      +
           return OK;
       }
       
      @@ -1987,7 +2142,6 @@ static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
           if (!retained) {
               retained = ap_retained_data_create(userdata_key, sizeof(*retained));
               retained->max_daemons_limit = -1;
      -        retained->idle_spawn_rate = 1;
           }
           ++retained->module_loads;
           if (retained->module_loads == 2) {
      @@ -1997,7 +2151,7 @@ static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
                   rv = apr_proc_detach(no_detach ? APR_PROC_DETACH_FOREGROUND
                                                  : APR_PROC_DETACH_DAEMONIZE);
                   if (rv != APR_SUCCESS) {
      -                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
      +                ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL, APLOGNO(00299)
                                    "apr_proc_detach failed");
                       return HTTP_INTERNAL_SERVER_ERROR;
                   }
      @@ -2015,6 +2169,7 @@ static int worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
           ap_daemons_limit = server_limit;
           threads_per_child = DEFAULT_THREADS_PER_CHILD;
           max_workers = ap_daemons_limit * threads_per_child;
      +    had_healthy_child = 0;
           ap_extended_status = 0;
       
           return OK;
      @@ -2032,14 +2187,12 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (server_limit > MAX_SERVER_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00300)
                                "WARNING: ServerLimit of %d exceeds compile-time "
      -                         "limit of", server_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d servers, decreasing to %d.",
      -                         MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
      +                         "limit of %d servers, decreasing to %d.",
      +                         server_limit, MAX_SERVER_LIMIT, MAX_SERVER_LIMIT);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00301)
                                "ServerLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                server_limit, MAX_SERVER_LIMIT);
      @@ -2048,11 +2201,11 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00302)
                                "WARNING: ServerLimit of %d not allowed, "
                                "increasing to 1.", server_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00303)
                                "ServerLimit of %d not allowed, increasing to 1",
                                server_limit);
               }
      @@ -2067,7 +2220,7 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (server_limit != retained->first_server_limit) {
               /* don't need a startup console version here */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00304)
                            "changing ServerLimit to %d from original value of %d "
                            "not allowed during restart",
                            server_limit, retained->first_server_limit);
      @@ -2076,14 +2229,12 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (thread_limit > MAX_THREAD_LIMIT) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00305)
                                "WARNING: ThreadLimit of %d exceeds compile-time "
      -                         "limit of", thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
      +                         "limit of %d threads, decreasing to %d.",
      +                         thread_limit, MAX_THREAD_LIMIT, MAX_THREAD_LIMIT);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00306)
                                "ThreadLimit of %d exceeds compile-time limit "
                                "of %d, decreasing to match",
                                thread_limit, MAX_THREAD_LIMIT);
      @@ -2092,11 +2243,11 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (thread_limit < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00307)
                                "WARNING: ThreadLimit of %d not allowed, "
                                "increasing to 1.", thread_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00308)
                                "ThreadLimit of %d not allowed, increasing to 1",
                                thread_limit);
               }
      @@ -2111,7 +2262,7 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (thread_limit != retained->first_thread_limit) {
               /* don't need a startup console version here */
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00309)
                            "changing ThreadLimit to %d from original value of %d "
                            "not allowed during restart",
                            thread_limit, retained->first_thread_limit);
      @@ -2120,17 +2271,13 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (threads_per_child > thread_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00310)
                                "WARNING: ThreadsPerChild of %d exceeds ThreadLimit "
      -                         "of", threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d threads, decreasing to %d.",
      -                         thread_limit, thread_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ThreadLimit "
      -                         "directive.");
      +                         "of %d threads, decreasing to %d. "
      +                         "To increase, please see the ThreadLimit directive.",
      +                         threads_per_child, thread_limit, thread_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00311)
                                "ThreadsPerChild of %d exceeds ThreadLimit "
                                "of %d, decreasing to match",
                                threads_per_child, thread_limit);
      @@ -2139,11 +2286,11 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
           else if (threads_per_child < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00312)
                                "WARNING: ThreadsPerChild of %d not allowed, "
                                "increasing to 1.", threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00313)
                                "ThreadsPerChild of %d not allowed, increasing to 1",
                                threads_per_child);
               }
      @@ -2152,17 +2299,14 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (max_workers < threads_per_child) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00314)
                                "WARNING: MaxRequestWorkers of %d is less than "
      -                         "ThreadsPerChild of", max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " %d, increasing to %d.  MaxRequestWorkers must be at "
      -                         "least as large",
      -                         threads_per_child, threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " as the number of threads in a single server.");
      +                         "ThreadsPerChild of %d, increasing to %d. "
      +                         "MaxRequestWorkers must be at least as large "
      +                         "as the number of threads in a single server.",
      +                         max_workers, threads_per_child, threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00315)
                                "MaxRequestWorkers of %d is less than ThreadsPerChild "
                                "of %d, increasing to match",
                                max_workers, threads_per_child);
      @@ -2176,18 +2320,14 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
               int tmp_max_workers = ap_daemons_limit * threads_per_child;
       
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00316)
                                "WARNING: MaxRequestWorkers of %d is not an integer "
      -                         "multiple of", max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " ThreadsPerChild of %d, decreasing to nearest "
      -                         "multiple %d,", threads_per_child,
      -                         tmp_max_workers);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " for a maximum of %d servers.",
      +                         "multiple of ThreadsPerChild of %d, decreasing to nearest "
      +                         "multiple %d, for a maximum of %d servers.",
      +                         max_workers, threads_per_child, tmp_max_workers,
                                ap_daemons_limit);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00317)
                                "MaxRequestWorkers of %d is not an integer multiple of "
                                "ThreadsPerChild of %d, decreasing to nearest "
                                "multiple %d", max_workers, threads_per_child,
      @@ -2198,17 +2338,14 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (ap_daemons_limit > server_limit) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00318)
                                "WARNING: MaxRequestWorkers of %d would require %d "
      -                         "servers and ", max_workers, ap_daemons_limit);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " would exceed ServerLimit of %d, decreasing to %d.",
      -                         server_limit, server_limit * threads_per_child);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " To increase, please see the ServerLimit "
      -                         "directive.");
      +                         "servers and would exceed ServerLimit of %d, decreasing to %d. "
      +                         "To increase, please see the ServerLimit directive.",
      +                         max_workers, ap_daemons_limit, server_limit,
      +                         server_limit * threads_per_child);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00319)
                                "MaxRequestWorkers of %d would require %d servers and "
                                "exceed ServerLimit of %d, decreasing to %d",
                                max_workers, ap_daemons_limit, server_limit,
      @@ -2218,13 +2355,13 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
           }
       
           /* ap_daemons_to_start > ap_daemons_limit checked in worker_run() */
      -    if (ap_daemons_to_start < 0) {
      +    if (ap_daemons_to_start < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00320)
                                "WARNING: StartServers of %d not allowed, "
                                "increasing to 1.", ap_daemons_to_start);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00321)
                                "StartServers of %d not allowed, increasing to 1",
                                ap_daemons_to_start);
               }
      @@ -2233,15 +2370,12 @@ static int worker_check_config(apr_pool_t *p, apr_pool_t *plog,
       
           if (min_spare_threads < 1) {
               if (startup) {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL, APLOGNO(00322)
                                "WARNING: MinSpareThreads of %d not allowed, "
      -                         "increasing to 1", min_spare_threads);
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " to avoid almost certain server failure.");
      -            ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_STARTUP, 0, NULL,
      -                         " Please read the documentation.");
      +                         "increasing to 1 to avoid almost certain server failure. "
      +                         "Please read the documentation.", min_spare_threads);
               } else {
      -            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, APLOGNO(00323)
                                "MinSpareThreads of %d not allowed, increasing to 1",
                                min_spare_threads);
               }
      @@ -2319,7 +2453,7 @@ static const char *set_max_workers (cmd_parms *cmd, void *dummy,
               return err;
           }
           if (!strcasecmp(cmd->cmd->name, "MaxClients")) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(00324)
                            "MaxClients is deprecated, use MaxRequestWorkers "
                            "instead.");
           }
      diff --git a/server/mpm_common.c b/server/mpm_common.c
      index 3663167fc31..3ea43e79226 100644
      --- a/server/mpm_common.c
      +++ b/server/mpm_common.c
      @@ -62,30 +62,28 @@
       #undef APLOG_MODULE_INDEX
       #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
       
      +#define DEFAULT_HOOK_LINKS \
      +    APR_HOOK_LINK(monitor) \
      +    APR_HOOK_LINK(drop_privileges) \
      +    APR_HOOK_LINK(mpm) \
      +    APR_HOOK_LINK(mpm_query) \
      +    APR_HOOK_LINK(mpm_register_timed_callback) \
      +    APR_HOOK_LINK(mpm_get_name) \
      +    APR_HOOK_LINK(end_generation) \
      +    APR_HOOK_LINK(child_status) \
      +    APR_HOOK_LINK(suspend_connection) \
      +    APR_HOOK_LINK(resume_connection)
      +
       #if AP_ENABLE_EXCEPTION_HOOK
       APR_HOOK_STRUCT(
           APR_HOOK_LINK(fatal_exception)
      -    APR_HOOK_LINK(monitor)
      -    APR_HOOK_LINK(drop_privileges)
      -    APR_HOOK_LINK(mpm)
      -    APR_HOOK_LINK(mpm_query)
      -    APR_HOOK_LINK(mpm_register_timed_callback)
      -    APR_HOOK_LINK(mpm_get_name)
      -    APR_HOOK_LINK(end_generation)
      -    APR_HOOK_LINK(child_status)
      +    DEFAULT_HOOK_LINKS
       )
       AP_IMPLEMENT_HOOK_RUN_ALL(int, fatal_exception,
                                 (ap_exception_info_t *ei), (ei), OK, DECLINED)
       #else
       APR_HOOK_STRUCT(
      -    APR_HOOK_LINK(monitor)
      -    APR_HOOK_LINK(drop_privileges)
      -    APR_HOOK_LINK(mpm)
      -    APR_HOOK_LINK(mpm_query)
      -    APR_HOOK_LINK(mpm_register_timed_callback)
      -    APR_HOOK_LINK(mpm_get_name)
      -    APR_HOOK_LINK(end_generation)
      -    APR_HOOK_LINK(child_status)
      +    DEFAULT_HOOK_LINKS
       )
       #endif
       AP_IMPLEMENT_HOOK_RUN_ALL(int, monitor,
      @@ -108,6 +106,12 @@ AP_IMPLEMENT_HOOK_VOID(end_generation,
       AP_IMPLEMENT_HOOK_VOID(child_status,
                              (server_rec *s, pid_t pid, ap_generation_t gen, int slot, mpm_child_status status),
                              (s,pid,gen,slot,status))
      +AP_IMPLEMENT_HOOK_VOID(suspend_connection,
      +                       (conn_rec *c, request_rec *r),
      +                       (c, r))
      +AP_IMPLEMENT_HOOK_VOID(resume_connection,
      +                       (conn_rec *c, request_rec *r),
      +                       (c, r))
       
       /* hooks with no args are implemented last, after disabling APR hook probes */
       #if defined(APR_HOOK_PROBES_ENABLED)
      @@ -139,13 +143,15 @@ static struct mpm_gen_info_head_t *geninfo, *unused_geninfo;
       static int gen_head_init; /* yuck */
       
       /* variables representing config directives implemented here */
      -const char *ap_pid_fname;
      -int ap_max_requests_per_child;
      -char ap_coredump_dir[MAX_STRING_LEN];
      -int ap_coredumpdir_configured;
      -int ap_graceful_shutdown_timeout;
      +AP_DECLARE_DATA const char *ap_pid_fname;
      +AP_DECLARE_DATA int ap_max_requests_per_child;
      +AP_DECLARE_DATA char ap_coredump_dir[MAX_STRING_LEN];
      +AP_DECLARE_DATA int ap_coredumpdir_configured;
      +AP_DECLARE_DATA int ap_graceful_shutdown_timeout;
       AP_DECLARE_DATA apr_uint32_t ap_max_mem_free;
      -apr_size_t ap_thread_stacksize;
      +AP_DECLARE_DATA apr_size_t ap_thread_stacksize;
      +
      +#define ALLOCATOR_MAX_FREE_DEFAULT (2048*1024)
       
       /* Set defaults for config directives implemented here.  This is
        * called from core's pre-config hook, so MPMs which need to override
      @@ -158,7 +164,7 @@ void mpm_common_pre_config(apr_pool_t *pconf)
           apr_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));
           ap_coredumpdir_configured = 0;
           ap_graceful_shutdown_timeout = 0; /* unlimited */
      -    ap_max_mem_free = APR_ALLOCATOR_MAX_FREE_UNLIMITED;
      +    ap_max_mem_free = ALLOCATOR_MAX_FREE_DEFAULT;
           ap_thread_stacksize = 0; /* use system default */
       }
       
      @@ -168,8 +174,9 @@ void mpm_common_pre_config(apr_pool_t *pconf)
       #endif
       static int wait_or_timeout_counter;
       
      -void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
      -                        apr_pool_t *p, server_rec *s)
      +AP_DECLARE(void) ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode,
      +                                    apr_proc_t *ret, apr_pool_t *p,
      +                                    server_rec *s)
       {
           apr_status_t rv;
       
      @@ -191,7 +198,6 @@ void ap_wait_or_timeout(apr_exit_why_e *status, int *exitcode, apr_proc_t *ret,
       
           apr_sleep(apr_time_from_sec(1));
           ret->pid = -1;
      -    return;
       }
       
       #if defined(TCP_NODELAY)
      @@ -209,7 +215,7 @@ void ap_sock_disable_nagle(apr_socket_t *s)
           apr_status_t status = apr_socket_opt_set(s, APR_TCP_NODELAY, 1);
       
           if (status != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, status, ap_server_conf, APLOGNO(00542)
                            "apr_socket_opt_set: (TCP_NODELAY)");
           }
       }
      @@ -224,7 +230,7 @@ AP_DECLARE(uid_t) ap_uname2id(const char *name)
               return (atoi(&name[1]));
       
           if (!(ent = getpwnam(name))) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00543)
                            "%s: bad user name %s", ap_server_argv0, name);
               exit(1);
           }
      @@ -242,7 +248,7 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name)
               return (atoi(&name[1]));
       
           if (!(ent = getgrnam(name))) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00544)
                            "%s: bad group name %s", ap_server_argv0, name);
               exit(1);
           }
      @@ -316,7 +322,7 @@ const char *ap_mpm_set_max_requests(cmd_parms *cmd, void *dummy,
           }
       
           if (!strcasecmp(cmd->cmd->name, "MaxRequestsPerChild")) {
      -        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, APLOGNO(00545)
                            "MaxRequestsPerChild is deprecated, use "
                            "MaxConnectionsPerChild instead.");
           }
      @@ -336,7 +342,7 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
               return err;
           }
       
      -    fname = ap_server_root_relative(cmd->pool, arg);
      +    fname = ap_server_root_relative(cmd->temp_pool, arg);
           if (!fname) {
               return apr_pstrcat(cmd->pool, "Invalid CoreDumpDirectory path ",
                                  arg, NULL);
      @@ -354,8 +360,9 @@ const char *ap_mpm_set_coredumpdir(cmd_parms *cmd, void *dummy,
           return NULL;
       }
       
      -const char * ap_mpm_set_graceful_shutdown(cmd_parms *cmd, void *dummy,
      -                                          const char *arg)
      +AP_DECLARE(const char *)ap_mpm_set_graceful_shutdown(cmd_parms *cmd,
      +                                                     void *dummy,
      +                                                     const char *arg)
       {
           const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
           if (err != NULL) {
      @@ -374,6 +381,7 @@ const char *ap_mpm_set_max_mem_free(cmd_parms *cmd, void *dummy,
               return err;
           }
       
      +    errno = 0;
           value = strtol(arg, NULL, 10);
           if (value < 0 || errno == ERANGE)
               return apr_pstrcat(cmd->pool, "Invalid MaxMemFree value: ",
      @@ -393,6 +401,7 @@ const char *ap_mpm_set_thread_stacksize(cmd_parms *cmd, void *dummy,
               return err;
           }
       
      +    errno = 0;
           value = strtol(arg, NULL, 10);
           if (value < 0 || errno == ERANGE)
               return apr_pstrcat(cmd->pool, "Invalid ThreadStackSize value: ",
      @@ -503,7 +512,7 @@ void ap_core_child_status(server_rec *s, pid_t pid,
           case MPM_CHILD_EXITED:
               status_msg = "exited";
               if (cur == APR_RING_SENTINEL(geninfo, mpm_gen_info_t, link)) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00546)
                                "no record of generation %d of exiting child %" APR_PID_T_FMT,
                                gen, pid);
               }
      diff --git a/server/mpm_unix.c b/server/mpm_unix.c
      index 96c5e4e1a0c..dce10a78cff 100644
      --- a/server/mpm_unix.c
      +++ b/server/mpm_unix.c
      @@ -63,7 +63,13 @@
       #undef APLOG_MODULE_INDEX
       #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
       
      -typedef enum {DO_NOTHING, SEND_SIGTERM, SEND_SIGKILL, GIVEUP} action_t;
      +typedef enum {
      +    DO_NOTHING,
      +    SEND_SIGTERM,
      +    SEND_SIGTERM_NOLOG,
      +    SEND_SIGKILL,
      +    GIVEUP
      +} action_t;
       
       typedef struct extra_process_t {
           struct extra_process_t *next;
      @@ -73,7 +79,7 @@ typedef struct extra_process_t {
       
       static extra_process_t *extras;
       
      -void ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen)
      +AP_DECLARE(void) ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen)
       {
           extra_process_t *p = (extra_process_t *)ap_malloc(sizeof(extra_process_t));
       
      @@ -83,7 +89,7 @@ void ap_register_extra_mpm_process(pid_t pid, ap_generation_t gen)
           extras = p;
       }
       
      -int ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *gen)
      +AP_DECLARE(int) ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *old_gen)
       {
           extra_process_t *cur = extras;
           extra_process_t *prev = NULL;
      @@ -100,7 +106,7 @@ int ap_unregister_extra_mpm_process(pid_t pid, ap_generation_t *gen)
               else {
                   extras = cur->next;
               }
      -        *gen = cur->gen;
      +        *old_gen = cur->gen;
               free(cur);
               return 1; /* found */
           }
      @@ -137,17 +143,19 @@ static int reclaim_one_pid(pid_t pid, action_t action)
           case SEND_SIGTERM:
               /* ok, now it's being annoying */
               ap_log_error(APLOG_MARK, APLOG_WARNING,
      -                     0, ap_server_conf,
      +                     0, ap_server_conf, APLOGNO(00045)
                            "child process %" APR_PID_T_FMT
                            " still did not exit, "
                            "sending a SIGTERM",
                            pid);
      +        /* FALLTHROUGH */
      +    case SEND_SIGTERM_NOLOG:
               kill(pid, SIGTERM);
               break;
       
           case SEND_SIGKILL:
               ap_log_error(APLOG_MARK, APLOG_ERR,
      -                     0, ap_server_conf,
      +                     0, ap_server_conf, APLOGNO(00046)
                            "child process %" APR_PID_T_FMT
                            " still did not exit, "
                            "sending a SIGKILL",
      @@ -162,7 +170,7 @@ static int reclaim_one_pid(pid_t pid, action_t action)
                * after the restart.
                */
               ap_log_error(APLOG_MARK, APLOG_ERR,
      -                     0, ap_server_conf,
      +                     0, ap_server_conf, APLOGNO(00047)
                            "could not make child process %" APR_PID_T_FMT
                            " exit, "
                            "attempting to continue anyway",
      @@ -173,8 +181,8 @@ static int reclaim_one_pid(pid_t pid, action_t action)
           return 0;
       }
       
      -void ap_reclaim_child_processes(int terminate,
      -                                ap_reclaim_callback_fn_t *mpm_callback)
      +AP_DECLARE(void) ap_reclaim_child_processes(int terminate,
      +                                            ap_reclaim_callback_fn_t *mpm_callback)
       {
           apr_time_t waittime = 1024 * 16;
           int i;
      @@ -193,6 +201,7 @@ void ap_reclaim_child_processes(int terminate,
                                 * children but take no action against
                                 * stragglers
                                 */
      +        {SEND_SIGTERM_NOLOG, 0}, /* skipped if terminate == 0 */
               {SEND_SIGTERM, apr_time_from_sec(3)},
               {SEND_SIGTERM, apr_time_from_sec(5)},
               {SEND_SIGTERM, apr_time_from_sec(7)},
      @@ -202,19 +211,21 @@ void ap_reclaim_child_processes(int terminate,
           int cur_action;      /* index of action we decided to take this
                                 * iteration
                                 */
      -    int next_action = 1; /* index of first real action */
      +    int next_action = terminate ? 1 : 2; /* index of first real action */
       
           ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons);
       
           do {
      -        apr_sleep(waittime);
      -        /* don't let waittime get longer than 1 second; otherwise, we don't
      -         * react quickly to the last child exiting, and taking action can
      -         * be delayed
      -         */
      -        waittime = waittime * 4;
      -        if (waittime > apr_time_from_sec(1)) {
      -            waittime = apr_time_from_sec(1);
      +        if (action_table[next_action].action_time > 0) {
      +            apr_sleep(waittime);
      +            /* don't let waittime get longer than 1 second; otherwise, we don't
      +             * react quickly to the last child exiting, and taking action can
      +             * be delayed
      +             */
      +            waittime = waittime * 4;
      +            if (waittime > apr_time_from_sec(1)) {
      +                waittime = apr_time_from_sec(1);
      +            }
               }
       
               /* see what action to take, if any */
      @@ -270,7 +281,7 @@ void ap_reclaim_child_processes(int terminate,
                    action_table[cur_action].action != GIVEUP);
       }
       
      -void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
      +AP_DECLARE(void) ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
       {
           int i;
           extra_process_t *cur_extra;
      @@ -313,7 +324,7 @@ void ap_relieve_child_processes(ap_reclaim_callback_fn_t *mpm_callback)
        * the pid is a member of the current process group; either using
        * apr_proc_wait(), where waitpid() guarantees to fail for non-child
        * processes; or by using getpgid() directly, if available. */
      -apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
      +AP_DECLARE(apr_status_t) ap_mpm_safe_kill(pid_t pid, int sig)
       {
       #ifndef HAVE_GETPGID
           apr_proc_t proc;
      @@ -337,7 +348,7 @@ apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
           else if (rv != APR_CHILD_NOTDONE) {
               /* The child is already dead and reaped, or was a bogus pid -
                * log this either way. */
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE, rv, ap_server_conf, APLOGNO(00048)
                            "cannot send signal %d to pid %ld (non-child or "
                            "already dead)", sig, (long)pid);
               return APR_EINVAL;
      @@ -357,7 +368,7 @@ apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
           }
       
           if (pg != getpgrp()) {
      -        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf, APLOGNO(00049)
                            "refusing to send signal %d to pid %ld outside "
                            "process group", sig, (long)pid);
               return APR_EINVAL;
      @@ -368,7 +379,8 @@ apr_status_t ap_mpm_safe_kill(pid_t pid, int sig)
       }
       
       
      -int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
      +AP_DECLARE(int) ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why,
      +                                        int status)
       {
           int signum = status;
           const char *sigdesc;
      @@ -388,7 +400,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
       
               if (status == APEXIT_CHILDFATAL) {
                   ap_log_error(APLOG_MARK, APLOG_ALERT,
      -                         0, ap_server_conf,
      +                         0, ap_server_conf, APLOGNO(00050)
                                "Child %" APR_PID_T_FMT
                                " returned a Fatal error... Apache is exiting!",
                                pid->pid);
      @@ -411,7 +423,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
               default:
                   if (APR_PROC_CHECK_CORE_DUMP(why)) {
                       ap_log_error(APLOG_MARK, APLOG_NOTICE,
      -                             0, ap_server_conf,
      +                             0, ap_server_conf, APLOGNO(00051)
                                    "child pid %ld exit signal %s (%d), "
                                    "possible coredump in %s",
                                    (long)pid->pid, sigdesc, signum,
      @@ -419,7 +431,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status)
                   }
                   else {
                       ap_log_error(APLOG_MARK, APLOG_NOTICE,
      -                             0, ap_server_conf,
      +                             0, ap_server_conf, APLOGNO(00052)
                                    "child pid %ld exit signal %s (%d)",
                                    (long)pid->pid, sigdesc, signum);
                   }
      @@ -493,21 +505,122 @@ static apr_status_t pod_signal_internal(ap_pod_t *pod)
       
           rv = apr_file_write(pod->pod_out, &char_of_death, &one);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(00053)
                            "write pipe_of_death");
           }
       
           return rv;
       }
       
      -/* This function connects to the server, then immediately closes the connection.
      - * This permits the MPM to skip the poll when there is only one listening
      - * socket, because it provides a alternate way to unblock an accept() when
      - * the pod is used.
      - */
      +AP_DECLARE(apr_status_t) ap_mpm_podx_open(apr_pool_t *p, ap_pod_t **pod)
      +{
      +    apr_status_t rv;
      +
      +    *pod = apr_palloc(p, sizeof(**pod));
      +    rv = apr_file_pipe_create(&((*pod)->pod_in), &((*pod)->pod_out), p);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +    /*
      +     apr_file_pipe_timeout_set((*pod)->pod_in, 0);
      +     */
      +    (*pod)->p = p;
      +
      +    /* close these before exec. */
      +    apr_file_inherit_unset((*pod)->pod_in);
      +    apr_file_inherit_unset((*pod)->pod_out);
      +
      +    return APR_SUCCESS;
      +}
      +
      +AP_DECLARE(int) ap_mpm_podx_check(ap_pod_t *pod)
      +{
      +    char c;
      +    apr_os_file_t fd;
      +    int rc;
      +
      +    /* we need to surface EINTR so we'll have to grab the
      +     * native file descriptor and do the OS read() ourselves
      +     */
      +    apr_os_file_get(&fd, pod->pod_in);
      +    rc = read(fd, &c, 1);
      +    if (rc == 1) {
      +        switch (c) {
      +            case AP_MPM_PODX_RESTART_CHAR:
      +                return AP_MPM_PODX_RESTART;
      +            case AP_MPM_PODX_GRACEFUL_CHAR:
      +                return AP_MPM_PODX_GRACEFUL;
      +        }
      +    }
      +    return AP_MPM_PODX_NORESTART;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_mpm_podx_close(ap_pod_t *pod)
      +{
      +    apr_status_t rv;
      +
      +    rv = apr_file_close(pod->pod_out);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +
      +    rv = apr_file_close(pod->pod_in);
      +    if (rv != APR_SUCCESS) {
      +        return rv;
      +    }
      +    return rv;
      +}
      +
      +static apr_status_t podx_signal_internal(ap_pod_t *pod,
      +                                        ap_podx_restart_t graceful)
      +{
      +    apr_status_t rv;
      +    apr_size_t one = 1;
      +    char char_of_death = ' ';
      +    switch (graceful) {
      +        case AP_MPM_PODX_RESTART:
      +            char_of_death = AP_MPM_PODX_RESTART_CHAR;
      +            break;
      +        case AP_MPM_PODX_GRACEFUL:
      +            char_of_death = AP_MPM_PODX_GRACEFUL_CHAR;
      +            break;
      +        case AP_MPM_PODX_NORESTART:
      +            break;
      +    }
      +
      +    rv = apr_file_write(pod->pod_out, &char_of_death, &one);
      +    if (rv != APR_SUCCESS) {
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(02404)
      +                     "write pipe_of_death");
      +    }
      +    return rv;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_mpm_podx_signal(ap_pod_t * pod,
      +                                            ap_podx_restart_t graceful)
      +{
      +    return podx_signal_internal(pod, graceful);
      +}
      +
      +AP_DECLARE(void) ap_mpm_podx_killpg(ap_pod_t * pod, int num,
      +                                    ap_podx_restart_t graceful)
      +{
      +    int i;
      +    apr_status_t rv = APR_SUCCESS;
      +
      +    for (i = 0; i < num && rv == APR_SUCCESS; i++) {
      +        rv = podx_signal_internal(pod, graceful);
      +    }
      +}
      +
      +/* This function connects to the server and sends enough data to
      + * ensure the child wakes up and processes a new connection.  This
      + * permits the MPM to skip the poll when there is only one listening
      + * socket, because it provides a alternate way to unblock an accept()
      + * when the pod is used.  */
       static apr_status_t dummy_connection(ap_pod_t *pod)
       {
      -    char *srequest;
      +    const char *data;
           apr_status_t rv;
           apr_socket_t *sock;
           apr_pool_t *p;
      @@ -534,7 +647,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
       
           rv = apr_socket_create(&sock, lp->bind_addr->family, SOCK_STREAM, 0, p);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(00054)
                            "get socket to connect to listener");
               apr_pool_destroy(p);
               return rv;
      @@ -548,7 +661,7 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
            */
           rv = apr_socket_timeout_set(sock, apr_time_from_sec(3));
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf, APLOGNO(00055)
                            "set timeout on socket to connect to listener");
               apr_socket_close(sock);
               apr_pool_destroy(p);
      @@ -567,28 +680,43 @@ static apr_status_t dummy_connection(ap_pod_t *pod)
                   log_level = APLOG_DEBUG;
               }
       
      -        ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, log_level, rv, ap_server_conf, APLOGNO(00056)
                            "connect to listener on %pI", lp->bind_addr);
      +        apr_pool_destroy(p);
      +        return rv;
           }
       
      -    /* Create the request string. We include a User-Agent so that
      -     * adminstrators can track down the cause of the odd-looking
      -     * requests in their logs.
      -     */
      -    srequest = apr_pstrcat(p, "OPTIONS * HTTP/1.0\r\nUser-Agent: ",
      +    if (lp->protocol && strcasecmp(lp->protocol, "https") == 0) {
      +        /* Send a TLS 1.0 close_notify alert.  This is perhaps the
      +         * "least wrong" way to open and cleanly terminate an SSL
      +         * connection.  It should "work" without noisy error logs if
      +         * the server actually expects SSLv3/TLSv1.  With
      +         * SSLv23_server_method() OpenSSL's SSL_accept() fails
      +         * ungracefully on receipt of this message, since it requires
      +         * an 11-byte ClientHello message and this is too short. */
      +        static const unsigned char tls10_close_notify[7] = {
      +            '\x15',         /* TLSPlainText.type = Alert (21) */
      +            '\x03', '\x01', /* TLSPlainText.version = {3, 1} */
      +            '\x00', '\x02', /* TLSPlainText.length = 2 */
      +            '\x01',         /* Alert.level = warning (1) */
      +            '\x00'          /* Alert.description = close_notify (0) */
      +        };
      +        data = (const char *)tls10_close_notify;
      +        len = sizeof(tls10_close_notify);
      +    }
      +    else /* ... XXX other request types here? */ {
      +        /* Create an HTTP request string.  We include a User-Agent so
      +         * that adminstrators can track down the cause of the
      +         * odd-looking requests in their logs.  A complete request is
      +         * used since kernel-level filtering may require that much
      +         * data before returning from accept(). */
      +        data = apr_pstrcat(p, "OPTIONS * HTTP/1.0\r\nUser-Agent: ",
                                  ap_get_server_description(),
                                  " (internal dummy connection)\r\n\r\n", NULL);
      +        len = strlen(data);
      +    }
       
      -    /* Since some operating systems support buffering of data or entire
      -     * requests in the kernel, we send a simple request, to make sure
      -     * the server pops out of a blocking accept().
      -     */
      -    /* XXX: This is HTTP specific. We should look at the Protocol for each
      -     * listener, and send the correct type of request to trigger any Accept
      -     * Filters.
      -     */
      -    len = strlen(srequest);
      -    apr_socket_send(sock, srequest, &len);
      +    apr_socket_send(sock, data, &len);
           apr_socket_close(sock);
           apr_pool_destroy(p);
       
      @@ -625,7 +753,12 @@ void ap_mpm_pod_killpg(ap_pod_t *pod, int num)
            * readers stranded (a number of them could be tied up for
            * a while serving time-consuming requests)
            */
      +    /* Recall: we only worry about IDLE child processes here */
           for (i = 0; i < num && rv == APR_SUCCESS; i++) {
      +        if (ap_scoreboard_image->servers[i][0].status != SERVER_READY ||
      +            ap_scoreboard_image->servers[i][0].pid == 0) {
      +            continue;
      +        }
               rv = dummy_connection(pod);
           }
       }
      @@ -636,7 +769,7 @@ static const char *dash_k_arg_noarg = "noarg";
       static int send_signal(pid_t pid, int sig)
       {
           if (kill(pid, sig) < 0) {
      -        ap_log_error(APLOG_MARK, APLOG_STARTUP, errno, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_STARTUP, errno, NULL, APLOGNO(00057)
                            "sending signal to server");
               return 1;
           }
      @@ -655,9 +788,9 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
           rv = ap_read_pid(pconf, ap_pid_fname, &otherpid);
           if (rv != APR_SUCCESS) {
               if (!APR_STATUS_IS_ENOENT(rv)) {
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, rv, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, rv, NULL, APLOGNO(00058)
                                "Error retrieving pid file %s", ap_pid_fname);
      -            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, APLOGNO(00059)
                                "Remove it before continuing if it is corrupted.");
                   *exit_status = 1;
                   return 1;
      @@ -665,7 +798,10 @@ int ap_signal_server(int *exit_status, apr_pool_t *pconf)
               status = "httpd (no pid file) not running";
           }
           else {
      -        if (kill(otherpid, 0) == 0) {
      +        /* With containerization, httpd may get the same PID at each startup,
      +         * handle it as if it were not running (it obviously can't).
      +         */
      +        if (otherpid != getpid() && kill(otherpid, 0) == 0) {
                   running = 1;
                   status = apr_psprintf(pconf,
                                         "httpd (pid %" APR_PID_T_FMT ") already "
      @@ -848,7 +984,7 @@ static void sig_coredump(int sig)
            */
           if (getpid() == parent_pid) {
               ap_log_error(APLOG_MARK, APLOG_NOTICE,
      -                     0, ap_server_conf,
      +                     0, ap_server_conf, APLOGNO(00060)
                            "seg fault or similar nasty error detected "
                            "in the parent process");
               /* XXX we can probably add some rudimentary cleanup code here,
      @@ -867,13 +1003,14 @@ static void sig_coredump(int sig)
            */
       }
       
      -apr_status_t ap_fatal_signal_child_setup(server_rec *s)
      +AP_DECLARE(apr_status_t) ap_fatal_signal_child_setup(server_rec *s)
       {
           my_pid = getpid();
           return APR_SUCCESS;
       }
       
      -apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf)
      +AP_DECLARE(apr_status_t) ap_fatal_signal_setup(server_rec *s,
      +                                               apr_pool_t *in_pconf)
       {
       #ifndef NO_USE_SIGACTION
           struct sigaction sa;
      @@ -890,26 +1027,26 @@ apr_status_t ap_fatal_signal_setup(server_rec *s, apr_pool_t *in_pconf)
       
           sa.sa_handler = sig_coredump;
           if (sigaction(SIGSEGV, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGSEGV)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00061) "sigaction(SIGSEGV)");
       #ifdef SIGBUS
           if (sigaction(SIGBUS, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGBUS)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00062) "sigaction(SIGBUS)");
       #endif
       #ifdef SIGABORT
           if (sigaction(SIGABORT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGABORT)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00063) "sigaction(SIGABORT)");
       #endif
       #ifdef SIGABRT
           if (sigaction(SIGABRT, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGABRT)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00064) "sigaction(SIGABRT)");
       #endif
       #ifdef SIGILL
           if (sigaction(SIGILL, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGILL)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00065) "sigaction(SIGILL)");
       #endif
       #ifdef SIGFPE
           if (sigaction(SIGFPE, &sa, NULL) < 0)
      -        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, "sigaction(SIGFPE)");
      +        ap_log_error(APLOG_MARK, APLOG_WARNING, errno, s, APLOGNO(00066) "sigaction(SIGFPE)");
       #endif
       
       #else /* NO_USE_SIGACTION */
      diff --git a/server/protocol.c b/server/protocol.c
      index 2d2bc05ca09..63b358d4835 100644
      --- a/server/protocol.c
      +++ b/server/protocol.c
      @@ -67,6 +67,9 @@ APR_HOOK_STRUCT(
           APR_HOOK_LINK(http_scheme)
           APR_HOOK_LINK(default_port)
           APR_HOOK_LINK(note_auth_failure)
      +    APR_HOOK_LINK(protocol_propose)
      +    APR_HOOK_LINK(protocol_switch)
      +    APR_HOOK_LINK(protocol_get)
       )
       
       AP_DECLARE_DATA ap_filter_rec_t *ap_old_write_func = NULL;
      @@ -185,12 +188,13 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
           return (mtime > now) ? now : mtime;
       }
       
      -/* Min # of bytes to allocate when reading a request line */
      -#define MIN_LINE_ALLOC 80
      -
       /* Get a line of protocol input, including any continuation lines
        * caused by MIME folding (or broken clients) if fold != 0, and place it
        * in the buffer s, of size n bytes, without the ending newline.
      + * 
      + * Pulls from r->proto_input_filters instead of r->input_filters for
      + * stricter protocol adherence and better input filter behavior during
      + * chunked trailer processing (for http).
        *
        * If s is NULL, ap_rgetline_core will allocate necessary memory from r->pool.
        *
      @@ -200,7 +204,7 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
        * APR_ENOSPC is returned if there is not enough buffer space.
        * Other errors may be returned on other errors.
        *
      - * The LF is *not* returned in the buffer.  Therefore, a *read of 0
      + * The [CR]LF are *not* returned in the buffer.  Therefore, a *read of 0
        * indicates that an empty line was read.
        *
        * Notes: Because the buffer uses 1 char for NUL, the most we can return is
      @@ -211,13 +215,15 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
        */
       AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
                                                 apr_size_t *read, request_rec *r,
      -                                          int fold, apr_bucket_brigade *bb)
      +                                          int flags, apr_bucket_brigade *bb)
       {
           apr_status_t rv;
           apr_bucket *e;
           apr_size_t bytes_handled = 0, current_alloc = 0;
           char *pos, *last_char = *s;
           int do_alloc = (*s == NULL), saw_eos = 0;
      +    int fold = flags & AP_GETLINE_FOLD;
      +    int crlf = flags & AP_GETLINE_CRLF;
       
           /*
            * Initialize last_char as otherwise a random value will be compared
      @@ -229,13 +235,15 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
       
           for (;;) {
               apr_brigade_cleanup(bb);
      -        rv = ap_get_brigade(r->input_filters, bb, AP_MODE_GETLINE,
      +        rv = ap_get_brigade(r->proto_input_filters, bb, AP_MODE_GETLINE,
                                   APR_BLOCK_READ, 0);
               if (rv != APR_SUCCESS) {
                   return rv;
               }
       
      -        /* Something horribly wrong happened.  Someone didn't block! */
      +        /* Something horribly wrong happened.  Someone didn't block! 
      +         * (this also happens at the end of each keepalive connection)
      +         */
               if (APR_BRIGADE_EMPTY(bb)) {
                   return APR_EGENERAL;
               }
      @@ -286,9 +294,6 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
                       /* We'll assume the common case where one bucket is enough. */
                       if (!*s) {
                           current_alloc = len;
      -                    if (current_alloc < MIN_LINE_ALLOC) {
      -                        current_alloc = MIN_LINE_ALLOC;
      -                    }
                           *s = apr_palloc(r->pool, current_alloc);
                       }
                       else if (bytes_handled + len > current_alloc) {
      @@ -324,6 +329,13 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
               }
           }
       
      +    if (crlf && (last_char <= *s || last_char[-1] != APR_ASCII_CR)) {
      +        *last_char = '\0';
      +        bytes_handled = last_char - *s;
      +        *read = bytes_handled;
      +        return APR_EINVAL;
      +    }
      +
           /* Now NUL-terminate the string at the end of the line;
            * if the last-but-one character is a CR, terminate there */
           if (last_char > *s && last_char[-1] == APR_ASCII_CR) {
      @@ -346,7 +358,7 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
                   apr_brigade_cleanup(bb);
       
                   /* We only care about the first byte. */
      -            rv = ap_get_brigade(r->input_filters, bb, AP_MODE_SPECULATIVE,
      +            rv = ap_get_brigade(r->proto_input_filters, bb, AP_MODE_SPECULATIVE,
                                       APR_BLOCK_READ, 1);
                   if (rv != APR_SUCCESS) {
                       return rv;
      @@ -397,7 +409,8 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
                            */
                           if (do_alloc) {
                               tmp = NULL;
      -                    } else {
      +                    }
      +                    else {
                               /* We're null terminated. */
                               tmp = last_char;
                           }
      @@ -455,7 +468,7 @@ AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
            * on EBCDIC boxes, each complete http protocol input line needs to be
            * translated into the code page used by the compiler.  Since
            * ap_rgetline_core uses recursion, we do the translation in a wrapper
      -     * function to insure that each input character gets translated only once.
      +     * function to ensure that each input character gets translated only once.
            */
           apr_status_t rv;
       
      @@ -467,7 +480,7 @@ AP_DECLARE(apr_status_t) ap_rgetline(char **s, apr_size_t n,
       }
       #endif
       
      -AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold)
      +AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int flags)
       {
           char *tmp_s = s;
           apr_status_t rv;
      @@ -475,7 +488,7 @@ AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold)
           apr_bucket_brigade *tmp_bb;
       
           tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
      -    rv = ap_rgetline(&tmp_s, n, &len, r, fold, tmp_bb);
      +    rv = ap_rgetline(&tmp_s, n, &len, r, flags, tmp_bb);
           apr_brigade_destroy(tmp_bb);
       
           /* Map the out-of-space condition to the old API. */
      @@ -517,9 +530,6 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
               status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
           }
           else {
      -        /* Simple syntax Errors in URLs are trapped by
      -         * parse_uri_components().
      -         */
               status = apr_uri_parse(r->pool, uri, &r->parsed_uri);
           }
       
      @@ -558,24 +568,29 @@ AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri)
           }
       }
       
      -static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
      +/* get the length of the field name for logging, but no more than 80 bytes */
      +#define LOG_NAME_MAX_LEN 80
      +static int field_name_len(const char *field)
       {
      -    const char *ll;
      -    const char *uri;
      -    const char *pro;
      +    const char *end = ap_strchr_c(field, ':');
      +    if (end == NULL || end - field > LOG_NAME_MAX_LEN)
      +        return LOG_NAME_MAX_LEN;
      +    return end - field;
      +}
       
      -#if 0
      -    conn_rec *conn = r->connection;
      -#endif
      -    int major = 1, minor = 0;   /* Assume HTTP/1.0 if non-"HTTP" protocol */
      -    char http[5];
      +static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
      +{
      +    enum {
      +        rrl_none, rrl_badmethod, rrl_badwhitespace, rrl_excesswhitespace,
      +        rrl_missinguri, rrl_baduri, rrl_badprotocol, rrl_trailingtext,
      +        rrl_badmethod09, rrl_reject09
      +    } deferred_error = rrl_none;
      +    char *ll;
      +    char *uri;
           apr_size_t len;
      -    int num_blank_lines = 0;
      -    int max_blank_lines = r->server->limit_req_fields;
      -
      -    if (max_blank_lines <= 0) {
      -        max_blank_lines = DEFAULT_LIMIT_REQUEST_FIELDS;
      -    }
      +    int num_blank_lines = DEFAULT_LIMIT_BLANK_LINES;
      +    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
      +    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
       
           /* Read past empty lines until we get a real request line,
            * a read error, the connection closes (EOF), or we timeout.
      @@ -595,12 +610,12 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
           do {
               apr_status_t rv;
       
      -        /* insure ap_rgetline allocates memory each time thru the loop
      +        /* ensure ap_rgetline allocates memory each time thru the loop
                * if there are empty lines
                */
               r->the_request = NULL;
               rv = ap_rgetline(&(r->the_request), (apr_size_t)(r->server->limit_req_line + 2),
      -                         &len, r, 0, bb);
      +                         &len, r, strict ? AP_GETLINE_CRLF : 0, bb);
       
               if (rv != APR_SUCCESS) {
                   r->request_time = apr_time_now();
      @@ -610,9 +625,7 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
                    * happen if it exceeds the configured limit for a request-line.
                    */
                   if (APR_STATUS_IS_ENOSPC(rv)) {
      -                r->status    = HTTP_REQUEST_URI_TOO_LARGE;
      -                r->proto_num = HTTP_VERSION(1,0);
      -                r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
      +                r->status = HTTP_REQUEST_URI_TOO_LARGE;
                   }
                   else if (APR_STATUS_IS_TIMEUP(rv)) {
                       r->status = HTTP_REQUEST_TIME_OUT;
      @@ -620,9 +633,11 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
                   else if (APR_STATUS_IS_EINVAL(rv)) {
                       r->status = HTTP_BAD_REQUEST;
                   }
      +            r->proto_num = HTTP_VERSION(1,0);
      +            r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
                   return 0;
               }
      -    } while ((len <= 0) && (++num_blank_lines < max_blank_lines));
      +    } while ((len <= 0) && (--num_blank_lines >= 0));
       
           if (APLOGrtrace5(r)) {
               ap_log_rerror(APLOG_MARK, APLOG_TRACE5, 0, r,
      @@ -630,79 +645,267 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
                             ap_escape_logitem(r->pool, r->the_request));
           }
       
      -    /* we've probably got something to do, ignore graceful restart requests */
      -
           r->request_time = apr_time_now();
      -    ll = r->the_request;
      -    r->method = ap_getword_white(r->pool, &ll);
      -
      -#if 0
      -/* XXX If we want to keep track of the Method, the protocol module should do
      - * it.  That support isn't in the scoreboard yet.  Hopefully next week
      - * sometime.   rbb */
      -    ap_update_connection_status(AP_CHILD_THREAD_FROM_ID(conn->id), "Method",
      -                                r->method);
      -#endif
       
      -    uri = ap_getword_white(r->pool, &ll);
      +    r->method = r->the_request;
      +
      +    /* If there is whitespace before a method, skip it and mark in error */
      +    if (apr_isspace(*r->method)) {
      +        deferred_error = rrl_badwhitespace; 
      +        for ( ; apr_isspace(*r->method); ++r->method)
      +            ; 
      +    }
      +
      +    /* Scan the method up to the next whitespace, ensure it contains only
      +     * valid http-token characters, otherwise mark in error
      +     */
      +    if (strict) {
      +        ll = (char*) ap_scan_http_token(r->method);
      +    }
      +    else {
      +        ll = (char*) ap_scan_vchar_obstext(r->method);
      +    }
      +
      +    if (((ll == r->method) || (*ll && !apr_isspace(*ll)))
      +            && deferred_error == rrl_none) {
      +        deferred_error = rrl_badmethod;
      +        ll = strpbrk(ll, "\t\n\v\f\r ");
      +    }
      +
      +    /* Verify method terminated with a single SP, or mark as specific error */
      +    if (!ll) {
      +        if (deferred_error == rrl_none)
      +            deferred_error = rrl_missinguri;
      +        r->protocol = uri = "";
      +        len = 0;
      +        goto rrl_done;
      +    }
      +    else if (strict && ll[0] && apr_isspace(ll[1])
      +             && deferred_error == rrl_none) {
      +        deferred_error = rrl_excesswhitespace; 
      +    }
      +
      +    /* Advance uri pointer over leading whitespace, NUL terminate the method
      +     * If non-SP whitespace is encountered, mark as specific error
      +     */
      +    for (uri = ll; apr_isspace(*uri); ++uri) 
      +        if (*uri != ' ' && deferred_error == rrl_none)
      +            deferred_error = rrl_badwhitespace; 
      +    *ll = '\0';
      +
      +    if (!*uri && deferred_error == rrl_none)
      +        deferred_error = rrl_missinguri;
      +
      +    /* Scan the URI up to the next whitespace, ensure it contains no raw
      +     * control characters, otherwise mark in error
      +     */
      +    ll = (char*) ap_scan_vchar_obstext(uri);
      +    if (ll == uri || (*ll && !apr_isspace(*ll))) {
      +        deferred_error = rrl_baduri;
      +        ll = strpbrk(ll, "\t\n\v\f\r ");
      +    }
      +
      +    /* Verify URI terminated with a single SP, or mark as specific error */
      +    if (!ll) {
      +        r->protocol = "";
      +        len = 0;
      +        goto rrl_done;
      +    }
      +    else if (strict && ll[0] && apr_isspace(ll[1])
      +             && deferred_error == rrl_none) {
      +        deferred_error = rrl_excesswhitespace; 
      +    }
      +
      +    /* Advance protocol pointer over leading whitespace, NUL terminate the uri
      +     * If non-SP whitespace is encountered, mark as specific error
      +     */
      +    for (r->protocol = ll; apr_isspace(*r->protocol); ++r->protocol) 
      +        if (*r->protocol != ' ' && deferred_error == rrl_none)
      +            deferred_error = rrl_badwhitespace; 
      +    *ll = '\0';
      +
      +    /* Scan the protocol up to the next whitespace, validation comes later */
      +    if (!(ll = (char*) ap_scan_vchar_obstext(r->protocol))) {
      +        len = strlen(r->protocol);
      +        goto rrl_done;
      +    }
      +    len = ll - r->protocol;
      +
      +    /* Advance over trailing whitespace, if found mark in error,
      +     * determine if trailing text is found, unconditionally mark in error,
      +     * finally NUL terminate the protocol string
      +     */
      +    if (*ll && !apr_isspace(*ll)) {
      +        deferred_error = rrl_badprotocol;
      +    }
      +    else if (strict && *ll) {
      +        deferred_error = rrl_excesswhitespace;
      +    }
      +    else {
      +        for ( ; apr_isspace(*ll); ++ll)
      +            if (*ll != ' ' && deferred_error == rrl_none)
      +                deferred_error = rrl_badwhitespace; 
      +        if (*ll && deferred_error == rrl_none)
      +            deferred_error = rrl_trailingtext;
      +    }
      +    *((char *)r->protocol + len) = '\0';
      +
      +rrl_done:
      +    /* For internal integrety and palloc efficiency, reconstruct the_request
      +     * in one palloc, using only single SP characters, per spec.
      +     */
      +    r->the_request = apr_pstrcat(r->pool, r->method, *uri ? " " : NULL, uri,
      +                                 *r->protocol ? " " : NULL, r->protocol, NULL);
       
      -    /* Provide quick information about the request method as soon as known */
      +    if (len == 8
      +            && r->protocol[0] == 'H' && r->protocol[1] == 'T'
      +            && r->protocol[2] == 'T' && r->protocol[3] == 'P'
      +            && r->protocol[4] == '/' && apr_isdigit(r->protocol[5])
      +            && r->protocol[6] == '.' && apr_isdigit(r->protocol[7])
      +            && r->protocol[5] != '0') {
      +        r->assbackwards = 0;
      +        r->proto_num = HTTP_VERSION(r->protocol[5] - '0', r->protocol[7] - '0');
      +    }
      +    else if (len == 8
      +                 && (r->protocol[0] == 'H' || r->protocol[0] == 'h')
      +                 && (r->protocol[1] == 'T' || r->protocol[1] == 't')
      +                 && (r->protocol[2] == 'T' || r->protocol[2] == 't')
      +                 && (r->protocol[3] == 'P' || r->protocol[3] == 'p')
      +                 && r->protocol[4] == '/' && apr_isdigit(r->protocol[5])
      +                 && r->protocol[6] == '.' && apr_isdigit(r->protocol[7])
      +                 && r->protocol[5] != '0') {
      +        r->assbackwards = 0;
      +        r->proto_num = HTTP_VERSION(r->protocol[5] - '0', r->protocol[7] - '0');
      +        if (strict && deferred_error == rrl_none)
      +            deferred_error = rrl_badprotocol;
      +        else
      +            memcpy((char*)r->protocol, "HTTP", 4);
      +    }
      +    else if (r->protocol[0]) {
      +        r->proto_num = HTTP_VERSION(0, 9);
      +        /* Defer setting the r->protocol string till error msg is composed */
      +        if (deferred_error == rrl_none)
      +            deferred_error = rrl_badprotocol;
      +    }
      +    else {
      +        r->assbackwards = 1;
      +        r->protocol  = apr_pstrdup(r->pool, "HTTP/0.9");
      +        r->proto_num = HTTP_VERSION(0, 9);
      +    }
       
      +    /* Determine the method_number and parse the uri prior to invoking error
      +     * handling, such that these fields are available for subsitution
      +     */
           r->method_number = ap_method_number_of(r->method);
      -    if (r->method_number == M_GET && r->method[0] == 'H') {
      +    if (r->method_number == M_GET && r->method[0] == 'H')
               r->header_only = 1;
      -    }
       
           ap_parse_uri(r, uri);
       
      -    /* RFC 2616:
      -     *   Request-URI    = "*" | absoluteURI | abs_path | authority
      -     *
      -     * authority is a special case for CONNECT.  If the request is not
      -     * using CONNECT, and the parsed URI does not have scheme, and
      -     * it does not begin with '/', and it is not '*', then, fail
      -     * and give a 400 response. */
      -    if (r->method_number != M_CONNECT 
      -        && !r->parsed_uri.scheme 
      -        && uri[0] != '/'
      -        && !(uri[0] == '*' && uri[1] == '\0')) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                      "invalid request-URI %s", uri);
      -        r->args = NULL;
      -        r->hostname = NULL;
      +    /* With the request understood, we can consider HTTP/0.9 specific errors */
      +    if (r->proto_num == HTTP_VERSION(0, 9) && deferred_error == rrl_none) {
      +        if (conf->http09_enable == AP_HTTP09_DISABLE)
      +            deferred_error = rrl_reject09;
      +        else if (strict && (r->method_number != M_GET || r->header_only))
      +            deferred_error = rrl_badmethod09;
      +    }
      +
      +    /* Now that the method, uri and protocol are all processed,
      +     * we can safely resume any deferred error reporting
      +     */
      +    if (deferred_error != rrl_none) {
      +        if (deferred_error == rrl_badmethod)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03445)
      +                          "HTTP Request Line; Invalid method token: '%.*s'",
      +                          field_name_len(r->method), r->method);
      +        else if (deferred_error == rrl_badmethod09)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03444)
      +                          "HTTP Request Line; Invalid method token: '%.*s'"
      +                          " (only GET is allowed for HTTP/0.9 requests)",
      +                          field_name_len(r->method), r->method);
      +        else if (deferred_error == rrl_missinguri)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03446)
      +                          "HTTP Request Line; Missing URI");
      +        else if (deferred_error == rrl_baduri)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03454)
      +                          "HTTP Request Line; URI incorrectly encoded: '%.*s'",
      +                          field_name_len(r->uri), r->uri);
      +        else if (deferred_error == rrl_badwhitespace)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03447)
      +                          "HTTP Request Line; Invalid whitespace");
      +        else if (deferred_error == rrl_excesswhitespace)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03448)
      +                          "HTTP Request Line; Excess whitespace "
      +                          "(disallowed by HttpProtocolOptions Strict");
      +        else if (deferred_error == rrl_trailingtext)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03449)
      +                          "HTTP Request Line; Extraneous text found '%.*s' "
      +                          "(perhaps whitespace was injected?)",
      +                          field_name_len(ll), ll);
      +        else if (deferred_error == rrl_reject09)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02401)
      +                          "HTTP Request Line; Rejected HTTP/0.9 request");
      +        else if (deferred_error == rrl_badprotocol)
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02418)
      +                          "HTTP Request Line; Unrecognized protocol '%.*s' "
      +                          "(perhaps whitespace was injected?)",
      +                          field_name_len(r->protocol), r->protocol);
               r->status = HTTP_BAD_REQUEST;
      -        r->uri = apr_pstrdup(r->pool, uri);
      -        return 0;
      +        goto rrl_failed;
           }
       
      -    if (ll[0]) {
      -        r->assbackwards = 0;
      -        pro = ll;
      -        len = strlen(ll);
      -    } else {
      -        r->assbackwards = 1;
      -        pro = "HTTP/0.9";
      -        len = 8;
      +    if (conf->http_methods == AP_HTTP_METHODS_REGISTERED
      +            && r->method_number == M_INVALID) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02423)
      +                      "HTTP Request Line; Unrecognized HTTP method: '%.*s' "
      +                      "(disallowed by RegisteredMethods)",
      +                      field_name_len(r->method), r->method);
      +        r->status = HTTP_NOT_IMPLEMENTED;
      +        /* This can't happen in an HTTP/0.9 request, we verified GET above */
      +        return 0;
           }
      -    r->protocol = apr_pstrmemdup(r->pool, pro, len);
       
      -    /* XXX ap_update_connection_status(conn->id, "Protocol", r->protocol); */
      +    if (r->status != HTTP_OK) {
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03450)
      +                      "HTTP Request Line; Unable to parse URI: '%.*s'",
      +                      field_name_len(r->uri), r->uri);
      +        goto rrl_failed;
      +    }
       
      -    /* Avoid sscanf in the common case */
      -    if (len == 8
      -        && pro[0] == 'H' && pro[1] == 'T' && pro[2] == 'T' && pro[3] == 'P'
      -        && pro[4] == '/' && apr_isdigit(pro[5]) && pro[6] == '.'
      -        && apr_isdigit(pro[7])) {
      -        r->proto_num = HTTP_VERSION(pro[5] - '0', pro[7] - '0');
      -    }
      -    else if (3 == sscanf(r->protocol, "%4s/%u.%u", http, &major, &minor)
      -             && (strcasecmp("http", http) == 0)
      -             && (minor < HTTP_VERSION(1, 0)) ) /* don't allow HTTP/0.1000 */
      -        r->proto_num = HTTP_VERSION(major, minor);
      -    else
      -        r->proto_num = HTTP_VERSION(1, 0);
      +    if (strict) {
      +        if (r->parsed_uri.fragment) {
      +            /* RFC3986 3.5: no fragment */
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02421)
      +                          "HTTP Request Line; URI must not contain a fragment");
      +            r->status = HTTP_BAD_REQUEST;
      +            goto rrl_failed;
      +        }
      +        if (r->parsed_uri.user || r->parsed_uri.password) {
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02422)
      +                          "HTTP Request Line; URI must not contain a "
      +                          "username/password");
      +            r->status = HTTP_BAD_REQUEST;
      +            goto rrl_failed;
      +        }
      +    }
       
           return 1;
      +
      +rrl_failed:
      +    if (r->proto_num == HTTP_VERSION(0, 9)) {
      +        /* Send all parsing and protocol error response with 1.x behavior,
      +         * and reserve 505 errors for actual HTTP protocols presented.
      +         * As called out in RFC7230 3.5, any errors parsing the protocol
      +         * from the request line are nearly always misencoded HTTP/1.x
      +         * requests. Only a valid 0.9 request with no parsing errors
      +         * at all may be treated as a simple request, if allowed.
      +         */
      +        r->assbackwards = 0;
      +        r->connection->keepalive = AP_CONN_CLOSE;
      +        r->proto_num = HTTP_VERSION(1, 0);
      +        r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
      +    }
      +    return 0;
       }
       
       static int table_do_fn_check_lengths(void *r_, const char *key,
      @@ -714,26 +917,13 @@ static int table_do_fn_check_lengths(void *r_, const char *key,
       
           r->status = HTTP_BAD_REQUEST;
           apr_table_setn(r->notes, "error-notes",
      -                   apr_pstrcat(r->pool, "Size of a request header field "
      -                               "after merging exceeds server limit.<br />"
      -                               "\n<pre>\n",
      -                               ap_escape_html(r->pool, key),
      -                               "</pre>\n", NULL));
      -    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Request header exceeds "
      -                  "LimitRequestFieldSize after merging: %s", key);
      +                   "Size of a request header field exceeds server limit.");
      +    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00560) "Request "
      +                  "header exceeds LimitRequestFieldSize after merging: %.*s",
      +                  field_name_len(key), key);
           return 0;
       }
       
      -/* get the length of the field name for logging, but no more than 80 bytes */
      -#define LOG_NAME_MAX_LEN 80
      -static int field_name_len(const char *field)
      -{
      -    const char *end = ap_strchr_c(field, ':');
      -    if (end == NULL || end - field > LOG_NAME_MAX_LEN)
      -        return LOG_NAME_MAX_LEN;
      -    return end - field;
      -}
      -
       AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb)
       {
           char *last_field = NULL;
      @@ -744,6 +934,8 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
           apr_size_t len;
           int fields_read = 0;
           char *tmp_field;
      +    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
      +    int strict = (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
       
           /*
            * Read header lines until we get the empty separator line, a read error,
      @@ -751,17 +943,18 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
            */
           while(1) {
               apr_status_t rv;
      -        int folded = 0;
       
               field = NULL;
               rv = ap_rgetline(&field, r->server->limit_req_fieldsize + 2,
      -                         &len, r, 0, bb);
      +                         &len, r, strict ? AP_GETLINE_CRLF : 0, bb);
       
               if (rv != APR_SUCCESS) {
                   if (APR_STATUS_IS_TIMEUP(rv)) {
                       r->status = HTTP_REQUEST_TIME_OUT;
                   }
                   else {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, 
      +                              "Failed to read request header line %s", field);
                       r->status = HTTP_BAD_REQUEST;
                   }
       
      @@ -769,144 +962,219 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                    * finding the end-of-line.  This is only going to happen if it
                    * exceeds the configured limit for a field size.
                    */
      -            if (rv == APR_ENOSPC && field) {
      -                /* insure ap_escape_html will terminate correctly */
      -                field[len - 1] = '\0';
      +            if (rv == APR_ENOSPC) {
                       apr_table_setn(r->notes, "error-notes",
      -                               apr_pstrcat(r->pool,
      -                                           "Size of a request header field "
      -                                           "exceeds server limit.<br />\n"
      -                                           "<pre>\n",
      -                                           ap_escape_html(r->pool, field),
      -                                           "</pre>\n", NULL));
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "Request header exceeds LimitRequestFieldSize: "
      -                              "%.*s", field_name_len(field), field);
      +                               "Size of a request header field "
      +                               "exceeds server limit.");
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00561)
      +                              "Request header exceeds LimitRequestFieldSize%s"
      +                              "%.*s",
      +                              (field && *field) ? ": " : "",
      +                              (field) ? field_name_len(field) : 0,
      +                              (field) ? field : "");
                   }
                   return;
               }
       
      -        if (last_field != NULL) {
      -            if ((len > 0) && ((*field == '\t') || *field == ' ')) {
      -                /* This line is a continuation of the preceding line(s),
      -                 * so append it to the line that we've set aside.
      -                 * Note: this uses a power-of-two allocator to avoid
      -                 * doing O(n) allocs and using O(n^2) space for
      -                 * continuations that span many many lines.
      -                 */
      -                apr_size_t fold_len = last_len + len + 1; /* trailing null */
      +        /* For all header values, and all obs-fold lines, the presence of
      +         * additional whitespace is a no-op, so collapse trailing whitespace
      +         * to save buffer allocation and optimize copy operations.
      +         * Do not remove the last single whitespace under any condition.
      +         */
      +        while (len > 1 && (field[len-1] == '\t' || field[len-1] == ' ')) {
      +            field[--len] = '\0';
      +        } 
       
      -                if (fold_len >= (apr_size_t)(r->server->limit_req_fieldsize)) {
      -                    r->status = HTTP_BAD_REQUEST;
      -                    /* report what we have accumulated so far before the
      -                     * overflow (last_field) as the field with the problem
      -                     */
      -                    apr_table_setn(r->notes, "error-notes",
      -                                   apr_pstrcat(r->pool,
      -                                               "Size of a request header field "
      -                                               "after folding "
      -                                               "exceeds server limit.<br />\n"
      -                                               "<pre>\n",
      -                                               ap_escape_html(r->pool, last_field),
      -                                               "</pre>\n", NULL));
      -                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                                  "Request header exceeds LimitRequestFieldSize "
      -                                  "after folding: %.*s",
      -                                  field_name_len(last_field), last_field);
      -                    return;
      -                }
      +        if (*field == '\t' || *field == ' ') {
      +
      +            /* Append any newly-read obs-fold line onto the preceding
      +             * last_field line we are processing
      +             */
      +            apr_size_t fold_len;
       
      +            if (last_field == NULL) {
      +                r->status = HTTP_BAD_REQUEST;
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03442)
      +                              "Line folding encountered before first"
      +                              " header line");
      +                return;
      +            }
      +
      +            if (field[1] == '\0') {
      +                r->status = HTTP_BAD_REQUEST;
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03443)
      +                              "Empty folded line encountered");
      +                return;
      +            }
      +
      +            /* Leading whitespace on an obs-fold line can be
      +             * similarly discarded */
      +            while (field[1] == '\t' || field[1] == ' ') {
      +                ++field; --len;
      +            }
      +
      +            /* This line is a continuation of the preceding line(s),
      +             * so append it to the line that we've set aside.
      +             * Note: this uses a power-of-two allocator to avoid
      +             * doing O(n) allocs and using O(n^2) space for
      +             * continuations that span many many lines.
      +             */
      +            fold_len = last_len + len + 1; /* trailing null */
      +
      +            if (fold_len >= (apr_size_t)(r->server->limit_req_fieldsize)) {
      +                r->status = HTTP_BAD_REQUEST;
      +                /* report what we have accumulated so far before the
      +                 * overflow (last_field) as the field with the problem
      +                 */
      +                apr_table_setn(r->notes, "error-notes",
      +                               "Size of a request header field "
      +                               "exceeds server limit.");
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00562)
      +                              "Request header exceeds LimitRequestFieldSize "
      +                              "after folding: %.*s",
      +                              field_name_len(last_field), last_field);
      +                return;
      +            }
      +
      +            if (fold_len > alloc_len) {
      +                char *fold_buf;
      +                alloc_len += alloc_len;
                       if (fold_len > alloc_len) {
      -                    char *fold_buf;
      -                    alloc_len += alloc_len;
      -                    if (fold_len > alloc_len) {
      -                        alloc_len = fold_len;
      -                    }
      -                    fold_buf = (char *)apr_palloc(r->pool, alloc_len);
      -                    memcpy(fold_buf, last_field, last_len);
      -                    last_field = fold_buf;
      +                    alloc_len = fold_len;
                       }
      -                memcpy(last_field + last_len, field, len +1); /* +1 for nul */
      -                last_len += len;
      -                folded = 1;
      +                fold_buf = (char *)apr_palloc(r->pool, alloc_len);
      +                memcpy(fold_buf, last_field, last_len);
      +                last_field = fold_buf;
                   }
      -            else /* not a continuation line */ {
      +            memcpy(last_field + last_len, field, len +1); /* +1 for nul */
      +            /* Replace obs-fold w/ SP per RFC 7230 3.2.4 */
      +            last_field[last_len] = ' ';
      +            last_len += len;
       
      -                if (r->server->limit_req_fields
      +            /* We've appended this obs-fold line to last_len, proceed to
      +             * read the next input line
      +             */
      +            continue;
      +        }
      +        else if (last_field != NULL) {
      +
      +            /* Process the previous last_field header line with all obs-folded
      +             * segments already concatinated (this is not operating on the
      +             * most recently read input line).
      +             */
      +
      +            if (r->server->limit_req_fields
                           && (++fields_read > r->server->limit_req_fields)) {
      -                    r->status = HTTP_BAD_REQUEST;
      -                    apr_table_setn(r->notes, "error-notes",
      -                                   "The number of request header fields "
      -                                   "exceeds this server's limit.");
      -                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                                  "Number of request headers exceeds "
      -                                  "LimitRequestFields");
      -                    return;
      -                }
      +                r->status = HTTP_BAD_REQUEST;
      +                apr_table_setn(r->notes, "error-notes",
      +                               "The number of request header fields "
      +                               "exceeds this server's limit.");
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00563)
      +                              "Number of request headers exceeds "
      +                              "LimitRequestFields");
      +                return;
      +            }
      +
      +            if (!strict)
      +            {
      +                /* Not Strict ('Unsafe' mode), using the legacy parser */
       
      -                if (!(value = strchr(last_field, ':'))) { /* Find ':' or    */
      -                    r->status = HTTP_BAD_REQUEST;      /* abort bad request */
      -                    apr_table_setn(r->notes, "error-notes",
      -                                   apr_pstrcat(r->pool,
      -                                               "Request header field is "
      -                                               "missing ':' separator.<br />\n"
      -                                               "<pre>\n",
      -                                               ap_escape_html(r->pool,
      -                                                              last_field),
      -                                               "</pre>\n", NULL));
      -                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                if (!(value = strchr(last_field, ':'))) { /* Find ':' or */
      +                    r->status = HTTP_BAD_REQUEST;   /* abort bad request */
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00564)
                                         "Request header field is missing ':' "
                                         "separator: %.*s", (int)LOG_NAME_MAX_LEN,
                                         last_field);
                           return;
                       }
       
      -                tmp_field = value - 1; /* last character of field-name */
      +                /* last character of field-name */
      +                tmp_field = value - (value > last_field ? 1 : 0);
       
                       *value++ = '\0'; /* NUL-terminate at colon */
       
      +                if (strpbrk(last_field, "\t\n\v\f\r ")) {
      +                    r->status = HTTP_BAD_REQUEST;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03452)
      +                                  "Request header field name presented"
      +                                  " invalid whitespace");
      +                    return;
      +                }
      +
                       while (*value == ' ' || *value == '\t') {
      -                    ++value;            /* Skip to start of value   */
      +                     ++value;            /* Skip to start of value   */
                       }
       
      -                /* Strip LWS after field-name: */
      -                while (tmp_field > last_field
      -                       && (*tmp_field == ' ' || *tmp_field == '\t')) {
      -                    *tmp_field-- = '\0';
      +                if (strpbrk(value, "\n\v\f\r")) {
      +                    r->status = HTTP_BAD_REQUEST;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03451)
      +                                  "Request header field value presented"
      +                                  " bad whitespace");
      +                    return;
      +                }
      +
      +                if (tmp_field == last_field) {
      +                    r->status = HTTP_BAD_REQUEST;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(03453)
      +                                  "Request header field name was empty");
      +                    return;
      +                }
      +            }
      +            else /* Using strict RFC7230 parsing */
      +            {
      +                /* Ensure valid token chars before ':' per RFC 7230 3.2.4 */
      +                value = (char *)ap_scan_http_token(last_field);
      +                if ((value == last_field) || *value != ':') {
      +                    r->status = HTTP_BAD_REQUEST;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02426)
      +                                  "Request header field name is malformed: "
      +                                  "%.*s", (int)LOG_NAME_MAX_LEN, last_field);
      +                    return;
                       }
       
      -                /* Strip LWS after field-value: */
      -                tmp_field = last_field + last_len - 1;
      -                while (tmp_field > value
      -                       && (*tmp_field == ' ' || *tmp_field == '\t')) {
      -                    *tmp_field-- = '\0';
      +                *value++ = '\0'; /* NUL-terminate last_field name at ':' */
      +
      +                while (*value == ' ' || *value == '\t') {
      +                    ++value;     /* Skip LWS of value */
                       }
       
      -                apr_table_addn(r->headers_in, last_field, value);
      +                /* Find invalid, non-HT ctrl char, or the trailing NULL */
      +                tmp_field = (char *)ap_scan_http_field_content(value);
       
      -                /* reset the alloc_len so that we'll allocate a new
      -                 * buffer if we have to do any more folding: we can't
      -                 * use the previous buffer because its contents are
      -                 * now part of r->headers_in
      +                /* Reject value for all garbage input (CTRLs excluding HT)
      +                 * e.g. only VCHAR / SP / HT / obs-text are allowed per
      +                 * RFC7230 3.2.6 - leave all more explicit rule enforcement
      +                 * for specific header handler logic later in the cycle
                        */
      -                alloc_len = 0;
      +                if (*tmp_field != '\0') {
      +                    r->status = HTTP_BAD_REQUEST;
      +                    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02427)
      +                                  "Request header value is malformed: "
      +                                  "%.*s", (int)LOG_NAME_MAX_LEN, value);
      +                    return;
      +                }
      +            }
       
      -            } /* end if current line is not a continuation starting with tab */
      +            apr_table_addn(r->headers_in, last_field, value);
      +
      +            /* This last_field header is now stored in headers_in,
      +             * resume processing of the current input line.
      +             */
               }
       
      -        /* Found a blank line, stop. */
      +        /* Found the terminating empty end-of-headers line, stop. */
               if (len == 0) {
                   break;
               }
       
      -        /* Keep track of this line so that we can parse it on
      -         * the next loop iteration.  (In the folded case, last_field
      -         * has been updated already.)
      +        /* Keep track of this new header line so that we can extend it across
      +         * any obs-fold or parse it on the next loop iteration. We referenced
      +         * our previously allocated buffer in r->headers_in,
      +         * so allocate a fresh buffer if required.
                */
      -        if (!folded) {
      -            last_field = field;
      -            last_len = len;
      -        }
      +        alloc_len = 0;
      +        last_field = field;
      +        last_len = len;
           }
       
           /* Combine multiple message-header fields with the same
      @@ -951,9 +1219,11 @@ request_rec *ap_read_request(conn_rec *conn)
           r->allowed_methods = ap_make_method_list(p, 2);
       
           r->headers_in      = apr_table_make(r->pool, 25);
      +    r->trailers_in     = apr_table_make(r->pool, 5);
           r->subprocess_env  = apr_table_make(r->pool, 25);
           r->headers_out     = apr_table_make(r->pool, 12);
           r->err_headers_out = apr_table_make(r->pool, 5);
      +    r->trailers_out    = apr_table_make(r->pool, 5);
           r->notes           = apr_table_make(r->pool, 5);
       
           r->request_config  = ap_create_request_config(r->pool);
      @@ -979,41 +1249,48 @@ request_rec *ap_read_request(conn_rec *conn)
            */
           r->used_path_info = AP_REQ_DEFAULT_PATH_INFO;
       
      +    r->useragent_addr = conn->client_addr;
      +    r->useragent_ip = conn->client_ip;
      +
           tmp_bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
       
           ap_run_pre_read_request(r, conn);
       
           /* Get the request... */
           if (!read_request_line(r, tmp_bb)) {
      -        if (r->status == HTTP_REQUEST_URI_TOO_LARGE
      -            || r->status == HTTP_BAD_REQUEST) {
      +        switch (r->status) {
      +        case HTTP_REQUEST_URI_TOO_LARGE:
      +        case HTTP_BAD_REQUEST:
      +        case HTTP_VERSION_NOT_SUPPORTED:
      +        case HTTP_NOT_IMPLEMENTED:
                   if (r->status == HTTP_REQUEST_URI_TOO_LARGE) {
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "request failed: URI too long (longer than %d)",
      +                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00565)
      +                              "request failed: client's request-line exceeds LimitRequestLine (longer than %d)",
                                     r->server->limit_req_line);
                   }
                   else if (r->method == NULL) {
      -                ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                              "request failed: invalid characters in URI");
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00566)
      +                              "request failed: malformed request line");
                   }
      -            ap_send_error_response(r, 0);
      +            access_status = r->status;
      +            r->status = HTTP_OK;
      +            ap_die(access_status, r);
                   ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
                   ap_run_log_transaction(r);
      +            r = NULL;
                   apr_brigade_destroy(tmp_bb);
                   goto traceout;
      -        }
      -        else if (r->status == HTTP_REQUEST_TIME_OUT) {
      -            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
      -            if (!r->connection->keepalives) {
      +        case HTTP_REQUEST_TIME_OUT:
      +            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, NULL);
      +            if (!r->connection->keepalives)
                       ap_run_log_transaction(r);
      -            }
                   apr_brigade_destroy(tmp_bb);
                   goto traceout;
      +        default:
      +            apr_brigade_destroy(tmp_bb);
      +            r = NULL;
      +            goto traceout;
               }
      -
      -        apr_brigade_destroy(tmp_bb);
      -        r = NULL;
      -        goto traceout;
           }
       
           /* We may have been in keep_alive_timeout mode, so toggle back
      @@ -1028,9 +1305,11 @@ request_rec *ap_read_request(conn_rec *conn)
           }
       
           if (!r->assbackwards) {
      +        const char *tenc;
      +
               ap_get_mime_headers_core(r, tmp_bb);
               if (r->status != HTTP_OK) {
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00567)
                                 "request failed: error reading the headers");
                   ap_send_error_response(r, 0);
                   ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
      @@ -1039,32 +1318,35 @@ request_rec *ap_read_request(conn_rec *conn)
                   goto traceout;
               }
       
      -        if (apr_table_get(r->headers_in, "Transfer-Encoding")
      -            && apr_table_get(r->headers_in, "Content-Length")) {
      -            /* 2616 section 4.4, point 3: "if both Transfer-Encoding
      -             * and Content-Length are received, the latter MUST be
      -             * ignored"; so unset it here to prevent any confusion
      -             * later. */
      -            apr_table_unset(r->headers_in, "Content-Length");
      -        }
      -    }
      -    else {
      -        if (r->header_only) {
      -            /*
      -             * Client asked for headers only with HTTP/0.9, which doesn't send
      -             * headers! Have to dink things just to make sure the error message
      -             * comes through...
      +        tenc = apr_table_get(r->headers_in, "Transfer-Encoding");
      +        if (tenc) {
      +            /* http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23
      +             * Section 3.3.3.3: "If a Transfer-Encoding header field is
      +             * present in a request and the chunked transfer coding is not
      +             * the final encoding ...; the server MUST respond with the 400
      +             * (Bad Request) status code and then close the connection".
                    */
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      -                          "client sent invalid HTTP/0.9 request: HEAD %s",
      -                          r->uri);
      -            r->header_only = 0;
      -            r->status = HTTP_BAD_REQUEST;
      -            ap_send_error_response(r, 0);
      -            ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
      -            ap_run_log_transaction(r);
      -            apr_brigade_destroy(tmp_bb);
      -            goto traceout;
      +            if (!(strcasecmp(tenc, "chunked") == 0 /* fast path */
      +                    || ap_find_last_token(r->pool, tenc, "chunked"))) {
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02539)
      +                              "client sent unknown Transfer-Encoding "
      +                              "(%s): %s", tenc, r->uri);
      +                r->status = HTTP_BAD_REQUEST;
      +                conn->keepalive = AP_CONN_CLOSE;
      +                ap_send_error_response(r, 0);
      +                ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
      +                ap_run_log_transaction(r);
      +                apr_brigade_destroy(tmp_bb);
      +                goto traceout;
      +            }
      +
      +            /* http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-23
      +             * Section 3.3.3.3: "If a message is received with both a
      +             * Transfer-Encoding and a Content-Length header field, the
      +             * Transfer-Encoding overrides the Content-Length. ... A sender
      +             * MUST remove the received Content-Length field".
      +             */
      +            apr_table_unset(r->headers_in, "Content-Length");
               }
           }
       
      @@ -1074,6 +1356,7 @@ request_rec *ap_read_request(conn_rec *conn)
            * now read. may update status.
            */
           ap_update_vhost_from_headers(r);
      +    access_status = r->status;
       
           /* Toggle to the Host:-based vhost's timeout mode to fetch the
            * request body and send the response body, if needed.
      @@ -1096,8 +1379,8 @@ request_rec *ap_read_request(conn_rec *conn)
                * HTTP/1.1 mentions twice (S9, S14.23) that a request MUST contain
                * a Host: header, and the server MUST respond with 400 if it doesn't.
                */
      -        r->status = HTTP_BAD_REQUEST;
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        access_status = HTTP_BAD_REQUEST;
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00569)
                             "client sent HTTP/1.1 request without hostname "
                             "(see RFC2616 section 14.23): %s", r->uri);
           }
      @@ -1112,14 +1395,8 @@ request_rec *ap_read_request(conn_rec *conn)
           ap_add_input_filter_handle(ap_http_input_filter_handle,
                                      NULL, r, r->connection);
       
      -    if (r->status != HTTP_OK) {
      -        ap_send_error_response(r, 0);
      -        ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
      -        ap_run_log_transaction(r);
      -        goto traceout;
      -    }
      -
      -    if ((access_status = ap_run_post_read_request(r))) {
      +    if (access_status != HTTP_OK
      +        || (access_status = ap_run_post_read_request(r))) {
               ap_die(access_status, r);
               ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
               ap_run_log_transaction(r);
      @@ -1140,7 +1417,7 @@ request_rec *ap_read_request(conn_rec *conn)
               }
               else {
                   r->status = HTTP_EXPECTATION_FAILED;
      -            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00570)
                                 "client sent an unrecognized expectation value of "
                                 "Expect: %s", expect);
                   ap_send_error_response(r, 0);
      @@ -1198,6 +1475,7 @@ AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew,
           rnew->status          = HTTP_OK;
       
           rnew->headers_in      = apr_table_copy(rnew->pool, r->headers_in);
      +    rnew->trailers_in     = apr_table_copy(rnew->pool, r->trailers_in);
       
           /* did the original request have a body?  (e.g. POST w/SSI tags)
            * if so, make sure the subrequest doesn't inherit body headers
      @@ -1209,6 +1487,7 @@ AP_DECLARE(void) ap_set_sub_req_protocol(request_rec *rnew,
           rnew->subprocess_env  = apr_table_copy(rnew->pool, r->subprocess_env);
           rnew->headers_out     = apr_table_make(rnew->pool, 5);
           rnew->err_headers_out = apr_table_make(rnew->pool, 5);
      +    rnew->trailers_out    = apr_table_make(rnew->pool, 5);
           rnew->notes           = apr_table_make(rnew->pool, 5);
       
           rnew->expecting_100   = r->expecting_100;
      @@ -1263,8 +1542,8 @@ AP_DECLARE(void) ap_note_auth_failure(request_rec *r)
               ap_run_note_auth_failure(r, type);
           }
           else {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                      0, r, "need AuthType to note auth failure: %s", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00571)
      +                      "need AuthType to note auth failure: %s", r->uri);
           }
       }
       
      @@ -1290,8 +1569,8 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
               return DECLINED;
       
           if (!ap_auth_name(r)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR,
      -                      0, r, "need AuthName: %s", r->uri);
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00572) 
      +                      "need AuthName: %s", r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
       
      @@ -1302,7 +1581,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
       
           if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) {
               /* Client tried to authenticate using wrong auth scheme */
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00573)
                             "client used wrong authentication scheme: %s", r->uri);
               ap_note_auth_failure(r);
               return HTTP_UNAUTHORIZED;
      @@ -1396,7 +1675,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(
                       continue;
                   }
                   else {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00574)
                                     "ap_content_length_filter: "
                                     "apr_bucket_read() failed");
                       return rv;
      @@ -1462,8 +1741,10 @@ AP_DECLARE(apr_status_t) ap_send_fd(apr_file_t *fd, request_rec *r,
       
       #if APR_HAS_MMAP
       /* send data from an in-memory buffer */
      -AP_DECLARE(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
      -                                size_t length)
      +AP_DECLARE(apr_size_t) ap_send_mmap(apr_mmap_t *mm,
      +                                    request_rec *r,
      +                                    apr_size_t offset,
      +                                    apr_size_t length)
       {
           conn_rec *c = r->connection;
           apr_bucket_brigade *bb = NULL;
      @@ -1592,7 +1873,8 @@ struct ap_vrprintf_data {
           char *buff;
       };
       
      -static apr_status_t r_flush(apr_vformatter_buff_t *buff)
      +/* Flush callback for apr_vformatter; returns -1 on error. */
      +static int r_flush(apr_vformatter_buff_t *buff)
       {
           /* callback function passed to ap_vformatter to be called when
            * vformatter needs to write into buff and buff.curpos > buff.endpos */
      @@ -1613,7 +1895,7 @@ static apr_status_t r_flush(apr_vformatter_buff_t *buff)
           vd->vbuff.curpos = vd->buff;
           vd->vbuff.endpos = vd->buff + AP_IOBUFSIZE;
       
      -    return APR_SUCCESS;
      +    return 0;
       }
       
       AP_DECLARE(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
      @@ -1746,12 +2028,12 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
           char *status_line = NULL;
           request_rec *rr;
       
      -    if (r->proto_num < 1001) {
      +    if (r->proto_num < HTTP_VERSION(1,1)) {
               /* don't send interim response to HTTP/1.0 Client */
               return;
           }
           if (!ap_is_HTTP_INFO(r->status)) {
      -        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00575)
                             "Status is %d - not sending interim response", r->status);
               return;
           }
      @@ -1788,6 +2070,213 @@ AP_DECLARE(void) ap_send_interim_response(request_rec *r, int send_headers)
           apr_brigade_destroy(x.bb);
       }
       
      +/*
      + * Compare two protocol identifier. Result is similar to strcmp():
      + * 0 gives same precedence, >0 means proto1 is preferred.
      + */
      +static int protocol_cmp(const apr_array_header_t *preferences,
      +                        const char *proto1,
      +                        const char *proto2)
      +{
      +    if (preferences && preferences->nelts > 0) {
      +        int index1 = ap_array_str_index(preferences, proto1, 0);
      +        int index2 = ap_array_str_index(preferences, proto2, 0);
      +        if (index2 > index1) {
      +            return (index1 >= 0) ? 1 : -1;
      +        }
      +        else if (index1 > index2) {
      +            return (index2 >= 0) ? -1 : 1;
      +        }
      +    }
      +    /* both have the same index (mabye -1 or no pref configured) and we compare
      +     * the names so that spdy3 gets precedence over spdy2. That makes
      +     * the outcome at least deterministic. */
      +    return strcmp(proto1, proto2);
      +}
      +
      +AP_DECLARE(const char *) ap_get_protocol(conn_rec *c)
      +{
      +    const char *protocol = ap_run_protocol_get(c);
      +    return protocol? protocol : AP_PROTOCOL_HTTP1;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_get_protocol_upgrades(conn_rec *c, request_rec *r, 
      +                                                  server_rec *s, int report_all, 
      +                                                  const apr_array_header_t **pupgrades)
      +{
      +    apr_pool_t *pool = r? r->pool : c->pool;
      +    core_server_config *conf;
      +    const char *existing;
      +    apr_array_header_t *upgrades = NULL;
      +
      +    if (!s) {
      +        s = (r? r->server : c->base_server);
      +    }
      +    conf = ap_get_core_module_config(s->module_config);
      +    
      +    if (conf->protocols->nelts > 0) {
      +        existing = ap_get_protocol(c);
      +        if (conf->protocols->nelts > 1 
      +            || !ap_array_str_contains(conf->protocols, existing)) {
      +            int i;
      +            
      +            /* possibly more than one choice or one, but not the
      +             * existing. (TODO: maybe 426 and Upgrade then?) */
      +            upgrades = apr_array_make(pool, conf->protocols->nelts + 1, 
      +                                      sizeof(char *));
      +            for (i = 0; i < conf->protocols->nelts; i++) {
      +                const char *p = APR_ARRAY_IDX(conf->protocols, i, char *);
      +                if (strcmp(existing, p)) {
      +                    /* not the one we have and possible, add in this order */
      +                    APR_ARRAY_PUSH(upgrades, const char*) = p;
      +                }
      +                else if (!report_all) {
      +                    break;
      +                }
      +            }
      +        }
      +    }
      +    
      +    *pupgrades = upgrades;
      +    return APR_SUCCESS;
      +}
      +
      +AP_DECLARE(const char *) ap_select_protocol(conn_rec *c, request_rec *r, 
      +                                            server_rec *s,
      +                                            const apr_array_header_t *choices)
      +{
      +    apr_pool_t *pool = r? r->pool : c->pool;
      +    core_server_config *conf;
      +    const char *protocol = NULL, *existing;
      +    apr_array_header_t *proposals;
      +
      +    if (!s) {
      +        s = (r? r->server : c->base_server);
      +    }
      +    conf = ap_get_core_module_config(s->module_config);
      +    
      +    if (APLOGcdebug(c)) {
      +        const char *p = apr_array_pstrcat(pool, conf->protocols, ',');
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03155) 
      +                      "select protocol from %s, choices=%s for server %s", 
      +                      p, apr_array_pstrcat(pool, choices, ','),
      +                      s->server_hostname);
      +    }
      +
      +    if (conf->protocols->nelts <= 0) {
      +        /* nothing configured, by default, we only allow http/1.1 here.
      +         * For now...
      +         */
      +        if (ap_array_str_contains(choices, AP_PROTOCOL_HTTP1)) {
      +            return AP_PROTOCOL_HTTP1;
      +        }
      +        else {
      +            return NULL;
      +        }
      +    }
      +
      +    proposals = apr_array_make(pool, choices->nelts + 1, sizeof(char *));
      +    ap_run_protocol_propose(c, r, s, choices, proposals);
      +
      +    /* If the existing protocol has not been proposed, but is a choice,
      +     * add it to the proposals implicitly.
      +     */
      +    existing = ap_get_protocol(c);
      +    if (!ap_array_str_contains(proposals, existing)
      +        && ap_array_str_contains(choices, existing)) {
      +        APR_ARRAY_PUSH(proposals, const char*) = existing;
      +    }
      +
      +    if (proposals->nelts > 0) {
      +        int i;
      +        const apr_array_header_t *prefs = NULL;
      +
      +        /* Default for protocols_honor_order is 'on' or != 0 */
      +        if (conf->protocols_honor_order == 0 && choices->nelts > 0) {
      +            prefs = choices;
      +        }
      +        else {
      +            prefs = conf->protocols;
      +        }
      +
      +        /* Select the most preferred protocol */
      +        if (APLOGcdebug(c)) {
      +            ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03156) 
      +                          "select protocol, proposals=%s preferences=%s configured=%s", 
      +                          apr_array_pstrcat(pool, proposals, ','),
      +                          apr_array_pstrcat(pool, prefs, ','),
      +                          apr_array_pstrcat(pool, conf->protocols, ','));
      +        }
      +        for (i = 0; i < proposals->nelts; ++i) {
      +            const char *p = APR_ARRAY_IDX(proposals, i, const char *);
      +            if (!ap_array_str_contains(conf->protocols, p)) {
      +                /* not a configured protocol here */
      +                continue;
      +            }
      +            else if (!protocol 
      +                     || (protocol_cmp(prefs, protocol, p) < 0)) {
      +                /* none selected yet or this one has preference */
      +                protocol = p;
      +            }
      +        }
      +    }
      +    if (APLOGcdebug(c)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03157)
      +                      "selected protocol=%s", 
      +                      protocol? protocol : "(none)");
      +    }
      +
      +    return protocol;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_switch_protocol(conn_rec *c, request_rec *r, 
      +                                            server_rec *s,
      +                                            const char *protocol)
      +{
      +    const char *current = ap_get_protocol(c);
      +    int rc;
      +    
      +    if (!strcmp(current, protocol)) {
      +        ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, c, APLOGNO(02906)
      +                      "already at it, protocol_switch to %s", 
      +                      protocol);
      +        return APR_SUCCESS;
      +    }
      +    
      +    rc = ap_run_protocol_switch(c, r, s, protocol);
      +    switch (rc) {
      +        case DECLINED:
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02907)
      +                          "no implementation for protocol_switch to %s", 
      +                          protocol);
      +            return APR_ENOTIMPL;
      +        case OK:
      +        case DONE:
      +            return APR_SUCCESS;
      +        default:
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02905)
      +                          "unexpected return code %d from protocol_switch to %s"
      +                          , rc, protocol);
      +            return APR_EOF;
      +    }    
      +}
      +
      +AP_DECLARE(int) ap_is_allowed_protocol(conn_rec *c, request_rec *r,
      +                                       server_rec *s, const char *protocol)
      +{
      +    core_server_config *conf;
      +
      +    if (!s) {
      +        s = (r? r->server : c->base_server);
      +    }
      +    conf = ap_get_core_module_config(s->module_config);
      +    
      +    if (conf->protocols->nelts > 0) {
      +        return ap_array_str_contains(conf->protocols, protocol);
      +    }
      +    return !strcmp(AP_PROTOCOL_HTTP1, protocol);
      +}
      +
       
       AP_IMPLEMENT_HOOK_VOID(pre_read_request,
                              (request_rec *r, conn_rec *c),
      @@ -1803,3 +2292,14 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(unsigned short,default_port,
       AP_IMPLEMENT_HOOK_RUN_FIRST(int, note_auth_failure,
                                   (request_rec *r, const char *auth_type),
                                   (r, auth_type), DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_ALL(int,protocol_propose,
      +                          (conn_rec *c, request_rec *r, server_rec *s,
      +                           const apr_array_header_t *offers,
      +                           apr_array_header_t *proposals), 
      +                          (c, r, s, offers, proposals), OK, DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_FIRST(int,protocol_switch,
      +                            (conn_rec *c, request_rec *r, server_rec *s,
      +                             const char *protocol), 
      +                            (c, r, s, protocol), DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_FIRST(const char *,protocol_get,
      +                            (const conn_rec *c), (c), NULL)
      diff --git a/server/provider.c b/server/provider.c
      index a5406ab1e8d..cf307e7c72f 100644
      --- a/server/provider.c
      +++ b/server/provider.c
      @@ -42,7 +42,7 @@ AP_DECLARE(apr_status_t) ap_register_provider(apr_pool_t *pool,
       
           if (global_providers == NULL) {
               global_providers = apr_hash_make(pool);
      -        global_providers_names = apr_hash_make(pool);;
      +        global_providers_names = apr_hash_make(pool);
               apr_pool_cleanup_register(pool, NULL, cleanup_global_providers,
                                         apr_pool_cleanup_null);
           }
      @@ -136,7 +136,7 @@ AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool,
           ap_list_provider_names_t *entry;
           apr_hash_t *provider_group_hash, *h;
           apr_hash_index_t *hi;
      -    char *val, *key;
      +    char *val;
       
           if (global_providers_names == NULL) {
               return ret;
      @@ -157,9 +157,41 @@ AP_DECLARE(apr_array_header_t *) ap_list_provider_names(apr_pool_t *pool,
           }
       
           for (hi = apr_hash_first(pool, h); hi; hi = apr_hash_next(hi)) {
      -        apr_hash_this(hi, (void *)&key, NULL, (void *)&val);
      +        apr_hash_this(hi, NULL, NULL, (void *)&val);
               entry = apr_array_push(ret);
               entry->provider_name = apr_pstrdup(pool, val);
           }
           return ret;
       }
      +
      +AP_DECLARE(apr_array_header_t *) ap_list_provider_groups(apr_pool_t *pool)
      +{
      +    apr_array_header_t *ret = apr_array_make(pool, 10, sizeof(ap_list_provider_groups_t));
      +    ap_list_provider_groups_t *entry;
      +    apr_hash_t *provider_group_hash;
      +    apr_hash_index_t *groups_hi, *vers_hi;
      +    char *group, *version;
      +
      +    if (global_providers_names == NULL)
      +        return ret;
      +
      +    for (groups_hi = apr_hash_first(pool, global_providers_names);
      +         groups_hi;
      +         groups_hi = apr_hash_next(groups_hi))
      +    {
      +        apr_hash_this(groups_hi, (void *)&group, NULL, (void *)&provider_group_hash);
      +        if (provider_group_hash == NULL)
      +            continue;
      +        for (vers_hi = apr_hash_first(pool, provider_group_hash);
      +             vers_hi;
      +             vers_hi = apr_hash_next(vers_hi))
      +        {
      +            apr_hash_this(vers_hi, (void *)&version, NULL, NULL);
      +
      +            entry = apr_array_push(ret);
      +            entry->provider_group = group;
      +            entry->provider_version = version;
      +        }
      +    }
      +    return ret;
      +}
      diff --git a/server/request.c b/server/request.c
      index f8f0605674a..9377836e0f5 100644
      --- a/server/request.c
      +++ b/server/request.c
      @@ -69,6 +69,9 @@ APR_HOOK_STRUCT(
           APR_HOOK_LINK(auth_checker)
           APR_HOOK_LINK(insert_filter)
           APR_HOOK_LINK(create_request)
      +    APR_HOOK_LINK(post_perdir_config)
      +    APR_HOOK_LINK(dirwalk_stat)
      +    APR_HOOK_LINK(force_authn)
       )
       
       AP_IMPLEMENT_HOOK_RUN_FIRST(int,translate_name,
      @@ -90,6 +93,13 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(int,auth_checker,
       AP_IMPLEMENT_HOOK_VOID(insert_filter, (request_rec *r), (r))
       AP_IMPLEMENT_HOOK_RUN_ALL(int, create_request,
                                 (request_rec *r), (r), OK, DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_ALL(int, post_perdir_config,
      +                          (request_rec *r), (r), OK, DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_FIRST(apr_status_t,dirwalk_stat,
      +                            (apr_finfo_t *finfo, request_rec *r, apr_int32_t wanted),
      +                            (finfo, r, wanted), AP_DECLINED)
      +AP_IMPLEMENT_HOOK_RUN_FIRST(int,force_authn,
      +                          (request_rec *r), (r), DECLINED)
       
       static int auth_internal_per_conf = 0;
       static int auth_internal_per_conf_hooks = 0;
      @@ -99,7 +109,7 @@ static int auth_internal_per_conf_providers = 0;
       static int decl_die(int status, const char *phase, request_rec *r)
       {
           if (status == DECLINED) {
      -        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(00025)
                             "configuration error:  couldn't %s: %s", phase, r->uri);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
      @@ -111,6 +121,39 @@ static int decl_die(int status, const char *phase, request_rec *r)
           }
       }
       
      +AP_DECLARE(int) ap_some_authn_required(request_rec *r)
      +{
      +    int access_status;
      +
      +    switch (ap_satisfies(r)) {
      +    case SATISFY_ALL:
      +    case SATISFY_NOSPEC:
      +        if ((access_status = ap_run_access_checker(r)) != OK) {
      +            break;
      +        }
      +
      +        access_status = ap_run_access_checker_ex(r);
      +        if (access_status == DECLINED) {
      +            return TRUE;
      +        }
      +
      +        break;
      +    case SATISFY_ANY:
      +        if ((access_status = ap_run_access_checker(r)) == OK) {
      +            break;
      +        }
      +
      +        access_status = ap_run_access_checker_ex(r);
      +        if (access_status == DECLINED) {
      +            return TRUE;
      +        }
      +
      +        break;
      +    }
      +
      +    return FALSE;
      +}
      +
       /* This is the master logic for processing requests.  Do NOT duplicate
        * this logic elsewhere, or the security model will be broken by future
        * API changes.  Each phase must be individually optimized to pick up
      @@ -134,7 +177,7 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
               if (access_status) {
                   if (access_status == HTTP_NOT_FOUND) {
                       if (! d->allow_encoded_slashes) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00026)
                                         "found %%2f (encoded '/') in URI "
                                         "(decoded='%s'), returning 404",
                                         r->parsed_uri.path);
      @@ -191,6 +234,10 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
               r->log = d->log;
           }
       
      +    if ((access_status = ap_run_post_perdir_config(r))) {
      +        return access_status;
      +    }
      +
           /* Only on the main request! */
           if (r->main == NULL) {
               if ((access_status = ap_run_header_parser(r))) {
      @@ -221,22 +268,17 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
                   }
       
                   access_status = ap_run_access_checker_ex(r);
      -            if (access_status == OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      -                              "request authorized without authentication by "
      -                              "access_checker_ex hook: %s", r->uri);
      -            }
      -            else if (access_status != DECLINED) {
      -                return decl_die(access_status, "check access", r);
      -            }
      -            else {
      +            if (access_status == DECLINED
      +                || (access_status == OK && ap_run_force_authn(r) == OK)) {
                       if ((access_status = ap_run_check_user_id(r)) != OK) {
                           return decl_die(access_status, "check user", r);
                       }
                       if (r->user == NULL) {
                           /* don't let buggy authn module crash us in authz */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                                  "Buggy authn provider failed to set user for %s",
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00027)
      +                                  "No authentication done but request not "
      +                                  "allowed without authentication for %s. "
      +                                  "Authentication not configured?",
                                         r->uri);
                           access_status = HTTP_INTERNAL_SERVER_ERROR;
                           return decl_die(access_status, "check user", r);
      @@ -245,6 +287,14 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
                           return decl_die(access_status, "check authorization", r);
                       }
                   }
      +            else if (access_status == OK) {
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                              "request authorized without authentication by "
      +                              "access_checker_ex hook: %s", r->uri);
      +            }
      +            else {
      +                return decl_die(access_status, "check access", r);
      +            }
                   break;
               case SATISFY_ANY:
                   if ((access_status = ap_run_access_checker(r)) == OK) {
      @@ -256,22 +306,17 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
                   }
       
                   access_status = ap_run_access_checker_ex(r);
      -            if (access_status == OK) {
      -                ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      -                              "request authorized without authentication by "
      -                              "access_checker_ex hook: %s", r->uri);
      -            }
      -            else if (access_status != DECLINED) {
      -                return decl_die(access_status, "check access", r);
      -            }
      -            else {
      +            if (access_status == DECLINED
      +                || (access_status == OK && ap_run_force_authn(r) == OK)) {
                       if ((access_status = ap_run_check_user_id(r)) != OK) {
                           return decl_die(access_status, "check user", r);
                       }
                       if (r->user == NULL) {
                           /* don't let buggy authn module crash us in authz */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                                  "Buggy authn provider failed to set user for %s",
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00028)
      +                                  "No authentication done but request not "
      +                                  "allowed without authentication for %s. "
      +                                  "Authentication not configured?",
                                         r->uri);
                           access_status = HTTP_INTERNAL_SERVER_ERROR;
                           return decl_die(access_status, "check user", r);
      @@ -280,6 +325,14 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
                           return decl_die(access_status, "check authorization", r);
                       }
                   }
      +            else if (access_status == OK) {
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE3, 0, r,
      +                              "request authorized without authentication by "
      +                              "access_checker_ex hook: %s", r->uri);
      +            }
      +            else {
      +                return decl_die(access_status, "check access", r);
      +            }
                   break;
               }
           }
      @@ -515,10 +568,9 @@ static void core_opts_merge(const ap_conf_vector_t *sec, core_opts_t *opts)
               opts->override_opts = this_dir->override_opts;
           }
       
      -   if (this_dir->override_list != NULL) {
      +    if (this_dir->override_list != NULL) {
               opts->override_list = this_dir->override_list;
      -   }
      -
      +    }
       }
       
       
      @@ -558,10 +610,10 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
            * handler.  Leave INFO notes here for module debugging.
            */
           if (r->filename == NULL) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00029)
                             "Module bug?  Request filename is missing for URI %s",
                             r->uri);
      -       return OK;
      +        return OK;
           }
       
           /* Canonicalize the file path without resolving filename case or aliases
      @@ -571,7 +623,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
           if ((rv = apr_filepath_merge(&entry_dir, NULL, r->filename,
                                        APR_FILEPATH_NOTRELATIVE, r->pool))
                         != APR_SUCCESS) {
      -        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00030)
                             "Module bug?  Request filename path %s is invalid or "
                             "or not absolute for uri %s",
                             r->filename, r->uri);
      @@ -598,7 +650,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
            * with APR_ENOENT, knowing that the path is good.
            */
           if (r->finfo.filetype == APR_NOFILE || r->finfo.filetype == APR_LNK) {
      -        rv = apr_stat(&r->finfo, r->filename, APR_FINFO_MIN, r->pool);
      +        rv = ap_run_dirwalk_stat(&r->finfo, r, APR_FINFO_MIN);
       
               /* some OSs will return APR_SUCCESS/APR_REG if we stat
                * a regular file but we have '/' at the end of the name;
      @@ -664,9 +716,8 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                    * check.
                    */
                   if (!(opts & OPT_SYM_LINKS)) {
      -                rv = apr_stat(&thisinfo, r->filename,
      -                              APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
      -                              r->pool);
      +                rv = ap_run_dirwalk_stat(&thisinfo, r,
      +                                         APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK);
                       /*
                        * APR_INCOMPLETE is as fine as result as APR_SUCCESS as we
                        * have added APR_FINFO_NAME to the wanted parameter of
      @@ -683,7 +734,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                            * with a HTTP_FORBIDDEN in case we hit a race condition
                            * here.
                            */
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00031)
                                         "access to %s failed; stat of '%s' failed.",
                                         r->uri, r->filename);
                           return r->status = HTTP_FORBIDDEN;
      @@ -692,7 +743,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                           /* Is this a possibly acceptable symlink? */
                           if ((res = resolve_symlink(r->filename, &thisinfo,
                                                      opts, r->pool)) != OK) {
      -                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00032)
                                             "Symbolic link not allowed "
                                             "or link target not accessible: %s",
                                             r->filename);
      @@ -723,6 +774,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
               apr_size_t buflen;
               char *buf;
               unsigned int seg, startseg;
      +        apr_pool_t *rxpool = NULL;
       
               /* Invariant: from the first time filename_len is set until
                * it goes out of scope, filename_len==strlen(r->filename)
      @@ -750,7 +802,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
       
               /* Set aside path_info to merge back onto path_info later.
                * If r->filename is a directory, we must remerge the path_info,
      -         * before we continue!  [Directories cannot, by defintion, have
      +         * before we continue!  [Directories cannot, by definition, have
                * path info.  Either the next segment is not-found, or a file.]
                *
                * r->path_info tracks the unconsumed source path.
      @@ -762,7 +814,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                                                r->path_info,
                                                APR_FILEPATH_NOTABOVEROOT, r->pool))
                       != APR_SUCCESS) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00033)
                                     "dir_walk error, path_info %s is not relative "
                                     "to the filename path %s for uri %s",
                                     r->path_info, r->filename, r->uri);
      @@ -829,7 +881,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
       #endif
       
               if (rv != APR_SUCCESS) {
      -            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      +            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00034)
                                 "dir_walk error, could not determine the root "
                                 "path of filename %s%s for uri %s",
                                 r->filename, r->path_info, r->uri);
      @@ -953,15 +1005,16 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       /* No htaccess in an incomplete root path,
                        * nor if it's disabled
                        */
      -                if (seg < startseg || (!opts.override && opts.override_list == NULL)) {
      +                if (seg < startseg || (!opts.override 
      +                    && apr_is_empty_table(opts.override_list)
      +                    )) {
                           break;
                       }
       
       
                       res = ap_parse_htaccess(&htaccess_conf, r, opts.override,
                                               opts.override_opts, opts.override_list,
      -                                        apr_pstrdup(r->pool, r->filename),
      -                                        sconf->access_name);
      +                                        r->filename, sconf->access_name);
                       if (res) {
                           return res;
                       }
      @@ -1033,7 +1086,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                   seg_name = r->filename + filename_len;
                   delim = strchr(r->path_info + (*r->path_info == '/' ? 1 : 0), '/');
                   if (delim) {
      -                size_t path_info_len = delim - r->path_info;
      +                apr_size_t path_info_len = delim - r->path_info;
                       *delim = '\0';
                       memcpy(seg_name, r->path_info, path_info_len + 1);
                       filename_len += path_info_len;
      @@ -1041,7 +1094,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       *delim = '/';
                   }
                   else {
      -                size_t path_info_len = strlen(r->path_info);
      +                apr_size_t path_info_len = strlen(r->path_info);
                       memcpy(seg_name, r->path_info, path_info_len + 1);
                       filename_len += path_info_len;
                       r->path_info += path_info_len;
      @@ -1081,9 +1134,8 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                    * the name of its target, if we are fixing the filename
                    * case/resolving aliases.
                    */
      -            rv = apr_stat(&thisinfo, r->filename,
      -                          APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
      -                          r->pool);
      +            rv = ap_run_dirwalk_stat(&thisinfo, r,
      +                                     APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK);
       
                   if (APR_STATUS_IS_ENOENT(rv)) {
                       /* Nothing?  That could be nice.  But our directory
      @@ -1093,10 +1145,10 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       break;
                   }
                   else if (APR_STATUS_IS_EACCES(rv)) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                              "access to %s denied because search "
      -                              "permissions are missing on a component "
      -                              "of the path", r->uri);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00035)
      +                              "access to %s denied (filesystem path '%s') "
      +                              "because search permissions are missing on a "
      +                              "component of the path", r->uri, r->filename);
                       return r->status = HTTP_FORBIDDEN;
                   }
                   else if ((rv != APR_SUCCESS && rv != APR_INCOMPLETE)
      @@ -1104,8 +1156,9 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       /* If we hit ENOTDIR, we must have over-optimized, deny
                        * rather than assume not found.
                        */
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
      -                              "access to %s failed", r->uri);
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00036)
      +                              "access to %s failed (filesystem path '%s')", 
      +                              r->uri, r->filename);
                       return r->status = HTTP_FORBIDDEN;
                   }
       
      @@ -1126,7 +1179,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                        */
                       if ((res = resolve_symlink(r->filename, &thisinfo,
                                                  opts.opts, r->pool)) != OK) {
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00037)
                                         "Symbolic link not allowed "
                                         "or link target not accessible: %s",
                                         r->filename);
      @@ -1143,7 +1196,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       break;
                   }
                   else if (thisinfo.filetype != APR_DIR) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00038)
                                     "Forbidden: %s doesn't point to "
                                     "a file or directory",
                                     r->filename);
      @@ -1178,6 +1231,10 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                */
               for (; sec_idx < num_sec; ++sec_idx) {
       
      +            int nmatch = 0;
      +            int i;
      +            ap_regmatch_t *pmatch = NULL;
      +
                   core_dir_config *entry_core;
                   entry_core = ap_get_core_module_config(sec_ent[sec_idx]);
       
      @@ -1185,10 +1242,29 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                       continue;
                   }
       
      -            if (ap_regexec(entry_core->r, r->filename, 0, NULL, 0)) {
      +            if (entry_core->refs && entry_core->refs->nelts) {
      +                if (!rxpool) {
      +                    apr_pool_create(&rxpool, r->pool);
      +                }
      +                nmatch = entry_core->refs->nelts;
      +                pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
      +            }
      +
      +            if (ap_regexec(entry_core->r, r->filename, nmatch, pmatch, 0)) {
                       continue;
                   }
       
      +            for (i = 0; i < nmatch; i++) {
      +                if (pmatch[i].rm_so >= 0 && pmatch[i].rm_eo >= 0 &&
      +                    ((const char **)entry_core->refs->elts)[i]) {
      +                    apr_table_setn(r->subprocess_env, 
      +                                   ((const char **)entry_core->refs->elts)[i],
      +                                   apr_pstrndup(r->pool,
      +                                   r->filename + pmatch[i].rm_so,
      +                                   pmatch[i].rm_eo - pmatch[i].rm_so));
      +                }
      +            }
      +
                   /* If we haven't already continue'd above, we have a match.
                    *
                    * Calculate our full-context core opts & override.
      @@ -1227,6 +1303,10 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r)
                   last_walk->merged = now_merged;
               }
       
      +        if (rxpool) {
      +            apr_pool_destroy(rxpool);
      +        }
      +
               /* Whoops - everything matched in sequence, but either the original
                * walk found some additional matches (which we need to truncate), or
                * this walk found some additional matches.
      @@ -1364,6 +1444,7 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
               int matches = cache->walked->nelts;
               int cached_matches = matches;
               walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
      +        apr_pool_t *rxpool = NULL;
       
               cached &= auth_internal_per_conf;
               cache->cached = entry_uri;
      @@ -1385,16 +1466,48 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
                    * not slash terminated, then this uri must be slash
                    * terminated (or at the end of the string) to match.
                    */
      -            if (entry_core->r
      -                ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0)
      -                : (entry_core->d_is_fnmatch
      +            if (entry_core->r) {
      +
      +                int nmatch = 0;
      +                int i;
      +                ap_regmatch_t *pmatch = NULL;
      +
      +                if (entry_core->refs && entry_core->refs->nelts) {
      +                    if (!rxpool) {
      +                        apr_pool_create(&rxpool, r->pool);
      +                    }
      +                    nmatch = entry_core->refs->nelts;
      +                    pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
      +                }
      +
      +                if (ap_regexec(entry_core->r, r->uri, nmatch, pmatch, 0)) {
      +                    continue;
      +                }
      +
      +                for (i = 0; i < nmatch; i++) {
      +                    if (pmatch[i].rm_so >= 0 && pmatch[i].rm_eo >= 0 && 
      +                        ((const char **)entry_core->refs->elts)[i]) {
      +                        apr_table_setn(r->subprocess_env,
      +                                       ((const char **)entry_core->refs->elts)[i],
      +                                       apr_pstrndup(r->pool,
      +                                       r->uri + pmatch[i].rm_so,
      +                                       pmatch[i].rm_eo - pmatch[i].rm_so));
      +                    }
      +                }
      +
      +            }
      +            else {
      +
      +                if ((entry_core->d_is_fnmatch
                          ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
                          : (strncmp(entry_core->d, cache->cached, len)
                             || (len > 0
                                 && entry_core->d[len - 1] != '/'
                                 && cache->cached[len] != '/'
                                 && cache->cached[len] != '\0')))) {
      -                continue;
      +                    continue;
      +                }
      +
                   }
       
                   /* If we merged this same section last time, reuse it
      @@ -1429,6 +1542,10 @@ AP_DECLARE(int) ap_location_walk(request_rec *r)
                   last_walk->merged = now_merged;
               }
       
      +        if (rxpool) {
      +            apr_pool_destroy(rxpool);
      +        }
      +
               /* Whoops - everything matched in sequence, but either the original
                * walk found some additional matches (which we need to truncate), or
                * this walk found some additional matches.
      @@ -1538,6 +1655,7 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
               int matches = cache->walked->nelts;
               int cached_matches = matches;
               walk_walked_t *last_walk = (walk_walked_t*)cache->walked->elts;
      +        apr_pool_t *rxpool = NULL;
       
               cached &= auth_internal_per_conf;
               cache->cached = test_file;
      @@ -1550,12 +1668,42 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
                   core_dir_config *entry_core;
                   entry_core = ap_get_core_module_config(sec_ent[sec_idx]);
       
      -            if (entry_core->r
      -                ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
      -                : (entry_core->d_is_fnmatch
      -                   ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
      -                   : strcmp(entry_core->d, cache->cached))) {
      -                continue;
      +            if (entry_core->r) {
      +
      +                int nmatch = 0;
      +                int i;
      +                ap_regmatch_t *pmatch = NULL;
      +
      +                if (entry_core->refs && entry_core->refs->nelts) {
      +                    if (!rxpool) {
      +                        apr_pool_create(&rxpool, r->pool);
      +                    }
      +                    nmatch = entry_core->refs->nelts;
      +                    pmatch = apr_palloc(rxpool, nmatch*sizeof(ap_regmatch_t));
      +                }
      +
      +                if (ap_regexec(entry_core->r, cache->cached, nmatch, pmatch, 0)) {
      +                    continue;
      +                }
      +
      +                for (i = 0; i < nmatch; i++) {
      +                    if (pmatch[i].rm_so >= 0 && pmatch[i].rm_eo >= 0 && 
      +                        ((const char **)entry_core->refs->elts)[i]) {
      +                        apr_table_setn(r->subprocess_env,
      +                                       ((const char **)entry_core->refs->elts)[i],
      +                                       apr_pstrndup(r->pool,
      +                                       cache->cached + pmatch[i].rm_so,
      +                                       pmatch[i].rm_eo - pmatch[i].rm_so));
      +                    }
      +                }
      +
      +            }
      +            else {
      +                if ((entry_core->d_is_fnmatch
      +                       ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
      +                       : strcmp(entry_core->d, cache->cached))) {
      +                    continue;
      +                }
                   }
       
                   /* If we merged this same section last time, reuse it
      @@ -1590,6 +1738,10 @@ AP_DECLARE(int) ap_file_walk(request_rec *r)
                   last_walk->merged = now_merged;
               }
       
      +        if (rxpool) {
      +            apr_pool_destroy(rxpool);
      +        }
      +
               /* Whoops - everything matched in sequence, but either the original
                * walk found some additional matches (which we need to truncate), or
                * this walk found some additional matches.
      @@ -1679,7 +1831,7 @@ AP_DECLARE(int) ap_if_walk(request_rec *r)
                   rc = ap_expr_exec(r, entry_core->condition, &err);
                   if (rc <= 0) {
                       if (rc < 0)
      -                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00039)
                                         "Failed to evaluate <If > condition: %s",
                                         err);
                       prev_result = 0;
      @@ -1808,6 +1960,8 @@ static request_rec *make_sub_request(const request_rec *r,
       
           /* start with the same set of output filters */
           if (next_filter) {
      +        ap_filter_t *scan = next_filter;
      +
               /* while there are no input filters for a subrequest, we will
                * try to insert some, so if we don't have valid data, the code
                * will seg fault.
      @@ -1816,8 +1970,16 @@ static request_rec *make_sub_request(const request_rec *r,
               rnew->proto_input_filters = r->proto_input_filters;
               rnew->output_filters = next_filter;
               rnew->proto_output_filters = r->proto_output_filters;
      -        ap_add_output_filter_handle(ap_subreq_core_filter_handle,
      -                                    NULL, rnew, rnew->connection);
      +        while (scan && (scan != r->proto_output_filters)) {
      +            if (scan->frec == ap_subreq_core_filter_handle) {
      +                break;
      +            }
      +            scan = scan->next;
      +        }
      +        if (!scan || scan == r->proto_output_filters) {
      +            ap_add_output_filter_handle(ap_subreq_core_filter_handle,
      +                    NULL, rnew, rnew->connection);
      +        }
           }
           else {
               /* If NULL - we are expecting to be internal_fast_redirect'ed
      @@ -1832,6 +1994,9 @@ static request_rec *make_sub_request(const request_rec *r,
               rnew->output_filters = r->proto_output_filters;
           }
       
      +    rnew->useragent_addr = r->useragent_addr;
      +    rnew->useragent_ip = r->useragent_ip;
      +
           /* no input filters for a subrequest */
       
           ap_set_sub_req_protocol(rnew, r);
      diff --git a/server/scoreboard.c b/server/scoreboard.c
      index 56246e465d7..d83a8492c30 100644
      --- a/server/scoreboard.c
      +++ b/server/scoreboard.c
      @@ -32,6 +32,7 @@
       #include "http_main.h"
       #include "http_core.h"
       #include "http_config.h"
      +#include "http_protocol.h"
       #include "ap_mpm.h"
       
       #include "scoreboard.h"
      @@ -42,6 +43,7 @@
       
       AP_DECLARE_DATA scoreboard *ap_scoreboard_image = NULL;
       AP_DECLARE_DATA const char *ap_scoreboard_fname = NULL;
      +static ap_scoreboard_e scoreboard_type;
       
       const char * ap_set_scoreboard(cmd_parms *cmd, void *dummy,
                                      const char *arg)
      @@ -128,38 +130,46 @@ static apr_status_t ap_cleanup_shared_mem(void *d)
           return APR_SUCCESS;
       }
       
      +#define SIZE_OF_scoreboard    APR_ALIGN_DEFAULT(sizeof(scoreboard))
      +#define SIZE_OF_global_score  APR_ALIGN_DEFAULT(sizeof(global_score))
      +#define SIZE_OF_process_score APR_ALIGN_DEFAULT(sizeof(process_score))
      +#define SIZE_OF_worker_score  APR_ALIGN_DEFAULT(sizeof(worker_score))
      +
       AP_DECLARE(int) ap_calc_scoreboard_size(void)
       {
           ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
           ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
       
      -    scoreboard_size = sizeof(global_score);
      -    scoreboard_size += sizeof(process_score) * server_limit;
      -    scoreboard_size += sizeof(worker_score) * server_limit * thread_limit;
      -
      -    pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
      +    scoreboard_size  = SIZE_OF_global_score;
      +    scoreboard_size += SIZE_OF_process_score * server_limit;
      +    scoreboard_size += SIZE_OF_worker_score * server_limit * thread_limit;
       
           return scoreboard_size;
       }
       
      -void ap_init_scoreboard(void *shared_score)
      +AP_DECLARE(void) ap_init_scoreboard(void *shared_score)
       {
           char *more_storage;
           int i;
       
      +    pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
      +    if (!shared_score) {
      +        return;
      +    }
      +    
           ap_calc_scoreboard_size();
           ap_scoreboard_image =
      -        ap_calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score *));
      +        ap_calloc(1, SIZE_OF_scoreboard + server_limit * sizeof(worker_score *));
           more_storage = shared_score;
           ap_scoreboard_image->global = (global_score *)more_storage;
      -    more_storage += sizeof(global_score);
      +    more_storage += SIZE_OF_global_score;
           ap_scoreboard_image->parent = (process_score *)more_storage;
      -    more_storage += sizeof(process_score) * server_limit;
      +    more_storage += SIZE_OF_process_score * server_limit;
           ap_scoreboard_image->servers =
      -        (worker_score **)((char*)ap_scoreboard_image + sizeof(scoreboard));
      +        (worker_score **)((char*)ap_scoreboard_image + SIZE_OF_scoreboard);
           for (i = 0; i < server_limit; i++) {
               ap_scoreboard_image->servers[i] = (worker_score *)more_storage;
      -        more_storage += thread_limit * sizeof(worker_score);
      +        more_storage += thread_limit * SIZE_OF_worker_score;
           }
           ap_assert(more_storage == (char*)shared_score + scoreboard_size);
           ap_scoreboard_image->global->server_limit = server_limit;
      @@ -182,7 +192,7 @@ static apr_status_t create_namebased_scoreboard(apr_pool_t *pool,
       
           rv = apr_shm_create(&ap_scoreboard_shm, scoreboard_size, fname, pool);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00001)
                            "unable to create or access scoreboard \"%s\" "
                            "(name-based shared memory failure)", fname);
               return rv;
      @@ -207,7 +217,7 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
            */
           rv = apr_pool_create(&global_pool, NULL);
           if (rv != APR_SUCCESS) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00002)
                            "Fatal error: unable to create global pool "
                            "for use by the scoreboard");
               return rv;
      @@ -218,7 +228,7 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
               /* make sure it's an absolute pathname */
               fname = ap_server_root_relative(pconf, ap_scoreboard_fname);
               if (!fname) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EBADPATH, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, APR_EBADPATH, ap_server_conf, APLOGNO(00003)
                                "Fatal error: Invalid Scoreboard path %s",
                                ap_scoreboard_fname);
                   return APR_EBADPATH;
      @@ -229,7 +239,7 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
               rv = apr_shm_create(&ap_scoreboard_shm, scoreboard_size, NULL,
                                   global_pool); /* anonymous shared memory */
               if ((rv != APR_SUCCESS) && (rv != APR_ENOTIMPL)) {
      -            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf,
      +            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, ap_server_conf, APLOGNO(00004)
                                "Unable to create or access scoreboard "
                                "(anonymous shared memory failure)");
                   return rv;
      @@ -250,14 +260,15 @@ static apr_status_t open_scoreboard(apr_pool_t *pconf)
       /* If detach is non-zero, this is a separate child process,
        * if zero, it is a forked child.
        */
      -apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached)
      +AP_DECLARE(apr_status_t) ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm,
      +                                              int detached)
       {
       #if APR_HAS_SHARED_MEMORY
           if (!detached) {
               return APR_SUCCESS;
           }
           if (apr_shm_size_get(ap_scoreboard_shm) < scoreboard_size) {
      -        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
      +        ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, APLOGNO(00005)
                            "Fatal error: shared scoreboard too small for child!");
               apr_shm_detach(ap_scoreboard_shm);
               ap_scoreboard_shm = NULL;
      @@ -276,7 +287,7 @@ apr_status_t ap_cleanup_scoreboard(void *d)
           if (ap_scoreboard_image == NULL) {
               return APR_SUCCESS;
           }
      -    if (ap_scoreboard_image->global->sb_type == SB_SHARED) {
      +    if (scoreboard_type == SB_SHARED) {
               ap_cleanup_shared_mem(NULL);
           }
           else {
      @@ -297,16 +308,15 @@ int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type)
           apr_status_t rv;
       #endif
       
      -    pfn_ap_logio_get_last_bytes = APR_RETRIEVE_OPTIONAL_FN(ap_logio_get_last_bytes);
      -
           if (ap_scoreboard_image) {
               ap_scoreboard_image->global->restart_time = apr_time_now();
               memset(ap_scoreboard_image->parent, 0,
      -               sizeof(process_score) * server_limit);
      +               SIZE_OF_process_score * server_limit);
               for (i = 0; i < server_limit; i++) {
                   memset(ap_scoreboard_image->servers[i], 0,
      -                   sizeof(worker_score) * thread_limit);
      +                   SIZE_OF_worker_score * thread_limit);
               }
      +        ap_init_scoreboard(NULL);
               return OK;
           }
       
      @@ -329,7 +339,7 @@ int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type)
               ap_init_scoreboard(sb_mem);
           }
       
      -    ap_scoreboard_image->global->sb_type = sb_type;
      +    scoreboard_type = sb_type;
           ap_scoreboard_image->global->running_generation = 0;
           ap_scoreboard_image->global->restart_time = apr_time_now();
       
      @@ -387,9 +397,9 @@ AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sb, request_rec *r)
       AP_DECLARE(int) ap_find_child_by_pid(apr_proc_t *pid)
       {
           int i;
      -    int max_daemons_limit;
      +    int max_daemons_limit = 0;
       
      -    ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_daemons_limit);
      +    ap_mpm_query(AP_MPMQ_MAX_DAEMON_USED, &max_daemons_limit);
       
           for (i = 0; i < max_daemons_limit; ++i) {
               if (ap_scoreboard_image->parent[i].pid == pid->pid) {
      @@ -448,28 +458,29 @@ static int update_child_status_internal(int child_num,
                                               int thread_num,
                                               int status,
                                               conn_rec *c,
      -                                        request_rec *r)
      +                                        server_rec *s,
      +                                        request_rec *r,
      +                                        const char *descr)
       {
           int old_status;
           worker_score *ws;
      -    process_score *ps;
           int mpm_generation;
       
           ws = &ap_scoreboard_image->servers[child_num][thread_num];
           old_status = ws->status;
           ws->status = status;
      -
      -    ps = &ap_scoreboard_image->parent[child_num];
      -
      +    
           if (status == SERVER_READY
               && old_status == SERVER_STARTING) {
      +        process_score *ps = &ap_scoreboard_image->parent[child_num];
               ws->thread_num = child_num * thread_limit + thread_num;
               ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
               ps->generation = mpm_generation;
           }
       
           if (ap_extended_status) {
      -        ws->last_used = apr_time_now();
      +        const char *val;
      +        
               if (status == SERVER_READY || status == SERVER_DEAD) {
                   /*
                    * Reset individual counters
      @@ -480,22 +491,50 @@ static int update_child_status_internal(int child_num,
                   }
                   ws->conn_count = 0;
                   ws->conn_bytes = 0;
      +            ws->last_used = apr_time_now();
      +        }
      +
      +        if (descr) {
      +            apr_cpystrn(ws->request, descr, sizeof(ws->request));
               }
      -        if (r) {
      -            apr_cpystrn(ws->client, ap_get_remote_host(c, r->per_dir_config,
      -                        REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
      +        else if (r) {
                   copy_request(ws->request, sizeof(ws->request), r);
      -            if (r->server) {
      -                apr_cpystrn(ws->vhost, r->server->server_hostname,
      -                            sizeof(ws->vhost));
      -            }
               }
               else if (c) {
      -            apr_cpystrn(ws->client, ap_get_remote_host(c, NULL,
      -                        REMOTE_NOLOOKUP, NULL), sizeof(ws->client));
                   ws->request[0]='\0';
      +        }
      +
      +        if (r && r->useragent_ip) {
      +            if (!(val = ap_get_useragent_host(r, REMOTE_NOLOOKUP, NULL)))
      +                apr_cpystrn(ws->client, r->useragent_ip, sizeof(ws->client));
      +            else
      +                apr_cpystrn(ws->client, val, sizeof(ws->client));
      +        }
      +        else if (c) {
      +            if (!(val = ap_get_remote_host(c, c->base_server->lookup_defaults,
      +                                           REMOTE_NOLOOKUP, NULL)))
      +                apr_cpystrn(ws->client, c->client_ip, sizeof(ws->client));
      +            else
      +                apr_cpystrn(ws->client, val, sizeof(ws->client));
      +        }
      +
      +        if (s) {
      +            if (c) {
      +                apr_snprintf(ws->vhost, sizeof(ws->vhost), "%s:%d",
      +                             s->server_hostname, c->local_addr->port);
      +            }
      +            else {
      +                apr_cpystrn(ws->vhost, s->server_hostname, sizeof(ws->vhost));
      +            }
      +        }
      +        else if (c) {
                   ws->vhost[0]='\0';
               }
      +
      +        if (c) {
      +            val = ap_get_protocol(c);
      +            apr_cpystrn(ws->protocol, val, sizeof(ws->protocol));
      +        }
           }
       
           return old_status;
      @@ -512,29 +551,50 @@ AP_DECLARE(int) ap_update_child_status_from_indexes(int child_num,
       
           return update_child_status_internal(child_num, thread_num, status,
                                               r ? r->connection : NULL,
      -                                        r);
      +                                        r ? r->server : NULL,
      +                                        r, NULL);
       }
       
       AP_DECLARE(int) ap_update_child_status(ap_sb_handle_t *sbh, int status,
                                             request_rec *r)
       {
      -    if (!sbh)
      +    if (!sbh || (sbh->child_num < 0))
               return -1;
       
           return update_child_status_internal(sbh->child_num, sbh->thread_num,
                                               status,
                                               r ? r->connection : NULL,
      -                                        r);
      +                                        r ? r->server : NULL,
      +                                        r, NULL);
       }
       
       AP_DECLARE(int) ap_update_child_status_from_conn(ap_sb_handle_t *sbh, int status,
      -                                       conn_rec *c)
      +                                                 conn_rec *c)
       {
      -    if (!sbh)
      +    if (!sbh || (sbh->child_num < 0))
      +        return -1;
      +
      +    return update_child_status_internal(sbh->child_num, sbh->thread_num,
      +                                        status, c, NULL, NULL, NULL);
      +}
      +
      +AP_DECLARE(int) ap_update_child_status_from_server(ap_sb_handle_t *sbh, int status, 
      +                                                   conn_rec *c, server_rec *s)
      +{
      +    if (!sbh || (sbh->child_num < 0))
               return -1;
       
           return update_child_status_internal(sbh->child_num, sbh->thread_num,
      -                                        status, c, NULL);
      +                                        status, c, s, NULL, NULL);
      +}
      +
      +AP_DECLARE(int) ap_update_child_status_descr(ap_sb_handle_t *sbh, int status, const char *descr)
      +{
      +    if (!sbh || (sbh->child_num < 0))
      +        return -1;
      +
      +    return update_child_status_internal(sbh->child_num, sbh->thread_num,
      +                                        status, NULL, NULL, NULL, descr);
       }
       
       AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status)
      @@ -551,10 +611,10 @@ AP_DECLARE(void) ap_time_process_request(ap_sb_handle_t *sbh, int status)
           ws = &ap_scoreboard_image->servers[sbh->child_num][sbh->thread_num];
       
           if (status == START_PREQUEST) {
      -        ws->start_time = apr_time_now();
      +        ws->start_time = ws->last_used = apr_time_now();
           }
           else if (status == STOP_PREQUEST) {
      -        ws->stop_time = apr_time_now();
      +        ws->stop_time = ws->last_used = apr_time_now();
           }
       }
       
      @@ -576,6 +636,22 @@ AP_DECLARE(worker_score *) ap_get_scoreboard_worker(ap_sb_handle_t *sbh)
                                                        sbh->thread_num);
       }
       
      +AP_DECLARE(void) ap_copy_scoreboard_worker(worker_score *dest, 
      +                                           int child_num,
      +                                           int thread_num)
      +{
      +    worker_score *ws = ap_get_scoreboard_worker_from_indexes(child_num, thread_num);
      +
      +    memcpy(dest, ws, sizeof *ws);
      +
      +    /* For extra safety, NUL-terminate the strings returned, though it
      +     * should be true those last bytes are always zero anyway. */
      +    dest->client[sizeof(dest->client) - 1] = '\0';
      +    dest->request[sizeof(dest->request) - 1] = '\0';
      +    dest->vhost[sizeof(dest->vhost) - 1] = '\0';
      +    dest->protocol[sizeof(dest->protocol) - 1] = '\0';
      +}
      +
       AP_DECLARE(process_score *) ap_get_scoreboard_process(int x)
       {
           if ((x < 0) || (x >= server_limit)) {
      diff --git a/server/util.c b/server/util.c
      index 7fda13cc668..fba34bde1a9 100644
      --- a/server/util.c
      +++ b/server/util.c
      @@ -62,6 +62,11 @@
       #ifdef HAVE_GRP_H
       #include <grp.h>
       #endif
      +#ifdef HAVE_SYS_LOADAVG_H
      +#include <sys/loadavg.h>
      +#endif
      +
      +#include "ap_mpm.h"
       
       /* A bunch of functions in util.c scan strings looking for certain characters.
        * To make that more efficient we encode a lookup table.  The test_char_table
      @@ -74,7 +79,7 @@
        * char in here and get it to work, because if char is signed then it
        * will first be sign extended.
        */
      -#define TEST_CHAR(c, f)        (test_char_table[(unsigned)(c)] & (f))
      +#define TEST_CHAR(c, f)        (test_char_table[(unsigned char)(c)] & (f))
       
       /* Win32/NetWare/OS2 need to check for both forward and back slashes
        * in ap_getparents() and ap_escape_url.
      @@ -91,7 +96,6 @@
       #undef APLOG_MODULE_INDEX
       #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
       
      -
       /*
        * Examine a field value (such as a media-/content-type) string and return
        * it sans any parameters; e.g., strip off any ';charset=foo' and the like.
      @@ -110,7 +114,7 @@ AP_DECLARE(char *) ap_field_noparam(apr_pool_t *p, const char *intype)
               while ((semi > intype) && apr_isspace(semi[-1])) {
                   semi--;
               }
      -        return apr_pstrndup(p, intype, semi - intype);
      +        return apr_pstrmemdup(p, intype, semi - intype);
           }
       }
       
      @@ -247,7 +251,7 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
       
       AP_DECLARE(int) ap_is_matchexp(const char *str)
       {
      -    register int x;
      +    int x;
       
           for (x = 0; str[x]; x++)
               if ((str[x] == '*') || (str[x] == '?'))
      @@ -273,8 +277,10 @@ AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
                                            int cflags)
       {
           ap_regex_t *preg = apr_palloc(p, sizeof *preg);
      -
      -    if (ap_regcomp(preg, pattern, cflags)) {
      +    int err = ap_regcomp(preg, pattern, cflags);
      +    if (err) {
      +        if (err == AP_REG_ESPACE)
      +            ap_abort_on_oom();
               return NULL;
           }
       
      @@ -372,13 +378,13 @@ AP_DECLARE(const char *) ap_stripprefix(const char *bigstring,
       
       static apr_status_t regsub_core(apr_pool_t *p, char **result,
                                       struct ap_varbuf *vb, const char *input,
      -                                const char *source, size_t nmatch,
      +                                const char *source, apr_size_t nmatch,
                                       ap_regmatch_t pmatch[], apr_size_t maxlen)
       {
           const char *src = input;
           char *dst;
           char c;
      -    size_t no;
      +    apr_size_t no;
           apr_size_t len = 0;
       
           AP_DEBUG_ASSERT((result && p && !vb) || (vb && !p && !result));
      @@ -425,7 +431,7 @@ static apr_status_t regsub_core(apr_pool_t *p, char **result,
               *result = dst = apr_palloc(p, len + 1);
           }
           else {
      -        if (vb->buf && vb->strlen == AP_VARBUF_UNKNOWN)
      +        if (vb->strlen == AP_VARBUF_UNKNOWN)
                   vb->strlen = strlen(vb->buf);
               ap_varbuf_grow(vb, vb->strlen + len);
               dst = vb->buf + vb->strlen;
      @@ -437,15 +443,13 @@ static apr_status_t regsub_core(apr_pool_t *p, char **result,
           src = input;
       
           while ((c = *src++) != '\0') {
      -        if (c == '&')
      -            no = 0;
      -        else if (c == '$' && apr_isdigit(*src))
      +        if (c == '$' && apr_isdigit(*src))
                   no = *src++ - '0';
               else
                   no = AP_MAX_REG_MATCH;
       
               if (no >= AP_MAX_REG_MATCH) {  /* Ordinary character. */
      -            if (c == '\\' && (*src == '$' || *src == '&'))
      +            if (c == '\\' && *src)
                       c = *src++;
                   *dst++ = c;
               }
      @@ -465,7 +469,7 @@ static apr_status_t regsub_core(apr_pool_t *p, char **result,
       #define AP_PREGSUB_MAXLEN   (HUGE_STRING_LEN * 8)
       #endif
       AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
      -                              const char *source, size_t nmatch,
      +                              const char *source, apr_size_t nmatch,
                                     ap_regmatch_t pmatch[])
       {
           char *result;
      @@ -478,7 +482,7 @@ AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
       
       AP_DECLARE(apr_status_t) ap_pregsub_ex(apr_pool_t *p, char **result,
                                              const char *input, const char *source,
      -                                       size_t nmatch, ap_regmatch_t pmatch[],
      +                                       apr_size_t nmatch, ap_regmatch_t pmatch[],
                                              apr_size_t maxlen)
       {
           apr_status_t rc = regsub_core(p, result, NULL, input, source, nmatch,
      @@ -523,7 +527,7 @@ AP_DECLARE(void) ap_getparents(char *name)
           while (name[l] != '\0') {
               if (name[l] == '.' && name[l + 1] == '.' && IS_SLASH(name[l + 2])
                   && (l == 0 || IS_SLASH(name[l - 1]))) {
      -            register int m = l + 3, n;
      +            int m = l + 3, n;
       
                   l = l - 2;
                   if (l >= 0) {
      @@ -649,7 +653,7 @@ AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s)
       
       AP_DECLARE(int) ap_count_dirs(const char *path)
       {
      -    register int x, n;
      +    int x, n;
       
           for (x = 0, n = 0; path[x]; x++)
               if (path[x] == '/')
      @@ -725,13 +729,13 @@ AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *atrans, const char **line,
           char *res;
       
           if (!pos) {
      -        size_t len = strlen(*line);
      +        apr_size_t len = strlen(*line);
               res = apr_pstrmemdup(atrans, *line, len);
               *line += len;
               return res;
           }
       
      -    res = apr_pstrndup(atrans, *line, pos - *line);
      +    res = apr_pstrmemdup(atrans, *line, pos - *line);
       
           ++pos;
       
      @@ -747,7 +751,7 @@ AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *atrans, const char **line,
       static char *substring_conf(apr_pool_t *p, const char *start, int len,
                                   char quote)
       {
      -    char *result = apr_palloc(p, len + 2);
      +    char *result = apr_palloc(p, len + 1);
           char *resp = result;
           int i;
       
      @@ -778,7 +782,7 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
           char *res;
           char quote;
       
      -    while (*str && apr_isspace(*str))
      +    while (apr_isspace(*str))
               ++str;
       
           if (!*str) {
      @@ -810,7 +814,61 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
               res = substring_conf(p, str, strend - str, 0);
           }
       
      -    while (*strend && apr_isspace(*strend))
      +    while (apr_isspace(*strend))
      +        ++strend;
      +    *line = strend;
      +    return res;
      +}
      +
      +AP_DECLARE(char *) ap_getword_conf2_nc(apr_pool_t *p, char **line)
      +{
      +    return ap_getword_conf2(p, (const char **) line);
      +}
      +
      +AP_DECLARE(char *) ap_getword_conf2(apr_pool_t *p, const char **line)
      +{
      +    const char *str = *line, *strend;
      +    char *res;
      +    char quote;
      +    int count = 1;
      +
      +    while (apr_isspace(*str))
      +        ++str;
      +
      +    if (!*str) {
      +        *line = str;
      +        return "";
      +    }
      +
      +    if ((quote = *str) == '"' || quote == '\'')
      +        return ap_getword_conf(p, line);
      +
      +    if (quote == '{') {
      +        strend = str + 1;
      +        while (*strend) {
      +            if (*strend == '}' && !--count)
      +                break;
      +            if (*strend == '{')
      +                ++count;
      +            if (*strend == '\\' && strend[1] && strend[1] == '\\') {
      +                ++strend;
      +            }
      +            ++strend;
      +        }
      +        res = substring_conf(p, str + 1, strend - str - 1, 0);
      +
      +        if (*strend == '}')
      +            ++strend;
      +    }
      +    else {
      +        strend = str;
      +        while (*strend && !apr_isspace(*strend))
      +            ++strend;
      +
      +        res = substring_conf(p, str, strend - str, 0);
      +    }
      +
      +    while (apr_isspace(*strend))
               ++strend;
           *line = strend;
           return res;
      @@ -819,7 +877,7 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
       AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp)
       {
       #ifdef DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(00551)
               "Done with config file %s", cfp->name);
       #endif
           return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
      @@ -836,7 +894,7 @@ static apr_status_t cfg_getch(char *ch, void *param)
           return apr_file_getc(ch, param);
       }
       
      -static apr_status_t cfg_getstr(void *buf, size_t bufsiz, void *param)
      +static apr_status_t cfg_getstr(void *buf, apr_size_t bufsiz, void *param)
       {
           return apr_file_gets(buf, bufsiz, param);
       }
      @@ -854,7 +912,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
       #endif
       
           if (name == NULL) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00552)
                      "Internal error: pcfg_openfile() called with NULL filename");
               return APR_EBADF;
           }
      @@ -862,7 +920,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
           status = apr_file_open(&file, name, APR_READ | APR_BUFFERED,
                                  APR_OS_DEFAULT, p);
       #ifdef DEBUG
      -    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
      +    ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, APLOGNO(00553)
                       "Opening config file %s (%s)",
                       name, (status != APR_SUCCESS) ?
                       apr_strerror(status, buf, sizeof(buf)) : "successful");
      @@ -880,7 +938,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
       #else
               strcmp(name, "/dev/null") != 0) {
       #endif /* WIN32 || OS2 */
      -        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(00554)
                            "Access to file %s denied by server: not a regular file",
                            name);
               apr_file_close(file);
      @@ -926,7 +984,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg,
       AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(
                   apr_pool_t *p, const char *descr, void *param,
                   apr_status_t (*getc_func) (char *ch, void *param),
      -            apr_status_t (*gets_func) (void *buf, size_t bufsize, void *param),
      +            apr_status_t (*gets_func) (void *buf, apr_size_t bufsize, void *param),
                   apr_status_t (*close_func) (void *param))
       {
           ap_configfile_t *new_cfg = apr_palloc(p, sizeof(*new_cfg));
      @@ -951,32 +1009,34 @@ AP_DECLARE(apr_status_t) ap_cfg_getc(char *ch, ap_configfile_t *cfp)
       AP_DECLARE(const char *) ap_pcfg_strerror(apr_pool_t *p, ap_configfile_t *cfp,
                                                 apr_status_t rc)
       {
      -    char buf[MAX_STRING_LEN];
           if (rc == APR_SUCCESS)
               return NULL;
      -    return apr_psprintf(p, "Error reading %s at line %d: %s",
      -                        cfp->name, cfp->line_number,
      -                        rc == APR_ENOSPC ? "Line too long"
      -                                         : apr_strerror(rc, buf, sizeof(buf)));
      +
      +    if (rc == APR_ENOSPC)
      +        return apr_psprintf(p, "Error reading %s at line %d: Line too long",
      +                            cfp->name, cfp->line_number);
      +
      +    return apr_psprintf(p, "Error reading %s at line %d: %pm",
      +                        cfp->name, cfp->line_number, &rc);
       }
       
       /* Read one line from open ap_configfile_t, strip LF, increase line number */
       /* If custom handler does not define a getstr() function, read char by char */
      -static apr_status_t ap_cfg_getline_core(char *buf, size_t bufsize,
      -                                        ap_configfile_t *cfp)
      +static apr_status_t ap_cfg_getline_core(char *buf, apr_size_t bufsize,
      +                                        apr_size_t offset, ap_configfile_t *cfp)
       {
           apr_status_t rc;
           /* If a "get string" function is defined, use it */
           if (cfp->getstr != NULL) {
               char *cp;
      -        char *cbuf = buf;
      -        size_t cbufsize = bufsize;
      +        char *cbuf = buf + offset;
      +        apr_size_t cbufsize = bufsize - offset;
       
               while (1) {
                   ++cfp->line_number;
                   rc = cfp->getstr(cbuf, cbufsize, cfp->param);
                   if (rc == APR_EOF) {
      -                if (cbuf != buf) {
      +                if (cbuf != buf + offset) {
                           *cbuf = '\0';
                           break;
                       }
      @@ -994,11 +1054,11 @@ static apr_status_t ap_cfg_getline_core(char *buf, size_t bufsize,
                    */
                   cp = cbuf;
                   cp += strlen(cp);
      -            if (cp > cbuf && cp[-1] == LF) {
      +            if (cp > buf && cp[-1] == LF) {
                       cp--;
      -                if (cp > cbuf && cp[-1] == CR)
      +                if (cp > buf && cp[-1] == CR)
                           cp--;
      -                if (cp > cbuf && cp[-1] == '\\') {
      +                if (cp > buf && cp[-1] == '\\') {
                           cp--;
                           /*
                            * line continuation requested -
      @@ -1016,19 +1076,19 @@ static apr_status_t ap_cfg_getline_core(char *buf, size_t bufsize,
               }
           } else {
               /* No "get string" function defined; read character by character */
      -        size_t i = 0;
      +        apr_size_t i = offset;
       
               if (bufsize < 2) {
                   /* too small, assume caller is crazy */
                   return APR_EINVAL;
               }
      -        buf[0] = '\0';
      +        buf[offset] = '\0';
       
               while (1) {
                   char c;
                   rc = cfp->getch(&c, cfp->param);
                   if (rc == APR_EOF) {
      -                if (i > 0)
      +                if (i > offset)
                           break;
                       else
                           return APR_EOF;
      @@ -1046,11 +1106,11 @@ static apr_status_t ap_cfg_getline_core(char *buf, size_t bufsize,
                           break;
                       }
                   }
      -            else if (i >= bufsize - 2) {
      -                return APR_ENOSPC;
      -            }
                   buf[i] = c;
                   ++i;
      +            if (i >= bufsize - 1) {
      +                return APR_ENOSPC;
      +            }
               }
               buf[i] = '\0';
           }
      @@ -1074,16 +1134,17 @@ static int cfg_trim_line(char *buf)
           if (start != buf)
               memmove(buf, start, end - start + 2);
       #ifdef DEBUG_CFG_LINES
      -    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, "Read config: '%s'", buf);
      +    ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, APLOGNO(00555) "Read config: '%s'", buf);
       #endif
           return end - start + 1;
       }
       
       /* Read one line from open ap_configfile_t, strip LF, increase line number */
       /* If custom handler does not define a getstr() function, read char by char */
      -AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp)
      +AP_DECLARE(apr_status_t) ap_cfg_getline(char *buf, apr_size_t bufsize,
      +                                        ap_configfile_t *cfp)
       {
      -    apr_status_t rc = ap_cfg_getline_core(buf, bufsize, cfp);
      +    apr_status_t rc = ap_cfg_getline_core(buf, bufsize, 0, cfp);
           if (rc == APR_SUCCESS)
               cfg_trim_line(buf);
           return rc;
      @@ -1094,12 +1155,23 @@ AP_DECLARE(apr_status_t) ap_varbuf_cfg_getline(struct ap_varbuf *vb,
                                                      apr_size_t max_len)
       {
           apr_status_t rc;
      +    apr_size_t new_len;
           vb->strlen = 0;
           *vb->buf = '\0';
       
      +    if (vb->strlen == AP_VARBUF_UNKNOWN)
      +        vb->strlen = strlen(vb->buf);
      +    if (vb->avail - vb->strlen < 3) {
      +        new_len = vb->avail * 2;
      +        if (new_len > max_len)
      +            new_len = max_len;
      +        else if (new_len < 3)
      +            new_len = 3;
      +        ap_varbuf_grow(vb, new_len);
      +    }
      +
           for (;;) {
      -        apr_size_t new_len;
      -        rc = ap_cfg_getline_core(vb->buf + vb->strlen, vb->avail - vb->strlen, cfp);
      +        rc = ap_cfg_getline_core(vb->buf, vb->avail, vb->strlen, cfp);
               if (rc == APR_ENOSPC || rc == APR_SUCCESS)
                   vb->strlen += strlen(vb->buf + vb->strlen);
               if (rc != APR_ENOSPC)
      @@ -1112,6 +1184,8 @@ AP_DECLARE(apr_status_t) ap_varbuf_cfg_getline(struct ap_varbuf *vb,
               ap_varbuf_grow(vb, new_len);
               --cfp->line_number;
           }
      +    if (vb->strlen > max_len)
      +        return APR_ENOSPC;
           if (rc == APR_SUCCESS)
               vb->strlen = cfg_trim_line(vb->buf);
           return rc;
      @@ -1267,27 +1341,58 @@ AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field)
           return token;
       }
       
      +typedef enum ap_etag_e {
      +    AP_ETAG_NONE,
      +    AP_ETAG_WEAK,
      +    AP_ETAG_STRONG
      +} ap_etag_e;
      +
       /* Find an item in canonical form (lowercase, no extra spaces) within
        * an HTTP field value list.  Returns 1 if found, 0 if not found.
        * This would be much more efficient if we stored header fields as
        * an array of list items as they are received instead of a plain string.
        */
      -AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line,
      -                                  const char *tok)
      +static int find_list_item(apr_pool_t *p, const char *line,
      +                                  const char *tok, ap_etag_e type)
       {
           const unsigned char *pos;
           const unsigned char *ptr = (const unsigned char *)line;
           int good = 0, addspace = 0, in_qpair = 0, in_qstr = 0, in_com = 0;
       
      -    if (!line || !tok)
      +    if (!line || !tok) {
      +        return 0;
      +    }
      +    if (type == AP_ETAG_STRONG && *tok != '\"') {
               return 0;
      +    }
      +    if (type == AP_ETAG_WEAK) {
      +        if (*tok == 'W' && (*(tok+1)) == '/' && (*(tok+2)) == '\"') {
      +            tok += 2;
      +        }
      +        else if (*tok != '\"') {
      +            return 0;
      +        }
      +    }
       
           do {  /* loop for each item in line's list */
       
               /* Find first non-comma, non-whitespace byte */
      -
      -        while (*ptr == ',' || apr_isspace(*ptr))
      +        while (*ptr == ',' || apr_isspace(*ptr)) {
                   ++ptr;
      +        }
      +
      +        /* Account for strong or weak Etags, depending on our search */
      +        if (type == AP_ETAG_STRONG && *ptr != '\"') {
      +            break;
      +        }
      +        if (type == AP_ETAG_WEAK) {
      +            if (*ptr == 'W' && (*(ptr+1)) == '/' && (*(ptr+2)) == '\"') {
      +                ptr += 2;
      +            }
      +            else if (*ptr != '\"') {
      +                break;
      +            }
      +        }
       
               if (*ptr)
                   good = 1;  /* until proven otherwise for this item */
      @@ -1355,7 +1460,8 @@ AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line,
                                      if (in_com || in_qstr)
                                          good = good && (*pos++ == *ptr);
                                      else
      -                                   good = good && (*pos++ == apr_tolower(*ptr));
      +                                   good = good
      +                                       && (apr_tolower(*pos++) == apr_tolower(*ptr));
                                      addspace = 0;
                                      break;
                       }
      @@ -1369,6 +1475,154 @@ AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line,
           return good;
       }
       
      +/* Find an item in canonical form (lowercase, no extra spaces) within
      + * an HTTP field value list.  Returns 1 if found, 0 if not found.
      + * This would be much more efficient if we stored header fields as
      + * an array of list items as they are received instead of a plain string.
      + */
      +AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line,
      +                                  const char *tok)
      +{
      +    return find_list_item(p, line, tok, AP_ETAG_NONE);
      +}
      +
      +/* Find a strong Etag in canonical form (lowercase, no extra spaces) within
      + * an HTTP field value list.  Returns 1 if found, 0 if not found.
      + */
      +AP_DECLARE(int) ap_find_etag_strong(apr_pool_t *p, const char *line,
      +                                    const char *tok)
      +{
      +    return find_list_item(p, line, tok, AP_ETAG_STRONG);
      +}
      +
      +/* Find a weak ETag in canonical form (lowercase, no extra spaces) within
      + * an HTTP field value list.  Returns 1 if found, 0 if not found.
      + */
      +AP_DECLARE(int) ap_find_etag_weak(apr_pool_t *p, const char *line,
      +                                  const char *tok)
      +{
      +    return find_list_item(p, line, tok, AP_ETAG_WEAK);
      +}
      +
      +/* Grab a list of tokens of the format 1#token (from RFC7230) */
      +AP_DECLARE(const char *) ap_parse_token_list_strict(apr_pool_t *p,
      +                                                const char *str_in,
      +                                                apr_array_header_t **tokens,
      +                                                int skip_invalid)
      +{
      +    int in_leading_space = 1;
      +    int in_trailing_space = 0;
      +    int string_end = 0;
      +    const char *tok_begin;
      +    const char *cur;
      +
      +    if (!str_in) {
      +        return NULL;
      +    }
      +
      +    tok_begin = cur = str_in;
      +
      +    while (!string_end) {
      +        const unsigned char c = (unsigned char)*cur;
      +
      +        if (!TEST_CHAR(c, T_HTTP_TOKEN_STOP)) {
      +            /* Non-separator character; we are finished with leading
      +             * whitespace. We must never have encountered any trailing
      +             * whitespace before the delimiter (comma) */
      +            in_leading_space = 0;
      +            if (in_trailing_space) {
      +                return "Encountered illegal whitespace in token";
      +            }
      +        }
      +        else if (c == ' ' || c == '\t') {
      +            /* "Linear whitespace" only includes ASCII CRLF, space, and tab;
      +             * we can't get a CRLF since headers are split on them already,
      +             * so only look for a space or a tab */
      +            if (in_leading_space) {
      +                /* We're still in leading whitespace */
      +                ++tok_begin;
      +            }
      +            else {
      +                /* We must be in trailing whitespace */
      +                ++in_trailing_space;
      +            }
      +        }
      +        else if (c == ',' || c == '\0') {
      +            if (!in_leading_space) {
      +                /* If we're out of the leading space, we know we've read some
      +                 * characters of a token */
      +                if (*tokens == NULL) {
      +                    *tokens = apr_array_make(p, 4, sizeof(char *));
      +                }
      +                APR_ARRAY_PUSH(*tokens, char *) =
      +                    apr_pstrmemdup((*tokens)->pool, tok_begin,
      +                                   (cur - tok_begin) - in_trailing_space);
      +            }
      +            /* We're allowed to have null elements, just don't add them to the
      +             * array */
      +
      +            tok_begin = cur + 1;
      +            in_leading_space = 1;
      +            in_trailing_space = 0;
      +            string_end = (c == '\0');
      +        }
      +        else {
      +            /* Encountered illegal separator char */
      +            if (skip_invalid) {
      +                /* Skip to the next separator */
      +                const char *temp;
      +                temp = ap_strchr_c(cur, ',');
      +                if(!temp) {
      +                    temp = ap_strchr_c(cur, '\0');
      +                }
      +
      +                /* Act like we haven't seen a token so we reset */
      +                cur = temp - 1;
      +                in_leading_space = 1;
      +                in_trailing_space = 0;
      +            }
      +            else {
      +                return apr_psprintf(p, "Encountered illegal separator "
      +                                    "'\\x%.2x'", (unsigned int)c);
      +            }
      +        }
      +
      +        ++cur;
      +    }
      +
      +    return NULL;
      +}
      +
      +/* Scan a string for HTTP VCHAR/obs-text characters including HT and SP
      + * (as used in header values, for example, in RFC 7230 section 3.2)
      + * returning the pointer to the first non-HT ASCII ctrl character.
      + */
      +AP_DECLARE(const char *) ap_scan_http_field_content(const char *ptr)
      +{
      +    for ( ; !TEST_CHAR(*ptr, T_HTTP_CTRLS); ++ptr) ;
      +
      +    return ptr;
      +}
      +
      +/* Scan a string for HTTP token characters, returning the pointer to
      + * the first non-token character.
      + */
      +AP_DECLARE(const char *) ap_scan_http_token(const char *ptr)
      +{
      +    for ( ; !TEST_CHAR(*ptr, T_HTTP_TOKEN_STOP); ++ptr) ;
      +
      +    return ptr;
      +}
      +
      +/* Scan a string for visible ASCII (0x21-0x7E) or obstext (0x80+)
      + * and return a pointer to the first ctrl/space character encountered.
      + */
      +AP_DECLARE(const char *) ap_scan_vchar_obstext(const char *ptr)
      +{
      +    for ( ; TEST_CHAR(*ptr, T_VCHAR_OBSTEXT); ++ptr) ;
      +
      +    return ptr;
      +}
       
       /* Retrieve a token, spacing over it and returning a pointer to
        * the first non-white byte afterwards.  Note that these tokens
      @@ -1382,11 +1636,10 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line,
           const char *ptr = *accept_line;
           const char *tok_start;
           char *token;
      -    int tok_len;
       
           /* Find first non-white byte */
       
      -    while (*ptr && apr_isspace(*ptr))
      +    while (apr_isspace(*ptr))
               ++ptr;
       
           tok_start = ptr;
      @@ -1403,12 +1656,11 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line,
                           break;
           }
       
      -    tok_len = ptr - tok_start;
      -    token = apr_pstrndup(p, tok_start, tok_len);
      +    token = apr_pstrmemdup(p, tok_start, ptr - tok_start);
       
           /* Advance accept_line pointer to the next non-white byte */
       
      -    while (*ptr && apr_isspace(*ptr))
      +    while (apr_isspace(*ptr))
               ++ptr;
       
           *accept_line = ptr;
      @@ -1506,7 +1758,7 @@ AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *str)
       
       static char x2c(const char *what)
       {
      -    register char digit;
      +    char digit;
       
       #if !APR_CHARSET_EBCDIC
           digit = ((what[0] >= 'A') ? ((what[0] & 0xdf) - 'A') + 10
      @@ -1538,7 +1790,7 @@ static char x2c(const char *what)
       
       static int unescape_url(char *url, const char *forbid, const char *reserved)
       {
      -    register int badesc, badpath;
      +    int badesc, badpath;
           char *x, *y;
       
           badesc = 0;
      @@ -1830,16 +2082,33 @@ AP_DECLARE(char *) ap_escape_logitem(apr_pool_t *p, const char *str)
           char *ret;
           unsigned char *d;
           const unsigned char *s;
      +    apr_size_t length, escapes = 0;
       
           if (!str) {
               return NULL;
           }
       
      -    ret = apr_palloc(p, 4 * strlen(str) + 1); /* Be safe */
      +    /* Compute how many characters need to be escaped */
      +    s = (const unsigned char *)str;
      +    for (; *s; ++s) {
      +        if (TEST_CHAR(*s, T_ESCAPE_LOGITEM)) {
      +            escapes++;
      +        }
      +    }
      +    
      +    /* Compute the length of the input string, including NULL */
      +    length = s - (const unsigned char *)str + 1;
      +    
      +    /* Fast path: nothing to escape */
      +    if (escapes == 0) {
      +        return apr_pmemdup(p, str, length);
      +    }
      +    
      +    /* Each escaped character needs up to 3 extra bytes (0 --> \x00) */
      +    ret = apr_palloc(p, length + 3 * escapes);
           d = (unsigned char *)ret;
           s = (const unsigned char *)str;
           for (; *s; ++s) {
      -
               if (TEST_CHAR(*s, T_ESCAPE_LOGITEM)) {
                   *d++ = '\\';
                   switch(*s) {
      @@ -1939,6 +2208,18 @@ AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source,
           return (d - (unsigned char *)dest);
       }
       
      +AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest)
      +{
      +    const unsigned char *in = src;
      +    apr_size_t i;
      +
      +    for (i = 0; i < srclen; i++) {
      +        *dest++ = c2x_table[in[i] >> 4];
      +        *dest++ = c2x_table[in[i] & 0xf];
      +    }
      +    *dest = '\0';
      +}
      +
       AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *path)
       {
           apr_finfo_t finfo;
      @@ -1992,11 +2273,11 @@ AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *src1,
        */
       AP_DECLARE(int) ap_is_url(const char *u)
       {
      -    register int x;
      +    int x;
       
           for (x = 0; u[x] != ':'; x++) {
               if ((!u[x]) ||
      -            ((!apr_isalpha(u[x])) && (!apr_isdigit(u[x])) &&
      +            ((!apr_isalnum(u[x])) &&
                    (u[x] != '+') && (u[x] != '-') && (u[x] != '.'))) {
                   return 0;
               }
      @@ -2053,7 +2334,7 @@ char *ap_get_local_host(apr_pool_t *a)
           char *hostname;
       
           if (apr_gethostname(str, sizeof(str) - 1, a) != APR_SUCCESS) {
      -        ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_WARNING, 0, a,
      +        ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_WARNING, 0, a, APLOGNO(00556)
                            "%s: apr_gethostname() failed to determine ServerName",
                            ap_server_argv0);
           } else {
      @@ -2070,7 +2351,7 @@ char *ap_get_local_host(apr_pool_t *a)
                       server_hostname = apr_pstrdup(a, hostname);
                   }
               } else {
      -            ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_WARNING, 0, a,
      +            ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_WARNING, 0, a, APLOGNO(00557)
                                "%s: apr_sockaddr_info_get() failed for %s",
                                ap_server_argv0, str);
               }
      @@ -2079,7 +2360,7 @@ char *ap_get_local_host(apr_pool_t *a)
           if (!server_hostname)
               server_hostname = apr_pstrdup(a, "127.0.0.1");
       
      -    ap_log_perror(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, a,
      +    ap_log_perror(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, a, APLOGNO(00558)
                        "%s: Could not reliably determine the server's fully qualified "
                        "domain name, using %s. Set the 'ServerName' directive globally "
                        "to suppress this message",
      @@ -2392,7 +2673,7 @@ AP_DECLARE(int) ap_parse_form_data(request_rec *r, ap_filter_t *f,
       
           /* sanity check - we only support forms for now */
           ct = apr_table_get(r->headers_in, "Content-Type");
      -    if (!ct || strcmp("application/x-www-form-urlencoded", ct)) {
      +    if (!ct || strncasecmp("application/x-www-form-urlencoded", ct, 33)) {
               return ap_discard_request_body(r);
           }
       
      @@ -2413,7 +2694,7 @@ AP_DECLARE(int) ap_parse_form_data(request_rec *r, ap_filter_t *f,
                                       APR_BLOCK_READ, HUGE_STRING_LEN);
               if (rv != APR_SUCCESS) {
                   apr_brigade_destroy(bb);
      -            return (rv == AP_FILTER_ERROR) ? rv : HTTP_BAD_REQUEST;
      +            return ap_map_http_request_error(rv, HTTP_BAD_REQUEST);
               }
       
               for (bucket = APR_BRIGADE_FIRST(bb);
      @@ -2582,6 +2863,8 @@ AP_DECLARE(void) ap_varbuf_grow(struct ap_varbuf *vb, apr_size_t new_len)
           struct ap_varbuf_info *new_info;
           char *new;
       
      +    AP_DEBUG_ASSERT(vb->strlen == AP_VARBUF_UNKNOWN || vb->avail >= vb->strlen);
      +
           if (new_len <= vb->avail)
               return;
       
      @@ -2701,9 +2984,10 @@ AP_DECLARE(char *) ap_varbuf_pdup(apr_pool_t *p, struct ap_varbuf *buf,
               i++;
           }
           if (buf->avail && buf->strlen) {
      +        if (buf->strlen == AP_VARBUF_UNKNOWN)
      +            buf->strlen = strlen(buf->buf);
               vec[i].iov_base = (void *)buf->buf;
      -        vec[i].iov_len = (buf->strlen == AP_VARBUF_UNKNOWN) ? buf->avail
      -                                                            : buf->strlen;
      +        vec[i].iov_len = buf->strlen;
               i++;
           }
           if (append) {
      @@ -2721,7 +3005,8 @@ AP_DECLARE(char *) ap_varbuf_pdup(apr_pool_t *p, struct ap_varbuf *buf,
       
       AP_DECLARE(apr_status_t) ap_varbuf_regsub(struct ap_varbuf *vb,
                                                 const char *input,
      -                                          const char *source, size_t nmatch,
      +                                          const char *source,
      +                                          apr_size_t nmatch,
                                                 ap_regmatch_t pmatch[],
                                                 apr_size_t maxlen)
       {
      @@ -2770,3 +3055,276 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
               ap_abort_on_oom();
           return p;
       }
      +
      +AP_DECLARE(void) ap_get_sload(ap_sload_t *ld)
      +{
      +    int i, j, server_limit, thread_limit;
      +    int ready = 0;
      +    int busy = 0;
      +    int total;
      +    ap_generation_t mpm_generation;
      +
      +    /* preload errored fields, we overwrite */
      +    ld->idle = -1;
      +    ld->busy = -1;
      +    ld->bytes_served = 0;
      +    ld->access_count = 0;
      +
      +    ap_mpm_query(AP_MPMQ_GENERATION, &mpm_generation);
      +    ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
      +    ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
      +
      +    for (i = 0; i < server_limit; i++) {
      +        process_score *ps;
      +        ps = ap_get_scoreboard_process(i);
      +
      +        for (j = 0; j < thread_limit; j++) {
      +            int res;
      +            worker_score *ws = NULL;
      +            ws = &ap_scoreboard_image->servers[i][j];
      +            res = ws->status;
      +
      +            if (!ps->quiescing && ps->pid) {
      +                if (res == SERVER_READY && ps->generation == mpm_generation) {
      +                    ready++;
      +                }
      +                else if (res != SERVER_DEAD &&
      +                         res != SERVER_STARTING && res != SERVER_IDLE_KILL &&
      +                         ps->generation == mpm_generation) {
      +                    busy++;
      +                }   
      +            }
      +
      +            if (ap_extended_status && !ps->quiescing && ps->pid) {
      +                if (ws->access_count != 0 
      +                    || (res != SERVER_READY && res != SERVER_DEAD)) {
      +                    ld->access_count += ws->access_count;
      +                    ld->bytes_served += ws->bytes_served;
      +                }
      +            }
      +        }
      +    }
      +    total = busy + ready;
      +    if (total) {
      +        ld->idle = ready * 100 / total;
      +        ld->busy = busy * 100 / total;
      +    }
      +}
      +
      +AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld)
      +{
      +    /* preload errored fields, we overwrite */
      +    ld->loadavg = -1.0;
      +    ld->loadavg5 = -1.0;
      +    ld->loadavg15 = -1.0;
      +
      +#if HAVE_GETLOADAVG
      +    {
      +        double la[3];
      +        int num;
      +
      +        num = getloadavg(la, 3);
      +        if (num > 0) {
      +            ld->loadavg = (float)la[0];
      +        }
      +        if (num > 1) {
      +            ld->loadavg5 = (float)la[1];
      +        }
      +        if (num > 2) {
      +            ld->loadavg15 = (float)la[2];
      +        }
      +    }
      +#endif
      +}
      +
      +AP_DECLARE(char *) ap_get_exec_line(apr_pool_t *p,
      +                                    const char *cmd,
      +                                    const char * const * argv)
      +{
      +    char buf[MAX_STRING_LEN];
      +    apr_procattr_t *procattr;
      +    apr_proc_t *proc;
      +    apr_file_t *fp;
      +    apr_size_t nbytes = 1;
      +    char c;
      +    int k;
      +
      +    if (apr_procattr_create(&procattr, p) != APR_SUCCESS)
      +        return NULL;
      +    if (apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_FULL_BLOCK,
      +                            APR_FULL_BLOCK) != APR_SUCCESS)
      +        return NULL;
      +    if (apr_procattr_dir_set(procattr,
      +                             ap_make_dirstr_parent(p, cmd)) != APR_SUCCESS)
      +        return NULL;
      +    if (apr_procattr_cmdtype_set(procattr, APR_PROGRAM) != APR_SUCCESS)
      +        return NULL;
      +    proc = apr_pcalloc(p, sizeof(apr_proc_t));
      +    if (apr_proc_create(proc, cmd, argv, NULL, procattr, p) != APR_SUCCESS)
      +        return NULL;
      +    fp = proc->out;
      +
      +    if (fp == NULL)
      +        return NULL;
      +    /* XXX: we are reading 1 byte at a time here */
      +    for (k = 0; apr_file_read(fp, &c, &nbytes) == APR_SUCCESS
      +                && nbytes == 1 && (k < MAX_STRING_LEN-1)     ; ) {
      +        if (c == '\n' || c == '\r')
      +            break;
      +        buf[k++] = c;
      +    }
      +    buf[k] = '\0'; 
      +    apr_file_close(fp);
      +
      +    return apr_pstrndup(p, buf, k);
      +}
      +
      +AP_DECLARE(int) ap_array_str_index(const apr_array_header_t *array, 
      +                                   const char *s,
      +                                   int start)
      +{
      +    if (start >= 0) {
      +        int i;
      +        
      +        for (i = start; i < array->nelts; i++) {
      +            const char *p = APR_ARRAY_IDX(array, i, const char *);
      +            if (!strcmp(p, s)) {
      +                return i;
      +            }
      +        }
      +    }
      +    
      +    return -1;
      +}
      +
      +AP_DECLARE(int) ap_array_str_contains(const apr_array_header_t *array, 
      +                                      const char *s)
      +{
      +    return (ap_array_str_index(array, s, 0) >= 0);
      +}
      +
      +#if !APR_CHARSET_EBCDIC
      +/*
      + * Our own known-fast translation table for casecmp by character.
      + * Only ASCII alpha characters 41-5A are folded to 61-7A, other
      + * octets (such as extended latin alphabetics) are never case-folded.
      + * NOTE: Other than Alpha A-Z/a-z, each code point is unique!
      + */
      +static const short ucharmap[] = {
      +    0x0,  0x1,  0x2,  0x3,  0x4,  0x5,  0x6,  0x7,
      +    0x8,  0x9,  0xa,  0xb,  0xc,  0xd,  0xe,  0xf,
      +    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
      +    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
      +    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
      +    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
      +    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
      +    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
      +    0x40,  'a',  'b',  'c',  'd',  'e',  'f',  'g',
      +     'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
      +     'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
      +     'x',  'y',  'z', 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
      +    0x60,  'a',  'b',  'c',  'd',  'e',  'f',  'g',
      +     'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
      +     'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
      +     'x',  'y',  'z', 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
      +    0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
      +    0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
      +    0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
      +    0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
      +    0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
      +    0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
      +    0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
      +    0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
      +    0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
      +    0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
      +    0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
      +    0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
      +    0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
      +    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
      +    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
      +    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff
      +};
      +#else /* APR_CHARSET_EBCDIC */
      +/*
      + * Derived from apr-iconv/ccs/cp037.c for EBCDIC case comparison,
      + * provides unique identity of every char value (strict ISO-646
      + * conformance, arbitrary election of an ISO-8859-1 ordering, and
      + * very arbitrary control code assignments into C1 to achieve
      + * identity and a reversible mapping of code points),
      + * then folding the equivalences of ASCII 41-5A into 61-7A, 
      + * presenting comparison results in a somewhat ISO/IEC 10646
      + * (ASCII-like) order, depending on the EBCDIC code page in use.
      + *
      + * NOTE: Other than Alpha A-Z/a-z, each code point is unique!
      + */
      +static const short ucharmap[] = {
      +    0x00, 0x01, 0x02, 0x03, 0x9C, 0x09, 0x86, 0x7F,
      +    0x97, 0x8D, 0x8E, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
      +    0x10, 0x11, 0x12, 0x13, 0x9D, 0x85, 0x08, 0x87,
      +    0x18, 0x19, 0x92, 0x8F, 0x1C, 0x1D, 0x1E, 0x1F,
      +    0x80, 0x81, 0x82, 0x83, 0x84, 0x0A, 0x17, 0x1B,
      +    0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x05, 0x06, 0x07,
      +    0x90, 0x91, 0x16, 0x93, 0x94, 0x95, 0x96, 0x04,
      +    0x98, 0x99, 0x9A, 0x9B, 0x14, 0x15, 0x9E, 0x1A,
      +    0x20, 0xA0, 0xE2, 0xE4, 0xE0, 0xE1, 0xE3, 0xE5,
      +    0xE7, 0xF1, 0xA2, 0x2E, 0x3C, 0x28, 0x2B, 0x7C,
      +    0x26, 0xE9, 0xEA, 0xEB, 0xE8, 0xED, 0xEE, 0xEF,
      +    0xEC, 0xDF, 0x21, 0x24, 0x2A, 0x29, 0x3B, 0xAC,
      +    0x2D, 0x2F, 0xC2, 0xC4, 0xC0, 0xC1, 0xC3, 0xC5,
      +    0xC7, 0xD1, 0xA6, 0x2C, 0x25, 0x5F, 0x3E, 0x3F,
      +    0xF8, 0xC9, 0xCA, 0xCB, 0xC8, 0xCD, 0xCE, 0xCF,
      +    0xCC, 0x60, 0x3A, 0x23, 0x40, 0x27, 0x3D, 0x22,
      +    0xD8, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
      +    0x68, 0x69, 0xAB, 0xBB, 0xF0, 0xFD, 0xFE, 0xB1,
      +    0xB0, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
      +    0x71, 0x72, 0xAA, 0xBA, 0xE6, 0xB8, 0xC6, 0xA4,
      +    0xB5, 0x7E, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
      +    0x79, 0x7A, 0xA1, 0xBF, 0xD0, 0xDD, 0xDE, 0xAE,
      +    0x5E, 0xA3, 0xA5, 0xB7, 0xA9, 0xA7, 0xB6, 0xBC,
      +    0xBD, 0xBE, 0x5B, 0x5D, 0xAF, 0xA8, 0xB4, 0xD7,
      +    0x7B, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
      +    0x68, 0x69, 0xAD, 0xF4, 0xF6, 0xF2, 0xF3, 0xF5,
      +    0x7D, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70,
      +    0x71, 0x72, 0xB9, 0xFB, 0xFC, 0xF9, 0xFA, 0xFF,
      +    0x5C, 0xF7, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78,
      +    0x79, 0x7A, 0xB2, 0xD4, 0xD6, 0xD2, 0xD3, 0xD5,
      +    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
      +    0x38, 0x39, 0xB3, 0xDB, 0xDC, 0xD9, 0xDA, 0x9F
      +};
      +#endif
      +
      +AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2)
      +{
      +    const unsigned char *str1 = (const unsigned char *)s1;
      +    const unsigned char *str2 = (const unsigned char *)s2;
      +    for (;;)
      +    {
      +        const int c1 = (int)(*str1);
      +        const int c2 = (int)(*str2);
      +        const int cmp = ucharmap[c1] - ucharmap[c2];
      +        /* Not necessary to test for !c2, this is caught by cmp */
      +        if (cmp || !c1)
      +            return cmp;
      +        str1++;
      +        str2++;
      +    }
      +}
      +
      +AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
      +{
      +    const unsigned char *str1 = (const unsigned char *)s1;
      +    const unsigned char *str2 = (const unsigned char *)s2;
      +    while (n--)
      +    {
      +        const int c1 = (int)(*str1);
      +        const int c2 = (int)(*str2);
      +        const int cmp = ucharmap[c1] - ucharmap[c2];
      +        /* Not necessary to test for !c2, this is caught by cmp */
      +        if (cmp || !c1)
      +            return cmp;
      +        str1++;
      +        str2++;
      +    }
      +    return 0;
      +}
      +
      diff --git a/server/util_charset.c b/server/util_charset.c
      index 514e0b43f3d..f896729a59a 100644
      --- a/server/util_charset.c
      +++ b/server/util_charset.c
      @@ -23,20 +23,6 @@
       #include "http_core.h"
       #include "util_charset.h"
       
      -/* ap_hdrs_to_ascii, ap_hdrs_from_ascii
      - *
      - * These are the translation handles used to translate between the network
      - * format of protocol headers and the local machine format.
      - *
      - * For an EBCDIC machine, these are valid handles which are set up at
      - * initialization to translate between ISO-8859-1 and the code page of
      - * the source code.
      - *
      - * For an ASCII machine, these remain NULL so that when they are stored
      - * in the BUFF via ap_bsetop(BO_RXLATE) it ensures that no translation is
      - * performed.
      - */
      -
       apr_xlate_t *ap_hdrs_to_ascii, *ap_hdrs_from_ascii;
       
       #endif /*APR_CHARSET_EBCDIC */
      diff --git a/server/util_cookies.c b/server/util_cookies.c
      index e79d5f59794..82a514fcc66 100644
      --- a/server/util_cookies.c
      +++ b/server/util_cookies.c
      @@ -55,7 +55,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name, cons
           /* create RFC2109 compliant cookie */
           rfc2109 = apr_pstrcat(r->pool, name, "=", val, ";", buffer,
                                 attrs && *attrs ? attrs : DEFAULT_ATTRS, NULL);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00007) LOG_PREFIX
                         "user '%s' set cookie: '%s'", r->user, rfc2109);
       
           /* write the cookie to the header table(s) provided */
      @@ -97,7 +97,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co
           /* create RFC2965 compliant cookie */
           rfc2965 = apr_pstrcat(r->pool, name2, "=", val, ";", buffer,
                                 attrs2 && *attrs2 ? attrs2 : DEFAULT_ATTRS, NULL);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00008) LOG_PREFIX
                         "user '%s' set cookie2: '%s'", r->user, rfc2965);
       
           /* write the cookie to the header table(s) provided */
      @@ -125,7 +125,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remove(request_rec * r, const char *name, con
           /* create RFC2109 compliant cookie */
           const char *rfc2109 = apr_pstrcat(r->pool, name, "=;Max-Age=0;",
                                       attrs ? attrs : CLEAR_ATTRS, NULL);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00009) LOG_PREFIX
                         "user '%s' removed cookie: '%s'", r->user, rfc2109);
       
           /* write the cookie to the header table(s) provided */
      @@ -153,7 +153,7 @@ AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2, c
           /* create RFC2965 compliant cookie */
           const char *rfc2965 = apr_pstrcat(r->pool, name2, "=;Max-Age=0;",
                                       attrs2 ? attrs2 : CLEAR_ATTRS, NULL);
      -    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00010) LOG_PREFIX
                         "user '%s' removed cookie2: '%s'", r->user, rfc2965);
       
           /* write the cookie to the header table(s) provided */
      @@ -174,12 +174,13 @@ AP_DECLARE(apr_status_t) ap_cookie_remove2(request_rec * r, const char *name2, c
        * $path or other attributes following our cookie if present. If we end
        * up with an empty cookie, remove the whole header.
        */
      -static int extract_cookie_line(ap_cookie_do * v, const char *key, const char *val)
      +static int extract_cookie_line(void *varg, const char *key, const char *val)
       {
      +    ap_cookie_do *v = varg;
           char *last1, *last2;
           char *cookie = apr_pstrdup(v->r->pool, val);
           const char *name = apr_pstrcat(v->r->pool, v->name ? v->name : "", "=", NULL);
      -    size_t len = strlen(name);
      +    apr_size_t len = strlen(name);
           const char *new_cookie = "";
           const char *comma = ",";
           char *next1;
      @@ -252,11 +253,10 @@ AP_DECLARE(apr_status_t) ap_cookie_read(request_rec * r, const char *name, const
           v.duplicated = 0;
           v.name = name;
       
      -    apr_table_do((int (*) (void *, const char *, const char *))
      -                 extract_cookie_line, (void *) &v, r->headers_in,
      +    apr_table_do(extract_cookie_line, &v, r->headers_in,
                        "Cookie", "Cookie2", NULL);
           if (v.duplicated) {
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, LOG_PREFIX
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00011) LOG_PREFIX
                "client submitted cookie '%s' more than once: %s", v.name, r->uri);
               return APR_EGENERAL;
           }
      diff --git a/server/util_ebcdic.c b/server/util_ebcdic.c
      index 67cd3d3d16c..dc13706465a 100644
      --- a/server/util_ebcdic.c
      +++ b/server/util_ebcdic.c
      @@ -34,35 +34,35 @@ apr_status_t ap_init_ebcdic(apr_pool_t *pool)
       
           rv = apr_xlate_open(&ap_hdrs_to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, pool);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00040)
                            "apr_xlate_open() failed");
               return rv;
           }
       
           rv = apr_xlate_open(&ap_hdrs_from_ascii, APR_DEFAULT_CHARSET, "ISO-8859-1", pool);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00041)
                            "apr_xlate_open() failed");
               return rv;
           }
       
           rv = apr_MD5InitEBCDIC(ap_hdrs_to_ascii);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00042)
                            "apr_MD5InitEBCDIC() failed");
               return rv;
           }
       
           rv = apr_base64init_ebcdic(ap_hdrs_to_ascii, ap_hdrs_from_ascii);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00043)
                            "apr_base64init_ebcdic() failed");
               return rv;
           }
       
           rv = apr_SHA1InitEBCDIC(ap_hdrs_to_ascii);
           if (rv) {
      -        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00044)
                            "apr_SHA1InitEBCDIC() failed");
               return rv;
           }
      @@ -102,10 +102,12 @@ int ap_rvputs_proto_in_ascii(request_rec *r, ...)
               if (s == NULL)
                   break;
               len = strlen(s);
      -        ascii_s = apr_pstrndup(r->pool, s, len);
      +        ascii_s = apr_pstrmemdup(r->pool, s, len);
               ap_xlate_proto_to_ascii(ascii_s, len);
      -        if (ap_rputs(ascii_s, r) < 0)
      +        if (ap_rputs(ascii_s, r) < 0) {
      +            va_end(va);
                   return -1;
      +        }
               written += len;
           }
           va_end(va);
      diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c
      index 3dd5863ae8f..86d11c7e7a7 100644
      --- a/server/util_expr_eval.c
      +++ b/server/util_expr_eval.c
      @@ -25,9 +25,14 @@
       #include "http_request.h"
       #include "ap_provider.h"
       #include "util_expr_private.h"
      +#include "util_md5.h"
       
       #include "apr_lib.h"
       #include "apr_fnmatch.h"
      +#include "apr_base64.h"
      +#include "apr_sha1.h"
      +
      +#include <limits.h>     /* for INT_MAX */
       
       /* we know core's module_index is 0 */
       #undef APLOG_MODULE_INDEX
      @@ -45,9 +50,10 @@ AP_IMPLEMENT_HOOK_RUN_FIRST(int, expr_lookup, (ap_expr_lookup_parms *parms),
       static const char *ap_expr_eval_string_func(ap_expr_eval_ctx_t *ctx,
                                                   const ap_expr_t *info,
                                                   const ap_expr_t *args);
      -static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, int n);
      +static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx,
      +                                           unsigned int n);
       static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
      -                                    const ap_expr_var_func_t *func,
      +                                    ap_expr_var_func_t *func,
                                           const void *data);
       
       /* define AP_EXPR_DEBUG to log the parse tree when parsing an expression */
      @@ -56,29 +62,99 @@ static void expr_dump_tree(const ap_expr_t *e, const server_rec *s,
                                  int loglevel, int indent);
       #endif
       
      +/*
      + * To reduce counting overhead, we only count calls to
      + * ap_expr_eval_word() and ap_expr_eval(). The max number of
      + * stack frames is larger by some factor.
      + */
      +#define AP_EXPR_MAX_RECURSION   20
      +static int inc_rec(ap_expr_eval_ctx_t *ctx)
      +{
      +    if (ctx->reclvl < AP_EXPR_MAX_RECURSION) {
      +        ctx->reclvl++;
      +        return 0;
      +    }
      +    *ctx->err = "Recursion limit reached";
      +    /* short circuit further evaluation */
      +    ctx->reclvl = INT_MAX;
      +    return 1;
      +}
      +
       static const char *ap_expr_eval_word(ap_expr_eval_ctx_t *ctx,
                                            const ap_expr_t *node)
       {
           const char *result = "";
      +    if (inc_rec(ctx))
      +        return result;
           switch (node->node_op) {
           case op_Digit:
           case op_String:
               result = node->node_arg1;
               break;
           case op_Var:
      -        result = ap_expr_eval_var(ctx, node->node_arg1, node->node_arg2);
      +        result = ap_expr_eval_var(ctx, (ap_expr_var_func_t *)node->node_arg1,
      +                                  node->node_arg2);
               break;
      -    case op_Concat: {
      -        const char *s1 = ap_expr_eval_word(ctx, node->node_arg1);
      -        const char *s2 = ap_expr_eval_word(ctx, node->node_arg2);
      -        if (!*s1)
      -            result = s2;
      -        else if (!*s2)
      -            result = s1;
      -        else
      -            result = apr_pstrcat(ctx->p, s1, s2, NULL);
      +    case op_Concat:
      +        if (((ap_expr_t *)node->node_arg2)->node_op != op_Concat &&
      +            ((ap_expr_t *)node->node_arg1)->node_op != op_Concat) {
      +            const char *s1 = ap_expr_eval_word(ctx, node->node_arg1);
      +            const char *s2 = ap_expr_eval_word(ctx, node->node_arg2);
      +            if (!*s1)
      +                result = s2;
      +            else if (!*s2)
      +                result = s1;
      +            else
      +                result = apr_pstrcat(ctx->p, s1, s2, NULL);
      +        }
      +        else if (((ap_expr_t *)node->node_arg1)->node_op == op_Concat) {
      +            const ap_expr_t *nodep = node;
      +            int n;
      +            int i = 1;
      +            struct iovec *vec;
      +            do {
      +                nodep = nodep->node_arg1;
      +                i++;
      +            } while (nodep->node_op == op_Concat);
      +            vec = apr_palloc(ctx->p, i * sizeof(struct iovec));
      +            n = i;
      +            nodep = node;
      +            i--;
      +            do {
      +                vec[i].iov_base = (void *)ap_expr_eval_word(ctx,
      +                                                            nodep->node_arg2);
      +                vec[i].iov_len = strlen(vec[i].iov_base);
      +                i--;
      +                nodep = nodep->node_arg1;
      +            } while (nodep->node_op == op_Concat);
      +            vec[i].iov_base = (void *)ap_expr_eval_word(ctx, nodep);
      +            vec[i].iov_len = strlen(vec[i].iov_base);
      +            result = apr_pstrcatv(ctx->p, vec, n, NULL);
      +        }
      +        else {
      +            const ap_expr_t *nodep = node;
      +            int i = 1;
      +            struct iovec *vec;
      +            do {
      +                nodep = nodep->node_arg2;
      +                i++;
      +            } while (nodep->node_op == op_Concat);
      +            vec = apr_palloc(ctx->p, i * sizeof(struct iovec));
      +            nodep = node;
      +            i = 0;
      +            do {
      +                vec[i].iov_base = (void *)ap_expr_eval_word(ctx,
      +                                                            nodep->node_arg1);
      +                vec[i].iov_len = strlen(vec[i].iov_base);
      +                i++;
      +                nodep = nodep->node_arg2;
      +            } while (nodep->node_op == op_Concat);
      +            vec[i].iov_base = (void *)ap_expr_eval_word(ctx, nodep);
      +            vec[i].iov_len = strlen(vec[i].iov_base);
      +            i++;
      +            result = apr_pstrcatv(ctx->p, vec, i, NULL);
      +        }
               break;
      -    }
           case op_StringFuncCall: {
               const ap_expr_t *info = node->node_arg1;
               const ap_expr_t *args = node->node_arg2;
      @@ -86,7 +162,7 @@ static const char *ap_expr_eval_word(ap_expr_eval_ctx_t *ctx,
               break;
           }
           case op_RegexBackref: {
      -        const int *np = node->node_arg1;
      +        const unsigned int *np = node->node_arg1;
               result = ap_expr_eval_re_backref(ctx, *np);
               break;
           }
      @@ -96,11 +172,12 @@ static const char *ap_expr_eval_word(ap_expr_eval_ctx_t *ctx,
           }
           if (!result)
               result = "";
      +    ctx->reclvl--;
           return result;
       }
       
       static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
      -                                    const ap_expr_var_func_t *func,
      +                                    ap_expr_var_func_t *func,
                                           const void *data)
       {
           AP_DEBUG_ASSERT(func != NULL);
      @@ -108,7 +185,7 @@ static const char *ap_expr_eval_var(ap_expr_eval_ctx_t *ctx,
           return (*func)(ctx, data);
       }
       
      -static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, int n)
      +static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, unsigned int n)
       {
           int len;
       
      @@ -184,10 +261,8 @@ static int ap_expr_eval_comp(ap_expr_eval_ctx_t *ctx, const ap_expr_t *node)
                       do {
                           const ap_expr_t *val = e2->node_arg1;
                           AP_DEBUG_ASSERT(e2->node_op == op_ListElement);
      -                    if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0) {
      +                    if (strcmp(needle, ap_expr_eval_word(ctx, val)) == 0)
                               return 1;
      -                        break;
      -                    }
                           e2 = e2->node_arg2;
                       } while (e2 != NULL);
                   }
      @@ -196,15 +271,15 @@ static int ap_expr_eval_comp(ap_expr_eval_ctx_t *ctx, const ap_expr_t *node)
                       const ap_expr_t *arg = e2->node_arg2;
                       ap_expr_list_func_t *func = (ap_expr_list_func_t *)info->node_arg1;
                       apr_array_header_t *haystack;
      -                int i = 0;
      +
                       AP_DEBUG_ASSERT(func != NULL);
                       AP_DEBUG_ASSERT(info->node_op == op_ListFuncInfo);
                       haystack = (*func)(ctx, info->node_arg2, ap_expr_eval_word(ctx, arg));
      -                if (haystack == NULL)
      +                if (haystack == NULL) {
                           return 0;
      -                for (; i < haystack->nelts; i++) {
      -                    if (strcmp(needle, APR_ARRAY_IDX(haystack,i,char *)) == 0)
      -                        return 1;
      +                }
      +                if (ap_array_str_contains(haystack, needle)) {
      +                    return 1;
                       }
                   }
                   return 0;
      @@ -626,7 +701,7 @@ static void expr_dump_tree(const ap_expr_t *e, const server_rec *s,
       static int ap_expr_eval_unary_op(ap_expr_eval_ctx_t *ctx, const ap_expr_t *info,
                                        const ap_expr_t *arg)
       {
      -    const ap_expr_op_unary_t *op_func = info->node_arg1;
      +    ap_expr_op_unary_t *op_func = (ap_expr_op_unary_t *)info->node_arg1;
           const void *data = info->node_arg2;
       
           AP_DEBUG_ASSERT(info->node_op == op_UnaryOpInfo);
      @@ -639,7 +714,7 @@ static int ap_expr_eval_binary_op(ap_expr_eval_ctx_t *ctx,
                                         const ap_expr_t *info,
                                         const ap_expr_t *args)
       {
      -    const ap_expr_op_binary_t *op_func = info->node_arg1;
      +    ap_expr_op_binary_t *op_func = (ap_expr_op_binary_t *)info->node_arg1;
           const void *data = info->node_arg2;
           const ap_expr_t *a1 = args->node_arg1;
           const ap_expr_t *a2 = args->node_arg2;
      @@ -657,30 +732,79 @@ static int ap_expr_eval(ap_expr_eval_ctx_t *ctx, const ap_expr_t *node)
       {
           const ap_expr_t *e1 = node->node_arg1;
           const ap_expr_t *e2 = node->node_arg2;
      -    switch (node->node_op) {
      -    case op_True:
      -        return 1;
      -    case op_False:
      -        return 0;
      -    case op_Not:
      -        return (!ap_expr_eval(ctx, e1));
      -    case op_Or:
      -        return (ap_expr_eval(ctx, e1) || ap_expr_eval(ctx, e2));
      -    case op_And:
      -        return (ap_expr_eval(ctx, e1) && ap_expr_eval(ctx, e2));
      -    case op_UnaryOpCall:
      -        return ap_expr_eval_unary_op(ctx, e1, e2);
      -    case op_BinaryOpCall:
      -        return ap_expr_eval_binary_op(ctx, e1, e2);
      -    case op_Comp:
      -        if (ctx->info->flags & AP_EXPR_FLAG_SSL_EXPR_COMPAT)
      -            return ssl_expr_eval_comp(ctx, e1);
      -        else
      -            return ap_expr_eval_comp(ctx, e1);
      -    default:
      -        *ctx->err = "Internal evaluation error: Unknown expression node";
      -        return FALSE;
      +    int result = FALSE;
      +    if (inc_rec(ctx))
      +        return result;
      +    while (1) {
      +        switch (node->node_op) {
      +        case op_True:
      +            result ^= TRUE;
      +            goto out;
      +        case op_False:
      +            result ^= FALSE;
      +            goto out;
      +        case op_Not:
      +            result = !result;
      +            node = e1;
      +            break;
      +        case op_Or:
      +            do {
      +                if (e1->node_op == op_Not) {
      +                    if (!ap_expr_eval(ctx, e1->node_arg1)) {
      +                        result ^= TRUE;
      +                        goto out;
      +                    }
      +                }
      +                else {
      +                    if (ap_expr_eval(ctx, e1)) {
      +                        result ^= TRUE;
      +                        goto out;
      +                    }
      +                }
      +                node = node->node_arg2;
      +                e1 = node->node_arg1;
      +            } while (node->node_op == op_Or);
      +            break;
      +        case op_And:
      +            do {
      +                if (e1->node_op == op_Not) {
      +                    if (ap_expr_eval(ctx, e1->node_arg1)) {
      +                        result ^= FALSE;
      +                        goto out;
      +                    }
      +                }
      +                else {
      +                    if (!ap_expr_eval(ctx, e1)) {
      +                        result ^= FALSE;
      +                        goto out;
      +                    }
      +                }
      +                node = node->node_arg2;
      +                e1 = node->node_arg1;
      +            } while (node->node_op == op_And);
      +            break;
      +        case op_UnaryOpCall:
      +            result ^= ap_expr_eval_unary_op(ctx, e1, e2);
      +            goto out;
      +        case op_BinaryOpCall:
      +            result ^= ap_expr_eval_binary_op(ctx, e1, e2);
      +            goto out;
      +        case op_Comp:
      +            if (ctx->info->flags & AP_EXPR_FLAG_SSL_EXPR_COMPAT)
      +                result ^= ssl_expr_eval_comp(ctx, e1);
      +            else
      +                result ^= ap_expr_eval_comp(ctx, e1);
      +            goto out;
      +        default:
      +            *ctx->err = "Internal evaluation error: Unknown expression node";
      +            goto out;
      +        }
      +        e1 = node->node_arg1;
      +        e2 = node->node_arg2;
           }
      +out:
      +    ctx->reclvl--;
      +    return result;
       }
       
       AP_DECLARE(int) ap_expr_exec(request_rec *r, const ap_expr_info_t *info,
      @@ -704,6 +828,7 @@ AP_DECLARE(int) ap_expr_exec_ctx(ap_expr_eval_ctx_t *ctx)
               AP_DEBUG_ASSERT(ctx->re_source != NULL);
               AP_DEBUG_ASSERT(ctx->re_nmatch > 0);
           }
      +    ctx->reclvl = 0;
       
           *ctx->err = NULL;
           if (ctx->info->flags & AP_EXPR_FLAG_STRING_RESULT) {
      @@ -783,7 +908,7 @@ AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r,
       {
           ap_expr_eval_ctx_t ctx;
           int dont_vary, rc;
      -    const char *tmp_source = NULL, *vary_this = NULL;
      +    const char *tmp_source, *vary_this;
           ap_regmatch_t tmp_pmatch[AP_MAX_REG_MATCH];
           const char *result;
       
      @@ -795,6 +920,9 @@ AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r,
               return (const char *)info->root_node->node_arg1;
           }
       
      +    tmp_source = NULL;
      +    vary_this = NULL;
      +
           dont_vary = (info->flags & AP_EXPR_FLAG_DONT_VARY);
       
           ctx.r = r;
      @@ -823,6 +951,8 @@ AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r,
               return NULL;
           else
               ap_assert(0);
      +    /* Not reached */
      +    return NULL;
       }
       
       AP_DECLARE(const char *) ap_expr_str_exec(request_rec *r,
      @@ -867,6 +997,8 @@ static const char *req_table_func(ap_expr_eval_ctx_t *ctx, const void *data,
               t = ctx->r->notes;
           else if (name[3] == 'e')        /* reqenv */
               t = ctx->r->subprocess_env;
      +    else if (name[3] == '_')        /* req_novary */
      +        t = ctx->r->headers_in;
           else {                          /* req, http */
               t = ctx->r->headers_in;
               add_vary(ctx, arg);
      @@ -916,6 +1048,43 @@ static const char *escape_func(ap_expr_eval_ctx_t *ctx, const void *data,
           return ap_escape_uri(ctx->p, arg);
       }
       
      +static const char *base64_func(ap_expr_eval_ctx_t *ctx, const void *data,
      +                               const char *arg)
      +{
      +    return ap_pbase64encode(ctx->p, (char *)arg);
      +}
      +
      +static const char *unbase64_func(ap_expr_eval_ctx_t *ctx, const void *data,
      +                               const char *arg)
      +{
      +    return ap_pbase64decode(ctx->p, arg);
      +}
      +
      +static const char *sha1_func(ap_expr_eval_ctx_t *ctx, const void *data,
      +                               const char *arg)
      +{
      +    apr_sha1_ctx_t context;
      +    apr_byte_t sha1[APR_SHA1_DIGESTSIZE];
      +    char *out;
      +
      +    out = apr_palloc(ctx->p, APR_SHA1_DIGESTSIZE*2+1);
      +
      +    apr_sha1_init(&context);
      +    apr_sha1_update(&context, arg, strlen(arg));
      +    apr_sha1_final(sha1, &context);
      +
      +    ap_bin2hex(sha1, APR_SHA1_DIGESTSIZE, out);
      +
      +    return out;
      +}
      +
      +static const char *md5_func(ap_expr_eval_ctx_t *ctx, const void *data,
      +                               const char *arg)
      +{
      +	return ap_md5(ctx->p, (const unsigned char *)arg);
      +}
      +
      +
       #define MAX_FILE_SIZE 10*1024*1024
       static const char *file_func(ap_expr_eval_ctx_t *ctx, const void *data,
                                    char *arg)
      @@ -979,7 +1148,7 @@ static const char *unescape_func(ap_expr_eval_ctx_t *ctx, const void *data,
           int ret = ap_unescape_url_keep2f(result, 0);
           if (ret == OK)
               return result;
      -    ap_log_rerror(LOG_MARK(ctx->info), APLOG_DEBUG, 0, ctx->r,
      +    ap_log_rerror(LOG_MARK(ctx->info), APLOG_DEBUG, 0, ctx->r, APLOGNO(00538)
                         "%s %% escape in unescape('%s') at %s:%d",
                         ret == HTTP_BAD_REQUEST ? "Bad" : "Forbidden", arg,
                         ctx->info->filename, ctx->info->line_number);
      @@ -1018,8 +1187,8 @@ static int op_file_min(ap_expr_eval_ctx_t *ctx, const void *data, const char *ar
       
       static int op_file_link(ap_expr_eval_ctx_t *ctx, const void *data, const char *arg)
       {
      -    apr_finfo_t sb;
       #if !defined(OS2)
      +    apr_finfo_t sb;
           if (apr_stat(&sb, arg, APR_FINFO_MIN | APR_FINFO_LINK, ctx->p) == APR_SUCCESS
               && sb.filetype == APR_LNK) {
               return TRUE;
      @@ -1085,11 +1254,15 @@ static int op_file_subr(ap_expr_eval_ctx_t *ctx, const void *data, const char *a
       APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
       static APR_OPTIONAL_FN_TYPE(ssl_is_https) *is_https = NULL;
       
      +APR_DECLARE_OPTIONAL_FN(int, http2_is_h2, (conn_rec *));
      +static APR_OPTIONAL_FN_TYPE(http2_is_h2) *is_http2 = NULL;
      +
       static const char *conn_var_names[] = {
      -    "REMOTE_ADDR",              /*  0 */
      -    "HTTPS",                    /*  1 */
      -    "IPV6",                     /*  2 */
      -    "CONN_LOG_ID",              /*  3 */
      +    "HTTPS",                    /*  0 */
      +    "IPV6",                     /*  1 */
      +    "CONN_LOG_ID",              /*  2 */
      +    "CONN_REMOTE_ADDR",         /*  3 */
      +    "HTTP2",                    /*  4 */
           NULL
       };
       
      @@ -1102,16 +1275,14 @@ static const char *conn_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
       
           switch (index) {
           case 0:
      -        return c->remote_ip;
      -    case 1:
               if (is_https && is_https(c))
                   return "on";
               else
                   return "off";
      -    case 2:
      +    case 1:
       #if APR_HAVE_IPV6
               {
      -            apr_sockaddr_t *addr = c->remote_addr;
      +            apr_sockaddr_t *addr = c->client_addr;
                   if (addr->family == AF_INET6
                       && !IN6_IS_ADDR_V4MAPPED((struct in6_addr *)addr->ipaddr_ptr))
                       return "on";
      @@ -1121,8 +1292,15 @@ static const char *conn_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
       #else
               return "off";
       #endif
      -    case 3:
      +    case 2:
               return c->log_id;
      +    case 3:
      +        return c->client_ip;
      +    case 4:
      +        if (is_http2 && is_http2(c))
      +            return "on";
      +        else
      +            return "off";
           default:
               ap_assert(0);
               return NULL;
      @@ -1158,6 +1336,7 @@ static const char *request_var_names[] = {
           "CONTEXT_PREFIX",           /* 25 */
           "CONTEXT_DOCUMENT_ROOT",    /* 26 */
           "REQUEST_STATUS",           /* 27 */
      +    "REMOTE_ADDR",              /* 28 */
           NULL
       };
       
      @@ -1178,8 +1357,7 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
           case 3:
               return r->filename;
           case 4:
      -        return ap_get_remote_host(r->connection, r->per_dir_config,
      -                                  REMOTE_NAME, NULL);
      +        return ap_get_useragent_host(r, REMOTE_NAME, NULL);
           case 5:
               return ap_get_remote_logname(r);
           case 6:
      @@ -1243,6 +1421,8 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
               return ap_context_document_root(r);
           case 27:
               return r->status ? apr_psprintf(ctx->p, "%d", r->status) : "";
      +    case 28:
      +        return r->useragent_ip;
           default:
               ap_assert(0);
               return NULL;
      @@ -1250,13 +1430,13 @@ static const char *request_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
       }
       
       static const char *req_header_var_names[] = {
      -    "HTTP_USER_AGENT",
      -    "HTTP_PROXY_CONNECTION",
      -    "HTTP_REFERER",
      -    "HTTP_COOKIE",
      -    "HTTP_FORWARDED",
      -    "HTTP_HOST",
      -    "HTTP_ACCEPT",
      +    "HTTP_USER_AGENT",       /* 0 */
      +    "HTTP_PROXY_CONNECTION", /* 1 */
      +    "HTTP_REFERER",          /* 2 */
      +    "HTTP_COOKIE",           /* 3 */
      +    "HTTP_FORWARDED",        /* 4 */
      +    "HTTP_HOST",             /* 5 */
      +    "HTTP_ACCEPT",           /* 6 */
           NULL
       };
       
      @@ -1276,7 +1456,7 @@ static const char *req_header_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
           int index = (varname - req_header_var_names);
           const char *name;
       
      -    AP_DEBUG_ASSERT(index < 6);
      +    AP_DEBUG_ASSERT(index < 7);
           if (!ctx->r)
               return "";
       
      @@ -1329,7 +1509,7 @@ static const char *misc_var_fn(ap_expr_eval_ctx_t *ctx, const void *data)
           case 8:
               return ap_get_server_banner();
           case 9:
      -        return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER);
      +        return apr_itoa(ctx->p, MODULE_MAGIC_NUMBER_MAJOR);
           default:
               ap_assert(0);
           }
      @@ -1388,10 +1568,10 @@ static int op_R(ap_expr_eval_ctx_t *ctx, const void *data, const char *arg1)
       
           AP_DEBUG_ASSERT(subnet != NULL);
       
      -    if (!ctx->c)
      +    if (!ctx->r)
               return FALSE;
       
      -    return apr_ipsubnet_test(subnet, ctx->c->remote_addr);
      +    return apr_ipsubnet_test(subnet, ctx->r->useragent_addr);
       }
       
       static int op_T(ap_expr_eval_ctx_t *ctx, const void *data, const char *arg)
      @@ -1462,15 +1642,19 @@ static const struct expr_provider_single string_func_providers[] = {
           { req_table_func,       "http",           NULL, 0 },
           { req_table_func,       "note",           NULL, 0 },
           { req_table_func,       "reqenv",         NULL, 0 },
      +    { req_table_func,       "req_novary",     NULL, 0 },
           { tolower_func,         "tolower",        NULL, 0 },
           { toupper_func,         "toupper",        NULL, 0 },
           { escape_func,          "escape",         NULL, 0 },
           { unescape_func,        "unescape",       NULL, 0 },
           { file_func,            "file",           NULL, 1 },
           { filesize_func,        "filesize",       NULL, 1 },
      +    { base64_func,          "base64",         NULL, 0 },
      +    { unbase64_func,        "unbase64",       NULL, 0 },
      +    { sha1_func,            "sha1",           NULL, 0 },
      +    { md5_func,             "md5",            NULL, 0 },
           { NULL, NULL, NULL}
       };
      -/* XXX: base64 encode/decode ? */
       
       static const struct expr_provider_single unary_op_providers[] = {
           { op_nz,        "n", NULL,             0 },
      @@ -1535,7 +1719,12 @@ static int core_expr_lookup(ap_expr_lookup_parms *parms)
                       ap_assert(0);
                   }
                   while (prov->func) {
      -                if (strcasecmp(prov->name, parms->name) == 0) {
      +                int match;
      +                if (parms->type == AP_EXPR_FUNC_OP_UNARY)
      +                    match = !strcmp(prov->name, parms->name);
      +                else
      +                    match = !strcasecmp(prov->name, parms->name);
      +                if (match) {
                           if ((parms->flags & AP_EXPR_FLAG_RESTRICTED)
                               && prov->restricted) {
                               *parms->err =
      @@ -1567,6 +1756,7 @@ static int core_expr_lookup(ap_expr_lookup_parms *parms)
       static int expr_lookup_not_found(ap_expr_lookup_parms *parms)
       {
           const char *type;
      +    const char *prefix = "";
       
           switch (parms->type) {
           case AP_EXPR_FUNC_VAR:
      @@ -1588,8 +1778,12 @@ static int expr_lookup_not_found(ap_expr_lookup_parms *parms)
               *parms->err = "Inavalid expression type in expr_lookup";
               return !OK;
           }
      -    *parms->err = apr_psprintf(parms->ptemp, "%s '%s' does not exist", type,
      -                               parms->name);
      +    if (   parms->type == AP_EXPR_FUNC_OP_UNARY
      +        || parms->type == AP_EXPR_FUNC_OP_BINARY) {
      +        prefix = "-";
      +    }
      +    *parms->err = apr_psprintf(parms->ptemp, "%s '%s%s' does not exist", type,
      +                               prefix, parms->name);
           return !OK;
       }
       
      @@ -1597,6 +1791,7 @@ static int ap_expr_post_config(apr_pool_t *pconf, apr_pool_t *plog,
                                      apr_pool_t *ptemp, server_rec *s)
       {
           is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
      +    is_http2 = APR_RETRIEVE_OPTIONAL_FN(http2_is_h2);
           apr_pool_cleanup_register(pconf, &is_https, ap_pool_cleanup_set_null,
                                     apr_pool_cleanup_null);
           return OK;
      diff --git a/server/util_expr_parse.c b/server/util_expr_parse.c
      index 80f47374e40..bcf0173b732 100644
      --- a/server/util_expr_parse.c
      +++ b/server/util_expr_parse.c
      @@ -591,9 +591,9 @@ static const yytype_int8 yypact[] =
             25,   -35,    79,   -17,   -35,    -8,    60,    60,    43,    43,
             43,    43,    43,    43,    43,     5,     5,     0,    43,    43,
             43,    43,    43,    43,    43,   -35,   -27,   -35,   -35,    73,
      -     -35,     3,   -35,    25,    25,    25,    25,    25,    25,    25,
      +     -35,    86,     3,    25,    25,    25,    25,    25,    25,    25,
            -35,   -35,   -35,   -35,    23,    43,   -35,   -35,    25,    25,
      -      25,    25,    25,    25,   -35,   -35,   106,    43,    85,    25,
      +      25,    25,    25,    25,    25,   -35,   106,    43,    85,    25,
            -35,   -21,   -35,    43,   -35,    25
       };
       
      diff --git a/server/util_expr_parse.y b/server/util_expr_parse.y
      index ffa1ec5a9ce..85ed1231045 100644
      --- a/server/util_expr_parse.y
      +++ b/server/util_expr_parse.y
      @@ -81,10 +81,10 @@
       %token  T_OP_AND
       %token  T_OP_NOT
       
      -%left   T_OP_OR
      -%left   T_OP_AND
      -%left   T_OP_NOT
      -%left   T_OP_CONCAT
      +%right  T_OP_OR
      +%right  T_OP_AND
      +%right  T_OP_NOT
      +%right  T_OP_CONCAT
       
       %type   <exVal>   expr
       %type   <exVal>   comparison
      diff --git a/server/util_fcgi.c b/server/util_fcgi.c
      new file mode 100644
      index 00000000000..a241e965f67
      --- /dev/null
      +++ b/server/util_fcgi.c
      @@ -0,0 +1,287 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "httpd.h"
      +#include "http_core.h"
      +#include "http_log.h"
      +#include "util_fcgi.h"
      +
      +/* we know core's module_index is 0 */
      +#undef APLOG_MODULE_INDEX
      +#define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX
      +
      +AP_DECLARE(void) ap_fcgi_header_to_array(ap_fcgi_header *h,
      +                                         unsigned char a[])
      +{
      +    a[AP_FCGI_HDR_VERSION_OFFSET]        = h->version;
      +    a[AP_FCGI_HDR_TYPE_OFFSET]           = h->type;
      +    a[AP_FCGI_HDR_REQUEST_ID_B1_OFFSET]  = h->requestIdB1;
      +    a[AP_FCGI_HDR_REQUEST_ID_B0_OFFSET]  = h->requestIdB0;
      +    a[AP_FCGI_HDR_CONTENT_LEN_B1_OFFSET] = h->contentLengthB1;
      +    a[AP_FCGI_HDR_CONTENT_LEN_B0_OFFSET] = h->contentLengthB0;
      +    a[AP_FCGI_HDR_PADDING_LEN_OFFSET]    = h->paddingLength;
      +    a[AP_FCGI_HDR_RESERVED_OFFSET]       = h->reserved;
      +}
      +
      +AP_DECLARE(void) ap_fcgi_header_from_array(ap_fcgi_header *h,
      +                                           unsigned char a[])
      +{
      +    h->version         = a[AP_FCGI_HDR_VERSION_OFFSET];
      +    h->type            = a[AP_FCGI_HDR_TYPE_OFFSET];
      +    h->requestIdB1     = a[AP_FCGI_HDR_REQUEST_ID_B1_OFFSET];
      +    h->requestIdB0     = a[AP_FCGI_HDR_REQUEST_ID_B0_OFFSET];
      +    h->contentLengthB1 = a[AP_FCGI_HDR_CONTENT_LEN_B1_OFFSET];
      +    h->contentLengthB0 = a[AP_FCGI_HDR_CONTENT_LEN_B0_OFFSET];
      +    h->paddingLength   = a[AP_FCGI_HDR_PADDING_LEN_OFFSET];
      +    h->reserved        = a[AP_FCGI_HDR_RESERVED_OFFSET];
      +}
      +
      +AP_DECLARE(void) ap_fcgi_header_fields_from_array(unsigned char *version,
      +                                                  unsigned char *type,
      +                                                  apr_uint16_t *request_id,
      +                                                  apr_uint16_t *content_len,
      +                                                  unsigned char *padding_len,
      +                                                  unsigned char a[])
      +{
      +    *version         = a[AP_FCGI_HDR_VERSION_OFFSET];
      +    *type            = a[AP_FCGI_HDR_TYPE_OFFSET];
      +    *request_id      = (a[AP_FCGI_HDR_REQUEST_ID_B1_OFFSET] << 8)
      +                     +  a[AP_FCGI_HDR_REQUEST_ID_B0_OFFSET];
      +    *content_len     = (a[AP_FCGI_HDR_CONTENT_LEN_B1_OFFSET] << 8)
      +                     +  a[AP_FCGI_HDR_CONTENT_LEN_B0_OFFSET];
      +    *padding_len     = a[AP_FCGI_HDR_PADDING_LEN_OFFSET];
      +}
      +
      +AP_DECLARE(void) ap_fcgi_begin_request_body_to_array(ap_fcgi_begin_request_body *h,
      +                                                     unsigned char a[])
      +{
      +    a[AP_FCGI_BRB_ROLEB1_OFFSET]    = h->roleB1;
      +    a[AP_FCGI_BRB_ROLEB0_OFFSET]    = h->roleB0;
      +    a[AP_FCGI_BRB_FLAGS_OFFSET]     = h->flags;
      +    a[AP_FCGI_BRB_RESERVED0_OFFSET] = h->reserved[0];
      +    a[AP_FCGI_BRB_RESERVED1_OFFSET] = h->reserved[1];
      +    a[AP_FCGI_BRB_RESERVED2_OFFSET] = h->reserved[2];
      +    a[AP_FCGI_BRB_RESERVED3_OFFSET] = h->reserved[3];
      +    a[AP_FCGI_BRB_RESERVED4_OFFSET] = h->reserved[4];
      +}
      +
      +AP_DECLARE(void) ap_fcgi_fill_in_header(ap_fcgi_header *header,
      +                                        unsigned char type,
      +                                        apr_uint16_t request_id,
      +                                        apr_uint16_t content_len,
      +                                        unsigned char padding_len)
      +{
      +    header->version = AP_FCGI_VERSION_1;
      +
      +    header->type = type;
      +
      +    header->requestIdB1 = ((request_id >> 8) & 0xff);
      +    header->requestIdB0 = ((request_id) & 0xff);
      +
      +    header->contentLengthB1 = ((content_len >> 8) & 0xff);
      +    header->contentLengthB0 = ((content_len) & 0xff);
      +
      +    header->paddingLength = padding_len;
      +
      +    header->reserved = 0;
      +}
      +
      +AP_DECLARE(void) ap_fcgi_fill_in_request_body(ap_fcgi_begin_request_body *brb,
      +                                              int role,
      +                                              unsigned char flags)
      +{
      +    brb->roleB1 = ((role >> 8) & 0xff);
      +    brb->roleB0 = (role & 0xff);
      +    brb->flags = flags;
      +    brb->reserved[0] = 0;
      +    brb->reserved[1] = 0;
      +    brb->reserved[2] = 0;
      +    brb->reserved[3] = 0;
      +    brb->reserved[4] = 0;
      +}
      +
      +AP_DECLARE(apr_size_t) ap_fcgi_encoded_env_len(apr_table_t *env,
      +                                               apr_size_t maxlen,
      +                                               int *starting_elem)
      +{
      +    const apr_array_header_t *envarr;
      +    const apr_table_entry_t *elts;
      +    apr_size_t envlen, actualenvlen;
      +    int i;
      +
      +    if (maxlen > AP_FCGI_MAX_CONTENT_LEN) {
      +        maxlen = AP_FCGI_MAX_CONTENT_LEN;
      +    }
      +
      +    envarr = apr_table_elts(env);
      +    elts = (const apr_table_entry_t *) envarr->elts;
      +
      +    /* envlen - speculative, may overflow the limit
      +     * actualenvlen - len required without overflowing
      +     */
      +    envlen = actualenvlen = 0;
      +    for (i = *starting_elem; i < envarr->nelts; ) {
      +        apr_size_t keylen, vallen;
      +
      +        if (!elts[i].key) {
      +            (*starting_elem)++;
      +            i++;
      +            continue;
      +        }
      +
      +        keylen = strlen(elts[i].key);
      +
      +        if (keylen >> 7 == 0) {
      +            envlen += 1;
      +        }
      +        else {
      +            envlen += 4;
      +        }
      +
      +        envlen += keylen;
      +
      +        vallen = strlen(elts[i].val);
      +
      +        if (vallen >> 7 == 0) {
      +            envlen += 1;
      +        }
      +        else {
      +            envlen += 4;
      +        }
      +
      +        envlen += vallen;
      +
      +        if (envlen > maxlen) {
      +            break;
      +        }
      +
      +        actualenvlen = envlen;
      +        (*starting_elem)++;
      +        i++;
      +    }
      +
      +    return actualenvlen;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_fcgi_encode_env(request_rec *r,
      +                                            apr_table_t *env,
      +                                            void *buffer,
      +                                            apr_size_t buflen,
      +                                            int *starting_elem)
      +{
      +    apr_status_t rv = APR_SUCCESS;
      +    const apr_array_header_t *envarr;
      +    const apr_table_entry_t *elts;
      +    char *itr;
      +    int i;
      +
      +    envarr = apr_table_elts(env);
      +    elts = (const apr_table_entry_t *) envarr->elts;
      +
      +    itr = buffer;
      +
      +    for (i = *starting_elem; i < envarr->nelts; ) {
      +        apr_size_t keylen, vallen;
      +
      +        if (!elts[i].key) {
      +            (*starting_elem)++;
      +            i++;
      +            continue;
      +        }
      +
      +        keylen = strlen(elts[i].key);
      +
      +        if (keylen >> 7 == 0) {
      +            if (buflen < 1) {
      +                rv = APR_ENOSPC; /* overflow */
      +                break;
      +            }
      +            itr[0] = keylen & 0xff;
      +            itr += 1;
      +            buflen -= 1;
      +        }
      +        else {
      +            if (buflen < 4) {
      +                rv = APR_ENOSPC; /* overflow */
      +                break;
      +            }
      +            itr[0] = ((keylen >> 24) & 0xff) | 0x80;
      +            itr[1] = ((keylen >> 16) & 0xff);
      +            itr[2] = ((keylen >> 8) & 0xff);
      +            itr[3] = ((keylen) & 0xff);
      +            itr += 4;
      +            buflen -= 4;
      +        }
      +
      +        vallen = strlen(elts[i].val);
      +
      +        if (vallen >> 7 == 0) {
      +            if (buflen < 1) {
      +                rv = APR_ENOSPC; /* overflow */
      +                break;
      +            }
      +            itr[0] = vallen & 0xff;
      +            itr += 1;
      +            buflen -= 1;
      +        }
      +        else {
      +            if (buflen < 4) {
      +                rv = APR_ENOSPC; /* overflow */
      +                break;
      +            }
      +            itr[0] = ((vallen >> 24) & 0xff) | 0x80;
      +            itr[1] = ((vallen >> 16) & 0xff);
      +            itr[2] = ((vallen >> 8) & 0xff);
      +            itr[3] = ((vallen) & 0xff);
      +            itr += 4;
      +            buflen -= 4;
      +        }
      +
      +        if (buflen < keylen) {
      +            rv = APR_ENOSPC; /* overflow */
      +            break;
      +        }
      +        memcpy(itr, elts[i].key, keylen);
      +        itr += keylen;
      +        buflen -= keylen;
      +
      +        if (buflen < vallen) {
      +            rv = APR_ENOSPC; /* overflow */
      +            break;
      +        }
      +        memcpy(itr, elts[i].val, vallen);
      +        itr += vallen;
      +
      +        if (buflen == vallen) {
      +            (*starting_elem)++;
      +            i++;
      +            break; /* filled up predicted space, as expected */
      +        }
      +
      +        buflen -= vallen;
      +
      +        (*starting_elem)++;
      +        i++;
      +    }
      +
      +    if (rv != APR_SUCCESS) {
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02492)
      +                      "ap_fcgi_encode_env: out of space "
      +                      "encoding environment");
      +    }
      +
      +    return rv;
      +}
      diff --git a/server/util_filter.c b/server/util_filter.c
      index 27046b330e2..51e24f67e8e 100644
      --- a/server/util_filter.c
      +++ b/server/util_filter.c
      @@ -294,7 +294,7 @@ static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx,
                   outf = r_filters;
               }
               else {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(00080)
                                 "a content filter was added without a request: %s", frec->name);
                   return NULL;
               }
      @@ -304,7 +304,7 @@ static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx,
                   outf = p_filters;
               }
               else {
      -            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c,
      +            ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(00081)
                                 "a protocol filter was added without a request: %s", frec->name);
                   return NULL;
               }
      @@ -401,7 +401,7 @@ static ap_filter_t *add_any_filter(const char *name, void *ctx,
               }
           }
       
      -    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, r ? r->connection : c,
      +    ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, r ? r->connection : c, APLOGNO(00082)
                         "an unknown filter was not added: %s", name);
           return NULL;
       }
      @@ -479,6 +479,63 @@ AP_DECLARE(void) ap_remove_output_filter(ap_filter_t *f)
                             &f->c->output_filters);
       }
       
      +AP_DECLARE(apr_status_t) ap_remove_input_filter_byhandle(ap_filter_t *next,
      +                                                         const char *handle)
      +{
      +    ap_filter_t *found = NULL;
      +    ap_filter_rec_t *filter;
      +
      +    if (!handle) {
      +        return APR_EINVAL;
      +    }
      +    filter = ap_get_input_filter_handle(handle);
      +    if (!filter) {
      +        return APR_NOTFOUND;
      +    }
      +
      +    while (next) {
      +        if (next->frec == filter) {
      +            found = next;
      +            break;
      +        }
      +        next = next->next;
      +    }
      +    if (found) {
      +        ap_remove_input_filter(found);
      +        return APR_SUCCESS;
      +    }
      +    return APR_NOTFOUND;
      +}
      +
      +AP_DECLARE(apr_status_t) ap_remove_output_filter_byhandle(ap_filter_t *next,
      +                                                          const char *handle)
      +{
      +    ap_filter_t *found = NULL;
      +    ap_filter_rec_t *filter;
      +
      +    if (!handle) {
      +        return APR_EINVAL;
      +    }
      +    filter = ap_get_output_filter_handle(handle);
      +    if (!filter) {
      +        return APR_NOTFOUND;
      +    }
      +
      +    while (next) {
      +        if (next->frec == filter) {
      +            found = next;
      +            break;
      +        }
      +        next = next->next;
      +    }
      +    if (found) {
      +        ap_remove_output_filter(found);
      +        return APR_SUCCESS;
      +    }
      +    return APR_NOTFOUND;
      +}
      +
      +
       /*
        * Read data from the next filter in the filter stack.  Data should be
        * modified in the bucket brigade that is passed in.  The core allocates the
      @@ -535,6 +592,42 @@ AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *next,
           return AP_NOBODY_WROTE;
       }
       
      +/* Pass the buckets to the next filter in the filter stack
      + * checking return status for filter errors.
      + * returns: OK if ap_pass_brigade returns APR_SUCCESS
      + *          AP_FILTER_ERROR if filter error exists
      + *          HTTP_INTERNAL_SERVER_ERROR for all other cases
      + *          logged with optional errmsg
      + */
      +AP_DECLARE(apr_status_t) ap_pass_brigade_fchk(request_rec *r,
      +                                              apr_bucket_brigade *bb,
      +                                              const char *fmt,
      +                                              ...)
      +{
      +    apr_status_t rv;
      +
      +    rv = ap_pass_brigade(r->output_filters, bb);
      +    if (rv != APR_SUCCESS) {
      +        if (rv != AP_FILTER_ERROR) {
      +            if (!fmt)
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(00083)
      +                              "ap_pass_brigade returned %d", rv);
      +            else {
      +                va_list ap;
      +                const char *res;
      +                va_start(ap, fmt);
      +                res = apr_pvsprintf(r->pool, fmt, ap);
      +                va_end(ap);
      +                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, r, APLOGNO(03158)
      +                              "%s", res);
      +            }
      +            return HTTP_INTERNAL_SERVER_ERROR;
      +        }
      +        return AP_FILTER_ERROR;
      +    }
      +    return OK;
      +}
      +
       AP_DECLARE(apr_status_t) ap_save_brigade(ap_filter_t *f,
                                                apr_bucket_brigade **saveto,
                                                apr_bucket_brigade **b, apr_pool_t *p)
      diff --git a/server/util_md5.c b/server/util_md5.c
      index 83bfa757411..148c60ceb43 100644
      --- a/server/util_md5.c
      +++ b/server/util_md5.c
      @@ -52,11 +52,9 @@
       
       AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int length)
       {
      -    const char *hex = "0123456789abcdef";
           apr_md5_ctx_t my_md5;
           unsigned char hash[APR_MD5_DIGESTSIZE];
      -    char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
      -    int i;
      +    char result[2 * APR_MD5_DIGESTSIZE + 1];
       
           /*
            * Take the MD5 hash of the string argument.
      @@ -69,11 +67,7 @@ AP_DECLARE(char *) ap_md5_binary(apr_pool_t *p, const unsigned char *buf, int le
           apr_md5_update(&my_md5, buf, (unsigned int)length);
           apr_md5_final(hash, &my_md5);
       
      -    for (i = 0, r = result; i < APR_MD5_DIGESTSIZE; i++) {
      -        *r++ = hex[hash[i] >> 4];
      -        *r++ = hex[hash[i] & 0xF];
      -    }
      -    *r = '\0';
      +    ap_bin2hex(hash, APR_MD5_DIGESTSIZE, result);
       
           return apr_pstrndup(p, result, APR_MD5_DIGESTSIZE*2);
       }
      diff --git a/server/util_mutex.c b/server/util_mutex.c
      index c5c1bf0aaab..9605aa482ad 100644
      --- a/server/util_mutex.c
      +++ b/server/util_mutex.c
      @@ -157,7 +157,7 @@ AP_DECLARE_NONSTD(void) ap_mutex_init(apr_pool_t *p)
           /* initialize default mutex configuration */
           def = apr_pcalloc(p, sizeof *def);
           def->mech = APR_LOCK_DEFAULT;
      -    def->dir = DEFAULT_REL_RUNTIMEDIR;
      +    def->dir = ap_runtime_dir_relative(p, "");
           apr_hash_set(mxcfg_by_type, "default", APR_HASH_KEY_STRING, def);
       }
       
      @@ -165,6 +165,7 @@ AP_DECLARE_NONSTD(const char *)ap_set_mutex(cmd_parms *cmd, void *dummy,
                                                   const char *arg)
       {
           apr_pool_t *p = cmd->pool;
      +    apr_pool_t *ptemp = cmd->temp_pool;
           const char **elt;
           const char *mechdir;
           int no_mutex = 0, omit_pid = 0;
      @@ -191,7 +192,7 @@ AP_DECLARE_NONSTD(const char *)ap_set_mutex(cmd_parms *cmd, void *dummy,
                                  " (" AP_ALL_AVAILABLE_MUTEXES_STRING ")", NULL);
           }
           else if (rv == APR_BADARG
      -             || (mutexdir && !ap_is_directory(p, mutexdir))) {
      +             || (mutexdir && !ap_is_directory(ptemp, mutexdir))) {
               return apr_pstrcat(p, "Invalid Mutex directory in argument ",
                                  mechdir, NULL);
           }
      @@ -372,21 +373,21 @@ static mutex_cfg_t *mxcfg_lookup(apr_pool_t *p, const char *type)
       
       static void log_bad_create_options(server_rec *s, const char *type)
       {
      -    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(00021)
                        "Invalid options were specified when creating the %s mutex",
                        type);
       }
       
       static void log_unknown_type(server_rec *s, const char *type)
       {
      -    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s,
      +    ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, APLOGNO(00022)
                        "Can't create mutex of unknown type %s", type);
       }
       
       static void log_create_failure(apr_status_t rv, server_rec *s, const char *type,
                                      const char *fname)
       {
      -    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      +    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(00023)
                        "Couldn't create the %s mutex %s%s%s", type,
                        fname ? "(file " : "",
                        fname ? fname : "",
      @@ -396,7 +397,7 @@ static void log_create_failure(apr_status_t rv, server_rec *s, const char *type,
       #ifdef AP_NEED_SET_MUTEX_PERMS
       static void log_perms_failure(apr_status_t rv, server_rec *s, const char *type)
       {
      -    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s,
      +    ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, APLOGNO(00024)
                        "Couldn't set permissions on the %s mutex; "
                        "check User and Group directives",
                        type);
      diff --git a/server/util_pcre.c b/server/util_pcre.c
      index 7196878d0cd..4d2adef25b6 100644
      --- a/server/util_pcre.c
      +++ b/server/util_pcre.c
      @@ -45,6 +45,7 @@ POSSIBILITY OF SUCH DAMAGE.
       
       #include "httpd.h"
       #include "apr_strings.h"
      +#include "apr_tables.h"
       #include "pcre.h"
       
       #define APR_WANT_STRFUNC
      @@ -123,7 +124,8 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t * preg, const char *pattern, int cflags)
       {
           const char *errorptr;
           int erroffset;
      -    int options = 0;
      +    int errcode = 0;
      +    int options = PCRE_DUPNAMES;
       
           if ((cflags & AP_REG_ICASE) != 0)
               options |= PCRE_CASELESS;
      @@ -133,13 +135,21 @@ AP_DECLARE(int) ap_regcomp(ap_regex_t * preg, const char *pattern, int cflags)
               options |= PCRE_DOTALL;
       
           preg->re_pcre =
      -        pcre_compile(pattern, options, &errorptr, &erroffset, NULL);
      +        pcre_compile2(pattern, options, &errcode, &errorptr, &erroffset, NULL);
           preg->re_erroffset = erroffset;
       
      -    if (preg->re_pcre == NULL)
      +    if (preg->re_pcre == NULL) {
      +        /*
      +         * There doesn't seem to be constants defined for compile time error
      +         * codes. 21 is "failed to get memory" according to pcreapi(3).
      +         */
      +        if (errcode == 21)
      +            return AP_REG_ESPACE;
               return AP_REG_INVARG;
      +    }
       
      -    preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
      +    pcre_fullinfo((const pcre *)preg->re_pcre, NULL,
      +                   PCRE_INFO_CAPTURECOUNT, &(preg->re_nsub));
           return 0;
       }
       
      @@ -247,4 +257,43 @@ AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
           }
       }
       
      +AP_DECLARE(int) ap_regname(const ap_regex_t *preg,
      +                           apr_array_header_t *names, const char *prefix,
      +                           int upper)
      +{
      +    int namecount;
      +    int nameentrysize;
      +    int i;
      +    char *nametable;
      +
      +    pcre_fullinfo((const pcre *)preg->re_pcre, NULL,
      +                       PCRE_INFO_NAMECOUNT, &namecount);
      +    pcre_fullinfo((const pcre *)preg->re_pcre, NULL,
      +                       PCRE_INFO_NAMEENTRYSIZE, &nameentrysize);
      +    pcre_fullinfo((const pcre *)preg->re_pcre, NULL,
      +                       PCRE_INFO_NAMETABLE, &nametable);
      +
      +    for (i = 0; i < namecount; i++) {
      +        const char *offset = nametable + i * nameentrysize;
      +        int capture = ((offset[0] << 8) + offset[1]);
      +        while (names->nelts <= capture) {
      +            apr_array_push(names);
      +        }
      +        if (upper || prefix) {
      +            char *name = ((char **) names->elts)[capture] =
      +                    prefix ? apr_pstrcat(names->pool, prefix, offset + 2,
      +                            NULL) :
      +                            apr_pstrdup(names->pool, offset + 2);
      +            if (upper) {
      +                ap_str_toupper(name);
      +            }
      +        }
      +        else {
      +            ((const char **)names->elts)[capture] = offset + 2;
      +        }
      +    }
      +
      +    return namecount;
      +}
      +
       /* End of pcreposix.c */
      diff --git a/server/util_regex.c b/server/util_regex.c
      index 73eccec761d..2a30d681769 100644
      --- a/server/util_regex.c
      +++ b/server/util_regex.c
      @@ -46,6 +46,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
           ap_rxplus_t *ret = apr_pcalloc(pool, sizeof(ap_rxplus_t));
           char delim = 0;
           enum { SUBSTITUTE = 's', MATCH = 'm'} action = MATCH;
      +
           if (!apr_isalnum(pattern[0])) {
               delim = *str++;
           }
      @@ -65,7 +66,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
           if (delim) {
               endp = ap_strchr_c(str, delim);
           }
      -    if (!endp) { /* there's no delim  or flags */
      +    if (!endp) { /* there's no delim or flags */
               if (ap_regcomp(&ret->rx, pattern, 0) == 0) {
                   apr_pool_cleanup_register(pool, &ret->rx, rxplus_cleanup,
                                             apr_pool_cleanup_null);
      @@ -77,7 +78,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
           }
       
           /* We have a delimiter.  Use it to extract the regexp */
      -    rxstr = apr_pstrndup(pool, str, endp-str);
      +    rxstr = apr_pstrmemdup(pool, str, endp-str);
       
           /* If it's a substitution, we need the replacement string
            * TODO: possible future enhancement - support other parsing
      @@ -89,7 +90,7 @@ AP_DECLARE(ap_rxplus_t*) ap_rxplus_compile(apr_pool_t *pool,
                   /* missing replacement string is an error */
                   return NULL;
               }
      -        ret->subs = apr_pstrndup(pool, str, (endp-str));
      +        ret->subs = apr_pstrmemdup(pool, str, endp-str);
           }
       
           /* anything after the current delimiter is flags */
      @@ -162,7 +163,6 @@ AP_DECLARE(int) ap_rxplus_exec(apr_pool_t *pool, ap_rxplus_t *rx,
               remainder = pattern + startl + oldl;
               if (rx->flags & AP_REG_MULTI) {
                   /* recurse to do any further matches */
      -            char *subs;
                   ret += ap_rxplus_exec(pool, rx, remainder, &subs);
                   if (ret > 1) {
                       /* a further substitution happened */
      @@ -206,5 +206,5 @@ AP_DECLARE(char*) ap_rxplus_pmatch(apr_pool_t *pool, ap_rxplus_t *rx, int n)
           int len;
           const char *match;
           ap_rxplus_match(rx, n, &len, &match);
      -    return (match != NULL) ? apr_pstrndup(pool, match, len) : NULL;
      +    return apr_pstrndup(pool, match, len);
       }
      diff --git a/server/util_script.c b/server/util_script.c
      index 243d5093ac1..4121ae0aec1 100644
      --- a/server/util_script.c
      +++ b/server/util_script.c
      @@ -73,9 +73,10 @@ static char *http2env(request_rec *r, const char *w)
                   *cp++ = '_';
               }
               else {
      -            ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      -                          "Not exporting header with invalid name as envvar: %s",
      -                          ap_escape_logitem(r->pool, w));
      +            if (APLOGrtrace1(r))
      +                ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r,
      +                            "Not exporting header with invalid name as envvar: %s",
      +                            ap_escape_logitem(r->pool, w));
                   return NULL;
               }
           }
      @@ -122,7 +123,11 @@ AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
                   *whack++ = '_';
               }
               while (*whack != '=') {
      -            if (!apr_isalnum(*whack) && *whack != '_') {
      +#ifdef WIN32
      +            if (!apr_isalnum(*whack) && *whack != '(' && *whack != ')') {
      +#else
      +            if (!apr_isalnum(*whack)) {
      +#endif
                       *whack = '_';
                   }
                   ++whack;
      @@ -139,11 +144,14 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
           apr_table_t *e;
           server_rec *s = r->server;
           conn_rec *c = r->connection;
      +    core_dir_config *conf =
      +        (core_dir_config *)ap_get_core_module_config(r->per_dir_config);
           const char *env_temp;
           const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
           const apr_table_entry_t *hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
           int i;
           apr_port_t rport;
      +    char *q;
       
           /* use a temporary apr_table_t which we'll overlap onto
            * r->subprocess_env later
      @@ -178,6 +186,14 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
               else if (!strcasecmp(hdrs[i].key, "Content-length")) {
                   apr_table_addn(e, "CONTENT_LENGTH", hdrs[i].val);
               }
      +        /* HTTP_PROXY collides with a popular envvar used to configure
      +         * proxies, don't let clients set/override it.  But, if you must...
      +         */
      +#ifndef SECURITY_HOLE_PASS_PROXY
      +        else if (!ap_cstr_casecmp(hdrs[i].key, "Proxy")) {
      +            ;
      +        }
      +#endif
               /*
                * You really don't want to disable this check, since it leaves you
                * wide open to CGIs stealing passwords and people viewing them
      @@ -186,7 +202,9 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
       #ifndef SECURITY_HOLE_PASS_AUTHORIZATION
               else if (!strcasecmp(hdrs[i].key, "Authorization")
                        || !strcasecmp(hdrs[i].key, "Proxy-Authorization")) {
      -            continue;
      +            if (conf->cgi_pass_auth == AP_CGI_PASS_AUTH_ON) {
      +                add_unless_null(e, http2env(r, hdrs[i].key), hdrs[i].val);
      +            }
               }
       #endif
               else
      @@ -234,16 +252,23 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
           apr_table_addn(e, "SERVER_PORT",
                         apr_psprintf(r->pool, "%u", ap_get_server_port(r)));
           add_unless_null(e, "REMOTE_HOST",
      -                    ap_get_remote_host(c, r->per_dir_config, REMOTE_HOST, NULL));
      -    apr_table_addn(e, "REMOTE_ADDR", c->remote_ip);
      +                    ap_get_useragent_host(r, REMOTE_HOST, NULL));
      +    apr_table_addn(e, "REMOTE_ADDR", r->useragent_ip);
           apr_table_addn(e, "DOCUMENT_ROOT", ap_document_root(r));    /* Apache */
           apr_table_setn(e, "REQUEST_SCHEME", ap_http_scheme(r));
           apr_table_addn(e, "CONTEXT_PREFIX", ap_context_prefix(r));
           apr_table_addn(e, "CONTEXT_DOCUMENT_ROOT", ap_context_document_root(r));
           apr_table_addn(e, "SERVER_ADMIN", s->server_admin); /* Apache */
      -    apr_table_addn(e, "SCRIPT_FILENAME", r->filename);  /* Apache */
      +    if (apr_table_get(r->notes, "proxy-noquery") && (q = ap_strchr(r->filename, '?'))) {
      +        *q = '\0';
      +        apr_table_addn(e, "SCRIPT_FILENAME", apr_pstrdup(r->pool, r->filename));
      +        *q = '?';
      +    }
      +    else {
      +        apr_table_addn(e, "SCRIPT_FILENAME", r->filename);  /* Apache */
      +    }
       
      -    rport = c->remote_addr->port;
      +    rport = c->client_addr->port;
           apr_table_addn(e, "REMOTE_PORT", apr_itoa(r->pool, rport));
       
           if (r->user) {
      @@ -269,12 +294,30 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
           /* Apache custom error responses. If we have redirected set two new vars */
       
           if (r->prev) {
      +        if (conf->qualify_redirect_url != AP_CORE_CONFIG_ON) { 
      +            add_unless_null(e, "REDIRECT_URL", r->prev->uri);
      +        }
      +        else { 
      +            /* PR#57785: reconstruct full URL here */
      +            apr_uri_t *uri = &r->prev->parsed_uri;
      +            if (!uri->scheme) {
      +                uri->scheme = (char*)ap_http_scheme(r->prev);
      +            }
      +            if (!uri->port) {
      +                uri->port = ap_get_server_port(r->prev);
      +                uri->port_str = apr_psprintf(r->pool, "%u", uri->port);
      +            }
      +            if (!uri->hostname) {
      +                uri->hostname = (char*)ap_get_server_name_for_url(r->prev);
      +            }
      +            add_unless_null(e, "REDIRECT_URL",
      +                            apr_uri_unparse(r->pool, uri, 0));
      +        }
               add_unless_null(e, "REDIRECT_QUERY_STRING", r->prev->args);
      -        add_unless_null(e, "REDIRECT_URL", r->prev->uri);
           }
       
           if (e != r->subprocess_env) {
      -      apr_table_overlap(r->subprocess_env, e, APR_OVERLAP_TABLES_SET);
      +        apr_table_overlap(r->subprocess_env, e, APR_OVERLAP_TABLES_SET);
           }
       }
       
      @@ -335,12 +378,25 @@ static char *original_uri(request_rec *r)
       AP_DECLARE(void) ap_add_cgi_vars(request_rec *r)
       {
           apr_table_t *e = r->subprocess_env;
      +    core_dir_config *conf =
      +        (core_dir_config *)ap_get_core_module_config(r->per_dir_config);
      +    int request_uri_from_original = 1;
      +    const char *request_uri_rule;
       
           apr_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
           apr_table_setn(e, "SERVER_PROTOCOL", r->protocol);
           apr_table_setn(e, "REQUEST_METHOD", r->method);
           apr_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
      -    apr_table_setn(e, "REQUEST_URI", original_uri(r));
      +
      +    if (conf->cgi_var_rules) {
      +        request_uri_rule = apr_hash_get(conf->cgi_var_rules, "REQUEST_URI",
      +                                        APR_HASH_KEY_STRING);
      +        if (request_uri_rule && !strcmp(request_uri_rule, "current-uri")) {
      +            request_uri_from_original = 0;
      +        }
      +    }
      +    apr_table_setn(e, "REQUEST_URI",
      +                   request_uri_from_original ? original_uri(r) : r->uri);
       
           /* Note that the code below special-cases scripts run from includes,
            * because it "knows" that the sub_request has been hacked to have the
      @@ -438,12 +494,14 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
                   const char *msg = "Premature end of script headers";
                   if (first_header)
                       msg = "End of script output before headers";
      +            /* Intentional no APLOGNO */
                   ap_log_rerror(SCRIPT_LOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
                                 "%s: %s", msg,
                                 apr_filepath_name_get(r->filename));
                   return HTTP_INTERNAL_SERVER_ERROR;
               }
               else if (rv == -1) {
      +            /* Intentional no APLOGNO */
                   ap_log_rerror(SCRIPT_LOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
                                 "Script timed out before returning headers: %s",
                                 apr_filepath_name_get(r->filename));
      @@ -534,7 +592,8 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
                   }
                   if (maybeASCII > maybeEBCDIC) {
                       ap_log_error(SCRIPT_LOG_MARK, APLOG_ERR, 0, r->server,
      -                             "CGI Interface Error: Script headers apparently ASCII: (CGI = %s)",
      +                             APLOGNO(02660) "CGI Interface Error: "
      +                             "Script headers apparently ASCII: (CGI = %s)",
                                    r->filename);
                       inbytes_left = outbytes_left = cp - w;
                       apr_xlate_conv_buffer(ap_hdrs_from_ascii,
      @@ -545,11 +604,12 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
               if (!(l = strchr(w, ':'))) {
                   if (!buffer) {
                       /* Soak up all the script output - may save an outright kill */
      -                while ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data)) {
      +                while ((*getsfunc)(w, MAX_STRING_LEN - 1, getsfunc_data) > 0) {
                           continue;
                       }
                   }
       
      +            /* Intentional no APLOGNO */
                   ap_log_rerror(SCRIPT_LOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
                                 "malformed header from script '%s': Bad header: %.30s",
                                 apr_filepath_name_get(r->filename), w);
      @@ -557,7 +617,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
               }
       
               *l++ = '\0';
      -        while (*l && apr_isspace(*l)) {
      +        while (apr_isspace(*l)) {
                   ++l;
               }
       
      @@ -582,13 +642,15 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
               else if (!strcasecmp(w, "Status")) {
                   r->status = cgi_status = atoi(l);
                   if (!ap_is_HTTP_VALID_RESPONSE(cgi_status))
      +                /* Intentional no APLOGNO */
                       ap_log_rerror(SCRIPT_LOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
      -                              "Invalid status line from script '%s': %s",
      -                              apr_filepath_name_get(r->filename), w);
      +                              "Invalid status line from script '%s': %.30s",
      +                              apr_filepath_name_get(r->filename), l);
                   else
      -                ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r,
      -                              "Status line from script '%s': %s",
      -                              apr_filepath_name_get(r->filename), w);
      +                if (APLOGrtrace1(r))
      +                   ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r,
      +                                 "Status line from script '%s': %.30s",
      +                                 apr_filepath_name_get(r->filename), l);
                   r->status_line = apr_pstrdup(r->pool, l);
               }
               else if (!strcasecmp(w, "Location")) {
      @@ -664,7 +726,8 @@ static int getsfunc_BRIGADE(char *buf, int len, void *arg)
           apr_status_t rv;
           int done = 0;
       
      -    while ((dst < dst_end) && !done && !APR_BUCKET_IS_EOS(e)) {
      +    while ((dst < dst_end) && !done && e != APR_BRIGADE_SENTINEL(bb)
      +           && !APR_BUCKET_IS_EOS(e)) {
               const char *bucket_data;
               apr_size_t bucket_data_len;
               const char *src;
      @@ -674,6 +737,7 @@ static int getsfunc_BRIGADE(char *buf, int len, void *arg)
               rv = apr_bucket_read(e, &bucket_data, &bucket_data_len,
                                    APR_BLOCK_READ);
               if (rv != APR_SUCCESS || (bucket_data_len == 0)) {
      +            *dst = '\0';
                   return APR_STATUS_IS_TIMEUP(rv) ? -1 : 0;
               }
               src = bucket_data;
      @@ -692,12 +756,11 @@ static int getsfunc_BRIGADE(char *buf, int len, void *arg)
                   apr_bucket_split(e, src - bucket_data);
               }
               next = APR_BUCKET_NEXT(e);
      -        APR_BUCKET_REMOVE(e);
      -        apr_bucket_destroy(e);
      +        apr_bucket_delete(e);
               e = next;
           }
           *dst = 0;
      -    return 1;
      +    return done;
       }
       
       AP_DECLARE(int) ap_scan_script_header_err_brigade(request_rec *r,
      @@ -730,8 +793,10 @@ static int getsfunc_STRING(char *w, int len, void *pvastrs)
           const char *p;
           int t;
       
      -    if (!strs->curpos || !*strs->curpos)
      +    if (!strs->curpos || !*strs->curpos) {
      +        w[0] = '\0';
               return 0;
      +    }
           p = ap_strchr_c(strs->curpos, '\n');
           if (p)
               ++p;
      diff --git a/server/util_xml.c b/server/util_xml.c
      index 6f31fe96de5..4845194656e 100644
      --- a/server/util_xml.c
      +++ b/server/util_xml.c
      @@ -59,6 +59,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
                                       READ_BLOCKSIZE);
       
               if (status != APR_SUCCESS) {
      +            result = ap_map_http_request_error(status, HTTP_BAD_REQUEST);
                   goto read_error;
               }
       
      @@ -85,7 +86,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
       
                   total_read += len;
                   if (limit_xml_body && total_read > limit_xml_body) {
      -                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +                ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00539)
                                     "XML request body is larger than the configured "
                                     "limit of %lu", (unsigned long)limit_xml_body);
                       result = HTTP_REQUEST_ENTITY_TOO_LARGE;
      @@ -111,7 +112,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
                   *pdoc = NULL;
                   return OK;
               }
      -        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00540)
                             "XML parser error (at end). status=%d", status);
               return HTTP_BAD_REQUEST;
           }
      @@ -123,7 +124,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc)
       
         parser_error:
           (void) apr_xml_parser_geterror(parser, errbuf, sizeof(errbuf));
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      +    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00541)
                         "XML Parser Error: %s", errbuf);
       
           /* FALLTHRU */
      diff --git a/server/vhost.c b/server/vhost.c
      index 825708d9c73..c4bd846f7d9 100644
      --- a/server/vhost.c
      +++ b/server/vhost.c
      @@ -198,7 +198,7 @@ static const char *get_addresses(apr_pool_t *p, const char *w_,
           else {
               rv = apr_sockaddr_info_get(&my_addr, host, APR_UNSPEC, port, 0, p);
               if (rv != APR_SUCCESS) {
      -            ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL,
      +            ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00547)
                       "Could not resolve host name %s -- ignoring!", host);
                   return NULL;
               }
      @@ -228,7 +228,7 @@ const char *ap_parse_vhost_addrs(apr_pool_t *p,
           server_addr_rec **addrs;
           const char *err;
       
      -    /* start the list of addreses */
      +    /* start the list of addresses */
           addrs = &s->addrs;
           while (hostname[0]) {
               err = get_addresses(p, ap_getword_conf(p, &hostname), &addrs, s->port);
      @@ -255,7 +255,7 @@ AP_DECLARE_NONSTD(const char *)ap_set_name_virtual_host(cmd_parms *cmd,
       {
           static int warnonce = 0;
           if (++warnonce == 1) {
      -        ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_STARTUP, APR_SUCCESS, NULL,
      +        ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_STARTUP, APR_SUCCESS, NULL, APLOGNO(00548)
                            "NameVirtualHost has no effect and will be removed in the "
                            "next release %s:%d",
                            cmd->directive->filename,
      @@ -298,7 +298,7 @@ static void dump_iphash_statistics(server_rec *main_s)
           }
           qsort(count, IPHASH_TABLE_SIZE, sizeof(count[0]), iphash_compare);
           p = buf + apr_snprintf(buf, sizeof(buf),
      -                           "iphash: total hashed = %u, avg chain = %u, "
      +                           APLOGNO(03235) "iphash: total hashed = %u, avg chain = %u, "
                                  "chain lengths (count x len):",
                                  total, total / IPHASH_TABLE_SIZE);
           total = 1;
      @@ -314,6 +314,8 @@ static void dump_iphash_statistics(server_rec *main_s)
           }
           p += apr_snprintf(p, sizeof(buf) - (p - buf), " %ux%u",
                             total, count[IPHASH_TABLE_SIZE - 1]);
      +    /* Intentional no APLOGNO */
      +    /* buf provides APLOGNO */
           ap_log_error(APLOG_MARK, APLOG_DEBUG, main_s, buf);
       }
       #endif
      @@ -572,19 +574,27 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
       
           /* The next things to go into the hash table are the virtual hosts
            * themselves.  They're listed off of main_s->next in the reverse
      -     * order they occured in the config file, so we insert them at
      +     * order they occurred in the config file, so we insert them at
            * the iphash_table_tail but don't advance the tail.
            */
       
           for (s = main_s->next; s; s = s->next) {
      +        server_addr_rec *sar_prev = NULL;
               has_default_vhost_addr = 0;
               for (sar = s->addrs; sar; sar = sar->next) {
                   ipaddr_chain *ic;
                   char inaddr_any[16] = {0}; /* big enough to handle IPv4 or IPv6 */
      -
      +            /* XXX: this treats 0.0.0.0 as a "default" server which matches no-exact-match for IPv6 */
                   if (!memcmp(sar->host_addr->ipaddr_ptr, inaddr_any, sar->host_addr->ipaddr_len)) {
                       ic = find_default_server(sar->host_port);
      -                if (!ic || sar->host_port != ic->sar->host_port) {
      +
      +                if (ic && sar->host_port == ic->sar->host_port) { /* we're a match for an existing "default server"  */
      +                    if (!sar_prev || memcmp(sar_prev->host_addr->ipaddr_ptr, inaddr_any, sar_prev->host_addr->ipaddr_len)
      +                                  || sar_prev->host_port != sar->host_port) { 
      +                        add_name_vhost_config(p, main_s, s, sar, ic);
      +                    }
      +                }
      +                else { 
                           /* No default server, or we found a default server but
                           ** exactly one of us is a wildcard port, which means we want
                           ** two ip-based vhosts not an NVH with two names
      @@ -592,6 +602,7 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
                           ic = new_ipaddr_chain(p, s, sar);
                           ic->next = default_list;
                           default_list = ic;
      +                    add_name_vhost_config(p, main_s, s, sar, ic);
                       }
                       has_default_vhost_addr = 1;
                   }
      @@ -609,8 +620,9 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
                           ic->next = *iphash_table_tail[bucket];
                           *iphash_table_tail[bucket] = ic;
                       }
      +                add_name_vhost_config(p, main_s, s, sar, ic);
                   }
      -            add_name_vhost_config(p, main_s, s, sar, ic);
      +            sar_prev = sar;
               }
       
               /* Ok now we want to set up a server_hostname if the user was
      @@ -643,7 +655,7 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s)
                           char *ipaddr_str;
       
                           apr_sockaddr_ip_get(&ipaddr_str, s->addrs->host_addr);
      -                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, main_s,
      +                    ap_log_error(APLOG_MARK, APLOG_ERR, rv, main_s, APLOGNO(00549)
                                        "Failed to resolve server name "
                                        "for %s (check DNS) -- or specify an explicit "
                                        "ServerName",
      @@ -675,6 +687,113 @@ static int vhost_check_config(apr_pool_t *p, apr_pool_t *plog,
        * run-time vhost matching functions
        */
       
      +static apr_status_t fix_hostname_v6_literal(request_rec *r, char *host)
      +{
      +    char *dst;
      +    int double_colon = 0;
      +
      +    for (dst = host; *dst; dst++) {
      +        if (apr_isxdigit(*dst)) {
      +            if (apr_isupper(*dst)) {
      +                *dst = apr_tolower(*dst);
      +            }
      +        }
      +        else if (*dst == ':') {
      +            if (*(dst + 1) == ':') {
      +                if (double_colon)
      +                    return APR_EINVAL;
      +                double_colon = 1;
      +            }
      +            else if (*(dst + 1) == '.') {
      +                return APR_EINVAL;
      +            }
      +        }
      +        else if (*dst == '.') {
      +            /* For IPv4-mapped IPv6 addresses like ::FFFF:129.144.52.38 */
      +            if (*(dst + 1) == ':' || *(dst + 1) == '.')
      +                return APR_EINVAL;
      +        }
      +        else {
      +            return APR_EINVAL;
      +        }
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +static apr_status_t fix_hostname_non_v6(request_rec *r, char *host)
      +{
      +    char *dst;
      +
      +    for (dst = host; *dst; dst++) {
      +        if (apr_islower(*dst)) {
      +            /* leave char unchanged */
      +        }
      +        else if (*dst == '.') {
      +            if (*(dst + 1) == '.') {
      +                return APR_EINVAL;
      +            }
      +        }
      +        else if (apr_isupper(*dst)) {
      +            *dst = apr_tolower(*dst);
      +        }
      +        else if (*dst == '/' || *dst == '\\') {
      +            return APR_EINVAL;
      +        }
      +    }
      +    /* strip trailing gubbins */
      +    if (dst > host && dst[-1] == '.') {
      +        dst[-1] = '\0';
      +    }
      +    return APR_SUCCESS;
      +}
      +
      +/*
      + * If strict mode ever becomes the default, this should be folded into
      + * fix_hostname_non_v6()
      + */
      +static apr_status_t strict_hostname_check(request_rec *r, char *host)
      +{
      +    char *ch;
      +    int is_dotted_decimal = 1, leading_zeroes = 0, dots = 0;
      +
      +    for (ch = host; *ch; ch++) {
      +        if (apr_isalpha(*ch) || *ch == '-') {
      +            is_dotted_decimal = 0;
      +        }
      +        else if (ch[0] == '.') {
      +            dots++;
      +            if (ch[1] == '0' && apr_isdigit(ch[2]))
      +                leading_zeroes = 1;
      +        }
      +        else if (!apr_isdigit(*ch)) {
      +           /* also takes care of multiple Host headers by denying commas */
      +            goto bad;
      +        }
      +    }
      +    if (is_dotted_decimal) {
      +        if (host[0] == '.' || (host[0] == '0' && apr_isdigit(host[1])))
      +            leading_zeroes = 1;
      +        if (leading_zeroes || dots != 3) {
      +            /* RFC 3986 7.4 */
      +            goto bad;
      +        }
      +    }
      +    else {
      +        /* The top-level domain must start with a letter (RFC 1123 2.1) */
      +        while (ch > host && *ch != '.')
      +            ch--;
      +        if (ch[0] == '.' && ch[1] != '\0' && !apr_isalpha(ch[1]))
      +            goto bad;
      +    }
      +    return APR_SUCCESS;
      +
      +bad:
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02415)
      +                  "[strict] Invalid host name '%s'%s%.6s",
      +                  host, *ch ? ", problem near: " : "", ch);
      +    return APR_EINVAL;
      +}
      +
       /* Lowercase and remove any trailing dot and/or :port from the hostname,
        * and check that it is sane.
        *
      @@ -688,78 +807,90 @@ static int vhost_check_config(apr_pool_t *p, apr_pool_t *plog,
        * Instead we just check for filesystem metacharacters: directory
        * separators / and \ and sequences of more than one dot.
        */
      -static void fix_hostname(request_rec *r)
      +static int fix_hostname(request_rec *r, const char *host_header,
      +                        unsigned http_conformance)
       {
      +    const char *src;
           char *host, *scope_id;
      -    char *dst;
           apr_port_t port;
           apr_status_t rv;
           const char *c;
      +    int is_v6literal = 0;
      +    int strict = (http_conformance != AP_HTTP_CONFORMANCE_UNSAFE);
       
      -    /* According to RFC 2616, Host header field CAN be blank. */
      -    if (!*r->hostname) {
      -        return;
      +    src = host_header ? host_header : r->hostname;
      +
      +    /* According to RFC 2616, Host header field CAN be blank */
      +    if (!*src) {
      +        return is_v6literal;
           }
       
           /* apr_parse_addr_port will interpret a bare integer as a port
            * which is incorrect in this context.  So treat it separately.
            */
      -    for (c = r->hostname; apr_isdigit(*c); ++c);
      -    if (!*c) {  /* pure integer */
      -        return;
      +    for (c = src; apr_isdigit(*c); ++c);
      +    if (!*c) {
      +        /* pure integer */
      +        if (strict) {
      +            /* RFC 3986 7.4 */
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02416)
      +                         "[strict] purely numeric host names not allowed: %s",
      +                         src);
      +            goto bad_nolog;
      +        }
      +        r->hostname = src;
      +        return is_v6literal;
           }
       
      -    rv = apr_parse_addr_port(&host, &scope_id, &port, r->hostname, r->pool);
      -    if (rv != APR_SUCCESS || scope_id) {
      -        goto bad;
      +    if (host_header) {
      +        rv = apr_parse_addr_port(&host, &scope_id, &port, src, r->pool);
      +        if (rv != APR_SUCCESS || scope_id)
      +            goto bad;
      +        if (port) {
      +            /* Don't throw the Host: header's port number away:
      +               save it in parsed_uri -- ap_get_server_port() needs it! */
      +            /* @@@ XXX there should be a better way to pass the port.
      +             *         Like r->hostname, there should be a r->portno
      +             */
      +            r->parsed_uri.port = port;
      +            r->parsed_uri.port_str = apr_itoa(r->pool, (int)port);
      +        }
      +        if (host_header[0] == '[')
      +            is_v6literal = 1;
           }
      -
      -    if (port) {
      -        /* Don't throw the Host: header's port number away:
      -           save it in parsed_uri -- ap_get_server_port() needs it! */
      -        /* @@@ XXX there should be a better way to pass the port.
      -         *         Like r->hostname, there should be a r->portno
      +    else {
      +        /*
      +         * Already parsed, surrounding [ ] (if IPv6 literal) and :port have
      +         * already been removed.
                */
      -        r->parsed_uri.port = port;
      -        r->parsed_uri.port_str = apr_itoa(r->pool, (int)port);
      +        host = apr_pstrdup(r->pool, r->hostname);
      +        if (ap_strchr(host, ':') != NULL)
      +            is_v6literal = 1;
           }
       
      -    /* if the hostname is an IPv6 numeric address string, it was validated
      -     * already; otherwise, further validation is needed
      -     */
      -    if (r->hostname[0] != '[') {
      -        for (dst = host; *dst; dst++) {
      -            if (apr_islower(*dst)) {
      -                /* leave char unchanged */
      -            }
      -            else if (*dst == '.') {
      -                if (*(dst + 1) == '.') {
      -                    goto bad;
      -                }
      -            }
      -            else if (apr_isupper(*dst)) {
      -                *dst = apr_tolower(*dst);
      -            }
      -            else if (*dst == '/' || *dst == '\\') {
      -                goto bad;
      -            }
      -        }
      -        /* strip trailing gubbins */
      -        if (dst > host && dst[-1] == '.') {
      -            dst[-1] = '\0';
      -        }
      +    if (is_v6literal) {
      +        rv = fix_hostname_v6_literal(r, host);
      +    }
      +    else {
      +        rv = fix_hostname_non_v6(r, host);
      +        if (strict && rv == APR_SUCCESS)
      +            rv = strict_hostname_check(r, host);
           }
      +    if (rv != APR_SUCCESS)
      +        goto bad;
      +
           r->hostname = host;
      -    return;
      +    return is_v6literal;
       
       bad:
      +    ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(00550)
      +                  "Client sent malformed Host header: %s",
      +                  src);
      +bad_nolog:
           r->status = HTTP_BAD_REQUEST;
      -    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
      -                  "Client sent malformed Host header");
      -    return;
      +    return is_v6literal;
       }
       
      -
       /* return 1 if host matches ServerName or ServerAliases */
       static int matches_aliases(server_rec *s, const char *host)
       {
      @@ -969,15 +1100,76 @@ static void check_serverpath(request_rec *r)
           }
       }
       
      +static APR_INLINE const char *construct_host_header(request_rec *r,
      +                                                    int is_v6literal)
      +{
      +    struct iovec iov[5];
      +    apr_size_t nvec = 0;
      +    /*
      +     * We cannot use ap_get_server_name/port here, because we must
      +     * ignore UseCanonicalName/Port.
      +     */
      +    if (is_v6literal) {
      +        iov[nvec].iov_base = "[";
      +        iov[nvec].iov_len = 1;
      +        nvec++;
      +    }
      +    iov[nvec].iov_base = (void *)r->hostname;
      +    iov[nvec].iov_len = strlen(r->hostname);
      +    nvec++;
      +    if (is_v6literal) {
      +        iov[nvec].iov_base = "]";
      +        iov[nvec].iov_len = 1;
      +        nvec++;
      +    }
      +    if (r->parsed_uri.port_str) {
      +        iov[nvec].iov_base = ":";
      +        iov[nvec].iov_len = 1;
      +        nvec++;
      +        iov[nvec].iov_base = r->parsed_uri.port_str;
      +        iov[nvec].iov_len = strlen(r->parsed_uri.port_str);
      +        nvec++;
      +    }
      +    return apr_pstrcatv(r->pool, iov, nvec, NULL);
      +}
       
       AP_DECLARE(void) ap_update_vhost_from_headers(request_rec *r)
       {
      -    /* must set this for HTTP/1.1 support */
      -    if (r->hostname || (r->hostname = apr_table_get(r->headers_in, "Host"))) {
      -        fix_hostname(r);
      -        if (r->status != HTTP_OK)
      -            return;
      +    core_server_config *conf = ap_get_core_module_config(r->server->module_config);
      +    const char *host_header = apr_table_get(r->headers_in, "Host");
      +    int is_v6literal = 0;
      +    int have_hostname_from_url = 0;
      +
      +    if (r->hostname) {
      +        /*
      +         * If there was a host part in the Request-URI, ignore the 'Host'
      +         * header.
      +         */
      +        have_hostname_from_url = 1;
      +        is_v6literal = fix_hostname(r, NULL, conf->http_conformance);
      +    }
      +    else if (host_header != NULL) {
      +        is_v6literal = fix_hostname(r, host_header, conf->http_conformance);
           }
      +    if (r->status != HTTP_OK)
      +        return;
      +
      +    if (conf->http_conformance != AP_HTTP_CONFORMANCE_UNSAFE) {
      +        /*
      +         * If we have both hostname from an absoluteURI and a Host header,
      +         * we must ignore the Host header (RFC 2616 5.2).
      +         * To enforce this, we reset the Host header to the value from the
      +         * request line.
      +         */
      +        if (have_hostname_from_url && host_header != NULL) {
      +            const char *repl = construct_host_header(r, is_v6literal);
      +            apr_table_set(r->headers_in, "Host", repl);
      +            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02417)
      +                          "Replacing host header '%s' with host '%s' given "
      +                          "in the request uri", host_header, repl);
      +        }
      +    }
      +
           /* check if we tucked away a name_chain */
           if (r->connection->vhost_lookup_data) {
               if (r->hostname)
      diff --git a/support/Makefile.in b/support/Makefile.in
      index b840118b58f..745d86c2c81 100644
      --- a/support/Makefile.in
      +++ b/support/Makefile.in
      @@ -3,8 +3,9 @@ DISTCLEAN_TARGETS = apxs apachectl dbmmanage log_server_status \
       
       CLEAN_TARGETS = suexec
       
      -PROGRAMS = htpasswd htdigest rotatelogs logresolve ab htdbm htcacheclean httxt2dbm $(NONPORTABLE_SUPPORT)
      -TARGETS  = $(PROGRAMS)
      +bin_PROGRAMS = htpasswd htdigest htdbm ab logresolve httxt2dbm
      +sbin_PROGRAMS = htcacheclean rotatelogs $(NONPORTABLE_SUPPORT)
      +TARGETS  = $(bin_PROGRAMS) $(sbin_PROGRAMS)
       
       PROGRAM_LDADD        = $(UTIL_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS) $(AP_LIBS)
       PROGRAM_DEPENDENCIES = 
      @@ -16,7 +17,13 @@ install:
       	@test -d $(DESTDIR)$(sbindir) || $(MKINSTALLDIRS) $(DESTDIR)$(sbindir)
       	@test -d $(DESTDIR)$(libexecdir) || $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
       	@cp -p $(top_builddir)/server/httpd.exp $(DESTDIR)$(libexecdir)
      -	@for i in apxs apachectl dbmmanage; do \
      +	@for i in apxs dbmmanage; do \
      +	    if test -f "$(builddir)/$$i"; then \
      +	        cp -p $$i $(DESTDIR)$(bindir); \
      +	        chmod 755 $(DESTDIR)$(bindir)/$$i; \
      +	    fi ; \
      +	done
      +	@for i in apachectl; do \
       	    if test -f "$(builddir)/$$i"; then \
       	        cp -p $$i $(DESTDIR)$(sbindir); \
       	        chmod 755 $(DESTDIR)$(sbindir)/$$i; \
      @@ -29,7 +36,9 @@ install:
       	    fi ; \
       	fi
       
      -htpasswd_OBJECTS = htpasswd.lo
      +htpasswd.lo: passwd_common.h
      +passwd_common.lo: passwd_common.h
      +htpasswd_OBJECTS = htpasswd.lo passwd_common.lo
       htpasswd: $(htpasswd_OBJECTS)
       	$(LINK) $(htpasswd_LTFLAGS) $(htpasswd_OBJECTS) $(PROGRAM_LDADD) $(CRYPT_LIBS)
       
      @@ -45,14 +54,19 @@ logresolve_OBJECTS = logresolve.lo
       logresolve: $(logresolve_OBJECTS)
       	$(LINK) $(logresolve_LTFLAGS) $(logresolve_OBJECTS) $(PROGRAM_LDADD)
       
      -htdbm_OBJECTS = htdbm.lo
      +htdbm.lo: passwd_common.h
      +htdbm_OBJECTS = htdbm.lo passwd_common.lo
       htdbm: $(htdbm_OBJECTS)
       	$(LINK) $(htdbm_LTFLAGS) $(htdbm_OBJECTS) $(PROGRAM_LDADD) $(CRYPT_LIBS)
       
       ab_OBJECTS = ab.lo
      -ab_LDADD = $(PROGRAM_LDADD) $(SSL_LIBS) $(MATH_LIBS)
      +ab_LDADD = $(PROGRAM_LDADD) $(MATH_LIBS)
      +ab.lo: ab.c
      +	$(LIBTOOL) --mode=compile $(CC) $(ab_CFLAGS) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
      +	    $(ALL_INCLUDES) $(PICFLAGS) $(LTCFLAGS) -c $< && touch $@
       ab: $(ab_OBJECTS)
      -	$(LINK) $(ab_LTFLAGS) $(ab_OBJECTS) $(ab_LDADD)
      +	$(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(ab_LDFLAGS) $(PILDFLAGS) \
      +	    $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ $(ab_LTFLAGS) $(ab_OBJECTS) $(ab_LDADD)
       
       checkgid_OBJECTS = checkgid.lo
       checkgid: $(checkgid_OBJECTS)
      diff --git a/support/NWGNUhtdbm b/support/NWGNUhtdbm
      index 05ee0341387..5a2f739f014 100644
      --- a/support/NWGNUhtdbm
      +++ b/support/NWGNUhtdbm
      @@ -169,6 +169,7 @@ TARGET_lib = \
       #
       FILES_nlm_objs = \
       	$(OBJDIR)/htdbm.o \
      +	$(OBJDIR)/passwd_common.o \
       	$(EOLIST)
       
       #
      diff --git a/support/NWGNUhtpasswd b/support/NWGNUhtpasswd
      index 66f424749e9..124895b135d 100644
      --- a/support/NWGNUhtpasswd
      +++ b/support/NWGNUhtpasswd
      @@ -169,6 +169,7 @@ TARGET_lib = \
       #
       FILES_nlm_objs = \
       	$(OBJDIR)/htpasswd.o \
      +	$(OBJDIR)/passwd_common.o \
       	$(EOLIST)
       
       #
      diff --git a/support/ab.c b/support/ab.c
      index 6b1e98954fa..ac0b54415c0 100644
      --- a/support/ab.c
      +++ b/support/ab.c
      @@ -170,6 +170,14 @@
       #define SK_VALUE(x,y) sk_X509_value(x,y)
       typedef STACK_OF(X509) X509_STACK_TYPE;
       
      +#if defined(_MSC_VER)
      +/* The following logic ensures we correctly glue FILE* within one CRT used
      + * by the OpenSSL library build to another CRT used by the ab.exe build.
      + * This became especially problematic with Visual Studio 2015.
      + */
      +#include <openssl/applink.c>
      +#endif
      +
       #endif
       
       #if defined(USE_SSL)
      @@ -183,6 +191,12 @@ typedef STACK_OF(X509) X509_STACK_TYPE;
       #else
       #define AB_SSL_CIPHER_CONST
       #endif
      +#ifdef SSL_OP_NO_TLSv1_2
      +#define HAVE_TLSV1_X
      +#endif
      +#if !defined(OPENSSL_NO_TLSEXT) && defined(SSL_set_tlsext_host_name)
      +#define HAVE_TLSEXT
      +#endif
       #endif
       
       #include <math.h>
      @@ -217,7 +231,7 @@ typedef enum {
           STATE_READ
       } connect_state_e;
       
      -#define CBUFFSIZE (2048)
      +#define CBUFFSIZE (8192)
       
       struct connection {
           apr_pool_t *ctx;
      @@ -263,13 +277,14 @@ struct data {
       
       int verbosity = 0;      /* no verbosity by default */
       int recverrok = 0;      /* ok to proceed after socket receive errors */
      -enum {NO_METH = 0, GET, HEAD, PUT, POST} method = NO_METH;
      -const char *method_str[] = {"bug", "GET", "HEAD", "PUT", "POST"};
      +enum {NO_METH = 0, GET, HEAD, PUT, POST, CUSTOM_METHOD} method = NO_METH;
      +const char *method_str[] = {"bug", "GET", "HEAD", "PUT", "POST", ""};
       int send_body = 0;      /* non-zero if sending body with request */
       int requests = 1;       /* Number of requests to make */
       int heartbeatres = 100; /* How often do we say we're alive */
       int concurrency = 1;    /* Number of multiple requests to make */
       int percentile = 1;     /* Show percentile served */
      +int nolength = 0;       /* Accept variable document length */
       int confidence = 1;     /* Show confidence estimator and warnings */
       int tlimit = 0;         /* time limit in secs */
       int keepalive = 0;      /* try and do keepalive connections */
      @@ -278,29 +293,27 @@ char servername[1024];  /* name that server reports */
       char *hostname;         /* host name from URL */
       const char *host_field;       /* value of "Host:" header field */
       const char *path;             /* path name */
      -char postfile[1024];    /* name of file containing post data */
       char *postdata;         /* *buffer containing data from postfile */
       apr_size_t postlen = 0; /* length of data to be POSTed */
      -char content_type[1024];/* content type to put in POST header */
      +char *content_type = NULL;     /* content type to put in POST header */
       const char *cookie,           /* optional cookie line */
                  *auth,             /* optional (basic/uuencoded) auhentication */
                  *hdrs;             /* optional arbitrary headers */
       apr_port_t port;        /* port number */
      -char proxyhost[1024];   /* proxy host name */
      +char *proxyhost = NULL; /* proxy host name */
       int proxyport = 0;      /* proxy port */
       const char *connecthost;
       const char *myhost;
       apr_port_t connectport;
       const char *gnuplot;          /* GNUplot file */
       const char *csvperc;          /* CSV Percentile file */
      -char url[1024];
       const char *fullurl;
       const char *colonhost;
       int isproxy = 0;
       apr_interval_time_t aprtimeout = apr_time_from_sec(30); /* timeout value */
       
       /* overrides for ab-generated common headers */
      -int opt_host = 0;       /* was an optional "Host:" header specified? */
      +const char *opt_host;   /* which optional "Host:" header specified, if any */
       int opt_useragent = 0;  /* was an optional "User-Agent:" header specified? */
       int opt_accept = 0;     /* was an optional "Accept:" header specified? */
        /*
      @@ -333,12 +346,16 @@ SSL_CTX *ssl_ctx;
       char *ssl_cipher = NULL;
       char *ssl_info = NULL;
       BIO *bio_out,*bio_err;
      +#ifdef HAVE_TLSEXT
      +int tls_use_sni = 1;         /* used by default, -I disables it */
      +const char *tls_sni = NULL; /* 'opt_host' if any, 'hostname' otherwise */
      +#endif
       #endif
       
       apr_time_t start, lasttime, stoptime;
       
       /* global request (and its length) */
      -char _request[2048];
      +char _request[8192];
       char *request = _request;
       apr_size_t reqlen;
       
      @@ -390,6 +407,83 @@ static void apr_err(const char *s, apr_status_t rv)
           exit(rv);
       }
       
      +static void *xmalloc(size_t size)
      +{
      +    void *ret = malloc(size);
      +    if (ret == NULL) {
      +        fprintf(stderr, "Could not allocate memory (%"
      +                APR_SIZE_T_FMT" bytes)\n", size);
      +        exit(1);
      +    }
      +    return ret;
      +}
      +
      +static void *xcalloc(size_t num, size_t size)
      +{
      +    void *ret = calloc(num, size);
      +    if (ret == NULL) {
      +        fprintf(stderr, "Could not allocate memory (%"
      +                APR_SIZE_T_FMT" bytes)\n", size*num);
      +        exit(1);
      +    }
      +    return ret;
      +}
      +
      +static char *xstrdup(const char *s)
      +{
      +    char *ret = strdup(s);
      +    if (ret == NULL) {
      +        fprintf(stderr, "Could not allocate memory (%"
      +                APR_SIZE_T_FMT " bytes)\n", strlen(s));
      +        exit(1);
      +    }
      +    return ret;
      +}
      +
      +/*
      + * Similar to standard strstr() but we ignore case in this version.
      + * Copied from ap_strcasestr().
      + */
      +static char *xstrcasestr(const char *s1, const char *s2)
      +{
      +    char *p1, *p2;
      +    if (*s2 == '\0') {
      +        /* an empty s2 */
      +        return((char *)s1);
      +    }
      +    while(1) {
      +        for ( ; (*s1 != '\0') && (apr_tolower(*s1) != apr_tolower(*s2)); s1++);
      +        if (*s1 == '\0') {
      +            return(NULL);
      +        }
      +        /* found first character of s2, see if the rest matches */
      +        p1 = (char *)s1;
      +        p2 = (char *)s2;
      +        for (++p1, ++p2; apr_tolower(*p1) == apr_tolower(*p2); ++p1, ++p2) {
      +            if (*p1 == '\0') {
      +                /* both strings ended together */
      +                return((char *)s1);
      +            }
      +        }
      +        if (*p2 == '\0') {
      +            /* second string ended, a match */
      +            break;
      +        }
      +        /* didn't find a match here, try starting at next character in s1 */
      +        s1++;
      +    }
      +    return((char *)s1);
      +}
      +
      +/* pool abort function */
      +static int abort_on_oom(int retcode)
      +{
      +    fprintf(stderr, "Could not allocate memory\n");
      +    exit(1);
      +    /* not reached */
      +    return retcode;
      +}
      +
       static void set_polled_events(struct connection *c, apr_int16_t new_reqevents)
       {
           apr_status_t rv;
      @@ -525,6 +619,8 @@ static int ssl_print_connection_info(BIO *bio, SSL *ssl)
           AB_SSL_CIPHER_CONST SSL_CIPHER *c;
           int alg_bits,bits;
       
      +    BIO_printf(bio,"Transport Protocol      :%s\n", SSL_get_version(ssl));
      +
           c = SSL_get_current_cipher(ssl);
           BIO_printf(bio,"Cipher Suite Protocol   :%s\n", SSL_CIPHER_get_version(c));
           BIO_printf(bio,"Cipher Suite Name       :%s\n",SSL_CIPHER_get_name(c));
      @@ -621,9 +717,9 @@ static void ssl_proceed_handshake(struct connection *c)
                       else
                           pk_bits = 0;  /* Anon DH */
       
      -                ssl_info = malloc(128);
      +                ssl_info = xmalloc(128);
                       apr_snprintf(ssl_info, 128, "%s,%s,%d,%d",
      -                             SSL_CIPHER_get_version(ci),
      +                             SSL_get_version(c->ssl),
                                    SSL_CIPHER_get_name(ci),
                                    pk_bits, sk_bits);
                   }
      @@ -775,10 +871,18 @@ static void output_results(int sig)
           if (is_ssl && ssl_info) {
               printf("SSL/TLS Protocol:       %s\n", ssl_info);
           }
      +#ifdef HAVE_TLSEXT
      +    if (is_ssl && tls_sni) {
      +        printf("TLS Server Name:        %s\n", tls_sni);
      +    }
      +#endif
       #endif
           printf("\n");
           printf("Document Path:          %s\n", path);
      -    printf("Document Length:        %" APR_SIZE_T_FMT " bytes\n", doclen);
      +    if (nolength)
      +        printf("Document Length:        Variable\n");
      +    else
      +        printf("Document Length:        %" APR_SIZE_T_FMT " bytes\n", doclen);
           printf("\n");
           printf("Concurrency Level:      %d\n", concurrency);
           printf("Time taken for tests:   %.3f seconds\n", timetaken);
      @@ -787,7 +891,8 @@ static void output_results(int sig)
           if (bad)
               printf("   (Connect: %d, Receive: %d, Length: %d, Exceptions: %d)\n",
                   err_conn, err_recv, err_length, err_except);
      -    printf("Write errors:           %d\n", epipe);
      +    if (epipe)
      +        printf("Write errors:           %d\n", epipe);
           if (err_response)
               printf("Non-2xx responses:      %d\n", err_response);
           if (keepalive)
      @@ -810,9 +915,9 @@ static void output_results(int sig)
                      (double) totalread / 1024 / timetaken);
               if (send_body) {
                   printf("                        %.2f kb/s sent\n",
      -               (double) totalposted / timetaken / 1024);
      +               (double) totalposted / 1024 / timetaken);
                   printf("                        %.2f kb/s total\n",
      -               (double) (totalread + totalposted) / timetaken / 1024);
      +               (double) (totalread + totalposted) / 1024 / timetaken);
               }
           }
       
      @@ -960,9 +1065,8 @@ static void output_results(int sig)
                   printf("              min   avg   max\n");
       #define CONF_FMT_STRING "%5" APR_TIME_T_FMT " %5" APR_TIME_T_FMT "%5" APR_TIME_T_FMT "\n"
                   printf("Connect:    " CONF_FMT_STRING, mincon, meancon, maxcon);
      -            printf("Processing: " CONF_FMT_STRING, mintot - mincon,
      -                                                   meantot - meancon,
      -                                                   maxtot - maxcon);
      +            printf("Processing: " CONF_FMT_STRING, mind, meand, maxd);
      +            printf("Waiting:    " CONF_FMT_STRING, minwait, meanwait, maxwait);
                   printf("Total:      " CONF_FMT_STRING, mintot, meantot, maxtot);
       #undef CONF_FMT_STRING
               }
      @@ -989,7 +1093,7 @@ static void output_results(int sig)
                       exit(1);
                   }
                   fprintf(out, "" "Percentage served" "," "Time in ms" "\n");
      -            for (i = 0; i < 100; i++) {
      +            for (i = 0; i <= 100; i++) {
                       double t;
                       if (i == 0)
                           t = ap_double_ms(stats[0].time);
      @@ -1050,9 +1154,14 @@ static void output_html_results(void)
           printf("<tr %s><th colspan=2 %s>Document Path:</th>"
              "<td colspan=2 %s>%s</td></tr>\n",
              trstring, tdstring, tdstring, path);
      -    printf("<tr %s><th colspan=2 %s>Document Length:</th>"
      -       "<td colspan=2 %s>%" APR_SIZE_T_FMT " bytes</td></tr>\n",
      -       trstring, tdstring, tdstring, doclen);
      +    if (nolength)
      +        printf("<tr %s><th colspan=2 %s>Document Length:</th>"
      +            "<td colspan=2 %s>Variable</td></tr>\n",
      +            trstring, tdstring, tdstring);
      +    else
      +        printf("<tr %s><th colspan=2 %s>Document Length:</th>"
      +            "<td colspan=2 %s>%" APR_SIZE_T_FMT " bytes</td></tr>\n",
      +            trstring, tdstring, tdstring, doclen);
           printf("<tr %s><th colspan=2 %s>Concurrency Level:</th>"
              "<td colspan=2 %s>%d</td></tr>\n",
              trstring, tdstring, tdstring, concurrency);
      @@ -1095,16 +1204,16 @@ static void output_html_results(void)
                  trstring, tdstring, tdstring, (double) done / timetaken);
               printf("<tr %s><th colspan=2 %s>Transfer rate:</th>"
                  "<td colspan=2 %s>%.2f kb/s received</td></tr>\n",
      -           trstring, tdstring, tdstring, (double) totalread / timetaken);
      +           trstring, tdstring, tdstring, (double) totalread / 1024 / timetaken);
               if (send_body) {
                   printf("<tr %s><td colspan=2 %s>&nbsp;</td>"
                      "<td colspan=2 %s>%.2f kb/s sent</td></tr>\n",
                      trstring, tdstring, tdstring,
      -               (double) totalposted / timetaken);
      +               (double) totalposted / 1024 / timetaken);
                   printf("<tr %s><td colspan=2 %s>&nbsp;</td>"
                      "<td colspan=2 %s>%.2f kb/s total</td></tr>\n",
                      trstring, tdstring, tdstring,
      -               (double) (totalread + totalposted) / timetaken);
      +               (double) (totalread + totalposted) / 1024 / timetaken);
               }
           }
           {
      @@ -1168,7 +1277,7 @@ static void start_connect(struct connection * c)
           apr_status_t rv;
       
           if (!(started < requests))
      -    return;
      +        return;
       
           c->read = 0;
           c->bread = 0;
      @@ -1186,8 +1295,10 @@ static void start_connect(struct connection * c)
           apr_err("socket", rv);
           }
       
      -    if ((rv = apr_socket_bind(c->aprsock, mysa)) != APR_SUCCESS) {
      -        apr_err("bind", rv);
      +    if (myhost) {
      +        if ((rv = apr_socket_bind(c->aprsock, mysa)) != APR_SUCCESS) {
      +            apr_err("bind", rv);
      +        }
           }
       
           c->pollfd.desc_type = APR_POLL_SOCKET;
      @@ -1233,6 +1344,11 @@ static void start_connect(struct connection * c)
                   BIO_set_callback(bio, ssl_print_cb);
                   BIO_set_callback_arg(bio, (void *)bio_err);
               }
      +#ifdef HAVE_TLSEXT
      +        if (tls_sni) {
      +            SSL_set_tlsext_host_name(c->ssl, tls_sni);
      +        }
      +#endif
           } else {
               c->ssl = NULL;
           }
      @@ -1288,7 +1404,7 @@ static void close_connection(struct connection * c)
                   /* first time here */
                   doclen = c->bread;
               }
      -        else if (c->bread != doclen) {
      +        else if ((c->bread != doclen) && !nolength) {
                   bad++;
                   err_length++;
               }
      @@ -1345,11 +1461,21 @@ static void read_connection(struct connection * c)
                       good++;
                       close_connection(c);
                   }
      +            else if (scode == SSL_ERROR_SYSCALL
      +                     && status == 0
      +                     && c->read != 0) {
      +                /* connection closed, but in violation of the protocol, after
      +                 * some data has already been read; this commonly happens, so
      +                 * let the length check catch any response errors
      +                 */
      +                good++;
      +                close_connection(c);
      +            }
                   else if (scode != SSL_ERROR_WANT_WRITE
                            && scode != SSL_ERROR_WANT_READ) {
                       /* some fatal error: */
                       c->read = 0;
      -                BIO_printf(bio_err, "SSL read failed - closing connection\n");
      +                BIO_printf(bio_err, "SSL read failed (%d) - closing connection\n", scode);
                       ERR_print_errors(bio_err);
                       close_connection(c);
                   }
      @@ -1449,12 +1575,14 @@ static void read_connection(struct connection * c)
                        * this is first time, extract some interesting info
                        */
                       char *p, *q;
      -                p = strstr(c->cbuff, "Server:");
      +                size_t len = 0;
      +                p = xstrcasestr(c->cbuff, "Server:");
                       q = servername;
                       if (p) {
                           p += 8;
      -                    while (*p > 32)
      -                    *q++ = *p++;
      +                    /* -1 to not overwrite last '\0' byte */
      +                    while (*p > 32 && len++ < sizeof(servername) - 1)
      +                        *q++ = *p++;
                       }
                       *q = 0;
                   }
      @@ -1485,22 +1613,15 @@ static void read_connection(struct connection * c)
                   }
                   c->gotheader = 1;
                   *s = 0;     /* terminate at end of header */
      -            if (keepalive &&
      -            (strstr(c->cbuff, "Keep-Alive")
      -             || strstr(c->cbuff, "keep-alive"))) {  /* for benefit of MSIIS */
      +            if (keepalive && xstrcasestr(c->cbuff, "Keep-Alive")) {
                       char *cl;
      -                cl = strstr(c->cbuff, "Content-Length:");
      -                /* handle NCSA, which sends Content-length: */
      -                if (!cl)
      -                    cl = strstr(c->cbuff, "Content-length:");
      -                if (cl) {
      -                    c->keepalive = 1;
      +                c->keepalive = 1;
      +                cl = xstrcasestr(c->cbuff, "Content-Length:");
      +                if (cl && method != HEAD) {
                           /* response to HEAD doesn't have entity body */
      -                    c->length = method != HEAD ? atoi(cl + 16) : 0;
      +                    c->length = atoi(cl + 16);
                       }
      -                /* The response may not have a Content-Length header */
      -                if (!cl) {
      -                    c->keepalive = 1;
      +                else {
                           c->length = 0;
                       }
                   }
      @@ -1522,7 +1643,7 @@ static void read_connection(struct connection * c)
                   /* first time here */
                   doclen = c->bread;
               }
      -        else if (c->bread != doclen) {
      +        else if ((c->bread != doclen) && !nolength) {
                   bad++;
                   err_length++;
               }
      @@ -1584,16 +1705,13 @@ static void test(void)
           fflush(stdout);
           }
       
      -    con = calloc(concurrency, sizeof(struct connection));
      +    con = xcalloc(concurrency, sizeof(struct connection));
       
           /*
            * XXX: a way to calculate the stats without requiring O(requests) memory
            * XXX: would be nice.
            */
      -    stats = calloc(requests, sizeof(struct data));
      -    if (stats == NULL || con == NULL) {
      -        err("Cannot allocate memory for result statistics");
      -    }
      +    stats = xcalloc(requests, sizeof(struct data));
       
           if ((status = apr_pollset_create(&readbits, concurrency, cntxt,
                                            APR_POLLSET_NOCOPY)) != APR_SUCCESS) {
      @@ -1609,6 +1727,18 @@ static void test(void)
               /* Header overridden, no need to add, as it is already in hdrs */
           }
       
      +#ifdef HAVE_TLSEXT
      +    if (is_ssl && tls_use_sni) {
      +        apr_ipsubnet_t *ip;
      +        if (((tls_sni = opt_host) || (tls_sni = hostname)) &&
      +            (!*tls_sni || apr_ipsubnet_create(&ip, tls_sni, NULL,
      +                                               cntxt) == APR_SUCCESS)) {
      +            /* IP not allowed in TLS SNI extension */
      +            tls_sni = NULL;
      +        }
      +    }
      +#endif
      +
           if (!opt_useragent) {
               /* User-Agent: header not overridden, add default value to hdrs */
               hdrs = apr_pstrcat(cntxt, hdrs, "User-Agent: ApacheBench/", AP_AB_BASEREVISION, "\r\n", NULL);
      @@ -1649,7 +1779,7 @@ static void test(void)
                   keepalive ? "Connection: Keep-Alive\r\n" : "",
                   cookie, auth,
                   postlen,
      -            (content_type[0]) ? content_type : "text/plain", hdrs);
      +            (content_type != NULL) ? content_type : "text/plain", hdrs);
           }
           if (snprintf_res >= sizeof(_request)) {
               err("Request too long\n");
      @@ -1665,11 +1795,7 @@ static void test(void)
            * Combine headers and (optional) post file into one continuous buffer
            */
           if (send_body) {
      -        char *buff = malloc(postlen + reqlen + 1);
      -        if (!buff) {
      -            fprintf(stderr, "error creating request buffer: out of memory\n");
      -            return;
      -        }
      +        char *buff = xmalloc(postlen + reqlen + 1);
               strcpy(buff, request);
               memcpy(buff + reqlen, postdata, postlen);
               request = buff;
      @@ -1687,16 +1813,20 @@ static void test(void)
           }
       #endif              /* NOT_ASCII */
       
      -    /* This only needs to be done once */
      -    if ((rv = apr_sockaddr_info_get(&mysa, myhost, APR_UNSPEC, 0, 0, cntxt)) != APR_SUCCESS) {
      -        char buf[120];
      -        apr_snprintf(buf, sizeof(buf),
      -                 "apr_sockaddr_info_get() for %s", myhost);
      -        apr_err(buf, rv);
      +    if (myhost) {
      +        /* This only needs to be done once */
      +        if ((rv = apr_sockaddr_info_get(&mysa, myhost, APR_UNSPEC, 0, 0, cntxt)) != APR_SUCCESS) {
      +            char buf[120];
      +            apr_snprintf(buf, sizeof(buf),
      +                         "apr_sockaddr_info_get() for %s", myhost);
      +            apr_err(buf, rv);
      +        }
           }
       
           /* This too */
      -    if ((rv = apr_sockaddr_info_get(&destsa, connecthost, APR_UNSPEC, connectport, 0, cntxt))
      +    if ((rv = apr_sockaddr_info_get(&destsa, connecthost,
      +                                    myhost ? mysa->family : APR_UNSPEC,
      +                                    connectport, 0, cntxt))
              != APR_SUCCESS) {
               char buf[120];
               apr_snprintf(buf, sizeof(buf),
      @@ -1851,13 +1981,16 @@ static void usage(const char *progname)
        */
           fprintf(stderr, "Options are:\n");
           fprintf(stderr, "    -n requests     Number of requests to perform\n");
      -    fprintf(stderr, "    -c concurrency  Number of multiple requests to make\n");
      -    fprintf(stderr, "    -t timelimit    Seconds to max. wait for responses\n");
      +    fprintf(stderr, "    -c concurrency  Number of multiple requests to make at a time\n");
      +    fprintf(stderr, "    -t timelimit    Seconds to max. to spend on benchmarking\n");
      +    fprintf(stderr, "                    This implies -n 50000\n");
      +    fprintf(stderr, "    -s timeout      Seconds to max. wait for each response\n");
      +    fprintf(stderr, "                    Default is 30 seconds\n");
           fprintf(stderr, "    -b windowsize   Size of TCP send/receive buffer, in bytes\n");
           fprintf(stderr, "    -B address      Address to bind to when making outgoing connections\n");
           fprintf(stderr, "    -p postfile     File containing data to POST. Remember also to set -T\n");
           fprintf(stderr, "    -u putfile      File containing data to PUT. Remember also to set -T\n");
      -    fprintf(stderr, "    -T content-type Content-type header for POSTing, eg.\n");
      +    fprintf(stderr, "    -T content-type Content-type header to use for POST/PUT data, eg.\n");
           fprintf(stderr, "                    'application/x-www-form-urlencoded'\n");
           fprintf(stderr, "                    Default is 'text/plain'\n");
           fprintf(stderr, "    -v verbosity    How much troubleshooting info to print\n");
      @@ -1878,17 +2011,39 @@ static void usage(const char *progname)
           fprintf(stderr, "    -k              Use HTTP KeepAlive feature\n");
           fprintf(stderr, "    -d              Do not show percentiles served table.\n");
           fprintf(stderr, "    -S              Do not show confidence estimators and warnings.\n");
      +    fprintf(stderr, "    -q              Do not show progress when doing more than 150 requests\n");
      +    fprintf(stderr, "    -l              Accept variable document length (use this for dynamic pages)\n");
           fprintf(stderr, "    -g filename     Output collected data to gnuplot format file.\n");
           fprintf(stderr, "    -e filename     Output CSV file with percentages served\n");
           fprintf(stderr, "    -r              Don't exit on socket receive errors.\n");
      +    fprintf(stderr, "    -m method       Method name\n");
           fprintf(stderr, "    -h              Display usage information (this message)\n");
       #ifdef USE_SSL
      -    fprintf(stderr, "    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)\n");
      +
       #ifndef OPENSSL_NO_SSL2
      -    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)\n");
      +#define SSL2_HELP_MSG "SSL2, "
      +#else
      +#define SSL2_HELP_MSG ""
      +#endif
      +
      +#ifndef OPENSSL_NO_SSL3
      +#define SSL3_HELP_MSG "SSL3, "
       #else
      -    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol (SSL3, TLS1, or ALL)\n");
      +#define SSL3_HELP_MSG ""
       #endif
      +
      +#ifdef HAVE_TLSV1_X
      +#define TLS1_X_HELP_MSG ", TLS1.1, TLS1.2"
      +#else
      +#define TLS1_X_HELP_MSG ""
      +#endif
      +
      +#ifdef HAVE_TLSEXT
      +    fprintf(stderr, "    -I              Disable TLS Server Name Indication (SNI) extension\n");
      +#endif
      +    fprintf(stderr, "    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)\n");
      +    fprintf(stderr, "    -f protocol     Specify SSL/TLS protocol\n");
      +    fprintf(stderr, "                    (" SSL2_HELP_MSG SSL3_HELP_MSG "TLS1" TLS1_X_HELP_MSG " or ALL)\n");
       #endif
           exit(EINVAL);
       }
      @@ -1988,11 +2143,7 @@ static apr_status_t open_postfile(const char *pfile)
               return rv;
           }
           postlen = (apr_size_t)finfo.size;
      -    postdata = malloc(postlen);
      -    if (!postdata) {
      -        fprintf(stderr, "ab: Could not allocate POST data buffer\n");
      -        return APR_ENOMEM;
      -    }
      +    postdata = xmalloc(postlen);
           rv = apr_file_read_full(postfd, postdata, postlen, NULL);
           if (rv != APR_SUCCESS) {
               fprintf(stderr, "ab: Could not read POST data file: %s\n",
      @@ -2024,12 +2175,13 @@ int main(int argc, const char * const argv[])
           tdstring = "bgcolor=white";
           cookie = "";
           auth = "";
      -    proxyhost[0] = '\0';
      +    proxyhost = "";
           hdrs = "";
       
           apr_app_initialize(&argc, &argv, NULL);
           atexit(apr_terminate);
           apr_pool_create(&cntxt, NULL);
      +    apr_pool_abort_set(abort_on_oom, cntxt);
       
       #ifdef NOT_ASCII
           status = apr_xlate_open(&to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, cntxt);
      @@ -2052,7 +2204,7 @@ int main(int argc, const char * const argv[])
           myhost = NULL; /* 0.0.0.0 or :: */
       
           apr_getopt_init(&opt, cntxt, argc, argv);
      -    while ((status = apr_getopt(opt, "n:c:t:b:T:p:u:v:rkVhwix:y:z:C:H:P:A:g:X:de:SqB:"
      +    while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwiIx:y:z:C:H:P:A:g:X:de:SqB:m:"
       #ifdef USE_SSL
                   "Z:f:"
       #endif
      @@ -2082,17 +2234,20 @@ int main(int argc, const char * const argv[])
                       method = HEAD;
                       break;
                   case 'g':
      -                gnuplot = strdup(opt_arg);
      +                gnuplot = xstrdup(opt_arg);
                       break;
                   case 'd':
                       percentile = 0;
                       break;
                   case 'e':
      -                csvperc = strdup(opt_arg);
      +                csvperc = xstrdup(opt_arg);
                       break;
                   case 'S':
                       confidence = 0;
                       break;
      +            case 's':
      +                aprtimeout = apr_time_from_sec(atoi(opt_arg)); /* timeout value */
      +                break;
                   case 'p':
                       if (method != NO_METH)
                           err("Cannot mix POST with other methods\n");
      @@ -2111,6 +2266,9 @@ int main(int argc, const char * const argv[])
                       method = PUT;
                       send_body = 1;
                       break;
      +            case 'l':
      +                nolength = 1;
      +                break;
                   case 'r':
                       recverrok = 1;
                       break;
      @@ -2123,7 +2281,7 @@ int main(int argc, const char * const argv[])
                                                    * something */
                       break;
                   case 'T':
      -                strcpy(content_type, opt_arg);
      +                content_type = apr_pstrdup(cntxt, opt_arg);
                       break;
                   case 'C':
                       cookie = apr_pstrcat(cntxt, "Cookie: ", opt_arg, "\r\n", NULL);
      @@ -2165,7 +2323,16 @@ int main(int argc, const char * const argv[])
                        * allow override of some of the common headers that ab adds
                        */
                       if (strncasecmp(opt_arg, "Host:", 5) == 0) {
      -                    opt_host = 1;
      +                    char *host;
      +                    apr_size_t len;
      +                    opt_arg += 5;
      +                    while (apr_isspace(*opt_arg))
      +                        opt_arg++;
      +                    len = strlen(opt_arg);
      +                    host = strdup(opt_arg);
      +                    while (len && apr_isspace(host[len-1]))
      +                        host[--len] = '\0';
      +                    opt_host = host;
                       } else if (strncasecmp(opt_arg, "Accept:", 7) == 0) {
                           opt_accept = 1;
                       } else if (strncasecmp(opt_arg, "User-Agent:", 11) == 0) {
      @@ -2194,7 +2361,7 @@ int main(int argc, const char * const argv[])
                               p++;
                               proxyport = atoi(p);
                           }
      -                    strcpy(proxyhost, opt_arg);
      +                    proxyhost = apr_pstrdup(cntxt, opt_arg);
                           isproxy = 1;
                       }
                       break;
      @@ -2219,19 +2386,42 @@ int main(int argc, const char * const argv[])
                   case 'Z':
                       ssl_cipher = strdup(opt_arg);
                       break;
      +            case 'm':
      +                method = CUSTOM_METHOD;
      +                method_str[CUSTOM_METHOD] = strdup(opt_arg);
      +                break;
                   case 'f':
                       if (strncasecmp(opt_arg, "ALL", 3) == 0) {
                           meth = SSLv23_client_method();
       #ifndef OPENSSL_NO_SSL2
                       } else if (strncasecmp(opt_arg, "SSL2", 4) == 0) {
                           meth = SSLv2_client_method();
      +#ifdef HAVE_TLSEXT
      +                    tls_use_sni = 0;
      +#endif
       #endif
      +#ifndef OPENSSL_NO_SSL3
                       } else if (strncasecmp(opt_arg, "SSL3", 4) == 0) {
                           meth = SSLv3_client_method();
      +#ifdef HAVE_TLSEXT
      +                    tls_use_sni = 0;
      +#endif
      +#endif
      +#ifdef HAVE_TLSV1_X
      +                } else if (strncasecmp(opt_arg, "TLS1.1", 6) == 0) {
      +                    meth = TLSv1_1_client_method();
      +                } else if (strncasecmp(opt_arg, "TLS1.2", 6) == 0) {
      +                    meth = TLSv1_2_client_method();
      +#endif
                       } else if (strncasecmp(opt_arg, "TLS1", 4) == 0) {
                           meth = TLSv1_client_method();
                       }
                       break;
      +#ifdef HAVE_TLSEXT
      +            case 'I':
      +                tls_use_sni = 0;
      +                break;
      +#endif
       #endif
               }
           }
      diff --git a/support/ab.dep b/support/ab.dep
      new file mode 100644
      index 00000000000..36eab1d8418
      --- /dev/null
      +++ b/support/ab.dep
      @@ -0,0 +1,37 @@
      +# Microsoft Developer Studio Generated Dependency File, included by ab.mak
      +
      +.\ab.c : \
      +	"..\include\ap_release.h"\
      +	"..\srclib\apr-util\include\apr_base64.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_dso.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_poll.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_portable.h"\
      +	"..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\srclib\apr\include\apr_shm.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      diff --git a/support/ab.dsp b/support/ab.dsp
      index 5925691f5b3..7de1c8620b3 100644
      --- a/support/ab.dsp
      +++ b/support/ab.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib user32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\ab.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\ab.exe
       SOURCE="$(InputPath)"
      diff --git a/support/ab.mak b/support/ab.mak
      new file mode 100644
      index 00000000000..669ac792be2
      --- /dev/null
      +++ b/support/ab.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on ab.dsp
      +!IF "$(CFG)" == ""
      +CFG=ab - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to ab - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "ab - Win32 Release" && "$(CFG)" != "ab - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "ab.mak" CFG="ab - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "ab - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "ab - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "ab - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\ab.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\ab.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ab.obj"
      +	-@erase "$(INTDIR)\ab.res"
      +	-@erase "$(INTDIR)\ab_src.idb"
      +	-@erase "$(INTDIR)\ab_src.pdb"
      +	-@erase "$(OUTDIR)\ab.exe"
      +	-@erase "$(OUTDIR)\ab.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\ab_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ab.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\ab.pdb" /debug /out:"$(OUTDIR)\ab.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\ab.obj" \
      +	"$(INTDIR)\ab.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\ab.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\ab.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\ab.exe"
      +   if exist .\Release\ab.exe.manifest mt.exe -manifest .\Release\ab.exe.manifest -outputresource:.\Release\ab.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "ab - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\ab.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\ab.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ab.obj"
      +	-@erase "$(INTDIR)\ab.res"
      +	-@erase "$(INTDIR)\ab_src.idb"
      +	-@erase "$(INTDIR)\ab_src.pdb"
      +	-@erase "$(OUTDIR)\ab.exe"
      +	-@erase "$(OUTDIR)\ab.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\ab_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ab.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\ab.pdb" /debug /out:"$(OUTDIR)\ab.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\ab.obj" \
      +	"$(INTDIR)\ab.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\ab.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\ab.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\ab.exe"
      +   if exist .\Debug\ab.exe.manifest mt.exe -manifest .\Debug\ab.exe.manifest -outputresource:.\Debug\ab.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("ab.dep")
      +!INCLUDE "ab.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "ab.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "ab - Win32 Release" || "$(CFG)" == "ab - Win32 Debug"
      +
      +!IF  "$(CFG)" == "ab - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "ab - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "ab - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "ab - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\ab.c
      +
      +"$(INTDIR)\ab.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "ab - Win32 Release"
      +
      +
      +"$(INTDIR)\ab.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "ab - Win32 Debug"
      +
      +
      +"$(INTDIR)\ab.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/support/abs.dep b/support/abs.dep
      new file mode 100644
      index 00000000000..4b6f12f7a50
      --- /dev/null
      +++ b/support/abs.dep
      @@ -0,0 +1,37 @@
      +# Microsoft Developer Studio Generated Dependency File, included by abs.mak
      +
      +.\ab.c : \
      +	"..\include\ap_release.h"\
      +	"..\srclib\apr-util\include\apr_base64.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_dso.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_poll.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_portable.h"\
      +	"..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\srclib\apr\include\apr_shm.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      diff --git a/support/abs.dsp b/support/abs.dsp
      index c8ba600e743..99eafd30572 100644
      --- a/support/abs.dsp
      +++ b/support/abs.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /libpath:"../srclib/openssl/out32dll"
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /libpath:"../srclib/openssl/out32dll" /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /libpath:"../srclib/openssl/out32dll"
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /debug /libpath:"../srclib/openssl/out32dll" /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\abs.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /debug /libpath:"../srclib/openssl/out32dll"
       # Begin Special Build Tool
       TargetPath=.\Debug\abs.exe
       SOURCE="$(InputPath)"
      diff --git a/support/abs.mak b/support/abs.mak
      new file mode 100644
      index 00000000000..0c94ccfcb6f
      --- /dev/null
      +++ b/support/abs.mak
      @@ -0,0 +1,336 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on abs.dsp
      +!IF "$(CFG)" == ""
      +CFG=abs - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to abs - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "abs - Win32 Release" && "$(CFG)" != "abs - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "abs.mak" CFG="abs - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "abs - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "abs - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "abs - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\abs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\abs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ab.res"
      +	-@erase "$(INTDIR)\abs.obj"
      +	-@erase "$(INTDIR)\abs_src.idb"
      +	-@erase "$(INTDIR)\abs_src.pdb"
      +	-@erase "$(OUTDIR)\abs.exe"
      +	-@erase "$(OUTDIR)\abs.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /I "../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "HAVE_OPENSSL" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\abs_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench/SSL command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\abs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\abs.pdb" /debug /out:"$(OUTDIR)\abs.exe" /libpath:"../srclib/openssl/out32dll" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\abs.obj" \
      +	"$(INTDIR)\ab.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\abs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\abs.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\abs.exe"
      +   if exist .\Release\abs.exe.manifest mt.exe -manifest .\Release\abs.exe.manifest -outputresource:.\Release\abs.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "abs - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\abs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\abs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ab.res"
      +	-@erase "$(INTDIR)\abs.obj"
      +	-@erase "$(INTDIR)\abs_src.idb"
      +	-@erase "$(INTDIR)\abs_src.pdb"
      +	-@erase "$(OUTDIR)\abs.exe"
      +	-@erase "$(OUTDIR)\abs.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /I "../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "HAVE_OPENSSL" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\abs_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench/SSL command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\abs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib ssleay32.lib libeay32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\abs.pdb" /debug /out:"$(OUTDIR)\abs.exe" /libpath:"../srclib/openssl/out32dll" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\abs.obj" \
      +	"$(INTDIR)\ab.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\abs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\abs.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\abs.exe"
      +   if exist .\Debug\abs.exe.manifest mt.exe -manifest .\Debug\abs.exe.manifest -outputresource:.\Debug\abs.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("abs.dep")
      +!INCLUDE "abs.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "abs.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "abs - Win32 Release" || "$(CFG)" == "abs - Win32 Debug"
      +
      +!IF  "$(CFG)" == "abs - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "abs - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "abs - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "abs - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\ab.c
      +
      +!IF  "$(CFG)" == "abs - Win32 Release"
      +
      +CPP_SWITCHES=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /I "../srclib/openssl/inc32" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "HAVE_OPENSSL" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /Fo"$(INTDIR)\abs.obj" /Fd"$(INTDIR)\abs_src" /FD /c 
      +
      +"$(INTDIR)\abs.obj" : $(SOURCE) "$(INTDIR)"
      +	$(CPP) @<<
      +  $(CPP_SWITCHES) $(SOURCE)
      +<<
      +
      +
      +!ELSEIF  "$(CFG)" == "abs - Win32 Debug"
      +
      +CPP_SWITCHES=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /I "../srclib/openssl/inc32" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /D "HAVE_OPENSSL" /D "WIN32_LEAN_AND_MEAN" /D "NO_IDEA" /D "NO_RC5" /D "NO_MDC2" /D "OPENSSL_NO_IDEA" /D "OPENSSL_NO_RC5" /D "OPENSSL_NO_MDC2" /Fo"$(INTDIR)\abs.obj" /Fd"$(INTDIR)\abs_src" /FD /EHsc /c 
      +
      +"$(INTDIR)\abs.obj" : $(SOURCE) "$(INTDIR)"
      +	$(CPP) @<<
      +  $(CPP_SWITCHES) $(SOURCE)
      +<<
      +
      +
      +!ENDIF 
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "abs - Win32 Release"
      +
      +
      +"$(INTDIR)\ab.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench/SSL command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "abs - Win32 Debug"
      +
      +
      +"$(INTDIR)\ab.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\ab.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="ab.exe" /d LONG_NAME="ApacheBench/SSL command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/support/apxs.in b/support/apxs.in
      index 39ff16cd3c3..ad1287ffb13 100644
      --- a/support/apxs.in
      +++ b/support/apxs.in
      @@ -39,6 +39,8 @@ my $CFG_TARGET     = get_vars("progname");
       my $CFG_SYSCONFDIR = get_vars("sysconfdir");
       my $CFG_CFLAGS     = join ' ', map { get_vars($_) }
         qw(SHLTCFLAGS CFLAGS NOTEST_CPPFLAGS EXTRA_CPPFLAGS EXTRA_CFLAGS);
      +my $CFG_LDFLAGS    = join ' ', map { get_vars($_) }
      +  qw(LDFLAGS NOTEST_LDFLAGS SH_LDFLAGS);
       my $includedir     = get_vars("includedir");
       my $CFG_INCLUDEDIR = eval qq("$includedir");
       my $CFG_CC         = get_vars("CC");
      @@ -448,6 +450,7 @@ if ($opt_c) {
               $opt .= " -l$opt_l";
           }
       
      +    my $ldflags = "$CFG_LDFLAGS";
           if ($opt_p == 1) {
               
               my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
      @@ -466,7 +469,7 @@ if ($opt_c) {
               $opt .= " -rpath $CFG_LIBEXECDIR -module -avoid-version $apr_ldflags";
           }
       
      -    push(@cmds, "$libtool $ltflags --mode=link $CFG_CC -o $dso_file $opt $lo");
      +    push(@cmds, "$libtool $ltflags --mode=link $CFG_CC $ldflags -o $dso_file $opt $lo");
       
           #   execute the commands
           &execute_cmds(@cmds);
      @@ -673,7 +676,6 @@ top_builddir=%PREFIX%
       include %INSTALLBUILDDIR%/special.mk
       
       #   the used tools
      -APXS=apxs
       APACHECTL=apachectl
       
       #   additional defines, includes and libraries
      diff --git a/support/checkgid.c b/support/checkgid.c
      index 2a918b2956a..29de65026b1 100644
      --- a/support/checkgid.c
      +++ b/support/checkgid.c
      @@ -15,7 +15,7 @@
        */
       
       /*
      - * Given one or more group identifers on the command line (e.g.,
      + * Given one or more group identifiers on the command line (e.g.,
        * "httpd" or "#-1"), figure out whether they'll be valid for
        * the server to use at run-time.
        *
      diff --git a/support/envvars-std.in b/support/envvars-std.in
      index cf50c5c75e5..9493bc749ca 100644
      --- a/support/envvars-std.in
      +++ b/support/envvars-std.in
      @@ -18,7 +18,11 @@
       #
       # This file is generated from envvars-std.in
       #
      -@SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
      +if test "x$@SHLIBPATH_VAR@" != "x" ; then
      +  @SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
      +else
      +  @SHLIBPATH_VAR@="@exp_libdir@"
      +fi
       export @SHLIBPATH_VAR@
       #
       @OS_SPECIFIC_VARS@
      diff --git a/support/fcgistarter.c b/support/fcgistarter.c
      index 2e2c3e5662f..9cfda51a09f 100644
      --- a/support/fcgistarter.c
      +++ b/support/fcgistarter.c
      @@ -133,6 +133,11 @@ int main(int argc, const char * const argv[])
               exit_error(rv, "apr_socket_create");
           }
       
      +    rv = apr_socket_opt_set(skt, APR_SO_REUSEADDR, 1);
      +    if (rv) {
      +        exit_error(rv, "apr_socket_opt_set(APR_SO_REUSEADDR)");
      +    }
      +
           rv = apr_socket_bind(skt, skaddr);
           if (rv) {
               exit_error(rv, "apr_socket_bind");
      diff --git a/support/fcgistarter.dep b/support/fcgistarter.dep
      new file mode 100644
      index 00000000000..d27b8d25033
      --- /dev/null
      +++ b/support/fcgistarter.dep
      @@ -0,0 +1,29 @@
      +# Microsoft Developer Studio Generated Dependency File, included by fcgistarter.mak
      +
      +.\fcgistarter.c : \
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_dso.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_global_mutex.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_portable.h"\
      +	"..\srclib\apr\include\apr_proc_mutex.h"\
      +	"..\srclib\apr\include\apr_shm.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      diff --git a/support/fcgistarter.mak b/support/fcgistarter.mak
      new file mode 100644
      index 00000000000..b47d1857485
      --- /dev/null
      +++ b/support/fcgistarter.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on fcgistarter.dsp
      +!IF "$(CFG)" == ""
      +CFG=fcgistarter - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to fcgistarter - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "fcgistarter - Win32 Release" && "$(CFG)" != "fcgistarter - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "fcgistarter.mak" CFG="fcgistarter - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "fcgistarter - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "fcgistarter - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "fcgistarter - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\fcgistarter.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\fcgistarter.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\fcgistarter.obj"
      +	-@erase "$(INTDIR)\fcgistarter.res"
      +	-@erase "$(INTDIR)\fcgistarter_src.idb"
      +	-@erase "$(INTDIR)\fcgistarter_src.pdb"
      +	-@erase "$(OUTDIR)\fcgistarter.exe"
      +	-@erase "$(OUTDIR)\fcgistarter.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\fcgistarter_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\fcgistarter.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="fcgistarter.exe" /d LONG_NAME="Apache fcgi command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\fcgistarter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\fcgistarter.pdb" /debug /out:"$(OUTDIR)\fcgistarter.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\fcgistarter.obj" \
      +	"$(INTDIR)\fcgistarter.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\fcgistarter.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\fcgistarter.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\fcgistarter.exe"
      +   if exist .\Release\fcgistarter.exe.manifest mt.exe -manifest .\Release\fcgistarter.exe.manifest -outputresource:.\Release\fcgistarter.exe;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "fcgistarter - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\fcgistarter.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\fcgistarter.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\fcgistarter.obj"
      +	-@erase "$(INTDIR)\fcgistarter.res"
      +	-@erase "$(INTDIR)\fcgistarter_src.idb"
      +	-@erase "$(INTDIR)\fcgistarter_src.pdb"
      +	-@erase "$(OUTDIR)\fcgistarter.exe"
      +	-@erase "$(OUTDIR)\fcgistarter.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\fcgistarter_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\fcgistarter.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="fcgistarter.exe" /d LONG_NAME="Apache fcgi command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\fcgistarter.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\fcgistarter.pdb" /debug /out:"$(OUTDIR)\fcgistarter.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\fcgistarter.obj" \
      +	"$(INTDIR)\fcgistarter.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\fcgistarter.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\fcgistarter.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\fcgistarter.exe"
      +   if exist .\Debug\fcgistarter.exe.manifest mt.exe -manifest .\Debug\fcgistarter.exe.manifest -outputresource:.\Debug\fcgistarter.exe;2
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("fcgistarter.dep")
      +!INCLUDE "fcgistarter.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "fcgistarter.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "fcgistarter - Win32 Release" || "$(CFG)" == "fcgistarter - Win32 Debug"
      +
      +!IF  "$(CFG)" == "fcgistarter - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "fcgistarter - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "fcgistarter - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "fcgistarter - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\fcgistarter.c
      +
      +"$(INTDIR)\fcgistarter.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "fcgistarter - Win32 Release"
      +
      +
      +"$(INTDIR)\fcgistarter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\fcgistarter.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="fcgistarter.exe" /d LONG_NAME="Apache fcgi command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "fcgistarter - Win32 Debug"
      +
      +
      +"$(INTDIR)\fcgistarter.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\fcgistarter.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="fcgistarter.exe" /d LONG_NAME="Apache fcgi command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/support/htcacheclean.c b/support/htcacheclean.c
      index 9ca92789514..8692377d0c4 100644
      --- a/support/htcacheclean.c
      +++ b/support/htcacheclean.c
      @@ -421,7 +421,7 @@ static int list_urls(char *path, apr_pool_t *pool, apr_off_t round)
               return 1;
           }
       
      -    while (apr_dir_read(&info, 0, dir) == APR_SUCCESS && !interrupted) {
      +    while (apr_dir_read(&info, APR_FINFO_TYPE, dir) == APR_SUCCESS && !interrupted) {
       
               if (info.filetype == APR_DIR) {
                   if (!strcmp(info.name, ".") || !strcmp(info.name, "..")) {
      @@ -1046,9 +1046,9 @@ static void purge(char *path, apr_pool_t *pool, apr_off_t max,
                return;
           }
       
      -    /* process remaining entries oldest to newest, the check for an emtpy
      +    /* process remaining entries oldest to newest, the check for an empty
            * ring actually isn't necessary except when the compiler does
      -     * corrupt 64bit arithmetics which happend to me once, so better safe
      +     * corrupt 64bit arithmetics which happened to me once, so better safe
            * than sorry
            */
           while (!((!s.max || s.sum <= s.max) && (!s.inodes || s.nodes <= s.inodes))
      @@ -1087,9 +1087,8 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
               return rv;
           }
           if (rv != APR_SUCCESS) {
      -        char errmsg[120];
      -        apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
      -                dir, apr_strerror(rv, errmsg, sizeof errmsg));
      +        apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
      +                dir, &rv);
               return rv;
           }
       
      @@ -1110,10 +1109,9 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
                   const char *file = apr_pstrcat(pool, dir, "/", dirent.name, NULL);
                   rv = apr_file_remove(file, pool);
                   if (APR_SUCCESS != rv) {
      -                char errmsg[120];
                       apr_file_printf(errfile,
      -                        "Could not remove file '%s': %s" APR_EOL_STR, file,
      -                        apr_strerror(rv, errmsg, sizeof errmsg));
      +                        "Could not remove file '%s': %pm" APR_EOL_STR, file,
      +                        &rv);
                       break;
                   }
               }
      @@ -1127,9 +1125,8 @@ static apr_status_t remove_directory(apr_pool_t *pool, const char *dir)
                   rv = APR_SUCCESS;
               }
               if (rv != APR_SUCCESS) {
      -            char errmsg[120];
      -            apr_file_printf(errfile, "Could not remove directory %s: %s" APR_EOL_STR,
      -                    dir, apr_strerror(rv, errmsg, sizeof errmsg));
      +            apr_file_printf(errfile, "Could not remove directory %s: %pm" APR_EOL_STR,
      +                    dir, &rv);
               }
           }
       
      @@ -1151,9 +1148,8 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
       
           rv = apr_dir_open(&dirp, base, pool);
           if (rv != APR_SUCCESS) {
      -        char errmsg[120];
      -        apr_file_printf(errfile, "Could not open directory %s: %s" APR_EOL_STR,
      -                base, apr_strerror(rv, errmsg, sizeof errmsg));
      +        apr_file_printf(errfile, "Could not open directory %s: %pm" APR_EOL_STR,
      +                base, &rv);
               return rv;
           }
       
      @@ -1194,18 +1190,16 @@ static apr_status_t find_directory(apr_pool_t *pool, const char *base,
                   remove = apr_pstrcat(pool, base, "/", header, NULL);
                   status = apr_file_remove(remove, pool);
                   if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
      -                char errmsg[120];
      -                apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
      -                        remove, apr_strerror(status, errmsg, sizeof errmsg));
      +                apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
      +                        remove, &status);
                       rv = status;
                   }
       
                   remove = apr_pstrcat(pool, base, "/", data, NULL);
                   status = apr_file_remove(remove, pool);
                   if (status != APR_SUCCESS && !APR_STATUS_IS_ENOENT(status)) {
      -                char errmsg[120];
      -                apr_file_printf(errfile, "Could not remove file %s: %s" APR_EOL_STR,
      -                        remove, apr_strerror(status, errmsg, sizeof errmsg));
      +                apr_file_printf(errfile, "Could not remove file %s: %pm" APR_EOL_STR,
      +                        remove, &status);
                       rv = status;
                   }
       
      @@ -1357,7 +1351,6 @@ static void usage_repeated_arg(apr_pool_t *pool, char option) {
       static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidfile)
       {
           apr_status_t status;
      -    char errmsg[120];
           pid_t mypid = getpid();
       
           if (APR_SUCCESS == (status = apr_file_open(pidfile, pidfilename,
      @@ -1369,9 +1362,8 @@ static void log_pid(apr_pool_t *pool, const char *pidfilename, apr_file_t **pidf
           else {
               if (errfile) {
                   apr_file_printf(errfile,
      -                            "Could not write the pid file '%s': %s" APR_EOL_STR,
      -                            pidfilename,
      -                            apr_strerror(status, errmsg, sizeof errmsg));
      +                            "Could not write the pid file '%s': %pm" APR_EOL_STR,
      +                            pidfilename, &status);
               }
               exit(1);
           }
      @@ -1393,7 +1385,6 @@ int main(int argc, const char * const argv[])
           char opt;
           const char *arg;
           char *proxypath, *path, *pidfilename;
      -    char errmsg[1024];
       
           interrupted = 0;
           repeat = 0;
      @@ -1579,8 +1570,8 @@ int main(int argc, const char * const argv[])
                       }
                       proxypath = apr_pstrdup(pool, arg);
                       if ((status = apr_filepath_set(proxypath, pool)) != APR_SUCCESS) {
      -                    usage(apr_psprintf(pool, "Could not set filepath to '%s': %s",
      -                                       proxypath, apr_strerror(status, errmsg, sizeof errmsg)));
      +                    usage(apr_psprintf(pool, "Could not set filepath to '%s': %pm",
      +                                       proxypath, &status));
                       }
                       break;
       
      @@ -1620,6 +1611,10 @@ int main(int argc, const char * const argv[])
               usage(NULL);
           }
       
      +    if (!proxypath) {
      +         usage("Option -p must be specified");
      +    }
      +
           if (o->ind < argc) {
               int deleted = 0;
               int error = 0;
      @@ -1671,17 +1666,12 @@ int main(int argc, const char * const argv[])
                usage("Option -i cannot be used without -d");
           }
       
      -    if (!proxypath) {
      -         usage("Option -p must be specified");
      -    }
      -
           if (!listurls && max <= 0 && inodes <= 0) {
                usage("At least one of option -l or -L must be greater than zero");
           }
       
           if (apr_filepath_get(&path, 0, pool) != APR_SUCCESS) {
      -        usage(apr_psprintf(pool, "Could not get the filepath: %s",
      -                           apr_strerror(status, errmsg, sizeof errmsg)));
      +        usage(apr_psprintf(pool, "Could not get the filepath: %pm", &status));
           }
           baselen = strlen(path);
       
      diff --git a/support/htcacheclean.dep b/support/htcacheclean.dep
      new file mode 100644
      index 00000000000..0d5d0f866b0
      --- /dev/null
      +++ b/support/htcacheclean.dep
      @@ -0,0 +1,37 @@
      +# Microsoft Developer Studio Generated Dependency File, included by htcacheclean.mak
      +
      +.\htcacheclean.c : \
      +	"..\modules\cache\cache_common.h"\
      +	"..\modules\cache\cache_disk_common.h"\
      +	"..\srclib\apr-util\include\apr_buckets.h"\
      +	"..\srclib\apr-util\include\apr_date.h"\
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_hash.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_mmap.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_ring.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      diff --git a/support/htcacheclean.dsp b/support/htcacheclean.dsp
      index d3d4b8fa60e..b1422e001d9 100644
      --- a/support/htcacheclean.dsp
      +++ b/support/htcacheclean.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\htcacheclean.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\htcacheclean.exe
       SOURCE="$(InputPath)"
      diff --git a/support/htcacheclean.mak b/support/htcacheclean.mak
      new file mode 100644
      index 00000000000..a6fc784da91
      --- /dev/null
      +++ b/support/htcacheclean.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on htcacheclean.dsp
      +!IF "$(CFG)" == ""
      +CFG=htcacheclean - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to htcacheclean - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "htcacheclean - Win32 Release" && "$(CFG)" != "htcacheclean - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "htcacheclean.mak" CFG="htcacheclean - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "htcacheclean - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "htcacheclean - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htcacheclean - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htcacheclean.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\htcacheclean.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htcacheclean.obj"
      +	-@erase "$(INTDIR)\htcacheclean.res"
      +	-@erase "$(INTDIR)\htcacheclean_src.idb"
      +	-@erase "$(INTDIR)\htcacheclean_src.pdb"
      +	-@erase "$(OUTDIR)\htcacheclean.exe"
      +	-@erase "$(OUTDIR)\htcacheclean.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htcacheclean_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htcacheclean.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htcacheclean.exe" /d LONG_NAME="Apache htcacheclean command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htcacheclean.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htcacheclean.pdb" /debug /out:"$(OUTDIR)\htcacheclean.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htcacheclean.obj" \
      +	"$(INTDIR)\htcacheclean.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\htcacheclean.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\htcacheclean.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htcacheclean.exe"
      +   if exist .\Release\htcacheclean.exe.manifest mt.exe -manifest .\Release\htcacheclean.exe.manifest -outputresource:.\Release\htcacheclean.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "htcacheclean - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htcacheclean.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\htcacheclean.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htcacheclean.obj"
      +	-@erase "$(INTDIR)\htcacheclean.res"
      +	-@erase "$(INTDIR)\htcacheclean_src.idb"
      +	-@erase "$(INTDIR)\htcacheclean_src.pdb"
      +	-@erase "$(OUTDIR)\htcacheclean.exe"
      +	-@erase "$(OUTDIR)\htcacheclean.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htcacheclean_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htcacheclean.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htcacheclean.exe" /d LONG_NAME="Apache htcacheclean command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htcacheclean.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htcacheclean.pdb" /debug /out:"$(OUTDIR)\htcacheclean.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htcacheclean.obj" \
      +	"$(INTDIR)\htcacheclean.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\htcacheclean.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\htcacheclean.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htcacheclean.exe"
      +   if exist .\Debug\htcacheclean.exe.manifest mt.exe -manifest .\Debug\htcacheclean.exe.manifest -outputresource:.\Debug\htcacheclean.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("htcacheclean.dep")
      +!INCLUDE "htcacheclean.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "htcacheclean.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "htcacheclean - Win32 Release" || "$(CFG)" == "htcacheclean - Win32 Debug"
      +
      +!IF  "$(CFG)" == "htcacheclean - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htcacheclean - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htcacheclean - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htcacheclean - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\htcacheclean.c
      +
      +"$(INTDIR)\htcacheclean.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "htcacheclean - Win32 Release"
      +
      +
      +"$(INTDIR)\htcacheclean.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htcacheclean.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htcacheclean.exe" /d LONG_NAME="Apache htcacheclean command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "htcacheclean - Win32 Debug"
      +
      +
      +"$(INTDIR)\htcacheclean.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htcacheclean.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htcacheclean.exe" /d LONG_NAME="Apache htcacheclean command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/support/htdbm.c b/support/htdbm.c
      index f9a02bd49cd..40a3d232938 100644
      --- a/support/htdbm.c
      +++ b/support/htdbm.c
      @@ -22,9 +22,7 @@
        * 12 Oct 2001
        */
       
      -#include "apr.h"
      -#include "apr_lib.h"
      -#include "apr_strings.h"
      +#include "passwd_common.h"
       #include "apr_file_io.h"
       #include "apr_file_info.h"
       #include "apr_pools.h"
      @@ -32,6 +30,7 @@
       #include "apr_md5.h"
       #include "apr_sha1.h"
       #include "apr_dbm.h"
      +#include "apr_getopt.h"
       
       #if APR_HAVE_STDLIB_H
       #include <stdlib.h>
      @@ -56,49 +55,20 @@
       #endif
       
       
      -#if !APR_CHARSET_EBCDIC
      -#define LF 10
      -#define CR 13
      -#else /*APR_CHARSET_EBCDIC*/
      -#define LF '\n'
      -#define CR '\r'
      -#endif /*APR_CHARSET_EBCDIC*/
      -
      -#define MAX_STRING_LEN 256
      -#define ALG_PLAIN 0
      -#define ALG_APMD5 1
      -#define ALG_APSHA 2
      -
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -#define ALG_CRYPT 3
      -#endif
      -
      -
      -#define ERR_FILEPERM    1
      -#define ERR_SYNTAX      2
      -#define ERR_PWMISMATCH  3
      -#define ERR_INTERRUPTED 4
      -#define ERR_OVERFLOW    5
      -#define ERR_BADUSER     6
      -#define ERR_EMPTY       7
      -
      -
       typedef struct htdbm_t htdbm_t;
       
       struct htdbm_t {
           apr_dbm_t               *dbm;
      -    apr_pool_t              *pool;
      +    struct passwd_ctx       ctx;
       #if APR_CHARSET_EBCDIC
           apr_xlate_t             *to_ascii;
       #endif
           char                    *filename;
           char                    *username;
      -    char                    *userpass;
           char                    *comment;
           char                    *type;
           int                     create;
           int                     rdonly;
      -    int                     alg;
       };
       
       
      @@ -107,7 +77,6 @@ struct htdbm_t {
       #define HTDBM_VERIFY 2
       #define HTDBM_LIST   3
       #define HTDBM_NOFILE 4
      -#define HTDBM_STDIN  5
       
       static void terminate(void)
       {
      @@ -141,13 +110,15 @@ static apr_status_t htdbm_init(apr_pool_t **pool, htdbm_t **hdbm)
       #endif
       
           apr_pool_create( pool, NULL);
      +    apr_pool_abort_set(abort_on_oom, *pool);
      +    apr_file_open_stderr(&errfile, *pool);
           apr_signal(SIGINT, (void (*)(int)) htdbm_interrupted);
       
           (*hdbm) = (htdbm_t *)apr_pcalloc(*pool, sizeof(htdbm_t));
      -    (*hdbm)->pool = *pool;
      +    (*hdbm)->ctx.pool = *pool;
       
       #if APR_CHARSET_EBCDIC
      -    rv = apr_xlate_open(&((*hdbm)->to_ascii), "ISO-8859-1", APR_DEFAULT_CHARSET, (*hdbm)->pool);
      +    rv = apr_xlate_open(&((*hdbm)->to_ascii), "ISO-8859-1", APR_DEFAULT_CHARSET, (*hdbm)->ctx.pool);
           if (rv) {
               fprintf(stderr, "apr_xlate_open(to ASCII)->%d\n", rv);
               return APR_EGENERAL;
      @@ -165,7 +136,7 @@ static apr_status_t htdbm_init(apr_pool_t **pool, htdbm_t **hdbm)
       #endif /*APR_CHARSET_EBCDIC*/
       
           /* Set MD5 as default */
      -    (*hdbm)->alg = ALG_APMD5;
      +    (*hdbm)->ctx.alg = ALG_APMD5;
           (*hdbm)->type = "default";
           return APR_SUCCESS;
       }
      @@ -174,11 +145,11 @@ static apr_status_t htdbm_open(htdbm_t *htdbm)
       {
           if (htdbm->create)
               return apr_dbm_open_ex(&htdbm->dbm, htdbm->type, htdbm->filename, APR_DBM_RWCREATE,
      -                            APR_OS_DEFAULT, htdbm->pool);
      +                            APR_OS_DEFAULT, htdbm->ctx.pool);
           else
               return apr_dbm_open_ex(&htdbm->dbm, htdbm->type, htdbm->filename,
                                   htdbm->rdonly ? APR_DBM_READONLY : APR_DBM_READWRITE,
      -                            APR_OS_DEFAULT, htdbm->pool);
      +                            APR_OS_DEFAULT, htdbm->ctx.pool);
       }
       
       static apr_status_t htdbm_save(htdbm_t *htdbm, int *changed)
      @@ -193,11 +164,11 @@ static apr_status_t htdbm_save(htdbm_t *htdbm, int *changed)
           if (apr_dbm_exists(htdbm->dbm, key))
               *changed = 1;
       
      -    val.dsize = strlen(htdbm->userpass);
      +    val.dsize = strlen(htdbm->ctx.passwd);
           if (!htdbm->comment)
      -        val.dptr  = htdbm->userpass;
      +        val.dptr  = htdbm->ctx.passwd;
           else {
      -        val.dptr = apr_pstrcat(htdbm->pool, htdbm->userpass, ":",
      +        val.dptr = apr_pstrcat(htdbm->ctx.pool, htdbm->ctx.passwd, ":",
                                      htdbm->comment, NULL);
               val.dsize += (strlen(htdbm->comment) + 1);
           }
      @@ -228,13 +199,13 @@ static apr_status_t htdbm_verify(htdbm_t *htdbm)
               return APR_ENOENT;
           if (apr_dbm_fetch(htdbm->dbm, key, &val) != APR_SUCCESS)
               return APR_ENOENT;
      -    rec = apr_pstrndup(htdbm->pool, val.dptr, val.dsize);
      +    rec = apr_pstrndup(htdbm->ctx.pool, val.dptr, val.dsize);
           cmnt = strchr(rec, ':');
           if (cmnt)
      -        pwd = apr_pstrndup(htdbm->pool, rec, cmnt - rec);
      +        pwd = apr_pstrndup(htdbm->ctx.pool, rec, cmnt - rec);
           else
      -        pwd = apr_pstrdup(htdbm->pool, rec);
      -    return apr_password_validate(htdbm->userpass, pwd);
      +        pwd = apr_pstrdup(htdbm->ctx.pool, rec);
      +    return apr_password_validate(htdbm->ctx.passwd, pwd);
       }
       
       static apr_status_t htdbm_list(htdbm_t *htdbm)
      @@ -273,56 +244,20 @@ static apr_status_t htdbm_list(htdbm_t *htdbm)
           return APR_SUCCESS;
       }
       
      -static void to64(char *s, unsigned long v, int n)
      -{
      -    static unsigned char itoa64[] =         /* 0 ... 63 => ASCII - 64 */
      -    "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      -
      -    while (--n >= 0) {
      -        *s++ = itoa64[v&0x3f];
      -        v >>= 6;
      -    }
      -}
      -
      -static apr_status_t htdbm_make(htdbm_t *htdbm)
      +static int htdbm_make(htdbm_t *htdbm)
       {
           char cpw[MAX_STRING_LEN];
      -    char salt[9];
      -
      -    switch (htdbm->alg) {
      -        case ALG_APSHA:
      -            /* XXX cpw >= 28 + strlen(sha1) chars - fixed len SHA */
      -            apr_sha1_base64(htdbm->userpass,strlen(htdbm->userpass),cpw);
      -        break;
      -
      -        case ALG_APMD5:
      -            (void) srand((int) time((time_t *) NULL));
      -            to64(&salt[0], rand(), 8);
      -            salt[8] = '\0';
      -            apr_md5_encode((const char *)htdbm->userpass, (const char *)salt,
      -                            cpw, sizeof(cpw));
      -        break;
      -        case ALG_PLAIN:
      -            /* XXX this len limitation is not in sync with any HTTPd len. */
      -            apr_cpystrn(cpw,htdbm->userpass,sizeof(cpw));
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -            fprintf(stderr, "Warning: Plain text passwords aren't supported by the "
      -                    "server on this platform!\n");
      -#endif
      -        break;
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -        case ALG_CRYPT:
      -            (void) srand((int) time((time_t *) NULL));
      -            to64(&salt[0], rand(), 8);
      -            salt[8] = '\0';
      -            apr_cpystrn(cpw, crypt(htdbm->userpass, salt), sizeof(cpw) - 1);
      -            fprintf(stderr, "CRYPT is now deprecated, use MD5 instead!\n");
      -#endif
      -        default:
      -        break;
      +    int ret;
      +
      +    htdbm->ctx.out = cpw;
      +    htdbm->ctx.out_len = sizeof(cpw);
      +    ret = mkhash(&htdbm->ctx);
      +    if (ret != 0) {
      +        fprintf(stderr, "Error: %s\n", htdbm->ctx.errstr);
      +        return ret;
           }
      -    htdbm->userpass = apr_pstrdup(htdbm->pool, cpw);
      -    return APR_SUCCESS;
      +    htdbm->ctx.passwd = apr_pstrdup(htdbm->ctx.pool, cpw);
      +    return 0;
       }
       
       static apr_status_t htdbm_valid_username(htdbm_t *htdbm)
      @@ -340,60 +275,54 @@ static apr_status_t htdbm_valid_username(htdbm_t *htdbm)
       
       static void htdbm_usage(void)
       {
      -
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -#define CRYPT_OPTION "d"
      -#else
      -#define CRYPT_OPTION ""
      -#endif
      -    fprintf(stderr, "htdbm -- program for manipulating DBM password databases.\n\n");
      -    fprintf(stderr, "Usage: htdbm    [-cm"CRYPT_OPTION"pstvx] [-TDBTYPE] database username\n");
      -    fprintf(stderr, "                -b[cm"CRYPT_OPTION"ptsv] [-TDBTYPE] database username password\n");
      -    fprintf(stderr, "                -n[m"CRYPT_OPTION"pst]   username\n");
      -    fprintf(stderr, "                -nb[m"CRYPT_OPTION"pst]  username password\n");
      -    fprintf(stderr, "                -v[m"CRYPT_OPTION"ps]    [-TDBTYPE] database username\n");
      -    fprintf(stderr, "                -vb[m"CRYPT_OPTION"ps]   [-TDBTYPE] database username password\n");
      -    fprintf(stderr, "                -x[m"CRYPT_OPTION"ps]    [-TDBTYPE] database username\n");
      -    fprintf(stderr, "                -l                       [-TDBTYPE] database\n");
      -    fprintf(stderr, "Options:\n");
      -    fprintf(stderr, "   -b   Use the password from the command line rather "
      -                    "than prompting for it.\n");
      -    fprintf(stderr, "   -c   Create a new database.\n");
      -    fprintf(stderr, "   -n   Don't update database; display results on stdout.\n");
      -    fprintf(stderr, "   -m   Force MD5 encryption of the password (default).\n");
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -    fprintf(stderr, "   -d   Force CRYPT encryption of the password (now deprecated).\n");
      -#endif
      -    fprintf(stderr, "   -p   Do not encrypt the password (plaintext).\n");
      -    fprintf(stderr, "   -s   Force SHA encryption of the password.\n");
      -    fprintf(stderr, "   -T   DBM Type (SDBM|GDBM|DB|default).\n");
      -    fprintf(stderr, "   -l   Display usernames from database on stdout.\n");
      -    fprintf(stderr, "   -t   The last param is username comment.\n");
      -    fprintf(stderr, "   -v   Verify the username/password.\n");
      -    fprintf(stderr, "   -x   Remove the username record from database.\n");
      +    fprintf(stderr,
      +        "htdbm -- program for manipulating DBM password databases.\n\n"
      +        "Usage: htdbm   [-cimBdpstvx] [-C cost] [-TDBTYPE] database username\n"
      +        "                -b[cmBdptsv] [-C cost] [-TDBTYPE] database username password\n"
      +        "                -n[imBdpst]  [-C cost] username\n"
      +        "                -nb[mBdpst]  [-C cost] username password\n"
      +        "                -v[imBdps]   [-C cost] [-TDBTYPE] database username\n"
      +        "                -vb[mBdps]   [-C cost] [-TDBTYPE] database username password\n"
      +        "                -x                     [-TDBTYPE] database username\n"
      +        "                -l                     [-TDBTYPE] database\n"
      +        "Options:\n"
      +        "   -c   Create a new database.\n"
      +        "   -n   Don't update database; display results on stdout.\n"
      +        "   -b   Use the password from the command line rather than prompting for it.\n"
      +        "   -i   Read password from stdin without verification (for script usage).\n"
      +        "   -m   Force MD5 encryption of the password (default).\n"
      +        "   -B   Force BCRYPT encryption of the password (very secure).\n"
      +        "   -C   Set the computing time used for the bcrypt algorithm\n"
      +        "        (higher is more secure but slower, default: %d, valid: 4 to 31).\n"
      +        "   -d   Force CRYPT encryption of the password (8 chars max, insecure).\n"
      +        "   -s   Force SHA encryption of the password (insecure).\n"
      +        "   -p   Do not encrypt the password (plaintext, insecure).\n"
      +        "   -T   DBM Type (SDBM|GDBM|DB|default).\n"
      +        "   -l   Display usernames from database on stdout.\n"
      +        "   -v   Verify the username/password.\n"
      +        "   -x   Remove the username record from database.\n"
      +        "   -t   The last param is username comment.\n"
      +        "The SHA algorithm does not use a salt and is less secure than the "
      +        "MD5 algorithm.\n",
      +        BCRYPT_DEFAULT_COST);
           exit(ERR_SYNTAX);
      -
       }
       
      -
       int main(int argc, const char * const argv[])
       {
           apr_pool_t *pool;
           apr_status_t rv;
      -    apr_size_t l;
      -    char pwi[MAX_STRING_LEN];
      -    char pwc[MAX_STRING_LEN];
           char errbuf[MAX_STRING_LEN];
      -    const char *arg;
           int  need_file = 1;
           int  need_user = 1;
           int  need_pwd  = 1;
           int  need_cmnt = 0;
      -    int  pwd_supplied = 0;
           int  changed = 0;
           int  cmd = HTDBM_MAKE;
      -    int  i;
      -    int args_left = 2;
      +    int  i, ret, args_left = 2;
      +    apr_getopt_t *state;
      +    char opt;
      +    const char *opt_arg;
       
           apr_app_initialize(&argc, &argv, NULL);
           atexit(terminate);
      @@ -403,131 +332,90 @@ int main(int argc, const char * const argv[])
               apr_strerror(rv, errbuf, sizeof(errbuf));
               exit(1);
           }
      -    /*
      -     * Preliminary check to make sure they provided at least
      -     * three arguments, we'll do better argument checking as
      -     * we parse the command line.
      -     */
      -    if (argc < 3)
      -       htdbm_usage();
      -    /*
      -     * Go through the argument list and pick out any options.  They
      -     * have to precede any other arguments.
      -     */
      -    for (i = 1; i < argc; i++) {
      -        arg = argv[i];
      -        if (*arg != '-')
      -            break;
       
      -        while (*++arg != '\0') {
      -            switch (*arg) {
      -            case 'b':
      -                pwd_supplied = 1;
      -                need_pwd = 0;
      -                args_left++;
      -                break;
      -            case 'c':
      -                h->create = 1;
      -                break;
      -            case 'n':
      -                need_file = 0;
      -                cmd = HTDBM_NOFILE;
      -                    args_left--;
      -                break;
      -            case 'l':
      -                need_pwd = 0;
      -                need_user = 0;
      -                cmd = HTDBM_LIST;
      -                h->rdonly = 1;
      -                args_left--;
      -                break;
      -            case 't':
      -                need_cmnt = 1;
      -                args_left++;
      -                break;
      -            case 'T':
      -                h->type = apr_pstrdup(h->pool, ++arg);
      -                while (*arg != '\0')
      -                    ++arg;
      -                --arg; /* so incrementing this in the loop with find a null */
      -                break;
      -            case 'v':
      -                h->rdonly = 1;
      -                cmd = HTDBM_VERIFY;
      -                break;
      -            case 'x':
      -                need_pwd = 0;
      -                cmd = HTDBM_DELETE;
      -                break;
      -            case 'm':
      -                h->alg = ALG_APMD5;
      -                break;
      -            case 'p':
      -                h->alg = ALG_PLAIN;
      -                break;
      -            case 's':
      -                h->alg = ALG_APSHA;
      -                break;
      -#if (!(defined(WIN32) || defined(NETWARE)))
      -            case 'd':
      -                h->alg = ALG_CRYPT;
      -                break;
      -#endif
      -            default:
      -                htdbm_usage();
      -                break;
      +    rv = apr_getopt_init(&state, pool, argc, argv);
      +    if (rv != APR_SUCCESS)
      +        exit(ERR_SYNTAX);
      +
      +    while ((rv = apr_getopt(state, "cnmspdBbtivxlC:T:", &opt, &opt_arg)) == APR_SUCCESS) {
      +        switch (opt) {
      +        case 'c':
      +            h->create = 1;
      +            break;
      +        case 'n':
      +            need_file = 0;
      +            cmd = HTDBM_NOFILE;
      +            args_left--;
      +            break;
      +        case 'l':
      +            need_pwd = 0;
      +            need_user = 0;
      +            cmd = HTDBM_LIST;
      +            h->rdonly = 1;
      +            args_left--;
      +            break;
      +        case 't':
      +            need_cmnt = 1;
      +            args_left++;
      +            break;
      +        case 'T':
      +            h->type = apr_pstrdup(h->ctx.pool, opt_arg);
      +            break;
      +        case 'v':
      +            h->rdonly = 1;
      +            cmd = HTDBM_VERIFY;
      +            break;
      +        case 'x':
      +            need_pwd = 0;
      +            cmd = HTDBM_DELETE;
      +            break;
      +        default:
      +            ret = parse_common_options(&h->ctx, opt, opt_arg);
      +            if (ret) {
      +                fprintf(stderr, "Error: %s\n", h->ctx.errstr);
      +                exit(ret);
                   }
               }
           }
      +    if (h->ctx.passwd_src == PW_ARG) {
      +            need_pwd = 0;
      +            args_left++;
      +    }
           /*
            * Make sure we still have exactly the right number of arguments left
            * (the filename, the username, and possibly the password if -b was
            * specified).
            */
      -    if ((argc - i) != args_left)
      +    i = state->ind;
      +    if (rv != APR_EOF || argc - i != args_left)
               htdbm_usage();
       
      -    if (!need_file)
      -        i--;
      -    else {
      -        h->filename = apr_pstrdup(h->pool, argv[i]);
      -            if ((rv = htdbm_open(h)) != APR_SUCCESS) {
      -            fprintf(stderr, "Error opening database %s\n", argv[i]);
      +    if (need_file) {
      +        h->filename = apr_pstrdup(h->ctx.pool, argv[i++]);
      +        if ((rv = htdbm_open(h)) != APR_SUCCESS) {
      +            fprintf(stderr, "Error opening database %s\n", h->filename);
                   apr_strerror(rv, errbuf, sizeof(errbuf));
                   fprintf(stderr,"%s\n",errbuf);
                   exit(ERR_FILEPERM);
               }
           }
           if (need_user) {
      -        h->username = apr_pstrdup(pool, argv[i+1]);
      +        h->username = apr_pstrdup(pool, argv[i++]);
               if (htdbm_valid_username(h) != APR_SUCCESS)
                   exit(ERR_BADUSER);
           }
      -    if (pwd_supplied)
      -        h->userpass = apr_pstrdup(pool, argv[i+2]);
      +    if (h->ctx.passwd_src == PW_ARG)
      +        h->ctx.passwd = apr_pstrdup(pool, argv[i++]);
       
           if (need_pwd) {
      -        l = sizeof(pwc);
      -        if (apr_password_get("Enter password        : ", pwi, &l) != APR_SUCCESS) {
      -            fprintf(stderr, "Password too long\n");
      -            exit(ERR_OVERFLOW);
      -        }
      -        l = sizeof(pwc);
      -        if (apr_password_get("Re-type password      : ", pwc, &l) != APR_SUCCESS) {
      -            fprintf(stderr, "Password too long\n");
      -            exit(ERR_OVERFLOW);
      -        }
      -        if (strcmp(pwi, pwc) != 0) {
      -            fprintf(stderr, "Password verification error\n");
      -            exit(ERR_PWMISMATCH);
      +        ret = get_password(&h->ctx);
      +        if (ret) {
      +            fprintf(stderr, "Error: %s\n", h->ctx.errstr);
      +            exit(ret);
               }
      -
      -        h->userpass = apr_pstrdup(pool,  pwi);
           }
      -    if (need_cmnt && pwd_supplied)
      -        h->comment = apr_pstrdup(pool, argv[i+3]);
      -    else if (need_cmnt)
      -        h->comment = apr_pstrdup(pool, argv[i+2]);
      +    if (need_cmnt)
      +        h->comment = apr_pstrdup(pool, argv[i++]);
       
           switch (cmd) {
               case HTDBM_VERIFY:
      @@ -556,9 +444,10 @@ int main(int argc, const char * const argv[])
                   htdbm_list(h);
                   break;
               default:
      -            htdbm_make(h);
      +            ret = htdbm_make(h);
      +            if (ret)
      +                exit(ret);
                   break;
      -
           }
           if (need_file && !h->rdonly) {
               if ((rv = htdbm_save(h, &changed)) != APR_SUCCESS) {
      @@ -570,10 +459,10 @@ int main(int argc, const char * const argv[])
           }
           if (cmd == HTDBM_NOFILE) {
               if (!need_cmnt) {
      -            fprintf(stderr, "%s:%s\n", h->username, h->userpass);
      +            fprintf(stderr, "%s:%s\n", h->username, h->ctx.passwd);
               }
               else {
      -            fprintf(stderr, "%s:%s:%s\n", h->username, h->userpass,
      +            fprintf(stderr, "%s:%s:%s\n", h->username, h->ctx.passwd,
                           h->comment);
               }
           }
      diff --git a/support/htdbm.dep b/support/htdbm.dep
      new file mode 100644
      index 00000000000..c6b60d897d0
      --- /dev/null
      +++ b/support/htdbm.dep
      @@ -0,0 +1,58 @@
      +# Microsoft Developer Studio Generated Dependency File, included by htdbm.mak
      +
      +.\htdbm.c : \
      +	"..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr-util\include\apu_version.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_version.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	".\passwd_common.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      +
      +.\passwd_common.c : \
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr-util\include\apu_version.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_version.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	".\passwd_common.h"\
      +	
      diff --git a/support/htdbm.dsp b/support/htdbm.dsp
      index e6864072e76..c1d5494a998 100644
      --- a/support/htdbm.dsp
      +++ b/support/htdbm.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib rpcrt4.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\htdbm.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\htdbm.exe
       SOURCE="$(InputPath)"
      @@ -100,6 +100,10 @@ SOURCE=.\htdbm.c
       # End Source File
       # Begin Source File
       
      +SOURCE=.\passwd_common.c
      +# End Source File
      +# Begin Source File
      +
       SOURCE=..\build\win32\httpd.rc
       # End Source File
       # End Target
      diff --git a/support/htdbm.mak b/support/htdbm.mak
      new file mode 100644
      index 00000000000..f4379f72f2b
      --- /dev/null
      +++ b/support/htdbm.mak
      @@ -0,0 +1,326 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on htdbm.dsp
      +!IF "$(CFG)" == ""
      +CFG=htdbm - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to htdbm - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "htdbm - Win32 Release" && "$(CFG)" != "htdbm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "htdbm.mak" CFG="htdbm - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "htdbm - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "htdbm - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htdbm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htdbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\htdbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htdbm.obj"
      +	-@erase "$(INTDIR)\htdbm.res"
      +	-@erase "$(INTDIR)\htdbm_src.idb"
      +	-@erase "$(INTDIR)\htdbm_src.pdb"
      +	-@erase "$(INTDIR)\passwd_common.obj"
      +	-@erase "$(OUTDIR)\htdbm.exe"
      +	-@erase "$(OUTDIR)\htdbm.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htdbm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htdbm.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htdbm.exe" /d LONG_NAME="Apache htdbm command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htdbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htdbm.pdb" /debug /out:"$(OUTDIR)\htdbm.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htdbm.obj" \
      +	"$(INTDIR)\passwd_common.obj" \
      +	"$(INTDIR)\htdbm.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\htdbm.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\htdbm.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htdbm.exe"
      +   if exist .\Release\htdbm.exe.manifest mt.exe -manifest .\Release\htdbm.exe.manifest -outputresource:.\Release\htdbm.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "htdbm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htdbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\htdbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htdbm.obj"
      +	-@erase "$(INTDIR)\htdbm.res"
      +	-@erase "$(INTDIR)\htdbm_src.idb"
      +	-@erase "$(INTDIR)\htdbm_src.pdb"
      +	-@erase "$(INTDIR)\passwd_common.obj"
      +	-@erase "$(OUTDIR)\htdbm.exe"
      +	-@erase "$(OUTDIR)\htdbm.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htdbm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htdbm.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htdbm.exe" /d LONG_NAME="Apache htdbm command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htdbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htdbm.pdb" /debug /out:"$(OUTDIR)\htdbm.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htdbm.obj" \
      +	"$(INTDIR)\passwd_common.obj" \
      +	"$(INTDIR)\htdbm.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\htdbm.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\htdbm.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htdbm.exe"
      +   if exist .\Debug\htdbm.exe.manifest mt.exe -manifest .\Debug\htdbm.exe.manifest -outputresource:.\Debug\htdbm.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("htdbm.dep")
      +!INCLUDE "htdbm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "htdbm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "htdbm - Win32 Release" || "$(CFG)" == "htdbm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "htdbm - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htdbm - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htdbm - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htdbm - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\htdbm.c
      +
      +"$(INTDIR)\htdbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "htdbm - Win32 Release"
      +
      +
      +"$(INTDIR)\htdbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htdbm.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htdbm.exe" /d LONG_NAME="Apache htdbm command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "htdbm - Win32 Debug"
      +
      +
      +"$(INTDIR)\htdbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htdbm.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htdbm.exe" /d LONG_NAME="Apache htdbm command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\passwd_common.c
      +
      +"$(INTDIR)\passwd_common.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/htdigest.c b/support/htdigest.c
      index 6a0e26f123f..972fa82d209 100644
      --- a/support/htdigest.c
      +++ b/support/htdigest.c
      @@ -92,16 +92,19 @@ static void getword(char *word, char *line, char stop)
       
       static int get_line(char *s, int n, apr_file_t *f)
       {
      -    register int i = 0;
      +    int i = 0;
           char ch;
           apr_status_t rv = APR_EINVAL;
       
      -    while (i < (n - 1) &&
      +    /* we need 2 remaining bytes in buffer */
      +    while (i < (n - 2) &&
                  ((rv = apr_file_getc(&ch, f)) == APR_SUCCESS) && (ch != '\n')) {
               s[i++] = ch;
           }
      +    /* First remaining byte potentially used here */
           if (ch == '\n')
               s[i++] = ch;
      +    /* Second remaining byte used here */
           s[i] = '\0';
       
           if (rv != APR_SUCCESS)
      @@ -202,8 +205,8 @@ int main(int argc, const char * const argv[])
       #if APR_CHARSET_EBCDIC
           rv = apr_xlate_open(&to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, cntxt);
           if (rv) {
      -        apr_file_printf(errfile, "apr_xlate_open(): %s (%d)\n",
      -                apr_strerror(rv, line, sizeof(line)), rv);
      +        apr_file_printf(errfile, "apr_xlate_open(): %pm (%d)\n",
      +                &rv, rv);
               exit(1);
           }
       #endif
      @@ -215,11 +218,8 @@ int main(int argc, const char * const argv[])
               rv = apr_file_open(&f, argv[2], APR_WRITE | APR_CREATE,
                                  APR_OS_DEFAULT, cntxt);
               if (rv != APR_SUCCESS) {
      -            char errmsg[120];
      -
      -            apr_file_printf(errfile, "Could not open passwd file %s for writing: %s\n",
      -                    argv[2],
      -                    apr_strerror(rv, errmsg, sizeof errmsg));
      +            apr_file_printf(errfile, "Could not open passwd file %s for writing: %pm\n",
      +                    argv[2], &rv);
                   exit(1);
               }
               apr_cpystrn(user, argv[4], sizeof(user));
      diff --git a/support/htdigest.dep b/support/htdigest.dep
      new file mode 100644
      index 00000000000..2bde4ac3c0f
      --- /dev/null
      +++ b/support/htdigest.dep
      @@ -0,0 +1,27 @@
      +# Microsoft Developer Studio Generated Dependency File, included by htdigest.mak
      +
      +.\htdigest.c : \
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      diff --git a/support/htdigest.dsp b/support/htdigest.dsp
      index 63c23baf00d..bc3cffe76f9 100644
      --- a/support/htdigest.dsp
      +++ b/support/htdigest.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\htdigest.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\htdigest.exe
       SOURCE="$(InputPath)"
      diff --git a/support/htdigest.mak b/support/htdigest.mak
      new file mode 100644
      index 00000000000..acccd235ad4
      --- /dev/null
      +++ b/support/htdigest.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on htdigest.dsp
      +!IF "$(CFG)" == ""
      +CFG=htdigest - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to htdigest - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "htdigest - Win32 Release" && "$(CFG)" != "htdigest - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "htdigest.mak" CFG="htdigest - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "htdigest - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "htdigest - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htdigest - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htdigest.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\htdigest.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htdigest.obj"
      +	-@erase "$(INTDIR)\htdigest.res"
      +	-@erase "$(INTDIR)\htdigest_src.idb"
      +	-@erase "$(INTDIR)\htdigest_src.pdb"
      +	-@erase "$(OUTDIR)\htdigest.exe"
      +	-@erase "$(OUTDIR)\htdigest.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htdigest_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htdigest.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htdigest.exe" /d LONG_NAME="Apache htdigest command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htdigest.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htdigest.pdb" /debug /out:"$(OUTDIR)\htdigest.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htdigest.obj" \
      +	"$(INTDIR)\htdigest.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\htdigest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\htdigest.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htdigest.exe"
      +   if exist .\Release\htdigest.exe.manifest mt.exe -manifest .\Release\htdigest.exe.manifest -outputresource:.\Release\htdigest.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "htdigest - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htdigest.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\htdigest.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htdigest.obj"
      +	-@erase "$(INTDIR)\htdigest.res"
      +	-@erase "$(INTDIR)\htdigest_src.idb"
      +	-@erase "$(INTDIR)\htdigest_src.pdb"
      +	-@erase "$(OUTDIR)\htdigest.exe"
      +	-@erase "$(OUTDIR)\htdigest.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htdigest_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htdigest.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htdigest.exe" /d LONG_NAME="Apache htdigest command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htdigest.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htdigest.pdb" /debug /out:"$(OUTDIR)\htdigest.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htdigest.obj" \
      +	"$(INTDIR)\htdigest.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\htdigest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\htdigest.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htdigest.exe"
      +   if exist .\Debug\htdigest.exe.manifest mt.exe -manifest .\Debug\htdigest.exe.manifest -outputresource:.\Debug\htdigest.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("htdigest.dep")
      +!INCLUDE "htdigest.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "htdigest.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "htdigest - Win32 Release" || "$(CFG)" == "htdigest - Win32 Debug"
      +
      +!IF  "$(CFG)" == "htdigest - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htdigest - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htdigest - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htdigest - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\htdigest.c
      +
      +"$(INTDIR)\htdigest.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "htdigest - Win32 Release"
      +
      +
      +"$(INTDIR)\htdigest.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htdigest.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htdigest.exe" /d LONG_NAME="Apache htdigest command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "htdigest - Win32 Debug"
      +
      +
      +"$(INTDIR)\htdigest.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htdigest.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htdigest.exe" /d LONG_NAME="Apache htdigest command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +
      +!ENDIF 
      +
      diff --git a/support/htpasswd.c b/support/htpasswd.c
      index f67076fffc6..11023499a47 100644
      --- a/support/htpasswd.c
      +++ b/support/htpasswd.c
      @@ -38,13 +38,9 @@
        *  7: Failure; file is not a valid htpasswd file
        */
       
      -#include "apr.h"
      -#include "apr_lib.h"
      -#include "apr_strings.h"
      -#include "apr_errno.h"
      -#include "apr_file_io.h"
      -#include "apr_general.h"
      +#include "passwd_common.h"
       #include "apr_signal.h"
      +#include "apr_getopt.h"
       
       #if APR_HAVE_STDIO_H
       #include <stdio.h>
      @@ -52,11 +48,7 @@
       
       #include "apr_md5.h"
       #include "apr_sha1.h"
      -#include <time.h>
       
      -#if APR_HAVE_CRYPT_H
      -#include <crypt.h>
      -#endif
       #if APR_HAVE_STDLIB_H
       #include <stdlib.h>
       #endif
      @@ -72,217 +64,60 @@
       #define unlink _unlink
       #endif
       
      -#if !APR_CHARSET_EBCDIC
      -#define LF 10
      -#define CR 13
      -#else /*APR_CHARSET_EBCDIC*/
      -#define LF '\n'
      -#define CR '\r'
      -#endif /*APR_CHARSET_EBCDIC*/
      -
      -#define MAX_STRING_LEN 256
      -#define ALG_PLAIN 0
      -#define ALG_CRYPT 1
      -#define ALG_APMD5 2
      -#define ALG_APSHA 3
      -
      -#define ERR_FILEPERM 1
      -#define ERR_SYNTAX 2
      -#define ERR_PWMISMATCH 3
      -#define ERR_INTERRUPTED 4
      -#define ERR_OVERFLOW 5
      -#define ERR_BADUSER 6
      -#define ERR_INVALID 7
      -
       #define APHTP_NEWFILE        1
       #define APHTP_NOFILE         2
      -#define APHTP_NONINTERACTIVE 4
      -#define APHTP_DELUSER        8
      +#define APHTP_DELUSER        4
      +#define APHTP_VERIFY         8
       
      -apr_file_t *errfile;
       apr_file_t *ftemp = NULL;
       
      -#define NL APR_EOL_STR
      -
      -#if defined(WIN32) || defined(NETWARE)
      -#define CRYPT_ALGO_SUPPORTED 0
      -#else
      -#define CRYPT_ALGO_SUPPORTED 1
      -#endif
      -
      -#if CRYPT_ALGO_SUPPORTED
      -static void to64(char *s, unsigned long v, int n)
      +static int mkrecord(struct passwd_ctx *ctx, char *user)
       {
      -    static unsigned char itoa64[] =         /* 0 ... 63 => ASCII - 64 */
      -        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      -
      -    while (--n >= 0) {
      -        *s++ = itoa64[v&0x3f];
      -        v >>= 6;
      -    }
      -}
      -#endif
      -
      -static void generate_salt(char *s, size_t size)
      -{
      -    static unsigned char tbl[] =
      -        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      -    size_t i;
      -    for (i = 0; i < size; ++i) {
      -        int idx = (int) (64.0 * rand() / (RAND_MAX + 1.0));
      -        s[i] = tbl[idx];
      -    }
      -}
      -
      -static apr_status_t seed_rand(void)
      -{
      -    int seed = 0;
      -    apr_status_t rv;
      -    rv = apr_generate_random_bytes((unsigned char*) &seed, sizeof(seed));
      -    if (rv) {
      -        apr_file_printf(errfile, "Unable to generate random bytes: %pm" NL, &rv);
      -        return rv;
      -    }
      -    srand(seed);
      -    return rv;
      -}
      -
      -static void putline(apr_file_t *f, const char *l)
      -{
      -    apr_status_t rc;
      -    rc = apr_file_puts(l, f);
      -    if (rc != APR_SUCCESS) {
      -        char errstr[MAX_STRING_LEN];
      -        apr_strerror(rc, errstr, MAX_STRING_LEN);
      -        apr_file_printf(errfile, "Error writing temp file: %s" NL, errstr);
      -        apr_file_close(f);
      -        exit(ERR_FILEPERM);
      -    }
      -}
      -
      -/*
      - * Make a password record from the given information.  A zero return
      - * indicates success; failure means that the output buffer contains an
      - * error message instead.
      - */
      -static int mkrecord(char *user, char *record, apr_size_t rlen, char *passwd,
      -                    int alg)
      -{
      -    char *pw;
      -    char cpw[120];
      -    char pwin[MAX_STRING_LEN];
      -    char pwv[MAX_STRING_LEN];
      -    char salt[9];
      -    apr_size_t bufsize;
      -
      -    if (passwd != NULL) {
      -        pw = passwd;
      -    }
      -    else {
      -        bufsize = sizeof(pwin);
      -        if (apr_password_get("New password: ", pwin, &bufsize) != 0) {
      -            apr_snprintf(record, (rlen - 1), "password too long (>%"
      -                         APR_SIZE_T_FMT ")", sizeof(pwin) - 1);
      -            return ERR_OVERFLOW;
      -        }
      -        bufsize = sizeof(pwv);
      -        apr_password_get("Re-type new password: ", pwv, &bufsize);
      -        if (strcmp(pwin, pwv) != 0) {
      -            apr_cpystrn(record, "password verification error", (rlen - 1));
      -            return ERR_PWMISMATCH;
      -        }
      -        pw = pwin;
      -        memset(pwv, '\0', sizeof(pwin));
      -    }
      -    switch (alg) {
      -
      -    case ALG_APSHA:
      -        /* XXX cpw >= 28 + strlen(sha1) chars - fixed len SHA */
      -        apr_sha1_base64(pw,strlen(pw),cpw);
      -        break;
      -
      -    case ALG_APMD5:
      -        if (seed_rand()) {
      -            break;
      -        }
      -        generate_salt(&salt[0], 8);
      -        salt[8] = '\0';
      -
      -        apr_md5_encode((const char *)pw, (const char *)salt,
      -                     cpw, sizeof(cpw));
      -        break;
      -
      -    case ALG_PLAIN:
      -        /* XXX this len limitation is not in sync with any HTTPd len. */
      -        apr_cpystrn(cpw,pw,sizeof(cpw));
      -        break;
      -
      -#if CRYPT_ALGO_SUPPORTED
      -    case ALG_CRYPT:
      -    default:
      -        if (seed_rand()) {
      -            break;
      -        }
      -        to64(&salt[0], rand(), 8);
      -        salt[8] = '\0';
      -
      -        apr_cpystrn(cpw, crypt(pw, salt), sizeof(cpw) - 1);
      -        if (strlen(pw) > 8) {
      -            char *truncpw = strdup(pw);
      -            truncpw[8] = '\0';
      -            if (!strcmp(cpw, crypt(truncpw, salt))) {
      -                apr_file_printf(errfile, "Warning: Password truncated to 8 characters "
      -                                "by CRYPT algorithm." NL);
      -            }
      -            free(truncpw);
      -        }
      -        break;
      -#endif /* CRYPT_ALGO_SUPPORTED */
      -    }
      -    memset(pw, '\0', strlen(pw));
      -
      -    /*
      -     * Check to see if the buffer is large enough to hold the username,
      -     * hash, and delimiters.
      -     */
      -    if ((strlen(user) + 1 + strlen(cpw)) > (rlen - 1)) {
      -        apr_cpystrn(record, "resultant record too long", (rlen - 1));
      +    char hash_str[MAX_STRING_LEN];
      +    int ret;
      +    ctx->out = hash_str;
      +    ctx->out_len = sizeof(hash_str);
      +
      +    ret = mkhash(ctx);
      +    if (ret)
      +        return ret;
      +
      +    ctx->out = apr_pstrcat(ctx->pool, user, ":", hash_str, NL, NULL);
      +    if (strlen(ctx->out) >= MAX_STRING_LEN) {
      +        ctx->errstr = "resultant record too long";
               return ERR_OVERFLOW;
           }
      -    strcpy(record, user);
      -    strcat(record, ":");
      -    strcat(record, cpw);
      -    strcat(record, "\n");
           return 0;
       }
       
       static void usage(void)
       {
      -    apr_file_printf(errfile, "Usage:" NL);
      -    apr_file_printf(errfile, "\thtpasswd [-cmdpsD] passwordfile username" NL);
      -    apr_file_printf(errfile, "\thtpasswd -b[cmdpsD] passwordfile username "
      -                    "password" NL NL);
      -    apr_file_printf(errfile, "\thtpasswd -n[mdps] username" NL);
      -    apr_file_printf(errfile, "\thtpasswd -nb[mdps] username password" NL);
      -    apr_file_printf(errfile, " -c  Create a new file." NL);
      -    apr_file_printf(errfile, " -n  Don't update file; display results on "
      -                    "stdout." NL);
      -    apr_file_printf(errfile, " -m  Force MD5 encryption of the password"
      -        " (default)"
      -        "." NL);
      -    apr_file_printf(errfile, " -d  Force CRYPT encryption of the password"
      -            "." NL);
      -    apr_file_printf(errfile, " -p  Do not encrypt the password (plaintext)." NL);
      -    apr_file_printf(errfile, " -s  Force SHA encryption of the password." NL);
      -    apr_file_printf(errfile, " -b  Use the password from the command line "
      -            "rather than prompting for it." NL);
      -    apr_file_printf(errfile, " -D  Delete the specified user." NL);
      -    apr_file_printf(errfile,
      -            "On other systems than Windows and NetWare the '-p' flag will "
      -            "probably not work." NL);
      -    apr_file_printf(errfile,
      -            "The SHA algorithm does not use a salt and is less secure than "
      -            "the MD5 algorithm." NL);
      +    apr_file_printf(errfile, "Usage:" NL
      +        "\thtpasswd [-cimBdpsDv] [-C cost] passwordfile username" NL
      +        "\thtpasswd -b[cmBdpsDv] [-C cost] passwordfile username password" NL
      +        NL
      +        "\thtpasswd -n[imBdps] [-C cost] username" NL
      +        "\thtpasswd -nb[mBdps] [-C cost] username password" NL
      +        " -c  Create a new file." NL
      +        " -n  Don't update file; display results on stdout." NL
      +        " -b  Use the password from the command line rather than prompting "
      +            "for it." NL
      +        " -i  Read password from stdin without verification (for script usage)." NL
      +        " -m  Force MD5 encryption of the password (default)." NL
      +        " -B  Force bcrypt encryption of the password (very secure)." NL
      +        " -C  Set the computing time used for the bcrypt algorithm" NL
      +        "     (higher is more secure but slower, default: %d, valid: 4 to 31)." NL
      +        " -d  Force CRYPT encryption of the password (8 chars max, insecure)." NL
      +        " -s  Force SHA encryption of the password (insecure)." NL
      +        " -p  Do not encrypt the password (plaintext, insecure)." NL
      +        " -D  Delete the specified user." NL
      +        " -v  Verify password for the specified user." NL
      +        "On other systems than Windows and NetWare the '-p' flag will "
      +            "probably not work." NL
      +        "The SHA algorithm does not use a salt and is less secure than the "
      +            "MD5 algorithm." NL,
      +        BCRYPT_DEFAULT_COST
      +    );
           exit(ERR_SYNTAX);
       }
       
      @@ -321,115 +156,115 @@ static void terminate(void)
       #endif
       }
       
      -static void check_args(apr_pool_t *pool, int argc, const char *const argv[],
      -                       int *alg, int *mask, char **user, char **pwfilename,
      -                       char **password)
      +static void check_args(int argc, const char *const argv[],
      +                       struct passwd_ctx *ctx, unsigned *mask, char **user,
      +                       char **pwfilename)
       {
           const char *arg;
           int args_left = 2;
      -    int i;
      +    int i, ret;
      +    apr_getopt_t *state;
      +    apr_status_t rv;
      +    char opt;
      +    const char *opt_arg;
      +    apr_pool_t *pool = ctx->pool;
       
      -    /*
      -     * Preliminary check to make sure they provided at least
      -     * three arguments, we'll do better argument checking as
      -     * we parse the command line.
      -     */
      -    if (argc < 3) {
      -        usage();
      -    }
      +    rv = apr_getopt_init(&state, pool, argc, argv);
      +    if (rv != APR_SUCCESS)
      +        exit(ERR_SYNTAX);
       
      -    /*
      -     * Go through the argument list and pick out any options.  They
      -     * have to precede any other arguments.
      -     */
      -    for (i = 1; i < argc; i++) {
      -        arg = argv[i];
      -        if (*arg != '-') {
      +    while ((rv = apr_getopt(state, "cnmspdBbDiC:v", &opt, &opt_arg)) == APR_SUCCESS) {
      +        switch (opt) {
      +        case 'c':
      +            *mask |= APHTP_NEWFILE;
                   break;
      -        }
      -        while (*++arg != '\0') {
      -            if (*arg == 'c') {
      -                *mask |= APHTP_NEWFILE;
      -            }
      -            else if (*arg == 'n') {
      -                *mask |= APHTP_NOFILE;
      -                args_left--;
      -            }
      -            else if (*arg == 'm') {
      -                *alg = ALG_APMD5;
      -            }
      -            else if (*arg == 's') {
      -                *alg = ALG_APSHA;
      -            }
      -            else if (*arg == 'p') {
      -                *alg = ALG_PLAIN;
      -            }
      -            else if (*arg == 'd') {
      -                *alg = ALG_CRYPT;
      -            }
      -            else if (*arg == 'b') {
      -                *mask |= APHTP_NONINTERACTIVE;
      -                args_left++;
      -            }
      -            else if (*arg == 'D') {
      -                *mask |= APHTP_DELUSER;
      -            }
      -            else {
      -                usage();
      +        case 'n':
      +            args_left--;
      +            *mask |= APHTP_NOFILE;
      +            break;
      +        case 'D':
      +            *mask |= APHTP_DELUSER;
      +            break;
      +        case 'v':
      +            *mask |= APHTP_VERIFY;
      +            break;
      +        default:
      +            ret = parse_common_options(ctx, opt, opt_arg);
      +            if (ret) {
      +                apr_file_printf(errfile, "%s: %s" NL, argv[0], ctx->errstr);
      +                exit(ret);
                   }
               }
           }
      +    if (ctx->passwd_src == PW_ARG)
      +        args_left++;
      +    if (rv != APR_EOF)
      +        usage();
       
      -    if ((*mask & APHTP_NEWFILE) && (*mask & APHTP_NOFILE)) {
      -        apr_file_printf(errfile, "%s: -c and -n options conflict" NL, argv[0]);
      -        exit(ERR_SYNTAX);
      -    }
      -    if ((*mask & APHTP_NEWFILE) && (*mask & APHTP_DELUSER)) {
      -        apr_file_printf(errfile, "%s: -c and -D options conflict" NL, argv[0]);
      -        exit(ERR_SYNTAX);
      -    }
      -    if ((*mask & APHTP_NOFILE) && (*mask & APHTP_DELUSER)) {
      -        apr_file_printf(errfile, "%s: -n and -D options conflict" NL, argv[0]);
      +    if ((*mask) & (*mask - 1)) {
      +        /* not a power of two, i.e. more than one flag specified */
      +        apr_file_printf(errfile, "%s: only one of -c -n -v -D may be specified" NL,
      +            argv[0]);
               exit(ERR_SYNTAX);
           }
      +    if ((*mask & APHTP_VERIFY) && ctx->passwd_src == PW_PROMPT)
      +        ctx->passwd_src = PW_PROMPT_VERIFY;
      +
           /*
            * Make sure we still have exactly the right number of arguments left
            * (the filename, the username, and possibly the password if -b was
            * specified).
            */
      +    i = state->ind;
           if ((argc - i) != args_left) {
               usage();
           }
       
      -    if (*mask & APHTP_NOFILE) {
      -        i--;
      -    }
      -    else {
      +    if (!(*mask & APHTP_NOFILE)) {
               if (strlen(argv[i]) > (APR_PATH_MAX - 1)) {
                   apr_file_printf(errfile, "%s: filename too long" NL, argv[0]);
                   exit(ERR_OVERFLOW);
               }
      -        *pwfilename = apr_pstrdup(pool, argv[i]);
      -        if (strlen(argv[i + 1]) > (MAX_STRING_LEN - 1)) {
      -            apr_file_printf(errfile, "%s: username too long (> %d)" NL,
      -                argv[0], MAX_STRING_LEN - 1);
      -            exit(ERR_OVERFLOW);
      -        }
      +        *pwfilename = apr_pstrdup(pool, argv[i++]);
           }
      -    *user = apr_pstrdup(pool, argv[i + 1]);
      +    if (strlen(argv[i]) > (MAX_STRING_LEN - 1)) {
      +        apr_file_printf(errfile, "%s: username too long (> %d)" NL,
      +                        argv[0], MAX_STRING_LEN - 1);
      +        exit(ERR_OVERFLOW);
      +    }
      +    *user = apr_pstrdup(pool, argv[i++]);
           if ((arg = strchr(*user, ':')) != NULL) {
               apr_file_printf(errfile, "%s: username contains illegal "
                               "character '%c'" NL, argv[0], *arg);
               exit(ERR_BADUSER);
           }
      -    if (*mask & APHTP_NONINTERACTIVE) {
      -        if (strlen(argv[i + 2]) > (MAX_STRING_LEN - 1)) {
      +    if (ctx->passwd_src == PW_ARG) {
      +        if (strlen(argv[i]) > (MAX_STRING_LEN - 1)) {
                   apr_file_printf(errfile, "%s: password too long (> %d)" NL,
                       argv[0], MAX_STRING_LEN);
                   exit(ERR_OVERFLOW);
               }
      -        *password = apr_pstrdup(pool, argv[i + 2]);
      +        ctx->passwd = apr_pstrdup(pool, argv[i]);
      +    }
      +}
      +
      +static int verify(struct passwd_ctx *ctx, const char *hash)
      +{
      +    apr_status_t rv;
      +    int ret;
      +
      +    if (ctx->passwd == NULL && (ret = get_password(ctx)) != 0)
      +       return ret;
      +    rv = apr_password_validate(ctx->passwd, hash);
      +    if (rv == APR_SUCCESS)
      +        return 0;
      +    if (APR_STATUS_IS_EMISMATCH(rv)) {
      +        ctx->errstr = "password verification failed";
      +        return ERR_PWMISMATCH;
           }
      +    ctx->errstr = apr_psprintf(ctx->pool, "Could not verify password: %pm",
      +                               &rv);
      +    return ERR_GENERAL;
       }
       
       /*
      @@ -439,9 +274,7 @@ static void check_args(apr_pool_t *pool, int argc, const char *const argv[],
       int main(int argc, const char * const argv[])
       {
           apr_file_t *fpw = NULL;
      -    char record[MAX_STRING_LEN];
           char line[MAX_STRING_LEN];
      -    char *password = NULL;
           char *pwfilename = NULL;
           char *user = NULL;
           char tn[] = "htpasswd.tmp.XXXXXX";
      @@ -449,10 +282,10 @@ int main(int argc, const char * const argv[])
           char *scratch, cp[MAX_STRING_LEN];
           int found = 0;
           int i;
      -    int alg = ALG_APMD5;
      -    int mask = 0;
      +    unsigned mask = 0;
           apr_pool_t *pool;
           int existing_file = 0;
      +    struct passwd_ctx ctx = { 0 };
       #if APR_CHARSET_EBCDIC
           apr_status_t rv;
           apr_xlate_t *to_ascii;
      @@ -461,7 +294,10 @@ int main(int argc, const char * const argv[])
           apr_app_initialize(&argc, &argv, NULL);
           atexit(terminate);
           apr_pool_create(&pool, NULL);
      +    apr_pool_abort_set(abort_on_oom, pool);
           apr_file_open_stderr(&errfile, pool);
      +    ctx.pool = pool;
      +    ctx.alg = ALG_APMD5;
       
       #if APR_CHARSET_EBCDIC
           rv = apr_xlate_open(&to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, pool);
      @@ -481,22 +317,7 @@ int main(int argc, const char * const argv[])
           }
       #endif /*APR_CHARSET_EBCDIC*/
       
      -    check_args(pool, argc, argv, &alg, &mask, &user, &pwfilename, &password);
      -
      -
      -#if !CRYPT_ALGO_SUPPORTED
      -    if (alg == ALG_CRYPT) {
      -        alg = ALG_APMD5;
      -        apr_file_printf(errfile, "Automatically using MD5 format." NL);
      -    }
      -#endif
      -
      -#if CRYPT_ALGO_SUPPORTED
      -    if (alg == ALG_PLAIN) {
      -        apr_file_printf(errfile,"Warning: storing passwords as plain text "
      -                        "might just not work on this platform." NL);
      -    }
      -#endif
      +    check_args(argc, argv, &ctx, &mask, &user, &pwfilename);
       
           /*
            * Only do the file checks if we're supposed to frob it.
      @@ -507,7 +328,7 @@ int main(int argc, const char * const argv[])
                   /*
                    * Check that this existing file is readable and writable.
                    */
      -            if (!accessible(pool, pwfilename, APR_READ | APR_APPEND)) {
      +            if (!accessible(pool, pwfilename, APR_FOPEN_READ|APR_FOPEN_WRITE)) {
                       apr_file_printf(errfile, "%s: cannot open file %s for "
                                       "read/write access" NL, argv[0], pwfilename);
                       exit(ERR_FILEPERM);
      @@ -526,7 +347,7 @@ int main(int argc, const char * const argv[])
                   /*
                    * As it doesn't exist yet, verify that we can create it.
                    */
      -            if (!accessible(pool, pwfilename, APR_CREATE | APR_WRITE)) {
      +            if (!accessible(pool, pwfilename, APR_FOPEN_WRITE|APR_FOPEN_CREATE)) {
                       apr_file_printf(errfile, "%s: cannot create file %s" NL,
                                       argv[0], pwfilename);
                       exit(ERR_FILEPERM);
      @@ -541,34 +362,35 @@ int main(int argc, const char * const argv[])
            * Any error message text is returned in the record buffer, since
            * the mkrecord() routine doesn't have access to argv[].
            */
      -    if (!(mask & APHTP_DELUSER)) {
      -        i = mkrecord(user, record, sizeof(record) - 1,
      -                     password, alg);
      +    if ((mask & (APHTP_DELUSER|APHTP_VERIFY)) == 0) {
      +        i = mkrecord(&ctx, user);
               if (i != 0) {
      -            apr_file_printf(errfile, "%s: %s" NL, argv[0], record);
      +            apr_file_printf(errfile, "%s: %s" NL, argv[0], ctx.errstr);
                   exit(i);
               }
               if (mask & APHTP_NOFILE) {
      -            printf("%s" NL, record);
      +            printf("%s" NL, ctx.out);
                   exit(0);
               }
           }
       
      -    /*
      -     * We can access the files the right way, and we have a record
      -     * to add or update.  Let's do it..
      -     */
      -    if (apr_temp_dir_get((const char**)&dirname, pool) != APR_SUCCESS) {
      -        apr_file_printf(errfile, "%s: could not determine temp dir" NL,
      -                        argv[0]);
      -        exit(ERR_FILEPERM);
      -    }
      -    dirname = apr_psprintf(pool, "%s/%s", dirname, tn);
      +    if ((mask & APHTP_VERIFY) == 0) {
      +        /*
      +         * We can access the files the right way, and we have a record
      +         * to add or update.  Let's do it..
      +         */
      +        if (apr_temp_dir_get((const char**)&dirname, pool) != APR_SUCCESS) {
      +            apr_file_printf(errfile, "%s: could not determine temp dir" NL,
      +                            argv[0]);
      +            exit(ERR_FILEPERM);
      +        }
      +        dirname = apr_psprintf(pool, "%s/%s", dirname, tn);
       
      -    if (apr_file_mktemp(&ftemp, dirname, 0, pool) != APR_SUCCESS) {
      -        apr_file_printf(errfile, "%s: unable to create temporary file %s" NL,
      -                        argv[0], dirname);
      -        exit(ERR_FILEPERM);
      +        if (apr_file_mktemp(&ftemp, dirname, 0, pool) != APR_SUCCESS) {
      +            apr_file_printf(errfile, "%s: unable to create temporary file %s" NL,
      +                            argv[0], dirname);
      +            exit(ERR_FILEPERM);
      +        }
           }
       
           /*
      @@ -619,33 +441,59 @@ int main(int argc, const char * const argv[])
                       continue;
                   }
                   else {
      -                if (!(mask & APHTP_DELUSER)) {
      -                    /* We found the user we were looking for.
      -                     * Add him to the file.
      -                    */
      -                    apr_file_printf(errfile, "Updating ");
      -                    putline(ftemp, record);
      -                    found++;
      +                /* We found the user we were looking for */
      +                found++;
      +                if ((mask & APHTP_DELUSER)) {
      +                    /* Delete entry from the file */
      +                    apr_file_printf(errfile, "Deleting ");
      +                }
      +                else if ((mask & APHTP_VERIFY)) {
      +                    /* Verify */
      +                    char *hash = colon + 1;
      +                    size_t len;
      +
      +                    len = strcspn(hash, "\r\n");
      +                    if (len == 0) {
      +                        apr_file_printf(errfile, "Empty hash for user %s" NL,
      +                                        user);
      +                        exit(ERR_INVALID);
      +                    }
      +                    hash[len] = '\0';
      +
      +                    i = verify(&ctx, hash);
      +                    if (i != 0) {
      +                        apr_file_printf(errfile, "%s" NL, ctx.errstr);
      +                        exit(i);
      +                    }
                       }
                       else {
      -                    /* We found the user we were looking for.
      -                     * Delete them from the file.
      -                     */
      -                    apr_file_printf(errfile, "Deleting ");
      -                    found++;
      +                    /* Update entry */
      +                    apr_file_printf(errfile, "Updating ");
      +                    putline(ftemp, ctx.out);
                       }
                   }
               }
               apr_file_close(fpw);
           }
      -    if (!found && !(mask & APHTP_DELUSER)) {
      -        apr_file_printf(errfile, "Adding ");
      -        putline(ftemp, record);
      +    if (!found) {
      +        if (mask & APHTP_DELUSER) {
      +            apr_file_printf(errfile, "User %s not found" NL, user);
      +            exit(0);
      +        }
      +        else if (mask & APHTP_VERIFY) {
      +            apr_file_printf(errfile, "User %s not found" NL, user);
      +            exit(ERR_BADUSER);
      +        }
      +        else {
      +            apr_file_printf(errfile, "Adding ");
      +            putline(ftemp, ctx.out);
      +        }
           }
      -    else if (!found && (mask & APHTP_DELUSER)) {
      -        apr_file_printf(errfile, "User %s not found" NL, user);
      +    if (mask & APHTP_VERIFY) {
      +        apr_file_printf(errfile, "Password for user %s correct." NL, user);
               exit(0);
           }
      +
           apr_file_printf(errfile, "password for user %s" NL, user);
       
           /* The temporary file has all the data, just copy it to the new location.
      diff --git a/support/htpasswd.dep b/support/htpasswd.dep
      new file mode 100644
      index 00000000000..6e3e4fada56
      --- /dev/null
      +++ b/support/htpasswd.dep
      @@ -0,0 +1,57 @@
      +# Microsoft Developer Studio Generated Dependency File, included by htpasswd.mak
      +
      +.\htpasswd.c : \
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr-util\include\apu_version.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_version.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	".\passwd_common.h"\
      +	
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      +
      +.\passwd_common.c : \
      +	"..\srclib\apr-util\include\apr_md5.h"\
      +	"..\srclib\apr-util\include\apr_sha1.h"\
      +	"..\srclib\apr-util\include\apr_xlate.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr-util\include\apu_version.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_version.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	".\passwd_common.h"\
      +	
      diff --git a/support/htpasswd.dsp b/support/htpasswd.dsp
      index 36a57259bed..b605669a4df 100644
      --- a/support/htpasswd.dsp
      +++ b/support/htpasswd.dsp
      @@ -100,6 +100,10 @@ SOURCE=.\htpasswd.c
       # End Source File
       # Begin Source File
       
      +SOURCE=.\passwd_common.c
      +# End Source File
      +# Begin Source File
      +
       SOURCE=..\build\win32\httpd.rc
       # End Source File
       # End Target
      diff --git a/support/htpasswd.mak b/support/htpasswd.mak
      new file mode 100644
      index 00000000000..a492324da2a
      --- /dev/null
      +++ b/support/htpasswd.mak
      @@ -0,0 +1,326 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on htpasswd.dsp
      +!IF "$(CFG)" == ""
      +CFG=htpasswd - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to htpasswd - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "htpasswd - Win32 Release" && "$(CFG)" != "htpasswd - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "htpasswd.mak" CFG="htpasswd - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "htpasswd - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "htpasswd - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htpasswd - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htpasswd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\htpasswd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htpasswd.obj"
      +	-@erase "$(INTDIR)\htpasswd.res"
      +	-@erase "$(INTDIR)\htpasswd_src.idb"
      +	-@erase "$(INTDIR)\htpasswd_src.pdb"
      +	-@erase "$(INTDIR)\passwd_common.obj"
      +	-@erase "$(OUTDIR)\htpasswd.exe"
      +	-@erase "$(OUTDIR)\htpasswd.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htpasswd_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htpasswd.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htpasswd.exe" /d LONG_NAME="Apache htpasswd command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htpasswd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib rpcrt4.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htpasswd.pdb" /debug /out:"$(OUTDIR)\htpasswd.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htpasswd.obj" \
      +	"$(INTDIR)\passwd_common.obj" \
      +	"$(INTDIR)\htpasswd.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\htpasswd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\htpasswd.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htpasswd.exe"
      +   if exist .\Release\htpasswd.exe.manifest mt.exe -manifest .\Release\htpasswd.exe.manifest -outputresource:.\Release\htpasswd.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "htpasswd - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\htpasswd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\htpasswd.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\htpasswd.obj"
      +	-@erase "$(INTDIR)\htpasswd.res"
      +	-@erase "$(INTDIR)\htpasswd_src.idb"
      +	-@erase "$(INTDIR)\htpasswd_src.pdb"
      +	-@erase "$(INTDIR)\passwd_common.obj"
      +	-@erase "$(OUTDIR)\htpasswd.exe"
      +	-@erase "$(OUTDIR)\htpasswd.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\htpasswd_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\htpasswd.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htpasswd.exe" /d LONG_NAME="Apache htpasswd command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\htpasswd.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib rpcrt4.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\htpasswd.pdb" /debug /out:"$(OUTDIR)\htpasswd.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\htpasswd.obj" \
      +	"$(INTDIR)\passwd_common.obj" \
      +	"$(INTDIR)\htpasswd.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\htpasswd.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\htpasswd.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\htpasswd.exe"
      +   if exist .\Debug\htpasswd.exe.manifest mt.exe -manifest .\Debug\htpasswd.exe.manifest -outputresource:.\Debug\htpasswd.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("htpasswd.dep")
      +!INCLUDE "htpasswd.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "htpasswd.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "htpasswd - Win32 Release" || "$(CFG)" == "htpasswd - Win32 Debug"
      +
      +!IF  "$(CFG)" == "htpasswd - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htpasswd - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "htpasswd - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "htpasswd - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=.\htpasswd.c
      +
      +"$(INTDIR)\htpasswd.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "htpasswd - Win32 Release"
      +
      +
      +"$(INTDIR)\htpasswd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htpasswd.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="htpasswd.exe" /d LONG_NAME="Apache htpasswd command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "htpasswd - Win32 Debug"
      +
      +
      +"$(INTDIR)\htpasswd.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\htpasswd.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="htpasswd.exe" /d LONG_NAME="Apache htpasswd command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\passwd_common.c
      +
      +"$(INTDIR)\passwd_common.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/httxt2dbm.c b/support/httxt2dbm.c
      index 8792f944b9d..387418bb96b 100644
      --- a/support/httxt2dbm.c
      +++ b/support/httxt2dbm.c
      @@ -39,7 +39,6 @@ static const char *output;
       static const char *format;
       static const char *shortname;
       static apr_file_t *errfile;
      -static char errbuf[120];
       static int verbose;
       
       /* From mod_rewrite.c */
      @@ -85,11 +84,11 @@ static void usage(void)
           "Usage: %s [-v] [-f format] -i SOURCE_TXT -o OUTPUT_DBM" NL
           NL
           "Options: " NL
      -    " -v    More verbose output"NL
      +    " -v    More verbose output" NL
           NL
      -    " -i    Source Text File. If '-', use stdin."NL
      +    " -i    Source Text File. If '-', use stdin." NL
           NL
      -    " -o    Output DBM."NL
      +    " -o    Output DBM." NL
           NL
           " -f    DBM Format.  If not specified, will use the APR Default." NL
           "           GDBM for GDBM files (%s)" NL
      @@ -138,7 +137,7 @@ static apr_status_t to_dbm(apr_dbm_t *dbm, apr_file_t *fp, apr_pool_t *pool)
               dbmkey.dptr = apr_pstrmemdup(p, line,  c - line);
               dbmkey.dsize = (c - line);
       
      -        while (*c && apr_isspace(*c)) {
      +        while (apr_isspace(*c)) {
                   ++c;
               }
       
      @@ -154,10 +153,10 @@ static apr_status_t to_dbm(apr_dbm_t *dbm, apr_file_t *fp, apr_pool_t *pool)
               }
       
               dbmval.dptr = apr_pstrmemdup(p, value,  c - value);
      -        dbmval.dsize = (c - line);
      +        dbmval.dsize = (c - value);
       
               if (verbose) {
      -            apr_file_printf(errfile, "    '%s' -> '%s'"NL,
      +            apr_file_printf(errfile, "    '%s' -> '%s'" NL,
                                   dbmkey.dptr, dbmval.dptr);
               }
       
      @@ -204,7 +203,7 @@ int main(int argc, const char *const argv[])
           rv = apr_getopt_init(&opt, pool, argc, argv);
       
           if (rv != APR_SUCCESS) {
      -        apr_file_printf(errfile, "Error: apr_getopt_init failed."NL NL);
      +        apr_file_printf(errfile, "Error: apr_getopt_init failed." NL NL);
               return 1;
           }
       
      @@ -273,7 +272,7 @@ int main(int argc, const char *const argv[])
           }
       
           if (verbose) {
      -        apr_file_printf(errfile, "DBM Format: %s"NL, format);
      +        apr_file_printf(errfile, "DBM Format: %s" NL, format);
           }
       
           if (!strcmp(input, "-")) {
      @@ -286,13 +285,13 @@ int main(int argc, const char *const argv[])
       
           if (rv != APR_SUCCESS) {
               apr_file_printf(errfile,
      -                        "Error: Cannot open input file '%s': (%d) %s" NL NL,
      -                         input, rv, apr_strerror(rv, errbuf, sizeof(errbuf)));
      +                        "Error: Cannot open input file '%s': (%d) %pm" NL NL,
      +                         input, rv, &rv);
               return 1;
           }
       
           if (verbose) {
      -        apr_file_printf(errfile, "Input File: %s"NL, input);
      +        apr_file_printf(errfile, "Input File: %s" NL, input);
           }
       
           rv = apr_dbm_open_ex(&outdbm, format, output, APR_DBM_RWCREATE,
      @@ -307,21 +306,21 @@ int main(int argc, const char *const argv[])
       
           if (rv != APR_SUCCESS) {
               apr_file_printf(errfile,
      -                        "Error: Cannot open output DBM '%s': (%d) %s" NL NL,
      -                         output, rv, apr_strerror(rv, errbuf, sizeof(errbuf)));
      +                        "Error: Cannot open output DBM '%s': (%d) %pm" NL NL,
      +                         output, rv, &rv);
               return 1;
           }
       
           if (verbose) {
      -        apr_file_printf(errfile, "DBM File: %s"NL, output);
      +        apr_file_printf(errfile, "DBM File: %s" NL, output);
           }
       
           rv = to_dbm(outdbm, infile, pool);
       
           if (rv != APR_SUCCESS) {
               apr_file_printf(errfile,
      -                        "Error: Converting to DBM: (%d) %s" NL NL,
      -                         rv, apr_strerror(rv, errbuf, sizeof(errbuf)));
      +                        "Error: Converting to DBM: (%d) %pm" NL NL,
      +                         rv, &rv);
               return 1;
           }
       
      diff --git a/support/httxt2dbm.dep b/support/httxt2dbm.dep
      new file mode 100644
      index 00000000000..b546ab4cc96
      --- /dev/null
      +++ b/support/httxt2dbm.dep
      @@ -0,0 +1,26 @@
      +# Microsoft Developer Studio Generated Dependency File, included by httxt2dbm.mak
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      +
      +.\httxt2dbm.c : \
      +	"..\srclib\apr-util\include\apr_dbm.h"\
      +	"..\srclib\apr-util\include\apu.h"\
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/support/httxt2dbm.dsp b/support/httxt2dbm.dsp
      index cba28a0b082..94ed525bfcd 100644
      --- a/support/httxt2dbm.dsp
      +++ b/support/httxt2dbm.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\httxt2dbm.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\httxt2dbm.exe
       SOURCE="$(InputPath)"
      diff --git a/support/httxt2dbm.mak b/support/httxt2dbm.mak
      new file mode 100644
      index 00000000000..615f0e91689
      --- /dev/null
      +++ b/support/httxt2dbm.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on httxt2dbm.dsp
      +!IF "$(CFG)" == ""
      +CFG=httxt2dbm - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to httxt2dbm - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "httxt2dbm - Win32 Release" && "$(CFG)" != "httxt2dbm - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "httxt2dbm.mak" CFG="httxt2dbm - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "httxt2dbm - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "httxt2dbm - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "httxt2dbm - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\httxt2dbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\httxt2dbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httxt2dbm.obj"
      +	-@erase "$(INTDIR)\httxt2dbm.res"
      +	-@erase "$(INTDIR)\httxt2dbm_src.idb"
      +	-@erase "$(INTDIR)\httxt2dbm_src.pdb"
      +	-@erase "$(OUTDIR)\httxt2dbm.exe"
      +	-@erase "$(OUTDIR)\httxt2dbm.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\httxt2dbm_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httxt2dbm.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="httxt2dbm.exe" /d LONG_NAME="Apache httxt2dbm command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\httxt2dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\httxt2dbm.pdb" /debug /out:"$(OUTDIR)\httxt2dbm.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\httxt2dbm.obj" \
      +	"$(INTDIR)\httxt2dbm.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\httxt2dbm.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\httxt2dbm.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\httxt2dbm.exe"
      +   if exist .\Release\httxt2dbm.exe.manifest mt.exe -manifest .\Release\httxt2dbm.exe.manifest -outputresource:.\Release\httxt2dbm.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "httxt2dbm - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\httxt2dbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\httxt2dbm.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\httxt2dbm.obj"
      +	-@erase "$(INTDIR)\httxt2dbm.res"
      +	-@erase "$(INTDIR)\httxt2dbm_src.idb"
      +	-@erase "$(INTDIR)\httxt2dbm_src.pdb"
      +	-@erase "$(OUTDIR)\httxt2dbm.exe"
      +	-@erase "$(OUTDIR)\httxt2dbm.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\httxt2dbm_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\httxt2dbm.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="httxt2dbm.exe" /d LONG_NAME="Apache httxt2dbm command line utility" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\httxt2dbm.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\httxt2dbm.pdb" /debug /out:"$(OUTDIR)\httxt2dbm.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\httxt2dbm.obj" \
      +	"$(INTDIR)\httxt2dbm.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\httxt2dbm.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\httxt2dbm.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\httxt2dbm.exe"
      +   if exist .\Debug\httxt2dbm.exe.manifest mt.exe -manifest .\Debug\httxt2dbm.exe.manifest -outputresource:.\Debug\httxt2dbm.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("httxt2dbm.dep")
      +!INCLUDE "httxt2dbm.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "httxt2dbm.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "httxt2dbm - Win32 Release" || "$(CFG)" == "httxt2dbm - Win32 Debug"
      +
      +!IF  "$(CFG)" == "httxt2dbm - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "httxt2dbm - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "httxt2dbm - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "httxt2dbm - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "httxt2dbm - Win32 Release"
      +
      +
      +"$(INTDIR)\httxt2dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httxt2dbm.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="httxt2dbm.exe" /d LONG_NAME="Apache httxt2dbm command line utility" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "httxt2dbm - Win32 Debug"
      +
      +
      +"$(INTDIR)\httxt2dbm.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\httxt2dbm.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="httxt2dbm.exe" /d LONG_NAME="Apache httxt2dbm command line utility" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\httxt2dbm.c
      +
      +"$(INTDIR)\httxt2dbm.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/log_server_status.in b/support/log_server_status.in
      index b788ab19136..ba08d7e571d 100644
      --- a/support/log_server_status.in
      +++ b/support/log_server_status.in
      @@ -25,54 +25,52 @@
       # it to a file.  Make sure the directory $wherelog is writable by the
       # user who runs this script.
       #
      -require 'sys/socket.ph';
      +use IO::Socket;
      +use strict;
      +use warnings;
       
      -$wherelog = "/var/log/graph/";  # Logs will be like "/var/log/graph/19960312"
      -$server = "localhost";          # Name of server, could be "www.foo.com"
      -$port = "80";                   # Port on server
      -$request = "/status/?auto";     # Request to send
      +my $wherelog = "@exp_logfiledir@/";  # Logs will be like "@exp_logfiledir@/19960312"
      +my $server   = "localhost";        # Name of server, could be "www.foo.com"
      +my $port     = "@PORT@";               # Port on server
      +my $request = "/server-status/?auto";    # Request to send
       
      -sub tcp_connect
      -{
      -	local($host,$port) =@_;
      -        $sockaddr='S n a4 x8';
      -        chop($hostname=`hostname`);
      -        $port=(getservbyname($port, 'tcp'))[2]  unless $port =~ /^\d+$/;
      -        $me=pack($sockaddr,&AF_INET,0,(gethostbyname($hostname))[4]);
      -        $them=pack($sockaddr,&AF_INET,$port,(gethostbyname($host))[4]);
      -        socket(S,&PF_INET,&SOCK_STREAM,(getprotobyname('tcp'))[2]) || 
      -		die "socket: $!";
      -        bind(S,$me) || return "bind: $!";
      -        connect(S,$them) || return "connect: $!";
      -        select(S); 
      -	$| = 1; 
      -	select(stdout);
      -	return "";
      -}
      +my @ltime = localtime(time);
       
      -### Main
      +my $day =
      +    $ltime[5] + 1900
      +  . sprintf( "%02d", $ltime[4] + 1 )
      +  . sprintf( "%02d", $ltime[3] );
       
      -{
      -        $year=`date +%y`;
      -	chomp($year);
      -	$year += ($year < 70) ? 2000 : 1900;
      -	$date = $year . `date +%m%d:%H%M%S`;
      -	chomp($date);
      -	($day,$time)=split(/:/,$date);
      -	$res=&tcp_connect($server,$port);
      -	open(OUT,">>$wherelog$day");
      -	if ($res) {
      -		print OUT "$time:-1:-1:-1:-1:$res\n";
      -		exit 1;
      -	}
      -	print S "GET $request\n";
      -	while (<S>) {
      -		$requests=$1 if ( m|^BusyServers:\ (\S+)|);
      -		$idle=$1 if ( m|^IdleServers:\ (\S+)|);
      -		$number=$1 if ( m|sses:\ (\S+)|);
      -		$cpu=$1 if (m|^CPULoad:\ (\S+)|);
      -	}
      -	print OUT "$time:$requests:$idle:$number:$cpu\n";
      -}
      +my $time =
      +    sprintf( "%02d", $ltime[2] )
      +  . sprintf( "%02d", $ltime[1] )
      +  . sprintf( "%02d", $ltime[0] );
      +
      +open(OUT,">>$wherelog$day");
       
      +my $socket = new IO::Socket::INET(
      +    PeerAddr => $server,
      +    PeerPort => $port,
      +    Proto    => "tcp",
      +    Type     => SOCK_STREAM
      +  )
      +  or do {
      +    print OUT "$time:-1:-1:-1:-1:$@\n";
      +    close OUT;
      +    die "Couldn't connect to $server:$port : $@\n";
      +  };
      +$| = 1;
      +
      +print $socket
      +  "GET $request HTTP/1.1\r\nHost: $server\r\nConnection: close\r\n\r\n\r\n";
      +
      +my ( $requests, $idle, $number, $cpu );
      +while (<$socket>) {
      +    $requests = $1 if (m|^BusyWorkers:\ (\S+)|);
      +    $idle     = $1 if (m|^IdleWorkers:\ (\S+)|);
      +    $number   = $1 if (m|sses:\ (\S+)|);
      +    $cpu      = $1 if (m|^CPULoad:\ (\S+)|);
      +}
      +print OUT "$time:$requests:$idle:$number:$cpu\n";
      +close OUT;
       
      diff --git a/support/logresolve.c b/support/logresolve.c
      index b0ba6ec1d15..87df4e82e8c 100644
      --- a/support/logresolve.c
      +++ b/support/logresolve.c
      @@ -122,7 +122,7 @@ static void usage(void)
           "Options:"                                                               NL
           "  -s   Record statistics to STATFILE when finished."                    NL
                                                                                    NL
      -    "  -c   Perform double lookups when resolving IP addresses."            NL,
      +    "  -c   Perform double lookups when resolving IP addresses."             NL,
           shortname, shortname);
           exit(1);
       }
      @@ -200,7 +200,7 @@ int main(int argc, const char * const argv[])
           apr_file_buffer_set(outfile, outbuffer, WRITE_BUF_SIZE);
       
           cache = apr_hash_make(pool);
      -    if(apr_pool_create(&pline, pool) != APR_SUCCESS){
      +    if (apr_pool_create(&pline, pool) != APR_SUCCESS) {
               return 1;
           }
       
      @@ -220,7 +220,7 @@ int main(int argc, const char * const argv[])
       
               /* Check if this could even be an IP address */
               if (!apr_isxdigit(line[0]) && line[0] != ':') {
      -                withname++;
      +            withname++;
                   apr_file_puts(line, outfile);
                   continue;
               }
      @@ -258,7 +258,7 @@ int main(int argc, const char * const argv[])
               resolves++;
       
               /* From here on our we cache each result, even if it was not
      -         * succesful
      +         * successful
                */
               cachesize++;
       
      @@ -315,7 +315,7 @@ int main(int argc, const char * const argv[])
           if (stats) {
               apr_file_t *statsfile;
               if (apr_file_open(&statsfile, stats,
      -                       APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE,
      +                          APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE,
                                 APR_OS_DEFAULT, pool) != APR_SUCCESS) {
                   apr_file_printf(errfile, "%s: Could not open %s for writing.",
                                   shortname, stats);
      diff --git a/support/logresolve.dep b/support/logresolve.dep
      new file mode 100644
      index 00000000000..7b6c07f1c6c
      --- /dev/null
      +++ b/support/logresolve.dep
      @@ -0,0 +1,26 @@
      +# Microsoft Developer Studio Generated Dependency File, included by logresolve.mak
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      +
      +.\logresolve.c : \
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_hash.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/support/logresolve.dsp b/support/logresolve.dsp
      index 24c946ddd88..648daac08be 100644
      --- a/support/logresolve.dsp
      +++ b/support/logresolve.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\logresolve.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\logresolve.exe
       SOURCE="$(InputPath)"
      diff --git a/support/logresolve.mak b/support/logresolve.mak
      new file mode 100644
      index 00000000000..6e54624a722
      --- /dev/null
      +++ b/support/logresolve.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on logresolve.dsp
      +!IF "$(CFG)" == ""
      +CFG=logresolve - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to logresolve - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "logresolve - Win32 Release" && "$(CFG)" != "logresolve - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "logresolve.mak" CFG="logresolve - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "logresolve - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "logresolve - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "logresolve - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\logresolve.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\logresolve.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\logresolve.obj"
      +	-@erase "$(INTDIR)\logresolve.res"
      +	-@erase "$(INTDIR)\logresolve_src.idb"
      +	-@erase "$(INTDIR)\logresolve_src.pdb"
      +	-@erase "$(OUTDIR)\logresolve.exe"
      +	-@erase "$(OUTDIR)\logresolve.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\logresolve_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\logresolve.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="logresolve.exe" /d LONG_NAME="Apache logresolve command line pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\logresolve.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\logresolve.pdb" /debug /out:"$(OUTDIR)\logresolve.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\logresolve.obj" \
      +	"$(INTDIR)\logresolve.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\logresolve.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\logresolve.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\logresolve.exe"
      +   if exist .\Release\logresolve.exe.manifest mt.exe -manifest .\Release\logresolve.exe.manifest -outputresource:.\Release\logresolve.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "logresolve - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\logresolve.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\logresolve.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\logresolve.obj"
      +	-@erase "$(INTDIR)\logresolve.res"
      +	-@erase "$(INTDIR)\logresolve_src.idb"
      +	-@erase "$(INTDIR)\logresolve_src.pdb"
      +	-@erase "$(OUTDIR)\logresolve.exe"
      +	-@erase "$(OUTDIR)\logresolve.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\logresolve_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\logresolve.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="logresolve.exe" /d LONG_NAME="Apache logresolve command line pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\logresolve.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\logresolve.pdb" /debug /out:"$(OUTDIR)\logresolve.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\logresolve.obj" \
      +	"$(INTDIR)\logresolve.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\logresolve.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\logresolve.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\logresolve.exe"
      +   if exist .\Debug\logresolve.exe.manifest mt.exe -manifest .\Debug\logresolve.exe.manifest -outputresource:.\Debug\logresolve.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("logresolve.dep")
      +!INCLUDE "logresolve.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "logresolve.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "logresolve - Win32 Release" || "$(CFG)" == "logresolve - Win32 Debug"
      +
      +!IF  "$(CFG)" == "logresolve - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "logresolve - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "logresolve - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "logresolve - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "logresolve - Win32 Release"
      +
      +
      +"$(INTDIR)\logresolve.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\logresolve.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="logresolve.exe" /d LONG_NAME="Apache logresolve command line pipe" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "logresolve - Win32 Debug"
      +
      +
      +"$(INTDIR)\logresolve.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\logresolve.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="logresolve.exe" /d LONG_NAME="Apache logresolve command line pipe" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\logresolve.c
      +
      +"$(INTDIR)\logresolve.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/logresolve.pl.in b/support/logresolve.pl.in
      index 9fd7cefe3b6..2cd212dfdbf 100644
      --- a/support/logresolve.pl.in
      +++ b/support/logresolve.pl.in
      @@ -41,7 +41,7 @@
       # logfile lines processed per hour compared to ~45,000 per hour
       # with 'logresolve'.
       #
      -# I haven't yet seen any noticable reduction in the percentage of IPs
      +# I haven't yet seen any noticeable reduction in the percentage of IPs
       # that fail to get resolved. Your mileage will no doubt vary. 5s is long
       # enough to wait IMO.
       #
      @@ -207,7 +207,7 @@ sub nslookup {
       
       	 # do the hostname lookup inside an eval. The eval will use the
       	 # already configured SIGnal handler and drop out of the {} block
      -	 # regardless of whether the alarm occured or not.
      +	 # regardless of whether the alarm occurred or not.
       	eval {
       		alarm($TIMEOUT);
       		$hostname = gethostbyaddr(gethostbyname($ip), AF_INET);
      diff --git a/support/passwd_common.c b/support/passwd_common.c
      new file mode 100644
      index 00000000000..113236c3992
      --- /dev/null
      +++ b/support/passwd_common.c
      @@ -0,0 +1,344 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#include "passwd_common.h"
      +#include "apr_strings.h"
      +#include "apr_errno.h"
      +
      +#if APR_HAVE_STDIO_H
      +#include <stdio.h>
      +#endif
      +
      +#include "apr_md5.h"
      +#include "apr_sha1.h"
      +
      +#if APR_HAVE_TIME_H
      +#include <time.h>
      +#endif
      +#if APR_HAVE_CRYPT_H
      +#include <crypt.h>
      +#endif
      +#if APR_HAVE_STDLIB_H
      +#include <stdlib.h>
      +#endif
      +#if APR_HAVE_STRING_H
      +#include <string.h>
      +#endif
      +#if APR_HAVE_UNISTD_H
      +#include <unistd.h>
      +#endif
      +#if APR_HAVE_IO_H
      +#include <io.h>
      +#endif
      +
      +#ifdef _MSC_VER
      +#define write _write
      +#endif
      +
      +apr_file_t *errfile;
      +
      +int abort_on_oom(int rc)
      +{
      +    const char *buf = "Error: out of memory\n";
      +    int written, count = strlen(buf);
      +    do {
      +        written = write(STDERR_FILENO, buf, count);
      +        if (written == count)
      +            break;
      +        if (written > 0) {
      +            buf += written;
      +            count -= written;
      +        }
      +    } while (written >= 0 || errno == EINTR);
      +    abort();
      +    /* NOTREACHED */
      +    return 0;
      +}
      +
      +static int generate_salt(char *s, size_t size, const char **errstr,
      +                         apr_pool_t *pool)
      +{
      +    unsigned char rnd[32];
      +    static const char itoa64[] =
      +        "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      +    apr_size_t n;
      +    unsigned int val = 0, bits = 0;
      +    apr_status_t rv;
      +
      +    n = (size * 6 + 7)/8;
      +    if (n > sizeof(rnd)) {
      +        apr_file_printf(errfile, "generate_salt(): BUG: Buffer too small");
      +        abort();
      +    }
      +    rv = apr_generate_random_bytes(rnd, n);
      +    if (rv) {
      +        *errstr = apr_psprintf(pool, "Unable to generate random bytes: %pm",
      +                               &rv);
      +        return ERR_RANDOM;
      +    }
      +    n = 0;
      +    while (size > 0) {
      +        if (bits < 6) {
      +            val |= (rnd[n++] << bits);
      +            bits += 8;
      +        }
      +        *s++ = itoa64[val & 0x3f];
      +        size--;
      +        val >>= 6;
      +        bits -= 6;
      +    }
      +    *s = '\0';
      +    return 0;
      +}
      +
      +void putline(apr_file_t *f, const char *l)
      +{
      +    apr_status_t rv;
      +    if (f == NULL)
      +        return;
      +    rv = apr_file_puts(l, f);
      +    if (rv != APR_SUCCESS) {
      +        apr_file_printf(errfile, "Error writing temp file: %pm", &rv);
      +        apr_file_close(f);
      +        exit(ERR_FILEPERM);
      +    }
      +}
      +
      +int get_password(struct passwd_ctx *ctx)
      +{
      +    char buf[MAX_STRING_LEN + 1];
      +    if (ctx->passwd_src == PW_STDIN) {
      +        apr_file_t *file_stdin;
      +        apr_size_t nread;
      +        if (apr_file_open_stdin(&file_stdin, ctx->pool) != APR_SUCCESS) {
      +            ctx->errstr = "Unable to read from stdin.";
      +            return ERR_GENERAL;
      +        }
      +        if (apr_file_read_full(file_stdin, buf, sizeof(buf) - 1,
      +                               &nread) != APR_EOF
      +            || nread == sizeof(buf) - 1) {
      +            goto err_too_long;
      +        }
      +        buf[nread] = '\0';
      +        if (nread >= 1 && buf[nread-1] == '\n') {
      +            buf[nread-1] = '\0';
      +            if (nread >= 2 && buf[nread-2] == '\r')
      +                buf[nread-2] = '\0';
      +        }
      +        apr_file_close(file_stdin);
      +        ctx->passwd = apr_pstrdup(ctx->pool, buf);
      +    }
      +    else if (ctx->passwd_src == PW_PROMPT_VERIFY) {
      +        apr_size_t bufsize = sizeof(buf);
      +        if (apr_password_get("Enter password: ", buf, &bufsize) != 0)
      +            goto err_too_long;
      +        ctx->passwd = apr_pstrdup(ctx->pool, buf);
      +    }
      +    else {
      +        apr_size_t bufsize = sizeof(buf);
      +        if (apr_password_get("New password: ", buf, &bufsize) != 0)
      +            goto err_too_long;
      +        ctx->passwd = apr_pstrdup(ctx->pool, buf);
      +        bufsize = sizeof(buf);
      +        buf[0] = '\0';
      +        apr_password_get("Re-type new password: ", buf, &bufsize);
      +        if (strcmp(ctx->passwd, buf) != 0) {
      +            ctx->errstr = "password verification error";
      +            memset(ctx->passwd, '\0', strlen(ctx->passwd));
      +            memset(buf, '\0', sizeof(buf));
      +            return ERR_PWMISMATCH;
      +        }
      +    }
      +    memset(buf, '\0', sizeof(buf));
      +    return 0;
      +
      +err_too_long:
      +    ctx->errstr = apr_psprintf(ctx->pool,
      +                               "password too long (>%" APR_SIZE_T_FMT ")",
      +                               ctx->out_len - 1);
      +    return ERR_OVERFLOW;
      +}
      +
      +/*
      + * Make a password record from the given information.  A zero return
      + * indicates success; on failure, ctx->errstr points to the error message.
      + */
      +int mkhash(struct passwd_ctx *ctx)
      +{
      +    char *pw;
      +    char salt[16];
      +    apr_status_t rv;
      +    int ret = 0;
      +#if CRYPT_ALGO_SUPPORTED
      +    char *cbuf;
      +#endif
      +
      +    if (ctx->cost != 0 && ctx->alg != ALG_BCRYPT) {
      +        apr_file_printf(errfile,
      +                        "Warning: Ignoring -C argument for this algorithm." NL);
      +    }
      +
      +    if (ctx->passwd == NULL) {
      +        if ((ret = get_password(ctx)) != 0)
      +            return ret;
      +    }
      +    pw = ctx->passwd;
      +
      +    switch (ctx->alg) {
      +    case ALG_APSHA:
      +        /* XXX out >= 28 + strlen(sha1) chars - fixed len SHA */
      +        apr_sha1_base64(pw, strlen(pw), ctx->out);
      +        break;
      +
      +    case ALG_APMD5:
      +        ret = generate_salt(salt, 8, &ctx->errstr, ctx->pool);
      +        if (ret != 0)
      +            break;
      +        rv = apr_md5_encode(pw, salt, ctx->out, ctx->out_len);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool,
      +                                       "could not encode password: %pm", &rv);
      +            ret = ERR_GENERAL;
      +        }
      +        break;
      +
      +    case ALG_PLAIN:
      +        /* XXX this len limitation is not in sync with any HTTPd len. */
      +        apr_cpystrn(ctx->out, pw, ctx->out_len);
      +        break;
      +
      +#if CRYPT_ALGO_SUPPORTED
      +    case ALG_CRYPT:
      +        ret = generate_salt(salt, 8, &ctx->errstr, ctx->pool);
      +        if (ret != 0)
      +            break;
      +        cbuf = crypt(pw, salt);
      +        if (cbuf == NULL) {
      +            rv = APR_FROM_OS_ERROR(errno);
      +            ctx->errstr = apr_psprintf(ctx->pool, "crypt() failed: %pm", &rv);
      +            ret = ERR_PWMISMATCH;
      +            break;
      +        }
      +
      +        apr_cpystrn(ctx->out, cbuf, ctx->out_len - 1);
      +        if (strlen(pw) > 8) {
      +            char *truncpw = apr_pstrdup(ctx->pool, pw);
      +            truncpw[8] = '\0';
      +            if (!strcmp(ctx->out, crypt(truncpw, salt))) {
      +                apr_file_printf(errfile, "Warning: Password truncated to 8 "
      +                                "characters by CRYPT algorithm." NL);
      +            }
      +            memset(truncpw, '\0', strlen(pw));
      +        }
      +        break;
      +#endif /* CRYPT_ALGO_SUPPORTED */
      +
      +#if BCRYPT_ALGO_SUPPORTED
      +    case ALG_BCRYPT:
      +        rv = apr_generate_random_bytes((unsigned char*)salt, 16);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool, "Unable to generate random "
      +                                       "bytes: %pm", &rv);
      +            ret = ERR_RANDOM;
      +            break;
      +        }
      +
      +        if (ctx->cost == 0)
      +            ctx->cost = BCRYPT_DEFAULT_COST;
      +        rv = apr_bcrypt_encode(pw, ctx->cost, (unsigned char*)salt, 16,
      +                               ctx->out, ctx->out_len);
      +        if (rv != APR_SUCCESS) {
      +            ctx->errstr = apr_psprintf(ctx->pool, "Unable to encode with "
      +                                       "bcrypt: %pm", &rv);
      +            ret = ERR_PWMISMATCH;
      +            break;
      +        }
      +        break;
      +#endif /* BCRYPT_ALGO_SUPPORTED */
      +
      +    default:
      +        apr_file_printf(errfile, "mkhash(): BUG: invalid algorithm %d",
      +                        ctx->alg);
      +        abort();
      +    }
      +    memset(pw, '\0', strlen(pw));
      +    return ret;
      +}
      +
      +int parse_common_options(struct passwd_ctx *ctx, char opt,
      +                          const char *opt_arg)
      +{
      +    switch (opt) {
      +    case 'b':
      +        ctx->passwd_src = PW_ARG;
      +        break;
      +    case 'i':
      +        ctx->passwd_src = PW_STDIN;
      +        break;
      +    case 'm':
      +        ctx->alg = ALG_APMD5;
      +        break;
      +    case 's':
      +        ctx->alg = ALG_APSHA;
      +        break;
      +    case 'p':
      +        ctx->alg = ALG_PLAIN;
      +#if !PLAIN_ALGO_SUPPORTED
      +        /* Backward compatible behavior: Just print a warning */
      +        apr_file_printf(errfile,
      +                        "Warning: storing passwords as plain text might just "
      +                        "not work on this platform." NL);
      +#endif
      +        break;
      +    case 'd':
      +#if CRYPT_ALGO_SUPPORTED
      +        ctx->alg = ALG_CRYPT;
      +#else
      +        /* Backward compatible behavior: Use MD5. OK since MD5 is more secure */
      +        apr_file_printf(errfile,
      +                        "Warning: CRYPT algorithm not supported on this "
      +                        "platform." NL
      +                        "Automatically using MD5 format." NL);
      +        ctx->alg = ALG_APMD5;
      +#endif
      +        break;
      +    case 'B':
      +#if BCRYPT_ALGO_SUPPORTED
      +        ctx->alg = ALG_BCRYPT;
      +#else
      +        /* Don't fall back to something less secure */
      +        ctx->errstr = "BCRYPT algorithm not supported on this platform";
      +        return ERR_ALG_NOT_SUPP;
      +#endif
      +        break;
      +    case 'C': {
      +            char *endptr;
      +            long num = strtol(opt_arg, &endptr, 10);
      +            if (*endptr != '\0' || num <= 0) {
      +                ctx->errstr = "argument to -C must be a positive integer";
      +                return ERR_SYNTAX;
      +            }
      +            ctx->cost = num;
      +            break;
      +        }
      +    default:
      +        apr_file_printf(errfile, 
      +                        "parse_common_options(): BUG: invalid option %c",
      +                        opt);
      +        abort();
      +    }
      +    return 0;
      +}
      diff --git a/support/passwd_common.h b/support/passwd_common.h
      new file mode 100644
      index 00000000000..01d56520242
      --- /dev/null
      +++ b/support/passwd_common.h
      @@ -0,0 +1,123 @@
      +/* Licensed to the Apache Software Foundation (ASF) under one or more
      + * contributor license agreements.  See the NOTICE file distributed with
      + * this work for additional information regarding copyright ownership.
      + * The ASF licenses this file to You under the Apache License, Version 2.0
      + * (the "License"); you may not use this file except in compliance with
      + * the License.  You may obtain a copy of the License at
      + *
      + *     http://www.apache.org/licenses/LICENSE-2.0
      + *
      + * Unless required by applicable law or agreed to in writing, software
      + * distributed under the License is distributed on an "AS IS" BASIS,
      + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      + * See the License for the specific language governing permissions and
      + * limitations under the License.
      + */
      +
      +#ifndef _PASSWD_COMMON_H
      +#define _PASSWD_COMMON_H
      +
      +#include "apr.h"
      +#include "apr_lib.h"
      +#include "apr_strings.h"
      +#include "apr_errno.h"
      +#include "apr_file_io.h"
      +#include "apr_general.h"
      +#include "apr_version.h"
      +#if !APR_VERSION_AT_LEAST(2,0,0)
      +#include "apu_version.h"
      +#endif
      +
      +#define MAX_STRING_LEN 256
      +
      +#define ALG_PLAIN 0
      +#define ALG_CRYPT 1
      +#define ALG_APMD5 2
      +#define ALG_APSHA 3
      +#define ALG_BCRYPT 4
      +
      +#define BCRYPT_DEFAULT_COST 5
      +
      +#define ERR_FILEPERM 1
      +#define ERR_SYNTAX 2
      +#define ERR_PWMISMATCH 3
      +#define ERR_INTERRUPTED 4
      +#define ERR_OVERFLOW 5
      +#define ERR_BADUSER 6
      +#define ERR_INVALID 7
      +#define ERR_RANDOM 8
      +#define ERR_GENERAL 9
      +#define ERR_ALG_NOT_SUPP 10
      +
      +#define NL APR_EOL_STR
      +
      +#if defined(WIN32) || defined(NETWARE)
      +#define CRYPT_ALGO_SUPPORTED 0
      +#define PLAIN_ALGO_SUPPORTED 1
      +#else
      +#define CRYPT_ALGO_SUPPORTED 1
      +#define PLAIN_ALGO_SUPPORTED 0
      +#endif
      +
      +#if APR_VERSION_AT_LEAST(2,0,0) || \
      +    (APU_MAJOR_VERSION == 1 && APU_MINOR_VERSION >= 5)
      +#define BCRYPT_ALGO_SUPPORTED 1
      +#else
      +#define BCRYPT_ALGO_SUPPORTED 0
      +#endif
      +
      +/*
      + * Must be initialized with apr_file_open_stderr() before using any of the
      + * below functions.
      + */
      +extern apr_file_t *errfile;
      +
      +struct passwd_ctx {
      +    apr_pool_t      *pool;
      +    const char      *errstr;
      +    char            *out;
      +    apr_size_t      out_len;
      +    char            *passwd;
      +    int             alg;
      +    int             cost;
      +    enum {
      +        PW_PROMPT = 0,
      +        PW_ARG,
      +        PW_STDIN,
      +        PW_PROMPT_VERIFY,
      +    } passwd_src;
      +};
      +
      +
      +/*
      + * To be used as apr_pool_abort_fn
      + */
      +int abort_on_oom(int rc);
      +
      +/*
      + * Write a line to the file. On error, print a message and exit
      + */
      +void putline(apr_file_t *f, const char *l);
      +
      +/*
      + * The following functions return zero on success; otherwise, one of
      + * the ERR_* codes is returned and an error message is stored in ctx->errstr.
      + */
      +
      +/*
      + * Parse the algorithm specific options.
      + */
      +int parse_common_options(struct passwd_ctx *ctx, char opt, const char *opt_arg);
      +
      +/*
      + * Ask for password with verification.
      + */
      +int get_password(struct passwd_ctx *ctx);
      +
      +/*
      + * Make a password record from the given information.
      + */
      +int mkhash(struct passwd_ctx *ctx);
      +
      +#endif /* _PASSWD_COMMON_H */
      +
      diff --git a/support/rotatelogs.c b/support/rotatelogs.c
      index 81bd950fc2e..c2373f56b01 100644
      --- a/support/rotatelogs.c
      +++ b/support/rotatelogs.c
      @@ -14,31 +14,6 @@
        * limitations under the License.
        */
       
      -/*
      - * Simple program to rotate Apache logs without having to kill the server.
      - *
      - * Contributed by Ben Laurie <ben algroup.co.uk>
      - *
      - * 12 Mar 1996
      - *
      - * Ported to APR by Mladen Turk <mturk mappingsoft.com>
      - *
      - * 23 Sep 2001
      - *
      - * -l option added 2004-06-11
      - *
      - * -l causes the use of local time rather than GMT as the base for the
      - * interval.  NB: Using -l in an environment which changes the GMT offset
      - * (such as for BST or DST) can lead to unpredictable results!
      - *
      - * -f option added Feb, 2008. This causes rotatelog to open/create
      - *    the logfile as soon as it's started, not as soon as it sees
      - *    data.
      - *
      - * -v option added Feb, 2008. Verbose output of command line parsing.
      - */
      -
      -
       #include "apr.h"
       #include "apr_lib.h"
       #include "apr_strings.h"
      @@ -49,6 +24,7 @@
       #include "apr_time.h"
       #include "apr_getopt.h"
       #include "apr_thread_proc.h"
      +#include "apr_signal.h"
       #if APR_FILES_AS_SOCKETS
       #include "apr_poll.h"
       #endif
      @@ -62,17 +38,13 @@
       #define BUFSIZE         65536
       #define ERRMSGSZ        256
       
      -#ifndef MAX_PATH
      -#define MAX_PATH        1024
      -#endif
      -
       #define ROTATE_NONE     0
       #define ROTATE_NEW      1
       #define ROTATE_TIME     2
       #define ROTATE_SIZE     3
       #define ROTATE_FORCE    4
       
      -static const char *ROTATE_REASONS[] = {
      +static const char *const ROTATE_REASONS[] = {
           "None",
           "Open a new file",
           "Time interval expired",
      @@ -99,6 +71,7 @@ struct rotate_config {
       #if APR_FILES_AS_SOCKETS
           int create_empty;
       #endif
      +    int num_files;
       };
       
       typedef struct rotate_status rotate_status_t;
      @@ -108,7 +81,7 @@ typedef struct rotate_status rotate_status_t;
       struct logfile {
           apr_pool_t *pool;
           apr_file_t *fd;
      -    char name[MAX_PATH];
      +    char name[APR_PATH_MAX];
       };
       
       struct rotate_status {
      @@ -118,6 +91,7 @@ struct rotate_status {
           int rotateReason;
           int tLogEnd;
           int nMessCount;
      +    int fileNum;
       };
       
       static rotate_config_t config;
      @@ -130,9 +104,9 @@ static void usage(const char *argv0, const char *reason)
           }
           fprintf(stderr,
       #if APR_FILES_AS_SOCKETS
      -            "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-c] <logfile> "
      +            "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-c] [-n number] <logfile> "
       #else
      -            "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] <logfile> "
      +            "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-n number] <logfile> "
       #endif
                   "{<rotation time in seconds>|<rotation size>(B|K|M|G)} "
                   "[offset minutes from UTC]\n\n",
      @@ -297,7 +271,6 @@ static void post_rotate(apr_pool_t *pool, struct logfile *newlog,
               }
               rv = apr_file_link(newlog->name, config->linkfile);
               if (rv != APR_SUCCESS) {
      -            char error[120];
                   apr_strerror(rv, error, sizeof error);
                   fprintf(stderr, "Error linking file %s to %s (%s)\n",
                           newlog->name, config->linkfile, error);
      @@ -336,7 +309,7 @@ static void post_rotate(apr_pool_t *pool, struct logfile *newlog,
       
           argv[0] = config->postrotate_prog;
           argv[1] = newlog->name;
      -    if (status->current.name) {
      +    if (status->current.fd) {
               argv[2] = status->current.name;
               argv[3] = NULL;
           }
      @@ -356,6 +329,24 @@ static void post_rotate(apr_pool_t *pool, struct logfile *newlog,
           }
       }
       
      +/* After a error, truncate the current file and write out an error
      + * message, which must be contained in status->errbuf.  The process is
      + * terminated on failure.  */
      +static void truncate_and_write_error(rotate_status_t *status)
      +{
      +    apr_size_t buflen = strlen(status->errbuf);
      +
      +    if (apr_file_trunc(status->current.fd, 0) != APR_SUCCESS) {
      +        fprintf(stderr, "Error truncating the file %s\n", status->current.name);
      +        exit(2);
      +    }
      +    if (apr_file_write_full(status->current.fd, status->errbuf, buflen, NULL) != APR_SUCCESS) {
      +        fprintf(stderr, "Error writing error (%s) to the file %s\n", 
      +                status->errbuf, status->current.name);
      +        exit(2);
      +    }
      +}
      +
       /*
        * Open a new log file, and if successful
        * also close the old one.
      @@ -374,6 +365,7 @@ static void doRotate(rotate_config_t *config, rotate_status_t *status)
           int tLogStart;
           apr_status_t rv;
           struct logfile newlog;
      +    int thisLogNum = -1;
       
           status->rotateReason = ROTATE_NONE;
       
      @@ -407,6 +399,16 @@ static void doRotate(rotate_config_t *config, rotate_status_t *status)
               if (config->truncate) {
                   apr_snprintf(newlog.name, sizeof(newlog.name), "%s", config->szLogRoot);
               }
      +        else if (config->num_files > 0) { 
      +            if (status->fileNum == -1 || status->fileNum == (config->num_files - 1)) {
      +                thisLogNum = 0;
      +                apr_snprintf(newlog.name, sizeof(newlog.name), "%s", config->szLogRoot);
      +            }
      +            else { 
      +                thisLogNum = status->fileNum + 1;
      +                apr_snprintf(newlog.name, sizeof(newlog.name), "%s.%d", config->szLogRoot, thisLogNum);
      +            }
      +        }
               else {
                   apr_snprintf(newlog.name, sizeof(newlog.name), "%s.%010d", config->szLogRoot,
                                tLogStart);
      @@ -417,11 +419,13 @@ static void doRotate(rotate_config_t *config, rotate_status_t *status)
               fprintf(stderr, "Opening file %s\n", newlog.name);
           }
           rv = apr_file_open(&newlog.fd, newlog.name, APR_WRITE | APR_CREATE | APR_APPEND
      -                       | (config->truncate ? APR_TRUNCATE : 0), APR_OS_DEFAULT, newlog.pool);
      +                       | (config->truncate || (config->num_files > 0 && status->current.fd) ? APR_TRUNCATE : 0), 
      +                       APR_OS_DEFAULT, newlog.pool);
           if (rv == APR_SUCCESS) {
               /* Handle post-rotate processing. */
               post_rotate(newlog.pool, &newlog, config, status);
       
      +        status->fileNum = thisLogNum;
               /* Close out old (previously 'current') logfile, if any. */
               if (status->current.fd) {
                   close_logfile(config, &status->current);
      @@ -432,7 +436,6 @@ static void doRotate(rotate_config_t *config, rotate_status_t *status)
           }
           else {
               char error[120];
      -        apr_size_t nWrite;
       
               apr_strerror(rv, error, sizeof error);
       
      @@ -453,16 +456,8 @@ static void doRotate(rotate_config_t *config, rotate_status_t *status)
                            "Resetting log file due to error opening "
                            "new log file, %10d messages lost: %-25.25s\n",
                            status->nMessCount, error);
      -        nWrite = strlen(status->errbuf);
       
      -        if (apr_file_trunc(status->current.fd, 0) != APR_SUCCESS) {
      -            fprintf(stderr, "Error truncating the file %s\n", status->current.name);
      -            exit(2);
      -        }
      -        if (apr_file_write(status->current.fd, status->errbuf, &nWrite) != APR_SUCCESS) {
      -            fprintf(stderr, "Error writing to the file %s\n", status->current.name);
      -            exit(2);
      -        }
      +        truncate_and_write_error(status);
           }
       
           status->nMessCount = 0;
      @@ -550,9 +545,9 @@ int main (int argc, const char * const argv[])
           apr_pool_create(&status.pool, NULL);
           apr_getopt_init(&opt, status.pool, argc, argv);
       #if APR_FILES_AS_SOCKETS
      -    while ((rv = apr_getopt(opt, "lL:p:ftvec", &c, &opt_arg)) == APR_SUCCESS) {
      +    while ((rv = apr_getopt(opt, "lL:p:ftvecn:", &c, &opt_arg)) == APR_SUCCESS) {
       #else
      -    while ((rv = apr_getopt(opt, "lL:p:ftve", &c, &opt_arg)) == APR_SUCCESS) {
      +    while ((rv = apr_getopt(opt, "lL:p:ftven:", &c, &opt_arg)) == APR_SUCCESS) {
       #endif
               switch (c) {
               case 'l':
      @@ -563,6 +558,10 @@ int main (int argc, const char * const argv[])
                   break;
               case 'p':
                   config.postrotate_prog = opt_arg;
      +#ifdef SIGCHLD
      +            /* Prevent creation of zombies (on modern Unix systems). */
      +            apr_signal(SIGCHLD, SIG_IGN);
      +#endif
                   break;
               case 'f':
                   config.force_open = 1;
      @@ -581,6 +580,10 @@ int main (int argc, const char * const argv[])
                   config.create_empty = 1;
                   break;
       #endif
      +        case 'n':
      +            config.num_files = atoi(opt_arg);
      +            status.fileNum = -1;
      +            break;
               }
           }
       
      @@ -609,6 +612,16 @@ int main (int argc, const char * const argv[])
       
           config.use_strftime = (strchr(config.szLogRoot, '%') != NULL);
       
      +    if (config.use_strftime && config.num_files > 0) { 
      +        fprintf(stderr, "Cannot use -n with %% in filename\n");
      +        exit(1);
      +    }
      +
      +    if (status.fileNum == -1 && config.num_files < 1) { 
      +        fprintf(stderr, "Invalid -n argument\n");
      +        exit(1);
      +    }
      +
           if (apr_file_open_stdin(&f_stdin, status.pool) != APR_SUCCESS) {
               fprintf(stderr, "Unable to open stdin\n");
               exit(1);
      @@ -687,38 +700,21 @@ int main (int argc, const char * const argv[])
               }
       
               nWrite = nRead;
      -        rv = apr_file_write(status.current.fd, buf, &nWrite);
      -        if (rv == APR_SUCCESS && nWrite != nRead) {
      -            /* buffer partially written, which for rotatelogs means we encountered
      -             * an error such as out of space or quota or some other limit reached;
      -             * try to write the rest so we get the real error code
      -             */
      -            apr_size_t nWritten = nWrite;
      -
      -            nRead  = nRead - nWritten;
      -            nWrite = nRead;
      -            rv = apr_file_write(status.current.fd, buf + nWritten, &nWrite);
      -        }
      +        rv = apr_file_write_full(status.current.fd, buf, nWrite, &nWrite);
               if (nWrite != nRead) {
      -            char strerrbuf[120];
                   apr_off_t cur_offset;
       
                   cur_offset = 0;
                   if (apr_file_seek(status.current.fd, APR_CUR, &cur_offset) != APR_SUCCESS) {
                       cur_offset = -1;
                   }
      -            apr_strerror(rv, strerrbuf, sizeof strerrbuf);
                   status.nMessCount++;
                   apr_snprintf(status.errbuf, sizeof status.errbuf,
                                "Error %d writing to log file at offset %" APR_OFF_T_FMT ". "
      -                         "%10d messages lost (%s)\n",
      -                         rv, cur_offset, status.nMessCount, strerrbuf);
      -            nWrite = strlen(status.errbuf);
      -            apr_file_trunc(status.current.fd, 0);
      -            if (apr_file_write(status.current.fd, status.errbuf, &nWrite) != APR_SUCCESS) {
      -                fprintf(stderr, "Error writing to the file %s\n", status.current.name);
      -                exit(2);
      -            }
      +                         "%10d messages lost (%pm)\n",
      +                         rv, cur_offset, status.nMessCount, &rv);
      +
      +            truncate_and_write_error(&status);
               }
               else {
                   status.nMessCount++;
      diff --git a/support/rotatelogs.dep b/support/rotatelogs.dep
      new file mode 100644
      index 00000000000..5b27972ded8
      --- /dev/null
      +++ b/support/rotatelogs.dep
      @@ -0,0 +1,28 @@
      +# Microsoft Developer Studio Generated Dependency File, included by rotatelogs.mak
      +
      +..\build\win32\httpd.rc : \
      +	"..\include\ap_release.h"\
      +	
      +
      +.\rotatelogs.c : \
      +	"..\srclib\apr\include\apr.h"\
      +	"..\srclib\apr\include\apr_allocator.h"\
      +	"..\srclib\apr\include\apr_errno.h"\
      +	"..\srclib\apr\include\apr_file_info.h"\
      +	"..\srclib\apr\include\apr_file_io.h"\
      +	"..\srclib\apr\include\apr_general.h"\
      +	"..\srclib\apr\include\apr_getopt.h"\
      +	"..\srclib\apr\include\apr_inherit.h"\
      +	"..\srclib\apr\include\apr_lib.h"\
      +	"..\srclib\apr\include\apr_network_io.h"\
      +	"..\srclib\apr\include\apr_poll.h"\
      +	"..\srclib\apr\include\apr_pools.h"\
      +	"..\srclib\apr\include\apr_signal.h"\
      +	"..\srclib\apr\include\apr_strings.h"\
      +	"..\srclib\apr\include\apr_tables.h"\
      +	"..\srclib\apr\include\apr_thread_mutex.h"\
      +	"..\srclib\apr\include\apr_thread_proc.h"\
      +	"..\srclib\apr\include\apr_time.h"\
      +	"..\srclib\apr\include\apr_user.h"\
      +	"..\srclib\apr\include\apr_want.h"\
      +	
      diff --git a/support/rotatelogs.dsp b/support/rotatelogs.dsp
      index 7fda0e05c5a..abfa9c1de8d 100644
      --- a/support/rotatelogs.dsp
      +++ b/support/rotatelogs.dsp
      @@ -49,8 +49,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /debug /opt:ref
       # Begin Special Build Tool
       TargetPath=.\Release\rotatelogs.exe
       SOURCE="$(InputPath)"
      @@ -79,8 +79,8 @@ BSC32=bscmake.exe
       # ADD BASE BSC32 /nologo
       # ADD BSC32 /nologo
       LINK32=link.exe
      -# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      -# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD BASE LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
      +# ADD LINK32 kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /debug
       # Begin Special Build Tool
       TargetPath=.\Debug\rotatelogs.exe
       SOURCE="$(InputPath)"
      diff --git a/support/rotatelogs.mak b/support/rotatelogs.mak
      new file mode 100644
      index 00000000000..f7a6fd48e7a
      --- /dev/null
      +++ b/support/rotatelogs.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on rotatelogs.dsp
      +!IF "$(CFG)" == ""
      +CFG=rotatelogs - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to rotatelogs - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "rotatelogs - Win32 Release" && "$(CFG)" != "rotatelogs - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "rotatelogs.mak" CFG="rotatelogs - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "rotatelogs - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "rotatelogs - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "rotatelogs - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\rotatelogs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\rotatelogs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\rotatelogs.obj"
      +	-@erase "$(INTDIR)\rotatelogs.res"
      +	-@erase "$(INTDIR)\rotatelogs_src.idb"
      +	-@erase "$(INTDIR)\rotatelogs_src.pdb"
      +	-@erase "$(OUTDIR)\rotatelogs.exe"
      +	-@erase "$(OUTDIR)\rotatelogs.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\rotatelogs_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\rotatelogs.res" /i "../include" /i "../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="rotatelogs.exe" /d LONG_NAME="Apache rotatelogs command line pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\rotatelogs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\rotatelogs.pdb" /debug /out:"$(OUTDIR)\rotatelogs.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\rotatelogs.obj" \
      +	"$(INTDIR)\rotatelogs.res" \
      +	"..\srclib\apr\LibR\apr-1.lib" \
      +	"..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\rotatelogs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\rotatelogs.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\rotatelogs.exe"
      +   if exist .\Release\rotatelogs.exe.manifest mt.exe -manifest .\Release\rotatelogs.exe.manifest -outputresource:.\Release\rotatelogs.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "rotatelogs - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\rotatelogs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\rotatelogs.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\rotatelogs.obj"
      +	-@erase "$(INTDIR)\rotatelogs.res"
      +	-@erase "$(INTDIR)\rotatelogs_src.idb"
      +	-@erase "$(INTDIR)\rotatelogs_src.pdb"
      +	-@erase "$(OUTDIR)\rotatelogs.exe"
      +	-@erase "$(OUTDIR)\rotatelogs.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\rotatelogs_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\rotatelogs.res" /i "../include" /i "../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="rotatelogs.exe" /d LONG_NAME="Apache rotatelogs command line pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\rotatelogs.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib advapi32.lib wsock32.lib ws2_32.lib rpcrt4.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\rotatelogs.pdb" /debug /out:"$(OUTDIR)\rotatelogs.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\rotatelogs.obj" \
      +	"$(INTDIR)\rotatelogs.res" \
      +	"..\srclib\apr\LibD\apr-1.lib" \
      +	"..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\rotatelogs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\rotatelogs.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\rotatelogs.exe"
      +   if exist .\Debug\rotatelogs.exe.manifest mt.exe -manifest .\Debug\rotatelogs.exe.manifest -outputresource:.\Debug\rotatelogs.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("rotatelogs.dep")
      +!INCLUDE "rotatelogs.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "rotatelogs.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "rotatelogs - Win32 Release" || "$(CFG)" == "rotatelogs - Win32 Debug"
      +
      +!IF  "$(CFG)" == "rotatelogs - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "rotatelogs - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "rotatelogs - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ELSEIF  "$(CFG)" == "rotatelogs - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support"
      +
      +!ENDIF 
      +
      +SOURCE=..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "rotatelogs - Win32 Release"
      +
      +
      +"$(INTDIR)\rotatelogs.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\rotatelogs.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="rotatelogs.exe" /d LONG_NAME="Apache rotatelogs command line pipe" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "rotatelogs - Win32 Debug"
      +
      +
      +"$(INTDIR)\rotatelogs.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\rotatelogs.res" /i "../include" /i "../srclib/apr/include" /i "../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="rotatelogs.exe" /d LONG_NAME="Apache rotatelogs command line pipe" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\rotatelogs.c
      +
      +"$(INTDIR)\rotatelogs.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/split-logfile.in b/support/split-logfile.in
      index 061162e8482..e5abfc7d250 100644
      --- a/support/split-logfile.in
      +++ b/support/split-logfile.in
      @@ -26,22 +26,25 @@
       # The combined log file is read from stdin. Records read
       # will be appended to any existing log files.
       #
      -%is_open = ();
      +use strict;
      +use warnings;
       
      -while ($log_line = <STDIN>) {
      +my %log_file = ();
      +
      +while (my $log_line = <STDIN>) {
           #
           # Get the first token from the log record; it's the
           # identity of the virtual host to which the record
           # applies.
           #
      -    ($vhost) = split (/\s/, $log_line);
      +    my ($vhost) = split (/\s/, $log_line);
           #
           # Normalize the virtual host name to all lowercase.
           # If it's blank, the request was handled by the default
           # server, so supply a default name.  This shouldn't
           # happen, but caution rocks.
           #
      -    $vhost = lc ($vhost) or "access";
      +    $vhost = lc ($vhost) || "access";
           #
           # if the vhost contains a "/" or "\", it is illegal so just use 
           # the default log to avoid any security issues due if it is interprted
      @@ -51,10 +54,9 @@ while ($log_line = <STDIN>) {
           # If the log file for this virtual host isn't opened
           # yet, do it now.
           #
      -    if (! $is_open{$vhost}) {
      -        open $vhost, ">>${vhost}.log"
      +    if (! $log_file{$vhost}) {
      +        open $log_file{$vhost}, ">>${vhost}.log"
                   or die ("Can't open ${vhost}.log");
      -        $is_open{$vhost} = 1;
           }
           #
           # Strip off the first token (which may be null in the
      @@ -62,6 +64,6 @@ while ($log_line = <STDIN>) {
           # record to the current log file.
           #
           $log_line =~ s/^\S*\s+//;
      -    printf $vhost "%s", $log_line;
      +    print {$log_file{$vhost}} $log_line;
       }
       exit 0;
      diff --git a/support/suexec.c b/support/suexec.c
      index 5d78bcdb852..0b2491e28b3 100644
      --- a/support/suexec.c
      +++ b/support/suexec.c
      @@ -85,6 +85,7 @@ static const char *const safe_env_lst[] =
           "CONTEXT_PREFIX=",
           "DATE_GMT=",
           "DATE_LOCAL=",
      +    "DOCUMENT_ARGS=",
           "DOCUMENT_NAME=",
           "DOCUMENT_PATH_INFO=",
           "DOCUMENT_ROOT=",
      @@ -128,6 +129,12 @@ static const char *const safe_env_lst[] =
           NULL
       };
       
      +static void log_err(const char *fmt,...) 
      +    __attribute__((format(printf,1,2)));
      +static void log_no_err(const char *fmt,...)  
      +    __attribute__((format(printf,1,2)));
      +static void err_output(int is_error, const char *fmt, va_list ap) 
      +    __attribute__((format(printf,2,0)));
       
       static void err_output(int is_error, const char *fmt, va_list ap)
       {
      @@ -211,11 +218,15 @@ static void clean_env(void)
       
           if ((cleanenv = (char **) calloc(AP_ENVBUF, sizeof(char *))) == NULL) {
               log_err("failed to malloc memory for environment\n");
      -        exit(120);
      +        exit(123);
           }
       
           sprintf(pathbuf, "PATH=%s", AP_SAFE_PATH);
           cleanenv[cidx] = strdup(pathbuf);
      +    if (cleanenv[cidx] == NULL) {
      +        log_err("failed to malloc memory for environment\n");
      +        exit(124);
      +    }
           cidx++;
       
           for (ep = envp; *ep && cidx < AP_ENVBUF-1; ep++) {
      @@ -263,7 +274,7 @@ int main(int argc, char *argv[])
            */
           uid = getuid();
           if ((pw = getpwuid(uid)) == NULL) {
      -        log_err("crit: invalid uid: (%ld)\n", uid);
      +        log_err("crit: invalid uid: (%lu)\n", (unsigned long)uid);
               exit(102);
           }
           /*
      @@ -390,7 +401,10 @@ int main(int argc, char *argv[])
               }
           }
           gid = gr->gr_gid;
      -    actual_gname = strdup(gr->gr_name);
      +    if ((actual_gname = strdup(gr->gr_name)) == NULL) {
      +        log_err("failed to alloc memory\n");
      +        exit(125);
      +    }
       
       #ifdef _OSD_POSIX
           /*
      @@ -425,6 +439,10 @@ int main(int argc, char *argv[])
           uid = pw->pw_uid;
           actual_uname = strdup(pw->pw_name);
           target_homedir = strdup(pw->pw_dir);
      +    if (actual_uname == NULL || target_homedir == NULL) {
      +        log_err("failed to alloc memory\n");
      +        exit(126);
      +    }
       
           /*
            * Log the transaction here to be sure we have an open log
      @@ -440,7 +458,7 @@ int main(int argc, char *argv[])
            * a UID less than AP_UID_MIN.  Tsk tsk.
            */
           if ((uid == 0) || (uid < AP_UID_MIN)) {
      -        log_err("cannot run as forbidden uid (%d/%s)\n", uid, cmd);
      +        log_err("cannot run as forbidden uid (%lu/%s)\n", (unsigned long)uid, cmd);
               exit(107);
           }
       
      @@ -449,7 +467,7 @@ int main(int argc, char *argv[])
            * or as a GID less than AP_GID_MIN.  Tsk tsk.
            */
           if ((gid == 0) || (gid < AP_GID_MIN)) {
      -        log_err("cannot run as forbidden gid (%d/%s)\n", gid, cmd);
      +        log_err("cannot run as forbidden gid (%lu/%s)\n", (unsigned long)gid, cmd);
               exit(108);
           }
       
      @@ -460,7 +478,7 @@ int main(int argc, char *argv[])
            * and setgid() to the target group. If unsuccessful, error out.
            */
           if (((setgid(gid)) != 0) || (initgroups(actual_uname, gid) != 0)) {
      -        log_err("failed to setgid (%ld: %s)\n", gid, cmd);
      +        log_err("failed to setgid (%lu: %s)\n", (unsigned long)gid, cmd);
               exit(109);
           }
       
      @@ -468,7 +486,7 @@ int main(int argc, char *argv[])
            * setuid() to the target user.  Error out on fail.
            */
           if ((setuid(uid)) != 0) {
      -        log_err("failed to setuid (%ld: %s)\n", uid, cmd);
      +        log_err("failed to setuid (%lu: %s)\n", (unsigned long)uid, cmd);
               exit(110);
           }
       
      @@ -556,11 +574,11 @@ int main(int argc, char *argv[])
               (gid != dir_info.st_gid) ||
               (uid != prg_info.st_uid) ||
               (gid != prg_info.st_gid)) {
      -        log_err("target uid/gid (%ld/%ld) mismatch "
      -                "with directory (%ld/%ld) or program (%ld/%ld)\n",
      -                uid, gid,
      -                dir_info.st_uid, dir_info.st_gid,
      -                prg_info.st_uid, prg_info.st_gid);
      +        log_err("target uid/gid (%lu/%lu) mismatch "
      +                "with directory (%lu/%lu) or program (%lu/%lu)\n",
      +                (unsigned long)uid, (unsigned long)gid,
      +                (unsigned long)dir_info.st_uid, (unsigned long)dir_info.st_gid,
      +                (unsigned long)prg_info.st_uid, (unsigned long)prg_info.st_gid);
               exit(120);
           }
           /*
      diff --git a/support/win32/ApacheMonitor.c b/support/win32/ApacheMonitor.c
      index de7c64298f3..26b54a00dbe 100644
      --- a/support/win32/ApacheMonitor.c
      +++ b/support/win32/ApacheMonitor.c
      @@ -542,7 +542,6 @@ BOOL ApacheManageService(LPCTSTR szServiceName, LPCTSTR szImagePath,
       {
           TCHAR szMsg[MAX_PATH];
           BOOL retValue;
      -    BOOL serviceFlag = TRUE;
           SC_HANDLE schService;
           SC_HANDLE schSCManager;
           SERVICE_STATUS schSStatus;
      @@ -1587,7 +1586,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
       #ifdef UNICODE
           __wargv = CommandLineToArgvW(GetCommandLineW(), &__argc);
       #else
      +#if defined(_MSC_VER) && _MSC_VER < 1800 
           _setargv();
      +#endif
       #endif
       
           if ((__argc == 2) && (_tcscmp(__targv[1], _T("--kill")) == 0))
      diff --git a/support/win32/ApacheMonitor.dep b/support/win32/ApacheMonitor.dep
      new file mode 100644
      index 00000000000..d0eac54264b
      --- /dev/null
      +++ b/support/win32/ApacheMonitor.dep
      @@ -0,0 +1,18 @@
      +# Microsoft Developer Studio Generated Dependency File, included by ApacheMonitor.mak
      +
      +.\ApacheMonitor.c : \
      +	".\ApacheMonitor.h"\
      +	
      +
      +.\ApacheMonitor.rc : \
      +	"..\..\build\win32\httpd.rc"\
      +	"..\..\include\ap_release.h"\
      +	".\apache_header.bmp"\
      +	".\ApacheMonitor.h"\
      +	".\ApacheMonitor.ico"\
      +	".\ApacheMonitor.manifest"\
      +	".\aprun.ico"\
      +	".\apstop.ico"\
      +	".\srun.bmp"\
      +	".\sstop.bmp"\
      +	
      diff --git a/support/win32/ApacheMonitor.mak b/support/win32/ApacheMonitor.mak
      new file mode 100644
      index 00000000000..5143155483c
      --- /dev/null
      +++ b/support/win32/ApacheMonitor.mak
      @@ -0,0 +1,309 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on ApacheMonitor.dsp
      +!IF "$(CFG)" == ""
      +CFG=ApacheMonitor - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to ApacheMonitor - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "ApacheMonitor - Win32 Release" && "$(CFG)" != "ApacheMonitor - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "ApacheMonitor.mak" CFG="ApacheMonitor - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "ApacheMonitor - Win32 Release" (based on "Win32 (x86) Application")
      +!MESSAGE "ApacheMonitor - Win32 Debug" (based on "Win32 (x86) Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "ApacheMonitor - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\ApacheMonitor.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\ApacheMonitor.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ApacheMonitor.obj"
      +	-@erase "$(INTDIR)\ApacheMonitor.res"
      +	-@erase "$(INTDIR)\ApacheMonitor_src.idb"
      +	-@erase "$(INTDIR)\ApacheMonitor_src.pdb"
      +	-@erase "$(OUTDIR)\ApacheMonitor.exe"
      +	-@erase "$(OUTDIR)\ApacheMonitor.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../../include" /I "../../srclib/apr/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\ApacheMonitor_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ApacheMonitor.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheMonitor.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib wtsapi32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ApacheMonitor.pdb" /debug /out:"$(OUTDIR)\ApacheMonitor.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\ApacheMonitor.obj" \
      +	"$(INTDIR)\ApacheMonitor.res" \
      +	"..\..\srclib\apr\LibR\apr-1.lib" \
      +	"..\..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\ApacheMonitor.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\ApacheMonitor.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\ApacheMonitor.exe"
      +   if exist .\Release\ApacheMonitor.exe.manifest mt.exe -manifest .\Release\ApacheMonitor.exe.manifest -outputresource:.\Release\ApacheMonitor.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "ApacheMonitor - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\ApacheMonitor.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\ApacheMonitor.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\ApacheMonitor.obj"
      +	-@erase "$(INTDIR)\ApacheMonitor.res"
      +	-@erase "$(INTDIR)\ApacheMonitor_src.idb"
      +	-@erase "$(INTDIR)\ApacheMonitor_src.pdb"
      +	-@erase "$(OUTDIR)\ApacheMonitor.exe"
      +	-@erase "$(OUTDIR)\ApacheMonitor.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Gm /Zi /Od /I "../../include" /I "../../srclib/apr/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "STRICT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\ApacheMonitor_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +MTL=midl.exe
      +MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\ApacheMonitor.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\ApacheMonitor.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib wtsapi32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\ApacheMonitor.pdb" /debug /out:"$(OUTDIR)\ApacheMonitor.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\ApacheMonitor.obj" \
      +	"$(INTDIR)\ApacheMonitor.res" \
      +	"..\..\srclib\apr\LibD\apr-1.lib" \
      +	"..\..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\ApacheMonitor.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\ApacheMonitor.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\ApacheMonitor.exe"
      +   if exist .\Debug\ApacheMonitor.exe.manifest mt.exe -manifest .\Debug\ApacheMonitor.exe.manifest -outputresource:.\Debug\ApacheMonitor.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("ApacheMonitor.dep")
      +!INCLUDE "ApacheMonitor.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "ApacheMonitor.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "ApacheMonitor - Win32 Release" || "$(CFG)" == "ApacheMonitor - Win32 Debug"
      +
      +!IF  "$(CFG)" == "ApacheMonitor - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support\win32"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ELSEIF  "$(CFG)" == "ApacheMonitor - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support\win32"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "ApacheMonitor - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support\win32"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ELSEIF  "$(CFG)" == "ApacheMonitor - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support\win32"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ENDIF 
      +
      +SOURCE=.\ApacheMonitor.c
      +
      +"$(INTDIR)\ApacheMonitor.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +SOURCE=.\ApacheMonitor.rc
      +
      +"$(INTDIR)\ApacheMonitor.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) $(RSC_PROJ) $(SOURCE)
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/support/win32/wintty.dep b/support/win32/wintty.dep
      new file mode 100644
      index 00000000000..8f5740966ed
      --- /dev/null
      +++ b/support/win32/wintty.dep
      @@ -0,0 +1,5 @@
      +# Microsoft Developer Studio Generated Dependency File, included by wintty.mak
      +
      +..\..\build\win32\httpd.rc : \
      +	"..\..\include\ap_release.h"\
      +	
      diff --git a/support/win32/wintty.mak b/support/win32/wintty.mak
      new file mode 100644
      index 00000000000..d2c3d6c7994
      --- /dev/null
      +++ b/support/win32/wintty.mak
      @@ -0,0 +1,317 @@
      +# Microsoft Developer Studio Generated NMAKE File, Based on wintty.dsp
      +!IF "$(CFG)" == ""
      +CFG=wintty - Win32 Debug
      +!MESSAGE No configuration specified. Defaulting to wintty - Win32 Debug.
      +!ENDIF 
      +
      +!IF "$(CFG)" != "wintty - Win32 Release" && "$(CFG)" != "wintty - Win32 Debug"
      +!MESSAGE Invalid configuration "$(CFG)" specified.
      +!MESSAGE You can specify a configuration when running NMAKE
      +!MESSAGE by defining the macro CFG on the command line. For example:
      +!MESSAGE 
      +!MESSAGE NMAKE /f "wintty.mak" CFG="wintty - Win32 Debug"
      +!MESSAGE 
      +!MESSAGE Possible choices for configuration are:
      +!MESSAGE 
      +!MESSAGE "wintty - Win32 Release" (based on "Win32 (x86) Console Application")
      +!MESSAGE "wintty - Win32 Debug" (based on "Win32 (x86) Console Application")
      +!MESSAGE 
      +!ERROR An invalid configuration is specified.
      +!ENDIF 
      +
      +!IF "$(OS)" == "Windows_NT"
      +NULL=
      +!ELSE 
      +NULL=nul
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "wintty - Win32 Release"
      +
      +OUTDIR=.\Release
      +INTDIR=.\Release
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\wintty.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Release" "apr - Win32 Release" "$(OUTDIR)\wintty.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 ReleaseCLEAN" "aprutil - Win32 ReleaseCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\wintty.obj"
      +	-@erase "$(INTDIR)\wintty.res"
      +	-@erase "$(INTDIR)\wintty_src.idb"
      +	-@erase "$(INTDIR)\wintty_src.pdb"
      +	-@erase "$(OUTDIR)\wintty.exe"
      +	-@erase "$(OUTDIR)\wintty.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MD /W3 /Zi /O2 /Oy- /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\wintty_src" /FD /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\wintty.res" /i "../../include" /i "../../srclib/apr/include" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="wintty.exe" /d LONG_NAME="Apache wintty console pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\wintty.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wintty.pdb" /debug /out:"$(OUTDIR)\wintty.exe" /opt:ref 
      +LINK32_OBJS= \
      +	"$(INTDIR)\wintty.obj" \
      +	"$(INTDIR)\wintty.res" \
      +	"..\..\srclib\apr\LibR\apr-1.lib" \
      +	"..\..\srclib\apr-util\LibR\aprutil-1.lib"
      +
      +"$(OUTDIR)\wintty.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Release\wintty.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Release
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\wintty.exe"
      +   if exist .\Release\wintty.exe.manifest mt.exe -manifest .\Release\wintty.exe.manifest -outputresource:.\Release\wintty.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ELSEIF  "$(CFG)" == "wintty - Win32 Debug"
      +
      +OUTDIR=.\Debug
      +INTDIR=.\Debug
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +!IF "$(RECURSE)" == "0" 
      +
      +ALL : "$(OUTDIR)\wintty.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ELSE 
      +
      +ALL : "aprutil - Win32 Debug" "apr - Win32 Debug" "$(OUTDIR)\wintty.exe" "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +!IF "$(RECURSE)" == "1" 
      +CLEAN :"apr - Win32 DebugCLEAN" "aprutil - Win32 DebugCLEAN" 
      +!ELSE 
      +CLEAN :
      +!ENDIF 
      +	-@erase "$(INTDIR)\wintty.obj"
      +	-@erase "$(INTDIR)\wintty.res"
      +	-@erase "$(INTDIR)\wintty_src.idb"
      +	-@erase "$(INTDIR)\wintty_src.pdb"
      +	-@erase "$(OUTDIR)\wintty.exe"
      +	-@erase "$(OUTDIR)\wintty.pdb"
      +
      +"$(OUTDIR)" :
      +    if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
      +
      +CPP=cl.exe
      +CPP_PROJ=/nologo /MDd /W3 /Zi /Od /I "../srclib/apr/include" /I "../srclib/apr-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "APR_DECLARE_STATIC" /D "APU_DECLARE_STATIC" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\wintty_src" /FD /EHsc /c 
      +
      +.c{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.obj::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.c{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cpp{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +.cxx{$(INTDIR)}.sbr::
      +   $(CPP) @<<
      +   $(CPP_PROJ) $< 
      +<<
      +
      +RSC=rc.exe
      +RSC_PROJ=/l 0x409 /fo"$(INTDIR)\wintty.res" /i "../../include" /i "../../srclib/apr/include" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="wintty.exe" /d LONG_NAME="Apache wintty console pipe" 
      +BSC32=bscmake.exe
      +BSC32_FLAGS=/nologo /o"$(OUTDIR)\wintty.bsc" 
      +BSC32_SBRS= \
      +	
      +LINK32=link.exe
      +LINK32_FLAGS=kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wintty.pdb" /debug /out:"$(OUTDIR)\wintty.exe" 
      +LINK32_OBJS= \
      +	"$(INTDIR)\wintty.obj" \
      +	"$(INTDIR)\wintty.res" \
      +	"..\..\srclib\apr\LibD\apr-1.lib" \
      +	"..\..\srclib\apr-util\LibD\aprutil-1.lib"
      +
      +"$(OUTDIR)\wintty.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
      +    $(LINK32) @<<
      +  $(LINK32_FLAGS) $(LINK32_OBJS)
      +<<
      +
      +TargetPath=.\Debug\wintty.exe
      +SOURCE="$(InputPath)"
      +PostBuild_Desc=Embed .manifest
      +DS_POSTBUILD_DEP=$(INTDIR)\postbld.dep
      +
      +# Begin Custom Macros
      +OutDir=.\Debug
      +# End Custom Macros
      +
      +"$(DS_POSTBUILD_DEP)" : "$(OUTDIR)\wintty.exe"
      +   if exist .\Debug\wintty.exe.manifest mt.exe -manifest .\Debug\wintty.exe.manifest -outputresource:.\Debug\wintty.exe;1
      +	echo Helper for Post-build step > "$(DS_POSTBUILD_DEP)"
      +
      +!ENDIF 
      +
      +
      +!IF "$(NO_EXTERNAL_DEPS)" != "1"
      +!IF EXISTS("wintty.dep")
      +!INCLUDE "wintty.dep"
      +!ELSE 
      +!MESSAGE Warning: cannot find "wintty.dep"
      +!ENDIF 
      +!ENDIF 
      +
      +
      +!IF "$(CFG)" == "wintty - Win32 Release" || "$(CFG)" == "wintty - Win32 Debug"
      +
      +!IF  "$(CFG)" == "wintty - Win32 Release"
      +
      +"apr - Win32 Release" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" 
      +   cd "..\..\support\win32"
      +
      +"apr - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ELSEIF  "$(CFG)" == "wintty - Win32 Debug"
      +
      +"apr - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" 
      +   cd "..\..\support\win32"
      +
      +"apr - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\apr.mak" CFG="apr - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ENDIF 
      +
      +!IF  "$(CFG)" == "wintty - Win32 Release"
      +
      +"aprutil - Win32 Release" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" 
      +   cd "..\..\support\win32"
      +
      +"aprutil - Win32 ReleaseCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Release" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ELSEIF  "$(CFG)" == "wintty - Win32 Debug"
      +
      +"aprutil - Win32 Debug" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" 
      +   cd "..\..\support\win32"
      +
      +"aprutil - Win32 DebugCLEAN" : 
      +   cd ".\..\..\srclib\apr-util"
      +   $(MAKE) /$(MAKEFLAGS) /F ".\aprutil.mak" CFG="aprutil - Win32 Debug" RECURSE=1 CLEAN 
      +   cd "..\..\support\win32"
      +
      +!ENDIF 
      +
      +SOURCE=..\..\build\win32\httpd.rc
      +
      +!IF  "$(CFG)" == "wintty - Win32 Release"
      +
      +
      +"$(INTDIR)\wintty.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\wintty.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "NDEBUG" /d "APP_FILE" /d BIN_NAME="wintty.exe" /d LONG_NAME="Apache wintty console pipe" $(SOURCE)
      +
      +
      +!ELSEIF  "$(CFG)" == "wintty - Win32 Debug"
      +
      +
      +"$(INTDIR)\wintty.res" : $(SOURCE) "$(INTDIR)"
      +	$(RSC) /l 0x409 /fo"$(INTDIR)\wintty.res" /i "../../include" /i "../../srclib/apr/include" /i "../../build\win32" /d "_DEBUG" /d "APP_FILE" /d BIN_NAME="wintty.exe" /d LONG_NAME="Apache wintty console pipe" $(SOURCE)
      +
      +
      +!ENDIF 
      +
      +SOURCE=.\wintty.c
      +
      +"$(INTDIR)\wintty.obj" : $(SOURCE) "$(INTDIR)"
      +
      +
      +
      +!ENDIF 
      +
      diff --git a/test/Makefile.in b/test/Makefile.in
      index 6d834054773..15d404d208d 100644
      --- a/test/Makefile.in
      +++ b/test/Makefile.in
      @@ -3,7 +3,7 @@
       # test programs, then "make test"
       TARGETS =
       
      -PROGRAMS =
      +bin_PROGRAMS =
       
       PROGRAM_LDADD        = $(EXTRA_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(EXTRA_LIBS)
       PROGRAM_DEPENDENCIES =  \
      @@ -12,7 +12,7 @@ PROGRAM_DEPENDENCIES =  \
       
       include $(top_builddir)/build/rules.mk
       
      -test: $(PROGRAMS)
      +test: $(bin_PROGRAMS)
       
       # example for building a test proggie
       # dbu_OBJECTS = dbu.lo
      diff --git a/test/make_sni.sh b/test/make_sni.sh
      index c12ad31cda0..b8b651df462 100644
      --- a/test/make_sni.sh
      +++ b/test/make_sni.sh
      @@ -19,8 +19,6 @@
       # and certificates as to facilitate testing of TLS server name 
       # indication support (RFC 4366) or SNI.
       #
      -# $Id$
      -#
       #
       OPENSSL=${OPENSSL:-openssl}
       DOMAIN=${DOMAIN:-my-sni-test.org}
      @@ -84,7 +82,7 @@ do
       done
       
       if [ $# = 1 ]; then
      -    echo "Aborted - just specifing one vhost makes no sense for SNI testing. Go wild !"
      +    echo "Aborted - just specifying one vhost makes no sense for SNI testing. Go wild !"
           exit 1
       fi
       
      diff --git a/test/test_limits.c b/test/test_limits.c
      index e2b5285f77a..70b8098f2f9 100644
      --- a/test/test_limits.c
      +++ b/test/test_limits.c
      @@ -124,8 +124,8 @@ main(int argc, char *argv[])
               perror("gethostbyname");
               exit(1);
           }
      -    bzero(&sin, sizeof(sin));
      -    bcopy(he->h_addr, (char *)&sin.sin_addr, he->h_length);
      +    memset(&sin, sizeof(sin));
      +    memcpy((char *)&sin.sin_addr, he->h_addr, he->h_length);
           sin.sin_family = he->h_addrtype;
           sin.sin_port = htons(port);